diff --git a/doc/analyze_check_versions.md b/doc/analyze_check_versions.md index daa370cecbc0..74abe1499c86 100644 --- a/doc/analyze_check_versions.md +++ b/doc/analyze_check_versions.md @@ -10,4 +10,4 @@ Pylint Guidelines Checker | 0.5.7 | 0.5.7 | 2026-04-13 | MyPy | 1.18.1 | 1.19.1 | 2026-04-13 | Pyright | 1.1.405 | 1.1.407 | 2026-04-13 | Sphinx | 8.2.0 | N/A | N/A | -Black | 24.4.0 | N/A | N/A | +Black | 26.3.0 | N/A | N/A | diff --git a/eng/tools/azure-sdk-tools/azpysdk/black.py b/eng/tools/azure-sdk-tools/azpysdk/black.py index c03fbe904b52..afdb256ec536 100644 --- a/eng/tools/azure-sdk-tools/azpysdk/black.py +++ b/eng/tools/azure-sdk-tools/azpysdk/black.py @@ -13,7 +13,7 @@ from .Check import Check -BLACK_VERSION = "24.4.0" +BLACK_VERSION = "26.3.0" REPO_ROOT = discover_repo_root() diff --git a/eng/tox/tox.ini b/eng/tox/tox.ini index 83572aa08518..bf91315292b9 100644 --- a/eng/tox/tox.ini +++ b/eng/tox/tox.ini @@ -578,7 +578,7 @@ commands = description=Runs the code formatter black skip_install=true deps= - black==24.4.0 + black==26.3.0 -rdev_requirements.txt commands= python {repository_root}/eng/tox/run_black.py -t {tox_root} diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_patch.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_patch.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/_patch.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/_patch.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/operations/_patch.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/operations/_patch.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_patch.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_patch.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_patch.py b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_patch.py +++ b/sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/advisor/azure-mgmt-advisor/setup.py b/sdk/advisor/azure-mgmt-advisor/setup.py index 0dcd483c20fc..b821463fa3cc 100644 --- a/sdk/advisor/azure-mgmt-advisor/setup.py +++ b/sdk/advisor/azure-mgmt-advisor/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Advisor" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/advisor/azure-mgmt-advisor/tests/conftest.py b/sdk/advisor/azure-mgmt-advisor/tests/conftest.py index 8d2774b17d06..f15ee66a1cdc 100644 --- a/sdk/advisor/azure-mgmt-advisor/tests/conftest.py +++ b/sdk/advisor/azure-mgmt-advisor/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/advisor/azure-mgmt-advisor/tests/test_mgmt_advisor.py b/sdk/advisor/azure-mgmt-advisor/tests/test_mgmt_advisor.py index 43a4a28334fe..fde7a1c6e46f 100644 --- a/sdk/advisor/azure-mgmt-advisor/tests/test_mgmt_advisor.py +++ b/sdk/advisor/azure-mgmt-advisor/tests/test_mgmt_advisor.py @@ -1,34 +1,29 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import azure.mgmt.advisor import datetime import re import unittest -from azure.mgmt.advisor.models import ( - ConfigData -) +from azure.mgmt.advisor.models import ConfigData -from devtools_testutils import ( - AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy -) +from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy # the goal of these tests is to validate AutoRest generation of the Python wrapper # and NOT to validate the behavior of the API. so the tests will primarily attempt # to verify that all operations are possible using the generated client and that # the operations can accept valid input and produce valid output. + class TestMgmtAdvisor(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client( - azure.mgmt.advisor.AdvisorManagementClient - ) + self.client = self.create_mgmt_client(azure.mgmt.advisor.AdvisorManagementClient) @recorded_by_proxy def test_generate_recommendations(self): @@ -40,8 +35,8 @@ def call(response, *args, **kwargs): response = self.client.recommendations.generate(cls=call) # we should get a valid Location header back - assert 'Location' in response.headers - location = response.headers['Location'] + assert "Location" in response.headers + location = response.headers["Location"] # extract the operation ID from the Location header operation_id = re.findall("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", location) @@ -51,10 +46,7 @@ def call(response, *args, **kwargs): assert len(operation_id), 1 # we should be able to get generation status for this operation ID - response = self.client.recommendations.get_generate_status( - cls=call, - operation_id = operation_id[0] - ) + response = self.client.recommendations.get_generate_status(cls=call, operation_id=operation_id[0]) status_code = response.status_code # and the status should be 202 or 204 @@ -82,20 +74,17 @@ def test_suppressions(self): assert rec.short_description != None assert rec.short_description.problem != None assert rec.short_description.solution != None - if (rec.impacted_value != None): + if rec.impacted_value != None: recommendation = rec # construct the properties needed for further operations - resourceUri = recommendation.id[:recommendation.id.find("/providers/Microsoft.Advisor/recommendations")] + resourceUri = recommendation.id[: recommendation.id.find("/providers/Microsoft.Advisor/recommendations")] recommendationName = recommendation.name suppressionName = "Python_SDK_Test" timeToLive = "00:01:00:00" # get the individual recommendation - output = self.client.recommendations.get( - resource_uri = resourceUri, - recommendation_id = recommendationName - ) + output = self.client.recommendations.get(resource_uri=resourceUri, recommendation_id=recommendationName) # it should be identical to what we got from list assert output.id == rec.id @@ -103,10 +92,7 @@ def test_suppressions(self): # create a new suppression suppression = self.client.suppressions.create( - resource_uri = resourceUri, - recommendation_id = recommendationName, - name = suppressionName, - ttl = timeToLive + resource_uri=resourceUri, recommendation_id=recommendationName, name=suppressionName, ttl=timeToLive ) # it should get created successfully @@ -114,25 +100,28 @@ def test_suppressions(self): # get the suppression sup = self.client.suppressions.get( - resource_uri = resourceUri, - recommendation_id = recommendationName, - name = suppressionName + resource_uri=resourceUri, recommendation_id=recommendationName, name=suppressionName ) # it should be identical to what we just added assert sup.name == suppressionName - assert sup.id == resourceUri + "/providers/Microsoft.Advisor/recommendations/" + recommendationName + "/suppressions/" + suppressionName + assert ( + sup.id + == resourceUri + + "/providers/Microsoft.Advisor/recommendations/" + + recommendationName + + "/suppressions/" + + suppressionName + ) # delete the suppression self.client.suppressions.delete( - resource_uri = resourceUri, - recommendation_id = recommendationName, - name = suppressionName + resource_uri=resourceUri, recommendation_id=recommendationName, name=suppressionName ) # the suppression should be gone - #response = list(self.client.suppressions.list()) - #for sup in response: + # response = list(self.client.suppressions.list()) + # for sup in response: # assert sup.Name != suppressionName @unittest.skip("unavailable") @@ -141,7 +130,7 @@ def test_configurations_subscription(self): # create a new configuration to update low CPU threshold to 20 input = ConfigData() - input.low_cpu_threshold=20 + input.low_cpu_threshold = 20 # update the configuration response = self.client.configurations.create_in_subscription(input) @@ -153,7 +142,7 @@ def test_configurations_subscription(self): assert output.low_cpu_threshold == "20" # restore the default configuration - input.low_cpu_threshold=5 + input.low_cpu_threshold = 5 response = self.client.configurations.create_in_subscription(input) # retrieve the configurations @@ -170,35 +159,32 @@ def test_configurations_resourcegroup(self, resource_group): # create a new configuration to update exclude to True input = ConfigData() - input.exclude=True + input.exclude = True # update the configuration self.client.configurations.create_in_resource_group( - configuration_name=configurationName, - resource_group=resourceGroupName, - config_contract=input + configuration_name=configurationName, resource_group=resourceGroupName, config_contract=input ) # retrieve the configurations - output = list(self.client.configurations.list_by_resource_group(resource_group = resourceGroupName))[0] + output = list(self.client.configurations.list_by_resource_group(resource_group=resourceGroupName))[0] # it should be identical to what we just set assert output.exclude == True # restore the default configuration - input.exclude=False + input.exclude = False self.client.configurations.create_in_resource_group( - configuration_name=configurationName, - resource_group=resourceGroupName, - config_contract=input + configuration_name=configurationName, resource_group=resourceGroupName, config_contract=input ) # retrieve the configurations - output = list(self.client.configurations.list_by_resource_group(resource_group = resourceGroupName))[0] + output = list(self.client.configurations.list_by_resource_group(resource_group=resourceGroupName))[0] # it should be identical to what we just set assert output.exclude == False -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/agent_framework.py b/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/agent_framework.py index 7177b522d2a9..7a0f44d262be 100644 --- a/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/agent_framework.py +++ b/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/agent_framework.py @@ -95,9 +95,7 @@ def init_tracing(self): ) self.tracer = trace.get_tracer(__name__) - async def agent_run( - self, context: AgentRunContext - ) -> Union[ + async def agent_run(self, context: AgentRunContext) -> Union[ OpenAIResponse, AsyncGenerator[ResponseStreamEvent, Any], ]: diff --git a/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_non_streaming_converter.py b/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_non_streaming_converter.py index 805a5eeb9dec..823846f3ca7e 100644 --- a/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_non_streaming_converter.py +++ b/sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/models/agent_framework_output_non_streaming_converter.py @@ -169,7 +169,7 @@ def _append_function_result_content(self, content: FunctionResultContent, sink: result = [raw] elif isinstance(raw, list): for item in raw: - result.append(self._coerce_result_text(item)) # type: ignore + result.append(self._coerce_result_text(item)) # type: ignore call_id = getattr(content, "call_id", None) or "" func_out_id = self._context.id_generator.generate_function_output_id() sink.append( diff --git a/sdk/agentserver/azure-ai-agentserver-agentframework/samples/mcp_apikey/mcp_apikey.py b/sdk/agentserver/azure-ai-agentserver-agentframework/samples/mcp_apikey/mcp_apikey.py index 985d7fd01e0c..3cce0cb3569d 100644 --- a/sdk/agentserver/azure-ai-agentserver-agentframework/samples/mcp_apikey/mcp_apikey.py +++ b/sdk/agentserver/azure-ai-agentserver-agentframework/samples/mcp_apikey/mcp_apikey.py @@ -19,9 +19,7 @@ async def main() -> None: github_token = os.getenv("GITHUB_TOKEN") if not github_token: - raise RuntimeError( - "GITHUB_TOKEN environment variable not set. Provide a GitHub token with MCP access." - ) + raise RuntimeError("GITHUB_TOKEN environment variable not set. Provide a GitHub token with MCP access.") agent = AzureOpenAIChatClient(credential=DefaultAzureCredential()).create_agent( instructions="You are a helpful assistant that answers GitHub questions. Use only the exposed MCP tools.", diff --git a/sdk/agentserver/azure-ai-agentserver-agentframework/samples/workflow_agent_simple/workflow_agent_simple.py b/sdk/agentserver/azure-ai-agentserver-agentframework/samples/workflow_agent_simple/workflow_agent_simple.py index ce3cca956273..5a05a30b0d08 100644 --- a/sdk/agentserver/azure-ai-agentserver-agentframework/samples/workflow_agent_simple/workflow_agent_simple.py +++ b/sdk/agentserver/azure-ai-agentserver-agentframework/samples/workflow_agent_simple/workflow_agent_simple.py @@ -73,12 +73,8 @@ def __init__(self, chat_client: BaseChatClient) -> None: self._chat_client = chat_client @handler - async def review( - self, request: ReviewRequest, ctx: WorkflowContext[ReviewResponse] - ) -> None: - print( - f"🔍 Reviewer: Evaluating response for request {request.request_id[:8]}..." - ) + async def review(self, request: ReviewRequest, ctx: WorkflowContext[ReviewResponse]) -> None: + print(f"🔍 Reviewer: Evaluating response for request {request.request_id[:8]}...") # Use the chat client to review the message and use structured output. # NOTE: this can be modified to use an evaluation framework. @@ -120,9 +116,7 @@ class _Response(BaseModel): print("🔍 Reviewer: Sending review request to LLM...") # Get the response from the chat client. - response = await self._chat_client.get_response( - messages=messages, response_format=_Response - ) + response = await self._chat_client.get_response(messages=messages, response_format=_Response) # Parse the response. parsed = _Response.model_validate_json(response.messages[-1].text) @@ -149,16 +143,12 @@ def __init__(self, chat_client: BaseChatClient) -> None: self._pending_requests: dict[str, tuple[ReviewRequest, list[ChatMessage]]] = {} @handler - async def handle_user_messages( - self, user_messages: list[ChatMessage], ctx: WorkflowContext[ReviewRequest] - ) -> None: + async def handle_user_messages(self, user_messages: list[ChatMessage], ctx: WorkflowContext[ReviewRequest]) -> None: print("🔧 Worker: Received user messages, generating response...") # Handle user messages and prepare a review request for the reviewer. # Define the system prompt. - messages = [ - ChatMessage(role=ChatRole.SYSTEM, text="You are a helpful assistant.") - ] + messages = [ChatMessage(role=ChatRole.SYSTEM, text="You are a helpful assistant.")] # Add user messages. messages.extend(user_messages) @@ -178,9 +168,7 @@ async def handle_user_messages( agent_messages=response.messages, ) - print( - f"🔧 Worker: Generated response, sending to reviewer (ID: {request.request_id[:8]})" - ) + print(f"🔧 Worker: Generated response, sending to reviewer (ID: {request.request_id[:8]})") # Send the review request. await ctx.send_message(request) @@ -188,20 +176,14 @@ async def handle_user_messages( self._pending_requests[request.request_id] = (request, messages) @handler - async def handle_review_response( - self, review: ReviewResponse, ctx: WorkflowContext[ReviewRequest] - ) -> None: - print( - f"🔧 Worker: Received review for request {review.request_id[:8]} - Approved: {review.approved}" - ) + async def handle_review_response(self, review: ReviewResponse, ctx: WorkflowContext[ReviewRequest]) -> None: + print(f"🔧 Worker: Received review for request {review.request_id[:8]} - Approved: {review.approved}") # Handle the review response. Depending on the approval status, # either emit the approved response as AgentRunUpdateEvent, or # retry given the feedback. if review.request_id not in self._pending_requests: - raise ValueError( - f"Received review response for unknown request ID: {review.request_id}" - ) + raise ValueError(f"Received review response for unknown request ID: {review.request_id}") # Remove the request from pending requests. request, messages = self._pending_requests.pop(review.request_id) @@ -218,9 +200,7 @@ async def handle_review_response( await ctx.add_event( AgentRunUpdateEvent( self.id, - data=AgentRunResponseUpdate( - contents=contents, role=ChatRole.ASSISTANT - ), + data=AgentRunResponseUpdate(contents=contents, role=ChatRole.ASSISTANT), ) ) return @@ -242,16 +222,12 @@ async def handle_review_response( # Get the new response from the chat client. response = await self._chat_client.get_response(messages=messages) - print( - f"🔧 Worker: New response generated after feedback: {response.messages[-1].text}" - ) + print(f"🔧 Worker: New response generated after feedback: {response.messages[-1].text}") # Process the response. messages.extend(response.messages) - print( - f"🔧 Worker: Generated improved response, sending for re-review (ID: {review.request_id[:8]})" - ) + print(f"🔧 Worker: Generated improved response, sending for re-review (ID: {review.request_id[:8]})") # Send an updated review request. new_request = ReviewRequest( request_id=review.request_id, @@ -269,12 +245,8 @@ def build_agent(chat_client: BaseChatClient): worker = Worker(chat_client=chat_client) return ( WorkflowBuilder() - .add_edge( - worker, reviewer - ) # <--- This edge allows the worker to send requests to the reviewer - .add_edge( - reviewer, worker - ) # <--- This edge allows the reviewer to send feedback back to the worker + .add_edge(worker, reviewer) # <--- This edge allows the worker to send requests to the reviewer + .add_edge(reviewer, worker) # <--- This edge allows the reviewer to send feedback back to the worker .set_start_executor(worker) .build() .as_agent() # Convert the workflow to an agent. diff --git a/sdk/agentserver/azure-ai-agentserver-agentframework/tests/conftest.py b/sdk/agentserver/azure-ai-agentserver-agentframework/tests/conftest.py index a56a7164c0a3..1e3bbedf2fdc 100644 --- a/sdk/agentserver/azure-ai-agentserver-agentframework/tests/conftest.py +++ b/sdk/agentserver/azure-ai-agentserver-agentframework/tests/conftest.py @@ -11,5 +11,5 @@ packages_root = tests_root.parents[2] / "packages" for path in (packages_root, src_root): - if str(path) not in sys.path: - sys.path.insert(0, str(path)) + if str(path) not in sys.path: + sys.path.insert(0, str(path)) diff --git a/sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/test_agent_framework_input_converter.py b/sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/test_agent_framework_input_converter.py index 3dab36131f8d..ee16d2f6587b 100644 --- a/sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/test_agent_framework_input_converter.py +++ b/sdk/agentserver/azure-ai-agentserver-agentframework/tests/unit_tests/test_agent_framework_input_converter.py @@ -5,135 +5,135 @@ from agent_framework import ChatMessage, Role as ChatRole converter_module = importlib.import_module( - "azure.ai.agentserver.agentframework.models.agent_framework_input_converters" + "azure.ai.agentserver.agentframework.models.agent_framework_input_converters" ) AgentFrameworkInputConverter = converter_module.AgentFrameworkInputConverter @pytest.fixture() def converter() -> AgentFrameworkInputConverter: - return AgentFrameworkInputConverter() + return AgentFrameworkInputConverter() @pytest.mark.unit def test_transform_none_returns_none(converter: AgentFrameworkInputConverter) -> None: - assert converter.transform_input(None) is None + assert converter.transform_input(None) is None @pytest.mark.unit def test_transform_string_returns_same(converter: AgentFrameworkInputConverter) -> None: - assert converter.transform_input("hello") == "hello" + assert converter.transform_input("hello") == "hello" @pytest.mark.unit def test_transform_implicit_user_message_with_string(converter: AgentFrameworkInputConverter) -> None: - payload = [{"content": "How are you?"}] + payload = [{"content": "How are you?"}] - result = converter.transform_input(payload) + result = converter.transform_input(payload) - assert result == "How are you?" + assert result == "How are you?" @pytest.mark.unit def test_transform_implicit_user_message_with_input_text_list(converter: AgentFrameworkInputConverter) -> None: - payload = [ - { - "content": [ - {"type": "input_text", "text": "Hello"}, - {"type": "input_text", "text": "world"}, - ] - } - ] + payload = [ + { + "content": [ + {"type": "input_text", "text": "Hello"}, + {"type": "input_text", "text": "world"}, + ] + } + ] - result = converter.transform_input(payload) + result = converter.transform_input(payload) - assert result == "Hello world" + assert result == "Hello world" @pytest.mark.unit def test_transform_explicit_message_returns_chat_message(converter: AgentFrameworkInputConverter) -> None: - payload = [ - { - "type": "message", - "role": "assistant", - "content": [ - {"type": "input_text", "text": "Hi there"}, - ], - } - ] + payload = [ + { + "type": "message", + "role": "assistant", + "content": [ + {"type": "input_text", "text": "Hi there"}, + ], + } + ] - result = converter.transform_input(payload) + result = converter.transform_input(payload) - assert isinstance(result, ChatMessage) - assert result.role == ChatRole.ASSISTANT - assert result.text == "Hi there" + assert isinstance(result, ChatMessage) + assert result.role == ChatRole.ASSISTANT + assert result.text == "Hi there" @pytest.mark.unit def test_transform_multiple_explicit_messages_returns_list(converter: AgentFrameworkInputConverter) -> None: - payload = [ - { - "type": "message", - "role": "user", - "content": "Hello", - }, - { - "type": "message", - "role": "assistant", - "content": [ - {"type": "input_text", "text": "Greetings"}, - ], - }, - ] - - result = converter.transform_input(payload) - - assert isinstance(result, list) - assert len(result) == 2 - assert all(isinstance(item, ChatMessage) for item in result) - assert result[0].role == ChatRole.USER - assert result[0].text == "Hello" - assert result[1].role == ChatRole.ASSISTANT - assert result[1].text == "Greetings" + payload = [ + { + "type": "message", + "role": "user", + "content": "Hello", + }, + { + "type": "message", + "role": "assistant", + "content": [ + {"type": "input_text", "text": "Greetings"}, + ], + }, + ] + + result = converter.transform_input(payload) + + assert isinstance(result, list) + assert len(result) == 2 + assert all(isinstance(item, ChatMessage) for item in result) + assert result[0].role == ChatRole.USER + assert result[0].text == "Hello" + assert result[1].role == ChatRole.ASSISTANT + assert result[1].text == "Greetings" @pytest.mark.unit def test_transform_mixed_messages_coerces_to_strings(converter: AgentFrameworkInputConverter) -> None: - payload = [ - {"content": "First"}, - { - "type": "message", - "role": "assistant", - "content": [ - {"type": "input_text", "text": "Second"}, - ], - }, - ] + payload = [ + {"content": "First"}, + { + "type": "message", + "role": "assistant", + "content": [ + {"type": "input_text", "text": "Second"}, + ], + }, + ] - result = converter.transform_input(payload) + result = converter.transform_input(payload) - assert result == ["First", "Second"] + assert result == ["First", "Second"] @pytest.mark.unit def test_transform_invalid_input_type_raises(converter: AgentFrameworkInputConverter) -> None: - with pytest.raises(Exception) as exc_info: - converter.transform_input({"content": "invalid"}) + with pytest.raises(Exception) as exc_info: + converter.transform_input({"content": "invalid"}) - assert "Unsupported input type" in str(exc_info.value) + assert "Unsupported input type" in str(exc_info.value) @pytest.mark.unit def test_transform_skips_non_text_entries(converter: AgentFrameworkInputConverter) -> None: - payload = [ - { - "content": [ - {"type": "input_text", "text": 123}, - {"type": "image", "url": "https://example.com"}, - ] - } - ] - - result = converter.transform_input(payload) - - assert result is None + payload = [ + { + "content": [ + {"type": "input_text", "text": 123}, + {"type": "image", "url": "https://example.com"}, + ] + } + ] + + result = converter.transform_input(payload) + + assert result is None diff --git a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/_create_response.py b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/_create_response.py index a38f55408c7f..5262b76be623 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/_create_response.py +++ b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/_create_response.py @@ -4,9 +4,10 @@ # pylint: disable=no-name-in-module from typing import Optional -from .openai import response_create_params # type: ignore +from .openai import response_create_params # type: ignore from . import projects as _azure_ai_projects_models -class CreateResponse(response_create_params.ResponseCreateParamsBase, total=False): # type: ignore + +class CreateResponse(response_create_params.ResponseCreateParamsBase, total=False): # type: ignore agent: Optional[_azure_ai_projects_models.AgentReference] stream: Optional[bool] diff --git a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/openai/__init__.py b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/openai/__init__.py index ecf2179f53b7..4c5edd230d0d 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/openai/__init__.py +++ b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/openai/__init__.py @@ -11,6 +11,7 @@ This module re-exports OpenAI SDK types. For detailed documentation, please refer to the `OpenAI Python SDK documentation `_. """ + from openai.types.responses import * # pylint: disable=unused-wildcard-import __all__ = [name for name in globals() if not name.startswith("_")] # type: ignore[var-annotated] diff --git a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_models.py b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_models.py index a810ddc805c3..4d8c19289601 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_models.py +++ b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_models.py @@ -47,7 +47,7 @@ ) if TYPE_CHECKING: - from .. import _types, models as _models # type: ignore + from .. import _types, models as _models # type: ignore class Tool(_Model): @@ -5680,7 +5680,9 @@ class FileSearchTool(Tool, discriminator="file_search"): visibility=["read", "create", "update", "delete", "query"] ) """Ranking options for search.""" - filters: Optional[Union["_models.ComparisonFilter", "_models.CompoundFilter"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + filters: Optional[Union["_models.ComparisonFilter", "_models.CompoundFilter"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """A filter to apply. Is either a ComparisonFilter type or a CompoundFilter type.""" @overload @@ -10418,128 +10420,128 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Response(_Model): """Response. - :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be -useful for storing additional information about the object in a structured -format, and querying for objects via API or the dashboard. -Keys are strings with a maximum length of 64 characters. Values are strings -with a maximum length of 512 characters. Required. - :vartype metadata: dict[str, str] - :ivar temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 - will make the output more random, while lower values like 0.2 will make it more focused and - deterministic. -We generally recommend altering this or ``top_p`` but not both. Required. - :vartype temperature: float - :ivar top_p: An alternative to sampling with temperature, called nucleus sampling, -where the model considers the results of the tokens with top_p probability -mass. So 0.1 means only the tokens comprising the top 10% probability mass -are considered. -We generally recommend altering this or ``temperature`` but not both. Required. - :vartype top_p: float - :ivar user: A unique identifier representing your end-user, which can help OpenAI to monitor - and detect abuse. `Learn more `_. Required. - :vartype user: str - :ivar service_tier: Note: service_tier is not applicable to Azure OpenAI. Known values are: - "auto", "default", "flex", "scale", and "priority". - :vartype service_tier: str or ~azure.ai.projects.models.ServiceTier - :ivar top_logprobs: An integer between 0 and 20 specifying the number of most likely tokens to - return at each token position, each with an associated log probability. - :vartype top_logprobs: int - :ivar previous_response_id: The unique ID of the previous response to the model. Use this to -create multi-turn conversations. Learn more about -`conversation state `_. - :vartype previous_response_id: str - :ivar model: The model deployment to use for the creation of this response. - :vartype model: str - :ivar reasoning: - :vartype reasoning: ~azure.ai.projects.models.Reasoning - :ivar background: Whether to run the model response in the background. -`Learn more `_. - :vartype background: bool - :ivar max_output_tokens: An upper bound for the number of tokens that can be generated for a - response, including visible output tokens and `reasoning tokens `_. - :vartype max_output_tokens: int - :ivar max_tool_calls: The maximum number of total calls to built-in tools that can be processed - in a response. This maximum number applies across all built-in tool calls, not per individual - tool. Any further attempts to call a tool by the model will be ignored. - :vartype max_tool_calls: int - :ivar text: Configuration options for a text response from the model. Can be plain -text or structured JSON data. Learn more: - * [Text inputs and outputs](/docs/guides/text) - * [Structured Outputs](/docs/guides/structured-outputs). - :vartype text: ~azure.ai.projects.models.ResponseText - :ivar tools: An array of tools the model may call while generating a response. You -can specify which tool to use by setting the ``tool_choice`` parameter. -The two categories of tools you can provide the model are: - * **Built-in tools**: Tools that are provided by OpenAI that extend the -model's capabilities, like [web search](/docs/guides/tools-web-search) -or [file search](/docs/guides/tools-file-search). Learn more about -[built-in tools](/docs/guides/tools). - * **Function calls (custom tools)**: Functions that are defined by you, -enabling the model to call your own code. Learn more about -[function calling](/docs/guides/function-calling). - :vartype tools: list[~azure.ai.projects.models.Tool] - :ivar tool_choice: How the model should select which tool (or tools) to use when generating -a response. See the ``tools`` parameter to see how to specify which tools -the model can call. Is either a Union[str, "_models.ToolChoiceOptions"] type or a - ToolChoiceObject type. - :vartype tool_choice: str or ~azure.ai.projects.models.ToolChoiceOptions or - ~azure.ai.projects.models.ToolChoiceObject - :ivar prompt: - :vartype prompt: ~azure.ai.projects.models.Prompt - :ivar truncation: The truncation strategy to use for the model response. - * `auto`: If the context of this response and previous ones exceeds -the model's context window size, the model will truncate the -response to fit the context window by dropping input items in the -middle of the conversation. - * `disabled` (default): If a model response will exceed the context window -size for a model, the request will fail with a 400 error. Is either a Literal["auto"] type or a - Literal["disabled"] type. - :vartype truncation: str or str - :ivar id: Unique identifier for this Response. Required. - :vartype id: str - :ivar object: The object type of this resource - always set to ``response``. Required. Default - value is "response". - :vartype object: str - :ivar status: The status of the response generation. One of ``completed``, ``failed``, -``in_progress``, ``cancelled``, ``queued``, or ``incomplete``. Is one of the following types: - Literal["completed"], Literal["failed"], Literal["in_progress"], Literal["cancelled"], - Literal["queued"], Literal["incomplete"] - :vartype status: str or str or str or str or str or str - :ivar created_at: Unix timestamp (in seconds) of when this Response was created. Required. - :vartype created_at: ~datetime.datetime - :ivar error: Required. - :vartype error: ~azure.ai.projects.models.ResponseError - :ivar incomplete_details: Details about why the response is incomplete. Required. - :vartype incomplete_details: ~azure.ai.projects.models.ResponseIncompleteDetails1 - :ivar output: An array of content items generated by the model. - * The length and order of items in the `output` array is dependent -on the model's response. - * Rather than accessing the first item in the `output` array and -assuming it's an `assistant` message with the content generated by -the model, you might consider using the `output_text` property where -supported in SDKs. Required. - :vartype output: list[~azure.ai.projects.models.ItemResource] - :ivar instructions: A system (or developer) message inserted into the model's context. -When using along with ``previous_response_id``, the instructions from a previous -response will not be carried over to the next response. This makes it simple -to swap out system (or developer) messages in new responses. Required. Is either a str type or - a [ItemParam] type. - :vartype instructions: str or list[~azure.ai.projects.models.ItemParam] - :ivar output_text: SDK-only convenience property that contains the aggregated text output -from all ``output_text`` items in the ``output`` array, if any are present. -Supported in the Python and JavaScript SDKs. - :vartype output_text: str - :ivar usage: - :vartype usage: ~azure.ai.projects.models.ResponseUsage - :ivar parallel_tool_calls: Whether to allow the model to run tool calls in parallel. Required. - :vartype parallel_tool_calls: bool - :ivar conversation: Required. - :vartype conversation: ~azure.ai.projects.models.ResponseConversation1 - :ivar agent: The agent used for this response. - :vartype agent: ~azure.ai.projects.models.AgentId - :ivar structured_inputs: The structured inputs to the response that can participate in prompt - template substitution or tool argument bindings. - :vartype structured_inputs: dict[str, any] + :ivar metadata: Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. Required. + :vartype metadata: dict[str, str] + :ivar temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 + will make the output more random, while lower values like 0.2 will make it more focused and + deterministic. + We generally recommend altering this or ``top_p`` but not both. Required. + :vartype temperature: float + :ivar top_p: An alternative to sampling with temperature, called nucleus sampling, + where the model considers the results of the tokens with top_p probability + mass. So 0.1 means only the tokens comprising the top 10% probability mass + are considered. + We generally recommend altering this or ``temperature`` but not both. Required. + :vartype top_p: float + :ivar user: A unique identifier representing your end-user, which can help OpenAI to monitor + and detect abuse. `Learn more `_. Required. + :vartype user: str + :ivar service_tier: Note: service_tier is not applicable to Azure OpenAI. Known values are: + "auto", "default", "flex", "scale", and "priority". + :vartype service_tier: str or ~azure.ai.projects.models.ServiceTier + :ivar top_logprobs: An integer between 0 and 20 specifying the number of most likely tokens to + return at each token position, each with an associated log probability. + :vartype top_logprobs: int + :ivar previous_response_id: The unique ID of the previous response to the model. Use this to + create multi-turn conversations. Learn more about + `conversation state `_. + :vartype previous_response_id: str + :ivar model: The model deployment to use for the creation of this response. + :vartype model: str + :ivar reasoning: + :vartype reasoning: ~azure.ai.projects.models.Reasoning + :ivar background: Whether to run the model response in the background. + `Learn more `_. + :vartype background: bool + :ivar max_output_tokens: An upper bound for the number of tokens that can be generated for a + response, including visible output tokens and `reasoning tokens `_. + :vartype max_output_tokens: int + :ivar max_tool_calls: The maximum number of total calls to built-in tools that can be processed + in a response. This maximum number applies across all built-in tool calls, not per individual + tool. Any further attempts to call a tool by the model will be ignored. + :vartype max_tool_calls: int + :ivar text: Configuration options for a text response from the model. Can be plain + text or structured JSON data. Learn more: + * [Text inputs and outputs](/docs/guides/text) + * [Structured Outputs](/docs/guides/structured-outputs). + :vartype text: ~azure.ai.projects.models.ResponseText + :ivar tools: An array of tools the model may call while generating a response. You + can specify which tool to use by setting the ``tool_choice`` parameter. + The two categories of tools you can provide the model are: + * **Built-in tools**: Tools that are provided by OpenAI that extend the + model's capabilities, like [web search](/docs/guides/tools-web-search) + or [file search](/docs/guides/tools-file-search). Learn more about + [built-in tools](/docs/guides/tools). + * **Function calls (custom tools)**: Functions that are defined by you, + enabling the model to call your own code. Learn more about + [function calling](/docs/guides/function-calling). + :vartype tools: list[~azure.ai.projects.models.Tool] + :ivar tool_choice: How the model should select which tool (or tools) to use when generating + a response. See the ``tools`` parameter to see how to specify which tools + the model can call. Is either a Union[str, "_models.ToolChoiceOptions"] type or a + ToolChoiceObject type. + :vartype tool_choice: str or ~azure.ai.projects.models.ToolChoiceOptions or + ~azure.ai.projects.models.ToolChoiceObject + :ivar prompt: + :vartype prompt: ~azure.ai.projects.models.Prompt + :ivar truncation: The truncation strategy to use for the model response. + * `auto`: If the context of this response and previous ones exceeds + the model's context window size, the model will truncate the + response to fit the context window by dropping input items in the + middle of the conversation. + * `disabled` (default): If a model response will exceed the context window + size for a model, the request will fail with a 400 error. Is either a Literal["auto"] type or a + Literal["disabled"] type. + :vartype truncation: str or str + :ivar id: Unique identifier for this Response. Required. + :vartype id: str + :ivar object: The object type of this resource - always set to ``response``. Required. Default + value is "response". + :vartype object: str + :ivar status: The status of the response generation. One of ``completed``, ``failed``, + ``in_progress``, ``cancelled``, ``queued``, or ``incomplete``. Is one of the following types: + Literal["completed"], Literal["failed"], Literal["in_progress"], Literal["cancelled"], + Literal["queued"], Literal["incomplete"] + :vartype status: str or str or str or str or str or str + :ivar created_at: Unix timestamp (in seconds) of when this Response was created. Required. + :vartype created_at: ~datetime.datetime + :ivar error: Required. + :vartype error: ~azure.ai.projects.models.ResponseError + :ivar incomplete_details: Details about why the response is incomplete. Required. + :vartype incomplete_details: ~azure.ai.projects.models.ResponseIncompleteDetails1 + :ivar output: An array of content items generated by the model. + * The length and order of items in the `output` array is dependent + on the model's response. + * Rather than accessing the first item in the `output` array and + assuming it's an `assistant` message with the content generated by + the model, you might consider using the `output_text` property where + supported in SDKs. Required. + :vartype output: list[~azure.ai.projects.models.ItemResource] + :ivar instructions: A system (or developer) message inserted into the model's context. + When using along with ``previous_response_id``, the instructions from a previous + response will not be carried over to the next response. This makes it simple + to swap out system (or developer) messages in new responses. Required. Is either a str type or + a [ItemParam] type. + :vartype instructions: str or list[~azure.ai.projects.models.ItemParam] + :ivar output_text: SDK-only convenience property that contains the aggregated text output + from all ``output_text`` items in the ``output`` array, if any are present. + Supported in the Python and JavaScript SDKs. + :vartype output_text: str + :ivar usage: + :vartype usage: ~azure.ai.projects.models.ResponseUsage + :ivar parallel_tool_calls: Whether to allow the model to run tool calls in parallel. Required. + :vartype parallel_tool_calls: bool + :ivar conversation: Required. + :vartype conversation: ~azure.ai.projects.models.ResponseConversation1 + :ivar agent: The agent used for this response. + :vartype agent: ~azure.ai.projects.models.AgentId + :ivar structured_inputs: The structured inputs to the response that can participate in prompt + template substitution or tool argument bindings. + :vartype structured_inputs: dict[str, any] """ metadata: dict[str, str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) diff --git a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch.py b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch.py index 6cd95db87150..ab1a58ca4117 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch.py +++ b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Dict from ._patch_evaluations import EvaluatorIds from ._models import CustomCredential as CustomCredentialGenerated diff --git a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch_evaluations.py b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch_evaluations.py index d362c28d0d8a..1b60328dcc8f 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch_evaluations.py +++ b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/models/projects/_patch_evaluations.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from enum import Enum from azure.core import CaseInsensitiveEnumMeta diff --git a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/server/common/agent_run_context.py b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/server/common/agent_run_context.py index 6fae56f0027d..2703f66f6ff2 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/server/common/agent_run_context.py +++ b/sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/server/common/agent_run_context.py @@ -46,7 +46,7 @@ def stream(self) -> bool: def get_agent_id_object(self) -> AgentId: agent = self.request.get("agent") if not agent: - return None # type: ignore + return None # type: ignore return AgentId( { "type": agent.type, @@ -57,7 +57,7 @@ def get_agent_id_object(self) -> AgentId: def get_conversation_object(self) -> ResponseConversation1: if not self._conversation_id: - return None # type: ignore + return None # type: ignore return ResponseConversation1(id=self._conversation_id) @@ -72,5 +72,5 @@ def _deserialize_create_response(payload: dict) -> CreateResponse: def _deserialize_agent_reference(payload: dict) -> AgentReference: if not payload: - return None # type: ignore + return None # type: ignore return AgentReference(**payload) diff --git a/sdk/agentserver/azure-ai-agentserver-core/samples/bilingual_weekend_planner/main.py b/sdk/agentserver/azure-ai-agentserver-core/samples/bilingual_weekend_planner/main.py index 099d8dc45181..5966da63947b 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/samples/bilingual_weekend_planner/main.py +++ b/sdk/agentserver/azure-ai-agentserver-core/samples/bilingual_weekend_planner/main.py @@ -100,9 +100,7 @@ def _set_capture_env(provider: str, base_url: str) -> None: "OTEL_GENAI_AGENT_DESCRIPTION", "Assistant that plans weekend activities using weather and events data in multiple languages", ), - "OTEL_GENAI_AGENT_ID": os.getenv( - "OTEL_GENAI_AGENT_ID", "bilingual-weekend-planner" - ), + "OTEL_GENAI_AGENT_ID": os.getenv("OTEL_GENAI_AGENT_ID", "bilingual-weekend-planner"), } for env_key, value in capture_defaults.items(): os.environ.setdefault(env_key, value) @@ -148,9 +146,7 @@ def _build_client() -> openai.AsyncOpenAI: if "AZURE_OPENAI_VERSION" not in os.environ: raise ValueError("AZURE_OPENAI_VERSION is required when API_HOST=azure") if "AZURE_OPENAI_CHAT_DEPLOYMENT" not in os.environ: - raise ValueError( - "AZURE_OPENAI_CHAT_DEPLOYMENT is required when API_HOST=azure" - ) + raise ValueError("AZURE_OPENAI_CHAT_DEPLOYMENT is required when API_HOST=azure") endpoint = os.environ["AZURE_OPENAI_ENDPOINT"].rstrip("/") api_version = os.environ["AZURE_OPENAI_VERSION"] deployment = os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT"] @@ -175,9 +171,7 @@ def _build_client() -> openai.AsyncAzureOpenAI: provider="azure.ai.openai", ) - raise ValueError( - f"Unsupported API_HOST '{host}'. Supported values are 'github' or 'azure'." - ) + raise ValueError(f"Unsupported API_HOST '{host}'. Supported values are 'github' or 'azure'.") def _configure_otel() -> None: @@ -202,9 +196,7 @@ def _configure_otel() -> None: tracer_provider = TracerProvider(resource=resource) if grpc_endpoint: - tracer_provider.add_span_processor( - BatchSpanProcessor(OTLPSpanExporter(endpoint=grpc_endpoint)) - ) + tracer_provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(endpoint=grpc_endpoint))) print(f"[otel] OTLP gRPC exporter configured ({grpc_endpoint})") elif conn: if AzureMonitorTraceExporter is None: @@ -212,14 +204,10 @@ def _configure_otel() -> None: "Warning: Azure Monitor exporter not installed. " "Install with: pip install azure-monitor-opentelemetry-exporter", ) - tracer_provider.add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) - ) + tracer_provider.add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) else: tracer_provider.add_span_processor( - BatchSpanProcessor( - AzureMonitorTraceExporter.from_connection_string(conn) - ) + BatchSpanProcessor(AzureMonitorTraceExporter.from_connection_string(conn)) ) print("[otel] Azure Monitor trace exporter configured") else: @@ -514,9 +502,7 @@ async def agent_run(self, context: AgentRunContext): try: result = await Runner.run(TRIAGE_AGENT, input=user_text) final_text = str(result.final_output or "") - span.set_attribute( - "agent.response", final_text[:500] if final_text else "" - ) + span.set_attribute("agent.response", final_text[:500] if final_text else "") final_agent = getattr(result, "last_agent", None) if final_agent and getattr(final_agent, "name", None): span.set_attribute("agent.final", final_agent.name) diff --git a/sdk/agentserver/azure-ai-agentserver-core/samples/mcp_simple/mcp_simple.py b/sdk/agentserver/azure-ai-agentserver-core/samples/mcp_simple/mcp_simple.py index af9812826941..df7f64ae0cda 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/samples/mcp_simple/mcp_simple.py +++ b/sdk/agentserver/azure-ai-agentserver-core/samples/mcp_simple/mcp_simple.py @@ -73,12 +73,7 @@ async def _list_tools(self) -> List[MCPListToolsTool]: if isinstance(t, dict): name = t.get("name", "unknown_tool") description = t.get("description") - schema = ( - t.get("input_schema") - or t.get("schema") - or t.get("parameters") - or {} - ) + schema = t.get("input_schema") or t.get("schema") or t.get("parameters") or {} else: # Fallback to attribute access name = getattr(t, "name", "unknown_tool") description = getattr(t, "description", None) @@ -146,20 +141,14 @@ async def stream() -> AsyncGenerator: # noqa: D401 ) yield ResponseOutputItemAddedEvent(output_index=1, item=assistant_item) - summary_text = "Discovered MCP tools: " + ", ".join( - t.name for t in tools - ) + summary_text = "Discovered MCP tools: " + ", ".join(t.name for t in tools) assembled = "" parts = summary_text.split(" ") for i, token in enumerate(parts): piece = token if i == len(parts) - 1 else token + " " # keep spaces assembled += piece - yield ResponseTextDeltaEvent( - output_index=1, content_index=0, delta=piece - ) - yield ResponseTextDoneEvent( - output_index=1, content_index=0, text=assembled - ) + yield ResponseTextDeltaEvent(output_index=1, content_index=0, delta=piece) + yield ResponseTextDoneEvent(output_index=1, content_index=0, text=assembled) final_response = OpenAIResponse( metadata={}, @@ -173,9 +162,7 @@ async def stream() -> AsyncGenerator: # noqa: D401 ResponsesAssistantMessageItemResource( id=assistant_item.id, status="completed", - content=[ - ItemContentOutputText(text=assembled, annotations=[]) - ], + content=[ItemContentOutputText(text=assembled, annotations=[])], ), ], ) @@ -207,9 +194,7 @@ async def stream() -> AsyncGenerator: # noqa: D401 "name": t.name, "description": t.description, # Provide only top-level schema keys if dict. - "input_schema_keys": list(safe_schema.keys()) - if isinstance(safe_schema, dict) - else safe_schema, + "input_schema_keys": list(safe_schema.keys()) if isinstance(safe_schema, dict) else safe_schema, } ) summary = { diff --git a/sdk/agentserver/azure-ai-agentserver-core/samples/simple_mock_agent/custom_mock_agent_test.py b/sdk/agentserver/azure-ai-agentserver-core/samples/simple_mock_agent/custom_mock_agent_test.py index 3d4187a188f2..6a4581c8023c 100644 --- a/sdk/agentserver/azure-ai-agentserver-core/samples/simple_mock_agent/custom_mock_agent_test.py +++ b/sdk/agentserver/azure-ai-agentserver-core/samples/simple_mock_agent/custom_mock_agent_test.py @@ -67,9 +67,7 @@ async def agent_run(context: AgentRunContext): print(f"agent:{agent}") if context.stream: - return stream_events( - "I am mock agent with no intelligence in stream mode.", context - ) + return stream_events("I am mock agent with no intelligence in stream mode.", context) # Build assistant output content output_content = [ diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_content_part_event_generator.py b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_content_part_event_generator.py index fe141887a2b2..4823de4411ae 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_content_part_event_generator.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_content_part_event_generator.py @@ -63,7 +63,7 @@ def try_process_message( return is_processed, next_processor, events - def on_start( # mypy: ignore[override] + def on_start( # mypy: ignore[override] self, event, run_details, stream_state: StreamEventState ) -> tuple[bool, List[project_models.ResponseStreamEvent]]: if self.started: @@ -81,8 +81,9 @@ def on_start( # mypy: ignore[override] return True, [start_event] - def on_end(self, message, context, stream_state: StreamEventState - ) -> List[project_models.ResponseStreamEvent]: # mypy: ignore[override] + def on_end( + self, message, context, stream_state: StreamEventState + ) -> List[project_models.ResponseStreamEvent]: # mypy: ignore[override] aggregated_content = self.item_content_helper.create_item_content() done_event = project_models.ResponseContentPartDoneEvent( item_id=self.item_id, diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_event_generator.py b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_event_generator.py index ee19ca74f4bb..5dd7808fb061 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_event_generator.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_event_generator.py @@ -33,11 +33,8 @@ def __init__(self, logger, parent): self.parent = parent # parent generator def try_process_message( - self, - message: AnyMessage, # mypy: ignore[valid-type] - context: AgentRunContext, - stream_state: StreamEventState - ): # mypy: ignore[empty-body] + self, message: AnyMessage, context: AgentRunContext, stream_state: StreamEventState # mypy: ignore[valid-type] + ): # mypy: ignore[empty-body] """ Try to process the incoming message. @@ -63,8 +60,8 @@ def on_start(self) -> tuple[bool, List[project_models.ResponseStreamEvent]]: return False, [] def on_end( - self, message: AnyMessage, context: AgentRunContext, stream_state: StreamEventState - ) -> tuple[bool, List[project_models.ResponseStreamEvent]]: + self, message: AnyMessage, context: AgentRunContext, stream_state: StreamEventState + ) -> tuple[bool, List[project_models.ResponseStreamEvent]]: """ Generate the ending events for this layer. TODO: handle different end conditions, e.g. normal end, error end, etc. diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_item_event_generator.py b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_item_event_generator.py index a2606d1541c1..8d66101cf324 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_item_event_generator.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_item_event_generator.py @@ -112,7 +112,9 @@ def aggregate_content(self, content): # aggregate content from child processor self.item_resource_helper.add_aggregate_content(content) - def try_create_item_resource_helper(self, event: AnyMessage, id_generator: IdGenerator): # pylint: disable=too-many-return-statements + def try_create_item_resource_helper( + self, event: AnyMessage, id_generator: IdGenerator + ): # pylint: disable=too-many-return-statements if isinstance(event, langgraph_messages.AIMessageChunk) and event.tool_call_chunks: self.item_resource_helper = item_resource_helpers.FunctionCallItemResourceHelper( item_id=id_generator.generate_function_call_id(), tool_call=event.tool_call_chunks[0] diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_text_event_generator.py b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_text_event_generator.py index b6be81ec7cb2..c65eda157bbd 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_text_event_generator.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/azure/ai/agentserver/langgraph/models/response_event_generators/response_output_text_event_generator.py @@ -74,7 +74,7 @@ def process( self.aggregated_content += item stream_state.sequence_number += 1 res.append(chunk_event) - return True, self, res # mypy: ignore[return-value] + return True, self, res # mypy: ignore[return-value] return False, self, [] def has_finish_reason(self, message) -> bool: @@ -92,7 +92,7 @@ def should_end(self, message) -> bool: return True return False - def on_end( # mypy: ignore[override] + def on_end( # mypy: ignore[override] self, message, context: AgentRunContext, stream_state: StreamEventState ) -> tuple[bool, List[project_models.ResponseStreamEvent]]: if not self.started: diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agent_calculator/langgraph_agent_calculator.py b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agent_calculator/langgraph_agent_calculator.py index ffa8d14b208f..3b87b669937b 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agent_calculator/langgraph_agent_calculator.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agent_calculator/langgraph_agent_calculator.py @@ -24,9 +24,7 @@ llm = init_chat_model(f"azure_openai:{deployment_name}") else: credential = DefaultAzureCredential() - token_provider = get_bearer_token_provider( - credential, "https://cognitiveservices.azure.com/.default" - ) + token_provider = get_bearer_token_provider(credential, "https://cognitiveservices.azure.com/.default") llm = init_chat_model( f"azure_openai:{deployment_name}", azure_ad_token_provider=token_provider, diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/edges/grade_documents.py b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/edges/grade_documents.py index 1a37eb96103c..34aa14a7447a 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/edges/grade_documents.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/edges/grade_documents.py @@ -19,9 +19,7 @@ class GradeDocuments(BaseModel): """Grade documents using a binary score for relevance check.""" - binary_score: str = Field( - description="Relevance score: 'yes' if relevant, or 'no' if not relevant" - ) + binary_score: str = Field(description="Relevance score: 'yes' if relevant, or 'no' if not relevant") load_dotenv() @@ -40,9 +38,7 @@ def grade_documents( response = ( grader_model # highlight-next-line - .with_structured_output(GradeDocuments).invoke( - [{"role": "user", "content": prompt}] - ) + .with_structured_output(GradeDocuments).invoke([{"role": "user", "content": prompt}]) ) score = response.binary_score diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/tools/retriever_tool.py b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/tools/retriever_tool.py index be586c088ac8..8e60238f5347 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/tools/retriever_tool.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/agentic_rag/tools/retriever_tool.py @@ -8,9 +8,7 @@ from langchain_text_splitters import RecursiveCharacterTextSplitter load_dotenv() -deployment_name = os.getenv( - "AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME", "text-embedding-3-small" -) +deployment_name = os.getenv("AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME", "text-embedding-3-small") model_name = os.getenv("AZURE_OPENAI_EMBEDDINGS_MODEL_NAME", deployment_name) aoai_embeddings = AzureOpenAIEmbeddings( model=model_name, @@ -26,13 +24,9 @@ docs = [WebBaseLoader(url).load() for url in urls] docs_list = [item for sublist in docs for item in sublist] -text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder( - chunk_size=100, chunk_overlap=50 -) +text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(chunk_size=100, chunk_overlap=50) doc_splits = text_splitter.split_documents(docs_list) -vectorstore = InMemoryVectorStore.from_documents( - documents=doc_splits, embedding=aoai_embeddings -) +vectorstore = InMemoryVectorStore.from_documents(documents=doc_splits, embedding=aoai_embeddings) retriever = vectorstore.as_retriever() retriever_tool = create_retriever_tool( diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/custom_state/main.py b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/custom_state/main.py index 27f5bf0d5ee2..713862b51b35 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/custom_state/main.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/custom_state/main.py @@ -137,9 +137,7 @@ def request_to_state(self, context: AgentRunContext) -> Dict[str, Any]: # noqa: print("initial state:", res) return res - def state_to_response( - self, state: Dict[str, Any], context: AgentRunContext - ) -> Response: # noqa: D401 + def state_to_response(self, state: Dict[str, Any], context: AgentRunContext) -> Response: # noqa: D401 final_answer = state.get("final_answer") or "(no answer generated)" print(f"convert state to response, state: {state}") citations = state.get("retrieved", []) diff --git a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/mcp_apikey/mcp_apikey.py b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/mcp_apikey/mcp_apikey.py index 12f5c50aadae..07f2fd97c679 100644 --- a/sdk/agentserver/azure-ai-agentserver-langgraph/samples/mcp_apikey/mcp_apikey.py +++ b/sdk/agentserver/azure-ai-agentserver-langgraph/samples/mcp_apikey/mcp_apikey.py @@ -17,9 +17,7 @@ def _get_required_env(name: str) -> str: value = os.getenv(name) if not value: - raise RuntimeError( - f"Missing required environment variable '{name}'. Please define it in your .env file." - ) + raise RuntimeError(f"Missing required environment variable '{name}'. Please define it in your .env file.") return value diff --git a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/_patch.py b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/_patch.py +++ b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/_patch.py b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/_patch.py +++ b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/operations/_patch.py b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/operations/_patch.py +++ b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/models/_patch.py b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/models/_patch.py +++ b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/operations/_patch.py b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/operations/_patch.py +++ b/sdk/agricultureplatform/azure-mgmt-agricultureplatform/azure/mgmt/agricultureplatform/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-agrifood-farming/azure/__init__.py b/sdk/agrifood/azure-agrifood-farming/azure/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/agrifood/azure-agrifood-farming/azure/__init__.py +++ b/sdk/agrifood/azure-agrifood-farming/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/__init__.py b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/__init__.py +++ b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/_patch.py b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/_patch.py +++ b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/_patch.py b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/_patch.py +++ b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/operations/_patch.py b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/operations/_patch.py index a42cdd742963..6671995da037 100644 --- a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/operations/_patch.py +++ b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import os from typing import List, Any diff --git a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/operations/_patch.py b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/operations/_patch.py index 84d6460d8997..a13aa10cbc94 100644 --- a/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/operations/_patch.py +++ b/sdk/agrifood/azure-agrifood-farming/azure/agrifood/farming/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import os from typing import List, Any diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_attachments_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_attachments_async.py index 7510b70b4a0a..188a11986502 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_attachments_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_attachments_async.py @@ -5,9 +5,9 @@ FILE: sample_attachments_async.py DESCRIPTION: - This sample demonstrates FarmBeats' capability of storing arbitrary files - in context to the various farm hierarchy objects. - We first attach some files onto a party and a farm, and then download all + This sample demonstrates FarmBeats' capability of storing arbitrary files + in context to the various farm hierarchy objects. + We first attach some files onto a party and a farm, and then download all existing attachments for the party onto a local directory. USAGE: @@ -33,14 +33,11 @@ async def sample_attachments_async(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" farm_id = "contoso-farm" @@ -50,11 +47,8 @@ async def sample_attachments_async(): attachment_on_party_file_path = file_path attachment_on_farm_file_path = file_path - if not (os.path.isfile(attachment_on_party_file_path) and - os.path.isfile(attachment_on_farm_file_path)): - raise SystemExit( - "Please provide the paths to the files you want to upload." - ) + if not (os.path.isfile(attachment_on_party_file_path) and os.path.isfile(attachment_on_farm_file_path)): + raise SystemExit("Please provide the paths to the files you want to upload.") # Ensure party exists, create if necessary. print(f"Create/updating party with id {party_id}...", end=" ", flush=True) @@ -64,12 +58,8 @@ async def sample_attachments_async(): "name": "Contoso Party", "description": "Contoso Party.", "status": "Contoso Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, + }, ) print("Done!") @@ -78,54 +68,43 @@ async def sample_attachments_async(): await client.farms.create_or_update( party_id=party_id, farm_id=farm_id, - farm={ - "name": "Contoso Farm", - "description": "Contoso Farm.", - "status": "Contoso Status" - } + farm={"name": "Contoso Farm", "description": "Contoso Farm.", "status": "Contoso Status"}, ) print("Done!") # Create attachment on party try: - print(f"Checking if attachment with id {attachment_on_party_id} already exists " - f"on party with id {party_id}...", end=" ", flush=True) - await client.attachments.get( - party_id=party_id, - attachment_id=attachment_on_party_id + print( + f"Checking if attachment with id {attachment_on_party_id} already exists " + f"on party with id {party_id}...", + end=" ", + flush=True, ) + await client.attachments.get(party_id=party_id, attachment_id=attachment_on_party_id) print("Attachment already exists. Not updating file.") except ResourceNotFoundError: print("Attachment doesn't exist") print("Creating attachment...", end=" ", flush=True) - file_to_attach_on_party = open( - attachment_on_party_file_path, - "rb") + file_to_attach_on_party = open(attachment_on_party_file_path, "rb") - attachment = { - "resourceId": party_id, - "resourceType": "Party", - "name": "a" - } + attachment = {"resourceId": party_id, "resourceType": "Party", "name": "a"} await client.attachments.create_or_update( - party_id=party_id, - attachment_id=attachment_on_party_id, - attachment=attachment, - file=file_to_attach_on_party) + party_id=party_id, attachment_id=attachment_on_party_id, attachment=attachment, file=file_to_attach_on_party + ) print("Done!") - + # Create attachment with farm try: - print(f"Checking if attachment with id {attachment_on_farm_id} already exists " + - f"on farm with id {farm_id}...", end=" ", flush=True) - await client.attachments.get( - party_id=party_id, - attachment_id=attachment_on_farm_id + print( + f"Checking if attachment with id {attachment_on_farm_id} already exists " + f"on farm with id {farm_id}...", + end=" ", + flush=True, ) + await client.attachments.get(party_id=party_id, attachment_id=attachment_on_farm_id) print("Attachment already exists. Not updating file.") except ResourceNotFoundError: @@ -134,46 +113,33 @@ async def sample_attachments_async(): file_to_attach_on_farm = open(attachment_on_farm_file_path, "rb") - attachment = { - "resourceId": farm_id, - "resourceType": "Farm", - "name": "a" - } + attachment = {"resourceId": farm_id, "resourceType": "Farm", "name": "a"} await client.attachments.create_or_update( - party_id=party_id, - attachment_id=attachment_on_farm_id, - attachment=attachment, - file=file_to_attach_on_farm) + party_id=party_id, attachment_id=attachment_on_farm_id, attachment=attachment, file=file_to_attach_on_farm + ) print("Done!") - print("Getting a list of all attachments " + - f"on the party with id {party_id}...", end=" ", flush=True) + print("Getting a list of all attachments " + f"on the party with id {party_id}...", end=" ", flush=True) party_attachments = client.attachments.list_by_party_id( party_id=party_id, ) print("Done!") async for attachment in party_attachments: - downloaded_attachment = await client.attachments.download( - party_id=party_id, - attachment_id=attachment['id'] - ) + downloaded_attachment = await client.attachments.download(party_id=party_id, attachment_id=attachment["id"]) out_path = Path( - "./data/attachments/" + - f"{attachment['resourceType']}/{attachment['resourceId']}" + - f"/{attachment['id']}/{attachment['originalFileName']}" + "./data/attachments/" + + f"{attachment['resourceType']}/{attachment['resourceId']}" + + f"/{attachment['id']}/{attachment['originalFileName']}" ) # Make sure the directory exists to the output path exists Path(out_path).parent.mkdir(parents=True, exist_ok=True) print(f"Saving attachment id {attachment['id']} to {out_path.resolve()}") - with open( - out_path, - 'wb' - ) as out_file: + with open(out_path, "wb") as out_file: async for bits in downloaded_attachment: out_file.write(bits) diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py index f05f4bffa9b4..82f17a4b206e 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_cascade_delete_async.py @@ -5,7 +5,7 @@ FILE: sample_cascade_delete_async.py DESCRIPTION: - This sample demonstrates + This sample demonstrates - Getting a filtered list of parties based on last modified timestamp - Queuing a cascade delete job on a party, and polling for it to complete @@ -31,23 +31,18 @@ async def sample_cascade_delete_async(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) job_id_prefix = "cascade-delete-job" # Getting list of parties modified in the last 7 days print("Getting list of recently modified party id's... ", end="", flush=True) - parties = client.parties.list( - min_last_modified_date_time=datetime.now(tz=UTC) - timedelta(days=7) - ) - party_ids = [party['id'] async for party in parties] + parties = client.parties.list(min_last_modified_date_time=datetime.now(tz=UTC) - timedelta(days=7)) + party_ids = [party["id"] async for party in parties] print("Done") # Ask for the id of the party which is to be deleted. @@ -62,8 +57,7 @@ async def sample_cascade_delete_async(): job_id = f"{job_id_prefix}-{randint(0, 1000)}" print(f"Queuing cascade delete job {job_id}... ", end="", flush=True) cascade_delete_job_poller = await client.parties.begin_create_cascade_delete_job( - job_id=job_id, - party_id = party_id_to_delete + job_id=job_id, party_id=party_id_to_delete ) print("Queued. Waiting for completion... ", end="", flush=True) await cascade_delete_job_poller.result() diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_create_farmer_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_create_farmer_async.py index 535143167f72..44d97b038902 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_create_farmer_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_create_farmer_async.py @@ -8,33 +8,27 @@ async def create_party(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" # Create or update a party within FarmBeats. party = await client.parties.create_or_update( party_id=party_id, - party={ - "name": "contoso party", - "status": "created from SDK", - "description": "created from SDK" - } + party={"name": "contoso party", "status": "created from SDK", "description": "created from SDK"}, ) print(party) await client.close() await credential.close() + if __name__ == "__main__": load_dotenv() loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) - asyncio.run(create_party()) \ No newline at end of file + asyncio.run(create_party()) diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_async.py index 2b7d124433d2..a3b11db5eff9 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_async.py @@ -32,14 +32,11 @@ async def sample_farm_hierarchy_async(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" party_name = "contoso-party-name" @@ -74,7 +71,7 @@ async def sample_farm_hierarchy_async(): [-94.05746988, 44.75751702], [-94.05795157, 44.75824385], [-94.05805349, 44.75863619], - [-94.05807495, 44.75916947] + [-94.05807495, 44.75916947], ] ], [ @@ -86,22 +83,16 @@ async def sample_farm_hierarchy_async(): [-94.05727246, 44.75988264], [-94.05752903, 44.75946416], [-94.05760288, 44.75923042], - [-94.05802667, 44.75929136] + [-94.05802667, 44.75929136], ] - ] - ] + ], + ], } # Step 1: Create a party. - print( - f"Creating or updating party with Id {party_id}...", end=" ", flush=True) + print(f"Creating or updating party with Id {party_id}...", end=" ", flush=True) party = await client.parties.create_or_update( - party_id=party_id, - party={ - "name": party_name, - "status": "created from SDK", - "description": party_description - } + party_id=party_id, party={"name": party_name, "status": "created from SDK", "description": party_description} ) print("Done") @@ -111,15 +102,9 @@ async def sample_farm_hierarchy_async(): print("\tDescription:", party["description"]) # Step 2: Create a farm. - print( - f"Creating or updating farm with Id {farm_id}...", end=" ", flush=True) + print(f"Creating or updating farm with Id {farm_id}...", end=" ", flush=True) farm = await client.farms.create_or_update( - party_id=party_id, - farm_id= farm_id, - farm={ - "name": farm_name, - "description": farm_description - } + party_id=party_id, farm_id=farm_id, farm={"name": farm_name, "description": farm_description} ) print("Done") print(farm) @@ -130,16 +115,11 @@ async def sample_farm_hierarchy_async(): print("\tDescription:", farm["description"]) # Step 3: Create a field. - print( - f"Creating or updating field with Id {field_id}...", end=" ", flush=True) + print(f"Creating or updating field with Id {field_id}...", end=" ", flush=True) field = await client.fields.create_or_update( party_id=party_id, - field_id= field_id, - field={ - "farmId": farm_id, - "name": field_name, - "description": field_description - } + field_id=field_id, + field={"farmId": farm_id, "name": field_name, "description": field_description}, ) print("Done") @@ -153,24 +133,15 @@ async def sample_farm_hierarchy_async(): # Step 4: Create a boundary. try: - print( - f"Trying to fetch boundary with id {boundary_id}...", end=" ", flush=True) - boundary = await client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + print(f"Trying to fetch boundary with id {boundary_id}...", end=" ", flush=True) + boundary = await client.boundaries.get(party_id=party_id, boundary_id=boundary_id) print("Boundary already exists.") except ResourceNotFoundError: - print( - f"Doesn't exist. Creating boundary...", end=" ", flush=True) + print(f"Doesn't exist. Creating boundary...", end=" ", flush=True) boundary = await client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, - boundary={ - "name": boundary_name, - "geometry": multi_polygon, - "description": boundary_description - } + boundary={"name": boundary_name, "geometry": multi_polygon, "description": boundary_description}, ) print("Done") diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_complete_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_complete_async.py index 58e756d3869c..bdf07e2e4c0b 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_complete_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_farm_hierarchy_complete_async.py @@ -34,14 +34,11 @@ async def sample_farm_hierarchy_complete_async(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" party_name = "contoso-party-name" @@ -91,7 +88,7 @@ async def sample_farm_hierarchy_complete_async(): [-94.05746988, 44.75751702], [-94.05795157, 44.75824385], [-94.05805349, 44.75863619], - [-94.05807495, 44.75916947] + [-94.05807495, 44.75916947], ] ], [ @@ -103,21 +100,16 @@ async def sample_farm_hierarchy_complete_async(): [-94.05727246, 44.75988264], [-94.05752903, 44.75946416], [-94.05760288, 44.75923042], - [-94.05802667, 44.75929136] + [-94.05802667, 44.75929136], ] - ] - ] + ], + ], } # Step 1: Create a party. - print( - f"Creating or updating party with Id {party_id}...", end=" ", flush=True) + print(f"Creating or updating party with Id {party_id}...", end=" ", flush=True) party = await client.parties.create_or_update( - party_id=party_id, - party={ - "name": party_name, - "description": party_description - } + party_id=party_id, party={"name": party_name, "description": party_description} ) print("Done") @@ -127,15 +119,9 @@ async def sample_farm_hierarchy_complete_async(): print("\tDescription:", party["description"]) # Step 2: Create a farm. - print( - f"Creating or updating farm with Id {farm_id}...", end=" ", flush=True) + print(f"Creating or updating farm with Id {farm_id}...", end=" ", flush=True) farm = await client.farms.create_or_update( - party_id=party_id, - farm_id=farm_id, - farm={ - "name": farm_name, - "description": farm_description - } + party_id=party_id, farm_id=farm_id, farm={"name": farm_name, "description": farm_description} ) print("Done") @@ -146,16 +132,11 @@ async def sample_farm_hierarchy_complete_async(): print("\tDescription:", farm["description"]) # Step 3: Create a field. - print( - f"Creating or updating field with Id {field_id}...", end=" ", flush=True) + print(f"Creating or updating field with Id {field_id}...", end=" ", flush=True) field = await client.fields.create_or_update( party_id=party_id, field_id=field_id, - field={ - "name": field_name, - "farmId": farm_id, - "description": field_description - } + field={"name": field_name, "farmId": farm_id, "description": field_description}, ) print("Done") @@ -168,14 +149,9 @@ async def sample_farm_hierarchy_complete_async(): print("\tDescription:", field["description"]) # Step 4: Create a crop. - print( - f"Creating or updating crop with Id {crop_id}...", end=" ", flush=True) + print(f"Creating or updating crop with Id {crop_id}...", end=" ", flush=True) crop = await client.crops.create_or_update( - crop_id=crop_id, - crop={ - "name": crop_name, - "description": crop_description - } + crop_id=crop_id, crop={"name": crop_name, "description": crop_description} ) print("Done") @@ -185,14 +161,10 @@ async def sample_farm_hierarchy_complete_async(): print("\tDescription:", crop["description"]) # Step 5: Create a crop product. - print( - f"Creating or updating crop product with Id {crop_product_id}...", end=" ", flush=True) + print(f"Creating or updating crop product with Id {crop_product_id}...", end=" ", flush=True) crop_product = await client.crop_products.create_or_update( crop_product_id=crop_product_id, - crop_product={ - "name": crop_product_name, - "description": crop_product_description - } + crop_product={"name": crop_product_name, "description": crop_product_description}, ) print("Done") @@ -202,8 +174,7 @@ async def sample_farm_hierarchy_complete_async(): print("\tDescription:", crop_product["description"]) # Step 6: Create a season. - print( - f"Creating or updating season with Id {season_id}...", end=" ", flush=True) + print(f"Creating or updating season with Id {season_id}...", end=" ", flush=True) season = await client.seasons.create_or_update( season_id=season_id, season={ @@ -211,8 +182,8 @@ async def sample_farm_hierarchy_complete_async(): "year": year, "startDateTime": start_date_time, "endDateTime": end_date_time, - "description": season_description - } + "description": season_description, + }, ) print("Done") @@ -225,8 +196,7 @@ async def sample_farm_hierarchy_complete_async(): print("\tEnd Date Time:", season["endDateTime"]) # Step 7: Create a seasonal field. - print( - f"Creating or updating seasonal field with Id {seasonal_field_id}...", end=" ", flush=True) + print(f"Creating or updating seasonal field with Id {seasonal_field_id}...", end=" ", flush=True) seasonal_field = await client.seasonal_fields.create_or_update( party_id=party_id, seasonal_field_id=seasonal_field_id, @@ -237,8 +207,8 @@ async def sample_farm_hierarchy_complete_async(): "seasonId": season_id, "cropId": crop_id, "cropProductIds": [crop_product_id], - "description": seasonal_field_description - } + "description": seasonal_field_description, + }, ) print("Done") @@ -256,16 +226,11 @@ async def sample_farm_hierarchy_complete_async(): # Step 8: Create a boundary. try: - print( - f"Trying to fetch boundary with id {boundary_id}...", end=" ", flush=True) - boundary = await client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + print(f"Trying to fetch boundary with id {boundary_id}...", end=" ", flush=True) + boundary = await client.boundaries.get(party_id=party_id, boundary_id=boundary_id) print("Boundary already exists.") except ResourceNotFoundError: - print( - f"Doesn't exist. Creating boundary...", end=" ", flush=True) + print(f"Doesn't exist. Creating boundary...", end=" ", flush=True) boundary = await client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, @@ -274,8 +239,8 @@ async def sample_farm_hierarchy_complete_async(): "geometry": multi_polygon, "parentId": seasonal_field_id, "parentType": "SeasonalField", - "description": boundary_description - } + "description": boundary_description, + }, ) print("Done") diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_hello_world_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_hello_world_async.py index 4f6d2aa84d13..003165c4e201 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_hello_world_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_hello_world_async.py @@ -5,9 +5,9 @@ FILE: sample_hello_world_async.py DESCRIPTION: - This sample demonstrates the most basic operation that can be - performed - creation of a Party. Use this to understand how to - create the client object, how to authenticate it, and make sure + This sample demonstrates the most basic operation that can be + performed - creation of a Party. Use this to understand how to + create the client object, how to authenticate it, and make sure your client is set up correctly to call into your FarmBeats endpoint. USAGE: @@ -30,14 +30,11 @@ async def sample_hello_world_async(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" party_name = "Contoso" @@ -50,15 +47,11 @@ async def sample_hello_world_async(): "name": party_name, "description": party_description, "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, + }, ) print("Done") - + print("Here are the details of the party:") print("\tID:", party["id"]) print("\tName:", party["name"]) @@ -73,7 +66,7 @@ async def sample_hello_world_async(): if __name__ == "__main__": load_dotenv() - + loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) asyncio.run(sample_hello_world_async()) diff --git a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_satellite_download_async.py b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_satellite_download_async.py index c034eda2de6a..deba072a83e7 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/async/sample_satellite_download_async.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/async/sample_satellite_download_async.py @@ -33,9 +33,11 @@ from dotenv import load_dotenv import random + # Helper to retrive local file path from FarmBeats data store path. def parse_file_path_from_file_link(file_link): - return parse_qs(urlparse(file_link).query)['filePath'][0] + return parse_qs(urlparse(file_link).query)["filePath"][0] + # Helper to download a given scene file path and store it to # the specified out path. @@ -44,24 +46,21 @@ async def download_image(client, file_link, root_dir): out_path = Path(os.path.join(root_dir, file_path)) out_path.parent.mkdir(parents=True, exist_ok=True) - print( - f"Async downloading image to {out_path.resolve()}... ", end="", flush=True) - with open(out_path, 'wb') as tif_file: + print(f"Async downloading image to {out_path.resolve()}... ", end="", flush=True) + with open(out_path, "wb") as tif_file: file_stream = await client.scenes.download(file_path=file_path) async for bits in file_stream: tif_file.write(bits) print("Done") return str(out_path.resolve()) - + + async def sample_satellite_download_async(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" boundary_id = "contoso-boundary" @@ -71,24 +70,16 @@ async def sample_satellite_download_async(): data_root_dir = "./data" # Create or update a party within FarmBeats. - print( - f"Ensure party with id {party_id} exists... ", end="", flush=True) - party = await client.parties.create_or_update( - party_id=party_id, - party={} - ) + print(f"Ensure party with id {party_id} exists... ", end="", flush=True) + party = await client.parties.create_or_update(party_id=party_id, party={}) print("Done") # Create a boundary if the boundary does not exist. try: - print( - f"Checking if boundary with id {boundary_id} exists... ", end="", flush=True) - boundary = await client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + print(f"Checking if boundary with id {boundary_id} exists... ", end="", flush=True) + boundary = await client.boundaries.get(party_id=party_id, boundary_id=boundary_id) print("Exists") - + except ResourceNotFoundError as e: print("Boundary doesn't exist. Creating... ", end="", flush=True) # Creating a boundary. @@ -96,26 +87,24 @@ async def sample_satellite_download_async(): party_id=party_id, boundary_id=boundary_id, boundary={ - "geometry": - { + "geometry": { "type": "Polygon", - "coordinates": + "coordinates": [ [ - [ - [73.70457172393799, 20.545385304358106], - [73.70457172393799, 20.545385304358106], - [73.70448589324951, 20.542411534243367], - [73.70877742767334, 20.541688176010233], - [73.71023654937744, 20.545083911372505], - [73.70663166046143, 20.546992723579137], - [73.70457172393799, 20.545385304358106], - ] + [73.70457172393799, 20.545385304358106], + [73.70457172393799, 20.545385304358106], + [73.70448589324951, 20.542411534243367], + [73.70877742767334, 20.541688176010233], + [73.71023654937744, 20.545083911372505], + [73.70663166046143, 20.546992723579137], + [73.70457172393799, 20.545385304358106], ] + ], }, "status": "", "name": "", - "description": "" - } + "description": "", + }, ) print("Created") @@ -131,18 +120,10 @@ async def sample_satellite_download_async(): "startDateTime": start_date_time, "provider": "Microsoft", "source": "Sentinel_2_L2A", - "data": { - "imageNames": [ - "NDVI" - ], - "imageFormats": [ - "TIF" - ], - "imageResolution": [10] - }, + "data": {"imageNames": ["NDVI"], "imageFormats": ["TIF"], "imageResolution": [10]}, "name": "", - "description": "" - } + "description": "", + }, ) print("Queued. Waiting for completion... ", end="", flush=True) await satellite_job_poller.result() @@ -156,9 +137,9 @@ async def sample_satellite_download_async(): start_date_time=start_date_time, end_date_time=end_date_time, provider="Microsoft", - source="Sentinel_2_L2A" + source="Sentinel_2_L2A", ) - print("Done") + print("Done") async for scene in scenes: for image_file in scene["imageFiles"]: diff --git a/sdk/agrifood/azure-agrifood-farming/samples/sample_attachments.py b/sdk/agrifood/azure-agrifood-farming/samples/sample_attachments.py index c50332819ac4..b8c8d93e0ef2 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/sample_attachments.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/sample_attachments.py @@ -5,9 +5,9 @@ FILE: sample_attachments.py DESCRIPTION: - This sample demonstrates FarmBeats' capability of storing arbitrary files - in context to the various farm hierarchy objects. - We first attach some files onto a party and a farm, and then download all + This sample demonstrates FarmBeats' capability of storing arbitrary files + in context to the various farm hierarchy objects. + We first attach some files onto a party and a farm, and then download all existing attachments for the party onto a local directory. USAGE: @@ -20,7 +20,6 @@ - `FARMBEATS_ENDPOINT`: The FarmBeats endpoint that you want to run these samples on. """ - from azure.core.exceptions import ResourceNotFoundError from azure.identity import DefaultAzureCredential from azure.agrifood.farming import FarmBeatsClient @@ -32,14 +31,11 @@ def sample_attachments(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" farm_id = "contoso-farm" @@ -49,11 +45,8 @@ def sample_attachments(): attachment_on_party_file_path = file_path attachment_on_farm_file_path = file_path - if not (os.path.isfile(attachment_on_party_file_path) and - os.path.isfile(attachment_on_farm_file_path)): - raise SystemExit( - "Please provide the paths to the files you want to upload." - ) + if not (os.path.isfile(attachment_on_party_file_path) and os.path.isfile(attachment_on_farm_file_path)): + raise SystemExit("Please provide the paths to the files you want to upload.") # Ensure party exists, create if necessary. print(f"Create/updating party with id {party_id}...", end=" ", flush=True) @@ -63,12 +56,8 @@ def sample_attachments(): "name": "Contoso Party", "description": "Contoso Party.", "status": "Contoso Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, + }, ) print("Done!") @@ -77,22 +66,19 @@ def sample_attachments(): client.farms.create_or_update( party_id=party_id, farm_id=farm_id, - farm={ - "name": "Contoso Farm", - "description": "Contoso Farm.", - "status": "Contoso Status" - } + farm={"name": "Contoso Farm", "description": "Contoso Farm.", "status": "Contoso Status"}, ) print("Done!") # Create attachment on party try: - print(f"Checking if attachment with id {attachment_on_party_id} already exists " - f"on party with id {party_id}...", end=" ", flush=True) - client.attachments.get( - party_id=party_id, - attachment_id=attachment_on_party_id + print( + f"Checking if attachment with id {attachment_on_party_id} already exists " + f"on party with id {party_id}...", + end=" ", + flush=True, ) + client.attachments.get(party_id=party_id, attachment_id=attachment_on_party_id) print("Attachment already exists. Not updating file.") except ResourceNotFoundError: @@ -100,51 +86,35 @@ def sample_attachments(): print("Creating attachment...", end=" ", flush=True) # Open file with buffering set to 0, to get a IO object. - file_to_attach_on_party = open( - attachment_on_party_file_path, - "rb") + file_to_attach_on_party = open(attachment_on_party_file_path, "rb") - attachment = { - "resourceId": party_id, - "resourceType": "Party", - "name": "a" - } + attachment = {"resourceId": party_id, "resourceType": "Party", "name": "a"} client.attachments.create_or_update( - party_id=party_id, - attachment_id=attachment_on_party_id, - attachment=attachment, - file=file_to_attach_on_party) + party_id=party_id, attachment_id=attachment_on_party_id, attachment=attachment, file=file_to_attach_on_party + ) print("Done!") - + # Create attachment with farm try: # Open file with buffering set to 0, to get a IO object. - file_to_attach_on_farm = open( - attachment_on_farm_file_path, - "rb") + file_to_attach_on_farm = open(attachment_on_farm_file_path, "rb") - attachment = { - "resourceId": farm_id, - "resourceType": "Farm", - "name": "attachment name" - } + attachment = {"resourceId": farm_id, "resourceType": "Farm", "name": "attachment name"} client.attachments.create_or_update( - party_id=party_id, - attachment_id=attachment_on_farm_id, - attachment=attachment, - file=file_to_attach_on_farm) + party_id=party_id, attachment_id=attachment_on_farm_id, attachment=attachment, file=file_to_attach_on_farm + ) print("Done!") - - print(f"Checking if attachment with id {attachment_on_farm_id} already exists " + - f"on farm with id {farm_id}...", end=" ", flush=True) - client.attachments.get( - party_id=party_id, - attachment_id=attachment_on_farm_id + + print( + f"Checking if attachment with id {attachment_on_farm_id} already exists " + f"on farm with id {farm_id}...", + end=" ", + flush=True, ) + client.attachments.get(party_id=party_id, attachment_id=attachment_on_farm_id) print("Attachment already exists. Not updating file.") except ResourceNotFoundError: @@ -152,27 +122,17 @@ def sample_attachments(): print("Creating attachment...", end=" ", flush=True) # Open file with buffering set to 0, to get a IO object. - file_to_attach_on_farm = open( - attachment_on_farm_file_path, - "rb") + file_to_attach_on_farm = open(attachment_on_farm_file_path, "rb") - attachment = { - "resourceId": farm_id, - "resourceType": "Farm", - "name": "attachment name" - } + attachment = {"resourceId": farm_id, "resourceType": "Farm", "name": "attachment name"} client.attachments.create_or_update( - party_id=party_id, - attachment_id=attachment_on_farm_id, - attachment=attachment, - file=file_to_attach_on_farm) + party_id=party_id, attachment_id=attachment_on_farm_id, attachment=attachment, file=file_to_attach_on_farm + ) print("Done!") - - print("Getting a list of all attachments " + - f"on the party with id {party_id}...", end=" ", flush=True) + print("Getting a list of all attachments " + f"on the party with id {party_id}...", end=" ", flush=True) party_attachments = client.attachments.list_by_party_id( party_id=party_id, ) @@ -180,31 +140,24 @@ def sample_attachments(): for attachment in party_attachments: - downloaded_attachment = client.attachments.download( - party_id=party_id, - attachment_id=attachment_on_party_id - ) + downloaded_attachment = client.attachments.download(party_id=party_id, attachment_id=attachment_on_party_id) out_path = Path( - "./data/attachments/" + - f"{attachment['resourceType']}/{attachment['resourceId']}" + - f"/{attachment['id']}/{attachment['originalFileName']}" + "./data/attachments/" + + f"{attachment['resourceType']}/{attachment['resourceId']}" + + f"/{attachment['id']}/{attachment['originalFileName']}" ) # Make sure the dirs to the output path exists Path(out_path).parent.mkdir(parents=True, exist_ok=True) print(f"Saving attachment id {attachment['id']} to {out_path.resolve()}") - with open( - out_path, - 'wb' - ) as out_file: + with open(out_path, "wb") as out_file: for bits in downloaded_attachment: out_file.write(bits) - print("Done!") - + if __name__ == "__main__": load_dotenv() diff --git a/sdk/agrifood/azure-agrifood-farming/samples/sample_cascade_delete.py b/sdk/agrifood/azure-agrifood-farming/samples/sample_cascade_delete.py index 58aa51d11b35..109f671455b4 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/sample_cascade_delete.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/sample_cascade_delete.py @@ -5,7 +5,7 @@ FILE: sample_cascade_delete.py DESCRIPTION: - This sample demonstrates + This sample demonstrates - Getting a filtered list of parties based on last modified timestamp - Queuing a cascade delete job on a party, and polling for it to complete @@ -30,22 +30,17 @@ def sample_cascade_delete(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) job_id_prefix = "cascade-delete-job" # Getting list of parties modified in the last 7 days print("Getting list of recently modified party id's... ", end="", flush=True) - parties = client.parties.list( - min_last_modified_date_time=datetime.now(tz=UTC) - timedelta(days=7) - ) + parties = client.parties.list(min_last_modified_date_time=datetime.now(tz=UTC) - timedelta(days=7)) party_ids = [party["id"] for party in parties] print("Done") @@ -61,8 +56,7 @@ def sample_cascade_delete(): job_id = f"{job_id_prefix}-{randint(0, 1000)}" print(f"Queuing cascade delete job {job_id}... ", end="", flush=True) cascade_delete_job_poller = client.parties.begin_create_cascade_delete_job( - job_id=job_id, - party_id = party_id_to_delete + job_id=job_id, party_id=party_id_to_delete ) print("Queued. Waiting for completion... ", end="", flush=True) cascade_delete_job_poller.result() diff --git a/sdk/agrifood/azure-agrifood-farming/samples/sample_create_farmer.py b/sdk/agrifood/azure-agrifood-farming/samples/sample_create_farmer.py index 9940080daeed..281e96494e6e 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/sample_create_farmer.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/sample_create_farmer.py @@ -6,29 +6,23 @@ def create_party(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" # Create or update a party within FarmBeats. party = client.parties.create_or_update( party_id=party_id, - party={ - "name": "contoso party sdk", - "status": "created from SDK", - "description": "created from SDK" - } + party={"name": "contoso party sdk", "status": "created from SDK", "description": "created from SDK"}, ) print(party) + if __name__ == "__main__": load_dotenv() - create_party() \ No newline at end of file + create_party() diff --git a/sdk/agrifood/azure-agrifood-farming/samples/sample_farm_hierarchy_complete.py b/sdk/agrifood/azure-agrifood-farming/samples/sample_farm_hierarchy_complete.py index d0ae9503e7ce..d267509e9708 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/sample_farm_hierarchy_complete.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/sample_farm_hierarchy_complete.py @@ -33,14 +33,11 @@ def sample_farm_hierarchy_complete(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" party_name = "contoso-party-name" @@ -90,7 +87,7 @@ def sample_farm_hierarchy_complete(): [-94.05746988, 44.75751702], [-94.05795157, 44.75824385], [-94.05805349, 44.75863619], - [-94.05807495, 44.75916947] + [-94.05807495, 44.75916947], ] ], [ @@ -102,21 +99,16 @@ def sample_farm_hierarchy_complete(): [-94.05727246, 44.75988264], [-94.05752903, 44.75946416], [-94.05760288, 44.75923042], - [-94.05802667, 44.75929136] + [-94.05802667, 44.75929136], ] - ] - ] + ], + ], } # Step 1: Create a party. - print( - f"Creating or updating party with Id {party_id}...", end=" ", flush=True) + print(f"Creating or updating party with Id {party_id}...", end=" ", flush=True) party = client.parties.create_or_update( - party_id=party_id, - party={ - "name": party_name, - "description": party_description - } + party_id=party_id, party={"name": party_name, "description": party_description} ) print("Done") @@ -126,15 +118,9 @@ def sample_farm_hierarchy_complete(): print("\tDescription:", party["description"]) # Step 2: Create a farm. - print( - f"Creating or updating farm with Id {farm_id}...", end=" ", flush=True) + print(f"Creating or updating farm with Id {farm_id}...", end=" ", flush=True) farm = client.farms.create_or_update( - party_id=party_id, - farm_id=farm_id, - farm={ - "name": farm_name, - "description": farm_description - } + party_id=party_id, farm_id=farm_id, farm={"name": farm_name, "description": farm_description} ) print("Done") @@ -145,16 +131,11 @@ def sample_farm_hierarchy_complete(): print("\tDescription:", farm["description"]) # Step 3: Create a field. - print( - f"Creating or updating field with Id {field_id}...", end=" ", flush=True) + print(f"Creating or updating field with Id {field_id}...", end=" ", flush=True) field = client.fields.create_or_update( party_id=party_id, field_id=field_id, - field={ - "name": field_name, - "farmId": farm_id, - "description": field_description - } + field={"name": field_name, "farmId": farm_id, "description": field_description}, ) print("Done") @@ -167,15 +148,8 @@ def sample_farm_hierarchy_complete(): print("\tDescription:", field["description"]) # Step 4: Create a crop. - print( - f"Creating or updating crop with Id {crop_id}...", end=" ", flush=True) - crop = client.crops.create_or_update( - crop_id=crop_id, - crop={ - "name": crop_name, - "description": crop_description - } - ) + print(f"Creating or updating crop with Id {crop_id}...", end=" ", flush=True) + crop = client.crops.create_or_update(crop_id=crop_id, crop={"name": crop_name, "description": crop_description}) print("Done") print("Details of crop:") @@ -184,15 +158,10 @@ def sample_farm_hierarchy_complete(): print("\tDescription:", crop["description"]) # Step 5: Create a crop product. - print( - f"Creating or updating crop product with Id {crop_product_id}...", end=" ", flush=True) + print(f"Creating or updating crop product with Id {crop_product_id}...", end=" ", flush=True) crop_product = client.crop_products.create_or_update( crop_product_id=crop_product_id, - crop_product={ - "name": crop_product_name, - "description": crop_product_description, - "cropIds": [crop_id] - } + crop_product={"name": crop_product_name, "description": crop_product_description, "cropIds": [crop_id]}, ) print("Done") @@ -202,8 +171,7 @@ def sample_farm_hierarchy_complete(): print("\tDescription:", crop_product["description"]) # Step 6: Create a season. - print( - f"Creating or updating season with Id {season_id}...", end=" ", flush=True) + print(f"Creating or updating season with Id {season_id}...", end=" ", flush=True) season = client.seasons.create_or_update( season_id=season_id, season={ @@ -211,8 +179,8 @@ def sample_farm_hierarchy_complete(): "year": year, "startDateTime": start_date_time, "endDateTime": end_date_time, - "description": season_description - } + "description": season_description, + }, ) print("Done") @@ -225,8 +193,7 @@ def sample_farm_hierarchy_complete(): print("\tEnd Date Time:", season["endDateTime"]) # Step 7: Create a seasonal field. - print( - f"Creating or updating seasonal field with Id {seasonal_field_id}...", end=" ", flush=True) + print(f"Creating or updating seasonal field with Id {seasonal_field_id}...", end=" ", flush=True) seasonal_field = client.seasonal_fields.create_or_update( party_id=party_id, seasonal_field_id=seasonal_field_id, @@ -237,8 +204,8 @@ def sample_farm_hierarchy_complete(): "seasonId": season_id, "cropId": crop_id, "cropProductIds": [crop_product_id], - "description": seasonal_field_description - } + "description": seasonal_field_description, + }, ) print("Done") @@ -256,16 +223,11 @@ def sample_farm_hierarchy_complete(): # Step 8: Create a boundary. try: - print( - f"Trying to fetch boundary with id {boundary_id}...", end=" ", flush=True) - boundary = client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + print(f"Trying to fetch boundary with id {boundary_id}...", end=" ", flush=True) + boundary = client.boundaries.get(party_id=party_id, boundary_id=boundary_id) print("Boundary already exists.") except ResourceNotFoundError: - print( - f"Doesn't exist. Creating boundary...", end=" ", flush=True) + print(f"Doesn't exist. Creating boundary...", end=" ", flush=True) boundary = client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, @@ -274,8 +236,8 @@ def sample_farm_hierarchy_complete(): "geometry": multi_polygon, "parentId": seasonal_field_id, "parentType": "SeasonalField", - "description": boundary_description - } + "description": boundary_description, + }, ) print("Done") diff --git a/sdk/agrifood/azure-agrifood-farming/samples/sample_hello_world.py b/sdk/agrifood/azure-agrifood-farming/samples/sample_hello_world.py index 53fc24e99e6f..de4de4babb32 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/sample_hello_world.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/sample_hello_world.py @@ -5,9 +5,9 @@ FILE: sample_hello_world.py DESCRIPTION: - This sample demonstrates the most basic operation that can be - performed - creation of a Party. Use this to understand how to - create the client object, how to authenticate it, and make sure + This sample demonstrates the most basic operation that can be + performed - creation of a Party. Use this to understand how to + create the client object, how to authenticate it, and make sure your client is set up correctly to call into your FarmBeats endpoint. USAGE: @@ -29,14 +29,11 @@ def sample_hello_world(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" party_name = "Contoso" @@ -49,15 +46,11 @@ def sample_hello_world(): "name": party_name, "description": party_description, "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, + }, ) print("Done") - + print("Here are the details of the party:") print("\tID:", party["id"]) print("\tName:", party["name"]) diff --git a/sdk/agrifood/azure-agrifood-farming/samples/sample_satellite_download.py b/sdk/agrifood/azure-agrifood-farming/samples/sample_satellite_download.py index aee13be4d2ca..ba4faac6f4fd 100644 --- a/sdk/agrifood/azure-agrifood-farming/samples/sample_satellite_download.py +++ b/sdk/agrifood/azure-agrifood-farming/samples/sample_satellite_download.py @@ -35,35 +35,32 @@ # Helper to retrive local file path from FarmBeats data store path. def parse_file_path_from_file_link(file_link): - return parse_qs(urlparse(file_link).query)['filePath'][0] + return parse_qs(urlparse(file_link).query)["filePath"][0] + # Helper to download a given scene file path and store it to # the specified out path. def download_image(client, file_link, root_dir): - file_path = parse_file_path_from_file_link(file_link) - out_path = Path(os.path.join(root_dir, file_path)) - out_path.parent.mkdir(parents=True, exist_ok=True) - - print( - f"Downloading image to {out_path.resolve()}... ", end="", flush=True) - with open(out_path, 'wb') as tif_file: - file_stream = client.scenes.download(file_path=file_path) - for bits in file_stream: - tif_file.write(bits) - print("Done") - return str(out_path.resolve()) + file_path = parse_file_path_from_file_link(file_link) + out_path = Path(os.path.join(root_dir, file_path)) + out_path.parent.mkdir(parents=True, exist_ok=True) + + print(f"Downloading image to {out_path.resolve()}... ", end="", flush=True) + with open(out_path, "wb") as tif_file: + file_stream = client.scenes.download(file_path=file_path) + for bits in file_stream: + tif_file.write(bits) + print("Done") + return str(out_path.resolve()) def sample_satellite_download(): - farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT'] + farmbeats_endpoint = os.environ["FARMBEATS_ENDPOINT"] credential = DefaultAzureCredential() - client = FarmBeatsClient( - endpoint=farmbeats_endpoint, - credential=credential - ) + client = FarmBeatsClient(endpoint=farmbeats_endpoint, credential=credential) party_id = f"contoso-party-{random.randint(0,1000)}" boundary_id = "contoso-boundary" @@ -73,24 +70,16 @@ def sample_satellite_download(): data_root_dir = "./data" # Create or update a party within FarmBeats. - print( - f"Ensure party with id {party_id} exists... ", end="", flush=True) - party = client.parties.create_or_update( - party_id=party_id, - party={} - ) + print(f"Ensure party with id {party_id} exists... ", end="", flush=True) + party = client.parties.create_or_update(party_id=party_id, party={}) print("Done") # Create a boundary if the boundary does not exist. try: - print( - f"Checking if boundary with id {boundary_id} exists... ", end="", flush=True) - boundary = client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + print(f"Checking if boundary with id {boundary_id} exists... ", end="", flush=True) + boundary = client.boundaries.get(party_id=party_id, boundary_id=boundary_id) print("Exists") - + except ResourceNotFoundError as e: print("Boundary doesn't exist. Creating... ", end="", flush=True) # Creating a boundary. @@ -98,26 +87,24 @@ def sample_satellite_download(): party_id=party_id, boundary_id=boundary_id, boundary={ - "geometry": - { + "geometry": { "type": "Polygon", - "coordinates": + "coordinates": [ [ - [ - [73.70457172393799, 20.545385304358106], - [73.70457172393799, 20.545385304358106], - [73.70448589324951, 20.542411534243367], - [73.70877742767334, 20.541688176010233], - [73.71023654937744, 20.545083911372505], - [73.70663166046143, 20.546992723579137], - [73.70457172393799, 20.545385304358106], - ] + [73.70457172393799, 20.545385304358106], + [73.70457172393799, 20.545385304358106], + [73.70448589324951, 20.542411534243367], + [73.70877742767334, 20.541688176010233], + [73.71023654937744, 20.545083911372505], + [73.70663166046143, 20.546992723579137], + [73.70457172393799, 20.545385304358106], ] + ], }, "status": "", "name": "", - "description": "" - } + "description": "", + }, ) print("Created") @@ -133,18 +120,10 @@ def sample_satellite_download(): "startDateTime": start_date_time, "provider": "Microsoft", "source": "Sentinel_2_L2A", - "data": { - "imageNames": [ - "NDVI" - ], - "imageFormats": [ - "TIF" - ], - "imageResolution": [10] - }, + "data": {"imageNames": ["NDVI"], "imageFormats": ["TIF"], "imageResolution": [10]}, "name": "", - "description": "" - } + "description": "", + }, ) print("Queued. Waiting for completion... ", end="", flush=True) satellite_job_poller.result() @@ -158,9 +137,9 @@ def sample_satellite_download(): start_date_time=start_date_time, end_date_time=end_date_time, provider="Microsoft", - source="Sentinel_2_L2A" + source="Sentinel_2_L2A", ) - print("Done") + print("Done") for scene in scenes: for image_file in scene["imageFiles"]: diff --git a/sdk/agrifood/azure-agrifood-farming/setup.py b/sdk/agrifood/azure-agrifood-farming/setup.py index 312c6ce85644..ca4b83d33633 100644 --- a/sdk/agrifood/azure-agrifood-farming/setup.py +++ b/sdk/agrifood/azure-agrifood-farming/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,56 +16,57 @@ PACKAGE_PPRINT_NAME = "Azure AgriFood Farming" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=readme + "\n\n" + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ "Development Status :: 4 - Beta", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.agrifood', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.agrifood", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.6", install_requires=[ diff --git a/sdk/agrifood/azure-agrifood-farming/tests/conftest.py b/sdk/agrifood/azure-agrifood-farming/tests/conftest.py index 961a801a86ff..c1146e47f438 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/conftest.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/conftest.py @@ -1,8 +1,9 @@ import pytest from devtools_testutils import set_custom_default_matcher + # autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy): set_custom_default_matcher(ignored_headers="Accept-Encoding") - return \ No newline at end of file + return diff --git a/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy.py b/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy.py index 59b3bd732c70..1ddd50a377ad 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy.py @@ -11,34 +11,27 @@ from testcase import FarmBeatsPowerShellPreparer, FarmBeatsTestCase -class TestFarmHierarchy(FarmBeatsTestCase): +class TestFarmHierarchy(FarmBeatsTestCase): @FarmBeatsPowerShellPreparer() @recorded_by_proxy def test_party_operations(self, **kwargs): set_custom_default_matcher(ignored_headers="Accept-Encoding") agrifood_endpoint = kwargs.pop("agrifood_endpoint") - + # Setup data party_id = "test-party-39574" party_request = { "name": "Test Party", "description": "Party created during testing.", "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, } # Setup client client = self.create_client(agrifood_endpoint=agrifood_endpoint) # Create - party_response = client.parties.create_or_update( - party_id=party_id, - party=party_request - ) + party_response = client.parties.create_or_update(party_id=party_id, party=party_request) # Assert on immediate response assert party_response["id"] == party_id @@ -56,8 +49,7 @@ def test_party_operations(self, **kwargs): assert type(parse(party_response["modifiedDateTime"])) is datetime # Retrieve created object - retrieved_party = client.parties.get( - party_id=party_id) + retrieved_party = client.parties.get(party_id=party_id) # Assert on retrieved object assert retrieved_party["id"] == party_id @@ -66,10 +58,7 @@ def test_party_operations(self, **kwargs): party_request["name"] += " Updated" # Update - updated_party = client.parties.create_or_update( - party_id=party_id, - party=party_request - ) + updated_party = client.parties.create_or_update(party_id=party_id, party=party_request) # Assert on immediate response # Assert on immediate response diff --git a/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy_async.py b/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy_async.py index 8e9686270fc9..ad65fe49bb78 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy_async.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/test_farm_hierarchy_async.py @@ -13,34 +13,27 @@ from testcase import FarmBeatsPowerShellPreparer -class TestFarmHierarchyAsync(FarmBeatsAsyncTestCase): +class TestFarmHierarchyAsync(FarmBeatsAsyncTestCase): @FarmBeatsPowerShellPreparer() @recorded_by_proxy_async async def test_party_operations(self, **kwargs): set_custom_default_matcher(ignored_headers="Accept-Encoding") agrifood_endpoint = kwargs.pop("agrifood_endpoint") - + # Setup data party_id = "test-party-25486" party_request = { "name": "Test Party", "description": "Party created during testing.", "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, } # Setup client client = self.create_client(agrifood_endpoint=agrifood_endpoint) # Create - party_response = await client.parties.create_or_update( - party_id=party_id, - party=party_request - ) + party_response = await client.parties.create_or_update(party_id=party_id, party=party_request) # Assert on immediate response assert party_response["id"] == party_id @@ -58,8 +51,7 @@ async def test_party_operations(self, **kwargs): assert type(parse(party_response["modifiedDateTime"])) is datetime # Retrieve created object - retrieved_party = await client.parties.get( - party_id=party_id) + retrieved_party = await client.parties.get(party_id=party_id) # Assert on retrieved object assert retrieved_party["id"] == party_id @@ -68,10 +60,7 @@ async def test_party_operations(self, **kwargs): party_request["name"] += " Updated" # Update - updated_party = await client.parties.create_or_update( - party_id=party_id, - party=party_request - ) + updated_party = await client.parties.create_or_update(party_id=party_id, party=party_request) # Assert on immediate response # Assert on immediate response @@ -79,19 +68,16 @@ async def test_party_operations(self, **kwargs): assert updated_party["createdDateTime"] == party_response["createdDateTime"] # Retrieve updated object - retrieved_party = await client.parties.get( - party_id=party_id) + retrieved_party = await client.parties.get(party_id=party_id) # Assert updated object assert retrieved_party == updated_party # Delete - await client.parties.delete( - party_id=party_id) + await client.parties.delete(party_id=party_id) # Assert object doesn't exist anymore with pytest.raises(ResourceNotFoundError): - await client.parties.get( - party_id=party_id) - + await client.parties.get(party_id=party_id) + await self.close_client() diff --git a/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow.py b/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow.py index 71e8474c9246..dd49984510ff 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow.py @@ -30,36 +30,31 @@ def test_satellite_flow(self, **kwargs): client = self.create_client(agrifood_endpoint=agrifood_endpoint) # Create party - party = client.parties.create_or_update( - party_id=party_id, - party={} - ) + party = client.parties.create_or_update(party_id=party_id, party={}) # Create boundary if not exists boundary = client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, boundary={ - "geometry": - { + "geometry": { "type": "Polygon", - "coordinates": + "coordinates": [ [ - [ - [73.70457172393799, 20.545385304358106], - [73.70457172393799, 20.545385304358106], - [73.70448589324951, 20.542411534243367], - [73.70877742767334, 20.541688176010233], - [73.71023654937744, 20.545083911372505], - [73.70663166046143, 20.546992723579137], - [73.70457172393799, 20.545385304358106], - ] + [73.70457172393799, 20.545385304358106], + [73.70457172393799, 20.545385304358106], + [73.70448589324951, 20.542411534243367], + [73.70877742767334, 20.541688176010233], + [73.71023654937744, 20.545083911372505], + [73.70663166046143, 20.546992723579137], + [73.70457172393799, 20.545385304358106], ] + ], }, "status": "", "name": "", - "description": "" - } + "description": "", + }, ) # Create satellite job @@ -72,18 +67,10 @@ def test_satellite_flow(self, **kwargs): "startDateTime": start_date_time, "provider": "Microsoft", "source": "Sentinel_2_L2A", - "data": { - "imageNames": [ - "NDVI" - ], - "imageFormats": [ - "TIF" - ], - "imageResolution": [10] - }, + "data": {"imageNames": ["NDVI"], "imageFormats": ["TIF"], "imageResolution": [10]}, "name": "", - "description": "" - } + "description": "", + }, ) satellite_job_poller.result() @@ -97,7 +84,7 @@ def test_satellite_flow(self, **kwargs): start_date_time=start_date_time, end_date_time=end_date_time, provider="Microsoft", - source="Sentinel_2_L2A" + source="Sentinel_2_L2A", ) scenes_list = list(scenes) @@ -106,7 +93,7 @@ def test_satellite_flow(self, **kwargs): assert len(scenes_list) == 12 # Download scene file - file_path = parse_qs(urlparse(scenes_list[0]["imageFiles"][0]["fileLink"]).query)['filePath'][0] + file_path = parse_qs(urlparse(scenes_list[0]["imageFiles"][0]["fileLink"]).query)["filePath"][0] file_iter = client.scenes.download(file_path=file_path) file = list(file_iter) assert len(file) == 3 diff --git a/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow_async.py b/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow_async.py index e950c08c0224..3cd5d32b8cc5 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow_async.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/test_satellite_flow_async.py @@ -31,36 +31,31 @@ async def test_satellite_flow(self, **kwargs): client = self.create_client(agrifood_endpoint=agrifood_endpoint) # Create party - party = await client.parties.create_or_update( - party_id=party_id, - party={} - ) + party = await client.parties.create_or_update(party_id=party_id, party={}) # Create boundary if not exists boundary = await client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, boundary={ - "geometry": - { + "geometry": { "type": "Polygon", - "coordinates": + "coordinates": [ [ - [ - [73.70457172393799, 20.545385304358106], - [73.70457172393799, 20.545385304358106], - [73.70448589324951, 20.542411534243367], - [73.70877742767334, 20.541688176010233], - [73.71023654937744, 20.545083911372505], - [73.70663166046143, 20.546992723579137], - [73.70457172393799, 20.545385304358106], - ] + [73.70457172393799, 20.545385304358106], + [73.70457172393799, 20.545385304358106], + [73.70448589324951, 20.542411534243367], + [73.70877742767334, 20.541688176010233], + [73.71023654937744, 20.545083911372505], + [73.70663166046143, 20.546992723579137], + [73.70457172393799, 20.545385304358106], ] + ], }, "status": "", "name": "", - "description": "" - } + "description": "", + }, ) # Create satellite job @@ -73,18 +68,10 @@ async def test_satellite_flow(self, **kwargs): "startDateTime": start_date_time, "provider": "Microsoft", "source": "Sentinel_2_L2A", - "data": { - "imageNames": [ - "NDVI" - ], - "imageFormats": [ - "TIF" - ], - "imageResolution": [10] - }, + "data": {"imageNames": ["NDVI"], "imageFormats": ["TIF"], "imageResolution": [10]}, "name": "", - "description": "" - } + "description": "", + }, ) await satellite_job_poller.result() @@ -107,7 +94,7 @@ async def test_satellite_flow(self, **kwargs): assert len(scenes_list) == 12 # Download scene file - file_path = parse_qs(urlparse(scenes_list[0]["imageFiles"][0]["fileLink"]).query)['filePath'][0] + file_path = parse_qs(urlparse(scenes_list[0]["imageFiles"][0]["fileLink"]).query)["filePath"][0] file_iter = await client.scenes.download(file_path=file_path) file = list([byte async for byte in file_iter]) assert len(file) == 3 diff --git a/sdk/agrifood/azure-agrifood-farming/tests/test_smoke.py b/sdk/agrifood/azure-agrifood-farming/tests/test_smoke.py index f0e0abfb4801..b5ac3206ade9 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/test_smoke.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/test_smoke.py @@ -23,21 +23,14 @@ def test_party(self, **kwargs): "name": "Test Party", "description": "Party created during testing.", "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, } # Setup client client = self.create_client(agrifood_endpoint=agrifood_endpoint) # Create - party_response = client.parties.create_or_update( - party_id=party_id, - party=party_request - ) + party_response = client.parties.create_or_update(party_id=party_id, party=party_request) # Assert on immediate response assert party_response["id"] == party_id @@ -56,7 +49,6 @@ def test_party(self, **kwargs): client.parties.delete(party_id=party_id) - @FarmBeatsPowerShellPreparer() @recorded_by_proxy def test_boundary(self, **kwargs): @@ -70,46 +62,34 @@ def test_boundary(self, **kwargs): "name": "Test Party", "description": "Party created during testing.", "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, } - party = client.parties.create_or_update( - party_id=party_id, - party=party_request - ) - + party = client.parties.create_or_update(party_id=party_id, party=party_request) + boundary = client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, boundary={ - "geometry": - { + "geometry": { "type": "Polygon", - "coordinates": + "coordinates": [ [ - [ - [73.70457172393799, 20.545385304358106], - [73.70457172393799, 20.545385304358106], - [73.70448589324951, 20.542411534243367], - [73.70877742767334, 20.541688176010233], - [73.71023654937744, 20.545083911372505], - [73.70663166046143, 20.546992723579137], - [73.70457172393799, 20.545385304358106], - ] + [73.70457172393799, 20.545385304358106], + [73.70457172393799, 20.545385304358106], + [73.70448589324951, 20.542411534243367], + [73.70877742767334, 20.541688176010233], + [73.71023654937744, 20.545083911372505], + [73.70663166046143, 20.546992723579137], + [73.70457172393799, 20.545385304358106], ] + ], }, "status": "", "name": "", - "description": "" - } + "description": "", + }, ) - assert boundary == client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + assert boundary == client.boundaries.get(party_id=party_id, boundary_id=boundary_id) client.boundaries.delete(party_id=party_id, boundary_id=boundary_id) client.parties.delete(party_id=party_id) diff --git a/sdk/agrifood/azure-agrifood-farming/tests/test_smoke_async.py b/sdk/agrifood/azure-agrifood-farming/tests/test_smoke_async.py index fd94701026eb..f74da40c0452 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/test_smoke_async.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/test_smoke_async.py @@ -23,21 +23,14 @@ async def test_party(self, **kwargs): "name": "Test Party", "description": "Party created during testing.", "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, } # Setup client client = self.create_client(agrifood_endpoint=agrifood_endpoint) # Create - party_response = await client.parties.create_or_update( - party_id=party_id, - party=party_request - ) + party_response = await client.parties.create_or_update(party_id=party_id, party=party_request) # Assert on immediate response assert party_response["id"] == party_id @@ -57,7 +50,6 @@ async def test_party(self, **kwargs): await client.parties.delete(party_id=party_id) await self.close_client() - @FarmBeatsPowerShellPreparer() @recorded_by_proxy_async async def test_boundary(self, **kwargs): @@ -71,47 +63,35 @@ async def test_boundary(self, **kwargs): "name": "Test Party", "description": "Party created during testing.", "status": "Sample Status", - "properties": { - "foo": "bar", - "numeric one": 1, - 1: "numeric key" - } + "properties": {"foo": "bar", "numeric one": 1, 1: "numeric key"}, } - party = await client.parties.create_or_update( - party_id=party_id, - party=party_request - ) - + party = await client.parties.create_or_update(party_id=party_id, party=party_request) + boundary = await client.boundaries.create_or_update( party_id=party_id, boundary_id=boundary_id, boundary={ - "geometry": - { + "geometry": { "type": "Polygon", - "coordinates": + "coordinates": [ [ - [ - [73.70457172393799, 20.545385304358106], - [73.70457172393799, 20.545385304358106], - [73.70448589324951, 20.542411534243367], - [73.70877742767334, 20.541688176010233], - [73.71023654937744, 20.545083911372505], - [73.70663166046143, 20.546992723579137], - [73.70457172393799, 20.545385304358106], - ] + [73.70457172393799, 20.545385304358106], + [73.70457172393799, 20.545385304358106], + [73.70448589324951, 20.542411534243367], + [73.70877742767334, 20.541688176010233], + [73.71023654937744, 20.545083911372505], + [73.70663166046143, 20.546992723579137], + [73.70457172393799, 20.545385304358106], ] + ], }, "status": "", "name": "", - "description": "" - } + "description": "", + }, ) - assert boundary == await client.boundaries.get( - party_id=party_id, - boundary_id=boundary_id - ) + assert boundary == await client.boundaries.get(party_id=party_id, boundary_id=boundary_id) await client.boundaries.delete(party_id=party_id, boundary_id=boundary_id) await client.parties.delete(party_id=party_id) diff --git a/sdk/agrifood/azure-agrifood-farming/tests/testcase.py b/sdk/agrifood/azure-agrifood-farming/tests/testcase.py index 1ee6fa772be7..328cc134805a 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/testcase.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/testcase.py @@ -1,4 +1,3 @@ - # coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,6 +8,7 @@ from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer, recorded_by_proxy from azure.agrifood.farming import FarmBeatsClient + class FarmBeatsTestCase(AzureRecordedTestCase): def create_client(self, agrifood_endpoint): @@ -19,8 +19,7 @@ def create_client(self, agrifood_endpoint): credential=credential, ) + FarmBeatsPowerShellPreparer = functools.partial( - PowerShellPreparer, - "agrifood", - agrifood_endpoint="https://fakeaccount.farmbeats.azure.net" + PowerShellPreparer, "agrifood", agrifood_endpoint="https://fakeaccount.farmbeats.azure.net" ) diff --git a/sdk/agrifood/azure-agrifood-farming/tests/testcase_async.py b/sdk/agrifood/azure-agrifood-farming/tests/testcase_async.py index 45e5dc1deb31..12bf5892df08 100644 --- a/sdk/agrifood/azure-agrifood-farming/tests/testcase_async.py +++ b/sdk/agrifood/azure-agrifood-farming/tests/testcase_async.py @@ -10,20 +10,21 @@ from devtools_testutils import AzureRecordedTestCase, trim_kwargs_from_test_function from azure.agrifood.farming.aio import FarmBeatsClient + class FarmBeatsAsyncTestCase(AzureRecordedTestCase): def create_client(self, agrifood_endpoint) -> FarmBeatsClient: - self.credential = self.get_credential(FarmBeatsClient, is_async= True) + self.credential = self.get_credential(FarmBeatsClient, is_async=True) self.client = self.create_client_from_credential( FarmBeatsClient, endpoint=agrifood_endpoint, credential=self.credential, ) return self.client - + async def close_client(self): await self.credential.close() await self.client.close() - + @staticmethod def await_prepared_test(test_fn): """Synchronous wrapper for async test methods. Used to avoid making changes diff --git a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_patch.py b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_patch.py +++ b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_patch.py b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_patch.py +++ b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/operations/_patch.py b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/operations/_patch.py +++ b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/models/_patch.py b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/models/_patch.py +++ b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/operations/_patch.py b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/operations/_patch.py +++ b/sdk/agrifood/azure-mgmt-agrifood/azure/mgmt/agrifood/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/agrifood/azure-mgmt-agrifood/setup.py b/sdk/agrifood/azure-mgmt-agrifood/setup.py index 6e2e8f759225..77ddfd947fbb 100644 --- a/sdk/agrifood/azure-mgmt-agrifood/setup.py +++ b/sdk/agrifood/azure-mgmt-agrifood/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Agrifood Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/_patch.py b/sdk/ai/azure-ai-agents/azure/ai/agents/_patch.py index f01bcc39ead1..89ea7068b77c 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/_patch.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import io import logging import sys diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/aio/_patch.py b/sdk/ai/azure-ai-agents/azure/ai/agents/aio/_patch.py index 719335f53b3a..fb741add7649 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/aio/_patch.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import asyncio # pylint: disable = do-not-import-asyncio import io import logging diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_patch.py b/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_patch.py index bd8402cdf7c7..5473957390f6 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_patch.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import ast import asyncio # pylint: disable=do-not-import-asyncio import io diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py b/sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py index 70a0891dc74b..26d33c894a1a 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import asyncio # pylint: disable = do-not-import-asyncio import inspect import itertools @@ -105,7 +106,6 @@ from .. import types as _types - # NOTE: Avoid importing RunsOperations here to prevent circular import with operations package. diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_patch.py b/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_patch.py index c9234a73f3c1..1914bc34b12a 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_patch.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import ast import io import logging diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/__init__.py b/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/__init__.py index 9b00ace43af8..76f7ec2ad1c3 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/__init__.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/__init__.py @@ -9,5 +9,4 @@ from ._ai_agents_instrumentor import AIAgentsInstrumentor from ._trace_function import trace_function - __all__ = ["AIAgentsInstrumentor", "trace_function"] diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/_ai_agents_instrumentor.py b/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/_ai_agents_instrumentor.py index 9e3868035e47..b8c5a3fe2476 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/_ai_agents_instrumentor.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/telemetry/_ai_agents_instrumentor.py @@ -78,7 +78,6 @@ ) from ._instrument_paged_wrappers import _AsyncInstrumentedItemPaged, _InstrumentedItemPaged - _Unset: Any = object() logger = logging.getLogger(__name__) diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_async.py index d1ff46d87325..8e9e42034a27 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_async.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import time diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_process_run_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_process_run_async.py index 21e5c7b2f908..68de9767b52b 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_process_run_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_process_run_async.py @@ -23,6 +23,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_run_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_run_async.py index 52b2341539e0..4681fe356a46 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_run_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_create_thread_and_run_async.py @@ -21,6 +21,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_with_console_tracing_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_with_console_tracing_async.py index bacec1c100b0..e549536f49b5 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_with_console_tracing_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_basics_with_console_tracing_async.py @@ -37,6 +37,7 @@ from azure.identity.aio import DefaultAzureCredential from azure.core.settings import settings + settings.tracing_implementation = "opentelemetry" # Install opentelemetry with command "pip install azure-ai-projects opentelemetry-sdk". @@ -53,6 +54,7 @@ tracer = trace.get_tracer(__name__) from azure.ai.agents.telemetry import AIAgentsInstrumentor + AIAgentsInstrumentor().instrument() @@ -80,7 +82,9 @@ async def main() -> None: thread = await project_client.agents.threads.create() print(f"Created thread, thread ID: {thread.id}") - message = await project_client.agents.messages.create(thread_id=thread.id, role="user", content="Hello, tell me a joke") + message = await project_client.agents.messages.create( + thread_id=thread.id, role="user", content="Hello, tell me a joke" + ) print(f"Created message, message ID: {message.id}") run = await project_client.agents.runs.create_and_process(thread_id=thread.id, agent_id=agent.id) diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_async.py index 56c9e6a47fe6..d16ae2e65fb8 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_async.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio from azure.ai.projects.aio import AIProjectClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_async.py index c6af613314e7..a0d3c1a36819 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_async.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os from azure.ai.projects.aio import AIProjectClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_enterprise_search_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_enterprise_search_async.py index e25772cc8e8f..461ecb636728 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_enterprise_search_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_code_interpreter_attachment_enterprise_search_async.py @@ -21,6 +21,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os from azure.ai.agents.aio import AgentsClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_async.py index 8f39ebd23247..568b3490c1c9 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_async.py @@ -23,6 +23,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import time import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_in_create_and_process_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_in_create_and_process_async.py index 7ae693da20a3..b9cdf3e2abcf 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_in_create_and_process_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_functions_in_create_and_process_async.py @@ -24,6 +24,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import os, sys, json, asyncio from typing import Any from azure.ai.projects.aio import AIProjectClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_base64_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_base64_async.py index b19fb72d01e9..79e51f0ad0fb 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_base64_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_base64_async.py @@ -21,6 +21,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os, time, base64 from typing import List diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_file_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_file_async.py index 4eb7335f13de..2e3dcab412ea 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_file_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_file_async.py @@ -21,6 +21,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os, time from typing import List diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_url_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_url_async.py index 00995181f1ba..922967fbf89d 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_url_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_image_input_url_async.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os, time from typing import List diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_json_schema_response_format_using_pydantic_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_json_schema_response_format_using_pydantic_async.py index 7b35d4388528..74e41056f106 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_json_schema_response_format_using_pydantic_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_json_schema_response_format_using_pydantic_async.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import asyncio import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_async.py index 1831f3744261..3a52bbf51f34 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_async.py @@ -21,6 +21,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio from typing import Any, Optional diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_functions_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_functions_async.py index a74375965f4f..9fa105c3959c 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_functions_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_functions_async.py @@ -21,6 +21,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio from typing import Any diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_mcp_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_mcp_async.py index bef154242ed3..96eb01a4b380 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_mcp_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_mcp_async.py @@ -27,6 +27,7 @@ 3) MCP_SERVER_URL - The URL of your MCP server endpoint. 4) MCP_SERVER_LABEL - A label for your MCP server. """ + import asyncio from typing import Any diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_toolset_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_toolset_async.py index 016e2f151aea..b28db603e8e4 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_toolset_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_eventhandler_with_toolset_async.py @@ -21,6 +21,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio from typing import Any diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_iteration_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_iteration_async.py index fbcd6a60e2b0..55f6f8f565d6 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_iteration_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_iteration_async.py @@ -21,6 +21,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio from azure.ai.projects.aio import AIProjectClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_with_base_override_eventhandler_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_with_base_override_eventhandler_async.py index aa8d8a4fc929..51b67ce47567 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_with_base_override_eventhandler_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_stream_with_base_override_eventhandler_async.py @@ -24,6 +24,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio import json from typing import AsyncGenerator, Optional diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_batch_enterprise_file_search_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_batch_enterprise_file_search_async.py index e04f9955c449..8be5816cf516 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_batch_enterprise_file_search_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_batch_enterprise_file_search_async.py @@ -20,6 +20,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_enterprise_file_search_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_enterprise_file_search_async.py index e5bb57d0ff22..9e39b2c3d0d2 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_enterprise_file_search_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_enterprise_file_search_async.py @@ -19,6 +19,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_file_search_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_file_search_async.py index 85c19e7c2826..bee9dcbf6afc 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_file_search_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_vector_store_file_search_async.py @@ -19,6 +19,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio import os diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_with_file_search_attachment_async.py b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_with_file_search_attachment_async.py index 321c1c7c6cee..a911b309f59b 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_with_file_search_attachment_async.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_with_file_search_attachment_async.py @@ -21,6 +21,7 @@ page of your Azure AI Foundry portal. 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model. """ + import asyncio from azure.ai.projects.aio import AIProjectClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_async/utils/user_async_functions.py b/sdk/ai/azure-ai-agents/samples/agents_async/utils/user_async_functions.py index 11a377e39895..5dfe834ffec6 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_async/utils/user_async_functions.py +++ b/sdk/ai/azure-ai-agents/samples/agents_async/utils/user_async_functions.py @@ -12,7 +12,6 @@ from typing import Any, Callable, Set, Optional from azure.ai.agents.telemetry import trace_function - # Add package directory to sys.path to import user_functions current_dir = os.path.dirname(os.path.abspath(__file__)) package_dir = os.path.abspath(os.path.join(current_dir, os.pardir, os.pardir, os.pardir)) diff --git a/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_image_input_url.py b/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_image_input_url.py index 4c94a3cc086f..609c10ad754d 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_image_input_url.py +++ b/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_image_input_url.py @@ -36,7 +36,6 @@ MessageInputImageUrlBlock, ) - project_client = AIProjectClient( endpoint=os.environ["PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), diff --git a/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_with_file_search_attachment.py b/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_with_file_search_attachment.py index 9864cad38be8..18ba2b7e338a 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_with_file_search_attachment.py +++ b/sdk/ai/azure-ai-agents/samples/agents_files_images_inputs/sample_agents_with_file_search_attachment.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import os from azure.ai.projects import AIProjectClient from azure.ai.agents.models import FilePurpose, FileSearchTool, MessageAttachment, ListSortOrder diff --git a/sdk/ai/azure-ai-agents/samples/agents_multiagent/utils/user_functions_with_traces.py b/sdk/ai/azure-ai-agents/samples/agents_multiagent/utils/user_functions_with_traces.py index 2c4f2377ddaf..a80ec2f904f1 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_multiagent/utils/user_functions_with_traces.py +++ b/sdk/ai/azure-ai-agents/samples/agents_multiagent/utils/user_functions_with_traces.py @@ -9,7 +9,6 @@ from typing import Any, Callable, Set, Optional from opentelemetry import trace - tracer = trace.get_tracer(__name__) diff --git a/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_eventhandler_with_functions.py b/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_eventhandler_with_functions.py index 7aeb75ead787..4b9c1bd53e44 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_eventhandler_with_functions.py +++ b/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_eventhandler_with_functions.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + from typing import Any import os, sys diff --git a/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_iteration_with_functions.py b/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_iteration_with_functions.py index 8169664f6297..5ce09f985a63 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_iteration_with_functions.py +++ b/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_iteration_with_functions.py @@ -22,6 +22,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + from typing import Any import os, sys diff --git a/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_with_base_override_eventhandler.py b/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_with_base_override_eventhandler.py index 854a5bdc7221..3e03168ea095 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_with_base_override_eventhandler.py +++ b/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_with_base_override_eventhandler.py @@ -24,6 +24,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import json from typing import Generator, Optional @@ -38,7 +39,6 @@ import os - project_client = AIProjectClient( endpoint=os.environ["PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), diff --git a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_azure_monitor_tracing.py b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_azure_monitor_tracing.py index 83843f013d5f..adbac46b87e2 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_azure_monitor_tracing.py +++ b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_azure_monitor_tracing.py @@ -27,6 +27,7 @@ from AIProjectClient using the `telemetry.get_application_insights_connection_string()` method. A code sample showing how to do this can be found in the `sample_telemetry_async.py` file in the azure-ai-projects telemetry samples. """ + import asyncio import time from azure.ai.projects.aio import AIProjectClient diff --git a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_console_tracing.py b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_console_tracing.py index 7285131c622f..5dfdcf8eac54 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_console_tracing.py +++ b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_console_tracing.py @@ -28,6 +28,7 @@ * OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT - Optional. Set to `true` to trace the content of chat messages, which may contain personal data. False by default. """ + import asyncio import time import sys diff --git a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_azure_monitor_tracing.py b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_azure_monitor_tracing.py index f0e477c5aca4..0356fdc66991 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_azure_monitor_tracing.py +++ b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_azure_monitor_tracing.py @@ -29,6 +29,7 @@ from AIProjectClient using the `telemetry.get_application_insights_connection_string()` method. A code sample showing how to do this can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples. """ + from typing import Any, Callable, Set import os, time, json diff --git a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_console_tracing.py b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_console_tracing.py index c10a15e8b8ce..495e04600169 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_console_tracing.py +++ b/sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_console_tracing.py @@ -29,6 +29,7 @@ 3) OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT - Optional. Set to `true` to trace the content of chat messages, which may contain personal data. False by default. """ + from typing import Any, Callable, Set import os, sys, time, json diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_azure_ai_search.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_azure_ai_search.py index 982f83c20fbc..73e969f25d29 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_azure_ai_search.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_azure_ai_search.py @@ -38,7 +38,6 @@ from azure.identity import DefaultAzureCredential from azure.ai.agents.models import AzureAISearchQueryType, AzureAISearchTool, ListSortOrder, MessageRole - with AIProjectClient( endpoint=os.environ["PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_bing_grounding.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_bing_grounding.py index b56463973d06..b25a2a318eee 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_bing_grounding.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_bing_grounding.py @@ -30,7 +30,6 @@ from azure.ai.agents.models import MessageRole, BingGroundingTool from azure.identity import DefaultAzureCredential - project_client = AIProjectClient( endpoint=os.environ["PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_connected_agent.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_connected_agent.py index 301315b3a69a..9d37704744c8 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_connected_agent.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_connected_agent.py @@ -28,7 +28,6 @@ from azure.ai.agents.models import ConnectedAgentTool, ListSortOrder, MessageRole from azure.identity import DefaultAzureCredential - project_client = AIProjectClient( endpoint=os.environ["PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions.py index 573fb800cd7c..223ba91bf5c8 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions.py @@ -21,6 +21,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import os, time, sys from azure.ai.projects import AIProjectClient from azure.identity import DefaultAzureCredential diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions_in_create_and_process.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions_in_create_and_process.py index 0465f978e1ac..47d73dc97917 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions_in_create_and_process.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_functions_in_create_and_process.py @@ -24,6 +24,7 @@ 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project. """ + import os, sys, json from typing import Any, Optional from azure.ai.projects import AIProjectClient @@ -38,7 +39,6 @@ RequiredFunctionToolCallDetails, ) - # Add package directory to sys.path to import user_functions current_dir = os.path.dirname(os.path.abspath(__file__)) package_dir = os.path.abspath(os.path.join(current_dir, os.pardir, os.pardir)) diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py index a3294ed803cb..34f4745a3445 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py @@ -35,7 +35,6 @@ 3) - The email address of the recipient. """ - import os import sys from typing import Set diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_multiple_connected_agents.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_multiple_connected_agents.py index 9c042eae6147..cef67d39c154 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_multiple_connected_agents.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_multiple_connected_agents.py @@ -43,7 +43,6 @@ ) from azure.identity import DefaultAzureCredential - project_client = AIProjectClient( endpoint=os.environ["PROJECT_ENDPOINT"], credential=DefaultAzureCredential(), diff --git a/sdk/ai/azure-ai-agents/setup.py b/sdk/ai/azure-ai-agents/setup.py index 372a1c431d12..04dd47dd7005 100644 --- a/sdk/ai/azure-ai-agents/setup.py +++ b/sdk/ai/azure-ai-agents/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-agents" PACKAGE_PPRINT_NAME = "Azure AI Agents" diff --git a/sdk/ai/azure-ai-agents/tests/test_agents_mock.py b/sdk/ai/azure-ai-agents/tests/test_agents_mock.py index d2b29d1e4ebc..a017736302b4 100644 --- a/sdk/ai/azure-ai-agents/tests/test_agents_mock.py +++ b/sdk/ai/azure-ai-agents/tests/test_agents_mock.py @@ -34,7 +34,6 @@ from user_functions import user_functions - JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object diff --git a/sdk/ai/azure-ai-agents/tests/test_agents_mock_async.py b/sdk/ai/azure-ai-agents/tests/test_agents_mock_async.py index c327b32b3f90..edaf8b288c19 100644 --- a/sdk/ai/azure-ai-agents/tests/test_agents_mock_async.py +++ b/sdk/ai/azure-ai-agents/tests/test_agents_mock_async.py @@ -35,7 +35,6 @@ from user_functions import user_functions - JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object diff --git a/sdk/ai/azure-ai-agents/tests/test_agents_mock_overloads.py b/sdk/ai/azure-ai-agents/tests/test_agents_mock_overloads.py index 937837489b92..a316ffbf2179 100644 --- a/sdk/ai/azure-ai-agents/tests/test_agents_mock_overloads.py +++ b/sdk/ai/azure-ai-agents/tests/test_agents_mock_overloads.py @@ -14,7 +14,6 @@ from azure.ai.agents.models import ThreadMessageOptions, ToolResources, VectorStore - JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/_operations/_patch.py b/sdk/ai/azure-ai-inference/azure/ai/inference/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/_operations/_patch.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/_patch.py b/sdk/ai/azure-ai-inference/azure/ai/inference/_patch.py index da95cf93daf9..4f1260ed9119 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/_patch.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/_patch.py @@ -19,10 +19,11 @@ 9. Simplify how chat completions "response_format" is set. Define "response_format" as a flat Union of strings and JsonSchemaFormat object, instead of using auto-generated base/derived classes named ChatCompletionsResponseFormatXxxInternal. -10. Allow UserMessage("my message") in addition to UserMessage(content="my message"). Same applies to +10. Allow UserMessage("my message") in addition to UserMessage(content="my message"). Same applies to AssistantMessage, SystemMessage, DeveloperMessage and ToolMessage. """ + import json import logging import sys @@ -73,7 +74,7 @@ def _get_internal_response_format( - response_format: Optional[Union[Literal["text", "json_object"], _models.JsonSchemaFormat]] + response_format: Optional[Union[Literal["text", "json_object"], _models.JsonSchemaFormat]], ) -> Optional[_models._models.ChatCompletionsResponseFormat]: """ Internal helper method to convert between the public response format type that's supported in the `complete` method, diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_operations/_patch.py b/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_operations/_patch.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_patch.py b/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_patch.py index 2f9873805aa6..8853bf5fa722 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_patch.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json import logging import sys diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/models/_patch.py b/sdk/ai/azure-ai-inference/azure/ai/inference/models/_patch.py index 1bc0679964d9..12a6972a2a4f 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/models/_patch.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import base64 import json import logging diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_parsers.py b/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_parsers.py index de3c570e5c89..19cd7f13f487 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_parsers.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_parsers.py @@ -11,7 +11,6 @@ from ._core import Prompty from ._invoker import Invoker, InvokerFactory - ROLES = ["assistant", "function", "system", "user"] diff --git a/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_utils.py b/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_utils.py index 22f284180ee1..48b963779f8c 100644 --- a/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_utils.py +++ b/sdk/ai/azure-ai-inference/azure/ai/inference/prompts/_utils.py @@ -11,7 +11,6 @@ from typing import Any, Dict from pathlib import Path - _yaml_regex = re.compile( r"^\s*" + r"(?:---|\+\+\+)" + r"(.*?)" + r"(?:---|\+\+\+)" + r"\s*(.+)$", re.S | re.M, diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_async.py index 32d687274ed2..95a6f5f892f2 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_async.py @@ -22,6 +22,7 @@ `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + import asyncio diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_bytes_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_bytes_async.py index e17744039051..aedb66c7ae13 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_bytes_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_bytes_async.py @@ -5,7 +5,7 @@ """ DESCRIPTION: This sample demonstrates how to get a chat completions response from - the service using an asynchronous client, and directly providing the + the service using an asynchronous client, and directly providing the IO[bytes] request body (containing input chat messages). This sample assumes the AI model is hosted on a Serverless API or @@ -17,12 +17,13 @@ python sample_chat_completions_from_input_bytes_async.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + # mypy: disable-error-code="union-attr" # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_dict_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_dict_async.py index b908cea2c5ae..f3bb4bcb12fe 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_dict_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_from_input_dict_async.py @@ -5,7 +5,7 @@ """ DESCRIPTION: This sample demonstrates how to get a chat completions response from - the service using an asynchronous client, and directly providing the + the service using an asynchronous client, and directly providing the JSON request body (containing input chat messages). This sample assumes the AI model is hosted on a Serverless API or @@ -17,12 +17,13 @@ python sample_chat_completions_from_input_dict_async.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + # mypy: disable-error-code="union-attr" # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_async.py index 0d762bb33659..77445e78efe1 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_async.py @@ -22,6 +22,7 @@ `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + import asyncio diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_azure_openai_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_azure_openai_async.py index 5035bc652d8d..6f804d86be6d 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_azure_openai_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_chat_completions_streaming_azure_openai_async.py @@ -26,6 +26,7 @@ 4. Run the sample: python sample_chat_completions_streaming_azure_openai_async.py """ + import asyncio diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_embeddings_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_embeddings_async.py index cfc9a4372222..1aa8c60e07ca 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_embeddings_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_embeddings_async.py @@ -21,6 +21,7 @@ `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_EMBEDDINGS_KEY - Your model key. Keep it secret. """ + import asyncio diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_image_embeddings_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_image_embeddings_async.py index 58278b3cf88b..b376f86e6117 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_image_embeddings_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_image_embeddings_async.py @@ -16,12 +16,13 @@ python sample_image_embeddings_async.py Set these two environment variables before running the sample: - 1) AZURE_AI_IMAGE_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_IMAGE_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_IMAGE_EMBEDDINGS_KEY - Your model key. Keep it secret. """ + import asyncio diff --git a/sdk/ai/azure-ai-inference/samples/async_samples/sample_load_client_async.py b/sdk/ai/azure-ai-inference/samples/async_samples/sample_load_client_async.py index 311837814607..ed25dca85ff5 100644 --- a/sdk/ai/azure-ai-inference/samples/async_samples/sample_load_client_async.py +++ b/sdk/ai/azure-ai-inference/samples/async_samples/sample_load_client_async.py @@ -14,12 +14,13 @@ python sample_load_client_async.py Set these two environment variables before running the sample: - 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_EMBEDDINGS_KEY - Your model key. Keep it secret. """ + import asyncio diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions.py index 11bae342b6df..c690353aebd3 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions.py @@ -16,7 +16,7 @@ python sample_chat_completions.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_bytes.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_bytes.py index 52b18cd8ecf9..c16278651386 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_bytes.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_bytes.py @@ -5,7 +5,7 @@ """ DESCRIPTION: This sample demonstrates how to get a chat completions response from - the service using a synchronous client, and directly providing the + the service using a synchronous client, and directly providing the IO[bytes] request body (containing input chat messages). This sample assumes the AI model is hosted on a Serverless API or @@ -17,12 +17,13 @@ python sample_chat_completions_from_input_bytes.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + # mypy: disable-error-code="union-attr" # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict.py index 0bbdea862ab3..bc995421ee81 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict.py @@ -19,12 +19,13 @@ python sample_chat_completions_from_input_dict.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + # mypy: disable-error-code="union-attr" # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict_with_image_url.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict_with_image_url.py index f1c44431c523..51b7c062d77e 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict_with_image_url.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_dict_with_image_url.py @@ -21,7 +21,7 @@ python sample_chat_completions_from_input_dict_with_image_url.py Set these two or three environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. @@ -29,6 +29,7 @@ 3) AZURE_AI_CHAT_DEPLOYMENT_NAME - Optional. The value for the HTTP request header `azureml-model-deployment`. """ + # mypy: disable-error-code="union-attr" # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompt_string.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompt_string.py index e1ee22f32a9c..039a7ca373a3 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompt_string.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompt_string.py @@ -17,12 +17,13 @@ python sample_chat_completions_from_input_prompt_string.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompty.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompty.py index 0e43465e5e4c..fe1dccef5d87 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompty.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_from_input_prompty.py @@ -17,12 +17,13 @@ python sample_chat_completions_from_input_prompty.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + # pyright: reportAttributeAccessIssue=false diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming.py index 12d71f6502a9..9d5a6b87115e 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming.py @@ -4,7 +4,7 @@ # ------------------------------------ """ DESCRIPTION: - This sample demonstrates how to get a chat completion streaming response + This sample demonstrates how to get a chat completion streaming response from the service using a synchronous client. This sample assumes the AI model is hosted on a Serverless API or diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_entra_id_auth.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_entra_id_auth.py index 8dab04df715f..386094044ca6 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_entra_id_auth.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_entra_id_auth.py @@ -7,7 +7,7 @@ This sample demonstrates how to do chat completions with streaming, using a synchronous client, with an Entra ID authentication. It also shows how to set the optional HTTP request header `azureml-model-deployment`, - which is supported when you deploy a model using "Managed Compute Endpoints". + which is supported when you deploy a model using "Managed Compute Endpoints". It can be used to target test deployment during staging, instead of the default production deployment. @@ -15,7 +15,7 @@ python sample_chat_completions_streaming_with_entra_id_auth.py Set one or two of these environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_tools.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_tools.py index a6042089946c..788e4f1aea66 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_tools.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_tools.py @@ -25,12 +25,13 @@ 2) AZURE_OPENAI_CHAT_KEY - Your model key. Keep it secret. For use_azure_openai_endpoint = False, set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. 2) AZURE_AI_CHAT_KEY - Your model key. Keep it secret. """ + import sys use_azure_openai_endpoint = True diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py index 949fb4a581c3..6ba8b5e95593 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_azure_monitor_tracing.py @@ -26,7 +26,6 @@ for detailed traces, including chat request and response messages. """ - import os from opentelemetry import trace from azure.ai.inference import ChatCompletionsClient @@ -34,7 +33,6 @@ from azure.core.credentials import AzureKeyCredential from azure.monitor.opentelemetry import configure_azure_monitor - # [START trace_function] from opentelemetry.trace import get_tracer diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_defaults.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_defaults.py index f26c37c21232..efc4673d79bf 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_defaults.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_defaults.py @@ -5,7 +5,7 @@ """ DESCRIPTION: This sample demonstrates how to get a chat completions response from - the service using a synchronous client. The sample also shows how to + the service using a synchronous client. The sample also shows how to set default chat completions configuration in the client constructor, which will be applied to all `complete` calls to the service. @@ -18,7 +18,7 @@ python sample_chat_completions_with_defaults.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_entra_id_auth.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_entra_id_auth.py index 5d4e39cf9d45..f948c4391fb1 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_entra_id_auth.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_entra_id_auth.py @@ -15,12 +15,12 @@ USAGE: Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL for model inference, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL for model inference, in the form "https://.services.ai.azure.com/models". This URL is shown in the model card page in your AI Foundry project: Click on "Models + endpoints" tab, then click on the relevant model name to open the model card page. Copy the URL up to and including the "/models" route. - + 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - Your model deployment name, as appears under the "Name" in the "Deployment info" section of the model card page. Note that this may be different than the "Model name" shown in the card. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_history.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_history.py index 6083dd8b9ba2..baa1cb9a2519 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_history.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_history.py @@ -17,7 +17,7 @@ python sample_chat_completions_with_history.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_data.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_data.py index 101dca42af85..cfce99e0e349 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_data.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_data.py @@ -20,7 +20,7 @@ python sample_chat_completions_with_image_data.py Set these two or three environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_url.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_url.py index 18c3925d0326..9906a9383a3d 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_url.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_image_url.py @@ -20,7 +20,7 @@ python sample_chat_completions_with_image_url.py Set these two or three environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_model_extras.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_model_extras.py index d3e067ec62ff..c70f6e58111c 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_model_extras.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_model_extras.py @@ -18,7 +18,7 @@ python sample_chat_completions_with_model_extras.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tools.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tools.py index dfe5fd048b51..7a059f5627de 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tools.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tools.py @@ -18,7 +18,7 @@ python sample_chat_completions_with_tools.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tracing.py b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tracing.py index 30e8214df2db..2fc876a3c1bc 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tracing.py +++ b/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tracing.py @@ -27,7 +27,6 @@ for detailed traces, including chat request and response messages. """ - import os from opentelemetry import trace diff --git a/sdk/ai/azure-ai-inference/samples/sample_embeddings.py b/sdk/ai/azure-ai-inference/samples/sample_embeddings.py index d36baff54cb0..170b380b6232 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_embeddings.py +++ b/sdk/ai/azure-ai-inference/samples/sample_embeddings.py @@ -17,7 +17,7 @@ python sample_embeddings.py Set these two environment variables before running the sample: - 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_embeddings_azure_openai.py b/sdk/ai/azure-ai-inference/samples/sample_embeddings_azure_openai.py index 923e6410565c..9ae353e30220 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_embeddings_azure_openai.py +++ b/sdk/ai/azure-ai-inference/samples/sample_embeddings_azure_openai.py @@ -16,7 +16,7 @@ See the "Data plane - inference" row in the table here for latest AOAI api-version: https://aka.ms/azsdk/azure-ai-inference/azure-openai-api-versions 3. Set one or two environment variables, depending on your authentication method: - * AZURE_OPENAI_EMBEDDINGS_ENDPOINT - Your AOAI endpoint URL, with partial path, in the form + * AZURE_OPENAI_EMBEDDINGS_ENDPOINT - Your AOAI endpoint URL, with partial path, in the form https://.openai.azure.com/openai/deployments/ where `your-unique-resource-name` is your globally unique AOAI resource name, and `your-deployment-name` is your AI Model deployment name. diff --git a/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_base64_encoding.py b/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_base64_encoding.py index c21e9a9f3e1c..1ff24cf5a47a 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_base64_encoding.py +++ b/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_base64_encoding.py @@ -17,7 +17,7 @@ python sample_embeddings_with_base64_encoding.py Set these two environment variables before running the sample: - 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_defaults.py b/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_defaults.py index 574ff9a99293..5e29e57b7cf9 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_defaults.py +++ b/sdk/ai/azure-ai-inference/samples/sample_embeddings_with_defaults.py @@ -18,7 +18,7 @@ python sample_embeddings_with_defaults.py Set these two environment variables before running the sample: - 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_get_model_info.py b/sdk/ai/azure-ai-inference/samples/sample_get_model_info.py index df470508f492..faf692bc312e 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_get_model_info.py +++ b/sdk/ai/azure-ai-inference/samples/sample_get_model_info.py @@ -15,7 +15,7 @@ python sample_get_model_info.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_image_embeddings.py b/sdk/ai/azure-ai-inference/samples/sample_image_embeddings.py index c8f2ec8bc666..ad5151c15daf 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_image_embeddings.py +++ b/sdk/ai/azure-ai-inference/samples/sample_image_embeddings.py @@ -16,7 +16,7 @@ python sample_image_embeddings.py Set these two environment variables before running the sample: - 1) AZURE_AI_IMAGE_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_IMAGE_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_image_embeddings_with_defaults.py b/sdk/ai/azure-ai-inference/samples/sample_image_embeddings_with_defaults.py index cd1d3b318b2e..a1930bc01a9c 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_image_embeddings_with_defaults.py +++ b/sdk/ai/azure-ai-inference/samples/sample_image_embeddings_with_defaults.py @@ -18,7 +18,7 @@ python sample_image_embeddings_with_defaults.py Set these two environment variables before running the sample: - 1) AZURE_AI_IMAGE_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_IMAGE_EMBEDDINGS_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/samples/sample_load_client.py b/sdk/ai/azure-ai-inference/samples/sample_load_client.py index 9c59436c1e70..e9c1b16baa92 100644 --- a/sdk/ai/azure-ai-inference/samples/sample_load_client.py +++ b/sdk/ai/azure-ai-inference/samples/sample_load_client.py @@ -15,7 +15,7 @@ python sample_load_client.py Set these two environment variables before running the sample: - 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form + 1) AZURE_AI_CHAT_ENDPOINT - Your endpoint URL, in the form https://..models.ai.azure.com where `your-deployment-name` is your unique AI Model deployment name, and `your-azure-region` is the Azure region where your model is deployed. diff --git a/sdk/ai/azure-ai-inference/setup.py b/sdk/ai/azure-ai-inference/setup.py index ce5768873831..c087845ee67b 100644 --- a/sdk/ai/azure-ai-inference/setup.py +++ b/sdk/ai/azure-ai-inference/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-inference" PACKAGE_PPRINT_NAME = "Azure AI Inference" diff --git a/sdk/ai/azure-ai-inference/tests/test_prompts_utils.py b/sdk/ai/azure-ai-inference/tests/test_prompts_utils.py index b0483cb6ae4a..c6bf5c6ea9d8 100644 --- a/sdk/ai/azure-ai-inference/tests/test_prompts_utils.py +++ b/sdk/ai/azure-ai-inference/tests/test_prompts_utils.py @@ -17,10 +17,7 @@ def test_success_by_remove_leading_empty_space(): Third line """ result = remove_leading_empty_space(prompt_str) - assert ( - result - == """First line + assert result == """First line Second line Third line""" - ) diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_patch.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_patch.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/_patch.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/_patch.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/operations/_patch.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/operations/_patch.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_patch.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_patch.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_patch.py b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_patch.py +++ b/sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/aks/azure-mgmt-devspaces/setup.py b/sdk/aks/azure-mgmt-devspaces/setup.py index c7461d1e97ac..2b07b199abae 100644 --- a/sdk/aks/azure-mgmt-devspaces/setup.py +++ b/sdk/aks/azure-mgmt-devspaces/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_patch.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_patch.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/_patch.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/_patch.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/operations/_patch.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/operations/_patch.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_patch.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_patch.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_patch.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_patch.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 5d5ea95810ad..b44c40ad6263 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Alerts Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/disable_test_cli_mgmt_alertsmanagement.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/disable_test_cli_mgmt_alertsmanagement.py index 3ffd9df07d4f..333774554be3 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/disable_test_cli_mgmt_alertsmanagement.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/disable_test_cli_mgmt_alertsmanagement.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,16 +21,15 @@ import azure.mgmt.alertsmanagement from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtAlertsTest(AzureMgmtTestCase): def setUp(self): super(MgmtAlertsTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.alertsmanagement.AlertsManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.alertsmanagement.AlertsManagementClient) + @unittest.skip("skip") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_alertsmanagement(self, resource_group): @@ -44,80 +43,54 @@ def test_alertsmanagement(self, resource_group): # /ActionRules/put/PutActionRule[put] BODY = { - "location": "Global", - "properties": { - "scope": { - "scope_type": "ResourceGroup", - "values": [ - "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP - ] - }, - "conditions": { - "severity": { - "operator": "Equals", - "values": [ - "Sev0", - "Sev2" - ] - }, - "monitor_service": { - "operator": "Equals", - "values": [ - "Platform", - "Application Insights" - ] - }, - "monitor_condition": { - "operator": "Equals", - "values": [ - "Fired" - ] - }, - "target_resource_type": { - "operator": "NotEquals", - "values": [ - "Microsoft.Compute/VirtualMachines" - ] - } - }, - "type": "Suppression", - "suppression_config": { - "recurrence_type": "Daily", - "schedule": { - "start_date": "12/09/2018", - "end_date": "12/18/2018", - "start_time": "06:00:00", - "end_time": "14:00:00" - } + "location": "Global", + "properties": { + "scope": { + "scope_type": "ResourceGroup", + "values": ["/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP], + }, + "conditions": { + "severity": {"operator": "Equals", "values": ["Sev0", "Sev2"]}, + "monitor_service": {"operator": "Equals", "values": ["Platform", "Application Insights"]}, + "monitor_condition": {"operator": "Equals", "values": ["Fired"]}, + "target_resource_type": {"operator": "NotEquals", "values": ["Microsoft.Compute/VirtualMachines"]}, + }, + "type": "Suppression", + "suppression_config": { + "recurrence_type": "Daily", + "schedule": { + "start_date": "12/09/2018", + "end_date": "12/18/2018", + "start_time": "06:00:00", + "end_time": "14:00:00", + }, + }, + "description": "Action rule on resource group for daily suppression", + "status": "Enabled", }, - "description": "Action rule on resource group for daily suppression", - "status": "Enabled" - } } - result = self.mgmt_client.action_rules.create_update(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME, action_rule=BODY) + result = self.mgmt_client.action_rules.create_update( + resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME, action_rule=BODY + ) # /SmartDetectorAlertRules/put/Create or update a Smart Detector alert rule[put] BODY = { - "description": "Sample smart detector alert rule description", - "state": "Enabled", - "severity": "Sev3", - "frequency": "PT5M", - "detector": { - "id": "VMMemoryLeak" - }, - "scope": [ - "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" - ], - "action_groups": { - "custom_email_subject": "My custom email subject", - "custom_webhook_payload": "{\"AlertRuleName\":\"#alertrulename\"}", - "group_ids": [ - "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" - ] - }, - "throttling": { - "duration": "PT20M" - } + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": {"id": "VMMemoryLeak"}, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "action_groups": { + "custom_email_subject": "My custom email subject", + "custom_webhook_payload": '{"AlertRuleName":"#alertrulename"}', + "group_ids": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" + ], + }, + "throttling": {"duration": "PT20M"}, } # result = self.mgmt_client.smart_detector_alert_rules.create_or_update(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME, parameters=BODY) @@ -125,7 +98,9 @@ def test_alertsmanagement(self, resource_group): # result = self.mgmt_client.smart_detector_alert_rules.get(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME) # /ActionRules/get/GetActionRuleById[get] - result = self.mgmt_client.action_rules.get_by_name(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME) + result = self.mgmt_client.action_rules.get_by_name( + resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME + ) # /SmartDetectorAlertRules/get/List alert rules[get] result = self.mgmt_client.smart_detector_alert_rules.list_by_resource_group(resource_group_name=RESOURCE_GROUP) @@ -161,44 +136,30 @@ def test_alertsmanagement(self, resource_group): # result = self.mgmt_client.alerts.meta_data(identifier="MonitorServiceList") # /SmartDetectorAlertRules/patch/Patch alert rules[patch] - BODY = { - "tags": { - "new_key": "newVal" - }, - "description": "New description for patching", - "frequency": "PT1M" - } + BODY = {"tags": {"new_key": "newVal"}, "description": "New description for patching", "frequency": "PT1M"} # result = self.mgmt_client.smart_detector_alert_rules.patch(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME, parameters=BODY) # /ActionRules/patch/PatchActionRule[patch] - BODY = { - "tags": { - "key1": "value1", - "key2": "value2" - }, - "status": "Disabled" - } + BODY = {"tags": {"key1": "value1", "key2": "value2"}, "status": "Disabled"} # result = self.mgmt_client.action_rules.update(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME, action_rule_patch=BODY) # /SmartGroups/post/changestate[post] - BODY = { - "comments": "Acknowledging smart group" - } + BODY = {"comments": "Acknowledging smart group"} # result = self.mgmt_client.smart_groups.change_state(smart_group_id=SMART_GROUP_ID, body=BODY, new_state="Acknowledged") # /Alerts/post/Resolve[post] - BODY = { - "comments": "Acknowledging alert" - } + BODY = {"comments": "Acknowledging alert"} # result = self.mgmt_client.alerts.change_state(alert_id=ALERT_ID, body=BODY, new_state="Acknowledged") # /SmartDetectorAlertRules/delete/Delete a Smart Detector alert rule[delete] # result = self.mgmt_client.smart_detector_alert_rules.delete(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME) # /ActionRules/delete/DeleteActionRule[delete] - result = self.mgmt_client.action_rules.delete(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME) + result = self.mgmt_client.action_rules.delete( + resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME + ) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_model_base.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_model_base.py index da265d2e0c19..0dc21a8d76b7 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_model_base.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_model_base.py @@ -308,12 +308,10 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: return default @typing.overload - def pop(self, key: str) -> typing.Any: - ... + def pop(self, key: str) -> typing.Any: ... @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: - ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: typing.Any, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -330,12 +328,10 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: self._data.update(*args, **kwargs) @typing.overload - def setdefault(self, key: str) -> typing.Any: - ... + def setdefault(self, key: str) -> typing.Any: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: - ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: typing.Any, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -514,7 +510,7 @@ def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Calla return _deserialize_with_callable(if_obj_deserializer, obj) return functools.partial(_deserialize_with_optional, if_obj_deserializer) - except (AttributeError): + except AttributeError: pass # is it a forward ref / in quotes? diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_operations/_patch.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_operations/_patch.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_patch.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_patch.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_operations/_patch.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_operations/_patch.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_patch.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_patch.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py index 4e5748ae57d2..d32468b87c3c 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_models.py @@ -55,8 +55,7 @@ def __init__( align_mode: Optional[Union[str, "_models.AlignMode"]] = None, fill_n_a_method: Optional[Union[str, "_models.FillNAMethod"]] = None, padding_value: Optional[float] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -105,8 +104,7 @@ def __init__( created_time: datetime.datetime, last_updated_time: datetime.datetime, model_info: Optional["_models.ModelInfo"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -148,8 +146,7 @@ def __init__( x_ms_error_code: Optional[str] = None, code: Optional[Union[str, "_models.AnomalyDetectorErrorCodes"]] = None, message: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -191,8 +188,7 @@ def __init__( variable: Optional[str] = None, contribution_score: Optional[float] = None, correlation_changes: Optional["_models.CorrelationChanges"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -233,8 +229,7 @@ def __init__( timestamp: datetime.datetime, value: Optional["_models.AnomalyValue"] = None, errors: Optional[List["_models.ErrorResponse"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -284,8 +279,7 @@ def __init__( severity: float, score: float, interpretation: Optional[List["_models.AnomalyInterpretation"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -315,8 +309,7 @@ def __init__( self, *, changed_variables: Optional[List[str]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -350,8 +343,7 @@ def __init__( *, model_state: Optional["_models.ModelState"] = None, variable_states: Optional[List["_models.VariableState"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -387,8 +379,7 @@ def __init__( *, code: str, message: str, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -483,8 +474,7 @@ def __init__( align_policy: Optional["_models.AlignPolicy"] = None, status: Optional[Union[str, "_models.ModelStatus"]] = None, diagnostics_info: Optional["_models.DiagnosticsInfo"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -565,8 +555,7 @@ def __init__( train_losses: Optional[List[float]] = None, validation_losses: Optional[List[float]] = None, latencies_in_seconds: Optional[List[float]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -629,8 +618,7 @@ def __init__( top_contributor_count: int, start_time: datetime.datetime, end_time: datetime.datetime, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -680,8 +668,7 @@ def __init__( setup_info: "_models.MultivariateBatchDetectionOptions", errors: Optional[List["_models.ErrorResponse"]] = None, variable_states: Optional[List["_models.VariableState"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -724,8 +711,7 @@ def __init__( *, summary: "_models.MultivariateBatchDetectionResultSummary", results: List["_models.AnomalyState"], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -768,8 +754,7 @@ def __init__( *, variables: List["_models.VariableValues"], top_contributor_count: int, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -803,8 +788,7 @@ def __init__( *, variable_states: Optional[List["_models.VariableState"]] = None, results: Optional[List["_models.AnomalyState"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -845,8 +829,7 @@ def __init__( code: str, message: str, x_ms_error_code: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -882,8 +865,7 @@ def __init__( *, value: float, timestamp: Optional[datetime.datetime] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -959,8 +941,7 @@ def __init__( period: Optional[int] = None, stable_trend_window: Optional[int] = None, threshold: Optional[float] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1007,8 +988,7 @@ def __init__( *, is_change_point: Optional[List[bool]] = None, confidence_scores: Optional[List[float]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1107,8 +1087,7 @@ def __init__( sensitivity: Optional[int] = None, impute_mode: Optional[Union[str, "_models.ImputeMode"]] = None, impute_fixed_value: Optional[float] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1219,8 +1198,7 @@ def __init__( is_negative_anomaly: List[bool], is_positive_anomaly: List[bool], severity: Optional[List[float]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1314,8 +1292,7 @@ def __init__( is_negative_anomaly: bool, is_positive_anomaly: bool, severity: Optional[float] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1364,8 +1341,7 @@ def __init__( effective_count: Optional[int] = None, first_timestamp: Optional[datetime.datetime] = None, last_timestamp: Optional[datetime.datetime] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1406,8 +1382,7 @@ def __init__( variable: str, timestamps: List[str], values: List[float], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_patch.py b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_patch.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_multivariate_detect.py b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_multivariate_detect.py index dd976af798ed..7b7e3ea3d6a5 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_multivariate_detect.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/samples/sample_multivariate_detect.py @@ -114,7 +114,10 @@ def batch_detect(self, model_id, body): r = self.ad_client.get_multivariate_batch_detection_result(result_id) print("Get detection result...(it may take a few seconds)") - while r.summary.status != MultivariateBatchDetectionStatus.READY and r.summary.status != MultivariateBatchDetectionStatus.FAILED: + while ( + r.summary.status != MultivariateBatchDetectionStatus.READY + and r.summary.status != MultivariateBatchDetectionStatus.FAILED + ): r = self.ad_client.get_multivariate_batch_detection_result(result_id) print("Detection is {}".format(r.summary.status)) time.sleep(15) diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/setup.py b/sdk/anomalydetector/azure-ai-anomalydetector/setup.py index db2dd994336f..a22453073ad2 100644 --- a/sdk/anomalydetector/azure-ai-anomalydetector/setup.py +++ b/sdk/anomalydetector/azure-ai-anomalydetector/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-anomalydetector" PACKAGE_PPRINT_NAME = "Cognitive Services Anomaly Detector" diff --git a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/_patch.py b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/_patch.py +++ b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/_patch.py b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/_patch.py +++ b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/operations/_patch.py b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/operations/_patch.py +++ b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/models/_patch.py b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/models/_patch.py +++ b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/operations/_patch.py b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/operations/_patch.py +++ b/sdk/apicenter/azure-mgmt-apicenter/azure/mgmt/apicenter/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apicenter/azure-mgmt-apicenter/setup.py b/sdk/apicenter/azure-mgmt-apicenter/setup.py index 67dfd68e990c..7842e275d4f7 100644 --- a/sdk/apicenter/azure-mgmt-apicenter/setup.py +++ b/sdk/apicenter/azure-mgmt-apicenter/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/setup.py b/sdk/apimanagement/azure-mgmt-apimanagement/setup.py index 6e06a94738de..d64de3f5676f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/setup.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/__init__.py index 962b4a502e4f..bb2222504ab2 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/__init__.py @@ -10,9 +10,10 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['ContainerAppsAPIClient'] +__all__ = ["ContainerAppsAPIClient"] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md from ._patch import patch_sdk + patch_sdk() diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py index 90b7231faf5c..3f8de5576a67 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py @@ -31,12 +31,7 @@ class ContainerAppsAPIClientConfiguration(Configuration): :type subscription_id: str """ - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -46,23 +41,24 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2022-01-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-app/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py index 714c5d778be9..4773246674c8 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py @@ -15,12 +15,24 @@ from . import models from ._configuration import ContainerAppsAPIClientConfiguration -from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, Operations +from .operations import ( + CertificatesOperations, + ContainerAppsAuthConfigsOperations, + ContainerAppsOperations, + ContainerAppsRevisionReplicasOperations, + ContainerAppsRevisionsOperations, + ContainerAppsSourceControlsOperations, + DaprComponentsOperations, + ManagedEnvironmentsOperations, + ManagedEnvironmentsStoragesOperations, + Operations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class ContainerAppsAPIClient: """ContainerAppsAPIClient. @@ -67,7 +79,9 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = ContainerAppsAPIClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = ContainerAppsAPIClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -75,16 +89,27 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize) - self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_apps_revisions = ContainerAppsRevisionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.managed_environments = ManagedEnvironmentsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_apps_source_controls = ContainerAppsSourceControlsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize) - self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize) - + self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.managed_environments_storages = ManagedEnvironmentsStoragesOperations( + self._client, self._config, self._serialize, self._deserialize + ) def _send_request( self, diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_patch.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_patch.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_vendor.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/_vendor.py index 138f663c53a4..9aad73fc743e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_vendor.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -14,6 +15,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -21,7 +23,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/__init__.py index cb4bbcce8e12..eb1f8bc06387 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/__init__.py @@ -7,9 +7,11 @@ # -------------------------------------------------------------------------- from ._container_apps_api_client import ContainerAppsAPIClient -__all__ = ['ContainerAppsAPIClient'] + +__all__ = ["ContainerAppsAPIClient"] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md from ._patch import patch_sdk + patch_sdk() diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py index ed19909a70d5..d6932c54ac2b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py @@ -31,12 +31,7 @@ class ContainerAppsAPIClientConfiguration(Configuration): :type subscription_id: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -46,22 +41,21 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2022-01-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-app/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py index f49b67610af1..c896e3a977af 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py @@ -15,12 +15,24 @@ from .. import models from ._configuration import ContainerAppsAPIClientConfiguration -from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, Operations +from .operations import ( + CertificatesOperations, + ContainerAppsAuthConfigsOperations, + ContainerAppsOperations, + ContainerAppsRevisionReplicasOperations, + ContainerAppsRevisionsOperations, + ContainerAppsSourceControlsOperations, + DaprComponentsOperations, + ManagedEnvironmentsOperations, + ManagedEnvironmentsStoragesOperations, + Operations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class ContainerAppsAPIClient: """ContainerAppsAPIClient. @@ -67,7 +79,9 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = ContainerAppsAPIClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = ContainerAppsAPIClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -75,22 +89,29 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize) - self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_apps_revisions = ContainerAppsRevisionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.managed_environments = ManagedEnvironmentsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_apps_source_controls = ContainerAppsSourceControlsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize) - self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.managed_environments_storages = ManagedEnvironmentsStoragesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_patch.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_patch.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py index 021cee48b4be..f53362a484fb 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py @@ -18,14 +18,14 @@ from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations __all__ = [ - 'ContainerAppsOperations', - 'ContainerAppsRevisionsOperations', - 'ContainerAppsRevisionReplicasOperations', - 'ManagedEnvironmentsOperations', - 'CertificatesOperations', - 'Operations', - 'ContainerAppsSourceControlsOperations', - 'DaprComponentsOperations', - 'ContainerAppsAuthConfigsOperations', - 'ManagedEnvironmentsStoragesOperations', + "ContainerAppsOperations", + "ContainerAppsRevisionsOperations", + "ContainerAppsRevisionReplicasOperations", + "ManagedEnvironmentsOperations", + "CertificatesOperations", + "Operations", + "ContainerAppsSourceControlsOperations", + "DaprComponentsOperations", + "ContainerAppsAuthConfigsOperations", + "ManagedEnvironmentsStoragesOperations", ] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py index b261b386cb07..ff40e8a8e8ff 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -20,10 +26,18 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._certificates_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request, build_update_request -T = TypeVar('T') +from ...operations._certificates_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_request, + build_update_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class CertificatesOperations: """CertificatesOperations async operations. @@ -48,10 +62,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace def list( - self, - resource_group_name: str, - managed_environment_name: str, - **kwargs: Any + self, resource_group_name: str, managed_environment_name: str, **kwargs: Any ) -> AsyncIterable["_models.CertificateCollection"]: """Get the Certificates in a given managed environment. @@ -68,25 +79,24 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CertificateCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, managed_environment_name=managed_environment_name, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -118,19 +128,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates'} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - managed_environment_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, managed_environment_name: str, name: str, **kwargs: Any ) -> "_models.Certificate": """Get the specified Certificate. @@ -147,19 +151,16 @@ async def get( :rtype: ~container_apps_api_client.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Certificate"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, managed_environment_name=managed_environment_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -172,15 +173,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Certificate', pipeline_response) + deserialized = self._deserialize("Certificate", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore @distributed_trace_async async def create_or_update( @@ -208,16 +208,14 @@ async def create_or_update( :rtype: ~container_apps_api_client.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Certificate"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if certificate_envelope is not None: - _json = self._serialize.body(certificate_envelope, 'Certificate') + _json = self._serialize.body(certificate_envelope, "Certificate") else: _json = None @@ -228,7 +226,7 @@ async def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -241,24 +239,17 @@ async def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Certificate', pipeline_response) + deserialized = self._deserialize("Certificate", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( - self, - resource_group_name: str, - managed_environment_name: str, - name: str, - **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, managed_environment_name: str, name: str, **kwargs: Any) -> None: """Deletes the specified Certificate. Deletes the specified Certificate. @@ -274,19 +265,16 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, managed_environment_name=managed_environment_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -302,8 +290,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore @distributed_trace_async async def update( @@ -331,15 +318,13 @@ async def update( :rtype: ~container_apps_api_client.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Certificate"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(certificate_envelope, 'CertificatePatch') + _json = self._serialize.body(certificate_envelope, "CertificatePatch") request = build_update_request( subscription_id=self._config.subscription_id, @@ -348,7 +333,7 @@ async def update( name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -361,12 +346,11 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Certificate', pipeline_response) + deserialized = self._deserialize("Certificate", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py index e8fdce3d7522..c59661f8f096 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -20,10 +26,17 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._container_apps_auth_configs_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_by_container_app_request -T = TypeVar('T') +from ...operations._container_apps_auth_configs_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_container_app_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ContainerAppsAuthConfigsOperations: """ContainerAppsAuthConfigsOperations async operations. @@ -48,10 +61,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace def list_by_container_app( - self, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> AsyncIterable["_models.AuthConfigCollection"]: """Get the Container App AuthConfigs in a given resource group. @@ -68,25 +78,24 @@ def list_by_container_app( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.AuthConfigCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfigCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AuthConfigCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - template_url=self.list_by_container_app.metadata['url'], + template_url=self.list_by_container_app.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -118,19 +127,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_container_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs'} # type: ignore + list_by_container_app.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> "_models.AuthConfig": """Get a AuthConfig of a Container App. @@ -147,19 +150,16 @@ async def get( :rtype: ~container_apps_api_client.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AuthConfig"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -172,15 +172,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AuthConfig', pipeline_response) + deserialized = self._deserialize("AuthConfig", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}"} # type: ignore @distributed_trace_async async def create_or_update( @@ -208,15 +207,13 @@ async def create_or_update( :rtype: ~container_apps_api_client.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AuthConfig"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(auth_config_envelope, 'AuthConfig') + _json = self._serialize.body(auth_config_envelope, "AuthConfig") request = build_create_or_update_request( subscription_id=self._config.subscription_id, @@ -225,7 +222,7 @@ async def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -238,24 +235,17 @@ async def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AuthConfig', pipeline_response) + deserialized = self._deserialize("AuthConfig", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}"} # type: ignore @distributed_trace_async - async def delete( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> None: """Delete a Container App AuthConfig. Description for Delete a Container App AuthConfig. @@ -271,19 +261,16 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -299,5 +286,4 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py index abea0c93db47..5d224aa34a03 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -22,10 +28,21 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._container_apps_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_custom_host_name_analysis_request, build_list_secrets_request, build_update_request -T = TypeVar('T') +from ...operations._container_apps_operations import ( + build_create_or_update_request_initial, + build_delete_request_initial, + build_get_request, + build_list_by_resource_group_request, + build_list_by_subscription_request, + build_list_custom_host_name_analysis_request, + build_list_secrets_request, + build_update_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ContainerAppsOperations: """ContainerAppsOperations async operations. @@ -49,10 +66,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace - def list_by_subscription( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ContainerAppCollection"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ContainerAppCollection"]: """Get the Container Apps in a given subscription. Get the Container Apps in a given subscription. @@ -64,23 +78,22 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerAppCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, - template_url=self.list_by_subscription.metadata['url'], + template_url=self.list_by_subscription.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, template_url=next_link, @@ -110,17 +123,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps'} # type: ignore + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any + self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.ContainerAppCollection"]: """Get the Container Apps in a given resource group. @@ -135,24 +144,23 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerAppCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -183,19 +191,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps'} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"} # type: ignore @distributed_trace_async - async def get( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> "_models.ContainerApp": + async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> "_models.ContainerApp": """Get the properties of a Container App. Get the properties of a Container App. @@ -209,18 +210,15 @@ async def get( :rtype: ~container_apps_api_client.models.ContainerApp :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -233,32 +231,25 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore async def _create_or_update_initial( - self, - resource_group_name: str, - name: str, - container_app_envelope: "_models.ContainerApp", - **kwargs: Any + self, resource_group_name: str, name: str, container_app_envelope: "_models.ContainerApp", **kwargs: Any ) -> "_models.ContainerApp": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(container_app_envelope, 'ContainerApp') + _json = self._serialize.body(container_app_envelope, "ContainerApp") request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, @@ -266,7 +257,7 @@ async def _create_or_update_initial( name=name, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -279,26 +270,21 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace_async async def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: "_models.ContainerApp", - **kwargs: Any + self, resource_group_name: str, name: str, container_app_envelope: "_models.ContainerApp", **kwargs: Any ) -> AsyncLROPoller["_models.ContainerApp"]: """Create or update a Container App. @@ -323,66 +309,57 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~container_apps_api_client.models.ContainerApp] :raises: ~azure.core.exceptions.HttpResponseError """ - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, name=name, container_app_envelope=container_app_envelope, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore + + async def _delete_initial(self, resource_group_name: str, name: str, **kwargs: Any) -> None: + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -397,16 +374,10 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_delete(self, resource_group_name: str, name: str, **kwargs: Any) -> AsyncLROPoller[None]: """Delete a Container App. Description for Delete a Container App. @@ -427,49 +398,41 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - name=name, - cls=lambda x,y,z: x, - **kwargs + resource_group_name=resource_group_name, name=name, cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace_async async def update( - self, - resource_group_name: str, - name: str, - container_app_envelope: "_models.ContainerAppPatch", - **kwargs: Any + self, resource_group_name: str, name: str, container_app_envelope: "_models.ContainerAppPatch", **kwargs: Any ) -> "_models.ContainerApp": """Update properties of a Container App. @@ -486,15 +449,13 @@ async def update( :rtype: ~container_apps_api_client.models.ContainerApp :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(container_app_envelope, 'ContainerAppPatch') + _json = self._serialize.body(container_app_envelope, "ContainerAppPatch") request = build_update_request( subscription_id=self._config.subscription_id, @@ -502,7 +463,7 @@ async def update( name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -515,23 +476,18 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace_async async def list_custom_host_name_analysis( - self, - resource_group_name: str, - container_app_name: str, - custom_hostname: Optional[str] = None, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, custom_hostname: Optional[str] = None, **kwargs: Any ) -> "_models.CustomHostnameAnalysisResult": """Analyzes a custom hostname for a Container App. @@ -548,19 +504,16 @@ async def list_custom_host_name_analysis( :rtype: ~container_apps_api_client.models.CustomHostnameAnalysisResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CustomHostnameAnalysisResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_custom_host_name_analysis_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, custom_hostname=custom_hostname, - template_url=self.list_custom_host_name_analysis.metadata['url'], + template_url=self.list_custom_host_name_analysis.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -573,23 +526,17 @@ async def list_custom_host_name_analysis( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) + deserialized = self._deserialize("CustomHostnameAnalysisResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_custom_host_name_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis'} # type: ignore - + list_custom_host_name_analysis.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis"} # type: ignore @distributed_trace_async - async def list_secrets( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> "_models.SecretsCollection": + async def list_secrets(self, resource_group_name: str, name: str, **kwargs: Any) -> "_models.SecretsCollection": """List secrets for a container app. List secrets for a container app. @@ -603,18 +550,15 @@ async def list_secrets( :rtype: ~container_apps_api_client.models.SecretsCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SecretsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_secrets_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self.list_secrets.metadata['url'], + template_url=self.list_secrets.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -627,12 +571,11 @@ async def list_secrets( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecretsCollection', pipeline_response) + deserialized = self._deserialize("SecretsCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets'} # type: ignore - + list_secrets.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py index 7b64ea72d645..9eb2a406c42b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -18,10 +24,15 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._container_apps_revision_replicas_operations import build_get_replica_request, build_list_replicas_request -T = TypeVar('T') +from ...operations._container_apps_revision_replicas_operations import ( + build_get_replica_request, + build_list_replicas_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ContainerAppsRevisionReplicasOperations: """ContainerAppsRevisionReplicasOperations async operations. @@ -46,12 +57,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace_async async def get_replica( - self, - resource_group_name: str, - container_app_name: str, - revision_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, revision_name: str, name: str, **kwargs: Any ) -> "_models.Replica": """Get a replica for a Container App Revision. @@ -70,20 +76,17 @@ async def get_replica( :rtype: ~container_apps_api_client.models.Replica :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Replica"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Replica"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_replica_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, revision_name=revision_name, name=name, - template_url=self.get_replica.metadata['url'], + template_url=self.get_replica.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -96,23 +99,18 @@ async def get_replica( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Replica', pipeline_response) + deserialized = self._deserialize("Replica", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_replica.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}'} # type: ignore - + get_replica.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}"} # type: ignore @distributed_trace_async async def list_replicas( - self, - resource_group_name: str, - container_app_name: str, - revision_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, revision_name: str, **kwargs: Any ) -> "_models.ReplicaCollection": """List replicas for a Container App Revision. @@ -129,19 +127,16 @@ async def list_replicas( :rtype: ~container_apps_api_client.models.ReplicaCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ReplicaCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_replicas_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, revision_name=revision_name, - template_url=self.list_replicas.metadata['url'], + template_url=self.list_replicas.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -154,12 +149,11 @@ async def list_replicas( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ReplicaCollection', pipeline_response) + deserialized = self._deserialize("ReplicaCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_replicas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas'} # type: ignore - + list_replicas.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py index 5cd9f2e3fd2d..a64f67d1e0e7 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -20,10 +26,18 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._container_apps_revisions_operations import build_activate_revision_request, build_deactivate_revision_request, build_get_revision_request, build_list_revisions_request, build_restart_revision_request -T = TypeVar('T') +from ...operations._container_apps_revisions_operations import ( + build_activate_revision_request, + build_deactivate_revision_request, + build_get_revision_request, + build_list_revisions_request, + build_restart_revision_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ContainerAppsRevisionsOperations: """ContainerAppsRevisionsOperations async operations. @@ -48,10 +62,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace def list_revisions( - self, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> AsyncIterable["_models.RevisionCollection"]: """Get the Revisions for a given Container App. @@ -67,25 +78,24 @@ def list_revisions( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.RevisionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RevisionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RevisionCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_revisions_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - template_url=self.list_revisions.metadata['url'], + template_url=self.list_revisions.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_revisions_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -117,19 +127,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_revisions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions'} # type: ignore + list_revisions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions"} # type: ignore @distributed_trace_async async def get_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> "_models.Revision": """Get a revision of a Container App. @@ -146,19 +150,16 @@ async def get_revision( :rtype: ~container_apps_api_client.models.Revision :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Revision"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Revision"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.get_revision.metadata['url'], + template_url=self.get_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -171,23 +172,18 @@ async def get_revision( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Revision', pipeline_response) + deserialized = self._deserialize("Revision", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}'} # type: ignore - + get_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}"} # type: ignore @distributed_trace_async async def activate_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> None: """Activates a revision for a Container App. @@ -204,19 +200,16 @@ async def activate_revision( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_activate_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.activate_revision.metadata['url'], + template_url=self.activate_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -232,16 +225,11 @@ async def activate_revision( if cls: return cls(pipeline_response, None, {}) - activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate'} # type: ignore - + activate_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate"} # type: ignore @distributed_trace_async async def deactivate_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> None: """Deactivates a revision for a Container App. @@ -258,19 +246,16 @@ async def deactivate_revision( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_deactivate_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.deactivate_revision.metadata['url'], + template_url=self.deactivate_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -286,16 +271,11 @@ async def deactivate_revision( if cls: return cls(pipeline_response, None, {}) - deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate'} # type: ignore - + deactivate_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate"} # type: ignore @distributed_trace_async async def restart_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> None: """Restarts a revision for a Container App. @@ -312,19 +292,16 @@ async def restart_revision( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_restart_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.restart_revision.metadata['url'], + template_url=self.restart_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -340,5 +317,4 @@ async def restart_revision( if cls: return cls(pipeline_response, None, {}) - restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart'} # type: ignore - + restart_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py index f3b24eef4db3..96d06ef8afa5 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -22,10 +28,17 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._container_apps_source_controls_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_container_app_request -T = TypeVar('T') +from ...operations._container_apps_source_controls_operations import ( + build_create_or_update_request_initial, + build_delete_request_initial, + build_get_request, + build_list_by_container_app_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ContainerAppsSourceControlsOperations: """ContainerAppsSourceControlsOperations async operations. @@ -50,10 +63,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace def list_by_container_app( - self, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> AsyncIterable["_models.SourceControlCollection"]: """Get the Container App SourceControls in a given resource group. @@ -70,25 +80,24 @@ def list_by_container_app( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControlCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - template_url=self.list_by_container_app.metadata['url'], + template_url=self.list_by_container_app.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -120,19 +129,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_container_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols'} # type: ignore + list_by_container_app.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> "_models.SourceControl": """Get a SourceControl of a Container App. @@ -149,19 +152,16 @@ async def get( :rtype: ~container_apps_api_client.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControl"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -174,15 +174,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore async def _create_or_update_initial( self, @@ -192,15 +191,13 @@ async def _create_or_update_initial( source_control_envelope: "_models.SourceControl", **kwargs: Any ) -> "_models.SourceControl": - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControl"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(source_control_envelope, 'SourceControl') + _json = self._serialize.body(source_control_envelope, "SourceControl") request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, @@ -209,7 +206,7 @@ async def _create_or_update_initial( name=name, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -222,18 +219,17 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if response.status_code == 202: - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore @distributed_trace_async async def begin_create_or_update( @@ -269,14 +265,11 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~container_apps_api_client.models.SourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControl"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, @@ -284,54 +277,49 @@ async def begin_create_or_update( name=name, source_control_envelope=source_control_envelope, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore async def _delete_initial( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -346,16 +334,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore @distributed_trace_async async def begin_delete( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a Container App SourceControl. @@ -379,39 +362,38 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py index fa4d365e7441..5fec9ba79043 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -20,10 +26,17 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._dapr_components_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') +from ...operations._dapr_components_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class DaprComponentsOperations: """DaprComponentsOperations async operations. @@ -48,10 +61,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace def list( - self, - resource_group_name: str, - environment_name: str, - **kwargs: Any + self, resource_group_name: str, environment_name: str, **kwargs: Any ) -> AsyncIterable["_models.DaprComponentsCollection"]: """Get the Dapr Components for a managed environment. @@ -68,25 +78,24 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.DaprComponentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponentsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.DaprComponentsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -118,19 +127,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents'} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - environment_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any ) -> "_models.DaprComponent": """Get a dapr component. @@ -147,19 +150,16 @@ async def get( :rtype: ~container_apps_api_client.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.DaprComponent"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -172,15 +172,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('DaprComponent', pipeline_response) + deserialized = self._deserialize("DaprComponent", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}"} # type: ignore @distributed_trace_async async def create_or_update( @@ -208,15 +207,13 @@ async def create_or_update( :rtype: ~container_apps_api_client.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.DaprComponent"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(dapr_component_envelope, 'DaprComponent') + _json = self._serialize.body(dapr_component_envelope, "DaprComponent") request = build_create_or_update_request( subscription_id=self._config.subscription_id, @@ -225,7 +222,7 @@ async def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -238,24 +235,17 @@ async def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('DaprComponent', pipeline_response) + deserialized = self._deserialize("DaprComponent", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}"} # type: ignore @distributed_trace_async - async def delete( - self, - resource_group_name: str, - environment_name: str, - name: str, - **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any) -> None: """Delete a Dapr Component. Delete a Dapr Component from a Managed Environment. @@ -271,19 +261,16 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -299,5 +286,4 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py index a7cc217cfe3f..7bf58f902e0e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -22,10 +28,19 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._managed_environments_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_update_request -T = TypeVar('T') +from ...operations._managed_environments_operations import ( + build_create_or_update_request_initial, + build_delete_request_initial, + build_get_request, + build_list_by_resource_group_request, + build_list_by_subscription_request, + build_update_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ManagedEnvironmentsOperations: """ManagedEnvironmentsOperations async operations. @@ -49,10 +64,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace - def list_by_subscription( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ManagedEnvironmentsCollection"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ManagedEnvironmentsCollection"]: """Get all Environments for a subscription. Get all Managed Environments for a subscription. @@ -64,23 +76,22 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, - template_url=self.list_by_subscription.metadata['url'], + template_url=self.list_by_subscription.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, template_url=next_link, @@ -110,17 +121,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments'} # type: ignore + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any + self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.ManagedEnvironmentsCollection"]: """Get all the Environments in a resource group. @@ -135,24 +142,23 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -183,19 +189,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments'} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments"} # type: ignore @distributed_trace_async - async def get( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> "_models.ManagedEnvironment": + async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> "_models.ManagedEnvironment": """Get the properties of a Managed Environment. Get the properties of a Managed Environment used to host container apps. @@ -209,18 +208,15 @@ async def get( :rtype: ~container_apps_api_client.models.ManagedEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -233,32 +229,25 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore async def _create_or_update_initial( - self, - resource_group_name: str, - name: str, - environment_envelope: "_models.ManagedEnvironment", - **kwargs: Any + self, resource_group_name: str, name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> "_models.ManagedEnvironment": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(environment_envelope, 'ManagedEnvironment') + _json = self._serialize.body(environment_envelope, "ManagedEnvironment") request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, @@ -266,7 +255,7 @@ async def _create_or_update_initial( name=name, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -279,26 +268,21 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore @distributed_trace_async async def begin_create_or_update( - self, - resource_group_name: str, - name: str, - environment_envelope: "_models.ManagedEnvironment", - **kwargs: Any + self, resource_group_name: str, name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> AsyncLROPoller["_models.ManagedEnvironment"]: """Creates or updates a Managed Environment. @@ -324,66 +308,57 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~container_apps_api_client.models.ManagedEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, name=name, environment_envelope=environment_envelope, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore + + async def _delete_initial(self, resource_group_name: str, name: str, **kwargs: Any) -> None: + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - async def _delete_initial( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -398,16 +373,10 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_delete(self, resource_group_name: str, name: str, **kwargs: Any) -> AsyncLROPoller[None]: """Delete a Managed Environment. Delete a Managed Environment if it does not have any container apps. @@ -428,41 +397,37 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - name=name, - cls=lambda x,y,z: x, - **kwargs + resource_group_name=resource_group_name, name=name, cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -487,15 +452,13 @@ async def update( :rtype: ~container_apps_api_client.models.ManagedEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(environment_envelope, 'ManagedEnvironmentPatch') + _json = self._serialize.body(environment_envelope, "ManagedEnvironmentPatch") request = build_update_request( subscription_id=self._config.subscription_id, @@ -503,7 +466,7 @@ async def update( name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -516,12 +479,11 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py index a9db1bf2ac83..6354a6674c9d 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -18,10 +24,17 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._managed_environments_storages_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') +from ...operations._managed_environments_storages_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ManagedEnvironmentsStoragesOperations: """ManagedEnvironmentsStoragesOperations async operations. @@ -46,10 +59,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace_async async def list( - self, - resource_group_name: str, - env_name: str, - **kwargs: Any + self, resource_group_name: str, env_name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStoragesCollection": """Get all storages for a managedEnvironment. @@ -64,18 +74,15 @@ async def list( :rtype: ~container_apps_api_client.models.ManagedEnvironmentStoragesCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStoragesCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentStoragesCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, env_name=env_name, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -88,23 +95,18 @@ async def list( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironmentStoragesCollection', pipeline_response) + deserialized = self._deserialize("ManagedEnvironmentStoragesCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages'} # type: ignore - + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages"} # type: ignore @distributed_trace_async async def get( - self, - resource_group_name: str, - env_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, env_name: str, name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStorage": """Get storage for a managedEnvironment. @@ -121,19 +123,16 @@ async def get( :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentStorage"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, env_name=env_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -146,15 +145,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironmentStorage', pipeline_response) + deserialized = self._deserialize("ManagedEnvironmentStorage", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}"} # type: ignore @distributed_trace_async async def create_or_update( @@ -182,15 +180,13 @@ async def create_or_update( :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentStorage"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(storage_envelope, 'ManagedEnvironmentStorage') + _json = self._serialize.body(storage_envelope, "ManagedEnvironmentStorage") request = build_create_or_update_request( subscription_id=self._config.subscription_id, @@ -199,7 +195,7 @@ async def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -212,24 +208,17 @@ async def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironmentStorage', pipeline_response) + deserialized = self._deserialize("ManagedEnvironmentStorage", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}"} # type: ignore @distributed_trace_async - async def delete( - self, - resource_group_name: str, - env_name: str, - name: str, - **kwargs: Any - ) -> None: + async def delete(self, resource_group_name: str, env_name: str, name: str, **kwargs: Any) -> None: """Delete storage for a managedEnvironment. Delete storage for a managedEnvironment. @@ -245,19 +234,16 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, env_name=env_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -273,5 +259,4 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py index 7280e090ac90..9def70b4953e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py @@ -10,7 +10,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -21,9 +27,11 @@ from ... import models as _models from ..._vendor import _convert_request from ...operations._operations import build_list_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class Operations: """Operations async operations. @@ -47,10 +55,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.AvailableOperations"]: + def list(self, **kwargs: Any) -> AsyncIterable["_models.AvailableOperations"]: """Lists all of the available RP operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -59,22 +64,21 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.AvailableOperations] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AvailableOperations"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_request( template_url=next_link, ) @@ -103,8 +107,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.App/operations'} # type: ignore + list.metadata = {"url": "/providers/Microsoft.App/operations"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py index 97ddbb90753e..9d6e04585992 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py @@ -136,128 +136,128 @@ ) __all__ = [ - 'AllowedAudiencesValidation', - 'AllowedPrincipals', - 'AppLogsConfiguration', - 'AppRegistration', - 'Apple', - 'AppleRegistration', - 'AuthConfig', - 'AuthConfigCollection', - 'AuthPlatform', - 'AvailableOperations', - 'AzureActiveDirectory', - 'AzureActiveDirectoryLogin', - 'AzureActiveDirectoryRegistration', - 'AzureActiveDirectoryValidation', - 'AzureCredentials', - 'AzureFileProperties', - 'AzureStaticWebApps', - 'AzureStaticWebAppsRegistration', - 'Certificate', - 'CertificateCollection', - 'CertificatePatch', - 'CertificateProperties', - 'ClientRegistration', - 'Configuration', - 'Container', - 'ContainerApp', - 'ContainerAppCollection', - 'ContainerAppPatch', - 'ContainerAppProbe', - 'ContainerAppProbeHttpGet', - 'ContainerAppProbeHttpGetHttpHeadersItem', - 'ContainerAppProbeTcpSocket', - 'ContainerAppSecret', - 'ContainerResources', - 'CookieExpiration', - 'CustomDomain', - 'CustomHostnameAnalysisResult', - 'CustomOpenIdConnectProvider', - 'CustomScaleRule', - 'Dapr', - 'DaprComponent', - 'DaprComponentsCollection', - 'DaprMetadata', - 'DefaultAuthorizationPolicy', - 'DefaultErrorResponse', - 'DefaultErrorResponseError', - 'DefaultErrorResponseErrorDetailsItem', - 'EnvironmentVar', - 'Facebook', - 'ForwardProxy', - 'GitHub', - 'GithubActionConfiguration', - 'GlobalValidation', - 'Google', - 'HttpScaleRule', - 'HttpSettings', - 'HttpSettingsRoutes', - 'IdentityProviders', - 'Ingress', - 'JwtClaimChecks', - 'LogAnalyticsConfiguration', - 'Login', - 'LoginRoutes', - 'LoginScopes', - 'ManagedEnvironment', - 'ManagedEnvironmentPatch', - 'ManagedEnvironmentStorage', - 'ManagedEnvironmentStorageProperties', - 'ManagedEnvironmentStoragesCollection', - 'ManagedEnvironmentsCollection', - 'ManagedServiceIdentity', - 'Nonce', - 'OpenIdConnectClientCredential', - 'OpenIdConnectConfig', - 'OpenIdConnectLogin', - 'OpenIdConnectRegistration', - 'OperationDetail', - 'OperationDisplay', - 'ProxyResource', - 'QueueScaleRule', - 'RegistryCredentials', - 'RegistryInfo', - 'Replica', - 'ReplicaCollection', - 'ReplicaContainer', - 'Resource', - 'Revision', - 'RevisionCollection', - 'Scale', - 'ScaleRule', - 'ScaleRuleAuth', - 'Secret', - 'SecretsCollection', - 'SourceControl', - 'SourceControlCollection', - 'SystemData', - 'Template', - 'TrackedResource', - 'TrafficWeight', - 'Twitter', - 'TwitterRegistration', - 'UserAssignedIdentity', - 'VnetConfiguration', - 'Volume', - 'VolumeMount', - 'AccessMode', - 'ActiveRevisionsMode', - 'AppProtocol', - 'BindingType', - 'CertificateProvisioningState', - 'ContainerAppProvisioningState', - 'CookieExpirationConvention', - 'CreatedByType', - 'DnsVerificationTestResult', - 'EnvironmentProvisioningState', - 'ForwardProxyConvention', - 'IngressTransportMethod', - 'ManagedServiceIdentityType', - 'RevisionHealthState', - 'RevisionProvisioningState', - 'SourceControlOperationState', - 'StorageType', - 'Type', - 'UnauthenticatedClientActionV2', + "AllowedAudiencesValidation", + "AllowedPrincipals", + "AppLogsConfiguration", + "AppRegistration", + "Apple", + "AppleRegistration", + "AuthConfig", + "AuthConfigCollection", + "AuthPlatform", + "AvailableOperations", + "AzureActiveDirectory", + "AzureActiveDirectoryLogin", + "AzureActiveDirectoryRegistration", + "AzureActiveDirectoryValidation", + "AzureCredentials", + "AzureFileProperties", + "AzureStaticWebApps", + "AzureStaticWebAppsRegistration", + "Certificate", + "CertificateCollection", + "CertificatePatch", + "CertificateProperties", + "ClientRegistration", + "Configuration", + "Container", + "ContainerApp", + "ContainerAppCollection", + "ContainerAppPatch", + "ContainerAppProbe", + "ContainerAppProbeHttpGet", + "ContainerAppProbeHttpGetHttpHeadersItem", + "ContainerAppProbeTcpSocket", + "ContainerAppSecret", + "ContainerResources", + "CookieExpiration", + "CustomDomain", + "CustomHostnameAnalysisResult", + "CustomOpenIdConnectProvider", + "CustomScaleRule", + "Dapr", + "DaprComponent", + "DaprComponentsCollection", + "DaprMetadata", + "DefaultAuthorizationPolicy", + "DefaultErrorResponse", + "DefaultErrorResponseError", + "DefaultErrorResponseErrorDetailsItem", + "EnvironmentVar", + "Facebook", + "ForwardProxy", + "GitHub", + "GithubActionConfiguration", + "GlobalValidation", + "Google", + "HttpScaleRule", + "HttpSettings", + "HttpSettingsRoutes", + "IdentityProviders", + "Ingress", + "JwtClaimChecks", + "LogAnalyticsConfiguration", + "Login", + "LoginRoutes", + "LoginScopes", + "ManagedEnvironment", + "ManagedEnvironmentPatch", + "ManagedEnvironmentStorage", + "ManagedEnvironmentStorageProperties", + "ManagedEnvironmentStoragesCollection", + "ManagedEnvironmentsCollection", + "ManagedServiceIdentity", + "Nonce", + "OpenIdConnectClientCredential", + "OpenIdConnectConfig", + "OpenIdConnectLogin", + "OpenIdConnectRegistration", + "OperationDetail", + "OperationDisplay", + "ProxyResource", + "QueueScaleRule", + "RegistryCredentials", + "RegistryInfo", + "Replica", + "ReplicaCollection", + "ReplicaContainer", + "Resource", + "Revision", + "RevisionCollection", + "Scale", + "ScaleRule", + "ScaleRuleAuth", + "Secret", + "SecretsCollection", + "SourceControl", + "SourceControlCollection", + "SystemData", + "Template", + "TrackedResource", + "TrafficWeight", + "Twitter", + "TwitterRegistration", + "UserAssignedIdentity", + "VnetConfiguration", + "Volume", + "VolumeMount", + "AccessMode", + "ActiveRevisionsMode", + "AppProtocol", + "BindingType", + "CertificateProvisioningState", + "ContainerAppProvisioningState", + "CookieExpirationConvention", + "CreatedByType", + "DnsVerificationTestResult", + "EnvironmentProvisioningState", + "ForwardProxyConvention", + "IngressTransportMethod", + "ManagedServiceIdentityType", + "RevisionHealthState", + "RevisionProvisioningState", + "SourceControlOperationState", + "StorageType", + "Type", + "UnauthenticatedClientActionV2", ] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py index b4715a568a6d..d6dc39d5e794 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py @@ -11,18 +11,18 @@ class AccessMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Access mode for storage - """ + """Access mode for storage""" READ_ONLY = "ReadOnly" READ_WRITE = "ReadWrite" + class ActiveRevisionsMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ActiveRevisionsMode controls how active revisions are handled for the Container app: - - + + .. raw:: html - + Multiple: multiple revisions can be active. If no value if provided, this is the defaultSingle: Only one revision can be active at a time. Revision weights can not be used in this mode @@ -31,6 +31,7 @@ class ActiveRevisionsMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): MULTIPLE = "multiple" SINGLE = "single" + class AppProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http @@ -39,16 +40,16 @@ class AppProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): HTTP = "http" GRPC = "grpc" + class BindingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Custom Domain binding type. - """ + """Custom Domain binding type.""" DISABLED = "Disabled" SNI_ENABLED = "SniEnabled" + class CertificateProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Provisioning state of the certificate. - """ + """Provisioning state of the certificate.""" SUCCEEDED = "Succeeded" FAILED = "Failed" @@ -56,42 +57,42 @@ class CertificateProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta) DELETE_FAILED = "DeleteFailed" PENDING = "Pending" + class ContainerAppProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Provisioning state of the Container App. - """ + """Provisioning state of the Container App.""" IN_PROGRESS = "InProgress" SUCCEEDED = "Succeeded" FAILED = "Failed" CANCELED = "Canceled" + class CookieExpirationConvention(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The convention used when determining the session cookie's expiration. - """ + """The convention used when determining the session cookie's expiration.""" FIXED_TIME = "FixedTime" IDENTITY_PROVIDER_DERIVED = "IdentityProviderDerived" + class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource. - """ + """The type of identity that created the resource.""" USER = "User" APPLICATION = "Application" MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" + class DnsVerificationTestResult(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """DNS verification test result. - """ + """DNS verification test result.""" PASSED = "Passed" FAILED = "Failed" SKIPPED = "Skipped" + class EnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Provisioning state of the Environment. - """ + """Provisioning state of the Environment.""" SUCCEEDED = "Succeeded" FAILED = "Failed" @@ -104,22 +105,23 @@ class EnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta) UPGRADE_REQUESTED = "UpgradeRequested" UPGRADE_FAILED = "UpgradeFailed" + class ForwardProxyConvention(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The convention used to determine the url of the request made. - """ + """The convention used to determine the url of the request made.""" NO_PROXY = "NoProxy" STANDARD = "Standard" CUSTOM = "Custom" + class IngressTransportMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Ingress transport protocol - """ + """Ingress transport protocol""" AUTO = "auto" HTTP = "http" HTTP2 = "http2" + class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). @@ -130,17 +132,17 @@ class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): USER_ASSIGNED = "UserAssigned" SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + class RevisionHealthState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current health State of the revision - """ + """Current health State of the revision""" HEALTHY = "Healthy" UNHEALTHY = "Unhealthy" NONE = "None" + class RevisionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current provisioning State of the revision - """ + """Current provisioning State of the revision""" PROVISIONING = "Provisioning" PROVISIONED = "Provisioned" @@ -148,33 +150,33 @@ class RevisionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): DEPROVISIONING = "Deprovisioning" DEPROVISIONED = "Deprovisioned" + class SourceControlOperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current provisioning State of the operation - """ + """Current provisioning State of the operation""" IN_PROGRESS = "InProgress" SUCCEEDED = "Succeeded" FAILED = "Failed" CANCELED = "Canceled" + class StorageType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Storage type for the volume. If not provided, use EmptyDir. - """ + """Storage type for the volume. If not provided, use EmptyDir.""" AZURE_FILE = "AzureFile" EMPTY_DIR = "EmptyDir" + class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of probe. - """ + """The type of probe.""" LIVENESS = "liveness" READINESS = "readiness" STARTUP = "startup" + class UnauthenticatedClientActionV2(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The action to take when an unauthenticated client attempts to access the app. - """ + """The action to take when an unauthenticated client attempts to access the app.""" REDIRECT_TO_LOGIN_PAGE = "RedirectToLoginPage" ALLOW_ANONYMOUS = "AllowAnonymous" diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py index 56167390e75d..d3d7180f3bf6 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py @@ -24,15 +24,10 @@ class AllowedAudiencesValidation(msrest.serialization.Model): """ _attribute_map = { - 'allowed_audiences': {'key': 'allowedAudiences', 'type': '[str]'}, + "allowed_audiences": {"key": "allowedAudiences", "type": "[str]"}, } - def __init__( - self, - *, - allowed_audiences: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, allowed_audiences: Optional[List[str]] = None, **kwargs): """ :keyword allowed_audiences: The configuration settings of the allowed list of audiences from which to validate the JWT token. @@ -52,17 +47,11 @@ class AllowedPrincipals(msrest.serialization.Model): """ _attribute_map = { - 'groups': {'key': 'groups', 'type': '[str]'}, - 'identities': {'key': 'identities', 'type': '[str]'}, + "groups": {"key": "groups", "type": "[str]"}, + "identities": {"key": "identities", "type": "[str]"}, } - def __init__( - self, - *, - groups: Optional[List[str]] = None, - identities: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, groups: Optional[List[str]] = None, identities: Optional[List[str]] = None, **kwargs): """ :keyword groups: The list of the allowed groups. :paramtype groups: list[str] @@ -87,9 +76,9 @@ class Apple(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'AppleRegistration'}, - 'login': {'key': 'login', 'type': 'LoginScopes'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "AppleRegistration"}, + "login": {"key": "login", "type": "LoginScopes"}, } def __init__( @@ -125,17 +114,11 @@ class AppleRegistration(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret_setting_name': {'key': 'clientSecretSettingName', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "client_secret_setting_name": {"key": "clientSecretSettingName", "type": "str"}, } - def __init__( - self, - *, - client_id: Optional[str] = None, - client_secret_setting_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, client_id: Optional[str] = None, client_secret_setting_name: Optional[str] = None, **kwargs): """ :keyword client_id: The Client ID of the app used for login. :paramtype client_id: str @@ -158,8 +141,8 @@ class AppLogsConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'destination': {'key': 'destination', 'type': 'str'}, - 'log_analytics_configuration': {'key': 'logAnalyticsConfiguration', 'type': 'LogAnalyticsConfiguration'}, + "destination": {"key": "destination", "type": "str"}, + "log_analytics_configuration": {"key": "logAnalyticsConfiguration", "type": "LogAnalyticsConfiguration"}, } def __init__( @@ -191,17 +174,11 @@ class AppRegistration(msrest.serialization.Model): """ _attribute_map = { - 'app_id': {'key': 'appId', 'type': 'str'}, - 'app_secret_setting_name': {'key': 'appSecretSettingName', 'type': 'str'}, + "app_id": {"key": "appId", "type": "str"}, + "app_secret_setting_name": {"key": "appSecretSettingName", "type": "str"}, } - def __init__( - self, - *, - app_id: Optional[str] = None, - app_secret_setting_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, app_id: Optional[str] = None, app_secret_setting_name: Optional[str] = None, **kwargs): """ :keyword app_id: The App ID of the app used for login. :paramtype app_id: str @@ -232,25 +209,21 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -277,25 +250,21 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ProxyResource, self).__init__(**kwargs) @@ -333,22 +302,22 @@ class AuthConfig(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'platform': {'key': 'properties.platform', 'type': 'AuthPlatform'}, - 'global_validation': {'key': 'properties.globalValidation', 'type': 'GlobalValidation'}, - 'identity_providers': {'key': 'properties.identityProviders', 'type': 'IdentityProviders'}, - 'login': {'key': 'properties.login', 'type': 'Login'}, - 'http_settings': {'key': 'properties.httpSettings', 'type': 'HttpSettings'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "platform": {"key": "properties.platform", "type": "AuthPlatform"}, + "global_validation": {"key": "properties.globalValidation", "type": "GlobalValidation"}, + "identity_providers": {"key": "properties.identityProviders", "type": "IdentityProviders"}, + "login": {"key": "properties.login", "type": "Login"}, + "http_settings": {"key": "properties.httpSettings", "type": "HttpSettings"}, } def __init__( @@ -400,21 +369,16 @@ class AuthConfigCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[AuthConfig]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[AuthConfig]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["AuthConfig"], - **kwargs - ): + def __init__(self, *, value: List["AuthConfig"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.AuthConfig] @@ -438,17 +402,11 @@ class AuthPlatform(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + "enabled": {"key": "enabled", "type": "bool"}, + "runtime_version": {"key": "runtimeVersion", "type": "str"}, } - def __init__( - self, - *, - enabled: Optional[bool] = None, - runtime_version: Optional[str] = None, - **kwargs - ): + def __init__(self, *, enabled: Optional[bool] = None, runtime_version: Optional[str] = None, **kwargs): """ :keyword enabled: :code:`true` if the Authentication / Authorization feature is enabled for the current app; otherwise, :code:`false`. @@ -475,17 +433,11 @@ class AvailableOperations(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[OperationDetail]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[OperationDetail]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["OperationDetail"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["OperationDetail"]] = None, next_link: Optional[str] = None, **kwargs): """ :keyword value: Collection of available operation details. :paramtype value: list[~container_apps_api_client.models.OperationDetail] @@ -520,11 +472,11 @@ class AzureActiveDirectory(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'AzureActiveDirectoryRegistration'}, - 'login': {'key': 'login', 'type': 'AzureActiveDirectoryLogin'}, - 'validation': {'key': 'validation', 'type': 'AzureActiveDirectoryValidation'}, - 'is_auto_provisioned': {'key': 'isAutoProvisioned', 'type': 'bool'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "AzureActiveDirectoryRegistration"}, + "login": {"key": "login", "type": "AzureActiveDirectoryLogin"}, + "validation": {"key": "validation", "type": "AzureActiveDirectoryValidation"}, + "is_auto_provisioned": {"key": "isAutoProvisioned", "type": "bool"}, } def __init__( @@ -577,16 +529,12 @@ class AzureActiveDirectoryLogin(msrest.serialization.Model): """ _attribute_map = { - 'login_parameters': {'key': 'loginParameters', 'type': '[str]'}, - 'disable_www_authenticate': {'key': 'disableWWWAuthenticate', 'type': 'bool'}, + "login_parameters": {"key": "loginParameters", "type": "[str]"}, + "disable_www_authenticate": {"key": "disableWWWAuthenticate", "type": "bool"}, } def __init__( - self, - *, - login_parameters: Optional[List[str]] = None, - disable_www_authenticate: Optional[bool] = None, - **kwargs + self, *, login_parameters: Optional[List[str]] = None, disable_www_authenticate: Optional[bool] = None, **kwargs ): """ :keyword login_parameters: Login parameters to send to the OpenID Connect authorization @@ -638,12 +586,15 @@ class AzureActiveDirectoryRegistration(msrest.serialization.Model): """ _attribute_map = { - 'open_id_issuer': {'key': 'openIdIssuer', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret_setting_name': {'key': 'clientSecretSettingName', 'type': 'str'}, - 'client_secret_certificate_thumbprint': {'key': 'clientSecretCertificateThumbprint', 'type': 'str'}, - 'client_secret_certificate_subject_alternative_name': {'key': 'clientSecretCertificateSubjectAlternativeName', 'type': 'str'}, - 'client_secret_certificate_issuer': {'key': 'clientSecretCertificateIssuer', 'type': 'str'}, + "open_id_issuer": {"key": "openIdIssuer", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "client_secret_setting_name": {"key": "clientSecretSettingName", "type": "str"}, + "client_secret_certificate_thumbprint": {"key": "clientSecretCertificateThumbprint", "type": "str"}, + "client_secret_certificate_subject_alternative_name": { + "key": "clientSecretCertificateSubjectAlternativeName", + "type": "str", + }, + "client_secret_certificate_issuer": {"key": "clientSecretCertificateIssuer", "type": "str"}, } def __init__( @@ -714,9 +665,9 @@ class AzureActiveDirectoryValidation(msrest.serialization.Model): """ _attribute_map = { - 'jwt_claim_checks': {'key': 'jwtClaimChecks', 'type': 'JwtClaimChecks'}, - 'allowed_audiences': {'key': 'allowedAudiences', 'type': '[str]'}, - 'default_authorization_policy': {'key': 'defaultAuthorizationPolicy', 'type': 'DefaultAuthorizationPolicy'}, + "jwt_claim_checks": {"key": "jwtClaimChecks", "type": "JwtClaimChecks"}, + "allowed_audiences": {"key": "allowedAudiences", "type": "[str]"}, + "default_authorization_policy": {"key": "defaultAuthorizationPolicy", "type": "DefaultAuthorizationPolicy"}, } def __init__( @@ -759,10 +710,10 @@ class AzureCredentials(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "client_secret": {"key": "clientSecret", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, } def __init__( @@ -805,10 +756,10 @@ class AzureFileProperties(msrest.serialization.Model): """ _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'access_mode': {'key': 'accessMode', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, + "account_name": {"key": "accountName", "type": "str"}, + "account_key": {"key": "accountKey", "type": "str"}, + "access_mode": {"key": "accessMode", "type": "str"}, + "share_name": {"key": "shareName", "type": "str"}, } def __init__( @@ -849,8 +800,8 @@ class AzureStaticWebApps(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'AzureStaticWebAppsRegistration'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "AzureStaticWebAppsRegistration"}, } def __init__( @@ -880,15 +831,10 @@ class AzureStaticWebAppsRegistration(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, } - def __init__( - self, - *, - client_id: Optional[str] = None, - **kwargs - ): + def __init__(self, *, client_id: Optional[str] = None, **kwargs): """ :keyword client_id: The Client ID of the app used for login. :paramtype client_id: str @@ -922,29 +868,23 @@ class TrackedResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, } - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -983,21 +923,21 @@ class Certificate(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "CertificateProperties"}, } def __init__( @@ -1034,21 +974,16 @@ class CertificateCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Certificate]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Certificate]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["Certificate"], - **kwargs - ): + def __init__(self, *, value: List["Certificate"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.Certificate] @@ -1066,15 +1001,10 @@ class CertificatePatch(msrest.serialization.Model): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): """ :keyword tags: A set of tags. Application-specific metadata in the form of key-value pairs. :paramtype tags: dict[str, str] @@ -1113,36 +1043,30 @@ class CertificateProperties(msrest.serialization.Model): """ _validation = { - 'provisioning_state': {'readonly': True}, - 'subject_name': {'readonly': True}, - 'issuer': {'readonly': True}, - 'issue_date': {'readonly': True}, - 'expiration_date': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'valid': {'readonly': True}, - 'public_key_hash': {'readonly': True}, + "provisioning_state": {"readonly": True}, + "subject_name": {"readonly": True}, + "issuer": {"readonly": True}, + "issue_date": {"readonly": True}, + "expiration_date": {"readonly": True}, + "thumbprint": {"readonly": True}, + "valid": {"readonly": True}, + "public_key_hash": {"readonly": True}, } _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'subject_name': {'key': 'subjectName', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - 'issuer': {'key': 'issuer', 'type': 'str'}, - 'issue_date': {'key': 'issueDate', 'type': 'iso-8601'}, - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'valid': {'key': 'valid', 'type': 'bool'}, - 'public_key_hash': {'key': 'publicKeyHash', 'type': 'str'}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "password": {"key": "password", "type": "str"}, + "subject_name": {"key": "subjectName", "type": "str"}, + "value": {"key": "value", "type": "bytearray"}, + "issuer": {"key": "issuer", "type": "str"}, + "issue_date": {"key": "issueDate", "type": "iso-8601"}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, + "thumbprint": {"key": "thumbprint", "type": "str"}, + "valid": {"key": "valid", "type": "bool"}, + "public_key_hash": {"key": "publicKeyHash", "type": "str"}, } - def __init__( - self, - *, - password: Optional[str] = None, - value: Optional[bytearray] = None, - **kwargs - ): + def __init__(self, *, password: Optional[str] = None, value: Optional[bytearray] = None, **kwargs): """ :keyword password: Certificate password. :paramtype password: str @@ -1172,17 +1096,11 @@ class ClientRegistration(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret_setting_name': {'key': 'clientSecretSettingName', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "client_secret_setting_name": {"key": "clientSecretSettingName", "type": "str"}, } - def __init__( - self, - *, - client_id: Optional[str] = None, - client_secret_setting_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, client_id: Optional[str] = None, client_secret_setting_name: Optional[str] = None, **kwargs): """ :keyword client_id: The Client ID of the app used for login. :paramtype client_id: str @@ -1201,10 +1119,10 @@ class Configuration(msrest.serialization.Model): :vartype secrets: list[~container_apps_api_client.models.Secret] :ivar active_revisions_mode: ActiveRevisionsMode controls how active revisions are handled for the Container app: - - + + .. raw:: html - + Multiple: multiple revisions can be active. If no value if provided, this is the defaultSingle: Only one revision can be active at a time. Revision weights can not be used in this mode. Possible values include: "multiple", "single". @@ -1219,11 +1137,11 @@ class Configuration(msrest.serialization.Model): """ _attribute_map = { - 'secrets': {'key': 'secrets', 'type': '[Secret]'}, - 'active_revisions_mode': {'key': 'activeRevisionsMode', 'type': 'str'}, - 'ingress': {'key': 'ingress', 'type': 'Ingress'}, - 'registries': {'key': 'registries', 'type': '[RegistryCredentials]'}, - 'dapr': {'key': 'dapr', 'type': 'Dapr'}, + "secrets": {"key": "secrets", "type": "[Secret]"}, + "active_revisions_mode": {"key": "activeRevisionsMode", "type": "str"}, + "ingress": {"key": "ingress", "type": "Ingress"}, + "registries": {"key": "registries", "type": "[RegistryCredentials]"}, + "dapr": {"key": "dapr", "type": "Dapr"}, } def __init__( @@ -1241,10 +1159,10 @@ def __init__( :paramtype secrets: list[~container_apps_api_client.models.Secret] :keyword active_revisions_mode: ActiveRevisionsMode controls how active revisions are handled for the Container app: - - + + .. raw:: html - + Multiple: multiple revisions can be active. If no value if provided, this is the defaultSingle: Only one revision can be active at a time. Revision weights can not be used in this mode. Possible values include: "multiple", "single". @@ -1287,14 +1205,14 @@ class Container(msrest.serialization.Model): """ _attribute_map = { - 'image': {'key': 'image', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'command': {'key': 'command', 'type': '[str]'}, - 'args': {'key': 'args', 'type': '[str]'}, - 'env': {'key': 'env', 'type': '[EnvironmentVar]'}, - 'resources': {'key': 'resources', 'type': 'ContainerResources'}, - 'probes': {'key': 'probes', 'type': '[ContainerAppProbe]'}, - 'volume_mounts': {'key': 'volumeMounts', 'type': '[VolumeMount]'}, + "image": {"key": "image", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "command": {"key": "command", "type": "[str]"}, + "args": {"key": "args", "type": "[str]"}, + "env": {"key": "env", "type": "[EnvironmentVar]"}, + "resources": {"key": "resources", "type": "ContainerResources"}, + "probes": {"key": "probes", "type": "[ContainerAppProbe]"}, + "volume_mounts": {"key": "volumeMounts", "type": "[VolumeMount]"}, } def __init__( @@ -1386,34 +1304,34 @@ class ContainerApp(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'latest_revision_name': {'readonly': True}, - 'latest_revision_fqdn': {'readonly': True}, - 'custom_domain_verification_id': {'readonly': True}, - 'outbound_ip_addresses': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "provisioning_state": {"readonly": True}, + "latest_revision_name": {"readonly": True}, + "latest_revision_fqdn": {"readonly": True}, + "custom_domain_verification_id": {"readonly": True}, + "outbound_ip_addresses": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'managed_environment_id': {'key': 'properties.managedEnvironmentId', 'type': 'str'}, - 'latest_revision_name': {'key': 'properties.latestRevisionName', 'type': 'str'}, - 'latest_revision_fqdn': {'key': 'properties.latestRevisionFqdn', 'type': 'str'}, - 'custom_domain_verification_id': {'key': 'properties.customDomainVerificationId', 'type': 'str'}, - 'configuration': {'key': 'properties.configuration', 'type': 'Configuration'}, - 'template': {'key': 'properties.template', 'type': 'Template'}, - 'outbound_ip_addresses': {'key': 'properties.outboundIPAddresses', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "managed_environment_id": {"key": "properties.managedEnvironmentId", "type": "str"}, + "latest_revision_name": {"key": "properties.latestRevisionName", "type": "str"}, + "latest_revision_fqdn": {"key": "properties.latestRevisionFqdn", "type": "str"}, + "custom_domain_verification_id": {"key": "properties.customDomainVerificationId", "type": "str"}, + "configuration": {"key": "properties.configuration", "type": "Configuration"}, + "template": {"key": "properties.template", "type": "Template"}, + "outbound_ip_addresses": {"key": "properties.outboundIPAddresses", "type": "[str]"}, } def __init__( @@ -1468,21 +1386,16 @@ class ContainerAppCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ContainerApp]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ContainerApp]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["ContainerApp"], - **kwargs - ): + def __init__(self, *, value: List["ContainerApp"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.ContainerApp] @@ -1500,15 +1413,10 @@ class ContainerAppPatch(msrest.serialization.Model): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): """ :keyword tags: A set of tags. Application-specific metadata in the form of key-value pairs. :paramtype tags: dict[str, str] @@ -1556,15 +1464,15 @@ class ContainerAppProbe(msrest.serialization.Model): """ _attribute_map = { - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'http_get': {'key': 'httpGet', 'type': 'ContainerAppProbeHttpGet'}, - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ContainerAppProbeTcpSocket'}, - 'termination_grace_period_seconds': {'key': 'terminationGracePeriodSeconds', 'type': 'long'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'type': {'key': 'type', 'type': 'str'}, + "failure_threshold": {"key": "failureThreshold", "type": "int"}, + "http_get": {"key": "httpGet", "type": "ContainerAppProbeHttpGet"}, + "initial_delay_seconds": {"key": "initialDelaySeconds", "type": "int"}, + "period_seconds": {"key": "periodSeconds", "type": "int"}, + "success_threshold": {"key": "successThreshold", "type": "int"}, + "tcp_socket": {"key": "tcpSocket", "type": "ContainerAppProbeTcpSocket"}, + "termination_grace_period_seconds": {"key": "terminationGracePeriodSeconds", "type": "long"}, + "timeout_seconds": {"key": "timeoutSeconds", "type": "int"}, + "type": {"key": "type", "type": "str"}, } def __init__( @@ -1649,15 +1557,15 @@ class ContainerAppProbeHttpGet(msrest.serialization.Model): """ _validation = { - 'port': {'required': True}, + "port": {"required": True}, } _attribute_map = { - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ContainerAppProbeHttpGetHttpHeadersItem]'}, - 'path': {'key': 'path', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, + "host": {"key": "host", "type": "str"}, + "http_headers": {"key": "httpHeaders", "type": "[ContainerAppProbeHttpGetHttpHeadersItem]"}, + "path": {"key": "path", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "scheme": {"key": "scheme", "type": "str"}, } def __init__( @@ -1705,22 +1613,16 @@ class ContainerAppProbeHttpGetHttpHeadersItem(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - *, - name: str, - value: str, - **kwargs - ): + def __init__(self, *, name: str, value: str, **kwargs): """ :keyword name: Required. The header field name. :paramtype name: str @@ -1745,21 +1647,15 @@ class ContainerAppProbeTcpSocket(msrest.serialization.Model): """ _validation = { - 'port': {'required': True}, + "port": {"required": True}, } _attribute_map = { - 'host': {'key': 'host', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, + "host": {"key": "host", "type": "str"}, + "port": {"key": "port", "type": "int"}, } - def __init__( - self, - *, - port: int, - host: Optional[str] = None, - **kwargs - ): + def __init__(self, *, port: int, host: Optional[str] = None, **kwargs): """ :keyword host: Optional: Host name to connect to, defaults to the pod IP. :paramtype host: str @@ -1784,21 +1680,17 @@ class ContainerAppSecret(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, + "name": {"readonly": True}, + "value": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ContainerAppSecret, self).__init__(**kwargs) self.name = None self.value = None @@ -1818,22 +1710,16 @@ class ContainerResources(msrest.serialization.Model): """ _validation = { - 'ephemeral_storage': {'readonly': True}, + "ephemeral_storage": {"readonly": True}, } _attribute_map = { - 'cpu': {'key': 'cpu', 'type': 'float'}, - 'memory': {'key': 'memory', 'type': 'str'}, - 'ephemeral_storage': {'key': 'ephemeralStorage', 'type': 'str'}, + "cpu": {"key": "cpu", "type": "float"}, + "memory": {"key": "memory", "type": "str"}, + "ephemeral_storage": {"key": "ephemeralStorage", "type": "str"}, } - def __init__( - self, - *, - cpu: Optional[float] = None, - memory: Optional[str] = None, - **kwargs - ): + def __init__(self, *, cpu: Optional[float] = None, memory: Optional[str] = None, **kwargs): """ :keyword cpu: Required CPU in cores, e.g. 0.5. :paramtype cpu: float @@ -1858,8 +1744,8 @@ class CookieExpiration(msrest.serialization.Model): """ _attribute_map = { - 'convention': {'key': 'convention', 'type': 'str'}, - 'time_to_expiration': {'key': 'timeToExpiration', 'type': 'str'}, + "convention": {"key": "convention", "type": "str"}, + "time_to_expiration": {"key": "timeToExpiration", "type": "str"}, } def __init__( @@ -1898,23 +1784,18 @@ class CustomDomain(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'certificate_id': {'required': True}, + "name": {"required": True}, + "certificate_id": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'binding_type': {'key': 'bindingType', 'type': 'str'}, - 'certificate_id': {'key': 'certificateId', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "binding_type": {"key": "bindingType", "type": "str"}, + "certificate_id": {"key": "certificateId", "type": "str"}, } def __init__( - self, - *, - name: str, - certificate_id: str, - binding_type: Optional[Union[str, "BindingType"]] = None, - **kwargs + self, *, name: str, certificate_id: str, binding_type: Optional[Union[str, "BindingType"]] = None, **kwargs ): """ :keyword name: Required. Hostname. @@ -1980,34 +1861,37 @@ class CustomHostnameAnalysisResult(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'host_name': {'readonly': True}, - 'is_hostname_already_verified': {'readonly': True}, - 'custom_domain_verification_test': {'readonly': True}, - 'custom_domain_verification_failure_info': {'readonly': True}, - 'has_conflict_on_managed_environment': {'readonly': True}, - 'conflicting_container_app_resource_id': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "host_name": {"readonly": True}, + "is_hostname_already_verified": {"readonly": True}, + "custom_domain_verification_test": {"readonly": True}, + "custom_domain_verification_failure_info": {"readonly": True}, + "has_conflict_on_managed_environment": {"readonly": True}, + "conflicting_container_app_resource_id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, - 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'str'}, - 'custom_domain_verification_failure_info': {'key': 'properties.customDomainVerificationFailureInfo', 'type': 'DefaultErrorResponse'}, - 'has_conflict_on_managed_environment': {'key': 'properties.hasConflictOnManagedEnvironment', 'type': 'bool'}, - 'conflicting_container_app_resource_id': {'key': 'properties.conflictingContainerAppResourceId', 'type': 'str'}, - 'c_name_records': {'key': 'properties.cNameRecords', 'type': '[str]'}, - 'txt_records': {'key': 'properties.txtRecords', 'type': '[str]'}, - 'a_records': {'key': 'properties.aRecords', 'type': '[str]'}, - 'alternate_c_name_records': {'key': 'properties.alternateCNameRecords', 'type': '[str]'}, - 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "host_name": {"key": "properties.hostName", "type": "str"}, + "is_hostname_already_verified": {"key": "properties.isHostnameAlreadyVerified", "type": "bool"}, + "custom_domain_verification_test": {"key": "properties.customDomainVerificationTest", "type": "str"}, + "custom_domain_verification_failure_info": { + "key": "properties.customDomainVerificationFailureInfo", + "type": "DefaultErrorResponse", + }, + "has_conflict_on_managed_environment": {"key": "properties.hasConflictOnManagedEnvironment", "type": "bool"}, + "conflicting_container_app_resource_id": {"key": "properties.conflictingContainerAppResourceId", "type": "str"}, + "c_name_records": {"key": "properties.cNameRecords", "type": "[str]"}, + "txt_records": {"key": "properties.txtRecords", "type": "[str]"}, + "a_records": {"key": "properties.aRecords", "type": "[str]"}, + "alternate_c_name_records": {"key": "properties.alternateCNameRecords", "type": "[str]"}, + "alternate_txt_records": {"key": "properties.alternateTxtRecords", "type": "[str]"}, } def __init__( @@ -2061,9 +1945,9 @@ class CustomOpenIdConnectProvider(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'OpenIdConnectRegistration'}, - 'login': {'key': 'login', 'type': 'OpenIdConnectLogin'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "OpenIdConnectRegistration"}, + "login": {"key": "login", "type": "OpenIdConnectLogin"}, } def __init__( @@ -2104,9 +1988,9 @@ class CustomScaleRule(msrest.serialization.Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': '{str}'}, - 'auth': {'key': 'auth', 'type': '[ScaleRuleAuth]'}, + "type": {"key": "type", "type": "str"}, + "metadata": {"key": "metadata", "type": "{str}"}, + "auth": {"key": "auth", "type": "[ScaleRuleAuth]"}, } def __init__( @@ -2147,10 +2031,10 @@ class Dapr(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'app_protocol': {'key': 'appProtocol', 'type': 'str'}, - 'app_port': {'key': 'appPort', 'type': 'int'}, + "enabled": {"key": "enabled", "type": "bool"}, + "app_id": {"key": "appId", "type": "str"}, + "app_protocol": {"key": "appProtocol", "type": "str"}, + "app_port": {"key": "appPort", "type": "int"}, } def __init__( @@ -2213,24 +2097,24 @@ class DaprComponent(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'component_type': {'key': 'properties.componentType', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'ignore_errors': {'key': 'properties.ignoreErrors', 'type': 'bool'}, - 'init_timeout': {'key': 'properties.initTimeout', 'type': 'str'}, - 'secrets': {'key': 'properties.secrets', 'type': '[Secret]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[DaprMetadata]'}, - 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "component_type": {"key": "properties.componentType", "type": "str"}, + "version": {"key": "properties.version", "type": "str"}, + "ignore_errors": {"key": "properties.ignoreErrors", "type": "bool"}, + "init_timeout": {"key": "properties.initTimeout", "type": "str"}, + "secrets": {"key": "properties.secrets", "type": "[Secret]"}, + "metadata": {"key": "properties.metadata", "type": "[DaprMetadata]"}, + "scopes": {"key": "properties.scopes", "type": "[str]"}, } def __init__( @@ -2285,21 +2169,16 @@ class DaprComponentsCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DaprComponent]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[DaprComponent]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["DaprComponent"], - **kwargs - ): + def __init__(self, *, value: List["DaprComponent"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.DaprComponent] @@ -2322,18 +2201,13 @@ class DaprMetadata(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'secret_ref': {'key': 'secretRef', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "secret_ref": {"key": "secretRef", "type": "str"}, } def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[str] = None, - secret_ref: Optional[str] = None, - **kwargs + self, *, name: Optional[str] = None, value: Optional[str] = None, secret_ref: Optional[str] = None, **kwargs ): """ :keyword name: Metadata property name. @@ -2362,8 +2236,8 @@ class DefaultAuthorizationPolicy(msrest.serialization.Model): """ _attribute_map = { - 'allowed_principals': {'key': 'allowedPrincipals', 'type': 'AllowedPrincipals'}, - 'allowed_applications': {'key': 'allowedApplications', 'type': '[str]'}, + "allowed_principals": {"key": "allowedPrincipals", "type": "AllowedPrincipals"}, + "allowed_applications": {"key": "allowedApplications", "type": "[str]"}, } def __init__( @@ -2396,19 +2270,15 @@ class DefaultErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'readonly': True}, + "error": {"readonly": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'DefaultErrorResponseError'}, + "error": {"key": "error", "type": "DefaultErrorResponseError"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DefaultErrorResponse, self).__init__(**kwargs) self.error = None @@ -2431,26 +2301,21 @@ class DefaultErrorResponseError(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'innererror': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "innererror": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[DefaultErrorResponseErrorDetailsItem]'}, - 'innererror': {'key': 'innererror', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[DefaultErrorResponseErrorDetailsItem]"}, + "innererror": {"key": "innererror", "type": "str"}, } - def __init__( - self, - *, - details: Optional[List["DefaultErrorResponseErrorDetailsItem"]] = None, - **kwargs - ): + def __init__(self, *, details: Optional[List["DefaultErrorResponseErrorDetailsItem"]] = None, **kwargs): """ :keyword details: Details or the error. :paramtype details: @@ -2478,23 +2343,19 @@ class DefaultErrorResponseErrorDetailsItem(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DefaultErrorResponseErrorDetailsItem, self).__init__(**kwargs) self.code = None self.message = None @@ -2514,18 +2375,13 @@ class EnvironmentVar(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'secret_ref': {'key': 'secretRef', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "secret_ref": {"key": "secretRef", "type": "str"}, } def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[str] = None, - secret_ref: Optional[str] = None, - **kwargs + self, *, name: Optional[str] = None, value: Optional[str] = None, secret_ref: Optional[str] = None, **kwargs ): """ :keyword name: Environment variable name. @@ -2558,10 +2414,10 @@ class Facebook(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'AppRegistration'}, - 'graph_api_version': {'key': 'graphApiVersion', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'LoginScopes'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "AppRegistration"}, + "graph_api_version": {"key": "graphApiVersion", "type": "str"}, + "login": {"key": "login", "type": "LoginScopes"}, } def __init__( @@ -2605,9 +2461,9 @@ class ForwardProxy(msrest.serialization.Model): """ _attribute_map = { - 'convention': {'key': 'convention', 'type': 'str'}, - 'custom_host_header_name': {'key': 'customHostHeaderName', 'type': 'str'}, - 'custom_proto_header_name': {'key': 'customProtoHeaderName', 'type': 'str'}, + "convention": {"key": "convention", "type": "str"}, + "custom_host_header_name": {"key": "customHostHeaderName", "type": "str"}, + "custom_proto_header_name": {"key": "customProtoHeaderName", "type": "str"}, } def __init__( @@ -2646,9 +2502,9 @@ class GitHub(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'ClientRegistration'}, - 'login': {'key': 'login', 'type': 'LoginScopes'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "ClientRegistration"}, + "login": {"key": "login", "type": "LoginScopes"}, } def __init__( @@ -2695,13 +2551,13 @@ class GithubActionConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'registry_info': {'key': 'registryInfo', 'type': 'RegistryInfo'}, - 'azure_credentials': {'key': 'azureCredentials', 'type': 'AzureCredentials'}, - 'dockerfile_path': {'key': 'dockerfilePath', 'type': 'str'}, - 'publish_type': {'key': 'publishType', 'type': 'str'}, - 'os': {'key': 'os', 'type': 'str'}, - 'runtime_stack': {'key': 'runtimeStack', 'type': 'str'}, - 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + "registry_info": {"key": "registryInfo", "type": "RegistryInfo"}, + "azure_credentials": {"key": "azureCredentials", "type": "AzureCredentials"}, + "dockerfile_path": {"key": "dockerfilePath", "type": "str"}, + "publish_type": {"key": "publishType", "type": "str"}, + "os": {"key": "os", "type": "str"}, + "runtime_stack": {"key": "runtimeStack", "type": "str"}, + "runtime_version": {"key": "runtimeVersion", "type": "str"}, } def __init__( @@ -2762,9 +2618,9 @@ class GlobalValidation(msrest.serialization.Model): """ _attribute_map = { - 'unauthenticated_client_action': {'key': 'unauthenticatedClientAction', 'type': 'str'}, - 'redirect_to_provider': {'key': 'redirectToProvider', 'type': 'str'}, - 'excluded_paths': {'key': 'excludedPaths', 'type': '[str]'}, + "unauthenticated_client_action": {"key": "unauthenticatedClientAction", "type": "str"}, + "redirect_to_provider": {"key": "redirectToProvider", "type": "str"}, + "excluded_paths": {"key": "excludedPaths", "type": "[str]"}, } def __init__( @@ -2813,10 +2669,10 @@ class Google(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'ClientRegistration'}, - 'login': {'key': 'login', 'type': 'LoginScopes'}, - 'validation': {'key': 'validation', 'type': 'AllowedAudiencesValidation'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "ClientRegistration"}, + "login": {"key": "login", "type": "LoginScopes"}, + "validation": {"key": "validation", "type": "AllowedAudiencesValidation"}, } def __init__( @@ -2858,16 +2714,12 @@ class HttpScaleRule(msrest.serialization.Model): """ _attribute_map = { - 'metadata': {'key': 'metadata', 'type': '{str}'}, - 'auth': {'key': 'auth', 'type': '[ScaleRuleAuth]'}, + "metadata": {"key": "metadata", "type": "{str}"}, + "auth": {"key": "auth", "type": "[ScaleRuleAuth]"}, } def __init__( - self, - *, - metadata: Optional[Dict[str, str]] = None, - auth: Optional[List["ScaleRuleAuth"]] = None, - **kwargs + self, *, metadata: Optional[Dict[str, str]] = None, auth: Optional[List["ScaleRuleAuth"]] = None, **kwargs ): """ :keyword metadata: Metadata properties to describe http scale rule. @@ -2893,9 +2745,9 @@ class HttpSettings(msrest.serialization.Model): """ _attribute_map = { - 'require_https': {'key': 'requireHttps', 'type': 'bool'}, - 'routes': {'key': 'routes', 'type': 'HttpSettingsRoutes'}, - 'forward_proxy': {'key': 'forwardProxy', 'type': 'ForwardProxy'}, + "require_https": {"key": "requireHttps", "type": "bool"}, + "routes": {"key": "routes", "type": "HttpSettingsRoutes"}, + "forward_proxy": {"key": "forwardProxy", "type": "ForwardProxy"}, } def __init__( @@ -2930,15 +2782,10 @@ class HttpSettingsRoutes(msrest.serialization.Model): """ _attribute_map = { - 'api_prefix': {'key': 'apiPrefix', 'type': 'str'}, + "api_prefix": {"key": "apiPrefix", "type": "str"}, } - def __init__( - self, - *, - api_prefix: Optional[str] = None, - **kwargs - ): + def __init__(self, *, api_prefix: Optional[str] = None, **kwargs): """ :keyword api_prefix: The prefix that should precede all the authentication/authorization paths. :paramtype api_prefix: str @@ -2973,14 +2820,17 @@ class IdentityProviders(msrest.serialization.Model): """ _attribute_map = { - 'azure_active_directory': {'key': 'azureActiveDirectory', 'type': 'AzureActiveDirectory'}, - 'facebook': {'key': 'facebook', 'type': 'Facebook'}, - 'git_hub': {'key': 'gitHub', 'type': 'GitHub'}, - 'google': {'key': 'google', 'type': 'Google'}, - 'twitter': {'key': 'twitter', 'type': 'Twitter'}, - 'apple': {'key': 'apple', 'type': 'Apple'}, - 'azure_static_web_apps': {'key': 'azureStaticWebApps', 'type': 'AzureStaticWebApps'}, - 'custom_open_id_connect_providers': {'key': 'customOpenIdConnectProviders', 'type': '{CustomOpenIdConnectProvider}'}, + "azure_active_directory": {"key": "azureActiveDirectory", "type": "AzureActiveDirectory"}, + "facebook": {"key": "facebook", "type": "Facebook"}, + "git_hub": {"key": "gitHub", "type": "GitHub"}, + "google": {"key": "google", "type": "Google"}, + "twitter": {"key": "twitter", "type": "Twitter"}, + "apple": {"key": "apple", "type": "Apple"}, + "azure_static_web_apps": {"key": "azureStaticWebApps", "type": "AzureStaticWebApps"}, + "custom_open_id_connect_providers": { + "key": "customOpenIdConnectProviders", + "type": "{CustomOpenIdConnectProvider}", + }, } def __init__( @@ -3053,17 +2903,17 @@ class Ingress(msrest.serialization.Model): """ _validation = { - 'fqdn': {'readonly': True}, + "fqdn": {"readonly": True}, } _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'external': {'key': 'external', 'type': 'bool'}, - 'target_port': {'key': 'targetPort', 'type': 'int'}, - 'transport': {'key': 'transport', 'type': 'str'}, - 'traffic': {'key': 'traffic', 'type': '[TrafficWeight]'}, - 'custom_domains': {'key': 'customDomains', 'type': '[CustomDomain]'}, - 'allow_insecure': {'key': 'allowInsecure', 'type': 'bool'}, + "fqdn": {"key": "fqdn", "type": "str"}, + "external": {"key": "external", "type": "bool"}, + "target_port": {"key": "targetPort", "type": "int"}, + "transport": {"key": "transport", "type": "str"}, + "traffic": {"key": "traffic", "type": "[TrafficWeight]"}, + "custom_domains": {"key": "customDomains", "type": "[CustomDomain]"}, + "allow_insecure": {"key": "allowInsecure", "type": "bool"}, } def __init__( @@ -3113,8 +2963,8 @@ class JwtClaimChecks(msrest.serialization.Model): """ _attribute_map = { - 'allowed_groups': {'key': 'allowedGroups', 'type': '[str]'}, - 'allowed_client_applications': {'key': 'allowedClientApplications', 'type': '[str]'}, + "allowed_groups": {"key": "allowedGroups", "type": "[str]"}, + "allowed_client_applications": {"key": "allowedClientApplications", "type": "[str]"}, } def __init__( @@ -3145,17 +2995,11 @@ class LogAnalyticsConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'shared_key': {'key': 'sharedKey', 'type': 'str'}, + "customer_id": {"key": "customerId", "type": "str"}, + "shared_key": {"key": "sharedKey", "type": "str"}, } - def __init__( - self, - *, - customer_id: Optional[str] = None, - shared_key: Optional[str] = None, - **kwargs - ): + def __init__(self, *, customer_id: Optional[str] = None, shared_key: Optional[str] = None, **kwargs): """ :keyword customer_id: Log analytics customer id. :paramtype customer_id: str @@ -3187,11 +3031,11 @@ class Login(msrest.serialization.Model): """ _attribute_map = { - 'routes': {'key': 'routes', 'type': 'LoginRoutes'}, - 'preserve_url_fragments_for_logins': {'key': 'preserveUrlFragmentsForLogins', 'type': 'bool'}, - 'allowed_external_redirect_urls': {'key': 'allowedExternalRedirectUrls', 'type': '[str]'}, - 'cookie_expiration': {'key': 'cookieExpiration', 'type': 'CookieExpiration'}, - 'nonce': {'key': 'nonce', 'type': 'Nonce'}, + "routes": {"key": "routes", "type": "LoginRoutes"}, + "preserve_url_fragments_for_logins": {"key": "preserveUrlFragmentsForLogins", "type": "bool"}, + "allowed_external_redirect_urls": {"key": "allowedExternalRedirectUrls", "type": "[str]"}, + "cookie_expiration": {"key": "cookieExpiration", "type": "CookieExpiration"}, + "nonce": {"key": "nonce", "type": "Nonce"}, } def __init__( @@ -3236,15 +3080,10 @@ class LoginRoutes(msrest.serialization.Model): """ _attribute_map = { - 'logout_endpoint': {'key': 'logoutEndpoint', 'type': 'str'}, + "logout_endpoint": {"key": "logoutEndpoint", "type": "str"}, } - def __init__( - self, - *, - logout_endpoint: Optional[str] = None, - **kwargs - ): + def __init__(self, *, logout_endpoint: Optional[str] = None, **kwargs): """ :keyword logout_endpoint: The endpoint at which a logout request should be made. :paramtype logout_endpoint: str @@ -3261,15 +3100,10 @@ class LoginScopes(msrest.serialization.Model): """ _attribute_map = { - 'scopes': {'key': 'scopes', 'type': '[str]'}, + "scopes": {"key": "scopes", "type": "[str]"}, } - def __init__( - self, - *, - scopes: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, scopes: Optional[List[str]] = None, **kwargs): """ :keyword scopes: A list of the scopes that should be requested while authenticating. :paramtype scopes: list[str] @@ -3324,31 +3158,31 @@ class ManagedEnvironment(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'deployment_errors': {'readonly': True}, - 'default_domain': {'readonly': True}, - 'static_ip': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "provisioning_state": {"readonly": True}, + "deployment_errors": {"readonly": True}, + "default_domain": {"readonly": True}, + "static_ip": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'dapr_ai_instrumentation_key': {'key': 'properties.daprAIInstrumentationKey', 'type': 'str'}, - 'vnet_configuration': {'key': 'properties.vnetConfiguration', 'type': 'VnetConfiguration'}, - 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, - 'default_domain': {'key': 'properties.defaultDomain', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, - 'app_logs_configuration': {'key': 'properties.appLogsConfiguration', 'type': 'AppLogsConfiguration'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "dapr_ai_instrumentation_key": {"key": "properties.daprAIInstrumentationKey", "type": "str"}, + "vnet_configuration": {"key": "properties.vnetConfiguration", "type": "VnetConfiguration"}, + "deployment_errors": {"key": "properties.deploymentErrors", "type": "str"}, + "default_domain": {"key": "properties.defaultDomain", "type": "str"}, + "static_ip": {"key": "properties.staticIp", "type": "str"}, + "app_logs_configuration": {"key": "properties.appLogsConfiguration", "type": "AppLogsConfiguration"}, } def __init__( @@ -3394,15 +3228,10 @@ class ManagedEnvironmentPatch(msrest.serialization.Model): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): """ :keyword tags: A set of tags. Application-specific metadata in the form of key-value pairs. :paramtype tags: dict[str, str] @@ -3425,21 +3254,16 @@ class ManagedEnvironmentsCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedEnvironment]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ManagedEnvironment]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["ManagedEnvironment"], - **kwargs - ): + def __init__(self, *, value: List["ManagedEnvironment"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.ManagedEnvironment] @@ -3470,26 +3294,21 @@ class ManagedEnvironmentStorage(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'ManagedEnvironmentStorageProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ManagedEnvironmentStorageProperties"}, } - def __init__( - self, - *, - properties: Optional["ManagedEnvironmentStorageProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["ManagedEnvironmentStorageProperties"] = None, **kwargs): """ :keyword properties: Storage properties. :paramtype properties: ~container_apps_api_client.models.ManagedEnvironmentStorageProperties @@ -3506,15 +3325,10 @@ class ManagedEnvironmentStorageProperties(msrest.serialization.Model): """ _attribute_map = { - 'azure_file': {'key': 'azureFile', 'type': 'AzureFileProperties'}, + "azure_file": {"key": "azureFile", "type": "AzureFileProperties"}, } - def __init__( - self, - *, - azure_file: Optional["AzureFileProperties"] = None, - **kwargs - ): + def __init__(self, *, azure_file: Optional["AzureFileProperties"] = None, **kwargs): """ :keyword azure_file: Azure file properties. :paramtype azure_file: ~container_apps_api_client.models.AzureFileProperties @@ -3533,19 +3347,14 @@ class ManagedEnvironmentStoragesCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedEnvironmentStorage]'}, + "value": {"key": "value", "type": "[ManagedEnvironmentStorage]"}, } - def __init__( - self, - *, - value: List["ManagedEnvironmentStorage"], - **kwargs - ): + def __init__(self, *, value: List["ManagedEnvironmentStorage"], **kwargs): """ :keyword value: Required. Collection of storage resources. :paramtype value: list[~container_apps_api_client.models.ManagedEnvironmentStorage] @@ -3580,16 +3389,16 @@ class ManagedServiceIdentity(msrest.serialization.Model): """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + "type": {"required": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, } def __init__( @@ -3630,16 +3439,12 @@ class Nonce(msrest.serialization.Model): """ _attribute_map = { - 'validate_nonce': {'key': 'validateNonce', 'type': 'bool'}, - 'nonce_expiration_interval': {'key': 'nonceExpirationInterval', 'type': 'str'}, + "validate_nonce": {"key": "validateNonce", "type": "bool"}, + "nonce_expiration_interval": {"key": "nonceExpirationInterval", "type": "str"}, } def __init__( - self, - *, - validate_nonce: Optional[bool] = None, - nonce_expiration_interval: Optional[str] = None, - **kwargs + self, *, validate_nonce: Optional[bool] = None, nonce_expiration_interval: Optional[str] = None, **kwargs ): """ :keyword validate_nonce: :code:`false` if the nonce should not be validated while @@ -3666,17 +3471,11 @@ class OpenIdConnectClientCredential(msrest.serialization.Model): """ _attribute_map = { - 'method': {'key': 'method', 'type': 'str'}, - 'client_secret_setting_name': {'key': 'clientSecretSettingName', 'type': 'str'}, + "method": {"key": "method", "type": "str"}, + "client_secret_setting_name": {"key": "clientSecretSettingName", "type": "str"}, } - def __init__( - self, - *, - method: Optional[str] = None, - client_secret_setting_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, method: Optional[str] = None, client_secret_setting_name: Optional[str] = None, **kwargs): """ :keyword method: The method that should be used to authenticate the user. The only acceptable values to pass in are None and "ClientSecretPost". The default value is None. @@ -3707,11 +3506,11 @@ class OpenIdConnectConfig(msrest.serialization.Model): """ _attribute_map = { - 'authorization_endpoint': {'key': 'authorizationEndpoint', 'type': 'str'}, - 'token_endpoint': {'key': 'tokenEndpoint', 'type': 'str'}, - 'issuer': {'key': 'issuer', 'type': 'str'}, - 'certification_uri': {'key': 'certificationUri', 'type': 'str'}, - 'well_known_open_id_configuration': {'key': 'wellKnownOpenIdConfiguration', 'type': 'str'}, + "authorization_endpoint": {"key": "authorizationEndpoint", "type": "str"}, + "token_endpoint": {"key": "tokenEndpoint", "type": "str"}, + "issuer": {"key": "issuer", "type": "str"}, + "certification_uri": {"key": "certificationUri", "type": "str"}, + "well_known_open_id_configuration": {"key": "wellKnownOpenIdConfiguration", "type": "str"}, } def __init__( @@ -3756,17 +3555,11 @@ class OpenIdConnectLogin(msrest.serialization.Model): """ _attribute_map = { - 'name_claim_type': {'key': 'nameClaimType', 'type': 'str'}, - 'scopes': {'key': 'scopes', 'type': '[str]'}, + "name_claim_type": {"key": "nameClaimType", "type": "str"}, + "scopes": {"key": "scopes", "type": "[str]"}, } - def __init__( - self, - *, - name_claim_type: Optional[str] = None, - scopes: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, name_claim_type: Optional[str] = None, scopes: Optional[List[str]] = None, **kwargs): """ :keyword name_claim_type: The name of the claim that contains the users name. :paramtype name_claim_type: str @@ -3791,9 +3584,9 @@ class OpenIdConnectRegistration(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_credential': {'key': 'clientCredential', 'type': 'OpenIdConnectClientCredential'}, - 'open_id_connect_configuration': {'key': 'openIdConnectConfiguration', 'type': 'OpenIdConnectConfig'}, + "client_id": {"key": "clientId", "type": "str"}, + "client_credential": {"key": "clientCredential", "type": "OpenIdConnectClientCredential"}, + "open_id_connect_configuration": {"key": "openIdConnectConfiguration", "type": "OpenIdConnectConfig"}, } def __init__( @@ -3834,10 +3627,10 @@ class OperationDetail(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, } def __init__( @@ -3880,10 +3673,10 @@ class OperationDisplay(msrest.serialization.Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } def __init__( @@ -3924,9 +3717,9 @@ class QueueScaleRule(msrest.serialization.Model): """ _attribute_map = { - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'queue_length': {'key': 'queueLength', 'type': 'int'}, - 'auth': {'key': 'auth', 'type': '[ScaleRuleAuth]'}, + "queue_name": {"key": "queueName", "type": "str"}, + "queue_length": {"key": "queueLength", "type": "int"}, + "auth": {"key": "auth", "type": "[ScaleRuleAuth]"}, } def __init__( @@ -3963,9 +3756,9 @@ class RegistryCredentials(msrest.serialization.Model): """ _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_secret_ref': {'key': 'passwordSecretRef', 'type': 'str'}, + "server": {"key": "server", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password_secret_ref": {"key": "passwordSecretRef", "type": "str"}, } def __init__( @@ -4002,9 +3795,9 @@ class RegistryInfo(msrest.serialization.Model): """ _attribute_map = { - 'registry_url': {'key': 'registryUrl', 'type': 'str'}, - 'registry_user_name': {'key': 'registryUserName', 'type': 'str'}, - 'registry_password': {'key': 'registryPassword', 'type': 'str'}, + "registry_url": {"key": "registryUrl", "type": "str"}, + "registry_user_name": {"key": "registryUserName", "type": "str"}, + "registry_password": {"key": "registryPassword", "type": "str"}, } def __init__( @@ -4052,28 +3845,23 @@ class Replica(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'created_time': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "created_time": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'containers': {'key': 'properties.containers', 'type': '[ReplicaContainer]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "created_time": {"key": "properties.createdTime", "type": "iso-8601"}, + "containers": {"key": "properties.containers", "type": "[ReplicaContainer]"}, } - def __init__( - self, - *, - containers: Optional[List["ReplicaContainer"]] = None, - **kwargs - ): + def __init__(self, *, containers: Optional[List["ReplicaContainer"]] = None, **kwargs): """ :keyword containers: The containers collection under a replica. :paramtype containers: list[~container_apps_api_client.models.ReplicaContainer] @@ -4093,19 +3881,14 @@ class ReplicaCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Replica]'}, + "value": {"key": "value", "type": "[Replica]"}, } - def __init__( - self, - *, - value: List["Replica"], - **kwargs - ): + def __init__(self, *, value: List["Replica"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.Replica] @@ -4130,11 +3913,11 @@ class ReplicaContainer(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - 'ready': {'key': 'ready', 'type': 'bool'}, - 'started': {'key': 'started', 'type': 'bool'}, - 'restart_count': {'key': 'restartCount', 'type': 'int'}, + "name": {"key": "name", "type": "str"}, + "container_id": {"key": "containerId", "type": "str"}, + "ready": {"key": "ready", "type": "bool"}, + "started": {"key": "started", "type": "bool"}, + "restart_count": {"key": "restartCount", "type": "int"}, } def __init__( @@ -4209,43 +3992,39 @@ class Revision(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'created_time': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'template': {'readonly': True}, - 'active': {'readonly': True}, - 'replicas': {'readonly': True}, - 'traffic_weight': {'readonly': True}, - 'provisioning_error': {'readonly': True}, - 'health_state': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "created_time": {"readonly": True}, + "fqdn": {"readonly": True}, + "template": {"readonly": True}, + "active": {"readonly": True}, + "replicas": {"readonly": True}, + "traffic_weight": {"readonly": True}, + "provisioning_error": {"readonly": True}, + "health_state": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'template': {'key': 'properties.template', 'type': 'Template'}, - 'active': {'key': 'properties.active', 'type': 'bool'}, - 'replicas': {'key': 'properties.replicas', 'type': 'int'}, - 'traffic_weight': {'key': 'properties.trafficWeight', 'type': 'int'}, - 'provisioning_error': {'key': 'properties.provisioningError', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "created_time": {"key": "properties.createdTime", "type": "iso-8601"}, + "fqdn": {"key": "properties.fqdn", "type": "str"}, + "template": {"key": "properties.template", "type": "Template"}, + "active": {"key": "properties.active", "type": "bool"}, + "replicas": {"key": "properties.replicas", "type": "int"}, + "traffic_weight": {"key": "properties.trafficWeight", "type": "int"}, + "provisioning_error": {"key": "properties.provisioningError", "type": "str"}, + "health_state": {"key": "properties.healthState", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + } + + def __init__(self, **kwargs): + """ """ super(Revision, self).__init__(**kwargs) self.created_time = None self.fqdn = None @@ -4272,21 +4051,16 @@ class RevisionCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Revision]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Revision]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["Revision"], - **kwargs - ): + def __init__(self, *, value: List["Revision"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.Revision] @@ -4308,9 +4082,9 @@ class Scale(msrest.serialization.Model): """ _attribute_map = { - 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, - 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, - 'rules': {'key': 'rules', 'type': '[ScaleRule]'}, + "min_replicas": {"key": "minReplicas", "type": "int"}, + "max_replicas": {"key": "maxReplicas", "type": "int"}, + "rules": {"key": "rules", "type": "[ScaleRule]"}, } def __init__( @@ -4350,10 +4124,10 @@ class ScaleRule(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'azure_queue': {'key': 'azureQueue', 'type': 'QueueScaleRule'}, - 'custom': {'key': 'custom', 'type': 'CustomScaleRule'}, - 'http': {'key': 'http', 'type': 'HttpScaleRule'}, + "name": {"key": "name", "type": "str"}, + "azure_queue": {"key": "azureQueue", "type": "QueueScaleRule"}, + "custom": {"key": "custom", "type": "CustomScaleRule"}, + "http": {"key": "http", "type": "HttpScaleRule"}, } def __init__( @@ -4392,17 +4166,11 @@ class ScaleRuleAuth(msrest.serialization.Model): """ _attribute_map = { - 'secret_ref': {'key': 'secretRef', 'type': 'str'}, - 'trigger_parameter': {'key': 'triggerParameter', 'type': 'str'}, + "secret_ref": {"key": "secretRef", "type": "str"}, + "trigger_parameter": {"key": "triggerParameter", "type": "str"}, } - def __init__( - self, - *, - secret_ref: Optional[str] = None, - trigger_parameter: Optional[str] = None, - **kwargs - ): + def __init__(self, *, secret_ref: Optional[str] = None, trigger_parameter: Optional[str] = None, **kwargs): """ :keyword secret_ref: Name of the Container App secret from which to pull the auth params. :paramtype secret_ref: str @@ -4424,17 +4192,11 @@ class Secret(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs): """ :keyword name: Secret Name. :paramtype name: str @@ -4456,19 +4218,14 @@ class SecretsCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ContainerAppSecret]'}, + "value": {"key": "value", "type": "[ContainerAppSecret]"}, } - def __init__( - self, - *, - value: List["ContainerAppSecret"], - **kwargs - ): + def __init__(self, *, value: List["ContainerAppSecret"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.ContainerAppSecret] @@ -4509,22 +4266,25 @@ class SourceControl(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'operation_state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "operation_state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'operation_state': {'key': 'properties.operationState', 'type': 'str'}, - 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'github_action_configuration': {'key': 'properties.githubActionConfiguration', 'type': 'GithubActionConfiguration'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "operation_state": {"key": "properties.operationState", "type": "str"}, + "repo_url": {"key": "properties.repoUrl", "type": "str"}, + "branch": {"key": "properties.branch", "type": "str"}, + "github_action_configuration": { + "key": "properties.githubActionConfiguration", + "type": "GithubActionConfiguration", + }, } def __init__( @@ -4568,21 +4328,16 @@ class SourceControlCollection(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, - 'next_link': {'readonly': True}, + "value": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[SourceControl]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[SourceControl]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["SourceControl"], - **kwargs - ): + def __init__(self, *, value: List["SourceControl"], **kwargs): """ :keyword value: Required. Collection of resources. :paramtype value: list[~container_apps_api_client.models.SourceControl] @@ -4612,12 +4367,12 @@ class SystemData(msrest.serialization.Model): """ _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } def __init__( @@ -4658,24 +4413,24 @@ def __init__( class Template(msrest.serialization.Model): """Container App versioned application definition. -Defines the desired state of an immutable revision. -Any changes to this section Will result in a new revision being created. - - :ivar revision_suffix: User friendly suffix that is appended to the revision name. - :vartype revision_suffix: str - :ivar containers: List of container definitions for the Container App. - :vartype containers: list[~container_apps_api_client.models.Container] - :ivar scale: Scaling properties for the Container App. - :vartype scale: ~container_apps_api_client.models.Scale - :ivar volumes: List of volume definitions for the Container App. - :vartype volumes: list[~container_apps_api_client.models.Volume] + Defines the desired state of an immutable revision. + Any changes to this section Will result in a new revision being created. + + :ivar revision_suffix: User friendly suffix that is appended to the revision name. + :vartype revision_suffix: str + :ivar containers: List of container definitions for the Container App. + :vartype containers: list[~container_apps_api_client.models.Container] + :ivar scale: Scaling properties for the Container App. + :vartype scale: ~container_apps_api_client.models.Scale + :ivar volumes: List of volume definitions for the Container App. + :vartype volumes: list[~container_apps_api_client.models.Volume] """ _attribute_map = { - 'revision_suffix': {'key': 'revisionSuffix', 'type': 'str'}, - 'containers': {'key': 'containers', 'type': '[Container]'}, - 'scale': {'key': 'scale', 'type': 'Scale'}, - 'volumes': {'key': 'volumes', 'type': '[Volume]'}, + "revision_suffix": {"key": "revisionSuffix", "type": "str"}, + "containers": {"key": "containers", "type": "[Container]"}, + "scale": {"key": "scale", "type": "Scale"}, + "volumes": {"key": "volumes", "type": "[Volume]"}, } def __init__( @@ -4716,9 +4471,9 @@ class TrafficWeight(msrest.serialization.Model): """ _attribute_map = { - 'revision_name': {'key': 'revisionName', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'latest_revision': {'key': 'latestRevision', 'type': 'bool'}, + "revision_name": {"key": "revisionName", "type": "str"}, + "weight": {"key": "weight", "type": "int"}, + "latest_revision": {"key": "latestRevision", "type": "bool"}, } def __init__( @@ -4756,16 +4511,12 @@ class Twitter(msrest.serialization.Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'registration': {'key': 'registration', 'type': 'TwitterRegistration'}, + "enabled": {"key": "enabled", "type": "bool"}, + "registration": {"key": "registration", "type": "TwitterRegistration"}, } def __init__( - self, - *, - enabled: Optional[bool] = None, - registration: Optional["TwitterRegistration"] = None, - **kwargs + self, *, enabled: Optional[bool] = None, registration: Optional["TwitterRegistration"] = None, **kwargs ): """ :keyword enabled: :code:`false` if the Twitter provider should not be enabled @@ -4794,16 +4545,12 @@ class TwitterRegistration(msrest.serialization.Model): """ _attribute_map = { - 'consumer_key': {'key': 'consumerKey', 'type': 'str'}, - 'consumer_secret_setting_name': {'key': 'consumerSecretSettingName', 'type': 'str'}, + "consumer_key": {"key": "consumerKey", "type": "str"}, + "consumer_secret_setting_name": {"key": "consumerSecretSettingName", "type": "str"}, } def __init__( - self, - *, - consumer_key: Optional[str] = None, - consumer_secret_setting_name: Optional[str] = None, - **kwargs + self, *, consumer_key: Optional[str] = None, consumer_secret_setting_name: Optional[str] = None, **kwargs ): """ :keyword consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. @@ -4832,21 +4579,17 @@ class UserAssignedIdentity(msrest.serialization.Model): """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(UserAssignedIdentity, self).__init__(**kwargs) self.principal_id = None self.client_id = None @@ -4879,12 +4622,12 @@ class VnetConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'internal': {'key': 'internal', 'type': 'bool'}, - 'infrastructure_subnet_id': {'key': 'infrastructureSubnetId', 'type': 'str'}, - 'runtime_subnet_id': {'key': 'runtimeSubnetId', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, - 'platform_reserved_cidr': {'key': 'platformReservedCidr', 'type': 'str'}, - 'platform_reserved_dns_ip': {'key': 'platformReservedDnsIP', 'type': 'str'}, + "internal": {"key": "internal", "type": "bool"}, + "infrastructure_subnet_id": {"key": "infrastructureSubnetId", "type": "str"}, + "runtime_subnet_id": {"key": "runtimeSubnetId", "type": "str"}, + "docker_bridge_cidr": {"key": "dockerBridgeCidr", "type": "str"}, + "platform_reserved_cidr": {"key": "platformReservedCidr", "type": "str"}, + "platform_reserved_dns_ip": {"key": "platformReservedDnsIP", "type": "str"}, } def __init__( @@ -4943,9 +4686,9 @@ class Volume(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - 'storage_name': {'key': 'storageName', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "storage_type": {"key": "storageType", "type": "str"}, + "storage_name": {"key": "storageName", "type": "str"}, } def __init__( @@ -4982,17 +4725,11 @@ class VolumeMount(msrest.serialization.Model): """ _attribute_map = { - 'volume_name': {'key': 'volumeName', 'type': 'str'}, - 'mount_path': {'key': 'mountPath', 'type': 'str'}, + "volume_name": {"key": "volumeName", "type": "str"}, + "mount_path": {"key": "mountPath", "type": "str"}, } - def __init__( - self, - *, - volume_name: Optional[str] = None, - mount_path: Optional[str] = None, - **kwargs - ): + def __init__(self, *, volume_name: Optional[str] = None, mount_path: Optional[str] = None, **kwargs): """ :keyword volume_name: This must match the Name of a Volume. :paramtype volume_name: str diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py index 021cee48b4be..f53362a484fb 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py @@ -18,14 +18,14 @@ from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations __all__ = [ - 'ContainerAppsOperations', - 'ContainerAppsRevisionsOperations', - 'ContainerAppsRevisionReplicasOperations', - 'ManagedEnvironmentsOperations', - 'CertificatesOperations', - 'Operations', - 'ContainerAppsSourceControlsOperations', - 'DaprComponentsOperations', - 'ContainerAppsAuthConfigsOperations', - 'ManagedEnvironmentsStoragesOperations', + "ContainerAppsOperations", + "ContainerAppsRevisionsOperations", + "ContainerAppsRevisionReplicasOperations", + "ManagedEnvironmentsOperations", + "CertificatesOperations", + "Operations", + "ContainerAppsSourceControlsOperations", + "DaprComponentsOperations", + "ContainerAppsAuthConfigsOperations", + "ManagedEnvironmentsStoragesOperations", ] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py index a0d95b39d63c..aa17e8853737 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -20,83 +26,76 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, - resource_group_name: str, - managed_environment_name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, managed_environment_name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - managed_environment_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, managed_environment_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request( @@ -109,77 +108,71 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request( - subscription_id: str, - resource_group_name: str, - managed_environment_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, managed_environment_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_update_request( @@ -192,30 +185,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="PATCH", @@ -227,6 +225,7 @@ def build_update_request( **kwargs ) + class CertificatesOperations(object): """CertificatesOperations operations. @@ -251,10 +250,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( - self, - resource_group_name: str, - managed_environment_name: str, - **kwargs: Any + self, resource_group_name: str, managed_environment_name: str, **kwargs: Any ) -> Iterable["_models.CertificateCollection"]: """Get the Certificates in a given managed environment. @@ -270,25 +266,24 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CertificateCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, managed_environment_name=managed_environment_name, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -320,19 +315,13 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates'} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - managed_environment_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, managed_environment_name: str, name: str, **kwargs: Any ) -> "_models.Certificate": """Get the specified Certificate. @@ -349,19 +338,16 @@ def get( :rtype: ~container_apps_api_client.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Certificate"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, managed_environment_name=managed_environment_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -374,15 +360,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Certificate', pipeline_response) + deserialized = self._deserialize("Certificate", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore @distributed_trace def create_or_update( @@ -410,16 +395,14 @@ def create_or_update( :rtype: ~container_apps_api_client.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Certificate"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if certificate_envelope is not None: - _json = self._serialize.body(certificate_envelope, 'Certificate') + _json = self._serialize.body(certificate_envelope, "Certificate") else: _json = None @@ -430,7 +413,7 @@ def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -443,24 +426,17 @@ def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Certificate', pipeline_response) + deserialized = self._deserialize("Certificate", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore @distributed_trace - def delete( - self, - resource_group_name: str, - managed_environment_name: str, - name: str, - **kwargs: Any - ) -> None: + def delete(self, resource_group_name: str, managed_environment_name: str, name: str, **kwargs: Any) -> None: """Deletes the specified Certificate. Deletes the specified Certificate. @@ -476,19 +452,16 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, managed_environment_name=managed_environment_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -504,8 +477,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore @distributed_trace def update( @@ -533,15 +505,13 @@ def update( :rtype: ~container_apps_api_client.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Certificate"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(certificate_envelope, 'CertificatePatch') + _json = self._serialize.body(certificate_envelope, "CertificatePatch") request = build_update_request( subscription_id=self._config.subscription_id, @@ -550,7 +520,7 @@ def update( name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -563,12 +533,11 @@ def update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Certificate', pipeline_response) + deserialized = self._deserialize("Certificate", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore - + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py index 5cf790e91218..df2b7efa4b5e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -20,83 +26,76 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_by_container_app_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request( @@ -109,77 +108,72 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) class ContainerAppsAuthConfigsOperations(object): """ContainerAppsAuthConfigsOperations operations. @@ -205,10 +199,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_by_container_app( - self, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> Iterable["_models.AuthConfigCollection"]: """Get the Container App AuthConfigs in a given resource group. @@ -224,25 +215,24 @@ def list_by_container_app( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.AuthConfigCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfigCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AuthConfigCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - template_url=self.list_by_container_app.metadata['url'], + template_url=self.list_by_container_app.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -274,20 +264,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_container_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs'} # type: ignore + list_by_container_app.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs"} # type: ignore @distributed_trace - def get( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> "_models.AuthConfig": + def get(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> "_models.AuthConfig": """Get a AuthConfig of a Container App. Get a AuthConfig of a Container App. @@ -303,19 +285,16 @@ def get( :rtype: ~container_apps_api_client.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AuthConfig"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -328,15 +307,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AuthConfig', pipeline_response) + deserialized = self._deserialize("AuthConfig", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}"} # type: ignore @distributed_trace def create_or_update( @@ -364,15 +342,13 @@ def create_or_update( :rtype: ~container_apps_api_client.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AuthConfig"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(auth_config_envelope, 'AuthConfig') + _json = self._serialize.body(auth_config_envelope, "AuthConfig") request = build_create_or_update_request( subscription_id=self._config.subscription_id, @@ -381,7 +357,7 @@ def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -394,24 +370,17 @@ def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AuthConfig', pipeline_response) + deserialized = self._deserialize("AuthConfig", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}"} # type: ignore @distributed_trace - def delete( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> None: + def delete(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> None: """Delete a Container App AuthConfig. Description for Delete a Container App AuthConfig. @@ -427,19 +396,16 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -455,5 +421,4 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py index 84b483c37f78..0e126f4080da 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -22,110 +28,92 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_by_subscription_request( - subscription_id: str, - **kwargs: Any -) -> HttpRequest: + +def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps') + url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps") path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) -def build_list_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - **kwargs: Any -) -> HttpRequest: +def build_list_by_resource_group_request(subscription_id: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) -def build_get_request( - subscription_id: str, - resource_group_name: str, - name: str, - **kwargs: Any -) -> HttpRequest: +def build_get_request(subscription_id: str, resource_group_name: str, name: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request_initial( @@ -137,74 +125,69 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_update_request( @@ -216,29 +199,34 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="PATCH", @@ -262,11 +250,16 @@ def build_list_custom_host_name_analysis_request( api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), } url = _format_url_section(url, **path_format_arguments) @@ -274,55 +267,44 @@ def build_list_custom_host_name_analysis_request( # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if custom_hostname is not None: - query_parameters['customHostname'] = _SERIALIZER.query("custom_hostname", custom_hostname, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["customHostname"] = _SERIALIZER.query("custom_hostname", custom_hostname, "str") + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="POST", url=url, params=query_parameters, headers=header_parameters, **kwargs) -def build_list_secrets_request( - subscription_id: str, - resource_group_name: str, - name: str, - **kwargs: Any -) -> HttpRequest: +def build_list_secrets_request(subscription_id: str, resource_group_name: str, name: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=url, params=query_parameters, headers=header_parameters, **kwargs) - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) class ContainerAppsOperations(object): """ContainerAppsOperations operations. @@ -347,10 +329,7 @@ def __init__(self, client, config, serializer, deserializer): self._config = config @distributed_trace - def list_by_subscription( - self, - **kwargs: Any - ) -> Iterable["_models.ContainerAppCollection"]: + def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ContainerAppCollection"]: """Get the Container Apps in a given subscription. Get the Container Apps in a given subscription. @@ -361,23 +340,22 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerAppCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, - template_url=self.list_by_subscription.metadata['url'], + template_url=self.list_by_subscription.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, template_url=next_link, @@ -407,17 +385,13 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps'} # type: ignore + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any + self, resource_group_name: str, **kwargs: Any ) -> Iterable["_models.ContainerAppCollection"]: """Get the Container Apps in a given resource group. @@ -431,24 +405,23 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerAppCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -479,19 +452,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps'} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"} # type: ignore @distributed_trace - def get( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> "_models.ContainerApp": + def get(self, resource_group_name: str, name: str, **kwargs: Any) -> "_models.ContainerApp": """Get the properties of a Container App. Get the properties of a Container App. @@ -505,18 +471,15 @@ def get( :rtype: ~container_apps_api_client.models.ContainerApp :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -529,32 +492,25 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore def _create_or_update_initial( - self, - resource_group_name: str, - name: str, - container_app_envelope: "_models.ContainerApp", - **kwargs: Any + self, resource_group_name: str, name: str, container_app_envelope: "_models.ContainerApp", **kwargs: Any ) -> "_models.ContainerApp": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(container_app_envelope, 'ContainerApp') + _json = self._serialize.body(container_app_envelope, "ContainerApp") request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, @@ -562,7 +518,7 @@ def _create_or_update_initial( name=name, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -575,26 +531,21 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace def begin_create_or_update( - self, - resource_group_name: str, - name: str, - container_app_envelope: "_models.ContainerApp", - **kwargs: Any + self, resource_group_name: str, name: str, container_app_envelope: "_models.ContainerApp", **kwargs: Any ) -> LROPoller["_models.ContainerApp"]: """Create or update a Container App. @@ -619,66 +570,57 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~container_apps_api_client.models.ContainerApp] :raises: ~azure.core.exceptions.HttpResponseError """ - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, name=name, container_app_envelope=container_app_envelope, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - - def _delete_initial( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore + + def _delete_initial(self, resource_group_name: str, name: str, **kwargs: Any) -> None: + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -693,16 +635,10 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace - def begin_delete( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_delete(self, resource_group_name: str, name: str, **kwargs: Any) -> LROPoller[None]: """Delete a Container App. Description for Delete a Container App. @@ -723,49 +659,41 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - cls=lambda x,y,z: x, - **kwargs + resource_group_name=resource_group_name, name=name, cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace def update( - self, - resource_group_name: str, - name: str, - container_app_envelope: "_models.ContainerAppPatch", - **kwargs: Any + self, resource_group_name: str, name: str, container_app_envelope: "_models.ContainerAppPatch", **kwargs: Any ) -> "_models.ContainerApp": """Update properties of a Container App. @@ -782,15 +710,13 @@ def update( :rtype: ~container_apps_api_client.models.ContainerApp :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ContainerApp"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(container_app_envelope, 'ContainerAppPatch') + _json = self._serialize.body(container_app_envelope, "ContainerAppPatch") request = build_update_request( subscription_id=self._config.subscription_id, @@ -798,7 +724,7 @@ def update( name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -811,23 +737,18 @@ def update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ContainerApp', pipeline_response) + deserialized = self._deserialize("ContainerApp", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}"} # type: ignore @distributed_trace def list_custom_host_name_analysis( - self, - resource_group_name: str, - container_app_name: str, - custom_hostname: Optional[str] = None, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, custom_hostname: Optional[str] = None, **kwargs: Any ) -> "_models.CustomHostnameAnalysisResult": """Analyzes a custom hostname for a Container App. @@ -844,19 +765,16 @@ def list_custom_host_name_analysis( :rtype: ~container_apps_api_client.models.CustomHostnameAnalysisResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CustomHostnameAnalysisResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_custom_host_name_analysis_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, custom_hostname=custom_hostname, - template_url=self.list_custom_host_name_analysis.metadata['url'], + template_url=self.list_custom_host_name_analysis.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -869,23 +787,17 @@ def list_custom_host_name_analysis( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('CustomHostnameAnalysisResult', pipeline_response) + deserialized = self._deserialize("CustomHostnameAnalysisResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_custom_host_name_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis'} # type: ignore - + list_custom_host_name_analysis.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis"} # type: ignore @distributed_trace - def list_secrets( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> "_models.SecretsCollection": + def list_secrets(self, resource_group_name: str, name: str, **kwargs: Any) -> "_models.SecretsCollection": """List secrets for a container app. List secrets for a container app. @@ -899,18 +811,15 @@ def list_secrets( :rtype: ~container_apps_api_client.models.SecretsCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SecretsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_secrets_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self.list_secrets.metadata['url'], + template_url=self.list_secrets.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -923,12 +832,11 @@ def list_secrets( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecretsCollection', pipeline_response) + deserialized = self._deserialize("SecretsCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets'} # type: ignore - + list_secrets.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py index 7ed14ea71456..daa3de17c24e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest @@ -19,12 +25,14 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_get_replica_request( subscription_id: str, resource_group_name: str, @@ -36,69 +44,64 @@ def build_get_replica_request( api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "revisionName": _SERIALIZER.url("revision_name", revision_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_list_replicas_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - revision_name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, revision_name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "revisionName": _SERIALIZER.url("revision_name", revision_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) + class ContainerAppsRevisionReplicasOperations(object): """ContainerAppsRevisionReplicasOperations operations. @@ -124,12 +127,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get_replica( - self, - resource_group_name: str, - container_app_name: str, - revision_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, revision_name: str, name: str, **kwargs: Any ) -> "_models.Replica": """Get a replica for a Container App Revision. @@ -148,20 +146,17 @@ def get_replica( :rtype: ~container_apps_api_client.models.Replica :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Replica"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Replica"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_replica_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, revision_name=revision_name, name=name, - template_url=self.get_replica.metadata['url'], + template_url=self.get_replica.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -174,23 +169,18 @@ def get_replica( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Replica', pipeline_response) + deserialized = self._deserialize("Replica", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_replica.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}'} # type: ignore - + get_replica.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}"} # type: ignore @distributed_trace def list_replicas( - self, - resource_group_name: str, - container_app_name: str, - revision_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, revision_name: str, **kwargs: Any ) -> "_models.ReplicaCollection": """List replicas for a Container App Revision. @@ -207,19 +197,16 @@ def list_replicas( :rtype: ~container_apps_api_client.models.ReplicaCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ReplicaCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_replicas_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, revision_name=revision_name, - template_url=self.list_replicas.metadata['url'], + template_url=self.list_replicas.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -232,12 +219,11 @@ def list_replicas( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ReplicaCollection', pipeline_response) + deserialized = self._deserialize("ReplicaCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_replicas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas'} # type: ignore - + list_replicas.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py index 55acb0f3d9c7..1eec12a52147 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -20,193 +26,172 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_revisions_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_get_revision_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_activate_revision_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_deactivate_revision_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_restart_revision_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=url, params=query_parameters, headers=header_parameters, **kwargs) + class ContainerAppsRevisionsOperations(object): """ContainerAppsRevisionsOperations operations. @@ -232,10 +217,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_revisions( - self, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> Iterable["_models.RevisionCollection"]: """Get the Revisions for a given Container App. @@ -250,25 +232,24 @@ def list_revisions( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.RevisionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RevisionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RevisionCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_revisions_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - template_url=self.list_revisions.metadata['url'], + template_url=self.list_revisions.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_revisions_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -300,19 +281,13 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_revisions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions'} # type: ignore + list_revisions.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions"} # type: ignore @distributed_trace def get_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> "_models.Revision": """Get a revision of a Container App. @@ -329,19 +304,16 @@ def get_revision( :rtype: ~container_apps_api_client.models.Revision :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Revision"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.Revision"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.get_revision.metadata['url'], + template_url=self.get_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -354,24 +326,17 @@ def get_revision( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Revision', pipeline_response) + deserialized = self._deserialize("Revision", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}'} # type: ignore - + get_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}"} # type: ignore @distributed_trace - def activate_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> None: + def activate_revision(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> None: """Activates a revision for a Container App. Activates a revision for a Container App. @@ -387,19 +352,16 @@ def activate_revision( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_activate_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.activate_revision.metadata['url'], + template_url=self.activate_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -415,17 +377,10 @@ def activate_revision( if cls: return cls(pipeline_response, None, {}) - activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate'} # type: ignore - + activate_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate"} # type: ignore @distributed_trace - def deactivate_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> None: + def deactivate_revision(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> None: """Deactivates a revision for a Container App. Deactivates a revision for a Container App. @@ -441,19 +396,16 @@ def deactivate_revision( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_deactivate_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.deactivate_revision.metadata['url'], + template_url=self.deactivate_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -469,17 +421,10 @@ def deactivate_revision( if cls: return cls(pipeline_response, None, {}) - deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate'} # type: ignore - + deactivate_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate"} # type: ignore @distributed_trace - def restart_revision( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> None: + def restart_revision(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> None: """Restarts a revision for a Container App. Restarts a revision for a Container App. @@ -495,19 +440,16 @@ def restart_revision( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_restart_revision_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.restart_revision.metadata['url'], + template_url=self.restart_revision.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -523,5 +465,4 @@ def restart_revision( if cls: return cls(pipeline_response, None, {}) - restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart'} # type: ignore - + restart_revision.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py index 840a4c9f6839..1afbb1c9d6e9 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -22,83 +28,76 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_by_container_app_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request_initial( @@ -111,77 +110,72 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) class ContainerAppsSourceControlsOperations(object): """ContainerAppsSourceControlsOperations operations. @@ -207,10 +201,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_by_container_app( - self, - resource_group_name: str, - container_app_name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, **kwargs: Any ) -> Iterable["_models.SourceControlCollection"]: """Get the Container App SourceControls in a given resource group. @@ -226,25 +217,24 @@ def list_by_container_app( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControlCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - template_url=self.list_by_container_app.metadata['url'], + template_url=self.list_by_container_app.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_container_app_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -276,19 +266,13 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_container_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols'} # type: ignore + list_by_container_app.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> "_models.SourceControl": """Get a SourceControl of a Container App. @@ -305,19 +289,16 @@ def get( :rtype: ~container_apps_api_client.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControl"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -330,15 +311,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore def _create_or_update_initial( self, @@ -348,15 +328,13 @@ def _create_or_update_initial( source_control_envelope: "_models.SourceControl", **kwargs: Any ) -> "_models.SourceControl": - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControl"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(source_control_envelope, 'SourceControl') + _json = self._serialize.body(source_control_envelope, "SourceControl") request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, @@ -365,7 +343,7 @@ def _create_or_update_initial( name=name, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -378,18 +356,17 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if response.status_code == 202: - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore @distributed_trace def begin_create_or_update( @@ -425,14 +402,11 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~container_apps_api_client.models.SourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.SourceControl"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -440,54 +414,47 @@ def begin_create_or_update( name=name, source_control_envelope=source_control_envelope, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = self._deserialize('SourceControl', pipeline_response) + deserialized = self._deserialize("SourceControl", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore + + def _delete_initial(self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any) -> None: + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - def _delete_initial( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -502,16 +469,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore @distributed_trace def begin_delete( - self, - resource_group_name: str, - container_app_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, container_app_name: str, name: str, **kwargs: Any ) -> LROPoller[None]: """Delete a Container App SourceControl. @@ -535,39 +497,38 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}'} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py index a61679d7fa61..52eee8b9df79 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -20,83 +26,76 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_list_request( - subscription_id: str, - resource_group_name: str, - environment_name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, environment_name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "environmentName": _SERIALIZER.url("environment_name", environment_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - environment_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, environment_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "environmentName": _SERIALIZER.url("environment_name", environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request( @@ -109,77 +108,72 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "environmentName": _SERIALIZER.url("environment_name", environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request( - subscription_id: str, - resource_group_name: str, - environment_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, environment_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "environmentName": _SERIALIZER.url("environment_name", environment_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) class DaprComponentsOperations(object): """DaprComponentsOperations operations. @@ -205,10 +199,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( - self, - resource_group_name: str, - environment_name: str, - **kwargs: Any + self, resource_group_name: str, environment_name: str, **kwargs: Any ) -> Iterable["_models.DaprComponentsCollection"]: """Get the Dapr Components for a managed environment. @@ -225,25 +216,24 @@ def list( ~azure.core.paging.ItemPaged[~container_apps_api_client.models.DaprComponentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponentsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.DaprComponentsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -275,20 +265,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents'} # type: ignore + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents"} # type: ignore @distributed_trace - def get( - self, - resource_group_name: str, - environment_name: str, - name: str, - **kwargs: Any - ) -> "_models.DaprComponent": + def get(self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any) -> "_models.DaprComponent": """Get a dapr component. Get a dapr component. @@ -304,19 +286,16 @@ def get( :rtype: ~container_apps_api_client.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.DaprComponent"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -329,15 +308,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('DaprComponent', pipeline_response) + deserialized = self._deserialize("DaprComponent", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}"} # type: ignore @distributed_trace def create_or_update( @@ -365,15 +343,13 @@ def create_or_update( :rtype: ~container_apps_api_client.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.DaprComponent"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(dapr_component_envelope, 'DaprComponent') + _json = self._serialize.body(dapr_component_envelope, "DaprComponent") request = build_create_or_update_request( subscription_id=self._config.subscription_id, @@ -382,7 +358,7 @@ def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -395,24 +371,17 @@ def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('DaprComponent', pipeline_response) + deserialized = self._deserialize("DaprComponent", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}"} # type: ignore @distributed_trace - def delete( - self, - resource_group_name: str, - environment_name: str, - name: str, - **kwargs: Any - ) -> None: + def delete(self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any) -> None: """Delete a Dapr Component. Delete a Dapr Component from a Managed Environment. @@ -428,19 +397,16 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -456,5 +422,4 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py index e9846a028b32..5ddc40e7c8d2 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -22,110 +28,92 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_by_subscription_request( - subscription_id: str, - **kwargs: Any -) -> HttpRequest: + +def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments') + url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments") path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) -def build_list_by_resource_group_request( - subscription_id: str, - resource_group_name: str, - **kwargs: Any -) -> HttpRequest: +def build_list_by_resource_group_request(subscription_id: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) -def build_get_request( - subscription_id: str, - resource_group_name: str, - name: str, - **kwargs: Any -) -> HttpRequest: +def build_get_request(subscription_id: str, resource_group_name: str, name: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request_initial( @@ -137,74 +125,69 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request_initial( - subscription_id: str, - resource_group_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_update_request( @@ -216,29 +199,34 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="PATCH", @@ -250,6 +238,7 @@ def build_update_request( **kwargs ) + class ManagedEnvironmentsOperations(object): """ManagedEnvironmentsOperations operations. @@ -273,10 +262,7 @@ def __init__(self, client, config, serializer, deserializer): self._config = config @distributed_trace - def list_by_subscription( - self, - **kwargs: Any - ) -> Iterable["_models.ManagedEnvironmentsCollection"]: + def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ManagedEnvironmentsCollection"]: """Get all Environments for a subscription. Get all Managed Environments for a subscription. @@ -288,23 +274,22 @@ def list_by_subscription( ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, - template_url=self.list_by_subscription.metadata['url'], + template_url=self.list_by_subscription.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, template_url=next_link, @@ -334,17 +319,13 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments'} # type: ignore + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any + self, resource_group_name: str, **kwargs: Any ) -> Iterable["_models.ManagedEnvironmentsCollection"]: """Get all the Environments in a resource group. @@ -359,24 +340,23 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentsCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list_by_resource_group.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_by_resource_group_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, @@ -407,19 +387,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments'} # type: ignore + list_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments"} # type: ignore @distributed_trace - def get( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> "_models.ManagedEnvironment": + def get(self, resource_group_name: str, name: str, **kwargs: Any) -> "_models.ManagedEnvironment": """Get the properties of a Managed Environment. Get the properties of a Managed Environment used to host container apps. @@ -433,18 +406,15 @@ def get( :rtype: ~container_apps_api_client.models.ManagedEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -457,32 +427,25 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore def _create_or_update_initial( - self, - resource_group_name: str, - name: str, - environment_envelope: "_models.ManagedEnvironment", - **kwargs: Any + self, resource_group_name: str, name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> "_models.ManagedEnvironment": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(environment_envelope, 'ManagedEnvironment') + _json = self._serialize.body(environment_envelope, "ManagedEnvironment") request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, @@ -490,7 +453,7 @@ def _create_or_update_initial( name=name, content_type=content_type, json=_json, - template_url=self._create_or_update_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -503,26 +466,21 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore @distributed_trace def begin_create_or_update( - self, - resource_group_name: str, - name: str, - environment_envelope: "_models.ManagedEnvironment", - **kwargs: Any + self, resource_group_name: str, name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> LROPoller["_models.ManagedEnvironment"]: """Creates or updates a Managed Environment. @@ -547,66 +505,57 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~container_apps_api_client.models.ManagedEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, name=name, environment_envelope=environment_envelope, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore + + def _delete_initial(self, resource_group_name: str, name: str, **kwargs: Any) -> None: + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - def _delete_initial( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, - template_url=self._delete_initial.metadata['url'], + template_url=self._delete_initial.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -621,16 +570,10 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + _delete_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( - self, - resource_group_name: str, - name: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_delete(self, resource_group_name: str, name: str, **kwargs: Any) -> LROPoller[None]: """Delete a Managed Environment. Delete a Managed Environment if it does not have any container apps. @@ -651,41 +594,37 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._delete_initial( - resource_group_name=resource_group_name, - name=name, - cls=lambda x,y,z: x, - **kwargs + resource_group_name=resource_group_name, name=name, cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -710,15 +649,13 @@ def update( :rtype: ~container_apps_api_client.models.ManagedEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironment"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(environment_envelope, 'ManagedEnvironmentPatch') + _json = self._serialize.body(environment_envelope, "ManagedEnvironmentPatch") request = build_update_request( subscription_id=self._config.subscription_id, @@ -726,7 +663,7 @@ def update( name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -739,12 +676,11 @@ def update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + deserialized = self._deserialize("ManagedEnvironment", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore - + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py index 065193077a23..767c7d8fee5e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest @@ -19,83 +25,74 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") JSONType = Any ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - subscription_id: str, - resource_group_name: str, - env_name: str, - **kwargs: Any -) -> HttpRequest: + +def build_list_request(subscription_id: str, resource_group_name: str, env_name: str, **kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "envName": _SERIALIZER.url("env_name", env_name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_get_request( - subscription_id: str, - resource_group_name: str, - env_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, env_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "envName": _SERIALIZER.url("env_name", env_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) def build_create_or_update_request( @@ -108,77 +105,72 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "envName": _SERIALIZER.url("env_name", env_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs + method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs ) def build_delete_request( - subscription_id: str, - resource_group_name: str, - env_name: str, - name: str, - **kwargs: Any + subscription_id: str, resource_group_name: str, env_name: str, name: str, **kwargs: Any ) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}') + url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}", + ) path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "envName": _SERIALIZER.url("env_name", env_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs) - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) class ManagedEnvironmentsStoragesOperations(object): """ManagedEnvironmentsStoragesOperations operations. @@ -204,10 +196,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( - self, - resource_group_name: str, - env_name: str, - **kwargs: Any + self, resource_group_name: str, env_name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStoragesCollection": """Get all storages for a managedEnvironment. @@ -222,18 +211,15 @@ def list( :rtype: ~container_apps_api_client.models.ManagedEnvironmentStoragesCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStoragesCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentStoragesCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, env_name=env_name, - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -246,23 +232,18 @@ def list( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironmentStoragesCollection', pipeline_response) + deserialized = self._deserialize("ManagedEnvironmentStoragesCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages'} # type: ignore - + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages"} # type: ignore @distributed_trace def get( - self, - resource_group_name: str, - env_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, env_name: str, name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStorage": """Get storage for a managedEnvironment. @@ -279,19 +260,16 @@ def get( :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentStorage"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, env_name=env_name, name=name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -304,15 +282,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironmentStorage', pipeline_response) + deserialized = self._deserialize("ManagedEnvironmentStorage", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore - + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}"} # type: ignore @distributed_trace def create_or_update( @@ -340,15 +317,13 @@ def create_or_update( :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedEnvironmentStorage"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] - _json = self._serialize.body(storage_envelope, 'ManagedEnvironmentStorage') + _json = self._serialize.body(storage_envelope, "ManagedEnvironmentStorage") request = build_create_or_update_request( subscription_id=self._config.subscription_id, @@ -357,7 +332,7 @@ def create_or_update( name=name, content_type=content_type, json=_json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -370,24 +345,17 @@ def create_or_update( error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedEnvironmentStorage', pipeline_response) + deserialized = self._deserialize("ManagedEnvironmentStorage", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore - + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}"} # type: ignore @distributed_trace - def delete( - self, - resource_group_name: str, - env_name: str, - name: str, - **kwargs: Any - ) -> None: + def delete(self, resource_group_name: str, env_name: str, name: str, **kwargs: Any) -> None: """Delete storage for a managedEnvironment. Delete storage for a managedEnvironment. @@ -403,19 +371,16 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, env_name=env_name, name=name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -431,5 +396,4 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore - + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py index a998d5f98846..be9aa3dca369 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -20,35 +26,30 @@ from .. import models as _models from .._vendor import _convert_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request( - **kwargs: Any -) -> HttpRequest: + +def build_list_request(**kwargs: Any) -> HttpRequest: api_version = "2022-01-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.App/operations') + url = kwargs.pop("template_url", "/providers/Microsoft.App/operations") # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs) - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) class Operations(object): """Operations operations. @@ -73,10 +74,7 @@ def __init__(self, client, config, serializer, deserializer): self._config = config @distributed_trace - def list( - self, - **kwargs: Any - ) -> Iterable["_models.AvailableOperations"]: + def list(self, **kwargs: Any) -> Iterable["_models.AvailableOperations"]: """Lists all of the available RP operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -84,22 +82,21 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.AvailableOperations] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AvailableOperations"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_list_request( - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - + request = build_list_request( template_url=next_link, ) @@ -128,8 +125,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.App/operations'} # type: ignore + list.metadata = {"url": "/providers/Microsoft.App/operations"} # type: ignore diff --git a/sdk/app/azure-mgmt-app/setup.py b/sdk/app/azure-mgmt-app/setup.py index 223689e1963c..c2a05a99c833 100644 --- a/sdk/app/azure-mgmt-app/setup.py +++ b/sdk/app/azure-mgmt-app/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/_patch.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/_patch.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/_patch.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/_patch.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/operations/_patch.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/operations/_patch.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/models/_patch.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/models/_patch.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/operations/_patch.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/operations/_patch.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/azure/mgmt/appcomplianceautomation/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/setup.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/setup.py index 4cb815f9aa9a..9ad1b19985b3 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/setup.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/conftest.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/conftest.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/test_cli_mgmt_appcomplianceautomation.py b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/test_cli_mgmt_appcomplianceautomation.py index 05b66985f8ad..9d2c563cfe2c 100644 --- a/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/test_cli_mgmt_appcomplianceautomation.py +++ b/sdk/appcomplianceautomation/azure-mgmt-appcomplianceautomation/tests/test_cli_mgmt_appcomplianceautomation.py @@ -1,21 +1,22 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.appcomplianceautomation import AppComplianceAutomationMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy import unittest + class TestMgmtAppComplianceAutomation(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(AppComplianceAutomationMgmtClient) - @unittest.skip('lack of vaild token to authentication') + @unittest.skip("lack of vaild token to authentication") @recorded_by_proxy def test_list_report(self): assert list(self.client.report.list()) == [] diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py index cd881719dc01..739d456f9aa9 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py @@ -16,7 +16,7 @@ List, Tuple, ) -from azure.appconfiguration import ( # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import ( # type: ignore # pylint:disable=no-name-in-module ConfigurationSetting, FeatureFlagConfigurationSetting, SecretReferenceConfigurationSetting, @@ -441,8 +441,8 @@ def _try_initialize(self, startup_exceptions: List[Exception], **kwargs: Any) -> for (key, label), etag in self._watched_settings.items(): if not etag: try: - watch_setting = client.get_configuration_setting(key, label, headers=headers) # type:ignore - watched_settings[(key, label)] = watch_setting.etag # type:ignore + watch_setting = client.get_configuration_setting(key, label, headers=headers) # type: ignore + watched_settings[(key, label)] = watch_setting.etag # type: ignore except HttpResponseError as e: if e.status_code == 404: # If the watched setting is not found a refresh should be triggered when it is created. diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py index 69bcd1a9de25..7ebad49da9dc 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationproviderbase.py @@ -26,7 +26,7 @@ ValuesView, TypeVar, ) -from azure.appconfiguration import ( # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import ( # type: ignore # pylint:disable=no-name-in-module ConfigurationSetting, FeatureFlagConfigurationSetting, ) @@ -51,7 +51,6 @@ from ._refresh_timer import _RefreshTimer from ._request_tracing_context import _RequestTracingContext - JSON = Mapping[str, Any] _T = TypeVar("_T") logger = logging.getLogger(__name__) @@ -155,7 +154,7 @@ def is_json_content_type(content_type: str) -> bool: if len(type_parts) != 2: return False - (main_type, sub_type) = type_parts + main_type, sub_type = type_parts if main_type != "application": return False @@ -168,7 +167,7 @@ def is_json_content_type(content_type: str) -> bool: def _build_watched_setting(setting: Union[str, Tuple[str, str]]) -> Tuple[str, str]: try: - key, label = setting # type:ignore + key, label = setting # type: ignore except (IndexError, ValueError): key = str(setting) # Ensure key is a string label = NULL_CHAR diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py index f3fe905efc12..f7f2b232d118 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_client_manager.py @@ -13,7 +13,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.exceptions import HttpResponseError from azure.core.credentials import TokenCredential -from azure.appconfiguration import ( # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import ( # type: ignore # pylint:disable=no-name-in-module ConfigurationSetting, AzureAppConfigurationClient, FeatureFlagConfigurationSetting, diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider.py index d147236c1bf4..a088b2d57f7b 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider.py @@ -4,7 +4,7 @@ # license information. # ------------------------------------------------------------------------- from typing import Mapping, Any, Dict -from azure.appconfiguration import SecretReferenceConfigurationSetting # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import SecretReferenceConfigurationSetting # type: ignore # pylint:disable=no-name-in-module from azure.keyvault.secrets import SecretClient, KeyVaultSecretIdentifier from azure.core.exceptions import ServiceRequestError from ._secret_provider_base import _SecretProviderBase diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider_base.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider_base.py index 7b1abb9d97dc..867b23c74c0c 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider_base.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_key_vault/_secret_provider_base.py @@ -11,7 +11,7 @@ Dict, Tuple, ) -from azure.appconfiguration import SecretReferenceConfigurationSetting # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import SecretReferenceConfigurationSetting # type: ignore # pylint:disable=no-name-in-module from azure.keyvault.secrets import KeyVaultSecretIdentifier from .._azureappconfigurationproviderbase import _RefreshTimer @@ -50,12 +50,10 @@ def resolve_keyvault_reference_base( self, config: SecretReferenceConfigurationSetting ) -> Tuple[KeyVaultSecretIdentifier, str]: if not self.uses_key_vault: - raise ValueError( - """ + raise ValueError(""" Either a credential to Key Vault, custom Key Vault client, or a secret resolver must be set to resolve Key Vault references. - """ - ) + """) if config.secret_id is None: raise ValueError("Key Vault reference must have a uri value.") diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_snapshot_reference_parser.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_snapshot_reference_parser.py index 08213687f188..882f24e63de2 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_snapshot_reference_parser.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_snapshot_reference_parser.py @@ -6,7 +6,7 @@ import json from typing import Optional -from azure.appconfiguration import ConfigurationSetting # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import ConfigurationSetting # type: ignore # pylint:disable=no-name-in-module from ._constants import SNAPSHOT_NAME_FIELD diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_async_client_manager.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_async_client_manager.py index 57ed038a1c7e..751ee72ac728 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_async_client_manager.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_async_client_manager.py @@ -13,7 +13,7 @@ from azure.core.async_paging import AsyncItemPaged from azure.core.tracing.decorator import distributed_trace from azure.core.exceptions import HttpResponseError -from azure.appconfiguration import ( # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import ( # type: ignore # pylint:disable=no-name-in-module ConfigurationSetting, FeatureFlagConfigurationSetting, SnapshotComposition, diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py index f22adc5275e6..2f2378142e62 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py @@ -18,7 +18,7 @@ Tuple, Union, ) -from azure.appconfiguration import ( # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import ( # type: ignore # pylint:disable=no-name-in-module ConfigurationSetting, FeatureFlagConfigurationSetting, SecretReferenceConfigurationSetting, @@ -457,8 +457,8 @@ async def _try_initialize(self, startup_exceptions: List[Exception], **kwargs: A try: watch_setting = await client.get_configuration_setting( key, label, headers=headers - ) # type:ignore - watched_settings[(key, label)] = watch_setting.etag # type:ignore + ) # type: ignore + watched_settings[(key, label)] = watch_setting.etag # type: ignore except HttpResponseError as e: if e.status_code == 404: # If the watched setting is not found a refresh should be triggered when it is created. diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_key_vault/_async_secret_provider.py b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_key_vault/_async_secret_provider.py index 70c61840d087..da1d65268473 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_key_vault/_async_secret_provider.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_key_vault/_async_secret_provider.py @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- import inspect from typing import Mapping, Any, Dict -from azure.appconfiguration import SecretReferenceConfigurationSetting # type:ignore # pylint:disable=no-name-in-module +from azure.appconfiguration import SecretReferenceConfigurationSetting # type: ignore # pylint:disable=no-name-in-module from azure.keyvault.secrets import KeyVaultSecretIdentifier from azure.keyvault.secrets.aio import SecretClient from azure.core.exceptions import ServiceRequestError diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/samples/async_snapshot_sample.py b/sdk/appconfiguration/azure-appconfiguration-provider/samples/async_snapshot_sample.py index 1f7b4951c0b7..cb318dc11919 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/samples/async_snapshot_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/samples/async_snapshot_sample.py @@ -6,8 +6,8 @@ import os import uuid import asyncio -from azure.appconfiguration.aio import AzureAppConfigurationClient # type:ignore -from azure.appconfiguration import ( # type:ignore +from azure.appconfiguration.aio import AzureAppConfigurationClient # type: ignore +from azure.appconfiguration import ( # type: ignore ConfigurationSettingsFilter, ConfigurationSetting, FeatureFlagConfigurationSetting, diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample.py b/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample.py index e3bd615ffc55..a361d6a02922 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample.py @@ -7,7 +7,7 @@ import time import random from sample_utilities import get_client_modifications -from azure.appconfiguration import ( # type:ignore +from azure.appconfiguration import ( # type: ignore AzureAppConfigurationClient, ConfigurationSetting, ) diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample_feature_flags.py b/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample_feature_flags.py index 3f4a260f32ea..ae75da93086a 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample_feature_flags.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/samples/refresh_sample_feature_flags.py @@ -6,7 +6,7 @@ import os import time from sample_utilities import get_client_modifications -from azure.appconfiguration import ( # type:ignore +from azure.appconfiguration import ( # type: ignore AzureAppConfigurationClient, ConfigurationSetting, FeatureFlagConfigurationSetting, diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/samples/sample_utilities.py b/sdk/appconfiguration/azure-appconfiguration-provider/samples/sample_utilities.py index 2f63ca76ad12..c8694d032a70 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/samples/sample_utilities.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/samples/sample_utilities.py @@ -13,6 +13,7 @@ - get_credential(): get credential of the ConfigurationClient It is not a file expected to run independently. """ + from azure.identity import AzureAuthorityHosts, DefaultAzureCredential from azure.identity.aio import DefaultAzureCredential as AsyncDefaultAzureCredential diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/samples/snapshot_sample.py b/sdk/appconfiguration/azure-appconfiguration-provider/samples/snapshot_sample.py index f382c5aa752e..6bbdc3ab75b4 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/samples/snapshot_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/samples/snapshot_sample.py @@ -7,7 +7,7 @@ import uuid from azure.identity import DefaultAzureCredential from azure.appconfiguration.provider import load, SettingSelector -from azure.appconfiguration import ( # type:ignore +from azure.appconfiguration import ( # type: ignore AzureAppConfigurationClient, ConfigurationSettingsFilter, ConfigurationSetting, diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_provider.py b/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_provider.py index 6e481c172e78..22c21d6976e1 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_provider.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_provider.py @@ -19,7 +19,6 @@ ) from azure.appconfiguration.provider._azureappconfigurationprovider import _buildprovider - AppConfigProviderPreparer = functools.partial( EnvironmentVariableLoader, "appconfiguration", diff --git a/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_setting_selector.py b/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_setting_selector.py index 0011f62ca932..5dffc720baa3 100644 --- a/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_setting_selector.py +++ b/sdk/appconfiguration/azure-appconfiguration-provider/tests/test_setting_selector.py @@ -48,10 +48,10 @@ def test_setting_selector_invalid_tag_filters(self): """Test that appropriate exceptions are raised for invalid tag filters.""" # Non-list tag filters with pytest.raises(TypeError, match="tag_filters must be a list of strings."): - SettingSelector(key_filter="*", tag_filters="tag=value") # type:ignore + SettingSelector(key_filter="*", tag_filters="tag=value") # type: ignore with pytest.raises(TypeError, match="tag_filters must be a list of strings."): - SettingSelector(key_filter="*", tag_filters={"tag": "value"}) # type:ignore + SettingSelector(key_filter="*", tag_filters={"tag": "value"}) # type: ignore # Empty tag filter with pytest.raises(ValueError, match="Tag filter cannot be an empty string or None."): diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_patch.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_patch.py index 0937eaf22362..dc774eb65acb 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_patch.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json import urllib.parse from typing import Any, Iterable, List, Optional, Union, MutableMapping, Type diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_patch.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_patch.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py index ea4cb88e7b8e..2cba14b99dc5 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json import urllib.parse from typing import Any, AsyncIterable, List, Optional, Union, MutableMapping, Type diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_patch.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_patch.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_patch.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_patch.py index 4c3ef970b6f9..c0d3c00329a7 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_patch.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import datetime from typing import Any, Dict, List, Mapping, Optional, overload diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample.py index b3d433567c49..b890f00ebefa 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.core import MatchConditions from azure.core.exceptions import ResourceModifiedError diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample_async.py index e8a0e977d4df..c97fb4aaf469 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import asyncio import os from azure.core import MatchConditions diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_entra_id_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_entra_id_sample.py index 91ecbd5ff622..eb2e7c32eefa 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_entra_id_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_entra_id_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_ENDPOINT_STRING: Endpoint URL used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient from azure.identity import DefaultAzureCredential diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample.py index 431a8bc63e15..c9d6225ee6f7 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + from azure.appconfiguration import ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py index 216373ee0f06..a4e2c12fb3dd 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import asyncio from azure.appconfiguration import ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_entra_id_and_bleu.py b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_entra_id_and_bleu.py index 2a433764fb2a..1f32e4ecce61 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_entra_id_and_bleu.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_entra_id_and_bleu.py @@ -21,10 +21,10 @@ 2) AZURE_TENANT_ID: Your Azure tenant ID 3) AZURE_CLIENT_ID: Your application (client) ID 4) AZURE_CLIENT_SECRET: Your application client secret - + For Azure Bleu (French Sovereign Cloud): - Use audience: ["https://appconfig.sovcloud-api.fr/"] - + DefaultAzureCredential will attempt multiple authentication methods: - Environment variables (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET) - Managed Identity @@ -33,6 +33,7 @@ - Azure PowerShell - Interactive browser """ + import os from azure.appconfiguration import AzureAppConfigurationClient from azure.identity import DefaultAzureCredential diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample.py index 8cf04f3fe128..4aafd0c6ad9b 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient, ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample_async.py index 27e402ab5b1f..22060ef3d14b 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/list_configuration_settings_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os import asyncio from azure.appconfiguration import ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample.py index dd6cdd6b9164..e50b9b5c1501 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient, ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample_async.py index d36648445451..ef3334ac1719 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/list_labels_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os import asyncio from azure.appconfiguration import ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample.py index defee06696a8..ddc8f7d1ae1e 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient, ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample_async.py index 0ffdc2f38751..44ffaf91dec2 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import asyncio import os from azure.appconfiguration import ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample.py index 693fe1319496..b1db4cee4152 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient, ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample_async.py index 46b4137a2fe1..81f551ec6a63 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import asyncio import os from azure.appconfiguration import ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample.py index 8af04ce58f40..04d97c198045 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample.py @@ -18,6 +18,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient from azure.core.rest import HttpRequest diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample_async.py index 2995e74c4f77..8f86b1e762cd 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/send_request_sample_async.py @@ -18,6 +18,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os import asyncio from azure.appconfiguration.aio import AzureAppConfigurationClient diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample.py index a6ab605d83fe..7401ab9caf7e 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample.py @@ -18,6 +18,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from uuid import uuid4 from azure.appconfiguration import AzureAppConfigurationClient, ConfigurationSetting diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample_async.py index 9e1e33b755e7..7f6e88eab4d0 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/snapshot_sample_async.py @@ -18,6 +18,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import asyncio import os from uuid import uuid4 diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample.py b/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample.py index 14ded09f388b..b1dd9b96ed1c 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample.py @@ -18,6 +18,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import os from azure.appconfiguration import AzureAppConfigurationClient diff --git a/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample_async.py b/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample_async.py index feb44c8a3e29..9c6d53c6cdef 100644 --- a/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/samples/sync_token_sample_async.py @@ -17,6 +17,7 @@ Set the environment variables with your own values before running the sample: 1) APPCONFIGURATION_CONNECTION_STRING: Connection String used to access the Azure App Configuration. """ + import asyncio import os from azure.appconfiguration.aio import AzureAppConfigurationClient diff --git a/sdk/appconfiguration/azure-appconfiguration/setup.py b/sdk/appconfiguration/azure-appconfiguration/setup.py index 4ad4795294bf..7dade117cd06 100644 --- a/sdk/appconfiguration/azure-appconfiguration/setup.py +++ b/sdk/appconfiguration/azure-appconfiguration/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-appconfiguration" PACKAGE_PPRINT_NAME = "App Configuration Data" diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patch.py +++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_patch.py +++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patch.py +++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_patch.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_patch.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_patch.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_patch.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/operations/_patch.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/operations/_patch.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_patch.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_patch.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_patch.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_patch.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py index 32340362cebd..b1d6d434d3d5 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_patch.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_patch.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_patch.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_patch.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_patch.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_patch.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_patch.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_patch.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_patch.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_patch.py +++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_patch.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_patch.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_patch.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_patch.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/operations/_patch.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/operations/_patch.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models/_patch.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models/_patch.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/operations/_patch.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/operations/_patch.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/_patch.py b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/_patch.py +++ b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/_patch.py b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/_patch.py +++ b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/operations/_patch.py b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/operations/_patch.py +++ b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/models/_patch.py b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/models/_patch.py +++ b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/operations/_patch.py b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/operations/_patch.py +++ b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/azure/mgmt/arizeaiobservabilityeval/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/setup.py b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/setup.py index 6c62a51ed2e0..8a95f41c03a6 100644 --- a/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/setup.py +++ b/sdk/arizeaiobservabilityeval/azure-mgmt-arizeaiobservabilityeval/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/_patch.py b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/_patch.py +++ b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/_patch.py b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/_patch.py +++ b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/operations/_patch.py b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/operations/_patch.py +++ b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/models/_patch.py b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/models/_patch.py +++ b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/operations/_patch.py b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/operations/_patch.py +++ b/sdk/artifactsigning/azure-mgmt-artifactsigning/azure/mgmt/artifactsigning/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/_patch.py b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/_patch.py +++ b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/_patch.py b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/_patch.py +++ b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/operations/_patch.py b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/operations/_patch.py +++ b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/models/_patch.py b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/models/_patch.py +++ b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/operations/_patch.py b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/operations/_patch.py +++ b/sdk/astro/azure-mgmt-astro/azure/mgmt/astro/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/astro/azure-mgmt-astro/setup.py b/sdk/astro/azure-mgmt-astro/setup.py index bf27dbd806c2..f6b8142d47dd 100644 --- a/sdk/astro/azure-mgmt-astro/setup.py +++ b/sdk/astro/azure-mgmt-astro/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_patch.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_patch.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/_patch.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/_patch.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/operations/_patch.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/operations/_patch.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_patch.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_patch.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_patch.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_patch.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-mgmt-attestation/setup.py b/sdk/attestation/azure-mgmt-attestation/setup.py index ea47ed06f07e..fbc888e0fe2d 100644 --- a/sdk/attestation/azure-mgmt-attestation/setup.py +++ b/sdk/attestation/azure-mgmt-attestation/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Attestation Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/attestation/azure-mgmt-attestation/tests/disable_test_cli_mgmt_attestation.py b/sdk/attestation/azure-mgmt-attestation/tests/disable_test_cli_mgmt_attestation.py index 6547add1c30d..9ae4bbf63f21 100644 --- a/sdk/attestation/azure-mgmt-attestation/tests/disable_test_cli_mgmt_attestation.py +++ b/sdk/attestation/azure-mgmt-attestation/tests/disable_test_cli_mgmt_attestation.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,15 +21,14 @@ import azure.mgmt.attestation from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtAttestationTest(AzureMgmtTestCase): def setUp(self): super(MgmtAttestationTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.attestation.AttestationManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.attestation.AttestationManagementClient) @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) @@ -39,18 +38,17 @@ def test_attestation(self, resource_group): RESOURCE_GROUP = resource_group.name PROVIDER_NAME = "myprovider6" - CREATION_PARAMS = { - 'properties': { - 'attestation_policy': 'SgxDisableDebugMode' - }, - 'location': 'eastus' - } + CREATION_PARAMS = {"properties": {"attestation_policy": "SgxDisableDebugMode"}, "location": "eastus"} # /AttestationProviders/put/AttestationProviders_Create[put] - result = self.mgmt_client.attestation_providers.create(resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME, creation_params=CREATION_PARAMS) + result = self.mgmt_client.attestation_providers.create( + resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME, creation_params=CREATION_PARAMS + ) # /AttestationProviders/get/AttestationProviders_Get[get] - result = self.mgmt_client.attestation_providers.get(resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME) + result = self.mgmt_client.attestation_providers.get( + resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME + ) # /AttestationProviders/get/AttestationProviders_ListByResourceGroup[get] # result = self.mgmt_client.attestation_providers.list_by_resource_group(resource_group_name=RESOURCE_GROUP) @@ -62,17 +60,17 @@ def test_attestation(self, resource_group): result = self.mgmt_client.operations.list() # /AttestationProviders/patch/AttestationProviders_Update[patch] - TAGS = { - "property1": "Value1", - "property2": "Value2", - "property3": "Value3" - } - result = self.mgmt_client.attestation_providers.update(resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME, tags=TAGS) + TAGS = {"property1": "Value1", "property2": "Value2", "property3": "Value3"} + result = self.mgmt_client.attestation_providers.update( + resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME, tags=TAGS + ) # /AttestationProviders/delete/AttestationProviders_Delete[delete] - result = self.mgmt_client.attestation_providers.delete(resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME) + result = self.mgmt_client.attestation_providers.delete( + resource_group_name=RESOURCE_GROUP, provider_name=PROVIDER_NAME + ) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/attestation/azure-security-attestation/azure/security/attestation/_patch.py b/sdk/attestation/azure-security-attestation/azure/security/attestation/_patch.py index c29de20567a2..1f4761b70977 100644 --- a/sdk/attestation/azure-security-attestation/azure/security/attestation/_patch.py +++ b/sdk/attestation/azure-security-attestation/azure/security/attestation/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import base64 import json from typing import List, Any, Tuple, Union, Optional, Callable, cast diff --git a/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/_patch.py b/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/_patch.py index b3bfbcf2c14d..7da48a6ed74a 100644 --- a/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/_patch.py +++ b/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import base64 import json from threading import Lock diff --git a/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/operations/_patch.py b/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/operations/_patch.py +++ b/sdk/attestation/azure-security-attestation/azure/security/attestation/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-security-attestation/azure/security/attestation/models/_patch.py b/sdk/attestation/azure-security-attestation/azure/security/attestation/models/_patch.py index d1bb1b722729..1a1d866f5c4d 100644 --- a/sdk/attestation/azure-security-attestation/azure/security/attestation/models/_patch.py +++ b/sdk/attestation/azure-security-attestation/azure/security/attestation/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import base64 from datetime import datetime import json @@ -197,7 +198,7 @@ class AttestationResult: # pylint: disable=too-many-instance-attributes """ def __init__(self, **kwargs: Any) -> None: - self._issuer = kwargs.pop("issuer") # type:str + self._issuer = kwargs.pop("issuer") # type: str self._unique_identifier = kwargs.pop("unique_identifier", None) # type: Union[str, None] self._nonce = kwargs.pop("nonce", None) # type: Union[str, None] self._version = kwargs.pop("version") # type: str diff --git a/sdk/attestation/azure-security-attestation/azure/security/attestation/operations/_patch.py b/sdk/attestation/azure-security-attestation/azure/security/attestation/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/attestation/azure-security-attestation/azure/security/attestation/operations/_patch.py +++ b/sdk/attestation/azure-security-attestation/azure/security/attestation/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave.py b/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave.py index 6d619b42f56c..a4dbd9603afc 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave.py @@ -27,11 +27,11 @@ python sample_attest_enclave.py This sample performs attestation of sample SGX collateral with both the -`attest_sgx_enclave` and `attest_open_enclave` APIs. It also demonstrates +`attest_sgx_enclave` and `attest_open_enclave` APIs. It also demonstrates retrieving properties from the resulting attestation operation, providing draft -attestation policies (which can be used to test/verify the behavior of +attestation policies (which can be used to test/verify the behavior of attestation policies) and shows how to use a validation callback to perform -additional token validations as a part of the `attest_sgx_enclave` API call. +additional token validations as a part of the `attest_sgx_enclave` API call. """ diff --git a/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave_async.py b/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave_async.py index 0fc290ff231b..38de4ec0c89d 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave_async.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_attest_enclave_async.py @@ -26,11 +26,11 @@ python sample_attest_enclave_async.py This sample performs attestation of sample SGX collateral with both the -`attest_sgx_enclave` and `attest_open_enclave` APIs. It also demonstrates +`attest_sgx_enclave` and `attest_open_enclave` APIs. It also demonstrates retrieving properties from the resulting attestation operation, providing draft -attestation policies (which can be used to test/verify the behavior of +attestation policies (which can be used to test/verify the behavior of attestation policies) and shows how to use a validation callback to perform -additional token validations as a part of the `attest_sgx_enclave` API call. +additional token validations as a part of the `attest_sgx_enclave` API call. """ diff --git a/sdk/attestation/azure-security-attestation/samples/sample_authentication.py b/sdk/attestation/azure-security-attestation/samples/sample_authentication.py index 09802bae6330..6462b60a3089 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_authentication.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_authentication.py @@ -30,14 +30,13 @@ python sample_authentication_async.py This sample demonstrates establishing a connection to the attestation service -using client secrets stored in environment variables. +using client secrets stored in environment variables. -To verify that the connection completed successfully, it also calls the -`get_openidmetadata` API on the client to retrieve the OpenID metadata discovery +To verify that the connection completed successfully, it also calls the +`get_openidmetadata` API on the client to retrieve the OpenID metadata discovery document for the attestation service instance. """ - import os from dotenv import find_dotenv, load_dotenv import base64 diff --git a/sdk/attestation/azure-security-attestation/samples/sample_authentication_async.py b/sdk/attestation/azure-security-attestation/samples/sample_authentication_async.py index 1301b68c67fd..c890fe878beb 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_authentication_async.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_authentication_async.py @@ -31,15 +31,14 @@ python sample_authentication_async.py This sample demonstrates establishing a connection to the attestation service -using client secrets stored in environment variables. +using client secrets stored in environment variables. -To verify that the connection completed successfully, it also calls the -`get_openidmetadata` API on the client to retrieve the OpenID metadata discovery +To verify that the connection completed successfully, it also calls the +`get_openidmetadata` API on the client to retrieve the OpenID metadata discovery document for the attestation service instance. """ - import os from dotenv import find_dotenv, load_dotenv import base64 diff --git a/sdk/attestation/azure-security-attestation/samples/sample_collateral.py b/sdk/attestation/azure-security-attestation/samples/sample_collateral.py index 6cabbe0580f5..c5e713e24099 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_collateral.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_collateral.py @@ -16,7 +16,6 @@ """ - # A Quick note about the relationship between an OpenEnclave "report" and # an SGX "quote". The "report" has a 16 byte header attached to the front # of an SGX "quote". That means a "report" can be transformed into a quote diff --git a/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy.py b/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy.py index c79227cba874..1a081a169138 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy.py @@ -22,7 +22,7 @@ 4) ATTESTATION_CLIENT_ID - Client identity for authentication. 5) ATTESTATION_CLIENT_SECRET - Secret used to identify the client. 6) ATTESTATION_ISOLATED_SIGNING_CERTIFICATE - Base64 encoded X.509 Certificate - specified when the isolated mode instance is created. + specified when the isolated mode instance is created. 7) ATTESTATION_ISOLATED_SIGNING_KEY - Base64 encoded DER encoded RSA Private key associated with the ATTESTATION_ISOLATED_SIGNING_CERTIFICATE diff --git a/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy_async.py b/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy_async.py index f268b39ffbfb..37be293fdfaf 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy_async.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_get_set_policy_async.py @@ -22,7 +22,7 @@ 4) ATTESTATION_CLIENT_ID - Client identity for authentication. 5) ATTESTATION_CLIENT_SECRET - Secret used to identify the client. 6) ATTESTATION_ISOLATED_SIGNING_CERTIFICATE - Base64 encoded X.509 Certificate - specified when the isolated mode instance is created. + specified when the isolated mode instance is created. 7) ATTESTATION_ISOLATED_SIGNING_KEY - Base64 encoded DER encoded RSA Private key associated with the ATTESTATION_ISOLATED_SIGNING_CERTIFICATE diff --git a/sdk/attestation/azure-security-attestation/samples/sample_utils.py b/sdk/attestation/azure-security-attestation/samples/sample_utils.py index 35773a7eaaa2..3066c73bf489 100644 --- a/sdk/attestation/azure-security-attestation/samples/sample_utils.py +++ b/sdk/attestation/azure-security-attestation/samples/sample_utils.py @@ -12,6 +12,7 @@ Helper functions used for the azure attestation samples. """ + import datetime from cryptography.hazmat.backends import default_backend from cryptography import x509 diff --git a/sdk/attestation/azure-security-attestation/tests/preparers.py b/sdk/attestation/azure-security-attestation/tests/preparers.py index fc080dee3a11..7782cdd5a13e 100644 --- a/sdk/attestation/azure-security-attestation/tests/preparers.py +++ b/sdk/attestation/azure-security-attestation/tests/preparers.py @@ -61,7 +61,7 @@ def decorator(func): def wrapper_use_instance(*args, **kwargs): # type: (*Any, **Any) -> T - instances = [] # type:List[str] + instances = [] # type: List[str] instances.append(kwargs.get("attestation_aad_url")) instances.append(kwargs.get("attestation_isolated_url")) if include_shared: diff --git a/sdk/attestation/azure-security-attestation/tests/preparers_async.py b/sdk/attestation/azure-security-attestation/tests/preparers_async.py index b6044679fbe8..749adae0a8f9 100644 --- a/sdk/attestation/azure-security-attestation/tests/preparers_async.py +++ b/sdk/attestation/azure-security-attestation/tests/preparers_async.py @@ -37,7 +37,7 @@ def AllInstanceTypes(func: Callable[..., Awaitable[T]] = None, include_shared: b """Decorator to apply to function to add instance_url kwarg for each instance type.""" async def wrapper(*args, **kwargs) -> Callable[..., Awaitable[T]]: - instances = [] # type:List[str] + instances = [] # type: List[str] instances.append(kwargs.get("attestation_aad_url")) instances.append(kwargs.get("attestation_isolated_url")) if include_shared: diff --git a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_patch.py b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_patch.py +++ b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/_patch.py b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/_patch.py +++ b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/operations/_patch.py b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/operations/_patch.py +++ b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/models/_patch.py b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/models/_patch.py +++ b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/operations/_patch.py b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/operations/_patch.py +++ b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/authorization/azure-mgmt-authorization/setup.py b/sdk/authorization/azure-mgmt-authorization/setup.py index a6ceda3fa32a..2e9f8fcb4df7 100644 --- a/sdk/authorization/azure-mgmt-authorization/setup.py +++ b/sdk/authorization/azure-mgmt-authorization/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/_patch.py b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/_patch.py +++ b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/_patch.py b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/_patch.py +++ b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/operations/_patch.py b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/operations/_patch.py +++ b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_patch.py b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_patch.py +++ b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/operations/_patch.py b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/operations/_patch.py +++ b/sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automanage/azure-mgmt-automanage/setup.py b/sdk/automanage/azure-mgmt-automanage/setup.py index b63edc186481..1da042441b4c 100644 --- a/sdk/automanage/azure-mgmt-automanage/setup.py +++ b/sdk/automanage/azure-mgmt-automanage/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Auto Manage Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_patch.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_patch.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_patch.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_patch.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_patch.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_patch.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_patch.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_patch.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_patch.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_patch.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_patch.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_patch.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_patch.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_patch.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_patch.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_patch.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_patch.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_patch.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_patch.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_patch.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/setup.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/setup.py index c2f506547f1e..2f7926c91a46 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/setup.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Azure Arc Data Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_patch.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_patch.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_patch.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_patch.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_patch.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_patch.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_patch.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_patch.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_patch.py b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_patch.py +++ b/sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestack/azure-mgmt-azurestack/setup.py b/sdk/azurestack/azure-mgmt-azurestack/setup.py index 9ba62ffa91d9..b7b7858dffd5 100644 --- a/sdk/azurestack/azure-mgmt-azurestack/setup.py +++ b/sdk/azurestack/azure-mgmt-azurestack/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Azure Stack Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py index 17bb6ae831b0..679e3b93fc5c 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_clusters_operations_async_test.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_clusters_operations_async_test.py index d7983fee832c..a29ae4bf8cb1 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_clusters_operations_async_test.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_clusters_operations_async_test.py @@ -1,4 +1,3 @@ - # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_operations_async_test.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_operations_async_test.py index a26a44327c76..ad436650ffc6 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_operations_async_test.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/tests/test_azure_stack_hci_operations_async_test.py @@ -1,4 +1,3 @@ - # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/operations/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/operations/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/models/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/models/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/operations/_patch.py b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/operations/_patch.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/azure/mgmt/azurestackhcivm/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/setup.py b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/setup.py index 2c02cf3b28e5..00e241ed02fc 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhcivm/setup.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhcivm/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_patch.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_patch.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_patch.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_patch.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_patch.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_patch.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_patch.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_patch.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_patch.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_patch.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/setup.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/setup.py index 998aba60aff4..7ad42dee8d1e 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/setup.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/batch/azure-batch/azure/batch/_operations/_patch.py b/sdk/batch/azure-batch/azure/batch/_operations/_patch.py index 09fdc1edec16..0dd69a10abc1 100644 --- a/sdk/batch/azure-batch/azure/batch/_operations/_patch.py +++ b/sdk/batch/azure-batch/azure/batch/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import datetime from typing import Any, Callable, cast, Deque, Dict, List, Optional, Iterable, Iterator, TypeVar import collections diff --git a/sdk/batch/azure-batch/azure/batch/_operations/_polling.py b/sdk/batch/azure-batch/azure/batch/_operations/_polling.py index aa87b22a6747..ef845451b7af 100644 --- a/sdk/batch/azure-batch/azure/batch/_operations/_polling.py +++ b/sdk/batch/azure-batch/azure/batch/_operations/_polling.py @@ -4,7 +4,7 @@ # Licensed under the MIT License. # ------------------------------------ -""" Custom Sync Polling Methods for Azure Batch Operations.""" +"""Custom Sync Polling Methods for Azure Batch Operations.""" import time from typing import Any, Callable, Optional diff --git a/sdk/batch/azure-batch/azure/batch/_patch.py b/sdk/batch/azure-batch/azure/batch/_patch.py index 1e4ef9ed3bd1..ff2a9b8d960c 100644 --- a/sdk/batch/azure-batch/azure/batch/_patch.py +++ b/sdk/batch/azure-batch/azure/batch/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import base64 import hmac import hashlib diff --git a/sdk/batch/azure-batch/azure/batch/aio/_operations/_patch.py b/sdk/batch/azure-batch/azure/batch/aio/_operations/_patch.py index 8865228949e2..018d34adec55 100644 --- a/sdk/batch/azure-batch/azure/batch/aio/_operations/_patch.py +++ b/sdk/batch/azure-batch/azure/batch/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import asyncio import datetime import collections @@ -43,7 +44,6 @@ _BatchClientOperationsMixin as BatchClientOperationsMixinGenerated, ) - T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] diff --git a/sdk/batch/azure-batch/azure/batch/aio/_operations/_polling_async.py b/sdk/batch/azure-batch/azure/batch/aio/_operations/_polling_async.py index c1d3d8cc7ea9..0b1fe13a7f45 100644 --- a/sdk/batch/azure-batch/azure/batch/aio/_operations/_polling_async.py +++ b/sdk/batch/azure-batch/azure/batch/aio/_operations/_polling_async.py @@ -4,7 +4,7 @@ # Licensed under the MIT License. # ------------------------------------ -""" Custom Async Polling Methods for Azure Batch Operations.""" +"""Custom Async Polling Methods for Azure Batch Operations.""" import asyncio diff --git a/sdk/batch/azure-batch/azure/batch/models/_patch.py b/sdk/batch/azure-batch/azure/batch/models/_patch.py index cae277a3313c..d89e7ef3d4c4 100644 --- a/sdk/batch/azure-batch/azure/batch/models/_patch.py +++ b/sdk/batch/azure-batch/azure/batch/models/_patch.py @@ -6,12 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import datetime from typing import List, Optional from azure.core.exceptions import HttpResponseError - __all__: List[str] = [ "CreateTasksError", "BatchFileProperties", diff --git a/sdk/batch/azure-batch/samples/batch_samples_hello_world.py b/sdk/batch/azure-batch/samples/batch_samples_hello_world.py index 386d6a0e8012..45020679da38 100644 --- a/sdk/batch/azure-batch/samples/batch_samples_hello_world.py +++ b/sdk/batch/azure-batch/samples/batch_samples_hello_world.py @@ -7,13 +7,13 @@ # -------------------------------------------------------------------------- """ -FILE: +FILE: batch_samples_hello_world.py DESCRIPTION: - Azure Batch sample. + Azure Batch sample. -USAGE: +USAGE: python batch_samples_hello_world.py """ diff --git a/sdk/batch/azure-batch/tests/async_wrapper.py b/sdk/batch/azure-batch/tests/async_wrapper.py index 665b13620450..d84ae8cc953a 100644 --- a/sdk/batch/azure-batch/tests/async_wrapper.py +++ b/sdk/batch/azure-batch/tests/async_wrapper.py @@ -24,7 +24,7 @@ async def wrap_list_result(result: Union[Iterable[T], AsyncIterable[T]]) -> Iter async def wrap_file_result( - result: Union[Iterator[bytes], Coroutine[Any, Any, AsyncIterator[bytes]]] + result: Union[Iterator[bytes], Coroutine[Any, Any, AsyncIterator[bytes]]], ) -> Iterator[bytes]: """Handle a file download operation result and convert to an Iterator if it's async""" if inspect.iscoroutine(result): diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_patch.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_patch.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/_patch.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/_patch.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/operations/_patch.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/operations/_patch.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_patch.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_patch.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_patch.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_patch.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_patch.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_patch.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_patch.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_patch.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_patch.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_patch.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_patch.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_patch.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_patch.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_patch.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billing/azure-mgmt-billing/setup.py b/sdk/billing/azure-mgmt-billing/setup.py index 97d9a82134ff..378c5988e165 100644 --- a/sdk/billing/azure-mgmt-billing/setup.py +++ b/sdk/billing/azure-mgmt-billing/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/billing/azure-mgmt-billing/tests/disable_test_mgmt_billing.py b/sdk/billing/azure-mgmt-billing/tests/disable_test_mgmt_billing.py index 9690ab8434c9..6d8344291880 100644 --- a/sdk/billing/azure-mgmt-billing/tests/disable_test_mgmt_billing.py +++ b/sdk/billing/azure-mgmt-billing/tests/disable_test_mgmt_billing.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import azure.mgmt.billing from devtools_testutils import AzureMgmtTestCase + class MgmtBillingTest(AzureMgmtTestCase): def _validate_invoice(self, invoice, url_generated=False): @@ -56,19 +57,19 @@ def test_billing_invoice_list_get(self): @unittest.skip("skip") def test_billing_invoice_list_generate_url(self): - output = list(self.billing_client.invoices.list(expand='downloadUrl')) + output = list(self.billing_client.invoices.list(expand="downloadUrl")) self.assertTrue(len(output) > 0) self._validate_invoice(output[0], url_generated=True) @unittest.skip("skip") def test_billing_invoice_list_top(self): - output = list(self.billing_client.invoices.list(expand='downloadUrl', top=1)) + output = list(self.billing_client.invoices.list(expand="downloadUrl", top=1)) self.assertEqual(1, len(output)) self._validate_invoice(output[0], url_generated=True) @unittest.skip("skip") def test_billing_invoice_list_filter(self): - output = list(self.billing_client.invoices.list(filter='invoicePeriodEndDate gt 2017-02-01')) + output = list(self.billing_client.invoices.list(filter="invoicePeriodEndDate gt 2017-02-01")) self.assertTrue(len(output) > 0) self._validate_invoice(output[0], url_generated=False) @@ -88,10 +89,11 @@ def test_billing_period_list_top(self): @unittest.skip("skip") def test_billing_period_list_filter(self): - output = list(self.billing_client.billing_periods.list(filter='billingPeriodEndDate gt 2017-02-01')) + output = list(self.billing_client.billing_periods.list(filter="billingPeriodEndDate gt 2017-02-01")) self.assertTrue(len(output) > 0) self._validate_billing_period(output[0]) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_async_test.py b/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_async_test.py index 761963e6332c..79440d0a3897 100644 --- a/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_async_test.py +++ b/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_async_test.py @@ -25,4 +25,3 @@ async def test_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_test.py b/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_test.py index 61de898dfc00..840d2af48d42 100644 --- a/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_test.py +++ b/sdk/billing/azure-mgmt-billing/tests/test_billing_management_operations_test.py @@ -24,4 +24,3 @@ def test_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/_patch.py b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/_patch.py +++ b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/_patch.py b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/_patch.py +++ b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/operations/_patch.py b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/operations/_patch.py +++ b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/models/_patch.py b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/models/_patch.py +++ b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/operations/_patch.py b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/operations/_patch.py +++ b/sdk/billingbenefits/azure-mgmt-billingbenefits/azure/mgmt/billingbenefits/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/billingbenefits/azure-mgmt-billingbenefits/setup.py b/sdk/billingbenefits/azure-mgmt-billingbenefits/setup.py index f24f14f82a13..76a831b7b920 100644 --- a/sdk/billingbenefits/azure-mgmt-billingbenefits/setup.py +++ b/sdk/billingbenefits/azure-mgmt-billingbenefits/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Billingbenefits Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_patch.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_patch.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_patch.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_patch.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_patch.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_patch.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_patch.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_patch.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/botservice/azure-mgmt-botservice/setup.py b/sdk/botservice/azure-mgmt-botservice/setup.py index 553174f56e4e..7d2c62db01c1 100644 --- a/sdk/botservice/azure-mgmt-botservice/setup.py +++ b/sdk/botservice/azure-mgmt-botservice/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Bot Service" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_channels.py b/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_channels.py index e1c105f0f197..52a0c4478c3c 100644 --- a/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_channels.py +++ b/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_channels.py @@ -2,81 +2,69 @@ from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer from azure.mgmt.botservice import AzureBotService -from azure.mgmt.botservice.models import ( - Bot, - BotProperties, - BotChannel, - Sku -) +from azure.mgmt.botservice.models import Bot, BotProperties, BotChannel, Sku + class BotServiceChannelsTestCase(AzureMgmtTestCase): def setUp(self): super(BotServiceChannelsTestCase, self).setUp() - #create a bot here + # create a bot here self.client = self.create_mgmt_client(AzureBotService) - self.resource_name = self.get_resource_name('azurebotservice') - + self.resource_name = self.get_resource_name("azurebotservice") + def createBot(self): - location = 'global' - sku_name = 'Free' - kind= 'Bot' + location = "global" + sku_name = "Free" + kind = "Bot" display_name = "this is a test bot" - description= "this is a description for a test bot" + description = "this is a description for a test bot" endpoint = "https://bing.com/messages/" msa_app_id = "" - developer_app_insight_key = '' - developer_app_insights_api_key = '' - developer_app_insights_application_id = '' + developer_app_insight_key = "" + developer_app_insights_api_key = "" + developer_app_insights_application_id = "" bot = self.client.bots.create( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - parameters = Bot( - location= location, - sku = sku.Sku(name=sku_name), - kind= kind, - properties= BotProperties( - display_name = display_name, - description= description, - endpoint = endpoint, - msa_app_id = msa_app_id, - developer_app_insight_key = developer_app_insight_key, - developer_app_insights_api_key = developer_app_insights_api_key, - developer_app_insights_application_id = developer_app_insights_application_id, - ) - ) + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, + parameters=Bot( + location=location, + sku=sku.Sku(name=sku_name), + kind=kind, + properties=BotProperties( + display_name=display_name, + description=description, + endpoint=endpoint, + msa_app_id=msa_app_id, + developer_app_insight_key=developer_app_insight_key, + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + ), + ), ) - + def tearDown(self): super(BotServiceChannelsTestCase, self).tearDown() - self.client.bots.delete( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name - ) + self.client.bots.delete(resource_group_name=self.resource_group_name, resource_name=self.resource_name) def validateCreateGetAndDeleteChannel(self, channel_name, channel_properties, run_exist_check=True, validate=None): self.createBot() - botChannel = BotChannel( - location = 'global', - properties = channel_properties - ) + botChannel = BotChannel(location="global", properties=channel_properties) self.client.channels.create( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - channel_name = channel_name, - parameters = botChannel + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, + channel_name=channel_name, + parameters=botChannel, ) channel = self.client.channels.get( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - channel_name = channel_name + resource_group_name=self.resource_group_name, resource_name=self.resource_name, channel_name=channel_name ) - + self.assertIsNotNone(channel) - #is_enabled being true means that the service has managed to get the channel working. - if channel_name == 'DirectLineChannel': + # is_enabled being true means that the service has managed to get the channel working. + if channel_name == "DirectLineChannel": self.assertTrue(channel.properties.properties.sites[0].is_enabled) else: self.assertTrue(channel.properties.properties.is_enabled) @@ -85,142 +73,116 @@ def validateCreateGetAndDeleteChannel(self, channel_name, channel_properties, ru validate( resource_group_name=self.resource_group_name, resource_name=self.resource_name, - assertIsNotNone=self.assertIsNotNone + assertIsNotNone=self.assertIsNotNone, ) channel = self.client.channels.delete( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - channel_name = channel_name + resource_group_name=self.resource_group_name, resource_name=self.resource_name, channel_name=channel_name ) if run_exist_check: with self.assertRaises(ErrorException): channel = self.client.channels.get( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - channel_name = channel_name + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, + channel_name=channel_name, ) @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='pythonsdkbot') + @ResourceGroupPreparer(name_prefix="pythonsdkbot") def test_email_channel(self, resource_group): self.resource_group_name = resource_group.name - from azure.mgmt.botservice.models import EmailChannel,EmailChannelProperties - channel = EmailChannel( - properties = EmailChannelProperties( - email_address = 'swagatm2@outlook.com', - password = '', - is_enabled = True - ) - ) + from azure.mgmt.botservice.models import EmailChannel, EmailChannelProperties - self.validateCreateGetAndDeleteChannel( - channel_name = 'EmailChannel', - channel_properties = channel + channel = EmailChannel( + properties=EmailChannelProperties(email_address="swagatm2@outlook.com", password="", is_enabled=True) ) + self.validateCreateGetAndDeleteChannel(channel_name="EmailChannel", channel_properties=channel) @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='pythonsdkbot') + @ResourceGroupPreparer(name_prefix="pythonsdkbot") def test_telegram_channel(self, resource_group): - from azure.mgmt.botservice.models import TelegramChannel,TelegramChannelProperties + from azure.mgmt.botservice.models import TelegramChannel, TelegramChannelProperties + self.resource_group_name = resource_group.name channel = TelegramChannel( - properties = TelegramChannelProperties( - access_token = '', - is_enabled = True, + properties=TelegramChannelProperties( + access_token="", + is_enabled=True, ) ) - self.validateCreateGetAndDeleteChannel( - channel_name = 'TelegramChannel', - channel_properties = channel - ) + self.validateCreateGetAndDeleteChannel(channel_name="TelegramChannel", channel_properties=channel) @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='pythonsdkbot') + @ResourceGroupPreparer(name_prefix="pythonsdkbot") def test_sms_channel(self, resource_group): - from azure.mgmt.botservice.models import SmsChannel,SmsChannelProperties + from azure.mgmt.botservice.models import SmsChannel, SmsChannelProperties + self.resource_group_name = resource_group.name channel = SmsChannel( - properties = SmsChannelProperties( - phone = '+15153258725', - account_sid = '', - auth_token = '', - is_enabled = True, - is_validated = False + properties=SmsChannelProperties( + phone="+15153258725", account_sid="", auth_token="", is_enabled=True, is_validated=False ) ) - - self.validateCreateGetAndDeleteChannel( - channel_name = 'SmsChannel', - channel_properties = channel - ) + + self.validateCreateGetAndDeleteChannel(channel_name="SmsChannel", channel_properties=channel) @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='pythonsdkbot') + @ResourceGroupPreparer(name_prefix="pythonsdkbot") def test_msteams_channel(self, resource_group): - from azure.mgmt.botservice.models import MsTeamsChannel,MsTeamsChannelProperties + from azure.mgmt.botservice.models import MsTeamsChannel, MsTeamsChannelProperties + self.resource_group_name = resource_group.name channel = MsTeamsChannel( - properties = MsTeamsChannelProperties( - is_enabled = True, + properties=MsTeamsChannelProperties( + is_enabled=True, ) ) - + self.validateCreateGetAndDeleteChannel( - channel_name = 'MsTeamsChannel', - channel_properties = channel, - run_exist_check=False + channel_name="MsTeamsChannel", channel_properties=channel, run_exist_check=False ) - + @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='pythonsdkbot') + @ResourceGroupPreparer(name_prefix="pythonsdkbot") def test_skype_channel(self, resource_group): - from azure.mgmt.botservice.models import SkypeChannel,SkypeChannelProperties + from azure.mgmt.botservice.models import SkypeChannel, SkypeChannelProperties + self.resource_group_name = resource_group.name channel = SkypeChannel( - properties = SkypeChannelProperties( - is_enabled = True, - enable_messaging = True, + properties=SkypeChannelProperties( + is_enabled=True, + enable_messaging=True, ) ) self.validateCreateGetAndDeleteChannel( - channel_name = 'SkypeChannel', - channel_properties = channel, - run_exist_check=False + channel_name="SkypeChannel", channel_properties=channel, run_exist_check=False ) - @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='pythonsdkbot') + @ResourceGroupPreparer(name_prefix="pythonsdkbot") def test_directline_channel(self, resource_group): # also test secrets api def validate_directline(resource_group_name, resource_name, assertIsNotNone): settings = self.client.channels.list_with_keys( resource_group_name=resource_group_name, resource_name=resource_name, - channel_name='DirectLineChannel', + channel_name="DirectLineChannel", ) assertIsNotNone(settings) assertIsNotNone(settings.properties.properties.sites[0].key) + from azure.mgmt.botservice.models import DirectLineChannel, DirectLineChannelProperties, DirectLineSite - from azure.mgmt.botservice.models import DirectLineChannel,DirectLineChannelProperties,DirectLineSite self.resource_group_name = resource_group.name channel = DirectLineChannel( properties=DirectLineChannelProperties( - sites=[DirectLineSite( - site_name='default', - is_enabled=True, - is_v1_enabled=False, - is_v3_enabled=True)] + sites=[DirectLineSite(site_name="default", is_enabled=True, is_v1_enabled=False, is_v3_enabled=True)] ) ) self.validateCreateGetAndDeleteChannel( - channel_name = 'DirectLineChannel', - channel_properties = channel, - validate=validate_directline - ) \ No newline at end of file + channel_name="DirectLineChannel", channel_properties=channel, validate=validate_directline + ) diff --git a/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_connections.py b/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_connections.py index 22a64d97857e..75dc857f1836 100644 --- a/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_connections.py +++ b/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_connections.py @@ -2,91 +2,91 @@ from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer from azure.mgmt.botservice import AzureBotService -from azure.mgmt.botservice.models import ( - Bot, - BotProperties, - Sku -) +from azure.mgmt.botservice.models import Bot, BotProperties, Sku + class BotServiceConnectionsTestCase(AzureMgmtTestCase): def setUp(self): super(BotServiceConnectionsTestCase, self).setUp() - #create a bot here + # create a bot here self.client = self.create_mgmt_client(AzureBotService) - self.resource_name = self.get_resource_name('azurebot') - + self.resource_name = self.get_resource_name("azurebot") + def createBot(self): - location = 'global' - sku_name = 'Free' - kind= 'Bot' + location = "global" + sku_name = "Free" + kind = "Bot" display_name = "this is a test bot" - description= "this is a description for a test bot" + description = "this is a description for a test bot" endpoint = "https://bing.com/messages/" msa_app_id = "" - developer_app_insight_key = '' - developer_app_insights_api_key = '' - developer_app_insights_application_id = '' + developer_app_insight_key = "" + developer_app_insights_api_key = "" + developer_app_insights_application_id = "" bot = self.client.bots.create( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - parameters = Bot( - location= location, - sku = sku.Sku(name=sku_name), - kind= kind, - properties= BotProperties( - display_name = display_name, - description= description, - endpoint = endpoint, - msa_app_id = msa_app_id, - developer_app_insight_key = developer_app_insight_key, - developer_app_insights_api_key = developer_app_insights_api_key, - developer_app_insights_application_id = developer_app_insights_application_id, - ) - ) + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, + parameters=Bot( + location=location, + sku=sku.Sku(name=sku_name), + kind=kind, + properties=BotProperties( + display_name=display_name, + description=description, + endpoint=endpoint, + msa_app_id=msa_app_id, + developer_app_insight_key=developer_app_insight_key, + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + ), + ), ) - + def tearDown(self): super(BotServiceConnectionsTestCase, self).tearDown() - @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='python_conn') + @ResourceGroupPreparer(name_prefix="python_conn") def test_bot_connection_operations(self, resource_group): self.resource_group_name = resource_group.name self.createBot() - from azure.mgmt.botservice.models import ConnectionSetting, ConnectionSettingProperties, ConnectionSettingParameter - connection_resource_name = self.get_resource_name('myconnection') + from azure.mgmt.botservice.models import ( + ConnectionSetting, + ConnectionSettingProperties, + ConnectionSettingParameter, + ) + + connection_resource_name = self.get_resource_name("myconnection") # create a connection setting_payload = ConnectionSetting( - location='global', + location="global", properties=ConnectionSettingProperties( - client_id='clientId', - client_secret='clientSecret', - scopes='read,write', - service_provider_id='', - parameters=[ConnectionSettingParameter(key='key1', value='value1')] - ) + client_id="clientId", + client_secret="clientSecret", + scopes="read,write", + service_provider_id="", + parameters=[ConnectionSettingParameter(key="key1", value="value1")], + ), ) setting = self.client.bot_connection.create( resource_group_name=resource_group.name, resource_name=self.resource_name, connection_name=connection_resource_name, - parameters=setting_payload + parameters=setting_payload, ) self.assertIsNotNone(setting) - self.assertEqual(setting.properties.client_id, 'clientId') + self.assertEqual(setting.properties.client_id, "clientId") # get a connection setting = self.client.bot_connection.get( resource_group_name=resource_group.name, resource_name=self.resource_name, - connection_name=connection_resource_name + connection_name=connection_resource_name, ) self.assertIsNotNone(setting) - #list all connections + # list all connections settings = self.client.bot_connection.list_by_bot_service( - resource_group_name = resource_group.name, - resource_name=self.resource_name + resource_group_name=resource_group.name, resource_name=self.resource_name ) self.assertIsNotNone(setting) self.assertTrue(len(list(settings)) == 1) @@ -95,16 +95,15 @@ def test_bot_connection_operations(self, resource_group): setting = self.client.bot_connection.delete( resource_group_name=resource_group.name, resource_name=self.resource_name, - connection_name=connection_resource_name + connection_name=connection_resource_name, ) with self.assertRaises(ErrorException): setting = self.client.bot_connection.get( resource_group_name=resource_group.name, resource_name=self.resource_name, - connection_name=connection_resource_name + connection_name=connection_resource_name, ) - @unittest.skip("skip") def test_bot_connection_serviceproviders(self): service_provider_responses = self.client.bot_connection.list_service_providers() diff --git a/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_crud.py b/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_crud.py index 1f4f9d12aea2..2701ecc3896a 100644 --- a/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_crud.py +++ b/sdk/botservice/azure-mgmt-botservice/tests/disable_test_mgmt_botservice_crud.py @@ -8,24 +8,30 @@ Sku, ) + class CoreBotServiceTestCase(AzureMgmtTestCase): def setUp(self): super(CoreBotServiceTestCase, self).setUp() self.client = self.create_mgmt_client(AzureBotService) - self.resource_name = self.get_resource_name('azurebotservice') - self.location = 'global' - self.sku_name = 'F0' - self.kind= 'Bot' + self.resource_name = self.get_resource_name("azurebotservice") + self.location = "global" + self.sku_name = "F0" + self.kind = "Bot" self.display_name = "this is a test bot" - self.description= "this is a description for a test bot" + self.description = "this is a description for a test bot" self.endpoint = "https://bing.com/messages/" self.msa_app_id = "" - self.developer_app_insight_key = '' - self.developer_app_insights_api_key = '' - self.developer_app_insights_application_id = '' + self.developer_app_insight_key = "" + self.developer_app_insights_api_key = "" + self.developer_app_insights_application_id = "" def validate_bot_properties(self, bot): - self.assertEqual(bot.id, '/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.BotService/botServices/{2}'.format(self.client.config.subscription_id,self.resource_group_name,self.resource_name)) + self.assertEqual( + bot.id, + "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.BotService/botServices/{2}".format( + self.client.config.subscription_id, self.resource_group_name, self.resource_name + ), + ) self.assertEqual(bot.name, self.resource_name) self.assertEqual(bot.location, self.location) self.assertEqual(bot.sku.name, self.sku_name) @@ -35,55 +41,54 @@ def validate_bot_properties(self, bot): self.assertEqual(bot.properties.endpoint, self.endpoint) self.assertEqual(bot.properties.msa_app_id, self.msa_app_id) self.assertEqual(bot.properties.developer_app_insight_key, self.developer_app_insight_key) - self.assertEqual(bot.properties.developer_app_insights_api_key, None) #this password should not be returned in the response - self.assertEqual(bot.properties.developer_app_insights_application_id, self.developer_app_insights_application_id) + self.assertEqual( + bot.properties.developer_app_insights_api_key, None + ) # this password should not be returned in the response + self.assertEqual( + bot.properties.developer_app_insights_application_id, self.developer_app_insights_application_id + ) @unittest.skip("skip") - @ResourceGroupPreparer(name_prefix='python_test_bot') + @ResourceGroupPreparer(name_prefix="python_test_bot") def test_bot_operations(self, resource_group): self.resource_group_name = resource_group.name bot = self.client.bots.create( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - parameters = Bot( - location= self.location, - sku = sku.Sku(name=self.sku_name), - kind= self.kind, - properties= BotProperties( - display_name = self.display_name, - description= self.description, - endpoint = self.endpoint, - msa_app_id = self.msa_app_id, - developer_app_insight_key = self.developer_app_insight_key, - developer_app_insights_api_key = self.developer_app_insights_api_key, - developer_app_insights_application_id = self.developer_app_insights_application_id, - ) - ) + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, + parameters=Bot( + location=self.location, + sku=sku.Sku(name=self.sku_name), + kind=self.kind, + properties=BotProperties( + display_name=self.display_name, + description=self.description, + endpoint=self.endpoint, + msa_app_id=self.msa_app_id, + developer_app_insight_key=self.developer_app_insight_key, + developer_app_insights_api_key=self.developer_app_insights_api_key, + developer_app_insights_application_id=self.developer_app_insights_application_id, + ), + ), ) self.validate_bot_properties(bot) bot = self.client.bots.get( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, ) self.validate_bot_properties(bot) - bot.properties.description = 'this is another description' + bot.properties.description = "this is another description" self.description = bot.properties.description bot = self.client.bots.update( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - properties = bot.properties + resource_group_name=self.resource_group_name, resource_name=self.resource_name, properties=bot.properties ) self.validate_bot_properties(bot) bot = self.client.bots.delete( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, ) - #ensure that the bot was not found with a get + # ensure that the bot was not found with a get with self.assertRaises(ErrorException): - bot = self.client.bots.get( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name - ) + bot = self.client.bots.get(resource_group_name=self.resource_group_name, resource_name=self.resource_name) diff --git a/sdk/botservice/azure-mgmt-botservice/tests/test_mgmt_botservice_model.py b/sdk/botservice/azure-mgmt-botservice/tests/test_mgmt_botservice_model.py index c64eba8e0e65..10e8e61c82de 100644 --- a/sdk/botservice/azure-mgmt-botservice/tests/test_mgmt_botservice_model.py +++ b/sdk/botservice/azure-mgmt-botservice/tests/test_mgmt_botservice_model.py @@ -20,5 +20,5 @@ def test_model_site(self): site_name="xxx", is_enabled=True, is_webchat_preview_enabled=True, - is_secure_site_enabled=True + is_secure_site_enabled=True, ) diff --git a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/_patch.py b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/_patch.py +++ b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/_patch.py b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/_patch.py +++ b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/operations/_patch.py b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/operations/_patch.py +++ b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/models/_patch.py b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/models/_patch.py +++ b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/operations/_patch.py b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/operations/_patch.py +++ b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/azure/mgmt/carbonoptimization/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/setup.py b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/setup.py index 91f9ed269acd..0b70f0fd79c7 100644 --- a/sdk/carbonoptimization/azure-mgmt-carbonoptimization/setup.py +++ b/sdk/carbonoptimization/azure-mgmt-carbonoptimization/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cdn/azure-mgmt-cdn/setup.py b/sdk/cdn/azure-mgmt-cdn/setup.py index c0f0a3ca2878..6c96bfe96aaa 100644 --- a/sdk/cdn/azure-mgmt-cdn/setup.py +++ b/sdk/cdn/azure-mgmt-cdn/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/cdn/azure-mgmt-cdn/tests/conftest.py b/sdk/cdn/azure-mgmt-cdn/tests/conftest.py index e7981d635f56..8c0bebb9a45c 100644 --- a/sdk/cdn/azure-mgmt-cdn/tests/conftest.py +++ b/sdk/cdn/azure-mgmt-cdn/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -52,4 +53,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py b/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py index afc378569c94..6385911e0b35 100644 --- a/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py +++ b/sdk/cdn/azure-mgmt-cdn/tests/disable_test_cli_mgmt_cdn.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -22,15 +22,14 @@ import azure.mgmt.cdn from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtCdn(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.cdn.CdnManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.cdn.CdnManagementClient) + @ResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_cdn(self, resource_group): @@ -48,12 +47,7 @@ def test_cdn(self, resource_group): ORIGIN_NAME = "origin1" # Profiles_Create[put] - BODY = { - "location": "WestUs", - "sku": { - "name": "Standard_Verizon" - } - } + BODY = {"location": "WestUs", "sku": {"name": "Standard_Verizon"}} result = self.mgmt_client.profiles.begin_create(resource_group.name, PROFILE_NAME, BODY) result = result.result() @@ -169,81 +163,71 @@ def test_cdn(self, resource_group): # Endpoints_Create[put] BODY = { - "origin_host_header": "www.bing.com", - "origin_path": "/image", - "content_types_to_compress": [ - "text/html", - "application/octet-stream" - ], - "is_compression_enabled": True, - "is_http_allowed": True, - "is_https_allowed": True, - "query_string_caching_behavior": "BypassCaching", - # "delivery_policy": { - # "description": "Test description for a policy.", - # "rules": [ - # { - # "name": "rule1", - # "order": "1", - # "conditions": [ - # { - # "name": "RemoteAddress", - # "parameters": { - # "operator": "IPMatch", - # "negate_condition": True, - # "match_values": [ - # "192.168.1.0/24", - # "10.0.0.0/24" - # ], - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" - # } - # } - # ], - # "actions": [ - # { - # "name": "CacheExpiration", - # "parameters": { - # "cache_behavior": "Override", - # "cache_duration": "10:10:09", - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters", - # "cache_type": "All" - # } - # }, - # { - # "name": "ModifyResponseHeader", - # "parameters": { - # "header_action": "Overwrite", - # "header_name": "Access-Control-Allow-Origin", - # "value": "*", - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" - # } - # }, - # { - # "name": "ModifyRequestHeader", - # "parameters": { - # "header_action": "Overwrite", - # "header_name": "Accept-Encoding", - # "value": "gzip", - # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" - # } - # } - # ] - # } - # ] - # }, - "origins": [ - { - "name": "origin1", - "host_name": "host1.hello.com" - } - ], - # "web_application_firewall_policy_link": { - # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" - # }, - "location": "WestUs", - "tags": { - "kay1": "value1" - } + "origin_host_header": "www.bing.com", + "origin_path": "/image", + "content_types_to_compress": ["text/html", "application/octet-stream"], + "is_compression_enabled": True, + "is_http_allowed": True, + "is_https_allowed": True, + "query_string_caching_behavior": "BypassCaching", + # "delivery_policy": { + # "description": "Test description for a policy.", + # "rules": [ + # { + # "name": "rule1", + # "order": "1", + # "conditions": [ + # { + # "name": "RemoteAddress", + # "parameters": { + # "operator": "IPMatch", + # "negate_condition": True, + # "match_values": [ + # "192.168.1.0/24", + # "10.0.0.0/24" + # ], + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + # } + # } + # ], + # "actions": [ + # { + # "name": "CacheExpiration", + # "parameters": { + # "cache_behavior": "Override", + # "cache_duration": "10:10:09", + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters", + # "cache_type": "All" + # } + # }, + # { + # "name": "ModifyResponseHeader", + # "parameters": { + # "header_action": "Overwrite", + # "header_name": "Access-Control-Allow-Origin", + # "value": "*", + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + # } + # }, + # { + # "name": "ModifyRequestHeader", + # "parameters": { + # "header_action": "Overwrite", + # "header_name": "Accept-Encoding", + # "value": "gzip", + # "@odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + # } + # } + # ] + # } + # ] + # }, + "origins": [{"name": "origin1", "host_name": "host1.hello.com"}], + # "web_application_firewall_policy_link": { + # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" + # }, + "location": "WestUs", + "tags": {"kay1": "value1"}, } result = self.mgmt_client.endpoints.begin_create(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -336,11 +320,10 @@ def test_cdn(self, resource_group): """ # Origins_Update[patch] - BODY = { - "http_port": "42", - "https_port": "43" - } - result = self.mgmt_client.origins.begin_update(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, ORIGIN_NAME, BODY) + BODY = {"http_port": "42", "https_port": "43"} + result = self.mgmt_client.origins.begin_update( + resource_group.name, PROFILE_NAME, ENDPOINT_NAME, ORIGIN_NAME, BODY + ) result = result.result() """ @@ -454,21 +437,17 @@ def test_cdn(self, resource_group): """ # Endpoints_ValidateCustomDomain[post] - BODY = { - "host_name": "www.someDomain.com" - } + BODY = {"host_name": "www.someDomain.com"} # HOST_NAME = "www.someDomain.com" - result = self.mgmt_client.endpoints.validate_custom_domain(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) + result = self.mgmt_client.endpoints.validate_custom_domain( + resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY + ) # Endpoints_ListResourceUsage[post] result = self.mgmt_client.endpoints.list_resource_usage(resource_group.name, PROFILE_NAME, ENDPOINT_NAME) # Endpoints_PurgeContent[post] - BODY = { - "content_paths": [ - "/folder1" - ] - } + BODY = {"content_paths": ["/folder1"]} # CONTENT_PATHS = ["/folder1"] result = self.mgmt_client.endpoints.begin_purge_content(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -482,11 +461,7 @@ def test_cdn(self, resource_group): result = result.result() # Endpoints_LoadContent[post] - BODY = { - "content_paths": [ - "/folder1" - ] - } + BODY = {"content_paths": ["/folder1"]} # CONTENT_PATHS = ["/folder1"] result = self.mgmt_client.endpoints.begin_load_content(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -496,12 +471,10 @@ def test_cdn(self, resource_group): # Endpoints_Update[patch] BODY = { - "tags": { - "additional_properties": "Tag1" - }, - # "web_application_firewall_policy_link": { - # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" - # } + "tags": {"additional_properties": "Tag1"}, + # "web_application_firewall_policy_link": { + # "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/" + CDN_WEB_APPLICATION_FIREWALL_POLICY_NAME + "" + # } } result = self.mgmt_client.endpoints.begin_update(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, BODY) result = result.result() @@ -513,19 +486,12 @@ def test_cdn(self, resource_group): result = self.mgmt_client.profiles.generate_sso_uri(resource_group.name, PROFILE_NAME) # Profiles_Update[patch] - BODY = { - "tags": { - "additional_properties": "Tag1" - } - } + BODY = {"tags": {"additional_properties": "Tag1"}} result = self.mgmt_client.profiles.begin_update(resource_group.name, PROFILE_NAME, BODY) result = result.result() # CheckNameAvailabilityWithSubscription[post] - BODY = { - "name": "sampleName", - "type": "Microsoft.Cdn/Profiles/Endpoints" - } + BODY = {"name": "sampleName", "type": "Microsoft.Cdn/Profiles/Endpoints"} # CHECK_NAME = "sampleName" result = self.mgmt_client.check_name_availability_with_subscription(BODY) @@ -533,22 +499,19 @@ def test_cdn(self, resource_group): result = self.mgmt_client.resource_usage.list() # ValidateProbe[post] - BODY = { - "probe_url": "https://www.bing.com/image" - } + BODY = {"probe_url": "https://www.bing.com/image"} # PROBEURL = "https://www.bing.com/image" result = self.mgmt_client.validate_probe(BODY) # CheckNameAvailability[post] - BODY = { - "name": "sampleName", - "type": "Microsoft.Cdn/Profiles/Endpoints" - } + BODY = {"name": "sampleName", "type": "Microsoft.Cdn/Profiles/Endpoints"} # CHECKNAME = "sampleName" result = self.mgmt_client.check_name_availability(BODY) # CustomDomains_Delete[delete] - result = self.mgmt_client.custom_domains.begin_delete(resource_group.name, PROFILE_NAME, ENDPOINT_NAME, CUSTOM_DOMAIN_NAME) + result = self.mgmt_client.custom_domains.begin_delete( + resource_group.name, PROFILE_NAME, ENDPOINT_NAME, CUSTOM_DOMAIN_NAME + ) result = result.result() """ @@ -565,6 +528,6 @@ def test_cdn(self, resource_group): result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/__init__.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/__init__.py index eb4a9e9308ff..b9c78f6de3f0 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/__init__.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['AzureChangeAnalysisManagementClient'] +__all__ = ["AzureChangeAnalysisManagementClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py index 59fade86330f..3406fc6eb140 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_azure_change_analysis_management_client.py @@ -49,7 +49,7 @@ def __init__( ): # type: (...) -> None if not base_url: - base_url = 'https://management.azure.com' + base_url = "https://management.azure.com" self._config = AzureChangeAnalysisManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -58,12 +58,11 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.resource_changes = ResourceChangesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.changes = ChangesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.changes = ChangesOperations(self._client, self._config, self._serialize, self._deserialize) def close(self): # type: () -> None diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_configuration.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_configuration.py index 8db0f707abf0..034c5d01af73 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_configuration.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/_configuration.py @@ -49,23 +49,24 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2021-04-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-changeanalysis/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-changeanalysis/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/__init__.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/__init__.py index 62cc3cf5659c..ebeb4d969789 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/__init__.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._azure_change_analysis_management_client import AzureChangeAnalysisManagementClient -__all__ = ['AzureChangeAnalysisManagementClient'] + +__all__ = ["AzureChangeAnalysisManagementClient"] diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py index ae4782f4ec1b..a5e49047eb0f 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_azure_change_analysis_management_client.py @@ -39,14 +39,10 @@ class AzureChangeAnalysisManagementClient(object): """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: if not base_url: - base_url = 'https://management.azure.com' + base_url = "https://management.azure.com" self._config = AzureChangeAnalysisManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -55,12 +51,11 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.resource_changes = ResourceChangesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.changes = ChangesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.changes = ChangesOperations(self._client, self._config, self._serialize, self._deserialize) async def close(self) -> None: await self._client.close() diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_configuration.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_configuration.py index 857015f4191c..dc54df820cae 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_configuration.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/_configuration.py @@ -31,12 +31,7 @@ class AzureChangeAnalysisManagementClientConfiguration(Configuration): :type subscription_id: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -46,22 +41,21 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2021-04-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-changeanalysis/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-changeanalysis/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/__init__.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/__init__.py index 24cfe7b39cca..88f599e8ce52 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/__init__.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/__init__.py @@ -11,7 +11,7 @@ from ._changes_operations import ChangesOperations __all__ = [ - 'Operations', - 'ResourceChangesOperations', - 'ChangesOperations', + "Operations", + "ResourceChangesOperations", + "ChangesOperations", ] diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py index 3f8f556d0e54..12940ab56551 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_changes_operations.py @@ -10,16 +10,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ChangesOperations: """ChangesOperations async operations. @@ -71,34 +78,41 @@ def list_changes_by_resource_group( :rtype: ~azure.core.async_paging.AsyncItemPaged[~Microsoft.ChangeAnalysis.models.ChangeList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChangeList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ChangeList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list_changes_by_resource_group.metadata['url'] # type: ignore + url = self.list_changes_by_resource_group.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", + resource_group_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') - query_parameters['$endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["$startTime"] = self._serialize.query("start_time", start_time, "iso-8601") + query_parameters["$endTime"] = self._serialize.query("end_time", end_time, "iso-8601") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.get(url, query_parameters, header_parameters) else: @@ -108,7 +122,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ChangeList', pipeline_response) + deserialized = self._deserialize("ChangeList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -127,17 +141,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list_changes_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ChangeAnalysis/changes'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list_changes_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ChangeAnalysis/changes"} # type: ignore def list_changes_by_subscription( - self, - start_time: datetime.datetime, - end_time: datetime.datetime, - skip_token: Optional[str] = None, - **kwargs + self, start_time: datetime.datetime, end_time: datetime.datetime, skip_token: Optional[str] = None, **kwargs ) -> AsyncIterable["_models.ChangeList"]: """List the changes of a subscription within the specified time range. Customer data will always be masked. @@ -158,33 +167,33 @@ def list_changes_by_subscription( :rtype: ~azure.core.async_paging.AsyncItemPaged[~Microsoft.ChangeAnalysis.models.ChangeList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChangeList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ChangeList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list_changes_by_subscription.metadata['url'] # type: ignore + url = self.list_changes_by_subscription.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') - query_parameters['$endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["$startTime"] = self._serialize.query("start_time", start_time, "iso-8601") + query_parameters["$endTime"] = self._serialize.query("end_time", end_time, "iso-8601") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.get(url, query_parameters, header_parameters) else: @@ -194,7 +203,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ChangeList', pipeline_response) + deserialized = self._deserialize("ChangeList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -213,7 +222,6 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list_changes_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/changes'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list_changes_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/changes"} # type: ignore diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py index 2c46b20f74a6..12cdefbc4e5a 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_operations.py @@ -9,16 +9,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class Operations: """Operations async operations. @@ -42,9 +49,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config def list( - self, - skip_token: Optional[str] = None, - **kwargs + self, skip_token: Optional[str] = None, **kwargs ) -> AsyncIterable["_models.ResourceProviderOperationList"]: """Lists all the supported operations by the Microsoft.ChangeAnalysis resource provider along with their descriptions. @@ -61,27 +66,25 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~Microsoft.ChangeAnalysis.models.ResourceProviderOperationList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceProviderOperationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ResourceProviderOperationList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.get(url, query_parameters, header_parameters) else: @@ -91,7 +94,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ResourceProviderOperationList', pipeline_response) + deserialized = self._deserialize("ResourceProviderOperationList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,7 +113,6 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.ChangeAnalysis/operations'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.ChangeAnalysis/operations"} # type: ignore diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py index 96944ce0b6f0..e392199ef16e 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/aio/operations/_resource_changes_operations.py @@ -10,16 +10,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ResourceChangesOperations: """ResourceChangesOperations async operations. @@ -71,33 +78,31 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~Microsoft.ChangeAnalysis.models.ChangeList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChangeList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ChangeList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + "resourceId": self._serialize.url("resource_id", resource_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') - query_parameters['$endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["$startTime"] = self._serialize.query("start_time", start_time, "iso-8601") + query_parameters["$endTime"] = self._serialize.query("end_time", end_time, "iso-8601") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.post(url, query_parameters, header_parameters) else: @@ -107,7 +112,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ChangeList', pipeline_response) + deserialized = self._deserialize("ChangeList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,7 +131,6 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/{resourceId}/providers/Microsoft.ChangeAnalysis/resourceChanges'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/{resourceId}/providers/Microsoft.ChangeAnalysis/resourceChanges"} # type: ignore diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/__init__.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/__init__.py index 057fdce99a1b..1a4f11ca1609 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/__init__.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/__init__.py @@ -40,19 +40,19 @@ ) __all__ = [ - 'Change', - 'ChangeList', - 'ChangeProperties', - 'ErrorAdditionalInfo', - 'ErrorDetail', - 'ErrorResponse', - 'PropertyChange', - 'ProxyResource', - 'Resource', - 'ResourceProviderOperationDefinition', - 'ResourceProviderOperationDisplay', - 'ResourceProviderOperationList', - 'ChangeCategory', - 'ChangeType', - 'Level', + "Change", + "ChangeList", + "ChangeProperties", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorResponse", + "PropertyChange", + "ProxyResource", + "Resource", + "ResourceProviderOperationDefinition", + "ResourceProviderOperationDisplay", + "ResourceProviderOperationList", + "ChangeCategory", + "ChangeType", + "Level", ] diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_azure_change_analysis_management_client_enums.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_azure_change_analysis_management_client_enums.py index 2d31860ca740..bc1de99e36d8 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_azure_change_analysis_management_client_enums.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_azure_change_analysis_management_client_enums.py @@ -11,20 +11,20 @@ class ChangeCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The change category. - """ + """The change category.""" USER = "User" SYSTEM = "System" + class ChangeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of the change. - """ + """The type of the change.""" ADD = "Add" REMOVE = "Remove" UPDATE = "Update" + class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta): NOISY = "Noisy" diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py index 67a7aa6f19d0..b71139fd5c20 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models.py @@ -26,21 +26,18 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -65,24 +62,21 @@ class Change(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ChangeProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ChangeProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Change, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class ChangeList(msrest.serialization.Model): @@ -95,17 +89,14 @@ class ChangeList(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Change]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Change]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ChangeList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class ChangeProperties(msrest.serialization.Model): @@ -125,23 +116,20 @@ class ChangeProperties(msrest.serialization.Model): """ _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, - 'initiated_by_list': {'key': 'initiatedByList', 'type': '[str]'}, - 'change_type': {'key': 'changeType', 'type': 'str'}, - 'property_changes': {'key': 'propertyChanges', 'type': '[PropertyChange]'}, + "resource_id": {"key": "resourceId", "type": "str"}, + "time_stamp": {"key": "timeStamp", "type": "iso-8601"}, + "initiated_by_list": {"key": "initiatedByList", "type": "[str]"}, + "change_type": {"key": "changeType", "type": "str"}, + "property_changes": {"key": "propertyChanges", "type": "[PropertyChange]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ChangeProperties, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.time_stamp = kwargs.get('time_stamp', None) - self.initiated_by_list = kwargs.get('initiated_by_list', None) - self.change_type = kwargs.get('change_type', None) - self.property_changes = kwargs.get('property_changes', None) + self.resource_id = kwargs.get("resource_id", None) + self.time_stamp = kwargs.get("time_stamp", None) + self.initiated_by_list = kwargs.get("initiated_by_list", None) + self.change_type = kwargs.get("change_type", None) + self.property_changes = kwargs.get("property_changes", None) class ErrorAdditionalInfo(msrest.serialization.Model): @@ -156,19 +144,16 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -192,25 +177,22 @@ class ErrorDetail(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -227,15 +209,12 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.error = kwargs.get("error", None) class PropertyChange(msrest.serialization.Model): @@ -265,31 +244,28 @@ class PropertyChange(msrest.serialization.Model): """ _attribute_map = { - 'change_type': {'key': 'changeType', 'type': 'str'}, - 'change_category': {'key': 'changeCategory', 'type': 'str'}, - 'json_path': {'key': 'jsonPath', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'is_data_masked': {'key': 'isDataMasked', 'type': 'bool'}, + "change_type": {"key": "changeType", "type": "str"}, + "change_category": {"key": "changeCategory", "type": "str"}, + "json_path": {"key": "jsonPath", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "level": {"key": "level", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "old_value": {"key": "oldValue", "type": "str"}, + "new_value": {"key": "newValue", "type": "str"}, + "is_data_masked": {"key": "isDataMasked", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PropertyChange, self).__init__(**kwargs) - self.change_type = kwargs.get('change_type', None) - self.change_category = kwargs.get('change_category', None) - self.json_path = kwargs.get('json_path', None) - self.display_name = kwargs.get('display_name', None) - self.level = kwargs.get('level', None) - self.description = kwargs.get('description', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.is_data_masked = kwargs.get('is_data_masked', None) + self.change_type = kwargs.get("change_type", None) + self.change_category = kwargs.get("change_category", None) + self.json_path = kwargs.get("json_path", None) + self.display_name = kwargs.get("display_name", None) + self.level = kwargs.get("level", None) + self.description = kwargs.get("description", None) + self.old_value = kwargs.get("old_value", None) + self.new_value = kwargs.get("new_value", None) + self.is_data_masked = kwargs.get("is_data_masked", None) class ProxyResource(Resource): @@ -308,21 +284,18 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) @@ -336,17 +309,14 @@ class ResourceProviderOperationDefinition(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "ResourceProviderOperationDisplay"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ResourceProviderOperationDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) + self.name = kwargs.get("name", None) + self.display = kwargs.get("display", None) class ResourceProviderOperationDisplay(msrest.serialization.Model): @@ -363,21 +333,18 @@ class ResourceProviderOperationDisplay(msrest.serialization.Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ResourceProviderOperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) + self.provider = kwargs.get("provider", None) + self.resource = kwargs.get("resource", None) + self.operation = kwargs.get("operation", None) + self.description = kwargs.get("description", None) class ResourceProviderOperationList(msrest.serialization.Model): @@ -391,14 +358,11 @@ class ResourceProviderOperationList(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[ResourceProviderOperationDefinition]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ResourceProviderOperationDefinition]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ResourceProviderOperationList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py index e472276a1689..6b8c37cb4ccf 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/models/_models_py3.py @@ -31,21 +31,18 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -70,24 +67,19 @@ class Change(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ChangeProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ChangeProperties"}, } - def __init__( - self, - *, - properties: Optional["ChangeProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["ChangeProperties"] = None, **kwargs): super(Change, self).__init__(**kwargs) self.properties = properties @@ -102,17 +94,11 @@ class ChangeList(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Change]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Change]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["Change"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["Change"]] = None, next_link: Optional[str] = None, **kwargs): super(ChangeList, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -135,11 +121,11 @@ class ChangeProperties(msrest.serialization.Model): """ _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, - 'initiated_by_list': {'key': 'initiatedByList', 'type': '[str]'}, - 'change_type': {'key': 'changeType', 'type': 'str'}, - 'property_changes': {'key': 'propertyChanges', 'type': '[PropertyChange]'}, + "resource_id": {"key": "resourceId", "type": "str"}, + "time_stamp": {"key": "timeStamp", "type": "iso-8601"}, + "initiated_by_list": {"key": "initiatedByList", "type": "[str]"}, + "change_type": {"key": "changeType", "type": "str"}, + "property_changes": {"key": "propertyChanges", "type": "[PropertyChange]"}, } def __init__( @@ -172,19 +158,16 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -208,25 +191,22 @@ class ErrorDetail(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -243,15 +223,10 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - *, - error: Optional["ErrorDetail"] = None, - **kwargs - ): + def __init__(self, *, error: Optional["ErrorDetail"] = None, **kwargs): super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -283,15 +258,15 @@ class PropertyChange(msrest.serialization.Model): """ _attribute_map = { - 'change_type': {'key': 'changeType', 'type': 'str'}, - 'change_category': {'key': 'changeCategory', 'type': 'str'}, - 'json_path': {'key': 'jsonPath', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'is_data_masked': {'key': 'isDataMasked', 'type': 'bool'}, + "change_type": {"key": "changeType", "type": "str"}, + "change_category": {"key": "changeCategory", "type": "str"}, + "json_path": {"key": "jsonPath", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "level": {"key": "level", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "old_value": {"key": "oldValue", "type": "str"}, + "new_value": {"key": "newValue", "type": "str"}, + "is_data_masked": {"key": "isDataMasked", "type": "bool"}, } def __init__( @@ -336,21 +311,18 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) @@ -364,16 +336,12 @@ class ResourceProviderOperationDefinition(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "ResourceProviderOperationDisplay"}, } def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["ResourceProviderOperationDisplay"] = None, - **kwargs + self, *, name: Optional[str] = None, display: Optional["ResourceProviderOperationDisplay"] = None, **kwargs ): super(ResourceProviderOperationDefinition, self).__init__(**kwargs) self.name = name @@ -394,10 +362,10 @@ class ResourceProviderOperationDisplay(msrest.serialization.Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } def __init__( @@ -427,8 +395,8 @@ class ResourceProviderOperationList(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[ResourceProviderOperationDefinition]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ResourceProviderOperationDefinition]"}, + "next_link": {"key": "nextLink", "type": "str"}, } def __init__( diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/__init__.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/__init__.py index 24cfe7b39cca..88f599e8ce52 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/__init__.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/__init__.py @@ -11,7 +11,7 @@ from ._changes_operations import ChangesOperations __all__ = [ - 'Operations', - 'ResourceChangesOperations', - 'ChangesOperations', + "Operations", + "ResourceChangesOperations", + "ChangesOperations", ] diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py index e68df8044032..1f31a3d415f3 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_changes_operations.py @@ -9,7 +9,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -21,9 +27,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class ChangesOperations(object): """ChangesOperations operations. @@ -76,34 +83,41 @@ def list_changes_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~Microsoft.ChangeAnalysis.models.ChangeList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChangeList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ChangeList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list_changes_by_resource_group.metadata['url'] # type: ignore + url = self.list_changes_by_resource_group.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", + resource_group_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') - query_parameters['$endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["$startTime"] = self._serialize.query("start_time", start_time, "iso-8601") + query_parameters["$endTime"] = self._serialize.query("end_time", end_time, "iso-8601") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.get(url, query_parameters, header_parameters) else: @@ -113,7 +127,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ChangeList', pipeline_response) + deserialized = self._deserialize("ChangeList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -132,10 +146,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list_changes_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ChangeAnalysis/changes'} # type: ignore + return ItemPaged(get_next, extract_data) + + list_changes_by_resource_group.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ChangeAnalysis/changes"} # type: ignore def list_changes_by_subscription( self, @@ -164,33 +177,33 @@ def list_changes_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~Microsoft.ChangeAnalysis.models.ChangeList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChangeList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ChangeList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list_changes_by_subscription.metadata['url'] # type: ignore + url = self.list_changes_by_subscription.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') - query_parameters['$endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["$startTime"] = self._serialize.query("start_time", start_time, "iso-8601") + query_parameters["$endTime"] = self._serialize.query("end_time", end_time, "iso-8601") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.get(url, query_parameters, header_parameters) else: @@ -200,7 +213,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ChangeList', pipeline_response) + deserialized = self._deserialize("ChangeList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -219,7 +232,6 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list_changes_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/changes'} # type: ignore + return ItemPaged(get_next, extract_data) + + list_changes_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/changes"} # type: ignore diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py index 119f3e6d2f91..53836de3cf47 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -20,9 +26,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class Operations(object): """Operations operations. @@ -66,27 +73,25 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~Microsoft.ChangeAnalysis.models.ResourceProviderOperationList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceProviderOperationList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ResourceProviderOperationList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.get(url, query_parameters, header_parameters) else: @@ -96,7 +101,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ResourceProviderOperationList', pipeline_response) + deserialized = self._deserialize("ResourceProviderOperationList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,7 +120,6 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.ChangeAnalysis/operations'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/providers/Microsoft.ChangeAnalysis/operations"} # type: ignore diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py index 357cbe97225a..58a9121359fa 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/azure/mgmt/changeanalysis/operations/_resource_changes_operations.py @@ -9,7 +9,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -21,9 +27,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class ResourceChangesOperations(object): """ResourceChangesOperations operations. @@ -76,33 +83,31 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~Microsoft.ChangeAnalysis.models.ChangeList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChangeList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ChangeList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + "resourceId": self._serialize.url("resource_id", resource_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['$startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') - query_parameters['$endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["$startTime"] = self._serialize.query("start_time", start_time, "iso-8601") + query_parameters["$endTime"] = self._serialize.query("end_time", end_time, "iso-8601") if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + query_parameters["$skipToken"] = self._serialize.query("skip_token", skip_token, "str") request = self._client.post(url, query_parameters, header_parameters) else: @@ -112,7 +117,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ChangeList', pipeline_response) + deserialized = self._deserialize("ChangeList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -131,7 +136,6 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/{resourceId}/providers/Microsoft.ChangeAnalysis/resourceChanges'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/{resourceId}/providers/Microsoft.ChangeAnalysis/resourceChanges"} # type: ignore diff --git a/sdk/changeanalysis/azure-mgmt-changeanalysis/setup.py b/sdk/changeanalysis/azure-mgmt-changeanalysis/setup.py index 9074df58f870..808a9d8ca91a 100644 --- a/sdk/changeanalysis/azure-mgmt-changeanalysis/setup.py +++ b/sdk/changeanalysis/azure-mgmt-changeanalysis/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_patch.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_patch.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_patch.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_patch.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_patch.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_patch.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/chaos/azure-mgmt-chaos/setup.py b/sdk/chaos/azure-mgmt-chaos/setup.py index 189ec22d9181..2558b4be2bad 100644 --- a/sdk/chaos/azure-mgmt-chaos/setup.py +++ b/sdk/chaos/azure-mgmt-chaos/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/_patch.py b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/_patch.py +++ b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/_patch.py b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/_patch.py +++ b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/operations/_patch.py b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/operations/_patch.py +++ b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/models/_patch.py b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/models/_patch.py +++ b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/operations/_patch.py b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/operations/_patch.py +++ b/sdk/cloudhealth/azure-mgmt-cloudhealth/azure/mgmt/cloudhealth/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cloudhealth/azure-mgmt-cloudhealth/setup.py b/sdk/cloudhealth/azure-mgmt-cloudhealth/setup.py index 7c7ed80a1a47..284f48d990ad 100644 --- a/sdk/cloudhealth/azure-mgmt-cloudhealth/setup.py +++ b/sdk/cloudhealth/azure-mgmt-cloudhealth/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/_patch.py index b22255eb48de..6d9501eb2878 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/_patch.py @@ -6,6 +6,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, TYPE_CHECKING, Union, Optional from azure.core.credentials import AzureKeyCredential from ._client import ConversationAuthoringClient as AuthoringClientGenerated diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/_patch.py index 16c2c2e44957..810cfa1c8750 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/_patch.py @@ -6,6 +6,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, TYPE_CHECKING, Union, Optional from azure.core.credentials import AzureKeyCredential from ._client import ConversationAuthoringClient as AuthoringClientGenerated diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_operations.py index 4f52cf764e54..0c56460ddd5d 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from collections.abc import MutableMapping # pylint:disable=import-error +from collections.abc import MutableMapping # pylint:disable=import-error from io import IOBase import json from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_patch.py index 8f26525b0e0f..6dea591887c4 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_patch.py @@ -7,9 +7,11 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from ._project_op_patch import ProjectOperations from ._deployment_op_patch import DeploymentOperations + def patch_sdk(): """Do not remove from this file. `patch_sdk` is a last resort escape hatch that allows you to do customizations diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_project_op_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_project_op_patch.py index 9e09ee691be6..dcb5f69c62cd 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_project_op_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/aio/operations/_project_op_patch.py @@ -7,6 +7,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping # pylint:disable=import-error from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/models/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/models/_patch.py index 6a8a6a72b700..914e6a656bf5 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/models/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/models/_patch.py @@ -7,6 +7,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping, Awaitable # pylint:disable=import-error from typing import Any, Callable, Tuple, TypeVar, cast, Mapping, Optional, List @@ -56,6 +57,7 @@ T = TypeVar("T") PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) + class _JobsStrategy(LongRunningOperation): """Interprets job-status responses and tells the poller which URL to use.""" @@ -216,7 +218,9 @@ def get_continuation_token(self) -> str: return base64.b64encode(raw).decode("ascii") @classmethod - def from_continuation_token(cls, continuation_token: str, **kwargs: Any) -> Tuple[Any, Any, Callable[[Any], PollingReturnType_co]]: + def from_continuation_token( + cls, continuation_token: str, **kwargs: Any + ) -> Tuple[Any, Any, Callable[[Any], PollingReturnType_co]]: try: client = kwargs["client"] except KeyError as exc: @@ -225,9 +229,7 @@ def from_continuation_token(cls, continuation_token: str, **kwargs: Any) -> Tupl try: deserialization_callback = kwargs["deserialization_callback"] except KeyError as exc: - raise ValueError( - "Need kwarg 'deserialization_callback' to be recreated from continuation_token" - ) from exc + raise ValueError("Need kwarg 'deserialization_callback' to be recreated from continuation_token") from exc import json @@ -247,6 +249,7 @@ def from_continuation_token(cls, continuation_token: str, **kwargs: Any) -> Tupl # The file_id and other state can be extracted and used to resume polling return client, state, deserialization_callback + class _AsyncJobsPollingMethod(AsyncPollingMethod): def __init__( self, @@ -382,7 +385,9 @@ def get_continuation_token(self) -> str: return base64.b64encode(raw).decode("ascii") @classmethod - def from_continuation_token(cls, continuation_token: str, **kwargs: Any) -> Tuple[Any, Any, Callable[[Any], PollingReturnType_co]]: + def from_continuation_token( + cls, continuation_token: str, **kwargs: Any + ) -> Tuple[Any, Any, Callable[[Any], PollingReturnType_co]]: try: client = kwargs["client"] except KeyError as exc: @@ -391,9 +396,7 @@ def from_continuation_token(cls, continuation_token: str, **kwargs: Any) -> Tupl try: deserialization_callback = kwargs["deserialization_callback"] except KeyError as exc: - raise ValueError( - "Need kwarg 'deserialization_callback' to be recreated from continuation_token" - ) from exc + raise ValueError("Need kwarg 'deserialization_callback' to be recreated from continuation_token") from exc import json @@ -413,6 +416,7 @@ def from_continuation_token(cls, continuation_token: str, **kwargs: Any) -> Tupl # The file_id and other state can be extracted and used to resume polling return client, state, deserialization_callback + class CreateDeploymentDetails(_GeneratedCreateDeploymentDetails): """Represents the options for creating or updating a project deployment. @@ -455,9 +459,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, azure_resource_ids=None, **kwargs) return - raise TypeError( - "azure_resource_ids must be a list of str or a list of AssignedProjectResource." - ) + raise TypeError("azure_resource_ids must be a list of str or a list of AssignedProjectResource.") + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_operations.py index 61b95b741eff..076c98c23ce1 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from collections.abc import MutableMapping # pylint:disable=import-error +from collections.abc import MutableMapping # pylint:disable=import-error from io import IOBase import json from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_patch.py index 8f26525b0e0f..6dea591887c4 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_patch.py @@ -7,9 +7,11 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from ._project_op_patch import ProjectOperations from ._deployment_op_patch import DeploymentOperations + def patch_sdk(): """Do not remove from this file. `patch_sdk` is a last resort escape hatch that allows you to do customizations diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_project_op_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_project_op_patch.py index 9ccab0a9baa5..982083dd6a95 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_project_op_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/azure/ai/language/conversations/authoring/operations/_project_op_patch.py @@ -7,6 +7,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping # pylint:disable=import-error from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_authentication_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_authentication_async.py index c7af98dd8e1f..8827a3b29792 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_authentication_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_authentication_async.py @@ -48,7 +48,7 @@ async def sample_authentication_api_key_async(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] key = os.environ["AZURE_CONVERSATIONS_KEY"] - clu_client = ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint: disable=unused-variable + clu_client = ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint: disable=unused-variable # [END create_clu_client_with_key_async] @@ -63,7 +63,7 @@ async def sample_authentication_with_aad(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] credential = DefaultAzureCredential() - clu_client = ConversationAuthoringClient(endpoint, credential=credential) # pylint: disable=unused-variable + clu_client = ConversationAuthoringClient(endpoint, credential=credential) # pylint: disable=unused-variable async def main(): diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_get_assign_project_resources_status_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_get_assign_project_resources_status_async.py index d0f3e7aefb42..6480ba6a0a7b 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_get_assign_project_resources_status_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/async/sample_get_assign_project_resources_status_async.py @@ -35,6 +35,7 @@ from azure.core.exceptions import HttpResponseError from azure.ai.language.conversations.authoring.aio import ConversationAuthoringClient + async def sample_assign_project_res_status_async(): # settings endpoint = os.environ["AZURE_CONVERSATIONS_AUTHORING_ENDPOINT"] diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/sample_authentication.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/sample_authentication.py index 14a009a25527..cc64e2174801 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/sample_authentication.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/samples/sample_authentication.py @@ -48,7 +48,7 @@ def sample_authentication_api_key(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] key = os.environ["AZURE_CONVERSATIONS_KEY"] - clu_client = ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint: disable=unused-variable + clu_client = ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint: disable=unused-variable # [END create_clu_client_with_key] @@ -63,7 +63,7 @@ def sample_authentication_with_aad(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] credential = DefaultAzureCredential() - clu_client = ConversationAuthoringClient(endpoint, credential=credential) # pylint: disable=unused-variable + clu_client = ConversationAuthoringClient(endpoint, credential=credential) # pylint: disable=unused-variable def main(): diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/conftest.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/conftest.py index fdc882e5cf09..5c03da624e24 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/conftest.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/conftest.py @@ -5,19 +5,22 @@ ENV_ENDPOINT = "AUTHORING_ENDPOINT" ENV_KEY = "AUTHORING_KEY" + @pytest.fixture(scope="session") def authoring_endpoint(environment_variables: EnvironmentVariableLoader) -> str: """Endpoint for Authoring tests.""" return environment_variables.get(ENV_ENDPOINT) + @pytest.fixture(scope="session") def authoring_key(environment_variables: EnvironmentVariableLoader) -> str: """API key for Authoring tests.""" return environment_variables.get(ENV_KEY) + # autouse=True will trigger this fixture on each pytest run # test_proxy auto-starts the test proxy # patch_sleep and patch_async_sleep remove wait times during polling @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy, patch_sleep, patch_async_sleep): - return \ No newline at end of file + return diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job.py index e403201385a8..de8590e29130 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job.py @@ -18,6 +18,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint, key): return ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) + @pytest.mark.playback_test_only class TestConversationsCancelTrainingSync(TestConversations): @ConversationsPreparer() @@ -50,4 +51,4 @@ def test_cancel_training_job(self, authoring_endpoint, authoring_key): if result.evaluation_status is not None: print(f"Evaluation Status: {result.evaluation_status.status}") print(f"Evaluation %: {result.evaluation_status.percent_complete}") - print(f"Estimated End: {result.estimated_end_on}") \ No newline at end of file + print(f"Estimated End: {result.estimated_end_on}") diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job_async.py index c69a41134272..ac50cc616055 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_cancel_training_job_async.py @@ -19,6 +19,7 @@ class TestConversationsAsync(AzureRecordedTestCase): async def create_client(self, endpoint: str, key: str) -> ConversationAuthoringClient: return ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) + @pytest.mark.playback_test_only class TestConversationsCancelTrainingAsync(TestConversationsAsync): @ConversationsPreparer() @@ -55,4 +56,4 @@ async def test_cancel_training_job_async(self, authoring_endpoint, authoring_key print(f"Evaluation %: {result.evaluation_status.percent_complete}") print(f"Estimated End: {result.estimated_end_on}") finally: - await client.close() \ No newline at end of file + await client.close() diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment.py index 4a2d928c8dfe..13e0bb63d75d 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment.py @@ -20,6 +20,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint, key): return ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) + class TestConversationsDeleteDeploymentSync(TestConversations): @ConversationsPreparer() @@ -34,12 +35,13 @@ def test_deploy_project(self, authoring_endpoint, authoring_key): project_client = client.get_project_client(project_name) # Build request body for deployment - details = CreateDeploymentDetails(trained_model_label=trained_model_label, + details = CreateDeploymentDetails( + trained_model_label=trained_model_label, azure_resource_ids=[ - AssignedProjectResource( - resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", - region="eastus2", - ) + AssignedProjectResource( + resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", + region="eastus2", + ) ], ) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_async.py index 292cce3a4e91..c45be286faad 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_async.py @@ -21,6 +21,7 @@ class TestConversationsAsync(AzureRecordedTestCase): async def create_client(self, endpoint: str, key: str) -> ConversationAuthoringClient: return ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) + class TestConversationsDeleteDeploymentAsync(TestConversationsAsync): @ConversationsPreparer() @@ -36,12 +37,13 @@ async def test_deploy_project_async(self, authoring_endpoint, authoring_key): project_client = client.get_project_client(project_name) # Build request body for deployment - details = CreateDeploymentDetails(trained_model_label=trained_model_label, - azure_resource_ids=[ - AssignedProjectResource( - resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", - region="eastus2", - ) + details = CreateDeploymentDetails( + trained_model_label=trained_model_label, + azure_resource_ids=[ + AssignedProjectResource( + resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", + region="eastus2", + ) ], ) @@ -59,6 +61,7 @@ async def test_deploy_project_async(self, authoring_endpoint, authoring_key): # If we get here, the deploy succeeded print(f"Deploy project completed. done={poller.done()} status={poller.status()}") + @ConversationsPreparer() @recorded_by_proxy_async @pytest.mark.asyncio diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources.py index 2f2039bab226..ceea35030065 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources.py @@ -20,6 +20,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint, key): return ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) + @pytest.mark.playback_test_only class TestConversationsDeleteDeploymentSync(TestConversations): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources_async.py index 54849b7f7bbc..3b4a631e2573 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_delete_deployment_from_resources_async.py @@ -21,6 +21,7 @@ class TestConversationsAsync(AzureRecordedTestCase): async def create_client(self, endpoint: str, key: str) -> ConversationAuthoringClient: return ConversationAuthoringClient(endpoint, AzureKeyCredential(key)) + @pytest.mark.playback_test_only class TestConversationsDeleteDeploymentFromResourcesAsync(TestConversationsAsync): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project.py index e433b35709a1..1718b9943224 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project.py @@ -33,12 +33,13 @@ def test_deploy_project(self, authoring_endpoint, authoring_key): project_client = client.get_project_client(project_name) # Build request body for deployment - details = CreateDeploymentDetails(trained_model_label=trained_model_label, + details = CreateDeploymentDetails( + trained_model_label=trained_model_label, azure_resource_ids=[ - AssignedProjectResource( - resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", - region="eastus2", - ) + AssignedProjectResource( + resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", + region="eastus2", + ) ], ) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project_async.py index 10bcd98b4e40..6de23be44192 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations-authoring/tests/test_deploy_project_async.py @@ -36,12 +36,13 @@ async def test_deploy_project_async(self, authoring_endpoint, authoring_key): project_client = client.get_project_client(project_name) # Build request body for deployment - details = CreateDeploymentDetails(trained_model_label=trained_model_label, - azure_resource_ids=[ - AssignedProjectResource( - resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", - region="eastus2", - ) + details = CreateDeploymentDetails( + trained_model_label=trained_model_label, + azure_resource_ids=[ + AssignedProjectResource( + resource_id="/subscriptions/b72743ec-8bb3-453f-83ad-a53e8a50712e/resourceGroups/language-sdk-rg/providers/Microsoft.CognitiveServices/accounts/sdk-test-02", + region="eastus2", + ) ], ) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_operations.py index 47af4ea2806b..bfafeebc7daf 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from collections.abc import MutableMapping # pylint:disable=import-error +from collections.abc import MutableMapping # pylint:disable=import-error from io import IOBase import json from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_patch.py index a5551cfc7fc0..77a8f1d7ed1d 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json from typing import Any, Callable, Dict, IO, Mapping, Optional, TypeVar, Union, cast, overload, Generic, TYPE_CHECKING from collections.abc import MutableMapping # pylint:disable=import-error @@ -272,7 +273,7 @@ def get_long_running_output(pipeline_response): # stash state on the custom poller for `.details` poller_ref = poller_holder["poller"] - poller_ref._record_state_for_details(op_state) # pylint:disable=protected-access + poller_ref._record_state_for_details(op_state) # pylint:disable=protected-access paged = _build_pager_from_state(op_state) return cls(pipeline_response, paged, {}) if cls else paged diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_operations.py index 850d1a0a849a..7610d102002f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from collections.abc import MutableMapping # pylint:disable=import-error +from collections.abc import MutableMapping # pylint:disable=import-error from io import IOBase import json from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_patch.py index 849fbbb1b2ca..52e6e6555cbe 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json from typing import Any, Callable, Dict, IO, Mapping, Optional, TypeVar, Union, cast, overload, Generic, TYPE_CHECKING from collections.abc import MutableMapping # pylint:disable=import-error @@ -268,7 +269,7 @@ def get_long_running_output(pipeline_response): op_state = AnalyzeConversationOperationState(data) poller_ref = poller_holder["poller"] - poller_ref._record_state_for_details(op_state) # pylint:disable=protected-access + poller_ref._record_state_for_details(op_state) # pylint:disable=protected-access paged = _build_pager_from_state(op_state) return cls(pipeline_response, paged, {}) if cls else paged diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_patch.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_patch.py index c4c8835375ca..acf7a2d399f8 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from ._models import ( AnalyzeConversationOperationInput, MultiLanguageConversationInput, diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_authentication_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_authentication_async.py index 0960f3a7b06c..4793293bae9f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_authentication_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_authentication_async.py @@ -39,7 +39,7 @@ async def sample_authentication_api_key_async(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] key = os.environ["AZURE_CONVERSATIONS_KEY"] - clu_client = ConversationAnalysisClient(endpoint, AzureKeyCredential(key)) #pylint:disable=unused-variable + clu_client = ConversationAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_clu_client_with_key_async] @@ -54,7 +54,7 @@ async def sample_authentication_with_aad(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] credential = DefaultAzureCredential() - clu_client = ConversationAnalysisClient(endpoint, credential=credential) #pylint:disable=unused-variable + clu_client = ConversationAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable async def main(): diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conversation_multi_turn_prediction_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conversation_multi_turn_prediction_async.py index 2f702ff53aa1..0bc2a3d8f521 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conversation_multi_turn_prediction_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_conversation_multi_turn_prediction_async.py @@ -22,7 +22,7 @@ AZURE_CLIENT_SECRET AZURE_CONVERSATIONS_PROJECT_NAME AZURE_CONVERSATIONS_DEPLOYMENT_NAME - + NOTE: If you prefer `AzureKeyCredential`, set: AZURE_CONVERSATIONS_ENDPOINT diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_authentication.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_authentication.py index ba5c134b6480..501be9eb5e5e 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_authentication.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_authentication.py @@ -39,7 +39,7 @@ def sample_authentication_api_key(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] key = os.environ["AZURE_CONVERSATIONS_KEY"] - clu_client = ConversationAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + clu_client = ConversationAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_clu_client_with_key] @@ -54,7 +54,7 @@ def sample_authentication_with_aad(): endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] credential = DefaultAzureCredential() - clu_client = ConversationAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable + clu_client = ConversationAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable def main(): diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_multi_turn_prediction.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_multi_turn_prediction.py index 44bce24c34b3..3a40c81d5cd2 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_multi_turn_prediction.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_multi_turn_prediction.py @@ -22,7 +22,7 @@ AZURE_CLIENT_SECRET AZURE_CONVERSATIONS_PROJECT_NAME AZURE_CONVERSATIONS_DEPLOYMENT_NAME - + NOTE: If you prefer `AzureKeyCredential`, set: AZURE_CONVERSATIONS_ENDPOINT diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii.py index dfab28acff99..e8f0c0677537 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii.py @@ -113,7 +113,7 @@ def sample_conversation_pii(): print(f"Display Name: {d.get('display_name')}") # iterate results (sync pageable) - for actions_page in paged_actions: # pylint:disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint:disable=too-many-nested-blocks print( f"Completed: {actions_page.completed}, " f"In Progress: {actions_page.in_progress}, " diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_character_mask_policy.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_character_mask_policy.py index 63ceebe778ef..34b54ceea016 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_character_mask_policy.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_character_mask_policy.py @@ -116,7 +116,7 @@ def sample_conv_pii_char_mask_policy(): print(f" Code: {err.code} - {err.message}") # iterate results and verify redaction - for actions_page in paged_actions: # pylint:disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint:disable=too-many-nested-blocks for action_result in actions_page.task_results or []: if isinstance(action_result, ConversationPiiOperationResult): for conversation in action_result.results.conversations or []: diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_no_mask_policy.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_no_mask_policy.py index 6844463474a0..674b68dbf4b5 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_no_mask_policy.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_pii_with_no_mask_policy.py @@ -119,6 +119,7 @@ def sample_conv_pii_no_mask_policy(): returned_text = (item.redacted_content.text or "").strip() print(f"Returned text: '{returned_text}'") + # [END conversation_pii_with_no_mask_policy] diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_summarization.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_summarization.py index c34099cb1c7b..425576a95e9a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_summarization.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_conversation_summarization.py @@ -112,7 +112,7 @@ def sample_conversation_summarization(): print(f"Display Name: {d.get('display_name')}") # Iterate results - for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks print( f"Completed: {actions_page.completed}, " f"In Progress: {actions_page.in_progress}, " diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py index 22655355fd9c..3e08a03ca10e 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py @@ -5,19 +5,22 @@ ENV_ENDPOINT = "CONVERSATIONS_ENDPOINT" ENV_KEY = "CONVERSATIONS_KEY" + @pytest.fixture(scope="session") def conversations_endpoint(environment_variables: EnvironmentVariableLoader) -> str: """Endpoint for Conversations tests.""" return environment_variables.get(ENV_ENDPOINT) + @pytest.fixture(scope="session") def conversations_key(environment_variables: EnvironmentVariableLoader) -> str: """API key for Conversations tests.""" return environment_variables.get(ENV_KEY) + # autouse=True will trigger this fixture on each pytest run # test_proxy auto-starts the test proxy # patch_sleep and patch_async_sleep remove wait times during polling @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy, patch_sleep, patch_async_sleep): - return \ No newline at end of file + return diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii.py index d0b2a644a881..44435a488fc5 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii.py @@ -47,7 +47,7 @@ def create_client(self, endpoint, key): class TestConversationsCase(TestConversations): @ConversationsPreparer() @recorded_by_proxy - def test_conversation_pii(self, conversations_endpoint, conversations_key): # pylint: disable=too-many-statements + def test_conversation_pii(self, conversations_endpoint, conversations_key): # pylint: disable=too-many-statements client = self.create_client(conversations_endpoint, conversations_key) entities_detected: List[NamedEntity] = [] @@ -105,7 +105,7 @@ def test_conversation_pii(self, conversations_endpoint, conversations_key): # py print(f"Display Name: {d.get('display_name')}") # ---- Iterate pages and action results -------------------------------- - for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks print( f"Completed: {actions_page.completed}, " f"In Progress: {actions_page.in_progress}, " diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_async.py index 2fc58aa4778f..2bfca4685aac 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_async.py @@ -49,7 +49,9 @@ class TestConversationsCase(TestConversations): @ConversationsPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_conversation_pii_async(self, conversations_endpoint, conversations_key): # pylint: disable=too-many-statements + async def test_conversation_pii_async( + self, conversations_endpoint, conversations_key + ): # pylint: disable=too-many-statements client = await self.create_client(conversations_endpoint, conversations_key) try: @@ -116,7 +118,7 @@ async def test_conversation_pii_async(self, conversations_endpoint, conversation f"Failed: {actions_page.failed}, " f"Total: {actions_page.total}" ) - for action_result in actions_page.task_results or []: # pylint: disable=too-many-nested-blocks + for action_result in actions_page.task_results or []: # pylint: disable=too-many-nested-blocks ar = cast(AnalyzeConversationOperationResult, action_result) print(f"\nAction Name: {getattr(ar, 'name', None)}") print(f"Action Status: {getattr(ar, 'status', None)}") diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_character_mask_policy.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_character_mask_policy.py index ff77de632776..188cf007f5ab 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_character_mask_policy.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_character_mask_policy.py @@ -101,7 +101,7 @@ def test_conversation_pii_with_character_mask_policy(self, conversations_endpoin print(f"Status: {d.get('status')}") # ---- Iterate results and verify redaction ---------------------------- - for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks for action_result in actions_page.task_results or []: ar = cast(AnalyzeConversationOperationResult, action_result) if isinstance(ar, ConversationPiiOperationResult): diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_entity_mask_policy.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_entity_mask_policy.py index f309e8c96f1f..ef588fda473a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_entity_mask_policy.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_entity_mask_policy.py @@ -110,7 +110,7 @@ def test_conversation_pii_with_entity_mask_policy(self, conversations_endpoint, print(f" Code: {err.code} - {err.message}") # ---- Iterate results and validate redaction -------------------------- - for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks for action_result in actions_page.task_results or []: ar = cast(AnalyzeConversationOperationResult, action_result) print(f"\nAction Name: {getattr(ar, 'name', None)}") diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_no_mask_policy.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_no_mask_policy.py index b5fb0464d0b0..ec1fe5a03356 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_no_mask_policy.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_pii_with_no_mask_policy.py @@ -108,7 +108,7 @@ def test_conversation_pii_with_no_mask_policy(self, conversations_endpoint, conv print(f" Code: {err.code} - {err.message}") # ---- Iterate results and validate: PII present in returned text ------- - for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks + for actions_page in paged_actions: # pylint: disable=too-many-nested-blocks for action_result in actions_page.task_results or []: ar = cast(AnalyzeConversationOperationResult, action_result) if isinstance(ar, ConversationPiiOperationResult): diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction.py index b0b8a3696472..2e828cf2f8c1 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction.py @@ -37,6 +37,7 @@ def create_client(self, endpoint, key): ... + @pytest.mark.playback_test_only class TestConversationsCase(TestConversations): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction_async.py index 762ef09a6af0..059ce81d2877 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_prediction_async.py @@ -34,6 +34,7 @@ async def create_async_client(self, endpoint: str, key: str) -> ConversationAnal credential = AzureKeyCredential(key) return ConversationAnalysisClient(endpoint, credential) + @pytest.mark.playback_test_only class TestConversationsCase(TestConversations): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_operations/_patch.py index 5c40f444b2ef..10a6ae3958f0 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping from typing import Any, Union, overload, IO from azure.core.polling import LROPoller diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_operations/_patch.py index c469c2262b85..2d413a6c3699 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping from typing import Any, Union, overload, IO from azure.core.polling import AsyncLROPoller diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/models/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/models/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/azure/ai/language/questionanswering/authoring/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_create_and_deploy_project_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_create_and_deploy_project_async.py index deec3d6852c1..3f742eafe09a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_create_and_deploy_project_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_create_and_deploy_project_async.py @@ -21,7 +21,7 @@ async def sample_create_and_deploy_project_async(): client = QuestionAnsweringAuthoringClient(endpoint, AzureKeyCredential(key)) async with client: project_name = "IsaacNewton" - project = await client.create_project( # pylint: disable=no-value-for-parameter + project = await client.create_project( # pylint: disable=no-value-for-parameter project_name=project_name, options={ "description": "Biography of Sir Isaac Newton", @@ -37,7 +37,7 @@ async def sample_create_and_deploy_project_async(): if p["projectName"] == project_name: print(f"Found project {p['projectName']}") - update_sources_poller = await client.begin_update_sources( # pylint: disable=no-value-for-parameter + update_sources_poller = await client.begin_update_sources( # pylint: disable=no-value-for-parameter project_name=project_name, sources=[ _models.UpdateSourceRecord( diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_update_knowledge_sources_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_update_knowledge_sources_async.py index 58f48a738a8c..3329268867a6 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_update_knowledge_sources_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/async_samples/sample_update_knowledge_sources_async.py @@ -21,7 +21,7 @@ async def sample_update_knowledge_sources_async(): client = QuestionAnsweringAuthoringClient(endpoint, AzureKeyCredential(key)) async with client: project_name = "MicrosoftFAQProject" - await client.create_project( # pylint: disable=no-value-for-parameter + await client.create_project( # pylint: disable=no-value-for-parameter project_name=project_name, options={ "description": "Test project for some Microsoft QnAs", @@ -31,7 +31,7 @@ async def sample_update_knowledge_sources_async(): }, ) - sources_poller = await client.begin_update_sources( # pylint: disable=no-value-for-parameter + sources_poller = await client.begin_update_sources( # pylint: disable=no-value-for-parameter project_name=project_name, sources=[ _models.UpdateSourceRecord( @@ -50,7 +50,7 @@ async def sample_update_knowledge_sources_async(): await sources_poller.result() print("Knowledge source added (MicrosoftFAQ)") - qna_poller = await client.begin_update_qnas( # pylint: disable=no-value-for-parameter + qna_poller = await client.begin_update_qnas( # pylint: disable=no-value-for-parameter project_name=project_name, qnas=[ _models.UpdateQnaRecord( @@ -67,7 +67,7 @@ async def sample_update_knowledge_sources_async(): await qna_poller.result() print("QnA added (1 record)") - await client.update_synonyms( # pylint: disable=no-value-for-parameter + await client.update_synonyms( # pylint: disable=no-value-for-parameter project_name=project_name, synonyms=_models.SynonymAssets( value=[ diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_create_and_deploy_project.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_create_and_deploy_project.py index d90276188291..02aade68b1a1 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_create_and_deploy_project.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_create_and_deploy_project.py @@ -32,7 +32,7 @@ def sample_create_and_deploy_project(): client = QuestionAnsweringAuthoringClient(endpoint, AzureKeyCredential(key)) with client: project_name = "IsaacNewton" - project = client.create_project( # pylint: disable=no-value-for-parameter + project = client.create_project( # pylint: disable=no-value-for-parameter project_name=project_name, options={ "description": "Biography of Sir Isaac Newton", @@ -52,7 +52,7 @@ def sample_create_and_deploy_project(): if p["projectName"] == project_name: print(f"Found project {p['projectName']}") - update_sources_poller = client.begin_update_sources( # pylint: disable=no-value-for-parameter + update_sources_poller = client.begin_update_sources( # pylint: disable=no-value-for-parameter project_name=project_name, sources=[ _models.UpdateSourceRecord( diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_update_knowledge_sources.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_update_knowledge_sources.py index 38dd1fd1e764..d8b8fce55a10 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_update_knowledge_sources.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/samples/sample_update_knowledge_sources.py @@ -32,7 +32,7 @@ def sample_update_knowledge_sources(): client = QuestionAnsweringAuthoringClient(endpoint, AzureKeyCredential(key)) with client: project_name = "MicrosoftFAQProject" - client.create_project( # pylint: disable=no-value-for-parameter + client.create_project( # pylint: disable=no-value-for-parameter project_name=project_name, options={ "description": "Test project for some Microsoft QnAs", @@ -42,7 +42,7 @@ def sample_update_knowledge_sources(): }, ) - sources_poller = client.begin_update_sources( # pylint: disable=no-value-for-parameter + sources_poller = client.begin_update_sources( # pylint: disable=no-value-for-parameter project_name=project_name, sources=[ _models.UpdateSourceRecord( @@ -61,7 +61,7 @@ def sample_update_knowledge_sources(): sources_poller.result() print("Knowledge source added (MicrosoftFAQ)") - qna_poller = client.begin_update_qnas( # pylint: disable=no-value-for-parameter + qna_poller = client.begin_update_qnas( # pylint: disable=no-value-for-parameter project_name=project_name, qnas=[ _models.UpdateQnaRecord( @@ -78,7 +78,7 @@ def sample_update_knowledge_sources(): qna_poller.result() print("QnA added (1 record)") - client.update_synonyms( # pylint: disable=no-value-for-parameter + client.update_synonyms( # pylint: disable=no-value-for-parameter project_name=project_name, synonyms=_models.SynonymAssets( value=[ diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/helpers.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/helpers.py index cec72f5947e1..71987270ad42 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/helpers.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/helpers.py @@ -50,7 +50,7 @@ def add_sources(client, project_name, **kwargs): poller.result() @staticmethod - def export_project(client, project_name, delete_project=True, **kwargs): # pylint: disable=useless-return + def export_project(client, project_name, delete_project=True, **kwargs): # pylint: disable=useless-return # begin_export poller is typed as LROPoller[None]; generator currently discards # the final body so result() returns None. We only validate successful completion. export_poller = client.begin_export(project_name=project_name, file_format="json", **kwargs) @@ -60,6 +60,7 @@ def export_project(client, project_name, delete_project=True, **kwargs): # pylin delete_poller.result() return None + class AuthoringAsyncTestHelper: """Async utility helper for creating and exporting authoring test projects.""" diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project.py index 31378f529966..182c11785ca4 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project.py @@ -6,7 +6,6 @@ from azure.ai.language.questionanswering.authoring import QuestionAnsweringAuthoringClient - class TestCreateAndDeploy(QuestionAnsweringAuthoringTestCase): def test_polling_interval(self, qna_authoring_creds): client = QuestionAnsweringAuthoringClient( @@ -24,7 +23,7 @@ def test_create_project(self, recorded_test, qna_authoring_creds): # type: igno qna_authoring_creds["endpoint"], AzureKeyCredential(qna_authoring_creds["key"]) ) project_name = "IsaacNewton" - client.create_project( # pylint: disable=no-value-for-parameter + client.create_project( # pylint: disable=no-value-for-parameter project_name=project_name, options={ "description": "Biography of Sir Isaac Newton", @@ -45,7 +44,7 @@ def test_deploy_project(self, recorded_test, qna_authoring_creds): # type: igno client, project_name=project_name, is_deployable=True, - polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) deployment_poller = client.begin_deploy_project( project_name=project_name, diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project_async.py index b9f1111c44f1..71a7ff380aac 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_create_and_deploy_project_async.py @@ -6,7 +6,6 @@ from azure.ai.language.questionanswering.authoring.aio import QuestionAnsweringAuthoringClient - class TestCreateAndDeployAsync(QuestionAnsweringAuthoringTestCase): @pytest.mark.asyncio async def test_create_project(self, recorded_test, qna_authoring_creds): # type: ignore[name-defined] # pylint: disable=unused-argument @@ -15,7 +14,7 @@ async def test_create_project(self, recorded_test, qna_authoring_creds): # type ) project_name = "IsaacNewton" async with client: - await client.create_project( # pylint: disable=no-value-for-parameter + await client.create_project( # pylint: disable=no-value-for-parameter project_name=project_name, options={ "description": "Biography of Sir Isaac Newton", @@ -41,7 +40,7 @@ async def test_deploy_project(self, recorded_test, qna_authoring_creds): # type client, project_name=project_name, is_deployable=True, - polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) deployment_poller = await client.begin_deploy_project( project_name=project_name, diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_export_import_project.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_export_import_project.py index d1b374223ad7..4b463edc4c79 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_export_import_project.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_export_import_project.py @@ -5,7 +5,6 @@ from azure.ai.language.questionanswering.authoring import QuestionAnsweringAuthoringClient, models as _models - class TestExportAndImport(QuestionAnsweringAuthoringTestCase): def test_export_project(self, recorded_test, qna_authoring_creds): # type: ignore[name-defined] # pylint: disable=unused-argument client = QuestionAnsweringAuthoringClient( @@ -13,12 +12,14 @@ def test_export_project(self, recorded_test, qna_authoring_creds): # type: igno ) project_name = "IsaacNewton" AuthoringTestHelper.create_test_project( - client, project_name=project_name, polling_interval=0 if self.is_playback else None # pylint: disable=using-constant-test + client, + project_name=project_name, + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) export_poller = client.begin_export( project_name=project_name, file_format="json", - polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) export_poller.result() # LROPoller[None]; ensure no exception assert export_poller.done() @@ -34,7 +35,7 @@ def test_import_project(self, recorded_test, qna_authoring_creds): # type: igno project_name=project_name, get_export_url=False, delete_old_project=False, - polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) # Wait briefly until project is visible (eventual consistency safeguard) visible = any(p.get("projectName") == project_name for p in client.list_projects()) @@ -64,7 +65,7 @@ def test_import_project(self, recorded_test, qna_authoring_creds): # type: igno project_name=project_name, body=project_payload, file_format="json", - polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) import_poller.result() # LROPoller[None]; ensure completion assert import_poller.done() diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources.py index f104a87f739e..6e6d3f8391dc 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources.py @@ -31,7 +31,7 @@ def test_add_source(self, recorded_test, qna_authoring_creds): # type: ignore[n } ) ] - poller = client.begin_update_sources( # pylint: disable=no-value-for-parameter + poller = client.begin_update_sources( # pylint: disable=no-value-for-parameter project_name=project_name, sources=cast(list[_models.UpdateSourceRecord], update_source_ops), content_type="application/json", @@ -60,7 +60,7 @@ def test_add_qna(self, recorded_test, qna_authoring_creds): # type: ignore[name } ) ] - poller = client.begin_update_qnas( # pylint: disable=no-value-for-parameter + poller = client.begin_update_qnas( # pylint: disable=no-value-for-parameter project_name=project_name, qnas=cast(list[_models.UpdateQnaRecord], update_qna_ops), content_type="application/json", @@ -83,7 +83,7 @@ def test_add_synonym(self, recorded_test, qna_authoring_creds): # type: ignore[ _models.WordAlterations(alterations=["qnamaker", "qna maker"]), ] ) - client.update_synonyms( # pylint: disable=no-value-for-parameter + client.update_synonyms( # pylint: disable=no-value-for-parameter project_name=project_name, synonyms=synonyms_model, content_type="application/json", diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources_async.py index 39a485f54a79..13752baa5c8b 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources_async.py @@ -8,7 +8,6 @@ from azure.ai.language.questionanswering.authoring import models as _models - class TestSourcesQnasSynonymsAsync(QuestionAnsweringAuthoringTestCase): @pytest.mark.asyncio async def test_add_source(self, recorded_test, qna_authoring_creds): # type: ignore[name-defined] # pylint: disable=unused-argument @@ -18,7 +17,9 @@ async def test_add_source(self, recorded_test, qna_authoring_creds): # type: ig project_name = "IsaacNewton" async with client: await AuthoringAsyncTestHelper.create_test_project( - client, project_name=project_name, polling_interval=0 if self.is_playback else None # pylint: disable=using-constant-test + client, + project_name=project_name, + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) update_source_ops = [ _models.UpdateSourceRecord( @@ -35,7 +36,7 @@ async def test_add_source(self, recorded_test, qna_authoring_creds): # type: ig } ) ] - poller = await client.begin_update_sources( # pylint: disable=no-value-for-parameter + poller = await client.begin_update_sources( # pylint: disable=no-value-for-parameter project_name=project_name, sources=cast(list[_models.UpdateSourceRecord], update_source_ops), content_type="application/json", @@ -56,7 +57,9 @@ async def test_add_qna(self, recorded_test, qna_authoring_creds): # type: ignor project_name = "IsaacNewton" async with client: await AuthoringAsyncTestHelper.create_test_project( - client, project_name=project_name, polling_interval=0 if self.is_playback else None # pylint: disable=using-constant-test + client, + project_name=project_name, + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) question = "What is the easiest way to use azure services in my .NET project?" answer = "Using Microsoft's Azure SDKs" @@ -72,7 +75,7 @@ async def test_add_qna(self, recorded_test, qna_authoring_creds): # type: ignor } ) ] - poller = await client.begin_update_qnas( # pylint: disable=no-value-for-parameter + poller = await client.begin_update_qnas( # pylint: disable=no-value-for-parameter project_name=project_name, qnas=cast(list[_models.UpdateQnaRecord], update_qna_ops), content_type="application/json", @@ -93,14 +96,16 @@ async def test_add_synonym(self, recorded_test, qna_authoring_creds): # type: i project_name = "IsaacNewton" async with client: await AuthoringAsyncTestHelper.create_test_project( - client, project_name=project_name, polling_interval=0 if self.is_playback else None # pylint: disable=using-constant-test + client, + project_name=project_name, + polling_interval=0 if self.is_playback else None, # pylint: disable=using-constant-test ) synonyms_model = _models.SynonymAssets( value=[ _models.WordAlterations(alterations=["qnamaker", "qna maker"]), ] ) - await client.update_synonyms( # pylint: disable=no-value-for-parameter + await client.update_synonyms( # pylint: disable=no-value-for-parameter project_name=project_name, synonyms=synonyms_model, content_type="application/json", diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/testcase.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/testcase.py index 3a7239e403a9..cb969897b628 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/testcase.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/testcase.py @@ -4,6 +4,6 @@ class QuestionAnsweringAuthoringTestCase(AzureRecordedTestCase): @property def kwargs_for_polling(self): - if self.is_playback: # pylint: disable=using-constant-test + if self.is_playback: # pylint: disable=using-constant-test return {"polling_interval": 0} return {} diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_patch.py index 60951c043425..21c9aa11ddf0 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, List, overload, Optional, Union, Tuple, cast, MutableMapping import copy from azure.core.tracing.decorator import distributed_trace diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_patch.py index 95586db129a9..a2e6847af72f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, List, overload, Optional, Union from azure.core.tracing.decorator_async import distributed_trace_async diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_patch.py index 0f83c839d770..f46ba5373f9a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_patch.py @@ -7,12 +7,13 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Optional, Tuple, Union, cast, Any, MutableMapping, overload, Mapping from ._models import ( MetadataFilter as MetadataFilterGenerated, AnswersFromTextOptions as AnswersFromTextOptionsGenerated, TextDocument, - MetadataRecord + MetadataRecord, ) JSON = MutableMapping[str, Any] @@ -27,23 +28,20 @@ class MetadataFilter(MetadataFilterGenerated): "AND", "OR". :vartype logical_operation: str """ + @overload def __init__( self, *, metadata: Optional[List[Tuple[str, str]]] = None, logical_operation: Optional[str] = None, - **kwargs: Any + **kwargs: Any, ) -> None: # pragma: no cover - overload definition """Overload accepting list of (key, value) tuples.""" @overload def __init__( - self, - *, - metadata: Optional[List[MetadataRecord]] = None, - logical_operation: Optional[str] = None, - **kwargs: Any + self, *, metadata: Optional[List[MetadataRecord]] = None, logical_operation: Optional[str] = None, **kwargs: Any ) -> None: # pragma: no cover - overload definition """Overload accepting list of MetadataRecord objects.""" @@ -74,13 +72,12 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # noqa: D401 - docstring elif isinstance(item, MetadataRecord): converted.append(item) else: - raise TypeError( - f"metadata items must be tuples or MetadataRecord objects, got {type(item)}" - ) + raise TypeError(f"metadata items must be tuples or MetadataRecord objects, got {type(item)}") else: converted = None super().__init__(metadata=converted, logical_operation=logical_operation, **kwargs) + class AnswersFromTextOptions(AnswersFromTextOptionsGenerated): """The question and text record parameters to answer. @@ -102,7 +99,7 @@ def __init__( question: str, text_documents: List[Union[str, TextDocument]], language: Optional[str] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """ :keyword question: Required. User question to query against the given text records. @@ -119,7 +116,7 @@ def __init__( text_documents=cast(List[TextDocument], text_documents), language=language, string_index_type="UnicodeCodePoint", - **kwargs + **kwargs, ) @@ -128,6 +125,7 @@ def __init__( "AnswersFromTextOptions", ] + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py index 12ee49d40450..61122a525ce2 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py @@ -20,7 +20,6 @@ 4) AZURE_QUESTIONANSWERING_DEPLOYMENT (optional; defaults to 'production') """ - from __future__ import annotations diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py index 62fbcad45a80..47a2964d31d4 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py @@ -19,7 +19,9 @@ class TestQnAKnowledgeBase(QuestionAnsweringTestCase): - def test_query_knowledgebase(self, recorded_test, qna_creds): # standard model usage # pylint: disable=unused-argument + def test_query_knowledgebase( + self, recorded_test, qna_creds + ): # standard model usage # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) query_params = AnswersOptions( question="Ports and connectors", @@ -27,7 +29,9 @@ def test_query_knowledgebase(self, recorded_test, qna_creds): # standard model answer_context=KnowledgeBaseAnswerContext(previous_question="Meet Surface Pro 4", previous_qna_id=4), ) with client: - output = client.get_answers(query_params, project_name=qna_creds["qna_project"], deployment_name="production") + output = client.get_answers( + query_params, project_name=qna_creds["qna_project"], deployment_name="production" + ) assert output.answers for answer in output.answers: assert answer.answer @@ -35,7 +39,7 @@ def test_query_knowledgebase(self, recorded_test, qna_creds): # standard model assert answer.qna_id is not None assert answer.source - def test_query_knowledgebase_with_answerspan(self, recorded_test, qna_creds): # pylint: disable=unused-argument + def test_query_knowledgebase_with_answerspan(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) query_params = AnswersOptions( question="Ports and connectors", @@ -52,7 +56,7 @@ def test_query_knowledgebase_with_answerspan(self, recorded_test, qna_creds): # assert answer.short_answer.text assert answer.short_answer.confidence is not None - def test_query_knowledgebase_filter(self, recorded_test, qna_creds): # pylint: disable=unused-argument + def test_query_knowledgebase_filter(self, recorded_test, qna_creds): # pylint: disable=unused-argument filters = QueryFilters( metadata_filter=MetadataFilter( metadata=[ @@ -75,7 +79,7 @@ def test_query_knowledgebase_filter(self, recorded_test, qna_creds): # pylint: d ) assert response.answers - def test_query_knowledgebase_only_id(self, recorded_test, qna_creds): # pylint: disable=unused-argument + def test_query_knowledgebase_only_id(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) with client: query_params = AnswersOptions(qna_id=19) @@ -101,4 +105,6 @@ def test_query_knowledgebase_question_or_qna_id(self): with pytest.raises(TypeError): client.get_answers(options, project_name="hello", deployment_name="test") with pytest.raises(TypeError): - client.get_answers(project_name="hello", deployment_name="test") # pylint: disable=no-value-for-parameter + client.get_answers( + project_name="hello", deployment_name="test" + ) # pylint: disable=no-value-for-parameter diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py index b8e38dd7134f..62856c78b4dc 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py @@ -20,7 +20,7 @@ class TestQueryKnowledgeBaseAsync(QuestionAnsweringTestCase): @pytest.mark.asyncio - async def test_query_knowledgebase_basic(self, recorded_test, qna_creds): # pylint: disable=unused-argument + async def test_query_knowledgebase_basic(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) params = AnswersOptions( question="Ports and connectors", @@ -28,7 +28,9 @@ async def test_query_knowledgebase_basic(self, recorded_test, qna_creds): # pyli answer_context=KnowledgeBaseAnswerContext(previous_question="Meet Surface Pro 4", previous_qna_id=4), ) async with client: - output = await client.get_answers(params, project_name=qna_creds["qna_project"], deployment_name="production") + output = await client.get_answers( + params, project_name=qna_creds["qna_project"], deployment_name="production" + ) assert output.answers for answer in output.answers: assert answer.answer @@ -38,7 +40,9 @@ async def test_query_knowledgebase_basic(self, recorded_test, qna_creds): # pyli assert answer.metadata is not None @pytest.mark.asyncio - async def test_query_knowledgebase_with_short_answer(self, recorded_test, qna_creds): # pylint: disable=unused-argument + async def test_query_knowledgebase_with_short_answer( + self, recorded_test, qna_creds + ): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) params = AnswersOptions( question="Ports and connectors", @@ -55,7 +59,7 @@ async def test_query_knowledgebase_with_short_answer(self, recorded_test, qna_cr assert answer.short_answer.confidence is not None @pytest.mark.asyncio - async def test_query_knowledgebase_filter(self, recorded_test, qna_creds): # pylint: disable=unused-argument + async def test_query_knowledgebase_filter(self, recorded_test, qna_creds): # pylint: disable=unused-argument filters = QueryFilters( metadata_filter=MetadataFilter( metadata=[ @@ -79,14 +83,14 @@ async def test_query_knowledgebase_filter(self, recorded_test, qna_creds): # pyl deployment_name="production", ) assert response.answers - assert any( # pylint: disable=use-a-generator + assert any( # pylint: disable=use-a-generator [ a for a in response.answers if (a.metadata or {}).get("explicitlytaggedheading") == "check the battery level" ] ) - assert any( # pylint: disable=use-a-generator + assert any( # pylint: disable=use-a-generator [ a for a in response.answers diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py index 872f90610de2..1ed6b81c6da9 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py @@ -12,7 +12,7 @@ class TestQueryText(QuestionAnsweringTestCase): - def test_query_text_basic(self, recorded_test, qna_creds): # pylint: disable=unused-argument + def test_query_text_basic(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) params = AnswersFromTextOptions( question="What is the meaning of life?", @@ -32,7 +32,7 @@ def test_query_text_basic(self, recorded_test, qna_creds): # pylint: disable=unu if answer.short_answer: assert answer.short_answer.text - def test_query_text_with_str_records(self, recorded_test, qna_creds): # pylint: disable=unused-argument + def test_query_text_with_str_records(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) params = { "question": "How long it takes to charge surface?", @@ -70,7 +70,7 @@ def test_query_text_overload_errors(self): # negative client-side parameter val with pytest.raises(TypeError): client.get_answers_from_text(params, question="Why?") # type: ignore[arg-type] - def test_query_text_default_lang_override(self, recorded_test, qna_creds): # pylint: disable=unused-argument + def test_query_text_default_lang_override(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient( qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"]), default_language="es" ) diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py index bc297504f87d..92a71798cf04 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py @@ -13,7 +13,7 @@ class TestQueryTextAsync(QuestionAnsweringTestCase): @pytest.mark.asyncio - async def test_query_text_basic(self, recorded_test, qna_creds): # pylint: disable=unused-argument + async def test_query_text_basic(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) params = AnswersFromTextOptions( question="What is the meaning of life?", @@ -32,7 +32,7 @@ async def test_query_text_basic(self, recorded_test, qna_creds): # pylint: disab assert answer.id is not None @pytest.mark.asyncio - async def test_query_text_with_str_records(self, recorded_test, qna_creds): # pylint: disable=unused-argument + async def test_query_text_with_str_records(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient(qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"])) params = { "question": "How long it takes to charge surface?", @@ -72,7 +72,7 @@ async def test_query_text_overload_errors(self): # negative parameter validatio await client.get_answers_from_text(params, question="Why?") # type: ignore[arg-type] @pytest.mark.asyncio - async def test_query_text_default_lang_override(self, recorded_test, qna_creds): # pylint: disable=unused-argument + async def test_query_text_default_lang_override(self, recorded_test, qna_creds): # pylint: disable=unused-argument client = QuestionAnsweringClient( qna_creds["qna_endpoint"], AzureKeyCredential(qna_creds["qna_key"]), default_language="es" ) diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/testcase.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/testcase.py index dd87faa210c9..bfbe38a4b982 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/testcase.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/testcase.py @@ -8,6 +8,6 @@ class QuestionAnsweringTestCase(AzureRecordedTestCase): @property def kwargs_for_polling(self): - if self.is_playback: # pylint: disable=using-constant-test + if self.is_playback: # pylint: disable=using-constant-test return {"polling_interval": 0} return {} diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/_patch.py index 36b91138830f..3e869b7b4712 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/_patch.py @@ -6,16 +6,12 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, TYPE_CHECKING, Union, Optional from azure.core.credentials import AzureKeyCredential from ._client import TextAuthoringClient as AuthoringClientGenerated from ._client import TextAuthoringProjectClient as AuthoringProjectClientGenerated -from .operations import ( - DeploymentOperations, - ExportedModelOperations, - ProjectOperations, - TrainedModelOperations -) +from .operations import DeploymentOperations, ExportedModelOperations, ProjectOperations, TrainedModelOperations if TYPE_CHECKING: from azure.core.credentials import TokenCredential @@ -70,7 +66,7 @@ def __init__( ) -> None: """ Create a TextAuthoringClient. - + :param str endpoint: Supported Cognitive Services endpoint, e.g. ``https://.api.cognitiveservices.azure.com``. :param credential: Key or token credential. diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/_patch.py index 8f1a502dc6a4..3f4f5c143c94 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/_patch.py @@ -6,16 +6,12 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, TYPE_CHECKING, Union, Optional from azure.core.credentials import AzureKeyCredential from ._client import TextAuthoringClient as AuthoringClientGenerated from ._client import TextAuthoringProjectClient as AuthoringProjectClientGenerated -from .operations import ( - DeploymentOperations, - ExportedModelOperations, - ProjectOperations, - TrainedModelOperations -) +from .operations import DeploymentOperations, ExportedModelOperations, ProjectOperations, TrainedModelOperations if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential @@ -70,7 +66,7 @@ def __init__( ) -> None: """ Create a TextAuthoringClient. - + :param str endpoint: Supported Cognitive Services endpoint, e.g. ``https://.api.cognitiveservices.azure.com``. :param credential: Key or token credential. diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/operations/_operations.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/operations/_operations.py index 1438bfe10e4d..270186defaf5 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/aio/operations/_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from collections.abc import MutableMapping # pylint:disable=import-error +from collections.abc import MutableMapping # pylint:disable=import-error from io import IOBase import json from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/models/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/models/_patch.py index 7540766975da..d95aa6ed744f 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/models/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/models/_patch.py @@ -7,6 +7,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from ._models import ( AssignDeploymentResourcesDetails, UnassignDeploymentResourcesDetails, diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_operations.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_operations.py index dc2e4fcdde95..8808f7af13ee 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from collections.abc import MutableMapping # pylint:disable=import-error +from collections.abc import MutableMapping # pylint:disable=import-error from io import IOBase import json from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_patch.py index 3aa307321b5d..f279ae9a7f30 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/azure/ai/textanalytics/authoring/operations/_patch.py @@ -7,6 +7,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/async/sample_authentication_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/async/sample_authentication_async.py index 2a63cb57b53c..5d72a1b8391f 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/async/sample_authentication_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/async/sample_authentication_async.py @@ -41,7 +41,7 @@ async def sample_authentication_api_key_async(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] key = os.environ["AZURE_TEXT_KEY"] - text_client = TextAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + text_client = TextAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_text_client_with_key_async] @@ -56,7 +56,7 @@ async def sample_authentication_with_aad(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] credential = DefaultAzureCredential() - text_client = TextAuthoringClient(endpoint, credential=credential) # pylint:disable=unused-variable + text_client = TextAuthoringClient(endpoint, credential=credential) # pylint:disable=unused-variable async def main(): diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/sample_authentication.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/sample_authentication.py index 686dc6e764c7..5e219cfacaab 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/sample_authentication.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/samples/sample_authentication.py @@ -41,7 +41,7 @@ def sample_authentication_api_key(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] key = os.environ["AZURE_TEXT_KEY"] - text_client = TextAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + text_client = TextAuthoringClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_text_client_with_key] @@ -56,7 +56,7 @@ def sample_authentication_with_aad(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] credential = DefaultAzureCredential() - text_client = TextAuthoringClient(endpoint, credential=credential) # pylint:disable=unused-variable + text_client = TextAuthoringClient(endpoint, credential=credential) # pylint:disable=unused-variable def main(): diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py index fdc882e5cf09..5c03da624e24 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py @@ -5,19 +5,22 @@ ENV_ENDPOINT = "AUTHORING_ENDPOINT" ENV_KEY = "AUTHORING_KEY" + @pytest.fixture(scope="session") def authoring_endpoint(environment_variables: EnvironmentVariableLoader) -> str: """Endpoint for Authoring tests.""" return environment_variables.get(ENV_ENDPOINT) + @pytest.fixture(scope="session") def authoring_key(environment_variables: EnvironmentVariableLoader) -> str: """API key for Authoring tests.""" return environment_variables.get(ENV_KEY) + # autouse=True will trigger this fixture on each pytest run # test_proxy auto-starts the test proxy # patch_sleep and patch_async_sleep remove wait times during polling @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy, patch_sleep, patch_async_sleep): - return \ No newline at end of file + return diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job.py index 28b63699de69..56a2d1e0120e 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job.py @@ -18,6 +18,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint, key): return TextAuthoringClient(endpoint, AzureKeyCredential(key)) + @pytest.mark.playback_test_only class TestConversationsCancelTrainingSync(TestConversations): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job_async.py index dfcfa99c7c3b..498ac5a737c8 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_cancel_training_job_async.py @@ -14,6 +14,7 @@ authoring_key="fake_key", ) + @pytest.mark.playback_test_only class TestConversationsCancelTrainingAsync(AzureRecordedTestCase): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment.py index dfb96a7d99f3..fb351f4da4dc 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment.py @@ -20,6 +20,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint, key): return TextAuthoringClient(endpoint, AzureKeyCredential(key)) + class TestConversationsDeleteDeploymentSync(TestConversations): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment_async.py index 2e27a86850a0..b942b7af7cff 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_deployment_async.py @@ -21,6 +21,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint, key): return TextAuthoringClient(endpoint, AzureKeyCredential(key)) # type: ignore[arg-type] + class TestConversationsDeleteDeploymentAsync(TestConversations): @ConversationsPreparer() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project.py index 8db25577f9fe..2f9776f37ec7 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project.py @@ -19,6 +19,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint: str, key: str) -> TextAuthoringClient: return TextAuthoringClient(endpoint, AzureKeyCredential(key)) + class TestConversationsCase(TestConversations): @ConversationsPreparer() @recorded_by_proxy diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project_async.py index 4391b42a656b..30937a2da973 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/test_delete_project_async.py @@ -21,6 +21,7 @@ class TestConversations(AzureRecordedTestCase): def create_client(self, endpoint: str, key: str) -> TextAuthoringClient: # type: ignore[override] return TextAuthoringClient(endpoint, AzureKeyCredential(key)) # type: ignore[arg-type] + class TestConversationsCaseAsync(TestConversations): @ConversationsPreparer() @recorded_by_proxy_async diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py index 155c134188dd..e519ea3c2ab8 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json from typing import Any, Callable, Dict, IO, Mapping, Optional, TypeVar, Union, cast, overload, Generic, TYPE_CHECKING from collections.abc import MutableMapping # pylint:disable=import-error @@ -141,7 +142,7 @@ def __init__( kwargs["api_version"] = api_version super().__init__(endpoint=endpoint, credential=credential, **kwargs) - @overload # type: ignore[override] + @overload # type: ignore[override] def begin_analyze_text_job( self, *, @@ -178,7 +179,7 @@ def begin_analyze_text_job( """ @overload - def begin_analyze_text_job( # type: ignore[override] + def begin_analyze_text_job( # type: ignore[override] self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeTextLROPoller[ItemPaged["TextActions"]]: """Submit a collection of text documents for analysis. Specify one or more unique tasks to be @@ -196,7 +197,7 @@ def begin_analyze_text_job( # type: ignore[override] """ @overload - def begin_analyze_text_job( # type: ignore[override] + def begin_analyze_text_job( # type: ignore[override] self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeTextLROPoller[ItemPaged["TextActions"]]: """Submit a collection of text documents for analysis. Specify one or more unique tasks to be diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py index 4dff8f288feb..fc508505b1a5 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # coding: utf-8 import json from typing import Any, Callable, Dict, IO, Mapping, Optional, TypeVar, Union, cast, overload, Generic, TYPE_CHECKING @@ -127,7 +128,7 @@ def __init__( kwargs["api_version"] = api_version super().__init__(endpoint=endpoint, credential=credential, **kwargs) - @overload # type: ignore[override] + @overload # type: ignore[override] async def begin_analyze_text_job( self, *, @@ -165,7 +166,7 @@ async def begin_analyze_text_job( """ @overload - async def begin_analyze_text_job( # type: ignore[override] + async def begin_analyze_text_job( # type: ignore[override] self, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]: """Submit a collection of text documents for analysis. Specify one or more unique tasks to be @@ -184,7 +185,7 @@ async def begin_analyze_text_job( # type: ignore[override] """ @overload - async def begin_analyze_text_job( # type: ignore[override] + async def begin_analyze_text_job( # type: ignore[override] self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]: """Submit a collection of text documents for analysis. Specify one or more unique tasks to be diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py index a2bdfba0ff80..5f8c837a8185 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py @@ -39,7 +39,7 @@ async def sample_authentication_api_key_async(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] key = os.environ["AZURE_TEXT_KEY"] - text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_ta_client_with_key_async] @@ -56,7 +56,7 @@ async def sample_authentication_with_aad(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] credential = DefaultAzureCredential() - text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable # [END create_ta_client_with_aad_async] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py index 780f1988ff0a..6b692a2de691 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py @@ -38,7 +38,7 @@ def sample_authentication_api_key(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] key = os.environ["AZURE_TEXT_KEY"] - text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_ta_client_with_key] @@ -55,7 +55,7 @@ def sample_authentication_with_aad(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] credential = DefaultAzureCredential() - text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable # [END create_ta_client_with_aad] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py index c1abc6af1d27..b088aa088ea5 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py @@ -44,9 +44,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_abstract_summary_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_abstract_summary_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: text_a = ( "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure " diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py index 2815c3f92c96..9b9ae42605f3 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py @@ -42,9 +42,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_extract_summary_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_extract_summary_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: text_a = ( "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure " diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py index a1b1f1ad3d60..c8e1f4c3cd85 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py @@ -44,9 +44,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_multi_label_classify_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_multi_label_classify_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: project_name = "multi-class-project" deployment_name = "multiclassdeployment" diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py index 4d7e0e7dcf31..3b1d164816a1 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py @@ -54,9 +54,7 @@ def test_recognize_pii_confidence_score(self, text_analysis_endpoint, text_analy email_override = ConfidenceScoreThresholdOverride(value=0.9, entity="Email") confidence_threshold = ConfidenceScoreThreshold(default=0.3, overrides=[ssn_override, email_override]) # Parameters - parameters = PiiActionContent( - pii_categories=["All"], confidence_score_threshold=confidence_threshold - ) + parameters = PiiActionContent(pii_categories=["All"], confidence_score_threshold=confidence_threshold) body = TextPiiEntitiesRecognitionInput(text_input=text_input, action_content=parameters) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py index 4e40209054fd..59183735f2ae 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py @@ -43,7 +43,7 @@ class TestTextAnalysisCase_NewPIIThresholds(TestTextAnalysis): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_recognize_pii_confidence_score_async( # pylint: disable=name-too-long + async def test_recognize_pii_confidence_score_async( # pylint: disable=name-too-long self, text_analysis_endpoint, text_analysis_key ): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: @@ -64,9 +64,7 @@ async def test_recognize_pii_confidence_score_async( # pylint: disable=name-too- confidence_threshold = ConfidenceScoreThreshold(default=0.3, overrides=[ssn_override, email_override]) # Parameters - parameters = PiiActionContent( - pii_categories=["All"], confidence_score_threshold=confidence_threshold - ) + parameters = PiiActionContent(pii_categories=["All"], confidence_score_threshold=confidence_threshold) body = TextPiiEntitiesRecognitionInput(text_input=text_input, action_content=parameters) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py index b87de711542f..8a367ace568f 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py @@ -43,7 +43,9 @@ class TestTextAnalysisCase(TestTextAnalysis): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_recognize_pii_redaction_policies_async(self, text_analysis_endpoint, text_analysis_key): # pylint: disable=name-too-long + async def test_recognize_pii_redaction_policies_async( + self, text_analysis_endpoint, text_analysis_key + ): # pylint: disable=name-too-long async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: # Documents diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py index 886e7d50fea6..f4a7ea156492 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py @@ -44,9 +44,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_single_label_classify_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_single_label_classify_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: project_name = "single-class-project" deployment_name = "deployment1" diff --git a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_operations/_patch.py b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_operations/_patch.py index af6dc07b7584..ce8a8f68fa9e 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_operations/_patch.py +++ b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping from typing import Any, Optional import json diff --git a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_patch.py b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_patch.py +++ b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_operations/_patch.py b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_operations/_patch.py index 53b64e11014f..e5095829c159 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_operations/_patch.py +++ b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping from typing import Any, Optional import json diff --git a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_patch.py b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_patch.py +++ b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/models/_patch.py b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/models/_patch.py index 1f20b6224737..0e9187f5c5c2 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/models/_patch.py +++ b/sdk/cognitiveservices/azure-ai-transcription/azure/ai/transcription/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Optional from ._models import EnhancedModeProperties as _EnhancedModeProperties diff --git a/sdk/cognitiveservices/azure-ai-transcription/samples/async_samples/sample_transcribe_with_phrase_list_async.py b/sdk/cognitiveservices/azure-ai-transcription/samples/async_samples/sample_transcribe_with_phrase_list_async.py index fdbc989ae325..2afcad027f53 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/samples/async_samples/sample_transcribe_with_phrase_list_async.py +++ b/sdk/cognitiveservices/azure-ai-transcription/samples/async_samples/sample_transcribe_with_phrase_list_async.py @@ -66,9 +66,7 @@ async def sample_transcribe_with_phrase_list_async(): with open(audio_file_path, "rb") as audio_file: # Add custom phrases to improve recognition of names and domain-specific terms # For example, "Jessie" might be recognized as "Jesse", or "Contoso" as "can't do so" - phrase_list = PhraseListProperties( - phrases=["Contoso", "Jessie", "Rehaan"] - ) + phrase_list = PhraseListProperties(phrases=["Contoso", "Jessie", "Rehaan"]) # Create transcription options with phrase list options = TranscriptionOptions(phrase_list=phrase_list) diff --git a/sdk/cognitiveservices/azure-ai-transcription/samples/sample_transcribe_with_phrase_list.py b/sdk/cognitiveservices/azure-ai-transcription/samples/sample_transcribe_with_phrase_list.py index f0dc94d06684..e7a57e4d6538 100644 --- a/sdk/cognitiveservices/azure-ai-transcription/samples/sample_transcribe_with_phrase_list.py +++ b/sdk/cognitiveservices/azure-ai-transcription/samples/sample_transcribe_with_phrase_list.py @@ -66,9 +66,7 @@ def sample_transcribe_with_phrase_list(): with open(audio_file_path, "rb") as audio_file: # Add custom phrases to improve recognition of names and domain-specific terms # For example, "Jessie" might be recognized as "Jesse", or "Contoso" as "can't do so" - phrase_list = PhraseListProperties( - phrases=["Contoso", "Jessie", "Rehaan"] - ) + phrase_list = PhraseListProperties(phrases=["Contoso", "Jessie", "Rehaan"]) # Create transcription options with phrase list options = TranscriptionOptions(phrase_list=phrase_list) diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_patch.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_patch.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_patch.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_patch.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_patch.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_patch.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/_patch.py b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/_patch.py +++ b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/_patch.py b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/_patch.py +++ b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/operations/_patch.py b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/operations/_patch.py +++ b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/models/_patch.py b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/models/_patch.py +++ b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/operations/_patch.py b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/operations/_patch.py +++ b/sdk/commerce/azure-mgmt-commerce/azure/mgmt/commerce/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/commerce/azure-mgmt-commerce/setup.py b/sdk/commerce/azure-mgmt-commerce/setup.py index a0df4bba3bcf..7c360eca43d9 100644 --- a/sdk/commerce/azure-mgmt-commerce/setup.py +++ b/sdk/commerce/azure-mgmt-commerce/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Commerce" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/commerce/azure-mgmt-commerce/tests/conftest.py b/sdk/commerce/azure-mgmt-commerce/tests/conftest.py index e7981d635f56..8c0bebb9a45c 100644 --- a/sdk/commerce/azure-mgmt-commerce/tests/conftest.py +++ b/sdk/commerce/azure-mgmt-commerce/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -52,4 +53,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/commerce/azure-mgmt-commerce/tests/disable_test_mgmt_commerce.py b/sdk/commerce/azure-mgmt-commerce/tests/disable_test_mgmt_commerce.py index 2acde49d62f4..49c9526df2d3 100644 --- a/sdk/commerce/azure-mgmt-commerce/tests/disable_test_mgmt_commerce.py +++ b/sdk/commerce/azure-mgmt-commerce/tests/disable_test_mgmt_commerce.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import pytest @@ -12,22 +12,21 @@ from datetime import date, timedelta from devtools_testutils import AzureMgmtRecordedTestCase, recorded_by_proxy + class TestMgmtCommerce(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.commerce_client = self.create_mgmt_client( - azure.mgmt.commerce.UsageManagementClient - ) + self.commerce_client = self.create_mgmt_client(azure.mgmt.commerce.UsageManagementClient) - @pytest.mark.skip('serialization error for text/plain') + @pytest.mark.skip("serialization error for text/plain") @recorded_by_proxy def test_commerce(self): # Test not recorded for privacy concerns - #output = self.commerce_client.usage_aggregates.list( + # output = self.commerce_client.usage_aggregates.list( # str(date.today() - timedelta(days=1))+'T00:00:00Z', # str(date.today())+'T00:00:00Z' - #) - #output = list(output) + # ) + # output = list(output) # OfferDurableID: https://azure.microsoft.com/en-us/support/legal/offer-details/ rate = self.commerce_client.rate_card.get( @@ -35,6 +34,6 @@ def test_commerce(self): ) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/_patch.py b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/_patch.py +++ b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/_patch.py b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/_patch.py +++ b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/operations/_patch.py b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/operations/_patch.py +++ b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/aio/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/models/_patch.py b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/models/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/models/_patch.py +++ b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/operations/_patch.py b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/operations/_patch.py +++ b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_generated/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_utils.py b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_utils.py index 4c4674381efa..fb05fd847aee 100644 --- a/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_utils.py +++ b/sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_utils.py @@ -41,7 +41,7 @@ def build_external_storage( recording_storage: Optional[ Union["AzureCommunicationsRecordingStorage", "AzureBlobContainerRecordingStorage"] - ] = None + ] = None, ) -> Optional[ExternalStorage]: request: Optional[ExternalStorage] = None if recording_storage: diff --git a/sdk/communication/azure-communication-callautomation/tests/conftest.py b/sdk/communication/azure-communication-callautomation/tests/conftest.py index a509656d3aa2..6b1d62c99768 100644 --- a/sdk/communication/azure-communication-callautomation/tests/conftest.py +++ b/sdk/communication/azure-communication-callautomation/tests/conftest.py @@ -15,7 +15,7 @@ add_body_key_sanitizer, add_general_string_sanitizer, remove_batch_sanitizers, - set_custom_default_matcher + set_custom_default_matcher, ) diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_patch.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_patch.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_patch.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_patch.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_patch.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_patch.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_patch.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_patch.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_patch.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_patch.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-chat/samples/chat_client_sample.py b/sdk/communication/azure-communication-chat/samples/chat_client_sample.py index ac7b43b698e9..7e226bc6cc29 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_client_sample.py +++ b/sdk/communication/azure-communication-chat/samples/chat_client_sample.py @@ -21,7 +21,6 @@ 3) USER_ID - the user id, from token_response.identity """ - import os diff --git a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py index f4b816606145..2467f8c2d890 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py +++ b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py @@ -22,7 +22,6 @@ 3) USER_ID - the user id, from token_response.identity """ - import os diff --git a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py index cee02eb226e3..f7e5b9f37307 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py +++ b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py @@ -22,7 +22,6 @@ 3) USER_ID - the user id, from token_response.identity """ - import os import asyncio diff --git a/sdk/communication/azure-communication-chat/samples/user_credential_sample.py b/sdk/communication/azure-communication-chat/samples/user_credential_sample.py index 4dc5c699e1a0..340026b4cd70 100644 --- a/sdk/communication/azure-communication-chat/samples/user_credential_sample.py +++ b/sdk/communication/azure-communication-chat/samples/user_credential_sample.py @@ -18,7 +18,6 @@ 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your Communication Services resource """ - import os from azure.communication.chat import CommunicationTokenCredential from azure.communication.identity import CommunicationIdentityClient diff --git a/sdk/communication/azure-communication-chat/samples/user_credential_sample_async.py b/sdk/communication/azure-communication-chat/samples/user_credential_sample_async.py index 95da45db5aec..8f32837f0c68 100644 --- a/sdk/communication/azure-communication-chat/samples/user_credential_sample_async.py +++ b/sdk/communication/azure-communication-chat/samples/user_credential_sample_async.py @@ -18,7 +18,6 @@ 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your Communication Services resource """ - import os import asyncio from azure.communication.chat.aio import CommunicationTokenCredential diff --git a/sdk/communication/azure-communication-email/azure/communication/email/_operations/_patch.py b/sdk/communication/azure-communication-email/azure/communication/email/_operations/_patch.py index fcb4940ded53..366a0ebe1cba 100644 --- a/sdk/communication/azure-communication-email/azure/communication/email/_operations/_patch.py +++ b/sdk/communication/azure-communication-email/azure/communication/email/_operations/_patch.py @@ -9,7 +9,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-email/azure/communication/email/_patch.py b/sdk/communication/azure-communication-email/azure/communication/email/_patch.py index a22b74cfa58f..a0a7a61510c5 100644 --- a/sdk/communication/azure-communication-email/azure/communication/email/_patch.py +++ b/sdk/communication/azure-communication-email/azure/communication/email/_patch.py @@ -6,6 +6,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Union from azure.core.credentials import TokenCredential, AzureKeyCredential diff --git a/sdk/communication/azure-communication-email/azure/communication/email/aio/_operations/_patch.py b/sdk/communication/azure-communication-email/azure/communication/email/aio/_operations/_patch.py index fcb4940ded53..366a0ebe1cba 100644 --- a/sdk/communication/azure-communication-email/azure/communication/email/aio/_operations/_patch.py +++ b/sdk/communication/azure-communication-email/azure/communication/email/aio/_operations/_patch.py @@ -9,7 +9,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-email/azure/communication/email/aio/_patch.py b/sdk/communication/azure-communication-email/azure/communication/email/aio/_patch.py index cad044aab955..a1568dea157f 100644 --- a/sdk/communication/azure-communication-email/azure/communication/email/aio/_patch.py +++ b/sdk/communication/azure-communication-email/azure/communication/email/aio/_patch.py @@ -7,6 +7,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Union from azure.core.credentials_async import AsyncTokenCredential diff --git a/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample.py b/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample.py index 9b48d1399fd1..43208a4c52a9 100644 --- a/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample.py +++ b/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample.py @@ -9,7 +9,7 @@ """ FILE: send_email_to_multiple_recipient_sample.py DESCRIPTION: - This sample demonstrates sending an email to multiple recipients. The Email client is + This sample demonstrates sending an email to multiple recipients. The Email client is authenticated using a connection string. USAGE: python send_email_to_single_recipient_sample.py diff --git a/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample_async.py b/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample_async.py index 116aec5f9523..1d65a9d06837 100644 --- a/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample_async.py +++ b/sdk/communication/azure-communication-email/samples/send_email_to_multiple_recipients_sample_async.py @@ -9,7 +9,7 @@ """ FILE: send_email_to_multiple_recipient_sample_async.py DESCRIPTION: - This sample demonstrates sending an email to multiple recipients. The Email client is + This sample demonstrates sending an email to multiple recipients. The Email client is authenticated using a connection string. USAGE: python send_email_to_single_recipient_sample.py diff --git a/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample.py b/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample.py index 75bd344b7020..027a32429f20 100644 --- a/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample.py +++ b/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample.py @@ -9,7 +9,7 @@ """ FILE: send_email_to_single_recipient_sample.py DESCRIPTION: - This sample demonstrates sending an email to a single recipient. The Email client is + This sample demonstrates sending an email to a single recipient. The Email client is authenticated using a connection string. USAGE: python send_email_to_single_recipient_sample.py diff --git a/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample_async.py b/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample_async.py index 246b0643877f..e86c37f2b635 100644 --- a/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample_async.py +++ b/sdk/communication/azure-communication-email/samples/send_email_to_single_recipient_sample_async.py @@ -9,7 +9,7 @@ """ FILE: send_email_to_single_recipient_sample_async.py DESCRIPTION: - This sample demonstrates sending an email to a single recipient. The Email client is + This sample demonstrates sending an email to a single recipient. The Email client is authenticated using a connection string. USAGE: python send_email_to_single_recipient_sample_async.py diff --git a/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample.py b/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample.py index 24af3ede0419..7c4b394fc625 100644 --- a/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample.py +++ b/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample.py @@ -9,7 +9,7 @@ """ FILE: send_email_with_attachments_sample.py DESCRIPTION: - This sample demonstrates sending an email with an attachment. The Email client is + This sample demonstrates sending an email with an attachment. The Email client is authenticated using a connection string. USAGE: python send_email_with_attachment.py diff --git a/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample_async.py b/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample_async.py index fed7e2cbd8a7..879966ce2e4e 100644 --- a/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample_async.py +++ b/sdk/communication/azure-communication-email/samples/send_email_with_attachments_sample_async.py @@ -9,7 +9,7 @@ """ FILE: send_email_with_attachments_sample_async.py DESCRIPTION: - This sample demonstrates sending an email with an attachment. The Email client is + This sample demonstrates sending an email with an attachment. The Email client is authenticated using a connection string. USAGE: python send_email_with_attachment_async.py diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py index ea003e7c564e..795f8ddd8c66 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py @@ -65,11 +65,7 @@ def __init__( ) @classmethod - def from_connection_string( - cls, - conn_str: str, - **kwargs: Any - ) -> "CommunicationIdentityClient": + def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "CommunicationIdentityClient": """Create CommunicationIdentityClient from a Connection String. :param str conn_str: A connection string to an Azure Communication Service resource. @@ -96,7 +92,8 @@ def create_user(self, **kwargs) -> CommunicationUserIdentifier: @distributed_trace def create_user_and_token( self, - scopes: List[Union[str, CommunicationTokenScope]], *, + scopes: List[Union[str, CommunicationTokenScope]], + *, token_expires_in: Optional[timedelta] = None, **kwargs: Any ) -> Tuple[CommunicationUserIdentifier, AccessToken]: @@ -130,11 +127,7 @@ def create_user_and_token( return user_identifier, access_token @distributed_trace - def delete_user( - self, - user: CommunicationUserIdentifier, - **kwargs: Any - ) -> None: + def delete_user(self, user: CommunicationUserIdentifier, **kwargs: Any) -> None: """Triggers revocation event for user and deletes all its data. :param user: Azure Communication User to delete @@ -148,7 +141,8 @@ def delete_user( def get_token( self, user: CommunicationUserIdentifier, - scopes: List[Union[str, CommunicationTokenScope]], *, + scopes: List[Union[str, CommunicationTokenScope]], + *, token_expires_in: Optional[timedelta] = None, **kwargs: Any ) -> AccessToken: @@ -176,11 +170,7 @@ def get_token( return AccessToken(access_token.token, access_token.expires_on) @distributed_trace - def revoke_tokens( - self, - user: CommunicationUserIdentifier, - **kwargs: Any - ) -> None: + def revoke_tokens(self, user: CommunicationUserIdentifier, **kwargs: Any) -> None: """Schedule revocation of all tokens of an identity. :param user: Azure Communication User. @@ -194,11 +184,7 @@ def revoke_tokens( @distributed_trace def get_token_for_teams_user( - self, - aad_token: str, - client_id: str, - user_object_id: str, - **kwargs: Any + self, aad_token: str, client_id: str, user_object_id: str, **kwargs: Any ) -> AccessToken: """Exchanges an Azure AD access token of a Teams User for a new Communication Identity access token. diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_patch.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_patch.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_patch.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_patch.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_patch.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_patch.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py b/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py index 466f314d6673..9059f7efb079 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py @@ -87,7 +87,9 @@ async def create_user(self, **kwargs) -> "CommunicationUserIdentifier": @distributed_trace_async async def create_user_and_token( - self, scopes: List[Union[str, CommunicationTokenScope]], *, + self, + scopes: List[Union[str, CommunicationTokenScope]], + *, token_expires_in: Optional[timedelta] = None, **kwargs ) -> Tuple["CommunicationUserIdentifier", AccessToken]: @@ -136,8 +138,10 @@ async def delete_user(self, user: CommunicationUserIdentifier, **kwargs) -> None @distributed_trace_async async def get_token( - self, user: CommunicationUserIdentifier, - scopes: List[Union[str, CommunicationTokenScope]], *, + self, + user: CommunicationUserIdentifier, + scopes: List[Union[str, CommunicationTokenScope]], + *, token_expires_in: Optional[timedelta] = None, **kwargs ) -> AccessToken: diff --git a/sdk/communication/azure-communication-identity/samples/identity_samples.py b/sdk/communication/azure-communication-identity/samples/identity_samples.py index 781afd26041c..3c380a935169 100644 --- a/sdk/communication/azure-communication-identity/samples/identity_samples.py +++ b/sdk/communication/azure-communication-identity/samples/identity_samples.py @@ -19,11 +19,12 @@ 3) AZURE_CLIENT_SECRET - the secret of your active directory application 4) AZURE_TENANT_ID - the tenant ID of your active directory application 5) COMMUNICATION_M365_APP_ID - the application id of Microsoft 365 - 6) COMMUNICATION_M365_AAD_AUTHORITY - the Azure AD authority of Microsoft 365 + 6) COMMUNICATION_M365_AAD_AUTHORITY - the Azure AD authority of Microsoft 365 7) COMMUNICATION_M365_AAD_TENANT - the tenant ID of Microsoft 365 application 8) COMMUNICATION_MSAL_USERNAME - the username for authenticating via MSAL library 9) COMMUNICATION_MSAL_PASSWORD - the password for authenticating via MSAL library """ + from datetime import timedelta import os from azure.communication.identity._shared.utils import parse_connection_str diff --git a/sdk/communication/azure-communication-identity/samples/identity_samples_async.py b/sdk/communication/azure-communication-identity/samples/identity_samples_async.py index b7f74a8f2c7b..80aa5fce4cd8 100644 --- a/sdk/communication/azure-communication-identity/samples/identity_samples_async.py +++ b/sdk/communication/azure-communication-identity/samples/identity_samples_async.py @@ -20,11 +20,12 @@ 4) AZURE_CLIENT_SECRET - the secret of your active directory application 5) AZURE_TENANT_ID - the tenant ID of your active directory application 6) COMMUNICATION_M365_APP_ID - the application id of Microsoft 365 - 7) COMMUNICATION_M365_AAD_AUTHORITY - the Azure AD authority of M365 + 7) COMMUNICATION_M365_AAD_AUTHORITY - the Azure AD authority of M365 8) COMMUNICATION_M365_AAD_TENANT - the tenant ID of Microsoft 365 application 9) COMMUNICATION_MSAL_USERNAME - the username for authenticating via the MSAL library 10) COMMUNICATION_MSAL_PASSWORD - the password for authenticating via the MSAL library """ + from datetime import timedelta from azure.communication.identity._shared.utils import parse_connection_str from msal import PublicClientApplication diff --git a/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy.py b/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy.py index 6fdda359342e..c13cafb32f00 100644 --- a/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy.py +++ b/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy.py @@ -10,9 +10,7 @@ from azure.core.pipeline import PipelineRequest from azure.core.pipeline.transport import HttpRequest from unittest.mock import MagicMock -from azure.communication.identity._shared.entra_token_guard_policy import ( - EntraTokenGuardPolicy -) +from azure.communication.identity._shared.entra_token_guard_policy import EntraTokenGuardPolicy class DummyResponse: @@ -20,8 +18,7 @@ def __init__(self, status_code=200, expires_on=None): self.http_response = MagicMock() self.http_response.status_code = status_code self.http_response.text.return_value = ( - '{"accessToken": {"expiresOn": "%s"}}' % expires_on - if expires_on else '{}' + '{"accessToken": {"expiresOn": "%s"}}' % expires_on if expires_on else "{}" ) @@ -33,8 +30,7 @@ def setUp(self): def test_send_cache_miss(self): self.policy.next.send.return_value = DummyResponse( - status_code=200, - expires_on=(datetime.now(timezone.utc) + timedelta(minutes=5)).isoformat() + status_code=200, expires_on=(datetime.now(timezone.utc) + timedelta(minutes=5)).isoformat() ) self.request.http_request.headers["Authorization"] = "token" response = self.policy.send(self.request) @@ -45,8 +41,7 @@ def test_send_cache_hit(self): # Simulate a valid cache self.policy._entra_token_cache = "token" self.policy._response_cache = DummyResponse( - status_code=200, - expires_on=(datetime.now(timezone.utc) + timedelta(minutes=5)).isoformat() + status_code=200, expires_on=(datetime.now(timezone.utc) + timedelta(minutes=5)).isoformat() ) self.request.http_request.headers["Authorization"] = "token" response = self.policy.send(self.request) diff --git a/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy_async.py b/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy_async.py index 1e1b452c746e..076870e4cc3c 100644 --- a/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy_async.py +++ b/sdk/communication/azure-communication-identity/tests/test_entra_token_guard_policy_async.py @@ -21,7 +21,7 @@ def __init__(self, status_code=200, expires_on=None): def text(self): if self._expires_on: return '{"accessToken": {"expiresOn": "%s"}}' % self._expires_on - return '{}' + return "{}" class DummyPipelineResponse: @@ -66,4 +66,4 @@ async def test_send_invalid_response_raises(self): request = DummyRequest("token1") with pytest.raises(RuntimeError): - await policy.send(request) \ No newline at end of file + await policy.send(request) diff --git a/sdk/communication/azure-communication-identity/tests/test_identifier_raw_id.py b/sdk/communication/azure-communication-identity/tests/test_identifier_raw_id.py index c259bcda6ca8..413abb22a6d6 100644 --- a/sdk/communication/azure-communication-identity/tests/test_identifier_raw_id.py +++ b/sdk/communication/azure-communication-identity/tests/test_identifier_raw_id.py @@ -9,6 +9,7 @@ import unittest from azure.communication.identity import * + class IdentifierRawIdTest(unittest.TestCase): def test_raw_id(self): _assert_raw_id( @@ -98,42 +99,42 @@ def test_raw_id(self): ) _assert_raw_id( TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="PUBLIC" + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="PUBLIC", ), "8:acs:resource123_tenant123_45ab2481-1c1c-4005-be24-0ffb879b1130", ) _assert_raw_id( TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="DOD" + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="DOD", ), "8:dod-acs:resource123_tenant123_45ab2481-1c1c-4005-be24-0ffb879b1130", ) _assert_raw_id( TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="GCCH" + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="GCCH", ), "8:gcch-acs:resource123_tenant123_45ab2481-1c1c-4005-be24-0ffb879b1130", ) _assert_raw_id( TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="PUBLIC", - raw_id="8:extension:legacyFormat" + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="PUBLIC", + raw_id="8:extension:legacyFormat", ), "8:extension:legacyFormat", ) - + def test_identifier_from_raw_id(self): _assert_communication_identifier( "8:acs:bbbcbc1e-9f06-482a-b5d8-20e3f26ef0cd_45ab2481-1c1c-4005-be24-0ffb879b1130", @@ -213,70 +214,64 @@ def test_identifier_from_raw_id(self): MicrosoftTeamsAppIdentifier(app_id="45ab2481-1c1c-4005-be24-0ffb879b1130", cloud="GCCH"), ) _assert_phonenumber_identifier( - "4:+112345556789", - PhoneNumberIdentifier(value="+112345556789"), - withIsAnonymous=False, - withAssertedId=False) + "4:+112345556789", PhoneNumberIdentifier(value="+112345556789"), withIsAnonymous=False, withAssertedId=False + ) _assert_phonenumber_identifier( - "4:112345556789", - PhoneNumberIdentifier(value="112345556789"), - withIsAnonymous=False, - withAssertedId=False) + "4:112345556789", PhoneNumberIdentifier(value="112345556789"), withIsAnonymous=False, withAssertedId=False + ) _assert_phonenumber_identifier( - "4:otherFormat", - PhoneNumberIdentifier(value="otherFormat"), - withIsAnonymous=False, - withAssertedId=False) + "4:otherFormat", PhoneNumberIdentifier(value="otherFormat"), withIsAnonymous=False, withAssertedId=False + ) _assert_phonenumber_identifier( "4:207ffef6-9444-41fb-92ab-20eacaae2768", PhoneNumberIdentifier(value="207ffef6-9444-41fb-92ab-20eacaae2768"), withIsAnonymous=False, - withAssertedId=False + withAssertedId=False, ) # cspell:disable _assert_phonenumber_identifier( "4:207ffef6-9444-41fb-92ab-20eacaae2768_207ffef6-9444-41fb-92ab-20eacaae2768", - PhoneNumberIdentifier(value="207ffef6-9444-41fb-92ab-20eacaae2768_207ffef6-9444-41fb-92ab-20eacaae2768", - raw_id="4:207ffef6-9444-41fb-92ab-20eacaae2768_207ffef6-9444-41fb-92ab-20eacaae2768"), + PhoneNumberIdentifier( + value="207ffef6-9444-41fb-92ab-20eacaae2768_207ffef6-9444-41fb-92ab-20eacaae2768", + raw_id="4:207ffef6-9444-41fb-92ab-20eacaae2768_207ffef6-9444-41fb-92ab-20eacaae2768", + ), withIsAnonymous=False, - withAssertedId=True + withAssertedId=True, ) _assert_phonenumber_identifier( "4:anonymous", PhoneNumberIdentifier(value="anonymous", raw_id="4:anonymous"), - withIsAnonymous=True, withAssertedId=False + withIsAnonymous=True, + withAssertedId=False, ) _assert_phonenumber_identifier( - "4:+112345556789", - PhoneNumberIdentifier(value="+112345556789"), - withIsAnonymous=False, - withAssertedId=False + "4:+112345556789", PhoneNumberIdentifier(value="+112345556789"), withIsAnonymous=False, withAssertedId=False ) _assert_communication_identifier( "8:acs:resource123_tenant123_45ab2481-1c1c-4005-be24-0ffb879b1130", TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="PUBLIC", + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="PUBLIC", ), ) _assert_communication_identifier( "8:dod-acs:resource123_tenant123_45ab2481-1c1c-4005-be24-0ffb879b1130", TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="DOD", + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="DOD", ), ) _assert_communication_identifier( "8:gcch-acs:resource123_tenant123_45ab2481-1c1c-4005-be24-0ffb879b1130", TeamsExtensionUserIdentifier( - user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", - tenant_id="tenant123", - resource_id="resource123", - cloud="GCCH", + user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", + tenant_id="tenant123", + resource_id="resource123", + cloud="GCCH", ), ) # cspell:enable @@ -424,36 +419,36 @@ def test_equality_based_on_raw_id(self): user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) == TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) assert TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="DOD" + cloud="DOD", ) == TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="DOD" + cloud="DOD", ) assert TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="GCCH" + cloud="GCCH", ) == TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="GCCH" + cloud="GCCH", ) # TeamsExtensionUserIdentifiers are not equal. @@ -461,50 +456,50 @@ def test_equality_based_on_raw_id(self): user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) != TeamsExtensionUserIdentifier( user_id="55ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) assert TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) != TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant456", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) assert TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) != TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource456", - cloud="PUBLIC" + cloud="PUBLIC", ) assert TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="PUBLIC" + cloud="PUBLIC", ) != TeamsExtensionUserIdentifier( user_id="45ab2481-1c1c-4005-be24-0ffb879b1130", tenant_id="tenant123", resource_id="resource123", - cloud="DOD" + cloud="DOD", ) - + # UnknownIdentifiers are equal. assert UnknownIdentifier(identifier="28:ag08-global:01234567-89ab-cdef-0123-456789abcdef") == UnknownIdentifier( identifier="28:ag08-global:01234567-89ab-cdef-0123-456789abcdef" @@ -531,6 +526,7 @@ def _assert_communication_identifier(raw_id, want): assert key in got.properties assert got.properties[key] == want.properties[key] + def _assert_phonenumber_identifier(raw_id, want, withIsAnonymous=False, withAssertedId=False): # type: (str, PhoneNumberIdentifier, Optional[dict]) -> None got = identifier_from_raw_id(raw_id) diff --git a/sdk/communication/azure-communication-identity/tests/test_token_exchange.py b/sdk/communication/azure-communication-identity/tests/test_token_exchange.py index 2a5f036e8559..4917a79d8b66 100644 --- a/sdk/communication/azure-communication-identity/tests/test_token_exchange.py +++ b/sdk/communication/azure-communication-identity/tests/test_token_exchange.py @@ -9,9 +9,7 @@ from azure.core.credentials import AccessToken from azure.core.exceptions import ClientAuthenticationError, HttpResponseError from unittest.mock import MagicMock -from azure.communication.identity._shared.token_exchange import ( - TokenExchangeClient -) +from azure.communication.identity._shared.token_exchange import TokenExchangeClient class DummyPipelineResponse: @@ -23,7 +21,8 @@ def __init__(self, status_code=200, token="tok", expires_on="2999-12-31T23:59:59 else: self.http_response.text.return_value = ( f'{{"accessToken": {{"token": "{token}", "expiresOn": "{expires_on}"}}}}' - if status_code == 200 else '{}' + if status_code == 200 + else "{}" ) diff --git a/sdk/communication/azure-communication-identity/tests/test_token_exchange_async.py b/sdk/communication/azure-communication-identity/tests/test_token_exchange_async.py index 25a67799c075..adb5b5c4df3c 100644 --- a/sdk/communication/azure-communication-identity/tests/test_token_exchange_async.py +++ b/sdk/communication/azure-communication-identity/tests/test_token_exchange_async.py @@ -10,9 +10,7 @@ from azure.core.exceptions import ClientAuthenticationError, HttpResponseError from unittest.mock import MagicMock, AsyncMock -from azure.communication.identity._shared.token_exchange_async import ( - TokenExchangeClient -) +from azure.communication.identity._shared.token_exchange_async import TokenExchangeClient class DummyPipelineResponse: @@ -24,7 +22,8 @@ def __init__(self, status_code=200, token="tok", expires_on="2999-12-31T23:59:59 else: self.http_response.text.return_value = ( f'{{"accessToken": {{"token": "{token}", "expiresOn": "{expires_on}"}}}}' - if status_code == 200 else '{}' + if status_code == 200 + else "{}" ) diff --git a/sdk/communication/azure-communication-identity/tests/test_token_utils.py b/sdk/communication/azure-communication-identity/tests/test_token_utils.py index 0857dc5961e4..c2eceb6258bb 100644 --- a/sdk/communication/azure-communication-identity/tests/test_token_utils.py +++ b/sdk/communication/azure-communication-identity/tests/test_token_utils.py @@ -28,8 +28,7 @@ def __init__(self, status_code=200, expires_on=None): self.http_response = MagicMock() self.http_response.status_code = status_code self.http_response.text.return_value = ( - '{"accessToken": {"expiresOn": "%s"}}' % expires_on - if expires_on else '{}' + '{"accessToken": {"expiresOn": "%s"}}' % expires_on if expires_on else "{}" ) @@ -71,21 +70,20 @@ def test_create_request_message_and_uri(self): assert uri.startswith("https://endpoint") assert TEAMS_EXTENSION_ENDPOINT in uri - req = utils.create_request_message("https://endpoint", - [TEAMS_EXTENSION_SCOPE_PREFIX + ".default"]) + req = utils.create_request_message("https://endpoint", [TEAMS_EXTENSION_SCOPE_PREFIX + ".default"]) assert req.method == "POST" assert req.headers["Accept"] == "application/json" assert req.headers["Content-Type"] == "application/json" def test_determine_endpoint_and_api_version_teams_extension(self): - endpoint, api_version = utils.determine_endpoint_and_api_version( - [TEAMS_EXTENSION_SCOPE_PREFIX + ".default"]) + endpoint, api_version = utils.determine_endpoint_and_api_version([TEAMS_EXTENSION_SCOPE_PREFIX + ".default"]) assert endpoint == TEAMS_EXTENSION_ENDPOINT assert api_version == TEAMS_EXTENSION_API_VERSION def test_determine_endpoint_and_api_version_communication_clients(self): endpoint, api_version = utils.determine_endpoint_and_api_version( - [COMMUNICATION_CLIENTS_SCOPE_PREFIX + ".default"]) + [COMMUNICATION_CLIENTS_SCOPE_PREFIX + ".default"] + ) assert endpoint == COMMUNICATION_CLIENTS_ENDPOINT assert api_version == COMMUNICATION_CLIENTS_API_VERSION diff --git a/sdk/communication/azure-communication-identity/tests/test_user_credential.py b/sdk/communication/azure-communication-identity/tests/test_user_credential.py index 9598cecbe71d..c74d225ceef0 100644 --- a/sdk/communication/azure-communication-identity/tests/test_user_credential.py +++ b/sdk/communication/azure-communication-identity/tests/test_user_credential.py @@ -39,7 +39,7 @@ def __init__(self, resource_endpoint, token_credential, scopes): def exchange_entra_token(self): return DummyToken("dummy", 9999999999) - + class DummyTokenExchangeClientSwitch: def __init__(self, resource_endpoint, token_credential, scopes): @@ -251,11 +251,11 @@ def test_missing_fields_raises_value_error(self): def test_all_fields_present_calls_token_exchange(monkeypatch): # Patch TokenExchangeClient to our dummy - with patch("azure.communication.identity._shared.user_credential.TokenExchangeClient", DummyTokenExchangeClient): + with patch( + "azure.communication.identity._shared.user_credential.TokenExchangeClient", DummyTokenExchangeClient + ): cred = CommunicationTokenCredential( - resource_endpoint="https://endpoint", - token_credential=MagicMock(), - scopes=["scope"] + resource_endpoint="https://endpoint", token_credential=MagicMock(), scopes=["scope"] ) token = cred.get_token() assert token.token == "dummy" @@ -263,11 +263,10 @@ def test_all_fields_present_calls_token_exchange(monkeypatch): def test_missing_scopes_calls_token_exchange(monkeypatch): # Patch TokenExchangeClient to our dummy - with patch("azure.communication.identity._shared.user_credential.TokenExchangeClient", DummyTokenExchangeClient): - cred = CommunicationTokenCredential( - resource_endpoint="https://endpoint", - token_credential=MagicMock() - ) + with patch( + "azure.communication.identity._shared.user_credential.TokenExchangeClient", DummyTokenExchangeClient + ): + cred = CommunicationTokenCredential(resource_endpoint="https://endpoint", token_credential=MagicMock()) token = cred.get_token() assert token.token == "dummy" assert token.expires_on == 9999999999 @@ -275,11 +274,11 @@ def test_missing_scopes_calls_token_exchange(monkeypatch): def test_token_exchange_refreshes_from_expired_to_valid(monkeypatch): # Patch TokenExchangeClient to DummyTokenExchangeClientSwitch # First call returns expired token - when initializing the token - with patch("azure.communication.identity._shared.user_credential.TokenExchangeClient", DummyTokenExchangeClientSwitch): + with patch( + "azure.communication.identity._shared.user_credential.TokenExchangeClient", DummyTokenExchangeClientSwitch + ): cred = CommunicationTokenCredential( - resource_endpoint="https://endpoint", - token_credential=MagicMock(), - scopes=["scope"] + resource_endpoint="https://endpoint", token_credential=MagicMock(), scopes=["scope"] ) # Second call will trigger a refresh and generate a valid token token2 = cred.get_token() diff --git a/sdk/communication/azure-communication-identity/tests/test_user_credential_async.py b/sdk/communication/azure-communication-identity/tests/test_user_credential_async.py index 80d33af1840c..3713158f3d4b 100644 --- a/sdk/communication/azure-communication-identity/tests/test_user_credential_async.py +++ b/sdk/communication/azure-communication-identity/tests/test_user_credential_async.py @@ -23,11 +23,13 @@ from azure.communication.identity._shared.utils import get_current_utc_as_int from _shared.helper import generate_token_with_custom_expiry + class DummyAsyncToken: def __init__(self, token, expires_on): self.token = token self.expires_on = expires_on + class DummyAsyncTokenExchangeClient: def __init__(self, resource_endpoint, token_credential, scopes): self.resource_endpoint = resource_endpoint @@ -37,6 +39,7 @@ def __init__(self, resource_endpoint, token_credential, scopes): async def exchange_entra_token(self): return DummyAsyncToken("dummy", 9999999999) + class DummyAsyncTokenExchangeClientSwitch: def __init__(self, resource_endpoint, token_credential, scopes): self.resource_endpoint = resource_endpoint @@ -283,13 +286,11 @@ async def test_missing_fields_raises_value_error(self): @pytest.mark.asyncio async def test_all_fields_present_calls_token_exchange_async(self): with patch( - "azure.communication.identity._shared.user_credential_async.AsyncTokenExchangeClient", - DummyAsyncTokenExchangeClient, + "azure.communication.identity._shared.user_credential_async.AsyncTokenExchangeClient", + DummyAsyncTokenExchangeClient, ): cred = CommunicationTokenCredential( - resource_endpoint="https://endpoint", - token_credential=MagicMock(), - scopes=["scope"] + resource_endpoint="https://endpoint", token_credential=MagicMock(), scopes=["scope"] ) token = await cred.get_token() assert token.token == "dummy" @@ -298,13 +299,10 @@ async def test_all_fields_present_calls_token_exchange_async(self): @pytest.mark.asyncio async def test_missing_scopes_calls_token_exchange_async(self): with patch( - "azure.communication.identity._shared.user_credential_async.AsyncTokenExchangeClient", - DummyAsyncTokenExchangeClient, + "azure.communication.identity._shared.user_credential_async.AsyncTokenExchangeClient", + DummyAsyncTokenExchangeClient, ): - cred = CommunicationTokenCredential( - resource_endpoint="https://endpoint", - token_credential=MagicMock() - ) + cred = CommunicationTokenCredential(resource_endpoint="https://endpoint", token_credential=MagicMock()) token = await cred.get_token() assert token.token == "dummy" assert token.expires_on == 9999999999 @@ -313,13 +311,11 @@ async def test_missing_scopes_calls_token_exchange_async(self): async def test_token_exchange_refreshes_from_expired_to_valid_async(self): # First call returns expired token on initialization of _token with patch( - "azure.communication.identity._shared.user_credential_async.AsyncTokenExchangeClient", - DummyAsyncTokenExchangeClientSwitch, + "azure.communication.identity._shared.user_credential_async.AsyncTokenExchangeClient", + DummyAsyncTokenExchangeClientSwitch, ): cred = CommunicationTokenCredential( - resource_endpoint="https://endpoint", - token_credential=MagicMock(), - scopes=["scope"] + resource_endpoint="https://endpoint", token_credential=MagicMock(), scopes=["scope"] ) # Second call returns valid token diff --git a/sdk/communication/azure-communication-identity/tests/test_utils.py b/sdk/communication/azure-communication-identity/tests/test_utils.py index 3e648881f5e9..0c875abbbcbc 100644 --- a/sdk/communication/azure-communication-identity/tests/test_utils.py +++ b/sdk/communication/azure-communication-identity/tests/test_utils.py @@ -27,21 +27,15 @@ def test_convert_datetime_to_utc_int(self): assert utc_naive_time_in_sec == 0 # PST is UTC-8 (Vancouver/Pacific Time) pst_tz = timezone(timedelta(hours=-8)) # PST is UTC-8 - pst_time_in_sec = _convert_datetime_to_utc_int( - datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=pst_tz) - ) + pst_time_in_sec = _convert_datetime_to_utc_int(datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=pst_tz)) assert pst_time_in_sec == 8 * 3600 # EST is UTC-5 (Eastern Time) est_tz = timezone(timedelta(hours=-5)) # EST is UTC-5 - est_time_in_sec = _convert_datetime_to_utc_int( - datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=est_tz) - ) + est_time_in_sec = _convert_datetime_to_utc_int(datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=est_tz)) assert est_time_in_sec == 5 * 3600 # CST is UTC+8 (China Standard Time) cst_tz = timezone(timedelta(hours=8)) # CST is UTC+8 - cst_time_in_sec = _convert_datetime_to_utc_int( - datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=cst_tz) - ) + cst_time_in_sec = _convert_datetime_to_utc_int(datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=cst_tz)) assert cst_time_in_sec == -8 * 3600 def test_access_token_expiry_deserialized_correctly_from_payload(self): diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_patch.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_patch.py index 1a3914225e24..ae2524e7d7e1 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_patch.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import datetime from typing import ( @@ -440,7 +441,7 @@ def upsert_distribution_policy( # pylint: disable=docstring-missing-param,docst """Update a distribution policy. :param str distribution_policy_id: Id of the distribution policy. - + :return: Instance of DistributionPolicy :rtype: ~azure.communication.jobrouter.models.DistributionPolicy :raises: ~azure.core.exceptions.HttpResponseError, ValueError diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_patch.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_patch.py index 9f503d53e0d6..e7a331dab306 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_patch.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import ( List, Any, diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_patch.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_patch.py index bcfd3663e786..11e135ac07ab 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_patch.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import datetime from typing import List, Any, Optional, Dict, Union, overload, IO, Literal diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_patch.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_patch.py index 299ff2881418..c22af881360f 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_patch.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import ( List, Any, diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_patch.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_patch.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-jobrouter/samples/exception_policy_crud_ops.py b/sdk/communication/azure-communication-jobrouter/samples/exception_policy_crud_ops.py index 4457c33aa5d3..df155fd0e193 100644 --- a/sdk/communication/azure-communication-jobrouter/samples/exception_policy_crud_ops.py +++ b/sdk/communication/azure-communication-jobrouter/samples/exception_policy_crud_ops.py @@ -13,7 +13,7 @@ USAGE: python exception_policy_crud_ops.py Set the environment variables with your own values before running the sample: - 1) AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING - Communication Service connection string + 1) AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING - Communication Service connection string """ import os diff --git a/sdk/communication/azure-communication-jobrouter/setup.py b/sdk/communication/azure-communication-jobrouter/setup.py index e59bd139ae74..61f077e37217 100644 --- a/sdk/communication/azure-communication-jobrouter/setup.py +++ b/sdk/communication/azure-communication-jobrouter/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-communication-jobrouter" PACKAGE_PPRINT_NAME = "Communication JobRouter" diff --git a/sdk/communication/azure-communication-jobrouter/tests/conftest.py b/sdk/communication/azure-communication-jobrouter/tests/conftest.py index e00b79c38064..0ac6041adfe7 100644 --- a/sdk/communication/azure-communication-jobrouter/tests/conftest.py +++ b/sdk/communication/azure-communication-jobrouter/tests/conftest.py @@ -36,12 +36,11 @@ add_uri_regex_sanitizer, add_body_key_sanitizer, remove_batch_sanitizers, - set_custom_default_matcher + set_custom_default_matcher, ) from router_test_constants import SANITIZED, FAKE_FUNCTION_URI, FAKE_ENDPOINT, FAKE_CONNECTION_STRING from azure.communication.jobrouter._shared.utils import parse_connection_str - # fixture needs to be visible from conftest diff --git a/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario.py b/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario.py index cc1c222f5b44..f65964007ae2 100644 --- a/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario.py +++ b/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario.py @@ -38,7 +38,6 @@ CloseJobOptions, ) - channel_id = "fakeChannel1" diff --git a/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario_async.py b/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario_async.py index 540ba61bcde5..6877923f9368 100644 --- a/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario_async.py +++ b/sdk/communication/azure-communication-jobrouter/tests/test_assignment_scenario_async.py @@ -40,7 +40,6 @@ DeclineJobOfferOptions, ) - channel_id = "fakeChannel1" diff --git a/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy.py b/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy.py index 43e34d5693a8..e2f284f14edd 100644 --- a/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy.py +++ b/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy.py @@ -43,7 +43,6 @@ RouterQueue, ) - queue_labels = {"key1": "QueueKey", "key2": 10, "key3": True, "key4": False, "key5": 10.1} queue_selectors = [ diff --git a/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy_async.py b/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy_async.py index 7b1e88926ae6..667565637b99 100644 --- a/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy_async.py +++ b/sdk/communication/azure-communication-jobrouter/tests/test_classification_policy_async.py @@ -40,7 +40,6 @@ RouterQueue, ) - queue_labels = {"key1": "QueueKey", "key2": 10, "key3": True, "key4": False, "key5": 10.1} queue_selector_attachments = [ diff --git a/sdk/communication/azure-communication-jobrouter/tests/test_limit_concurrent_offer_worker_scenario_async.py b/sdk/communication/azure-communication-jobrouter/tests/test_limit_concurrent_offer_worker_scenario_async.py index cc050fb6f283..4b7adb02955e 100644 --- a/sdk/communication/azure-communication-jobrouter/tests/test_limit_concurrent_offer_worker_scenario_async.py +++ b/sdk/communication/azure-communication-jobrouter/tests/test_limit_concurrent_offer_worker_scenario_async.py @@ -40,7 +40,6 @@ DeclineJobOfferOptions, ) - channel_id = "fakeChannel2_async" diff --git a/sdk/communication/azure-communication-messages/azure/communication/messages/_operations/_patch.py b/sdk/communication/azure-communication-messages/azure/communication/messages/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-messages/azure/communication/messages/_operations/_patch.py +++ b/sdk/communication/azure-communication-messages/azure/communication/messages/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-messages/azure/communication/messages/_patch.py b/sdk/communication/azure-communication-messages/azure/communication/messages/_patch.py index eb3162ba82cb..2c38abced7d3 100644 --- a/sdk/communication/azure-communication-messages/azure/communication/messages/_patch.py +++ b/sdk/communication/azure-communication-messages/azure/communication/messages/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Union from urllib.parse import urlparse from azure.core.credentials import TokenCredential, AzureKeyCredential diff --git a/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_operations/_patch.py b/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_operations/_patch.py +++ b/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_patch.py b/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_patch.py index d69ae3068ceb..5e24e1578e39 100644 --- a/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_patch.py +++ b/sdk/communication/azure-communication-messages/azure/communication/messages/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import ( List, Any, diff --git a/sdk/communication/azure-communication-messages/azure/communication/messages/models/_patch.py b/sdk/communication/azure-communication-messages/azure/communication/messages/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-messages/azure/communication/messages/models/_patch.py +++ b/sdk/communication/azure-communication-messages/azure/communication/messages/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-messages/samples/download_media.py b/sdk/communication/azure-communication-messages/samples/download_media.py index ad965cfd1039..e2ed78110b68 100644 --- a/sdk/communication/azure-communication-messages/samples/download_media.py +++ b/sdk/communication/azure-communication-messages/samples/download_media.py @@ -10,7 +10,7 @@ FILE: download_media.py DESCRIPTION: - This sample demonstrates receiving media from a Whatsapp message from business phone number. The NotificationMessageClient is + This sample demonstrates receiving media from a Whatsapp message from business phone number. The NotificationMessageClient is authenticated using a connection string. USAGE: python download_media.py diff --git a/sdk/communication/azure-communication-messages/samples/get_templates_list.py b/sdk/communication/azure-communication-messages/samples/get_templates_list.py index 91e6a1c76abc..f57995226bb2 100644 --- a/sdk/communication/azure-communication-messages/samples/get_templates_list.py +++ b/sdk/communication/azure-communication-messages/samples/get_templates_list.py @@ -10,7 +10,7 @@ FILE: get_templates_list.py DESCRIPTION: - This sample demonstrates fetching WhatsApp templates created in your WhatsApp Business account. The NotificationMessageClient is + This sample demonstrates fetching WhatsApp templates created in your WhatsApp Business account. The NotificationMessageClient is authenticated using a connection string. USAGE: python get_templates_list.py diff --git a/sdk/communication/azure-communication-messages/samples/get_templates_list_async.py b/sdk/communication/azure-communication-messages/samples/get_templates_list_async.py index 261767c07d80..e03de22f318d 100644 --- a/sdk/communication/azure-communication-messages/samples/get_templates_list_async.py +++ b/sdk/communication/azure-communication-messages/samples/get_templates_list_async.py @@ -10,7 +10,7 @@ FILE: get_templates_list_async.py DESCRIPTION: - This sample demonstrates fetching WhatsApp templates created in your WhatsApp Business account. The NotificationMessageClient is + This sample demonstrates fetching WhatsApp templates created in your WhatsApp Business account. The NotificationMessageClient is authenticated using a connection string. USAGE: python get_templates_list_async.py diff --git a/sdk/communication/azure-communication-messages/samples/send_audio_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_audio_notification_messages.py index 7c4f11c55082..958f94e8b19d 100644 --- a/sdk/communication/azure-communication-messages/samples/send_audio_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_audio_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_audio_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp audio message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp audio message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_audio_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_document_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_document_notification_messages.py index 847a8d2a08fb..f642baf20272 100644 --- a/sdk/communication/azure-communication-messages/samples/send_document_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_document_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_document_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_document_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_image_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_image_notification_messages.py index dcf813287188..03700030530a 100644 --- a/sdk/communication/azure-communication-messages/samples/send_image_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_image_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_image_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message with image from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message with image from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_image_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_image_notification_messages_async.py b/sdk/communication/azure-communication-messages/samples/send_image_notification_messages_async.py index df8f4a72e18f..e347bbe5c8e7 100644 --- a/sdk/communication/azure-communication-messages/samples/send_image_notification_messages_async.py +++ b/sdk/communication/azure-communication-messages/samples/send_image_notification_messages_async.py @@ -10,7 +10,7 @@ FILE: send_image_notification_messages_async.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message with image from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message with image from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: diff --git a/sdk/communication/azure-communication-messages/samples/send_reaction_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_reaction_notification_messages.py index 91d49adda406..3023b1ffcb9b 100644 --- a/sdk/communication/azure-communication-messages/samples/send_reaction_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_reaction_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_reaction_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_reaction_notification_messages.py @@ -43,7 +43,7 @@ def send_reaction_message(self): video_options = ReactionNotificationContent( channel_registration_id=self.channel_id, to=[self.phone_number], - emoji="\uD83D\uDE00", + emoji="\ud83d\ude00", message_id="35ea6704-64af-4113-b786-815352228f17", ) diff --git a/sdk/communication/azure-communication-messages/samples/send_sticker_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_sticker_notification_messages.py index d72c41bab74e..8221fef38ef2 100644 --- a/sdk/communication/azure-communication-messages/samples/send_sticker_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_sticker_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_sticker_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_sticker_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_template_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_template_notification_messages.py index 8887e73c6744..2765cc60f2db 100644 --- a/sdk/communication/azure-communication-messages/samples/send_template_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_template_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_template_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp template message from business phone number to a single user. + This sample demonstrates sending an Whatsapp template message from business phone number to a single user. Template to be used in the sample needs to be created in WhatsApp Business account first. Follow the instructions in the Meta Business Help Center at https://www.facebook.com/business/help/2055875911147364?id=2129163877102343. The NotificationMessageClient is authenticated using a connection string. diff --git a/sdk/communication/azure-communication-messages/samples/send_template_notification_messages_async.py b/sdk/communication/azure-communication-messages/samples/send_template_notification_messages_async.py index d3d2d4d26874..66c6092cbaad 100644 --- a/sdk/communication/azure-communication-messages/samples/send_template_notification_messages_async.py +++ b/sdk/communication/azure-communication-messages/samples/send_template_notification_messages_async.py @@ -10,7 +10,7 @@ FILE: send_template_notification_messages_async.py DESCRIPTION: - This sample demonstrates sending an Whatsapp template message from business phone number to a single user. + This sample demonstrates sending an Whatsapp template message from business phone number to a single user. Template to be used in the sample needs to be created in WhatsApp Business account first. Follow the instructions in the Meta Business Help Center at https://www.facebook.com/business/help/2055875911147364?id=2129163877102343. The NotificationMessageClient is authenticated using a connection string. diff --git a/sdk/communication/azure-communication-messages/samples/send_text_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_text_notification_messages.py index 390ae2f5d28b..9a5f9fe4b416 100644 --- a/sdk/communication/azure-communication-messages/samples/send_text_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_text_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_text_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_text_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_async.py b/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_async.py index 5b7cdfe4d88d..611136afd2ea 100644 --- a/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_async.py +++ b/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_async.py @@ -10,7 +10,7 @@ FILE: send_text_notification_messages_async.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: diff --git a/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_with_token_credentials.py b/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_with_token_credentials.py index 55d28e259269..13356415a918 100644 --- a/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_with_token_credentials.py +++ b/sdk/communication/azure-communication-messages/samples/send_text_notification_messages_with_token_credentials.py @@ -10,7 +10,7 @@ FILE: send_text_notification_messages_with_token_credentials.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using Bearer TokenCredentials with azureidentity. More information here: https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python USAGE: diff --git a/sdk/communication/azure-communication-messages/samples/send_video_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_video_notification_messages.py index 96d697ac81db..228457e92657 100644 --- a/sdk/communication/azure-communication-messages/samples/send_video_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_video_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_video_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_video_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_whatsapp_list_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_whatsapp_list_notification_messages.py index 2407f0d09504..c248a174073f 100644 --- a/sdk/communication/azure-communication-messages/samples/send_whatsapp_list_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_whatsapp_list_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_whatsapplist_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_whatsapplist_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_whatsapp_urlbased_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_whatsapp_urlbased_notification_messages.py index 8af8358be64b..059ff9e3682b 100644 --- a/sdk/communication/azure-communication-messages/samples/send_whatsapp_urlbased_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_whatsapp_urlbased_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_whatsappcts_urlbased_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_whatsappcts_urlbased_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/samples/send_whatsappreplybutton_notification_messages.py b/sdk/communication/azure-communication-messages/samples/send_whatsappreplybutton_notification_messages.py index 06634802466a..e96042676b7b 100644 --- a/sdk/communication/azure-communication-messages/samples/send_whatsappreplybutton_notification_messages.py +++ b/sdk/communication/azure-communication-messages/samples/send_whatsappreplybutton_notification_messages.py @@ -10,7 +10,7 @@ FILE: send_whatsappreplybutton_notification_messages.py DESCRIPTION: - This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is + This sample demonstrates sending an Whatsapp message from business phone number to a single user. The NotificationMessageClient is authenticated using a connection string. USAGE: python send_whatsappreplybutton_notification_messages.py diff --git a/sdk/communication/azure-communication-messages/setup.py b/sdk/communication/azure-communication-messages/setup.py index 3b7ec640eda3..b50a7cbac044 100644 --- a/sdk/communication/azure-communication-messages/setup.py +++ b/sdk/communication/azure-communication-messages/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-communication-messages" PACKAGE_PPRINT_NAME = "Communication Messages" diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/__init__.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/__init__.py index cea7425f2532..f10ac3e84dd5 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/__init__.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/__init__.py @@ -26,38 +26,34 @@ PhoneNumbersBrowseResult, AvailablePhoneNumber, PhoneNumbersReservation, - CommunicationError + CommunicationError, ) -from ._generated.models._enums import ( - ReservationStatus, - PhoneNumberAvailabilityStatus, - PhoneNumberSearchResultError -) +from ._generated.models._enums import ReservationStatus, PhoneNumberAvailabilityStatus, PhoneNumberSearchResultError __all__ = [ - 'PurchasedPhoneNumber', - 'PhoneNumberCapabilities', - 'PhoneNumberCost', - 'PhoneNumberSearchResult', - 'BillingFrequency', - 'PhoneNumberAssignmentType', - 'PhoneNumberCapabilityType', - 'PhoneNumberType', - 'PhoneNumberAreaCode', - 'PhoneNumberAdministrativeDivision', - 'PhoneNumberCountry', - 'PhoneNumberLocality', - 'PhoneNumberOffering', - 'OperatorInformationOptions', - 'OperatorInformation', - 'OperatorInformationResult', - 'PhoneNumbersClient', - 'PhoneNumbersReservation', - 'PhoneNumbersBrowseResult', - 'AvailablePhoneNumber', - 'CommunicationError', - 'ReservationStatus', - 'PhoneNumberAvailabilityStatus', - 'PhoneNumberSearchResultError', + "PurchasedPhoneNumber", + "PhoneNumberCapabilities", + "PhoneNumberCost", + "PhoneNumberSearchResult", + "BillingFrequency", + "PhoneNumberAssignmentType", + "PhoneNumberCapabilityType", + "PhoneNumberType", + "PhoneNumberAreaCode", + "PhoneNumberAdministrativeDivision", + "PhoneNumberCountry", + "PhoneNumberLocality", + "PhoneNumberOffering", + "OperatorInformationOptions", + "OperatorInformation", + "OperatorInformationResult", + "PhoneNumbersClient", + "PhoneNumbersReservation", + "PhoneNumbersBrowseResult", + "AvailablePhoneNumber", + "CommunicationError", + "ReservationStatus", + "PhoneNumberAvailabilityStatus", + "PhoneNumberSearchResultError", ] diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/operations/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/operations/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/aio/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/operations/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/operations/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_phone_numbers_client.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_phone_numbers_client.py index 477b8cf23a28..5bf2ad3e5337 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_phone_numbers_client.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_phone_numbers_client.py @@ -36,7 +36,7 @@ PhoneNumbersReservationPurchaseRequest, PhoneNumbersReservation, PhoneNumbersBrowseRequest, - PhoneNumbersBrowseResult + PhoneNumbersBrowseResult, ) from ._shared.auth_policy_utils import get_authentication_policy from ._shared.utils import parse_connection_str @@ -75,8 +75,7 @@ def __init__(self, endpoint: str, credential: Union[TokenCredential, AzureKeyCre raise ValueError("Account URL must be a string.") from e if not credential: - raise ValueError( - "You need to provide account shared key to authenticate.") + raise ValueError("You need to provide account shared key to authenticate.") self._endpoint = endpoint self._accepted_language = kwargs.pop("accepted_language", None) @@ -84,8 +83,7 @@ def __init__(self, endpoint: str, credential: Union[TokenCredential, AzureKeyCre self._phone_number_client = PhoneNumbersClientGen( self._endpoint, api_version=self._api_version, - authentication_policy=get_authentication_policy( - endpoint, credential), + authentication_policy=get_authentication_policy(endpoint, credential), sdk_moniker=SDK_MONIKER, **kwargs ) @@ -105,14 +103,15 @@ def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "PhoneNumbersCl @distributed_trace def begin_purchase_phone_numbers( - self, - search_id: str, - *, - agree_to_not_resell: bool = False, - continuation_token: Optional[str] = None, - polling: Union[bool, "PollingMethod"] = True, - polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any) -> LROPoller[None]: + self, + search_id: str, + *, + agree_to_not_resell: bool = False, + continuation_token: Optional[str] = None, + polling: Union[bool, "PollingMethod"] = True, + polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, + **kwargs: Any + ) -> LROPoller[None]: """Purchases phone numbers. :param search_id: The search id. @@ -131,8 +130,7 @@ def begin_purchase_phone_numbers( :returns: A poller to wait on the completion of the purchase. :rtype: ~azure.core.polling.LROPoller[None] """ - purchase_request = PhoneNumberPurchaseRequest( - search_id=search_id, agree_to_not_resell=agree_to_not_resell) + purchase_request = PhoneNumberPurchaseRequest(search_id=search_id, agree_to_not_resell=agree_to_not_resell) return self._phone_number_client.phone_numbers.begin_purchase_phone_numbers( body=purchase_request, @@ -150,7 +148,8 @@ def begin_release_phone_number( continuation_token: Optional[str] = None, polling: Union[bool, "PollingMethod"] = True, polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any) -> LROPoller[None]: + **kwargs: Any + ) -> LROPoller[None]: """Releases an purchased phone number. :param phone_number: Phone number to be released, e.g. +55534567890. @@ -270,8 +269,7 @@ def begin_update_phone_number_capabilities( :rtype: ~azure.core.polling.LROPoller[~azure.communication.phonenumbers.PurchasedPhoneNumber] """ - capabilities_request = PhoneNumberCapabilitiesRequest( - calling=calling, sms=sms) + capabilities_request = PhoneNumberCapabilitiesRequest(calling=calling, sms=sms) if not phone_number: raise ValueError("phone_number can't be empty") @@ -286,14 +284,17 @@ def begin_update_phone_number_capabilities( ) result_properties = poller.result().additional_properties - if (result_properties is not None and - isinstance(result_properties, dict) and - "status" in result_properties and - isinstance(result_properties.get("status"), str) and - result_properties["status"].lower() == "failed"): + if ( + result_properties is not None + and isinstance(result_properties, dict) + and "status" in result_properties + and isinstance(result_properties.get("status"), str) + and result_properties["status"].lower() == "failed" + ): error_info = result_properties.get("error", {}) - error_message = (error_info.get("message", "Operation failed") - if isinstance(error_info, dict) else "Operation failed") + error_message = ( + error_info.get("message", "Operation failed") if isinstance(error_info, dict) else "Operation failed" + ) raise HttpResponseError(message=error_message) return poller @@ -312,11 +313,7 @@ def get_purchased_phone_number(self, phone_number: str, **kwargs: Any) -> Purcha @distributed_trace def list_purchased_phone_numbers( - self, - *, - skip: int = 0, - top: int = 100, - **kwargs: Any + self, *, skip: int = 0, top: int = 100, **kwargs: Any ) -> ItemPaged[PurchasedPhoneNumber]: """Gets the list of all purchased phone numbers. @@ -332,12 +329,7 @@ def list_purchased_phone_numbers( return self._phone_number_client.phone_numbers.list_phone_numbers(skip=skip, top=top, **kwargs) @distributed_trace - def list_available_countries( - self, - *, - skip: int = 0, - **kwargs: Any - ) -> ItemPaged[PhoneNumberCountry]: + def list_available_countries(self, *, skip: int = 0, **kwargs: Any) -> ItemPaged[PhoneNumberCountry]: """Gets the list of supported countries. Gets the list of supported countries. @@ -369,7 +361,7 @@ def list_available_localities( :param country_code: The ISO 3166-2 country/region two letter code, e.g. US. Required. :type country_code: str - :keyword phone_number_type: An optional parameter for the type of phone numbers, + :keyword phone_number_type: An optional parameter for the type of phone numbers, e.g. geographic, tollFree, mobile. Default value is None. :paramtype phone_number_type: str or ~azure.communication.phonenumbers.PhoneNumberType :keyword administrative_division: An optional parameter for the name of the state or province @@ -495,16 +487,12 @@ def search_operator_information( if not isinstance(phone_numbers, list): phone_numbers = [phone_numbers] if options is None: - options = OperatorInformationOptions( - include_additional_operator_details=False) - request = OperatorInformationRequest( - phone_numbers=phone_numbers, options=options) + options = OperatorInformationOptions(include_additional_operator_details=False) + request = OperatorInformationRequest(phone_numbers=phone_numbers, options=options) return self._phone_number_client.phone_numbers.operator_information_search(request, **kwargs) @distributed_trace - def get_reservation( - self, reservation_id: str, **kwargs: Any - ) -> PhoneNumbersReservation: + def get_reservation(self, reservation_id: str, **kwargs: Any) -> PhoneNumbersReservation: """Gets a reservation by its ID. Retrieves the reservation with the given ID, including all of the phone numbers associated with @@ -515,13 +503,10 @@ def get_reservation( :return: PhoneNumbersReservation :rtype: ~azure.communication.phonenumbers.PhoneNumbersReservation """ - return self._phone_number_client.phone_numbers.get_reservation( - reservation_id, **kwargs) + return self._phone_number_client.phone_numbers.get_reservation(reservation_id, **kwargs) @distributed_trace - def list_reservations( - self, *, max_page_size: int = 100, **kwargs: Any - ) -> ItemPaged[PhoneNumbersReservation]: + def list_reservations(self, *, max_page_size: int = 100, **kwargs: Any) -> ItemPaged[PhoneNumbersReservation]: """Lists all reservations. Retrieves a paginated list of all phone number reservations. Note that the reservations will @@ -537,9 +522,7 @@ def list_reservations( # This allows mapping the generated model to the public model. # Internally, the generated client will create an instance of this iterator with each fetched page. - return self._phone_number_client.phone_numbers.list_reservations( - max_page_size=max_page_size, **kwargs - ) + return self._phone_number_client.phone_numbers.list_reservations(max_page_size=max_page_size, **kwargs) @distributed_trace def create_or_update_reservation( @@ -587,15 +570,15 @@ def create_or_update_reservation( # Cast to satisfy type checker - merge-patch operations allow None values reservation = PhoneNumbersReservation( - phone_numbers=cast(Optional[Dict[str, AvailablePhoneNumber]], phone_numbers)) + phone_numbers=cast(Optional[Dict[str, AvailablePhoneNumber]], phone_numbers) + ) return self._phone_number_client.phone_numbers.create_or_update_reservation( - reservation_id, reservation, **kwargs) + reservation_id, reservation, **kwargs + ) @distributed_trace - def delete_reservation( - self, reservation_id: str, **kwargs: Any - ) -> None: + def delete_reservation(self, reservation_id: str, **kwargs: Any) -> None: """Deletes a reservation by its ID. Deletes the reservation with the given ID. Any phone number in the reservation will be released @@ -646,8 +629,7 @@ def begin_purchase_reservation( :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] """ - reservation_purchase_request = PhoneNumbersReservationPurchaseRequest( - agree_to_not_resell=agree_to_not_resell) + reservation_purchase_request = PhoneNumbersReservationPurchaseRequest(agree_to_not_resell=agree_to_not_resell) return self._phone_number_client.phone_numbers.begin_purchase_reservation( reservation_id, @@ -660,15 +642,15 @@ def begin_purchase_reservation( @distributed_trace def browse_available_phone_numbers( - self, - *, - country_code: str, - phone_number_type: Union[str, PhoneNumberType], - sms_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, - calling_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, - assignment_type: Optional[Union[str, PhoneNumberAssignmentType]] = None, - phone_number_prefixes: Optional[List[str]] = None, - **kwargs: Any + self, + *, + country_code: str, + phone_number_type: Union[str, PhoneNumberType], + sms_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, + calling_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, + assignment_type: Optional[Union[str, PhoneNumberAssignmentType]] = None, + phone_number_prefixes: Optional[List[str]] = None, + **kwargs: Any ) -> PhoneNumbersBrowseResult: """Browses for available phone numbers to purchase. @@ -712,10 +694,6 @@ def browse_available_phone_numbers( phone_number_type=phone_number_type, capabilities=browse_capabilities, assignment_type=assignment_type, - phone_number_prefixes=phone_number_prefixes - ) - return self._phone_number_client.phone_numbers.browse_available_numbers( - country_code, - browse_request, - **kwargs + phone_number_prefixes=phone_number_prefixes, ) + return self._phone_number_client.phone_numbers.browse_available_numbers(country_code, browse_request, **kwargs) diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/aio/_phone_numbers_client_async.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/aio/_phone_numbers_client_async.py index 69afadc82220..5afb4dbaf863 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/aio/_phone_numbers_client_async.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/aio/_phone_numbers_client_async.py @@ -37,7 +37,7 @@ PhoneNumbersReservation, PhoneNumbersBrowseRequest, PhoneNumberAssignmentType, - PhoneNumbersBrowseResult + PhoneNumbersBrowseResult, ) from .._shared.auth_policy_utils import get_authentication_policy from .._shared.utils import parse_connection_str @@ -78,8 +78,7 @@ def __init__( raise ValueError("Account URL must be a string.") from e if not credential: - raise ValueError( - "You need to provide account shared key to authenticate.") + raise ValueError("You need to provide account shared key to authenticate.") self._endpoint = endpoint self._accepted_language = kwargs.pop("accepted_language", None) @@ -87,10 +86,9 @@ def __init__( self._phone_number_client = PhoneNumbersClientGen( self._endpoint, api_version=self._api_version, - authentication_policy=get_authentication_policy( - endpoint, credential, is_async=True), + authentication_policy=get_authentication_policy(endpoint, credential, is_async=True), sdk_moniker=SDK_MONIKER, - **kwargs + **kwargs, ) @classmethod @@ -108,14 +106,15 @@ def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "PhoneNumbersCl @distributed_trace_async async def begin_purchase_phone_numbers( - self, - search_id: str, - *, - agree_to_not_resell: bool = False, - continuation_token: Optional[str] = None, - polling: Union[bool, "PollingMethod"] = True, - polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any) -> AsyncLROPoller[None]: + self, + search_id: str, + *, + agree_to_not_resell: bool = False, + continuation_token: Optional[str] = None, + polling: Union[bool, "PollingMethod"] = True, + polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, + **kwargs: Any, + ) -> AsyncLROPoller[None]: """Purchases phone numbers. :param search_id: The search id. @@ -134,15 +133,14 @@ async def begin_purchase_phone_numbers( :returns: A poller to wait on the purchase operation. :rtype: ~azure.core.polling.AsyncLROPoller[None] """ - purchase_request = PhoneNumberPurchaseRequest( - search_id=search_id, agree_to_not_resell=agree_to_not_resell) + purchase_request = PhoneNumberPurchaseRequest(search_id=search_id, agree_to_not_resell=agree_to_not_resell) return await self._phone_number_client.phone_numbers.begin_purchase_phone_numbers( body=purchase_request, polling_interval=polling_interval, continuation_token=continuation_token, polling=polling, - **kwargs + **kwargs, ) @distributed_trace_async @@ -153,7 +151,8 @@ async def begin_release_phone_number( continuation_token: Optional[str] = None, polling: Union[bool, "PollingMethod"] = True, polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any) -> AsyncLROPoller[None]: + **kwargs: Any, + ) -> AsyncLROPoller[None]: """Releases an purchased phone number. :param phone_number: Phone number to be released, e.g. +11234567890. @@ -174,7 +173,7 @@ async def begin_release_phone_number( polling_interval=polling_interval, continuation_token=continuation_token, polling=polling, - **kwargs + **kwargs, ) @distributed_trace_async @@ -190,7 +189,7 @@ async def begin_search_available_phone_numbers( continuation_token: Optional[str] = None, polling: Union[bool, "PollingMethod"] = True, polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any + **kwargs: Any, ) -> AsyncLROPoller[PhoneNumberSearchResult]: """Search for available phone numbers to purchase. @@ -237,7 +236,7 @@ async def begin_search_available_phone_numbers( polling_interval=polling_interval, continuation_token=continuation_token, polling=polling, - **kwargs + **kwargs, ) @distributed_trace_async @@ -250,7 +249,7 @@ async def begin_update_phone_number_capabilities( continuation_token: Optional[str] = None, polling: Union[bool, "PollingMethod"] = True, polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any + **kwargs: Any, ) -> AsyncLROPoller[PurchasedPhoneNumber]: """Updates the capabilities of a phone number. @@ -272,8 +271,7 @@ async def begin_update_phone_number_capabilities( :returns: A poller to wait on the update operation. :rtype: ~azure.core.polling.AsyncLROPoller[~azure.communication.phonenumbers.PurchasedPhoneNumber] """ - capabilities_request = PhoneNumberCapabilitiesRequest( - calling=calling, sms=sms) + capabilities_request = PhoneNumberCapabilitiesRequest(calling=calling, sms=sms) if not phone_number: raise ValueError("phone_number can't be empty") @@ -283,7 +281,7 @@ async def begin_update_phone_number_capabilities( polling_interval=polling_interval, continuation_token=continuation_token, polling=polling, - **kwargs + **kwargs, ) @distributed_trace_async @@ -300,11 +298,7 @@ async def get_purchased_phone_number(self, phone_number: str, **kwargs: Any) -> @distributed_trace def list_purchased_phone_numbers( - self, - *, - skip: int = 0, - top: int = 100, - **kwargs: Any + self, *, skip: int = 0, top: int = 100, **kwargs: Any ) -> AsyncItemPaged[PurchasedPhoneNumber]: """Gets the list of all purchased phone numbers. @@ -324,12 +318,7 @@ def list_purchased_phone_numbers( return self._phone_number_client.phone_numbers.list_phone_numbers(skip=skip, top=top, **kwargs) @distributed_trace - def list_available_countries( - self, - *, - skip: int = 0, - **kwargs: Any - ) -> AsyncItemPaged[PhoneNumberCountry]: + def list_available_countries(self, *, skip: int = 0, **kwargs: Any) -> AsyncItemPaged[PhoneNumberCountry]: """Gets the list of supported countries. Gets the list of supported countries. @@ -354,7 +343,7 @@ def list_available_localities( phone_number_type: Optional[Union[PhoneNumberType, str]] = None, administrative_division: Optional[str] = None, skip: int = 0, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[PhoneNumberLocality]: """Gets the list of cities or towns with available phone numbers. @@ -362,7 +351,7 @@ def list_available_localities( :param country_code: The ISO 3166-2 country/region code, e.g. US. Required. :type country_code: str - :keyword phone_number_type: An optional parameter for the type of phone numbers, + :keyword phone_number_type: An optional parameter for the type of phone numbers, e.g. geographic, tollFree, mobile. Default value is None. :paramtype phone_number_type: str or ~azure.communication.phonenumbers.PhoneNumberType :keyword administrative_division: An optional parameter for the name of the state or province @@ -382,7 +371,7 @@ def list_available_localities( accept_language=self._accepted_language, phone_number_type=phone_number_type, skip=skip, - **kwargs + **kwargs, ) @distributed_trace @@ -393,7 +382,7 @@ def list_available_offerings( phone_number_type: Optional[Union[PhoneNumberType, str]] = None, assignment_type: Optional[Union[PhoneNumberAssignmentType, str]] = None, skip: int = 0, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[PhoneNumberOffering]: """List available offerings of capabilities with rates for the given country/region. @@ -421,7 +410,7 @@ def list_available_offerings( assignment_type=assignment_type, accept_language=self._accepted_language, skip=skip, - **kwargs + **kwargs, ) @distributed_trace @@ -434,7 +423,7 @@ def list_available_area_codes( assignment_type: Optional[Union[PhoneNumberAssignmentType, str]] = None, locality: Optional[str] = None, skip: int = 0, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[PhoneNumberAreaCode]: """Gets the list of available area codes. @@ -467,7 +456,7 @@ def list_available_area_codes( locality=locality, administrative_division=administrative_division, skip=skip, - **kwargs + **kwargs, ) @distributed_trace_async @@ -476,7 +465,7 @@ async def search_operator_information( phone_numbers: Union[str, List[str]], *, options: Optional[OperatorInformationOptions] = None, - **kwargs: Any + **kwargs: Any, ) -> OperatorInformationResult: """Searches for operator information for a given list of phone numbers. @@ -490,10 +479,8 @@ async def search_operator_information( if not isinstance(phone_numbers, list): phone_numbers = [phone_numbers] if options is None: - options = OperatorInformationOptions( - include_additional_operator_details=False) - request = OperatorInformationRequest( - phone_numbers=phone_numbers, options=options) + options = OperatorInformationOptions(include_additional_operator_details=False) + request = OperatorInformationRequest(phone_numbers=phone_numbers, options=options) return await self._phone_number_client.phone_numbers.operator_information_search(request, **kwargs) async def __aenter__(self) -> "PhoneNumbersClient": @@ -510,9 +497,7 @@ async def close(self) -> None: await self._phone_number_client.__aexit__() @distributed_trace_async - async def get_reservation( - self, reservation_id: str, **kwargs: Any - ) -> PhoneNumbersReservation: + async def get_reservation(self, reservation_id: str, **kwargs: Any) -> PhoneNumbersReservation: """Gets a reservation by its ID. Retrieves the reservation with the given ID, including all of the phone numbers associated with @@ -523,14 +508,10 @@ async def get_reservation( :return: PhoneNumbersReservation :rtype: ~azure.communication.phonenumbers.PhoneNumbersReservation """ - return await self._phone_number_client.phone_numbers.get_reservation( - reservation_id, **kwargs - ) + return await self._phone_number_client.phone_numbers.get_reservation(reservation_id, **kwargs) @distributed_trace - def list_reservations( - self, *, max_page_size: int = 100, **kwargs: Any - ) -> AsyncItemPaged[PhoneNumbersReservation]: + def list_reservations(self, *, max_page_size: int = 100, **kwargs: Any) -> AsyncItemPaged[PhoneNumbersReservation]: """Lists all reservations. Retrieves a paginated list of all phone number reservations. Note that the reservations will @@ -544,17 +525,16 @@ def list_reservations( ~azure.core.async_paging.AsyncItemPaged[~azure.communication.phonenumbers.PhoneNumbersReservation] """ - return self._phone_number_client.phone_numbers.list_reservations( - max_page_size=max_page_size, - **kwargs) + return self._phone_number_client.phone_numbers.list_reservations(max_page_size=max_page_size, **kwargs) @distributed_trace_async async def create_or_update_reservation( - self, *, + self, + *, reservation_id: str, numbers_to_add: Optional[List[AvailablePhoneNumber]] = None, numbers_to_remove: Optional[List[str]] = None, - **kwargs: Any + **kwargs: Any, ) -> PhoneNumbersReservation: """Creates or updates a reservation by its ID. @@ -593,16 +573,15 @@ async def create_or_update_reservation( # Cast to satisfy type checker - merge-patch operations allow None values reservation = PhoneNumbersReservation( - phone_numbers=cast(Optional[Dict[str, AvailablePhoneNumber]], phone_numbers)) + phone_numbers=cast(Optional[Dict[str, AvailablePhoneNumber]], phone_numbers) + ) return await self._phone_number_client.phone_numbers.create_or_update_reservation( reservation_id, reservation, **kwargs ) @distributed_trace_async - async def delete_reservation( - self, reservation_id: str, **kwargs: Any - ) -> None: + async def delete_reservation(self, reservation_id: str, **kwargs: Any) -> None: """Deletes a reservation by its ID. Deletes the reservation with the given ID. Any phone number in the reservation will be released @@ -625,7 +604,7 @@ async def begin_purchase_reservation( continuation_token: Optional[str] = None, polling: Union[bool, "PollingMethod"] = True, polling_interval: int = _DEFAULT_POLLING_INTERVAL_IN_SECONDS, - **kwargs: Any + **kwargs: Any, ) -> AsyncLROPoller[None]: """Starts the purchase of all phone numbers in the reservation. @@ -654,8 +633,7 @@ async def begin_purchase_reservation( :return: A poller to wait on the purchase operation. :rtype: ~azure.core.polling.AsyncLROPoller[None] """ - reservation_purchase_request = PhoneNumbersReservationPurchaseRequest( - agree_to_not_resell=agree_to_not_resell) + reservation_purchase_request = PhoneNumbersReservationPurchaseRequest(agree_to_not_resell=agree_to_not_resell) return await self._phone_number_client.phone_numbers.begin_purchase_reservation( reservation_id, @@ -663,20 +641,20 @@ async def begin_purchase_reservation( polling_interval=polling_interval, continuation_token=continuation_token, polling=polling, - **kwargs + **kwargs, ) @distributed_trace_async async def browse_available_phone_numbers( - self, - *, - country_code: str, - phone_number_type: Union[str, PhoneNumberType], - sms_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, - calling_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, - assignment_type: Optional[Union[str, PhoneNumberAssignmentType]] = None, - phone_number_prefixes: Optional[List[str]] = None, - **kwargs: Any, + self, + *, + country_code: str, + phone_number_type: Union[str, PhoneNumberType], + sms_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, + calling_capability: Optional[Union[str, PhoneNumberCapabilityType]] = None, + assignment_type: Optional[Union[str, PhoneNumberAssignmentType]] = None, + phone_number_prefixes: Optional[List[str]] = None, + **kwargs: Any, ) -> PhoneNumbersBrowseResult: """Browses for available phone numbers to purchase. @@ -720,10 +698,8 @@ async def browse_available_phone_numbers( phone_number_type=phone_number_type, capabilities=browse_capabilities, assignment_type=assignment_type, - phone_number_prefixes=phone_number_prefixes + phone_number_prefixes=phone_number_prefixes, ) return await self._phone_number_client.phone_numbers.browse_available_numbers( - country_code, - browse_request, - **kwargs + country_code, browse_request, **kwargs ) diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/_patch.py index 04a7dde0a435..8df0de24f6cf 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/_patch.py @@ -31,5 +31,6 @@ __all__: list[str] = [] + def patch_sdk(): pass diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/aio/operations/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/aio/operations/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/models/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/models/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/operations/_patch.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/operations/_patch.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_generated/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_sip_routing_client.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_sip_routing_client.py index 9966d938e7ce..6cfe9bb97db3 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_sip_routing_client.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/_sip_routing_client.py @@ -34,12 +34,8 @@ class SipRoutingClient(object): this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__( - self, - endpoint: str, - credential: Union["TokenCredential", AzureKeyCredential], - **kwargs: Any - ) -> None: + + def __init__(self, endpoint: str, credential: Union["TokenCredential", AzureKeyCredential], **kwargs: Any) -> None: if not credential: raise ValueError("credential can not be None") @@ -61,11 +57,7 @@ def __init__( ) @classmethod - def from_connection_string( - cls, - conn_str: str, - **kwargs: Any - ) -> "SipRoutingClient": + def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "SipRoutingClient": """Factory method for creating client from connection string. :param str conn_str: Connection string containing endpoint and credentials. @@ -76,11 +68,7 @@ def from_connection_string( return cls(endpoint, AzureKeyCredential(access_key), **kwargs) @distributed_trace - def get_trunk( - self, - trunk_fqdn: str, - **kwargs: Any - ) -> SipTrunk: + def get_trunk(self, trunk_fqdn: str, **kwargs: Any) -> SipTrunk: """Retrieve a single SIP trunk. :param trunk_fqdn: FQDN of the desired SIP trunk. @@ -104,11 +92,7 @@ def get_trunk( return SipTrunk(fqdn=trunk_fqdn, sip_signaling_port=trunk.sip_signaling_port) @distributed_trace - def set_trunk( - self, - trunk: SipTrunk, - **kwargs: Any - ) -> None: + def set_trunk(self, trunk: SipTrunk, **kwargs: Any) -> None: """Modifies SIP trunk with the given FQDN. If it doesn't exist, adds a new trunk. :param trunk: Trunk object to be set. @@ -123,11 +107,7 @@ def set_trunk( self._update_trunks_([trunk], **kwargs) @distributed_trace - def delete_trunk( - self, - trunk_fqdn: str, - **kwargs: Any - ) -> None: + def delete_trunk(self, trunk_fqdn: str, **kwargs: Any) -> None: """Deletes SIP trunk. :param trunk_fqdn: FQDN of the trunk to be deleted. @@ -145,10 +125,7 @@ def delete_trunk( self._rest_service.sip_routing.update(body=SipConfiguration(trunks=trunks_dict), **kwargs) @distributed_trace - def list_trunks( - self, - **kwargs: Any - ) -> ItemPaged[SipTrunk]: + def list_trunks(self, **kwargs: Any) -> ItemPaged[SipTrunk]: """Retrieves the currently configured SIP trunks. :returns: Current SIP trunks configuration. @@ -161,8 +138,7 @@ def extract_data(config): list_of_elem = [] else: list_of_elem = [ - SipTrunk(fqdn=k, sip_signaling_port=v.sip_signaling_port) - for k, v in config.trunks.items() + SipTrunk(fqdn=k, sip_signaling_port=v.sip_signaling_port) for k, v in config.trunks.items() ] return None, list_of_elem @@ -173,10 +149,7 @@ def get_next(nextLink=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list_routes( - self, - **kwargs: Any - ) -> ItemPaged[SipTrunkRoute]: + def list_routes(self, **kwargs: Any) -> ItemPaged[SipTrunkRoute]: """Retrieves the currently configured SIP routes. :returns: Current SIP routes configuration. @@ -190,10 +163,7 @@ def extract_data(config): else: list_of_elem = [ SipTrunkRoute( - description=x.description, - name=x.name, - number_pattern=x.number_pattern, - trunks=x.trunks + description=x.description, name=x.name, number_pattern=x.number_pattern, trunks=x.trunks ) for x in config.routes ] @@ -206,11 +176,7 @@ def get_next(nextLink=None): return ItemPaged(get_next, extract_data) @distributed_trace - def set_trunks( - self, - trunks: List[SipTrunk], - **kwargs: Any - ) -> None: + def set_trunks(self, trunks: List[SipTrunk], **kwargs: Any) -> None: """Overwrites the list of SIP trunks. :param trunks: New list of trunks to be set. @@ -239,11 +205,7 @@ def set_trunks( self._rest_service.sip_routing.update(body=config, **kwargs) @distributed_trace - def set_routes( - self, - routes: List[SipTrunkRoute], - **kwargs: Any - ) -> None: + def set_routes(self, routes: List[SipTrunkRoute], **kwargs: Any) -> None: """Overwrites the list of SIP routes. :param routes: New list of routes to be set. @@ -269,11 +231,7 @@ def _list_trunks_(self, **kwargs: Any) -> List[SipTrunk]: return [] return [SipTrunk(fqdn=k, sip_signaling_port=v.sip_signaling_port) for k, v in config.trunks.items()] - def _update_trunks_( - self, - trunks: List[SipTrunk], - **kwargs: Any - ) -> List[SipTrunk]: + def _update_trunks_(self, trunks: List[SipTrunk], **kwargs: Any) -> List[SipTrunk]: trunks_internal = {x.fqdn: SipTrunkInternal(sip_signaling_port=x.sip_signaling_port) for x in trunks} modified_config = SipConfiguration(trunks=trunks_internal) diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/aio/_sip_routing_client_async.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/aio/_sip_routing_client_async.py index 296f95ff5195..9cc446cd8962 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/aio/_sip_routing_client_async.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/siprouting/aio/_sip_routing_client_async.py @@ -38,10 +38,7 @@ class SipRoutingClient(object): """ def __init__( - self, - endpoint: str, - credential: Union["AsyncTokenCredential", AzureKeyCredential], - **kwargs: Any + self, endpoint: str, credential: Union["AsyncTokenCredential", AzureKeyCredential], **kwargs: Any ) -> None: if not credential: @@ -64,11 +61,7 @@ def __init__( ) @classmethod - def from_connection_string( - cls, - conn_str: str, - **kwargs: Any - ) -> "SipRoutingClient": + def from_connection_string(cls, conn_str: str, **kwargs: Any) -> "SipRoutingClient": """Factory method for creating client from connection string. :param conn_str: Connection string containing endpoint and credentials @@ -81,11 +74,7 @@ def from_connection_string( return cls(endpoint, AzureKeyCredential(access_key), **kwargs) @distributed_trace_async - async def get_trunk( - self, - trunk_fqdn: str, - **kwargs: Any - ) -> SipTrunk: + async def get_trunk(self, trunk_fqdn: str, **kwargs: Any) -> SipTrunk: """Retrieve a single SIP trunk. :param trunk_fqdn: FQDN of the desired SIP trunk. @@ -109,11 +98,7 @@ async def get_trunk( return SipTrunk(fqdn=trunk_fqdn, sip_signaling_port=trunk.sip_signaling_port) @distributed_trace_async - async def set_trunk( - self, - trunk: SipTrunk, - **kwargs: Any - ) -> None: + async def set_trunk(self, trunk: SipTrunk, **kwargs: Any) -> None: """Modifies SIP trunk with the given FQDN. If it doesn't exist, adds a new trunk. :param trunk: Trunk object to be set. @@ -128,11 +113,7 @@ async def set_trunk( await self._update_trunks_([trunk], **kwargs) @distributed_trace_async - async def delete_trunk( - self, - trunk_fqdn: str, - **kwargs: Any - ) -> None: + async def delete_trunk(self, trunk_fqdn: str, **kwargs: Any) -> None: """Deletes SIP trunk. :param trunk_fqdn: FQDN of the trunk to be deleted. @@ -150,10 +131,7 @@ async def delete_trunk( await self._rest_service.sip_routing.update(body=SipConfiguration(trunks=trunks_dict), **kwargs) @distributed_trace - def list_trunks( - self, - **kwargs: Any - ) -> AsyncItemPaged[SipTrunk]: + def list_trunks(self, **kwargs: Any) -> AsyncItemPaged[SipTrunk]: """Retrieves list of currently configured SIP trunks. :returns: Current SIP trunks configuration. @@ -166,8 +144,7 @@ async def extract_data(config): list_of_elem = [] else: list_of_elem = [ - SipTrunk(fqdn=k, sip_signaling_port=v.sip_signaling_port) - for k, v in config.trunks.items() + SipTrunk(fqdn=k, sip_signaling_port=v.sip_signaling_port) for k, v in config.trunks.items() ] return None, AsyncList(list_of_elem) @@ -178,10 +155,7 @@ async def get_next(nextLink=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - def list_routes( - self, - **kwargs: Any - ) -> AsyncItemPaged[SipTrunkRoute]: + def list_routes(self, **kwargs: Any) -> AsyncItemPaged[SipTrunkRoute]: """Retrieves list of currently configured SIP routes. :returns: Current SIP routes configuration. @@ -195,10 +169,7 @@ async def extract_data(config): else: list_of_elem = [ SipTrunkRoute( - description=x.description, - name=x.name, - number_pattern=x.number_pattern, - trunks=x.trunks + description=x.description, name=x.name, number_pattern=x.number_pattern, trunks=x.trunks ) for x in config.routes ] @@ -211,11 +182,7 @@ async def get_next(nextLink=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def set_trunks( - self, - trunks: List[SipTrunk], - **kwargs: Any - ) -> None: + async def set_trunks(self, trunks: List[SipTrunk], **kwargs: Any) -> None: """Overwrites the list of SIP trunks. :param trunks: New list of trunks to be set. @@ -244,11 +211,7 @@ async def set_trunks( await self._rest_service.sip_routing.update(body=config, **kwargs) @distributed_trace_async - async def set_routes( - self, - routes: List[SipTrunkRoute], - **kwargs: Any - ) -> None: + async def set_routes(self, routes: List[SipTrunkRoute], **kwargs: Any) -> None: """Overwrites the list of SIP routes. :param routes: New list of routes to be set. @@ -274,11 +237,7 @@ async def _list_trunks_(self, **kwargs: Any): return [] return [SipTrunk(fqdn=k, sip_signaling_port=v.sip_signaling_port) for k, v in config.trunks.items()] - async def _update_trunks_( - self, - trunks: List[SipTrunk], - **kwargs: Any - ) -> List[SipTrunk]: + async def _update_trunks_(self, trunks: List[SipTrunk], **kwargs: Any) -> List[SipTrunk]: trunks_internal = {x.fqdn: SipTrunkInternal(sip_signaling_port=x.sip_signaling_port) for x in trunks} modified_config = SipConfiguration(trunks=trunks_internal) diff --git a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample.py index 68b836e160d9..78cc5f7cb46d 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample.py @@ -14,7 +14,7 @@ USAGE: python browse_and_reserve_numbers_bulk_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ @@ -23,17 +23,14 @@ from azure.communication.phonenumbers import PhoneNumbersClient connection_str = os.environ["COMMUNICATION_SAMPLES_CONNECTION_STRING"] -phone_numbers_client = PhoneNumbersClient.from_connection_string( - connection_str) +phone_numbers_client = PhoneNumbersClient.from_connection_string(connection_str) def browse_and_reserve_numbers_bulk(): # Browse for geographic phone numbers in the US using specific area codes. area_codes = ["212", "718", "917"] browse_result = phone_numbers_client.browse_available_phone_numbers( - country_code="US", - phone_number_type="geographic", - phone_number_prefixes=area_codes + country_code="US", phone_number_type="geographic", phone_number_prefixes=area_codes ) # Reserve 3 phone numbers from the browse result. numbers_to_reserve = browse_result.phone_numbers[:3] @@ -44,21 +41,18 @@ def browse_and_reserve_numbers_bulk(): print(f"Using reservation ID: {reservation_id}") reservation = phone_numbers_client.create_or_update_reservation( - reservation_id=reservation_id, - numbers_to_add=numbers_to_reserve + reservation_id=reservation_id, numbers_to_add=numbers_to_reserve ) # Check if any errors occurred during reservation if reservation.phone_numbers: - numbers_with_error = [ - n for n in reservation.phone_numbers.values() if n.status == "error"] + numbers_with_error = [n for n in reservation.phone_numbers.values() if n.status == "error"] if any(numbers_with_error): print("Errors occurred during reservation:") for number in numbers_with_error: error_code = number.error.code if number.error and number.error.code else "Unknown" error_message = number.error.message if number.error and number.error.message else "Unknown error" - print( - f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") + print(f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") else: print("Reservation operation completed without errors.") diff --git a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample_async.py index 163a3260efe0..43cd9dcbf25a 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_numbers_bulk_sample_async.py @@ -14,7 +14,7 @@ USAGE: python browse_and_reserve_numbers_bulk_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ @@ -24,17 +24,14 @@ from azure.communication.phonenumbers.aio import PhoneNumbersClient connection_str = os.environ["COMMUNICATION_SAMPLES_CONNECTION_STRING"] -phone_numbers_client = PhoneNumbersClient.from_connection_string( - connection_str) +phone_numbers_client = PhoneNumbersClient.from_connection_string(connection_str) async def browse_and_reserve_numbers_bulk(): # Browse for geographic phone numbers in the US using specific area codes. area_codes = ["212", "718", "917"] browse_result = await phone_numbers_client.browse_available_phone_numbers( - country_code="US", - phone_number_type="geographic", - phone_number_prefixes=area_codes + country_code="US", phone_number_type="geographic", phone_number_prefixes=area_codes ) # Reserve 3 phone numbers from the browse result. numbers_to_reserve = browse_result.phone_numbers[:3] @@ -45,21 +42,18 @@ async def browse_and_reserve_numbers_bulk(): print(f"Using reservation ID: {reservation_id}") reservation = await phone_numbers_client.create_or_update_reservation( - reservation_id=reservation_id, - numbers_to_add=numbers_to_reserve + reservation_id=reservation_id, numbers_to_add=numbers_to_reserve ) # Check if any errors occurred during reservation if reservation.phone_numbers: - numbers_with_error = [ - n for n in reservation.phone_numbers.values() if n.status == "error"] + numbers_with_error = [n for n in reservation.phone_numbers.values() if n.status == "error"] if any(numbers_with_error): print("Errors occurred during reservation:") for number in numbers_with_error: error_code = number.error.code if number.error and number.error.code else "Unknown" error_message = number.error.message if number.error and number.error.message else "Unknown error" - print( - f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") + print(f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") else: print("Reservation operation completed without errors.") @@ -68,5 +62,6 @@ async def browse_and_reserve_numbers_bulk(): await phone_numbers_client.delete_reservation(reservation_id=reservation_id) print("Reservation deleted successfully.") + if __name__ == "__main__": asyncio.run(browse_and_reserve_numbers_bulk()) diff --git a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample.py index adc34dba960a..cd21f300f0db 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample.py @@ -14,7 +14,7 @@ USAGE: python browse_and_reserve_phone_numbers_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ @@ -23,15 +23,11 @@ from azure.communication.phonenumbers import PhoneNumbersClient connection_str = os.environ["COMMUNICATION_SAMPLES_CONNECTION_STRING"] -phone_numbers_client = PhoneNumbersClient.from_connection_string( - connection_str) +phone_numbers_client = PhoneNumbersClient.from_connection_string(connection_str) def browse_and_reserve_phone_numbers(): - browse_result = phone_numbers_client.browse_available_phone_numbers( - country_code="US", - phone_number_type="tollFree" - ) + browse_result = phone_numbers_client.browse_available_phone_numbers(country_code="US", phone_number_type="tollFree") number_to_reserve = browse_result.phone_numbers[0] print(f"Reserving phone number: {number_to_reserve.phone_number}") @@ -40,21 +36,18 @@ def browse_and_reserve_phone_numbers(): print(f"Using reservation ID: {reservation_id}") reservation = phone_numbers_client.create_or_update_reservation( - reservation_id=reservation_id, - numbers_to_add=[number_to_reserve] + reservation_id=reservation_id, numbers_to_add=[number_to_reserve] ) # Check if any errors occurred during reservation if reservation.phone_numbers: - numbers_with_error = [ - n for n in reservation.phone_numbers.values() if n.status == "error"] + numbers_with_error = [n for n in reservation.phone_numbers.values() if n.status == "error"] if any(numbers_with_error): print("Errors occurred during reservation:") for number in numbers_with_error: error_code = number.error.code if number.error and number.error.code else "Unknown" error_message = number.error.message if number.error and number.error.message else "Unknown error" - print( - f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") + print(f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") else: print("Reservation operation completed without errors.") diff --git a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample_async.py index ad5aef41ad96..1433fadfa2de 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/browse_and_reserve_phone_numbers_sample_async.py @@ -14,7 +14,7 @@ USAGE: python browse_and_reserve_phone_numbers_sample_async.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ @@ -24,14 +24,12 @@ from azure.communication.phonenumbers.aio import PhoneNumbersClient connection_str = os.environ["COMMUNICATION_SAMPLES_CONNECTION_STRING"] -phone_numbers_client = PhoneNumbersClient.from_connection_string( - connection_str) +phone_numbers_client = PhoneNumbersClient.from_connection_string(connection_str) async def browse_and_reserve_phone_numbers(): browse_result = await phone_numbers_client.browse_available_phone_numbers( - country_code="US", - phone_number_type="tollFree" + country_code="US", phone_number_type="tollFree" ) number_to_reserve = browse_result.phone_numbers[0] print(f"Reserving phone number: {number_to_reserve.phone_number}") @@ -41,21 +39,18 @@ async def browse_and_reserve_phone_numbers(): print(f"Using reservation ID: {reservation_id}") reservation = await phone_numbers_client.create_or_update_reservation( - reservation_id=reservation_id, - numbers_to_add=[number_to_reserve] + reservation_id=reservation_id, numbers_to_add=[number_to_reserve] ) # Check if any errors occurred during reservation if reservation.phone_numbers: - numbers_with_error = [ - n for n in reservation.phone_numbers.values() if n.status == "error"] + numbers_with_error = [n for n in reservation.phone_numbers.values() if n.status == "error"] if reservation.phone_numbers and any(numbers_with_error): print("Errors occurred during reservation:") for number in numbers_with_error: error_code = number.error.code if number.error and number.error.code else "Unknown" error_message = number.error.message if number.error and number.error.message else "Unknown error" - print( - f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") + print(f"Phone number: {number.phone_number}, Error: {error_code}, Message: {error_message}") else: print("Reservation operation completed without errors.") @@ -64,5 +59,6 @@ async def browse_and_reserve_phone_numbers(): await phone_numbers_client.delete_reservation(reservation_id=reservation_id) print("Reservation deleted successfully.") + if __name__ == "__main__": asyncio.run(browse_and_reserve_phone_numbers()) diff --git a/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample.py index 4d57dcfa5563..e8977c3a289a 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample.py @@ -13,7 +13,7 @@ USAGE: python get_purchased_phone_number_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service 2) AZURE_PHONE_NUMBER - The phone number you want to get its information """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample_async.py index 2aec5e7c227d..7c6210facfc5 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/get_purchased_phone_number_sample_async.py @@ -13,7 +13,7 @@ USAGE: python get_purchased_phone_number_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service 2) AZURE_PHONE_NUMBER - The phone number you want to get its information """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample.py index be1a892de1f3..49ee51d1d6ae 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample.py @@ -13,7 +13,7 @@ USAGE: python list_purchased_phone_numbers_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample_async.py index dce6df0af8a3..bb36f1968c13 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/list_purchased_phone_numbers_sample_async.py @@ -13,7 +13,7 @@ USAGE: python list_purchased_phone_numbers_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample.py index debccf88b602..6e1c8b9824fc 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample.py @@ -13,9 +13,9 @@ USAGE: python purchase_phone_number_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and - access key of your Azure Communication Service - 2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + access key of your Azure Communication Service + 2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you reserved and want to purchase """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample_async.py index 0228f0dcc139..3802d0175e9c 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample_async.py @@ -13,9 +13,9 @@ USAGE: python purchase_phone_number_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and - access key of your Azure Communication Service - 2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + access key of your Azure Communication Service + 2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you reserved and want to purchase """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample.py index 9a7d31a080d9..3249f1116884 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample.py @@ -13,7 +13,7 @@ USAGE: python release_phone_number_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service 2) AZURE_PHONE_NUMBER_TO_RELEASE - The phone number you want to release """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample_async.py index 160fafe7f610..1f28be432827 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/release_phone_number_sample_async.py @@ -13,7 +13,7 @@ USAGE: python release_phone_number_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service 2) AZURE_PHONE_NUMBER_TO_RELEASE - The phone number you want to release """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample.py index bfebf08c27d7..81ba882143eb 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample.py @@ -13,7 +13,7 @@ USAGE: python search_available_phone_numbers_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample_async.py index 3fc291885095..6ba56914da8d 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/search_available_phone_numbers_sample_async.py @@ -13,7 +13,7 @@ USAGE: python search_available_phone_numbers_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample.py b/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample.py index 0747742b14c9..4e1ee51dde64 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample.py @@ -13,7 +13,7 @@ USAGE: python update_phone_number_capabilities_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service 2) AZURE_PHONE_NUMBER - The phone number you want to update """ diff --git a/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample_async.py b/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample_async.py index 44fec057fe78..e33162c72105 100644 --- a/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample_async.py +++ b/sdk/communication/azure-communication-phonenumbers/samples/update_phone_number_capabilities_sample_async.py @@ -13,7 +13,7 @@ USAGE: python update_phone_number_capabilities_sample.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and access key of your Azure Communication Service 2) AZURE_PHONE_NUMBER - The phone number you want to update """ diff --git a/sdk/communication/azure-communication-phonenumbers/test/conftest.py b/sdk/communication/azure-communication-phonenumbers/test/conftest.py index e0c4569c5f56..cec0f6a856c4 100644 --- a/sdk/communication/azure-communication-phonenumbers/test/conftest.py +++ b/sdk/communication/azure-communication-phonenumbers/test/conftest.py @@ -10,7 +10,6 @@ remove_batch_sanitizers, ) - STATIC_RESERVATION_ID = "6227aeb8-8086-4824-9586-05cafe96f37b" @@ -67,6 +66,6 @@ def add_sanitizers(test_proxy): # - AZSDK3493: $..name # - AZSDK2003: Location # - AZSDK4001: Host - We are sanitizing the endpoint above, so this is not needed. - # - AZSDK3430: ..id - For phone number IDs, we are already sanitizing them above. + # - AZSDK3430: ..id - For phone number IDs, we are already sanitizing them above. # For reservation IDs, we are sanitizing them to a static ID since they are needed in tests. remove_batch_sanitizers(["AZSDK3493", "AZSDK2003", "AZSDK4001", "AZSDK3430"]) diff --git a/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client.py b/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client.py index 1b6636b1fda5..c989d91f2802 100644 --- a/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client.py +++ b/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client.py @@ -10,7 +10,7 @@ PhoneNumberCapabilityType, PhoneNumberType, ReservationStatus, - PhoneNumberAvailabilityStatus + PhoneNumberAvailabilityStatus, ) from azure.communication.phonenumbers._generated.models import PhoneNumberOperationStatus from azure.communication.phonenumbers._shared.utils import parse_connection_str @@ -61,10 +61,10 @@ def setup_method(self): # In live mode, generate unique reservation IDs for each test run # Tests that create and delete reservations will use the same ID - self.reservation_id = str(uuid.uuid4()) - # The purchase reservation test will use a different ID, + self.reservation_id = str(uuid.uuid4()) + # The purchase reservation test will use a different ID, # since purchased reservations are immutable and cannot be modified after purchase - self.purchased_reservation_id = str(uuid.uuid4()) + self.purchased_reservation_id = str(uuid.uuid4()) self.phone_number_client = PhoneNumbersClient.from_connection_string( self.connection_str, http_logging_policy=get_http_logging_policy(), headers_policy=get_header_policy() @@ -222,7 +222,9 @@ def test_purchase_phone_numbers(self, **kwargs): assert release_poller.status() == PhoneNumberOperationStatus.SUCCEEDED.value @recorded_by_proxy - def test_purchase_phone_numbers_without_agreement_to_not_resell(self,): + def test_purchase_phone_numbers_without_agreement_to_not_resell( + self, + ): capabilities = PhoneNumberCapabilities( calling=PhoneNumberCapabilityType.OUTBOUND, sms=PhoneNumberCapabilityType.NONE ) @@ -374,7 +376,9 @@ def test_list_geographic_area_codes(self): @recorded_by_proxy def test_list_mobile_area_codes_from_managed_identity(self): phone_number_client = self._get_managed_identity_phone_number_client() - first_locality = phone_number_client.list_available_localities("IE", phone_number_type=PhoneNumberType.MOBILE).next() + first_locality = phone_number_client.list_available_localities( + "IE", phone_number_type=PhoneNumberType.MOBILE + ).next() area_codes = self.phone_number_client.list_available_area_codes( "IE", PhoneNumberType.MOBILE, @@ -385,7 +389,9 @@ def test_list_mobile_area_codes_from_managed_identity(self): @recorded_by_proxy def test_list_mobile_area_codes(self): - first_locality = self.phone_number_client.list_available_localities("IE", phone_number_type=PhoneNumberType.MOBILE).next() + first_locality = self.phone_number_client.list_available_localities( + "IE", phone_number_type=PhoneNumberType.MOBILE + ).next() area_codes = self.phone_number_client.list_available_area_codes( "IE", PhoneNumberType.MOBILE, @@ -432,7 +438,7 @@ def test_list_localities_with_ad(self): "US", administrative_division=first_locality.next().administrative_division.abbreviated_name ) assert localities.next() - + @recorded_by_proxy def test_list_localities_with_number_type(self): localities = self.phone_number_client.list_available_localities("IE", phone_number_type=PhoneNumberType.MOBILE) @@ -494,8 +500,7 @@ def test_list_phone_numbers_reservations(self): @recorded_by_proxy def test_browse_available_numbers(self): result = self.phone_number_client.browse_available_phone_numbers( - country_code=self.country_code, - phone_number_type=PhoneNumberType.TOLL_FREE + country_code=self.country_code, phone_number_type=PhoneNumberType.TOLL_FREE ) available_phone_numbers = result.phone_numbers @@ -509,7 +514,7 @@ def test_phone_numbers_reservation_management(self): add_general_regex_sanitizer( regex=r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", value=STATIC_RESERVATION_ID, - function_scoped=True, # This ensures the sanitizer is only applied to this test + function_scoped=True, # This ensures the sanitizer is only applied to this test ) reservation_id = self.reservation_id @@ -522,20 +527,22 @@ def test_phone_numbers_reservation_management(self): # Test that we can add phone numbers to the reservation browse_result = self.phone_number_client.browse_available_phone_numbers( - country_code=self.country_code, - phone_number_type=PhoneNumberType.TOLL_FREE + country_code=self.country_code, phone_number_type=PhoneNumberType.TOLL_FREE ) phone_number_to_reserve = browse_result.phone_numbers[0] updated_reservation = self.phone_number_client.create_or_update_reservation( reservation_id=reservation_id, numbers_to_add=[phone_number_to_reserve] ) - + assert updated_reservation.id == reservation_id assert updated_reservation.status == ReservationStatus.ACTIVE assert updated_reservation.expires_at > created_reservation.expires_at assert phone_number_to_reserve.id in updated_reservation.phone_numbers - assert updated_reservation.phone_numbers[phone_number_to_reserve.id].status == PhoneNumberAvailabilityStatus.RESERVED + assert ( + updated_reservation.phone_numbers[phone_number_to_reserve.id].status + == PhoneNumberAvailabilityStatus.RESERVED + ) # Test that we can get the reservation by ID retrieved_reservation = self.phone_number_client.get_reservation(reservation_id) @@ -547,7 +554,8 @@ def test_phone_numbers_reservation_management(self): # Test that we can remove numbers from the reservation reservation_after_remove = self.phone_number_client.create_or_update_reservation( - reservation_id=reservation_id, numbers_to_remove=[phone_number_to_reserve.id]) + reservation_id=reservation_id, numbers_to_remove=[phone_number_to_reserve.id] + ) assert reservation_after_remove.id == updated_reservation.id assert reservation_after_remove.status == updated_reservation.status @@ -565,28 +573,26 @@ def test_purchase_reservation_without_agreement_to_not_resell(self): add_general_regex_sanitizer( regex=r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", value=STATIC_RESERVATION_ID, - function_scoped=True, # This ensures the sanitizer is only applied to this test + function_scoped=True, # This ensures the sanitizer is only applied to this test ) reservation_id = self.reservation_id # France doesn't allow reselling of phone numbers, so purchases without agreement to not resell should fail browse_result = self.phone_number_client.browse_available_phone_numbers( - country_code="FR", - phone_number_type=PhoneNumberType.TOLL_FREE + country_code="FR", phone_number_type=PhoneNumberType.TOLL_FREE ) # The phone number can be reserved, but not purchased without agreement to not resell phone_number = browse_result.phone_numbers[0] created_reservation = self.phone_number_client.create_or_update_reservation( - reservation_id=reservation_id, numbers_to_add=[phone_number]) + reservation_id=reservation_id, numbers_to_add=[phone_number] + ) assert created_reservation.phone_numbers[phone_number.id].status == PhoneNumberAvailabilityStatus.RESERVED assert created_reservation.status == ReservationStatus.ACTIVE # Purchase should fail without agreement to not resell with pytest.raises(Exception) as ex: - self.phone_number_client.begin_purchase_reservation( - reservation_id, agree_to_not_resell=False, polling=True - ) + self.phone_number_client.begin_purchase_reservation(reservation_id, agree_to_not_resell=False, polling=True) assert is_client_error_status_code(ex.value.status_code) is True assert ex.value.message is not None @@ -599,20 +605,20 @@ def test_purchase_reservation(self): add_general_regex_sanitizer( regex=r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}", value=STATIC_RESERVATION_ID, - function_scoped=True, # This ensures the sanitizer is only applied to this test + function_scoped=True, # This ensures the sanitizer is only applied to this test ) reservation_id = self.purchased_reservation_id # Test that we can purchase a reservation browse_result = self.phone_number_client.browse_available_phone_numbers( - country_code=self.country_code, - phone_number_type=PhoneNumberType.TOLL_FREE + country_code=self.country_code, phone_number_type=PhoneNumberType.TOLL_FREE ) phone_number = browse_result.phone_numbers[0] created_reservation = self.phone_number_client.create_or_update_reservation( - reservation_id=reservation_id, numbers_to_add=[phone_number]) - + reservation_id=reservation_id, numbers_to_add=[phone_number] + ) + assert created_reservation.phone_numbers[phone_number.id].status == PhoneNumberAvailabilityStatus.RESERVED assert created_reservation.status == ReservationStatus.ACTIVE @@ -628,4 +634,4 @@ def test_purchase_reservation(self): # Release the purchased phone number release_poller = self.phone_number_client.begin_release_phone_number(phone_number.id, polling=True) release_poller.result() - assert release_poller.status() == PhoneNumberOperationStatus.SUCCEEDED.value \ No newline at end of file + assert release_poller.status() == PhoneNumberOperationStatus.SUCCEEDED.value diff --git a/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client_async.py b/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client_async.py index 6a1adfa3b62c..96c88936ccc2 100644 --- a/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client_async.py +++ b/sdk/communication/azure-communication-phonenumbers/test/test_phone_number_administration_client_async.py @@ -13,7 +13,7 @@ PhoneNumberCapabilityType, PhoneNumberType, ReservationStatus, - PhoneNumberAvailabilityStatus + PhoneNumberAvailabilityStatus, ) from azure.communication.phonenumbers._generated.models import PhoneNumberOperationStatus from azure.communication.phonenumbers._shared.utils import parse_connection_str @@ -25,14 +25,12 @@ SKIP_PURCHASE_PHONE_NUMBER_TESTS = True PURCHASE_PHONE_NUMBER_TEST_SKIP_REASON = "Phone numbers shouldn't be purchased in live tests" -SKIP_INT_PHONE_NUMBER_TESTS = os.getenv( - "COMMUNICATION_SKIP_INT_PHONENUMBERS_TEST", "false") == "true" +SKIP_INT_PHONE_NUMBER_TESTS = os.getenv("COMMUNICATION_SKIP_INT_PHONENUMBERS_TEST", "false") == "true" INT_PHONE_NUMBER_TEST_SKIP_REASON = ( "Phone numbers setting SMS capability does not support in INT. Skip these tests in INT." ) -SKIP_UPDATE_CAPABILITIES_TESTS = os.getenv( - "COMMUNICATION_SKIP_CAPABILITIES_LIVE_TEST", "false") == "true" +SKIP_UPDATE_CAPABILITIES_TESTS = os.getenv("COMMUNICATION_SKIP_CAPABILITIES_LIVE_TEST", "false") == "true" SKIP_UPDATE_CAPABILITIES_TESTS_REASON = "Phone number capabilities are skipped." @@ -53,8 +51,7 @@ def is_client_error_status_code( @pytest.mark.asyncio class TestPhoneNumbersClientAsync(PhoneNumbersTestCase): def setup_method(self): - super(TestPhoneNumbersClientAsync, self).setUp( - use_dynamic_resource=False) + super(TestPhoneNumbersClientAsync, self).setUp(use_dynamic_resource=False) if self.is_playback(): self.phone_number = "sanitized" self.country_code = "US" @@ -64,8 +61,7 @@ def setup_method(self): self.purchased_reservation_id = STATIC_RESERVATION_ID else: self.phone_number = _get_test_phone_number() - self.country_code = os.getenv( - "AZURE_COMMUNICATION_SERVICE_COUNTRY_CODE", "US") + self.country_code = os.getenv("AZURE_COMMUNICATION_SERVICE_COUNTRY_CODE", "US") # In live mode, generate unique reservation IDs for each test run # Tests that create and delete reservations will use the same ID @@ -370,8 +366,7 @@ async def test_list_toll_free_area_codes_with_managed_identity(self): async for item in area_codes: items.append(item.area_code) - expected_area_codes = {"888", "877", "866", - "855", "844", "800", "833", "88"} + expected_area_codes = {"888", "877", "866", "855", "844", "800", "833", "88"} for area_code in items: assert area_code in expected_area_codes @@ -387,8 +382,7 @@ async def test_list_toll_free_area_codes(self): async for item in area_codes: items.append(item.area_code) - expected_area_codes = {"888", "877", "866", - "855", "844", "800", "833", "88"} + expected_area_codes = {"888", "877", "866", "855", "844", "800", "833", "88"} for area_code in items: assert area_code in expected_area_codes @@ -416,8 +410,7 @@ async def test_list_geographic_area_codes_with_managed_identity(self): @recorded_by_proxy_async async def test_list_geographic_area_codes(self): async with self.phone_number_client: - localities = self.phone_number_client.list_available_localities( - "US") + localities = self.phone_number_client.list_available_localities("US") async for first_locality in localities: area_codes = self.phone_number_client.list_available_area_codes( "US", @@ -431,7 +424,7 @@ async def test_list_geographic_area_codes(self): items.append(item) break assert len(items) > 0 - + @recorded_by_proxy_async async def test_list_mobile_area_codes_with_managed_identity(self): phone_number_client = self._get_managed_identity_phone_number_client() @@ -453,7 +446,9 @@ async def test_list_mobile_area_codes_with_managed_identity(self): @recorded_by_proxy_async async def test_list_mobile_area_codes(self): async with self.phone_number_client: - localities = self.phone_number_client.list_available_localities("IE", phone_number_type=PhoneNumberType.MOBILE) + localities = self.phone_number_client.list_available_localities( + "IE", phone_number_type=PhoneNumberType.MOBILE + ) async for first_locality in localities: area_codes = self.phone_number_client.list_available_area_codes( "IE", @@ -499,8 +494,7 @@ async def test_list_localities_with_managed_identity(self): @recorded_by_proxy_async async def test_list_localities(self): async with self.phone_number_client: - localities = self.phone_number_client.list_available_localities( - "US") + localities = self.phone_number_client.list_available_localities("US") items = [] async for item in localities: items.append(item) @@ -524,8 +518,7 @@ async def test_list_localities_with_ad_and_managed_identity(self): @recorded_by_proxy_async async def test_list_localities_with_ad(self): async with self.phone_number_client: - localities = self.phone_number_client.list_available_localities( - "US") + localities = self.phone_number_client.list_available_localities("US") async for first_locality in localities: localities = self.phone_number_client.list_available_localities( "US", administrative_division=first_locality.administrative_division.abbreviated_name @@ -535,12 +528,13 @@ async def test_list_localities_with_ad(self): items.append(item) break assert len(items) > 0 - + @recorded_by_proxy_async async def test_list_localities_with_number_type(self): async with self.phone_number_client: localities = self.phone_number_client.list_available_localities( - "IE", phone_number_type=PhoneNumberType.MOBILE) + "IE", phone_number_type=PhoneNumberType.MOBILE + ) items = [] async for item in localities: items.append(item) @@ -617,8 +611,7 @@ async def test_list_phone_numbers_reservation(self): @recorded_by_proxy_async async def test_browse_available_numbers(self): result = await self.phone_number_client.browse_available_phone_numbers( - country_code=self.country_code, - phone_number_type=PhoneNumberType.TOLL_FREE + country_code=self.country_code, phone_number_type=PhoneNumberType.TOLL_FREE ) available_numbers = result.phone_numbers @@ -645,8 +638,7 @@ async def test_phone_numbers_reservation_management(self): # Test that we can add phone numbers to the reservation browse_result = await self.phone_number_client.browse_available_phone_numbers( - country_code=self.country_code, - phone_number_type=PhoneNumberType.TOLL_FREE + country_code=self.country_code, phone_number_type=PhoneNumberType.TOLL_FREE ) phone_number_to_reserve = browse_result.phone_numbers[0] @@ -658,7 +650,10 @@ async def test_phone_numbers_reservation_management(self): assert updated_reservation.status == ReservationStatus.ACTIVE assert updated_reservation.expires_at > created_reservation.expires_at assert phone_number_to_reserve.id in updated_reservation.phone_numbers - assert updated_reservation.phone_numbers[phone_number_to_reserve.id].status == PhoneNumberAvailabilityStatus.RESERVED + assert ( + updated_reservation.phone_numbers[phone_number_to_reserve.id].status + == PhoneNumberAvailabilityStatus.RESERVED + ) # Test that we can get the reservation by ID retrieved_reservation = await self.phone_number_client.get_reservation(reservation_id) @@ -670,8 +665,8 @@ async def test_phone_numbers_reservation_management(self): # Test that we can remove numbers from the reservation reservation_after_remove = await self.phone_number_client.create_or_update_reservation( - reservation_id=reservation_id, - numbers_to_remove=[phone_number_to_reserve.id]) + reservation_id=reservation_id, numbers_to_remove=[phone_number_to_reserve.id] + ) assert reservation_after_remove.id == updated_reservation.id assert reservation_after_remove.status == updated_reservation.status @@ -695,15 +690,15 @@ async def test_purchase_reservation_without_agreement_to_not_resell(self): # France doesn't allow reselling of phone numbers, so purchases without agreement to not resell should fail browse_result = await self.phone_number_client.browse_available_phone_numbers( - country_code="FR", - phone_number_type=PhoneNumberType.TOLL_FREE + country_code="FR", phone_number_type=PhoneNumberType.TOLL_FREE ) # The phone number can be reserved, but not purchased without agreement to not resell phone_number = browse_result.phone_numbers[0] created_reservation = await self.phone_number_client.create_or_update_reservation( - reservation_id=reservation_id, numbers_to_add=[phone_number]) - + reservation_id=reservation_id, numbers_to_add=[phone_number] + ) + assert created_reservation.phone_numbers[phone_number.id].status == PhoneNumberAvailabilityStatus.RESERVED assert created_reservation.status == ReservationStatus.ACTIVE @@ -730,14 +725,14 @@ async def test_purchase_reservation(self): # Test that we can purchase a reservation browse_result = await self.phone_number_client.browse_available_phone_numbers( - country_code=self.country_code, - phone_number_type=PhoneNumberType.TOLL_FREE + country_code=self.country_code, phone_number_type=PhoneNumberType.TOLL_FREE ) phone_number = browse_result.phone_numbers[0] created_reservation = await self.phone_number_client.create_or_update_reservation( - reservation_id=reservation_id, numbers_to_add=[phone_number]) - + reservation_id=reservation_id, numbers_to_add=[phone_number] + ) + assert created_reservation.phone_numbers[phone_number.id].status == PhoneNumberAvailabilityStatus.RESERVED assert created_reservation.status == ReservationStatus.ACTIVE diff --git a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/_patch.py b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/_patch.py +++ b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/_patch.py b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/_patch.py +++ b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/operations/_patch.py b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/operations/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/operations/_patch.py +++ b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/operations/_patch.py b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/operations/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/operations/_patch.py +++ b/sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-communication-rooms/tests/conftest.py b/sdk/communication/azure-communication-rooms/tests/conftest.py index c540f610d824..d568f76bf4d1 100644 --- a/sdk/communication/azure-communication-rooms/tests/conftest.py +++ b/sdk/communication/azure-communication-rooms/tests/conftest.py @@ -32,7 +32,7 @@ set_default_session_settings, remove_batch_sanitizers, add_uri_regex_sanitizer, - set_custom_default_matcher + set_custom_default_matcher, ) from azure.communication.rooms._shared.utils import parse_connection_str diff --git a/sdk/communication/azure-communication-rooms/tests/test_rooms_client.py b/sdk/communication/azure-communication-rooms/tests/test_rooms_client.py index 4e629141ade6..7a232b209c8a 100644 --- a/sdk/communication/azure-communication-rooms/tests/test_rooms_client.py +++ b/sdk/communication/azure-communication-rooms/tests/test_rooms_client.py @@ -76,7 +76,7 @@ def test_create_room_no_attributes(self): @recorded_by_proxy def test_create_room_only_participants(self): # add john and chris to room - participants = [self.users["john"], self.users["chris"],self.users["jordan"]] + participants = [self.users["john"], self.users["chris"], self.users["jordan"]] response = self.rooms_client.create_room(participants=participants) # delete created room @@ -306,7 +306,7 @@ def test_update_room_exceed_max_timerange(self): @recorded_by_proxy def test_add_or_update_participants(self): # add john and chris to room - create_participants = [self.users["john"], self.users["chris"],self.users["jordan"]] + create_participants = [self.users["john"], self.users["chris"], self.users["jordan"]] create_response = self.rooms_client.create_room(participants=create_participants) # update join to consumer and add fred to room diff --git a/sdk/communication/azure-communication-rooms/tests/test_rooms_client_async.py b/sdk/communication/azure-communication-rooms/tests/test_rooms_client_async.py index 3f48c1769ba7..d0eff27fbf17 100644 --- a/sdk/communication/azure-communication-rooms/tests/test_rooms_client_async.py +++ b/sdk/communication/azure-communication-rooms/tests/test_rooms_client_async.py @@ -62,7 +62,7 @@ def setup_method(self): ), "jordan": RoomParticipant( communication_identifier=CommunicationUserIdentifier(self.id4), role=ParticipantRole.COLLABORATOR - ) + ), } @recorded_by_proxy_async @@ -75,7 +75,7 @@ async def test_create_room_no_attributes_async(self): @recorded_by_proxy_async async def test_create_room_only_participants_async(self): # add john and chris to room - participants = [self.users["john"], self.users["chris"],self.users["jordan"]] + participants = [self.users["john"], self.users["chris"], self.users["jordan"]] async with self.rooms_client: response = await self.rooms_client.create_room(participants=participants) @@ -300,7 +300,7 @@ async def test_update_room_deleted_room_async(self): @recorded_by_proxy_async async def test_add_or_update_participant_async(self): # add john and chris to room - create_participants = [self.users["john"], self.users["chris"],self.users["jordan"]] + create_participants = [self.users["john"], self.users["chris"], self.users["jordan"]] # update john to consumer, and add fred to room self.users["john"].role = ParticipantRole.CONSUMER update_participants = [self.users["john"], self.users["fred"]] diff --git a/sdk/communication/azure-communication-sms/azure/communication/sms/_sms_client.py b/sdk/communication/azure-communication-sms/azure/communication/sms/_sms_client.py index 974c7c33cef6..76f86cf3d952 100644 --- a/sdk/communication/azure-communication-sms/azure/communication/sms/_sms_client.py +++ b/sdk/communication/azure-communication-sms/azure/communication/sms/_sms_client.py @@ -33,10 +33,10 @@ class SmsClient(object): # pylint: disable=client-accepts-api-version-keyword """ def __init__( - self, - endpoint, # type: str - credential, # type: Union[TokenCredential, AzureKeyCredential] - **kwargs # type: Any + self, + endpoint, # type: str + credential, # type: Union[TokenCredential, AzureKeyCredential] + **kwargs, # type: Any ): # type: (...) -> None try: @@ -56,9 +56,9 @@ def __init__( @classmethod def from_connection_string( - cls, - conn_str, # type: str - **kwargs # type: Any + cls, + conn_str, # type: str + **kwargs, # type: Any ): # type: (...) -> SmsClient """Create SmsClient from a Connection String. @@ -82,14 +82,14 @@ def from_connection_string( @distributed_trace def send( - self, - from_: str, - to: Union[str, List[str]], - message: str, - *, - enable_delivery_report: bool = False, - tag: Optional[str] = None, - **kwargs: Any, + self, + from_: str, + to: Union[str, List[str]], + message: str, + *, + enable_delivery_report: bool = False, + tag: Optional[str] = None, + **kwargs: Any, ) -> List[SmsSendResult]: """Sends SMSs to phone numbers. @@ -119,13 +119,10 @@ def send( ], message=message, sms_send_options=sms_send_options, - **kwargs + **kwargs, ) - response = self._sms_service_client.sms.send( - request, - **kwargs - ) + response = self._sms_service_client.sms.send(request, **kwargs) return [ SmsSendResult( @@ -133,6 +130,7 @@ def send( message_id=item.message_id, http_status_code=item.http_status_code, successful=item.successful, - error_message=item.error_message - ) for item in response.value + error_message=item.error_message, + ) + for item in response.value ] diff --git a/sdk/communication/azure-communication-sms/azure/communication/sms/aio/_sms_client_async.py b/sdk/communication/azure-communication-sms/azure/communication/sms/aio/_sms_client_async.py index e0de9bb445f3..28e5a307338f 100644 --- a/sdk/communication/azure-communication-sms/azure/communication/sms/aio/_sms_client_async.py +++ b/sdk/communication/azure-communication-sms/azure/communication/sms/aio/_sms_client_async.py @@ -118,10 +118,7 @@ async def send( **kwargs, ) - response = await self._sms_service_client.sms.send( - request, - **kwargs - ) + response = await self._sms_service_client.sms.send(request, **kwargs) return [ SmsSendResult( @@ -129,8 +126,9 @@ async def send( message_id=item.message_id, http_status_code=item.http_status_code, successful=item.successful, - error_message=item.error_message - ) for item in response.value + error_message=item.error_message, + ) + for item in response.value ] async def __aenter__(self) -> "SmsClient": diff --git a/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample.py b/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample.py index 17a03977774f..353533d9a0cd 100644 --- a/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample.py +++ b/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample.py @@ -9,7 +9,7 @@ """ FILE: send_sms_to_multiple_recipients_sample.py DESCRIPTION: - This sample demonstrates sending an SMS message to multiple recipients. The SMS client is + This sample demonstrates sending an SMS message to multiple recipients. The SMS client is authenticated using a connection string. USAGE: python send_sms_to_multiple_recipients_sample.py @@ -33,8 +33,9 @@ class SmsMultipleRecipientsSample(object): def send_sms_to_multiple_recipients(self): if not self.connection_string or not self.phone_number: raise ValueError( - '''Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be - set''') + """Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be + set""" + ) sms_client = SmsClient.from_connection_string(self.connection_string) diff --git a/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample_async.py b/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample_async.py index 2dad733ca3b6..d5b784ef887d 100644 --- a/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample_async.py +++ b/sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample_async.py @@ -9,7 +9,7 @@ """ FILE: send_sms_to_multiple_recipients_sample_async.py DESCRIPTION: - This sample demonstrates sending an SMS message to multiple recipients. The SMS client is + This sample demonstrates sending an SMS message to multiple recipients. The SMS client is authenticated using a connection string. USAGE: python send_sms_to_multiple_recipients_sample_async.py @@ -34,8 +34,9 @@ class SmsMultipleRecipientsSampleAsync(object): async def send_sms_to_multiple_recipients_async(self): if not self.connection_string or not self.phone_number: raise ValueError( - '''Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be - set''') + """Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be + set""" + ) sms_client = SmsClient.from_connection_string(self.connection_string) diff --git a/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample.py b/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample.py index 2b1b20580a2a..b30f187b0997 100644 --- a/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample.py +++ b/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample.py @@ -9,7 +9,7 @@ """ FILE: send_sms_to_single_recipient_sample.py DESCRIPTION: - This sample demonstrates sending an SMS message to a single recipient. The SMS client is + This sample demonstrates sending an SMS message to a single recipient. The SMS client is authenticated using a connection string. USAGE: python send_sms_to_single_recipient_sample.py @@ -33,8 +33,9 @@ class SmsSingleRecipientSample(object): def send_sms_to_single_recipient(self): if not self.connection_string or not self.phone_number: raise ValueError( - '''Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be - set''') + """Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be + set""" + ) # [START auth_from_connection_string] sms_client = SmsClient.from_connection_string(self.connection_string) diff --git a/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample_async.py b/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample_async.py index 5ba9656f997c..b6c3965f5698 100644 --- a/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample_async.py +++ b/sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample_async.py @@ -9,7 +9,7 @@ """ FILE: send_sms_to_single_recipient_sample_async.py DESCRIPTION: - This sample demonstrates sending an SMS message to a single recipient. The SMS client is + This sample demonstrates sending an SMS message to a single recipient. The SMS client is authenticated using a connection string. USAGE: python send_sms_to_single_recipient_sample_async.py @@ -34,8 +34,9 @@ class SmsSingleRecipientSampleAsync(object): async def send_sms_to_single_recipient_async(self): if not self.connection_string or not self.phone_number: raise ValueError( - '''Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be - set''') + """Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be + set""" + ) # [START auth_from_connection_string_async] sms_client = SmsClient.from_connection_string(self.connection_string) # [END auth_from_connection_string_async] diff --git a/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample.py b/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample.py index 4865c90efb21..032d68261987 100644 --- a/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample.py +++ b/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample.py @@ -38,8 +38,9 @@ class SmsTokenCredentialAuthSample(object): def sms_token_credential_auth(self): if not self.connection_string or not self.phone_number: raise ValueError( - '''Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be - set''') + """Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be + set""" + ) # To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have # AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables. diff --git a/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample_async.py b/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample_async.py index b97c6595b6d9..3b778bfe76df 100644 --- a/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample_async.py +++ b/sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample_async.py @@ -39,8 +39,9 @@ class SmsTokenCredentialAuthSampleAsync(object): async def sms_token_credential_auth_async(self): if not self.connection_string or not self.phone_number: raise ValueError( - '''Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be - set''') + """Environment variables COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING and SMS_PHONE_NUMBER must be + set""" + ) # To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have # AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables. if self.client_id is not None and self.client_secret is not None and self.tenant_id is not None: diff --git a/sdk/communication/azure-communication-sms/tests/conftest.py b/sdk/communication/azure-communication-sms/tests/conftest.py index 66e23aa52fc4..15b9e40f84d8 100644 --- a/sdk/communication/azure-communication-sms/tests/conftest.py +++ b/sdk/communication/azure-communication-sms/tests/conftest.py @@ -35,7 +35,7 @@ add_body_key_sanitizer, add_oauth_response_sanitizer, add_general_string_sanitizer, - set_custom_default_matcher + set_custom_default_matcher, ) from azure.communication.sms._shared.utils import parse_connection_str diff --git a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/aio/operations/_patch.py b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/aio/operations/_patch.py +++ b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/_patch.py b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/_patch.py +++ b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/operations/_patch.py b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/operations/_patch.py +++ b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_patch.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_patch.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_patch.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_patch.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_patch.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_patch.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_patch.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_patch.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_patch.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_patch.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_patch.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_patch.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_patch.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_patch.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/operations/_patch.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/operations/_patch.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models/_patch.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models/_patch.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/operations/_patch.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/operations/_patch.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-compute/tests/disable_test_mgmt_compute_base_async.py b/sdk/compute/azure-mgmt-compute/tests/disable_test_mgmt_compute_base_async.py index c8aa026a8b42..e817d3787f55 100644 --- a/sdk/compute/azure-mgmt-compute/tests/disable_test_mgmt_compute_base_async.py +++ b/sdk/compute/azure-mgmt-compute/tests/disable_test_mgmt_compute_base_async.py @@ -12,7 +12,6 @@ from _aio_testcase import AzureMgmtAsyncTestCase - AZURE_LOCATION = "eastus" diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/operations/_patch.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/operations/_patch.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_patch.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_patch.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_patch.py b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_patch.py +++ b/sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-imagebuilder/setup.py b/sdk/compute/azure-mgmt-imagebuilder/setup.py index 7237eadf21a9..3c4f2c2ac44e 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/setup.py +++ b/sdk/compute/azure-mgmt-imagebuilder/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/compute/azure-mgmt-imagebuilder/tests/conftest.py b/sdk/compute/azure-mgmt-imagebuilder/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/tests/conftest.py +++ b/sdk/compute/azure-mgmt-imagebuilder/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/compute/azure-mgmt-imagebuilder/tests/disable_test_cli_mgmt_imagebuilder.py b/sdk/compute/azure-mgmt-imagebuilder/tests/disable_test_cli_mgmt_imagebuilder.py index 31956a53dc19..f342bbea4a34 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/tests/disable_test_cli_mgmt_imagebuilder.py +++ b/sdk/compute/azure-mgmt-imagebuilder/tests/disable_test_cli_mgmt_imagebuilder.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,66 +21,76 @@ import azure.mgmt.imagebuilder from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" IMAGE_TEMPLATE_NAME = "MyImageTemplate" -IMAGE_NAME = 'MyImage' -RUN_OUTPUT_NAME = 'image_it_pir_1' +IMAGE_NAME = "MyImage" +RUN_OUTPUT_NAME = "image_it_pir_1" # make sure to create user identity with this doc before running live test: https://github.com/danielsollondon/azvmimagebuilder/tree/master/quickquickstarts/0_Creating_a_Custom_Windows_Managed_Image#step-2--permissions-create-user-idenity-and-role-for-aib -IDENTITY_NAME = 'aibIdentity1588309486' +IDENTITY_NAME = "aibIdentity1588309486" + class MgmtImageBuilderClientTest(AzureMgmtTestCase): def setUp(self): super(MgmtImageBuilderClientTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.imagebuilder.ImageBuilderClient - ) - - @unittest.skip('hard to test') + self.mgmt_client = self.create_mgmt_client(azure.mgmt.imagebuilder.ImageBuilderClient) + + @unittest.skip("hard to test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_imagebuilder(self, resource_group): # Create an Image Template with a user assigned identity configured[put] BODY = { - "location": "eastus", - "tags": { - "imagetemplate_tag1": "IT_T1", - "imagetemplate_tag2": "IT_T2" - }, - "identity": { - "type": "UserAssigned", - "user_assigned_identities": { "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{}".format(self.settings.SUBSCRIPTION_ID, resource_group.name, IDENTITY_NAME): {}} - }, - "properties": { - "source": { - "type": "ManagedImage", - "image_id": "/subscriptions/" + self.settings.SUBSCRIPTION_ID + "/resourceGroups/" + resource_group.name + "/providers/Microsoft.Compute/images/" + IMAGE_NAME + "" + "location": "eastus", + "tags": {"imagetemplate_tag1": "IT_T1", "imagetemplate_tag2": "IT_T2"}, + "identity": { + "type": "UserAssigned", + "user_assigned_identities": { + "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{}".format( + self.settings.SUBSCRIPTION_ID, resource_group.name, IDENTITY_NAME + ): {} + }, + }, + "properties": { + "source": { + "type": "ManagedImage", + "image_id": "/subscriptions/" + + self.settings.SUBSCRIPTION_ID + + "/resourceGroups/" + + resource_group.name + + "/providers/Microsoft.Compute/images/" + + IMAGE_NAME + + "", + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "script_uri": "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/619a017566f2bdb2d9a85afd1fe2018bed822cc8/sdk/compute/azure-mgmt-imagebuilder/tests/script.sh", + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "eastus", + "run_output_name": "image_it_pir_1", + "image_id": "/subscriptions/" + + self.settings.SUBSCRIPTION_ID + + "/resourceGroups/" + + resource_group.name + + "/providers/Microsoft.Compute/images/" + + IMAGE_NAME + + "", + "artifact_tags": {"tag_name": "value"}, + } + ], + "vm_profile": {"vm_size": "Standard_D2s_v3"}, }, - "customize": [ - { - "type": "Shell", - "name": "Shell Customizer Example", - "script_uri": "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/619a017566f2bdb2d9a85afd1fe2018bed822cc8/sdk/compute/azure-mgmt-imagebuilder/tests/script.sh" - } - ], - "distribute": [ - { - "type": "ManagedImage", - "location": "eastus", - "run_output_name": "image_it_pir_1", - "image_id": "/subscriptions/" + self.settings.SUBSCRIPTION_ID + "/resourceGroups/" + resource_group.name + "/providers/Microsoft.Compute/images/" + IMAGE_NAME + "", - "artifact_tags": { - "tag_name": "value" - } - } - ], - "vm_profile": { - "vm_size": "Standard_D2s_v3" - } - } } - result = self.mgmt_client.virtual_machine_image_templates.create_or_update(BODY, resource_group.name, IMAGE_TEMPLATE_NAME) + result = self.mgmt_client.virtual_machine_image_templates.create_or_update( + BODY, resource_group.name, IMAGE_TEMPLATE_NAME + ) result = result.result() # Retrieve an Image Template.[get] @@ -97,34 +107,30 @@ def test_imagebuilder(self, resource_group): result = result.result() # Retrieve single runOutput[get] - result = self.mgmt_client.virtual_machine_image_templates.get_run_output(resource_group.name, IMAGE_TEMPLATE_NAME, RUN_OUTPUT_NAME) + result = self.mgmt_client.virtual_machine_image_templates.get_run_output( + resource_group.name, IMAGE_TEMPLATE_NAME, RUN_OUTPUT_NAME + ) # Retrieve a list of all outputs created by the last run of an Image Template[get] - result = self.mgmt_client.virtual_machine_image_templates.list_run_outputs(resource_group.name, IMAGE_TEMPLATE_NAME) + result = self.mgmt_client.virtual_machine_image_templates.list_run_outputs( + resource_group.name, IMAGE_TEMPLATE_NAME + ) # Remove identities for an Image Template.[patch] - BODY = { - "identity": { - "type": "None" - } - } - #result = self.mgmt_client.virtual_machine_image_templates.update(resource_group.name, IMAGE_TEMPLATE_NAME, BODY) - #result = result.result() + BODY = {"identity": {"type": "None"}} + # result = self.mgmt_client.virtual_machine_image_templates.update(resource_group.name, IMAGE_TEMPLATE_NAME, BODY) + # result = result.result() # Update the tags for an Image Template.[patch] - BODY = { - "tags": { - "new-tag": "new-value" - } - } - #result = self.mgmt_client.virtual_machine_image_templates.update(resource_group.name, IMAGE_TEMPLATE_NAME, BODY) - #result = result.result() + BODY = {"tags": {"new-tag": "new-value"}} + # result = self.mgmt_client.virtual_machine_image_templates.update(resource_group.name, IMAGE_TEMPLATE_NAME, BODY) + # result = result.result() # Delete an Image Template.[delete] result = self.mgmt_client.virtual_machine_image_templates.delete(resource_group.name, IMAGE_TEMPLATE_NAME) result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() \ No newline at end of file +# ------------------------------------------------------------------------------ +if __name__ == "__main__": + unittest.main() diff --git a/sdk/compute/azure-mgmt-imagebuilder/tests/test_cli_mgmt_imagebuilder.py b/sdk/compute/azure-mgmt-imagebuilder/tests/test_cli_mgmt_imagebuilder.py index de2602490446..4a0974cd5e5b 100644 --- a/sdk/compute/azure-mgmt-imagebuilder/tests/test_cli_mgmt_imagebuilder.py +++ b/sdk/compute/azure-mgmt-imagebuilder/tests/test_cli_mgmt_imagebuilder.py @@ -1,14 +1,15 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.imagebuilder import ImageBuilderClient from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy + class TestMgmtImageBuilder(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_patch.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_patch.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/_patch.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/_patch.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/operations/_patch.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/operations/_patch.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_patch.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_patch.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_patch.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_patch.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py index a10ef2f05df7..1ce198c7d10d 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "VMWare Cloud Simple Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/_patch.py b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/_patch.py +++ b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/_patch.py b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/_patch.py +++ b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/operations/_patch.py b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/operations/_patch.py +++ b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/models/_patch.py b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/models/_patch.py +++ b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/operations/_patch.py b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/operations/_patch.py +++ b/sdk/computebulkactions/azure-mgmt-computebulkactions/azure/mgmt/computebulkactions/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py +++ b/sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computefleet/azure-mgmt-computefleet/setup.py b/sdk/computefleet/azure-mgmt-computefleet/setup.py index 1e39570735f1..89ae5315e6a5 100644 --- a/sdk/computefleet/azure-mgmt-computefleet/setup.py +++ b/sdk/computefleet/azure-mgmt-computefleet/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/_patch.py b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/_patch.py +++ b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/_patch.py b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/_patch.py +++ b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/operations/_patch.py b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/operations/_patch.py +++ b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/models/_patch.py b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/models/_patch.py +++ b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/operations/_patch.py b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/operations/_patch.py +++ b/sdk/computelimit/azure-mgmt-computelimit/azure/mgmt/computelimit/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/_patch.py b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/_patch.py +++ b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/_patch.py b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/_patch.py +++ b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/operations/_patch.py b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/operations/_patch.py +++ b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/models/_patch.py b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/models/_patch.py +++ b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/operations/_patch.py b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/operations/_patch.py +++ b/sdk/computerecommender/azure-mgmt-computerecommender/azure/mgmt/computerecommender/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computerecommender/azure-mgmt-computerecommender/setup.py b/sdk/computerecommender/azure-mgmt-computerecommender/setup.py index f7c776d1dba7..65e1a75e7900 100644 --- a/sdk/computerecommender/azure-mgmt-computerecommender/setup.py +++ b/sdk/computerecommender/azure-mgmt-computerecommender/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/setup.py b/sdk/computeschedule/azure-mgmt-computeschedule/setup.py index 9272fb177345..09e4594c180b 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/setup.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_operations/_patch.py b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_operations/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_patch.py b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_operations/_patch.py b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_operations/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_patch.py b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/models/_patch.py b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/models/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/azure/confidentialledger/certificate/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate.py b/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate.py index 12104d160325..93cc80d8afff 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate.py @@ -24,7 +24,6 @@ ConfidentialLedgerCertificateClient, ) - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate_async.py b/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate_async.py index 93de2501170d..b2a645d1829f 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate_async.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/samples/get_certificate_async.py @@ -25,7 +25,6 @@ ConfidentialLedgerCertificateClient, ) - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger-certificate/tests/_shared/testcase.py b/sdk/confidentialledger/azure-confidentialledger-certificate/tests/_shared/testcase.py index 8291d327fa70..1d80f1e48196 100644 --- a/sdk/confidentialledger/azure-confidentialledger-certificate/tests/_shared/testcase.py +++ b/sdk/confidentialledger/azure-confidentialledger-certificate/tests/_shared/testcase.py @@ -16,7 +16,6 @@ from .constants import USER_CERTIFICATE - ConfidentialLedgerPreparer = functools.partial( EnvironmentVariableLoader, "confidentialledger", diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py index 92370f080501..8ea20939d96a 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py @@ -56,9 +56,11 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential # on service-managed redirects. Confidential Ledger redirects are expected to stay within # the same trusted ledger endpoint, so forwarding these sensitive headers is required # for correct authentication behavior. - policies.SensitiveHeaderCleanupPolicy( - disable_redirect_cleanup=True, **kwargs - ) if self._config.redirect_policy else None, + ( + policies.SensitiveHeaderCleanupPolicy(disable_redirect_cleanup=True, **kwargs) + if self._config.redirect_policy + else None + ), self._config.http_logging_policy, ] self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py index 59473e6e901b..c8489d4ffbf8 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import os from typing import Any, List, Union @@ -14,7 +15,9 @@ from azure.core.pipeline import policies from azure.confidentialledger._client import ConfidentialLedgerClient as GeneratedClient -from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient # pylint: disable=import-error,no-name-in-module +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) # pylint: disable=import-error,no-name-in-module __all__: List[str] = [ "ConfidentialLedgerCertificateCredential", diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py index 7f49efc68499..eb083646f03e 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py @@ -52,9 +52,11 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._config.custom_hook_policy, self._config.logging_policy, policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy( - disable_redirect_cleanup=True, **kwargs - ) if self._config.redirect_policy else None, + ( + policies.SensitiveHeaderCleanupPolicy(disable_redirect_cleanup=True, **kwargs) + if self._config.redirect_policy + else None + ), self._config.http_logging_policy, ] self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py index 0f494322eb1d..95a5e958afe1 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import os from typing import Any, List, Union @@ -20,7 +21,9 @@ # Since we can't `await` in __init__, use the sync client for the Identity Service. -from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient # pylint: disable=import-error,no-name-in-module +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) # pylint: disable=import-error,no-name-in-module from azure.confidentialledger._patch import ConfidentialLedgerCertificateCredential __all__: List[str] = [ diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/models/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/models/_patch.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/get_and_verify_receipt.py b/sdk/confidentialledger/azure-confidentialledger/samples/get_and_verify_receipt.py index 761aaa9918e6..5db96ab0942a 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/get_and_verify_receipt.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/get_and_verify_receipt.py @@ -32,7 +32,6 @@ from azure.core.exceptions import HttpResponseError from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py index 0286e3014868..d8ef725e830f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py @@ -8,7 +8,7 @@ FILE: get_receipt.py DESCRIPTION: This sample demonstrates how to retrieve Confidential Ledger receipts. In this sample, we write - a ledger entry and retrieve a receipt certifying that it was written correctly. + a ledger entry and retrieve a receipt certifying that it was written correctly. USAGE: python get_receipt.py Set the environment variables with your own values before running the sample: @@ -27,7 +27,6 @@ from azure.core.exceptions import HttpResponseError from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py index c724831af523..d9bbb7b6b774 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py @@ -9,7 +9,7 @@ FILE: get_receipt_async.py DESCRIPTION: This sample demonstrates how to retrieve Confidential Ledger receipts. In this sample, we write - a ledger entry and retrieve a receipt certifying that it was written correctly. + a ledger entry and retrieve a receipt certifying that it was written correctly. USAGE: python get_receipt_async.py Set the environment variables with your own values before running the sample: @@ -29,7 +29,6 @@ from azure.core.exceptions import HttpResponseError from azure.identity.aio import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py index 23f9474914b4..47be0ce62d62 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py @@ -27,7 +27,6 @@ ) from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py index b921dbd7aeab..979f346aa51f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py @@ -28,7 +28,6 @@ ) from azure.identity.aio import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py index 221ecdfd7444..4177e3d3913a 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py @@ -28,7 +28,6 @@ ) from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py index 888fbb733478..002be9ea085f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py @@ -28,7 +28,6 @@ ) from azure.identity.aio import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py index f511543a0902..8eaabe547c3a 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py @@ -28,7 +28,6 @@ ) from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py index bd4c76da5594..424037a50d25 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py @@ -29,7 +29,6 @@ ) from azure.identity.aio import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/use_tags.py b/sdk/confidentialledger/azure-confidentialledger/samples/use_tags.py index 951f31e595a3..a12232b3ec38 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/use_tags.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/use_tags.py @@ -28,7 +28,6 @@ ) from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py index 45380be4426c..c82b9bb271be 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py @@ -27,7 +27,6 @@ ) from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py index f585450b2623..643a0427f615 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py @@ -28,7 +28,6 @@ ) from azure.identity.aio import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py index 44d055c4d7b0..c4d7c5bae34f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py @@ -27,7 +27,6 @@ from azure.core.exceptions import HttpResponseError from azure.identity import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py index 8f52c68d58a0..f3c0444bfa2d 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py @@ -29,7 +29,6 @@ from azure.core.exceptions import HttpResponseError from azure.identity.aio import DefaultAzureCredential - logging.basicConfig(level=logging.ERROR) LOG = logging.getLogger() diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py index 8291d327fa70..1d80f1e48196 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py +++ b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py @@ -16,7 +16,6 @@ from .constants import USER_CERTIFICATE - ConfidentialLedgerPreparer = functools.partial( EnvironmentVariableLoader, "confidentialledger", diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_client_configuration.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_client_configuration.py index 47459e6733dd..5766def0eb6c 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_client_configuration.py +++ b/sdk/confidentialledger/azure-confidentialledger/tests/test_client_configuration.py @@ -28,9 +28,7 @@ def test_sensitive_header_cleanup_policy_disable_redirect_cleanup_enabled(self): # Create the generated client directly - this will trigger policy creation # The generated client only requires ledger_endpoint - client = GeneratedClient( - ledger_endpoint="https://test-ledger.confidentialledger.azure.com" - ) + client = GeneratedClient(ledger_endpoint="https://test-ledger.confidentialledger.azure.com") # Get the policies argument passed to PipelineClient call_args = mock_pipeline_client.call_args @@ -44,9 +42,9 @@ def test_sensitive_header_cleanup_policy_disable_redirect_cleanup_enabled(self): break # Assert the policy exists and has disable_redirect_cleanup=True - assert sensitive_header_policy is not None, ( - "SensitiveHeaderCleanupPolicy should be present in the client's policies" - ) + assert ( + sensitive_header_policy is not None + ), "SensitiveHeaderCleanupPolicy should be present in the client's policies" assert sensitive_header_policy._disable_redirect_cleanup is True, ( "SensitiveHeaderCleanupPolicy should have disable_redirect_cleanup=True " "to preserve authentication headers on Confidential Ledger redirects" @@ -63,9 +61,7 @@ def test_sensitive_header_cleanup_policy_is_in_correct_position(self): with patch("azure.confidentialledger._client.PipelineClient") as mock_pipeline_client: mock_pipeline_client.return_value = MagicMock() - client = GeneratedClient( - ledger_endpoint="https://test-ledger.confidentialledger.azure.com" - ) + client = GeneratedClient(ledger_endpoint="https://test-ledger.confidentialledger.azure.com") # Get the policies argument passed to PipelineClient call_args = mock_pipeline_client.call_args @@ -85,14 +81,10 @@ def test_sensitive_header_cleanup_policy_is_in_correct_position(self): distributed_tracing_idx = idx # SensitiveHeaderCleanupPolicy should come after DistributedTracingPolicy - assert sensitive_header_idx is not None, ( - "SensitiveHeaderCleanupPolicy should be present in the policies" - ) - assert distributed_tracing_idx is not None, ( - "DistributedTracingPolicy should be present in the policies" - ) - assert sensitive_header_idx > distributed_tracing_idx, ( - "SensitiveHeaderCleanupPolicy should be positioned after DistributedTracingPolicy" - ) + assert sensitive_header_idx is not None, "SensitiveHeaderCleanupPolicy should be present in the policies" + assert distributed_tracing_idx is not None, "DistributedTracingPolicy should be present in the policies" + assert ( + sensitive_header_idx > distributed_tracing_idx + ), "SensitiveHeaderCleanupPolicy should be positioned after DistributedTracingPolicy" client.close() diff --git a/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/aio/operations/_patch.py b/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/aio/operations/_patch.py +++ b/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/models/_patch.py b/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/models/_patch.py +++ b/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/operations/_patch.py b/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/operations/_patch.py +++ b/sdk/confidentialledger/azure-mgmt-confidentialledger/azure/mgmt/confidentialledger/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confidentialledger/azure-mgmt-confidentialledger/setup.py b/sdk/confidentialledger/azure-mgmt-confidentialledger/setup.py index 120c77112c08..69eb8133e299 100644 --- a/sdk/confidentialledger/azure-mgmt-confidentialledger/setup.py +++ b/sdk/confidentialledger/azure-mgmt-confidentialledger/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_patch.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_patch.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_patch.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_patch.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_patch.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_patch.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_patch.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_patch.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_patch.py b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_patch.py +++ b/sdk/confluent/azure-mgmt-confluent/azure/mgmt/confluent/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/confluent/azure-mgmt-confluent/setup.py b/sdk/confluent/azure-mgmt-confluent/setup.py index eebb6460f9a3..215d38735ddf 100644 --- a/sdk/confluent/azure-mgmt-confluent/setup.py +++ b/sdk/confluent/azure-mgmt-confluent/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/confluent/azure-mgmt-confluent/tests/conftest.py b/sdk/confluent/azure-mgmt-confluent/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/confluent/azure-mgmt-confluent/tests/conftest.py +++ b/sdk/confluent/azure-mgmt-confluent/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/confluent/azure-mgmt-confluent/tests/test_cli_mgmt_confluent.py b/sdk/confluent/azure-mgmt-confluent/tests/test_cli_mgmt_confluent.py index 635a5ffa466b..e21bb33aa526 100644 --- a/sdk/confluent/azure-mgmt-confluent/tests/test_cli_mgmt_confluent.py +++ b/sdk/confluent/azure-mgmt-confluent/tests/test_cli_mgmt_confluent.py @@ -1,14 +1,15 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.confluent import ConfluentManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy + class TestMgmtConfluent(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -17,4 +18,4 @@ def setup_method(self, method): @ResourceGroupPreparer() @recorded_by_proxy def test_list_by_resource_group(self, resource_group): - assert list(self.client.organization.list_by_resource_group(resource_group.name)) == [] \ No newline at end of file + assert list(self.client.organization.list_by_resource_group(resource_group.name)) == [] diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py +++ b/sdk/connectedcache/azure-mgmt-connectedcache/azure/mgmt/connectedcache/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/_patch.py b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/_patch.py +++ b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/_patch.py b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/_patch.py +++ b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/operations/_patch.py b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/operations/_patch.py +++ b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/models/_patch.py b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/models/_patch.py +++ b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/operations/_patch.py b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/operations/_patch.py +++ b/sdk/connectedvmware/azure-mgmt-connectedvmware/azure/mgmt/connectedvmware/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/connectedvmware/azure-mgmt-connectedvmware/setup.py b/sdk/connectedvmware/azure-mgmt-connectedvmware/setup.py index 3561c4525f85..69ac52a1b71f 100644 --- a/sdk/connectedvmware/azure-mgmt-connectedvmware/setup.py +++ b/sdk/connectedvmware/azure-mgmt-connectedvmware/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_patch.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_patch.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_patch.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_patch.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_patch.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_patch.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_patch.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_patch.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_patch.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_patch.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/consumption/azure-mgmt-consumption/setup.py b/sdk/consumption/azure-mgmt-consumption/setup.py index 58c2d0310b71..d1b183cf300c 100644 --- a/sdk/consumption/azure-mgmt-consumption/setup.py +++ b/sdk/consumption/azure-mgmt-consumption/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Consumption" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/consumption/azure-mgmt-consumption/tests/conftest.py b/sdk/consumption/azure-mgmt-consumption/tests/conftest.py index e7981d635f56..8c0bebb9a45c 100644 --- a/sdk/consumption/azure-mgmt-consumption/tests/conftest.py +++ b/sdk/consumption/azure-mgmt-consumption/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -52,4 +53,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/consumption/azure-mgmt-consumption/tests/test_budgets.py b/sdk/consumption/azure-mgmt-consumption/tests/test_budgets.py index c9eb5e1ca150..7d2ba286eccb 100644 --- a/sdk/consumption/azure-mgmt-consumption/tests/test_budgets.py +++ b/sdk/consumption/azure-mgmt-consumption/tests/test_budgets.py @@ -16,27 +16,22 @@ class TestMgmtConsumption(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.consumption_client = self.create_mgmt_client( - azure.mgmt.consumption.ConsumptionManagementClient - ) + self.consumption_client = self.create_mgmt_client(azure.mgmt.consumption.ConsumptionManagementClient) @ResourceGroupPreparer() @recorded_by_proxy def test_budgets(self, resource_group): - SUBSCRIPTION_ID = self.get_settings_value('SUBSCRIPTION_ID') - SCOPE = '/subscriptions/{}/resourceGroups/{}'.format(SUBSCRIPTION_ID, resource_group.name) - BUDGET_NAME = self.get_resource_name('budget') + SUBSCRIPTION_ID = self.get_settings_value("SUBSCRIPTION_ID") + SCOPE = "/subscriptions/{}/resourceGroups/{}".format(SUBSCRIPTION_ID, resource_group.name) + BUDGET_NAME = self.get_resource_name("budget") start_date = "2022-12-01T00:00:00.000Z" - end_date = "2023-06-01T00:00:00.000Z" + end_date = "2023-06-01T00:00:00.000Z" # create BODY = { "category": "Cost", - "amount": '100', + "amount": "100", "timeGrain": "Monthly", - "timePeriod": { - "startDate": start_date, - "endDate": end_date - } + "timePeriod": {"startDate": start_date, "endDate": end_date}, } self.consumption_client.budgets.create_or_update(SCOPE, BUDGET_NAME, BODY) @@ -48,5 +43,5 @@ def test_budgets(self, resource_group): # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/consumption/azure-mgmt-consumption/tests/test_mgmt_consumption.py b/sdk/consumption/azure-mgmt-consumption/tests/test_mgmt_consumption.py index 2cf2bee69f99..99a375ca295f 100644 --- a/sdk/consumption/azure-mgmt-consumption/tests/test_mgmt_consumption.py +++ b/sdk/consumption/azure-mgmt-consumption/tests/test_mgmt_consumption.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import datetime import unittest @@ -12,21 +12,22 @@ import azure.mgmt.consumption.models from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy -raise unittest.SkipTest("These were written by Consumption service team for 2.0.0 and would need adaption, and are disabled for now.") +raise unittest.SkipTest( + "These were written by Consumption service team for 2.0.0 and would need adaption, and are disabled for now." +) + class TestMgmtConsumption(AzureMgmtRecordedTestCase): - reservationOrderId = 'ca69259e-bd4f-45c3-bf28-3f353f9cce9b' - reservationId = 'f37f4b70-52ba-4344-a8bd-28abfd21d640' - billingPeriodName = '201710' - startDate = '2018-02-01T00:00:00Z' - endDate = '2018-02-28T00:00:00Z' + reservationOrderId = "ca69259e-bd4f-45c3-bf28-3f353f9cce9b" + reservationId = "f37f4b70-52ba-4344-a8bd-28abfd21d640" + billingPeriodName = "201710" + startDate = "2018-02-01T00:00:00Z" + endDate = "2018-02-28T00:00:00Z" models = azure.mgmt.consumption.models def setup_method(self, method): - self.consumption_client = self.create_mgmt_client( - azure.mgmt.consumption.ConsumptionManagementClient - ) + self.consumption_client = self.create_mgmt_client(azure.mgmt.consumption.ConsumptionManagementClient) def _validate_usage(self, usage, include_meter_details=False, include_additional_properties=False): assert usage is not None @@ -126,8 +127,8 @@ def test_consumption_subscription_usage(self): @recorded_by_proxy def test_consumption_subscription_usage_filter(self): - date_filter ='usageEnd le '+ str(MgmtConsumptionTest.endDate) - pages = self.consumption_client.usage_details.list(expand='meterDetails', filter=date_filter, top=10) + date_filter = "usageEnd le " + str(MgmtConsumptionTest.endDate) + pages = self.consumption_client.usage_details.list(expand="meterDetails", filter=date_filter, top=10) first_page = pages.advance_page() output = list(first_page) assert 10 == len(output) @@ -135,95 +136,167 @@ def test_consumption_subscription_usage_filter(self): @recorded_by_proxy def test_consumption_billing_period_usage(self): - output = list(self.consumption_client.usage_details.list(expand='properties/additionalProperties')) + output = list(self.consumption_client.usage_details.list(expand="properties/additionalProperties")) self._validate_usage(output[0], include_additional_properties=True) @recorded_by_proxy def test_consumption_billing_period_usage_filter(self): - output = list(self.consumption_client.usage_details.list_by_billing_period(billing_period_name=MgmtConsumptionTest.billingPeriodName, expand='properties/meterDetails,properties/additionalProperties', filter='usageEnd eq 2017-10-26T23:59:59Z')) + output = list( + self.consumption_client.usage_details.list_by_billing_period( + billing_period_name=MgmtConsumptionTest.billingPeriodName, + expand="properties/meterDetails,properties/additionalProperties", + filter="usageEnd eq 2017-10-26T23:59:59Z", + ) + ) self._validate_usage(output[0], include_meter_details=True, include_additional_properties=True) @recorded_by_proxy def test_consumption_reservations_summaries_monthly(self): - output = list(self.consumption_client.reservations_summaries.list_by_reservation_order(reservation_order_id=MgmtConsumptionTest.reservationOrderId, grain="monthly")) + output = list( + self.consumption_client.reservations_summaries.list_by_reservation_order( + reservation_order_id=MgmtConsumptionTest.reservationOrderId, grain="monthly" + ) + ) self._validate_reservations_summaries(output[0]) @recorded_by_proxy def test_consumption_reservations_summaries_monthly_withreservationid(self): - output = list(self.consumption_client.reservations_summaries.list_by_reservation_order_and_reservation(reservation_order_id=MgmtConsumptionTest.reservationOrderId, reservation_id=MgmtConsumptionTest.reservationId, grain="monthly")) + output = list( + self.consumption_client.reservations_summaries.list_by_reservation_order_and_reservation( + reservation_order_id=MgmtConsumptionTest.reservationOrderId, + reservation_id=MgmtConsumptionTest.reservationId, + grain="monthly", + ) + ) self._validate_reservations_summaries(output[0]) @recorded_by_proxy def test_consumption_reservations_summaries_daily(self): - output = list(self.consumption_client.reservations_summaries.list_by_reservation_order(reservation_order_id=MgmtConsumptionTest.reservationOrderId, grain="daily", filter='properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-07')) + output = list( + self.consumption_client.reservations_summaries.list_by_reservation_order( + reservation_order_id=MgmtConsumptionTest.reservationOrderId, + grain="daily", + filter="properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-07", + ) + ) self._validate_reservations_summaries(output[0]) @recorded_by_proxy def test_consumption_reservation_summaries_daily_withreservationid(self): - output = list(self.consumption_client.reservations_summaries.list_by_reservation_order_and_reservation(reservation_order_id=MgmtConsumptionTest.reservationOrderId, reservation_id=MgmtConsumptionTest.reservationId, grain="daily", filter='properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-07')) + output = list( + self.consumption_client.reservations_summaries.list_by_reservation_order_and_reservation( + reservation_order_id=MgmtConsumptionTest.reservationOrderId, + reservation_id=MgmtConsumptionTest.reservationId, + grain="daily", + filter="properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-07", + ) + ) self._validate_reservations_summaries(output[0]) @recorded_by_proxy def test_consumption_reservations_details(self): - output = list(self.consumption_client.reservations_details.list_by_reservation_order(reservation_order_id=MgmtConsumptionTest.reservationOrderId, filter='properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-08')) + output = list( + self.consumption_client.reservations_details.list_by_reservation_order( + reservation_order_id=MgmtConsumptionTest.reservationOrderId, + filter="properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-08", + ) + ) self._validate_reservations_details(output[0]) @recorded_by_proxy def test_consumption_reservations_details_withreservationid(self): - output = list(self.consumption_client.reservations_details.list_by_reservation_order_and_reservation(reservation_order_id=MgmtConsumptionTest.reservationOrderId, reservation_id=MgmtConsumptionTest.reservationId, filter='properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-08')) + output = list( + self.consumption_client.reservations_details.list_by_reservation_order_and_reservation( + reservation_order_id=MgmtConsumptionTest.reservationOrderId, + reservation_id=MgmtConsumptionTest.reservationId, + filter="properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-08", + ) + ) self._validate_reservations_details(output[0]) @recorded_by_proxy def test_consumption_budget_get_by_resource_group(self): - budget = self.consumption_client.budgets.get(resource_groups='testscaleset', budget_name='PythonSDKTestBudgetCost8') + budget = self.consumption_client.budgets.get( + resource_groups="testscaleset", budget_name="PythonSDKTestBudgetCost8" + ) self._validate_budget(budget) @recorded_by_proxy def test_consumption_budget_update_By_resourceGroup(self): - budget = self.consumption_client.budgets.get(resource_groups='testscaleset', budget_name='PythonSDKTestBudgetCost8') + budget = self.consumption_client.budgets.get( + resource_groups="testscaleset", budget_name="PythonSDKTestBudgetCost8" + ) budget.amount = 90.0 - budget.time_period = self.models.BudgetTimePeriod(start_date=budget.time_period.start_date, end_date=MgmtConsumptionTest.endDate) - output = self.consumption_client.budgets.create_or_update_by_resource_group_name(resource_group_name='testscaleset', budget_name='PythonSDKTestBudgetCost8', parameters=budget) - assert 'PythonSDKTestBudgetCost8' == output.name + budget.time_period = self.models.BudgetTimePeriod( + start_date=budget.time_period.start_date, end_date=MgmtConsumptionTest.endDate + ) + output = self.consumption_client.budgets.create_or_update_by_resource_group_name( + resource_group_name="testscaleset", budget_name="PythonSDKTestBudgetCost8", parameters=budget + ) + assert "PythonSDKTestBudgetCost8" == output.name assert 90.0 == output.amount @recorded_by_proxy def test_consumption_budget_delete_by_budget_resource_group_name(self): - budget = self.consumption_client.budgets.get(resource_groups='testscaleset', budget_name='PythonSDKTestBudgetCost8') + budget = self.consumption_client.budgets.get( + resource_groups="testscaleset", budget_name="PythonSDKTestBudgetCost8" + ) self._validate_budget(budget) - self.consumption_client.budgets.delete_by_resource_group_name(resource_group_name='testscaleset', budget_name=budget.name) + self.consumption_client.budgets.delete_by_resource_group_name( + resource_group_name="testscaleset", budget_name=budget.name + ) @recorded_by_proxy def test_consumption_budget_delete_by_budgetname(self): - budget = self.consumption_client.budgets.get(budget_name='PythonSDKTestBudgetCost') + budget = self.consumption_client.budgets.get(budget_name="PythonSDKTestBudgetCost") self._validate_budget(budget) self.consumption_client.budgets.delete(budget_name=budget.name) @recorded_by_proxy def test_consumption_budget_create(self): - budget = self.models.Budget(category=self.models.CategoryType.cost, amount=60.0, time_grain=self.models.TimeGrainType.monthly, time_period=self.models.BudgetTimePeriod(start_date=MgmtConsumptionTest.startDate, end_date=MgmtConsumptionTest.endDate)) - output = self.consumption_client.budgets.create_or_update(resource_group_name='testResource1', budget_name='PythonSDKTestBudgetCost', parameters=budget) - assert 'PythonSDKTestBudgetCost' == output.name + budget = self.models.Budget( + category=self.models.CategoryType.cost, + amount=60.0, + time_grain=self.models.TimeGrainType.monthly, + time_period=self.models.BudgetTimePeriod( + start_date=MgmtConsumptionTest.startDate, end_date=MgmtConsumptionTest.endDate + ), + ) + output = self.consumption_client.budgets.create_or_update( + resource_group_name="testResource1", budget_name="PythonSDKTestBudgetCost", parameters=budget + ) + assert "PythonSDKTestBudgetCost" == output.name @recorded_by_proxy def test_consumption_budget_get_by_budget_name(self): - budget = self.consumption_client.budgets.get(budget_name='PythonSDKTestBudgetCost8') + budget = self.consumption_client.budgets.get(budget_name="PythonSDKTestBudgetCost8") self._validate_budget(budget) @recorded_by_proxy def test_consumption_budget_update_and_get(self): - budget = self.consumption_client.budgets.get(budget_name='PythonSDKTestBudgetCost1') + budget = self.consumption_client.budgets.get(budget_name="PythonSDKTestBudgetCost1") budget.amount = 80.0 - budget.time_period = self.models.BudgetTimePeriod(start_date=budget.time_period.start_date, end_date=MgmtConsumptionTest.endDate) - self.consumption_client.budgets.create_or_update(budget_name='PythonSDKTestBudgetCost1', parameters=budget) - budget = self.consumption_client.budgets.get(budget_name='PythonSDKTestBudgetCost1') + budget.time_period = self.models.BudgetTimePeriod( + start_date=budget.time_period.start_date, end_date=MgmtConsumptionTest.endDate + ) + self.consumption_client.budgets.create_or_update(budget_name="PythonSDKTestBudgetCost1", parameters=budget) + budget = self.consumption_client.budgets.get(budget_name="PythonSDKTestBudgetCost1") self._validate_budget(budget) @recorded_by_proxy def test_consumption_budget_list(self): - budget = self.models.Budget(category=self.models.CategoryType.cost, amount=60.0, time_grain=self.models.TimeGrainType.monthly, time_period=self.models.BudgetTimePeriod(start_date=MgmtConsumptionTest.startDate, end_date=MgmtConsumptionTest.endDate)) - output = self.consumption_client.budgets.create_or_update(budget_name='PythonSDKTestBudgetCostCreateAndDelete', parameters=budget) - assert 'PythonSDKTestBudgetCostCreateAndDelete' == output.name + budget = self.models.Budget( + category=self.models.CategoryType.cost, + amount=60.0, + time_grain=self.models.TimeGrainType.monthly, + time_period=self.models.BudgetTimePeriod( + start_date=MgmtConsumptionTest.startDate, end_date=MgmtConsumptionTest.endDate + ), + ) + output = self.consumption_client.budgets.create_or_update( + budget_name="PythonSDKTestBudgetCostCreateAndDelete", parameters=budget + ) + assert "PythonSDKTestBudgetCostCreateAndDelete" == output.name self.consumption_client.budgets.delete(budget_name=output.name) @recorded_by_proxy @@ -236,7 +309,7 @@ def test_consumption_subscription_marketplace(self): @recorded_by_proxy def test_consumption_subscription_marketplace_filter(self): - pages = self.consumption_client.marketplaces.list(filter='usageEnd le 2018-02-02', top=1) + pages = self.consumption_client.marketplaces.list(filter="usageEnd le 2018-02-02", top=1) first_page = pages.advance_page() output = list(first_page) assert 1 == len(output) @@ -244,26 +317,30 @@ def test_consumption_subscription_marketplace_filter(self): @recorded_by_proxy def test_consumption_billing_period_marketplace(self): - pages = self.consumption_client.marketplaces.list_by_billing_period(billing_period_name='201804-1') + pages = self.consumption_client.marketplaces.list_by_billing_period(billing_period_name="201804-1") first_page = pages.advance_page() output = list(first_page) self._validate_marketplace(output[0]) @recorded_by_proxy def test_consumption_billing_period_marketplace_filter(self): - pages = self.consumption_client.marketplaces.list_by_billing_period(billing_period_name='201804-1', filter='usageEnd ge 2018-01-26T23:59:59Z') + pages = self.consumption_client.marketplaces.list_by_billing_period( + billing_period_name="201804-1", filter="usageEnd ge 2018-01-26T23:59:59Z" + ) first_page = pages.advance_page() output = list(first_page) self._validate_marketplace(output[0]) @recorded_by_proxy def test_consumption_billing_period_price_sheet(self): - output = self.consumption_client.price_sheet.get_by_billing_period(billing_period_name=MgmtConsumptionTest.billingPeriodName, expand='properties/meterDetails') + output = self.consumption_client.price_sheet.get_by_billing_period( + billing_period_name=MgmtConsumptionTest.billingPeriodName, expand="properties/meterDetails" + ) self._validate_price_sheet(output) @recorded_by_proxy def test_consumption_subscription_price_sheet_expand(self): - output = self.consumption_client.price_sheet.get(expand='properties/meterDetails') + output = self.consumption_client.price_sheet.get(expand="properties/meterDetails") self._validate_price_sheet(output) @recorded_by_proxy @@ -271,6 +348,7 @@ def test_consumption_subscription_price_sheet(self): output = self.consumption_client.price_sheet.get(top=1) self._validate_price_sheet(output, included_paging=True) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_patch.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_patch.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_patch.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_patch.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_patch.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_patch.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/setup.py b/sdk/containerinstance/azure-mgmt-containerinstance/setup.py index f403bc870a66..58642b00753a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/setup.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_cli_mgmt_containerinstance.py b/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_cli_mgmt_containerinstance.py index 340c403e6f20..4f40af0ebfde 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_cli_mgmt_containerinstance.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_cli_mgmt_containerinstance.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -27,17 +27,16 @@ import azure.mgmt.containerinstance from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtContainerInstanceTest(AzureMgmtTestCase): def setUp(self): super(MgmtContainerInstanceTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.containerinstance.ContainerInstanceManagementClient - ) - - @unittest.skip('hard to test') + self.mgmt_client = self.create_mgmt_client(azure.mgmt.containerinstance.ContainerInstanceManagementClient) + + @unittest.skip("hard to test") @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_containerinstance(self, resource_group): @@ -45,260 +44,201 @@ def test_containerinstance(self, resource_group): TENANT_ID = self.settings.TENANT_ID RESOURCE_GROUP = resource_group.name CONTAINER_GROUP_NAME = "myContainerGroup" - CONTAINER_NAME = "my-container" # must match the regex '[a-z0-9]([-a-z0-9]*[a-z0-9])?' + CONTAINER_NAME = "my-container" # must match the regex '[a-z0-9]([-a-z0-9]*[a-z0-9])?' -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/put/ContainerGroupsCreateOrUpdate[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "identity": { - "type": "SystemAssigned, UserAssigned", - "user_assigned_identities": {} - }, - "containers": [ - { - "name": "demo1", - "command": [], - "environment_variables": [], - "image": "nginx", - "ports": [ + "location": AZURE_LOCATION, + "identity": {"type": "SystemAssigned, UserAssigned", "user_assigned_identities": {}}, + "containers": [ { - "port": "80" + "name": "demo1", + "command": [], + "environment_variables": [], + "image": "nginx", + "ports": [{"port": "80"}], + "resources": {"requests": {"cpu": "1", "memory_in_gb": "1.5", "gpu": {"count": "1", "sku": "K80"}}}, + "volume_mounts": [ + {"name": "volume1", "mount_path": "/mnt/volume1", "read_only": False}, + {"name": "volume2", "mount_path": "/mnt/volume2", "read_only": False}, + {"name": "volume3", "mount_path": "/mnt/volume3", "read_only": True}, + ], } - ], - "resources": { - "requests": { - "cpu": "1", - "memory_in_gb": "1.5", - "gpu": { - "count": "1", - "sku": "K80" - } + ], + "diagnostics": { + "log_analytics": { + "workspace_id": "workspaceid", + "workspace_key": "workspaceKey", + "log_type": "ContainerInsights", + "metadata": {"test-key": "test-metadata-value"}, } - }, - "volume_mounts": [ + }, + "network_profile": {"id": "test-network-profile-id"}, + "dns_config": { + "name_servers": ["1.1.1.1"], + "search_domains": "cluster.local svc.cluster.local", + "options": "ndots:2", + }, + "image_registry_credentials": [], + "ip_address": { + "ports": [{"protocol": "TCP", "port": "80"}], + "type": "Public", + "dns_name_label": "dnsnamelabel1", + }, + "os_type": "Linux", + "volumes": [ { - "name": "volume1", - "mount_path": "/mnt/volume1", - "read_only": False + "name": "volume1", + "azure_file": { + "share_name": "shareName", + "storage_account_name": "accountName", + "storage_account_key": "accountKey", + }, }, + {"name": "volume2"}, { - "name": "volume2", - "mount_path": "/mnt/volume2", - "read_only": False + "name": "volume3", + "secret": {"secret_key1": "SecretValue1InBase64", "secret_key2": "SecretValue2InBase64"}, }, - { - "name": "volume3", - "mount_path": "/mnt/volume3", - "read_only": True - } - ] - } - ], - "diagnostics": { - "log_analytics": { - "workspace_id": "workspaceid", - "workspace_key": "workspaceKey", - "log_type": "ContainerInsights", - "metadata": { - "test-key": "test-metadata-value" - } - } - }, - "network_profile": { - "id": "test-network-profile-id" - }, - "dns_config": { - "name_servers": [ - "1.1.1.1" - ], - "search_domains": "cluster.local svc.cluster.local", - "options": "ndots:2" - }, - "image_registry_credentials": [], - "ip_address": { - "ports": [ - { - "protocol": "TCP", - "port": "80" - } ], - "type": "Public", - "dns_name_label": "dnsnamelabel1" - }, - "os_type": "Linux", - "volumes": [ - { - "name": "volume1", - "azure_file": { - "share_name": "shareName", - "storage_account_name": "accountName", - "storage_account_key": "accountKey" - } - }, - { - "name": "volume2" - }, - { - "name": "volume3", - "secret": { - "secret_key1": "SecretValue1InBase64", - "secret_key2": "SecretValue2InBase64" - } - } - ] } # result = self.mgmt_client.container_groups.begin_create_or_update(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, container_group=BODY) # result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/put/ContainerGroupsCreateOrUpdateSample[put] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- BODY = { - "location": AZURE_LOCATION, - "identity": { - "type": "SystemAssigned" - }, - "containers": [ - { - "name": CONTAINER_NAME, - "command": [], - "environment_variables": [], - "image": "nginx", - "ports": [ - { - "port": "80" - } - ], - "resources": { - "requests": { - "cpu": "1", - "memory_in_gb": "1.5", - "gpu": { - "count": "1", - "sku": "K80" - } - } - }, - "volume_mounts": [ + "location": AZURE_LOCATION, + "identity": {"type": "SystemAssigned"}, + "containers": [ { - "name": "empty-volume", - "mount_path": "/mnt/mydir" + "name": CONTAINER_NAME, + "command": [], + "environment_variables": [], + "image": "nginx", + "ports": [{"port": "80"}], + "resources": {"requests": {"cpu": "1", "memory_in_gb": "1.5", "gpu": {"count": "1", "sku": "K80"}}}, + "volume_mounts": [{"name": "empty-volume", "mount_path": "/mnt/mydir"}], } - ] - } - ], - "diagnostics": { - "log_analytics": { - "workspace_id": "workspaceid", - "workspace_key": "workspaceKey" - } - }, - "os_type": "Linux", - "restart_policy": "OnFailure", - "volumes": [ - { - "name": "empty-volume", - "empty_dir": {} - } - ] + ], + "diagnostics": {"log_analytics": {"workspace_id": "workspaceid", "workspace_key": "workspaceKey"}}, + "os_type": "Linux", + "restart_policy": "OnFailure", + "volumes": [{"name": "empty-volume", "empty_dir": {}}], } - result = self.mgmt_client.container_groups.begin_create_or_update(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, container_group=BODY) + result = self.mgmt_client.container_groups.begin_create_or_update( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, container_group=BODY + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Containers/get/ContainerListLogs[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.containers.list_logs(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, container_name=CONTAINER_NAME, tail="10") + # -------------------------------------------------------------------------- + result = self.mgmt_client.containers.list_logs( + resource_group_name=RESOURCE_GROUP, + container_group_name=CONTAINER_GROUP_NAME, + container_name=CONTAINER_NAME, + tail="10", + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/get/ContainerGroupsGet_Failed[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.container_groups.get(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.container_groups.get( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/get/ContainerGroupsGet_Succeeded[get] -#-------------------------------------------------------------------------- - result = self.mgmt_client.container_groups.get(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.container_groups.get( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/get/ContainerGroupsListByResourceGroup[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.container_groups.list_by_resource_group(resource_group_name=RESOURCE_GROUP) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Location/get/CachedImages[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.location.list_cached_images(location=AZURE_LOCATION) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Location/get/GetCapabilities[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.location.list_capabilities(location=AZURE_LOCATION) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Location/get/ContainerUsage[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.location.list_usage(location=AZURE_LOCATION) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/get/ContainerGroupsList[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.container_groups.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Operations/get/OperationsList[get] -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- result = self.mgmt_client.operations.list() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /Containers/post/ContainerExec[post] -#-------------------------------------------------------------------------- - BODY = { - "command": "/bin/bash", - "terminal_size": { - "rows": "12", - "cols": "12" - } - } - result = self.mgmt_client.containers.execute_command(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, container_name=CONTAINER_NAME, container_exec_request=BODY) + # -------------------------------------------------------------------------- + BODY = {"command": "/bin/bash", "terminal_size": {"rows": "12", "cols": "12"}} + result = self.mgmt_client.containers.execute_command( + resource_group_name=RESOURCE_GROUP, + container_group_name=CONTAINER_GROUP_NAME, + container_name=CONTAINER_NAME, + container_exec_request=BODY, + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/post/ContainerRestart[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.container_groups.begin_restart(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.container_groups.begin_restart( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/post/ContainerStart[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.container_groups.begin_start(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.container_groups.begin_start( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME + ) result = result.result() -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/post/ContainerStop[post] -#-------------------------------------------------------------------------- - result = self.mgmt_client.container_groups.stop(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.container_groups.stop( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/patch/ContainerGroupsUpdate[patch] -#-------------------------------------------------------------------------- - BODY = { - "tags": { - "tag1key": "tag1Value", - "tag2key": "tag2Value" - } - } - result = self.mgmt_client.container_groups.update(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, resource=BODY) + # -------------------------------------------------------------------------- + BODY = {"tags": {"tag1key": "tag1Value", "tag2key": "tag2Value"}} + result = self.mgmt_client.container_groups.update( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME, resource=BODY + ) -#-------------------------------------------------------------------------- + # -------------------------------------------------------------------------- # /ContainerGroups/delete/ContainerGroupsDelete[delete] -#-------------------------------------------------------------------------- - result = self.mgmt_client.container_groups.begin_delete(resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME) + # -------------------------------------------------------------------------- + result = self.mgmt_client.container_groups.begin_delete( + resource_group_name=RESOURCE_GROUP, container_group_name=CONTAINER_GROUP_NAME + ) result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_mgmt_containerinstance.py b/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_mgmt_containerinstance.py index c93e48cc6bc5..2e341e24ab91 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_mgmt_containerinstance.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/tests/disable_test_mgmt_containerinstance.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest @@ -13,68 +13,57 @@ from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + class MgmtContainerInstanceTest(AzureMgmtTestCase): def setUp(self): super(MgmtContainerInstanceTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.containerinstance.ContainerInstanceManagementClient - ) + self.client = self.create_mgmt_client(azure.mgmt.containerinstance.ContainerInstanceManagementClient) @ResourceGroupPreparer() def test_container_instance(self, resource_group, location): - container_group_name = self.get_resource_name('pycontainer') - image = 'alpine:latest' - os_type = 'Linux' + container_group_name = self.get_resource_name("pycontainer") + image = "alpine:latest" + os_type = "Linux" cpu = 1 memory = 1 - restart_policy = 'OnFailure' + restart_policy = "OnFailure" livenessprob_period_seconds = 5 - log_analytics_workspace_id = 'workspaceId' - log_analytics_workspace_key = 'workspaceKey' - identity_system_assigned = 'SystemAssigned' + log_analytics_workspace_id = "workspaceId" + log_analytics_workspace_key = "workspaceKey" + identity_system_assigned = "SystemAssigned" - empty_volume = Volume(name='empty-volume', empty_dir={}) - volume_mount = VolumeMount(name='empty-volume', mount_path='/mnt/mydir') + empty_volume = Volume(name="empty-volume", empty_dir={}) + volume_mount = VolumeMount(name="empty-volume", mount_path="/mnt/mydir") poller = self.client.container_groups.create_or_update( resource_group.name, container_group_name, { - 'identity': { - 'type': identity_system_assigned - }, - 'location': location, - 'containers': [{ - 'name': container_group_name, - 'image': image, - 'resources': { - 'requests': { - 'memory_in_gb': memory, - 'cpu': cpu - } - }, - 'volume_mounts': [volume_mount], - 'liveness_probe': { - 'exec': { - 'command': [ - 'cat' - '/tmp/healthy' - ] + "identity": {"type": identity_system_assigned}, + "location": location, + "containers": [ + { + "name": container_group_name, + "image": image, + "resources": {"requests": {"memory_in_gb": memory, "cpu": cpu}}, + "volume_mounts": [volume_mount], + "liveness_probe": { + "exec": {"command": ["cat" "/tmp/healthy"]}, + "periodSeconds": livenessprob_period_seconds, }, - 'periodSeconds': livenessprob_period_seconds } - }], - 'os_type': os_type, - 'restart_policy': restart_policy, - 'diagnostics': { - 'log_analytics': { - 'workspace_id': log_analytics_workspace_id, - 'workspace_key': log_analytics_workspace_key + ], + "os_type": os_type, + "restart_policy": restart_policy, + "diagnostics": { + "log_analytics": { + "workspace_id": log_analytics_workspace_id, + "workspace_key": log_analytics_workspace_key, } }, - 'volumes': [empty_volume], - } + "volumes": [empty_volume], + }, ) container_group = poller.result() @@ -120,24 +109,24 @@ def test_container_instance(self, resource_group, location): self.assertEqual(container_groups[0].containers[0].liveness_probe.period_seconds, livenessprob_period_seconds) # Testing Container_Execute_Command - terminal_size = { - "rows": 24, - "cols": 80 - } + terminal_size = {"rows": 24, "cols": 80} command = "/bin/bash" - containerExecResponse = self.client.container.execute_command(resource_group.name, container_group.name, container_group.containers[0].name, command, terminal_size) + containerExecResponse = self.client.container.execute_command( + resource_group.name, container_group.name, container_group.containers[0].name, command, terminal_size + ) self.assertNotEqual(containerExecResponse.web_socket_uri, None) self.assertNotEqual(containerExecResponse.password, None) # Testing Container_List_Logs - containerLogResponse = self.client.container.list_logs(resource_group.name, container_group.name, container_group.containers[0].name) + containerLogResponse = self.client.container.list_logs( + resource_group.name, container_group.name, container_group.containers[0].name + ) # Testing Restart Container Group poller = self.client.container_groups.restart(resource_group.name, container_group_name) poller.result() - -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_async_test.py b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_async_test.py index 56f8bf439d10..4c4d72fbb23a 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_async_test.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_async_test.py @@ -26,7 +26,6 @@ async def test_list(self, resource_group): result = [r async for r in response] assert response - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_list_by_resource_group(self, resource_group): diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_test.py b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_test.py index 3e88bea4a327..bd7320b4475b 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_test.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_container_groups_operations_test.py @@ -25,7 +25,6 @@ def test_list(self, resource_group): result = [r for r in response] assert response - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_list_by_resource_group(self, resource_group): diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_async_test.py b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_async_test.py index 675e60b28991..896f2129443d 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_async_test.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_async_test.py @@ -25,4 +25,3 @@ async def test_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - \ No newline at end of file diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_test.py b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_test.py index a05a4ac8c188..93d94451eede 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_test.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/tests/test_container_instance_management_operations_test.py @@ -24,4 +24,3 @@ def test_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - \ No newline at end of file diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/_patch.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/_patch.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/_patch.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/_patch.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/operations/_patch.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/operations/_patch.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/models/_patch.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/models/_patch.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/operations/_patch.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/operations/_patch.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/azure/mgmt/containerorchestratorruntime/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/setup.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/setup.py index d4e5bb0362f2..cabe2a3bad14 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/setup.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_async_test.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_async_test.py index 75b4c2717ed5..75b01e431bc1 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_async_test.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_async_test.py @@ -25,4 +25,3 @@ async def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_test.py b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_test.py index 48443dc6cc69..3b4efd21a4a2 100644 --- a/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_test.py +++ b/sdk/containerorchestratorruntime/azure-mgmt-containerorchestratorruntime/tests/test_container_orchestrator_runtime_mgmt_operations_test.py @@ -24,4 +24,3 @@ def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/operations/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/operations/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry.py b/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry.py index 9a627d5bf6b0..1cdc42c9adef 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry.py @@ -25,7 +25,6 @@ from devtools_testutils import AzureMgmtTestCase, FakeStorageAccount, ResourceGroupPreparer, StorageAccountPreparer - FAKE_STORAGE = FakeStorageAccount(name="pyacr", id="") DEFAULT_LOCATION = "westcentralus" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2017_03_01.py b/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2017_03_01.py index ebe86e54826e..a9c266ab434f 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2017_03_01.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2017_03_01.py @@ -20,7 +20,6 @@ from devtools_testutils import AzureMgmtTestCase, FakeStorageAccount, ResourceGroupPreparer, StorageAccountPreparer - FAKE_STORAGE = FakeStorageAccount(name="pyacr", id="") DEFAULT_LOCATION = "westcentralus" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2018_02_01_preview.py b/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2018_02_01_preview.py index 8063941cab44..c99764f6792b 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2018_02_01_preview.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/tests/disable_test_mgmt_containerregistry_2018_02_01_preview.py @@ -42,7 +42,6 @@ from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - DEFAULT_LOCATION = "eastus" DEFAULT_REPLICATION_LOCATION = "southcentralus" DEFAULT_WEBHOOK_SERVICE_URI = "http://www.microsoft.com" diff --git a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/operations/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/operations/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/models/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/models/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/operations/_patch.py b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/operations/_patch.py +++ b/sdk/containerregistry/azure-mgmt-containerregistrytasks/azure/mgmt/containerregistrytasks/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/_patch.py b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/_patch.py b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/models/_patch.py b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/models/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicefleet/azure/mgmt/containerservicefleet/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/_patch.py b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/_patch.py b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/models/_patch.py b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/models/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservicesafeguards/azure/mgmt/containerservicesafeguards/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/containerservice/azure-mgmt-containerservicesafeguards/setup.py b/sdk/containerservice/azure-mgmt-containerservicesafeguards/setup.py index 131b447077b0..f9d35c118b6b 100644 --- a/sdk/containerservice/azure-mgmt-containerservicesafeguards/setup.py +++ b/sdk/containerservice/azure-mgmt-containerservicesafeguards/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_model_base.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_model_base.py index aec056aba7b7..acef3489d392 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_model_base.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_model_base.py @@ -380,8 +380,7 @@ def pop(self, key: str) -> typing.Any: # pylint: disable=no-member ... @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: - ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -398,12 +397,10 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: self._data.update(*args, **kwargs) @typing.overload # type: ignore - def setdefault(self, key: str) -> typing.Any: - ... + def setdefault(self, key: str) -> typing.Any: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: - ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_operations/_patch.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_operations/_patch.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_patch.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_patch.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_operations/_patch.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_operations/_patch.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_patch.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_patch.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_models.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_models.py index cf0403b1cd4c..0b27d9c48985 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_models.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_models.py @@ -34,8 +34,7 @@ def __init__( self, *, blocklist_items: List["_models.TextBlocklistItem"], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -65,8 +64,7 @@ def __init__( self, *, blocklist_items: List["_models.TextBlocklistItem"], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -110,8 +108,7 @@ def __init__( image: "_models.ImageData", categories: Optional[List[Union[str, "_models.ImageCategory"]]] = None, output_type: Optional[Union[str, "_models.AnalyzeImageOutputType"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -141,8 +138,7 @@ def __init__( self, *, categories_analysis: List["_models.ImageCategoriesAnalysis"], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -204,8 +200,7 @@ def __init__( blocklist_names: Optional[List[str]] = None, halt_on_blocklist_hit: Optional[bool] = None, output_type: Optional[Union[str, "_models.AnalyzeTextOutputType"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -240,8 +235,7 @@ def __init__( *, categories_analysis: List["_models.TextCategoriesAnalysis"], blocklists_match: Optional[List["_models.TextBlocklistMatch"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -282,8 +276,7 @@ def __init__( *, category: Union[str, "_models.ImageCategory"], severity: Optional[int] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -318,8 +311,7 @@ def __init__( *, content: Optional[bytes] = None, blob_url: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -349,8 +341,7 @@ def __init__( self, *, blocklist_item_ids: List[str], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -385,8 +376,7 @@ def __init__( *, blocklist_name: str, description: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -428,8 +418,7 @@ def __init__( *, text: str, description: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -469,8 +458,7 @@ def __init__( blocklist_name: str, blocklist_item_id: str, blocklist_item_text: str, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -513,8 +501,7 @@ def __init__( *, category: Union[str, "_models.TextCategory"], severity: Optional[int] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): diff --git a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_patch.py b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_patch.py +++ b/sdk/contentsafety/azure-ai-contentsafety/azure/ai/contentsafety/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/contentsafety/azure-ai-contentsafety/setup.py b/sdk/contentsafety/azure-ai-contentsafety/setup.py index b4e939ee2c66..127d72500fa1 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/setup.py +++ b/sdk/contentsafety/azure-ai-contentsafety/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-contentsafety" PACKAGE_PPRINT_NAME = "Azure AI Content Safety" diff --git a/sdk/contentsafety/azure-ai-contentsafety/tests/conftest.py b/sdk/contentsafety/azure-ai-contentsafety/tests/conftest.py index eabe5360b66b..1ca14ff35bdf 100644 --- a/sdk/contentsafety/azure-ai-contentsafety/tests/conftest.py +++ b/sdk/contentsafety/azure-ai-contentsafety/tests/conftest.py @@ -9,6 +9,7 @@ from devtools_testutils import test_proxy, add_general_string_sanitizer import os + # autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy): diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_client.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_client.py index 6d2e8dc042e7..81e8f0abbe5e 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_client.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_client.py @@ -40,16 +40,9 @@ class ContentUnderstandingClient(_ContentUnderstandingClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - endpoint: str, - credential: Union[AzureKeyCredential, "TokenCredential"], - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None: _endpoint = "{endpoint}/contentunderstanding" - self._config = ContentUnderstandingClientConfiguration( - endpoint=endpoint, credential=credential, **kwargs - ) + self._config = ContentUnderstandingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) _policies = kwargs.pop("policies", None) if _policies is None: @@ -65,24 +58,16 @@ def __init__( self._config.custom_hook_policy, self._config.logging_policy, policies.DistributedTracingPolicy(**kwargs), - ( - policies.SensitiveHeaderCleanupPolicy(**kwargs) - if self._config.redirect_policy - else None - ), + (policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None), self._config.http_logging_policy, ] - self._client: PipelineClient = PipelineClient( - base_url=_endpoint, policies=_policies, **kwargs - ) + self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - def send_request( - self, request: HttpRequest, *, stream: bool = False, **kwargs: Any - ) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -102,14 +87,10 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - request_copy.url = self._client.format_url( - request_copy.url, **path_format_arguments - ) + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_configuration.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_configuration.py index 7694c9aa2324..a61746065371 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_configuration.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_configuration.py @@ -51,44 +51,26 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = api_version - self.credential_scopes = kwargs.pop( - "credential_scopes", ["https://cognitiveservices.azure.com/.default"] - ) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "ai-contentunderstanding/{}".format(VERSION)) self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) def _infer_policy(self, **kwargs): if isinstance(self.credential, AzureKeyCredential): - return policies.AzureKeyCredentialPolicy( - self.credential, "Ocp-Apim-Subscription-Key", **kwargs - ) + return policies.AzureKeyCredentialPolicy(self.credential, "Ocp-Apim-Subscription-Key", **kwargs) if hasattr(self.credential, "get_token"): - return policies.BearerTokenCredentialPolicy( - self.credential, *self.credential_scopes, **kwargs - ) + return policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) raise TypeError(f"Unsupported credential: {self.credential}") def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get( - "user_agent_policy" - ) or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy( - **kwargs - ) + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get( - "logging_policy" - ) or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get( - "http_logging_policy" - ) or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get( - "custom_hook_policy" - ) or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy( - **kwargs - ) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_operations/_operations.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_operations/_operations.py index c77eec52936c..ba6812efcaf9 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_operations/_operations.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_operations/_operations.py @@ -40,9 +40,7 @@ JSON = MutableMapping[str, Any] _Unset: Any = object() T = TypeVar("T") -ClsType = Optional[ - Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any] -] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -58,12 +56,8 @@ def build_content_understanding_analyze_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,25 +69,17 @@ def build_content_understanding_analyze_request( # pylint: disable=name-too-lon _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters - _params["stringEncoding"] = _SERIALIZER.query( - "string_encoding", string_encoding, "str" - ) + _params["stringEncoding"] = _SERIALIZER.query("string_encoding", string_encoding, "str") if processing_location is not None: - _params["processingLocation"] = _SERIALIZER.query( - "processing_location", processing_location, "str" - ) + _params["processingLocation"] = _SERIALIZER.query("processing_location", processing_location, "str") _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header( - "content_type", content_type, "str" - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_analyze_binary_request( # pylint: disable=name-too-long @@ -108,9 +94,7 @@ def build_content_understanding_analyze_binary_request( # pylint: disable=name- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: str = kwargs.pop("content_type") - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,24 +106,18 @@ def build_content_understanding_analyze_binary_request( # pylint: disable=name- _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters - _params["stringEncoding"] = _SERIALIZER.query( - "string_encoding", string_encoding, "str" - ) + _params["stringEncoding"] = _SERIALIZER.query("string_encoding", string_encoding, "str") if content_range is not None: _params["range"] = _SERIALIZER.query("content_range", content_range, "str") if processing_location is not None: - _params["processingLocation"] = _SERIALIZER.query( - "processing_location", processing_location, "str" - ) + _params["processingLocation"] = _SERIALIZER.query("processing_location", processing_location, "str") _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers _headers["content-type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_copy_analyzer_request( # pylint: disable=name-too-long @@ -148,12 +126,8 @@ def build_content_understanding_copy_analyzer_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -167,20 +141,14 @@ def build_content_understanding_copy_analyzer_request( # pylint: disable=name-t # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if allow_replace is not None: - _params["allowReplace"] = _SERIALIZER.query( - "allow_replace", allow_replace, "bool" - ) + _params["allowReplace"] = _SERIALIZER.query("allow_replace", allow_replace, "bool") # Construct headers if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header( - "content_type", content_type, "str" - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_create_analyzer_request( # pylint: disable=name-too-long @@ -189,12 +157,8 @@ def build_content_understanding_create_analyzer_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -208,20 +172,14 @@ def build_content_understanding_create_analyzer_request( # pylint: disable=name # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if allow_replace is not None: - _params["allowReplace"] = _SERIALIZER.query( - "allow_replace", allow_replace, "bool" - ) + _params["allowReplace"] = _SERIALIZER.query("allow_replace", allow_replace, "bool") # Construct headers if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header( - "content_type", content_type, "str" - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_delete_analyzer_request( # pylint: disable=name-too-long @@ -230,9 +188,7 @@ def build_content_understanding_delete_analyzer_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) # Construct URL _url = "/analyzers/{analyzerId}" path_format_arguments = { @@ -246,9 +202,7 @@ def build_content_understanding_delete_analyzer_request( # pylint: disable=name # Construct headers - return HttpRequest( - method="DELETE", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_delete_result_request( # pylint: disable=name-too-long @@ -256,9 +210,7 @@ def build_content_understanding_delete_result_request( # pylint: disable=name-t ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) # Construct URL _url = "/analyzerResults/{operationId}" path_format_arguments = { @@ -279,9 +231,7 @@ def build_content_understanding_get_analyzer_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -298,9 +248,7 @@ def build_content_understanding_get_analyzer_request( # pylint: disable=name-to # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_get_defaults_request( @@ -309,9 +257,7 @@ def build_content_understanding_get_defaults_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -323,9 +269,7 @@ def build_content_understanding_get_defaults_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_get_operation_status_request( # pylint: disable=name-too-long @@ -334,9 +278,7 @@ def build_content_understanding_get_operation_status_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -354,9 +296,7 @@ def build_content_understanding_get_operation_status_request( # pylint: disable # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_get_result_request( # pylint: disable=name-too-long @@ -365,9 +305,7 @@ def build_content_understanding_get_result_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -384,9 +322,7 @@ def build_content_understanding_get_result_request( # pylint: disable=name-too- # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_get_result_file_request( # pylint: disable=name-too-long @@ -395,9 +331,7 @@ def build_content_understanding_get_result_file_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "*/*") # Construct URL @@ -415,9 +349,7 @@ def build_content_understanding_get_result_file_request( # pylint: disable=name # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_grant_copy_authorization_request( # pylint: disable=name-too-long @@ -426,12 +358,8 @@ def build_content_understanding_grant_copy_authorization_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -447,14 +375,10 @@ def build_content_understanding_grant_copy_authorization_request( # pylint: dis # Construct headers if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header( - "content_type", content_type, "str" - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_list_analyzers_request( @@ -463,9 +387,7 @@ def build_content_understanding_list_analyzers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -477,9 +399,7 @@ def build_content_understanding_list_analyzers_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_update_analyzer_request( # pylint: disable=name-too-long @@ -488,12 +408,8 @@ def build_content_understanding_update_analyzer_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -509,14 +425,10 @@ def build_content_understanding_update_analyzer_request( # pylint: disable=name # Construct headers if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header( - "content_type", content_type, "str" - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PATCH", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) def build_content_understanding_update_defaults_request( @@ -525,12 +437,8 @@ def build_content_understanding_update_defaults_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) - api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", "2025-11-01") - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -541,14 +449,10 @@ def build_content_understanding_update_defaults_request( # Construct headers if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header( - "content_type", content_type, "str" - ) + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PATCH", url=_url, params=_params, headers=_headers, **kwargs - ) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) class _ContentUnderstandingClientOperationsMixin( @@ -580,9 +484,7 @@ def _analyze_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) if body is _Unset: @@ -608,18 +510,14 @@ def _analyze_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = True - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -629,15 +527,11 @@ def _analyze_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -796,9 +690,7 @@ def begin_analyze( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AnalysisResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -830,25 +722,19 @@ def get_long_running_output(pipeline_response): "str", response.headers.get("x-ms-client-request-id") ) - deserialized = _deserialize( - _models.AnalysisResult, response.json().get("result", {}) - ) + deserialized = _deserialize(_models.AnalysisResult, response.json().get("result", {})) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: PollingMethod = cast( PollingMethod, - LROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) @@ -903,18 +789,14 @@ def _analyze_binary_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = True - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -924,15 +806,11 @@ def _analyze_binary_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -1011,25 +889,19 @@ def get_long_running_output(pipeline_response): "str", response.headers.get("x-ms-client-request-id") ) - deserialized = _deserialize( - _models.AnalysisResult, response.json().get("result", {}) - ) + deserialized = _deserialize(_models.AnalysisResult, response.json().get("result", {})) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: PollingMethod = cast( PollingMethod, - LROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) @@ -1068,9 +940,7 @@ def _copy_analyzer_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) if body is _Unset: @@ -1099,18 +969,14 @@ def _copy_analyzer_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = True - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1120,15 +986,11 @@ def _copy_analyzer_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -1269,9 +1131,7 @@ def begin_copy_analyzer( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentAnalyzer] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1303,25 +1163,19 @@ def get_long_running_output(pipeline_response): "str", response.headers.get("x-ms-client-request-id") ) - deserialized = _deserialize( - _models.ContentAnalyzer, response.json().get("result", {}) - ) + deserialized = _deserialize(_models.ContentAnalyzer, response.json().get("result", {})) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: PollingMethod = cast( PollingMethod, - LROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) @@ -1357,9 +1211,7 @@ def _create_analyzer_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" @@ -1379,18 +1231,14 @@ def _create_analyzer_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = True - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1400,15 +1248,11 @@ def _create_analyzer_initial( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -1531,9 +1375,7 @@ def begin_create_analyzer( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentAnalyzer] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1568,17 +1410,13 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: PollingMethod = cast( PollingMethod, - LROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) @@ -1627,25 +1465,19 @@ def delete_analyzer( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _stream = False - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -1657,9 +1489,7 @@ def delete_analyzer( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace - def delete_result( - self, operation_id: str, **kwargs: Any - ) -> None: # pylint: disable=inconsistent-return-statements + def delete_result(self, operation_id: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """Mark the result of an analysis operation for deletion. :param operation_id: Operation identifier. Required. @@ -1688,25 +1518,19 @@ def delete_result( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _stream = False - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: @@ -1742,18 +1566,14 @@ def get_analyzer(self, analyzer_id: str, **kwargs: Any) -> _models.ContentAnalyz params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1764,9 +1584,7 @@ def get_analyzer(self, analyzer_id: str, **kwargs: Any) -> _models.ContentAnalyz response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -1812,18 +1630,14 @@ def get_defaults(self, **kwargs: Any) -> _models.ContentUnderstandingDefaults: params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1834,17 +1648,13 @@ def get_defaults(self, **kwargs: Any) -> _models.ContentUnderstandingDefaults: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentUnderstandingDefaults, response.json() - ) + deserialized = _deserialize(_models.ContentUnderstandingDefaults, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1887,18 +1697,14 @@ def _get_operation_status( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1909,17 +1715,13 @@ def _get_operation_status( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentAnalyzerOperationStatus, response.json() - ) + deserialized = _deserialize(_models.ContentAnalyzerOperationStatus, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1927,9 +1729,7 @@ def _get_operation_status( return deserialized # type: ignore @distributed_trace - def _get_result( - self, operation_id: str, **kwargs: Any - ) -> _models.ContentAnalyzerAnalyzeOperationStatus: + def _get_result(self, operation_id: str, **kwargs: Any) -> _models.ContentAnalyzerAnalyzeOperationStatus: """Get the result of an analysis operation. :param operation_id: The unique ID of the operation. Required. @@ -1950,9 +1750,7 @@ def _get_result( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ContentAnalyzerAnalyzeOperationStatus] = kwargs.pop( - "cls", None - ) + cls: ClsType[_models.ContentAnalyzerAnalyzeOperationStatus] = kwargs.pop("cls", None) _request = build_content_understanding_get_result_request( operation_id=operation_id, @@ -1961,18 +1759,14 @@ def _get_result( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1983,17 +1777,13 @@ def _get_result( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentAnalyzerAnalyzeOperationStatus, response.json() - ) + deserialized = _deserialize(_models.ContentAnalyzerAnalyzeOperationStatus, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -2001,9 +1791,7 @@ def _get_result( return deserialized # type: ignore @distributed_trace - def get_result_file( - self, operation_id: str, path: str, **kwargs: Any - ) -> Iterator[bytes]: + def get_result_file(self, operation_id: str, path: str, **kwargs: Any) -> Iterator[bytes]: """Get a file associated with the result of an analysis operation. :param operation_id: Operation identifier. Required. @@ -2035,18 +1823,14 @@ def get_result_file( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", True) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2057,15 +1841,11 @@ def get_result_file( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["content-type"] = self._deserialize( - "str", response.headers.get("content-type") - ) + response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -2183,9 +1963,7 @@ def grant_copy_authorization( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CopyAuthorization] = kwargs.pop("cls", None) if body is _Unset: @@ -2212,18 +1990,14 @@ def grant_copy_authorization( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2234,9 +2008,7 @@ def grant_copy_authorization( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -2291,9 +2063,7 @@ def prepare_request(next_link=None): skip_quote=True, ), } - _request.url = self._client.format_url( - _request.url, **path_format_arguments - ) + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -2301,9 +2071,7 @@ def prepare_request(next_link=None): _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs( - _parsed_next_link.query - ).items() + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._config.api_version @@ -2320,9 +2088,7 @@ def prepare_request(next_link=None): skip_quote=True, ), } - _request.url = self._client.format_url( - _request.url, **path_format_arguments - ) + _request.url = self._client.format_url(_request.url, **path_format_arguments) return _request @@ -2340,10 +2106,8 @@ def get_next(next_link=None): _request = prepare_request(next_link) _stream = False - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2457,9 +2221,7 @@ def update_analyzer( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentAnalyzer] = kwargs.pop("cls", None) content_type = content_type or "application/merge-patch+json" @@ -2478,18 +2240,14 @@ def update_analyzer( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2500,9 +2258,7 @@ def update_analyzer( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -2619,9 +2375,7 @@ def update_defaults( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentUnderstandingDefaults] = kwargs.pop("cls", None) if body is _Unset: @@ -2642,18 +2396,14 @@ def update_defaults( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2664,17 +2414,13 @@ def update_defaults( response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentUnderstandingDefaults, response.json() - ) + deserialized = _deserialize(_models.ContentUnderstandingDefaults, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_patch.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_patch.py index 5a4862ed16e6..d9c4f2417d61 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_patch.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_patch.py @@ -66,7 +66,7 @@ def begin_analyze( model_deployments: Optional[dict[str, str]] = None, processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, **kwargs: Any, - ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -101,7 +101,7 @@ def begin_analyze( processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, content_type: str = "application/json", **kwargs: Any, - ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -134,7 +134,7 @@ def begin_analyze( processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, content_type: str = "application/json", **kwargs: Any, - ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -169,7 +169,7 @@ def begin_analyze( # type: ignore[override] # pyright: ignore[reportIncompatib processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, content_type: Optional[str] = None, **kwargs: Any, - ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -204,9 +204,7 @@ def begin_analyze( # type: ignore[override] # pyright: ignore[reportIncompatib # Call parent implementation # Only pass body if it's not _Unset (let parent construct from inputs if not provided) # Ensure content_type is always a string (not None) - content_type_str: str = ( - content_type if content_type is not None else "application/json" - ) + content_type_str: str = content_type if content_type is not None else "application/json" if body is not _Unset: poller = super().begin_analyze( # pyright: ignore[reportCallIssue] analyzer_id=analyzer_id, @@ -240,7 +238,7 @@ def begin_analyze_binary( content_type: str = "application/octet-stream", processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, **kwargs: Any, - ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/model_base.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/model_base.py index 839d4af112c9..4714be37f9d0 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/model_base.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/model_base.py @@ -145,11 +145,7 @@ def __init__( def default(self, o): # pylint: disable=too-many-return-statements if _is_model(o): if self.exclude_readonly: - readonly_props = [ - p._rest_name - for p in o._attr_to_rest_field.values() - if _is_readonly(p) - ] + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] return {k: v for k, v in o.items() if k not in readonly_props} return dict(o.items()) try: @@ -175,9 +171,7 @@ def default(self, o): # pylint: disable=too-many-return-statements return super(SdkJSONEncoder, self).default(o) -_VALID_DATE = re.compile( - r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?" -) +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") _VALID_RFC7231 = re.compile( r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" @@ -345,9 +339,7 @@ def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = if annotation is int and rf and rf._format == "str": return _deserialize_int_as_str if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: - return functools.partial( - _deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format] - ) + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) if rf and rf._format: return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore @@ -365,19 +357,9 @@ def _get_type_alias_type(module_name: str, alias_name: str): def _get_model(module_name: str, model_name: str): - models = { - k: v - for k, v in sys.modules[module_name].__dict__.items() - if isinstance(v, type) - } + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} module_end = module_name.rsplit(".", 1)[0] - models.update( - { - k: v - for k, v in sys.modules[module_end].__dict__.items() - if isinstance(v, type) - } - ) + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) if isinstance(model_name, str): model_name = model_name.split(".")[-1] if model_name not in models: @@ -484,9 +466,7 @@ def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop( - self, key: str, default: typing.Any - ) -> typing.Any: ... # pylint: disable=signature-differs + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -516,9 +496,7 @@ def clear(self) -> None: """ self._data.clear() - def update( - self, *args: typing.Any, **kwargs: typing.Any - ) -> None: # pylint: disable=arguments-differ + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs. @@ -529,9 +507,7 @@ def update( def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault( - self, key: str, default: typing.Any - ) -> typing.Any: ... # pylint: disable=signature-differs + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -562,9 +538,7 @@ def _is_model(obj: typing.Any) -> bool: return getattr(obj, "_is_model", False) -def _serialize( - o, format: typing.Optional[str] = None -): # pylint: disable=too-many-return-statements +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements if isinstance(o, list): if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): return _ARRAY_ENCODE_MAPPING[format].join(o) @@ -599,13 +573,9 @@ def _serialize( return o -def _get_rest_field( - attr_to_rest_field: dict[str, "_RestField"], rest_name: str -) -> typing.Optional["_RestField"]: +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: try: - return next( - rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name - ) + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) except StopIteration: return None @@ -631,9 +601,7 @@ class Model(_MyMutableMapping): def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: class_name = self.__class__.__name__ if len(args) > 1: - raise TypeError( - f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given" - ) + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") dict_to_pass = { rest_field._rest_name: rest_field._default for rest_field in self._attr_to_rest_field.values() @@ -652,14 +620,9 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: xml_name = "{" + xml_ns + "}" + xml_name # attribute - if ( - prop_meta.get("attribute", False) - and args[0].get(xml_name) is not None - ): + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize( - rf._type, args[0].get(xml_name) - ) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) continue # unwrapped element is array @@ -679,9 +642,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: # text element is primitive type if prop_meta.get("text", False): if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize( - rf._type, args[0].text - ) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) continue # wrapped element could be normal property or array, it should only have one element @@ -696,25 +657,16 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: dict_to_pass[e.tag] = _convert_element(e) else: dict_to_pass.update( - { - k: _create_value( - _get_rest_field(self._attr_to_rest_field, k), v - ) - for k, v in args[0].items() - } + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} ) else: non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] if non_attr_kwargs: # actual type errors only throw the first wrong keyword arg they see, so following that. - raise TypeError( - f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'" - ) + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") dict_to_pass.update( { - self._attr_to_rest_field[k]._rest_name: _create_value( - self._attr_to_rest_field[k], v - ) + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) for k, v in kwargs.items() if v is not None } @@ -729,14 +681,9 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order - attr_to_rest_field: dict[str, _RestField] = ( - { # map attribute name to rest_field property - k: v - for mro_class in mros - for k, v in mro_class.__dict__.items() - if k[0] != "_" and hasattr(v, "_type") - } - ) + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } annotations = { k: v for mro_class in mros @@ -746,14 +693,10 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: for attr, rf in attr_to_rest_field.items(): rf._module = cls.__module__ if not rf._type: - rf._type = rf._get_deserialize_callable_from_annotation( - annotations.get(attr, None) - ) + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) if not rf._rest_name_input: rf._rest_name_input = attr - cls._attr_to_rest_field: dict[str, _RestField] = dict( - attr_to_rest_field.items() - ) + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") return super().__new__(cls) @@ -766,11 +709,7 @@ def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: @classmethod def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: for v in cls.__dict__.values(): - if ( - isinstance(v, _RestField) - and v._is_discriminator - and v._rest_name not in exist_discriminators - ): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: return v return None @@ -796,9 +735,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get( - discriminator_value, cls - ) # pyright: ignore # pylint: disable=no-member + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: @@ -812,11 +749,7 @@ def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: result = {} readonly_props = [] if exclude_readonly: - readonly_props = [ - p._rest_name - for p in self._attr_to_rest_field.values() - if _is_readonly(p) - ] + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] for k, v in self.items(): if exclude_readonly and k in readonly_props: # pyright: ignore continue @@ -827,11 +760,7 @@ def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: )._is_multipart_file_input except StopIteration: pass - result[k] = ( - v - if is_multipart_file_input - else Model._as_dict_value(v, exclude_readonly=exclude_readonly) - ) + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) return result @staticmethod @@ -839,17 +768,10 @@ def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: if v is None or isinstance(v, _Null): return None if isinstance(v, (list, tuple, set)): - return type(v)( - Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v - ) + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) if isinstance(v, dict): - return { - dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) - for dk, dv in v.items() - } - return ( - v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v - ) + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): @@ -858,9 +780,7 @@ def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj return _deserialize(model_deserializer, obj) -def _deserialize_with_optional( - if_obj_deserializer: typing.Optional[typing.Callable], obj -): +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): if obj is None: return obj return _deserialize_with_callable(if_obj_deserializer, obj) @@ -894,18 +814,14 @@ def _deserialize_multiple_sequence( ): if obj is None: return obj - return type(obj)( - _deserialize(deserializer, entry, module) - for entry, deserializer in zip(obj, entry_deserializers) - ) + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: return ( isinstance(deserializer, functools.partial) and isinstance(deserializer.args[0], functools.partial) - and deserializer.args[0].func - == _deserialize_array_encoded # pylint: disable=comparison-with-callable + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable ) @@ -937,8 +853,7 @@ def _deserialize_sequence( def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: return sorted( types, - key=lambda x: hasattr(x, "__name__") - and x.__name__.lower() in ("str", "float", "int", "bool"), + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), ) @@ -990,17 +905,11 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur rf, # pyright: ignore ) - return functools.partial( - _deserialize_with_optional, if_obj_deserializer - ) + return functools.partial(_deserialize_with_optional, if_obj_deserializer) # the type is Optional[Union[...]], we need to remove the None type from the Union annotation_copy = copy.copy(annotation) - annotation_copy.__args__ = [ - a for a in annotation_copy.__args__ if a is not _NONE_TYPE - ] # pyright: ignore - return _get_deserialize_callable_from_annotation( - annotation_copy, module, rf - ) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) except AttributeError: pass @@ -1016,9 +925,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur try: annotation_name = ( - annotation.__name__ - if hasattr(annotation, "__name__") - else annotation._name # pyright: ignore + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore ) if annotation_name.lower() == "dict": value_deserializer = _get_deserialize_callable_from_annotation( @@ -1034,9 +941,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur pass try: annotation_name = ( - annotation.__name__ - if hasattr(annotation, "__name__") - else annotation._name # pyright: ignore + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore ) if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: if len(annotation.__args__) > 1: # pyright: ignore @@ -1044,9 +949,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur _get_deserialize_callable_from_annotation(dt, module, rf) for dt in annotation.__args__ # pyright: ignore ] - return functools.partial( - _deserialize_multiple_sequence, entry_deserializers, module - ) + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) deserializer = _get_deserialize_callable_from_annotation( annotation.__args__[0], module, rf # pyright: ignore ) @@ -1091,10 +994,7 @@ def _deserialize_with_callable( return value.text == "true" if value.text else None if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): return deserializer(value.text) if value.text else None - if ( - deserializer - and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values() - ): + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): return deserializer(value.text) if value.text else None if deserializer is None: return value @@ -1102,17 +1002,13 @@ def _deserialize_with_callable( return deserializer(value) if isinstance(deserializer, CaseInsensitiveEnumMeta): try: - return deserializer( - value.text if isinstance(value, ET.Element) else value - ) + return deserializer(value.text if isinstance(value, ET.Element) else value) except ValueError: # for unknown value, return raw value return value.text if isinstance(value, ET.Element) else value if isinstance(deserializer, type) and issubclass(deserializer, Model): return deserializer._deserialize(value, []) - return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)( - value - ) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) except Exception as e: raise DeserializationError() from e @@ -1129,9 +1025,7 @@ def _deserialize( if rf is None and format: rf = _RestField(format=format) if not isinstance(deserializer, functools.partial): - deserializer = _get_deserialize_callable_from_annotation( - deserializer, module, rf - ) + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) return _deserialize_with_callable(deserializer, value) @@ -1171,9 +1065,7 @@ def __init__( self, *, name: typing.Optional[str] = None, - type: typing.Optional[ - typing.Callable - ] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin is_discriminator: bool = False, visibility: typing.Optional[list[str]] = None, default: typing.Any = _UNSET, @@ -1288,9 +1180,7 @@ def rest_discriminator( visibility: typing.Optional[list[str]] = None, xml: typing.Optional[dict[str, typing.Any]] = None, ) -> typing.Any: - return _RestField( - name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml - ) + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: @@ -1323,9 +1213,7 @@ def _get_element( readonly_props = [] if exclude_readonly: - readonly_props = [ - p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p) - ] + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] for k, v in o.items(): # do not serialize readonly properties @@ -1360,16 +1248,12 @@ def _get_element( prop_meta.get("prefix"), # pyright: ignore[reportArgumentType] prop_meta.get("ns"), # pyright: ignore[reportArgumentType] ) - xml_name = ( - "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore[reportOperatorIssue] - ) + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore[reportOperatorIssue] # attribute should be primitive type wrapped_element.set(xml_name, _get_primitive_type_value(v)) else: # other wrapped prop element - wrapped_element.append( - _get_wrapped_element(v, exclude_readonly, prop_meta) - ) + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) return wrapped_element if isinstance(o, list): return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/serialization.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/serialization.py index 6eec7f515737..3188c7e1d8c2 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/serialization.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_utils/serialization.py @@ -58,9 +58,7 @@ class RawDeserializer: CONTEXT_NAME = "deserialized_data" @classmethod - def deserialize_from_text( - cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None - ) -> Any: + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: """Decode data according to content-type. Accept a stream of data as well, but will be load at once in memory for now. @@ -93,9 +91,7 @@ def deserialize_from_text( try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError( - "JSON is invalid: {}".format(err), err - ) from err + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -129,14 +125,10 @@ def _json_attemp(data): raise DeserializationError("XML is invalid") from err elif content_type.startswith("text/"): return data_as_str - raise DeserializationError( - "Cannot deserialize content-type: {}".format(content_type) - ) + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) @classmethod - def deserialize_from_http_generics( - cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping - ) -> Any: + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: """Deserialize from HTTP response. Use bytes and headers to NOT use any requests/aiohttp or whatever @@ -188,9 +180,7 @@ def attribute_transformer(key, attr_desc, value): # pylint: disable=unused-argu return (key, value) -def full_restapi_key_transformer( - key, attr_desc, value -): # pylint: disable=unused-argument +def full_restapi_key_transformer(key, attr_desc, value): # pylint: disable=unused-argument """A key transformer that returns the full RestAPI key path. :param str key: The attribute name @@ -331,9 +321,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[ - [str, dict[str, Any], Any], Any - ] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -377,9 +365,7 @@ def _infer_class_models(cls): try: str_models = cls.__module__.rsplit(".", 1)[0] models = sys.modules[str_models] - client_models = { - k: v for k, v in models.__dict__.items() if isinstance(v, type) - } + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") except Exception: # pylint: disable=broad-exception-caught @@ -438,9 +424,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result |= objects[valuetype]._flatten_subtype( - key, objects - ) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -458,13 +442,9 @@ def _classify(cls, response, objects): if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.get( - rest_api_response_key, None - ) or response.get(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: - subtype_value = xml_key_extractor( - subtype_key, cls._attribute_map[subtype_key], response - ) + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: # Try to match base class. Can be class name only # (bug to fix in Autorest to support x-ms-discriminator-name) @@ -597,25 +577,18 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: - is_xml_model_serialization = kwargs.setdefault( - "is_xml", target_obj.is_xml_model() - ) + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) serialized = {} if is_xml_model_serialization: - serialized = ( - target_obj._create_xml_node() - ) # pylint: disable=protected-access + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if ( - not keep_readonly - and target_obj._validation.get( # pylint: disable=protected-access - attr_name, {} - ).get("readonly", False) - ): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": @@ -628,15 +601,11 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if is_xml_model_serialization: pass # Don't provide "transformer" for XML for now. Keep "orig_attr" else: # JSON - keys, orig_attr = key_transformer( - attr, attr_desc.copy(), orig_attr - ) + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) keys = keys if isinstance(keys, list) else [keys] kwargs["serialization_ctxt"] = attr_desc - new_attr = self.serialize_data( - orig_attr, attr_desc["type"], **kwargs - ) + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) if is_xml_model_serialization: xml_desc = attr_desc.get("xml", {}) @@ -685,9 +654,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to raise except (AttributeError, KeyError, TypeError) as err: - msg = "Attribute {} in object {} cannot be serialized.\n{}".format( - attr_name, class_name, str(target_obj) - ) + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) raise SerializationError(msg) from err return serialized @@ -709,9 +676,7 @@ def body(self, data, data_type, **kwargs): is_xml_model_serialization = kwargs["is_xml"] except KeyError: if internal_data_type and issubclass(internal_data_type, Model): - is_xml_model_serialization = kwargs.setdefault( - "is_xml", internal_data_type.is_xml_model() - ) + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) else: is_xml_model_serialization = False if internal_data_type and not isinstance(internal_data_type, Enum): @@ -730,13 +695,9 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize( - data_type, data - ) # pylint: disable=protected-access + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: - raise SerializationError( - "Unable to build a model: " + str(err) - ) from err + raise SerializationError("Unable to build a model: " + str(err)) from err return self._serialize(data, data_type, **kwargs) @@ -781,9 +742,7 @@ def query(self, name, data, data_type, **kwargs): if data_type.startswith("["): internal_data_type = data_type[1:-1] do_quote = not kwargs.get("skip_quote", False) - return self.serialize_iter( - data, internal_data_type, do_quote=do_quote, **kwargs - ) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) @@ -858,9 +817,7 @@ def serialize_data(self, data, data_type, **kwargs): return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers( - cls, data_type, **kwargs - ): # pylint: disable=inconsistent-return-statements + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -950,9 +907,7 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialized.append(None) if kwargs.get("do_quote", False): - serialized = [ - "" if s is None else quote(str(s), safe="") for s in serialized - ] + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] if div: serialized = ["" if s is None else str(s) for s in serialized] @@ -969,9 +924,7 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): is_wrapped = xml_desc.get("wrapped", False) node_name = xml_desc.get("itemsName", xml_name) if is_wrapped: - final_result = _create_xml_node( - xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None) - ) + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) else: final_result = [] # All list elements to "local_node" @@ -1002,9 +955,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): serialized = {} for key, value in attr.items(): try: - serialized[self.serialize_unicode(key)] = self.serialize_data( - value, dict_type, **kwargs - ) + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) except ValueError as err: if isinstance(err, SerializationError): raise @@ -1015,18 +966,14 @@ def serialize_dict(self, attr, dict_type, **kwargs): xml_desc = serialization_ctxt["xml"] xml_name = xml_desc["name"] - final_result = _create_xml_node( - xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None) - ) + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) for key, value in serialized.items(): ET.SubElement(final_result, key).text = value return final_result return serialized - def serialize_object( - self, attr, **kwargs - ): # pylint: disable=too-many-return-statements + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -1066,9 +1013,7 @@ def serialize_object( serialized = {} for key, value in attr.items(): try: - serialized[self.serialize_unicode(key)] = self.serialize_object( - value, **kwargs - ) + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) except ValueError: serialized[self.serialize_unicode(key)] = None return serialized @@ -1296,9 +1241,7 @@ def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inc key = _decode_attribute_map_key(dict_keys[0]) break working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = attribute_key_case_insensitive_extractor( - working_key, None, working_data - ) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) if working_data is None: # If at any point while following flatten JSON path see None, it means # that all properties under are None as well @@ -1323,9 +1266,7 @@ def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-ar return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor( - attr, attr_desc, data -): # pylint: disable=unused-argument +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" @@ -1370,9 +1311,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor( - attr, attr_desc, data -): # pylint: disable=unused-argument,too-many-return-statements +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1406,10 +1345,7 @@ def xml_key_extractor( # - Wrapped node # - Internal type is an enum (considered basic types) # - Internal type has no XML/Name node - if is_wrapped or ( - internal_type - and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map) - ): + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): children = data.findall(xml_name) # If internal type has a local name and it's not a list, I use that name elif not is_iter_type and internal_type and "name" in internal_type_xml_map: @@ -1417,9 +1353,7 @@ def xml_key_extractor( children = data.findall(xml_name) # That's an array else: - if ( - internal_type - ): # Complex type, ignore itemsName and use the complex type name + if internal_type: # Complex type, ignore itemsName and use the complex type name items_name = _extract_name_from_internal_type(internal_type) else: items_name = xml_desc.get("itemsName", xml_name) @@ -1447,9 +1381,7 @@ def xml_key_extractor( # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: - raise DeserializationError( - "Find several XML '{}' where it was not expected".format(xml_name) - ) + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) return children[0] @@ -1462,9 +1394,7 @@ class Deserializer: basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile( - r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?" - ) + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { @@ -1509,9 +1439,7 @@ def __call__(self, target_obj, response_data, content_type=None): data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize( - self, target_obj, data - ): # pylint: disable=inconsistent-return-statements + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree @@ -1524,11 +1452,7 @@ def _deserialize( """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): - constants = [ - name - for name, config in getattr(data, "_validation", {}).items() - if config.get("constant") - ] + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: for ( attr, @@ -1541,9 +1465,7 @@ def _deserialize( continue local_type = mapconfig["type"] internal_data_type = local_type.strip("[]{}") - if internal_data_type not in self.dependencies or isinstance( - internal_data_type, Enum - ): + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): continue setattr(data, attr, self._deserialize(local_type, value)) return data @@ -1596,10 +1518,7 @@ def _deserialize( def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: return None - if ( - "additional_properties" in attribute_map - and attribute_map.get("additional_properties", {}).get("key") != "" - ): + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": # Check empty string. If it's not empty, someone has a real "additionalProperties" return None if isinstance(data, ET.Element): @@ -1685,21 +1604,15 @@ def _unpack_content(raw_data, content_type=None): if context: if RawDeserializer.CONTEXT_NAME in context: return context[RawDeserializer.CONTEXT_NAME] - raise ValueError( - "This pipeline didn't have the RawDeserializer policy; can't deserialize" - ) + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") # Assume this is enough to recognize universal_http.ClientResponse without importing it if hasattr(raw_data, "body"): - return RawDeserializer.deserialize_from_http_generics( - raw_data.text(), raw_data.headers - ) + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) # Assume this enough to recognize requests.Response without importing it. if hasattr(raw_data, "_content_consumed"): - return RawDeserializer.deserialize_from_http_generics( - raw_data.text, raw_data.headers - ) + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore @@ -1727,11 +1640,7 @@ def _instantiate_model(self, response, attrs, additional_properties=None): for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore if v.get("constant") ] - kwargs = { - k: v - for k, v in attrs.items() - if k not in subtype and k not in readonly + const - } + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) @@ -1751,9 +1660,7 @@ def _instantiate_model(self, response, attrs, additional_properties=None): msg += "Type: {}, Error: {}".format(type(response), exp) raise DeserializationError(msg) from exp - def deserialize_data( - self, data, data_type - ): # pylint: disable=too-many-return-statements + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. @@ -1771,24 +1678,15 @@ def deserialize_data( if data_type in self.basic_types.values(): return self.deserialize_basic(data, data_type) if data_type in self.deserialize_type: - if isinstance( - data, self.deserialize_expected_types.get(data_type, tuple()) - ): + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = ( - lambda x: x - not in [ # pylint: disable=unnecessary-lambda-assignment - "object", - "[]", - r"{}", - ] - ) - if ( - isinstance(data, ET.Element) - and is_a_text_parsing_type(data_type) - and not data.text - ): + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) return data_val @@ -1819,16 +1717,10 @@ def deserialize_iter(self, attr, iter_type): """ if attr is None: return None - if isinstance( - attr, ET.Element - ): # If I receive an element here, get the children + if isinstance(attr, ET.Element): # If I receive an element here, get the children attr = list(attr) if not isinstance(attr, (list, set)): - raise DeserializationError( - "Cannot deserialize as [{}] an object of type {}".format( - iter_type, type(attr) - ) - ) + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) return [self.deserialize_data(a, iter_type) for a in attr] def deserialize_dict(self, attr, dict_type): @@ -1841,18 +1733,14 @@ def deserialize_dict(self, attr, dict_type): :rtype: dict """ if isinstance(attr, list): - return { - x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr - } + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} if isinstance(attr, ET.Element): # Transform value into {"Key": "value"} attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object( - self, attr, **kwargs - ): # pylint: disable=too-many-return-statements + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. @@ -1895,9 +1783,7 @@ def deserialize_object( error = "Cannot deserialize generic object with type: " raise TypeError(error + str(obj_type)) - def deserialize_basic( - self, attr, data_type - ): # pylint: disable=too-many-return-statements + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -2088,9 +1974,7 @@ def deserialize_date(attr): if isinstance(attr, ET.Element): attr = attr.text if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError( - "Date must have only digits and -. Received: %s" % attr - ) + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. return isodate.parse_date(attr, defaultmonth=0, defaultday=0) @@ -2106,9 +1990,7 @@ def deserialize_time(attr): if isinstance(attr, ET.Element): attr = attr.text if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError( - "Date must have only digits and -. Received: %s" % attr - ) + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) return isodate.parse_time(attr) @staticmethod @@ -2125,10 +2007,7 @@ def deserialize_rfc(attr): try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], - tzinfo=datetime.timezone( - datetime.timedelta(minutes=(parsed_date[9] or 0) / 60) - ) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_validation.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_validation.py index bc8e615eac31..80ac0f52022f 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_validation.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/_validation.py @@ -34,15 +34,11 @@ def wrapper(*args, **kwargs): try: # this assumes the client has an _api_version attribute client = args[0] - client_api_version = ( - client._config.api_version - ) # pylint: disable=protected-access + client_api_version = client._config.api_version # pylint: disable=protected-access except AttributeError: return func(*args, **kwargs) - if _index_with_default(method_added_on) > _index_with_default( - client_api_version - ): + if _index_with_default(method_added_on) > _index_with_default(client_api_version): raise ValueError( f"'{func.__name__}' is not available in API version " f"{client_api_version}. Pass service API version {method_added_on} or newer to your client." @@ -52,9 +48,7 @@ def wrapper(*args, **kwargs): parameter: api_version for api_version, parameters in params_added_on.items() for parameter in parameters - if parameter in kwargs - and _index_with_default(api_version) - > _index_with_default(client_api_version) + if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version) } if unsupported: raise ValueError( diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_client.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_client.py index 1d74567aca2e..425688feef5b 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_client.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_client.py @@ -41,15 +41,10 @@ class ContentUnderstandingClient(_ContentUnderstandingClientOperationsMixin): """ def __init__( - self, - endpoint: str, - credential: Union[AzureKeyCredential, "AsyncTokenCredential"], - **kwargs: Any + self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any ) -> None: _endpoint = "{endpoint}/contentunderstanding" - self._config = ContentUnderstandingClientConfiguration( - endpoint=endpoint, credential=credential, **kwargs - ) + self._config = ContentUnderstandingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) _policies = kwargs.pop("policies", None) if _policies is None: @@ -65,16 +60,10 @@ def __init__( self._config.custom_hook_policy, self._config.logging_policy, policies.DistributedTracingPolicy(**kwargs), - ( - policies.SensitiveHeaderCleanupPolicy(**kwargs) - if self._config.redirect_policy - else None - ), + (policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None), self._config.http_logging_policy, ] - self._client: AsyncPipelineClient = AsyncPipelineClient( - base_url=_endpoint, policies=_policies, **kwargs - ) + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() @@ -102,14 +91,10 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - request_copy.url = self._client.format_url( - request_copy.url, **path_format_arguments - ) + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_configuration.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_configuration.py index 7aa1ab87b30e..bdfcaf2a311a 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_configuration.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_configuration.py @@ -51,47 +51,27 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = api_version - self.credential_scopes = kwargs.pop( - "credential_scopes", ["https://cognitiveservices.azure.com/.default"] - ) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "ai-contentunderstanding/{}".format(VERSION)) self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) def _infer_policy(self, **kwargs): if isinstance(self.credential, AzureKeyCredential): - return policies.AzureKeyCredentialPolicy( - self.credential, "Ocp-Apim-Subscription-Key", **kwargs - ) + return policies.AzureKeyCredentialPolicy(self.credential, "Ocp-Apim-Subscription-Key", **kwargs) if hasattr(self.credential, "get_token"): - return policies.AsyncBearerTokenCredentialPolicy( - self.credential, *self.credential_scopes, **kwargs - ) + return policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) raise TypeError(f"Unsupported credential: {self.credential}") def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get( - "user_agent_policy" - ) or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy( - **kwargs - ) + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get( - "logging_policy" - ) or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get( - "http_logging_policy" - ) or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get( - "custom_hook_policy" - ) or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get( - "redirect_policy" - ) or policies.AsyncRedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy( - **kwargs - ) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: self.authentication_policy = self._infer_policy(**kwargs) diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_operations/_operations.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_operations/_operations.py index bc294bad1605..1a46b4ffa398 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_operations/_operations.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_operations/_operations.py @@ -67,9 +67,7 @@ JSON = MutableMapping[str, Any] _Unset: Any = object() T = TypeVar("T") -ClsType = Optional[ - Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any] -] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] class _ContentUnderstandingClientOperationsMixin( @@ -101,9 +99,7 @@ async def _analyze_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) if body is _Unset: @@ -129,9 +125,7 @@ async def _analyze_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -148,15 +142,11 @@ async def _analyze_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -319,9 +309,7 @@ async def begin_analyze( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AnalysisResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -353,25 +341,19 @@ def get_long_running_output(pipeline_response): "str", response.headers.get("x-ms-client-request-id") ) - deserialized = _deserialize( - _models.AnalysisResult, response.json().get("result", {}) - ) + deserialized = _deserialize(_models.AnalysisResult, response.json().get("result", {})) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) @@ -426,9 +408,7 @@ async def _analyze_binary_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -445,15 +425,11 @@ async def _analyze_binary_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -533,25 +509,19 @@ def get_long_running_output(pipeline_response): "str", response.headers.get("x-ms-client-request-id") ) - deserialized = _deserialize( - _models.AnalysisResult, response.json().get("result", {}) - ) + deserialized = _deserialize(_models.AnalysisResult, response.json().get("result", {})) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) @@ -590,9 +560,7 @@ async def _copy_analyzer_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) if body is _Unset: @@ -621,9 +589,7 @@ async def _copy_analyzer_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -640,15 +606,11 @@ async def _copy_analyzer_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -793,9 +755,7 @@ async def begin_copy_analyzer( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentAnalyzer] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -827,25 +787,19 @@ def get_long_running_output(pipeline_response): "str", response.headers.get("x-ms-client-request-id") ) - deserialized = _deserialize( - _models.ContentAnalyzer, response.json().get("result", {}) - ) + deserialized = _deserialize(_models.ContentAnalyzer, response.json().get("result", {})) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) @@ -881,9 +835,7 @@ async def _create_analyzer_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" @@ -903,9 +855,7 @@ async def _create_analyzer_initial( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -922,15 +872,11 @@ async def _create_analyzer_initial( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["Operation-Location"] = self._deserialize( - "str", response.headers.get("Operation-Location") - ) + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) response_headers["x-ms-client-request-id"] = self._deserialize( "str", response.headers.get("x-ms-client-request-id") ) @@ -1057,9 +1003,7 @@ async def begin_create_analyzer( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentAnalyzer] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1094,17 +1038,13 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling( - lro_delay, path_format_arguments=path_format_arguments, **kwargs - ), + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) @@ -1151,9 +1091,7 @@ async def delete_analyzer(self, analyzer_id: str, **kwargs: Any) -> None: params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1165,9 +1103,7 @@ async def delete_analyzer(self, analyzer_id: str, **kwargs: Any) -> None: response = pipeline_response.http_response if response.status_code not in [204]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -1208,9 +1144,7 @@ async def delete_result(self, operation_id: str, **kwargs: Any) -> None: params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1222,18 +1156,14 @@ async def delete_result(self, operation_id: str, **kwargs: Any) -> None: response = pipeline_response.http_response if response.status_code not in [204]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace_async - async def get_analyzer( - self, analyzer_id: str, **kwargs: Any - ) -> _models.ContentAnalyzer: + async def get_analyzer(self, analyzer_id: str, **kwargs: Any) -> _models.ContentAnalyzer: """Get analyzer properties. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -1262,9 +1192,7 @@ async def get_analyzer( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1282,9 +1210,7 @@ async def get_analyzer( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -1330,9 +1256,7 @@ async def get_defaults(self, **kwargs: Any) -> _models.ContentUnderstandingDefau params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1350,17 +1274,13 @@ async def get_defaults(self, **kwargs: Any) -> _models.ContentUnderstandingDefau await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentUnderstandingDefaults, response.json() - ) + deserialized = _deserialize(_models.ContentUnderstandingDefaults, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1403,9 +1323,7 @@ async def _get_operation_status( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1423,17 +1341,13 @@ async def _get_operation_status( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentAnalyzerOperationStatus, response.json() - ) + deserialized = _deserialize(_models.ContentAnalyzerOperationStatus, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1441,9 +1355,7 @@ async def _get_operation_status( return deserialized # type: ignore @distributed_trace_async - async def _get_result( - self, operation_id: str, **kwargs: Any - ) -> _models.ContentAnalyzerAnalyzeOperationStatus: + async def _get_result(self, operation_id: str, **kwargs: Any) -> _models.ContentAnalyzerAnalyzeOperationStatus: """Get the result of an analysis operation. :param operation_id: The unique ID of the operation. Required. @@ -1464,9 +1376,7 @@ async def _get_result( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ContentAnalyzerAnalyzeOperationStatus] = kwargs.pop( - "cls", None - ) + cls: ClsType[_models.ContentAnalyzerAnalyzeOperationStatus] = kwargs.pop("cls", None) _request = build_content_understanding_get_result_request( operation_id=operation_id, @@ -1475,9 +1385,7 @@ async def _get_result( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1495,17 +1403,13 @@ async def _get_result( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentAnalyzerAnalyzeOperationStatus, response.json() - ) + deserialized = _deserialize(_models.ContentAnalyzerAnalyzeOperationStatus, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1513,9 +1417,7 @@ async def _get_result( return deserialized # type: ignore @distributed_trace_async - async def get_result_file( - self, operation_id: str, path: str, **kwargs: Any - ) -> AsyncIterator[bytes]: + async def get_result_file(self, operation_id: str, path: str, **kwargs: Any) -> AsyncIterator[bytes]: """Get a file associated with the result of an analysis operation. :param operation_id: Operation identifier. Required. @@ -1547,9 +1449,7 @@ async def get_result_file( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1567,15 +1467,11 @@ async def get_result_file( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} - response_headers["content-type"] = self._deserialize( - "str", response.headers.get("content-type") - ) + response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -1613,12 +1509,7 @@ async def grant_copy_authorization( @overload async def grant_copy_authorization( - self, - analyzer_id: str, - body: JSON, - *, - content_type: str = "application/json", - **kwargs: Any + self, analyzer_id: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CopyAuthorization: """Get authorization for copying this analyzer to another location. @@ -1636,12 +1527,7 @@ async def grant_copy_authorization( @overload async def grant_copy_authorization( - self, - analyzer_id: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any + self, analyzer_id: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CopyAuthorization: """Get authorization for copying this analyzer to another location. @@ -1693,9 +1579,7 @@ async def grant_copy_authorization( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CopyAuthorization] = kwargs.pop("cls", None) if body is _Unset: @@ -1722,9 +1606,7 @@ async def grant_copy_authorization( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -1742,9 +1624,7 @@ async def grant_copy_authorization( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -1763,9 +1643,7 @@ async def grant_copy_authorization( return deserialized # type: ignore @distributed_trace - def list_analyzers( - self, **kwargs: Any - ) -> AsyncItemPaged["_models.ContentAnalyzer"]: + def list_analyzers(self, **kwargs: Any) -> AsyncItemPaged["_models.ContentAnalyzer"]: """List analyzers. :return: An iterator like instance of ContentAnalyzer @@ -1802,9 +1680,7 @@ def prepare_request(next_link=None): skip_quote=True, ), } - _request.url = self._client.format_url( - _request.url, **path_format_arguments - ) + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -1812,9 +1688,7 @@ def prepare_request(next_link=None): _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs( - _parsed_next_link.query - ).items() + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._config.api_version @@ -1831,9 +1705,7 @@ def prepare_request(next_link=None): skip_quote=True, ), } - _request.url = self._client.format_url( - _request.url, **path_format_arguments - ) + _request.url = self._client.format_url(_request.url, **path_format_arguments) return _request @@ -1893,12 +1765,7 @@ async def update_analyzer( @overload async def update_analyzer( - self, - analyzer_id: str, - resource: JSON, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, analyzer_id: str, resource: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.ContentAnalyzer: """Update analyzer properties. @@ -1939,10 +1806,7 @@ async def update_analyzer( @distributed_trace_async async def update_analyzer( - self, - analyzer_id: str, - resource: Union[_models.ContentAnalyzer, JSON, IO[bytes]], - **kwargs: Any + self, analyzer_id: str, resource: Union[_models.ContentAnalyzer, JSON, IO[bytes]], **kwargs: Any ) -> _models.ContentAnalyzer: """Update analyzer properties. @@ -1966,9 +1830,7 @@ async def update_analyzer( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentAnalyzer] = kwargs.pop("cls", None) content_type = content_type or "application/merge-patch+json" @@ -1987,9 +1849,7 @@ async def update_analyzer( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -2007,9 +1867,7 @@ async def update_analyzer( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) response_headers = {} @@ -2053,11 +1911,7 @@ async def update_defaults( @overload async def update_defaults( - self, - body: JSON, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.ContentUnderstandingDefaults: """Update default settings for this Content Understanding resource. @@ -2074,11 +1928,7 @@ async def update_defaults( @overload async def update_defaults( - self, - body: IO[bytes], - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, body: IO[bytes], *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> _models.ContentUnderstandingDefaults: """Update default settings for this Content Understanding resource. @@ -2126,9 +1976,7 @@ async def update_defaults( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContentUnderstandingDefaults] = kwargs.pop("cls", None) if body is _Unset: @@ -2149,9 +1997,7 @@ async def update_defaults( params=_params, ) path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } _request.url = self._client.format_url(_request.url, **path_format_arguments) @@ -2169,17 +2015,13 @@ async def update_defaults( await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): pass - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) + map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize( - _models.ContentUnderstandingDefaults, response.json() - ) + deserialized = _deserialize(_models.ContentUnderstandingDefaults, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_patch.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_patch.py index 316b8f6a008a..bbbd37805415 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_patch.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/_patch.py @@ -67,7 +67,7 @@ async def begin_analyze( model_deployments: Optional[dict[str, str]] = None, processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, **kwargs: Any, - ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -102,7 +102,7 @@ async def begin_analyze( processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, content_type: str = "application/json", **kwargs: Any, - ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -135,7 +135,7 @@ async def begin_analyze( processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, content_type: str = "application/json", **kwargs: Any, - ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -170,7 +170,7 @@ async def begin_analyze( # type: ignore[override] # pyright: ignore[reportInco processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, content_type: Optional[str] = None, **kwargs: Any, - ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -205,9 +205,7 @@ async def begin_analyze( # type: ignore[override] # pyright: ignore[reportInco # Call parent implementation # Only pass body if it's not _Unset (let parent construct from inputs if not provided) # Ensure content_type is always a string (not None) - content_type_str: str = ( - content_type if content_type is not None else "application/json" - ) + content_type_str: str = content_type if content_type is not None else "application/json" if body is not _Unset: poller = await super().begin_analyze( # pyright: ignore[reportCallIssue] analyzer_id=analyzer_id, @@ -229,7 +227,7 @@ async def begin_analyze( # type: ignore[override] # pyright: ignore[reportInco ) # Wrap in custom poller with .operation_id property (without re-initializing) - return AnalyzeAsyncLROPoller.from_poller(poller) # pyright: ignore[reportReturnType] # fmt: skip + return AnalyzeAsyncLROPoller.from_poller(poller) # pyright: ignore[reportReturnType] @distributed_trace_async async def begin_analyze_binary( @@ -241,7 +239,7 @@ async def begin_analyze_binary( content_type: str = "application/octet-stream", processing_location: Optional[Union[str, _models.ProcessingLocation]] = None, **kwargs: Any, - ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] # fmt: skip + ) -> "AnalyzeAsyncLROPoller[_models.AnalysisResult]": # pyright: ignore[reportInvalidTypeArguments] """Extract content and fields from input. :param analyzer_id: The unique identifier of the analyzer. Required. @@ -280,7 +278,7 @@ async def begin_analyze_binary( ) # Wrap in custom poller with .operation_id property (without re-initializing) - return AnalyzeAsyncLROPoller.from_poller(poller) # pyright: ignore[reportReturnType] # fmt: skip + return AnalyzeAsyncLROPoller.from_poller(poller) # pyright: ignore[reportReturnType] def patch_sdk(): diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/models/_patch.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/models/_patch.py index eca66620c5d4..63034e0551e8 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/models/_patch.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/models/_patch.py @@ -32,9 +32,7 @@ def _parse_operation_id(operation_location_header: str) -> str: match = re.search(regex, operation_location_header) if not match: - raise ValueError( - f"Could not extract operation ID from: {operation_location_header}" - ) + raise ValueError(f"Could not extract operation ID from: {operation_location_header}") return match.group(1) diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_models.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_models.py index 17ef2e4cdf33..74f815f89374 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_models.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_models.py @@ -48,29 +48,19 @@ class AnalysisContent(_Model): """ __mapping__: dict[str, _Model] = {} - kind: str = rest_discriminator( - name="kind", visibility=["read", "create", "update", "delete", "query"] - ) + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) """Content kind. Required. Known values are: \"document\" and \"audioVisual\".""" - mime_type: str = rest_field( - name="mimeType", visibility=["read", "create", "update", "delete", "query"] - ) + mime_type: str = rest_field(name="mimeType", visibility=["read", "create", "update", "delete", "query"]) """Detected MIME type of the content. Ex. application/pdf, image/jpeg, etc. Required.""" analyzer_id: Optional[str] = rest_field( name="analyzerId", visibility=["read", "create", "update", "delete", "query"] ) """The analyzer that generated this content.""" - category: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Classified content category.""" - path: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The path of the content in the input.""" - markdown: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + markdown: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Markdown representation of the content.""" fields: Optional[dict[str, "_models.ContentField"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -118,26 +108,16 @@ class AnalysisInput(_Model): :vartype content_range: str """ - url: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The URL of the input to analyze. Only one of url or data should be specified.""" - data: Optional[bytes] = rest_field( - visibility=["read", "create", "update", "delete", "query"], format="base64" - ) + data: Optional[bytes] = rest_field(visibility=["read", "create", "update", "delete", "query"], format="base64") """Raw image bytes. Provide bytes-like object; do not base64-encode. Only one of url or data should be specified.""" - name: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Name of the input.""" - mime_type: Optional[str] = rest_field( - name="mimeType", visibility=["read", "create", "update", "delete", "query"] - ) + mime_type: Optional[str] = rest_field(name="mimeType", visibility=["read", "create", "update", "delete", "query"]) """The MIME type of the input content. Ex. application/pdf, image/jpeg, etc.""" - content_range: Optional[str] = rest_field( - name="range", visibility=["read", "create", "update", "delete", "query"] - ) + content_range: Optional[str] = rest_field(name="range", visibility=["read", "create", "update", "delete", "query"]) """Range of the input to analyze (ex. ``1-3,5,9-``). Document content uses 1-based page numbers, while audio visual content uses integer milliseconds.""" @@ -195,9 +175,7 @@ class AnalysisResult(_Model): format="rfc3339", ) """The date and time when the result was created.""" - warnings: Optional[list[ODataV4Format]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + warnings: Optional[list[ODataV4Format]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Warnings encountered while analyzing the document.""" string_encoding: Optional[str] = rest_field( name="stringEncoding", @@ -205,9 +183,7 @@ class AnalysisResult(_Model): ) """The string encoding format for content spans in the response. Possible values are 'codePoint', 'utf16', and ``utf8``. Default is ``codePoint``.\").""" - contents: list["_models.AnalysisContent"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + contents: list["_models.AnalysisContent"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The extracted content. Required.""" @overload @@ -252,22 +228,16 @@ class ContentField(_Model): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" spans: Optional[list["_models.ContentSpan"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """Span(s) associated with the field value in the markdown content.""" - confidence: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + confidence: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Confidence of predicting the field value.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the field value in the content.""" @overload @@ -311,9 +281,7 @@ class ArrayField(ContentField, discriminator="array"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.ARRAY] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -386,21 +354,13 @@ class AudioVisualContent(AnalysisContent, discriminator="audioVisual"): kind: Literal[AnalysisContentKind.AUDIO_VISUAL] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """Content kind. Required. Audio visual content, such as mp3, mp4, etc.""" - start_time_ms: int = rest_field( - name="startTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + start_time_ms: int = rest_field(name="startTimeMs", visibility=["read", "create", "update", "delete", "query"]) """Start time of the content in milliseconds. Required.""" - end_time_ms: int = rest_field( - name="endTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + end_time_ms: int = rest_field(name="endTimeMs", visibility=["read", "create", "update", "delete", "query"]) """End time of the content in milliseconds. Required.""" - width: Optional[int] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + width: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Width of each video frame in pixels, if applicable.""" - height: Optional[int] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + height: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Height of each video frame in pixels, if applicable.""" camera_shot_times_ms: Optional[list[int]] = rest_field( name="cameraShotTimesMs", @@ -471,25 +431,15 @@ class AudioVisualContentSegment(_Model): :vartype end_time_ms: int """ - segment_id: str = rest_field( - name="segmentId", visibility=["read", "create", "update", "delete", "query"] - ) + segment_id: str = rest_field(name="segmentId", visibility=["read", "create", "update", "delete", "query"]) """Segment identifier. Required.""" - category: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + category: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Classified content category. Required.""" - span: "_models.ContentSpan" = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: "_models.ContentSpan" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the segment in the markdown content. Required.""" - start_time_ms: int = rest_field( - name="startTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + start_time_ms: int = rest_field(name="startTimeMs", visibility=["read", "create", "update", "delete", "query"]) """Start time of the segment in milliseconds. Required.""" - end_time_ms: int = rest_field( - name="endTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + end_time_ms: int = rest_field(name="endTimeMs", visibility=["read", "create", "update", "delete", "query"]) """End time of the segment in milliseconds. Required.""" @overload @@ -533,9 +483,7 @@ class BooleanField(ContentField, discriminator="boolean"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.BOOLEAN] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -609,47 +557,29 @@ class ContentAnalyzer(_Model): analyzer_id: str = rest_field(name="analyzerId", visibility=["read"]) """The unique identifier of the analyzer. Required.""" - description: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A description of the analyzer.""" - tags: Optional[dict[str, str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Tags associated with the analyzer.""" - status: Union[str, "_models.ContentAnalyzerStatus"] = rest_field( - visibility=["read"] - ) + status: Union[str, "_models.ContentAnalyzerStatus"] = rest_field(visibility=["read"]) """The status of the analyzer. Required. Known values are: \"creating\", \"ready\", \"deleting\", and \"failed\".""" - created_at: datetime.datetime = rest_field( - name="createdAt", visibility=["read"], format="rfc3339" - ) + created_at: datetime.datetime = rest_field(name="createdAt", visibility=["read"], format="rfc3339") """The date and time when the analyzer was created. Required.""" - last_modified_at: datetime.datetime = rest_field( - name="lastModifiedAt", visibility=["read"], format="rfc3339" - ) + last_modified_at: datetime.datetime = rest_field(name="lastModifiedAt", visibility=["read"], format="rfc3339") """The date and time when the analyzer was last modified. Required.""" warnings: Optional[list[ODataV4Format]] = rest_field(visibility=["read"]) """Warnings encountered while creating the analyzer.""" - base_analyzer_id: Optional[str] = rest_field( - name="baseAnalyzerId", visibility=["read", "create"] - ) + base_analyzer_id: Optional[str] = rest_field(name="baseAnalyzerId", visibility=["read", "create"]) """The analyzer to incrementally train from.""" - config: Optional["_models.ContentAnalyzerConfig"] = rest_field( - visibility=["read", "create"] - ) + config: Optional["_models.ContentAnalyzerConfig"] = rest_field(visibility=["read", "create"]) """Analyzer configuration settings.""" - field_schema: Optional["_models.ContentFieldSchema"] = rest_field( - name="fieldSchema", visibility=["read", "create"] - ) + field_schema: Optional["_models.ContentFieldSchema"] = rest_field(name="fieldSchema", visibility=["read", "create"]) """The schema of fields to extracted.""" - dynamic_field_schema: Optional[bool] = rest_field( - name="dynamicFieldSchema", visibility=["read", "create"] - ) + dynamic_field_schema: Optional[bool] = rest_field(name="dynamicFieldSchema", visibility=["read", "create"]) """Indicates whether the result may contain additional fields outside of the defined schema.""" - processing_location: Optional[Union[str, "_models.ProcessingLocation"]] = ( - rest_field(name="processingLocation", visibility=["read", "create"]) + processing_location: Optional[Union[str, "_models.ProcessingLocation"]] = rest_field( + name="processingLocation", visibility=["read", "create"] ) """The location where the data may be processed. Defaults to global. Known values are: \"geography\", \"dataZone\", and \"global\".""" @@ -660,9 +590,7 @@ class ContentAnalyzer(_Model): models: Optional[dict[str, str]] = rest_field(visibility=["read", "create"]) """Mapping of model roles to specific model names. Ex. { \"completion\": \"gpt-4.1\", \"embedding\": \"text-embedding-3-large\" }.""" - supported_models: Optional["_models.SupportedModels"] = rest_field( - name="supportedModels", visibility=["read"] - ) + supported_models: Optional["_models.SupportedModels"] = rest_field(name="supportedModels", visibility=["read"]) """Chat completion and embedding models supported by the analyzer.""" @overload @@ -714,17 +642,11 @@ class ContentAnalyzerAnalyzeOperationStatus(_Model): ) """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", \"Succeeded\", \"Failed\", and \"Canceled\".""" - error: Optional[ODataV4Format] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Error object that describes the error when status is \"Failed\".""" - result: Optional["_models.AnalysisResult"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + result: Optional["_models.AnalysisResult"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The result of the operation.""" - usage: Optional["_models.UsageDetails"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + usage: Optional["_models.UsageDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Usage details of the analyze operation.""" @overload @@ -796,9 +718,7 @@ class ContentAnalyzerConfig(_Model): name="returnDetails", visibility=["read", "create", "update", "delete", "query"] ) """Return all content details.""" - locales: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + locales: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """List of locale hints for speech transcription.""" enable_ocr: Optional[bool] = rest_field( name="enableOcr", visibility=["read", "create", "update", "delete", "query"] @@ -848,11 +768,9 @@ class ContentAnalyzerConfig(_Model): visibility=["read", "create", "update", "delete", "query"], ) """Return field grounding source and confidence.""" - content_categories: Optional[dict[str, "_models.ContentCategoryDefinition"]] = ( - rest_field( - name="contentCategories", - visibility=["read", "create", "update", "delete", "query"], - ) + content_categories: Optional[dict[str, "_models.ContentCategoryDefinition"]] = rest_field( + name="contentCategories", + visibility=["read", "create", "update", "delete", "query"], ) """Map of categories to classify the input content(s) against.""" enable_segment: Optional[bool] = rest_field( @@ -886,9 +804,7 @@ def __init__( annotation_format: Optional[Union[str, "_models.AnnotationFormat"]] = None, disable_face_blurring: Optional[bool] = None, estimate_field_source_and_confidence: Optional[bool] = None, - content_categories: Optional[ - dict[str, "_models.ContentCategoryDefinition"] - ] = None, + content_categories: Optional[dict[str, "_models.ContentCategoryDefinition"]] = None, enable_segment: Optional[bool] = None, segment_per_page: Optional[bool] = None, omit_content: Optional[bool] = None, @@ -928,17 +844,11 @@ class ContentAnalyzerOperationStatus(_Model): ) """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", \"Succeeded\", \"Failed\", and \"Canceled\".""" - error: Optional[ODataV4Format] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Error object that describes the error when status is \"Failed\".""" - result: Optional["_models.ContentAnalyzer"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + result: Optional["_models.ContentAnalyzer"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The result of the operation.""" - usage: Optional["_models.UsageDetails"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + usage: Optional["_models.UsageDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Usage details of the analyzer creation operation.""" @overload @@ -974,9 +884,7 @@ class ContentCategoryDefinition(_Model): :vartype analyzer: ~azure.ai.contentunderstanding.models.ContentAnalyzer """ - description: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the category.""" analyzer_id: Optional[str] = rest_field( name="analyzerId", visibility=["read", "create", "update", "delete", "query"] @@ -1042,9 +950,7 @@ class ContentFieldDefinition(_Model): ) """Semantic data type of the field value. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" - description: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Field description.""" item_definition: Optional["_models.ContentFieldDefinition"] = rest_field( name="items", visibility=["read", "create", "update", "delete", "query"] @@ -1054,22 +960,16 @@ class ContentFieldDefinition(_Model): visibility=["read", "create", "update", "delete", "query"] ) """Named sub-fields, if type is object.""" - examples: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + examples: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Examples of field values.""" - enum: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + enum: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Enumeration of possible field values.""" enum_descriptions: Optional[dict[str, str]] = rest_field( name="enumDescriptions", visibility=["read", "create", "update", "delete", "query"], ) """Descriptions for each enumeration value.""" - ref: Optional[str] = rest_field( - name="$ref", visibility=["read", "create", "update", "delete", "query"] - ) + ref: Optional[str] = rest_field(name="$ref", visibility=["read", "create", "update", "delete", "query"]) """Reference to another field definition.""" estimate_source_and_confidence: Optional[bool] = rest_field( name="estimateSourceAndConfidence", @@ -1121,13 +1021,9 @@ class ContentFieldSchema(_Model): """The name of the field schema.""" description: Optional[str] = rest_field(visibility=["read", "create"]) """A description of the field schema.""" - fields: dict[str, "_models.ContentFieldDefinition"] = rest_field( - visibility=["read", "create"] - ) + fields: dict[str, "_models.ContentFieldDefinition"] = rest_field(visibility=["read", "create"]) """The fields defined in the schema. Required.""" - definitions: Optional[dict[str, "_models.ContentFieldDefinition"]] = rest_field( - visibility=["read", "create"] - ) + definitions: Optional[dict[str, "_models.ContentFieldDefinition"]] = rest_field(visibility=["read", "create"]) """Additional definitions referenced by the fields in the schema.""" @overload @@ -1194,9 +1090,7 @@ class ContentUnderstandingDefaults(_Model): :vartype model_deployments: dict[str, str] """ - model_deployments: dict[str, str] = rest_field( - name="modelDeployments", visibility=["read", "create", "update"] - ) + model_deployments: dict[str, str] = rest_field(name="modelDeployments", visibility=["read", "create", "update"]) """Specify the default mapping of model names to LLM/embedding deployments in Microsoft Foundry. For details and current semantics, see `https://aka.ms/cudoc-quickstart-rest `_. Required.""" @@ -1284,9 +1178,7 @@ class DateField(ContentField, discriminator="date"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.DATE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -1355,17 +1247,13 @@ class DocumentAnnotation(_Model): visibility=["read", "create", "update", "delete", "query"] ) """Spans of the content associated with the annotation.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Position of the annotation.""" comments: Optional[list["_models.DocumentAnnotationComment"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """Comments associated with the annotation.""" - author: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + author: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Annotation author.""" created_at: Optional[datetime.datetime] = rest_field( name="createdAt", @@ -1379,9 +1267,7 @@ class DocumentAnnotation(_Model): format="rfc3339", ) """Date and time when the annotation was last modified.""" - tags: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + tags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Tags associated with the annotation.""" @overload @@ -1425,13 +1311,9 @@ class DocumentAnnotationComment(_Model): :vartype tags: list[str] """ - message: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + message: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Comment message in Markdown. Required.""" - author: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + author: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Author of the comment.""" created_at: Optional[datetime.datetime] = rest_field( name="createdAt", @@ -1445,9 +1327,7 @@ class DocumentAnnotationComment(_Model): format="rfc3339", ) """Date and time when the comment was last modified.""" - tags: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + tags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Tags associated with the comment.""" @overload @@ -1497,17 +1377,11 @@ class DocumentBarcode(_Model): \"DataBarExpanded\", \"ITF\", \"MicroQRCode\", \"Aztec\", \"DataMatrix\", and \"MaxiCode\".""" value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Barcode value. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the barcode in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the barcode in the markdown content.""" - confidence: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + confidence: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Confidence of predicting the barcode.""" @overload @@ -1545,21 +1419,13 @@ class DocumentCaption(_Model): :vartype elements: list[str] """ - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Content of the caption. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the caption in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the caption in the markdown content.""" - elements: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + elements: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Child elements of the caption.""" @overload @@ -1611,23 +1477,15 @@ class DocumentFigure(_Model): """ __mapping__: dict[str, _Model] = {} - kind: str = rest_discriminator( - name="kind", visibility=["read", "create", "update", "delete", "query"] - ) + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) """Figure kind. Required. Known values are: \"unknown\", \"chart\", and \"mermaid\".""" id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Figure identifier. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the figure in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the figure in the markdown content.""" - elements: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + elements: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Child elements of the figure, excluding any caption or footnotes.""" caption: Optional["_models.DocumentCaption"] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -1637,9 +1495,7 @@ class DocumentFigure(_Model): visibility=["read", "create", "update", "delete", "query"] ) """List of figure footnotes.""" - description: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Description of the figure.""" role: Optional[Union[str, "_models.SemanticRole"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -1704,9 +1560,7 @@ class DocumentChartFigure(DocumentFigure, discriminator="chart"): kind: Literal[DocumentFigureKind.CHART] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """Figure kind. Required. Figure containing a chart, such as a bar chart, line chart, or pie chart.""" - content: dict[str, Any] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: dict[str, Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Chart content represented using `Chart.js config `_. Required.""" @@ -1792,9 +1646,7 @@ class DocumentContent(AnalysisContent, discriminator="document"): visibility=["read", "create", "update", "delete", "query"], ) """Start page number (1-indexed) of the content. Required.""" - end_page_number: int = rest_field( - name="endPageNumber", visibility=["read", "create", "update", "delete", "query"] - ) + end_page_number: int = rest_field(name="endPageNumber", visibility=["read", "create", "update", "delete", "query"]) """End page number (1-indexed) of the content. Required.""" unit: Optional[Union[str, "_models.LengthUnit"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -1884,26 +1736,18 @@ class DocumentContentSegment(_Model): :vartype end_page_number: int """ - segment_id: str = rest_field( - name="segmentId", visibility=["read", "create", "update", "delete", "query"] - ) + segment_id: str = rest_field(name="segmentId", visibility=["read", "create", "update", "delete", "query"]) """Segment identifier. Required.""" - category: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + category: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Classified content category. Required.""" - span: "_models.ContentSpan" = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: "_models.ContentSpan" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the segment in the markdown content. Required.""" start_page_number: int = rest_field( name="startPageNumber", visibility=["read", "create", "update", "delete", "query"], ) """Start page number (1-indexed) of the segment. Required.""" - end_page_number: int = rest_field( - name="endPageNumber", visibility=["read", "create", "update", "delete", "query"] - ) + end_page_number: int = rest_field(name="endPageNumber", visibility=["read", "create", "update", "delete", "query"]) """End page number (1-indexed) of the segment. Required.""" @overload @@ -1941,21 +1785,13 @@ class DocumentFootnote(_Model): :vartype elements: list[str] """ - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Content of the footnote. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the footnote in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the footnote in the markdown content.""" - elements: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + elements: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Child elements of the footnote.""" @overload @@ -2000,17 +1836,11 @@ class DocumentFormula(_Model): """Formula kind. Required. Known values are: \"inline\" and \"display\".""" value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """LaTex expression describing the formula. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the formula in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the formula in the markdown content.""" - confidence: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + confidence: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Confidence of predicting the formula.""" @overload @@ -2048,19 +1878,13 @@ class DocumentHyperlink(_Model): :vartype source: str """ - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Hyperlinked content. Required.""" url: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """URL of the hyperlink. Required.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the hyperlink in the markdown content.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Position of the hyperlink.""" @overload @@ -2095,17 +1919,11 @@ class DocumentLine(_Model): :vartype span: ~azure.ai.contentunderstanding.models.ContentSpan """ - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Line text. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the line in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the line in the markdown content.""" @overload @@ -2158,9 +1976,7 @@ class DocumentMermaidFigure(DocumentFigure, discriminator="mermaid"): kind: Literal[DocumentFigureKind.MERMAID] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """Figure kind. Required. Figure containing a diagram, such as a flowchart or network diagram.""" - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Diagram content represented using `Mermaid syntax `_. Required.""" @overload @@ -2216,25 +2032,17 @@ class DocumentPage(_Model): :vartype formulas: list[~azure.ai.contentunderstanding.models.DocumentFormula] """ - page_number: int = rest_field( - name="pageNumber", visibility=["read", "create", "update", "delete", "query"] - ) + page_number: int = rest_field(name="pageNumber", visibility=["read", "create", "update", "delete", "query"]) """Page number (1-based). Required.""" - width: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + width: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Width of the page.""" - height: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + height: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Height of the page.""" spans: Optional[list["_models.ContentSpan"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """Span(s) associated with the page in the markdown content.""" - angle: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + angle: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The general orientation of the content in clockwise direction, measured in degrees between (-180, 180]. Only if enableOcr is true.""" words: Optional[list["_models.DocumentWord"]] = rest_field( @@ -2300,17 +2108,11 @@ class DocumentParagraph(_Model): ) """Semantic role of the paragraph. Known values are: \"pageHeader\", \"pageFooter\", \"pageNumber\", \"title\", \"sectionHeading\", \"footnote\", and \"formulaBlock\".""" - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Paragraph text. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the paragraph in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the paragraph in the markdown content.""" @overload @@ -2343,13 +2145,9 @@ class DocumentSection(_Model): :vartype elements: list[str] """ - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the section in the markdown content.""" - elements: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + elements: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Child elements of the section.""" @overload @@ -2393,25 +2191,15 @@ class DocumentTable(_Model): :vartype role: str or ~azure.ai.contentunderstanding.models.SemanticRole """ - row_count: int = rest_field( - name="rowCount", visibility=["read", "create", "update", "delete", "query"] - ) + row_count: int = rest_field(name="rowCount", visibility=["read", "create", "update", "delete", "query"]) """Number of rows in the table. Required.""" - column_count: int = rest_field( - name="columnCount", visibility=["read", "create", "update", "delete", "query"] - ) + column_count: int = rest_field(name="columnCount", visibility=["read", "create", "update", "delete", "query"]) """Number of columns in the table. Required.""" - cells: list["_models.DocumentTableCell"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + cells: list["_models.DocumentTableCell"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Cells contained within the table. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the table in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the table in the markdown content.""" caption: Optional["_models.DocumentCaption"] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -2481,37 +2269,23 @@ class DocumentTableCell(_Model): ) """Table cell kind. Known values are: \"content\", \"rowHeader\", \"columnHeader\", \"stubHead\", and \"description\".""" - row_index: int = rest_field( - name="rowIndex", visibility=["read", "create", "update", "delete", "query"] - ) + row_index: int = rest_field(name="rowIndex", visibility=["read", "create", "update", "delete", "query"]) """Row index of the cell. Required.""" - column_index: int = rest_field( - name="columnIndex", visibility=["read", "create", "update", "delete", "query"] - ) + column_index: int = rest_field(name="columnIndex", visibility=["read", "create", "update", "delete", "query"]) """Column index of the cell. Required.""" - row_span: Optional[int] = rest_field( - name="rowSpan", visibility=["read", "create", "update", "delete", "query"] - ) + row_span: Optional[int] = rest_field(name="rowSpan", visibility=["read", "create", "update", "delete", "query"]) """Number of rows spanned by this cell.""" column_span: Optional[int] = rest_field( name="columnSpan", visibility=["read", "create", "update", "delete", "query"] ) """Number of columns spanned by this cell.""" - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Content of the table cell. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the table cell in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the table cell in the markdown content.""" - elements: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + elements: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Child elements of the table cell.""" @overload @@ -2555,21 +2329,13 @@ class DocumentWord(_Model): :vartype confidence: float """ - content: str = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + content: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Word text. Required.""" - source: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Encoded source that identifies the position of the word in the content.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the word in the markdown content.""" - confidence: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + confidence: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Confidence of predicting the word.""" @overload @@ -2613,9 +2379,7 @@ class IntegerField(ContentField, discriminator="integer"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.INTEGER] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -2667,16 +2431,12 @@ class JsonField(ContentField, discriminator="json"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.JSON] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """Semantic data type of the field value. Required. JSON object.""" - value_json: Optional[Any] = rest_field( - name="valueJson", visibility=["read", "create", "update", "delete", "query"] - ) + value_json: Optional[Any] = rest_field(name="valueJson", visibility=["read", "create", "update", "delete", "query"]) """JSON field value.""" @overload @@ -2713,9 +2473,7 @@ class KnowledgeSource(_Model): """ __mapping__: dict[str, _Model] = {} - kind: str = rest_discriminator( - name="kind", visibility=["read", "create", "update", "delete", "query"] - ) + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) """The kind of knowledge source. Required. \"labeledData\"""" @overload @@ -2752,17 +2510,11 @@ class LabeledDataKnowledgeSource(KnowledgeSource, discriminator="labeledData"): kind: Literal[KnowledgeSourceKind.LABELED_DATA] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """A blob container containing labeled data. Required. A labeled data knowledge source.""" - container_url: str = rest_field( - name="containerUrl", visibility=["read", "create", "update", "delete", "query"] - ) + container_url: str = rest_field(name="containerUrl", visibility=["read", "create", "update", "delete", "query"]) """The URL of the blob container containing labeled data. Required.""" - prefix: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + prefix: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An optional prefix to filter blobs within the container.""" - file_list_path: str = rest_field( - name="fileListPath", visibility=["read", "create", "update", "delete", "query"] - ) + file_list_path: str = rest_field(name="fileListPath", visibility=["read", "create", "update", "delete", "query"]) """An optional path to a file listing specific blobs to include. Required.""" @overload @@ -2806,9 +2558,7 @@ class NumberField(ContentField, discriminator="number"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.NUMBER] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -2860,9 +2610,7 @@ class ObjectField(ContentField, discriminator="object"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.OBJECT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -2918,9 +2666,7 @@ class StringField(ContentField, discriminator="string"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.STRING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -2962,13 +2708,9 @@ class SupportedModels(_Model): :vartype embedding: list[str] """ - completion: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + completion: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Chat completion models supported by the analyzer.""" - embedding: Optional[list[str]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + embedding: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Embedding models supported by the analyzer.""" @overload @@ -3010,9 +2752,7 @@ class TimeField(ContentField, discriminator="time"): """ __mapping__: dict[str, _Model] = {} - type: str = rest_discriminator( - name="type", visibility=["read", "create", "update", "delete", "query"] - ) + type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Semantic data type of the field value. Required. Known values are: \"string\", \"date\", \"time\", \"number\", \"integer\", \"boolean\", \"array\", \"object\", and \"json\".""" field_type: Literal[ContentFieldType.TIME] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore @@ -3067,35 +2807,21 @@ class TranscriptPhrase(_Model): :vartype words: list[~azure.ai.contentunderstanding.models.TranscriptWord] """ - speaker: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + speaker: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Speaker index or name.""" - start_time_ms: int = rest_field( - name="startTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + start_time_ms: int = rest_field(name="startTimeMs", visibility=["read", "create", "update", "delete", "query"]) """Start time of the phrase in milliseconds. Required.""" - end_time_ms: int = rest_field( - name="endTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + end_time_ms: int = rest_field(name="endTimeMs", visibility=["read", "create", "update", "delete", "query"]) """End time of the phrase in milliseconds. Required.""" - locale: Optional[str] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + locale: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Detected locale of the phrase. Ex. en-US.""" text: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Transcript text. Required.""" - confidence: Optional[float] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + confidence: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Confidence of predicting the phrase.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the phrase in the markdown content.""" - words: list["_models.TranscriptWord"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + words: list["_models.TranscriptWord"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """List of words in the phrase. Required.""" @overload @@ -3136,19 +2862,13 @@ class TranscriptWord(_Model): :vartype span: ~azure.ai.contentunderstanding.models.ContentSpan """ - start_time_ms: int = rest_field( - name="startTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + start_time_ms: int = rest_field(name="startTimeMs", visibility=["read", "create", "update", "delete", "query"]) """Start time of the word in milliseconds. Required.""" - end_time_ms: int = rest_field( - name="endTimeMs", visibility=["read", "create", "update", "delete", "query"] - ) + end_time_ms: int = rest_field(name="endTimeMs", visibility=["read", "create", "update", "delete", "query"]) """End time of the word in milliseconds. Required.""" text: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Transcript text. Required.""" - span: Optional["_models.ContentSpan"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + span: Optional["_models.ContentSpan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Span of the word in the markdown content.""" @overload @@ -3231,9 +2951,7 @@ class UsageDetails(_Model): ) """The number of contextualization tokens consumed for preparing context, generating confidence scores, source grounding, and output formatting.""" - tokens: Optional[dict[str, int]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) + tokens: Optional[dict[str, int]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The number of LLM and embedding tokens consumed, grouped by model (ex. GTP 4.1) and type (ex. input, cached input, output).""" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_patch.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_patch.py index 9dee69387cba..fc9276e97b1c 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_patch.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_patch.py @@ -125,9 +125,7 @@ def _parse_operation_id(operation_location_header: str) -> str: match = re.search(regex, operation_location_header) if not match: - raise ValueError( - f"Could not extract operation ID from: {operation_location_header}" - ) + raise ValueError(f"Could not extract operation ID from: {operation_location_header}") return match.group(1) @@ -199,9 +197,7 @@ def from_continuation_token( return cls(client, initial_response, deserialization_callback, polling_method) -def _add_value_property_to_field( - field_class: type, value_attr: str, return_type: Any = Any -) -> None: +def _add_value_property_to_field(field_class: type, value_attr: str, return_type: Any = Any) -> None: """Add a .value property implementation at runtime. This function adds the actual property implementation so IntelliSense works. diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_binary_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_binary_async.py index 6d5f8856a470..c1f11514e282 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_binary_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_binary_async.py @@ -71,9 +71,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_document_from_binary] # Replace with the path to your local document file. file_path = "sample_files/sample_invoice.pdf" @@ -112,18 +110,14 @@ async def main() -> None: print(f"\nNumber of pages: {len(content.pages)}") for page in content.pages: unit = content.unit or "units" - print( - f" Page {page.page_number}: {page.width} x {page.height} {unit}" - ) + print(f" Page {page.page_number}: {page.width} x {page.height} {unit}") # Check for tables if content.tables and len(content.tables) > 0: print(f"\nNumber of tables: {len(content.tables)}") table_counter = 1 for table in content.tables: - print( - f" Table {table_counter}: {table.row_count} rows x {table.column_count} columns" - ) + print(f" Table {table_counter}: {table.row_count} rows x {table.column_count} columns") table_counter += 1 # [END access_document_properties] diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_configs_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_configs_async.py index 88785e72ce22..5fd546c0cc4e 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_configs_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_configs_async.py @@ -72,9 +72,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_with_configs] file_path = "sample_files/sample_document_features.pdf" @@ -82,9 +80,7 @@ async def main() -> None: pdf_bytes = f.read() print(f"Analyzing {file_path} with prebuilt-documentSearch...") - print( - "Note: prebuilt-documentSearch has formulas, layout, and OCR enabled by default." - ) + print("Note: prebuilt-documentSearch has formulas, layout, and OCR enabled by default.") # Analyze with prebuilt-documentSearch which has formulas, layout, and OCR enabled poller = await client.begin_analyze_binary( @@ -102,17 +98,13 @@ async def main() -> None: if isinstance(figure, DocumentChartFigure): print(f" Chart ID: {figure.id}") print(f" Description: {figure.description or '(not available)'}") - print( - f" Caption: {figure.caption.content if figure.caption else '(not available)'}" - ) + print(f" Caption: {figure.caption.content if figure.caption else '(not available)'}") # [END extract_charts] # [START extract_hyperlinks] # Extract hyperlinks from document content (enabled by EnableLayout config) doc_content = cast(DocumentContent, result.contents[0]) - print( - f"Found {len(doc_content.hyperlinks) if doc_content.hyperlinks else 0} hyperlink(s)" - ) + print(f"Found {len(doc_content.hyperlinks) if doc_content.hyperlinks else 0} hyperlink(s)") for hyperlink in doc_content.hyperlinks or []: print(f" URL: {hyperlink.url or '(not available)'}") print(f" Content: {hyperlink.content or '(not available)'}") @@ -128,24 +120,18 @@ async def main() -> None: for formula in all_formulas: print(f" Formula Kind: {formula.kind}") print(f" LaTeX: {formula.value or '(not available)'}") - print( - f" Confidence: {f'{formula.confidence:.2f}' if formula.confidence else 'N/A'}" - ) + print(f" Confidence: {f'{formula.confidence:.2f}' if formula.confidence else 'N/A'}") # [END extract_formulas] # [START extract_annotations] # Extract annotations from document content (enabled by EnableLayout config) document = cast(DocumentContent, result.contents[0]) - print( - f"Found {len(document.annotations) if document.annotations else 0} annotation(s)" - ) + print(f"Found {len(document.annotations) if document.annotations else 0} annotation(s)") for annotation in document.annotations or []: print(f" Annotation ID: {annotation.id}") print(f" Kind: {annotation.kind}") print(f" Author: {annotation.author or '(not available)'}") - print( - f" Comments: {len(annotation.comments) if annotation.comments else 0}" - ) + print(f" Comments: {len(annotation.comments) if annotation.comments else 0}") for comment in annotation.comments or []: print(f" - {comment.message}") # [END extract_annotations] diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_invoice_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_invoice_async.py index 6cbea029dc7d..fe46eaac3f72 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_invoice_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_invoice_async.py @@ -80,9 +80,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_invoice] # You can replace this URL with your own invoice file URL invoice_url = "https://raw.githubusercontent.com/Azure-Samples/azure-ai-content-understanding-assets/main/document/invoice.pdf" @@ -108,9 +106,7 @@ async def main() -> None: # Print document unit information # The unit indicates the measurement system used for coordinates in the source field print(f"Document unit: {document_content.unit or 'unknown'}") - print( - f"Pages: {document_content.start_page_number} to {document_content.end_page_number}" - ) + print(f"Pages: {document_content.start_page_number} to {document_content.end_page_number}") # Print page dimensions if available if document_content.pages and len(document_content.pages) > 0: @@ -125,9 +121,7 @@ async def main() -> None: # Extract simple string fields customer_name_field = document_content.fields.get("CustomerName") - print( - f"Customer Name: {customer_name_field.value or '(None)' if customer_name_field else '(None)'}" - ) + print(f"Customer Name: {customer_name_field.value or '(None)' if customer_name_field else '(None)'}") if customer_name_field: print( f" Confidence: {customer_name_field.confidence:.2f}" @@ -137,15 +131,11 @@ async def main() -> None: print(f" Source: {customer_name_field.source or 'N/A'}") if customer_name_field.spans and len(customer_name_field.spans) > 0: span = customer_name_field.spans[0] - print( - f" Position in markdown: offset={span.offset}, length={span.length}" - ) + print(f" Position in markdown: offset={span.offset}, length={span.length}") # Extract simple date field invoice_date_field = document_content.fields.get("InvoiceDate") - print( - f"Invoice Date: {invoice_date_field.value or '(None)' if invoice_date_field else '(None)'}" - ) + print(f"Invoice Date: {invoice_date_field.value or '(None)' if invoice_date_field else '(None)'}") if invoice_date_field: print( f" Confidence: {invoice_date_field.confidence:.2f}" @@ -155,9 +145,7 @@ async def main() -> None: print(f" Source: {invoice_date_field.source or 'N/A'}") if invoice_date_field.spans and len(invoice_date_field.spans) > 0: span = invoice_date_field.spans[0] - print( - f" Position in markdown: offset={span.offset}, length={span.length}" - ) + print(f" Position in markdown: offset={span.offset}, length={span.length}") # Extract object fields (nested structures) total_amount_field = document_content.fields.get("TotalAmount") @@ -166,9 +154,7 @@ async def main() -> None: currency_field = total_amount_field.value.get("CurrencyCode") amount = amount_field.value if amount_field else None # Use currency value if present, otherwise default to "" - currency = ( - currency_field.value if currency_field and currency_field.value else "" - ) + currency = currency_field.value if currency_field and currency_field.value else "" if isinstance(amount, (int, float)): print(f"\nTotal: {currency}{amount:.2f}") else: @@ -178,11 +164,7 @@ async def main() -> None: if amount_field and amount_field.confidence else " Amount Confidence: N/A" ) - print( - f" Source for Amount: {amount_field.source or 'N/A'}" - if amount_field - else " Source: N/A" - ) + print(f" Source for Amount: {amount_field.source or 'N/A'}" if amount_field else " Source: N/A") # Extract array fields (collections like line items) line_items_field = document_content.fields.get("LineItems") @@ -192,16 +174,8 @@ async def main() -> None: if isinstance(item, ObjectField) and item.value: description_field = item.value.get("Description") quantity_field = item.value.get("Quantity") - description = ( - description_field.value - if description_field and description_field.value - else "N/A" - ) - quantity = ( - quantity_field.value - if quantity_field and quantity_field.value - else "N/A" - ) + description = description_field.value if description_field and description_field.value else "N/A" + quantity = quantity_field.value if quantity_field and quantity_field.value else "N/A" print(f" Item {i}: {description}") print(f" Quantity: {quantity}") print( diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_return_raw_json_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_return_raw_json_async.py index 65225eb8fa0e..6d22998999e6 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_return_raw_json_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_return_raw_json_async.py @@ -59,9 +59,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_return_raw_json] file_path = "sample_files/sample_invoice.pdf" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_url_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_url_async.py index ee2ce930f11a..f507913fc286 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_url_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_analyze_url_async.py @@ -64,9 +64,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_document_from_url] print("=" * 60) print("DOCUMENT ANALYSIS FROM URL") @@ -92,9 +90,7 @@ async def main() -> None: # DocumentContent derives from AnalysisContent and provides additional properties # to access full information about document, including Pages, Tables and many others document_content = cast(DocumentContent, content) - print( - f"\nPages: {document_content.start_page_number} - {document_content.end_page_number}" - ) + print(f"\nPages: {document_content.start_page_number} - {document_content.end_page_number}") # Check for pages if document_content.pages and len(document_content.pages) > 0: @@ -130,15 +126,11 @@ async def main() -> None: print("Markdown:") print(video_content.markdown) - summary = ( - video_content.fields.get("Summary") if video_content.fields else None - ) + summary = video_content.fields.get("Summary") if video_content.fields else None if summary and hasattr(summary, "value"): print(f"Summary: {summary.value}") - print( - f"Start: {video_content.start_time_ms} ms, End: {video_content.end_time_ms} ms" - ) + print(f"Start: {video_content.start_time_ms} ms, End: {video_content.end_time_ms} ms") print(f"Frame size: {video_content.width} x {video_content.height}") print("---------------------") @@ -172,10 +164,7 @@ async def main() -> None: print(f"Summary: {summary.value}") # Example: Access an additional field in AudioVisualContent (transcript phrases) - if ( - audio_content.transcript_phrases - and len(audio_content.transcript_phrases) > 0 - ): + if audio_content.transcript_phrases and len(audio_content.transcript_phrases) > 0: print("Transcript (first two phrases):") for phrase in audio_content.transcript_phrases[:2]: print(f" [{phrase.speaker}] {phrase.start_time_ms} ms: {phrase.text}") diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_copy_analyzer_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_copy_analyzer_async.py index 3878d7e67eff..380c421f5120 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_copy_analyzer_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_copy_analyzer_async.py @@ -53,9 +53,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: base_id = f"my_analyzer_{int(time.time())}" source_analyzer_id = f"{base_id}_source" target_analyzer_id = f"{base_id}_target" @@ -104,14 +102,10 @@ async def main() -> None: source_analyzer_info = await client.get_analyzer(analyzer_id=source_analyzer_id) print(f"Source analyzer description: {source_analyzer_info.description}") if source_analyzer_info.tags: - print( - f"Source analyzer tags: {', '.join(f'{k}={v}' for k, v in source_analyzer_info.tags.items())}" - ) + print(f"Source analyzer tags: {', '.join(f'{k}={v}' for k, v in source_analyzer_info.tags.items())}") # [START copy_analyzer] - print( - f"\nCopying analyzer from '{source_analyzer_id}' to '{target_analyzer_id}'..." - ) + print(f"\nCopying analyzer from '{source_analyzer_id}' to '{target_analyzer_id}'...") poller = await client.begin_copy_analyzer( analyzer_id=target_analyzer_id, @@ -134,17 +128,13 @@ async def main() -> None: ) print(f"Updating target analyzer with production tag...") - await client.update_analyzer( - analyzer_id=target_analyzer_id, resource=updated_analyzer - ) + await client.update_analyzer(analyzer_id=target_analyzer_id, resource=updated_analyzer) # Verify the update updated_target = await client.get_analyzer(analyzer_id=target_analyzer_id) print(f"Updated target analyzer description: {updated_target.description}") if updated_target.tags: - print( - f"Updated target analyzer tag: {updated_target.tags.get('modelType', 'N/A')}" - ) + print(f"Updated target analyzer tag: {updated_target.tags.get('modelType', 'N/A')}") # [END update_and_verify_analyzer] # [START delete_copied_analyzers] diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_async.py index 767d7436a145..1fea015230c5 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_async.py @@ -78,9 +78,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START create_analyzer] # Generate a unique analyzer ID analyzer_id = f"my_custom_analyzer_{int(time.time())}" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_with_labels_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_with_labels_async.py index 649935ea9db7..4cd51f6c22d9 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_with_labels_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_analyzer_with_labels_async.py @@ -114,9 +114,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START create_analyzer_with_labels] analyzer_id = f"receipt_analyzer_{int(time.time())}" @@ -176,9 +174,7 @@ async def main() -> None: # Option B: upload local label files and auto-generate a SAS URL if not training_data_sas_url: - storage_account = os.getenv( - "CONTENTUNDERSTANDING_TRAINING_DATA_STORAGE_ACCOUNT" - ) + storage_account = os.getenv("CONTENTUNDERSTANDING_TRAINING_DATA_STORAGE_ACCOUNT") container = os.getenv("CONTENTUNDERSTANDING_TRAINING_DATA_CONTAINER") if storage_account and container: from azure.core.exceptions import ResourceExistsError @@ -212,16 +208,10 @@ async def main() -> None: prefix = os.getenv("CONTENTUNDERSTANDING_TRAINING_DATA_PREFIX") for file_path in local_label_dir.iterdir(): if file_path.is_file() and file_path.name != "README.md": - blob_name = ( - file_path.name - if not prefix - else prefix.rstrip("/") + "/" + file_path.name - ) + blob_name = file_path.name if not prefix else prefix.rstrip("/") + "/" + file_path.name print(f"Uploading {file_path.name} -> {blob_name}") with open(file_path, "rb") as data: - await container_client.upload_blob( - name=blob_name, data=data, overwrite=True - ) + await container_client.upload_blob(name=blob_name, data=data, overwrite=True) # Generate a User Delegation SAS URL (Read + List) for the container blob_service_client = BlobServiceClient( @@ -284,9 +274,7 @@ async def main() -> None: print( f" Fields: {len(result.field_schema.fields) if result.field_schema and result.field_schema.fields else 0}" ) - print( - f" Knowledge sources: {len(result.knowledge_sources) if result.knowledge_sources else 0}" - ) + print(f" Knowledge sources: {len(result.knowledge_sources) if result.knowledge_sources else 0}") # [END create_analyzer_with_labels] # Clean up - delete the analyzer diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_classifier_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_classifier_async.py index 1114c434d766..ec4c63b1c5a6 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_classifier_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_create_classifier_async.py @@ -70,9 +70,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START create_classifier] # Generate a unique analyzer ID analyzer_id = f"my_classifier_{int(time.time())}" @@ -144,18 +142,14 @@ async def main() -> None: # Display classification results if analyze_result.contents and len(analyze_result.contents) > 0: document_content = cast(DocumentContent, analyze_result.contents[0]) - print( - f"Pages: {document_content.start_page_number}-{document_content.end_page_number}" - ) + print(f"Pages: {document_content.start_page_number}-{document_content.end_page_number}") # Display segments (classification results) if document_content.segments and len(document_content.segments) > 0: print(f"\nFound {len(document_content.segments)} segment(s):") for segment in document_content.segments: print(f" Category: {segment.category or '(unknown)'}") - print( - f" Pages: {segment.start_page_number}-{segment.end_page_number}" - ) + print(f" Pages: {segment.start_page_number}-{segment.end_page_number}") print(f" Segment ID: {segment.segment_id or '(not available)'}") print() else: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_analyzer_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_analyzer_async.py index edc70c6cf555..b316311da890 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_analyzer_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_analyzer_async.py @@ -45,9 +45,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START create_simple_analyzer] # Generate a unique analyzer ID analyzer_id = f"my_analyzer_{int(time.time())}" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_result_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_result_async.py index d00c52a56d73..32235d1d644b 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_result_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_delete_result_async.py @@ -58,9 +58,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_and_delete_result] # You can replace this URL with your own invoice file URL document_url = "https://raw.githubusercontent.com/Azure-Samples/azure-ai-content-understanding-assets/main/document/invoice.pdf" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_analyzer_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_analyzer_async.py index 1f5a672fa6a5..a22391ae5cad 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_analyzer_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_analyzer_async.py @@ -58,9 +58,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START get_prebuilt_analyzer] print("Retrieving prebuilt-documentSearch analyzer...") analyzer = await client.get_analyzer(analyzer_id="prebuilt-documentSearch") @@ -146,9 +144,7 @@ async def main() -> None: print("\n" + "=" * 80) print(f"Custom Analyzer '{analyzer_id}':") print("=" * 80) - retrieved_json = json.dumps( - retrieved_analyzer.as_dict(), indent=2, default=str - ) + retrieved_json = json.dumps(retrieved_analyzer.as_dict(), indent=2, default=str) print(retrieved_json) print("=" * 80) finally: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_result_file_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_result_file_async.py index f03d20837044..251b6413019b 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_result_file_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_get_result_file_async.py @@ -56,9 +56,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START analyze_video_for_result_files] # Use a sample video URL to get keyframes for GetResultFile testing # You can replace this with your own video file URL @@ -91,10 +89,7 @@ async def main() -> None: video_content = cast(AudioVisualContent, result.contents[0]) # Print keyframe information - if ( - video_content.key_frame_times_ms - and len(video_content.key_frame_times_ms) > 0 - ): + if video_content.key_frame_times_ms and len(video_content.key_frame_times_ms) > 0: total_keyframes = len(video_content.key_frame_times_ms) first_frame_time_ms = video_content.key_frame_times_ms[0] @@ -127,12 +122,8 @@ async def main() -> None: print(f"Keyframe image saved to: {output_path}") else: print("\nNote: This sample demonstrates GetResultFile API usage.") - print( - " For video analysis with keyframes, use prebuilt-videoSearch analyzer." - ) - print( - " Keyframes are available in AudioVisualContent.key_frame_times_ms." - ) + print(" For video analysis with keyframes, use prebuilt-videoSearch analyzer.") + print(" Keyframes are available in AudioVisualContent.key_frame_times_ms.") # [END get_result_file] if not isinstance(credential, AzureKeyCredential): diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_grant_copy_auth_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_grant_copy_auth_async.py index 59e83da8c893..4990e0a4ef52 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_grant_copy_auth_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_grant_copy_auth_async.py @@ -126,9 +126,7 @@ async def main() -> None: # Get source configuration source_endpoint = os.environ["CONTENTUNDERSTANDING_ENDPOINT"] source_key = os.getenv("CONTENTUNDERSTANDING_KEY") - source_credential = ( - AzureKeyCredential(source_key) if source_key else DefaultAzureCredential() - ) + source_credential = AzureKeyCredential(source_key) if source_key else DefaultAzureCredential() source_resource_id = os.environ["CONTENTUNDERSTANDING_SOURCE_RESOURCE_ID"] source_region = os.environ["CONTENTUNDERSTANDING_SOURCE_REGION"] @@ -136,20 +134,14 @@ async def main() -> None: # Get target configuration target_endpoint = os.environ["CONTENTUNDERSTANDING_TARGET_ENDPOINT"] target_key = os.getenv("CONTENTUNDERSTANDING_TARGET_KEY") - target_credential = ( - AzureKeyCredential(target_key) if target_key else DefaultAzureCredential() - ) + target_credential = AzureKeyCredential(target_key) if target_key else DefaultAzureCredential() target_resource_id = os.environ["CONTENTUNDERSTANDING_TARGET_RESOURCE_ID"] target_region = os.environ["CONTENTUNDERSTANDING_TARGET_REGION"] # Create source and target clients using DefaultAzureCredential - source_client = ContentUnderstandingClient( - endpoint=source_endpoint, credential=source_credential - ) - target_client = ContentUnderstandingClient( - endpoint=target_endpoint, credential=target_credential - ) + source_client = ContentUnderstandingClient(endpoint=source_endpoint, credential=source_credential) + target_client = ContentUnderstandingClient(endpoint=target_endpoint, credential=target_credential) # Generate unique analyzer IDs base_id = f"my_analyzer_{int(time.time())}" @@ -253,9 +245,7 @@ async def main() -> None: # Step 4: Verify the copy # Retrieve the analyzer from the target resource to verify the copy was successful print(f"\nStep 4: Verifying the copied analyzer...") - copied_analyzer = await target_client.get_analyzer( - analyzer_id=target_analyzer_id - ) + copied_analyzer = await target_client.get_analyzer(analyzer_id=target_analyzer_id) print(f" Target Analyzer ID: {copied_analyzer.analyzer_id}") print(f" Description: {copied_analyzer.description}") print(f" Status: {copied_analyzer.status}") @@ -264,27 +254,19 @@ async def main() -> None: finally: # Clean up - create new client instances for cleanup since the original ones are closed print(f"\nCleaning up...") - cleanup_source_client = ContentUnderstandingClient( - endpoint=source_endpoint, credential=source_credential - ) - cleanup_target_client = ContentUnderstandingClient( - endpoint=target_endpoint, credential=target_credential - ) + cleanup_source_client = ContentUnderstandingClient(endpoint=source_endpoint, credential=source_credential) + cleanup_target_client = ContentUnderstandingClient(endpoint=target_endpoint, credential=target_credential) try: async with cleanup_source_client, cleanup_target_client: try: - await cleanup_source_client.delete_analyzer( - analyzer_id=source_analyzer_id - ) + await cleanup_source_client.delete_analyzer(analyzer_id=source_analyzer_id) print(f" Source analyzer '{source_analyzer_id}' deleted.") except Exception: pass try: - await cleanup_target_client.delete_analyzer( - analyzer_id=target_analyzer_id - ) + await cleanup_target_client.delete_analyzer(analyzer_id=target_analyzer_id) print(f" Target analyzer '{target_analyzer_id}' deleted.") except Exception: pass diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_list_analyzers_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_list_analyzers_async.py index 83a81d4f4352..0e80cfe3cfd1 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_list_analyzers_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_list_analyzers_async.py @@ -44,9 +44,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START list_analyzers] print("Listing all available analyzers...") @@ -56,11 +54,7 @@ async def main() -> None: print(f"Found {len(analyzers)} analyzer(s)") # Display summary - prebuilt_count = sum( - 1 - for a in analyzers - if a.analyzer_id and a.analyzer_id.startswith("prebuilt-") - ) + prebuilt_count = sum(1 for a in analyzers if a.analyzer_id and a.analyzer_id.startswith("prebuilt-")) custom_count = len(analyzers) - prebuilt_count print(f" Prebuilt analyzers: {prebuilt_count}") print(f" Custom analyzers: {custom_count}") diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_analyzer_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_analyzer_async.py index 84fefbc0d401..a815a9229b24 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_analyzer_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_analyzer_async.py @@ -49,9 +49,7 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # Create initial analyzer analyzer_id = f"my_analyzer_for_update_{int(time.time())}" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_defaults_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_defaults_async.py index 769bb90caf11..d031e83fc5fc 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_defaults_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_defaults_async.py @@ -93,16 +93,12 @@ async def main() -> None: key = os.getenv("CONTENTUNDERSTANDING_KEY") credential = AzureKeyCredential(key) if key else DefaultAzureCredential() - async with ContentUnderstandingClient( - endpoint=endpoint, credential=credential - ) as client: + async with ContentUnderstandingClient(endpoint=endpoint, credential=credential) as client: # [START update_defaults] # Get deployment names from environment variables gpt_4_1_deployment = os.getenv("GPT_4_1_DEPLOYMENT") gpt_4_1_mini_deployment = os.getenv("GPT_4_1_MINI_DEPLOYMENT") - text_embedding_3_large_deployment = os.getenv( - "TEXT_EMBEDDING_3_LARGE_DEPLOYMENT" - ) + text_embedding_3_large_deployment = os.getenv("TEXT_EMBEDDING_3_LARGE_DEPLOYMENT") # Check if required deployments are configured missing_deployments = [] @@ -118,9 +114,7 @@ async def main() -> None: for deployment in missing_deployments: print(f" - {deployment}") print("\nPlease set these environment variables and try again.") - print( - "The deployment names should match the models you deployed in Microsoft Foundry." - ) + print("The deployment names should match the models you deployed in Microsoft Foundry.") return # Map your deployed models to the models required by prebuilt analyzers @@ -137,9 +131,7 @@ async def main() -> None: } print("Configuring model deployments...") - updated_defaults = await client.update_defaults( - model_deployments=model_deployments - ) + updated_defaults = await client.update_defaults(model_deployments=model_deployments) print("Model deployments configured successfully!") if updated_defaults.model_deployments: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_binary.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_binary.py index 27d73490a99f..8754b64541f1 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_binary.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_binary.py @@ -117,9 +117,7 @@ def main() -> None: print(f"\nNumber of tables: {len(content.tables)}") table_counter = 1 for table in content.tables: - print( - f" Table {table_counter}: {table.row_count} rows x {table.column_count} columns" - ) + print(f" Table {table_counter}: {table.row_count} rows x {table.column_count} columns") table_counter += 1 # [END access_document_properties] diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_configs.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_configs.py index eeb19c84e0aa..9736979b2848 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_configs.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_configs.py @@ -80,9 +80,7 @@ def main() -> None: pdf_bytes = f.read() print(f"Analyzing {file_path} with prebuilt-documentSearch...") - print( - "Note: prebuilt-documentSearch has formulas, layout, and OCR enabled by default." - ) + print("Note: prebuilt-documentSearch has formulas, layout, and OCR enabled by default.") # Analyze with prebuilt-documentSearch which has formulas, layout, and OCR enabled poller = client.begin_analyze_binary( @@ -100,17 +98,13 @@ def main() -> None: if isinstance(figure, DocumentChartFigure): print(f" Chart ID: {figure.id}") print(f" Description: {figure.description or '(not available)'}") - print( - f" Caption: {figure.caption.content if figure.caption else '(not available)'}" - ) + print(f" Caption: {figure.caption.content if figure.caption else '(not available)'}") # [END extract_charts] # [START extract_hyperlinks] # Extract hyperlinks from document content (enabled by EnableLayout config) doc_content = cast(DocumentContent, result.contents[0]) - print( - f"Found {len(doc_content.hyperlinks) if doc_content.hyperlinks else 0} hyperlink(s)" - ) + print(f"Found {len(doc_content.hyperlinks) if doc_content.hyperlinks else 0} hyperlink(s)") for hyperlink in doc_content.hyperlinks or []: print(f" URL: {hyperlink.url or '(not available)'}") print(f" Content: {hyperlink.content or '(not available)'}") @@ -127,17 +121,13 @@ def main() -> None: for formula in all_formulas: print(f" Formula Kind: {formula.kind}") print(f" LaTeX: {formula.value or '(not available)'}") - print( - f" Confidence: {f'{formula.confidence:.2f}' if formula.confidence else 'N/A'}" - ) + print(f" Confidence: {f'{formula.confidence:.2f}' if formula.confidence else 'N/A'}") # [END extract_formulas] # [START extract_annotations] # Extract annotations from document content (enabled by EnableLayout config) document = cast(DocumentContent, result.contents[0]) - print( - f"Found {len(document.annotations) if document.annotations else 0} annotation(s)" - ) + print(f"Found {len(document.annotations) if document.annotations else 0} annotation(s)") for annotation in document.annotations or []: print(f" Annotation ID: {annotation.id}") print(f" Kind: {annotation.kind}") diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_invoice.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_invoice.py index 38542a8a3fa8..281240db4dfb 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_invoice.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_invoice.py @@ -106,9 +106,7 @@ def main() -> None: # Print document unit information # The unit indicates the measurement system used for coordinates in the source field print(f"Document unit: {document_content.unit or 'unknown'}") - print( - f"Pages: {document_content.start_page_number} to {document_content.end_page_number}" - ) + print(f"Pages: {document_content.start_page_number} to {document_content.end_page_number}") # Print page dimensions if available if document_content.pages and len(document_content.pages) > 0: @@ -123,9 +121,7 @@ def main() -> None: # Extract simple string fields customer_name_field = document_content.fields.get("CustomerName") - print( - f"Customer Name: {customer_name_field.value or '(None)' if customer_name_field else '(None)'}" - ) + print(f"Customer Name: {customer_name_field.value or '(None)' if customer_name_field else '(None)'}") if customer_name_field: print( f" Confidence: {customer_name_field.confidence:.2f}" @@ -139,9 +135,7 @@ def main() -> None: # Extract simple date field invoice_date_field = document_content.fields.get("InvoiceDate") - print( - f"Invoice Date: {invoice_date_field.value or '(None)' if invoice_date_field else '(None)'}" - ) + print(f"Invoice Date: {invoice_date_field.value or '(None)' if invoice_date_field else '(None)'}") if invoice_date_field: print( f" Confidence: {invoice_date_field.confidence:.2f}" @@ -160,9 +154,7 @@ def main() -> None: currency_field = total_amount_field.value.get("CurrencyCode") amount = amount_field.value if amount_field else None # Use currency value if present, otherwise default to "" - currency = ( - currency_field.value if currency_field and currency_field.value else "" - ) + currency = currency_field.value if currency_field and currency_field.value else "" if isinstance(amount, (int, float)): print(f"\nTotal: {currency}{amount:.2f}") else: @@ -172,11 +164,7 @@ def main() -> None: if amount_field and amount_field.confidence else " Amount Confidence: N/A" ) - print( - f" Source for Amount: {amount_field.source or 'N/A'}" - if amount_field - else " Source: N/A" - ) + print(f" Source for Amount: {amount_field.source or 'N/A'}" if amount_field else " Source: N/A") # Extract array fields (collections like line items) line_items_field = document_content.fields.get("LineItems") @@ -186,16 +174,8 @@ def main() -> None: if isinstance(item, ObjectField) and item.value: description_field = item.value.get("Description") quantity_field = item.value.get("Quantity") - description = ( - description_field.value - if description_field and description_field.value - else "N/A" - ) - quantity = ( - quantity_field.value - if quantity_field and quantity_field.value - else "N/A" - ) + description = description_field.value if description_field and description_field.value else "N/A" + quantity = quantity_field.value if quantity_field and quantity_field.value else "N/A" print(f" Item {i}: {description}") print(f" Quantity: {quantity}") print( diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_url.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_url.py index 114a4bcb231a..e37bf1dbf243 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_url.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_analyze_url.py @@ -90,9 +90,7 @@ def main() -> None: # DocumentContent derives from AnalysisContent and provides additional properties # to access full information about document, including Pages, Tables and many others document_content = cast(DocumentContent, content) - print( - f"\nPages: {document_content.start_page_number} - {document_content.end_page_number}" - ) + print(f"\nPages: {document_content.start_page_number} - {document_content.end_page_number}") # Check for pages if document_content.pages and len(document_content.pages) > 0: @@ -132,9 +130,7 @@ def main() -> None: if summary and hasattr(summary, "value"): print(f"Summary: {summary.value}") - print( - f"Start: {video_content.start_time_ms} ms, End: {video_content.end_time_ms} ms" - ) + print(f"Start: {video_content.start_time_ms} ms, End: {video_content.end_time_ms} ms") print(f"Frame size: {video_content.width} x {video_content.height}") print("---------------------") @@ -178,7 +174,9 @@ def main() -> None: print("\n" + "=" * 60) print("IMAGE ANALYSIS FROM URL") print("=" * 60) - image_url = "https://raw.githubusercontent.com/Azure-Samples/azure-ai-content-understanding-assets/main/image/pieChart.jpg" + image_url = ( + "https://raw.githubusercontent.com/Azure-Samples/azure-ai-content-understanding-assets/main/image/pieChart.jpg" + ) print(f"Analyzing image from URL with prebuilt-imageSearch...") print(f" URL: {image_url}") diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_copy_analyzer.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_copy_analyzer.py index ceae81e28485..30b444aee9c0 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_copy_analyzer.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_copy_analyzer.py @@ -101,14 +101,10 @@ def main() -> None: source_analyzer_info = client.get_analyzer(analyzer_id=source_analyzer_id) print(f"Source analyzer description: {source_analyzer_info.description}") if source_analyzer_info.tags: - print( - f"Source analyzer tags: {', '.join(f'{k}={v}' for k, v in source_analyzer_info.tags.items())}" - ) + print(f"Source analyzer tags: {', '.join(f'{k}={v}' for k, v in source_analyzer_info.tags.items())}") # [START copy_analyzer] - print( - f"\nCopying analyzer from '{source_analyzer_id}' to '{target_analyzer_id}'..." - ) + print(f"\nCopying analyzer from '{source_analyzer_id}' to '{target_analyzer_id}'...") poller = client.begin_copy_analyzer( analyzer_id=target_analyzer_id, @@ -137,9 +133,7 @@ def main() -> None: updated_target = client.get_analyzer(analyzer_id=target_analyzer_id) print(f"Updated target analyzer description: {updated_target.description}") if updated_target.tags: - print( - f"Updated target analyzer tag: {updated_target.tags.get('modelType', 'N/A')}" - ) + print(f"Updated target analyzer tag: {updated_target.tags.get('modelType', 'N/A')}") # [END update_and_verify_analyzer] # [START delete_copied_analyzers] diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_analyzer_with_labels.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_analyzer_with_labels.py index 0ef30fd20243..d3d8a4ca2964 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_analyzer_with_labels.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_analyzer_with_labels.py @@ -174,9 +174,7 @@ def main() -> None: # Option B: upload local label files and auto-generate a SAS URL if not training_data_sas_url: - storage_account = os.getenv( - "CONTENTUNDERSTANDING_TRAINING_DATA_STORAGE_ACCOUNT" - ) + storage_account = os.getenv("CONTENTUNDERSTANDING_TRAINING_DATA_STORAGE_ACCOUNT") container = os.getenv("CONTENTUNDERSTANDING_TRAINING_DATA_CONTAINER") if storage_account and container: from azure.core.exceptions import ResourceExistsError @@ -199,24 +197,14 @@ def main() -> None: except ResourceExistsError: pass # Container already exists - local_label_dir = Path( - os.path.join( - os.path.dirname(__file__), "sample_files", "training_samples" - ) - ) + local_label_dir = Path(os.path.join(os.path.dirname(__file__), "sample_files", "training_samples")) prefix = os.getenv("CONTENTUNDERSTANDING_TRAINING_DATA_PREFIX") for file_path in local_label_dir.iterdir(): if file_path.is_file() and file_path.name != "README.md": - blob_name = ( - file_path.name - if not prefix - else prefix.rstrip("/") + "/" + file_path.name - ) + blob_name = file_path.name if not prefix else prefix.rstrip("/") + "/" + file_path.name print(f"Uploading {file_path.name} -> {blob_name}") with open(file_path, "rb") as data: - container_client.upload_blob( - name=blob_name, data=data, overwrite=True - ) + container_client.upload_blob(name=blob_name, data=data, overwrite=True) # Generate a User Delegation SAS URL (Read + List) for the container blob_service_client = BlobServiceClient( @@ -274,12 +262,8 @@ def main() -> None: print(f"Analyzer created: {analyzer_id}") print(f" Description: {result.description}") print(f" Base analyzer: {result.base_analyzer_id}") - print( - f" Fields: {len(result.field_schema.fields) if result.field_schema and result.field_schema.fields else 0}" - ) - print( - f" Knowledge sources: {len(result.knowledge_sources) if result.knowledge_sources else 0}" - ) + print(f" Fields: {len(result.field_schema.fields) if result.field_schema and result.field_schema.fields else 0}") + print(f" Knowledge sources: {len(result.knowledge_sources) if result.knowledge_sources else 0}") # [END create_analyzer_with_labels] # Clean up - delete the analyzer diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_classifier.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_classifier.py index 75df2dbeadf2..a079b2f8feaa 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_classifier.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_create_classifier.py @@ -142,9 +142,7 @@ def main() -> None: # Display classification results if analyze_result.contents and len(analyze_result.contents) > 0: document_content = cast(DocumentContent, analyze_result.contents[0]) - print( - f"Pages: {document_content.start_page_number}-{document_content.end_page_number}" - ) + print(f"Pages: {document_content.start_page_number}-{document_content.end_page_number}") # Display segments (classification results) if document_content.segments and len(document_content.segments) > 0: diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_get_result_file.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_get_result_file.py index ed6b63135f68..19e6e7c85914 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_get_result_file.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_get_result_file.py @@ -122,9 +122,7 @@ def main() -> None: print(f"Keyframe image saved to: {output_path}") else: print("\nNote: This sample demonstrates GetResultFile API usage.") - print( - " For video analysis with keyframes, use prebuilt-videoSearch analyzer." - ) + print(" For video analysis with keyframes, use prebuilt-videoSearch analyzer.") print(" Keyframes are available in AudioVisualContent.key_frame_times_ms.") # [END get_result_file] diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_grant_copy_auth.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_grant_copy_auth.py index 17cd03af239c..68e81e01a6f6 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_grant_copy_auth.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_grant_copy_auth.py @@ -125,9 +125,7 @@ def main() -> None: # Get source configuration source_endpoint = os.environ["CONTENTUNDERSTANDING_ENDPOINT"] source_key = os.getenv("CONTENTUNDERSTANDING_KEY") - source_credential = ( - AzureKeyCredential(source_key) if source_key else DefaultAzureCredential() - ) + source_credential = AzureKeyCredential(source_key) if source_key else DefaultAzureCredential() source_resource_id = os.environ["CONTENTUNDERSTANDING_SOURCE_RESOURCE_ID"] source_region = os.environ["CONTENTUNDERSTANDING_SOURCE_REGION"] @@ -135,20 +133,14 @@ def main() -> None: # Get target configuration target_endpoint = os.environ["CONTENTUNDERSTANDING_TARGET_ENDPOINT"] target_key = os.getenv("CONTENTUNDERSTANDING_TARGET_KEY") - target_credential = ( - AzureKeyCredential(target_key) if target_key else DefaultAzureCredential() - ) + target_credential = AzureKeyCredential(target_key) if target_key else DefaultAzureCredential() target_resource_id = os.environ["CONTENTUNDERSTANDING_TARGET_RESOURCE_ID"] target_region = os.environ["CONTENTUNDERSTANDING_TARGET_REGION"] # Create source and target clients using DefaultAzureCredential - source_client = ContentUnderstandingClient( - endpoint=source_endpoint, credential=source_credential - ) - target_client = ContentUnderstandingClient( - endpoint=target_endpoint, credential=target_credential - ) + source_client = ContentUnderstandingClient(endpoint=source_endpoint, credential=source_credential) + target_client = ContentUnderstandingClient(endpoint=target_endpoint, credential=target_credential) # Generate unique analyzer IDs base_id = f"my_analyzer_{int(time.time())}" diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_list_analyzers.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_list_analyzers.py index ecbb626dd418..a4e98d9b66f5 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_list_analyzers.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_list_analyzers.py @@ -54,9 +54,7 @@ def main() -> None: print(f"Found {len(analyzers)} analyzer(s)") # Display summary - prebuilt_count = sum( - 1 for a in analyzers if a.analyzer_id and a.analyzer_id.startswith("prebuilt-") - ) + prebuilt_count = sum(1 for a in analyzers if a.analyzer_id and a.analyzer_id.startswith("prebuilt-")) custom_count = len(analyzers) - prebuilt_count print(f" Prebuilt analyzers: {prebuilt_count}") print(f" Custom analyzers: {custom_count}") diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_update_defaults.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_update_defaults.py index c89168bc7dc6..e4eda3d50f49 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_update_defaults.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_update_defaults.py @@ -114,9 +114,7 @@ def main() -> None: for deployment in missing_deployments: print(f" - {deployment}") print("\nPlease set these environment variables and try again.") - print( - "The deployment names should match the models you deployed in Microsoft Foundry." - ) + print("The deployment names should match the models you deployed in Microsoft Foundry.") return # Map your deployed models to the models required by prebuilt analyzers diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary.py index 18dd12bd0df3..2e9d5ad2296c 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary.py @@ -12,17 +12,17 @@ DESCRIPTION: These tests validate the sample_analyze_binary.py sample code. - + This sample demonstrates how to analyze a PDF file from disk using the `prebuilt-documentSearch` analyzer. The service returns an AnalysisResult that contains an array of AnalysisContent items in AnalysisResult.contents. For documents, each item is a DocumentContent that exposes markdown plus detailed structure such as pages, tables, figures, and paragraphs. - + The prebuilt-documentSearch analyzer transforms unstructured documents into structured, machine- readable data optimized for RAG scenarios. It extracts rich GitHub Flavored Markdown that preserves document structure and can include: structured text, tables (in HTML format), charts and diagrams, mathematical formulas, hyperlinks, barcodes, annotations, and page metadata. - + Content Understanding supports many document types including PDF, Word, Excel, PowerPoint, images (including scanned image files with hand-written text), and more. diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary_async.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary_async.py index c5293815db54..45aaad60e593 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary_async.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/samples/test_sample_analyze_binary_async.py @@ -12,17 +12,17 @@ DESCRIPTION: These tests validate the sample_analyze_binary.py sample code (async version). - + This sample demonstrates how to analyze a PDF file from disk using the `prebuilt-documentSearch` analyzer. The service returns an AnalysisResult that contains an array of AnalysisContent items in AnalysisResult.contents. For documents, each item is a DocumentContent that exposes markdown plus detailed structure such as pages, tables, figures, and paragraphs. - + The prebuilt-documentSearch analyzer transforms unstructured documents into structured, machine- readable data optimized for RAG scenarios. It extracts rich GitHub Flavored Markdown that preserves document structure and can include: structured text, tables (in HTML format), charts and diagrams, mathematical formulas, hyperlinks, barcodes, annotations, and page metadata. - + Content Understanding supports many document types including PDF, Word, Excel, PowerPoint, images (including scanned image files with hand-written text), and more. diff --git a/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/test_model_exports_and_fields.py b/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/test_model_exports_and_fields.py index 46540c74bceb..911796cd6ad6 100644 --- a/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/test_model_exports_and_fields.py +++ b/sdk/contentunderstanding/azure-ai-contentunderstanding/tests/test_model_exports_and_fields.py @@ -36,7 +36,6 @@ ) from azure.ai.contentunderstanding.models._patch import __all__ as patch_all - # Expected .value return types for TYPE_CHECKING redeclarations FIELD_VALUE_TYPES = { "ContentField": (ContentField, Any), @@ -60,17 +59,14 @@ def test_model_importable(self, name): """Every name in models.__all__ must be an importable, non-None attribute.""" attr = getattr(models_module, name, None) assert attr is not None, ( - f"'{name}' is in models.__all__ but is not importable from " - f"azure.ai.contentunderstanding.models" + f"'{name}' is in models.__all__ but is not importable from " f"azure.ai.contentunderstanding.models" ) @pytest.mark.parametrize("name", models_all) def test_model_is_class_or_type(self, name): """Every exported model should be a class, enum, or type alias.""" attr = getattr(models_module, name) - assert isinstance(attr, type) or callable(attr), ( - f"'{name}' should be a class or callable, got {type(attr)}" - ) + assert isinstance(attr, type) or callable(attr), f"'{name}' should be a class or callable, got {type(attr)}" def test_key_models_importable(self): """Explicitly test commonly used models are importable.""" @@ -102,9 +98,7 @@ class TestFieldValueProperty: def test_value_property_exists(self, field_name, field_info): """Verify .value is a property on each field class.""" field_class, _ = field_info - assert hasattr(field_class, "value"), ( - f"{field_name} should have a .value property" - ) + assert hasattr(field_class, "value"), f"{field_name} should have a .value property" assert isinstance( getattr(field_class, "value"), property ), f"{field_name}.value should be a property, got {type(getattr(field_class, 'value'))}" diff --git a/sdk/core/azure-core-experimental/azure/core/experimental/transport/__init__.py b/sdk/core/azure-core-experimental/azure/core/experimental/transport/__init__.py index b55d6dbdd6f3..d7c78f68049e 100644 --- a/sdk/core/azure-core-experimental/azure/core/experimental/transport/__init__.py +++ b/sdk/core/azure-core-experimental/azure/core/experimental/transport/__init__.py @@ -26,7 +26,6 @@ # pylint:disable=undefined-all-variable from typing import List - __all__ = [ "PyodideTransport", "HttpXTransport", diff --git a/sdk/core/azure-core-experimental/azure/core/experimental/transport/_urllib3.py b/sdk/core/azure-core-experimental/azure/core/experimental/transport/_urllib3.py index 445ba2dca626..16c516e4f3d0 100644 --- a/sdk/core/azure-core-experimental/azure/core/experimental/transport/_urllib3.py +++ b/sdk/core/azure-core-experimental/azure/core/experimental/transport/_urllib3.py @@ -39,7 +39,6 @@ from azure.core.rest import HttpRequest as RestHttpRequest, HttpResponse as RestHttpResponse from azure.core.rest._http_response_impl import HttpResponseImpl - DEFAULT_BLOCK_SIZE = 32768 _TYPE_FIELD_VALUE = Union[str, bytes] _TYPE_FIELD_VALUE_TUPLE = Union[ diff --git a/sdk/core/azure-core-experimental/tests/test_pyodide_transport.py b/sdk/core/azure-core-experimental/tests/test_pyodide_transport.py index 709b9b4ca24b..effdd4d02857 100644 --- a/sdk/core/azure-core-experimental/tests/test_pyodide_transport.py +++ b/sdk/core/azure-core-experimental/tests/test_pyodide_transport.py @@ -24,6 +24,7 @@ # # -------------------------------------------------------------------------- """Tests that mock the browser layer.""" + import asyncio import sys from typing import NamedTuple diff --git a/sdk/core/azure-core-experimental/tests/test_streaming.py b/sdk/core/azure-core-experimental/tests/test_streaming.py index 5c519d0eb304..9f6a87ddee9f 100644 --- a/sdk/core/azure-core-experimental/tests/test_streaming.py +++ b/sdk/core/azure-core-experimental/tests/test_streaming.py @@ -17,6 +17,7 @@ compressed_no_header - tar.gz file with {Content-Type: application/gzip} compressed_header - tar.gz file with {Content-Type: application/gzip} and {Content-Encoding: gzip} """ + import pytest from itertools import product diff --git a/sdk/core/azure-core-tracing-opentelemetry/azure/core/tracing/ext/opentelemetry_span/__init__.py b/sdk/core/azure-core-tracing-opentelemetry/azure/core/tracing/ext/opentelemetry_span/__init__.py index 122c1c240c90..084a40be8d3f 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/azure/core/tracing/ext/opentelemetry_span/__init__.py +++ b/sdk/core/azure-core-tracing-opentelemetry/azure/core/tracing/ext/opentelemetry_span/__init__.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Implements azure.core.tracing.AbstractSpan to wrap OpenTelemetry spans.""" + from typing import Any, ContextManager, Dict, Optional, Union, Callable, Sequence, cast, List import warnings @@ -223,11 +224,9 @@ def kind(self, value: SpanKind) -> None: try: self._span_instance._kind = kind # type: ignore[attr-defined] # pylint: disable=protected-access except AttributeError: - warnings.warn( - """Kind must be set while creating the span for OpenTelemetry. It might be possible + warnings.warn("""Kind must be set while creating the span for OpenTelemetry. It might be possible that one of the packages you are using doesn't follow the latest Opentelemetry Spec. - Try updating the azure packages to the latest versions.""" - ) + Try updating the azure packages to the latest versions.""") def __enter__(self) -> "OpenTelemetrySpan": self._current_ctxt_manager = _SuppressionContextManager(self) @@ -327,11 +326,9 @@ def link_from_headers(cls, headers: Dict[str, str], attributes: Optional[Attribu try: current_span._links.append(OpenTelemetryLink(span_ctx, attributes)) # type: ignore # pylint: disable=protected-access except AttributeError: - warnings.warn( - """Link must be added while creating the span for OpenTelemetry. It might be possible + warnings.warn("""Link must be added while creating the span for OpenTelemetry. It might be possible that one of the packages you are using doesn't follow the latest Opentelemetry Spec. - Try updating the azure packages to the latest versions.""" - ) + Try updating the azure packages to the latest versions.""") @classmethod def get_current_span(cls) -> Span: diff --git a/sdk/core/azure-core-tracing-opentelemetry/samples/sample_custom_span_processor.py b/sdk/core/azure-core-tracing-opentelemetry/samples/sample_custom_span_processor.py index 9d1e410abdc4..b5881fc6a3c9 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/samples/sample_custom_span_processor.py +++ b/sdk/core/azure-core-tracing-opentelemetry/samples/sample_custom_span_processor.py @@ -32,7 +32,6 @@ from opentelemetry.sdk.trace import ReadableSpan, TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor, ConsoleSpanExporter - settings.tracing_implementation = "opentelemetry" # In the below example, we use a simple console exporter, uncomment these lines to use diff --git a/sdk/core/azure-core-tracing-opentelemetry/tests/test_tracing_implementations.py b/sdk/core/azure-core-tracing-opentelemetry/tests/test_tracing_implementations.py index 88a418e548eb..e42de9b5f7f6 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/tests/test_tracing_implementations.py +++ b/sdk/core/azure-core-tracing-opentelemetry/tests/test_tracing_implementations.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """The tests for opentelemetry_span.py""" + from unittest import mock from opentelemetry import trace diff --git a/sdk/core/azure-core/azure/core/_pipeline_client_async.py b/sdk/core/azure-core/azure/core/_pipeline_client_async.py index 037b788bd7fa..b6abae7a6295 100644 --- a/sdk/core/azure-core/azure/core/_pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/_pipeline_client_async.py @@ -50,7 +50,6 @@ SensitiveHeaderCleanupPolicy, ) - HTTPRequestType = TypeVar("HTTPRequestType") AsyncHTTPResponseType = TypeVar("AsyncHTTPResponseType", bound="AsyncContextManager") diff --git a/sdk/core/azure-core/azure/core/async_paging.py b/sdk/core/azure-core/azure/core/async_paging.py index 11de9b51e91a..50e15657ca59 100644 --- a/sdk/core/azure-core/azure/core/async_paging.py +++ b/sdk/core/azure-core/azure/core/async_paging.py @@ -38,7 +38,6 @@ from .exceptions import AzureError - _LOGGER = logging.getLogger(__name__) ReturnType = TypeVar("ReturnType") diff --git a/sdk/core/azure-core/azure/core/messaging.py b/sdk/core/azure-core/azure/core/messaging.py index a05739cd45d3..4946436c0565 100644 --- a/sdk/core/azure-core/azure/core/messaging.py +++ b/sdk/core/azure-core/azure/core/messaging.py @@ -13,7 +13,6 @@ from .utils._messaging_shared import _get_json_content from .serialization import NULL - __all__ = ["CloudEvent"] diff --git a/sdk/core/azure-core/azure/core/paging.py b/sdk/core/azure-core/azure/core/paging.py index 51c40e31f01b..44465fd12cff 100644 --- a/sdk/core/azure-core/azure/core/paging.py +++ b/sdk/core/azure-core/azure/core/paging.py @@ -37,7 +37,6 @@ from .exceptions import AzureError - _LOGGER = logging.getLogger(__name__) ReturnType = TypeVar("ReturnType") diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py index 35c88c6a2d9a..a8ef05f70e14 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py @@ -24,6 +24,7 @@ # # -------------------------------------------------------------------------- """Traces network calls using the implementation library from the settings.""" + import logging import sys import urllib.parse diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py b/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py index 15f54f04ed9b..4afba492c39e 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_redirect.py @@ -26,6 +26,7 @@ """ This module is the requests implementation of Pipeline ABC """ + import logging from urllib.parse import urlparse from typing import Optional, TypeVar, Dict, Any, Union, Type diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py b/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py index 727f03fe3db8..01edc9b703fd 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_retry_async.py @@ -26,6 +26,7 @@ """ This module is the requests implementation of Pipeline ABC """ + from typing import TypeVar, Dict, Any, Optional, cast import logging import time diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py index 67fc6aef4e69..9f6766da8f26 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py @@ -26,6 +26,7 @@ """ This module is the requests implementation of Pipeline ABC """ + import json import inspect import logging diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_base.py b/sdk/core/azure-core/azure/core/pipeline/transport/_base.py index 91b43e9bb70f..a9d761b1ddf9 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_base.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_base.py @@ -68,7 +68,6 @@ _parts_helper, ) - HTTPResponseType = TypeVar("HTTPResponseType") HTTPRequestType = TypeVar("HTTPRequestType") DataType = Union[bytes, str, Dict[str, Union[str, int]]] diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_base_async.py b/sdk/core/azure-core/azure/core/pipeline/transport/_base_async.py index 28565a8b70e7..62906c8c8675 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_base_async.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_base_async.py @@ -41,7 +41,6 @@ from ._base import _HttpResponseBase, _HttpClientTransportResponse, HttpRequest from ...utils._pipeline_transport_rest_shared_async import _PartGenerator - AsyncHTTPResponseType = TypeVar("AsyncHTTPResponseType") HTTPResponseType = TypeVar("HTTPResponseType") HTTPRequestType = TypeVar("HTTPRequestType") diff --git a/sdk/core/azure-core/azure/core/polling/_async_poller.py b/sdk/core/azure-core/azure/core/polling/_async_poller.py index 77ed2b353d80..fe2864716381 100644 --- a/sdk/core/azure-core/azure/core/polling/_async_poller.py +++ b/sdk/core/azure-core/azure/core/polling/_async_poller.py @@ -29,7 +29,6 @@ from ..exceptions import AzureError from ._poller import _SansIONoPolling - PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) DeserializationCallbackType = Any diff --git a/sdk/core/azure-core/azure/core/polling/_poller.py b/sdk/core/azure-core/azure/core/polling/_poller.py index 13699b92d50a..67500738690e 100644 --- a/sdk/core/azure-core/azure/core/polling/_poller.py +++ b/sdk/core/azure-core/azure/core/polling/_poller.py @@ -32,7 +32,6 @@ from azure.core.tracing.common import with_current_context from ._utils import _encode_continuation_token, _decode_continuation_token - PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) DeserializationCallbackType = Any diff --git a/sdk/core/azure-core/azure/core/polling/_utils.py b/sdk/core/azure-core/azure/core/polling/_utils.py index 86d6907c0559..ffe1ce79df76 100644 --- a/sdk/core/azure-core/azure/core/polling/_utils.py +++ b/sdk/core/azure-core/azure/core/polling/_utils.py @@ -30,7 +30,6 @@ import json from typing import Any, Dict, Mapping - # Current continuation token version _CONTINUATION_TOKEN_VERSION = 1 diff --git a/sdk/core/azure-core/azure/core/polling/base_polling.py b/sdk/core/azure-core/azure/core/polling/base_polling.py index b88070a59d8c..f1fe54c20c83 100644 --- a/sdk/core/azure-core/azure/core/polling/base_polling.py +++ b/sdk/core/azure-core/azure/core/polling/base_polling.py @@ -63,7 +63,6 @@ _filter_sensitive_headers, ) - HttpRequestType = Union[LegacyHttpRequest, HttpRequest] HttpResponseType = Union[LegacyHttpResponse, HttpResponse] # Sync only AllHttpResponseType = Union[ diff --git a/sdk/core/azure-core/azure/core/serialization.py b/sdk/core/azure-core/azure/core/serialization.py index 65f2608c18d6..7b32b1f8c9fe 100644 --- a/sdk/core/azure-core/azure/core/serialization.py +++ b/sdk/core/azure-core/azure/core/serialization.py @@ -12,7 +12,6 @@ from datetime import datetime, date, time, timedelta from datetime import timezone - __all__ = [ "NULL", "AzureJSONEncoder", diff --git a/sdk/core/azure-core/azure/core/settings.py b/sdk/core/azure-core/azure/core/settings.py index a3640d8c0cbb..a8b3b3dd11ff 100644 --- a/sdk/core/azure-core/azure/core/settings.py +++ b/sdk/core/azure-core/azure/core/settings.py @@ -23,8 +23,8 @@ # THE SOFTWARE. # # -------------------------------------------------------------------------- -"""Provide access to settings for globally used Azure configuration values. -""" +"""Provide access to settings for globally used Azure configuration values.""" + from __future__ import annotations from collections import namedtuple from enum import Enum diff --git a/sdk/core/azure-core/azure/core/tracing/_abstract_span.py b/sdk/core/azure-core/azure/core/tracing/_abstract_span.py index 4dbba3ebb7f1..1fb951483989 100644 --- a/sdk/core/azure-core/azure/core/tracing/_abstract_span.py +++ b/sdk/core/azure-core/azure/core/tracing/_abstract_span.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Protocol that defines what functions wrappers of tracing libraries should implement.""" + from __future__ import annotations from urllib.parse import urlparse @@ -26,7 +27,6 @@ ) from ._models import AttributeValue, SpanKind - HttpResponseType = Union[HttpResponse, AsyncHttpResponse, RestHttpResponse, AsyncRestHttpResponse] HttpRequestType = Union[HttpRequest, RestHttpRequest] diff --git a/sdk/core/azure-core/azure/core/tracing/_models.py b/sdk/core/azure-core/azure/core/tracing/_models.py index 3eeb386d6ec1..93533a37d2bb 100644 --- a/sdk/core/azure-core/azure/core/tracing/_models.py +++ b/sdk/core/azure-core/azure/core/tracing/_models.py @@ -7,7 +7,6 @@ from .._enum_meta import CaseInsensitiveEnumMeta - AttributeValue = Union[ str, bool, diff --git a/sdk/core/azure-core/azure/core/tracing/common.py b/sdk/core/azure-core/azure/core/tracing/common.py index 88772718c1d1..aa122c11cf27 100644 --- a/sdk/core/azure-core/azure/core/tracing/common.py +++ b/sdk/core/azure-core/azure/core/tracing/common.py @@ -24,6 +24,7 @@ # # -------------------------------------------------------------------------- """Common functions shared by both the sync and the async decorators.""" + from contextlib import contextmanager from typing import Any, Optional, Callable, Type, Generator import warnings @@ -32,7 +33,6 @@ from ..instrumentation import get_tracer from ..settings import settings - __all__ = [ "change_context", "with_current_context", diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index abb1c697fd37..02dbbe254bd9 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -24,6 +24,7 @@ # # -------------------------------------------------------------------------- """The decorator to apply if you want the given function traced.""" + from contextvars import ContextVar import functools diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 50cbd50b77c9..363fc40fd2c8 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -24,6 +24,7 @@ # # -------------------------------------------------------------------------- """The decorator to apply if you want the given function traced.""" + from contextvars import ContextVar import functools diff --git a/sdk/core/azure-core/azure/core/utils/__init__.py b/sdk/core/azure-core/azure/core/utils/__init__.py index 0e06c1a3da77..03aa6828ab4c 100644 --- a/sdk/core/azure-core/azure/core/utils/__init__.py +++ b/sdk/core/azure-core/azure/core/utils/__init__.py @@ -29,6 +29,7 @@ building on top of `azure-core`. """ + from ._connection_string_parser import parse_connection_string from ._utils import case_insensitive_dict, CaseInsensitiveDict diff --git a/sdk/core/azure-core/samples/example_tracing.py b/sdk/core/azure-core/samples/example_tracing.py index 9eeddfff54c6..d565559e7743 100644 --- a/sdk/core/azure-core/samples/example_tracing.py +++ b/sdk/core/azure-core/samples/example_tracing.py @@ -15,6 +15,7 @@ USAGE: python example_tracing.py """ + from typing import Iterable, Union, Any from azure.core.tracing.decorator import distributed_trace diff --git a/sdk/core/azure-core/samples/example_truststore_injection.py b/sdk/core/azure-core/samples/example_truststore_injection.py index 83389a2f55ce..2473d27ea431 100644 --- a/sdk/core/azure-core/samples/example_truststore_injection.py +++ b/sdk/core/azure-core/samples/example_truststore_injection.py @@ -34,7 +34,6 @@ from azure.identity.aio import DefaultAzureCredential as AsyncDefaultAzureCredential from azure.storage.blob.aio import BlobServiceClient as AsyncBlobServiceClient - # ============================================================================= # Synchronous Example # ============================================================================= diff --git a/sdk/core/azure-core/samples/example_truststore_ssl_context.py b/sdk/core/azure-core/samples/example_truststore_ssl_context.py index 01d5cda1e2d4..5a77eef15d56 100644 --- a/sdk/core/azure-core/samples/example_truststore_ssl_context.py +++ b/sdk/core/azure-core/samples/example_truststore_ssl_context.py @@ -35,7 +35,6 @@ from azure.storage.blob.aio import BlobServiceClient as AsyncBlobServiceClient from azure.core.pipeline.transport import RequestsTransport, AioHttpTransport - # ============================================================================= # Helper: Custom HTTPAdapter for requests # ============================================================================= diff --git a/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py b/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py index 63e20a2b0562..8e0db4c0ef01 100644 --- a/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py @@ -33,7 +33,6 @@ from utils import HTTP_REQUESTS, request_and_responses_product - # transport = mock.MagicMock(spec=AsyncHttpTransport) # MagicMock support async cxt manager only after 3.8 # https://github.com/python/cpython/pull/9296 diff --git a/sdk/core/azure-core/tests/async_tests/test_paging_async.py b/sdk/core/azure-core/tests/async_tests/test_paging_async.py index 3f372ddba8fe..d865fc4fa276 100644 --- a/sdk/core/azure-core/tests/async_tests/test_paging_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_paging_async.py @@ -31,7 +31,6 @@ import pytest - T = TypeVar("T") diff --git a/sdk/core/azure-core/tests/async_tests/test_pipeline_async.py b/sdk/core/azure-core/tests/async_tests/test_pipeline_async.py index 6fae18e8a4ad..aedeffa5d7b4 100644 --- a/sdk/core/azure-core/tests/async_tests/test_pipeline_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_pipeline_async.py @@ -61,7 +61,6 @@ import pytest from utils import HTTP_REQUESTS - try: from unittest.mock import AsyncMock, PropertyMock except ImportError: diff --git a/sdk/core/azure-core/tests/async_tests/test_retry_policy_async.py b/sdk/core/azure-core/tests/async_tests/test_retry_policy_async.py index f2c10400bdcf..73e4168b53f5 100644 --- a/sdk/core/azure-core/tests/async_tests/test_retry_policy_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_retry_policy_async.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the retry policy.""" + try: from io import BytesIO except ImportError: diff --git a/sdk/core/azure-core/tests/async_tests/test_tracing_policy_async.py b/sdk/core/azure-core/tests/async_tests/test_tracing_policy_async.py index 461f86c574c4..e413dc5f4c2b 100644 --- a/sdk/core/azure-core/tests/async_tests/test_tracing_policy_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_tracing_policy_async.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the distributed tracing policy in an async pipeline.""" + import pytest from azure.core.pipeline import AsyncPipeline diff --git a/sdk/core/azure-core/tests/specs_sdk/modeltypes/modeltypes/models/_patch.py b/sdk/core/azure-core/tests/specs_sdk/modeltypes/modeltypes/models/_patch.py index 20f2cffd6b76..93d2140be350 100644 --- a/sdk/core/azure-core/tests/specs_sdk/modeltypes/modeltypes/models/_patch.py +++ b/sdk/core/azure-core/tests/specs_sdk/modeltypes/modeltypes/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, BinaryIO, Dict, Any, Optional from datetime import date, datetime, time, timedelta, tzinfo from .._utils.model_base import Model as HybridModel, rest_field diff --git a/sdk/core/azure-core/tests/specs_sdk/modeltypes/setup.py b/sdk/core/azure-core/tests/specs_sdk/modeltypes/setup.py index fc46f958dac6..fe35b6133476 100644 --- a/sdk/core/azure-core/tests/specs_sdk/modeltypes/setup.py +++ b/sdk/core/azure-core/tests/specs_sdk/modeltypes/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "modeltypes" PACKAGE_PPRINT_NAME = "Modeltypes" diff --git a/sdk/core/azure-core/tests/test_custom_hook_policy.py b/sdk/core/azure-core/tests/test_custom_hook_policy.py index 402582d148a4..80605e5c21ee 100644 --- a/sdk/core/azure-core/tests/test_custom_hook_policy.py +++ b/sdk/core/azure-core/tests/test_custom_hook_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the custom hook policy.""" + try: from unittest import mock except ImportError: diff --git a/sdk/core/azure-core/tests/test_http_logging_policy.py b/sdk/core/azure-core/tests/test_http_logging_policy.py index dfc397fa1da6..e38b60922b7e 100644 --- a/sdk/core/azure-core/tests/test_http_logging_policy.py +++ b/sdk/core/azure-core/tests/test_http_logging_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the HttpLoggingPolicy.""" + import pytest import logging import types diff --git a/sdk/core/azure-core/tests/test_request_id_policy.py b/sdk/core/azure-core/tests/test_request_id_policy.py index 960b344a6d88..6ceaa1cf4f66 100644 --- a/sdk/core/azure-core/tests/test_request_id_policy.py +++ b/sdk/core/azure-core/tests/test_request_id_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the request id policy.""" + from azure.core.pipeline.policies import RequestIdPolicy from azure.core.pipeline import PipelineRequest, PipelineContext diff --git a/sdk/core/azure-core/tests/test_retry_policy.py b/sdk/core/azure-core/tests/test_retry_policy.py index 3cea17b1c00b..97b58064fef2 100644 --- a/sdk/core/azure-core/tests/test_retry_policy.py +++ b/sdk/core/azure-core/tests/test_retry_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the retry policy.""" + try: from io import BytesIO except ImportError: diff --git a/sdk/core/azure-core/tests/test_tracer_otel.py b/sdk/core/azure-core/tests/test_tracer_otel.py index 2d828eda46bd..0966253a04ec 100644 --- a/sdk/core/azure-core/tests/test_tracer_otel.py +++ b/sdk/core/azure-core/tests/test_tracer_otel.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the OpenTelemetry tracer and span classes.""" + from concurrent.futures import ThreadPoolExecutor, wait import sys import threading diff --git a/sdk/core/azure-core/tests/test_tracing_decorator.py b/sdk/core/azure-core/tests/test_tracing_decorator.py index 6bfbacb76ae0..2e2ec99d8467 100644 --- a/sdk/core/azure-core/tests/test_tracing_decorator.py +++ b/sdk/core/azure-core/tests/test_tracing_decorator.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """The tests for decorators.py and common.py""" + from unittest import mock import time diff --git a/sdk/core/azure-core/tests/test_tracing_policy.py b/sdk/core/azure-core/tests/test_tracing_policy.py index c13330dd14d6..39630b609636 100644 --- a/sdk/core/azure-core/tests/test_tracing_policy.py +++ b/sdk/core/azure-core/tests/test_tracing_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the distributed tracing policy.""" + import logging import time import urllib diff --git a/sdk/core/azure-core/tests/test_user_agent_policy.py b/sdk/core/azure-core/tests/test_user_agent_policy.py index f4121d7eeffa..11b6014280ff 100644 --- a/sdk/core/azure-core/tests/test_user_agent_policy.py +++ b/sdk/core/azure-core/tests/test_user_agent_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the user agent policy.""" + from azure.core.pipeline.policies import UserAgentPolicy from azure.core.pipeline import PipelineRequest, PipelineContext diff --git a/sdk/core/azure-core/tests/tracing_common.py b/sdk/core/azure-core/tests/tracing_common.py index 879997e775a0..e58e54d8af69 100644 --- a/sdk/core/azure-core/tests/tracing_common.py +++ b/sdk/core/azure-core/tests/tracing_common.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Fake implementation of AbstractSpan for tests.""" + from contextlib import contextmanager from azure.core.tracing import HttpSpanMixin, SpanKind from typing import Union, Sequence, Optional, Dict diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/exceptions.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/exceptions.py index e7048db6d7be..c1a5ada8f7e8 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/exceptions.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/exceptions.py @@ -30,7 +30,6 @@ from azure.core.exceptions import ODataV4Format - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication.py index dc824406b80d..047c6ad071c8 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication.py @@ -37,7 +37,6 @@ ) from azure.core.rest import HttpRequest, HttpResponse - HTTPRequestType = Union[LegacyHttpRequest, HttpRequest] HTTPResponseType = Union[LegacyHttpResponse, HttpResponse] TokenCredentialType = TypeVar("TokenCredentialType", bound=Union[TokenCredential, AsyncTokenCredential]) diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication_async.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication_async.py index 4707db700229..8ce7ee25ee0e 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication_async.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_authentication_async.py @@ -42,7 +42,6 @@ from ._authentication import _AuxiliaryAuthenticationPolicyBase - HTTPRequestType = Union[LegacyHttpRequest, HttpRequest] AsyncHTTPResponseType = Union[LegacyAsyncHttpResponse, AsyncHttpResponse] diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_base.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_base.py index 188d6cfcd495..12d686f1cbab 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_base.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/policies/_base.py @@ -39,7 +39,6 @@ ) from azure.core.rest import HttpRequest, HttpResponse, AsyncHttpResponse - _LOGGER = logging.getLogger(__name__) HTTPRequestType = Union[LegacyHttpRequest, HttpRequest] diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py index aee742fec070..c99705cba106 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py @@ -28,7 +28,6 @@ import logging from azure.core import AzureClouds - _LOGGER = logging.getLogger(__name__) _ARMID_RE = re.compile( "(?i)/subscriptions/(?P[^/]+)(/resourceGroups/(?P[^/]+))?" @@ -95,7 +94,7 @@ def parse_resource_id(rid: str) -> Mapping[str, Union[str, int]]: def _populate_alternate_kwargs( - kwargs: MutableMapping[str, Union[None, str, int]] + kwargs: MutableMapping[str, Union[None, str, int]], ) -> Mapping[str, Union[None, str, int]]: """Translates the parsed arguments into a format used by generic ARM commands such as the resource and lock commands. diff --git a/sdk/core/azure-mgmt-core/tests/test_authentication.py b/sdk/core/azure-mgmt-core/tests/test_authentication.py index 9b70b2cec07b..620b8045b366 100644 --- a/sdk/core/azure-mgmt-core/tests/test_authentication.py +++ b/sdk/core/azure-mgmt-core/tests/test_authentication.py @@ -40,7 +40,6 @@ import pytest from unittest.mock import Mock - CLAIM_TOKEN = base64.b64encode(b'{"access_token": {"foo": "bar"}}').decode() CLAIM_NBF = base64.b64encode(b'{"access_token":{"nbf":{"essential":true, "value":"1603742800"}}}').decode() ip_claim = b'{"access_token":{"nbf":{"essential":true,"value":"1610563006"},"xms_rp_ipaddr":{"value":"1.2.3.4"}}}' diff --git a/sdk/core/azure-mgmt-core/tests/test_mgmt_exceptions.py b/sdk/core/azure-mgmt-core/tests/test_mgmt_exceptions.py index 457434917113..4fae7bcc39ab 100644 --- a/sdk/core/azure-mgmt-core/tests/test_mgmt_exceptions.py +++ b/sdk/core/azure-mgmt-core/tests/test_mgmt_exceptions.py @@ -31,7 +31,6 @@ from azure.core.exceptions import HttpResponseError from azure.mgmt.core.exceptions import ARMErrorFormat, TypedErrorInfo - ARMError = functools.partial(HttpResponseError, error_format=ARMErrorFormat) diff --git a/sdk/core/corehttp/corehttp/exceptions.py b/sdk/core/corehttp/corehttp/exceptions.py index a44e8edef12e..ad382a2bc5ff 100644 --- a/sdk/core/corehttp/corehttp/exceptions.py +++ b/sdk/core/corehttp/corehttp/exceptions.py @@ -37,7 +37,6 @@ ) from typing_extensions import Protocol, runtime_checkable - HTTPResponseType = TypeVar("HTTPResponseType") HTTPRequestType = TypeVar("HTTPRequestType") KeyType = TypeVar("KeyType") diff --git a/sdk/core/corehttp/corehttp/instrumentation/tracing/_decorator.py b/sdk/core/corehttp/corehttp/instrumentation/tracing/_decorator.py index 78dff85446c2..f4329f4ae117 100644 --- a/sdk/core/corehttp/corehttp/instrumentation/tracing/_decorator.py +++ b/sdk/core/corehttp/corehttp/instrumentation/tracing/_decorator.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """The decorator to apply if you want the given method traced.""" + from contextvars import ContextVar import functools from typing import Awaitable, Any, TypeVar, overload, Optional, Callable, TYPE_CHECKING diff --git a/sdk/core/corehttp/corehttp/instrumentation/tracing/_models.py b/sdk/core/corehttp/corehttp/instrumentation/tracing/_models.py index 547bad609625..f17ad07dea6a 100644 --- a/sdk/core/corehttp/corehttp/instrumentation/tracing/_models.py +++ b/sdk/core/corehttp/corehttp/instrumentation/tracing/_models.py @@ -8,7 +8,6 @@ from ...utils import CaseInsensitiveEnumMeta - AttributeValue = Union[ str, bool, diff --git a/sdk/core/corehttp/corehttp/instrumentation/tracing/utils.py b/sdk/core/corehttp/corehttp/instrumentation/tracing/utils.py index 31ee90007698..9e6b59305ae7 100644 --- a/sdk/core/corehttp/corehttp/instrumentation/tracing/utils.py +++ b/sdk/core/corehttp/corehttp/instrumentation/tracing/utils.py @@ -3,12 +3,12 @@ # Licensed under the MIT License. # ------------------------------------ """Common tracing functionality for SDK libraries.""" + from typing import Any, Callable from ._tracer import get_tracer from ...settings import settings - __all__ = [ "with_current_context", ] diff --git a/sdk/core/corehttp/corehttp/paging.py b/sdk/core/corehttp/corehttp/paging.py index 69498d027142..ee7080527bd0 100644 --- a/sdk/core/corehttp/corehttp/paging.py +++ b/sdk/core/corehttp/corehttp/paging.py @@ -40,7 +40,6 @@ from .exceptions import BaseError - _LOGGER = logging.getLogger(__name__) ReturnType = TypeVar("ReturnType") diff --git a/sdk/core/corehttp/corehttp/rest/_helpers.py b/sdk/core/corehttp/corehttp/rest/_helpers.py index b9a3147f8723..43a9b03c5ab9 100644 --- a/sdk/core/corehttp/corehttp/rest/_helpers.py +++ b/sdk/core/corehttp/corehttp/rest/_helpers.py @@ -46,7 +46,6 @@ from ..serialization import CoreJSONEncoder from ..utils._utils import get_file_items - ################################### TYPES SECTION ######################### binary_type = str diff --git a/sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py b/sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py index d575f8ce130b..9fc9d10b4a8e 100644 --- a/sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py +++ b/sdk/core/corehttp/corehttp/runtime/_pipeline_client_async.py @@ -50,7 +50,6 @@ NetworkTraceLoggingPolicy, ) - HTTPRequestType = TypeVar("HTTPRequestType") AsyncHTTPResponseType = TypeVar("AsyncHTTPResponseType", bound="AsyncContextManager") diff --git a/sdk/core/corehttp/corehttp/runtime/policies/_retry_async.py b/sdk/core/corehttp/corehttp/runtime/policies/_retry_async.py index d482cce1ab5b..6c361bebe919 100644 --- a/sdk/core/corehttp/corehttp/runtime/policies/_retry_async.py +++ b/sdk/core/corehttp/corehttp/runtime/policies/_retry_async.py @@ -26,6 +26,7 @@ """ This module is the requests implementation of Pipeline ABC """ + from __future__ import annotations from typing import Dict, Any, Optional, cast, TYPE_CHECKING import logging diff --git a/sdk/core/corehttp/corehttp/runtime/policies/_universal.py b/sdk/core/corehttp/corehttp/runtime/policies/_universal.py index cce0989a3ee4..9a196868934f 100644 --- a/sdk/core/corehttp/corehttp/runtime/policies/_universal.py +++ b/sdk/core/corehttp/corehttp/runtime/policies/_universal.py @@ -26,6 +26,7 @@ """ This module is the requests implementation of Pipeline ABC """ + from __future__ import annotations import json import inspect diff --git a/sdk/core/corehttp/corehttp/serialization.py b/sdk/core/corehttp/corehttp/serialization.py index 49c1c6066918..68ed828a3d18 100644 --- a/sdk/core/corehttp/corehttp/serialization.py +++ b/sdk/core/corehttp/corehttp/serialization.py @@ -12,7 +12,6 @@ from datetime import datetime, date, time, timedelta from datetime import timezone - __all__ = [ "NULL", "CoreJSONEncoder", diff --git a/sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py b/sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py index ec74b60cbfe8..f3dfc65e5123 100644 --- a/sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py +++ b/sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py @@ -43,7 +43,6 @@ from ...rest._aiohttp import RestAioHttpTransportResponse from ...utils._utils import get_file_items - if TYPE_CHECKING: from ...rest import ( HttpRequest as RestHttpRequest, diff --git a/sdk/core/corehttp/corehttp/utils/__init__.py b/sdk/core/corehttp/corehttp/utils/__init__.py index de1ccc621f2c..fda2cc85f7e1 100644 --- a/sdk/core/corehttp/corehttp/utils/__init__.py +++ b/sdk/core/corehttp/corehttp/utils/__init__.py @@ -29,6 +29,7 @@ building on top of the core package. """ + from ._utils import case_insensitive_dict, CaseInsensitiveDict from ._enum_meta import CaseInsensitiveEnumMeta diff --git a/sdk/core/corehttp/samples/sample_async_pipeline_client.py b/sdk/core/corehttp/samples/sample_async_pipeline_client.py index 0e05cac9835c..ce418bc1a6c7 100644 --- a/sdk/core/corehttp/samples/sample_async_pipeline_client.py +++ b/sdk/core/corehttp/samples/sample_async_pipeline_client.py @@ -13,6 +13,7 @@ USAGE: python sample_pipeline_client.py """ + import asyncio from typing import Iterable, Union diff --git a/sdk/core/corehttp/samples/sample_tracing.py b/sdk/core/corehttp/samples/sample_tracing.py index 353c1537af48..57ab0ef426f0 100644 --- a/sdk/core/corehttp/samples/sample_tracing.py +++ b/sdk/core/corehttp/samples/sample_tracing.py @@ -14,6 +14,7 @@ USAGE: python sample_tracing.py """ + from typing import Iterable, Union, Any from functools import partial diff --git a/sdk/core/corehttp/tests/async_tests/test_paging_async.py b/sdk/core/corehttp/tests/async_tests/test_paging_async.py index 214fa6edbc3b..05322b812815 100644 --- a/sdk/core/corehttp/tests/async_tests/test_paging_async.py +++ b/sdk/core/corehttp/tests/async_tests/test_paging_async.py @@ -9,7 +9,6 @@ from corehttp.paging import AsyncItemPaged, AsyncList from corehttp.exceptions import HttpResponseError - T = TypeVar("T") diff --git a/sdk/core/corehttp/tests/async_tests/test_retry_policy_async.py b/sdk/core/corehttp/tests/async_tests/test_retry_policy_async.py index 8a6a1e69b822..1762db652cce 100644 --- a/sdk/core/corehttp/tests/async_tests/test_retry_policy_async.py +++ b/sdk/core/corehttp/tests/async_tests/test_retry_policy_async.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the retry policy.""" + from io import BytesIO import tempfile import os diff --git a/sdk/core/corehttp/tests/async_tests/test_streaming_async.py b/sdk/core/corehttp/tests/async_tests/test_streaming_async.py index 8aaad6427958..2836be6c23a8 100644 --- a/sdk/core/corehttp/tests/async_tests/test_streaming_async.py +++ b/sdk/core/corehttp/tests/async_tests/test_streaming_async.py @@ -17,6 +17,7 @@ compressed_no_header - tar.gz file with {Content-Type: application/gzip} compressed_header - tar.gz file with {Content-Type: application/gzip} and {Content-Encoding: gzip} """ + import zlib import pytest diff --git a/sdk/core/corehttp/tests/async_tests/test_tracing_decorator_async.py b/sdk/core/corehttp/tests/async_tests/test_tracing_decorator_async.py index 654d46f077ef..404509d8d77b 100644 --- a/sdk/core/corehttp/tests/async_tests/test_tracing_decorator_async.py +++ b/sdk/core/corehttp/tests/async_tests/test_tracing_decorator_async.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the distributed_trace_async policy.""" + import asyncio import pytest diff --git a/sdk/core/corehttp/tests/async_tests/test_tracing_policy_async.py b/sdk/core/corehttp/tests/async_tests/test_tracing_policy_async.py index e78a2aeecc25..6db121e60b54 100644 --- a/sdk/core/corehttp/tests/async_tests/test_tracing_policy_async.py +++ b/sdk/core/corehttp/tests/async_tests/test_tracing_policy_async.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the distributed tracing policy.""" + import pytest from corehttp.rest import HttpRequest diff --git a/sdk/core/corehttp/tests/test_retry_policy.py b/sdk/core/corehttp/tests/test_retry_policy.py index 7f6d68f27839..1723f605a158 100644 --- a/sdk/core/corehttp/tests/test_retry_policy.py +++ b/sdk/core/corehttp/tests/test_retry_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the retry policy.""" + from io import BytesIO import pytest from itertools import product diff --git a/sdk/core/corehttp/tests/test_settings.py b/sdk/core/corehttp/tests/test_settings.py index 624c0167925f..3256d3bdbc40 100644 --- a/sdk/core/corehttp/tests/test_settings.py +++ b/sdk/core/corehttp/tests/test_settings.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the global settings.""" + from unittest import mock import pytest diff --git a/sdk/core/corehttp/tests/test_streaming.py b/sdk/core/corehttp/tests/test_streaming.py index 0c93fd3a3515..cabea2f9769c 100644 --- a/sdk/core/corehttp/tests/test_streaming.py +++ b/sdk/core/corehttp/tests/test_streaming.py @@ -17,6 +17,7 @@ compressed_no_header - tar.gz file with {Content-Type: application/gzip} compressed_header - tar.gz file with {Content-Type: application/gzip} and {Content-Encoding: gzip} """ + import pytest from corehttp.rest import HttpRequest diff --git a/sdk/core/corehttp/tests/test_tracer_otel.py b/sdk/core/corehttp/tests/test_tracer_otel.py index cb54e7920c18..c85e63b2365d 100644 --- a/sdk/core/corehttp/tests/test_tracer_otel.py +++ b/sdk/core/corehttp/tests/test_tracer_otel.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the OpenTelemetry tracer and span classes.""" + from concurrent.futures import ThreadPoolExecutor, wait import sys import threading diff --git a/sdk/core/corehttp/tests/test_tracing_decorator.py b/sdk/core/corehttp/tests/test_tracing_decorator.py index 3b5d334ef134..918b38646cf1 100644 --- a/sdk/core/corehttp/tests/test_tracing_decorator.py +++ b/sdk/core/corehttp/tests/test_tracing_decorator.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the distributed_trace decorator.""" + import time from corehttp.settings import settings diff --git a/sdk/core/corehttp/tests/test_tracing_policy.py b/sdk/core/corehttp/tests/test_tracing_policy.py index 8b4770107469..0c6d94d723d9 100644 --- a/sdk/core/corehttp/tests/test_tracing_policy.py +++ b/sdk/core/corehttp/tests/test_tracing_policy.py @@ -4,6 +4,7 @@ # license information. # ------------------------------------------------------------------------- """Tests for the distributed tracing policy.""" + from unittest import mock import pytest diff --git a/sdk/core/corehttp/tests/test_user_agent_policy.py b/sdk/core/corehttp/tests/test_user_agent_policy.py index e198f48338fa..081a0aaf6b31 100644 --- a/sdk/core/corehttp/tests/test_user_agent_policy.py +++ b/sdk/core/corehttp/tests/test_user_agent_policy.py @@ -3,6 +3,7 @@ # Licensed under the MIT License. # ------------------------------------ """Tests for the user agent policy.""" + from unittest import mock from corehttp.rest import HttpRequest diff --git a/sdk/core/corehttp/tests/utils.py b/sdk/core/corehttp/tests/utils.py index 1ac923301554..43938dcc9e2e 100644 --- a/sdk/core/corehttp/tests/utils.py +++ b/sdk/core/corehttp/tests/utils.py @@ -12,7 +12,6 @@ from corehttp.rest._http_response_impl import HttpResponseImpl as RestHttpResponse from corehttp.rest._http_response_impl_async import AsyncHttpResponseImpl as RestAsyncHttpResponse - SYNC_TRANSPORTS = [] ASYNC_TRANSPORTS = [] diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/__init__.py index d7501df99558..02100a6e99be 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/__init__.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/__init__.py @@ -66,6 +66,6 @@ "ConnectionRetryPolicy", "ThroughputProperties", "CosmosDict", - "CosmosList" + "CosmosList", ) __version__ = VERSION diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_auth_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_auth_policy.py index 83418e1f375d..04b58c5ba2a9 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_auth_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_auth_policy.py @@ -17,6 +17,7 @@ HTTPRequestType = TypeVar("HTTPRequestType", HttpRequest, LegacyHttpRequest) + # NOTE: This class accesses protected members (_scopes, _token) of the parent class # to implement fallback and scope-switching logic not exposed by the public API. # Composition was considered, but still required accessing protected members, so inheritance is retained @@ -56,10 +57,10 @@ def on_request(self, request: PipelineRequest[HTTPRequestType]) -> None: except HttpResponseError as ex: # Only fallback if not using override, not already tried, and error is AADSTS500011 if ( - not self._override_scope and - not tried_fallback and - self._current_scope != self.AadDefaultScope and - "AADSTS500011" in str(ex) + not self._override_scope + and not tried_fallback + and self._current_scope != self.AadDefaultScope + and "AADSTS500011" in str(ex) ): self._scopes = (self.AadDefaultScope,) self._current_scope = self.AadDefaultScope diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_config.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_config.py index d2b9ed1e2283..a45829228fac 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_config.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_config.py @@ -34,11 +34,12 @@ class CrossRegionHedgingStrategy: :param config: Dictionary containing configuration values, defaults to None :type config: Optional[Dict[str, Any]] :raises ValueError: If configuration values are invalid - + The config dictionary can contain: - threshold_ms: Time in ms before routing to alternate region (default: 500) - threshold_steps_ms: Time interval between routing attempts (default: 100) """ + def __init__(self, config: Optional[dict[str, Any]] = None) -> None: if config is None: self.threshold_ms = DEFAULT_THRESHOLD_MS @@ -54,10 +55,10 @@ def __init__(self, config: Optional[dict[str, Any]] = None) -> None: def _validate_request_hedging_strategy( - config: Optional[Union[bool, dict[str, Any]]] + config: Optional[Union[bool, dict[str, Any]]], ) -> Union[CrossRegionHedgingStrategy, bool, None]: """Validate and create a CrossRegionHedgingStrategy for a request. - + :param config: Configuration for availability strategy. Can be: - None: Returns None (no strategy, uses client default if available) - True: Returns strategy with default values (threshold_ms=500, threshold_steps_ms=100) @@ -74,9 +75,7 @@ def _validate_request_hedging_strategy( return config -def validate_client_hedging_strategy( - config: Union[bool, dict[str, Any]] -) -> Union[CrossRegionHedgingStrategy, None]: +def validate_client_hedging_strategy(config: Union[bool, dict[str, Any]]) -> Union[CrossRegionHedgingStrategy, None]: """Validate and create a CrossRegionHedgingStrategy for the client. :param config: Configuration for availability strategy. Can be: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler.py index bb2d905f19c8..70dde137aa0c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler.py @@ -20,6 +20,7 @@ # SOFTWARE. """Module for handling request availability strategies in Azure Cosmos DB.""" + import copy import os import time @@ -36,6 +37,7 @@ ResponseType = Tuple[Dict[str, Any], Dict[str, Any]] + class CrossRegionHedgingHandler(AvailabilityStrategyHandlerMixin): """Handler for CrossRegionHedgingStrategy that implements cross-region request hedging.""" @@ -50,7 +52,7 @@ def execute_single_request_with_delay( location_index: int, available_locations: List[str], complete_status: Event, - first_request_params_holder: SimpleNamespace + first_request_params_holder: SimpleNamespace, ) -> ResponseType: """Execute a single request. @@ -86,8 +88,7 @@ def execute_single_request_with_delay( else: # Subsequent requests after threshold steps steps = location_index - 1 - delay = (availability_strategy.threshold_ms + - (steps * availability_strategy.threshold_steps_ms)) + delay = availability_strategy.threshold_ms + (steps * availability_strategy.threshold_steps_ms) if delay > 0: time.sleep(delay / 1000) @@ -99,9 +100,7 @@ def execute_single_request_with_delay( # Setup excluded regions for hedging requests params.excluded_locations = self._create_excluded_regions_for_hedging( - location_index, - available_locations, - request_params.excluded_locations + location_index, available_locations, request_params.excluded_locations ) req = copy.deepcopy(request) @@ -118,7 +117,7 @@ def execute_request( request_params: RequestObject, global_endpoint_manager: _GlobalPartitionEndpointManagerForCircuitBreaker, request: HttpRequest, - execute_request_fn: Callable[..., ResponseType] + execute_request_fn: Callable[..., ResponseType], ) -> ResponseType: """Execute request with cross-region hedging strategy. @@ -155,7 +154,7 @@ def execute_request( location_index=i, available_locations=available_locations, complete_status=completion_status, - first_request_params_holder=first_request_params_holder + first_request_params_holder=first_request_params_holder, ) futures.append(future) if i == 0: @@ -190,9 +189,8 @@ def execute_request( raise exc def _record_cancel_for_first_request( - self, - request_params_holder: SimpleNamespace, - global_endpoint_manager: Any) -> None: + self, request_params_holder: SimpleNamespace, global_endpoint_manager: Any + ) -> None: """Record failure for the first request when a subsequent hedged request succeeds. :param request_params_holder: Container holding the request parameters for the first request @@ -207,11 +205,12 @@ def _record_cancel_for_first_request( # Global handler instance _cross_region_hedging_handler = CrossRegionHedgingHandler() + def execute_with_hedging( request_params: RequestObject, global_endpoint_manager: _GlobalPartitionEndpointManagerForCircuitBreaker, request: HttpRequest, - execute_request_fn: Callable[..., ResponseType] + execute_request_fn: Callable[..., ResponseType], ) -> ResponseType: """Execute a request with hedging based on the availability strategy. @@ -228,8 +227,5 @@ def execute_with_hedging( :raises: Any exceptions raised by the hedging handler's execute_request method """ return _cross_region_hedging_handler.execute_request( - request_params, - global_endpoint_manager, - request, - execute_request_fn + request_params, global_endpoint_manager, request, execute_request_fn ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler_base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler_base.py index be2b8399d6cd..c53581ae1588 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler_base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_availability_strategy_handler_base.py @@ -30,13 +30,16 @@ from .documents import _OperationType from .http_constants import StatusCodes, SubStatusCodes -GlobalEndpointManagerType = Union['_GlobalPartitionEndpointManagerForCircuitBreaker', - '_GlobalPartitionEndpointManagerForCircuitBreakerAsync'] +GlobalEndpointManagerType = Union[ + "_GlobalPartitionEndpointManagerForCircuitBreaker", "_GlobalPartitionEndpointManagerForCircuitBreakerAsync" +] if TYPE_CHECKING: from ._global_partition_endpoint_manager_circuit_breaker import _GlobalPartitionEndpointManagerForCircuitBreaker - from .aio._global_partition_endpoint_manager_circuit_breaker_async import \ - _GlobalPartitionEndpointManagerForCircuitBreakerAsync + from .aio._global_partition_endpoint_manager_circuit_breaker_async import ( + _GlobalPartitionEndpointManagerForCircuitBreakerAsync, + ) + class AvailabilityStrategyHandlerMixin: """Mixin class providing shared functionality for availability strategy handlers.""" @@ -45,12 +48,12 @@ def _create_excluded_regions_for_hedging( self, location_index: int, available_locations: List[str], - existing_excluded_locations: Optional[List[str]] = None + existing_excluded_locations: Optional[List[str]] = None, ) -> List[str]: """Set up excluded regions for hedging requests. - + Excludes all regions except the target region, while preserving any existing exclusions. - + :param location_index: Index of current target location :type location_index: int :param available_locations: List of available locations @@ -65,7 +68,7 @@ def _create_excluded_regions_for_hedging( # Add additional excluded regions for hedging if location_index > 0: - excluded += available_locations[:location_index] + available_locations[location_index+1:] + excluded += available_locations[:location_index] + available_locations[location_index + 1 :] return excluded @@ -86,17 +89,18 @@ def _is_non_transient_error(self, result: BaseException) -> bool: StatusCodes.METHOD_NOT_ALLOWED, StatusCodes.PRECONDITION_FAILED, StatusCodes.REQUEST_ENTITY_TOO_LARGE, - StatusCodes.UNAUTHORIZED + StatusCodes.UNAUTHORIZED, ] - return (status_code in non_transient_status_codes or - (status_code == StatusCodes.NOT_FOUND and sub_status == SubStatusCodes.UNKNOWN)) + return status_code in non_transient_status_codes or ( + status_code == StatusCodes.NOT_FOUND and sub_status == SubStatusCodes.UNKNOWN + ) return False def _get_applicable_endpoints( - self, - request: RequestObject, global_endpoint_manager: GlobalEndpointManagerType) -> List[str]: + self, request: RequestObject, global_endpoint_manager: GlobalEndpointManagerType + ) -> List[str]: """Get list of applicable endpoints for hedging based on operation type. - + :param request: Request object containing operation type and other parameters :type request: RequestObject :param global_endpoint_manager: Manager for endpoint routing and availability @@ -113,10 +117,9 @@ def _get_applicable_endpoints( if regional_context_list: for regional_context in regional_context_list: - region_name = ( - global_endpoint_manager.get_region_name( - regional_context.get_primary(), - _OperationType.IsWriteOperation(request.operation_type))) + region_name = global_endpoint_manager.get_region_name( + regional_context.get_primary(), _OperationType.IsWriteOperation(request.operation_type) + ) if region_name is not None: applicable_endpoints.append(region_name) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py index fb8e78d232db..91b8805481a5 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_base.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Base functions in the Azure Cosmos database service. -""" +"""Base functions in the Azure Cosmos database service.""" import base64 import time @@ -48,34 +47,35 @@ from ._cosmos_client_connection import CosmosClientConnection from .aio._cosmos_client_connection_async import CosmosClientConnection as AsyncClientConnection from ._global_partition_endpoint_manager_per_partition_automatic_failover import ( - _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover) + _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, + ) from ._request_object import RequestObject from ._routing.routing_range import PartitionKeyRangeWrapper # pylint: disable=protected-access -#cspell:ignore PPAF, ppaf +# cspell:ignore PPAF, ppaf _COMMON_OPTIONS = { - 'initial_headers': 'initialHeaders', - 'pre_trigger_include': 'preTriggerInclude', - 'post_trigger_include': 'postTriggerInclude', - 'access_condition': 'accessCondition', - 'session_token': 'sessionToken', - 'resource_token_expiry_seconds': 'resourceTokenExpirySeconds', - 'offer_enable_ru_per_minute_throughput': 'offerEnableRUPerMinuteThroughput', - 'disable_ru_per_minute_usage': 'disableRUPerMinuteUsage', - 'continuation': 'continuation', - 'content_type': 'contentType', - 'is_query_plan_request': 'isQueryPlanRequest', - 'supported_query_features': 'supportedQueryFeatures', - 'query_version': 'queryVersion', - 'priority': 'priorityLevel', - 'no_response': 'responsePayloadOnWriteDisabled', - 'retry_write': Constants.Kwargs.RETRY_WRITE, - 'max_item_count': 'maxItemCount', - 'throughput_bucket': 'throughputBucket', - 'excluded_locations': Constants.Kwargs.EXCLUDED_LOCATIONS, - "availability_strategy": Constants.Kwargs.AVAILABILITY_STRATEGY + "initial_headers": "initialHeaders", + "pre_trigger_include": "preTriggerInclude", + "post_trigger_include": "postTriggerInclude", + "access_condition": "accessCondition", + "session_token": "sessionToken", + "resource_token_expiry_seconds": "resourceTokenExpirySeconds", + "offer_enable_ru_per_minute_throughput": "offerEnableRUPerMinuteThroughput", + "disable_ru_per_minute_usage": "disableRUPerMinuteUsage", + "continuation": "continuation", + "content_type": "contentType", + "is_query_plan_request": "isQueryPlanRequest", + "supported_query_features": "supportedQueryFeatures", + "query_version": "queryVersion", + "priority": "priorityLevel", + "no_response": "responsePayloadOnWriteDisabled", + "retry_write": Constants.Kwargs.RETRY_WRITE, + "max_item_count": "maxItemCount", + "throughput_bucket": "throughputBucket", + "excluded_locations": Constants.Kwargs.EXCLUDED_LOCATIONS, + "availability_strategy": Constants.Kwargs.AVAILABILITY_STRATEGY, } # Cosmos resource ID validation regex breakdown: @@ -86,23 +86,23 @@ def _get_match_headers(kwargs: dict[str, Any]) -> Tuple[Optional[str], Optional[str]]: - if_match = kwargs.pop('if_match', None) - if_none_match = kwargs.pop('if_none_match', None) - match_condition = kwargs.pop('match_condition', None) + if_match = kwargs.pop("if_match", None) + if_none_match = kwargs.pop("if_none_match", None) + match_condition = kwargs.pop("match_condition", None) if match_condition == MatchConditions.IfNotModified: - if_match = kwargs.pop('etag', None) + if_match = kwargs.pop("etag", None) if not if_match: raise ValueError("'match_condition' specified without 'etag'.") elif match_condition == MatchConditions.IfPresent: - if_match = '*' + if_match = "*" elif match_condition == MatchConditions.IfModified: - if_none_match = kwargs.pop('etag', None) + if_none_match = kwargs.pop("etag", None) if not if_none_match: raise ValueError("'match_condition' specified without 'etag'.") elif match_condition == MatchConditions.IfMissing: - if_none_match = '*' + if_none_match = "*" elif match_condition is None: - etag = kwargs.pop('etag', None) + etag = kwargs.pop("etag", None) if etag is not None: raise ValueError("'etag' specified without 'match_condition'.") else: @@ -111,28 +111,26 @@ def _get_match_headers(kwargs: dict[str, Any]) -> Tuple[Optional[str], Optional[ def build_options(kwargs: dict[str, Any]) -> dict[str, Any]: - options = kwargs.pop('request_options', kwargs.pop('feed_options', {})) + options = kwargs.pop("request_options", kwargs.pop("feed_options", {})) for key, value in _COMMON_OPTIONS.items(): if key in kwargs: options[value] = kwargs.pop(key) - if 'read_timeout' in kwargs: - options['read_timeout'] = kwargs['read_timeout'] - if 'timeout' in kwargs: - options['timeout'] = kwargs['timeout'] - + if "read_timeout" in kwargs: + options["read_timeout"] = kwargs["read_timeout"] + if "timeout" in kwargs: + options["timeout"] = kwargs["timeout"] options[Constants.OperationStartTime] = time.time() if_match, if_none_match = _get_match_headers(kwargs) if if_match: - options['accessCondition'] = {'type': 'IfMatch', 'condition': if_match} + options["accessCondition"] = {"type": "IfMatch", "condition": if_match} if if_none_match: - options['accessCondition'] = {'type': 'IfNoneMatch', 'condition': if_none_match} + options["accessCondition"] = {"type": "IfNoneMatch", "condition": if_none_match} return options + def _merge_query_results( - results: dict[str, Any], - partial_result: dict[str, Any], - query: Optional[Union[str, dict[str, Any]]] + results: dict[str, Any], partial_result: dict[str, Any], query: Optional[Union[str, dict[str, Any]]] ) -> dict[str, Any]: """Merges partial query results from different partitions. @@ -170,21 +168,21 @@ def _merge_query_results( # Check if both results are aggregate queries is_partial_agg = ( - isinstance(partial_docs, list) - and len(partial_docs) == 1 - and isinstance(partial_docs[0], dict) - and partial_docs[0].get("_aggregate") is not None + isinstance(partial_docs, list) + and len(partial_docs) == 1 + and isinstance(partial_docs[0], dict) + and partial_docs[0].get("_aggregate") is not None ) is_results_agg = ( - results_docs - and isinstance(results_docs, list) - and len(results_docs) == 1 - and isinstance(results_docs[0], dict) - and results_docs[0].get("_aggregate") is not None + results_docs + and isinstance(results_docs, list) + and len(results_docs) == 1 + and isinstance(results_docs[0], dict) + and results_docs[0].get("_aggregate") is not None ) if is_partial_agg and is_results_agg: - agg_results = results_docs[0]["_aggregate"] # type: ignore[index] + agg_results = results_docs[0]["_aggregate"] # type: ignore[index] agg_partial = partial_docs[0]["_aggregate"] for key in agg_partial: if key not in agg_results: @@ -203,15 +201,13 @@ def _merge_query_results( # Check if both are VALUE aggregate queries is_partial_value_agg = ( - isinstance(partial_docs, list) - and len(partial_docs) == 1 - and isinstance(partial_docs[0], (int, float)) + isinstance(partial_docs, list) and len(partial_docs) == 1 and isinstance(partial_docs[0], (int, float)) ) is_results_value_agg = ( - results_docs - and isinstance(results_docs, list) - and len(results_docs) == 1 - and isinstance(results_docs[0], (int, float)) + results_docs + and isinstance(results_docs, list) + and len(results_docs) == 1 + and isinstance(results_docs[0], (int, float)) ) if is_partial_value_agg and is_results_value_agg: @@ -223,11 +219,11 @@ def _merge_query_results( # Without robust query parsing, we can't distinguish them reliably. # Defaulting to sum for COUNT/SUM. MIN/MAX VALUE queries are not fully supported client-side. if " SELECT VALUE MIN" in query_upper: - results_docs[0] = min(results_docs[0], partial_docs[0]) # type: ignore[index] + results_docs[0] = min(results_docs[0], partial_docs[0]) # type: ignore[index] elif " SELECT VALUE MAX" in query_upper: - results_docs[0] = max(results_docs[0], partial_docs[0]) # type: ignore[index] + results_docs[0] = max(results_docs[0], partial_docs[0]) # type: ignore[index] else: # For COUNT/SUM, we sum the partial results - results_docs[0] += partial_docs[0] # type: ignore[index] + results_docs[0] += partial_docs[0] # type: ignore[index] return results # Standard query, append documents @@ -240,16 +236,16 @@ def _merge_query_results( def GetHeaders( # pylint: disable=too-many-statements,too-many-branches - cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], - default_headers: Mapping[str, Any], - verb: str, - path: str, - resource_id: Optional[str], - resource_type: str, - operation_type: str, - options: Mapping[str, Any], - partition_key_range_id: Optional[str] = None, - client_id: Optional[str] = None, + cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], + default_headers: Mapping[str, Any], + verb: str, + path: str, + resource_id: Optional[str], + resource_type: str, + operation_type: str, + options: Mapping[str, Any], + partition_key_range_id: Optional[str] = None, + client_id: Optional[str] = None, ) -> dict[str, Any]: """Gets HTTP request headers. @@ -270,8 +266,9 @@ def GetHeaders( # pylint: disable=too-many-statements,too-many-branches options = options or {} # SDK supported capabilities header for partition merge support - headers[http_constants.HttpHeaders.SDKSupportedCapabilities] = \ + headers[http_constants.HttpHeaders.SDKSupportedCapabilities] = ( http_constants.SDKSupportedCapabilities.PARTITION_MERGE + ) # Generate a new activity ID for each request client side. headers[http_constants.HttpHeaders.ActivityId] = GenerateGuidId() @@ -320,16 +317,16 @@ def GetHeaders( # pylint: disable=too-many-statements,too-many-branches headers[http_constants.HttpHeaders.OfferThroughput] = options["offerThroughput"] if options.get("contentType"): - headers[http_constants.HttpHeaders.ContentType] = options['contentType'] + headers[http_constants.HttpHeaders.ContentType] = options["contentType"] if options.get("isQueryPlanRequest"): - headers[http_constants.HttpHeaders.IsQueryPlanRequest] = options['isQueryPlanRequest'] + headers[http_constants.HttpHeaders.IsQueryPlanRequest] = options["isQueryPlanRequest"] if options.get("supportedQueryFeatures"): - headers[http_constants.HttpHeaders.SupportedQueryFeatures] = options['supportedQueryFeatures'] + headers[http_constants.HttpHeaders.SupportedQueryFeatures] = options["supportedQueryFeatures"] if options.get("queryVersion"): - headers[http_constants.HttpHeaders.QueryVersion] = options['queryVersion'] + headers[http_constants.HttpHeaders.QueryVersion] = options["queryVersion"] if "partitionKey" in options: # if partitionKey value is Undefined, serialize it as [{}] to be consistent with other SDKs. @@ -341,11 +338,12 @@ def GetHeaders( # pylint: disable=too-many-statements,too-many-branches # else serialize using json dumps method which apart from regular values will serialize None into null else: # single partitioning uses a string and needs to be turned into a list - is_sequence_not_string = (isinstance(options["partitionKey"], Sequence) and - not isinstance(options["partitionKey"], str)) + is_sequence_not_string = isinstance(options["partitionKey"], Sequence) and not isinstance( + options["partitionKey"], str + ) if is_sequence_not_string and options["partitionKey"]: - pk_val = json.dumps(list(options["partitionKey"]), separators=(',', ':')) + pk_val = json.dumps(list(options["partitionKey"]), separators=(",", ":")) else: pk_val = json.dumps([options["partitionKey"]]) headers[http_constants.HttpHeaders.PartitionKey] = pk_val @@ -364,7 +362,8 @@ def GetHeaders( # pylint: disable=too-many-statements,too-many-branches if options.get("responseContinuationTokenLimitInKb"): headers[http_constants.HttpHeaders.ResponseContinuationTokenLimitInKb] = options[ - "responseContinuationTokenLimitInKb"] + "responseContinuationTokenLimitInKb" + ] if options.get("priorityLevel"): headers[http_constants.HttpHeaders.PriorityLevel] = options["priorityLevel"] @@ -443,7 +442,7 @@ def GetHeaders( # pylint: disable=too-many-statements,too-many-branches # If it is an operation at the container level, verify the rid of the container to see if the cache needs to be # refreshed. - if resource_type != 'dbs' and options.get("containerRID"): + if resource_type != "dbs" and options.get("containerRID"): headers[http_constants.HttpHeaders.IntendedCollectionRID] = options["containerRID"] if resource_type == "": @@ -453,10 +452,12 @@ def GetHeaders( # pylint: disable=too-many-statements,too-many-branches return headers + def _is_session_token_request( - cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], - headers: dict, - request_object: "RequestObject") -> bool: + cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], + headers: dict, + request_object: "RequestObject", +) -> bool: consistency_level = headers.get(http_constants.HttpHeaders.ConsistencyLevel) # Figure out if consistency level for this request is session is_session_consistency = consistency_level == documents.ConsistencyLevel.Session @@ -464,19 +465,25 @@ def _is_session_token_request( # Verify that it is not a metadata request, and that it is either a read request, batch request, or an account # configured to use multiple write regions. Batch requests are special-cased because they can contain both read and # write operations, and we want to use session consistency for the read operations. - return (is_session_consistency is True and not IsMasterResource(request_object.resource_type) - and (documents._OperationType.IsReadOnlyOperation(request_object.operation_type) - or request_object.operation_type == "Batch" - or cosmos_client_connection._global_endpoint_manager.can_use_multiple_write_locations(request_object))) + return ( + is_session_consistency is True + and not IsMasterResource(request_object.resource_type) + and ( + documents._OperationType.IsReadOnlyOperation(request_object.operation_type) + or request_object.operation_type == "Batch" + or cosmos_client_connection._global_endpoint_manager.can_use_multiple_write_locations(request_object) + ) + ) def set_session_token_header( - cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], - headers: dict, - path: str, - request_object: "RequestObject", - options: Mapping[str, Any], - partition_key_range_id: Optional[str] = None) -> None: + cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], + headers: dict, + path: str, + request_object: "RequestObject", + options: Mapping[str, Any], + partition_key_range_id: Optional[str] = None, +) -> None: # set session token if required if _is_session_token_request(cosmos_client_connection, headers, request_object): # if there is a token set via option, then use it to override default @@ -485,28 +492,33 @@ def set_session_token_header( else: # check if the client's default consistency is session (and request consistency level is same), # then update from session container - if headers[http_constants.HttpHeaders.ConsistencyLevel] == documents.ConsistencyLevel.Session and \ - cosmos_client_connection.session: + if ( + headers[http_constants.HttpHeaders.ConsistencyLevel] == documents.ConsistencyLevel.Session + and cosmos_client_connection.session + ): # urllib_unquote is used to decode the path, as it may contain encoded characters path = urllib_unquote(path) # populate session token from the client's session container - session_token = ( - cosmos_client_connection.session.get_session_token(path, - options.get('partitionKey'), - cosmos_client_connection._container_properties_cache, - cosmos_client_connection._routing_map_provider, - partition_key_range_id, - options)) + session_token = cosmos_client_connection.session.get_session_token( + path, + options.get("partitionKey"), + cosmos_client_connection._container_properties_cache, + cosmos_client_connection._routing_map_provider, + partition_key_range_id, + options, + ) if session_token != "": headers[http_constants.HttpHeaders.SessionToken] = session_token + async def set_session_token_header_async( - cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], - headers: dict, - path: str, - request_object: "RequestObject", - options: Mapping[str, Any], - partition_key_range_id: Optional[str] = None) -> None: + cosmos_client_connection: Union["CosmosClientConnection", "AsyncClientConnection"], + headers: dict, + path: str, + request_object: "RequestObject", + options: Mapping[str, Any], + partition_key_range_id: Optional[str] = None, +) -> None: # set session token if required if _is_session_token_request(cosmos_client_connection, headers, request_object): # if there is a token set via option, then use it to override default @@ -515,21 +527,25 @@ async def set_session_token_header_async( else: # check if the client's default consistency is session (and request consistency level is same), # then update from session container - if headers[http_constants.HttpHeaders.ConsistencyLevel] == documents.ConsistencyLevel.Session and \ - cosmos_client_connection.session: + if ( + headers[http_constants.HttpHeaders.ConsistencyLevel] == documents.ConsistencyLevel.Session + and cosmos_client_connection.session + ): # populate session token from the client's session container # urllib_unquote is used to decode the path, as it may contain encoded characters path = urllib_unquote(path) - session_token = \ - await cosmos_client_connection.session.get_session_token_async(path, - options.get('partitionKey'), - cosmos_client_connection._container_properties_cache, - cosmos_client_connection._routing_map_provider, - partition_key_range_id, - options) + session_token = await cosmos_client_connection.session.get_session_token_async( + path, + options.get("partitionKey"), + cosmos_client_connection._container_properties_cache, + cosmos_client_connection._routing_map_provider, + partition_key_range_id, + options, + ) if session_token != "": headers[http_constants.HttpHeaders.SessionToken] = session_token + def GetResourceIdOrFullNameFromLink(resource_link: str) -> str: """Gets resource id or full name from resource link. @@ -746,7 +762,7 @@ def GetItemContainerInfo(self_link: str, alt_content_path: str, resource_id: str if start_index != -1 and end_index != -1: # parse only the collection rid from the path as it's unique across databases - collection_rid = self_link[start_index + 1:end_index] + collection_rid = self_link[start_index + 1 : end_index] if "colls" in self_link: # this is a collection request @@ -872,7 +888,7 @@ def ParsePaths(paths: list[str]) -> list[str]: newIndex += 1 # This will extract the token excluding the quote chars - token = path[currentIndex + 1: newIndex] + token = path[currentIndex + 1 : newIndex] tokens.append(token) currentIndex = newIndex + 1 else: @@ -903,8 +919,9 @@ def create_scope_from_url(url: str) -> str: def validate_cache_staleness_value(max_integrated_cache_staleness: Any) -> None: int(max_integrated_cache_staleness) # Will throw error if data type cant be converted to int if max_integrated_cache_staleness < 0: - raise ValueError("Parameter 'max_integrated_cache_staleness_in_ms' can only be an " - "integer greater than or equal to zero") + raise ValueError( + "Parameter 'max_integrated_cache_staleness_in_ms' can only be an " "integer greater than or equal to zero" + ) def _validate_resource(resource: Mapping[str, Any]) -> None: @@ -939,10 +956,11 @@ def _set_throughput_options(offer: Optional[Union[int, ThroughputProperties]], r increment_percent = offer.auto_scale_increment_percent if max_throughput is not None: - request_options['autoUpgradePolicy'] = _stringify_auto_scale(offer=offer) + request_options["autoUpgradePolicy"] = _stringify_auto_scale(offer=offer) elif increment_percent: - raise ValueError("auto_scale_max_throughput must be supplied in " - "conjunction with auto_scale_increment_percent") + raise ValueError( + "auto_scale_max_throughput must be supplied in " "conjunction with auto_scale_increment_percent" + ) if offer.offer_throughput: request_options["offerThroughput"] = offer.offer_throughput except AttributeError as e: @@ -951,27 +969,20 @@ def _set_throughput_options(offer: Optional[Union[int, ThroughputProperties]], r def _deserialize_throughput(throughput: list[dict[str, dict[str, Any]]]) -> ThroughputProperties: properties = throughput[0] - offer_autopilot: Optional[dict[str, Any]] = properties['content'].get('offerAutopilotSettings') - if offer_autopilot and 'autoUpgradePolicy' in offer_autopilot: + offer_autopilot: Optional[dict[str, Any]] = properties["content"].get("offerAutopilotSettings") + if offer_autopilot and "autoUpgradePolicy" in offer_autopilot: return ThroughputProperties( properties=properties, - auto_scale_max_throughput=offer_autopilot['maxThroughput'], - auto_scale_increment_percent=offer_autopilot['autoUpgradePolicy']['throughputPolicy']['incrementPercent'] + auto_scale_max_throughput=offer_autopilot["maxThroughput"], + auto_scale_increment_percent=offer_autopilot["autoUpgradePolicy"]["throughputPolicy"]["incrementPercent"], ) if offer_autopilot: - return ThroughputProperties( - properties=properties, - auto_scale_max_throughput=offer_autopilot['maxThroughput'] - ) - return ThroughputProperties( - offer_throughput=properties["content"]["offerThroughput"], - properties=properties - ) + return ThroughputProperties(properties=properties, auto_scale_max_throughput=offer_autopilot["maxThroughput"]) + return ThroughputProperties(offer_throughput=properties["content"]["offerThroughput"], properties=properties) def _replace_throughput( - throughput: Union[int, ThroughputProperties], - new_throughput_properties: dict[str, Any] + throughput: Union[int, ThroughputProperties], new_throughput_properties: dict[str, Any] ) -> None: if isinstance(throughput, int): new_throughput_properties["content"]["offerThroughput"] = throughput @@ -980,9 +991,13 @@ def _replace_throughput( max_throughput = throughput.auto_scale_max_throughput increment_percent = throughput.auto_scale_increment_percent if max_throughput is not None: - new_throughput_properties['content']['offerAutopilotSettings']['maxThroughput'] = max_throughput + new_throughput_properties["content"]["offerAutopilotSettings"]["maxThroughput"] = max_throughput if increment_percent: - new_throughput_properties['content']['offerAutopilotSettings']['autoUpgradePolicy']['throughputPolicy']['incrementPercent'] = increment_percent # pylint: disable=line-too-long + new_throughput_properties["content"]["offerAutopilotSettings"]["autoUpgradePolicy"][ + "throughputPolicy" + ][ + "incrementPercent" + ] = increment_percent # pylint: disable=line-too-long if throughput.offer_throughput: new_throughput_properties["content"]["offerThroughput"] = throughput.offer_throughput except AttributeError as e: @@ -1009,7 +1024,7 @@ def _populate_batch_headers(current_headers: dict[str, Any]) -> None: def _format_batch_operations( - operations: Sequence[Union[Tuple[str, Tuple[Any, ...]], Tuple[str, Tuple[Any, ...], dict[str, Any]]]] + operations: Sequence[Union[Tuple[str, Tuple[Any, ...]], Tuple[str, Tuple[Any, ...], dict[str, Any]]]], ) -> list[dict[str, Any]]: final_operations = [] for index, batch_operation in enumerate(operations): @@ -1025,33 +1040,23 @@ def _format_batch_operations( if len(args) == 1: if operation_type.lower() == "create": - operation = {"operationType": "Create", - "resourceBody": args[0]} + operation = {"operationType": "Create", "resourceBody": args[0]} elif operation_type.lower() == "upsert": - operation = {"operationType": "Upsert", - "resourceBody": args[0]} + operation = {"operationType": "Upsert", "resourceBody": args[0]} elif operation_type.lower() == "read": - operation = {"operationType": "Read", - "id": args[0]} + operation = {"operationType": "Read", "id": args[0]} elif operation_type.lower() == "delete": - operation = {"operationType": "Delete", - "id": args[0]} + operation = {"operationType": "Delete", "id": args[0]} elif len(args) == 2: if operation_type.lower() == "replace": - operation = {"operationType": "Replace", - "id": args[0], - "resourceBody": args[1]} + operation = {"operationType": "Replace", "id": args[0], "resourceBody": args[1]} elif operation_type.lower() == "patch": - operation = {"operationType": "Patch", - "id": args[0], - "resourceBody": {"operations": args[1]}} + operation = {"operationType": "Patch", "id": args[0], "resourceBody": {"operations": args[1]}} filter_predicate = kwargs.pop("filter_predicate", None) if filter_predicate is not None: operation["resourceBody"]["condition"] = filter_predicate else: - raise AttributeError( - f"Operation type or args passed in not recognized for operation with index {index}." - ) + raise AttributeError(f"Operation type or args passed in not recognized for operation with index {index}.") if_match_etag = kwargs.pop("if_match_etag", None) if_none_match_etag = kwargs.pop("if_none_match_etag", None) @@ -1067,10 +1072,13 @@ def _format_batch_operations( def _build_properties_cache(properties: dict[str, Any], container_link: str) -> dict[str, Any]: return { - "_self": properties.get("_self", None), "_rid": properties.get("_rid", None), - "partitionKey": properties.get("partitionKey", None), "container_link": container_link + "_self": properties.get("_self", None), + "_rid": properties.get("_rid", None), + "partitionKey": properties.get("partitionKey", None), + "container_link": container_link, } + def format_pk_range_options(query_options: Mapping[str, Any]) -> dict[str, Any]: """Formats the partition key range options to be used internally from the query ones. :param dict query_options: The query options being used. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_fetcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_fetcher.py index 9ad274028f96..91aea893a426 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_fetcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_fetcher.py @@ -22,6 +22,7 @@ """Internal class for processing change feed implementation in the Azure Cosmos database service. """ + import base64 import json from abc import ABC, abstractmethod @@ -35,24 +36,27 @@ # pylint: disable=protected-access + class ChangeFeedFetcher(ABC): @abstractmethod async def fetch_next_block(self) -> list[dict[str, Any]]: pass + class ChangeFeedFetcherV1(ChangeFeedFetcher): """Internal class for change feed fetch v1 implementation. - This is used when partition key range id is used or when the supplied continuation token is in just simple etag. - Please note v1 does not support split or merge. + This is used when partition key range id is used or when the supplied continuation token is in just simple etag. + Please note v1 does not support split or merge. """ + def __init__( - self, - client, - resource_link: str, - feed_options: dict[str, Any], - fetch_function: Callable[[dict[str, Any]], Awaitable[Tuple[list[dict[str, Any]], dict[str, Any]]]] + self, + client, + resource_link: str, + feed_options: dict[str, Any], + fetch_function: Callable[[dict[str, Any]], Awaitable[Tuple[list[dict[str, Any]], dict[str, Any]]]], ) -> None: self._client = client @@ -60,8 +64,9 @@ def __init__( self._change_feed_state = self._feed_options.pop("changeFeedState") if self._change_feed_state.version != ChangeFeedStateVersion.V1: - raise ValueError(f"ChangeFeedFetcherV1 can not handle change feed state version" - f" {type(self._change_feed_state)}") + raise ValueError( + f"ChangeFeedFetcherV1 can not handle change feed state version" f" {type(self._change_feed_state)}" + ) self._resource_link = resource_link self._fetch_function = fetch_function @@ -72,6 +77,7 @@ async def fetch_next_block(self) -> list[dict[str, Any]]: :return: List of results. :rtype: list """ + async def callback(): return await self.fetch_change_feed_items() @@ -83,21 +89,23 @@ async def fetch_change_feed_items(self) -> list[dict[str, Any]]: self._change_feed_state.populate_feed_options(self._feed_options) is_s_time_first_fetch = self._change_feed_state._continuation is None while True: - (fetched_items, response_headers) = await self._fetch_function(self._feed_options) + fetched_items, response_headers = await self._fetch_function(self._feed_options) continuation_key = http_constants.HttpHeaders.ETag # In change feed queries, the continuation token is always populated. The hasNext() test is whether # there is any items in the response or not. self._change_feed_state.apply_server_response_continuation( - cast(str, response_headers.get(continuation_key)), - bool(fetched_items)) + cast(str, response_headers.get(continuation_key)), bool(fetched_items) + ) if fetched_items: break # When processing from point in time, there will be no initial results being returned, # so we will retry with the new continuation token again - if (self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME - and is_s_time_first_fetch): + if ( + self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME + and is_s_time_first_fetch + ): is_s_time_first_fetch = False else: break @@ -105,15 +113,14 @@ async def fetch_change_feed_items(self) -> list[dict[str, Any]]: class ChangeFeedFetcherV2(object): - """Internal class for change feed fetch v2 implementation. - """ + """Internal class for change feed fetch v2 implementation.""" def __init__( - self, - client, - resource_link: str, - feed_options: dict[str, Any], - fetch_function: Callable[[dict[str, Any]], Awaitable[Tuple[list[dict[str, Any]], dict[str, Any]]]] + self, + client, + resource_link: str, + feed_options: dict[str, Any], + fetch_function: Callable[[dict[str, Any]], Awaitable[Tuple[list[dict[str, Any]], dict[str, Any]]]], ) -> None: self._client = client @@ -121,8 +128,10 @@ def __init__( self._change_feed_state: ChangeFeedStateV2 = self._feed_options.pop("changeFeedState") if self._change_feed_state.version != ChangeFeedStateVersion.V2: - raise ValueError(f"ChangeFeedFetcherV2 can not handle change feed state version " - f"{type(self._change_feed_state.version)}") + raise ValueError( + f"ChangeFeedFetcherV2 can not handle change feed state version " + f"{type(self._change_feed_state.version)}" + ) self._resource_link = resource_link self._fetch_function = fetch_function @@ -139,17 +148,17 @@ async def callback(): try: return await _retry_utility_async.ExecuteAsync( - self._client, - self._client._global_endpoint_manager, - callback) + self._client, self._client._global_endpoint_manager, callback + ) except CosmosHttpResponseError as e: if exceptions._partition_range_is_gone(e) or exceptions._is_partition_split_or_merge(e): # refresh change feed state options = None if "excludedLocations" in self._feed_options: - options = {'excludedLocations': self._feed_options["excludedLocations"]} - await self._change_feed_state.handle_feed_range_gone_async(self._client._routing_map_provider, - self._resource_link, options) + options = {"excludedLocations": self._feed_options["excludedLocations"]} + await self._change_feed_state.handle_feed_range_gone_async( + self._client._routing_map_provider, self._resource_link, options + ) else: raise e @@ -162,15 +171,15 @@ async def fetch_change_feed_items(self) -> list[dict[str, Any]]: is_s_time_first_fetch = True while True: - (fetched_items, response_headers) = await self._fetch_function(self._feed_options) + fetched_items, response_headers = await self._fetch_function(self._feed_options) continuation_key = http_constants.HttpHeaders.ETag # In change feed queries, the continuation token is always populated. The hasNext() test is whether # there is any items in the response or not. self._change_feed_state.apply_server_response_continuation( - cast(str, response_headers.get(continuation_key)), - bool(fetched_items)) + cast(str, response_headers.get(continuation_key)), bool(fetched_items) + ) if fetched_items: self._change_feed_state._continuation._move_to_next_token() @@ -182,8 +191,10 @@ async def fetch_change_feed_items(self) -> list[dict[str, Any]]: # so we will retry with the new continuation token # 2. if the feed range of the changeFeedState span multiple physical partitions # then we will read from the next feed range until we have looped through all physical partitions - if (self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME - and is_s_time_first_fetch): + if ( + self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME + and is_s_time_first_fetch + ): response_headers[continuation_key] = self._get_base64_encoded_continuation() is_s_time_first_fetch = False should_retry = True @@ -200,8 +211,8 @@ async def fetch_change_feed_items(self) -> list[dict[str, Any]]: def _get_base64_encoded_continuation(self) -> str: continuation_json = json.dumps(self._change_feed_state.to_dict()) - json_bytes = continuation_json.encode('utf-8') + json_bytes = continuation_json.encode("utf-8") # Encode the bytes to a Base64 string base64_bytes = base64.b64encode(json_bytes) # Convert the Base64 bytes to a string - return base64_bytes.decode('utf-8') + return base64_bytes.decode("utf-8") diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_iterable.py index cc865a6272f8..727d36d2bb1c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/aio/change_feed_iterable.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Iterable change feed results in the Azure Cosmos database service. -""" +"""Iterable change feed results in the Azure Cosmos database service.""" + from typing import Any, Optional, Callable, Tuple, Awaitable, Union from azure.core.async_paging import AsyncPageIterator @@ -28,9 +28,9 @@ from azure.cosmos._change_feed.aio.change_feed_fetcher import ChangeFeedFetcherV1, ChangeFeedFetcherV2 from azure.cosmos._change_feed.change_feed_state import ChangeFeedState, ChangeFeedStateVersion - # pylint: disable=protected-access + class ChangeFeedIterable(AsyncPageIterator): """Represents an iterable object of the change feed results. @@ -47,11 +47,11 @@ def __init__( ) -> None: """Instantiates a ChangeFeedIterable for non-client side partitioning queries. - :param CosmosClient client: Instance of document client. - :param dict options: The request options for the request. - :param fetch_function: The fetch function. - :param collection_link: The collection resource link. - :param continuation_token: The continuation token passed in from by_page + :param CosmosClient client: Instance of document client. + :param dict options: The request options for the request. + :param fetch_function: The fetch function. + :param collection_link: The collection resource link. + :param continuation_token: The continuation token passed in from by_page """ self._client = client @@ -66,8 +66,11 @@ def __init__( change_feed_state_context = self._options.pop("changeFeedStateContext") - continuation = continuation_token if continuation_token is not None\ + continuation = ( + continuation_token + if continuation_token is not None else change_feed_state_context.pop("continuation", None) + ) # analysis and validate continuation token # there are two types of continuation token we support currently: @@ -77,7 +80,7 @@ def __init__( # v2 version: the continuation token will be base64 encoded composition token # which includes full change feed state if continuation is not None: - if continuation.isdigit() or continuation.strip('\'"').isdigit(): + if continuation.isdigit() or continuation.strip("'\"").isdigit(): change_feed_state_context["continuationPkRangeId"] = continuation else: change_feed_state_context["continuationFeedRange"] = continuation @@ -86,17 +89,13 @@ def __init__( self._options["changeFeedStateContext"] = change_feed_state_context super(ChangeFeedIterable, self).__init__( - self._fetch_next, - self._unpack, # type: ignore[arg-type] - continuation_token=continuation_token) - - async def _unpack( - self, - block: list[dict[str, Any]] - ) -> Tuple[Optional[str], list[dict[str, Any]]]: + self._fetch_next, self._unpack, continuation_token=continuation_token # type: ignore[arg-type] + ) + + async def _unpack(self, block: list[dict[str, Any]]) -> Tuple[Optional[str], list[dict[str, Any]]]: continuation: Optional[str] = None if self._client.last_response_headers: - continuation = self._client.last_response_headers.get('etag') + continuation = self._client.last_response_headers.get("etag") if block: self._did_a_call_already = False @@ -123,26 +122,22 @@ async def _initialize_change_feed_fetcher(self) -> None: conn_properties = await self._options.pop("containerProperties") if change_feed_state_context.get("partitionKey"): change_feed_state_context["partitionKey"] = await change_feed_state_context.pop("partitionKey") - change_feed_state_context["partitionKeyFeedRange"] =\ - await change_feed_state_context.pop("partitionKeyFeedRange") + change_feed_state_context["partitionKeyFeedRange"] = await change_feed_state_context.pop( + "partitionKeyFeedRange" + ) - change_feed_state =\ - ChangeFeedState.from_json(self._collection_link, conn_properties["_rid"], change_feed_state_context) + change_feed_state = ChangeFeedState.from_json( + self._collection_link, conn_properties["_rid"], change_feed_state_context + ) self._options["changeFeedState"] = change_feed_state if change_feed_state.version == ChangeFeedStateVersion.V1: self._change_feed_fetcher = ChangeFeedFetcherV1( - self._client, - self._collection_link, - self._options, - self._fetch_function + self._client, self._collection_link, self._options, self._fetch_function ) else: self._change_feed_fetcher = ChangeFeedFetcherV2( - self._client, - self._collection_link, - self._options, - self._fetch_function + self._client, self._collection_link, self._options, self._fetch_function ) def _validate_change_feed_state_context(self, change_feed_state_context: dict[str, Any]) -> None: @@ -158,9 +153,13 @@ def _validate_change_feed_state_context(self, change_feed_state_context: dict[st else: # validation when no continuation is passed exclusive_keys = ["partitionKeyRangeId", "partitionKey", "feedRange"] - count = sum(1 for key in exclusive_keys if - key in change_feed_state_context and change_feed_state_context[key] is not None) + count = sum( + 1 + for key in exclusive_keys + if key in change_feed_state_context and change_feed_state_context[key] is not None + ) if count > 1: raise ValueError( "partition_key_range_id, partition_key, feed_range are exclusive parameters," - " please only set one of them") + " please only set one of them" + ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_fetcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_fetcher.py index 123c622656ab..f190746ded38 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_fetcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_fetcher.py @@ -22,6 +22,7 @@ """Internal class for processing change feed implementation in the Azure Cosmos database service. """ + import base64 import json from abc import ABC, abstractmethod @@ -34,24 +35,27 @@ # pylint: disable=protected-access + class ChangeFeedFetcher(ABC): @abstractmethod def fetch_next_block(self): pass + class ChangeFeedFetcherV1(ChangeFeedFetcher): """Internal class for change feed fetch v1 implementation. - This is used when partition key range id is used or when the supplied continuation token is in just simple etag. - Please note v1 does not support split or merge. + This is used when partition key range id is used or when the supplied continuation token is in just simple etag. + Please note v1 does not support split or merge. """ + def __init__( - self, - client, - resource_link: str, - feed_options: dict[str, Any], - fetch_function: Callable[[dict[str, Any]], Tuple[list[dict[str, Any]], dict[str, Any]]] + self, + client, + resource_link: str, + feed_options: dict[str, Any], + fetch_function: Callable[[dict[str, Any]], Tuple[list[dict[str, Any]], dict[str, Any]]], ) -> None: self._client = client @@ -59,8 +63,9 @@ def __init__( self._change_feed_state: ChangeFeedStateV1 = self._feed_options.pop("changeFeedState") if self._change_feed_state.version != ChangeFeedStateVersion.V1: - raise ValueError(f"ChangeFeedFetcherV1 can not handle change feed state version" - f" {type(self._change_feed_state)}") + raise ValueError( + f"ChangeFeedFetcherV1 can not handle change feed state version" f" {type(self._change_feed_state)}" + ) self._resource_link = resource_link self._fetch_function = fetch_function @@ -71,6 +76,7 @@ def fetch_next_block(self) -> list[dict[str, Any]]: :return: List of results. :rtype: list """ + def callback(): return self.fetch_change_feed_items() @@ -82,21 +88,23 @@ def fetch_change_feed_items(self) -> list[dict[str, Any]]: self._change_feed_state.populate_feed_options(self._feed_options) is_s_time_first_fetch = self._change_feed_state._continuation is None while True: - (fetched_items, response_headers) = self._fetch_function(self._feed_options) + fetched_items, response_headers = self._fetch_function(self._feed_options) continuation_key = http_constants.HttpHeaders.ETag # In change feed queries, the continuation token is always populated. The hasNext() test is whether # there is any items in the response or not. self._change_feed_state.apply_server_response_continuation( - cast(str, response_headers.get(continuation_key)), - bool(fetched_items)) + cast(str, response_headers.get(continuation_key)), bool(fetched_items) + ) if fetched_items: break # When processing from point in time, there will be no initial results being returned, # so we will retry with the new continuation token again - if (self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME - and is_s_time_first_fetch): + if ( + self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME + and is_s_time_first_fetch + ): is_s_time_first_fetch = False else: break @@ -104,23 +112,24 @@ def fetch_change_feed_items(self) -> list[dict[str, Any]]: class ChangeFeedFetcherV2(object): - """Internal class for change feed fetch v2 implementation. - """ + """Internal class for change feed fetch v2 implementation.""" def __init__( - self, - client, - resource_link: str, - feed_options: dict[str, Any], - fetch_function: Callable[[dict[str, Any]], Tuple[list[dict[str, Any]], dict[str, Any]]]): + self, + client, + resource_link: str, + feed_options: dict[str, Any], + fetch_function: Callable[[dict[str, Any]], Tuple[list[dict[str, Any]], dict[str, Any]]], + ): self._client = client self._feed_options = feed_options self._change_feed_state: ChangeFeedStateV2 = self._feed_options.pop("changeFeedState") if self._change_feed_state.version != ChangeFeedStateVersion.V2: - raise ValueError(f"ChangeFeedFetcherV2 can not handle change feed state version " - f"{type(self._change_feed_state)}") + raise ValueError( + f"ChangeFeedFetcherV2 can not handle change feed state version " f"{type(self._change_feed_state)}" + ) self._resource_link = resource_link self._fetch_function = fetch_function @@ -142,9 +151,10 @@ def callback(): # refresh change feed state options = None if "excludedLocations" in self._feed_options: - options = {'excludedLocations': self._feed_options["excludedLocations"]} - self._change_feed_state.handle_feed_range_gone(self._client._routing_map_provider, self._resource_link, - options) + options = {"excludedLocations": self._feed_options["excludedLocations"]} + self._change_feed_state.handle_feed_range_gone( + self._client._routing_map_provider, self._resource_link, options + ) else: raise e @@ -157,13 +167,13 @@ def fetch_change_feed_items(self) -> list[dict[str, Any]]: is_s_time_first_fetch = self._change_feed_state._continuation.current_token.token is None while True: - (fetched_items, response_headers) = self._fetch_function(self._feed_options) + fetched_items, response_headers = self._fetch_function(self._feed_options) continuation_key = http_constants.HttpHeaders.ETag # In change feed queries, the continuation token is always populated. self._change_feed_state.apply_server_response_continuation( - cast(str, response_headers.get(continuation_key)), - bool(fetched_items)) + cast(str, response_headers.get(continuation_key)), bool(fetched_items) + ) if fetched_items: self._change_feed_state._continuation._move_to_next_token() @@ -175,8 +185,10 @@ def fetch_change_feed_items(self) -> list[dict[str, Any]]: # so we will retry with the new continuation token # 2. if the feed range of the changeFeedState span multiple physical partitions # then we will read from the next feed range until we have looped through all physical partitions - if (self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME - and is_s_time_first_fetch): + if ( + self._change_feed_state._change_feed_start_from.version == ChangeFeedStartFromType.POINT_IN_TIME + and is_s_time_first_fetch + ): response_headers[continuation_key] = self._get_base64_encoded_continuation() is_s_time_first_fetch = False should_retry = True @@ -193,8 +205,8 @@ def fetch_change_feed_items(self) -> list[dict[str, Any]]: def _get_base64_encoded_continuation(self) -> str: continuation_json = json.dumps(self._change_feed_state.to_dict()) - json_bytes = continuation_json.encode('utf-8') + json_bytes = continuation_json.encode("utf-8") # Encode the bytes to a Base64 string base64_bytes = base64.b64encode(json_bytes) # Convert the Base64 bytes to a string - return base64_bytes.decode('utf-8') + return base64_bytes.decode("utf-8") diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_iterable.py index 426ead93c1aa..0e579ae8701f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_iterable.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Iterable change feed results in the Azure Cosmos database service. -""" +"""Iterable change feed results in the Azure Cosmos database service.""" + from typing import Any, Tuple, Optional, Callable, cast, Union from azure.core.paging import PageIterator @@ -63,8 +63,11 @@ def __init__( raise ValueError("Missing changeFeedStateContext in feed options") change_feed_state_context = self._options.pop("changeFeedStateContext") - continuation = continuation_token if continuation_token is not None\ + continuation = ( + continuation_token + if continuation_token is not None else change_feed_state_context.pop("continuation", None) + ) # analysis and validate continuation token # there are two types of continuation token we support currently: @@ -74,7 +77,7 @@ def __init__( # v2 version: the continuation token will be base64 encoded composition token # which includes full change feed state if continuation is not None: - if continuation.isdigit() or continuation.strip('\'"').isdigit(): + if continuation.isdigit() or continuation.strip("'\"").isdigit(): change_feed_state_context["continuationPkRangeId"] = continuation else: change_feed_state_context["continuationFeedRange"] = continuation @@ -83,14 +86,13 @@ def __init__( self._options["changeFeedStateContext"] = change_feed_state_context super(ChangeFeedIterable, self).__init__( - self._fetch_next, - self._unpack, # type: ignore[arg-type] - continuation_token=continuation_token) + self._fetch_next, self._unpack, continuation_token=continuation_token # type: ignore[arg-type] + ) def _unpack(self, block: list[dict[str, Any]]) -> Tuple[Optional[str], list[dict[str, Any]]]: continuation: Optional[str] = None if self._client.last_response_headers: - continuation = self._client.last_response_headers.get('etag') + continuation = self._client.last_response_headers.get("etag") if block: self._did_a_call_already = False @@ -115,27 +117,19 @@ def _fetch_next(self, *args) -> list[dict[str, Any]]: # pylint: disable=unused- def _initialize_change_feed_fetcher(self) -> None: change_feed_state_context = self._options.pop("changeFeedStateContext") - change_feed_state = \ - ChangeFeedState.from_json( - self._collection_link, - cast(str, self._options.get("containerRID")), - change_feed_state_context) + change_feed_state = ChangeFeedState.from_json( + self._collection_link, cast(str, self._options.get("containerRID")), change_feed_state_context + ) self._options["changeFeedState"] = change_feed_state if change_feed_state.version == ChangeFeedStateVersion.V1: self._change_feed_fetcher = ChangeFeedFetcherV1( - self._client, - self._collection_link, - self._options, - self._fetch_function + self._client, self._collection_link, self._options, self._fetch_function ) else: self._change_feed_fetcher = ChangeFeedFetcherV2( - self._client, - self._collection_link, - self._options, - self._fetch_function + self._client, self._collection_link, self._options, self._fetch_function ) def _validate_change_feed_state_context(self, change_feed_state_context: dict[str, Any]) -> None: @@ -151,9 +145,13 @@ def _validate_change_feed_state_context(self, change_feed_state_context: dict[st else: # validation when no continuation is passed exclusive_keys = ["partitionKeyRangeId", "partitionKey", "feedRange"] - count = sum(1 for key in exclusive_keys if - key in change_feed_state_context and change_feed_state_context[key] is not None) + count = sum( + 1 + for key in exclusive_keys + if key in change_feed_state_context and change_feed_state_context[key] is not None + ) if count > 1: raise ValueError( "partition_key_range_id, partition_key, feed_range are exclusive parameters," - " please only set one of them") + " please only set one of them" + ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_start_from.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_start_from.py index bd47aaa7e90e..a3c2652a00b2 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_start_from.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_start_from.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for change feed start from implementation in the Azure Cosmos database service. -""" +"""Internal class for change feed start from implementation in the Azure Cosmos database service.""" from abc import ABC, abstractmethod from datetime import datetime, timezone @@ -30,15 +29,16 @@ from azure.cosmos import http_constants from azure.cosmos._routing.routing_range import Range + class ChangeFeedStartFromType(Enum): BEGINNING = "Beginning" NOW = "Now" LEASE = "Lease" POINT_IN_TIME = "PointInTime" + class ChangeFeedStartFromInternal(ABC): - """Abstract class for change feed start from implementation in the Azure Cosmos database service. - """ + """Abstract class for change feed start from implementation in the Azure Cosmos database service.""" type_property_name = "Type" @@ -51,7 +51,8 @@ def to_dict(self) -> dict[str, Any]: @staticmethod def from_start_time( - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]]) -> 'ChangeFeedStartFromInternal': + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]], + ) -> "ChangeFeedStartFromInternal": if start_time is None: return ChangeFeedStartFromNow() if isinstance(start_time, datetime): @@ -64,7 +65,7 @@ def from_start_time( raise ValueError(f"Invalid start_time '{start_time}'") @staticmethod - def from_json(data: dict[str, Any]) -> 'ChangeFeedStartFromInternal': + def from_json(data: dict[str, Any]) -> "ChangeFeedStartFromInternal": change_feed_start_from_type = data.get(ChangeFeedStartFromInternal.type_property_name) if change_feed_start_from_type is None: raise ValueError(f"Invalid start from json [Missing {ChangeFeedStartFromInternal.type_property_name}]") @@ -86,28 +87,24 @@ def populate_request_headers(self, request_headers) -> None: class ChangeFeedStartFromBeginning(ChangeFeedStartFromInternal): - """Class for change feed start from beginning implementation in the Azure Cosmos database service. - """ + """Class for change feed start from beginning implementation in the Azure Cosmos database service.""" def __init__(self) -> None: super().__init__(ChangeFeedStartFromType.BEGINNING) def to_dict(self) -> dict[str, Any]: - return { - self.type_property_name: ChangeFeedStartFromType.BEGINNING.value - } + return {self.type_property_name: ChangeFeedStartFromType.BEGINNING.value} def populate_request_headers(self, request_headers) -> None: pass # there is no headers need to be set for start from beginning @classmethod - def from_json(cls, data: dict[str, Any]) -> 'ChangeFeedStartFromBeginning': + def from_json(cls, data: dict[str, Any]) -> "ChangeFeedStartFromBeginning": return ChangeFeedStartFromBeginning() class ChangeFeedStartFromETagAndFeedRange(ChangeFeedStartFromInternal): - """Class for change feed start from etag and feed range implementation in the Azure Cosmos database service. - """ + """Class for change feed start from etag and feed range implementation in the Azure Cosmos database service.""" _etag_property_name = "Etag" _feed_range_property_name = "FeedRange" @@ -124,11 +121,11 @@ def to_dict(self) -> dict[str, Any]: return { self.type_property_name: ChangeFeedStartFromType.LEASE.value, self._etag_property_name: self._etag, - self._feed_range_property_name: self._feed_range.to_dict() + self._feed_range_property_name: self._feed_range.to_dict(), } @classmethod - def from_json(cls, data: dict[str, Any]) -> 'ChangeFeedStartFromETagAndFeedRange': + def from_json(cls, data: dict[str, Any]) -> "ChangeFeedStartFromETagAndFeedRange": etag = data.get(cls._etag_property_name) if etag is None: raise ValueError(f"Invalid change feed start from [Missing {cls._etag_property_name}]") @@ -146,28 +143,24 @@ def populate_request_headers(self, request_headers) -> None: class ChangeFeedStartFromNow(ChangeFeedStartFromInternal): - """Class for change feed start from etag and feed range implementation in the Azure Cosmos database service. - """ + """Class for change feed start from etag and feed range implementation in the Azure Cosmos database service.""" def __init__(self) -> None: super().__init__(ChangeFeedStartFromType.NOW) def to_dict(self) -> dict[str, Any]: - return { - self.type_property_name: ChangeFeedStartFromType.NOW.value - } + return {self.type_property_name: ChangeFeedStartFromType.NOW.value} def populate_request_headers(self, request_headers) -> None: request_headers[http_constants.HttpHeaders.IfNoneMatch] = "*" @classmethod - def from_json(cls, data: dict[str, Any]) -> 'ChangeFeedStartFromNow': + def from_json(cls, data: dict[str, Any]) -> "ChangeFeedStartFromNow": return ChangeFeedStartFromNow() class ChangeFeedStartFromPointInTime(ChangeFeedStartFromInternal): - """Class for change feed start from point in time implementation in the Azure Cosmos database service. - """ + """Class for change feed start from point in time implementation in the Azure Cosmos database service.""" _point_in_time_ms_property_name = "PointInTimeMs" @@ -181,16 +174,16 @@ def __init__(self, start_time: datetime): def to_dict(self) -> dict[str, Any]: return { self.type_property_name: ChangeFeedStartFromType.POINT_IN_TIME.value, - self._point_in_time_ms_property_name: - int(self._start_time.astimezone(timezone.utc).timestamp() * 1000) + self._point_in_time_ms_property_name: int(self._start_time.astimezone(timezone.utc).timestamp() * 1000), } def populate_request_headers(self, request_headers) -> None: - request_headers[http_constants.HttpHeaders.IfModified_since] =\ - self._start_time.astimezone(timezone.utc).strftime('%a, %d %b %Y %H:%M:%S GMT') + request_headers[http_constants.HttpHeaders.IfModified_since] = self._start_time.astimezone( + timezone.utc + ).strftime("%a, %d %b %Y %H:%M:%S GMT") @classmethod - def from_json(cls, data: dict[str, Any]) -> 'ChangeFeedStartFromPointInTime': + def from_json(cls, data: dict[str, Any]) -> "ChangeFeedStartFromPointInTime": point_in_time_ms = data.get(cls._point_in_time_ms_property_name) if point_in_time_ms is None: raise ValueError(f"Invalid change feed start from {cls._point_in_time_ms_property_name} ") diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_state.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_state.py index 079ecd2d1c70..7faffadb31c7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_state.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_state.py @@ -33,11 +33,16 @@ from typing_extensions import Literal from azure.cosmos import http_constants -from azure.cosmos._change_feed.change_feed_start_from import ChangeFeedStartFromInternal, \ - ChangeFeedStartFromETagAndFeedRange +from azure.cosmos._change_feed.change_feed_start_from import ( + ChangeFeedStartFromInternal, + ChangeFeedStartFromETagAndFeedRange, +) from azure.cosmos._change_feed.composite_continuation_token import CompositeContinuationToken -from azure.cosmos._change_feed.feed_range_internal import (FeedRangeInternal, FeedRangeInternalEpk, - FeedRangeInternalPartitionKey) +from azure.cosmos._change_feed.feed_range_internal import ( + FeedRangeInternal, + FeedRangeInternalEpk, + FeedRangeInternalPartitionKey, +) from azure.cosmos._change_feed.feed_range_composite_continuation_token import FeedRangeCompositeContinuation from azure.cosmos._routing.aio.routing_map_provider import SmartRoutingMapProvider as AsyncSmartRoutingMapProvider from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider @@ -46,10 +51,12 @@ from azure.cosmos.http_constants import StatusCodes, SubStatusCodes from azure.cosmos.partition_key import _Empty, _Undefined + class ChangeFeedStateVersion(Enum): V1 = "v1" V2 = "v2" + class ChangeFeedState(ABC): version_property_name = "v" @@ -62,18 +69,20 @@ def populate_feed_options(self, feed_options: dict[str, Any]) -> None: @abstractmethod def populate_request_headers( - self, - routing_provider: SmartRoutingMapProvider, - request_headers: dict[str, Any], - feed_options: Optional[dict[str, Any]] = None) -> None: + self, + routing_provider: SmartRoutingMapProvider, + request_headers: dict[str, Any], + feed_options: Optional[dict[str, Any]] = None, + ) -> None: pass @abstractmethod async def populate_request_headers_async( - self, - async_routing_provider: AsyncSmartRoutingMapProvider, - request_headers: dict[str, Any], - feed_options: Optional[dict[str, Any]] = None) -> None: + self, + async_routing_provider: AsyncSmartRoutingMapProvider, + request_headers: dict[str, Any], + feed_options: Optional[dict[str, Any]] = None, + ) -> None: pass @abstractmethod @@ -82,18 +91,17 @@ def apply_server_response_continuation(self, continuation: str, has_modified_res @staticmethod def from_json( - container_link: str, - container_rid: str, - change_feed_state_context: dict[str, Any]) -> 'ChangeFeedState': + container_link: str, container_rid: str, change_feed_state_context: dict[str, Any] + ) -> "ChangeFeedState": - if (change_feed_state_context.get("partitionKeyRangeId") - or change_feed_state_context.get("continuationPkRangeId")): + if change_feed_state_context.get("partitionKeyRangeId") or change_feed_state_context.get( + "continuationPkRangeId" + ): return ChangeFeedStateV1.from_json(container_link, container_rid, change_feed_state_context) if change_feed_state_context.get("continuationFeedRange"): # get changeFeedState from continuation - continuation_json_str = base64.b64decode(change_feed_state_context["continuationFeedRange"]).decode( - 'utf-8') + continuation_json_str = base64.b64decode(change_feed_state_context["continuationFeedRange"]).decode("utf-8") continuation_json = json.loads(continuation_json_str) version = continuation_json.get(ChangeFeedState.version_property_name) if version is None: @@ -107,19 +115,23 @@ def from_json( # when there is no continuation token, by default construct ChangeFeedStateV2 return ChangeFeedStateV2.from_initial_state(container_link, container_rid, change_feed_state_context) + class ChangeFeedStateV1(ChangeFeedState): """Change feed state v1 implementation. - This is used when partition key range id is used or the continuation is just simple _etag + This is used when partition key range id is used or the continuation is just simple _etag """ def __init__( - self, - container_link: str, - container_rid: str, - change_feed_start_from: ChangeFeedStartFromInternal, - partition_key_range_id: Optional[str] = None, - partition_key: Optional[Union[str, int, float, bool, list[Union[str, int, float, bool]], _Empty, _Undefined]] = None, # pylint: disable=line-too-long - continuation: Optional[str] = None) -> None: + self, + container_link: str, + container_rid: str, + change_feed_start_from: ChangeFeedStartFromInternal, + partition_key_range_id: Optional[str] = None, + partition_key: Optional[ + Union[str, int, float, bool, list[Union[str, int, float, bool]], _Empty, _Undefined] + ] = None, # pylint: disable=line-too-long + continuation: Optional[str] = None, + ) -> None: self._container_link = container_link self._container_rid = container_rid @@ -135,24 +147,23 @@ def container_rid(self): @classmethod def from_json( - cls, - container_link: str, - container_rid: str, - change_feed_state_context: dict[str, Any]) -> 'ChangeFeedStateV1': + cls, container_link: str, container_rid: str, change_feed_state_context: dict[str, Any] + ) -> "ChangeFeedStateV1": return cls( container_link, container_rid, ChangeFeedStartFromInternal.from_start_time(change_feed_state_context.get("startTime")), change_feed_state_context.get("partitionKeyRangeId"), change_feed_state_context.get("partitionKey"), - change_feed_state_context.get("continuationPkRangeId") + change_feed_state_context.get("continuationPkRangeId"), ) def populate_request_headers( - self, - routing_provider: SmartRoutingMapProvider, - request_headers: dict[str, Any], - feed_options: Optional[dict[str, Any]] = None) -> None: + self, + routing_provider: SmartRoutingMapProvider, + request_headers: dict[str, Any], + feed_options: Optional[dict[str, Any]] = None, + ) -> None: request_headers[http_constants.HttpHeaders.AIM] = http_constants.HttpHeaders.IncrementalFeedHeaderValue self._change_feed_start_from.populate_request_headers(request_headers) @@ -160,10 +171,11 @@ def populate_request_headers( request_headers[http_constants.HttpHeaders.IfNoneMatch] = self._continuation async def populate_request_headers_async( - self, - async_routing_provider: AsyncSmartRoutingMapProvider, - request_headers: dict[str, Any], - feed_options: Optional[dict[str, Any]] = None) -> None: # pylint: disable=unused-argument + self, + async_routing_provider: AsyncSmartRoutingMapProvider, + request_headers: dict[str, Any], + feed_options: Optional[dict[str, Any]] = None, + ) -> None: # pylint: disable=unused-argument request_headers[http_constants.HttpHeaders.AIM] = http_constants.HttpHeaders.IncrementalFeedHeaderValue @@ -180,6 +192,7 @@ def populate_feed_options(self, feed_options: dict[str, Any]) -> None: def apply_server_response_continuation(self, continuation: str, has_modified_response) -> None: self._continuation = continuation + class ChangeFeedStateV2(ChangeFeedState): container_rid_property_name = "containerRid" mode_property_name = "mode" @@ -187,13 +200,13 @@ class ChangeFeedStateV2(ChangeFeedState): continuation_property_name = "continuation" def __init__( - self, - container_link: str, - container_rid: str, - feed_range: FeedRangeInternal, - change_feed_start_from: ChangeFeedStartFromInternal, - continuation: Optional[FeedRangeCompositeContinuation], - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] + self, + container_link: str, + container_rid: str, + feed_range: FeedRangeInternal, + change_feed_start_from: ChangeFeedStartFromInternal, + continuation: Optional[FeedRangeCompositeContinuation], + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]], ) -> None: self._container_link = container_link @@ -203,14 +216,11 @@ def __init__( if continuation is None: composite_continuation_token_queue: Deque = collections.deque() composite_continuation_token_queue.append( - CompositeContinuationToken( - self._feed_range.get_normalized_range(), - None)) - self._continuation =\ - FeedRangeCompositeContinuation( - self._container_rid, - self._feed_range, - composite_continuation_token_queue) + CompositeContinuationToken(self._feed_range.get_normalized_range(), None) + ) + self._continuation = FeedRangeCompositeContinuation( + self._container_rid, self._feed_range, composite_continuation_token_queue + ) else: self._continuation = continuation @@ -219,7 +229,7 @@ def __init__( super(ChangeFeedStateV2, self).__init__(ChangeFeedStateVersion.V2) @property - def container_rid(self) -> str : + def container_rid(self) -> str: return self._container_rid def to_dict(self) -> dict[str, Any]: @@ -228,12 +238,10 @@ def to_dict(self) -> dict[str, Any]: self.container_rid_property_name: self._container_rid, self.mode_property_name: self._mode, self.change_feed_start_from_property_name: self._change_feed_start_from.to_dict(), - self.continuation_property_name: self._continuation.to_dict() if self._continuation is not None else None + self.continuation_property_name: self._continuation.to_dict() if self._continuation is not None else None, } - def set_start_from_request_headers( - self, - request_headers: dict[str, Any]) -> None: + def set_start_from_request_headers(self, request_headers: dict[str, Any]) -> None: # When a merge happens, the child partition will contain documents ordered by LSN but the _ts/creation time # of the documents may not be sequential. # So when reading the changeFeed by LSN, it is possible to encounter documents with lower _ts. @@ -242,16 +250,12 @@ def set_start_from_request_headers( self._change_feed_start_from.populate_request_headers(request_headers) if self._continuation.current_token is not None and self._continuation.current_token.token is not None: - change_feed_start_from_feed_range_and_etag =\ - ChangeFeedStartFromETagAndFeedRange( - self._continuation.current_token.token, - self._continuation.current_token.feed_range) + change_feed_start_from_feed_range_and_etag = ChangeFeedStartFromETagAndFeedRange( + self._continuation.current_token.token, self._continuation.current_token.feed_range + ) change_feed_start_from_feed_range_and_etag.populate_request_headers(request_headers) - def set_pk_range_id_request_headers( - self, - over_lapping_ranges, - request_headers: dict[str, Any]) -> None: + def set_pk_range_id_request_headers(self, over_lapping_ranges, request_headers: dict[str, Any]) -> None: if len(over_lapping_ranges) > 1: raise self.get_feed_range_gone_error(over_lapping_ranges) @@ -268,48 +272,41 @@ def set_pk_range_id_request_headers( request_headers[http_constants.HttpHeaders.StartEpkString] = self._continuation.current_token.feed_range.min request_headers[http_constants.HttpHeaders.EndEpkString] = self._continuation.current_token.feed_range.max - def set_mode_request_headers( - self, - request_headers: dict[str, Any]) -> None: + def set_mode_request_headers(self, request_headers: dict[str, Any]) -> None: if self._mode == "AllVersionsAndDeletes": request_headers[http_constants.HttpHeaders.AIM] = http_constants.HttpHeaders.FullFidelityFeedHeaderValue - request_headers[http_constants.HttpHeaders.ChangeFeedWireFormatVersion] = \ + request_headers[http_constants.HttpHeaders.ChangeFeedWireFormatVersion] = ( http_constants.HttpHeaders.SeparateMetaWithCrts + ) else: request_headers[http_constants.HttpHeaders.AIM] = http_constants.HttpHeaders.IncrementalFeedHeaderValue def populate_request_headers( - self, - routing_provider: SmartRoutingMapProvider, - request_headers: dict[str, Any], - feed_options = None) -> None: + self, routing_provider: SmartRoutingMapProvider, request_headers: dict[str, Any], feed_options=None + ) -> None: self.set_start_from_request_headers(request_headers) # based on the feed range to find the overlapping partition key range id - over_lapping_ranges = \ - routing_provider.get_overlapping_ranges( - self._container_link, - [self._continuation.current_token.feed_range], - feed_options) + over_lapping_ranges = routing_provider.get_overlapping_ranges( + self._container_link, [self._continuation.current_token.feed_range], feed_options + ) self.set_pk_range_id_request_headers(over_lapping_ranges, request_headers) self.set_mode_request_headers(request_headers) - async def populate_request_headers_async( - self, - async_routing_provider: AsyncSmartRoutingMapProvider, - request_headers: dict[str, Any], - feed_options: Optional[dict[str, Any]] = None) -> None: + self, + async_routing_provider: AsyncSmartRoutingMapProvider, + request_headers: dict[str, Any], + feed_options: Optional[dict[str, Any]] = None, + ) -> None: self.set_start_from_request_headers(request_headers) # based on the feed range to find the overlapping partition key range id - over_lapping_ranges = \ - await async_routing_provider.get_overlapping_ranges( - self._container_link, - [self._continuation.current_token.feed_range], - feed_options) + over_lapping_ranges = await async_routing_provider.get_overlapping_ranges( + self._container_link, [self._continuation.current_token.feed_range], feed_options + ) self.set_pk_range_id_request_headers(over_lapping_ranges, request_headers) @@ -319,17 +316,19 @@ def populate_feed_options(self, feed_options: dict[str, Any]) -> None: pass def handle_feed_range_gone( - self, - routing_provider: SmartRoutingMapProvider, - resource_link: str, - feed_options: Optional[dict[str, Any]] = None) -> None: + self, + routing_provider: SmartRoutingMapProvider, + resource_link: str, + feed_options: Optional[dict[str, Any]] = None, + ) -> None: self._continuation.handle_feed_range_gone(routing_provider, resource_link, feed_options) async def handle_feed_range_gone_async( - self, - routing_provider: AsyncSmartRoutingMapProvider, - resource_link: str, - feed_options: Optional[dict[str, Any]] = None) -> None: + self, + routing_provider: AsyncSmartRoutingMapProvider, + resource_link: str, + feed_options: Optional[dict[str, Any]] = None, + ) -> None: await self._continuation.handle_feed_range_gone_async(routing_provider, resource_link, feed_options) def apply_server_response_continuation(self, continuation: str, has_modified_response: bool) -> None: @@ -342,12 +341,13 @@ def apply_not_modified_response(self) -> None: self._continuation.apply_not_modified_response() def get_feed_range_gone_error(self, over_lapping_ranges: list[dict[str, Any]]) -> CosmosHttpResponseError: - formatted_message =\ - (f"Status code: {StatusCodes.GONE} " - f"Sub-status: {SubStatusCodes.PARTITION_KEY_RANGE_GONE}. " - f"Range {self._continuation.current_token.feed_range}" - f" spans {len(over_lapping_ranges)} physical partitions:" - f" {[child_range['id'] for child_range in over_lapping_ranges]}") + formatted_message = ( + f"Status code: {StatusCodes.GONE} " + f"Sub-status: {SubStatusCodes.PARTITION_KEY_RANGE_GONE}. " + f"Range {self._continuation.current_token.feed_range}" + f" spans {len(over_lapping_ranges)} physical partitions:" + f" {[child_range['id'] for child_range in over_lapping_ranges]}" + ) response_error = CosmosHttpResponseError(status_code=StatusCodes.GONE, message=formatted_message) response_error.sub_status = SubStatusCodes.PARTITION_KEY_RANGE_GONE @@ -355,10 +355,8 @@ def get_feed_range_gone_error(self, over_lapping_ranges: list[dict[str, Any]]) - @classmethod def from_continuation( - cls, - container_link: str, - container_rid: str, - continuation_json: dict[str, Any]) -> 'ChangeFeedStateV2': + cls, container_link: str, container_rid: str, continuation_json: dict[str, Any] + ) -> "ChangeFeedStateV2": container_rid_from_continuation = continuation_json.get(ChangeFeedStateV2.container_rid_property_name) if container_rid_from_continuation is None: @@ -368,8 +366,9 @@ def from_continuation( change_feed_start_from_data = continuation_json.get(ChangeFeedStateV2.change_feed_start_from_property_name) if change_feed_start_from_data is None: - raise ValueError(f"Invalid continuation:" - f" [Missing {ChangeFeedStateV2.change_feed_start_from_property_name}]") + raise ValueError( + f"Invalid continuation:" f" [Missing {ChangeFeedStateV2.change_feed_start_from_property_name}]" + ) change_feed_start_from = ChangeFeedStartFromInternal.from_json(change_feed_start_from_data) continuation_data = continuation_json.get(ChangeFeedStateV2.continuation_property_name) @@ -389,39 +388,30 @@ def from_continuation( feed_range=continuation.feed_range, change_feed_start_from=change_feed_start_from, continuation=continuation, - mode=mode) + mode=mode, + ) @classmethod def from_initial_state( - cls, - container_link: str, - collection_rid: str, - change_feed_state_context: dict[str, Any]) -> 'ChangeFeedStateV2': + cls, container_link: str, collection_rid: str, change_feed_state_context: dict[str, Any] + ) -> "ChangeFeedStateV2": feed_range: Optional[FeedRangeInternal] = None if change_feed_state_context.get("feedRange"): feed_range = FeedRangeInternalEpk.from_json(change_feed_state_context["feedRange"]) elif change_feed_state_context.get("partitionKey"): if change_feed_state_context.get("partitionKeyFeedRange"): - feed_range =\ - FeedRangeInternalPartitionKey( - change_feed_state_context["partitionKey"], - change_feed_state_context["partitionKeyFeedRange"]) + feed_range = FeedRangeInternalPartitionKey( + change_feed_state_context["partitionKey"], change_feed_state_context["partitionKeyFeedRange"] + ) else: raise ValueError("partitionKey is in the changeFeedStateContext, but missing partitionKeyFeedRange") else: # default to full range logging.info("'feed_range' empty. Using full range by default.") - feed_range = FeedRangeInternalEpk( - Range( - "", - "FF", - True, - False) - ) + feed_range = FeedRangeInternalEpk(Range("", "FF", True, False)) - change_feed_start_from = ( - ChangeFeedStartFromInternal.from_start_time(change_feed_state_context.get("startTime"))) + change_feed_start_from = ChangeFeedStartFromInternal.from_start_time(change_feed_state_context.get("startTime")) mode = change_feed_state_context.get("mode") @@ -431,4 +421,5 @@ def from_initial_state( feed_range=feed_range, change_feed_start_from=change_feed_start_from, continuation=None, - mode=mode) + mode=mode, + ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_utils.py index 19edb066f09f..3bf182241cd5 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/change_feed_utils.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal Helper functions in the Azure Cosmos database change_feed service. -""" +"""Internal Helper functions in the Azure Cosmos database change_feed service.""" import warnings from datetime import datetime @@ -30,10 +29,8 @@ CHANGE_FEED_MODES = ["LatestVersion", "AllVersionsAndDeletes"] -def add_args_to_kwargs( - args: Tuple[Any, ...], - kwargs: dict[str, Any] - ) -> None: + +def add_args_to_kwargs(args: Tuple[Any, ...], kwargs: dict[str, Any]) -> None: """Add positional arguments(args) to keyword argument dictionary(kwargs). Since 'query_items_change_feed' method only allows the following 4 positional arguments in the exact order and types, if the order and types don't match, errors will be raised. @@ -61,10 +58,10 @@ def add_args_to_kwargs( if len(args) > 0: keys = [ - 'partition_key_range_id', - 'is_start_from_beginning', - 'continuation', - 'max_item_count', + "partition_key_range_id", + "is_start_from_beginning", + "continuation", + "max_item_count", ] for i, value in enumerate(args): key = keys[i] @@ -74,9 +71,8 @@ def add_args_to_kwargs( kwargs[key] = value -def validate_kwargs( - keyword_arguments: dict[str, Any] - ) -> None: + +def validate_kwargs(keyword_arguments: dict[str, Any]) -> None: """Validate keyword arguments for change_feed API. The values of keyword arguments must match the expected type and conditions. If the conditions do not match, errors will be raised with the proper error messages and possible ways to correct the errors. @@ -100,46 +96,51 @@ def validate_kwargs( mode = keyword_arguments["mode"] if mode not in CHANGE_FEED_MODES: raise ValueError( - f"Invalid mode was used: '{keyword_arguments['mode']}'." - f" Supported modes are {CHANGE_FEED_MODES}.") + f"Invalid mode was used: '{keyword_arguments['mode']}'." f" Supported modes are {CHANGE_FEED_MODES}." + ) - if mode == 'AllVersionsAndDeletes': + if mode == "AllVersionsAndDeletes": if "partition_key_range_id" in keyword_arguments: raise ValueError( "'AllVersionsAndDeletes' mode is not supported if 'partition_key_range_id'" - " was used. Please use 'feed_range' instead.") - if ("is_start_from_beginning" in keyword_arguments - and keyword_arguments["is_start_from_beginning"] is not False): + " was used. Please use 'feed_range' instead." + ) + if ( + "is_start_from_beginning" in keyword_arguments + and keyword_arguments["is_start_from_beginning"] is not False + ): raise ValueError( "'AllVersionsAndDeletes' mode is only supported if 'is_start_from_beginning'" - " is 'False'. Please use 'is_start_from_beginning=False' or 'continuation' instead.") + " is 'False'. Please use 'is_start_from_beginning=False' or 'continuation' instead." + ) if "start_time" in keyword_arguments and keyword_arguments["start_time"] != "Now": raise ValueError( "'AllVersionsAndDeletes' mode is only supported if 'start_time' is 'Now'." - " Please use 'start_time=\"Now\"' or 'continuation' instead.") + " Please use 'start_time=\"Now\"' or 'continuation' instead." + ) if "partition_key_range_id" in keyword_arguments: warnings.warn( - "'partition_key_range_id' is deprecated. Please pass in 'feed_range' instead.", - DeprecationWarning + "'partition_key_range_id' is deprecated. Please pass in 'feed_range' instead.", DeprecationWarning ) if "is_start_from_beginning" in keyword_arguments: warnings.warn( - "'is_start_from_beginning' is deprecated. Please pass in 'start_time' instead.", - DeprecationWarning + "'is_start_from_beginning' is deprecated. Please pass in 'start_time' instead.", DeprecationWarning ) if not isinstance(keyword_arguments["is_start_from_beginning"], bool): raise TypeError( f"'is_start_from_beginning' must be 'bool' type," - f" but given '{type(keyword_arguments['is_start_from_beginning']).__name__}'.") + f" but given '{type(keyword_arguments['is_start_from_beginning']).__name__}'." + ) if keyword_arguments["is_start_from_beginning"] is True and "start_time" in keyword_arguments: raise ValueError("'is_start_from_beginning' and 'start_time' are exclusive, please only set one of them.") if "start_time" in keyword_arguments: - if not isinstance(keyword_arguments['start_time'], datetime): - if keyword_arguments['start_time'].lower() not in ["now", "beginning"]: + if not isinstance(keyword_arguments["start_time"], datetime): + if keyword_arguments["start_time"].lower() not in ["now", "beginning"]: raise ValueError( - f"'start_time' must be either 'Now' or 'Beginning', but given '{keyword_arguments['start_time']}'.") + f"'start_time' must be either 'Now' or 'Beginning', but given '{keyword_arguments['start_time']}'." + ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/composite_continuation_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/composite_continuation_token.py index dbe2b730d15b..5b9e85097bd1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/composite_continuation_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/composite_continuation_token.py @@ -22,6 +22,7 @@ """Internal class for change feed composite continuation token in the Azure Cosmos database service. """ + from typing import Optional, Any from azure.cosmos._routing.routing_range import Range @@ -39,10 +40,7 @@ def __init__(self, feed_range: Range, token: Optional[str] = None) -> None: self._feed_range = feed_range def to_dict(self) -> dict[str, Any]: - return { - self.token_property_name: self._token, - self.feed_range_property_name: self.feed_range.to_dict() - } + return {self.token_property_name: self._token, self.feed_range_property_name: self.feed_range.to_dict()} @property def feed_range(self) -> Range: @@ -56,7 +54,7 @@ def update_token(self, etag) -> None: self._token = etag @classmethod - def from_json(cls, data) -> 'CompositeContinuationToken': + def from_json(cls, data) -> "CompositeContinuationToken": token = data.get(cls.token_property_name) if token is None: raise ValueError(f"Invalid composite token [Missing {cls.token_property_name}]") diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_composite_continuation_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_composite_continuation_token.py index d51df883660d..17621a44ca05 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_composite_continuation_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_composite_continuation_token.py @@ -22,26 +22,29 @@ """Internal class for change feed continuation token by feed range in the Azure Cosmos database service. """ + from collections import deque from typing import Any, Deque, Optional from azure.cosmos._change_feed.composite_continuation_token import CompositeContinuationToken -from azure.cosmos._change_feed.feed_range_internal import (FeedRangeInternal, FeedRangeInternalEpk, - FeedRangeInternalPartitionKey) +from azure.cosmos._change_feed.feed_range_internal import ( + FeedRangeInternal, + FeedRangeInternalEpk, + FeedRangeInternalPartitionKey, +) from azure.cosmos._routing.routing_map_provider import SmartRoutingMapProvider from azure.cosmos._routing.aio.routing_map_provider import SmartRoutingMapProvider as AsyncSmartRoutingMapProvider from azure.cosmos._routing.routing_range import Range + class FeedRangeCompositeContinuation: _version_property_name = "v" _container_rid_property_name = "rid" _continuation_property_name = "continuation" def __init__( - self, - container_rid: str, - feed_range: FeedRangeInternal, - continuation: Deque[CompositeContinuationToken]) -> None: + self, container_rid: str, feed_range: FeedRangeInternal, continuation: Deque[CompositeContinuationToken] + ) -> None: if container_rid is None: raise ValueError("container_rid is missing") @@ -65,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: return json_data @classmethod - def from_json(cls, data) -> 'FeedRangeCompositeContinuation': + def from_json(cls, data) -> "FeedRangeCompositeContinuation": version = data.get(cls._version_property_name) if version is None: raise ValueError(f"Invalid feed range composite continuation token [Missing {cls._version_property_name}]") @@ -74,18 +77,24 @@ def from_json(cls, data) -> 'FeedRangeCompositeContinuation': container_rid = data.get(cls._container_rid_property_name) if container_rid is None: - raise ValueError(f"Invalid feed range composite continuation token " - f"[Missing {cls._container_rid_property_name}]") + raise ValueError( + f"Invalid feed range composite continuation token " f"[Missing {cls._container_rid_property_name}]" + ) continuation_data = data.get(cls._continuation_property_name) if continuation_data is None: - raise ValueError(f"Invalid feed range composite continuation token " - f"[Missing {cls._continuation_property_name}]") + raise ValueError( + f"Invalid feed range composite continuation token " f"[Missing {cls._continuation_property_name}]" + ) if not isinstance(continuation_data, list) or len(continuation_data) == 0: - raise ValueError(f"Invalid feed range composite continuation token " - f"[The {cls._continuation_property_name} must be non-empty array]") - continuation = [CompositeContinuationToken.from_json(child_range_continuation_token) - for child_range_continuation_token in continuation_data] + raise ValueError( + f"Invalid feed range composite continuation token " + f"[The {cls._continuation_property_name} must be non-empty array]" + ) + continuation = [ + CompositeContinuationToken.from_json(child_range_continuation_token) + for child_range_continuation_token in continuation_data + ] # parsing feed range feed_range: Optional[FeedRangeInternal] = None @@ -99,12 +108,14 @@ def from_json(cls, data) -> 'FeedRangeCompositeContinuation': return cls(container_rid=container_rid, feed_range=feed_range, continuation=deque(continuation)) def handle_feed_range_gone( - self, - routing_provider: SmartRoutingMapProvider, - collection_link: str, - feed_options: Optional[dict[str, Any]] = None) -> None: - overlapping_ranges = routing_provider.get_overlapping_ranges(collection_link, - [self._current_token.feed_range], feed_options) + self, + routing_provider: SmartRoutingMapProvider, + collection_link: str, + feed_options: Optional[dict[str, Any]] = None, + ) -> None: + overlapping_ranges = routing_provider.get_overlapping_ranges( + collection_link, [self._current_token.feed_range], feed_options + ) if len(overlapping_ranges) == 1: # merge,reusing the existing the feedRange and continuationToken @@ -115,22 +126,20 @@ def handle_feed_range_gone( self._continuation.popleft() for child_range in overlapping_ranges: self._continuation.append( - CompositeContinuationToken( - Range.PartitionKeyRangeToRange(child_range), - self._current_token.token)) + CompositeContinuationToken(Range.PartitionKeyRangeToRange(child_range), self._current_token.token) + ) self._current_token = self._continuation[0] async def handle_feed_range_gone_async( - self, - routing_provider: AsyncSmartRoutingMapProvider, - collection_link: str, - feed_options: Optional[dict[str, Any]] = None) -> None: - overlapping_ranges = \ - await routing_provider.get_overlapping_ranges( - collection_link, - [self._current_token.feed_range], - feed_options) + self, + routing_provider: AsyncSmartRoutingMapProvider, + collection_link: str, + feed_options: Optional[dict[str, Any]] = None, + ) -> None: + overlapping_ranges = await routing_provider.get_overlapping_ranges( + collection_link, [self._current_token.feed_range], feed_options + ) if len(overlapping_ranges) == 1: # merge,reusing the existing the feedRange and continuationToken @@ -141,9 +150,8 @@ async def handle_feed_range_gone_async( self._continuation.popleft() for child_range in overlapping_ranges: self._continuation.append( - CompositeContinuationToken( - Range.PartitionKeyRangeToRange(child_range), - self._current_token.token)) + CompositeContinuationToken(Range.PartitionKeyRangeToRange(child_range), self._current_token.token) + ) self._current_token = self._continuation[0] diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_internal.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_internal.py index 1f3405ad6757..b0563f3efff8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_internal.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_change_feed/feed_range_internal.py @@ -22,6 +22,7 @@ """Internal class for feed range implementation in the Azure Cosmos database service. """ + import base64 import json from abc import ABC, abstractmethod @@ -43,19 +44,21 @@ def to_dict(self) -> dict[str, Any]: def _to_base64_encoded_string(self) -> str: data_json = json.dumps(self.to_dict()) - json_bytes = data_json.encode('utf-8') + json_bytes = data_json.encode("utf-8") # Encode the bytes to a Base64 string base64_bytes = base64.b64encode(json_bytes) # Convert the Base64 bytes to a string - return base64_bytes.decode('utf-8') + return base64_bytes.decode("utf-8") + class FeedRangeInternalPartitionKey(FeedRangeInternal): type_property_name = "PK" def __init__( - self, - pk_value: Union[str, int, float, bool, list[Union[str, int, float, bool]], _Empty, _Undefined], - feed_range: Range) -> None: # pylint: disable=line-too-long + self, + pk_value: Union[str, int, float, bool, list[Union[str, int, float, bool]], _Empty, _Undefined], + feed_range: Range, + ) -> None: # pylint: disable=line-too-long if pk_value is None: raise ValueError("PartitionKey cannot be None") @@ -70,16 +73,16 @@ def get_normalized_range(self) -> Range: def to_dict(self) -> dict[str, Any]: if isinstance(self._pk_value, _Undefined): - return { self.type_property_name: [{}] } + return {self.type_property_name: [{}]} if isinstance(self._pk_value, _Empty): - return { self.type_property_name: [] } + return {self.type_property_name: []} if isinstance(self._pk_value, list): - return { self.type_property_name: list(self._pk_value) } + return {self.type_property_name: list(self._pk_value)} - return { self.type_property_name: self._pk_value } + return {self.type_property_name: self._pk_value} @classmethod - def from_json(cls, data: dict[str, Any], feed_range: Range) -> 'FeedRangeInternalPartitionKey': + def from_json(cls, data: dict[str, Any], feed_range: Range) -> "FeedRangeInternalPartitionKey": if data.get(cls.type_property_name): pk_value = data.get(cls.type_property_name) if not pk_value: @@ -90,8 +93,10 @@ def from_json(cls, data: dict[str, Any], feed_range: Range) -> 'FeedRangeInterna return cls(list(pk_value), feed_range) return cls(data[cls.type_property_name], feed_range) - raise ValueError(f"Can not parse FeedRangeInternalPartitionKey from the json," - f" there is no property {cls.type_property_name}") + raise ValueError( + f"Can not parse FeedRangeInternalPartitionKey from the json," + f" there is no property {cls.type_property_name}" + ) class FeedRangeInternalEpk(FeedRangeInternal): @@ -108,17 +113,16 @@ def get_normalized_range(self) -> Range: return self._range.to_normalized_range() def to_dict(self) -> dict[str, Any]: - return { - self.type_property_name: self._range.to_dict() - } + return {self.type_property_name: self._range.to_dict()} @classmethod - def from_json(cls, data: dict[str, Any]) -> 'FeedRangeInternalEpk': + def from_json(cls, data: dict[str, Any]) -> "FeedRangeInternalEpk": if data.get(cls.type_property_name): feed_range = Range.ParseFromDict(data.get(cls.type_property_name)) return cls(feed_range) - raise ValueError(f"Can not parse FeedRangeInternalEPK from the json," - f" there is no property {cls.type_property_name}") + raise ValueError( + f"Can not parse FeedRangeInternalEPK from the json," f" there is no property {cls.type_property_name}" + ) def __str__(self) -> str: """Get a json representation of the feed range. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py index a154afa57d5f..d4678e6dfe96 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_constants.py @@ -19,20 +19,24 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Class for defining internal constants in the Azure Cosmos database service. -""" +"""Class for defining internal constants in the Azure Cosmos database service.""" from enum import IntEnum from typing_extensions import Literal + # cspell:ignore PPAF + class TimeoutScope: """Defines the scope of timeout application""" + OPERATION: Literal["operation"] = "operation" # Apply timeout to entire logical operation PAGE: Literal["page"] = "page" # Apply timeout to individual page requests + # cspell:ignore reranker + class _Constants: """Constants used in the azure-cosmos package""" @@ -47,8 +51,10 @@ class _Constants: ReadableLocations: Literal["readableLocations"] = "readableLocations" Name: Literal["name"] = "name" DatabaseAccountEndpoint: Literal["databaseAccountEndpoint"] = "databaseAccountEndpoint" - DefaultEndpointsRefreshTime: int = 5 * 60 * 1000 # milliseconds - EnablePerPartitionFailoverBehavior: Literal["enablePerPartitionFailoverBehavior"] = "enablePerPartitionFailoverBehavior" #pylint: disable=line-too-long + DefaultEndpointsRefreshTime: int = 5 * 60 * 1000 # milliseconds + EnablePerPartitionFailoverBehavior: Literal["enablePerPartitionFailoverBehavior"] = ( + "enablePerPartitionFailoverBehavior" # pylint: disable=line-too-long + ) # ServiceDocument Resource EnableMultipleWritableLocations: Literal["enableMultipleWriteLocations"] = "enableMultipleWriteLocations" @@ -100,7 +106,7 @@ class _Constants: 413: "REQUEST_ENTITY_TOO_LARGE - Document size exceeds limit.", 424: "FAILED_DEPENDENCY - There is a failure in the transactional batch.", 429: "TOO_MANY_REQUESTS", - 449: "RETRY_WITH - Conflicting request to resource has been attempted. Retry to avoid conflicts." + 449: "RETRY_WITH - Conflicting request to resource has been attempted. Retry to avoid conflicts.", } class Kwargs: @@ -128,5 +134,6 @@ class UserAgentFeatureFlags(IntEnum): Example: If the user agent suffix has "F3", this means that flags 1 and 2. """ + PER_PARTITION_AUTOMATIC_FAILOVER = 1 PER_PARTITION_CIRCUIT_BREAKER = 2 diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_container_recreate_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_container_recreate_retry_policy.py index fa29206806c7..e29bca07e1b6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_container_recreate_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_container_recreate_retry_policy.py @@ -22,6 +22,7 @@ """Internal class for container recreate retry policy implementation in the Azure Cosmos database service. """ + import json from typing import Optional, Any, Union @@ -30,13 +31,17 @@ from . import http_constants from .partition_key import _Empty, _Undefined, _PartitionKeyKind - # pylint: disable=protected-access class ContainerRecreateRetryPolicy: - def __init__(self, client: Optional[Any], container_caches: Optional[dict[str, dict[str, Any]]], - request: Optional[HttpRequest], *args: Optional[list[Any]]): + def __init__( + self, + client: Optional[Any], + container_caches: Optional[dict[str, dict[str, Any]]], + request: Optional[HttpRequest], + *args: Optional[list[Any]] + ): self.retry_after_in_milliseconds = 0 # Same as in .net self.refresh_container_properties_cache = True self.args = args @@ -69,8 +74,9 @@ def ShouldRetry(self, exception: Optional[Any]) -> bool: return True return False - def __find_container_link_with_rid(self, container_properties_caches: Optional[dict[str, Any]], rid: str) -> \ - Optional[str]: + def __find_container_link_with_rid( + self, container_properties_caches: Optional[dict[str, Any]], rid: str + ) -> Optional[str]: if container_properties_caches: if rid in container_properties_caches: return container_properties_caches[rid]["container_link"] @@ -78,8 +84,9 @@ def __find_container_link_with_rid(self, container_properties_caches: Optional[d # a container request so this retry is not needed. Return None. return None - def check_if_rid_different(self, container_link: str, - container_properties_caches: Optional[dict[str, Any]], rid: str) -> bool: + def check_if_rid_different( + self, container_link: str, container_properties_caches: Optional[dict[str, Any]], rid: str + ) -> bool: if container_properties_caches: return container_properties_caches[container_link]["_rid"] == rid return not rid @@ -91,13 +98,14 @@ def should_extract_partition_key(self, container_cache: Optional[dict[str, Any]] if partition_key_definition and partition_key_definition["kind"] == _PartitionKeyKind.MULTI_HASH: # A null in the multihash partition key indicates a failure in extracting partition keys # from the document definition - return 'null' in current_partition_key + return "null" in current_partition_key # These values indicate the partition key was not successfully extracted from the document definition - return current_partition_key in ('[{}]', '[]', [{}], []) + return current_partition_key in ("[{}]", "[]", [{}], []) return False - def _extract_partition_key(self, client: Optional[Any], container_cache: Optional[dict[str, Any]], body: str)\ - -> Optional[Union[str, list, dict]]: + def _extract_partition_key( + self, client: Optional[Any], container_cache: Optional[dict[str, Any]], body: str + ) -> Optional[Union[str, list, dict]]: partition_key_definition = container_cache["partitionKey"] if container_cache else None body_dict = self.__str_to_dict(body) new_partition_key: Optional[Union[str, list, dict]] = None @@ -111,15 +119,17 @@ def _extract_partition_key(self, client: Optional[Any], container_cache: Optiona new_partition_key = [] # else serialize using json dumps method which apart from regular values will serialize None into null elif partition_key_definition and partition_key_definition["kind"] == _PartitionKeyKind.MULTI_HASH: - new_partition_key = json.dumps(options["partitionKey"], separators=(',', ':')) + new_partition_key = json.dumps(options["partitionKey"], separators=(",", ":")) else: new_partition_key = json.dumps([options["partitionKey"]]) return new_partition_key - async def _extract_partition_key_async(self, client: Optional[Any], - container_cache: Optional[dict[str, Any]], - body: str) -> Optional[Union[str, list, dict]]: - partition_key_definition: Optional[dict[str, Any]] = container_cache["partitionKey"] if container_cache else None # pylint: disable=line-too-long + async def _extract_partition_key_async( + self, client: Optional[Any], container_cache: Optional[dict[str, Any]], body: str + ) -> Optional[Union[str, list, dict]]: + partition_key_definition: Optional[dict[str, Any]] = ( + container_cache["partitionKey"] if container_cache else None + ) # pylint: disable=line-too-long body_dict = self.__str_to_dict(body) new_partition_key: Optional[Union[str, list, dict]] = None if body_dict: @@ -132,7 +142,7 @@ async def _extract_partition_key_async(self, client: Optional[Any], new_partition_key = [] # else serialize using json dumps method which apart from regular values will serialize None into null elif partition_key_definition and partition_key_definition["kind"] == _PartitionKeyKind.MULTI_HASH: - new_partition_key = json.dumps(options["partitionKey"], separators=(',', ':')) + new_partition_key = json.dumps(options["partitionKey"], separators=(",", ":")) else: new_partition_key = json.dumps([options["partitionKey"]]) return new_partition_key @@ -155,7 +165,7 @@ def _update_throughput_link(self, body: str) -> str: if not body_dict: return body body_dict["parameters"][0]["value"] = self.link - return json.dumps(body_dict, separators=(',', ':')) + return json.dumps(body_dict, separators=(",", ":")) def __str_to_dict(self, dict_string: str) -> dict: try: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py index 3ffe52448d14..48959ab194e8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py @@ -21,8 +21,8 @@ # pylint: disable=too-many-lines, protected-access -"""Document client class for the Azure Cosmos database service. -""" +"""Document client class for the Azure Cosmos database service.""" + import os import urllib.parse import uuid @@ -41,15 +41,19 @@ NetworkTraceLoggingPolicy, CustomHookPolicy, DistributedTracingPolicy, - ProxyPolicy + ProxyPolicy, ) -from azure.core.pipeline.transport import HttpRequest, \ - HttpResponse # pylint: disable=no-legacy-azure-core-http-response-import +from azure.core.pipeline.transport import ( + HttpRequest, + HttpResponse, +) # pylint: disable=no-legacy-azure-core-http-response-import from azure.core.utils import CaseInsensitiveDict from . import _base as base from ._user_agent_policy import CosmosUserAgentPolicy -from ._global_partition_endpoint_manager_per_partition_automatic_failover import _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover # pylint: disable=line-too-long +from ._global_partition_endpoint_manager_per_partition_automatic_failover import ( + _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, +) # pylint: disable=line-too-long from . import _query_iterable as query_iterable from . import _runtime_constants as runtime_constants from . import _session @@ -83,6 +87,7 @@ _return_undefined_or_empty_partition_key, ) + class CredentialDict(TypedDict, total=False): masterKey: str resourceTokens: Mapping[str, Any] @@ -114,7 +119,7 @@ class _QueryCompatibilityMode: _DefaultStringHashPrecision = 3 _DefaultStringRangePrecision = -1 - def __init__( # pylint: disable=too-many-statements + def __init__( # pylint: disable=too-many-statements self, url_connection: str, auth: CredentialDict, @@ -146,8 +151,9 @@ def __init__( # pylint: disable=too-many-statements """ self.client_id = str(uuid.uuid4()) self.url_connection = url_connection - self.availability_strategy: Union[CrossRegionHedgingStrategy, None] =\ - validate_client_hedging_strategy(availability_strategy) + self.availability_strategy: Union[CrossRegionHedgingStrategy, None] = validate_client_hedging_strategy( + availability_strategy + ) self.availability_strategy_executor: Optional[ThreadPoolExecutor] = availability_strategy_executor self.master_key: Optional[str] = None self.resource_tokens: Optional[Mapping[str, Any]] = None @@ -175,11 +181,11 @@ def __init__( # pylint: disable=too-many-statements http_constants.HttpHeaders.IsContinuationExpected: False, } - throughput_bucket = kwargs.pop('throughput_bucket', None) + throughput_bucket = kwargs.pop("throughput_bucket", None) if throughput_bucket: self.default_headers[http_constants.HttpHeaders.ThroughputBucket] = throughput_bucket - priority = kwargs.pop('priority', None) + priority = kwargs.pop("priority", None) if priority: self.default_headers[http_constants.HttpHeaders.PriorityLevel] = priority @@ -203,20 +209,21 @@ def __init__( # pylint: disable=too-many-statements retry_status=self.connection_policy.ConnectionRetryConfiguration.status, retry_backoff_max=self.connection_policy.ConnectionRetryConfiguration.DEFAULT_BACKOFF_MAX, retry_on_status_codes=list(self.connection_policy.ConnectionRetryConfiguration.status_forcelist), - retry_backoff_factor=self.connection_policy.ConnectionRetryConfiguration.backoff_factor + retry_backoff_factor=self.connection_policy.ConnectionRetryConfiguration.backoff_factor, ) else: raise TypeError( - "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry") + "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry" + ) - proxies = kwargs.pop('proxies', {}) + proxies = kwargs.pop("proxies", {}) if self.connection_policy.ProxyConfiguration and self.connection_policy.ProxyConfiguration.Host: host = self.connection_policy.ProxyConfiguration.Host url = urllib.parse.urlparse(host) proxy = host if url.port else host + ":" + str(self.connection_policy.ProxyConfiguration.Port) proxies.update({url.scheme: proxy}) - suffix = kwargs.pop('user_agent_suffix', None) + suffix = kwargs.pop("user_agent_suffix", None) self._user_agent: str = _utils.get_user_agent(suffix) credentials_policy = None @@ -226,7 +233,7 @@ def __init__( # pylint: disable=too-many-statements credentials_policy = CosmosBearerTokenCredentialPolicy( self.aad_credentials, account_scope=account_scope, - override_scope=scope_override if scope_override else None + override_scope=scope_override if scope_override else None, ) self._enable_diagnostics_logging = kwargs.pop("enable_diagnostics_logging", False) policies = [ @@ -251,9 +258,7 @@ def __init__( # pylint: disable=too-many-statements transport = kwargs.pop("transport", None) self.pipeline_client: PipelineClient[HttpRequest, HttpResponse] = PipelineClient( - base_url=url_connection, - transport=transport, - policies=policies + base_url=url_connection, transport=transport, policies=policies ) self._inference_service: Optional[_InferenceService] = None @@ -333,9 +338,9 @@ def _get_inference_service(self) -> Optional[_InferenceService]: @property def Session(self) -> Optional[_session.Session]: """Gets the session object from the client. - :returns: the session for the client - :rtype: _session.Session - """ + :returns: the session for the client + :rtype: _session.Session + """ return self.session @Session.setter @@ -394,10 +399,7 @@ def GetPartitionResolver(self, database_link: str) -> Optional[RangePartitionRes return self.partition_resolvers.get(base.TrimBeginningAndEndingSlashes(database_link)) def CreateDatabase( - self, - database: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a database. @@ -418,10 +420,7 @@ def CreateDatabase( return self.Create(database, path, http_constants.ResourceType.Database, None, None, options, **kwargs) def ReadDatabase( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a database. @@ -443,11 +442,7 @@ def ReadDatabase( database_id = base.GetResourceIdOrFullNameFromLink(database_link) return self.Read(path, http_constants.ResourceType.Database, database_id, None, options, **kwargs) - def ReadDatabases( - self, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> ItemPaged[dict[str, Any]]: + def ReadDatabases(self, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> ItemPaged[dict[str, Any]]: """Reads all databases. :param dict options: @@ -465,10 +460,7 @@ def ReadDatabases( return self.QueryDatabases(None, options, **kwargs) def QueryDatabases( - self, - query: Optional[Union[str, dict[str, Any]]], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, query: Optional[Union[str, dict[str, Any]]], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Queries databases. @@ -486,18 +478,22 @@ def QueryDatabases( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - "/dbs", http_constants.ResourceType.Database, "", lambda r: r["Databases"], - lambda _, b: b, query, options, **kwargs) + "/dbs", + http_constants.ResourceType.Database, + "", + lambda r: r["Databases"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def ReadContainers( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads all collections in a database. @@ -544,19 +540,22 @@ def QueryContainers( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.Collection, database_id, lambda r: r["DocumentCollections"], - lambda _, body: body, query, options, **kwargs) + path, + http_constants.ResourceType.Collection, + database_id, + lambda r: r["DocumentCollections"], + lambda _, body: body, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def CreateContainer( - self, - database_link: str, - collection: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, collection: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a collection in a database. @@ -578,8 +577,9 @@ def CreateContainer( base._validate_resource(collection) path = base.GetPathFromLink(database_link, http_constants.ResourceType.Collection) database_id = base.GetResourceIdOrFullNameFromLink(database_link) - return self.Create(collection, path, http_constants.ResourceType.Collection, database_id, None, - options, **kwargs) + return self.Create( + collection, path, http_constants.ResourceType.Collection, database_id, None, options, **kwargs + ) def ReplaceContainer( self, @@ -609,14 +609,12 @@ def ReplaceContainer( base._validate_resource(collection) path = base.GetPathFromLink(collection_link) collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) - return self.Replace(collection, path, http_constants.ResourceType.Collection, collection_id, None, - options, **kwargs) + return self.Replace( + collection, path, http_constants.ResourceType.Collection, collection_id, None, options, **kwargs + ) def ReadContainer( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a collection. @@ -639,11 +637,7 @@ def ReadContainer( return self.Read(path, http_constants.ResourceType.Collection, collection_id, None, options, **kwargs) def CreateUser( - self, - database_link: str, - user: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, user: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a user. @@ -667,11 +661,7 @@ def CreateUser( return self.Create(user, path, http_constants.ResourceType.User, database_id, None, options, **kwargs) def UpsertUser( - self, - database_link: str, - user: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, user: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a user. @@ -699,12 +689,7 @@ def _GetDatabaseIdWithPathForUser(self, database_link: str, user: Mapping[str, A database_id = base.GetResourceIdOrFullNameFromLink(database_link) return database_id, path - def ReadUser( - self, - user_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> CosmosDict: + def ReadUser(self, user_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> CosmosDict: """Reads a user. :param str user_link: @@ -726,10 +711,7 @@ def ReadUser( return self.Read(path, http_constants.ResourceType.User, user_id, None, options, **kwargs) def ReadUsers( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads all users in a database. @@ -777,19 +759,21 @@ def QueryUsers( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.User, database_id, lambda r: r["Users"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.User, + database_id, + lambda r: r["Users"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) - def DeleteDatabase( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + def DeleteDatabase(self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a database. :param str database_link: @@ -809,11 +793,7 @@ def DeleteDatabase( self.DeleteResource(path, http_constants.ResourceType.Database, database_id, None, options, **kwargs) def CreatePermission( - self, - user_link: str, - permission: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, permission: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a permission for a user. @@ -837,11 +817,7 @@ def CreatePermission( return self.Create(permission, path, http_constants.ResourceType.Permission, user_id, None, options, **kwargs) def UpsertPermission( - self, - user_link: str, - permission: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, permission: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a permission for a user. @@ -865,9 +841,7 @@ def UpsertPermission( return self.Upsert(permission, path, http_constants.ResourceType.Permission, user_id, None, options, **kwargs) def _GetUserIdWithPathForPermission( - self, - permission: Mapping[str, Any], - user_link: str + self, permission: Mapping[str, Any], user_link: str ) -> Tuple[str, Optional[str]]: base._validate_resource(permission) path = base.GetPathFromLink(user_link, http_constants.ResourceType.Permission) @@ -875,10 +849,7 @@ def _GetUserIdWithPathForPermission( return path, user_id def ReadPermission( - self, - permission_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, permission_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a permission. @@ -901,10 +872,7 @@ def ReadPermission( return self.Read(path, http_constants.ResourceType.Permission, permission_id, None, options, **kwargs) def ReadPermissions( - self, - user_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads all permissions for a user. @@ -953,19 +921,22 @@ def QueryPermissions( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.Permission, user_id, lambda r: r["Permissions"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.Permission, + user_id, + lambda r: r["Permissions"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def ReplaceUser( - self, - user_link: str, - user: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, user: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a user and return it. @@ -989,12 +960,7 @@ def ReplaceUser( user_id = base.GetResourceIdOrFullNameFromLink(user_link) return self.Replace(user, path, http_constants.ResourceType.User, user_id, None, options, **kwargs) - def DeleteUser( - self, - user_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + def DeleteUser(self, user_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a user. :param str user_link: @@ -1040,14 +1006,12 @@ def ReplacePermission( base._validate_resource(permission) path = base.GetPathFromLink(permission_link) permission_id = base.GetResourceIdOrFullNameFromLink(permission_link) - return self.Replace(permission, path, http_constants.ResourceType.Permission, permission_id, None, - options, **kwargs) + return self.Replace( + permission, path, http_constants.ResourceType.Permission, permission_id, None, options, **kwargs + ) def DeletePermission( - self, - permission_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, permission_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a permission. @@ -1065,17 +1029,16 @@ def DeletePermission( path = base.GetPathFromLink(permission_link) permission_id = base.GetResourceIdOrFullNameFromLink(permission_link) - self.DeleteResource(path, http_constants.ResourceType.Permission, permission_id, None, options, - **kwargs) + self.DeleteResource(path, http_constants.ResourceType.Permission, permission_id, None, options, **kwargs) def read_items( - self, - collection_link: str, - items: Sequence[Tuple[str, PartitionKeyType]], - options: Optional[Mapping[str, Any]] = None, - *, - executor: Optional[ThreadPoolExecutor] = None, - **kwargs: Any + self, + collection_link: str, + items: Sequence[Tuple[str, PartitionKeyType]], + options: Optional[Mapping[str, Any]] = None, + *, + executor: Optional[ThreadPoolExecutor] = None, + **kwargs: Any ) -> CosmosList: """Reads many items. @@ -1098,7 +1061,7 @@ def read_items( raise ValueError("Could not find partition key definition for collection.") # Extract and remove max_concurrency from kwargs - max_concurrency = kwargs.pop('max_concurrency', None) + max_concurrency = kwargs.pop("max_concurrency", None) helper = ReadItemsHelperSync( client=self, @@ -1108,7 +1071,8 @@ def read_items( partition_key_definition=partition_key_definition, executor=executor, max_concurrency=max_concurrency, - **kwargs) + **kwargs + ) return helper.read_items() def ReadItems( @@ -1169,7 +1133,7 @@ def QueryItems( options, database_link=database_or_container_link, partition_key=partition_key, - page_iterator_class=query_iterable.QueryIterable + page_iterator_class=query_iterable.QueryIterable, ) path = base.GetPathFromLink(database_or_container_link, http_constants.ResourceType.Document) @@ -1180,16 +1144,17 @@ def QueryItems( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, - http_constants.ResourceType.Document, - collection_id, - lambda r: r["Documents"], - lambda _, b: b, - query, - options, - response_hook=response_hook, - response_headers_list=response_headers_list, - **kwargs) + path, + http_constants.ResourceType.Document, + collection_id, + lambda r: r["Documents"], + lambda _, b: b, + query, + options, + response_hook=response_hook, + response_headers_list=response_headers_list, + **kwargs + ) return CosmosItemPaged( self, @@ -1199,9 +1164,9 @@ def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInse collection_link=database_or_container_link, page_iterator_class=query_iterable.QueryIterable, response_hook=response_hook, - raw_response_hook=kwargs.get('raw_response_hook'), + raw_response_hook=kwargs.get("raw_response_hook"), resource_type=http_constants.ResourceType.Document, - response_headers_list=response_headers_list + response_headers_list=response_headers_list, ) def QueryItemsChangeFeed( @@ -1229,8 +1194,9 @@ def QueryItemsChangeFeed( if options is not None and "partitionKeyRangeId" in options: partition_key_range_id = options["partitionKeyRangeId"] - return self._QueryChangeFeed(collection_link, options, partition_key_range_id,response_hook=response_hook, - **kwargs) + return self._QueryChangeFeed( + collection_link, options, partition_key_range_id, response_hook=response_hook, **kwargs + ) def _QueryChangeFeed( self, @@ -1278,21 +1244,19 @@ def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInse options, partition_key_range_id, response_hook=response_hook, - **kwargs) + **kwargs + ) return ItemPaged( self, options, fetch_function=fetch_fn, collection_link=collection_link, - page_iterator_class=ChangeFeedIterable + page_iterator_class=ChangeFeedIterable, ) def _ReadPartitionKeyRanges( - self, - collection_link: str, - feed_options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, feed_options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads Partition Key Ranges. @@ -1336,13 +1300,23 @@ def _QueryPartitionKeyRanges( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.PartitionKeyRange, collection_id, - lambda r: r["PartitionKeyRanges"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.PartitionKeyRange, + collection_id, + lambda r: r["PartitionKeyRanges"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.PartitionKeyRange + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.PartitionKeyRange, ) def CreateItem( @@ -1383,13 +1357,7 @@ def CreateItem( if base.IsItemContainerLink(database_or_container_link): options = self._AddPartitionKey(database_or_container_link, document, options) - return self.Create(document, - path, - http_constants.ResourceType.Document, - collection_id, - None, - options, - **kwargs) + return self.Create(document, path, http_constants.ResourceType.Document, collection_id, None, options, **kwargs) def UpsertItem( self, @@ -1429,27 +1397,18 @@ def UpsertItem( collection_id, document, path = self._GetContainerIdWithPathForItem( database_or_container_link, document, options ) - return self.Upsert(document, - path, - http_constants.ResourceType.Document, - collection_id, - None, - options, - **kwargs) + return self.Upsert(document, path, http_constants.ResourceType.Document, collection_id, None, options, **kwargs) PartitionResolverErrorMessage = ( - "Couldn't find any partition resolvers for the database link provided. " - + "Ensure that the link you used when registering the partition resolvers " - + "matches the link provided or you need to register both types of database " - + "link(self link as well as ID based link)." + "Couldn't find any partition resolvers for the database link provided. " + + "Ensure that the link you used when registering the partition resolvers " + + "matches the link provided or you need to register both types of database " + + "link(self link as well as ID based link)." ) # Gets the collection id and path for the document def _GetContainerIdWithPathForItem( - self, - database_or_container_link: str, - document: Mapping[str, Any], - options: Mapping[str, Any] + self, database_or_container_link: str, document: Mapping[str, Any], options: Mapping[str, Any] ) -> Tuple[Optional[str], dict[str, Any], str]: if not database_or_container_link: @@ -1477,12 +1436,7 @@ def _GetContainerIdWithPathForItem( collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) return collection_id, document, path - def ReadItem( - self, - document_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs - ) -> CosmosDict: + def ReadItem(self, document_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs) -> CosmosDict: """Reads a document. :param str document_link: @@ -1504,10 +1458,7 @@ def ReadItem( return self.Read(path, http_constants.ResourceType.Document, document_id, None, options, **kwargs) def ReadTriggers( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads all triggers in a collection. @@ -1556,19 +1507,22 @@ def QueryTriggers( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.Trigger, collection_id, lambda r: r["Triggers"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.Trigger, + collection_id, + lambda r: r["Triggers"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def CreateTrigger( - self, - collection_link: str, - trigger: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, trigger: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a trigger in a collection. @@ -1591,9 +1545,7 @@ def CreateTrigger( return self.Create(trigger, path, http_constants.ResourceType.Trigger, collection_id, None, options, **kwargs) def _GetContainerIdWithPathForTrigger( - self, - collection_link: str, - trigger: Mapping[str, Any] + self, collection_link: str, trigger: Mapping[str, Any] ) -> Tuple[Optional[str], str, dict[str, Any]]: base._validate_resource(trigger) trigger = dict(trigger) @@ -1606,12 +1558,7 @@ def _GetContainerIdWithPathForTrigger( collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) return collection_id, path, trigger - def ReadTrigger( - self, - trigger_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> CosmosDict: + def ReadTrigger(self, trigger_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> CosmosDict: """Reads a trigger. :param str trigger_link: @@ -1633,11 +1580,7 @@ def ReadTrigger( return self.Read(path, http_constants.ResourceType.Trigger, trigger_id, None, options, **kwargs) def UpsertTrigger( - self, - collection_link: str, - trigger: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, trigger: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a trigger in a collection. :param str collection_link: @@ -1654,14 +1597,10 @@ def UpsertTrigger( options = {} collection_id, path, trigger = self._GetContainerIdWithPathForTrigger(collection_link, trigger) - return self.Upsert(trigger, path, http_constants.ResourceType.Trigger, collection_id, None, - options, **kwargs) + return self.Upsert(trigger, path, http_constants.ResourceType.Trigger, collection_id, None, options, **kwargs) def ReadUserDefinedFunctions( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads all user-defined functions in a collection. @@ -1710,20 +1649,22 @@ def QueryUserDefinedFunctions( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.UserDefinedFunction, collection_id, - lambda r: r["UserDefinedFunctions"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.UserDefinedFunction, + collection_id, + lambda r: r["UserDefinedFunctions"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def CreateUserDefinedFunction( - self, - collection_link: str, - udf: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, udf: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a user-defined function in a collection. @@ -1743,15 +1684,12 @@ def CreateUserDefinedFunction( options = {} collection_id, path, udf = self._GetContainerIdWithPathForUDF(collection_link, udf) - return self.Create(udf, path, http_constants.ResourceType.UserDefinedFunction, collection_id, None, - options, **kwargs) + return self.Create( + udf, path, http_constants.ResourceType.UserDefinedFunction, collection_id, None, options, **kwargs + ) def UpsertUserDefinedFunction( - self, - collection_link: str, - udf: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, udf: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a user-defined function in a collection. @@ -1771,13 +1709,12 @@ def UpsertUserDefinedFunction( options = {} collection_id, path, udf = self._GetContainerIdWithPathForUDF(collection_link, udf) - return self.Upsert(udf, path, http_constants.ResourceType.UserDefinedFunction, collection_id, None, - options, **kwargs) + return self.Upsert( + udf, path, http_constants.ResourceType.UserDefinedFunction, collection_id, None, options, **kwargs + ) def _GetContainerIdWithPathForUDF( - self, - collection_link: str, - udf: Mapping[str, Any] + self, collection_link: str, udf: Mapping[str, Any] ) -> Tuple[Optional[str], str, dict[str, Any]]: base._validate_resource(udf) udf = dict(udf) @@ -1791,10 +1728,7 @@ def _GetContainerIdWithPathForUDF( return collection_id, path, udf def ReadUserDefinedFunction( - self, - udf_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, udf_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a user-defined function. @@ -1817,10 +1751,7 @@ def ReadUserDefinedFunction( return self.Read(path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, options, **kwargs) def ReadStoredProcedures( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads all store procedures in a collection. @@ -1869,19 +1800,22 @@ def QueryStoredProcedures( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.StoredProcedure, collection_id, lambda r: r["StoredProcedures"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.StoredProcedure, + collection_id, + lambda r: r["StoredProcedures"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def CreateStoredProcedure( - self, - collection_link: str, - sproc: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, sproc: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a stored procedure in a collection. @@ -1901,15 +1835,12 @@ def CreateStoredProcedure( options = {} collection_id, path, sproc = self._GetContainerIdWithPathForSproc(collection_link, sproc) - return self.Create(sproc, path, http_constants.ResourceType.StoredProcedure, collection_id, None, - options, **kwargs) + return self.Create( + sproc, path, http_constants.ResourceType.StoredProcedure, collection_id, None, options, **kwargs + ) def UpsertStoredProcedure( - self, - collection_link: str, - sproc: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, sproc: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a stored procedure in a collection. @@ -1929,13 +1860,12 @@ def UpsertStoredProcedure( options = {} collection_id, path, sproc = self._GetContainerIdWithPathForSproc(collection_link, sproc) - return self.Upsert(sproc, path, http_constants.ResourceType.StoredProcedure, collection_id, None, - options, **kwargs) + return self.Upsert( + sproc, path, http_constants.ResourceType.StoredProcedure, collection_id, None, options, **kwargs + ) def _GetContainerIdWithPathForSproc( - self, - collection_link: str, - sproc: Mapping[str, Any] + self, collection_link: str, sproc: Mapping[str, Any] ) -> Tuple[Optional[str], str, dict[str, Any]]: base._validate_resource(sproc) sproc = dict(sproc) @@ -1948,10 +1878,7 @@ def _GetContainerIdWithPathForSproc( return collection_id, path, sproc def ReadStoredProcedure( - self, - sproc_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, sproc_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a stored procedure. @@ -1974,10 +1901,7 @@ def ReadStoredProcedure( return self.Read(path, http_constants.ResourceType.StoredProcedure, sproc_id, None, options, **kwargs) def ReadConflicts( - self, - collection_link: str, - feed_options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, feed_options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Reads conflicts. @@ -2025,18 +1949,22 @@ def QueryConflicts( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - path, http_constants.ResourceType.Conflict, collection_id, lambda r: r["Conflicts"], - lambda _, b: b, query, options, **kwargs) + path, + http_constants.ResourceType.Conflict, + collection_id, + lambda r: r["Conflicts"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) def ReadConflict( - self, - conflict_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, conflict_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a conflict. @@ -2057,12 +1985,7 @@ def ReadConflict( conflict_id = base.GetResourceIdOrFullNameFromLink(conflict_link) return self.Read(path, http_constants.ResourceType.Conflict, conflict_id, None, options, **kwargs) - def DeleteContainer( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + def DeleteContainer(self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a collection. :param str collection_link: @@ -2120,13 +2043,9 @@ def ReplaceItem( collection_link = base.GetItemContainerLink(document_link) options = self._AddPartitionKey(collection_link, new_document, options) - return self.Replace(new_document, - path, - http_constants.ResourceType.Document, - document_id, - None, - options, - **kwargs) + return self.Replace( + new_document, path, http_constants.ResourceType.Document, document_id, None, options, **kwargs + ) def PatchItem( self, @@ -2154,13 +2073,20 @@ def PatchItem( if options is None: options = {} - headers = base.GetHeaders(self, self.default_headers, "patch", path, document_id, resource_type, - documents._OperationType.Patch, options) + headers = base.GetHeaders( + self, + self.default_headers, + "patch", + path, + document_id, + resource_type, + documents._OperationType.Patch, + options, + ) # Patch will use WriteEndpoint since it uses PUT operation - request_params = RequestObject(resource_type, - documents._OperationType.Patch, - headers, - options.get("partitionKey", None)) + request_params = RequestObject( + resource_type, documents._OperationType.Patch, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -2206,13 +2132,7 @@ def Batch( collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) formatted_operations = base._format_batch_operations(batch_operations) - results, last_response_headers = self._Batch( - formatted_operations, - path, - collection_id, - options, - **kwargs - ) + results, last_response_headers = self._Batch(formatted_operations, path, collection_id, options, **kwargs) self.last_response_headers = last_response_headers final_responses = [] is_error = False @@ -2232,10 +2152,9 @@ def Batch( headers=last_response_headers, status_code=error_status, message="There was an error in the transactional batch on index {}. Error message: {}".format( - str(error_index), - Constants.ERROR_TRANSLATIONS.get(error_status) + str(error_index), Constants.ERROR_TRANSLATIONS.get(error_status) ), - operation_responses=final_responses + operation_responses=final_responses, ) if response_hook: response_hook(last_response_headers, final_responses) @@ -2251,13 +2170,22 @@ def _Batch( ) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: initial_headers = self.default_headers.copy() base._populate_batch_headers(initial_headers) - headers = base.GetHeaders(self, initial_headers, "post", path, collection_id, - http_constants.ResourceType.Document, - documents._OperationType.Batch, options) - request_params = RequestObject(http_constants.ResourceType.Document, - documents._OperationType.Batch, - headers, - options.get("partitionKey", None)) + headers = base.GetHeaders( + self, + initial_headers, + "post", + path, + collection_id, + http_constants.ResourceType.Document, + documents._OperationType.Batch, + options, + ) + request_params = RequestObject( + http_constants.ResourceType.Document, + documents._OperationType.Batch, + headers, + options.get("partitionKey", None), + ) request_params.set_excluded_location_from_options(options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) request_params.set_availability_strategy(options, self.availability_strategy) @@ -2266,15 +2194,10 @@ def _Batch( base.set_session_token_header(self, headers, path, request_params, options) return cast( Tuple[list[dict[str, Any]], CaseInsensitiveDict], - self.__Post(path, request_params, batch_operations, headers, **kwargs) + self.__Post(path, request_params, batch_operations, headers, **kwargs), ) - def DeleteItem( - self, - document_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + def DeleteItem(self, document_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a document. :param str document_link: @@ -2294,10 +2217,7 @@ def DeleteItem( self.DeleteResource(path, http_constants.ResourceType.Document, document_id, None, options, **kwargs) def DeleteAllItemsByPartitionKey( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Exposes an API to delete all items with a single partition key without the user having to explicitly call delete on each record in the partition key. @@ -2316,23 +2236,29 @@ def DeleteAllItemsByPartitionKey( path = base.GetPathFromLink(collection_link) # Specified url to perform background operation to delete all items by partition key - path = '{}{}/{}'.format(path, "operations", "partitionkeydelete") + path = "{}{}/{}".format(path, "operations", "partitionkeydelete") collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) - headers = base.GetHeaders(self, self.default_headers, "post", path, collection_id, - http_constants.ResourceType.PartitionKey, documents._OperationType.Delete, options) - request_params = RequestObject(http_constants.ResourceType.PartitionKey, - documents._OperationType.Delete, - headers, - options.get("partitionKey", None)) + headers = base.GetHeaders( + self, + self.default_headers, + "post", + path, + collection_id, + http_constants.ResourceType.PartitionKey, + documents._OperationType.Delete, + options, + ) + request_params = RequestObject( + http_constants.ResourceType.PartitionKey, + documents._OperationType.Delete, + headers, + options.get("partitionKey", None), + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor _, last_response_headers = self.__Post( - path=path, - request_params=request_params, - req_headers=headers, - body=None, - **kwargs + path=path, request_params=request_params, req_headers=headers, body=None, **kwargs ) self._UpdateSessionIfRequired(headers, None, last_response_headers) self.last_response_headers = last_response_headers @@ -2340,11 +2266,7 @@ def DeleteAllItemsByPartitionKey( response_hook(last_response_headers, None) def ReplaceTrigger( - self, - trigger_link: str, - trigger: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, trigger_link: str, trigger: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a trigger and returns it. @@ -2374,12 +2296,7 @@ def ReplaceTrigger( trigger_id = base.GetResourceIdOrFullNameFromLink(trigger_link) return self.Replace(trigger, path, http_constants.ResourceType.Trigger, trigger_id, None, options, **kwargs) - def DeleteTrigger( - self, - trigger_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + def DeleteTrigger(self, trigger_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a trigger. :param str trigger_link: @@ -2399,11 +2316,7 @@ def DeleteTrigger( self.DeleteResource(path, http_constants.ResourceType.Trigger, trigger_id, None, options, **kwargs) def ReplaceUserDefinedFunction( - self, - udf_link: str, - udf: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, udf_link: str, udf: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a user-defined function and returns it. @@ -2434,10 +2347,7 @@ def ReplaceUserDefinedFunction( return self.Replace(udf, path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, options, **kwargs) def DeleteUserDefinedFunction( - self, - udf_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, udf_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a user-defined function. @@ -2490,22 +2400,26 @@ def ExecuteStoredProcedure( path = base.GetPathFromLink(sproc_link) sproc_id = base.GetResourceIdOrFullNameFromLink(sproc_link) - headers = base.GetHeaders(self, initial_headers, "post", path, sproc_id, - http_constants.ResourceType.StoredProcedure, - documents._OperationType.ExecuteJavaScript, options) + headers = base.GetHeaders( + self, + initial_headers, + "post", + path, + sproc_id, + http_constants.ResourceType.StoredProcedure, + documents._OperationType.ExecuteJavaScript, + options, + ) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request_params = RequestObject(http_constants.ResourceType.StoredProcedure, - documents._OperationType.ExecuteJavaScript, headers) + request_params = RequestObject( + http_constants.ResourceType.StoredProcedure, documents._OperationType.ExecuteJavaScript, headers + ) result, self.last_response_headers = self.__Post(path, request_params, params, headers, **kwargs) return result def ReplaceStoredProcedure( - self, - sproc_link: str, - sproc: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, sproc_link: str, sproc: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a stored procedure and returns it. @@ -2536,10 +2450,7 @@ def ReplaceStoredProcedure( return self.Replace(sproc, path, http_constants.ResourceType.StoredProcedure, sproc_id, None, options, **kwargs) def DeleteStoredProcedure( - self, - sproc_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, sproc_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a stored procedure. @@ -2559,12 +2470,7 @@ def DeleteStoredProcedure( sproc_id = base.GetResourceIdOrFullNameFromLink(sproc_link) self.DeleteResource(path, http_constants.ResourceType.StoredProcedure, sproc_id, None, options, **kwargs) - def DeleteConflict( - self, - conflict_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + def DeleteConflict(self, conflict_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a conflict. :param str conflict_link: @@ -2583,12 +2489,7 @@ def DeleteConflict( conflict_id = base.GetResourceIdOrFullNameFromLink(conflict_link) self.DeleteResource(path, http_constants.ResourceType.Conflict, conflict_id, None, options, **kwargs) - def ReplaceOffer( - self, - offer_link: str, - offer: dict[str, Any], - **kwargs: Any - ) -> CosmosDict: + def ReplaceOffer(self, offer_link: str, offer: dict[str, Any], **kwargs: Any) -> CosmosDict: """Replaces an offer and returns it. :param str offer_link: @@ -2606,11 +2507,7 @@ def ReplaceOffer( offer_id = base.GetResourceIdOrFullNameFromLink(offer_link) return self.Replace(offer, path, http_constants.ResourceType.Offer, offer_id, None, None, **kwargs) - def ReadOffer( - self, - offer_link: str, - **kwargs: Any - ) -> CosmosDict: + def ReadOffer(self, offer_link: str, **kwargs: Any) -> CosmosDict: """Reads an offer. :param str offer_link: The link to the offer. @@ -2623,11 +2520,7 @@ def ReadOffer( offer_id = base.GetResourceIdOrFullNameFromLink(offer_link) return self.Read(path, http_constants.ResourceType.Offer, offer_id, None, {}, **kwargs) - def ReadOffers( - self, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> ItemPaged[dict[str, Any]]: + def ReadOffers(self, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> ItemPaged[dict[str, Any]]: """Reads all offers. :param dict options: The request options for the request @@ -2642,10 +2535,7 @@ def ReadOffers( return self.QueryOffers(None, options, **kwargs) def QueryOffers( - self, - query: Optional[Union[str, dict[str, Any]]], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, query: Optional[Union[str, dict[str, Any]]], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Query for all offers. @@ -2664,18 +2554,21 @@ def QueryOffers( def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return self.__QueryFeed( - "/offers", http_constants.ResourceType.Offer, "", lambda r: r["Offers"], - lambda _, b: b, query, options, **kwargs) + "/offers", + http_constants.ResourceType.Offer, + "", + lambda r: r["Offers"], + lambda _, b: b, + query, + options, + **kwargs + ) return ItemPaged( self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable ) - def GetDatabaseAccount( - self, - url_connection: Optional[str] = None, - **kwargs: Any - ) -> DatabaseAccount: + def GetDatabaseAccount(self, url_connection: Optional[str] = None, **kwargs: Any) -> DatabaseAccount: """Gets database account info. :param str url_connection: the endpoint used to get the database account @@ -2686,12 +2579,15 @@ def GetDatabaseAccount( if url_connection is None: url_connection = self.url_connection - headers = base.GetHeaders(self, self.default_headers, "get", "", "", "", - documents._OperationType.Read,{}, client_id=self.client_id) - request_params = RequestObject(http_constants.ResourceType.DatabaseAccount, - documents._OperationType.Read, - headers, - endpoint_override=url_connection) + headers = base.GetHeaders( + self, self.default_headers, "get", "", "", "", documents._OperationType.Read, {}, client_id=self.client_id + ) + request_params = RequestObject( + http_constants.ResourceType.DatabaseAccount, + documents._OperationType.Read, + headers, + endpoint_override=url_connection, + ) result, last_response_headers = self.__Get("", request_params, headers, **kwargs) self.last_response_headers = last_response_headers database_account = DatabaseAccount() @@ -2713,11 +2609,10 @@ def GetDatabaseAccount( if Constants.ReadableLocations in result: database_account._ReadableLocations = result[Constants.ReadableLocations] if Constants.EnableMultipleWritableLocations in result: - database_account._EnableMultipleWritableLocations = result[ - Constants.EnableMultipleWritableLocations] + database_account._EnableMultipleWritableLocations = result[Constants.EnableMultipleWritableLocations] self.UseMultipleWriteLocations = ( - self.connection_policy.UseMultipleWriteLocations and database_account._EnableMultipleWritableLocations + self.connection_policy.UseMultipleWriteLocations and database_account._EnableMultipleWritableLocations ) if Constants.EnablePerPartitionFailoverBehavior in result: @@ -2727,28 +2622,25 @@ def GetDatabaseAccount( response_hook(last_response_headers, result) return database_account - def health_check( - self, - url_connection: Optional[str] = None, - **kwargs: Any - ): - """ Send a request to check the health of region. + def health_check(self, url_connection: Optional[str] = None, **kwargs: Any): + """Send a request to check the health of region. :param str url_connection: the endpoint for the region being checked """ if url_connection is None: url_connection = self.url_connection - headers = base.GetHeaders(self, self.default_headers, "get", "", "", "", - documents._OperationType.Read, {}, - client_id=self.client_id) - request_params = RequestObject(http_constants.ResourceType.DatabaseAccount, - documents._OperationType.Read, - headers, - endpoint_override=url_connection) + headers = base.GetHeaders( + self, self.default_headers, "get", "", "", "", documents._OperationType.Read, {}, client_id=self.client_id + ) + request_params = RequestObject( + http_constants.ResourceType.DatabaseAccount, + documents._OperationType.Read, + headers, + endpoint_override=url_connection, + ) self.__Get("", request_params, headers, **kwargs) - def Create( self, body: dict[str, Any], @@ -2775,18 +2667,18 @@ def Create( ~azure.cosmos.CosmosDict[str, Any] """ - response_hook = kwargs.pop('response_hook', None) + response_hook = kwargs.pop("response_hook", None) if options is None: options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "post", path, id, resource_type, - documents._OperationType.Create, options) + headers = base.GetHeaders( + self, initial_headers, "post", path, id, resource_type, documents._OperationType.Create, options + ) # Create will use WriteEndpoint since it uses POST operation - request_params = RequestObject(resource_type, - documents._OperationType.Create, - headers, - options.get("partitionKey", None)) + request_params = RequestObject( + resource_type, documents._OperationType.Create, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -2827,19 +2719,19 @@ def Upsert( ~azure.cosmos.CosmosDict[str, Any] """ - response_hook = kwargs.pop('response_hook', None) + response_hook = kwargs.pop("response_hook", None) if options is None: options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "post", path, id, resource_type, - documents._OperationType.Upsert, options) + headers = base.GetHeaders( + self, initial_headers, "post", path, id, resource_type, documents._OperationType.Upsert, options + ) headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request_params = RequestObject(resource_type, - documents._OperationType.Upsert, - headers, - options.get("partitionKey", None)) + request_params = RequestObject( + resource_type, documents._OperationType.Upsert, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -2879,18 +2771,18 @@ def Replace( ~azure.cosmos.CosmosDict[str, Any] """ - response_hook = kwargs.pop('response_hook', None) + response_hook = kwargs.pop("response_hook", None) if options is None: options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "put", path, id, resource_type, - documents._OperationType.Replace, options) + headers = base.GetHeaders( + self, initial_headers, "put", path, id, resource_type, documents._OperationType.Replace, options + ) # Replace will use WriteEndpoint since it uses PUT operation - request_params = RequestObject(resource_type, - documents._OperationType.Replace, - headers, - options.get("partitionKey", None)) + request_params = RequestObject( + resource_type, documents._OperationType.Replace, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -2929,18 +2821,18 @@ def Read( ~azure.cosmos.CosmosDict[str, Any] """ - response_hook = kwargs.pop('response_hook', None) + response_hook = kwargs.pop("response_hook", None) if options is None: options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "get", path, id, resource_type, - documents._OperationType.Read, options) + headers = base.GetHeaders( + self, initial_headers, "get", path, id, resource_type, documents._OperationType.Read, options + ) # Read will use ReadEndpoint since it uses GET operation - request_params = RequestObject(resource_type, - documents._OperationType.Read, - headers, - options.get("partitionKey", None)) + request_params = RequestObject( + resource_type, documents._OperationType.Read, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -2976,18 +2868,18 @@ def DeleteResource( None """ - response_hook = kwargs.pop('response_hook', None) + response_hook = kwargs.pop("response_hook", None) if options is None: options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "delete", path, id, resource_type, - documents._OperationType.Delete, options) + headers = base.GetHeaders( + self, initial_headers, "delete", path, id, resource_type, documents._OperationType.Delete, options + ) # Delete will use WriteEndpoint since it uses DELETE operation - request_params = RequestObject(resource_type, - documents._OperationType.Delete, - headers, - options.get("partitionKey", None)) + request_params = RequestObject( + resource_type, documents._OperationType.Delete, headers, options.get("partitionKey", None) + ) base.set_session_token_header(self, headers, path, request_params, options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) request_params.set_excluded_location_from_options(options) @@ -3002,11 +2894,7 @@ def DeleteResource( response_hook(last_response_headers, None) def __Get( - self, - path: str, - request_params: RequestObject, - req_headers: dict[str, Any], - **kwargs: Any + self, path: str, request_params: RequestObject, req_headers: dict[str, Any], **kwargs: Any ) -> Tuple[dict[str, Any], CaseInsensitiveDict]: """Azure Cosmos 'GET' http request. @@ -3058,12 +2946,7 @@ def __Post( ) def __Put( - self, - path: str, - request_params: RequestObject, - body: dict[str, Any], - req_headers: dict[str, Any], - **kwargs: Any + self, path: str, request_params: RequestObject, body: dict[str, Any], req_headers: dict[str, Any], **kwargs: Any ) -> Tuple[dict[str, Any], CaseInsensitiveDict]: """Azure Cosmos 'PUT' http request. @@ -3116,11 +2999,7 @@ def __Patch( ) def __Delete( - self, - path: str, - request_params: RequestObject, - req_headers: dict[str, Any], - **kwargs: Any + self, path: str, request_params: RequestObject, req_headers: dict[str, Any], **kwargs: Any ) -> Tuple[None, CaseInsensitiveDict]: """Azure Cosmos 'DELETE' http request. @@ -3162,15 +3041,16 @@ def QueryFeed( :rtype: tuple of (dict, dict) """ return self.__QueryFeed( - path, - http_constants.ResourceType.Document, - collection_id, - lambda r: r["Documents"], - lambda _, b: b, - query, - options, - partition_key_range_id, - **kwargs) + path, + http_constants.ResourceType.Document, + collection_id, + lambda r: r["Documents"], + lambda _, b: b, + query, + options, + partition_key_range_id, + **kwargs + ) def __QueryFeed( # pylint: disable=too-many-locals, too-many-statements, too-many-branches self, @@ -3178,7 +3058,7 @@ def __QueryFeed( # pylint: disable=too-many-locals, too-many-statements, too-ma resource_type: str, resource_id: Optional[str], result_fn: Callable[[dict[str, Any]], list[dict[str, Any]]], - create_fn: Optional[Callable[['CosmosClientConnection', dict[str, Any]], dict[str, Any]]], + create_fn: Optional[Callable[["CosmosClientConnection", dict[str, Any]], dict[str, Any]]], query: Optional[Union[str, dict[str, Any]]], options: Optional[Mapping[str, Any]] = None, partition_key_range_id: Optional[str] = None, @@ -3242,22 +3122,9 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: op_type = documents._OperationType.QueryPlan if is_query_plan else documents._OperationType.ReadFeed # Query operations will use ReadEndpoint even though it uses GET(for feed requests) headers = base.GetHeaders( - self, - initial_headers, - "get", - path, - resource_id, - resource_type, - op_type, - options, - partition_key_range_id - ) - request_params = RequestObject( - resource_type, - op_type, - headers, - options.get("partitionKey", None) + self, initial_headers, "get", path, resource_id, resource_type, op_type, options, partition_key_range_id ) + request_params = RequestObject(resource_type, op_type, headers, options.get("partitionKey", None)) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -3267,8 +3134,8 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: change_feed_state: Optional[ChangeFeedState] = options.get("changeFeedState") if change_feed_state is not None: feed_options = {} - if 'excludedLocations' in options: - feed_options['excludedLocations'] = options['excludedLocations'] + if "excludedLocations" in options: + feed_options["excludedLocations"] = options["excludedLocations"] change_feed_state.populate_request_headers(self._routing_map_provider, headers, feed_options) request_params.headers = headers @@ -3282,8 +3149,10 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: query = self.__CheckAndUnifyQueryFormat(query) - if (self._query_compatibility_mode in (CosmosClientConnection._QueryCompatibilityMode.Default, - CosmosClientConnection._QueryCompatibilityMode.Query)): + if self._query_compatibility_mode in ( + CosmosClientConnection._QueryCompatibilityMode.Default, + CosmosClientConnection._QueryCompatibilityMode.Query, + ): initial_headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.QueryJson elif self._query_compatibility_mode == CosmosClientConnection._QueryCompatibilityMode.SqlQuery: initial_headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.SQL @@ -3300,12 +3169,11 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: resource_type, documents._OperationType.SqlQuery, options, - partition_key_range_id + partition_key_range_id, + ) + request_params = RequestObject( + resource_type, documents._OperationType.SqlQuery, req_headers, options.get("partitionKey", None) ) - request_params = RequestObject(resource_type, - documents._OperationType.SqlQuery, - req_headers, - options.get("partitionKey", None)) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_executor = self.availability_strategy_executor @@ -3322,13 +3190,15 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: elif "prefix_partition_key_object" in kwargs and "prefix_partition_key_value" in kwargs: prefix_partition_key_obj = kwargs.pop("prefix_partition_key_object") prefix_partition_key_value: _SequentialPartitionKeyType = kwargs.pop("prefix_partition_key_value") - feed_range_epk = ( - prefix_partition_key_obj._get_epk_range_for_prefix_partition_key(prefix_partition_key_value)) + feed_range_epk = prefix_partition_key_obj._get_epk_range_for_prefix_partition_key( + prefix_partition_key_value + ) # If feed_range_epk exist, query with the range if feed_range_epk is not None: - over_lapping_ranges = self._routing_map_provider.get_overlapping_ranges(resource_id, [feed_range_epk], - options) + over_lapping_ranges = self._routing_map_provider.get_overlapping_ranges( + resource_id, [feed_range_epk], options + ) # It is possible to get more than one over lapping range. We need to get the query results for each one results: dict[str, Any] = {} # For each over lapping range we will take a sub range of the feed range EPK that overlaps with the over @@ -3344,9 +3214,12 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: single_range = routing_range.Range.PartitionKeyRangeToRange(over_lapping_range) # Since the range min and max are all Upper Cased string Hex Values, # we can compare the values lexicographically - EPK_sub_range = routing_range.Range(range_min=max(single_range.min, feed_range_epk.min), - range_max=min(single_range.max, feed_range_epk.max), - isMinInclusive=True, isMaxInclusive=False) + EPK_sub_range = routing_range.Range( + range_min=max(single_range.min, feed_range_epk.min), + range_max=min(single_range.max, feed_range_epk.max), + isMinInclusive=True, + isMaxInclusive=False, + ) if single_range.min == EPK_sub_range.min and EPK_sub_range.max == single_range.max: # The Epk Sub Range spans exactly one physical partition # In this case we can route to the physical pk range id @@ -3359,16 +3232,14 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: req_headers[http_constants.HttpHeaders.StartEpkString] = EPK_sub_range.min req_headers[http_constants.HttpHeaders.EndEpkString] = EPK_sub_range.max req_headers[http_constants.HttpHeaders.ReadFeedKeyType] = "EffectivePartitionKeyRange" - partial_result, last_response_headers = self.__Post( - path, request_params, query, req_headers, **kwargs - ) + partial_result, last_response_headers = self.__Post(path, request_params, query, req_headers, **kwargs) self.last_response_headers = last_response_headers self._UpdateSessionIfRequired(req_headers, partial_result, last_response_headers) # Introducing a temporary complex function into a critical path to handle aggregated queries # during splits, as a precaution falling back to the original logic if anything goes wrong try: results = base._merge_query_results(results, partial_result, query) - except Exception: # pylint: disable=broad-exception-caught + except Exception: # pylint: disable=broad-exception-caught # If the new merge logic fails, fall back to the original logic. if results: results["Documents"].extend(partial_result["Documents"]) @@ -3382,12 +3253,14 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: if results: if last_response_headers.get(http_constants.HttpHeaders.IndexUtilization) is not None: index_metrics_raw = last_response_headers[http_constants.HttpHeaders.IndexUtilization] - last_response_headers[http_constants.HttpHeaders.IndexUtilization] = ( - _utils.get_index_metrics_info(index_metrics_raw)) + last_response_headers[http_constants.HttpHeaders.IndexUtilization] = _utils.get_index_metrics_info( + index_metrics_raw + ) if last_response_headers.get(http_constants.HttpHeaders.QueryAdvice) is not None: query_advice_raw = last_response_headers[http_constants.HttpHeaders.QueryAdvice] - last_response_headers[http_constants.HttpHeaders.QueryAdvice] = ( - get_query_advice_info(query_advice_raw)) + last_response_headers[http_constants.HttpHeaders.QueryAdvice] = get_query_advice_info( + query_advice_raw + ) return __GetBodiesFromQueryResult(results), last_response_headers result, last_response_headers = self.__Post(path, request_params, query, req_headers, **kwargs) @@ -3407,26 +3280,38 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: return __GetBodiesFromQueryResult(result), last_response_headers - def _GetQueryPlanThroughGateway(self, query: str, resource_link: str, - excluded_locations: Optional[Sequence[str]] = None, - **kwargs: Any) -> list[dict[str, Any]]: - supported_query_features = (documents._QueryFeature.Aggregate + "," + - documents._QueryFeature.CompositeAggregate + "," + - documents._QueryFeature.Distinct + "," + - documents._QueryFeature.MultipleOrderBy + "," + - documents._QueryFeature.OffsetAndLimit + "," + - documents._QueryFeature.OrderBy + "," + - documents._QueryFeature.Top + "," + - documents._QueryFeature.NonStreamingOrderBy + "," + - documents._QueryFeature.HybridSearch + "," + - documents._QueryFeature.CountIf + "," + - documents._QueryFeature.WeightedRankFusion) + def _GetQueryPlanThroughGateway( + self, query: str, resource_link: str, excluded_locations: Optional[Sequence[str]] = None, **kwargs: Any + ) -> list[dict[str, Any]]: + supported_query_features = ( + documents._QueryFeature.Aggregate + + "," + + documents._QueryFeature.CompositeAggregate + + "," + + documents._QueryFeature.Distinct + + "," + + documents._QueryFeature.MultipleOrderBy + + "," + + documents._QueryFeature.OffsetAndLimit + + "," + + documents._QueryFeature.OrderBy + + "," + + documents._QueryFeature.Top + + "," + + documents._QueryFeature.NonStreamingOrderBy + + "," + + documents._QueryFeature.HybridSearch + + "," + + documents._QueryFeature.CountIf + + "," + + documents._QueryFeature.WeightedRankFusion + ) options = { "contentType": runtime_constants.MediaTypes.Json, "isQueryPlanRequest": True, "supportedQueryFeatures": supported_query_features, - "queryVersion": http_constants.Versions.QueryVersion + "queryVersion": http_constants.Versions.QueryVersion, } if excluded_locations is not None: options["excludedLocations"] = excluded_locations @@ -3461,8 +3346,10 @@ def __CheckAndUnifyQueryFormat(self, query_body: Union[str, dict[str, Any]]) -> :rtype: dict or string """ - if (self._query_compatibility_mode in (CosmosClientConnection._QueryCompatibilityMode.Default, - CosmosClientConnection._QueryCompatibilityMode.Query)): + if self._query_compatibility_mode in ( + CosmosClientConnection._QueryCompatibilityMode.Default, + CosmosClientConnection._QueryCompatibilityMode.Query, + ): if not isinstance(query_body, dict) and not isinstance(query_body, str): raise TypeError("query body must be a dict or string.") if isinstance(query_body, dict) and not query_body.get("query"): @@ -3470,8 +3357,8 @@ def __CheckAndUnifyQueryFormat(self, query_body: Union[str, dict[str, Any]]) -> if isinstance(query_body, str): return {"query": query_body} elif ( - self._query_compatibility_mode == CosmosClientConnection._QueryCompatibilityMode.SqlQuery - and not isinstance(query_body, str) + self._query_compatibility_mode == CosmosClientConnection._QueryCompatibilityMode.SqlQuery + and not isinstance(query_body, str) ): raise TypeError("query body must be a string.") else: @@ -3480,10 +3367,7 @@ def __CheckAndUnifyQueryFormat(self, query_body: Union[str, dict[str, Any]]) -> # Adds the partition key to options def _AddPartitionKey( - self, - collection_link: str, - document: Mapping[str, Any], - options: Mapping[str, Any] + self, collection_link: str, document: Mapping[str, Any], options: Mapping[str, Any] ) -> dict[str, Any]: collection_link = base.TrimBeginningAndEndingSlashes(collection_link) partitionKeyDefinition = self._get_partition_key_definition(collection_link, options) @@ -3498,9 +3382,7 @@ def _AddPartitionKey( # Extracts the partition key from the document using the partitionKey definition def _ExtractPartitionKey( - self, - partitionKeyDefinition: Mapping[str, Any], - document: Mapping[str, Any] + self, partitionKeyDefinition: Mapping[str, Any], document: Mapping[str, Any] ) -> Union[list[Optional[Union[str, float, bool]]], str, float, bool, _Empty, _Undefined]: if partitionKeyDefinition["kind"] == _PartitionKeyKind.MULTI_HASH: ret: list[Optional[Union[str, float, bool]]] = [] @@ -3511,7 +3393,8 @@ def _ExtractPartitionKey( is_system_key = partitionKeyDefinition["systemKey"] if "systemKey" in partitionKeyDefinition else False # Navigates the document to retrieve the partitionKey specified in the paths val: Optional[Union[str, float, bool, _Empty, _Undefined]] = self._retrieve_partition_key( - partition_key_parts, document, is_system_key) + partition_key_parts, document, is_system_key + ) if isinstance(val, (_Undefined, _Empty)): val = None ret.append(val) @@ -3527,10 +3410,7 @@ def _ExtractPartitionKey( # Navigates the document to retrieve the partitionKey specified in the partition key parts def _retrieve_partition_key( - self, - partition_key_parts: list[str], - document: Mapping[str, Any], - is_system_key: bool + self, partition_key_parts: list[str], document: Mapping[str, Any], is_system_key: bool ) -> Union[str, float, bool, _Empty, _Undefined]: expected_matchCount = len(partition_key_parts) matchCount = 0 @@ -3565,7 +3445,7 @@ def _UpdateSessionIfRequired( self, request_headers: Mapping[str, Any], response_result: Optional[Mapping[str, Any]], - response_headers: Optional[Mapping[str, Any]] + response_headers: Optional[Mapping[str, Any]], ) -> None: """ Updates session if necessary. @@ -3587,15 +3467,17 @@ def _UpdateSessionIfRequired( if documents.ConsistencyLevel.Session == request_headers[http_constants.HttpHeaders.ConsistencyLevel]: is_session_consistency = True - if (is_session_consistency and self.session and http_constants.HttpHeaders.SessionToken in response_headers and - not base.IsMasterResource(request_headers[http_constants.HttpHeaders.ThinClientProxyResourceType])): + if ( + is_session_consistency + and self.session + and http_constants.HttpHeaders.SessionToken in response_headers + and not base.IsMasterResource(request_headers[http_constants.HttpHeaders.ThinClientProxyResourceType]) + ): # update session self.session.update_session(self, response_result, response_headers) def _get_partition_key_definition( - self, - collection_link: str, - options: Mapping[str, Any] + self, collection_link: str, options: Mapping[str, Any] ) -> Optional[dict[str, Any]]: partition_key_definition: Optional[dict[str, Any]] # If the document collection link is present in the cache, then use the cached partitionkey definition diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_http_logging_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_http_logging_policy.py index aa9707a9a441..6bca5cb3d732 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_http_logging_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_http_logging_policy.py @@ -54,16 +54,22 @@ from .documents import DatabaseAccount, ConnectionPolicy HTTPRequestType = Union["LegacyHttpRequest", "HttpRequest"] -HTTPResponseType = Union["LegacyHttpResponse", "HttpResponse", "LegacyAsyncHttpResponse", -"AsyncHttpResponse", "SansIOHttpResponse", "LegacySansIOHttpResponse"] +HTTPResponseType = Union[ + "LegacyHttpResponse", + "HttpResponse", + "LegacyAsyncHttpResponse", + "AsyncHttpResponse", + "SansIOHttpResponse", + "LegacySansIOHttpResponse", +] # These Helper functions are used to Log Diagnostics for the SDK outside on_request and on_response def _populate_logger_attributes( # type: ignore[attr-defined, union-attr] - logger_attributes: Optional[dict[str, Any]] = None, - request: Optional[Union[PipelineRequest[HTTPRequestType], Any]] = None, - exception: Optional[Union[CosmosHttpResponseError, - ServiceRequestError, ServiceResponseError]] = None) -> dict[str, Any]: + logger_attributes: Optional[dict[str, Any]] = None, + request: Optional[Union[PipelineRequest[HTTPRequestType], Any]] = None, + exception: Optional[Union[CosmosHttpResponseError, ServiceRequestError, ServiceResponseError]] = None, +) -> dict[str, Any]: """Populates the logger attributes with the request and response details. :param logger_attributes: Optional[dict[str, Any]], The logger attributes to populate. @@ -86,25 +92,23 @@ def _populate_logger_attributes( # type: ignore[attr-defined, union-attr] logger_attributes["activity_id"] = http_request.headers.get(HttpHeaders.ActivityId, "") logger_attributes["verb"] = http_request.method logger_attributes["url"] = http_request.url - logger_attributes["operation_type"] = http_request.headers.get( - 'x-ms-thinclient-proxy-operation-type') - logger_attributes["resource_type"] = http_request.headers.get( - 'x-ms-thinclient-proxy-resource-type') + logger_attributes["operation_type"] = http_request.headers.get("x-ms-thinclient-proxy-operation-type") + logger_attributes["resource_type"] = http_request.headers.get("x-ms-thinclient-proxy-resource-type") if logger_attributes["url"]: - url_parts = logger_attributes["url"].split('/') - if 'dbs' in url_parts: - dbs_index = url_parts.index('dbs') + url_parts = logger_attributes["url"].split("/") + if "dbs" in url_parts: + dbs_index = url_parts.index("dbs") if dbs_index + 1 < len(url_parts): logger_attributes["database_name"] = url_parts[dbs_index + 1] - if 'colls' in url_parts: - colls_index = url_parts.index('colls') + if "colls" in url_parts: + colls_index = url_parts.index("colls") if colls_index + 1 < len(url_parts): logger_attributes["collection_name"] = url_parts[colls_index + 1] if exception: - if hasattr(exception, 'status_code'): + if hasattr(exception, "status_code"): logger_attributes["status_code"] = exception.status_code - if hasattr(exception, 'sub_status'): + if hasattr(exception, "sub_status"): logger_attributes["sub_status_code"] = exception.sub_status logger_attributes["is_request"] = False @@ -112,13 +116,14 @@ def _populate_logger_attributes( # type: ignore[attr-defined, union-attr] def _log_diagnostics_error( # type: ignore[attr-defined, union-attr] - diagnostics_enabled: bool = False, - request: Optional[PipelineRequest[HTTPRequestType]] = None, - response_headers: Optional[dict] = None, error: Optional[Union[CosmosHttpResponseError, - ServiceRequestError, ServiceResponseError]] = None, - logger_attributes: Optional[dict] = None, - global_endpoint_manager: Optional[_GlobalEndpointManager] = None, - logger: Optional[Logger] = None): + diagnostics_enabled: bool = False, + request: Optional[PipelineRequest[HTTPRequestType]] = None, + response_headers: Optional[dict] = None, + error: Optional[Union[CosmosHttpResponseError, ServiceRequestError, ServiceResponseError]] = None, + logger_attributes: Optional[dict] = None, + global_endpoint_manager: Optional[_GlobalEndpointManager] = None, + logger: Optional[Logger] = None, +): """Logs the request and response error details to the logger. :param diagnostics_enabled: Whether diagnostics logging is enabled. @@ -138,8 +143,7 @@ def _log_diagnostics_error( # type: ignore[attr-defined, union-attr] """ if diagnostics_enabled: logger = logger or logging.getLogger("azure.cosmos._cosmos_http_logging_policy") - logger_attributes = _populate_logger_attributes(logger_attributes, - request, error) + logger_attributes = _populate_logger_attributes(logger_attributes, request, error) log_string: str = _get_client_settings(global_endpoint_manager) log_string += _get_database_account_settings(global_endpoint_manager) http_request = request.http_request if request else None @@ -155,7 +159,8 @@ def _log_diagnostics_error( # type: ignore[attr-defined, union-attr] log_string += "\nResponse status: {}".format(logger_attributes.get("status_code", "")) if response_headers: log_string += "\nResponse Activity ID: {}".format( - response_headers.get(HttpHeaders.ActivityId, logger_attributes.get("activity_id", ""))) + response_headers.get(HttpHeaders.ActivityId, logger_attributes.get("activity_id", "")) + ) log_string += "\nResponse headers: " for res_header, value in response_headers.items(): value = _redact_header(res_header, value) @@ -163,8 +168,8 @@ def _log_diagnostics_error( # type: ignore[attr-defined, union-attr] log_string += "\n '{}': '{}'".format(res_header, value) if "duration" in logger_attributes: seconds = logger_attributes["duration"] / 1000 # type: ignore[operator] - log_string += f"\nElapsed time in seconds: {seconds:.6f}".rstrip('0').rstrip('.') - log_string += "\nResponse error message: {}".format(_format_error(getattr(error, 'message', str(error)))) + log_string += f"\nElapsed time in seconds: {seconds:.6f}".rstrip("0").rstrip(".") + log_string += "\nResponse error message: {}".format(_format_error(getattr(error, "message", str(error)))) logger.info(log_string, extra=logger_attributes) @@ -176,7 +181,7 @@ def _get_client_settings(global_endpoint_manager: Optional[_GlobalEndpointManage client_account_write_regions = [] if global_endpoint_manager: - if hasattr(global_endpoint_manager, 'client'): + if hasattr(global_endpoint_manager, "client"): gem_client = global_endpoint_manager.client if gem_client and gem_client.connection_policy: connection_policy: ConnectionPolicy = gem_client.connection_policy @@ -188,20 +193,23 @@ def _get_client_settings(global_endpoint_manager: Optional[_GlobalEndpointManage client_account_read_regions = location_cache.account_read_locations client_account_write_regions = location_cache.account_write_locations logger_str = "Client Settings: \n" - client_settings = {"Preferred Regions": client_preferred_regions, - "Excluded Regions": client_excluded_regions, - "Account Read Regions": client_account_read_regions, - "Account Write Regions": client_account_write_regions} + client_settings = { + "Preferred Regions": client_preferred_regions, + "Excluded Regions": client_excluded_regions, + "Account Read Regions": client_account_read_regions, + "Account Write Regions": client_account_write_regions, + } if client_settings and isinstance(client_settings, dict): - logger_str += ''.join([f"\t{k}: {v}\n" for k, v in client_settings.items()]) + logger_str += "".join([f"\t{k}: {v}\n" for k, v in client_settings.items()]) return logger_str -def _get_database_account_settings(global_endpoint_manager: Optional[_GlobalEndpointManager]) \ - -> str: +def _get_database_account_settings(global_endpoint_manager: Optional[_GlobalEndpointManager]) -> str: database_account: Optional["DatabaseAccount"] = None - if global_endpoint_manager and hasattr(global_endpoint_manager, '_database_account_cache'): - database_account = global_endpoint_manager._database_account_cache # pylint: disable=protected-access, line-too-long + if global_endpoint_manager and hasattr(global_endpoint_manager, "_database_account_cache"): + database_account = ( + global_endpoint_manager._database_account_cache + ) # pylint: disable=protected-access, line-too-long logger_str = "\nDatabase Account Settings: \n" if database_account and database_account.ConsistencyPolicy: @@ -222,7 +230,7 @@ def _redact_header(key: str, value: str) -> str: def _format_error(payload: str) -> str: try: output = json.loads(payload) - ret_str = "\n\t" + "Code: " + output['code'] + "\n" + ret_str = "\n\t" + "Code: " + output["code"] + "\n" message = output["message"].replace("\r\n", "\n\t\t").replace(",", ",\n\t\t") ret_str += "\t" + message + "\n" except (json.JSONDecodeError, KeyError): @@ -242,12 +250,12 @@ def _iter_loggers(logger): class CosmosHttpLoggingPolicy(HttpLoggingPolicy): def __init__( - self, - logger: Optional[logging.Logger] = None, - global_endpoint_manager: Optional[_GlobalEndpointManager] = None, - *, - enable_diagnostics_logging: bool = False, - **kwargs + self, + logger: Optional[logging.Logger] = None, + global_endpoint_manager: Optional[_GlobalEndpointManager] = None, + *, + enable_diagnostics_logging: bool = False, + **kwargs, ): super().__init__(logger, **kwargs) self.logger: logging.Logger = logger or logging.getLogger("azure.cosmos._cosmos_http_logging_policy") @@ -267,9 +275,10 @@ def _redact_header(self, key: str, value: str) -> str: return _redact_header(key, value) def on_request( - # pylint: disable=too-many-return-statements, too-many-statements, too-many-nested-blocks, too-many-branches - # pylint: disable=too-many-locals - self, request: PipelineRequest[HTTPRequestType] + # pylint: disable=too-many-return-statements, too-many-statements, too-many-nested-blocks, too-many-branches + # pylint: disable=too-many-locals + self, + request: PipelineRequest[HTTPRequestType], ) -> None: """Logs HTTP method, url and headers. :param request: The PipelineRequest object. @@ -289,27 +298,28 @@ def on_request( # the request again filter_applied = any( bool(current_logger.filters) or any(bool(h.filters) for h in current_logger.handlers) - for current_logger in _iter_loggers(logger)) - if filter_applied and 'logger_attributes' not in request.context: + for current_logger in _iter_loggers(logger) + ) + if filter_applied and "logger_attributes" not in request.context: return - operation_type = http_request.headers.get('x-ms-thinclient-proxy-operation-type', "") + operation_type = http_request.headers.get("x-ms-thinclient-proxy-operation-type", "") try: url = request.http_request.url except AttributeError: url = None database_name = None collection_name = None - resource_type = http_request.headers.get('x-ms-thinclient-proxy-resource-type', "") + resource_type = http_request.headers.get("x-ms-thinclient-proxy-resource-type", "") if url: - url_parts = url.split('/') - if 'dbs' in url_parts: - dbs_index = url_parts.index('dbs') + url_parts = url.split("/") + if "dbs" in url_parts: + dbs_index = url_parts.index("dbs") if dbs_index + 1 < len(url_parts): - database_name = url_parts[url_parts.index('dbs') + 1] - if 'colls' in url_parts: - colls_index = url_parts.index('colls') + database_name = url_parts[url_parts.index("dbs") + 1] + if "colls" in url_parts: + colls_index = url_parts.index("colls") if colls_index + 1 < len(url_parts): - collection_name = url_parts[url_parts.index('colls') + 1] + collection_name = url_parts[url_parts.index("colls") + 1] if not logger.isEnabledFor(logging.INFO): return @@ -323,24 +333,25 @@ def on_request( multi_record = os.environ.get(HttpLoggingPolicy.MULTI_RECORD_LOG, False) - if filter_applied and 'logger_attributes' in request.context: - cosmos_logger_attributes = request.context['logger_attributes'] - cosmos_logger_attributes['activity_id'] = http_request.headers.get(HttpHeaders.ActivityId, "") - cosmos_logger_attributes['is_request'] = True + if filter_applied and "logger_attributes" in request.context: + cosmos_logger_attributes = request.context["logger_attributes"] + cosmos_logger_attributes["activity_id"] = http_request.headers.get(HttpHeaders.ActivityId, "") + cosmos_logger_attributes["is_request"] = True else: cosmos_logger_attributes = { - 'activity_id': http_request.headers.get(HttpHeaders.ActivityId, ""), - 'duration': None, - 'status_code': None, - 'sub_status_code': None, - 'verb': http_request.method, - 'url': redacted_url, - 'database_name': database_name, - 'collection_name': collection_name, - 'resource_type': resource_type, - 'operation_type': operation_type, - 'exception_type': "", - 'is_request': True} + "activity_id": http_request.headers.get(HttpHeaders.ActivityId, ""), + "duration": None, + "status_code": None, + "sub_status_code": None, + "verb": http_request.method, + "url": redacted_url, + "database_name": database_name, + "collection_name": collection_name, + "resource_type": resource_type, + "operation_type": operation_type, + "exception_type": "", + "is_request": True, + } client_settings = self._log_client_settings() db_settings = self._log_database_account_settings() @@ -349,8 +360,11 @@ def on_request( logger.info(db_settings, extra=cosmos_logger_attributes) logger.info("Request URL: %r", redacted_url, extra=cosmos_logger_attributes) logger.info("Request method: %r", http_request.method, extra=cosmos_logger_attributes) - logger.info("Request Activity ID: %r", http_request.headers.get(HttpHeaders.ActivityId, ""), - extra=cosmos_logger_attributes) + logger.info( + "Request Activity ID: %r", + http_request.headers.get(HttpHeaders.ActivityId, ""), + extra=cosmos_logger_attributes, + ) logger.info("Request headers:", extra=cosmos_logger_attributes) for header, value in http_request.headers.items(): value = self._redact_header(header, value) @@ -400,15 +414,16 @@ def on_request( request.context.pop("logger_attributes", None) except Exception as err: # pylint: disable=broad-except - logger.warning("Failed to log request: %s", - repr(err)) # pylint: disable=do-not-log-exceptions-if-not-debug + logger.warning( + "Failed to log request: %s", repr(err) + ) # pylint: disable=do-not-log-exceptions-if-not-debug return super().on_request(request) def on_response( # pylint: disable=too-many-statements, too-many-branches, too-many-locals - self, - request: PipelineRequest[HTTPRequestType], - response: PipelineResponse[HTTPRequestType, HTTPResponseType], + self, + request: PipelineRequest[HTTPRequestType], + response: PipelineResponse[HTTPRequestType, HTTPResponseType], ) -> None: if self._enable_diagnostics_logging: @@ -418,30 +433,39 @@ def on_response( # pylint: disable=too-many-statements, too-many-branches, too- sub_status_str = http_response.headers.get("x-ms-substatus") sub_status_code: Optional[int] = int(sub_status_str) if sub_status_str else 0 url_obj = request.http_request.url # type: ignore[attr-defined, union-attr] - duration = (time.time() - context["start_time"]) * 1000 \ - if "start_time" in context else "" # type: ignore[union-attr, arg-type] - - log_data = {"activity_id": headers.get(HttpHeaders.ActivityId, ""), - "duration": duration, - "status_code": http_response.status_code, "sub_status_code": sub_status_code, - "verb": request.http_request.method, - "operation_type": headers.get('x-ms-thinclient-proxy-operation-type', ""), - "url": str(url_obj), "database_name": "", "collection_name": "", - "resource_type": headers.get('x-ms-thinclient-proxy-resource-type', ""), - "exception_type": "", - "is_request": False} # type: ignore[assignment] - log_data["exception_type"] = CosmosHttpResponseError.__name__ if log_data["status_code"] and \ - isinstance(log_data["status_code"], - int) and log_data[ - "status_code"] >= 400 else "" + duration = ( + (time.time() - context["start_time"]) * 1000 if "start_time" in context else "" + ) # type: ignore[union-attr, arg-type] + + log_data = { + "activity_id": headers.get(HttpHeaders.ActivityId, ""), + "duration": duration, + "status_code": http_response.status_code, + "sub_status_code": sub_status_code, + "verb": request.http_request.method, + "operation_type": headers.get("x-ms-thinclient-proxy-operation-type", ""), + "url": str(url_obj), + "database_name": "", + "collection_name": "", + "resource_type": headers.get("x-ms-thinclient-proxy-resource-type", ""), + "exception_type": "", + "is_request": False, + } # type: ignore[assignment] + log_data["exception_type"] = ( + CosmosHttpResponseError.__name__ + if log_data["status_code"] + and isinstance(log_data["status_code"], int) + and log_data["status_code"] >= 400 + else "" + ) if log_data["url"]: - url_parts: list[str] = log_data["url"].split('/') # type: ignore[union-attr] - if 'dbs' in url_parts: - dbs_index = url_parts.index('dbs') + url_parts: list[str] = log_data["url"].split("/") # type: ignore[union-attr] + if "dbs" in url_parts: + dbs_index = url_parts.index("dbs") if dbs_index + 1 < len(url_parts): log_data["database_name"] = url_parts[dbs_index + 1] - if 'colls' in url_parts: - colls_index = url_parts.index('colls') + if "colls" in url_parts: + colls_index = url_parts.index("colls") if colls_index + 1 < len(url_parts): log_data["collection_name"] = url_parts[colls_index + 1] @@ -449,7 +473,8 @@ def on_response( # pylint: disable=too-many-statements, too-many-branches, too- logger = context.setdefault("logger", options.pop("logger", self.logger)) filter_applied = any( bool(current_logger.filters) or any(bool(h.filters) for h in current_logger.handlers) - for current_logger in _iter_loggers(logger)) + for current_logger in _iter_loggers(logger) + ) if filter_applied: context["logger_attributes"] = log_data.copy() self.on_request(request) @@ -462,9 +487,11 @@ def on_response( # pylint: disable=too-many-statements, too-many-branches, too- if multi_record: logger.info("Response status: %r", log_data["status_code"], extra=log_data) logger.info( - "\nResponse Activity ID: {}".format(http_response.headers.get(HttpHeaders.ActivityId, - log_data["activity_id"])), - extra=log_data) + "\nResponse Activity ID: {}".format( + http_response.headers.get(HttpHeaders.ActivityId, log_data["activity_id"]) + ), + extra=log_data, + ) logger.info("Response headers:", extra=log_data) for res_header, value in http_response.headers.items(): value = self._redact_header(res_header, value) @@ -472,13 +499,11 @@ def on_response( # pylint: disable=too-many-statements, too-many-branches, too- logger.info(" %r: %r", res_header, value, extra=log_data) if "start_time" in context and duration: seconds = duration / 1000 # type: ignore[operator] - logger.info(f"Elapsed time in seconds: {seconds:.6f}".rstrip('0').rstrip('.'), - extra=log_data) + logger.info(f"Elapsed time in seconds: {seconds:.6f}".rstrip("0").rstrip("."), extra=log_data) else: logger.info("Elapsed time in seconds: unknown", extra=log_data) if isinstance(log_data["status_code"], int) and log_data["status_code"] >= 400: - logger.info("\nResponse error message: %r", _format_error(http_response.text()), - extra=log_data) + logger.info("\nResponse error message: %r", _format_error(http_response.text()), extra=log_data) return log_string = "\nResponse status: {}".format(log_data["status_code"]) log_string += "\nResponse Activity ID: {}".format(http_response.headers.get(HttpHeaders.ActivityId, "")) @@ -489,23 +514,23 @@ def on_response( # pylint: disable=too-many-statements, too-many-branches, too- log_string += "\n '{}': '{}'".format(res_header, value) if "start_time" in context and duration: seconds = duration / 1000 # type: ignore[operator] - log_string += f"\nElapsed time in seconds: {seconds:.6f}".rstrip('0').rstrip('.') + log_string += f"\nElapsed time in seconds: {seconds:.6f}".rstrip("0").rstrip(".") else: log_string += "\nElapsed time in seconds: unknown" if isinstance(log_data["status_code"], int) and log_data["status_code"] >= 400: log_string += "\nResponse error message: {}".format(_format_error(http_response.text())) logger.info(log_string, extra=log_data) except Exception as err: # pylint: disable=broad-except - logger.warning("Failed to log response: %s", repr(err), - extra=log_data) # pylint: disable=do-not-log-exceptions-if-not-debug + logger.warning( + "Failed to log response: %s", repr(err), extra=log_data + ) # pylint: disable=do-not-log-exceptions-if-not-debug return super().on_response(request, response) - def on_exception( # pylint: disable=too-many-statements - self, - request: PipelineRequest[HTTPRequestType], + def on_exception( # pylint: disable=too-many-statements + self, + request: PipelineRequest[HTTPRequestType], ) -> None: - """Handles exceptions raised during the pipeline request. Logs the exception details if diagnostics logging is enabled. @@ -513,16 +538,23 @@ def on_exception( # pylint: disable=too-many-statements :type request: ~azure.core.pipeline.PipelineRequest """ - exc_info: Tuple[ - Optional[Type[BaseException]], Optional[BaseException], - Optional[types.TracebackType]] = sys.exc_info() - - if self._enable_diagnostics_logging and exc_info[0] in (CosmosHttpResponseError, ServiceRequestError, - ServiceResponseError): - exc_type: Optional[Type[Union[CosmosHttpResponseError, ServiceRequestError, - ServiceResponseError]]] = exc_info[0] # type: ignore[assignment] - exc_value: Optional[Union[CosmosHttpResponseError, - ServiceRequestError, ServiceResponseError]] = exc_info[1] # type: ignore[assignment] + exc_info: Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[types.TracebackType]] = ( + sys.exc_info() + ) + + if self._enable_diagnostics_logging and exc_info[0] in ( + CosmosHttpResponseError, + ServiceRequestError, + ServiceResponseError, + ): + exc_type: Optional[ + Type[Union[CosmosHttpResponseError, ServiceRequestError, ServiceResponseError]] + ] = exc_info[ + 0 + ] # type: ignore[assignment] + exc_value: Optional[Union[CosmosHttpResponseError, ServiceRequestError, ServiceResponseError]] = exc_info[ + 1 + ] # type: ignore[assignment] logger: Logger = self.logger filter_applied: bool = any( bool(current_logger.filters) or any(bool(h.filters) for h in current_logger.handlers) @@ -535,32 +567,36 @@ def on_exception( # pylint: disable=too-many-statements logger = request.context.setdefault("logger", request.context.options.pop("logger", self.logger)) filter_applied = any( bool(current_logger.filters) or any(bool(h.filters) for h in current_logger.handlers) - for current_logger in _iter_loggers(logger)) + for current_logger in _iter_loggers(logger) + ) context = request.context - duration = (time.time() - context["start_time"]) * 1000 \ - if "start_time" in context else "" # type: ignore[union-attr, arg-type] + duration = ( + (time.time() - context["start_time"]) * 1000 if "start_time" in context else "" + ) # type: ignore[union-attr, arg-type] logger_attributes["duration"] = duration logger_attributes["activity_id"] = request.http_request.headers.get(HttpHeaders.ActivityId, "") logger_attributes["verb"] = request.http_request.method logger_attributes["url"] = request.http_request.url logger_attributes["operation_type"] = request.http_request.headers.get( - 'x-ms-thinclient-proxy-operation-type') + "x-ms-thinclient-proxy-operation-type" + ) logger_attributes["resource_type"] = request.http_request.headers.get( - 'x-ms-thinclient-proxy-resource-type') + "x-ms-thinclient-proxy-resource-type" + ) if logger_attributes["url"]: - url_parts = logger_attributes["url"].split('/') - if 'dbs' in url_parts: - dbs_index = url_parts.index('dbs') + url_parts = logger_attributes["url"].split("/") + if "dbs" in url_parts: + dbs_index = url_parts.index("dbs") if dbs_index + 1 < len(url_parts): logger_attributes["database_name"] = url_parts[dbs_index + 1] - if 'colls' in url_parts: - colls_index = url_parts.index('colls') + if "colls" in url_parts: + colls_index = url_parts.index("colls") if colls_index + 1 < len(url_parts): logger_attributes["collection_name"] = url_parts[colls_index + 1] if exc_value: - if hasattr(exc_value, 'status_code'): + if hasattr(exc_value, "status_code"): logger_attributes["status_code"] = exc_value.status_code - if hasattr(exc_value, 'sub_status'): + if hasattr(exc_value, "sub_status"): logger_attributes["sub_status_code"] = exc_value.sub_status logger_attributes["exception_type"] = exc_type.__name__ if exc_type else "UnknownException" if filter_applied: @@ -572,11 +608,11 @@ def on_exception( # pylint: disable=too-many-statements if "start_time" in context and duration: seconds = duration / 1000 # type: ignore[operator] - log_string += f"\nElapsed time in seconds from initial request: {seconds:.6f}".rstrip('0').rstrip('.') + log_string += f"\nElapsed time in seconds from initial request: {seconds:.6f}".rstrip("0").rstrip(".") else: log_string += "\nElapsed time in seconds from initial request: unknown" log_string += "\nResponse status: {}".format(logger_attributes.get("status_code", "")) - message = exc_value.message if hasattr(exc_value, 'message') else str(exc_value) # type: ignore[union-attr] + message = exc_value.message if hasattr(exc_value, "message") else str(exc_value) # type: ignore[union-attr] log_string += "\nResponse error message: {}".format(_format_error(message)) logger.info(log_string, extra=logger_attributes) else: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_integers.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_integers.py index 66dc02d03b80..789a0a89cbe9 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_integers.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_integers.py @@ -34,73 +34,73 @@ def value(self) -> int: def value(self, new_value: int) -> None: self._value = new_value & 0xFFFFFFFF - def __add__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __add__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value + (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __sub__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __sub__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value - (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __mul__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __mul__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value * (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __xor__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __xor__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value ^ (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __lshift__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __lshift__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value << (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __ilshift__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __ilshift__(self, other: Union[int, "_UInt32"]) -> "_UInt32": self._value = (self.value << (other.value if isinstance(other, _UInt32) else other)) & 0xFFFFFFFF return self - def __rshift__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __rshift__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value >> (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __irshift__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __irshift__(self, other: Union[int, "_UInt32"]) -> "_UInt32": self._value = (self.value >> (other.value if isinstance(other, _UInt32) else other)) & 0xFFFFFFFF return self - def __and__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __and__(self, other: Union[int, "_UInt32"]) -> "_UInt32": result = self.value & (other.value if isinstance(other, _UInt32) else other) return _UInt32(result & 0xFFFFFFFF) - def __or__(self, other: Union[int, '_UInt32']) -> '_UInt32': + def __or__(self, other: Union[int, "_UInt32"]) -> "_UInt32": if isinstance(other, _UInt32): return _UInt32(self.value | other.value) if isinstance(other, int): return _UInt32(self.value | other) raise TypeError("Unsupported type for OR operation") - def __invert__(self) -> '_UInt32': + def __invert__(self) -> "_UInt32": return _UInt32(~self.value & 0xFFFFFFFF) - def __eq__(self, other: Union[int, '_UInt32', object]) -> bool: + def __eq__(self, other: Union[int, "_UInt32", object]) -> bool: return self.value == (other.value if isinstance(other, _UInt32) else other) - def __ne__(self, other: Union[int, '_UInt32', object]) -> bool: + def __ne__(self, other: Union[int, "_UInt32", object]) -> bool: return not self.__eq__(other) - def __lt__(self, other: Union[int, '_UInt32']) -> bool: + def __lt__(self, other: Union[int, "_UInt32"]) -> bool: return self.value < (other.value if isinstance(other, _UInt32) else other) - def __gt__(self, other: Union[int, '_UInt32']) -> bool: + def __gt__(self, other: Union[int, "_UInt32"]) -> bool: return self.value > (other.value if isinstance(other, _UInt32) else other) - def __le__(self, other: Union[int, '_UInt32']) -> bool: + def __le__(self, other: Union[int, "_UInt32"]) -> bool: return self.value <= (other.value if isinstance(other, _UInt32) else other) - def __ge__(self, other: Union[int, '_UInt32']) -> bool: + def __ge__(self, other: Union[int, "_UInt32"]) -> bool: return self.value >= (other.value if isinstance(other, _UInt32) else other) @staticmethod def encode_double_as_uint32(value: float) -> int: - value_in_uint32 = struct.unpack(' int: def decode_double_from_uint32(value: int) -> int: mask = 0x80000000 value = ~(value - 1) if value < mask else value ^ mask - return struct.unpack(' int: return self.value + class _UInt64: def __init__(self, value: int) -> None: self._value: int = value & 0xFFFFFFFFFFFFFFFF @@ -125,73 +126,73 @@ def value(self) -> int: def value(self, new_value: int) -> None: self._value = new_value & 0xFFFFFFFFFFFFFFFF - def __add__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __add__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value + (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __sub__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __sub__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value - (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __mul__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __mul__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value * (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __xor__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __xor__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value ^ (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __lshift__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __lshift__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value << (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __rshift__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __rshift__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value >> (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __and__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __and__(self, other: Union[int, "_UInt64"]) -> "_UInt64": result = self.value & (other.value if isinstance(other, _UInt64) else other) return _UInt64(result & 0xFFFFFFFFFFFFFFFF) - def __or__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __or__(self, other: Union[int, "_UInt64"]) -> "_UInt64": if isinstance(other, _UInt64): return _UInt64(self.value | other.value) if isinstance(other, int): return _UInt64(self.value | other) raise TypeError("Unsupported type for OR operation") - def __invert__(self) -> '_UInt64': + def __invert__(self) -> "_UInt64": return _UInt64(~self.value & 0xFFFFFFFFFFFFFFFF) - def __eq__(self, other: Union[int, '_UInt64', object]) -> bool: + def __eq__(self, other: Union[int, "_UInt64", object]) -> bool: return self.value == (other.value if isinstance(other, _UInt64) else other) - def __ne__(self, other: Union[int, '_UInt64', object]) -> bool: + def __ne__(self, other: Union[int, "_UInt64", object]) -> bool: return not self.__eq__(other) - def __irshift__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __irshift__(self, other: Union[int, "_UInt64"]) -> "_UInt64": self._value = (self.value >> (other.value if isinstance(other, _UInt64) else other)) & 0xFFFFFFFFFFFFFFFF return self - def __ilshift__(self, other: Union[int, '_UInt64']) -> '_UInt64': + def __ilshift__(self, other: Union[int, "_UInt64"]) -> "_UInt64": self._value = (self.value << (other.value if isinstance(other, _UInt64) else other)) & 0xFFFFFFFFFFFFFFFF return self - def __lt__(self, other: Union[int, '_UInt64']) -> bool: + def __lt__(self, other: Union[int, "_UInt64"]) -> bool: return self.value < (other.value if isinstance(other, _UInt64) else other) - def __gt__(self, other: Union[int, '_UInt64']) -> bool: + def __gt__(self, other: Union[int, "_UInt64"]) -> bool: return self.value > (other.value if isinstance(other, _UInt64) else other) - def __le__(self, other: Union[int, '_UInt64']) -> bool: + def __le__(self, other: Union[int, "_UInt64"]) -> bool: return self.value <= (other.value if isinstance(other, _UInt64) else other) - def __ge__(self, other: Union[int, '_UInt64']) -> bool: + def __ge__(self, other: Union[int, "_UInt64"]) -> bool: return self.value >= (other.value if isinstance(other, _UInt64) else other) @staticmethod def encode_double_as_uint64(value: float) -> int: - value_in_uint64 = struct.unpack(' int: def decode_double_from_uint64(value: int) -> int: mask = 0x8000000000000000 value = ~(value - 1) if value < mask else value ^ mask - return struct.unpack(' int: return self.value @@ -216,12 +217,12 @@ def __init__(self, low: Union[int, _UInt64], high: Union[int, _UInt64]) -> None: else: self.high = _UInt64(high) - def __add__(self, other: '_UInt128') -> '_UInt128': + def __add__(self, other: "_UInt128") -> "_UInt128": low = self.low + other.low high = self.high + other.high + _UInt64(int(low.value > 0xFFFFFFFFFFFFFFFF)) return _UInt128(low & 0xFFFFFFFFFFFFFFFF, high & 0xFFFFFFFFFFFFFFFF) - def __sub__(self, other: '_UInt128') -> '_UInt128': + def __sub__(self, other: "_UInt128") -> "_UInt128": borrow = _UInt64(0) if self.low.value < other.low.value: borrow = _UInt64(1) @@ -230,30 +231,30 @@ def __sub__(self, other: '_UInt128') -> '_UInt128': high = (self.high - other.high - borrow) & 0xFFFFFFFFFFFFFFFF return _UInt128(low, high) - def __mul__(self, other: '_UInt128') -> NoReturn: + def __mul__(self, other: "_UInt128") -> NoReturn: # Multiplication logic here for 128 bits raise NotImplementedError() - def __xor__(self, other: '_UInt128') -> '_UInt128': + def __xor__(self, other: "_UInt128") -> "_UInt128": low = self.low ^ other.low high = self.high ^ other.high return _UInt128(low, high) - def __and__(self, other: '_UInt128') -> '_UInt128': + def __and__(self, other: "_UInt128") -> "_UInt128": low = self.low & other.low high = self.high & other.high return _UInt128(low, high) - def __or__(self, other: '_UInt128') -> '_UInt128': + def __or__(self, other: "_UInt128") -> "_UInt128": low = self.low | other.low high = self.high | other.high return _UInt128(low, high) - def __lshift__(self, shift: '_UInt128') -> NoReturn: + def __lshift__(self, shift: "_UInt128") -> NoReturn: # Left shift logic for 128 bits raise NotImplementedError() - def __rshift__(self, shift: '_UInt128') -> NoReturn: + def __rshift__(self, shift: "_UInt128") -> NoReturn: # Right shift logic for 128 bits raise NotImplementedError() @@ -276,7 +277,7 @@ def __str__(self) -> str: return str(self.as_int()) def to_byte_array(self) -> bytearray: - high_bytes = self.high.value.to_bytes(8, byteorder='little') - low_bytes = self.low.value.to_bytes(8, byteorder='little') + high_bytes = self.high.value.to_bytes(8, byteorder="little") + low_bytes = self.low.value.to_bytes(8, byteorder="little") byte_array = bytearray(low_bytes + high_bytes) return byte_array diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_murmurhash3.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_murmurhash3.py index 564885b063ce..9b31d952d249 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_murmurhash3.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_murmurhash3.py @@ -39,10 +39,10 @@ def rotate_left_64(val: int, shift: int) -> int: def mix(value: _UInt64) -> _UInt64: value ^= value >> 33 - value *= 0xff51afd7ed558ccd + value *= 0xFF51AFD7ED558CCD value = value & 0xFFFFFFFFFFFFFFFF value ^= value >> 33 - value *= 0xc4ceb9fe1a85ec53 + value *= 0xC4CEB9FE1A85EC53 value = value & 0xFFFFFFFFFFFFFFFF value ^= value >> 33 return value @@ -63,15 +63,15 @@ def murmurhash3_128(span: bytearray, seed: _UInt128) -> _UInt128: # pylint: dis :rtype: UInt128 """ - c1 = _UInt64(0x87c37b91114253d5) - c2 = _UInt64(0x4cf5ad432745937f) + c1 = _UInt64(0x87C37B91114253D5) + c2 = _UInt64(0x4CF5AD432745937F) h1 = seed.get_low() h2 = seed.get_high() position = 0 while position < len(span) - 15: - k1 = _UInt64(int.from_bytes(span[position: position + 8], 'little')) - k2 = _UInt64(int.from_bytes(span[position + 8: position + 16], 'little')) + k1 = _UInt64(int.from_bytes(span[position : position + 8], "little")) + k2 = _UInt64(int.from_bytes(span[position + 8 : position + 16], "little")) k1 *= c1 k1.value = rotate_left_64(k1.value, 31) @@ -79,7 +79,7 @@ def murmurhash3_128(span: bytearray, seed: _UInt128) -> _UInt128: # pylint: dis h1 ^= k1 h1.value = rotate_left_64(h1.value, 27) h1 += h2 - h1 = h1 * 5 + _UInt64(0x52dce729) + h1 = h1 * 5 + _UInt64(0x52DCE729) k2 *= c2 k2.value = rotate_left_64(k2.value, 33) @@ -87,7 +87,7 @@ def murmurhash3_128(span: bytearray, seed: _UInt128) -> _UInt128: # pylint: dis h2 ^= k2 h2.value = rotate_left_64(h2.value, 31) h2 += h1 - h2 = h2 * 5 + _UInt64(0x38495ab5) + h2 = h2 * 5 + _UInt64(0x38495AB5) position += 16 @@ -150,16 +150,16 @@ def murmurhash3_128(span: bytearray, seed: _UInt128) -> _UInt128: # pylint: dis def murmurhash3_32(data: bytearray, seed: int) -> _UInt32: - c1: _UInt32 = _UInt32(0xcc9e2d51) - c2: _UInt32 = _UInt32(0x1b873593) + c1: _UInt32 = _UInt32(0xCC9E2D51) + c2: _UInt32 = _UInt32(0x1B873593) length: _UInt32 = _UInt32(len(data)) h1: _UInt32 = _UInt32(seed) - rounded_end: _UInt32 = _UInt32(length.value & 0xfffffffc) # round down to 4 byte block + rounded_end: _UInt32 = _UInt32(length.value & 0xFFFFFFFC) # round down to 4 byte block for i in range(0, rounded_end.value, 4): # little endian load order k1: _UInt32 = _UInt32( - (data[i] & 0xff) | ((data[i + 1] & 0xff) << 8) | ((data[i + 2] & 0xff) << 16) | (data[i + 3] << 24) + (data[i] & 0xFF) | ((data[i + 1] & 0xFF) << 8) | ((data[i + 2] & 0xFF) << 16) | (data[i + 3] << 24) ) k1 *= c1 k1.value = (k1.value << 15) | (k1.value >> 17) # ROTL32(k1,15) @@ -167,16 +167,16 @@ def murmurhash3_32(data: bytearray, seed: int) -> _UInt32: h1 ^= k1 h1.value = (h1.value << 13) | (h1.value >> 19) # ROTL32(h1,13) - h1 = h1 * _UInt32(5) + _UInt32(0xe6546b64) + h1 = h1 * _UInt32(5) + _UInt32(0xE6546B64) # tail k1 = _UInt32(0) if length.value & 0x03 == 3: - k1 ^= _UInt32((data[rounded_end.value + 2] & 0xff) << 16) + k1 ^= _UInt32((data[rounded_end.value + 2] & 0xFF) << 16) if length.value & 0x03 >= 2: - k1 ^= _UInt32((data[rounded_end.value + 1] & 0xff) << 8) + k1 ^= _UInt32((data[rounded_end.value + 1] & 0xFF) << 8) if length.value & 0x03 >= 1: - k1 ^= _UInt32(data[rounded_end.value] & 0xff) + k1 ^= _UInt32(data[rounded_end.value] & 0xFF) k1 *= c1 k1.value = (k1.value << 15) | (k1.value >> 17) k1 *= c2 @@ -185,9 +185,9 @@ def murmurhash3_32(data: bytearray, seed: int) -> _UInt32: # finalization h1 ^= length h1.value ^= h1.value >> 16 - h1 *= _UInt32(0x85ebca6b) + h1 *= _UInt32(0x85EBCA6B) h1.value ^= h1.value >> 13 - h1 *= _UInt32(0xc2b2ae35) + h1 *= _UInt32(0xC2B2AE35) h1.value ^= h1.value >> 16 return h1 diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_responses.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_responses.py index df62d6d14e4f..752828b988c8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_responses.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_responses.py @@ -16,7 +16,7 @@ class CosmosItemPaged(ItemPaged[dict[str, Any]]): """ def __init__(self, *args: Any, **kwargs: Any) -> None: - self._response_headers_list: Optional[List[CaseInsensitiveDict]] = kwargs.pop('response_headers_list', None) + self._response_headers_list: Optional[List[CaseInsensitiveDict]] = kwargs.pop("response_headers_list", None) super().__init__(*args, **kwargs) self._query_iterable: Optional[Any] = None @@ -63,7 +63,7 @@ class CosmosAsyncItemPaged(AsyncItemPaged[dict[str, Any]]): """ def __init__(self, *args: Any, **kwargs: Any) -> None: - self._response_headers_list: Optional[List[CaseInsensitiveDict]] = kwargs.pop('response_headers_list', None) + self._response_headers_list: Optional[List[CaseInsensitiveDict]] = kwargs.pop("response_headers_list", None) super().__init__(*args, **kwargs) self._query_iterable: Optional[Any] = None @@ -119,8 +119,9 @@ def get_response_headers(self) -> CaseInsensitiveDict: class CosmosList(list[dict[str, Any]]): - def __init__(self, original_list: Optional[Iterable[dict[str, Any]]], /, *, - response_headers: CaseInsensitiveDict) -> None: + def __init__( + self, original_list: Optional[Iterable[dict[str, Any]]], /, *, response_headers: CaseInsensitiveDict + ) -> None: if original_list is None: original_list = [] super().__init__(original_list) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py index 64696887e479..f09febc192ca 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_default_retry_policy.py @@ -4,6 +4,7 @@ """Internal class for connection reset retry policy implementation in the Azure Cosmos database service. """ + from . import http_constants from .documents import _OperationType diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py index 3357c097c63a..a940dff26e63 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_endpoint_discovery_retry_policy.py @@ -27,10 +27,11 @@ from azure.cosmos.documents import _OperationType + class EndpointDiscoveryRetryPolicy(object): """The endpoint discovery retry policy class used for geo-replicated database accounts - to handle the write forbidden exceptions due to writable/readable location changes - (say, after a failover). + to handle the write forbidden exceptions due to writable/readable location changes + (say, after a failover). """ Max_retry_attempt_count = 120 @@ -45,7 +46,6 @@ def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, self.connection_policy = connection_policy self.request = args[0] if args else None - def ShouldRetry(self, exception): # pylint: disable=unused-argument """Returns true if the request should retry based on the passed-in exception. @@ -73,9 +73,13 @@ def ShouldRetry(self, exception): # pylint: disable=unused-argument if self.global_endpoint_manager.is_per_partition_automatic_failover_applicable(self.request): partition_level_info = self.global_endpoint_manager.partition_range_to_failover_info[self.pk_range_wrapper] location = self.global_endpoint_manager.location_cache.get_location_from_endpoint( - str(self.request.location_endpoint_to_route)) - regional_endpoint = (self.global_endpoint_manager.location_cache. - account_read_regional_routing_contexts_by_location.get(location)) + str(self.request.location_endpoint_to_route) + ) + regional_endpoint = ( + self.global_endpoint_manager.location_cache.account_read_regional_routing_contexts_by_location.get( + location + ) + ) partition_level_info.unavailable_regional_endpoints[location] = regional_endpoint self.global_endpoint_manager.resolve_service_endpoint_for_partition(self.request, self.pk_range_wrapper) return True @@ -85,12 +89,12 @@ def ShouldRetry(self, exception): # pylint: disable=unused-argument if _OperationType.IsReadOnlyOperation(self.request.operation_type): # Mark current read endpoint as unavailable self.global_endpoint_manager.mark_endpoint_unavailable_for_read( - self.request.location_endpoint_to_route, - True, context) + self.request.location_endpoint_to_route, True, context + ) else: self.global_endpoint_manager.mark_endpoint_unavailable_for_write( - self.request.location_endpoint_to_route, - True, context) + self.request.location_endpoint_to_route, True, context + ) # clear previous location-based routing directive self.request.clear_route_to_location() diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py index 7ff6c2cd6161..c2656462b144 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aggregators.py @@ -4,6 +4,7 @@ """Internal class for aggregation queries implementation in the Azure Cosmos database service. """ + from abc import abstractmethod, ABCMeta from azure.cosmos._execution_context.document_producer import _OrderByHelper diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/_queue_async_helper.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/_queue_async_helper.py index 0633baef28b3..5d1e5b8b03e8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/_queue_async_helper.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/_queue_async_helper.py @@ -19,6 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. + async def heap_push(heap, item, document_producer_comparator): """Push item onto heap, maintaining the heap invariant. :param list heap: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py index e610da46d84f..a9a37be673e9 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/base_execution_context.py @@ -122,7 +122,7 @@ async def _fetch_items_helper_no_retries(self, fetch_function): new_options["continuation"] = self._continuation response_headers = {} - (fetched_items, response_headers) = await fetch_function(new_options) + fetched_items, response_headers = await fetch_function(new_options) if not self._has_started: self._has_started = True @@ -170,16 +170,18 @@ async def callback(**kwargs): # pylint: disable=unused-argument _LOGGER.error( "Partition split retry (async): Exhausted all %d retries. " "state: _has_started=%s, _continuation=%s", - max_retries, self._has_started, self._continuation + max_retries, + self._has_started, + self._continuation, ) raise # Exhausted retries, propagate error _LOGGER.warning( "Partition split retry (async): 410 error (sub_status=%s). Attempt %d of %d. " "Refreshing routing map and resetting state.", - getattr(e, 'sub_status', 'N/A'), + getattr(e, "sub_status", "N/A"), attempt, - max_retries + max_retries, ) # Refresh routing map to get new partition key ranges diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/document_producer.py index 7584ef142cbd..33973ad7e98b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/document_producer.py @@ -31,6 +31,7 @@ # pylint: disable=protected-access + class _DocumentProducer(object): """This class takes care of handling of the results for one single partition key range. @@ -40,8 +41,17 @@ class _DocumentProducer(object): result of each. """ - def __init__(self, partition_key_target_range, client, collection_link, query, document_producer_comp, options, - response_hook, raw_response_hook): + def __init__( + self, + partition_key_target_range, + client, + collection_link, + query, + document_producer_comp, + options, + response_hook, + raw_response_hook, + ): """ Constructor """ @@ -61,8 +71,15 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) async def fetch_fn(options): - return await self._client.QueryFeed(path, collection_id, query, options, partition_key_target_range["id"], - response_hook=response_hook, raw_response_hook=raw_response_hook) + return await self._client.QueryFeed( + path, + collection_id, + query, + options, + partition_key_target_range["id"], + response_hook=response_hook, + raw_response_hook=raw_response_hook, + ) self._ex_context = _DefaultQueryExecutionContext(client, self._options, fetch_fn) @@ -85,9 +102,9 @@ async def __anext__(self): def get_target_range(self): """Returns the target partition key range. - :return: - Target partition key range. - :rtype: dict + :return: + Target partition key range. + :rtype: dict """ return self._partition_key_target_range @@ -213,8 +230,7 @@ def _peek_order_by_items(peek_result): class _OrderByDocumentProducerComparator(_PartitionKeyRangeDocumentProducerComparator): - """Provide a Comparator for document producers which respects orderby sort order. - """ + """Provide a Comparator for document producers which respects orderby sort order.""" def __init__(self, sort_order): # pylint: disable=super-init-not-called """Instantiates this class @@ -276,6 +292,7 @@ def _validate_orderby_items(self, res1, res2): if type1 != type2: raise ValueError("Expected {}, but got {}.".format(type1, type2)) + class _NonStreamingItemResultProducer: """This class takes care of handling of the items to be sorted in a non-streaming context. One instance of this document producer goes attached to every item coming in for the priority queue to be able @@ -292,10 +309,8 @@ def __init__(self, item_result, sort_order): self._doc_producer_comp = _NonStreamingOrderByComparator(sort_order) - class _NonStreamingOrderByComparator(object): - """Provide a Comparator for item results which respects orderby sort order. - """ + """Provide a Comparator for item results which respects orderby sort order.""" def __init__(self, sort_order): """Instantiates this class diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/endpoint_component.py index e8c432f8881f..7f92f777f47f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/endpoint_component.py @@ -22,6 +22,7 @@ """Internal class for query execution endpoint component implementation in the Azure Cosmos database service. """ + import numbers import copy import hashlib @@ -53,18 +54,22 @@ class _QueryExecutionOrderByEndpointComponent(_QueryExecutionEndpointComponent): For each processed orderby result it returns 'payload' item of the result. """ + async def __anext__(self): payload = await self._execution_context.__anext__() return payload["payload"] + class _QueryExecutionNonStreamingEndpointComponent(_QueryExecutionEndpointComponent): """Represents an endpoint in handling a non-streaming order by query results. For each processed orderby result it returns the item result. """ + async def __anext__(self): payload = await self._execution_context.__anext__() return payload._item_result["payload"] + class _QueryExecutionTopEndpointComponent(_QueryExecutionEndpointComponent): """Represents an endpoint in handling top query. @@ -88,6 +93,7 @@ class _QueryExecutionDistinctOrderedEndpointComponent(_QueryExecutionEndpointCom It returns only those values not already returned. """ + def __init__(self, execution_context): super(_QueryExecutionDistinctOrderedEndpointComponent, self).__init__(execution_context) self.last_result = None @@ -105,6 +111,7 @@ class _QueryExecutionDistinctUnorderedEndpointComponent(_QueryExecutionEndpointC It returns only those values not already returned. """ + def __init__(self, execution_context): super(_QueryExecutionDistinctUnorderedEndpointComponent, self).__init__(execution_context) self.last_result = set() @@ -127,14 +134,14 @@ async def __anext__(self): json_repr = json.dumps(self.make_hash(res)).encode("utf-8") - hash_object = hashlib.sha1(json_repr) # nosec + hash_object = hashlib.sha1(json_repr) # nosec hashed_result = hash_object.hexdigest() while hashed_result in self.last_result: res = await self._execution_context.__anext__() json_repr = json.dumps(self.make_hash(res)).encode("utf-8") - hash_object = hashlib.sha1(json_repr) # nosec + hash_object = hashlib.sha1(json_repr) # nosec hashed_result = hash_object.hexdigest() self.last_result.add(hashed_result) return res @@ -145,6 +152,7 @@ class _QueryExecutionOffsetEndpointComponent(_QueryExecutionEndpointComponent): It returns results offset by as many results as offset arg specified. """ + def __init__(self, execution_context, offset_count): super(_QueryExecutionOffsetEndpointComponent, self).__init__(execution_context) self._offset_count = offset_count @@ -184,7 +192,7 @@ def __init__(self, execution_context, aggregate_operators): async def __anext__(self): async for res in self._execution_context: - for item in res: #TODO check on this being an async loop + for item in res: # TODO check on this being an async loop for operator in self._local_aggregators: if isinstance(item, dict) and item: try: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/execution_dispatcher.py index afa5a564715d..d21ac7f347a4 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/execution_dispatcher.py @@ -28,8 +28,11 @@ from azure.cosmos._execution_context.aio import non_streaming_order_by_aggregator, hybrid_search_aggregator from azure.cosmos._execution_context.aio.base_execution_context import _QueryExecutionContextBase from azure.cosmos._execution_context.aio.base_execution_context import _DefaultQueryExecutionContext -from azure.cosmos._execution_context.execution_dispatcher import _is_partitioned_execution_info,\ - _is_hybrid_search_query, _verify_valid_hybrid_search_query +from azure.cosmos._execution_context.execution_dispatcher import ( + _is_partitioned_execution_info, + _is_hybrid_search_query, + _verify_valid_hybrid_search_query, +) from azure.cosmos._execution_context.query_execution_info import _PartitionedQueryExecutionInfo from azure.cosmos.documents import _DistinctType from azure.cosmos.exceptions import CosmosHttpResponseError @@ -38,6 +41,7 @@ # pylint: disable=protected-access + class _ProxyQueryExecutionContext(_QueryExecutionContextBase): # pylint: disable=abstract-method """Represents a proxy execution context wrapper. @@ -47,8 +51,9 @@ class _ProxyQueryExecutionContext(_QueryExecutionContextBase): # pylint: disabl to _MultiExecutionContextAggregator """ - def __init__(self, client, resource_link, query, options, fetch_function, - response_hook, raw_response_hook, resource_type): + def __init__( + self, client, resource_link, query, options, fetch_function, response_hook, raw_response_hook, resource_type + ): """ Constructor """ @@ -69,15 +74,15 @@ async def _create_execution_context_with_query_plan(self): query_plan = await self._client._GetQueryPlanThroughGateway( query_to_use, self._resource_link, - self._options.get('excludedLocations'), - read_timeout=self._options.get('read_timeout') + self._options.get("excludedLocations"), + read_timeout=self._options.get("read_timeout"), ) query_execution_info = _PartitionedQueryExecutionInfo(query_plan) qe_info = getattr(query_execution_info, "_query_execution_info", None) if isinstance(qe_info, dict) and isinstance(query_to_use, dict): params = query_to_use.get("parameters") if params is not None: - query_execution_info._query_execution_info['parameters'] = params + query_execution_info._query_execution_info["parameters"] = params self._execution_context = await self._create_pipelined_execution_context(query_execution_info) @@ -122,51 +127,69 @@ async def _create_pipelined_execution_context(self, query_execution_info): assert self._resource_link, "code bug, resource_link is required." if query_execution_info.has_aggregates() and not query_execution_info.has_select_value(): - if self._options and ("enableCrossPartitionQuery" in self._options - and self._options["enableCrossPartitionQuery"]): - raise CosmosHttpResponseError(StatusCodes.BAD_REQUEST, - "Cross partition query only supports 'VALUE ' for aggregates") + if self._options and ( + "enableCrossPartitionQuery" in self._options and self._options["enableCrossPartitionQuery"] + ): + raise CosmosHttpResponseError( + StatusCodes.BAD_REQUEST, + "Cross partition query only supports 'VALUE ' for aggregates", + ) # throw exception here for vector search query without limit filter or limit > max_limit if query_execution_info.get_non_streaming_order_by(): - total_item_buffer = (query_execution_info.get_top() or 0) or \ - ((query_execution_info.get_limit() or 0) + (query_execution_info.get_offset() or 0)) + total_item_buffer = (query_execution_info.get_top() or 0) or ( + (query_execution_info.get_limit() or 0) + (query_execution_info.get_offset() or 0) + ) if total_item_buffer == 0: - raise ValueError("Executing a vector search query without TOP or LIMIT can consume many" + - " RUs very fast and have long runtimes. Please ensure you are using one" + - " of the two filters with your vector search query.") - if total_item_buffer > int(os.environ.get(Constants.MAX_ITEM_BUFFER_VS_CONFIG, - Constants.MAX_ITEM_BUFFER_VS_CONFIG_DEFAULT)): - raise ValueError("Executing a vector search query with more items than the max is not allowed. " + - "Please ensure you are using a limit smaller than the max, or change the max.") - execution_context_aggregator =\ - non_streaming_order_by_aggregator._NonStreamingOrderByContextAggregator(self._client, - self._resource_link, - self._query, - self._options, - query_execution_info, - self._response_hook, - self._raw_response_hook) + raise ValueError( + "Executing a vector search query without TOP or LIMIT can consume many" + + " RUs very fast and have long runtimes. Please ensure you are using one" + + " of the two filters with your vector search query." + ) + if total_item_buffer > int( + os.environ.get(Constants.MAX_ITEM_BUFFER_VS_CONFIG, Constants.MAX_ITEM_BUFFER_VS_CONFIG_DEFAULT) + ): + raise ValueError( + "Executing a vector search query with more items than the max is not allowed. " + + "Please ensure you are using a limit smaller than the max, or change the max." + ) + execution_context_aggregator = non_streaming_order_by_aggregator._NonStreamingOrderByContextAggregator( + self._client, + self._resource_link, + self._query, + self._options, + query_execution_info, + self._response_hook, + self._raw_response_hook, + ) await execution_context_aggregator._configure_partition_ranges() elif query_execution_info.has_hybrid_search_query_info(): - hybrid_search_query_info = query_execution_info._query_execution_info['hybridSearchQueryInfo'] + hybrid_search_query_info = query_execution_info._query_execution_info["hybridSearchQueryInfo"] _verify_valid_hybrid_search_query(hybrid_search_query_info) - execution_context_aggregator = \ - hybrid_search_aggregator._HybridSearchContextAggregator(self._client, - self._resource_link, - self._options, - query_execution_info, - hybrid_search_query_info, - self._response_hook, - self._raw_response_hook) + execution_context_aggregator = hybrid_search_aggregator._HybridSearchContextAggregator( + self._client, + self._resource_link, + self._options, + query_execution_info, + hybrid_search_query_info, + self._response_hook, + self._raw_response_hook, + ) await execution_context_aggregator._run_hybrid_search() else: execution_context_aggregator = multi_execution_aggregator._MultiExecutionContextAggregator( - self._client, self._resource_link, self._query, self._options, query_execution_info, - self._response_hook, self._raw_response_hook) + self._client, + self._resource_link, + self._query, + self._options, + query_execution_info, + self._response_hook, + self._raw_response_hook, + ) await execution_context_aggregator._configure_partition_ranges() - return _PipelineExecutionContext(self._client, self._options, execution_context_aggregator, - query_execution_info) + return _PipelineExecutionContext( + self._client, self._options, execution_context_aggregator, query_execution_info + ) class _PipelineExecutionContext(_QueryExecutionContextBase): # pylint: disable=abstract-method diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/hybrid_search_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/hybrid_search_aggregator.py index 0080fc3c02b8..303f2d3aed68 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/hybrid_search_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/hybrid_search_aggregator.py @@ -1,12 +1,18 @@ # The MIT License (MIT) # Copyright (c) 2024 Microsoft Corporation -"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service. -""" +"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service.""" + from azure.cosmos._execution_context.aio.base_execution_context import _QueryExecutionContextBase from azure.cosmos._execution_context.aio import document_producer -from azure.cosmos._execution_context.hybrid_search_aggregator import _retrieve_component_scores, _rewrite_query_infos, \ - _compute_rrf_scores, _compute_ranks, _coalesce_duplicate_rids, _attach_parameters +from azure.cosmos._execution_context.hybrid_search_aggregator import ( + _retrieve_component_scores, + _rewrite_query_infos, + _compute_rrf_scores, + _compute_ranks, + _coalesce_duplicate_rids, + _attach_parameters, +) from azure.cosmos._routing import routing_range from azure.cosmos import exceptions @@ -43,8 +49,16 @@ class _HybridSearchContextAggregator(_QueryExecutionContextBase): # pylint: dis by the user. """ - def __init__(self, client, resource_link, options, partitioned_query_execution_info, - hybrid_search_query_info, response_hook, raw_response_hook): + def __init__( + self, + client, + resource_link, + options, + partitioned_query_execution_info, + hybrid_search_query_info, + response_hook, + raw_response_hook, + ): super(_HybridSearchContextAggregator, self).__init__(client, options) # use the routing provider in the client @@ -70,10 +84,10 @@ def __init__(self, client, resource_link, options, partitioned_query_execution_i async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-statements # Check if we need to run global statistics queries, and if so do for every partition in the container - if self._hybrid_search_query_info['requiresGlobalStatistics']: + if self._hybrid_search_query_info["requiresGlobalStatistics"]: target_partition_key_ranges = await self._get_target_partition_key_range(target_all_ranges=True) global_statistics_doc_producers = [] - global_statistics_query = self._attach_parameters(self._hybrid_search_query_info['globalStatisticsQuery']) + global_statistics_query = self._attach_parameters(self._hybrid_search_query_info["globalStatisticsQuery"]) partitioned_query_execution_context_list = [] for partition_key_target_range in target_partition_key_ranges: @@ -87,7 +101,7 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) ) @@ -99,8 +113,9 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma except exceptions.CosmosHttpResponseError as e: if exceptions._partition_range_is_gone(e): # repairing document producer context on partition split - global_statistics_doc_producers = await self._repair_document_producer(global_statistics_query, - target_all_ranges=True) + global_statistics_doc_producers = await self._repair_document_producer( + global_statistics_query, target_all_ranges=True + ) else: raise except StopAsyncIteration: @@ -110,10 +125,11 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma self._aggregate_global_statistics(global_statistics_doc_producers) # re-write the component queries if needed - component_query_infos = self._hybrid_search_query_info['componentQueryInfos'] + component_query_infos = self._hybrid_search_query_info["componentQueryInfos"] if self._aggregated_global_statistics: - rewritten_query_infos = _rewrite_query_infos(self._hybrid_search_query_info, - self._aggregated_global_statistics, self._parameters) + rewritten_query_infos = _rewrite_query_infos( + self._hybrid_search_query_info, self._aggregated_global_statistics, self._parameters + ) else: rewritten_query_infos = component_query_infos @@ -123,18 +139,19 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma for rewritten_query in rewritten_query_infos: for pk_range in target_partition_key_ranges: if self._parameters: - rewritten_query['rewrittenQuery'] = _attach_parameters(rewritten_query['rewrittenQuery'], - self._parameters) + rewritten_query["rewrittenQuery"] = _attach_parameters( + rewritten_query["rewrittenQuery"], self._parameters + ) component_query_execution_list.append( document_producer._DocumentProducer( pk_range, self._client, self._resource_link, - rewritten_query['rewrittenQuery'], + rewritten_query["rewrittenQuery"], self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) ) # verify all document producers have items/ no splits @@ -148,8 +165,9 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma component_query_results = [] # repairing document producer context on partition split for rewritten_query in rewritten_query_infos: - component_query_results.extend(await self._repair_document_producer( - rewritten_query['rewrittenQuery'])) + component_query_results.extend( + await self._repair_document_producer(rewritten_query["rewrittenQuery"]) + ) else: raise except StopAsyncIteration: @@ -163,14 +181,14 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma return # Get the Components weights if any - if self._hybrid_search_query_info.get('componentWeights'): - component_weights = self._hybrid_search_query_info['componentWeights'] + if self._hybrid_search_query_info.get("componentWeights"): + component_weights = self._hybrid_search_query_info["componentWeights"] else: # If no weights are provided, we default to 1.0 for all components - component_weights = [1.0] * len(self._hybrid_search_query_info['componentQueryInfos']) + component_weights = [1.0] * len(self._hybrid_search_query_info["componentQueryInfos"]) # Sort drained results by _rid - drained_results.sort(key=lambda x: x['_rid']) + drained_results.sort(key=lambda x: x["_rid"]) # Compose component scores matrix, where each tuple is (score, index) component_scores = _retrieve_component_scores(drained_results) @@ -178,8 +196,8 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma # Sort by scores using component weights for index, score_tuples in enumerate(component_scores): # Negative Weights will change sorting from Descending to Ascending - ordering = self._hybrid_search_query_info['componentQueryInfos'][index]['orderBy'][0] - comparison_factor = not ordering.lower() == 'ascending' + ordering = self._hybrid_search_query_info["componentQueryInfos"][index]["orderBy"][0] + comparison_factor = not ordering.lower() == "ascending" # pylint: disable=cell-var-from-loop score_tuples.sort(key=lambda x: x[0], reverse=comparison_factor) @@ -190,7 +208,7 @@ async def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-ma _compute_rrf_scores(ranks, component_weights, drained_results) # Finally, sort on the RRF scores to build the final result to return - drained_results.sort(key=lambda x: x['Score'], reverse=True) + drained_results.sort(key=lambda x: x["Score"], reverse=True) self._format_final_results(drained_results) def _attach_parameters(self, query): @@ -214,30 +232,28 @@ def _attach_parameters(self, query): return {"query": query, "parameters": self._parameters} def _format_final_results(self, results): - skip = self._hybrid_search_query_info['skip'] or 0 - take = self._hybrid_search_query_info['take'] - self._final_results = results[skip:skip + take] + skip = self._hybrid_search_query_info["skip"] or 0 + take = self._hybrid_search_query_info["take"] + self._final_results = results[skip : skip + take] self._final_results.reverse() self._final_results = [item["payload"]["payload"] for item in self._final_results] def _aggregate_global_statistics(self, global_statistics_doc_producers): - self._aggregated_global_statistics = {"documentCount": 0, - "fullTextStatistics": None} + self._aggregated_global_statistics = {"documentCount": 0, "fullTextStatistics": None} for dp in global_statistics_doc_producers: - self._aggregated_global_statistics["documentCount"] += dp._cur_item['documentCount'] + self._aggregated_global_statistics["documentCount"] += dp._cur_item["documentCount"] if self._aggregated_global_statistics["fullTextStatistics"] is None: - self._aggregated_global_statistics["fullTextStatistics"] = dp._cur_item[ - 'fullTextStatistics'] + self._aggregated_global_statistics["fullTextStatistics"] = dp._cur_item["fullTextStatistics"] else: all_text_statistics = self._aggregated_global_statistics["fullTextStatistics"] - curr_text_statistics = dp._cur_item['fullTextStatistics'] + curr_text_statistics = dp._cur_item["fullTextStatistics"] assert len(all_text_statistics) == len(curr_text_statistics) for i, all_stats in enumerate(all_text_statistics): curr_stats = curr_text_statistics[i] - assert len(all_stats['hitCounts']) == len(curr_stats['hitCounts']) - all_stats['totalWordCount'] += curr_stats['totalWordCount'] - for j in range(len(all_text_statistics[i]['hitCounts'])): - all_text_statistics[i]['hitCounts'][j] += curr_text_statistics[i]['hitCounts'][j] + assert len(all_stats["hitCounts"]) == len(curr_stats["hitCounts"]) + all_stats["totalWordCount"] += curr_stats["totalWordCount"] + for j in range(len(all_text_statistics[i]["hitCounts"])): + all_text_statistics[i]["hitCounts"][j] += curr_text_statistics[i]["hitCounts"][j] async def __anext__(self): """Returns the next item result. @@ -272,7 +288,7 @@ async def _repair_document_producer(self, query, target_all_ranges=False): self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) ) @@ -292,5 +308,5 @@ async def _get_target_partition_key_range(self, target_all_ranges): return await self._routing_provider.get_overlapping_ranges( self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges], - self._options + self._options, ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/multi_execution_aggregator.py index 6fcd0117510b..0499fc0773c2 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/multi_execution_aggregator.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service. -""" +"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service.""" + from azure.cosmos._execution_context.aio.base_execution_context import _QueryExecutionContextBase from azure.cosmos._execution_context.aio import document_producer, _queue_async_helper from azure.cosmos._routing import routing_range @@ -61,8 +61,9 @@ def peek(self): def size(self): return len(self._heap) - def __init__(self, client, resource_link, query, options, partitioned_query_ex_info, - response_hook, raw_response_hook): + def __init__( + self, client, resource_link, query, options, partitioned_query_ex_info, response_hook, raw_response_hook + ): super(_MultiExecutionContextAggregator, self).__init__(client, options) # use the routing provider in the client @@ -157,7 +158,7 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) async def _get_target_partition_key_range(self): @@ -165,7 +166,7 @@ async def _get_target_partition_key_range(self): return await self._routing_provider.get_overlapping_ranges( self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges], - self._options + self._options, ) async def _configure_partition_ranges(self): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/non_streaming_order_by_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/non_streaming_order_by_aggregator.py index 148beb6abb8a..55b0b8d6423c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/non_streaming_order_by_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/aio/non_streaming_order_by_aggregator.py @@ -1,8 +1,8 @@ # The MIT License (MIT) # Copyright (c) 2024 Microsoft Corporation -"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service. -""" +"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service.""" + from azure.cosmos._execution_context.aio.base_execution_context import _QueryExecutionContextBase from azure.cosmos._execution_context.aio.multi_execution_aggregator import _MultiExecutionContextAggregator from azure.cosmos._execution_context.aio import document_producer @@ -11,6 +11,7 @@ # pylint: disable=protected-access + class _NonStreamingOrderByContextAggregator(_QueryExecutionContextBase): """This class is a subclass of the query execution context base and serves for non-streaming order by queries. It is very similar to the existing MultiExecutionContextAggregator, @@ -21,8 +22,9 @@ class _NonStreamingOrderByContextAggregator(_QueryExecutionContextBase): by the user. """ - def __init__(self, client, resource_link, query, options, partitioned_query_ex_info, - response_hook, raw_response_hook): + def __init__( + self, client, resource_link, query, options, partitioned_query_ex_info, response_hook, raw_response_hook + ): super(_NonStreamingOrderByContextAggregator, self).__init__(client, options) # use the routing provider in the client @@ -33,12 +35,12 @@ def __init__(self, client, resource_link, query, options, partitioned_query_ex_i self._partitioned_query_ex_info = partitioned_query_ex_info self._orderByPQ = _MultiExecutionContextAggregator.PriorityQueue() self._doc_producers = [] - self._document_producer_comparator = ( - document_producer._NonStreamingOrderByComparator(partitioned_query_ex_info.get_order_by())) + self._document_producer_comparator = document_producer._NonStreamingOrderByComparator( + partitioned_query_ex_info.get_order_by() + ) self._response_hook = response_hook self._raw_response_hook = raw_response_hook - async def __anext__(self): """Returns the next result @@ -102,7 +104,7 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) async def _get_target_partition_key_range(self): @@ -110,7 +112,7 @@ async def _get_target_partition_key_range(self): return await self._routing_provider.get_overlapping_ranges( self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges], - self._options + self._options, ) async def _configure_partition_ranges(self): @@ -139,8 +141,10 @@ async def _configure_partition_ranges(self): except StopAsyncIteration: continue - pq_size = self._partitioned_query_ex_info.get_top() or\ - self._partitioned_query_ex_info.get_limit() + self._partitioned_query_ex_info.get_offset() + pq_size = ( + self._partitioned_query_ex_info.get_top() + or self._partitioned_query_ex_info.get_limit() + self._partitioned_query_ex_info.get_offset() + ) sort_orders = self._partitioned_query_ex_info.get_order_by() for doc_producer in self._doc_producers: while True: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py index 8cf5a7f54043..446bc1c67ff2 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/base_execution_context.py @@ -120,7 +120,7 @@ def _fetch_items_helper_no_retries(self, fetch_function): new_options["continuation"] = self._continuation response_headers = {} - (fetched_items, response_headers) = fetch_function(new_options) + fetched_items, response_headers = fetch_function(new_options) if not self._has_started: self._has_started = True @@ -168,16 +168,18 @@ def callback(**kwargs): # pylint: disable=unused-argument _LOGGER.error( "Partition split retry: Exhausted all %d retries. " "state: _has_started=%s, _continuation=%s", - max_retries, self._has_started, self._continuation + max_retries, + self._has_started, + self._continuation, ) raise # Exhausted retries, propagate error _LOGGER.warning( "Partition split retry: 410 error (sub_status=%s). Attempt %d of %d. " "Refreshing routing map and resetting state.", - getattr(e, 'sub_status', 'N/A'), + getattr(e, "sub_status", "N/A"), attempt, - max_retries + max_retries, ) # Refresh routing map to get new partition key ranges @@ -195,6 +197,7 @@ def callback(**kwargs): # pylint: disable=unused-argument "This indicates a potential logic error." ) return [] + next = __next__ # Python 2 compatibility. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py index f77504d3e9a1..b37d2d51408a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/document_producer.py @@ -39,8 +39,17 @@ class _DocumentProducer(object): result of each. """ - def __init__(self, partition_key_target_range, client, collection_link, query, document_producer_comp, options, - response_hook, raw_response_hook): + def __init__( + self, + partition_key_target_range, + client, + collection_link, + query, + document_producer_comp, + options, + response_hook, + raw_response_hook, + ): """ Constructor """ @@ -60,8 +69,15 @@ def __init__(self, partition_key_target_range, client, collection_link, query, d collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): - return self._client.QueryFeed(path, collection_id, query, options, partition_key_target_range["id"], - response_hook=response_hook, raw_response_hook=raw_response_hook) + return self._client.QueryFeed( + path, + collection_id, + query, + options, + partition_key_target_range["id"], + response_hook=response_hook, + raw_response_hook=raw_response_hook, + ) self._ex_context = _DefaultQueryExecutionContext(client, self._options, fetch_fn) @@ -87,9 +103,9 @@ def __next__(self): def get_target_range(self): """Returns the target partition key range. - :return: - Target partition key range. - :rtype: dict + :return: + Target partition key range. + :rtype: dict """ return self._partition_key_target_range @@ -217,8 +233,7 @@ def _peek_order_by_items(peek_result): class _OrderByDocumentProducerComparator(_PartitionKeyRangeDocumentProducerComparator): - """Provide a Comparator for document producers which respects orderby sort order. - """ + """Provide a Comparator for document producers which respects orderby sort order.""" def __init__(self, sort_order): # pylint: disable=super-init-not-called """Instantiates this class @@ -292,8 +307,7 @@ def __init__(self, item_result, sort_order): self._sort_order = sort_order def __lt__(self, other): - res = _OrderByHelper.compare(self._item_result["orderByItems"][0], - other._item_result["orderByItems"][0]) + res = _OrderByHelper.compare(self._item_result["orderByItems"][0], other._item_result["orderByItems"][0]) if res != 0: if self._sort_order[0] == "Descending": res = -res diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py index d04f181a1886..4735729c55e8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/endpoint_component.py @@ -22,6 +22,7 @@ """Internal class for query execution endpoint component implementation in the Azure Cosmos database service. """ + import numbers import copy import hashlib @@ -55,16 +56,19 @@ class _QueryExecutionOrderByEndpointComponent(_QueryExecutionEndpointComponent): For each processed orderby result it returns 'payload' item of the result. """ + def __next__(self): return next(self._execution_context)["payload"] next = __next__ # Python 2 compatibility. + class _QueryExecutionNonStreamingEndpointComponent(_QueryExecutionEndpointComponent): """Represents an endpoint in handling a non-streaming order by query results. For each processed orderby result it returns the item result. """ + def __next__(self): return next(self._execution_context)._item_result["payload"] # pylint: disable=protected-access @@ -94,6 +98,7 @@ class _QueryExecutionDistinctOrderedEndpointComponent(_QueryExecutionEndpointCom It returns only those values not already returned. """ + def __init__(self, execution_context): super(_QueryExecutionDistinctOrderedEndpointComponent, self).__init__(execution_context) self.last_result = None @@ -113,6 +118,7 @@ class _QueryExecutionDistinctUnorderedEndpointComponent(_QueryExecutionEndpointC It returns only those values not already returned. """ + def __init__(self, execution_context): super(_QueryExecutionDistinctUnorderedEndpointComponent, self).__init__(execution_context) self.last_result = set() @@ -136,7 +142,7 @@ def __next__(self): json_repr = json.dumps(self.make_hash(res)) json_repr = json_repr.encode("utf-8") - hash_object = hashlib.sha1(json_repr) # nosec + hash_object = hashlib.sha1(json_repr) # nosec hashed_result = hash_object.hexdigest() while hashed_result in self.last_result: @@ -144,7 +150,7 @@ def __next__(self): json_repr = json.dumps(self.make_hash(res)) json_repr = json_repr.encode("utf-8") - hash_object = hashlib.sha1(json_repr) # nosec + hash_object = hashlib.sha1(json_repr) # nosec hashed_result = hash_object.hexdigest() self.last_result.add(hashed_result) return res @@ -157,6 +163,7 @@ class _QueryExecutionOffsetEndpointComponent(_QueryExecutionEndpointComponent): It returns results offset by as many results as offset arg specified. """ + def __init__(self, execution_context, offset_count): super(_QueryExecutionOffsetEndpointComponent, self).__init__(execution_context) self._offset_count = offset_count diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py index a5d807021acc..1764bbeb930f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/execution_dispatcher.py @@ -53,14 +53,19 @@ def _is_hybrid_search_query(query, e): def _verify_valid_hybrid_search_query(hybrid_search_query_info): - if not hybrid_search_query_info['take']: - raise ValueError("Executing a hybrid search query without TOP or LIMIT can consume many" + - " RUs very fast and have long runtimes. Please ensure you are using one" + - " of the two filters with your hybrid search query.") - if hybrid_search_query_info['take'] > int(os.environ.get(Constants.HS_MAX_ITEMS_CONFIG, - Constants.HS_MAX_ITEMS_CONFIG_DEFAULT)): - raise ValueError("Executing a hybrid search query with more items than the max is not allowed. " + - "Please ensure you are using a limit smaller than the max, or change the max.") + if not hybrid_search_query_info["take"]: + raise ValueError( + "Executing a hybrid search query without TOP or LIMIT can consume many" + + " RUs very fast and have long runtimes. Please ensure you are using one" + + " of the two filters with your hybrid search query." + ) + if hybrid_search_query_info["take"] > int( + os.environ.get(Constants.HS_MAX_ITEMS_CONFIG, Constants.HS_MAX_ITEMS_CONFIG_DEFAULT) + ): + raise ValueError( + "Executing a hybrid search query with more items than the max is not allowed. " + + "Please ensure you are using a limit smaller than the max, or change the max." + ) def _get_partitioned_execution_info(e): @@ -77,8 +82,9 @@ class _ProxyQueryExecutionContext(_QueryExecutionContextBase): # pylint: disabl to _MultiExecutionContextAggregator """ - def __init__(self, client, resource_link, query, options, fetch_function, response_hook, - raw_response_hook, resource_type): + def __init__( + self, client, resource_link, query, options, fetch_function, response_hook, raw_response_hook, resource_type + ): """ Constructor """ @@ -99,15 +105,15 @@ def _create_execution_context_with_query_plan(self): query_plan = self._client._GetQueryPlanThroughGateway( query_to_use, self._resource_link, - self._options.get('excludedLocations'), - read_timeout=self._options.get('read_timeout') + self._options.get("excludedLocations"), + read_timeout=self._options.get("read_timeout"), ) query_execution_info = _PartitionedQueryExecutionInfo(query_plan) qe_info = getattr(query_execution_info, "_query_execution_info", None) if isinstance(qe_info, dict) and isinstance(query_to_use, dict): params = query_to_use.get("parameters") if params is not None: - query_execution_info._query_execution_info['parameters'] = params + query_execution_info._query_execution_info["parameters"] = params self._execution_context = self._create_pipelined_execution_context(query_execution_info) @@ -151,56 +157,68 @@ def fetch_next_block(self): def _create_pipelined_execution_context(self, query_execution_info): assert self._resource_link, "code bug, resource_link is required." if query_execution_info.has_aggregates() and not query_execution_info.has_select_value(): - if self._options and ("enableCrossPartitionQuery" in self._options - and self._options["enableCrossPartitionQuery"]): + if self._options and ( + "enableCrossPartitionQuery" in self._options and self._options["enableCrossPartitionQuery"] + ): raise CosmosHttpResponseError( StatusCodes.BAD_REQUEST, - "Cross partition query only supports 'VALUE ' for aggregates") + "Cross partition query only supports 'VALUE ' for aggregates", + ) # throw exception here for vector search query without limit filter or limit > max_limit if query_execution_info.get_non_streaming_order_by(): - total_item_buffer = (query_execution_info.get_top() or 0) or \ - ((query_execution_info.get_limit() or 0) + (query_execution_info.get_offset() or 0)) + total_item_buffer = (query_execution_info.get_top() or 0) or ( + (query_execution_info.get_limit() or 0) + (query_execution_info.get_offset() or 0) + ) if total_item_buffer == 0: - raise ValueError("Executing a vector search query without TOP or LIMIT can consume many" + - " RUs very fast and have long runtimes. Please ensure you are using one" + - " of the two filters with your vector search query.") - if total_item_buffer > int(os.environ.get(Constants.MAX_ITEM_BUFFER_VS_CONFIG, - Constants.MAX_ITEM_BUFFER_VS_CONFIG_DEFAULT)): - raise ValueError("Executing a vector search query with more items than the max is not allowed. " + - "Please ensure you are using a limit smaller than the max, or change the max.") - execution_context_aggregator = \ - non_streaming_order_by_aggregator._NonStreamingOrderByContextAggregator(self._client, - self._resource_link, - self._query, - self._options, - query_execution_info, - self._response_hook, - self._raw_response_hook) + raise ValueError( + "Executing a vector search query without TOP or LIMIT can consume many" + + " RUs very fast and have long runtimes. Please ensure you are using one" + + " of the two filters with your vector search query." + ) + if total_item_buffer > int( + os.environ.get(Constants.MAX_ITEM_BUFFER_VS_CONFIG, Constants.MAX_ITEM_BUFFER_VS_CONFIG_DEFAULT) + ): + raise ValueError( + "Executing a vector search query with more items than the max is not allowed. " + + "Please ensure you are using a limit smaller than the max, or change the max." + ) + execution_context_aggregator = non_streaming_order_by_aggregator._NonStreamingOrderByContextAggregator( + self._client, + self._resource_link, + self._query, + self._options, + query_execution_info, + self._response_hook, + self._raw_response_hook, + ) elif query_execution_info.has_hybrid_search_query_info(): - hybrid_search_query_info = query_execution_info._query_execution_info['hybridSearchQueryInfo'] + hybrid_search_query_info = query_execution_info._query_execution_info["hybridSearchQueryInfo"] _verify_valid_hybrid_search_query(hybrid_search_query_info) - execution_context_aggregator = \ - hybrid_search_aggregator._HybridSearchContextAggregator(self._client, - self._resource_link, - self._options, - query_execution_info, - hybrid_search_query_info, - self._response_hook, - self._raw_response_hook) + execution_context_aggregator = hybrid_search_aggregator._HybridSearchContextAggregator( + self._client, + self._resource_link, + self._options, + query_execution_info, + hybrid_search_query_info, + self._response_hook, + self._raw_response_hook, + ) execution_context_aggregator._run_hybrid_search() else: - execution_context_aggregator = \ - multi_execution_aggregator._MultiExecutionContextAggregator(self._client, - self._resource_link, - self._query, - self._options, - query_execution_info, - self._response_hook, - self._raw_response_hook) + execution_context_aggregator = multi_execution_aggregator._MultiExecutionContextAggregator( + self._client, + self._resource_link, + self._query, + self._options, + query_execution_info, + self._response_hook, + self._raw_response_hook, + ) execution_context_aggregator._configure_partition_ranges() - return _PipelineExecutionContext(self._client, self._options, execution_context_aggregator, - query_execution_info) + return _PipelineExecutionContext( + self._client, self._options, execution_context_aggregator, query_execution_info + ) next = __next__ # Python 2 compatibility. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/hybrid_search_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/hybrid_search_aggregator.py index a738dd94ddbe..5d7e3d289042 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/hybrid_search_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/hybrid_search_aggregator.py @@ -1,8 +1,8 @@ # The MIT License (MIT) # Copyright (c) 2024 Microsoft Corporation -"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service. -""" +"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service.""" + from typing import Union from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase from azure.cosmos._execution_context import document_producer @@ -22,11 +22,11 @@ class _Placeholders: def _retrieve_component_scores(drained_results): component_scores_list = [] - for _ in drained_results[0]['payload']['componentScores']: + for _ in drained_results[0]["payload"]["componentScores"]: component_scores_list.append([]) undefined_components = [-999999] * len(component_scores_list) for index, result in enumerate(drained_results): - component_scores = result['payload']['componentScores'] + component_scores = result["payload"]["componentScores"] # Another small fix while backend changes are released to deal with empty component score scenarios if len(component_scores) == 0: component_scores = undefined_components @@ -44,7 +44,7 @@ def _compute_rrf_scores(ranks: list[list[int]], component_weights: list[Union[in rrf_score += component_weights[component_index] / (RRF_CONSTANT + ranks[component_index][index]) # Add the score to the item to be returned - result['Score'] = rrf_score + result["Score"] = rrf_score def _compute_ranks(component_scores): @@ -63,7 +63,7 @@ def _compute_ranks(component_scores): def _coalesce_duplicate_rids(query_results): - unique_rids = {d['_rid']: d for d in query_results} + unique_rids = {d["_rid"]: d for d in query_results} return list(unique_rids.values()) @@ -81,37 +81,37 @@ def _drain_and_coalesce_results(document_producers_to_drain): def _rewrite_query_infos(hybrid_search_query_info, global_statistics, parameters=None): rewritten_query_infos = [] - for query_info in hybrid_search_query_info['componentQueryInfos']: - assert query_info['orderBy'] - assert query_info['hasNonStreamingOrderBy'] + for query_info in hybrid_search_query_info["componentQueryInfos"]: + assert query_info["orderBy"] + assert query_info["hasNonStreamingOrderBy"] rewritten_order_by_expressions = [] - for order_by_expression in query_info['orderByExpressions']: + for order_by_expression in query_info["orderByExpressions"]: rewritten_order_by_expressions.append( - _format_component_query_workaround(order_by_expression, global_statistics, - len(hybrid_search_query_info[ - 'componentQueryInfos']))) - - query_info['rewrittenQuery'] = _attach_parameters(query_info['rewrittenQuery'], parameters) - rewritten_query = _format_component_query_workaround(query_info['rewrittenQuery'], - global_statistics, - len(hybrid_search_query_info[ - 'componentQueryInfos'])) + _format_component_query_workaround( + order_by_expression, global_statistics, len(hybrid_search_query_info["componentQueryInfos"]) + ) + ) + + query_info["rewrittenQuery"] = _attach_parameters(query_info["rewrittenQuery"], parameters) + rewritten_query = _format_component_query_workaround( + query_info["rewrittenQuery"], global_statistics, len(hybrid_search_query_info["componentQueryInfos"]) + ) new_query_info = query_info.copy() - new_query_info['orderByExpressions'] = rewritten_order_by_expressions - new_query_info['rewrittenQuery'] = rewritten_query + new_query_info["orderByExpressions"] = rewritten_order_by_expressions + new_query_info["rewrittenQuery"] = rewritten_query rewritten_query_infos.append(new_query_info) return rewritten_query_infos def _format_component_query(format_string, global_statistics): format_string = format_string.replace(_Placeholders.formattable_order_by, "true") - query = format_string.replace(_Placeholders.total_document_count, - str(global_statistics['documentCount'])) + query = format_string.replace(_Placeholders.total_document_count, str(global_statistics["documentCount"])) - for i in range(len(global_statistics['fullTextStatistics'])): - full_text_statistics = global_statistics['fullTextStatistics'][i] - query = query.replace(_Placeholders.formattable_total_word_count.format(i), - str(full_text_statistics['totalWordCount'])) + for i in range(len(global_statistics["fullTextStatistics"])): + full_text_statistics = global_statistics["fullTextStatistics"][i] + query = query.replace( + _Placeholders.formattable_total_word_count.format(i), str(full_text_statistics["totalWordCount"]) + ) hit_counts_array = f"[{','.join(map(str, full_text_statistics['hitCounts']))}]" query = query.replace(_Placeholders.formattable_hit_counts_array.format(i), hit_counts_array) @@ -122,11 +122,10 @@ def _format_component_query_workaround(format_string, global_statistics, compone # TODO: remove this method once the fix is live and switch back to one above parameters = None if isinstance(format_string, dict): - parameters = format_string.get('parameters', None) - format_string = format_string['query'] + parameters = format_string.get("parameters", None) + format_string = format_string["query"] format_string = format_string.replace(_Placeholders.formattable_order_by, "true") - query = format_string.replace(_Placeholders.total_document_count, - str(global_statistics['documentCount'])) + query = format_string.replace(_Placeholders.total_document_count, str(global_statistics["documentCount"])) statistics_index = 0 for component_index in range(component_count): total_word_count_placeholder = _Placeholders.formattable_total_word_count.format(component_index) @@ -135,8 +134,8 @@ def _format_component_query_workaround(format_string, global_statistics, compone if total_word_count_placeholder not in query: continue - full_text_statistics = global_statistics['fullTextStatistics'][statistics_index] - query = query.replace(total_word_count_placeholder, str(full_text_statistics['totalWordCount'])) + full_text_statistics = global_statistics["fullTextStatistics"][statistics_index] + query = query.replace(total_word_count_placeholder, str(full_text_statistics["totalWordCount"])) hit_counts_array = f"[{','.join(map(str, full_text_statistics['hitCounts']))}]" query = query.replace(hit_counts_array_placeholder, hit_counts_array) @@ -178,8 +177,16 @@ class _HybridSearchContextAggregator(_QueryExecutionContextBase): # pylint: dis by the user. """ - def __init__(self, client, resource_link, options, - partitioned_query_execution_info, hybrid_search_query_info, response_hook, raw_response_hook): + def __init__( + self, + client, + resource_link, + options, + partitioned_query_execution_info, + hybrid_search_query_info, + response_hook, + raw_response_hook, + ): super(_HybridSearchContextAggregator, self).__init__(client, options) # use the routing provider in the client @@ -205,10 +212,10 @@ def __init__(self, client, resource_link, options, def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-statements # Check if we need to run global statistics queries, and if so do for every partition in the container - if self._hybrid_search_query_info['requiresGlobalStatistics']: + if self._hybrid_search_query_info["requiresGlobalStatistics"]: target_partition_key_ranges = self._get_target_partition_key_range(target_all_ranges=True) global_statistics_doc_producers = [] - global_statistics_query = self._attach_parameters(self._hybrid_search_query_info['globalStatisticsQuery']) + global_statistics_query = self._attach_parameters(self._hybrid_search_query_info["globalStatisticsQuery"]) partitioned_query_execution_context_list = [] for partition_key_target_range in target_partition_key_ranges: # create a document producer for each partition key range @@ -221,7 +228,7 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) ) @@ -233,8 +240,9 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta except exceptions.CosmosHttpResponseError as e: if exceptions._partition_range_is_gone(e): # repairing document producer context on partition split - global_statistics_doc_producers = self._repair_document_producer(global_statistics_query, - target_all_ranges=True) + global_statistics_doc_producers = self._repair_document_producer( + global_statistics_query, target_all_ranges=True + ) else: raise except StopIteration: @@ -245,10 +253,11 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta # re-write the component queries if needed if self._aggregated_global_statistics: - rewritten_query_infos = _rewrite_query_infos(self._hybrid_search_query_info, - self._aggregated_global_statistics, self._parameters) + rewritten_query_infos = _rewrite_query_infos( + self._hybrid_search_query_info, self._aggregated_global_statistics, self._parameters + ) else: - rewritten_query_infos = self._hybrid_search_query_info['componentQueryInfos'] + rewritten_query_infos = self._hybrid_search_query_info["componentQueryInfos"] component_query_execution_list = [] # for each of the query infos, run the component queries for the target partitions @@ -257,17 +266,17 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta for pk_range in target_partition_key_ranges: # If query was given parameters we must add them back in if self._parameters: - rewritten_query['rewrittenQuery'] = self._attach_parameters(rewritten_query['rewrittenQuery']) + rewritten_query["rewrittenQuery"] = self._attach_parameters(rewritten_query["rewrittenQuery"]) component_query_execution_list.append( document_producer._DocumentProducer( pk_range, self._client, self._resource_link, - rewritten_query['rewrittenQuery'], + rewritten_query["rewrittenQuery"], self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) ) # verify all document producers have items/ no splits @@ -281,8 +290,9 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta component_query_results = [] # repairing document producer context on partition split for rewritten_query in rewritten_query_infos: - component_query_results.extend(self._repair_document_producer( - rewritten_query['rewrittenQuery'])) + component_query_results.extend( + self._repair_document_producer(rewritten_query["rewrittenQuery"]) + ) else: raise except StopIteration: @@ -296,14 +306,14 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta return # Get the Components weight if any - if self._hybrid_search_query_info.get('componentWeights'): - component_weights = self._hybrid_search_query_info['componentWeights'] + if self._hybrid_search_query_info.get("componentWeights"): + component_weights = self._hybrid_search_query_info["componentWeights"] else: # If no weights are provided, we assume all components have equal weight - component_weights = [1.0] * len(self._hybrid_search_query_info['componentQueryInfos']) + component_weights = [1.0] * len(self._hybrid_search_query_info["componentQueryInfos"]) # Sort drained results by _rid - drained_results.sort(key=lambda x: x['_rid']) + drained_results.sort(key=lambda x: x["_rid"]) # Compose component scores matrix, where each tuple is (score, index) component_scores = _retrieve_component_scores(drained_results) @@ -312,8 +322,8 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta for index, score_tuples in enumerate(component_scores): # Ordering of the component query is based on if the weight is negative or positive # A positive weight ordering means descending order, a negative weight ordering means ascending order - ordering = self._hybrid_search_query_info['componentQueryInfos'][index]['orderBy'][0] - comparison_factor = not ordering.lower() == 'ascending' + ordering = self._hybrid_search_query_info["componentQueryInfos"][index]["orderBy"][0] + comparison_factor = not ordering.lower() == "ascending" # pylint: disable=cell-var-from-loop score_tuples.sort(key=lambda x: x[0], reverse=comparison_factor) @@ -324,7 +334,7 @@ def _run_hybrid_search(self): # pylint: disable=too-many-branches, too-many-sta _compute_rrf_scores(ranks, component_weights, drained_results) # Finally, sort on the RRF scores to build the final result to return - drained_results.sort(key=lambda x: x['Score'], reverse=True) + drained_results.sort(key=lambda x: x["Score"], reverse=True) self._format_final_results(drained_results) def _attach_parameters(self, query): @@ -347,51 +357,54 @@ def _attach_parameters(self, query): return {"query": query, "parameters": self._parameters} def _format_final_results(self, results): - skip = self._hybrid_search_query_info['skip'] or 0 - take = self._hybrid_search_query_info['take'] - self._final_results = results[skip:skip + take] + skip = self._hybrid_search_query_info["skip"] or 0 + take = self._hybrid_search_query_info["take"] + self._final_results = results[skip : skip + take] self._final_results.reverse() self._final_results = [item["payload"]["payload"] for item in self._final_results] def _rewrite_query_infos(self): rewritten_query_infos = [] - for query_info in self._hybrid_search_query_info['componentQueryInfos']: - assert query_info['orderBy'] - assert query_info['hasNonStreamingOrderBy'] + for query_info in self._hybrid_search_query_info["componentQueryInfos"]: + assert query_info["orderBy"] + assert query_info["hasNonStreamingOrderBy"] rewritten_order_by_expressions = [] - for order_by_expression in query_info['orderByExpressions']: + for order_by_expression in query_info["orderByExpressions"]: rewritten_order_by_expressions.append( - _format_component_query_workaround(order_by_expression, self._aggregated_global_statistics, - len(self._hybrid_search_query_info[ - 'componentQueryInfos']))) - query_info['rewrittenQuery'] = _attach_parameters(query_info['rewrittenQuery'], self._parameters) - rewritten_query = _format_component_query_workaround(query_info['rewrittenQuery'], - self._aggregated_global_statistics, - len(self._hybrid_search_query_info[ - 'componentQueryInfos'])) + _format_component_query_workaround( + order_by_expression, + self._aggregated_global_statistics, + len(self._hybrid_search_query_info["componentQueryInfos"]), + ) + ) + query_info["rewrittenQuery"] = _attach_parameters(query_info["rewrittenQuery"], self._parameters) + rewritten_query = _format_component_query_workaround( + query_info["rewrittenQuery"], + self._aggregated_global_statistics, + len(self._hybrid_search_query_info["componentQueryInfos"]), + ) new_query_info = query_info.copy() - new_query_info['orderByExpressions'] = rewritten_order_by_expressions - new_query_info['rewrittenQuery'] = rewritten_query + new_query_info["orderByExpressions"] = rewritten_order_by_expressions + new_query_info["rewrittenQuery"] = rewritten_query rewritten_query_infos.append(new_query_info) return rewritten_query_infos def _aggregate_global_statistics(self, global_statistics_doc_producers): - self._aggregated_global_statistics = {"documentCount": 0, - "fullTextStatistics": None} + self._aggregated_global_statistics = {"documentCount": 0, "fullTextStatistics": None} for dp in global_statistics_doc_producers: - self._aggregated_global_statistics["documentCount"] += dp._cur_item['documentCount'] + self._aggregated_global_statistics["documentCount"] += dp._cur_item["documentCount"] if self._aggregated_global_statistics["fullTextStatistics"] is None: - self._aggregated_global_statistics["fullTextStatistics"] = dp._cur_item['fullTextStatistics'] + self._aggregated_global_statistics["fullTextStatistics"] = dp._cur_item["fullTextStatistics"] else: all_text_statistics = self._aggregated_global_statistics["fullTextStatistics"] - curr_text_statistics = dp._cur_item['fullTextStatistics'] + curr_text_statistics = dp._cur_item["fullTextStatistics"] assert len(all_text_statistics) == len(curr_text_statistics) for i, all_stats in enumerate(all_text_statistics): curr_stats = curr_text_statistics[i] - assert len(all_stats['hitCounts']) == len(curr_stats['hitCounts']) - all_stats['totalWordCount'] += curr_stats['totalWordCount'] - for j in range(len(all_stats['hitCounts'])): - all_stats['hitCounts'][j] += curr_stats['hitCounts'][j] + assert len(all_stats["hitCounts"]) == len(curr_stats["hitCounts"]) + all_stats["totalWordCount"] += curr_stats["totalWordCount"] + for j in range(len(all_stats["hitCounts"])): + all_stats["hitCounts"][j] += curr_stats["hitCounts"][j] def __next__(self): """Returns the next item result. @@ -426,7 +439,7 @@ def _repair_document_producer(self, query, target_all_ranges=False): self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) ) @@ -446,5 +459,5 @@ def _get_target_partition_key_range(self, target_all_ranges): return self._routing_provider.get_overlapping_ranges( self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges], - self._options + self._options, ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py index 6c37c71d4260..8914022c6d3c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/multi_execution_aggregator.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service. -""" +"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service.""" import heapq from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase @@ -63,8 +62,9 @@ def peek(self): def size(self): return len(self._heap) - def __init__(self, client, resource_link, query, options, partitioned_query_ex_info, - response_hook, raw_response_hook): + def __init__( + self, client, resource_link, query, options, partitioned_query_ex_info, response_hook, raw_response_hook + ): super(_MultiExecutionContextAggregator, self).__init__(client, options) # use the routing provider in the client @@ -191,7 +191,7 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) def _get_target_partition_key_range(self): @@ -199,7 +199,7 @@ def _get_target_partition_key_range(self): return self._routing_provider.get_overlapping_ranges( self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges], - self._options + self._options, ) next = __next__ # Python 2 compatibility. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/non_streaming_order_by_aggregator.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/non_streaming_order_by_aggregator.py index 245f2eb9bd8d..9f59e4451225 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/non_streaming_order_by_aggregator.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/non_streaming_order_by_aggregator.py @@ -1,8 +1,8 @@ # The MIT License (MIT) # Copyright (c) 2024 Microsoft Corporation -"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service. -""" +"""Internal class for multi execution context aggregator implementation in the Azure Cosmos database service.""" + from azure.cosmos._execution_context.base_execution_context import _QueryExecutionContextBase from azure.cosmos._execution_context.multi_execution_aggregator import _MultiExecutionContextAggregator from azure.cosmos._execution_context import document_producer @@ -11,6 +11,7 @@ # pylint: disable=protected-access + class _NonStreamingOrderByContextAggregator(_QueryExecutionContextBase): """This class is a subclass of the query execution context base and serves for non-streaming order by queries. It is very similar to the existing MultiExecutionContextAggregator, @@ -21,8 +22,9 @@ class _NonStreamingOrderByContextAggregator(_QueryExecutionContextBase): by the user. """ - def __init__(self, client, resource_link, query, options, partitioned_query_ex_info, - response_hook, raw_response_hook): + def __init__( + self, client, resource_link, query, options, partitioned_query_ex_info, response_hook, raw_response_hook + ): super(_NonStreamingOrderByContextAggregator, self).__init__(client, options) # use the routing provider in the client @@ -63,8 +65,10 @@ def __init__(self, client, resource_link, query, options, partitioned_query_ex_i except StopIteration: continue - pq_size = self._partitioned_query_ex_info.get_top() or \ - self._partitioned_query_ex_info.get_limit() + self._partitioned_query_ex_info.get_offset() + pq_size = ( + self._partitioned_query_ex_info.get_top() + or self._partitioned_query_ex_info.get_limit() + self._partitioned_query_ex_info.get_offset() + ) for doc_producer in self._doc_producers: while True: try: @@ -145,7 +149,7 @@ def _createTargetPartitionQueryExecutionContext(self, partition_key_target_range self._document_producer_comparator, self._options, self._response_hook, - self._raw_response_hook + self._raw_response_hook, ) def _get_target_partition_key_range(self): @@ -153,5 +157,5 @@ def _get_target_partition_key_range(self): return self._routing_provider.get_overlapping_ranges( self._resource_link, [routing_range.Range.ParseFromDict(range_as_dict) for range_as_dict in query_ranges], - self._options + self._options, ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py index 60e7b4ce6b01..433e61ad5e7f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_execution_context/query_execution_info.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for partitioned query execution info implementation in the Azure Cosmos database service. -""" +"""Internal class for partitioned query execution info implementation in the Azure Cosmos database service.""" from azure.cosmos.documents import _DistinctType diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py index 546d75194a33..3f37b94687f3 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_endpoint_manager.py @@ -22,6 +22,7 @@ """Internal class for global endpoint manager implementation in the Azure Cosmos database service. """ + import logging import os import threading @@ -37,11 +38,11 @@ from ._location_cache import LocationCache, RegionalRoutingContext from ._utils import current_time_millis - # pylint: disable=protected-access logger = logging.getLogger("azure.cosmos._GlobalEndpointManager") -class _GlobalEndpointManager(object): # pylint: disable=too-many-instance-attributes + +class _GlobalEndpointManager(object): # pylint: disable=too-many-instance-attributes """ This internal class implements the logic for endpoint management for geo-replicated database accounts. @@ -52,10 +53,7 @@ def __init__(self, client): self.PreferredLocations = client.connection_policy.PreferredLocations self.DefaultEndpoint = client.url_connection self.refresh_time_interval_in_ms = self.get_refresh_time_interval_in_ms_stub() - self.location_cache = LocationCache( - self.DefaultEndpoint, - client.connection_policy - ) + self.location_cache = LocationCache(self.DefaultEndpoint, client.connection_policy) self.refresh_needed = False self.refresh_lock = threading.RLock() self.last_refresh_time = 0 @@ -73,10 +71,7 @@ def get_write_endpoint(self): def get_read_endpoint(self): return self.location_cache.get_read_regional_routing_context() - def _resolve_service_endpoint( - self, - request: RequestObject - ) -> str: + def _resolve_service_endpoint(self, request: RequestObject) -> str: return self.location_cache.resolve_service_endpoint(request) def mark_endpoint_unavailable_for_read(self, endpoint, refresh_cache, context: str): @@ -91,7 +86,9 @@ def get_ordered_write_locations(self): def get_ordered_read_locations(self): return self.location_cache.get_ordered_read_locations() - def get_applicable_read_regional_routing_contexts(self, request: RequestObject) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long + def get_applicable_read_regional_routing_contexts( + self, request: RequestObject + ) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long """Get the list of applicable read endpoints based on request parameters and excluded locations. :param request: Request object containing operation parameters and exclusion lists @@ -101,7 +98,9 @@ def get_applicable_read_regional_routing_contexts(self, request: RequestObject) """ return self.location_cache._get_applicable_read_regional_routing_contexts(request) - def get_applicable_write_regional_routing_contexts(self, request: RequestObject) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long + def get_applicable_write_regional_routing_contexts( + self, request: RequestObject + ) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long """Get the list of applicable write endpoints based on request parameters and excluded locations. :param request: Request object containing operation parameters and exclusion lists @@ -188,13 +187,15 @@ def _start_background_refresh(self, target: Callable[..., None], kwargs: dict[st :param dict kwargs: The keyword arguments to pass to the target function. """ if not (self._refresh_thread and self._refresh_thread.is_alive()): + def runner(): try: target(**kwargs) - except Exception as exception: #pylint: disable=broad-exception-caught + except Exception as exception: # pylint: disable=broad-exception-caught # background failures should not crash main thread # Intentionally swallow to avoid affecting foreground; logging could be added. logger.error("Health check task failed: %s", exception, exc_info=True) + t = threading.Thread(target=runner, name="cosmos-endpoint-refresh", daemon=True) self._refresh_thread = t t.start() diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker.py index e301e4c4d49f..eeb505906d7c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker.py @@ -19,14 +19,15 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for global endpoint manager for circuit breaker. -""" +"""Internal class for global endpoint manager for circuit breaker.""" + from typing import TYPE_CHECKING, Optional from azure.cosmos._constants import _Constants from azure.cosmos.partition_key import _get_partition_key_from_partition_key_definition -from azure.cosmos._global_partition_endpoint_manager_circuit_breaker_core import \ - _GlobalPartitionEndpointManagerForCircuitBreakerCore +from azure.cosmos._global_partition_endpoint_manager_circuit_breaker_core import ( + _GlobalPartitionEndpointManagerForCircuitBreakerCore, +) from azure.cosmos._global_endpoint_manager import _GlobalEndpointManager from azure.cosmos._request_object import RequestObject @@ -36,7 +37,8 @@ if TYPE_CHECKING: from azure.cosmos._cosmos_client_connection import CosmosClientConnection -#cspell:ignore ppcb +# cspell:ignore ppcb + class _GlobalPartitionEndpointManagerForCircuitBreaker(_GlobalEndpointManager): """ @@ -46,22 +48,23 @@ class _GlobalPartitionEndpointManagerForCircuitBreaker(_GlobalEndpointManager): def __init__(self, client: "CosmosClientConnection"): super(_GlobalPartitionEndpointManagerForCircuitBreaker, self).__init__(client) - self.global_partition_endpoint_manager_core = ( - _GlobalPartitionEndpointManagerForCircuitBreakerCore(client, self.location_cache)) + self.global_partition_endpoint_manager_core = _GlobalPartitionEndpointManagerForCircuitBreakerCore( + client, self.location_cache + ) def is_circuit_breaker_applicable(self, request: RequestObject) -> bool: return self.global_partition_endpoint_manager_core.is_circuit_breaker_applicable(request) - def create_pk_range_wrapper(self, request: RequestObject) -> Optional[PartitionKeyRangeWrapper]: if HttpHeaders.IntendedCollectionRID in request.headers: container_rid = request.headers[HttpHeaders.IntendedCollectionRID] else: self.global_partition_endpoint_manager_core.log_warn_or_debug( "Illegal state: the request does not contain container information. " - "Circuit breaker cannot be performed.") + "Circuit breaker cannot be performed." + ) return None - properties = self.client._container_properties_cache[container_rid] # pylint: disable=protected-access + properties = self.client._container_properties_cache[container_rid] # pylint: disable=protected-access # get relevant information from container cache to get the overlapping ranges container_link = properties["container_link"] partition_key_definition = properties["partitionKey"] @@ -73,32 +76,39 @@ def create_pk_range_wrapper(self, request: RequestObject) -> Optional[PartitionK if request.pk_val: partition_key_value = request.pk_val # get the partition key range for the given partition key - epk_range = [partition_key._get_epk_range_for_partition_key(partition_key_value)] # pylint: disable=protected-access - partition_ranges = (self.client._routing_map_provider # pylint: disable=protected-access - .get_overlapping_ranges(container_link, epk_range, options)) + epk_range = [ + partition_key._get_epk_range_for_partition_key(partition_key_value) + ] # pylint: disable=protected-access + partition_ranges = ( + self.client._routing_map_provider.get_overlapping_ranges( # pylint: disable=protected-access + container_link, epk_range, options + ) + ) partition_range = Range.PartitionKeyRangeToRange(partition_ranges[0]) elif HttpHeaders.PartitionKeyRangeID in request.headers: pk_range_id = request.headers[HttpHeaders.PartitionKeyRangeID] - epk_range =(self.client._routing_map_provider # pylint: disable=protected-access - .get_range_by_partition_key_range_id(container_link, pk_range_id, options)) + epk_range = self.client._routing_map_provider.get_range_by_partition_key_range_id( # pylint: disable=protected-access + container_link, pk_range_id, options + ) if not epk_range: self.global_partition_endpoint_manager_core.log_warn_or_debug( "Illegal state: partition key range cache not initialized correctly. " - "Circuit breaker cannot be performed.") + "Circuit breaker cannot be performed." + ) return None partition_range = Range.PartitionKeyRangeToRange(epk_range) else: self.global_partition_endpoint_manager_core.log_warn_or_debug( "Illegal state: the request does not contain partition information. " - "Circuit breaker cannot be performed.") + "Circuit breaker cannot be performed." + ) return None return PartitionKeyRangeWrapper(partition_range, container_rid) def record_ppcb_failure( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None)-> None: + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: if self.is_circuit_breaker_applicable(request): if pk_range_wrapper is None: pk_range_wrapper = self.create_pk_range_wrapper(request) @@ -106,20 +116,18 @@ def record_ppcb_failure( self.global_partition_endpoint_manager_core.record_failure(request, pk_range_wrapper) def _resolve_service_endpoint_for_partition_circuit_breaker( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] ) -> str: if self.is_circuit_breaker_applicable(request) and pk_range_wrapper: self.global_partition_endpoint_manager_core.check_stale_partition_info(request, pk_range_wrapper) - request = self.global_partition_endpoint_manager_core.add_excluded_locations_to_request(request, - pk_range_wrapper) + request = self.global_partition_endpoint_manager_core.add_excluded_locations_to_request( + request, pk_range_wrapper + ) return self._resolve_service_endpoint(request) def record_ppcb_success( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: if self.is_circuit_breaker_applicable(request): if pk_range_wrapper is None: pk_range_wrapper = self.create_pk_range_wrapper(request) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker_core.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker_core.py index 91fd67805a18..03af531586e2 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker_core.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_circuit_breaker_core.py @@ -21,8 +21,8 @@ # pylint: disable=protected-access -"""Internal class for global endpoint manager for circuit breaker. -""" +"""Internal class for global endpoint manager for circuit breaker.""" + import logging import os @@ -38,6 +38,7 @@ logger = logging.getLogger("azure.cosmos._GlobalPartitionEndpointManagerForCircuitBreakerCore") WARN_LEVEL_LOGGING_THRESHOLD = 10 + class _GlobalPartitionEndpointManagerForCircuitBreakerCore(object): """ This internal class implements the logic for partition endpoint management for @@ -61,66 +62,67 @@ def is_circuit_breaker_applicable(self, request: RequestObject) -> bool: if not request: return False - circuit_breaker_enabled = os.environ.get(Constants.CIRCUIT_BREAKER_ENABLED_CONFIG, - Constants.CIRCUIT_BREAKER_ENABLED_CONFIG_DEFAULT).lower() == "true" + circuit_breaker_enabled = ( + os.environ.get( + Constants.CIRCUIT_BREAKER_ENABLED_CONFIG, Constants.CIRCUIT_BREAKER_ENABLED_CONFIG_DEFAULT + ).lower() + == "true" + ) if not circuit_breaker_enabled and self.client._global_endpoint_manager is not None: if self.client._global_endpoint_manager._database_account_cache is not None: - circuit_breaker_enabled = self.client._global_endpoint_manager._database_account_cache._EnablePerPartitionFailoverBehavior is True # pylint: disable=line-too-long + circuit_breaker_enabled = ( + self.client._global_endpoint_manager._database_account_cache._EnablePerPartitionFailoverBehavior + is True + ) # pylint: disable=line-too-long if not circuit_breaker_enabled: return False - if (not self.location_cache.can_use_multiple_write_locations_for_request(request) - and documents._OperationType.IsWriteOperation(request.operation_type)): # pylint: disable=protected-access + if not self.location_cache.can_use_multiple_write_locations_for_request( + request + ) and documents._OperationType.IsWriteOperation( + request.operation_type + ): # pylint: disable=protected-access return False - if (request.resource_type not in (ResourceType.Document, ResourceType.PartitionKey) - or request.operation_type == documents._OperationType.QueryPlan): # pylint: disable=protected-access + if ( + request.resource_type not in (ResourceType.Document, ResourceType.PartitionKey) + or request.operation_type == documents._OperationType.QueryPlan + ): # pylint: disable=protected-access return False # this is for certain cross partition queries and read all items where we cannot discern partition information - if (HttpHeaders.PartitionKeyRangeID not in request.headers - and HttpHeaders.PartitionKey not in request.headers): + if HttpHeaders.PartitionKeyRangeID not in request.headers and HttpHeaders.PartitionKey not in request.headers: return False return True - def record_failure( - self, - request: RequestObject, - pk_range_wrapper: PartitionKeyRangeWrapper - ) -> None: - #convert operation_type to EndpointOperationType - endpoint_operation_type = (EndpointOperationType.WriteType if ( - documents._OperationType.IsWriteOperation(request.operation_type)) # pylint: disable=protected-access - else EndpointOperationType.ReadType) + def record_failure(self, request: RequestObject, pk_range_wrapper: PartitionKeyRangeWrapper) -> None: + # convert operation_type to EndpointOperationType + endpoint_operation_type = ( + EndpointOperationType.WriteType + if (documents._OperationType.IsWriteOperation(request.operation_type)) # pylint: disable=protected-access + else EndpointOperationType.ReadType + ) location = self.location_cache.get_location_from_endpoint(str(request.location_endpoint_to_route)) self.partition_health_tracker.add_failure(pk_range_wrapper, endpoint_operation_type, str(location)) - def check_stale_partition_info( - self, - request: RequestObject, - pk_range_wrapper: PartitionKeyRangeWrapper - ) -> None: + def check_stale_partition_info(self, request: RequestObject, pk_range_wrapper: PartitionKeyRangeWrapper) -> None: self.partition_health_tracker.check_stale_partition_info(request, pk_range_wrapper) - def add_excluded_locations_to_request( - self, - request: RequestObject, - pk_range_wrapper: PartitionKeyRangeWrapper + self, request: RequestObject, pk_range_wrapper: PartitionKeyRangeWrapper ) -> RequestObject: request.set_excluded_locations_from_circuit_breaker( self.partition_health_tracker.get_unhealthy_locations(request, pk_range_wrapper) ) return request - def record_success( - self, - request: RequestObject, - pk_range_wrapper: PartitionKeyRangeWrapper - ) -> None: - #convert operation_type to either Read or Write - endpoint_operation_type = EndpointOperationType.WriteType if ( - documents._OperationType.IsWriteOperation(request.operation_type)) else EndpointOperationType.ReadType # pylint: disable=protected-access + def record_success(self, request: RequestObject, pk_range_wrapper: PartitionKeyRangeWrapper) -> None: + # convert operation_type to either Read or Write + endpoint_operation_type = ( + EndpointOperationType.WriteType + if (documents._OperationType.IsWriteOperation(request.operation_type)) + else EndpointOperationType.ReadType + ) # pylint: disable=protected-access location = self.location_cache.get_location_from_endpoint(str(request.location_endpoint_to_route)) self.partition_health_tracker.add_success(pk_range_wrapper, endpoint_operation_type, location) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_per_partition_automatic_failover.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_per_partition_automatic_failover.py index 0547cb41df32..22014d78c9b8 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_per_partition_automatic_failover.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_global_partition_endpoint_manager_per_partition_automatic_failover.py @@ -4,6 +4,7 @@ """Class for global endpoint manager for per partition automatic failover. This class inherits the circuit breaker endpoint manager, since enabling per partition automatic failover also enables the circuit breaker logic. """ + import logging import threading import os @@ -12,8 +13,9 @@ from azure.cosmos.http_constants import ResourceType from azure.cosmos._constants import _Constants as Constants -from azure.cosmos._global_partition_endpoint_manager_circuit_breaker import \ - _GlobalPartitionEndpointManagerForCircuitBreaker +from azure.cosmos._global_partition_endpoint_manager_circuit_breaker import ( + _GlobalPartitionEndpointManagerForCircuitBreaker, +) from azure.cosmos._partition_health_tracker import _PPAFPartitionThresholdsTracker from azure.cosmos.documents import _OperationType from azure.cosmos._request_object import RequestObject @@ -26,23 +28,26 @@ logger = logging.getLogger("azure.cosmos._GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover") # pylint: disable=name-too-long, protected-access, too-many-nested-blocks -#cspell:ignore PPAF, ppaf, ppcb +# cspell:ignore PPAF, ppaf, ppcb + class PartitionLevelFailoverInfo: """ Holds information about the partition level regional failover. Used to track the partition key range and the regions where it is available. """ + def __init__(self) -> None: self.unavailable_regional_endpoints: dict[str, "RegionalRoutingContext"] = {} self._lock = threading.Lock() self.current_region: Optional[str] = None def try_move_to_next_location( - self, - available_account_regional_endpoints: dict[str, "RegionalRoutingContext"], - endpoint_region: str, - request: RequestObject) -> bool: + self, + available_account_regional_endpoints: dict[str, "RegionalRoutingContext"], + endpoint_region: str, + request: RequestObject, + ) -> bool: """ Tries to move to the next available regional endpoint for the partition key range. :param dict[str, RegionalRoutingContext] available_account_regional_endpoints: The available regional endpoints @@ -72,11 +77,13 @@ def try_move_to_next_location( return False + class _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover(_GlobalPartitionEndpointManagerForCircuitBreaker): """ This internal class implements the logic for partition endpoint management for geo-replicated database accounts. """ + def __init__(self, client: "CosmosClientConnection") -> None: super(_GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, self).__init__(client) self.partition_range_to_failover_info: dict[PartitionKeyRangeWrapper, PartitionLevelFailoverInfo] = {} @@ -95,8 +102,9 @@ def is_per_partition_automatic_failover_applicable(self, request: RequestObject) if not request: return False - if (self.location_cache.can_use_multiple_write_locations_for_request(request) - or _OperationType.IsReadOnlyOperation(request.operation_type)): + if self.location_cache.can_use_multiple_write_locations_for_request( + request + ) or _OperationType.IsReadOnlyOperation(request.operation_type): return False # if we have at most one region available in the account, we cannot do per partition automatic failover @@ -106,16 +114,15 @@ def is_per_partition_automatic_failover_applicable(self, request: RequestObject) # if the request is not a non-query plan document request # or if the request is not executing a stored procedure, return False - if (request.resource_type != ResourceType.Document and - request.operation_type != _OperationType.ExecuteJavaScript): + if ( + request.resource_type != ResourceType.Document + and request.operation_type != _OperationType.ExecuteJavaScript + ): return False return True - def try_ppaf_failover_threshold( - self, - pk_range_wrapper: "PartitionKeyRangeWrapper", - request: "RequestObject"): + def try_ppaf_failover_threshold(self, pk_range_wrapper: "PartitionKeyRangeWrapper", request: "RequestObject"): """Verifies whether the per-partition failover threshold has been reached for consecutive errors. If so, it marks the current region as unavailable for the given partition key range, and moves to the next available region for the request. @@ -128,32 +135,36 @@ def try_ppaf_failover_threshold( # If PPAF is enabled, we track consecutive failures for certain exceptions, and only fail over at a partition # level after the threshold is reached if request and self.is_per_partition_automatic_failover_applicable(request): - if (self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) - >= int(os.environ.get(Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, - Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT))): + if self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) >= int( + os.environ.get(Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT) + ): # If the PPAF threshold is reached, we reset the count and mark the endpoint unavailable # Once we mark the endpoint unavailable, the PPAF endpoint manager will try to move to the next # available region for the partition key range with self._threshold_lock: # Check for count again, since a previous request may have now reset the count - if (self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) - >= int(os.environ.get(Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, - Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT))): + if self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) >= int( + os.environ.get( + Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT + ) + ): self.ppaf_thresholds_tracker.clear_pk_failures(pk_range_wrapper) partition_level_info = self.partition_range_to_failover_info[pk_range_wrapper] location = self.location_cache.get_location_from_endpoint( - str(request.location_endpoint_to_route)) - logger.warning("PPAF - Failover threshold reached for partition key range: %s for region: %s", #pylint: disable=line-too-long - pk_range_wrapper, location) - regional_context = (self.location_cache. - account_read_regional_routing_contexts_by_location. - get(location).primary_endpoint) + str(request.location_endpoint_to_route) + ) + logger.warning( + "PPAF - Failover threshold reached for partition key range: %s for region: %s", # pylint: disable=line-too-long + pk_range_wrapper, + location, + ) + regional_context = self.location_cache.account_read_regional_routing_contexts_by_location.get( + location + ).primary_endpoint partition_level_info.unavailable_regional_endpoints[location] = regional_context def resolve_service_endpoint_for_partition( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] ) -> str: """Resolves the endpoint to be used for the request. In a PPAF-enabled account, this method checks whether the partition key range has any unavailable regions, and if so, it tries to move to the next available region. @@ -173,20 +184,29 @@ def resolve_service_endpoint_for_partition( if request.location_endpoint_to_route is not None: endpoint_region = self.location_cache.get_location_from_endpoint(request.location_endpoint_to_route) if endpoint_region in partition_failover_info.unavailable_regional_endpoints: - available_account_regional_endpoints = self.location_cache.account_read_regional_routing_contexts_by_location #pylint: disable=line-too-long - if (partition_failover_info.current_region is not None and - endpoint_region != partition_failover_info.current_region): + available_account_regional_endpoints = ( + self.location_cache.account_read_regional_routing_contexts_by_location + ) # pylint: disable=line-too-long + if ( + partition_failover_info.current_region is not None + and endpoint_region != partition_failover_info.current_region + ): # this request has not yet seen there's an available region being used for this partition regional_endpoint = available_account_regional_endpoints[ - partition_failover_info.current_region].primary_endpoint + partition_failover_info.current_region + ].primary_endpoint request.route_to_location(regional_endpoint) else: - if (len(self.location_cache.account_read_regional_routing_contexts_by_location) - == len(partition_failover_info.unavailable_regional_endpoints)): + if len(self.location_cache.account_read_regional_routing_contexts_by_location) == len( + partition_failover_info.unavailable_regional_endpoints + ): # If no other region is available, we invalidate the cache and start once again # from our main write region in the account configurations - logger.warning("PPAF - All available regions for partition %s are unavailable." - " Refreshing cache.", pk_range_wrapper) + logger.warning( + "PPAF - All available regions for partition %s are unavailable." + " Refreshing cache.", + pk_range_wrapper, + ) self.partition_range_to_failover_info[pk_range_wrapper] = PartitionLevelFailoverInfo() request.clear_route_to_location() else: @@ -194,21 +214,21 @@ def resolve_service_endpoint_for_partition( partition_failover_info.try_move_to_next_location( self.location_cache.account_read_regional_routing_contexts_by_location, endpoint_region, - request) + request, + ) else: # Update the current regional endpoint to whatever the request is routing to partition_failover_info.current_region = endpoint_region else: partition_failover_info = PartitionLevelFailoverInfo() - endpoint_region = self.location_cache.get_location_from_endpoint( - request.location_endpoint_to_route) + endpoint_region = self.location_cache.get_location_from_endpoint(request.location_endpoint_to_route) partition_failover_info.current_region = endpoint_region self.partition_range_to_failover_info[pk_range_wrapper] = partition_failover_info return self._resolve_service_endpoint_for_partition_circuit_breaker(request, pk_range_wrapper) - def record_failure(self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + def record_failure( + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: """Records a failure for the given partition key range and request. :param RequestObject request: The request object containing the routing context. :param PartitionKeyRangeWrapper pk_range_wrapper: The wrapper containing the partition key range information @@ -223,9 +243,9 @@ def record_failure(self, else: self.record_ppcb_failure(request, pk_range_wrapper) - def record_success(self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + def record_success( + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: """Records a success for the given partition key range and request, effectively clearing the failure count. :param RequestObject request: The request object containing the routing context. :param PartitionKeyRangeWrapper pk_range_wrapper: The wrapper containing the partition key range information diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_gone_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_gone_retry_policy.py index d9b27e97403a..ee515e163c5f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_gone_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_gone_retry_policy.py @@ -23,7 +23,6 @@ Cosmos database service. """ - # pylint: disable=protected-access diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_health_check_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_health_check_retry_policy.py index 955ab7a31994..cbc625e4e8e0 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_health_check_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_health_check_retry_policy.py @@ -22,6 +22,7 @@ """Internal class for health check retry policy implementation in the Azure Cosmos database service. """ + import os from azure.cosmos import _constants @@ -31,21 +32,25 @@ class HealthCheckRetryPolicy(object): def __init__(self, connection_policy, *args): self.retry_count = 0 - self.retry_after_in_milliseconds = int(os.getenv( - _constants._Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS, - str(_constants._Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT) - )) - self.max_retry_attempt_count = int(os.getenv( - _constants._Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES, - str(_constants._Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT) - )) + self.retry_after_in_milliseconds = int( + os.getenv( + _constants._Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS, + str(_constants._Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT), + ) + ) + self.max_retry_attempt_count = int( + os.getenv( + _constants._Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES, + str(_constants._Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT), + ) + ) self.connection_policy = connection_policy self.retry_factor = 2 self.max_retry_after_in_milliseconds = 1000 * 60 * 3 # 3 minutes self.initial_connection_timeout = 5 self.request = args[0] if args else None - def ShouldRetry(self, exception):# pylint: disable=unused-argument + def ShouldRetry(self, exception): # pylint: disable=unused-argument """ Determines if the given exception is transient and if a retry should be attempted. @@ -55,18 +60,19 @@ def ShouldRetry(self, exception):# pylint: disable=unused-argument :rtype: bool """ if self.retry_count > 0: - self.retry_after_in_milliseconds = min(self.retry_after_in_milliseconds + - self.retry_factor ** self.retry_count, - self.max_retry_after_in_milliseconds) + self.retry_after_in_milliseconds = min( + self.retry_after_in_milliseconds + self.retry_factor**self.retry_count, + self.max_retry_after_in_milliseconds, + ) if self.request: # increase read timeout for each retry if self.request.read_timeout_override: - self.request.read_timeout_override = min(self.request.read_timeout_override ** 2, - self.connection_policy.ReadTimeout) + self.request.read_timeout_override = min( + self.request.read_timeout_override**2, self.connection_policy.ReadTimeout + ) else: self.request.read_timeout_override = self.initial_connection_timeout - if self.retry_count < self.max_retry_attempt_count: self.retry_count += 1 return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py index 29e49217fb02..a963849f9fc1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_inference_service.py @@ -27,9 +27,16 @@ from azure.core import PipelineClient from azure.core.exceptions import DecodeError, ServiceRequestError, ServiceResponseError -from azure.core.pipeline.policies import (ContentDecodePolicy, CustomHookPolicy, DistributedTracingPolicy, - HeadersPolicy, HTTPPolicy, NetworkTraceLoggingPolicy, ProxyPolicy, - UserAgentPolicy) +from azure.core.pipeline.policies import ( + ContentDecodePolicy, + CustomHookPolicy, + DistributedTracingPolicy, + HeadersPolicy, + HTTPPolicy, + NetworkTraceLoggingPolicy, + ProxyPolicy, + UserAgentPolicy, +) from azure.core.pipeline.transport import HttpRequest from azure.core.utils import CaseInsensitiveDict @@ -41,7 +48,6 @@ from ._retry_utility import ConnectionRetryPolicy from .http_constants import HttpHeaders - # cspell:ignore rerank reranker reranking # pylint: disable=protected-access,line-too-long @@ -89,17 +95,21 @@ def _create_inference_pipeline_client(self) -> PipelineClient: retry_policy = None if isinstance(connection_policy.ConnectionRetryConfiguration, HTTPPolicy): retry_policy = ConnectionRetryPolicy( - retry_total=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_total', - self.TOTAL_RETRIES), - retry_connect=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_connect', None), - retry_read=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_read', None), - retry_status=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_status', None), - retry_backoff_max=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_backoff_max', - self.RETRY_BACKOFF_MAX), - retry_on_status_codes=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_on_status_codes', - self.RETRY_AFTER_STATUS_CODES), - retry_backoff_factor=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_backoff_factor', - self.RETRY_BACKOFF_FACTOR) + retry_total=getattr(connection_policy.ConnectionRetryConfiguration, "retry_total", self.TOTAL_RETRIES), + retry_connect=getattr(connection_policy.ConnectionRetryConfiguration, "retry_connect", None), + retry_read=getattr(connection_policy.ConnectionRetryConfiguration, "retry_read", None), + retry_status=getattr(connection_policy.ConnectionRetryConfiguration, "retry_status", None), + retry_backoff_max=getattr( + connection_policy.ConnectionRetryConfiguration, "retry_backoff_max", self.RETRY_BACKOFF_MAX + ), + retry_on_status_codes=getattr( + connection_policy.ConnectionRetryConfiguration, + "retry_on_status_codes", + self.RETRY_AFTER_STATUS_CODES, + ), + retry_backoff_factor=getattr( + connection_policy.ConnectionRetryConfiguration, "retry_backoff_factor", self.RETRY_BACKOFF_FACTOR + ), ) elif isinstance(connection_policy.ConnectionRetryConfiguration, int): retry_policy = ConnectionRetryPolicy(total=connection_policy.ConnectionRetryConfiguration) @@ -112,11 +122,12 @@ def _create_inference_pipeline_client(self) -> PipelineClient: retry_status=connection_policy.ConnectionRetryConfiguration.status, retry_backoff_max=connection_policy.ConnectionRetryConfiguration.DEFAULT_BACKOFF_MAX, retry_on_status_codes=list(connection_policy.ConnectionRetryConfiguration.status_forcelist), - retry_backoff_factor=connection_policy.ConnectionRetryConfiguration.backoff_factor + retry_backoff_factor=connection_policy.ConnectionRetryConfiguration.backoff_factor, ) else: raise TypeError( - "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry") + "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry" + ) proxies = {} if connection_policy.ProxyConfiguration and connection_policy.ProxyConfiguration.Host: @@ -141,10 +152,7 @@ def _create_inference_pipeline_client(self) -> PipelineClient: ), ] - return PipelineClient( - base_url=self._inference_endpoint, - policies=policies - ) + return PipelineClient(base_url=self._inference_endpoint, policies=policies) def rerank( self, @@ -181,15 +189,13 @@ def rerank( if semantic_reranking_options: body.update(semantic_reranking_options) - headers = { - HttpHeaders.ContentType: "application/json" - } + headers = {HttpHeaders.ContentType: "application/json"} request = HttpRequest( method="POST", url=self._inference_endpoint, headers=headers, - data=json.dumps(body, separators=(",", ":")) + data=json.dumps(body, separators=(",", ":")), ) pipeline_response = self._inference_pipeline_client._pipeline.run( @@ -213,22 +219,18 @@ def rerank( result = json.loads(data) except Exception as e: raise DecodeError( - message="Failed to decode JSON data: {}".format(e), - response=response, - error=e) from e + message="Failed to decode JSON data: {}".format(e), response=response, error=e + ) from e return CosmosDict(result, response_headers=response_headers) except (ServiceRequestError, ServiceResponseError) as e: raise exceptions.CosmosHttpResponseError( - status_code=408, - message="Inference Service Request Timeout", - response=None + status_code=408, message="Inference Service Request Timeout", response=None ) from e except Exception as e: if isinstance(e, (exceptions.CosmosHttpResponseError, exceptions.CosmosResourceNotFoundError)): raise raise exceptions.CosmosHttpResponseError( - message=f"Semantic reranking failed: {str(e)}", - response=None + message=f"Semantic reranking failed: {str(e)}", response=None ) from e diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py index ef498a27b82a..7fbe9e6103c6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_location_cache.py @@ -22,6 +22,7 @@ """Implements the abstraction to resolve target location for geo-replicated DatabaseAccount with multiple writable and readable locations. """ + import collections import logging from typing import Optional @@ -37,11 +38,13 @@ logger = logging.getLogger("azure.cosmos.LocationCache") + class EndpointOperationType(object): NoneType = "None" ReadType = "Read" WriteType = "Write" + class RegionalRoutingContext(object): def __init__(self, primary_endpoint: str): self.primary_endpoint: str = primary_endpoint @@ -58,6 +61,7 @@ def __eq__(self, other): def __str__(self): return "Primary: " + self.primary_endpoint + def get_regional_routing_contexts_by_loc(new_locations: list[dict[str, str]]): # construct from previous object regional_routing_contexts_by_location: OrderedDict[str, RegionalRoutingContext] = collections.OrderedDict() @@ -82,17 +86,21 @@ def get_regional_routing_contexts_by_loc(new_locations: list[dict[str, str]]): return regional_routing_contexts_by_location, locations_by_endpoints, parsed_locations + def _get_health_check_endpoints(regional_routing_contexts) -> Set[str]: # should use the endpoints in the order returned from gateway and only the ones specified in preferred locations preferred_endpoints = {context.get_primary() for context in regional_routing_contexts} return preferred_endpoints -def _get_applicable_regional_routing_contexts(regional_routing_contexts: list[RegionalRoutingContext], - location_name_by_endpoint: Mapping[str, str], - fall_back_regional_routing_context: RegionalRoutingContext, - exclude_location_list: list[str], - circuit_breaker_exclude_list: list[str], - resource_type: str) -> list[RegionalRoutingContext]: + +def _get_applicable_regional_routing_contexts( + regional_routing_contexts: list[RegionalRoutingContext], + location_name_by_endpoint: Mapping[str, str], + fall_back_regional_routing_context: RegionalRoutingContext, + exclude_location_list: list[str], + circuit_breaker_exclude_list: list[str], + resource_type: str, +) -> list[RegionalRoutingContext]: """Filters and reorders regional endpoints based on exclusion lists and health. This method separates the initial list of endpoints into two groups: those the user has explicitly excluded @@ -152,6 +160,7 @@ def _get_applicable_regional_routing_contexts(regional_routing_contexts: list[Re return final_applicable_contexts + class LocationCache(object): # pylint: disable=too-many-public-methods,too-many-instance-attributes def __init__( @@ -166,10 +175,14 @@ def __init__( self.read_regional_routing_contexts: list[RegionalRoutingContext] = [self.default_regional_routing_context] self.location_unavailability_info_by_endpoint: dict[str, dict[str, Set[EndpointOperationType]]] = {} self.last_cache_update_time_stamp: int = 0 - self.account_read_regional_routing_contexts_by_location: dict[str, RegionalRoutingContext] = {} # pylint: disable=name-too-long - self.account_write_regional_routing_contexts_by_location: dict[str, RegionalRoutingContext] = {} # pylint: disable=name-too-long - self.account_locations_by_read_endpoints: dict[str, str] = {} # pylint: disable=name-too-long - self.account_locations_by_write_endpoints: dict[str, str] = {} # pylint: disable=name-too-long + self.account_read_regional_routing_contexts_by_location: dict[str, RegionalRoutingContext] = ( + {} + ) # pylint: disable=name-too-long + self.account_write_regional_routing_contexts_by_location: dict[str, RegionalRoutingContext] = ( + {} + ) # pylint: disable=name-too-long + self.account_locations_by_read_endpoints: dict[str, str] = {} # pylint: disable=name-too-long + self.account_locations_by_write_endpoints: dict[str, str] = {} # pylint: disable=name-too-long self.account_write_locations: list[str] = [] self.account_read_locations: list[str] = [] self.connection_policy: ConnectionPolicy = connection_policy @@ -205,10 +218,7 @@ def perform_on_database_account_read(self, database_account): ) def get_all_write_endpoints(self) -> Set[str]: - return { - context.get_primary() - for context in self.get_write_regional_routing_contexts() - } + return {context.get_primary() for context in self.get_write_regional_routing_contexts()} def get_ordered_write_locations(self): return self.account_write_locations @@ -241,7 +251,8 @@ def _get_applicable_read_regional_routing_contexts(self, request: RequestObject) self.get_write_regional_routing_contexts()[0], excluded_locations, request.excluded_locations_circuit_breaker or [], - request.resource_type) + request.resource_type, + ) # Else, return all regional endpoints return self.get_read_regional_routing_contexts() @@ -258,7 +269,8 @@ def _get_applicable_write_regional_routing_contexts(self, request: RequestObject self.default_regional_routing_context, excluded_locations, request.excluded_locations_circuit_breaker or [], - request.resource_type) + request.resource_type, + ) # Else, return all regional endpoints return self.get_write_regional_routing_contexts() @@ -290,8 +302,11 @@ def _resolve_endpoint_without_preferred_locations(self, request, is_write, locat :rtype: str """ ordered_locations = self.account_write_locations if is_write else self.account_read_locations - all_contexts_by_loc = (self.account_write_regional_routing_contexts_by_location if is_write - else self.account_read_regional_routing_contexts_by_location) + all_contexts_by_loc = ( + self.account_write_regional_routing_contexts_by_location + if is_write + else self.account_read_regional_routing_contexts_by_location + ) # Safety check: if endpoint discovery is off or location cache isn't populated, fallback. if not self.connection_policy.EnableEndpointDiscovery or not ordered_locations: @@ -361,9 +376,7 @@ def resolve_service_endpoint(self, request): is_write = documents._OperationType.IsWriteOperation(request.operation_type) - if not use_preferred_locations or ( - is_write and not self.can_use_multiple_write_locations_for_request(request) - ): + if not use_preferred_locations or (is_write and not self.can_use_multiple_write_locations_for_request(request)): return self._resolve_endpoint_without_preferred_locations(request, is_write, location_index) regional_routing_contexts = ( @@ -380,17 +393,25 @@ def should_refresh_endpoints(self): # pylint: disable=too-many-return-statement # we should schedule refresh in background if we are unable to target the user's most preferredLocation. if self.connection_policy.EnableEndpointDiscovery: - should_refresh = (self.connection_policy.UseMultipleWriteLocations - and not self.enable_multiple_writable_locations) - - if (most_preferred_location and most_preferred_location in - self.account_read_regional_routing_contexts_by_location): - if (self.account_read_regional_routing_contexts_by_location - and most_preferred_location in self.account_read_regional_routing_contexts_by_location): - most_preferred_read_endpoint = ( - self.account_read_regional_routing_contexts_by_location)[most_preferred_location] - if (most_preferred_read_endpoint and - most_preferred_read_endpoint != self.read_regional_routing_contexts[0]): + should_refresh = ( + self.connection_policy.UseMultipleWriteLocations and not self.enable_multiple_writable_locations + ) + + if ( + most_preferred_location + and most_preferred_location in self.account_read_regional_routing_contexts_by_location + ): + if ( + self.account_read_regional_routing_contexts_by_location + and most_preferred_location in self.account_read_regional_routing_contexts_by_location + ): + most_preferred_read_endpoint = (self.account_read_regional_routing_contexts_by_location)[ + most_preferred_location + ] + if ( + most_preferred_read_endpoint + and most_preferred_read_endpoint != self.read_regional_routing_contexts[0] + ): # For reads, we can always refresh in background as we can alternate to # other available read endpoints return True @@ -398,17 +419,21 @@ def should_refresh_endpoints(self): # pylint: disable=too-many-return-statement return True if not self.can_use_multiple_write_locations(): - if self.is_endpoint_unavailable(self.write_regional_routing_contexts[0].get_primary(), - EndpointOperationType.WriteType): + if self.is_endpoint_unavailable( + self.write_regional_routing_contexts[0].get_primary(), EndpointOperationType.WriteType + ): # same logic as other # Since most preferred write endpoint is unavailable, we can only refresh in background if # we have an alternate write endpoint return True return should_refresh - if (most_preferred_location and - most_preferred_location in self.account_write_regional_routing_contexts_by_location): - most_preferred_write_regional_endpoint = ( - self.account_write_regional_routing_contexts_by_location)[most_preferred_location] + if ( + most_preferred_location + and most_preferred_location in self.account_write_regional_routing_contexts_by_location + ): + most_preferred_write_regional_endpoint = (self.account_write_regional_routing_contexts_by_location)[ + most_preferred_location + ] if most_preferred_write_regional_endpoint: should_refresh |= most_preferred_write_regional_endpoint != self.write_regional_routing_contexts[0] return should_refresh @@ -434,12 +459,15 @@ def is_endpoint_unavailable(self, endpoint: str, expected_available_operation: s return True def mark_endpoint_unavailable( - self, unavailable_endpoint: str, unavailable_operation_type: EndpointOperationType, refresh_cache: bool, - context: str): - logger.warning("Marking %s unavailable for %s. Source: %s", - unavailable_endpoint, - unavailable_operation_type, - context) + self, + unavailable_endpoint: str, + unavailable_operation_type: EndpointOperationType, + refresh_cache: bool, + context: str, + ): + logger.warning( + "Marking %s unavailable for %s. Source: %s", unavailable_endpoint, unavailable_operation_type, context + ) unavailability_info = ( self.location_unavailability_info_by_endpoint[unavailable_endpoint] if unavailable_endpoint in self.location_unavailability_info_by_endpoint @@ -467,14 +495,18 @@ def update_location_cache(self, write_locations=None, read_locations=None, enabl if self.connection_policy.EnableEndpointDiscovery: if read_locations: - (self.account_read_regional_routing_contexts_by_location, - self.account_locations_by_read_endpoints, - self.account_read_locations) = get_regional_routing_contexts_by_loc(read_locations) + ( + self.account_read_regional_routing_contexts_by_location, + self.account_locations_by_read_endpoints, + self.account_read_locations, + ) = get_regional_routing_contexts_by_loc(read_locations) if write_locations: - (self.account_write_regional_routing_contexts_by_location, - self.account_locations_by_write_endpoints, - self.account_write_locations) = get_regional_routing_contexts_by_loc(write_locations) + ( + self.account_write_regional_routing_contexts_by_location, + self.account_locations_by_write_endpoints, + self.account_write_locations, + ) = get_regional_routing_contexts_by_loc(write_locations) # if preferred locations is empty and the default endpoint is a global endpoint, # we should use the read locations from gateway as effective preferred locations @@ -489,13 +521,13 @@ def update_location_cache(self, write_locations=None, read_locations=None, enabl self.account_write_regional_routing_contexts_by_location, self.account_write_locations, EndpointOperationType.WriteType, - self.default_regional_routing_context + self.default_regional_routing_context, ) self.read_regional_routing_contexts = self.get_preferred_regional_routing_contexts( self.account_read_regional_routing_contexts_by_location, self.account_read_locations, EndpointOperationType.ReadType, - self.write_regional_routing_contexts[0] + self.write_regional_routing_contexts[0], ) def get_preferred_regional_routing_contexts( @@ -504,7 +536,9 @@ def get_preferred_regional_routing_contexts( regional_endpoints = [] # if enableEndpointDiscovery is false, we always use the defaultEndpoint that # user passed in during documentClient init - if self.connection_policy.EnableEndpointDiscovery and endpoints_by_location: # pylint: disable=too-many-nested-blocks + if ( + self.connection_policy.EnableEndpointDiscovery and endpoints_by_location + ): # pylint: disable=too-many-nested-blocks if ( self.can_use_multiple_write_locations() or expected_available_operation == EndpointOperationType.ReadType @@ -518,8 +552,9 @@ def get_preferred_regional_routing_contexts( for location in self.effective_preferred_locations: regional_endpoint = endpoints_by_location.get(location) if regional_endpoint: - if self.is_endpoint_unavailable(regional_endpoint.get_primary(), - expected_available_operation): + if self.is_endpoint_unavailable( + regional_endpoint.get_primary(), expected_available_operation + ): unavailable_endpoints.append(regional_endpoint) else: regional_endpoints.append(regional_endpoint) @@ -572,8 +607,8 @@ def endpoints_to_health_check(self) -> Set[str]: health_check_endpoints = _get_health_check_endpoints(self.read_regional_routing_contexts) # add first write endpoint in case that the write region is not in preferred locations health_check_endpoints = health_check_endpoints.union( - _get_health_check_endpoints(self.write_regional_routing_contexts[:1] - )) + _get_health_check_endpoints(self.write_regional_routing_contexts[:1]) + ) return health_check_endpoints diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py index ccb79401a107..739c37486ace 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition.py @@ -25,16 +25,14 @@ class Partition(object): - """A class that holds the hash value and node name for a partition. - """ + """A class that holds the hash value and node name for a partition.""" def __init__(self, hash_value=None, node=None): self.hash_value = hash_value self.node = node def GetNode(self): - """Gets the name of the node(collection) for this object. - """ + """Gets the name of the node(collection) for this object.""" return self.node def __eq__(self, other): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_partition_health_tracker.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition_health_tracker.py index 50f4c79bceb4..6c1d4c01b25d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_partition_health_tracker.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_partition_health_tracker.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for partition health tracker for circuit breaker. -""" +"""Internal class for partition health tracker for circuit breaker.""" + import logging import threading import os @@ -32,9 +32,9 @@ from ._constants import _Constants as Constants MINIMUM_REQUESTS_FOR_FAILURE_RATE = 100 -MAX_UNAVAILABLE_TIME_MS = 1200 * 1000 # 20 minutes in milliseconds -REFRESH_INTERVAL_MS = 60 * 1000 # 1 minute in milliseconds -INITIAL_UNAVAILABLE_TIME_MS = 60 * 1000 # 1 minute in milliseconds +MAX_UNAVAILABLE_TIME_MS = 1200 * 1000 # 20 minutes in milliseconds +REFRESH_INTERVAL_MS = 60 * 1000 # 1 minute in milliseconds +INITIAL_UNAVAILABLE_TIME_MS = 60 * 1000 # 1 minute in milliseconds # partition is unhealthy if sdk tried to recover and failed UNHEALTHY = "unhealthy" # partition is unhealthy tentative when it initially marked unavailable @@ -44,7 +44,8 @@ LAST_UNAVAILABILITY_CHECK_TIME_STAMP = "lastUnavailabilityCheckTimeStamp" HEALTH_STATUS = "healthStatus" -#cspell:ignore PPAF +# cspell:ignore PPAF + class _PartitionHealthInfo(object): """ @@ -67,51 +68,56 @@ def reset_failure_rate_health_stats(self) -> None: self.read_success_count = 0 def transition_health_status(self, target_health_status: str, curr_time: int) -> None: - if target_health_status == UNHEALTHY : + if target_health_status == UNHEALTHY: self.unavailability_info[HEALTH_STATUS] = UNHEALTHY # reset the last unavailability check time stamp - self.unavailability_info[UNAVAILABLE_INTERVAL] = \ - min(self.unavailability_info[UNAVAILABLE_INTERVAL] * 2, - MAX_UNAVAILABLE_TIME_MS) - self.unavailability_info[LAST_UNAVAILABILITY_CHECK_TIME_STAMP] \ - = curr_time - elif target_health_status == UNHEALTHY_TENTATIVE : + self.unavailability_info[UNAVAILABLE_INTERVAL] = min( + self.unavailability_info[UNAVAILABLE_INTERVAL] * 2, MAX_UNAVAILABLE_TIME_MS + ) + self.unavailability_info[LAST_UNAVAILABILITY_CHECK_TIME_STAMP] = curr_time + elif target_health_status == UNHEALTHY_TENTATIVE: self.unavailability_info = { LAST_UNAVAILABILITY_CHECK_TIME_STAMP: curr_time, UNAVAILABLE_INTERVAL: INITIAL_UNAVAILABLE_TIME_MS, - HEALTH_STATUS: UNHEALTHY_TENTATIVE + HEALTH_STATUS: UNHEALTHY_TENTATIVE, } def __str__(self) -> str: - return (f"{self.__class__.__name__}: {self.unavailability_info}\n" - f"write failure count: {self.write_failure_count}\n" - f"read failure count: {self.read_failure_count}\n" - f"write success count: {self.write_success_count}\n" - f"read success count: {self.read_success_count}\n" - f"write consecutive failure count: {self.write_consecutive_failure_count}\n" - f"read consecutive failure count: {self.read_consecutive_failure_count}\n") + return ( + f"{self.__class__.__name__}: {self.unavailability_info}\n" + f"write failure count: {self.write_failure_count}\n" + f"read failure count: {self.read_failure_count}\n" + f"write success count: {self.write_success_count}\n" + f"read success count: {self.read_success_count}\n" + f"write consecutive failure count: {self.write_consecutive_failure_count}\n" + f"read consecutive failure count: {self.read_consecutive_failure_count}\n" + ) + def _has_exceeded_failure_rate_threshold( - successes: int, - failures: int, - failure_rate_threshold: int, + successes: int, + failures: int, + failure_rate_threshold: int, ) -> bool: if successes + failures < MINIMUM_REQUESTS_FOR_FAILURE_RATE: return False failure_rate = failures / (failures + successes) * 100 return failure_rate >= failure_rate_threshold + def _should_mark_healthy_tentative(partition_health_info: _PartitionHealthInfo, curr_time: int) -> bool: - elapsed_time = (curr_time - - partition_health_info.unavailability_info[LAST_UNAVAILABILITY_CHECK_TIME_STAMP]) + elapsed_time = curr_time - partition_health_info.unavailability_info[LAST_UNAVAILABILITY_CHECK_TIME_STAMP] current_health_status = partition_health_info.unavailability_info[HEALTH_STATUS] stale_partition_unavailability_check = partition_health_info.unavailability_info[UNAVAILABLE_INTERVAL] # check if the partition key range is still unavailable - return ((current_health_status == UNHEALTHY and elapsed_time > stale_partition_unavailability_check) - or (current_health_status == UNHEALTHY_TENTATIVE and elapsed_time > INITIAL_UNAVAILABLE_TIME_MS)) + return (current_health_status == UNHEALTHY and elapsed_time > stale_partition_unavailability_check) or ( + current_health_status == UNHEALTHY_TENTATIVE and elapsed_time > INITIAL_UNAVAILABLE_TIME_MS + ) + logger = logging.getLogger("azure.cosmos._PartitionHealthTracker") + class _PartitionHealthTracker(object): """ This internal class implements the logic for tracking health thresholds for a partition. @@ -123,20 +129,14 @@ def __init__(self) -> None: self.last_refresh = current_time_millis() self.stale_partition_lock = threading.Lock() - def _transition_health_status_on_failure( - self, - pk_range_wrapper: PartitionKeyRangeWrapper, - location: str - ) -> None: + def _transition_health_status_on_failure(self, pk_range_wrapper: PartitionKeyRangeWrapper, location: str) -> None: logger.warning("%s has been marked as unavailable.", pk_range_wrapper) current_time = current_time_millis() if pk_range_wrapper not in self.pk_range_wrapper_to_health_info: # healthy -> unhealthy tentative partition_health_info = _PartitionHealthInfo() partition_health_info.transition_health_status(UNHEALTHY_TENTATIVE, current_time) - self.pk_range_wrapper_to_health_info[pk_range_wrapper] = { - location: partition_health_info - } + self.pk_range_wrapper_to_health_info[pk_range_wrapper] = {location: partition_health_info} else: region_to_partition_health = self.pk_range_wrapper_to_health_info[pk_range_wrapper] if location in region_to_partition_health and region_to_partition_health[location].unavailability_info: @@ -150,20 +150,12 @@ def _transition_health_status_on_failure( partition_health_info.transition_health_status(UNHEALTHY_TENTATIVE, current_time) self.pk_range_wrapper_to_health_info[pk_range_wrapper][location] = partition_health_info - def _transition_health_status_on_success( - self, - pk_range_wrapper: PartitionKeyRangeWrapper, - location: str - ) -> None: + def _transition_health_status_on_success(self, pk_range_wrapper: PartitionKeyRangeWrapper, location: str) -> None: if pk_range_wrapper in self.pk_range_wrapper_to_health_info: # healthy tentative -> healthy self.pk_range_wrapper_to_health_info[pk_range_wrapper][location].unavailability_info = {} - def check_stale_partition_info( - self, - request: RequestObject, - pk_range_wrapper: PartitionKeyRangeWrapper - ) -> None: + def check_stale_partition_info(self, request: RequestObject, pk_range_wrapper: PartitionKeyRangeWrapper) -> None: current_time = current_time_millis() if pk_range_wrapper in self.pk_range_wrapper_to_health_info: @@ -174,10 +166,12 @@ def check_stale_partition_info( # only one request should be used to recover with self.stale_partition_lock: if _should_mark_healthy_tentative(partition_health_info, current_time): - logger.debug("Attempting recovery for %s in %s where health info is %s.", - pk_range_wrapper, - location, - partition_health_info) + logger.debug( + "Attempting recovery for %s in %s where health info is %s.", + pk_range_wrapper, + location, + partition_health_info, + ) # this will trigger one attempt to recover partition_health_info.transition_health_status(UNHEALTHY, current_time) request.healthy_tentative_location = location @@ -187,31 +181,23 @@ def check_stale_partition_info( self._reset_partition_health_tracker_stats() self.last_refresh = current_time - - def get_unhealthy_locations( - self, - request: RequestObject, - pk_range_wrapper: PartitionKeyRangeWrapper - ) -> list[str]: + def get_unhealthy_locations(self, request: RequestObject, pk_range_wrapper: PartitionKeyRangeWrapper) -> list[str]: unhealthy_locations = [] if pk_range_wrapper in self.pk_range_wrapper_to_health_info: for location, partition_health_info in self.pk_range_wrapper_to_health_info[pk_range_wrapper].items(): - if (partition_health_info.unavailability_info and - not (request.healthy_tentative_location and request.healthy_tentative_location == location)): + if partition_health_info.unavailability_info and not ( + request.healthy_tentative_location and request.healthy_tentative_location == location + ): health_status = partition_health_info.unavailability_info[HEALTH_STATUS] - if health_status in (UNHEALTHY_TENTATIVE, UNHEALTHY) : + if health_status in (UNHEALTHY_TENTATIVE, UNHEALTHY): unhealthy_locations.append(location) return unhealthy_locations - def add_failure( - self, - pk_range_wrapper: PartitionKeyRangeWrapper, - operation_type: str, - location: str - ) -> None: + def add_failure(self, pk_range_wrapper: PartitionKeyRangeWrapper, operation_type: str, location: str) -> None: # Retrieve the failure rate threshold from the environment. - failure_rate_threshold = int(os.environ.get(Constants.FAILURE_PERCENTAGE_TOLERATED, - Constants.FAILURE_PERCENTAGE_TOLERATED_DEFAULT)) + failure_rate_threshold = int( + os.environ.get(Constants.FAILURE_PERCENTAGE_TOLERATED, Constants.FAILURE_PERCENTAGE_TOLERATED_DEFAULT) + ) # Ensure that the health info dictionary is properly initialized. if pk_range_wrapper not in self.pk_range_wrapper_to_health_info: @@ -223,15 +209,15 @@ def add_failure( # Determine attribute names and environment variables based on the operation type. if operation_type == EndpointOperationType.WriteType: - success_attr = 'write_success_count' - failure_attr = 'write_failure_count' - consecutive_attr = 'write_consecutive_failure_count' + success_attr = "write_success_count" + failure_attr = "write_failure_count" + consecutive_attr = "write_consecutive_failure_count" env_key = Constants.CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_WRITE default_consecutive_threshold = Constants.CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_WRITE_DEFAULT else: - success_attr = 'read_success_count' - failure_attr = 'read_failure_count' - consecutive_attr = 'read_consecutive_failure_count' + success_attr = "read_success_count" + failure_attr = "read_failure_count" + consecutive_attr = "read_consecutive_failure_count" env_key = Constants.CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_READ default_consecutive_threshold = Constants.CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_READ_DEFAULT @@ -242,10 +228,12 @@ def add_failure( # Retrieve the consecutive failure threshold from the environment. consecutive_failure_threshold = int(os.environ.get(env_key, default_consecutive_threshold)) # log the current stats - logger.debug("Failure for partition %s in location %s has %s", - pk_range_wrapper, - location, - self.pk_range_wrapper_to_health_info[pk_range_wrapper][location]) + logger.debug( + "Failure for partition %s in location %s has %s", + pk_range_wrapper, + location, + self.pk_range_wrapper_to_health_info[pk_range_wrapper][location], + ) # Call the threshold checker with the current stats. self._check_thresholds( @@ -255,25 +243,21 @@ def add_failure( getattr(health_info, consecutive_attr), location, failure_rate_threshold, - consecutive_failure_threshold + consecutive_failure_threshold, ) def _check_thresholds( - self, - pk_range_wrapper: PartitionKeyRangeWrapper, - successes: int, - failures: int, - consecutive_failures: int, - location: str, - failure_rate_threshold: int, - consecutive_failure_threshold: int, + self, + pk_range_wrapper: PartitionKeyRangeWrapper, + successes: int, + failures: int, + consecutive_failures: int, + location: str, + failure_rate_threshold: int, + consecutive_failure_threshold: int, ) -> None: # check the failure rate was not exceeded - if _has_exceeded_failure_rate_threshold( - successes, - failures, - failure_rate_threshold - ): + if _has_exceeded_failure_rate_threshold(successes, failures, failure_rate_threshold): self._transition_health_status_on_failure(pk_range_wrapper, location) # add to consecutive failures and check that threshold was not exceeded @@ -302,6 +286,7 @@ def _reset_partition_health_tracker_stats(self) -> None: for health_info in locations.values(): health_info.reset_failure_rate_health_stats() + class _PPAFPartitionThresholdsTracker(object): """ This internal class implements the logic for tracking consecutive failure thresholds for a partition diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_get_query_advice_info.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_get_query_advice_info.py index 5b85a8b223ab..ef4169027809 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_get_query_advice_info.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_get_query_advice_info.py @@ -10,6 +10,7 @@ from ._query_advice import QueryAdvice + def get_query_advice_info(header_value: Optional[str]) -> str: """Process a query advice response header into a formatted human-readable string. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_query_advice.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_query_advice.py index 2bf4e57f1bf6..ef91e87fac8c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_query_advice.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_query_advice.py @@ -18,7 +18,7 @@ class QueryAdviceEntry: """Represents a single query advice entry. - + Each entry contains a rule ID and optional parameters that provide specific guidance for query optimization. """ @@ -89,7 +89,7 @@ def from_dict(cls, data: Dict[str, Any]) -> "QueryAdviceEntry": class QueryAdvice: """Collection of query advice entries. - + Represents the complete query advice response from Azure Cosmos DB, containing one or more optimization recommendations. """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_rule_directory.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_rule_directory.py index d2aa984f7b66..897e8cd49ba5 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_rule_directory.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_advisor/_rule_directory.py @@ -43,11 +43,7 @@ def __init__(self) -> None: def _load_rules(self) -> None: """Load rules from the bundled JSON resource.""" try: - resource_text = ( - files(__package__) - .joinpath("query_advice_rules.json") - .read_text(encoding="utf-8") - ) + resource_text = files(__package__).joinpath("query_advice_rules.json").read_text(encoding="utf-8") data = json.loads(resource_text) self._url_prefix = data.get("url_prefix", "") self._rules = data.get("rules", {}) @@ -55,9 +51,7 @@ def _load_rules(self) -> None: # Fall back to empty rules so query execution # is never blocked by an inability to load advice text. _LOGGER.warning("Failed to load query_advice_rules.json, falling back to empty rules", exc_info=True) - self._url_prefix = ( - "https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/queryadvisor/" - ) + self._url_prefix = "https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/queryadvisor/" self._rules = {} @property diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_builder.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_builder.py index 2bcb3fe61128..cbf5f5da80f9 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_builder.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_builder.py @@ -24,6 +24,7 @@ from typing import Tuple, Any, TYPE_CHECKING, Sequence from azure.cosmos.partition_key import _Undefined, _Empty, NonePartitionKeyValue + if TYPE_CHECKING: from azure.cosmos._cosmos_client_connection import PartitionKeyType @@ -49,8 +50,7 @@ def _get_field_expression(path: str) -> str: @staticmethod def is_id_partition_key_query( - items: Sequence[Tuple[str, "PartitionKeyType"]], - partition_key_definition: dict[str, Any] + items: Sequence[Tuple[str, "PartitionKeyType"]], partition_key_definition: dict[str, Any] ) -> bool: """Check if we can use the optimized ID IN query. @@ -70,9 +70,7 @@ def is_id_partition_key_query( return True @staticmethod - def is_single_logical_partition_query( - items: Sequence[Tuple[str, "PartitionKeyType"]] - ) -> bool: + def is_single_logical_partition_query(items: Sequence[Tuple[str, "PartitionKeyType"]]) -> bool: """Check if all items in a chunk belong to the same logical partition. This is used to determine if an optimized query with an IN clause can be used. @@ -88,8 +86,7 @@ def is_single_logical_partition_query( @staticmethod def build_pk_and_id_in_query( - items: Sequence[Tuple[str, "PartitionKeyType"]], - partition_key_definition: dict[str, Any] + items: Sequence[Tuple[str, "PartitionKeyType"]], partition_key_definition: dict[str, Any] ) -> dict[str, Any]: """Build a query for items in a single logical partition using an IN clause for IDs. @@ -100,7 +97,7 @@ def build_pk_and_id_in_query( :return: A dictionary containing the query text and parameters. :rtype: dict[str, any] """ - partition_key_path = partition_key_definition['paths'][0].lstrip('/') + partition_key_path = partition_key_definition["paths"][0].lstrip("/") partition_key_value = items[0][1] id_params = {f"@id{i}": item[0] for i, item in enumerate(items)} @@ -131,8 +128,8 @@ def build_id_in_query(items: Sequence[Tuple[str, "PartitionKeyType"]]) -> dict[s @staticmethod def build_parameterized_query_for_items( - items_by_partition: dict[str, Sequence[Tuple[str, "PartitionKeyType"]]], - partition_key_definition: dict[str, Any] + items_by_partition: dict[str, Sequence[Tuple[str, "PartitionKeyType"]]], + partition_key_definition: dict[str, Any], ) -> dict[str, Any]: """Builds a parameterized SQL query for reading multiple items. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py index c301d8d0bf17..7cd9badf4570 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_query_iterable.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Iterable query results in the Azure Cosmos database service. -""" +"""Iterable query results in the Azure Cosmos database service.""" + import time from azure.core.paging import PageIterator # type: ignore @@ -74,22 +74,30 @@ def __init__( self._query = query self._options = options if continuation_token: - options['continuation'] = continuation_token + options["continuation"] = continuation_token self._fetch_function = fetch_function self._collection_link = collection_link self._database_link = database_link self._partition_key = partition_key self._ex_context = execution_dispatcher._ProxyQueryExecutionContext( - self._client, self._collection_link, self._query, self._options, self._fetch_function, - response_hook, raw_response_hook, resource_type) + self._client, + self._collection_link, + self._query, + self._options, + self._fetch_function, + response_hook, + raw_response_hook, + resource_type, + ) super(QueryIterable, self).__init__(self._fetch_next, self._unpack, continuation_token=continuation_token) def _unpack(self, block): continuation = None if self._client.last_response_headers: - continuation = self._client.last_response_headers.get("x-ms-continuation") or \ - self._client.last_response_headers.get('etag') + continuation = self._client.last_response_headers.get( + "x-ms-continuation" + ) or self._client.last_response_headers.get("etag") if block: self._did_a_call_already = False return continuation, block @@ -104,7 +112,7 @@ def _fetch_next(self, *args): # pylint: disable=unused-argument :return: List of results. :rtype: list """ - timeout = self._options.get('timeout') + timeout = self._options.get("timeout") # reset the operation start time if it's a paged request if timeout and self._options.get(_Constants.TimeoutScope) != TimeoutScope.OPERATION: self._options[_Constants.OperationStartTime] = time.time() diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py index 6b8b620f1673..721f19734f84 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_range.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Range class implementation in the Azure Cosmos database service. -""" +"""Range class implementation in the Azure Cosmos database service.""" class Range(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py index bea7631bc7cf..ccac5dac222b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_range_partition_resolver.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Range partition resolver implementation in the Azure Cosmos database service. -""" +"""Range partition resolver implementation in the Azure Cosmos database service.""" from . import _range as prange diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_read_items_helper.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_read_items_helper.py index 78f19e8c63b3..a42a84051819 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_read_items_helper.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_read_items_helper.py @@ -30,26 +30,27 @@ from azure.cosmos._query_builder import _QueryBuilder from azure.cosmos.partition_key import _get_partition_key_from_partition_key_definition from azure.cosmos import CosmosList -if TYPE_CHECKING: - from azure.cosmos._cosmos_client_connection import PartitionKeyType , CosmosClientConnection +if TYPE_CHECKING: + from azure.cosmos._cosmos_client_connection import PartitionKeyType, CosmosClientConnection class ReadItemsHelperSync: """Helper class for handling synchronous read many items operations.""" + logger = logging.getLogger("azure.cosmos.ReadManyItemsHelperSync") def __init__( - self, - client: 'CosmosClientConnection', - collection_link: str, - items: Sequence[Tuple[str, "PartitionKeyType"]], - options: Optional[Mapping[str, Any]], - partition_key_definition: dict[str, Any], - *, - executor: Optional[ThreadPoolExecutor] = None, - max_concurrency: Optional[int] = None, - **kwargs: Any + self, + client: "CosmosClientConnection", + collection_link: str, + items: Sequence[Tuple[str, "PartitionKeyType"]], + options: Optional[Mapping[str, Any]], + partition_key_definition: dict[str, Any], + *, + executor: Optional[ThreadPoolExecutor] = None, + max_concurrency: Optional[int] = None, + **kwargs: Any, ): self.client = client self.collection_link = collection_link @@ -86,9 +87,7 @@ def read_items(self) -> CosmosList: return self._execute_with_executor(executor, query_chunks) def _execute_with_executor( - self, - executor: ThreadPoolExecutor, - query_chunks: list[dict[str, list[Tuple[int, str, "PartitionKeyType"]]]] + self, executor: ThreadPoolExecutor, query_chunks: list[dict[str, list[Tuple[int, str, "PartitionKeyType"]]]] ) -> CosmosList: """Execute the queries using the provided executor with improved error handling. @@ -132,13 +131,13 @@ def _execute_with_executor( results = [item[1] for item in indexed_results] final_headers = CaseInsensitiveDict() - final_headers['x-ms-request-charge'] = str(total_request_charge) + final_headers["x-ms-request-charge"] = str(total_request_charge) cosmos_list = CosmosList(results, response_headers=final_headers) # Call the original response hook with the final results if provided - if 'response_hook' in self.kwargs: - self.kwargs['response_hook'](final_headers, cosmos_list) + if "response_hook" in self.kwargs: + self.kwargs["response_hook"](final_headers, cosmos_list) return cosmos_list @@ -178,10 +177,8 @@ def _partition_items_by_range(self) -> dict[str, list[Tuple[int, str, "Partition return items_by_partition - def _create_query_chunks( - self, - items_by_partition: dict[str, list[Tuple[int, str, "PartitionKeyType"]]] + self, items_by_partition: dict[str, list[Tuple[int, str, "PartitionKeyType"]]] ) -> list[dict[str, list[Tuple[int, str, "PartitionKeyType"]]]]: """Create query chunks for concurrency control while preserving original indices. @@ -194,12 +191,12 @@ def _create_query_chunks( for partition_id, partition_items in items_by_partition.items(): # Split large partitions into chunks of self.max_items_per_query for i in range(0, len(partition_items), self.max_items_per_query): - chunk = partition_items[i:i + self.max_items_per_query] + chunk = partition_items[i : i + self.max_items_per_query] query_chunks.append({partition_id: chunk}) return query_chunks def _execute_query_chunk_worker( - self, partition_id: str, chunk_partition_items: Sequence[Tuple[int, str, "PartitionKeyType"]] + self, partition_id: str, chunk_partition_items: Sequence[Tuple[int, str, "PartitionKeyType"]] ) -> Tuple[list[Tuple[int, dict[str, Any]]], float]: """Synchronous worker to build and execute a query for a chunk of items. @@ -220,7 +217,7 @@ def _execute_query_chunk_worker( chunk_results, headers = self._execute_query(partition_id, items_for_query, id_to_idx, request_kwargs) total_ru_charge = 0.0 - charge = headers.get('x-ms-request-charge') + charge = headers.get("x-ms-request-charge") if charge: try: total_ru_charge = float(charge) @@ -230,11 +227,11 @@ def _execute_query_chunk_worker( return chunk_results, total_ru_charge def _execute_query( - self, - partition_id: str, - items_for_query: Sequence[Tuple[str, "PartitionKeyType"]], - id_to_idx: dict[str, int], - request_kwargs: dict[str, Any] + self, + partition_id: str, + items_for_query: Sequence[Tuple[str, "PartitionKeyType"]], + id_to_idx: dict[str, int], + request_kwargs: dict[str, Any], ) -> Tuple[list[Tuple[int, Any]], CaseInsensitiveDict]: """ Builds and executes a query for a chunk of items. @@ -255,7 +252,7 @@ def _execute_query( def local_response_hook(hook_headers, _): captured_headers.update(hook_headers) - request_kwargs['response_hook'] = local_response_hook + request_kwargs["response_hook"] = local_response_hook if _QueryBuilder.is_id_partition_key_query(items_for_query, self.partition_key_definition): query_obj = _QueryBuilder.build_id_in_query(items_for_query) @@ -264,14 +261,15 @@ def local_response_hook(hook_headers, _): else: partition_items_dict = {partition_id: items_for_query} query_obj = _QueryBuilder.build_parameterized_query_for_items( - partition_items_dict, self.partition_key_definition) + partition_items_dict, self.partition_key_definition + ) query_iterator = self.client.QueryItems(self.collection_link, query_obj, self.options, **request_kwargs) results = list(query_iterator) chunk_indexed_results = [] for item in results: - doc_id = item.get('id') + doc_id = item.get("id") if doc_id in id_to_idx: chunk_indexed_results.append((id_to_idx[doc_id], item)) else: @@ -280,10 +278,7 @@ def local_response_hook(hook_headers, _): return chunk_indexed_results, CaseInsensitiveDict(captured_headers) def _execute_point_read( - self, - item_id: str, - pk_value: "PartitionKeyType", - request_kwargs: dict[str, Any] + self, item_id: str, pk_value: "PartitionKeyType", request_kwargs: dict[str, Any] ) -> Tuple[Optional[Any], CaseInsensitiveDict]: """ Executes a point read for a single item. @@ -305,7 +300,7 @@ def _execute_point_read( def local_response_hook(hook_headers, _): captured_headers.update(hook_headers) - request_kwargs['response_hook'] = local_response_hook + request_kwargs["response_hook"] = local_response_hook request_kwargs.pop("containerProperties", None) try: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py index b27b5486cdcd..9c54ac2ab2bc 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_request_object.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Represents a request object. -""" +"""Represents a request object.""" + import asyncio # pylint: disable=do-not-import-asyncio import threading from concurrent.futures.thread import ThreadPoolExecutor @@ -32,14 +32,14 @@ from .http_constants import ResourceType -class RequestObject(object): # pylint: disable=too-many-instance-attributes +class RequestObject(object): # pylint: disable=too-many-instance-attributes def __init__( - self, - resource_type: str, - operation_type: str, - headers: dict[str, Any], - pk_val: Optional[Any] = None, - endpoint_override: Optional[str] = None, + self, + resource_type: str, + operation_type: str, + headers: dict[str, Any], + pk_val: Optional[Any] = None, + endpoint_override: Optional[str] = None, ) -> None: self.resource_type = resource_type self.operation_type = operation_type @@ -58,13 +58,11 @@ def __init__( self.read_timeout_override: Optional[int] = None self.pk_val = pk_val self.retry_write: int = 0 - self.is_hedging_request: bool = False # Flag to track if this is a hedged request + self.is_hedging_request: bool = False # Flag to track if this is a hedged request self.completion_status: Optional[Union[threading.Event, asyncio.Event]] = None def route_to_location_with_preferred_location_flag( # pylint: disable=name-too-long - self, - location_index: int, - use_preferred_locations: bool + self, location_index: int, use_preferred_locations: bool ) -> None: self.location_index_to_route = location_index self.use_preferred_locations = use_preferred_locations @@ -82,20 +80,21 @@ def clear_route_to_location(self) -> None: def _can_set_excluded_location(self, options: Mapping[str, Any]) -> bool: # If 'excludedLocations' wasn't in the options, excluded locations cannot be set - if (options is None - or 'excludedLocations' not in options): + if options is None or "excludedLocations" not in options: return False # The 'excludedLocations' cannot be None - if options['excludedLocations'] is None: - raise ValueError("Excluded locations cannot be None. " - "If you want to remove all excluded locations, try passing an empty list.") + if options["excludedLocations"] is None: + raise ValueError( + "Excluded locations cannot be None. " + "If you want to remove all excluded locations, try passing an empty list." + ) return True def set_excluded_location_from_options(self, options: Mapping[str, Any]) -> None: if self._can_set_excluded_location(options): - self.excluded_locations = options['excludedLocations'] + self.excluded_locations = options["excludedLocations"] def set_retry_write(self, request_options: Mapping[str, Any], client_retry_write: int) -> None: if self.resource_type == ResourceType.Document: @@ -108,13 +107,14 @@ def set_retry_write(self, request_options: Mapping[str, Any], client_retry_write else: self.retry_write = 0 - def set_excluded_locations_from_circuit_breaker(self, excluded_locations: list[str]) -> None: # pylint: disable=name-too-long + def set_excluded_locations_from_circuit_breaker( + self, excluded_locations: list[str] + ) -> None: # pylint: disable=name-too-long self.excluded_locations_circuit_breaker = excluded_locations def set_availability_strategy( - self, - options: Mapping[str, Any], - client_strategy_config: Union[CrossRegionHedgingStrategy, None] = None) -> None: + self, options: Mapping[str, Any], client_strategy_config: Union[CrossRegionHedgingStrategy, None] = None + ) -> None: """Sets the availability strategy config for this request from options. If not in options, uses the client's default strategy. If False is in options, client defaults are NOT used (explicitly disabled). @@ -127,8 +127,10 @@ def set_availability_strategy( """ # setup availabilityStrategy # First try to get from options (method-level takes precedence) - if (Constants.Kwargs.AVAILABILITY_STRATEGY in options and - options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None): + if ( + Constants.Kwargs.AVAILABILITY_STRATEGY in options + and options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None + ): strategy = options[Constants.Kwargs.AVAILABILITY_STRATEGY] if isinstance(strategy, bool): if strategy: @@ -149,7 +151,7 @@ def set_availability_strategy( def should_cancel_request(self) -> bool: """Check if this request should be cancelled due to parallel request completion. - + :return: True if request should be cancelled, False otherwise :rtype: bool """ diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py index d5ce1bd85e9a..215b062bdd2a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_options.py @@ -19,9 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Class for retry options in the Azure Cosmos database service. -""" - +"""Class for retry options in the Azure Cosmos database service.""" from typing import Optional @@ -43,7 +41,7 @@ def __init__( self, max_retry_attempt_count: int = 9, fixed_retry_interval_in_milliseconds: Optional[int] = None, - max_wait_time_in_seconds: int = 30 + max_wait_time_in_seconds: int = 30, ): self._max_retry_attempt_count = max_retry_attempt_count self._fixed_retry_interval_in_milliseconds = fixed_retry_interval_in_milliseconds diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py index 90203b923293..4426d95c46f1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_retry_utility.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal methods for executing functions in the Azure Cosmos database service. -""" +"""Internal methods for executing functions in the Azure Cosmos database service.""" + import json import logging import time @@ -41,8 +41,9 @@ from . import exceptions from ._constants import _Constants from ._cosmos_http_logging_policy import _log_diagnostics_error -from ._global_partition_endpoint_manager_per_partition_automatic_failover import \ - _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover +from ._global_partition_endpoint_manager_per_partition_automatic_failover import ( + _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, +) from ._request_object import RequestObject from ._routing.routing_range import PartitionKeyRangeWrapper from .documents import _OperationType @@ -52,11 +53,12 @@ # pylint: disable=protected-access, disable=too-many-lines, disable=too-many-statements, disable=too-many-branches # cspell:ignore PPAF,ppaf,ppcb + # args [0] is the request object # args [1] is the connection policy # args [2] is the pipeline client # args [3] is the http request -def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylint: disable=too-many-locals +def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylint: disable=too-many-locals """Executes the function with passed parameters applying all retry policies :param object client: @@ -70,23 +72,23 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin :rtype: tuple of (dict, dict) """ # Capture the client timeout and start time at the beginning - timeout = kwargs.get('timeout') + timeout = kwargs.get("timeout") operation_start_time = kwargs.get(_Constants.OperationStartTime, time.time()) # Track the last error for chaining last_error = None pk_range_wrapper = None - if args and (global_endpoint_manager.is_per_partition_automatic_failover_applicable(args[0]) or - global_endpoint_manager.is_circuit_breaker_applicable(args[0])): + if args and ( + global_endpoint_manager.is_per_partition_automatic_failover_applicable(args[0]) + or global_endpoint_manager.is_circuit_breaker_applicable(args[0]) + ): pk_range_wrapper = global_endpoint_manager.create_pk_range_wrapper(args[0]) # instantiate all retry policies here to be applied for each request execution endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy( client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args ) - health_check_retry_policy = _health_check_retry_policy.HealthCheckRetryPolicy( - client.connection_policy, *args - ) + health_check_retry_policy = _health_check_retry_policy.HealthCheckRetryPolicy(client.connection_policy, *args) resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy( client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, @@ -104,13 +106,20 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args ) service_response_retry_policy = _service_response_retry_policy.ServiceResponseRetryPolicy( - client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args, + client.connection_policy, + global_endpoint_manager, + pk_range_wrapper, + *args, ) service_request_retry_policy = _service_request_retry_policy.ServiceRequestRetryPolicy( - client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args, + client.connection_policy, + global_endpoint_manager, + pk_range_wrapper, + *args, ) service_unavailable_retry_policy = _service_unavailable_retry_policy._ServiceUnavailableRetryPolicy( - client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args) + client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args + ) # Get logger logger = kwargs.get("logger", logging.getLogger("azure.cosmos._retry_utility")) @@ -120,10 +129,12 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin # Reference HttpRequest instance in args request = args[3] container_recreate_retry_policy = _container_recreate_retry_policy.ContainerRecreateRetryPolicy( - client, client._container_properties_cache, request, *args) + client, client._container_properties_cache, request, *args + ) else: container_recreate_retry_policy = _container_recreate_retry_policy.ContainerRecreateRetryPolicy( - client, client._container_properties_cache, None, *args) + client, client._container_properties_cache, None, *args + ) while True: start_time = time.time() @@ -149,28 +160,35 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin client.last_response_headers = {} # setting the throttle related response headers before returning the result - client.last_response_headers[ - HttpHeaders.ThrottleRetryCount - ] = resourceThrottle_retry_policy.current_retry_attempt_count - client.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs - ] = resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + client.last_response_headers[HttpHeaders.ThrottleRetryCount] = ( + resourceThrottle_retry_policy.current_retry_attempt_count + ) + client.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs] = ( + resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + ) # TODO: It is better to raise Exceptions manually in the method related to the request, # a rework of retry would be needed to be able to retry exceptions raised that way. # for now raising a manual exception here should allow it to be retried. # If container does not have throughput, results will return empty list. # We manually raise a 404. We raise it here, so we can handle it in retry utilities. - if result and isinstance(result[0], dict) and 'Offers' in result[0] and \ - not result[0]['Offers'] and request.method == 'POST': + if ( + result + and isinstance(result[0], dict) + and "Offers" in result[0] + and not result[0]["Offers"] + and request.method == "POST" + ): # Grab the link used for getting throughput properties to add to message. link = json.loads(request.body)["parameters"][0]["value"] - response = exceptions._InternalCosmosException(status_code=StatusCodes.NOT_FOUND, - headers={HttpHeaders.SubStatus: - SubStatusCodes.THROUGHPUT_OFFER_NOT_FOUND}) + response = exceptions._InternalCosmosException( + status_code=StatusCodes.NOT_FOUND, + headers={HttpHeaders.SubStatus: SubStatusCodes.THROUGHPUT_OFFER_NOT_FOUND}, + ) e_offer = exceptions.CosmosResourceNotFoundError( status_code=StatusCodes.NOT_FOUND, message="Could not find ThroughputProperties for container " + link, - response=response) + response=response, + ) response_headers = result[1] if len(result) > 1 else {} logger_attributes = { @@ -179,8 +197,15 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin "status_code": e_offer.status_code, "sub_status_code": e_offer.sub_status, } - _log_diagnostics_error(client._enable_diagnostics_logging, request, response_headers, e_offer, - logger_attributes, global_endpoint_manager, logger=logger) + _log_diagnostics_error( + client._enable_diagnostics_logging, + request, + response_headers, + e_offer, + logger_attributes, + global_endpoint_manager, + logger=logger, + ) raise e_offer return result @@ -192,8 +217,10 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin if request and _has_database_account_header(request.headers): retry_policy = health_check_retry_policy # Re-assign retry policy based on error code - elif e.status_code == StatusCodes.FORBIDDEN and e.sub_status in\ - [SubStatusCodes.DATABASE_ACCOUNT_NOT_FOUND, SubStatusCodes.WRITE_FORBIDDEN]: + elif e.status_code == StatusCodes.FORBIDDEN and e.sub_status in [ + SubStatusCodes.DATABASE_ACCOUNT_NOT_FOUND, + SubStatusCodes.WRITE_FORBIDDEN, + ]: retry_policy = endpointDiscovery_retry_policy elif e.status_code == StatusCodes.TOO_MANY_REQUESTS: retry_policy = resourceThrottle_retry_policy @@ -211,7 +238,8 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin # container properties and pass in the new RID in the headers. client._refresh_container_properties_cache(retry_policy.container_link) if e.sub_status != SubStatusCodes.COLLECTION_RID_MISMATCH and retry_policy.check_if_rid_different( - retry_policy.container_link, client._container_properties_cache, retry_policy.container_rid): + retry_policy.container_link, client._container_properties_cache, retry_policy.container_rid + ): retry_policy.refresh_container_properties_cache = False else: cached_container = client._container_properties_cache[retry_policy.container_link] @@ -250,12 +278,12 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin if not retry_policy.ShouldRetry(e): if not client.last_response_headers: client.last_response_headers = {} - client.last_response_headers[ - HttpHeaders.ThrottleRetryCount - ] = resourceThrottle_retry_policy.current_retry_attempt_count - client.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs - ] = resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + client.last_response_headers[HttpHeaders.ThrottleRetryCount] = ( + resourceThrottle_retry_policy.current_retry_attempt_count + ) + client.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs] = ( + resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + ) if args and args[0].should_clear_session_token_on_session_read_failure: client.session.clear_session_token(client.last_response_headers) raise @@ -286,27 +314,34 @@ def Execute(client, global_endpoint_manager, function, *args, **kwargs): # pylin _record_failure_if_request_not_cancelled(args[0], global_endpoint_manager, pk_range_wrapper) _handle_service_response_retries(request, client, service_response_retry_policy, e, *args) + def _record_success_if_request_not_cancelled( - request_params: RequestObject, - global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper]) -> None: + request_params: RequestObject, + global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, + pk_range_wrapper: Optional[PartitionKeyRangeWrapper], +) -> None: if not request_params.should_cancel_request(): global_endpoint_manager.record_success(request_params, pk_range_wrapper) + def _record_failure_if_request_not_cancelled( - request_params: RequestObject, - global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper]) -> None: + request_params: RequestObject, + global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, + pk_range_wrapper: Optional[PartitionKeyRangeWrapper], +) -> None: if not request_params.should_cancel_request(): global_endpoint_manager.record_failure(request_params, pk_range_wrapper) + def _record_ppcb_failure_if_request_not_cancelled( - request_params: RequestObject, - global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper]) -> None: + request_params: RequestObject, + global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover, + pk_range_wrapper: Optional[PartitionKeyRangeWrapper], +) -> None: if not request_params.should_cancel_request(): global_endpoint_manager.record_ppcb_failure(request_params, pk_range_wrapper) + def ExecuteFunction(function, *args, **kwargs): """Stub method so that it can be used for mocking purposes as well. :param Callable function: the function to execute. @@ -322,17 +357,14 @@ def _has_read_retryable_headers(request_headers): return True return False + def _has_database_account_header(request_headers): if request_headers.get(HttpHeaders.ThinClientProxyResourceType) == ResourceType.DatabaseAccount: return True return False -def _handle_service_request_retries( - client, - request_retry_policy, - exception, - *args -): + +def _handle_service_request_retries(client, request_retry_policy, exception, *args): # we resolve the request endpoint to the next preferred region # once we are out of preferred regions we stop retrying retry_policy = request_retry_policy @@ -341,9 +373,18 @@ def _handle_service_request_retries( client.session.clear_session_token(client.last_response_headers) raise exception + def _handle_service_response_retries(request, client, response_retry_policy, exception, *args): - if request and (_has_read_retryable_headers(request.headers) or (args and (is_write_retryable(args[0], client) or - client._global_endpoint_manager.is_per_partition_automatic_failover_applicable(args[0])))): + if request and ( + _has_read_retryable_headers(request.headers) + or ( + args + and ( + is_write_retryable(args[0], client) + or client._global_endpoint_manager.is_per_partition_automatic_failover_applicable(args[0]) + ) + ) + ): # we resolve the request endpoint to the next preferred region # once we are out of preferred regions we stop retrying retry_policy = response_retry_policy @@ -354,10 +395,13 @@ def _handle_service_response_retries(request, client, response_retry_policy, exc else: raise exception + def is_write_retryable(request_params, client): - return (request_params.retry_write > 0 or - (client.connection_policy.RetryNonIdempotentWrites > 0 and - not request_params.operation_type == _OperationType.Patch)) + return request_params.retry_write > 0 or ( + client.connection_policy.RetryNonIdempotentWrites > 0 + and not request_params.operation_type == _OperationType.Patch + ) + def _configure_timeout(request: PipelineRequest, absolute: Optional[int], per_request: int) -> None: if absolute is not None: @@ -365,13 +409,13 @@ def _configure_timeout(request: PipelineRequest, absolute: Optional[int], per_re raise exceptions.CosmosClientTimeoutError() if per_request: # Both socket timeout and client timeout have been provided - use the shortest value. - request.context.options['connection_timeout'] = min(per_request, absolute) + request.context.options["connection_timeout"] = min(per_request, absolute) else: # Only client timeout provided. - request.context.options['connection_timeout'] = absolute + request.context.options["connection_timeout"] = absolute elif per_request: # Only socket timeout provided. - request.context.options['connection_timeout'] = per_request + request.context.options["connection_timeout"] = per_request class ConnectionRetryPolicy(RetryPolicy): @@ -393,10 +437,10 @@ def send(self, request): :raises ~azure.core.exceptions.ClientAuthenticationError: Authentication failed. """ - absolute_timeout = request.context.options.pop('timeout', None) - per_request_timeout = request.context.options.pop('connection_timeout', 0) - request_params = request.context.options.pop('request_params', None) - global_endpoint_manager = request.context.options.pop('global_endpoint_manager', None) + absolute_timeout = request.context.options.pop("timeout", None) + per_request_timeout = request.context.options.pop("connection_timeout", 0) + request_params = request.context.options.pop("request_params", None) + global_endpoint_manager = request.context.options.pop("global_endpoint_manager", None) retry_error = None retry_active = True response = None @@ -414,16 +458,18 @@ def send(self, request): except exceptions.CosmosClientTimeoutError as timeout_error: timeout_error.inner_exception = retry_error timeout_error.response = response - timeout_error.history = retry_settings['history'] + timeout_error.history = retry_settings["history"] raise except ServiceRequestError as err: retry_error = err # the request ran into a socket timeout or failed to establish a new connection # since request wasn't sent, raise exception immediately to be dealt with in client retry policies # This logic is based on the _retry.py file from azure-core - if (not _has_database_account_header(request.http_request.headers) - and not request_params.healthy_tentative_location): - if retry_settings['connect'] > 0: + if ( + not _has_database_account_header(request.http_request.headers) + and not request_params.healthy_tentative_location + ): + if retry_settings["connect"] > 0: retry_active = self.increment(retry_settings, response=request, error=err) if retry_active: self.sleep(retry_settings, request.context.transport) @@ -432,12 +478,14 @@ def send(self, request): except ServiceResponseError as err: retry_error = err # Only read operations can be safely retried with ServiceResponseError - if (not _has_read_retryable_headers(request.http_request.headers) or - _has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + not _has_read_retryable_headers(request.http_request.headers) + or _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err # This logic is based on the _retry.py file from azure-core - if retry_settings['read'] > 0: + if retry_settings["read"] > 0: # record the failure for circuit breaker tracking for retries in connection retry policy # retries in the execute function will mark those failures _record_failure_if_request_not_cancelled(request_params, global_endpoint_manager, None) @@ -451,10 +499,12 @@ def send(self, request): raise err except AzureError as err: retry_error = err - if (_has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err - if _has_read_retryable_headers(request.http_request.headers) and retry_settings['read'] > 0: + if _has_read_retryable_headers(request.http_request.headers) and retry_settings["read"] > 0: _record_failure_if_request_not_cancelled(request_params, global_endpoint_manager, None) retry_active = self.increment(retry_settings, response=request, error=err) if retry_active: @@ -464,7 +514,7 @@ def send(self, request): finally: end_time = time.time() if absolute_timeout: - absolute_timeout -= (end_time - start_time) + absolute_timeout -= end_time - start_time self.update_context(response.context, retry_settings) return response diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/aio/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/aio/routing_map_provider.py index 34e4a3436c27..8fb9ff432236 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/aio/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/aio/routing_map_provider.py @@ -22,6 +22,7 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ + import logging from typing import Any, Optional @@ -70,11 +71,7 @@ async def get_overlapping_ranges(self, collection_link, partition_key_ranges, fe return self._collection_routing_map_by_item[collection_id].get_overlapping_ranges(partition_key_ranges) async def init_collection_routing_map_if_needed( - self, - collection_link: str, - collection_id: str, - feed_options: dict[str, Any], - **kwargs: dict[str, Any] + self, collection_link: str, collection_id: str, feed_options: dict[str, Any], **kwargs: dict[str, Any] ): collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if collection_routing_map is None: @@ -86,13 +83,15 @@ async def init_collection_routing_map_if_needed( _LOGGER.debug( "PK range cache (async): Initializing routing map for collection_id=%s with " "_internal_pk_range_fetch=True to prevent recursive 410 retry.", - collection_id + collection_id, ) pk_range_kwargs = {**kwargs, "_internal_pk_range_fetch": True} - collection_pk_ranges = [pk async for pk in - self._documentClient._ReadPartitionKeyRanges(collection_link, - feed_options, - **pk_range_kwargs)] + collection_pk_ranges = [ + pk + async for pk in self._documentClient._ReadPartitionKeyRanges( + collection_link, feed_options, **pk_range_kwargs + ) + ] # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. @@ -103,22 +102,20 @@ async def init_collection_routing_map_if_needed( self._collection_routing_map_by_item[collection_id] = collection_routing_map _LOGGER.debug( "PK range cache (async): Cached routing map for collection_id=%s with %d ranges", - collection_id, len(collection_pk_ranges) + collection_id, + len(collection_pk_ranges), ) async def get_range_by_partition_key_range_id( - self, - collection_link: str, - partition_key_range_id: int, - feed_options: dict[str, Any], - **kwargs: dict[str, Any] + self, collection_link: str, partition_key_range_id: int, feed_options: dict[str, Any], **kwargs: dict[str, Any] ) -> Optional[dict[str, Any]]: collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) pk_range_options = _base.format_pk_range_options(feed_options) await self.init_collection_routing_map_if_needed(collection_link, collection_id, pk_range_options, **kwargs) return self._collection_routing_map_by_item[collection_id].get_range_by_partition_key_range_id( - partition_key_range_id) + partition_key_range_id + ) @staticmethod def _discard_parent_ranges(partitionKeyRanges): @@ -176,7 +173,7 @@ class SmartRoutingMapProvider(PartitionKeyRangeCache): invocation of CollectionRoutingMap.get_overlapping_ranges() """ - async def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_options = None, **kwargs): + async def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_options=None, **kwargs): """ Given the sorted ranges and a collection, Returns the list of overlapping partition key ranges @@ -211,13 +208,9 @@ async def get_overlapping_ranges(self, collection_link, partition_key_ranges, fe else: queryRange = currentProvidedRange - overlappingRanges =\ - await PartitionKeyRangeCache.get_overlapping_ranges( - self, - collection_link, - [queryRange], - feed_options, - **kwargs) + overlappingRanges = await PartitionKeyRangeCache.get_overlapping_ranges( + self, collection_link, [queryRange], feed_options, **kwargs + ) assert overlappingRanges, "code bug: returned overlapping ranges for queryRange {} is empty".format( queryRange ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py index ea313066fce6..0cb360ec3105 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/collection_routing_map.py @@ -137,9 +137,9 @@ def get_overlapping_ranges(self, provided_partition_key_ranges): for i in range(minIndex, maxIndex + 1): if routing_range.Range.overlaps(self._orderedRanges[i], providedRange): - minToPartitionRange[ - self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive] - ] = self._orderedPartitionKeyRanges[i] + minToPartitionRange[self._orderedPartitionKeyRanges[i][PartitionKeyRange.MinInclusive]] = ( + self._orderedPartitionKeyRanges[i] + ) overlapping_partition_key_ranges = list(minToPartitionRange.values()) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py index 263d31916c49..0f842b5a0e3e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_map_provider.py @@ -22,6 +22,7 @@ """Internal class for partition key range cache implementation in the Azure Cosmos database service. """ + import logging from typing import Any, Optional @@ -56,11 +57,7 @@ def __init__(self, client): self._collection_routing_map_by_item = {} def init_collection_routing_map_if_needed( - self, - collection_link: str, - collection_id: str, - feed_options: Optional[dict[str, Any]], - **kwargs: dict[str, Any] + self, collection_link: str, collection_id: str, feed_options: Optional[dict[str, Any]], **kwargs: dict[str, Any] ): collection_routing_map = self._collection_routing_map_by_item.get(collection_id) if not collection_routing_map: @@ -72,12 +69,12 @@ def init_collection_routing_map_if_needed( _LOGGER.debug( "PK range cache: Initializing routing map for collection_id=%s with " "_internal_pk_range_fetch=True to prevent recursive 410 retry.", - collection_id + collection_id, ) pk_range_kwargs = {**kwargs, "_internal_pk_range_fetch": True} - collection_pk_ranges = list(self._documentClient._ReadPartitionKeyRanges(collection_link, - feed_options, - **pk_range_kwargs)) + collection_pk_ranges = list( + self._documentClient._ReadPartitionKeyRanges(collection_link, feed_options, **pk_range_kwargs) + ) # for large collections, a split may complete between the read partition key ranges query page responses, # causing the partitionKeyRanges to have both the children ranges and their parents. Therefore, we need # to discard the parent ranges to have a valid routing map. @@ -88,7 +85,8 @@ def init_collection_routing_map_if_needed( self._collection_routing_map_by_item[collection_id] = collection_routing_map _LOGGER.debug( "PK range cache: Cached routing map for collection_id=%s with %d ranges", - collection_id, len(collection_pk_ranges) + collection_id, + len(collection_pk_ranges), ) def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_options, **kwargs): @@ -108,18 +106,15 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_opt return self._collection_routing_map_by_item[collection_id].get_overlapping_ranges(partition_key_ranges) def get_range_by_partition_key_range_id( - self, - collection_link: str, - partition_key_range_id: int, - feed_options: dict[str, Any], - **kwargs: dict[str, Any] + self, collection_link: str, partition_key_range_id: int, feed_options: dict[str, Any], **kwargs: dict[str, Any] ) -> Optional[dict[str, Any]]: collection_id = _base.GetResourceIdOrFullNameFromLink(collection_link) pk_range_options = _base.format_pk_range_options(feed_options) self.init_collection_routing_map_if_needed(collection_link, collection_id, pk_range_options, **kwargs) - return (self._collection_routing_map_by_item[collection_id] - .get_range_by_partition_key_range_id(partition_key_range_id)) + return self._collection_routing_map_by_item[collection_id].get_range_by_partition_key_range_id( + partition_key_range_id + ) @staticmethod def _discard_parent_ranges(partitionKeyRanges): @@ -177,7 +172,7 @@ class SmartRoutingMapProvider(PartitionKeyRangeCache): invocation of CollectionRoutingMap.get_overlapping_ranges() """ - def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_options = None, **kwargs): + def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_options=None, **kwargs): """ Given the sorted ranges and a collection, Returns the list of overlapping partition key ranges @@ -212,13 +207,9 @@ def get_overlapping_ranges(self, collection_link, partition_key_ranges, feed_opt else: queryRange = currentProvidedRange - overlappingRanges = ( - PartitionKeyRangeCache.get_overlapping_ranges( - self, - collection_link, - [queryRange], - feed_options, - **kwargs)) + overlappingRanges = PartitionKeyRangeCache.get_overlapping_ranges( + self, collection_link, [queryRange], feed_options, **kwargs + ) assert overlappingRanges, "code bug: returned overlapping ranges for queryRange {} is empty".format( queryRange ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py index aa16a49ad1f3..665a5ddc7447 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_routing/routing_range.py @@ -22,6 +22,7 @@ """Internal class for partition key range implementation in the Azure Cosmos database service. """ + import base64 import binascii import json @@ -98,7 +99,7 @@ def to_dict(self): self.MinPath: self.min, self.MaxPath: self.max, self.IsMinInclusivePath: self.isMinInclusive, - self.IsMaxInclusivePath: self.isMaxInclusive + self.IsMaxInclusivePath: self.isMaxInclusive, } def to_normalized_range(self): @@ -122,7 +123,7 @@ def add_to_effective_partition_key(self, effective_partition_key: str, value: in byte_array = self.hex_binary_to_byte_array(effective_partition_key) if value == 1: - for i in range(len(byte_array) -1, -1, -1): + for i in range(len(byte_array) - 1, -1, -1): if byte_array[i] < 255: byte_array[i] += 1 break @@ -147,7 +148,7 @@ def hex_binary_to_byte_array(self, hex_binary_string: str): @classmethod def from_base64_encoded_json_string(cls, data: str): try: - feed_range_json_string = base64.b64decode(data, validate=True).decode('utf-8') + feed_range_json_string = base64.b64decode(data, validate=True).decode("utf-8") feed_range_json = json.loads(feed_range_json_string) return cls.ParseFromDict(feed_range_json) except Exception as exc: @@ -155,11 +156,11 @@ def from_base64_encoded_json_string(cls, data: str): def to_base64_encoded_string(self): data_json = json.dumps(self.to_dict()) - json_bytes = data_json.encode('utf-8') + json_bytes = data_json.encode("utf-8") # Encode the bytes to a Base64 string base64_bytes = base64.b64encode(json_bytes) # Convert the Base64 bytes to a string - return base64_bytes.decode('utf-8') + return base64_bytes.decode("utf-8") def isSingleValue(self): return self.isMinInclusive and self.isMaxInclusive and self.min == self.max @@ -211,7 +212,7 @@ def overlaps(range1, range2): return True return False - def can_merge(self, other: 'Range') -> bool: + def can_merge(self, other: "Range") -> bool: if self.isSingleValue() and other.isSingleValue(): return self.min == other.min # if share the same boundary, they can merge @@ -221,7 +222,7 @@ def can_merge(self, other: 'Range') -> bool: return True return self.overlaps(self, other) - def merge(self, other: 'Range') -> 'Range': + def merge(self, other: "Range") -> "Range": if not self.can_merge(other): raise ValueError("Ranges do not overlap") min_val = self.min if self.min < other.min else other.min @@ -230,21 +231,22 @@ def merge(self, other: 'Range') -> 'Range': is_max_inclusive = self.isMaxInclusive if self.max > other.max else other.isMaxInclusive return Range(min_val, max_val, is_min_inclusive, is_max_inclusive) - def is_subset(self, parent_range: 'Range') -> bool: + def is_subset(self, parent_range: "Range") -> bool: normalized_parent_range = parent_range.to_normalized_range() normalized_child_range = self.to_normalized_range() - return (normalized_parent_range.min <= normalized_child_range.min and - normalized_parent_range.max >= normalized_child_range.max) + return ( + normalized_parent_range.min <= normalized_child_range.min + and normalized_parent_range.max >= normalized_child_range.max + ) + class PartitionKeyRangeWrapper(object): - """Internal class for a representation of a unique partition for an account - """ + """Internal class for a representation of a unique partition for an account""" def __init__(self, partition_key_range: Range, collection_rid: str) -> None: self.partition_key_range = partition_key_range self.collection_rid = collection_rid - def __str__(self) -> str: return ( f"PartitionKeyRangeWrapper(" diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py index 249702ebb014..684fa3fc2282 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_runtime_constants.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Runtime Constants in the Azure Cosmos database service. -""" +"""Runtime Constants in the Azure Cosmos database service.""" class MediaTypes(object): diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_service_request_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_service_request_retry_policy.py index 07aa2fd63549..1cbe8ae06a05 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_service_request_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_service_request_retry_policy.py @@ -10,6 +10,7 @@ from azure.cosmos.documents import _OperationType from azure.cosmos.http_constants import ResourceType + class ServiceRequestRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, *args): @@ -25,12 +26,15 @@ def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, if _OperationType.IsReadOnlyOperation(self.request.operation_type): self.total_retries = len( self.global_endpoint_manager.location_cache._get_applicable_read_regional_routing_contexts( - self.request)) + self.request + ) + ) else: self.total_retries = len( self.global_endpoint_manager.location_cache._get_applicable_write_regional_routing_contexts( - self.request)) - + self.request + ) + ) def ShouldRetry(self): # pylint: disable=too-many-return-statements """Returns true if the request should retry based on preferred regions and retries already done. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_service_response_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_service_response_retry_policy.py index bafa9f1a2777..c8368f5bed42 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_service_response_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_service_response_retry_policy.py @@ -6,10 +6,12 @@ from the service, and as such we do not know what the output of the operation was. As such, we only do cross regional retries for read operations. """ -#cspell:ignore PPAF, ppaf + +# cspell:ignore PPAF, ppaf from azure.cosmos.documents import _OperationType + class ServiceResponseRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, *args): @@ -25,8 +27,9 @@ def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, # If the request is a write operation, we set the maximum retry count to be the number of # write retries provided by the customer. self.max_write_retry_count = self.request.retry_write - self.location_endpoint = (self.global_endpoint_manager - .resolve_service_endpoint_for_partition(self.request, pk_range_wrapper)) + self.location_endpoint = self.global_endpoint_manager.resolve_service_endpoint_for_partition( + self.request, pk_range_wrapper + ) def ShouldRetry(self): """Returns true if the request should retry based on preferred regions and retries already done. @@ -38,8 +41,9 @@ def ShouldRetry(self): return False # Check if the next retry about to be done is safe - if ((self.failover_retry_count + 1) >= self.total_retries and - _OperationType.IsReadOnlyOperation(self.request.operation_type)): + if (self.failover_retry_count + 1) >= self.total_retries and _OperationType.IsReadOnlyOperation( + self.request.operation_type + ): return False if self.request: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_service_unavailable_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_service_unavailable_retry_policy.py index a210f9348f89..f6363e901527 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_service_unavailable_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_service_unavailable_retry_policy.py @@ -7,18 +7,15 @@ the service. In either case, we know the request did not get processed successfully, so service unavailable errors are retried in the next available preferred region. """ + from azure.cosmos.documents import _OperationType from azure.cosmos.exceptions import CosmosHttpResponseError -#cspell:ignore ppaf +# cspell:ignore ppaf + class _ServiceUnavailableRetryPolicy(object): - def __init__( - self, - connection_policy, - global_endpoint_manager, - pk_range_wrapper, - *args): + def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, *args): self.retry_after_in_milliseconds = 500 self.global_endpoint_manager = global_endpoint_manager self.pk_range_wrapper = pk_range_wrapper @@ -26,11 +23,13 @@ def __init__( self.connection_policy = connection_policy self.request = args[0] if args else None # If an account only has 1 region, then we still want to retry once on the same region - self._max_retry_attempt_count = len(self.global_endpoint_manager. - location_cache.read_regional_routing_contexts) + 1 + self._max_retry_attempt_count = ( + len(self.global_endpoint_manager.location_cache.read_regional_routing_contexts) + 1 + ) if self.request and _OperationType.IsWriteOperation(self.request.operation_type): - self._max_retry_attempt_count = len(self.global_endpoint_manager.location_cache. - write_regional_routing_contexts) + 1 + self._max_retry_attempt_count = ( + len(self.global_endpoint_manager.location_cache.write_regional_routing_contexts) + 1 + ) def ShouldRetry(self, _exception: CosmosHttpResponseError): """Returns true if the request should retry based on the passed-in exception. @@ -53,11 +52,16 @@ def ShouldRetry(self, _exception: CosmosHttpResponseError): # and resolve the service endpoint for the partition range - otherwise, continue the default retry logic if self.global_endpoint_manager.is_per_partition_automatic_failover_applicable(self.request): partition_level_info = self.global_endpoint_manager.partition_range_to_failover_info[ - self.pk_range_wrapper] + self.pk_range_wrapper + ] location = self.global_endpoint_manager.location_cache.get_location_from_endpoint( - str(self.request.location_endpoint_to_route)) - regional_context = (self.global_endpoint_manager.location_cache. - account_read_regional_routing_contexts_by_location.get(location)) + str(self.request.location_endpoint_to_route) + ) + regional_context = ( + self.global_endpoint_manager.location_cache.account_read_regional_routing_contexts_by_location.get( + location + ) + ) partition_level_info.unavailable_regional_endpoints[location] = regional_context self.global_endpoint_manager.resolve_service_endpoint_for_partition(self.request, self.pk_range_wrapper) return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py index 60751c7005e2..fd064baf81ad 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Session Consistency Tracking in the Azure Cosmos database service. -""" +"""Session Consistency Tracking in the Azure Cosmos database service.""" import logging import sys @@ -40,6 +39,7 @@ logger = logging.getLogger("azure.cosmos.SessionContainer") + class SessionContainer(object): def __init__(self): self.collection_name_to_rid = {} @@ -47,13 +47,13 @@ def __init__(self): self.session_lock = threading.RLock() def get_session_token( - self, - resource_path: str, - pk_value: Any, - container_properties_cache: dict[str, dict[str, Any]], - routing_map_provider: SmartRoutingMapProvider, - partition_key_range_id: Optional[int], - options: dict[str, Any] + self, + resource_path: str, + pk_value: Any, + container_properties_cache: dict[str, dict[str, Any]], + routing_map_provider: SmartRoutingMapProvider, + partition_key_range_id: Optional[int], + options: dict[str, Any], ) -> str: """Get Session Token for the given collection and partition key information. @@ -91,8 +91,9 @@ def get_session_token( else: collection_rid = _base.GetItemContainerLink(resource_path) - if collection_rid in self.rid_to_session_token and (collection_name in container_properties_cache or - collection_rid in container_properties_cache): + if collection_rid in self.rid_to_session_token and ( + collection_name in container_properties_cache or collection_rid in container_properties_cache + ): token_dict = self.rid_to_session_token[collection_rid] if partition_key_range_id is not None: # if we find a cached session token for the relevant pk range id, use that session token @@ -102,25 +103,27 @@ def get_session_token( # if we don't find it, we do a session token merge for the parent pk ranges # this should only happen immediately after a partition split else: - container_routing_map = \ - routing_map_provider._collection_routing_map_by_item[collection_name] + container_routing_map = routing_map_provider._collection_routing_map_by_item[ + collection_name + ] current_range = container_routing_map._rangeById.get(partition_key_range_id) if current_range is not None: - vector_session_token = self._resolve_partition_local_session_token(current_range, - token_dict) + vector_session_token = self._resolve_partition_local_session_token( + current_range, token_dict + ) if vector_session_token is not None: session_token = "{0}:{1}".format(partition_key_range_id, vector_session_token) elif pk_value is not None: collection_pk_definition = container_properties_cache[collection_name]["partitionKey"] - partition_key = PartitionKey(path=collection_pk_definition['paths'], - kind=collection_pk_definition['kind'], - version=collection_pk_definition['version']) + partition_key = PartitionKey( + path=collection_pk_definition["paths"], + kind=collection_pk_definition["kind"], + version=collection_pk_definition["version"], + ) epk_range = partition_key._get_epk_range_for_partition_key(pk_value=pk_value) - pk_range = routing_map_provider.get_overlapping_ranges(collection_name, - [epk_range], - options) + pk_range = routing_map_provider.get_overlapping_ranges(collection_name, [epk_range], options) if len(pk_range) > 0: - partition_key_range_id = pk_range[0]['id'] + partition_key_range_id = pk_range[0]["id"] vector_session_token = self._resolve_partition_local_session_token(pk_range, token_dict) if vector_session_token is not None: session_token = "{0}:{1}".format(partition_key_range_id, vector_session_token) @@ -140,13 +143,13 @@ def get_session_token( return "" async def get_session_token_async( - self, - resource_path: str, - pk_value: Any, - container_properties_cache: dict[str, dict[str, Any]], - routing_map_provider: SmartRoutingMapProviderAsync, - partition_key_range_id: Optional[str], - options: dict[str, Any] + self, + resource_path: str, + pk_value: Any, + container_properties_cache: dict[str, dict[str, Any]], + routing_map_provider: SmartRoutingMapProviderAsync, + partition_key_range_id: Optional[str], + options: dict[str, Any], ) -> str: """Get Session Token for the given collection and partition key information. @@ -184,37 +187,41 @@ async def get_session_token_async( else: collection_rid = _base.GetItemContainerLink(resource_path) - if collection_rid in self.rid_to_session_token and (collection_name in container_properties_cache or - collection_rid in container_properties_cache): + if collection_rid in self.rid_to_session_token and ( + collection_name in container_properties_cache or collection_rid in container_properties_cache + ): token_dict = self.rid_to_session_token[collection_rid] if partition_key_range_id is not None: # if we find a cached session token for the relevant pk range id, use that session token if token_dict.get(partition_key_range_id): vector_session_token = token_dict.get(partition_key_range_id) - session_token = "{0}:{1}".format(partition_key_range_id, - vector_session_token.session_token) + session_token = "{0}:{1}".format(partition_key_range_id, vector_session_token.session_token) # if we don't find it, we do a session token merge for the parent pk ranges # this should only happen immediately after a partition split else: - container_routing_map = \ - routing_map_provider._collection_routing_map_by_item[collection_name] + container_routing_map = routing_map_provider._collection_routing_map_by_item[ + collection_name + ] current_range = container_routing_map._rangeById.get(partition_key_range_id) if current_range is not None: - vector_session_token = self._resolve_partition_local_session_token(current_range, - token_dict) + vector_session_token = self._resolve_partition_local_session_token( + current_range, token_dict + ) if vector_session_token is not None: session_token = "{0}:{1}".format(partition_key_range_id, vector_session_token) elif pk_value is not None: collection_pk_definition = container_properties_cache[collection_name]["partitionKey"] - partition_key = PartitionKey(path=collection_pk_definition['paths'], - kind=collection_pk_definition['kind'], - version=collection_pk_definition['version']) + partition_key = PartitionKey( + path=collection_pk_definition["paths"], + kind=collection_pk_definition["kind"], + version=collection_pk_definition["version"], + ) epk_range = partition_key._get_epk_range_for_partition_key(pk_value=pk_value) - pk_range = await routing_map_provider.get_overlapping_ranges(collection_name, - [epk_range], - options) + pk_range = await routing_map_provider.get_overlapping_ranges( + collection_name, [epk_range], options + ) if len(pk_range) > 0: - partition_key_range_id = pk_range[0]['id'] + partition_key_range_id = pk_range[0]["id"] vector_session_token = self._resolve_partition_local_session_token(pk_range, token_dict) if vector_session_token is not None: session_token = "{0}:{1}".format(partition_key_range_id, vector_session_token) @@ -266,8 +273,9 @@ def set_session_token(self, client_connection, response_result, response_headers else: return if self_link is not None: - collection_rid, collection_name = _base.GetItemContainerInfo(self_link, alt_content_path, - response_result_id) + collection_rid, collection_name = _base.GetItemContainerInfo( + self_link, alt_content_path, response_result_id + ) else: # if for whatever reason we don't have a _self link at this point, we use the container name collection_name = alt_content_path @@ -276,8 +284,9 @@ def set_session_token(self, client_connection, response_result, response_headers partition_key_range_id = response_headers.get(http_constants.HttpHeaders.PartitionKeyRangeID) collection_ranges = None if client_connection: - collection_ranges = \ - client_connection._routing_map_provider._collection_routing_map_by_item.get(collection_name) + collection_ranges = client_connection._routing_map_provider._collection_routing_map_by_item.get( + collection_name + ) if collection_ranges and not collection_ranges._rangeById.get(partition_key_range_id): client_connection.refresh_routing_map_provider() except ValueError: @@ -364,8 +373,8 @@ def parse_session_token(response_headers): def _resolve_partition_local_session_token(self, pk_range, token_dict): parent_session_token = None - parents = pk_range[0].get('parents').copy() - parents.append(pk_range[0]['id']) + parents = pk_range[0].get("parents").copy() + parents.append(pk_range[0]["id"]) for parent in parents: session_token = token_dict.get(parent) if session_token is not None: @@ -400,16 +409,16 @@ def clear_session_token(self, response_headers): def update_session(self, client_connection, response_result, response_headers): self.session_container.set_session_token(client_connection, response_result, response_headers) - def get_session_token(self, resource_path, pk_value, container_properties_cache, routing_map_provider, - partition_key_range_id, options): - return self.session_container.get_session_token(resource_path, pk_value, container_properties_cache, - routing_map_provider, partition_key_range_id, options) - - async def get_session_token_async(self, resource_path, pk_value, container_properties_cache, routing_map_provider, - partition_key_range_id, options): - return await self.session_container.get_session_token_async(resource_path, - pk_value, - container_properties_cache, - routing_map_provider, - partition_key_range_id, - options) + def get_session_token( + self, resource_path, pk_value, container_properties_cache, routing_map_provider, partition_key_range_id, options + ): + return self.session_container.get_session_token( + resource_path, pk_value, container_properties_cache, routing_map_provider, partition_key_range_id, options + ) + + async def get_session_token_async( + self, resource_path, pk_value, container_properties_cache, routing_map_provider, partition_key_range_id, options + ): + return await self.session_container.get_session_token_async( + resource_path, pk_value, container_properties_cache, routing_map_provider, partition_key_range_id, options + ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py index e11cb4838047..0fb46666b441 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_retry_policy.py @@ -22,12 +22,13 @@ """Internal class for session read/write unavailable retry policy implementation in the Azure Cosmos database service. """ + # cspell:disable from azure.cosmos.documents import _OperationType + class _SessionRetryPolicy(object): - """The session retry policy used to handle read/write session unavailability. - """ + """The session retry policy used to handle read/write session unavailability.""" Max_retry_attempt_count = 1 Retry_after_in_milliseconds = 0 @@ -49,8 +50,9 @@ def __init__(self, endpoint_discovery_enable, global_endpoint_manager, pk_range_ # Resolve the endpoint for the request and pin the resolution to the resolved endpoint # This enables marking the endpoint unavailability on endpoint failover/unreachability - self.location_endpoint = (self.global_endpoint_manager - .resolve_service_endpoint_for_partition(self.request, self.pk_range_wrapper)) + self.location_endpoint = self.global_endpoint_manager.resolve_service_endpoint_for_partition( + self.request, self.pk_range_wrapper + ) self.request.route_to_location(self.location_endpoint) def ShouldRetry(self, _exception): @@ -87,8 +89,9 @@ def ShouldRetry(self, _exception): # Resolve the endpoint for the request and pin the resolution to the resolved endpoint # This enables marking the endpoint unavailability on endpoint failover/unreachability - self.location_endpoint = (self.global_endpoint_manager - .resolve_service_endpoint_for_partition(self.request, self.pk_range_wrapper)) + self.location_endpoint = self.global_endpoint_manager.resolve_service_endpoint_for_partition( + self.request, self.pk_range_wrapper + ) self.request.route_to_location(self.location_endpoint) return True @@ -106,20 +109,22 @@ def ShouldRetry(self, _exception): pk_failover_info = self.global_endpoint_manager.partition_range_to_failover_info.get(self.pk_range_wrapper) if pk_failover_info is not None: location = self.global_endpoint_manager.location_cache.get_location_from_endpoint( - str(self.request.location_endpoint_to_route)) + str(self.request.location_endpoint_to_route) + ) if location in pk_failover_info.unavailable_regional_endpoints: # If the request endpoint is unavailable, we need to resolve the endpoint for the request using the # partition-level failover info if pk_failover_info.current_region is not None: - location_endpoint = (self.global_endpoint_manager.location_cache. - account_read_regional_routing_contexts_by_location. - get(pk_failover_info.current_region).primary_endpoint) + location_endpoint = self.global_endpoint_manager.location_cache.account_read_regional_routing_contexts_by_location.get( + pk_failover_info.current_region + ).primary_endpoint self.request.route_to_location(location_endpoint) return True # Resolve the endpoint for the request and pin the resolution to the resolved endpoint # This enables marking the endpoint unavailability on endpoint failover/unreachability - self.location_endpoint = (self.global_endpoint_manager - .resolve_service_endpoint_for_partition(self.request, self.pk_range_wrapper)) + self.location_endpoint = self.global_endpoint_manager.resolve_service_endpoint_for_partition( + self.request, self.pk_range_wrapper + ) self.request.route_to_location(self.location_endpoint) return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_session_token_helpers.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_token_helpers.py index a4fc75c9f378..ca3c70d1770d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_session_token_helpers.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_session_token_helpers.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal Helper functions for manipulating session tokens. -""" +"""Internal Helper functions for manipulating session tokens.""" + from typing import Tuple, Any from azure.cosmos._routing.routing_range import Range @@ -45,18 +45,22 @@ def merge_session_tokens_with_same_range(session_token1: str, session_token2: st # Then we input this back into get_updated_session_token after a merge happened # get_updated_session_token([(("AA", "DD"), "1:1#51"), (("AA", "DD"), "0:1#55")], ("AA", "DD")) -> "0:1#55" if pk_range_id1 != pk_range_id2: - pk_range_id = pk_range_id1 \ - if vector_session_token1.global_lsn > vector_session_token2.global_lsn else pk_range_id2 + pk_range_id = ( + pk_range_id1 if vector_session_token1.global_lsn > vector_session_token2.global_lsn else pk_range_id2 + ) vector_session_token = vector_session_token1.merge(vector_session_token2) - return pk_range_id + ":" + vector_session_token.session_token + return pk_range_id + ":" + vector_session_token.session_token + def is_compound_session_token(session_token: str) -> bool: return "," in session_token + def parse_session_token(session_token: str) -> Tuple[str, VectorSessionToken]: tokens = session_token.split(":") return tokens[0], VectorSessionToken.create(tokens[1]) + def split_compound_session_tokens(compound_session_tokens: list[Tuple[Range, str]]) -> list[str]: session_tokens = [] for _, session_token in compound_session_tokens: @@ -68,6 +72,7 @@ def split_compound_session_tokens(compound_session_tokens: list[Tuple[Range, str session_tokens.append(session_token) return session_tokens + # ex inputs: # ["1:1#51", "1:1#55", "1:1#57", "2:1#42", "2:1#45", "2:1#47"] -> ["1:1#57", "2:1#47"] def merge_session_tokens_for_same_partition(session_tokens: list[str]) -> list[str]: @@ -89,6 +94,7 @@ def merge_session_tokens_for_same_partition(session_tokens: list[str]) -> list[s return processed_session_tokens + # ex inputs: # merge scenario # 1. [(("AA", "BB"), "1:1#51"), (("BB", "DD"), "2:1#51"), (("AA", "DD"), "3:1#55")] -> @@ -102,7 +108,7 @@ def merge_session_tokens_for_same_partition(session_tokens: list[str]) -> list[s # compound session tokens are not considered will just pass them along def merge_ranges_with_subsets(overlapping_ranges: list[Tuple[Range, str]]) -> list[Tuple[Range, str]]: processed_ranges = [] - while len(overlapping_ranges) != 0: # pylint: disable=too-many-nested-blocks + while len(overlapping_ranges) != 0: # pylint: disable=too-many-nested-blocks feed_range_cmp, session_token_cmp = overlapping_ranges[0] # compound session tokens are not considered for merging if is_compound_session_token(session_token_cmp): @@ -114,8 +120,7 @@ def merge_ranges_with_subsets(overlapping_ranges: list[Tuple[Range, str]]) -> li # finding the subset feed ranges of the current feed range for j in range(1, len(overlapping_ranges)): feed_range = overlapping_ranges[j][0] - if not is_compound_session_token(overlapping_ranges[j][1]) and \ - feed_range.is_subset(feed_range_cmp): + if not is_compound_session_token(overlapping_ranges[j][1]) and feed_range.is_subset(feed_range_cmp): subsets.append(overlapping_ranges[j] + (j,)) # go through subsets to see if can create current feed range from the subsets @@ -153,11 +158,11 @@ def merge_ranges_with_subsets(overlapping_ranges: list[Tuple[Range, str]]) -> li for feed_range_to_remove in feed_ranges_to_remove: overlapping_ranges.remove(feed_range_to_remove) if children_more_updated: - overlapping_ranges.append((merged_range, ','.join(map(str, session_tokens)))) + overlapping_ranges.append((merged_range, ",".join(map(str, session_tokens)))) overlapping_ranges.remove(overlapping_ranges[0]) elif not parent_more_updated and not children_more_updated: session_tokens.append(session_token_cmp) - overlapping_ranges.append((merged_range, ','.join(map(str, session_tokens)))) + overlapping_ranges.append((merged_range, ",".join(map(str, session_tokens)))) not_found = False break @@ -167,8 +172,10 @@ def merge_ranges_with_subsets(overlapping_ranges: list[Tuple[Range, str]]) -> li overlapping_ranges.remove(overlapping_ranges[0]) return processed_ranges -def get_latest_session_token(feed_ranges_to_session_tokens: list[Tuple[dict[str, Any], str]], - target_feed_range: dict[str, Any]): + +def get_latest_session_token( + feed_ranges_to_session_tokens: list[Tuple[dict[str, Any], str]], target_feed_range: dict[str, Any] +): target_feed_range_epk = FeedRangeInternalEpk.from_json(target_feed_range) target_feed_range_normalized = target_feed_range_epk.get_normalized_range() @@ -176,13 +183,11 @@ def get_latest_session_token(feed_ranges_to_session_tokens: list[Tuple[dict[str, overlapping_ranges = [] for feed_range_to_session_token in feed_ranges_to_session_tokens: feed_range_epk = FeedRangeInternalEpk.from_json(feed_range_to_session_token[0]) - if Range.overlaps(target_feed_range_normalized, - feed_range_epk.get_normalized_range()): - overlapping_ranges.append((feed_range_epk.get_normalized_range(), - feed_range_to_session_token[1])) + if Range.overlaps(target_feed_range_normalized, feed_range_epk.get_normalized_range()): + overlapping_ranges.append((feed_range_epk.get_normalized_range(), feed_range_to_session_token[1])) if len(overlapping_ranges) == 0: - raise ValueError('There were no overlapping feed ranges with the target.') + raise ValueError("There were no overlapping feed ranges with the target.") # merge any session tokens that are the same exact feed range i = 0 @@ -191,9 +196,11 @@ def get_latest_session_token(feed_ranges_to_session_tokens: list[Tuple[dict[str, cur_feed_range = overlapping_ranges[i][0] session_token = overlapping_ranges[i][1] session_token_1 = overlapping_ranges[j][1] - if (not is_compound_session_token(session_token) and - not is_compound_session_token(session_token_1) and - cur_feed_range == overlapping_ranges[j][0]): + if ( + not is_compound_session_token(session_token) + and not is_compound_session_token(session_token_1) + and cur_feed_range == overlapping_ranges[j][0] + ): session_token = merge_session_tokens_with_same_range(session_token, session_token_1) feed_ranges_to_remove = [overlapping_ranges[i], overlapping_ranges[j]] for feed_range_to_remove in feed_ranges_to_remove: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py index 7b18f52da2e2..5601dbecffcd 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_synchronized_request.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Synchronized request in the Azure Cosmos database service. -""" +"""Synchronized request in the Azure Cosmos database service.""" + import copy import json import time @@ -36,6 +36,7 @@ from ._request_object import RequestObject from .documents import _OperationType + # cspell:ignore ppaf def _is_readable_stream(obj): """Checks whether obj is a file-like readable stream. @@ -69,7 +70,9 @@ def _request_body_from_data(data): return None -def _Request(global_endpoint_manager, request_params, connection_policy, pipeline_client, request, **kwargs): # pylint: disable=too-many-statements +def _Request( + global_endpoint_manager, request_params, connection_policy, pipeline_client, request, **kwargs +): # pylint: disable=too-many-statements """Makes one http request using the requests module. :param _GlobalEndpointManager global_endpoint_manager: @@ -94,7 +97,7 @@ def _Request(global_endpoint_manager, request_params, connection_policy, pipelin read_timeout = kwargs.pop("read_timeout", read_timeout) # Every request tries to perform a refresh - client_timeout = kwargs.get('timeout') + client_timeout = kwargs.get("timeout") start_time = time.time() if request_params.healthy_tentative_location: read_timeout = connection_policy.RecoveryReadTimeout @@ -109,16 +112,17 @@ def _Request(global_endpoint_manager, request_params, connection_policy, pipelin read_timeout = request_params.read_timeout_override if client_timeout is not None: - kwargs['timeout'] = client_timeout - (time.time() - start_time) - if kwargs['timeout'] <= 0: + kwargs["timeout"] = client_timeout - (time.time() - start_time) + if kwargs["timeout"] <= 0: raise exceptions.CosmosClientTimeoutError() if request_params.endpoint_override: base_url = request_params.endpoint_override else: pk_range_wrapper = None - if (global_endpoint_manager.is_circuit_breaker_applicable(request_params) or - global_endpoint_manager.is_per_partition_automatic_failover_applicable(request_params)): + if global_endpoint_manager.is_circuit_breaker_applicable( + request_params + ) or global_endpoint_manager.is_per_partition_automatic_failover_applicable(request_params): # Circuit breaker or per-partition failover are applicable, so we need to use the endpoint from the request pk_range_wrapper = global_endpoint_manager.create_pk_range_wrapper(request_params) base_url = global_endpoint_manager.resolve_service_endpoint_for_partition(request_params, pk_range_wrapper) @@ -193,34 +197,32 @@ def _Request(global_endpoint_manager, request_params, connection_policy, pipelin try: result = json.loads(data) except Exception as e: - raise DecodeError( - message="Failed to decode JSON data: {}".format(e), - response=response, - error=e) from e + raise DecodeError(message="Failed to decode JSON data: {}".format(e), response=response, error=e) from e return result, headers def _is_availability_strategy_applicable(request_params: RequestObject) -> bool: """Determine if availability strategy should be applied to the request. - + :param request_params: Request parameters containing operation details :type request_params: ~azure.cosmos._request_object.RequestObject :returns: True if availability strategy should be applied, False otherwise :rtype: bool """ - return (request_params.availability_strategy is not None and - not request_params.is_hedging_request and - request_params.resource_type == http_constants.ResourceType.Document and - (not _OperationType.IsWriteOperation(request_params.operation_type) or - request_params.retry_write > 0)) + return ( + request_params.availability_strategy is not None + and not request_params.is_hedging_request + and request_params.resource_type == http_constants.ResourceType.Document + and (not _OperationType.IsWriteOperation(request_params.operation_type) or request_params.retry_write > 0) + ) def _replace_url_prefix(original_url, new_prefix): - parts = original_url.split('/', 3) + parts = original_url.split("/", 3) - if not new_prefix.endswith('/'): - new_prefix += '/' + if not new_prefix.endswith("/"): + new_prefix += "/" new_url = new_prefix + parts[3] if len(parts) > 3 else new_prefix @@ -232,15 +234,9 @@ def _PipelineRunFunction(pipeline_client, request, **kwargs): return pipeline_client._pipeline.run(request, **kwargs) + def SynchronizedRequest( - client, - request_params, - global_endpoint_manager, - connection_policy, - pipeline_client, - request, - request_data, - **kwargs + client, request_params, global_endpoint_manager, connection_policy, pipeline_client, request, request_data, **kwargs ): """Performs one synchronized http request according to the parameters. @@ -273,25 +269,11 @@ def SynchronizedRequest( global_endpoint_manager, request, lambda req_param, r: _retry_utility.Execute( - client, - global_endpoint_manager, - _Request, - req_param, - connection_policy, - pipeline_client, - r, - **kwargs - ) + client, global_endpoint_manager, _Request, req_param, connection_policy, pipeline_client, r, **kwargs + ), ) # Pass _Request function with its parameters to retry_utility's Execute method that wraps the call with retries return _retry_utility.Execute( - client, - global_endpoint_manager, - _Request, - request_params, - connection_policy, - pipeline_client, - request, - **kwargs + client, global_endpoint_manager, _Request, request_params, connection_policy, pipeline_client, request, **kwargs ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_timeout_failover_retry_policy.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_timeout_failover_retry_policy.py index 801dd350e121..99360101933c 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_timeout_failover_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_timeout_failover_retry_policy.py @@ -4,10 +4,12 @@ """Internal class for timeout failover retry policy implementation in the Azure Cosmos database service. """ + from azure.cosmos.documents import _OperationType # cspell:ignore PPAF, ppaf + class _TimeoutFailoverRetryPolicy(object): def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, *args): @@ -20,9 +22,10 @@ def __init__(self, connection_policy, global_endpoint_manager, pk_range_wrapper, # If an account only has 1 region, then we still want to retry once on the same region # We want this to be the default retry attempts as paging through a query means there are requests without # a request object - self._max_retry_attempt_count = len(self.global_endpoint_manager. - location_cache.read_regional_routing_contexts) + 1 - # If the request is a write operation, we only want to retry as many times as retry_write + self._max_retry_attempt_count = ( + len(self.global_endpoint_manager.location_cache.read_regional_routing_contexts) + 1 + ) + # If the request is a write operation, we only want to retry as many times as retry_write if self.request and _OperationType.IsWriteOperation(self.request.operation_type): self._max_retry_attempt_count = self.request.retry_write self.retry_count = 0 @@ -52,8 +55,9 @@ def ShouldRetry(self, _exception): # second check here ensures we only do cross-regional retries for read requests # non-idempotent write retries should only be retried once, using preferred locations if available (MM) - if self.request and (self.is_operation_retryable() - or self.global_endpoint_manager.can_use_multiple_write_locations(self.request)): + if self.request and ( + self.is_operation_retryable() or self.global_endpoint_manager.can_use_multiple_write_locations(self.request) + ): location_endpoint = self.resolve_next_region_service_endpoint() self.request.route_to_location(location_endpoint) return True diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py index 12ff8cd118e6..297d18c2530f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_utils.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal Helper functions in the Azure Cosmos database service. -""" +"""Internal Helper functions in the Azure Cosmos database service.""" import base64 import json @@ -35,6 +34,7 @@ # cspell:ignore ppcb # pylint: disable=protected-access + def get_user_agent(suffix: Optional[str] = None) -> str: os_name = safe_user_agent_header(platform.platform()) python_version = safe_user_agent_header(platform.python_version()) @@ -43,6 +43,7 @@ def get_user_agent(suffix: Optional[str] = None) -> str: user_agent += f" {suffix}" return user_agent + def get_user_agent_async(suffix: Optional[str] = None) -> str: os_name = safe_user_agent_header(platform.platform()) python_version = safe_user_agent_header(platform.python_version()) @@ -69,7 +70,7 @@ def get_index_metrics_info(delimited_string: Optional[str] = None) -> dict[str, # Decode the base64 string to bytes bytes_string = base64.b64decode(delimited_string) # Decode the bytes to a string using UTF-8 encoding - decoded_string = bytes_string.decode('utf-8') + decoded_string = bytes_string.decode("utf-8") # Python's json.loads method is used for deserialization result = json.loads(decoded_string) or {} @@ -77,14 +78,12 @@ def get_index_metrics_info(delimited_string: Optional[str] = None) -> dict[str, except (json.JSONDecodeError, ValueError): return {} + def current_time_millis() -> int: return int(round(time.time() * 1000)) -def add_args_to_kwargs( - arg_names: list[str], - args: Tuple[Any, ...], - kwargs: dict[str, Any] - ) -> None: + +def add_args_to_kwargs(arg_names: list[str], args: Tuple[Any, ...], kwargs: dict[str, Any]) -> None: """Add positional arguments(args) to keyword argument dictionary(kwargs) using names in arg_names as keys. To be backward-compatible, some expected positional arguments has to be allowed. This method will verify number of maximum positional arguments and add them to the keyword argument dictionary(kwargs) @@ -95,8 +94,10 @@ def add_args_to_kwargs( """ if len(args) > len(arg_names): - raise ValueError(f"Positional argument is out of range. Expected {len(arg_names)} arguments, " - f"but got {len(args)} instead. Please review argument list in API documentation.") + raise ValueError( + f"Positional argument is out of range. Expected {len(arg_names)} arguments, " + f"but got {len(args)} instead. Please review argument list in API documentation." + ) for name, arg in zip(arg_names, args): if name in kwargs: @@ -121,9 +122,8 @@ def format_list_with_and(items: list[str]) -> str: formatted_items = quoted[0] return formatted_items -def verify_exclusive_arguments( - exclusive_keys: list[str], - **kwargs: dict[str, Any]) -> None: + +def verify_exclusive_arguments(exclusive_keys: list[str], **kwargs: dict[str, Any]) -> None: """Verify if exclusive arguments are present in kwargs. For some Cosmos SDK APIs, some arguments are exclusive, or cannot be used at the same time. This method will verify that and raise an error if exclusive arguments are present. @@ -133,13 +133,12 @@ def verify_exclusive_arguments( keys_in_kwargs = [key for key in exclusive_keys if key in kwargs and kwargs[key] is not None] if len(keys_in_kwargs) > 1: - raise ValueError(f"{format_list_with_and(keys_in_kwargs)} are exclusive parameters, " - f"please only set one of them.") + raise ValueError( + f"{format_list_with_and(keys_in_kwargs)} are exclusive parameters, " f"please only set one of them." + ) + -def valid_key_value_exist( - kwargs: dict[str, Any], - key: str, - invalid_value: Any = None) -> bool: +def valid_key_value_exist(kwargs: dict[str, Any], key: str, invalid_value: Any = None) -> bool: """Check if a valid key and value exists in kwargs. It always checks if the value is not None and it will remove from the kwargs the None value. @@ -160,7 +159,7 @@ def get_user_agent_features(global_endpoint_manager: Any) -> str: """ Check the account and client configurations in order to add feature flags to the user agent using bitmask logic and hex encoding (matching .NET/Java). - + :param Any global_endpoint_manager: The GlobalEndpointManager instance. :return: A string representing the user agent feature flags. :rtype: str @@ -171,8 +170,7 @@ def get_user_agent_features(global_endpoint_manager: Any) -> str: if global_endpoint_manager._database_account_cache._EnablePerPartitionFailoverBehavior is True: feature_flag |= _Constants.UserAgentFeatureFlags.PER_PARTITION_AUTOMATIC_FAILOVER ppcb_check = os.environ.get( - _Constants.CIRCUIT_BREAKER_ENABLED_CONFIG, - _Constants.CIRCUIT_BREAKER_ENABLED_CONFIG_DEFAULT + _Constants.CIRCUIT_BREAKER_ENABLED_CONFIG, _Constants.CIRCUIT_BREAKER_ENABLED_CONFIG_DEFAULT ).lower() if ppcb_check == "true" or feature_flag > 0: feature_flag |= _Constants.UserAgentFeatureFlags.PER_PARTITION_CIRCUIT_BREAKER diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py index 60ccf9508632..cf0afc117e64 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/_vector_session_token.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Session Consistency Tracking in the Azure Cosmos database service. -""" +"""Session Consistency Tracking in the Azure Cosmos database service.""" + import os from . import exceptions @@ -118,15 +118,21 @@ def equals(self, other): def merge(self, other: "VectorSessionToken"): if other is None: raise ValueError("Invalid Session Token (should not be None)") - false_progress_merge_enabled = (os.environ.get(_Constants.SESSION_TOKEN_FALSE_PROGRESS_MERGE_CONFIG, - _Constants.SESSION_TOKEN_FALSE_PROGRESS_MERGE_CONFIG_DEFAULT) - .lower() == "true") + false_progress_merge_enabled = ( + os.environ.get( + _Constants.SESSION_TOKEN_FALSE_PROGRESS_MERGE_CONFIG, + _Constants.SESSION_TOKEN_FALSE_PROGRESS_MERGE_CONFIG_DEFAULT, + ).lower() + == "true" + ) if self.version == other.version and len(self.local_lsn_by_region) != len(other.local_lsn_by_region): raise exceptions.CosmosHttpResponseError( status_code=_StatusCodes.INTERNAL_SERVER_ERROR, - message=("Compared session tokens '%s' and '%s' have unexpected regions." - % (self.session_token, other.session_token)) + message=( + "Compared session tokens '%s' and '%s' have unexpected regions." + % (self.session_token, other.session_token) + ), ) if self.version < other.version: @@ -152,8 +158,10 @@ def merge(self, other: "VectorSessionToken"): elif self.version == other.version: raise exceptions.CosmosHttpResponseError( status_code=_StatusCodes.INTERNAL_SERVER_ERROR, - message=("Compared session tokens '%s' and '%s' have unexpected regions." - % (self.session_token, other.session_token)) + message=( + "Compared session tokens '%s' and '%s' have unexpected regions." + % (self.session_token, other.session_token) + ), ) else: highest_local_lsn_by_region[region_id] = local_lsn1 @@ -161,9 +169,7 @@ def merge(self, other: "VectorSessionToken"): if false_progress_merge_enabled and self.version != other.version: global_lsn = session_token_with_higher_version.global_lsn - return VectorSessionToken( - max(self.version, other.version), global_lsn, highest_local_lsn_by_region - ) + return VectorSessionToken(max(self.version, other.version), global_lsn, highest_local_lsn_by_region) def convert_to_string(self): return self.session_token diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/__init__.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/__init__.py index 7d8ac99702e1..0e8d6cb5d2d4 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/__init__.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/__init__.py @@ -25,10 +25,4 @@ from ._user import UserProxy from ._scripts import ScriptsProxy -__all__ = ( - "CosmosClient", - "DatabaseProxy", - "ContainerProxy", - "ScriptsProxy", - "UserProxy" -) +__all__ = ("CosmosClient", "DatabaseProxy", "ContainerProxy", "ScriptsProxy", "UserProxy") diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_availability_strategy_handler.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_availability_strategy_handler.py index 77ac53a738db..de84788a78b1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_availability_strategy_handler.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_availability_strategy_handler.py @@ -20,6 +20,7 @@ # SOFTWARE. """Module for handling asynchronous request hedging strategies in Azure Cosmos DB.""" + import asyncio # pylint: disable=do-not-import-asyncio import copy import os @@ -29,17 +30,18 @@ from azure.core.pipeline.transport import HttpRequest # pylint: disable=no-legacy-azure-core-http-response-import -from ._global_partition_endpoint_manager_circuit_breaker_async import \ - _GlobalPartitionEndpointManagerForCircuitBreakerAsync +from ._global_partition_endpoint_manager_circuit_breaker_async import ( + _GlobalPartitionEndpointManagerForCircuitBreakerAsync, +) from .._availability_strategy_handler_base import AvailabilityStrategyHandlerMixin from .._request_object import RequestObject ResponseType = Tuple[Dict[str, Any], Dict[str, Any]] + class CrossRegionAsyncHedgingHandler(AvailabilityStrategyHandlerMixin): """Handler for CrossRegionHedgingStrategy that implements cross-region request hedging.""" - async def execute_single_request_with_delay( self, request_params: RequestObject, @@ -48,7 +50,7 @@ async def execute_single_request_with_delay( location_index: int, available_locations: List[str], complete_status: Event, - first_request_params_holder: SimpleNamespace + first_request_params_holder: SimpleNamespace, ) -> ResponseType: """Execute a single request with appropriate delay based on location index. @@ -95,8 +97,7 @@ async def execute_single_request_with_delay( else: # Subsequent requests after threshold steps steps = location_index - 1 - delay = (availability_strategy.threshold_ms+ - (steps * availability_strategy.threshold_steps_ms)) + delay = availability_strategy.threshold_ms + (steps * availability_strategy.threshold_steps_ms) if delay > 0: await asyncio.sleep(delay / 1000) @@ -108,9 +109,7 @@ async def execute_single_request_with_delay( # Setup excluded regions for hedging requests params.excluded_locations = self._create_excluded_regions_for_hedging( - location_index, - available_locations, - request_params.excluded_locations + location_index, available_locations, request_params.excluded_locations ) req = copy.deepcopy(request) @@ -128,7 +127,7 @@ async def execute_request( request_params: RequestObject, global_endpoint_manager: _GlobalPartitionEndpointManagerForCircuitBreakerAsync, request: HttpRequest, - execute_request_fn: Callable[..., Awaitable[ResponseType]] + execute_request_fn: Callable[..., Awaitable[ResponseType]], ) -> ResponseType: """Execute request with cross-region hedging strategy. @@ -174,8 +173,9 @@ async def execute_request( i, available_locations, completion_status, - first_request_params_holder - )) + first_request_params_holder, + ) + ) active_tasks.append(task) if i == 0: first_task = task @@ -196,8 +196,8 @@ async def execute_request( # successful response does not come from the initial request, record failure for it await self._record_cancel_for_first_request( - first_request_params_holder, - global_endpoint_manager) + first_request_params_holder, global_endpoint_manager + ) return result except Exception as e: # pylint: disable=broad-exception-caught if completed_task is first_task: @@ -206,8 +206,8 @@ async def execute_request( if self._is_non_transient_error(e): completion_status.set() await self._record_cancel_for_first_request( - first_request_params_holder, - global_endpoint_manager) + first_request_params_holder, global_endpoint_manager + ) raise e # If no success yet, create new tasks to replace completed ones @@ -223,8 +223,9 @@ async def execute_request( next_index, available_locations, completion_status, - first_request_params_holder - )) + first_request_params_holder, + ) + ) active_tasks.append(task) # if we have reached here, it means all tasks completed_task but all failed with transient exceptions @@ -244,9 +245,8 @@ async def execute_request( await asyncio.gather(*active_tasks, return_exceptions=True) async def _record_cancel_for_first_request( - self, - request_params_holder: SimpleNamespace, - global_endpoint_manager: Any) -> None: + self, request_params_holder: SimpleNamespace, global_endpoint_manager: Any + ) -> None: if request_params_holder.request_params is not None: await global_endpoint_manager.record_failure(request_params_holder.request_params) @@ -254,11 +254,12 @@ async def _record_cancel_for_first_request( # Global handler instance _cross_region_hedging_handler = CrossRegionAsyncHedgingHandler() + async def execute_with_availability_strategy( request_params: RequestObject, global_endpoint_manager: _GlobalPartitionEndpointManagerForCircuitBreakerAsync, request: HttpRequest, - execute_request_fn: Callable[..., Awaitable[ResponseType]] + execute_request_fn: Callable[..., Awaitable[ResponseType]], ) -> ResponseType: """Execute a request with hedging based on the availability strategy. @@ -284,8 +285,5 @@ async def execute_with_availability_strategy( """ return await _cross_region_hedging_handler.execute_request( - request_params, - global_endpoint_manager, - request, - execute_request_fn + request_params, global_endpoint_manager, request, execute_request_fn ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_request.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_request.py index cdf64a7cca76..ea9b0a5dedcd 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_request.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_asynchronous_request.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Asynchronous request in the Azure Cosmos database service. -""" +"""Asynchronous request in the Azure Cosmos database service.""" + import copy import json import time @@ -38,8 +38,11 @@ from .._synchronized_request import _request_body_from_data, _replace_url_prefix from ..documents import _OperationType + # cspell:ignore ppaf -async def _Request(global_endpoint_manager, request_params, connection_policy, pipeline_client, request, **kwargs): # pylint: disable=too-many-statements +async def _Request( + global_endpoint_manager, request_params, connection_policy, pipeline_client, request, **kwargs +): # pylint: disable=too-many-statements """Makes one http request using the requests module. :param _GlobalEndpointManager global_endpoint_manager: @@ -64,7 +67,7 @@ async def _Request(global_endpoint_manager, request_params, connection_policy, p read_timeout = kwargs.pop("read_timeout", read_timeout) # Every request tries to perform a refresh - client_timeout = kwargs.get('timeout') + client_timeout = kwargs.get("timeout") start_time = time.time() if request_params.healthy_tentative_location: read_timeout = connection_policy.RecoveryReadTimeout @@ -76,8 +79,8 @@ async def _Request(global_endpoint_manager, request_params, connection_policy, p connection_timeout = connection_policy.DBAConnectionTimeout if client_timeout is not None: - kwargs['timeout'] = client_timeout - (time.time() - start_time) - if kwargs['timeout'] <= 0: + kwargs["timeout"] = client_timeout - (time.time() - start_time) + if kwargs["timeout"] <= 0: raise exceptions.CosmosClientTimeoutError() if request_params.read_timeout_override: @@ -87,8 +90,9 @@ async def _Request(global_endpoint_manager, request_params, connection_policy, p base_url = request_params.endpoint_override else: pk_range_wrapper = None - if (global_endpoint_manager.is_circuit_breaker_applicable(request_params) or - global_endpoint_manager.is_per_partition_automatic_failover_applicable(request_params)): + if global_endpoint_manager.is_circuit_breaker_applicable( + request_params + ) or global_endpoint_manager.is_per_partition_automatic_failover_applicable(request_params): # Circuit breaker or per-partition failover are applicable, so we need to use the endpoint from the request pk_range_wrapper = await global_endpoint_manager.create_pk_range_wrapper(request_params) base_url = global_endpoint_manager.resolve_service_endpoint_for_partition(request_params, pk_range_wrapper) @@ -157,10 +161,7 @@ async def _Request(global_endpoint_manager, request_params, connection_policy, p try: result = json.loads(data) except Exception as e: - raise DecodeError( - message="Failed to decode JSON data: {}".format(e), - response=response, - error=e) from e + raise DecodeError(message="Failed to decode JSON data: {}".format(e), response=response, error=e) from e return result, headers @@ -179,21 +180,16 @@ def _is_availability_strategy_applicable(request_params: RequestObject) -> bool: :returns: True if availability strategy should be applied, False otherwise :rtype: bool """ - return (request_params.availability_strategy is not None and - not request_params.is_hedging_request and - request_params.resource_type == http_constants.ResourceType.Document and - (not _OperationType.IsWriteOperation(request_params.operation_type) or - request_params.retry_write > 0)) + return ( + request_params.availability_strategy is not None + and not request_params.is_hedging_request + and request_params.resource_type == http_constants.ResourceType.Document + and (not _OperationType.IsWriteOperation(request_params.operation_type) or request_params.retry_write > 0) + ) + async def AsynchronousRequest( - client, - request_params, - global_endpoint_manager, - connection_policy, - pipeline_client, - request, - request_data, - **kwargs + client, request_params, global_endpoint_manager, connection_policy, pipeline_client, request, request_data, **kwargs ): """Performs one asynchronous http request according to the parameters. @@ -226,25 +222,11 @@ async def AsynchronousRequest( global_endpoint_manager, request, lambda req_param, r: _retry_utility_async.ExecuteAsync( - client, - global_endpoint_manager, - _Request, - req_param, - connection_policy, - pipeline_client, - r, - **kwargs - ) + client, global_endpoint_manager, _Request, req_param, connection_policy, pipeline_client, r, **kwargs + ), ) # Pass _Request function with its parameters to retry_utility's Execute method that wraps the call with retries return await _retry_utility_async.ExecuteAsync( - client, - global_endpoint_manager, - _Request, - request_params, - connection_policy, - pipeline_client, - request, - **kwargs + client, global_endpoint_manager, _Request, request_params, connection_policy, pipeline_client, request, **kwargs ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_auth_policy_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_auth_policy_async.py index ea1a86b120a1..de6582b06536 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_auth_policy_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_auth_policy_async.py @@ -18,6 +18,7 @@ HTTPRequestType = TypeVar("HTTPRequestType", HttpRequest, LegacyHttpRequest) + # NOTE: This class accesses protected members (_scopes, _token) of the parent class # to implement fallback and scope-switching logic not exposed by the public API. # Composition was considered, but still required accessing protected members, so inheritance is retained @@ -57,10 +58,10 @@ async def on_request(self, request: PipelineRequest[HTTPRequestType]) -> None: except HttpResponseError as ex: # Only fallback if not using override, not already tried, and error is AADSTS500011 if ( - not self._override_scope and - not tried_fallback and - self._current_scope != self.AadDefaultScope and - "AADSTS500011" in str(ex) + not self._override_scope + and not tried_fallback + and self._current_scope != self.AadDefaultScope + and "AADSTS500011" in str(ex) ): self._scopes = (self.AadDefaultScope,) self._current_scope = self.AadDefaultScope diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py index ba1c293151a3..572a62fb796e 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py @@ -19,13 +19,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create, read, update and delete items in the Azure Cosmos DB SQL API service. -""" +"""Create, read, update and delete items in the Azure Cosmos DB SQL API service.""" + import asyncio # pylint: disable=do-not-import-asyncio import warnings from datetime import datetime -from typing import (Any, Mapping, Optional, Sequence, Union, Tuple, cast, overload, AsyncIterable, - Callable) +from typing import Any, Mapping, Optional, Sequence, Union, Tuple, cast, overload, AsyncIterable, Callable from typing_extensions import Literal from azure.core import MatchConditions @@ -38,8 +37,14 @@ from ._scripts import ScriptsProxy from .. import _utils as utils from .._availability_strategy_config import _validate_request_hedging_strategy -from .._base import (_build_properties_cache, _deserialize_throughput, _replace_throughput, - build_options as _build_options, GenerateGuidId, validate_cache_staleness_value) +from .._base import ( + _build_properties_cache, + _deserialize_throughput, + _replace_throughput, + build_options as _build_options, + GenerateGuidId, + validate_cache_staleness_value, +) from .._change_feed.feed_range_internal import FeedRangeInternalEpk from .._cosmos_responses import CosmosDict, CosmosList, CosmosAsyncItemPaged @@ -48,8 +53,13 @@ from .._session_token_helpers import get_latest_session_token from ..exceptions import CosmosHttpResponseError from ..offer import ThroughputProperties -from ..partition_key import (_get_partition_key_from_partition_key_definition, PartitionKeyType, - _return_undefined_or_empty_partition_key, NonePartitionKeyValue, NullPartitionKeyValue) +from ..partition_key import ( + _get_partition_key_from_partition_key_definition, + PartitionKeyType, + _return_undefined_or_empty_partition_key, + NonePartitionKeyValue, + NullPartitionKeyValue, +) __all__ = ("ContainerProxy",) @@ -80,7 +90,7 @@ def __init__( client_connection: CosmosClientConnection, database_link: str, id: str, - properties: Optional[dict[str, Any]] = None + properties: Optional[dict[str, Any]] = None, ) -> None: self.client_connection = client_connection self.container_cache_lock = asyncio.Lock() @@ -90,9 +100,9 @@ def __init__( self._is_system_key: Optional[bool] = None self._scripts: Optional[ScriptsProxy] = None if properties: - self.client_connection._set_container_properties_cache(self.container_link, - _build_properties_cache(properties, - self.container_link)) + self.client_connection._set_container_properties_cache( + self.container_link, _build_properties_cache(properties, self.container_link) + ) def __repr__(self) -> str: return "".format(self.container_link)[:1024] @@ -101,11 +111,11 @@ async def _get_properties_with_options(self, options: Optional[dict[str, Any]] = kwargs = {} if options: if "excludedLocations" in options: - kwargs['excluded_locations'] = options['excludedLocations'] + kwargs["excluded_locations"] = options["excludedLocations"] if Constants.OperationStartTime in options: kwargs[Constants.OperationStartTime] = options[Constants.OperationStartTime] if "timeout" in options: - kwargs['timeout'] = options['timeout'] + kwargs["timeout"] = options["timeout"] return await self._get_properties(**kwargs) @@ -144,10 +154,7 @@ def _get_conflict_link(self, conflict_or_link: Union[str, Mapping[str, Any]]) -> return "{}/conflicts/{}".format(self.container_link, conflict_or_link) return conflict_or_link["_self"] - async def _set_partition_key( - self, - partition_key: PartitionKeyType - ) -> PartitionKeyType: + async def _set_partition_key(self, partition_key: PartitionKeyType) -> PartitionKeyType: if partition_key == NonePartitionKeyValue: return _return_undefined_or_empty_partition_key(await self.is_system_key) if partition_key == NullPartitionKeyValue: @@ -155,9 +162,8 @@ async def _set_partition_key( return cast(Union[str, int, float, bool, list[Union[str, int, float, bool]]], partition_key) async def _get_epk_range_for_partition_key( - self, - partition_key_value: PartitionKeyType, - feed_options: Optional[dict[str, Any]] = None) -> Range: + self, partition_key_value: PartitionKeyType, feed_options: Optional[dict[str, Any]] = None + ) -> Range: container_properties = await self._get_properties_with_options(feed_options) partition_key_definition = container_properties["partitionKey"] partition_key = _get_partition_key_from_partition_key_definition(partition_key_definition) @@ -172,7 +178,7 @@ async def read( populate_quota_info: Optional[bool] = None, priority: Optional[Literal["High", "Low"]] = None, initial_headers: Optional[dict[str, str]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: """Read the container properties. @@ -190,17 +196,18 @@ async def read( :returns: Dict representing the retrieved container. :rtype: dict[str, Any] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = _build_options(kwargs) if populate_partition_key_range_statistics is not None: request_options["populatePartitionKeyRangeStatistics"] = populate_partition_key_range_statistics @@ -208,8 +215,10 @@ async def read( request_options["populateQuotaInfo"] = populate_quota_info container = await self.client_connection.ReadContainer(self.container_link, options=request_options, **kwargs) # Only cache Container Properties that will not change in the lifetime of the container - self.client_connection._set_container_properties_cache(self.container_link, # pylint: disable=protected-access - _build_properties_cache(container, self.container_link)) + self.client_connection._set_container_properties_cache( + self.container_link, # pylint: disable=protected-access + _build_properties_cache(container, self.container_link), + ) return container @distributed_trace_async @@ -228,7 +237,7 @@ async def create_item( retry_write: Optional[int] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: """Create an item in the container. @@ -269,31 +278,33 @@ async def create_item( :returns: A CosmosDict representing the new item. The dict will be empty if `no_response` is specified. :rtype: ~azure.cosmos.CosmosDict[str, Any] """ - etag = kwargs.get('etag') + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -325,7 +336,7 @@ async def read_item( priority: Optional[Literal["High", "Low"]] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: """Get the item identified by `item`. @@ -372,13 +383,13 @@ async def read_item( """ doc_link = self._get_document_link(item) if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: @@ -405,7 +416,7 @@ def read_all_items( priority: Optional[Literal["High", "Low"]] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """List all the items in the container. @@ -434,11 +445,11 @@ def read_all_items( :rtype: AsyncItemPaged[dict[str, Any]] """ if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: @@ -464,18 +475,18 @@ def read_all_items( @distributed_trace_async async def read_items( - self, - items: Sequence[Tuple[str, PartitionKeyType]], - *, - max_concurrency: Optional[int] = None, - consistency_level: Optional[str] = None, - session_token: Optional[str] = None, - initial_headers: Optional[dict[str, str]] = None, - excluded_locations: Optional[list[str]] = None, - priority: Optional[Literal["High", "Low"]] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + items: Sequence[Tuple[str, PartitionKeyType]], + *, + max_concurrency: Optional[int] = None, + consistency_level: Optional[str] = None, + session_token: Optional[str] = None, + initial_headers: Optional[dict[str, str]] = None, + excluded_locations: Optional[list[str]] = None, + priority: Optional[Literal["High", "Low"]] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any, ) -> CosmosList: """Reads multiple items from the container. @@ -507,21 +518,21 @@ async def read_items( """ if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if consistency_level is not None: - kwargs['consistencyLevel'] = consistency_level + kwargs["consistencyLevel"] = consistency_level if excluded_locations is not None: - kwargs['excludedLocations'] = excluded_locations + kwargs["excludedLocations"] = excluded_locations if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) - kwargs['max_concurrency'] = max_concurrency + kwargs["max_concurrency"] = max_concurrency kwargs["containerProperties"] = self._get_properties_with_options query_options = _build_options(kwargs) await self._get_properties_with_options(query_options) @@ -530,32 +541,30 @@ async def read_items( item_tuples = [(item_id, await self._set_partition_key(pk)) for item_id, pk in items] return await self.client_connection.read_items( - collection_link=self.container_link, - items=item_tuples, - options= query_options, - **kwargs) + collection_link=self.container_link, items=item_tuples, options=query_options, **kwargs + ) @overload def query_items( - self, - query: str, - *, - continuation_token_limit: Optional[int] = None, - enable_scan_in_query: Optional[bool] = None, - initial_headers: Optional[dict[str, str]] = None, - max_integrated_cache_staleness_in_ms: Optional[int] = None, - max_item_count: Optional[int] = None, - parameters: Optional[list[dict[str, object]]] = None, - partition_key: PartitionKeyType, - populate_index_metrics: Optional[bool] = None, - populate_query_metrics: Optional[bool] = None, - populate_query_advice: Optional[bool] = None, - priority: Optional[Literal["High", "Low"]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - session_token: Optional[str] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + query: str, + *, + continuation_token_limit: Optional[int] = None, + enable_scan_in_query: Optional[bool] = None, + initial_headers: Optional[dict[str, str]] = None, + max_integrated_cache_staleness_in_ms: Optional[int] = None, + max_item_count: Optional[int] = None, + parameters: Optional[list[dict[str, object]]] = None, + partition_key: PartitionKeyType, + populate_index_metrics: Optional[bool] = None, + populate_query_metrics: Optional[bool] = None, + populate_query_advice: Optional[bool] = None, + priority: Optional[Literal["High", "Low"]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + session_token: Optional[str] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any, ) -> CosmosAsyncItemPaged: """Return all results matching the given `query`. @@ -629,25 +638,25 @@ def query_items( @overload def query_items( - self, - query: str, - *, - continuation_token_limit: Optional[int] = None, - enable_scan_in_query: Optional[bool] = None, - feed_range: dict[str, Any], - initial_headers: Optional[dict[str, str]] = None, - max_integrated_cache_staleness_in_ms: Optional[int] = None, - max_item_count: Optional[int] = None, - parameters: Optional[list[dict[str, object]]] = None, - populate_index_metrics: Optional[bool] = None, - populate_query_metrics: Optional[bool] = None, - populate_query_advice: Optional[bool] = None, - priority: Optional[Literal["High", "Low"]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - session_token: Optional[str] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + query: str, + *, + continuation_token_limit: Optional[int] = None, + enable_scan_in_query: Optional[bool] = None, + feed_range: dict[str, Any], + initial_headers: Optional[dict[str, str]] = None, + max_integrated_cache_staleness_in_ms: Optional[int] = None, + max_item_count: Optional[int] = None, + parameters: Optional[list[dict[str, object]]] = None, + populate_index_metrics: Optional[bool] = None, + populate_query_metrics: Optional[bool] = None, + populate_query_advice: Optional[bool] = None, + priority: Optional[Literal["High", "Low"]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + session_token: Optional[str] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any, ) -> CosmosAsyncItemPaged: """Return all results matching the given `query`. @@ -718,24 +727,24 @@ def query_items( @overload def query_items( - self, - query: str, - *, - continuation_token_limit: Optional[int] = None, - enable_scan_in_query: Optional[bool] = None, - initial_headers: Optional[dict[str, str]] = None, - max_integrated_cache_staleness_in_ms: Optional[int] = None, - max_item_count: Optional[int] = None, - parameters: Optional[list[dict[str, object]]] = None, - populate_index_metrics: Optional[bool] = None, - populate_query_metrics: Optional[bool] = None, - populate_query_advice: Optional[bool] = None, - priority: Optional[Literal["High", "Low"]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - session_token: Optional[str] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + query: str, + *, + continuation_token_limit: Optional[int] = None, + enable_scan_in_query: Optional[bool] = None, + initial_headers: Optional[dict[str, str]] = None, + max_integrated_cache_staleness_in_ms: Optional[int] = None, + max_item_count: Optional[int] = None, + parameters: Optional[list[dict[str, object]]] = None, + populate_index_metrics: Optional[bool] = None, + populate_query_metrics: Optional[bool] = None, + populate_query_advice: Optional[bool] = None, + priority: Optional[Literal["High", "Low"]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + session_token: Optional[str] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any, ) -> CosmosAsyncItemPaged: """Return all results matching the given `query`. @@ -804,11 +813,7 @@ def query_items( ... @distributed_trace - def query_items( - self, - *args: Any, - **kwargs: Any - ) -> CosmosAsyncItemPaged: + def query_items(self, *args: Any, **kwargs: Any) -> CosmosAsyncItemPaged: """Return all results matching the given `query`. You can use any value for the container name in the FROM clause, but @@ -904,10 +909,13 @@ def query_items( feed_options["responseContinuationTokenLimitInKb"] = kwargs.pop("continuation_token_limit") # populate availability_strategy - if (Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options - and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None): - feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] =\ - _validate_request_hedging_strategy(feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY)) + if ( + Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options + and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None + ): + feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] = _validate_request_hedging_strategy( + feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY) + ) feed_options["correlatedActivityId"] = GenerateGuidId() @@ -942,22 +950,22 @@ def query_items( options=feed_options, partition_key=feed_options.get("partitionKey"), response_hook=response_hook, - **kwargs + **kwargs, ) return items @overload def query_items_change_feed( - self, - *, - max_item_count: Optional[int] = None, - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, - partition_key: PartitionKeyType, - priority: Optional[Literal["High", "Low"]] = None, - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + *, + max_item_count: Optional[int] = None, + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, + partition_key: PartitionKeyType, + priority: Optional[Literal["High", "Low"]] = None, + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed, in the order in which they were modified. @@ -1000,16 +1008,16 @@ def query_items_change_feed( @overload def query_items_change_feed( - self, - *, - feed_range: dict[str, Any], - max_item_count: Optional[int] = None, - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, - priority: Optional[Literal["High", "Low"]] = None, - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, - response_hook: Optional[Callable[[Mapping[str, Any], dict[str, Any]], None]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + *, + feed_range: dict[str, Any], + max_item_count: Optional[int] = None, + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, + priority: Optional[Literal["High", "Low"]] = None, + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, + response_hook: Optional[Callable[[Mapping[str, Any], dict[str, Any]], None]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed, in the order in which they were modified. @@ -1048,14 +1056,14 @@ def query_items_change_feed( @overload def query_items_change_feed( - self, - *, - continuation: str, - max_item_count: Optional[int] = None, - priority: Optional[Literal["High", "Low"]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - response_hook: Optional[Callable[[Mapping[str, Any], dict[str, Any]], None]] = None, - **kwargs: Any + self, + *, + continuation: str, + max_item_count: Optional[int] = None, + priority: Optional[Literal["High", "Low"]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + response_hook: Optional[Callable[[Mapping[str, Any], dict[str, Any]], None]] = None, + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed, in the order in which they were modified. @@ -1085,15 +1093,15 @@ def query_items_change_feed( @overload def query_items_change_feed( - self, - *, - max_item_count: Optional[int] = None, - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, - priority: Optional[Literal["High", "Low"]] = None, - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - response_hook: Optional[Callable[[Mapping[str, Any], dict[str, Any]], None]] = None, - **kwargs: Any + self, + *, + max_item_count: Optional[int] = None, + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, + priority: Optional[Literal["High", "Low"]] = None, + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + response_hook: Optional[Callable[[Mapping[str, Any], dict[str, Any]], None]] = None, + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed in the entire container, in the order in which they were modified. @@ -1132,10 +1140,8 @@ def query_items_change_feed( @distributed_trace def query_items_change_feed( # pylint: disable=unused-argument - self, - **kwargs: Any + self, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: - """Get a sorted list of items that were changed, in the order in which they were modified. :keyword str continuation: The continuation token retrieved from previous response. It contains chang feed mode. @@ -1182,18 +1188,20 @@ def query_items_change_feed( # pylint: disable=unused-argument change_feed_state_context["mode"] = kwargs.pop("mode") if "partition_key_range_id" in kwargs: change_feed_state_context["partitionKeyRangeId"] = kwargs.pop("partition_key_range_id") - if "is_start_from_beginning" in kwargs and kwargs.pop('is_start_from_beginning') is True: + if "is_start_from_beginning" in kwargs and kwargs.pop("is_start_from_beginning") is True: change_feed_state_context["startTime"] = "Beginning" elif "start_time" in kwargs: change_feed_state_context["startTime"] = kwargs.pop("start_time") if "partition_key" in kwargs: partition_key_value = kwargs.pop("partition_key") change_feed_state_context["partitionKey"] = self._set_partition_key( - cast(PartitionKeyType, partition_key_value)) + cast(PartitionKeyType, partition_key_value) + ) change_feed_state_context["partitionKeyFeedRange"] = self._get_epk_range_for_partition_key( - partition_key_value, feed_options) + partition_key_value, feed_options + ) if "feed_range" in kwargs: - change_feed_state_context["feedRange"] = kwargs.pop('feed_range') + change_feed_state_context["feedRange"] = kwargs.pop("feed_range") if "continuation" in feed_options: change_feed_state_context["continuation"] = feed_options.pop("continuation") @@ -1201,10 +1209,13 @@ def query_items_change_feed( # pylint: disable=unused-argument feed_options["containerProperties"] = self._get_properties_with_options(feed_options) # populate availability_strategy - if (Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options - and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None): - feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] =\ - _validate_request_hedging_strategy(feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY)) + if ( + Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options + and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None + ): + feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] = _validate_request_hedging_strategy( + feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY) + ) response_hook = kwargs.pop("response_hook", None) if hasattr(response_hook, "clear"): @@ -1234,7 +1245,7 @@ async def upsert_item( retry_write: Optional[int] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: """Insert or update the specified item. @@ -1276,21 +1287,21 @@ async def upsert_item( :rtype: ~azure.cosmos.CosmosDict[str, Any] """ if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1303,22 +1314,15 @@ async def upsert_item( request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] result = await self.client_connection.UpsertItem( - database_or_container_link=self.container_link, - document=body, - options=request_options, - **kwargs + database_or_container_link=self.container_link, document=body, options=request_options, **kwargs ) return result @distributed_trace_async async def semantic_rerank( - self, - *, - context: str, - documents: list[str], - options: Optional[dict[str, Any]] = None + self, *, context: str, documents: list[str], options: Optional[dict[str, Any]] = None ) -> CosmosDict: - """ **provisional** Rerank a list of documents using semantic reranking. + """**provisional** Rerank a list of documents using semantic reranking. This method uses a semantic reranker to score and reorder the provided documents based on their relevance to the given reranking context. @@ -1344,13 +1348,11 @@ async def semantic_rerank( if inference_service is None: raise CosmosHttpResponseError( message="Semantic reranking requires AAD credentials (inference service not initialized).", - response=None + response=None, ) result = await inference_service.rerank( - reranking_context=context, - documents=documents, - semantic_reranking_options=options + reranking_context=context, documents=documents, semantic_reranking_options=options ) return result @@ -1372,7 +1374,7 @@ async def replace_item( retry_write: Optional[int] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: """Replaces the specified item if it exists in the container. @@ -1418,21 +1420,21 @@ async def replace_item( """ item_link = self._get_document_link(item) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1467,9 +1469,9 @@ async def patch_item( retry_write: Optional[int] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: - """ Patches the specified item with the provided operations if it + """Patches the specified item with the provided operations if it exists in the container. If the item does not already exist in the container, an exception is raised. @@ -1518,19 +1520,19 @@ async def patch_item( :rtype: ~azure.cosmos.CosmosDict[str, Any] """ if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1547,7 +1549,8 @@ async def patch_item( item_link = self._get_document_link(item) result = await self.client_connection.PatchItem( - document_link=item_link, operations=patch_operations, options=request_options, **kwargs) + document_link=item_link, operations=patch_operations, options=request_options, **kwargs + ) return result @distributed_trace_async @@ -1566,7 +1569,7 @@ async def delete_item( retry_write: Optional[int] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """Delete the specified item from the container. @@ -1610,19 +1613,19 @@ async def delete_item( :rtype: None """ if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1639,10 +1642,10 @@ async def delete_item( @distributed_trace_async async def get_throughput( - self, - *, - response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, - **kwargs: Any + self, + *, + response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, + **kwargs: Any, ) -> ThroughputProperties: """Get the ThroughputProperties object for this container. @@ -1663,8 +1666,9 @@ async def get_throughput( "parameters": [{"name": "@link", "value": link}], } options = {"containerRID": properties["_rid"]} - throughput_properties = [throughput async for throughput in - self.client_connection.QueryOffers(query_spec, options, **kwargs)] + throughput_properties = [ + throughput async for throughput in self.client_connection.QueryOffers(query_spec, options, **kwargs) + ] if response_hook: response_hook(self.client_connection.last_response_headers, throughput_properties) @@ -1677,7 +1681,7 @@ async def replace_throughput( throughput: Union[int, ThroughputProperties], *, response_hook: Optional[Callable[[Mapping[str, Any], CosmosDict], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> ThroughputProperties: """Replace the container's throughput. @@ -1700,13 +1704,18 @@ async def replace_throughput( "parameters": [{"name": "@link", "value": link}], } options = {"containerRID": properties["_rid"]} - throughput_properties = [throughput async for throughput in - self.client_connection.QueryOffers(query_spec, options, **kwargs)] + throughput_properties = [ + throughput async for throughput in self.client_connection.QueryOffers(query_spec, options, **kwargs) + ] new_offer = throughput_properties[0].copy() _replace_throughput(throughput=throughput, new_throughput_properties=new_offer) - data = await self.client_connection.ReplaceOffer(offer_link=throughput_properties[0]["_self"], - offer=throughput_properties[0], response_hook=response_hook, **kwargs) + data = await self.client_connection.ReplaceOffer( + offer_link=throughput_properties[0]["_self"], + offer=throughput_properties[0], + response_hook=response_hook, + **kwargs, + ) return ThroughputProperties(offer_throughput=data["content"]["offerThroughput"], properties=data) @@ -1716,7 +1725,7 @@ def list_conflicts( *, max_item_count: Optional[int] = None, response_hook: Optional[Callable[[Mapping[str, Any], AsyncItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """List all the conflicts in the container. @@ -1748,7 +1757,7 @@ def query_conflicts( partition_key: Optional[PartitionKeyType] = None, max_item_count: Optional[int] = None, response_hook: Optional[Callable[[Mapping[str, Any], AsyncItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Return all conflicts matching a given `query`. @@ -1779,7 +1788,7 @@ def query_conflicts( collection_link=self.container_link, query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs + **kwargs, ) if response_hook: response_hook(self.client_connection.last_response_headers, result) @@ -1856,7 +1865,7 @@ async def delete_all_items_by_partition_key( post_trigger_include: Optional[str] = None, session_token: Optional[str] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """The delete by partition key feature is an asynchronous, background operation that allows you to delete all documents with the same logical partition key value, using the Cosmos SDK. The delete by partition key @@ -1879,25 +1888,27 @@ async def delete_all_items_by_partition_key( :keyword int throughput_bucket: The desired throughput bucket for the client :rtype: None """ - etag = kwargs.get('etag') + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket request_options = _build_options(kwargs) @@ -1906,8 +1917,9 @@ async def delete_all_items_by_partition_key( await self._get_properties_with_options(request_options) request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] - await self.client_connection.DeleteAllItemsByPartitionKey(collection_link=self.container_link, - options=request_options, **kwargs) + await self.client_connection.DeleteAllItemsByPartitionKey( + collection_link=self.container_link, options=request_options, **kwargs + ) @distributed_trace_async async def execute_item_batch( @@ -1922,9 +1934,9 @@ async def execute_item_batch( retry_write: Optional[int] = None, throughput_bucket: Optional[int] = None, availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosList: - """ Executes the transactional batch for the specified partition key. + """Executes the transactional batch for the specified partition key. :param batch_operations: The batch of operations to be executed. :type batch_operations: list[Tuple[Any]] @@ -1958,27 +1970,29 @@ async def execute_item_batch( :raises ~azure.cosmos.exceptions.CosmosBatchOperationError: A transactional batch operation failed in the batch. :rtype: ~azure.cosmos.CosmosList[dict[str, Any]] """ - etag = kwargs.get('etag') + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if retry_write is not None: @@ -1992,16 +2006,12 @@ async def execute_item_batch( request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] return await self.client_connection.Batch( - collection_link=self.container_link, batch_operations=batch_operations, options=request_options, **kwargs) + collection_link=self.container_link, batch_operations=batch_operations, options=request_options, **kwargs + ) @distributed_trace - def read_feed_ranges( - self, - *, - force_refresh: bool = False, - **kwargs: Any - ) -> AsyncIterable[dict[str, Any]]: - """ Obtains a list of feed ranges that can be used to parallelize feed operations. + def read_feed_ranges(self, *, force_refresh: bool = False, **kwargs: Any) -> AsyncIterable[dict[str, Any]]: + """Obtains a list of feed ranges that can be used to parallelize feed operations. :keyword bool force_refresh: Flag to indicate whether obtain the list of feed ranges directly from cache or refresh the cache. @@ -2017,33 +2027,30 @@ def read_feed_ranges( self.client_connection.refresh_routing_map_provider() async def get_next(continuation_token: str) -> list[dict[str, Any]]: # pylint: disable=unused-argument - partition_key_ranges = \ - await self.client_connection._routing_map_provider.get_overlapping_ranges( - # pylint: disable=protected-access - self.container_link, - # default to full range - [Range("", "FF", True, False)], - **kwargs) + partition_key_ranges = await self.client_connection._routing_map_provider.get_overlapping_ranges( + # pylint: disable=protected-access + self.container_link, + # default to full range + [Range("", "FF", True, False)], + **kwargs, + ) - feed_ranges = [FeedRangeInternalEpk(Range.PartitionKeyRangeToRange(partitionKeyRange)).to_dict() - for partitionKeyRange in partition_key_ranges] + feed_ranges = [ + FeedRangeInternalEpk(Range.PartitionKeyRangeToRange(partitionKeyRange)).to_dict() + for partitionKeyRange in partition_key_ranges + ] return feed_ranges async def extract_data(feed_ranges_response: list[dict[str, Any]]): return None, AsyncList(feed_ranges_response) - return AsyncItemPaged( - get_next, - extract_data - ) + return AsyncItemPaged(get_next, extract_data) async def get_latest_session_token( - self, - feed_ranges_to_session_tokens: list[Tuple[dict[str, Any], str]], - target_feed_range: dict[str, Any] + self, feed_ranges_to_session_tokens: list[Tuple[dict[str, Any], str]], target_feed_range: dict[str, Any] ) -> str: - """ **provisional** This method is still in preview and may be subject to breaking changes. + """**provisional** This method is still in preview and may be subject to breaking changes. Gets the the most up to date session token from the list of session token and feed range tuples for a specific target feed range. The feed range can be obtained from a partition key @@ -2078,8 +2085,7 @@ async def feed_range_from_partition_key(self, partition_key: PartitionKeyType) - partition_key_value = await self._set_partition_key(partition_key) return FeedRangeInternalEpk(await self._get_epk_range_for_partition_key(partition_key_value)).to_dict() - async def is_feed_range_subset(self, parent_feed_range: dict[str, Any], - child_feed_range: dict[str, Any]) -> bool: + async def is_feed_range_subset(self, parent_feed_range: dict[str, Any], child_feed_range: dict[str, Any]) -> bool: """Checks if child feed range is a subset of parent feed range. :param parent_feed_range: left feed range :type parent_feed_range: dict[str, Any] @@ -2095,5 +2101,4 @@ async def is_feed_range_subset(self, parent_feed_range: dict[str, Any], """ parent_feed_range_epk = FeedRangeInternalEpk.from_json(parent_feed_range) child_feed_range_epk = FeedRangeInternalEpk.from_json(child_feed_range) - return child_feed_range_epk.get_normalized_range().is_subset( - parent_feed_range_epk.get_normalized_range()) + return child_feed_range_epk.get_normalized_range().is_subset(parent_feed_range_epk.get_normalized_range()) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client.py index f81673f0f8ac..572cc694ac4b 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create, read, and delete databases in the Azure Cosmos DB SQL API service. -""" +"""Create, read, and delete databases in the Azure Cosmos DB SQL API service.""" import warnings from typing import Any, Optional, Union, cast, Mapping, Iterable, Callable, overload, Literal @@ -47,84 +46,87 @@ __all__ = ("CosmosClient",) -CredentialType = Union[ - AsyncTokenCredential, CredentialDict, str, Mapping[str, Any], Iterable[Mapping[str, Any]] -] +CredentialType = Union[AsyncTokenCredential, CredentialDict, str, Mapping[str, Any], Iterable[Mapping[str, Any]]] + def _build_auth(credential: CredentialType) -> CredentialDict: auth: CredentialDict = {} if isinstance(credential, str): - auth['masterKey'] = credential + auth["masterKey"] = credential elif isinstance(credential, Mapping): - if any(k for k in credential.keys() if k in ['masterKey', 'resourceTokens', 'permissionFeed']): + if any(k for k in credential.keys() if k in ["masterKey", "resourceTokens", "permissionFeed"]): return cast(CredentialDict, credential) # Backwards compatible - auth['resourceTokens'] = credential + auth["resourceTokens"] = credential elif isinstance(credential, Iterable): - auth['permissionFeed'] = cast(Iterable[Mapping[str, Any]], credential) + auth["permissionFeed"] = cast(Iterable[Mapping[str, Any]], credential) elif isinstance(credential, (TokenCredential, AsyncTokenCredential)): - auth['clientSecretCredential'] = credential + auth["clientSecretCredential"] = credential else: raise TypeError( "Unrecognized credential type. Please supply the master key as a string " "or a dictionary, or resource tokens, or a list of permissions, or any instance of a class implementing" " AsyncTokenCredential (see azure.identity module for specific implementations " - "such as ClientSecretCredential).") + "such as ClientSecretCredential)." + ) return auth def _build_connection_policy(kwargs: dict[str, Any]) -> ConnectionPolicy: # pylint: disable=protected-access - policy = kwargs.pop('connection_policy', None) or ConnectionPolicy() + policy = kwargs.pop("connection_policy", None) or ConnectionPolicy() # Connection config # `request_timeout` is supported as a legacy parameter later replaced by `connection_timeout` - if 'request_timeout' in kwargs: - policy.RequestTimeout = kwargs.pop('request_timeout') / 1000.0 + if "request_timeout" in kwargs: + policy.RequestTimeout = kwargs.pop("request_timeout") / 1000.0 else: - policy.RequestTimeout = kwargs.pop('connection_timeout', policy.RequestTimeout) - policy.ConnectionMode = kwargs.pop('connection_mode', policy.ConnectionMode) - policy.ProxyConfiguration = kwargs.pop('proxy_config', policy.ProxyConfiguration) - policy.EnableEndpointDiscovery = kwargs.pop('enable_endpoint_discovery', policy.EnableEndpointDiscovery) - policy.PreferredLocations = kwargs.pop('preferred_locations', policy.PreferredLocations) - policy.ExcludedLocations = kwargs.pop('excluded_locations', policy.ExcludedLocations) - policy.UseMultipleWriteLocations = kwargs.pop('multiple_write_locations', policy.UseMultipleWriteLocations) + policy.RequestTimeout = kwargs.pop("connection_timeout", policy.RequestTimeout) + policy.ConnectionMode = kwargs.pop("connection_mode", policy.ConnectionMode) + policy.ProxyConfiguration = kwargs.pop("proxy_config", policy.ProxyConfiguration) + policy.EnableEndpointDiscovery = kwargs.pop("enable_endpoint_discovery", policy.EnableEndpointDiscovery) + policy.PreferredLocations = kwargs.pop("preferred_locations", policy.PreferredLocations) + policy.ExcludedLocations = kwargs.pop("excluded_locations", policy.ExcludedLocations) + policy.UseMultipleWriteLocations = kwargs.pop("multiple_write_locations", policy.UseMultipleWriteLocations) # SSL config - verify = kwargs.pop('connection_verify', None) + verify = kwargs.pop("connection_verify", None) policy.DisableSSLVerification = not bool(verify if verify is not None else True) - ssl = kwargs.pop('ssl_config', None) or policy.SSLConfiguration + ssl = kwargs.pop("ssl_config", None) or policy.SSLConfiguration if ssl: - ssl.SSLCertFile = kwargs.pop('connection_cert', ssl.SSLCertFile) + ssl.SSLCertFile = kwargs.pop("connection_cert", ssl.SSLCertFile) ssl.SSLCaCerts = verify or ssl.SSLCaCerts policy.SSLConfiguration = ssl # Retry config retry_options = policy.RetryOptions - total_retries = kwargs.pop('retry_total', None) - total_throttle_retries = kwargs.pop('retry_throttle_total', None) - retry_options._max_retry_attempt_count = \ + total_retries = kwargs.pop("retry_total", None) + total_throttle_retries = kwargs.pop("retry_throttle_total", None) + retry_options._max_retry_attempt_count = ( total_throttle_retries or total_retries or retry_options._max_retry_attempt_count - retry_options._fixed_retry_interval_in_milliseconds = \ - kwargs.pop('retry_fixed_interval', retry_options._fixed_retry_interval_in_milliseconds) - max_backoff = kwargs.pop('retry_backoff_max', None) - max_throttle_backoff = kwargs.pop('retry_throttle_backoff_max', None) - retry_options._max_wait_time_in_seconds = \ + ) + retry_options._fixed_retry_interval_in_milliseconds = kwargs.pop( + "retry_fixed_interval", retry_options._fixed_retry_interval_in_milliseconds + ) + max_backoff = kwargs.pop("retry_backoff_max", None) + max_throttle_backoff = kwargs.pop("retry_throttle_backoff_max", None) + retry_options._max_wait_time_in_seconds = ( max_throttle_backoff or max_backoff or retry_options._max_wait_time_in_seconds + ) policy.RetryOptions = retry_options connection_retry = policy.ConnectionRetryConfiguration if not connection_retry: connection_retry = _ConnectionRetryPolicy( retry_total=total_retries, - retry_connect=kwargs.pop('retry_connect', None), - retry_read=kwargs.pop('retry_read', None), - retry_status=kwargs.pop('retry_status', None), + retry_connect=kwargs.pop("retry_connect", None), + retry_read=kwargs.pop("retry_read", None), + retry_status=kwargs.pop("retry_status", None), retry_backoff_max=max_backoff or retry_options._max_wait_time_in_seconds, - retry_mode=kwargs.pop('retry_mode', RetryMode.Fixed), - retry_on_status_codes=kwargs.pop('retry_on_status_codes', []), - retry_backoff_factor=kwargs.pop('retry_backoff_factor', 1), + retry_mode=kwargs.pop("retry_mode", RetryMode.Fixed), + retry_on_status_codes=kwargs.pop("retry_on_status_codes", []), + retry_backoff_factor=kwargs.pop("retry_backoff_factor", 1), ) policy.ConnectionRetryConfiguration = connection_retry - policy.ResponsePayloadOnWriteDisabled = kwargs.pop('no_response_on_write', False) + policy.ResponsePayloadOnWriteDisabled = kwargs.pop("no_response_on_write", False) policy.RetryNonIdempotentWrites = kwargs.pop(Constants.Kwargs.RETRY_WRITE, False) return policy @@ -175,7 +177,7 @@ class CosmosClient: # pylint: disable=client-accepts-api-version-keyword Must be used along with a logger to work. :keyword ~logging.Logger logger: Logger to be used for collecting request diagnostics. Can be passed in at client level (to log all requests) or at a single request level. Requests will be logged at INFO level. - :keyword bool no_response_on_write: Indicates whether service should be instructed to skip sending + :keyword bool no_response_on_write: Indicates whether service should be instructed to skip sending response payloads for write operations on items by default unless specified differently per operation. :keyword int throughput_bucket: The desired throughput bucket for the client :keyword str user_agent_suffix: Allows user agent suffix to be specified when creating client @@ -199,14 +201,14 @@ class CosmosClient: # pylint: disable=client-accepts-api-version-keyword """ def __init__( - self, - url: str, - credential: Union[str, dict[str, str], AsyncTokenCredential], - *, - consistency_level: Optional[str] = None, - availability_strategy: Union[bool, dict[str, Any]] = False, - availability_strategy_max_concurrency: Optional[int] = None, - **kwargs: Any + self, + url: str, + credential: Union[str, dict[str, str], AsyncTokenCredential], + *, + consistency_level: Optional[str] = None, + availability_strategy: Union[bool, dict[str, Any]] = False, + availability_strategy_max_concurrency: Optional[int] = None, + **kwargs: Any, ) -> None: """Instantiate a new CosmosClient.""" auth = _build_auth(credential) @@ -218,7 +220,7 @@ def __init__( connection_policy=connection_policy, availability_strategy=availability_strategy, availability_strategy_max_concurrency=availability_strategy_max_concurrency, - **kwargs + **kwargs, ) def __repr__(self) -> str: @@ -230,7 +232,7 @@ async def __aenter__(self) -> "CosmosClient": return self async def __aexit__(self, *args) -> None: - await self.client_connection._global_endpoint_manager.close() # pylint: disable=protected-access + await self.client_connection._global_endpoint_manager.close() # pylint: disable=protected-access return await self.client_connection.pipeline_client.__aexit__(*args) async def close(self) -> None: @@ -244,7 +246,7 @@ def from_connection_string( *, credential: Optional[Union[str, dict[str, str]]] = None, consistency_level: Optional[str] = None, - **kwargs: Any + **kwargs: Any, ) -> "CosmosClient": """Create a CosmosClient instance from a connection string. @@ -261,10 +263,10 @@ def from_connection_string( """ settings = _parse_connection_str(conn_str, credential) return cls( - url=settings['AccountEndpoint'], - credential=settings['AccountKey'], + url=settings["AccountEndpoint"], + credential=settings["AccountKey"], consistency_level=consistency_level, - **kwargs + **kwargs, ) @overload @@ -277,7 +279,7 @@ async def create_database( response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[False] = False, - **kwargs: Any + **kwargs: Any, ) -> DatabaseProxy: """ Create a new database with the given ID (name). @@ -317,7 +319,7 @@ async def create_database( response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[True], - **kwargs: Any + **kwargs: Any, ) -> tuple[DatabaseProxy, CosmosDict]: """ Create a new database with the given ID (name). @@ -348,10 +350,8 @@ async def create_database( ... @distributed_trace_async - async def create_database( # pylint:disable=docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + async def create_database( # pylint:disable=docstring-should-be-keyword + self, *args: Any, **kwargs: Any ) -> Union[DatabaseProxy, tuple[DatabaseProxy, CosmosDict]]: """ Create a new database with the given ID (name). @@ -384,24 +384,27 @@ async def create_database( # pylint:disable=docstring-should-be-keyword id = args[0] if args else kwargs.pop("id") if len(args) > 1: raise TypeError(f"Unexpected positional parameters: {args[1:]}") - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) offer_throughput = kwargs.pop("offer_throughput", None) return_properties = kwargs.pop("return_properties", False) @@ -415,7 +418,7 @@ async def create_database( # pylint:disable=docstring-should-be-keyword response_hook(self.client_connection.last_response_headers) if not return_properties: return DatabaseProxy(self.client_connection, id=result["id"], properties=result) - return DatabaseProxy(self.client_connection, id=result["id"], properties=result), result + return DatabaseProxy(self.client_connection, id=result["id"], properties=result), result @overload async def create_database_if_not_exists( # pylint: disable=redefined-builtin @@ -427,7 +430,7 @@ async def create_database_if_not_exists( # pylint: disable=redefined-builtin response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[False] = False, - **kwargs: Any + **kwargs: Any, ) -> DatabaseProxy: """ Create the database if it does not exist already. @@ -463,7 +466,7 @@ async def create_database_if_not_exists( # pylint: disable=redefined-builtin response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[True], - **kwargs: Any + **kwargs: Any, ) -> tuple[DatabaseProxy, CosmosDict]: """ Create the database if it does not exist already. @@ -490,10 +493,8 @@ async def create_database_if_not_exists( # pylint: disable=redefined-builtin ... @distributed_trace_async - async def create_database_if_not_exists( # pylint:disable=docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + async def create_database_if_not_exists( # pylint:disable=docstring-should-be-keyword + self, *args: Any, **kwargs: Any ) -> Union[DatabaseProxy, tuple[DatabaseProxy, CosmosDict]]: """ Create the database if it does not exist already. @@ -524,24 +525,27 @@ async def create_database_if_not_exists( # pylint:disable=docstring-should-be-ke if len(args) > 1: raise TypeError(f"Unexpected positional parameters: {args[1:]}") - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) offer_throughput = kwargs.pop("offer_throughput", None) return_properties = kwargs.pop("return_properties", False) @@ -554,10 +558,7 @@ async def create_database_if_not_exists( # pylint:disable=docstring-should-be-ke return database_proxy, result except CosmosResourceNotFoundError: return await self.create_database( - id, - offer_throughput=offer_throughput, - return_properties=return_properties, - **kwargs + id, offer_throughput=offer_throughput, return_properties=return_properties, **kwargs ) def get_database_client(self, database: Union[str, DatabaseProxy, dict[str, Any]]) -> DatabaseProxy: @@ -574,7 +575,7 @@ def get_database_client(self, database: Union[str, DatabaseProxy, dict[str, Any] elif isinstance(database, DatabaseProxy): id_value = database.id else: - id_value = str(database['id']) + id_value = str(database["id"]) return DatabaseProxy(self.client_connection, id_value) @distributed_trace @@ -585,7 +586,7 @@ def list_databases( initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """List the databases in a Cosmos DB SQL database account. @@ -598,12 +599,13 @@ def list_databases( :returns: An AsyncItemPaged of database properties (dicts). :rtype: AsyncItemPaged[dict[str, str]] """ - session_token = kwargs.pop('session_token', None) + session_token = kwargs.pop("session_token", None) if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if initial_headers is not None: kwargs["initial_headers"] = initial_headers if throughput_bucket is not None: @@ -627,7 +629,7 @@ def query_databases( initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Query the databases in a Cosmos DB SQL database account. @@ -644,16 +646,17 @@ def query_databases( :returns: An AsyncItemPaged of database properties (dicts). :rtype: AsyncItemPaged[dict[str, str]] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if initial_headers is not None: kwargs["initial_headers"] = initial_headers if throughput_bucket is not None: - kwargs['throughput_bucket'] = throughput_bucket + kwargs["throughput_bucket"] = throughput_bucket feed_options = _build_options(kwargs) if max_item_count is not None: feed_options["maxItemCount"] = max_item_count @@ -661,7 +664,8 @@ def query_databases( result = self.client_connection.QueryDatabases( query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs) + **kwargs, + ) if response_hook: response_hook(self.client_connection.last_response_headers) return result @@ -674,7 +678,7 @@ async def delete_database( initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """Delete the database with the given ID (name). @@ -688,26 +692,29 @@ async def delete_database( :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: If the database couldn't be deleted. :rtype: None """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if throughput_bucket is not None: - kwargs['throughput_bucket'] = throughput_bucket + kwargs["throughput_bucket"] = throughput_bucket if initial_headers is not None: kwargs["initial_headers"] = initial_headers request_options = _build_options(kwargs) @@ -718,10 +725,7 @@ async def delete_database( @distributed_trace_async async def _get_database_account( - self, - *, - response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, - **kwargs: Any + self, *, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, **kwargs: Any ) -> DatabaseAccount: """Retrieve the database account information. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py index f12a8ab50e70..d2058070b596 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py @@ -21,8 +21,8 @@ # pylint: disable=protected-access,too-many-lines -"""Document client class for the Azure Cosmos database service. -""" +"""Document client class for the Azure Cosmos database service.""" + import os from urllib.parse import urlparse import uuid @@ -33,7 +33,10 @@ from azure.core.async_paging import AsyncItemPaged from azure.core.credentials_async import AsyncTokenCredential from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import HttpRequest, AsyncHttpResponse # pylint: disable=no-legacy-azure-core-http-response-import +from azure.core.pipeline.transport import ( + HttpRequest, + AsyncHttpResponse, +) # pylint: disable=no-legacy-azure-core-http-response-import from azure.core.pipeline.policies import ( AsyncHTTPPolicy, ContentDecodePolicy, @@ -41,10 +44,12 @@ NetworkTraceLoggingPolicy, CustomHookPolicy, DistributedTracingPolicy, - ProxyPolicy) + ProxyPolicy, +) from azure.core.utils import CaseInsensitiveDict from azure.cosmos.aio._global_partition_endpoint_manager_per_partition_automatic_failover_async import ( - _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync) + _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, +) from .. import _base as base from .._availability_strategy_config import CrossRegionHedgingStrategy, validate_client_hedging_strategy from .._base import _build_properties_cache @@ -73,7 +78,8 @@ _SequentialPartitionKeyType, _return_undefined_or_empty_partition_key, _Empty, - _build_partition_key_from_properties, PartitionKeyType + _build_partition_key_from_properties, + PartitionKeyType, ) from ._auth_policy_async import AsyncCosmosBearerTokenCredentialPolicy from .._cosmos_http_logging_policy import CosmosHttpLoggingPolicy @@ -113,15 +119,15 @@ class _QueryCompatibilityMode: _DefaultStringHashPrecision = 3 _DefaultStringRangePrecision = -1 - def __init__( # pylint: disable=too-many-statements - self, - url_connection: str, - auth: CredentialDict, - connection_policy: Optional[ConnectionPolicy] = None, - consistency_level: Optional[str] = None, - availability_strategy: Union[bool, dict[str, Any]] = False, - availability_strategy_max_concurrency: Optional[int] = None, - **kwargs: Any + def __init__( # pylint: disable=too-many-statements + self, + url_connection: str, + auth: CredentialDict, + connection_policy: Optional[ConnectionPolicy] = None, + consistency_level: Optional[str] = None, + availability_strategy: Union[bool, dict[str, Any]] = False, + availability_strategy_max_concurrency: Optional[int] = None, + **kwargs: Any ) -> None: """ :param str url_connection: @@ -141,8 +147,9 @@ def __init__( # pylint: disable=too-many-statements """ self.client_id = str(uuid.uuid4()) self.url_connection = url_connection - self.availability_strategy: Union[CrossRegionHedgingStrategy, None] =\ - validate_client_hedging_strategy(availability_strategy) + self.availability_strategy: Union[CrossRegionHedgingStrategy, None] = validate_client_hedging_strategy( + availability_strategy + ) self.availability_strategy_max_concurrency: Optional[int] = availability_strategy_max_concurrency self.master_key: Optional[str] = None self.resource_tokens: Optional[Mapping[str, Any]] = None @@ -170,11 +177,11 @@ def __init__( # pylint: disable=too-many-statements http_constants.HttpHeaders.IsContinuationExpected: False, } - throughput_bucket = kwargs.pop('throughput_bucket', None) + throughput_bucket = kwargs.pop("throughput_bucket", None) if throughput_bucket: self.default_headers[http_constants.HttpHeaders.ThroughputBucket] = throughput_bucket - priority = kwargs.pop('priority', None) + priority = kwargs.pop("priority", None) if priority: self.default_headers[http_constants.HttpHeaders.PriorityLevel] = priority @@ -200,20 +207,21 @@ def __init__( # pylint: disable=too-many-statements retry_status=self.connection_policy.ConnectionRetryConfiguration.status, retry_backoff_max=self.connection_policy.ConnectionRetryConfiguration.DEFAULT_BACKOFF_MAX, retry_on_status_codes=list(self.connection_policy.ConnectionRetryConfiguration.status_forcelist), - retry_backoff_factor=self.connection_policy.ConnectionRetryConfiguration.backoff_factor + retry_backoff_factor=self.connection_policy.ConnectionRetryConfiguration.backoff_factor, ) else: raise TypeError( - "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry") + "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry" + ) - proxies = kwargs.pop('proxies', {}) + proxies = kwargs.pop("proxies", {}) if self.connection_policy.ProxyConfiguration and self.connection_policy.ProxyConfiguration.Host: host = self.connection_policy.ProxyConfiguration.Host url = urlparse(host) proxy = host if url.port else host + ":" + str(self.connection_policy.ProxyConfiguration.Port) proxies.update({url.scheme: proxy}) - suffix = kwargs.pop('user_agent_suffix', None) + suffix = kwargs.pop("user_agent_suffix", None) self._user_agent = _utils.get_user_agent_async(suffix) credentials_policy = None @@ -221,9 +229,7 @@ def __init__( # pylint: disable=too-many-statements scope_override = os.environ.get(Constants.AAD_SCOPE_OVERRIDE, "") account_scope = base.create_scope_from_url(self.url_connection) credentials_policy = AsyncCosmosBearerTokenCredentialPolicy( - self.aad_credentials, - account_scope, - scope_override + self.aad_credentials, account_scope, scope_override ) self._enable_diagnostics_logging = kwargs.pop("enable_diagnostics_logging", False) policies = [ @@ -248,9 +254,7 @@ def __init__( # pylint: disable=too-many-statements transport = kwargs.pop("transport", None) self.pipeline_client: AsyncPipelineClient[HttpRequest, AsyncHttpResponse] = AsyncPipelineClient( - base_url=url_connection, - transport=transport, - policies=policies + base_url=url_connection, transport=transport, policies=policies ) self._inference_service: Optional[_InferenceService] = None @@ -296,8 +300,8 @@ def _get_inference_service(self) -> Optional[_InferenceService]: @property def _Session(self) -> Optional[_session.Session]: """Gets the session object from the client. - :returns: the session for the client. - :rtype: _session.Session + :returns: the session for the client. + :rtype: _session.Session """ return self.session @@ -327,14 +331,12 @@ def _ReadEndpoint(self) -> str: return self._global_endpoint_manager.get_read_endpoint() async def _setup(self) -> None: - if 'database_account' not in self._setup_kwargs: - database_account = await self._global_endpoint_manager._GetDatabaseAccount( - **self._setup_kwargs - ) - self._setup_kwargs['database_account'] = database_account - await self._global_endpoint_manager.force_refresh_on_startup(self._setup_kwargs['database_account']) + if "database_account" not in self._setup_kwargs: + database_account = await self._global_endpoint_manager._GetDatabaseAccount(**self._setup_kwargs) + self._setup_kwargs["database_account"] = database_account + await self._global_endpoint_manager.force_refresh_on_startup(self._setup_kwargs["database_account"]) else: - database_account = self._setup_kwargs['database_account'] + database_account = self._setup_kwargs["database_account"] # Save the choice that was made (either None or some value) and branch to set or get the consistency if self.default_headers.get(http_constants.HttpHeaders.ConsistencyLevel): @@ -368,20 +370,14 @@ def _check_if_account_session_consistency(self, database_account: DatabaseAccoun return consistency_level return None - def _GetDatabaseIdWithPathForUser( - self, - database_link: str, - user: Mapping[str, Any] - ) -> Tuple[Optional[str], str]: + def _GetDatabaseIdWithPathForUser(self, database_link: str, user: Mapping[str, Any]) -> Tuple[Optional[str], str]: base._validate_resource(user) path = base.GetPathFromLink(database_link, http_constants.ResourceType.User) database_id = base.GetResourceIdOrFullNameFromLink(database_link) return database_id, path def _GetContainerIdWithPathForSproc( - self, - collection_link: str, - sproc: Mapping[str, Any] + self, collection_link: str, sproc: Mapping[str, Any] ) -> Tuple[Optional[str], str, dict[str, Any]]: base._validate_resource(sproc) sproc = dict(sproc) @@ -394,9 +390,7 @@ def _GetContainerIdWithPathForSproc( return collection_id, path, sproc def _GetContainerIdWithPathForTrigger( - self, - collection_link: str, - trigger: Mapping[str, Any] + self, collection_link: str, trigger: Mapping[str, Any] ) -> Tuple[Optional[str], str, dict[str, Any]]: base._validate_resource(trigger) trigger = dict(trigger) @@ -410,9 +404,7 @@ def _GetContainerIdWithPathForTrigger( return collection_id, path, trigger def _GetContainerIdWithPathForUDF( - self, - collection_link: str, - udf: Mapping[str, Any] + self, collection_link: str, udf: Mapping[str, Any] ) -> Tuple[Optional[str], str, dict[str, Any]]: base._validate_resource(udf) udf = dict(udf) @@ -426,9 +418,7 @@ def _GetContainerIdWithPathForUDF( return collection_id, path, udf async def GetDatabaseAccount( - self, - url_connection: Optional[str] = None, - **kwargs: Any + self, url_connection: Optional[str] = None, **kwargs: Any ) -> documents.DatabaseAccount: """Gets database account info. @@ -443,13 +433,16 @@ async def GetDatabaseAccount( url_connection = self.url_connection initial_headers = dict(self.default_headers) - headers = base.GetHeaders(self, initial_headers, "get", "", "", "", - documents._OperationType.Read, {}, - client_id=self.client_id) # path # id # type - - request_params = _request_object.RequestObject(http_constants.ResourceType.DatabaseAccount, - documents._OperationType.Read, - headers, endpoint_override=url_connection) + headers = base.GetHeaders( + self, initial_headers, "get", "", "", "", documents._OperationType.Read, {}, client_id=self.client_id + ) # path # id # type + + request_params = _request_object.RequestObject( + http_constants.ResourceType.DatabaseAccount, + documents._OperationType.Read, + headers, + endpoint_override=url_connection, + ) result, self.last_response_headers = await self.__Get("", request_params, headers, **kwargs) database_account = documents.DatabaseAccount() @@ -471,12 +464,10 @@ async def GetDatabaseAccount( if Constants.ReadableLocations in result: database_account._ReadableLocations = result[Constants.ReadableLocations] if Constants.EnableMultipleWritableLocations in result: - database_account._EnableMultipleWritableLocations = result[ - Constants.EnableMultipleWritableLocations - ] + database_account._EnableMultipleWritableLocations = result[Constants.EnableMultipleWritableLocations] self.UseMultipleWriteLocations = ( - self.connection_policy.UseMultipleWriteLocations and database_account._EnableMultipleWritableLocations + self.connection_policy.UseMultipleWriteLocations and database_account._EnableMultipleWritableLocations ) if Constants.EnablePerPartitionFailoverBehavior in result: @@ -484,11 +475,7 @@ async def GetDatabaseAccount( return database_account - async def health_check( - self, - url_connection: Optional[str] = None, - **kwargs: Any - ): + async def health_check(self, url_connection: Optional[str] = None, **kwargs: Any): """Checks health of region. :param str url_connection: the endpoint for the region to check health. @@ -496,21 +483,20 @@ async def health_check( if url_connection is None: url_connection = self.url_connection initial_headers = dict(self.default_headers) - headers = base.GetHeaders(self, initial_headers, "get", "", "","", - documents._OperationType.Read, {}, - client_id=self.client_id) - - request_params = _request_object.RequestObject(http_constants.ResourceType.DatabaseAccount, - documents._OperationType.Read, - headers, - endpoint_override=url_connection) + headers = base.GetHeaders( + self, initial_headers, "get", "", "", "", documents._OperationType.Read, {}, client_id=self.client_id + ) + + request_params = _request_object.RequestObject( + http_constants.ResourceType.DatabaseAccount, + documents._OperationType.Read, + headers, + endpoint_override=url_connection, + ) await self.__Get("", request_params, headers, **kwargs) async def CreateDatabase( - self, - database: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a database. @@ -532,11 +518,7 @@ async def CreateDatabase( return await self.Create(database, path, http_constants.ResourceType.Database, None, None, options, **kwargs) async def CreateUser( - self, - database_link: str, - user: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, user: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a user. @@ -559,11 +541,7 @@ async def CreateUser( return await self.Create(user, path, http_constants.ResourceType.User, database_id, None, options, **kwargs) async def CreateContainer( - self, - database_link: str, - collection: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, collection: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a collection in a database. @@ -585,8 +563,9 @@ async def CreateContainer( base._validate_resource(collection) path = base.GetPathFromLink(database_link, http_constants.ResourceType.Collection) database_id = base.GetResourceIdOrFullNameFromLink(database_link) - return await self.Create(collection, path, http_constants.ResourceType.Collection, database_id, None, - options, **kwargs) + return await self.Create( + collection, path, http_constants.ResourceType.Collection, database_id, None, options, **kwargs + ) async def CreateItem( self, @@ -628,15 +607,12 @@ async def CreateItem( if base.IsItemContainerLink(database_or_container_link): options = await self._AddPartitionKey(database_or_container_link, document, options) - return await self.Create(document, path, http_constants.ResourceType.Document, collection_id, None, - options, **kwargs) + return await self.Create( + document, path, http_constants.ResourceType.Document, collection_id, None, options, **kwargs + ) async def CreatePermission( - self, - user_link: str, - permission: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, permission: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a permission for a user. @@ -659,11 +635,7 @@ async def CreatePermission( return await self.Create(permission, path, "permissions", user_id, None, options, **kwargs) async def CreateUserDefinedFunction( - self, - collection_link: str, - udf: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, udf: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a user-defined function in a collection. @@ -682,15 +654,12 @@ async def CreateUserDefinedFunction( options = {} collection_id, path, udf = self._GetContainerIdWithPathForUDF(collection_link, udf) - return await self.Create(udf, path, http_constants.ResourceType.UserDefinedFunction, collection_id, None, - options, **kwargs) + return await self.Create( + udf, path, http_constants.ResourceType.UserDefinedFunction, collection_id, None, options, **kwargs + ) async def CreateTrigger( - self, - collection_link: str, - trigger: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, trigger: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Creates a trigger in a collection. @@ -709,15 +678,12 @@ async def CreateTrigger( options = {} collection_id, path, trigger = self._GetContainerIdWithPathForTrigger(collection_link, trigger) - return await self.Create(trigger, path, http_constants.ResourceType.Trigger, collection_id, None, - options, **kwargs) + return await self.Create( + trigger, path, http_constants.ResourceType.Trigger, collection_id, None, options, **kwargs + ) async def CreateStoredProcedure( - self, - collection_link: str, - sproc: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs + self, collection_link: str, sproc: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs ) -> CosmosDict: """Creates a stored procedure in a collection. @@ -736,8 +702,9 @@ async def CreateStoredProcedure( options = {} collection_id, path, sproc = self._GetContainerIdWithPathForSproc(collection_link, sproc) - return await self.Create(sproc, path, http_constants.ResourceType.StoredProcedure, collection_id, None, - options, **kwargs) + return await self.Create( + sproc, path, http_constants.ResourceType.StoredProcedure, collection_id, None, options, **kwargs + ) async def ExecuteStoredProcedure( self, @@ -771,13 +738,21 @@ async def ExecuteStoredProcedure( path = base.GetPathFromLink(sproc_link) sproc_id = base.GetResourceIdOrFullNameFromLink(sproc_link) - headers = base.GetHeaders(self, initial_headers, "post", path, sproc_id, - http_constants.ResourceType.StoredProcedure, - documents._OperationType.ExecuteJavaScript, options) + headers = base.GetHeaders( + self, + initial_headers, + "post", + path, + sproc_id, + http_constants.ResourceType.StoredProcedure, + documents._OperationType.ExecuteJavaScript, + options, + ) # ExecuteStoredProcedure will use WriteEndpoint since it uses POST operation - request_params = _request_object.RequestObject(http_constants.ResourceType.StoredProcedure, - documents._OperationType.ExecuteJavaScript, headers) + request_params = _request_object.RequestObject( + http_constants.ResourceType.StoredProcedure, documents._OperationType.ExecuteJavaScript, headers + ) request_params.set_excluded_location_from_options(options) result, self.last_response_headers = await self.__Post(path, request_params, params, headers, **kwargs) return result @@ -812,13 +787,13 @@ async def Create( options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "post", path, id, resource_type, - documents._OperationType.Create, options) + headers = base.GetHeaders( + self, initial_headers, "post", path, id, resource_type, documents._OperationType.Create, options + ) # Create will use WriteEndpoint since it uses POST operation - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.Create, - headers, - options.get("partitionKey", None)) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.Create, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) await base.set_session_token_header_async(self, headers, path, request_params, options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) @@ -834,11 +809,7 @@ async def Create( return CosmosDict(result, response_headers=last_response_headers) async def UpsertUser( - self, - database_link: str, - user: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, user: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a user. @@ -861,11 +832,7 @@ async def UpsertUser( return await self.Upsert(user, path, http_constants.ResourceType.User, database_id, None, options, **kwargs) async def UpsertPermission( - self, - user_link: str, - permission: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, permission: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Upserts a permission for a user. @@ -926,8 +893,9 @@ async def UpsertItem( collection_id, document, path = self._GetContainerIdWithPathForItem( database_or_container_link, document, options ) - return await self.Upsert(document, path, http_constants.ResourceType.Document, collection_id, None, - options, **kwargs) + return await self.Upsert( + document, path, http_constants.ResourceType.Document, collection_id, None, options, **kwargs + ) async def Upsert( self, @@ -959,15 +927,15 @@ async def Upsert( options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "post", path, id, resource_type, - documents._OperationType.Upsert, options) + headers = base.GetHeaders( + self, initial_headers, "post", path, id, resource_type, documents._OperationType.Upsert, options + ) headers[http_constants.HttpHeaders.IsUpsert] = True # Upsert will use WriteEndpoint since it uses POST operation - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.Upsert, - headers, - options.get("partitionKey", None)) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.Upsert, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) await base.set_session_token_header_async(self, headers, path, request_params, options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) @@ -1011,10 +979,7 @@ async def __Post( ) async def ReadDatabase( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a database. @@ -1036,10 +1001,7 @@ async def ReadDatabase( return await self.Read(path, http_constants.ResourceType.Database, database_id, None, options, **kwargs) async def ReadContainer( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a collection. @@ -1062,10 +1024,7 @@ async def ReadContainer( return await self.Read(path, http_constants.ResourceType.Collection, collection_id, None, options, **kwargs) async def ReadItem( - self, - document_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, document_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a document. @@ -1087,12 +1046,7 @@ async def ReadItem( document_id = base.GetResourceIdOrFullNameFromLink(document_link) return await self.Read(path, http_constants.ResourceType.Document, document_id, None, options, **kwargs) - async def ReadUser( - self, - user_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> CosmosDict: + async def ReadUser(self, user_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> CosmosDict: """Reads a user. :param str user_link: @@ -1114,10 +1068,7 @@ async def ReadUser( return await self.Read(path, http_constants.ResourceType.User, user_id, None, options, **kwargs) async def ReadPermission( - self, - permission_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, permission_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a permission. @@ -1140,10 +1091,7 @@ async def ReadPermission( return await self.Read(path, "permissions", permission_id, None, options, **kwargs) async def ReadUserDefinedFunction( - self, - udf_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, udf_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a user-defined function. @@ -1166,10 +1114,7 @@ async def ReadUserDefinedFunction( return await self.Read(path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, options, **kwargs) async def ReadStoredProcedure( - self, - sproc_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, sproc_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a stored procedure. @@ -1191,10 +1136,7 @@ async def ReadStoredProcedure( return await self.Read(path, http_constants.ResourceType.StoredProcedure, sproc_id, None, options, **kwargs) async def ReadTrigger( - self, - trigger_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, trigger_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a trigger. @@ -1217,10 +1159,7 @@ async def ReadTrigger( return await self.Read(path, http_constants.ResourceType.Trigger, trigger_id, None, options, **kwargs) async def ReadConflict( - self, - conflict_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, conflict_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Reads a conflict. @@ -1270,13 +1209,13 @@ async def Read( options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "get", path, id, resource_type, - documents._OperationType.Read, options) + headers = base.GetHeaders( + self, initial_headers, "get", path, id, resource_type, documents._OperationType.Read, options + ) # Read will use ReadEndpoint since it uses GET operation - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.Read, - headers, - options.get("partitionKey", None)) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.Read, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) await base.set_session_token_header_async(self, headers, path, request_params, options) request_params.set_availability_strategy(options, self.availability_strategy) @@ -1290,11 +1229,7 @@ async def Read( return CosmosDict(result, response_headers=last_response_headers) async def __Get( - self, - path: str, - request_params: _request_object.RequestObject, - req_headers: dict[str, Any], - **kwargs: Any + self, path: str, request_params: _request_object.RequestObject, req_headers: dict[str, Any], **kwargs: Any ) -> Tuple[dict[str, Any], CaseInsensitiveDict]: """Azure Cosmos 'GET' async http request. @@ -1317,11 +1252,7 @@ async def __Get( ) async def ReplaceUser( - self, - user_link: str, - user: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, user: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a user and return it. @@ -1399,15 +1330,12 @@ async def ReplaceContainer( base._validate_resource(collection) path = base.GetPathFromLink(collection_link) collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) - return await self.Replace(collection, path, http_constants.ResourceType.Collection, collection_id, None, - options, **kwargs) + return await self.Replace( + collection, path, http_constants.ResourceType.Collection, collection_id, None, options, **kwargs + ) async def ReplaceUserDefinedFunction( - self, - udf_link: str, - udf: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, udf_link: str, udf: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a user-defined function and returns it. @@ -1434,15 +1362,12 @@ async def ReplaceUserDefinedFunction( path = base.GetPathFromLink(udf_link) udf_id = base.GetResourceIdOrFullNameFromLink(udf_link) - return await self.Replace(udf, path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, - options, **kwargs) + return await self.Replace( + udf, path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, options, **kwargs + ) async def ReplaceTrigger( - self, - trigger_link: str, - trigger: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs + self, trigger_link: str, trigger: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs ) -> CosmosDict: """Replaces a trigger and returns it. @@ -1469,8 +1394,9 @@ async def ReplaceTrigger( path = base.GetPathFromLink(trigger_link) trigger_id = base.GetResourceIdOrFullNameFromLink(trigger_link) - return await self.Replace(trigger, path, http_constants.ResourceType.Trigger, trigger_id, None, - options, **kwargs) + return await self.Replace( + trigger, path, http_constants.ResourceType.Trigger, trigger_id, None, options, **kwargs + ) async def ReplaceItem( self, @@ -1510,8 +1436,9 @@ async def ReplaceItem( collection_link = base.GetItemContainerLink(document_link) options = await self._AddPartitionKey(collection_link, new_document, options) - return await self.Replace(new_document, path, http_constants.ResourceType.Document, document_id, None, - options, **kwargs) + return await self.Replace( + new_document, path, http_constants.ResourceType.Document, document_id, None, options, **kwargs + ) async def PatchItem( self, @@ -1540,13 +1467,13 @@ async def PatchItem( options = {} initial_headers = self.default_headers - headers = base.GetHeaders(self, initial_headers, "patch", path, document_id, resource_type, - documents._OperationType.Patch, options) + headers = base.GetHeaders( + self, initial_headers, "patch", path, document_id, resource_type, documents._OperationType.Patch, options + ) # Patch will use WriteEndpoint since it uses PUT operation - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.Patch, - headers, - options.get("partitionKey", None)) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.Patch, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) await base.set_session_token_header_async(self, headers, path, request_params, options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) @@ -1565,12 +1492,7 @@ async def PatchItem( response_hook(last_response_headers, result) return CosmosDict(result, response_headers=last_response_headers) - async def ReplaceOffer( - self, - offer_link: str, - offer: dict[str, Any], - **kwargs: Any - ) -> CosmosDict: + async def ReplaceOffer(self, offer_link: str, offer: dict[str, Any], **kwargs: Any) -> CosmosDict: """Replaces an offer and returns it. :param str offer_link: @@ -1588,11 +1510,7 @@ async def ReplaceOffer( return await self.Replace(offer, path, http_constants.ResourceType.Offer, offer_id, None, None, **kwargs) async def ReplaceStoredProcedure( - self, - sproc_link: str, - sproc: dict[str, Any], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, sproc_link: str, sproc: dict[str, Any], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> CosmosDict: """Replaces a stored procedure and returns it. @@ -1619,8 +1537,9 @@ async def ReplaceStoredProcedure( path = base.GetPathFromLink(sproc_link) sproc_id = base.GetResourceIdOrFullNameFromLink(sproc_link) - return await self.Replace(sproc, path, http_constants.ResourceType.StoredProcedure, sproc_id, None, - options, **kwargs) + return await self.Replace( + sproc, path, http_constants.ResourceType.StoredProcedure, sproc_id, None, options, **kwargs + ) async def Replace( self, @@ -1652,13 +1571,13 @@ async def Replace( options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "put", path, id, resource_type, - documents._OperationType.Replace, options) + headers = base.GetHeaders( + self, initial_headers, "put", path, id, resource_type, documents._OperationType.Replace, options + ) # Replace will use WriteEndpoint since it uses PUT operation - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.Replace, - headers, - options.get("partitionKey", None)) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.Replace, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) await base.set_session_token_header_async(self, headers, path, request_params, options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) @@ -1732,10 +1651,7 @@ async def __Patch( ) async def DeleteDatabase( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a database. @@ -1754,12 +1670,7 @@ async def DeleteDatabase( database_id = base.GetResourceIdOrFullNameFromLink(database_link) await self.DeleteResource(path, http_constants.ResourceType.Database, database_id, None, options, **kwargs) - async def DeleteUser( - self, - user_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + async def DeleteUser(self, user_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a user. :param str user_link: @@ -1779,10 +1690,7 @@ async def DeleteUser( await self.DeleteResource(path, http_constants.ResourceType.User, user_id, None, options, **kwargs) async def DeletePermission( - self, - permission_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, permission_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a permission. @@ -1803,10 +1711,7 @@ async def DeletePermission( await self.DeleteResource(path, "permissions", permission_id, None, options, **kwargs) async def DeleteContainer( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a collection. @@ -1826,12 +1731,7 @@ async def DeleteContainer( collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) await self.DeleteResource(path, http_constants.ResourceType.Collection, collection_id, None, options, **kwargs) - async def DeleteItem( - self, - document_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> None: + async def DeleteItem(self, document_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any) -> None: """Deletes a document. :param str document_link: @@ -1851,10 +1751,7 @@ async def DeleteItem( await self.DeleteResource(path, http_constants.ResourceType.Document, document_id, None, options, **kwargs) async def DeleteUserDefinedFunction( - self, - udf_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, udf_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a user-defined function. @@ -1871,14 +1768,12 @@ async def DeleteUserDefinedFunction( path = base.GetPathFromLink(udf_link) udf_id = base.GetResourceIdOrFullNameFromLink(udf_link) - await self.DeleteResource(path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, - options, **kwargs) + await self.DeleteResource( + path, http_constants.ResourceType.UserDefinedFunction, udf_id, None, options, **kwargs + ) async def DeleteTrigger( - self, - trigger_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, trigger_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a trigger. @@ -1899,10 +1794,7 @@ async def DeleteTrigger( await self.DeleteResource(path, http_constants.ResourceType.Trigger, trigger_id, None, options, **kwargs) async def DeleteStoredProcedure( - self, - sproc_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, sproc_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a stored procedure. @@ -1923,10 +1815,7 @@ async def DeleteStoredProcedure( await self.DeleteResource(path, http_constants.ResourceType.StoredProcedure, sproc_id, None, options, **kwargs) async def DeleteConflict( - self, - conflict_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, conflict_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Deletes a conflict. @@ -1973,13 +1862,13 @@ async def DeleteResource( options = {} initial_headers = initial_headers or self.default_headers - headers = base.GetHeaders(self, initial_headers, "delete", path, id, resource_type, - documents._OperationType.Delete, options) + headers = base.GetHeaders( + self, initial_headers, "delete", path, id, resource_type, documents._OperationType.Delete, options + ) # Delete will use WriteEndpoint since it uses DELETE operation - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.Delete, - headers, - options.get("partitionKey", None)) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.Delete, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) await base.set_session_token_header_async(self, headers, path, request_params, options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) @@ -1994,11 +1883,7 @@ async def DeleteResource( response_hook(last_response_headers, None) async def __Delete( - self, - path: str, - request_params: _request_object.RequestObject, - req_headers: dict[str, Any], - **kwargs: Any + self, path: str, request_params: _request_object.RequestObject, req_headers: dict[str, Any], **kwargs: Any ) -> Tuple[None, CaseInsensitiveDict]: """Azure Cosmos 'DELETE' async http request. @@ -2048,12 +1933,7 @@ async def Batch( formatted_operations = base._format_batch_operations(batch_operations) - results, last_response_headers = await self._Batch( - formatted_operations, - path, - collection_id, - options, - **kwargs) + results, last_response_headers = await self._Batch(formatted_operations, path, collection_id, options, **kwargs) self.last_response_headers = last_response_headers final_responses = [] @@ -2073,17 +1953,15 @@ async def Batch( error_index=error_index, headers=self.last_response_headers, status_code=error_status, - message="There was an error in the transactional batch on" + - " index {}. Error message: {}".format( - str(error_index), - Constants.ERROR_TRANSLATIONS.get(error_status) + message="There was an error in the transactional batch on" + + " index {}. Error message: {}".format( + str(error_index), Constants.ERROR_TRANSLATIONS.get(error_status) ), - operation_responses=final_responses + operation_responses=final_responses, ) if response_hook: response_hook(last_response_headers, final_responses) - return CosmosList(final_responses, - response_headers=last_response_headers) + return CosmosList(final_responses, response_headers=last_response_headers) async def _Batch( self, @@ -2095,13 +1973,22 @@ async def _Batch( ) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: initial_headers = self.default_headers.copy() base._populate_batch_headers(initial_headers) - headers = base.GetHeaders(self, initial_headers, "post", path, collection_id, - http_constants.ResourceType.Document, - documents._OperationType.Batch, options) - request_params = _request_object.RequestObject(http_constants.ResourceType.Document, - documents._OperationType.Batch, - headers, - options.get("partitionKey", None)) + headers = base.GetHeaders( + self, + initial_headers, + "post", + path, + collection_id, + http_constants.ResourceType.Document, + documents._OperationType.Batch, + options, + ) + request_params = _request_object.RequestObject( + http_constants.ResourceType.Document, + documents._OperationType.Batch, + headers, + options.get("partitionKey", None), + ) request_params.set_excluded_location_from_options(options) request_params.set_retry_write(options, self.connection_policy.RetryNonIdempotentWrites) await base.set_session_token_header_async(self, headers, path, request_params, options) @@ -2111,10 +1998,7 @@ async def _Batch( return cast(Tuple[list[dict[str, Any]], CaseInsensitiveDict], result) def _ReadPartitionKeyRanges( - self, - collection_link: str, - feed_options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, feed_options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads Partition Key Ranges. @@ -2161,22 +2045,29 @@ def _QueryPartitionKeyRanges( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.PartitionKeyRange, collection_id, + path, + http_constants.ResourceType.PartitionKeyRange, + collection_id, lambda r: r["PartitionKeyRanges"], - lambda _, b: b, query, options, **kwargs + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.PartitionKeyRange + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.PartitionKeyRange, ) def ReadDatabases( - self, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all databases. @@ -2194,10 +2085,7 @@ def ReadDatabases( return self.QueryDatabases(None, options, **kwargs) def QueryDatabases( - self, - query: Optional[Union[str, dict[str, Any]]], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, query: Optional[Union[str, dict[str, Any]]], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Queries databases. @@ -2215,8 +2103,14 @@ def QueryDatabases( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - "/dbs", http_constants.ResourceType.Database, "", lambda r: r["Databases"], - lambda _, b: b, query, options, **kwargs + "/dbs", + http_constants.ResourceType.Database, + "", + lambda r: r["Databases"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) @@ -2226,10 +2120,7 @@ async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], Ca ) def ReadContainers( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all collections in a database. @@ -2275,8 +2166,14 @@ def QueryContainers( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.Collection, database_id, lambda r: r["DocumentCollections"], - lambda _, body: body, query, options, **kwargs + path, + http_constants.ResourceType.Collection, + database_id, + lambda r: r["DocumentCollections"], + lambda _, body: body, + query, + options, + **kwargs ), self.last_response_headers, ) @@ -2286,12 +2183,12 @@ async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], Ca ) async def read_items( - self, - collection_link: str, - items: Sequence[Tuple[str, PartitionKeyType]], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any - ) -> CosmosList: + self, + collection_link: str, + items: Sequence[Tuple[str, PartitionKeyType]], + options: Optional[Mapping[str, Any]] = None, + **kwargs: Any + ) -> CosmosList: """Reads many items. :param str collection_link: The link to the document collection. @@ -2311,7 +2208,7 @@ async def read_items( raise ValueError("Could not find partition key definition for collection.") # Extract and remove max_concurrency from kwargs - max_concurrency = kwargs.pop('max_concurrency', None) + max_concurrency = kwargs.pop("max_concurrency", None) helper = ReadItemsHelperAsync( client=self, collection_link=collection_link, @@ -2319,11 +2216,10 @@ async def read_items( options=options, partition_key_definition=partition_key_definition, max_concurrency=max_concurrency, - **kwargs) + **kwargs + ) return await helper.read_items() - - def ReadItems( self, collection_link: str, @@ -2382,7 +2278,7 @@ def QueryItems( options, database_link=database_or_container_link, partition_key=partition_key, - page_iterator_class=query_iterable.QueryIterable + page_iterator_class=query_iterable.QueryIterable, ) path = base.GetPathFromLink(database_or_container_link, http_constants.ResourceType.Document) @@ -2419,9 +2315,9 @@ async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], Ca collection_link=database_or_container_link, page_iterator_class=query_iterable.QueryIterable, response_hook=response_hook, - raw_response_hook=kwargs.get('raw_response_hook'), + raw_response_hook=kwargs.get("raw_response_hook"), resource_type=http_constants.ResourceType.Document, - response_headers_list=response_headers_list + response_headers_list=response_headers_list, ) def QueryItemsChangeFeed( @@ -2453,13 +2349,13 @@ def QueryItemsChangeFeed( ) def _QueryChangeFeed( - self, - collection_link: str, - resource_type: str, - options: Optional[Mapping[str, Any]] = None, - partition_key_range_id: Optional[str] = None, - response_hook: Optional[Callable[[Mapping[str, Any], Mapping[str, Any]], None]] = None, - **kwargs: Any + self, + collection_link: str, + resource_type: str, + options: Optional[Mapping[str, Any]] = None, + partition_key_range_id: Optional[str] = None, + response_hook: Optional[Callable[[Mapping[str, Any], Mapping[str, Any]], None]] = None, + **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Queries change feed of a resource in a collection. @@ -2516,14 +2412,11 @@ async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], Ca options, fetch_function=fetch_fn, collection_link=collection_link, - page_iterator_class=ChangeFeedIterable + page_iterator_class=ChangeFeedIterable, ) def QueryOffers( - self, - query: Optional[Union[str, dict[str, Any]]], - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, query: Optional[Union[str, dict[str, Any]]], options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Query for all offers. @@ -2542,8 +2435,14 @@ def QueryOffers( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - "/offers", http_constants.ResourceType.Offer, "", lambda r: r["Offers"], - lambda _, b: b, query, options, **kwargs + "/offers", + http_constants.ResourceType.Offer, + "", + lambda r: r["Offers"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) @@ -2554,14 +2453,11 @@ async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], Ca options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.Offer + resource_type=http_constants.ResourceType.Offer, ) def ReadUsers( - self, - database_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, database_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all users in a database. @@ -2609,22 +2505,29 @@ def QueryUsers( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.User, database_id, lambda r: r["Users"], - lambda _, b: b, query, options, **kwargs + path, + http_constants.ResourceType.User, + database_id, + lambda r: r["Users"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.User + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.User, ) def ReadPermissions( - self, - user_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, user_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all permissions for a user. @@ -2672,22 +2575,29 @@ def QueryPermissions( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.Permission, user_id, lambda r: r["Permissions"], lambda _, b: b, - query, options, **kwargs + path, + http_constants.ResourceType.Permission, + user_id, + lambda r: r["Permissions"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.Permission + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.Permission, ) def ReadStoredProcedures( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all store procedures in a collection. @@ -2735,22 +2645,29 @@ def QueryStoredProcedures( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.StoredProcedure, collection_id, lambda r: r["StoredProcedures"], - lambda _, b: b, query, options, **kwargs + path, + http_constants.ResourceType.StoredProcedure, + collection_id, + lambda r: r["StoredProcedures"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.StoredProcedure + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.StoredProcedure, ) def ReadTriggers( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all triggers in a collection. @@ -2798,22 +2715,29 @@ def QueryTriggers( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.Trigger, collection_id, lambda r: r["Triggers"], - lambda _, b: b, query, options, **kwargs + path, + http_constants.ResourceType.Trigger, + collection_id, + lambda r: r["Triggers"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.Trigger + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.Trigger, ) def ReadUserDefinedFunctions( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """Reads all user-defined functions in a collection. @@ -2861,23 +2785,29 @@ def QueryUserDefinedFunctions( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.UserDefinedFunction, collection_id, + path, + http_constants.ResourceType.UserDefinedFunction, + collection_id, lambda r: r["UserDefinedFunctions"], - lambda _, b: b, query, options, **kwargs + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.UserDefinedFunction + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.UserDefinedFunction, ) def ReadConflicts( - self, - collection_link: str, - feed_options: Optional[Mapping[str, Any]] = None, - **kwargs + self, collection_link: str, feed_options: Optional[Mapping[str, Any]] = None, **kwargs ) -> AsyncItemPaged[dict[str, Any]]: """Reads conflicts. @@ -2924,15 +2854,25 @@ def QueryConflicts( async def fetch_fn(options: Mapping[str, Any]) -> Tuple[list[dict[str, Any]], CaseInsensitiveDict]: return ( await self.__QueryFeed( - path, http_constants.ResourceType.Conflict, collection_id, lambda r: r["Conflicts"], - lambda _, b: b, query, options, **kwargs + path, + http_constants.ResourceType.Conflict, + collection_id, + lambda r: r["Conflicts"], + lambda _, b: b, + query, + options, + **kwargs ), self.last_response_headers, ) return AsyncItemPaged( - self, query, options, fetch_function=fetch_fn, page_iterator_class=query_iterable.QueryIterable, - resource_type=http_constants.ResourceType.Conflict + self, + query, + options, + fetch_function=fetch_fn, + page_iterator_class=query_iterable.QueryIterable, + resource_type=http_constants.ResourceType.Conflict, ) async def QueryFeed( @@ -2975,7 +2915,7 @@ async def __QueryFeed( # pylint: disable=too-many-branches,too-many-statements, resource_type: str, id_: Optional[str], result_fn: Callable[[dict[str, Any]], list[dict[str, Any]]], - create_fn: Optional[Callable[['CosmosClientConnection', dict[str, Any]], dict[str, Any]]], + create_fn: Optional[Callable[["CosmosClientConnection", dict[str, Any]], dict[str, Any]]], query: Optional[Union[str, dict[str, Any]]], options: Optional[Mapping[str, Any]] = None, partition_key_range_id: Optional[str] = None, @@ -3039,14 +2979,15 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: container_property_func = kwargs.pop("containerProperties", None) container_property = None if container_property_func: - container_property = await container_property_func(options) # get properties with feed options + container_property = await container_property_func(options) # get properties with feed options # Copy to make sure that default_headers won't be changed. if query is None: op_type = documents._OperationType.QueryPlan if is_query_plan else documents._OperationType.ReadFeed # Query operations will use ReadEndpoint even though it uses GET(for feed requests) - headers = base.GetHeaders(self, initial_headers, "get", path, id_, resource_type, op_type, - options, partition_key_range_id) + headers = base.GetHeaders( + self, initial_headers, "get", path, id_, resource_type, op_type, options, partition_key_range_id + ) request_params = _request_object.RequestObject( resource_type, op_type, @@ -3056,17 +2997,28 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_max_concurrency = self.availability_strategy_max_concurrency - headers = base.GetHeaders(self, initial_headers, "get", path, id_, resource_type, - request_params.operation_type, options, partition_key_range_id) - await base.set_session_token_header_async(self, headers, path, request_params, options, - partition_key_range_id) + headers = base.GetHeaders( + self, + initial_headers, + "get", + path, + id_, + resource_type, + request_params.operation_type, + options, + partition_key_range_id, + ) + await base.set_session_token_header_async( + self, headers, path, request_params, options, partition_key_range_id + ) change_feed_state: Optional[ChangeFeedState] = options.get("changeFeedState") if change_feed_state is not None: feed_options = {} - if 'excludedLocations' in options: - feed_options['excludedLocations'] = options['excludedLocations'] - await change_feed_state.populate_request_headers_async(self._routing_map_provider, headers, - feed_options) + if "excludedLocations" in options: + feed_options["excludedLocations"] = options["excludedLocations"] + await change_feed_state.populate_request_headers_async( + self._routing_map_provider, headers, feed_options + ) request_params.headers = headers result, last_response_headers = await self.__Get(path, request_params, headers, **kwargs) @@ -3083,8 +3035,10 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: if not is_query_plan: initial_headers[http_constants.HttpHeaders.IsQuery] = "true" - if (self._query_compatibility_mode in (CosmosClientConnection._QueryCompatibilityMode.Default, - CosmosClientConnection._QueryCompatibilityMode.Query)): + if self._query_compatibility_mode in ( + CosmosClientConnection._QueryCompatibilityMode.Default, + CosmosClientConnection._QueryCompatibilityMode.Query, + ): initial_headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.QueryJson elif self._query_compatibility_mode == CosmosClientConnection._QueryCompatibilityMode.SqlQuery: initial_headers[http_constants.HttpHeaders.ContentType] = runtime_constants.MediaTypes.SQL @@ -3092,18 +3046,27 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: raise SystemError("Unexpected query compatibility mode.") # Query operations will use ReadEndpoint even though it uses POST(for regular query operations) - req_headers = base.GetHeaders(self, initial_headers, "post", path, id_, resource_type, - documents._OperationType.SqlQuery, options, partition_key_range_id) - request_params = _request_object.RequestObject(resource_type, - documents._OperationType.SqlQuery, - req_headers, - options.get("partitionKey", None)) + req_headers = base.GetHeaders( + self, + initial_headers, + "post", + path, + id_, + resource_type, + documents._OperationType.SqlQuery, + options, + partition_key_range_id, + ) + request_params = _request_object.RequestObject( + resource_type, documents._OperationType.SqlQuery, req_headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_max_concurrency = self.availability_strategy_max_concurrency if not is_query_plan: - await base.set_session_token_header_async(self, req_headers, path, request_params, options, - partition_key_range_id) + await base.set_session_token_header_async( + self, req_headers, path, request_params, options, partition_key_range_id + ) # Check if the over lapping ranges can be populated feed_range_epk = None @@ -3120,8 +3083,9 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: feed_range_epk = partition_key_obj._get_epk_range_for_prefix_partition_key(partition_key_value) if feed_range_epk is not None: - over_lapping_ranges = await self._routing_map_provider.get_overlapping_ranges(id_, [feed_range_epk], - options) + over_lapping_ranges = await self._routing_map_provider.get_overlapping_ranges( + id_, [feed_range_epk], options + ) results: dict[str, Any] = {} # For each over lapping range we will take a sub range of the feed range EPK that overlaps with the over # lapping physical partition. The EPK sub range will be one of four: @@ -3136,9 +3100,12 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: single_range = routing_range.Range.PartitionKeyRangeToRange(over_lapping_range) # Since the range min and max are all Upper Cased string Hex Values, # we can compare the values lexicographically - EPK_sub_range = routing_range.Range(range_min=max(single_range.min, feed_range_epk.min), - range_max=min(single_range.max, feed_range_epk.max), - isMinInclusive=True, isMaxInclusive=False) + EPK_sub_range = routing_range.Range( + range_min=max(single_range.min, feed_range_epk.min), + range_max=min(single_range.max, feed_range_epk.max), + isMinInclusive=True, + isMaxInclusive=False, + ) if single_range.min == EPK_sub_range.min and EPK_sub_range.max == single_range.max: # The Epk Sub Range spans exactly one physical partition # In this case we can route to the physical pk range id @@ -3152,11 +3119,7 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: req_headers[http_constants.HttpHeaders.EndEpkString] = EPK_sub_range.max req_headers[http_constants.HttpHeaders.ReadFeedKeyType] = "EffectivePartitionKeyRange" partial_result, last_response_headers = await self.__Post( - path, - request_params, - query, - req_headers, - **kwargs + path, request_params, query, req_headers, **kwargs ) self.last_response_headers = last_response_headers self._UpdateSessionIfRequired(req_headers, partial_result, last_response_headers) @@ -3165,7 +3128,7 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: # during splits as a precaution falling back to the original logic if anything goes wrong try: results = base._merge_query_results(results, partial_result, query) - except Exception: # pylint: disable=broad-exception-caught + except Exception: # pylint: disable=broad-exception-caught # If the new merge logic fails, fall back to the original logic. if results: results["Documents"].extend(partial_result["Documents"]) @@ -3181,11 +3144,13 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: if self.last_response_headers.get(http_constants.HttpHeaders.IndexUtilization) is not None: index_metrics_raw = self.last_response_headers[http_constants.HttpHeaders.IndexUtilization] self.last_response_headers[http_constants.HttpHeaders.IndexUtilization] = ( - _utils.get_index_metrics_info(index_metrics_raw)) + _utils.get_index_metrics_info(index_metrics_raw) + ) if self.last_response_headers.get(http_constants.HttpHeaders.QueryAdvice) is not None: query_advice_raw = self.last_response_headers[http_constants.HttpHeaders.QueryAdvice] - self.last_response_headers[http_constants.HttpHeaders.QueryAdvice] = ( - get_query_advice_info(query_advice_raw)) + self.last_response_headers[http_constants.HttpHeaders.QueryAdvice] = get_query_advice_info( + query_advice_raw + ) return __GetBodiesFromQueryResult(results) result, last_response_headers = await self.__Post(path, request_params, query, req_headers, **kwargs) @@ -3207,10 +3172,7 @@ def __GetBodiesFromQueryResult(result: dict[str, Any]) -> list[dict[str, Any]]: return __GetBodiesFromQueryResult(result) - def __CheckAndUnifyQueryFormat( - self, - query_body: Union[str, dict[str, Any]] - ) -> Union[str, dict[str, Any]]: + def __CheckAndUnifyQueryFormat(self, query_body: Union[str, dict[str, Any]]) -> Union[str, dict[str, Any]]: """Checks and unifies the format of the query body. :raises TypeError: If query_body is not of expected type (depending on the query compatibility mode). @@ -3224,9 +3186,10 @@ def __CheckAndUnifyQueryFormat( :rtype: dict or string """ - if ( - self._query_compatibility_mode in (CosmosClientConnection._QueryCompatibilityMode.Default, - CosmosClientConnection._QueryCompatibilityMode.Query)): + if self._query_compatibility_mode in ( + CosmosClientConnection._QueryCompatibilityMode.Default, + CosmosClientConnection._QueryCompatibilityMode.Query, + ): if not isinstance(query_body, dict) and not isinstance(query_body, str): raise TypeError("query body must be a dict or string.") if isinstance(query_body, dict) and not query_body.get("query"): @@ -3234,8 +3197,8 @@ def __CheckAndUnifyQueryFormat( if isinstance(query_body, str): return {"query": query_body} elif ( - self._query_compatibility_mode == CosmosClientConnection._QueryCompatibilityMode.SqlQuery - and not isinstance(query_body, str) + self._query_compatibility_mode == CosmosClientConnection._QueryCompatibilityMode.SqlQuery + and not isinstance(query_body, str) ): raise TypeError("query body must be a string.") else: @@ -3246,7 +3209,7 @@ def _UpdateSessionIfRequired( self, request_headers: Mapping[str, Any], response_result: Optional[Mapping[str, Any]], - response_headers: Optional[Mapping[str, Any]] + response_headers: Optional[Mapping[str, Any]], ) -> None: """ Updates session if necessary. @@ -3268,16 +3231,20 @@ def _UpdateSessionIfRequired( if documents.ConsistencyLevel.Session == request_headers[http_constants.HttpHeaders.ConsistencyLevel]: is_session_consistency = True - if (is_session_consistency and self.session and http_constants.HttpHeaders.SessionToken in response_headers and - not base.IsMasterResource(request_headers[http_constants.HttpHeaders.ThinClientProxyResourceType])): + if ( + is_session_consistency + and self.session + and http_constants.HttpHeaders.SessionToken in response_headers + and not base.IsMasterResource(request_headers[http_constants.HttpHeaders.ThinClientProxyResourceType]) + ): # update session self.session.update_session(self, response_result, response_headers) PartitionResolverErrorMessage = ( - "Couldn't find any partition resolvers for the database link provided. " - + "Ensure that the link you used when registering the partition resolvers " - + "matches the link provided or you need to register both types of database " - + "link(self link as well as ID based link)." + "Couldn't find any partition resolvers for the database link provided. " + + "Ensure that the link you used when registering the partition resolvers " + + "matches the link provided or you need to register both types of database " + + "link(self link as well as ID based link)." ) # Gets the collection id and path for the document @@ -3314,11 +3281,7 @@ def _GetUserIdWithPathForPermission(self, permission, user_link): user_id = base.GetResourceIdOrFullNameFromLink(user_link) return path, user_id - def RegisterPartitionResolver( - self, - database_link: str, - partition_resolver: RangePartitionResolver - ) -> None: + def RegisterPartitionResolver(self, database_link: str, partition_resolver: RangePartitionResolver) -> None: """Registers the partition resolver associated with the database link :param str database_link: @@ -3428,20 +3391,32 @@ async def _refresh_container_properties_cache(self, container_link: str): # Only cache Container Properties that will not change in the lifetime of the container self._set_container_properties_cache(container_link, _build_properties_cache(container, container_link)) - async def _GetQueryPlanThroughGateway(self, query: str, resource_link: str, - excluded_locations: Optional[Sequence[str]] = None, - **kwargs) -> list[dict[str, Any]]: - supported_query_features = (documents._QueryFeature.Aggregate + "," + - documents._QueryFeature.CompositeAggregate + "," + - documents._QueryFeature.Distinct + "," + - documents._QueryFeature.MultipleOrderBy + "," + - documents._QueryFeature.OffsetAndLimit + "," + - documents._QueryFeature.OrderBy + "," + - documents._QueryFeature.Top + "," + - documents._QueryFeature.NonStreamingOrderBy + "," + - documents._QueryFeature.HybridSearch + "," + - documents._QueryFeature.CountIf + "," + - documents._QueryFeature.WeightedRankFusion) + async def _GetQueryPlanThroughGateway( + self, query: str, resource_link: str, excluded_locations: Optional[Sequence[str]] = None, **kwargs + ) -> list[dict[str, Any]]: + supported_query_features = ( + documents._QueryFeature.Aggregate + + "," + + documents._QueryFeature.CompositeAggregate + + "," + + documents._QueryFeature.Distinct + + "," + + documents._QueryFeature.MultipleOrderBy + + "," + + documents._QueryFeature.OffsetAndLimit + + "," + + documents._QueryFeature.OrderBy + + "," + + documents._QueryFeature.Top + + "," + + documents._QueryFeature.NonStreamingOrderBy + + "," + + documents._QueryFeature.HybridSearch + + "," + + documents._QueryFeature.CountIf + + "," + + documents._QueryFeature.WeightedRankFusion + ) options = { "contentType": runtime_constants.MediaTypes.Json, @@ -3467,10 +3442,7 @@ async def _GetQueryPlanThroughGateway(self, query: str, resource_link: str, ) async def DeleteAllItemsByPartitionKey( - self, - collection_link: str, - options: Optional[Mapping[str, Any]] = None, - **kwargs: Any + self, collection_link: str, options: Optional[Mapping[str, Any]] = None, **kwargs: Any ) -> None: """Exposes an API to delete all items with a single partition key without the user having to explicitly call delete on each record in the partition key. @@ -3490,29 +3462,28 @@ async def DeleteAllItemsByPartitionKey( path = base.GetPathFromLink(collection_link) # Specified url to perform background operation to delete all items by partition key - path = '{}{}/{}'.format(path, "operations", "partitionkeydelete") + path = "{}{}/{}".format(path, "operations", "partitionkeydelete") collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) initial_headers = dict(self.default_headers) - headers = base.GetHeaders(self, initial_headers, "post", path, collection_id, "partitionkey", - documents._OperationType.Delete, options) - request_params = _request_object.RequestObject("partitionkey", - documents._OperationType.Delete, - headers, - options.get("partitionKey", None)) + headers = base.GetHeaders( + self, initial_headers, "post", path, collection_id, "partitionkey", documents._OperationType.Delete, options + ) + request_params = _request_object.RequestObject( + "partitionkey", documents._OperationType.Delete, headers, options.get("partitionKey", None) + ) request_params.set_excluded_location_from_options(options) request_params.set_availability_strategy(options, self.availability_strategy) request_params.availability_strategy_max_concurrency = self.availability_strategy_max_concurrency - _, last_response_headers = await self.__Post(path=path, request_params=request_params, - req_headers=headers, body=None, **kwargs) + _, last_response_headers = await self.__Post( + path=path, request_params=request_params, req_headers=headers, body=None, **kwargs + ) self._UpdateSessionIfRequired(headers, None, last_response_headers) self.last_response_headers = last_response_headers if response_hook: response_hook(last_response_headers, None) async def _get_partition_key_definition( - self, - collection_link: str, - options: Mapping[str, Any] + self, collection_link: str, options: Mapping[str, Any] ) -> Optional[dict[str, Any]]: partition_key_definition: Optional[dict[str, Any]] # If the document collection link is present in the cache, then use the cached partitionkey definition diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_database.py index 37c13438ae75..225e66f6bf2a 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_database.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Interact with databases in the Azure Cosmos DB SQL API service. -""" +"""Interact with databases in the Azure Cosmos DB SQL API service.""" from typing import Any, Mapping, Optional, Union, Callable, overload, Literal @@ -30,8 +29,12 @@ from azure.core.tracing.decorator import distributed_trace from ._cosmos_client_connection_async import CosmosClientConnection -from .._base import build_options as _build_options, _set_throughput_options, _deserialize_throughput, \ - _replace_throughput +from .._base import ( + build_options as _build_options, + _set_throughput_options, + _deserialize_throughput, + _replace_throughput, +) from ._container import ContainerProxy from ..offer import ThroughputProperties from ..http_constants import StatusCodes @@ -41,7 +44,6 @@ from ..partition_key import PartitionKey from .._cosmos_responses import CosmosDict - __all__ = ("DatabaseProxy",) @@ -49,7 +51,8 @@ # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs # pylint: disable=docstring-keyword-should-match-keyword-only -def _get_database_link(database_or_id: Union[str, 'DatabaseProxy', Mapping[str, Any]]) -> str: + +def _get_database_link(database_or_id: Union[str, "DatabaseProxy", Mapping[str, Any]]) -> str: if isinstance(database_or_id, str): return "dbs/{}".format(database_or_id) if isinstance(database_or_id, DatabaseProxy): @@ -87,10 +90,7 @@ class DatabaseProxy(object): """ def __init__( - self, - client_connection: CosmosClientConnection, - id: str, - properties: Optional[dict[str, Any]] = None + self, client_connection: CosmosClientConnection, id: str, properties: Optional[dict[str, Any]] = None ) -> None: """ :param client_connection: Client from which this database was retrieved. @@ -128,12 +128,7 @@ async def _get_properties(self) -> dict[str, Any]: return self._properties @distributed_trace_async - async def read( - self, - *, - initial_headers: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> CosmosDict: + async def read(self, *, initial_headers: Optional[dict[str, str]] = None, **kwargs: Any) -> CosmosDict: """Read the database properties. :keyword dict[str, str] initial_headers: Initial headers to be sent as part of the request. @@ -143,21 +138,20 @@ async def read( :returns: A dict representing the database properties :rtype: dict[str, Any] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) database_link = _get_database_link(self) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = _build_options(kwargs) - self._properties = await self.client_connection.ReadDatabase( - database_link, options=request_options, **kwargs - ) + self._properties = await self.client_connection.ReadDatabase(database_link, options=request_options, **kwargs) return self._properties @@ -179,7 +173,7 @@ async def create_container( change_feed_policy: Optional[dict[str, Any]] = None, full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[False] = False, - **kwargs: Any + **kwargs: Any, ) -> ContainerProxy: """Create a new container with the given ID (name). @@ -239,7 +233,7 @@ async def create_container( ... @overload - async def create_container( # pylint: disable=too-many-statements + async def create_container( # pylint: disable=too-many-statements self, id: str, partition_key: PartitionKey, @@ -256,7 +250,7 @@ async def create_container( # pylint: disable=too-many-statements change_feed_policy: Optional[dict[str, Any]] = None, full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[True], - **kwargs: Any + **kwargs: Any, ) -> tuple[ContainerProxy, CosmosDict]: """Create a new container with the given ID (name). @@ -316,10 +310,8 @@ async def create_container( # pylint: disable=too-many-statements ... @distributed_trace_async - async def create_container( # pylint:disable=docstring-should-be-keyword, too-many-statements - self, - *args: Any, - **kwargs: Any + async def create_container( # pylint:disable=docstring-should-be-keyword, too-many-statements + self, *args: Any, **kwargs: Any ) -> Union[ContainerProxy, tuple[ContainerProxy, CosmosDict]]: """Create a new container with the given ID (name). @@ -379,40 +371,43 @@ async def create_container( # pylint:disable=docstring-should-be-keyword, too-ma :name: create_container_with_settings """ - id = args[0] if len(args) > 0 else kwargs.pop('id') - partition_key = args[1] if len(args) > 1 else kwargs.pop('partition_key') + id = args[0] if len(args) > 0 else kwargs.pop("id") + partition_key = args[1] if len(args) > 1 else kwargs.pop("partition_key") if len(args) > 2: raise TypeError(f"Unexpected positional parameters: {args[2:]}") - indexing_policy = kwargs.pop('indexing_policy', None) - default_ttl = kwargs.pop('default_ttl', None) - offer_throughput = kwargs.pop('offer_throughput', None) - unique_key_policy = kwargs.pop('unique_key_policy', None) - conflict_resolution_policy = kwargs.pop('conflict_resolution_policy', None) - analytical_storage_ttl = kwargs.pop('analytical_storage_ttl', None) - vector_embedding_policy = kwargs.pop('vector_embedding_policy', None) - computed_properties = kwargs.pop('computed_properties', None) - change_feed_policy = kwargs.pop('change_feed_policy', None) - full_text_policy = kwargs.pop('full_text_policy', None) - return_properties = kwargs.pop('return_properties', False) - - session_token = kwargs.get('session_token') + indexing_policy = kwargs.pop("indexing_policy", None) + default_ttl = kwargs.pop("default_ttl", None) + offer_throughput = kwargs.pop("offer_throughput", None) + unique_key_policy = kwargs.pop("unique_key_policy", None) + conflict_resolution_policy = kwargs.pop("conflict_resolution_policy", None) + analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None) + vector_embedding_policy = kwargs.pop("vector_embedding_policy", None) + computed_properties = kwargs.pop("computed_properties", None) + change_feed_policy = kwargs.pop("change_feed_policy", None) + full_text_policy = kwargs.pop("full_text_policy", None) + return_properties = kwargs.pop("return_properties", False) + + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) definition: dict[str, Any] = {"id": id} if partition_key is not None: @@ -421,7 +416,7 @@ async def create_container( # pylint:disable=docstring-should-be-keyword, too-ma if indexing_policy.get("indexingMode") is IndexingMode.Lazy: warnings.warn( "Lazy indexing mode has been deprecated. Mode will be set to consistent indexing by the backend.", - DeprecationWarning + DeprecationWarning, ) definition["indexingPolicy"] = indexing_policy if default_ttl is not None: @@ -468,7 +463,7 @@ async def create_container_if_not_exists( change_feed_policy: Optional[dict[str, Any]] = None, full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[False] = False, - **kwargs: Any + **kwargs: Any, ) -> ContainerProxy: """Create a container if it does not exist already. @@ -529,7 +524,7 @@ async def create_container_if_not_exists( change_feed_policy: Optional[dict[str, Any]] = None, full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[True], - **kwargs: Any + **kwargs: Any, ) -> tuple[ContainerProxy, CosmosDict]: """Create a container if it does not exist already. @@ -573,10 +568,8 @@ async def create_container_if_not_exists( ... @distributed_trace_async - async def create_container_if_not_exists( # pylint:disable=docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + async def create_container_if_not_exists( # pylint:disable=docstring-should-be-keyword + self, *args: Any, **kwargs: Any ) -> Union[ContainerProxy, tuple[ContainerProxy, CosmosDict]]: """Create a container if it does not exist already. @@ -620,47 +613,47 @@ async def create_container_if_not_exists( # pylint:disable=docstring-should-be-k :rtype: ~azure.cosmos.ContainerProxy or tuple[~azure.cosmos.aio.ContainerProxy, ~azure.cosmos.CosmosDict] """ - id = args[0] if len(args) > 0 else kwargs.pop('id') - partition_key = args[1] if len(args) > 1 else kwargs.pop('partition_key') + id = args[0] if len(args) > 0 else kwargs.pop("id") + partition_key = args[1] if len(args) > 1 else kwargs.pop("partition_key") if len(args) > 2: raise TypeError(f"Unexpected positional parameters: {args[2:]}") - indexing_policy = kwargs.pop('indexing_policy', None) - default_ttl = kwargs.pop('default_ttl', None) - offer_throughput = kwargs.pop('offer_throughput', None) - unique_key_policy = kwargs.pop('unique_key_policy', None) - conflict_resolution_policy = kwargs.pop('conflict_resolution_policy', None) - initial_headers = kwargs.pop('initial_headers', None) - analytical_storage_ttl = kwargs.pop('analytical_storage_ttl', None) - vector_embedding_policy = kwargs.pop('vector_embedding_policy', None) - computed_properties = kwargs.pop('computed_properties', None) - change_feed_policy = kwargs.pop('change_feed_policy', None) - full_text_policy = kwargs.pop('full_text_policy', None) - return_properties = kwargs.pop('return_properties', False) - - session_token = kwargs.get('session_token') + indexing_policy = kwargs.pop("indexing_policy", None) + default_ttl = kwargs.pop("default_ttl", None) + offer_throughput = kwargs.pop("offer_throughput", None) + unique_key_policy = kwargs.pop("unique_key_policy", None) + conflict_resolution_policy = kwargs.pop("conflict_resolution_policy", None) + initial_headers = kwargs.pop("initial_headers", None) + analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None) + vector_embedding_policy = kwargs.pop("vector_embedding_policy", None) + computed_properties = kwargs.pop("computed_properties", None) + change_feed_policy = kwargs.pop("change_feed_policy", None) + full_text_policy = kwargs.pop("full_text_policy", None) + return_properties = kwargs.pop("return_properties", False) + + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) try: container_proxy = self.get_container_client(id) - properties = await container_proxy.read( - initial_headers=initial_headers, - **kwargs - ) + properties = await container_proxy.read(initial_headers=initial_headers, **kwargs) if not return_properties: return container_proxy return container_proxy, properties @@ -680,7 +673,7 @@ async def create_container_if_not_exists( # pylint:disable=docstring-should-be-k change_feed_policy=change_feed_policy, full_text_policy=full_text_policy, return_properties=return_properties, - **kwargs + **kwargs, ) def get_container_client(self, container: Union[str, ContainerProxy, dict[str, Any]]) -> ContainerProxy: @@ -707,7 +700,7 @@ def get_container_client(self, container: Union[str, ContainerProxy, dict[str, A elif isinstance(container, ContainerProxy): id_value = container.id else: - id_value = str(container['id']) + id_value = str(container["id"]) return ContainerProxy(self.client_connection, self.database_link, id_value) @distributed_trace @@ -717,7 +710,7 @@ def list_containers( max_item_count: Optional[int] = None, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any], AsyncItemPaged[dict[str, Any]]], None]] = None, - **kwargs + **kwargs, ) -> AsyncItemPaged[dict[str, Any]]: """List the containers in the database. @@ -738,21 +731,20 @@ def list_containers( :caption: List all containers in the database: :name: list_containers """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers feed_options = _build_options(kwargs) if max_item_count is not None: feed_options["maxItemCount"] = max_item_count - result = self.client_connection.ReadContainers( - database_link=self.database_link, options=feed_options, **kwargs - ) + result = self.client_connection.ReadContainers(database_link=self.database_link, options=feed_options, **kwargs) if response_hook: response_hook(self.client_connection.last_response_headers, result) return result @@ -766,7 +758,7 @@ def query_containers( max_item_count: Optional[int] = None, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any], AsyncItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """List the properties for containers in the current database. @@ -781,14 +773,15 @@ def query_containers( :returns: An AsyncItemPaged of container properties (dicts). :rtype: AsyncItemPaged[dict[str, Any]] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers feed_options = _build_options(kwargs) if max_item_count is not None: feed_options["maxItemCount"] = max_item_count @@ -797,7 +790,7 @@ def query_containers( database_link=self.database_link, query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs + **kwargs, ) if response_hook: response_hook(self.client_connection.last_response_headers, result) @@ -818,7 +811,7 @@ async def replace_container( full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[False] = False, vector_embedding_policy: Optional[dict[str, Any]] = None, - **kwargs: Any + **kwargs: Any, ) -> ContainerProxy: """Reset the properties of the container. @@ -865,7 +858,7 @@ async def replace_container( ... @overload - async def replace_container( # pylint:disable=docstring-missing-param + async def replace_container( # pylint:disable=docstring-missing-param self, container: Union[str, ContainerProxy, Mapping[str, Any]], partition_key: PartitionKey, @@ -879,7 +872,7 @@ async def replace_container( # pylint:disable=docstring-missing-param full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[True], vector_embedding_policy: Optional[dict[str, Any]] = None, - **kwargs: Any + **kwargs: Any, ) -> tuple[ContainerProxy, CosmosDict]: """Reset the properties of the container. @@ -927,10 +920,8 @@ async def replace_container( # pylint:disable=docstring-missing-param ... @distributed_trace_async - async def replace_container( # pylint:disable=docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + async def replace_container( # pylint:disable=docstring-should-be-keyword + self, *args: Any, **kwargs: Any ) -> Union[ContainerProxy, tuple[ContainerProxy, CosmosDict]]: """Reset the properties of the container. @@ -978,40 +969,43 @@ async def replace_container( # pylint:disable=docstring-should-be-keyword :name: reset_container_properties """ - container = args[0] if len(args) > 0 else kwargs.pop('container') - partition_key = args[1] if len(args) > 1 else kwargs.pop('partition_key') + container = args[0] if len(args) > 0 else kwargs.pop("container") + partition_key = args[1] if len(args) > 1 else kwargs.pop("partition_key") if len(args) > 2: raise TypeError(f"Unexpected positional parameters: {args[2:]}") - indexing_policy = kwargs.pop('indexing_policy', None) - default_ttl = kwargs.pop('default_ttl', None) - conflict_resolution_policy = kwargs.pop('conflict_resolution_policy', None) - initial_headers = kwargs.pop('initial_headers', None) - analytical_storage_ttl = kwargs.pop('analytical_storage_ttl', None) - computed_properties = kwargs.pop('computed_properties', None) - full_text_policy = kwargs.pop('full_text_policy', None) - return_properties = kwargs.pop('return_properties', False) - vector_embedding_policy = kwargs.pop('vector_embedding_policy', None) - - session_token = kwargs.get('session_token') + indexing_policy = kwargs.pop("indexing_policy", None) + default_ttl = kwargs.pop("default_ttl", None) + conflict_resolution_policy = kwargs.pop("conflict_resolution_policy", None) + initial_headers = kwargs.pop("initial_headers", None) + analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None) + computed_properties = kwargs.pop("computed_properties", None) + full_text_policy = kwargs.pop("full_text_policy", None) + return_properties = kwargs.pop("return_properties", False) + vector_embedding_policy = kwargs.pop("vector_embedding_policy", None) + + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = _build_options(kwargs) container_id = self._get_container_id(container) @@ -1027,7 +1021,7 @@ async def replace_container( # pylint:disable=docstring-should-be-keyword "analyticalStorageTtl": analytical_storage_ttl, "computedProperties": computed_properties, "fullTextPolicy": full_text_policy, - "vectorEmbeddingPolicy": vector_embedding_policy + "vectorEmbeddingPolicy": vector_embedding_policy, }.items() if value is not None } @@ -1038,12 +1032,14 @@ async def replace_container( # pylint:disable=docstring-should-be-keyword if not return_properties: return ContainerProxy( - self.client_connection, self.database_link, container_properties["id"], properties=container_properties) - return ContainerProxy( - self.client_connection, - self.database_link, - container_properties["id"], - properties=container_properties), container_properties + self.client_connection, self.database_link, container_properties["id"], properties=container_properties + ) + return ( + ContainerProxy( + self.client_connection, self.database_link, container_properties["id"], properties=container_properties + ), + container_properties, + ) @distributed_trace_async async def delete_container( @@ -1051,7 +1047,7 @@ async def delete_container( container: Union[str, ContainerProxy, Mapping[str, Any]], *, initial_headers: Optional[dict[str, str]] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """Delete a container. @@ -1065,37 +1061,36 @@ async def delete_container( :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: If the container couldn't be deleted. :rtype: None """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = _build_options(kwargs) collection_link = self._get_container_link(container) await self.client_connection.DeleteContainer(collection_link, options=request_options, **kwargs) @distributed_trace_async - async def create_user( - self, - body: dict[str, Any], - **kwargs: Any - ) -> UserProxy: # body should just be id? + async def create_user(self, body: dict[str, Any], **kwargs: Any) -> UserProxy: # body should just be id? """Create a new user in the container. To update or replace an existing user, use the @@ -1122,16 +1117,14 @@ async def create_user( request_options = _build_options(kwargs) user = await self.client_connection.CreateUser( - database_link=self.database_link, user=body, options=request_options, **kwargs) + database_link=self.database_link, user=body, options=request_options, **kwargs + ) return UserProxy( client_connection=self.client_connection, id=user["id"], database_link=self.database_link, properties=user ) - def get_user_client( - self, - user: Union[str, UserProxy, Mapping[str, Any]] - ) -> UserProxy: + def get_user_client(self, user: Union[str, UserProxy, Mapping[str, Any]]) -> UserProxy: """Get a `UserProxy` for a user with specified ID. :param user: The ID (name), dict representing the properties, or :class:`UserProxy` @@ -1145,7 +1138,7 @@ def get_user_client( elif isinstance(user, UserProxy): id_value = user.id else: - id_value = str(user['id']) + id_value = str(user["id"]) return UserProxy(client_connection=self.client_connection, id=id_value, database_link=self.database_link) @distributed_trace @@ -1154,7 +1147,7 @@ def list_users( *, max_item_count: Optional[int] = None, response_hook: Optional[Callable[[Mapping[str, Any], AsyncItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """List all the users in the container. @@ -1168,9 +1161,7 @@ def list_users( if max_item_count is not None: feed_options["maxItemCount"] = max_item_count - result = self.client_connection.ReadUsers( - database_link=self.database_link, options=feed_options, **kwargs - ) + result = self.client_connection.ReadUsers(database_link=self.database_link, options=feed_options, **kwargs) if response_hook: response_hook(self.client_connection.last_response_headers, result) return result @@ -1183,7 +1174,7 @@ def query_users( parameters: Optional[list[dict[str, Any]]] = None, max_item_count: Optional[int] = None, response_hook: Optional[Callable[[Mapping[str, Any], AsyncItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> AsyncItemPaged[dict[str, Any]]: """Return all users matching the given `query`. @@ -1206,18 +1197,14 @@ def query_users( database_link=self.database_link, query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs + **kwargs, ) if response_hook: response_hook(self.client_connection.last_response_headers, result) return result @distributed_trace_async - async def upsert_user( - self, - body: dict[str, Any], - **kwargs: Any - ) -> UserProxy: + async def upsert_user(self, body: dict[str, Any], **kwargs: Any) -> UserProxy: """Insert or update the specified user. If the user already exists in the container, it is replaced. If the user @@ -1241,10 +1228,7 @@ async def upsert_user( @distributed_trace_async async def replace_user( - self, - user: Union[str, UserProxy, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, user: Union[str, UserProxy, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> UserProxy: """Replaces the specified user if it exists in the container. @@ -1262,21 +1246,18 @@ async def replace_user( request_options = _build_options(kwargs) replaced_user = await self.client_connection.ReplaceUser( - user_link=self._get_user_link(user), user=body, options=request_options, **kwargs) + user_link=self._get_user_link(user), user=body, options=request_options, **kwargs + ) return UserProxy( client_connection=self.client_connection, id=replaced_user["id"], database_link=self.database_link, - properties=replaced_user + properties=replaced_user, ) @distributed_trace_async - async def delete_user( - self, - user: Union[str, UserProxy, Mapping[str, Any]], - **kwargs: Any - ) -> None: + async def delete_user(self, user: Union[str, UserProxy, Mapping[str, Any]], **kwargs: Any) -> None: """Delete the specified user from the container. :param user: The ID (name), dict representing the properties or :class:`UserProxy` @@ -1290,16 +1271,15 @@ async def delete_user( """ request_options = _build_options(kwargs) - await self.client_connection.DeleteUser( - user_link=self._get_user_link(user), options=request_options, **kwargs - ) + await self.client_connection.DeleteUser(user_link=self._get_user_link(user), options=request_options, **kwargs) @distributed_trace_async async def get_throughput( - self, - *, - response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, - **kwargs: Any) -> ThroughputProperties: + self, + *, + response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, + **kwargs: Any, + ) -> ThroughputProperties: """Get the ThroughputProperties object for this database. If no ThroughputProperties already exists for the database, an exception is raised. @@ -1317,12 +1297,14 @@ async def get_throughput( "query": "SELECT * FROM root r WHERE r.resource=@link", "parameters": [{"name": "@link", "value": link}], } - throughput_properties = [throughput async for throughput in - self.client_connection.QueryOffers(query_spec, **kwargs)] + throughput_properties = [ + throughput async for throughput in self.client_connection.QueryOffers(query_spec, **kwargs) + ] if len(throughput_properties) == 0: raise CosmosResourceNotFoundError( status_code=StatusCodes.NOT_FOUND, - message="Could not find ThroughputProperties for database " + self.database_link) + message="Could not find ThroughputProperties for database " + self.database_link, + ) if response_hook: response_hook(self.client_connection.last_response_headers, throughput_properties) @@ -1331,9 +1313,7 @@ async def get_throughput( @distributed_trace_async async def replace_throughput( - self, - throughput: Union[int, ThroughputProperties], - **kwargs: Any + self, throughput: Union[int, ThroughputProperties], **kwargs: Any ) -> ThroughputProperties: """Replace the database-level throughput. @@ -1354,16 +1334,18 @@ async def replace_throughput( "query": "SELECT * FROM root r WHERE r.resource=@link", "parameters": [{"name": "@link", "value": link}], } - throughput_properties = [throughput async for throughput in - self.client_connection.QueryOffers(query_spec, **kwargs)] + throughput_properties = [ + throughput async for throughput in self.client_connection.QueryOffers(query_spec, **kwargs) + ] if len(throughput_properties) == 0: raise CosmosResourceNotFoundError( - status_code=StatusCodes.NOT_FOUND, - message="Could not find Offer for database " + self.database_link) + status_code=StatusCodes.NOT_FOUND, message="Could not find Offer for database " + self.database_link + ) new_offer = throughput_properties[0].copy() _replace_throughput(throughput=throughput, new_throughput_properties=new_offer) - data = await self.client_connection.ReplaceOffer(offer_link=throughput_properties[0]["_self"], - offer=throughput_properties[0], **kwargs) + data = await self.client_connection.ReplaceOffer( + offer_link=throughput_properties[0]["_self"], offer=throughput_properties[0], **kwargs + ) return ThroughputProperties(offer_throughput=data["content"]["offerThroughput"], properties=data) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_endpoint_manager_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_endpoint_manager_async.py index dc989df69cd3..b9d9f3b3fc93 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_endpoint_manager_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_endpoint_manager_async.py @@ -40,7 +40,8 @@ logger = logging.getLogger("azure.cosmos.aio._GlobalEndpointManager") -class _GlobalEndpointManager(object): # pylint: disable=too-many-instance-attributes + +class _GlobalEndpointManager(object): # pylint: disable=too-many-instance-attributes """ This internal class implements the logic for endpoint management for geo-replicated database accounts. @@ -51,10 +52,7 @@ def __init__(self, client): self.PreferredLocations = client.connection_policy.PreferredLocations self.DefaultEndpoint = client.url_connection self.refresh_time_interval_in_ms = self.get_refresh_time_interval_in_ms_stub() - self.location_cache = LocationCache( - self.DefaultEndpoint, - client.connection_policy - ) + self.location_cache = LocationCache(self.DefaultEndpoint, client.connection_policy) self.startup = True self.refresh_task = None self.refresh_needed = False @@ -72,10 +70,7 @@ def get_write_endpoint(self): def get_read_endpoint(self): return self.location_cache.get_read_regional_routing_context() - def _resolve_service_endpoint( - self, - request: RequestObject - ) -> str: + def _resolve_service_endpoint(self, request: RequestObject) -> str: return self.location_cache.resolve_service_endpoint(request) def mark_endpoint_unavailable_for_read(self, endpoint, refresh_cache, context: str): @@ -90,7 +85,9 @@ def get_ordered_write_locations(self): def get_ordered_read_locations(self): return self.location_cache.get_ordered_read_locations() - def get_applicable_read_regional_routing_contexts(self, request: RequestObject) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long + def get_applicable_read_regional_routing_contexts( + self, request: RequestObject + ) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long """Gets the applicable read regional routing contexts based on request parameters. :param request: Request object containing operation parameters and exclusion lists @@ -100,7 +97,9 @@ def get_applicable_read_regional_routing_contexts(self, request: RequestObject) """ return self.location_cache._get_applicable_read_regional_routing_contexts(request) - def get_applicable_write_regional_routing_contexts(self, request: RequestObject) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long + def get_applicable_write_regional_routing_contexts( + self, request: RequestObject + ) -> list[RegionalRoutingContext]: # pylint: disable=name-too-long """Gets the applicable write regional routing contexts based on request parameters. :param request: Request object containing operation parameters and exclusion lists @@ -150,7 +149,7 @@ async def refresh_endpoint_list(self, database_account, **kwargs): try: await self.refresh_task self.refresh_task = None - except (Exception, asyncio.CancelledError) as exception: #pylint: disable=broad-exception-caught + except (Exception, asyncio.CancelledError) as exception: # pylint: disable=broad-exception-caught logger.error("Health check task failed: %s", exception, exc_info=True) if current_time_millis() - self.last_refresh_time > self.refresh_time_interval_in_ms: self.refresh_needed = True @@ -198,7 +197,7 @@ async def _health_check(self, endpoint: str, **kwargs: dict[str, Any]): await self.client.health_check(endpoint, **kwargs) self.location_cache.mark_endpoint_available(endpoint) except (exceptions.CosmosHttpResponseError, AzureError): - self._mark_endpoint_unavailable(endpoint,"_database_account_check") + self._mark_endpoint_unavailable(endpoint, "_database_account_check") async def _endpoints_health_check(self, **kwargs): """Gets the database account for each endpoint. @@ -242,7 +241,7 @@ async def _GetDatabaseAccount(self, **kwargs) -> DatabaseAccount: self._database_account_cache = database_account return database_account except (exceptions.CosmosHttpResponseError, AzureError): - self._mark_endpoint_unavailable(locational_endpoint,"_GetDatabaseAccount") + self._mark_endpoint_unavailable(locational_endpoint, "_GetDatabaseAccount") raise async def _GetDatabaseAccountStub(self, endpoint, **kwargs): @@ -261,5 +260,5 @@ async def close(self): self.refresh_task.cancel() try: await self.refresh_task - except (Exception, asyncio.CancelledError) : #pylint: disable=broad-exception-caught + except (Exception, asyncio.CancelledError): # pylint: disable=broad-exception-caught pass diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_circuit_breaker_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_circuit_breaker_async.py index 954a324cc13f..3ea7d5c59c26 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_circuit_breaker_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_circuit_breaker_async.py @@ -19,14 +19,15 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal class for global endpoint manager for circuit breaker. -""" +"""Internal class for global endpoint manager for circuit breaker.""" + from typing import TYPE_CHECKING, Optional from azure.cosmos._constants import _Constants from azure.cosmos.partition_key import _get_partition_key_from_partition_key_definition -from azure.cosmos._global_partition_endpoint_manager_circuit_breaker_core import \ - _GlobalPartitionEndpointManagerForCircuitBreakerCore +from azure.cosmos._global_partition_endpoint_manager_circuit_breaker_core import ( + _GlobalPartitionEndpointManagerForCircuitBreakerCore, +) from azure.cosmos._routing.routing_range import PartitionKeyRangeWrapper, Range from azure.cosmos.aio._global_endpoint_manager_async import _GlobalEndpointManager @@ -36,6 +37,7 @@ if TYPE_CHECKING: from azure.cosmos.aio._cosmos_client_connection_async import CosmosClientConnection + # cspell:ignore ppcb # pylint: disable=protected-access class _GlobalPartitionEndpointManagerForCircuitBreakerAsync(_GlobalEndpointManager): @@ -46,8 +48,9 @@ class _GlobalPartitionEndpointManagerForCircuitBreakerAsync(_GlobalEndpointManag def __init__(self, client: "CosmosClientConnection"): super(_GlobalPartitionEndpointManagerForCircuitBreakerAsync, self).__init__(client) - self.global_partition_endpoint_manager_core = ( - _GlobalPartitionEndpointManagerForCircuitBreakerCore(client, self.location_cache)) + self.global_partition_endpoint_manager_core = _GlobalPartitionEndpointManagerForCircuitBreakerCore( + client, self.location_cache + ) async def create_pk_range_wrapper(self, request: RequestObject) -> Optional[PartitionKeyRangeWrapper]: if HttpHeaders.IntendedCollectionRID in request.headers: @@ -55,7 +58,8 @@ async def create_pk_range_wrapper(self, request: RequestObject) -> Optional[Part else: self.global_partition_endpoint_manager_core.log_warn_or_debug( "Illegal state: the request does not contain container information. " - "Circuit breaker cannot be performed.") + "Circuit breaker cannot be performed." + ) return None properties = self.client._container_properties_cache[container_rid] # get relevant information from container cache to get the overlapping ranges @@ -70,23 +74,27 @@ async def create_pk_range_wrapper(self, request: RequestObject) -> Optional[Part partition_key_value = request.pk_val # get the partition key range for the given partition key epk_range = [partition_key._get_epk_range_for_partition_key(partition_key_value)] - partition_ranges = await (self.client._routing_map_provider - .get_overlapping_ranges(container_link, epk_range, options)) + partition_ranges = await self.client._routing_map_provider.get_overlapping_ranges( + container_link, epk_range, options + ) partition_range = Range.PartitionKeyRangeToRange(partition_ranges[0]) elif HttpHeaders.PartitionKeyRangeID in request.headers: pk_range_id = request.headers[HttpHeaders.PartitionKeyRangeID] - epk_range = await (self.client._routing_map_provider - .get_range_by_partition_key_range_id(container_link, pk_range_id, options)) + epk_range = await self.client._routing_map_provider.get_range_by_partition_key_range_id( + container_link, pk_range_id, options + ) if not epk_range: self.global_partition_endpoint_manager_core.log_warn_or_debug( "Illegal state: partition key range cache not initialized correctly. " - "Circuit breaker cannot be performed.") + "Circuit breaker cannot be performed." + ) return None partition_range = Range.PartitionKeyRangeToRange(epk_range) else: self.global_partition_endpoint_manager_core.log_warn_or_debug( "Illegal state: the request does not contain partition information. " - "Circuit breaker cannot be performed.") + "Circuit breaker cannot be performed." + ) return None return PartitionKeyRangeWrapper(partition_range, container_rid) @@ -95,9 +103,8 @@ def is_circuit_breaker_applicable(self, request: RequestObject) -> bool: return self.global_partition_endpoint_manager_core.is_circuit_breaker_applicable(request) async def record_ppcb_failure( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: if self.is_circuit_breaker_applicable(request): if pk_range_wrapper is None: pk_range_wrapper = await self.create_pk_range_wrapper(request) @@ -105,20 +112,18 @@ async def record_ppcb_failure( self.global_partition_endpoint_manager_core.record_failure(request, pk_range_wrapper) def _resolve_service_endpoint_for_partition_circuit_breaker( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] ): if self.is_circuit_breaker_applicable(request) and pk_range_wrapper: self.global_partition_endpoint_manager_core.check_stale_partition_info(request, pk_range_wrapper) - request = self.global_partition_endpoint_manager_core.add_excluded_locations_to_request(request, - pk_range_wrapper) + request = self.global_partition_endpoint_manager_core.add_excluded_locations_to_request( + request, pk_range_wrapper + ) return self._resolve_service_endpoint(request) async def record_ppcb_success( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: if self.is_circuit_breaker_applicable(request): if pk_range_wrapper is None: pk_range_wrapper = await self.create_pk_range_wrapper(request) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_per_partition_automatic_failover_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_per_partition_automatic_failover_async.py index c96b46ca46b3..55f6e29d4491 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_per_partition_automatic_failover_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_partition_endpoint_manager_per_partition_automatic_failover_async.py @@ -4,6 +4,7 @@ """Class for global endpoint manager for per partition automatic failover. This class inherits the circuit breaker endpoint manager, since enabling per partition automatic failover also enables the circuit breaker logic. """ + import logging import threading import os @@ -12,8 +13,9 @@ from azure.cosmos.http_constants import ResourceType from azure.cosmos._constants import _Constants as Constants -from azure.cosmos.aio._global_partition_endpoint_manager_circuit_breaker_async import \ - _GlobalPartitionEndpointManagerForCircuitBreakerAsync +from azure.cosmos.aio._global_partition_endpoint_manager_circuit_breaker_async import ( + _GlobalPartitionEndpointManagerForCircuitBreakerAsync, +) from azure.cosmos.documents import _OperationType from azure.cosmos._partition_health_tracker import _PPAFPartitionThresholdsTracker from azure.cosmos._request_object import RequestObject @@ -26,23 +28,26 @@ logger = logging.getLogger("azure.cosmos._GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover") # pylint: disable=name-too-long, protected-access, too-many-nested-blocks -#cspell:ignore PPAF, ppaf, ppcb +# cspell:ignore PPAF, ppaf, ppcb + class PartitionLevelFailoverInfo: """ Holds information about the partition level regional failover. Used to track the partition key range and the regions where it is available. """ + def __init__(self) -> None: self.unavailable_regional_endpoints: dict[str, "RegionalRoutingContext"] = {} self._lock = threading.Lock() self.current_region: Optional[str] = None def try_move_to_next_location( - self, - available_account_regional_endpoints: dict[str, "RegionalRoutingContext"], - endpoint_region: str, - request: RequestObject) -> bool: + self, + available_account_regional_endpoints: dict[str, "RegionalRoutingContext"], + endpoint_region: str, + request: RequestObject, + ) -> bool: """ Tries to move to the next available regional endpoint for the partition key range. :param Dict[str, RegionalRoutingContext] available_account_regional_endpoints: The available regional endpoints @@ -72,12 +77,15 @@ def try_move_to_next_location( return False + class _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync( - _GlobalPartitionEndpointManagerForCircuitBreakerAsync): + _GlobalPartitionEndpointManagerForCircuitBreakerAsync +): """ This internal class implements the logic for partition endpoint management for geo-replicated database accounts. """ + def __init__(self, client: "CosmosClientConnection") -> None: super(_GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, self).__init__(client) self.partition_range_to_failover_info: dict[PartitionKeyRangeWrapper, PartitionLevelFailoverInfo] = {} @@ -96,8 +104,9 @@ def is_per_partition_automatic_failover_applicable(self, request: RequestObject) if not request: return False - if (self.location_cache.can_use_multiple_write_locations_for_request(request) - or _OperationType.IsReadOnlyOperation(request.operation_type)): + if self.location_cache.can_use_multiple_write_locations_for_request( + request + ) or _OperationType.IsReadOnlyOperation(request.operation_type): return False # if we have at most one region available in the account, we cannot do per partition automatic failover @@ -107,16 +116,15 @@ def is_per_partition_automatic_failover_applicable(self, request: RequestObject) # if the request is not a non-query plan document request # or if the request is not executing a stored procedure, return False - if (request.resource_type != ResourceType.Document and - request.operation_type != _OperationType.ExecuteJavaScript): + if ( + request.resource_type != ResourceType.Document + and request.operation_type != _OperationType.ExecuteJavaScript + ): return False return True - def try_ppaf_failover_threshold( - self, - pk_range_wrapper: "PartitionKeyRangeWrapper", - request: "RequestObject"): + def try_ppaf_failover_threshold(self, pk_range_wrapper: "PartitionKeyRangeWrapper", request: "RequestObject"): """Verifies whether the per-partition failover threshold has been reached for consecutive errors. If so, it marks the current region as unavailable for the given partition key range, and moves to the next available region for the request. @@ -129,32 +137,36 @@ def try_ppaf_failover_threshold( # If PPAF is enabled, we track consecutive failures for certain exceptions, and only fail over at a partition # level after the threshold is reached if request and self.is_per_partition_automatic_failover_applicable(request): - if (self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) - >= int(os.environ.get(Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, - Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT))): + if self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) >= int( + os.environ.get(Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT) + ): # If the PPAF threshold is reached, we reset the count and mark the endpoint unavailable # Once we mark the endpoint unavailable, the PPAF endpoint manager will try to move to the next # available region for the partition key range with self._threshold_lock: # Check for count again, since a previous request may have now reset the count - if (self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) - >= int(os.environ.get(Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, - Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT))): + if self.ppaf_thresholds_tracker.get_pk_failures(pk_range_wrapper) >= int( + os.environ.get( + Constants.TIMEOUT_ERROR_THRESHOLD_PPAF, Constants.TIMEOUT_ERROR_THRESHOLD_PPAF_DEFAULT + ) + ): self.ppaf_thresholds_tracker.clear_pk_failures(pk_range_wrapper) partition_level_info = self.partition_range_to_failover_info[pk_range_wrapper] location = self.location_cache.get_location_from_endpoint( - str(request.location_endpoint_to_route)) - logger.warning("PPAF - Failover threshold reached for partition key range: %s for region: %s", #pylint: disable=line-too-long - pk_range_wrapper, location) - regional_context = (self.location_cache. - account_read_regional_routing_contexts_by_location. - get(location).primary_endpoint) + str(request.location_endpoint_to_route) + ) + logger.warning( + "PPAF - Failover threshold reached for partition key range: %s for region: %s", # pylint: disable=line-too-long + pk_range_wrapper, + location, + ) + regional_context = self.location_cache.account_read_regional_routing_contexts_by_location.get( + location + ).primary_endpoint partition_level_info.unavailable_regional_endpoints[location] = regional_context def resolve_service_endpoint_for_partition( - self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] ) -> str: """Resolves the endpoint to be used for the request. In a PPAF-enabled account, this method checks whether the partition key range has any unavailable regions, and if so, it tries to move to the next available region. @@ -174,20 +186,28 @@ def resolve_service_endpoint_for_partition( if request.location_endpoint_to_route is not None: endpoint_region = self.location_cache.get_location_from_endpoint(request.location_endpoint_to_route) if endpoint_region in partition_failover_info.unavailable_regional_endpoints: - available_account_regional_endpoints = self.location_cache.account_read_regional_routing_contexts_by_location #pylint: disable=line-too-long - if (partition_failover_info.current_region is not None and - endpoint_region != partition_failover_info.current_region): + available_account_regional_endpoints = ( + self.location_cache.account_read_regional_routing_contexts_by_location + ) # pylint: disable=line-too-long + if ( + partition_failover_info.current_region is not None + and endpoint_region != partition_failover_info.current_region + ): # this request has not yet seen there's an available region being used for this partition regional_endpoint = available_account_regional_endpoints[ - partition_failover_info.current_region].primary_endpoint + partition_failover_info.current_region + ].primary_endpoint request.route_to_location(regional_endpoint) else: - if (len(self.location_cache.account_read_regional_routing_contexts_by_location) == - len(partition_failover_info.unavailable_regional_endpoints)): + if len(self.location_cache.account_read_regional_routing_contexts_by_location) == len( + partition_failover_info.unavailable_regional_endpoints + ): # If no other region is available, we invalidate the cache and start once again # from our main write region in the account configurations - logger.warning("All available regions for partition %s are unavailable." - " Refreshing cache.", pk_range_wrapper) + logger.warning( + "All available regions for partition %s are unavailable." " Refreshing cache.", + pk_range_wrapper, + ) self.partition_range_to_failover_info[pk_range_wrapper] = PartitionLevelFailoverInfo() request.clear_route_to_location() else: @@ -195,21 +215,21 @@ def resolve_service_endpoint_for_partition( partition_failover_info.try_move_to_next_location( self.location_cache.account_read_regional_routing_contexts_by_location, endpoint_region, - request) + request, + ) else: # Update the current regional endpoint to whatever the request is routing to partition_failover_info.current_region = endpoint_region else: partition_failover_info = PartitionLevelFailoverInfo() - endpoint_region = self.location_cache.get_location_from_endpoint( - request.location_endpoint_to_route) + endpoint_region = self.location_cache.get_location_from_endpoint(request.location_endpoint_to_route) partition_failover_info.current_region = endpoint_region self.partition_range_to_failover_info[pk_range_wrapper] = partition_failover_info return self._resolve_service_endpoint_for_partition_circuit_breaker(request, pk_range_wrapper) - async def record_failure(self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + async def record_failure( + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: """Records a failure for the given partition key range and request. :param RequestObject request: The request object containing the routing context. :param PartitionKeyRangeWrapper pk_range_wrapper: The wrapper containing the partition key range information @@ -224,9 +244,9 @@ async def record_failure(self, else: await self.record_ppcb_failure(request, pk_range_wrapper) - async def record_success(self, - request: RequestObject, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None) -> None: + async def record_success( + self, request: RequestObject, pk_range_wrapper: Optional[PartitionKeyRangeWrapper] = None + ) -> None: """Records a success for the given partition key range and request, effectively clearing the failure count. :param RequestObject request: The request object containing the routing context. :param PartitionKeyRangeWrapper pk_range_wrapper: The wrapper containing the partition key range information diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_inference_service_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_inference_service_async.py index 05ec30bec755..0a1ae9fb4281 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_inference_service_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_inference_service_async.py @@ -28,9 +28,15 @@ from azure.core import AsyncPipelineClient from azure.core.exceptions import DecodeError, ServiceRequestError, ServiceResponseError -from azure.core.pipeline.policies import (AsyncHTTPPolicy, ContentDecodePolicy, - DistributedTracingPolicy, HeadersPolicy, - NetworkTraceLoggingPolicy, ProxyPolicy, UserAgentPolicy) +from azure.core.pipeline.policies import ( + AsyncHTTPPolicy, + ContentDecodePolicy, + DistributedTracingPolicy, + HeadersPolicy, + NetworkTraceLoggingPolicy, + ProxyPolicy, + UserAgentPolicy, +) from azure.core.pipeline.transport import HttpRequest from azure.core.utils import CaseInsensitiveDict @@ -42,7 +48,6 @@ from .._cosmos_responses import CosmosDict from ..http_constants import HttpHeaders - # cspell:ignore rerank reranker reranking # pylint: disable=protected-access,line-too-long @@ -92,17 +97,21 @@ def _create_inference_pipeline_client(self) -> AsyncPipelineClient: if isinstance(connection_policy.ConnectionRetryConfiguration, AsyncHTTPPolicy): retry_policy = _ConnectionRetryPolicy( - retry_total=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_total', - self.TOTAL_RETRIES), - retry_connect=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_connect', None), - retry_read=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_read', None), - retry_status=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_status', None), - retry_backoff_max=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_backoff_max', - self.RETRY_BACKOFF_MAX), - retry_on_status_codes=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_on_status_codes', - self.RETRY_AFTER_STATUS_CODES), - retry_backoff_factor=getattr(connection_policy.ConnectionRetryConfiguration, 'retry_backoff_factor', - self.RETRY_BACKOFF_FACTOR) + retry_total=getattr(connection_policy.ConnectionRetryConfiguration, "retry_total", self.TOTAL_RETRIES), + retry_connect=getattr(connection_policy.ConnectionRetryConfiguration, "retry_connect", None), + retry_read=getattr(connection_policy.ConnectionRetryConfiguration, "retry_read", None), + retry_status=getattr(connection_policy.ConnectionRetryConfiguration, "retry_status", None), + retry_backoff_max=getattr( + connection_policy.ConnectionRetryConfiguration, "retry_backoff_max", self.RETRY_BACKOFF_MAX + ), + retry_on_status_codes=getattr( + connection_policy.ConnectionRetryConfiguration, + "retry_on_status_codes", + self.RETRY_AFTER_STATUS_CODES, + ), + retry_backoff_factor=getattr( + connection_policy.ConnectionRetryConfiguration, "retry_backoff_factor", self.RETRY_BACKOFF_FACTOR + ), ) elif isinstance(connection_policy.ConnectionRetryConfiguration, int): retry_policy = _ConnectionRetryPolicy(total=connection_policy.ConnectionRetryConfiguration) @@ -115,11 +124,12 @@ def _create_inference_pipeline_client(self) -> AsyncPipelineClient: retry_status=connection_policy.ConnectionRetryConfiguration.status, retry_backoff_max=connection_policy.ConnectionRetryConfiguration.DEFAULT_BACKOFF_MAX, retry_on_status_codes=list(connection_policy.ConnectionRetryConfiguration.status_forcelist), - retry_backoff_factor=connection_policy.ConnectionRetryConfiguration.backoff_factor + retry_backoff_factor=connection_policy.ConnectionRetryConfiguration.backoff_factor, ) else: raise TypeError( - "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry") + "Unsupported retry policy. Must be an azure.cosmos.ConnectionRetryPolicy, int, or urllib3.Retry" + ) proxies = {} if connection_policy.ProxyConfiguration and connection_policy.ProxyConfiguration.Host: @@ -143,10 +153,7 @@ def _create_inference_pipeline_client(self) -> AsyncPipelineClient: ), ] - return AsyncPipelineClient( - base_url=self._inference_endpoint, - policies=policies - ) + return AsyncPipelineClient(base_url=self._inference_endpoint, policies=policies) def _get_user_agent(self) -> str: """Return the user agent string for inference pipeline. @@ -154,7 +161,7 @@ def _get_user_agent(self) -> str: :returns: User agent string. :rtype: str """ - if self._client_connection and hasattr(self._client_connection, '_user_agent'): + if self._client_connection and hasattr(self._client_connection, "_user_agent"): return self._client_connection._user_agent + "_inference" return "azure-cosmos-python-sdk-inference" @@ -170,9 +177,9 @@ def _get_ssl_verification_setting(self) -> bool: parsed = urlparse(self._inference_endpoint) return ( - parsed.hostname != "localhost" - and parsed.hostname != "127.0.0.1" - and not connection_policy.DisableSSLVerification + parsed.hostname != "localhost" + and parsed.hostname != "127.0.0.1" + and not connection_policy.DisableSSLVerification ) async def rerank( @@ -210,15 +217,13 @@ async def rerank( if semantic_reranking_options: body.update(semantic_reranking_options) - headers = { - HttpHeaders.ContentType: "application/json" - } + headers = {HttpHeaders.ContentType: "application/json"} request = HttpRequest( method="POST", url=self._inference_endpoint, headers=headers, - data=json.dumps(body, separators=(",", ":")) + data=json.dumps(body, separators=(",", ":")), ) is_ssl_enabled = self._get_ssl_verification_setting() @@ -246,22 +251,18 @@ async def rerank( result = json.loads(data) except Exception as e: raise DecodeError( - message="Failed to decode JSON data: {}".format(e), - response=response, - error=e) from e + message="Failed to decode JSON data: {}".format(e), response=response, error=e + ) from e return CosmosDict(result, response_headers=response_headers) except (ServiceRequestError, ServiceResponseError) as e: raise exceptions.CosmosHttpResponseError( - status_code=408, - message="Inference Service Request Timeout", - response=None + status_code=408, message="Inference Service Request Timeout", response=None ) from e except Exception as e: if isinstance(e, (exceptions.CosmosHttpResponseError, exceptions.CosmosResourceNotFoundError)): raise raise exceptions.CosmosHttpResponseError( - message=f"Semantic reranking failed: {str(e)}", - response=None + message=f"Semantic reranking failed: {str(e)}", response=None ) from e diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_query_iterable_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_query_iterable_async.py index 56d9a9acbf90..aa662fc7aa66 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_query_iterable_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_query_iterable_async.py @@ -19,9 +19,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Iterable query results in the Azure Cosmos database service. -""" -import asyncio # pylint: disable=do-not-import-asyncio +"""Iterable query results in the Azure Cosmos database service.""" + +import asyncio # pylint: disable=do-not-import-asyncio import time from azure.core.async_paging import AsyncPageIterator @@ -76,22 +76,30 @@ def __init__( self._query = query self._options = options if continuation_token: - options['continuation'] = continuation_token + options["continuation"] = continuation_token self._fetch_function = fetch_function self._collection_link = collection_link self._database_link = database_link self._partition_key = partition_key self._ex_context = execution_dispatcher._ProxyQueryExecutionContext( - self._client, self._collection_link, self._query, self._options, self._fetch_function, - response_hook, raw_response_hook, resource_type) + self._client, + self._collection_link, + self._query, + self._options, + self._fetch_function, + response_hook, + raw_response_hook, + resource_type, + ) super(QueryIterable, self).__init__(self._fetch_next, self._unpack, continuation_token=continuation_token) async def _unpack(self, block): continuation = None if self._client.last_response_headers: - continuation = self._client.last_response_headers.get("x-ms-continuation") or \ - self._client.last_response_headers.get('etag') + continuation = self._client.last_response_headers.get( + "x-ms-continuation" + ) or self._client.last_response_headers.get("etag") if block: self._did_a_call_already = False return continuation, block @@ -106,9 +114,9 @@ async def _fetch_next(self, *args): # pylint: disable=unused-argument :return: List of results. :rtype: list """ - timeout = self._options.get('timeout') - if 'partitionKey' in self._options and asyncio.iscoroutine(self._options['partitionKey']): - self._options['partitionKey'] = await self._options['partitionKey'] + timeout = self._options.get("timeout") + if "partitionKey" in self._options and asyncio.iscoroutine(self._options["partitionKey"]): + self._options["partitionKey"] = await self._options["partitionKey"] # Check timeout before fetching next block diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_read_items_helper_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_read_items_helper_async.py index ec4456155e35..7a561e49da0d 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_read_items_helper_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_read_items_helper_async.py @@ -20,7 +20,7 @@ # SOFTWARE. import logging -import asyncio # pylint: disable=C4763 # Used for Semaphore and gather, not for sleep +import asyncio # pylint: disable=C4763 # Used for Semaphore and gather, not for sleep from typing import Tuple, Any, Sequence, Optional, TYPE_CHECKING, Mapping from azure.cosmos import _base, exceptions @@ -32,6 +32,7 @@ if TYPE_CHECKING: from azure.cosmos.aio._cosmos_client_connection_async import CosmosClientConnection + class ReadItemsHelperAsync: """Helper class for handling read many items operations. @@ -39,17 +40,18 @@ class ReadItemsHelperAsync: when returning results, regardless of how items are distributed across partitions or processed in chunks. """ + logger = logging.getLogger("azure.cosmos.ReadManyItemsHelper") def __init__( - self, - client: 'CosmosClientConnection', - collection_link: str, - items: Sequence[Tuple[str, PartitionKeyType]], - options: Optional[Mapping[str, Any]], - partition_key_definition: dict[str, Any], - max_concurrency: int = 5, - **kwargs: Any + self, + client: "CosmosClientConnection", + collection_link: str, + items: Sequence[Tuple[str, PartitionKeyType]], + options: Optional[Mapping[str, Any]], + partition_key_definition: dict[str, Any], + max_concurrency: int = 5, + **kwargs: Any, ): self.client = client self.collection_link = collection_link @@ -60,7 +62,7 @@ def __init__( self.max_concurrency = max_concurrency if max_concurrency and max_concurrency > 0 else 5 self.max_items_per_query = 1000 - async def read_items(self) -> 'CosmosList': + async def read_items(self) -> "CosmosList": """Executes the read-many operation. :return: A list of the retrieved items in the same order as the input. @@ -81,8 +83,8 @@ async def read_items(self) -> 'CosmosList': all_results = [item[1] for item in indexed_results] cosmos_list = CosmosList(all_results, response_headers=combined_headers) - if 'response_hook' in self.kwargs: - self.kwargs['response_hook'](combined_headers, cosmos_list) + if "response_hook" in self.kwargs: + self.kwargs["response_hook"](combined_headers, cosmos_list) return cosmos_list @@ -121,10 +123,8 @@ async def _partition_items_by_range(self) -> dict[str, list[Tuple[int, str, "Par return items_by_partition def _create_query_chunks( - self, - items_by_partition: dict[str, list[Tuple[int, str, "PartitionKeyType"]]] + self, items_by_partition: dict[str, list[Tuple[int, str, "PartitionKeyType"]]] ) -> list[dict[str, list[Tuple[int, str, "PartitionKeyType"]]]]: - """ Create query chunks for concurrency control while preserving original indices. @@ -137,13 +137,13 @@ def _create_query_chunks( query_chunks = [] for partition_id, partition_items in items_by_partition.items(): for i in range(0, len(partition_items), self.max_items_per_query): - chunk = partition_items[i:i + self.max_items_per_query] + chunk = partition_items[i : i + self.max_items_per_query] query_chunks.append({partition_id: chunk}) return query_chunks async def _execute_queries_concurrently( - self, - query_chunks: list[dict[str, list[Tuple[int, str, "PartitionKeyType"]]]], + self, + query_chunks: list[dict[str, list[Tuple[int, str, "PartitionKeyType"]]]], ) -> Tuple[list[Tuple[int, Any]], CaseInsensitiveDict]: """ Execute query chunks concurrently and return aggregated results with original indices. @@ -172,7 +172,8 @@ async def execute_chunk_query(partition_id, chunk_partition_items): chunk_results = [(id_to_idx[item_id], result)] if result else [] else: chunk_results, headers = await self._execute_query( - partition_id, items_for_query, id_to_idx, request_kwargs) + partition_id, items_for_query, id_to_idx, request_kwargs + ) request_charge = self._extract_request_charge(headers) return chunk_results, request_charge @@ -196,7 +197,7 @@ async def execute_chunk_query(partition_id, chunk_partition_items): indexed_results.extend(chunk_result) total_request_charge += ru_charge - final_headers = CaseInsensitiveDict({'x-ms-request-charge': str(total_request_charge)}) + final_headers = CaseInsensitiveDict({"x-ms-request-charge": str(total_request_charge)}) return indexed_results, final_headers def _extract_request_charge(self, headers: CaseInsensitiveDict) -> float: @@ -207,7 +208,7 @@ def _extract_request_charge(self, headers: CaseInsensitiveDict) -> float: :return: The request charge. :rtype: float """ - charge = headers.get('x-ms-request-charge') + charge = headers.get("x-ms-request-charge") request_charge = 0.0 # Renamed from ru_charge to avoid shadowing if charge: try: @@ -217,10 +218,7 @@ def _extract_request_charge(self, headers: CaseInsensitiveDict) -> float: return request_charge async def _execute_point_read( - self, - item_id: str, - pk_value: "PartitionKeyType", - request_kwargs: dict[str, Any] + self, item_id: str, pk_value: "PartitionKeyType", request_kwargs: dict[str, Any] ) -> Tuple[Optional[Any], CaseInsensitiveDict]: """ Executes a point read for a single item. @@ -242,7 +240,7 @@ async def _execute_point_read( def local_response_hook(hook_headers, _): captured_headers.update(hook_headers) - request_kwargs['response_hook'] = local_response_hook + request_kwargs["response_hook"] = local_response_hook request_kwargs.pop("containerProperties", None) try: @@ -253,11 +251,11 @@ def local_response_hook(hook_headers, _): return None, CaseInsensitiveDict(captured_headers) async def _execute_query( - self, - partition_id: str, - items_for_query: Sequence[Tuple[str, "PartitionKeyType"]], - id_to_idx: dict[str, int], - request_kwargs: dict[str, Any] + self, + partition_id: str, + items_for_query: Sequence[Tuple[str, "PartitionKeyType"]], + id_to_idx: dict[str, int], + request_kwargs: dict[str, Any], ) -> Tuple[list[Tuple[int, Any]], CaseInsensitiveDict]: """ Builds and executes a query for a chunk of items. @@ -278,7 +276,7 @@ async def _execute_query( def local_response_hook(hook_headers, _): captured_headers.update(hook_headers) - request_kwargs['response_hook'] = local_response_hook + request_kwargs["response_hook"] = local_response_hook if _QueryBuilder.is_id_partition_key_query(items_for_query, self.partition_key_definition): query_obj = _QueryBuilder.build_id_in_query(items_for_query) @@ -287,15 +285,17 @@ def local_response_hook(hook_headers, _): else: partition_items_dict = {partition_id: items_for_query} query_obj = _QueryBuilder.build_parameterized_query_for_items( - partition_items_dict, self.partition_key_definition) + partition_items_dict, self.partition_key_definition + ) page_iterator = self.client.QueryItems( - self.collection_link, query_obj, self.options, **request_kwargs).by_page() + self.collection_link, query_obj, self.options, **request_kwargs + ).by_page() chunk_indexed_results = [] async for page in page_iterator: async for item in page: - doc_id = item.get('id') + doc_id = item.get("id") if doc_id in id_to_idx: chunk_indexed_results.append((id_to_idx[doc_id], item)) else: diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_retry_utility_async.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_retry_utility_async.py index 428359841f97..238a89a422d2 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_retry_utility_async.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_retry_utility_async.py @@ -19,20 +19,20 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Internal methods for executing functions in the Azure Cosmos database service. -""" +"""Internal methods for executing functions in the Azure Cosmos database service.""" + import asyncio # pylint: disable=do-not-import-asyncio import json import time import logging from typing import Optional -from azure.core.exceptions import (AzureError, ClientAuthenticationError, ServiceRequestError, - ServiceResponseError) +from azure.core.exceptions import AzureError, ClientAuthenticationError, ServiceRequestError, ServiceResponseError from azure.core.pipeline.policies import AsyncRetryPolicy -from ._global_partition_endpoint_manager_per_partition_automatic_failover_async import \ - _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync +from ._global_partition_endpoint_manager_per_partition_automatic_failover_async import ( + _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, +) from .. import _default_retry_policy, _health_check_retry_policy, _service_unavailable_retry_policy from .. import _endpoint_discovery_retry_policy from .. import _gone_retry_policy @@ -44,23 +44,27 @@ from .._constants import _Constants from .._container_recreate_retry_policy import ContainerRecreateRetryPolicy from .._request_object import RequestObject -from .._retry_utility import (_configure_timeout, _has_read_retryable_headers, - _handle_service_response_retries, _handle_service_request_retries, - _has_database_account_header) +from .._retry_utility import ( + _configure_timeout, + _has_read_retryable_headers, + _handle_service_response_retries, + _handle_service_request_retries, + _has_database_account_header, +) from .._routing.routing_range import PartitionKeyRangeWrapper from ..exceptions import CosmosHttpResponseError from ..http_constants import HttpHeaders, StatusCodes, SubStatusCodes from .._cosmos_http_logging_policy import _log_diagnostics_error - # pylint: disable=protected-access, disable=too-many-lines, disable=too-many-statements, disable=too-many-branches # cspell:ignore ppaf, ppcb + # args [0] is the request object # args [1] is the connection policy # args [2] is the pipeline client # args [3] is the http request -async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwargs): # pylint: disable=too-many-locals +async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwargs): # pylint: disable=too-many-locals """Executes the function with passed parameters applying all retry policies :param object client: @@ -73,24 +77,23 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg :returns: the result of running the passed in function as a (result, headers) tuple :rtype: tuple of (dict, dict) """ - timeout = kwargs.get('timeout') + timeout = kwargs.get("timeout") operation_start_time = kwargs.get(_Constants.OperationStartTime, time.time()) # Track the last error for chaining last_error = None pk_range_wrapper = None - if args and (global_endpoint_manager.is_per_partition_automatic_failover_applicable(args[0]) or - global_endpoint_manager.is_circuit_breaker_applicable(args[0])): + if args and ( + global_endpoint_manager.is_per_partition_automatic_failover_applicable(args[0]) + or global_endpoint_manager.is_circuit_breaker_applicable(args[0]) + ): pk_range_wrapper = await global_endpoint_manager.create_pk_range_wrapper(args[0]) # instantiate all retry policies here to be applied for each request execution endpointDiscovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy( client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args ) - health_check_retry_policy = _health_check_retry_policy.HealthCheckRetryPolicy( - client.connection_policy, - *args - ) + health_check_retry_policy = _health_check_retry_policy.HealthCheckRetryPolicy(client.connection_policy, *args) resourceThrottle_retry_policy = _resource_throttle_retry_policy.ResourceThrottleRetryPolicy( client.connection_policy.RetryOptions.MaxRetryAttemptCount, client.connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, @@ -106,13 +109,20 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args ) service_response_retry_policy = _service_response_retry_policy.ServiceResponseRetryPolicy( - client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args, + client.connection_policy, + global_endpoint_manager, + pk_range_wrapper, + *args, ) service_request_retry_policy = _service_request_retry_policy.ServiceRequestRetryPolicy( - client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args, + client.connection_policy, + global_endpoint_manager, + pk_range_wrapper, + *args, ) service_unavailable_retry_policy = _service_unavailable_retry_policy._ServiceUnavailableRetryPolicy( - client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args) + client.connection_policy, global_endpoint_manager, pk_range_wrapper, *args + ) # Get Logger logger = kwargs.get("logger", logging.getLogger("azure.cosmos._retry_utility_async")) @@ -122,10 +132,12 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg # Reference HttpRequest instance in args request = args[3] container_recreate_retry_policy = ContainerRecreateRetryPolicy( - client, client._container_properties_cache, request, *args) + client, client._container_properties_cache, request, *args + ) else: container_recreate_retry_policy = ContainerRecreateRetryPolicy( - client, client._container_properties_cache, None, *args) + client, client._container_properties_cache, None, *args + ) while True: start_time = time.time() @@ -149,28 +161,35 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg client.last_response_headers = {} # setting the throttle related response headers before returning the result - client.last_response_headers[ - HttpHeaders.ThrottleRetryCount - ] = resourceThrottle_retry_policy.current_retry_attempt_count - client.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs - ] = resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + client.last_response_headers[HttpHeaders.ThrottleRetryCount] = ( + resourceThrottle_retry_policy.current_retry_attempt_count + ) + client.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs] = ( + resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + ) # TODO: It is better to raise Exceptions manually in the method related to the request, # a rework of retry would be needed to be able to retry exceptions raised that way. # for now raising a manual exception here should allow it to be retried. # If container does not have throughput, results will return empty list. # We manually raise a 404. We raise it here, so we can handle it in retry utilities. - if result and isinstance(result[0], dict) and 'Offers' in result[0] and not result[0]['Offers'] \ - and request.method == 'POST': + if ( + result + and isinstance(result[0], dict) + and "Offers" in result[0] + and not result[0]["Offers"] + and request.method == "POST" + ): # Grab the link used for getting throughput properties to add to message. link = json.loads(request.body)["parameters"][0]["value"] - response = exceptions._InternalCosmosException(status_code=StatusCodes.NOT_FOUND, - headers={HttpHeaders.SubStatus: - SubStatusCodes.THROUGHPUT_OFFER_NOT_FOUND}) + response = exceptions._InternalCosmosException( + status_code=StatusCodes.NOT_FOUND, + headers={HttpHeaders.SubStatus: SubStatusCodes.THROUGHPUT_OFFER_NOT_FOUND}, + ) e_offer = exceptions.CosmosResourceNotFoundError( status_code=StatusCodes.NOT_FOUND, message="Could not find ThroughputProperties for container " + link, - response=response) + response=response, + ) response_headers = result[1] if len(result) > 1 else {} logger_attributes = { @@ -179,8 +198,15 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg "status_code": e_offer.status_code, "sub_status_code": e_offer.sub_status, } - _log_diagnostics_error(client._enable_diagnostics_logging, request, response_headers, e_offer, - logger_attributes, global_endpoint_manager, logger=logger) + _log_diagnostics_error( + client._enable_diagnostics_logging, + request, + response_headers, + e_offer, + logger_attributes, + global_endpoint_manager, + logger=logger, + ) raise e_offer return result @@ -191,8 +217,10 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg client._UpdateSessionIfRequired(request.headers, {}, e.headers) if request and _has_database_account_header(request.headers): retry_policy = health_check_retry_policy - elif e.status_code == StatusCodes.FORBIDDEN and e.sub_status in \ - [SubStatusCodes.DATABASE_ACCOUNT_NOT_FOUND, SubStatusCodes.WRITE_FORBIDDEN]: + elif e.status_code == StatusCodes.FORBIDDEN and e.sub_status in [ + SubStatusCodes.DATABASE_ACCOUNT_NOT_FOUND, + SubStatusCodes.WRITE_FORBIDDEN, + ]: retry_policy = endpointDiscovery_retry_policy elif e.status_code == StatusCodes.TOO_MANY_REQUESTS: retry_policy = resourceThrottle_retry_policy @@ -210,7 +238,8 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg # container properties and pass in the new RID in the headers. await client._refresh_container_properties_cache(retry_policy.container_link) if e.sub_status != SubStatusCodes.COLLECTION_RID_MISMATCH and retry_policy.check_if_rid_different( - retry_policy.container_link, client._container_properties_cache, retry_policy.container_rid): + retry_policy.container_link, client._container_properties_cache, retry_policy.container_rid + ): retry_policy.refresh_container_properties_cache = False else: cached_container = client._container_properties_cache[retry_policy.container_link] @@ -232,9 +261,8 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg if args: # record the failure for circuit breaker tracking await _record_ppcb_failure_if_request_not_cancelled( - args[0], - global_endpoint_manager, - pk_range_wrapper) + args[0], global_endpoint_manager, pk_range_wrapper + ) retry_policy = service_unavailable_retry_policy elif e.status_code == StatusCodes.REQUEST_TIMEOUT or e.status_code >= StatusCodes.INTERNAL_SERVER_ERROR: if args: @@ -250,12 +278,12 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg if not retry_policy.ShouldRetry(e): if not client.last_response_headers: client.last_response_headers = {} - client.last_response_headers[ - HttpHeaders.ThrottleRetryCount - ] = resourceThrottle_retry_policy.current_retry_attempt_count - client.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs - ] = resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + client.last_response_headers[HttpHeaders.ThrottleRetryCount] = ( + resourceThrottle_retry_policy.current_retry_attempt_count + ) + client.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs] = ( + resourceThrottle_retry_policy.cumulative_wait_time_in_milliseconds + ) if args and args[0].should_clear_session_token_on_session_read_failure and client.session: client.session.clear_session_token(client.last_response_headers) raise @@ -282,50 +310,55 @@ async def ExecuteAsync(client, global_endpoint_manager, function, *args, **kwarg else: try: # pylint: disable=networking-import-outside-azure-core-transport - from aiohttp.client_exceptions import ( - ClientConnectionError) + from aiohttp.client_exceptions import ClientConnectionError + if isinstance(e.inner_exception, ClientConnectionError): _handle_service_request_retries(client, service_request_retry_policy, e, *args) else: if args: await _record_failure_if_request_not_cancelled( - args[0], - global_endpoint_manager, - pk_range_wrapper) + args[0], global_endpoint_manager, pk_range_wrapper + ) _handle_service_response_retries(request, client, service_response_retry_policy, e, *args) # in case customer is not using aiohttp except ImportError: if args: await _record_failure_if_request_not_cancelled( - args[0], - global_endpoint_manager, - pk_range_wrapper) + args[0], global_endpoint_manager, pk_range_wrapper + ) _handle_service_response_retries(request, client, service_response_retry_policy, e, *args) + async def _record_success_if_request_not_cancelled( - request_params: RequestObject, - global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper]) -> None: + request_params: RequestObject, + global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, + pk_range_wrapper: Optional[PartitionKeyRangeWrapper], +) -> None: if not request_params.should_cancel_request(): await global_endpoint_manager.record_success(request_params, pk_range_wrapper) + async def _record_failure_if_request_not_cancelled( - request_params: RequestObject, - global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper]) -> None: + request_params: RequestObject, + global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, + pk_range_wrapper: Optional[PartitionKeyRangeWrapper], +) -> None: if not request_params.should_cancel_request(): await global_endpoint_manager.record_failure(request_params, pk_range_wrapper) + async def _record_ppcb_failure_if_request_not_cancelled( - request_params: RequestObject, - global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, - pk_range_wrapper: Optional[PartitionKeyRangeWrapper]) -> None: + request_params: RequestObject, + global_endpoint_manager: _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync, + pk_range_wrapper: Optional[PartitionKeyRangeWrapper], +) -> None: if not request_params.should_cancel_request(): await global_endpoint_manager.record_ppcb_failure(request_params, pk_range_wrapper) + async def ExecuteFunctionAsync(function, *args, **kwargs): """Stub method so that it can be used for mocking purposes as well. :param Callable function: the function to execute. @@ -354,10 +387,10 @@ async def send(self, request): :raises ~azure.cosmos.exceptions.CosmosClientTimeoutError: Specified timeout exceeded. :raises ~azure.core.exceptions.ClientAuthenticationError: Authentication failed. """ - absolute_timeout = request.context.options.pop('timeout', None) - per_request_timeout = request.context.options.pop('connection_timeout', 0) - request_params = request.context.options.pop('request_params', None) - global_endpoint_manager = request.context.options.pop('global_endpoint_manager', None) + absolute_timeout = request.context.options.pop("timeout", None) + per_request_timeout = request.context.options.pop("connection_timeout", 0) + request_params = request.context.options.pop("request_params", None) + global_endpoint_manager = request.context.options.pop("global_endpoint_manager", None) retry_error = None retry_active = True response = None @@ -375,15 +408,17 @@ async def send(self, request): except exceptions.CosmosClientTimeoutError as timeout_error: timeout_error.inner_exception = retry_error timeout_error.response = response - timeout_error.history = retry_settings['history'] + timeout_error.history = retry_settings["history"] raise except ServiceRequestError as err: retry_error = err # the request ran into a socket timeout or failed to establish a new connection # since request wasn't sent, raise exception immediately to be dealt with in client retry policies - if (not _has_database_account_header(request.http_request.headers) - and not request_params.healthy_tentative_location): - if retry_settings['connect'] > 0: + if ( + not _has_database_account_header(request.http_request.headers) + and not request_params.healthy_tentative_location + ): + if retry_settings["connect"] > 0: retry_active = self.increment(retry_settings, response=request, error=err) if retry_active: await self.sleep(retry_settings, request.context.transport) @@ -391,40 +426,44 @@ async def send(self, request): raise err except ServiceResponseError as err: retry_error = err - if (_has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err # Since this is ClientConnectionError, it is safe to be retried on both read and write requests try: # pylint: disable=networking-import-outside-azure-core-transport - from aiohttp.client_exceptions import ( - ClientConnectionError) - if (isinstance(err.inner_exception, ClientConnectionError) - or _has_read_retryable_headers(request.http_request.headers)): + from aiohttp.client_exceptions import ClientConnectionError + + if isinstance(err.inner_exception, ClientConnectionError) or _has_read_retryable_headers( + request.http_request.headers + ): # This logic is based on the _retry.py file from azure-core - if retry_settings['read'] > 0: + if retry_settings["read"] > 0: # record the failure for circuit breaker tracking for retries in connection retry policy # retries in the execute function will mark those failures await _record_failure_if_request_not_cancelled( - request_params, - global_endpoint_manager, - None) + request_params, global_endpoint_manager, None + ) retry_active = self.increment(retry_settings, response=request, error=err) if retry_active: await self.sleep(retry_settings, request.context.transport) continue except ImportError: - raise err # pylint: disable=raise-missing-from + raise err # pylint: disable=raise-missing-from raise err except CosmosHttpResponseError as err: raise err except AzureError as err: retry_error = err - if (_has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err - if _has_read_retryable_headers(request.http_request.headers) and retry_settings['read'] > 0: + if _has_read_retryable_headers(request.http_request.headers) and retry_settings["read"] > 0: retry_active = self.increment(retry_settings, response=request, error=err) if retry_active: await self.sleep(retry_settings, request.context.transport) @@ -433,7 +472,7 @@ async def send(self, request): finally: end_time = time.time() if absolute_timeout: - absolute_timeout -= (end_time - start_time) + absolute_timeout -= end_time - start_time self.update_context(response.context, retry_settings) return response diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_scripts.py index 26398c453be5..79852ba91493 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_scripts.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create, read, update and delete and execute scripts in the Azure Cosmos DB SQL API service. -""" +"""Create, read, update and delete and execute scripts in the Azure Cosmos DB SQL API service.""" + # pylint: disable=protected-access # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs @@ -39,6 +39,7 @@ if TYPE_CHECKING: from ._container import ContainerProxy + class ScriptsProxy: """An interface to interact with stored procedures. @@ -47,10 +48,7 @@ class ScriptsProxy: """ def __init__( - self, - container: "ContainerProxy", - client_connection: _CosmosClientConnection, - container_link: str + self, container: "ContainerProxy", client_connection: _CosmosClientConnection, container_link: str ) -> None: self.client_connection = client_connection self.container_link = container_link @@ -63,10 +61,7 @@ def _get_resource_link(self, script_or_id: Union[Mapping[str, Any], str], typ: s @distributed_trace def list_stored_procedures( - self, - *, - max_item_count: Optional[int] = None, - **kwargs: Any + self, *, max_item_count: Optional[int] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """List all stored procedures in the container. @@ -112,11 +107,7 @@ def query_stored_procedures( ) @distributed_trace_async - async def get_stored_procedure( - self, - sproc: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> CosmosDict: + async def get_stored_procedure(self, sproc: Union[str, Mapping[str, Any]], **kwargs: Any) -> CosmosDict: """Get the stored procedure identified by `sproc`. :param sproc: The ID (name) or dict representing the stored procedure to retrieve. @@ -132,11 +123,7 @@ async def get_stored_procedure( ) @distributed_trace_async - async def create_stored_procedure( - self, - body: dict[str, Any], - **kwargs: Any - ) -> CosmosDict: + async def create_stored_procedure(self, body: dict[str, Any], **kwargs: Any) -> CosmosDict: """Create a new stored procedure in the container. To replace an existing stored procedure, use the :func:`Container.scripts.replace_stored_procedure` method. @@ -154,10 +141,7 @@ async def create_stored_procedure( @distributed_trace_async async def replace_stored_procedure( - self, - sproc: Union[str, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, sproc: Union[str, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> CosmosDict: """Replace a specified stored procedure in the container. @@ -229,8 +213,7 @@ async def execute_stored_procedure( request_options = _build_options(kwargs) if partition_key is not None: request_options["partitionKey"] = ( - _return_undefined_or_empty_partition_key( - await self.container_proxy.is_system_key) + _return_undefined_or_empty_partition_key(await self.container_proxy.is_system_key) if partition_key == NonePartitionKeyValue else partition_key ) @@ -244,12 +227,7 @@ async def execute_stored_procedure( ) @distributed_trace - def list_triggers( - self, - *, - max_item_count: Optional[int] = None, - **kwargs: Any - ) -> AsyncItemPaged[dict[str, Any]]: + def list_triggers(self, *, max_item_count: Optional[int] = None, **kwargs: Any) -> AsyncItemPaged[dict[str, Any]]: """List all triggers in the container. :keyword int max_item_count: Max number of items to be returned in the enumeration operation. @@ -260,9 +238,7 @@ def list_triggers( if max_item_count is not None: feed_options["maxItemCount"] = max_item_count - return self.client_connection.ReadTriggers( - collection_link=self.container_link, options=feed_options, **kwargs - ) + return self.client_connection.ReadTriggers(collection_link=self.container_link, options=feed_options, **kwargs) @distributed_trace def query_triggers( @@ -325,10 +301,7 @@ async def create_trigger(self, body: dict[str, Any], **kwargs: Any) -> dict[str, @distributed_trace_async async def replace_trigger( - self, - trigger: Union[str, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, trigger: Union[str, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> dict[str, Any]: """Replace a specified trigger in the container. @@ -370,10 +343,7 @@ async def delete_trigger(self, trigger: Union[str, Mapping[str, Any]], **kwargs: @distributed_trace def list_user_defined_functions( - self, - *, - max_item_count: Optional[int] = None, - **kwargs: Any + self, *, max_item_count: Optional[int] = None, **kwargs: Any ) -> AsyncItemPaged[dict[str, Any]]: """List all the user-defined functions in the container. @@ -452,10 +422,7 @@ async def create_user_defined_function(self, body: dict[str, Any], **kwargs: Any @distributed_trace_async async def replace_user_defined_function( - self, - udf: Union[str, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, udf: Union[str, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> dict[str, Any]: """Replace a specified user-defined function in the container. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_user.py index 7014b0a090e9..0ad555daa369 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_user.py @@ -21,8 +21,7 @@ # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs -"""Create, read, update and delete users in the Azure Cosmos DB SQL API service. -""" +"""Create, read, update and delete users in the Azure Cosmos DB SQL API service.""" from typing import Any, Mapping, Union, Optional, Callable @@ -37,6 +36,7 @@ # pylint: disable=docstring-keyword-should-match-keyword-only + class UserProxy: """An interface to interact with a specific user. @@ -52,7 +52,7 @@ def __init__( client_connection: CosmosClientConnection, id: str, database_link: str, - properties: Optional[CosmosDict] = None + properties: Optional[CosmosDict] = None, ) -> None: self.client_connection = client_connection self.id = id @@ -69,18 +69,13 @@ def _get_permission_link(self, permission_or_id: Union[Permission, str, Mapping[ return permission_or_id.permission_link return "{}/permissions/{}".format(self.user_link, permission_or_id["id"]) - async def _get_properties( - self - ) -> CosmosDict: + async def _get_properties(self) -> CosmosDict: if self._properties is None: self._properties = await self.read() return self._properties @distributed_trace_async - async def read( - self, - **kwargs: Any - ) -> CosmosDict: + async def read(self, **kwargs: Any) -> CosmosDict: """Read user properties. :keyword response_hook: A callable invoked with the response metadata. @@ -92,9 +87,7 @@ async def read( request_options = build_options(kwargs) self._properties = await self.client_connection.ReadUser( - user_link=self.user_link, - options=request_options, - **kwargs + user_link=self.user_link, options=request_options, **kwargs ) return self._properties @@ -163,11 +156,7 @@ def query_permissions( return result @distributed_trace_async - async def get_permission( - self, - permission: Union[str, Mapping[str, Any], Permission], - **kwargs: Any - ) -> Permission: + async def get_permission(self, permission: Union[str, Mapping[str, Any], Permission], **kwargs: Any) -> Permission: """Get the permission identified by `id`. :param permission: The ID (name), dict representing the properties or :class:`Permission` @@ -251,10 +240,7 @@ async def upsert_permission(self, body: dict[str, Any], **kwargs: Any) -> Permis @distributed_trace_async async def replace_permission( - self, - permission: Union[str, Mapping[str, Any], Permission], - body: dict[str, Any], - **kwargs: Any + self, permission: Union[str, Mapping[str, Any], Permission], body: dict[str, Any], **kwargs: Any ) -> Permission: """Replaces the specified permission if it exists for the user. @@ -287,11 +273,7 @@ async def replace_permission( ) @distributed_trace_async - async def delete_permission( - self, - permission: Union[str, Mapping[str, Any], Permission], - **kwargs: Any - ) -> None: + async def delete_permission(self, permission: Union[str, Mapping[str, Any], Permission], **kwargs: Any) -> None: """Delete the specified permission from the user. If the permission does not already exist, an exception is raised. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/auth.py b/sdk/cosmos/azure-cosmos/azure/cosmos/auth.py index 221109a35bab..6ae17e9ccdfa 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/auth.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/auth.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Authorization helper functions in the Azure Cosmos database service. -""" +"""Authorization helper functions in the Azure Cosmos database service.""" import base64 from hashlib import sha256 @@ -31,17 +30,19 @@ def GetAuthorizationHeader( - cosmos_client_connection, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers + cosmos_client_connection, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers ): - warnings.warn("This method has been deprecated and will be removed from the SDK in a future release.", - DeprecationWarning) + warnings.warn( + "This method has been deprecated and will be removed from the SDK in a future release.", DeprecationWarning + ) return _get_authorization_header( - cosmos_client_connection, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers) + cosmos_client_connection, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers + ) def _get_authorization_header( - cosmos_client_connection, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers + cosmos_client_connection, verb, path, resource_id_or_fullname, is_name_based, resource_type, headers ): """Gets the authorization header. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index f23588870f2e..569327fcbcc0 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -18,8 +18,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create, read, update and delete items in the Azure Cosmos DB SQL API service. -""" +"""Create, read, update and delete items in the Azure Cosmos DB SQL API service.""" + import threading import warnings from concurrent.futures.thread import ThreadPoolExecutor @@ -34,8 +34,14 @@ from . import _utils as utils from ._availability_strategy_config import _validate_request_hedging_strategy -from ._base import (_build_properties_cache, _deserialize_throughput, _replace_throughput, build_options, - GenerateGuidId, validate_cache_staleness_value) +from ._base import ( + _build_properties_cache, + _deserialize_throughput, + _replace_throughput, + build_options, + GenerateGuidId, + validate_cache_staleness_value, +) from ._change_feed.feed_range_internal import FeedRangeInternalEpk from ._constants import _Constants as Constants, TimeoutScope from ._cosmos_client_connection import CosmosClientConnection @@ -44,9 +50,15 @@ from ._session_token_helpers import get_latest_session_token from .exceptions import CosmosHttpResponseError from .offer import Offer, ThroughputProperties -from .partition_key import (_build_partition_key_from_properties, PartitionKeyType, - _return_undefined_or_empty_partition_key, _SequentialPartitionKeyType, - NonePartitionKeyValue, NullPartitionKeyValue, PartitionKey) +from .partition_key import ( + _build_partition_key_from_properties, + PartitionKeyType, + _return_undefined_or_empty_partition_key, + _SequentialPartitionKeyType, + NonePartitionKeyValue, + NullPartitionKeyValue, + PartitionKey, +) from .scripts import ScriptsProxy __all__ = ("ContainerProxy",) @@ -56,12 +68,14 @@ # pylint: disable=docstring-keyword-should-match-keyword-only # cspell:ignore rerank reranker reranking + def _get_epk_range_for_partition_key( - container_properties: dict[str, Any], - partition_key_value: PartitionKeyType) -> Range: + container_properties: dict[str, Any], partition_key_value: PartitionKeyType +) -> Range: partition_key_obj: PartitionKey = _build_partition_key_from_properties(container_properties) return partition_key_obj._get_epk_range_for_partition_key(partition_key_value) + class ContainerProxy: # pylint: disable=too-many-public-methods """An interface to interact with a specific DB Container. @@ -82,7 +96,7 @@ def __init__( client_connection: CosmosClientConnection, database_link: str, id: str, - properties: Optional[dict[str, Any]] = None + properties: Optional[dict[str, Any]] = None, ) -> None: self.id = id self.container_link = "{}/colls/{}".format(database_link, self.id) @@ -91,9 +105,9 @@ def __init__( self._is_system_key: Optional[bool] = None self._scripts: Optional[ScriptsProxy] = None if properties: - self.client_connection._set_container_properties_cache(self.container_link, - _build_properties_cache(properties, - self.container_link)) + self.client_connection._set_container_properties_cache( + self.container_link, _build_properties_cache(properties, self.container_link) + ) def __repr__(self) -> str: return "".format(self.container_link)[:1024] @@ -102,11 +116,11 @@ def _get_properties_with_options(self, options: Optional[dict[str, Any]] = None) kwargs = {} if options: if "excludedLocations" in options: - kwargs['excluded_locations'] = options['excludedLocations'] + kwargs["excluded_locations"] = options["excludedLocations"] if Constants.OperationStartTime in options: kwargs[Constants.OperationStartTime] = options[Constants.OperationStartTime] if "timeout" in options: - kwargs['timeout'] = options['timeout'] + kwargs["timeout"] = options["timeout"] return self._get_properties(**kwargs) def _get_properties(self, **kwargs: Any) -> dict[str, Any]: @@ -141,10 +155,7 @@ def _get_conflict_link(self, conflict_or_link: Union[str, Mapping[str, Any]]) -> return "{}/conflicts/{}".format(self.container_link, conflict_or_link) return conflict_or_link["_self"] - def _set_partition_key( - self, - partition_key: PartitionKeyType - ) -> PartitionKeyType: + def _set_partition_key(self, partition_key: PartitionKeyType) -> PartitionKeyType: if partition_key == NonePartitionKeyValue: return _return_undefined_or_empty_partition_key(self.is_system_key) if partition_key == NullPartitionKeyValue: @@ -183,18 +194,19 @@ def read( # pylint:disable=docstring-missing-param :returns: Dict representing the retrieved container. :rtype: dict[str, Any] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) if populate_query_metrics: warnings.warn( @@ -207,8 +219,10 @@ def read( # pylint:disable=docstring-missing-param request_options["populateQuotaInfo"] = populate_quota_info container = self.client_connection.ReadContainer(self.container_link, options=request_options, **kwargs) # Only cache Container Properties that will not change in the lifetime of the container - self.client_connection._set_container_properties_cache(self.container_link, # pylint: disable=protected-access - _build_properties_cache(container, self.container_link)) + self.client_connection._set_container_properties_cache( + self.container_link, # pylint: disable=protected-access + _build_properties_cache(container, self.container_link), + ) return container @distributed_trace @@ -272,17 +286,17 @@ def read_item( # pylint:disable=docstring-missing-param """ doc_link = self._get_document_link(item) if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) request_options["partitionKey"] = self._set_partition_key(partition_key) if populate_query_metrics is not None: @@ -302,19 +316,19 @@ def read_item( # pylint:disable=docstring-missing-param @distributed_trace def read_items( - self, - items: Sequence[Tuple[str, PartitionKeyType]], - *, - executor: Optional[ThreadPoolExecutor] = None, - max_concurrency: Optional[int] = None, - consistency_level: Optional[str] = None, - session_token: Optional[str] = None, - initial_headers: Optional[dict[str, str]] = None, - excluded_locations: Optional[list[str]] = None, - priority: Optional[Literal["High", "Low"]] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + items: Sequence[Tuple[str, PartitionKeyType]], + *, + executor: Optional[ThreadPoolExecutor] = None, + max_concurrency: Optional[int] = None, + consistency_level: Optional[str] = None, + session_token: Optional[str] = None, + initial_headers: Optional[dict[str, str]] = None, + excluded_locations: Optional[list[str]] = None, + priority: Optional[Literal["High", "Low"]] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any ) -> CosmosList: """Reads multiple items from the container. @@ -349,21 +363,21 @@ def read_items( """ if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if consistency_level is not None: - kwargs['consistencyLevel'] = consistency_level + kwargs["consistencyLevel"] = consistency_level if excluded_locations is not None: - kwargs['excludedLocations'] = excluded_locations + kwargs["excludedLocations"] = excluded_locations if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) - kwargs['max_concurrency'] = max_concurrency + kwargs["max_concurrency"] = max_concurrency query_options = build_options(kwargs) self._get_properties_with_options(query_options) query_options["enableCrossPartitionQuery"] = True @@ -372,13 +386,8 @@ def read_items( item_tuples = [(item_id, self._set_partition_key(pk)) for item_id, pk in items] return self.client_connection.read_items( - collection_link=self.container_link, - items=item_tuples, - options=query_options, - executor=executor, - **kwargs) - - + collection_link=self.container_link, items=item_tuples, options=query_options, executor=executor, **kwargs + ) @distributed_trace def read_all_items( # pylint:disable=docstring-missing-param @@ -423,17 +432,17 @@ def read_all_items( # pylint:disable=docstring-missing-param :rtype: Iterable[dict[str, Any]] """ if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook feed_options = build_options(kwargs) if max_item_count is not None: feed_options["maxItemCount"] = max_item_count @@ -453,77 +462,77 @@ def read_all_items( # pylint:disable=docstring-missing-param feed_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] items = self.client_connection.ReadItems( - collection_link=self.container_link, feed_options=feed_options, response_hook=response_hook, **kwargs) + collection_link=self.container_link, feed_options=feed_options, response_hook=response_hook, **kwargs + ) return items @overload def query_items_change_feed( - self, - *, - max_item_count: Optional[int] = None, - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, - partition_key: PartitionKeyType, - priority: Optional[Literal["High", "Low"]] = None, - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - **kwargs: Any + self, + *, + max_item_count: Optional[int] = None, + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, + partition_key: PartitionKeyType, + priority: Optional[Literal["High", "Low"]] = None, + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed, in the order in which they were modified. - :keyword int max_item_count: Max number of items to be returned in the enumeration operation. - :keyword start_time:The start time to start processing chang feed items. - Beginning: Processing the change feed items from the beginning of the change feed. - Now: Processing change feed from the current time, so only events for all future changes will be retrieved. - ~datetime.datetime: processing change feed from a point of time. Provided value will be converted to UTC. - By default, it is start from current ("Now") - :paramtype start_time: Union[~datetime.datetime, Literal["Now", "Beginning"]] - :keyword partition_key: The partition key that is used to define the scope - (logical partition or a subset of a container). If the partition key is set to None, it will try to - fetch the changes for an item with a partition key value of null. To learn more about using partition keys, - see `here - `_. - :paramtype partition_key: ~azure.cosmos.partition_key.PartitionKeyType - :keyword Literal["High", "Low"] priority: Priority based execution allows users to set a priority for each - request. Once the user has reached their provisioned throughput, low priority requests are throttled - before high priority requests start getting throttled. Feature must first be enabled at the account level. - :paramtype priority: Literal["High", "Low"] - :keyword mode: The modes to query change feed. If `continuation` was passed, 'mode' argument will be ignored. - LATEST_VERSION: Query latest items from 'start_time' or 'continuation' token. - ALL_VERSIONS_AND_DELETES: Query all versions and deleted items from either `start_time='Now'` - or 'continuation' token. - :paramtype mode: Literal["LatestVersion", "AllVersionsAndDeletes"] - :keyword Sequence[str] excluded_locations: Excluded locations to be skipped from preferred locations. The locations - in this list are specified as the names of the azure Cosmos locations like, 'West US', 'East US' and so on. - If all preferred locations were excluded, primary/hub location will be used. - This excluded_location will override existing excluded_locations in client level. - :keyword Union[bool, dict[str, Any]] availability_strategy: Enables an availability strategy by using cross-region request hedging. - Can be True (use client config if present, otherwise use default values: threshold_ms=500, threshold_steps_ms=100), - False (disable hedging even if client has it enabled), - or a dict with keys ``threshold_ms`` and ``threshold_steps_ms`` to override the client's configured availability strategy. - If not provided, uses the client's configured strategy. - :paramtype availability_strategy: Union[bool, dict[str, Any]] - :keyword response_hook: A callable invoked with the response metadata. - :paramtype response_hook: Callable[[Mapping[str, str], dict[str, Any]], None] - :returns: An Iterable of items (dicts). - :rtype: Iterable[dict[str, Any]] + :keyword int max_item_count: Max number of items to be returned in the enumeration operation. + :keyword start_time:The start time to start processing chang feed items. + Beginning: Processing the change feed items from the beginning of the change feed. + Now: Processing change feed from the current time, so only events for all future changes will be retrieved. + ~datetime.datetime: processing change feed from a point of time. Provided value will be converted to UTC. + By default, it is start from current ("Now") + :paramtype start_time: Union[~datetime.datetime, Literal["Now", "Beginning"]] + :keyword partition_key: The partition key that is used to define the scope + (logical partition or a subset of a container). If the partition key is set to None, it will try to + fetch the changes for an item with a partition key value of null. To learn more about using partition keys, + see `here + `_. + :paramtype partition_key: ~azure.cosmos.partition_key.PartitionKeyType + :keyword Literal["High", "Low"] priority: Priority based execution allows users to set a priority for each + request. Once the user has reached their provisioned throughput, low priority requests are throttled + before high priority requests start getting throttled. Feature must first be enabled at the account level. + :paramtype priority: Literal["High", "Low"] + :keyword mode: The modes to query change feed. If `continuation` was passed, 'mode' argument will be ignored. + LATEST_VERSION: Query latest items from 'start_time' or 'continuation' token. + ALL_VERSIONS_AND_DELETES: Query all versions and deleted items from either `start_time='Now'` + or 'continuation' token. + :paramtype mode: Literal["LatestVersion", "AllVersionsAndDeletes"] + :keyword Sequence[str] excluded_locations: Excluded locations to be skipped from preferred locations. The locations + in this list are specified as the names of the azure Cosmos locations like, 'West US', 'East US' and so on. + If all preferred locations were excluded, primary/hub location will be used. + This excluded_location will override existing excluded_locations in client level. + :keyword Union[bool, dict[str, Any]] availability_strategy: Enables an availability strategy by using cross-region request hedging. + Can be True (use client config if present, otherwise use default values: threshold_ms=500, threshold_steps_ms=100), + False (disable hedging even if client has it enabled), + or a dict with keys ``threshold_ms`` and ``threshold_steps_ms`` to override the client's configured availability strategy. + If not provided, uses the client's configured strategy. + :paramtype availability_strategy: Union[bool, dict[str, Any]] + :keyword response_hook: A callable invoked with the response metadata. + :paramtype response_hook: Callable[[Mapping[str, str], dict[str, Any]], None] + :returns: An Iterable of items (dicts). + :rtype: Iterable[dict[str, Any]] """ ... @overload def query_items_change_feed( - self, - *, - feed_range: dict[str, Any], - max_item_count: Optional[int] = None, - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, - priority: Optional[Literal["High", "Low"]] = None, - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - **kwargs: Any + self, + *, + feed_range: dict[str, Any], + max_item_count: Optional[int] = None, + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, + priority: Optional[Literal["High", "Low"]] = None, + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + **kwargs: Any ) -> ItemPaged[dict[str, Any]]: - """Get a sorted list of items that were changed, in the order in which they were modified. :keyword dict[str, Any] feed_range: The feed range that is used to define the scope. @@ -562,14 +571,14 @@ def query_items_change_feed( @overload def query_items_change_feed( - self, - *, - continuation: str, - max_item_count: Optional[int] = None, - priority: Optional[Literal["High", "Low"]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - **kwargs: Any + self, + *, + continuation: str, + max_item_count: Optional[int] = None, + priority: Optional[Literal["High", "Low"]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed, in the order in which they were modified. @@ -599,15 +608,15 @@ def query_items_change_feed( @overload def query_items_change_feed( - self, - *, - max_item_count: Optional[int] = None, - start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, - priority: Optional[Literal["High", "Low"]] = None, - mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - **kwargs: Any + self, + *, + max_item_count: Optional[int] = None, + start_time: Optional[Union[datetime, Literal["Now", "Beginning"]]] = None, + priority: Optional[Literal["High", "Low"]] = None, + mode: Optional[Literal["LatestVersion", "AllVersionsAndDeletes"]] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed in the entire container, in the order in which they were modified, @@ -646,11 +655,7 @@ def query_items_change_feed( ... @distributed_trace - def query_items_change_feed( - self, - *args: Any, - **kwargs: Any - ) -> ItemPaged[dict[str, Any]]: + def query_items_change_feed(self, *args: Any, **kwargs: Any) -> ItemPaged[dict[str, Any]]: """Get a sorted list of items that were changed, in the order in which they were modified. :keyword str continuation: The continuation token retrieved from previous response. It contains chang feed mode. @@ -703,7 +708,7 @@ def query_items_change_feed( change_feed_state_context["mode"] = kwargs.pop("mode") if "partition_key_range_id" in kwargs: change_feed_state_context["partitionKeyRangeId"] = kwargs.pop("partition_key_range_id") - if "is_start_from_beginning" in kwargs and kwargs.pop('is_start_from_beginning') is True: + if "is_start_from_beginning" in kwargs and kwargs.pop("is_start_from_beginning") is True: change_feed_state_context["startTime"] = "Beginning" elif "start_time" in kwargs: change_feed_state_context["startTime"] = kwargs.pop("start_time") @@ -712,10 +717,11 @@ def query_items_change_feed( if "partition_key" in kwargs: partition_key = kwargs.pop("partition_key") change_feed_state_context["partitionKey"] = self._set_partition_key(cast(PartitionKeyType, partition_key)) - change_feed_state_context["partitionKeyFeedRange"] = \ - _get_epk_range_for_partition_key(container_properties, partition_key) + change_feed_state_context["partitionKeyFeedRange"] = _get_epk_range_for_partition_key( + container_properties, partition_key + ) if "feed_range" in kwargs: - change_feed_state_context["feedRange"] = kwargs.pop('feed_range') + change_feed_state_context["feedRange"] = kwargs.pop("feed_range") if "continuation" in feed_options: change_feed_state_context["continuation"] = feed_options.pop("continuation") @@ -723,10 +729,13 @@ def query_items_change_feed( feed_options["containerRID"] = container_properties["_rid"] # populate availability_strategy - if (Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options - and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None): - feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] =\ - _validate_request_hedging_strategy(feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY)) + if ( + Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options + and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None + ): + feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] = _validate_request_hedging_strategy( + feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY) + ) response_hook = kwargs.pop("response_hook", None) if hasattr(response_hook, "clear"): @@ -739,26 +748,26 @@ def query_items_change_feed( @overload def query_items( - self, - query: str, - parameters: Optional[list[dict[str, object]]] = None, - partition_key: Optional[PartitionKeyType] = None, - enable_cross_partition_query: Optional[bool] = None, - max_item_count: Optional[int] = None, - enable_scan_in_query: Optional[bool] = None, - populate_query_metrics: Optional[bool] = None, - *, - continuation_token_limit: Optional[int] = None, - initial_headers: Optional[dict[str, str]] = None, - max_integrated_cache_staleness_in_ms: Optional[int] = None, - populate_index_metrics: Optional[bool] = None, - populate_query_advice: Optional[bool] = None, - priority: Optional[Literal["High", "Low"]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - session_token: Optional[str] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + query: str, + parameters: Optional[list[dict[str, object]]] = None, + partition_key: Optional[PartitionKeyType] = None, + enable_cross_partition_query: Optional[bool] = None, + max_item_count: Optional[int] = None, + enable_scan_in_query: Optional[bool] = None, + populate_query_metrics: Optional[bool] = None, + *, + continuation_token_limit: Optional[int] = None, + initial_headers: Optional[dict[str, str]] = None, + max_integrated_cache_staleness_in_ms: Optional[int] = None, + populate_index_metrics: Optional[bool] = None, + populate_query_advice: Optional[bool] = None, + priority: Optional[Literal["High", "Low"]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + session_token: Optional[str] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any ) -> CosmosItemPaged: """Return all results matching the given `query`. @@ -836,26 +845,26 @@ def query_items( @overload def query_items( - self, - query: str, - *, - continuation_token_limit: Optional[int] = None, - enable_cross_partition_query: Optional[bool] = None, - enable_scan_in_query: Optional[bool] = None, - feed_range: dict[str, Any], - initial_headers: Optional[dict[str, str]] = None, - max_integrated_cache_staleness_in_ms: Optional[int] = None, - max_item_count: Optional[int] = None, - parameters: Optional[list[dict[str, object]]] = None, - populate_index_metrics: Optional[bool] = None, - populate_query_metrics: Optional[bool] = None, - populate_query_advice: Optional[bool] = None, - priority: Optional[Literal["High", "Low"]] = None, - response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, - session_token: Optional[str] = None, - throughput_bucket: Optional[int] = None, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - **kwargs: Any + self, + query: str, + *, + continuation_token_limit: Optional[int] = None, + enable_cross_partition_query: Optional[bool] = None, + enable_scan_in_query: Optional[bool] = None, + feed_range: dict[str, Any], + initial_headers: Optional[dict[str, str]] = None, + max_integrated_cache_staleness_in_ms: Optional[int] = None, + max_item_count: Optional[int] = None, + parameters: Optional[list[dict[str, object]]] = None, + populate_index_metrics: Optional[bool] = None, + populate_query_metrics: Optional[bool] = None, + populate_query_advice: Optional[bool] = None, + priority: Optional[Literal["High", "Low"]] = None, + response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, + session_token: Optional[str] = None, + throughput_bucket: Optional[int] = None, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + **kwargs: Any ) -> CosmosItemPaged: """Return all results matching the given `query`. @@ -929,11 +938,7 @@ def query_items( ... @distributed_trace - def query_items( # pylint:disable=docstring-missing-param - self, - *args: Any, - **kwargs: Any - ) -> CosmosItemPaged: + def query_items(self, *args: Any, **kwargs: Any) -> CosmosItemPaged: # pylint:disable=docstring-missing-param """Return all results matching the given `query`. You can use any value for the container name in the FROM clause, but @@ -1008,8 +1013,15 @@ def query_items( # pylint:disable=docstring-missing-param :caption: Parameterized query to get all products that have been discontinued: """ # Add positional arguments to keyword argument to support backward compatibility. - original_positional_arg_names = ["query", "parameters", "partition_key", "enable_cross_partition_query", - "max_item_count", "enable_scan_in_query", "populate_query_metrics"] + original_positional_arg_names = [ + "query", + "parameters", + "partition_key", + "enable_cross_partition_query", + "max_item_count", + "enable_scan_in_query", + "populate_query_metrics", + ] utils.add_args_to_kwargs(original_positional_arg_names, args, kwargs) feed_options = build_options(kwargs) @@ -1037,10 +1049,13 @@ def query_items( # pylint:disable=docstring-missing-param feed_options["responseContinuationTokenLimitInKb"] = kwargs.pop("continuation_token_limit") # populate availability_strategy - if (Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options - and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None): - feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] =\ - _validate_request_hedging_strategy(feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY)) + if ( + Constants.Kwargs.AVAILABILITY_STRATEGY in feed_options + and feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] is not None + ): + feed_options[Constants.Kwargs.AVAILABILITY_STRATEGY] = _validate_request_hedging_strategy( + feed_options.pop(Constants.Kwargs.AVAILABILITY_STRATEGY) + ) feed_options["correlatedActivityId"] = GenerateGuidId() feed_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] @@ -1086,13 +1101,9 @@ def query_items( # pylint:disable=docstring-missing-param @distributed_trace def semantic_rerank( - self, - *, - context: str, - documents: list[str], - options: Optional[dict[str, Any]] = None + self, *, context: str, documents: list[str], options: Optional[dict[str, Any]] = None ) -> CosmosDict: - """ **provisional** Rerank a list of documents using semantic reranking. + """**provisional** Rerank a list of documents using semantic reranking. This method uses a semantic reranker to score and reorder the provided documents based on their relevance to the given reranking context. @@ -1118,13 +1129,11 @@ def semantic_rerank( if inference_service is None: raise CosmosHttpResponseError( message="Semantic reranking requires AAD credentials (inference service not initialized).", - response=None + response=None, ) result = inference_service.rerank( - reranking_context=context, - documents=documents, - semantic_reranking_options=options + reranking_context=context, documents=documents, semantic_reranking_options=options ) return result @@ -1194,21 +1203,21 @@ def replace_item( # pylint:disable=docstring-missing-param """ item_link = self._get_document_link(item) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1216,7 +1225,7 @@ def replace_item( # pylint:disable=docstring-missing-param if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) request_options["disableAutomaticIdGeneration"] = True if populate_query_metrics is not None: @@ -1229,17 +1238,15 @@ def replace_item( # pylint:disable=docstring-missing-param self._get_properties_with_options(request_options) request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] result = self.client_connection.ReplaceItem( - document_link=item_link, - new_document=body, - options=request_options, - **kwargs) + document_link=item_link, new_document=body, options=request_options, **kwargs + ) return result @distributed_trace def upsert_item( # pylint:disable=docstring-missing-param self, body: dict[str, Any], - populate_query_metrics: Optional[bool]=None, + populate_query_metrics: Optional[bool] = None, pre_trigger_include: Optional[str] = None, post_trigger_include: Optional[str] = None, *, @@ -1295,27 +1302,27 @@ def upsert_item( # pylint:disable=docstring-missing-param :rtype: ~azure.cosmos.CosmosDict[str, Any] """ if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write request_options = build_options(kwargs) @@ -1330,11 +1337,8 @@ def upsert_item( # pylint:disable=docstring-missing-param request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] result = self.client_connection.UpsertItem( - database_or_container_link=self.container_link, - document=body, - options=request_options, - **kwargs - ) + database_or_container_link=self.container_link, document=body, options=request_options, **kwargs + ) return result @distributed_trace @@ -1397,31 +1401,33 @@ def create_item( # pylint:disable=docstring-missing-param :returns: A CosmosDict representing the new item. The dict will be empty if `no_response` is specified. :rtype: ~azure.cosmos.CosmosDict[str, Any] """ - etag = kwargs.get('etag') + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1429,7 +1435,7 @@ def create_item( # pylint:disable=docstring-missing-param if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) request_options["disableAutomaticIdGeneration"] = not enable_automatic_id_generation if populate_query_metrics: @@ -1443,7 +1449,8 @@ def create_item( # pylint:disable=docstring-missing-param self._get_properties_with_options(request_options) request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] result = self.client_connection.CreateItem( - database_or_container_link=self.container_link, document=body, options=request_options, **kwargs) + database_or_container_link=self.container_link, document=body, options=request_options, **kwargs + ) return result @distributed_trace @@ -1467,7 +1474,7 @@ def patch_item( response_hook: Optional[Callable[[Mapping[str, str], dict[str, Any]], None]] = None, **kwargs: Any ) -> CosmosDict: - """ Patches the specified item with the provided operations if it + """Patches the specified item with the provided operations if it exists in the container. If the item does not already exist in the container, an exception is raised. @@ -1516,19 +1523,19 @@ def patch_item( :rtype: ~azure.cosmos.CosmosDict[str, Any] """ if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if no_response is not None: - kwargs['no_response'] = no_response + kwargs["no_response"] = no_response if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1536,7 +1543,7 @@ def patch_item( if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) request_options["disableAutomaticIdGeneration"] = True request_options["partitionKey"] = self._set_partition_key(partition_key) @@ -1547,9 +1554,8 @@ def patch_item( request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] item_link = self._get_document_link(item) result = self.client_connection.PatchItem( - document_link=item_link, - operations=patch_operations, - options=request_options, **kwargs) + document_link=item_link, operations=patch_operations, options=request_options, **kwargs + ) return result @distributed_trace @@ -1568,7 +1574,7 @@ def execute_item_batch( response_hook: Optional[Callable[[Mapping[str, str], list[dict[str, Any]]], None]] = None, **kwargs: Any ) -> CosmosList: - """ Executes the transactional batch for the specified partition key. + """Executes the transactional batch for the specified partition key. :param batch_operations: The batch of operations to be executed. :type batch_operations: list[Tuple[Any]] @@ -1603,27 +1609,29 @@ def execute_item_batch( :raises ~azure.cosmos.exceptions.CosmosBatchOperationError: A transactional batch operation failed in the batch. :rtype: ~azure.cosmos.CosmosList[dict[str, Any]] """ - etag = kwargs.get('etag') + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if retry_write is not None: @@ -1631,14 +1639,15 @@ def execute_item_batch( if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) request_options["partitionKey"] = self._set_partition_key(partition_key) request_options["disableAutomaticIdGeneration"] = True container_properties = self._get_properties_with_options(request_options) request_options["containerRID"] = container_properties["_rid"] return self.client_connection.Batch( - collection_link=self.container_link, batch_operations=batch_operations, options=request_options, **kwargs) + collection_link=self.container_link, batch_operations=batch_operations, options=request_options, **kwargs + ) @distributed_trace def delete_item( # pylint:disable=docstring-missing-param @@ -1701,15 +1710,15 @@ def delete_item( # pylint:disable=docstring-missing-param :rtype: None """ if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers if etag is not None: - kwargs['etag'] = etag + kwargs["etag"] = etag if match_condition is not None: - kwargs['match_condition'] = match_condition + kwargs["match_condition"] = match_condition if priority is not None: - kwargs['priority'] = priority + kwargs["priority"] = priority if retry_write is not None: kwargs[Constants.Kwargs.RETRY_WRITE] = retry_write if throughput_bucket is not None: @@ -1717,7 +1726,7 @@ def delete_item( # pylint:disable=docstring-missing-param if availability_strategy is not None: kwargs["availability_strategy"] = _validate_request_hedging_strategy(availability_strategy) if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) request_options["partitionKey"] = self._set_partition_key(partition_key) if populate_query_metrics is not None: @@ -1746,18 +1755,16 @@ def read_offer(self, **kwargs: Any) -> Offer: the throughput properties could not be retrieved. :rtype: ~azure.cosmos.ThroughputProperties """ - warnings.warn( - "read_offer is a deprecated method name, use get_throughput instead", - DeprecationWarning - ) + warnings.warn("read_offer is a deprecated method name, use get_throughput instead", DeprecationWarning) return self.get_throughput(**kwargs) @distributed_trace def get_throughput( - self, - *, - response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, - **kwargs: Any) -> ThroughputProperties: + self, + *, + response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, + **kwargs: Any + ) -> ThroughputProperties: """Get the ThroughputProperties object for this container. If no ThroughputProperties already exist for the container, an exception is raised. @@ -1817,7 +1824,11 @@ def replace_throughput( new_throughput_properties = throughput_properties[0].copy() _replace_throughput(throughput=throughput, new_throughput_properties=new_throughput_properties) data = self.client_connection.ReplaceOffer( - offer_link=throughput_properties[0]["_self"], offer=throughput_properties[0], response_hook=response_hook, **kwargs) + offer_link=throughput_properties[0]["_self"], + offer=throughput_properties[0], + response_hook=response_hook, + **kwargs + ) return ThroughputProperties(offer_throughput=data["content"]["offerThroughput"], properties=data) @@ -1902,10 +1913,7 @@ def query_conflicts( @distributed_trace def get_conflict( - self, - conflict: Union[str, Mapping[str, Any]], - partition_key: PartitionKeyType, - **kwargs: Any + self, conflict: Union[str, Mapping[str, Any]], partition_key: PartitionKeyType, **kwargs: Any ) -> CosmosDict: """Get the conflict identified by `conflict`. @@ -1932,10 +1940,7 @@ def get_conflict( @distributed_trace def delete_conflict( - self, - conflict: Union[str, Mapping[str, Any]], - partition_key: PartitionKeyType, - **kwargs: Any + self, conflict: Union[str, Mapping[str, Any]], partition_key: PartitionKeyType, **kwargs: Any ) -> None: """Delete a specified conflict from the container. @@ -1996,29 +2001,31 @@ def delete_all_items_by_partition_key( :paramtype response_hook: Callable[[Mapping[str, str], None], None] = None, :rtype: None """ - etag = kwargs.get('etag') + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if pre_trigger_include is not None: - kwargs['pre_trigger_include'] = pre_trigger_include + kwargs["pre_trigger_include"] = pre_trigger_include if post_trigger_include is not None: - kwargs['post_trigger_include'] = post_trigger_include + kwargs["post_trigger_include"] = post_trigger_include if session_token is not None: - kwargs['session_token'] = session_token + kwargs["session_token"] = session_token if throughput_bucket is not None: kwargs["throughput_bucket"] = throughput_bucket if response_hook is not None: - kwargs['response_hook'] = response_hook + kwargs["response_hook"] = response_hook request_options = build_options(kwargs) # regardless if partition key is valid we set it as invalid partition keys are set to a default empty value request_options["partitionKey"] = self._set_partition_key(partition_key) @@ -2026,16 +2033,12 @@ def delete_all_items_by_partition_key( request_options["containerRID"] = self.__get_client_container_caches()[self.container_link]["_rid"] self.client_connection.DeleteAllItemsByPartitionKey( - collection_link=self.container_link, options=request_options, **kwargs) + collection_link=self.container_link, options=request_options, **kwargs + ) @distributed_trace - def read_feed_ranges( - self, - *, - force_refresh: bool = False, - **kwargs: Any) -> Iterable[dict[str, Any]]: - - """ Obtains a list of feed ranges that can be used to parallelize feed operations. + def read_feed_ranges(self, *, force_refresh: bool = False, **kwargs: Any) -> Iterable[dict[str, Any]]: + """Obtains a list of feed ranges that can be used to parallelize feed operations. :keyword bool force_refresh: Flag to indicate whether obtain the list of feed ranges directly from cache or refresh the cache. @@ -2050,15 +2053,17 @@ def read_feed_ranges( if force_refresh is True: self.client_connection.refresh_routing_map_provider() - def get_next(continuation_token:str) -> list[dict[str, Any]]: # pylint: disable=unused-argument - partition_key_ranges = \ - self.client_connection._routing_map_provider.get_overlapping_ranges( # pylint: disable=protected-access - self.container_link, - [Range("", "FF", True, False)], # default to full range - **kwargs) + def get_next(continuation_token: str) -> list[dict[str, Any]]: # pylint: disable=unused-argument + partition_key_ranges = ( + self.client_connection._routing_map_provider.get_overlapping_ranges( # pylint: disable=protected-access + self.container_link, [Range("", "FF", True, False)], **kwargs # default to full range + ) + ) - feed_ranges = [FeedRangeInternalEpk(Range.PartitionKeyRangeToRange(partitionKeyRange)).to_dict() - for partitionKeyRange in partition_key_ranges] + feed_ranges = [ + FeedRangeInternalEpk(Range.PartitionKeyRangeToRange(partitionKeyRange)).to_dict() + for partitionKeyRange in partition_key_ranges + ] return feed_ranges @@ -2068,11 +2073,9 @@ def extract_data(feed_ranges_response: list[dict[str, Any]]): return ItemPaged(get_next, extract_data) def get_latest_session_token( - self, - feed_ranges_to_session_tokens: list[Tuple[dict[str, Any], str]], - target_feed_range: dict[str, Any] + self, feed_ranges_to_session_tokens: list[Tuple[dict[str, Any], str]], target_feed_range: dict[str, Any] ) -> str: - """ **provisional** This method is still in preview and may be subject to breaking changes. + """**provisional** This method is still in preview and may be subject to breaking changes. Gets the the most up to date session token from the list of session token and feed range tuples for a specific target feed range. The feed range can be obtained from a partition key @@ -2110,7 +2113,7 @@ def feed_range_from_partition_key(self, partition_key: PartitionKeyType) -> dict return FeedRangeInternalEpk(epk_range_for_partition_key).to_dict() def is_feed_range_subset(self, parent_feed_range: dict[str, Any], child_feed_range: dict[str, Any]) -> bool: - """ Checks if child feed range is a subset of parent feed range. + """Checks if child feed range is a subset of parent feed range. :param parent_feed_range: left feed range :type parent_feed_range: dict[str, Any] :param child_feed_range: right feed range @@ -2125,5 +2128,4 @@ def is_feed_range_subset(self, parent_feed_range: dict[str, Any], child_feed_ran """ parent_feed_range_epk = FeedRangeInternalEpk.from_json(parent_feed_range) child_feed_range_epk = FeedRangeInternalEpk.from_json(child_feed_range) - return child_feed_range_epk.get_normalized_range().is_subset( - parent_feed_range_epk.get_normalized_range()) + return child_feed_range_epk.get_normalized_range().is_subset(parent_feed_range_epk.get_normalized_range()) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py index a379d07b8d3a..6ef3a1b405b6 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/cosmos_client.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create, read, and delete databases in the Azure Cosmos DB SQL API service. -""" +"""Create, read, and delete databases in the Azure Cosmos DB SQL API service.""" import warnings from typing import Any, Iterable, Mapping, Optional, Union, cast, Callable, overload, Literal, TYPE_CHECKING @@ -47,17 +46,15 @@ # pylint: disable=docstring-keyword-should-match-keyword-only -CredentialType = Union[ - TokenCredential, CredentialDict, str, Mapping[str, Any], Iterable[Mapping[str, Any]] -] +CredentialType = Union[TokenCredential, CredentialDict, str, Mapping[str, Any], Iterable[Mapping[str, Any]]] def _parse_connection_str(conn_str: str, credential: Optional[Any]) -> dict[str, str]: conn_str = conn_str.rstrip(";") conn_settings = dict([s.split("=", 1) for s in conn_str.split(";")]) - if 'AccountEndpoint' not in conn_settings: + if "AccountEndpoint" not in conn_settings: raise ValueError("Connection string missing setting 'AccountEndpoint'.") - if not credential and 'AccountKey' not in conn_settings: + if not credential and "AccountKey" not in conn_settings: raise ValueError("Connection string missing setting 'AccountKey'.") return conn_settings @@ -65,92 +62,98 @@ def _parse_connection_str(conn_str: str, credential: Optional[Any]) -> dict[str, def _build_auth(credential: CredentialType) -> CredentialDict: auth: CredentialDict = {} if isinstance(credential, str): - auth['masterKey'] = credential + auth["masterKey"] = credential elif isinstance(credential, Mapping): - if any(k for k in credential.keys() if k in ['masterKey', 'resourceTokens', 'permissionFeed']): + if any(k for k in credential.keys() if k in ["masterKey", "resourceTokens", "permissionFeed"]): return cast(CredentialDict, credential) # Backwards compatible - auth['resourceTokens'] = credential + auth["resourceTokens"] = credential elif isinstance(credential, Iterable): - auth['permissionFeed'] = cast(Iterable[Mapping[str, Any]], credential) + auth["permissionFeed"] = cast(Iterable[Mapping[str, Any]], credential) elif isinstance(credential, TokenCredential): - auth['clientSecretCredential'] = credential + auth["clientSecretCredential"] = credential else: raise TypeError( "Unrecognized credential type. Please supply the master key as a string " "or a dictionary, or resource tokens, or a list of permissions, or any instance of a class implementing" - " TokenCredential (see azure.identity module for specific implementations such as ClientSecretCredential).") + " TokenCredential (see azure.identity module for specific implementations such as ClientSecretCredential)." + ) return auth def _build_connection_policy(kwargs: dict[str, Any]) -> ConnectionPolicy: # pylint: disable=protected-access - policy = kwargs.pop('connection_policy', ConnectionPolicy()) + policy = kwargs.pop("connection_policy", ConnectionPolicy()) # Connection config # `request_timeout` is supported as a legacy parameter later replaced by `connection_timeout` - if 'request_timeout' in kwargs: - policy.RequestTimeout = kwargs.pop('request_timeout') / 1000.0 + if "request_timeout" in kwargs: + policy.RequestTimeout = kwargs.pop("request_timeout") / 1000.0 else: - policy.RequestTimeout = kwargs.pop('connection_timeout', policy.RequestTimeout) - policy.ConnectionMode = kwargs.pop('connection_mode', policy.ConnectionMode) - policy.ProxyConfiguration = kwargs.pop('proxy_config', policy.ProxyConfiguration) - policy.EnableEndpointDiscovery = kwargs.pop('enable_endpoint_discovery', policy.EnableEndpointDiscovery) - policy.PreferredLocations = kwargs.pop('preferred_locations', policy.PreferredLocations) + policy.RequestTimeout = kwargs.pop("connection_timeout", policy.RequestTimeout) + policy.ConnectionMode = kwargs.pop("connection_mode", policy.ConnectionMode) + policy.ProxyConfiguration = kwargs.pop("proxy_config", policy.ProxyConfiguration) + policy.EnableEndpointDiscovery = kwargs.pop("enable_endpoint_discovery", policy.EnableEndpointDiscovery) + policy.PreferredLocations = kwargs.pop("preferred_locations", policy.PreferredLocations) # TODO: Consider storing callback method instead, such as 'Supplier' in JAVA SDK - excluded_locations = kwargs.pop('excluded_locations', policy.ExcludedLocations) + excluded_locations = kwargs.pop("excluded_locations", policy.ExcludedLocations) if excluded_locations: policy.ExcludedLocations = excluded_locations - policy.UseMultipleWriteLocations = kwargs.pop('multiple_write_locations', policy.UseMultipleWriteLocations) + policy.UseMultipleWriteLocations = kwargs.pop("multiple_write_locations", policy.UseMultipleWriteLocations) # SSL config - verify = kwargs.pop('connection_verify', None) + verify = kwargs.pop("connection_verify", None) policy.DisableSSLVerification = not bool(verify if verify is not None else True) - ssl = kwargs.pop('ssl_config', policy.SSLConfiguration) + ssl = kwargs.pop("ssl_config", policy.SSLConfiguration) if ssl: - ssl.SSLCertFile = kwargs.pop('connection_cert', ssl.SSLCertFile) + ssl.SSLCertFile = kwargs.pop("connection_cert", ssl.SSLCertFile) ssl.SSLCaCerts = verify or ssl.SSLCaCerts policy.SSLConfiguration = ssl # Retry config - retry_options = kwargs.pop('retry_options', None) + retry_options = kwargs.pop("retry_options", None) if retry_options is not None: warnings.warn( "'retry_options' has been deprecated and will be removed from the SDK in a future release.", - DeprecationWarning + DeprecationWarning, ) retry_options = policy.RetryOptions - total_retries = kwargs.pop('retry_total', None) - total_throttle_retries = kwargs.pop('retry_throttle_total', None) - retry_options._max_retry_attempt_count = \ + total_retries = kwargs.pop("retry_total", None) + total_throttle_retries = kwargs.pop("retry_throttle_total", None) + retry_options._max_retry_attempt_count = ( total_throttle_retries or total_retries or retry_options._max_retry_attempt_count - retry_options._fixed_retry_interval_in_milliseconds = kwargs.pop('retry_fixed_interval', None) or \ - retry_options._fixed_retry_interval_in_milliseconds - max_backoff = kwargs.pop('retry_backoff_max', None) - max_throttle_backoff = kwargs.pop('retry_throttle_backoff_max', None) - retry_options._max_wait_time_in_seconds = \ + ) + retry_options._fixed_retry_interval_in_milliseconds = ( + kwargs.pop("retry_fixed_interval", None) or retry_options._fixed_retry_interval_in_milliseconds + ) + max_backoff = kwargs.pop("retry_backoff_max", None) + max_throttle_backoff = kwargs.pop("retry_throttle_backoff_max", None) + retry_options._max_wait_time_in_seconds = ( max_throttle_backoff or max_backoff or retry_options._max_wait_time_in_seconds + ) policy.RetryOptions = retry_options - connection_retry = kwargs.pop('connection_retry_policy', None) + connection_retry = kwargs.pop("connection_retry_policy", None) if connection_retry is not None: warnings.warn( "'connection_retry_policy' has been deprecated and will be removed from the SDK in a future release.", - DeprecationWarning + DeprecationWarning, ) if not connection_retry: connection_retry = ConnectionRetryPolicy( retry_total=total_retries, - retry_connect=kwargs.pop('retry_connect', None), - retry_read=kwargs.pop('retry_read', None), - retry_status=kwargs.pop('retry_status', None), + retry_connect=kwargs.pop("retry_connect", None), + retry_read=kwargs.pop("retry_read", None), + retry_status=kwargs.pop("retry_status", None), retry_backoff_max=max_backoff or retry_options._max_wait_time_in_seconds, - retry_mode=kwargs.pop('retry_mode', RetryMode.Fixed), - retry_on_status_codes=kwargs.pop('retry_on_status_codes', []), - retry_backoff_factor=kwargs.pop('retry_backoff_factor', 1), + retry_mode=kwargs.pop("retry_mode", RetryMode.Fixed), + retry_on_status_codes=kwargs.pop("retry_on_status_codes", []), + retry_backoff_factor=kwargs.pop("retry_backoff_factor", 1), ) policy.ConnectionRetryConfiguration = connection_retry - policy.ResponsePayloadOnWriteDisabled = kwargs.pop('no_response_on_write', False) + policy.ResponsePayloadOnWriteDisabled = kwargs.pop("no_response_on_write", False) policy.RetryNonIdempotentWrites = kwargs.pop(Constants.Kwargs.RETRY_WRITE, False) return policy + + class CosmosClient: # pylint: disable=client-accepts-api-version-keyword """A client-side logical representation of an Azure Cosmos DB account. @@ -197,7 +200,7 @@ class CosmosClient: # pylint: disable=client-accepts-api-version-keyword Must be used along with a logger to work. :keyword ~logging.Logger logger: Logger to be used for collecting request diagnostics. Can be passed in at client level (to log all requests) or at a single request level. Requests will be logged at INFO level. - :keyword bool no_response_on_write: Indicates whether service should be instructed to skip sending + :keyword bool no_response_on_write: Indicates whether service should be instructed to skip sending response payloads on write operations for items. :keyword int throughput_bucket: The desired throughput bucket for the client :keyword str user_agent_suffix: Allows user agent suffix to be specified when creating client @@ -225,10 +228,9 @@ def __init__( url: str, credential: Union[TokenCredential, str, dict[str, Any]], consistency_level: Optional[str] = None, - **kwargs + **kwargs, ) -> None: - """Instantiate a new CosmosClient. - """ + """Instantiate a new CosmosClient.""" auth = _build_auth(credential) connection_policy = _build_connection_policy(kwargs) @@ -239,7 +241,7 @@ def __init__( connection_policy=connection_policy, availability_strategy=kwargs.pop("availability_strategy", False), availability_strategy_executor=kwargs.pop("availability_strategy_executor", None), - **kwargs + **kwargs, ) def __repr__(self) -> str: @@ -258,8 +260,8 @@ def from_connection_string( conn_str: str, credential: Optional[Union[TokenCredential, str, dict[str, Any]]] = None, consistency_level: Optional[str] = None, - **kwargs - ) -> 'CosmosClient': + **kwargs, + ) -> "CosmosClient": """Create a CosmosClient instance from a connection string. This can be retrieved from the Azure portal.For full list of optional @@ -276,10 +278,10 @@ def from_connection_string( """ settings = _parse_connection_str(conn_str, credential) return cls( - url=settings['AccountEndpoint'], - credential=credential or settings['AccountKey'], + url=settings["AccountEndpoint"], + credential=credential or settings["AccountKey"], consistency_level=consistency_level, - **kwargs + **kwargs, ) @overload @@ -287,12 +289,12 @@ def create_database( # pylint:disable=docstring-missing-param self, id: str, *, - offer_throughput: Optional[Union[int, 'ThroughputProperties']] = None, + offer_throughput: Optional[Union[int, "ThroughputProperties"]] = None, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[False] = False, - **kwargs: Any + **kwargs: Any, ) -> DatabaseProxy: """Create a new database with the given ID (name). @@ -325,12 +327,12 @@ def create_database( # pylint:disable=docstring-missing-param self, id: str, *, - offer_throughput: Optional[Union[int, 'ThroughputProperties']] = None, + offer_throughput: Optional[Union[int, "ThroughputProperties"]] = None, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[True], - **kwargs: Any + **kwargs: Any, ) -> tuple[DatabaseProxy, CosmosDict]: """Create a new database with the given ID (name). @@ -359,9 +361,7 @@ def create_database( # pylint:disable=docstring-missing-param @distributed_trace def create_database( # pylint:disable=docstring-missing-param, docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + self, *args: Any, **kwargs: Any ) -> Union[DatabaseProxy, tuple[DatabaseProxy, CosmosDict]]: """Create a new database with the given ID (name). @@ -388,24 +388,27 @@ def create_database( # pylint:disable=docstring-missing-param, docstring-should :dedent: 0 :caption: Create a database in the Cosmos DB account: """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) - etag = kwargs.get('etag') + UserWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) - match_condition = kwargs.get('match_condition') + UserWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) + UserWarning, + ) id = args[0] if args else kwargs.pop("id") # Keep positional arguments for populate_query_metrics and offer_throughput for backwards compatibility @@ -418,8 +421,7 @@ def create_database( # pylint:disable=docstring-missing-param, docstring-should if populate_query_metrics is not None: warnings.warn( - "The 'populate_query_metrics' flag does not apply to this method" - " and will be removed in the future", + "The 'populate_query_metrics' flag does not apply to this method" " and will be removed in the future", UserWarning, ) @@ -435,12 +437,12 @@ def create_database_if_not_exists( # pylint:disable=docstring-missing-param self, id: str, *, - offer_throughput: Optional[Union[int, 'ThroughputProperties']] = None, + offer_throughput: Optional[Union[int, "ThroughputProperties"]] = None, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, return_properties: Literal[False] = False, - **kwargs: Any + **kwargs: Any, ) -> DatabaseProxy: """ Create the database if it does not exist already. @@ -466,15 +468,15 @@ def create_database_if_not_exists( # pylint:disable=docstring-missing-param @overload def create_database_if_not_exists( # pylint:disable=docstring-missing-param - self, - id: str, - *, - offer_throughput: Optional[Union[int, 'ThroughputProperties']] = None, - initial_headers: Optional[dict[str, str]] = None, - response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, - throughput_bucket: Optional[int] = None, - return_properties: Literal[True], - **kwargs: Any + self, + id: str, + *, + offer_throughput: Optional[Union[int, "ThroughputProperties"]] = None, + initial_headers: Optional[dict[str, str]] = None, + response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, + throughput_bucket: Optional[int] = None, + return_properties: Literal[True], + **kwargs: Any, ) -> tuple[DatabaseProxy, CosmosDict]: """ Create the database if it does not exist already. @@ -500,9 +502,7 @@ def create_database_if_not_exists( # pylint:disable=docstring-missing-param @distributed_trace def create_database_if_not_exists( # pylint:disable=docstring-missing-param, docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + self, *args: Any, **kwargs: Any ) -> Union[DatabaseProxy, tuple[DatabaseProxy, CosmosDict]]: """ Create the database if it does not exist already. @@ -527,24 +527,27 @@ def create_database_if_not_exists( # pylint:disable=docstring-missing-param, do :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: The database read or creation failed. """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) - etag = kwargs.get('etag') + UserWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) - match_condition = kwargs.get('match_condition') + UserWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) + UserWarning, + ) id = args[0] if args else kwargs.pop("id") # Keep positional arguments for populate_query_metrics and offer_throughput for backwards compatibility @@ -556,19 +559,13 @@ def create_database_if_not_exists( # pylint:disable=docstring-missing-param, do return_properties = kwargs.pop("return_properties", False) try: database_proxy = self.get_database_client(id) - result = database_proxy.read( - populate_query_metrics=populate_query_metrics, - **kwargs - ) + result = database_proxy.read(populate_query_metrics=populate_query_metrics, **kwargs) if not return_properties: return database_proxy return database_proxy, result except CosmosResourceNotFoundError: return self.create_database( - id, - offer_throughput=offer_throughput, - return_properties=return_properties, - **kwargs + id, offer_throughput=offer_throughput, return_properties=return_properties, **kwargs ) def get_database_client(self, database: Union[str, DatabaseProxy, Mapping[str, Any]]) -> DatabaseProxy: @@ -597,7 +594,7 @@ def list_databases( # pylint:disable=docstring-missing-param initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> ItemPaged[dict[str, Any]]: """List the databases in a Cosmos DB SQL database account. @@ -609,12 +606,13 @@ def list_databases( # pylint:disable=docstring-missing-param :returns: An Iterable of database properties (dicts). :rtype: Iterable[dict[str, str]] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) + UserWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", @@ -644,7 +642,7 @@ def query_databases( # pylint:disable=docstring-missing-param initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> ItemPaged[dict[str, Any]]: """Query the databases in a Cosmos DB SQL database account. @@ -666,17 +664,18 @@ def query_databases( # pylint:disable=docstring-missing-param "the populate_query_metrics flag does not apply to this method and will be removed in the future", UserWarning, ) - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) + UserWarning, + ) if initial_headers is not None: kwargs["initial_headers"] = initial_headers if throughput_bucket is not None: - kwargs['throughput_bucket'] = throughput_bucket + kwargs["throughput_bucket"] = throughput_bucket feed_options = build_options(kwargs) if enable_cross_partition_query is not None: feed_options["enableCrossPartitionQuery"] = enable_cross_partition_query @@ -685,9 +684,9 @@ def query_databases( # pylint:disable=docstring-missing-param if query: result = self.client_connection.QueryDatabases( - query=query if parameters is None else {'query': query, 'parameters': parameters}, + query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs + **kwargs, ) else: result = self.client_connection.ReadDatabases(options=feed_options, **kwargs) @@ -704,7 +703,7 @@ def delete_database( # pylint:disable=docstring-missing-param initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, throughput_bucket: Optional[int] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """Delete the database with the given ID (name). @@ -718,31 +717,34 @@ def delete_database( # pylint:disable=docstring-missing-param :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: If the database couldn't be deleted. :rtype: None """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) - etag = kwargs.get('etag') + UserWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) - match_condition = kwargs.get('match_condition') + UserWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - UserWarning) + UserWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", UserWarning, ) if throughput_bucket is not None: - kwargs['throughput_bucket'] = throughput_bucket + kwargs["throughput_bucket"] = throughput_bucket if initial_headers is not None: kwargs["initial_headers"] = initial_headers request_options = build_options(kwargs) @@ -753,10 +755,8 @@ def delete_database( # pylint:disable=docstring-missing-param @distributed_trace def get_database_account( - self, - *, - response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, - **kwargs) -> DatabaseAccount: + self, *, response_hook: Optional[Callable[[Mapping[str, Any]], None]] = None, **kwargs + ) -> DatabaseAccount: """Retrieve the database account information. :keyword response_hook: A callable invoked with the response metadata. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index 22ae16a04457..5ff83aa59edf 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Interact with databases in the Azure Cosmos DB SQL API service. -""" +"""Interact with databases in the Azure Cosmos DB SQL API service.""" from typing import Any, Union, Optional, Mapping, Callable, overload, Literal @@ -46,7 +45,8 @@ # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs # pylint: disable=docstring-keyword-should-match-keyword-only -def _get_database_link(database_or_id: Union[str, 'DatabaseProxy', Mapping[str, Any]]) -> str: + +def _get_database_link(database_or_id: Union[str, "DatabaseProxy", Mapping[str, Any]]) -> str: if isinstance(database_or_id, str): return "dbs/{}".format(database_or_id) if isinstance(database_or_id, DatabaseProxy): @@ -82,10 +82,7 @@ class DatabaseProxy(object): """ def __init__( - self, - client_connection: CosmosClientConnection, - id: str, - properties: Optional[dict[str, Any]] = None + self, client_connection: CosmosClientConnection, id: str, properties: Optional[dict[str, Any]] = None ) -> None: """ :param ClientSession client_connection: Client from which this database was retrieved. @@ -127,7 +124,7 @@ def read( # pylint:disable=docstring-missing-param populate_query_metrics: Optional[bool] = None, *, initial_headers: Optional[dict[str, str]] = None, - **kwargs: Any + **kwargs: Any, ) -> CosmosDict: """Read the database properties. @@ -137,12 +134,13 @@ def read( # pylint:disable=docstring-missing-param :rtype: dict[Str, Any] :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: If the given database couldn't be retrieved. """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", @@ -151,33 +149,31 @@ def read( # pylint:disable=docstring-missing-param database_link = _get_database_link(self) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = build_options(kwargs) - self._properties = self.client_connection.ReadDatabase( - database_link, options=request_options, **kwargs - ) + self._properties = self.client_connection.ReadDatabase(database_link, options=request_options, **kwargs) return self._properties @overload def create_container( # pylint:disable=docstring-missing-param - self, - id: str, - partition_key: PartitionKey, - indexing_policy: Optional[dict[str, Any]] = None, - default_ttl: Optional[int] = None, - populate_query_metrics: Optional[bool] = None, - offer_throughput: Optional[Union[int, ThroughputProperties]] = None, - unique_key_policy: Optional[dict[str, Any]] = None, - conflict_resolution_policy: Optional[dict[str, Any]] = None, - *, - initial_headers: Optional[dict[str, str]] = None, - analytical_storage_ttl: Optional[int] = None, - computed_properties: Optional[list[dict[str, str]]] = None, - vector_embedding_policy: Optional[dict[str, Any]] = None, - change_feed_policy: Optional[dict[str, Any]] = None, - full_text_policy: Optional[dict[str, Any]] = None, - return_properties: Literal[False] = False, - **kwargs: Any + self, + id: str, + partition_key: PartitionKey, + indexing_policy: Optional[dict[str, Any]] = None, + default_ttl: Optional[int] = None, + populate_query_metrics: Optional[bool] = None, + offer_throughput: Optional[Union[int, ThroughputProperties]] = None, + unique_key_policy: Optional[dict[str, Any]] = None, + conflict_resolution_policy: Optional[dict[str, Any]] = None, + *, + initial_headers: Optional[dict[str, str]] = None, + analytical_storage_ttl: Optional[int] = None, + computed_properties: Optional[list[dict[str, str]]] = None, + vector_embedding_policy: Optional[dict[str, Any]] = None, + change_feed_policy: Optional[dict[str, Any]] = None, + full_text_policy: Optional[dict[str, Any]] = None, + return_properties: Literal[False] = False, + **kwargs: Any, ) -> ContainerProxy: """Create a new container with the given ID (name). @@ -233,24 +229,24 @@ def create_container( # pylint:disable=docstring-missing-param @overload def create_container( # pylint:disable=docstring-missing-param - self, - id: str, - partition_key: PartitionKey, - indexing_policy: Optional[dict[str, Any]] = None, - default_ttl: Optional[int] = None, - populate_query_metrics: Optional[bool] = None, - offer_throughput: Optional[Union[int, ThroughputProperties]] = None, - unique_key_policy: Optional[dict[str, Any]] = None, - conflict_resolution_policy: Optional[dict[str, Any]] = None, - *, - initial_headers: Optional[dict[str, str]] = None, - analytical_storage_ttl: Optional[int] = None, - computed_properties: Optional[list[dict[str, str]]] = None, - vector_embedding_policy: Optional[dict[str, Any]] = None, - change_feed_policy: Optional[dict[str, Any]] = None, - full_text_policy: Optional[dict[str, Any]] = None, - return_properties: Literal[True], - **kwargs: Any + self, + id: str, + partition_key: PartitionKey, + indexing_policy: Optional[dict[str, Any]] = None, + default_ttl: Optional[int] = None, + populate_query_metrics: Optional[bool] = None, + offer_throughput: Optional[Union[int, ThroughputProperties]] = None, + unique_key_policy: Optional[dict[str, Any]] = None, + conflict_resolution_policy: Optional[dict[str, Any]] = None, + *, + initial_headers: Optional[dict[str, str]] = None, + analytical_storage_ttl: Optional[int] = None, + computed_properties: Optional[list[dict[str, str]]] = None, + vector_embedding_policy: Optional[dict[str, Any]] = None, + change_feed_policy: Optional[dict[str, Any]] = None, + full_text_policy: Optional[dict[str, Any]] = None, + return_properties: Literal[True], + **kwargs: Any, ) -> tuple[ContainerProxy, CosmosDict]: """Create a new container with the given ID (name). @@ -306,9 +302,7 @@ def create_container( # pylint:disable=docstring-missing-param @distributed_trace def create_container( # pylint:disable=docstring-missing-param, too-many-statements, docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + self, *args: Any, **kwargs: Any ) -> Union[ContainerProxy, tuple[ContainerProxy, CosmosDict]]: """Create a new container with the given ID (name). @@ -362,45 +356,47 @@ def create_container( # pylint:disable=docstring-missing-param, too-many-statem :dedent: 0 :caption: Create a container with specific settings; in this case, a custom partition key: """ - id = args[0] if len(args) > 0 else kwargs.pop('id') - partition_key = args[1] if len(args) > 1 else kwargs.pop('partition_key') - indexing_policy = args[2] if len(args) > 2 else kwargs.pop('indexing_policy', None) - default_ttl = args[3] if len(args) > 3 else kwargs.pop('default_ttl', None) - populate_query_metrics = args[4] if len(args) > 4 else kwargs.pop('populate_query_metrics', None) - offer_throughput = args[5] if len(args) > 5 else kwargs.pop('offer_throughput', None) - unique_key_policy = args[6] if len(args) > 6 else kwargs.pop('unique_key_policy', None) - conflict_resolution_policy = args[7] if len(args) > 7 else kwargs.pop('conflict_resolution_policy', None) + id = args[0] if len(args) > 0 else kwargs.pop("id") + partition_key = args[1] if len(args) > 1 else kwargs.pop("partition_key") + indexing_policy = args[2] if len(args) > 2 else kwargs.pop("indexing_policy", None) + default_ttl = args[3] if len(args) > 3 else kwargs.pop("default_ttl", None) + populate_query_metrics = args[4] if len(args) > 4 else kwargs.pop("populate_query_metrics", None) + offer_throughput = args[5] if len(args) > 5 else kwargs.pop("offer_throughput", None) + unique_key_policy = args[6] if len(args) > 6 else kwargs.pop("unique_key_policy", None) + conflict_resolution_policy = args[7] if len(args) > 7 else kwargs.pop("conflict_resolution_policy", None) if len(args) > 8: raise TypeError(f"Unexpected positional parameters: {args[8:]}") - analytical_storage_ttl = kwargs.pop('analytical_storage_ttl', None) - vector_embedding_policy = kwargs.pop('vector_embedding_policy', None) - computed_properties = kwargs.pop('computed_properties', None) - change_feed_policy = kwargs.pop('change_feed_policy', None) - full_text_policy = kwargs.pop('full_text_policy', None) - return_properties = kwargs.pop('return_properties', False) - - session_token = kwargs.get('session_token') + analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None) + vector_embedding_policy = kwargs.pop("vector_embedding_policy", None) + computed_properties = kwargs.pop("computed_properties", None) + change_feed_policy = kwargs.pop("change_feed_policy", None) + full_text_policy = kwargs.pop("full_text_policy", None) + return_properties = kwargs.pop("return_properties", False) + + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if populate_query_metrics is not None: warnings.warn( - "The 'populate_query_metrics' flag does not apply to this method" - " and will be removed in the future", + "The 'populate_query_metrics' flag does not apply to this method" " and will be removed in the future", DeprecationWarning, ) @@ -411,7 +407,7 @@ def create_container( # pylint:disable=docstring-missing-param, too-many-statem if indexing_policy.get("indexingMode") is IndexingMode.Lazy: warnings.warn( "Lazy indexing mode has been deprecated. Mode will be set to consistent indexing by the backend.", - DeprecationWarning + DeprecationWarning, ) definition["indexingPolicy"] = indexing_policy if default_ttl is not None: @@ -442,24 +438,24 @@ def create_container( # pylint:disable=docstring-missing-param, too-many-statem @overload def create_container_if_not_exists( # pylint:disable=docstring-missing-param - self, - id: str, - partition_key: PartitionKey, - indexing_policy: Optional[dict[str, Any]] = None, - default_ttl: Optional[int] = None, - populate_query_metrics: Optional[bool] = None, - offer_throughput: Optional[Union[int, ThroughputProperties]] = None, - unique_key_policy: Optional[dict[str, Any]] = None, - conflict_resolution_policy: Optional[dict[str, Any]] = None, - *, - initial_headers: Optional[dict[str, str]] = None, - analytical_storage_ttl: Optional[int] = None, - computed_properties: Optional[list[dict[str, str]]] = None, - vector_embedding_policy: Optional[dict[str, Any]] = None, - change_feed_policy: Optional[dict[str, Any]] = None, - full_text_policy: Optional[dict[str, Any]] = None, - return_properties: Literal[False] = False, - **kwargs: Any + self, + id: str, + partition_key: PartitionKey, + indexing_policy: Optional[dict[str, Any]] = None, + default_ttl: Optional[int] = None, + populate_query_metrics: Optional[bool] = None, + offer_throughput: Optional[Union[int, ThroughputProperties]] = None, + unique_key_policy: Optional[dict[str, Any]] = None, + conflict_resolution_policy: Optional[dict[str, Any]] = None, + *, + initial_headers: Optional[dict[str, str]] = None, + analytical_storage_ttl: Optional[int] = None, + computed_properties: Optional[list[dict[str, str]]] = None, + vector_embedding_policy: Optional[dict[str, Any]] = None, + change_feed_policy: Optional[dict[str, Any]] = None, + full_text_policy: Optional[dict[str, Any]] = None, + return_properties: Literal[False] = False, + **kwargs: Any, ) -> ContainerProxy: """Create a container if it does not exist already. @@ -501,24 +497,24 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param @overload def create_container_if_not_exists( # pylint:disable=docstring-missing-param - self, - id: str, - partition_key: PartitionKey, - indexing_policy: Optional[dict[str, Any]] = None, - default_ttl: Optional[int] = None, - populate_query_metrics: Optional[bool] = None, - offer_throughput: Optional[Union[int, ThroughputProperties]] = None, - unique_key_policy: Optional[dict[str, Any]] = None, - conflict_resolution_policy: Optional[dict[str, Any]] = None, - *, - initial_headers: Optional[dict[str, str]] = None, - analytical_storage_ttl: Optional[int] = None, - computed_properties: Optional[list[dict[str, str]]] = None, - vector_embedding_policy: Optional[dict[str, Any]] = None, - change_feed_policy: Optional[dict[str, Any]] = None, - full_text_policy: Optional[dict[str, Any]] = None, - return_properties: Literal[True], - **kwargs: Any + self, + id: str, + partition_key: PartitionKey, + indexing_policy: Optional[dict[str, Any]] = None, + default_ttl: Optional[int] = None, + populate_query_metrics: Optional[bool] = None, + offer_throughput: Optional[Union[int, ThroughputProperties]] = None, + unique_key_policy: Optional[dict[str, Any]] = None, + conflict_resolution_policy: Optional[dict[str, Any]] = None, + *, + initial_headers: Optional[dict[str, str]] = None, + analytical_storage_ttl: Optional[int] = None, + computed_properties: Optional[list[dict[str, str]]] = None, + vector_embedding_policy: Optional[dict[str, Any]] = None, + change_feed_policy: Optional[dict[str, Any]] = None, + full_text_policy: Optional[dict[str, Any]] = None, + return_properties: Literal[True], + **kwargs: Any, ) -> tuple[ContainerProxy, CosmosDict]: """Create a container if it does not exist already. @@ -560,9 +556,7 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param @distributed_trace def create_container_if_not_exists( # pylint:disable=docstring-missing-param, docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + self, *args: Any, **kwargs: Any ) -> Union[ContainerProxy, tuple[ContainerProxy, CosmosDict]]: """Create a container if it does not exist already. @@ -603,49 +597,50 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param, d :rtype: ~azure.cosmos.ContainerProxy or tuple[ ~azure.cosmos.ContainerProxy, ~azure.cosmos.CosmosDict] """ - id = args[0] if len(args) > 0 else kwargs.pop('id') - partition_key = args[1] if len(args) > 1 else kwargs.pop('partition_key') - indexing_policy = args[2] if len(args) > 2 else kwargs.pop('indexing_policy', None) - default_ttl = args[3] if len(args) > 3 else kwargs.pop('default_ttl', None) - populate_query_metrics = args[4] if len(args) > 4 else kwargs.pop('populate_query_metrics', None) - offer_throughput = args[5] if len(args) > 5 else kwargs.pop('offer_throughput', None) - unique_key_policy = args[6] if len(args) > 6 else kwargs.pop('unique_key_policy', None) - conflict_resolution_policy = args[7] if len(args) > 7 else kwargs.pop('conflict_resolution_policy', None) + id = args[0] if len(args) > 0 else kwargs.pop("id") + partition_key = args[1] if len(args) > 1 else kwargs.pop("partition_key") + indexing_policy = args[2] if len(args) > 2 else kwargs.pop("indexing_policy", None) + default_ttl = args[3] if len(args) > 3 else kwargs.pop("default_ttl", None) + populate_query_metrics = args[4] if len(args) > 4 else kwargs.pop("populate_query_metrics", None) + offer_throughput = args[5] if len(args) > 5 else kwargs.pop("offer_throughput", None) + unique_key_policy = args[6] if len(args) > 6 else kwargs.pop("unique_key_policy", None) + conflict_resolution_policy = args[7] if len(args) > 7 else kwargs.pop("conflict_resolution_policy", None) if len(args) > 8: raise TypeError(f"Unexpected positional parameters: {args[8:]}") - initial_headers = kwargs.pop('initial_headers', None) - analytical_storage_ttl = kwargs.pop('analytical_storage_ttl', None) - vector_embedding_policy = kwargs.pop('vector_embedding_policy', None) - computed_properties = kwargs.pop('computed_properties', None) - change_feed_policy = kwargs.pop('change_feed_policy', None) - full_text_policy = kwargs.pop('full_text_policy', None) - return_properties = kwargs.pop('return_properties', False) - - session_token = kwargs.get('session_token') + initial_headers = kwargs.pop("initial_headers", None) + analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None) + vector_embedding_policy = kwargs.pop("vector_embedding_policy", None) + computed_properties = kwargs.pop("computed_properties", None) + change_feed_policy = kwargs.pop("change_feed_policy", None) + full_text_policy = kwargs.pop("full_text_policy", None) + return_properties = kwargs.pop("return_properties", False) + + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) try: container_proxy = self.get_container_client(id) properties = container_proxy.read( - populate_query_metrics=populate_query_metrics, - initial_headers=initial_headers, - **kwargs + populate_query_metrics=populate_query_metrics, initial_headers=initial_headers, **kwargs ) if not return_properties: return container_proxy @@ -667,7 +662,7 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param, d change_feed_policy=change_feed_policy, full_text_policy=full_text_policy, return_properties=return_properties, - **kwargs + **kwargs, ) @distributed_trace @@ -677,7 +672,7 @@ def delete_container( # pylint:disable=docstring-missing-param populate_query_metrics: Optional[bool] = None, *, initial_headers: Optional[dict[str, str]] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """Delete a container. @@ -694,24 +689,27 @@ def delete_container( # pylint:disable=docstring-missing-param :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: If the container couldn't be deleted. :rtype: None """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", @@ -719,7 +717,7 @@ def delete_container( # pylint:disable=docstring-missing-param ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = build_options(kwargs) collection_link = self._get_container_link(container) self.client_connection.DeleteContainer(collection_link, options=request_options, **kwargs) @@ -758,7 +756,7 @@ def list_containers( # pylint:disable=docstring-missing-param *, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> ItemPaged[dict[str, Any]]: """List the containers in the database. @@ -779,12 +777,13 @@ def list_containers( # pylint:disable=docstring-missing-param :dedent: 0 :caption: List all containers in the database: """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", @@ -792,19 +791,17 @@ def list_containers( # pylint:disable=docstring-missing-param ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers feed_options = build_options(kwargs) if max_item_count is not None: feed_options["maxItemCount"] = max_item_count - result = self.client_connection.ReadContainers( - database_link=self.database_link, options=feed_options, **kwargs - ) + result = self.client_connection.ReadContainers(database_link=self.database_link, options=feed_options, **kwargs) if response_hook: response_hook(self.client_connection.last_response_headers, result) return result @distributed_trace - def query_containers( # pylint:disable=docstring-missing-param + def query_containers( # pylint:disable=docstring-missing-param self, query: Optional[str] = None, parameters: Optional[list[dict[str, Any]]] = None, @@ -813,7 +810,7 @@ def query_containers( # pylint:disable=docstring-missing-param *, initial_headers: Optional[dict[str, str]] = None, response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> ItemPaged[dict[str, Any]]: """List the properties for containers in the current database. @@ -827,12 +824,13 @@ def query_containers( # pylint:disable=docstring-missing-param :returns: An Iterable of container properties (dicts). :rtype: Iterable[dict[str, Any]] """ - session_token = kwargs.get('session_token') + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", @@ -840,7 +838,7 @@ def query_containers( # pylint:disable=docstring-missing-param ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers feed_options = build_options(kwargs) if max_item_count is not None: feed_options["maxItemCount"] = max_item_count @@ -848,7 +846,7 @@ def query_containers( # pylint:disable=docstring-missing-param database_link=self.database_link, query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs + **kwargs, ) if response_hook: response_hook(self.client_connection.last_response_headers, result) @@ -870,7 +868,7 @@ def replace_container( # pylint:disable=docstring-missing-param full_text_policy: Optional[dict[str, Any]] = None, return_properties: Literal[False] = False, vector_embedding_policy: Optional[dict[str, Any]] = None, - **kwargs: Any + **kwargs: Any, ) -> ContainerProxy: """Reset the properties of the container. @@ -916,21 +914,21 @@ def replace_container( # pylint:disable=docstring-missing-param @overload def replace_container( # pylint:disable=docstring-missing-param - self, - container: Union[str, ContainerProxy, Mapping[str, Any]], - partition_key: PartitionKey, - indexing_policy: Optional[dict[str, Any]] = None, - default_ttl: Optional[int] = None, - conflict_resolution_policy: Optional[dict[str, Any]] = None, - populate_query_metrics: Optional[bool] = None, - *, - initial_headers: Optional[dict[str, str]] = None, - analytical_storage_ttl: Optional[int] = None, - computed_properties: Optional[list[dict[str, str]]] = None, - full_text_policy: Optional[dict[str, Any]] = None, - return_properties: Literal[True], - vector_embedding_policy: Optional[dict[str, Any]] = None, - **kwargs: Any + self, + container: Union[str, ContainerProxy, Mapping[str, Any]], + partition_key: PartitionKey, + indexing_policy: Optional[dict[str, Any]] = None, + default_ttl: Optional[int] = None, + conflict_resolution_policy: Optional[dict[str, Any]] = None, + populate_query_metrics: Optional[bool] = None, + *, + initial_headers: Optional[dict[str, str]] = None, + analytical_storage_ttl: Optional[int] = None, + computed_properties: Optional[list[dict[str, str]]] = None, + full_text_policy: Optional[dict[str, Any]] = None, + return_properties: Literal[True], + vector_embedding_policy: Optional[dict[str, Any]] = None, + **kwargs: Any, ) -> tuple[ContainerProxy, CosmosDict]: """Reset the properties of the container. @@ -976,9 +974,7 @@ def replace_container( # pylint:disable=docstring-missing-param @distributed_trace def replace_container( # pylint:disable=docstring-missing-param, docstring-should-be-keyword - self, - *args: Any, - **kwargs: Any + self, *args: Any, **kwargs: Any ) -> Union[ContainerProxy, tuple[ContainerProxy, CosmosDict]]: """Reset the properties of the container. @@ -1023,39 +1019,42 @@ def replace_container( # pylint:disable=docstring-missing-param, docstring-shou :caption: Reset the TTL property on a container, and display the updated properties: """ - container = args[0] if len(args) > 0 else kwargs.pop('container', None) - partition_key = args[1] if len(args) > 1 else kwargs.pop('partition_key') - indexing_policy = args[2] if len(args) > 2 else kwargs.pop('indexing_policy', None) - default_ttl = args[3] if len(args) > 3 else kwargs.pop('default_ttl', None) - conflict_resolution_policy = args[4] if len(args) > 4 else kwargs.pop('conflict_resolution_policy', None) - populate_query_metrics = args[5] if len(args) > 5 else kwargs.pop('populate_query_metrics', None) + container = args[0] if len(args) > 0 else kwargs.pop("container", None) + partition_key = args[1] if len(args) > 1 else kwargs.pop("partition_key") + indexing_policy = args[2] if len(args) > 2 else kwargs.pop("indexing_policy", None) + default_ttl = args[3] if len(args) > 3 else kwargs.pop("default_ttl", None) + conflict_resolution_policy = args[4] if len(args) > 4 else kwargs.pop("conflict_resolution_policy", None) + populate_query_metrics = args[5] if len(args) > 5 else kwargs.pop("populate_query_metrics", None) if len(args) > 6: raise TypeError(f"Unexpected positional parameters: {args[6:]}") - initial_headers = kwargs.pop('initial_headers', None) - analytical_storage_ttl = kwargs.pop('analytical_storage_ttl', None) - computed_properties = kwargs.pop('computed_properties', None) - full_text_policy = kwargs.pop('full_text_policy', None) - return_properties = kwargs.pop('return_properties', False) - vector_embedding_policy = kwargs.pop('vector_embedding_policy', None) - - session_token = kwargs.get('session_token') + initial_headers = kwargs.pop("initial_headers", None) + analytical_storage_ttl = kwargs.pop("analytical_storage_ttl", None) + computed_properties = kwargs.pop("computed_properties", None) + full_text_policy = kwargs.pop("full_text_policy", None) + return_properties = kwargs.pop("return_properties", False) + vector_embedding_policy = kwargs.pop("vector_embedding_policy", None) + + session_token = kwargs.get("session_token") if session_token is not None: warnings.warn( "The 'session_token' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - etag = kwargs.get('etag') + DeprecationWarning, + ) + etag = kwargs.get("etag") if etag is not None: warnings.warn( "The 'etag' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) - match_condition = kwargs.get('match_condition') + DeprecationWarning, + ) + match_condition = kwargs.get("match_condition") if match_condition is not None: warnings.warn( "The 'match_condition' flag does not apply to this method and is always ignored even if passed." " It will now be removed in the future.", - DeprecationWarning) + DeprecationWarning, + ) if populate_query_metrics is not None: warnings.warn( "the populate_query_metrics flag does not apply to this method and will be removed in the future", @@ -1063,7 +1062,7 @@ def replace_container( # pylint:disable=docstring-missing-param, docstring-shou ) if initial_headers is not None: - kwargs['initial_headers'] = initial_headers + kwargs["initial_headers"] = initial_headers request_options = build_options(kwargs) container_id = self._get_container_id(container) @@ -1079,31 +1078,33 @@ def replace_container( # pylint:disable=docstring-missing-param, docstring-shou "analyticalStorageTtl": analytical_storage_ttl, "computedProperties": computed_properties, "fullTextPolicy": full_text_policy, - "vectorEmbeddingPolicy": vector_embedding_policy + "vectorEmbeddingPolicy": vector_embedding_policy, }.items() if value is not None } container_properties = self.client_connection.ReplaceContainer( - container_link, collection=parameters, options=request_options, **kwargs) + container_link, collection=parameters, options=request_options, **kwargs + ) if not return_properties: return ContainerProxy( - self.client_connection, - self.database_link, container_properties["id"], - properties=container_properties) - return ContainerProxy( - self.client_connection, - self.database_link, container_properties["id"], - properties=container_properties), container_properties + self.client_connection, self.database_link, container_properties["id"], properties=container_properties + ) + return ( + ContainerProxy( + self.client_connection, self.database_link, container_properties["id"], properties=container_properties + ), + container_properties, + ) @distributed_trace def list_users( - self, - max_item_count: Optional[int] = None, - *, - response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + self, + max_item_count: Optional[int] = None, + *, + response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, + **kwargs: Any, ) -> ItemPaged[dict[str, Any]]: """List all the users in the container. @@ -1117,9 +1118,7 @@ def list_users( if max_item_count is not None: feed_options["maxItemCount"] = max_item_count - result = self.client_connection.ReadUsers( - database_link=self.database_link, options=feed_options, **kwargs - ) + result = self.client_connection.ReadUsers(database_link=self.database_link, options=feed_options, **kwargs) if response_hook: response_hook(self.client_connection.last_response_headers, result) return result @@ -1132,7 +1131,7 @@ def query_users( max_item_count: Optional[int] = None, *, response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + **kwargs: Any, ) -> ItemPaged[dict[str, Any]]: """Return all users matching the given `query`. @@ -1153,7 +1152,7 @@ def query_users( database_link=self.database_link, query=query if parameters is None else {"query": query, "parameters": parameters}, options=feed_options, - **kwargs + **kwargs, ) if response_hook: response_hook(self.client_connection.last_response_headers, result) @@ -1202,7 +1201,8 @@ def create_user(self, body: dict[str, Any], **kwargs: Any) -> UserProxy: request_options = build_options(kwargs) user = self.client_connection.CreateUser( - database_link=self.database_link, user=body, options=request_options, **kwargs) + database_link=self.database_link, user=body, options=request_options, **kwargs + ) return UserProxy( client_connection=self.client_connection, id=user["id"], database_link=self.database_link, properties=user @@ -1224,7 +1224,8 @@ def upsert_user(self, body: dict[str, Any], **kwargs: Any) -> UserProxy: request_options = build_options(kwargs) user = self.client_connection.UpsertUser( - database_link=self.database_link, user=body, options=request_options, **kwargs) + database_link=self.database_link, user=body, options=request_options, **kwargs + ) return UserProxy( client_connection=self.client_connection, id=user["id"], database_link=self.database_link, properties=user @@ -1232,10 +1233,7 @@ def upsert_user(self, body: dict[str, Any], **kwargs: Any) -> UserProxy: @distributed_trace def replace_user( - self, - user: Union[str, UserProxy, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, user: Union[str, UserProxy, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> UserProxy: """Replaces the specified user if it exists in the container. @@ -1259,7 +1257,7 @@ def replace_user( client_connection=self.client_connection, id=replaced_user["id"], database_link=self.database_link, - properties=replaced_user + properties=replaced_user, ) @distributed_trace @@ -1290,18 +1288,16 @@ def read_offer(self, **kwargs: Any) -> Offer: the throughput properties could not be retrieved. :rtype: ~azure.cosmos.ThroughputProperties """ - warnings.warn( - "read_offer is a deprecated method name, use get_throughput instead", - DeprecationWarning - ) + warnings.warn("read_offer is a deprecated method name, use get_throughput instead", DeprecationWarning) return self.get_throughput(**kwargs) @distributed_trace def get_throughput( - self, - *, - response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, - **kwargs: Any) -> ThroughputProperties: + self, + *, + response_hook: Optional[Callable[[Mapping[str, Any], list[dict[str, Any]]], None]] = None, + **kwargs: Any, + ) -> ThroughputProperties: """Get the ThroughputProperties object for this database. If no ThroughputProperties already exist for the database, an exception is raised. @@ -1323,7 +1319,8 @@ def get_throughput( if not throughput_properties: raise CosmosResourceNotFoundError( status_code=_StatusCodes.NOT_FOUND, - message="Could not find ThroughputProperties for database " + self.database_link) + message="Could not find ThroughputProperties for database " + self.database_link, + ) if response_hook: response_hook(self.client_connection.last_response_headers, throughput_properties) @@ -1331,11 +1328,7 @@ def get_throughput( return _deserialize_throughput(throughput=throughput_properties) @distributed_trace - def replace_throughput( - self, - throughput: Union[int, ThroughputProperties], - **kwargs: Any - ) -> ThroughputProperties: + def replace_throughput(self, throughput: Union[int, ThroughputProperties], **kwargs: Any) -> ThroughputProperties: """Replace the database-level throughput. :param throughput: The throughput to be set (an integer). @@ -1356,12 +1349,11 @@ def replace_throughput( if not throughput_properties: raise CosmosResourceNotFoundError( status_code=_StatusCodes.NOT_FOUND, - message="Could not find ThroughputProperties for database " + self.database_link) + message="Could not find ThroughputProperties for database " + self.database_link, + ) new_offer = throughput_properties[0].copy() _replace_throughput(throughput=throughput, new_throughput_properties=new_offer) data = self.client_connection.ReplaceOffer( - offer_link=throughput_properties[0]["_self"], - offer=throughput_properties[0], - **kwargs + offer_link=throughput_properties[0]["_self"], offer=throughput_properties[0], **kwargs ) return ThroughputProperties(offer_throughput=data["content"]["offerThroughput"], properties=data) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/diagnostics.py b/sdk/cosmos/azure-cosmos/azure/cosmos/diagnostics.py index ee34f308daca..4d5f62d4b2a1 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/diagnostics.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/diagnostics.py @@ -23,6 +23,7 @@ IMPORTANT: This file has been marked for deprecation and will be removed in the future. For diagnostics logging in our SDK, please use our CosmosHttpLoggingPolicy outlined in our README. """ + import warnings from azure.core.utils import CaseInsensitiveDict @@ -93,12 +94,12 @@ def __getattr__(self, name): def __getattr__(name): - if name == 'RecordDiagnostics': + if name == "RecordDiagnostics": warnings.warn( - "RecordDiagnostics is deprecated and should not be used. " + - "For logging diagnostics information for the SDK, please use our CosmosHttpLoggingPolicy. " + - "For more information on this, please see our README.", - DeprecationWarning + "RecordDiagnostics is deprecated and should not be used. " + + "For logging diagnostics information for the SDK, please use our CosmosHttpLoggingPolicy. " + + "For more information on this, please see our README.", + DeprecationWarning, ) return _RecordDiagnostics diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py index 4d755b3c19e9..f8d8dae00078 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/documents.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Classes and enums for documents in the Azure Cosmos database service. -""" +"""Classes and enums for documents in the Azure Cosmos database service.""" from typing import Optional, TYPE_CHECKING, Union, Any @@ -108,6 +107,7 @@ class ConsistencyLevel: Consistency levels by order of strength are Strong, BoundedStaleness, Session, ConsistentPrefix and Eventual. """ + Strong: Literal["Strong"] = "Strong" """Strong Consistency guarantees that read operations always return the value that was last written. @@ -136,6 +136,7 @@ class ConsistencyLevel: class IndexingMode: """Specifies the supported indexing modes.""" + Consistent: Literal["consistent"] = "consistent" """Index is updated synchronously with a create or update operation. With consistent indexing, query behavior is the same as the default @@ -159,6 +160,7 @@ class IndexingMode: class IndexKind: """Specifies the index kind of index specs.""" + Hash: Literal["Hash"] = "Hash" """The index entries are hashed to serve point look up queries. Can be used to serve queries like: SELECT * FROM docs d WHERE d.prop = 5 @@ -175,6 +177,7 @@ class IndexKind: class PartitionKind: """Specifies the kind of partitioning to be applied.""" + Hash: Literal["Hash"] = "Hash" """The partition key definition path is hashed.""" MultiHash: Literal["MultiHash"] = "MultiHash" @@ -183,6 +186,7 @@ class PartitionKind: class DataType: """Specifies the data type of index specs.""" + Number: Literal["Number"] = "Number" """Represents a numeric data type.""" String: Literal["String"] = "String" @@ -199,6 +203,7 @@ class DataType: class IndexingDirective: """Specifies whether the resource is to be indexed.""" + Default: int = 0 """Use any pre-defined/pre-configured defaults.""" Exclude: int = 1 @@ -209,6 +214,7 @@ class IndexingDirective: class ConnectionMode: """Represents the connection mode to be used by the client.""" + Gateway: int = 0 """Use the Azure Cosmos gateway to route all requests. The gateway proxies requests to the right data partition. @@ -217,6 +223,7 @@ class ConnectionMode: class PermissionMode: """Applicability of a permission.""" + NoneMode: Literal["none"] = "none" # None is python's key word. """None""" Read: Literal["read"] = "read" @@ -227,6 +234,7 @@ class PermissionMode: class TriggerType: """Specifies the type of trigger.""" + Pre: Literal["pre"] = "pre" """Trigger should be executed before the associated operation(s).""" Post: Literal["post"] = "post" @@ -235,6 +243,7 @@ class TriggerType: class TriggerOperation: """Specifies the operations on which a trigger should be executed.""" + All: Literal["all"] = "all" """All operations.""" Create: Literal["create"] = "create" @@ -261,6 +270,7 @@ class SSLConfiguration: The path of the CA_BUNDLE file with certificates of trusted CAs. :vartype SSLCaCerts: str or bool """ + def __init__(self) -> None: self.SSLKeyFile: Optional[str] = None self.SSLCertFile: Optional[str] = None @@ -275,6 +285,7 @@ class ProxyConfiguration: :ivar int Port: The port number of the proxy. """ + def __init__(self) -> None: self.Host: Optional[str] = None self.Port: Optional[int] = None @@ -344,8 +355,8 @@ class ConnectionPolicy: # pylint: disable=too-many-instance-attributes __defaultDBAConnectionTimeout: int = 3 # seconds __defaultReadTimeout: int = 65 # seconds __defaultRecoveryReadTimeout: int = 6 # seconds - __defaultDBAReadTimeout: int = 3 # seconds - __defaultMaxBackoff: int = 1 # seconds + __defaultDBAReadTimeout: int = 3 # seconds + __defaultMaxBackoff: int = 1 # seconds __defaultInferenceRequestTimeout: int = 5 # seconds def __init__(self) -> None: @@ -372,8 +383,10 @@ def __init__(self) -> None: self.ResponsePayloadOnWriteDisabled: bool = False self.RetryNonIdempotentWrites: int = 0 + class _OperationType: """Represents the type of the operation""" + Create: Literal["Create"] = "Create" Delete: Literal["Delete"] = "Delete" ExecuteJavaScript: Literal["ExecuteJavaScript"] = "ExecuteJavaScript" @@ -402,7 +415,7 @@ def IsWriteOperation(operationType: str) -> bool: _OperationType.Upsert, _OperationType.Update, _OperationType.Batch, - _OperationType.Patch + _OperationType.Patch, ) @staticmethod @@ -414,9 +427,10 @@ def IsReadOnlyOperation(operationType: str) -> bool: _OperationType.HeadFeed, _OperationType.Query, _OperationType.SqlQuery, - _OperationType.QueryPlan + _OperationType.QueryPlan, ) + class _QueryFeature: NoneQuery: Literal["NoneQuery"] = "NoneQuery" Aggregate: Literal["Aggregate"] = "Aggregate" @@ -433,6 +447,7 @@ class _QueryFeature: CountIf: Literal["CountIf"] = "CountIf" WeightedRankFusion: Literal["WeightedRankFusion"] = "WeightedRankFusion" + class _DistinctType: NoneType: Literal["None"] = "None" Ordered: Literal["Ordered"] = "Ordered" diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/errors.py b/sdk/cosmos/azure-cosmos/azure/cosmos/errors.py index 85c1e405c5eb..29aa1687e153 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/errors.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/errors.py @@ -24,11 +24,9 @@ .. warning:: This module is DEPRECATED. Use `azure.cosmos.exceptions` instead. """ + import warnings -from .exceptions import * # pylint: disable=wildcard-import, unused-wildcard-import +from .exceptions import * # pylint: disable=wildcard-import, unused-wildcard-import -warnings.warn( - "azure.cosmos.errors module is deprecated, use azure.cosmos.exceptions instead", - DeprecationWarning -) +warnings.warn("azure.cosmos.errors module is deprecated, use azure.cosmos.exceptions instead", DeprecationWarning) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/exceptions.py b/sdk/cosmos/azure-cosmos/azure/cosmos/exceptions.py index 71d04f3ac750..3ea4f16c6159 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/exceptions.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/exceptions.py @@ -19,17 +19,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Service-specific Exceptions in the Azure Cosmos database service. -""" -from azure.core.exceptions import ( - AzureError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError -) +"""Service-specific Exceptions in the Azure Cosmos database service.""" + +from azure.core.exceptions import AzureError, HttpResponseError, ResourceExistsError, ResourceNotFoundError from . import http_constants from .http_constants import StatusCodes as _StatusCode, SubStatusCodes as _SubStatusCodes + class CosmosHttpResponseError(HttpResponseError): """An HTTP request to the Azure Cosmos database service has failed.""" @@ -39,7 +35,7 @@ def __init__(self, status_code=None, message=None, response=None, **kwargs): :param str message: Error message. """ self.headers = response.headers if response else {} - self.sub_status = kwargs.pop('sub_status', None) + self.sub_status = kwargs.pop("sub_status", None) self.http_error_message = message status = status_code or (int(response.status_code) if response else 0) @@ -90,13 +86,8 @@ class CosmosBatchOperationError(HttpResponseError): """ def __init__( - self, - error_index=None, - headers=None, - status_code=None, - message=None, - operation_responses=None, - **kwargs): + self, error_index=None, headers=None, status_code=None, message=None, operation_responses=None, **kwargs + ): self.error_index = error_index self.headers = headers self.sub_status = None @@ -124,18 +115,20 @@ def __init__(self, message=None, **kwargs): self.history = None super(CosmosClientTimeoutError, self).__init__(message, **kwargs) + class _InternalCosmosException: def __init__(self, status_code, headers, reason=None): self.status_code = status_code self.headers = headers self.reason = reason + def _partition_range_is_gone(e): - if (e.status_code == _StatusCode.GONE - and e.sub_status == _SubStatusCodes.PARTITION_KEY_RANGE_GONE): + if e.status_code == _StatusCode.GONE and e.sub_status == _SubStatusCodes.PARTITION_KEY_RANGE_GONE: return True return False + def _container_recreate_exception(e) -> bool: is_bad_request = e.status_code == _StatusCode.BAD_REQUEST is_collection_rid_mismatch = e.sub_status == _SubStatusCodes.COLLECTION_RID_MISMATCH @@ -145,5 +138,6 @@ def _container_recreate_exception(e) -> bool: return (is_bad_request and is_collection_rid_mismatch) or (is_not_found and is_throughput_not_found) + def _is_partition_split_or_merge(e): return e.status_code == _StatusCode.GONE and e.sub_status == _SubStatusCodes.COMPLETING_SPLIT diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py b/sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py index a60ef0a48e5b..7385910e1afd 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py @@ -19,13 +19,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""HTTP Constants in the Azure Cosmos database service. -""" +"""HTTP Constants in the Azure Cosmos database service.""" class HttpMethods: - """Constants of http methods. - """ + """Constants of http methods.""" Get = "GET" Post = "POST" @@ -34,9 +32,9 @@ class HttpMethods: Head = "HEAD" Options = "OPTIONS" + class HttpHeaders: - """Constants of http headers. - """ + """Constants of http headers.""" Authorization = "authorization" ETag = "etag" @@ -262,15 +260,16 @@ class HttpHeaders: # ClientId header for load balancing ClientId = "x-ms-client-id" + class HttpHeaderPreferenceTokens: - """Constants of http header preference tokens. - """ + """Constants of http header preference tokens.""" + PreferUnfilteredQueryResponse = "PreferUnfilteredQueryResponse" class HttpStatusDescriptions: - """Constants of http status descriptions. - """ + """Constants of http status descriptions.""" + Accepted = "Accepted" Conflict = "Conflict" OK = "Ok" @@ -298,8 +297,8 @@ class HttpStatusDescriptions: class QueryStrings: - """Constants of query strings. - """ + """Constants of query strings.""" + Filter = "$filter" GenerateId = "$generateFor" GenerateIdBatchSize = "$batchSize" @@ -315,45 +314,41 @@ class QueryStrings: class CookieHeaders: - """Constants of cookie headers. - """ + """Constants of cookie headers.""" + SessionToken = "x-ms-session-token" class Versions: - """Constants of versions. - """ + """Constants of versions.""" + CurrentVersion = "2020-07-15" SDKName = "azure-cosmos" QueryVersion = "1.0" class Delimiters: - """Constants of delimiters. - """ + """Constants of delimiters.""" ClientContinuationDelimiter = "!!" ClientContinuationFormat = "{0}!!{1}" class HttpListenerErrorCodes: - """Constants of http listener error codes. - """ + """Constants of http listener error codes.""" ERROR_OPERATION_ABORTED = 995 ERROR_CONNECTION_INVALID = 1229 class HttpContextProperties: - """Constants of http context properties. - """ + """Constants of http context properties.""" SubscriptionId = "SubscriptionId" class _ErrorCodes: - """Constants of error codes. - """ + """Constants of error codes.""" # Windows Socket Error Codes WindowsInterruptedFunctionCall = 10004 @@ -375,15 +370,17 @@ class _ErrorCodes: # Linux Error Codes LinuxConnectionReset = 131 + class SDKSupportedCapabilities: - """Constants of SDK supported capabilities. - """ - NONE = '0' - PARTITION_MERGE = '1' + """Constants of SDK supported capabilities.""" + + NONE = "0" + PARTITION_MERGE = "1" + class StatusCodes: - """HTTP status codes returned by the REST operations - """ + """HTTP status codes returned by the REST operations""" + # Success OK = 200 CREATED = 201 @@ -416,8 +413,8 @@ class StatusCodes: class SubStatusCodes: - """Sub status codes returned by the REST operations specifying the details of the operation - """ + """Sub status codes returned by the REST operations specifying the details of the operation""" + UNKNOWN = 0 # 400: Bad Request Substatus @@ -456,8 +453,7 @@ class SubStatusCodes: class ResourceType: - """Types of resources in Azure Cosmos - """ + """Types of resources in Azure Cosmos""" Database = "dbs" Collection = "colls" @@ -489,10 +485,9 @@ def IsCollectionChild(resourceType: str) -> bool: ResourceType.PartitionKey, ) + # The list of headers we do not want to log, it needs to be updated if any new headers should not be logged _cosmos_disallow_list = ["Authorization", "ProxyAuthorization", "TransferEncoding"] _cosmos_allow_list = set( - v.lower() - for k, v in HttpHeaders.__dict__.items() - if not k.startswith("_") and k not in _cosmos_disallow_list + v.lower() for k, v in HttpHeaders.__dict__.items() if not k.startswith("_") and k not in _cosmos_disallow_list ) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/offer.py b/sdk/cosmos/azure-cosmos/azure/cosmos/offer.py index 3847ea10c1e2..5299bd6fcfd7 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/offer.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/offer.py @@ -17,9 +17,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create throughput properties in the Azure Cosmos DB SQL API service. -""" - +"""Create throughput properties in the Azure Cosmos DB SQL API service.""" from typing import Optional, Any, Mapping, TYPE_CHECKING @@ -43,10 +41,10 @@ class ThroughputProperties: """ def __init__(self, *args, **kwargs) -> None: - self.offer_throughput: Optional[int] = args[0] if args else kwargs.get('offer_throughput') - self.properties: Optional["CosmosDict"] = args[1] if len(args) > 1 else kwargs.get('properties') - self.auto_scale_max_throughput: Optional[int] = kwargs.get('auto_scale_max_throughput') - self.auto_scale_increment_percent: Optional[int] = kwargs.get('auto_scale_increment_percent') + self.offer_throughput: Optional[int] = args[0] if args else kwargs.get("offer_throughput") + self.properties: Optional["CosmosDict"] = args[1] if len(args) > 1 else kwargs.get("properties") + self.auto_scale_max_throughput: Optional[int] = kwargs.get("auto_scale_max_throughput") + self.auto_scale_increment_percent: Optional[int] = kwargs.get("auto_scale_increment_percent") def get_response_headers(self) -> Mapping[str, Any]: """Returns a copy of the response headers associated to this response @@ -61,4 +59,5 @@ def get_response_headers(self) -> Mapping[str, Any]: except AttributeError: return {} + Offer = ThroughputProperties diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/partition_key.py b/sdk/cosmos/azure-cosmos/azure/cosmos/partition_key.py index 5eaf140aaa70..b92cd7bb47bb 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/partition_key.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/partition_key.py @@ -18,8 +18,8 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create partition keys in the Azure Cosmos DB SQL API service. -""" +"""Create partition keys in the Azure Cosmos DB SQL API service.""" + from io import BytesIO import binascii import struct @@ -30,18 +30,13 @@ from ._cosmos_murmurhash3 import murmurhash3_128 as _murmurhash3_128, murmurhash3_32 as _murmurhash3_32 from ._routing.routing_range import Range as _Range - _MaximumExclusiveEffectivePartitionKey = 0xFF _MinimumInclusiveEffectivePartitionKey = 0x00 _MaxStringChars = 100 _MaxStringBytesToAppend = 100 -_MaxPartitionKeyBinarySize = \ - (1 # type marker - + 9 # hash value - + 1 # type marker - + _MaxStringBytesToAppend - + 1 # trailing zero - ) * 3 +_MaxPartitionKeyBinarySize = ( + 1 + 9 + 1 + _MaxStringBytesToAppend + 1 # type marker # hash value # type marker # trailing zero +) * 3 class _PartitionKeyComponentType: @@ -68,21 +63,24 @@ class _PartitionKeyComponentType: Float = 0x14 Infinity = 0xFF + class _PartitionKeyKind: HASH: str = "Hash" MULTI_HASH: str = "MultiHash" + class _PartitionKeyVersion: V1: int = 1 V2: int = 2 + class NonePartitionKeyValue: - """Represents partition key missing from the document. - """ + """Represents partition key missing from the document.""" + class NullPartitionKeyValue: - """Represents null value for a partition key. - """ + """Represents null value for a partition key.""" + class _Empty: """Represents empty value for partitionKey when it's missing in an item belonging @@ -99,10 +97,14 @@ class _Undefined: class _Infinity: """Represents infinity value for partitionKey.""" -_SingularPartitionKeyType = Union[None, bool, float, int, str, Type[NonePartitionKeyValue], Type[NullPartitionKeyValue], _Empty, _Undefined] # pylint: disable=line-too-long + +_SingularPartitionKeyType = Union[ + None, bool, float, int, str, Type[NonePartitionKeyValue], Type[NullPartitionKeyValue], _Empty, _Undefined +] # pylint: disable=line-too-long _SequentialPartitionKeyType = Sequence[_SingularPartitionKeyType] PartitionKeyType = Union[_SingularPartitionKeyType, _SequentialPartitionKeyType] + class PartitionKey(dict): """Key used to partition a container into logical partitions. @@ -137,22 +139,23 @@ class PartitionKey(dict): """ @overload - def __init__(self, path: list[str], *, kind: Literal["MultiHash"] = "MultiHash", - version: int = _PartitionKeyVersion.V2 - ) -> None: - ... + def __init__( + self, path: list[str], *, kind: Literal["MultiHash"] = "MultiHash", version: int = _PartitionKeyVersion.V2 + ) -> None: ... @overload - def __init__(self, path: str, *, kind: Literal["Hash"] = "Hash", - version:int = _PartitionKeyVersion.V2 - ) -> None: - ... + def __init__( + self, path: str, *, kind: Literal["Hash"] = "Hash", version: int = _PartitionKeyVersion.V2 + ) -> None: ... def __init__(self, *args, **kwargs): - path = args[0] if args else kwargs['path'] - kind = args[1] if len(args) > 1 else kwargs.get('kind', _PartitionKeyKind.HASH if isinstance(path, str) - else _PartitionKeyKind.MULTI_HASH) - version = args[2] if len(args) > 2 else kwargs.get('version', _PartitionKeyVersion.V2) + path = args[0] if args else kwargs["path"] + kind = ( + args[1] + if len(args) > 1 + else kwargs.get("kind", _PartitionKeyKind.HASH if isinstance(path, str) else _PartitionKeyKind.MULTI_HASH) + ) + version = args[2] if len(args) > 2 else kwargs.get("version", _PartitionKeyVersion.V2) super().__init__(paths=[path] if isinstance(path, str) else path, kind=kind, version=version) def __repr__(self) -> str: @@ -169,7 +172,7 @@ def kind(self, value: Literal["MultiHash", "Hash"]) -> None: @property def path(self) -> str: if self.kind == _PartitionKeyKind.MULTI_HASH: - return ''.join(self["paths"]) + return "".join(self["paths"]) return self["paths"][0] @path.setter @@ -187,19 +190,17 @@ def version(self) -> int: def version(self, value: int) -> None: self["version"] = value - def _get_epk_range_for_prefix_partition_key( - self, - pk_value: _SequentialPartitionKeyType - ) -> _Range: + def _get_epk_range_for_prefix_partition_key(self, pk_value: _SequentialPartitionKeyType) -> _Range: if self.kind != _PartitionKeyKind.MULTI_HASH: raise ValueError( - "Effective Partition Key Range for Prefix Partition Keys is only supported for Hierarchical Partition Keys.") # pylint: disable=line-too-long + "Effective Partition Key Range for Prefix Partition Keys is only supported for Hierarchical Partition Keys." + ) # pylint: disable=line-too-long len_pk_value = len(pk_value) len_paths = len(self["paths"]) if len_pk_value >= len_paths: raise ValueError( - f"{len_pk_value} partition key components provided. Expected less than {len_paths} " + - "components (number of container partition key definition components)." + f"{len_pk_value} partition key components provided. Expected less than {len_paths} " + + "components (number of container partition key definition components)." ) # Prefix Partitions always have exclusive max min_epk = self._get_effective_partition_key_string(pk_value) @@ -213,34 +214,25 @@ def _get_epk_range_for_prefix_partition_key( max_epk = str(min_epk) + "FF" return _Range(min_epk, max_epk, True, False) - def _get_epk_range_for_partition_key( - self, - pk_value: PartitionKeyType - ) -> _Range: + def _get_epk_range_for_partition_key(self, pk_value: PartitionKeyType) -> _Range: if self._is_prefix_partition_key(pk_value): - return self._get_epk_range_for_prefix_partition_key( - cast(_SequentialPartitionKeyType, pk_value)) + return self._get_epk_range_for_prefix_partition_key(cast(_SequentialPartitionKeyType, pk_value)) # else return point range if isinstance(pk_value, (list, tuple)) or (isinstance(pk_value, Sequence) and not isinstance(pk_value, str)): effective_partition_key_string = self._get_effective_partition_key_string(pk_value) else: - effective_partition_key_string =\ - self._get_effective_partition_key_string([pk_value]) + effective_partition_key_string = self._get_effective_partition_key_string([pk_value]) return _Range(effective_partition_key_string, effective_partition_key_string, True, True) @staticmethod - def _truncate_for_v1_hashing( - value: _SingularPartitionKeyType - ) -> _SingularPartitionKeyType: + def _truncate_for_v1_hashing(value: _SingularPartitionKeyType) -> _SingularPartitionKeyType: if isinstance(value, str): return value[:100] return value @staticmethod - def _get_effective_partition_key_for_hash_partitioning( - pk_value: Union[str, _SequentialPartitionKeyType] - ) -> str: + def _get_effective_partition_key_for_hash_partitioning(pk_value: Union[str, _SequentialPartitionKeyType]) -> str: truncated_components = [] # In Python, Strings are sequences, so we make sure we instead hash the entire string instead of each character if isinstance(pk_value, str): @@ -264,9 +256,9 @@ def _get_effective_partition_key_for_hash_partitioning( @staticmethod def _get_hashed_partition_key_string( - pk_value: _SequentialPartitionKeyType, - kind: str, - version: int = _PartitionKeyVersion.V2, + pk_value: _SequentialPartitionKeyType, + kind: str, + version: int = _PartitionKeyVersion.V2, ) -> Union[int, str]: if not pk_value: return _MinimumInclusiveEffectivePartitionKey @@ -280,35 +272,22 @@ def _get_hashed_partition_key_string( return PartitionKey._get_effective_partition_key_for_multi_hash_partitioning_v2(pk_value) return _to_hex_encoded_binary_string(pk_value) - def _get_effective_partition_key_string( - self, - pk_value: _SequentialPartitionKeyType - ) -> Union[int, str]: + def _get_effective_partition_key_string(self, pk_value: _SequentialPartitionKeyType) -> Union[int, str]: if isinstance(self, _Infinity): return _MaximumExclusiveEffectivePartitionKey return PartitionKey._get_hashed_partition_key_string(pk_value=pk_value, kind=self.kind, version=self.version) @staticmethod - def _write_for_hashing( - value: _SingularPartitionKeyType, - writer: IO[bytes] - ) -> None: + def _write_for_hashing(value: _SingularPartitionKeyType, writer: IO[bytes]) -> None: PartitionKey._write_for_hashing_core(value, bytes([0]), writer) @staticmethod - def _write_for_hashing_v2( - value: _SingularPartitionKeyType, - writer: IO[bytes] - ) -> None: + def _write_for_hashing_v2(value: _SingularPartitionKeyType, writer: IO[bytes]) -> None: PartitionKey._write_for_hashing_core(value, bytes([0xFF]), writer) @staticmethod - def _write_for_hashing_core( - value: _SingularPartitionKeyType, - string_suffix: bytes, - writer: IO[bytes] - ) -> None: + def _write_for_hashing_core(value: _SingularPartitionKeyType, string_suffix: bytes, writer: IO[bytes]) -> None: if value is True: writer.write(bytes([_PartitionKeyComponentType.PTrue])) elif value is False: @@ -318,21 +297,19 @@ def _write_for_hashing_core( elif isinstance(value, int): writer.write(bytes([_PartitionKeyComponentType.Number])) # Cast to Float to ensure correct packing - writer.write(struct.pack(' str: + def _get_effective_partition_key_for_hash_partitioning_v2(pk_value: _SequentialPartitionKeyType) -> str: with BytesIO() as ms: for component in pk_value: PartitionKey._write_for_hashing_v2(component, ms) @@ -346,12 +323,10 @@ def _get_effective_partition_key_for_hash_partitioning_v2( # Plus one more just in case. hash_bytes[0] &= 0x3F - return ''.join('{:02X}'.format(x) for x in hash_bytes) + return "".join("{:02X}".format(x) for x in hash_bytes) @staticmethod - def _get_effective_partition_key_for_multi_hash_partitioning_v2( - pk_value: _SequentialPartitionKeyType - ) -> str: + def _get_effective_partition_key_for_multi_hash_partitioning_v2(pk_value: _SequentialPartitionKeyType) -> str: sb = [] for value in pk_value: ms = BytesIO() @@ -370,15 +345,14 @@ def _get_effective_partition_key_for_multi_hash_partitioning_v2( hash_v[0] &= 0x3F sb.append(_to_hex(bytearray(hash_v), 0, len(hash_v))) - return ''.join(sb).upper() + return "".join(sb).upper() - def _is_prefix_partition_key( - self, - partition_key: PartitionKeyType) -> bool: # pylint: disable=line-too-long + def _is_prefix_partition_key(self, partition_key: PartitionKeyType) -> bool: # pylint: disable=line-too-long if self.kind != _PartitionKeyKind.MULTI_HASH: return False - ret = ((isinstance(partition_key, Sequence) and - not isinstance(partition_key, str)) and len(self['paths']) != len(partition_key)) + ret = (isinstance(partition_key, Sequence) and not isinstance(partition_key, str)) and len( + self["paths"] + ) != len(partition_key) return ret @@ -389,7 +363,7 @@ def _return_undefined_or_empty_partition_key(is_system_key: bool) -> Union[_Empt def _to_hex(bytes_object: bytearray, start: int, length: int) -> str: - return binascii.hexlify(bytes_object[start:start + length]).decode() + return binascii.hexlify(bytes_object[start : start + length]).decode() def _to_hex_encoded_binary_string(components: Sequence[object]) -> str: @@ -403,13 +377,13 @@ def _to_hex_encoded_binary_string(components: Sequence[object]) -> str: else: raise TypeError(f"Unexpected type for PK component: {type(component)}") - return _to_hex(buffer_bytes[:ms.tell()], 0, ms.tell()) + return _to_hex(buffer_bytes[: ms.tell()], 0, ms.tell()) + def _to_hex_encoded_binary_string_v1(components: Sequence[object]) -> str: ms = BytesIO() for component in components: - if (isinstance(component, (bool, int, float, str, _Infinity, _Undefined, type)) - or component is None): + if isinstance(component, (bool, int, float, str, _Infinity, _Undefined, type)) or component is None: component = cast(_SingularPartitionKeyType, component) _write_for_binary_encoding_v1(component, ms) else: @@ -417,12 +391,10 @@ def _to_hex_encoded_binary_string_v1(components: Sequence[object]) -> str: return _to_hex(bytearray(ms.getvalue()), 0, ms.tell()) -def _write_for_binary_encoding_v1( - value: _SingularPartitionKeyType, - binary_writer: IO[bytes] -) -> None: + +def _write_for_binary_encoding_v1(value: _SingularPartitionKeyType, binary_writer: IO[bytes]) -> None: if isinstance(value, bool): - binary_writer.write(bytes([(_PartitionKeyComponentType.PTrue if value else _PartitionKeyComponentType.PFalse)])) + binary_writer.write(bytes([_PartitionKeyComponentType.PTrue if value else _PartitionKeyComponentType.PFalse])) elif isinstance(value, _Infinity): binary_writer.write(bytes([_PartitionKeyComponentType.Infinity])) @@ -452,11 +424,11 @@ def _write_for_binary_encoding_v1( payload <<= 7 # Except for last chunk that ends with "0" bit. - binary_writer.write(bytes([(byte_to_write & 0xFE)])) + binary_writer.write(bytes([byte_to_write & 0xFE])) elif isinstance(value, str): binary_writer.write(bytes([_PartitionKeyComponentType.String])) - utf8_value = value.encode('utf-8') + utf8_value = value.encode("utf-8") short_string = len(utf8_value) <= _MaxStringBytesToAppend for index in range(short_string and len(utf8_value) or _MaxStringBytesToAppend + 1): @@ -470,12 +442,10 @@ def _write_for_binary_encoding_v1( elif isinstance(value, _Undefined): binary_writer.write(bytes([_PartitionKeyComponentType.Undefined])) -def _write_for_binary_encoding( - value: _SingularPartitionKeyType, - binary_writer: IO[bytes] -) -> None: + +def _write_for_binary_encoding(value: _SingularPartitionKeyType, binary_writer: IO[bytes]) -> None: if isinstance(value, bool): - binary_writer.write(bytes([(_PartitionKeyComponentType.PTrue if value else _PartitionKeyComponentType.PFalse)])) + binary_writer.write(bytes([_PartitionKeyComponentType.PTrue if value else _PartitionKeyComponentType.PFalse])) elif isinstance(value, _Infinity): binary_writer.write(bytes([_PartitionKeyComponentType.Infinity])) @@ -485,7 +455,7 @@ def _write_for_binary_encoding( payload = _UInt64.encode_double_as_uint64(value) # Function to be defined elsewhere # Encode first chunk with 8-bits of payload - binary_writer.write(bytes([(payload >> (64 - 8))])) + binary_writer.write(bytes([payload >> (64 - 8)])) payload <<= 8 # Encode remaining chunks with 7 bits of payload followed by single "1" bit each. @@ -501,11 +471,11 @@ def _write_for_binary_encoding( payload <<= 7 # Except for last chunk that ends with "0" bit. - binary_writer.write(bytes([(byte_to_write & 0xFE)])) + binary_writer.write(bytes([byte_to_write & 0xFE])) elif isinstance(value, str): binary_writer.write(bytes([_PartitionKeyComponentType.String])) - utf8_value = value.encode('utf-8') + utf8_value = value.encode("utf-8") short_string = len(utf8_value) <= _MaxStringBytesToAppend for index in range(short_string and len(utf8_value) or _MaxStringBytesToAppend + 1): @@ -520,8 +490,9 @@ def _write_for_binary_encoding( elif isinstance(value, _Undefined): binary_writer.write(bytes([_PartitionKeyComponentType.Undefined])) + def _get_partition_key_from_partition_key_definition( - partition_key_definition: Union[dict[str, Any], "PartitionKey"] + partition_key_definition: Union[dict[str, Any], "PartitionKey"], ) -> "PartitionKey": """Internal method to create a PartitionKey instance from a dictionary or PartitionKey object. @@ -535,6 +506,7 @@ def _get_partition_key_from_partition_key_definition( version: int = partition_key_definition.get("version", 1) # Default to version 1 if not provided return PartitionKey(path=path, kind=kind, version=version) + def _build_partition_key_from_properties(container_properties: dict[str, Any]) -> PartitionKey: partition_key_definition = container_properties["partitionKey"] return _get_partition_key_from_partition_key_definition(partition_key_definition) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/permission.py b/sdk/cosmos/azure-cosmos/azure/cosmos/permission.py index dd76618ce330..1ffb04d9fbf2 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/permission.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/permission.py @@ -19,8 +19,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create permissions in the Azure Cosmos DB SQL API service. -""" +"""Create permissions in the Azure Cosmos DB SQL API service.""" + from typing import Any, Mapping # Keeping this import for API backcompat @@ -28,15 +28,10 @@ class Permission: - """Represents a Permission object in the Azure Cosmos DB SQL API service. - """ + """Represents a Permission object in the Azure Cosmos DB SQL API service.""" + def __init__( - self, - id: str, - user_link: str, - permission_mode: str, - resource_link: str, - properties: Mapping[str, Any] + self, id: str, user_link: str, permission_mode: str, resource_link: str, properties: Mapping[str, Any] ) -> None: self.id = id self.user_link = user_link diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py index 4d5a7951b9f3..9eb6cff0ae75 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Create, read, update and delete and execute scripts in the Azure Cosmos DB SQL API service. -""" +"""Create, read, update and delete and execute scripts in the Azure Cosmos DB SQL API service.""" from typing import Any, Mapping, Union, Optional @@ -35,6 +34,7 @@ # pylint: disable=protected-access # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs + class ScriptType: StoredProcedure = "sprocs" Trigger = "triggers" @@ -48,12 +48,7 @@ class ScriptsProxy: :func:`ContainerProxy.scripts` attribute. """ - def __init__( - self, - client_connection: CosmosClientConnection, - container_link: str, - is_system_key: bool - ) -> None: + def __init__(self, client_connection: CosmosClientConnection, container_link: str, is_system_key: bool) -> None: self.client_connection = client_connection self.container_link = container_link self.is_system_key = is_system_key @@ -64,11 +59,7 @@ def _get_resource_link(self, script_or_id: Union[str, Mapping[str, Any]], typ: s return script_or_id["_self"] @distributed_trace - def list_stored_procedures( - self, - max_item_count: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged[dict[str, Any]]: + def list_stored_procedures(self, max_item_count: Optional[int] = None, **kwargs: Any) -> ItemPaged[dict[str, Any]]: """List all stored procedures in the container. :param int max_item_count: Max number of items to be returned in the enumeration operation. @@ -111,11 +102,7 @@ def query_stored_procedures( ) @distributed_trace - def get_stored_procedure( - self, - sproc: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> CosmosDict: + def get_stored_procedure(self, sproc: Union[str, Mapping[str, Any]], **kwargs: Any) -> CosmosDict: """Get the stored procedure identified by `id`. :param sproc: The ID (name) or dict representing stored procedure to retrieve. @@ -131,11 +118,7 @@ def get_stored_procedure( ) @distributed_trace - def create_stored_procedure( - self, - body: dict[str, Any], - **kwargs: Any - ) -> CosmosDict: + def create_stored_procedure(self, body: dict[str, Any], **kwargs: Any) -> CosmosDict: """Create a new stored procedure in the container. To replace an existing sproc, use the :func:`Container.scripts.replace_stored_procedure` method. @@ -153,10 +136,7 @@ def create_stored_procedure( @distributed_trace def replace_stored_procedure( - self, - sproc: Union[str, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, sproc: Union[str, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> CosmosDict: """Replace a specified stored procedure in the container. @@ -179,11 +159,7 @@ def replace_stored_procedure( ) @distributed_trace - def delete_stored_procedure( - self, - sproc: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> None: + def delete_stored_procedure(self, sproc: Union[str, Mapping[str, Any]], **kwargs: Any) -> None: """Delete a specified stored procedure from the container. If the stored procedure does not already exist in the container, an exception is raised. @@ -242,11 +218,7 @@ def execute_stored_procedure( ) @distributed_trace - def list_triggers( - self, - max_item_count: Optional[int] = None, - **kwargs: Any - ) -> ItemPaged[dict[str, Any]]: + def list_triggers(self, max_item_count: Optional[int] = None, **kwargs: Any) -> ItemPaged[dict[str, Any]]: """List all triggers in the container. :param int max_item_count: Max number of items to be returned in the enumeration operation. @@ -257,9 +229,7 @@ def list_triggers( if max_item_count is not None: feed_options["maxItemCount"] = max_item_count - return self.client_connection.ReadTriggers( - collection_link=self.container_link, options=feed_options, **kwargs - ) + return self.client_connection.ReadTriggers(collection_link=self.container_link, options=feed_options, **kwargs) @distributed_trace def query_triggers( @@ -290,11 +260,7 @@ def query_triggers( ) @distributed_trace - def get_trigger( - self, - trigger: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> CosmosDict: + def get_trigger(self, trigger: Union[str, Mapping[str, Any]], **kwargs: Any) -> CosmosDict: """Get a trigger identified by `id`. :param trigger: The ID (name) or dict representing trigger to retrieve. @@ -310,11 +276,7 @@ def get_trigger( ) @distributed_trace - def create_trigger( - self, - body: dict[str, Any], - **kwargs: Any - ) -> CosmosDict: + def create_trigger(self, body: dict[str, Any], **kwargs: Any) -> CosmosDict: """Create a trigger in the container. To replace an existing trigger, use the :func:`ContainerProxy.scripts.replace_trigger` method. @@ -331,10 +293,7 @@ def create_trigger( @distributed_trace def replace_trigger( - self, - trigger: Union[str, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, trigger: Union[str, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> CosmosDict: """Replace a specified trigger in the container. @@ -358,11 +317,7 @@ def replace_trigger( ) @distributed_trace - def delete_trigger( - self, - trigger: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> None: + def delete_trigger(self, trigger: Union[str, Mapping[str, Any]], **kwargs: Any) -> None: """Delete a specified trigger from the container. If the trigger does not already exist in the container, an exception is raised. @@ -380,9 +335,7 @@ def delete_trigger( @distributed_trace def list_user_defined_functions( - self, - max_item_count: Optional[int] = None, - **kwargs: Any + self, max_item_count: Optional[int] = None, **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """List all the user-defined functions in the container. @@ -427,11 +380,7 @@ def query_user_defined_functions( ) @distributed_trace - def get_user_defined_function( - self, - udf: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> CosmosDict: + def get_user_defined_function(self, udf: Union[str, Mapping[str, Any]], **kwargs: Any) -> CosmosDict: """Get a user-defined functions identified by `id`. :param udf: The ID (name) or dict representing udf to retrieve. @@ -446,11 +395,7 @@ def get_user_defined_function( ) @distributed_trace - def create_user_defined_function( - self, - body: dict[str, Any], - **kwargs: Any - ) -> CosmosDict: + def create_user_defined_function(self, body: dict[str, Any], **kwargs: Any) -> CosmosDict: """Create a user-defined function in the container. To replace an existing UDF, use the :func:`ContainerProxy.scripts.replace_user_defined_function` method. @@ -467,10 +412,7 @@ def create_user_defined_function( @distributed_trace def replace_user_defined_function( - self, - udf: Union[str, Mapping[str, Any]], - body: dict[str, Any], - **kwargs: Any + self, udf: Union[str, Mapping[str, Any]], body: dict[str, Any], **kwargs: Any ) -> CosmosDict: """Replace a specified user-defined function in the container. @@ -493,11 +435,7 @@ def replace_user_defined_function( ) @distributed_trace - def delete_user_defined_function( - self, - udf: Union[str, Mapping[str, Any]], - **kwargs: Any - ) -> None: + def delete_user_defined_function(self, udf: Union[str, Mapping[str, Any]], **kwargs: Any) -> None: """Delete a specified user-defined function from the container. If the UDF does not already exist in the container, an exception is raised. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py index 220d15fe455f..252034d8e501 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/user.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/user.py @@ -22,8 +22,8 @@ # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs # pylint: disable=docstring-keyword-should-match-keyword-only -"""Create, read, update and delete users in the Azure Cosmos DB SQL API service. -""" +"""Create, read, update and delete users in the Azure Cosmos DB SQL API service.""" + from typing import Any, Mapping, Union, Optional, Callable from azure.core.paging import ItemPaged @@ -50,7 +50,7 @@ def __init__( client_connection: CosmosClientConnection, id: str, database_link: str, - properties: Optional[CosmosDict] = None + properties: Optional[CosmosDict] = None, ) -> None: self.client_connection = client_connection self.id = id @@ -67,18 +67,13 @@ def _get_permission_link(self, permission_or_id: Union[str, Permission, Mapping[ return permission_or_id.permission_link return "{}/permissions/{}".format(self.user_link, permission_or_id["id"]) - def _get_properties( - self - ) -> CosmosDict: + def _get_properties(self) -> CosmosDict: if self._properties is None: self._properties = self.read() return self._properties @distributed_trace - def read( - self, - **kwargs: Any - ) -> CosmosDict: + def read(self, **kwargs: Any) -> CosmosDict: """Read user properties. :keyword Callable response_hook: A callable invoked with the response metadata. @@ -87,20 +82,16 @@ def read( :rtype: ~azure.cosmos.CosmosDict[str, Any] """ request_options = build_options(kwargs) - self._properties = self.client_connection.ReadUser( - user_link=self.user_link, - options=request_options, - **kwargs - ) + self._properties = self.client_connection.ReadUser(user_link=self.user_link, options=request_options, **kwargs) return self._properties @distributed_trace def list_permissions( - self, - max_item_count: Optional[int] = None, - *, - response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, - **kwargs: Any + self, + max_item_count: Optional[int] = None, + *, + response_hook: Optional[Callable[[Mapping[str, Any], ItemPaged[dict[str, Any]]], None]] = None, + **kwargs: Any ) -> ItemPaged[dict[str, Any]]: """List all permission for the user. @@ -115,10 +106,8 @@ def list_permissions( feed_options["maxItemCount"] = max_item_count result = self.client_connection.ReadPermissions( - user_link=self.user_link, - options=feed_options, - response_hook=response_hook, - **kwargs) + user_link=self.user_link, options=feed_options, response_hook=response_hook, **kwargs + ) if response_hook: response_hook(self.client_connection.last_response_headers, result) @@ -164,11 +153,7 @@ def query_permissions( return result @distributed_trace - def get_permission( - self, - permission: Union[str, Permission, Mapping[str, Any]], - **kwargs: Any - ) -> Permission: + def get_permission(self, permission: Union[str, Permission, Mapping[str, Any]], **kwargs: Any) -> Permission: """Get the permission identified by `id`. :param permission: The ID (name), dict representing the properties or :class:`~azure.cosmos.Permission` @@ -181,9 +166,7 @@ def get_permission( """ request_options = build_options(kwargs) permission_resp = self.client_connection.ReadPermission( - permission_link=self._get_permission_link(permission), - options=request_options, - **kwargs + permission_link=self._get_permission_link(permission), options=request_options, **kwargs ) return Permission( id=permission_resp["id"], @@ -207,10 +190,7 @@ def create_permission(self, body: dict[str, Any], **kwargs: Any) -> Permission: """ request_options = build_options(kwargs) permission = self.client_connection.CreatePermission( - user_link=self.user_link, - permission=body, - options=request_options, - **kwargs + user_link=self.user_link, permission=body, options=request_options, **kwargs ) return Permission( id=permission["id"], @@ -247,10 +227,7 @@ def upsert_permission(self, body: dict[str, Any], **kwargs: Any) -> Permission: @distributed_trace def replace_permission( - self, - permission: Union[str, Permission, Mapping[str, Any]], - body: dict[str, Any], - **kwargs + self, permission: Union[str, Permission, Mapping[str, Any]], body: dict[str, Any], **kwargs ) -> Permission: """Replaces the specified permission if it exists for the user. @@ -268,10 +245,7 @@ def replace_permission( """ request_options = build_options(kwargs) permission_resp = self.client_connection.ReplacePermission( - permission_link=self._get_permission_link(permission), - permission=body, - options=request_options, - **kwargs + permission_link=self._get_permission_link(permission), permission=body, options=request_options, **kwargs ) return Permission( id=permission_resp["id"], @@ -282,11 +256,7 @@ def replace_permission( ) @distributed_trace - def delete_permission( - self, - permission: Union[str, Permission, Mapping[str, Any]], - **kwargs - ) -> None: + def delete_permission(self, permission: Union[str, Permission, Mapping[str, Any]], **kwargs) -> None: """Delete the specified permission from the user. If the permission does not already exist, an exception is raised. diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py index 47c2b1761726..3663366b2e18 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/ConflictWorker.py @@ -5,8 +5,11 @@ import json from azure.cosmos import exceptions, PartitionKey + class ConflictWorker(object): - def __init__(self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name): + def __init__( + self, database_name, basic_collection_name, manual_collection_name, lww_collection_name, udp_collection_name + ): self.clients = [] self.basic_collection_link = "dbs/" + database_name + "/colls/" + basic_collection_name self.manual_collection_link = "dbs/" + database_name + "/colls/" + manual_collection_name @@ -28,78 +31,88 @@ def initialize_async(self): basic_collection = self.create_document_collection(database, self.basic_collection_name, None) - manual_resolution_policy = {'mode': 'Custom'} - manual_collection = self.create_document_collection(database, self.manual_collection_name, manual_resolution_policy) - - lww_conflict_resolution_policy = {'mode': 'LastWriterWins', 'conflictResolutionPath': '/regionId'} - - lww_collection = self.create_document_collection(database, self.lww_collection_name, lww_conflict_resolution_policy) - - udp_custom_resolution_policy = {'mode': 'Custom' } - udp_collection = self.create_document_collection(database,self.udp_collection_name, udp_custom_resolution_policy) - - lww_sproc = {'id':'resolver', - 'body': "function resolver(incomingRecord, existingRecord, isTombstone, conflictingRecords) {\r\n" + - " var collection = getContext().getCollection();\r\n" + - "\r\n" + - " if (!incomingRecord) {\r\n" + - " if (existingRecord) {\r\n" + - "\r\n" + - " collection.deleteDocument(existingRecord._self, {}, function(err, responseOptions) {\r\n" + - " if (err) throw err;\r\n" + - " });\r\n" + - " }\r\n" + - " } else if (isTombstone) {\r\n" + - " // delete always wins.\r\n" + - " } else {\r\n" + - " var documentToUse = incomingRecord;\r\n" + - "\r\n" + - " if (existingRecord) {\r\n" + - " if (documentToUse.regionId < existingRecord.regionId) {\r\n" + - " documentToUse = existingRecord;\r\n" + - " }\r\n" + - " }\r\n" + - "\r\n" + - " var i;\r\n" + - " for (i = 0; i < conflictingRecords.length; i++) {\r\n" + - " if (documentToUse.regionId < conflictingRecords[i].regionId) {\r\n" + - " documentToUse = conflictingRecords[i];\r\n" + - " }\r\n" + - " }\r\n" + - "\r\n" + - " tryDelete(conflictingRecords, incomingRecord, existingRecord, documentToUse);\r\n" + - " }\r\n" + - "\r\n" + - " function tryDelete(documents, incoming, existing, documentToInsert) {\r\n" + - " if (documents.length > 0) {\r\n" + - " collection.deleteDocument(documents[0]._self, {}, function(err, responseOptions) {\r\n" + - " if (err) throw err;\r\n" + - "\r\n" + - " documents.shift();\r\n" + - " tryDelete(documents, incoming, existing, documentToInsert);\r\n" + - " });\r\n" + - " } else if (existing) {\r\n" + - " collection.replaceDocument(existing._self, documentToInsert,\r\n" + - " function(err, documentCreated) {\r\n" + - " if (err) throw err;\r\n" + - " });\r\n" + - " } else {\r\n" + - " collection.createDocument(collection.getSelfLink(), documentToInsert,\r\n" + - " function(err, documentCreated) {\r\n" + - " if (err) throw err;\r\n" + - " });\r\n" + - " }\r\n" + - " }\r\n" + - "}" - } + manual_resolution_policy = {"mode": "Custom"} + manual_collection = self.create_document_collection( + database, self.manual_collection_name, manual_resolution_policy + ) + + lww_conflict_resolution_policy = {"mode": "LastWriterWins", "conflictResolutionPath": "/regionId"} + + lww_collection = self.create_document_collection( + database, self.lww_collection_name, lww_conflict_resolution_policy + ) + + udp_custom_resolution_policy = {"mode": "Custom"} + udp_collection = self.create_document_collection( + database, self.udp_collection_name, udp_custom_resolution_policy + ) + + lww_sproc = { + "id": "resolver", + "body": "function resolver(incomingRecord, existingRecord, isTombstone, conflictingRecords) {\r\n" + + " var collection = getContext().getCollection();\r\n" + + "\r\n" + + " if (!incomingRecord) {\r\n" + + " if (existingRecord) {\r\n" + + "\r\n" + + " collection.deleteDocument(existingRecord._self, {}, function(err, responseOptions) {\r\n" + + " if (err) throw err;\r\n" + + " });\r\n" + + " }\r\n" + + " } else if (isTombstone) {\r\n" + + " // delete always wins.\r\n" + + " } else {\r\n" + + " var documentToUse = incomingRecord;\r\n" + + "\r\n" + + " if (existingRecord) {\r\n" + + " if (documentToUse.regionId < existingRecord.regionId) {\r\n" + + " documentToUse = existingRecord;\r\n" + + " }\r\n" + + " }\r\n" + + "\r\n" + + " var i;\r\n" + + " for (i = 0; i < conflictingRecords.length; i++) {\r\n" + + " if (documentToUse.regionId < conflictingRecords[i].regionId) {\r\n" + + " documentToUse = conflictingRecords[i];\r\n" + + " }\r\n" + + " }\r\n" + + "\r\n" + + " tryDelete(conflictingRecords, incomingRecord, existingRecord, documentToUse);\r\n" + + " }\r\n" + + "\r\n" + + " function tryDelete(documents, incoming, existing, documentToInsert) {\r\n" + + " if (documents.length > 0) {\r\n" + + " collection.deleteDocument(documents[0]._self, {}, function(err, responseOptions) {\r\n" + + " if (err) throw err;\r\n" + + "\r\n" + + " documents.shift();\r\n" + + " tryDelete(documents, incoming, existing, documentToInsert);\r\n" + + " });\r\n" + + " } else if (existing) {\r\n" + + " collection.replaceDocument(existing._self, documentToInsert,\r\n" + + " function(err, documentCreated) {\r\n" + + " if (err) throw err;\r\n" + + " });\r\n" + + " } else {\r\n" + + " collection.createDocument(collection.getSelfLink(), documentToInsert,\r\n" + + " function(err, documentCreated) {\r\n" + + " if (err) throw err;\r\n" + + " });\r\n" + + " }\r\n" + + " }\r\n" + + "}", + } try: udp_collection.scripts.create_stored_procedure(lww_sproc) except exceptions.CosmosResourceExistsError: return - def create_document_collection (self, database, collection_id, conflict_resolution_policy): - read_collection = database.create_container_if_not_exists(id=collection_id, partition_key=PartitionKey(path="/id"), - conflict_resolution_policy=conflict_resolution_policy) + def create_document_collection(self, database, collection_id, conflict_resolution_policy): + read_collection = database.create_container_if_not_exists( + id=collection_id, + partition_key=PartitionKey(path="/id"), + conflict_resolution_policy=conflict_resolution_policy, + ) return read_collection def run_manual_conflict_async(self): @@ -134,15 +147,20 @@ def run_UDP_async(self): def run_insert_conflict_on_manual_async(self): while True: - print("1) Performing conflicting insert across %d regions on %s" % (len(self.clients), self.manual_collection_link)) + print( + "1) Performing conflicting insert across %d regions on %s" + % (len(self.clients), self.manual_collection_link) + ) id = str(uuid.uuid4()) i = 0 - pool = ThreadPool(processes = len(self.clients)) + pool = ThreadPool(processes=len(self.clients)) insert_document_futures = [] for client in self.clients: - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - insert_document_future = pool.apply_async(self.try_insert_document, (client, self.manual_collection_name, conflict_document)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + insert_document_future = pool.apply_async( + self.try_insert_document, (client, self.manual_collection_name, conflict_document) + ) insert_document_futures.append(insert_document_future) i += 1 @@ -157,7 +175,7 @@ def run_insert_conflict_on_manual_async(self): if number_of_conflicts > 0: print("2) Caused %d insert conflicts, verifying conflict resolution" % number_of_conflicts) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate for conflicting_insert in inserted_documents: if conflicting_insert: self.validate_manual_conflict_async(self.clients, conflicting_insert) @@ -168,21 +186,32 @@ def run_insert_conflict_on_manual_async(self): def run_update_conflict_on_manual_async(self): while True: id = str(uuid.uuid4()) - conflict_document_for_insertion = {'id': id, 'regionId': 0, 'regionEndpoint': self.clients[0].client_connection.ReadEndpoint} - conflict_document_for_insertion = self.try_insert_document(self.clients[0], self.manual_collection_name, conflict_document_for_insertion) - time.sleep(1) #1 Second for write to sync. - - print("1) Performing conflicting update across %d regions on %s" % (len(self.clients), self.manual_collection_link)) + conflict_document_for_insertion = { + "id": id, + "regionId": 0, + "regionEndpoint": self.clients[0].client_connection.ReadEndpoint, + } + conflict_document_for_insertion = self.try_insert_document( + self.clients[0], self.manual_collection_name, conflict_document_for_insertion + ) + time.sleep(1) # 1 Second for write to sync. + + print( + "1) Performing conflicting update across %d regions on %s" + % (len(self.clients), self.manual_collection_link) + ) i = 0 - access_condition = {'condition': 'IfMatch', 'type': conflict_document_for_insertion['_etag']} - pool = ThreadPool(processes = len(self.clients)) + access_condition = {"condition": "IfMatch", "type": conflict_document_for_insertion["_etag"]} + pool = ThreadPool(processes=len(self.clients)) update_document_futures = [] for client in self.clients: database = client.get_database_client(self.database_name) container = database.get_container_client(self.manual_collection_name) - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - update_document_future = pool.apply_async(self.try_update_document, (container, conflict_document, access_condition)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + update_document_future = pool.apply_async( + self.try_update_document, (container, conflict_document, access_condition) + ) update_document_futures.append(update_document_future) i += 1 @@ -197,7 +226,7 @@ def run_update_conflict_on_manual_async(self): if number_of_conflicts > 0: print("2) Caused %d update conflicts, verifying conflict resolution" % number_of_conflicts) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate for conflicting_update in update_documents: if conflicting_update: self.validate_manual_conflict_async(self.clients, conflicting_update) @@ -208,23 +237,34 @@ def run_update_conflict_on_manual_async(self): def run_delete_conflict_on_manual_async(self): while True: id = str(uuid.uuid4()) - conflict_document_for_insertion = {'id': id, 'regionId': 0, 'regionEndpoint': self.clients[0].client_connection.ReadEndpoint} - conflict_document_for_insertion = self.try_insert_document(self.clients[0], self.manual_collection_name, conflict_document_for_insertion) - time.sleep(1) #1 Second for write to sync. - - print("1) Performing conflicting delete across %d regions on %s" % (len(self.clients), self.manual_collection_link)) + conflict_document_for_insertion = { + "id": id, + "regionId": 0, + "regionEndpoint": self.clients[0].client_connection.ReadEndpoint, + } + conflict_document_for_insertion = self.try_insert_document( + self.clients[0], self.manual_collection_name, conflict_document_for_insertion + ) + time.sleep(1) # 1 Second for write to sync. + + print( + "1) Performing conflicting delete across %d regions on %s" + % (len(self.clients), self.manual_collection_link) + ) i = 0 - access_condition = {'condition': 'IfMatch', 'type': conflict_document_for_insertion['_etag']} - pool = ThreadPool(processes = len(self.clients)) + access_condition = {"condition": "IfMatch", "type": conflict_document_for_insertion["_etag"]} + pool = ThreadPool(processes=len(self.clients)) delete_document_futures = [] for client in self.clients: database = client.get_database_client(self.database_name) container = database.get_container_client(self.manual_collection_name) conflict_document = conflict_document_for_insertion.copy() - conflict_document['regionId'] = i - conflict_document['regionEndpoint'] = client.client_connection.ReadEndpoint - delete_document_future = pool.apply_async(self.try_delete_document, (container, conflict_document, access_condition)) + conflict_document["regionId"] = i + conflict_document["regionEndpoint"] = client.client_connection.ReadEndpoint + delete_document_future = pool.apply_async( + self.try_delete_document, (container, conflict_document, access_condition) + ) delete_document_futures.append(delete_document_future) i += 1 @@ -249,15 +289,20 @@ def run_delete_conflict_on_manual_async(self): def run_insert_conflict_on_LWW_async(self): while True: - print("1) Performing conflicting insert across %d regions on %s" % (len(self.clients), self.lww_collection_link)) + print( + "1) Performing conflicting insert across %d regions on %s" + % (len(self.clients), self.lww_collection_link) + ) id = str(uuid.uuid4()) i = 0 - pool = ThreadPool(processes = len(self.clients)) + pool = ThreadPool(processes=len(self.clients)) insert_document_futures = [] for client in self.clients: - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - insert_document_future = pool.apply_async(self.try_insert_document, (client, self.lww_collection_name, conflict_document)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + insert_document_future = pool.apply_async( + self.try_insert_document, (client, self.lww_collection_name, conflict_document) + ) insert_document_futures.append(insert_document_future) i += 1 @@ -269,7 +314,7 @@ def run_insert_conflict_on_LWW_async(self): if len(inserted_documents) > 1: print("2) Caused %d insert conflicts, verifying conflict resolution" % len(inserted_documents)) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate self.validate_LWW_async(self.clients, inserted_documents, False) break else: @@ -278,21 +323,32 @@ def run_insert_conflict_on_LWW_async(self): def run_update_conflict_on_LWW_async(self): while True: id = str(uuid.uuid4()) - conflict_document_for_insertion = {'id': id, 'regionId': 0, 'regionEndpoint': self.clients[0].client_connection.ReadEndpoint} - conflict_document_for_insertion = self.try_insert_document(self.clients[0], self.lww_collection_name, conflict_document_for_insertion) - time.sleep(1) #1 Second for write to sync. - - print("1) Performing conflicting update across %d regions on %s" % (len(self.clients), self.lww_collection_link)) + conflict_document_for_insertion = { + "id": id, + "regionId": 0, + "regionEndpoint": self.clients[0].client_connection.ReadEndpoint, + } + conflict_document_for_insertion = self.try_insert_document( + self.clients[0], self.lww_collection_name, conflict_document_for_insertion + ) + time.sleep(1) # 1 Second for write to sync. + + print( + "1) Performing conflicting update across %d regions on %s" + % (len(self.clients), self.lww_collection_link) + ) i = 0 - access_condition = {'condition': 'IfMatch', 'type': conflict_document_for_insertion['_etag']} - pool = ThreadPool(processes = len(self.clients)) + access_condition = {"condition": "IfMatch", "type": conflict_document_for_insertion["_etag"]} + pool = ThreadPool(processes=len(self.clients)) update_document_futures = [] for client in self.clients: database = client.get_database_client(self.database_name) container = database.get_container_client(self.lww_collection_name) - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - update_document_future = pool.apply_async(self.try_update_document, (container, conflict_document, access_condition)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + update_document_future = pool.apply_async( + self.try_update_document, (container, conflict_document, access_condition) + ) update_document_futures.append(update_document_future) i += 1 @@ -304,7 +360,7 @@ def run_update_conflict_on_LWW_async(self): if len(update_documents) > 1: print("2) Caused %d update conflicts, verifying conflict resolution" % len(update_documents)) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate self.validate_LWW_async(self.clients, update_documents, False) break else: @@ -313,21 +369,29 @@ def run_update_conflict_on_LWW_async(self): def run_delete_conflict_on_LWW_async(self): while True: id = str(uuid.uuid4()) - conflict_document_for_insertion = {'id': id, 'regionId': 0, 'regionEndpoint': self.clients[0].client_connection.ReadEndpoint} - conflict_document_for_insertion = self.try_insert_document(self.clients[0], self.lww_collection_name, conflict_document_for_insertion) - time.sleep(1) #1 Second for write to sync. + conflict_document_for_insertion = { + "id": id, + "regionId": 0, + "regionEndpoint": self.clients[0].client_connection.ReadEndpoint, + } + conflict_document_for_insertion = self.try_insert_document( + self.clients[0], self.lww_collection_name, conflict_document_for_insertion + ) + time.sleep(1) # 1 Second for write to sync. print("1) Performing conflicting update/delete across 3 regions on %s" % self.lww_collection_link) i = 0 - access_condition = {'condition': 'IfMatch', 'type': conflict_document_for_insertion['_etag']} - pool = ThreadPool(processes = len(self.clients)) + access_condition = {"condition": "IfMatch", "type": conflict_document_for_insertion["_etag"]} + pool = ThreadPool(processes=len(self.clients)) delete_document_futures = [] for client in self.clients: database = client.get_database_client(self.database_name) container = database.get_container_client(self.lww_collection_name) - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - delete_document_future = pool.apply_async(self.try_update_or_delete_document, (container, conflict_document, access_condition)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + delete_document_future = pool.apply_async( + self.try_update_or_delete_document, (container, conflict_document, access_condition) + ) delete_document_futures.append(delete_document_future) i += 1 @@ -339,7 +403,7 @@ def run_delete_conflict_on_LWW_async(self): if len(delete_documents) > 1: print("2) Caused %d delete conflicts, verifying conflict resolution" % len(delete_documents)) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate # Delete should always win. irrespective of UDP. self.validate_LWW_async(self.clients, delete_documents, True) break @@ -352,11 +416,13 @@ def run_insert_conflict_on_UDP_async(self): id = str(uuid.uuid4()) i = 0 - pool = ThreadPool(processes = len(self.clients)) + pool = ThreadPool(processes=len(self.clients)) insert_document_futures = [] for client in self.clients: - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - insert_document_future = pool.apply_async(self.try_insert_document, (client, self.udp_collection_name, conflict_document)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + insert_document_future = pool.apply_async( + self.try_insert_document, (client, self.udp_collection_name, conflict_document) + ) insert_document_futures.append(insert_document_future) i += 1 @@ -369,7 +435,7 @@ def run_insert_conflict_on_UDP_async(self): if len(inserted_documents) > 1: print("2) Caused %d insert conflicts, verifying conflict resolution" % len(inserted_documents)) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate self.validate_UDP_async(self.clients, inserted_documents, False) break else: @@ -378,21 +444,32 @@ def run_insert_conflict_on_UDP_async(self): def run_update_conflict_on_UDP_async(self): while True: id = str(uuid.uuid4()) - conflict_document_for_insertion = {'id': id, 'regionId': 0, 'regionEndpoint': self.clients[0].client_connection.ReadEndpoint} - conflict_document_for_insertion = self.try_insert_document(self.clients[0], self.udp_collection_name, conflict_document_for_insertion) - time.sleep(1) #1 Second for write to sync. - - print("1) Performing conflicting update across %d regions on %s" % (len(self.clients), self.udp_collection_link)) + conflict_document_for_insertion = { + "id": id, + "regionId": 0, + "regionEndpoint": self.clients[0].client_connection.ReadEndpoint, + } + conflict_document_for_insertion = self.try_insert_document( + self.clients[0], self.udp_collection_name, conflict_document_for_insertion + ) + time.sleep(1) # 1 Second for write to sync. + + print( + "1) Performing conflicting update across %d regions on %s" + % (len(self.clients), self.udp_collection_link) + ) i = 0 - access_condition = {'condition': 'IfMatch', 'type': conflict_document_for_insertion['_etag']} - pool = ThreadPool(processes = len(self.clients)) + access_condition = {"condition": "IfMatch", "type": conflict_document_for_insertion["_etag"]} + pool = ThreadPool(processes=len(self.clients)) update_document_futures = [] for client in self.clients: database = client.get_database_client(self.database_name) container = database.get_container_client(self.udp_collection_name) - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - update_document_future = pool.apply_async(self.try_update_document, (container, conflict_document, access_condition)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + update_document_future = pool.apply_async( + self.try_update_document, (container, conflict_document, access_condition) + ) update_document_futures.append(update_document_future) i += 1 @@ -405,7 +482,7 @@ def run_update_conflict_on_UDP_async(self): if len(update_documents) > 1: print("2) Caused %d update conflicts, verifying conflict resolution" % len(update_documents)) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate self.validate_UDP_async(self.clients, update_documents, False) break else: @@ -414,21 +491,29 @@ def run_update_conflict_on_UDP_async(self): def run_delete_conflict_on_UDP_async(self): while True: id = str(uuid.uuid4()) - conflict_document_for_insertion = {'id': id, 'regionId': 0, 'regionEndpoint': self.clients[0].client_connection.ReadEndpoint} - conflict_document_for_insertion = self.try_insert_document(self.clients[0], self.udp_collection_name, conflict_document_for_insertion) - time.sleep(1) #1 Second for write to sync. + conflict_document_for_insertion = { + "id": id, + "regionId": 0, + "regionEndpoint": self.clients[0].client_connection.ReadEndpoint, + } + conflict_document_for_insertion = self.try_insert_document( + self.clients[0], self.udp_collection_name, conflict_document_for_insertion + ) + time.sleep(1) # 1 Second for write to sync. print("1) Performing conflicting update/delete across 3 regions on %s" % self.udp_collection_link) i = 0 - access_condition = {'condition': 'IfMatch', 'type': conflict_document_for_insertion['_etag']} - pool = ThreadPool(processes = len(self.clients)) + access_condition = {"condition": "IfMatch", "type": conflict_document_for_insertion["_etag"]} + pool = ThreadPool(processes=len(self.clients)) delete_document_futures = [] for client in self.clients: database = client.get_database_client(self.database_name) container = database.get_container_client(self.udp_collection_name) - conflict_document = {'id': id, 'regionId': i, 'regionEndpoint': client.client_connection.ReadEndpoint} - delete_document_future = pool.apply_async(self.try_update_or_delete_document, (container, conflict_document, access_condition)) + conflict_document = {"id": id, "regionId": i, "regionEndpoint": client.client_connection.ReadEndpoint} + delete_document_future = pool.apply_async( + self.try_update_or_delete_document, (container, conflict_document, access_condition) + ) delete_document_futures.append(delete_document_future) i += 1 @@ -441,7 +526,7 @@ def run_delete_conflict_on_UDP_async(self): if len(delete_documents) > 1: print("2) Caused %d delete conflicts, verifying conflict resolution" % len(delete_documents)) - time.sleep(2) #allow conflicts resolution to propagate + time.sleep(2) # allow conflicts resolution to propagate # Delete should always win. irrespective of UDP. self.validate_UDP_async(self.clients, delete_documents, True) break @@ -459,22 +544,22 @@ def try_insert_document(self, client, collection_name, document): def try_update_document(self, container, document, access_condition): try: - return container.replace_item(document['id'], document, access_condition=access_condition) + return container.replace_item(document["id"], document, access_condition=access_condition) except (exceptions.CosmosResourceNotFoundError, exceptions.CosmosAccessConditionFailedError): # Lost synchronously or no document yet. No conflict is induced. return None def try_delete_document(self, container, document, access_condition): try: - container.delete_item(document['id'], document['id'], access_condition=access_condition) + container.delete_item(document["id"], document["id"], access_condition=access_condition) return document except (exceptions.CosmosResourceNotFoundError, exceptions.CosmosAccessConditionFailedError): - #Lost synchronously. No conflict is induced. + # Lost synchronously. No conflict is induced. return None def try_update_or_delete_document(self, container, conflict_document, access_condition): - if int(conflict_document['regionId']) % 2 == 1: - #We delete from region 1, even though region 2 always win. + if int(conflict_document["regionId"]) % 2 == 1: + # We delete from region 1, even though region 2 always win. return self.try_delete_document(container, conflict_document, access_condition) else: return self.try_update_document(container, conflict_document, access_condition) @@ -495,29 +580,36 @@ def validate_manual_conflict_async_internal(self, client, conflict_document): conflicts_iterator = iter(container.list_conflicts()) conflict = next(conflicts_iterator, None) while conflict: - if conflict['operationType'] != 'delete': - conflict_document_content = json.loads(conflict['content']) - - if conflict_document['id'] == conflict_document_content['id']: - if ((conflict_document['_rid'] == conflict_document_content['_rid']) and - (conflict_document['_etag'] == conflict_document_content['_etag'])): - print("Document from Region %d lost conflict @ %s" % - (int(conflict_document['regionId']), client.client_connection.ReadEndpoint)) + if conflict["operationType"] != "delete": + conflict_document_content = json.loads(conflict["content"]) + + if conflict_document["id"] == conflict_document_content["id"]: + if (conflict_document["_rid"] == conflict_document_content["_rid"]) and ( + conflict_document["_etag"] == conflict_document_content["_etag"] + ): + print( + "Document from Region %d lost conflict @ %s" + % (int(conflict_document["regionId"]), client.client_connection.ReadEndpoint) + ) return True else: - #Checking whether this is the winner. - winner_document = container.read_item(conflict_document['id'], conflict_document['id']) - print("Document from Region %d won the conflict @ %s" % - (int(winner_document['regionId']), client.client_connection.ReadEndpoint)) + # Checking whether this is the winner. + winner_document = container.read_item(conflict_document["id"], conflict_document["id"]) + print( + "Document from Region %d won the conflict @ %s" + % (int(winner_document["regionId"]), client.client_connection.ReadEndpoint) + ) return False else: - if conflict['resourceId'] == conflict_document['_rid']: + if conflict["resourceId"] == conflict_document["_rid"]: print("Delete conflict found @ %s" % client.client_connection.ReadEndpoint) return False conflict = next(conflicts_iterator, None) - self.trace_error("Document %s is not found in conflict feed @ %s, retrying" % - (conflict_document['id'], client.client_connection.ReadEndpoint)) + self.trace_error( + "Document %s is not found in conflict feed @ %s, retrying" + % (conflict_document["id"], client.client_connection.ReadEndpoint) + ) time.sleep(0.5) @@ -529,20 +621,23 @@ def delete_conflict_async(self, conflict_document): conflict = next(conflicts_iterator, None) while conflict: - conflict_content = json.loads(conflict['content']) - - if conflict['operationType'] != 'delete': - if ((conflict_content['_rid'] == conflict_document['_rid']) and - (conflict_content['_etag'] == conflict_document['_etag'])): - print("Deleting manual conflict %s from region %d" % - (conflict['resourceId'], - int(conflict_content['regionId']))) - container.delete_conflict(conflict['id'], conflict_content['id']) - elif conflict['resourceId'] == conflict_document['_rid']: - print("Deleting manual conflict %s from region %d" % - (conflict['resourceId'], - int(conflict_document['regionId']))) - container.delete_conflict(conflict['id'], conflict_content['id']) + conflict_content = json.loads(conflict["content"]) + + if conflict["operationType"] != "delete": + if (conflict_content["_rid"] == conflict_document["_rid"]) and ( + conflict_content["_etag"] == conflict_document["_etag"] + ): + print( + "Deleting manual conflict %s from region %d" + % (conflict["resourceId"], int(conflict_content["regionId"])) + ) + container.delete_conflict(conflict["id"], conflict_content["id"]) + elif conflict["resourceId"] == conflict_document["_rid"]: + print( + "Deleting manual conflict %s from region %d" + % (conflict["resourceId"], int(conflict_document["regionId"])) + ) + container.delete_conflict(conflict["id"], conflict_content["id"]) conflict = next(conflicts_iterator, None) def validate_LWW_async(self, clients, conflict_document, has_delete_conflict): @@ -567,47 +662,57 @@ def validate_LWW_async_internal(self, client, conflict_document, has_delete_conf if has_delete_conflict: while True: try: - container.read_item(conflict_document[0]['id'], conflict_document[0]['id']) - self.trace_error("Delete conflict for document %s didn't win @ %s" % - (conflict_document[0]['id'], client.client_connection.ReadEndpoint)) + container.read_item(conflict_document[0]["id"], conflict_document[0]["id"]) + self.trace_error( + "Delete conflict for document %s didn't win @ %s" + % (conflict_document[0]["id"], client.client_connection.ReadEndpoint) + ) time.sleep(0.5) except exceptions.CosmosResourceNotFoundError: print("Delete conflict won @ %s" % client.client_connection.ReadEndpoint) return except exceptions.CosmosHttpResponseError: - self.trace_error("Delete conflict for document %s didn't win @ %s" % - (conflict_document[0]['id'], client.client_connection.ReadEndpoint)) + self.trace_error( + "Delete conflict for document %s didn't win @ %s" + % (conflict_document[0]["id"], client.client_connection.ReadEndpoint) + ) time.sleep(0.5) winner_document: Optional[Dict[str, Any]] = None for document in conflict_document: - if winner_document is None or int(winner_document['regionId']) <= int(document['regionId']): + if winner_document is None or int(winner_document["regionId"]) <= int(document["regionId"]): winner_document = document if winner_document is None: print("Winner document not found.") return - print("Document from region %d should be the winner" % int(winner_document['regionId'])) + print("Document from region %d should be the winner" % int(winner_document["regionId"])) while True: try: - existing_document = container.read_item(winner_document['id'], winner_document['id']) + existing_document = container.read_item(winner_document["id"], winner_document["id"]) - if int(existing_document['regionId']) == int(winner_document['regionId']): - print("Winner document from region %d found at %s" % - (int(existing_document['regionId']), client.client_connection.ReadEndpoint)) + if int(existing_document["regionId"]) == int(winner_document["regionId"]): + print( + "Winner document from region %d found at %s" + % (int(existing_document["regionId"]), client.client_connection.ReadEndpoint) + ) break else: - self.trace_error("Winning document version from region %d is not found @ %s, retrying..." % - (int(winner_document["regionId"]), client.client_connection.WriteEndpoint)) + self.trace_error( + "Winning document version from region %d is not found @ %s, retrying..." + % (int(winner_document["regionId"]), client.client_connection.WriteEndpoint) + ) time.sleep(0.5) except exceptions.AzureError as e: - self.trace_error("Winner document from region %d is not found @ %s, retrying..." % - (int(winner_document["regionId"]), client.client_connection.WriteEndpoint)) + self.trace_error( + "Winner document from region %d is not found @ %s, retrying..." + % (int(winner_document["regionId"]), client.client_connection.WriteEndpoint) + ) time.sleep(0.5) @@ -633,48 +738,58 @@ def validate_UDP_async_internal(self, client, conflict_document, has_delete_conf if has_delete_conflict: while True: try: - container.read_item(conflict_document[0]['id'], conflict_document[0]['id']) + container.read_item(conflict_document[0]["id"], conflict_document[0]["id"]) - self.trace_error("Delete conflict for document %s didn't win @ %s" % - (conflict_document[0]['id'], client.client_connection.ReadEndpoint)) + self.trace_error( + "Delete conflict for document %s didn't win @ %s" + % (conflict_document[0]["id"], client.client_connection.ReadEndpoint) + ) time.sleep(0.5) except exceptions.CosmosResourceNotFoundError: print("Delete conflict won @ %s" % client.client_connection.ReadEndpoint) return except exceptions.CosmosHttpResponseError: - self.trace_error("Delete conflict for document %s didn't win @ %s" % - (conflict_document[0]['id'], client.client_connection.ReadEndpoint)) + self.trace_error( + "Delete conflict for document %s didn't win @ %s" + % (conflict_document[0]["id"], client.client_connection.ReadEndpoint) + ) time.sleep(0.5) winner_document: Optional[Dict[str, Any]] = None for document in conflict_document: - if winner_document is None or int(winner_document['regionId']) <= int(document['regionId']): + if winner_document is None or int(winner_document["regionId"]) <= int(document["regionId"]): winner_document = document if winner_document is None: print("Winner document not found.") return - print("Document from region %d should be the winner" % int(winner_document['regionId'])) + print("Document from region %d should be the winner" % int(winner_document["regionId"])) while True: try: - existing_document = container.read_item(winner_document['id'], winner_document['id']) + existing_document = container.read_item(winner_document["id"], winner_document["id"]) - if int(existing_document['regionId']) == int(winner_document['regionId']): - print("Winner document from region %d found at %s" % - (int(existing_document["regionId"]), client.client_connection.ReadEndpoint)) + if int(existing_document["regionId"]) == int(winner_document["regionId"]): + print( + "Winner document from region %d found at %s" + % (int(existing_document["regionId"]), client.client_connection.ReadEndpoint) + ) break else: - self.trace_error("Winning document version from region %d is not found @ %s, retrying..." % - (int(winner_document['regionId']), client.client_connection.WriteEndpoint)) + self.trace_error( + "Winning document version from region %d is not found @ %s, retrying..." + % (int(winner_document["regionId"]), client.client_connection.WriteEndpoint) + ) time.sleep(0.5) except exceptions.AzureError: - self.trace_error("Winner document from region %d is not found @ %s, retrying..." % - (int(winner_document['regionId']), client.client_connection.WriteEndpoint)) + self.trace_error( + "Winner document from region %d is not found @ %s, retrying..." + % (int(winner_document["regionId"]), client.client_connection.WriteEndpoint) + ) time.sleep(0.5) def trace_error(self, message): - print('\n' + message + '\n') + print("\n" + message + "\n") diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py index 1016997e99c7..83c8199108a5 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/MultiMasterScenario.py @@ -5,12 +5,13 @@ import azure.cosmos.documents as documents from azure.cosmos import CosmosClient + class MultiMasterScenario(object): def __init__(self): self.account_endpoint = Configurations.ENDPOINT self.account_key = Configurations.ACCOUNT_KEY - self.regions = Configurations.REGIONS.split(';') + self.regions = Configurations.REGIONS.split(";") self.database_name = Configurations.DATABASE_NAME self.manual_collection_name = Configurations.MANUAL_COLLECTION_NAME @@ -19,8 +20,14 @@ def __init__(self): self.basic_collection_name = Configurations.BASIC_COLLECTION_NAME self.workers = [] - self.conflict_worker = ConflictWorker(self.database_name, self.basic_collection_name, self.manual_collection_name, self.lww_collection_name, self.udp_collection_name) - self.pool = ThreadPool(processes = len(self.regions)) + self.conflict_worker = ConflictWorker( + self.database_name, + self.basic_collection_name, + self.manual_collection_name, + self.lww_collection_name, + self.udp_collection_name, + ) + self.pool = ThreadPool(processes=len(self.regions)) for region in self.regions: connection_policy = documents.ConnectionPolicy() @@ -31,7 +38,8 @@ def __init__(self): url=self.account_endpoint, credential=self.account_key, consistency_level=documents.ConsistencyLevel.Session, - connection_policy=connection_policy) + connection_policy=connection_policy, + ) self.workers.append(Worker(client, self.database_name, self.basic_collection_name)) diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Program.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Program.py index f87bc867d6dd..3b971991a085 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Program.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Program.py @@ -1,6 +1,6 @@ from MultiMasterScenario import MultiMasterScenario -if __name__ == '__main__': +if __name__ == "__main__": print("Multimaster demo started!") scenario = MultiMasterScenario() scenario.initialize_async() diff --git a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Worker.py b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Worker.py index 782ec38cda47..3d67a7137ce8 100644 --- a/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Worker.py +++ b/sdk/cosmos/azure-cosmos/samples/MultiMasterOperations/Worker.py @@ -3,6 +3,7 @@ import azure.cosmos.exceptions as exceptions from azure.cosmos.http_constants import StatusCodes + class Worker(object): def __init__(self, client, database_name, collection_name): self.client = client @@ -15,7 +16,7 @@ def run_loop_async(self, documents_to_insert): latency = [] while iteration_count < documents_to_insert: - document = {'id': str(uuid.uuid4())} + document = {"id": str(uuid.uuid4())} iteration_count += 1 start = int(round(time.time() * 1000)) @@ -27,10 +28,10 @@ def run_loop_async(self, documents_to_insert): latency = sorted(latency) p50_index = int(len(latency) / 2) - print("Inserted %d documents at %s with p50 %d ms" % - (documents_to_insert, - self.client.client_connection.WriteEndpoint, - latency[p50_index])) + print( + "Inserted %d documents at %s with p50 %d ms" + % (documents_to_insert, self.client.client_connection.WriteEndpoint, latency[p50_index]) + ) def read_all_async(self, expected_number_of_documents): while True: @@ -45,17 +46,16 @@ def read_all_async(self, expected_number_of_documents): doc = next(it, None) if total_item_read < expected_number_of_documents: - print("Total item read %d from %s is less than %d, retrying reads" % - (total_item_read, - self.client.client_connection.WriteEndpoint, - expected_number_of_documents)) + print( + "Total item read %d from %s is less than %d, retrying reads" + % (total_item_read, self.client.client_connection.WriteEndpoint, expected_number_of_documents) + ) time.sleep(1) continue else: print("Read %d items from %s" % (total_item_read, self.client.client_connection.ReadEndpoint)) break - def delete_all_async(self): query_iterable = self.document_collection.read_all_items() it = iter(query_iterable) @@ -63,11 +63,11 @@ def delete_all_async(self): doc = next(it, None) while doc: try: - self.document_collection.delete_item(item=doc['id'], partition_key=doc['id']) + self.document_collection.delete_item(item=doc["id"], partition_key=doc["id"]) except exceptions.CosmosResourceNotFoundError: raise except exceptions.CosmosHttpResponseError as e: print("Error occurred while deleting document from %s" % self.client.client_connection.WriteEndpoint) doc = next(it, None) - print("Deleted all documents from region %s" % self.client.client_connection.WriteEndpoint) \ No newline at end of file + print("Deleted all documents from region %s" % self.client.client_connection.WriteEndpoint) diff --git a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad.py b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad.py index ebe1535876c4..9ede83dbae6e 100644 --- a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad.py +++ b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad.py @@ -40,11 +40,7 @@ def get_test_item(num): - test_item = { - 'id': 'Item_' + str(num), - 'test_object': True, - 'lastName': 'Smith' - } + test_item = {"id": "Item_" + str(num), "test_object": True, "lastName": "Smith"} return test_item @@ -68,9 +64,8 @@ def run_sample(): # With this done, you can use your AAD service principal id and secret to create your ClientSecretCredential. aad_client_secret_credentials = ClientSecretCredential( - tenant_id=TENANT_ID, - client_id=CLIENT_ID, - client_secret=CLIENT_SECRET) + tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET + ) # You can also utilize DefaultAzureCredential rather than directly passing in the id's and secrets. # This is the recommended method of authentication, and uses environment variables rather than in-code strings. @@ -85,11 +80,11 @@ def run_sample(): print("Container info: " + str(container.read())) container.create_item(get_test_item(0)) - print("Point read result: " + str(container.read_item(item='Item_0', partition_key='Item_0'))) - query_results = list(container.query_items(query='select * from c', partition_key='Item_0')) + print("Point read result: " + str(container.read_item(item="Item_0", partition_key="Item_0"))) + query_results = list(container.query_items(query="select * from c", partition_key="Item_0")) assert len(query_results) == 1 print("Query result: " + str(query_results[0])) - container.delete_item(item='Item_0', partition_key='Item_0') + container.delete_item(item="Item_0", partition_key="Item_0") # Attempting to do management operations will return a 403 Forbidden exception. try: diff --git a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad_async.py b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad_async.py index 564137a062e2..94988201d08d 100644 --- a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad_async.py +++ b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad_async.py @@ -41,11 +41,7 @@ def get_test_item(num): - test_item = { - 'id': 'Item_' + str(num), - 'test_object': True, - 'lastName': 'Smith' - } + test_item = {"id": "Item_" + str(num), "test_object": True, "lastName": "Smith"} return test_item @@ -71,9 +67,8 @@ async def run_sample(): # The async ClientSecretCredentials, like the async client, also have a context manager, # and as such should be used with the `async with` keywords. async with ClientSecretCredential( - tenant_id=TENANT_ID, - client_id=CLIENT_ID, - client_secret=CLIENT_SECRET) as aad_credentials: + tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET + ) as aad_credentials: # Use your credentials to authenticate your client. async with CosmosClient(HOST, aad_credentials) as aad_client: @@ -92,12 +87,13 @@ async def run_sample(): print("Container info: " + str(container.read())) await container.create_item(get_test_item(879)) - print("Point read result: " + str(container.read_item(item='Item_0', partition_key='Item_0'))) - query_results = [item async for item in - container.query_items(query='select * from c', partition_key='Item_0')] + print("Point read result: " + str(container.read_item(item="Item_0", partition_key="Item_0"))) + query_results = [ + item async for item in container.query_items(query="select * from c", partition_key="Item_0") + ] assert len(query_results) == 1 print("Query result: " + str(query_results[0])) - await container.delete_item(item='Item_0', partition_key='Item_0') + await container.delete_item(item="Item_0", partition_key="Item_0") # Attempting to do management operations will return a 403 Forbidden exception. try: diff --git a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token.py b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token.py index bf253eacc26d..34d26ed361c7 100644 --- a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token.py +++ b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token.py @@ -30,8 +30,8 @@ # Each time a Container is created the account will be billed for 1 hour of usage based on # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -# Adding region name to use the code sample in docs -# +# Adding region name to use the code sample in docs +# HOST = config.settings["host"] MASTER_KEY = config.settings["master_key"] @@ -123,8 +123,7 @@ def token_client_query(container, username): def run_sample(): client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) -# - + # try: try: @@ -133,9 +132,7 @@ def run_sample(): db = client.get_database_client(DATABASE_ID) try: - container = db.create_container( - id=CONTAINER_ID, partition_key=PARTITION_KEY - ) + container = db.create_container(id=CONTAINER_ID, partition_key=PARTITION_KEY) except exceptions.CosmosResourceExistsError: container = db.get_container_client(CONTAINER_ID) @@ -206,13 +203,13 @@ def run_sample(): item_3 = token_container.read_item(item=ITEM_3_ID, partition_key=USERNAME_2) permission_list = list(user_2.list_permissions()) for p in permission_list: - user_2.delete_permission(p.get('id')) + user_2.delete_permission(p.get("id")) assert len(list(user_2.list_permissions())) == 0 permission_definition = { "id": DOCUMENT_ALL_PERMISSION, "permissionMode": documents.PermissionMode.All, - "resource": str(item_3.get('_self')) #this identifies the item with id "3" + "resource": str(item_3.get("_self")), # this identifies the item with id "3" } permission = create_permission_if_not_exists(user_2, permission_definition) diff --git a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token_async.py b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token_async.py index 2c7c38c3319b..8723151c7bcf 100644 --- a/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token_async.py +++ b/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token_async.py @@ -128,9 +128,7 @@ async def run_sample(): db = client.get_database_client(DATABASE_ID) try: - container = await db.create_container( - id=CONTAINER_ID, partition_key=PARTITION_KEY - ) + container = await db.create_container(id=CONTAINER_ID, partition_key=PARTITION_KEY) except exceptions.CosmosResourceExistsError: container = db.get_container_client(CONTAINER_ID) @@ -207,14 +205,14 @@ async def run_sample(): item_3 = await token_container.read_item(item=ITEM_3_ID, partition_key=USERNAME_2) permission_list = user_2.list_permissions() async for p in permission_list: - await user_2.delete_permission(p.get('id')) + await user_2.delete_permission(p.get("id")) user_2_permissions = [permission async for permission in user_2.list_permissions()] assert len(user_2_permissions) == 0 permission_definition = { "id": DOCUMENT_ALL_PERMISSION, "permissionMode": documents.PermissionMode.All, - "resource": str(item_3.get('_self')) #this identifies the item with id "3" + "resource": str(item_3.get("_self")), # this identifies the item with id "3" } permission = await create_permission_if_not_exists(user_2, permission_definition) @@ -242,7 +240,7 @@ async def run_sample(): # Cleaning up and closing current token client await token_client.delete_database(DATABASE_ID) - await token_client.close() + await token_client.close() except exceptions.CosmosHttpResponseError as e: print("\nrun_sample has caught an error. {0}".format(e.message)) diff --git a/sdk/cosmos/azure-cosmos/samples/access_fabric_with_overridenscope_aad.py b/sdk/cosmos/azure-cosmos/samples/access_fabric_with_overridenscope_aad.py index 1a5919b43b71..eb06551a3920 100644 --- a/sdk/cosmos/azure-cosmos/samples/access_fabric_with_overridenscope_aad.py +++ b/sdk/cosmos/azure-cosmos/samples/access_fabric_with_overridenscope_aad.py @@ -36,19 +36,20 @@ CONTAINER_ID = config.settings["container_id"] PARTITION_KEY = PartitionKey(path="/pk") + def get_test_item(num: int) -> dict: return { "id": f"Item_{num}", "pk": "partition1", "name": "Item 1", "description": "This is item 1", - "runId": str(uuid.uuid4()) + "runId": str(uuid.uuid4()), } def run_sample(): # if you want to override scope for AAD authentication. - #os.environ["AZURE_COSMOS_AAD_SCOPE_OVERRIDE"] = "https://cosmos.azure.com/.default" + # os.environ["AZURE_COSMOS_AAD_SCOPE_OVERRIDE"] = "https://cosmos.azure.com/.default" # AAD auth works with az login aad_credentials = InteractiveBrowserCredential() @@ -90,4 +91,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management.py b/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management.py index 99879d345b66..b631bf26c9c4 100644 --- a/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management.py +++ b/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management.py @@ -51,10 +51,10 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] def create_database_with_autoscale(client, database_id): @@ -62,35 +62,32 @@ def create_database_with_autoscale(client, database_id): Create a database with autoscale throughput. Setting throughput settings, like autoscale, on a database level is *not* recommended, and should only be done if you are aware of the implications of shared throughput across containers. - + Autoscale throughput automatically scales between 10% and 100% of the maximum throughput based on your workload demands. - + Args: client: CosmosClient instance database_id: ID for the database """ print("\nCreate Database with Autoscale Throughput") print("=" * 70) - + try: # Create database with autoscale - max throughput of 4000 RU/s # The database will scale between 400 RU/s (10%) and 4000 RU/s (100%) database = client.create_database( id=database_id, - offer_throughput=ThroughputProperties( - auto_scale_max_throughput=4000, - auto_scale_increment_percent=0 - ) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=4000, auto_scale_increment_percent=0), ) - + print(f"Database '{database_id}' created with autoscale") print(f" - Maximum throughput: 4000 RU/s") print(f" - Minimum throughput: 400 RU/s (10% of max)") print(f" - Auto-scales based on usage between min and max") - + return database - + except exceptions.CosmosResourceExistsError: print(f"Database '{database_id}' already exists") return client.get_database_client(database_id) @@ -99,36 +96,33 @@ def create_database_with_autoscale(client, database_id): def create_container_with_autoscale(database, container_id): """ Create a container with autoscale throughput. - + Container-level autoscale provides dedicated throughput for a specific container, independent of the database throughput. - + Args: database: DatabaseProxy instance container_id: ID for the container """ print("\nCreate Container with Autoscale Throughput") print("=" * 70) - + try: # Create container with autoscale - max throughput of 5000 RU/s # auto_scale_increment_percent=0 means default scaling behavior container = database.create_container( id=container_id, - partition_key=PartitionKey(path='/id'), - offer_throughput=ThroughputProperties( - auto_scale_max_throughput=5000, - auto_scale_increment_percent=0 - ) + partition_key=PartitionKey(path="/id"), + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), ) - + print(f"Container '{container_id}' created with autoscale") print(f" - Maximum throughput: 5000 RU/s") print(f" - Minimum throughput: 500 RU/s (10% of max)") print(f" - Scales automatically based on workload") - + return container - + except exceptions.CosmosResourceExistsError: print(f"Container '{container_id}' already exists") return database.get_container_client(container_id) @@ -137,55 +131,57 @@ def create_container_with_autoscale(database, container_id): def read_autoscale_throughput(database, container): """ Read and display autoscale throughput settings for database and container. - + The throughput properties reveal: - Whether autoscale is enabled - Maximum throughput setting - Current throughput (if available) - + Args: database: DatabaseProxy instance container: ContainerProxy instance """ print("\nRead Autoscale Throughput Settings") print("=" * 70) - + try: # Read database throughput db_offer = database.get_throughput() print(f"\nDatabase '{database.id}' throughput:") - - autopilot_settings = db_offer.properties.get('content', {}).get('offerAutopilotSettings') + + autopilot_settings = db_offer.properties.get("content", {}).get("offerAutopilotSettings") if autopilot_settings: - max_throughput = autopilot_settings.get('maxThroughput') + max_throughput = autopilot_settings.get("maxThroughput") print(f" - Autoscale enabled: Yes") print(f" - Maximum throughput: {max_throughput} RU/s") print(f" - Minimum throughput: {max_throughput // 10} RU/s") - print(f" - Increment percent: {autopilot_settings.get('autoUpgradePolicy', {}).get('throughputPolicy', {}).get('incrementPercent', 0)}") + print( + f" - Increment percent: {autopilot_settings.get('autoUpgradePolicy', {}).get('throughputPolicy', {}).get('incrementPercent', 0)}" + ) else: - throughput = db_offer.properties.get('content', {}).get('offerThroughput') + throughput = db_offer.properties.get("content", {}).get("offerThroughput") print(f" - Autoscale enabled: No") print(f" - Manual throughput: {throughput} RU/s") - + except exceptions.CosmosHttpResponseError as e: print(f"Database throughput error: {e.message}") - + try: # Read container throughput container_offer = container.get_throughput() print(f"\nContainer '{container.id}' throughput:") - - autopilot_settings = container_offer.properties.get('content', {}).get('offerAutopilotSettings') + + autopilot_settings = container_offer.properties.get("content", {}).get("offerAutopilotSettings") if autopilot_settings: - max_throughput = autopilot_settings.get('maxThroughput') + max_throughput = autopilot_settings.get("maxThroughput") print(f" - Autoscale enabled: Yes") print(f" - Maximum throughput: {max_throughput} RU/s") print(f" - Minimum throughput: {max_throughput // 10} RU/s") else: - throughput = container_offer.properties.get('content', {}).get('offerThroughput') + throughput = container_offer.properties.get("content", {}).get("offerThroughput") print(f" - Autoscale enabled: No") print(f" - Manual throughput: {throughput} RU/s") - + except exceptions.CosmosHttpResponseError as e: print(f"Container throughput error: {e.message}") @@ -193,84 +189,84 @@ def read_autoscale_throughput(database, container): def update_autoscale_max_throughput(container, new_max_throughput): """ Update the maximum throughput for an autoscale-enabled container. - + This changes the upper limit of the autoscale range. The minimum throughput will automatically adjust to 10% of the new maximum. - + Args: container: ContainerProxy instance new_max_throughput: New maximum throughput in RU/s """ print("\nUpdate Autoscale Maximum Throughput") print("=" * 70) - + try: # Update autoscale max throughput new_throughput = ThroughputProperties( - auto_scale_max_throughput=new_max_throughput, - auto_scale_increment_percent=0 + auto_scale_max_throughput=new_max_throughput, auto_scale_increment_percent=0 ) - + updated_offer = container.replace_throughput(new_throughput) - - autopilot_settings = updated_offer.properties.get('content', {}).get('offerAutopilotSettings') + + autopilot_settings = updated_offer.properties.get("content", {}).get("offerAutopilotSettings") if autopilot_settings: - max_throughput = autopilot_settings.get('maxThroughput') + max_throughput = autopilot_settings.get("maxThroughput") print(f"Container '{container.id}' autoscale updated:") print(f" - New maximum throughput: {max_throughput} RU/s") print(f" - New minimum throughput: {max_throughput // 10} RU/s") print(f" - Autoscale will now scale within this new range") else: print(f"Warning: Updated offer does not contain autoscale settings") - + except exceptions.CosmosHttpResponseError as e: print(f"Error updating autoscale throughput: {e.message}") + def run_sample(): """ Run the autoscale throughput management sample. """ - print('=' * 70) - print('Azure Cosmos DB - Autoscale Throughput Management Sample') - print('=' * 70) - + print("=" * 70) + print("Azure Cosmos DB - Autoscale Throughput Management Sample") + print("=" * 70) + # Initialize client - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY}) - + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) + try: # 1. Create database with autoscale - database = create_database_with_autoscale(client, DATABASE_ID + '_autoscale') - + database = create_database_with_autoscale(client, DATABASE_ID + "_autoscale") + # 2. Create container with autoscale - container = create_container_with_autoscale(database, CONTAINER_ID + '_autoscale') - + container = create_container_with_autoscale(database, CONTAINER_ID + "_autoscale") + # 3. Read autoscale settings read_autoscale_throughput(database, container) - + # 4. Update autoscale max throughput update_autoscale_max_throughput(container, 6000) - + # 5. Read updated settings read_autoscale_throughput(database, container) - + # Cleanup print("\n" + "=" * 70) print("Cleaning up resources...") print("=" * 70) - + database.delete_container(container.id) print(f"Deleted container: {container.id}") - + client.delete_database(database.id) print(f"Deleted database: {database.id}") - + except exceptions.CosmosHttpResponseError as e: print(f"\nError: {e.message}") - - print('\n' + '=' * 70) - print('Sample completed!') - print('=' * 70) + + print("\n" + "=" * 70) + print("Sample completed!") + print("=" * 70) -if __name__ == '__main__': +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py b/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py index 356cad6aa44f..16d03204bafe 100644 --- a/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py @@ -52,10 +52,10 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] async def create_database_with_autoscale(client, database_id): @@ -66,32 +66,29 @@ async def create_database_with_autoscale(client, database_id): Autoscale throughput automatically scales between 10% and 100% of the maximum throughput based on your workload demands. - + Args: client: CosmosClient instance database_id: ID for the database """ print("\nCreate Database with Autoscale Throughput (Async)") print("=" * 70) - + try: # Create database with autoscale - max throughput of 4000 RU/s # The database will scale between 400 RU/s (10%) and 4000 RU/s (100%) database = await client.create_database( id=database_id, - offer_throughput=ThroughputProperties( - auto_scale_max_throughput=4000, - auto_scale_increment_percent=0 - ) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=4000, auto_scale_increment_percent=0), ) - + print(f"Database '{database_id}' created with autoscale") print(f" - Maximum throughput: 4000 RU/s") print(f" - Minimum throughput: 400 RU/s (10% of max)") print(f" - Auto-scales based on usage between min and max") - + return database - + except exceptions.CosmosResourceExistsError: print(f"Database '{database_id}' already exists") return client.get_database_client(database_id) @@ -100,36 +97,33 @@ async def create_database_with_autoscale(client, database_id): async def create_container_with_autoscale(database, container_id): """ Create a container with autoscale throughput asynchronously. - + Container-level autoscale provides dedicated throughput for a specific container, independent of the database throughput. - + Args: database: DatabaseProxy instance container_id: ID for the container """ print("\nCreate Container with Autoscale Throughput (Async)") print("=" * 70) - + try: # Create container with autoscale - max throughput of 5000 RU/s # auto_scale_increment_percent=0 means default scaling behavior container = await database.create_container( id=container_id, - partition_key=PartitionKey(path='/id'), - offer_throughput=ThroughputProperties( - auto_scale_max_throughput=5000, - auto_scale_increment_percent=0 - ) + partition_key=PartitionKey(path="/id"), + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), ) - + print(f"Container '{container_id}' created with autoscale") print(f" - Maximum throughput: 5000 RU/s") print(f" - Minimum throughput: 500 RU/s (10% of max)") print(f" - Scales automatically based on workload") - + return container - + except exceptions.CosmosResourceExistsError: print(f"Container '{container_id}' already exists") return database.get_container_client(container_id) @@ -138,55 +132,57 @@ async def create_container_with_autoscale(database, container_id): async def read_autoscale_throughput(database, container): """ Read and display autoscale throughput settings for database and container asynchronously. - + The throughput properties reveal: - Whether autoscale is enabled - Maximum throughput setting - Current throughput (if available) - + Args: database: DatabaseProxy instance container: ContainerProxy instance """ print("\nRead Autoscale Throughput Settings (Async)") print("=" * 70) - + try: # Read database throughput db_offer = await database.get_throughput() print(f"\nDatabase '{database.id}' throughput:") - - autopilot_settings = db_offer.properties.get('content', {}).get('offerAutopilotSettings') + + autopilot_settings = db_offer.properties.get("content", {}).get("offerAutopilotSettings") if autopilot_settings: - max_throughput = autopilot_settings.get('maxThroughput') + max_throughput = autopilot_settings.get("maxThroughput") print(f" - Autoscale enabled: Yes") print(f" - Maximum throughput: {max_throughput} RU/s") print(f" - Minimum throughput: {max_throughput // 10} RU/s") - print(f" - Increment percent: {autopilot_settings.get('autoUpgradePolicy', {}).get('throughputPolicy', {}).get('incrementPercent', 0)}") + print( + f" - Increment percent: {autopilot_settings.get('autoUpgradePolicy', {}).get('throughputPolicy', {}).get('incrementPercent', 0)}" + ) else: - throughput = db_offer.properties.get('content', {}).get('offerThroughput') + throughput = db_offer.properties.get("content", {}).get("offerThroughput") print(f" - Autoscale enabled: No") print(f" - Manual throughput: {throughput} RU/s") - + except exceptions.CosmosHttpResponseError as e: print(f"Database throughput error: {e.message}") - + try: # Read container throughput container_offer = await container.get_throughput() print(f"\nContainer '{container.id}' throughput:") - - autopilot_settings = container_offer.properties.get('content', {}).get('offerAutopilotSettings') + + autopilot_settings = container_offer.properties.get("content", {}).get("offerAutopilotSettings") if autopilot_settings: - max_throughput = autopilot_settings.get('maxThroughput') + max_throughput = autopilot_settings.get("maxThroughput") print(f" - Autoscale enabled: Yes") print(f" - Maximum throughput: {max_throughput} RU/s") print(f" - Minimum throughput: {max_throughput // 10} RU/s") else: - throughput = container_offer.properties.get('content', {}).get('offerThroughput') + throughput = container_offer.properties.get("content", {}).get("offerThroughput") print(f" - Autoscale enabled: No") print(f" - Manual throughput: {throughput} RU/s") - + except exceptions.CosmosHttpResponseError as e: print(f"Container throughput error: {e.message}") @@ -194,62 +190,62 @@ async def read_autoscale_throughput(database, container): async def update_autoscale_max_throughput(container, new_max_throughput): """ Update the maximum throughput for an autoscale-enabled container asynchronously. - + This changes the upper limit of the autoscale range. The minimum throughput will automatically adjust to 10% of the new maximum. - + Args: container: ContainerProxy instance new_max_throughput: New maximum throughput in RU/s """ print("\nUpdate Autoscale Maximum Throughput (Async)") print("=" * 70) - + try: # Update autoscale max throughput new_throughput = ThroughputProperties( - auto_scale_max_throughput=new_max_throughput, - auto_scale_increment_percent=0 + auto_scale_max_throughput=new_max_throughput, auto_scale_increment_percent=0 ) - + updated_offer = await container.replace_throughput(new_throughput) - - autopilot_settings = updated_offer.properties.get('content', {}).get('offerAutopilotSettings') + + autopilot_settings = updated_offer.properties.get("content", {}).get("offerAutopilotSettings") if autopilot_settings: - max_throughput = autopilot_settings.get('maxThroughput') + max_throughput = autopilot_settings.get("maxThroughput") print(f"Container '{container.id}' autoscale updated:") print(f" - New maximum throughput: {max_throughput} RU/s") print(f" - New minimum throughput: {max_throughput // 10} RU/s") print(f" - Autoscale will now scale within this new range") else: print(f"Warning: Updated offer does not contain autoscale settings") - + except exceptions.CosmosHttpResponseError as e: print(f"Error updating autoscale throughput: {e.message}") + async def run_sample(): """ Run the async autoscale throughput management sample. """ - print('=' * 70) - print('Azure Cosmos DB - Async Autoscale Throughput Management Sample') - print('=' * 70) - + print("=" * 70) + print("Azure Cosmos DB - Async Autoscale Throughput Management Sample") + print("=" * 70) + # Initialize async client - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: try: # 1. Create database with autoscale - database = await create_database_with_autoscale(client, DATABASE_ID + '_autoscale_async') - + database = await create_database_with_autoscale(client, DATABASE_ID + "_autoscale_async") + # 2. Create container with autoscale - container = await create_container_with_autoscale(database, CONTAINER_ID + '_autoscale_async') - + container = await create_container_with_autoscale(database, CONTAINER_ID + "_autoscale_async") + # 3. Read autoscale settings await read_autoscale_throughput(database, container) - + # 4. Update autoscale max throughput await update_autoscale_max_throughput(container, 6000) - + # 5. Read updated settings await read_autoscale_throughput(database, container) @@ -257,20 +253,20 @@ async def run_sample(): print("\n" + "=" * 70) print("Cleaning up resources...") print("=" * 70) - + await database.delete_container(container.id) print(f"Deleted container: {container.id}") - + await client.delete_database(database.id) print(f"Deleted database: {database.id}") - + except exceptions.CosmosHttpResponseError as e: print(f"\nError: {e.message}") - - print('\n' + '=' * 70) - print('Sample completed!') - print('=' * 70) + + print("\n" + "=" * 70) + print("Sample completed!") + print("=" * 70) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/change_feed_management.py b/sdk/cosmos/azure-cosmos/samples/change_feed_management.py index fdefe563d0e3..2cf2c8ccffb3 100644 --- a/sdk/cosmos/azure-cosmos/samples/change_feed_management.py +++ b/sdk/cosmos/azure-cosmos/samples/change_feed_management.py @@ -25,10 +25,10 @@ # Sample - demonstrates how to consume the Change Feed and iterate on the results. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] def create_items(container, size, partition_key_value): @@ -36,46 +36,51 @@ def create_items(container, size, partition_key_value): for i in range(size): c = str(uuid.uuid4()) - item_definition = {'id': 'item' + c, - 'address': {'street': '1 Microsoft Way' + c, - 'city': 'Redmond' + c, - 'state': partition_key_value, - 'zip code': 98052 - } - } + item_definition = { + "id": "item" + c, + "address": { + "street": "1 Microsoft Way" + c, + "city": "Redmond" + c, + "state": partition_key_value, + "zip code": 98052, + }, + } created_item = container.create_item(body=item_definition) + def clean_up(container): - print('\nClean up the container\n') + print("\nClean up the container\n") - for item in container.query_items(query='SELECT * FROM c', enable_cross_partition_query=True): + for item in container.query_items(query="SELECT * FROM c", enable_cross_partition_query=True): # Deleting the current item - container.delete_item(item, partition_key=item['address']['state']) + container.delete_item(item, partition_key=item["address"]["state"]) + def read_change_feed(container): - print('\nReading Change Feed from the beginning\n') + print("\nReading Change Feed from the beginning\n") # For a particular Partition Key Range we can use partition_key_range_id] # 'is_start_from_beginning = True' will read from the beginning of the history of the container # If no is_start_from_beginning is specified, the read change feed loop will pickup the items that happen while the loop / process is active - create_items(container, 10, 'WA') + create_items(container, 10, "WA") response_iterator = container.query_items_change_feed(is_start_from_beginning=True) for doc in response_iterator: print(doc) + def read_change_feed_with_start_time(container): - print('\nReading Change Feed from the start time\n') + print("\nReading Change Feed from the start time\n") # You can read change feed from a specific time. # You must pass in a datetime object for the start_time field. # Create items - create_items(container, 10, 'WA') + create_items(container, 10, "WA") start_time = datetime.now(timezone.utc) - time = start_time.strftime('%a, %d %b %Y %H:%M:%S GMT') - print('\nReading Change Feed from start time of {}\n'.format(time)) - create_items(container, 5, 'CA') - create_items(container, 5, 'OR') + time = start_time.strftime("%a, %d %b %Y %H:%M:%S GMT") + print("\nReading Change Feed from start time of {}\n".format(time)) + create_items(container, 5, "CA") + create_items(container, 5, "OR") # Read change feed from the beginning response_iterator = container.query_items_change_feed(start_time="Beginning") @@ -87,12 +92,13 @@ def read_change_feed_with_start_time(container): for doc in response_iterator: print(doc) + def read_change_feed_with_partition_key(container): - print('\nReading Change Feed from the beginning of the partition key\n') + print("\nReading Change Feed from the beginning of the partition key\n") # Create items - create_items(container, 10, 'WA') - create_items(container, 5, 'CA') - create_items(container, 5, 'OR') + create_items(container, 10, "WA") + create_items(container, 5, "CA") + create_items(container, 5, "OR") # Read change feed with partition key with LatestVersion mode. # Should only return change feed for the created items with 'CA' partition key @@ -100,18 +106,19 @@ def read_change_feed_with_partition_key(container): for doc in response_iterator: print(doc) + def read_change_feed_with_continuation(container): - print('\nReading Change Feed from the continuation\n') + print("\nReading Change Feed from the continuation\n") # Create items - create_items(container, 10, 'WA') + create_items(container, 10, "WA") response_iterator = container.query_items_change_feed(start_time="Beginning") for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] # Create additional items - create_items(container, 5, 'CA') - create_items(container, 5, 'OR') + create_items(container, 5, "CA") + create_items(container, 5, "OR") # You can read change feed from a specific continuation token. # You must pass in a valid continuation token. @@ -120,18 +127,19 @@ def read_change_feed_with_continuation(container): for doc in response_iterator: print(doc) + def read_change_feed_with_all_versions_and_delete_mode(container): - print('\nReading Change Feed with AllVersionsAndDeletes mode\n') + print("\nReading Change Feed with AllVersionsAndDeletes mode\n") # Read the initial change feed with 'AllVersionsAndDeletes' mode. # This initial call was made to store a point in time in a 'continuation' token response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes") for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] # Read all change feed with 'AllVersionsAndDeletes' mode after create items from a continuation - create_items(container, 10, 'CA') - create_items(container, 10, 'OR') + create_items(container, 10, "CA") + create_items(container, 10, "OR") response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", continuation=continuation_token) for doc in response_iterator: print(doc) @@ -142,34 +150,36 @@ def read_change_feed_with_all_versions_and_delete_mode(container): for doc in response_iterator: print(doc) + def read_change_feed_with_all_versions_and_delete_mode_with_partition_key(container): - print('\nReading Change Feed with AllVersionsAndDeletes mode from the partition key\n') + print("\nReading Change Feed with AllVersionsAndDeletes mode from the partition key\n") # Read the initial change feed with 'AllVersionsAndDeletes' mode with partition key('CA'). # This initial call was made to store a point in time and 'partition_key' in a 'continuation' token response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", partition_key="CA") for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] - create_items(container, 10, 'CA') - create_items(container, 10, 'OR') + create_items(container, 10, "CA") + create_items(container, 10, "OR") # Read change feed 'AllVersionsAndDeletes' mode with 'CA' partition key value from the previous continuation. # Should only print the created items with 'CA' partition key value - response_iterator = container.query_items_change_feed(mode='AllVersionsAndDeletes', continuation=continuation_token) + response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", continuation=continuation_token) for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] clean_up(container) # Read change feed 'AllVersionsAndDeletes' mode with 'CA' partition key value from the previous continuation. # Should only print the deleted items with 'CA' partition key value - response_iterator = container.query_items_change_feed(mode='AllVersionsAndDeletes', continuation=continuation_token) + response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", continuation=continuation_token) for doc in response_iterator: print(doc) + def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY}) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) # Delete pre-existing database try: client.delete_database(DATABASE_ID) @@ -187,10 +197,10 @@ def run_sample(): try: container = db.create_container( id=CONTAINER_ID, - partition_key=partition_key.PartitionKey(path='/address/state', kind=documents.PartitionKind.Hash), - offer_throughput = 11000 + partition_key=partition_key.PartitionKey(path="/address/state", kind=documents.PartitionKind.Hash), + offer_throughput=11000, ) - print('Container with id \'{0}\' created'.format(CONTAINER_ID)) + print("Container with id '{0}' created".format(CONTAINER_ID)) except exceptions.CosmosResourceExistsError: raise RuntimeError("Container with id '{}' already exists".format(CONTAINER_ID)) @@ -226,11 +236,11 @@ def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': - run_sample() \ No newline at end of file +if __name__ == "__main__": + run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/change_feed_management_async.py b/sdk/cosmos/azure-cosmos/samples/change_feed_management_async.py index 2efbbc3e6e49..9d32d6d1824b 100644 --- a/sdk/cosmos/azure-cosmos/samples/change_feed_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/change_feed_management_async.py @@ -26,10 +26,10 @@ # Sample - demonstrates how to consume the Change Feed and iterate on the results. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] async def create_items(container, size, partition_key_value): @@ -37,30 +37,34 @@ async def create_items(container, size, partition_key_value): for i in range(size): c = str(uuid.uuid4()) - item_definition = {'id': 'item' + c, - 'address': {'street': '1 Microsoft Way' + c, - 'city': 'Redmond' + c, - 'state': partition_key_value, - 'zip code': 98052 - } - } + item_definition = { + "id": "item" + c, + "address": { + "street": "1 Microsoft Way" + c, + "city": "Redmond" + c, + "state": partition_key_value, + "zip code": 98052, + }, + } await container.create_item(body=item_definition) + async def clean_up(container): - print('\nClean up the container\n') + print("\nClean up the container\n") - async for item in container.query_items(query='SELECT * FROM c'): + async for item in container.query_items(query="SELECT * FROM c"): # Deleting the current item - await container.delete_item(item, partition_key=item['address']['state']) + await container.delete_item(item, partition_key=item["address"]["state"]) + async def read_change_feed(container): - print('\nReading Change Feed from the beginning\n') + print("\nReading Change Feed from the beginning\n") # For a particular Partition Key Range we can use partition_key_range_id] # 'is_start_from_beginning = True' will read from the beginning of the history of the container # If no is_start_from_beginning is specified, the read change feed loop will pickup the items that happen while the loop / process is active - await create_items(container, 10, 'WA') + await create_items(container, 10, "WA") response_iterator = container.query_items_change_feed(is_start_from_beginning=True) # Because the asynchronous client returns an asynchronous iterator object for methods using queries, @@ -69,21 +73,21 @@ async def read_change_feed(container): async for doc in response_iterator: print(doc) - print('\nFinished reading all the change feed\n') + print("\nFinished reading all the change feed\n") async def read_change_feed_with_start_time(container): - print('\nReading Change Feed from the start time\n') + print("\nReading Change Feed from the start time\n") # You can read change feed from a specific time. # You must pass in a datetime object for the start_time field. # Create items - await create_items(container, 10, 'WA') + await create_items(container, 10, "WA") start_time = datetime.now(timezone.utc) - time = start_time.strftime('%a, %d %b %Y %H:%M:%S GMT') - print('\nReading Change Feed from start time of {}\n'.format(time)) - await create_items(container, 5, 'CA') - await create_items(container, 5, 'OR') + time = start_time.strftime("%a, %d %b %Y %H:%M:%S GMT") + print("\nReading Change Feed from start time of {}\n".format(time)) + await create_items(container, 5, "CA") + await create_items(container, 5, "OR") # Read change feed from the beginning response_iterator = container.query_items_change_feed(start_time="Beginning") @@ -95,12 +99,13 @@ async def read_change_feed_with_start_time(container): async for doc in response_iterator: print(doc) + async def read_change_feed_with_partition_key(container): - print('\nReading Change Feed from the beginning of the partition key\n') + print("\nReading Change Feed from the beginning of the partition key\n") # Create items - await create_items(container, 10, 'WA') - await create_items(container, 5, 'CA') - await create_items(container, 5, 'OR') + await create_items(container, 10, "WA") + await create_items(container, 5, "CA") + await create_items(container, 5, "OR") # Read change feed with partition key with LatestVersion mode. # Should only return change feed for the created items with 'CA' partition key @@ -108,18 +113,19 @@ async def read_change_feed_with_partition_key(container): async for doc in response_iterator: print(doc) + async def read_change_feed_with_continuation(container): - print('\nReading Change Feed from the continuation\n') + print("\nReading Change Feed from the continuation\n") # Create items - await create_items(container, 10, 'WA') + await create_items(container, 10, "WA") response_iterator = container.query_items_change_feed(start_time="Beginning") async for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] # Create additional items - await create_items(container, 5, 'CA') - await create_items(container, 5, 'OR') + await create_items(container, 5, "CA") + await create_items(container, 5, "OR") # You can read change feed from a specific continuation token. # You must pass in a valid continuation token. @@ -128,18 +134,19 @@ async def read_change_feed_with_continuation(container): async for doc in response_iterator: print(doc) + async def read_change_feed_with_all_versions_and_delete_mode(container): - print('\nReading Change Feed with AllVersionsAndDeletes mode\n') + print("\nReading Change Feed with AllVersionsAndDeletes mode\n") # Read the initial change feed with 'AllVersionsAndDeletes' mode. # This initial call was made to store a point in time in a 'continuation' token response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes") async for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] # Read all change feed with 'AllVersionsAndDeletes' mode after create items from a continuation - await create_items(container, 10, 'CA') - await create_items(container, 10, 'OR') + await create_items(container, 10, "CA") + await create_items(container, 10, "OR") response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", continuation=continuation_token) async for doc in response_iterator: print(doc) @@ -150,32 +157,34 @@ async def read_change_feed_with_all_versions_and_delete_mode(container): async for doc in response_iterator: print(doc) + async def read_change_feed_with_all_versions_and_delete_mode_with_partition_key(container): - print('\nReading Change Feed with AllVersionsAndDeletes mode from the partition key\n') + print("\nReading Change Feed with AllVersionsAndDeletes mode from the partition key\n") # Read the initial change feed with 'AllVersionsAndDeletes' mode with partition key('CA'). # This initial call was made to store a point in time and 'partition_key' in a 'continuation' token response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", partition_key="CA") async for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] - await create_items(container, 10, 'CA') - await create_items(container, 10, 'OR') + await create_items(container, 10, "CA") + await create_items(container, 10, "OR") # Read change feed 'AllVersionsAndDeletes' mode with 'CA' partition key value from the previous continuation. # Should only print the created items with 'CA' partition key value - response_iterator = container.query_items_change_feed(mode='AllVersionsAndDeletes', continuation=continuation_token) + response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", continuation=continuation_token) async for doc in response_iterator: print(doc) - continuation_token = container.client_connection.last_response_headers['etag'] + continuation_token = container.client_connection.last_response_headers["etag"] await clean_up(container) # Read change feed 'AllVersionsAndDeletes' mode with 'CA' partition key value from the previous continuation. # Should only print the deleted items with 'CA' partition key value - response_iterator = container.query_items_change_feed(mode='AllVersionsAndDeletes', continuation=continuation_token) + response_iterator = container.query_items_change_feed(mode="AllVersionsAndDeletes", continuation=continuation_token) async for doc in response_iterator: print(doc) + async def run_sample(): async with CosmosClient(HOST, MASTER_KEY) as client: # Delete pre-existing database @@ -195,10 +204,10 @@ async def run_sample(): try: container = await db.create_container( id=CONTAINER_ID, - partition_key=partition_key.PartitionKey(path='/address/state', kind=documents.PartitionKind.Hash), - offer_throughput = 11000 + partition_key=partition_key.PartitionKey(path="/address/state", kind=documents.PartitionKind.Hash), + offer_throughput=11000, ) - print('Container with id \'{0}\' created'.format(CONTAINER_ID)) + print("Container with id '{0}' created".format(CONTAINER_ID)) except exceptions.CosmosResourceExistsError: raise RuntimeError("Container with id '{}' already exists".format(CONTAINER_ID)) @@ -234,11 +243,11 @@ async def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': - asyncio.run(run_sample()) \ No newline at end of file +if __name__ == "__main__": + asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/client_user_configs.py b/sdk/cosmos/azure-cosmos/samples/client_user_configs.py index c4781d44fe68..a57a0d8a2899 100644 --- a/sdk/cosmos/azure-cosmos/samples/client_user_configs.py +++ b/sdk/cosmos/azure-cosmos/samples/client_user_configs.py @@ -1,8 +1,8 @@ import azure.cosmos.cosmos_client as cosmos_client import config -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] # ---------------------------------------------------------------------------------------------------------- # Prerequisites - @@ -38,12 +38,22 @@ # While these options can be configured, the SDK by default already has retry mechanisms and we recommend to use those. # ---------------------------------------------------------------------------------------------------------- + def change_connection_retry_policy_configs(): - cosmos_client.CosmosClient(url=HOST, credential=MASTER_KEY, retry_total=10, retry_connect=3, - retry_read=3, retry_status=3, - retry_on_status_codes=([]), - retry_backoff_factor=.08, retry_backoff_max=120, retry_fixed_interval=None) - print('Client initialized with custom retry options') + cosmos_client.CosmosClient( + url=HOST, + credential=MASTER_KEY, + retry_total=10, + retry_connect=3, + retry_read=3, + retry_status=3, + retry_on_status_codes=([]), + retry_backoff_factor=0.08, + retry_backoff_max=120, + retry_fixed_interval=None, + ) + print("Client initialized with custom retry options") + if __name__ == "__main__": change_connection_retry_policy_configs() diff --git a/sdk/cosmos/azure-cosmos/samples/client_user_configs_async.py b/sdk/cosmos/azure-cosmos/samples/client_user_configs_async.py index b801f8e81a38..06d1a0e53f7f 100644 --- a/sdk/cosmos/azure-cosmos/samples/client_user_configs_async.py +++ b/sdk/cosmos/azure-cosmos/samples/client_user_configs_async.py @@ -2,8 +2,8 @@ import config import asyncio -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] # ---------------------------------------------------------------------------------------------------------- # Prerequisites - @@ -39,12 +39,21 @@ # While these options can be configured, the SDK by default already has retry mechanisms and we recommend to use those. # ---------------------------------------------------------------------------------------------------------- + async def change_connection_retry_policy_configs(): - async with CosmosClient(url=HOST, credential=MASTER_KEY, retry_total=10, retry_connect=3, - retry_read=3, retry_status=3, - retry_on_status_codes=([]), - retry_backoff_factor=.08, retry_backoff_max=120, retry_fixed_interval=None) as client: - print('Client initialized with custom retry options') + async with CosmosClient( + url=HOST, + credential=MASTER_KEY, + retry_total=10, + retry_connect=3, + retry_read=3, + retry_status=3, + retry_on_status_codes=([]), + retry_backoff_factor=0.08, + retry_backoff_max=120, + retry_fixed_interval=None, + ) as client: + print("Client initialized with custom retry options") if __name__ == "__main__": diff --git a/sdk/cosmos/azure-cosmos/samples/concurrency_sample.py b/sdk/cosmos/azure-cosmos/samples/concurrency_sample.py index f62a6af457b9..ef00b11495a8 100644 --- a/sdk/cosmos/azure-cosmos/samples/concurrency_sample.py +++ b/sdk/cosmos/azure-cosmos/samples/concurrency_sample.py @@ -16,24 +16,24 @@ # Specify information to connect to the client. CLEAR_DATABASE = True -CONN_STR = os.environ['CONN_STR'] +CONN_STR = os.environ["CONN_STR"] # Specify information for Database and container. DB_ID = "Cosmos_Concurrency_DB" CONT_ID = "Cosmos_Concurrency_Cont" # specify partition key for the container pk = PartitionKey(path="/id") + # Batch the creation of items for better optimization on performance. # Note: Error handling should be in the method being batched. As you will get # an error for each failed Cosmos DB Operation. # Note: While the Word `Batch` here is used to describe the subsets of data being created, it is not referring # to batch operations such as `Transactional Batching` which is a feature of Cosmos DB. async def create_all_the_items(prefix, c, i): - await asyncio.wait( - [asyncio.create_task(c.create_item({"id": prefix + str(j)})) for j in range(100)] - ) + await asyncio.wait([asyncio.create_task(c.create_item({"id": prefix + str(j)})) for j in range(100)]) print(f"Batch {i} done!") + # The following demonstrates the performance difference between using sequential item creation, # sequential item creation in batches, and concurrent item creation in batches. This is to show best practice # in using Cosmos DB for performance. @@ -59,7 +59,6 @@ async def main(): sequential_item_time = time.time() - timer print("Time taken: " + str(sequential_item_time)) - # B: Sequential batches # Batching operations can improve performance by dealing with multiple operations at a time. timer = time.time() @@ -105,4 +104,3 @@ async def clear_database(): if __name__ == "__main__": asyncio.run(main()) - diff --git a/sdk/cosmos/azure-cosmos/samples/config.py b/sdk/cosmos/azure-cosmos/samples/config.py index 5e8cace60e6f..0bbfb2be449f 100644 --- a/sdk/cosmos/azure-cosmos/samples/config.py +++ b/sdk/cosmos/azure-cosmos/samples/config.py @@ -6,12 +6,12 @@ import os settings = { - 'host': os.environ.get('ACCOUNT_HOST', '[YOUR ENDPOINT]'), - 'master_key': os.environ.get('ACCOUNT_KEY', '[YOUR KEY]'), - 'database_id': os.environ.get('COSMOS_DATABASE', '[YOUR DATABASE]'), - 'container_id': os.environ.get('COSMOS_CONTAINER', '[YOUR CONTAINER]'), - 'tenant_id': os.environ.get('TENANT_ID', '[YOUR TENANT ID]'), - 'client_id': os.environ.get('CLIENT_ID', '[YOUR CLIENT ID]'), - 'client_secret': os.environ.get('CLIENT_SECRET', '[YOUR CLIENT SECRET]'), - 'container_mh_id': os.environ.get('COSMOS_CONTAINER_MH', '[YOUR MH CONTAINER]'), + "host": os.environ.get("ACCOUNT_HOST", "[YOUR ENDPOINT]"), + "master_key": os.environ.get("ACCOUNT_KEY", "[YOUR KEY]"), + "database_id": os.environ.get("COSMOS_DATABASE", "[YOUR DATABASE]"), + "container_id": os.environ.get("COSMOS_CONTAINER", "[YOUR CONTAINER]"), + "tenant_id": os.environ.get("TENANT_ID", "[YOUR TENANT ID]"), + "client_id": os.environ.get("CLIENT_ID", "[YOUR CLIENT ID]"), + "client_secret": os.environ.get("CLIENT_SECRET", "[YOUR CLIENT SECRET]"), + "container_mh_id": os.environ.get("COSMOS_CONTAINER_MH", "[YOUR MH CONTAINER]"), } diff --git a/sdk/cosmos/azure-cosmos/samples/container_management.py b/sdk/cosmos/azure-cosmos/samples/container_management.py index 30defb45e90b..25412950ac75 100644 --- a/sdk/cosmos/azure-cosmos/samples/container_management.py +++ b/sdk/cosmos/azure-cosmos/samples/container_management.py @@ -49,163 +49,147 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] def find_container(db, id): - print('1. Query for Container') + print("1. Query for Container") - containers = list(db.query_containers( - { - "query": "SELECT * FROM r WHERE r.id=@id", - "parameters": [ - { "name":"@id", "value": id } - ] - } - )) + containers = list( + db.query_containers({"query": "SELECT * FROM r WHERE r.id=@id", "parameters": [{"name": "@id", "value": id}]}) + ) if len(containers) > 0: - print('Container with id \'{0}\' was found'.format(id)) + print("Container with id '{0}' was found".format(id)) else: - print('No container with id \'{0}\' was found'. format(id)) + print("No container with id '{0}' was found".format(id)) def create_container(db, id): - """ Execute basic container creation. - This will create containers with 400 RUs with different indexing, partitioning, and storage options """ + """Execute basic container creation. + This will create containers with 400 RUs with different indexing, partitioning, and storage options""" - partition_key = PartitionKey(path='/id', kind='Hash') + partition_key = PartitionKey(path="/id", kind="Hash") print("\n2.1 Create Container - Basic") try: db.create_container(id=id, partition_key=partition_key) - print('Container with id \'{0}\' created'.format(id)) + print("Container with id '{0}' created".format(id)) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(id)) + print("A container with id '{0}' already exists".format(id)) print("\n2.2 Create Container - With custom index policy") try: - coll = { - "id": id+"_container_custom_index_policy", - "indexingPolicy": { - "automatic": False - } - } + coll = {"id": id + "_container_custom_index_policy", "indexingPolicy": {"automatic": False}} container = db.create_container( - id=coll['id'], - partition_key=partition_key, - indexing_policy=coll['indexingPolicy'] + id=coll["id"], partition_key=partition_key, indexing_policy=coll["indexingPolicy"] ) properties = container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('IndexPolicy Mode - \'{0}\''.format(properties['indexingPolicy']['indexingMode'])) - print('IndexPolicy Automatic - \'{0}\''.format(properties['indexingPolicy']['automatic'])) + print("Container with id '{0}' created".format(container.id)) + print("IndexPolicy Mode - '{0}'".format(properties["indexingPolicy"]["indexingMode"])) + print("IndexPolicy Automatic - '{0}'".format(properties["indexingPolicy"]["automatic"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(coll['id'])) + print("A container with id '{0}' already exists".format(coll["id"])) print("\n2.3 Create Container - With custom provisioned throughput") try: container = db.create_container( - id=id+"_container_custom_throughput", - partition_key=partition_key, - offer_throughput=400 + id=id + "_container_custom_throughput", partition_key=partition_key, offer_throughput=400 ) - print('Container with id \'{0}\' created'.format(container.id)) + print("Container with id '{0}' created".format(container.id)) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(coll['id'])) + print("A container with id '{0}' already exists".format(coll["id"])) print("\n2.4 Create Container - With Unique keys") try: container = db.create_container( - id= id+"_container_unique_keys", + id=id + "_container_unique_keys", partition_key=partition_key, - unique_key_policy={'uniqueKeys': [{'paths': ['/field1/field2', '/field3']}]} + unique_key_policy={"uniqueKeys": [{"paths": ["/field1/field2", "/field3"]}]}, ) properties = container.read() - unique_key_paths = properties['uniqueKeyPolicy']['uniqueKeys'][0]['paths'] - print('Container with id \'{0}\' created'.format(container.id)) - print('Unique Key Paths - \'{0}\', \'{1}\''.format(unique_key_paths[0], unique_key_paths[1])) + unique_key_paths = properties["uniqueKeyPolicy"]["uniqueKeys"][0]["paths"] + print("Container with id '{0}' created".format(container.id)) + print("Unique Key Paths - '{0}', '{1}'".format(unique_key_paths[0], unique_key_paths[1])) except exceptions.CosmosResourceExistsError: - print('A container with id \'container_unique_keys\' already exists') + print("A container with id 'container_unique_keys' already exists") print("\n2.5 Create Container - With Partition key V2 (Default)") try: container = db.create_container( - id=id+"_container_partition_key_v2", - partition_key=PartitionKey(path='/id', kind='Hash') + id=id + "_container_partition_key_v2", partition_key=PartitionKey(path="/id", kind="Hash") ) properties = container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + print("Container with id '{0}' created".format(container.id)) + print("Partition Key - '{0}'".format(properties["partitionKey"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'container_partition_key_v2\' already exists') + print("A container with id 'container_partition_key_v2' already exists") print("\n2.6 Create Container - With Partition key V1") try: container = db.create_container( - id=id+"_container_partition_key_v1", - partition_key=PartitionKey(path='/id', kind='Hash', version=1) + id=id + "_container_partition_key_v1", partition_key=PartitionKey(path="/id", kind="Hash", version=1) ) properties = container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + print("Container with id '{0}' created".format(container.id)) + print("Partition Key - '{0}'".format(properties["partitionKey"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'container_partition_key_v1\' already exists') + print("A container with id 'container_partition_key_v1' already exists") print("\n2.7 Create Container - With analytical store enabled") try: container = db.create_container( - id=id+"_container_analytical_store", - partition_key=PartitionKey(path='/id', kind='Hash'), analytical_storage_ttl=None + id=id + "_container_analytical_store", + partition_key=PartitionKey(path="/id", kind="Hash"), + analytical_storage_ttl=None, ) """A value of None leaves analytical storage off and a value of -1 turns analytical storage on with no TTL. Please note that analytical storage can only be enabled on Synapse Link enabled accounts.""" properties = container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + print("Container with id '{0}' created".format(container.id)) + print("Partition Key - '{0}'".format(properties["partitionKey"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'_container_analytical_store\' already exists') + print("A container with id '_container_analytical_store' already exists") print("\n2.8 Create Container - With autoscale settings") try: container = db.create_container( - id=id+"_container_auto_scale_settings", + id=id + "_container_auto_scale_settings", partition_key=partition_key, - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), ) - print('Container with id \'{0}\' created'.format(container.id)) + print("Container with id '{0}' created".format(container.id)) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(coll['id'])) - + print("A container with id '{0}' already exists".format(coll["id"])) def manage_provisioned_throughput(db, id): print("\n3.1 Get Container provisioned throughput (RU/s)") - #A Container's Provisioned Throughput determines the performance throughput of a container. - #A Container is loosely coupled to Offer through the Offer's offerResourceId - #Offer.offerResourceId == Container._rid - #Offer.resource == Container._self + # A Container's Provisioned Throughput determines the performance throughput of a container. + # A Container is loosely coupled to Offer through the Offer's offerResourceId + # Offer.offerResourceId == Container._rid + # Offer.resource == Container._self try: # read the container, so we can get its _self @@ -214,18 +198,22 @@ def manage_provisioned_throughput(db, id): # now use its _self to query for Offers offer = container.get_throughput() - print('Found Offer \'{0}\' for Container \'{1}\' and its throughput is \'{2}\''.format(offer.properties['id'], container.id, offer.properties['content']['offerThroughput'])) + print( + "Found Offer '{0}' for Container '{1}' and its throughput is '{2}'".format( + offer.properties["id"], container.id, offer.properties["content"]["offerThroughput"] + ) + ) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) print("\n3.2 Change Provisioned Throughput of Container") - #The Provisioned Throughput of a container controls the throughput allocated to the Container + # The Provisioned Throughput of a container controls the throughput allocated to the Container - #The following code shows how you can change Container's throughput + # The following code shows how you can change Container's throughput offer = container.replace_throughput(offer.offer_throughput + 100) - print('Replaced Offer. Provisioned Throughput is now \'{0}\''.format(offer.properties['content']['offerThroughput'])) + print("Replaced Offer. Provisioned Throughput is now '{0}'".format(offer.properties["content"]["offerThroughput"])) def read_Container(db, id): @@ -234,16 +222,16 @@ def read_Container(db, id): try: container = db.get_container_client(id) container.read() - print('Container with id \'{0}\' was found, it\'s link is {1}'.format(container.id, container.container_link)) + print("Container with id '{0}' was found, it's link is {1}".format(container.id, container.container_link)) except exceptions.CosmosResourceNotFoundError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) def list_Containers(db): print("\n5. List all Container in a Database") - print('Containers:') + print("Containers:") containers = list(db.list_containers()) @@ -251,7 +239,7 @@ def list_Containers(db): return for container in containers: - print(container['id']) + print(container["id"]) def delete_Container(db, id): @@ -260,15 +248,15 @@ def delete_Container(db, id): try: db.delete_container(id) - print('Container with id \'{0}\' was deleted'.format(id)) + print("Container with id '{0}' was deleted".format(id)) except exceptions.CosmosResourceNotFoundError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY} ) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) try: # setup database for this sample try: @@ -303,12 +291,11 @@ def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: - print("\nrun_sample done") + print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": run_sample() - diff --git a/sdk/cosmos/azure-cosmos/samples/container_management_async.py b/sdk/cosmos/azure-cosmos/samples/container_management_async.py index b82937cbe138..a37212d8c24a 100644 --- a/sdk/cosmos/azure-cosmos/samples/container_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/container_management_async.py @@ -50,51 +50,48 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] async def find_container(db, id): - print('1. Query for Container') + print("1. Query for Container") # Because the asynchronous client returns an asynchronous iterator object for methods that use # return several containers using queries, we do not need to await the function. However, attempting # to cast this object into a list directly will throw an error; instead, iterate over the containers # to populate your list using an async for loop like shown here or in the list_containers() method query_containers_response = db.query_containers( - query="SELECT * FROM r WHERE r.id=@id", - parameters=[ - {"name": "@id", "value": id} - ] + query="SELECT * FROM r WHERE r.id=@id", parameters=[{"name": "@id", "value": id}] ) containers = [container async for container in query_containers_response] if len(containers) > 0: - print('Container with id \'{0}\' was found'.format(id)) + print("Container with id '{0}' was found".format(id)) else: - print('No container with id \'{0}\' was found'.format(id)) + print("No container with id '{0}' was found".format(id)) # Alternatively, you can directly iterate over the asynchronous iterator without building a separate # list if you don't need the ordering or indexing capabilities async for container in query_containers_response: - print(container['id']) + print(container["id"]) async def create_container(db, id): - """ Execute basic container creation. - This will create containers with 400 RUs with different indexing, partitioning, and storage options """ + """Execute basic container creation. + This will create containers with 400 RUs with different indexing, partitioning, and storage options""" - partition_key = PartitionKey(path='/id', kind='Hash') + partition_key = PartitionKey(path="/id", kind="Hash") print("\n2.1 Create Container - Basic") try: await db.create_container(id=id, partition_key=partition_key) - print('Container with id \'{0}\' created'.format(id)) + print("Container with id '{0}' created".format(id)) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(id)) + print("A container with id '{0}' already exists".format(id)) # Alternatively, you can also use the create_container_if_not_exists method to avoid using a try catch # This method attempts to read the container first, and based on the result either creates or returns @@ -105,39 +102,30 @@ async def create_container(db, id): print("\n2.2 Create Container - With custom index policy") try: - coll = { - "id": id+"_container_custom_index_policy", - "indexingPolicy": { - "automatic": False - } - } + coll = {"id": id + "_container_custom_index_policy", "indexingPolicy": {"automatic": False}} container = await db.create_container( - id=coll['id'], - partition_key=partition_key, - indexing_policy=coll['indexingPolicy'] + id=coll["id"], partition_key=partition_key, indexing_policy=coll["indexingPolicy"] ) properties = await container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('IndexPolicy Mode - \'{0}\''.format(properties['indexingPolicy']['indexingMode'])) - print('IndexPolicy Automatic - \'{0}\''.format(properties['indexingPolicy']['automatic'])) + print("Container with id '{0}' created".format(container.id)) + print("IndexPolicy Mode - '{0}'".format(properties["indexingPolicy"]["indexingMode"])) + print("IndexPolicy Automatic - '{0}'".format(properties["indexingPolicy"]["automatic"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(coll['id'])) + print("A container with id '{0}' already exists".format(coll["id"])) print("\n2.3 Create Container - With custom provisioned throughput") try: container = await db.create_container( - id=id + "_container_custom_throughput", - partition_key=partition_key, - offer_throughput=400 + id=id + "_container_custom_throughput", partition_key=partition_key, offer_throughput=400 ) - print('Container with id \'{0}\' created'.format(container.id)) + print("Container with id '{0}' created".format(container.id)) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(coll['id'])) + print("A container with id '{0}' already exists".format(coll["id"])) print("\n2.4 Create Container - With Unique keys") @@ -145,66 +133,65 @@ async def create_container(db, id): container = await db.create_container( id=id + "_container_unique_keys", partition_key=partition_key, - unique_key_policy={'uniqueKeys': [{'paths': ['/field1/field2', '/field3']}]} + unique_key_policy={"uniqueKeys": [{"paths": ["/field1/field2", "/field3"]}]}, ) properties = await container.read() - unique_key_paths = properties['uniqueKeyPolicy']['uniqueKeys'][0]['paths'] - print('Container with id \'{0}\' created'.format(container.id)) - print('Unique Key Paths - \'{0}\', \'{1}\''.format(unique_key_paths[0], unique_key_paths[1])) + unique_key_paths = properties["uniqueKeyPolicy"]["uniqueKeys"][0]["paths"] + print("Container with id '{0}' created".format(container.id)) + print("Unique Key Paths - '{0}', '{1}'".format(unique_key_paths[0], unique_key_paths[1])) except exceptions.CosmosResourceExistsError: - print('A container with id \'container_unique_keys\' already exists') + print("A container with id 'container_unique_keys' already exists") print("\n2.5 Create Container - With Partition key V2 (Default)") try: container = await db.create_container( - id=id + "_container_partition_key_v2", - partition_key=PartitionKey(path='/id', kind='Hash') + id=id + "_container_partition_key_v2", partition_key=PartitionKey(path="/id", kind="Hash") ) properties = await container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + print("Container with id '{0}' created".format(container.id)) + print("Partition Key - '{0}'".format(properties["partitionKey"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'container_partition_key_v2\' already exists') + print("A container with id 'container_partition_key_v2' already exists") print("\n2.6 Create Container - With Partition key V1") try: container = await db.create_container( - id=id + "_container_partition_key_v1", - partition_key=PartitionKey(path='/id', kind='Hash', version=1) + id=id + "_container_partition_key_v1", partition_key=PartitionKey(path="/id", kind="Hash", version=1) ) properties = await container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + print("Container with id '{0}' created".format(container.id)) + print("Partition Key - '{0}'".format(properties["partitionKey"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'container_partition_key_v1\' already exists') + print("A container with id 'container_partition_key_v1' already exists") except Exception: print("Skipping this step, account does not have Synapse Link activated") print("\n2.7 Create Container - With analytical store enabled") - if 'localhost:8081' in HOST: + if "localhost:8081" in HOST: print("Skipping step since emulator does not support this yet") else: try: container = await db.create_container( id=id + "_container_analytical_store", - partition_key=PartitionKey(path='/id', kind='Hash'), analytical_storage_ttl=-1 - + partition_key=PartitionKey(path="/id", kind="Hash"), + analytical_storage_ttl=-1, ) properties = await container.read() - print('Container with id \'{0}\' created'.format(container.id)) - print('Partition Key - \'{0}\''.format(properties['partitionKey'])) + print("Container with id '{0}' created".format(container.id)) + print("Partition Key - '{0}'".format(properties["partitionKey"])) except exceptions.CosmosResourceExistsError: - print('A container with id \'_container_analytical_store\' already exists') + print("A container with id '_container_analytical_store' already exists") except Exception: print( - 'Creating container with analytical storage can only happen in synapse link activated accounts, skipping step') + "Creating container with analytical storage can only happen in synapse link activated accounts, skipping step" + ) print("\n2.8 Create Container - With autoscale settings") @@ -212,12 +199,12 @@ async def create_container(db, id): container = await db.create_container( id=id + "_container_auto_scale_settings", partition_key=partition_key, - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), ) - print('Container with id \'{0}\' created'.format(container.id)) + print("Container with id '{0}' created".format(container.id)) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(coll['id'])) + print("A container with id '{0}' already exists".format(coll["id"])) async def manage_provisioned_throughput(db, id): @@ -235,14 +222,14 @@ async def manage_provisioned_throughput(db, id): # now use its _self to query for throughput offers offer = await container.get_throughput() - print('Found Offer \'{0}\' for Container \'{1}\' and its throughput is \'{2}\''.format(offer.properties['id'], - container.id, - offer.properties[ - 'content'][ - 'offerThroughput'])) + print( + "Found Offer '{0}' for Container '{1}' and its throughput is '{2}'".format( + offer.properties["id"], container.id, offer.properties["content"]["offerThroughput"] + ) + ) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) print("\n3.2 Change Provisioned Throughput of Container") @@ -250,8 +237,7 @@ async def manage_provisioned_throughput(db, id): # The following code shows how you can change Container's throughput offer = await container.replace_throughput(offer.offer_throughput + 100) - print( - 'Replaced Offer. Provisioned Throughput is now \'{0}\''.format(offer.properties['content']['offerThroughput'])) + print("Replaced Offer. Provisioned Throughput is now '{0}'".format(offer.properties["content"]["offerThroughput"])) async def read_container(db, id): @@ -260,16 +246,16 @@ async def read_container(db, id): try: container = db.get_container_client(id) await container.read() - print('Container with id \'{0}\' was found, it\'s link is {1}'.format(container.id, container.container_link)) + print("Container with id '{0}' was found, it's link is {1}".format(container.id, container.container_link)) except exceptions.CosmosResourceNotFoundError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) async def list_containers(db): print("\n5. List all Container in a Database") - print('Containers:') + print("Containers:") # Because the asynchronous client returns an asynchronous iterator object for methods that use # return several containers using queries, we do not need to await the function. However, attempting @@ -282,12 +268,12 @@ async def list_containers(db): return for container in containers: - print(container['id']) + print(container["id"]) # Alternatively, you can directly iterate over the asynchronous iterator without building a separate # list if you don't need the ordering or indexing capabilities async for container in container_list: - print(container['id']) + print(container["id"]) async def delete_container(db, id): @@ -295,14 +281,14 @@ async def delete_container(db, id): try: await db.delete_container(id) - print('Container with id \'{0}\' was deleted'.format(id)) + print("Container with id '{0}' was deleted".format(id)) except exceptions.CosmosResourceNotFoundError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) async def run_sample(): - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: try: db = await client.create_database_if_not_exists(id=DATABASE_ID) @@ -332,10 +318,11 @@ async def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management.py b/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management.py index bb90873d782f..f137a819cf76 100644 --- a/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management.py +++ b/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management.py @@ -45,10 +45,10 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] + str(uuid.uuid4()) -CONTAINER_ID = config.settings['container_id'] + str(uuid.uuid4()) +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] + str(uuid.uuid4()) +CONTAINER_ID = config.settings["container_id"] + str(uuid.uuid4()) def create_db(client, id): @@ -57,10 +57,10 @@ def create_db(client, id): try: response_properties = client.create_database(id=id, return_properties=True) - print('Database with id \'{0}\' created'.format(id)) + print("Database with id '{0}' created".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceExistsError: - print('A database with id \'{0}\' already exists'.format(id)) + print("A database with id '{0}' already exists".format(id)) def create_db_if_not_exists(client, id): @@ -68,10 +68,10 @@ def create_db_if_not_exists(client, id): try: response_properties = client.create_database_if_not_exists(id=id, return_properties=True) - print('Database with id \'{0}\' created or retrieved'.format(id)) + print("Database with id '{0}' created or retrieved".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosHttpResponseError as e: - print('Error creating database: {0}'.format(e.message)) + print("Error creating database: {0}".format(e.message)) def create_db_if_exists(client, id): @@ -79,10 +79,10 @@ def create_db_if_exists(client, id): try: response_properties = client.create_database_if_not_exists(id=id, return_properties=True) - print('Database with id \'{0}\' found'.format(id)) + print("Database with id '{0}' found".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Database with id \'{0}\' does not exist'.format(id)) + print("Database with id '{0}' does not exist".format(id)) def read_db(client, id): @@ -91,51 +91,53 @@ def read_db(client, id): try: database = client.get_database_client(id) properties = database.read() - print('Database with id \'{0}\' was found'.format(id)) + print("Database with id '{0}' was found".format(id)) except exceptions.CosmosResourceNotFoundError: - print('A database with id \'{0}\' does not exist'.format(id)) + print("A database with id '{0}' does not exist".format(id)) def replace_throughput_db(client, id): print("\n1.5 Replace Database Throughput") try: - database = client.create_database(id=id+"1", offer_throughput=400) + database = client.create_database(id=id + "1", offer_throughput=400) replace_throughput_value = 500 properties = database.replace_throughput(replace_throughput_value) - print('Database throughput changed to 800 RU/s') + print("Database throughput changed to 800 RU/s") print(properties.get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Database with id \'{0}\' does not exist'.format(id)) + print("Database with id '{0}' does not exist".format(id)) except exceptions.CosmosHttpResponseError as e: - print('Error changing database throughput: {0}'.format(e.message)) + print("Error changing database throughput: {0}".format(e.message)) def create_container(db, id): - """ Execute basic container creation. - This will create containers with 400 RUs with different indexing, partitioning, and storage options """ + """Execute basic container creation. + This will create containers with 400 RUs with different indexing, partitioning, and storage options""" - partition_key = PartitionKey(path='/id', kind='Hash') + partition_key = PartitionKey(path="/id", kind="Hash") print("\n2.1 Create Container - Basic") try: response_properties = db.create_container(id=id, partition_key=partition_key, return_properties=True) - print('Container with id \'{0}\' created'.format(id)) + print("Container with id '{0}' created".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(id)) + print("A container with id '{0}' already exists".format(id)) def create_container_if_not_exists(db, id): print("\n2.2 Create Container if not exists") - partition_key = PartitionKey(path='/id', kind='Hash') + partition_key = PartitionKey(path="/id", kind="Hash") try: - response_properties = db.create_container_if_not_exists(id=id, partition_key=partition_key, return_properties=True) - print('Container with id \'{0}\' created or retrieved'.format(id)) + response_properties = db.create_container_if_not_exists( + id=id, partition_key=partition_key, return_properties=True + ) + print("Container with id '{0}' created or retrieved".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosHttpResponseError as e: - print('Error creating container: {0}'.format(e.message)) + print("Error creating container: {0}".format(e.message)) def create_container_if_exists(db, id): @@ -143,10 +145,10 @@ def create_container_if_exists(db, id): try: response_properties = db.create_container_if_not_exists(id=id, return_properties=True) - print('Container with id \'{0}\' found'.format(id)) + print("Container with id '{0}' found".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Container with id \'{0}\' does not exist'.format(id)) + print("Container with id '{0}' does not exist".format(id)) def read_container(db, id): @@ -155,30 +157,30 @@ def read_container(db, id): try: container = db.get_container_client(id) properties = container.read() - print('Container with id \'{0}\' was found, it\'s link is {1}'.format(container.id, container.container_link)) + print("Container with id '{0}' was found, it's link is {1}".format(container.id, container.container_link)) except exceptions.CosmosResourceNotFoundError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) def replace_throughput_container(db, id): print("\n2.5 Replace Container Throughput") try: - container = db.create_container(id=id, partition_key=PartitionKey(path="/company"), offer_throughput=400) + container = db.create_container(id=id, partition_key=PartitionKey(path="/company"), offer_throughput=400) replace_throughput_value = 500 properties = container.replace_throughput(replace_throughput_value) # Set new throughput to 600 RU/s new_throughput = ThroughputProperties(offer_throughput=600) - print('Container throughput changed to 600 RU/s') + print("Container throughput changed to 600 RU/s") print(properties.get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Container with id \'{0}\' does not exist'.format(id)) + print("Container with id '{0}' does not exist".format(id)) except exceptions.CosmosHttpResponseError as e: - print('Error changing container throughput: {0}'.format(e.message)) + print("Error changing container throughput: {0}".format(e.message)) def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY}) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) try: # setup database for this sample try: @@ -229,11 +231,11 @@ def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': - run_sample() \ No newline at end of file +if __name__ == "__main__": + run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management_async.py b/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management_async.py index 99d7a3f59737..2d7ff1d09744 100644 --- a/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/cosmos_responses_management_async.py @@ -46,10 +46,10 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] + str(uuid.uuid4()) -CONTAINER_ID = config.settings['container_id'] + str(uuid.uuid4()) +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] + str(uuid.uuid4()) +CONTAINER_ID = config.settings["container_id"] + str(uuid.uuid4()) async def create_db(client, id): @@ -58,10 +58,10 @@ async def create_db(client, id): try: response_properties = await client.create_database(id=id, return_properties=True) - print('Database with id \'{0}\' created'.format(id)) + print("Database with id '{0}' created".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceExistsError: - print('A database with id \'{0}\' already exists'.format(id)) + print("A database with id '{0}' already exists".format(id)) async def create_db_if_not_exists(client, id): @@ -69,10 +69,10 @@ async def create_db_if_not_exists(client, id): try: response_properties = await client.create_database_if_not_exists(id=id, return_properties=True) - print('Database with id \'{0}\' created or retrieved'.format(id)) + print("Database with id '{0}' created or retrieved".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosHttpResponseError as e: - print('Error creating database: {0}'.format(e.message)) + print("Error creating database: {0}".format(e.message)) async def create_db_if_exists(client, id): @@ -80,10 +80,10 @@ async def create_db_if_exists(client, id): try: response_properties = await client.create_database_if_not_exists(id=id, return_properties=True) - print('Database with id \'{0}\' found'.format(id)) + print("Database with id '{0}' found".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Database with id \'{0}\' does not exist'.format(id)) + print("Database with id '{0}' does not exist".format(id)) async def read_db(client, id): @@ -92,51 +92,53 @@ async def read_db(client, id): try: database = client.get_database_client(id) properties = await database.read() - print('Database with id \'{0}\' was found'.format(id)) + print("Database with id '{0}' was found".format(id)) except exceptions.CosmosResourceNotFoundError: - print('A database with id \'{0}\' does not exist'.format(id)) + print("A database with id '{0}' does not exist".format(id)) async def replace_throughput_db(client, id): print("\n1.5 Replace Database Throughput") try: - database = await client.create_database(id=id+"1", offer_throughput=400) + database = await client.create_database(id=id + "1", offer_throughput=400) replace_throughput_value = 500 properties = await database.replace_throughput(replace_throughput_value) - print('Database throughput changed to 800 RU/s') + print("Database throughput changed to 800 RU/s") print(properties.get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Database with id \'{0}\' does not exist'.format(id)) + print("Database with id '{0}' does not exist".format(id)) except exceptions.CosmosHttpResponseError as e: - print('Error changing database throughput: {0}'.format(e.message)) + print("Error changing database throughput: {0}".format(e.message)) async def create_container(db, id): - """ Execute basic container creation. - This will create containers with 400 RUs with different indexing, partitioning, and storage options """ + """Execute basic container creation. + This will create containers with 400 RUs with different indexing, partitioning, and storage options""" - partition_key = PartitionKey(path='/id', kind='Hash') + partition_key = PartitionKey(path="/id", kind="Hash") print("\n2.1 Create Container - Basic") try: response_properties = await db.create_container(id=id, partition_key=partition_key, return_properties=True) - print('Container with id \'{0}\' created'.format(id)) + print("Container with id '{0}' created".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceExistsError: - print('A container with id \'{0}\' already exists'.format(id)) + print("A container with id '{0}' already exists".format(id)) async def create_container_if_not_exists(db, id): print("\n2.2 Create Container if not exists") - partition_key = PartitionKey(path='/id', kind='Hash') + partition_key = PartitionKey(path="/id", kind="Hash") try: - response_properties = await db.create_container_if_not_exists(id=id, partition_key=partition_key, return_properties=True) - print('Container with id \'{0}\' created or retrieved'.format(id)) + response_properties = await db.create_container_if_not_exists( + id=id, partition_key=partition_key, return_properties=True + ) + print("Container with id '{0}' created or retrieved".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosHttpResponseError as e: - print('Error creating container: {0}'.format(e.message)) + print("Error creating container: {0}".format(e.message)) async def create_container_if_exists(db, id): @@ -144,10 +146,10 @@ async def create_container_if_exists(db, id): try: response_properties = await db.create_container_if_not_exists(id=id, return_properties=True) - print('Container with id \'{0}\' found'.format(id)) + print("Container with id '{0}' found".format(id)) print(response_properties[1].get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Container with id \'{0}\' does not exist'.format(id)) + print("Container with id '{0}' does not exist".format(id)) async def read_container(db, id): @@ -156,30 +158,30 @@ async def read_container(db, id): try: container = db.get_container_client(id) properties = await container.read() - print('Container with id \'{0}\' was found, it\'s link is {1}'.format(container.id, container.container_link)) + print("Container with id '{0}' was found, it's link is {1}".format(container.id, container.container_link)) except exceptions.CosmosResourceNotFoundError: - print('A container with id \'{0}\' does not exist'.format(id)) + print("A container with id '{0}' does not exist".format(id)) async def replace_throughput_container(db, id): print("\n2.5 Replace Container Throughput") try: - container = await db.create_container(id=id, partition_key=PartitionKey(path="/company"), offer_throughput=400) + container = await db.create_container(id=id, partition_key=PartitionKey(path="/company"), offer_throughput=400) replace_throughput_value = 500 properties = await container.replace_throughput(replace_throughput_value) # Set new throughput to 600 RU/s new_throughput = ThroughputProperties(offer_throughput=600) - print('Container throughput changed to 600 RU/s') + print("Container throughput changed to 600 RU/s") print(properties.get_response_headers()) except exceptions.CosmosResourceNotFoundError: - print('Container with id \'{0}\' does not exist'.format(id)) + print("Container with id '{0}' does not exist".format(id)) except exceptions.CosmosHttpResponseError as e: - print('Error changing container throughput: {0}'.format(e.message)) + print("Error changing container throughput: {0}".format(e.message)) async def run_sample(): - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: try: # setup database for this sample try: @@ -230,11 +232,11 @@ async def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': - asyncio.run(run_sample()) \ No newline at end of file +if __name__ == "__main__": + asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/database_management.py b/sdk/cosmos/azure-cosmos/samples/database_management.py index 626d891d2448..197d90123848 100644 --- a/sdk/cosmos/azure-cosmos/samples/database_management.py +++ b/sdk/cosmos/azure-cosmos/samples/database_management.py @@ -31,24 +31,24 @@ # 5. Delete a Database given its Id property (DeleteDatabase) # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] + def find_database(client, id): - print('1. Query for Database') + print("1. Query for Database") - databases = list(client.query_databases({ - "query": "SELECT * FROM r WHERE r.id=@id", - "parameters": [ - { "name":"@id", "value": id } - ] - })) + databases = list( + client.query_databases( + {"query": "SELECT * FROM r WHERE r.id=@id", "parameters": [{"name": "@id", "value": id}]} + ) + ) if len(databases) > 0: - print('Database with id \'{0}\' was found'.format(id)) + print("Database with id '{0}' was found".format(id)) else: - print('No database with id \'{0}\' was found'. format(id)) + print("No database with id '{0}' was found".format(id)) def create_database(client, id): @@ -56,21 +56,21 @@ def create_database(client, id): try: client.create_database(id=id) - print('Database with id \'{0}\' created'.format(id)) + print("Database with id '{0}' created".format(id)) except exceptions.CosmosResourceExistsError: - print('A database with id \'{0}\' already exists'.format(id)) + print("A database with id '{0}' already exists".format(id)) print("\n2.8 Create Database - With autoscale settings") try: client.create_database( - id=id, - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0)) - print('Database with id \'{0}\' created'.format(id)) + id=id, offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0) + ) + print("Database with id '{0}' created".format(id)) except exceptions.CosmosResourceExistsError: - print('A database with id \'{0}\' already exists'.format(id)) + print("A database with id '{0}' already exists".format(id)) def read_database(client, id): @@ -79,16 +79,16 @@ def read_database(client, id): try: database = client.get_database_client(id) database.read() - print('Database with id \'{0}\' was found, it\'s link is {1}'.format(id, database.database_link)) + print("Database with id '{0}' was found, it's link is {1}".format(id, database.database_link)) except exceptions.CosmosResourceNotFoundError: - print('A database with id \'{0}\' does not exist'.format(id)) + print("A database with id '{0}' does not exist".format(id)) def list_databases(client): print("\n4. List all Databases on an account") - print('Databases:') + print("Databases:") databases = list(client.list_databases()) @@ -96,7 +96,7 @@ def list_databases(client): return for database in databases: - print(database['id']) + print(database["id"]) def delete_database(client, id): @@ -105,14 +105,14 @@ def delete_database(client, id): try: client.delete_database(id) - print('Database with id \'{0}\' was deleted'.format(id)) + print("Database with id '{0}' was deleted".format(id)) except exceptions.CosmosResourceNotFoundError: - print('A database with id \'{0}\' does not exist'.format(id)) + print("A database with id '{0}' does not exist".format(id)) def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY} ) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) try: # query for a database find_database(client, DATABASE_ID) @@ -130,10 +130,11 @@ def run_sample(): delete_database(client, DATABASE_ID) except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': + +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/database_management_async.py b/sdk/cosmos/azure-cosmos/samples/database_management_async.py index 8ef7ff062695..342526dc6998 100644 --- a/sdk/cosmos/azure-cosmos/samples/database_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/database_management_async.py @@ -32,35 +32,33 @@ # 5. Delete a Database given its Id property (DeleteDatabase) # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] + async def find_database(client, id): - print('1. Query for Database') + print("1. Query for Database") # Because the asynchronous client returns an asynchronous iterator object for methods that use # return several databases using queries, we do not need to await the function. However, attempting # to cast this object into a list directly will throw an error; instead, iterate over the databases # to populate your list using an async for loop like shown here or in the list_databases() method - query_databases_response = client.query_databases(query={ - "query": "SELECT * FROM r WHERE r.id=@id", - "parameters": [ - { "name":"@id", "value": id } - ] - }) + query_databases_response = client.query_databases( + query={"query": "SELECT * FROM r WHERE r.id=@id", "parameters": [{"name": "@id", "value": id}]} + ) databases = [database async for database in query_databases_response] if len(databases) > 0: - print('Database with id \'{0}\' was found'.format(id)) + print("Database with id '{0}' was found".format(id)) else: - print('No database with id \'{0}\' was found'. format(id)) + print("No database with id '{0}' was found".format(id)) # Alternatively, you can directly iterate over the asynchronous iterator without building a separate # list if you don't need the ordering or indexing capabilities async for database in query_databases_response: - print(database['id']) + print(database["id"]) async def create_database(client, id): @@ -68,21 +66,21 @@ async def create_database(client, id): try: await client.create_database(id=id) - print('Database with id \'{0}\' created'.format(id)) + print("Database with id '{0}' created".format(id)) except exceptions.CosmosResourceExistsError: - print('A database with id \'{0}\' already exists'.format(id)) + print("A database with id '{0}' already exists".format(id)) print("\n2.8 Create Database - With autoscale settings") try: await client.create_database( - id=id, - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0)) - print('Database with id \'{0}\' created'.format(id)) + id=id, offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0) + ) + print("Database with id '{0}' created".format(id)) except exceptions.CosmosResourceExistsError: - print('A database with id \'{0}\' already exists'.format(id)) + print("A database with id '{0}' already exists".format(id)) # Alternatively, you can also use the create_database_if_not_exists method to avoid using a try catch # This method attempts to read the database first, and based on the result either creates or returns @@ -97,16 +95,16 @@ async def read_database(client, id): try: database = client.get_database_client(id) await database.read() - print('Database with id \'{0}\' was found, it\'s link is {1}'.format(id, database.database_link)) + print("Database with id '{0}' was found, it's link is {1}".format(id, database.database_link)) except exceptions.CosmosResourceNotFoundError: - print('A database with id \'{0}\' does not exist'.format(id)) + print("A database with id '{0}' does not exist".format(id)) async def list_databases(client): print("\n4. List all Databases on an account") - print('Databases:') + print("Databases:") # Because the asynchronous client returns an asynchronous iterator object for methods that use # return several databases using queries, we do not need to await the function. However, attempting @@ -119,12 +117,12 @@ async def list_databases(client): return for database in databases: - print(database['id']) + print(database["id"]) # Alternatively, you can directly iterate over the asynchronous iterator without building a separate # list if you don't need the ordering or indexing capabilities async for database in list_databases_response: - print(database['id']) + print(database["id"]) async def delete_database(client, id): @@ -132,14 +130,14 @@ async def delete_database(client, id): try: await client.delete_database(id) - print('Database with id \'{0}\' was deleted'.format(id)) + print("Database with id '{0}' was deleted".format(id)) except exceptions.CosmosResourceNotFoundError: - print('A database with id \'{0}\' does not exist'.format(id)) + print("A database with id '{0}' does not exist".format(id)) async def run_sample(): - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: try: # query for a database await find_database(client, DATABASE_ID) @@ -157,10 +155,11 @@ async def run_sample(): await delete_database(client, DATABASE_ID) except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/diagnostics_filter_sample.py b/sdk/cosmos/azure-cosmos/samples/diagnostics_filter_sample.py index f0d2c32a34a5..7897bb4a0fbf 100644 --- a/sdk/cosmos/azure-cosmos/samples/diagnostics_filter_sample.py +++ b/sdk/cosmos/azure-cosmos/samples/diagnostics_filter_sample.py @@ -9,39 +9,48 @@ endpoint = os.environ["ACCOUNT_URI"] key = os.environ["ACCOUNT_KEY"] + + # Sample usage of using logging filters for diagnostics filtering # You can filter based on request and response related attributes that are added to the log record class CosmosStatusCodeFilter(logging.Filter): def filter(self, record): - ret = (hasattr(record, 'status_code') and record.status_code > 400 - and not (record.status_code in [404, 409, 412] and getattr(record, 'sub_status_code', None) in [0, None]) - and hasattr(record, 'duration') and record.duration > 1000) + ret = ( + hasattr(record, "status_code") + and record.status_code > 400 + and not (record.status_code in [404, 409, 412] and getattr(record, "sub_status_code", None) in [0, None]) + and hasattr(record, "duration") + and record.duration > 1000 + ) return ret + + # Initialize the logger -logger = logging.getLogger('azure.cosmos') +logger = logging.getLogger("azure.cosmos") logger.setLevel(logging.INFO) -file_handler = logging.FileHandler('diagnostics1.output') +file_handler = logging.FileHandler("diagnostics1.output") logger.addHandler(file_handler) # When using the logging filter, you can set the filter directly on the logger logger.addFilter(CosmosStatusCodeFilter()) # Initialize the Cosmos client with diagnostics enabled, no need to pass a diagnostics handler client = CosmosClient(endpoint, key, logger=logger, enable_diagnostics_logging=True) # Create a database and container -database_name = 'SD' +database_name = "SD" database = client.create_database_if_not_exists(id=database_name) -container_name = 'SampleContainer' -partition_key = PartitionKey(path=['/State', '/City']) -container = database.create_container_if_not_exists(id=container_name, partition_key=partition_key, - offer_throughput=400) +container_name = "SampleContainer" +partition_key = PartitionKey(path=["/State", "/City"]) +container = database.create_container_if_not_exists( + id=container_name, partition_key=partition_key, offer_throughput=400 +) items = [ - {'id': '1', 'State': 'California', 'City': 'Los Angeles', 'city_level': 1}, - {'id': '2', 'State': 'Texas', 'City': 'Houston', 'city_level': 2}, - {'id': '3', 'State': 'New York', 'City': 'New York City', 'city_level': 3} + {"id": "1", "State": "California", "City": "Los Angeles", "city_level": 1}, + {"id": "2", "State": "Texas", "City": "Houston", "city_level": 2}, + {"id": "3", "State": "New York", "City": "New York City", "city_level": 3}, ] # Attempt to read nonexistent items to cause a 404 error for item in items: try: - container.read_item(item=str(item['id']), partition_key=[str(item['State']), str(item['City'])]) + container.read_item(item=str(item["id"]), partition_key=[str(item["State"]), str(item["City"])]) except exceptions.CosmosHttpResponseError: pass @@ -51,16 +60,18 @@ def filter(self, record): from queue import Queue import logging.handlers from azure.cosmos.aio import CosmosClient as CosmosAsyncClient + + async def log_cosmos_operations(): # Initialize the logger - logger = logging.getLogger('azure.cosmos') + logger = logging.getLogger("azure.cosmos") logger.setLevel(logging.INFO) # Create a queue log_queue: Queue = queue.Queue(-1) # Set up the QueueHandler queue_handler = logging.handlers.QueueHandler(log_queue) # Set up the QueueListener with a FileHandler - file_handler = logging.FileHandler('diagnostics2.output') + file_handler = logging.FileHandler("diagnostics2.output") file_handler.setLevel(logging.INFO) queue_listener = logging.handlers.QueueListener(log_queue, file_handler) # Configure the root logger @@ -72,22 +83,22 @@ async def log_cosmos_operations(): # Initialize the Cosmos client with diagnostics enabled, no need to pass a diagnostics handler async with CosmosAsyncClient(endpoint, key, logger=logger, enable_diagnostics_logging=True) as client: # Create a database and container - database_name = 'SD' + database_name = "SD" database = await client.create_database_if_not_exists(id=database_name) - container_name = 'SampleContainer' - partition_key = PartitionKey(path=['/State', '/City']) - container = await database.create_container_if_not_exists(id=container_name, partition_key=partition_key, - offer_throughput=400) + container_name = "SampleContainer" + partition_key = PartitionKey(path=["/State", "/City"]) + container = await database.create_container_if_not_exists( + id=container_name, partition_key=partition_key, offer_throughput=400 + ) # Attempt to read nonexistent items to cause a 404 error for item in items: try: - await container.read_item(item=str(item['id']), partition_key=[str(item['State']), str(item['City'])]) + await container.read_item(item=str(item["id"]), partition_key=[str(item["State"]), str(item["City"])]) except exceptions.CosmosHttpResponseError: pass # Stop the QueueListener queue_listener.stop() + # Run the async method asyncio.run(log_cosmos_operations()) - - diff --git a/sdk/cosmos/azure-cosmos/samples/document_management.py b/sdk/cosmos/azure-cosmos/samples/document_management.py index b39acb5f80db..ba751688a733 100644 --- a/sdk/cosmos/azure-cosmos/samples/document_management.py +++ b/sdk/cosmos/azure-cosmos/samples/document_management.py @@ -23,16 +23,16 @@ # Sample - demonstrates the basic CRUD operations on a Item resource for Azure Cosmos # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] -CONTAINER_MH_ID = config.settings['container_mh_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] +CONTAINER_MH_ID = config.settings["container_mh_id"] def create_items(container): - print('Creating Items') - print('\n1.1 Create Item\n') + print("Creating Items") + print("\n1.1 Create Item\n") # Create a SalesOrder object. This object has nested properties and various types including numbers, DateTimes and strings. # This can be saved as JSON as is without converting into rows/columns. @@ -46,54 +46,50 @@ def create_items(container): def read_item(container, doc_id): - print('\n1.2 Reading Item by Id\n') + print("\n1.2 Reading Item by Id\n") # Note that Reads require a partition key to be specified. response = container.read_item(item=doc_id, partition_key=doc_id) - print('Item read by Id {0}'.format(doc_id)) - print('Account Number: {0}'.format(response.get('account_number'))) - print('Subtotal: {0}'.format(response.get('subtotal'))) + print("Item read by Id {0}".format(doc_id)) + print("Account Number: {0}".format(response.get("account_number"))) + print("Subtotal: {0}".format(response.get("subtotal"))) def read_items(container): - print('\n1.3 - Reading all items in a container\n') + print("\n1.3 - Reading all items in a container\n") # NOTE: Use MaxItemCount on Options to control how many items come back per trip to the server # Important to handle throttles whenever you are doing operations such as this that might # result in a 429 (throttled request) item_list = list(container.read_all_items(max_item_count=10)) - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}'.format(doc.get('id'))) + print("Item Id: {0}".format(doc.get("id"))) def query_items(container, doc_id): - print('\n1.4 Querying for an Item by Id\n') + print("\n1.4 Querying for an Item by Id\n") # enable_cross_partition_query should be set to True as the container is partitioned - items = list(container.query_items( - query="SELECT * FROM r WHERE r.id=@id", - parameters=[ - {"name": "@id", "value": doc_id} - ], - enable_cross_partition_query=True - )) + items = list( + container.query_items( + query="SELECT * FROM r WHERE r.id=@id", + parameters=[{"name": "@id", "value": doc_id}], + enable_cross_partition_query=True, + ) + ) - print('Item queried by Id {0}'.format(items[0].get("id"))) + print("Item queried by Id {0}".format(items[0].get("id"))) def query_items_with_continuation_token(container): - print('\n1.5 Querying for Items using Pagination and Continuation Token\n') + print("\n1.5 Querying for Items using Pagination and Continuation Token\n") # When using Pagination, max_item_count will limit the number of items in each page - query_iterable = container.query_items( - query="SELECT * FROM r", - enable_cross_partition_query=True, - max_item_count=1 - ) + query_iterable = container.query_items(query="SELECT * FROM r", enable_cross_partition_query=True, max_item_count=1) item_pages = query_iterable.by_page() first_page = item_pages.next() @@ -106,78 +102,79 @@ def query_items_with_continuation_token(container): items_from_continuation = query_iterable.by_page(continuation_token) second_page_items_with_continuation = list(items_from_continuation.next()) - print('The single items in the second page are {}.'.format(second_page_items_with_continuation[0].get("id"))) + print("The single items in the second page are {}.".format(second_page_items_with_continuation[0].get("id"))) def query_items_single_partition_with_pagination(container): - print('\n1.5a Querying with Pagination - Demonstrating max_item_count and Counting Results\n') - + print("\n1.5a Querying with Pagination - Demonstrating max_item_count and Counting Results\n") + # max_item_count controls how many items are returned per page, not the total number of results # This is useful for controlling memory usage and processing items in batches max_items_per_page = 5 - + # Specify a partition key to query within a single partition partition_key_value = "SalesOrder1" # Or any partition key value you want query_iterable = container.query_items( query="SELECT * FROM c", partition_key=partition_key_value, # Query single partition - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) # Iterate through pages and count both pages and total items total_item_count = 0 page_count = 0 - + item_pages = query_iterable.by_page() for page in item_pages: page_count += 1 items_in_page = list(page) items_in_current_page = len(items_in_page) total_item_count += items_in_current_page - - print(f'Page {page_count}: Retrieved {items_in_current_page} items (max per page: {max_items_per_page})') - + + print(f"Page {page_count}: Retrieved {items_in_current_page} items (max per page: {max_items_per_page})") + # Process items in this page for item in items_in_page: # Do something with each item pass - - print(f'\nTotal pages processed: {page_count}') - print(f'Total items retrieved: {total_item_count}') - print(f'Note: max_item_count limits items PER PAGE, not total results\n') + + print(f"\nTotal pages processed: {page_count}") + print(f"Total items retrieved: {total_item_count}") + print(f"Note: max_item_count limits items PER PAGE, not total results\n") def query_items_cross_partition_with_pagination(container): - print('\n1.5b Cross-Partition Query with Pagination\n') - + print("\n1.5b Cross-Partition Query with Pagination\n") + # When querying across partitions, max_item_count still controls page size # but the results are gathered from multiple partitions max_items_per_page = 3 - + query_iterable = container.query_items( query="SELECT * FROM c ORDER BY c._ts", # Order by timestamp across all partitions enable_cross_partition_query=True, - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) - + total_item_count = 0 page_count = 0 - + item_pages = query_iterable.by_page() for page in item_pages: page_count += 1 items_in_page = list(page) total_item_count += len(items_in_page) - - print(f'Page {page_count}: {len(items_in_page)} items from across partitions') - - print(f'\nCross-partition query completed:') - print(f' - Pages: {page_count}') - print(f' - Total items: {total_item_count}') + + print(f"Page {page_count}: {len(items_in_page)} items from across partitions") + + print(f"\nCross-partition query completed:") + print(f" - Pages: {page_count}") + print(f" - Total items: {total_item_count}") + def query_items_with_feed_ranges_and_pagination(container): - print('\n1.5c Querying with Feed Range and Pagination\n') + print("\n1.5c Querying with Feed Range and Pagination\n") # We again use max_item_count to control page size max_items_per_page = 3 @@ -190,7 +187,7 @@ def query_items_with_feed_ranges_and_pagination(container): query_iterable = container.query_items( query="SELECT * FROM c", feed_range=feed_ranges_list[0], # Query specific feed range - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) # Iterate through pages and count both pages and total items @@ -204,29 +201,30 @@ def query_items_with_feed_ranges_and_pagination(container): items_in_current_page = len(items_in_page) total_item_count += items_in_current_page - print(f'Page {page_count}: Retrieved {items_in_current_page} items (max per page: {max_items_per_page})') + print(f"Page {page_count}: Retrieved {items_in_current_page} items (max per page: {max_items_per_page})") # Process items in this page for item in items_in_page: # Do something with each item pass - print(f'\nTotal pages processed: {page_count}') - print(f'Total items retrieved: {total_item_count}') - print(f'Note: max_item_count limits items PER PAGE, not total results\n') + print(f"\nTotal pages processed: {page_count}") + print(f"Total items retrieved: {total_item_count}") + print(f"Note: max_item_count limits items PER PAGE, not total results\n") + def replace_item(container, doc_id): - print('\n1.6 Replace an Item\n') + print("\n1.6 Replace an Item\n") read_item = container.read_item(item=doc_id, partition_key=doc_id) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = container.replace_item(item=read_item, body=read_item) - print('Replaced Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Replaced Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) def replace_item_using_etags(container, doc_id): - print('\n1.7 Replace an Item using Etags and IfMatch\n') + print("\n1.7 Replace an Item using Etags and IfMatch\n") # The use of etags and if-match/if-none-match options allows users to run conditional replace operations # based on the etag value passed. When using if-match, the request will only succeed if the item's latest etag # matches the passed in value. For more on optimistic concurrency control, see the link below: @@ -234,57 +232,52 @@ def replace_item_using_etags(container, doc_id): read_item = container.read_item(item=doc_id, partition_key=doc_id) item_etag = read_item["_etag"] - read_item['subtotal'] = read_item['subtotal'] + 1 - response = container.replace_item( - read_item, - read_item, - if_match=item_etag) + read_item["subtotal"] = read_item["subtotal"] + 1 + response = container.replace_item(read_item, read_item, if_match=item_etag) - print('Replaced Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Replaced Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) read_item = container.read_item(item=doc_id, partition_key=doc_id) - read_item['subtotal'] = read_item['subtotal'] + 1 - response = container.replace_item( - read_item, - read_item, - if_none_match="some-etag") + read_item["subtotal"] = read_item["subtotal"] + 1 + response = container.replace_item(read_item, read_item, if_none_match="some-etag") - print('Replaced Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Replaced Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) def upsert_item(container, doc_id): - print('\n1.8 Upserting an item\n') + print("\n1.8 Upserting an item\n") read_item = container.read_item(item=doc_id, partition_key=doc_id) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = container.upsert_item(body=read_item) - print('Upserted Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Upserted Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) def conditional_patch_item(container, doc_id): - print('\n1.9 Patching Item by Id based on filter\n') + print("\n1.9 Patching Item by Id based on filter\n") operations = [ {"op": "add", "path": "/favorite_color", "value": "red"}, {"op": "remove", "path": "/ttl"}, {"op": "replace", "path": "/tax_amount", "value": 14}, {"op": "set", "path": "/items/0/discount", "value": 20.0512}, {"op": "incr", "path": "/total_due", "value": 5}, - {"op": "move", "from": "/freight", "path": "/service_addition"} + {"op": "move", "from": "/freight", "path": "/service_addition"}, ] filter_predicate = "from c where c.tax_amount = 10" print("Filter predicate match failure will result in BadRequestException.") try: - container.patch_item(item=doc_id, partition_key=doc_id, - patch_operations=operations, filter_predicate=filter_predicate) + container.patch_item( + item=doc_id, partition_key=doc_id, patch_operations=operations, filter_predicate=filter_predicate + ) except exceptions.CosmosHttpResponseError as e: - assert (e.status_code == StatusCodes.PRECONDITION_FAILED) + assert e.status_code == StatusCodes.PRECONDITION_FAILED print("Failed as expected.") def patch_item(container, doc_id): - print('\n1.10 Patching Item by Id\n') + print("\n1.10 Patching Item by Id\n") operations = [ {"op": "add", "path": "/favorite_color", "value": "red"}, @@ -292,22 +285,31 @@ def patch_item(container, doc_id): {"op": "replace", "path": "/tax_amount", "value": 14}, {"op": "set", "path": "/items/0/discount", "value": 20.0512}, {"op": "incr", "path": "/total_due", "value": 5}, - {"op": "move", "from": "/freight", "path": "/service_addition"} + {"op": "move", "from": "/freight", "path": "/service_addition"}, ] response = container.patch_item(item=doc_id, partition_key=doc_id, patch_operations=operations) - print('Patched Item\'s Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3},' - ' set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, move from path freight={6}' - ' to path service_addition={7}'.format(response["id"], response["favorite_color"], response.get("ttl"), - response["tax_amount"], response["items"][0].get("discount"), - response["total_due"], response.get("freight"), - response["service_addition"])) + print( + "Patched Item's Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3}," + " set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, move from path freight={6}" + " to path service_addition={7}".format( + response["id"], + response["favorite_color"], + response.get("ttl"), + response["tax_amount"], + response["items"][0].get("discount"), + response["total_due"], + response.get("freight"), + response["service_addition"], + ) + ) def execute_item_batch(database): - print('\n1.11 Executing Batch Item operations\n') - container = database.create_container_if_not_exists(id="batch_container", - partition_key=PartitionKey(path='/account_number')) + print("\n1.11 Executing Batch Item operations\n") + container = database.create_container_if_not_exists( + id="batch_container", partition_key=PartitionKey(path="/account_number") + ) # We create three items to use for the sample. container.create_item(get_sales_order("read_item")) container.create_item(get_sales_order("delete_item")) @@ -318,16 +320,20 @@ def execute_item_batch(database): upsert_item_operation = ("upsert", (get_sales_order("upsert_item"),)) read_item_operation = ("read", ("read_item",)) delete_item_operation = ("delete", ("delete_item",)) - replace_item_operation = ("replace", ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"})) - replace_item_if_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_match_etag": create_response.get_response_headers().get("etag")}) - replace_item_if_none_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_none_match_etag": create_response.get_response_headers().get("etag")}) + replace_item_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + ) + replace_item_if_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_match_etag": create_response.get_response_headers().get("etag")}, + ) + replace_item_if_none_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_none_match_etag": create_response.get_response_headers().get("etag")}, + ) # Put our operations into a list batch_operations = [ @@ -337,7 +343,8 @@ def execute_item_batch(database): delete_item_operation, replace_item_operation, replace_item_if_match_operation, - replace_item_if_none_match_operation] + replace_item_if_none_match_operation, + ] # Run that list of operations batch_results = container.execute_item_batch(batch_operations=batch_operations, partition_key="Account1") @@ -364,19 +371,20 @@ def execute_item_batch(database): def delete_item(container, doc_id): - print('\n1.12 Deleting Item by Id\n') + print("\n1.12 Deleting Item by Id\n") response = container.delete_item(item=doc_id, partition_key=doc_id) - print('Deleted item\'s Id is {0}'.format(doc_id)) + print("Deleted item's Id is {0}".format(doc_id)) def delete_all_items_by_partition_key(db, partitionkey): - print('\n1.13 Deleting all Items by Partition Key\n') + print("\n1.13 Deleting all Items by Partition Key\n") # A container with a partition key that is different from id is needed - container = db.create_container_if_not_exists(id="Partition Key Delete Container", - partition_key=PartitionKey(path='/company')) + container = db.create_container_if_not_exists( + id="Partition Key Delete Container", partition_key=PartitionKey(path="/company") + ) sales_order_company_A1 = get_sales_order("SalesOrderCompanyA1") sales_order_company_A1["company"] = partitionkey container.upsert_item(sales_order_company_A1) @@ -397,25 +405,25 @@ def delete_all_items_by_partition_key(db, partitionkey): item_list = list(container.read_all_items(max_item_count=10)) - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) print("\nDelete all items for Partition Key: {}\n".format(partitionkey)) container.delete_all_items_by_partition_key(partitionkey) item_list = list(container.read_all_items()) - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) def create_mh_items(container): - print('Creating Items') - print('\n2.1 Create Item with Multi Hash Partition Key\n') + print("Creating Items") + print("\n2.1 Create Item with Multi Hash Partition Key\n") # Create a SalesOrder object. This object has nested properties and various types including numbers, DateTimes and strings. # This can be saved as JSON as is without converting into rows/columns. @@ -429,57 +437,65 @@ def create_mh_items(container): def read_mh_item(container, doc_id, pk): - print('\n2.2 Reading Item by Multi Hash Partition Key\n') + print("\n2.2 Reading Item by Multi Hash Partition Key\n") # Note that Reads require a partition key to be specified. response = container.read_item(item=doc_id, partition_key=pk) - print('Item read by Partition Key {0}'.format(pk)) - print('Account Number: {0}'.format(response.get('account_number'))) - print('Purchase Order Number: {0}'.format(response.get('purchase_order_number'))) + print("Item read by Partition Key {0}".format(pk)) + print("Account Number: {0}".format(response.get("account_number"))) + print("Purchase Order Number: {0}".format(response.get("purchase_order_number"))) def query_mh_items(container, pk): - print('\n2.3 Querying for an Item by Multi Hash Partition Key\n') + print("\n2.3 Querying for an Item by Multi Hash Partition Key\n") # enable_cross_partition_query should be set to True as the container is partitioned - items = list(container.query_items( - query="SELECT * FROM r WHERE r.account_number=@account_number and r.purchase_order_number=@purchase_order_number", - parameters=[ - {"name": "@account_number", "value": pk[0]}, - {"name": "@purchase_order_number", "value": pk[1]} - ], - enable_cross_partition_query=True - )) + items = list( + container.query_items( + query="SELECT * FROM r WHERE r.account_number=@account_number and r.purchase_order_number=@purchase_order_number", + parameters=[ + {"name": "@account_number", "value": pk[0]}, + {"name": "@purchase_order_number", "value": pk[1]}, + ], + enable_cross_partition_query=True, + ) + ) - print('Account Number: {0}'.format(items[0].get('account_number'))) - print('Purchase Order Number: {0}'.format(items[0].get('purchase_order_number'))) + print("Account Number: {0}".format(items[0].get("account_number"))) + print("Purchase Order Number: {0}".format(items[0].get("purchase_order_number"))) def replace_mh_item(container, doc_id, pk): - print('\n2.4 Replace an Item with Multi Hash Partition Key\n') + print("\n2.4 Replace an Item with Multi Hash Partition Key\n") read_item = container.read_item(item=doc_id, partition_key=pk) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = container.replace_item(item=read_item, body=read_item) - print('Replaced Item\'s Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}'.format( - response['account_number'], response['purchase_order_number'], response['subtotal'])) + print( + "Replaced Item's Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}".format( + response["account_number"], response["purchase_order_number"], response["subtotal"] + ) + ) def upsert_mh_item(container, doc_id, pk): - print('\n2.5 Upserting an item with Multi Hash Partition Key\n') + print("\n2.5 Upserting an item with Multi Hash Partition Key\n") read_item = container.read_item(item=doc_id, partition_key=pk) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = container.upsert_item(body=read_item) - print('Replaced Item\'s Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}'.format( - response['account_number'], response['purchase_order_number'], response['subtotal'])) + print( + "Replaced Item's Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}".format( + response["account_number"], response["purchase_order_number"], response["subtotal"] + ) + ) def patch_mh_item(container, doc_id, pk): - print('\n2.6 Patching Item by Multi Hash Partition Key\n') + print("\n2.6 Patching Item by Multi Hash Partition Key\n") operations = [ {"op": "add", "path": "/favorite_color", "value": "red"}, @@ -487,32 +503,41 @@ def patch_mh_item(container, doc_id, pk): {"op": "replace", "path": "/tax_amount", "value": 14}, {"op": "set", "path": "/items/0/discount", "value": 20.0512}, {"op": "incr", "path": "/total_due", "value": 5}, - {"op": "move", "from": "/freight", "path": "/service_addition"} + {"op": "move", "from": "/freight", "path": "/service_addition"}, ] response = container.patch_item(item=doc_id, partition_key=pk, patch_operations=operations) - print('Patched Item\'s Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3},' - ' set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, move from path freight={6}' - ' to path service_addition={7}'.format(response["id"], response["favorite_color"], response.get("ttl"), - response["tax_amount"], response["items"][0].get("discount"), - response["total_due"], response.get("freight"), - response["service_addition"])) + print( + "Patched Item's Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3}," + " set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, move from path freight={6}" + " to path service_addition={7}".format( + response["id"], + response["favorite_color"], + response.get("ttl"), + response["tax_amount"], + response["items"][0].get("discount"), + response["total_due"], + response.get("freight"), + response["service_addition"], + ) + ) def delete_mh_item(container, doc_id, pk): - print('\n2.7 Deleting Item by Multi Hash Partition Key\n') + print("\n2.7 Deleting Item by Multi Hash Partition Key\n") response = container.delete_item(item=doc_id, partition_key=pk) - print('Deleted item\'s Account Number is {0} Purchase Order Number is {1}'.format(pk[0], pk[1])) + print("Deleted item's Account Number is {0} Purchase Order Number is {1}".format(pk[0], pk[1])) def delete_all_items_by_partition_key_mh(db, partitionkey): - print('\n2.8 Deleting all Items by Partition Key Multi Hash\n') + print("\n2.8 Deleting all Items by Partition Key Multi Hash\n") # A container with a partition key that is different from id is needed - container = db.create_container_if_not_exists(id="Partition Key Delete Container Multi Hash", - partition_key=PartitionKey(path=['/id', '/company'], - kind='MultiHash')) + container = db.create_container_if_not_exists( + id="Partition Key Delete Container Multi Hash", + partition_key=PartitionKey(path=["/id", "/company"], kind="MultiHash"), + ) sales_order_company_A1 = get_sales_order(partitionkey[0]) sales_order_company_A1["company"] = partitionkey[1] container.upsert_item(sales_order_company_A1) @@ -533,129 +558,126 @@ def delete_all_items_by_partition_key_mh(db, partitionkey): item_list = list(container.read_all_items(max_item_count=10)) - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) print("\nDelete all items for Partition Key: {}\n".format(partitionkey)) container.delete_all_items_by_partition_key(partitionkey) item_list = list(container.read_all_items()) - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) def query_items_with_continuation_token_size_limit(container, doc_id): - print('\n2.9 Query Items With Continuation Token Size Limit.\n') + print("\n2.9 Query Items With Continuation Token Size Limit.\n") size_limit_in_kb = 8 sales_order = get_sales_order(doc_id) container.create_item(body=sales_order) # set continuation_token_limit to 8 to limit size to 8KB - items = list(container.query_items( - query="SELECT * FROM r", - partition_key=doc_id, - continuation_token_limit=size_limit_in_kb - )) + items = list( + container.query_items(query="SELECT * FROM r", partition_key=doc_id, continuation_token_limit=size_limit_in_kb) + ) - print('Continuation Token size has been limited to {}KB.'.format(size_limit_in_kb)) + print("Continuation Token size has been limited to {}KB.".format(size_limit_in_kb)) def get_sales_order(item_id): - order1 = {'id': item_id, - 'account_number': 'Account1', - 'purchase_order_number': 'PO18009186470', - 'order_date': datetime.date(2005, 1, 10).strftime('%c'), - 'subtotal': 419.4589, - 'tax_amount': 12.5838, - 'freight': 472.3108, - 'total_due': 985.018, - 'items': [ - {'order_qty': 1, - 'product_id': 100, - 'unit_price': 418.4589, - 'line_price': 418.4589 - } - ], - 'ttl': 60 * 60 * 24 * 30 - } + order1 = { + "id": item_id, + "account_number": "Account1", + "purchase_order_number": "PO18009186470", + "order_date": datetime.date(2005, 1, 10).strftime("%c"), + "subtotal": 419.4589, + "tax_amount": 12.5838, + "freight": 472.3108, + "total_due": 985.018, + "items": [{"order_qty": 1, "product_id": 100, "unit_price": 418.4589, "line_price": 418.4589}], + "ttl": 60 * 60 * 24 * 30, + } return order1 def get_sales_order_v2(item_id): # notice new fields have been added to the sales order - order2 = {'id': item_id, - 'account_number': 'Account2', - 'purchase_order_number': 'PO15428132599', - 'order_date': datetime.date(2005, 7, 11).strftime('%c'), - 'due_date': datetime.date(2005, 7, 21).strftime('%c'), - 'shipped_date': datetime.date(2005, 7, 15).strftime('%c'), - 'subtotal': 6107.0820, - 'tax_amount': 586.1203, - 'freight': 183.1626, - 'discount_amt': 1982.872, - 'total_due': 4893.3929, - 'items': [ - {'order_qty': 3, - 'product_code': 'A-123', # notice how in item details we no longer reference a ProductId - 'product_name': 'Product 1', # instead we have decided to denormalise our schema and include - 'currency_symbol': '$', # the Product details relevant to the Order on to the Order directly - 'currency_code': 'USD', # this is a typical refactor that happens in the course of an application - 'unit_price': 17.1, # that would have previously required schema changes and data migrations etc. - 'line_price': 5.7 - } - ], - 'ttl': 60 * 60 * 24 * 30 - } + order2 = { + "id": item_id, + "account_number": "Account2", + "purchase_order_number": "PO15428132599", + "order_date": datetime.date(2005, 7, 11).strftime("%c"), + "due_date": datetime.date(2005, 7, 21).strftime("%c"), + "shipped_date": datetime.date(2005, 7, 15).strftime("%c"), + "subtotal": 6107.0820, + "tax_amount": 586.1203, + "freight": 183.1626, + "discount_amt": 1982.872, + "total_due": 4893.3929, + "items": [ + { + "order_qty": 3, + "product_code": "A-123", # notice how in item details we no longer reference a ProductId + "product_name": "Product 1", # instead we have decided to denormalise our schema and include + "currency_symbol": "$", # the Product details relevant to the Order on to the Order directly + "currency_code": "USD", # this is a typical refactor that happens in the course of an application + "unit_price": 17.1, # that would have previously required schema changes and data migrations etc. + "line_price": 5.7, + } + ], + "ttl": 60 * 60 * 24 * 30, + } return order2 def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY}) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) try: # setup database for this sample db = client.create_database_if_not_exists(id=DATABASE_ID) # setup container for this sample - container = db.create_container_if_not_exists(id=CONTAINER_ID, - partition_key=PartitionKey(path='/id', kind='Hash')) + container = db.create_container_if_not_exists( + id=CONTAINER_ID, partition_key=PartitionKey(path="/id", kind="Hash") + ) create_items(container) - read_item(container, 'SalesOrder1') + read_item(container, "SalesOrder1") read_items(container) - query_items(container, 'SalesOrder1') + query_items(container, "SalesOrder1") query_items_with_continuation_token(container) query_items_with_feed_ranges_and_pagination(container) query_items_single_partition_with_pagination(container) query_items_cross_partition_with_pagination(container) - replace_item(container, 'SalesOrder1') - replace_item_using_etags(container, 'SalesOrder1') - upsert_item(container, 'SalesOrder1') - conditional_patch_item(container, 'SalesOrder1') - patch_item(container, 'SalesOrder1') + replace_item(container, "SalesOrder1") + replace_item_using_etags(container, "SalesOrder1") + upsert_item(container, "SalesOrder1") + conditional_patch_item(container, "SalesOrder1") + patch_item(container, "SalesOrder1") execute_item_batch(db) - delete_item(container, 'SalesOrder1') + delete_item(container, "SalesOrder1") delete_all_items_by_partition_key(db, "CompanyA") - query_items_with_continuation_token_size_limit(container, 'SalesOrder1') + query_items_with_continuation_token_size_limit(container, "SalesOrder1") # setup MultiHash samples container_multi_hash = db.create_container_if_not_exists( id=CONTAINER_MH_ID, - partition_key=PartitionKey(path=['/account_number', '/purchase_order_number'], kind="MultiHash")) + partition_key=PartitionKey(path=["/account_number", "/purchase_order_number"], kind="MultiHash"), + ) create_mh_items(container_multi_hash) - read_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - query_mh_items(container_multi_hash, ['Account1', 'PO18009186470']) - replace_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - upsert_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - patch_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - delete_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) + read_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + query_mh_items(container_multi_hash, ["Account1", "PO18009186470"]) + replace_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + upsert_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + patch_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + delete_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) delete_all_items_by_partition_key_mh(db, ["SalesOrderCompany", "CompanyA"]) # cleanup database after sample @@ -666,11 +688,11 @@ def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/document_management_async.py b/sdk/cosmos/azure-cosmos/samples/document_management_async.py index fb817a3c7747..59f0c7a13bb1 100644 --- a/sdk/cosmos/azure-cosmos/samples/document_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/document_management_async.py @@ -24,16 +24,16 @@ # Sample - demonstrates the basic CRUD operations on a Item resource for Azure Cosmos # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] -CONTAINER_MH_ID = config.settings['container_mh_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] +CONTAINER_MH_ID = config.settings["container_mh_id"] async def create_items(container): - print('Creating Items') - print('\n1.1 Create Item\n') + print("Creating Items") + print("\n1.1 Create Item\n") # Create a SalesOrder object. This object has nested properties and various types including numbers, DateTimes and strings. # This can be saved as JSON as is without converting into rows/columns. @@ -47,18 +47,18 @@ async def create_items(container): async def read_item(container, doc_id): - print('\n1.2 Reading Item by Id\n') + print("\n1.2 Reading Item by Id\n") # Note that Reads require a partition key to be specified. response = await container.read_item(item=doc_id, partition_key=doc_id) - print('Item read by Id {0}'.format(doc_id)) - print('Account Number: {0}'.format(response.get('account_number'))) - print('Subtotal: {0}'.format(response.get('subtotal'))) + print("Item read by Id {0}".format(doc_id)) + print("Account Number: {0}".format(response.get("account_number"))) + print("Subtotal: {0}".format(response.get("subtotal"))) async def read_items(container): - print('\n1.3 - Reading all items in a container\n') + print("\n1.3 - Reading all items in a container\n") # NOTE: Use MaxItemCount on Options to control how many items come back per trip to the server # Important to handle throttles whenever you are doing operations such as this that might @@ -72,44 +72,38 @@ async def read_items(container): # it doesn't deal with partition key logic the way query_items() does item_list = [item async for item in read_all_items_response] - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}'.format(doc.get('id'))) + print("Item Id: {0}".format(doc.get("id"))) # Alternatively, you can directly iterate over the asynchronous iterator without building a separate # list if you don't need the ordering or indexing capabilities async for item in read_all_items_response: - print(item.get('id')) + print(item.get("id")) async def query_items(container, doc_id): - print('\n1.4 Querying for an Item by Id\n') + print("\n1.4 Querying for an Item by Id\n") # The enable_cross_partition_query option is not used by the async client - this is the default behavior # In this case, we do have to await the asynchronous iterator object since logic # within the query_items() method makes network calls to verify the partition key # definition in the container query_items_response = container.query_items( - query="SELECT * FROM r WHERE r.id=@id", - parameters=[ - {"name": "@id", "value": doc_id} - ] + query="SELECT * FROM r WHERE r.id=@id", parameters=[{"name": "@id", "value": doc_id}] ) items = [item async for item in query_items_response] - print('Item queried by Id {0}'.format(items[0].get("id"))) + print("Item queried by Id {0}".format(items[0].get("id"))) async def query_items_with_continuation_token(container): - print('\n1.5 Querying for Items using Pagination and Continuation Token\n') + print("\n1.5 Querying for Items using Pagination and Continuation Token\n") # When using Pagination, max_item_count will limit the number of items in each page - query_iterable = container.query_items( - query="SELECT * FROM r", - max_item_count=1 - ) + query_iterable = container.query_items(query="SELECT * FROM r", max_item_count=1) item_pages = query_iterable.by_page() first_page = await anext(item_pages) # type: ignore[name-defined] # cspell:disable-line @@ -120,80 +114,82 @@ async def query_items_with_continuation_token(container): # Now we use the continuation token from the first page to pick up where we left off and # access the second page of items items_from_continuation = query_iterable.by_page(continuation_token) - second_page_items_with_continuation = \ - [i async for i in await anext(items_from_continuation)] # type: ignore[name-defined] # cspell:disable-line + second_page_items_with_continuation = [ + i async for i in await anext(items_from_continuation) + ] # type: ignore[name-defined] # cspell:disable-line - print('The single items in the second page are {}'.format(second_page_items_with_continuation[0].get("id"))) + print("The single items in the second page are {}".format(second_page_items_with_continuation[0].get("id"))) async def query_items_single_partition_with_pagination(container): - print('\n1.5a Querying with Pagination - Demonstrating max_item_count and Counting Results\n') - + print("\n1.5a Querying with Pagination - Demonstrating max_item_count and Counting Results\n") + # max_item_count controls how many items are returned per page, not the total number of results # This is useful for controlling memory usage and processing items in batches max_items_per_page = 5 # Specify a partition key to query within a single partition partition_key_value = "SalesOrder1" # Or any partition key value you want - + query_iterable = container.query_items( query="SELECT * FROM c", partition_key=partition_key_value, # Query single partition - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) - + # Iterate through pages and count both pages and total items total_item_count = 0 page_count = 0 - + item_pages = query_iterable.by_page() async for page in item_pages: page_count += 1 items_in_page = [item async for item in page] items_in_current_page = len(items_in_page) total_item_count += items_in_current_page - - print(f'Page {page_count}: Retrieved {items_in_current_page} items (max per page: {max_items_per_page})') - + + print(f"Page {page_count}: Retrieved {items_in_current_page} items (max per page: {max_items_per_page})") + # Process items in this page for item in items_in_page: # Do something with each item pass - - print(f'\nTotal pages processed: {page_count}') - print(f'Total items retrieved: {total_item_count}') - print(f'Note: max_item_count limits items PER PAGE, not total results\n') + + print(f"\nTotal pages processed: {page_count}") + print(f"Total items retrieved: {total_item_count}") + print(f"Note: max_item_count limits items PER PAGE, not total results\n") async def query_items_cross_partition_with_pagination(container): - print('\n1.5b Cross-Partition Query with Pagination\n') - + print("\n1.5b Cross-Partition Query with Pagination\n") + # When querying across partitions, max_item_count still controls page size # but the results are gathered from multiple partitions max_items_per_page = 3 - + query_iterable = container.query_items( query="SELECT * FROM c ORDER BY c._ts", # Order by timestamp across all partitions - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) - + total_item_count = 0 page_count = 0 - + item_pages = query_iterable.by_page() async for page in item_pages: page_count += 1 items_in_page = [item async for item in page] total_item_count += len(items_in_page) - - print(f'Page {page_count}: {len(items_in_page)} items from across partitions') - - print(f'\nCross-partition query completed:') - print(f' - Pages: {page_count}') - print(f' - Total items: {total_item_count}') + + print(f"Page {page_count}: {len(items_in_page)} items from across partitions") + + print(f"\nCross-partition query completed:") + print(f" - Pages: {page_count}") + print(f" - Total items: {total_item_count}") + async def query_items_with_feed_ranges_and_pagination(container): - print('\n1.5c Querying with Feed Range and Pagination\n') + print("\n1.5c Querying with Feed Range and Pagination\n") # We again use max_item_count to control page size max_items_per_page = 3 @@ -206,7 +202,7 @@ async def query_items_with_feed_ranges_and_pagination(container): query_iterable = container.query_items( query="SELECT * FROM c", feed_range=feed_ranges_list[0], # Query specific feed range - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) # Iterate through pages and count both pages and total items @@ -219,24 +215,25 @@ async def query_items_with_feed_ranges_and_pagination(container): items_in_page = [item async for item in page] total_item_count += len(items_in_page) - print(f'Page {page_count}: {len(items_in_page)} items from across partitions') + print(f"Page {page_count}: {len(items_in_page)} items from across partitions") + + print(f"\nCross-partition query completed:") + print(f" - Pages: {page_count}") + print(f" - Total items: {total_item_count}") - print(f'\nCross-partition query completed:') - print(f' - Pages: {page_count}') - print(f' - Total items: {total_item_count}') async def replace_item(container, doc_id): - print('\n1.6 Replace an Item\n') + print("\n1.6 Replace an Item\n") read_item = await container.read_item(item=doc_id, partition_key=doc_id) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = await container.replace_item(item=read_item, body=read_item) - print('Replaced Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Replaced Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) async def replace_item_using_etags(container, doc_id): - print('\n1.7 Replace an Item using Etags and IfMatch\n') + print("\n1.7 Replace an Item using Etags and IfMatch\n") # The use of etags and if-match/if-none-match options allows users to run conditional replace operations # based on the etag value passed. When using if-match, the request will only succeed if the item's latest etag # matches the passed in value. For more on optimistic concurrency control, see the link below: @@ -244,57 +241,52 @@ async def replace_item_using_etags(container, doc_id): read_item = await container.read_item(item=doc_id, partition_key=doc_id) item_etag = read_item["_etag"] - read_item['subtotal'] = read_item['subtotal'] + 1 - response = await container.replace_item( - read_item, - read_item, - if_match=item_etag) + read_item["subtotal"] = read_item["subtotal"] + 1 + response = await container.replace_item(read_item, read_item, if_match=item_etag) - print('Replaced Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Replaced Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) read_item = await container.read_item(item=doc_id, partition_key=doc_id) - read_item['subtotal'] = read_item['subtotal'] + 1 - response = await container.replace_item( - read_item, - read_item, - if_none_match="some-etag") + read_item["subtotal"] = read_item["subtotal"] + 1 + response = await container.replace_item(read_item, read_item, if_none_match="some-etag") - print('Replaced Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Replaced Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) async def upsert_item(container, doc_id): - print('\n1.8 Upserting an item\n') + print("\n1.8 Upserting an item\n") read_item = await container.read_item(item=doc_id, partition_key=doc_id) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = await container.upsert_item(body=read_item) - print('Upserted Item\'s Id is {0}, new subtotal={1}'.format(response['id'], response['subtotal'])) + print("Upserted Item's Id is {0}, new subtotal={1}".format(response["id"], response["subtotal"])) async def conditional_patch_item(container, doc_id): - print('\n1.9 Patching Item by Id based on filter\n') + print("\n1.9 Patching Item by Id based on filter\n") operations = [ {"op": "add", "path": "/favorite_color", "value": "red"}, {"op": "remove", "path": "/ttl"}, {"op": "replace", "path": "/tax_amount", "value": 14}, {"op": "set", "path": "/items/0/discount", "value": 20.0512}, {"op": "incr", "path": "/total_due", "value": 5}, - {"op": "move", "from": "/freight", "path": "/service_addition"} + {"op": "move", "from": "/freight", "path": "/service_addition"}, ] filter_predicate = "from c where c.tax_amount = 10" print("Filter predicate match failure will result in BadRequestException.") try: - await container.patch_item(item=doc_id, partition_key=doc_id, - patch_operations=operations, filter_predicate=filter_predicate) + await container.patch_item( + item=doc_id, partition_key=doc_id, patch_operations=operations, filter_predicate=filter_predicate + ) except exceptions.CosmosHttpResponseError as e: - assert (e.status_code == StatusCodes.PRECONDITION_FAILED) + assert e.status_code == StatusCodes.PRECONDITION_FAILED print("Failed as expected.") async def patch_item(container, doc_id): - print('\n1.10 Patching Item by Id\n') + print("\n1.10 Patching Item by Id\n") operations = [ {"op": "add", "path": "/favorite_color", "value": "red"}, @@ -302,24 +294,31 @@ async def patch_item(container, doc_id): {"op": "replace", "path": "/tax_amount", "value": 14}, {"op": "set", "path": "/items/0/discount", "value": 20.0512}, {"op": "incr", "path": "/total_due", "value": 5}, - {"op": "move", "from": "/freight", "path": "/service_addition"} + {"op": "move", "from": "/freight", "path": "/service_addition"}, ] response = await container.patch_item(item=doc_id, partition_key=doc_id, patch_operations=operations) - print('Patched Item\'s Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3},' - ' set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, ' - 'move from path freight={6} to path service_addition={7}'.format(response["id"], response["favorite_color"], - response.get("ttl"), response["tax_amount"], - response["items"][0].get("discount"), - response["total_due"], - response.get("freight"), - response["service_addition"])) + print( + "Patched Item's Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3}," + " set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, " + "move from path freight={6} to path service_addition={7}".format( + response["id"], + response["favorite_color"], + response.get("ttl"), + response["tax_amount"], + response["items"][0].get("discount"), + response["total_due"], + response.get("freight"), + response["service_addition"], + ) + ) async def execute_item_batch(database): - print('\n1.11 Executing Batch Item operations\n') - container = await database.create_container_if_not_exists(id="batch_container", - partition_key=PartitionKey(path='/account_number')) + print("\n1.11 Executing Batch Item operations\n") + container = await database.create_container_if_not_exists( + id="batch_container", partition_key=PartitionKey(path="/account_number") + ) # We create three items to use for the sample. await container.create_item(get_sales_order("read_item")) await container.create_item(get_sales_order("delete_item")) @@ -330,16 +329,20 @@ async def execute_item_batch(database): upsert_item_operation = ("upsert", (get_sales_order("upsert_item"),)) read_item_operation = ("read", ("read_item",)) delete_item_operation = ("delete", ("delete_item",)) - replace_item_operation = ("replace", ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"})) - replace_item_if_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_match_etag": create_response.get_response_headers().get("etag")}) - replace_item_if_none_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_none_match_etag": create_response.get_response_headers().get("etag")}) + replace_item_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + ) + replace_item_if_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_match_etag": create_response.get_response_headers().get("etag")}, + ) + replace_item_if_none_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_none_match_etag": create_response.get_response_headers().get("etag")}, + ) # Put our operations into a list batch_operations = [ @@ -349,7 +352,8 @@ async def execute_item_batch(database): delete_item_operation, replace_item_operation, replace_item_if_match_operation, - replace_item_if_none_match_operation] + replace_item_if_none_match_operation, + ] # Run that list of operations batch_results = await container.execute_item_batch(batch_operations=batch_operations, partition_key="Account1") @@ -376,19 +380,20 @@ async def execute_item_batch(database): async def delete_item(container, doc_id): - print('\n1.12 Deleting Item by Id\n') + print("\n1.12 Deleting Item by Id\n") await container.delete_item(item=doc_id, partition_key=doc_id) - print('Deleted item\'s Id is {0}'.format(doc_id)) + print("Deleted item's Id is {0}".format(doc_id)) async def delete_all_items_by_partition_key(db, partitionkey): - print('\n1.13 Deleting all Items by Partition Key\n') + print("\n1.13 Deleting all Items by Partition Key\n") # A container with a partition key that is different from id is needed - container = await db.create_container_if_not_exists(id="Partition Key Delete Container", - partition_key=PartitionKey(path='/company')) + container = await db.create_container_if_not_exists( + id="Partition Key Delete Container", partition_key=PartitionKey(path="/company") + ) sales_order_company_A1 = get_sales_order("SalesOrderCompanyA1") sales_order_company_A1["company"] = partitionkey await container.upsert_item(sales_order_company_A1) @@ -409,25 +414,25 @@ async def delete_all_items_by_partition_key(db, partitionkey): item_list = [item async for item in container.read_all_items()] - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) print("\nDelete all items for Partition Key: {}\n".format(partitionkey)) await container.delete_all_items_by_partition_key(partitionkey) item_list = [item async for item in container.read_all_items()] - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) async def create_mh_items(container): - print('Creating Items') - print('\n2.1 Create Item with Multi Hash Partition Key\n') + print("Creating Items") + print("\n2.1 Create Item with Multi Hash Partition Key\n") # Create a SalesOrder object. This object has nested properties and various types including numbers, DateTimes and strings. # This can be saved as JSON as is without converting into rows/columns. @@ -441,57 +446,60 @@ async def create_mh_items(container): async def read_mh_item(container, doc_id, pk): - print('\n2.2 Reading Item by Multi Hash Partition Key\n') + print("\n2.2 Reading Item by Multi Hash Partition Key\n") # Note that Reads require a partition key to be specified. response = await container.read_item(item=doc_id, partition_key=pk) - print('Item read by Partition Key {0}'.format(pk)) - print('Account Number: {0}'.format(response.get('account_number'))) - print('Purchase Order Number: {0}'.format(response.get('purchase_order_number'))) + print("Item read by Partition Key {0}".format(pk)) + print("Account Number: {0}".format(response.get("account_number"))) + print("Purchase Order Number: {0}".format(response.get("purchase_order_number"))) async def query_mh_items(container, pk): - print('\n2.3 Querying for an Item by Multi Hash Partition Key\n') + print("\n2.3 Querying for an Item by Multi Hash Partition Key\n") query_items_response = container.query_items( query="SELECT * FROM r WHERE r.account_number=@account_number and r.purchase_order_number=@purchase_order_number", - parameters=[ - {"name": "@account_number", "value": pk[0]}, - {"name": "@purchase_order_number", "value": pk[1]} - ] + parameters=[{"name": "@account_number", "value": pk[0]}, {"name": "@purchase_order_number", "value": pk[1]}], ) items = [item async for item in query_items_response] - print('Account Number: {0}'.format(items[0].get('account_number'))) - print('Purchase Order Number: {0}'.format(items[0].get('purchase_order_number'))) + print("Account Number: {0}".format(items[0].get("account_number"))) + print("Purchase Order Number: {0}".format(items[0].get("purchase_order_number"))) async def replace_mh_item(container, doc_id, pk): - print('\n2.4 Replace an Item with Multi Hash Partition Key\n') + print("\n2.4 Replace an Item with Multi Hash Partition Key\n") read_item = await container.read_item(item=doc_id, partition_key=pk) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = await container.replace_item(item=read_item, body=read_item) - print('Replaced Item\'s Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}'.format( - response['account_number'], response['purchase_order_number'], response['subtotal'])) + print( + "Replaced Item's Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}".format( + response["account_number"], response["purchase_order_number"], response["subtotal"] + ) + ) async def upsert_mh_item(container, doc_id, pk): - print('\n2.5 Upserting an item with Multi Hash Partition Key\n') + print("\n2.5 Upserting an item with Multi Hash Partition Key\n") read_item = await container.read_item(item=doc_id, partition_key=pk) - read_item['subtotal'] = read_item['subtotal'] + 1 + read_item["subtotal"] = read_item["subtotal"] + 1 response = await container.upsert_item(body=read_item) - print('Replaced Item\'s Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}'.format( - response['account_number'], response['purchase_order_number'], response['subtotal'])) + print( + "Replaced Item's Account Number is {0}, Purchase Order Number is {1}, new subtotal={2}".format( + response["account_number"], response["purchase_order_number"], response["subtotal"] + ) + ) async def patch_mh_item(container, doc_id, pk): - print('\n2.6 Patching Item by Multi Hash Partition Key\n') + print("\n2.6 Patching Item by Multi Hash Partition Key\n") operations = [ {"op": "add", "path": "/favorite_color", "value": "red"}, @@ -499,32 +507,41 @@ async def patch_mh_item(container, doc_id, pk): {"op": "replace", "path": "/tax_amount", "value": 14}, {"op": "set", "path": "/items/0/discount", "value": 20.0512}, {"op": "incr", "path": "/total_due", "value": 5}, - {"op": "move", "from": "/freight", "path": "/service_addition"} + {"op": "move", "from": "/freight", "path": "/service_addition"}, ] response = await container.patch_item(item=doc_id, partition_key=pk, patch_operations=operations) - print('Patched Item\'s Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3},' - ' set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, move from path freight={6}' - ' to path service_addition={7}'.format(response["id"], response["favorite_color"], response.get("ttl"), - response["tax_amount"], response["items"][0].get("discount"), - response["total_due"], response.get("freight"), - response["service_addition"])) + print( + "Patched Item's Id is {0}, new path favorite color={1}, removed path ttl={2}, replaced path tax_amount={3}," + " set path for item at index 0 of discount={4}, increase in path total_due, new total_due={5}, move from path freight={6}" + " to path service_addition={7}".format( + response["id"], + response["favorite_color"], + response.get("ttl"), + response["tax_amount"], + response["items"][0].get("discount"), + response["total_due"], + response.get("freight"), + response["service_addition"], + ) + ) async def delete_mh_item(container, doc_id, pk): - print('\n2.7 Deleting Item by Multi Hash Partition Key\n') + print("\n2.7 Deleting Item by Multi Hash Partition Key\n") response = await container.delete_item(item=doc_id, partition_key=pk) - print('Deleted item\'s Account Number is {0} Purchase Order Number is {1}'.format(pk[0], pk[1])) + print("Deleted item's Account Number is {0} Purchase Order Number is {1}".format(pk[0], pk[1])) async def delete_all_items_by_partition_key_mh(db, partitionkey): - print('\n2.8 Deleting all Items by Partition Key Multi Hash\n') + print("\n2.8 Deleting all Items by Partition Key Multi Hash\n") # A container with a partition key that is different from id is needed - container = await db.create_container_if_not_exists(id="Partition Key Delete Container Multi Hash", - partition_key=PartitionKey(path=['/id', '/company'], - kind='MultiHash')) + container = await db.create_container_if_not_exists( + id="Partition Key Delete Container Multi Hash", + partition_key=PartitionKey(path=["/id", "/company"], kind="MultiHash"), + ) sales_order_company_A1 = get_sales_order(partitionkey[0]) sales_order_company_A1["company"] = partitionkey[1] await container.upsert_item(sales_order_company_A1) @@ -545,24 +562,24 @@ async def delete_all_items_by_partition_key_mh(db, partitionkey): item_list = [item async for item in container.read_all_items()] - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) print("\nDelete all items for Partition Key: {}\n".format(partitionkey)) await container.delete_all_items_by_partition_key(partitionkey) item_list = [item async for item in container.read_all_items()] - print('Found {0} items'.format(item_list.__len__())) + print("Found {0} items".format(item_list.__len__())) for doc in item_list: - print('Item Id: {0}; Partition Key: {1}'.format(doc.get('id'), doc.get("company"))) + print("Item Id: {0}; Partition Key: {1}".format(doc.get("id"), doc.get("company"))) async def query_items_with_continuation_token_size_limit(container, doc_id): - print('\n2.9 Query Items With Continuation Token Size Limit.\n') + print("\n2.9 Query Items With Continuation Token Size Limit.\n") size_limit_in_kb = 8 sales_order = get_sales_order(doc_id) @@ -570,107 +587,102 @@ async def query_items_with_continuation_token_size_limit(container, doc_id): # set continuation_token_limit to 8 to limit size to 8KB items = container.query_items( - query="SELECT * FROM r", - partition_key=doc_id, - continuation_token_limit=size_limit_in_kb + query="SELECT * FROM r", partition_key=doc_id, continuation_token_limit=size_limit_in_kb ) - print('Continuation Token size has been limited to {}KB.'.format(size_limit_in_kb)) + print("Continuation Token size has been limited to {}KB.".format(size_limit_in_kb)) def get_sales_order(item_id): - order1 = {'id': item_id, - 'account_number': 'Account1', - 'purchase_order_number': 'PO18009186470', - 'order_date': datetime.date(2005, 1, 10).strftime('%c'), - 'subtotal': 419.4589, - 'tax_amount': 12.5838, - 'freight': 472.3108, - 'total_due': 985.018, - 'items': [ - {'order_qty': 1, - 'product_id': 100, - 'unit_price': 418.4589, - 'line_price': 418.4589 - } - ], - 'ttl': 60 * 60 * 24 * 30 - } + order1 = { + "id": item_id, + "account_number": "Account1", + "purchase_order_number": "PO18009186470", + "order_date": datetime.date(2005, 1, 10).strftime("%c"), + "subtotal": 419.4589, + "tax_amount": 12.5838, + "freight": 472.3108, + "total_due": 985.018, + "items": [{"order_qty": 1, "product_id": 100, "unit_price": 418.4589, "line_price": 418.4589}], + "ttl": 60 * 60 * 24 * 30, + } return order1 def get_sales_order_v2(item_id): # notice new fields have been added to the sales order - order2 = {'id': item_id, - 'account_number': 'Account2', - 'purchase_order_number': 'PO15428132599', - 'order_date': datetime.date(2005, 7, 11).strftime('%c'), - 'due_date': datetime.date(2005, 7, 21).strftime('%c'), - 'shipped_date': datetime.date(2005, 7, 15).strftime('%c'), - 'subtotal': 6107.0820, - 'tax_amount': 586.1203, - 'freight': 183.1626, - 'discount_amt': 1982.872, - 'total_due': 4893.3929, - 'items': [ - {'order_qty': 3, - 'product_code': 'A-123', # notice how in item details we no longer reference a ProductId - 'product_name': 'Product 1', # instead we have decided to denormalise our schema and include - 'currency_symbol': '$', # the Product details relevant to the Order on to the Order directly - 'currency_code': 'USD', # this is a typical refactor that happens in the course of an application - 'unit_price': 17.1, # that would have previously required schema changes and data migrations etc. - 'line_price': 5.7 - } - ], - 'ttl': 60 * 60 * 24 * 30 - } + order2 = { + "id": item_id, + "account_number": "Account2", + "purchase_order_number": "PO15428132599", + "order_date": datetime.date(2005, 7, 11).strftime("%c"), + "due_date": datetime.date(2005, 7, 21).strftime("%c"), + "shipped_date": datetime.date(2005, 7, 15).strftime("%c"), + "subtotal": 6107.0820, + "tax_amount": 586.1203, + "freight": 183.1626, + "discount_amt": 1982.872, + "total_due": 4893.3929, + "items": [ + { + "order_qty": 3, + "product_code": "A-123", # notice how in item details we no longer reference a ProductId + "product_name": "Product 1", # instead we have decided to denormalise our schema and include + "currency_symbol": "$", # the Product details relevant to the Order on to the Order directly + "currency_code": "USD", # this is a typical refactor that happens in the course of an application + "unit_price": 17.1, # that would have previously required schema changes and data migrations etc. + "line_price": 5.7, + } + ], + "ttl": 60 * 60 * 24 * 30, + } return order2 async def run_sample(): - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: try: # setup database for this sample db = await client.create_database_if_not_exists(id=DATABASE_ID) # setup container for this sample - container = await db.create_container_if_not_exists(id=CONTAINER_ID, - partition_key=PartitionKey(path='/id', kind='Hash')) - print('Container with id \'{0}\' created'.format(CONTAINER_ID)) + container = await db.create_container_if_not_exists( + id=CONTAINER_ID, partition_key=PartitionKey(path="/id", kind="Hash") + ) + print("Container with id '{0}' created".format(CONTAINER_ID)) await create_items(container) - await read_item(container, 'SalesOrder1') + await read_item(container, "SalesOrder1") await read_items(container) - await query_items(container, 'SalesOrder1') + await query_items(container, "SalesOrder1") await query_items_with_continuation_token(container) await query_items_with_feed_ranges_and_pagination(container) await query_items_single_partition_with_pagination(container) await query_items_cross_partition_with_pagination(container) - await replace_item(container, 'SalesOrder1') - await replace_item_using_etags(container, 'SalesOrder1') - await upsert_item(container, 'SalesOrder1') - await conditional_patch_item(container, 'SalesOrder1') - await patch_item(container, 'SalesOrder1') - await delete_item(container, 'SalesOrder1') + await replace_item(container, "SalesOrder1") + await replace_item_using_etags(container, "SalesOrder1") + await upsert_item(container, "SalesOrder1") + await conditional_patch_item(container, "SalesOrder1") + await patch_item(container, "SalesOrder1") + await delete_item(container, "SalesOrder1") await delete_all_items_by_partition_key(db, "CompanyA") - await query_items_with_continuation_token_size_limit(container, 'SalesOrder1') + await query_items_with_continuation_token_size_limit(container, "SalesOrder1") # setup MultiHash samples - container_multi_hash = await db.create_container_if_not_exists(id=CONTAINER_MH_ID, - partition_key=PartitionKey( - path=['/account_number', - '/purchase_order_number'], - kind="MultiHash")) + container_multi_hash = await db.create_container_if_not_exists( + id=CONTAINER_MH_ID, + partition_key=PartitionKey(path=["/account_number", "/purchase_order_number"], kind="MultiHash"), + ) await create_mh_items(container_multi_hash) - await read_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - await query_mh_items(container_multi_hash, ['Account1', 'PO18009186470']) - await replace_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - await upsert_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - await patch_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) - await delete_mh_item(container_multi_hash, 'SalesOrder1', ['Account1', 'PO18009186470']) + await read_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + await query_mh_items(container_multi_hash, ["Account1", "PO18009186470"]) + await replace_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + await upsert_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + await patch_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) + await delete_mh_item(container_multi_hash, "SalesOrder1", ["Account1", "PO18009186470"]) await delete_all_items_by_partition_key_mh(db, ["SalesOrderCompany", "CompanyA"]) # cleanup database after sample @@ -681,11 +693,11 @@ async def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/examples.py b/sdk/cosmos/azure-cosmos/samples/examples.py index 56b3b9534baf..06d70a5fa4a6 100644 --- a/sdk/cosmos/azure-cosmos/samples/examples.py +++ b/sdk/cosmos/azure-cosmos/samples/examples.py @@ -35,9 +35,7 @@ # [START create_container] container_name = "products" try: - container = database.create_container( - id=container_name, partition_key=PartitionKey(path="/productName") - ) + container = database.create_container(id=container_name, partition_key=PartitionKey(path="/productName")) except exceptions.CosmosResourceExistsError: container = database.get_container_client(container_name) # [END create_container] @@ -67,16 +65,14 @@ # [START list_containers] database = client.get_database_client(database_name) for container_dict in database.list_containers(): - print("Container ID: {}".format(container_dict['id'])) + print("Container ID: {}".format(container_dict["id"])) # [END list_containers] # Insert new items by defining a dict and calling Container.upsert_item # [START upsert_items] container = database.get_container_client(container_name) for i in range(1, 10): - container.upsert_item( - dict(id="item{}".format(i), productName="Widget", productModel="Model {}".format(i)) - ) + container.upsert_item(dict(id="item{}".format(i), productName="Widget", productModel="Model {}".format(i))) # [END upsert_items] # Modify an existing item in the container @@ -119,7 +115,7 @@ for queried_item in container.query_items( query='SELECT * FROM products p WHERE p.productModel <> "DISCONTINUED"', enable_cross_partition_query=True, - priority="High" + priority="High", ): print(json.dumps(queried_item, indent=True)) @@ -143,8 +139,7 @@ # All requests from this client will have Low priority by default for queried_item in low_priority_container.query_items( - query='SELECT * FROM products p WHERE p.productName = "Widget"', - enable_cross_partition_query=True + query='SELECT * FROM products p WHERE p.productName = "Widget"', enable_cross_partition_query=True ): print(json.dumps(queried_item, indent=True)) @@ -171,14 +166,13 @@ for important_item in container_with_priority.query_items( query='SELECT * FROM products p WHERE p.priority = "High"', enable_cross_partition_query=True, - priority="High" # Request-level priority overrides client-level priority + priority="High", # Request-level priority overrides client-level priority ): print(json.dumps(important_item, indent=True)) # This query will use the client's default Low priority for normal_item in container_with_priority.query_items( - query='SELECT * FROM products p WHERE p.priority = "Low"', - enable_cross_partition_query=True + query='SELECT * FROM products p WHERE p.priority = "Low"', enable_cross_partition_query=True ): print(json.dumps(normal_item, indent=True)) @@ -202,7 +196,7 @@ for feed_range in container.read_feed_ranges(): for queried_item in container.query_items( - query='SELECT * FROM c', + query="SELECT * FROM c", feed_range=feed_range, ): print(json.dumps(queried_item, indent=True)) @@ -220,25 +214,36 @@ properties = container._get_properties() # Print _rid and partitionKey -print("Resource ID: ", properties.get('_rid')) -print("Partition Key: ", properties.get('partitionKey')) +print("Resource ID: ", properties.get("_rid")) +print("Partition Key: ", properties.get("partitionKey")) # Read the container to get the latests of all the Container Properties. (This will make a backend requests and will consume RUs) container_properties = container.read() # Print each property one by one if they are currently in the container properties print("indexingPolicy: ", container_properties.get("indexingPolicy")) -print("etag: ", container_properties.get('_etag')) -print("lastModified: ", container_properties.get('lastModified')) -print("defaultTtl: ", container_properties.get('defaultTtl')) -print("uniqueKeyPolicy: ", container_properties.get('uniqueKeyPolicy')) -print("conflictResolutionPolicy: ", container_properties.get('conflictResolutionPolicy')) -print("changeFeedPolicy: ", container_properties.get('changeFeedPolicy')) -print("geospatialConfig: ", container_properties.get('geospatialConfig')) +print("etag: ", container_properties.get("_etag")) +print("lastModified: ", container_properties.get("lastModified")) +print("defaultTtl: ", container_properties.get("defaultTtl")) +print("uniqueKeyPolicy: ", container_properties.get("uniqueKeyPolicy")) +print("conflictResolutionPolicy: ", container_properties.get("conflictResolutionPolicy")) +print("changeFeedPolicy: ", container_properties.get("changeFeedPolicy")) +print("geospatialConfig: ", container_properties.get("geospatialConfig")) # Print remaining properties if they are in the current container properties for key, value in container_properties.items(): - if key not in ['_rid', 'partitionKey', 'indexingPolicy', '_etag', 'lastModified', 'defaultTtl', 'uniqueKeyPolicy', 'conflictResolutionPolicy', 'changeFeedPolicy', 'geospatialConfig']: + if key not in [ + "_rid", + "partitionKey", + "indexingPolicy", + "_etag", + "lastModified", + "defaultTtl", + "uniqueKeyPolicy", + "conflictResolutionPolicy", + "changeFeedPolicy", + "geospatialConfig", + ]: print(f"{key}: {value}") # [END get_container_properties] @@ -248,11 +253,11 @@ # when the TTL has elapsed since it was last edited. # [START reset_container_properties] # Set the TTL on the container to 3600 seconds (one hour) -database.replace_container(container, partition_key=PartitionKey(path='/productName'), default_ttl=3600) +database.replace_container(container, partition_key=PartitionKey(path="/productName"), default_ttl=3600) # Display the new TTL setting for the container container_props = database.get_container_client(container_name).read() -print("New container TTL: {}".format(json.dumps(container_props['defaultTtl']))) +print("New container TTL: {}".format(json.dumps(container_props["defaultTtl"]))) # [END reset_container_properties] # Create a user in the database. @@ -269,9 +274,7 @@ container_name = "products" container = database.get_container_client(container_name) for i in range(1, 10): - container.upsert_item( - dict(id="item{}".format(i), productName="Gadget", productModel="Model {}".format(i)) - ) + container.upsert_item(dict(id="item{}".format(i), productName="Gadget", productModel="Model {}".format(i))) items = container.read_all_items() for item_dict in items: print(json.dumps(item_dict, indent=True)) @@ -296,9 +299,7 @@ # insert items in a subpartitioned container # [START upsert_items] for i in range(1, 10): - container.upsert_item( - dict(id="item{}".format(i), state="WA", city="Redmond", zipcode=98052) - ) + container.upsert_item(dict(id="item{}".format(i), state="WA", city="Redmond", zipcode=98052)) # [END upsert_items] # Modify an existing item in the container @@ -323,9 +324,7 @@ # [END query_items] # [START delete_items] -for queried_item in container.query_items( - query='SELECT * FROM products p WHERE p.state = "GA"' -): +for queried_item in container.query_items(query='SELECT * FROM products p WHERE p.state = "GA"'): container.delete_item(queried_item, partition_key=["GA", "Atlanta", 30363]) # [END delete_items] @@ -363,18 +362,11 @@ # configure availability strategy config on request level # [START read_item_with_availability_strategy] -strategy = {'threshold_ms':500, 'threshold_steps_ms':100} -container.read_item( - item="id1", - partition_key="pk1", - availability_strategy=strategy) +strategy = {"threshold_ms": 500, "threshold_steps_ms": 100} +container.read_item(item="id1", partition_key="pk1", availability_strategy=strategy) # [END read_item_with_availability_strategy] # disable availability strategy config on request level # [START read_item_with_disabled_availability_strategy] -container.read_item( - item="id1", - partition_key="pk1", - availability_strategy=None -) +container.read_item(item="id1", partition_key="pk1", availability_strategy=None) # [END read_item_with_disabled_availability_strategy] diff --git a/sdk/cosmos/azure-cosmos/samples/examples_async.py b/sdk/cosmos/azure-cosmos/samples/examples_async.py index dc0f63136c4a..697196ec816f 100644 --- a/sdk/cosmos/azure-cosmos/samples/examples_async.py +++ b/sdk/cosmos/azure-cosmos/samples/examples_async.py @@ -10,6 +10,7 @@ from azure.cosmos import exceptions, PartitionKey from azure.cosmos.aio import CosmosClient + async def examples_async(): # All interaction with Cosmos DB starts with an instance of the CosmosClient # In order to use the asynchronous client, we need to use async/await keywords, @@ -73,7 +74,7 @@ async def examples_async(): # [START list_containers] database = client.get_database_client(database_name) async for container_c in database.list_containers(): - print("Container ID: {}".format(container_c['id'])) + print("Container ID: {}".format(container_c["id"])) # [END list_containers] # Insert new items by defining a dict and calling Container.upsert_item @@ -98,7 +99,7 @@ async def examples_async(): # as such, we iterate over it by using an async for loop # [START query_items] async for queried_item in container.query_items( - query='SELECT * FROM products p WHERE p.productModel <> "DISCONTINUED"' + query='SELECT * FROM products p WHERE p.productModel <> "DISCONTINUED"' ): print(json.dumps(queried_item, indent=True)) # [END query_items] @@ -121,9 +122,9 @@ async def examples_async(): # then Azure Cosmos DB will throttle low priority requests to allow high priority requests to execute. # Can be used for Read, Write, and Query operations. This is specified with the `priority` keyword. # the value can either be low or high. - + async for queried_item in container.query_items( - query='SELECT * FROM products p WHERE p.productModel <> "DISCONTINUED"', priority="High" + query='SELECT * FROM products p WHERE p.productModel <> "DISCONTINUED"', priority="High" ): print(json.dumps(queried_item, indent=True)) # [END priority_level option] @@ -172,7 +173,7 @@ async def examples_async(): # This query will use High priority, overriding the client's Low priority setting async for important_item in container_with_priority.query_items( query='SELECT * FROM products p WHERE p.priority = "High"', - priority="High" # Request-level priority overrides client-level priority + priority="High", # Request-level priority overrides client-level priority ): print(json.dumps(important_item, indent=True)) @@ -190,7 +191,7 @@ async def examples_async(): # on the container. # [START delete_items] async for queried_item in container.query_items( - query='SELECT * FROM products p WHERE p.productModel = "DISCONTINUED" AND p.productName="Widget"' + query='SELECT * FROM products p WHERE p.productModel = "DISCONTINUED" AND p.productName="Widget"' ): await container.delete_item(queried_item, partition_key="Widget") # [END delete_items] @@ -207,26 +208,36 @@ async def examples_async(): properties = await container._get_properties() # Print _rid and partitionKey - print("Resource ID: ", properties.get('_rid')) - print("Partition Key: ", properties.get('partitionKey')) + print("Resource ID: ", properties.get("_rid")) + print("Partition Key: ", properties.get("partitionKey")) # Read the container to get the latests of all the Container Properties. (This will make a backend requests and will consume RUs) container_properties = await container.read() # Print each property one by one if they are currently in the container properties print("indexingPolicy: ", container_properties.get("indexingPolicy")) - print("etag: ", container_properties.get('_etag')) - print("lastModified: ", container_properties.get('lastModified')) - print("defaultTtl: ", container_properties.get('defaultTtl')) - print("uniqueKeyPolicy: ", container_properties.get('uniqueKeyPolicy')) - print("conflictResolutionPolicy: ", container_properties.get('conflictResolutionPolicy')) - print("changeFeedPolicy: ", container_properties.get('changeFeedPolicy')) - print("geospatialConfig: ", container_properties.get('geospatialConfig')) + print("etag: ", container_properties.get("_etag")) + print("lastModified: ", container_properties.get("lastModified")) + print("defaultTtl: ", container_properties.get("defaultTtl")) + print("uniqueKeyPolicy: ", container_properties.get("uniqueKeyPolicy")) + print("conflictResolutionPolicy: ", container_properties.get("conflictResolutionPolicy")) + print("changeFeedPolicy: ", container_properties.get("changeFeedPolicy")) + print("geospatialConfig: ", container_properties.get("geospatialConfig")) # Print remaining properties if they are in the current container properties for key, value in container_properties.items(): - if key not in ['_rid', 'partitionKey', 'indexingPolicy', '_etag', 'lastModified', 'defaultTtl', 'uniqueKeyPolicy', - 'conflictResolutionPolicy', 'changeFeedPolicy', 'geospatialConfig']: + if key not in [ + "_rid", + "partitionKey", + "indexingPolicy", + "_etag", + "lastModified", + "defaultTtl", + "uniqueKeyPolicy", + "conflictResolutionPolicy", + "changeFeedPolicy", + "geospatialConfig", + ]: print(f"{key}: {value}") # [END get_container_properties] @@ -236,11 +247,11 @@ async def examples_async(): # when the TTL has elapsed since it was last edited. # [START reset_container_properties] # Set the TTL on the container to 3600 seconds (one hour) - await database.replace_container(container, partition_key=PartitionKey(path='/productName'), default_ttl=3600) + await database.replace_container(container, partition_key=PartitionKey(path="/productName"), default_ttl=3600) # Display the new TTL setting for the container container_props = await database.get_container_client(container_name).read() - print("New container TTL: {}".format(json.dumps(container_props['defaultTtl']))) + print("New container TTL: {}".format(json.dumps(container_props["defaultTtl"]))) # [END reset_container_properties] # Create a user in the database. @@ -278,16 +289,14 @@ async def examples_async(): try: container = await database.create_container( id=location_container_name, - partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash") + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), ) except exceptions.CosmosResourceExistsError: container = database.get_container_client(location_container_name) # [END create_container] # [START upsert_items] for i in range(1, 10): - await container.upsert_item( - dict(id="item{}".format(i), state="WA", city="Redmond", zipcode=98052) - ) + await container.upsert_item(dict(id="item{}".format(i), state="WA", city="Redmond", zipcode=98052)) # [END upsert_items] # Modify an existing item in the container @@ -302,16 +311,12 @@ async def examples_async(): # Query the items in a container using SQL-like syntax. This example # gets all items whose product model hasn't been discontinued. # [START query_items] - async for queried_item in container.query_items( - query='SELECT * FROM location l WHERE l.state = "WA"' - ): + async for queried_item in container.query_items(query='SELECT * FROM location l WHERE l.state = "WA"'): print(json.dumps(queried_item, indent=True)) # [END query_items] - # [START delete_items] - async for item_dict in container.query_items( - query='SELECT * FROM location p WHERE p.state = "GA"' - ): + # [START delete_items] + async for item_dict in container.query_items(query='SELECT * FROM location p WHERE p.state = "GA"'): await container.delete_item(item_dict, partition_key=["GA", "Atlanta", 30363]) # [END delete_items] @@ -319,9 +324,7 @@ async def examples_async(): # gets all items within the feed range. # [START query_items_feed_range] async for feed_range in container.read_feed_ranges(): - async for queried_item in container.query_items( - query='SELECT * from c', - feed_range=feed_range): + async for queried_item in container.query_items(query="SELECT * from c", feed_range=feed_range): print(json.dumps(queried_item, indent=True)) # [END query_items_param] @@ -345,7 +348,6 @@ async def examples_async(): break # [END is_feed_range_subset] - # Query a sorted list of items that were changed for one feed range. # The asynchronous client returns asynchronous iterators for its query methods; # as such, we iterate over it by using an async for loop @@ -367,21 +369,15 @@ async def examples_async(): # configure availability strategy config on request level # [START read_item_with_availability_strategy] - strategy = {'threshold_ms':500, 'threshold_steps_ms':100} - await container.read_item( - item="id1", - partition_key="pk1", - availability_strategy=strategy) + strategy = {"threshold_ms": 500, "threshold_steps_ms": 100} + await container.read_item(item="id1", partition_key="pk1", availability_strategy=strategy) # [END read_item_with_availability_strategy] # disable availability strategy config on request level # [START read_item_with_disabled_availability_strategy] - await container.read_item( - item="id1", - partition_key="pk1", - availability_strategy=None - ) + await container.read_item(item="id1", partition_key="pk1", availability_strategy=None) # [END read_item_with_disabled_availability_strategy] + if __name__ == "__main__": asyncio.run(examples_async()) diff --git a/sdk/cosmos/azure-cosmos/samples/excluded_locations.py b/sdk/cosmos/azure-cosmos/samples/excluded_locations.py index a8c699a7cccf..427b30e824c2 100644 --- a/sdk/cosmos/azure-cosmos/samples/excluded_locations.py +++ b/sdk/cosmos/azure-cosmos/samples/excluded_locations.py @@ -38,31 +38,26 @@ CONTAINER_ID = config.settings["container_id"] PARTITION_KEY = PartitionKey(path="/pk") -L1, L2, L3 = 'West US 3', 'West US', 'East US 2' +L1, L2, L3 = "West US 3", "West US", "East US 2" + def get_test_item(num): - test_item = { - 'id': 'Item_' + str(num), - 'pk': 'PartitionKey_' + str(num), - 'test_object': True, - 'lastName': 'Smith' - } + test_item = {"id": "Item_" + str(num), "pk": "PartitionKey_" + str(num), "test_object": True, "lastName": "Smith"} return test_item + def clean_up_db(client): try: client.delete_database(DATABASE_ID) except Exception as e: pass + def excluded_locations_client_level_sample(): preferred_locations = [L1, L2, L3] excluded_locations = [L1, L2] client = CosmosClient( - HOST, - MASTER_KEY, - preferred_locations=preferred_locations, - excluded_locations=excluded_locations + HOST, MASTER_KEY, preferred_locations=preferred_locations, excluded_locations=excluded_locations ) clean_up_db(client) @@ -76,19 +71,17 @@ def excluded_locations_client_level_sample(): # For read operations, read endpoints will be 'preferred_locations' - 'excluded_locations'. # In our sample, ['West US 3', 'West US', 'East US 2'] - ['West US 3', 'West US'] => ['East US 2'], # therefore 'East US 2' will be the read endpoint, and items will be read from 'East US 2' location - item = container.read_item(item=created_item['id'], partition_key=created_item['pk']) + item = container.read_item(item=created_item["id"], partition_key=created_item["pk"]) clean_up_db(client) + def excluded_locations_request_level_sample(): preferred_locations = [L1, L2, L3] excluded_locations_on_client = [L1, L2] excluded_locations_on_request = [L1] client = CosmosClient( - HOST, - MASTER_KEY, - preferred_locations=preferred_locations, - excluded_locations=excluded_locations_on_client + HOST, MASTER_KEY, preferred_locations=preferred_locations, excluded_locations=excluded_locations_on_client ) clean_up_db(client) @@ -106,10 +99,13 @@ def excluded_locations_request_level_sample(): # With the excluded_locations on request, the read endpoints will be ['West US', 'East US 2'] # ['West US 3', 'West US', 'East US 2'] - ['West US 3'] => ['West US', 'East US 2'] # Therefore, items will be read from 'West US' or 'East US 2' location - item = container.read_item(item=created_item['id'], partition_key=created_item['pk'], excluded_locations=excluded_locations_on_request) + item = container.read_item( + item=created_item["id"], partition_key=created_item["pk"], excluded_locations=excluded_locations_on_request + ) clean_up_db(client) + if __name__ == "__main__": # excluded_locations_client_level_sample() excluded_locations_request_level_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/index_management.py b/sdk/cosmos/azure-cosmos/samples/index_management.py index 0d1eccc6ceea..62a3dea8cb7c 100644 --- a/sdk/cosmos/azure-cosmos/samples/index_management.py +++ b/sdk/cosmos/azure-cosmos/samples/index_management.py @@ -12,11 +12,11 @@ import config -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] -PARTITION_KEY = PartitionKey(path='/id', kind='Hash') +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] +PARTITION_KEY = PartitionKey(path="/id", kind="Hash") # A typical container has the following properties within it's indexingPolicy property # indexingMode @@ -36,35 +36,27 @@ # Setup the certificate file in .pem format. CA_CERT_FILE = certifi.where() + def obtain_client(): - return cosmos_client.CosmosClient( - HOST, - MASTER_KEY, - "Session", - connection_verify=CA_CERT_FILE - ) + return cosmos_client.CosmosClient(HOST, MASTER_KEY, "Session", connection_verify=CA_CERT_FILE) + # Query for Entity / Entities -def query_entities(parent, entity_type, id = None): - find_entity_by_id_query = { - "query": "SELECT * FROM r WHERE r.id=@id", - "parameters": [ - { "name":"@id", "value": id } - ] - } +def query_entities(parent, entity_type, id=None): + find_entity_by_id_query = {"query": "SELECT * FROM r WHERE r.id=@id", "parameters": [{"name": "@id", "value": id}]} entities = None try: - if entity_type == 'database': + if entity_type == "database": if id == None: entities = list(parent.list_databases()) else: entities = list(parent.query_databases(find_entity_by_id_query)) - elif entity_type == 'container': + elif entity_type == "container": if id == None: entities = list(parent.list_containers()) else: entities = list(parent.query_containers(find_entity_by_id_query)) - elif entity_type == 'document': + elif entity_type == "document": if id == None: entities = list(parent.read_all_items()) else: @@ -72,7 +64,11 @@ def query_entities(parent, entity_type, id = None): else: raise ValueError(f"Unexpected entity type: {entity_type}") except exceptions.AzureError as e: - print("The following error occurred while querying for the entity / entities ", entity_type, id if id != None else "") + print( + "The following error occurred while querying for the entity / entities ", + entity_type, + id if id != None else "", + ) print(e) raise if id == None: @@ -84,7 +80,7 @@ def query_entities(parent, entity_type, id = None): def create_database_if_not_exists(client, database_id): try: - database = query_entities(client, 'database', id = database_id) + database = query_entities(client, "database", id=database_id) if database == None: return client.create_database(id=database_id) else: @@ -96,7 +92,7 @@ def create_database_if_not_exists(client, database_id): def delete_container_if_exists(db, container_id): try: db.delete_container(container_id) - print('Container with id \'{0}\' was deleted'.format(container_id)) + print("Container with id '{0}' was deleted".format(container_id)) except exceptions.CosmosResourceNotFoundError: pass except exceptions.CosmosHttpResponseError as e: @@ -112,7 +108,7 @@ def print_dictionary_items(dict): def fetch_all_databases(client): - databases = query_entities(client, 'database') + databases = query_entities(client, "database") print("-" * 41) print("-" * 41) for db in databases: @@ -120,7 +116,9 @@ def fetch_all_databases(client): print("-" * 41) -def query_documents_with_custom_query(container, query_with_optional_parameters, message = "Document(s) found by query: "): +def query_documents_with_custom_query( + container, query_with_optional_parameters, message="Document(s) found by query: " +): try: results = list(container.query_items(query_with_optional_parameters, enable_cross_partition_query=True)) print(message) @@ -141,10 +139,10 @@ def query_documents_with_custom_query(container, query_with_optional_parameters, def explicitly_exclude_from_index(db): - """ The default index policy on a DocumentContainer will AUTOMATICALLY index ALL documents added. - There may be scenarios where you want to exclude a specific doc from the index even though all other - documents are being indexed automatically. - This method demonstrates how to use an index directive to control this + """The default index policy on a DocumentContainer will AUTOMATICALLY index ALL documents added. + There may be scenarios where you want to exclude a specific doc from the index even though all other + documents are being indexed automatically. + This method demonstrates how to use an index directive to control this """ try: @@ -160,14 +158,14 @@ def explicitly_exclude_from_index(db): # Create a document and query on it immediately. # Will work as automatic indexing is still True - doc = created_Container.create_item(body={ "id" : "doc1", "orderId" : "order1" }) - print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) + doc = created_Container.create_item(body={"id": "doc1", "orderId": "order1"}) + print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) print(doc) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order1" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order1"}], + } query_documents_with_custom_query(created_Container, query) # Now, create a document but this time explicitly exclude it from the container using IndexingDirective @@ -175,16 +173,15 @@ def explicitly_exclude_from_index(db): # Should NOT find it, because we excluded it from the index # BUT, the document is there and doing a ReadDocument by Id will prove it doc2 = created_Container.create_item( - body={ "id" : "doc2", "orderId" : "order2" }, - indexing_directive=documents.IndexingDirective.Exclude + body={"id": "doc2", "orderId": "order2"}, indexing_directive=documents.IndexingDirective.Exclude ) - print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) + print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) print(doc2) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order2" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order2"}], + } query_documents_with_custom_query(created_Container, query) docRead = created_Container.read_item(item="doc2", partition_key="doc2") @@ -201,8 +198,8 @@ def explicitly_exclude_from_index(db): def use_manual_indexing(db): """The default index policy on a DocumentContainer will AUTOMATICALLY index ALL documents added. - There may be cases where you can want to turn-off automatic indexing and only selectively add only specific documents to the index. - This method demonstrates how to control this by setting the value of automatic within indexingPolicy to False + There may be cases where you can want to turn-off automatic indexing and only selectively add only specific documents to the index. + This method demonstrates how to control this by setting the value of automatic within indexingPolicy to False """ try: @@ -210,9 +207,7 @@ def use_manual_indexing(db): # Create a container with manual (instead of automatic) indexing created_Container = db.create_container( - id=CONTAINER_ID, - indexing_policy={"automatic" : False}, - partition_key=PARTITION_KEY + id=CONTAINER_ID, indexing_policy={"automatic": False}, partition_key=PARTITION_KEY ) properties = created_Container.read() print(created_Container) @@ -224,14 +219,14 @@ def use_manual_indexing(db): # Then query for that document # We should find nothing, because automatic indexing on the container level is False # BUT, the document is there and doing a ReadDocument by Id will prove it - doc = created_Container.create_item(body={ "id" : "doc1", "orderId" : "order1" }) - print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) + doc = created_Container.create_item(body={"id": "doc1", "orderId": "order1"}) + print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) print(doc) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order1" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order1"}], + } query_documents_with_custom_query(created_Container, query) docRead = created_Container.read_item(item="doc1", partition_key="doc1") @@ -240,16 +235,15 @@ def use_manual_indexing(db): # Now create a document, passing in an IndexingDirective saying we want to specifically index this document # Query for the document again and this time we should find it because we manually included the document in the index doc2 = created_Container.create_item( - body={ "id" : "doc2", "orderId" : "order2" }, - indexing_directive=documents.IndexingDirective.Include + body={"id": "doc2", "orderId": "order2"}, indexing_directive=documents.IndexingDirective.Include ) - print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) + print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) print(doc2) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order2" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order2"}], + } query_documents_with_custom_query(created_Container, query) # Cleanup @@ -263,40 +257,43 @@ def use_manual_indexing(db): def exclude_paths_from_index(db): """The default behavior is for Cosmos to index every attribute in every document automatically. - There are times when a document contains large amounts of information, in deeply nested structures - that you know you will never search on. In extreme cases like this, you can exclude paths from the - index to save on storage cost, improve write performance and also improve read performance because the index is smaller + There are times when a document contains large amounts of information, in deeply nested structures + that you know you will never search on. In extreme cases like this, you can exclude paths from the + index to save on storage cost, improve write performance and also improve read performance because the index is smaller - This method demonstrates how to set excludedPaths within indexingPolicy + This method demonstrates how to set excludedPaths within indexingPolicy """ try: delete_container_if_exists(db, CONTAINER_ID) doc_with_nested_structures = { - "id" : "doc1", - "foo" : "bar", - "metaData" : "meta", - "subDoc" : { "searchable" : "searchable", "nonSearchable" : "value" }, - "excludedNode" : { "subExcluded" : "something", "subExcludedNode" : { "someProperty" : "value" } } - } - container_to_create = { "id" : CONTAINER_ID , - "indexingPolicy" : - { - "includedPaths" : [ {'path' : "/*"} ], # Special mandatory path of "/*" required to denote include entire tree - "excludedPaths" : [ {'path' : "/metaData/*"}, # exclude metaData node, and anything under it - {'path' : "/subDoc/nonSearchable/*"}, # exclude ONLY a part of subDoc - {'path' : "/\"excludedNode\"/*"} # exclude excludedNode node, and anything under it - ] - } - } + "id": "doc1", + "foo": "bar", + "metaData": "meta", + "subDoc": {"searchable": "searchable", "nonSearchable": "value"}, + "excludedNode": {"subExcluded": "something", "subExcludedNode": {"someProperty": "value"}}, + } + container_to_create = { + "id": CONTAINER_ID, + "indexingPolicy": { + "includedPaths": [ + {"path": "/*"} + ], # Special mandatory path of "/*" required to denote include entire tree + "excludedPaths": [ + {"path": "/metaData/*"}, # exclude metaData node, and anything under it + {"path": "/subDoc/nonSearchable/*"}, # exclude ONLY a part of subDoc + {"path": '/"excludedNode"/*'}, # exclude excludedNode node, and anything under it + ], + }, + } print(container_to_create) print(doc_with_nested_structures) # Create a container with the defined properties # The effect of the above IndexingPolicy is that only id, foo, and the subDoc/searchable are indexed created_Container = db.create_container( - id=container_to_create['id'], - indexing_policy=container_to_create['indexingPolicy'], - partition_key=PARTITION_KEY + id=container_to_create["id"], + indexing_policy=container_to_create["indexingPolicy"], + partition_key=PARTITION_KEY, ) properties = created_Container.read() print(created_Container) @@ -305,24 +302,39 @@ def exclude_paths_from_index(db): # The effect of the above IndexingPolicy is that only id, foo, and the subDoc/searchable are indexed doc = created_Container.create_item(body=doc_with_nested_structures) - print("\n" + "-" * 25 + "Document doc1 created with nested structures" + "-" * 25) + print("\n" + "-" * 25 + "Document doc1 created with nested structures" + "-" * 25) print(doc) # Querying for a document on either metaData or /subDoc/subSubDoc/someProperty > fail because these paths were excluded and they raise a BadRequest(400) Exception - query = {"query": "SELECT * FROM r WHERE r.metaData=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "meta" }]} + query = { + "query": "SELECT * FROM r WHERE r.metaData=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "meta"}], + } query_documents_with_custom_query(created_Container, query) - query = {"query": "SELECT * FROM r WHERE r.subDoc.nonSearchable=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "value" }]} + query = { + "query": "SELECT * FROM r WHERE r.subDoc.nonSearchable=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "value"}], + } query_documents_with_custom_query(created_Container, query) - query = {"query": "SELECT * FROM r WHERE r.excludedNode.subExcludedNode.someProperty=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "value" }]} + query = { + "query": "SELECT * FROM r WHERE r.excludedNode.subExcludedNode.someProperty=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "value"}], + } query_documents_with_custom_query(created_Container, query) # Querying for a document using foo, or even subDoc/searchable > succeed because they were not excluded - query = {"query": "SELECT * FROM r WHERE r.foo=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "bar" }]} + query = { + "query": "SELECT * FROM r WHERE r.foo=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "bar"}], + } query_documents_with_custom_query(created_Container, query) - query = {"query": "SELECT * FROM r WHERE r.subDoc.searchable=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "searchable" }]} + query = { + "query": "SELECT * FROM r WHERE r.subDoc.searchable=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "searchable"}], + } query_documents_with_custom_query(created_Container, query) # Cleanup @@ -336,56 +348,55 @@ def exclude_paths_from_index(db): def range_scan_on_hash_index(db): """When a range index is not available (i.e. Only hash or no index found on the path), comparisons queries can still - be performed as scans using Allow scan request headers passed through options + be performed as scans using Allow scan request headers passed through options - This method demonstrates how to force a scan when only hash indexes exist on the path + This method demonstrates how to force a scan when only hash indexes exist on the path - ===== Warning===== - This was made an opt-in model by design. - Scanning is an expensive operation and doing this will have a large impact - on RequestUnits charged for an operation and will likely result in queries being throttled sooner. + ===== Warning===== + This was made an opt-in model by design. + Scanning is an expensive operation and doing this will have a large impact + on RequestUnits charged for an operation and will likely result in queries being throttled sooner. """ try: delete_container_if_exists(db, CONTAINER_ID) # Force a range scan operation on a hash indexed path - container_to_create = { "id" : CONTAINER_ID , - "indexingPolicy" : - { - "includedPaths" : [ {'path' : "/"} ], - "excludedPaths" : [ {'path' : "/length/*"} ] # exclude length - } - } + container_to_create = { + "id": CONTAINER_ID, + "indexingPolicy": { + "includedPaths": [{"path": "/"}], + "excludedPaths": [{"path": "/length/*"}], # exclude length + }, + } created_Container = db.create_container( - id=container_to_create['id'], - indexing_policy=container_to_create['indexingPolicy'], - partition_key=PARTITION_KEY + id=container_to_create["id"], + indexing_policy=container_to_create["indexingPolicy"], + partition_key=PARTITION_KEY, ) properties = created_Container.read() print(created_Container) print("\n" + "-" * 25 + "\n5. Container created with index policy") print_dictionary_items(properties["indexingPolicy"]) - doc1 = created_Container.create_item(body={ "id" : "dyn1", "length" : 10, "width" : 5, "height" : 15 }) - doc2 = created_Container.create_item(body={ "id" : "dyn2", "length" : 7, "width" : 15 }) - doc3 = created_Container.create_item(body={ "id" : "dyn3", "length" : 2 }) + doc1 = created_Container.create_item(body={"id": "dyn1", "length": 10, "width": 5, "height": 15}) + doc2 = created_Container.create_item(body={"id": "dyn2", "length": 7, "width": 15}) + doc3 = created_Container.create_item(body={"id": "dyn3", "length": 2}) print("Three docs created with ids : ", doc1["id"], doc2["id"], doc3["id"]) # Query for length > 5 - fail, this is a range based query on a Hash index only document - query = { "query": "SELECT * FROM r WHERE r.length > 5" } + query = {"query": "SELECT * FROM r WHERE r.length > 5"} query_documents_with_custom_query(created_Container, query) # Now add IndexingDirective and repeat query # expect 200 OK because now we are explicitly allowing scans in a query # using the enableScanInQuery directive query_documents_with_custom_query(created_Container, query) - results = list(created_Container.query_items( - query, - enable_scan_in_query=True, - enable_cross_partition_query=True - )) + results = list( + created_Container.query_items(query, enable_scan_in_query=True, enable_cross_partition_query=True) + ) print("Printing documents queried by range by providing enableScanInQuery = True") - for doc in results: print(doc["id"]) + for doc in results: + print(doc["id"]) # Cleanup db.delete_container(created_Container) @@ -397,9 +408,7 @@ def range_scan_on_hash_index(db): def use_range_indexes_on_strings(db): - """Showing how range queries can be performed even on strings. - - """ + """Showing how range queries can be performed even on strings.""" try: delete_container_if_exists(db, CONTAINER_ID) # containers = query_entities(client, 'container', parent_link = database_link) @@ -409,7 +418,7 @@ def use_range_indexes_on_strings(db): # This is how you can specify a range index on strings (and numbers) for all properties. # This is the recommended indexing policy for containers. i.e. precision -1 - #indexingPolicy = { + # indexingPolicy = { # 'indexingPolicy': { # 'includedPaths': [ # { @@ -423,54 +432,48 @@ def use_range_indexes_on_strings(db): # } # ] # } - #} + # } # For demo purposes, we are going to use the default (range on numbers, hash on strings) for the whole document (/* ) # and just include a range index on strings for the "region". container_definition = { - 'id': CONTAINER_ID, - 'indexingPolicy': { - 'includedPaths': [ + "id": CONTAINER_ID, + "indexingPolicy": { + "includedPaths": [ { - 'path': '/region/?', - 'indexes': [ - { - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.String, - 'precision': -1 - } - ] + "path": "/region/?", + "indexes": [ + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.String, "precision": -1} + ], }, - { - 'path': '/*' - } + {"path": "/*"}, ] - } + }, } created_Container = db.create_container( - id=container_definition['id'], - indexing_policy=container_definition['indexingPolicy'], - partition_key=PARTITION_KEY + id=container_definition["id"], + indexing_policy=container_definition["indexingPolicy"], + partition_key=PARTITION_KEY, ) properties = created_Container.read() print(created_Container) print("\n" + "-" * 25 + "\n6. Container created with index policy") print_dictionary_items(properties["indexingPolicy"]) - created_Container.create_item(body={ "id" : "doc1", "region" : "USA" }) - created_Container.create_item(body={ "id" : "doc2", "region" : "UK" }) - created_Container.create_item(body={ "id" : "doc3", "region" : "Armenia" }) - created_Container.create_item(body={ "id" : "doc4", "region" : "Egypt" }) + created_Container.create_item(body={"id": "doc1", "region": "USA"}) + created_Container.create_item(body={"id": "doc2", "region": "UK"}) + created_Container.create_item(body={"id": "doc3", "region": "Armenia"}) + created_Container.create_item(body={"id": "doc4", "region": "Egypt"}) # Now ordering against region is allowed. You can run the following query - query = { "query" : "SELECT * FROM r ORDER BY r.region" } + query = {"query": "SELECT * FROM r ORDER BY r.region"} message = "Documents ordered by region" query_documents_with_custom_query(created_Container, query, message) # You can also perform filters against string comparison like >= 'UK'. Note that you can perform a prefix query, # the equivalent of LIKE 'U%' (is >= 'U' AND < 'U') - query = { "query" : "SELECT * FROM r WHERE r.region >= 'U'" } + query = {"query": "SELECT * FROM r WHERE r.region >= 'U'"} message = "Documents with region begining with U" query_documents_with_custom_query(created_Container, query, message) @@ -496,24 +499,27 @@ def perform_index_transformations(db): print_dictionary_items(properties["indexingPolicy"]) # Insert some documents - doc1 = created_Container.create_item(body={ "id" : "dyn1", "length" : 10, "width" : 5, "height" : 15 }) - doc2 = created_Container.create_item(body={ "id" : "dyn2", "length" : 7, "width" : 15 }) - doc3 = created_Container.create_item(body={ "id" : "dyn3", "length" : 2 }) - print("Three docs created with ids : ", doc1["id"], doc2["id"], doc3["id"], " with indexing mode", properties['indexingPolicy']['indexingMode']) + doc1 = created_Container.create_item(body={"id": "dyn1", "length": 10, "width": 5, "height": 15}) + doc2 = created_Container.create_item(body={"id": "dyn2", "length": 7, "width": 15}) + doc3 = created_Container.create_item(body={"id": "dyn3", "length": 2}) + print( + "Three docs created with ids : ", + doc1["id"], + doc2["id"], + doc3["id"], + " with indexing mode", + properties["indexingPolicy"]["indexingMode"], + ) # Switch to use string & number range indexing with maximum precision. print("Changing to string & number range indexing with maximum precision (needed for Order By).") - properties['indexingPolicy']['includedPaths'][0]['indexes'] = [{ - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.String, - 'precision': -1 - }] + properties["indexingPolicy"]["includedPaths"][0]["indexes"] = [ + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.String, "precision": -1} + ] created_Container = db.replace_container( - container=created_Container.id, - partition_key=PARTITION_KEY, - indexing_policy=properties['indexingPolicy'] + container=created_Container.id, partition_key=PARTITION_KEY, indexing_policy=properties["indexingPolicy"] ) properties = created_Container.read() @@ -523,12 +529,10 @@ def perform_index_transformations(db): # Now exclude a path from indexing to save on storage space. print("Now excluding the path /length/ to save on storage space") - properties['indexingPolicy']['excludedPaths'] = [{"path" : "/length/*"}] + properties["indexingPolicy"]["excludedPaths"] = [{"path": "/length/*"}] created_Container = db.replace_container( - container=created_Container.id, - partition_key=PARTITION_KEY, - indexing_policy=properties['indexingPolicy'] + container=created_Container.id, partition_key=PARTITION_KEY, indexing_policy=properties["indexingPolicy"] ) properties = created_Container.read() print_dictionary_items(properties["indexingPolicy"]) @@ -549,41 +553,18 @@ def perform_multi_orderby_query(db): # Create a container with composite indexes indexing_policy = { "compositeIndexes": [ + [{"path": "/numberField", "order": "ascending"}, {"path": "/stringField", "order": "descending"}], [ - { - "path": "/numberField", - "order": "ascending" - }, - { - "path": "/stringField", - "order": "descending" - } + {"path": "/numberField", "order": "descending"}, + {"path": "/stringField", "order": "ascending"}, + {"path": "/numberField2", "order": "descending"}, + {"path": "/stringField2", "order": "ascending"}, ], - [ - { - "path": "/numberField", - "order": "descending" - }, - { - "path": "/stringField", - "order": "ascending" - }, - { - "path": "/numberField2", - "order": "descending" - }, - { - "path": "/stringField2", - "order": "ascending" - } - ] ] } created_container = db.create_container( - id=CONTAINER_ID, - indexing_policy=indexing_policy, - partition_key=PARTITION_KEY + id=CONTAINER_ID, indexing_policy=indexing_policy, partition_key=PARTITION_KEY ) properties = created_container.read() print(created_container) @@ -592,36 +573,68 @@ def perform_multi_orderby_query(db): print_dictionary_items(properties["indexingPolicy"]) # Insert some documents - doc1 = created_container.create_item(body={"id": "doc1", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "1"}) - doc2 = created_container.create_item(body={"id": "doc2", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "2"}) - doc3 = created_container.create_item(body={"id": "doc3", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "1"}) - doc4 = created_container.create_item(body={"id": "doc4", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "2"}) - doc5 = created_container.create_item(body={"id": "doc5", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "1"}) - doc6 = created_container.create_item(body={"id": "doc6", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "2"}) - doc7 = created_container.create_item(body={"id": "doc7", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "1"}) - doc8 = created_container.create_item(body={"id": "doc8", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "2"}) - doc9 = created_container.create_item(body={"id": "doc9", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "1"}) - doc10 = created_container.create_item(body={"id": "doc10", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "2"}) - doc11 = created_container.create_item(body={"id": "doc11", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "1"}) - doc12 = created_container.create_item(body={"id": "doc12", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "2"}) - doc13 = created_container.create_item(body={"id": "doc13", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "1"}) - doc14 = created_container.create_item(body={"id": "doc14", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "2"}) - doc15 = created_container.create_item(body={"id": "doc15", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "1"}) - doc16 = created_container.create_item(body={"id": "doc16", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "2"}) + doc1 = created_container.create_item( + body={"id": "doc1", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "1"} + ) + doc2 = created_container.create_item( + body={"id": "doc2", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "2"} + ) + doc3 = created_container.create_item( + body={"id": "doc3", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "1"} + ) + doc4 = created_container.create_item( + body={"id": "doc4", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "2"} + ) + doc5 = created_container.create_item( + body={"id": "doc5", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "1"} + ) + doc6 = created_container.create_item( + body={"id": "doc6", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "2"} + ) + doc7 = created_container.create_item( + body={"id": "doc7", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "1"} + ) + doc8 = created_container.create_item( + body={"id": "doc8", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "2"} + ) + doc9 = created_container.create_item( + body={"id": "doc9", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "1"} + ) + doc10 = created_container.create_item( + body={"id": "doc10", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "2"} + ) + doc11 = created_container.create_item( + body={"id": "doc11", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "1"} + ) + doc12 = created_container.create_item( + body={"id": "doc12", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "2"} + ) + doc13 = created_container.create_item( + body={"id": "doc13", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "1"} + ) + doc14 = created_container.create_item( + body={"id": "doc14", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "2"} + ) + doc15 = created_container.create_item( + body={"id": "doc15", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "1"} + ) + doc16 = created_container.create_item( + body={"id": "doc16", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "2"} + ) print("Query documents and Order by 1st composite index: Ascending numberField and Descending stringField:") query = { - "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC", - } + "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC", + } query_documents_with_custom_query(created_container, query) print("Query documents and Order by inverted 2nd composite index -") print("Ascending numberField, Descending stringField, Ascending numberField2, Descending stringField2") query = { - "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC, r.numberField2 ASC, r.stringField2 DESC", - } + "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC, r.numberField2 ASC, r.stringField2 DESC", + } query_documents_with_custom_query(created_container, query) # Cleanup @@ -639,24 +652,14 @@ def use_geospatial_indexing_policy(db): # Create a container with geospatial indexes indexing_policy = { - 'includedPaths': [ - {'path': '/"Location"/?', - 'indexes': [ - { - 'kind': 'Spatial', - 'dataType': 'Point' - }] - }, - { - 'path': '/' - } + "includedPaths": [ + {"path": '/"Location"/?', "indexes": [{"kind": "Spatial", "dataType": "Point"}]}, + {"path": "/"}, ] } created_container = db.create_container( - id=CONTAINER_ID, - partition_key=PARTITION_KEY, - indexing_policy=indexing_policy + id=CONTAINER_ID, partition_key=PARTITION_KEY, indexing_policy=indexing_policy ) properties = created_container.read() print(created_container) @@ -665,11 +668,17 @@ def use_geospatial_indexing_policy(db): print_dictionary_items(properties["indexingPolicy"]) # Create some items - doc9 = created_container.create_item(body={"id": "loc1", 'Location': {'type': 'Point', 'coordinates': [20.0, 20.0]}}) - doc9 = created_container.create_item(body={"id": "loc2", 'Location': {'type': 'Point', 'coordinates': [100.0, 100.0]}}) + doc9 = created_container.create_item( + body={"id": "loc1", "Location": {"type": "Point", "coordinates": [20.0, 20.0]}} + ) + doc9 = created_container.create_item( + body={"id": "loc2", "Location": {"type": "Point", "coordinates": [100.0, 100.0]}} + ) # Run ST_DISTANCE queries using the geospatial index - query = "SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)" + query = ( + "SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)" + ) query_documents_with_custom_query(created_container, query) # Cleanup @@ -689,23 +698,13 @@ def use_vector_embedding_policy(db): indexing_policy = { "vectorIndexes": [ {"path": "/vector", "type": "quantizedFlat", "quantizationByteSize": 8}, - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/city"], "indexingSearchListSize": 50} + {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/city"], "indexingSearchListSize": 50}, ] } vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, - { - "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" - } + {"path": "/vector", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, ] } @@ -713,7 +712,7 @@ def use_vector_embedding_policy(db): id=CONTAINER_ID, partition_key=PARTITION_KEY, indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) properties = created_container.read() print(created_container) @@ -732,16 +731,22 @@ def get_embeddings(num): created_container.create_item({"id": "vector_item" + str(i), "embeddings": get_embeddings(i)}) # Run vector similarity search queries using VectorDistance - query = "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings, [{}])".format(get_embeddings(1), - get_embeddings(1)) + query = ( + "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings, [{}])".format( + get_embeddings(1), get_embeddings(1) + ) + ) query_documents_with_custom_query(created_container, query) # Run vector similarity search queries using VectorDistance with specifications - query = "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}], true, {{'dataType': 'float32' ," \ - " 'distanceFunction': 'cosine'}}) AS SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings," \ - " [{}], true, {{'dataType': 'float32', 'distanceFunction': 'cosine'}})".format(get_embeddings(1), - get_embeddings(1)) + query = ( + "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}], true, {{'dataType': 'float32' ," + " 'distanceFunction': 'cosine'}}) AS SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings," + " [{}], true, {{'dataType': 'float32', 'distanceFunction': 'cosine'}})".format( + get_embeddings(1), get_embeddings(1) + ) + ) query_documents_with_custom_query(created_container, query) # Cleanup @@ -758,27 +763,14 @@ def use_full_text_policy(db): delete_container_if_exists(db, CONTAINER_ID) # Create a container with full text policy and full text indexes - indexing_policy = { - "automatic": True, - "fullTextIndexes": [ - {"path": "/text1"} - ] - } - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/text1", - "language": "en-US" - } - ] - } + indexing_policy = {"automatic": True, "fullTextIndexes": [{"path": "/text1"}]} + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/text1", "language": "en-US"}]} created_container = db.create_container( id=CONTAINER_ID, partition_key=PARTITION_KEY, indexing_policy=indexing_policy, - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) properties = created_container.read() print(created_container) @@ -787,16 +779,19 @@ def use_full_text_policy(db): print_dictionary_items(properties["indexingPolicy"]) print_dictionary_items(properties["fullTextPolicy"]) - sample_texts = ["Common popular pop music artists include Taylor Swift and The Weekend.", - "The weekend is coming up soon, do you have any plans?", - "Depending on the artist, their music can be very different.", - "Mozart and Beethoven are some of the most recognizable names in classical music.", - "Taylor acts in many movies, and is considered a great artist."] + sample_texts = [ + "Common popular pop music artists include Taylor Swift and The Weekend.", + "The weekend is coming up soon, do you have any plans?", + "Depending on the artist, their music can be very different.", + "Mozart and Beethoven are some of the most recognizable names in classical music.", + "Taylor acts in many movies, and is considered a great artist.", + ] # Create some items to use with full text search for i in range(5): - created_container.create_item({"id": "full_text_item" + str(i), "text1": sample_texts[i], - "vector": [1, 2, 3]}) + created_container.create_item( + {"id": "full_text_item" + str(i), "text1": sample_texts[i], "vector": [1, 2, 3]} + ) # Run full text search queries using full text score ranking query = "SELECT TOP 3 c.text1 FROM c ORDER BY RANK FullTextScore(c.text1, ['artist']))" @@ -807,8 +802,10 @@ def use_full_text_policy(db): query_documents_with_custom_query(created_container, query) # Run hybrid search queries using RRF ranking wth vector distances - query = "SELECT TOP 3 c.text1 FROM c ORDER BY RANK RRF(FullTextScore(c.text1, ['music'])," \ - " VectorDistance(c.vector, [1, 2, 3]))" + query = ( + "SELECT TOP 3 c.text1 FROM c ORDER BY RANK RRF(FullTextScore(c.text1, ['music'])," + " VectorDistance(c.vector, [1, 2, 3]))" + ) query_documents_with_custom_query(created_container, query) # Cleanup @@ -862,5 +859,6 @@ def run_sample(): except exceptions.AzureError as e: raise e -if __name__ == '__main__': + +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/index_management_async.py b/sdk/cosmos/azure-cosmos/samples/index_management_async.py index 91d82f53a9ef..fbbcaa123ad5 100644 --- a/sdk/cosmos/azure-cosmos/samples/index_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/index_management_async.py @@ -12,11 +12,11 @@ import asyncio import config -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] CONTAINER_ID = "index-samples" -PARTITION_KEY = PartitionKey(path='/id', kind='Hash') +PARTITION_KEY = PartitionKey(path="/id", kind="Hash") # A typical container has the following properties within it's indexingPolicy property # indexingMode @@ -36,12 +36,8 @@ # Setup the certificate file in .pem format. # If you still get an SSLError, try disabling certificate verification and suppress warnings -find_entity_by_id_query = { - "query": "SELECT * FROM r WHERE r.id=@id", - "parameters": [ - { "name":"@id", "value": id } - ] - } +find_entity_by_id_query = {"query": "SELECT * FROM r WHERE r.id=@id", "parameters": [{"name": "@id", "value": id}]} + def obtain_client(): # Try to setup the cacert.pem @@ -52,34 +48,33 @@ def obtain_client(): # Query for Entity / Entities -async def query_entities(parent, entity_type, id = None): - find_entity_by_id_query = { - "query": "SELECT * FROM r WHERE r.id=@id", - "parameters": [ - { "name":"@id", "value": id } - ] - } +async def query_entities(parent, entity_type, id=None): + find_entity_by_id_query = {"query": "SELECT * FROM r WHERE r.id=@id", "parameters": [{"name": "@id", "value": id}]} entities = None try: - if entity_type == 'database': + if entity_type == "database": if id == None: entities = [entity async for entity in parent.list_databases()] else: entities = [entity async for entity in parent.query_databases(find_entity_by_id_query)] - elif entity_type == 'container': + elif entity_type == "container": if id == None: entities = [entity async for entity in parent.list_containers()] else: entities = [entity async for entity in parent.query_containers(find_entity_by_id_query)] - elif entity_type == 'document': + elif entity_type == "document": if id == None: entities = [entity async for entity in parent.read_all_items()] else: entities = [entity async for entity in parent.query_items(find_entity_by_id_query)] except exceptions.AzureError as e: - print("The following error occurred while querying for the entity / entities ", entity_type, id if id != None else "") + print( + "The following error occurred while querying for the entity / entities ", + entity_type, + id if id != None else "", + ) print(e) raise if id == None: @@ -92,7 +87,7 @@ async def query_entities(parent, entity_type, id = None): async def delete_container_if_exists(db, container_id): try: await db.delete_container(container_id) - print('Container with id \'{0}\' was deleted'.format(container_id)) + print("Container with id '{0}' was deleted".format(container_id)) except exceptions.CosmosResourceNotFoundError: pass except exceptions.CosmosHttpResponseError as e: @@ -108,7 +103,7 @@ def print_dictionary_items(dict): async def fetch_all_databases(client): - databases = await query_entities(client, 'database') + databases = await query_entities(client, "database") print("-" * 41) print("-" * 41) for db in databases: @@ -116,7 +111,9 @@ async def fetch_all_databases(client): print("-" * 41) -async def query_documents_with_custom_query(container, query_with_optional_parameters, message = "Document(s) found by query: "): +async def query_documents_with_custom_query( + container, query_with_optional_parameters, message="Document(s) found by query: " +): try: results = container.query_items(query_with_optional_parameters) print(message) @@ -137,10 +134,10 @@ async def query_documents_with_custom_query(container, query_with_optional_param async def explicitly_exclude_from_index(db): - """ The default index policy on a DocumentContainer will AUTOMATICALLY index ALL documents added. - There may be scenarios where you want to exclude a specific doc from the index even though all other - documents are being indexed automatically. - This method demonstrates how to use an index directive to control this + """The default index policy on a DocumentContainer will AUTOMATICALLY index ALL documents added. + There may be scenarios where you want to exclude a specific doc from the index even though all other + documents are being indexed automatically. + This method demonstrates how to use an index directive to control this """ try: @@ -156,14 +153,14 @@ async def explicitly_exclude_from_index(db): # Create a document and query on it immediately. # Will work as automatic indexing is still True - doc = await created_Container.create_item(body={ "id" : "doc1", "orderId" : "order1" }) - print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) + doc = await created_Container.create_item(body={"id": "doc1", "orderId": "order1"}) + print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) print(doc) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order1" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order1"}], + } await query_documents_with_custom_query(created_Container, query) # Now, create a document but this time explicitly exclude it from the container using IndexingDirective @@ -171,16 +168,15 @@ async def explicitly_exclude_from_index(db): # Should NOT find it, because we excluded it from the index # BUT, the document is there and doing a ReadDocument by Id will prove it doc2 = await created_Container.create_item( - body={ "id" : "doc2", "orderId" : "order2" }, - indexing_directive=documents.IndexingDirective.Exclude + body={"id": "doc2", "orderId": "order2"}, indexing_directive=documents.IndexingDirective.Exclude ) - print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) + print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) print(doc2) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order2" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order2"}], + } await query_documents_with_custom_query(created_Container, query) docRead = await created_Container.read_item(item="doc2", partition_key="doc2") @@ -197,8 +193,8 @@ async def explicitly_exclude_from_index(db): async def use_manual_indexing(db): """The default index policy on a DocumentContainer will AUTOMATICALLY index ALL documents added. - There may be cases where you can want to turn-off automatic indexing and only selectively add only specific documents to the index. - This method demonstrates how to control this by setting the value of automatic within indexingPolicy to False + There may be cases where you can want to turn-off automatic indexing and only selectively add only specific documents to the index. + This method demonstrates how to control this by setting the value of automatic within indexingPolicy to False """ try: @@ -206,9 +202,7 @@ async def use_manual_indexing(db): # Create a container with manual (instead of automatic) indexing created_Container = await db.create_container( - id=CONTAINER_ID, - indexing_policy={"automatic" : False}, - partition_key=PARTITION_KEY + id=CONTAINER_ID, indexing_policy={"automatic": False}, partition_key=PARTITION_KEY ) properties = await created_Container.read() print(created_Container) @@ -220,14 +214,14 @@ async def use_manual_indexing(db): # Then query for that document # We should find nothing, because automatic indexing on the container level is False # BUT, the document is there and doing a ReadDocument by Id will prove it - doc = await created_Container.create_item(body={ "id" : "doc1", "orderId" : "order1" }) - print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) + doc = await created_Container.create_item(body={"id": "doc1", "orderId": "order1"}) + print("\n" + "-" * 25 + "Document doc1 created with order1" + "-" * 25) print(doc) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order1" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order1"}], + } await query_documents_with_custom_query(created_Container, query) docRead = await created_Container.read_item(item="doc1", partition_key="doc1") @@ -236,16 +230,15 @@ async def use_manual_indexing(db): # Now create a document, passing in an IndexingDirective saying we want to specifically index this document # Query for the document again and this time we should find it because we manually included the document in the index doc2 = await created_Container.create_item( - body={ "id" : "doc2", "orderId" : "order2" }, - indexing_directive=documents.IndexingDirective.Include + body={"id": "doc2", "orderId": "order2"}, indexing_directive=documents.IndexingDirective.Include ) - print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) + print("\n" + "-" * 25 + "Document doc2 created with order2" + "-" * 25) print(doc2) query = { - "query": "SELECT * FROM r WHERE r.orderId=@orderNo", - "parameters": [ { "name":"@orderNo", "value": "order2" } ] - } + "query": "SELECT * FROM r WHERE r.orderId=@orderNo", + "parameters": [{"name": "@orderNo", "value": "order2"}], + } await query_documents_with_custom_query(created_Container, query) # Cleanup @@ -259,40 +252,43 @@ async def use_manual_indexing(db): async def exclude_paths_from_index(db): """The default behavior is for Cosmos to index every attribute in every document automatically. - There are times when a document contains large amounts of information, in deeply nested structures - that you know you will never search on. In extreme cases like this, you can exclude paths from the - index to save on storage cost, improve write performance and also improve read performance because the index is smaller + There are times when a document contains large amounts of information, in deeply nested structures + that you know you will never search on. In extreme cases like this, you can exclude paths from the + index to save on storage cost, improve write performance and also improve read performance because the index is smaller - This method demonstrates how to set excludedPaths within indexingPolicy + This method demonstrates how to set excludedPaths within indexingPolicy """ try: await delete_container_if_exists(db, CONTAINER_ID) doc_with_nested_structures = { - "id" : "doc1", - "foo" : "bar", - "metaData" : "meta", - "subDoc" : { "searchable" : "searchable", "nonSearchable" : "value" }, - "excludedNode" : { "subExcluded" : "something", "subExcludedNode" : { "someProperty" : "value" } } - } - container_to_create = { "id" : CONTAINER_ID , - "indexingPolicy" : - { - "includedPaths" : [ {'path' : "/*"} ], # Special mandatory path of "/*" required to denote include entire tree - "excludedPaths" : [ {'path' : "/metaData/*"}, # exclude metaData node, and anything under it - {'path' : "/subDoc/nonSearchable/*"}, # exclude ONLY a part of subDoc - {'path' : "/\"excludedNode\"/*"} # exclude excludedNode node, and anything under it - ] - } - } + "id": "doc1", + "foo": "bar", + "metaData": "meta", + "subDoc": {"searchable": "searchable", "nonSearchable": "value"}, + "excludedNode": {"subExcluded": "something", "subExcludedNode": {"someProperty": "value"}}, + } + container_to_create = { + "id": CONTAINER_ID, + "indexingPolicy": { + "includedPaths": [ + {"path": "/*"} + ], # Special mandatory path of "/*" required to denote include entire tree + "excludedPaths": [ + {"path": "/metaData/*"}, # exclude metaData node, and anything under it + {"path": "/subDoc/nonSearchable/*"}, # exclude ONLY a part of subDoc + {"path": '/"excludedNode"/*'}, # exclude excludedNode node, and anything under it + ], + }, + } print(container_to_create) print(doc_with_nested_structures) # Create a container with the defined properties # The effect of the above IndexingPolicy is that only id, foo, and the subDoc/searchable are indexed created_Container = await db.create_container( - id=container_to_create['id'], - indexing_policy=container_to_create['indexingPolicy'], - partition_key=PARTITION_KEY + id=container_to_create["id"], + indexing_policy=container_to_create["indexingPolicy"], + partition_key=PARTITION_KEY, ) properties = await created_Container.read() print(created_Container) @@ -301,24 +297,39 @@ async def exclude_paths_from_index(db): # The effect of the above IndexingPolicy is that only id, foo, and the subDoc/searchable are indexed doc = await created_Container.create_item(body=doc_with_nested_structures) - print("\n" + "-" * 25 + "Document doc1 created with nested structures" + "-" * 25) + print("\n" + "-" * 25 + "Document doc1 created with nested structures" + "-" * 25) print(doc) # Querying for a document on either metaData or /subDoc/subSubDoc/someProperty > fail because these paths were excluded and they raise a BadRequest(400) Exception - query = {"query": "SELECT * FROM r WHERE r.metaData=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "meta" }]} + query = { + "query": "SELECT * FROM r WHERE r.metaData=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "meta"}], + } await query_documents_with_custom_query(created_Container, query) - query = {"query": "SELECT * FROM r WHERE r.subDoc.nonSearchable=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "value" }]} + query = { + "query": "SELECT * FROM r WHERE r.subDoc.nonSearchable=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "value"}], + } await query_documents_with_custom_query(created_Container, query) - query = {"query": "SELECT * FROM r WHERE r.excludedNode.subExcludedNode.someProperty=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "value" }]} + query = { + "query": "SELECT * FROM r WHERE r.excludedNode.subExcludedNode.someProperty=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "value"}], + } await query_documents_with_custom_query(created_Container, query) # Querying for a document using foo, or even subDoc/searchable > succeed because they were not excluded - query = {"query": "SELECT * FROM r WHERE r.foo=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "bar" }]} + query = { + "query": "SELECT * FROM r WHERE r.foo=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "bar"}], + } await query_documents_with_custom_query(created_Container, query) - query = {"query": "SELECT * FROM r WHERE r.subDoc.searchable=@desiredValue", "parameters" : [{ "name":"@desiredValue", "value": "searchable" }]} + query = { + "query": "SELECT * FROM r WHERE r.subDoc.searchable=@desiredValue", + "parameters": [{"name": "@desiredValue", "value": "searchable"}], + } await query_documents_with_custom_query(created_Container, query) # Cleanup @@ -332,54 +343,52 @@ async def exclude_paths_from_index(db): async def range_scan_on_hash_index(db): """When a range index is not available (i.e. Only hash or no index found on the path), comparisons queries can still - be performed as scans using Allow scan request headers passed through options + be performed as scans using Allow scan request headers passed through options - This method demonstrates how to force a scan when only hash indexes exist on the path + This method demonstrates how to force a scan when only hash indexes exist on the path - ===== Warning===== - This was made an opt-in model by design. - Scanning is an expensive operation and doing this will have a large impact - on RequestUnits charged for an operation and will likely result in queries being throttled sooner. + ===== Warning===== + This was made an opt-in model by design. + Scanning is an expensive operation and doing this will have a large impact + on RequestUnits charged for an operation and will likely result in queries being throttled sooner. """ try: await delete_container_if_exists(db, CONTAINER_ID) # Force a range scan operation on a hash indexed path - container_to_create = { "id" : CONTAINER_ID , - "indexingPolicy" : - { - "includedPaths" : [ {'path' : "/"} ], - "excludedPaths" : [ {'path' : "/length/*"} ] # exclude length - } - } + container_to_create = { + "id": CONTAINER_ID, + "indexingPolicy": { + "includedPaths": [{"path": "/"}], + "excludedPaths": [{"path": "/length/*"}], # exclude length + }, + } created_Container = await db.create_container( - id=container_to_create['id'], - indexing_policy=container_to_create['indexingPolicy'], - partition_key=PARTITION_KEY + id=container_to_create["id"], + indexing_policy=container_to_create["indexingPolicy"], + partition_key=PARTITION_KEY, ) properties = await created_Container.read() print(created_Container) print("\n" + "-" * 25 + "\n5. Container created with index policy") print_dictionary_items(properties["indexingPolicy"]) - doc1 = await created_Container.create_item(body={ "id" : "dyn1", "length" : 10, "width" : 5, "height" : 15 }) - doc2 = await created_Container.create_item(body={ "id" : "dyn2", "length" : 7, "width" : 15 }) - doc3 = await created_Container.create_item(body={ "id" : "dyn3", "length" : 2 }) + doc1 = await created_Container.create_item(body={"id": "dyn1", "length": 10, "width": 5, "height": 15}) + doc2 = await created_Container.create_item(body={"id": "dyn2", "length": 7, "width": 15}) + doc3 = await created_Container.create_item(body={"id": "dyn3", "length": 2}) print("Three docs created with ids : ", doc1["id"], doc2["id"], doc3["id"]) # Query for length > 5 - fail, this is a range based query on a Hash index only document - query = { "query": "SELECT * FROM r WHERE r.length > 5" } + query = {"query": "SELECT * FROM r WHERE r.length > 5"} await query_documents_with_custom_query(created_Container, query) # Now add IndexingDirective and repeat query # expect 200 OK because now we are explicitly allowing scans in a query # using the enableScanInQuery directive - results = created_Container.query_items( - query, - enable_scan_in_query=True - ) + results = created_Container.query_items(query, enable_scan_in_query=True) print("Printing documents queried by range by providing enableScanInQuery = True") - async for doc in results: print(doc["id"]) + async for doc in results: + print(doc["id"]) # Cleanup await db.delete_container(created_Container) @@ -391,9 +400,7 @@ async def range_scan_on_hash_index(db): async def use_range_indexes_on_strings(db): - """Showing how range queries can be performed even on strings. - - """ + """Showing how range queries can be performed even on strings.""" try: await delete_container_if_exists(db, CONTAINER_ID) # containers = query_entities(client, 'container', parent_link = database_link) @@ -403,7 +410,7 @@ async def use_range_indexes_on_strings(db): # This is how you can specify a range index on strings (and numbers) for all properties. # This is the recommended indexing policy for containers. i.e. precision -1 - #indexingPolicy = { + # indexingPolicy = { # 'indexingPolicy': { # 'includedPaths': [ # { @@ -417,54 +424,48 @@ async def use_range_indexes_on_strings(db): # } # ] # } - #} + # } # For demo purposes, we are going to use the default (range on numbers, hash on strings) for the whole document (/* ) # and just include a range index on strings for the "region". container_definition = { - 'id': CONTAINER_ID, - 'indexingPolicy': { - 'includedPaths': [ + "id": CONTAINER_ID, + "indexingPolicy": { + "includedPaths": [ { - 'path': '/region/?', - 'indexes': [ - { - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.String, - 'precision': -1 - } - ] + "path": "/region/?", + "indexes": [ + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.String, "precision": -1} + ], }, - { - 'path': '/*' - } + {"path": "/*"}, ] - } + }, } created_Container = await db.create_container( - id=container_definition['id'], - indexing_policy=container_definition['indexingPolicy'], - partition_key=PARTITION_KEY + id=container_definition["id"], + indexing_policy=container_definition["indexingPolicy"], + partition_key=PARTITION_KEY, ) properties = await created_Container.read() print(created_Container) print("\n" + "-" * 25 + "\n6. Container created with index policy") print_dictionary_items(properties["indexingPolicy"]) - await created_Container.create_item(body={ "id" : "doc1", "region" : "USA" }) - await created_Container.create_item(body={ "id" : "doc2", "region" : "UK" }) - await created_Container.create_item(body={ "id" : "doc3", "region" : "Armenia" }) - await created_Container.create_item(body={ "id" : "doc4", "region" : "Egypt" }) + await created_Container.create_item(body={"id": "doc1", "region": "USA"}) + await created_Container.create_item(body={"id": "doc2", "region": "UK"}) + await created_Container.create_item(body={"id": "doc3", "region": "Armenia"}) + await created_Container.create_item(body={"id": "doc4", "region": "Egypt"}) # Now ordering against region is allowed. You can run the following query - query = { "query" : "SELECT * FROM r ORDER BY r.region" } + query = {"query": "SELECT * FROM r ORDER BY r.region"} message = "Documents ordered by region" await query_documents_with_custom_query(created_Container, query, message) # You can also perform filters against string comparison like >= 'UK'. Note that you can perform a prefix query, # the equivalent of LIKE 'U%' (is >= 'U' AND < 'U') - query = { "query" : "SELECT * FROM r WHERE r.region >= 'U'" } + query = {"query": "SELECT * FROM r WHERE r.region >= 'U'"} message = "Documents with region begining with U" await query_documents_with_custom_query(created_Container, query, message) @@ -490,24 +491,27 @@ async def perform_index_transformations(db): print_dictionary_items(properties["indexingPolicy"]) # Insert some documents - doc1 = await created_Container.create_item(body={ "id" : "dyn1", "length" : 10, "width" : 5, "height" : 15 }) - doc2 = await created_Container.create_item(body={ "id" : "dyn2", "length" : 7, "width" : 15 }) - doc3 = await created_Container.create_item(body={ "id" : "dyn3", "length" : 2 }) - print("Three docs created with ids : ", doc1["id"], doc2["id"], doc3["id"], " with indexing mode", properties['indexingPolicy']['indexingMode']) + doc1 = await created_Container.create_item(body={"id": "dyn1", "length": 10, "width": 5, "height": 15}) + doc2 = await created_Container.create_item(body={"id": "dyn2", "length": 7, "width": 15}) + doc3 = await created_Container.create_item(body={"id": "dyn3", "length": 2}) + print( + "Three docs created with ids : ", + doc1["id"], + doc2["id"], + doc3["id"], + " with indexing mode", + properties["indexingPolicy"]["indexingMode"], + ) # Switch to use string & number range indexing with maximum precision. print("Changing to string & number range indexing with maximum precision (needed for Order By).") - properties['indexingPolicy']['includedPaths'][0]['indexes'] = [{ - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.String, - 'precision': -1 - }] + properties["indexingPolicy"]["includedPaths"][0]["indexes"] = [ + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.String, "precision": -1} + ] created_Container = await db.replace_container( - container=created_Container.id, - partition_key=PARTITION_KEY, - indexing_policy=properties['indexingPolicy'] + container=created_Container.id, partition_key=PARTITION_KEY, indexing_policy=properties["indexingPolicy"] ) properties = await created_Container.read() @@ -517,12 +521,10 @@ async def perform_index_transformations(db): # Now exclude a path from indexing to save on storage space. print("Now excluding the path /length/ to save on storage space") - properties['indexingPolicy']['excludedPaths'] = [{"path" : "/length/*"}] + properties["indexingPolicy"]["excludedPaths"] = [{"path": "/length/*"}] created_Container = await db.replace_container( - container=created_Container.id, - partition_key=PARTITION_KEY, - indexing_policy=properties['indexingPolicy'] + container=created_Container.id, partition_key=PARTITION_KEY, indexing_policy=properties["indexingPolicy"] ) properties = await created_Container.read() print_dictionary_items(properties["indexingPolicy"]) @@ -543,41 +545,18 @@ async def perform_multi_orderby_query(db): # Create a container with composite indexes indexing_policy = { "compositeIndexes": [ + [{"path": "/numberField", "order": "ascending"}, {"path": "/stringField", "order": "descending"}], [ - { - "path": "/numberField", - "order": "ascending" - }, - { - "path": "/stringField", - "order": "descending" - } + {"path": "/numberField", "order": "descending"}, + {"path": "/stringField", "order": "ascending"}, + {"path": "/numberField2", "order": "descending"}, + {"path": "/stringField2", "order": "ascending"}, ], - [ - { - "path": "/numberField", - "order": "descending" - }, - { - "path": "/stringField", - "order": "ascending" - }, - { - "path": "/numberField2", - "order": "descending" - }, - { - "path": "/stringField2", - "order": "ascending" - } - ] ] } created_container = await db.create_container( - id=CONTAINER_ID, - indexing_policy=indexing_policy, - partition_key=PARTITION_KEY + id=CONTAINER_ID, indexing_policy=indexing_policy, partition_key=PARTITION_KEY ) print(created_container) properties = await created_container.read() @@ -586,36 +565,68 @@ async def perform_multi_orderby_query(db): print_dictionary_items(properties["indexingPolicy"]) # Insert some documents - await created_container.create_item(body={"id": "doc1", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc2", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc3", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc4", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc5", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc6", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc7", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc8", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc9", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc10", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc11", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc12", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc13", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc14", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "2"}) - await created_container.create_item(body={"id": "doc15", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "1"}) - await created_container.create_item(body={"id": "doc16", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "2"}) + await created_container.create_item( + body={"id": "doc1", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc2", "numberField": 1, "stringField": "1", "numberField2": 1, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc3", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc4", "numberField": 1, "stringField": "1", "numberField2": 2, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc5", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc6", "numberField": 1, "stringField": "2", "numberField2": 1, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc7", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc8", "numberField": 1, "stringField": "2", "numberField2": 2, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc9", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc10", "numberField": 2, "stringField": "1", "numberField2": 1, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc11", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc12", "numberField": 2, "stringField": "1", "numberField2": 2, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc13", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc14", "numberField": 2, "stringField": "2", "numberField2": 1, "stringField2": "2"} + ) + await created_container.create_item( + body={"id": "doc15", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "1"} + ) + await created_container.create_item( + body={"id": "doc16", "numberField": 2, "stringField": "2", "numberField2": 2, "stringField2": "2"} + ) print("Query documents and Order by 1st composite index: Ascending numberField and Descending stringField:") query = { - "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC", - } + "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC", + } await query_documents_with_custom_query(created_container, query) print("Query documents and Order by inverted 2nd composite index -") print("Ascending numberField, Descending stringField, Ascending numberField2, Descending stringField2") query = { - "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC, r.numberField2 ASC, r.stringField2 DESC", - } + "query": "SELECT * FROM r ORDER BY r.numberField ASC, r.stringField DESC, r.numberField2 ASC, r.stringField2 DESC", + } await query_documents_with_custom_query(created_container, query) # Cleanup @@ -633,24 +644,14 @@ async def use_geospatial_indexing_policy(db): # Create a container with geospatial indexes indexing_policy = { - 'includedPaths': [ - {'path': '/"Location"/?', - 'indexes': [ - { - 'kind': 'Spatial', - 'dataType': 'Point' - }] - }, - { - 'path': '/' - } + "includedPaths": [ + {"path": '/"Location"/?', "indexes": [{"kind": "Spatial", "dataType": "Point"}]}, + {"path": "/"}, ] } created_container = await db.create_container( - id=CONTAINER_ID, - partition_key=PARTITION_KEY, - indexing_policy=indexing_policy + id=CONTAINER_ID, partition_key=PARTITION_KEY, indexing_policy=indexing_policy ) properties = await created_container.read() print(created_container) @@ -659,11 +660,17 @@ async def use_geospatial_indexing_policy(db): print_dictionary_items(properties["indexingPolicy"]) # Create some items - doc9 = await created_container.create_item(body={"id": "loc1", 'Location': {'type': 'Point', 'coordinates': [20.0, 20.0]}}) - doc9 = await created_container.create_item(body={"id": "loc2", 'Location': {'type': 'Point', 'coordinates': [100.0, 100.0]}}) + doc9 = await created_container.create_item( + body={"id": "loc1", "Location": {"type": "Point", "coordinates": [20.0, 20.0]}} + ) + doc9 = await created_container.create_item( + body={"id": "loc2", "Location": {"type": "Point", "coordinates": [100.0, 100.0]}} + ) # Run ST_DISTANCE queries using the geospatial index - query = "SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)" + query = ( + "SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)" + ) await query_documents_with_custom_query(created_container, query) # Cleanup @@ -683,23 +690,13 @@ async def use_vector_embedding_policy(db): indexing_policy = { "vectorIndexes": [ {"path": "/vector", "type": "quantizedFlat", "quantizationByteSize": 8}, - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/city"], "indexingSearchListSize": 50} + {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/city"], "indexingSearchListSize": 50}, ] } vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, - { - "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" - } + {"path": "/vector", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, ] } @@ -707,7 +704,7 @@ async def use_vector_embedding_policy(db): id=CONTAINER_ID, partition_key=PARTITION_KEY, indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) properties = await created_container.read() print(created_container) @@ -726,16 +723,22 @@ def get_embeddings(num): created_container.create_item({"id": "vector_item" + str(i), "embeddings": get_embeddings(i)}) # Run vector similarity search queries using VectorDistance - query = "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings, [{}])".format(get_embeddings(1), - get_embeddings(1)) + query = ( + "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings, [{}])".format( + get_embeddings(1), get_embeddings(1) + ) + ) await query_documents_with_custom_query(created_container, query) # Run vector similarity search queries using VectorDistance with specifications - query = "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}], true, {{'dataType': 'float32' ," \ - " 'distanceFunction': 'cosine'}}) AS SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings," \ - " [{}], true, {{'dataType': 'float32', 'distanceFunction': 'cosine'}})".format(get_embeddings(1), - get_embeddings(1)) + query = ( + "SELECT TOP 5 c.id,VectorDistance(c.embeddings, [{}], true, {{'dataType': 'float32' ," + " 'distanceFunction': 'cosine'}}) AS SimilarityScore FROM c ORDER BY VectorDistance(c.embeddings," + " [{}], true, {{'dataType': 'float32', 'distanceFunction': 'cosine'}})".format( + get_embeddings(1), get_embeddings(1) + ) + ) await query_documents_with_custom_query(created_container, query) # Cleanup @@ -752,31 +755,17 @@ async def use_full_text_policy(db): await delete_container_if_exists(db, CONTAINER_ID) # Create a container with full text policy and full text indexes - indexing_policy = { - "automatic": True, - "fullTextIndexes": [ - {"path": "/text1"} - ] - } + indexing_policy = {"automatic": True, "fullTextIndexes": [{"path": "/text1"}]} full_text_policy = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/text1", - "language": "en-US" - }, - { - "path": "/text2", - "language": "en-US" - } - ] + "fullTextPaths": [{"path": "/text1", "language": "en-US"}, {"path": "/text2", "language": "en-US"}], } created_container = await db.create_container( id=CONTAINER_ID, partition_key=PARTITION_KEY, indexing_policy=indexing_policy, - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) properties = await created_container.read() print(created_container) @@ -786,16 +775,19 @@ async def use_full_text_policy(db): print_dictionary_items(properties["fullTextPolicy"]) # Create some items to use with full text search - sample_texts = ["Common popular pop music artists include Taylor Swift and The Weekend.", - "The weekend is coming up soon, do you have any plans?", - "Depending on the artist, their music can be very different.", - "Mozart and Beethoven are some of the most recognizable names in classical music.", - "Taylor acts in many movies, and is considered a great artist."] + sample_texts = [ + "Common popular pop music artists include Taylor Swift and The Weekend.", + "The weekend is coming up soon, do you have any plans?", + "Depending on the artist, their music can be very different.", + "Mozart and Beethoven are some of the most recognizable names in classical music.", + "Taylor acts in many movies, and is considered a great artist.", + ] # Create some items to use with full text search for i in range(5): - created_container.create_item({"id": "full_text_item" + str(i), "text1": sample_texts[i], - "vector": [1, 2, 3]}) + created_container.create_item( + {"id": "full_text_item" + str(i), "text1": sample_texts[i], "vector": [1, 2, 3]} + ) # Run full text search queries using full text score ranking query = "SELECT TOP 3 c.text1 FROM c ORDER BY RANK FullTextScore(c.text1, ['artist']))" @@ -806,8 +798,10 @@ async def use_full_text_policy(db): await query_documents_with_custom_query(created_container, query) # Run hybrid search queries using RRF ranking wth vector distances - query = "SELECT TOP 3 c.text1 FROM c ORDER BY RANK RRF(FullTextScore(c.text1, ['music'])," \ - " VectorDistance(c.vector, [1, 2, 3]))" + query = ( + "SELECT TOP 3 c.text1 FROM c ORDER BY RANK RRF(FullTextScore(c.text1, ['music'])," + " VectorDistance(c.vector, [1, 2, 3]))" + ) await query_documents_with_custom_query(created_container, query) # Cleanup @@ -861,5 +855,6 @@ async def run_sample(): except exceptions.AzureError as e: raise e -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/read_items_sample.py b/sdk/cosmos/azure-cosmos/samples/read_items_sample.py index e9f971c9a94f..038104332bbc 100644 --- a/sdk/cosmos/azure-cosmos/samples/read_items_sample.py +++ b/sdk/cosmos/azure-cosmos/samples/read_items_sample.py @@ -7,6 +7,7 @@ from azure.cosmos import CosmosClient, ContainerProxy, PartitionKey import azure.cosmos.exceptions as exceptions import config + # ---------------------------------------------------------------------------------------------------------- # Prerequisites - # @@ -20,8 +21,8 @@ # ---------------------------------------------------------------------------------------------------------- # Use the default emulator settings -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] DATABASE_ID = "read_items_sync_db" CONTAINER_ID = "read_items_sync_container" @@ -34,7 +35,7 @@ def create_items(container: ContainerProxy, num_items: int) -> list: doc_id = f"item_{i}_{uuid.uuid4()}" # For this sample, the partition key is the same as the item id pk_value = doc_id - item_body = {'id': doc_id, 'data': i} + item_body = {"id": doc_id, "data": i} container.create_item(body=item_body) items_to_read.append((doc_id, pk_value)) print(f"{num_items} items created.") @@ -69,25 +70,22 @@ def demonstrate_read_items(container: ContainerProxy) -> None: def response_hook(hook_headers, results): """A simple hook to capture the aggregated headers and the final result list.""" print("Response hook called!") - hook_captured_data['hook_headers'] = hook_headers - hook_captured_data['results'] = results - hook_captured_data['call_count'] = hook_captured_data.get('call_count', 0) + 1 + hook_captured_data["hook_headers"] = hook_headers + hook_captured_data["results"] = results + hook_captured_data["call_count"] = hook_captured_data.get("call_count", 0) + 1 items_for_hook = create_items(container, 10) - hook_results = container.read_items( - items=items_for_hook, - response_hook=response_hook - ) + hook_results = container.read_items(items=items_for_hook, response_hook=response_hook) print(f"Response hook was called {hook_captured_data.get('call_count', 0)} time(s).") - if 'hook_headers' in hook_captured_data: + if "hook_headers" in hook_captured_data: print(f"Aggregated request charge from hook: {hook_captured_data['hook_headers'].get('x-ms-request-charge')}") print(f"Result list from hook is the same as returned list: {hook_captured_data['results'] is hook_results}") def run_sample(): """A synchronous sample for the read_items API.""" - client = CosmosClient(HOST, {'masterKey': MASTER_KEY}) + client = CosmosClient(HOST, {"masterKey": MASTER_KEY}) db = None try: # Create a database @@ -96,10 +94,7 @@ def run_sample(): # Create a container with /id as the partition key partition_key = PartitionKey(path="/id") - container = db.create_container_if_not_exists( - id=CONTAINER_ID, - partition_key=partition_key - ) + container = db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=partition_key) print(f"Container '{CONTAINER_ID}' created or already exists.") demonstrate_read_items(container) @@ -118,5 +113,5 @@ def run_sample(): print(f"Database '{DATABASE_ID}' was not found, cleanup not needed.") -if __name__ == '__main__': - run_sample() \ No newline at end of file +if __name__ == "__main__": + run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/read_items_sample_async.py b/sdk/cosmos/azure-cosmos/samples/read_items_sample_async.py index dfca680bfbb2..badd40961b9d 100644 --- a/sdk/cosmos/azure-cosmos/samples/read_items_sample_async.py +++ b/sdk/cosmos/azure-cosmos/samples/read_items_sample_async.py @@ -22,8 +22,8 @@ # Sample - demonstrates the asynchronous read_items API for Azure Cosmos DB # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] DATABASE_ID = "read_items_async_db" CONTAINER_ID = "read_items_async_container" @@ -36,7 +36,7 @@ async def create_items(container: ContainerProxy, num_items: int) -> list: doc_id = f"item_{i}_{uuid.uuid4()}" # For this sample, the partition key is the same as the item id pk_value = doc_id - item_body = {'id': doc_id, 'data': i} + item_body = {"id": doc_id, "data": i} await container.create_item(body=item_body) items_to_read.append((doc_id, pk_value)) print(f"{num_items} items created.") @@ -71,25 +71,22 @@ async def demonstrate_read_items(container: ContainerProxy) -> None: def response_hook(headers, results): """A simple hook to capture the aggregated headers and the final result list.""" print("Response hook called!") - hook_captured_data['headers'] = headers - hook_captured_data['results'] = results - hook_captured_data['call_count'] = hook_captured_data.get('call_count', 0) + 1 + hook_captured_data["headers"] = headers + hook_captured_data["results"] = results + hook_captured_data["call_count"] = hook_captured_data.get("call_count", 0) + 1 items_for_hook = await create_items(container, 10) - hook_results = await container.read_items( - items=items_for_hook, - response_hook=response_hook - ) + hook_results = await container.read_items(items=items_for_hook, response_hook=response_hook) print(f"Response hook was called {hook_captured_data.get('call_count', 0)} time(s).") - if 'headers' in hook_captured_data: + if "headers" in hook_captured_data: print(f"Aggregated request charge from hook: {hook_captured_data['headers'].get('x-ms-request-charge')}") print(f"Result list from hook is the same as returned list: {hook_captured_data['results'] is hook_results}") async def run_sample(): """An asynchronous sample for the read_items API.""" - client = CosmosClient(HOST, {'masterKey': MASTER_KEY}) + client = CosmosClient(HOST, {"masterKey": MASTER_KEY}) db = None try: # Create a database @@ -98,10 +95,7 @@ async def run_sample(): # Create a container with /id as the partition key partition_key = PartitionKey(path="/id") - container = await db.create_container_if_not_exists( - id=CONTAINER_ID, - partition_key=partition_key - ) + container = await db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=partition_key) print(f"Container '{CONTAINER_ID}' created or already exists.") await demonstrate_read_items(container) @@ -121,5 +115,5 @@ async def run_sample(): await client.close() -if __name__ == '__main__': - asyncio.run(run_sample()) \ No newline at end of file +if __name__ == "__main__": + asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/session_token_management.py b/sdk/cosmos/azure-cosmos/samples/session_token_management.py index 46e781e86435..780788b0d496 100644 --- a/sdk/cosmos/azure-cosmos/samples/session_token_management.py +++ b/sdk/cosmos/azure-cosmos/samples/session_token_management.py @@ -40,14 +40,14 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] +HOST = config.settings["host"] CREDENTIAL = DefaultAzureCredential() -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] -def storing_session_tokens_pk(container): - print('1. Storing session tokens in a cache by feed range from the partition key.') +def storing_session_tokens_pk(container): + print("1. Storing session tokens in a cache by feed range from the partition key.") cache: Dict[str, Any] = {} @@ -58,17 +58,16 @@ def storing_session_tokens_pk(container): # populating cache with session tokens for i in range(5): - item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'pk': 'A' + str(random.randint(1, 10)) - } - target_feed_range = container.feed_range_from_partition_key(item['pk']) - perform_create_item_with_cached_session_token(cache, container, feed_ranges_and_session_tokens, item, - target_feed_range) - -def perform_create_item_with_cached_session_token(cache, container, feed_ranges_and_session_tokens, item, - target_feed_range): + item = {"id": "item" + str(uuid.uuid4()), "name": "sample", "pk": "A" + str(random.randint(1, 10))} + target_feed_range = container.feed_range_from_partition_key(item["pk"]) + perform_create_item_with_cached_session_token( + cache, container, feed_ranges_and_session_tokens, item, target_feed_range + ) + + +def perform_create_item_with_cached_session_token( + cache, container, feed_ranges_and_session_tokens, item, target_feed_range +): # only doing this for the key to be immutable feed_range_json = json.dumps(target_feed_range) session_token = cache[feed_range_json] if feed_range_json in cache else None @@ -83,8 +82,9 @@ def perform_create_item_with_cached_session_token(cache, container, feed_ranges_ # only doing this for the key to be immutable cache[feed_range_json] = latest_session_token + def storing_session_tokens_container_feed_ranges(container): - print('2. Storing session tokens in a cache by feed range from the container.') + print("2. Storing session tokens in a cache by feed range from the container.") # The cache is a dictionary here for simplicity but in a real-world scenario, it would be some service. cache: Dict[str, Any] = {} @@ -96,23 +96,26 @@ def storing_session_tokens_container_feed_ranges(container): # populating cache with session tokens for i in range(5): - item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'pk': 'A' + str(random.randint(1, 10)) - } - feed_range_from_pk = container.feed_range_from_partition_key(item['pk']) + item = {"id": "item" + str(uuid.uuid4()), "name": "sample", "pk": "A" + str(random.randint(1, 10))} + feed_range_from_pk = container.feed_range_from_partition_key(item["pk"]) target_feed_range: dict = next( - (feed_range for feed_range in feed_ranges if container.is_feed_range_subset(feed_range, feed_range_from_pk)), - {} + ( + feed_range + for feed_range in feed_ranges + if container.is_feed_range_subset(feed_range, feed_range_from_pk) + ), + {}, ) - perform_create_item_with_cached_session_token(cache, container, feed_ranges_and_session_tokens, item, target_feed_range) + perform_create_item_with_cached_session_token( + cache, container, feed_ranges_and_session_tokens, item, target_feed_range + ) + def run_sample(): with CosmosClient(HOST, CREDENTIAL) as client: try: db = client.create_database_if_not_exists(id=DATABASE_ID) - container = db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey('/pk')) + container = db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey("/pk")) # example of storing session tokens in cache by feed range from the partition key storing_session_tokens_pk(container) @@ -128,11 +131,11 @@ def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/session_token_management_async.py b/sdk/cosmos/azure-cosmos/samples/session_token_management_async.py index 9ba58d4c0dc4..eb945480a23b 100644 --- a/sdk/cosmos/azure-cosmos/samples/session_token_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/session_token_management_async.py @@ -41,14 +41,14 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] +HOST = config.settings["host"] CREDENTIAL = DefaultAzureCredential() -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] -async def storing_session_tokens_pk(container): - print('1. Storing session tokens in a cache by feed range from the partition key.') +async def storing_session_tokens_pk(container): + print("1. Storing session tokens in a cache by feed range from the partition key.") cache: Dict[str, Any] = {} @@ -59,17 +59,16 @@ async def storing_session_tokens_pk(container): # populating cache with session tokens for i in range(5): - item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'pk': 'A' + str(random.randint(1, 10)) - } - target_feed_range = await container.feed_range_from_partition_key(item['pk']) - await perform_create_item_with_cached_session_token(cache, container, feed_ranges_and_session_tokens, item, - target_feed_range) - -async def perform_create_item_with_cached_session_token(cache, container, feed_ranges_and_session_tokens, item, - target_feed_range): + item = {"id": "item" + str(uuid.uuid4()), "name": "sample", "pk": "A" + str(random.randint(1, 10))} + target_feed_range = await container.feed_range_from_partition_key(item["pk"]) + await perform_create_item_with_cached_session_token( + cache, container, feed_ranges_and_session_tokens, item, target_feed_range + ) + + +async def perform_create_item_with_cached_session_token( + cache, container, feed_ranges_and_session_tokens, item, target_feed_range +): # only doing this for the key to be immutable feed_range_json = json.dumps(target_feed_range) session_token = cache[feed_range_json] if feed_range_json in cache else None @@ -85,7 +84,7 @@ async def perform_create_item_with_cached_session_token(cache, container, feed_r async def storing_session_tokens_container_feed_ranges(container): - print('2. Storing session tokens in a cache by feed range from the container.') + print("2. Storing session tokens in a cache by feed range from the container.") # The cache is a dictionary here for simplicity but in a real-world scenario, it would be some service. cache: Dict[str, Any] = {} @@ -97,25 +96,23 @@ async def storing_session_tokens_container_feed_ranges(container): # populating cache with session tokens for i in range(5): - item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'pk': 'A' + str(random.randint(1, 10)) - } - feed_range_from_pk = await container.feed_range_from_partition_key(item['pk']) + item = {"id": "item" + str(uuid.uuid4()), "name": "sample", "pk": "A" + str(random.randint(1, 10))} + feed_range_from_pk = await container.feed_range_from_partition_key(item["pk"]) target_feed_range = {} for feed_range in feed_ranges: if await container.is_feed_range_subset(feed_range, feed_range_from_pk): target_feed_range = feed_range break - await perform_create_item_with_cached_session_token(cache, container, feed_ranges_and_session_tokens, item, target_feed_range) + await perform_create_item_with_cached_session_token( + cache, container, feed_ranges_and_session_tokens, item, target_feed_range + ) async def run_sample(): async with CosmosClient(HOST, CREDENTIAL) as client: try: db = await client.create_database_if_not_exists(id=DATABASE_ID) - container = await db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey('/pk')) + container = await db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey("/pk")) # example of storing session tokens in cache by feed range from the partition key await storing_session_tokens_pk(container) @@ -131,11 +128,11 @@ async def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management.py b/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management.py index 4b34a7f81be5..0401fe18826d 100644 --- a/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management.py +++ b/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management.py @@ -39,105 +39,86 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] + # Applies throughput bucket 1 to all requests from a client application def create_client_with_throughput_bucket(host=HOST, master_key=MASTER_KEY): - cosmos_client.CosmosClient(host, master_key, - throughput_bucket=1) + cosmos_client.CosmosClient(host, master_key, throughput_bucket=1) + # Applies throughput bucket 2 for read item requests def container_read_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) - created_document = created_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_container = database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) + created_document = created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) - created_container.read_item( - item=created_document['id'], - partition_key="mypk", - throughput_bucket=2) + created_container.read_item(item=created_document["id"], partition_key="mypk", throughput_bucket=2) database.delete_container(created_container.id) + # Applies throughput bucket 3 for create item requests def container_create_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) - created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=3) + created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=3) database.delete_container(created_container.id) + # Applies throughput bucket 3 for create item requests and bucket 4 for delete item requests def container_create_and_delete_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) created_item = created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=3) + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=3 + ) - created_container.delete_item( - created_item['id'], - partition_key='mypk', - throughput_bucket=4) + created_container.delete_item(created_item["id"], partition_key="mypk", throughput_bucket=4) database.delete_container(created_container.id) + # Applies throughput bucket 1 to all requests from a client application, and bucket 2 to create item requests def create_client_and_item_with_throughput_bucket(host=HOST, master_key=MASTER_KEY): - client = cosmos_client.CosmosClient(host, master_key, - throughput_bucket=1) + client = cosmos_client.CosmosClient(host, master_key, throughput_bucket=1) database = client.get_database_client(DATABASE_ID) - created_container = database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) - created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=2) + created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=2) database.delete_container(created_container.id) + # Applies throughput bucket 3 for create item requests, bucket 4 for upsert item requests, and bucket 5 for delete item def container_create_upsert_and_delete_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) created_item = created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=3) + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=3 + ) # add items for partition key 1 for i in range(1, 3): - created_container.upsert_item( - dict(id="item{}".format(i), pk='mypk', throughput_bucket=4)) + created_container.upsert_item(dict(id="item{}".format(i), pk="mypk", throughput_bucket=4)) - created_container.delete_item( - created_item['id'], - partition_key='mypk', - throughput_bucket=5) + created_container.delete_item(created_item["id"], partition_key="mypk", throughput_bucket=5) database.delete_container(created_container.id) + def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY} ) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) client.create_database_if_not_exists(id=DATABASE_ID) try: # creates client @@ -159,10 +140,11 @@ def run_sample(): container_create_upsert_and_delete_item_throughput_bucket(client) except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': + +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management_async.py b/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management_async.py index 6f8f9d92e9ec..fce39ca6a44c 100644 --- a/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/throughput_bucket_management_async.py @@ -40,106 +40,88 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] + # Applies throughput bucket 1 to all requests from a client application async def create_client_with_throughput_bucket(host=HOST, master_key=MASTER_KEY): async with CosmosClient(host, master_key, throughput_bucket=1) as client: pass + # Applies throughput bucket 2 for read item requests async def container_read_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = await database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) - created_document = await created_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_container = await database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) + created_document = await created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) - await created_container.read_item( - item=created_document['id'], - partition_key="mypk", - throughput_bucket=2) + await created_container.read_item(item=created_document["id"], partition_key="mypk", throughput_bucket=2) await database.delete_container(created_container.id) + # Applies throughput bucket 3 for create item requests async def container_create_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = await database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = await database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) - await created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=3) + await created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=3) await database.delete_container(created_container.id) + # Applies throughput bucket 3 for create item requests and bucket 4 for delete item requests async def container_create_and_delete_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = await database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = await database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) created_item = await created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=3) + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=3 + ) - await created_container.delete_item( - created_item['id'], - partition_key='mypk', - throughput_bucket=4) + await created_container.delete_item(created_item["id"], partition_key="mypk", throughput_bucket=4) await database.delete_container(created_container.id) + # Applies throughput bucket 1 to all requests from a client application, and bucket 2 to create item requests async def create_client_and_item_with_throughput_bucket(host=HOST, master_key=MASTER_KEY): - async with CosmosClient(host, master_key, - throughput_bucket=1) as client: + async with CosmosClient(host, master_key, throughput_bucket=1) as client: database = client.get_database_client(DATABASE_ID) - created_container = await database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = await database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) - await created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=2) + await created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=2) await database.delete_container(created_container.id) + # Applies throughput bucket 3 for create item requests, bucket 4 for upsert item requests, and bucket 5 for delete item async def container_create_upsert_and_delete_item_throughput_bucket(client): database = client.get_database_client(DATABASE_ID) - created_container = await database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = await database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) created_item = await created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - throughput_bucket=3) + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=3 + ) # add items for partition key 1 for i in range(1, 3): - await created_container.upsert_item( - dict(id="item{}".format(i), pk='mypk', throughput_bucket=4)) + await created_container.upsert_item(dict(id="item{}".format(i), pk="mypk", throughput_bucket=4)) - await created_container.delete_item( - created_item['id'], - partition_key='mypk', - throughput_bucket=5) + await created_container.delete_item(created_item["id"], partition_key="mypk", throughput_bucket=5) await database.delete_container(created_container.id) + async def run_sample(): - async with CosmosClient(HOST, {'masterKey': MASTER_KEY} ) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: await client.create_database_if_not_exists(id=DATABASE_ID) try: # creates client @@ -161,10 +143,11 @@ async def run_sample(): await container_create_upsert_and_delete_item_throughput_bucket(client) except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/tracing_open_telemetry.py b/sdk/cosmos/azure-cosmos/samples/tracing_open_telemetry.py index 85e1e2f7f3c6..212ecf3526a6 100644 --- a/sdk/cosmos/azure-cosmos/samples/tracing_open_telemetry.py +++ b/sdk/cosmos/azure-cosmos/samples/tracing_open_telemetry.py @@ -42,9 +42,7 @@ trace.set_tracer_provider(TracerProvider()) tracer = trace.get_tracer(__name__) -trace.get_tracer_provider().add_span_processor( - SimpleSpanProcessor(exporter) -) +trace.get_tracer_provider().add_span_processor(SimpleSpanProcessor(exporter)) # Example with Cosmos SDK import os @@ -56,4 +54,4 @@ with tracer.start_as_current_span(name="MyApplication"): client = CosmosClient(url=account_url, credential=credential) - client.create_database(database_name) # Call will be traced \ No newline at end of file + client.create_database(database_name) # Call will be traced diff --git a/sdk/cosmos/azure-cosmos/samples/transactional_batch.py b/sdk/cosmos/azure-cosmos/samples/transactional_batch.py index 1957bd971989..d9fd2700f177 100644 --- a/sdk/cosmos/azure-cosmos/samples/transactional_batch.py +++ b/sdk/cosmos/azure-cosmos/samples/transactional_batch.py @@ -23,14 +23,14 @@ # Sample - demonstrates Transactional Batch for Azure Cosmos DB Python SDK # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] CONTAINER_ID = "batch_container" def execute_item_batch(database, container): - print('\n1.11 Executing Batch Item operations\n') + print("\n1.11 Executing Batch Item operations\n") # We create three items to use for the sample. These are not part of the batch operations container.create_item(get_sales_order("read_item")) @@ -42,17 +42,20 @@ def execute_item_batch(database, container): upsert_item_operation = ("upsert", (get_sales_order("upsert_item"),)) read_item_operation = ("read", ("read_item",)) delete_item_operation = ("delete", ("delete_item",)) - replace_item_operation = ("replace", ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"})) - replace_item_if_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_match_etag": container.client_connection.last_response_headers.get("etag")}) - replace_item_if_none_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_none_match_etag": - container.client_connection.last_response_headers.get("etag")}) + replace_item_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + ) + replace_item_if_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_match_etag": container.client_connection.last_response_headers.get("etag")}, + ) + replace_item_if_none_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_none_match_etag": container.client_connection.last_response_headers.get("etag")}, + ) # Put our operations into a list batch_operations = [ @@ -62,8 +65,9 @@ def execute_item_batch(database, container): delete_item_operation, replace_item_operation, # This below operation fails with status code 412, causing batch to fail and all operations to roll back - replace_item_if_match_operation, # -> Comment this line out to see batch operations succeeding. - replace_item_if_none_match_operation] + replace_item_if_match_operation, # -> Comment this line out to see batch operations succeeding. + replace_item_if_none_match_operation, + ] # Run that list of operations try: @@ -81,42 +85,37 @@ def execute_item_batch(database, container): print("\nError operation: {}, error operation response: {}\n".format(error_operation, error_operation_response)) print("\nAn error occurred in the batch operation. All operations have been rolled back.\n") - # You can also use this logic to read directly from a file into the batch you'd like to create: # with open("file_name.txt", "r") as data_file: # container.execute_item_batch([("upsert", (t,)) for t in data_file.readlines()]) def get_sales_order(item_id): - order1 = {'id': item_id, - 'account_number': 'Account1', - 'purchase_order_number': 'PO18009186470', - 'order_date': datetime.date(2005, 1, 10).strftime('%c'), - 'subtotal': 419.4589, - 'tax_amount': 12.5838, - 'freight': 472.3108, - 'total_due': 985.018, - 'items': [ - {'order_qty': 1, - 'product_id': 100, - 'unit_price': 418.4589, - 'line_price': 418.4589 - } - ], - 'ttl': 60 * 60 * 24 * 30 - } + order1 = { + "id": item_id, + "account_number": "Account1", + "purchase_order_number": "PO18009186470", + "order_date": datetime.date(2005, 1, 10).strftime("%c"), + "subtotal": 419.4589, + "tax_amount": 12.5838, + "freight": 472.3108, + "total_due": 985.018, + "items": [{"order_qty": 1, "product_id": 100, "unit_price": 418.4589, "line_price": 418.4589}], + "ttl": 60 * 60 * 24 * 30, + } return order1 def run_sample(): - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY}) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) try: # setup database for this sample db = client.create_database_if_not_exists(id=DATABASE_ID) # setup container for this sample - container = db.create_container_if_not_exists(id=CONTAINER_ID, - partition_key=PartitionKey(path='/account_number')) + container = db.create_container_if_not_exists( + id=CONTAINER_ID, partition_key=PartitionKey(path="/account_number") + ) execute_item_batch(db, container) # cleanup database after sample @@ -127,11 +126,11 @@ def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/transactional_batch_async.py b/sdk/cosmos/azure-cosmos/samples/transactional_batch_async.py index a0c98370c4a8..0e2258d03d17 100644 --- a/sdk/cosmos/azure-cosmos/samples/transactional_batch_async.py +++ b/sdk/cosmos/azure-cosmos/samples/transactional_batch_async.py @@ -24,36 +24,39 @@ # Sample - demonstrates Transactional Batch for Azure Cosmos DB Python SDK async # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] CONTAINER_ID = "batch_container" async def execute_item_batch(database, container): - print('\n1.11 Executing Batch Item operations\n') + print("\n1.11 Executing Batch Item operations\n") # We create three items to use for the sample. These are not part of the batch operations await container.create_item(get_sales_order("read_item")) await container.create_item(get_sales_order("delete_item")) await container.create_item(get_sales_order("replace_item")) - + # We create our batch operations create_item_operation = ("create", (get_sales_order("create_item"),)) upsert_item_operation = ("upsert", (get_sales_order("upsert_item"),)) read_item_operation = ("read", ("read_item",)) delete_item_operation = ("delete", ("delete_item",)) - replace_item_operation = ("replace", ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"})) - replace_item_if_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_match_etag": container.client_connection.last_response_headers.get("etag")}) - replace_item_if_none_match_operation = ("replace", - ("replace_item", {"id": "replace_item", 'account_number': 'Account1', - "message": "item was replaced"}), - {"if_none_match_etag": - container.client_connection.last_response_headers.get("etag")}) + replace_item_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + ) + replace_item_if_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_match_etag": container.client_connection.last_response_headers.get("etag")}, + ) + replace_item_if_none_match_operation = ( + "replace", + ("replace_item", {"id": "replace_item", "account_number": "Account1", "message": "item was replaced"}), + {"if_none_match_etag": container.client_connection.last_response_headers.get("etag")}, + ) # Put our operations into a list batch_operations = [ @@ -63,8 +66,9 @@ async def execute_item_batch(database, container): delete_item_operation, replace_item_operation, # This below operation fails with status code 412, causing batch to fail and all operations to roll back - replace_item_if_match_operation, # -> Comment this line out to see batch operations succeeding. - replace_item_if_none_match_operation] + replace_item_if_match_operation, # -> Comment this line out to see batch operations succeeding. + replace_item_if_none_match_operation, + ] # Run that list of operations try: @@ -82,44 +86,39 @@ async def execute_item_batch(database, container): print("\nError operation: {}, error operation response: {}\n".format(error_operation, error_operation_response)) print("\nAn error occurred in the batch operation. All operations have been rolled back.\n") - # You can also use this logic to read directly from a file into the batch you'd like to create: # with open("file_name.txt", "r") as data_file: # container.execute_item_batch([("upsert", (t,)) for t in data_file.readlines()]) def get_sales_order(item_id): - order1 = {'id': item_id, - 'account_number': 'Account1', - 'purchase_order_number': 'PO18009186470', - 'order_date': datetime.date(2005, 1, 10).strftime('%c'), - 'subtotal': 419.4589, - 'tax_amount': 12.5838, - 'freight': 472.3108, - 'total_due': 985.018, - 'items': [ - {'order_qty': 1, - 'product_id': 100, - 'unit_price': 418.4589, - 'line_price': 418.4589 - } - ], - 'ttl': 60 * 60 * 24 * 30 - } + order1 = { + "id": item_id, + "account_number": "Account1", + "purchase_order_number": "PO18009186470", + "order_date": datetime.date(2005, 1, 10).strftime("%c"), + "subtotal": 419.4589, + "tax_amount": 12.5838, + "freight": 472.3108, + "total_due": 985.018, + "items": [{"order_qty": 1, "product_id": 100, "unit_price": 418.4589, "line_price": 418.4589}], + "ttl": 60 * 60 * 24 * 30, + } return order1 async def run_sample(): - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: try: # setup database for this sample db = await client.create_database_if_not_exists(id=DATABASE_ID) # setup container for this sample - container = await db.create_container_if_not_exists(id="batch_container", - partition_key=PartitionKey(path='/account_number')) - print('Container with id \'{0}\' created'.format(CONTAINER_ID)) + container = await db.create_container_if_not_exists( + id="batch_container", partition_key=PartitionKey(path="/account_number") + ) + print("Container with id '{0}' created".format(CONTAINER_ID)) await execute_item_batch(db, container) @@ -131,11 +130,11 @@ async def run_sample(): pass except exceptions.CosmosHttpResponseError as e: - print('\nrun_sample has caught an error. {0}'.format(e.message)) + print("\nrun_sample has caught an error. {0}".format(e.message)) finally: print("\nrun_sample done") -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/user_agent_management.py b/sdk/cosmos/azure-cosmos/samples/user_agent_management.py index 2bdac06e03ec..b8130fd83363 100644 --- a/sdk/cosmos/azure-cosmos/samples/user_agent_management.py +++ b/sdk/cosmos/azure-cosmos/samples/user_agent_management.py @@ -36,226 +36,204 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] def create_client_with_default_user_agent(): """ Create a Cosmos DB client with the default user agent. - + The default user agent includes information about the SDK version and Python version. Example: "azsdk-python-cosmos/4.5.0 Python/3.11.0 (Windows-10-10.0.22621-SP0)" """ - print('\n1. Creating client with default user agent') - - client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY}) - - print('Client created with default user agent') - print('The default user agent includes SDK version, Python version, and platform information') - + print("\n1. Creating client with default user agent") + + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}) + + print("Client created with default user agent") + print("The default user agent includes SDK version, Python version, and platform information") + return client def create_client_with_custom_user_agent(): """ Create a Cosmos DB client with a custom user agent suffix. - + The user_agent parameter appends a custom string to the default user agent, allowing you to identify your specific application or service. """ - print('\n2. Creating client with custom user agent') - + print("\n2. Creating client with custom user agent") + # Add a custom suffix to identify your application custom_user_agent = "MyApplication/1.0.0" - - client = cosmos_client.CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=custom_user_agent - ) - - print(f'Client created with custom user agent: {custom_user_agent}') - print('This will appear as: [default-user-agent] {}'.format(custom_user_agent)) - + + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=custom_user_agent) + + print(f"Client created with custom user agent: {custom_user_agent}") + print("This will appear as: [default-user-agent] {}".format(custom_user_agent)) + return client def create_client_with_detailed_user_agent(): """ Create a client with a detailed custom user agent including multiple identifiers. - + You can include multiple pieces of information to make diagnostics more useful: - Application name and version - Service or microservice name - Environment (dev, staging, production) - Instance or process identifier """ - print('\n3. Creating client with detailed custom user agent') - + print("\n3. Creating client with detailed custom user agent") + # Include detailed information about your application app_name = "OrderProcessingService" app_version = "2.3.1" environment = "production" instance_id = "instance-42" - + detailed_user_agent = f"{app_name}/{app_version} env:{environment} {instance_id}" - - client = cosmos_client.CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=detailed_user_agent - ) - - print(f'Client created with detailed user agent: {detailed_user_agent}') - print('This helps identify specific instances in diagnostics and logs') - + + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=detailed_user_agent) + + print(f"Client created with detailed user agent: {detailed_user_agent}") + print("This helps identify specific instances in diagnostics and logs") + return client def create_multiple_clients_with_different_user_agents(): """ Demonstrate creating multiple clients with different user agents. - + This is useful when you have multiple services or components in your application that need to be tracked separately in diagnostics. """ - print('\n4. Creating multiple clients with different user agents') - + print("\n4. Creating multiple clients with different user agents") + # Client for data ingestion service ingestion_client = cosmos_client.CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix="DataIngestionService/1.0.0" + HOST, {"masterKey": MASTER_KEY}, user_agent_suffix="DataIngestionService/1.0.0" ) - print('Created client for data ingestion: DataIngestionService/1.0.0') - + print("Created client for data ingestion: DataIngestionService/1.0.0") + # Client for query service - query_client = cosmos_client.CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix="QueryService/1.0.0" - ) - print('Created client for queries: QueryService/1.0.0') - + query_client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix="QueryService/1.0.0") + print("Created client for queries: QueryService/1.0.0") + # Client for analytics service analytics_client = cosmos_client.CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix="AnalyticsService/1.0.0" + HOST, {"masterKey": MASTER_KEY}, user_agent_suffix="AnalyticsService/1.0.0" ) - print('Created client for analytics: AnalyticsService/1.0.0') - - print('\nNow you can distinguish requests from different services in diagnostics') - + print("Created client for analytics: AnalyticsService/1.0.0") + + print("\nNow you can distinguish requests from different services in diagnostics") + return ingestion_client, query_client, analytics_client def demonstrate_user_agent_in_operations(client, custom_suffix="DemoClient/1.0.0"): """ Perform operations with a custom user agent and show how it helps with diagnostics. - + The user agent will appear in: - Azure Monitor logs - Cosmos DB diagnostic logs - Request headers sent to the service - Performance and usage analytics """ - print('\n5. Demonstrating user agent in operations') - + print("\n5. Demonstrating user agent in operations") + try: # Create database db = client.create_database_if_not_exists(id=DATABASE_ID) - print(f'Database created/accessed with user agent: {custom_suffix}') - + print(f"Database created/accessed with user agent: {custom_suffix}") + # Create container - container = db.create_container_if_not_exists( - id=CONTAINER_ID, - partition_key=PartitionKey(path='/id') - ) - print(f'Container created/accessed with user agent: {custom_suffix}') - + container = db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey(path="/id")) + print(f"Container created/accessed with user agent: {custom_suffix}") + # Create or upsert an item - item = { - 'id': 'sample_item_1', - 'name': 'Sample Item', - 'description': 'Created with custom user agent' - } + item = {"id": "sample_item_1", "name": "Sample Item", "description": "Created with custom user agent"} container.upsert_item(body=item) - print(f'Item created/updated with user agent: {custom_suffix}') - + print(f"Item created/updated with user agent: {custom_suffix}") + # Query items - items = list(container.query_items( - query="SELECT * FROM c WHERE c.id = @id", - parameters=[{"name": "@id", "value": "sample_item_1"}], - enable_cross_partition_query=True - )) - print(f'Query executed with user agent: {custom_suffix}') - print(f'Found {len(items)} item(s)') - - print('\nAll these operations will show your custom user agent in diagnostics') - + items = list( + container.query_items( + query="SELECT * FROM c WHERE c.id = @id", + parameters=[{"name": "@id", "value": "sample_item_1"}], + enable_cross_partition_query=True, + ) + ) + print(f"Query executed with user agent: {custom_suffix}") + print(f"Found {len(items)} item(s)") + + print("\nAll these operations will show your custom user agent in diagnostics") + # Cleanup: Delete the item - container.delete_item(item='sample_item_1', partition_key='sample_item_1') - print(f'\nCleanup: Deleted sample item') - + container.delete_item(item="sample_item_1", partition_key="sample_item_1") + print(f"\nCleanup: Deleted sample item") + except Exception as e: - print(f'Error during operations: {e}') + print(f"Error during operations: {e}") + def demonstrate_operations_with_multiple_user_agents(): """ Show how different user agents help track multiple operations. """ - print('\n6. Demonstrating Multiple operations with different user agents') + print("\n6. Demonstrating Multiple operations with different user agents") def operation_with_user_agent(user_agent_suffix, operation_name): """Helper function to perform operation with specific user agent.""" - client = cosmos_client.CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=user_agent_suffix - ) + client = cosmos_client.CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=user_agent_suffix) db = client.create_database_if_not_exists(id=DATABASE_ID) - print(f'{operation_name} completed with user agent: {user_agent_suffix}') + print(f"{operation_name} completed with user agent: {user_agent_suffix}") # Run multiple operations with different user agents operation_with_user_agent("Worker1/1.0.0", "Worker 1") operation_with_user_agent("Worker2/1.0.0", "Worker 2") operation_with_user_agent("Worker3/1.0.0", "Worker 3") - print('\nEach operation can be tracked separately in diagnostics') + print("\nEach operation can be tracked separately in diagnostics") + def run_sample(): """ Run all user agent examples. """ - print('=' * 70) - print('Azure Cosmos DB - User Agent Management Sample') - print('=' * 70) - + print("=" * 70) + print("Azure Cosmos DB - User Agent Management Sample") + print("=" * 70) + # Example 1: Default user agent default_client = create_client_with_default_user_agent() - + # Example 2: Simple custom user agent custom_client = create_client_with_custom_user_agent() - + # Example 3: Detailed user agent detailed_client = create_client_with_detailed_user_agent() - + # Example 4: Multiple clients with different user agents ingestion_client, query_client, analytics_client = create_multiple_clients_with_different_user_agents() - + # Example 5: Show user agent in operations demonstrate_user_agent_in_operations(detailed_client, "OrderProcessingService/2.3.1") # Example 6: Operations with different user agents demonstrate_operations_with_multiple_user_agents() - print('\n' + '=' * 70) - print('Sample completed!') - print('=' * 70) + print("\n" + "=" * 70) + print("Sample completed!") + print("=" * 70) + -if __name__ == '__main__': +if __name__ == "__main__": run_sample() diff --git a/sdk/cosmos/azure-cosmos/samples/user_agent_management_async.py b/sdk/cosmos/azure-cosmos/samples/user_agent_management_async.py index eab237360a33..1eac25369f9f 100644 --- a/sdk/cosmos/azure-cosmos/samples/user_agent_management_async.py +++ b/sdk/cosmos/azure-cosmos/samples/user_agent_management_async.py @@ -37,213 +37,193 @@ # the provisioned throughput (RU/s) of that account. # ---------------------------------------------------------------------------------------------------------- -HOST = config.settings['host'] -MASTER_KEY = config.settings['master_key'] -DATABASE_ID = config.settings['database_id'] -CONTAINER_ID = config.settings['container_id'] +HOST = config.settings["host"] +MASTER_KEY = config.settings["master_key"] +DATABASE_ID = config.settings["database_id"] +CONTAINER_ID = config.settings["container_id"] async def create_client_with_default_user_agent(): """ Create an async Cosmos DB client with the default user agent. - + The default user agent includes information about the SDK version and Python version. Example: "azsdk-python-cosmos/4.5.0 Python/3.11.0 (Windows-10-10.0.22621-SP0)" """ - print('\n1. Creating async client with default user agent') - - async with CosmosClient(HOST, {'masterKey': MASTER_KEY}) as client: - print('Async client created with default user agent') - print('The default user agent includes SDK version, Python version, and platform information') + print("\n1. Creating async client with default user agent") + + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}) as client: + print("Async client created with default user agent") + print("The default user agent includes SDK version, Python version, and platform information") return client async def create_client_with_custom_user_agent(): """ Create an async Cosmos DB client with a custom user agent suffix. - + The user_agent parameter appends a custom string to the default user agent, allowing you to identify your specific application or service. """ - print('\n2. Creating async client with custom user agent') - + print("\n2. Creating async client with custom user agent") + # Add a custom suffix to identify your application custom_user_agent = "MyAsyncApplication/1.0.0" - - async with CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=custom_user_agent - ) as client: - print(f'Async client created with custom user agent: {custom_user_agent}') - print('This will appear as: [default-user-agent] {}'.format(custom_user_agent)) + + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=custom_user_agent) as client: + print(f"Async client created with custom user agent: {custom_user_agent}") + print("This will appear as: [default-user-agent] {}".format(custom_user_agent)) return client async def create_client_with_detailed_user_agent(): """ Create an async client with a detailed custom user agent including multiple identifiers. - + You can include multiple pieces of information to make diagnostics more useful: - Application name and version - Service or microservice name - Environment (dev, staging, production) - Instance or process identifier """ - print('\n3. Creating async client with detailed custom user agent') - + print("\n3. Creating async client with detailed custom user agent") + # Include detailed information about your application app_name = "AsyncOrderProcessingService" app_version = "2.3.1" environment = "production" instance_id = "async-instance-42" - + detailed_user_agent = f"{app_name}/{app_version} env:{environment} {instance_id}" - - async with CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=detailed_user_agent - ) as client: - print(f'Async client created with detailed user agent: {detailed_user_agent}') - print('This helps identify specific instances in diagnostics and logs') + + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=detailed_user_agent) as client: + print(f"Async client created with detailed user agent: {detailed_user_agent}") + print("This helps identify specific instances in diagnostics and logs") return client async def create_multiple_clients_with_different_user_agents(): """ Demonstrate creating multiple async clients with different user agents. - + This is useful when you have multiple services or components in your application that need to be tracked separately in diagnostics. """ - print('\n4. Creating multiple async clients with different user agents') - + print("\n4. Creating multiple async clients with different user agents") + # Note: In production, you would manage these clients' lifecycles appropriately # Here we demonstrate the creation pattern - - print('Creating async client for data ingestion: AsyncDataIngestionService/1.0.0') - print('Creating async client for queries: AsyncQueryService/1.0.0') - print('Creating async client for analytics: AsyncAnalyticsService/1.0.0') - - print('\nEach client can be created with its own user agent to track requests separately') + + print("Creating async client for data ingestion: AsyncDataIngestionService/1.0.0") + print("Creating async client for queries: AsyncQueryService/1.0.0") + print("Creating async client for analytics: AsyncAnalyticsService/1.0.0") + + print("\nEach client can be created with its own user agent to track requests separately") async def demonstrate_user_agent_in_operations(): """ Perform async operations with a custom user agent and show how it helps with diagnostics. - + The user agent will appear in: - Azure Monitor logs - Cosmos DB diagnostic logs - Request headers sent to the service - Performance and usage analytics """ - print('\n5. Demonstrating user agent in async operations') - + print("\n5. Demonstrating user agent in async operations") + custom_suffix = "AsyncDemoClient/1.0.0" - - async with CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=custom_suffix - ) as client: + + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=custom_suffix) as client: try: # Create database db = await client.create_database_if_not_exists(id=DATABASE_ID) - print(f'Database created/accessed with user agent: {custom_suffix}') - + print(f"Database created/accessed with user agent: {custom_suffix}") + # Create container - container = await db.create_container_if_not_exists( - id=CONTAINER_ID, - partition_key=PartitionKey(path='/id') - ) - print(f'Container created/accessed with user agent: {custom_suffix}') - + container = await db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey(path="/id")) + print(f"Container created/accessed with user agent: {custom_suffix}") + # Create or upsert an item item = { - 'id': 'async_sample_item_1', - 'name': 'Async Sample Item', - 'description': 'Created with custom user agent in async operation' + "id": "async_sample_item_1", + "name": "Async Sample Item", + "description": "Created with custom user agent in async operation", } await container.upsert_item(body=item) - print(f'Item created/updated with user agent: {custom_suffix}') - + print(f"Item created/updated with user agent: {custom_suffix}") + # Query items query_iterable = container.query_items( - query="SELECT * FROM c WHERE c.id = @id", - parameters=[{"name": "@id", "value": "async_sample_item_1"}] + query="SELECT * FROM c WHERE c.id = @id", parameters=[{"name": "@id", "value": "async_sample_item_1"}] ) items = [item async for item in query_iterable] - print(f'Query executed with user agent: {custom_suffix}') - print(f'Found {len(items)} item(s)') - - print('\nAll these async operations will show your custom user agent in diagnostics') - + print(f"Query executed with user agent: {custom_suffix}") + print(f"Found {len(items)} item(s)") + + print("\nAll these async operations will show your custom user agent in diagnostics") + # Cleanup: Delete the item - await container.delete_item(item='async_sample_item_1', partition_key='async_sample_item_1') - print(f'\nCleanup: Deleted sample item') - + await container.delete_item(item="async_sample_item_1", partition_key="async_sample_item_1") + print(f"\nCleanup: Deleted sample item") + except Exception as e: - print(f'Error during async operations: {e}') + print(f"Error during async operations: {e}") async def demonstrate_concurrent_operations_with_user_agents(): """ Show how different user agents help track concurrent async operations. """ - print('\n6. Demonstrating concurrent operations with different user agents') - + print("\n6. Demonstrating concurrent operations with different user agents") + async def operation_with_user_agent(user_agent_suffix, operation_name): """Helper function to perform operation with specific user agent.""" - async with CosmosClient( - HOST, - {'masterKey': MASTER_KEY}, - user_agent_suffix=user_agent_suffix - ) as client: + async with CosmosClient(HOST, {"masterKey": MASTER_KEY}, user_agent_suffix=user_agent_suffix) as client: db = await client.create_database_if_not_exists(id=DATABASE_ID) - print(f'{operation_name} completed with user agent: {user_agent_suffix}') - + print(f"{operation_name} completed with user agent: {user_agent_suffix}") + # Run multiple operations concurrently with different user agents await asyncio.gather( operation_with_user_agent("AsyncWorker1/1.0.0", "Worker 1"), operation_with_user_agent("AsyncWorker2/1.0.0", "Worker 2"), - operation_with_user_agent("AsyncWorker3/1.0.0", "Worker 3") + operation_with_user_agent("AsyncWorker3/1.0.0", "Worker 3"), ) - - print('\nEach concurrent operation can be tracked separately in diagnostics') + + print("\nEach concurrent operation can be tracked separately in diagnostics") async def run_sample(): """ Run all async user agent examples. """ - print('=' * 70) - print('Azure Cosmos DB - Async User Agent Management Sample') - print('=' * 70) - + print("=" * 70) + print("Azure Cosmos DB - Async User Agent Management Sample") + print("=" * 70) + # Example 1: Default user agent await create_client_with_default_user_agent() - + # Example 2: Simple custom user agent await create_client_with_custom_user_agent() - + # Example 3: Detailed user agent await create_client_with_detailed_user_agent() - + # Example 4: Multiple clients with different user agents await create_multiple_clients_with_different_user_agents() - + # Example 5: Show user agent in operations await demonstrate_user_agent_in_operations() - + # Example 6: Concurrent operations await demonstrate_concurrent_operations_with_user_agents() - - print('\n' + '=' * 70) - print('Sample completed!') - print('=' * 70) + + print("\n" + "=" * 70) + print("Sample completed!") + print("=" * 70) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(run_sample()) diff --git a/sdk/cosmos/azure-cosmos/samples/vector_test_data.py b/sdk/cosmos/azure-cosmos/samples/vector_test_data.py index eceeaf1d4b7f..7810a1936ec3 100644 --- a/sdk/cosmos/azure-cosmos/samples/vector_test_data.py +++ b/sdk/cosmos/azure-cosmos/samples/vector_test_data.py @@ -1,40 +1,1392 @@ - def get_vector_items(): - return [{'id': 'item0', 'pk': '1', 'text': 'Good morning!', 'embedding': [-0.008334724, -0.05993167, -0.0903545, -0.04791922, -0.01825805, -0.053011455, 0.120733805, 0.017714009, 0.07346743, 0.11559805, 0.03262076, 0.074512, 0.015864266, 0.01981401, 0.007850527, 0.076296456, -0.08539284, 0.016593281, -0.05423011, 0.07520837, 0.074250855, 0.056754466, -0.022098986, 0.03155444, 0.04334927, 0.024655985, -0.02109795, 0.044023883, -0.027550288, -0.11350893, -0.022806242, 0.08608921, 0.009221513, 0.06659074, 0.09087678, 0.024830079, 0.0075513036, 0.036472578, 0.015418151, 0.060497474, 0.010940685, -0.059365865, 0.043566886, 0.00427073, -0.023546139, 0.030357545, -0.03403527, 0.1182965, 0.1115939, -0.018954424, 0.0032452107, 0.10297628, 0.15328929, -0.016952349, -0.04530782, 0.04674409, -8.351895e-05, -0.19376601, -0.025091218, -0.03664667, -0.011860116, -0.10454312, -0.13109237, -0.049268447, 0.17557324, 0.044872586, 0.046787616, 0.15337633, -0.019509347, 0.0077743605, 0.04556896, -0.08413066, -0.028681897, 0.1209079, 0.1357929, -0.09314, 0.12534729, -0.065546185, 0.12212656, 0.04892026, 0.07394619, -0.08134516, -0.004493787, 0.08138869, 0.028573086, 0.12290998, -0.16477945, -0.29839617, -0.08090993, 0.12256179, 0.16591106, -0.08173688, -0.034383457, -0.1076768, -0.043022845, -0.07655759, 0.2021225, 0.03923631, 0.07703635, -0.08587159, 0.06498038, -0.08330371, 0.16486649, -0.14040637, 0.02070624, -0.069855, 0.052880887, 0.016136287, 0.00024294876, -0.19968519, 0.06933272, 0.013241983, 0.0004002109, 0.14998151, 0.07516485, 0.18610589, -0.07895138, -0.108982496, -0.03494926, -0.027637335, -0.032925423, -0.009509855, 0.1182965, -0.075513035, -0.08665501, 0.019629037, 0.2583547, 0.00983084]}, - {'id': 'item1', 'pk': '2', 'text': 'Good afternoon!', 'embedding': [-0.04136167, -0.047741424, -0.08737179, -3.0502639e-05, 0.054595508, -0.11298566, 0.0906921, 0.108052626, 0.04729081, 0.21287979, -0.06588459, -0.052793052, -0.05568647, 0.017384235, -0.02518698, 0.021665072, -0.19238868, 0.03379609, 0.0075359354, -0.04989963, 0.055449303, 0.03282371, 0.026064493, 0.042096883, -0.007192045, 0.0786441, -0.09012291, 0.094012424, -0.0031483725, -0.0318039, -0.034721036, 0.10255038, 0.08851018, 0.11327027, 0.031614166, 0.006035863, 0.021321183, 0.0703433, 0.14201473, 0.058674756, -0.007986549, 0.03329804, 0.08884221, -0.09505595, -0.015522485, -0.068161376, 0.072572656, 0.049235567, 0.2263508, 0.029574543, -0.050563693, 0.050516263, 0.04660303, 0.08376687, 0.017514676, 0.0706279, 0.007921329, -0.1353741, -0.054358345, -0.1628853, -0.097617336, -0.123326086, -0.0489984, -0.0693472, 0.15396787, 0.027368903, 0.06042978, 0.22862759, -0.016293272, 0.033582643, 0.06697555, -0.10302471, -0.12104929, 0.18034068, 0.068303674, 0.003468546, 0.07480201, -0.1204801, 0.06787678, -0.042926963, 0.15785739, -0.034531303, -0.028934196, 0.022933908, -0.012012435, 0.004248228, -0.19172463, -0.31837103, -0.099230066, 0.02071641, 0.18546346, 0.06299117, -0.047053643, -0.09206767, 0.049472734, -0.046365865, 0.18214314, 0.0051079527, 0.105680965, -0.026443958, 0.072714955, -0.08073115, 0.09429702, -0.113744594, 0.02092986, -0.013625161, -0.07390078, 0.020550394, 0.011787128, -0.13499463, 0.015107445, -0.0015223064, 0.040104695, 0.094961084, 0.13404597, 0.082486175, -0.07428025, -0.026847139, -0.025163265, -0.09818654, 0.010043961, 0.013601444, 0.077932596, 0.016056107, -0.026965722, 0.045606934, 0.085047565, -0.005878741]}, - {'id': 'item2', 'pk': '1', 'text': 'Great weather today!', 'embedding': [0.07557184, -0.047335204, -0.054325826, 0.011354052, 0.07698824, -0.025358144, -0.07927276, 0.1510523, 0.022251202, 0.026249107, -0.021725763, 0.062047496, 0.14556946, -0.0006071819, -0.107098185, 0.021394506, -0.13771072, -0.10527057, 0.115048304, -0.048842985, -0.059443146, 0.060585406, -0.014940745, 0.18075103, 0.053777542, -0.022057017, 0.08493836, 0.1198001, 0.041555375, -0.066525154, 0.054280136, 0.107646465, 0.023359193, -0.0046632714, -0.1017981, 0.04105278, 0.11376897, 0.016437104, 0.067393266, 0.0961325, -0.017727856, -0.03333111, -0.020492123, -0.041943744, 0.0031040881, -0.028053876, 0.053640474, -0.02215982, 0.08205987, 0.015100661, -0.17133881, -0.05843796, 0.0895074, -0.04064157, -0.10225501, 0.11367759, -0.03593546, -0.010999952, -0.14273666, -0.010383132, 0.026112035, -0.14200561, -0.0634639, -0.04029889, 0.07383561, 0.116784535, 0.0805064, 0.13241065, -0.100884296, -0.10216363, -0.030384084, -0.07657703, -0.06323545, -0.013101708, 0.15233164, -0.009880538, 0.16448526, -0.11148446, -0.05606206, -0.11587073, 0.084892675, -0.1397211, -0.04948265, 0.006470896, 0.015637523, 0.09051259, -0.12665366, -0.28583884, -0.16046451, 0.055833608, 0.100244634, 0.013535767, -0.07155109, -0.10051877, 0.08662891, -0.0729218, 0.15818, 0.025449526, 0.05053353, -0.015740326, -0.0767141, -0.056381892, 0.091517776, -0.075114936, -0.04621579, -0.040458806, 0.03947646, 0.10901718, 0.0076417113, -0.34487078, 0.024375802, -0.072419204, 0.053000808, 0.04057303, -0.08434439, 0.027185759, 0.03403931, -0.06332683, 0.051858548, 0.011993717, 0.10728095, -0.09887392, 0.07593736, -0.0025172527, 0.1089258, -0.048934367, 0.051264573, 0.017008234]}, - {'id': 'item3', 'pk': '2', 'text': "Hope you're doing well.", 'embedding': [-0.016385807, 0.16914073, -0.062722616, 0.009645036, 0.06367876, -0.10871283, -0.034588274, 0.0038275379, 0.107661076, 0.069654614, 0.036404934, -0.037910853, 0.08872956, 0.14571536, -0.082227826, 0.034731694, -0.07405285, 0.050340638, -0.16569862, -0.20671692, -0.0834708, 0.0043175584, -0.017234378, 0.052683175, 0.013863994, 0.12142946, -0.002630872, 0.069702424, 0.095804974, -0.10020321, 0.0793116, 0.028970966, 0.13940485, 0.15814514, 0.11597948, -0.03795866, -0.018178564, 0.14753202, -0.10670494, -0.055455975, 0.058037546, -0.04457991, -0.0046014115, -0.018704439, 0.07902476, -0.07902476, 0.031026661, -0.017855868, 0.098769, 0.118847884, -0.051488005, 0.009017572, 0.15068726, 0.044962365, 0.18233542, -0.0006853563, 0.11205931, -0.2602606, 0.09848216, 0.08681728, -0.077638365, -0.008664995, 0.010314333, -0.0361659, 0.047185384, 0.09202823, 0.004359389, -0.008545479, -0.08815587, 0.0765388, 0.012262463, 0.0542608, -0.10813915, 0.11722245, 0.013744476, -0.08265808, 0.008055458, 0.12085578, 0.056364305, -0.12907855, -0.05311344, -0.060666922, 0.117031224, 0.029233903, -0.148775, 0.017879771, -0.081558526, -0.26332027, -0.22029407, -0.07410065, 0.0059340284, -0.11234615, -0.06898532, 0.046516087, 0.06798138, -0.049193274, -0.04687464, -0.049002044, -0.03145692, 0.0065614935, -0.021274058, -0.060188852, -0.04584679, -0.015979448, 0.08949447, -0.050197218, -0.051440194, -0.1341461, 0.08557431, -0.08261028, -0.104314595, -0.016134819, 0.057320442, -0.022421423, 0.012501498, 0.055503782, 0.020568907, -0.095183484, 0.0049450235, -0.03525757, 0.17688543, -0.06888971, -0.005694994, 0.05622088, -0.04250031, 0.050053798, 0.16063109, 0.06353533]}, - {'id': 'item4', 'pk': '1', 'text': 'Excuse me please.', 'embedding': [-0.19188246, 0.018719073, -0.032395326, 0.09734556, 0.021671357, -0.11751684, -0.078514785, 0.16507255, -0.0012956136, 0.117006175, -0.065492816, 0.106282204, -0.009750514, -0.006008296, 0.021799022, 0.04643862, -0.046023704, -0.023442727, 0.12868765, -0.1466886, -0.085089594, -0.046885453, -0.0067742937, 0.048162118, -0.04739612, 0.021687314, -0.025581138, 0.04841745, -0.10519704, -0.039129723, -0.09747323, 0.10532471, 0.04375763, 0.09536674, 0.0145938555, -0.0060681393, 0.26171595, 0.1815415, -0.03833181, 0.012487361, -0.027192924, -0.12281499, 0.017937116, -0.02173519, 0.07308897, -0.06913131, 0.07417413, -0.01884674, 0.049023863, -0.049949445, 0.081068106, 0.22060739, -0.031645287, -0.024735348, -0.041108552, 0.1823075, -0.06230116, -0.119048834, -0.07813178, -0.0841321, -0.007711843, 0.039576557, -0.07589762, 0.028198296, 0.003087929, 0.047970615, 0.0845151, 0.08208944, 0.07423796, 0.01259907, 0.00046179298, 0.024671515, 0.10302671, 0.12160216, 0.1353263, -0.16251922, 0.069195144, -0.09160058, 0.033320908, -0.06341824, -0.06402466, -0.048864283, -0.10053722, -0.019341446, 0.027033342, -0.19354212, -0.011146865, -0.31329313, 0.054513514, -0.0098861605, 0.10277138, 0.059237167, 0.021495815, -0.0704718, 0.14285861, 0.042672466, 0.057769008, 0.054353934, -0.041363884, 0.07819562, 0.1085802, -0.0047874865, 0.0035626881, 0.025405597, 0.0032953867, 0.13430496, -0.084451266, -0.10883553, 0.115601845, -0.072259136, -0.06976964, -0.1081972, 0.08515343, 0.044715125, 0.05725834, -0.06759931, -0.0421618, -0.06185433, -0.068939805, -0.13673063, -0.032874074, -0.121538326, -0.010157451, -0.048608948, 0.049949445, 0.031310163, 0.13238996, 0.06855681]}, - {'id': 'item5', 'pk': '2', 'text': 'Is this the right place?', 'embedding': [-0.05695127, 0.07729321, -0.07253956, 0.054049686, -0.084886715, -0.1677979, -0.020681491, -0.010765179, -0.05312365, 0.10964277, -0.1724898, -0.0139754405, -0.019446775, -0.009877727, 0.10902541, 0.06599557, -0.20224646, -0.008658445, -0.11698933, -0.00034678154, 0.059760246, 0.023660243, 0.014523345, 0.058340326, -0.116927594, -0.0011546522, 0.035991967, 0.017857078, -0.21261807, -0.07568809, -0.007250097, 0.09525833, 0.073033445, -0.078157514, -0.14816591, -0.089578636, -0.006030815, 0.08519539, 0.059852853, 0.12328638, 0.08544234, -0.017656436, -0.03901702, 0.036238912, -0.09482618, 0.007215371, 0.15742627, 0.014183799, 0.107914165, 0.014245534, -0.011907292, 0.025188204, 0.057630364, -0.057321683, 0.0024366346, 0.034695517, 0.11766842, -0.16520499, 0.065193, 0.10822285, -0.06834152, -0.048925616, -0.078836605, 0.05161112, 0.07235435, 0.07636718, -0.075996764, 0.13902901, 0.023860885, 0.07846619, 0.02665443, -0.026870504, -0.0084115015, 0.07550287, 0.07500899, -0.07395948, 0.05062335, 0.05621044, -0.031531557, -0.001280053, 0.06908235, 0.078280985, -0.060068928, 0.14236274, 0.14236274, 0.06358787, -0.042474225, -0.38053942, 0.062785305, 0.050870296, 0.038677476, -0.078157514, 0.029309068, -0.07809578, 0.07439163, -0.06772417, 0.11896487, 0.073589064, 0.05238282, 0.018196626, 0.116371974, 0.0033067234, -0.020264775, -0.006304768, -0.10686466, 0.08408415, -0.04386328, -0.0068681072, 0.08994905, -0.059513304, 0.021823604, 0.049419504, -0.012817894, -0.093221046, 0.02802805, 0.089578636, 0.07124311, -0.26694557, 0.024833223, -0.03802925, -0.18483697, -0.1103836, 0.11877967, 0.07000839, -0.018860284, -0.044974525, -0.034016423, 0.022780508]}, - {'id': 'item6', 'pk': '1', 'text': 'Awful weather today.', 'embedding': [0.002305239, -0.02629875, 0.009952777, 0.026884208, -0.0067561795, -0.1118458, 0.07432968, 0.0999493, 0.02177902, -0.047726493, 0.042059265, 0.1583077, 0.11175212, 0.07685886, -0.14060347, 0.005084698, -0.19277944, -0.05606341, 0.082619764, -0.04241054, 0.09620237, 0.011832096, -0.023301208, 0.28214368, 0.02451896, 0.02793803, 0.03358184, 0.044424515, 0.11006601, 0.038101573, 0.0077982936, 0.045572013, 0.075922124, 0.016369391, -0.0039986745, 0.22781321, 0.062854715, 0.048054352, 0.010251361, 0.07170683, -0.018816603, 0.027329156, -0.08482108, -0.079481706, 0.042785235, 0.024120849, 0.17413847, 0.035431888, 0.12439801, 0.10641275, -0.14828467, -0.024425287, 0.083415985, 0.1184966, 0.0026799317, 0.15399873, -0.010304051, 0.009742012, -0.10781785, -0.019472316, 0.061777476, -0.09798217, 0.028804509, -0.023371464, 0.015491205, 0.07521958, 0.024003757, 0.013465522, -0.089692086, -0.097794816, 0.021193562, -0.0592483, -0.056438103, -0.10987866, 0.11802823, -0.06440032, 0.07704621, -0.040138967, -0.13891736, -0.16027485, 0.08631986, -0.16786237, -0.085757814, 0.015491205, -0.013243048, 0.09133137, -0.16196096, -0.2313728, -0.083134964, 0.12308659, 0.07559427, 0.09723278, 0.048663225, -0.13339064, 0.016345974, -0.13189186, 0.11025336, 0.03346475, -0.00688498, -0.059435643, 0.0056877197, 0.014999421, 0.063650936, -0.15053283, -0.017481761, 0.05194179, 0.061402783, 0.0077924393, 0.19971126, -0.07713988, 0.06425981, 0.0021369199, 0.12158781, -0.024331613, -0.008571098, 0.03264511, -0.0020242194, -0.05507984, -0.00805004, -0.03304322, 0.050630365, -0.1475353, -0.003735219, -0.0202217, 0.16271034, -0.059435643, 0.06023187, 0.06660164]}, - {'id': 'item7', 'pk': '2', 'text': 'Dinosaurs were huge.', 'embedding': [0.09842033, -0.025395654, -0.03831241, 0.037825905, 0.17008278, -0.022269849, -0.05935383, 0.032668933, -0.022148222, 0.08178179, -0.062710725, 0.164342, -0.024021273, -0.052640036, 0.027366007, 0.18098053, -0.18487258, -0.008903074, 0.16346629, 0.009407825, 0.110339746, -0.046315446, 0.08046822, 0.12512955, -0.06635953, 0.0070239417, 0.055753678, -0.0005336371, -0.012326866, 0.1578228, -0.023668556, -0.035904203, 0.05988899, -0.08032227, -0.11520481, 0.08499274, 0.05093726, -0.09248494, -0.011128843, -0.07064079, 0.01466818, 0.082073696, -0.040574666, -0.07292737, 0.03539337, 0.05025615, -0.1145237, 0.09584184, 0.04186391, -0.034833886, -0.18234275, -0.090441614, -0.09194978, -0.031331036, -0.13106494, 0.068208255, 0.03220675, -0.031233737, -0.04337208, 0.1289243, 0.1363192, 0.052494083, 0.03074723, -0.000113359885, 0.07681943, 0.03962598, 0.016529068, -0.04191256, -0.03612313, 0.023084749, 0.10917213, 0.09477153, -0.09652295, -0.0999285, 0.11685894, -0.012649177, 0.043688312, -0.10333405, -0.060521446, -0.042034186, 0.0483831, 0.0028141378, -0.17270991, 0.05424551, 0.25570798, 0.09511208, -0.08504139, -0.1570444, -0.084262975, -0.13291366, -0.023741532, -0.14857918, 0.09190113, -0.08041958, -0.019837314, 0.09569589, -0.053029243, -0.030722905, -0.05239678, -0.15091442, -0.05872137, -0.056045584, 0.11831845, -0.1145237, -0.08761988, -0.0035727844, -0.05570503, 0.19285129, 0.011761302, 0.087717175, 0.107712604, -0.11277228, -0.042423394, 0.13048112, -0.03356897, 0.056775343, 0.08640361, -0.11831845, -0.10868562, 0.0410855, 0.12036178, -0.09477153, -0.017611546, 0.0075043673, -0.12668636, -0.006391483, 0.0012185475, -0.05161837]}, - {'id': 'item8', 'pk': '1', 'text': 'The hero saves the day again.', 'embedding': [0.11208976, 0.058739875, -0.017022463, 0.15080968, -0.0031057745, -0.048069898, -0.059069872, 0.09861479, 0.11626975, 0.12935972, 0.008882481, 0.08766981, -0.00940498, -0.077164836, 0.0015795279, 0.06297486, -0.06313986, 0.0931698, -0.17247963, -0.12077974, -0.044797402, -0.1404697, -0.050077394, 0.020432455, 0.07897983, 0.022632452, -0.046914898, 0.0031212433, -0.059399873, 0.03321993, -0.07237984, 0.10119978, 0.19612958, -0.086349815, 0.038252417, 0.084094815, 0.16257966, 0.15520966, 0.063304864, -0.08761481, 0.06132487, -0.08486482, -0.09789979, 0.06935485, -0.04160741, 0.05585238, -0.13485971, 0.105544776, -0.08084983, 0.103344776, 0.053817384, -0.0923998, -0.052607387, 0.015537467, 0.025299946, -0.05961987, 0.08090483, -0.25453946, 0.01894746, -0.026344944, -0.14552969, 0.014341219, 0.14409968, 0.12264974, -0.0456224, -0.13529971, -0.0466674, 0.006166862, 0.02776119, -0.020184956, 0.093939796, 0.054779883, -0.09635979, -0.016334964, -0.029177437, -0.06863985, 0.19139959, -0.08794481, -0.08464482, -0.013413096, 0.022109952, -0.122099735, -0.0458149, -0.019676207, 0.10785477, -0.109119765, -0.09690979, -0.28423938, 0.050709892, 0.12803972, 0.10620477, 0.12110974, -0.006658423, -0.052304886, -0.07798983, -0.035667423, -0.07507484, 0.02745869, 0.07237984, -0.0230862, -0.03684992, -0.067539856, -0.052387387, -0.05202989, 0.14244969, 0.080684826, -0.038472418, 0.112639755, 0.03242243, -0.07501984, 0.10631477, -0.024076197, -0.07754983, 0.06610986, -0.12671973, -0.044082403, 0.006001862, 0.037454918, 0.054504883, -0.03679492, 0.076669835, 0.02271495, 0.14794968, 0.06440486, -0.006850923, -0.06984985, 0.035639923, -0.009143731]}, - {'id': 'item9', 'pk': '2', 'text': "Don't worry about it.", 'embedding': [-0.051598575, 0.22204931, -0.017881807, 0.11678282, 0.18426134, -0.03713568, -0.016847137, 0.06549915, 0.057626653, 0.032569632, 0.00076827104, -0.04489571, -0.07530603, 0.10778569, 0.030477798, 0.050338972, -0.21053298, -0.04341118, -0.097708896, -0.13432723, 0.1438642, 0.059606023, -0.12299085, -0.036820777, -0.026699001, 0.18381149, -0.02861089, 0.08259371, -0.14962237, -0.07373153, 0.02321261, 0.085607745, -0.13810603, 0.065139264, -0.12685962, 0.14098512, 0.17112552, -0.035921063, -0.008536032, -0.09680918, 0.04435588, -0.16086878, -0.035718627, 0.09689915, -0.0007956842, 0.034256592, -0.00234769, 0.04577293, 0.06725359, 0.015958669, -0.06486935, 0.124160476, 0.09887852, -0.050518915, -0.07080746, -0.078859895, 0.17013584, -0.22078972, -0.10103783, 0.06873812, 0.0370682, 0.04563797, -0.060235824, -0.056816913, -0.064689405, 0.11273411, 0.16572724, 0.108415484, 0.07921978, 0.05569227, -0.11210431, -0.05848138, -0.008361713, 0.07458626, -0.08992637, -0.07557594, -0.0020102975, -0.07080746, -0.0092614265, 0.06626391, -0.05848138, -0.078545, 0.08362838, -0.031737395, -0.047549862, -0.15367107, 0.093930095, -0.087182246, 0.06401462, 0.09006133, 0.10886534, 0.013338254, 0.025551865, -0.027553728, 0.14206477, -0.09060115, -0.07818511, -0.001209693, 0.017893054, -0.069367915, 0.0709874, 0.050249003, -0.13396735, -0.056681953, -0.022166694, -0.02170559, 0.08277365, -0.101667635, 0.09096104, 0.049529232, -0.095819496, -0.08974643, 0.054477658, -0.037967913, -0.08682236, 0.077690266, 0.03828281, -0.04136433, -0.14431405, -0.060505737, 0.025619343, -0.019400073, 0.11075474, 0.066893704, 0.07494614, 0.03684327, 0.03929499, -0.017353225]}] + return [ + { + "id": "item0", + "pk": "1", + "text": "Good morning!", + "embedding": [ + -0.008334724, + -0.05993167, + -0.0903545, + -0.04791922, + -0.01825805, + -0.053011455, + 0.120733805, + 0.017714009, + 0.07346743, + 0.11559805, + 0.03262076, + 0.074512, + 0.015864266, + 0.01981401, + 0.007850527, + 0.076296456, + -0.08539284, + 0.016593281, + -0.05423011, + 0.07520837, + 0.074250855, + 0.056754466, + -0.022098986, + 0.03155444, + 0.04334927, + 0.024655985, + -0.02109795, + 0.044023883, + -0.027550288, + -0.11350893, + -0.022806242, + 0.08608921, + 0.009221513, + 0.06659074, + 0.09087678, + 0.024830079, + 0.0075513036, + 0.036472578, + 0.015418151, + 0.060497474, + 0.010940685, + -0.059365865, + 0.043566886, + 0.00427073, + -0.023546139, + 0.030357545, + -0.03403527, + 0.1182965, + 0.1115939, + -0.018954424, + 0.0032452107, + 0.10297628, + 0.15328929, + -0.016952349, + -0.04530782, + 0.04674409, + -8.351895e-05, + -0.19376601, + -0.025091218, + -0.03664667, + -0.011860116, + -0.10454312, + -0.13109237, + -0.049268447, + 0.17557324, + 0.044872586, + 0.046787616, + 0.15337633, + -0.019509347, + 0.0077743605, + 0.04556896, + -0.08413066, + -0.028681897, + 0.1209079, + 0.1357929, + -0.09314, + 0.12534729, + -0.065546185, + 0.12212656, + 0.04892026, + 0.07394619, + -0.08134516, + -0.004493787, + 0.08138869, + 0.028573086, + 0.12290998, + -0.16477945, + -0.29839617, + -0.08090993, + 0.12256179, + 0.16591106, + -0.08173688, + -0.034383457, + -0.1076768, + -0.043022845, + -0.07655759, + 0.2021225, + 0.03923631, + 0.07703635, + -0.08587159, + 0.06498038, + -0.08330371, + 0.16486649, + -0.14040637, + 0.02070624, + -0.069855, + 0.052880887, + 0.016136287, + 0.00024294876, + -0.19968519, + 0.06933272, + 0.013241983, + 0.0004002109, + 0.14998151, + 0.07516485, + 0.18610589, + -0.07895138, + -0.108982496, + -0.03494926, + -0.027637335, + -0.032925423, + -0.009509855, + 0.1182965, + -0.075513035, + -0.08665501, + 0.019629037, + 0.2583547, + 0.00983084, + ], + }, + { + "id": "item1", + "pk": "2", + "text": "Good afternoon!", + "embedding": [ + -0.04136167, + -0.047741424, + -0.08737179, + -3.0502639e-05, + 0.054595508, + -0.11298566, + 0.0906921, + 0.108052626, + 0.04729081, + 0.21287979, + -0.06588459, + -0.052793052, + -0.05568647, + 0.017384235, + -0.02518698, + 0.021665072, + -0.19238868, + 0.03379609, + 0.0075359354, + -0.04989963, + 0.055449303, + 0.03282371, + 0.026064493, + 0.042096883, + -0.007192045, + 0.0786441, + -0.09012291, + 0.094012424, + -0.0031483725, + -0.0318039, + -0.034721036, + 0.10255038, + 0.08851018, + 0.11327027, + 0.031614166, + 0.006035863, + 0.021321183, + 0.0703433, + 0.14201473, + 0.058674756, + -0.007986549, + 0.03329804, + 0.08884221, + -0.09505595, + -0.015522485, + -0.068161376, + 0.072572656, + 0.049235567, + 0.2263508, + 0.029574543, + -0.050563693, + 0.050516263, + 0.04660303, + 0.08376687, + 0.017514676, + 0.0706279, + 0.007921329, + -0.1353741, + -0.054358345, + -0.1628853, + -0.097617336, + -0.123326086, + -0.0489984, + -0.0693472, + 0.15396787, + 0.027368903, + 0.06042978, + 0.22862759, + -0.016293272, + 0.033582643, + 0.06697555, + -0.10302471, + -0.12104929, + 0.18034068, + 0.068303674, + 0.003468546, + 0.07480201, + -0.1204801, + 0.06787678, + -0.042926963, + 0.15785739, + -0.034531303, + -0.028934196, + 0.022933908, + -0.012012435, + 0.004248228, + -0.19172463, + -0.31837103, + -0.099230066, + 0.02071641, + 0.18546346, + 0.06299117, + -0.047053643, + -0.09206767, + 0.049472734, + -0.046365865, + 0.18214314, + 0.0051079527, + 0.105680965, + -0.026443958, + 0.072714955, + -0.08073115, + 0.09429702, + -0.113744594, + 0.02092986, + -0.013625161, + -0.07390078, + 0.020550394, + 0.011787128, + -0.13499463, + 0.015107445, + -0.0015223064, + 0.040104695, + 0.094961084, + 0.13404597, + 0.082486175, + -0.07428025, + -0.026847139, + -0.025163265, + -0.09818654, + 0.010043961, + 0.013601444, + 0.077932596, + 0.016056107, + -0.026965722, + 0.045606934, + 0.085047565, + -0.005878741, + ], + }, + { + "id": "item2", + "pk": "1", + "text": "Great weather today!", + "embedding": [ + 0.07557184, + -0.047335204, + -0.054325826, + 0.011354052, + 0.07698824, + -0.025358144, + -0.07927276, + 0.1510523, + 0.022251202, + 0.026249107, + -0.021725763, + 0.062047496, + 0.14556946, + -0.0006071819, + -0.107098185, + 0.021394506, + -0.13771072, + -0.10527057, + 0.115048304, + -0.048842985, + -0.059443146, + 0.060585406, + -0.014940745, + 0.18075103, + 0.053777542, + -0.022057017, + 0.08493836, + 0.1198001, + 0.041555375, + -0.066525154, + 0.054280136, + 0.107646465, + 0.023359193, + -0.0046632714, + -0.1017981, + 0.04105278, + 0.11376897, + 0.016437104, + 0.067393266, + 0.0961325, + -0.017727856, + -0.03333111, + -0.020492123, + -0.041943744, + 0.0031040881, + -0.028053876, + 0.053640474, + -0.02215982, + 0.08205987, + 0.015100661, + -0.17133881, + -0.05843796, + 0.0895074, + -0.04064157, + -0.10225501, + 0.11367759, + -0.03593546, + -0.010999952, + -0.14273666, + -0.010383132, + 0.026112035, + -0.14200561, + -0.0634639, + -0.04029889, + 0.07383561, + 0.116784535, + 0.0805064, + 0.13241065, + -0.100884296, + -0.10216363, + -0.030384084, + -0.07657703, + -0.06323545, + -0.013101708, + 0.15233164, + -0.009880538, + 0.16448526, + -0.11148446, + -0.05606206, + -0.11587073, + 0.084892675, + -0.1397211, + -0.04948265, + 0.006470896, + 0.015637523, + 0.09051259, + -0.12665366, + -0.28583884, + -0.16046451, + 0.055833608, + 0.100244634, + 0.013535767, + -0.07155109, + -0.10051877, + 0.08662891, + -0.0729218, + 0.15818, + 0.025449526, + 0.05053353, + -0.015740326, + -0.0767141, + -0.056381892, + 0.091517776, + -0.075114936, + -0.04621579, + -0.040458806, + 0.03947646, + 0.10901718, + 0.0076417113, + -0.34487078, + 0.024375802, + -0.072419204, + 0.053000808, + 0.04057303, + -0.08434439, + 0.027185759, + 0.03403931, + -0.06332683, + 0.051858548, + 0.011993717, + 0.10728095, + -0.09887392, + 0.07593736, + -0.0025172527, + 0.1089258, + -0.048934367, + 0.051264573, + 0.017008234, + ], + }, + { + "id": "item3", + "pk": "2", + "text": "Hope you're doing well.", + "embedding": [ + -0.016385807, + 0.16914073, + -0.062722616, + 0.009645036, + 0.06367876, + -0.10871283, + -0.034588274, + 0.0038275379, + 0.107661076, + 0.069654614, + 0.036404934, + -0.037910853, + 0.08872956, + 0.14571536, + -0.082227826, + 0.034731694, + -0.07405285, + 0.050340638, + -0.16569862, + -0.20671692, + -0.0834708, + 0.0043175584, + -0.017234378, + 0.052683175, + 0.013863994, + 0.12142946, + -0.002630872, + 0.069702424, + 0.095804974, + -0.10020321, + 0.0793116, + 0.028970966, + 0.13940485, + 0.15814514, + 0.11597948, + -0.03795866, + -0.018178564, + 0.14753202, + -0.10670494, + -0.055455975, + 0.058037546, + -0.04457991, + -0.0046014115, + -0.018704439, + 0.07902476, + -0.07902476, + 0.031026661, + -0.017855868, + 0.098769, + 0.118847884, + -0.051488005, + 0.009017572, + 0.15068726, + 0.044962365, + 0.18233542, + -0.0006853563, + 0.11205931, + -0.2602606, + 0.09848216, + 0.08681728, + -0.077638365, + -0.008664995, + 0.010314333, + -0.0361659, + 0.047185384, + 0.09202823, + 0.004359389, + -0.008545479, + -0.08815587, + 0.0765388, + 0.012262463, + 0.0542608, + -0.10813915, + 0.11722245, + 0.013744476, + -0.08265808, + 0.008055458, + 0.12085578, + 0.056364305, + -0.12907855, + -0.05311344, + -0.060666922, + 0.117031224, + 0.029233903, + -0.148775, + 0.017879771, + -0.081558526, + -0.26332027, + -0.22029407, + -0.07410065, + 0.0059340284, + -0.11234615, + -0.06898532, + 0.046516087, + 0.06798138, + -0.049193274, + -0.04687464, + -0.049002044, + -0.03145692, + 0.0065614935, + -0.021274058, + -0.060188852, + -0.04584679, + -0.015979448, + 0.08949447, + -0.050197218, + -0.051440194, + -0.1341461, + 0.08557431, + -0.08261028, + -0.104314595, + -0.016134819, + 0.057320442, + -0.022421423, + 0.012501498, + 0.055503782, + 0.020568907, + -0.095183484, + 0.0049450235, + -0.03525757, + 0.17688543, + -0.06888971, + -0.005694994, + 0.05622088, + -0.04250031, + 0.050053798, + 0.16063109, + 0.06353533, + ], + }, + { + "id": "item4", + "pk": "1", + "text": "Excuse me please.", + "embedding": [ + -0.19188246, + 0.018719073, + -0.032395326, + 0.09734556, + 0.021671357, + -0.11751684, + -0.078514785, + 0.16507255, + -0.0012956136, + 0.117006175, + -0.065492816, + 0.106282204, + -0.009750514, + -0.006008296, + 0.021799022, + 0.04643862, + -0.046023704, + -0.023442727, + 0.12868765, + -0.1466886, + -0.085089594, + -0.046885453, + -0.0067742937, + 0.048162118, + -0.04739612, + 0.021687314, + -0.025581138, + 0.04841745, + -0.10519704, + -0.039129723, + -0.09747323, + 0.10532471, + 0.04375763, + 0.09536674, + 0.0145938555, + -0.0060681393, + 0.26171595, + 0.1815415, + -0.03833181, + 0.012487361, + -0.027192924, + -0.12281499, + 0.017937116, + -0.02173519, + 0.07308897, + -0.06913131, + 0.07417413, + -0.01884674, + 0.049023863, + -0.049949445, + 0.081068106, + 0.22060739, + -0.031645287, + -0.024735348, + -0.041108552, + 0.1823075, + -0.06230116, + -0.119048834, + -0.07813178, + -0.0841321, + -0.007711843, + 0.039576557, + -0.07589762, + 0.028198296, + 0.003087929, + 0.047970615, + 0.0845151, + 0.08208944, + 0.07423796, + 0.01259907, + 0.00046179298, + 0.024671515, + 0.10302671, + 0.12160216, + 0.1353263, + -0.16251922, + 0.069195144, + -0.09160058, + 0.033320908, + -0.06341824, + -0.06402466, + -0.048864283, + -0.10053722, + -0.019341446, + 0.027033342, + -0.19354212, + -0.011146865, + -0.31329313, + 0.054513514, + -0.0098861605, + 0.10277138, + 0.059237167, + 0.021495815, + -0.0704718, + 0.14285861, + 0.042672466, + 0.057769008, + 0.054353934, + -0.041363884, + 0.07819562, + 0.1085802, + -0.0047874865, + 0.0035626881, + 0.025405597, + 0.0032953867, + 0.13430496, + -0.084451266, + -0.10883553, + 0.115601845, + -0.072259136, + -0.06976964, + -0.1081972, + 0.08515343, + 0.044715125, + 0.05725834, + -0.06759931, + -0.0421618, + -0.06185433, + -0.068939805, + -0.13673063, + -0.032874074, + -0.121538326, + -0.010157451, + -0.048608948, + 0.049949445, + 0.031310163, + 0.13238996, + 0.06855681, + ], + }, + { + "id": "item5", + "pk": "2", + "text": "Is this the right place?", + "embedding": [ + -0.05695127, + 0.07729321, + -0.07253956, + 0.054049686, + -0.084886715, + -0.1677979, + -0.020681491, + -0.010765179, + -0.05312365, + 0.10964277, + -0.1724898, + -0.0139754405, + -0.019446775, + -0.009877727, + 0.10902541, + 0.06599557, + -0.20224646, + -0.008658445, + -0.11698933, + -0.00034678154, + 0.059760246, + 0.023660243, + 0.014523345, + 0.058340326, + -0.116927594, + -0.0011546522, + 0.035991967, + 0.017857078, + -0.21261807, + -0.07568809, + -0.007250097, + 0.09525833, + 0.073033445, + -0.078157514, + -0.14816591, + -0.089578636, + -0.006030815, + 0.08519539, + 0.059852853, + 0.12328638, + 0.08544234, + -0.017656436, + -0.03901702, + 0.036238912, + -0.09482618, + 0.007215371, + 0.15742627, + 0.014183799, + 0.107914165, + 0.014245534, + -0.011907292, + 0.025188204, + 0.057630364, + -0.057321683, + 0.0024366346, + 0.034695517, + 0.11766842, + -0.16520499, + 0.065193, + 0.10822285, + -0.06834152, + -0.048925616, + -0.078836605, + 0.05161112, + 0.07235435, + 0.07636718, + -0.075996764, + 0.13902901, + 0.023860885, + 0.07846619, + 0.02665443, + -0.026870504, + -0.0084115015, + 0.07550287, + 0.07500899, + -0.07395948, + 0.05062335, + 0.05621044, + -0.031531557, + -0.001280053, + 0.06908235, + 0.078280985, + -0.060068928, + 0.14236274, + 0.14236274, + 0.06358787, + -0.042474225, + -0.38053942, + 0.062785305, + 0.050870296, + 0.038677476, + -0.078157514, + 0.029309068, + -0.07809578, + 0.07439163, + -0.06772417, + 0.11896487, + 0.073589064, + 0.05238282, + 0.018196626, + 0.116371974, + 0.0033067234, + -0.020264775, + -0.006304768, + -0.10686466, + 0.08408415, + -0.04386328, + -0.0068681072, + 0.08994905, + -0.059513304, + 0.021823604, + 0.049419504, + -0.012817894, + -0.093221046, + 0.02802805, + 0.089578636, + 0.07124311, + -0.26694557, + 0.024833223, + -0.03802925, + -0.18483697, + -0.1103836, + 0.11877967, + 0.07000839, + -0.018860284, + -0.044974525, + -0.034016423, + 0.022780508, + ], + }, + { + "id": "item6", + "pk": "1", + "text": "Awful weather today.", + "embedding": [ + 0.002305239, + -0.02629875, + 0.009952777, + 0.026884208, + -0.0067561795, + -0.1118458, + 0.07432968, + 0.0999493, + 0.02177902, + -0.047726493, + 0.042059265, + 0.1583077, + 0.11175212, + 0.07685886, + -0.14060347, + 0.005084698, + -0.19277944, + -0.05606341, + 0.082619764, + -0.04241054, + 0.09620237, + 0.011832096, + -0.023301208, + 0.28214368, + 0.02451896, + 0.02793803, + 0.03358184, + 0.044424515, + 0.11006601, + 0.038101573, + 0.0077982936, + 0.045572013, + 0.075922124, + 0.016369391, + -0.0039986745, + 0.22781321, + 0.062854715, + 0.048054352, + 0.010251361, + 0.07170683, + -0.018816603, + 0.027329156, + -0.08482108, + -0.079481706, + 0.042785235, + 0.024120849, + 0.17413847, + 0.035431888, + 0.12439801, + 0.10641275, + -0.14828467, + -0.024425287, + 0.083415985, + 0.1184966, + 0.0026799317, + 0.15399873, + -0.010304051, + 0.009742012, + -0.10781785, + -0.019472316, + 0.061777476, + -0.09798217, + 0.028804509, + -0.023371464, + 0.015491205, + 0.07521958, + 0.024003757, + 0.013465522, + -0.089692086, + -0.097794816, + 0.021193562, + -0.0592483, + -0.056438103, + -0.10987866, + 0.11802823, + -0.06440032, + 0.07704621, + -0.040138967, + -0.13891736, + -0.16027485, + 0.08631986, + -0.16786237, + -0.085757814, + 0.015491205, + -0.013243048, + 0.09133137, + -0.16196096, + -0.2313728, + -0.083134964, + 0.12308659, + 0.07559427, + 0.09723278, + 0.048663225, + -0.13339064, + 0.016345974, + -0.13189186, + 0.11025336, + 0.03346475, + -0.00688498, + -0.059435643, + 0.0056877197, + 0.014999421, + 0.063650936, + -0.15053283, + -0.017481761, + 0.05194179, + 0.061402783, + 0.0077924393, + 0.19971126, + -0.07713988, + 0.06425981, + 0.0021369199, + 0.12158781, + -0.024331613, + -0.008571098, + 0.03264511, + -0.0020242194, + -0.05507984, + -0.00805004, + -0.03304322, + 0.050630365, + -0.1475353, + -0.003735219, + -0.0202217, + 0.16271034, + -0.059435643, + 0.06023187, + 0.06660164, + ], + }, + { + "id": "item7", + "pk": "2", + "text": "Dinosaurs were huge.", + "embedding": [ + 0.09842033, + -0.025395654, + -0.03831241, + 0.037825905, + 0.17008278, + -0.022269849, + -0.05935383, + 0.032668933, + -0.022148222, + 0.08178179, + -0.062710725, + 0.164342, + -0.024021273, + -0.052640036, + 0.027366007, + 0.18098053, + -0.18487258, + -0.008903074, + 0.16346629, + 0.009407825, + 0.110339746, + -0.046315446, + 0.08046822, + 0.12512955, + -0.06635953, + 0.0070239417, + 0.055753678, + -0.0005336371, + -0.012326866, + 0.1578228, + -0.023668556, + -0.035904203, + 0.05988899, + -0.08032227, + -0.11520481, + 0.08499274, + 0.05093726, + -0.09248494, + -0.011128843, + -0.07064079, + 0.01466818, + 0.082073696, + -0.040574666, + -0.07292737, + 0.03539337, + 0.05025615, + -0.1145237, + 0.09584184, + 0.04186391, + -0.034833886, + -0.18234275, + -0.090441614, + -0.09194978, + -0.031331036, + -0.13106494, + 0.068208255, + 0.03220675, + -0.031233737, + -0.04337208, + 0.1289243, + 0.1363192, + 0.052494083, + 0.03074723, + -0.000113359885, + 0.07681943, + 0.03962598, + 0.016529068, + -0.04191256, + -0.03612313, + 0.023084749, + 0.10917213, + 0.09477153, + -0.09652295, + -0.0999285, + 0.11685894, + -0.012649177, + 0.043688312, + -0.10333405, + -0.060521446, + -0.042034186, + 0.0483831, + 0.0028141378, + -0.17270991, + 0.05424551, + 0.25570798, + 0.09511208, + -0.08504139, + -0.1570444, + -0.084262975, + -0.13291366, + -0.023741532, + -0.14857918, + 0.09190113, + -0.08041958, + -0.019837314, + 0.09569589, + -0.053029243, + -0.030722905, + -0.05239678, + -0.15091442, + -0.05872137, + -0.056045584, + 0.11831845, + -0.1145237, + -0.08761988, + -0.0035727844, + -0.05570503, + 0.19285129, + 0.011761302, + 0.087717175, + 0.107712604, + -0.11277228, + -0.042423394, + 0.13048112, + -0.03356897, + 0.056775343, + 0.08640361, + -0.11831845, + -0.10868562, + 0.0410855, + 0.12036178, + -0.09477153, + -0.017611546, + 0.0075043673, + -0.12668636, + -0.006391483, + 0.0012185475, + -0.05161837, + ], + }, + { + "id": "item8", + "pk": "1", + "text": "The hero saves the day again.", + "embedding": [ + 0.11208976, + 0.058739875, + -0.017022463, + 0.15080968, + -0.0031057745, + -0.048069898, + -0.059069872, + 0.09861479, + 0.11626975, + 0.12935972, + 0.008882481, + 0.08766981, + -0.00940498, + -0.077164836, + 0.0015795279, + 0.06297486, + -0.06313986, + 0.0931698, + -0.17247963, + -0.12077974, + -0.044797402, + -0.1404697, + -0.050077394, + 0.020432455, + 0.07897983, + 0.022632452, + -0.046914898, + 0.0031212433, + -0.059399873, + 0.03321993, + -0.07237984, + 0.10119978, + 0.19612958, + -0.086349815, + 0.038252417, + 0.084094815, + 0.16257966, + 0.15520966, + 0.063304864, + -0.08761481, + 0.06132487, + -0.08486482, + -0.09789979, + 0.06935485, + -0.04160741, + 0.05585238, + -0.13485971, + 0.105544776, + -0.08084983, + 0.103344776, + 0.053817384, + -0.0923998, + -0.052607387, + 0.015537467, + 0.025299946, + -0.05961987, + 0.08090483, + -0.25453946, + 0.01894746, + -0.026344944, + -0.14552969, + 0.014341219, + 0.14409968, + 0.12264974, + -0.0456224, + -0.13529971, + -0.0466674, + 0.006166862, + 0.02776119, + -0.020184956, + 0.093939796, + 0.054779883, + -0.09635979, + -0.016334964, + -0.029177437, + -0.06863985, + 0.19139959, + -0.08794481, + -0.08464482, + -0.013413096, + 0.022109952, + -0.122099735, + -0.0458149, + -0.019676207, + 0.10785477, + -0.109119765, + -0.09690979, + -0.28423938, + 0.050709892, + 0.12803972, + 0.10620477, + 0.12110974, + -0.006658423, + -0.052304886, + -0.07798983, + -0.035667423, + -0.07507484, + 0.02745869, + 0.07237984, + -0.0230862, + -0.03684992, + -0.067539856, + -0.052387387, + -0.05202989, + 0.14244969, + 0.080684826, + -0.038472418, + 0.112639755, + 0.03242243, + -0.07501984, + 0.10631477, + -0.024076197, + -0.07754983, + 0.06610986, + -0.12671973, + -0.044082403, + 0.006001862, + 0.037454918, + 0.054504883, + -0.03679492, + 0.076669835, + 0.02271495, + 0.14794968, + 0.06440486, + -0.006850923, + -0.06984985, + 0.035639923, + -0.009143731, + ], + }, + { + "id": "item9", + "pk": "2", + "text": "Don't worry about it.", + "embedding": [ + -0.051598575, + 0.22204931, + -0.017881807, + 0.11678282, + 0.18426134, + -0.03713568, + -0.016847137, + 0.06549915, + 0.057626653, + 0.032569632, + 0.00076827104, + -0.04489571, + -0.07530603, + 0.10778569, + 0.030477798, + 0.050338972, + -0.21053298, + -0.04341118, + -0.097708896, + -0.13432723, + 0.1438642, + 0.059606023, + -0.12299085, + -0.036820777, + -0.026699001, + 0.18381149, + -0.02861089, + 0.08259371, + -0.14962237, + -0.07373153, + 0.02321261, + 0.085607745, + -0.13810603, + 0.065139264, + -0.12685962, + 0.14098512, + 0.17112552, + -0.035921063, + -0.008536032, + -0.09680918, + 0.04435588, + -0.16086878, + -0.035718627, + 0.09689915, + -0.0007956842, + 0.034256592, + -0.00234769, + 0.04577293, + 0.06725359, + 0.015958669, + -0.06486935, + 0.124160476, + 0.09887852, + -0.050518915, + -0.07080746, + -0.078859895, + 0.17013584, + -0.22078972, + -0.10103783, + 0.06873812, + 0.0370682, + 0.04563797, + -0.060235824, + -0.056816913, + -0.064689405, + 0.11273411, + 0.16572724, + 0.108415484, + 0.07921978, + 0.05569227, + -0.11210431, + -0.05848138, + -0.008361713, + 0.07458626, + -0.08992637, + -0.07557594, + -0.0020102975, + -0.07080746, + -0.0092614265, + 0.06626391, + -0.05848138, + -0.078545, + 0.08362838, + -0.031737395, + -0.047549862, + -0.15367107, + 0.093930095, + -0.087182246, + 0.06401462, + 0.09006133, + 0.10886534, + 0.013338254, + 0.025551865, + -0.027553728, + 0.14206477, + -0.09060115, + -0.07818511, + -0.001209693, + 0.017893054, + -0.069367915, + 0.0709874, + 0.050249003, + -0.13396735, + -0.056681953, + -0.022166694, + -0.02170559, + 0.08277365, + -0.101667635, + 0.09096104, + 0.049529232, + -0.095819496, + -0.08974643, + 0.054477658, + -0.037967913, + -0.08682236, + 0.077690266, + 0.03828281, + -0.04136433, + -0.14431405, + -0.060505737, + 0.025619343, + -0.019400073, + 0.11075474, + 0.066893704, + 0.07494614, + 0.03684327, + 0.03929499, + -0.017353225, + ], + }, + ] def get_ordered_item_texts(): - return ["Great weather today!", "Good afternoon!", "Good morning!", "Awful weather today.", - "Hope you're doing well.", "Excuse me please.", "Is this the right place?", "The hero saves the day again." - , "Don't worry about it.", "Dinosaurs were huge."] + return [ + "Great weather today!", + "Good afternoon!", + "Good morning!", + "Awful weather today.", + "Hope you're doing well.", + "Excuse me please.", + "Is this the right place?", + "The hero saves the day again.", + "Don't worry about it.", + "Dinosaurs were huge.", + ] def get_embedding_string(string): if string == "I am having a wonderful day.": - return "0.13481648, 0.022579897, -0.038054377, 0.035029914, 0.15404047, -0.012947189, 0.013434003, 0.0328755, " \ - "0.0859279, 0.090071, 0.07391291, 0.10896354, 0.04085097, 0.019876525, 0.013806882, 0.03799223, " \ - "-0.097528584, -0.10324606, -0.07863604, -0.01846787, -0.0018139011, 0.09686569, 0.0065512774, " \ - "0.014107257, 0.0004389097, 0.07432722, 0.012698603, 0.09404838, 0.11592395, -0.08290344, -0.023802113, " \ - "0.0771031, 0.15578057, 0.17152436, 0.06732538, 0.04408259, 0.04163816, 0.03196402, 0.08451925, " \ - "0.05365315, -0.10473758, 0.054730356, -0.0686926, 0.12412729, 0.1910798, -0.048971448, -0.007649199, " \ - "-0.059122045, -0.005241022, 0.021440545, -0.1014231, 0.08282058, -0.057671957, -0.024755025, -0.07619162, " \ - "0.0966171, 0.047272775, -0.20384054, -0.024319999, -0.014739079, 0.03681145, -0.03331053, 0.09172824, " \ - "-0.09744572, 0.08584504, 0.13440217, -0.019234344, 0.19605151, 0.030389642, -0.0646738, 0.08447782, " \ - "-0.107969195, -0.19058262, -0.05369458, 0.071675636, -0.095871344, 0.030141056, 0.025107188, 0.06309942, " \ - "-0.09951727, 0.031446133, -0.07888463, -0.08182623, -0.063762315, -0.0955399, -0.03948375, -0.031073254, " \ - "-0.29979473, -0.06711823, 0.07743455, 0.0074161496, 0.01248109, -0.0812462, -0.0676154, 3.0668652e-05, " \ - "-0.17931339, 0.2008575, 0.026950868, 0.11111795, 0.07507298, -0.00898017, 0.038800135, -0.015267325, " \ - "-0.13788238, -0.010740988, -0.00870569, -0.037743647, -0.12445874, 0.014676933, -0.27344462, -0.05738194, " \ - "0.07101274, -0.023615673, 0.0040369336, -0.039028008, 0.06546099, -0.072421394, -0.17119291, " \ - "-0.019358637, -0.05489608, 0.006199114, 0.0515816, 0.050048653, -0.034843475, 0.07847032, -0.13315925, " \ - "0.025335059, -0.0432954" + return ( + "0.13481648, 0.022579897, -0.038054377, 0.035029914, 0.15404047, -0.012947189, 0.013434003, 0.0328755, " + "0.0859279, 0.090071, 0.07391291, 0.10896354, 0.04085097, 0.019876525, 0.013806882, 0.03799223, " + "-0.097528584, -0.10324606, -0.07863604, -0.01846787, -0.0018139011, 0.09686569, 0.0065512774, " + "0.014107257, 0.0004389097, 0.07432722, 0.012698603, 0.09404838, 0.11592395, -0.08290344, -0.023802113, " + "0.0771031, 0.15578057, 0.17152436, 0.06732538, 0.04408259, 0.04163816, 0.03196402, 0.08451925, " + "0.05365315, -0.10473758, 0.054730356, -0.0686926, 0.12412729, 0.1910798, -0.048971448, -0.007649199, " + "-0.059122045, -0.005241022, 0.021440545, -0.1014231, 0.08282058, -0.057671957, -0.024755025, -0.07619162, " + "0.0966171, 0.047272775, -0.20384054, -0.024319999, -0.014739079, 0.03681145, -0.03331053, 0.09172824, " + "-0.09744572, 0.08584504, 0.13440217, -0.019234344, 0.19605151, 0.030389642, -0.0646738, 0.08447782, " + "-0.107969195, -0.19058262, -0.05369458, 0.071675636, -0.095871344, 0.030141056, 0.025107188, 0.06309942, " + "-0.09951727, 0.031446133, -0.07888463, -0.08182623, -0.063762315, -0.0955399, -0.03948375, -0.031073254, " + "-0.29979473, -0.06711823, 0.07743455, 0.0074161496, 0.01248109, -0.0812462, -0.0676154, 3.0668652e-05, " + "-0.17931339, 0.2008575, 0.026950868, 0.11111795, 0.07507298, -0.00898017, 0.038800135, -0.015267325, " + "-0.13788238, -0.010740988, -0.00870569, -0.037743647, -0.12445874, 0.014676933, -0.27344462, -0.05738194, " + "0.07101274, -0.023615673, 0.0040369336, -0.039028008, 0.06546099, -0.072421394, -0.17119291, " + "-0.019358637, -0.05489608, 0.006199114, 0.0515816, 0.050048653, -0.034843475, 0.07847032, -0.13315925, " + "0.025335059, -0.0432954" + ) return " " diff --git a/sdk/cosmos/azure-cosmos/setup.py b/sdk/cosmos/azure-cosmos/setup.py index a20349560d85..3e89dc40cde7 100644 --- a/sdk/cosmos/azure-cosmos/setup.py +++ b/sdk/cosmos/azure-cosmos/setup.py @@ -21,9 +21,8 @@ NAMESPACE_NAME = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(PACKAGE_FOLDER_PATH, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(PACKAGE_FOLDER_PATH, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: raise RuntimeError("Cannot find version information") @@ -76,8 +75,5 @@ "azure.cosmos._query_advisor": ["query_advice_rules.json"], }, python_requires=">=3.9", - install_requires=[ - "azure-core>=1.30.0", - "typing-extensions>=4.6.0" - ], + install_requires=["azure-core>=1.30.0", "typing-extensions>=4.6.0"], ) diff --git a/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport.py b/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport.py index f71a21003c98..1479bc45a80b 100644 --- a/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport.py +++ b/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""RequestTransport allowing injection of faults between SDK and Cosmos Gateway -""" +"""RequestTransport allowing injection of faults between SDK and Cosmos Gateway""" import json import logging @@ -43,17 +42,16 @@ ERROR_WITH_COUNTER = "error_with_counter" + class FaultInjectionTransport(RequestsTransport): - logger = logging.getLogger('azure.cosmos.fault_injection_transport') + logger = logging.getLogger("azure.cosmos.fault_injection_transport") logger.setLevel(logging.DEBUG) def __init__(self, *, session: Optional[Session] = None, loop=None, session_owner: bool = True, **config): self.faults: list[dict[str, Any]] = [] - self.requestTransformations: list[dict[str, Any]] = [] + self.requestTransformations: list[dict[str, Any]] = [] self.responseTransformations: list[dict[str, Any]] = [] - self.counters: dict[str, int] = { - ERROR_WITH_COUNTER: 0 - } + self.counters: dict[str, int] = {ERROR_WITH_COUNTER: 0} super().__init__(session=session, loop=loop, session_owner=session_owner, **config) def reset_counters(self): @@ -64,12 +62,14 @@ def error_with_counter(self, error: Exception) -> Exception: self.counters[ERROR_WITH_COUNTER] += 1 return error - def add_fault(self, - predicate: Callable[[HttpRequest], bool], - fault_factory: Callable[[HttpRequest], Exception], - max_inner_count: Optional[int] = None, - after_max_count: Optional[Callable[[HttpRequest], RequestsTransportResponse]] = None): - """ Adds a fault to the transport that will be applied when the predicate matches the request. + def add_fault( + self, + predicate: Callable[[HttpRequest], bool], + fault_factory: Callable[[HttpRequest], Exception], + max_inner_count: Optional[int] = None, + after_max_count: Optional[Callable[[HttpRequest], RequestsTransportResponse]] = None, + ): + """Adds a fault to the transport that will be applied when the predicate matches the request. :param Callable predicate: A callable that takes an HttpRequest and returns True if the fault should be applied. :param Callable fault_factory: A callable that takes an HttpRequest and returns an Exception to be raised. :param int max_inner_count: Optional maximum number of times the fault can be applied for one request. @@ -80,18 +80,30 @@ def add_fault(self, """ if max_inner_count is not None: if after_max_count is not None: - self.faults.append({"predicate": predicate, "apply": fault_factory, "after_max_count": after_max_count, - "max_count": max_inner_count, "current_count": 0}) + self.faults.append( + { + "predicate": predicate, + "apply": fault_factory, + "after_max_count": after_max_count, + "max_count": max_inner_count, + "current_count": 0, + } + ) else: - self.faults.append({"predicate": predicate, "apply": fault_factory, - "max_count": max_inner_count, "current_count": 0}) + self.faults.append( + {"predicate": predicate, "apply": fault_factory, "max_count": max_inner_count, "current_count": 0} + ) else: self.faults.append({"predicate": predicate, "apply": fault_factory}) - def add_response_transformation(self, predicate: Callable[[HttpRequest], bool], response_transformation: Callable[[HttpRequest, Callable[[HttpRequest], RequestsTransportResponse]], RequestsTransportResponse]): - self.responseTransformations.append({ - "predicate": predicate, - "apply": response_transformation}) + def add_response_transformation( + self, + predicate: Callable[[HttpRequest], bool], + response_transformation: Callable[ + [HttpRequest, Callable[[HttpRequest], RequestsTransportResponse]], RequestsTransportResponse + ], + ): + self.responseTransformations.append({"predicate": predicate, "apply": response_transformation}) @staticmethod def __first_item(iterable, condition=lambda x: True): @@ -102,15 +114,21 @@ def __first_item(iterable, condition=lambda x: True): """ return next((x for x in iterable if condition(x)), None) - def send(self, request: HttpRequest, *, proxies: Optional[MutableMapping[str, str]] = None, **kwargs) -> HttpResponse: - FaultInjectionTransport.logger.info("--> FaultInjectionTransport.Send {} {}".format(request.method, request.url)) + def send( + self, request: HttpRequest, *, proxies: Optional[MutableMapping[str, str]] = None, **kwargs + ) -> HttpResponse: + FaultInjectionTransport.logger.info( + "--> FaultInjectionTransport.Send {} {}".format(request.method, request.url) + ) # find the first fault Factory with matching predicate if any first_fault_factory = FaultInjectionTransport.__first_item(iter(self.faults), lambda f: f["predicate"](request)) if first_fault_factory: if "max_count" in first_fault_factory: - FaultInjectionTransport.logger.info(f"Found fault factory with max count {first_fault_factory['max_count']}") + FaultInjectionTransport.logger.info( + f"Found fault factory with max count {first_fault_factory['max_count']}" + ) if first_fault_factory["current_count"] >= first_fault_factory["max_count"]: - first_fault_factory["current_count"] = 0 # reset counter + first_fault_factory["current_count"] = 0 # reset counter if "after_max_count" in first_fault_factory: FaultInjectionTransport.logger.info("Max count reached, returning after_max_count") return first_fault_factory["after_max_count"] @@ -123,22 +141,28 @@ def send(self, request: HttpRequest, *, proxies: Optional[MutableMapping[str, st raise injected_error # apply the chain of request transformations with matching predicates if any - matching_request_transformations = filter(lambda f: f["predicate"](f["predicate"]), iter(self.requestTransformations)) + matching_request_transformations = filter( + lambda f: f["predicate"](f["predicate"]), iter(self.requestTransformations) + ) for currentTransformation in matching_request_transformations: FaultInjectionTransport.logger.info("--> FaultInjectionTransport.ApplyRequestTransformation") request = currentTransformation["apply"](request) - first_response_transformation = FaultInjectionTransport.__first_item(iter(self.responseTransformations), lambda f: f["predicate"](request)) + first_response_transformation = FaultInjectionTransport.__first_item( + iter(self.responseTransformations), lambda f: f["predicate"](request) + ) FaultInjectionTransport.logger.info("--> FaultInjectionTransport.BeforeGetResponseTask") - get_response_task = super().send(request, proxies=proxies, **kwargs) + get_response_task = super().send(request, proxies=proxies, **kwargs) FaultInjectionTransport.logger.info("<-- FaultInjectionTransport.AfterGetResponseTask") if first_response_transformation: FaultInjectionTransport.logger.info(f"Invoking response transformation") response = first_response_transformation["apply"](request, lambda: get_response_task) response.headers["_request"] = request - FaultInjectionTransport.logger.info(f"Received response transformation result with status code {response.status_code}") + FaultInjectionTransport.logger.info( + f"Received response transformation result with status code {response.status_code}" + ) return response else: FaultInjectionTransport.logger.info(f"Sending request to {request.url}") @@ -181,13 +205,16 @@ def predicate_req_payload_contains_field(r: HttpRequest, field_name: str, field_ @staticmethod def predicate_req_for_document_with_id(r: HttpRequest, id_value: str) -> bool: - return (FaultInjectionTransport.predicate_url_contains_id(r, id_value) - or FaultInjectionTransport.predicate_req_payload_contains_id(r, id_value)) + return FaultInjectionTransport.predicate_url_contains_id( + r, id_value + ) or FaultInjectionTransport.predicate_req_payload_contains_id(r, id_value) @staticmethod def predicate_is_database_account_call(r: HttpRequest) -> bool: - is_db_account_read = (r.headers.get(HttpHeaders.ThinClientProxyResourceType) == ResourceType.DatabaseAccount - and r.headers.get(HttpHeaders.ThinClientProxyOperationType) == documents._OperationType.Read) + is_db_account_read = ( + r.headers.get(HttpHeaders.ThinClientProxyResourceType) == ResourceType.DatabaseAccount + and r.headers.get(HttpHeaders.ThinClientProxyOperationType) == documents._OperationType.Read + ) return is_db_account_read @@ -209,7 +236,8 @@ def predicate_is_operation_type(r: HttpRequest, operation_type: str) -> bool: @staticmethod def predicate_is_write_operation(r: HttpRequest, uri_prefix: str) -> bool: is_write_document_operation = documents._OperationType.IsWriteOperation( - str(r.headers.get(HttpHeaders.ThinClientProxyOperationType)),) + str(r.headers.get(HttpHeaders.ThinClientProxyOperationType)), + ) return is_write_document_operation and uri_prefix in r.url @@ -230,17 +258,13 @@ def error_write_forbidden() -> Exception: @staticmethod def error_request_timeout() -> Exception: return CosmosHttpResponseError( - status_code=StatusCodes.REQUEST_TIMEOUT, - message="Injected request timeout error.", - response=None + status_code=StatusCodes.REQUEST_TIMEOUT, message="Injected request timeout error.", response=None ) @staticmethod def error_internal_server_error() -> Exception: return CosmosHttpResponseError( - status_code=StatusCodes.INTERNAL_SERVER_ERROR, - message="Injected request timeout error.", - response=None + status_code=StatusCodes.INTERNAL_SERVER_ERROR, message="Injected request timeout error.", response=None ) @staticmethod @@ -257,10 +281,11 @@ def error_service_response() -> Exception: @staticmethod def transform_topology_swr_mrr( - write_region_name: str, - read_region_name: str, - inner: Callable[[], RequestsTransportResponse], - enable_per_partition_failover: bool = False) -> RequestsTransportResponse: + write_region_name: str, + read_region_name: str, + inner: Callable[[], RequestsTransportResponse], + enable_per_partition_failover: bool = False, + ) -> RequestsTransportResponse: response = inner() if not FaultInjectionTransport.predicate_is_database_account_call(response.request): @@ -274,7 +299,9 @@ def transform_topology_swr_mrr( writable_locations = result["writableLocations"] readable_locations[0]["name"] = write_region_name writable_locations[0]["name"] = write_region_name - readable_locations.append({"name": read_region_name, "databaseAccountEndpoint" : test_config.TestConfig.local_host}) + readable_locations.append( + {"name": read_region_name, "databaseAccountEndpoint": test_config.TestConfig.local_host} + ) FaultInjectionTransport.logger.info("Transformed Account Topology: {}".format(result)) # TODO: need to verify below behavior against actual Cosmos DB service response if enable_per_partition_failover: @@ -285,8 +312,9 @@ def transform_topology_swr_mrr( return response @staticmethod - def transform_topology_ppaf_enabled( # cspell:disable-line - inner: Callable[[], RequestsTransportResponse]) -> RequestsTransportResponse: + def transform_topology_ppaf_enabled( # cspell:disable-line + inner: Callable[[], RequestsTransportResponse], + ) -> RequestsTransportResponse: response = inner() if not FaultInjectionTransport.predicate_is_database_account_call(response.request): @@ -305,11 +333,11 @@ def transform_topology_ppaf_enabled( # cspell:disable-line @staticmethod def transform_topology_mwr( - first_region_name: str, - second_region_name: str, - inner: Callable[[], RequestsTransportResponse], - first_region_url: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1"), - second_region_url: str = test_config.TestConfig.local_host + first_region_name: str, + second_region_name: str, + inner: Callable[[], RequestsTransportResponse], + first_region_url: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1"), + second_region_url: str = test_config.TestConfig.local_host, ) -> RequestsTransportResponse: response = inner() @@ -325,14 +353,10 @@ def transform_topology_mwr( if first_region_url is None: first_region_url = readable_locations[0]["databaseAccountEndpoint"] - readable_locations[0] = \ - {"name": first_region_name, "databaseAccountEndpoint": first_region_url} - writable_locations[0] = \ - {"name": first_region_name, "databaseAccountEndpoint": first_region_url} - readable_locations.append( - {"name": second_region_name, "databaseAccountEndpoint": second_region_url}) - writable_locations.append( - {"name": second_region_name, "databaseAccountEndpoint": second_region_url}) + readable_locations[0] = {"name": first_region_name, "databaseAccountEndpoint": first_region_url} + writable_locations[0] = {"name": first_region_name, "databaseAccountEndpoint": first_region_url} + readable_locations.append({"name": second_region_name, "databaseAccountEndpoint": second_region_url}) + writable_locations.append({"name": second_region_name, "databaseAccountEndpoint": second_region_url}) result["enableMultipleWriteLocations"] = True FaultInjectionTransport.logger.info("Transformed Account Topology: {}".format(result)) request: HttpRequest = response.request @@ -342,20 +366,21 @@ def transform_topology_mwr( class MockHttpRequest(HttpRequest): def __init__( - self, - url: str, - method: str = "GET", - headers: Optional[Mapping[str, str]] = None, - files: Optional[Any] = None, - data: Optional[Any] = None, + self, + url: str, + method: str = "GET", + headers: Optional[Mapping[str, str]] = None, + files: Optional[Any] = None, + data: Optional[Any] = None, ) -> None: self.method = method self.url = url self.headers: Optional[MutableMapping[str, str]] = headers self.files: Optional[Any] = files self.data: Optional[Any] = data - self.multipart_mixed_info: Optional[ - Tuple[Sequence[Any], Sequence[Any], Optional[str], dict[str, Any]]] = None + self.multipart_mixed_info: Optional[Tuple[Sequence[Any], Sequence[Any], Optional[str], dict[str, Any]]] = ( + None + ) class MockHttpResponse(RequestsTransportResponse): def __init__(self, request: HttpRequest, status_code: int, content: Optional[Any] = None): @@ -377,7 +402,6 @@ def __init__(self, request: HttpRequest, status_code: int, content: Optional[Any self.json_text = json.dumps(content) self.bytes = self.json_text.encode("utf-8") - def body(self) -> bytes: return self.bytes diff --git a/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport_async.py b/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport_async.py index f487a6180aff..f8b1534be8bb 100644 --- a/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport_async.py +++ b/sdk/cosmos/azure-cosmos/tests/_fault_injection_transport_async.py @@ -19,8 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""AioHttpTransport allowing injection of faults between SDK and Cosmos Gateway -""" +"""AioHttpTransport allowing injection of faults between SDK and Cosmos Gateway""" import asyncio import json @@ -39,17 +38,18 @@ from azure.cosmos.http_constants import ResourceType, HttpHeaders, StatusCodes, SubStatusCodes from _fault_injection_transport import ERROR_WITH_COUNTER + class FaultInjectionTransportAsync(AioHttpTransport): - logger = logging.getLogger('azure.cosmos.fault_injection_transport_async') + logger = logging.getLogger("azure.cosmos.fault_injection_transport_async") logger.setLevel(logging.DEBUG) - def __init__(self, *, session: Optional[aiohttp.ClientSession] = None, loop=None, session_owner: bool = True, **config): + def __init__( + self, *, session: Optional[aiohttp.ClientSession] = None, loop=None, session_owner: bool = True, **config + ): self.faults: List[Dict[str, Any]] = [] - self.requestTransformations: List[Dict[str, Any]] = [] + self.requestTransformations: List[Dict[str, Any]] = [] self.responseTransformations: List[Dict[str, Any]] = [] - self.counters: Dict[str, int] = { - ERROR_WITH_COUNTER: 0 - } + self.counters: Dict[str, int] = {ERROR_WITH_COUNTER: 0} super().__init__(session=session, loop=loop, session_owner=session_owner, **config) async def reset_counters(self): @@ -60,12 +60,14 @@ async def error_with_counter(self, error: Exception) -> Exception: self.counters[ERROR_WITH_COUNTER] += 1 return error - def add_fault(self, - predicate: Callable[[HttpRequest], bool], - fault_factory: Callable[[HttpRequest], Awaitable[Exception]], - max_inner_count: Optional[int] = None, - after_max_count: Optional[Callable[[HttpRequest], AioHttpTransportResponse]] = None): - """ Adds a fault to the transport that will be applied when the predicate matches the request. + def add_fault( + self, + predicate: Callable[[HttpRequest], bool], + fault_factory: Callable[[HttpRequest], Awaitable[Exception]], + max_inner_count: Optional[int] = None, + after_max_count: Optional[Callable[[HttpRequest], AioHttpTransportResponse]] = None, + ): + """Adds a fault to the transport that will be applied when the predicate matches the request. :param Callable predicate: A callable that takes an HttpRequest and returns True if the fault should be applied. :param Callable fault_factory: A callable that takes an HttpRequest and returns an Exception to be raised. :param int max_inner_count: Optional maximum number of times the fault can be applied for one request. @@ -76,37 +78,62 @@ def add_fault(self, """ if max_inner_count is not None: if after_max_count is not None: - self.faults.append({"predicate": predicate, "apply": fault_factory, "after_max_count": after_max_count, - "max_count": max_inner_count, "current_count": 0}) + self.faults.append( + { + "predicate": predicate, + "apply": fault_factory, + "after_max_count": after_max_count, + "max_count": max_inner_count, + "current_count": 0, + } + ) else: - self.faults.append({"predicate": predicate, "apply": fault_factory, - "max_count": max_inner_count, "current_count": 0}) + self.faults.append( + {"predicate": predicate, "apply": fault_factory, "max_count": max_inner_count, "current_count": 0} + ) else: self.faults.append({"predicate": predicate, "apply": fault_factory}) - def add_response_transformation(self, predicate: Callable[[HttpRequest], bool], response_transformation: Callable[[HttpRequest, Callable[[HttpRequest], AioHttpTransportResponse]], AioHttpTransportResponse]): - self.responseTransformations.append({ - "predicate": predicate, - "apply": response_transformation}) + def add_response_transformation( + self, + predicate: Callable[[HttpRequest], bool], + response_transformation: Callable[ + [HttpRequest, Callable[[HttpRequest], AioHttpTransportResponse]], AioHttpTransportResponse + ], + ): + self.responseTransformations.append({"predicate": predicate, "apply": response_transformation}) @staticmethod def __first_item(iterable, condition=lambda x: True): """ Returns the first item in the `iterable` that satisfies the `condition`. - + If no item satisfies the condition, it returns None. """ return next((x for x in iterable if condition(x)), None) - async def send(self, request: HttpRequest, *, stream: bool = False, proxies: Optional[MutableMapping[str, str]] = None, **config) -> AsyncHttpResponse: - FaultInjectionTransportAsync.logger.info("--> FaultInjectionTransportAsync.Send {} {}".format(request.method, request.url)) + async def send( + self, + request: HttpRequest, + *, + stream: bool = False, + proxies: Optional[MutableMapping[str, str]] = None, + **config, + ) -> AsyncHttpResponse: + FaultInjectionTransportAsync.logger.info( + "--> FaultInjectionTransportAsync.Send {} {}".format(request.method, request.url) + ) # find the first fault Factory with matching predicate if any - first_fault_factory = FaultInjectionTransportAsync.__first_item(iter(self.faults), lambda f: f["predicate"](request)) + first_fault_factory = FaultInjectionTransportAsync.__first_item( + iter(self.faults), lambda f: f["predicate"](request) + ) if first_fault_factory: if "max_count" in first_fault_factory: - FaultInjectionTransportAsync.logger.info(f"Found fault factory with max count {first_fault_factory['max_count']}") + FaultInjectionTransportAsync.logger.info( + f"Found fault factory with max count {first_fault_factory['max_count']}" + ) if first_fault_factory["current_count"] >= first_fault_factory["max_count"]: - first_fault_factory["current_count"] = 0 # reset counter + first_fault_factory["current_count"] = 0 # reset counter if "after_max_count" in first_fault_factory: FaultInjectionTransportAsync.logger.info("Max count reached, returning after_max_count") return first_fault_factory["after_max_count"] @@ -119,22 +146,28 @@ async def send(self, request: HttpRequest, *, stream: bool = False, proxies: Opt raise injected_error # apply the chain of request transformations with matching predicates if any - matching_request_transformations = filter(lambda f: f["predicate"](f["predicate"]), iter(self.requestTransformations)) + matching_request_transformations = filter( + lambda f: f["predicate"](f["predicate"]), iter(self.requestTransformations) + ) for currentTransformation in matching_request_transformations: FaultInjectionTransportAsync.logger.info("--> FaultInjectionTransportAsync.ApplyRequestTransformation") request = await currentTransformation["apply"](request) - first_response_transformation = FaultInjectionTransportAsync.__first_item(iter(self.responseTransformations), lambda f: f["predicate"](request)) + first_response_transformation = FaultInjectionTransportAsync.__first_item( + iter(self.responseTransformations), lambda f: f["predicate"](request) + ) FaultInjectionTransportAsync.logger.info("--> FaultInjectionTransportAsync.BeforeGetResponseTask") - get_response_task = asyncio.create_task(super().send(request, stream=stream, proxies=proxies, **config)) + get_response_task = asyncio.create_task(super().send(request, stream=stream, proxies=proxies, **config)) FaultInjectionTransportAsync.logger.info("<-- FaultInjectionTransportAsync.AfterGetResponseTask") if first_response_transformation: FaultInjectionTransportAsync.logger.info(f"Invoking response transformation") response = await first_response_transformation["apply"](request, lambda: get_response_task) response.headers["_request"] = request - FaultInjectionTransportAsync.logger.info(f"Received response transformation result with status code {response.status_code}") + FaultInjectionTransportAsync.logger.info( + f"Received response transformation result with status code {response.status_code}" + ) return response else: FaultInjectionTransportAsync.logger.info(f"Sending request to {request.url}") @@ -168,20 +201,22 @@ def predicate_req_payload_contains_id(r: HttpRequest, id_value: str): @staticmethod def predicate_req_for_document_with_id(r: HttpRequest, id_value: str) -> bool: - return (FaultInjectionTransportAsync.predicate_url_contains_id(r, id_value) - or FaultInjectionTransportAsync.predicate_req_payload_contains_id(r, id_value)) + return FaultInjectionTransportAsync.predicate_url_contains_id( + r, id_value + ) or FaultInjectionTransportAsync.predicate_req_payload_contains_id(r, id_value) @staticmethod def predicate_is_database_account_call(r: HttpRequest) -> bool: - is_db_account_read = (r.headers.get(HttpHeaders.ThinClientProxyResourceType) == ResourceType.DatabaseAccount - and r.headers.get(HttpHeaders.ThinClientProxyOperationType) == documents._OperationType.Read) + is_db_account_read = ( + r.headers.get(HttpHeaders.ThinClientProxyResourceType) == ResourceType.DatabaseAccount + and r.headers.get(HttpHeaders.ThinClientProxyOperationType) == documents._OperationType.Read + ) return is_db_account_read @staticmethod def predicate_is_document_operation(r: HttpRequest) -> bool: - is_document_operation = (r.headers.get(HttpHeaders.ThinClientProxyResourceType) == - ResourceType.Document) + is_document_operation = r.headers.get(HttpHeaders.ThinClientProxyResourceType) == ResourceType.Document return is_document_operation @@ -198,7 +233,8 @@ def predicate_is_operation_type(r: HttpRequest, operation_type: str) -> bool: @staticmethod def predicate_is_write_operation(r: HttpRequest, uri_prefix: str) -> bool: is_write_document_operation = documents._OperationType.IsWriteOperation( - str(r.headers.get('x-ms-thinclient-proxy-operation-type'))) + str(r.headers.get("x-ms-thinclient-proxy-operation-type")) + ) return is_write_document_operation and uri_prefix in r.url @@ -219,17 +255,13 @@ async def error_write_forbidden() -> Exception: @staticmethod async def error_request_timeout() -> Exception: return CosmosHttpResponseError( - status_code=StatusCodes.REQUEST_TIMEOUT, - message="Injected request timeout error.", - response=None + status_code=StatusCodes.REQUEST_TIMEOUT, message="Injected request timeout error.", response=None ) @staticmethod async def error_internal_server_error() -> Exception: return CosmosHttpResponseError( - status_code=StatusCodes.INTERNAL_SERVER_ERROR, - message="Injected request timeout error.", - response=None + status_code=StatusCodes.INTERNAL_SERVER_ERROR, message="Injected request timeout error.", response=None ) @staticmethod @@ -246,9 +278,8 @@ async def error_service_response() -> Exception: @staticmethod async def transform_topology_swr_mrr( - write_region_name: str, - read_region_name: str, - inner: Callable[[], Awaitable[AioHttpTransportResponse]]) -> AioHttpTransportResponse: + write_region_name: str, read_region_name: str, inner: Callable[[], Awaitable[AioHttpTransportResponse]] + ) -> AioHttpTransportResponse: response = await inner() if not FaultInjectionTransportAsync.predicate_is_database_account_call(response.request): @@ -262,7 +293,9 @@ async def transform_topology_swr_mrr( writable_locations = result["writableLocations"] readable_locations[0]["name"] = write_region_name writable_locations[0]["name"] = write_region_name - readable_locations.append({"name": read_region_name, "databaseAccountEndpoint" : test_config.TestConfig.local_host}) + readable_locations.append( + {"name": read_region_name, "databaseAccountEndpoint": test_config.TestConfig.local_host} + ) FaultInjectionTransportAsync.logger.info("Transformed Account Topology: {}".format(result)) request: HttpRequest = response.request return FaultInjectionTransportAsync.MockHttpResponse(request, 200, result) @@ -270,8 +303,9 @@ async def transform_topology_swr_mrr( return response @staticmethod - async def transform_topology_ppaf_enabled( # cspell:disable-line - inner: Callable[[], Awaitable[AioHttpTransportResponse]]) -> AioHttpTransportResponse: + async def transform_topology_ppaf_enabled( # cspell:disable-line + inner: Callable[[], Awaitable[AioHttpTransportResponse]], + ) -> AioHttpTransportResponse: response = await inner() if not FaultInjectionTransportAsync.predicate_is_database_account_call(response.request): @@ -291,11 +325,11 @@ async def transform_topology_ppaf_enabled( # cspell:disable-line @staticmethod async def transform_topology_mwr( - first_region_name: str, - second_region_name: str, - inner: Callable[[], Awaitable[AioHttpTransportResponse]], - first_region_url: str = None, - second_region_url: str = test_config.TestConfig.local_host + first_region_name: str, + second_region_name: str, + inner: Callable[[], Awaitable[AioHttpTransportResponse]], + first_region_url: str = None, + second_region_url: str = test_config.TestConfig.local_host, ) -> AioHttpTransportResponse: response = await inner() @@ -311,14 +345,10 @@ async def transform_topology_mwr( if first_region_url is None: first_region_url = readable_locations[0]["databaseAccountEndpoint"] - readable_locations[0] = \ - {"name": first_region_name, "databaseAccountEndpoint": first_region_url} - writable_locations[0] = \ - {"name": first_region_name, "databaseAccountEndpoint": first_region_url} - readable_locations.append( - {"name": second_region_name, "databaseAccountEndpoint": second_region_url}) - writable_locations.append( - {"name": second_region_name, "databaseAccountEndpoint": second_region_url}) + readable_locations[0] = {"name": first_region_name, "databaseAccountEndpoint": first_region_url} + writable_locations[0] = {"name": first_region_name, "databaseAccountEndpoint": first_region_url} + readable_locations.append({"name": second_region_name, "databaseAccountEndpoint": second_region_url}) + writable_locations.append({"name": second_region_name, "databaseAccountEndpoint": second_region_url}) result["enableMultipleWriteLocations"] = True FaultInjectionTransportAsync.logger.info("Transformed Account Topology: {}".format(result)) request: HttpRequest = response.request @@ -327,7 +357,7 @@ async def transform_topology_mwr( return response class MockHttpResponse(AioHttpTransportResponse): - def __init__(self, request: HttpRequest, status_code: int, content: Optional[Any]=None): + def __init__(self, request: HttpRequest, status_code: int, content: Optional[Any] = None): self.request: HttpRequest = request # This is actually never None, and set by all implementations after the call to # __init__ of this class. This class is also a legacy impl, so it's risky to change it @@ -346,7 +376,6 @@ def __init__(self, request: HttpRequest, status_code: int, content: Optional[Any self.json_text = json.dumps(content) self.bytes = self.json_text.encode("utf-8") - def body(self) -> Optional[bytes]: return self.bytes diff --git a/sdk/cosmos/azure-cosmos/tests/conftest.py b/sdk/cosmos/azure-cosmos/tests/conftest.py index 1c256a437748..34b113cf9430 100644 --- a/sdk/cosmos/azure-cosmos/tests/conftest.py +++ b/sdk/cosmos/azure-cosmos/tests/conftest.py @@ -28,6 +28,7 @@ def pytest_sessionstart(session): config.create_single_partition_prefix_pk_container_if_not_exist(cosmos_sync_client) config.create_multi_partition_prefix_pk_container_if_not_exist(cosmos_sync_client) + def pytest_sessionfinish(session, exitstatus): """ Called after whole test run finished, right before diff --git a/sdk/cosmos/azure-cosmos/tests/hybrid_search_data.py b/sdk/cosmos/azure-cosmos/tests/hybrid_search_data.py index 4d1b63ec8965..ff7fb7158e19 100644 --- a/sdk/cosmos/azure-cosmos/tests/hybrid_search_data.py +++ b/sdk/cosmos/azure-cosmos/tests/hybrid_search_data.py @@ -1,3 +1,154306 @@ # cspell: disable def get_full_text_items(): - return {"items": [{"title": "Parabolic reflector", "text": "A parabolic (or paraboloid or paraboloidal) reflector (or dish or mirror) is a reflective surface used to collect or project energy such as light, sound, or radio waves. Its shape is part of a circular paraboloid, that is, the surface generated by a parabola revolving around its axis. The parabolic reflector transforms an incoming plane wave traveling along the axis into a spherical wave converging toward the focus.", "vector": [-0.02738949842751026, 0.03491175174713135, -0.021398993209004402, -0.018760139122605324, -0.042221687734127045, 0.019897576421499252, -0.024750644341111183, -0.015590478666126728, -0.03924918174743652, 0.0045838737860322, -0.004727949388325214, 0.005251170601695776, 0.008606611751019955, -0.040553443133831024, 0.0018720327643677592, 0.03312218561768532, 0.024614151567220688, -0.004254017025232315, 0.026919357478618622, -0.009835043922066689, -0.00032867208938114345, -0.046255797147750854, -0.08153153210878372, -0.021019848063588142, -0.019017957150936127, 0.018744973465800285, 0.032121241092681885, -0.039340175688266754, -0.05620458722114563, -0.025508934631943703, 0.06970217823982239, 0.011510869488120079, 0.010593336075544357, -0.03545772284269333, -0.040735434740781784, -0.01607578620314598, -0.03160560131072998, -0.06051168218255043, -0.03206057474017143, 0.0011326983803883195, -0.015029342845082283, 0.013573423027992249, -0.02282458171248436, 0.004489087499678135, -0.02534211054444313, 0.037732597440481186, -0.0015601853374391794, 0.029133569449186325, -0.02189946547150612, -0.038005582988262177, 0.005296668037772179, -0.07534386962652206, -0.011723190546035767, 0.05875244736671448, -0.018183836713433266, 0.02467481419444084, 0.029770534485578537, 0.0629078820347786, 0.0020265348721295595, -0.0036852979101240635, 0.04458755627274513, -0.028026463463902473, -0.04301030933856964, 0.0448908731341362, 0.004272974096238613, -0.005967756267637014, 0.0010644521098583937, 0.009569642134010792, -0.023218894377350807, -0.007052113302052021, 0.033516496419906616, -0.01188243180513382, -0.0016511803260073066, 0.026995187625288963, 0.013080532662570477, 0.04200936481356621, 0.03010418266057968, 0.037368617951869965, 0.05380838364362717, -0.03779326379299164, -0.039522167295217514, 0.011093808338046074, 0.021747808903455734, 0.02851177006959915, 0.010676748119294643, 0.03075631521642208, 0.011738356202840805, -0.041281405836343765, 0.04713541641831398, 0.011821769177913666, -0.031120294705033302, 0.0269496887922287, 0.03585203364491463, 0.06230125203728676, 0.08232015371322632, -0.006377233657985926, 0.0031241620890796185, 0.035882364958524704, -0.04813636094331741, 0.034638769924640656, -0.017061565071344376, -0.002250230871140957, -0.006180077791213989, 0.016864409670233727, -0.005505198147147894, -0.050926875323057175, -0.013816076330840588, -0.008667275309562683, 0.016712751239538193, 0.004216102417558432, 0.016667252406477928, -0.011283381842076778, 0.0552036426961422, -0.01841132342815399, -0.02684352919459343, -0.029012242332100868, 0.013436930254101753, -0.020079566165804863, -0.04067477211356163, 0.03136294707655907, -0.032606545835733414, -0.006119414698332548, -0.013262523338198662, 0.018350660800933838, -0.014847353100776672, -0.040068138390779495, 0.01916961558163166, -0.017835022881627083, 0.023052070289850235, -0.013186694122850895, -0.003920368384569883, -0.004951645154505968, -0.012519396841526031, -0.0012786694569513202, 0.009599973447620869, 0.03151460736989975, -0.014938347972929478, 0.018851133063435555, -0.006597138475626707, 0.021762974560260773, 0.008849265053868294, -0.04759038984775543, 0.07146141678094864, -0.006532683502882719, 0.005910884588956833, 0.004530793521553278, -0.022324109449982643, 0.03976482152938843, -0.016909906640648842, -0.02984636463224888, 0.004242642316967249, 0.0026976228691637516, -0.04637712612748146, -0.018183836713433266, 0.016591424122452736, -0.04804536700248718, -0.006126997526735067, 0.028572434559464455, 0.02834494598209858, -0.07382728904485703, -0.008204717189073563, 0.01777435839176178, -0.029057741165161133, 0.048106029629707336, 0.012549729086458683, 0.023598039522767067, 0.0030976219568401575, -0.02403784915804863, -0.040917422622442245, 0.0055734445340931416, 0.0067942943423986435, 0.010343099944293499, 0.023689035326242447, -0.01023693848401308, -0.07231070101261139, -0.018001846969127655, -0.007802822161465883, 0.01768336445093155, 0.0060739172622561455, -0.011556366458535194, -0.031059630215168, -0.05647757276892662, 0.036246348172426224, 0.0033573368564248085, 0.02450799010694027, 0.03788425773382187, -0.00373079557903111, 0.004481504205614328, -0.05656856670975685, -0.02470514550805092, -0.026054905727505684, 0.004856858868151903, 0.06069367378950119, -0.03336483612656593, 0.047469064593315125, -0.0872945487499237, -0.022035958245396614, -0.010790491476655006, -0.02748049423098564, -0.007143108639866114, 0.0025023629423230886, 0.025296613574028015, -0.032879531383514404, 0.0034672890324145555, -0.04304064065217972, 0.05032024160027504, 0.054384686052799225, -0.018547816202044487, 0.003628426231443882, -0.03524539992213249, 0.025463437661528587, -0.050835881382226944, -8.761824574321508e-05, 0.0007848319946788251, 0.023158229887485504, 0.004128898493945599, 0.0009094761917367578, -0.02488713525235653, 0.008735520765185356, -0.02629755809903145, 0.01953359693288803, -0.03115062601864338, 0.022020792588591576, 0.03345583379268646, -0.009440732188522816, 0.00981987826526165, -0.041584718972444534, -0.004617996979504824, -0.053838714957237244, -0.018274832516908646, -0.0674576386809349, 0.041281405836343765, 0.015355408191680908, -0.03104446455836296, -0.02403784915804863, -0.00958480779081583, 0.0037497528828680515, -0.019852079451084137, 0.0021611314732581377, 0.01842649094760418, 0.006437897216528654, -0.02001890353858471, -0.03136294707655907, -0.003821790451183915, 0.028663428500294685, -0.027374332770705223, 0.024917468428611755, -0.06909554451704025, -0.05235246568918228, -0.026585709303617477, -0.03776292875409126, 0.03133261576294899, -0.05665956065058708, 0.05399037525057793, -0.004382926505059004, 0.006305195856839418, 0.00523600447922945, 0.01982174627482891, 0.01094973273575306, 0.04237334430217743, 0.03266720846295357, -0.04492120444774628, 0.02796580083668232, -0.021641647443175316, -0.02619139850139618, 0.02112600952386856, -0.014824604615569115, -0.026798030361533165, -0.011290964670479298, 0.023719366639852524, -0.008803767152130604, 0.03560938313603401, 0.02347671240568161, -0.041008420288562775, 0.035033080726861954, 0.0023791403509676456, -0.010403763502836227, 0.014089060947299004, 0.042525000870227814, -0.019017957150936127, 0.027616987004876137, -0.056447237730026245, 0.010835989378392696, -0.013634085655212402, 0.02282458171248436, 0.013406598940491676, 0.010001868940889835, 0.014195222407579422, 0.020428379997611046, 0.00539903761819005, -0.022506099194288254, -0.031575269997119904, -0.044648218899965286, 0.07182539999485016, 0.04564916342496872, -0.022035958245396614, -0.010032200254499912, -0.028071962296962738, -0.004060652572661638, 0.044648218899965286, -0.001304261852055788, 0.023082401603460312, -0.04021979495882988, 0.03442644700407982, -0.01750137470662594, -0.028269117698073387, -0.007939314469695091, 0.03733828663825989, -0.0172890517860651, -0.034092798829078674, 0.0561135895550251, -0.015014177188277245, -0.011146889068186283, -0.016621755436062813, 0.002627481007948518, 0.0026312724221497774, -0.0009071065578609705, -0.04728707671165466, -0.010555421933531761, -0.010373431257903576, -0.032970525324344635, 0.01785018853843212, -0.0794689804315567, 0.00869002379477024, 0.039704158902168274, 0.0065933470614254475, 0.059996046125888824, -0.01795634999871254, 0.008341209031641483, 0.04674110561609268, -0.009016089141368866, -0.004140273202210665, 0.04589181765913963, -0.020549707114696503, -0.006745005492120981, 0.007855902425944805, -0.007567751687020063, 0.007215146441012621, -0.030741147696971893, -0.0025440689641982317, 0.016758248209953308, 0.02208145707845688, -0.01374024711549282, -0.017744027078151703, -0.011996176093816757, -0.06454579532146454, -0.0107980752363801, -0.01944260112941265, 0.015370573848485947, 0.000463979784399271, 0.0006545005599036813, -0.020792359486222267, -0.07588984072208405, 0.04555816948413849, 0.039886146783828735, -0.017653033137321472, 5.05034186062403e-05, -0.05526430532336235, 0.01552223227918148, 0.012178165838122368, -0.026449216529726982, -0.059723060578107834, -0.028951579704880714, -0.014104226604104042, -0.03172692656517029, -0.01374024711549282, 0.003110891906544566, -0.0062104095704853535, 0.01619711145758629, -0.012951623648405075, 0.011632195673882961, 0.008811349980533123, -0.029012242332100868, 0.01916961558163166, 0.03767193481326103, 0.03077148087322712, 0.041099414229393005, -0.031666263937950134, -0.007745950482785702, 0.002784826559945941, -0.004708991851657629, 0.01757720299065113, -0.010540255345404148, -0.004568708129227161, 0.02384069375693798, 0.037823595106601715, -0.012375322170555592, -0.04516385868191719, -0.03924918174743652, -0.026403719559311867, 0.01098764780908823, -0.009084335528314114, 0.004197144880890846, -0.01514308713376522, 0.0060928743332624435, -0.013436930254101753, 0.016667252406477928, 0.017471041530370712, -0.01309569925069809, 0.015431237407028675, 0.029421720653772354, 0.047924041748046875, -0.002581983571872115, -0.0024435953237116337, 0.005319416988641024, 0.009660637006163597, -0.03542739152908325, 0.036792315542697906, -0.016667252406477928, 0.01121513545513153, 0.04434490203857422, -0.028875751420855522, 0.03500274941325188, 0.02617623284459114, 0.016758248209953308, 0.03852122277021408, -0.010631250217556953, 0.04871266335248947, -0.0187904704362154, -0.01299712061882019, -0.028178121894598007, 0.014544036239385605, 0.02843594178557396, -0.019700421020388603, -0.019017957150936127, 0.009675802662968636, 0.04856100678443909, -0.0015355407958850265, 0.017258720472455025, -0.030437830835580826, -0.041857704520225525, 0.007962063886225224, 0.013884322717785835, -0.004458755720406771, -0.018562981858849525, 0.002204733435064554, 0.0010919400956481695, 0.024341166019439697, 0.011753522790968418, -0.0027753477916121483, -0.022005626931786537, 0.02449282445013523, 0.017319384962320328, -0.011298547498881817, -0.022187616676092148, -0.006142163183540106, 0.0036132603418082, -0.03982548415660858, 0.07218937575817108, 0.005922258831560612, 0.0105705875903368, 0.012739301659166813, -0.05617425590753555, -0.021732641384005547, -0.010964899323880672, -0.004083401057869196, -0.007700453046709299, -0.024553487077355385, -0.014885267242789268, 0.015529815107584, 0.0038691838271915913, 0.02523595094680786, 0.01464261393994093, -0.056447237730026245, 0.051199860870838165, 0.013641669414937496, -0.011988593265414238, -0.0021706102415919304, -0.0033402752596884966, -0.04379893094301224, -0.003890036838129163, -0.06105765327811241, -0.011245466768741608, 0.020155394449830055, -0.008758270181715488, -0.01853265054523945, -0.048682332038879395, -0.0014853039756417274, 0.005239796359091997, -0.03715629503130913, -0.03482075780630112, 0.031575269997119904, 0.007764907553792, -0.0029971483163535595, 0.03040749952197075, -0.0032094698399305344, -0.00921324547380209, 3.450820076977834e-05, 0.006945952773094177, -0.009895707480609417, 0.052413128316402435, -0.00015059200813993812, -0.014953513629734516, -0.017880519852042198, -0.022566763684153557, -0.019518429413437843, -0.010858737863600254, 0.03573070839047432, 0.031180957332253456, 0.07807371765375137, 0.013224608264863491, -0.004015155136585236, -0.01627294160425663, 0.03251555189490318, -0.023704200983047485, 0.06202826648950577, 0.029694706201553345, -0.02497813105583191, -0.007165857125073671, 0.016758248209953308, 0.023491879925131798, -0.01599995605647564, 0.02778381109237671, -0.02907290682196617, 0.025326944887638092, -0.008144053630530834, -0.02738949842751026, 0.006415148265659809, -0.04552783817052841, 0.009152581915259361, -0.013262523338198662, -0.014415126293897629, 0.005838846787810326, -0.022794250398874283, 0.03645866736769676, -0.01104072853922844, 0.05638657510280609, -0.0021933589596301317, 0.027844473719596863, -0.008530782535672188, 0.00023862493981141597, -0.03039233386516571, 0.043738268315792084, 0.012504231184720993, -0.013072949834167957, 0.000957817304879427, -0.010790491476655006, 0.048227354884147644, 0.025417940691113472, -0.02385585941374302, -0.0370653010904789, 0.004375343676656485, 0.006551641039550304, 0.006005670875310898, 0.01145778875797987, -0.0029061532113701105, 0.010244522243738174, -0.020443545654416084, -0.0062748645432293415, -0.016803745180368423, 0.07728509604930878, 0.006782920099794865, 0.023264391347765923, 0.07546519488096237, 0.017653033137321472, 0.008667275309562683, -0.007787656504660845, -0.008075807243585587, 0.010441677644848824, -0.0011507077142596245, -0.01145778875797987, 0.0011867266148328781, -0.02318856306374073, 0.02963404171168804, -0.024811306968331337, 0.021747808903455734, -0.0019772457890212536, 0.03721696138381958, -0.0041099414229393005, -0.0034255830105394125, -0.005907092709094286, 0.01663692109286785, -0.022293778136372566, 0.027525991201400757, 0.005744060035794973, -0.013626502826809883, -0.006312779150903225, 0.003927951212972403, -0.015969624742865562, 0.023734532296657562, 0.008068224415183067, -0.008591446094214916, -0.009789546951651573, 0.01374024711549282, 0.009948788210749626, -0.029785700142383575, 0.027616987004876137, 0.040280457586050034, 0.004159230273216963, -0.006312779150903225, -0.027905136346817017, 0.038763877004384995, 0.008712772279977798, 0.028466273099184036, 0.0196397565305233, 0.014779106713831425, 0.014187638647854328, -0.04112974554300308, 0.021853968501091003, 0.02086818963289261, 0.011806602589786053, 0.03739894926548004, -0.0008033153717406094, -0.04216102138161659, -0.014104226604104042, 0.04640745744109154, 0.015696639195084572, -0.044102247804403305, -0.0302103441208601, 0.01380091067403555, -0.04983493685722351, -0.0396738238632679, -0.010926984250545502, 0.02440182864665985, -0.014308965764939785, 0.0023260600864887238, -0.012595226056873798, -0.025645427405834198, -0.008561113849282265, -0.02030705288052559, -0.00892509426921606, -0.023886190727353096, 0.01505209133028984, -0.0491979718208313, -0.019958239048719406, -0.013831241987645626, 0.033698488026857376, -0.015082423575222492, -0.03049849532544613, 0.029421720653772354, -0.010502341203391552, -0.06527375429868698, -0.028132624924182892, -0.013891905546188354, 0.03843022882938385, 0.023446381092071533, 0.0018805635627359152, -0.01926061138510704, 0.00963030569255352, 0.005854012444615364, -0.03263687714934349, 0.012185748666524887, 0.036337342113256454, -0.05171550065279007, 0.010487175546586514, 0.021489989012479782, -0.023067235946655273, -0.025417940691113472, 0.01486251875758171, 0.021019848063588142, -0.009175330400466919, -0.016151614487171173, -0.0041099414229393005, 0.014726025983691216, 0.024902300909161568, -0.008856847882270813, -0.017986681312322617, 0.03882453963160515, 0.007753533311188221, -0.02347671240568161, -0.00163127516862005, 0.00240757642313838, -0.044011253863573074, 0.012678638100624084, -0.020352551713585854, 0.007385761942714453, -0.02000373788177967, 0.04385959729552269, 0.0029914609622210264, 0.0020208475179970264, -0.028269117698073387, 0.006782920099794865, -0.03245488926768303, -0.021671978756785393, 0.04461788758635521, -0.035670045763254166, -0.009372486732900143, 0.01739521324634552, 0.01841132342815399, -0.017804691568017006, -0.013080532662570477, 0.024750644341111183, 0.0014435979537665844, 0.01674308255314827, 0.01637910306453705, -0.005641690921038389, 0.027450162917375565, -0.055051982402801514, -0.033152516931295395, -0.019518429413437843, -0.06497044116258621, -0.01647009700536728, -0.02534211054444313, -0.00640756543725729, -0.00279240938834846, -0.03524539992213249, -0.027177177369594574, -0.014346879906952381, -0.02720750868320465, -0.04170604795217514, 0.010911818593740463, -0.009903290309011936, -0.0028739257249981165, -0.009516561403870583, -0.02385585941374302, 0.010267270728945732, -0.014604699797928333, -0.028390444815158844, -0.019518429413437843, -0.017046399414539337, 0.014066312462091446, -0.036246348172426224, 0.0009497604332864285, 0.01234498992562294, 0.026858694851398468, -0.013270106166601181, -0.001313740503974259, 0.010873904451727867, -0.04367760568857193, 0.02141415886580944, 0.020807527005672455, 0.01906345598399639, 0.0058691781014204025, 0.013725081458687782, 0.04771171882748604, 0.02675253339111805, 0.005122261121869087, -0.03545772284269333, -0.03597336262464523, 0.015742138028144836, -0.03994680941104889, 0.01029001921415329, -0.008614194579422474, -0.01127579901367426, -0.012087170965969563, 0.03394113853573799, -0.04740840196609497, 0.033061522990465164, -0.02280941605567932, 0.00252321595326066, -0.00011812763841589913, -0.01352034229785204, 0.02963404171168804, -0.0159847903996706, -0.010676748119294643, -0.014574367552995682, 0.006779128219932318, 0.02393168769776821, 0.013762995600700378, -0.007711827289313078, -0.004674868658185005, 0.011723190546035767, -0.030907971784472466, 0.011078642681241035, -0.026858694851398468, 0.02553926780819893, -0.024644482880830765, 0.009410400874912739, -0.0015819862019270658, 0.036155350506305695, -0.027541156858205795, 0.04173637926578522, 0.0035848242696374655, -0.0006293821497820318, -0.04734773933887482, -0.049622613936662674, 0.018638812005519867, 0.01533265970647335, 0.011116557754576206, -0.02132316492497921, 0.025872915983200073, 0.023052070289850235, -0.0026142108254134655, -0.017273886129260063, -0.01572697050869465, 0.015029342845082283, 0.00617628637701273, -0.05444534868001938, 0.01589379645884037, 0.008485284633934498, -0.00481515284627676, -0.019958239048719406, -0.05638657510280609, -0.034365784376859665, -0.02431083470582962, -0.025463437661528587, 0.014142141677439213, -0.00017452558677177876, 0.00981987826526165, 0.022035958245396614, 0.03767193481326103, 0.024068180471658707, -0.013194276951253414, -0.0055734445340931416, -0.004735532216727734, 0.021929798647761345, 0.00847011897712946, 0.0007753533427603543, -0.027738312259316444, -0.024144010618329048, 0.05435435473918915, -0.0019450184190645814, -0.004443589597940445, 0.001195257413201034, 0.003863496473059058, -0.04143306240439415, 0.04768138751387596, -0.03479042649269104, -0.025311779230833054, -0.003361128270626068, -0.02552410028874874, 0.036337342113256454, 0.018911797553300858, 0.02534211054444313, -0.0191847812384367, -0.015355408191680908, -0.009531727991998196, -0.034274786710739136, -0.009137416258454323, -0.005414203274995089, 0.01210991945117712, -0.049319297075271606, -0.024917468428611755, 0.03654966503381729, -0.03330417349934578, 0.012322241440415382, 0.002917527686804533, -0.004197144880890846, 0.018441656604409218, -0.010631250217556953, 0.019093787297606468, -0.03148427605628967, -0.009471064433455467, 0.010123195126652718, -0.03439611569046974, -0.004128898493945599, 0.030452998355031013, 0.02365870401263237, 0.013254940509796143, 0.01257247757166624, 0.03721696138381958, -0.02907290682196617, -0.01935160532593727, -0.025493768975138664, -0.041857704520225525, 0.027328835800290108, 0.046346794813871384, 0.009084335528314114, 0.011086225509643555, 0.0340624675154686, 0.016758248209953308, -0.013186694122850895, 0.004284348338842392, 0.032121241092681885, 0.006202826742082834, -0.017926016822457314, -0.02226344682276249, 0.011981010437011719, 0.0005374393076635897, 0.0018445447785779834, 0.015878628939390182, 0.022399939596652985, 0.0017099479446187615, -0.036792315542697906, 0.0042464337311685085, -0.004602830857038498, 0.03178759291768074, -0.010873904451727867, 0.012708970345556736, -0.0065705981105566025, -0.009706134907901287, 0.01927577704191208, 0.016151614487171173, -0.05620458722114563, 0.03676198422908783, 0.012314658612012863, -0.009986702352762222, -0.03542739152908325, 0.026782864704728127, 0.05656856670975685, 0.03621601685881615, 0.016106117516756058, -0.024280503392219543, 0.024841638281941414, 0.026858694851398468, -0.026600874960422516, -0.07552585750818253, -0.008060641586780548, 0.03284920006990433, 0.015544981695711613, -0.021641647443175316, -0.0021516529377549887, -0.0005488136666826904, -0.0039507001638412476, -0.027268171310424805, 0.038581885397434235, -0.014324131421744823, -0.020989516749978065, -0.011010396294295788, -0.006892872042953968, 0.01692507229745388, -0.0005199037841521204, -0.02086818963289261, -0.012481482699513435, 0.028587600216269493, -0.005835055373609066, 0.041099414229393005, 0.033152516931295395, -0.0004222737334202975, -0.012921291403472424, 0.01627294160425663, -0.03397146984934807, 0.04759038984775543, -0.009129832498729229, 0.05013825371861458, 0.007704244460910559, 0.019154449924826622, 0.030073851346969604, 0.007374387700110674, -0.039340175688266754, 0.0401894636452198, 0.02010989747941494, 0.04704442247748375, -0.004530793521553278, 0.01005494873970747, -0.028921248391270638, -0.012701387517154217, 0.006081500090658665, 0.026070071384310722, 0.024432161822915077, 0.024265335872769356, -0.00841703824698925, 0.0474993959069252, 0.03733828663825989, 0.02142932638525963, 0.017653033137321472, -0.030255841091275215, -0.01010802946984768, 0.014999011531472206, -0.010744994506239891, 0.01897246018052101, 0.012671055272221565, 0.017137393355369568, -0.013118447735905647, 0.02356770820915699, -0.025842582806944847, -0.057569511234760284, 0.011336461640894413, -0.010365848429501057, 0.025008462369441986, 0.016106117516756058, 0.0002462078700773418, -0.03348616510629654, -0.044466231018304825, 0.009471064433455467, -0.006066333968192339, 0.007886234670877457, -0.009046420454978943, 0.041190408170223236, 0.003129849210381508, -0.02320372872054577, 0.013831241987645626, 0.03048332966864109, -0.0003400464775040746, 0.0047469064593315125, -0.010858737863600254, 0.003562075551599264, -0.040341123938560486, 0.005907092709094286, -0.030923139303922653, 0.0015772469341754913, -0.02020089328289032, -0.018669143319129944, 0.010919401422142982, 0.05496098846197128, 0.012648306787014008, 0.06685100495815277, -0.003071081591770053, 0.019761083647608757, 0.027935469523072243, 0.03943117335438728, 0.03573070839047432, -0.005262544844299555, -0.01417247299104929, -0.008917511440813541, -0.012663472443819046, 0.0034066257067024708, 0.0006971544935368001, -0.02599424123764038, 0.001672981190495193, -0.013368683867156506, -0.02758665382862091, 0.007143108639866114, 0.01628810726106167, 0.004356386139988899, 0.009266325272619724, -0.011389542371034622, -0.013072949834167957, -0.0053497483022511005, -0.026161065325140953, -0.002953546354547143, -0.03218190371990204, -0.00897817499935627, 0.019033122807741165, -0.038581885397434235, 0.03506341204047203, -0.009152581915259361, 0.007726992946118116, -0.004163021687418222, 0.013914654031395912, 0.010934567078948021, 0.018214168027043343, -0.052140142768621445, -0.020746862515807152, 0.039704158902168274, 0.029998023062944412, 0.0021383827552199364, 0.014498538337647915, 0.06478844583034515, 0.043252963572740555, -0.016970569267868996, 0.02030705288052559, 0.0015544980997219682, 0.028572434559464455, -0.027814142405986786, 0.02385585941374302, -0.02264259196817875, -0.0036416961811482906, 0.0629078820347786, -0.011010396294295788, 0.006062542553991079, -0.027616987004876137, 0.0048303185030817986, -0.020701365545392036, 0.0004232215869706124, 0.024053014814853668, -0.02729850448668003, -0.05835813656449318, -0.0035412225406616926, -0.03086247481405735, -0.02514495514333248, 0.0017630283255130053, -0.014263467863202095, 0.005550695583224297, -0.001238859142176807, -0.019412269815802574, -0.012898542918264866, -0.00511846924200654, -0.03448710963129997, -0.007954481057822704, -0.01628810726106167, -0.05414203181862831, -0.030634988099336624, 0.029512716457247734, -0.02394685335457325, -0.029967691749334335, -0.03533639758825302, 0.013391432352364063, 0.004663494415581226, 0.021656813099980354, -0.02224828116595745, -0.009675802662968636, 0.04052311182022095, 0.009554476477205753, 0.03321317955851555, -0.0017781942151486874, 0.04610414057970047, -0.043434951454401016, 0.01757720299065113, 0.003370607038959861, -0.021368661895394325, 0.010426511988043785, 0.015271996147930622, 0.022566763684153557, 0.037368617951869965, 0.04728707671165466, 0.015453985892236233, -0.001555445953272283, -0.015302328392863274, -0.022672923281788826, -0.010418929159641266, -0.010418929159641266, -0.017425544559955597, -0.00032345883664675057, -0.009266325272619724, 0.0030369586311280727, 0.067336305975914, -0.018365826457738876, -0.010744994506239891, 0.011670110747218132, -0.006684341933578253, 0.04525485262274742, 0.020428379997611046, 0.021353496238589287, -0.0033099434804171324, -0.0053307912312448025, 0.00016990475705824792, 0.020079566165804863, -0.004894773475825787, 0.0003170607378706336, -0.006020836532115936, 0.05744818598031998, -0.02535727620124817, 0.024053014814853668, 0.022415105253458023, 0.05432402342557907, -0.002115634037181735, 0.00040521216578781605, -0.022142119705677032, -0.036337342113256454, -0.03433545306324959, -0.01028243638575077, -0.02309756726026535, -0.006540266331285238, 0.01730421744287014, -0.021914632990956306, -0.01663692109286785, -0.009880541823804379, 0.018653977662324905, -0.013907071202993393, 0.032121241092681885, -0.008667275309562683, 0.009008506312966347, 0.022308943793177605, -0.03421412408351898, 0.015939293429255486, 0.0006625574314966798, 0.007764907553792, -0.02271842211484909, 0.015226499177515507, -0.01757720299065113, 0.005922258831560612, 0.05365672707557678, 0.012708970345556736, 0.008326043374836445, 0.02047387696802616, 0.030240675434470177, -0.010835989378392696, -0.007654955610632896, 0.0018369618337601423, 0.010638833977282047, -0.021262500435113907, -0.037641603499650955, 0.022005626931786537, -0.004762072116136551, -0.004538376349955797, 0.003402834292501211, 0.02544827200472355, -0.01869947463274002, 0.03500274941325188, 0.008401872590184212, -0.023294722661376, 0.010244522243738174, 0.0024379079695791006, 0.001664450392127037, 0.008591446094214916, -0.00959239061921835, -0.020140228793025017, 0.007518462836742401, -0.01906345598399639, -0.0010056844912469387, 0.01992790773510933, 0.03852122277021408, 0.009835043922066689, 0.02224828116595745, -0.00523600447922945, -0.03154493868350983, -0.004447381477802992, -0.00446633854880929, -0.019017957150936127, 0.014005648903548717, 0.004917521961033344, -0.007040739059448242, -0.011776271276175976, -0.011670110747218132, -0.024007517844438553, -0.009918455965816975, -0.0044284239411354065, -0.015590478666126728, -0.007662538439035416, 0.024811306968331337, 0.016576258465647697, 0.008909928612411022, -0.03227289766073227, 0.01323977392166853, -0.011859683319926262, -0.00012653993326239288, 0.011708024889230728, 0.01692507229745388, -0.027616987004876137, 0.059237752109766006, 0.0224454365670681, -0.03843022882938385, 0.03906719386577606, -0.009910873137414455, -0.005880552809685469, 0.011078642681241035, 0.01258764322847128, -0.004542167764157057, 0.004034112207591534, -0.01486251875758171, 0.023628370836377144, 0.019002791494131088, -0.01080565806478262, 0.016712751239538193, 0.0159847903996706, -0.02751082554459572, -0.016515593975782394, -0.011783854104578495, 0.013110864907503128, 0.018305163830518723, 0.001071087084710598, -0.021459657698869705, -0.008674858137965202, 0.015939293429255486, -0.0034995165187865496, 0.01581796631217003, 0.014362046495079994, 0.006566806696355343, 0.0006113727577030659, -0.029118403792381287, 0.023355387151241302, 0.0030331669840961695, 0.0063696508295834064, 0.05292876437306404, -0.011905181221663952, 0.05814581364393234, -0.021444492042064667, 0.014892850071191788, 0.03788425773382187, -0.005395245738327503, -0.01692507229745388, 0.007848319597542286, 0.03095347061753273, -0.015544981695711613, 0.0278596393764019, 0.0039507001638412476, 0.011981010437011719, -0.013452095910906792, 0.010600918903946877, 0.00012535510177258402, -0.02647954784333706, 0.04862166941165924, 0.038854870945215225, -0.015438820235431194, -0.019488098099827766, -0.011245466768741608, 0.013254940509796143, 0.007848319597542286, -0.02666153945028782, -0.006346902344375849, -0.004921313375234604, 0.020079566165804863, 0.016515593975782394, 0.023127898573875427, 0.01304261852055788, 0.02095918543636799, 0.03903685882687569, -0.0146805290132761, -0.052898433059453964, -0.01589379645884037, -0.03900652751326561, -0.0072492691688239574, -0.003639800474047661, -0.029876695945858955, 0.023598039522767067, -0.02124733477830887, 0.0015611331909894943, 0.011366793885827065, 0.009463481605052948, 0.020322220399975777, 0.03630701079964638, 0.014308965764939785, 0.007825571112334728, -0.00066066172439605, -0.006688133347779512, -0.013308020308613777, -0.018259664997458458, 0.003135536564514041, -0.009569642134010792, 0.026115568354725838, -0.007901400327682495, 0.019093787297606468, -0.006062542553991079, -0.0003696672501973808, 0.020170561969280243, 0.000715163943823427, -0.012822713702917099, -0.004288139753043652, -0.0057137287221848965, 0.024068180471658707, 0.013368683867156506, 0.028648262843489647, -0.0013516551116481423, 0.0020227432250976562, 0.00605875113978982, -0.011799019761383533, 0.019215114414691925, 0.016712751239538193, -0.008113722316920757, 0.03218190371990204, -0.03239422291517258, 0.02496296539902687, -0.02001890353858471, -0.015370573848485947, -0.03958282992243767, -0.0105705875903368, -0.00940281804651022, 0.030346836894750595, 0.05062355846166611, 0.04434490203857422, -0.010980064980685711, 0.02133833058178425, 0.01804734393954277, 0.025948744267225266, -0.015393323265016079, 0.04291931539773941, -0.0056682308204472065, -0.029800865799188614, -0.01860848069190979, 0.005262544844299555, -0.016970569267868996, -0.0027071016374975443, -0.03233356028795242, -0.019381938502192497, 0.01860848069190979, 0.0034066257067024708, -0.012557311914861202, 0.007893817499279976, -0.04813636094331741, 0.03160560131072998, -0.005717520136386156, -0.025190452113747597, -0.003347858088091016, 0.00264075119048357, -0.007817988283932209, 0.00940281804651022, -0.0018625541124492884, -0.03973449021577835, -0.011890014633536339, 0.011905181221663952, -0.019321274012327194, -0.0001368479715893045, 0.0422823503613472, 0.0012786694569513202, 0.00011475087376311421, -0.0064530628733336926, -0.03946150466799736, -0.02039804868400097, 0.03882453963160515, 0.013831241987645626, -0.0005454961210489273, 0.018487153574824333, 0.018775304779410362, 0.026691870763897896, -0.0007421780610457063, 0.01333076972514391, 0.018380992114543915, 0.03309185430407524, 0.03579137101769447, 0.006263489834964275, -0.002976295305415988, -0.037368617951869965, -0.03518473729491234, -0.01619711145758629, 0.03991647809743881, 0.012928875163197517, -0.01417247299104929, 0.003010418266057968, 0.011730773374438286, -0.0037345869932323694, 0.016970569267868996, 0.028572434559464455, -1.4491963156615384e-05, 0.013376266695559025, 0.003347858088091016, 0.002030326286330819, -0.001514687784947455, -0.01103314571082592, -0.025599930435419083, -0.007347847335040569, -0.013163944706320763, 0.03776292875409126, -0.0031999913044273853, -0.0008090025512501597, -0.0013848303351551294, 0.011586698703467846, -0.018729805946350098, 0.007287183776497841, 0.019002791494131088, 0.011518452316522598, 0.009054004214704037, 0.021580982953310013, 0.021171506494283676, 0.02635822258889675, -0.035882364958524704, -0.0003594776790123433, -0.011541200801730156, -0.020595204085111618, -0.0013781952438876033, -0.00217440165579319, -0.03949183598160744, 0.009622722864151001, 0.020898520946502686, 0.023294722661376, 0.009038837626576424, -0.039795152842998505, 0.0452851839363575, -0.026813197880983353, 0.0051298439502716064, 0.009038837626576424, -0.013998066075146198, -0.004223685245960951, 0.008576279506087303, -0.014043563976883888, -0.022308943793177605, -0.029315559193491936, 0.023537376895546913, 0.017076730728149414, 0.01853265054523945, 0.02161131612956524, -0.020792359486222267, -0.00039644440403208137, -0.017152559012174606, 0.0004677712277043611, -0.041493725031614304, -0.002483405638486147, 0.015924127772450447, 0.029512716457247734, -0.014475789852440357, 0.04243400692939758, -0.006502351723611355, -0.012557311914861202, -0.016242610290646553, 0.0025535474997013807, -0.00869760662317276, -0.050168585032224655, 0.022945908829569817, 0.023734532296657562, -0.02470514550805092, -0.002204733435064554, -0.003939325921237469, -0.024720311164855957, -0.019017957150936127, -0.010623667389154434, 0.0063696508295834064, -0.014938347972929478, -0.01121513545513153, 0.023340221494436264, 0.028678594157099724, -0.04947095364332199, -0.004515627399086952, -0.0409780889749527, 0.011715607717633247, 0.01285304594784975, -0.019154449924826622, 0.017471041530370712, 0.029512716457247734, -0.015651142224669456, -0.020807527005672455, 0.003992406185716391, 0.018183836713433266, 0.006305195856839418, 0.005876761395484209, -0.001638858113437891, -0.005103303585201502, -0.014058729633688927, -0.015484318137168884, 0.007730784825980663, -0.004280556924641132, -0.003827477805316448, 0.0022881454788148403, 0.014627448283135891, 0.019230280071496964, 0.05210981145501137, 0.005292876623570919, -0.03748994693160057, 0.005842638202011585, 0.009099501185119152, -0.008545948192477226, -0.029482383280992508, 0.04701409116387367, -0.048500340431928635, 0.0375809408724308, 0.007321306969970465, -0.010608501732349396, -0.009478647261857986, 0.013778161257505417, -0.00804547592997551, 0.01721322350203991, 0.029254896566271782, -0.02907290682196617, 0.01374782994389534, -0.0038691838271915913, -0.006926995236426592, -0.019472932443022728, 0.007268226705491543, 0.015067257918417454, -0.0006763014825992286, 0.019503263756632805, 0.018092840909957886, -0.032788537442684174, 0.03657999634742737, -0.010009451769292355, 0.009895707480609417, -0.009175330400466919, -0.043252963572740555, 0.0017279573949053884, 0.005804723594337702, 0.001999994507059455, -0.007620832417160273, -0.008955425582826138, -0.027798976749181747, 0.022051123902201653, 0.015757303684949875, 0.018760139122605324, 0.007734576240181923, -0.028375277295708656, -0.02021605893969536, 0.02458381839096546, -0.010176275856792927, -0.009023671969771385, -0.028936414048075676, 0.011010396294295788, -0.018911797553300858, -0.020792359486222267, -0.06272589415311813, -0.038945864886045456, 0.025023628026247025, 0.007359221577644348, 0.010403763502836227, -0.023825528100132942, 0.0035146824084222317, -0.004894773475825787, 0.0020530750043690205, 0.005562070291489363], "index": 1}, {"title": "John Baird (Canadian politician)", "text": "John Russell Baird, PC (born May 26, 1969) served from 2011 to 2015 as Canada's Minister of Foreign Affairs in the cabinet of Prime Minister Stephen Harper. He had been a member of the federal cabinet, in various positions, since 2006. Previously he was a provincial cabinet minister in Ontario during the governments of Premiers Mike Harris and Ernie Eves. Baird resigned from cabinet on February 3, 2015, and as a Member of Parliament on March 16, 2015.", "vector": [-0.010904606431722641, -0.013850467279553413, -0.008957103826105595, 6.772535562049598e-05, 0.006471754051744938, 0.02263883501291275, 0.00030825199792161584, -0.001327922334894538, -0.08166854083538055, 0.05962028354406357, -0.013105213642120361, -0.006485815159976482, -0.03866881877183914, 0.00401452649384737, -0.026561962440609932, 0.01598779857158661, -0.0026312372647225857, 0.016395578160881996, -0.05258959159255028, -0.032706789672374725, 0.03509722277522087, -0.006485815159976482, 0.007944684475660324, 0.046093229204416275, 0.02016402967274189, 0.025929199531674385, 0.026758821681141853, 0.009273485280573368, 0.002865007845684886, -0.0007228432223200798, -0.011277233250439167, 0.02578858658671379, 0.046740055084228516, 0.010932729579508305, 0.00228321785107255, -0.004858209751546383, 0.015678448602557182, 0.00958283618092537, -0.02761656604707241, 0.019278163090348244, 0.00041283355676569045, 0.0012874958338215947, -0.011727198027074337, -0.01353408582508564, 0.01056713331490755, 0.026758821681141853, -0.06670722365379333, 0.013154428452253342, 0.03594090789556503, -0.017900146543979645, 0.016072167083621025, -0.026055751368403435, -0.013063029386103153, 0.05416446551680565, 0.011066311970353127, 0.00045787394628860056, 0.04285911098122597, 0.07221928983926773, -0.016339333727955818, -0.006851411424577236, 0.011213957332074642, -0.029050827026367188, 0.003446797840297222, -0.043618425726890564, 0.03262241929769516, 0.10394178330898285, 0.0028034893330186605, 0.021949827671051025, -0.12599003314971924, 0.004144594073295593, 0.0149472551420331, -0.005142952781170607, 0.038612570613622665, 0.026632269844412804, -0.018743829801678658, 0.009371914900839329, 0.020923346281051636, -0.0051605296321213245, -0.025057394057512283, -0.011692044325172901, 0.014651966281235218, -0.03259429708123207, 0.01653619296848774, 0.0120717016980052, -0.03349422663450241, -0.048118069767951965, 0.02183733507990837, -0.066032275557518, 0.01046870369464159, 0.007860315963625908, -0.038275096565485, 0.020445257425308228, 0.06856332719326019, 0.04280286654829979, 0.05798916518688202, 0.0006657188641838729, -0.012127947062253952, -0.05188652127981186, 0.03560343384742737, -0.04319658502936363, 0.04254975914955139, 0.04007495567202568, 0.014019204303622246, 0.010243721306324005, 0.03979372978210449, -0.027799364179372787, -0.046290088444948196, -0.02642134763300419, 0.012486512772738934, 0.09111779183149338, -0.03464725986123085, 0.04530579224228859, -0.039090659469366074, 0.0580454096198082, 0.006250286940485239, 0.002372859278693795, -0.017843902111053467, 0.016128411516547203, -0.0012751921312883496, 0.04148109629750252, 0.014244185760617256, -0.03970935940742493, 0.033184874802827835, 0.018771953880786896, -0.01611435040831566, -0.024073095992207527, 0.03425354138016701, 0.00019015830184798688, 0.015523772686719894, -0.029753897339105606, -0.05416446551680565, 0.03895004466176033, -0.03619401156902313, -0.025296436622738838, -0.004306300077587366, -0.020895222201943398, 0.04887738451361656, 0.005568309687077999, -0.025422990322113037, -0.020346827805042267, 0.04229665547609329, -0.0051605296321213245, 0.018040761351585388, 0.02158423140645027, 0.02571827918291092, -0.010820237919688225, -0.01515817642211914, 0.0006099127349443734, -0.017576735466718674, 0.05756732448935509, 0.015411281026899815, 0.03220057860016823, -0.0077689168974757195, 0.0038457897026091814, 0.045418284833431244, -0.02386217564344406, 0.011713135987520218, 0.02696974202990532, -0.01427230890840292, 0.02741970680654049, -0.05596432462334633, -0.00288609997369349, -0.00045128268538974226, 0.039990589022636414, 0.006313563324511051, 0.02261071279644966, -0.008732122369110584, 0.026786943897604942, -0.00821888167411089, 0.01631120964884758, 0.029838265851140022, -0.014595720916986465, 0.013667669147253036, -0.05883284658193588, 0.010763992555439472, -0.01858915574848652, 0.006854926701635122, 0.003213027259334922, -0.027250969782471657, -0.01768922619521618, 0.008352464064955711, -0.01891256682574749, -0.04350593313574791, 0.028024345636367798, -0.04716189578175545, -0.010897575877606869, 0.05005853995680809, -0.007076393347233534, -0.07266925275325775, -0.011973272077739239, 0.015889368951320648, 0.026533838361501694, -0.02106395922601223, -0.007181853987276554, 0.0642886683344841, 0.0022709141485393047, 0.038134485483169556, 0.03011949360370636, -0.015284729190170765, 0.02389029785990715, 0.0432809516787529, 0.0055120643228292465, 0.001624090364202857, 0.020149968564510345, 0.02793997898697853, 0.01295756921172142, 0.06636974960565567, -0.02841806598007679, -0.03366296365857124, 0.013119274750351906, 0.059001583606004715, -0.04735875502228737, 0.06288252770900726, 0.02581670880317688, -0.012535727582871914, 0.004510190337896347, 0.03630650416016579, 0.06794462352991104, 0.04980543628334999, 0.0064014471136033535, -0.02854461781680584, 0.01245838962495327, 0.00017807430413085967, -0.0286430474370718, 0.03821885213255882, -0.03571592643857002, -0.009603927843272686, -0.014131695032119751, -0.024073095992207527, 0.015594079159200191, 0.013955927453935146, 0.06833834946155548, -0.01085539162158966, 0.0550362728536129, -0.024607429280877113, 0.08470579981803894, 0.005983120761811733, -0.04190293699502945, -0.0205155648291111, -0.008387617766857147, -0.014806641265749931, -0.005476910620927811, -0.032734911888837814, -0.0263932254165411, -0.0036489302292466164, 0.044265247881412506, -0.019095364958047867, -0.016929911449551582, -0.048118069767951965, 0.03619401156902313, 0.020853038877248764, -0.035884663462638855, 0.013316134922206402, -0.027236908674240112, -0.01451135240495205, -0.02793997898697853, -0.03082256205379963, 0.022877877578139305, 0.0012707979185506701, 0.014258247800171375, 0.016972094774246216, 0.034956611692905426, 0.015551894903182983, 0.021049898117780685, 0.0036629915703088045, -0.01753455027937889, -0.022793510928750038, 4.3145391828147694e-05, -0.004035618156194687, -0.03194747492671013, 0.046543195843696594, 0.005469880066812038, 0.03540657460689545, 0.034787874668836594, -0.046290088444948196, 0.021851396188139915, -0.06456989049911499, -0.017675165086984634, -0.018701646476984024, 0.06226382777094841, 0.05838288366794586, 0.013400502502918243, 0.030710071325302124, -0.05596432462334633, -0.008436832576990128, 0.02674476057291031, 0.016747113317251205, -0.003193692769855261, 0.01183265820145607, -0.01583312265574932, -0.01683148182928562, 0.03281927853822708, 0.05048038437962532, -0.031188158318400383, -0.02176702953875065, 0.013576270081102848, -0.020304644480347633, -0.03644711896777153, -0.021204574033617973, 0.06074519827961922, 0.009189116768538952, 0.03124440461397171, -0.0032956379000097513, -0.055148765444755554, 0.0237637460231781, 0.020248398184776306, -0.034731630235910416, 0.023004431277513504, 0.05917032063007355, -0.004137563519179821, -0.017703287303447723, -0.029107073321938515, 0.019798435270786285, -0.022484159097075462, 0.003350125625729561, 0.006928748916834593, 0.011755320243537426, 0.0002416801144136116, 0.0035399545449763536, -0.03574404865503311, 0.01549564953893423, 0.028685230761766434, -0.02116238884627819, 0.002146119251847267, 0.028825845569372177, -0.0450245663523674, 0.03504097834229469, -0.00017258156731259078, 0.015903430059552193, 0.02947266958653927, 0.027785303071141243, -0.09145526587963104, 0.02176702953875065, 0.012816955335438251, 0.01037027407437563, -0.022695079445838928, -0.02481834962964058, 0.006056942977011204, -0.019517207518219948, 0.03940000757575035, 0.0008638965082354844, 0.016353394836187363, 0.01936253160238266, -0.013337226584553719, -0.02241385169327259, -0.042943477630615234, 0.039512500166893005, 0.06023898720741272, 0.01295756921172142, -0.01656431518495083, 0.0005831081653013825, 0.013358318246901035, 0.02386217564344406, -0.021007712930440903, 0.039540622383356094, -0.024227771908044815, -0.057876672595739365, -0.04820244014263153, 0.06974448263645172, 0.016929911449551582, 0.06310751289129257, -0.0001834571739891544, -0.004882817156612873, 0.07891251146793365, 0.024044973775744438, 0.011706105433404446, 0.0542769581079483, -0.016015920788049698, -0.039990589022636414, -0.00020652663079090416, -0.014876948669552803, -0.022245116531848907, -0.02353876270353794, 0.010278875008225441, -0.04370279237627983, -0.03785325586795807, -0.07070066034793854, -0.00042381903040222824, -0.019643759354948997, -0.0071923998184502125, -0.02966952882707119, 0.00288609997369349, 0.004102409817278385, 0.029725775122642517, 0.005276536103338003, -0.0136325154453516, -0.03343798220157623, 0.008373556658625603, 0.01460978202521801, -0.0211342666298151, 0.004700019024312496, -0.0008348948904313147, 0.049299225211143494, -0.016690867021679878, -0.025774523615837097, -0.002490623388439417, 0.02944454737007618, -0.03380357846617699, 0.01898287422955036, 0.004608619958162308, -0.03450664505362511, -0.007269737776368856, -0.010813207365572453, -0.0035961999092251062, 0.012388083152472973, -0.040187448263168335, -0.00951955933123827, -0.059226565062999725, -0.038162607699632645, 0.07896875590085983, 0.008675876073539257, -0.015889368951320648, -0.018392296507954597, 0.04100300744175911, -0.016367455944418907, 0.021654536947607994, 0.013723914511501789, -0.020782731473445892, -0.0260135680437088, -0.00713615445420146, 0.047246262431144714, -0.02924768626689911, -0.02844618819653988, 0.014919132925570011, -0.00821888167411089, 0.04238102212548256, 0.03760015219449997, -0.01611435040831566, 0.03442227840423584, -0.02154204621911049, 0.017843902111053467, -0.031103789806365967, -0.032088086009025574, 0.03880942985415459, -0.016142472624778748, -0.015945613384246826, -0.07227553427219391, -0.006007728166878223, 0.018518848344683647, 0.032734911888837814, 0.014152786694467068, -0.04046867415308952, -0.009906248189508915, 0.014497291296720505, 0.004629712086170912, 0.011199895292520523, -0.026547901332378387, 0.011066311970353127, 0.04997417330741882, 0.060126494616270065, -0.020768670365214348, -0.016465885564684868, -0.0021250273566693068, -0.016648683696985245, -0.01279586274176836, -0.01678929664194584, -0.025830769911408424, -0.017590796574950218, -0.018968813121318817, -0.028080591931939125, -0.018125129863619804, -0.01149518508464098, -0.02164047583937645, -0.002720878692343831, -0.03234119340777397, -0.03962499275803566, -0.013133336789906025, -0.013625484891235828, -0.01865946128964424, -0.0017137316754087806, -0.0043766070157289505, -0.008408710360527039, 0.0015898157143965364, 0.04668380692601204, 0.016817420721054077, 0.058551620692014694, -0.029500791803002357, -0.004967185202986002, 0.04572763293981552, 0.017323629930615425, -0.006419023498892784, -0.035012856125831604, 0.002306067617610097, 0.017478305846452713, 0.0477805957198143, -0.01733769103884697, -0.06738217175006866, -0.008401679806411266, -0.04074990376830101, -0.02986638806760311, 0.0022146685514599085, 0.018771953880786896, 0.05031164735555649, -0.013316134922206402, 0.0076634567230939865, 0.0041902936063706875, -0.041115500032901764, 0.06513234972953796, 0.03425354138016701, -0.04434961825609207, 0.03805011510848999, 0.04311221465468407, 0.027757180854678154, -0.02803840860724449, -0.007132639177143574, -0.021331125870347023, -0.04060928896069527, -0.012816955335438251, 0.007276768330484629, -0.027433767914772034, -0.0007628303137607872, 0.03968123719096184, -0.005754623096436262, -0.01018044538795948, 0.011122558265924454, -0.02363719418644905, -0.03549094498157501, -0.007410351652652025, -0.027785303071141243, 0.011164742521941662, 0.04190293699502945, -0.003916096407920122, -0.0012831016210839152, -0.0003882261225953698, 0.0597890205681324, 0.020121846348047256, -0.016423700377345085, -0.025760462507605553, -0.017731409519910812, -0.0038563357666134834, -0.017168954014778137, 0.0005593795794993639, 0.0036454149521887302, -0.010074984282255173, -0.01640963926911354, 0.029950756579637527, -0.015200360678136349, -0.01718301698565483, -0.024930840358138084, 0.025099577382206917, 0.0029370724223554134, -0.005846022162586451, 0.04032805934548378, -0.053095802664756775, -0.006102642510086298, 0.023060675710439682, 0.010953821241855621, -0.014216063544154167, -0.0013604393461719155, 0.006257317494601011, 0.0039653112180531025, -0.07610023021697998, -0.017126770690083504, -0.0012057640124112368, 0.030935054644942284, -0.0029528914019465446, -0.06586354225873947, 0.028080591931939125, -0.008549324236810207, -0.03560343384742737, -0.0015467526391148567, -0.035209715366363525, -0.01482070330530405, 0.001225098385475576, -0.012655248865485191, 0.01030699722468853, -0.023623131215572357, 0.002835127292200923, -0.02919144183397293, 0.0010449369437992573, 0.009561743587255478, 0.006021789275109768, -0.017872024327516556, 0.014152786694467068, -0.00010540548100834712, -0.010454641655087471, 0.03731892257928848, 0.05596432462334633, -0.011502215638756752, 0.030906930565834045, 0.00747362757101655, -0.0327630341053009, 0.01756267435848713, 0.0023007947020232677, -0.0007470112177543342, 0.009210209362208843, -0.017098648473620415, -0.041115500032901764, -0.0008471986511722207, -0.017773594707250595, -0.023257534950971603, 0.004425821825861931, 0.020853038877248764, 0.01348487101495266, -0.0025205037090927362, -0.0001285298785660416, -0.0450245663523674, 0.005687831435352564, 0.021949827671051025, 0.05098659172654152, 0.022202931344509125, 0.01408248022198677, -0.008043114095926285, -0.01621278002858162, -0.029978878796100616, 0.019924987107515335, 0.03279115632176399, -0.009308638982474804, 0.0009166267118416727, -0.03740329295396805, 0.0460369847714901, 0.0057440767996013165, 0.007227553520351648, -0.01183265820145607, 0.007600180339068174, 0.04004683345556259, 0.014862887561321259, 0.01830792799592018, 0.0003078125591855496, 0.006021789275109768, 0.02356688678264618, -0.013604393228888512, -0.01212091650813818, 0.022484159097075462, 0.019292224198579788, 0.01939065381884575, -0.029585160315036774, -0.025521419942378998, 0.060576461255550385, 0.0022129109129309654, 0.029360178858041763, 0.02209044061601162, -0.02831963635981083, -0.03231307119131088, -0.009097717702388763, 0.025704218074679375, 0.04668380692601204, -0.0043379380367696285, 0.015594079159200191, -0.0009579320903867483, 0.03014761582016945, 0.007782978471368551, 0.027827486395835876, 0.012648218311369419, -0.016353394836187363, -0.007874377071857452, 0.009315669536590576, -0.0647948756814003, -0.0015616929158568382, 0.029810141772031784, -0.010792115703225136, 0.013210673816502094, -0.013414564542472363, -0.005374965723603964, -0.01279586274176836, -0.020149968564510345, -0.014497291296720505, -0.0027665779925882816, -0.046796299517154694, 0.0012400386622175574, 0.04569951072335243, -0.051492802798748016, 0.0009043230093084276, -0.027982162311673164, 0.013998111709952354, 0.02966952882707119, -0.012156070210039616, 0.04347781091928482, -1.3518981177185196e-05, 0.0010115411132574081, -0.016353394836187363, 0.006071004085242748, -0.017970453947782516, -0.024227771908044815, 0.011895934119820595, -0.013070059940218925, -0.07728138566017151, 0.024171525612473488, 0.02116238884627819, -0.014553536660969257, 0.016704928129911423, -0.04524954780936241, -0.0312725268304348, -0.026660392060875893, 0.025858892127871513, 0.004049679730087519, -0.0022252146154642105, -0.0352659597992897, -0.02992263436317444, -0.0156362634152174, -0.012444328516721725, -0.019503144547343254, 0.033016137778759, 0.02193576470017433, -0.017520489171147346, -0.002346494235098362, 0.0027261516079306602, -0.03490036353468895, 0.005083191674202681, 0.0023746169172227383, -0.002863250207155943, -0.02584483101963997, 0.03970935940742493, 0.021921703591942787, -0.016198718920350075, 0.018068883568048477, 0.001817434444092214, -0.04620572179555893, -0.010960851795971394, -0.03290364891290665, 0.006612367928028107, -0.029163319617509842, -0.032284945249557495, -0.0034626168198883533, 0.025451112538576126, 0.025662032887339592, 0.013527055270969868, -0.05340515077114105, -0.0069182030856609344, -0.01280992478132248, 0.010482764802873135, 0.035687804222106934, -0.013224735856056213, 0.03279115632176399, 0.02158423140645027, 0.014778519049286842, 0.013611423783004284, -0.03394418954849243, -0.022174809128046036, 0.01482070330530405, -0.010236690752208233, 0.006570183672010899, 0.0017225199844688177, -0.003554015886038542, 0.04167795553803444, 0.02681506611406803, -0.044996440410614014, 0.012606034055352211, 0.0007320709992200136, 0.042943477630615234, 0.02369343861937523, -0.01730956882238388, -0.0033044260926544666, -0.01711270958185196, -0.016676805913448334, 0.012627126649022102, -0.033634841442108154, -0.03104754537343979, -0.009512528777122498, 0.019629698246717453, 0.013351287692785263, -0.003898519789800048, -0.0066756438463926315, -0.0029933180194348097, -0.01718301698565483, 0.01903911866247654, -0.042015425860881805, -0.044462110847234726, 0.020768670365214348, 0.004119986668229103, 0.029360178858041763, -0.01593155227601528, 0.0050620995461940765, -0.010103107430040836, 0.022681018337607384, 0.01059525553137064, 0.05067724362015724, -0.004000464919954538, 0.014398861676454544, 0.01615653559565544, 0.0010256024543195963, -0.0337754525244236, 0.0049144551157951355, 0.027377523481845856, 0.062151335179805756, -0.00747362757101655, -0.017323629930615425, 0.014054357074201107, -0.02273726463317871, -0.0036454149521887302, 0.004555889870971441, 0.0038352436386048794, -0.017393937334418297, -0.002669906010851264, -0.04010307788848877, -0.05531750246882439, -0.009723450057208538, 0.027855610474944115, -0.002471288898959756, -0.03324112296104431, 0.012528697028756142, -0.02176702953875065, -0.017295507714152336, 0.0003060548915527761, 0.01631120964884758, -0.023102860897779465, -0.06445740163326263, -0.023749684914946556, -0.013027875684201717, -0.04550265148282051, -0.023946544155478477, 0.015537833794951439, 0.008338402956724167, 0.0031005360651761293, 0.057876672595739365, -0.03487224131822586, 0.019320346415042877, 0.006014758720993996, -0.02706817165017128, 0.003750875359401107, 0.0010572406463325024, -0.019179733470082283, 0.027700934559106827, 0.029528914019465446, 0.007097485475242138, 0.024410570040345192, -0.01656431518495083, 0.017168954014778137, -0.03456289321184158, -0.03537845239043236, -0.028108714148402214, -0.005754623096436262, 0.02941642329096794, -0.019320346415042877, -0.031385019421577454, -3.257188654970378e-05, -0.005055068992078304, -0.0021900611463934183, 0.009062564931809902, 0.032988015562295914, -0.0075439345091581345, -0.00928051583468914, -0.04058116674423218, -0.0018859836272895336, -0.0017383390804752707, 0.008830551989376545, 0.017604857683181763, -0.008907889015972614, 0.0290227048099041, 0.04094676300883293, 0.03175061568617821, -0.04229665547609329, -0.0227653868496418, -0.008457925170660019, 0.009871094487607479, 0.0034977702889591455, -0.016803359612822533, -0.018898505717515945, 0.004179747775197029, -0.01020856760442257, -0.026983803138136864, -0.024649612605571747, -0.02771499566733837, 0.03124440461397171, 0.0031550240237265825, 0.0029687106143683195, 0.012964599765837193, 0.04007495567202568, -0.029838265851140022, -0.016578376293182373, -0.005568309687077999, 0.006042881403118372, -0.039315640926361084, 0.039962463080883026, -0.0002139967546099797, 0.0078181317076087, 0.0041902936063706875, -0.046740055084228516, 0.012036547996103764, -0.011825627647340298, 0.032931771129369736, 0.049242980778217316, 0.030007002875208855, 0.013280981220304966, -0.003691114252433181, -0.021752966567873955, 0.009892186149954796, 0.012591972947120667, 0.041284237056970596, 0.03214433416724205, -0.01290835440158844, -0.011502215638756752, -0.017492366954684258, 0.0017989788902923465, 0.011959210969507694, -0.00839464832097292, -0.013815313577651978, 0.026182305067777634, -0.0026154182851314545, -0.009477376006543636, 0.010412457399070263, 0.020276522263884544, -0.009449252858757973, -0.012451359070837498, -0.020796792581677437, -0.018406357616186142, -0.008563385345041752, 0.020192153751850128, -0.004735172260552645, -0.024326201528310776, 0.011228018440306187, -0.0075861187651753426, 0.022793510928750038, 0.0028720383998006582, 0.009097717702388763, 0.003559288801625371, 0.02841806598007679, 0.02398872748017311, 0.006760012358427048, -0.0005092858918942511, -0.024199649691581726, -0.024298079311847687, 0.0015783908311277628, 0.015945613384246826, 0.019896864891052246, 0.005547217559069395, -0.02148580178618431, 0.014019204303622246, -0.011790473945438862, 0.030428843572735786, -0.0017251565586775541, 0.003191935131326318, -0.08223100006580353, -0.030850686132907867, 0.0053257509134709835, 0.006837349850684404, -0.03335361182689667, -0.02045932039618492, 0.01576281525194645, 0.037234555929899216, -0.003877427661791444, -0.004295754246413708, 0.00011732470738934353, -0.011312386952340603, -0.015003501437604427, -0.028361819684505463, 0.026252610608935356, -0.0053046587854623795, -0.0034678897354751825, -0.0006011243676766753, -0.004418791271746159, 0.004942577797919512, -0.043337199836969376, -0.030428843572735786, 0.014680089429020882, -0.013688761740922928, -0.0156362634152174, -0.02344033308327198, -0.013520024716854095, 5.500968836713582e-05, 0.029528914019465446, 0.0006169434054754674, 0.016240904107689857, -0.004109440837055445, -0.010672593489289284, 0.014680089429020882, -0.04342156648635864, -0.006974448449909687, -0.004028587602078915, -0.009013350121676922, -0.00474571855738759, -0.022034194320440292, -0.05498002842068672, -0.0036278381012380123, 0.00041019704076461494, 0.006665098015218973, -0.030935054644942284, -0.020220275968313217, -0.030456965789198875, -0.009449252858757973, 0.015565956942737103, -0.008739152923226357, -0.023679377511143684, 0.015875307843089104, 0.009871094487607479, 0.029557038098573685, 0.011080374009907246, -0.007403320632874966, 0.024551182985305786, 0.010264812968671322, 0.017225200310349464, 0.030288230627775192, -0.0377688892185688, -0.01319661270827055, 0.04235289990901947, 0.06951950490474701, 0.005026946309953928, 0.02799622341990471, -0.02561984956264496, -0.010391365736722946, -0.05849537253379822, -0.019728127866983414, 0.03197559714317322, 0.021556107327342033, 0.017000218853354454, -0.025999506935477257, 0.023482518270611763, 0.0045629204250872135, -0.011073343455791473, 0.02453712187707424, -0.0005418028449639678, 0.009892186149954796, -0.015130053274333477, 0.014694150537252426, -0.0296414066106081, 0.03686895966529846, -0.0017515216022729874, 0.05410822108387947, -0.014314493164420128, 0.009160994552075863, 0.005719469394534826, 0.03144126385450363, -0.01593155227601528, -0.006475269328802824, -0.018406357616186142, -0.06113891676068306, 0.04980543628334999, -0.005708923563361168, 0.013836406171321869, -0.011551430448889732, -0.010482764802873135, 0.010510887950658798, 0.006127249915152788, 0.020051538944244385, -0.023595008999109268, 0.014919132925570011, 0.006907656788825989, -0.01678929664194584, -0.019868740811944008, 0.0038739123847335577, 0.011776412837207317, 0.01353408582508564, -0.0014122906140983105, -0.011635798960924149, -7.86009622970596e-05, -0.007501750718802214, 0.016465885564684868, 0.030231984332203865, -0.0003910823434125632, 0.011966241523623466, 0.0070482706651091576, -0.028882091864943504, 0.001054604072123766, -0.006946325767785311, -0.021471738815307617, 0.04910236597061157, 0.0032675149850547314, 0.01695803366601467, 0.02308879978954792, -0.002710332628339529, 0.010904606431722641, -0.03141314163804054, -0.031834982335567474, 0.017014279961586, -0.022877877578139305, -0.04035618528723717, -0.043393444269895554, 0.01933440938591957, 0.017253322526812553, 0.033156752586364746, 0.002133815549314022, -0.012606034055352211, -0.00032209366327151656, 0.015945613384246826, 0.013843436725437641, 0.012247469276189804, -0.016817420721054077, 0.046093229204416275, 0.03450664505362511, 0.007593149784952402, 0.003075928660109639, 0.03101942129433155, 0.010131229646503925, -0.010827268473803997, 0.0004600710526574403, 0.01846260204911232, -0.009871094487607479, -0.00016939578927122056, 0.004119986668229103, 0.028375880792737007, 0.02941642329096794, 0.0066756438463926315, 0.012036547996103764, -0.05666739493608475, 0.017520489171147346, 0.0009535378776490688, 0.01996717043220997, -0.012613065540790558, -0.010314027778804302, -0.01539721991866827, 0.0034098864998668432, 0.01598779857158661, -0.005357388872653246, -0.00821888167411089, -0.0062362258322536945, -0.0027384553104639053, 0.006907656788825989, 0.041115500032901764, -0.03490036353468895, -0.02876959927380085, 0.007403320632874966, 0.0005659708986058831, -0.016972094774246216, 0.013618454337120056, -0.026336979120969772, -0.0010352696990594268, -0.021626414731144905, 0.018476663157343864, -0.044715214520692825, -0.02594326063990593, -0.013815313577651978, 9.299191151512787e-05, -0.006222164258360863, 0.01529879029840231, 0.009610958397388458, -5.599837822956033e-05, -0.019826557487249374, -0.016901789233088493, 0.0022181840613484383, -0.009976554661989212, 0.027630627155303955, -0.015130053274333477, 0.01708458736538887, -0.02947266958653927, 0.01217013131827116, -0.0013692276552319527, 0.012823985889554024, -0.0005092858918942511, 0.013372380286455154, 0.010581194423139095, 0.005782745778560638, -0.014483229257166386, 0.012627126649022102, 0.0007641485426574945, 0.033634841442108154, -0.0007166913710534573, 0.016648683696985245, -0.010440580546855927, -0.004759779665619135, -0.005884690675884485, 0.015467527322471142, -0.010925698094069958, -0.0205155648291111, 0.048146191984415054, 0.01830792799592018, 0.017450181767344475, 0.013428625650703907, -0.015031623654067516, -0.024649612605571747, 0.0008225911878980696, -0.0024765620473772287, -0.005181621294468641, -0.015903430059552193, 0.00671782810240984, 0.0052062286995351315, 0.01377312932163477, 0.002154907677322626, -0.0008072115597315133, -0.03357859328389168, 0.0043976991437375546, -0.013098183088004589, -0.01070774719119072, 0.00532926619052887, 0.004067256581038237, -0.019053181633353233, 0.008626661263406277, -0.014891009777784348, -0.011776412837207317, -0.009793756529688835, -0.0017321872292086482, 0.014891009777784348, -0.020121846348047256, -0.026111997663974762, -0.022554466500878334, 0.0051394375041127205, -0.012395113706588745, 0.0014975378289818764, 0.0013885620282962918, -0.028347758576273918, 0.008211850188672543, 0.04741499945521355, -0.01598779857158661, 0.018518848344683647, 0.001421957858838141, -0.026449471712112427, 0.0237637460231781, 0.008134513162076473, -0.03625025972723961, -0.000981660676188767, -0.013330196030437946, 0.04620572179555893, 0.0009675992769189179, -0.017225200310349464, -0.003740329295396805, -0.022695079445838928, -0.0057440767996013165, -0.0030987784266471863, 0.00865478441119194, -0.006042881403118372, -0.014110603369772434, -0.009892186149954796, -0.005737046245485544, -0.014244185760617256, -0.007860315963625908, 0.006781104486435652, -0.04344968870282173, -0.013372380286455154, -0.03968123719096184, -0.010925698094069958, -0.005768684670329094, 0.00021201936760917306, 7.9205165093299e-05, 0.02058587223291397, 0.03262241929769516, 0.04454647749662399, 0.0012751921312883496, 0.023960605263710022, -0.008767275139689445, 0.013351287692785263, 0.013224735856056213, 0.005610493943095207, -0.033859822899103165, -0.002720878692343831, -0.021021775901317596, -0.010918667539954185, 0.0014861129457131028, 0.020473381504416466, -0.045783881098032, 0.0061377957463264465, 0.005543702282011509, -0.026083875447511673, 0.00671782810240984, 0.02176702953875065, 0.01284507755190134, -0.012725556269288063, -0.022259177640080452, -0.019151611253619194, 0.01176938135176897, -0.031610000878572464, 0.012106855399906635, 0.009983585216104984, 0.004186778329312801, -0.005874144844710827, -0.0005848658620379865, -0.029107073321938515, 0.009899217635393143, -0.05180215463042259, 0.01252166647464037, -0.006868988275527954, 0.0038809431716799736, -0.004861725028604269, 0.007825162261724472, -0.004932031966745853, 0.013252858072519302, 0.016620561480522156, 0.008577446453273296, -0.0034995279274880886, 0.0025978414341807365, -0.0005084070726297796, 0.00807826779782772, 0.024396508932113647, -0.0034204325638711452, 0.011410816572606564, -0.022006072103977203, 0.025324560701847076, 0.0015836638631299138, 0.020445257425308228, -0.027630627155303955, 0.0025310497730970383, -0.008486047387123108, -0.03467538207769394, 0.015326913446187973, 0.001086242264136672, -0.00047545068082399666, -0.011551430448889732, -0.008071236312389374, -0.024382447823882103, -0.0015757542569190264, -0.012184192426502705, 0.01775953359901905, 0.011860780417919159, -0.005962028633803129, -0.03917502611875534, 0.007895469665527344, 0.017014279961586, -0.0016680321423336864, 0.025760462507605553, -0.009484406560659409, -0.03580029308795929, 0.0011064554564654827, 0.0005026946309953928, 0.012142008170485497, -0.032931771129369736, -0.01549564953893423, -0.009596897289156914, -0.00019773826352320611, 0.012205285020172596, -0.002448439132422209, 0.0010959093924611807, 0.03461913764476776, 0.0215139240026474, -0.02081085368990898, 1.4088851457927376e-05, 0.010749931447207928, 0.020107785239815712, 0.008043114095926285, 0.026801005005836487, -0.023370027542114258, 0.01978437229990959, -0.004067256581038237, 0.02816496044397354, -0.014905070886015892, -0.039259396493434906, -0.00011545718007255346, -0.03616588935256004, -0.00642253877595067, -0.027658751234412193, -0.037290800362825394, 0.006686190143227577, -0.0021355734206736088, 0.006724858656525612, -0.0052870819345116615, 0.012767740525305271, -0.03056945838034153, -0.025212068110704422, -0.0009043230093084276, 0.0013015571748837829, -0.015369096770882607, -0.023355966433882713, -0.00802905298769474, -0.01576281525194645, -0.0017567946342751384, 0.027560319751501083, -0.030681949108839035, 0.006485815159976482, -0.008950073271989822, -0.02816496044397354, 0.017028341069817543, 0.03194747492671013, 0.02924768626689911, 0.024452753365039825, 0.0026962710544466972, -7.816154538886622e-05, 0.015256606042385101, -0.04046867415308952, 0.004468006081879139, 0.014455107040703297, -0.0029511337634176016, 0.008647753857076168, -0.008324341848492622, 0.051099084317684174, -0.023552825674414635, -0.03796574845910072, -0.049242980778217316, 0.015003501437604427, 0.0068408651277422905, 0.030935054644942284, 0.014525413513183594, -0.01791420765221119, -0.014876948669552803, 0.004608619958162308, -0.030288230627775192, 0.009857033379375935, -0.04645882546901703, -0.00642253877595067, 0.01683148182928562, -0.016353394836187363, 0.022006072103977203, -0.005582371260970831, -0.009885155595839024, 0.019826557487249374, 0.042212288826704025, -0.007347075268626213, 0.013857497833669186, 0.035856541246175766, -0.018125129863619804, 0.003063624957576394, 0.02944454737007618, -0.00610967306420207, -0.044687092304229736, 0.004886332433670759, 0.006995540577918291, 0.013512994162738323, 0.021373309195041656, 0.0038317283615469933, -0.05416446551680565, -0.006601821631193161, 0.015565956942737103, -0.01266931090503931, 0.033381734043359756, 0.007853285409510136, 0.014194970950484276, -0.005719469394534826, -0.005399573128670454, -0.012922415509819984, 0.050845980644226074, -0.04921485856175423, 0.006141311023384333, -0.016901789233088493, -0.0201359074562788, 0.010623378679156303, -4.122293830732815e-05, 0.011586584150791168, 0.021078020334243774, -0.006580729503184557, -0.03844383358955383, -0.0007878771284595132, 0.02992263436317444, 0.017604857683181763, -7.73925639805384e-05, -0.024930840358138084, -0.01653619296848774, 0.00807826779782772, 0.009139901958405972, 0.024002788588404655, 0.03605340048670769, 0.015889368951320648, 0.026801005005836487, 0.001059877104125917, -0.0006683553801849484, -0.044293373823165894, 0.0037051758263260126, 0.008471986278891563, -0.015945613384246826, 0.05320829153060913, -0.026196366176009178, -0.005789776332676411, -0.026210427284240723, 0.002522261580452323, -5.503715146915056e-05, 0.00899225752800703, -0.026055751368403435, 0.0029370724223554134, -0.005673769861459732, 0.04370279237627983, 0.02588701620697975, -0.009660173207521439, 0.024354323744773865, -0.05213962867856026, -0.02254040539264679, 0.018195435404777527, -0.021218635141849518, -0.002724393969401717, 0.028432127088308334, 0.01020856760442257, -0.024776166304945946, -0.0012874958338215947, 0.01566438563168049, 0.022399790585041046, -0.0071045164950191975, -0.012261530384421349, -0.021443616598844528, -0.011270202696323395, 0.0019105911487713456, 0.02424183301627636, 0.01718301698565483, 0.013955927453935146, 0.0025802648160606623, 0.002348251873627305, 0.011488153599202633, -0.008732122369110584, 0.016592437401413918, -0.02732127718627453, -0.016690867021679878, -0.039512500166893005, -0.0019088333938270807, -0.014497291296720505, 0.015903430059552193, 0.02093740738928318, -0.004239508416503668, 0.015214421786367893, 0.020332766696810722, -0.022343546152114868, 0.02006560005247593, 0.012767740525305271, -0.001448323018848896, -0.011087404564023018, -0.002351767150685191, -0.015214421786367893, -0.0058038379065692425, -0.006513937842100859, 0.02584483101963997, 0.007452535443007946, 0.011213957332074642, 0.018701646476984024, 0.02691349759697914, -0.0003888852661475539, -0.0069006262347102165, 0.015369096770882607, -0.010574163869023323, -0.0019932016730308533, -0.014834764413535595, 0.004932031966745853, -0.005332781467586756, -0.007101000752300024, -0.0012127946829423308, -0.023876236751675606, -0.017590796574950218, 0.018926627933979034, 0.03785325586795807, 0.00958283618092537, -0.006120219361037016, -0.025071455165743828, -0.021823273971676826, 0.011959210969507694, 0.08296219259500504, -0.024354323744773865, -0.010503856465220451, -0.024129342287778854, -0.018392296507954597, 0.04148109629750252, -0.0016653956845402718, -0.02341221086680889, -0.011129588820040226, 0.019700003787875175, -0.02353876270353794, 0.004081317689269781, 0.0014456864446401596, -0.013737976551055908, -0.01881413720548153, 0.005888206418603659, 0.02793997898697853, -0.006833834573626518, -0.0056386166252195835, -0.002733182394877076, -0.015101931057870388, 0.0038387589156627655, 0.03307238593697548, -0.0027472437359392643, 0.02549329586327076, -0.014581659808754921, -0.006584244780242443, 0.021429555490612984, -0.006802196614444256, 0.03312863036990166, 0.010813207365572453], "index": 2}, {"title": "The 80s: A Look Back at the Tumultuous Decade 1980-1989", "text": "The 80s: A Look Back at the Tumultuous Decade 1980-1989 is a humor book published in 1979.It was edited by Tony Hendra, Christopher Cerf and Peter Elbling, with art direction by Michael Gross. Contributors to the book included Henry Beard, Valerie Curtin, Amy Ephron, Jeff Greenfield, Abbie Hoffman, Sean Kelly, B.", "vector": [-0.00752367964014411, -0.0036515758838504553, -0.04269421845674515, -0.051015473902225494, -0.01003402378410101, -0.06568793952465057, -0.009151911363005638, 0.026492761448025703, -0.03531388193368912, 0.05613172426819801, 0.01989162340760231, 0.009004892781376839, 0.009732634760439396, 0.048427946865558624, -0.021861674264073372, -0.04534055292606354, -0.03152079880237579, -0.0022604118566960096, 0.02966836467385292, 0.01473862025886774, 0.02199399098753929, 0.004836913663893938, -0.07174510508775711, -0.018553754314780235, -0.012084933929145336, 0.012423076666891575, 0.019303549081087112, 0.026816202327609062, -0.009887004271149635, 0.04525234177708626, 0.008291852660477161, 0.00430029584094882, 0.04181210696697235, -0.007240668870508671, -0.03649003058671951, 0.015951523557305336, -0.026875009760260582, 0.06004241853952408, -0.00876966305077076, -0.04772225767374039, 0.030491668730974197, -0.01959758624434471, -0.009129858575761318, -0.01708356849849224, -0.010945538990199566, -0.027786526829004288, -0.02728666178882122, -0.02240564301609993, 0.00441055977717042, -0.013841806910932064, 0.013937368988990784, -0.021846972405910492, 0.011798246763646603, -0.010600045323371887, -0.01692184805870056, -0.016598407179117203, 0.03290277719497681, 0.008262448944151402, -0.0019094047602266073, -0.06509985774755478, 0.005807236768305302, -0.012974396347999573, 0.029242010787129402, -0.012621551752090454, 0.05033918842673302, 0.02434629015624523, -0.023287754505872726, 0.04657550901174545, -0.0026977923698723316, 0.02516959421336651, 0.025845879688858986, 0.00739503838121891, 0.05172116309404373, 0.03507865220308304, 0.05889567360281944, -0.0013718678383156657, -0.016730723902583122, 0.035990167409181595, -0.07309767603874207, -0.03402011841535568, -0.008938734419643879, -0.03748975694179535, -0.009600318036973476, -0.016098542138934135, -0.036107782274484634, -0.009365088306367397, 0.027742421254515648, -0.07192152738571167, 0.0064541189931333065, 0.050809647887945175, 0.0504273995757103, -0.011445402167737484, 0.023537686094641685, -0.013805052265524864, 0.02250855602324009, -0.02512548863887787, 0.009695880115032196, 0.045722801238298416, 0.019171232357621193, -0.040459536015987396, 0.02480204775929451, 0.018318524584174156, -0.018303822726011276, -0.014415179379284382, 0.03431415557861328, -0.02744838409125805, -0.04869258031249046, 0.020464997738599777, 0.03940099850296974, 0.046310875564813614, -0.0014692676486447453, -0.041077014058828354, -0.015628082677721977, 0.007747883442789316, -0.019303549081087112, 0.023199543356895447, 0.028683340176939964, 0.004006258212029934, -0.028154073283076286, 0.0345199815928936, 0.0016355825355276465, -0.019038915634155273, 0.025346016511321068, 0.0859765112400055, 0.01470921654254198, 0.01709827035665512, -0.020641420036554337, -0.02743368223309517, -0.015789803117513657, -0.009717932902276516, -0.025934090837836266, 0.020714929327368736, 0.03657824173569679, 0.04763404652476311, 0.005255917087197304, 0.008387414738535881, 0.006009387783706188, -0.030462265014648438, 0.03210887312889099, -0.021832270547747612, -0.0014113790821284056, 0.06268875300884247, 0.06509985774755478, -0.015936821699142456, -0.03534328565001488, -0.0394304022192955, -0.005741078406572342, 0.06198306754231453, -0.020729631185531616, -0.008380063809454441, -0.025875283405184746, -0.008402116596698761, 0.03757796809077263, 0.0012165793450549245, -0.027757123112678528, -0.003335485700517893, -0.027727719396352768, -0.0016962277004495263, -0.00213177059777081, 0.007214940618723631, -0.03696049004793167, 0.008203641511499882, -0.026345742866396904, -0.010526536032557487, 0.025566544383764267, -0.05769012123346329, 0.0026996301021426916, 0.007192887831479311, 0.00843887124210596, 0.0298300851136446, 0.03963622823357582, -0.0027676261961460114, -0.004844264592975378, 0.004612710326910019, -0.00020525182480923831, 0.04948648065328598, 0.009784091264009476, 0.021523531526327133, 0.024213973432779312, -0.015775101259350777, -0.00216117431409657, 0.03210887312889099, -0.013812403194606304, -0.03002120926976204, -0.02469913475215435, -0.02758070081472397, 0.02246445044875145, 0.02469913475215435, 0.02733076922595501, -0.038254253566265106, 0.020553208887577057, 0.0038482132367789745, -0.000869247829541564, 0.0450759194791317, 0.001313060405664146, -0.0033998063299804926, -0.030491668730974197, -0.00868145190179348, -0.0657467469573021, -0.04728119820356369, -0.021214792504906654, 0.00747957406565547, 0.03443177044391632, -0.020729631185531616, 0.01490769162774086, 0.051015473902225494, -0.023552387952804565, 0.005402935668826103, -0.032961584627628326, -0.003239923622459173, 0.04413500055670738, -0.04731060564517975, -0.013327240943908691, 0.01971520110964775, -0.061042144894599915, 0.009835547767579556, 0.018936002627015114, 0.012121688574552536, 0.05971897765994072, 0.00745384581387043, 0.018744878470897675, -0.007615566253662109, -0.007211265154182911, 0.018612561747431755, -0.05613172426819801, -0.010247200727462769, -0.023611195385456085, 0.028198178857564926, 0.0016704994486644864, -0.033049795776605606, -0.0006684754625894129, 0.023978743702173233, -0.047869276255369186, 0.004109171684831381, 0.025522438809275627, 0.06939280778169632, -0.03469640389084816, -0.0067224279046058655, 0.004822211805731058, 0.06245352700352669, 0.060806915163993835, -0.003012044820934534, -0.04181210696697235, -0.014598952606320381, 0.06480582058429718, -0.013731542974710464, -0.005252241622656584, -0.02489025890827179, -0.036107782274484634, -0.014135844074189663, 0.01975930668413639, 0.009225420653820038, 0.03003591112792492, 0.008343309164047241, 0.0355491116642952, 0.020803140476346016, 0.018200909718871117, 0.009784091264009476, -0.02208220213651657, 0.018245015293359756, -0.0009482703171670437, 0.013158169575035572, -0.00215749884955585, 0.008181587792932987, -0.011915862560272217, 0.012974396347999573, -0.008431520313024521, -0.04207674041390419, -0.010306008160114288, -0.08938734233379364, -0.021846972405910492, -0.043517522513866425, 0.023273052647709846, 0.016010330989956856, 0.012540691532194614, 0.038842327892780304, 0.003412670688703656, 0.03234410285949707, -0.0038004321977496147, 0.02218511514365673, 0.0449289008975029, -0.014466635882854462, -0.028859762474894524, -0.03257933259010315, -0.006773884408175945, 0.028256986290216446, 0.00015184270159807056, -0.053132541477680206, -0.0299771036952734, -0.0035486628767102957, 0.00876231212168932, 0.02212630771100521, 0.01470186561346054, 0.04207674041390419, 0.0038114585913717747, -0.0016686617163941264, 0.020920755341649055, -0.0022530609276145697, -0.057954754680395126, 0.018392033874988556, 0.07121583819389343, 0.043664541095495224, -0.05195639282464981, 0.014540145173668861, -0.04469367116689682, 0.009982566349208355, 0.0008504110155627131, 0.05016276612877846, -0.028359899297356606, -0.03763677552342415, -0.031167956069111824, 0.015378151088953018, -0.028359899297356606, -0.0501333624124527, 0.04201793298125267, -0.009945811703801155, 0.0589250773191452, -0.02446390502154827, -0.0009932947577908635, -0.029183203354477882, 0.05713145062327385, -0.030991533771157265, -0.061277374625205994, 0.006233591120690107, 0.011121961288154125, -0.019141828641295433, 0.06001301482319832, -0.007211265154182911, -0.025787072256207466, 0.015289939939975739, -0.05283850431442261, 0.046399086713790894, -0.043546926230192184, 0.04745762422680855, 0.0009602155769243836, 0.0037857303395867348, -0.055631861090660095, -0.0025029927492141724, -0.023170139640569687, 0.010283955372869968, 0.024228675290942192, 0.04654610529541969, 0.002914644777774811, 0.033049795776605606, 0.015348747372627258, -0.08774073421955109, -0.014194651506841183, 0.01978871040046215, -0.007997814565896988, -0.026081109419465065, 0.0007677130633965135, -0.02743368223309517, 0.005252241622656584, -0.017906872555613518, 0.011408647522330284, 0.02511078678071499, 0.021685251966118813, -0.050868455320596695, 0.04869258031249046, 0.03010942041873932, 0.009938460774719715, -0.046193260699510574, 0.020582612603902817, 0.031285569071769714, -0.021023668348789215, -0.0392833836376667, -0.05771952494978905, -0.03425534814596176, -0.033079199492931366, -0.016363175585865974, 0.015319343656301498, -0.036254800856113434, -0.07356813549995422, -0.019009511917829514, 0.020670823752880096, 0.0346670001745224, -0.004917773883789778, -0.0174070093780756, 0.005391909275203943, 0.014518092386424541, -0.027668911963701248, -0.003482504514977336, 0.03269694745540619, 0.01485623512417078, -0.014326968230307102, -0.01743641309440136, -0.04145926237106323, 0.041106417775154114, 0.002403754973784089, -0.019303549081087112, 0.004671517759561539, -0.021200090646743774, -0.08174237608909607, -0.021802866831421852, -0.041106417775154114, -0.018803685903549194, -0.012621551752090454, 0.06280636787414551, 0.022979015484452248, 0.030932726338505745, -0.006689348723739386, 0.033432044088840485, 0.012136390432715416, -0.0012689548311755061, 0.00747222313657403, 0.020523805171251297, -0.00426354119554162, -0.035813745111227036, 0.0177745558321476, 0.0449289008975029, -0.014143195003271103, -0.002001291373744607, -0.017950978130102158, 0.005138302221894264, 0.009460650384426117, 0.06221829727292061, -0.022831996902823448, 0.025772370398044586, 0.048604369163513184, 0.00742811756208539, 0.012136390432715416, 0.03710750862956047, 0.026669183745980263, -0.03413773328065872, -0.023361263796687126, 0.018818387761712074, -0.010725011117756367, -0.03707810491323471, 0.022846698760986328, -0.01483418233692646, 0.002881565596908331, -0.001524399733170867, -0.012871483340859413, -0.023919936269521713, 0.011687982827425003, -0.04201793298125267, -0.02280259318649769, 0.018142102286219597, 0.03513745963573456, 0.03531388193368912, 0.022920208051800728, -0.004020960070192814, -0.04010669142007828, 0.021464724093675613, -0.02499317191541195, 0.0012367944000288844, -0.04275302588939667, 0.001747684320434928, 0.0201562587171793, -0.0401654988527298, -0.006321802269667387, -0.02762480638921261, -0.009372439235448837, 0.045840416103601456, 0.02719845063984394, 0.02439039573073387, 0.009857600554823875, -0.04698716104030609, 0.016466090455651283, -0.009600318036973476, -0.004542876500636339, 0.03969503566622734, 0.016569003462791443, -0.04904542490839958, -0.04672252759337425, -0.05630814656615257, 0.005292671732604504, 0.023390667513012886, -0.028551023453474045, 0.020935457199811935, -0.000878436490893364, 0.012989098206162453, -0.07386217266321182, 0.0496923066675663, 0.05627874284982681, -0.050545014441013336, 0.004495095461606979, 0.0005517794052138925, -0.05621993541717529, -0.020450295880436897, 0.02194988541305065, -0.009997268207371235, -0.009504755958914757, -0.04137105122208595, 0.010695607401430607, -0.005979984067380428, -0.010658852756023407, -0.025992898270487785, 0.000879814790096134, 0.025360718369483948, 0.02468443289399147, 0.03193245083093643, -0.03178543224930763, -0.009960513561964035, -0.0022457099985331297, 0.015422256663441658, -0.0017044974956661463, 0.017892170697450638, 0.031461991369724274, -0.03431415557861328, -0.013319890014827251, 0.02969776839017868, 0.001487645087763667, 0.03816604241728783, -0.0014012715546414256, -0.07786107808351517, -0.0067297788336873055, -0.03781319782137871, -0.005281645338982344, 0.00846827495843172, 0.002598554827272892, 0.043370503932237625, -0.010827924124896526, 0.002442347351461649, -0.018230313435196877, -0.01723058708012104, -0.0026830905117094517, -0.018950704485177994, 0.009276877157390118, -0.055426035076379776, 0.04669312387704849, -0.007659671828150749, 0.04869258031249046, 0.02489025890827179, -0.005998361390084028, 0.012217250652611256, 0.011166066862642765, 0.01495914813131094, -0.018524350598454475, -0.0015685053076595068, 0.015422256663441658, 0.007828743197023869, 0.024125762283802032, -0.01512821950018406, -0.0017927087610587478, 0.00868880283087492, 0.03193245083093643, 0.04992753639817238, 0.03725452721118927, -0.06404132395982742, -0.02458151988685131, -0.027933545410633087, -0.05669039487838745, -0.03152079880237579, -0.016304368153214455, -0.032961584627628326, 0.004156952723860741, 0.011754141189157963, -0.03000650741159916, -0.020435594022274017, -0.005230188835412264, 0.007821392267942429, -0.010467728599905968, 0.023670004680752754, -0.029344923794269562, -0.013452206738293171, 0.0010034022852778435, 0.016260262578725815, 0.026860307902097702, 0.009526808746159077, 0.029065588489174843, 0.026904413476586342, -0.028830358758568764, 0.04513472691178322, -0.03269694745540619, -0.04266481474041939, 0.011276330798864365, 0.02202339470386505, -0.04751643165946007, 0.026213426142930984, 0.038695309311151505, 0.02506668120622635, 0.009012243710458279, -0.03487282618880272, -0.04442903771996498, 0.04407619312405586, -0.008960787206888199, -0.03796021640300751, -0.01354776881635189, -0.03381429240107536, 0.010519185103476048, -0.030815109610557556, 0.021288301795721054, 0.004171654582023621, 0.005616112612187862, 0.06592316925525665, -0.019332952797412872, -0.012989098206162453, -0.011041101068258286, 0.038930539041757584, -0.02750719152390957, -0.01701005920767784, -0.014010878279805183, -0.004024635534733534, 0.01978871040046215, -0.0169659536331892, -0.018245015293359756, -0.020553208887577057, 0.034225944429636, -0.005527901463210583, -0.00040315272053703666, -0.006505575496703386, 0.004498770926147699, -0.0016181240789592266, -0.00875496119260788, -0.008909330703318119, 0.016025032848119736, -0.018788984045386314, 0.019347654655575752, -0.02242034487426281, -0.012790623120963573, 0.011665930040180683, -0.03810723498463631, 0.016421984881162643, -0.026360444724559784, -0.06262994557619095, -0.02940373122692108, 0.02003864385187626, 0.03178543224930763, 0.025728264823555946, -0.011511560529470444, 0.026816202327609062, 0.018318524584174156, 0.01958288438618183, 0.016789531335234642, 0.005351479165256023, -0.031256165355443954, 0.046252068132162094, -0.011386594735085964, -0.02477264404296875, -0.002390890847891569, 0.018788984045386314, -0.035725533962249756, 0.01699535734951496, 0.031050341203808784, 0.0007782800239510834, 0.006079221609979868, -0.02949194237589836, -0.023258350789546967, -0.0003533042035996914, -0.0004654059302993119, -0.0005242134211584926, -0.05989539995789528, 0.05039799585938454, -0.027771824970841408, -0.038607098162174225, 0.0438997708261013, 0.029300818219780922, -0.004954528529196978, 0.021655848249793053, -0.016657214611768723, 0.002558124717324972, 0.020391488447785378, 0.009431246668100357, 0.0014720242470502853, -0.016583705320954323, -0.0031020937021821737, 0.0147680239751935, 0.0050537665374577045, 0.01497384998947382, -0.014407828450202942, -0.03254992887377739, -0.0014527280582115054, -0.028521619737148285, 0.025243103504180908, -0.009379790164530277, -0.003679141867905855, 0.02209690399467945, 0.026683885604143143, 0.02240564301609993, -0.026272233575582504, 0.031109148636460304, -0.033667273819446564, 0.002379864454269409, -0.01004137471318245, -0.014275511726737022, 0.003973179031163454, 0.03428475186228752, -0.015745697543025017, -0.02711023949086666, -0.00869615375995636, 0.02981538325548172, -0.06198306754231453, 0.03290277719497681, -0.03937159478664398, -0.0016365014016628265, 0.009629721753299236, -0.00746119674295187, 0.004050363786518574, 0.002039883751422167, -0.03787200525403023, -0.025287209078669548, -0.040430132299661636, 0.020656121894717216, 0.02981538325548172, -0.053838230669498444, -0.018450841307640076, -0.033373236656188965, -0.02489025890827179, 0.02002394199371338, 0.005101547576487064, 0.006255643907934427, -0.014326968230307102, 0.053808826953172684, -0.006553356535732746, 0.028036458417773247, -0.009710581973195076, -0.003973179031163454, -0.018553754314780235, -0.03963622823357582, -0.007200238760560751, 0.048486754298210144, -0.018950704485177994, -0.013937368988990784, 0.04037132486701012, 0.020479699596762657, 0.030991533771157265, 0.024111060425639153, -0.04207674041390419, 0.00441423524171114, 0.026772096753120422, -0.004068741109222174, -0.03254992887377739, -0.018950704485177994, -0.022964313626289368, 0.016627810895442963, -0.02494906634092331, 0.004759728908538818, -0.005638165399432182, 0.007887550629675388, -0.007038518320769072, 0.017848065122961998, -0.040400728583335876, -0.007012790068984032, 0.0541616715490818, -0.033549658954143524, -0.018200909718871117, -0.012577446177601814, -0.022964313626289368, -0.012761219404637814, 0.0027327092830091715, -0.02206750027835369, 0.014275511726737022, 0.014356371946632862, -0.003250950016081333, 0.02727195993065834, -0.0013479773188009858, 0.0024974793195724487, -0.019097723066806793, -0.026492761448025703, 0.03416713699698448, -0.0147312693297863, 0.0177745558321476, 0.01756872981786728, 0.018333226442337036, 0.004656815901398659, -0.0003519259043969214, -0.009828196838498116, -0.0346670001745224, 0.010541237890720367, -0.018936002627015114, 0.021141283214092255, -0.019083021208643913, -0.00747222313657403, -0.014099089428782463, 0.02242034487426281, 0.0019167556893080473, 0.000639071746263653, -0.029065588489174843, 0.023258350789546967, -0.01950937509536743, 0.03513745963573456, -0.02977127768099308, 0.031344376504421234, -0.003054312663152814, 0.033608466386795044, 0.011408647522330284, -0.026772096753120422, 0.03010942041873932, 0.016201455146074295, -0.036137185990810394, 0.02199399098753929, -0.013687437400221825, -0.0013966772239655256, -0.02755129709839821, 0.006281372159719467, -0.03719571977853775, 0.0018349766032770276, 0.024184569716453552, 0.018803685903549194, -0.018568456172943115, -0.009482703171670437, -0.011026399210095406, 0.030521072447299957, -0.009276877157390118, 0.02205279842019081, -0.012018775567412376, -0.03669585660099983, -0.03687227889895439, 0.033432044088840485, -0.00426721666008234, -0.02984478697180748, -0.02214100956916809, 0.00882847048342228, 0.023978743702173233, -0.02497847005724907, 0.011599771678447723, -0.038430675864219666, 0.033667273819446564, 0.014400477521121502, 0.0067040505819022655, 0.021008966490626335, -0.007791989017277956, 0.033343832939863205, 0.011261628940701485, -0.007148782256990671, 0.0023375966120511293, 0.006862096022814512, -0.018230313435196877, 0.011937915347516537, 0.01721588522195816, -0.0007755234255455434, 0.003892319044098258, 0.0025379096623510122, -0.01978871040046215, 0.04142985865473747, 0.0033759158104658127, -0.011665930040180683, -0.007931656204164028, 0.006082897074520588, -0.028198178857564926, 0.024213973432779312, -0.016333771869540215, 0.02256736345589161, 0.0013406263897195458, 0.033549658954143524, -0.009210718795657158, 0.031491395086050034, 0.029256712645292282, 0.016172051429748535, 0.00219792895950377, -0.007733181584626436, -0.012856781482696533, 0.012423076666891575, -0.010519185103476048, 0.005189758725464344, 0.010254551656544209, 0.023596493527293205, -0.01476067304611206, 0.006608488503843546, 0.0023118683602660894, -0.0059175011701881886, 0.03993026539683342, 0.00740606477484107, 0.01728939451277256, -0.02466973103582859, -0.030432861298322678, 0.05183877795934677, 0.007622917182743549, 0.030903320759534836, -0.01990632526576519, 0.013672735542058945, 0.02762480638921261, 0.01001932192593813, 0.031256165355443954, 0.016613109037280083, -0.00847562588751316, -0.020303277298808098, 0.026478059589862823, -0.036107782274484634, -0.02972717210650444, 0.010350113734602928, 0.06421774625778198, -0.0496923066675663, -0.01775985397398472, -0.005781508516520262, 0.00756410975009203, 0.030932726338505745, 0.021891077980399132, 0.011857055127620697, -0.00846827495843172, -0.012342216446995735, 0.029344923794269562, -0.03660764545202255, 0.0201562587171793, -0.01753932610154152, -0.0058403159491717815, -0.02225862443447113, -0.006865771487355232, 0.009600318036973476, -0.02437569387257099, -0.03287337347865105, -0.022905506193637848, -0.015319343656301498, 0.01003402378410101, -0.009666476398706436, 0.03163841366767883, -0.014349021017551422, -0.004829562734812498, -0.002034370554611087, 0.003454938530921936, 0.03163841366767883, 0.018509648740291595, -0.013092011213302612, -0.0027198451571166515, 0.01361392717808485, 0.015863312408328056, 0.01987692154943943, -0.0017724937060847878, -0.03981265053153038, 0.03722512349486351, -0.021126581355929375, 0.01359922531992197, -0.02234683558344841, -0.007001763675361872, -0.018936002627015114, -0.026272233575582504, -0.016201455146074295, 0.03155020251870155, 0.011019048281013966, -0.001518886536359787, 0.024228675290942192, 0.0016943899681791663, 0.020656121894717216, -0.002543422859162092, 0.005965282209217548, -0.014084387570619583, -0.0019112424924969673, 0.035872552543878555, 0.003261976409703493, -0.02441979944705963, 0.004090793896466494, -0.0018836765084415674, -0.026669183745980263, -0.0061894855462014675, 0.026830904185771942, -0.02471383661031723, -0.01007812935858965, 0.010173691436648369, 0.019479971379041672, 0.04663431644439697, 0.03269694745540619, 0.016569003462791443, -0.005156679544597864, -0.02222922071814537, -0.010217797011137009, 0.02262617088854313, 0.01364333089441061, 0.0301976315677166, -0.026139916852116585, 0.011812948621809483, -0.016230858862400055, 0.011224874295294285, 0.012173145078122616, -0.043488118797540665, 0.04025371000170708, -0.003497206373140216, 0.024228675290942192, -0.015628082677721977, -0.04181210696697235, -0.006634216755628586, 0.0004238272085785866, 0.01996513269841671, 0.003515583695843816, 0.0059211766347289085, 0.014429881237447262, 0.0035523383412510157, 0.010798520408570766, 0.01750992238521576, 0.00876966305077076, 0.006240942049771547, 0.022979015484452248, 0.0011348002590239048, 0.031491395086050034, -0.022890804335474968, 0.018200909718871117, 0.025963494554162025, -0.000641368911601603, 0.02762480638921261, 0.015481065027415752, -0.007902252487838268, 0.029344923794269562, -0.003024908946827054, 0.003061663592234254, -0.00215198565274477, -0.001068641897290945, -0.05133891478180885, -0.005557305179536343, -0.03446117416024208, 0.007020140998065472, -0.019038915634155273, -0.050692033022642136, -0.021538233384490013, -0.02487555705010891, -0.007880199700593948, 0.04195912554860115, 0.028580427169799805, -0.008078674785792828, 0.04272362217307091, 0.00434072595089674, 0.02713964320719242, -0.00879906676709652, 0.031256165355443954, 0.06268875300884247, -0.004002582747489214, 0.05136831849813461, 0.0003239004872739315, 0.04034192115068436, -0.0755675882101059, 0.020391488447785378, -0.023846426978707314, 0.013871210627257824, 0.012717113830149174, -0.02268497832119465, -0.0053404527716338634, 0.011577718891203403, 0.014635707251727581, 0.030609283596277237, 0.006395311560481787, 0.053455982357263565, -0.010364815592765808, 0.01771574839949608, -0.016657214611768723, 0.026522165164351463, -0.01479007676243782, 0.03716631606221199, -0.00048608044744469225, -0.050750840455293655, -0.016524897888302803, -0.0035266100894659758, -0.047869276255369186, 0.03716631606221199, -0.02937432751059532, -0.004101820755749941, -0.04213554784655571, -0.00034044007770717144, 0.00876231212168932, 0.028139371424913406, 0.0044546653516590595, 0.017833363264799118, -0.003245436819270253, -0.003034097608178854, 0.005546278785914183, 0.0002474048233125359, 0.02741898037493229, -0.019141828641295433, 0.006637892220169306, -0.00220895535312593, 0.03769558295607567, -0.019288847222924232, -0.0036534136161208153, -0.023375965654850006, -0.021376512944698334, 0.0008986515458673239, 0.018583158031105995, -0.023655302822589874, -0.038313060998916626, -0.019391760230064392, -0.0062078628689050674, 0.00214831018820405, 0.005961606744676828, -0.015672188252210617, -0.025243103504180908, -0.0014536469243466854, -0.017921574413776398, 0.005219162441790104, 0.008328607305884361, 0.005171381402760744, 0.004079767502844334, -0.020362084731459618, 0.01752462424337864, -0.03925397992134094, -0.011313085444271564, -0.018009785562753677, -0.01995043084025383, -0.009320982731878757, -0.03249112144112587, -0.04398798197507858, -0.030315246433019638, 0.011033750139176846, 0.0047192987985908985, -0.012915588915348053, -0.0038224849849939346, 0.0297565758228302, 0.010261902585625648, 0.009548861533403397, 0.01743641309440136, -0.009100454859435558, 0.004179005511105061, -0.025978196412324905, -0.021802866831421852, 0.03219708427786827, 0.023331860080361366, 0.001088856952264905, 0.007828743197023869, 0.018715474754571915, 0.025419525802135468, 0.05968957394361496, -0.012217250652611256, 0.03160900995135307, -0.016392581164836884, -0.012937641702592373, -0.02018566243350506, -0.005759455729275942, 0.04119462892413139, 0.04978051781654358, -0.03796021640300751, 0.035666726529598236, -0.004789132624864578, -0.016524897888302803, -0.01999453641474247, 0.012143741361796856, 0.00033377829822711647, -0.0008366280235350132, 0.025934090837836266, 0.015701591968536377, -0.016260262578725815, -0.0022567363921552896, 0.004884694702923298, -0.013297837227582932, -0.003443912137299776, -0.00854178424924612, -0.011835002340376377, 0.02763950824737549, -0.006766533479094505, -0.018921300768852234, -0.0016907145036384463, 0.028301091864705086, -0.004013609141111374, -0.0026610377244651318, 0.0011164229363203049, 0.00430764677003026, -0.0009096779394894838, 0.014488688670098782, 0.008975489065051079, 0.010122234933078289, 0.011077855713665485, 0.0002864566631615162, -0.02696322090923786, -0.012952343560755253, -0.04513472691178322, -0.03172662481665611, 0.03234410285949707, 0.04019490256905556, 0.0073141781613230705, -0.0027437356766313314, 0.00429294491186738, 0.005281645338982344, 0.0003537636366672814, -0.010842625983059406, -0.001306628342717886, 0.02974187396466732, -0.010996995493769646, 0.00865204818546772, -0.006285047624260187, 0.01990632526576519, 0.010408921167254448, 0.0053183999843895435, 0.006693024188280106, 0.016760127618908882, -0.026037003844976425, -0.038607098162174225, 0.018068592995405197, 0.014437232166528702, -0.018700772896409035, -0.016421984881162643, 0.0008311148267239332, -0.010798520408570766, 0.01774515211582184, -0.018627263605594635, 0.005130951292812824, 0.009504755958914757, 0.0035486628767102957, 0.015554574318230152, -0.013981474563479424, -0.05236804485321045, 0.02203809656202793, 0.0032325726933777332, 0.00846092402935028, -0.016436686739325523, 0.012180496007204056, -0.03413773328065872, -0.01739230751991272, -0.0354020930826664, 0.010945538990199566, 0.025654755532741547, -0.0049912831746041775, -0.008019867353141308, 0.01759813353419304, -0.009012243710458279, -0.004127549007534981, 0.012136390432715416, 0.03763677552342415, -0.0005504011060111225, -0.03234410285949707, 0.00858588982373476, -0.0024974793195724487, -0.005527901463210583, -0.029080290347337723, 0.0003964909410569817, -0.009129858575761318, 0.021641146391630173, -0.021391214802861214, 0.011092557571828365, -0.02219981700181961, 0.003306081984192133, 0.0038114585913717747, -0.010754414834082127, -0.023493580520153046, 0.020347382873296738, -0.006516601890325546, -0.04269421845674515, -0.010526536032557487, -0.0058366404846310616, -0.006310775876045227, 0.00219057803042233, 0.019274145364761353, -0.05671979859471321, -0.0348140187561512, -0.0033648894168436527, 0.00218138936907053, -0.007038518320769072, 0.016789531335234642, 0.00442158617079258, 0.013709490187466145, -0.03910696133971214, 0.020288575440645218, -0.01504735928028822, 0.030374053865671158, -0.00426354119554162, 0.0024919661227613688, -0.03549030423164368, -0.0005164030590094626, 0.02274378575384617, 0.019450567662715912, -0.019171232357621193, -0.002433158690109849, 0.008416818454861641, -0.00851238053292036, 0.003423697082325816, 0.008299203589558601, 0.001110909739509225, 0.016436686739325523, -0.018612561747431755, -0.0041863564401865005, 0.012114337645471096, 0.047898679971694946, -0.02256736345589161, -0.025757668539881706, -0.00033952121157199144, 0.03687227889895439, -0.0168924443423748, -0.018862493336200714, -0.012070232070982456, 0.048427946865558624, 0.0880935788154602, -0.00440320884808898, -0.013907965272665024, 0.012423076666891575, -0.006953982636332512, 0.011423349380493164, -0.024111060425639153, 0.012820026837289333, -0.00882847048342228, 0.032961584627628326, -0.005759455729275942, -0.006226240191608667, 0.00211339327506721, 0.014554847031831741, -0.005498497746884823, 0.012503936886787415, 0.031167956069111824, -0.00860794261097908, 0.045693397521972656, -0.0018239502096548676, -0.0201562587171793, 0.019377058371901512, -0.029065588489174843, -0.011518911458551884, 0.0014591601211577654, 0.008335958234965801, 0.002907293848693371, -0.018509648740291595, 0.009629721753299236, 0.0044730426743626595, -0.007983112707734108, 0.002861350541934371, -0.030344650149345398, -0.03157960623502731, -0.003506395034492016, 0.009240122511982918, 0.01476067304611206, 0.009468001313507557, -0.021126581355929375, 0.0001852664863690734, -0.0058513423427939415, -0.006546005606651306, -0.00858588982373476, -0.011636526323854923, 0.015539872460067272, -0.01004872564226389, 0.0011292870622128248, -0.017818661406636238, -0.04292944818735123, 0.02255266159772873, 0.008100727573037148, 0.016319070011377335, 0.018524350598454475, -0.004807509947568178, 0.038342464715242386, -0.026051705703139305, 0.01007077842950821, 0.04134164750576019, 0.003951126243919134, 0.020612016320228577, 0.021082475781440735, -0.0201562587171793, -0.005226513370871544, -0.01750992238521576, 0.013437504880130291, 0.02500787377357483, 0.0174070093780756, 0.043194081634283066, 0.0011412323219701648, 0.0011421511881053448, -0.003462289460003376, -0.006983386352658272, -0.011386594735085964, -0.035901956260204315, -0.0294625386595726, 0.055867090821266174, 0.05216221883893013, 0.00037949191755615175, 0.003050637198612094, 0.026272233575582504, -0.012430427595973015, 0.03266754373908043, 0.026375146582722664, 0.030550476163625717, -0.0015878014964982867, -0.01773045025765896, 0.00011457117943791673, 2.4881184799596667e-05, 0.00868145190179348, -0.005399260204285383, 0.010769116692245007, 0.026713289320468903, -0.0064430925995111465, 0.023861128836870193, -0.000429340434493497, -0.04469367116689682, -0.01959758624434471, -0.03654883801937103, -0.025390122085809708, 0.0038004321977496147, -0.0025085059460252523, 0.010952889919281006, -0.00865939911454916, 0.003048799466341734, 0.0005807236884720623, 0.016480792313814163, 0.016848338767886162, -0.016627810895442963, -0.026492761448025703, -0.023699408397078514, 0.008063972927629948, -0.01971520110964775, -0.03537268936634064, -0.02192048169672489, -0.001273549161851406, -0.011467454954981804, -0.016451388597488403, 0.00754205696284771, 0.027771824970841408, 0.033402640372514725, -0.001319492468610406, 0.00047459459165111184, 0.017803959548473358, 0.016172051429748535, -0.006858420558273792, 0.03746035322546959, -0.01730409637093544, 0.030344650149345398, -0.023728812113404274, 0.006057168822735548, -0.02743368223309517, 0.007762585300952196, -0.0005301860510371625, -0.002892591990530491, 0.012753868475556374, 0.043429311364889145, 0.05927792191505432, 0.014312266372144222, -0.0035982816480100155, -0.0007713885279372334, 0.028771551325917244, 0.006277696695178747, -0.015878014266490936, -0.01706886664032936, -0.02756599895656109, -0.025860581547021866, 0.026919115334749222, -0.020641420036554337, -0.04172389581799507, -0.0016778503777459264, 0.023684706538915634, 0.017789257690310478, -0.006546005606651306, -0.004179005511105061, -0.046105049550533295, 0.011849704198539257, -0.00869615375995636, 0.012048179283738136, -0.01476067304611206, -0.002370675792917609, 0.01717177964746952, -0.0012276057386770844, -0.02231743186712265, -0.010320710018277168, 0.031167956069111824, -0.0038518887013196945, -0.04260600730776787, 0.005965282209217548, -0.021303003653883934, 0.007843445055186749, -0.00443261256441474, -0.01481948047876358, 0.0005784265231341124, 0.019038915634155273, 0.015289939939975739, -0.011687982827425003, 0.009945811703801155, 0.03413773328065872, 0.016392581164836884, 0.008416818454861641, -0.027713017538189888, 0.018333226442337036, -0.001510616741143167, 0.007997814565896988, -0.025566544383764267, 0.013305188156664371, 0.01470921654254198, 0.01501060463488102, -0.018318524584174156, 0.0013415452558547258, -0.020479699596762657, 0.0003450344083830714, 0.0059322030283510685, 0.005869719665497541, 0.0070421937853097916, -0.015422256663441658, 0.00441791070625186, -0.006865771487355232, 0.036078378558158875, -0.006406337954103947, 0.0027235206216573715, 0.026154618710279465, -0.02486085519194603, -0.028109967708587646, 0.027771824970841408, 0.04916303977370262, 0.030756302177906036, 0.010107533074915409, -0.012540691532194614, 0.0053110490553081036, 0.02738957665860653, 0.007255370728671551, -0.05971897765994072, 0.001076911692507565, 0.010364815592765808, 0.004774430766701698, -0.004623736720532179, 0.00442158617079258, 0.011937915347516537, 0.040753573179244995, -0.0061821346171200275, 0.015598679892718792, -0.03257933259010315, -0.0176275372505188, 0.02262617088854313, 0.02705143205821514, 0.00434440141543746, 0.002604068024083972, -0.006211538333445787, 0.009357737377285957, 0.04754583537578583, -0.015922119840979576, 0.028007054701447487, 0.020700227469205856, 0.02444920316338539, -0.009048998355865479, 0.019479971379041672, -0.05916030704975128, 0.010607396252453327, 0.011805597692728043, -0.0270073264837265, -0.008240396156907082, -0.012989098206162453, 0.010438324883580208, 0.01508411392569542, 0.0027749771252274513, 0.0013985149562358856, 0.030932726338505745, -0.0018193558789789677, -0.0005338615155778825, 0.0014775374438613653, -0.011151365004479885, -0.0148415332660079, 0.00746854767203331, -0.0002167376660509035, -0.006762858014553785, 0.0005949661135673523, 0.006127002649009228, 0.0055977352894842625, -0.0005003228434361517, -0.020685525611042976, -0.03793081268668175, -0.010974942706525326, -0.011349840089678764, 0.028139371424913406, -0.01483418233692646, -0.002447860548272729, 0.019127126783132553, 0.01980341225862503, 0.018465543165802956, 0.006575409322977066, -0.018774282187223434, 0.0002199536975240335, 0.016054436564445496, -0.011629175394773483, -0.045722801238298416, -0.0543086901307106, -0.016025032848119736, 0.0017881144303828478, -0.008968138135969639, -0.038489483296871185], "index": 3}, {"title": "Shin Sang-ok", "text": "Shin Sang-ok (October 18, 1926 \u2013 April 11, 2006) was a prolific South Korean film producer and director with more than 100 producer and 70 director credits to his name. His best-known films were made in the 1950s and 60s when he was known as the \"Prince of Korean Cinema\". He received the Gold Crown Cultural Medal, the country's top honor for an artist.", "vector": [0.041343480348587036, -0.008456620387732983, -0.021819371730089188, -0.022823551669716835, -0.014460176229476929, -0.002359820296987891, -0.013549242168664932, -0.02652466855943203, -0.03626520186662674, 0.011756065301597118, 0.00045994980609975755, -0.02861909754574299, -0.03319528326392174, -0.01073036901652813, 0.01159826572984457, 0.003980852197855711, -0.03959333896636963, 0.0111248679459095, -0.023612549528479576, -0.0214033555239439, 0.07172705978155136, -0.04237635061144829, -0.005200211890041828, -0.00976205337792635, 0.012114700861275196, 0.03118692710995674, -0.02936505898833275, 0.012494854629039764, 0.038359634578228, -0.011734547093510628, 0.0002224659692728892, -0.015736917033791542, 0.02831784449517727, 0.060480259358882904, 0.035834841430187225, -0.0009459006250835955, 0.000751789310015738, 0.027543192729353905, 0.019151125103235245, -0.012896525673568249, -0.013642487116158009, -0.019194161519408226, -0.005365184508264065, 0.011770411394536495, -0.011727374978363514, -0.010264142416417599, -0.04441339895129204, -0.07511258125305176, -0.030871327966451645, -0.0022773342207074165, 0.06541508436203003, -0.010113515891134739, -0.01658329740166664, -0.0387326143682003, 0.03302314132452011, -0.019179817289114, 0.04854487627744675, 0.020427867770195007, 0.032564084976911545, -0.04094180837273598, -0.001970701152458787, -0.024530654773116112, -0.03709723800420761, 0.02880558930337429, 0.07884238660335541, -0.030785255134105682, 0.02186240814626217, 0.024258092045783997, -0.03029751218855381, 0.04409779980778694, 0.015478700399398804, -0.03606436774134636, -0.013420133851468563, 0.009597080759704113, -0.010809268802404404, 0.009840953163802624, 0.03322397544980049, -0.009661635383963585, -0.031473834067583084, -0.024961018934845924, 0.016870204359292984, -0.008427930064499378, -0.08211313933134079, 0.014345413073897362, -0.02672550454735756, -0.02562090754508972, -0.003268960863351822, -0.06363625079393387, -0.02329695038497448, -0.0058063059113919735, 0.03695378452539444, -0.04708164557814598, -0.0055803656578063965, 0.004095615353435278, 0.0179891474545002, -0.03184681758284569, 0.06214432790875435, -0.05046716332435608, 0.01976797915995121, 0.0005944380536675453, -0.008707665838301182, -0.06076716631650925, -0.003503866959363222, 0.016167279332876205, 0.03893344849348068, 0.03546186164021492, -0.05218861252069473, -0.018892908468842506, -0.014166095294058323, 0.0346585176885128, -0.017472712323069572, 0.037039853632450104, 0.02051394060254097, 0.03445767983794212, -0.05052454397082329, 0.03867523372173309, -0.015665190294384956, 0.04441339895129204, -0.0037871890235692263, -0.022134970873594284, -0.004579773172736168, -0.0359782949090004, -0.017903074622154236, 0.003744152607396245, 0.01688455045223236, -0.000735650712158531, -0.036839019507169724, 0.07958834618330002, 0.035777460783720016, 0.005630574654787779, -0.031072163954377174, 0.015019646845757961, 0.03933512046933174, 0.0010068686679005623, 0.03055572882294655, 0.011454812251031399, 0.011418948881328106, 0.01236574538052082, -0.02884862571954727, 0.028145698830485344, 0.004823645111173391, -0.019093744456768036, -0.021589845418930054, -0.022565335035324097, -0.004339487291872501, -0.04097049683332443, 0.019653216004371643, -0.02333998680114746, -0.06461174041032791, 0.01704235002398491, -0.05657830834388733, -0.027887482196092606, -0.051987774670124054, 0.008090812712907791, -0.027198903262615204, 0.0023060250096023083, -0.0014892331091687083, -0.03224848583340645, -0.02747146598994732, -0.005892378278076649, 0.011512193828821182, -0.004127892665565014, -0.025663943961262703, 0.012121873907744884, 0.0035773871932178736, -0.07637497782707214, -0.06593151390552521, 0.005106966942548752, 0.008241439238190651, 0.02884862571954727, 0.012573754414916039, 0.011440466158092022, 0.006329913157969713, -0.017558785155415535, -0.039363812655210495, 0.001603996497578919, 0.03526102378964424, -0.009324518032371998, -0.028303498402237892, 0.002413615584373474, 0.009998752735555172, 0.012157737277448177, -0.029723694548010826, -0.0210590660572052, -0.030584419146180153, 0.026108650490641594, 0.018118256703019142, -0.03744152560830116, 0.025592215359210968, -0.008872637525200844, -0.05038109049201012, -0.030871327966451645, -0.02006923221051693, -0.0030627455562353134, 0.01599513553082943, 0.027457119897007942, -0.022292770445346832, -0.037527598440647125, -0.061570510268211365, -0.043495289981365204, 0.028733860701322556, 0.002739973831921816, 0.043638743460178375, -0.00649488577619195, -0.04016715660691261, 0.01734360307455063, -0.010206760838627815, 0.002234298037365079, -0.0373554527759552, -0.028676480054855347, -1.581637843628414e-05, -0.011748893186450005, -0.031416453421115875, 0.012129046022891998, -0.021475082263350487, -0.005591124761849642, -0.0020442213863134384, 0.02180502749979496, -0.006684962194412947, 0.028446953743696213, 0.014689702540636063, 0.0244445838034153, 0.027543192729353905, -0.031961578875780106, 0.02186240814626217, -0.005379529669880867, -0.043294455856084824, 0.015320900827646255, -0.004583359230309725, 0.004988617263734341, -0.008363375440239906, -0.028489990159869194, 0.004694536328315735, -0.00787563156336546, -0.029723694548010826, 0.08940061181783676, 0.04977858066558838, -0.0356626957654953, -0.025348344817757607, 0.01346316933631897, -0.003606078214943409, 0.050036799162626266, 0.0016954484162852168, 0.0008938985411077738, 0.041745152324438095, 0.024961018934845924, -0.03244932368397713, -0.0002978914708364755, 0.01714276894927025, 0.04693818837404251, 0.02821742743253708, -0.004127892665565014, 0.01823301985859871, 0.030469655990600586, -0.029867149889469147, -0.0009024161263369024, 0.012229464016854763, 0.04071228206157684, 0.012666999362409115, 0.035490550100803375, 0.002078291727229953, -0.018519926816225052, -0.005870860069990158, -0.02260836958885193, -0.04220420494675636, 0.012860662303864956, -0.026510322466492653, -0.03279361501336098, 0.011834965087473392, 0.011010103859007359, 0.00748830521479249, -0.029121188446879387, 0.019997505471110344, 0.0028672893531620502, -0.024372855201363564, -0.0232539139688015, 0.010350215248763561, 0.01261679083108902, 0.04237635061144829, -0.006760275922715664, 0.013793114572763443, -0.015234827995300293, -0.05161479488015175, 0.03029751218855381, -0.010694504715502262, -0.027744028717279434, 0.05543067306280136, -0.029235951602458954, 0.052532900124788284, 0.014546248130500317, 0.01015655230730772, 0.056205328553915024, -0.014646666124463081, 0.0019509760895743966, 0.019983159378170967, 0.008693319745361805, -0.02638121321797371, -0.017171459272503853, 0.0312443096190691, -0.04163038730621338, 0.0030340547673404217, 0.018448200076818466, -0.011813446879386902, 0.03632258623838425, -0.04137216880917549, -0.00034496234729886055, -0.023813385516405106, 0.043437909334897995, 0.03870392218232155, -0.01712842285633087, 0.018003493547439575, -0.034543752670288086, 0.03663818538188934, 0.038359634578228, 0.018448200076818466, -0.028274808079004288, -0.010335870087146759, -0.0624886192381382, -0.0198683962225914, 0.041888605803251266, 0.021489428356289864, 0.006663443986326456, 0.022680098190903664, -0.011483502574265003, 0.08607247471809387, 0.03600698709487915, 0.003130886238068342, -0.047311171889305115, -0.012710035778582096, 0.03184681758284569, 0.010429115034639835, -0.01589471660554409, 0.008427930064499378, -0.02410029247403145, 0.019151125103235245, -0.001277638366445899, -0.0202126856893301, 0.049491673707962036, -0.0056234016083180904, -0.0029946048744022846, 0.0009934197878465056, -0.01882118172943592, 0.001090251374989748, 0.028977733105421066, -0.04544626548886299, -0.02329695038497448, 0.02989584021270275, 0.005074689630419016, 0.021891100332140923, -0.020140958949923515, 0.0005204695044085383, -0.028877316042780876, 0.02438720129430294, -0.009618598967790604, -0.0006607855902984738, 0.00356483506038785, 0.06145574897527695, 0.019237197935581207, -0.03959333896636963, -0.008485311642289162, 0.007624587044119835, 0.0058457558043301105, 0.0005505052395164967, -0.00401312904432416, -0.011949729174375534, 0.023368677124381065, 0.02975238673388958, 0.012093182653188705, -0.031014781445264816, -0.015464355237782001, 0.006957524921745062, -0.005838582757860422, -0.040253229439258575, -0.0019115261966362596, 0.009704671800136566, -0.024702800437808037, -0.013642487116158009, 0.03867523372173309, -0.0488891676068306, -0.004777022637426853, -0.0036347690038383007, 0.0276723001152277, -0.024774527177214622, -0.014990956522524357, -0.05316409841179848, -0.0009530733805149794, 0.013585105538368225, 0.026409905403852463, -0.026051269844174385, 0.029465477913618088, 0.0013215711805969477, -0.0099341981112957, 0.052332065999507904, 0.006548680830746889, -0.0136640053242445, -0.054024823009967804, 0.03302314132452011, 0.017573131248354912, 0.019796669483184814, 0.025520488619804382, 0.05181562900543213, -0.01085230428725481, 0.02618037723004818, 0.004382523708045483, 0.032850995659828186, 0.04665128141641617, 0.011770411394536495, -0.03511757031083107, 0.022034553810954094, 0.026409905403852463, 0.05950477346777916, 0.03681032732129097, -0.023038731887936592, -0.03856046870350838, 0.05032370612025261, -0.00102749012876302, 0.017114076763391495, -0.011548057198524475, 0.03899083286523819, -0.0015995134599506855, 0.03629389405250549, -0.05150002986192703, 0.0263238325715065, -0.05807023122906685, -0.03133038058876991, -0.0031434386037290096, 0.02583608776330948, 0.06220170855522156, -0.03824486956000328, -0.025893470272421837, -0.01487619336694479, -0.0038983658887445927, 0.028289154171943665, -0.023899458348751068, -0.040454063564538956, 0.002562449313700199, -0.06753820180892944, -0.00404899287968874, 0.02483190968632698, 0.02424374781548977, 0.007832595147192478, -0.029522858560085297, -0.029494168236851692, 0.016611987724900246, -0.019007671624422073, -0.04320838302373886, -0.0032259246800094843, -0.019796669483184814, -0.006613235455006361, -0.03029751218855381, -0.05875881016254425, -0.024014221504330635, 0.029293332248926163, -0.024702800437808037, 0.027729682624340057, 0.031359072774648666, -0.024659764021635056, 0.025563525035977364, -0.016411151736974716, -0.01585168018937111, -0.02622341364622116, 0.062316473573446274, 0.0266681220382452, -0.02408594824373722, -0.005870860069990158, 0.028977733105421066, -0.045073285698890686, -0.06552984565496445, 0.016081208363175392, 0.03408470004796982, 0.04191729426383972, 0.06174265593290329, 0.04647913575172424, -0.03293706849217415, 0.022335806861519814, 0.039507266134023666, 0.05368053540587425, -0.006957524921745062, 0.049147382378578186, 0.02577870711684227, 0.035088878124952316, -0.002594726625829935, -0.0366668738424778, 0.0029802594799548388, 0.021145138889551163, 0.004185274243354797, -0.027141520753502846, -0.008406411856412888, 0.0037513254210352898, -0.02170460857450962, 0.035347096621990204, 0.03491673618555069, 0.009977234527468681, 0.02791617251932621, -0.038617849349975586, 0.020255722105503082, -0.040310610085725784, -0.019438033923506737, 0.02180502749979496, -0.011964074335992336, 0.0059999688528478146, 0.06375101208686829, -0.016425497829914093, -0.015378282405436039, 0.021475082263350487, 0.0034070354886353016, 0.026094306260347366, 0.01962452381849289, 0.0009620392229408026, -0.016411151736974716, -0.0007889976841397583, 0.04165907949209213, -0.014947920106351376, -0.033310048282146454, -0.02057132124900818, -0.003797947894781828, 0.006093213800340891, -0.004382523708045483, 0.01718580350279808, 0.002010151045396924, 0.0030412275809794664, 0.028002245351672173, -0.004253414925187826, 0.05875881016254425, -0.015363937243819237, -0.025965197011828423, -0.00574892433360219, -0.006502058357000351, -0.01928023435175419, 0.035777460783720016, 0.005802719388157129, 0.002110568806529045, 0.030326202511787415, -0.013986777514219284, -0.017544439062476158, 0.013563587330281734, -0.0020818780176341534, 0.017271876335144043, 0.006398053839802742, 0.0019222853006795049, -0.0332813560962677, 0.019093744456768036, -0.001968907890841365, -0.009697498753666878, -0.03933512046933174, 0.008205575868487358, 0.033396121114492416, -0.036035675555467606, -0.0017725550569593906, 0.028748206794261932, 0.009604253806173801, 0.03594960272312164, 0.010787750594317913, 0.02840391732752323, 0.03669556602835655, 0.03813010826706886, -0.04102788120508194, -0.00844227522611618, -0.037527598440647125, -0.0011817034101113677, -0.02410029247403145, -0.00976205337792635, -0.0024512724485248327, -0.0008365168469026685, -0.01942368783056736, 0.0015394421061500907, -0.026237759739160538, -0.011397430673241615, -0.061914801597595215, -0.0512705035507679, -0.004949167370796204, 0.016712406650185585, 0.02519054524600506, -0.03133038058876991, -0.0536518432199955, 0.025750014930963516, -0.038876067847013474, -0.00864311121404171, 0.0026377628091722727, -0.023870766162872314, 0.049577746540308, -0.032018959522247314, 0.030240129679441452, 0.016511570662260056, -0.028690826147794724, -0.002684385282918811, 0.032908376306295395, 0.022479262202978134, -0.01658329740166664, 0.004328728187829256, -0.03187550604343414, -0.0047590904869139194, 0.0010140413651242852, -0.021030375733971596, -0.01202145591378212, -0.0161385890096426, -0.011777583509683609, 0.029278988018631935, -0.00328509951941669, 0.008176885545253754, 0.00961142685264349, 0.027342356741428375, -0.03336742892861366, -0.024272438138723373, 0.011010103859007359, -0.019007671624422073, 0.023827729746699333, -0.03899083286523819, 0.02285224199295044, -0.03055572882294655, -0.01224381010979414, -0.006204390898346901, -0.01430237665772438, 0.006365776993334293, 0.025563525035977364, -0.013477515429258347, -0.0013341234298422933, 0.005487120244652033, 0.02563525177538395, 0.004906130954623222, -0.013283852487802505, 0.0451880507171154, 0.031014781445264816, -0.01517744641751051, 0.005257593933492899, -0.028246117755770683, -0.016812823712825775, 0.02210628055036068, -0.00842075701802969, 0.03729807212948799, -0.006563026458024979, 0.01562215480953455, -0.024128984659910202, -0.02989584021270275, -0.06174265593290329, 0.014639494009315968, 0.004016715567559004, -0.060021206736564636, -0.018304746598005295, -0.06633318960666656, -0.013441652059555054, -0.016468534246087074, 0.0020209099166095257, -0.04122871533036232, -0.02315349690616131, 0.028977733105421066, 0.01383615005761385, -0.020886920392513275, -0.013126052916049957, 0.023325640708208084, 0.02682592160999775, -0.004260587505996227, -0.01996881514787674, 0.01420913077890873, 0.057984158396720886, 0.005630574654787779, 0.0438108891248703, -0.009927025996148586, -0.023311296477913857, -0.028203081339597702, 0.006968284025788307, -0.026639431715011597, -0.03267884999513626, 0.016568951308727264, -0.021618537604808807, 0.005347252357751131, -0.0232539139688015, 0.0003171681019011885, -0.02890600636601448, -0.006634753197431564, 0.023813385516405106, 0.0059282416477799416, -0.007595895789563656, -0.00039674033178016543, -0.006903729867190123, -0.015306555666029453, 0.008858292363584042, -0.004956339951604605, 0.04762677103281021, -0.022221043705940247, 0.01887856237590313, -0.01862034574151039, -0.005193039309233427, 0.02285224199295044, -0.02463107369840145, 0.0016488258261233568, 0.01907939836382866, -0.029637621715664864, -0.006401640363037586, 0.014704047702252865, 0.028647789731621742, -0.03015405684709549, -0.043839581310749054, -0.004916890058666468, 0.04513067007064819, -0.0519590862095356, -0.03233455866575241, -0.009848126210272312, 0.0007365472847595811, 0.011834965087473392, -0.015822989866137505, 0.04372481629252434, -0.03617912903428078, 0.006225909106433392, -0.005447670351713896, -0.02890600636601448, -0.0008499657269567251, -0.0010642502456903458, -0.05339362472295761, -0.08802345395088196, 0.02354082278907299, 0.03506018966436386, 0.021618537604808807, 0.008635938167572021, -0.0015779953682795167, 0.004547495860606432, 0.012968253344297409, -0.04501590505242348, 0.01813260093331337, 0.01982535980641842, 0.006247427314519882, -0.01704235002398491, -0.014402794651687145, 0.010213933885097504, 0.01050801482051611, 0.03655211254954338, 0.024573691189289093, -0.040999189019203186, -0.01258809957653284, -0.010400423780083656, 0.04240503907203674, -0.004597704857587814, 0.01966756023466587, 0.0026915580965578556, 0.038962140679359436, -0.005881619174033403, -0.010142207145690918, 0.014445830136537552, 0.03184681758284569, -0.01030717883259058, 0.011153558269143105, -0.01090251374989748, 0.00589955085888505, -0.013979604467749596, 0.03531840443611145, -0.010938377119600773, 0.02031310461461544, 0.041257407516241074, -0.012910871766507626, -0.04429863393306732, 0.0078039043582975864, 0.013850496150553226, -0.0018935945117846131, -0.032908376306295395, 0.0028906005900353193, -8.383100794162601e-05, 0.005583951715379953, -0.027973555028438568, 0.02861909754574299, -0.004748331382870674, -0.018247364088892937, 0.026653775945305824, 0.01708538644015789, -0.0048702675849199295, 0.02607996016740799, 0.03322397544980049, -0.012559408321976662, -0.021087756380438805, -0.013527723960578442, 0.009604253806173801, -0.00047295031254179776, 0.0006854417733848095, -0.010493669658899307, -0.004127892665565014, 0.000364239007467404, 0.0067925527691841125, -0.03244932368397713, -0.03437160700559616, 0.01318343449383974, -0.040310610085725784, -0.00668137613683939, 0.017501402646303177, -0.051729559898376465, -0.01522048283368349, -0.018591655418276787, 0.002497894922271371, 0.01758747547864914, 0.004239069297909737, -0.012337055057287216, 0.01793176494538784, -0.006172113586217165, 0.039908938109874725, -0.006175700109452009, -0.05147134140133858, 0.005099794361740351, 0.005139244254678488, 0.0028637030627578497, 0.010895340703427792, -0.008528348058462143, -0.025147508829832077, -0.04240503907203674, 0.011734547093510628, -0.02529096230864525, -0.018864218145608902, 0.02592216059565544, -0.014359758235514164, -0.03356826677918434, 0.03170336037874222, 0.006849934346973896, -0.0008598282001912594, 0.0099341981112957, -0.051987774670124054, 0.015320900827646255, -0.06633318960666656, -0.0006728895241394639, -0.00449728686362505, 0.007603068836033344, -0.0010319731663912535, -0.028920352458953857, 0.022321462631225586, 0.011045968160033226, 0.00842075701802969, 0.036437347531318665, 0.06484126299619675, 0.07258778810501099, 0.04097049683332443, 0.02136031910777092, -0.0001409885153407231, -0.015923408791422844, 0.016655024141073227, -0.03724069148302078, 0.003347860649228096, 0.015163101255893707, 0.03778581693768501, -0.017558785155415535, -0.0380440354347229, 0.0461922287940979, -0.011397430673241615, 0.03184681758284569, 0.005297043826431036, 0.047913677990436554, 0.01708538644015789, -0.0012166702654212713, -0.02721324749290943, 0.01271720789372921, 0.0010481117060407996, 0.008549866266548634, -0.020772157236933708, 0.036839019507169724, 0.01092403195798397, 0.004622809123247862, -0.05276242643594742, 0.01813260093331337, 0.025147508829832077, 0.0031882680486887693, -0.03784319758415222, 0.038072723895311356, 0.003295858623459935, 0.009102164767682552, 0.008062121458351612, -0.004547495860606432, 0.0016640678513795137, 0.024760182946920395, -0.033510882407426834, -0.0173292588442564, 0.01827605627477169, 0.012329882010817528, 0.006487712729722261, -0.02592216059565544, -0.006451849360018969, -0.012803280726075172, 0.058443211019039154, 0.011418948881328106, -0.007990394718945026, -0.060480259358882904, -0.004099201876670122, -0.010866650380194187, -0.03649472817778587, -0.019925778731703758, 0.009209754876792431, -0.018347783014178276, 0.013255161233246326, -0.0046443273313343525, 0.005293457303196192, 0.014101540669798851, 0.010364560410380363, 0.008930019102990627, -0.024301128461956978, 0.010651469230651855, -0.022565335035324097, -0.006365776993334293, 0.0037513254210352898, 0.00196173507720232, 0.03606436774134636, 0.0034680035896599293, 0.02037048526108265, 0.040454063564538956, -0.007262364961206913, -0.05150002986192703, -0.06099669635295868, 0.005279111675918102, 0.009023264981806278, 0.023024387657642365, -0.02866213396191597, 0.004924063105136156, -0.022077590227127075, 0.03084263764321804, -0.029723694548010826, 0.01907939836382866, -0.019854051992297173, 0.024616727605462074, -0.0071619474329054356, 0.051729559898376465, 0.011878001503646374, -0.03663818538188934, -0.02787313610315323, 0.05557413026690483, 0.011834965087473392, -0.02230711653828621, 0.009381899610161781, -0.006398053839802742, 0.027041103690862656, 0.004300037398934364, -0.002904945984482765, -0.01032869704067707, -0.010651469230651855, 0.004680190701037645, 0.012437473051249981, -0.030928710475564003, 0.010034616105258465, 0.02717021107673645, -0.016253352165222168, -0.03417077288031578, -0.001673930324614048, 0.049405600875616074, -0.007746522780507803, -0.01758747547864914, -0.007395060267299414, 0.02041352167725563, 0.017888730391860008, 0.014904883690178394, 0.0263238325715065, 0.001051698112860322, -0.018290400505065918, -0.010027443058788776, 0.004881026688963175, -0.016468534246087074, -0.021919790655374527, -0.009769226424396038, -0.03701116517186165, -0.03818748891353607, -0.03394124656915665, 0.0011404602555558085, -0.007222915068268776, -0.01813260093331337, 0.008757874369621277, 0.019251544028520584, -0.002874462166801095, -0.04610615596175194, -0.015464355237782001, -0.027758372947573662, -0.020929956808686256, -0.018864218145608902, -0.003665252821519971, 0.03724069148302078, -0.03244932368397713, 0.0022396775893867016, -0.0067531028762459755, 0.0390482135117054, -0.009840953163802624, -0.005150003358721733, 0.04036799073219299, -0.020929956808686256, 0.018993325531482697, -0.03239194303750992, 0.008485311642289162, -0.01443148497492075, 0.03342481330037117, 0.029666313901543617, -0.017099732533097267, -0.033453501760959625, 0.023913802579045296, 0.0013601244427263737, -0.016167279332876205, 0.029192915186285973, 0.016282042488455772, -0.021417701616883278, -0.0058457558043301105, -0.01922285370528698, -0.030756564810872078, -0.05881619080901146, -0.013305370695888996, 0.019954469054937363, 0.0059282416477799416, 0.020671740174293518, 0.0025355517864227295, 0.04033929854631424, -0.034199465066194534, 0.02369862236082554, -0.07029252499341965, -0.00216615735553205, 0.022134970873594284, -0.033453501760959625, -0.006846348289400339, 0.021632881835103035, 0.04733986034989357, 0.029666313901543617, 0.012745899148285389, -0.02344040386378765, 0.00677820760756731, -0.016009479761123657, 0.015406972728669643, -0.013398615643382072, 0.005160761997103691, 0.019452380016446114, -0.024372855201363564, -0.030871327966451645, 0.04590532183647156, 0.00440762797370553, 0.038359634578228, 0.04088442772626877, -0.0325927771627903, 0.030268820002675056, 0.023913802579045296, -0.0019330444047227502, 0.020886920392513275, 0.028002245351672173, 0.02250795252621174, 0.007273124065250158, -0.01443148497492075, -0.02285224199295044, 0.014761429280042648, -0.0031039887107908726, -0.00903761014342308, 0.010565396398305893, -0.04693818837404251, -0.02587912417948246, 0.04444208741188049, -0.004647913854569197, 0.016611987724900246, 0.04868832975625992, -0.0075026508420705795, -0.0013897118624299765, -0.0006858900305815041, 0.01793176494538784, 0.027155866846442223, 0.032564084976911545, 0.018864218145608902, 0.03660949319601059, 0.006304808892309666, -0.013520551845431328, 0.026108650490641594, 0.00711532449349761, 0.013355579227209091, 0.0032833062577992678, -0.0033765514381229877, -0.008148194290697575, 0.029278988018631935, -0.017314912751317024, -0.014309548772871494, -0.0014130230993032455, 0.013821804895997047, 0.011562402360141277, -0.0043861097656190395, -0.019983159378170967, 0.024200711399316788, 0.010816440917551517, -0.018562963232398033, -0.0027310079894959927, 0.013915049843490124, 0.0008898638770915568, -0.016626333817839622, 0.01906505413353443, -0.04754069820046425, -0.04645044729113579, 0.03551924228668213, 0.005795546807348728, -0.022479262202978134, -0.0080692945048213, 0.01932327076792717, -0.006376536097377539, -0.030383583158254623, 0.006157768424600363, -0.005587538238614798, -0.0014802672667428851, -0.015005301684141159, 0.009503835812211037, 0.0173292588442564, -0.003659873502328992, 0.037470217794179916, 0.001355641521513462, 0.0008486208389513195, 0.003948574885725975, -0.02628079615533352, 0.0001474887685617432, 0.018304746598005295, 0.010572569444775581, 0.03207634389400482, 0.013341234065592289, -0.0036939438432455063, 0.0077608684077858925, -0.006839175708591938, -0.019394997507333755, 0.006986216176301241, 0.043638743460178375, 0.019509760662913322, -0.0380440354347229, 0.035232335329055786, 0.0035020739305764437, -0.018591655418276787, -0.019610179588198662, 0.014962265267968178, -0.029494168236851692, 0.006537921726703644, -0.004673018120229244, 0.005903137382119894, -0.00961142685264349, -0.01658329740166664, 0.011325703002512455, 0.002618037862703204, -0.0210590660572052, 0.0025445176288485527, -0.012351400218904018, -0.030182749032974243, 0.02011226862668991, 0.009331691078841686, -0.01017807051539421, -0.030756564810872078, 0.041802532970905304, -0.009008918888866901, -0.02214931696653366, -0.004178101662546396, -0.030067984014749527, -0.02289527840912342, 0.002453065477311611, 0.0014390242286026478, -0.01797480136156082, 0.0011144592426717281, 0.0006164044607430696, 0.029121188446879387, 0.02940809540450573, -0.0733911320567131, -0.01847689226269722, 0.02051394060254097, 0.007889976724982262, -0.007423751056194305, 0.01738663949072361, 0.015206137672066689, -0.0322771780192852, -0.004637154750525951, -0.0013027427485212684, -0.020284414291381836, -0.009080646559596062, -0.01872076280415058, -0.00901609193533659, -0.0035702146124094725, -0.04366743564605713, 0.001720552914775908, -0.02111644670367241, -0.0076174139976501465, 0.005684369709342718, 0.028647789731621742, -0.009869643487036228, 0.04028191789984703, -0.006268945522606373, -0.012301191687583923, 0.008700492791831493, -0.006530749145895243, -0.05468471348285675, -0.008262957446277142, 0.010586914606392384, -0.011203767731785774, 0.020241377875208855, -0.051040977239608765, -0.018046529963612556, -0.033855173736810684, 0.014331066980957985, -0.006362190470099449, -0.01497661042958498, 0.000821723195258528, 0.009970061480998993, -0.023368677124381065, -0.014187613502144814, -0.015435663983225822, -0.00252120615914464, 0.02319653145968914, 0.011892346665263176, -0.021417701616883278, -0.014094367623329163, -0.009719016961753368, -0.008600074797868729, -0.022909624502062798, 0.01484750211238861, -0.02006923221051693, 0.00011313823779346421, -0.030125366523861885, -0.027930518612265587, 0.023110460489988327, -0.0011458398075774312, -0.002601899206638336, -0.0026198308914899826, -0.040253229439258575, 0.02841826155781746, -0.007567205000668764, -0.03265015780925751, -0.0011969453189522028, 0.008578556589782238, -0.003424967173486948, -0.006720826029777527, -0.04114264249801636, -0.010759059339761734, 0.017300568521022797, 0.0031165408436208963, -0.02085823006927967, 0.0034285536967217922, -0.012552236206829548, 0.014402794651687145, -0.019394997507333755, -0.0005159865831956267, 0.030785255134105682, -0.014051332138478756, 0.01035738829523325, 0.03471589833498001, -0.009532527066767216, -0.00023804418742656708, 0.01922285370528698, 0.04464292526245117, 0.004479355178773403, 0.041544314473867416, -0.01783134788274765, -0.02131728269159794, -0.006046591326594353, 0.007043597754091024, 0.010515187866985798, -0.01256658136844635, -0.01966756023466587, -0.03164597973227501, 0.005566020030528307, -0.008305993862450123, -0.010321523994207382, -0.002765078330412507, -0.001945596537552774, -0.003704702714458108, -0.03927773982286453, -0.018792491406202316, 0.01742967590689659, 0.017200149595737457, -0.015607808716595173, 0.002840391593053937, -0.0021679503843188286, -0.019653216004371643, -0.006344258785247803, -0.032908376306295395, -0.028030935674905777, 0.024745836853981018, -0.019782323390245438, -0.02110210247337818, 0.03233455866575241, 0.001128804637119174, 0.00023199222050607204, -0.029666313901543617, 0.009288654662668705, 0.006233081687241793, 0.0179891474545002, -0.036236513406038284, -0.019093744456768036, 0.0017653823597356677, -0.07040728628635406, 0.031072163954377174, 0.013793114572763443, -0.0010077651822939515, 0.008262957446277142, -0.004185274243354797, -0.022335806861519814, 0.01254506316035986, -0.0015403387369588017, -0.029924530535936356, -0.013549242168664932, 0.047454625368118286, -0.00953969918191433, 0.014474521391093731, -0.002218159381300211, 0.016066862270236015, 0.011045968160033226, -0.01296108029782772, 0.025219235569238663, 0.007703486364334822, -0.043983034789562225, 0.002772250911220908, -0.0010920445201918483, 0.029723694548010826, 0.02200586348772049, 0.023426059633493423, 0.014833156950771809, 0.024903636425733566, 0.004472182597965002, 0.021345974877476692, -0.007961704395711422, 0.004895371850579977, 0.029178569093346596, 0.021288592368364334, 0.011562402360141277, -0.01241595484316349, -0.02529096230864525, 0.008320339024066925, -0.00879373773932457, 0.003294065361842513, -0.0485735684633255, 0.004425559658557177, 0.05313540995121002, 0.018519926816225052, -0.02975238673388958, -0.03586352989077568, -0.03483066335320473, 0.008184057660400867, 0.005863687489181757, 0.03669556602835655, -0.019782323390245438, -0.0397367924451828, -0.026998067274689674, 0.030383583158254623, -0.007983222603797913, 0.0127387261018157, -0.008922846987843513, -0.014646666124463081, 0.008169712498784065, -0.006476953625679016, -0.02896338887512684, -0.0214033555239439, -0.0021069825161248446, -0.008894155733287334, 0.012322709895670414, 0.024114638566970825, -0.009518180973827839, -0.016698060557246208, -0.016927586868405342, 0.03511757031083107, -0.0020047714933753014, 0.026897648349404335, -0.0045331502333283424, -0.023110460489988327, 0.0059282416477799416, -0.00014771292626392096, -0.015191791579127312, -0.005576779134571552, 0.008894155733287334, -0.002243263879790902, -0.02592216059565544, -0.011605438776314259, -0.06025073304772377, -0.007703486364334822, 0.013628141954541206, 0.028992079198360443, 0.0011933590285480022, -0.01000592578202486, 0.042835403233766556, 0.01807522028684616, -0.01966756023466587, -0.021675918251276016, 0.018806835636496544, 0.013054325245320797, 0.0488891676068306, 0.01125397626310587, -0.010414769873023033, 0.004343073815107346, 0.015148756094276905, 0.007968876510858536, 0.009977234527468681, -0.0035630417987704277, 0.007839768193662167, -0.00030484001035802066, 0.03830225020647049, 0.025706980377435684, 0.040454063564538956, -0.031617291271686554, -0.051873013377189636, 0.0017375880852341652, -0.03221979737281799, -0.03878999501466751, -0.009726190008223057, 0.019509760662913322, 0.010321523994207382, -0.010070479474961758, 0.01445300318300724, -0.004450664389878511, -0.00422113761305809, 0.0012390849879011512, -0.052332065999507904, -0.025420071557164192, 0.012824798934161663, 0.01484750211238861, 0.006175700109452009, -0.017573131248354912, -0.06851369142532349, 0.004848749376833439, -0.01595209911465645, -0.0055480883456766605, 0.019036361947655678, -0.00896588247269392, 0.024473274126648903, -0.022178007289767265, 0.011813446879386902, 0.006975457072257996, -0.01122528500854969, 0.03302314132452011, 0.02583608776330948, -0.022579679265618324, -0.03457244485616684, -0.03133038058876991, -0.0031721293926239014, 0.012107528746128082, -0.0015824782894924283, 0.009747708216309547, 0.000950383604504168, 0.020298758521676064, -0.01107465848326683, 0.01609555259346962, 0.022909624502062798, 0.04263456538319588, 0.03695378452539444, -0.010773404501378536, 0.0006719929515384138, -0.003851743182167411, 0.013341234065592289, -0.008535520173609257, -0.02860475331544876, -0.01787438429892063, -0.03526102378964424, -0.008908500894904137, 0.03411339223384857, -0.00896588247269392, -0.009740535169839859, -0.028375227004289627, 0.007681968621909618, -0.00046981225023046136, 0.012523544952273369, -0.005142830312252045, 0.0025839675217866898, 0.008908500894904137, -0.02428678423166275, -0.028073972091078758, -0.005307802464812994, -0.0030250889249145985, 0.021919790655374527, 0.0016246179584413767, -0.0007585136918351054, -0.021718954667448997, -0.004213965032249689, 0.0019599420484155416, 0.029838457703590393, 0.002015530364587903, 0.004694536328315735, 0.020729120820760727, -0.017357949167490005, 8.119727863231674e-05, 0.020140958949923515, -0.00733767868950963, -0.002897773403674364, -0.010866650380194187, 0.005612642504274845, 0.02285224199295044, -0.025391381233930588, -0.03187550604343414, -0.028891660273075104, 0.0077608684077858925, 0.02622341364622116, -0.020499594509601593, -0.0004438112082425505, -0.021977171301841736, -0.030928710475564003, -0.048057131469249725, -0.02686895802617073, 0.01504833810031414, 0.0002978914708364755, 0.015435663983225822, -0.035433169454336166, 0.04891785606741905, -0.012444645166397095, -0.0047949543222785, 0.0077608684077858925, 0.03706854581832886, 0.02319653145968914, -0.0011530125048011541, 0.01331254281103611, -0.02870517037808895, 0.009317345917224884, -0.010436288081109524, 9.459006832912564e-05, 0.0011781170032918453, 0.024358510971069336, 0.0008947951137088239, 0.01559346355497837, -0.01847689226269722, 0.023928148671984673, -0.04028191789984703, 0.018763799220323563, 0.006376536097377539, -0.02001185156404972, 0.028346534818410873, 0.0048379902727901936, -0.0016075827879831195, 0.010579741559922695, 0.006139836739748716, -0.019007671624422073, 0.028475644066929817, 0.01853427290916443, -0.022981351241469383, -0.012796107679605484, 0.0043861097656190395, 0.0424337312579155, -0.0010615605860948563, -0.018692072480916977, -0.01728622242808342, -0.014338240027427673, -0.017501402646303177, -0.01708538644015789, 0.04685211926698685, -0.010199588723480701, 0.003543316852301359, -0.03069918230175972, 0.020126614719629288, 0.012250982224941254, -0.009776398539543152, -0.022938314825296402, 3.13525706587825e-05, -0.030383583158254623, 0.021001683548092842, -0.034400299191474915, -0.015779953449964523, -0.01902201771736145, 0.009769226424396038, -0.0027292147278785706, -0.022809205576777458, 0.013699868693947792, 0.005028067156672478, -0.006932420656085014], "index": 4}, {"title": "G\u00e9za Anda", "text": "G\u00e9za Anda (Hungarian pronunciation: [\u02c8\u0261e\u02d0z\u0252 \u02c8\u0252nd\u0252]; 19 November 1921 \u2013 14 June 1976) was a Swiss-Hungarian pianist. A celebrated interpreter of classical and romantic repertoire, particularly noted for his performances and recordings of Mozart, he was also a tremendous interpreter of Beethoven, Schumann, Brahms and Bart\u00f3k.In his heyday he was regarded as an amazing artist, possessed of a beautiful, natural and flawless technique that gave his concerts a unique quality.", "vector": [-0.016788292676210403, 0.008837295696139336, -0.019498568028211594, -0.02080874890089035, -0.0061591328121721745, 0.007006896659731865, 0.016672689467668533, -0.012228351086378098, 0.0063453842885792255, 0.009569455869495869, -0.051456697285175323, -0.008124403655529022, -0.002411631401628256, 0.03108467534184456, 0.007276639807969332, 0.031932439655065536, -0.06689627468585968, -0.01726355589926243, -0.0675642117857933, -0.030596569180488586, 0.02561274543404579, -0.053588952869176865, -0.013121072202920914, -0.03455280140042305, 0.04631873592734337, 0.03313986212015152, 0.009209798648953438, 0.037635575979948044, -0.021450994536280632, -0.05125118046998978, -0.007816125638782978, -0.017469072714447975, -0.022953849285840988, 0.004081469029188156, -0.030802087858319283, -0.0397164523601532, 0.05261274054646492, 0.015709321945905685, -0.010096097365021706, 0.009306135587394238, 0.029851563274860382, 0.02725689299404621, -0.025060413405299187, -0.002559347776696086, -0.007739056367427111, 0.021964790299534798, 0.046293046325445175, 0.01867649517953396, -0.03352520614862442, -0.003991554956883192, 0.012298998422920704, 0.009575878269970417, 0.027436722069978714, -0.005243933293968439, 0.02038486674427986, 0.009216221049427986, -0.002684585517272353, 0.028926730155944824, -0.017610367387533188, -0.004518195986747742, -0.009974069893360138, -0.026434818282723427, -0.06674213707447052, 0.0041007366962730885, -0.014630349352955818, -0.03501521795988083, 0.01107230968773365, 0.006615126971155405, 0.005478352773934603, 0.0020600019488483667, -0.013538531959056854, -0.03432159125804901, 0.030262600630521774, 0.026794476434588432, 0.010764031670987606, -0.047166500240564346, 0.09731301665306091, 0.03147002309560776, -0.08035773783922195, -0.01916460134088993, -0.00767483189702034, -0.03935679420828819, 0.008336344733834267, -0.002801795257255435, 0.03221502527594566, -0.04765460640192032, -0.012196239084005356, -0.05333205312490463, -0.03311416879296303, 0.0336022786796093, 0.0127935279160738, -0.030827777460217476, -0.057904839515686035, 0.05754518508911133, 0.031855370849370956, -0.04372406378388405, -0.047166500240564346, -0.012196239084005356, -0.015054231509566307, 0.030981915071606636, -0.0248163603246212, -0.04806564375758171, 0.05027496814727783, -0.03504090756177902, 0.03935679420828819, 0.051713597029447556, -0.031521402299404144, -0.04796288162469864, 0.009717172011733055, -0.0022735486272722483, 0.05369171127676964, 0.00378924747928977, 0.033653657883405685, 0.0366593636572361, -0.03108467534184456, 0.024610841646790504, -0.02030779793858528, -0.015940530225634575, -0.019794002175331116, 0.0011616612318903208, 0.009312557987868786, -0.00895289983600378, -0.02187487669289112, 0.017841575667262077, 0.010738342069089413, -0.0018239767523482442, 0.0025143905077129602, -0.023660318925976753, 0.010449332185089588, -0.02283824421465397, 0.0336022786796093, 0.04513700306415558, 0.0068591805174946785, 0.021399615332484245, 0.03457849100232124, -0.006066007539629936, 0.03296003118157387, 0.04403234273195267, -0.005359537433832884, 0.028438623994588852, -0.0034777584951370955, -0.0013695881934836507, 0.011547571048140526, -0.06288866698741913, -0.051867734640836716, -0.03298572078347206, 0.02661464735865593, 0.029543286189436913, -0.01863796077668667, -0.00969790481030941, 0.05243290960788727, -0.02897811122238636, 0.0014241790631785989, -0.06211797147989273, -0.03483538702130318, 0.01448905561119318, -0.030827777460217476, 0.008631777949631214, -0.038817308843135834, 0.059805888682603836, -0.03527211397886276, 0.015439578332006931, 0.026974305510520935, 0.03046811930835247, -0.025676969438791275, -0.006165555212646723, 0.02825879491865635, -0.016865363344550133, 0.008850141428411007, 0.06324832141399384, 0.01912606693804264, -0.03414176404476166, -0.03570884093642235, 0.022118929773569107, -0.0347583182156086, 0.04066697508096695, 0.009216221049427986, 0.008978590369224548, -0.036864884197711945, 0.012485249899327755, 0.020988577976822853, -0.03519504517316818, 0.02485489472746849, 0.012665078043937683, 0.020975733175873756, 0.000504965428262949, 0.06329970061779022, -0.025728348642587662, -0.007238104939460754, -0.01748191937804222, -0.041643187403678894, -0.007071121130138636, 0.010693385265767574, -0.02890104055404663, 0.05811036005616188, 0.013397238217294216, 0.026434818282723427, -0.014668883755803108, -0.05137962847948074, -0.02324928157031536, 0.004521407186985016, -0.04446906968951225, 0.03635108843445778, 0.0009834382217377424, -0.014553279615938663, 0.05888105556368828, -0.015568027272820473, 0.027744999155402184, -0.040230248123407364, -0.03909989818930626, 0.0484766811132431, -0.004672334995120764, 0.0044250707142055035, 0.010205279104411602, -0.009351092390716076, -0.018355371430516243, -0.016929587349295616, 0.05266411975026131, 0.015067076310515404, 0.029183628037571907, -0.007886772975325584, -0.019267359748482704, -0.012812795117497444, 0.006705041509121656, 0.049504272639751434, 0.012106324546039104, 0.027205513790249825, 0.014912936836481094, 0.039921972900629044, 0.007218837738037109, -0.007809703703969717, 0.03265175223350525, -0.009453851729631424, -0.022517122328281403, -0.011175069026648998, 0.018984772264957428, -0.024983344599604607, -0.07249665260314941, 0.020140813663601875, 0.006672929041087627, -0.04508562386035919, 0.03177829831838608, -0.017494764178991318, 0.007983109913766384, -0.014155087992548943, -0.018869169056415558, 0.01848382130265236, -0.020513316616415977, -0.01420646719634533, -0.024610841646790504, -0.007006896659731865, -0.04860512912273407, -0.027282582595944405, 0.005940769333392382, -0.026820166036486626, 0.00042709315312094986, 0.031058985739946365, 0.011887961067259312, -0.03290865197777748, 0.054616544395685196, -0.016698379069566727, 0.02715413272380829, -0.012909132055938244, 0.02260703593492508, -0.04231112450361252, -0.011971453204751015, -0.0097364392131567, -0.014874402433633804, 0.008766649290919304, 0.011457657441496849, 0.003326830919831991, 0.011245716363191605, 0.009691482409834862, -0.028361555188894272, -0.01614604890346527, -0.016698379069566727, -0.005475141573697329, 0.04061559587717056, 0.025343000888824463, -0.053743090480566025, 0.03334537893533707, 0.005253566894680262, 0.0031052562408149242, 0.018779253587126732, -0.02279970981180668, -0.02595955692231655, 0.023930061608552933, -0.01637725718319416, -0.05471930280327797, 0.012215506285429, 0.0031871425453573465, -0.026897234842181206, 0.020795904099941254, 0.026010936126112938, -0.09274023026227951, 0.05302377790212631, 0.0435185469686985, 0.03491245582699776, 0.007366554345935583, -0.015979064628481865, 0.005276045762002468, -0.024842049926519394, 0.010905326344072819, 0.010108942165970802, -0.018650805577635765, 0.003619052469730377, -0.017314935103058815, 0.01660846546292305, 0.004527829587459564, 0.024289719760417938, -0.015092765912413597, 0.018997617065906525, -0.018920548260211945, -0.016891052946448326, -0.002019861713051796, -0.013178874738514423, 0.01809847354888916, 0.040076110512018204, 0.01695527695119381, 0.017880110070109367, 0.00989057868719101, -0.021476684138178825, -0.0219519454985857, -0.03555470332503319, 0.029774494469165802, -0.0004840924229938537, -0.012363223358988762, -0.04074404388666153, 0.025522829964756966, -0.04254233092069626, -0.0006141471094451845, -0.04025593772530556, 0.0347583182156086, 0.042285434901714325, 0.04436630755662918, -0.02080874890089035, -0.019074687734246254, 0.024597996845841408, -0.017212174832820892, 0.026820166036486626, -0.026242144405841827, 0.021284010261297226, -0.009781396947801113, 0.012928399257361889, -0.038971446454524994, -0.001094225561246276, 0.039767831563949585, -0.015979064628481865, 0.01889485865831375, -0.0008493695058859885, 0.0004684377054218203, -0.007482158485800028, 0.018008559942245483, 0.06627972424030304, -0.037173159420490265, -0.005558633711189032, 0.004116792697459459, -0.0014281930634751916, -0.03134157508611679, 0.01683967374265194, 0.03948524594306946, 0.024520928040146828, -0.0031823257450014353, 0.03845765069127083, 0.0412321500480175, -0.058470018208026886, -0.02069314569234848, -0.044237859547138214, -0.014270692132413387, -0.03306278958916664, -0.004778305534273386, -0.02313367836177349, -0.027616551145911217, -0.0028740479610860348, 0.011027352884411812, 0.007989532314240932, -0.05261274054646492, 0.022427206858992577, 0.052715498954057693, 0.010327305644750595, 0.0008854957995936275, -0.026640336960554123, -0.019832536578178406, -0.005979304201900959, -0.026743097230792046, -0.00029222163720987737, 0.0011062676785513759, 0.024572307243943214, 0.024906273931264877, -0.007687676697969437, -0.063402459025383, 0.06155279651284218, -0.03188106045126915, -0.002533657941967249, -0.036479536443948746, -0.03886868804693222, 0.05322929471731186, 0.04834822937846184, 0.023043762892484665, 0.00473334826529026, 0.0339876227080822, 0.024752136319875717, -0.01668553426861763, -0.02795051783323288, -0.00818862859159708, -0.036864884197711945, -0.03367934748530388, 0.0038695281837135553, 0.023660318925976753, -0.011618218384683132, -0.009286867454648018, 0.01084110140800476, -0.03445003926753998, -0.020076589658856392, 0.0150799211114645, 0.01067411806434393, -0.005654970183968544, 0.024687912315130234, 0.02012796886265278, -0.025831108912825584, -0.00521182082593441, 0.0098327761515975, -0.020872974768280983, 0.06093623861670494, -0.032703135162591934, -0.012478827498853207, 0.0013511236757040024, -0.013358703814446926, 0.0035066595301032066, 0.030596569180488586, 0.007295907009392977, 0.011669598519802094, 0.032471925020217896, 0.005154018756002188, 0.012196239084005356, -0.08087153732776642, -0.029389146715402603, 0.011894384399056435, -0.0008646228234283626, -0.03447572886943817, 0.007199570536613464, -0.03832920268177986, -0.03272882476449013, 0.011194336228072643, -0.002506362507119775, -0.024944810196757317, -0.021977635100483894, 0.03188106045126915, 0.0018496665870770812, -0.025497140362858772, -0.00017942729755304754, -0.0664338618516922, 0.009017124772071838, 0.009068503975868225, 0.055541377514600754, 0.011348475702106953, 0.0009794242214411497, 0.021592289209365845, -0.03696764260530472, 0.0018239767523482442, 0.00030466512544080615, 0.009723594412207603, -0.0015052625676617026, -0.044648896902799606, 0.05369171127676964, 0.018470976501703262, 0.03886868804693222, -0.051867734640836716, -0.013859654776751995, 0.014000948518514633, 0.031187433749437332, -0.028618453070521355, 0.03981921076774597, -0.029851563274860382, 0.04454613849520683, -0.005006302613765001, 0.0009063687757588923, 0.010128209367394447, 0.01939580962061882, 0.023005228489637375, -0.0060210502706468105, -0.021707892417907715, 0.043158888816833496, -0.009318980388343334, 0.048168402165174484, -0.02543291635811329, 0.04891340434551239, -0.058367256075143814, -0.060730721801519394, -0.019948139786720276, -0.014553279615938663, 0.05456516519188881, -0.003419956425204873, 0.020988577976822853, -0.023159367963671684, 0.0058990237303078175, -0.023647474125027657, 0.018432442098855972, -0.021707892417907715, -0.015670787543058395, 0.0052503556944429874, -0.03311416879296303, -0.0012893076054751873, -0.022863933816552162, 0.04601045697927475, -0.05143100768327713, 9.623645019019023e-05, 0.016274496912956238, -0.0032128323800861835, -0.03825213387608528, 0.014065173454582691, 0.015670787543058395, 0.002191662322729826, 0.001377616310492158, -0.023814458400011063, -0.034270212054252625, -0.035760220140218735, -0.004004399757832289, 0.02088581956923008, 0.0015983880730345845, -0.00047606436419300735, 0.022915314882993698, 0.0009625652455724776, 0.05096859112381935, 0.029029490426182747, 0.0006819842965342104, -0.02371169812977314, 0.023223591968417168, -0.00757849495857954, -0.06931111961603165, -0.018111318349838257, -0.0086831571534276, 0.004418647848069668, -0.036068499088287354, -0.03822644427418709, 0.004319100175052881, 0.022427206858992577, -0.011354898102581501, -0.0006703435792587698, -0.028438623994588852, 0.022632725536823273, 0.021014267578721046, -0.03468124940991402, 0.04881064593791962, -0.03306278958916664, 0.002658895682543516, 0.01745622791349888, -0.06288866698741913, 0.024084201082587242, 0.006220146082341671, 0.012498094700276852, -0.01581208035349846, 0.017687436193227768, 0.008368456736207008, -0.00409431429579854, -0.0003409921482671052, -0.008426259271800518, 0.014116552658379078, 0.01641579158604145, -0.02409704588353634, 0.036479536443948746, -0.032317787408828735, 0.04482872411608696, -0.022324448451399803, -0.008060179650783539, 0.009742861613631248, 0.005035203415900469, 0.028387244790792465, -0.009620835073292255, 0.01786726526916027, 0.0003327633603475988, -0.03838058188557625, -0.015837769955396652, -0.004299832507967949, -0.026139385998249054, -0.014450520277023315, 0.04577925056219101, 0.011322785168886185, -0.017314935103058815, -0.00569992745295167, 0.012485249899327755, 0.01019243337213993, 0.04187439754605293, 0.023005228489637375, 0.05137962847948074, -0.007347286678850651, 0.03794385492801666, -0.023223591968417168, 0.041900087147951126, -0.021810652688145638, -0.008464793674647808, -0.00243892683647573, 0.014078018255531788, 0.0017886533169075847, -0.014476209878921509, -0.006197667680680752, -0.010558513924479485, 0.02065461128950119, -0.030904846265912056, -0.011149379424750805, -0.010500711388885975, -0.007347286678850651, 0.04210560396313667, 0.004938866943120956, 0.030288290232419968, -0.010320883244276047, 0.009954802691936493, 0.00924191065132618, -0.04187439754605293, -0.030211221426725388, 0.016980966553092003, 0.019832536578178406, 0.014617504552006721, -0.01741769351065159, 0.01879209838807583, 0.01338439341634512, 0.06895145773887634, 0.005719194654375315, -0.0005732039571739733, 0.02115556225180626, 0.04184870794415474, 0.007051853928714991, 0.0177516620606184, -0.003917696885764599, 0.009267600253224373, 0.035220734775066376, 0.0019315528916195035, 0.005712772253900766, -0.0381750650703907, 0.010969550348818302, -0.02833586558699608, -0.0026460508815944195, -0.020641766488552094, -0.0012877018889412284, 0.04233681410551071, 0.016711223870515823, -0.02524024248123169, -0.04061559587717056, 0.03927972540259361, 0.01641579158604145, -0.009614412672817707, 0.01452759001404047, -0.003220860380679369, -0.047783054411411285, -0.011277828365564346, 0.00786750577390194, -0.0013575460761785507, -0.014232156798243523, -0.022170308977365494, 0.021361080929636955, 0.008959322236478329, -0.03504090756177902, 0.015979064628481865, -0.012491672299802303, 0.009351092390716076, 0.01916460134088993, 0.0401018001139164, 0.004832896403968334, 0.022889625281095505, -0.01393672451376915, 0.03876592963933945, 0.0020503683481365442, -0.012851329520344734, -0.006322905421257019, 0.004595265723764896, 0.0027006417512893677, -0.03486107662320137, -0.043775442987680435, 0.01515698991715908, 0.046678394079208374, 0.014823023229837418, -0.020436247810721397, 0.0021515218541026115, -0.03707040101289749, 0.03594005107879639, -0.028156036511063576, -0.0013695881934836507, -0.0439038909971714, 0.015336818993091583, 0.004033301025629044, 0.029157938435673714, 0.02661464735865593, 0.002360251732170582, -0.0086831571534276, -0.028798282146453857, -0.006583014968782663, -0.04053852707147598, 0.02882397174835205, 0.019113222137093544, 0.005895812530070543, -0.032780203968286514, -0.021977635100483894, 0.005295312963426113, 0.06119313836097717, -0.01610751263797283, -0.0001550420420244336, 0.005362748634070158, 0.006743576377630234, -0.030673637986183167, -0.0032802680507302284, -0.05322929471731186, 0.06982491165399551, 0.022825399413704872, -0.018689339980483055, 0.014347760938107967, 0.0017051614122465253, 0.018946237862110138, -0.023390576243400574, -0.010128209367394447, -0.021592289209365845, 0.005658181384205818, 0.026434818282723427, -0.05769932270050049, -0.004659490194171667, -0.047860123217105865, 0.015799235552549362, -0.024032821878790855, -0.05166221782565117, -0.0126008540391922, 0.007809703703969717, -0.022619880735874176, 0.0032545782160013914, -0.016158893704414368, -0.04523976147174835, -0.0020696355495601892, -0.02561274543404579, 0.021245475858449936, 0.0355033241212368, -0.013769740238785744, 0.02175927348434925, -0.03573453053832054, 0.022131774574518204, 0.027976207435131073, -0.007617029827088118, -0.013628446497023106, -0.02676878683269024, 0.014784487895667553, -0.01433491613715887, 0.035760220140218735, 0.024122735485434532, -0.013988103717565536, 0.037815406918525696, -0.012363223358988762, -0.021784963086247444, -0.006640817038714886, -0.006865602917969227, -0.008882253430783749, 0.023737387731671333, -0.013692670501768589, 0.049041856080293655, -0.0051122731529176235, 0.029260698705911636, 0.0038438383489847183, 0.004823262803256512, 0.00163692282512784, 0.004145693965256214, 0.013499997556209564, -0.0336022786796093, 0.004177805967628956, -0.007000474259257317, 0.004759037867188454, 0.002316900063306093, -0.011380587704479694, -0.0051636528223752975, -0.015015696175396442, 0.04529114067554474, 0.02638343907892704, -0.018843479454517365, -0.02249143272638321, -0.00989057868719101, -0.013255944475531578, 0.00864462275058031, -0.013872499577701092, 0.04721787944436073, 0.0442892387509346, -0.020564695820212364, 0.024495238438248634, 0.0016923164948821068, 0.004447549115866423, 0.015722166746854782, -0.035297803580760956, 0.019537104293704033, -0.021772118285298347, 0.015452423132956028, -0.03257468342781067, -0.04413510113954544, -0.004537463653832674, -0.015221214853227139, -0.017584677785634995, 0.007071121130138636, -0.060114163905382156, -0.0074757360853254795, -0.03139295428991318, -0.058624155819416046, -0.01558087207376957, -0.02890104055404663, 0.02470075711607933, -0.016659844666719437, 0.0036351087037473917, -0.006660084240138531, 0.011483347043395042, -0.03994766250252724, 0.03180399164557457, -0.04737201705574989, 0.02375023253262043, -0.01254305150359869, -0.015002851374447346, 0.005314580164849758, -0.043158888816833496, 6.04613778705243e-05, -0.011329208500683308, -0.013358703814446926, -0.032471925020217896, -0.0036062076687812805, 0.009691482409834862, 0.018535200506448746, -0.014823023229837418, -0.004874642007052898, 0.006794956047087908, 0.009222643449902534, -0.033088479191064835, 0.02982587367296219, -0.045265451073646545, -0.012857751920819283, 0.022632725536823273, 0.005154018756002188, -0.0021242264192551374, 0.006717886310070753, 0.01558087207376957, 0.016094667837023735, -0.012844907119870186, -0.03141864389181137, -0.03077639825642109, 0.0056967162527143955, -0.008387723937630653, 0.0031213124748319387, 0.020153658464550972, 0.015632251277565956, -0.0005017541698180139, 0.045496661216020584, 0.016248807311058044, 0.0011191124795004725, -0.002980018500238657, -0.01424500159919262, 0.006406397558748722, 0.0012788710882887244, -0.026640336960554123, -0.03331968933343887, -0.01993529498577118, -0.025330156087875366, -0.01622311770915985, -0.007873928174376488, 0.005571478512138128, 0.030031392350792885, -0.005500831641256809, 0.007096811197698116, 0.028310175985097885, -0.019485723227262497, -0.010340150445699692, -0.02715413272380829, 0.03981921076774597, 0.02707706391811371, -0.011798047460615635, -0.014630349352955818, 0.026409128680825233, -0.004967767745256424, 0.0023843359667807817, -0.038200754672288895, -0.03362796828150749, -0.011213603429496288, -0.04755184426903725, 0.009550188668072224, 0.05548999831080437, -0.039999041706323624, -0.01817554421722889, 0.08010084182024002, -0.025599900633096695, 0.0021611556876450777, -0.025381537154316902, -0.012934821657836437, 0.03439866006374359, 0.018149854615330696, 0.02156659960746765, -0.015144145116209984, 0.0223372932523489, 0.03344813734292984, -0.03303709998726845, 0.01244671456515789, -0.04575355723500252, 0.03845765069127083, 0.0171864852309227, -0.0013085749233141541, -0.037815406918525696, -0.01600475423038006, 0.012305420823395252, 0.022478587925434113, -0.028053276240825653, -0.00023140902339946479, -0.043775442987680435, 0.0026894023176282644, 0.0010637188097462058, 0.023185057565569878, -0.0027166977524757385, 0.05055755376815796, -0.05785346031188965, -0.043313026428222656, -0.0012395335361361504, -0.03421883285045624, -0.0052824681624770164, -0.004980612546205521, 0.021206941455602646, 0.04025593772530556, 0.032548993825912476, -0.02446954883635044, -0.015298284590244293, -0.022311603650450706, -0.020705990493297577, -0.0412321500480175, 0.04680684208869934, -0.008484060876071453, -0.01120718102902174, -0.025638435035943985, 0.015246904455125332, -0.004575998056679964, -0.005558633711189032, -0.04436630755662918, -0.02779637835919857, 0.006884870119392872, -0.00204715714789927, -0.010494288988411427, -0.016929587349295616, -0.015940530225634575, -0.01626165211200714, 0.02524024248123169, 0.018239768221974373, 0.008946477435529232, -0.035374872386455536, 0.0295946653932333, 0.010963127948343754, -0.010590625926852226, 0.02717982418835163, 0.011502614244818687, 0.051148418337106705, 0.027308272197842598, -0.01588914915919304, -0.012979778461158276, -0.05502758175134659, 0.003222465980798006, 0.0064641996286809444, 0.008349189534783363, -0.01244671456515789, -0.028644142672419548, 0.0022494643926620483, -0.004017244558781385, 0.00507694948464632, -0.006181611679494381, 0.0051829200237989426, -0.02715413272380829, 0.01653139479458332, 0.04254233092069626, -0.016711223870515823, 0.03935679420828819, -0.029312077909708023, 0.013898189179599285, 0.012838484719395638, -0.02810465730726719, -0.024649376049637794, 0.033191241323947906, -0.03838058188557625, -0.0074950032867491245, -0.03326831012964249, 0.019729778170585632, -0.0031164956744760275, 0.0037282342091202736, 0.00522145489230752, -0.03272882476449013, -0.039305415004491806, 0.02287677861750126, 0.009447429329156876, 0.002385941566899419, -0.006814223248511553, 0.025574209168553352, -0.0004106356354895979, 0.011155801825225353, 0.01608182303607464, -0.054205507040023804, -0.02897811122238636, -0.008098714053630829, 0.011097999289631844, 0.01034657284617424, -0.048964787274599075, -0.025291621685028076, 0.037481438368558884, 0.0015783179551362991, 0.021810652688145638, 0.007411511614918709, -0.018162699416279793, -0.02967173606157303, -0.0021772116888314486, -0.006865602917969227, -0.018047094345092773, -0.07809703797101974, -0.0035837290342897177, -0.03868886083364487, -0.01374405063688755, 0.06170693412423134, 0.009453851729631424, -0.0030570877715945244, -0.014553279615938663, 0.026023780927062035, 0.004026878159493208, -0.026126541197299957, 0.016557084396481514, 0.024919120594859123, 0.02913224883377552, 0.022003326565027237, -0.01734062470495701, -0.0227226410061121, 0.00836203433573246, 0.037327300757169724, 0.03457849100232124, -0.018509510904550552, -0.034989528357982635, 0.02967173606157303, -0.010076829232275486, 0.03825213387608528, 0.018843479454517365, -0.04082111641764641, -0.00329792988486588, -0.032934341579675674, 0.03257468342781067, -0.0008176586125046015, 0.0007193147903308272, -0.0008557919063605368, -0.03470693901181221, 0.024610841646790504, -0.010815411806106567, -0.022118929773569107, -0.054051369428634644, 0.011059464886784554, 0.020834438502788544, -0.019023306667804718, -0.02287677861750126, -0.020102279260754585, -0.010731919668614864, -0.02684585563838482, -0.009704327210783958, 0.001135168713517487, 0.0033846329897642136, -0.020397711545228958, -0.0012852934887632728, -0.009607990272343159, 0.005532943643629551, 0.004344789776951075, 0.0043929582461714745, -0.00010426451626699418, -0.017623212188482285, -0.017494764178991318, -0.011412699706852436, -0.013846809975802898, 0.0006390341441147029, -0.04184870794415474, 0.011059464886784554, -0.04462320730090141, -0.003840627148747444, -0.012170549482107162, 0.05094290152192116, 0.009325402788817883, -0.02283824421465397, 0.015041385777294636, -0.008586820214986801, -0.020025210455060005, -0.017353469505906105, 0.006865602917969227, -0.0038277823477983475, -0.006615126971155405, -0.0204234030097723, -0.028310175985097885, 0.0099291130900383, -0.021810652688145638, 0.032857272773981094, -0.0068463352508842945, -0.018843479454517365, -0.026010936126112938, -0.018920548260211945, -0.02764224074780941, 0.015041385777294636, 0.03306278958916664, 0.03054518811404705, -0.009537343867123127, -0.004582420457154512, -0.00288207596167922, 0.02375023253262043, -0.02256850153207779, -0.0389457568526268, -0.01267792284488678, -0.0009208192932419479, -0.07383252680301666, -0.012254041619598866, 0.004007610958069563, 0.025869643315672874, -0.035066597163677216, 0.019755467772483826, -0.0124081801623106, 0.0007739056600257754, 0.011887961067259312, -0.011579683981835842, -0.01641579158604145, 0.008233585394918919, 0.03493814542889595, -0.011175069026648998, 0.020821593701839447, -0.01821407862007618, -0.01703234761953354, 0.022504277527332306, 0.05975450947880745, 0.029646046459674835, -0.02390437200665474, -0.030493808910250664, 0.02439247816801071, -0.03712178021669388, -0.003050665371119976, 0.02179780788719654, 0.012530206702649593, -0.006454566027969122, 0.0059504033997654915, -0.013069692999124527, 0.008766649290919304, 0.005940769333392382, 0.010410796850919724, -0.0021964791230857372, -0.02061607502400875, 0.016749758273363113, 0.011483347043395042, 0.015362508594989777, -0.019614173099398613, -0.004913176875561476, -0.03830351307988167, -0.015298284590244293, -0.0401018001139164, -0.0015967824729159474, 0.006666506640613079, -0.01223477441817522, 0.042439572513103485, -0.03344813734292984, 0.004126426298171282, -0.0010259869741275907, -0.022774020209908485, 0.0008076235535554588, 0.0030892002396285534, -0.006583014968782663, -0.02386583760380745, 0.012247619219124317, 0.011598951183259487, 0.04834822937846184, 0.001353532075881958, 0.008773071691393852, 0.010134631767868996, -0.01726355589926243, -0.031213123351335526, -0.017392003908753395, 0.012292576022446156, -0.00581232039257884, 0.003490603528916836, -0.0043608457781374454, -0.010436487384140491, -0.012979778461158276, -0.046061836183071136, -0.008753804489970207, 0.01978115737438202, 0.026871545240283012, 0.007591340225189924, -0.008612509816884995, -0.028310175985097885, 0.00714819086715579, -0.015863459557294846, 0.010905326344072819, -0.027847759425640106, 0.0027118809521198273, 0.01691674254834652, 0.04143767058849335, -0.016544239595532417, -0.025458605960011482, -0.011772356927394867, 0.003177508944645524, 0.013133917935192585, 0.011521881446242332, -0.01680113933980465, 0.011457657441496849, 0.03462987020611763, -0.016171738505363464, -0.0009906634222716093, -0.014514745213091373, -0.00822716299444437, 5.6497519835829735e-05, -0.02423834055662155, -0.010764031670987606, 0.009286867454648018, 0.013031158596277237, 0.03452711179852486, 0.013448617421090603, -0.004983823746442795, 0.030725017189979553, -0.0011014507617801428, -0.014501900412142277, -0.000690413755364716, 0.009819931350648403, -0.010969550348818302, -0.007745478767901659, 0.02603662572801113, 0.002467827871441841, 0.0036094188690185547, -0.020025210455060005, 0.0037764026783406734, -0.0038952180184423923, -0.0006314074853435159, 0.010083251632750034, 0.0021852399222552776, -0.006660084240138531, -0.028798282146453857, -0.005481563974171877, 0.030596569180488586, -0.011765934526920319, -0.024944810196757317, -0.013846809975802898, -0.001516501884907484, -0.00590865733101964, -0.014630349352955818, 0.013371548615396023, -0.008715269155800343, -0.017687436193227768, -0.0006145485094748437, 0.016659844666719437, 0.006647239439189434, 0.011598951183259487, -0.02458515204489231, -0.00031128828413784504, 0.0032610008493065834, -0.0009505231282673776, 0.02715413272380829, -0.031136054545640945, -0.027693619951605797, 0.010365840047597885, 0.04539390280842781, -0.030802087858319283, -0.01618458330631256, -0.004926021676510572, -0.008991435170173645, 0.014553279615938663, 0.007784013636410236, 0.01759752258658409, 0.004502139985561371, -0.02454661764204502, 0.029723115265369415, 0.02561274543404579, -0.00975570734590292, 0.01889485865831375, -0.010956705547869205, -0.006027472671121359, 0.024264030158519745, -0.04978685826063156, -0.024752136319875717, 0.01920313574373722, -0.006075641140341759, -0.005285679362714291, -0.018548045307397842, -0.03555470332503319, -0.006627972237765789, 0.006634394638240337, 0.012337532825767994, 0.017584677785634995, -0.014733108691871166, 0.02577972784638405, 0.007103233598172665, -0.02818172611296177, 0.01531112939119339, 0.021219786256551743, 0.006518790498375893, 0.008830873295664787, 0.005629280582070351, 0.0015060653677210212, 0.02279970981180668, -0.014938627369701862, 0.02351902425289154, 0.03493814542889595, 0.009196953848004341, 0.00016357186541426927, -0.014514745213091373, -0.029183628037571907, -0.012562318705022335, -0.0374300591647625, 0.0018496665870770812, -0.022247379645705223, 0.05096859112381935, 0.03540056571364403, -0.016390101984143257, -0.040230248123407364, 0.0032850850839167833, -0.010815411806106567, 0.005157230421900749, -0.014155087992548943, 0.022350138053297997, -0.0068591805174946785, 0.042362503707408905, 0.009884156286716461, 0.050300657749176025, -0.015465267933905125, 0.0047879391349852085, -0.005738462321460247, 0.04028162732720375, 0.010070406831800938, -0.013178874738514423, -0.00822716299444437, 0.006470622029155493, -0.009055659174919128, 0.04462320730090141, 0.029774494469165802, -0.026588957756757736, -0.025394381955266, 0.01805993914604187, -0.0061559216119349, -8.31908400868997e-05, -0.038971446454524994, 0.014103707857429981, 0.0021338602527976036, -0.002143493853509426, 0.04115508124232292, -0.051790665835142136, -0.005911868531256914, -0.02707706391811371, -0.012742147780954838, 0.022915314882993698, 0.021707892417907715, -0.01931874081492424, -0.007411511614918709, -0.00081244035391137, 0.028618453070521355, 0.022825399413704872, -0.016480015590786934, -0.0051315403543412685, 0.01726355589926243, 0.036941953003406525, -0.00012614100705832243, 0.01939580962061882, -0.01763605698943138, -0.008008799515664577, 0.016582775861024857, 0.024084201082587242, -0.02554851956665516, -0.026023780927062035, -0.017404848709702492, 0.028001897037029266, 0.033807795494794846, 0.001767780282534659, 0.0005475141806527972, -0.028644142672419548, -0.0065541137009859085, 0.029337767511606216, -0.003323619719594717, -0.0009633680456317961, 0.012318265624344349, 0.016929587349295616, 0.01641579158604145, -0.016274496912956238, -0.010513556189835072, 0.006647239439189434, 0.04585631936788559, -0.007250950206071138, -0.017854420468211174, -0.04249095171689987, 0.013076115399599075, 0.007456468418240547, -0.04246526211500168, 0.011380587704479694, 0.006608704570680857, 0.006794956047087908, 0.0018159487517550588, 0.016120359301567078, -0.0011640697484835982, 0.009871311485767365, 0.011695288121700287, 0.00198614364489913, 0.014386296272277832, -0.002657290082424879, -0.018740719184279442, 0.01067411806434393, -0.0032256771810352802, -0.00315021350979805, -0.05292101576924324, 0.013628446497023106, 0.01025023590773344, 0.007026164326816797, 0.004216340836137533, -0.047705985605716705, 0.00501272501423955, -0.008792338892817497, 0.02489342913031578, -0.030057081952691078, 0.03288296237587929, 0.011920074000954628, -0.004126426298171282, 0.017957180738449097, 0.0014354183804243803, 0.03226640820503235, -0.035683151334524155, -0.010924593545496464, 0.01951141469180584, -0.00011751082638511434, 0.03989627957344055, 0.038817308843135834, -0.0005001485696993768, 0.007899617776274681, -0.009254755452275276, 0.01236964575946331, -0.017443383112549782, 0.02890104055404663, 0.02603662572801113, 0.011830159462988377, -0.020179349929094315, 0.028772592544555664, -0.003320408519357443, -0.04058990627527237, 0.007989532314240932, 0.008708846755325794, 0.010070406831800938, 0.03352520614862442, 0.028078967705368996, 0.013063270598649979, -0.03134157508611679, -0.030725017189979553, 0.014604659751057625, -0.01637725718319416, 0.008021644316613674, -0.012607276439666748, 0.028849661350250244, -0.0019074686570093036, -0.009254755452275276, 0.024302564561367035, 0.003203198779374361, -0.009922690689563751, 0.007751901634037495, -0.03722454234957695, 0.011868693865835667, 0.007013319060206413, -0.025420071557164192, 0.017648901790380478, -0.04051283746957779, -0.024803515523672104, 0.016017599031329155, -0.0036543761380016804, 0.01038510724902153, 0.058932434767484665, -0.01338439341634512, -0.010038294829428196, 0.0034039004240185022, 0.045111313462257385, 0.025381537154316902, 0.04868219792842865, 0.001229899819009006, 0.023891527205705643, 0.023852992802858353, -0.017276400700211525, 0.016197428107261658, -0.08410844951868057, -0.030416740104556084, -0.029543286189436913, -0.01342292781919241, 0.02974880486726761, -0.01825261302292347, -0.017995715141296387, -0.01649286039173603, -0.004633800126612186, 0.01943434402346611, 0.007668409496545792, 0.0246236864477396, 0.02866983227431774, -0.02367316372692585, -0.019832536578178406, -0.003962653689086437, -0.045907698571681976, -0.009614412672817707, -0.007360131945461035, 0.002952723065391183, 0.021707892417907715, -0.00757849495857954, 0.02493196539580822, -0.018997617065906525, 0.011701710522174835, 0.0173791591078043, -0.0013045609230175614, -0.0038245711475610733, 0.03909989818930626, -0.008837295696139336, -0.008394146338105202, -0.008830873295664787, 0.0009336642106063664, 0.0008854957995936275, 0.006255469750612974, -0.03645384684205055, 0.013718361034989357, 0.0008028066949918866, -0.013063270598649979, 0.01511845551431179, -0.007572072558104992, -0.013397238217294216, 0.013121072202920914, 0.027462411671876907, -0.01630018651485443, -0.020911509171128273, -0.003946597687900066, 0.021695047616958618, -0.023583250120282173, -0.0024726446717977524, 0.02206755056977272, 0.002753627020865679, -0.0067243087105453014, 0.027539480477571487, 0.008272119797766209, 0.00046201524673961103, 0.009389626793563366, 0.014964316971600056, -0.007976687513291836, 0.02321074716746807, -0.005722406320273876, -0.03180399164557457, -0.01924167014658451, -0.011708132922649384, -0.019614173099398613, 0.00826569739729166, -0.01993529498577118, 0.003029792569577694, 0.05466792359948158, 0.03660798445343971, 0.044237859547138214, -0.004967767745256424, 0.011252138763666153], "index": 5}, {"title": "Marge vs. the Monorail", "text": "\"Marge vs. the Monorail\" is the twelfth episode of The Simpsons\u2019 fourth season and originally aired on January 14, 1993. The plot revolves around Springfield's purchase of a monorail from a conman, and Marge's dislike of the purchase. It was written by Conan O'Brien and directed by Rich Moore. Guest stars include Leonard Nimoy as himself and Phil Hartman as Lyle Lanley.", "vector": [-0.019495300948619843, -0.020162204280495644, -0.025202756747603416, 0.006118453573435545, -0.008142429403960705, -0.013849884271621704, -0.009445217438042164, 0.017618665471673012, -0.029638441279530525, 0.0849914476275444, -0.0018650039564818144, 0.012267926707863808, -0.03560955449938774, 0.012089568190276623, 0.035237330943346024, 0.009476236067712307, -0.032104432582855225, 0.0029758638702332973, 0.009724386967718601, 0.01561019942164421, 0.00892565306276083, 0.0330970361828804, 0.004579146858304739, 0.05797409638762474, 0.005121975671499968, 0.009522764943540096, -0.009111765772104263, 0.007669392507523298, -0.02442728728055954, -0.004931985400617123, -0.039393845945596695, -0.004579146858304739, 0.004334873985499144, 0.008235485292971134, 0.006102944258600473, 0.013772336766123772, 0.01592814177274704, 0.02241106703877449, -0.0321974903345108, -0.002266309456899762, 0.014989824034273624, -0.023372648283839226, 0.00970887765288353, -0.03421371057629585, -0.007502666674554348, 0.019976092502474785, -0.03619891405105591, -0.008607710711658001, 0.0004723093588836491, -0.006250283680856228, 0.004873825237154961, -0.01367152575403452, 0.0335623174905777, 0.02138744667172432, -0.0272965244948864, 0.016936251893639565, 0.002588129136711359, 0.0301967803388834, -0.01820802129805088, -0.03976607322692871, 0.02188374660909176, -0.019650395959615707, -0.006316198501735926, 0.042247574776411057, -0.031344473361968994, 0.012291190214455128, -0.01557142660021782, 0.008041618391871452, 0.042247574776411057, -0.014446995221078396, 0.043147120624780655, 0.017727231606841087, -0.00885586068034172, 0.019247151911258698, 0.038804490119218826, 0.010895345360040665, 0.002359365811571479, -0.010228442028164864, -0.03843226656317711, -0.01682768575847149, -0.010174158960580826, -0.023729365319013596, 0.018052928149700165, 0.053569428622722626, 0.05329025909304619, 0.008786068297922611, 0.06315422803163528, -0.061044953763484955, 0.029095612466335297, -0.0037649041041731834, 0.036881327629089355, 0.047986049205064774, 0.0010594851337373257, 0.0016052217688411474, -0.041813310235738754, -0.02734305150806904, 1.7372332877130248e-05, 0.012834019027650356, -0.00127467792481184, 0.03989014774560928, 0.01077902503311634, -0.028971537947654724, 0.02993311919271946, 0.013299300335347652, 0.044046662747859955, 0.0187973789870739, -0.018192512914538383, -0.0003489612427074462, -0.009879480116069317, 0.03260073438286781, -0.006521698087453842, 0.0007037385366857052, -0.0031193257309496403, -0.036757249385118484, 0.025264794006943703, -0.010313743725419044, 0.005195645149797201, -0.004164271056652069, -0.011399400420486927, -0.035237330943346024, -0.019712433218955994, -0.05508934706449509, -0.0545930489897728, -0.011236552149057388, -0.002615270670503378, 0.017246440052986145, -0.011725097894668579, 0.0035012445878237486, -0.001704094116576016, -0.005509710405021906, 0.015106144361197948, 0.04578371345996857, -0.03204239532351494, -0.02148050256073475, -0.008266503922641277, -0.019619377329945564, -0.0648912787437439, -0.014726164750754833, 0.055895835161209106, 0.025357849895954132, -0.05561666935682297, 0.05493425577878952, -0.012066304683685303, 0.024768494069576263, 0.017122365534305573, -0.021682124584913254, -0.036881327629089355, 0.080524742603302, 0.010988402180373669, -0.008902388624846935, 0.04054154083132744, -0.004939740058034658, -0.01062393095344305, 0.03038289211690426, 0.04125497490167618, 0.03750170022249222, -0.04029339179396629, -0.029917610809206963, -0.04721057787537575, -0.020193224772810936, -0.05208052694797516, -0.045163340866565704, 0.0009635207825340331, -0.030165761709213257, 0.007971826009452343, -0.011011665686964989, 0.05797409638762474, 0.011864682659506798, -0.04764484241604805, 0.01650198921561241, -0.03430676832795143, 0.0012378430692479014, -0.005982746835798025, -0.013880902901291847, 0.06544961780309677, 0.002041423227638006, -0.0007555980118922889, -0.012919320724904537, -0.030662061646580696, 0.016982780769467354, -0.010895345360040665, -0.013066659681499004, 0.037780869752168655, 0.039300791919231415, -0.0024233420845121145, -0.014028241857886314, -0.004365893080830574, 0.04804808646440506, 0.006102944258600473, -0.05167728289961815, 0.017959872260689735, 0.03954894095659256, 0.018363116309046745, -0.09746100008487701, 0.011089213192462921, 0.006444151047617197, -0.015315521508455276, -0.01958835870027542, -0.004272836726158857, -0.026412488892674446, -0.01870432309806347, 0.008894634433090687, 0.023682836443185806, -0.022876348346471786, -0.0014540051342919469, -0.06132412329316139, -0.0076034776866436005, 0.03055349551141262, 0.042743876576423645, -0.0015305827837437391, 0.05980420112609863, -0.0500953234732151, 0.029560893774032593, 0.026427997276186943, -0.008917898871004581, -0.001761284889653325, -0.06383664160966873, 0.016036707907915115, 0.00566868158057332, -0.014353939332067966, 0.0022818187717348337, -0.013493168167769909, 0.06681444495916367, -0.028800934553146362, -0.02376038394868374, -0.009034219197928905, -0.011089213192462921, 0.008026108145713806, -0.05431387946009636, 0.0030340240336954594, -0.047303635627031326, -0.0018058744026347995, -0.060145407915115356, 0.06495331972837448, -0.053352296352386475, 0.051336076110601425, 0.04503926634788513, -0.009677858091890812, -0.000997447525151074, -0.030615532770752907, -0.020860128104686737, 0.0460939034819603, -0.017153384163975716, 0.027622221037745476, 0.0018853601068258286, -0.00035671592922881246, 0.02264370769262314, -0.043457306921482086, -0.03033636324107647, -0.06538758426904678, -0.006800866685807705, -0.00505606085062027, 0.05958707258105278, 0.0275136549025774, 0.01022068690508604, 0.010841062292456627, 0.019340207800269127, 0.012958094477653503, -0.01236873771995306, 0.011841418221592903, -0.037873927503824234, 0.020782580599188805, -0.028149539604783058, 0.003691234393045306, -0.051553208380937576, 0.04268183559179306, -0.028552783653140068, 0.0053352294489741325, -0.022752273827791214, -0.00743675185367465, 0.04044848680496216, -0.05124301835894585, -0.012345473282039165, 0.029560893774032593, 0.028568293899297714, 0.007587968371808529, 0.056578248739242554, 0.03368639200925827, 0.010399045422673225, -0.07674045115709305, 0.022628197446465492, 0.03923875465989113, -0.01578855700790882, -0.030879192054271698, 0.05149117112159729, 0.024706456810235977, 0.01584284007549286, 0.009297878481447697, -0.036167893558740616, -0.015175936743617058, -0.0066031222231686115, -0.013369092717766762, 0.05288701504468918, 0.030413910746574402, 0.03886652737855911, 0.013896412216126919, 0.05108792707324028, 0.015144918113946915, 0.0037048051599413157, 0.020239751785993576, -0.016889724880456924, 0.043426286429166794, -0.000159819406690076, 0.026815732941031456, 0.02487706020474434, -0.011507966555655003, 0.011601022444665432, 0.05713658779859543, -0.04144108667969704, -0.033034998923540115, 0.02312449924647808, 0.016315877437591553, -0.0034857350401580334, -0.008871369995176792, -0.030088214203715324, 0.03691234439611435, 0.017572136595845222, 0.01749459095299244, 0.007328186184167862, -0.011911210604012012, 0.031034287065267563, 0.028971537947654724, -0.011283080093562603, 0.009041973389685154, 0.020007111132144928, 0.013586224056780338, 0.0033442119602113962, -0.03135998547077179, -0.022426575422286987, 0.03793596476316452, -0.005571747664362192, 0.008421598002314568, -0.028568293899297714, 0.017975380644202232, -0.0035109377931803465, -0.10720089077949524, -0.02307797037065029, -0.020829109475016594, -0.02411709912121296, 0.0028808689676225185, 0.00023748751846142113, 0.015641218051314354, 0.03604381904006004, -0.00538951251655817, -0.03278684616088867, -0.03905263915657997, 0.0009843615116551518, 0.0025939452461898327, 0.02523377537727356, -0.010864326730370522, 0.0007885554805397987, -0.003123203059658408, -0.008204466663300991, -0.02492358721792698, -0.017680702731013298, -0.007014120928943157, 0.015137162990868092, 0.012035285122692585, 0.03719151392579079, -0.003348089288920164, 0.03644706308841705, -0.017680702731013298, 0.00821222085505724, -0.02894051931798458, -0.004548128228634596, -0.004377524834126234, -0.0469934456050396, 0.005021164659410715, -0.03719151392579079, -0.028242597356438637, -0.01999160274863243, 0.0013279913691803813, -0.017075836658477783, -0.07674045115709305, 0.09094705432653427, -0.030972249805927277, 0.0194642823189497, 0.03722253441810608, -0.010654949583113194, 0.012787491083145142, -0.003993667662143707, 0.010267214849591255, -0.021713143214583397, 0.037284571677446365, -0.034151673316955566, 0.015780802816152573, -0.040014222264289856, -0.037998002022504807, 0.03731558844447136, -0.011771625839173794, -0.01223690714687109, 0.005261559970676899, -0.015625709667801857, -0.003381046699360013, 0.02957640402019024, -0.010073347948491573, 0.007444506511092186, 0.019448773935437202, 0.07190152257680893, -0.00481954263523221, 0.00636272644624114, -0.0011767748510465026, 0.010654949583113194, -0.0019357656128704548, -0.04097580537199974, 0.019200623035430908, 0.013144207186996937, -0.0006184368976391852, -0.0007914634770713747, -0.03159262612462044, 0.043550364673137665, 0.010662704706192017, 0.0018989307573065162, -0.03852532058954239, 0.039610978215932846, -0.00739410100504756, 0.003745517460629344, 0.018983490765094757, 0.018580246716737747, 0.053166184574365616, 0.013043396174907684, 0.07016447186470032, 0.06476720422506332, 0.05909077078104019, -0.02693980745971203, 0.06538758426904678, -0.0010604544077068567, 0.012834019027650356, -0.060052353888750076, -0.0165485180914402, 0.0150983901694417, -0.014555561356246471, -0.0357956700026989, 0.018363116309046745, 0.019262660294771194, 0.055368516594171524, -0.012647906318306923, 0.07270801067352295, 0.03731558844447136, 0.01994507387280464, 0.026071282103657722, 0.0067659709602594376, -0.012880546972155571, -0.025528453290462494, 0.014640863053500652, 0.007774081081151962, -0.03104979544878006, -0.022969404235482216, 0.002303144196048379, 0.03700540214776993, -0.02269023470580578, -0.01505186129361391, -0.041627198457717896, 0.03319009020924568, 0.013221753761172295, 0.02155805006623268, -0.008080391213297844, -0.02196129411458969, -0.006188245955854654, 0.02421015501022339, 0.034027598798274994, -0.004811787977814674, 0.03238360211253166, -0.0492267981171608, 0.0140902791172266, -0.02501664310693741, -0.011042684316635132, 0.05564768612384796, -0.005971114616841078, -0.033128052949905396, -0.015152672305703163, 0.010631686076521873, -0.05409674718976021, 0.018037419766187668, 0.023775892332196236, -0.021945785731077194, -0.020053640007972717, -0.012663415633141994, 0.014578824862837791, -0.021496012806892395, -0.031515076756477356, 0.037998002022504807, -0.045256394892930984, -0.012399756349623203, 0.06250283867120743, 0.04925781860947609, 0.04215451702475548, -0.018130475655198097, -0.05856345221400261, -0.008491390384733677, 0.03923875465989113, -0.03750170022249222, -0.009701122529804707, -0.01678115874528885, 0.009367670863866806, 0.061665330082178116, 0.02188374660909176, -0.0019435202702879906, -0.0015577242011204362, -0.026148829609155655, 0.006785357370972633, 0.026583092287182808, 0.07177744805812836, -0.03588872402906418, -0.011042684316635132, -0.03405861556529999, 0.022380048409104347, -0.015897123143076897, 0.02509419061243534, -0.014865748584270477, 0.06433294713497162, 0.035051219165325165, 0.07798120379447937, 0.023186536505818367, -0.02397751435637474, -0.004222431220114231, 0.009964781813323498, 0.027048373594880104, 0.018719831481575966, -0.016005689278244972, 0.010864326730370522, 0.008894634433090687, -0.0008161815931089222, 0.04702446609735489, -0.021170316264033318, 0.01802190952003002, 0.008150183595716953, -0.002780057955533266, 0.011771625839173794, 0.006994734052568674, 0.01570325531065464, 0.04280591383576393, -0.021263372153043747, 0.0016653205966576934, -0.0033694147132337093, -0.02822708711028099, -0.03992116451263428, 0.04156516119837761, 0.005800511222332716, -0.017277458682656288, -0.02604026347398758, -0.00754919508472085, -0.0019696922972798347, 0.012353228405117989, 0.01882839761674404, 0.008809332735836506, -0.014951050281524658, -0.026288414373993874, 0.011787135154008865, -0.021821709349751472, 0.023295100778341293, 0.003322886535897851, -0.0026870016008615494, 0.04488417133688927, -0.042433686554431915, 0.0015451228246092796, -0.014183335937559605, -0.021061750128865242, 0.008886879310011864, 0.0025687424931675196, -0.026024753227829933, -0.00465281680226326, -0.0015964977210387588, -0.0012329963501542807, -0.021945785731077194, 0.033034998923540115, -0.014578824862837791, 0.03300397843122482, -0.06017642840743065, -0.004121620208024979, 0.022736763581633568, 0.043457306921482086, 0.04196840524673462, -0.022876348346471786, -0.006207632832229137, 0.02711041085422039, 0.009623575955629349, 0.023558761924505234, -0.045876771211624146, -0.007987335324287415, 0.011127986013889313, 0.04454296454787254, 0.03855634108185768, 0.007126564159989357, -0.025171738117933273, 0.0005224725464358926, -0.038680415600538254, 0.004365893080830574, 0.011771625839173794, 0.04311610013246536, 0.05561666935682297, 0.03660215809941292, 0.03188730403780937, -0.011213287711143494, -0.004109987989068031, 0.010003555566072464, -0.006948206108063459, -0.011275325901806355, 0.0037610267754644156, -0.038091059774160385, 0.018533719703555107, -0.032104432582855225, -0.007355327717959881, 0.010980647057294846, -0.043736476451158524, 0.0014423731481656432, 0.015044107101857662, -0.0042650820687413216, 0.02473747543990612, -0.011779380962252617, -0.0505606085062027, 0.018580246716737747, -0.0051491172052919865, 0.024799512699246407, 0.009949272498488426, -0.018052928149700165, 0.0008244209457188845, 0.008941162377595901, 0.027947917580604553, -0.01107370387762785, 0.020301789045333862, 0.027389580383896828, 0.008762804791331291, -0.0012436590623110533, -0.029064593836665154, 0.006537207402288914, -0.015493879094719887, 0.0635264590382576, -0.03154609724879265, -0.006021520122885704, 0.00014624868344981223, 0.039083659648895264, 0.02376038394868374, -0.01140715554356575, 0.006172736641019583, -0.002960354555398226, -0.007653883192688227, -0.013058905489742756, 0.000980484182946384, 0.01422986388206482, -0.010903100483119488, -0.013857638463377953, -0.0051607489585876465, 0.05403470993041992, -0.015137162990868092, 0.02219393476843834, 0.017370514571666718, 0.012733208015561104, 0.0183476060628891, 0.017866816371679306, 0.0004909691051580012, 0.03824615105986595, -0.006626386195421219, 0.013051150366663933, 0.035144273191690445, -0.04904068633913994, -0.006855149753391743, -0.04761382192373276, -0.0034159428905695677, 0.040417466312646866, -0.011624286882579327, 0.05015736445784569, -0.012159360572695732, 0.054065730422735214, -0.013407866470515728, 0.005788879469037056, 0.03294194117188454, 0.015858350321650505, -0.0004599503008648753, 0.03480306640267372, 0.013345829211175442, 0.044760096818208694, -0.05664028599858284, -0.0015674176393076777, -0.0010061715729534626, -0.00885586068034172, -0.023108989000320435, 0.04379851371049881, -0.013609488494694233, 0.013656016439199448, 0.005374003201723099, 0.00970887765288353, -0.013624997809529305, -0.04085173085331917, -0.012066304683685303, -0.0017254194244742393, -0.005707454867660999, -0.009499500505626202, -0.006161104422062635, -0.016796667128801346, -0.006199878174811602, -0.0008186048944480717, -0.0002063475694740191, 0.06973021477460861, 0.010592912323772907, -0.026071282103657722, -0.023915477097034454, 0.007483279798179865, 0.013617243617773056, -0.004172025714069605, -0.027281014248728752, 0.0033500278368592262, -0.03149956837296486, 0.0069210645742714405, -0.015912633389234543, 0.008654238656163216, -0.009034219197928905, -0.04308508336544037, -0.00116611213888973, 0.008320786990225315, -0.005273192189633846, 0.021356428042054176, 0.006040906999260187, -0.004745872691273689, 0.016719121485948563, -0.04866846278309822, -0.00772755267098546, -0.014167826622724533, -0.018595756962895393, -0.0057578603737056255, 0.038587357848882675, 0.017789268866181374, -0.028878482058644295, -0.02272125519812107, -0.005362370982766151, 0.005292579066008329, 0.029715988785028458, 0.000669327040668577, 0.017742739990353584, -0.0055833798833191395, -0.03601279854774475, 0.0014249250525608659, -0.008313031867146492, 0.018626775592565536, 0.0234967228025198, 0.004920353647321463, 0.007487157359719276, -0.008468125946819782, 0.012624641880393028, 0.031080814078450203, 0.019185112789273262, 0.026024753227829933, 0.042030442506074905, 0.027451617643237114, -0.011942229233682156, 0.019448773935437202, 0.012787491083145142, 0.0015674176393076777, -0.008336296305060387, 8.766439714236185e-05, -0.03126692771911621, -0.017835797742009163, 0.04358138144016266, -0.00925910472869873, -0.008801577612757683, 0.030475948005914688, 0.03114285320043564, 0.008142429403960705, 0.007452261168509722, -0.013361338526010513, -0.01478820201009512, -0.026645129546523094, -0.005509710405021906, -0.0039568329229950905, -0.020193224772810936, -0.01941775530576706, 0.002126724924892187, -0.04550454765558243, -0.005342984572052956, 0.041006822139024734, 0.04109987989068031, 0.008894634433090687, 0.00027311063604429364, -0.029328253120183945, 0.04854438453912735, -0.02331061102449894, -0.013524186797440052, 0.020518921315670013, -0.018905945122241974, 0.01682768575847149, -0.011065948754549026, -0.002035607350990176, 0.046466127038002014, 0.03213545307517052, -0.01951081119477749, -0.013586224056780338, -0.03256971761584282, 0.00153542950283736, 0.010577403008937836, 0.03905263915657997, 0.0023050829768180847, -0.021852727979421616, -0.01614527404308319, 0.016936251893639565, -0.006068048067390919, -0.01882839761674404, 0.03632298856973648, 0.024442795664072037, -0.006859027314931154, 0.01270994357764721, -0.015160427428781986, -0.014074769802391529, 0.012291190214455128, -0.01856473833322525, 0.009654594585299492, -0.012314454652369022, -0.00026899095973931253, 0.0006092281546443701, -0.011632041074335575, 0.012531585991382599, 0.015300012193620205, 0.06780704855918884, 0.015377558767795563, -0.0053817578591406345, 0.04255776107311249, 0.04311610013246536, 0.048203181475400925, -0.053755540400743484, -0.04258878156542778, -0.007859382778406143, 0.002134479582309723, 0.01955733820796013, 0.018890434876084328, 0.012446284294128418, 0.03294194117188454, 0.03539242595434189, 0.04593880847096443, 0.006638018414378166, -0.025078682228922844, 0.056795381009578705, 0.004063460044562817, 0.05986623838543892, -0.03573363274335861, -0.007622864563018084, -0.017649684101343155, 0.0023748751264065504, -0.003439206862822175, 0.03784290701150894, 0.014865748584270477, 0.0014045690186321735, -0.05968012660741806, -0.047179561108350754, -0.006444151047617197, -0.0010594851337373257, 0.006157227326184511, -0.00785162765532732, -0.005436040926724672, 0.018580246716737747, 0.005342984572052956, -0.004090601112693548, 0.00618436885997653, 0.012694434262812138, 0.014687390998005867, 0.012151606380939484, -0.03078613616526127, -0.014912277460098267, 0.037780869752168655, 0.009290123358368874, -0.0010139262303709984, 0.012120586819946766, 0.005350739229470491, 0.02675369568169117, 0.031422022730112076, -0.00821222085505724, 0.009057482704520226, 0.024442795664072037, 0.015300012193620205, 0.019216133281588554, 0.027544673532247543, -0.043860550969839096, -0.00021907011978328228, -0.005765615031123161, 0.013485413044691086, 0.012275680899620056, -0.0019396429415792227, 0.004935862962156534, -0.00932889711111784, -0.0150983901694417, 0.013741318136453629, 0.02926621586084366, -0.0015286441193893552, 0.022628197446465492, -0.005563993006944656, -0.051553208380937576, 0.006320076063275337, 0.01022068690508604, -0.0165485180914402, -0.004683835431933403, -0.01982099935412407, 0.009096256457269192, -0.0028595435433089733, 0.023202044889330864, -0.017168892547488213, 0.0012853406369686127, -0.002586190588772297, -0.00829752255231142, -0.016672592610120773, -0.029560893774032593, -0.002413648646324873, -0.011228797025978565, 0.02501664310693741, 0.011445928364992142, -0.0037048051599413157, 0.007041262462735176, -0.04016931727528572, -0.019836507737636566, 0.03601279854774475, 0.021123787388205528, 0.008724031038582325, -0.034461859613657, -0.004528741352260113, 0.027079392224550247, 0.034865107387304306, -0.005672558676451445, -0.008305277675390244, -0.03498918190598488, 0.04801706597208977, 0.0014898705994710326, 0.009468481875956059, -0.007211865857243538, -0.043023042380809784, -0.02053442969918251, 0.03985912725329399, -0.015470615588128567, 0.0006412162911146879, -0.014749428257346153, 0.044046662747859955, -0.03306601569056511, 0.018006399273872375, -0.008724031038582325, -0.011686324141919613, -0.008817087858915329, -0.014974314719438553, -0.018580246716737747, -0.009584802202880383, -0.030398402363061905, -0.009034219197928905, 0.01382661983370781, -0.02371385507285595, 0.001846586586907506, -0.0025803744792938232, 0.04693140834569931, 0.00575010571628809, 0.027839353308081627, -0.016517499461770058, 0.03477204963564873, -0.011624286882579327, 0.010026820003986359, 0.013935185968875885, -0.03588872402906418, 0.04671427980065346, 0.018192512914538383, -0.01958835870027542, -0.0033752305898815393, -0.003840512363240123, 0.01317522581666708, 0.014989824034273624, -0.02335713990032673, 0.00796407088637352, 0.013562960550189018, -0.038494303822517395, -0.02416362799704075, -0.04106885939836502, -0.007076158653944731, -0.027312032878398895, 0.013136452063918114, -0.009755405597388744, -0.017959872260689735, 0.04584575444459915, 0.009871725924313068, -0.0035070604644715786, 0.006401500198990107, -0.0013173286570236087, -0.028831953182816505, -0.00573847396299243, 0.03340722247958183, 0.022224953398108482, -0.0008622250752523541, -0.012733208015561104, 0.012229152955114841, 0.051522187888622284, -0.02532683126628399, 0.043643418699502945, 0.013229508884251118, 0.005377880297601223, 0.021728653460741043, -0.04268183559179306, -0.005331352353096008, -7.197325612651184e-05, -0.0020821355283260345, 0.025668038055300713, 0.015641218051314354, -0.037470683455467224, -0.0035109377931803465, -0.004935862962156534, 0.0420614629983902, 0.011725097894668579, -0.00478852353990078, -0.04454296454787254, 0.010143140330910683, -0.03871143236756325, -0.04407768324017525, -0.029855573549866676, -0.0029409679118543863, -0.001110859913751483, -0.0025648651644587517, -0.04175127297639847, 0.01628485880792141, -4.52862041129265e-05, -0.008002844639122486, 0.0045364960096776485, 0.010189668275415897, -0.029002556577324867, -0.0011787135154008865, 0.029111122712492943, 0.017277458682656288, 0.035547517240047455, -0.0010749944485723972, -0.032414622604846954, 0.05744677409529686, -0.03216647356748581, -0.015959160402417183, 0.016408933326601982, -0.01664157398045063, -0.0006339462706819177, -0.0158816147595644, -0.04271285608410835, -0.01977447047829628, 0.042743876576423645, 0.01937122642993927, 0.010406799614429474, -0.006467415019869804, -0.004493845161050558, -0.0008617403800599277, -0.002446606056764722, 0.015385313890874386, -0.03294194117188454, 0.07494136691093445, -0.021914765238761902, 0.012089568190276623, 0.0062386514618992805, -0.00910401064902544, -0.022380048409104347, 0.0038308189250528812, 0.0080493725836277, 0.012329963967204094, -0.00261139334179461, 0.0032259528525173664, 0.028428709134459496, -0.018456172198057175, -0.01704481802880764, 0.025714566931128502, -0.005664804019033909, -0.005505832843482494, -0.0045364960096776485, 0.024659927934408188, 0.00018780899699777365, 0.0054786913096904755, 0.0022566160187125206, -0.011872436851263046, 0.0037125598173588514, -0.007712043356150389, 0.00803386326879263, 0.011872436851263046, 0.035454463213682175, -0.0036989892832934856, 0.023543251678347588, 0.024985624477267265, 0.014074769802391529, -0.024768494069576263, 0.004296100698411465, 0.005878058262169361, -0.011554494500160217, -0.026691658422350883, -0.005447672680020332, 0.041720256209373474, -0.031080814078450203, 0.007006366271525621, 0.008941162377595901, -0.016408933326601982, 0.007568581495434046, -0.0074483840726315975, -0.01659504510462284, 0.024815021082758904, 0.0029351518023759127, -0.03923875465989113, 0.0205809585750103, 0.005199522711336613, 0.0025319077540189028, 0.02115480601787567, -0.009724386967718601, 0.018440663814544678, 0.0424957238137722, -0.03135998547077179, 0.0653255432844162, 0.03750170022249222, 0.001533490838482976, 0.030088214203715324, -0.02304695174098015, -0.06026948243379593, 0.021325409412384033, -0.02872338704764843, 0.02894051931798458, -0.03194934129714966, 0.01147694792598486, 0.007867136970162392, -0.041410066187381744, 0.0022333520464599133, -0.004683835431933403, 0.016207311302423477, -0.0033965560141950846, 0.0031891181133687496, -0.018999001011252403, 0.0035051219165325165, 0.03244563937187195, 0.01566448248922825, 0.011601022444665432, 0.002163559664040804, 0.011507966555655003, -0.00012419627455528826, 0.017742739990353584, -0.026179848238825798, -0.005870303604751825, 0.01606772653758526, -0.015773048624396324, -0.0036427676677703857, 0.012469548732042313, 0.022162916138768196, -0.03877347335219383, 0.004966881591826677, -0.02362079918384552, 0.009941518306732178, 0.030537985265254974, -0.009189312346279621, 0.005963359959423542, 0.0009436493855901062, -0.02227148227393627, -0.02084461785852909, 0.020999712869524956, 0.003660215763375163, 0.006855149753391743, -0.023899968713521957, -0.007308799307793379, -0.0021150929387658834, -0.005796634126454592, 0.011756116524338722, -0.03100326843559742, -0.014555561356246471, 0.004745872691273689, 0.006335585378110409, -0.00036955965333618224, 0.012585869058966637, 0.007793467957526445, 0.0005011471221223474, -0.02934376336634159, -0.007087790407240391, 0.017168892547488213, -0.04603186622262001, -0.013880902901291847, 0.004272836726158857, 0.019169604405760765, 0.004990145564079285, 0.0007429966353811324, 0.005664804019033909, -0.0011961616110056639, -0.009003199636936188, -0.0158816147595644, -0.02380691096186638, 0.016889724880456924, -0.0187973789870739, 0.018983490765094757, 0.03291092440485954, -0.013291546143591404, -0.04044848680496216, -0.02402404323220253, -0.014004978351294994, -0.0047962781973183155, -0.0290801040828228, 0.007107177283614874, -0.005327474791556597, 0.007677147164940834, 0.020115677267313004, -0.006564348936080933, 0.0082742590457201, 0.01228343602269888, -0.008483635261654854, -0.027839353308081627, 0.004625675268471241, 0.019836507737636566, 0.009220331907272339, -0.04016931727528572, 0.03604381904006004, 0.010530875064432621, 0.022829819470643997, -0.05000226944684982, -0.01664157398045063, -0.021371938288211823, -0.0433952696621418, 0.0006921064923517406, 0.026102300733327866, -0.02746712788939476, 0.010934119112789631, 0.05077773705124855, 0.004063460044562817, 0.01592814177274704, -0.021092768758535385, 0.012717698700726032, -0.04795502871274948, 0.009297878481447697, -0.005715209525078535, 0.024706456810235977, -0.023326121270656586, -0.020642995834350586, -0.03287990391254425, -0.005191768053919077, -0.006568226031959057, -0.01574978418648243, -0.004156515933573246, -0.027079392224550247, -0.00511034345254302, -0.05676436051726341, 0.02711041085422039, -0.02501664310693741, -0.03598178178071976, -0.015478369779884815, 0.00022573430032934994, 0.015137162990868092, -0.026908788830041885, 0.012834019027650356, -0.010592912323772907, -0.013338074088096619, -0.019123075529932976, 0.011949984356760979, -0.016626063734292984, 0.009158293716609478, 0.0017544996226206422, -0.03703641891479492, -0.011469192802906036, -0.003123203059658408, 0.002644350752234459, 0.028956027701497078, -0.0075647043995559216, 0.03213545307517052, 0.010406799614429474, 0.042216554284095764, 0.014423731714487076, 0.021806200966238976, 0.020425865426659584, -0.020425865426659584, -0.05229765921831131, -0.011934474110603333, -0.02027077041566372, -0.036571137607097626, -0.007165337447077036, -0.022116387262940407, -0.029545385390520096, 0.03350028023123741, 0.03033636324107647, -0.030181270092725754, -0.018999001011252403, 0.023202044889330864, 0.0063239531591534615, 0.0055833798833191395, 0.012818509712815285, -0.007917542941868305, 0.01046883687376976, -0.016036707907915115, -0.009476236067712307, -0.0060176425613462925, -0.005032796412706375, 0.007211865857243538, 0.016874214634299278, -0.014284146949648857, 0.03539242595434189, 0.03216647356748581, 0.02774629555642605, -0.010282725095748901, -0.0031076937448233366, -0.002500888891518116, -0.004276713822036982, 0.00591683154925704, -0.019541829824447632, 0.034337785094976425, 0.016362404450774193, 0.007382468786090612, -0.021728653460741043, -0.0292972344905138, -0.03784290701150894, -0.012097323313355446, -0.017339495941996574, 0.006606999319046736, 0.014338430017232895, 0.02200782299041748, -0.01277198176831007, -0.018999001011252403, 0.007064526434987783, 0.0005748167168349028, -0.026784714311361313, 0.03502019867300987, 0.012609132565557957, 0.02340366691350937, -0.05521342158317566, -0.02501664310693741, -0.02138744667172432, -0.020379336550831795, -0.04615594074130058, -0.011259816586971283, 0.01758764684200287, 0.009871725924313068, 0.006510065868496895, 0.06008337065577507, 0.0487615168094635, 0.0005883874255232513, 0.021496012806892395, 0.012632397003471851, -0.04035542905330658, 0.01999160274863243, 0.016889724880456924, -0.002613331889733672, -0.011670814827084541, -0.030972249805927277, -0.07072281092405319, -0.012609132565557957, 0.0013561021769419312, -0.03663317486643791, -0.01650198921561241, 0.0014152317307889462, 0.07717471569776535, 0.0032240140717476606, -0.028475238010287285, 0.018177002668380737, -0.038277171552181244, 0.014167826622724533, -0.002648228080943227, -0.006750461179763079, -0.03430676832795143, -0.013144207186996937, -0.0036815411876887083, 0.03346925973892212, 0.010647195391356945, 0.024706456810235977, -0.012849528342485428, -9.432858496438712e-05, 0.004710976965725422, 0.01754111796617508, -0.00874729547649622, 0.0003128534590359777, -0.03194934129714966, -0.02782384306192398, 0.035361405462026596, -0.011259816586971283, 0.00204723933711648, 0.009290123358368874, -0.019247151911258698, 0.0002745646343100816, 0.0234967228025198, -0.007200233638286591, 0.008778314106166363, 0.013376847840845585, 0.03855634108185768, -0.001761284889653325, 0.016486480832099915, 0.029684970155358315, -0.011523475870490074, -0.015493879094719887, -0.011151250451803207, -0.012360982596874237, -0.04392258822917938, -0.0057578603737056255, -0.040014222264289856, -0.006975347641855478, 0.013803355395793915, 0.005230541341006756, 0.008824842050671577, 0.0035361405462026596, -0.02613331936299801, 0.004327119328081608, -0.015106144361197948, -0.018130475655198097, 0.012880546972155571, -0.03275582939386368, -0.003951016813516617, 0.003892856650054455, -0.0353303886950016, -0.010050083510577679, -0.009437463246285915, 0.012764226645231247, 0.010251705534756184, -0.01118226908147335, 0.015300012193620205, 0.004897089675068855, -0.001847555860877037, 0.0016662899870425463, 0.003828880377113819, -0.008305277675390244, 0.027451617643237114, -0.021868238225579262, -0.012678924947977066, -0.0021441730204969645, 0.008382824249565601, -0.010430064052343369, -0.006467415019869804, -0.00011292773706372827, -0.04029339179396629, 0.0025067050009965897, -0.03557853773236275, -0.029049085453152657, 0.011329608038067818, -0.0038153096102178097, -0.02048790268599987, 0.012136096134781837, 0.01223690714687109, -0.01190345548093319, -0.03886652737855911, 0.01937122642993927, -0.023915477097034454, -0.019603867083787918, 0.025885170325636864, 0.03830818831920624, 0.026319433003664017, -0.016874214634299278, 0.0016333324601873755, -0.02219393476843834, -0.03247665986418724, 0.0042650820687413216, -0.013950695283710957, -0.0006116515141911805, -0.029374781996011734, -0.010934119112789631, -0.003377169370651245, -0.025931697338819504, -0.028506256639957428, 0.021402956917881966, 0.016812177374958992, 0.008871369995176792, -1.1132226973131765e-05, -0.0056997002102434635, 0.02165110595524311, 0.031918320804834366, -0.01270218938589096, -0.006215387489646673, 0.02309347875416279, -0.02421015501022339, 0.03256971761584282, 0.01927817054092884, 0.010274969972670078, 0.01986752636730671, -0.006110698916018009, 0.0014724226202815771, 0.01118226908147335, -0.023140007629990578, -0.02228699065744877, -0.008095900528132915, 0.014935540966689587, -0.0058625489473342896, 0.02680022269487381, -0.011678569950163364, -0.006095189601182938, -0.01037578098475933, -0.04144108667969704, -0.007366959471255541, -0.01084881741553545, 0.0024737475905567408, 0.00768490182235837, 0.026427997276186943, 0.004765259567648172, 0.01955733820796013, 0.02264370769262314, 0.020906655117869377, -0.003611748805269599, -0.015912633389234543, -0.008227731101214886, 0.004811787977814674, 0.017386024817824364, -0.0019396429415792227, 0.005920709110796452, 0.030351873487234116, 0.02402404323220253, -0.009809688664972782, -0.0014947173185646534, -0.0036737865302711725, 0.010205177590250969, 0.004823419731110334, 0.024086080491542816, -0.049723099917173386, -0.006459660362452269, -0.011376136913895607, -0.009003199636936188, 0.005994378589093685, 0.011825908906757832, -0.0044783358462154865, 0.02072054333984852, -0.00998029112815857, -0.01754111796617508, -0.02250412292778492, 0.028614822775125504, 0.03439982235431671, 0.007289412431418896, 0.003443084191530943, -0.012516076676547527, 0.002725775120779872, -0.0003870077198371291, -0.009902744553983212, -0.01735500618815422, -0.02245759405195713, 0.01246179360896349, -0.02680022269487381, 0.02227148227393627, 0.00545930489897728, -0.035671595484018326, 0.0088325971737504, 0.011717342771589756, -0.019448773935437202, -0.006459660362452269, -0.0015703255776315928, 0.0032530941534787416, -0.013958449475467205, -0.029995158314704895, 0.02689328044652939, 0.014408222399652004, 0.03520631045103073, 0.008313031867146492, -0.03734660893678665, -0.020022621378302574, -0.013159716501832008, 0.0447290763258934, -0.044667039066553116, -0.01963488571345806, 0.0019163788529112935, -0.016486480832099915, -0.022876348346471786, -0.02008465863764286, 0.0150983901694417, -0.030134741216897964, 0.03750170022249222, -0.023202044889330864], "index": 6}, {"title": "Quebec general election, 1989", "text": "The Quebec general election of 1989 was held on September 25, 1989, to elect members of the National Assembly of the Province of Quebec, Canada. The incumbent Quebec Liberal Party, led by Robert Bourassa, won re-election, defeating the Parti Qu\u00e9b\u00e9cois, led by Jacques Parizeau.This election was notable for the arrival of the Equality Party, which advocated English-speaking minority rights. It won four seats, but never had any success in any subsequent election.", "vector": [0.03476601466536522, 0.007190298289060593, -0.01965864561498165, 0.016584748402237892, 0.003618977963924408, 0.015810316428542137, 0.037077397108078, 0.02412651851773262, 0.030524514615535736, 0.0353379026055336, -0.05061207711696625, -0.029356909915804863, -0.0020924543496221304, -0.003788757137954235, -0.026473641395568848, 0.03128703311085701, -0.042176730930805206, 0.008608103729784489, -0.00694009754806757, -0.011610515415668488, -0.04336816072463989, -0.023471230641007423, -0.017275778576731682, 0.006153751630336046, 0.00021538874716497958, 0.012140702456235886, 0.007476242259144783, 0.02257765643298626, 0.016465604305267334, 0.03393201157450676, 0.014261453412473202, -0.006123965606093407, 0.051803506910800934, -0.02552049607038498, -0.0023054229095578194, -0.049325328320264816, 0.032883550971746445, -0.00614183722063899, 0.007214127108454704, -0.01494057010859251, 0.013701479882001877, 0.01340362150222063, -0.02230362594127655, -0.04036575183272362, 0.03383670002222061, -0.020468819886446, -0.005129119381308556, 0.020969221368432045, -0.032049547880887985, -0.013034277595579624, 0.03826883062720299, 0.040889982134103775, -0.00129642803221941, 0.04498851299285889, 0.006409909576177597, -0.028141647577285767, 0.00757751427590847, 0.021636424586176872, 0.011562857776880264, -0.045917827636003494, -0.02985731139779091, -0.005578885320574045, -0.005081461742520332, 0.007780057843774557, 0.006159708835184574, -0.023375915363430977, -0.01906292885541916, 0.031930405646562576, 0.0037440783344209194, -0.0059333364479243755, 0.03397966921329498, 0.0221487395465374, 0.008220887742936611, -0.0013165335403755307, 0.02480563521385193, 0.05432934686541557, 0.01796681061387062, -0.0037768427282571793, -0.09164503216743469, 0.04055638238787651, 0.02835610695183277, -0.018753156065940857, 0.02244659885764122, 0.03619573637843132, -0.03531407564878464, -0.033026523888111115, 0.06338423490524292, -0.056330952793359756, 0.02399546094238758, 0.024019289761781693, -0.008739161305129528, -0.003866200102493167, 0.04741903394460678, -0.01934887282550335, 0.06004822626709938, -0.0026479598600417376, 0.013105763122439384, -0.03588596358895302, -0.0009203820372931659, -0.015643516555428505, 0.013367878273129463, -0.010055694729089737, 0.0252583809196949, 0.018133610486984253, 0.06257406622171402, -0.043963879346847534, -0.056855183094739914, 0.016477519646286964, 0.041318897157907486, 0.05080270394682884, -0.026449812576174736, 0.012498132884502411, -0.017466409131884575, 0.01093735545873642, -0.030953429639339447, -0.003991300705820322, 0.02706935815513134, 0.010055694729089737, -0.041581012308597565, 0.031072573736310005, 0.029833482578396797, -0.04596548527479172, 0.020528391003608704, -0.00896553322672844, -0.011038627475500107, -0.023900147527456284, 0.008250674232840538, -0.01725194975733757, -0.05390043184161186, 0.014094652608036995, -0.017025578767061234, 0.009209777228534222, -0.037792254239320755, -0.014511654153466225, 0.017216207459568977, -0.003118576016277075, -0.011759444139897823, -0.034146469086408615, -0.004718075040727854, -0.011413928121328354, 0.0035385561641305685, 0.042700961232185364, 0.08096978813409805, 0.017573637887835503, 0.019110586494207382, -0.0282131340354681, 0.044678740203380585, 0.05528249219059944, -0.011693915352225304, 0.026878729462623596, 0.02976199798285961, -0.0207785926759243, 0.014392510987818241, -0.01614391803741455, 0.013081934303045273, 0.05413871631026268, 0.00037902462645433843, 0.03173977509140968, 0.022804027423262596, 0.0316682904958725, -0.030476856976747513, -0.0017082170816138387, -0.007839629426598549, -0.017561722546815872, -0.0009322963305748999, -0.014142310246825218, 0.030619829893112183, 0.025163065642118454, -0.04739520698785782, 0.009930594824254513, 0.028975650668144226, 0.009215734899044037, -0.03657699376344681, -0.01696600578725338, -0.021255165338516235, -0.01458314061164856, -0.020552219823002815, 0.028093991801142693, -0.01003782358020544, 0.02692638710141182, -0.02985731139779091, 0.043272849172353745, -0.013629994355142117, -1.1286035714874743e-06, 0.03550470620393753, -0.09788814187049866, 0.030119426548480988, -0.029356909915804863, 0.008596189320087433, -0.02747444622218609, -0.023530801758170128, 0.006612453144043684, 0.05571140721440315, 0.01739492267370224, -0.034146469086408615, 0.020647535100579262, -0.01628688909113407, 0.026759585365653038, -0.04000832140445709, 0.009853151626884937, 0.03814968466758728, -0.05223242565989494, 0.017323436215519905, -0.012450475245714188, 0.020587962120771408, 0.034027326852083206, 0.020290104672312737, 0.05537780746817589, 0.015619686804711819, -0.010204624384641647, 0.0066481963731348515, -0.03305035084486008, 0.0169540923088789, 0.011282870545983315, -0.018598269671201706, 0.01697792112827301, 0.021684080362319946, 0.028927994892001152, 0.008715332485735416, -0.029785826802253723, 0.019468015059828758, 0.002155004534870386, 0.0019599073566496372, -0.01557203009724617, 0.008542574942111969, -0.01922972872853279, 0.02426949143409729, 0.042176730930805206, 0.023173373192548752, 0.008709375746548176, -0.01653709076344967, 0.03383670002222061, -0.019420359283685684, 0.0426771305501461, 0.002362015889957547, 0.0647663027048111, -0.019813532009720802, -0.012087088078260422, -0.03445624187588692, -0.0009777197847142816, 0.05008784309029579, -0.036553166806697845, -0.018264668062329292, 0.047323718667030334, 0.0006403952720575035, 0.018681669607758522, -0.0230184867978096, 0.03467070311307907, -0.03843563050031662, 0.040937639772892, 0.00933487806469202, -0.02888033725321293, -0.015941374003887177, -0.014440168626606464, 0.013475107960402966, -0.01725194975733757, -0.018622098490595818, -0.02761741727590561, 0.0035355775617063046, -0.048729609698057175, -0.001976289553567767, 0.0025020092725753784, -0.013260649517178535, 0.07320164889097214, -0.024877121672034264, -0.014880998991429806, 0.011676044203341007, 0.0063384235836565495, -0.02092156372964382, -0.03283589333295822, 0.009793579578399658, -0.06500458717346191, -0.0094718923792243, 0.007231998723000288, -0.009513592347502708, 0.04587017372250557, -0.006481395568698645, -0.04315370321273804, 0.00018253126472700387, 0.041438039392232895, 0.011908372864127159, 0.0350281298160553, -0.04220055788755417, -0.06076308339834213, 0.04377324879169464, 0.001992671750485897, -0.009614864364266396, 0.0013277032412588596, -0.017907237634062767, -0.01725194975733757, -0.018574440851807594, 0.004411280620843172, 0.006085244473069906, -0.020027989521622658, 0.006344380788505077, 0.020373504608869553, 0.0059333364479243755, -0.01311767753213644, 0.02216065488755703, 0.07358290255069733, 0.023352088406682014, 0.02835610695183277, 0.012158574536442757, -0.03362223878502846, -0.03660082444548607, -0.01080629788339138, 0.06514755636453629, 0.05299494042992592, 0.02621152624487877, -0.029380738735198975, -0.02540135197341442, 0.0013708926271647215, -0.050707388669252396, -0.0319780632853508, 0.04072318226099014, -0.01809786818921566, 0.03745865449309349, 0.014392510987818241, 0.026854900643229485, 0.018836556002497673, 0.05780833214521408, 0.05204179510474205, -0.00918594840914011, 0.0256634671241045, 0.04305839166045189, -0.034027326852083206, 0.0442974790930748, 0.0012346224393695593, -0.05204179510474205, -0.01458314061164856, -0.015536286868155003, -0.0282131340354681, -0.03419412672519684, 0.00828641653060913, -0.0006463524186983705, -0.007220084313303232, -0.0015980096068233252, 0.023483145982027054, -0.013999338261783123, -0.015595858916640282, -0.007077112328261137, 0.022077254951000214, -0.005495484918355942, 0.04193844273686409, -0.03266909345984459, -0.06057245656847954, -0.0004765732155647129, -0.018205096945166588, 0.017180465161800385, 0.02845142036676407, 0.00048513663932681084, 0.040747009217739105, 0.060667771846055984, -0.024055033922195435, 0.02105262130498886, 0.0527566559612751, -0.008709375746548176, -0.044273652136325836, 0.03617190569639206, -0.07258210331201553, 0.04553657025098801, 0.02428140491247177, -0.012641104869544506, 0.06738745421171188, 0.04336816072463989, 0.01878889836370945, 0.0035206845495849848, 0.023947803303599358, -0.010901612229645252, 0.013070020824670792, 0.03824499994516373, -0.007118812296539545, -0.03776842728257179, 0.027951018884778023, 0.003615999361500144, -0.004086615517735481, -0.03993683680891991, 0.02623535506427288, -0.015012056566774845, -0.027522103860974312, -0.03369372710585594, 0.05690284073352814, -0.08144636452198029, 0.03538556024432182, 0.015643516555428505, -0.05223242565989494, 0.04162866994738579, 0.029428396373987198, -0.005316769704222679, -0.02258956991136074, -0.04108061268925667, 0.013010448776185513, -0.08035024255514145, 0.014559311792254448, -0.04193844273686409, -0.032764408737421036, 0.01199177373200655, 0.013856366276741028, 0.02368568815290928, -0.010764597915112972, -0.008888090029358864, 0.020468819886446, -0.007297527510672808, 0.003779821330681443, 0.043820906430482864, 0.005897593684494495, 0.015429058112204075, -0.059095077216625214, -0.01052631065249443, 0.030929600819945335, -0.01432102546095848, -0.00680903997272253, -0.046513546258211136, -7.083441596478224e-05, 0.027402959764003754, -0.007827715016901493, -0.03478984534740448, 0.036386363208293915, -0.017204293981194496, 0.0072022126987576485, -0.013737223111093044, 0.03929346054792404, -0.01557203009724617, -0.005540163721889257, 0.05332854390144348, -0.04329667612910271, -0.021529195830225945, -0.0032228264026343822, 0.04672800377011299, -0.022613398730754852, 0.01653709076344967, 0.00470318179577589, -0.012295588850975037, 0.010151009075343609, 0.028522906824946404, -0.0002606259658932686, -0.023173373192548752, -0.007321355864405632, 0.03671996667981148, -0.0176689513027668, 0.003097725799307227, 0.02723615989089012, -0.013761051930487156, -0.04961127042770386, 0.0024230768904089928, 0.04880109801888466, -0.025020094588398933, 0.052280083298683167, 0.007857500575482845, 0.03407498449087143, -0.0024052055086940527, -0.012807904742658138, 0.02666427195072174, 0.005352512933313847, 0.030834287405014038, 0.004709139000624418, 0.005373362917453051, -0.04563188552856445, 0.012927048839628696, -0.01046078186482191, -0.036982081830501556, -0.03953174874186516, -0.04584634304046631, -0.010162923485040665, -0.04670417681336403, 0.01654900424182415, -0.001986714545637369, -0.016763463616371155, -0.018979528918862343, -0.010728854686021805, 0.04208141565322876, -0.004333837889134884, -0.03552853316068649, 0.020587962120771408, 0.02286360040307045, 0.017466409131884575, -0.04470256716012955, -0.010573968291282654, -0.05289962515234947, 0.018848471343517303, 0.009775708429515362, 0.002737317467108369, 0.011342442594468594, 0.0011378185590729117, -0.014845255762338638, -0.02020670473575592, -0.008304288610816002, -0.062049832195043564, 0.004977211356163025, 0.028570564463734627, 0.009835279546678066, -0.012426646426320076, 0.007690700236707926, 0.013808708637952805, 0.059095077216625214, -0.0033598411828279495, -0.002545198891311884, 0.050993334501981735, 0.06433738768100739, -0.0052035837434232235, 0.008405559696257114, -0.007416670676320791, 0.03126320242881775, -0.032740578055381775, 0.02020670473575592, -0.005340598523616791, -0.0017797030741348863, 0.0239835474640131, -0.014178053475916386, 0.028093991801142693, 0.07286804169416428, -0.03042919933795929, 0.002874332247301936, 0.01880081370472908, -0.028713535517454147, -0.04260564595460892, 0.020945392549037933, -0.02244659885764122, -0.004762753378599882, -0.023602288216352463, 0.021386222913861275, 0.03717271238565445, 0.023626117035746574, 0.046894803643226624, -0.0015726916026324034, 0.05146990716457367, 0.0070473263040184975, -0.02339974418282509, -0.0019435251597315073, 0.022839771583676338, -0.003633870743215084, 0.007470285054296255, 0.01507162768393755, 0.0202186182141304, 0.03152531757950783, -0.028856508433818817, -0.009978251531720161, -0.01199773047119379, -0.019718216732144356, -0.034146469086408615, 0.04405919462442398, 0.0006690641166642308, 0.010794383473694324, -0.013939766213297844, -0.014142310246825218, 0.0017648101784288883, -0.011259042657911777, -0.002012032549828291, 0.018002552911639214, -0.013761051930487156, 0.008328116498887539, -0.03624339401721954, 0.024591177701950073, 0.014690369367599487, -0.0033300553914159536, -0.03252612054347992, 0.007428585086017847, -0.004152144305408001, 0.03157297521829605, -0.025496667250990868, 0.007172426674515009, -0.002035861136391759, 0.02247042767703533, -0.005263155326247215, 0.014845255762338638, 0.00479849660769105, 0.0035921705421060324, 0.032740578055381775, -0.027545932680368423, -0.012438560836017132, 0.029070965945720673, -0.004744882229715586, 0.01177731528878212, -0.04903938248753548, 0.01866975612938404, 0.0353379026055336, 0.021695995703339577, -0.010013994760811329, -0.013415535911917686, -0.018896127119660378, -0.03069131448864937, -0.00994846597313881, 0.03662465140223503, 0.058570846915245056, -0.007541771046817303, 0.026688100770115852, -0.00890000443905592, 0.02876119315624237, 0.00662436755374074, 0.022911258041858673, -0.02256574109196663, -0.0005960888229310513, -0.006296723615378141, -0.01906292885541916, -0.03069131448864937, 0.04034192115068436, 0.0017469386802986264, -0.03235932067036629, 0.049706585705280304, 0.06834059953689575, 0.013808708637952805, 0.039484091103076935, -0.03059600107371807, -0.009293178096413612, -0.004727010615170002, 0.0037738641258329153, -0.014142310246825218, 0.008870218880474567, -0.004762753378599882, -0.013355964794754982, -0.06977032124996185, 0.022506169974803925, 0.0092693492770195, -0.020814334973692894, -0.010484610684216022, -0.015452886931598186, -0.005459741689264774, -0.008149402216076851, 0.05985759571194649, -0.028093991801142693, -0.005629521328955889, -0.040889982134103775, -0.008375774137675762, -0.00013673555804416537, 0.057713016867637634, 0.04372559115290642, -0.04641823098063469, 0.014332939870655537, 0.0304530281573534, -0.005346555728465319, -0.04780029505491257, 0.03412264212965965, 0.023316344246268272, 0.04053255170583725, -0.009543378837406635, 0.013725308701395988, 0.042581815272569656, 0.009346792474389076, -0.02511540800333023, 0.04513148218393326, 0.012367075309157372, 0.02286360040307045, 0.025877926498651505, 0.014487825334072113, -0.011253084987401962, -0.017895324155688286, 0.038078200072050095, -0.02623535506427288, -0.00473594618961215, -0.026545127853751183, -0.03633870929479599, 0.028951823711395264, 0.03979386389255524, 0.0009263391839340329, -0.014988227747380733, 0.009078719653189182, -0.01582222990691662, 0.010979055427014828, -0.007887287065386772, -0.01753789372742176, -0.002752210246399045, -0.02329251542687416, -0.021672166883945465, 0.014952484518289566, -0.013927851803600788, -0.008715332485735416, 0.05971462279558182, 0.01038929633796215, 0.02330443076789379, -0.03405115753412247, -0.027283815667033195, 0.04305839166045189, 0.005004018545150757, -0.0022130869328975677, 0.015333742834627628, 0.040484894067049026, 0.0031960192136466503, -0.024174176156520844, -0.011533072218298912, 0.022529998794198036, 3.316000220365822e-05, 0.007702614646404982, 0.005173798184841871, 0.0022130869328975677, -0.019968418404459953, 0.01074076909571886, 0.026878729462623596, 0.005307834129780531, -0.019420359283685684, -0.007106897886842489, 0.025449009612202644, -0.035957448184490204, -0.01382062304764986, 0.03884071856737137, -0.03886454552412033, -0.05399574711918831, 0.012795991264283657, 0.016918350011110306, -0.04682331904768944, -0.013379792682826519, -0.026330670341849327, -0.00988293718546629, 0.027665074914693832, 0.02036159113049507, -0.021695995703339577, 0.002914543030783534, -0.004706160631030798, 0.055044207721948624, -0.03269292414188385, 0.00960294995456934, -0.014058910310268402, -0.004280223045498133, -0.025139236822724342, 0.01016888115555048, 0.02902330830693245, -0.008036215789616108, 0.016751548275351524, -0.0137491375207901, -0.030214741826057434, -0.002569027477875352, 0.03550470620393753, 0.04196227341890335, -0.014261453412473202, 0.029904969036579132, -0.03741099685430527, 0.033336296677589417, -0.014225710183382034, 0.008054086938500404, -0.012772162444889545, 0.016858777031302452, -0.018038297072052956, 0.03917431831359863, 0.0013344050385057926, 0.00393172912299633, 0.05218476802110672, 0.0021147937513887882, -0.006201408803462982, -0.010627582669258118, -0.01975395902991295, -0.02471032179892063, 0.046060800552368164, -0.04849132522940636, 0.008757032454013824, 0.00975187961012125, -0.03071514330804348, 0.014916741289198399, 0.021255165338516235, -0.04320136085152626, -0.01794298179447651, 0.02592558227479458, -0.0015071628149598837, 0.0004966786364093423, 0.04353496432304382, -0.02652129903435707, -0.009662522003054619, 0.02036159113049507, 0.0061358800157904625, -0.025973239913582802, -0.022935086861252785, 0.005263155326247215, 0.008542574942111969, 0.005832064896821976, 0.01478568371385336, 0.011372228153049946, -0.023506972938776016, 0.02227979712188244, 0.009126377291977406, 0.03285972401499748, -0.002921989420428872, 0.03042919933795929, 0.02175556682050228, 0.029142452403903008, 0.02637832798063755, 0.010681197047233582, 0.0224585123360157, 0.018622098490595818, -0.02088582143187523, -0.005668242461979389, -0.0004929554415866733, 0.04293924570083618, -0.07124769687652588, 0.04903938248753548, 0.030262399464845657, 0.011676044203341007, -0.030119426548480988, -0.02904713712632656, 0.022637227550148964, 0.016620490700006485, -0.02230362594127655, -0.04022277891635895, -0.028141647577285767, -0.0007759207510389388, 0.02355463057756424, -0.008947662077844143, -0.004041936714202166, 0.00043152214493602514, 0.02049264870584011, -0.021672166883945465, -0.019563330337405205, -0.017180465161800385, 0.02930925227701664, -0.021517280489206314, -0.03576682135462761, -0.01423762459307909, 0.0035981277469545603, -0.028522906824946404, 0.018300412222743034, -0.01570308767259121, 0.035409390926361084, -0.030905773863196373, 0.03319332376122475, -0.05432934686541557, 0.004569145850837231, -0.03517110273241997, 0.029213938862085342, 0.013070020824670792, -0.019182071089744568, -0.009281263686716557, -0.01452356856316328, 0.009942508302628994, -0.02230362594127655, -0.011014798656105995, -0.006856697145849466, -0.051279276609420776, -0.04701394587755203, 0.015655430033802986, -0.0010358020663261414, 0.029666682705283165, 0.003130490193143487, 0.058856792747974396, 0.008971490897238255, 0.016799205914139748, 0.023912061005830765, 0.021493451669812202, 0.028570564463734627, 0.015667345374822617, 0.008250674232840538, 0.0367676243185997, 0.022255968302488327, 0.032621435821056366, -0.03195423260331154, -0.020373504608869553, -0.0056027136743068695, 0.0006344380672089756, -0.00286092865280807, -0.01810978166759014, -0.042867761105298996, 0.0095969932153821, -0.007833672687411308, -0.006284809205681086, -0.015893716365098953, 0.004161079879850149, -0.007696657441556454, 0.024221833795309067, -0.07115238159894943, -0.002354569500312209, 0.01276024803519249, 0.005641435272991657, 0.0024498840793967247, 0.0033300553914159536, 0.024877121672034264, -0.005298898555338383, 0.029118623584508896, -0.013260649517178535, 0.016894521191716194, -0.0010186752770096064, 0.0167038906365633, -0.05342385917901993, -0.041723985224962234, -0.047895606607198715, 0.009442106820642948, 0.036386363208293915, 0.03159680590033531, -0.02119559422135353, 0.020135218277573586, 0.0010328234639018774, -0.004619781393557787, -0.03955557569861412, 0.03366989642381668, 0.019277386367321014, -0.006535010412335396, -0.04615611582994461, -0.029833482578396797, -0.04231970012187958, 0.0013277032412588596, 0.03834031522274017, -0.013558507896959782, -0.005727814510464668, -0.025067750364542007, 0.013558507896959782, 0.005671221297234297, -0.017335351556539536, 0.01234324648976326, -0.016465604305267334, 0.01473802700638771, -0.02552049607038498, -0.011699872091412544, -0.045226797461509705, 0.010550139471888542, 0.01276024803519249, 0.010615668259561062, 0.0033628197852522135, 0.04801475256681442, -0.0005011465400457382, 0.034432414919137955, 0.0361480787396431, 0.030905773863196373, 0.030119426548480988, -0.0013291924260556698, 0.02807016298174858, -0.031930405646562576, 0.0609060563147068, -0.022267883643507957, -0.016477519646286964, 0.03266909345984459, 0.005227412562817335, 0.015035885386168957, -0.028236962854862213, -0.013379792682826519, 0.01754980906844139, 0.013677651062607765, 0.007470285054296255, 0.010180795565247536, 0.011670086532831192, -0.02818930521607399, -0.005951208062469959, 0.009799536317586899, -0.016727719455957413, 0.023328259587287903, 0.008208973333239555, -0.011211385019123554, -0.0026479598600417376, 0.0330980084836483, 0.017704695463180542, 0.039341118186712265, 0.025615809485316277, 0.055044207721948624, -0.03319332376122475, 0.013570422306656837, 0.02451969124376774, -0.008739161305129528, 0.0073570990934967995, 0.01291513442993164, -0.04363027960062027, -0.009459977969527245, 0.04293924570083618, -0.0066422391682863235, 0.02678341418504715, 0.020123304799199104, -0.01128882821649313, 0.01821701042354107, -0.023733345791697502, 0.0195037592202425, 0.022375112399458885, 0.007607299834489822, 0.024638835340738297, -0.015464800409972668, -0.025973239913582802, -0.07191489636898041, -0.04072318226099014, -0.013093848712742329, -0.008864262141287327, -0.02158876694738865, 0.019742045551538467, 0.024472035467624664, 0.012295588850975037, 0.016298804432153702, -0.002147558145225048, 0.013320221565663815, -0.013939766213297844, -0.0095969932153821, 0.04401153698563576, -0.02088582143187523, 0.05780833214521408, -0.011181599460542202, 0.006463524419814348, 0.029833482578396797, 0.007410713471472263, 0.011056498624384403, 0.053948089480400085, 0.051136307418346405, 0.036672309041023254, 0.0042444802820682526, -0.029261594638228416, 0.0011832419550046325, 0.057855989784002304, -0.006963925901800394, 0.047919437289237976, -0.002211597515270114, -0.016382204368710518, -0.006749468389898539, -0.0010156966745853424, 0.00856640376150608, -0.010627582669258118, 0.043582621961832047, -0.031024916097521782, -0.007887287065386772, -0.007220084313303232, 0.01017483789473772, -0.007619214244186878, 0.011652215383946896, -0.009376578032970428, -0.029690511524677277, 0.02017096057534218, -0.012295588850975037, 0.043820906430482864, -0.0692460909485817, 0.006278852000832558, -0.02876119315624237, -0.0037947141099721193, 0.011967944912612438, -0.016858777031302452, -0.006511181592941284, -0.016501348465681076, -0.031024916097521782, -0.003806628519669175, -0.019956503063440323, 0.018002552911639214, 0.01920589990913868, -0.00042407569708302617, -0.03459921479225159, 0.027259988710284233, -0.0057367500849068165, 0.028713535517454147, -0.02244659885764122, 0.005843978840857744, 0.03073897212743759, -0.015035885386168957, -0.020861992612481117, -0.020016074180603027, 0.007273698691278696, -0.004041936714202166, -0.00498614739626646, 0.023066144436597824, -0.046656519174575806, -0.04334433376789093, 0.0030173042323440313, 0.06896014511585236, -0.008691503666341305, 0.0002150164364138618, -0.009102548472583294, 0.007857500575482845, 0.008739161305129528, -0.02176748216152191, 0.02761741727590561, 0.013594251126050949, -0.0013411068357527256, 0.004286180250346661, 0.016322633251547813, 0.036982081830501556, 0.027259988710284233, -0.010311853140592575, -0.010907569900155067, 0.03131086006760597, -0.027688903734087944, 0.0041640582494437695, -0.005662285722792149, -0.0020567113533616066, -0.020123304799199104, -0.0024364804849028587, 0.006552881561219692, 0.0010075055761262774, 0.004027043469250202, 0.023375915363430977, -0.004619781393557787, 0.015643516555428505, 0.005692071281373501, 0.036386363208293915, -0.005373362917453051, -0.021362394094467163, 0.016072431579232216, 0.016215404495596886, 0.01906292885541916, 0.011497328989207745, 0.007684743031859398, 0.025973239913582802, -0.01922972872853279, 0.004015129525214434, -0.04105678200721741, 0.003059004433453083, 0.019456101581454277, 0.0013656801311299205, -0.009853151626884937, -0.024924779310822487, -0.011467543430626392, -0.01570308767259121, 0.005614628084003925, -0.013236820697784424, 0.022506169974803925, -0.010002080351114273, 0.0010253770742565393, 0.0066481963731348515, 0.013892109505832195, -0.02482946403324604, 8.149215864250436e-05, 0.017561722546815872, -0.01807403936982155, 0.039007518440485, -0.02807016298174858, -0.005093376152217388, -0.012676847167313099, -0.04489319771528244, -0.02523455210030079, -0.03800671547651291, -0.016370289027690887, 0.04322519153356552, -0.035576190799474716, 0.010496525093913078, -0.012075173668563366, 0.021350480616092682, 0.022827856242656708, -0.01964673027396202, 0.015166942961513996, -0.0006981053156778216, 0.006022694054991007, -0.009293178096413612, -0.01234324648976326, -0.0017216207925230265, 0.01696600578725338, -0.014845255762338638, -0.008864262141287327, -0.02764124609529972, 0.026711929589509964, 0.01225984562188387, 0.012879391200840473, -0.019146328791975975, -0.002701574470847845, -0.008524703793227673, 0.02256574109196663, 0.004503617063164711, 0.0013686587335541844, -0.022923171520233154, -0.005388255696743727, -0.008137487806379795, 0.024019289761781693, 0.01683494821190834, -0.020099475979804993, -0.03216869384050369, 0.02357845939695835, -0.012784076854586601, -0.0006359273684211075, -0.02088582143187523, 0.01029993873089552, 0.03884071856737137, 0.030238570645451546, -0.03266909345984459, -0.0015295022167265415, -0.0535668283700943, 0.028141647577285767, 0.01045482512563467, 0.013582336716353893, 0.014475911855697632, -0.016787292435765266, 0.02145770937204361, -0.007208169903606176, -0.004718075040727854, 0.010556097142398357, -0.02188662439584732, 0.019003357738256454, 0.027593588456511497, -0.0353379026055336, 0.007077112328261137, 0.0011750508565455675, -0.00579036446288228, 0.0027924212627112865, 0.00017192006635013968, -0.01781192421913147, -0.03281206637620926, 0.022387025877833366, -0.018753156065940857, 0.0037262067198753357, -0.020302018150687218, -0.024233747273683548, -0.02273254282772541, 0.023185286670923233, 0.02018287591636181, 0.0014796109171584249, -0.01740683615207672, 0.019384615123271942, -0.021267078816890717, -0.014249539002776146, 0.023769089952111244, 0.01410656701773405, 0.012533875182271004, -0.0038870503194630146, 0.018014468252658844, 0.03800671547651291, 0.005745685659348965, -0.010752683505415916, -0.0022726585157215595, 0.011878587305545807, 0.01951567269861698, 0.055759064853191376, 0.002303933724761009, -0.06238343566656113, -0.00588865764439106, 0.027117015793919563, -0.03717271238565445, 0.007023497950285673, 0.03383670002222061, 0.017871495336294174, -0.002913053845986724, 0.026283012703061104, 0.019265472888946533, -0.007214127108454704, -0.010043780319392681, -0.02454352006316185, -0.0011757954489439726, 0.017990639433264732, 0.025901753455400467, 0.03965089097619057, -0.014606969431042671, 0.02202959731221199, 0.03300269693136215, 0.028022505342960358, -0.030405370518565178, 0.012426646426320076, 0.016036689281463623, 0.00882851891219616, -0.018062124028801918, 0.03448007255792618, -0.021505367010831833, 0.008679589256644249, 0.020528391003608704, -0.021827053278684616, 0.02243468351662159, 0.00030530471121892333, -0.014225710183382034, -0.007017540745437145, -0.011938159354031086, -0.019003357738256454, -0.055187176913022995, -0.014749941416084766, -0.023876318708062172, -0.004167037084698677, -0.008363859727978706, -0.04022277891635895, 0.00691031152382493, -0.023733345791697502, 0.002729870844632387, 0.04679948836565018, 0.011610515415668488, -0.01544097252190113, 0.016477519646286964, -0.008977447636425495, 0.0066481963731348515, -0.013439364731311798, -0.021088365465402603, 0.016858777031302452, -0.013415535911917686, 0.01129478495568037, -0.0301432553678751, -0.004604888614267111, -0.021004963666200638, -0.016334546729922295, 0.014690369367599487, 0.00027198181487619877, -0.011479456909000874, -0.005590799730271101, -0.006832868326455355, 0.06076308339834213, 0.011241170577704906, 0.0006441184668801725, 0.021088365465402603, 0.040937639772892, 0.005036782938987017, -0.008584274910390377, -0.0028028462547808886, 0.010264195501804352, 0.008846390061080456, 0.01024036668241024, 0.0330980084836483, -0.0010075055761262774, 0.036672309041023254, 0.006368209607899189, 0.004762753378599882, 0.007815800607204437, 0.0055550565011799335, -0.02048073336482048, 0.014475911855697632, 0.005295919720083475, -0.028665879741311073, -0.021517280489206314, 0.012390903197228909, -0.0028892250265926123, -0.013165335170924664, -0.025711124762892723, -0.014201881363987923, 0.00010853210551431403, 0.025329865515232086, 0.00826258771121502, 0.026330670341849327, 0.01782383769750595, -0.012015602551400661, 0.0092693492770195, -0.02299465797841549, 0.0092693492770195, -0.012617276050150394, 0.0032406977843493223, 0.03619573637843132, 0.014023167081177235, 0.004214694257825613, -0.01905101351439953, -0.01416613906621933, 0.03643402084708214, -0.0013545104302465916, 0.0011988794431090355, -0.014428254216909409, -0.03426561504602432, 0.025901753455400467, 0.018062124028801918, -0.015679258853197098, -0.014880998991429806, -0.01093735545873642, -0.009555293247103691, -0.01353467907756567, -0.017776180058717728, 0.003809607122093439, 0.02092156372964382, -0.03138234466314316, 0.018455298617482185, 0.01783575303852558, 0.0021147937513887882, 0.008137487806379795, -0.005248262546956539, -0.00988293718546629, -0.007559642661362886, -0.030405370518565178, -0.03321715444326401, -0.007321355864405632, -0.008161316625773907, -0.006963925901800394, -0.004610845819115639, -0.03464687243103981, -0.03164445981383324, -0.03169211745262146, 0.014440168626606464, 0.015786487609148026, 0.03181126341223717, 0.0005115715321153402, -0.008018344640731812, 0.035409390926361084, -4.230518243275583e-05, 0.014225710183382034, 0.004655524622648954, -0.013487022370100021, 0.045369770377874374, -0.02471032179892063, -0.008208973333239555, 0.0028311428613960743, -0.022196397185325623, -0.011866672895848751, 0.0009300624369643629, -0.010579925030469894, 0.02412651851773262, 0.0322878360748291, -0.0012606850359588861, 0.026711929589509964, -0.013093848712742329, 0.0079945158213377, -0.0015190771082416177, -0.010204624384641647, -0.001805021078325808, -0.007887287065386772, 0.013653822243213654, -0.01740683615207672, -0.00997229479253292, 0.0057784500531852245, -0.030667485669255257, 0.02357845939695835, 0.013641907833516598, 0.004551274236291647, -0.01136031374335289, 0.019468015059828758, 0.03903134539723396, -0.03521876037120819, -0.009674436412751675, 0.036100421100854874, -0.023221030831336975, -0.004461916629225016, 0.009728050790727139, -0.003291333792731166, -0.03378904238343239, -0.009990165941417217, -0.006850739941000938, -0.02540135197341442, -0.0005309323314577341, 0.020576048642396927, -0.013808708637952805, -0.005298898555338383, -0.0009993144776672125, 0.046918634325265884, -0.02413843385875225, 0.0020864971447736025, -0.01740683615207672, 0.016656232997775078, 0.018741242587566376, 0.0017365136882290244, 0.008620018139481544, -0.037506312131881714, -0.016334546729922295, 0.016656232997775078, 0.020004160702228546, -0.01478568371385336, 0.01078842580318451, 0.013582336716353893, 0.01906292885541916, -0.02062370628118515, -0.005525270942598581, -0.015631601214408875, 0.016036689281463623, 0.004476809408515692, 0.01709706336259842, 0.014618883840739727, 0.024900950491428375, 0.03519493341445923, -0.011110113002359867, 0.026878729462623596, -0.010258238762617111, -0.027164673432707787, 0.0055818636901676655, -0.004840196575969458, 0.003273462178185582, 0.00047024371451698244, -0.017156636342406273, -0.043129876255989075, -0.01625114679336548, 0.015107370913028717, 0.03888837620615959, 0.0015280129155144095, -0.004265330266207457, -0.0019211857579648495, -0.026044726371765137, -0.034003499895334244, -0.020981136709451675, 0.026902558282017708, -0.018705498427152634, -0.011652215383946896, -0.019718216732144356, -0.01684686355292797, -9.559388854540884e-05, 0.019575245678424835, 0.019670559093356133, 0.019527588039636612, 0.00848300289362669, -0.009346792474389076, -0.017716608941555023, 0.03545704856514931, -0.009626778773963451, -0.002396269701421261, -0.016620490700006485, -0.015238428488373756, -0.025973239913582802, 0.030238570645451546, -0.028403762727975845, 0.022768285125494003, 0.006451610010117292, -0.0032138905953615904, 0.004661481827497482, -0.02339974418282509, -0.02005181834101677, 0.038769230246543884, -0.030905773863196373, 0.014189967885613441, -0.012378989718854427, 0.009781665168702602, -0.006707767955958843, 0.02818930521607399, 0.021004963666200638, 0.009525506757199764, -0.01851486973464489, 0.02664044313132763, 0.04965892806649208, 0.011181599460542202, -0.030214741826057434, -0.0364578515291214, 0.038078200072050095, -0.007750271819531918, -0.039221975952386856, -0.010210581123828888, 0.007786015048623085, 0.0071545555256307125, -0.026425985619425774, -0.0031692117918282747, 0.028713535517454147, 0.03336012363433838, 0.016501348465681076, 0.012462389655411243, 0.019610987976193428, 0.018765069544315338, -0.01115777064114809, 0.004569145850837231, -0.0007420394103974104, -0.018717413768172264, 0.01809786818921566, -0.007547728251665831, 0.025067750364542007, -0.032073378562927246, -0.005593778099864721, 0.019110586494207382, -0.0024498840793967247, 0.008095787838101387, -0.011253084987401962, -0.01713280752301216, -0.0005294430302456021, 0.01628688909113407, 0.0008347477996721864, -0.0015786488074809313, -0.0022369155194610357, 0.008399602957069874, 0.005447827745229006, 0.004673396237194538, 0.027665074914693832, -0.009829322807490826, 0.009632736444473267, -0.06214514747262001, 0.019873103126883507, -0.006403952371329069, 0.009245520457625389, 0.008751075714826584, -0.002400737488642335, 0.01403508149087429, 0.009346792474389076, 0.012021559290587902, -0.004819346591830254, 9.526810026727617e-05, -0.024066947400569916, 0.03848328813910484, 0.006386081222444773, 0.018836556002497673, -0.006666067987680435, -0.02723615989089012, -0.0009308070875704288, -0.012807904742658138, 0.00012742748367600143, 0.015607772395014763], "index": 7}, {"title": "D. P. Todd Secondary School", "text": "D.P. Todd Secondary School is a public high school in Prince George, British Columbia and is part of School District 57 Prince George.", "vector": [0.030391348525881767, 0.004553459584712982, -0.024085406213998795, 0.015098313800990582, 0.03978285938501358, 0.011728154495358467, 0.01950198784470558, 0.003330840729176998, -0.026077544316649437, 0.07231613248586655, 0.022123223170638084, -0.030181650072336197, -0.006545598153024912, 0.016296593472361565, -0.06530620157718658, 0.005856588017195463, -0.0421794168651104, 0.023201674222946167, 0.050327714532613754, -0.044366274029016495, 0.0013555529294535518, -0.042329199612140656, 0.000637053744867444, 0.01837860234081745, 0.014409303665161133, 0.019531946629285812, -0.03978285938501358, -0.009286661632359028, -0.0006927549839019775, 0.0319940447807312, -0.013218513689935207, 0.025208791717886925, 0.03714664652943611, -0.042538899928331375, 0.01996632106602192, 0.009354064241051674, 0.013188556768000126, 0.0040329573675990105, -0.035798583179712296, -0.015652518719434738, -0.010290219448506832, -0.026437027379870415, -0.03828500956296921, 0.00985584408044815, 0.023830771446228027, -0.013757739216089249, -0.01950198784470558, -0.03133499249815941, -0.0061187115497887135, 0.023725921288132668, -0.029267961159348488, -0.04835055395960808, -0.026287242770195007, 0.028399208560585976, -0.011143993586301804, 0.020610395818948746, 0.05272427201271057, 0.11449554562568665, -0.027800070121884346, -0.01785435527563095, -0.051975347101688385, 0.021763740107417107, 0.050717152655124664, -0.021104685962200165, 0.05700811743736267, 0.0827411562204361, 0.0496087446808815, 0.006466961465775967, -0.0017440575174987316, -0.00650815200060606, -0.011039144359529018, 0.0012460227590054274, 0.054641515016555786, 0.02694629691541195, 0.035139527171850204, 0.01610187254846096, 0.006339644081890583, 0.03193413093686104, -0.013226003386080265, -0.024549739435315132, 0.006047563627362251, -0.002681148936972022, 0.02522377111017704, 0.02627226524055004, 0.010177881456911564, -0.018992720171809196, 0.00450103497132659, -0.04802102595567703, 0.031275078654289246, 0.027350716292858124, 0.01673096790909767, 0.012664309702813625, 0.028159553185105324, 0.013989905826747417, -0.02705114521086216, 0.02574801817536354, 0.0036322828382253647, -0.024549739435315132, 0.03591841086745262, -0.009421467781066895, 0.04101109504699707, 0.03370159491896629, 0.002499534748494625, 0.01610187254846096, 0.004568438045680523, -0.0030368880834430456, 0.016790883615612984, -0.008972113020718098, 0.02519381418824196, 0.027066124603152275, -0.03094555251300335, 0.06626482307910919, 0.0041902316734194756, 0.025388533249497414, -0.004766903351992369, 0.08028468489646912, -0.023201674222946167, 0.010604768060147762, -0.016895731911063194, -0.046643003821372986, -0.0006342452834360301, -0.037026818841695786, -0.044995371252298355, -0.03591841086745262, -0.018917826935648918, -0.07423337548971176, -0.024325061589479446, 0.03543909639120102, 0.014656448736786842, -0.012896476313471794, 0.005085195880383253, -0.01740500144660473, -0.023441331461071968, 0.03325223922729492, 0.00502528203651309, -0.0031436097342520952, 0.010664681904017925, 0.006803977303206921, -0.003473136341199279, 0.03232357278466225, -0.01863323710858822, 0.046223606914281845, -0.008987091481685638, -0.042538899928331375, 0.010687150061130524, 0.0032241190783679485, 0.025598231703042984, 0.08004502952098846, 0.05673850327730179, -0.012701756320893764, -0.01526307687163353, 0.04391692206263542, -0.0020108616445213556, 0.01683581806719303, -0.008792371489107609, 0.0007812216645106673, -0.027725176885724068, 0.03957315906882286, -0.05077706649899483, 0.017569763585925102, 0.0015895918477326632, 0.03214383125305176, 0.029477659612894058, -0.008268124423921108, -0.03600827977061272, -0.0007082015508785844, 0.009848354384303093, 0.008642585948109627, 0.05272427201271057, -0.013218513689935207, 0.031035423278808594, 0.02877367101609707, 0.0367572046816349, -0.0033008838072419167, -0.03888414800167084, -0.051346249878406525, 0.00676278630271554, -0.03507961332798004, 0.006759041920304298, -0.0005677782464772463, -0.009114408865571022, 0.009136876091361046, 0.01410224474966526, -0.08340021222829819, -0.019337225705385208, 0.001917246263474226, 0.06147170811891556, 0.039633072912693024, -0.02389068529009819, -0.028758693486452103, 0.0014407431008294225, 0.004377462435513735, 0.01026026252657175, 0.0027017444372177124, 0.03603823855519295, -0.013817653059959412, -0.022302964702248573, -0.017375044524669647, 0.0681820660829544, 0.02684144675731659, -0.005317362491041422, -0.018228817731142044, -0.017105430364608765, 0.004703244660049677, 0.05554022639989853, 0.028788650408387184, 0.01730015128850937, 0.035798583179712296, -0.005856588017195463, -0.01568247564136982, 0.058565881103277206, 0.009211769327521324, 0.018183881416916847, 0.03786561265587807, 0.011555901728570461, 0.04098113626241684, 0.011533434502780437, 0.021913524717092514, -0.004935411270707846, -0.016446378082036972, 0.018198860809206963, 0.05377276614308357, 0.021913524717092514, -0.001088748686015606, -0.018543366342782974, 0.006365856621414423, -0.0022823468316346407, 0.02365102991461754, -0.018947783857584, -0.025238748639822006, -0.03340202197432518, 0.007594092283397913, 0.01312115415930748, -0.0015736771747469902, -0.030601046979427338, 0.013495615683495998, 0.007976043969392776, 0.02431008219718933, -0.019801558926701546, 0.005381021182984114, -0.011818025261163712, -0.022707384079694748, -0.02255759947001934, -0.029208047315478325, 5.447254079626873e-05, 0.046613048762083054, -0.007953575812280178, 0.054851215332746506, 0.026227328926324844, 0.011810536496341228, 0.0019284801091998816, 0.001770269824191928, 0.0170904528349638, -0.018468473106622696, 0.004564693663269281, 0.028968391939997673, -0.02263249270617962, -0.011391138657927513, -0.004721967503428459, 0.007268310524523258, -0.0025557042099535465, -0.0027953600510954857, -0.03978285938501358, 0.04718223214149475, -0.007796301972121, 0.01061225775629282, -0.033491894602775574, 0.00029699530568905175, 0.006343388929963112, 0.017270194366574287, -0.002954506315290928, 0.0008359867497347295, -0.025628188624978065, -0.032713014632463455, -0.001276915892958641, -0.02995697222650051, -0.0004701840225607157, 0.00201273406855762, -0.007871194742619991, 0.020370740443468094, 0.004950389731675386, -0.014776276424527168, -0.03939341753721237, -0.026466984301805496, 0.0030705896206200123, -0.07189673185348511, -0.031484778970479965, 0.06147170811891556, 0.08232175558805466, -0.008178253658115864, -0.011735644191503525, -0.016401441767811775, -0.015697453171014786, -0.028923455625772476, 0.04062165319919586, 0.01989142969250679, -0.00903202686458826, -0.05823635309934616, -0.006466961465775967, -0.008425398729741573, -0.0023703454062342644, 0.007459286134690046, 0.012372229248285294, -0.02501407079398632, 0.001840481418184936, 0.002048308029770851, -0.03034641221165657, -0.017390022054314613, -0.010964252054691315, -0.041520364582538605, 0.02402549237012863, -0.0018442260334268212, -0.03573866933584213, 0.009286661632359028, 0.008065914735198021, -0.07501225918531418, -0.022782277315855026, 0.05985403060913086, 0.020999837666749954, -0.020355762913823128, 0.01968173123896122, 0.008328038267791271, -0.0186631940305233, -0.002608128823339939, 0.0982588678598404, -0.025208791717886925, -0.01538290549069643, -0.004665798507630825, 0.04077143967151642, -0.020505547523498535, -0.0021381787955760956, -0.023800814524292946, -0.004841795656830072, -0.027770113199949265, 0.05539043992757797, -0.01884293556213379, -0.018333666026592255, -0.04844042286276817, -0.014117223210632801, 0.028683800250291824, 0.013465658761560917, 0.030616024509072304, 0.03912380710244179, 0.012993836775422096, -0.038404837250709534, 0.003435690188780427, 0.010402558371424675, -0.021074729040265083, -0.03379146382212639, -0.04565442353487015, 0.0004891412099823356, -0.012057681567966938, 0.039483290165662766, 0.02493917942047119, 0.025478404015302658, -0.044156577438116074, -0.016551226377487183, -0.04155031964182854, -0.017839375883340836, -0.06542602926492691, 0.027380673214793205, 0.003694069106131792, -0.05026780068874359, 0.010672171600162983, 0.02694629691541195, -0.004736945964396, 0.031005466356873512, 0.06518637388944626, 0.009174322709441185, 0.012551971711218357, -0.00505149457603693, 0.02648196369409561, 0.02582290954887867, -0.00927917193621397, -0.024759437888860703, 0.013697825372219086, 0.0033907548058778048, -0.0029470170848071575, 0.00426137913018465, -0.013555529527366161, -0.0105448542162776, 0.00033303728559985757, -0.02088000997900963, -0.00927917193621397, 0.012716734781861305, 0.005223746877163649, 0.05904519185423851, -0.010028095915913582, -0.030511176213622093, 0.006317176390439272, 0.008897220715880394, -0.027904920279979706, 0.012162530794739723, 0.0020108616445213556, 0.019621817395091057, 0.035978324711322784, -0.049908313900232315, -0.00857518333941698, 0.009743505157530308, -0.06542602926492691, -0.04140053689479828, -0.02111966535449028, -0.06344886869192123, -0.07183682173490524, 0.05014796927571297, -0.006882614456117153, -0.016955645754933357, -0.0050065587274730206, -0.0006122456397861242, 0.07812778651714325, -0.024504803121089935, -0.025867845863103867, 0.00013878503523301333, 0.011885428801178932, 0.03274296969175339, -0.02073022536933422, -0.009668612852692604, 0.05820639804005623, -0.016790883615612984, 0.027605349197983742, 0.06458722800016403, 0.023531202226877213, -0.045624468475580215, -0.024864286184310913, 0.02887852117419243, 0.04059169813990593, 0.025688104331493378, 0.008065914735198021, 0.01575736701488495, -0.0025238748639822006, -0.021284429356455803, -0.026077544316649437, -0.050747111439704895, 0.022287987172603607, -0.025418490171432495, 0.008328038267791271, -0.04343760758638382, 0.00785621628165245, 0.016041958704590797, 0.04924926161766052, -0.06704370677471161, -0.04304816946387291, 0.022183137014508247, -0.015652518719434738, 0.03055611066520214, 0.014326921664178371, -0.02739565074443817, 0.006193603854626417, -0.027455564588308334, 0.022048331797122955, 0.022407814860343933, 0.00424640066921711, -0.031005466356873512, -0.05083698034286499, -0.001774014439433813, 0.00350871030241251, -0.009421467781066895, -0.009885801002383232, 0.002859018510207534, -0.004235167056322098, 0.027455564588308334, 0.0029788464307785034, 0.02210824564099312, -0.04002251476049423, -0.04430636018514633, 0.04349752143025398, 0.01184049341827631, 0.0011861089151352644, -0.027830027043819427, 0.013323362916707993, -0.033132411539554596, 0.025733038783073425, -0.04700249060988426, 0.05089689418673515, 0.02273734100162983, -0.007976043969392776, 0.030601046979427338, -0.03672724589705467, 0.0039730435237288475, 0.016566205769777298, 0.0034600303042680025, -0.06006372720003128, 0.03367163613438606, 0.021479148417711258, -0.008680032566189766, -0.024085406213998795, 0.006186114624142647, 0.007249587215483189, 0.010956762358546257, -0.015427840873599052, 0.02389068529009819, -0.0013415106805041432, -0.025912780314683914, -0.0496087446808815, 0.020715245977044106, -0.010117967613041401, 0.04137057811021805, -0.04283846914768219, 0.021628933027386665, 0.025807932019233704, 0.010956762358546257, 0.0021737527567893267, 0.03202400356531143, 0.00931661855429411, 0.004684521351009607, 0.0015577625017613173, -0.03630784898996353, 0.009384021162986755, -0.01800413988530636, 0.035169485956430435, 0.027800070121884346, 0.007676474284380674, -0.019816536456346512, -0.029582509770989418, -0.0036603675689548254, 0.015427840873599052, 0.02483432926237583, -0.004403674975037575, 0.0062010930851101875, -0.0027654028963297606, 0.002171880565583706, 0.050717152655124664, -0.038854192942380905, 0.029597489163279533, -0.028953412547707558, -0.018753064796328545, -0.006399557925760746, -0.00704363314434886, 0.01305375061929226, -0.01680586114525795, -0.02869877964258194, -0.003553645685315132, 0.02231794409453869, -0.029897058382630348, -0.0031286312732845545, 0.0035330504179000854, -0.0157124325633049, -0.05455164611339569, -0.008500291034579277, -0.016251657158136368, -0.003085568081587553, -0.026407070457935333, 0.0014632107922807336, -0.024055449292063713, -0.01617676578462124, -0.021374300122261047, -0.0024452379439026117, -0.03600827977061272, -0.03343198075890541, -0.008747436106204987, 0.017180323600769043, -0.0006281602545641363, -0.022362880408763885, 0.016820840537548065, 0.005328596569597721, -0.10790501534938812, -0.04697253182530403, -0.017030538991093636, 0.03214383125305176, -0.008635097183287144, 0.01628161408007145, 0.0395132452249527, -0.04289838299155235, -0.015877194702625275, -0.027919897809624672, -0.016056936234235764, -0.02368098683655262, 0.06710361689329147, 0.029267961159348488, 0.010777020826935768, 0.016925688832998276, -0.026856426149606705, 0.0055045937187969685, 0.019801558926701546, 0.06093247979879379, -0.009496360085904598, -0.0036154319532215595, -0.003452541073784232, -0.04301821067929268, -0.028354274109005928, -0.026407070457935333, 0.010222816839814186, 0.011877939105033875, -0.005036516115069389, 0.01384012121707201, 0.05557018145918846, -0.00676278630271554, 0.005871566478163004, -0.007159716449677944, 0.001088748686015606, -0.009833375923335552, -0.026466984301805496, 0.0221382025629282, 0.003040632698684931, -0.00044701420119963586, -0.027830027043819427, 0.0033870101906359196, -0.01459653489291668, -0.043587394058704376, -0.0011889173183590174, 0.017075473442673683, 0.024115363135933876, -0.01557762548327446, -0.004673287738114595, -0.07423337548971176, 0.0021063496824353933, 0.05377276614308357, -0.0002974633825942874, 0.011428584344685078, -0.03645763546228409, -0.050357669591903687, -0.024924200028181076, 0.020340783521533012, -0.009271683171391487, 0.05640897899866104, 0.025912780314683914, 0.0346602164208889, 0.052784185856580734, 0.005070217419415712, -0.02020597830414772, 0.0367572046816349, -0.03163456171751022, 0.0027335737831890583, -0.008133318275213242, 0.005014047957956791, -0.003076206659898162, 0.020969880744814873, -0.01715036667883396, -0.007796301972121, -0.03136495128273964, 0.008125828579068184, 0.019097570329904556, 0.04062165319919586, -0.013405744917690754, -0.03220374509692192, 0.007766345050185919, 0.0024920455180108547, 0.0036659843754023314, -0.04754171520471573, 0.00265680905431509, 0.038225095719099045, -0.013667868450284004, 0.021344343200325966, 0.006848912686109543, -0.01712040975689888, -0.038644492626190186, 0.032533273100852966, -0.023695964366197586, 0.0432279109954834, 0.03855462372303009, -0.012214954942464828, 0.008814838714897633, -0.00425388989970088, 0.020161041989922523, 0.028998348861932755, -0.0005935225053690374, 0.040891267359256744, -0.023441331461071968, 0.005714292172342539, 0.02634715661406517, -0.0538925938308239, 0.0047294567339122295, -0.009384021162986755, 0.019846493378281593, 0.0011964065488427877, -0.013323362916707993, -0.018094010651111603, -0.020011257380247116, 0.013458169996738434, 0.047062404453754425, -0.04595399647951126, -0.019846493378281593, 0.01008801069110632, -0.0226624496281147, -0.013293405994772911, -0.03235353156924248, -0.030511176213622093, -0.06470706313848495, -0.03672724589705467, 0.04367726668715477, 0.002121328143402934, 0.004886731039732695, 0.01677590422332287, 0.028159553185105324, 0.04565442353487015, 0.0016504419036209583, -0.00477064773440361, -0.0073357135988771915, -0.022812234237790108, 0.029178090393543243, 0.0034076054580509663, -0.023321501910686493, 0.025942737236618996, 0.007302011828869581, -0.015225631184875965, 0.022153180092573166, 0.007373159751296043, -0.025568274781107903, -0.037895567715168, -0.048859819769859314, 0.02407042682170868, -0.007069845218211412, -0.03543909639120102, 0.010425026528537273, 0.040082428604364395, -0.015173206105828285, -0.008477822877466679, 0.009324107319116592, 0.01638646423816681, -0.028848564252257347, -0.013944970443844795, 0.015547668561339378, -0.006126200780272484, 0.03567875176668167, 0.02799479104578495, 0.0336117222905159, -0.02168884687125683, -0.03615806624293327, -0.01082195620983839, 0.016641097143292427, 0.03633780777454376, 0.01897774264216423, -0.022228073328733444, 0.030825724825263023, -0.01701555959880352, 0.026332179084420204, 0.020445633679628372, 0.002404046943411231, -0.029672380536794662, 0.0025032793637365103, -0.036217980086803436, 0.003330840729176998, -0.004688266199082136, 0.0063958135433495045, 0.031454820185899734, 0.010425026528537273, -0.015075846575200558, 0.017839375883340836, 0.03481000289320946, 0.005912757478654385, 0.05428203195333481, -0.02705114521086216, 0.01792924851179123, 0.03861453756690025, 0.02621234953403473, 0.012372229248285294, 0.02174876071512699, 0.032083917409181595, -0.02757539227604866, -0.017794441431760788, -0.0033233514986932278, -0.01683581806719303, 0.028084661811590195, 0.008305570110678673, -0.017479892820119858, -0.006107477471232414, -0.009091940708458424, -0.030406326055526733, 0.013443191535770893, 0.030645981431007385, -0.005766717251390219, 0.031874217092990875, 0.010372601449489594, 0.050537411123514175, -0.0066729155369102955, -0.011436074040830135, -0.0037240260280668736, 0.014881125651299953, 0.026676682755351067, 0.006687893997877836, 0.02386072836816311, 0.022228073328733444, 0.041310664266347885, -0.0037146646063774824, 0.036996860057115555, 0.025103943422436714, 0.045834168791770935, -0.012716734781861305, -0.024789394810795784, -0.02606256492435932, 0.011877939105033875, -0.0651264563202858, 0.012477078475058079, 0.022752320393919945, -0.0016822712495923042, -0.01852838695049286, 0.03325223922729492, 0.04289838299155235, -0.0011533434735611081, -0.020535504445433617, -0.002471450250595808, 0.0067328293807804585, 0.01774950511753559, 0.0020164786837995052, -0.00980341900140047, -0.010267752222716808, -0.007642772514373064, 0.04367726668715477, -0.003767089219763875, -0.029582509770989418, 0.024444889277219772, -0.004987835884094238, 0.04143049195408821, -0.0056955693289637566, 0.002171880565583706, 0.009376532398164272, 0.001238533528521657, -0.00650066277012229, -0.01887289248406887, -0.01285903062671423, 0.03235353156924248, -0.05350315198302269, -0.028009768575429916, -0.031035423278808594, -0.011293778195977211, -0.053203582763671875, 0.024190254509449005, -0.01876804232597351, -0.018678171560168266, 0.008717479184269905, 0.012791627086699009, -0.042568858712911606, -0.0075641353614628315, -0.007197162602096796, 0.014439260587096214, 0.018079033121466637, 0.0341809056699276, -0.021359320729970932, 0.0004044191155117005, 0.06231050193309784, 0.026856426149606705, 0.015300523489713669, 0.007238353136926889, 0.0016504419036209583, 0.024040469899773598, 0.0448455885052681, 0.015532690100371838, 0.005837864708155394, 0.0004947581328451633, 0.00528740556910634, -0.017030538991093636, 0.00362292118370533, 0.0006089690723456442, -0.012948901392519474, 0.03606819361448288, -0.029732294380664825, -0.0023104315623641014, -0.014409303665161133, 0.0032915223855525255, 0.020146064460277557, 0.018258774653077126, 0.018573323264718056, -0.014027352444827557, 0.03600827977061272, -0.018648214638233185, 0.02634715661406517, 0.01203521341085434, 0.0362778939306736, -0.021044772118330002, -0.0162366796284914, -0.004231422208249569, -0.03000190667808056, -0.014162158593535423, -0.014469217509031296, 0.008006000891327858, 0.020760182291269302, 0.05736760050058365, 0.008650075644254684, 0.0170455165207386, 0.001579294097609818, -0.033132411539554596, 0.017315130680799484, 0.021074729040265083, 0.003976787906140089, -0.012027724646031857, -0.015337970107793808, -0.007938597351312637, -0.04667296260595322, 0.035558924078941345, 0.001041004783473909, -0.003048121929168701, -0.023725921288132668, -0.008410420268774033, 0.01531550195068121, 0.0058640772476792336, -0.013892545364797115, -0.007773834280669689, 0.017030538991093636, 0.0023834516759961843, -0.012424654327332973, 0.013465658761560917, 0.00479686027392745, 0.010132946074008942, 0.010582299903035164, 0.041730061173439026, 0.026811489835381508, 0.002840295433998108, 0.028923455625772476, -0.021419234573841095, -0.0050814514979720116, 0.016041958704590797, -2.5071411073440686e-05, 0.03774578496813774, 0.02634715661406517, 0.06123204901814461, 0.0010999825317412615, 0.014356878586113453, 0.038225095719099045, -0.02098485827445984, 0.021988417953252792, 0.025628188624978065, -0.0319940447807312, -0.02642204985022545, -0.012447121553122997, -0.0011926619336009026, -0.004744435660541058, 0.03430073335766792, 0.004268868360668421, -0.004340016283094883, 0.030256541445851326, -0.06213076040148735, -0.009706058539450169, -0.026302222162485123, 0.020325805991888046, -0.008867263793945312, -0.005343575030565262, 0.03244340047240257, 0.02216815948486328, 0.019846493378281593, 0.029163112863898277, -0.011997767724096775, 0.007474264595657587, -0.018932806327939034, 0.01992138661444187, 0.020220955833792686, 0.01436436828225851, 0.02224305085837841, -0.01512078195810318, -0.010207838378846645, -0.021808676421642303, 0.04238911718130112, 0.01792924851179123, 0.01059727929532528, -0.02007117122411728, 0.005448424257338047, 0.017674613744020462, -0.017419978976249695, 0.024819351732730865, 0.01855834387242794, -0.029447702690958977, 0.031904175877571106, -0.06416783481836319, -0.07249587029218674, 0.002304814523085952, 0.02171880379319191, 0.012836562469601631, -0.01733010821044445, 0.03798544034361839, 0.009548785164952278, -0.023021932691335678, -0.006223560776561499, 0.01008801069110632, -0.027455564588308334, -0.008874752558767796, 0.014843679964542389, 0.003744621528312564, -0.02652689814567566, -0.02336643822491169, 0.004066659137606621, 0.004411164205521345, -0.022962018847465515, -0.0085227582603693, -0.004366228822618723, 0.03406107798218727, -0.005212513264268637, 0.05940467491745949, -0.013967438600957394, 0.00679648807272315, -0.023411372676491737, -0.0054297009482979774, 0.025762995705008507, 0.02098485827445984, 0.019831515848636627, 0.002068903297185898, 0.01691071130335331, 0.013795185834169388, 0.029807187616825104, 0.03978285938501358, -0.002639958169311285, -0.01157836988568306, -0.01255946047604084, 0.021988417953252792, -0.002812210703268647, -0.015352948568761349, 0.040681567043066025, -0.040471870452165604, -0.013413234613835812, -0.017839375883340836, 0.0031922897323966026, 0.00805093627423048, -0.015652518719434738, -0.01800413988530636, -0.035798583179712296, 0.007268310524523258, 0.0038494709879159927, -0.006010117474943399, 0.010162902995944023, 0.005905268248170614, -0.016656076535582542, -0.011286289431154728, -0.03933350369334221, -0.03588845208287239, -0.009189301170408726, 0.0014210838126018643, -0.007215885445475578, -0.015098313800990582, -0.012956390157341957, 0.058116525411605835, -0.0005322043434716761, 0.03996260091662407, -0.003299011616036296, 0.02305188961327076, -0.016760926693677902, 0.04400679096579552, -0.017989162355661392, 0.03478004410862923, 0.0022280497942119837, 0.01003558561205864, 0.014446749351918697, 0.01300132554024458, -0.0015165717341005802, -0.02114962227642536, 0.017659634351730347, 0.0043699732050299644, 0.012784137390553951, -0.006174881011247635, -0.008695011027157307, -0.010664681904017925, 0.015622560866177082, 0.037625957280397415, 0.04080139473080635, -0.01610187254846096, -0.023695964366197586, -0.014229562133550644, 0.008844795636832714, -0.002581916516646743, 0.020340783521533012, 0.02224305085837841, -0.005628166254609823, -0.028953412547707558, 0.0061187115497887135, -0.005650633946061134, 0.013997395522892475, 0.002767275320366025, -0.00900206994265318, 0.0058416095562279224, 0.0021512850653380156, 0.053413279354572296, -0.039063893258571625, -0.034360647201538086, -0.02603260800242424, -0.009159344248473644, 0.019097570329904556, -0.020535504445433617, -0.01177308987826109, -0.0030593557748943567, -0.046852704137563705, 0.025073984637856483, 0.029447702690958977, -0.031065380200743675, 0.028369251638650894, -0.03382142260670662, 0.02263249270617962, -0.019876450300216675, 0.03307249769568443, -0.010290219448506832, 0.0005794801982119679, -0.001994010992348194, -0.05083698034286499, 0.005875311326235533, -0.0007653069915249944, 0.026916339993476868, -0.03510957211256027, -0.02132936380803585, -0.021269449964165688, 0.005718037020415068, 0.03711668774485588, 0.0006342452834360301, -0.025523340329527855, -0.01075455266982317, -0.0069013372994959354, -0.003995511215180159, -0.00927917193621397, 0.025598231703042984, -0.011233864352107048, -0.007215885445475578, -0.021239493042230606, 0.04697253182530403, 0.016551226377487183, -0.009930736385285854, 0.004512269049882889, -0.03735634312033653, 0.006006373092532158, -0.032263658940792084, -0.011548412963747978, -0.0077813235111534595, 0.015622560866177082, 0.010694638825953007, -0.0367572046816349, 0.006908826529979706, 0.008402930572628975, 0.019876450300216675, -0.00011011527385562658, -0.02922302670776844, 0.008447865955531597, 0.010252773761749268, -0.025553297251462936, 0.00824565626680851, 0.013742760755121708, -0.017734527587890625, 0.02673659659922123, 0.00984086561948061, -0.019172461703419685, 0.0012956390855833888, -0.03828500956296921, -0.016131829470396042, -0.02129940688610077, 0.021883567795157433, 0.03445051610469818, 0.010417536832392216, -0.00454222597181797, -0.020745202898979187, -0.015907151624560356, -0.017599720507860184, 0.016146807000041008, -0.0066991280764341354, 0.004164019133895636, -0.018992720171809196, 0.010619746521115303, -0.004036701750010252, 0.010829444974660873, 0.010791999287903309, 0.019412117078900337, 0.008417909033596516, 0.001359297544695437, 0.011301267892122269, 0.021374300122261047, 0.008163275197148323, -0.0176146999001503, -0.018258774653077126, -0.05613936483860016, 0.011952831409871578, 0.0030368880834430456, 0.030121736228466034, 0.00972103700041771, -0.003049994120374322, 0.016566205769777298, -0.04873999208211899, -0.013091196306049824, -0.023036912083625793, 0.019217398017644882, -0.027350716292858124, -0.0031117803882807493, 0.004298825282603502, -0.004482312127947807, -0.00031033551204018295, 0.035169485956430435, -0.01831868849694729, 0.0011486626463010907, -0.03031645528972149, 0.008178253658115864, 0.01100169774144888, 0.0013340214500203729, 0.008410420268774033, 0.0006089690723456442, -0.01276915892958641, -0.010552342981100082, 0.025688104331493378, -0.023381415754556656, -0.013323362916707993, 0.023126782849431038, -0.001614868058823049, 0.016790883615612984, 0.021658889949321747, -0.03382142260670662, -0.004519758280366659, -0.006422026082873344, -0.035768624395132065, -0.017944226041436195, -0.030301477760076523, -0.022183137014508247, -0.0036191765684634447, -0.012462100014090538, -0.013607954606413841, -0.0049241771921515465, -0.006350878160446882, -0.01449168473482132, -0.02031082659959793, 0.011368670500814915, -0.02634715661406517, 0.02487926557660103, -0.016146807000041008, 0.019307268783450127, 0.013345831073820591, -0.008784881792962551, 0.02487926557660103, 0.025628188624978065, -0.019531946629285812, -0.010320177301764488, -0.010469961911439896, -0.025148877874016762, -0.007096057757735252, 0.04220937192440033, -0.0030237818136811256, -0.007140993140637875, 0.001544656348414719, -0.02543346956372261, -0.011952831409871578, 0.013390766456723213, 0.038674451410770416, 0.0683618113398552, 0.015697453171014786, 0.0005247151129879057, 0.012409675866365433, 0.017884312197566032, 0.014926061034202576, 0.0085227582603693, -0.01944207400083542, 0.022932061925530434, -0.027440587058663368, -0.02929791808128357, 0.0014660193119198084, 0.013780207373201847, 0.020041214302182198, -0.014371857047080994, 3.817758624791168e-05, 0.019636794924736023, 0.001540911733172834, 0.00023286865325644612, -0.015772346407175064, -0.0010494302259758115, 0.004055425059050322, -0.006103733088821173, 0.023561159148812294, 0.0059502036310732365, 0.013810164295136929, 0.021284429356455803, 0.023126782849431038, 0.019412117078900337, -0.01764465682208538, 0.030885638669133186, 0.005448424257338047, 0.009601209312677383, -0.007361925672739744, 0.005029026884585619, 0.022287987172603607, -0.011720665730535984, 0.020745202898979187, 0.009181811474263668, 0.009631166234612465, 0.016820840537548065, -0.004062914289534092, 0.0003587815444916487, -0.011870450340211391, 0.04853029549121857, -0.005953948013484478, -0.027530457824468613, -0.004721967503428459, 0.030151693150401115, -0.006556832231581211, 0.011406117118895054, -0.005339830182492733, 0.008440377190709114, -0.02480437234044075, -0.01538290549069643, -0.0013040644116699696, -0.021179579198360443, -0.026511920616030693, -0.009466403163969517, 0.016251657158136368, 0.024924200028181076, -0.012147552333772182, 0.007706431206315756, 0.00750796590000391, 0.003722153836861253, 0.00829808134585619, -0.007463030517101288, -0.0021250727586448193, 0.0077588558197021484, 0.01475380826741457, -0.04119083657860756, -0.01954692415893078, 0.01589217409491539, 0.026646725833415985, -0.016641097143292427, -0.013750250451266766, 0.038045354187488556, -0.02739565074443817, -0.015143249183893204, -0.00677027553319931, -0.013585486449301243, -0.017689591273665428, 0.02017602138221264, -0.04769149795174599, -0.07489243149757385, 0.03753608465194702, -0.04490550234913826, 0.01154092326760292, -0.013196046464145184, -0.0027972322423011065, -0.00011508860188769177, -0.0008542417781427503, 0.01313613262027502, -0.04927922040224075, -0.00034637749195098877, -0.0014978485414758325, -0.0022467728704214096, 0.002098860451951623, -0.016536248847842216, -0.0005242470069788396, -0.016955645754933357, -0.0221382025629282, -0.018498430028557777, 0.022782277315855026, 0.012881497852504253, -0.011196418665349483, -0.009945714846253395, -0.01926233246922493, -0.012387207709252834, 0.0024920455180108547, 0.020535504445433617, -0.007901151664555073, -0.016865774989128113, -0.015832260251045227, -0.00288523081690073, -0.030571090057492256, -0.0037577275652438402, 0.035978324711322784, 0.03430073335766792, 0.04262877255678177, 0.010440004989504814, -0.012447121553122997, -0.00026984678697772324, -0.011061611585319042, 0.009421467781066895, 0.00826063472777605, 0.049099478870630264, -0.004909198731184006, 0.01730015128850937, -0.026182392612099648, -0.014544109813869, -0.01222993340343237, -0.02252764254808426, -0.0022411560639739037, 0.002913315547630191, 0.018258774653077126, 0.01475380826741457, 0.01308370754122734, 0.0018395453225821257, 0.06249024346470833, 0.005088940728455782, 0.03259318694472313, -0.006302197929471731, 0.0221382025629282, 0.00977346207946539, 0.0008626671624369919, -0.015180695801973343, -0.021883567795157433, -0.015502733178436756, 0.022692406550049782, 0.014476706273853779, -0.0031136528123170137, -0.02459467388689518, 0.029882078990340233, -0.001824566861614585, -0.0028646355494856834, 0.012761670164763927, -0.016326550394296646, 0.003211013041436672, -0.024609653279185295, 0.05089689418673515, -0.029133155941963196, 0.009556273929774761, 0.0176146999001503, -0.018123967573046684, -0.006912571378052235, -0.034360647201538086, 0.014207093976438046, -0.015300523489713669, 0.02216815948486328, 0.015532690100371838, 0.03337206691503525, 0.03540914133191109, -0.0271859522908926, 0.023201674222946167, 0.005497104488313198, 0.008335527032613754, -0.015352948568761349, -0.00627224100753665, 0.02648196369409561, 0.02231794409453869, 0.012529503554105759, 0.026466984301805496, 0.010477450676262379, -0.013338341377675533, 0.04065161198377609, 0.014686405658721924, 0.011076590046286583, -0.010043075308203697, -0.0261374581605196, -0.03301258385181427, 0.011937852948904037, 0.03582853823900223, 0.023441331461071968, -0.010866891592741013, 0.015442819334566593, -0.0012319805100560188, -0.005894034169614315, 0.02459467388689518, -0.04011238366365433, 0.011458542197942734, -0.00552706141024828, 0.010694638825953007, 0.00028412314713932574, 0.03756604343652725, -0.02206330932676792, 0.0036847074516117573, 0.0245647169649601, 0.005931480322033167, 0.05245465785264969, 0.002980718621984124, 0.001060664071701467, -0.04196971654891968, 0.0018348644953221083, 0.020056191831827164, 0.021778719499707222, 0.03486991673707962, 0.02182365395128727, 0.03442056104540825, -0.014641470275819302, 0.0017047389410436153, 0.026916339993476868, 0.0030724620446562767, 0.006624235305935144, 0.02368098683655262, 0.01262686401605606, 0.015832260251045227, -0.027874961495399475, -9.496125858277082e-05, 0.04250894486904144, -0.014716362580657005, -0.0491294339299202, -0.03016667068004608, -0.027515478432178497, 0.014791254885494709, -0.00729826744645834, 0.015517711639404297, -0.014521642588078976, 0.013780207373201847, 0.019996277987957, -0.020056191831827164, -0.03489987179636955, 0.02911817654967308, 0.025208791717886925, -0.008013489656150341, 0.02210824564099312, -0.00450103497132659, -0.012274869717657566, 0.00033584574703127146, 0.023381415754556656, -0.02360609360039234, 0.005579486023634672, 0.05509087070822716, -0.007006186991930008, -0.004882986657321453, -0.023830771446228027, 0.018947783857584, -0.008597650565207005, -0.0036996861454099417, 0.016012001782655716, 0.012536992318928242, 0.00015879535931162536, -0.01753980666399002, -0.00043858878780156374, 0.02540351264178753, 0.024040469899773598, 0.009780951775610447, 0.0029470170848071575, 0.02697625383734703, 0.04844042286276817, 0.010514897294342518, 0.007133503910154104, 0.003935597371309996, 0.03223370015621185, 0.019981300458312035, -0.01410224474966526, 0.025987673550844193, -0.00954129546880722, -0.009241726249456406, 0.0065381089225411415, 0.011937852948904037, -0.016581183299422264, -0.036817118525505066, -0.022437771782279015, 0.0085227582603693, 0.0012535119894891977, 0.0034506686497479677, -0.017060495913028717, -0.0076989419758319855, -0.021778719499707222, 0.03097550943493843, 0.01301630400121212, 0.01536792702972889, 0.00656806631013751, 0.00551582733169198, -0.04430636018514633, 0.004497290588915348, -0.001856396091170609, 0.002566938055679202, 0.013877566903829575, -0.011158972047269344, 0.03115525096654892, -0.018498430028557777, 0.04652317613363266, 0.009076962247490883, 0.03259318694472313, -0.0028739969711750746, -0.018932806327939034, -0.019457053393125534, -0.011713176034390926, 0.0271859522908926, -0.04220937192440033, -0.01855834387242794, -0.02571806125342846, 0.01957688108086586, -0.011353692039847374], "index": 8}, {"title": "Dennis Gamsy", "text": "Dennis Gamsy (born 17 February 1940 in Glenwood, Natal) is a former South African cricketer who played in two Tests as a wicketkeeper in 1970 against Australia.He played for Natal from 1958-59 to 1972-73. In 1970 he became one of the first prominent South African cricketers to speak out in favour of mixed-race sport in South Africa. Shortly afterwards he founded the Cricket Club of South Africa, one of the country's first multi-racial teams.", "vector": [0.029236363247036934, 0.020947067067027092, -0.024204127490520477, 0.004287433810532093, -0.01691819168627262, 0.06909290701150894, -0.0037741768173873425, -0.009200038388371468, 0.0289276372641325, 0.026226283982396126, -0.05458277836441994, -0.000350211194017902, -0.013823212124407291, 0.016285302117466927, -0.007143150549381971, 0.008644331246614456, -0.023231640458106995, 0.014780262485146523, 0.015305097214877605, -0.03507128730416298, 0.030857175588607788, -0.008698358200490475, 0.03173704445362091, -0.02588668465614319, 0.02793971262872219, 0.03152093663811684, 0.007532916963100433, 0.003091120161116123, -0.0069579146802425385, -0.04411696270108223, 0.0028672937769442797, 0.036584045737981796, 0.05214384198188782, -0.046957243233919144, -0.04600019007921219, -0.013792338781058788, -0.043623000383377075, -0.01852356642484665, 0.010118498466908932, -0.00019934542069677263, -0.00794969778507948, -0.039177343249320984, -0.006822847295552492, -0.008605740033090115, -0.030857175588607788, -0.007548353634774685, -0.04590757191181183, -0.011561793275177479, -0.04167802631855011, -0.04942705109715462, 0.04204849526286125, 0.02563970349729061, 0.00597770931199193, 0.002533483784645796, 0.03754109516739845, -0.02743031457066536, -0.034947797656059265, 0.09447018802165985, 0.038652509450912476, -0.014811134897172451, -0.022444387897849083, -0.03862163797020912, 0.018785983324050903, 0.023602111265063286, 0.030579321086406708, 0.007162445690482855, -0.026411518454551697, 0.01762826181948185, 0.007393990643322468, -0.005283075384795666, -0.05090893432497978, 0.00749046728014946, -0.021070556715130806, 0.030810866504907608, 0.01371515728533268, -0.023185331374406815, 0.06458549946546555, 0.04195587709546089, -0.05378009006381035, 0.014062474481761456, -0.004005721304565668, -0.03615182638168335, -0.009115138091146946, 0.030733684077858925, 0.009879235178232193, -0.052946530282497406, 0.01010306179523468, -0.06754927337169647, 0.005908246152102947, -0.004738945979624987, 0.05177336931228638, 0.02485245279967785, -9.34620061343594e-07, -0.04630891606211662, -0.04603106528520584, -0.02124035730957985, -0.0017529854085296392, -0.02091619372367859, 0.004893308971077204, 3.2078572985483333e-05, -0.02232089824974537, -0.03269409388303757, 0.01847725734114647, -0.040906209498643875, 0.013360122218728065, 0.024018891155719757, -0.06257878243923187, -0.00013760018919128925, 0.025670576840639114, 0.05359485372900963, -0.01687188260257244, -0.002363684354349971, -0.03590484708547592, 0.027260515838861465, -0.05044584721326828, -0.01134568452835083, -0.058441855013370514, 0.03497866913676262, 0.007042814511805773, 0.04383910819888115, -0.045413609594106674, 0.02475983463227749, -0.04899483546614647, 0.02029874175786972, 0.05476801097393036, 0.018276585265994072, -0.04584582895040512, 0.023694729432463646, -0.04880959913134575, 0.013514485210180283, 0.008937620557844639, 0.011384275741875172, -0.017226917669177055, 0.025192050263285637, -0.0016121291555464268, -0.0334659107029438, -0.0018967360956594348, 0.010990649461746216, 0.027399443089962006, 0.04476528614759445, 0.011916828341782093, 0.0017008879221975803, 0.05967675894498825, -0.007119996007531881, -0.002477527130395174, 0.014857443980872631, -0.0052676391787827015, -0.00543743884190917, 0.004812268074601889, 0.028680656105279922, -0.05269954726099968, 0.01767457090318203, 0.007610098924487829, -0.03235449641942978, 0.025531649589538574, 0.020221561193466187, -0.023941710591316223, -0.013321531936526299, 0.004248843062669039, 0.014610463753342628, -0.0012638475745916367, 0.033496782183647156, -0.022104790434241295, 0.004183238837867975, -0.034145109355449677, 0.018924910575151443, -0.06270227581262589, 0.015127579681575298, 0.04204849526286125, 0.018585311248898506, -0.040103521198034286, -0.03488605096936226, 0.002718719420954585, 0.04618542641401291, -0.012881597504019737, -0.008312450721859932, -0.01795242354273796, -0.014571872539818287, 0.06736403703689575, 0.012225554324686527, -0.04640153422951698, -0.03905385360121727, 0.004908745177090168, 0.005788614507764578, -0.06489422917366028, -0.010959777049720287, 0.03122764639556408, -0.043623000383377075, -0.001797364791855216, -0.02667393535375595, 0.012765824794769287, -0.007251204457134008, -0.03374376520514488, 0.010527560487389565, 0.04439481347799301, 0.023416874930262566, 0.012063472531735897, -0.002782394178211689, -0.04143104329705238, -0.03967130556702614, 0.027739040553569794, 0.038652509450912476, 0.035657867789268494, -0.023972582072019577, -0.015366842038929462, 0.019187327474355698, -0.029653143137693405, 0.026920916512608528, -0.060973405838012695, -0.0632271096110344, 0.004310588352382183, 0.015305097214877605, 0.004179379902780056, -0.02591755799949169, -0.016007449477910995, -0.0026627627667039633, 0.017551079392433167, 0.025577958673238754, 0.028588037937879562, -0.006105058826506138, -0.027183333411812782, -0.0036545454058796167, -0.008466813713312149, 0.026982663199305534, -0.017087990418076515, 0.0056419698521494865, -0.009431582875549793, -0.010959777049720287, -0.06001635640859604, -0.026504136621952057, 0.01969672553241253, 0.021302102133631706, -0.005472170189023018, 0.009771181270480156, 0.011747028678655624, 0.003606306854635477, 0.02513030543923378, -0.0027920417487621307, -0.03822029381990433, 0.02503768727183342, -0.020885322242975235, 0.043900854885578156, 0.030718248337507248, -0.017504770308732986, 0.0031856675632297993, 0.041554536670446396, -0.00595455477014184, -0.01448697317391634, -0.010643333196640015, -0.022567879408597946, 0.01378462091088295, -0.030841737985610962, -0.040010903030633926, -0.04603106528520584, 0.008814130909740925, -0.00016618147492408752, 0.005066967569291592, 0.006352039985358715, -0.002126350998878479, -0.015081270597875118, -0.031582679599523544, 0.01903296448290348, 0.0217034462839365, -0.0033033695071935654, -0.053563982248306274, 0.03596659377217293, -0.0031258519738912582, 0.015737313777208328, 0.014633617363870144, 0.008875875733792782, -0.06575866043567657, -0.02587124891579151, -0.03609008342027664, 0.003967130556702614, 0.057268694043159485, -0.03135113790631294, -0.05097068101167679, 0.011446020565927029, -0.018585311248898506, 0.02156451903283596, 0.017504770308732986, 0.022938350215554237, -0.009037956595420837, -0.05418143421411514, -0.03609008342027664, -0.005908246152102947, 0.009971853345632553, 0.04269682243466377, 0.01392354816198349, 0.01861618459224701, -0.028850454837083817, 0.011229912750422955, 0.032323624938726425, -0.011839646846055984, -0.015667850151658058, 0.02587124891579151, -0.016532283276319504, -0.024682652205228806, 0.061529114842414856, 0.007803052663803101, 0.06254790723323822, 0.010087626054883003, -0.06971035897731781, -0.002896236954256892, -0.050754573196172714, 0.004650187212973833, 0.0018977008294314146, 0.013306095264852047, -0.024204127490520477, -0.03553437441587448, -0.029421597719192505, -0.013954420574009418, -0.04621629789471626, 0.0015764327254146338, -0.0070273783057928085, 0.011638974770903587, 0.00895305722951889, 0.007251204457134008, -0.04075184836983681, -0.05316263809800148, 0.03822029381990433, -0.014201400801539421, -0.01263461634516716, -0.03173704445362091, 0.04856261610984802, -0.01935712806880474, 0.02020612359046936, 0.02391083724796772, -0.011199039407074451, 0.032045770436525345, -0.037386734038591385, -0.032941076904535294, 0.03686189651489258, -0.020514849573373795, 0.0074402992613613605, -0.004480387549847364, -0.015320532955229282, 0.009717154316604137, -0.04016526788473129, 0.033589400351047516, 0.01068964134901762, 0.013414149172604084, 0.018832292407751083, 0.013043678365647793, -0.04853174462914467, -0.00029111906769685447, 0.09064199030399323, -0.03278671205043793, -0.016671210527420044, -0.05856534466147423, 0.0006748560117557645, 0.010944340378046036, -0.02798602171242237, 0.015691004693508148, 0.020036324858665466, 0.04411696270108223, -0.014834289439022541, -0.07304459810256958, -0.029498780146241188, -0.018492694944143295, 0.013846365734934807, 0.015582950785756111, 0.038282036781311035, 0.029035691171884537, 0.0016844868659973145, -0.007370836101472378, 0.02996186912059784, -0.009238628670573235, -0.005445156712085009, -0.0012165738735347986, 0.0411531925201416, -0.021487336605787277, -0.032848458737134933, -0.029190054163336754, -0.019279945641756058, -0.0334659107029438, -0.023077277466654778, 0.018338331952691078, 0.030455831438302994, -0.020036324858665466, 0.030069923028349876, 0.023802783340215683, -0.040010903030633926, -0.026643063873052597, -0.011361121200025082, 0.0013921618228778243, 0.05720694735646248, 0.0013410290703177452, 0.012125218287110329, 0.0035098299849778414, -0.01875511184334755, 0.06051031872630119, 0.0003357396344654262, -0.005503043066710234, 0.016146374866366386, 0.001421104883775115, 0.030177976936101913, 0.01507355272769928, 0.048037782311439514, -0.013259786181151867, -0.008899030275642872, -0.07174795120954514, -0.032231006771326065, 0.019588671624660492, -0.015436305664479733, -0.04038137570023537, -0.027785349637269974, -0.052761293947696686, 0.0019652347546070814, 0.004958913195878267, 0.018631620332598686, 0.01622355729341507, -0.005263780243694782, 0.026550445705652237, 0.037294115871191025, -0.004345320165157318, -0.006398348603397608, 0.0686606839299202, 0.015212479047477245, -0.05026061087846756, 0.03831291198730469, 0.008026879280805588, 0.02817125804722309, 0.0217034462839365, -0.016331611201167107, 0.019094709306955338, -0.012997369281947613, 0.016748391091823578, 0.019048402085900307, -0.009740308858454227, -0.018261149525642395, -0.008628894574940205, -0.02326251193881035, 0.040998827666044235, -0.03362027555704117, -0.05251431092619896, -0.028433674946427345, -0.013383276760578156, 0.06248616427183151, 0.011523202061653137, -0.01576818712055683, -0.05779352784156799, -0.01894034631550312, -0.01569872349500656, -0.08817217499017715, -0.04572233557701111, 0.0012127148220315576, -0.003116204170510173, 0.031582679599523544, 0.012271863408386707, -0.015389996580779552, -0.0741560161113739, 0.014340328052639961, -0.003154794918373227, 0.03269409388303757, -0.03769546002149582, -0.04609280824661255, 0.021780626848340034, -0.04186326265335083, 0.05507673695683479, -0.01200172770768404, 0.02540815994143486, -0.024312181398272514, -0.023849092423915863, 0.0084822503849864, 0.04871698096394539, 0.029082000255584717, 0.01317488681524992, -0.013089987449347973, 0.023030968382954597, -0.011430583894252777, -0.04711160436272621, -0.017736315727233887, 0.02559339441359043, 0.036738406866788864, -0.008899030275642872, 1.4418776117963716e-05, 0.004052030388265848, -0.003920821473002434, 0.00953963678330183, 0.012387635186314583, 0.058164000511169434, -0.0180913507938385, 0.01843094825744629, -0.009192319586873055, -0.07841642946004868, -0.012920187786221504, -0.04951966926455498, -0.00836647767573595, -0.03868338093161583, 0.010280579328536987, 0.05603379011154175, -0.013977575115859509, 0.03216926008462906, -0.02363298460841179, 0.024837015196681023, -0.005047671962529421, 0.05804051086306572, -0.0024003456346690655, -0.004596159793436527, 0.0018851588247343898, -0.050414975732564926, 0.025439031422138214, -0.03726324066519737, -0.014541000127792358, 0.02002088911831379, 0.04084446653723717, 0.022058481350541115, -0.024265872314572334, 0.00895305722951889, 0.03374376520514488, 0.05828749015927315, 0.02287660539150238, 0.004144648090004921, 0.0010593164479359984, -0.017242353409528732, -0.003909244202077389, -0.01776718720793724, 0.03278671205043793, 0.013120859861373901, -0.005796332843601704, 0.008644331246614456, -0.01202488224953413, 0.048068657517433167, 0.011986291036009789, 0.0007081405492499471, 0.02432761713862419, 0.004773677326738834, -0.04300554841756821, 0.014726235531270504, -0.007864797487854958, 0.010504405945539474, 0.05893581360578537, 0.007718152832239866, -0.03201489895582199, -0.013892674818634987, -0.055200230330228806, 5.264021456241608e-05, 0.035843100398778915, -0.0012107852380722761, 0.01204803679138422, -0.012673206627368927, -0.03309543803334236, 0.021626263856887817, 0.021348411217331886, -0.0005036094808019698, -0.019187327474355698, -0.0018591100815683603, -0.01432489138096571, -0.03633706271648407, -0.0357196107506752, 0.001405668561346829, 0.0214719008654356, -0.015976576134562492, 0.011700719594955444, -0.048778727650642395, -0.027831658720970154, 0.020700085908174515, 0.012526562437415123, 0.0004558534128591418, 0.0084822503849864, 0.010635614395141602, -0.02232089824974537, 0.03226187825202942, 0.03642968088388443, 0.025161178782582283, -0.017087990418076515, 0.010705078020691872, 0.0016082701040431857, -0.005827205255627632, 0.022444387897849083, -0.03587397560477257, -0.026457827538251877, -0.022706804797053337, 0.025238359346985817, -0.033682018518447876, -0.03550350293517113, -0.016393356025218964, -0.003527195891365409, -0.05124853551387787, -0.002228616736829281, 0.003909244202077389, 0.0021514350082725286, 0.012981932610273361, -0.009809772484004498, 0.009570509195327759, 0.02860347367823124, -0.02338600344955921, -0.0036236727610230446, -0.03794243931770325, 0.019480617716908455, -0.04007264971733093, -0.014641336165368557, -0.03269409388303757, 0.014641336165368557, -0.0005750023992732167, 0.02381821908056736, 0.027723604813218117, 0.05686734989285469, -0.019048402085900307, 0.039115600287914276, 0.03735585883259773, 0.010380915366113186, -0.002477527130395174, 0.023941710591316223, -0.017365843057632446, -0.048315636813640594, 0.05884319543838501, 0.001247446401976049, -0.04238809645175934, -0.023602111265063286, -0.017057117074728012, 0.01969672553241253, -0.016702082008123398, 0.0023463184479624033, -0.001215609023347497, -0.027739040553569794, -0.003042881842702627, -0.02315445803105831, 0.04028875753283501, -0.009354401379823685, -0.0357196107506752, 0.0009695929475128651, 0.00787251628935337, 0.017134299501776695, -0.01974303461611271, 0.002882729982957244, -0.003411423647776246, -0.003998002968728542, 0.005796332843601704, -0.030116232112050056, 0.017196044325828552, -0.008374195545911789, 0.017381280660629272, -0.008289296180009842, -0.008899030275642872, 0.008505403995513916, -0.0053679752163589, -0.04106057435274124, -0.002303868532180786, -0.014896035194396973, 0.014317173510789871, -0.0015957280993461609, -0.005703715141862631, -0.032508861273527145, -0.04214111343026161, 0.032601479440927505, 0.04504314064979553, -0.025099432095885277, 0.044147834181785583, 0.0016912402352318168, -0.022475261241197586, 0.01631617546081543, -0.0030351635068655014, 0.008420504629611969, 0.04809952899813652, 0.058071382343769073, -0.029421597719192505, 0.007517480757087469, -0.026241719722747803, 0.010751387104392052, -0.024111509323120117, -0.004437937866896391, -0.007162445690482855, 0.012433944270014763, 0.007177882362157106, -0.0010979071957990527, 0.008721512742340565, 0.024975942447781563, 0.012217835523188114, 0.00026314076967537403, 0.025022251531481743, -0.01082856860011816, -0.040906209498643875, 0.016069194301962852, -0.0014992512296885252, -0.0840969905257225, -0.009748026728630066, -0.028958508744835854, -0.005865796003490686, 0.011831928044557571, -0.04609280824661255, -0.0239571463316679, 0.021394720301032066, -0.024111509323120117, -0.0030390226747840643, -0.01799873262643814, 0.04951966926455498, 0.0007563789840787649, 0.0019816358108073473, -0.014070192351937294, 0.011762465350329876, -0.000581755768507719, 0.0393008328974247, 0.014857443980872631, 0.009122856892645359, 0.004430219531059265, -0.048223018646240234, -0.01721148006618023, 0.004052030388265848, 0.01578362286090851, 0.010296016000211239, 0.043345145881175995, -0.005773178301751614, 0.01317488681524992, 0.01960410736501217, -0.01495778001844883, 0.028294747695326805, 0.012464816682040691, -0.033126313239336014, -0.004476528614759445, -0.0071122776716947556, -0.005908246152102947, 0.003044811310246587, -0.047142475843429565, 0.02729138918220997, -0.016238993033766747, -0.021780626848340034, -0.026658499613404274, 0.006707074586302042, 0.013352404348552227, 0.016933627426624298, 0.03362027555704117, -0.02066921256482601, -0.007108418736606836, 0.031026974320411682, -0.036491427570581436, -0.025145741179585457, -0.015914831310510635, 0.019959142431616783, -0.027229642495512962, -0.013800057582557201, 0.02602561190724373, -0.004106057342141867, 0.03269409388303757, -0.019496053457260132, 0.021317537873983383, 0.013637975789606571, 0.03541088476777077, -0.025346413254737854, -0.009508764371275902, -0.00022491179697681218, -0.0010255496017634869, -0.028325621038675308, -0.018647057935595512, -0.0077451663091778755, 0.013437303714454174, -0.01843094825744629, -0.008806412108242512, 0.004931899718940258, -0.022259153425693512, 0.003760670078918338, 0.03534914180636406, -0.0012406930327415466, -0.022907476872205734, -0.05152639001607895, -0.01907927356660366, -0.010766822844743729, -0.04078271985054016, 0.011337966658174992, 0.029267234727740288, 0.028958508744835854, -0.014641336165368557, -0.009925544261932373, 0.02752293273806572, 0.022861167788505554, 0.01622355729341507, -0.022521570324897766, 0.00749046728014946, -4.5856682845624164e-05, 0.008829566650092602, -0.025053124874830246, -0.008528558537364006, 0.025423595681786537, 0.009531918913125992, 0.015320532955229282, 0.022938350215554237, -0.028804145753383636, -0.04522837698459625, -0.050939809530973434, -0.06538818776607513, 0.010211116634309292, -0.058071382343769073, -0.009616818279027939, -0.005225189495831728, -0.006830565165728331, -0.0017481616232544184, 0.0056303925812244415, -0.03056388534605503, -0.026689372956752777, -0.03023972362279892, -0.004079043865203857, 0.0010120427468791604, -0.017890678718686104, -0.00909198448061943, 0.0026068061124533415, 0.049766648560762405, 0.0289276372641325, -0.038189418613910675, -0.03365114703774452, -0.04902570694684982, -0.020746394991874695, 0.007386272307485342, -0.04979752376675606, 0.0465250238776207, -0.024404799565672874, -0.043345145881175995, -0.03257060423493385, 0.006301871966570616, -0.002514188177883625, 0.009964135475456715, -0.0072859362699091434, 0.007011941634118557, -0.03951694071292877, -0.01603832095861435, -0.018724238499999046, -0.013020523823797703, -0.04939617961645126, 0.004542132839560509, 0.0030216567683964968, -0.0015687145059928298, -0.015081270597875118, -0.012403071857988834, 0.01204803679138422, 0.011777901090681553, 0.05198947712779045, 0.010095343925058842, -0.026735682040452957, 0.03417598083615303, -0.011098703369498253, -0.031767915934324265, -0.017690006643533707, -0.02443567104637623, 0.006510261911898851, -0.03670753538608551, 0.004839282017201185, 0.004704214166849852, 0.018816856667399406, 0.032045770436525345, 0.032941076904535294, 0.016702082008123398, -0.030548449605703354, -0.018168531358242035, -0.046957243233919144, 0.023972582072019577, -0.006900028791278601, 0.010982931591570377, -0.06094253435730934, 0.006533416453748941, 0.007486608345061541, 0.008613458834588528, 0.07440299540758133, 0.0006734088528901339, 0.017643697559833527, -0.030579321086406708, 0.011175884865224361, 0.047049861401319504, -0.005838782526552677, 0.015644695609807968, -0.005773178301751614, 0.04819214716553688, 0.00624784454703331, 0.01071279589086771, -0.025068560615181923, 0.026133665814995766, -0.012379917316138744, 0.013645694591104984, -0.04979752376675606, 0.031767915934324265, -0.038899488747119904, -0.013537639752030373, -0.021024247631430626, 0.011175884865224361, -0.010566150769591331, -0.030733684077858925, 0.029930995777249336, 0.007224190980195999, -0.017690006643533707, -0.0314437560737133, 0.022675933316349983, 0.032508861273527145, -0.002902025356888771, -0.06878417730331421, -0.011839646846055984, -0.009246347472071648, -6.572489655809477e-05, -0.005449016112834215, -0.018832292407751083, -0.0038108378648757935, -0.0013091916916891932, 0.011600383557379246, -0.004048170987516642, -0.03689277172088623, -0.009284937754273415, 0.021672572940587997, 0.020113505423069, -0.03023972362279892, 0.004017298575490713, -0.020761830732226372, -0.015621541067957878, -0.009964135475456715, -0.006984928157180548, 0.029699452221393585, -0.009130574762821198, 0.015930267050862312, 0.016254430636763573, -0.004958913195878267, 0.019758470356464386, 0.0016574732726439834, -0.026643063873052597, -0.020375924184918404, 0.028665220364928246, -0.023602111265063286, 0.029884688556194305, 0.010087626054883003, -0.026890045031905174, -0.043437764048576355, -0.013537639752030373, -0.003083402058109641, -0.027322260662913322, 0.034021615982055664, 0.01721148006618023, 0.002058817306533456, -0.008675203658640385, 0.044333070516586304, -0.03454645350575447, -0.014996371231973171, -0.03399074450135231, 0.013545358553528786, 0.028572602197527885, -0.010465815663337708, -0.014062474481761456, 0.0024292885791510344, -0.017967859283089638, -0.004326024558395147, 0.014996371231973171, -0.014818853698670864, 0.01511986181139946, -0.007328385952860117, 0.0013275223318487406, -0.019820217043161392, -0.009400710463523865, 0.03179879114031792, 0.0442713238298893, 0.0180913507938385, -0.028526293113827705, -0.036831025034189224, -0.021070556715130806, -0.018276585265994072, 8.345252717845142e-05, 0.006016300059854984, -0.016254430636763573, 0.013483612798154354, 0.0063250260427594185, -0.0018735815538093448, 0.009146011434495449, -0.011129576712846756, 0.028726965188980103, 0.0022517710458487272, 0.017381280660629272, 0.00478139566257596, -0.006479389499872923, -0.009832927025854588, 0.0016092348378151655, -0.022197406738996506, -0.010280579328536987, 0.0262108463793993, -0.009647690691053867, -0.0343303419649601, -0.00749046728014946, 0.010234270244836807, 0.07452648133039474, 0.029220927506685257, -0.0053139482624828815, -0.02442023530602455, -0.010002725757658482, 0.012179245240986347, 0.012271863408386707, 0.03791156783699989, 0.005082403775304556, -0.01721148006618023, -0.0015069693326950073, -0.0009985360084101558, 0.0035484207328408957, 0.0070389555767178535, -0.014602744951844215, -0.0032203993760049343, -0.0004954089527018368, 0.011283939704298973, -0.037016261368989944, -0.04701898619532585, -0.008613458834588528, 0.00041026805411092937, -0.040906209498643875, -0.022444387897849083, 0.027075279504060745, -0.001615023473277688, 0.007089123595505953, -0.005811769049614668, -0.031212210655212402, 0.07668756693601608, 0.015220197848975658, 0.007548353634774685, -0.03141288086771965, -0.005993145518004894, -0.0020047901198267937, 0.02634977363049984, 0.020406795665621758, 0.012935624457895756, 0.015058116056025028, -0.0339290015399456, -0.01569872349500656, 0.009740308858454227, -0.04553710296750069, -0.0023887683637440205, -0.065079465508461, -0.04618542641401291, -0.0019343621097505093, -0.0038667945191264153, 0.0456605926156044, -0.009763463400304317, 0.010396352037787437, -0.04556797444820404, 0.023555802181363106, -0.01926450990140438, 0.032323624938726425, 0.04646328091621399, -0.011739310808479786, 0.01617724820971489, 0.003967130556702614, -0.018153095617890358, 0.015791339799761772, 0.01776718720793724, 0.04683374986052513, -0.006097340956330299, -0.006051031872630119, 0.008698358200490475, 0.039547815918922424, -0.020468540489673615, 0.028047766536474228, 0.0352565236389637, 0.0016835221322253346, -0.04056661203503609, -0.0028672937769442797, -0.034299470484256744, -0.05174249783158302, 0.010311451740562916, 0.003253201488405466, 0.02451285347342491, -0.02713702619075775, 0.026550445705652237, -0.0007853220449760556, 0.006626034155488014, -0.028294747695326805, -0.027646424248814583, 0.014185965061187744, -0.010697360150516033, -0.0339290015399456, -0.009346683509647846, -0.013460458256304264, 0.001144216163083911, -0.026195410639047623, 0.014610463753342628, -0.02715246193110943, -0.0028672937769442797, 0.03315718472003937, 0.024682652205228806, -0.010550715029239655, 0.007799193263053894, -0.019063837826251984, 0.019990015774965286, 0.0008851756574586034, -0.011361121200025082, -0.001357430126518011, 0.02611823007464409, -0.014016165398061275, -0.0025662858970463276, -0.0055840834975242615, -0.009755745530128479, 0.022768551483750343, 0.0316135548055172, -0.004928040783852339, 0.010789977386593819, 0.01129937544465065, -0.053656596690416336, 0.0041870977729558945, 0.002552779158577323, 0.03442296013236046, -0.01511986181139946, -0.0001877681934274733, -0.01739671640098095, -0.00180508301127702, 0.03189140930771828, -0.03153637424111366, 0.012889315374195576, -0.010380915366113186, -0.015243351459503174, 0.05316263809800148, 0.017983296886086464, 0.014973216690123081, 0.013583948835730553, -0.040010903030633926, -0.030039051547646523, 0.005553211085498333, 0.01739671640098095, -0.041986752301454544, -0.0442713238298893, 0.027445752173662186, -0.017319535836577415, 0.023432312533259392, -0.020036324858665466, -0.018971219658851624, 0.010041316971182823, -0.015706440433859825, 0.021456465125083923, 0.008644331246614456, 0.023169895634055138, -0.0030660361517220736, 0.003264778759330511, -0.016810137778520584, 0.010789977386593819, -0.030918920412659645, 0.028943073004484177, 0.01617724820971489, -0.03491692245006561, -0.031212210655212402, -0.017412152141332626, 0.0012561293551698327, -0.02232089824974537, 0.05884319543838501, -0.013352404348552227, -0.036676663905382156, -0.0014114571968093514, 0.013236632570624352, 0.020360486581921577, -0.024960506707429886, 0.0030390226747840643, 0.014896035194396973, 0.02296922355890274, -0.026504136621952057, 0.005383411422371864, 0.019634980708360672, 0.029745761305093765, 0.007143150549381971, 0.0024215704761445522, 0.004445656202733517, -0.003986426163464785, -0.017643697559833527, 0.006379053462296724, 0.009392991662025452, -0.01371515728533268, -0.014309455640614033, 0.01626986637711525, -0.0018108716467395425, 0.04908745363354683, 0.020360486581921577, 0.0010429153917357326, 0.007042814511805773, -0.00784936174750328, 0.0022093213628977537, -0.001120096887461841, 0.019372563809156418, 0.019249072298407555, 0.005113276187330484, 0.02574775740504265, -0.028402801603078842, -0.003940117079764605, -0.029606834053993225, 0.018292022868990898, 0.0066877794452011585, -0.0023019390646368265, -0.02333969436585903, -0.05995460972189903, 0.002676269505172968, -0.01024198904633522, 0.017612824216485023, -0.02499137818813324, -0.024358490481972694, 0.007035096175968647, 0.020561158657073975, 0.008173523470759392, -0.02952965348958969, 0.04439481347799301, -0.016161812469363213, -0.018014168366789818, -0.0239571463316679, 0.021965863183140755, -0.03880687430500984, -0.005522338207811117, 0.023509493097662926, 0.012210117653012276, 8.254805288743228e-05, 0.015150734223425388, 0.020144378766417503, 0.008798694238066673, -0.03423772752285004, 0.055632445961236954, 0.03309543803334236, -0.0065681482665240765, 0.0041137756779789925, 0.013653412461280823, -0.022722242400050163, 0.004106057342141867, 0.004376192577183247, 0.014054756611585617, -0.021487336605787277, -0.035565249621868134, -0.006984928157180548, 0.004306729417294264, 0.01603832095861435, -0.01907927356660366, -0.01716517098248005, -0.002739944262430072, 0.033589400351047516, -0.005175021477043629, 0.022336333990097046, -0.0051595852710306644, -0.008675203658640385, -0.010164807550609112, -0.0017558797262609005, -0.019341690465807915, -0.01626986637711525, -0.011376556940376759, 0.013398713432252407, -0.014795699156820774, -0.016485974192619324, -0.0011982432333752513, -0.02414238266646862, 0.004823845345526934, 0.004345320165157318, -0.034855179488658905, -0.027785349637269974, 0.020329615101218224, -0.04143104329705238, -0.004214111249893904, -0.055817682296037674, -0.007065969053655863, -0.004009580239653587, -0.02321620285511017, -0.0009642867371439934, 0.03010079637169838, -0.013668849132955074, -0.0013072621077299118, 0.00030896731186658144, -0.037201497703790665, 0.02335513010621071, -0.022938350215554237, -0.00965540949255228, 0.04887134209275246, 0.025577958673238754, -0.007660266477614641, 0.036923643201589584, 0.004206393379718065, -0.000302937492961064, -0.01608463004231453, 0.0069463374093174934, 0.018785983324050903, -0.01753564365208149, 0.006016300059854984, -0.0021340693347156048, -0.009848362766206264, 0.004495824221521616, -0.0018234136514365673, -0.0118628004565835, 0.03538001328706741, 0.010450378991663456, 0.018322894349694252, -0.01498093456029892, 0.006846001371741295, 0.02574775740504265, -0.005232907831668854, -0.02428130805492401, 0.0015494191320613027, -0.00397484889253974, 0.0009174954029731452, -0.02404976449906826, 0.038745127618312836, 0.015135297551751137, 0.026272593066096306, -0.02320076711475849, -0.004931899718940258, 0.023617547005414963, 0.004885590635240078, -0.0032049629371613264, -0.018631620332598686, -0.003994144033640623, 0.003384409938007593, -0.01880142092704773, -0.033126313239336014, 0.01875511184334755, -0.013668849132955074, 0.010087626054883003, -0.012186963111162186, 0.0019102428341284394, 0.03609008342027664, 0.014216837473213673, -0.0089299026876688, 0.0035059708170592785, -0.029328981414437294, 0.022444387897849083, -0.04664851725101471, 0.010033599101006985, -0.011654410511255264, -0.017103426158428192, -0.011422866024076939, 0.0125419981777668, -0.02625715546309948, 0.014494691044092178, 0.0038552172482013702, -0.006934760138392448, -0.0009285902488045394, -0.005962273105978966, -0.008644331246614456, -0.0070158010348677635, 0.014093346893787384, 0.000561978027690202, 0.0501679927110672, -0.02400345541536808, 0.0051827398128807545, -0.006398348603397608, -0.030841737985610962, 0.0025547086261212826, -0.0038552172482013702, -0.005919823423027992, -0.02807863987982273, -0.00509783998131752, -0.014764826744794846, 0.010380915366113186, -0.03939345106482506, -0.014131938107311726, 0.000518563378136605, -0.023478621616959572, 0.004507401026785374, -0.02676655352115631, -0.016254430636763573, -0.04729684069752693, 0.0035252664238214493, -0.0016478255856782198, 0.020190687850117683, -0.023988019675016403, -0.021394720301032066, -0.03695451468229294, -0.0001309674116782844, -0.023277949541807175, -0.004796831868588924, -0.0021880962885916233, -0.023123586550354958, 0.0070158010348677635, -0.017597388476133347, -0.01861618459224701, 0.008327886462211609, -0.015112143009901047, 0.010404069907963276, 0.024960506707429886, -0.00949332769960165, 0.016022885218262672, -0.019619544968008995, 0.009933263063430786, 0.017381280660629272, 0.0029039550572633743, -0.0015725736739113927, 0.0004105092666577548, 0.03216926008462906, 0.014872880652546883, 0.005885091610252857, 0.005981568247079849, 0.01907927356660366, 0.006487107370048761, -0.017875241115689278, -0.008806412108242512, 0.002327023074030876, -0.03139744699001312, -0.0003475580597296357, 0.019187327474355698, 0.02188868075609207, -0.0024910338688641787, 0.02354036644101143, 0.013352404348552227, -0.012912469916045666, -0.009130574762821198, 0.022382643073797226, -0.03272496908903122, -0.0002672410337254405, -0.001504075014963746, 0.020236996933817863, 0.04130755364894867, -0.020036324858665466, 0.005248344037681818, -0.033126313239336014, 0.009663127362728119, -0.010774541646242142, 0.004692636895924807, 0.007664125878363848, 0.008505403995513916, 0.0034172122832387686, 0.008466813713312149, -0.005248344037681818, -0.016377920284867287, 0.003531054826453328, 0.00749046728014946, 0.00600086385384202, -0.028943073004484177, 0.0066414703615009785, 0.01716517098248005, 0.0012464816682040691, 0.009223192930221558, 0.007556071504950523, 0.015150734223425388, -0.009084265679121017, 5.788614726043306e-05, -0.02043766900897026, 0.007749025244265795, -0.016146374866366386, 0.008837285451591015, 0.01562925986945629, 0.006132072303444147, -0.00836647767573595, 0.035935718566179276, 0.0007597556686960161, 0.00897621177136898, -0.0009218368795700371, -0.008659767918288708, 0.0029753479175269604, 0.03534914180636406, 0.003799260826781392, 0.026920916512608528, 0.015065833926200867, 0.043345145881175995, -0.013035960495471954, -0.012881597504019737, 0.004592300858348608, 0.0006463953177444637, 0.024543726816773415, -0.016655772924423218, -0.007640971336513758, 0.014023883268237114, 0.019943706691265106, 0.012796697206795216, -0.00665690703317523, -0.002014437923207879, 0.00832016859203577, -0.015274224802851677, 0.020730959251523018, -0.004704214166849852, 0.02198129892349243, 0.03488605096936226, -0.003419141750782728, 0.019449744373559952, 0.030548449605703354, -0.00024119227600749582, 0.0628257617354393, -0.016192683950066566, 0.0037085723597556353, 0.008922184817492962, -0.03500954061746597, 0.029792070388793945, 0.003123922273516655, -0.016949063166975975, 0.01572187803685665, 0.0049511948600411415, 0.006606739014387131, -0.014942344278097153, 0.019094709306955338, -0.034114234149456024, -0.018878601491451263, 0.018060477450489998, -0.019727598875761032, -0.02724508009850979, 0.005514620337635279, 0.0027959009166806936, -0.01735040731728077, -0.026226283982396126, 0.06995733827352524, 0.04992101341485977, 0.037016261368989944, 0.017134299501776695, -0.016192683950066566, -0.01935712806880474, 0.041801515966653824, -0.017365843057632446, -0.005090121645480394, -0.024173254147171974, -0.058071382343769073, 0.011253067292273045, 0.015019525773823261, -0.005997004918754101, 0.002236334839835763, 0.047852545976638794, -0.003967130556702614, 0.010867158882319927, 0.010604741983115673, -0.012109781615436077, 0.002905884524807334, -0.020761830732226372, 0.013599385507404804, 0.0003277802898082882, 0.012788979336619377, -0.036645788699388504, 0.014556435868144035, 0.011808773502707481, 0.022490696981549263, 0.014294018968939781, -0.012395353056490421, 0.001979706110432744, -0.005429720506072044, -0.007166305091232061, -0.022614188492298126, -0.017010807991027832, -0.014857443980872631, 0.015312815085053444, -0.0023540365509688854, -0.00044210543273948133, -0.01687188260257244, 0.022984659299254417, 0.04075184836983681, 0.014286301098763943, -0.00888359360396862, 0.006973350886255503, 0.009146011434495449, -0.02071552164852619, -0.015474896878004074, -0.006514120846986771, 0.016022885218262672, -0.004457233473658562, -0.03463907167315483, -0.008312450721859932, -0.012734952382743359, -0.017967859283089638, -0.0015310886083170772, -0.009925544261932373, 0.011901391670107841, -0.007328385952860117, 0.0010786118218675256, -0.02480614371597767, 0.004592300858348608, -0.011283939704298973], "index": 9}, {"title": "Gourmet Night", "text": "\"Gourmet Night\" is the fifth episode in the first series of the BBC TV sitcom Fawlty Towers.", "vector": [-0.019300807267427444, 0.03594567999243736, -0.024250507354736328, 0.036156948655843735, 0.05160966515541077, -0.00436871312558651, -0.02621227689087391, 0.009740946814417839, -0.04756540060043335, 0.04859155789017677, 0.021549299359321594, 0.02732897736132145, -0.04693159833550453, 0.014253020286560059, -0.021519118919968605, -0.014177567325532436, -0.017957748845219612, 0.0019174424232915044, -0.01405684370547533, -0.008548794314265251, 0.013075958006083965, 0.001959884539246559, 0.03748491406440735, 0.023420527577400208, 0.007771630771458149, 0.028415497392416, 0.0061456249095499516, 0.011008553206920624, 0.02055332250893116, 0.002425805199891329, -0.04481891915202141, -0.006643612869083881, 0.020402418449521065, -0.04835010692477226, -0.08800806105136871, -0.030226362869143486, 0.03120724856853485, 0.0735815018415451, 0.03805835545063019, 0.00016528862761333585, -0.034496989101171494, -0.017520124092698097, 0.014253020286560059, 0.02001006342470646, -0.047987934201955795, -0.05260564386844635, -0.02281690575182438, -0.016388332471251488, -0.031327974051237106, -0.026242459192872047, 0.022394370287656784, 0.039265599101781845, 0.024310868233442307, 0.047655943781137466, 0.05372234061360359, 0.02029678411781788, 0.023541251197457314, 0.01337776891887188, -0.0020768363028764725, -0.033651918172836304, 0.0026050054002553225, -0.02334507368505001, -0.005225101485848427, 0.0006224850076250732, 0.007552817929536104, 0.03016600012779236, 0.008699699304997921, 0.0591549389064312, -0.005964538082480431, 0.0037650910671800375, 0.002208878519013524, 0.018908454105257988, -0.027721332386136055, 0.022424550727009773, -0.0007267040782608092, -0.04506037011742592, -0.0034613939933478832, -0.014305837452411652, -0.03733401000499725, -0.020930586382746696, -0.05483904108405113, 0.010163482278585434, 0.013777668587863445, 0.0019712024368345737, 0.0316297821700573, 0.02867203578352928, -0.022288735955953598, -0.05127767473459244, -0.007997988723218441, 0.07913482189178467, 0.025095578283071518, 0.02476358599960804, 0.015920525416731834, 0.003817908000200987, 0.015845073387026787, -0.003561368677765131, 0.008458251133561134, -0.020674047991633415, -0.006134307011961937, 0.03793762996792793, -0.021322941407561302, -0.06138833984732628, -0.030015096068382263, -0.019270626828074455, 0.006032445468008518, 0.02059859409928322, -0.011212275363504887, -0.03099597990512848, -0.006454980932176113, -0.05435614660382271, 0.03654929995536804, 0.010495474562048912, 8.506116137141362e-05, 0.04472837597131729, 0.016991954296827316, -0.026966804638504982, -0.03860161453485489, -0.007677315268665552, 0.0060928077436983585, -0.0009478749125264585, -0.04810865968465805, -0.038088537752628326, -0.025789743289351463, 0.013513583689928055, 0.011325454339385033, 0.012608150951564312, 0.012691148556768894, 0.004330986645072699, -0.07400403916835785, -0.05622737482190132, 0.0037858407013118267, 0.030875256285071373, 0.01000503171235323, -0.0003657099441625178, -0.0019655434880405664, 0.02059859409928322, -0.060030192136764526, 0.03920523822307587, -0.0027483655139803886, -0.014139841310679913, 0.028777670115232468, 0.012789237312972546, 0.005896630696952343, -0.021609662100672722, 0.023133806884288788, 0.02897384762763977, -0.020719319581985474, 0.01014839205890894, 0.007171781733632088, -0.0011233024997636676, 0.019768614321947098, 0.0005258112214505672, -0.005466550122946501, 0.02084004320204258, -0.03540242090821266, 0.012547789141535759, -0.0017505033174529672, -0.003783954307436943, -0.07545273005962372, 0.0038707249332219362, -0.06422536075115204, -0.008616701699793339, -0.03156942129135132, 0.01601106859743595, 0.005240192171186209, 0.031026162207126617, 0.008209256455302238, -0.002697434974834323, -0.030467811971902847, -0.0017948318272829056, 0.027374248951673508, -0.03322938084602356, 0.004259306471794844, -0.011989438906311989, 0.00789235532283783, 0.0535714365541935, 0.024582499638199806, 0.08082496374845505, 0.010918010026216507, -0.0018712276360020041, -0.020206240937113762, 0.02930583991110325, -0.027178073301911354, -0.04189135506749153, -0.06199195981025696, -0.021458756178617477, -0.028475860133767128, 0.03510060906410217, -0.02563883736729622, 0.007054829970002174, -0.011189639568328857, 0.04143863916397095, -0.005726862233132124, -0.06899397820234299, 0.01631288044154644, 0.03820926323533058, -0.0325653962790966, -0.00703973975032568, -0.016131794080138206, 0.06126761436462402, -0.010042757727205753, -0.0013015595031902194, -0.01197434775531292, -0.03974849730730057, -0.00789235532283783, 0.028838032856583595, -0.031388334929943085, 0.046267613768577576, 0.005745725240558386, 0.016146883368492126, 0.03836016729474068, -0.013445676304399967, -0.01658450998365879, 0.05130785331130028, 0.002569165313616395, -0.005149648524820805, -0.00884305965155363, 0.06476861983537674, 0.015950705856084824, -0.004798793699592352, -0.02950201742351055, -0.029954733327031136, -0.009891852736473083, 0.007156691048294306, 0.019602619111537933, -0.03603622317314148, -0.00337650952860713, -0.05483904108405113, -0.04059356823563576, 0.05405433475971222, -0.02082495205104351, -0.012608150951564312, -0.08197184652090073, -0.021519118919968605, -0.028626764193177223, 0.053299807012081146, 0.013739941641688347, -0.05064387246966362, 0.01572434790432453, 0.0006951082614250481, -0.023797789588570595, 0.05800805613398552, -0.01776157133281231, -0.006300302688032389, 0.018802819773554802, 0.007066147867590189, 0.03141851723194122, -0.012909961864352226, -0.038722340017557144, -0.038118720054626465, -0.010812375694513321, -0.00753772770985961, 0.017278674989938736, 0.013468312099575996, 0.024114692583680153, -0.0018731140298768878, 0.0024842810817062855, 0.04638833552598953, -0.00900905579328537, 0.029396383091807365, -0.06525152176618576, 0.010389840230345726, 0.029773646965622902, 0.01462273858487606, -0.0388430655002594, -0.0032029682770371437, -0.012140343897044659, -0.04678069055080414, -0.008050805889070034, 0.010767104104161263, 0.05272636562585831, -0.006673793774098158, 0.0054061878472566605, 0.04086519777774811, -0.01747485250234604, -0.04735413193702698, 0.032203223556280136, -0.016493966802954674, 0.034225355833768845, -0.0049798800610005856, 0.065432608127594, -0.0033802823163568974, -0.027751512825489044, -0.03377263993024826, -0.010155937634408474, 0.02900402806699276, -0.02588028647005558, 0.022364187985658646, 0.007439638953655958, 0.04415493831038475, -0.03410463407635689, -0.00860161054879427, 0.05514085292816162, 0.024688132107257843, 0.01024648081511259, 0.058672040700912476, 0.016207246109843254, 0.05139840021729469, 0.05903421342372894, 0.01012575626373291, 0.024537228047847748, 0.005617455579340458, -0.021292759105563164, 0.003246353706344962, -0.003949950449168682, 0.00754150003194809, -0.05160966515541077, -0.011325454339385033, -0.010072939097881317, -0.009046781808137894, 0.022847086191177368, -0.021277669817209244, -0.05173039063811302, 0.04189135506749153, -0.03063380718231201, 0.03959759324789047, -0.024537228047847748, -0.026619723066687584, 0.028536221012473106, -0.03040744923055172, 0.03175050765275955, 0.0049987430684268475, -0.032233405858278275, -0.022017106413841248, 0.06603622436523438, -0.020326964557170868, 0.031720325350761414, 0.020915497094392776, -0.0010186118306592107, -0.02563883736729622, 0.014456742443144321, -0.02025151252746582, -0.0018683981616050005, 0.05855131521821022, 0.022590545937418938, -0.00780935725197196, -0.015301813371479511, 0.02052314206957817, 0.010789739899337292, -0.049979887902736664, 0.022575456649065018, 0.070865198969841, 0.05761570483446121, 0.050855137407779694, -0.0016712779179215431, 0.07056339085102081, 0.04554326832294464, 0.016720324754714966, -0.004036720842123032, -0.0388430655002594, 0.0007625441066920757, 0.01069165114313364, -0.026649903506040573, 0.04134809598326683, -0.03253521770238876, 0.015196179039776325, -0.008993965573608875, -0.017671028152108192, 0.022605637088418007, 0.06344065070152283, -0.0055155945010483265, -0.030603626742959023, 0.022847086191177368, 0.03066398948431015, -0.01801811158657074, 0.008065897040069103, 0.035885319113731384, 0.02139839343726635, 0.012140343897044659, -0.020402418449521065, -0.06603622436523438, -0.026514088734984398, -0.02108149230480194, -0.032173044979572296, -0.002422032644972205, 0.011981893330812454, 0.018636824563145638, -0.02420523576438427, 0.004730885848402977, -0.020689137279987335, -0.012494971975684166, -0.032173044979572296, -0.016146883368492126, -0.03654929995536804, 0.002631413983181119, 0.03398390859365463, -0.004202716983854771, -0.027147890999913216, 0.014524649828672409, 0.008677063509821892, -0.03513079136610031, -0.010382295586168766, 0.007473592646420002, 0.015543261542916298, -0.004674296360462904, -0.0338028222322464, -0.01747485250234604, 0.020749500021338463, 0.03576459363102913, -0.06989941000938416, -0.004330986645072699, 0.039839040488004684, 0.0489235483109951, -0.0019268740434199572, -0.022454731166362762, 0.004678069148212671, 0.0247334036976099, 0.028249502182006836, 0.034798797219991684, 0.01715794950723648, -0.002959633246064186, 0.012774147093296051, -0.03923541679978371, 0.013702215626835823, 0.02281690575182438, 0.027510065585374832, 0.006413481663912535, 0.016539238393306732, 0.0001283875317312777, -0.006873743608593941, 0.04587525874376297, 0.04895373061299324, -0.0022843312472105026, 0.028249502182006836, -0.003410463221371174, 0.0049421535804867744, 0.021277669817209244, 0.006862425711005926, -0.036971837282180786, -0.03232394903898239, 0.008646883070468903, -0.026559360325336456, -0.02698189578950405, 0.02471831440925598, 0.005447687115520239, 0.0011534836376085877, -0.013340041972696781, 0.0676056444644928, 0.020432598888874054, 0.012268614023923874, 0.005994719453155994, -0.02195674367249012, 0.005028924439102411, 0.01025402545928955, -0.03796781226992607, -0.0009554201969876885, 0.026091553270816803, 0.003336896887049079, 0.032837025821208954, -0.004021630622446537, 0.019587527960538864, -0.030829984694719315, -0.03748491406440735, 0.020311875268816948, 0.0913279801607132, -0.013340041972696781, 0.010578472167253494, 0.020960768684744835, 0.036156948655843735, -0.013838030397891998, -0.004059356637299061, 0.02277163416147232, 0.041800811886787415, -0.028611674904823303, 0.016659962013363838, -0.004263079259544611, -0.0163581520318985, 0.021443665027618408, 0.003152037737891078, -0.006877516396343708, -0.00437248544767499, 0.00214474368840456, -0.05064387246966362, -0.013219318352639675, 0.0026446180418133736, 0.009167506359517574, -0.018787728622555733, 0.02591046690940857, 0.013777668587863445, -0.04506037011742592, -0.012849600054323673, 0.009552315808832645, 0.0507042333483696, 0.02109658345580101, 0.040895380079746246, 0.04204225912690163, 0.010465293191373348, -0.041800811886787415, -0.024009058251976967, 0.01742958091199398, -0.015384810976684093, -0.04146881774067879, 0.007930081337690353, 0.026936624199151993, -0.003112425096333027, -0.0030030186753720045, 0.032233405858278275, 0.02817404828965664, -0.0314788781106472, -0.006021127570420504, 0.010306842625141144, -0.04071429371833801, -0.00675301905721426, 0.053903430700302124, 0.013543765060603619, -0.013445676304399967, 0.019587527960538864, 0.05550302565097809, 0.01916499249637127, 0.036730386316776276, 0.007002013269811869, 0.05432596430182457, 0.002425805199891329, 0.04104628413915634, -0.006730383262038231, -0.02477867528796196, 0.0010572813916951418, -0.03826962411403656, 0.04916499927639961, -0.012668512761592865, 0.025186121463775635, -0.04340041056275368, -0.0224849134683609, -0.018244469538331032, -0.005168511997908354, 0.07104628533124924, -0.01579980179667473, 0.02477867528796196, 0.0006908640498295426, 0.007914991118013859, 0.012147889472544193, -0.017052317038178444, 0.00045719638001173735, -0.006730383262038231, -0.009763582609593868, 0.02025151252746582, -0.00640216376632452, 0.04665996879339218, 0.011423543095588684, -0.010940645821392536, 0.01394366379827261, -0.05483904108405113, -0.02052314206957817, -0.015241450630128384, 0.010752013884484768, 0.002024019369855523, -0.003127515548840165, -0.010223845019936562, 0.004338531754910946, -0.021730385720729828, -0.02023642137646675, 0.017293766140937805, 0.022077469155192375, 0.022017106413841248, -0.031961776316165924, -0.06440644711256027, -0.05987928435206413, 0.003008677624166012, -0.009167506359517574, 0.00913732498884201, 0.0338028222322464, 0.007960262708365917, -0.022183101624250412, 0.007300051394850016, -0.026634812355041504, 0.026363182812929153, -0.0012534584384411573, -0.017852116376161575, 0.003972586244344711, -0.009627767838537693, 0.0665191262960434, 0.031056342646479607, 0.01029929704964161, 0.01027666125446558, 5.597059862338938e-05, 0.05151912197470665, -0.0120950723066926, -0.033621735870838165, -0.014260565862059593, -0.03516096994280815, -0.002088154200464487, 0.0037254784256219864, 0.0033312379382550716, -0.010193663649260998, -0.0035160970874130726, 0.012411973439157009, -0.01631288044154644, 0.030045276507735252, -0.04451711103320122, 0.011906440369784832, 0.0377565436065197, 0.008850605227053165, -0.00668888445943594, -0.00857143010944128, -0.02986419014632702, 0.03099597990512848, 0.01265342254191637, 0.052454736083745956, 0.03190141171216965, -0.00971831101924181, 0.010495474562048912, 0.009212777949869633, 0.00019440866890363395, 0.015279177576303482, 0.006073944736272097, 0.052484918385744095, -0.029154933989048004, 0.01282696332782507, -0.020613685250282288, -0.014856642112135887, -0.0697786808013916, -0.009974850341677666, -0.026800809428095818, 0.010510564781725407, 0.028415497392416, -0.01632796972990036, 0.016418512910604477, 0.006371982861310244, 0.01800302043557167, -0.005858904216438532, 0.0014185112668201327, -0.0066851116716861725, 0.029713284224271774, 0.01913481205701828, 0.01572434790432453, 0.016825959086418152, 0.0020900405943393707, 0.010525655932724476, -0.02924547716975212, -0.0157394390553236, 0.006681338883936405, 0.013958754949271679, 0.014826460741460323, 0.001825012848712504, 0.015264087356626987, 0.013838030397891998, 0.0057985419407486916, -0.004798793699592352, 0.020040243864059448, 0.028475860133767128, 0.009408955462276936, -0.019255535677075386, -0.022288735955953598, 0.0205835048109293, -0.035583507269620895, -0.01223843265324831, 0.05182093381881714, 0.005376006942242384, -0.012434609234333038, 0.016735415905714035, -0.00857897475361824, 0.03639839589595795, 0.033682096749544144, 0.020160969346761703, 0.0019862931221723557, -0.022092558443546295, 0.046871233731508255, -0.0505533292889595, -0.01916499249637127, 0.014532195404171944, -0.05257546156644821, -0.0002349645073991269, 0.0060928077436983585, 0.015331994742155075, 0.02001006342470646, 0.011076460592448711, -0.005783451721072197, -0.019285717979073524, -0.012872235849499702, -0.0078697195276618, -0.03712274134159088, -0.036156948655843735, -0.020870225504040718, 0.010231389664113522, 0.01549798995256424, 0.015218814834952354, -0.014803824946284294, 0.0411670096218586, -0.0014826460974290967, -0.0005739122861996293, -0.03150906041264534, 0.005417505744844675, -0.02052314206957817, 0.008005534298717976, -0.0157394390553236, 0.021292759105563164, -0.03015091083943844, 0.02170020528137684, 0.021881291642785072, 0.018169017508625984, -0.0031671281903982162, 0.011996983550488949, 0.0003614657325670123, 0.04391348734498024, -0.018244469538331032, -0.016463784500956535, -0.004961017053574324, 0.0018061497248709202, 0.014675555750727654, 0.006651157978922129, -0.03516096994280815, -0.00457998039200902, -0.022620728239417076, -0.041559360921382904, -0.013038231059908867, 0.034798797219991684, -0.018108654767274857, 0.015369720757007599, -0.02447686530649662, -0.009914488531649113, -0.026861170306801796, -0.005213783588260412, 0.008661973290145397, -0.0014213407412171364, -0.04201208055019379, 0.028309863060712814, -0.045150913298130035, -0.01503772847354412, 0.010495474562048912, -0.008669518865644932, 0.02415996417403221, 0.007854629307985306, -0.04958753287792206, -0.041529182344675064, -0.010442657396197319, -0.02280181460082531, -0.027676060795783997, 0.016841048374772072, -0.003289738902822137, -0.002522007329389453, -0.034225355833768845, -0.04137827455997467, -0.004478119313716888, 0.007579226512461901, 0.0270573478192091, 0.006119216326624155, -0.038088537752628326, 0.004764840006828308, 0.0012553447159007192, -0.01693159155547619, 0.04439638555049896, 0.01997988298535347, 0.02956237830221653, -0.0010450202971696854, -0.013702215626835823, -0.00390467862598598, 0.01605634018778801, -0.0009375001536682248, -0.004361167550086975, -0.017550304532051086, 0.006364437751471996, 0.030452720820903778, -0.01886318251490593, -0.012019619345664978, -0.029683103784918785, -0.017806842923164368, 0.006134307011961937, -0.007960262708365917, -0.02417505346238613, 0.024144873023033142, 0.005130785517394543, -0.03359155356884003, -0.0017646506894379854, -0.0427967868745327, 0.03322938084602356, -0.001184607855975628, 0.015875253826379776, -0.01095573604106903, -0.009748492389917374, 0.01712776906788349, 0.017655938863754272, -0.009529680013656616, -0.04270624369382858, -0.03187123313546181, 0.02613682486116886, 0.01994970068335533, 0.0049232905730605125, 0.022982900962233543, -0.010985917411744595, -0.01546780951321125, -0.004527163691818714, -0.006477616727352142, 0.020191149786114693, 0.012110162526369095, -0.03657948225736618, -0.05311872065067291, 0.006070171948522329, 0.004734658636152744, -0.007032194174826145, 0.026333002373576164, -0.027796784415841103, -0.02983400784432888, -0.014200203120708466, -0.02026660367846489, -0.0077791763469576836, -0.03437626361846924, 0.02563883736729622, 0.027404431253671646, -0.03778672590851784, -0.01774648204445839, 0.010480384342372417, 0.007715041283518076, 0.008910967037081718, 0.03042254038155079, -0.0182595606893301, -0.01095573604106903, -0.025955738499760628, -0.02503521554172039, -0.03778672590851784, -0.018968814983963966, 0.01109909638762474, 0.011151913553476334, 0.022409459576010704, -0.020613685250282288, 0.010525655932724476, 0.05553320795297623, -0.013392859138548374, -0.009771128185093403, 0.008352616801857948, -0.005711771547794342, -0.05803823843598366, 0.01634306088089943, -0.008043261244893074, 0.020900405943393707, -0.015588534064590931, 0.09519115835428238, -0.008692154660820961, 0.01911972090601921, -0.00428948737680912, 0.026272639632225037, -0.030845075845718384, -0.015000002458691597, -0.024537228047847748, -0.00874497089534998, -0.04415493831038475, -0.02192656323313713, 0.006039991043508053, 0.050251517444849014, -0.01685613952577114, -0.012487426400184631, -0.004032948520034552, 0.0031633556354790926, -0.022877266630530357, 0.021202215924859047, -0.020221330225467682, 0.012351611629128456, 0.004357395227998495, -0.00014430333976633847, 0.010880283080041409, 0.05061369016766548, -0.020206240937113762, 0.04415493831038475, 0.03510060906410217, -0.005360916256904602, -0.0022220828104764223, 0.027132801711559296, -0.04644870012998581, 0.014034206978976727, -0.0011751762358471751, 0.032505035400390625, 0.0056815906427800655, 0.026936624199151993, 0.006511570420116186, 0.02394869551062584, 0.013822940178215504, -0.04976861923933029, -0.005568411201238632, -0.007405685260891914, 0.01195171196013689, -0.054175060242414474, -0.02898893877863884, -0.027781695127487183, 0.03657948225736618, -0.01503018382936716, -0.03431589901447296, 0.009356138296425343, 0.022711271420121193, -0.04445674642920494, -0.0002225855423603207, 0.02396378666162491, -0.039778679609298706, 0.05432596430182457, -0.010646379552781582, -0.01862173341214657, -0.011778171174228191, -0.006224850192666054, 0.008684609085321426, -0.010201209224760532, 0.0010101234074681997, -0.005032696761190891, 0.031026162207126617, 0.01042002160102129, -0.07376258820295334, 0.06476861983537674, 0.0009723970433697104, 0.040684111416339874, 0.0006248428835533559, -0.007194417528808117, 0.025548294186592102, -0.023797789588570595, -0.005723089445382357, 0.030543264001607895, 0.06875252723693848, 0.01476609893143177, 0.018138835206627846, -0.002005156362429261, 0.030905436724424362, -1.7315811362550448e-07, -0.03144869580864906, -0.01549798995256424, -0.023163987323641777, 0.014343563467264175, 0.031690146774053574, 0.002273013349622488, 0.04385312646627426, 0.0013864438515156507, 0.021534208208322525, 0.012396883219480515, 0.024054329842329025, 0.01911972090601921, 0.006466298829764128, 0.03229376673698425, 0.007307596504688263, -0.003770750015974045, -0.001344001735560596, -0.06718310713768005, 0.04421529918909073, -0.04146881774067879, 0.00639839144423604, -0.013483402319252491, -0.013415494933724403, -0.01637324132025242, -0.011785715818405151, 0.0010148391593247652, -0.023163987323641777, 0.025789743289351463, -0.03582495450973511, -0.02986419014632702, -0.02447686530649662, 0.011929076164960861, 0.03959759324789047, -0.009642858989536762, 0.01112173218280077, -0.00010634119098540395, 0.00971076637506485, 0.018093563616275787, 0.028340045362710953, 0.004568662494421005, -0.004715795628726482, -0.04756540060043335, 0.045422542840242386, -0.01721831224858761, -0.029668012633919716, 0.02423541620373726, -0.014509559608995914, -0.028008053079247475, 0.00944668147712946, -0.03627767041325569, -0.010910464450716972, -0.004059356637299061, -0.01423038449138403, -0.01294014323502779, 0.0035802319180220366, 0.010963281616568565, -0.01352112926542759, -0.02417505346238613, 0.008088532835245132, 0.02818913944065571, -0.005145876202732325, -0.0052779181860387325, 0.0026936624199151993, -0.02844567783176899, -0.010472838766872883, -0.017097588628530502, -0.010118210688233376, 0.009989941492676735, 0.02055332250893116, 0.007156691048294306, -0.027359159663319588, 0.021624751389026642, 0.008511067368090153, 0.004564890172332525, -0.019361170008778572, -0.016146883368492126, 0.0205835048109293, 0.0365191213786602, -0.03491952270269394, 0.003152037737891078, 0.009046781808137894, -0.00372736481949687, 0.004904427099972963, -0.011672536842525005, -0.008956238627433777, 0.012502516619861126, -0.007967808283865452, 0.04337022826075554, 0.002752138301730156, 0.006345574278384447, -0.047112684696912766, -0.011846078559756279, -0.040623750537633896, -0.018169017508625984, -0.022635817527770996, -0.01656941883265972, -0.001535463030450046, 0.033621735870838165, -0.03817908093333244, -0.0052779181860387325, 0.022997992113232613, 0.027962781488895416, -0.02618209645152092, 0.04077465459704399, -0.04777666926383972, 0.022152921184897423, 0.023511070758104324, 0.007160463836044073, 0.005606137681752443, -0.006055081263184547, 0.0009247675188817084, 0.0541146956384182, -0.022741451859474182, -0.002488053636625409, -0.01774648204445839, -0.06507043540477753, -0.016418512910604477, 0.03654929995536804, -0.02873239852488041, 0.006447435822337866, 0.032837025821208954, -0.002263581845909357, 0.0258953757584095, 0.004561117384582758, -0.005085513927042484, 0.00818662066012621, -0.02135312184691429, -0.013853120617568493, -0.02197183482348919, 0.04672032967209816, -0.010767104104161263, 0.01661469042301178, 0.004059356637299061, -0.0039989943616092205, 0.005542003083974123, 0.007937626913189888, -0.006447435822337866, -0.009401409886777401, -0.00983149092644453, 0.016780687496066093, -0.007292506285011768, -0.010880283080041409, -0.019798796623945236, -0.0010808603838086128, 0.008518612943589687, 0.005674045067280531, -0.005111922509968281, 0.0267102662473917, -0.006243713200092316, -0.04898391291499138, 0.006300302688032389, -0.005907948594540358, -0.007156691048294306, 0.014290746301412582, 0.04026157408952713, -0.004097083117812872, 0.016509056091308594, -0.015196179039776325, -0.03178068995475769, -0.013196682557463646, 0.007884809747338295, -0.06645876169204712, -0.030015096068382263, -0.004304578062146902, -0.0015533830737695098, -0.0004847837844863534, 0.011182093992829323, 0.04638833552598953, -0.005621228367090225, 0.016509056091308594, 0.03259557858109474, 0.0009143927600234747, 0.004606388974934816, -0.02001006342470646, -0.0043498496524989605, -0.006319166161119938, -0.017384309321641922, -0.022952720522880554, 0.015588534064590931, -0.00319919572211802, -0.029758555814623833, -0.041499000042676926, -0.013423040509223938, 0.016524147242307663, 0.08263582736253738, 0.0033897138200700283, 0.013898392207920551, 0.010020121932029724, -0.010880283080041409, -0.006039991043508053, -0.005723089445382357, -0.020643865689635277, -0.008880785666406155, -0.04587525874376297, -0.013106138445436954, 0.014637828804552555, 0.01970825344324112, 0.006073944736272097, -0.008926058188080788, 0.013566400855779648, -0.0028351363725960255, 0.022394370287656784, -0.03573441132903099, 0.061780694872140884, -0.03410463407635689, -0.005251510068774223, 0.021232398226857185, -0.0008219631854444742, 0.022937629371881485, 0.00414235470816493, 0.013694670051336288, 0.009899398311972618, -0.013340041972696781, -0.03205231949687004, 0.007952717132866383, 0.027977870777249336, -0.0019032950513064861, 0.015513081103563309, 0.004444165620952845, 0.0019825203344225883, -0.012872235849499702, 0.03685111179947853, -0.03627767041325569, 0.02085513435304165, 0.034738436341285706, 0.018727367743849754, 0.005360916256904602, -0.036156948655843735, 0.001176119432784617, 0.014532195404171944, -0.022168012335896492, 0.0025238937232643366, -0.025804832577705383, 0.0020353372674435377, 0.03413481265306473, -0.009484407491981983, 0.012079982087016106, 0.03519115224480629, -0.02838531695306301, 0.00507419602945447, 0.012623241171240807, 0.005689135752618313, -0.0024465546011924744, -0.012472336180508137, 0.013166501186788082, 0.03383300453424454, 0.0157394390553236, -0.003766977461054921, 0.03914487361907959, 0.00048761325888335705, -0.010631289333105087, 0.05523139610886574, -0.01862173341214657, -0.014690645970404148, 0.04252515733242035, -0.011566903442144394, 0.005945675075054169, 0.001008237130008638, 0.04859155789017677, -0.03905433043837547, -0.01447183359414339, -0.006802063435316086, 0.027917509898543358, 0.016765596345067024, -0.0399295836687088, 0.0186066422611475, -0.03633803501725197, 0.01940644159913063, -0.015286723151803017, -0.016222337260842323, 0.005123240407556295, -0.006681338883936405, -0.012555333785712719, 0.006866198033094406, -0.0028973848093301058, 0.006311620585620403, 0.010186118073761463, 0.03144869580864906, -0.02281690575182438, 0.016433604061603546, 0.05004024878144264, 0.01607143133878708, 0.023299802094697952, 0.015150907449424267, -0.02559356577694416, 0.010171027854084969, -0.006175805814564228, -0.0027879783883690834, -0.012955233454704285, -0.019753525033593178, -0.022620728239417076, 0.006990695372223854, -0.011219820939004421, 0.01581489108502865, 0.003702842630445957, 0.01070674229413271, 0.000751697807572782, 0.0054627773351967335, -0.006296530365943909, -0.01854628138244152, 3.849268250633031e-05, -0.013453221879899502, -0.01100100763142109, 0.012721329927444458, 0.028340045362710953, -0.01886318251490593, 0.024114692583680153, 0.0014590671053156257, 0.019255535677075386, 0.0041800811886787415, 0.004342304542660713, 0.007764085661619902, 0.0025106894318014383, 0.0037782953586429358, -0.021594570949673653, 0.0011487677693367004, -0.01631288044154644, -0.012736420147120953, -0.005492958705872297, -0.021187126636505127, 0.0174446702003479, -0.0020504279527813196, -0.06989941000938416, -0.005553320981562138, 0.03820926323533058, 0.027917509898543358, 0.014871732331812382, 0.018169017508625984, 0.0005380722577683628, -0.05091550201177597, -0.023797789588570595, -0.049949705600738525, 0.01967807114124298, -0.02956237830221653, 0.007417003158479929, -0.008209256455302238, -0.004840292502194643, 0.016493966802954674, 0.040684111416339874, -0.020643865689635277, 0.012668512761592865, -0.007786721456795931, -0.016841048374772072, -0.019889339804649353, -0.015369720757007599, -0.01141599752008915, -0.01770121045410633, 0.0003954194544348866, 0.004568662494421005, 0.0038669523783028126, 0.010563381947577, -0.008729880675673485, 0.01282696332782507, -0.006703974679112434, 0.008103623054921627, 0.012411973439157009, 0.020311875268816948, -0.02340543642640114, -0.007975352928042412, 0.021775657311081886, 0.006654930766671896, -0.03374246135354042, 0.040925558656454086, 0.013340041972696781, -0.009348592720925808, 0.03494970500469208, -0.013332497328519821, 0.008073441684246063, -0.012298794463276863, -0.010261571034789085, -0.033923547714948654, 0.011770625598728657, -0.004263079259544611, -0.016237426549196243, 0.03144869580864906, 0.026333002373576164, -0.01629778929054737, -0.03745473548769951, -0.018169017508625984, -0.021504027768969536, -0.021836020052433014, 0.01658450998365879, -0.0301207285374403, -0.0003664173127617687, -0.008797788061201572, 0.009620223194360733, 0.02987927943468094, -0.006824699230492115, 0.007571681402623653, 0.007884809747338295, 0.016237426549196243, 0.03751509636640549, -0.010623743757605553, -0.04340041056275368, -0.024657951667904854, 0.004957244265824556, -0.06446681171655655, -0.02788732759654522, -0.01853119023144245, 0.0029181342106312513, -0.012608150951564312, -0.010284206829965115, -0.0393863245844841, -0.002584255998954177, 0.029366202652454376, 0.028219319880008698, -0.01294014323502779, -0.00124779948964715, 0.005598592571914196, 0.02200201526284218, -0.002273013349622488, 0.00828470941632986, -0.01631288044154644, -0.044094573706388474, -0.013158955611288548, 0.005670272745192051, -0.0253521166741848, 0.02139839343726635, -0.024612680077552795, -0.01853119023144245, -0.016192154958844185, -0.03627767041325569, 0.00927314069122076, -0.03006036765873432, 0.005704226437956095, 0.028641855344176292, 0.018380284309387207, -0.04533199965953827, 0.0038273397367447615, 0.02029678411781788, -0.029336020350456238, 0.005028924439102411, 0.003359532682225108, -0.07340041548013687, -7.786957576172426e-05, -0.011981893330812454, 0.025714289397001266, 0.03063380718231201, -0.0013977617491036654, 0.007628270890563726, -0.02809859625995159, -0.012600605376064777, 0.013279680162668228, 0.011363181285560131, -0.009605132043361664, 0.016146883368492126, 0.00814134906977415, 0.010171027854084969, -0.005262827966362238, -0.00228999019600451, 0.013475857675075531, -0.021036220714449883, 0.003191650379449129, -0.00675301905721426, -0.019572436809539795, -0.014690645970404148, -0.0017212653765454888, -0.003965040668845177, 0.018908454105257988, -0.022952720522880554, 0.006971831899136305, 0.019587527960538864, -0.003783954307436943, -0.01126509252935648, 0.03350101038813591, 0.002737047616392374, 0.019059360027313232, -0.006345574278384447, -0.005511821713298559, 0.021292759105563164, -0.04807847738265991, -0.02332998439669609, 0.006100352853536606, 0.03178068995475769, -0.014456742443144321, 0.004651660565286875, 0.025487931445240974, 0.007417003158479929, 0.017957748845219612, -0.011672536842525005, 0.004395121242851019, 0.030030185356736183, -0.005730634555220604, 0.007239689119160175, 0.0039989943616092205, 0.02698189578950405, 0.0010233275825157762, 0.014305837452411652, 0.007466047536581755, 0.0050515602342784405, -0.004304578062146902, -0.007990444079041481, 0.00375754595734179, 0.01774648204445839, -0.0007111419690772891, 0.033319924026727676, 0.021307850256562233, 0.016222337260842323, -0.02142857387661934, 0.030603626742959023, -0.0051647392101585865, 0.004210262093693018, 0.012042255140841007, -0.010653925128281116, -0.0016099725617095828, -0.0011883804108947515, -0.026830989867448807, -0.02557847462594509, -0.03190141171216965, -0.0013241954147815704, -0.004557344596832991, 0.005153421312570572, -0.005504276603460312, -0.05097586289048195, -0.03522133454680443, -0.007013331167399883, 0.028521131724119186, -0.014735917560756207, 0.04578471556305885, 0.006187123712152243, 0.00041027419501915574, -0.013687124475836754, 0.02447686530649662, -0.007526409812271595, -0.022303827106952667, 0.019270626828074455, 0.009929578751325607, 0.025563383474946022, -0.026302821934223175, 0.007567908614873886, -0.015113181434571743, -0.0038348848465830088, 0.001167631009593606, -0.0005465606809593737, 0.0007535841432400048, 0.005964538082480431, 0.006353119853883982, 0.009242959320545197, -0.025955738499760628, 0.031086523085832596, -0.001592052518390119, 0.001062940340489149, 0.00299358693882823, -0.018229378387331963, -0.06165996938943863, 0.007288733497262001, 0.007545272819697857, 0.031720325350761414, 0.01629778929054737, 0.031358152627944946, 0.027706241235136986, -0.02613682486116886, -0.003184105036780238, 0.015633804723620415, 0.011514086276292801, -0.011348090134561062, -0.018123745918273926, -0.0099823959171772, -0.0062210774049162865, -0.012736420147120953, -0.017505032941699028, -0.002650276990607381, -0.018636824563145638, 0.0007988557335920632, 0.023782700300216675, -0.01447183359414339, -0.018727367743849754, 0.009899398311972618, -0.019195174798369408, -0.01364939846098423, 0.0008012136677280068, -0.026529179885983467, -0.005036469548940659, 0.007945172488689423, -0.03404426947236061, 0.01853119023144245, 0.010223845019936562, 0.016946682706475258, -0.007424548268318176, 0.011544267646968365, 0.005044014658778906, -0.034738436341285706, 0.031116705387830734, 0.017037225887179375, 0.009642858989536762, -0.00625503109768033, 0.00648516183719039, -0.006405936554074287, 0.0056815906427800655, -0.015384810976684093, 0.021820928901433945, -0.03175050765275955, 0.018968814983963966, -0.024869218468666077, 0.003118084045127034, 0.007405685260891914, 0.004791248124092817, 0.05830986797809601, -0.02840040624141693, -0.005119467619806528, -0.018063383176922798, 0.01604125089943409, 0.0005616512498818338, -0.007058602757751942, -0.01881791092455387, 0.02108149230480194, 0.006304075475782156, 0.00930332113057375, 0.0019334761891514063, 0.04789739102125168, 0.025186121463775635, 0.026061372831463814, -0.01579980179667473, 0.005809859838336706, -0.038692157715559006, -0.004613934550434351, 0.010616199113428593, 0.02366197481751442, -0.04071429371833801, -0.006002264562994242, 0.023767609149217606, -0.0077791763469576836, -0.020975857973098755, 7.480430940631777e-05, -0.0267102662473917, -0.021217307075858116, 0.0523340106010437, -0.015528171323239803], "index": 10}, {"title": "817 Squadron RAN", "text": "817 Squadron was a Royal Australian Navy Fleet Air Arm squadron. It was originally formed as part of the Royal Navy's Fleet Air Arm for service during World War II and took part in combat operations in Norway, North Africa, Sicily and off the coast of France. Following the conclusion of hostilities, the squadron was disbanded in 1945. In 1950, it was re-raised as part of the Royal Australian Navy and subsequently took part in the Korean War.", "vector": [-0.03873995319008827, 0.019384324550628662, -0.01606990583240986, -0.022784831002354622, -0.0018580828327685595, -0.025754893198609352, 0.014262041077017784, 0.018193429335951805, 0.009670639410614967, 0.015539024956524372, 0.030360642820596695, -0.03552597016096115, -0.017691245302557945, 0.06640314310789108, 0.018021252006292343, 0.04938626289367676, -0.039945196360349655, 0.030963264405727386, 0.010402394458651543, -0.03564075380563736, 0.007374939043074846, 4.141901808907278e-05, 0.021522196009755135, -0.03739122673869133, -0.01402529701590538, 0.011815684847533703, -0.028638867661356926, 0.02683100290596485, -0.02021651528775692, -0.039514750242233276, 0.004272155929356813, -0.02124958112835884, 0.001189101254567504, 0.015653809532523155, -0.009455418214201927, 0.009663465432822704, 0.007335481699556112, 0.03739122673869133, -0.04783666506409645, 0.005258589517325163, 0.012009385041892529, -0.05911429598927498, -0.0192121472209692, 0.048324503004550934, 0.014721181243658066, -0.006614488083869219, -0.03351723402738571, 0.006955256219953299, -0.01782037690281868, -0.007489724084734917, 0.046889688819646835, 0.0608360730111599, -0.024822264909744263, 0.05194023251533508, 0.013558982871472836, -0.008895840495824814, 0.03285721689462662, 0.10600398480892181, -0.029284533113241196, -0.027433624491095543, -0.017203407362103462, -0.03650164231657982, 0.022354386746883392, -0.024894006550312042, 0.02218220941722393, -0.03767818957567215, 0.004178892821073532, -0.009268891997635365, -0.0485253781080246, -0.013587679713964462, -0.010969145223498344, -0.01792081445455551, 0.02129262499511242, 0.06978930532932281, -0.00878105591982603, -0.009677814319729805, 0.04046172648668289, 0.04318787157535553, -0.0077264681458473206, 0.040806081146001816, 0.010883056558668613, 0.01365224551409483, -0.0435035303235054, 0.015754247084259987, 0.007862775586545467, 0.04927147924900055, -0.08792534470558167, -0.05782296508550644, -0.02124958112835884, -0.03664512559771538, -0.0485253781080246, 0.04554096609354019, 0.05248546227812767, -0.03624337539076805, 0.03380419313907623, -0.021063055843114853, 0.005950887221843004, -0.01947041228413582, -0.00919715128839016, -0.025281405076384544, -0.02701753005385399, 0.014764226041734219, 0.03162327781319618, 0.05125151947140694, 0.0055706617422401905, 0.04551227018237114, -0.02340180054306984, 0.02218220941722393, -0.031365010887384415, 0.033861588686704636, 0.005775122437626123, 0.026529692113399506, 0.00047034965245984495, -0.032225899398326874, -0.03928517922759056, 0.01657208986580372, -0.01856647990643978, -0.009670639410614967, -0.015266411006450653, 0.03681730106472969, 0.005133043508976698, 0.00826452299952507, -0.003759210230782628, -0.005567074753344059, -0.005269350949674845, -0.046000104397535324, 0.04186784476041794, 0.009706510230898857, -0.006072846241295338, 0.017031230032444, 0.0011774434242397547, -0.0369894802570343, 0.0271610114723444, -0.005344678647816181, 0.010796967893838882, 0.02060391567647457, -0.060893464833498, 0.008278870955109596, 0.012052429839968681, -0.018509088084101677, 0.04238437861204147, -0.017346888780593872, 0.04318787157535553, -0.006861993111670017, 0.037161655724048615, 0.025640109553933144, 0.017834726721048355, 0.027146661654114723, 0.000986433937214315, -0.005384135991334915, 0.03199633210897446, 0.018437348306179047, -0.001724465866573155, 0.007920168340206146, -0.044852256774902344, -0.019011272117495537, -0.04100695624947548, 0.004103565122932196, 0.01842299848794937, 0.02934192679822445, 0.00020928092999383807, -0.03954344615340233, -0.05986040085554123, 0.037764277309179306, -0.0009433895465917885, 0.011794162914156914, -0.002319016493856907, -0.02919844537973404, 0.02457834780216217, 0.021837854757905006, 0.016471654176712036, 0.03851038217544556, 0.02157958783209324, 0.007052105851471424, 0.01082566473633051, 0.0019423781195655465, -0.012647876515984535, 0.04881234094500542, -0.003452518954873085, -0.008573007769882679, -0.034693777561187744, 0.023129185661673546, -0.048181019723415375, 0.012317869812250137, -0.06887102872133255, -0.019240843132138252, 0.02601316012442112, 0.01817908138036728, 0.005437941290438175, -0.02826581709086895, -0.017432978376746178, -0.04482355713844299, 0.014039645902812481, 0.04069129750132561, -0.019398672506213188, 0.016256431117653847, -0.031824152916669846, 0.025496628135442734, -0.009254544042050838, 0.028610171750187874, 0.000238313470617868, -0.045167915523052216, -0.05133761093020439, -0.014441393315792084, -0.012798531912267208, -0.018451696261763573, 0.0123250437900424, 0.05423593148589134, -0.017332540825009346, 0.011349370703101158, 0.008766707964241505, -0.018078643828630447, 0.007174065336585045, 0.007009061519056559, 0.04031824693083763, -0.0006232468876987696, 0.025281405076384544, 0.018810398876667023, 0.06582922488451004, 0.03248416632413864, -0.012655050493776798, -0.047922756522893906, 0.0071920002810657024, 0.045024432241916656, -0.004817384760826826, -0.02046043425798416, -0.025984464213252068, -0.012281999923288822, -0.0057966448366642, -0.015539024956524372, -0.05744991451501846, -0.014075515791773796, -0.025525324046611786, 0.012927665375173092, -0.02383224479854107, -0.019456064328551292, 0.0027117966674268246, 0.02139306254684925, 0.003570890985429287, -0.032512862235307693, -0.04143739864230156, 0.017490370199084282, -0.01892518438398838, -0.04998888447880745, 0.04436441883444786, 0.002744079800322652, -0.0009613247239030898, 0.020474782213568687, -0.024822264909744263, -0.016902096569538116, 0.020991314202547073, -0.010323479771614075, -0.05142369866371155, -0.007131020538508892, 0.00644948473200202, -0.006227088626474142, -0.04264264181256294, 0.039486054331064224, -0.023416148498654366, -0.01578294299542904, -0.026271427050232887, 0.042843516916036606, 0.028222771361470222, 0.0012240748619660735, -0.013185931369662285, -0.023674415424466133, -0.053547222167253494, -0.04683229699730873, 0.053977664560079575, -0.022139165550470352, -0.025955768302083015, -0.009010626003146172, -0.02107740379869938, 0.02891148254275322, 0.015352499671280384, -0.013924860395491123, -0.005093586165457964, 0.0033126245252788067, -0.012138518504798412, 0.02872495725750923, -0.033861588686704636, 0.0017872389871627092, -0.022598305717110634, -0.031680673360824585, -0.08867144584655762, 0.031508494168519974, 0.0031494146678596735, 0.020517826080322266, 0.0738641768693924, 0.07053540647029877, 0.009082366712391376, 0.03449290618300438, -0.023315710946917534, 0.027821024879813194, 0.017260801047086716, 0.03931387513875961, -0.016729919239878654, 0.006399265956133604, 0.03159458190202713, -0.03902691602706909, -0.00883844867348671, -0.013171583414077759, 0.01875300705432892, 0.029758021235466003, -0.05156718194484711, 0.018379954621195793, -0.031365010887384415, -0.008738011121749878, 0.027103617787361145, -0.00937650352716446, 0.0027656021993607283, 0.06410744786262512, -0.01717471145093441, -0.017045577988028526, 0.002744079800322652, -0.048209719359874725, -0.05592901259660721, -0.017031230032444, -0.026429256424307823, -0.005997518543154001, 0.016371216624975204, 0.029815414920449257, -0.020847832784056664, 0.0010814903071150184, 0.032398078590631485, -0.019456064328551292, 0.024563999846577644, 0.012174388393759727, -0.013845945708453655, 0.009971950203180313, 0.06158217415213585, -0.008199956268072128, -0.00420400220900774, 0.014749878086149693, -0.0004905267269350588, 0.011198715306818485, 0.014484437182545662, 0.04614358767867088, 0.02150784805417061, -0.028437994420528412, 0.007991908118128777, -0.04915669560432434, 0.012296347878873348, 0.04163827374577522, -0.06433701515197754, 0.041552186012268066, 0.005283698905259371, -0.010761098004877567, 0.025711849331855774, -0.03756340593099594, 0.00046855612890794873, 0.020187819376587868, 0.05478116124868393, -0.028667563572525978, 0.03475117310881615, -0.06714925169944763, -0.016127297654747963, 0.007453853730112314, -0.03968692943453789, 0.009548680856823921, 0.039055611938238144, 0.01925519108772278, -0.012726791203022003, -0.03337375074625015, -0.0009218673803843558, 0.005319569259881973, 0.0019477587193250656, 0.010380872525274754, 0.021880898624658585, -0.018437348306179047, 0.02869626134634018, 0.06984669715166092, -0.04740622267127037, -0.022928312420845032, 0.019226495176553726, -0.011586114764213562, -0.03495204448699951, -0.04396267235279083, 0.04436441883444786, -0.005441528279334307, 0.019527805969119072, 0.0022687981836497784, -0.04046172648668289, -0.046574030071496964, 0.04975931718945503, -0.032512862235307693, 0.009943254292011261, 0.012411132454872131, 0.0030400101095438004, -0.004383353982120752, 0.01379572693258524, 0.04304439201951027, -0.045024432241916656, 0.010423916392028332, 0.019484760239720345, -0.028524082154035568, 0.010947623290121555, 0.013975079171359539, 0.0681823119521141, -0.00012868479825556278, -0.03727644309401512, -0.005255002528429031, -0.011650681495666504, 0.06789535284042358, -0.011500026099383831, -0.008824099786579609, -0.04473746940493584, 0.011062408797442913, -0.03102065809071064, 0.011327848769724369, 0.024233991280198097, 0.008967581205070019, -0.014893359504640102, 0.0008492299821227789, -0.005165326874703169, 0.03736253082752228, -0.026142293587327003, -0.006180457305163145, 0.02407616190612316, -0.03394767642021179, 0.007504072040319443, 0.01906866580247879, -0.0027135901618748903, 0.06336134672164917, 0.0014939990360289812, 0.025697501376271248, -0.018150385469198227, 0.0015522883040830493, 0.04476616531610489, -0.04740622267127037, -0.019398672506213188, -0.03785036876797676, 0.032225899398326874, -0.00710232462733984, -0.07214239984750748, -0.00511510856449604, -0.052255891263484955, 0.01238243654370308, 0.015653809532523155, 0.009957602247595787, -0.050648901611566544, -0.014247693121433258, -0.07128150761127472, -0.030532822012901306, 0.017002534121274948, -0.02193829044699669, 0.018982576206326485, 0.007697771769016981, -0.010423916392028332, 0.021880898624658585, -0.03618598356842995, -0.009082366712391376, -0.010237391106784344, -0.012009385041892529, 0.029901502653956413, 0.008300392888486385, 0.04720534756779671, 0.022957008332014084, -0.020245211198925972, -0.009390851482748985, 0.0377068854868412, 0.04975931718945503, 0.014584874734282494, -0.02908365987241268, 0.007575812749564648, -0.026601433753967285, 0.008386482484638691, -0.040203459560871124, -0.021378714591264725, -0.06416483968496323, -0.0009048289502970874, -0.0011657855939120054, -0.004487377591431141, 0.00948411412537098, -0.04330265894532204, 0.017834726721048355, -0.010854360647499561, -0.0071202595718204975, 0.0235739778727293, -0.00786994956433773, 0.036042504012584686, -0.020474782213568687, 0.004125087521970272, 0.011234586127102375, 0.01581163890659809, -0.07483984529972076, -0.014039645902812481, -0.0072386316023766994, -0.06295959651470184, 0.049644529819488525, 0.025884026661515236, -0.012439829297363758, 0.00888866651803255, -0.01261200662702322, -0.007098737638443708, -0.04100695624947548, -0.02723275125026703, -0.009398025460541248, 0.009433895349502563, -0.022196557372808456, 0.01180851086974144, 0.03015976957976818, -0.00570696871727705, -0.00761168310418725, 0.012669399380683899, 0.019484760239720345, 0.00906801875680685, 0.04387658089399338, -0.006370570044964552, 0.012533091939985752, 0.021636979654431343, 0.02196698822081089, -0.022139165550470352, -0.0019029207760468125, -0.012296347878873348, -0.03635816276073456, 0.023631369695067406, -0.015194670297205448, 0.010201520286500454, -0.025697501376271248, 0.0235739778727293, 0.012439829297363758, -0.001899333787150681, -0.03641555458307266, 0.02017347142100334, -0.048066236078739166, 0.030360642820596695, 0.01782037690281868, 0.005211958196014166, 0.010366524569690228, 0.02321527525782585, -0.019872160628437996, -0.026199685409665108, -0.0033861587289720774, 0.00114964391104877, 0.025023140013217926, -0.027275795117020607, 0.01681600883603096, -0.0036659473553299904, 0.00913975853472948, -0.0037054046988487244, 0.016342520713806152, 0.008451048284769058, -0.041380006819963455, -0.061696961522102356, 0.0034901825711131096, 0.0018356639193370938, 0.018767355009913445, -0.023157881572842598, -0.027462320402264595, -0.036013808101415634, 0.02168002538383007, -0.009075192734599113, 0.03635816276073456, 0.022411778569221497, -0.03231199085712433, -0.018882138654589653, 0.00434748362749815, 0.022153513506054878, -0.05882733315229416, 0.00018787082808557898, -0.013185931369662285, 0.06714925169944763, -0.00019930450071115047, -0.03030325099825859, 0.022713089361786842, -0.0398591049015522, -0.002200644463300705, -0.03308678790926933, -0.018953880295157433, 0.05228458717465401, 0.0023530933540314436, -0.000391883309930563, -0.005412832368165255, -0.005599357653409243, -0.03170936927199364, 0.043130479753017426, 0.014893359504640102, 0.02153654396533966, -0.03466508165001869, -0.004042585846036673, -0.023516586050391197, 0.009957602247595787, 0.04462268576025963, 0.003244471037760377, -0.0051043471321463585, 0.002984411083161831, -0.0014787542168051004, -0.014692485332489014, -0.02955714799463749, -0.028653215616941452, -0.013099842704832554, 0.03664512559771538, 0.000426184298703447, 0.01010825764387846, 0.046172283589839935, -0.05736382305622101, 0.008049300871789455, 0.008687793277204037, -0.03173806518316269, -0.033287663012742996, 0.02203872799873352, 0.012253303080797195, 0.023530934005975723, -0.0369320884346962, 0.028452342376112938, 0.022268299013376236, 0.0246500875800848, 0.005240654572844505, 0.00828604493290186, 0.05076368525624275, -0.02941366657614708, 0.005936538800597191, 0.02064695954322815, -0.013444198295474052, -0.05911429598927498, 0.02618533745408058, 0.012418306432664394, 0.0318528488278389, -0.01599816605448723, 0.0492427833378315, -0.008329089730978012, 0.0275484099984169, 0.006725686136633158, 0.03159458190202713, -0.02289961650967598, -0.022440476343035698, 0.001337963156402111, 0.025984464213252068, 0.034578993916511536, -0.004336722195148468, 0.03670251742005348, -0.009491288103163242, 0.000607105263043195, 0.009986299090087414, 0.005595770664513111, 0.03810863569378853, -0.03928517922759056, 0.010976319201290607, -0.031393710523843765, 0.0077192941680550575, -0.023387452587485313, -0.010667834430932999, -0.011507200077176094, 0.008063648827373981, -0.019413020461797714, -0.015940772369503975, -0.016658179461956024, 0.00585045013576746, -0.030791087076067924, 0.003441757755354047, 0.0018491152441129088, -0.02103435806930065, 0.012597658671438694, 0.02747667022049427, -0.02776363119482994, 0.028739305213093758, 0.026888396590948105, 0.016084253787994385, -0.0622708834707737, 0.01343702431768179, -0.0057177296839654446, -0.03845299035310745, -0.010423916392028332, 0.03687469661235809, -0.012841576710343361, -0.0015307661378756166, 0.01667252741754055, 0.00544870225712657, 0.014864662662148476, 0.012834402732551098, -0.00670057674869895, 0.044852256774902344, 0.008357785642147064, -0.006826122757047415, -0.019011272117495537, -0.013960730284452438, 0.007970386184751987, 0.01551032904535532, -0.006097955163568258, 0.019126057624816895, -0.025554019957780838, -0.030389340594410896, 0.0015495980624109507, 0.011636333540081978, -0.0010689357295632362, 0.049328871071338654, -0.007898645475506783, -0.002853484358638525, -0.018580827862024307, -0.03578423708677292, -0.013558982871472836, -0.015524677000939846, -0.010947623290121555, -0.010617616586387157, 0.0355546660721302, -0.024463562294840813, -0.012310695834457874, -0.03027455508708954, 0.02307179383933544, 0.002892941702157259, 0.025668805465102196, 0.010718053206801414, -0.021766113117337227, -0.03971562534570694, -0.019240843132138252, -0.00121421052608639, -0.004386940971016884, 0.010868708603084087, 0.046746209263801575, -0.04172436147928238, 0.000966705265454948, 0.0012617387110367417, 0.03437811881303787, -0.005326743237674236, 0.026744915172457695, 0.009498462080955505, -0.005972409155219793, 0.003088434925302863, -0.013924860395491123, 0.023703111335635185, 0.008824099786579609, -0.0005541965365409851, 0.005940125789493322, 0.012411132454872131, 0.017691245302557945, 0.041666969656944275, -0.046602725982666016, -0.02640056051313877, 0.030475428327918053, -0.049214087426662445, -0.01064631249755621, -0.01573989912867546, 0.015180321410298347, -0.04244177043437958, 0.010266087017953396, 0.022196557372808456, 0.002710003172978759, -0.008903014473617077, 0.0023477128706872463, 0.011370893567800522, -0.017877770587801933, -0.005405657924711704, 0.004322374239563942, 0.014678137376904488, -0.014627918601036072, 0.010553049854934216, -0.05664641782641411, -0.018595177680253983, -0.011643507517874241, -0.0723719671368599, -0.010244565084576607, 0.013408327475190163, -0.04318787157535553, -0.018939532339572906, 0.015036840923130512, 0.012798531912267208, -0.03366071358323097, -0.008931711316108704, 0.06112303584814072, 0.019656937569379807, 0.0752989873290062, -0.02486531063914299, 0.008257349021732807, 0.04777927324175835, -0.03825211524963379, 0.0006958843441680074, -0.01064631249755621, 0.025195317342877388, 0.016399912536144257, -0.0012115202844142914, 0.04292960464954376, -0.03727644309401512, -0.010990668088197708, -0.01799255609512329, 0.05851167440414429, -0.013272020034492016, 1.6043563846324105e-06, -0.018839094787836075, -0.04651663824915886, 0.009111062623560429, -0.009663465432822704, -0.0006555301952175796, -0.016830356791615486, 0.017834726721048355, -0.001691285870037973, -0.014068341813981533, -0.010696531273424625, -0.013996601104736328, 0.01870996132493019, 0.02579793892800808, 0.022340038791298866, 0.012891795486211777, -0.013429850339889526, 0.025195317342877388, 0.002304668538272381, -0.0019172688480466604, -0.008221478201448917, -0.0449383445084095, 0.02172306925058365, 0.007740816101431847, 0.004067694768309593, 0.02239743061363697, 0.020560869947075844, 0.008393656462430954, -0.023602673783898354, -0.03337375074625015, -0.0024068988859653473, -0.03538249060511589, 0.01971433125436306, -0.0005564384046010673, -0.003004139754921198, 0.026630129665136337, 0.026386210694909096, -0.002297494327649474, -0.017547763884067535, -0.016414260491728783, -0.015983816236257553, -0.010746749117970467, -0.014534655958414078, -0.00027821920230053365, 0.008415178395807743, -0.023315710946917534, 0.007048518862575293, 0.0018688439158722758, -0.00684405816718936, -0.05027584731578827, -0.008601703681051731, 0.00701264850795269, 0.0008227755897678435, -0.032541558146476746, -0.036013808101415634, -0.030647605657577515, -0.03664512559771538, 0.012827228754758835, 0.02462139166891575, 0.029327578842639923, -0.027247099205851555, -0.009225848130881786, 0.04215480759739876, 0.0031978394836187363, -0.01236091461032629, 0.00088779057841748, -0.033574625849723816, -0.02297135628759861, 0.024492258206009865, 0.0006120374309830368, -0.01343702431768179, -0.03750601410865784, -0.030102377757430077, 0.03452160209417343, 0.006144586950540543, -0.02086218073964119, -0.023602673783898354, 0.046287067234516144, -0.010122605599462986, -0.020618263632059097, -0.02594142034649849, -0.02165132947266102, -0.009347806684672832, -0.0016697637038305402, 0.03796515241265297, -0.001644654432311654, 0.016299476847052574, 0.02124958112835884, -0.027892764657735825, -0.02117783948779106, -0.0013110603904351592, -0.0063956789672374725, -0.006438723299652338, 0.02701753005385399, -0.01456335186958313, -0.02347354032099247, -0.006890689488500357, -0.0347798690199852, 0.009347806684672832, -0.02289961650967598, -0.012504395097494125, -0.01073240116238594, 0.01839430257678032, -0.021923942491412163, 0.01573989912867546, -0.0007510349387302995, 0.004422811325639486, 0.03102065809071064, 0.044134847819805145, 0.0032462645322084427, -0.034578993916511536, 0.01856647990643978, -0.004770753439515829, 0.03896952047944069, -0.017834726721048355, -0.008522788994014263, -0.0028570713475346565, 0.0036246965173631907, 0.0064207883551716805, 0.023057445883750916, 0.02053217403590679, -0.01368811633437872, 0.04089217260479927, -0.0019674873910844326, -0.006424375344067812, -0.012748314067721367, -0.02414790354669094, 0.014749878086149693, -0.025166619569063187, -0.048640161752700806, 0.008343437686562538, -0.04826711118221283, -0.016615135595202446, 0.01585468463599682, -0.008795403875410557, -0.04955844208598137, 0.03736253082752228, -0.039486054331064224, -0.039514750242233276, -0.03162327781319618, -0.00171101454179734, 0.017232105135917664, -0.018308214843273163, 0.0063956789672374725, 0.011564592830836773, 0.005567074753344059, -0.04711925983428955, -0.022842222824692726, -0.015452936291694641, 0.01300658006221056, 0.027318840846419334, -0.018451696261763573, -0.017662547528743744, 0.014656615443527699, -0.010101083666086197, -0.039773017168045044, -0.035296399146318436, -0.0177773330360651, 0.020632611587643623, -0.008250175043940544, 0.022354386746883392, 0.04447920247912407, -0.021694373339414597, -0.020273908972740173, 0.008960407227277756, -0.028222771361470222, -0.010560223832726479, 0.03127892315387726, -0.05248546227812767, -0.008099519647657871, -0.005082825198769569, -0.000463623960968107, 0.011830033734440804, 0.008522788994014263, 0.010158476419746876, -0.044708773493766785, -0.02651534415781498, 0.0006949875387363136, -0.02766319550573826, -0.037046872079372406, -0.052083712071180344, -0.0005923087592236698, 0.01599816605448723, -0.028667563572525978, 0.0063885049894452095, 0.04433572292327881, 0.010976319201290607, 0.0035565427970141172, -0.025137923657894135, -0.046459246426820755, 0.007669075392186642, -0.02987280674278736, 0.00801343098282814, 0.022885268554091454, 0.028036246076226234, -0.006876341532915831, 0.0010976319899782538, -0.04204002022743225, 0.009398025460541248, -0.006040562875568867, 0.05119412764906883, 0.0037914933636784554, 0.007862775586545467, -0.08069388568401337, 0.0049716271460056305, -0.008085171692073345, -0.019298234954476357, 0.01218156237155199, 0.02350223809480667, -0.01870996132493019, 0.04338874667882919, -0.00585045013576746, -0.004483790602535009, -0.022354386746883392, 0.03420594334602356, -0.0017262594774365425, 0.029528452083468437, 0.03288591280579567, 0.04186784476041794, 0.004946517758071423, -0.003061532275751233, -0.022784831002354622, -0.008192782290279865, -0.012447003275156021, 0.007306785322725773, -0.010811315849423409, 0.03489465266466141, 0.008451048284769058, 0.0028301686979830265, 0.03380419313907623, 0.004548357333987951, -0.03274243324995041, -0.023416148498654366, -0.015596417710185051, 0.009111062623560429, -0.0015782943228259683, -0.012475699186325073, 0.014003775082528591, -0.006836884189397097, 0.08092345297336578, 0.003920626360923052, 0.037305139005184174, 0.04445050656795502, 0.010596094653010368, -0.017648199573159218, 0.018021252006292343, -0.03452160209417343, -0.03581293299794197, 0.044134847819805145, -0.008350611664354801, 0.007762338500469923, 0.03188154473900795, 0.00865909643471241, -0.049041908234357834, -0.005975996144115925, -0.0012464937753975391, -0.012942013330757618, -0.007539942394942045, 0.028237121179699898, -0.015352499671280384, 0.06732142716646194, -0.00309560913592577, -0.0007550703594461083, -0.02114914357662201, 0.005907842423766851, 0.021923942491412163, 0.030446732416749, 0.006417201366275549, -0.0096060736104846, -0.015008144080638885, 0.046574030071496964, 0.03323027119040489, -0.011779814958572388, -0.009541506879031658, -0.006915798876434565, 0.008494093082845211, -0.009017799980938435, 0.010596094653010368, 0.021522196009755135, -0.04975931718945503, -0.0022939073387533426, -0.014412696473300457, -0.034148551523685455, 0.008845622651278973, 0.01105523481965065, -0.02651534415781498, -0.015338150784373283, -0.03173806518316269, -0.02562575973570347, -0.03684599697589874, 0.0173899345099926, 0.009168455377221107, -0.018021252006292343, 0.0005900668329559267, 0.027806676924228668, -0.003420235589146614, 0.005714142695069313, 0.016873400658369064, -0.0037627972196787596, -0.005473811645060778, 0.004928582813590765, 0.0010205107973888516, 0.008465397171676159, 0.01842299848794937, -0.0031745238229632378, 0.007783860433846712, -0.017648199573159218, -0.009778250940144062, 0.0011505406582728028, -0.001546907820738852, 0.020632611587643623, -0.04961583390831947, 0.008515615016222, -0.0033467013854533434, 0.02436312474310398, -0.03345983847975731, -0.006370570044964552, -0.020661307498812675, -0.0022957008332014084, -0.0181073397397995, 0.0550394281744957, -0.017189059406518936, -0.019585197791457176, 0.022210905328392982, -0.004476616624742746, 0.023961378261446953, 0.001879605115391314, 0.018049947917461395, -0.025051835924386978, 0.017160363495349884, 0.007489724084734917, 0.030331946909427643, -0.0006129341782070696, 0.007582986727356911, 0.0005855830386281013, -0.023416148498654366, 0.006237849593162537, 0.030188465490937233, 0.020374344661831856, -0.019771723076701164, -0.017016882076859474, 0.012942013330757618, 0.023000052198767662, 0.002866039052605629, -0.00292522506788373, 0.021737417206168175, 0.014276389963924885, -0.015395543538033962, -0.011966340243816376, -0.03939996659755707, -0.014764226041734219, 0.022454824298620224, 0.005082825198769569, 0.03234068676829338, -0.03871125727891922, 0.004695425741374493, -0.011980689130723476, 0.0015854684170335531, -0.0003806738241109997, 0.0011370893334969878, 0.00479586236178875, 0.012389610521495342, -0.009900209493935108, -0.014735530130565166, -0.06031953915953636, -0.0020141187123954296, 0.03564075380563736, -0.01419030036777258, 0.006180457305163145, -0.011256108060479164, 0.04522530734539032, -0.022512216120958328, 0.02165132947266102, -0.008745185099542141, -0.014340955764055252, 0.010639138519763947, 0.00828604493290186, -0.01456335186958313, -0.019628241658210754, -0.028237121179699898, 0.004426398314535618, -0.031651973724365234, 0.010689357295632362, 0.008623226545751095, 0.003283928381279111, -0.017074275761842728, 0.004067694768309593, -0.015768595039844513, -0.024965746328234673, -0.014979448169469833, -0.04513921961188316, -0.009046495892107487, 0.023947030305862427, 0.01856647990643978, 0.006639597471803427, -0.01767689734697342, -0.004677490331232548, -0.016973838210105896, -0.005315982270985842, -0.029112355783581734, 0.030963264405727386, 0.002110968576744199, -0.013358109630644321, -0.021995684131979942, 0.005215545184910297, 0.024894006550312042, 0.01753341592848301, 0.007016235496848822, -0.0048389071598649025, -0.04740622267127037, -0.010782619938254356, 0.006230675615370274, 0.02246917225420475, -0.02579793892800808, 0.027935810387134552, 0.010574571788311005, 0.010954797267913818, -0.006632423028349876, -0.006592965684831142, -0.02371745929121971, -0.0036659473553299904, -0.004275742918252945, 0.010237391106784344, -0.02483661286532879, -0.012274825014173985, 0.01741863042116165, -0.008623226545751095, 0.005606532096862793, -0.009806946851313114, -0.0005398484063334763, -0.006270132958889008, -0.007848427630960941, 0.03799384832382202, 0.017432978376746178, -0.026673173531889915, 0.0031691433396190405, 0.018164733424782753, -0.004820971749722958, 0.03750601410865784, 0.029958896338939667, 0.04519661143422127, -0.02637186273932457, -0.0007523800595663488, 0.001624925760552287, 0.01236091461032629, 0.0063813310116529465, -0.037620797753334045, 0.019542153924703598, 0.017117319628596306, 0.06215609982609749, 0.0012581517221406102, -0.010452613234519958, 0.027634499594569206, -0.020159123465418816, 0.021852202713489532, 0.0033933327067643404, 0.0035206724423915148, 0.013142887502908707, 0.012152866460382938, -0.014556177891790867, -0.009369328618049622, 0.013171583414077759, 0.005893494468182325, -0.03902691602706909, -0.01311419066041708, -0.0034166486002504826, -0.006022627465426922, -0.027950158342719078, 0.04307308793067932, -0.0027835373766720295, 0.0163138248026371, 0.028882786631584167, -0.01257613580673933, 0.01315006148070097, -0.020976966246962547, -0.03348853439092636, -0.012353739701211452, -0.001990803051739931, -0.014470089226961136, 0.011069582775235176, 0.012547439895570278, -0.0405765138566494, 0.01127045601606369, -0.021923942491412163, 0.006582204718142748, -0.007956038229167461, 0.003759210230782628, -0.03162327781319618, -0.0006604623631574214, -0.009649117477238178, 0.0162851270288229, -0.014735530130565166, 0.0030400101095438004, 0.0637630894780159, 0.011837207712233067, -0.014477263204753399, 0.018437348306179047, -0.024176599457859993, -0.02582663483917713, -0.02397572621703148, -0.02762015163898468, 0.007109498605132103, -0.003461486427113414, -0.003827363718301058, 0.03030325099825859, -0.008379308506846428, 0.03271373733878136, 0.01419030036777258, 0.042413074523210526, 0.026127945631742477, 0.010739575140178204, -0.030504124239087105, 0.03394767642021179, 0.009885861538350582, 0.010129779577255249, 0.015051188878715038, -0.03348853439092636, 0.0010985287372022867, -0.0202882569283247, 0.014032470993697643, -0.004498139023780823, -0.013932034373283386, 0.007453853730112314, -0.028280165046453476, -0.020130427554249763, 0.011966340243816376, 0.010653486475348473, -0.002358473837375641, -0.02307179383933544, -0.03041803650557995, 0.01635686866939068, -0.02017347142100334, 0.008056474849581718, 0.023803548887372017, 0.05130891501903534, 0.013680942356586456, -0.007884297519922256, -0.009986299090087414, 0.006922972854226828, 0.020202167332172394, 0.03561205789446831, 0.004394114948809147, 0.008343437686562538, 0.023961378261446953, -0.02944236248731613, -0.007582986727356911, -0.0036838825326412916, -0.004110739100724459, -0.03512422367930412, 0.005968822166323662, -0.007683423813432455, -0.005527617409825325, -0.007374939043074846, -0.03248416632413864, 0.005233480595052242, -0.006560682784765959, 0.008099519647657871, 0.03523900732398033, -0.022139165550470352, -0.0003409922937862575, 0.03277112916111946, -0.02397572621703148, 0.008917363360524178, -0.009383677504956722, -0.00971368420869112, -0.00021241958893369883, -0.028796697035431862, -0.009125410579144955, -0.003565510269254446, -0.005208371207118034, 0.008573007769882679, -0.014498786069452763, 0.006445897743105888, -0.011543070897459984, -0.016686875373125076, -0.0033520818687975407, 0.018451696261763573, 0.031680673360824585, -0.020474782213568687, 0.0015558754093945026, -0.017432978376746178, 0.0054917470552027225, 0.03911300376057625, -0.0064279623329639435, 0.001273396541364491, 0.013659420423209667, -0.058482978492975235, -0.009670639410614967, -0.019699983298778534, 0.007396460976451635, -0.024176599457859993, 0.004125087521970272, 0.024305732920765877, 0.020029990002512932, -0.0016410674434155226, 0.0008635781123302877, 0.035726845264434814, 0.0009048289502970874, -0.027964506298303604, 0.012310695834457874, 0.026988832280039787, 0.05133761093020439, -0.013874641619622707, 0.003011313732713461, -0.008501267060637474, 9.920386946760118e-05, 0.0021235232707113028, 0.024320080876350403, -0.021378714591264725, -0.006750795058906078, -0.016199039295315742, -0.015008144080638885, -0.0005434354534372687, 0.019915204495191574, -0.015495981089770794, 0.005534791387617588, -0.0235739778727293, 0.021493498235940933, -0.035009436309337616, 0.002245482290163636, 0.02021651528775692, 0.015180321410298347, 0.013458546251058578, 0.042413074523210526, 0.00040129927219823003, -0.019628241658210754, 0.027146661654114723, -0.021593935787677765, 0.027433624491095543, 0.035870324820280075, -0.00764037948101759, 0.02479356899857521, 0.007292437367141247, 0.01868126541376114, 0.004928582813590765, 0.02632881887257099, 0.007855601608753204, -0.009534332901239395, -0.016486002132296562, -0.01039522048085928, 0.028739305213093758, -0.005007497500628233, -0.010531527921557426, 0.01889648847281933, 0.0043187872506678104, 0.00445509422570467, 0.014003775082528591, -0.0033054505474865437, 0.03001628816127777, -0.00037708680611103773, 0.0061625218950212, 0.006327525246888399, 0.045282699167728424, -0.03449290618300438, 0.000626833934802562, -0.015983816236257553, 0.012447003275156021, -0.013063972815871239, -0.022024380043148994, -0.001338859903626144, 0.004182479809969664, -0.0355546660721302, -0.02411920763552189, -0.04815232381224632, -0.009584550745785236, 0.023028749972581863, -0.019169101491570473, 0.0012491841334849596, -0.0005802024970762432, 0.018724309280514717, 0.013680942356586456, -0.003120718291029334, 0.02081913687288761, 0.010043690912425518, -0.009111062623560429, -0.042700037360191345, -0.0009227641276083887, 0.003827363718301058, -0.015452936291694641, -0.03308678790926933, -0.048783641308546066, -0.022282646968960762, 0.05624467134475708, 0.02246917225420475, 0.02343049645423889, -0.04981670901179314, -0.020259559154510498, 0.006352634634822607, 0.01932693086564541, -0.01263352856040001, -0.05331765115261078, 0.019183449447155, 0.007518420461565256, -0.03285721689462662, 0.018293866887688637, -0.02922714129090309, 0.022813526913523674, 0.025683153420686722, -0.034722473472356796, -0.041380006819963455, 0.024449214339256287, 0.015625113621354103, 0.025539672002196312, 0.007582986727356911, -0.015424240380525589, -0.01456335186958313, -0.008271696977317333, 0.024994442239403725, 0.017619503661990166, -0.01023021712899208, -0.0003501840401440859, -0.0376494936645031, 0.01443421933799982, 0.03228329122066498, -0.00278174364939332, -0.01203808095306158, -0.011177193373441696, 0.0014401936205103993, 0.01820777729153633, 0.018021252006292343, -0.053547222167253494, 0.015381195582449436, -0.02060391567647457, 0.013953556306660175, 0.005785883404314518, -0.02225394919514656, -0.03245547041296959, -0.002996965777128935, -0.012525917962193489, -0.02193829044699669, -0.02912670373916626, 0.021278277039527893, -0.032972004264593124, -0.005907842423766851, -0.04083477705717087, 0.00047483344678767025, 0.010631964541971684, 0.0056495764292776585, -0.02057521790266037, -0.010696531273424625, 0.021134795621037483, 0.028007550165057182, -0.013085494749248028, -0.019513458013534546, -0.012109821662306786, 0.01792081445455551, 0.016557741910219193, -0.006704163737595081, 0.01741863042116165, -0.016930794343352318, 0.017088623717427254, -0.009641943499445915, 0.017935162410140038, -0.005628054030239582, -0.013680942356586456, 0.01507988478988409, -0.019398672506213188, 0.011134149506688118, 0.023660067468881607], "index": 11}, {"title": "The Standard (Philippines)", "text": "The Standard is a majority broadsheet newspaper in the Philippines. It is owned by the Romualdez family. Romualdezes also owns Journal Publications, Inc., the proprietor of the People's Journal, a tabloid newspaper.Initially established as the Manila Standard, it merged with another newspaper of record, Today, on March 6, 2005 and became Manila Standard Today or MST and recently rebranded as The Standard.", "vector": [-0.001696532592177391, -0.02142198197543621, -0.025242570787668228, 0.0060270181857049465, -0.011845489032566547, -0.033083949238061905, -0.023273883387446404, -0.018168644979596138, -0.004170946776866913, 0.00034462448093108833, 0.062297262251377106, 0.02527593821287155, -0.032766956835985184, -0.0422433502972126, -0.036003611981868744, -0.019970493391156197, -0.01796843856573105, -0.0033075606916099787, 0.03700463846325874, 0.02150540240108967, 0.003680860623717308, -0.007849722169339657, -0.03677106648683548, 0.016441872343420982, 0.010727674700319767, 0.017534660175442696, -0.004450400359928608, -0.03970741480588913, -0.01414785161614418, -0.0008607791387476027, -0.01277143880724907, 0.0014327202225103974, 0.0003678253560792655, -0.01838553324341774, -0.02597665600478649, 0.021839076653122902, 0.0398075170814991, 0.01096124853938818, -0.043911729007959366, -0.012754755094647408, 0.04588041454553604, 0.014314689673483372, 0.006047872826457024, 0.021188409999012947, -0.013405422680079937, -0.03335088863968849, -0.07988197356462479, 0.00032116289366967976, -0.04354468360543251, 0.024291593581438065, 0.009376288391649723, 0.010569179430603981, -0.011336633004248142, 0.029580354690551758, -0.0022231147158890963, 0.03313400223851204, -0.0050927260890603065, 0.08028238266706467, 0.022589847445487976, -0.08195076137781143, 0.005947770085185766, -0.022756686434149742, -0.0014942416455596685, 0.0036433220375329256, 0.0010057195322588086, 0.03416839614510536, 0.005597410723567009, -0.043811626732349396, 0.03750515356659889, -0.027628351002931595, -0.024875527247786522, 0.019570082426071167, 0.02667737565934658, 0.029930714517831802, -0.03607034683227539, 0.029964081943035126, 0.05862682685256004, -0.026694059371948242, -0.03241659700870514, 0.05685834586620331, 0.012362685985863209, -0.011353316716849804, 0.007311669643968344, -0.01706751435995102, -0.0093429209664464, -0.011703676544129848, -0.018652474507689476, -0.054188940674066544, -0.035302892327308655, 0.03640402480959892, 0.06112939491868019, 0.033000532537698746, 0.017701497301459312, -0.06800311803817749, 0.06920434534549713, 0.008650543168187141, -0.028646063059568405, 0.007745448034256697, -0.016316743567585945, -0.020687896758317947, 0.021789025515317917, 0.008020730689167976, 0.037238214164972305, -0.0006788215832784772, 0.05819305032491684, -0.0039957668632268906, 0.024391695857048035, 0.013071747496724129, 0.017918387427926064, 0.047248486429452896, 0.022606531158089638, -0.0418095700442791, 0.02424154244363308, 0.0036349801812320948, -0.08181729167699814, 0.045112960040569305, -0.003970741294324398, -0.008817381225526333, 0.04614735394716263, -0.004788246937096119, -0.05041840299963951, -0.012179164215922356, -0.0026840041391551495, -0.06713555753231049, 0.0038581257686018944, -0.061963584274053574, 0.014164535328745842, 0.0015213527949526906, 0.02193918079137802, -0.0037455102428793907, -0.06780291348695755, -0.0011553522199392319, 0.008183397352695465, -0.016675444319844246, -0.03191608563065529, 0.0157494954764843, 0.023357301950454712, -0.015899648889899254, -0.02527593821287155, -0.014456501230597496, 0.033601146191358566, -0.02375771291553974, -0.0019196782959625125, 0.0127797806635499, -0.014815202914178371, -0.01504877582192421, 0.039874251931905746, 0.04294406622648239, 0.04891686514019966, -0.013363713398575783, -0.03994098678231239, -0.033083949238061905, -0.0026840041391551495, 0.01465670671314001, -0.026610640808939934, 0.03224975988268852, -0.05088555067777634, -0.029847295954823494, -0.06563401967287064, 0.017601395025849342, -0.03910679742693901, 0.04881676286458969, -0.012788122519850731, -0.006410744972527027, 0.02706110291182995, -0.022689949721097946, 0.09109348058700562, 0.011845489032566547, 0.0013388738734647632, 0.018819311633706093, -0.02911320887506008, 0.018001805990934372, -0.06326492130756378, -0.06279777735471725, -0.03727158159017563, -0.0067986431531608105, -0.022005915641784668, 0.03550310060381889, 0.043911729007959366, 0.01536576822400093, 0.03940710425376892, 0.0038310145027935505, -0.004771563224494457, -0.04174283519387245, -0.007457653060555458, 0.0323665477335453, 0.05202004685997963, 0.0505518764257431, -0.02263989858329296, -0.02859601192176342, -0.010277212597429752, 0.06213042140007019, 0.008608833886682987, -0.039874251931905746, -0.047548793256282806, 0.02627696469426155, 1.1111663297924679e-05, -0.016433529555797577, -0.04070844128727913, -0.008016559295356274, 0.04454571008682251, 0.046814706176519394, 0.029463568702340126, -0.002713200869038701, 0.018819311633706093, 0.0008070782059803605, -0.014990382827818394, 0.0090926643460989, 0.017134249210357666, 0.04721511900424957, -0.026110127568244934, -0.047115013003349304, -0.006243907380849123, 0.03290042653679848, -0.017451241612434387, 0.0013409593375399709, 0.0231237281113863, -0.002239798428490758, 0.07794665545225143, -0.021071624010801315, 0.016650419682264328, -0.06356523185968399, -0.025342673063278198, -0.011378343217074871, 0.02495894581079483, -0.009518100880086422, -0.024007970467209816, -0.004679802339524031, 0.0015682759694755077, 0.02515915036201477, 0.020154014229774475, -0.001731985597871244, 0.02282342128455639, 0.04264375939965248, -0.00864220131188631, 0.01990375854074955, -0.01708419807255268, -0.032283127307891846, -0.07627827674150467, 0.011903882026672363, 0.0007012404385022819, -0.012304292991757393, -0.016341770067811012, -0.018452268093824387, 0.004779905080795288, 0.025426091626286507, -0.04327774420380592, -0.05952775105834007, -0.01808522455394268, 0.022906839847564697, -0.004150092136114836, -0.04881676286458969, 0.030347809195518494, 0.03403492644429207, -0.0013711987994611263, 0.004888349678367376, 0.002446260303258896, 0.022806737571954727, 0.010585863143205643, -0.012504498474299908, 0.005793445277959108, -0.01668378710746765, 0.02666069194674492, -0.0036662621423602104, 0.0018591994885355234, 0.01718430034816265, -0.018252063542604446, 0.020053911954164505, 0.023073676973581314, 0.06279777735471725, -0.005101067945361137, 0.03647075966000557, 0.02666069194674492, -0.008496218360960484, -0.005192828830331564, 0.029346780851483345, 0.05822641775012016, 0.04297743737697601, -0.012104087509214878, -0.008492047898471355, 0.03375130146741867, -0.013789149932563305, 0.0024817134253680706, -0.01938655972480774, 0.0026005853433161974, -0.0032658514101058245, 0.017901703715324402, -0.05789273977279663, 0.03243328258395195, 0.015974726527929306, -0.008175055496394634, 0.014564946293830872, 0.02727799117565155, 0.046714603900909424, 0.03730494901537895, -0.03366788104176521, -0.007666200399398804, 0.020888101309537888, 0.010343948379158974, -0.0011782924411818385, -0.006398232188075781, 0.015599341131746769, -0.0255595613270998, -0.02072126418352127, 0.04918380454182625, 0.021572137251496315, -0.03830597549676895, 0.007991533726453781, -0.023490771651268005, -0.06660167872905731, -0.016058145090937614, -0.021755658090114594, -0.03413502871990204, -0.022372959181666374, -0.02504236437380314, -0.012496156617999077, -0.0017278146697208285, -0.04070844128727913, 0.0021751488093286753, -0.041575998067855835, 0.06900414079427719, -0.024908894672989845, 0.01424795389175415, -0.005793445277959108, 0.05392200127243996, -0.0359368771314621, 0.04351131618022919, 0.041976407170295715, -0.017551343888044357, 0.0006136505398899317, 0.011937249451875687, -0.023107044398784637, 0.0098434342071414, -0.029330097138881683, 0.013121798634529114, 0.000133144436404109, 0.035202790051698685, -0.016033118590712547, -0.019069569185376167, -0.0049217171035707, -0.0015839170664548874, 0.023373985663056374, 0.028729481622576714, 0.025843186303973198, 0.017801601439714432, -0.01041068322956562, 0.03183266520500183, 0.047148384153842926, 0.031098579987883568, 0.020270802080631256, 0.0008951894706115127, 0.01622498221695423, -0.00878401380032301, 0.047014910727739334, 0.06336501985788345, -0.0060562146827578545, -0.02857932820916176, -0.018969465047121048, 0.036737699061632156, -0.01414785161614418, 0.02789529226720333, -0.005488966125994921, -0.01000193040817976, 0.023173781111836433, 0.05095228552818298, -0.06256420165300369, -0.008600492030382156, 0.043778255581855774, -0.02909652516245842, -0.00033915010862983763, 0.005247050896286964, -0.0042647928930819035, -0.000218192653846927, -0.00040510320104658604, 0.027711769565939903, 0.02769508585333824, -0.0018487721681594849, 0.05518996715545654, -0.021438665688037872, -0.033484362065792084, -0.0638655349612236, 0.04928390681743622, 0.007165686693042517, 0.000961924612056464, -0.0013472158461809158, -0.0806160569190979, -0.015123853459954262, 0.01212911307811737, 0.02525925450026989, 0.013213559053838253, 0.009509759023785591, 0.011169795878231525, 0.07434295862913132, 0.01908625289797783, 0.012154138647019863, -0.033684566617012024, -0.01606648787856102, -0.014256295748054981, 0.06326492130756378, 0.006573412101715803, -0.04988452419638634, -0.03760525584220886, 0.05008472874760628, 0.04604725167155266, 0.021889127790927887, -0.021555453538894653, -0.016516949981451035, -0.015499237924814224, 0.008658885955810547, -0.03173256292939186, -0.02739477902650833, -0.030848322436213493, -0.06303134560585022, 0.05372179299592972, -0.012237558141350746, -0.02232290804386139, -0.04921717196702957, 0.005722539033740759, 0.01090285461395979, -0.01494867354631424, 0.06453289091587067, 0.017818285152316093, -0.013046721927821636, 0.05589068681001663, 0.009860117919743061, 0.0336511991918087, -0.02515915036201477, 0.0050259907729923725, -0.006473309360444546, 0.034602172672748566, -0.0037538520991802216, -0.035202790051698685, 0.006590095814317465, -0.020354220643639565, -0.006548386532813311, -0.01374744065105915, 0.0332174189388752, 0.02344072051346302, 0.047448690980672836, 0.026310332119464874, -0.024992313235998154, -0.038139138370752335, 0.04361141845583916, 0.050051361322402954, -0.028228968381881714, 0.021288512274622917, -0.007591123227030039, -0.004492109641432762, -0.011578548699617386, 0.018368849530816078, -0.003778877668082714, -0.006089582107961178, -0.02090478502213955, -0.005155290011316538, -0.0023399011697620153, 0.0005200649029575288, -0.0013148909201845527, 0.02253979630768299, 0.05165300518274307, -0.00787474773824215, 0.018452268093824387, 0.016358453780412674, 0.01768481358885765, -0.03396819159388542, 0.002329473849385977, -0.0077704740688204765, 0.012245899997651577, -0.021438665688037872, -0.029964081943035126, 0.017351139336824417, -0.04331111162900925, -0.010327264666557312, -0.0359368771314621, -0.03870638459920883, 0.04871665686368942, -0.018352165818214417, 0.03131546825170517, -0.020654529333114624, 0.06059551611542702, -0.021455349400639534, 0.02979724295437336, -0.02052105776965618, -0.003718398977071047, 0.010077007114887238, 0.025576245039701462, 0.003174090525135398, -0.043678153306245804, 0.004646434914320707, -0.037638623267412186, 0.034802380949258804, 0.00217097788117826, 0.055924054235219955, -0.004004108719527721, -0.003449372947216034, -0.006398232188075781, -0.01860242336988449, -0.0029843123629689217, -0.00029092354816384614, -0.0045254770666360855, 0.0018852679058909416, -0.005067700520157814, 0.02921331115067005, 0.05091891810297966, 0.06419920921325684, -0.03290042653679848, 0.013096773065626621, 0.03246665000915527, 0.03353441134095192, -0.008817381225526333, 0.02819560095667839, 0.05078544840216637, -0.006723565980792046, -0.028812900185585022, 0.07834706455469131, 0.023056993260979652, -0.028562642633914948, 0.006631805561482906, 0.03231649473309517, 0.05445588007569313, 0.01602477766573429, 0.021672239527106285, -0.012954960577189922, -0.003222056431695819, -0.005893548019230366, -0.006777788512408733, -0.0248421598225832, -0.03426849842071533, -0.0026840041391551495, 0.006590095814317465, -0.00394780095666647, -0.001147010363638401, -0.016291718930006027, 0.009176082909107208, 0.003641236573457718, -0.0456802099943161, 0.00402079289779067, -0.02547614276409149, -0.006410744972527027, -0.008700595237314701, 0.014690074138343334, 0.0037455102428793907, 0.03101515956223011, -0.002260653069242835, -0.04384499415755272, 0.014164535328745842, 0.011862172745168209, -0.019136304035782814, -0.01978697068989277, -0.0008769415435381234, 0.027444830164313316, 0.01788502000272274, 0.01938655972480774, -0.02696100063621998, 0.05625772848725319, -0.004658947698771954, -0.011078034527599812, 0.03860628232359886, -0.015641050413250923, -0.04878339171409607, 0.002333644777536392, 0.02332393452525139, 0.03381803631782532, 0.01796843856573105, -0.005288760643452406, -0.041075482964515686, 0.02090478502213955, 0.006736079230904579, 0.00030317570781335235, -0.00772459339350462, 0.004362810403108597, -0.012003985233604908, 0.019453296437859535, -0.004400348756462336, -0.014506553299725056, 0.03840607777237892, 0.018035173416137695, -0.01930314116179943, -0.011645283550024033, 0.016258349642157555, -0.0432443767786026, 0.019219722598791122, -0.010018614120781422, 0.019770286977291107, 0.011578548699617386, -0.019436612725257874, 0.04574694484472275, -0.01066093984991312, -0.0018644132651388645, -0.0015818316023796797, 0.002137610223144293, 0.011812121607363224, 0.020954836159944534, 0.020237434655427933, 0.005438914522528648, -0.042176615446805954, -0.004817443434149027, -0.023373985663056374, -0.036437392234802246, 0.03019765391945839, 0.019837023690342903, 0.04164273291826248, 0.026226913556456566, 0.06129623204469681, -0.027444830164313316, -0.0255595613270998, 0.010544153861701488, 0.01055249571800232, -0.0030114236287772655, 0.03083163872361183, 0.01608317159116268, -0.018835995346307755, 0.0038643821608275175, 0.01788502000272274, 0.03059806488454342, -0.00823344849050045, 0.010827777907252312, 0.007294985931366682, -0.042376819998025894, -0.012412738054990768, 0.0072699603624641895, -0.011595232412219048, 0.061963584274053574, 0.02656058967113495, 0.01920303888618946, 0.015549289993941784, -0.0067694466561079025, -0.024324961006641388, 0.022689949721097946, 0.03194945305585861, 0.0016370966332033277, 0.04134242609143257, 0.018535686656832695, 0.019119620323181152, 0.006727737374603748, -0.0019697295501828194, 0.008742304518818855, 0.001641267561353743, -0.030431227758526802, -0.04110885038971901, -0.010602546855807304, -0.03386808931827545, 0.02899642288684845, 0.07327519357204437, 0.024074705317616463, -0.011053008958697319, -0.0008425312698818743, -0.00039467585156671703, -0.01686730794608593, 0.037438418716192245, 0.014531578868627548, 0.014448159374296665, 0.01846895180642605, -0.00035974415368400514, -0.003015594556927681, 0.006694369483739138, 0.019019518047571182, -0.03316736966371536, 0.04204314202070236, 0.009551468305289745, -0.00545559823513031, -0.02435832843184471, -0.039540573954582214, 0.023373985663056374, 0.03703800588846207, 0.020671213045716286, -0.004064587410539389, -0.010043639689683914, 0.014214586466550827, -0.018118591979146004, 0.021488718688488007, -0.02160550467669964, -0.03163246065378189, 0.01455660443753004, -0.023307250812649727, -0.0015557631850242615, -0.010360632091760635, -0.043778255581855774, 0.022790053859353065, -0.002005182672291994, -0.005509820766746998, 0.010110374540090561, -0.0015203100629150867, 0.030631432309746742, 0.006723565980792046, 0.02587655372917652, -0.01870252564549446, 0.008600492030382156, -0.030364492908120155, 0.030364492908120155, -0.0004645391891244799, 0.031665828078985214, -0.038239240646362305, -0.02203928306698799, 0.02082136645913124, 0.031198682263493538, -0.03009755164384842, 0.028929686173796654, -0.005601581651717424, -0.006973823066800833, -0.03800566866993904, 0.01383920107036829, 0.01850231923162937, -0.01928645744919777, -0.003463971195742488, -0.0007976935594342649, 0.008496218360960484, 0.013638995587825775, -0.029880663380026817, -0.003261680481955409, -0.003783048829063773, 0.03161577507853508, -0.022356275469064713, -0.014931989833712578, 0.011528496630489826, 0.025426091626286507, 0.021989231929183006, 0.002294020727276802, -0.01978697068989277, -0.004492109641432762, 0.02869611419737339, 0.05181984230875969, 0.0226232148706913, -0.031382203102111816, 0.01090285461395979, -0.019870391115546227, 0.010477418079972267, -0.029964081943035126, -0.015974726527929306, 0.07000517100095749, 0.0038351856637746096, 0.005572384689003229, 0.006072898395359516, -0.010068665258586407, -0.019036201760172844, 0.0329337939620018, -0.019970493391156197, 0.01121984701603651, -0.01640850491821766, -0.03760525584220886, -0.009935195557773113, 0.025826502591371536, -0.04291069880127907, -0.029363464564085007, 0.016617052257061005, -0.013814175501465797, 0.013597286306321621, -0.006235565524548292, 0.02544277533888817, -0.0009191724238917232, -0.0017643105238676071, -0.026010023429989815, -0.027928659692406654, -0.034602172672748566, -0.07881420850753784, -0.028762849047780037, 0.013280294835567474, 0.03290042653679848, -0.03687116876244545, 0.003970741294324398, 0.057325493544340134, -0.027111154049634933, -0.009426339529454708, -0.013063405640423298, -0.011453419923782349, 0.011378343217074871, -0.009551468305289745, -0.02787860855460167, 0.013947646133601665, -0.023273883387446404, 0.0010067622642964125, -0.03285037726163864, 0.033601146191358566, -0.016550317406654358, -0.006581753958016634, 0.032883744686841965, 0.007053071167320013, -0.029129892587661743, -0.028562642633914948, 0.004804930649697781, 0.040441498160362244, -0.04838298261165619, 0.034602172672748566, -0.012637969106435776, 0.009526442736387253, 0.01698409579694271, -0.02636038325726986, -0.00919276662170887, -0.014089458622038364, 0.03463554382324219, -0.025242570787668228, 0.008658885955810547, -0.029930714517831802, -0.026493854820728302, 0.0077537898905575275, 0.05919407680630684, -0.004492109641432762, -0.018252063542604446, -0.013447131961584091, -0.02152208611369133, 0.011795437894761562, -0.0042647928930819035, -0.03994098678231239, -0.0063356682658195496, -0.04040813073515892, 0.024124756455421448, -0.0020010117441415787, -0.016934044659137726, -0.013296978548169136, -0.019336508587002754, 0.020220749080181122, -0.022673266008496284, 0.022289538756012917, 0.02342403680086136, -0.02686089649796486, -0.02222280390560627, 0.007924798876047134, 0.03890659287571907, -0.0248421598225832, 0.021655555814504623, -0.016959069296717644, -0.04241018742322922, 0.005943599157035351, 0.03203286975622177, 0.04958421364426613, -0.027311358600854874, 0.010068665258586407, 0.027444830164313316, 0.02646048553287983, -0.002857098588719964, 0.02545945905148983, -0.04027466103434563, -0.01490696333348751, -0.03260011970996857, -0.01398935541510582, -0.0687372013926506, 0.015799546614289284, -0.01383920107036829, 0.006439941935241222, 0.02789529226720333, 0.010677623562514782, 0.019336508587002754, 0.00325750932097435, 0.002673576818779111, -0.048449717462062836, 0.00282998732291162, -0.029163260012865067, -0.002700688084587455, 0.04351131618022919, 0.05388863384723663, -0.03401824086904526, 0.029163260012865067, 0.017401190474629402, -0.011628599837422371, 0.008371090516448021, 0.02342403680086136, 0.005843496415764093, -0.056224361062049866, -0.020220749080181122, -0.011762069538235664, -0.03241659700870514, 0.005013477988541126, 0.007069754879921675, 0.011336633004248142, -0.012979986146092415, 0.02392455004155636, -0.014231270179152489, 0.029079841449856758, -0.01982033997774124, 0.0292800460010767, -0.04074180871248245, -0.004588041454553604, 0.04678133875131607, -0.006965481210500002, 0.024007970467209816, 0.04007445648312569, -0.031665828078985214, -0.0011657796567305923, 0.008583808317780495, -0.0012596258893609047, 0.0015401220880448818, 0.02284010499715805, 0.005038503557443619, -0.006907087750732899, -0.03021433763206005, 0.07534398138523102, -0.0511191226541996, 0.0216221883893013, 0.02242301031947136, 0.0010208392050117254, -0.00803324393928051, 0.002563046757131815, 0.010936222039163113, -0.0031010988168418407, -0.02485884353518486, -0.006227223668247461, 0.06746923178434372, 0.01349718403071165, -0.00904261227697134, -0.04774899780750275, -0.07641174644231796, 0.01910293661057949, -0.0037204844411462545, 0.02404133789241314, -0.025709716603159904, 0.019670184701681137, 0.020070595666766167, 0.02172229066491127, -0.012404395267367363, -0.00540971802547574, -0.004483767785131931, -0.005889376625418663, -0.03747178614139557, 0.015257323160767555, -0.01662539318203926, -0.035302892327308655, 0.008592150174081326, -0.005747564602643251, -0.016058145090937614, 0.021905813366174698, 0.004135493654757738, -0.046914808452129364, -0.0014869425212964416, 0.012637969106435776, -0.03415171056985855, -0.03787219524383545, 0.022256171330809593, -0.009818408638238907, 0.04144252836704254, -0.007916457019746304, -0.018669158220291138, -0.006110437214374542, -0.03373461589217186, -0.027962027117609978, -0.016041461378335953, 0.028746165335178375, 0.03660422936081886, -0.027761822566390038, 0.04604725167155266, -0.014097800478339195, 0.03710474073886871, 0.007766302675008774, 0.008700595237314701, -0.01096959039568901, -0.05305444449186325, -0.00822510663419962, 0.00863385945558548, -0.010886170901358128, -0.0125295240432024, 0.010927880182862282, -0.01980365440249443, 0.01796843856573105, 0.008959193713963032, -0.027011051774024963, 0.011511812917888165, 0.009217792190611362, 0.003503595246002078, -0.0026777477469295263, -0.010702649131417274, -0.010761043056845665, 0.01700912043452263, 0.0505518764257431, 0.022906839847564697, 0.01081943605095148, -0.01308008935302496, -0.0043502976186573505, -0.02869611419737339, 0.035102687776088715, 0.0080540981143713, -0.012204190716147423, -0.004239767324179411, 0.006085411179810762, 0.013697389513254166, -0.010569179430603981, -0.005242879968136549, -0.003935288172215223, -0.0216221883893013, 0.005280418787151575, 0.004031219985336065, 0.006181342992931604, -0.033300839364528656, 0.04327774420380592, -0.006669343914836645, 0.009401313960552216, 0.03927363455295563, 0.01910293661057949, -0.0009926853235810995, 0.0015828743344172835, 0.004971768707036972, 0.014206244610249996, 0.03727158159017563, -0.04504622519016266, 0.01888604648411274, -0.004275220446288586, -0.029480252414941788, 0.015582657419145107, 0.004867495037615299, 0.00659426674246788, 0.013263611122965813, -0.03401824086904526, -0.03627055138349533, -0.013121798634529114, -0.015974726527929306, -0.03907343000173569, 1.4907876675351872e-06, 0.006214710883796215, 0.016675444319844246, -0.01237102784216404, 0.015857940539717674, -0.0589938722550869, 0.02153876982629299, -0.02172229066491127, -0.007491020485758781, 0.00829184241592884, 0.02282342128455639, -0.007086438592523336, -0.04140916094183922, -0.007532729767262936, -0.029930714517831802, -0.0012241728836670518, -0.0019394902046769857, -0.03486911579966545, 0.007833038456737995, -0.032483331859111786, -0.004437887575477362, -0.018352165818214417, -0.003111526370048523, 0.009309553541243076, -0.001064634183421731, -0.003518193494528532, -0.015582657419145107, 0.016291718930006027, 0.022806737571954727, 0.010477418079972267, 0.020537741482257843, -0.016233325004577637, -0.021855760365724564, -0.025225885212421417, 0.00363915110938251, -0.006168830208480358, -0.003078158712014556, -0.013864226639270782, 0.005580727010965347, 0.031765930354595184, 0.04604725167155266, -0.02282342128455639, -0.0402412936091423, -0.013380397111177444, -0.006569241173565388, 0.010769384913146496, -0.008750646375119686, -0.014072773978114128, 0.007557755336165428, -0.014931989833712578, -0.0027924489695578814, 0.04898359999060631, -0.05759243294596672, -0.011269898153841496, 0.027811873704195023, -0.018635790795087814, 0.010327264666557312, 0.0026944316923618317, 0.011770411394536495, -0.021472033113241196, -0.011645283550024033, -0.03757188841700554, -0.0034660566598176956, 0.02465863712131977, -0.0003065645869355649, 0.01495701540261507, -0.00714483205229044, 0.023207148537039757, -0.0038789804093539715, -0.003119868226349354, -0.0100936908274889, -0.019019518047571182, -0.0158245712518692, -0.006348181050270796, 0.023791080340743065, -0.003299218835309148, -0.01746792532503605, 0.01680891588330269, 0.020437639206647873, 0.02070458047091961, 0.0029572013299912214, 0.012946618720889091, 0.011820463463664055, 0.025242570787668228, 0.023474087938666344, -0.03840607777237892, -0.0196868684142828, -0.020754631608724594, 0.015624366700649261, -0.03356777876615524, -0.023874498903751373, 0.027411462739109993, 0.015123853459954262, 0.007699567824602127, 0.04544663429260254, -0.01131994929164648, -0.012804806232452393, 0.00284250034019351, -0.020170697942376137, -0.03199950233101845, -0.004967597778886557, 0.023807764053344727, -0.006669343914836645, 0.014197902753949165, 0.02052105776965618, 0.01106969267129898, -0.010143742896616459, -0.003353441134095192, 0.022556480020284653, -0.017501292750239372, 0.009860117919743061, 0.017801601439714432, 0.022756686434149742, -0.01748460903763771, -0.026026707142591476, 0.013280294835567474, -0.008141688071191311, -0.011503471061587334, -0.022756686434149742, 0.00023409439017996192, 0.0010813178960233927, -0.04788246750831604, 0.010827777907252312, 0.0037079716566950083, -0.008437825366854668, -0.03817250579595566, -0.0036996298003941774, -0.018635790795087814, -0.010877829045057297, -0.020370904356241226, 0.008208422921597958, -0.02050437405705452, -0.014364740811288357, 0.0029446883127093315, -0.04264375939965248, 0.02607676014304161, 0.015741152688860893, 0.01343879010528326, 0.011545180343091488, 0.03376798331737518, -0.010227161459624767, 0.02545945905148983, 0.04231008514761925, 0.05715865641832352, -0.001819575554691255, -0.03241659700870514, 0.02931341342628002, -0.03255007043480873, 0.007812183350324631, 0.016475239768624306, 0.013755782507359982, -0.00015028442430775613, 0.013597286306321621, 0.018018489703536034, 0.012721387669444084, 0.020938152447342873, 0.022289538756012917, -0.003853954840451479, 0.0323665477335453, -0.007194883190095425, 0.02666069194674492, 0.0053346408531069756, 0.015023750253021717, 0.031782615929841995, -0.02897973731160164, 0.004683973267674446, 0.01652529090642929, 0.016275035217404366, -0.004988452419638634, 0.008758988231420517, 0.010293896310031414, 0.03091505728662014, -0.010727674700319767, 0.011486787348985672, 0.034802380949258804, -0.004829956218600273, 0.009568152017891407, 0.0013086345279589295, -0.007908115163445473, -0.01980365440249443, 0.010769384913146496, -0.004980110563337803, 0.016416845843195915, 0.014114484190940857, -0.0025651322212070227, -0.004917546175420284, -0.003511937102302909, 0.0428105965256691, -0.025592928752303123, -0.028662746772170067, -0.009926853701472282, 0.032883744686841965, 0.003261680481955409, -0.01479851920157671, -0.030481278896331787, -0.004337784834206104, 0.0074159433133900166, 0.017334455624222755, 0.011136427521705627, -0.044111933559179306, -0.00012069677177350968, -0.030164286494255066, -0.013038380071520805, -0.005113580729812384, -0.01026052888482809, -0.012204190716147423, 0.003401407040655613, 0.01202066894620657, 0.02203928306698799, -0.035603202879428864, 0.024174807593226433, 0.022956890985369682, -0.0029446883127093315, 0.0060145054012537, -0.0408085435628891, 0.0336511991918087, -0.04000772163271904, 0.016875650733709335, 0.03650412708520889, -0.015933016315102577, 0.0018737978534772992, 0.03019765391945839, 0.04314427450299263, 0.022556480020284653, -0.043477948755025864, 0.001558891381137073, -0.004072929732501507, -0.01880262792110443, -0.011837147176265717, -0.005893548019230366, -0.006681856699287891, 0.010327264666557312, -0.014614997431635857, 0.029680456966161728, -0.006248078308999538, -0.022473061457276344, -0.001937404740601778, 0.028512591496109962, 0.0023461575619876385, -0.013205217197537422, -0.0019280201522633433, 0.03657086193561554, 0.03710474073886871, 0.03426849842071533, -0.013372055254876614, 0.01728440262377262, 0.018235379830002785, -0.015499237924814224, 0.012504498474299908, 0.009326237253844738, 0.0164668969810009, -0.03371793404221535, -0.02666069194674492, -0.03526952490210533, 0.02364092692732811, -0.011261556297540665, -0.007219908758997917, -0.020137330517172813, -0.02969714067876339, -0.008884117007255554, 0.003000996308401227, 0.04030802845954895, -0.028345754370093346, 0.007591123227030039, -0.025592928752303123, 0.026193546131253242, -0.005876863840967417, 0.015515921637415886, -0.002590158022940159, -0.008708937093615532, 0.009067637845873833, -0.018852679058909416, -0.016558658331632614, 0.0034243473783135414, 0.01806854084134102, 0.01292993500828743, -0.020737947896122932, -0.013397080823779106, -0.017918387427926064, -0.008358577266335487, 0.0156076829880476, 0.013288636691868305, 0.003057304071262479, 0.016291718930006027, -0.007987363263964653, -0.009951879270374775, 0.020787999033927917, -0.006927942391484976, -0.002857098588719964, 0.03433523327112198, -0.0019488749094307423, -0.01848563551902771, 0.010744359344244003, -0.022956890985369682, -0.015182246454060078, -0.01318853348493576, 0.015265665017068386, 0.005393034312874079, -0.006823668722063303, 0.01196227502077818, -0.037538520991802216, -0.004925888031721115, -0.007236592471599579, -0.01388925313949585, 0.00018013275985140353, 0.016291718930006027, 0.0007022831705398858, -0.005051016341894865, 0.0017465839628130198, -0.00414592120796442, 0.05088555067777634, 0.0036287237890064716, -0.02911320887506008, 0.026510538533329964, -0.02008727937936783, -0.025743084028363228, -0.010285554453730583, -0.0003910262603312731, -0.020587792620062828, -0.008767330087721348, -0.0036099543794989586, -0.03747178614139557, -0.00109904445707798, 0.004256451036781073, 0.024875527247786522, 0.016033118590712547, -0.03513605520129204, -0.013313662260770798, 0.00039415445644408464, 0.0021626357920467854, -0.007553584408015013, -0.03523615747690201, 0.0058142999187111855, 0.00026681023882701993, 0.03947383910417557, 0.012337660416960716, 0.009301211684942245, 0.0032804496586322784, -0.010544153861701488, -0.00023383370717056096, 0.005551530048251152, -0.01055249571800232, 0.019119620323181152, 0.004102126229554415, 0.02847922407090664, 0.011294923722743988, 0.009226134046912193, -0.03486911579966545, 0.016300059854984283, -0.020871417596936226, 0.018835995346307755, -0.02445843257009983, -0.0053346408531069756, -0.013322004117071629, -0.023557506501674652, -0.015223955735564232, 0.01171201840043068, -0.02414144016802311, 0.04307753965258598, -0.009267843328416348, -0.020070595666766167, -0.0408085435628891, 0.005309615284204483, 0.01318853348493576, -0.006106266286224127, -0.020654529333114624, -0.0004754879337269813, 0.035402994602918625, 0.009726648218929768, 0.024491799995303154, -0.018835995346307755, 0.0021563793998211622, -0.010118717327713966, -0.005559871904551983, -0.005676658358424902, -0.0031052699778229, -0.014197902753949165, 0.03690453618764877, 0.01202066894620657, 0.016300059854984283, 0.00692377146333456, 0.00820425245910883, -0.0181853286921978, 0.0442454032599926, -0.017801601439714432, -0.007019703276455402, 0.02150540240108967, -0.017334455624222755, 0.0009264715481549501, -0.0018487721681594849, -0.0010823607444763184, 0.015173904597759247, 0.024291593581438065, -0.016391821205615997, 0.008967535570263863, -0.035202790051698685, 0.0010531640145927668, -0.00975167378783226, -0.013021695427596569, -0.021238461136817932, 0.0019405329367145896, 0.004120895639061928, 0.03817250579595566, 0.004567186813801527, -0.014381424523890018, 0.005134435370564461, -0.021889127790927887, -0.02352413907647133, -0.014790177345275879, -0.012946618720889091, -0.0022210292518138885, -0.005201170686632395, 0.0035974415950477123, 0.0043794941157102585, 0.0051219225861132145, -0.031465623527765274, 0.006669343914836645, -0.00045098361442796886, -0.009785041213035583, 0.02292352356016636, -0.012846516445279121, -0.022773370146751404, 0.02465863712131977, 0.0058142999187111855, 0.006306471303105354, 0.0221227016299963, -0.06119612976908684, -0.009643228724598885, 0.01860242336988449, 0.018969465047121048, -0.01000193040817976, 0.004433716647326946, -0.034902483224868774, 0.003365954151377082, -0.027861924842000008, -0.0026965171564370394, -0.005789274349808693, 0.019069569185376167, 0.026343699544668198, 0.0221227016299963, 0.04020792618393898, 0.0015484639443457127, 0.009518100880086422, -0.02819560095667839, 0.018535686656832695, 0.021288512274622917, -0.011928907595574856, -0.0035161080304533243, 0.008379432372748852, 0.009826750494539738, 0.01746792532503605, 0.01187051460146904, 0.008809039369225502, 0.012471131049096584, 0.006902916822582483, 0.026727426797151566, 0.014748468063771725, 0.0038894079625606537, 0.0333675742149353, -0.024408381432294846, -0.002120926510542631, -0.023557506501674652, 0.0027090299408882856, -0.042276717722415924, 0.002571388613432646, -0.04961758106946945, 0.026543905958533287, -0.021588820964097977, 0.005509820766746998, 0.007632832508534193, 0.007440968882292509, 0.001930105616338551, -0.02334061823785305, -0.02072126418352127, -0.015257323160767555, -0.008250133134424686, -0.018435584381222725, -0.05615762621164322, -0.007370063103735447, 0.004759050440043211, 0.010736016556620598, -0.00327002233825624, -0.021155042573809624, -0.016917360946536064, -0.008137517608702183, 0.027328044176101685, -0.02374102920293808, -0.030281074345111847, 0.004387835972011089, -0.005146948155015707, 0.02454185113310814, -0.005551530048251152, -0.01608317159116268, 0.003632894717156887, 0.04040813073515892, -0.012587917037308216, 0.004383665043860674, -0.0030531331431120634, -0.02182239294052124, -0.0125295240432024, -0.007870576344430447, -0.017017463222146034, -0.0007439926266670227, -0.0043502976186573505, 0.010594204999506474, 0.01662539318203926, -0.028545958921313286, 0.024308277294039726, -0.029763875529170036, -0.004646434914320707, -0.017317771911621094, 0.004243938252329826, 0.02527593821287155, -0.03720484673976898, -0.018318798393011093, 0.0064607965759932995, -0.01682559959590435, 0.023907866328954697, 0.0029843123629689217, -0.004371152259409428, -0.029730508103966713, -0.0015474212123081088, -0.008308526128530502, -0.021155042573809624, -0.001202275394462049, 0.03727158159017563, -0.011595232412219048, 0.0432443767786026, -0.023290567100048065, 0.0037455102428793907, -0.013622311875224113, -0.02414144016802311, -0.01308843120932579], "index": 12}, {"title": "William Cochrane", "text": "William Cochrane (after 1659 \u2013 August 1717) was a Scottish MP in the British Parliament.He represented Wigtown Burghs 1708-1713.", "vector": [0.0335075706243515, -0.059773098677396774, -0.01916780136525631, -0.024586213752627373, 0.016766905784606934, 0.029912788420915604, -0.04906747117638588, -0.03432099148631096, -0.03941141068935394, 0.056099601089954376, -0.06360403448343277, 0.0534231923520565, -0.016399554908275604, 0.013552593067288399, 0.041221924126148224, 0.01248990185558796, 0.0005944838630966842, 0.009544541127979755, -0.01267357636243105, 0.006008797325193882, 0.049172427505254745, 0.0004247484903316945, 0.014969514682888985, 0.009938131086528301, 0.03227432444691658, 0.009026315063238144, 0.0028158037457615137, 0.004437719937413931, 0.020348569378256798, -0.013362357392907143, 0.00047763704787939787, 0.03930645436048508, 0.029886549338698387, -0.017672160640358925, -0.01540246233344078, -0.04169423133134842, 0.002702646655961871, -0.0799773558974266, 0.048385247588157654, 0.019351474940776825, -0.007891465909779072, -0.021555576473474503, -0.03453090414404869, -0.018734851852059364, 0.014759600162506104, 0.01597972773015499, -0.05646694824099541, -0.003447186667472124, 0.023326728492975235, 0.04762430861592293, 0.06969155371189117, -0.012339025735855103, -0.007773389108479023, -0.03132971003651619, -0.03802073001861572, 0.004283563699573278, 0.026645997539162636, 0.06008797138929367, 0.005349535029381514, 0.027262620627880096, -0.0008011182653717697, -0.010312040336430073, -0.020506003871560097, -0.0025894897989928722, -0.002681327285245061, -0.010863065719604492, 0.029466722160577774, -0.014090497978031635, 0.006333508528769016, -0.0013480434427037835, -0.02285442128777504, -0.005441372282803059, 0.019731944426894188, 0.024625573307275772, -0.025858819484710693, 0.008226017467677593, 0.03878166899085045, 0.021817969158291817, 0.002983079059049487, 0.03555423766374588, -0.01785583607852459, -0.008317854255437851, -0.010561313480138779, 0.032825350761413574, 0.024966683238744736, -0.048962511122226715, 0.018000151962041855, -0.03240552172064781, 0.0010446517262607813, 0.03788953274488449, 0.0236678384244442, 0.061662327498197556, 0.008927918039262295, 0.06344660371541977, -0.008350653573870659, -0.03996243700385094, 0.02067655883729458, -0.04473798722028732, -0.012050393037497997, -0.03579039126634598, -0.04027730971574783, 0.022880660369992256, -0.01932523585855961, 0.02449437603354454, 0.029151849448680878, -0.05914335697889328, -0.031802017241716385, 0.0025074919685721397, -0.01592724770307541, 0.052819687873125076, -0.027210142463445663, 0.020584722980856895, -0.05145524442195892, -0.018695494160056114, -0.0030781966634094715, -0.012831011787056923, -0.03781081363558769, 0.02650168165564537, -0.024769889190793037, -0.03439970687031746, -0.019180919975042343, -0.030253900215029716, 0.017462246119976044, 0.015612376853823662, 0.011335372924804688, -0.009085353463888168, -0.03534432128071785, 0.02412702515721321, 0.005251137539744377, -0.004752591252326965, -0.05331823602318764, -0.06491599977016449, -0.056624386459589005, -0.036315176635980606, 0.015914129093289375, 0.022828180342912674, 0.020086174830794334, -0.0050149839371442795, 0.038729190826416016, -0.024153266102075577, 0.01704241894185543, -0.023641599342226982, 0.05279345065355301, 0.022421471774578094, 0.07751085609197617, -0.00015374583017546684, -0.020492885261774063, -0.0021877007093280554, -0.0287057813256979, 0.027210142463445663, -0.028312193229794502, -0.014877676963806152, 0.04911994934082031, 0.0301489420235157, -0.01698993891477585, 0.005024823825806379, -0.006005517207086086, -0.0168718621134758, 0.002837123116478324, -0.030831163749098778, -0.033612530678510666, 0.007130526937544346, -0.02183108776807785, 0.019640108570456505, -0.0002525531454011798, -0.004896907135844231, -0.023746555671095848, 0.03051629289984703, -0.042245253920555115, 0.015061351470649242, -0.023733437061309814, 0.013565712608397007, 0.0010913903824985027, -0.025793220847845078, 0.036026544868946075, 0.006422066129744053, -0.0236284788697958, 0.030122702941298485, -0.01064659096300602, 0.05951070785522461, -0.023248009383678436, -0.015245026908814907, 0.04235021024942398, -0.04938234016299248, -0.001712113618850708, 0.008035781793296337, 0.0253077931702137, 0.004887067712843418, 0.0073666805401444435, -0.01731793023645878, 0.01267357636243105, -0.04804413765668869, 0.01435289066284895, 0.010515394620597363, 0.028049800544977188, 0.02833843231201172, -0.022801941260695457, -0.01597972773015499, -0.04221901670098305, 0.0014267612714320421, 0.05292464420199394, -0.08475290238857269, 0.01279821339994669, -0.0013021246995776892, -0.025045400485396385, -0.01372314803302288, 0.0011922477278858423, 0.0169112216681242, -0.020256731659173965, -0.025858819484710693, 0.010744988918304443, -0.013880583457648754, 0.004716512281447649, 0.02306433394551277, -0.00950518250465393, 0.017475366592407227, 0.01372314803302288, 0.010640031658113003, 0.0074913171119987965, 0.02671159617602825, -0.01267357636243105, -0.010712189599871635, 0.0026714876294136047, -0.03886038810014725, 0.0008097280515357852, 0.06176728755235672, -0.004775550682097673, 0.008350653573870659, -0.0019597469363361597, -0.0406184196472168, -0.04578755795955658, 0.03463586047291756, -0.008193218149244785, 0.06832710653543472, -0.005388894118368626, 0.04796541854739189, 0.023903992027044296, -0.010915543884038925, 0.05893344432115555, -0.016202760860323906, 0.003548863809555769, 0.026554159820079803, 0.0007613493362441659, -0.035081930458545685, 0.03657756745815277, 0.014628403820097446, -0.04891003295779228, -0.02637048438191414, -0.020742157474160194, 0.05746404081583023, 0.0030781966634094715, -0.0026239289436489344, 0.025648904964327812, -0.0016268359031528234, -0.016373315826058388, -0.024179505184292793, -0.02736757881939411, 0.04909370839595795, 0.046627216041088104, -0.03893910348415375, -0.021962285041809082, -0.02621304988861084, -0.02781364694237709, 0.03914901986718178, -0.03439970687031746, -0.04891003295779228, -0.024022068828344345, -0.0370236374437809, 0.013867463916540146, -0.016596350818872452, 0.01887916773557663, 0.03285158798098564, -0.018157588317990303, 0.0400673933327198, 0.0074191587045788765, -0.04940858110785484, -0.05163891986012459, -0.0639713853597641, -0.07992487400770187, 0.00896727666258812, 0.0027862845454365015, -0.035449277609586716, -0.023116813972592354, -0.019312117248773575, -0.020833995193243027, -0.0075831543654203415, -0.06622796505689621, 0.002469773171469569, 0.06213463470339775, 0.005060902796685696, -0.012398064136505127, -0.013880583457648754, 0.00010823706543305889, 0.026409843936562538, -0.005074022337794304, -0.04410824552178383, 0.00833097379654646, -0.009144391864538193, -0.026344245299696922, 0.010023408569395542, -0.035527996718883514, 0.022001642733812332, -0.03403235599398613, -0.022618267685174942, -0.0014792399015277624, 0.022093480452895164, 0.009977489709854126, -0.00896727666258812, 0.07525428384542465, -0.02067655883729458, -0.0169112216681242, -0.023562882095575333, 0.02736757881939411, 0.018498698249459267, 0.010863065719604492, 0.03857175633311272, 0.009583900682628155, 0.0067828563041985035, -0.031723301857709885, 0.0023238169960677624, -0.005953038576990366, 0.01901036500930786, -0.05730660632252693, -0.05788386985659599, -0.01412985660135746, -0.04429192095994949, -0.014982634223997593, -0.017226092517375946, -0.036682527512311935, 0.010167724452912807, 0.030490053817629814, -0.022828180342912674, 0.05198002979159355, 0.0052872165106236935, 0.05352814868092537, 0.04080209508538246, -0.055522333830595016, -0.003130675060674548, -0.049172427505254745, 0.041221924126148224, 0.004447559360414743, -0.019600749015808105, 0.031146036460995674, 0.02665911801159382, -0.015822291374206543, -0.0009118152665905654, 0.004122848156839609, -0.05536489933729172, 0.05221618339419365, -0.0012291467282921076, 0.00034726058947853744, 0.0538954995572567, 0.024756768718361855, 0.028574585914611816, 0.007360120303928852, 0.003252031747251749, -0.03636765480041504, -0.03009646385908127, -0.01435289066284895, -0.011394411325454712, 0.007471637334674597, -0.016307717189192772, -0.008514649234712124, 0.03896534442901611, 0.027787405997514725, 0.022762583568692207, 0.033927399665117264, -0.0011807680130004883, 0.016242120414972305, 0.025858819484710693, -0.004352441988885403, 0.06276437640190125, 0.009439583867788315, 0.01351323351264, 0.004001491703093052, 0.01105985976755619, -0.021896686404943466, -0.04602371156215668, -0.01288349088281393, -0.03634141385555267, 0.03256295621395111, 0.04287499934434891, 0.03332389518618584, -0.031067317351698875, 0.0007162505644373596, -0.04688961058855057, -0.021844208240509033, 0.03416355326771736, 0.03896534442901611, -0.010935223661363125, -0.021489977836608887, 0.01142721064388752, 0.033927399665117264, 0.014825197868049145, -0.01822318695485592, -0.027918603271245956, 0.033481333404779434, 0.06307925283908844, -0.00770123116672039, 0.01576981320977211, -0.033481333404779434, -0.03699739649891853, 0.009282148443162441, 0.0186298955231905, 0.05213746801018715, 0.0031962734647095203, 0.0010503915837034583, -0.03930645436048508, 0.003906374331563711, 0.009754455648362637, 0.011558406986296177, 0.030988600105047226, -0.01675378531217575, 0.019771303981542587, -0.0069074928760528564, -0.0045951553620398045, -0.045682601630687714, -0.033481333404779434, -0.003794857067987323, -0.03941141068935394, -0.018315022811293602, -0.06339412182569504, -0.028968174010515213, -1.984602386073675e-05, 0.007123966701328754, 0.03576415032148361, -0.018708612769842148, -0.032169368118047714, 0.013959301635622978, 0.033192701637744904, -0.010712189599871635, 0.030857402831315994, 0.010272681713104248, 0.03849303722381592, 0.010705629363656044, -0.04628610610961914, -0.07913769781589508, 0.03707611560821533, 0.06113754212856293, 0.00874424260109663, 0.028653303161263466, -0.014484087005257607, -0.04442311450839043, 0.008829521015286446, -0.05657190829515457, 0.008593367412686348, -0.0438196137547493, -0.006887813098728657, 0.09094537794589996, 0.04219277575612068, -0.030201422050595284, -0.017685281112790108, 0.007019009906798601, 0.010108686052262783, 0.027839886024594307, 0.0042146858759224415, -0.020755277946591377, 0.007399479392915964, -0.036630045622587204, 0.043478500097990036, -0.008442491292953491, -0.016740666702389717, 0.014917035587131977, -0.011709282174706459, -0.047650549560785294, 0.006356467492878437, -0.015507419593632221, -0.02399582974612713, -0.03539679944515228, 0.012050393037497997, -0.03723355010151863, -0.0008052181801758707, -0.05040567368268967, 0.033560048788785934, -0.012378384359180927, -0.015035112388432026, 0.04080209508538246, -0.017501605674624443, 0.0703737735748291, 0.04828029125928879, 0.02142437919974327, -0.03964756429195404, -0.03502945229411125, 0.0014849797589704394, 0.0015210587298497558, -0.040487222373485565, 0.008881999179720879, -0.004234365187585354, -0.020571602508425713, 0.004047410096973181, 0.027997320517897606, 0.03985748067498207, 0.05087798088788986, 0.01752784475684166, 0.022920018061995506, 0.03337637707591057, 0.033192701637744904, 0.04148431494832039, 0.0021827807649970055, -0.011879838071763515, 0.025124119594693184, 0.07173821330070496, 0.03277287259697914, -0.0285483468323946, -0.03117227554321289, 0.005051062908023596, 0.020781517028808594, 0.005352814681828022, 0.0023582561407238245, 0.04715200141072273, 0.01130257360637188, 0.019968098029494286, -0.02904689311981201, 0.004762431140989065, -0.019194040447473526, -0.04862140119075775, -0.01752784475684166, 0.000317126396112144, 0.027997320517897606, 0.03224808722734451, -0.0033356696367263794, 0.025793220847845078, 0.009957809932529926, 0.006044876296073198, 0.00708460807800293, 0.02059784159064293, 0.04111696407198906, 0.005064182914793491, -0.0438983291387558, -0.034216031432151794, 0.023208651691675186, -0.028023559600114822, -0.01159120537340641, -0.050274476408958435, -0.02744629606604576, -0.03195945546030998, 0.03765337914228439, -0.03198569267988205, 0.0009396945242770016, -0.003680060151964426, 0.042612604796886444, 0.044003285467624664, -0.01924651861190796, -0.03605278208851814, -0.04767678678035736, -0.009183751419186592, -0.0055988081730902195, -0.03185449540615082, -0.014142977073788643, 0.023208651691675186, -0.025281554087996483, -0.005818562116473913, -0.017947673797607422, -0.05541737750172615, 0.0406184196472168, 0.027839886024594307, -0.0013062246143817902, -0.0060514360666275024, -0.011341932229697704, 0.007373240310698748, 0.007989863865077496, -0.0572541281580925, 0.002435334026813507, -0.03825688362121582, 0.0023434965405613184, 0.03426850959658623, -0.0040900493040680885, 0.016478274017572403, -0.02092583291232586, -6.303578993538395e-05, 0.011748641729354858, -0.011263214983046055, -0.025701383128762245, 0.015664855018258095, 0.011420650407671928, -0.012148790992796421, -0.002699366770684719, 0.02318241074681282, 0.01851181872189045, 0.022631386294960976, -0.01880045048892498, -0.014024900272488594, 0.002605889458209276, -0.0020171452779322863, -0.007425718940794468, 0.008153858594596386, -0.0041982862167060375, 0.0070386892184615135, -0.023694077506661415, -0.02555706724524498, -0.03584286943078041, -0.020138654857873917, -0.026436083018779755, 0.013683789409697056, 0.024113906547427177, 0.018656134605407715, -0.0337437242269516, -0.003545583924278617, -0.03416355326771736, -0.0029453602619469166, -0.019561389461159706, 0.034557145088911057, -0.03875542804598808, -0.041012007743120193, 0.02497980371117592, -0.03883414715528488, 0.006477824412286282, 0.0047427513636648655, 0.0108565054833889, -0.032536718994379044, 0.00023881852393969893, 0.02944048121571541, -0.02839091047644615, 0.01876109093427658, 0.03096236102283001, 0.023536641150712967, 0.0011545286979526281, 0.030542531982064247, -0.0037784576416015625, -0.0015915768453851342, 0.017790237441658974, 0.015100711025297642, 0.017357289791107178, 0.010371078737080097, 0.05237362161278725, -0.05051063001155853, -0.04211405664682388, -0.022723224014043808, 0.004385241307318211, 0.003147074719890952, -0.016688188537955284, 0.006005517207086086, -0.015376223251223564, 0.006881253328174353, 0.024599332362413406, 0.0027994040865451097, 0.02215907908976078, 0.021962285041809082, 0.02486172690987587, -0.014549685642123222, 0.01982378214597702, 0.02563578449189663, 0.005880880635231733, -0.006359747610986233, -0.013880583457648754, -0.007930825464427471, 0.03526560589671135, -0.0012152070412412286, 0.037627141922712326, -0.008107940666377544, -0.00016409804811701179, -0.027866125106811523, -0.0037554982118308544, 0.00312247546389699, -0.0436621755361557, 0.0029551999177783728, -0.020020578056573868, 0.003258591750636697, -0.027105186134576797, -0.037128593772649765, -0.001999105792492628, -0.03746970370411873, -0.01449720747768879, 0.01945643313229084, 0.011466569267213345, 0.016268359497189522, -0.02928304672241211, -0.01708177663385868, -0.006586061324924231, 0.00821289699524641, -0.016360197216272354, -0.0058710407465696335, 0.024428777396678925, -0.06386642903089523, 0.016766905784606934, -0.029729114845395088, -0.006750056985765696, 0.002696086885407567, -0.04767678678035736, 0.016898101195693016, -0.016858743503689766, 0.0023041374515742064, -0.04324234649538994, -0.037574660032987595, -0.046469781547784805, 0.025504589080810547, -0.032169368118047714, 0.017186734825372696, 0.007812748663127422, 0.017029298469424248, 0.014208574779331684, 0.054157890379428864, -0.008914798498153687, -0.015153189189732075, -0.023746555671095848, 0.03607902303338051, 0.019640108570456505, -0.06460113078355789, -0.005156020168215036, 0.03146090731024742, 0.0038079768419265747, 0.03862423449754715, -0.00043827813351526856, -0.03489825502038002, -0.008534329012036324, 0.04602371156215668, -0.01048259623348713, -0.011578085832297802, -0.010023408569395542, 0.024887965992093086, -0.0040670898742973804, -0.029912788420915604, -0.045813798904418945, -0.021161986514925957, 0.009656058624386787, -0.007930825464427471, 0.03731226921081543, -0.023930231109261513, -0.02441565878689289, -0.006736937444657087, -0.008626165799796581, 0.04518405348062515, 0.0535806268453598, 0.023116813972592354, -0.017868956550955772, 0.03314022347331047, 0.01416921615600586, -0.019430194050073624, -0.0775633379817009, 0.0032126728910952806, -0.04715200141072273, 0.002135222079232335, -0.02461245283484459, 0.006789416074752808, 0.012181589379906654, 0.006208871491253376, -0.005949758924543858, 0.021083269268274307, 0.00941990502178669, 0.013152443803846836, 0.057201649993658066, 0.0021860606502741575, 0.02273634448647499, -0.03644637390971184, -0.019141560420393944, 0.030621249228715897, -0.009977489709854126, 0.0027174062561243773, 0.013801866210997105, -0.010941782966256142, 0.00395229272544384, -0.01609780453145504, 0.028889456763863564, -0.010987701825797558, -0.027105186134576797, 0.03353381156921387, -0.02617369033396244, 0.010954903438687325, 0.005165860056877136, -0.02133254148066044, 0.03287782892584801, 0.019810663536190987, 0.03878166899085045, 0.020624080672860146, 0.031880736351013184, -0.005113381426781416, -0.03161834180355072, -0.006940291728824377, 0.03875542804598808, 0.006162953097373247, 0.005939919035881758, -0.020296089351177216, 0.008691764436662197, 0.04109072685241699, -0.01986314170062542, -0.03466210141777992, -0.01638643629848957, 0.0473356768488884, -0.030201422050595284, 0.011433769948780537, -0.039017822593450546, 0.012240627780556679, -0.05263601243495941, -0.01584853045642376, -0.052898406982421875, 0.013565712608397007, -0.027656210586428642, 0.021358780562877655, -0.022946257144212723, -0.007248603738844395, -0.02768244966864586, 0.020938951522111893, 0.0009347746381536126, -0.012745734304189682, -0.005270817317068577, -0.010141485370695591, 0.025124119594693184, 0.01478583924472332, 0.006894373334944248, -0.025950657203793526, -0.0020466644782572985, 0.009150952100753784, -0.022054122760891914, -0.012634217739105225, -0.016320837661623955, -0.03600030392408371, -0.01332955900579691, -0.006723817903548479, -0.0012947448994964361, -0.00790458545088768, 0.02661975845694542, 0.03563295304775238, 0.04256012663245201, -0.03030637837946415, -0.006264630239456892, 0.014011779800057411, -0.022434592247009277, 0.005920239724218845, -0.05051063001155853, 0.006776296533644199, 0.0017662320751696825, -0.04111696407198906, 0.003565263468772173, -0.043268587440252304, -0.008409691974520683, 0.020414166152477264, 0.027183903381228447, -0.011000821366906166, -0.005165860056877136, -0.024953562766313553, 0.01621588133275509, 0.005825121887028217, -0.05966814234852791, 0.03153962641954422, 0.0004011741257272661, 0.039463888853788376, 0.028810739517211914, -0.01117793656885624, 0.014602163806557655, 0.02891569584608078, 0.022552669048309326, -0.02928304672241211, 0.012188149616122246, -0.04360969737172127, 0.018603656440973282, 0.018288783729076385, 0.033560048788785934, -0.04481670632958412, -0.012975328601896763, -0.017619682475924492, -0.02040104754269123, -0.009754455648362637, -0.04295371472835541, -0.004103168845176697, -0.006379426922649145, 0.004513157531619072, -0.014024900272488594, 0.0037325387820601463, -0.02281506173312664, -0.02134566195309162, 0.04206157848238945, -0.016452034935355186, -0.025950657203793526, -0.034058596938848495, 0.0005686545628122985, 0.012253748252987862, -0.03568543121218681, -0.011223855428397655, -0.005592248402535915, -0.010253001935780048, 0.008409691974520683, 0.008672084659337997, -0.022093480452895164, -0.020086174830794334, -0.023313608020544052, -0.00790458545088768, -0.025819459930062294, -0.00970853678882122, 0.04985464736819267, 0.0024828927125781775, -0.01003652811050415, -0.0201124157756567, 0.006549982354044914, -0.011748641729354858, 0.04242892935872078, -0.009328067302703857, 0.016333958134055138, 0.02818099595606327, -0.0012594858417287469, 0.030647490173578262, -0.004985464736819267, -0.010476035997271538, 0.0006043236353434622, -0.012594858184456825, -0.025281554087996483, 0.01022020261734724, -0.0201124157756567, -0.020584722980856895, -0.01698993891477585, 0.03736474737524986, 0.00597927812486887, 0.01159120537340641, 0.0018810289911925793, 0.04914618656039238, 0.028285954147577286, -0.03993619605898857, 0.044213201850652695, -0.020624080672860146, -0.0043786815367639065, -0.02665911801159382, -0.025622665882110596, 0.038886625319719315, -0.00876392237842083, 0.055102504789829254, 0.026186810806393623, 0.02096519246697426, -0.01876109093427658, 0.06192472204566002, -0.007432278711348772, 0.02731509879231453, -0.0005444652633741498, -0.033192701637744904, -0.03628893569111824, 0.030542531982064247, -0.03752218186855316, 0.002837123116478324, 0.0029371604323387146, -0.016976820304989815, -0.03167081996798515, -0.00037144991802051663, -0.013710028491914272, -0.012870371341705322, 0.02555706724524498, -0.018419981002807617, -0.002135222079232335, -0.012155350297689438, 0.06685771048069, -0.009590459987521172, 0.0268296729773283, -0.02244771085679531, -0.019482672214508057, 0.0369449183344841, -0.01412985660135746, -0.006687738932669163, -0.02134566195309162, 0.02395647019147873, 0.028154756873846054, 0.0033684687223285437, -0.04754558950662613, 0.040775854140520096, -0.015166308730840683, 0.006284309551119804, -0.0010471115820109844, 0.010823706164956093, 0.05009080097079277, -0.0040670898742973804, -0.022959377616643906, -0.03765337914228439, 0.012234068475663662, -0.004814909305423498, -0.013801866210997105, 0.01895788684487343, -0.013080285862088203, -0.005093702115118504, -0.04185166582465172, 0.010659711435437202, 0.0038965344429016113, -0.0021713010501116514, -0.03484577685594559, -0.010043087415397167, 0.028233474120497704, 0.030699968338012695, -0.0016596349887549877, -0.03841431811451912, -0.010180843994021416, 0.008593367412686348, -0.019548270851373672, -0.005575848743319511, 0.010298920795321465, 0.03568543121218681, -0.014943274669349194, -0.029388003051280975, -0.013388597406446934, -0.005529929883778095, 0.03146090731024742, 0.042166538536548615, 0.00854088831692934, 0.014864557422697544, 0.03628893569111824, -0.018616775050759315, -0.024389419704675674, -0.019180919975042343, -0.00675661675632, -0.0008863959810696542, 0.014366010203957558, -0.011683043092489243, -0.0016071564750745893, 0.02113574743270874, 0.010312040336430073, -0.009052555076777935, 0.024271342903375626, 0.022513309493660927, 0.03621022030711174, -0.009610139764845371, -0.045525167137384415, -0.002822363516315818, -0.013427956029772758, 0.03644637390971184, -0.005293776281177998, 0.01868237368762493, -0.03146090731024742, -0.007235483732074499, 0.014077378436923027, -0.03248424082994461, 0.0026829673442989588, -0.06155737116932869, 0.008265376091003418, 0.018734851852059364, 0.011551846750080585, 0.023812154307961464, -0.00814729928970337, 0.0022483791690319777, 0.003742378670722246, -0.002938800258561969, -0.02040104754269123, 0.022539548575878143, -0.020020578056573868, 0.023077454417943954, 0.008206337690353394, 0.02875826135277748, 0.010377638973295689, -0.022106600925326347, -0.0030798364896327257, -0.005103541538119316, -0.020296089351177216, 0.02744629606604576, 0.0570966936647892, 0.034425947815179825, -0.00227789836935699, 0.011847038753330708, 0.014484087005257607, -0.005920239724218845, -0.044055767357349396, -0.01048259623348713, 0.005018264055252075, -0.007123966701328754, 0.011866718530654907, 0.012260307557880878, 0.02330048754811287, 0.00044483793317340314, 0.05192755162715912, -0.018157588317990303, -0.023772794753313065, -0.012955648824572563, -9.7013617050834e-05, 0.018000151962041855, -0.009977489709854126, 0.007438838481903076, -0.008094820193946362, 0.024966683238744736, 0.011446889489889145, -0.010784347541630268, 0.004778830334544182, -0.029151849448680878, 0.004001491703093052, -0.021371901035308838, -0.01128289382904768, 0.01569109410047531, 0.017960792407393456, -0.02547834999859333, -0.02568826451897621, 0.018078869208693504, 0.01191919669508934, -0.020794635638594627, 0.0602978840470314, 0.026344245299696922, 0.034872014075517654, -0.020243611186742783, 0.002141781849786639, -0.025176597759127617, 0.006412226241081953, -0.0070386892184615135, -0.03972628340125084, -0.017173614352941513, -0.015126950107514858, 0.004926426336169243, 0.0435047410428524, 0.017226092517375946, 0.0013882223283872008, 0.023851513862609863, -0.01563861593604088, 0.005421692971140146, 0.01150592789053917, -0.01592724770307541, 0.004936266224831343, 0.022631386294960976, 0.01405113935470581, 0.026593519374728203, -0.03739098832011223, 0.005972717888653278, 0.03306150436401367, -0.0367874838411808, -0.027498774230480194, -0.00856056809425354, -0.0012053673854097724, -0.017947673797607422, -0.01394618209451437, -0.009019755758345127, -0.050274476408958435, 0.00015651325520593673, 0.001838390133343637, 0.01405113935470581, -0.0029191209468990564, 0.003273351350799203, 0.024638691917061806, -0.023366086184978485, 0.0013382036704570055, 0.005943198688328266, 0.008593367412686348, 0.0036243018694221973, -0.002117182593792677, -0.02187044732272625, 0.02503228187561035, -0.015153189189732075, -0.0026714876294136047, -0.019718825817108154, -0.0038571753539144993, -0.007012450136244297, -0.02825971320271492, 0.016005966812372208, -0.002405814826488495, -0.008153858594596386, -0.019508911296725273, -0.015546778216958046, 0.01752784475684166, -0.00035648533958010375, 3.320910036563873e-05, -0.0023992550559341908, 0.005956318695098162, -0.004860828164964914, -0.013631310313940048, 0.00734044099226594, 0.0018154308199882507, 0.019758185371756554, -0.02076839655637741, -0.0032077529467642307, 0.001958106877282262, 0.05302960425615311, 0.009393665008246899, 0.016898101195693016, -0.046627216041088104, 0.017094897106289864, 0.023405445739626884, 0.048673879355192184, 0.011230415664613247, -0.003302870551124215, -0.03600030392408371, -0.002430414082482457, -0.011440330184996128, -0.014798958785831928, 0.007307642139494419, -0.01982378214597702, 0.00591695960611105, 0.005497131031006575, -0.044501833617687225, 0.015415581874549389, -0.003827656153589487, -0.01932523585855961, 0.006572941783815622, 0.0015423782169818878, -0.020020578056573868, 0.011578085832297802, -0.015310624614357948, 0.015363103710114956, 0.007045248989015818, -0.02661975845694542, -0.02068967930972576, 0.026632878929376602, 0.0038112567272037268, -0.025137238204479218, 0.0017645921325311065, -0.02744629606604576, -0.0201124157756567, 0.01384122483432293, 0.012115991674363613, -0.017055537551641464, -0.025425869971513748, -0.008468730375170708, 0.005792323034256697, -0.0029027212876826525, 0.011820799671113491, -0.001119269640184939, -0.032667916268110275, -0.007615953683853149, -0.04193038493394852, -0.012942529283463955, -0.010928663425147533, -0.013696908950805664, 0.01056787371635437, 0.011617445386946201, -0.03059501014649868, -0.03169706091284752, 0.03568543121218681, -0.022880660369992256, -0.0005563549348153174, 0.0032257926650345325, -0.016268359497189522, -0.03243176266551018, 0.02752501331269741, 0.014641523361206055, -0.010508835315704346, 0.019954979419708252, -0.01949579082429409, 0.01306716538965702, 0.016937460750341415, -0.02928304672241211, 0.007589714135974646, -0.014877676963806152, -0.017186734825372696, 0.00782586820423603, 0.004336042329668999, -0.04439687728881836, -0.02428446151316166, -0.018039511516690254, -0.009393665008246899, -0.003384868148714304, -0.00983317382633686, 0.015310624614357948, 0.027183903381228447, 0.00506746256724, -0.01716049574315548, -0.043478500097990036, -0.010725309140980244, -0.006300709210336208, -0.02654104121029377, -0.07252539694309235, -0.002996198832988739, -0.014707121066749096, -0.0303850956261158, 0.011361612007021904, 0.028023559600114822, 0.0010840105824172497, -0.01716049574315548, 0.02920432761311531, -0.0201124157756567, 0.009780694730579853, -0.03707611560821533, 0.00367022049613297, 0.0013054045848548412, -0.02162117324769497, 0.002661647740751505, -0.028285954147577286, 0.00968885701149702, -0.0067828563041985035, -0.007497876882553101, 0.01588789001107216, -0.017763998359441757, 0.009439583867788315, 0.014628403820097446, 0.008206337690353394, -0.00991189107298851, -0.00010239472612738609, 0.007812748663127422, 0.013959301635622978, -0.02314305305480957, -0.026632878929376602, 0.0008888558950275183, -0.022592026740312576, 0.017016177996993065, -0.013775626197457314, -0.019968098029494286, 0.022657625377178192, -0.028600824996829033, 0.007373240310698748, 0.01286381110548973, -0.004732911940664053, -0.02269698493182659, -0.009373986162245274, -0.020873354747891426, 0.020860234275460243, 0.025976896286010742, 0.006776296533644199, -0.017212973907589912, -0.0031454346608370543, 0.001977786421775818, -0.0014530005864799023, 0.006986210588365793, 0.00591695960611105, -0.03235304355621338, 0.01097458228468895, 0.018013272434473038, -0.0017498325323686004, 0.0006059635779820383, -0.009341186843812466, 0.012214388698339462, 0.014733361080288887, -8.461145625915378e-05, 0.004723072052001953, 0.0025993294548243284, 0.0035390241537243128, 0.01756720431149006, 0.0025878497399389744, 0.004119568504393101, -0.020374808460474014, 0.02547834999859333, 0.00198106630705297, -0.024717409163713455, -0.021240703761577606, -0.030726207420229912, -0.0012307866709306836, 0.01716049574315548, 0.003975252155214548, 0.002469773171469569, -0.012135671451687813, 0.026265528053045273, 0.005903840065002441, -0.024586213752627373, -0.03592158481478691, -0.01332955900579691, 0.0017629521898925304, 0.01719985343515873, -0.013165563344955444, -0.010193963535130024, -0.0019285876769572496, 0.010423557832837105, -0.003850615583360195, -0.028207235038280487, -0.05405293405056, -0.03867671266198158, -0.037705857306718826, -0.0006941111641936004, -0.0108565054833889, -0.0032274324912577868, -0.02105702832341194, -0.01489079650491476, 0.016124043613672256, 0.02518971636891365, 0.01613716222345829, 0.007753709796816111, 0.006399106699973345, -0.02588505856692791, 0.012437422759830952, 2.0115079678362235e-05, 0.002968319458886981, -0.03251047804951668, 0.012909729965031147, 0.007268283050507307, 0.017685281112790108, -0.007681551855057478, -0.022749463096261024, -0.00983317382633686, -0.016648828983306885, -0.024835485965013504, -0.042166538536548615, -0.018328143283724785, -0.00449347821995616, 0.006789416074752808, -0.011879838071763515, -0.005290496628731489, 0.010449796915054321, 0.005005144514143467, -0.03300902619957924, -0.011145138181746006, 8.090874871413689e-06, 0.026895271614193916, 0.009846293367445469, -0.016491392627358437, 0.0058021629229187965, 0.006576221901923418, 0.012660456821322441, 0.024599332362413406, -0.02256578765809536, 0.02129318192601204, -0.012063512578606606, 0.0009651138680055737, -0.02702646702528, 0.0014612004160881042, -0.023969590663909912, -0.002886321861296892, 0.015664855018258095, 0.032956548035144806, 0.0203092098236084, -0.0009208350675180554, 0.01507447101175785, -0.04738815501332283, -0.006789416074752808, -0.015861650928854942, 0.030699968338012695, 0.037049874663352966, 0.009118152782320976, 0.005165860056877136, 0.021765489131212234, -0.01986314170062542, -0.010954903438687325, 0.005493850912898779, 0.01818382740020752, -0.003411107463762164, -0.018905406817793846, 0.016307717189192772, -0.015599257312715054, 0.011105778627097607, -0.010915543884038925, 0.0335862897336483, -0.013552593067288399, -0.009610139764845371, -0.008573687635362148, 0.01109921932220459, 0.01818382740020752, 0.01818382740020752, 0.010987701825797558, 0.003712859470397234, -0.016858743503689766, 0.001557957730256021, -0.029965268447995186, -0.008613046258687973, 0.007143646478652954, -0.01224718801677227, -0.004683712963014841, -0.01654387079179287, 0.03783705458045006, 0.02326112985610962, -0.018170706927776337, -0.02486172690987587, 0.009190310724079609, 0.018275665119290352, -0.01478583924472332, -0.00991189107298851, 0.011755201034247875, -0.0013726428151130676, 0.01540246233344078, -0.01638643629848957, 0.00680909538641572, 0.010797467082738876, -0.02781364694237709, 0.040565941482782364, -0.02825971320271492, 0.0036472610663622618, 0.020702797919511795, 0.02862706407904625, -0.008186657913029194, 0.0005723444628529251, -0.016780024394392967, 0.02167365327477455, -0.004040850326418877, -0.04140559583902359, -0.024914205074310303, 0.018196946009993553, -0.020624080672860146, 0.03195945546030998, 0.012581738643348217, -0.029755353927612305, 0.01588789001107216, -0.014090497978031635, 0.005736564286053181, -0.003384868148714304, 0.028076039627194405, 0.0026091693434864283, 0.013277079910039902, -0.016635708510875702, 0.0018039511051028967, -0.022670745849609375, 0.02694774977862835, 0.012752294540405273, -0.011932316236197948, 0.0016383156180381775, 0.02789236418902874, 0.014444728381931782, -0.006582781672477722, -0.009373986162245274, 0.014392250217497349, -5.124861218064325e-06, 0.001425941358320415, 6.59825855109375e-06, 0.018341263756155968, 0.0013308238703757524, -0.021450618281960487, 0.04287499934434891, -0.00962325930595398, -0.027734927833080292, -0.026737835258245468, 0.021398140117526054, 0.016491392627358437, -0.028128517791628838, -0.03127723187208176, 0.013178682886064053, 0.021148866042494774, -0.01986314170062542, 0.004552516620606184, -0.008573687635362148, -0.008914798498153687, -0.010987701825797558, 0.004122848156839609, -0.0169112216681242, -0.04132688045501709, -0.027131425216794014, 0.010705629363656044, -0.01351323351264, -0.05218994617462158, -0.00016266308375634253, 0.055679772049188614, 0.007484757341444492, -0.006169512867927551, -0.018039511516690254, 0.00416548689827323, -0.00035402539651840925, 0.020794635638594627, -0.025124119594693184, -0.02453373558819294, -0.034425947815179825, -0.027393817901611328, -0.038073208183050156, -0.02482236735522747, -0.012621098197996616, -0.01797391287982464, 0.0040506902150809765, -0.031880736351013184, 0.01851181872189045, 0.0033881482668220997, 0.01822318695485592, -0.027918603271245956, -0.02215907908976078, 0.008593367412686348, -0.011309133842587471, -0.007806188426911831, -0.02068967930972576, -0.018367502838373184, -0.05171763896942139, -0.009000075981020927, -0.01731793023645878, -0.029886549338698387, -0.03314022347331047, -0.03841431811451912, 0.009203430265188217, -0.027577493339776993, 0.0005178159917704761, -0.0027502053417265415], "index": 13}, {"title": "Clovis culture", "text": "The Clovis culture is a prehistoric Paleo-Indian culture, named after distinct stone tools found at sites near Clovis, New Mexico, in the 1920s and 1930s. The Clovis culture appears around 11,500\u201311,000 uncal RCYBP (uncalibrated radiocarbon years before present), at the end of the last glacial period, and is characterized by the manufacture of \"Clovis points\" and distinctive bone and ivory tools.", "vector": [-0.06872909516096115, -0.0008887971634976566, -0.02674921229481697, 0.011020402424037457, -0.04705677554011345, -0.027977492660284042, 0.042880624532699585, -0.032617662101984024, -0.004844882525503635, 0.031553152948617935, -0.008011115714907646, 0.019993670284748077, -0.030270282179117203, -0.008434190414845943, 0.05205178260803223, 0.04389054328203201, -0.022013509646058083, -0.004012381657958031, 0.005121245980262756, -0.008898206986486912, -0.0004077207704540342, -0.04329004883766174, 0.017455225810408592, -0.022805066779255867, 0.028059376403689384, 0.025957653298974037, -0.022040804848074913, -0.011695955879986286, -0.04189800098538399, -0.014097926206886768, 0.04588308557868004, -0.009901302866637707, 0.036657337099313736, 0.04375406727194786, -0.01892916113138199, 0.0113957105204463, 0.026558145880699158, 0.006462118122726679, 0.026544498279690742, 0.00049813580699265, -0.02107182703912258, 0.015749281272292137, 0.03630250319838524, 0.02692662924528122, 0.00950552336871624, -0.0002761497744359076, 0.010958988219499588, -0.009382694959640503, 0.01079521793872118, -0.03799479827284813, 0.0318806916475296, -0.0322355292737484, -0.03971439227461815, -0.02664003148674965, 0.03597496077418327, -0.02391052059829235, 0.01415251661092043, 0.04924038425087929, -0.028605278581380844, -0.032044462859630585, -0.008420542813837528, 0.01174372248351574, 0.01281505636870861, -0.011061345227062702, 0.03002462536096573, 0.04539177566766739, 0.030461346730589867, 0.012746818363666534, 0.020744286477565765, 0.009826241061091423, 0.007860993035137653, 0.010993107222020626, 0.04031488299369812, -0.00026889951550401747, -0.0028199264779686928, -0.007710869889706373, -0.011518537998199463, -0.005673971958458424, -0.01838325895369053, 0.015872107818722725, 0.0057046785950660706, 0.023391911759972572, 0.013238130137324333, 0.00938951876014471, 0.023118961602449417, 0.057701870799064636, 0.002408793894574046, -0.05781105160713196, 0.04672923684120178, -0.01619965024292469, 0.04842153191566467, -0.04050594940781593, -0.035456351935863495, -0.0006120076286606491, -0.0003008859930559993, -0.009280338883399963, 0.060485973954200745, 0.00711720110848546, -0.04762997478246689, 0.012972002848982811, -0.03534717112779617, 0.04896743595600128, 0.03794020786881447, -0.04356300085783005, -0.038950126618146896, -0.033791352063417435, 0.04924038425087929, 0.03239930048584938, -0.0637613832950592, 0.03420077636837959, -0.03935955464839935, -0.016295183449983597, 0.054754000157117844, 0.005179247818887234, 0.025711996480822563, -0.0037326067686080933, -0.0010431851260364056, 0.0098057696595788, -0.022122690454125404, 0.012262330390512943, -0.045173414051532745, 0.004387689754366875, 0.03897742182016373, 0.002964931773021817, -0.05000464990735054, 0.016349773854017258, 0.047438908368349075, -0.006557651329785585, -0.0024480305146425962, -0.011382062919437885, -0.030979953706264496, 0.012719523161649704, 0.014793951995670795, -0.009457756765186787, 0.08728977292776108, -0.044518329203128815, 0.012637637555599213, 0.004435455892235041, -0.020689696073532104, 0.03062511794269085, -0.028605278581380844, 0.05270686373114586, -0.003527893451973796, 0.028687164187431335, -0.028550690039992332, -0.03168962895870209, 0.014016040600836277, 0.026503555476665497, -0.004142033401876688, -0.015244320966303349, -0.02273683063685894, -0.0181785449385643, 0.0059639825485646725, -0.015817519277334213, -0.026448965072631836, -0.021153712645173073, 0.0073833283968269825, -0.005438551306724548, 0.04727513715624809, -0.047957513481378555, -0.018847275525331497, 0.05101456865668297, -0.006209638435393572, -0.012262330390512943, 0.02528892271220684, -0.05126022547483444, -0.027308762073516846, -0.032017167657613754, 0.004281920846551657, 0.03422807157039642, -0.01281505636870861, 0.04320816695690155, 0.014712066389620304, -0.014657475985586643, -0.015694690868258476, 0.008038410916924477, -0.033791352063417435, 0.02887823060154915, 0.023664863780140877, 0.025302570313215256, -0.013784032315015793, 0.02749982662498951, -0.005151952616870403, -0.017960185185074806, 0.027936549857258797, 0.03521069511771202, 0.001054273801855743, 0.049758993089199066, 0.013224482536315918, -0.03531987592577934, 0.016213297843933105, -0.02127654105424881, 0.02388322539627552, 0.020553220063447952, -0.006963666062802076, 0.014875836670398712, 0.0028847523499280214, 0.021003590896725655, -0.042334720492362976, -0.010686037130653858, 0.0029444603715091944, -0.05715596675872803, 0.01797383278608322, 0.07626254856586456, 0.004084031563252211, 0.022573059424757957, -0.007444742135703564, 0.017728175967931747, -0.049595221877098083, -0.0173733402043581, 0.03534717112779617, 0.025793882086873055, 0.00708990590646863, 0.011006754823029041, 0.02093535289168358, -0.00711720110848546, 0.023555682972073555, -0.014016040600836277, -0.033108972012996674, 0.027677245438098907, 0.03122561052441597, 0.030242986977100372, -0.021699614822864532, -0.020034613087773323, -0.06889286637306213, -0.0026851568836718798, -0.053143586963415146, 0.047384317964315414, -0.005919627845287323, 0.01209855917841196, 0.01565374806523323, 0.0250296201556921, 0.012958355247974396, 0.03062511794269085, 0.02299613319337368, 0.03935955464839935, 0.017468873411417007, 0.027131343260407448, 0.013845446519553661, 0.04814857989549637, 0.016377069056034088, -0.008004291914403439, -0.03531987592577934, -0.01248751487582922, -0.03567471355199814, -0.015271616168320179, -0.03005192056298256, -0.032726842910051346, -0.0455828420817852, -0.012630813755095005, 0.02208174765110016, 0.03444643318653107, 0.006318818777799606, 0.08450566977262497, 0.0272678192704916, 0.005281604360789061, 0.006953430362045765, -0.018874570727348328, 0.008625255897641182, 0.041161030530929565, 0.015517272055149078, 0.0010679212864488363, -0.040014635771512985, 0.008748084306716919, -0.02187703363597393, 0.01267175655812025, -0.022600354626774788, -0.02526162751019001, -0.006762364413589239, -0.010617799125611782, -0.018601620569825172, -0.004592402838170528, 0.022955190390348434, -0.03750348836183548, 0.0465654656291008, 0.017305102199316025, 0.012794584967195988, 0.023978756740689278, 0.016786495223641396, 0.017878299579024315, 0.008843616582453251, 0.04031488299369812, 0.021099122241139412, -0.018601620569825172, -0.008761731907725334, 0.0010977754136547446, -0.054835882037878036, -0.038950126618146896, 0.053007110953330994, -0.01708674058318138, -0.030979953706264496, 0.011839255690574646, -0.028605278581380844, 0.00018530823581386358, -0.03354569524526596, 0.006137988530099392, -0.03742160275578499, 0.005302075762301683, -0.021153712645173073, -0.007622160483151674, 0.04667464643716812, -0.01927035115659237, 0.043972428888082504, -0.038813650608062744, 0.09449568390846252, -0.005012065172195435, 0.016336126253008842, -0.008229476399719715, -0.030952658504247665, -0.047957513481378555, -0.06032220274209976, -0.05491776764392853, 0.006881780456751585, -0.0007237470126710832, 0.024824906140565872, 0.004636757541447878, -0.0065201204270124435, 0.0041863881051540375, -0.01846514455974102, -0.005680795758962631, -0.03234471008181572, -0.0006034779362380505, -0.047466203570365906, 0.0025384456384927034, 0.04102455452084541, -0.04086078703403473, 0.00011323207581881434, -0.024238061159849167, -0.05721055716276169, -0.002125607104972005, -0.029915444552898407, -0.013047064654529095, 0.03676651790738106, -0.012153149582445621, -0.017823709174990654, 0.01645895279943943, -0.03196257725358009, 0.043426524847745895, -0.007335561793297529, -0.007171791046857834, 0.04080619663000107, 0.007356033194810152, 0.0455828420817852, 0.04473669081926346, 0.018628915771842003, -0.013859094120562077, 0.021426664665341377, -0.04465480521321297, 0.011593599803745747, -0.00475276168435812, 0.0006491119274869561, 0.03471938520669937, -0.038295045495033264, -0.07740893959999084, -0.010181077755987644, -0.018219487741589546, 0.05617334321141243, -0.018328668549656868, 0.007901935838162899, 0.05393514409661293, -0.03002462536096573, 0.010604151524603367, 0.021481255069375038, -0.005424903705716133, -0.0369848795235157, 0.00544878700748086, -0.02904200181365013, 0.008127120323479176, -0.00555455544963479, 0.01019472535699606, -0.05278874933719635, -0.009771650657057762, -0.049758993089199066, -0.0133882537484169, -0.012078087776899338, -0.017823709174990654, 0.020225679501891136, 0.004807352088391781, 0.03073429875075817, -0.012050792574882507, -0.010160606354475021, 0.07642631977796555, 0.08101189881563187, 0.06408892571926117, 0.04877636954188347, -0.01065191812813282, -0.02648990787565708, 0.007963349111378193, -0.0449550524353981, -0.05437186732888222, 0.0019464828073978424, -0.0449550524353981, -0.001361343776807189, 0.027117695659399033, -0.015994936227798462, -0.037749141454696655, -0.04154316335916519, 0.0024514424148947, -0.02434724196791649, 0.031553152948617935, 0.0011003342224285007, 0.04547366127371788, 0.02062145806849003, 0.0272678192704916, 0.04140668734908104, 0.021808795630931854, -0.005496553611010313, 0.023187199607491493, 0.015530919656157494, -0.04318087175488472, 0.008249947801232338, 0.02614871971309185, 0.021890681236982346, 0.009942245669662952, -0.02062145806849003, -0.008468309417366982, -0.04664735123515129, 0.03848611190915108, -0.023951461538672447, 0.0816669836640358, -0.00445251539349556, -0.022491173818707466, -0.024319946765899658, 0.03783102706074715, -0.02520703710615635, 0.03190798684954643, 0.002705628052353859, -0.005022300872951746, 0.012078087776899338, 0.012910588644444942, -0.042307425290346146, 0.05639170482754707, 0.02893282100558281, 0.09657011181116104, 0.02004826068878174, -0.046347104012966156, -0.03245389088988304, -0.012310096062719822, -0.02156314067542553, -0.010153782553970814, 0.013183539733290672, 0.011962084099650383, -0.024156175553798676, -0.015257968567311764, -0.04945874586701393, -0.04380865767598152, -0.00820218212902546, 0.019980022683739662, 0.007976996712386608, 0.02107182703912258, 0.012439748272299767, 0.05112374946475029, 0.001148100709542632, -0.0318806916475296, -0.013340487144887447, 0.029860854148864746, 0.008427366614341736, -0.01950235851109028, 0.055354490876197815, 0.016104117035865784, 0.007758636027574539, -0.024265356361865997, 0.01685473322868347, -0.01765993796288967, -0.015203378163278103, -0.02296883799135685, 0.031034544110298157, 0.03630250319838524, -0.027417941018939018, -0.014698418788611889, 0.020007317885756493, -0.014684771187603474, -0.049595221877098083, 0.026858391240239143, -0.000957034935709089, -0.05448104813694954, 0.020867114886641502, -0.017496168613433838, -0.0058923326432704926, -0.013524728827178478, -0.00911656767129898, -0.007854169234633446, -0.008618432097136974, 0.07140401750802994, 0.0027892193756997585, 0.04588308557868004, -0.04984087869524956, -0.003449419979006052, 0.01134112011641264, 0.009007387794554234, 0.021740557625889778, 0.010283433832228184, 0.022873304784297943, 0.0024241472128778696, -0.045692019164562225, -0.02073063887655735, -0.014398172497749329, 0.007772283628582954, -0.01682743802666664, -0.009430461563169956, -0.02557552233338356, 0.011648190207779408, 0.01877903752028942, 0.0235966257750988, -0.012446572072803974, 0.01583116687834263, 0.03794020786881447, 0.029697084799408913, 0.05813859403133392, 0.017468873411417007, -0.0602676123380661, 0.02004826068878174, -0.025984948500990868, -0.0424439013004303, 0.005902568344026804, 0.006489413324743509, 0.06583581119775772, 0.015312558971345425, -0.047957513481378555, -0.006056103389710188, 0.04096996784210205, 0.009409990161657333, -0.041734229773283005, -0.04929497465491295, 0.015640100464224815, 0.014070631004869938, 0.021453959867358208, 0.017646290361881256, 0.04009652137756348, 0.011423004791140556, -0.002163137774914503, 0.014657475985586643, -0.00202836818061769, 0.008522898890078068, 0.04596497118473053, -0.023664863780140877, 0.013135773129761219, -0.00881632138043642, -0.04148857295513153, -0.027936549857258797, 0.023269085213541985, -0.006342702079564333, 0.038376931101083755, -0.022668592631816864, 0.014439115300774574, -0.005404432769864798, -0.05748350918292999, 0.0028028669767081738, 0.006769188214093447, -0.022927895188331604, -0.007956525310873985, 0.04877636954188347, -0.0027704541571438313, 0.03016110137104988, 0.05371678248047829, 0.021262893453240395, 0.027199581265449524, -0.0026766271330416203, -0.011150053702294827, 0.01508055068552494, 0.0007531745359301567, -0.030461346730589867, 0.012132678180932999, 0.0028676928486675024, -0.012985650449991226, -0.009307634085416794, 0.011491242796182632, 0.022013509646058083, 0.0025179742369800806, 0.010426733642816544, 5.730907651013695e-05, 0.026967572048306465, -0.018819980323314667, 0.00766310328617692, 0.04135209694504738, -0.03065241314470768, -0.029424132779240608, -0.019543301314115524, -0.02494773454964161, 0.03354569524526596, -0.01276046596467495, 0.0026561557315289974, -0.021713262423872948, -0.01711403578519821, -0.02789560705423355, 0.02331002801656723, -0.04255308210849762, 0.028277738019824028, 0.02734970487654209, -0.02044404111802578, -0.011463947594165802, 0.00851607508957386, -0.010269786231219769, 0.022286459803581238, 0.01989813894033432, 0.020976295694708824, -0.017250511795282364, 0.013900036923587322, -0.031471267342567444, -0.0028438097797334194, 0.040560539811849594, 0.011859727092087269, 0.014834894798696041, 0.025684701278805733, 0.032644957304000854, -0.0006930400268174708, 0.010065073147416115, -0.045118823647499084, 0.012583047151565552, -0.005414668004959822, -0.011409357190132141, -0.05841154232621193, 0.010754275135695934, -0.019857196137309074, 0.014166164211928844, -0.014957722276449203, 0.0055067893117666245, 0.0033368277363479137, 0.033818647265434265, -0.017537111416459084, 0.038322340697050095, 0.0659995824098587, 0.0022194338962435722, 0.03335462883114815, 0.04326275736093521, 0.00368142849765718, -0.013258601538836956, 0.0027329232543706894, -0.01505325548350811, 0.013354134745895863, 0.010454028844833374, -0.03119831532239914, -0.015558214858174324, 0.02414252795279026, -0.006219874136149883, -0.026448965072631836, -0.02273683063685894, -0.033764056861400604, -0.045173414051532745, -0.05442645773291588, -0.04610144719481468, -0.034937746822834015, -0.04151586815714836, -0.03534717112779617, 0.00893232598900795, 0.04031488299369812, 0.0436994768679142, 0.017141330987215042, 0.003940732218325138, -0.009191629476845264, -0.008488780818879604, -0.011177348904311657, -0.016131412237882614, 0.013340487144887447, 0.01532620657235384, 0.0051314812153577805, 0.06720057129859924, -0.018970103934407234, -0.0004533547908067703, 0.010133311152458191, -0.007458389736711979, -0.0030997013673186302, -0.004312627948820591, -0.024251708760857582, -0.018396906554698944, -0.002970049623399973, 0.010140134952962399, -0.0235966257750988, 0.0029103416018188, 0.03690299391746521, -0.011927965097129345, 0.01420710701495409, -0.014875836670398712, -0.020007317885756493, 0.0013749913778156042, 0.0010030954144895077, -0.018315020948648453, 0.012978826649487019, 0.03862258791923523, -0.009014211595058441, -0.027158638462424278, 0.010365319438278675, 0.022927895188331604, -0.025398103520274162, -0.004397925455123186, -0.01705944538116455, 0.03935955464839935, -0.05117833986878395, -0.04724784195423126, -0.005360078066587448, 0.010740627534687519, 0.009273515082895756, -0.01614505983889103, -0.011593599803745747, -0.01529891137033701, -0.01281505636870861, -0.045664723962545395, -0.02489314414560795, 0.047384317964315414, 0.017127683386206627, -0.053034406155347824, 0.02107182703912258, 0.022777773439884186, -0.0328633189201355, 0.015872107818722725, 0.010638270527124405, -0.007185438647866249, -0.007478861138224602, -0.02365121617913246, -0.02603953890502453, 0.013272249139845371, -0.00962152797728777, 0.0019481887575238943, -0.016554486006498337, -0.02411523275077343, -0.03815856948494911, 0.010030954144895077, 0.018833627924323082, 0.0235966257750988, 0.02471572533249855, -0.018342316150665283, 0.02898741140961647, 0.048476122319698334, 0.02015744149684906, -0.0008333539590239525, 0.04473669081926346, 0.007055786903947592, -0.027417941018939018, -0.05494506284594536, 0.004906296730041504, -0.03294520080089569, 0.00808617752045393, 0.03559282794594765, 0.010358495637774467, 0.03515610843896866, -0.012562575750052929, 0.01366120483726263, 0.026912981644272804, 0.039523325860500336, -0.029260361567139626, 0.021754205226898193, -0.021140065044164658, -0.0005292693385854363, -0.016936618834733963, -0.012692227959632874, -0.03750348836183548, -0.004633345641195774, 0.005766092799603939, -0.030979953706264496, -0.026448965072631836, 0.017127683386206627, -0.017646290361881256, 0.01820584014058113, 0.01752346381545067, -0.021890681236982346, -0.04045135900378227, 0.012084911577403545, -0.03242659568786621, 0.016308831050992012, 0.011839255690574646, -0.02351474016904831, -0.011327472515404224, -0.010822512209415436, -0.0004533547908067703, 0.06752811372280121, -0.033108972012996674, 0.015667395666241646, 0.015803871676325798, -0.025220684707164764, 0.03398241847753525, 0.024265356361865997, 0.000556137936655432, 0.020321212708950043, -0.006574710365384817, -0.00041518427315168083, 0.040041930973529816, -0.0017605348257347941, 0.015257968567311764, -0.012248682789504528, -0.061686959117650986, -0.04353570565581322, 0.05682842805981636, 0.028141262009739876, -3.009393003594596e-05, 0.0002050332259386778, -0.02466113492846489, -0.03813127428293228, 0.010842983610928059, 0.00835912860929966, 0.008345481008291245, -0.011163701303303242, 0.006724833510816097, -0.003886141814291477, -0.021440312266349792, -0.00010342289169784635, -0.00662247696891427, 0.010160606354475021, -0.010385790839791298, -0.06943877041339874, -0.005472670309245586, 0.0034579497296363115, -0.018683506175875664, -0.01209855917841196, -0.013224482536315918, 0.023760396987199783, -0.015339854173362255, 0.02528892271220684, -0.054262686520814896, -0.043945133686065674, -0.01147077139467001, 0.010822512209415436, 0.05207907781004906, 0.023432854562997818, -0.04806669428944588, -0.0035722479224205017, 0.0003546232474036515, 0.02526162751019001, -0.015517272055149078, -0.019802605733275414, 0.017182273790240288, -0.023528387770056725, -0.04866718873381615, -0.001799771562218666, -0.0013852270785719156, 0.013285896740853786, 0.036575451493263245, -0.011552657000720501, -0.00923257227987051, -1.944510222529061e-05, -0.0016701198183000088, -0.023419206961989403, 0.0003162394859828055, -0.05065973103046417, -0.0040499125607311726, 0.02956060878932476, 0.019925432279706, -0.042307425290346146, 0.0098057696595788, 0.011989378370344639, 0.016650019213557243, 0.004885825328528881, -0.045091528445482254, -0.00811347272247076, -0.009021035395562649, -0.002529915887862444, 0.03185339644551277, -0.043945133686065674, -0.025425398722290993, -0.04986817389726639, 0.03414618596434593, 0.016963914036750793, -0.0074310945346951485, 0.04031488299369812, -0.010181077755987644, -0.0156264528632164, -0.012228211387991905, -0.017386987805366516, -0.018192192539572716, -0.022518469020724297, 0.011047697626054287, -0.030434051528573036, 0.013135773129761219, 0.0032105876598507166, 0.05661006644368172, -0.025616465136408806, 0.029396837577223778, -0.0029052237514406443, 0.021126417443156242, 0.016295183449983597, 0.011204644106328487, 0.010576856322586536, -0.04318087175488472, 0.04765726998448372, -0.006376821082085371, 0.007854169234633446, 0.0032668840140104294, -0.05284333974123001, 0.02434724196791649, 0.021453959867358208, 0.014002392999827862, 5.672265979228541e-05, -0.003869082313030958, -0.0013920507626608014, 0.03534717112779617, 0.005278192460536957, -0.027076752856373787, -0.03248118609189987, 0.033764056861400604, 0.01937953010201454, -0.011975730769336224, -0.01177101768553257, 0.048639893531799316, -0.019911784678697586, 0.009860360063612461, 0.009662470780313015, 0.012528457678854465, -0.036684632301330566, -0.0057046785950660706, 0.015558214858174324, -0.005039360374212265, -0.011716427281498909, 0.014384524896740913, 0.0014287285739555955, -0.03695758432149887, 0.033736761659383774, -0.036111436784267426, 0.015612805262207985, -0.010146958753466606, -0.013565671630203724, 0.00863207969814539, 0.021085474640130997, 0.03933225944638252, -0.01568104326725006, -0.03458290919661522, 0.0059469230473041534, 0.013654381036758423, 0.01316306833177805, 0.019256703555583954, 0.012999298050999641, 0.0010090662399306893, 0.048476122319698334, 0.05581850931048393, -0.0036063669249415398, 0.004387689754366875, 0.027909254655241966, 0.006489413324743509, 0.029123887419700623, -0.028850935399532318, 0.0015660572098568082, 0.011211467906832695, -0.023064371198415756, 0.013743089511990547, 0.020976295694708824, -0.0005851390305906534, -0.02294154278934002, 0.01583116687834263, -0.054781295359134674, -0.044081609696149826, 0.014985017478466034, -0.014548296108841896, -0.03875906020402908, 0.019652482122182846, -0.03504692763090134, -0.015899403020739555, 0.017878299579024315, -0.0299973301589489, 0.005366901867091656, 0.012842350639402866, 0.008966444991528988, 0.024279003962874413, 0.015421739779412746, -0.008052058517932892, 0.011061345227062702, 0.002359321340918541, 0.0173733402043581, -0.005394197069108486, -0.001398874563165009, -0.01453464850783348, -0.038840945810079575, -0.014630180783569813, 0.05038677901029587, -0.02164502441883087, 0.00478005688637495, 0.017195921391248703, 0.03974168747663498, -0.02307801879942417, -0.012521633878350258, -0.002912047551944852, 0.005745621398091316, 0.036056846380233765, 0.006301759276539087, 0.004322863649576902, -0.007779107429087162, 0.03073429875075817, 0.0526522733271122, 0.051342111080884933, -0.011259234510362148, 0.0010807159123942256, -0.008707141503691673, 0.030515937134623528, -0.0072127338498830795, 0.03340921923518181, -0.00047766449279151857, 0.007403799798339605, 0.0033538872376084328, -0.00992177426815033, 0.025398103520274162, 0.017441578209400177, 0.013408725149929523, 0.04045135900378227, -0.007335561793297529, -0.0025589170400053263, 0.01955694891512394, -0.020566867664456367, 0.0033538872376084328, 0.025616465136408806, 0.0016752376686781645, 0.01820584014058113, -0.005929863546043634, -0.009464580565690994, 0.000745924306102097, 0.014111573807895184, 0.01765993796288967, -0.040587835013866425, 0.004694759380072355, 0.0035313053522258997, 0.00019458431052044034, -0.003544952953234315, -0.019229408353567123, -0.013156244531273842, -0.0074652135372161865, 0.005349842365831137, 0.02247752621769905, -0.03070700354874134, 0.04419079050421715, -0.029697084799408913, -0.04200718179345131, -0.027144990861415863, 0.014056983403861523, 0.012808232568204403, -0.031089134514331818, -0.017905594781041145, 0.004704995080828667, -0.06037679314613342, -0.03073429875075817, -0.012603518553078175, -0.021672319620847702, 0.025984948500990868, 0.04577390477061272, -0.015135141089558601, 0.025984948500990868, -0.0192976463586092, -0.02640802226960659, 0.008939149789512157, 0.021481255069375038, -0.014903131872415543, 0.006107281893491745, -0.039960045367479324, 0.007731340825557709, -0.0013587848516181111, -0.03193528205156326, 0.02130383625626564, -0.018970103934407234, -0.002695392584428191, -0.009566937573254108, -0.008017939515411854, -0.006230109836906195, -0.008754908107221127, -0.03229011967778206, -0.0009519170853309333, -0.004022617358714342, 0.03971439227461815, 0.035101518034935, 0.010112839750945568, 0.031116429716348648, -0.03253577649593353, -0.0044218082912266254, 0.02093535289168358, 0.033163562417030334, -0.009519170969724655, 0.004568519536405802, -0.007035315502434969, -0.0033624167554080486, -0.01502596028149128, 0.001704238704405725, -0.004892649129033089, -0.015926698222756386, -0.006424587219953537, -0.014930427074432373, -0.014193459413945675, -0.020894410088658333, 0.021781500428915024, 0.009355400688946247, -0.016895676031708717, 0.002813102677464485, -0.028032081201672554, -0.035456351935863495, 0.004428632091730833, 0.022259164601564407, -0.0013502552174031734, 0.04588308557868004, -0.010529090650379658, 0.012692227959632874, 0.00475276168435812, 0.015517272055149078, 0.01450735330581665, 0.03171692416071892, -0.0019823077600449324, -0.00769039848819375, -0.010576856322586536, -0.008318185806274414, -0.011409357190132141, -0.018656210973858833, 0.005711502395570278, 0.022777773439884186, 0.0046435813419520855, 0.017482521012425423, 0.043426524847745895, -0.02474302053451538, -0.037776436656713486, -0.021999862045049667, -0.012200916185975075, 0.05912121757864952, -0.010262962430715561, -0.0014807599363848567, 0.02101723849773407, 0.00736285699531436, -0.020744286477565765, 0.03297249600291252, 0.006632712669670582, 0.029287656769156456, 0.00420685950666666, -0.012521633878350258, -0.024797610938549042, 0.010290257632732391, -0.012064440175890923, -0.026135072112083435, -0.016554486006498337, -0.009184805676341057, 0.015162435360252857, -0.003637074027210474, -0.026012243703007698, -0.008065706118941307, 0.002855751197785139, -0.013449667021632195, -0.006195990834385157, -0.0031491736881434917, 0.02565740793943405, -0.0019413649570196867, -0.0010755980620160699, -0.010842983610928059, -0.02190432883799076, -0.02015744149684906, -0.005482906010001898, -0.012780937366187572, 0.004889237228780985, 0.011593599803745747, -0.01789194718003273, 0.01196890790015459, -0.013831798918545246, 0.021754205226898193, -0.007983820512890816, -0.004834646824747324, 0.020321212708950043, 0.027336057275533676, -0.02354203537106514, -0.011661837808787823, -0.022955190390348434, -0.03747619315981865, 0.024824906140565872, -0.005725149996578693, 0.013592966832220554, 0.008106648921966553, -0.014889484271407127, 0.028168557211756706, -0.009771650657057762, 0.004295568447560072, 0.017277806997299194, -0.014630180783569813, 0.0017690645763650537, 0.004971122834831476, 0.017154978588223457, -0.012555751949548721, -0.034309957176446915, 0.029424132779240608, -0.0023081430699676275, -0.011600423604249954, 0.03523799031972885, -0.032726842910051346, 0.018069365993142128, -0.00447981059551239, -0.0006683038081973791, 0.002495796885341406, -0.0060117486864328384, 0.024524660781025887, -0.02161773107945919, -0.038895536214113235, -0.04659276083111763, 0.03073429875075817, -0.004670876543968916, -0.0009834771044552326, -0.014630180783569813, 0.012535281479358673, -0.01423440221697092, -0.007833697833120823, 0.0012402217835187912, -0.006264228839427233, 0.011634542606770992, -0.004687936045229435, 0.00925986748188734, 0.06294253468513489, 0.007874640636146069, 0.01708674058318138, -0.019447768107056618, 0.02471572533249855, 0.028659868985414505, 0.03575659915804863, -0.02724052406847477, -0.025944005697965622, 0.0058991564437747, -0.016035879030823708, 0.014111573807895184, -0.011429828591644764, 0.06993008404970169, -0.018055718392133713, 0.0136339096352458, -0.01559915766119957, 0.011559480801224709, -0.020539572462439537, -0.0016760906437411904, -0.01149806659668684, -0.003137232270091772, 0.002088076202198863, 0.01723686419427395, -0.003643897594884038, -0.0009954186389222741, -0.01053591351956129, -0.016786495223641396, 0.01508055068552494, 0.010433557443320751, 0.027131343260407448, 0.036111436784267426, 0.003718959167599678, -0.030297575518488884, 0.0181785449385643, 0.03351840004324913, -0.01838325895369053, -0.004623109940439463, 0.05923039838671684, 0.0196115393191576, 0.009212100878357887, 0.03013380616903305, 0.009566937573254108, 0.010849807411432266, 0.02067604847252369, 0.020171089097857475, 0.019679777324199677, 0.02221822179853916, 0.005018888972699642, 0.0050666555762290955, 0.0034408902283757925, -6.72715259497636e-06, 0.002782395575195551, -0.014589237980544567, -0.024783963337540627, 0.005244073923677206, 0.0023473796900361776, -0.014848542399704456, 0.01502596028149128, 0.011832431890070438, 0.00868667010217905, 0.021986214444041252, -0.005445375107228756, -0.01251481007784605, 0.025097858160734177, 0.014111573807895184, 0.005360078066587448, 0.00666683167219162, -0.021972566843032837, 0.0003944996860809624, -0.04872177913784981, -0.02648990787565708, -0.004333099350333214, 0.020225679501891136, 0.03597496077418327, 0.025589169934391975, 0.0067384811118245125, -0.01723686419427395, 0.007567570544779301, 0.024470070376992226, -0.027158638462424278, 0.010842983610928059, 0.012664932757616043, 0.01104087382555008, 0.03190798684954643, 0.027226876467466354, -0.023146256804466248, 0.009812593460083008, 0.0073492093943059444, 0.011948436498641968, -0.047357022762298584, 0.000594095210544765, 0.031471267342567444, 0.009641999378800392, -0.002030074130743742, 0.014016040600836277, 0.010570032522082329, -0.03867717459797859, -0.016704609617590904, 0.0032088819425553083, 0.021344779059290886, -0.017618995159864426, 0.006158459931612015, -0.027950197458267212, -0.015721986070275307, 0.023159904405474663, -0.02687203884124756, 0.017987480387091637, -0.01708674058318138, -0.02492043934762478, -0.01843784935772419, -0.03744889795780182, 0.0008226917707361281, -0.033163562417030334, -0.011293353512883186, -0.0005710649420507252, -0.017618995159864426, -0.0039339084178209305, -0.022463878616690636, 0.029806263744831085, 0.019488710910081863, 0.003910025116056204, -0.022545764222741127, 0.039932750165462494, 0.019966375082731247, -0.017755471169948578, 0.018710801377892494, 0.0019447768572717905, 0.029724378138780594, -0.0363570898771286, 0.014630180783569813, -0.0007143642869777977, -0.014125221408903599, 0.016786495223641396, -0.01935223489999771, -0.01952965371310711, -0.0376126654446125, -0.028223147615790367, -0.0014517589006572962, -0.022641297429800034, -0.03927766904234886, 0.002127313055098057, -0.027254171669483185, 0.03594766557216644, 0.03482856601476669, 0.014848542399704456, 0.020307565107941628, 0.008106648921966553, -0.015667395666241646, 0.05830236151814461, -0.017141330987215042, -0.02887823060154915, -7.1969538112171e-05, -0.010065073147416115, 0.024838553741574287, 0.019925432279706, -0.007581217680126429, 0.022695887833833694, 0.016759200021624565, 0.013565671630203724, -0.020321212708950043, 0.0060629271902143955, 0.0010576857021078467, 0.03452831879258156, -0.01619965024292469, -0.0008589430944994092, 0.029314951971173286, -0.006813542917370796, 0.010153782553970814, 0.01308800745755434, -0.0029205773025751114, -0.009416813962161541, -0.015435387380421162, -0.015435387380421162, -0.0035040101502090693, -0.031061839312314987, -0.03130749613046646, 0.03289061412215233, 0.021781500428915024, 0.005056419875472784, -0.04247119650244713, 2.82280525425449e-05, -0.00517583591863513, 0.006731657311320305, -0.009880831465125084, -0.005557967349886894, -0.009812593460083008, -0.0016146765556186438, -0.032672252506017685, -0.03354569524526596, 0.026189662516117096, 0.047411613166332245, -0.022272812202572823, -0.0031150549184530973, -0.006973901763558388, -0.0012973708799108863, -0.0018680093344300985, -0.005684207659214735, -0.004469574894756079, 0.010030954144895077, 0.035401761531829834, -0.019365882501006126, 0.03638438507914543, -0.0035210696514695883, -0.03234471008181572, -0.019420472905039787, -0.012105382978916168, -0.025957653298974037, -0.011382062919437885, 0.01711403578519821, -0.012385157868266106, -0.014875836670398712, -0.017427930608391762, 0.004950651433318853, 0.01565374806523323, 0.04197988659143448, 0.010529090650379658, -0.006339290179312229, 0.004534400999546051, 0.012030321173369884, 0.009143862873315811, 0.009853536263108253, -0.004640169441699982, -0.0018867747858166695, 0.021167360246181488, 0.0016052938299253583, -0.020771581679582596, 0.005847977939993143, -0.009744355455040932, 0.0046435813419520855, 0.022327402606606483, -0.0008845322881825268, 0.02635343186557293, -0.007028491701930761, -0.00923257227987051, -0.0019106579711660743, -0.0029291068203747272, 0.009239396080374718, 0.024442775174975395, 0.002773866057395935, 0.032726842910051346, -0.01346331462264061, 0.000919504149351269, 0.003065582597628236, 0.02904200181365013, -0.0007450713310390711, 0.0066565959714353085, -0.0029461663216352463, 0.011347943916916847, -0.03807668387889862, 0.006793071515858173, -0.024551954120397568, 0.006359761580824852, -0.005472670309245586, -0.0014423761749640107, 0.009641999378800392, -0.023296380415558815, -0.020403098315000534, -1.3107784980093129e-05, -0.03753077983856201, -0.03706676512956619, 0.014275345019996166, -0.027977492660284042, -0.01723686419427395, 0.025439046323299408, 0.013695323839783669, 0.009041506797075272, 0.018246782943606377, -0.01570833846926689, 0.0047971163876354694, 0.021890681236982346, 0.0015097609721124172, -0.014875836670398712, 0.005865037441253662, -0.006008336786180735, 0.04713866114616394, 0.016622724011540413, 0.0027260994538664818, -0.033190857619047165, -0.015844814479351044, 0.031007248908281326, 0.008229476399719715, 0.0026680973824113607, -0.0049028848297894, 0.0017375046154484153, 0.008475133217871189, -0.039523325860500336, -0.01950235851109028, -0.022641297429800034, 0.008884559385478497, 0.00865937490016222, 0.023187199607491493, 0.015749281272292137, 0.011695955879986286, -0.028577983379364014, 0.008495604619383812, -0.028632573783397675, 0.006004924885928631, -0.05183342099189758, 0.04203447699546814, -0.02893282100558281, 0.0008777084876783192, 0.00890503078699112, 0.009744355455040932, -0.026503555476665497, -0.013067536056041718, -0.011402533389627934, -0.0178646519780159, -0.02687203884124756, 0.01273317076265812, -0.0028386919293552637, 0.017045797780156136, 0.004298980347812176, -0.02792290225625038, -0.05145128816366196, 0.011259234510362148, 3.171990829287097e-05, -0.00890503078699112, -0.030379461124539375, -0.000688775151502341, -0.021262893453240395, -0.022122690454125404, 0.04648358002305031, 0.012855998240411282, -0.002814808627590537, -0.04421808570623398, -0.0023286144714802504, 0.012726346962153912, -0.014288991689682007, 0.01901104673743248, 0.006776012014597654, 0.012282800860702991, -0.010754275135695934, -0.0012717817444354296, -0.009150686673820019, -0.019748015329241753, -0.0577564612030983, -0.012658108957111835, -0.015394444577395916, -0.019174817949533463, -0.011307001113891602, 0.001667560893110931, -0.001339166541583836, -0.008174886927008629, 0.00938951876014471, -0.01666366681456566], "index": 14}, {"title": "Office of Migrant Education", "text": "The Office of Migrant Education (OME) is a program within the U.S. Department of Education's Office of Elementary and Secondary Education (OESE) that administers grant programs that provide academic and supportive services to the children of families who migrate to find work in the agricultural and fishing industries. OME also administers several contracts and special initiatives.The Office of Migrant Education was created out of a response from the public out-cry resulting from Edward R.", "vector": [-0.036061640828847885, -0.005345136392861605, -0.020434929057955742, 0.006410958245396614, -0.00444359565153718, 0.01939314976334572, 0.01886424422264099, -0.015258081257343292, -0.03231123089790344, -0.003790479153394699, 0.015394313260912895, -0.034971777349710464, -0.038049038499593735, -0.017549999058246613, -0.03776054456830025, -0.001331275561824441, -0.031109174713492393, -0.01572287455201149, -0.0075168488547205925, 0.013591231778264046, -0.003015153808519244, -0.029570546001195908, 0.026573421433568, -0.026733696460723877, 0.010826505720615387, 0.022149860858917236, 0.014905477873980999, 0.029666708782315254, 0.028881367295980453, 0.041959721595048904, -0.013294724747538567, 0.04513314738869667, 0.023063423112034798, -0.034619174897670746, -0.012389176525175571, -0.0016027395613491535, -0.039203010499477386, -0.0451972559094429, 0.012413217686116695, -0.03368958458304405, -0.01590719074010849, -0.004924417473375797, 0.023928901180624962, 0.02331986092031002, 0.024185340851545334, 0.008029725402593613, -0.048050131648778915, -0.05830766633152962, -0.026653559878468513, -0.0054292804561555386, 0.018543697893619537, 0.01801479235291481, -0.024201367050409317, 0.009167670272290707, -0.052441637963056564, 0.03862602263689041, 0.10443451255559921, 0.05580739304423332, -0.006923834793269634, -0.029426299035549164, -0.0365104079246521, -0.0003593642613850534, 0.008959313854575157, -0.04577424377202988, -0.01310239639133215, 0.01220486219972372, -0.026060545817017555, 0.015234040096402168, -0.03827342018485069, 0.02801588736474514, -0.008750958368182182, -0.008198012597858906, -0.013166505843400955, 0.050999172031879425, -0.020499039441347122, -0.022823011502623558, -0.0066153076477348804, -0.03006739541888237, 0.01644410751760006, -0.017758354544639587, 0.009287876076996326, -0.006879759486764669, 0.07225149869918823, 0.00131825334392488, 0.04933232441544533, -0.06334026902914047, -0.01897643692791462, -0.049556706100702286, -0.01319054700434208, 0.020322738215327263, -0.031013010069727898, 0.008718903176486492, -0.020563147962093353, 0.03471533954143524, 0.02867301180958748, -0.000364873674698174, 0.025018764659762383, -0.025627806782722473, -0.013094382360577583, -0.010241505689918995, -0.0023600340355187654, 0.018239175900816917, -0.028352463617920876, 0.015586642548441887, 0.0025744005106389523, 0.036959175020456314, 0.011716026812791824, 0.030756572261452675, 0.027855614200234413, 0.06478273123502731, -0.04221615940332413, 0.0031113182194530964, 0.005966198164969683, 0.027246572077274323, 0.0356769822537899, 0.02054712176322937, 0.0045557874254882336, 0.017742326483130455, -0.0037203591782599688, 0.03945944830775261, 0.018896300345659256, 0.013943834230303764, 0.013310751877725124, -0.038465749472379684, -0.07270026952028275, 0.0233839713037014, -0.020450957119464874, 0.06439808011054993, -0.011315341107547283, -0.013487054035067558, 0.048114243894815445, -0.001110898912884295, -0.031173285096883774, -0.0186238344758749, 0.029057668522000313, 0.0016107532428577542, 0.023223696276545525, 0.03115725703537464, -0.010321643203496933, 0.0269901342689991, -0.018335340544581413, 0.0428893119096756, -0.07109753042459488, 0.03692711889743805, 0.0033857873640954494, -0.03548465296626091, 0.02856081910431385, 0.03862602263689041, -0.04183150455355644, 0.027214517816901207, -0.03349725902080536, -0.03872218728065491, 0.013454998843371868, -0.03200671076774597, 0.031365614384412766, -0.02380068227648735, 0.015634724870324135, 0.009384040720760822, -0.010714313946664333, 0.050454240292310715, -0.017101231962442398, -0.010401779785752296, 0.013422943651676178, 0.02114013582468033, 0.000522392918355763, -0.010650204494595528, -0.010345684364438057, -0.044972874224185944, 0.009712602011859417, 0.03631807863712311, -0.046190954744815826, 0.03522821515798569, -0.03175027295947075, -0.040998078882694244, -0.02801588736474514, -0.018880272284150124, 0.005196882877498865, 0.04705643281340599, -0.0643339678645134, -0.0014204279286786914, -0.04231232404708862, 0.05615999549627304, 0.06718683987855911, 0.015290135517716408, 0.025563696399331093, -0.010978765785694122, -0.01650821790099144, 0.01403999887406826, -0.027631230652332306, -0.0008324228692799807, 0.03234328329563141, -0.016492189839482307, 0.05237752944231033, 0.03683095425367355, 0.04516519978642464, -0.017501916736364365, -0.020050272345542908, 0.06176958233118057, 0.03163807839155197, -0.058532048016786575, -0.020803559571504593, 0.003199468832463026, 0.048402734100818634, 0.026365065947175026, 0.029602600261569023, 0.05285835266113281, 0.012733765877783298, 0.0010818492155522108, -0.04378684610128403, -0.013727464713156223, 0.01843150518834591, -0.023720545694231987, 0.016844792291522026, 0.021893423050642014, -0.0075048282742500305, -0.005769862327724695, -0.03231123089790344, -0.02626890130341053, 8.877674554241821e-05, 0.003491968847811222, 0.059493694454431534, 0.020466985180974007, 0.009624451398849487, 0.01657232642173767, -0.032679859548807144, -0.03465123102068901, 0.0044716433621943, -0.038465749472379684, -0.03037191554903984, 0.0062506841495633125, -0.04253670945763588, 0.09571560472249985, 0.013150478713214397, -0.04625506326556206, -0.040869858115911484, 0.05917314440011978, 0.03689506649971008, -0.019793834537267685, -0.00867883488535881, 0.013094382360577583, -0.04971698299050331, -0.00587404053658247, 0.0008624742622487247, -0.011876299977302551, -0.01421630010008812, -0.003167414106428623, -0.014657053165137768, 0.04369068145751953, -0.043530408293008804, 0.03423451632261276, 0.03522821515798569, -0.04417150467634201, -0.02790369652211666, -0.011275272816419601, 0.048723284155130386, 0.0818038284778595, -0.0040128594264388084, -0.00855862908065319, -0.022790957242250443, -0.039074789732694626, -0.018816161900758743, 0.03285616263747215, -0.04019670933485031, 0.005549485795199871, -0.01602739654481411, -0.0077211977913975716, 0.05644848942756653, -0.0031313523650169373, -0.022694792598485947, 0.0007507833070121706, -0.043049585074186325, 0.017421780154109, 0.0051087322644889355, -0.013735477812588215, 0.017870547249913216, 0.015650752931833267, 0.03532437980175018, -0.003291626460850239, 0.059076979756355286, 0.005405239295214415, -0.04712054505944252, -0.030339859426021576, -0.008113869465887547, 0.023480134084820747, 0.027390819042921066, 0.058115337044000626, 0.02735876478254795, -0.013879724778234959, 0.06930246204137802, 0.01729355938732624, -0.024297531694173813, 0.029714791104197502, -0.02194150537252426, 0.015995340421795845, 0.027919722720980644, 0.005285033956170082, -0.03574109449982643, -0.006775581743568182, 0.018062874674797058, -0.007761266548186541, 0.0030351881869137287, -0.0038966606371104717, 0.00435544503852725, -0.021861368790268898, 0.008398354984819889, 0.015530546195805073, -0.017197396606206894, 0.01764616370201111, -0.014144176617264748, -0.05718574672937393, 0.04054931178689003, -0.06494300812482834, -0.0024101196322590113, -0.010538012720644474, -0.003828544169664383, 0.00988088920712471, 0.02319164201617241, -0.023351915180683136, 0.012164792977273464, -0.03615780547261238, -0.012429245747625828, 0.011988491751253605, -0.016251780092716217, 0.002153681358322501, 0.006519143469631672, -0.0325356125831604, -0.0548136942088604, 0.0020034245681017637, 0.012180821038782597, 0.030580271035432816, -0.04157506301999092, -0.03872218728065491, 0.023031366989016533, -0.01573088951408863, 0.01578698493540287, -0.03259972482919693, 0.015402327291667461, 0.034202463924884796, 0.010738355107605457, 0.027503011748194695, -0.0063388352282345295, -0.03426657244563103, -0.019473286345601082, 0.017806436866521835, -0.012068629264831543, 0.008686848916113377, 0.052217256277799606, 0.03788876533508301, 0.013991916552186012, -0.012060615234076977, 0.0008549613994546235, -0.01644410751760006, 0.015009656548500061, 0.01093869749456644, 0.031670134514570236, 0.014833354391157627, -0.012228903360664845, -0.03285616263747215, 0.05436492711305618, 0.06705862283706665, -0.04115835204720497, 0.004439588636159897, -0.0146730812266469, 0.003181437961757183, -0.06401342153549194, 0.03878629952669144, -0.02788766846060753, 0.028336435556411743, 0.024249449372291565, -0.0641416385769844, 0.025515614077448845, -0.017245477065443993, 0.04070958495140076, -0.0317021906375885, -0.007256403565406799, 0.035388488322496414, -0.0013473029248416424, 0.025050818920135498, -0.0020294690039008856, 0.031109174713492393, -0.029843011870980263, 0.008061779662966728, 0.0019653593190014362, 0.05234547331929207, -0.009023424237966537, -0.013302738778293133, 0.029490407556295395, -0.04157506301999092, -0.011796163395047188, -0.00338178058154881, 0.036478351801633835, -0.005569519940763712, 0.001465504989027977, -0.006230650003999472, 0.018543697893619537, 0.049556706100702286, -0.029907120391726494, 0.006146506406366825, 0.013631300069391727, 0.008398354984819889, 0.009295889176428318, -0.05237752944231033, 0.020883696153759956, 0.034555066376924515, 0.02017849124968052, -0.048530954867601395, -0.01698903925716877, 0.0087108900770545, 0.023239724338054657, 0.017982738092541695, -0.0005454323254525661, -0.0025964381638914347, 0.018639860674738884, 0.03394602611660957, -0.0012190837878733873, 0.020803559571504593, -0.05122355744242668, 0.04824246093630791, -0.024233423173427582, 0.03747205063700676, 0.008189999498426914, 0.007324520032852888, 0.026797804981470108, 0.03481150418519974, 0.031109174713492393, 0.07205916941165924, 0.04561396688222885, -0.03933122754096985, -0.049556706100702286, 0.0040008388459682465, -0.012525409460067749, -0.014793286100029945, -0.005805924069136381, 0.03590136766433716, 0.015562601387500763, -2.0895091438433155e-05, -0.00010893620492424816, 0.02421739511191845, 0.029810955747961998, 0.021797258406877518, 0.010746369138360023, -0.0022638696245849133, -0.016460135579109192, 0.012910067103803158, -0.06253889948129654, -0.02759917639195919, 0.004435581620782614, 0.012429245747625828, 0.03176629915833473, -0.01771027222275734, -0.007977636530995369, 0.013887738808989525, -0.021829312667250633, -0.004475650377571583, 0.04433177784085274, 0.016428081318736076, 0.05090300738811493, -0.03223109245300293, -0.006495102308690548, -0.00685171177610755, -0.0007062071235850453, -0.018768081441521645, 0.07872656732797623, -0.001086857751943171, 0.017758354544639587, -0.006226643454283476, -0.015009656548500061, 0.0029029620345681906, -0.010241505689918995, 0.008847122080624104, 0.039074789732694626, 0.0009240795625373721, -0.020531093701720238, -0.003255564719438553, 0.007396643050014973, -0.011860272847115993, 0.03542054444551468, 0.0022378251887857914, 0.014312464743852615, -0.006783595308661461, 0.05019780248403549, 0.013246642425656319, -0.010153355076909065, 0.02229410782456398, 0.029730819165706635, -0.03945944830775261, 0.012004519812762737, 0.013607258908450603, -0.03926711902022362, 0.04272903874516487, 0.03878629952669144, 0.028352463617920876, -0.00012796874216292053, -0.04035698249936104, -0.0015676796901971102, -0.01301424577832222, 0.006551198195666075, -0.027454929426312447, 0.017822464928030968, -0.006451027002185583, -0.013711437582969666, 0.00049309286987409, 0.01608349196612835, 0.02548355981707573, -0.045581914484500885, 0.04135068133473396, 0.0029089723248034716, 0.02307944931089878, -0.010650204494595528, -0.015201984904706478, 0.054557256400585175, 0.03320876508951187, 0.01039376575499773, 0.003966780379414558, 0.007633047178387642, 0.02283903956413269, 0.07250794023275375, -0.022181915119290352, 0.01615561544895172, 0.04083780571818352, -0.020450957119464874, 0.028336435556411743, 0.014392601326107979, 0.0025623799301683903, -0.005954177584499121, -0.018960408866405487, 0.040453147143125534, 0.025323284789919853, 0.01639602519571781, -0.012998217716813087, -0.007717191241681576, 0.006226643454283476, 0.050037529319524765, 0.038113147020339966, 0.00040218746289610863, 0.022630682215094566, -0.022678764536976814, -0.013078355230391026, 0.006318800617009401, -0.024377668276429176, -0.03072451800107956, -0.010802464559674263, -0.024618079885840416, -0.06407752633094788, -0.05526246130466461, -0.01280588936060667, 0.01361527293920517, 0.008518560789525509, 0.007436711806803942, -0.011347396299242973, 0.03843369334936142, 0.0059982528910040855, -0.004411540925502777, 0.02216588892042637, -0.00564564997330308, -0.03248753026127815, -0.011772122234106064, 0.0008449442684650421, 0.005713766440749168, -0.02325575053691864, -0.010161369107663631, -0.027486983686685562, 0.019232874736189842, -0.0037043318152427673, -0.01825520396232605, 0.0006741523393429816, -0.010137327946722507, 0.009640478529036045, -0.010834519751369953, -0.0365104079246521, -0.030387941747903824, -0.025387395173311234, 0.01614760048687458, -0.005974211730062962, 0.041543010622262955, 0.04327397048473358, 0.0010538012720644474, -0.01340691652148962, 0.021300408989191055, -0.01358321774750948, -0.027134381234645844, 0.011187122203409672, 0.032567668706178665, 0.0023359928745776415, 0.004062945023179054, -0.004487670958042145, 0.02561177872121334, -0.021540820598602295, 0.004535752814263105, -0.02194150537252426, 0.021172190085053444, 0.002171712229028344, -0.028721094131469727, -0.01319054700434208, 0.01662040874361992, 0.030083421617746353, -0.02747095562517643, -0.002287910785526037, -0.00931191723793745, 0.03602958470582962, 0.024441778659820557, 0.028063969686627388, -0.009760684333741665, -0.014953560195863247, 7.688141340622678e-05, 0.03404218703508377, 0.019136710092425346, -0.004800205118954182, -0.020771505311131477, -0.014400615356862545, 0.058660268783569336, 0.005585547536611557, 0.035164106637239456, -0.005565513391047716, 0.030339859426021576, -0.01608349196612835, -0.015634724870324135, 0.038593970239162445, 0.02993917465209961, -0.010505957528948784, 0.016235752031207085, 0.016412053257226944, 0.0014604964526370168, 0.028336435556411743, -0.0035941435489803553, -0.019553422927856445, 0.014985615387558937, 0.03721561282873154, -0.00831020437180996, 0.041414789855480194, -0.018784107640385628, 0.03785670921206474, -0.0018080906011164188, 0.008510546758770943, -0.001004216494038701, 0.020162463188171387, 0.014985615387558937, -0.04869122803211212, 0.0037223626859486103, -0.0321669839322567, 0.023784656077623367, -0.03078862652182579, -0.025403423234820366, 0.05577533692121506, -0.013463012874126434, -0.008686848916113377, 0.033657532185316086, -0.005417259875684977, 0.020226573571562767, 0.022213971242308617, 0.020931778475642204, -0.029474381357431412, -0.007344554178416729, -0.010345684364438057, -0.020386846736073494, -0.0238487645983696, -0.052633967250585556, -0.04554985836148262, 0.013166505843400955, 0.01637999899685383, 0.01663643680512905, -0.002179725794121623, 0.031782325357198715, -0.01174808107316494, 0.0341062992811203, -0.012020546942949295, -0.0214446559548378, 0.02825629897415638, 0.002227808116003871, 0.004663972184062004, -0.008863150142133236, -0.03760027140378952, 0.032920271158218384, -0.03500383347272873, -0.012581505812704563, -0.023303832858800888, -0.00727643771097064, -0.03436273708939552, 0.004115033894777298, 0.03183040767908096, -0.010554039850831032, -0.03175027295947075, 0.038241367787122726, -0.011948423460125923, 0.03200671076774597, 0.01602739654481411, -0.07430300861597061, -0.0436265729367733, -0.020034244284033775, -0.04420355707406998, -0.0030231676064431667, 0.02764725871384144, 0.012533423490822315, 0.03994027152657509, -0.0030171573162078857, -0.019553422927856445, 0.002618475817143917, -0.00421520508825779, 0.021412601694464684, -0.003101301146671176, -0.019681641831994057, 0.0186238344758749, -0.023880818858742714, 0.017982738092541695, 0.014857395552098751, 0.0065552047453820705, -0.004016865976154804, -0.009167670272290707, 0.02548355981707573, 0.02035479247570038, 0.014881436713039875, 0.0027266608085483313, -0.0023219690192490816, 0.0036662667989730835, 0.015835067257285118, -0.042023830115795135, 0.005902088712900877, 0.002612465526908636, -0.004627910442650318, -0.0039367289282381535, 0.043466296046972275, 0.011387464590370655, 0.026605477556586266, -0.008246094919741154, -0.025739997625350952, -0.0011990495258942246, -0.008574657142162323, -0.010898629203438759, 0.045646023005247116, 0.009920958429574966, 0.008598698303103447, -0.022374244406819344, -0.012525409460067749, 0.008202020078897476, 0.02096383459866047, 0.035516709089279175, 0.03586931154131889, 0.01825520396232605, -0.027454929426312447, -0.0038004962261766195, -0.048947665840387344, 0.012301025912165642, 0.02205369621515274, -0.00415510218590498, -0.019313011318445206, -0.00721633480861783, 0.04670383036136627, -0.020499039441347122, -0.026284929364919662, 0.008935273624956608, -0.009864862076938152, 0.0028829278890043497, -0.018335340544581413, -0.00879904069006443, 0.04247259721159935, 0.008967327885329723, 0.01753397099673748, -0.04260081797838211, 0.034747395664453506, 0.0036001538392156363, -0.027855614200234413, 0.00012934609549120069, -0.01904054544866085, -0.0357731468975544, 0.010618149302899837, 0.04349835216999054, 0.02266273833811283, -0.013967875391244888, -0.0286089014261961, 0.021588902920484543, -0.032808080315589905, -0.014200272969901562, 0.012886025942862034, -0.013519108295440674, -0.006635341793298721, 0.023271778598427773, -0.013743491843342781, -0.043722737580537796, -0.011683971621096134, 0.018046848475933075, 0.016123559325933456, 0.014633012004196644, 0.018832189962267876, -0.027967805042862892, -0.006394931115210056, -0.040998078882694244, 0.028240270912647247, 0.0119243822991848, -0.030035339295864105, 0.006451027002185583, 0.0020064297132194042, -0.03772848844528198, -0.01382362935692072, -0.03673478960990906, 0.0001843150530476123, 0.02139657363295555, 0.011403491720557213, 0.017453834414482117, -0.004435581620782614, -0.01764616370201111, 0.021412601694464684, 0.004271300975233316, 0.010433834977447987, 0.010321643203496933, -0.047986023128032684, -0.023512190207839012, 0.010642190463840961, -0.005849999375641346, -0.03580520302057266, -0.008758971467614174, 0.011507670395076275, 0.03141369670629501, -0.032022736966609955, 0.005012568086385727, 0.026284929364919662, 0.05349944904446602, 0.005609588697552681, -0.02017849124968052, 0.012220889329910278, 0.015434382483363152, -0.002949040848761797, 0.019056573510169983, -0.01873602531850338, -0.01910465583205223, -0.010281573981046677, 0.012068629264831543, 0.02958657220005989, -0.035035885870456696, -0.01759808138012886, -0.02054712176322937, 0.023480134084820747, -0.0452934205532074, -0.0074767800979316235, -0.009504245594143867, 0.0396517775952816, 0.04093397036194801, 0.01928095705807209, -0.0008128894842229784, 0.01093869749456644, 0.0241693127900362, -0.05183259770274162, -0.01964958757162094, -0.013767533004283905, -0.018944382667541504, -0.039203010499477386, 0.01963355951011181, 0.003802499733865261, -0.07257204502820969, -0.000505113392136991, 0.025387395173311234, -0.015674792230129242, -0.01246931403875351, 0.010826505720615387, 0.06337232142686844, 4.6830045903334394e-05, 0.005629622843116522, -0.020531093701720238, 0.028721094131469727, -0.003369760001078248, 0.0007758261053822935, -0.03519616276025772, 0.015626711770892143, 0.03266383334994316, 0.023351915180683136, -0.006166540551930666, 0.036414243280887604, -0.00801770482212305, 0.01153972465544939, 0.001598732778802514, 0.012012532912194729, -0.0022498457692563534, 0.028881367295980453, -0.025034792721271515, 0.025018764659762383, -0.06680218875408173, 0.022310135886073112, 0.009047465398907661, 0.03561287373304367, 0.0769956111907959, 0.00727643771097064, -0.002922996412962675, 0.03910684585571289, 0.009768697433173656, -0.03644629940390587, 0.020803559571504593, -0.006491095293313265, 0.019313011318445206, -0.022919176146388054, 0.018207121640443802, -0.07148218899965286, -0.004583835136145353, -0.02812808007001877, 0.030644381418824196, 0.04397917538881302, 0.01178013626486063, 0.0698794424533844, -0.03181438148021698, -0.0069078076630830765, 0.0025623799301683903, 0.0325356125831604, 0.0020975854713469744, -0.05077479034662247, -0.001526609412394464, 0.013006231747567654, -0.01855972409248352, -0.021781230345368385, 0.03753616288304329, -0.021236298605799675, 0.001172003336250782, -0.005116746295243502, 0.034202463924884796, 0.012092670425772667, 0.019056573510169983, 0.01433650590479374, 0.009560341946780682, -0.013230615295469761, -0.0006130479159764946, 0.002856883220374584, -0.028528764843940735, 0.04067752882838249, -0.022871093824505806, -0.043177805840969086, 0.026573421433568, 0.012036574073135853, 0.032984379678964615, 0.017758354544639587, 0.005445307586342096, 0.04026081785559654, 0.06680218875408173, 0.002101592253893614, -0.020274655893445015, -0.0120846563950181, -0.04936438053846359, -0.005345136392861605, 0.016187669709324837, -0.017806436866521835, -0.002918989397585392, 0.056416433304548264, -0.04189561307430267, 0.029025614261627197, 0.008823081851005554, 0.051351774483919144, 0.010521985590457916, 0.01621171087026596, 0.011307328008115292, 0.002012440003454685, 0.010169382207095623, 0.005277019925415516, -0.003491968847811222, -0.04538958519697189, 0.007284451276063919, -2.2992426238488406e-05, 0.015931231901049614, 0.03397807851433754, 0.024569997563958168, 0.051544103771448135, -0.007805341854691505, 0.03011547587811947, 0.050518352538347244, 0.012164792977273464, 0.020018218085169792, -0.009560341946780682, -0.04423561319708824, 0.014480751939117908, -0.008438424207270145, -0.02000219002366066, -0.027631230652332306, -0.020643286406993866, 0.009384040720760822, -0.004671985749155283, 0.0007347559439949691, 0.01060212217271328, 0.002295924350619316, 0.028817256912589073, -0.028047943487763405, 0.04224821552634239, 0.03295232728123665, 0.009624451398849487, -0.0011018834775313735, 0.009103560820221901, 0.008470478467643261, -0.04138273745775223, 0.06712273508310318, 0.0064470199868083, 0.009808766655623913, 0.013150478713214397, 0.022085752338171005, -0.014841368421912193, -0.021556846797466278, 0.011387464590370655, -0.02904164046049118, -0.02386479265987873, 0.003103304421529174, -0.021669039502739906, -0.02229410782456398, 0.01945725828409195, -0.00552945164963603, 0.013727464713156223, -0.014264382421970367, -0.028656983748078346, -0.033336982131004333, -0.03718355670571327, -0.033048491925001144, -0.016371984034776688, 0.0015356248477473855, -0.033336982131004333, -0.00280880113132298, 0.034010134637355804, -0.03163807839155197, -0.014985615387558937, 0.02910575084388256, 0.04458821564912796, -0.009111574850976467, 0.041959721595048904, -0.01843150518834591, -0.006162533536553383, 0.02017849124968052, 0.033336982131004333, 0.00031053079874254763, -0.03239136561751366, -0.01268568355590105, -0.050454240292310715, -0.026541367173194885, -0.014168217778205872, -0.0022017634473741055, 0.01764616370201111, -0.019954107701778412, -0.0269901342689991, -0.02825629897415638, -0.020386846736073494, -0.006647362373769283, -0.004175136797130108, -0.02615671046078205, 0.030227668583393097, -0.009287876076996326, 0.03157396987080574, 0.00470003392547369, -0.029073696583509445, 0.029682736843824387, -0.02565986104309559, 0.033529311418533325, 0.04487670958042145, -0.031782325357198715, -0.013134450651705265, -0.034747395664453506, 0.008871163241565228, 0.008630752563476562, -0.036125749349594116, -0.034747395664453506, -0.019024519249796867, -0.02548355981707573, 0.005797910504043102, -0.004659965168684721, -0.0017820460489019752, -2.4682814910192974e-05, 0.002844862872734666, 0.018094930797815323, -0.01045787613838911, -0.01400794368237257, -0.027583148330450058, 0.027583148330450058, -0.006523150019347668, 0.009848834946751595, -0.028352463617920876, -0.012116711586713791, 0.0002012189506785944, -0.004627910442650318, 0.04837068170309067, 0.037375885993242264, 0.03820931166410446, -0.0013543149689212441, -0.01382362935692072, 0.005489382892847061, -0.002638509962707758, 0.005357156973332167, 0.01928095705807209, 0.0023399998899549246, -0.022726846858859062, 0.01238116342574358, -0.0029851023573428392, 0.056416433304548264, -0.006823663599789143, 0.032439447939395905, -0.0071882870979607105, 0.03391396999359131, 0.005321095231920481, -0.0257880799472332, -0.0034398797433823347, -0.021076025441288948, -0.016051437705755234, -0.0031954620499163866, 0.0245860256254673, 0.02150876447558403, 0.0011489639291539788, 0.022694792598485947, -0.03500383347272873, -0.0013623286504298449, 0.03628602251410484, 0.009760684333741665, -0.004692020360380411, 0.008566643111407757, 0.003161403816193342, 0.014576916582882404, 0.0023159587290138006, 0.033112600445747375, 0.01051397155970335, 0.0039367289282381535, 0.015803012996912003, -0.0074888006784021854, 0.017998766154050827, -0.02000219002366066, 0.015169929713010788, -0.02650931291282177, 0.0016217720694839954, 0.019970135763287544, -0.002027465496212244, 0.00710815005004406, -0.015169929713010788, 0.008230067789554596, -0.0034759414847940207, 0.021909449249505997, -0.035164106637239456, 0.0025243149138987064, 0.00023089467140380293, 0.013230615295469761, -0.0060463352128863335, -0.015041710808873177, -0.02162095718085766, 0.003191455267369747, 0.01988999731838703, 0.021252326667308807, 0.021829312667250633, 0.012413217686116695, -0.025355340912938118, -0.016780683770775795, -0.01000109501183033, -0.02469821646809578, 0.001355316606350243, -0.02035479247570038, -0.014977601356804371, -0.01880013570189476, -0.011187122203409672, 0.0035821229685097933, 0.018832189962267876, -0.027310682460665703, 0.03239136561751366, 0.01584308035671711, -0.0014665067428722978, -0.0010072216391563416, 0.03628602251410484, 0.004407533910125494, -0.014576916582882404, -0.0202426016330719, -0.011531711556017399, -0.010489930398762226, -0.002265873132273555, 0.01460897084325552, -0.0023600340355187654, 0.005417259875684977, -0.034074243158102036, -0.00804575253278017, -0.007356574758887291, -0.021284380927681923, 0.06362876296043396, -0.00412705447524786, 0.0202426016330719, 0.0018301282543689013, -0.005773869343101978, 0.0019142720848321915, -0.014416642487049103, 0.02939424477517605, 0.026284929364919662, -0.03542054444551468, -0.007540889550000429, -0.028705066069960594, -0.009720615111291409, -0.004784177523106337, 0.021476710215210915, -0.0013262670254334807, -0.013911779969930649, -0.008526574820280075, 0.006699451245367527, 0.014913491904735565, 0.0119243822991848, -0.014560889452695847, -0.009432122111320496, 0.005649656988680363, 0.020034244284033775, -0.011283286847174168, -0.007032020017504692, -0.019601505249738693, -0.0022578593343496323, 0.004040907137095928, -0.010137327946722507, 0.01246931403875351, -0.025836162269115448, -0.04369068145751953, 0.015073766000568867, 0.013038286939263344, 0.019922053441405296, 0.002490256680175662, 0.012357122264802456, -0.02554766833782196, 0.01790260151028633, -0.0026144690345972776, -0.025884244590997696, 0.01541835442185402, 0.015746915712952614, -0.004203184507787228, -0.004291335120797157, 0.009087533690035343, -0.024137258529663086, -0.0016748628113418818, 0.024265477433800697, -0.047633420675992966, -0.01310239639133215, -0.0333690382540226, 0.010962738655507565, 0.005942157004028559, -0.004972499329596758, 0.03522821515798569, 0.02517903968691826, 0.01698903925716877, 4.513965905061923e-05, 0.016973013058304787, -0.02150876447558403, -0.004736095666885376, 0.0031954620499163866, -0.017277533188462257, 0.00536116398870945, 0.017133286222815514, 0.024025065824389458, 0.015770956873893738, -0.04080574959516525, -0.0010788440704345703, 0.018992463126778603, -0.020755477249622345, 0.01897643692791462, -0.0017980734119191766, 0.050037529319524765, -0.0005754836602136493, 0.011699998751282692, -0.05330711975693703, 0.0241693127900362, 0.025227120146155357, 0.025050818920135498, 0.0006461043958552182, -0.026076573878526688, -0.01916876621544361, 0.0003736386715900153, -0.026589449495077133, 0.028945477679371834, -0.023576298728585243, -0.0027446914464235306, 0.02674972452223301, 0.004099006298929453, -0.029378216713666916, -0.019248902797698975, -0.011884314008057117, 0.0006225641700439155, 0.04429972171783447, 0.07000766694545746, 0.01509780716150999, 0.0065912664867937565, 0.015402327291667461, -0.030804654583334923, -0.0022518490441143513, 0.0015436385292559862, -0.016796709969639778, -0.010946711525321007, 0.010329656302928925, 0.05141588672995567, -0.04429972171783447, 0.01670054718852043, 0.025146983563899994, -0.01681273803114891, -0.02783958613872528, -0.009119587950408459, -0.020867669954895973, -0.0036282017827033997, 0.009359999559819698, 0.013639314100146294, -0.008702876046299934, -0.004599862731993198, 0.033529311418533325, -0.0026665579061955214, 0.010345684364438057, -0.024505889043211937, -0.027310682460665703, -0.02356027252972126, 0.00581393763422966, 0.0017870545852929354, 0.0066193146631121635, -0.007821368984878063, 0.03490766882896423, -0.0024882531724870205, -0.020162463188171387, -0.0021336469799280167, -0.015073766000568867, 0.045517805963754654, -0.004684006329625845, -0.0009426111937500536, -0.00825410895049572, -0.005457328166812658, -0.010978765785694122, -0.023416025564074516, -0.015314176678657532, -0.01162787526845932, 0.018896300345659256, 0.01591520383954048, -0.009424109011888504, -0.02343205362558365, 0.0427931472659111, 0.017854519188404083, 0.0026044517289847136, -0.04192766919732094, 0.01054602675139904, 0.018543697893619537, -0.019361093640327454, -0.01627582125365734, 0.011555752716958523, -0.03500383347272873, -0.004792191553860903, -0.028272327035665512, -0.012397190555930138, 0.01472917664796114, -0.0014434673357754946, 0.02259862795472145, -0.013575204648077488, 0.02368849143385887, -0.0011078937677666545, -0.03705533966422081, -0.006915821228176355, -0.016404040157794952, 0.03165410831570625, -0.03929917514324188, 0.007116163615137339, 0.01400794368237257, 0.054204653948545456, 0.026108628138899803, 0.03958766907453537, -0.032631777226924896, -0.0002313955337740481, 0.0013973885215818882, -0.03433068096637726, 0.006815650034695864, 0.0048322598449885845, -0.013366848230361938, 0.021364519372582436, 0.04452410712838173, -0.010473903268575668, -0.01766218990087509, -0.036061640828847885, -0.013935821130871773, 0.027006162330508232, 0.005990239325910807, -0.009207738563418388, -0.00013585721899289638, 0.00834225956350565, 0.022855065762996674, 0.01443266961723566, 0.003483955282717943, -0.02386479265987873, -0.021460682153701782, 0.017421780154109, -0.005393218714743853, -8.683592750458047e-05, -0.01000109501183033, -0.03251958638429642, 0.013871710747480392, -0.02174917608499527, -0.008903218433260918, -0.004159109201282263, -0.015987327322363853, -0.020450957119464874, 0.020338764414191246, 0.014256368391215801, -0.0018030820647254586, -0.020274655893445015, 0.0198258887976408, -0.005449314601719379, -0.0137034235522151, -0.023704517632722855, 0.014088081195950508, 0.014296436682343483, 0.0041991774924099445, 0.018816161900758743, 0.02463410794734955, -0.02513095736503601, 0.02777547761797905, -0.0024201367050409317, -0.006082396488636732, 0.02362438105046749, -0.00273467437364161, -0.021957531571388245, -0.020018218085169792, -0.01494554616510868, 0.05048629641532898, -0.005000547505915165, -0.0017409758875146508, -0.04615889862179756, -0.026733696460723877, -0.031237393617630005, 0.035997532308101654, -0.025387395173311234, -0.02194150537252426, -0.000705706246662885, -0.000528403208591044, -0.003772448282688856, 0.014921505935490131, 0.006839691195636988, 0.02295123040676117, 0.014480751939117908, 0.012974176555871964, -0.019793834537267685, -0.017005067318677902, 0.002508287550881505, 0.0099129443988204, -0.0054413010366261005, 0.02415328472852707, -0.012196848168969154, -0.01674862951040268, -0.021364519372582436, -0.008999383077025414, 0.02915383316576481, -0.005757841747254133, -0.017694244161248207, 0.0009611428831703961, 0.01039376575499773, -0.02242232672870159, 0.02065931260585785, -0.008686848916113377, 0.0031433729454874992, 0.027198491618037224, 0.039908215403556824, -0.012549450621008873, -0.0014244348276406527, 0.006170547567307949, -0.0039247083477675915, -0.029554517939686775, 0.029538489878177643, -0.012012532912194729, 0.007825376465916634, 0.05548684298992157, 0.013454998843371868, -0.010217464528977871, 0.005224931053817272, -0.009095546789467335, -0.031606025993824005, 0.005849999375641346, -0.016476163640618324, -0.01619568280875683, -0.013647327199578285, -0.01145157404243946, 0.019425204023718834, 0.013727464713156223, 0.0023920887615531683, -0.015250067226588726, -0.006050341762602329, -0.03782465308904648, 0.011804177425801754, -0.02325575053691864, -0.009359999559819698, -0.010281573981046677, 0.009416094981133938, 0.04830656945705414, -0.0071722595021128654, -0.027807531878352165, 0.022742874920368195, 0.049075886607170105, 0.019569450989365578, -0.003261575009673834, 0.017453834414482117, -0.008823081851005554, 0.020883696153759956, -0.03240739554166794, -0.005689725745469332, -0.018591778352856636, -0.018591778352856636, 0.011371437460184097, 0.0034338694531470537, 0.0060583557933568954, 0.0037263694684952497, 0.002534331986680627, -0.02397698350250721, -0.012597532942891121, 0.028464654460549355, -0.02114013582468033, -0.003802499733865261, -0.016299862414598465, 0.007729211822152138, 0.025355340912938118, -0.05183259770274162, 0.02844862826168537, -0.014536848291754723, -0.01484938245266676, -0.01825520396232605, 0.008518560789525509, 0.013903765939176083, -0.01518595777451992, 0.011940409429371357, 0.010409793816506863, 0.02692602574825287, 0.01844753324985504, -0.013759518973529339, 0.006014280486851931, -0.03157396987080574, -0.0013623286504298449, 0.0072363694198429585, 0.006098424084484577, 0.0022458387538790703, 0.02602849155664444, -0.020162463188171387, -0.021220272406935692, 0.007404657080769539, -0.01400794368237257, 0.02386479265987873, -0.026797804981470108, -0.005369177553802729, 0.012092670425772667, -0.005910102277994156, 0.0022899142932146788, -0.0022638696245849133, 0.008101848885416985, 0.01418424490839243, -0.018303286284208298, -0.05183259770274162, -0.03301643580198288, 0.011219177395105362, -0.028528764843940735, -0.006006266456097364, 0.014921505935490131, -0.00653517059981823, 0.0023359928745776415, -0.033465202897787094, 0.007116163615137339], "index": 15}, {"title": "August Penguin", "text": "August Penguin is an annual gathering (since 2002) of the Israeli Free Software community, organized by Hamakor. The conference is held on the first Friday in August (hence its name), usually in the Tel Aviv area. It lasts one day and includes technical talks, projects' status updates, social meetings and followed by a keysigning party.During the conference, the winner of Hamakor Prize for free software-related achievements is announced.", "vector": [-0.046535201370716095, 0.022717414423823357, -0.021049104630947113, -0.0025867680087685585, -0.028041807934641838, 0.03436008840799332, -0.030845988541841507, 0.042240191251039505, 0.005089233163744211, 0.042701639235019684, -0.023551568388938904, -0.08597121387720108, 0.016434628516435623, 0.010764149948954582, -0.03409386798739433, -0.009903372265398502, -0.021066851913928986, -0.01883060671389103, 0.02085387520492077, -0.01477519329637289, 0.022628674283623695, 0.03608164191246033, -0.0627213567495346, 0.015059160999953747, 0.018076317384839058, 0.001227938337251544, 0.051291659474372864, -0.0014808470150455832, 0.0054086968302726746, 0.028574246913194656, 0.04078485816717148, 0.0055107478983700275, 0.06673240661621094, -0.007316604722291231, -0.01468645315617323, -0.033579178154468536, 0.012166240252554417, 0.042098209261894226, -0.021137842908501625, -0.00961053092032671, -0.03189311921596527, 0.0032434433232992887, -0.038797084242105484, -0.0005740362103097141, -0.05565766245126724, -0.0002394590701442212, -0.03331295773386955, -0.032620787620544434, -0.03425360098481178, 0.010879511944949627, 0.021049104630947113, 0.05853283777832985, 0.023036876693367958, 0.04465391859412193, -0.0034675116185098886, 0.0005634983535856009, 0.014180636033415794, 0.03579767420887947, 0.03915204480290413, -0.04089134559035301, -0.018040820956230164, -0.0038868074771016836, -0.0180496945977211, -0.02328534983098507, 0.03618812933564186, 0.0015352002810686827, -0.03602840006351471, 0.04291461408138275, 0.01690495014190674, 0.04369552433490753, 0.009752514772117138, -0.025592586025595665, 0.00992999505251646, 0.049197398126125336, 0.05597712844610214, -0.04834549501538277, 0.04823900759220123, 0.0019522777292877436, -0.03148491680622101, 0.004805265460163355, 0.018564386293292046, -0.012556695379316807, 0.006797476205974817, -0.032691776752471924, 0.022788405418395996, -0.024332480505108833, 0.00010898368782363832, -0.08511930704116821, 0.011598304845392704, 0.001750394469127059, 0.001897924579679966, -0.03214159235358238, -0.03979096934199333, -0.0012124088825657964, -0.0019445130601525307, 0.03173338621854782, 0.00222737155854702, -0.028787223622202873, 0.004854072351008654, 0.00015002589498180896, -0.06914612650871277, -0.027402879670262337, 0.001524107763543725, -0.022096235305070877, -0.0023737922310829163, 0.0536343939602375, 0.00867876224219799, 0.002904013264924288, -0.012219483964145184, 0.025805562734603882, 0.02335634082555771, 0.010835141874849796, 0.0023582628928124905, 0.02907119132578373, -0.04507986828684807, 0.04525734856724739, 0.013337606564164162, -0.027864327654242516, -0.03663183003664017, 0.05214356258511543, -0.01027608010917902, -0.04011043533682823, 0.036702822893857956, -0.020694144070148468, -0.014340367168188095, -0.02994084171950817, -0.02046342007815838, 0.021457307040691376, 0.04593177139759064, -0.03331295773386955, -0.015511734411120415, -0.012831789441406727, 0.027314141392707825, -0.02392427623271942, 0.0367383174598217, -0.02429698407649994, 0.010160718113183975, 0.01867087371647358, 0.0055329324677586555, 0.02321435697376728, 0.03798067569732666, -0.020889371633529663, -0.030508777126669884, -0.008629955351352692, -0.023817788809537888, 0.002307237358763814, -0.04681916907429695, -2.7644558940664865e-05, -0.03352593258023262, 0.012556695379316807, 0.013807928189635277, -0.03617038205265999, 0.04135279357433319, -0.0035385035444051027, 0.039187539368867874, -0.007458588574081659, -0.033099982887506485, 0.0014209476066753268, 0.0018003106815740466, 0.026923684403300285, -0.01090613380074501, -0.018724119290709496, 0.06964307278394699, 0.044866893440485, 0.00814188551157713, 0.0006039859144948423, -0.05725498124957085, -0.10066653788089752, 0.0033277461770921946, 0.02539735846221447, 0.002633356489241123, -0.02468743920326233, -0.00925557129085064, -0.037093278020620346, -0.03565569221973419, 0.00438596960157156, -0.015068034641444683, 0.01802307367324829, -0.05512522533535957, 0.037945181131362915, 0.005080359056591988, 0.0370577797293663, 0.016745219007134438, 0.033419445157051086, 0.00660668546333909, 0.012290475890040398, 0.04980083182454109, -0.03579767420887947, -0.025219878181815147, -0.03256754204630852, -0.0015562759945169091, 0.00996549054980278, 0.06414119899272919, 0.005306645762175322, 0.05619010329246521, 0.009237823076546192, 0.018883850425481796, 0.03961348906159401, -0.03256754204630852, 0.00282414723187685, -0.0022495563607662916, -0.013550582341849804, -0.030615264549851418, 0.031076712533831596, 0.017898837104439735, 0.051078684628009796, 0.05473477020859718, 0.02383553609251976, 0.059278253465890884, -0.03313547745347023, 0.00208095065318048, -0.04689016193151474, -0.033028990030288696, 0.07113390415906906, 0.019984224811196327, -0.02610727772116661, 0.026834946125745773, -0.006535693537443876, -0.0023693551775068045, 0.025663578882813454, -0.0012445771135389805, -0.011225597001612186, -0.010267206467688084, -0.003309998195618391, 0.02158154360949993, -0.05359889939427376, 0.033011242747306824, -0.04667718708515167, 0.015848945826292038, 0.03267402946949005, -0.05512522533535957, -0.0533149316906929, -0.005311083048582077, -0.0243857242166996, 0.00529333483427763, 0.006433642469346523, -0.021084599196910858, 0.011358707211911678, 0.00662443321198225, 0.00957503542304039, 0.018102940171957016, -0.021049104630947113, -0.035282984375953674, -0.04025241732597351, 0.011633800342679024, 0.012308224104344845, 0.003019375028088689, 0.030650760978460312, -0.0679747611284256, 0.02328534983098507, 0.02703017368912697, 0.01738414540886879, -0.03386314585804939, 0.006997141055762768, -0.011811280623078346, 0.053811874240636826, -0.008434727787971497, 0.013665944337844849, 0.0027043484151363373, 0.01160717848688364, -0.02578781358897686, 0.047387104481458664, -0.011181226931512356, 0.011784658767282963, -0.027491619810461998, -0.026160521432757378, -0.014091895893216133, 0.022238219156861305, -0.006446953397244215, -0.0022828339133411646, 0.015094656497240067, 0.01738414540886879, 0.04103332757949829, -0.021759023889899254, 0.015174522995948792, 0.02624926157295704, -0.02156379446387291, 0.02335634082555771, -0.013594952411949635, -0.021049104630947113, -0.06744232028722763, -0.023693552240729332, -0.04071386530995369, -0.00738315936177969, 0.04547032341361046, 0.021634787321090698, -0.03152041137218475, -0.006668803282082081, 0.008079768158495426, -0.05012029409408569, -0.015671465545892715, 0.013816801831126213, 0.025610335171222687, 0.02720765210688114, -0.016203904524445534, -0.019824493676424026, 0.007400907576084137, 0.024953659623861313, -0.015582726337015629, 0.014287123456597328, -5.806223634863272e-05, 0.0360993891954422, -0.07170183956623077, -0.011119109578430653, 0.04383751004934311, -0.011642674915492535, -0.0487714484333992, 0.04657069966197014, -0.011367580853402615, -0.026763953268527985, 0.06229540705680847, -0.04586077854037285, -0.0178899634629488, -0.03954249992966652, -0.012716427445411682, -0.037554726004600525, -0.0040997834876179695, -0.01724216155707836, 0.022220470011234283, -0.01867087371647358, 0.017685862258076668, -0.00929994136095047, -0.05377637967467308, 0.030118321999907494, 0.036152634769678116, -0.017508381977677345, 0.016975942999124527, -0.0393650196492672, -0.0009533992852084339, -0.021049104630947113, -0.04280812665820122, -0.005763656459748745, 0.02314336597919464, 0.046215739101171494, 0.06751331686973572, -0.023640308529138565, -0.011474069207906723, 0.03031354956328869, 0.01828041858971119, 0.034271348267793655, 0.010852889157831669, 0.0006866249605081975, 0.08362848311662674, 0.011332085356116295, -0.025823310017585754, 0.0002441733668092638, 0.0177923496812582, -0.01473082322627306, 0.02882271818816662, -0.001486393273808062, 0.001151400152593851, -0.003527411026880145, 0.07014001905918121, 0.019593769684433937, 0.04642871394753456, -0.0029461646918207407, 0.0481325201690197, -0.056864526122808456, 0.007214553654193878, 0.0308814849704504, 0.026710709556937218, -0.03464405611157417, 0.05913626775145531, 0.0178899634629488, 0.018777363002300262, -0.011234471574425697, 0.05246302857995033, 0.016780715435743332, 0.010213962756097317, 0.020534412935376167, -0.07709722220897675, 0.05065273493528366, -0.022859398275613785, -0.050439756363630295, 0.03345494344830513, -0.02165253460407257, -0.016913823783397675, 0.0009606094099581242, -0.009770262986421585, -0.039436012506484985, -0.024350227788090706, 0.015156774781644344, 0.007511832285672426, 0.05015578866004944, 0.09051469713449478, 0.007205679547041655, 0.02845001220703125, 0.002571238437667489, 0.008328239433467388, -0.03483928367495537, -0.037235260009765625, 0.027757840231060982, 0.009761388413608074, 0.0336679182946682, -0.02266417071223259, -0.04042989760637283, 0.03389864042401314, 0.019647013396024704, 0.011474069207906723, -0.015769079327583313, 0.014233879745006561, -0.018546639010310173, 0.006056498270481825, 0.02665746584534645, 0.017605995759367943, 0.00929994136095047, -0.03634786233305931, -0.055302705615758896, -0.004831887315958738, -0.00558617664501071, -0.015023664571344852, -0.03469730168581009, -0.024261487647891045, 0.01875961385667324, 0.0024691876024007797, 0.02727864496409893, -0.05963321030139923, 0.03017156571149826, -0.0009267773129977286, -0.031165452674031258, 0.03400512784719467, -0.01899033784866333, -0.029124435037374496, -0.001708243042230606, 0.0016516713658347726, 0.0028330213390290737, 0.042240191251039505, 0.011349832639098167, -0.0022761784493923187, 0.0016494528390467167, 0.003491915063932538, 0.0071125030517578125, -0.0031125519890338182, -0.012698679231107235, 0.027491619810461998, -0.02461644820868969, -0.07525143027305603, 0.015955433249473572, 0.02220272272825241, -0.023196609690785408, -0.020498916506767273, -0.015201144851744175, -0.01761486940085888, -0.043802015483379364, -0.014863932505249977, -0.08029185980558395, -0.06715835630893707, -0.020818380638957024, 0.045612309128046036, 0.02007296495139599, 0.02798856422305107, -0.00854121521115303, -0.02820153906941414, -0.018848353996872902, 0.04795503988862038, -0.009504043497145176, -0.0001365762436762452, 0.013257740996778011, 0.006424768827855587, 0.01719779148697853, 0.020747387781739235, 0.025060147047042847, 0.06651942431926727, -0.04532834142446518, 0.020339185371994972, 0.0037514790892601013, 0.028503255918622017, -0.02750936895608902, 0.010187339968979359, 0.013373102992773056, -0.006331591866910458, -0.006256162654608488, -0.015760205686092377, 0.02681719698011875, -0.005568428430706263, -0.023888779804110527, -0.006930585950613022, -0.012796293012797832, -0.02142181061208248, -0.008847367949783802, 0.008550088852643967, -0.013160127215087414, -0.013736936263740063, -0.03150266408920288, -0.010222836397588253, -0.004084253683686256, -0.02000197395682335, -0.044866893440485, -0.018653126433491707, 0.04397949203848839, 0.032478801906108856, 0.0533149316906929, 0.02734963595867157, -0.032159339636564255, -0.005217906087636948, 0.012840663082897663, -0.019203314557671547, -0.02220272272825241, 0.002928416710346937, 0.003531847847625613, -0.04632222652435303, -0.014393611811101437, 0.006677677389234304, 0.020285941660404205, 0.006375961471349001, -0.05228554829955101, -0.047884050756692886, 0.014553342945873737, 0.025113390758633614, -0.01938079297542572, 0.0004905652604065835, 0.04745809733867645, -0.032159339636564255, -0.023267600685358047, 0.0015784609131515026, 0.019363045692443848, 0.008629955351352692, 0.02491816319525242, 0.005612798500806093, -0.001560712931677699, 0.01156280841678381, -0.012317097745835781, -0.010489055886864662, -0.0025557090993970633, 0.028343522921204567, -0.03201735392212868, -0.04571879655122757, 0.005351015832275152, 0.00320351030677557, -0.050901204347610474, -0.026231514289975166, -0.005674916319549084, -0.013355354778468609, 0.028804970905184746, 0.010329323820769787, 0.023658057674765587, -0.010311576537787914, 0.03336620330810547, 0.02546835131943226, -0.03783869370818138, -0.06676790118217468, 0.0054974365048110485, -0.024598699063062668, 0.06751331686973572, -0.022397950291633606, -0.016665352508425713, 0.02774009294807911, 0.02672845683991909, 0.022380203008651733, -0.003500788938254118, -0.04859396815299988, 0.025432854890823364, -0.03620588034391403, 0.007023762911558151, -0.03079274483025074, 0.02688818983733654, -0.043269574642181396, 0.04025241732597351, 0.003385427175089717, -0.036383356899023056, 0.0412818007171154, -0.005240091122686863, 0.06101755425333977, 0.0006855156971141696, -0.03581542149186134, -0.018812857568264008, 0.04767107218503952, 0.032461054623126984, -0.012654309161007404, -0.008785249665379524, 0.01641688123345375, 0.017801223322749138, -0.0025157760828733444, 0.019948728382587433, 0.010702031664550304, -0.008408105000853539, -0.0141451396048069, 0.01977124996483326, 0.009894498623907566, -0.03986196219921112, 0.006806350313127041, 0.020179452374577522, -0.011136856861412525, 0.012973773293197155, 0.028148295357823372, 0.001048239995725453, 0.0019533869344741106, -0.008381483145058155, -0.06183396279811859, -0.032194834202528, 0.006216229870915413, 0.018014200031757355, 0.00662443321198225, 0.029479393735527992, -0.02493591234087944, -0.008119700476527214, -0.013373102992773056, -0.0011281059123575687, 0.01059554424136877, -0.035442713648080826, 0.006362650543451309, 0.000334993121214211, 0.0007121376693248749, 0.00937980692833662, -0.048274505883455276, 0.0021364130079746246, 0.006220666691660881, -0.013532834127545357, 0.004354910459369421, -0.046464212238788605, -0.0013433002168312669, -0.0019145633559674025, 0.009601657278835773, 0.041920728981494904, -0.02314336597919464, -0.004201834090054035, 0.030065078288316727, 0.01922106184065342, -0.026781700551509857, -0.018937094137072563, -0.0009173487196676433, -0.006566752679646015, 0.022948138415813446, -0.011110235005617142, 0.0168339591473341, 0.013852298259735107, 0.006100867874920368, -0.011855650693178177, 0.02337408997118473, -0.016567738726735115, -0.026462238281965256, 9.532606054563075e-05, -0.008811871521174908, 0.0333484522998333, 0.04465391859412193, -0.010515677742660046, 0.03597515448927879, -0.018848353996872902, -0.005067048128694296, -0.038264643400907516, -0.04994281381368637, 0.016106290742754936, -0.021386316046118736, 0.010160718113183975, -0.013071387074887753, -0.028804970905184746, 0.02220272272825241, -0.01375468447804451, 0.033011242747306824, -0.015928812325000763, -0.032709527760744095, -0.036773812025785446, 0.012672057375311852, 0.004232893232256174, 0.01050680410116911, -0.0002823038084898144, 0.0007126923301257193, -0.029656874015927315, -0.011651548556983471, 0.041991718113422394, -0.0396844819188118, -0.04078485816717148, -0.025273123756051064, -0.005839085206389427, -0.013373102992773056, -0.03503451123833656, -0.036844804883003235, -0.030278053134679794, -0.002702130004763603, -0.034892529249191284, 0.01196213811635971, 0.009832380339503288, -0.010639913380146027, -0.005257838871330023, -0.02337408997118473, 0.0012956025311723351, -0.04007493704557419, -0.004368221387267113, -0.001297821057960391, 0.005262276157736778, 0.059207260608673096, -0.006926149129867554, -0.030597517266869545, -0.018564386293292046, -0.05086570978164673, -0.009051470085978508, -0.01285841129720211, 0.021066851913928986, -0.01962926611304283, -0.02711891382932663, -0.009433051571249962, -0.004836324602365494, -0.04018142446875572, 0.0050759222358465195, 0.015609348192811012, 0.024101756513118744, -0.013053638860583305, 0.025663578882813454, -0.013781306333839893, -0.0487714484333992, -0.01954052597284317, 0.0261782705783844, -0.010063104331493378, 0.008248373866081238, -0.025361862033605576, 4.634579818230122e-05, -0.014899428933858871, 0.008754190988838673, -0.01157168298959732, -0.006806350313127041, -0.02158154360949993, 0.01410076953470707, -0.005657168570905924, -0.015627095475792885, -0.04795503988862038, 0.015281010419130325, 0.018351411446928978, 0.01685170643031597, -0.002562364563345909, -0.006429205648601055, 0.02335634082555771, -0.0007337680435739458, -0.044263459742069244, -0.06215342506766319, -0.017091304063796997, 0.013053638860583305, -0.0032146028243005276, 0.0018424621084704995, 0.02971011772751808, 0.009459673427045345, -0.045221854001283646, 0.009424176998436451, 0.023178860545158386, 0.016390258446335793, 0.0012911654775962234, -0.0070104519836604595, -0.033561430871486664, 0.03702228516340256, 0.04969434440135956, -0.03437783569097519, 0.017206666991114616, -0.019948728382587433, 0.022131729871034622, -0.003270065179094672, 0.004115312825888395, -0.023817788809537888, 0.014659831300377846, 0.013550582341849804, -0.009486295282840729, 0.00881630927324295, -0.03409386798739433, -0.03375665843486786, 0.020747387781739235, -0.013355354778468609, 0.02500690333545208, -0.0068374089896678925, 0.012822914868593216, -0.017783476039767265, -0.0011624926701188087, 0.0029683494940400124, -0.0355846993625164, -0.020729640498757362, -0.02140406332910061, 0.02882271818816662, -0.024740682914853096, 0.06651942431926727, -0.007392033468931913, 0.002983879065141082, -0.013683692552149296, 0.030420036986470222, 0.000557952094823122, -0.03570893406867981, 0.012618813663721085, 0.013745809905230999, 0.026125026866793633, -0.006708736531436443, -0.014704201370477676, -0.006353776901960373, -0.005319956690073013, -0.009175705723464489, -0.03386314585804939, 0.022096235305070877, -0.040678370743989944, -0.009237823076546192, -0.007325478829443455, -0.030508777126669884, 0.049587856978178024, 0.01761486940085888, -0.0034475449938327074, 0.01535200234502554, -0.00662443321198225, -0.020658647641539574, 0.046606194227933884, -0.024421220645308495, 0.011979886330664158, 0.006948334164917469, 0.041991718113422394, 0.008390357717871666, 0.026444489136338234, -0.02836127206683159, 0.01293827686458826, -0.004432558082044125, 0.01701143942773342, -0.013071387074887753, -0.022167226299643517, -0.013807928189635277, -0.025574838742613792, -0.025805562734603882, -0.018156183883547783, 0.040358904749155045, -0.00674423249438405, -0.010160718113183975, 0.031449418514966965, 0.038016173988580704, -0.03634786233305931, -0.03593965992331505, -0.023249853402376175, -0.016390258446335793, -0.03109445981681347, -0.013692566193640232, -0.021688031032681465, 0.0014009810984134674, -0.0037736641243100166, -0.010027608834207058, 0.05807138979434967, 0.03688030317425728, 0.019505029544234276, 0.03308223560452461, -0.026373498141765594, 0.027260897681117058, -0.02626701071858406, -0.04767107218503952, -0.04082035273313522, 0.002411506837233901, -0.005368764046579599, 0.030136069282889366, 0.016727471724152565, 0.016940446570515633, -0.0002433414338156581, 0.05246302857995033, -0.008212877437472343, 0.0002978332922793925, 0.05807138979434967, -0.03819365054368973, -0.0159376859664917, -0.002606734400615096, -0.03281601518392563, -0.048097025603055954, 0.007081443909555674, 0.0093443114310503, 0.04046539217233658, -0.005626109428703785, 0.002344951732084155, -0.019238809123635292, -0.02578781358897686, -0.0282902792096138, -0.005142476875334978, -0.0037514790892601013, -0.014837310649454594, -0.003755916142836213, 0.003394301049411297, -0.021865511313080788, -0.03281601518392563, -0.026000790297985077, -0.004297229461371899, -0.014704201370477676, 0.010391442105174065, -0.04603825882077217, 0.001153618679381907, -0.03134293109178543, 0.006926149129867554, 0.042169198393821716, 0.041210807859897614, 0.02736738510429859, 0.010560047812759876, -0.007174620870500803, 0.0073387897573411465, 0.0018003106815740466, 0.016869455575942993, -0.007023762911558151, -0.020445672795176506, 0.002342733321711421, 0.008878426626324654, -0.02241569757461548, 0.03595740720629692, -0.029035694897174835, 0.015263262204825878, 0.01946953311562538, -0.0396844819188118, 0.010205088183283806, 0.008536778390407562, 0.00595888402312994, -0.06666141003370285, 0.0022894893772900105, 0.000965046405326575, 0.027012424543499947, -0.026373498141765594, -0.010142970830202103, -0.06350227445363998, -0.019327549263834953, 0.003245661733672023, 0.023303097113966942, 0.05917176604270935, -0.00640702061355114, -0.020445672795176506, -0.0021020262502133846, 0.0064513906836509705, -0.021120095625519753, -0.0017370835412293673, -0.015564978122711182, -0.0093443114310503, 0.022255966439843178, -0.03444882854819298, -0.02397751994431019, -0.012450207956135273, -0.009663774631917477, -0.01125221885740757, -0.018617630004882812, -0.008088641799986362, -0.016337014734745026, 0.006446953397244215, 0.028432263061404228, 0.006118616089224815, 0.01625715009868145, -0.0020632026717066765, -0.031005719676613808, 0.010293828323483467, 0.03925853222608566, 0.02507789433002472, 0.021315323188900948, 0.01531650684773922, 0.04507986828684807, 0.04018142446875572, 0.03313547745347023, -0.03688030317425728, 0.033951885998249054, 0.004226237535476685, 0.007893414236605167, 0.005444192793220282, 0.005577302537858486, -0.0007143561961129308, 0.013319858349859715, 0.002083169063553214, -0.01071090530604124, 0.014020903967320919, -0.02976336143910885, -0.01582232303917408, -0.013701439835131168, -0.006966081913560629, -0.005750345531851053, 0.011598304845392704, -0.023001382127404213, 0.0064203315414488316, 0.01019621454179287, 0.0006771963671781123, 0.02001972123980522, -0.0370577797293663, -0.012308224104344845, 0.02734963595867157, 0.03306448459625244, -0.010835141874849796, 0.020179452374577522, -0.009291067719459534, 0.007835732772946358, -0.01657661236822605, -0.017330901697278023, -0.024261487647891045, 0.007906724698841572, -0.03790968284010887, 0.008887301199138165, 0.010302701964974403, -0.004110876005142927, 0.024509960785508156, 0.006047624163329601, 0.036702822893857956, -0.03420035541057587, -0.01579570211470127, 0.007006015162914991, -0.005697101354598999, -0.0016616545617580414, -0.009903372265398502, -0.023267600685358047, -0.01090613380074501, -0.0001421224878868088, -0.0299230944365263, -0.013665944337844849, -0.005994379986077547, 0.018102940171957016, 0.002793088322505355, 0.03288700804114342, 0.005750345531851053, 0.004787517711520195, 0.033170975744724274, -0.015298758633434772, 0.036383356899023056, 0.04649970680475235, -0.007130250800400972, 0.006859594024717808, 0.01191776804625988, -0.013035890646278858, 0.0063493396155536175, -0.0007814657292328775, 0.043731022626161575, 0.01187339797616005, 0.03540721908211708, 0.06268586218357086, -0.0016904950607568026, 0.033330705016851425, 0.00312586291693151, 0.005195721052587032, 0.02798856422305107, 0.03063301369547844, 0.019167818129062653, -0.03320647031068802, 0.05682903155684471, 0.009149083867669106, 0.01391441561281681, -0.02103135548532009, -0.008749754168093204, 0.003840218996629119, -0.025805562734603882, 0.011491816490888596, -0.015254388563334942, -0.021528299897909164, -0.01641688123345375, 0.022397950291633606, 0.01930980198085308, 0.009362059645354748, 0.02876947447657585, -0.007139124907553196, -0.006495760753750801, 0.014872807078063488, 0.024563204497098923, 0.011127983219921589, -0.014304871670901775, -0.0016095199389383197, -0.006690988317131996, 0.008274995721876621, 0.007037073839455843, 0.014721949584782124, -0.00527558708563447, -0.009184579364955425, -0.012095248326659203, 0.015005916357040405, -0.032798267900943756, -0.016097417101264, -0.0009129117242991924, -0.007179057691246271, 0.00594113627448678, 0.011083613149821758, -0.03393413871526718, -0.03579767420887947, 0.0064868866465985775, -0.005705975461751223, -0.04330506920814514, 0.004578978754580021, -0.014642083086073399, -0.015990929678082466, 0.017801223322749138, 0.006464701611548662, 0.0007121376693248749, -0.0052001578733325005, 0.00646913843229413, 0.0011458538938313723, -0.015210018493235111, -0.01747288554906845, -0.009628279134631157, 0.02836127206683159, -0.008785249665379524, 0.009308815002441406, -0.014003155753016472, -0.02758035995066166, 0.01410964410752058, 0.007161309942603111, 0.018883850425481796, -0.016478998586535454, -0.03492802381515503, -0.025450602173805237, -0.0017293187556788325, 0.0005304982187226415, -0.012796293012797832, 0.013497338630259037, 0.00437931390479207, 0.018617630004882812, 0.005612798500806093, -0.004632222466170788, -0.021084599196910858, 0.004618911538273096, 0.024953659623861313, -0.03214159235358238, -0.01687832921743393, 0.017055807635188103, -0.0010881730122491717, 0.019238809123635292, -0.03203510493040085, 0.01227272767573595, -0.036702822893857956, 0.012618813663721085, -0.028591996058821678, 0.021350819617509842, -0.0352652370929718, -0.01117235329002142, -0.013319858349859715, 0.005018241237848997, -0.012902781367301941, 0.007494084537029266, -0.004991619382053614, 0.045363835990428925, 0.0013543927343562245, 0.0049383752048015594, 0.0057370346039533615, 0.028964702039957047, -0.015156774781644344, -0.0027553739491850138, -4.204746073810384e-05, 0.0007920035859569907, 0.026604222133755684, -0.010329323820769787, 0.03127194195985794, 0.005102544091641903, -0.008243936114013195, -0.0053377049043774605, 0.016567738726735115, 0.023782292380928993, 0.0006483558681793511, 0.035904161632061005, -0.023959772661328316, -0.021368566900491714, 0.005262276157736778, -0.008115263655781746, 0.012485703453421593, -0.006398146506398916, -0.010994873009622097, -0.04259515181183815, 0.00881630927324295, -0.007613883353769779, -0.022167226299643517, -0.007702623028308153, -0.006473575718700886, -0.0390455536544323, -0.051291659474372864, 0.014278249815106392, -0.014828437007963657, 0.0026688524521887302, 0.00304821552708745, -0.015298758633434772, -0.005559554789215326, 0.029798857867717743, 0.0030326859559863806, 0.006850719917565584, 0.007165746763348579, 0.01120784878730774, 0.03432459384202957, 0.022380203008651733, 0.021279826760292053, -0.015769079327583313, -0.004261733498424292, -0.03625912219285965, 0.016177283599972725, 0.025699075311422348, -0.022948138415813446, -0.017135674133896828, 0.02062315307557583, -0.019238809123635292, -0.022096235305070877, 0.0001421224878868088, 0.02314336597919464, -0.023817788809537888, 0.036152634769678116, 0.03773220628499985, -0.00020368579134810716, -0.031538158655166626, 0.0055329324677586555, -0.027385132387280464, 0.0026577599346637726, 0.006859594024717808, -0.017641492187976837, 0.0269769299775362, 0.019913233816623688, 0.01970025710761547, 0.021865511313080788, 0.03178663179278374, -0.014863932505249977, -0.023871032521128654, -0.009362059645354748, -0.015147900208830833, -0.0014165106695145369, -0.024669691920280457, 0.017508381977677345, 0.018724119290709496, -0.010737528093159199, 0.008252810686826706, 0.007125813979655504, 0.036454349756240845, -0.016958193853497505, -0.009646027348935604, -0.023161113262176514, 0.028698483482003212, 0.024651944637298584, 0.027935320511460304, -0.01852888986468315, 0.019363045692443848, 0.019274305552244186, 0.007396470755338669, -0.02477617934346199, -0.030295800417661667, -0.013417473062872887, 0.05164662003517151, 0.006983830127865076, 0.00023127836175262928, -0.009867876768112183, 3.334679058752954e-05, 0.0013477371539920568, 0.021794518455863, 0.005106981378048658, -0.025184383615851402, -0.0022207158617675304, -0.007179057691246271, -0.03652534261345863, -0.005106981378048658, -0.002759810769930482, 0.026692962273955345, -0.009521790780127048, -0.02273516170680523, -0.037483733147382736, -0.006753106135874987, 0.055764153599739075, 0.007525143213570118, 0.038477618247270584, -0.015174522995948792, -0.02484717220067978, -0.02782883122563362, 0.010852889157831669, 0.0018502268940210342, 0.004996056202799082, -0.005053737200796604, -0.012121870182454586, 0.0010105256224051118, -0.03581542149186134, -0.010107474401593208, 0.020889371633529663, -0.000744305900298059, 0.019274305552244186, 0.02023269608616829, 0.0089449817314744, 0.01731315441429615, 0.012618813663721085, -0.025752319023013115, -0.01641688123345375, -0.0003416486142668873, 0.02087162435054779, 0.013009268790483475, -0.029639126732945442, -0.016097417101264, -0.03940051421523094, 0.023249853402376175, 0.03070400469005108, 0.000706591468770057, 0.0300828255712986, 0.012672057375311852, -0.016700848937034607, 0.009850128553807735, -0.0036982353776693344, 0.01543186791241169, 0.0364188551902771, 0.0008901720866560936, -0.03444882854819298, 0.013541708700358868, 0.015653718262910843, -0.014473477378487587, 0.0013277707621455193, 0.035282984375953674, 0.01899033784866333, 0.012769671157002449, -0.008598895743489265, 0.018724119290709496, -0.0007276671822182834, -0.029337409883737564, 0.0168339591473341, -0.02305462583899498, 0.035602446645498276, 0.006682114209979773, -0.019345298409461975, 0.008856241591274738, 0.009202327579259872, -0.022326959297060966, 0.025113390758633614, 0.02663971669971943, -0.019718006253242493, -0.008257247507572174, -0.026373498141765594, 0.025894302874803543, -0.005195721052587032, -0.011864524334669113, 0.01793433353304863, -0.010391442105174065, -0.003097022417932749, -0.001344409422017634, -0.03922303393483162, 0.02195425145328045, -0.004867383278906345, 0.021705778315663338, -0.020108461380004883, -0.003966673277318478, -0.004911753349006176, 0.010222836397588253, -0.008297180756926537, -0.004836324602365494, 0.029053442180156708, 0.02431473135948181, -0.009752514772117138, -0.021208835765719414, -0.023888779804110527, 0.008514593355357647, -0.019558273255825043, 0.026000790297985077, 0.04195622354745865, -0.06424768269062042, -0.014828437007963657, -0.019114574417471886, -0.005129165947437286, -0.007019326090812683, -0.010027608834207058, 0.018191678449511528, 0.01690495014190674, 0.004195178858935833, -0.01749950833618641, -0.0263380017131567, 0.008199566975235939, 0.0035850917920470238, 0.01071090530604124, 0.008785249665379524, 0.01669197529554367, 0.012281602248549461, -0.04593177139759064, -0.02601853758096695, 0.01836915872991085, 0.008887301199138165, -0.015689214691519737, -0.03063301369547844, -0.006806350313127041, -0.039577994495630264, -0.000306984584312886, 0.06584500521421432, 0.018848353996872902, -0.0032611913047730923, 0.02431473135948181, -0.015848945826292038, 0.0030948040075600147, -0.02062315307557583, -0.019664760679006577, 0.014970420859754086, 0.01962926611304283, -0.018493395298719406, 0.006810787133872509, 0.05704200640320778, 0.025184383615851402, 0.030544273555278778, 0.023267600685358047, 0.05047525465488434, 0.026852693408727646, -0.04742260277271271, 0.01579570211470127, -0.02158154360949993, 0.019647013396024704, 0.00018358066154178232, 0.027633603662252426, -0.0367383174598217, 0.004703214392066002, -0.004836324602365494, -0.0006361541454680264, 0.01586669310927391, -0.0008835166227072477, 0.018866103142499924, 0.003498570527881384, -0.012707553803920746, 0.001226829132065177, 0.023107869550585747, 0.042701639235019684, 0.006997141055762768, 0.018777363002300262, 0.0017404112732037902, 0.005395385902374983, 0.011048117652535439, 0.017561625689268112, 0.012254980392754078, 0.014198383316397667, 0.007059258874505758, -0.0015363094862550497, 0.004916190169751644, -0.005053737200796604, -0.01899033784866333, -0.014127391390502453, -0.008146322332322598, 0.014313745312392712, 0.005506310611963272, 0.01586669310927391, 0.041459280997514725, -0.01383455004543066, 0.015050286427140236, 0.003380990121513605, -0.024722935631871223, 0.024563204497098923, 0.005319956690073013, 0.021279826760292053, 0.01222835760563612, -0.018156183883547783, -0.004654407501220703, -0.012654309161007404, 0.005719286389648914, 0.01701143942773342, 0.014402485452592373, 0.0005928934551775455, 0.013266614638268948, -0.022770658135414124, 0.026941433548927307, -0.038477618247270584, 0.03666732460260391, -0.018724119290709496, 0.016434628516435623, -0.022788405418395996, -0.031076712533831596, -0.01907907798886299, 0.002611171454191208, 0.02955038659274578, 0.03033129684627056, 0.0011403076350688934, 0.017872216179966927, -0.011456320993602276, 0.014020903967320919, -0.020303688943386078, -0.0014753007562831044, 0.053563401103019714, -0.029053442180156708, -0.017366398125886917, -0.02110234834253788, -0.04635772109031677, 0.0015784609131515026, -0.02158154360949993, -0.04344705492258072, 0.009450798854231834, -0.018848353996872902, -0.016514495015144348, 0.012130743823945522, 0.0060964310541749, 0.0005851287278346717, -0.04429895803332329, -0.01812068745493889, 0.029426150023937225, 0.0007842388586141169, -0.0034453265834599733, -0.005466377828270197, 0.006265036761760712, -0.01598205603659153, 0.010852889157831669, 0.01786334067583084, -0.03281601518392563, -0.014739696867763996, 0.005688227713108063, 0.02914218232035637, -0.00527558708563447, -0.012867284938693047, 0.04082035273313522, -0.011048117652535439, 0.020356932654976845, 0.014198383316397667, 0.033011242747306824, 0.0017947644228115678, 0.011926642619073391, 0.01277854572981596, -0.017481759190559387, -0.002935072174295783, 0.03267402946949005, 0.017650365829467773, 0.0009916683193296194, -0.002462532138451934, -0.015218892134726048, -0.01148294284939766, -0.025503845885396004, -0.01117235329002142, -0.04167225584387779, -0.004035446792840958, -0.01253894716501236, 0.009264444932341576, 0.008448038250207901, -0.008612207137048244, 0.003416486084461212, -0.0010010970290750265, -0.0064868866465985775, 0.022220470011234283, 0.027544863522052765, 0.0403234101831913, 0.002779777394607663, -0.01589331589639187, -0.02931966260075569, -0.01812068745493889, -0.0006461373995989561, -0.030029581859707832, 0.025361862033605576, -0.0007714824751019478, 0.004419247154146433, -0.043340567499399185, 0.0044835833832621574, 0.005164661910384893, 0.010533425956964493, 0.008390357717871666, 0.0640702098608017, 0.0004816912696696818, -0.000611750700045377, 0.015289884060621262, -0.0002527700562495738, -0.016798462718725204, -0.002717659343034029, -0.021244332194328308, 0.021759023889899254, 0.019487282261252403, -0.009246697649359703, 0.027935320511460304, 0.051291659474372864, 0.006930585950613022, 0.017996450886130333, -0.015698088333010674, -0.018386906012892723, 0.033738911151885986, -0.030526524409651756, -0.01813843473792076, 0.0054086968302726746, 0.021705778315663338, 0.0003799176774919033, 0.017712483182549477, -0.03751922771334648, -0.035211991518735886, -0.02820153906941414, 0.014251627959311008, -0.023888779804110527, -0.014926050789654255], "index": 16}, {"title": "Preston Sturges", "text": "Preston Sturges (/\u02c8st\u025crd\u0292\u026as/; born Edmund Preston Biden; August 29, 1898 \u2013 August 6, 1959) was an American playwright, screenwriter, and film director.", "vector": [0.00044372514821588993, 0.04317275434732437, -0.030205989256501198, 0.006393750198185444, -0.035494279116392136, 0.01280990894883871, -0.04580195993185043, -0.008888508193194866, -0.057304736226797104, 0.041738640516996384, 0.020152265205979347, 0.08658452332019806, -0.03274556249380112, 0.006434831768274307, 0.013325292617082596, 0.005710306111723185, -0.03991612419486046, 0.013063866645097733, -0.0015060045989230275, -0.030594393610954285, 0.1147887334227562, -0.035285137593746185, -0.07003247737884521, 0.0316699780523777, 0.08377605676651001, 0.0423959419131279, -0.0023677791468799114, 0.043202631175518036, 0.019943123683333397, 0.016776125878095627, -0.033701635897159576, 0.006457239855080843, 0.011973343789577484, -0.02278147079050541, 0.019987938925623894, 0.039348453283309937, -0.03140108287334442, 0.05058233439922333, -0.010449599474668503, 0.041141096502542496, -0.014057287946343422, -0.005056739319115877, 0.0034713733475655317, -0.0019009456736966968, -0.0039923591539263725, 0.03310409188270569, -0.014804220758378506, -0.043889809399843216, -0.03352237492799759, 0.04858055338263512, 0.002586257178336382, -0.009695196524262428, 0.010927636176347733, 0.03588268160820007, -0.00542273698374629, -0.016193516552448273, 0.003036284586414695, 0.026321934536099434, -0.021989721804857254, 0.023871993646025658, 0.006154731847345829, 0.004171623382717371, -0.007312478497624397, -0.0035367298405617476, 0.06232412904500961, 0.03773507848381996, 0.0569760836660862, 0.0029541219118982553, 0.04123072698712349, 0.05443651229143143, 0.03447844833135605, -0.04006551206111908, -0.005198657047003508, 0.03134132921695709, 0.009276913478970528, -0.0393783301115036, -0.03178948909044266, -0.009814705699682236, 0.003430292010307312, -0.012847255915403366, 0.04143986850976944, -0.01782183162868023, -0.06590940803289413, -0.01245884969830513, 0.02209429256618023, -0.017119714990258217, 0.026187486946582794, -0.0662679374217987, 0.08969177305698395, 0.018972110003232956, 0.06453505158424377, 0.0006082839099690318, 0.0039176661521196365, -0.06399726122617722, 0.001890675281174481, 0.02325950749218464, 0.05279325693845749, 0.008918385952711105, -0.0040894607082009315, -0.034657713025808334, -0.019330637529492378, 0.011248817667365074, -0.010001438669860363, 0.017657507210969925, 0.022408002987504005, -0.00665891170501709, -0.05554197356104851, -0.018434317782521248, 0.016895635053515434, 0.02575426548719406, 0.02581402100622654, -0.007129479665309191, 0.016641678288578987, 0.024559171870350838, -0.024738436564803123, 0.011293633840978146, -0.004784108605235815, 0.0342693068087101, 0.05126951262354851, 0.017657507210969925, -0.015924621373414993, -0.018284931778907776, 0.0016665952280163765, -0.004208969883620739, 0.03546440228819847, 0.006218221038579941, -0.0020671384409070015, 0.04562269523739815, 0.031281571835279465, -0.00953087117522955, -0.027770986780524254, -0.003456434467807412, -0.008335777558386326, -0.0156258475035429, 0.025649694725871086, 0.0568864531815052, -0.008656959049403667, 0.00493723014369607, 0.035554032772779465, 0.0053667169995605946, -0.004735558293759823, -0.020839443430304527, 0.023229630663990974, -0.039199069142341614, -0.0235433429479599, -0.04923785477876663, 0.06262290477752686, 0.027442336082458496, -0.02092907577753067, -0.01602919213473797, -0.0037290651816874743, 0.033014457672834396, -0.030116356909275055, -0.001271654269658029, 0.019255945459008217, -0.006976358592510223, -0.049058590084314346, -0.01322072185575962, -0.011965873651206493, -0.002845816547051072, -0.02615761011838913, 0.06393750756978989, -0.03247666731476784, -0.006629034411162138, 0.005101555492728949, -0.009486055001616478, -0.007835332304239273, -0.02167600952088833, -0.005123963579535484, 0.0039512780494987965, 0.003594617359340191, 0.05013417452573776, -0.0055310423485934734, -0.06698499619960785, -0.030265742912888527, 0.002679623896256089, 0.01705995947122574, 0.031132185831665993, -0.022602206096053123, 0.05452614277601242, 0.05422737076878548, 0.011136777698993683, 0.0036375659983605146, -0.013004111126065254, -0.022661961615085602, 0.026829849928617477, 0.03077365830540657, 0.03077365830540657, 0.04179839789867401, -0.05431700125336647, -0.010950044728815556, 0.02278147079050541, 0.0214071124792099, -0.026874665170907974, 0.038930170238018036, -0.03271568566560745, -0.022348249331116676, 0.015536216087639332, -0.050492700189352036, 0.016910573467612267, 0.03447844833135605, -0.022124169394373894, 0.06304118037223816, 0.015237442217767239, -0.0010466405656188726, -0.009426300413906574, 0.0020615363027900457, 0.06017296016216278, -0.043262384831905365, 0.04117097333073616, 0.020137326791882515, -0.03152059018611908, 0.01679106429219246, -0.004186562262475491, -0.06262290477752686, 0.0008524378063157201, -0.053928595036268234, 0.024813128635287285, 0.03973685950040817, -0.020197080448269844, -0.014236551709473133, 0.003910196479409933, -0.04054354876279831, -0.053719453513622284, 0.02360309660434723, 0.03331323340535164, -0.01637278124690056, 0.030191050842404366, 0.0668654814362526, 0.03131145238876343, 0.008970670402050018, -0.017030082643032074, -0.05500417947769165, 0.04657876864075661, -0.022258616983890533, 0.010173234157264233, 0.004130541812628508, 0.020047694444656372, -0.0633399561047554, -0.028936201706528664, -0.019644349813461304, 0.0074207838624715805, -0.009814705699682236, 0.04170876368880272, -0.009971561841666698, 0.010068663395941257, 0.02024189755320549, -0.028951140120625496, 0.021511683240532875, 0.008126636035740376, 0.0004448922409210354, -0.019509902223944664, 0.014580140821635723, -0.00956821721047163, 0.02497745491564274, -0.010038785636425018, -0.015297196805477142, -0.0028402144089341164, -0.009329198859632015, -0.028308779001235962, -0.046250119805336, -0.017164530232548714, 0.05031343922019005, -0.0037850853987038136, -0.0629216730594635, -0.030071541666984558, 0.0038205645978450775, -0.06722401082515717, 0.014415815472602844, -0.03274556249380112, 0.024125950410962105, -0.029683135449886322, 0.020958952605724335, 0.04084232077002525, -0.04445748031139374, -0.00977735873311758, -0.0018066453048959374, -0.04018501937389374, -0.0004637989914044738, 0.015229973010718822, -0.02939930185675621, -0.045533064752817154, 0.008410470560193062, 0.009859521873295307, -0.014415815472602844, 0.007558966521173716, 0.003854176728054881, -0.028966080397367477, 0.022079352289438248, -0.007006235886365175, -0.0033798739314079285, 0.019644349813461304, 0.040095388889312744, 0.04568244889378548, -0.022183923050761223, 0.02284122444689274, -0.01749318093061447, -0.0004642658168449998, 0.021586377173662186, -0.014363530091941357, 0.03193887323141098, 0.06447529792785645, -0.0035628725308924913, 0.009762420319020748, -0.02836853265762329, 0.02539573796093464, -0.04810251295566559, -0.02064524032175541, -0.0011213338002562523, -0.043053243309259415, -0.006856848951429129, 0.008044472895562649, 0.020570548251271248, 0.02045103721320629, -0.003129651304334402, 0.020869320258498192, 0.08162488788366318, -0.014251490123569965, -0.01892729476094246, 0.0010569108417257667, 0.02493263967335224, -0.018329747021198273, -0.03779483214020729, -0.03235715627670288, 0.07319948077201843, -0.042784348130226135, -0.011181593872606754, 0.035912562161684036, -0.04096183180809021, -0.0030717637855559587, -0.018299870193004608, -0.069375179708004, 0.000432754575740546, -0.056139517575502396, 0.06877763569355011, -0.0028159392531961203, -0.043949563056230545, 0.03456807881593704, 0.01414691936224699, -0.015805112197995186, 0.05168779566884041, -0.01318337582051754, -0.020958952605724335, 0.05602001026272774, -0.002429401036351919, -0.016193516552448273, 0.0754104033112526, 0.016686493530869484, 0.008403001353144646, 0.0008459021337330341, 0.0006666381377726793, -0.013235661201179028, -0.03205838426947594, -0.0027860617265105247, 0.04451723396778107, -0.014535324648022652, 0.04287398234009743, 0.00925450585782528, 0.0067186662927269936, 0.005512368865311146, 0.031699854880571365, 0.0022295964881777763, 0.02835359424352646, -0.028263961896300316, -0.011457959190011024, 0.0018309206934645772, 0.035822927951812744, -0.024529295042157173, 0.02340889535844326, -0.0254704300314188, -0.01170444767922163, -0.01394524797797203, -0.0005083815776742995, -0.033552251756191254, 0.006042691878974438, 0.03860152140259743, -0.007768108043819666, 0.0666862204670906, -0.013213252648711205, 0.013071335852146149, -0.03809360787272453, 0.02201959863305092, -0.03627108782529831, 0.010068663395941257, 0.01714959181845188, -0.014019940979778767, 0.007656068075448275, -0.0148714454844594, 0.0023304324131458998, -0.05258411541581154, -0.04992503300309181, 0.014654834754765034, -0.0227067768573761, -0.0009392688516527414, 0.0008533714571967721, -0.02249763533473015, 0.008925855159759521, 0.0028364798054099083, 0.008559857495129108, 0.05252436175942421, 0.004171623382717371, -0.00829843059182167, 0.021168094128370285, -0.0449952706694603, 0.0021119543816894293, 0.004365826025605202, -0.016148701310157776, 0.00774569995701313, 0.006393750198185444, 0.0018551959656178951, 0.0018309206934645772, -0.043471526354551315, -0.03821311518549919, 0.06345946341753006, 0.05897786468267441, 0.02600822225213051, 0.02024189755320549, 0.005217330064624548, 0.010367436334490776, -0.012884601950645447, 0.004679538309574127, 0.005773795768618584, -0.01033008936792612, -0.035613786429166794, 0.02306530438363552, 0.02325950749218464, 0.00994168408215046, 0.003646902507171035, -0.04108133912086487, 0.031012676656246185, -0.009545809589326382, -0.04819214716553688, -0.04042403772473335, 0.035344891250133514, -0.020600425079464912, -0.03337298706173897, -0.03244679048657417, -0.03313396871089935, 0.08019077777862549, 0.028413347899913788, 0.004518947564065456, -0.007043582387268543, -0.006927807815372944, -0.021929966285824776, -0.026277119293808937, 0.038930170238018036, -0.06423627585172653, -0.007917494513094425, 0.012107791379094124, -0.025096964091062546, -0.007204173132777214, 0.005587062332779169, 0.009022955782711506, 0.002410727785900235, 0.017254162579774857, -0.07774083316326141, -0.015476461499929428, 0.006289179902523756, 0.009105118922889233, 0.02512684091925621, 0.002599328523501754, 0.015192626975476742, 0.032387033104896545, -0.012966765090823174, -0.04451723396778107, -0.007614986505359411, 0.024066196754574776, 0.01638771966099739, -0.020271774381399155, 0.0009803501889109612, -0.04132035747170448, 0.03274556249380112, 0.004619783256202936, 0.009866991080343723, 0.04075269028544426, 0.04813239350914955, 0.009837113320827484, -0.02284122444689274, -0.0131534980610013, 0.030803535133600235, 0.01632796600461006, -0.01623833365738392, 0.025216473266482353, -0.02926485240459442, 0.00043415508116595447, 0.02451435662806034, -0.017403550446033478, -0.014184266328811646, -0.018090728670358658, 0.014378469437360764, -0.04152949899435043, 0.0020708730444312096, 0.002184780314564705, 0.003045621095225215, 0.028876448050141335, 0.025978345423936844, -0.016850817948579788, 0.03543452173471451, 0.004040909931063652, -0.0012137668672949076, -0.0010793188121169806, 0.01671637035906315, -0.0032640991266816854, 0.034179676324129105, -0.005979202222079039, -0.029683135449886322, 0.03429918363690376, 0.012802439741790295, -0.004664599429816008, 0.014363530091941357, -0.011017268523573875, 0.05542246252298355, -0.01290701050311327, -0.004048379138112068, 0.014557733200490475, -0.013033988885581493, 0.02836853265762329, 0.05927664041519165, -0.006871787831187248, 0.03241691365838051, 0.02842828817665577, 0.003742136526852846, 0.00925450585782528, -0.027024053037166595, 0.014946138486266136, -0.02190008945763111, 0.0035124546848237514, 0.014751935377717018, -0.010875350795686245, -0.025799082592129707, -0.019450146704912186, -0.0029447851702570915, 0.016357842832803726, -0.01934557594358921, 0.02478325180709362, 0.02533598244190216, -0.04878969490528107, 0.02919016033411026, 0.015267319977283478, -0.009919276461005211, -0.020600425079464912, 0.0011129308259114623, 0.026127733290195465, -0.009142465889453888, 0.06118878722190857, -0.013683821074664593, -0.022527514025568962, -0.011502775363624096, -0.019465085119009018, 0.006535667926073074, 0.011913588270545006, 0.033492498099803925, -0.04899883642792702, 0.01472952775657177, 0.017702322453260422, 0.0024163296911865473, -0.08162488788366318, 0.006875522434711456, 0.005049270112067461, -0.023901870474219322, -0.00683444133028388, -0.00669252360239625, 0.008380593731999397, -0.001865466358140111, -0.02884656935930252, 0.023423833772540092, 0.009381484240293503, -0.0019438943127170205, -0.026590831577777863, 0.013541903346776962, 0.009799767285585403, 0.02733776532113552, 0.012817378155887127, -0.01235427986830473, -0.04469649866223335, 0.04018501937389374, 0.026904543861746788, 0.023797299712896347, -0.017254162579774857, 0.015610909089446068, 0.01871815323829651, 0.004242582246661186, -0.019375454634428024, -0.0034116185270249844, -0.008940793573856354, -0.016417598351836205, -0.02913040481507778, -0.007051052059978247, 0.0013239395339041948, 0.0156258475035429, 0.023662852123379707, -0.014348591677844524, 0.025216473266482353, 0.028607551008462906, -0.027038991451263428, 0.022333310917019844, -0.020256835967302322, -0.052703626453876495, 0.02167600952088833, 0.030519701540470123, 0.03205838426947594, 0.031132185831665993, 0.012451380491256714, 0.007947372272610664, -0.029623381793498993, -0.027382580563426018, 0.03155047073960304, -0.044636745005846024, 0.012802439741790295, -0.07469334453344345, -0.03904968127608299, -0.008193859830498695, 0.004291132558137178, -0.014931200072169304, 0.0024051256477832794, -0.04589159041643143, -0.018479133024811745, 0.010464537888765335, -0.004406907595694065, 0.01631302759051323, 0.043949563056230545, -0.012062975205481052, -0.007346090395003557, 0.03214801475405693, 0.010270334780216217, 0.017403550446033478, 0.004750496707856655, 0.011913588270545006, -0.021735763177275658, -0.03525526076555252, -0.030952922999858856, -0.026725279167294502, 0.0021959843579679728, -0.029160281643271446, -0.004018501844257116, 0.0016749983187764883, 0.009859521873295307, -0.032387033104896545, 0.0280249435454607, 0.021586377173662186, -0.010531761683523655, 0.00514637166634202, 0.012645583599805832, -0.005878366529941559, -0.015506338328123093, -0.05557185038924217, 0.02600822225213051, -0.009859521873295307, 0.02491769939661026, -0.0071145412512123585, 0.024589048698544502, -0.007024909369647503, 0.02505214884877205, 0.031490713357925415, 0.00901548657566309, -0.034807100892066956, 0.00024111945822369307, 0.02781580202281475, 0.025828959420323372, -0.06232412904500961, -0.023513466119766235, -0.021974781528115273, -0.007618721108883619, 0.01873309165239334, -0.0006437632837332785, 0.0432325080037117, -0.020152265205979347, 0.008993078954517841, -0.017806893214583397, 0.012010689824819565, 0.00547128776088357, -0.017463304102420807, -0.0002611932868603617, 0.012742685154080391, 0.02960844151675701, -0.02747221291065216, -0.024529295042157173, -0.0029615911189466715, 0.0005037132650613785, 0.006838175933808088, -0.010688617825508118, 0.007969779893755913, 0.03585280478000641, -0.0065095252357423306, -0.014326184056699276, 0.01576029509305954, 0.029653258621692657, -0.013370108790695667, 0.0065095252357423306, 0.006640238221734762, -0.03241691365838051, -0.037137530744075775, -0.005038066301494837, 0.04508490487933159, 0.025903651490807533, -0.05288288742303848, 0.020869320258498192, -0.03253642097115517, -0.029234975576400757, 0.05309202894568443, -0.015013362281024456, 0.02092907577753067, -0.007009970489889383, -0.06381799280643463, 0.03794422000646591, 0.005900774151086807, 0.00488867936655879, 0.030205989256501198, -0.03441869467496872, -0.02201959863305092, 0.00994168408215046, 0.04356116056442261, -0.03964722901582718, 0.026874665170907974, 0.023304324597120285, 0.06363873183727264, 0.05590049922466278, -0.020212018862366676, -0.03779483214020729, -0.0054003288969397545, 0.014759405516088009, 0.013571781106293201, -0.0034284244757145643, 0.03229740262031555, 0.011062084697186947, 0.0015172086423262954, -0.009022955782711506, 0.00030904370942153037, 0.02911546640098095, 0.007917494513094425, 0.0033929452765733004, -0.03839237987995148, 0.02216898463666439, 0.018299870193004608, 0.021377235651016235, -0.034807100892066956, -0.027427395805716515, 0.012541012838482857, 0.007327417377382517, -0.004481600597500801, 0.02478325180709362, -0.02836853265762329, 0.021705886349081993, -0.004690742120146751, 0.009583156555891037, -0.019659288227558136, -0.00633399561047554, 0.028189267963171005, -0.013302884995937347, -0.008500102907419205, 0.01749318093061447, 0.03791434317827225, -0.01438593864440918, 0.03588268160820007, -0.03531501442193985, -0.023767422884702682, 0.024887822568416595, -0.0075178854167461395, 0.024618927389383316, -0.022258616983890533, 0.03022092767059803, -0.009232097305357456, 0.017045021057128906, 0.02485794574022293, 0.007476803846657276, -0.010277803987264633, -0.027248132973909378, 0.02175070159137249, 0.004709415603429079, 0.016746249049901962, -0.012862194329500198, 0.0021773111075162888, 0.012585829012095928, -0.0029261119198054075, 0.03674912452697754, -0.029145343229174614, 0.0028271430637687445, 0.008171452209353447, 0.0031856712885200977, -0.002293085679411888, -0.0027841944247484207, -0.004134276881814003, -0.011973343789577484, -0.016820941120386124, -0.016566984355449677, -0.034687589854002, 0.014154389500617981, 0.021093400195240974, -0.0020988830365240574, 0.005829815752804279, -0.037286918610334396, 0.006789625156670809, -0.013601657934486866, 0.012518605217337608, -0.023095183074474335, -0.009329198859632015, -0.01410957332700491, -0.000579807092435658, 0.007312478497624397, -0.022736653685569763, 0.008403001353144646, 0.009374015033245087, -0.03890029340982437, -0.05046282336115837, 0.01707489974796772, -0.037406425923109055, 0.02451435662806034, 0.0038242992013692856, 0.02842828817665577, -0.0014770609559491277, 0.010852943174540997, 0.0312516950070858, -0.004007298033684492, -0.012443911284208298, -0.03244679048657417, 0.014393407851457596, 0.005587062332779169, 0.005542246159166098, -0.025649694725871086, 0.015655726194381714, -0.022408002987504005, 0.019719043746590614, -0.007095867767930031, 0.04633975028991699, 0.005258411634713411, 0.010711025446653366, 0.01077825017273426, -0.005508634261786938, -0.002905571134760976, -0.0034078839235007763, -0.05918700620532036, 0.048490919172763824, -0.010091071017086506, -0.008589734323322773, -0.0436507910490036, 0.008350715972483158, -0.0367790050804615, -0.007715822663158178, -0.0022725451271981, -0.014669773168861866, 0.017866648733615875, 0.006879257038235664, 0.021377235651016235, -0.05796203762292862, 0.010457068681716919, 0.033074215054512024, -0.02953374944627285, -0.007902556098997593, -0.0415593758225441, -0.013243130408227444, 0.03435893729329109, -0.019450146704912186, 0.011106900870800018, 0.012428972870111465, -0.0013771585654467344, -0.011577468365430832, -0.011330980807542801, 0.017791954800486565, -0.016283148899674416, -0.0025040945038199425, 0.0177620779722929, 0.009321729652583599, 0.027980126440525055, 0.02966819703578949, 0.01590968295931816, -0.010367436334490776, 0.05129938945174217, 0.01671637035906315, -0.0003176801255904138, -0.03701802343130112, -0.010815596207976341, 0.03119194135069847, -0.033283356577157974, -0.03289495036005974, -0.027756046503782272, 0.004078256897628307, -0.0316699780523777, -0.005273350048810244, -0.015879806131124496, -0.005351778119802475, -0.02911546640098095, 0.012690399773418903, -0.01366141252219677, -0.024245459586381912, 0.04200753942131996, 0.006599157117307186, 0.011181593872606754, -0.016402658075094223, 0.021661071106791496, 0.003984889946877956, -0.023125059902668, -0.0359424389898777, -0.02575426548719406, -0.002154903020709753, -0.017194408923387527, -0.012331871315836906, 0.02333420142531395, -0.012503665871918201, -0.01680600270628929, -0.012055505998432636, 0.005452614277601242, 0.0218253955245018, -0.020152265205979347, 0.005796203855425119, 0.03815336152911186, 0.0072863358072936535, 0.047116562724113464, -0.007656068075448275, 0.02409607358276844, 0.02560487948358059, 0.029145343229174614, 0.04012526571750641, -0.00487000634893775, -0.018075790256261826, 0.03842225670814514, 0.031042555347085, 0.0214071124792099, -0.004063318017870188, 0.010143356397747993, -0.013444802723824978, 0.021735763177275658, 0.012294524349272251, 0.010382374748587608, 0.022079352289438248, -0.03001178614795208, 0.02245282009243965, -0.014789282344281673, 0.0017889055889099836, -0.0017646303167566657, 0.03361200541257858, 0.007947372272610664, 0.0196891650557518, 0.011764202266931534, -0.045055028051137924, -0.0065095252357423306, 0.01077078003436327, -0.0023547078017145395, -0.011569999158382416, 0.027935311198234558, 0.01466230396181345, -0.008261083625257015, 0.0043508876115083694, -0.030474884435534477, -0.02795024961233139, -0.05354018881917, 0.002875693840906024, -0.02113821730017662, -0.010486945509910583, -0.03680888190865517, -0.02506708726286888, -0.035404644906520844, -0.02003275603055954, -0.003981155343353748, 0.0022202597465366125, -0.02705392986536026, 0.009299321100115776, -0.01294435653835535, -0.027830740436911583, -0.003307047998532653, -0.021705886349081993, -0.01680600270628929, -0.028741998597979546, -0.00784280151128769, 0.012817378155887127, 0.017537998035550117, -0.017851710319519043, -0.011159186251461506, 0.018284931778907776, 0.009179811924695969, 0.013048927299678326, -0.007398375775665045, 0.01225717831403017, -0.002771123079583049, -0.030803535133600235, -0.021108340471982956, 0.013698759488761425, -0.002608665032312274, 0.008701775223016739, 0.0035329952370375395, -0.009306791238486767, 0.02106352336704731, 0.03134132921695709, -0.012428972870111465, -0.0041230726055800915, 0.03785458952188492, -0.0038168299943208694, 0.003910196479409933, -0.006789625156670809, -0.037077777087688446, 0.023632975295186043, -0.05838032066822052, 0.0196891650557518, 0.017881587147712708, 0.0037085246294736862, 0.054077982902526855, 0.012428972870111465, 0.01610388606786728, 0.009037895128130913, 0.00430233683437109, -0.03952771797776222, 0.007092133164405823, 0.03731679543852806, -0.003732800018042326, -0.04699705168604851, 0.006819502450525761, 0.03827286884188652, 0.030161172151565552, 0.061158910393714905, -0.020734872668981552, -0.0007679409463889897, 0.00805194303393364, -0.0641765221953392, 0.04170876368880272, -0.0320882610976696, 0.01816542260348797, -0.02106352336704731, -0.006629034411162138, 0.00019256878294982016, 0.016417598351836205, 0.054824914783239365, 0.004810251295566559, -0.013235661201179028, 0.05061221122741699, -0.02291591838002205, -0.019330637529492378, 0.02249763533473015, -0.01414691936224699, 0.01056910865008831, 0.016223395243287086, -2.5384066248079762e-05, -0.015551154501736164, -0.0026926950085908175, -0.03884053975343704, 0.010628863237798214, 0.01844925619661808, 0.007700883783400059, -0.04681779071688652, 0.03881066292524338, 0.008559857495129108, -0.016432536765933037, 0.016133762896060944, -0.003628229256719351, -0.04535380005836487, 0.00888103898614645, -0.031132185831665993, -0.03456807881593704, -0.013519495725631714, -0.001299664261750877, 0.019480025395751, -0.021048584952950478, 0.0013696892419829965, 0.017463304102420807, 0.013937778770923615, 0.009605564177036285, 0.00795484147965908, -0.0005405931151472032, 0.002575053134933114, -0.028547797352075577, -0.0066813197918236256, 0.04066305607557297, -0.0039176661521196365, -0.06190584599971771, -0.02768135443329811, 0.007368498481810093, 0.01919618993997574, 0.000285935471765697, 0.0005363915697671473, -0.0023528404999524355, -0.010905228555202484, -0.02615761011838913, -0.00714441854506731, -0.0008776467875577509, 0.0402148962020874, 0.011734324507415295, -0.015730418264865875, 0.01686575822532177, 0.00964291114360094, -0.014878914691507816, -0.04577208310365677, -0.01214513834565878, 0.00478784367442131, 0.0056318785063922405, 0.004601110238581896, -0.009814705699682236, -0.010882820934057236, 0.008335777558386326, 0.0177620779722929, -0.016701431944966316, 0.015446583740413189, -0.0010522424709051847, -0.002886897884309292, 0.02781580202281475, 0.02077968791127205, -0.033283356577157974, 0.009635441936552525, 0.02210923098027706, 0.008059412240982056, 0.026411566883325577, -0.015954498201608658, 0.004380764905363321, -0.0035199238918721676, -0.03158034756779671, 0.00607256917282939, 0.020690057426691055, 0.0109126977622509, 0.03806372731924057, -0.01686575822532177, 0.010748372413218021, -0.026456383988261223, -0.021855272352695465, -0.01521503459662199, 0.00044162440462969244, -0.04275447130203247, 0.005105290096253157, 0.0010466405656188726, 0.01976385898888111, -0.012473789043724537, -0.02789049595594406, 0.010135887190699577, 0.017732201144099236, -0.03537476807832718, -0.0022538716439157724, -0.02167600952088833, 0.022945795208215714, 0.0070771947503089905, 0.021810457110404968, 0.004713150206953287, 0.007204173132777214, 0.013780922628939152, -0.0022800143342465162, 0.0032267526257783175, -0.006345199886709452, -0.03683875873684883, 0.020899198949337006, 0.030474884435534477, 0.028263961896300316, -0.004952169023454189, -0.012817378155887127, 0.0015246779657900333, 0.012623175047338009, 0.026456383988261223, -0.07140684127807617, 0.035135749727487564, -0.014811690896749496, -0.00901548657566309, 0.013915370218455791, 0.015140341594815254, 0.006939011625945568, -0.03564366325736046, -0.04872993752360344, -0.04027465358376503, -0.03758569061756134, -0.009852052666246891, -0.00721164233982563, -0.004653395619243383, 0.003958747256547213, 0.03196875378489494, -0.04311300069093704, -0.02169094793498516, 0.034687589854002, -6.004644819768146e-05, 0.0004593640915118158, -0.00726019311696291, 0.007241520099341869, -0.0024984923657029867, 0.04466662183403969, 0.009299321100115776, -0.015043240040540695, -0.013571781106293201, 0.00014775276940781623, 0.017448365688323975, -0.020704995840787888, -0.02249763533473015, -0.04744521155953407, -0.01962941139936447, -0.040304530411958694, 0.021929966285824776, 0.011181593872606754, 0.018837662413716316, -0.007431988138705492, 0.020944014191627502, -0.0016199119854718447, -0.011293633840978146, -0.0008823151583783329, -0.04087219759821892, 0.026874665170907974, -0.004048379138112068, -0.015924621373414993, 0.036510106176137924, 0.014191735535860062, 0.010793188586831093, 0.00850757211446762, 0.005560919642448425, 0.0037888200022280216, -0.017523059621453285, 0.006655177101492882, -0.030131295323371887, 0.01287713274359703, -0.0050978208892047405, -0.007443191949278116, 0.01858370378613472, -0.008612142875790596, -0.009441238828003407, 0.002050332259386778, -0.0014723925851285458, -0.0449056401848793, 0.010001438669860363, -0.01339251734316349, -0.027711231261491776, -0.02148180641233921, -0.002050332259386778, -0.030161172151565552, -0.011726855300366879, -0.021496744826436043, 0.008007126860320568, -0.013683821074664593, 0.04311300069093704, -0.008940793573856354, 0.022557390853762627, 0.05195669084787369, 0.004537620581686497, 0.0016217792872339487, 0.02472349815070629, -0.028204208239912987, 0.007984718307852745, 0.04798300564289093, 0.023842116817831993, -0.035404644906520844, -0.008171452209353447, -0.01211526058614254, -0.016850817948579788, 0.00545634888112545, -0.0036487700417637825, -0.007443191949278116, 0.006263037212193012, 0.02699417434632778, 0.0013724901946261525, -0.0066775851882994175, -0.011233879253268242, -0.0014509182656183839, -0.023169875144958496, -0.03077365830540657, 0.008126636035740376, 0.01955471746623516, 0.006042691878974438, 0.0017030083108693361, -0.01625327207148075, 0.002393921837210655, -0.009695196524262428, 0.0014163726009428501, -0.012369218282401562, 0.017388610169291496, -0.006744808983057737, 0.023662852123379707, 0.0248430073261261, 0.029653258621692657, 0.0075552319176495075, -0.026142671704292297, 0.041828274726867676, -0.011764202266931534, 0.02305036596953869, 0.007820392958819866, 0.017732201144099236, 0.003056825138628483, -0.038930170238018036, -0.010994860902428627, 0.020197080448269844, 0.010188172571361065, -0.011853833682835102, -0.04069293662905693, -0.042156923562288284, 0.0155212776735425, -0.027502089738845825, -0.020824505016207695, 0.003303313162177801, 0.007969779893755913, 0.007999657653272152, 0.01149530615657568, 0.018464194610714912, -0.01015082560479641, 0.013631535694003105, -0.0042239087633788586, -0.0023901870008558035, 0.028532858937978745, -0.0018337216461077332, -0.005751387681812048, -0.013676351867616177, -0.010046254843473434, 0.007465600036084652, -0.022348249331116676, 0.01726910099387169, 0.0007361962925642729, 0.01107702311128378, 0.020958952605724335, 0.0035217911936342716, -0.0022183924447745085, -0.005654286127537489, -0.025440553203225136, -0.02079462818801403, -0.010076132602989674, 0.040513671934604645, 0.015058178454637527, 0.01707489974796772, -0.009784827940165997, -0.024335091933608055, -0.016163639724254608, 0.009321729652583599, -0.031012676656246185, 0.0014901323011144996, 0.0039512780494987965, 0.017104776576161385, -0.0019102822989225388, -0.01907668076455593, -0.026187486946582794, -0.03567354381084442, -0.0016432536067441106, 0.006614095997065306, 0.00860467366874218, 0.005859693046659231, -0.02697923593223095, 0.026889605447649956, -0.011891180649399757, -0.02058548666536808, -0.010628863237798214, 0.018987048417329788, 0.019450146704912186, -0.022213801741600037, -0.003129651304334402, -0.009336668066680431, -0.021705886349081993, 0.0027785925194621086, -0.009351606480777264, 0.022482696920633316, -0.015670664608478546, -0.007700883783400059, 0.005796203855425119, 0.052076201885938644, 0.015461522154510021, 0.059575412422418594, 0.04132035747170448, -0.009769889526069164, 0.02003275603055954, -0.00019186853023711592, 0.052076201885938644, -0.01576029509305954, 0.006640238221734762, 0.019838552922010422, -0.013302884995937347, -0.005250942427664995, -0.032387033104896545, -0.0011119971750304103, 0.019943123683333397, 0.0181803610175848, 0.013698759488761425, -0.03158034756779671, 0.008208799175918102, -0.045951347798109055, -0.013758514076471329, -0.01665661670267582, -0.01865839771926403, 0.0026590831112116575, -0.01063633244484663, -0.03860152140259743, -0.0029317138250917196, 0.0018878743285313249, -0.010225518606603146, 0.018703212961554527, -0.010203110985457897, 0.01417679712176323, -0.011525182984769344, -0.012481258250772953, 0.013116151094436646, -0.0038653805386275053, -0.029279790818691254, 0.019943123683333397, -0.018284931778907776, -0.002604930428788066, -0.026127733290195465, 0.0031277837697416544, -0.024006441235542297, 0.046250119805336, -0.02678503468632698, -0.008500102907419205, -0.027920372784137726, -0.01596943661570549, 0.00609124219045043, 0.00915740430355072, 0.022661961615085602, 0.030026724562048912, 0.0025507777463644743, 0.02575426548719406, -0.0026385425589978695, 0.003041886491701007, -0.04645926132798195, -0.012077913619577885, 0.07935421168804169, -0.029444117099046707, 0.016283148899674416, 0.014460631646215916, 0.014370999298989773, 0.004171623382717371, 0.017194408923387527, 0.0027935311663895845, -0.04657876864075661, 0.036599740386009216, -0.004186562262475491, -0.0036674432922154665, -0.01246631983667612, 0.0138033302500844, -0.026814911514520645, -0.028039881959557533, -0.008500102907419205, 0.017164530232548714, -0.0010811862302944064, 0.011039676144719124, 0.0016236465889960527, 0.02016720362007618, 0.0025115637108683586, -0.0218253955245018, 0.009919276461005211, 0.0012128332164138556, -0.01066621020436287, -0.02058548666536808, -0.00873912125825882, 0.01531213615089655, -0.040364284068346024, -0.015088056214153767, -0.02553018555045128, -0.014490509405732155, -0.008276022970676422, 0.004679538309574127, 0.011480366811156273, 0.0059343865141272545, -0.0056654904037714005, -0.0004892414435744286, 0.04185815155506134, -0.008627081289887428, 0.027158500626683235, 0.016059068962931633, -0.024260398000478745, -0.011599876917898655, -0.0016609933227300644, 0.013048927299678326, -0.01768738403916359, -0.012653052806854248, -0.004511477891355753, 0.006154731847345829, 0.021631192415952682, 0.007148153148591518, 0.010158294811844826, -0.03737654909491539, -0.021212909370660782, -0.007424518465995789, 0.02913040481507778, 0.030549578368663788, 0.03943808749318123, 0.030923044309020042, 0.006830706261098385, 0.019644349813461304, -0.014348591677844524, -0.0006306919385679066, -0.011667100712656975, -0.04418858513236046, -0.03411991894245148, -0.025291167199611664, -0.004373295232653618, 0.019659288227558136, -0.011831426061689854, 0.007558966521173716, 0.00767847616225481, -0.03943808749318123, 0.04418858513236046, 0.004231377970427275, 0.009926745668053627, -0.027442336082458496, -0.006423627957701683, -0.013564311899244785, -0.014714589342474937, -0.017254162579774857, -0.0036431679036468267, 0.008313369005918503, -0.02201959863305092, 0.008358185179531574, 0.008096758276224136, 0.008895977400243282, 0.035613786429166794, -0.00497084204107523, -0.0002469548780936748, 0.004421846009790897, 0.02512684091925621, -0.003898992668837309, 0.016133762896060944, -0.017702322453260422, -0.012929418124258518, -0.040722813457250595, -0.004414376802742481, 0.005075412802398205, -0.00036973206442780793, 0.012645583599805832, 0.000986885861493647, -0.005725244991481304, -0.02871212176978588, 0.0015050709480419755, 0.014811690896749496, -0.026829849928617477, 0.06525211036205292, -0.003603953868150711, -0.023125059902668, -0.02079462818801403, -0.003021345939487219, 0.002164239762350917, -0.04433796927332878, -0.004724354017525911, -0.016492290422320366, -0.019569655880331993, -0.0035161892883479595, 0.009314260445535183, 0.0201074481010437, -0.023662852123379707, -0.0006148195825517178, -0.001586299971677363, 0.004063318017870188, 0.01632796600461006, -0.017313918098807335, 0.008918385952711105, -0.006341465283185244, 0.04353128373622894, 0.00485506746917963, -0.026142671704292297, 0.029279790818691254, -0.032805316150188446, 0.016088945791125298, 0.005482491571456194, 0.0011950935004279017, -0.012593298219144344, -0.013713697902858257], "index": 17}, {"title": "1997 Denver Broncos season", "text": "The 1997 Denver Broncos season was the team's 38th, and 28th in the National Football League (NFL). The Broncos finished the season with a record of 12\u20134, finishing second in the AFC West, and winning Super Bowl XXXII.", "vector": [0.03407149761915207, -0.031749021261930466, -0.013922098092734814, -0.015478922985494137, -0.0009554693824611604, -0.02710406668484211, -0.03210632503032684, 0.019498594105243683, -0.01330957654863596, 0.07406403124332428, 0.012193001806735992, -0.006262391805648804, -0.019256137311458588, -0.006559081841260195, -0.024679502472281456, 0.04295305535197258, -0.062375083565711975, -0.02157861366868019, 0.02032805047929287, -0.0276910662651062, 0.003009967738762498, -0.010419242084026337, 0.044994793832302094, 0.027946284040808678, -0.050915829837322235, -0.005021398421376944, -0.02184659242630005, 0.013564794324338436, 0.012301469221711159, -0.023633113130927086, 0.0362408421933651, -0.024015938863158226, -0.010246970690786839, 0.019587919116020203, -0.044152576476335526, 0.05982290953397751, -0.02452637255191803, 0.0024357291404157877, -0.00935371033847332, 0.007477863691747189, -0.035653840750455856, -0.04244261980056763, 0.03190214931964874, 0.002282598754391074, 0.02748689241707325, 0.025164416059851646, -0.018005574122071266, 0.0038123067934066057, 0.008938982151448727, 0.0019141290104016662, -0.027359284460544586, -0.011771893128752708, 0.007394918240606785, -0.007356635760515928, -0.016576357185840607, 0.015185423195362091, 0.007235407363623381, 0.0624261274933815, -0.04933348298072815, 0.002499533351510763, -0.05869995430111885, 0.0030370845925062895, -0.02567484974861145, 0.006878103595227003, -0.027333762496709824, 0.02549619786441326, -0.013756207190454006, 0.02138720080256462, 0.0037102201022207737, -0.009041069075465202, -0.01718887872993946, -0.009947090409696102, -0.0016158438520506024, 0.016818813979625702, -0.0018614904256537557, 0.03749140724539757, -0.045301053673028946, -0.008084004744887352, -0.039941489696502686, 0.001612653722986579, 0.02604491449892521, -0.03065158613026142, -0.02604491449892521, 0.004881029017269611, 0.039762839674949646, -0.013207489624619484, 0.03772110119462013, -0.04992048442363739, -0.017112312838435173, -0.02968176081776619, -0.0033305843826383352, 0.015963835641741753, 0.03445432335138321, -0.0419832281768322, 0.01670396514236927, -0.010093839839100838, -0.011114709079265594, 0.009417514316737652, -0.024309437721967697, 0.0034454320557415485, 0.0033592963591217995, -3.980291512561962e-05, 0.00807124376296997, -0.014317684806883335, 0.007937255315482616, 0.0004043597436975688, 0.028175977990031242, -0.0011524651199579239, -0.08723323792219162, -0.05594360828399658, -0.004188752267509699, 0.012626870535314083, -0.0618136040866375, 0.008849656209349632, -0.016844335943460464, 0.05420813336968422, 0.03054949827492237, -0.03128962963819504, -0.031544845551252365, 0.04208531603217125, -0.019830375909805298, -0.04063057899475098, 0.01025335118174553, -0.02568761073052883, -0.03062606416642666, -0.004077094607055187, -0.000522796472068876, -0.025343067944049835, -0.026670197024941444, -0.02692541480064392, -0.009998133406043053, -0.020825723186135292, -0.04647505283355713, 0.024743307381868362, -0.002242721151560545, 0.054361261427402496, -0.044101532548666, -0.005975272506475449, 0.03800183907151222, 0.025623805820941925, 0.010808448307216167, 0.004641762934625149, 0.030090108513832092, -0.022165613248944283, 0.046347443014383316, -0.001244183862581849, 0.010093839839100838, 0.00560520775616169, -0.015338554047048092, -0.010240590199828148, 0.047853223979473114, 0.028609847649931908, -0.006319815758615732, -0.01402418501675129, 0.015185423195362091, 0.020838484168052673, 0.02347998134791851, -0.016844335943460464, -0.0023160960990935564, -0.021425483748316765, 0.03971179574728012, -0.008077624253928661, -0.03601114824414253, -0.05915934592485428, -0.014126271940767765, 0.0030673916917294264, 0.028711935505270958, 0.006412331946194172, -0.017916247248649597, 0.0029365927912294865, 0.014662227593362331, 0.011727230623364449, 0.039456579834222794, 0.040502969175577164, -0.001087863347493112, -0.007095037959516048, 0.023824525997042656, 0.018056616187095642, 0.029554150998592377, -0.024283915758132935, 0.0029668998904526234, 0.010904154740273952, 0.016640162095427513, -0.016627401113510132, -0.0039941491559147835, 0.020544985309243202, -0.020098354667425156, 0.04999705031514168, -0.016818813979625702, -0.01909024640917778, 0.014636706560850143, 0.0039750076830387115, 0.04798083379864693, 0.011606002226471901, -0.019026441499590874, 0.03026876039803028, 0.03396940976381302, 0.0385633185505867, -0.010591513477265835, 0.0015161496121436357, -0.01088501326739788, -0.026466023176908493, -0.019638963043689728, -0.04496927186846733, 0.06763255596160889, 0.0007261727005243301, -0.01727820374071598, 0.03690440580248833, 0.011357164941728115, 0.02568761073052883, 0.0656418651342392, -0.005426555871963501, -0.018630854785442352, -0.027257196605205536, 0.013207489624619484, 0.020659832283854485, 0.0092133404687047, 0.03167245537042618, -0.02243359200656414, -0.03728723153471947, -0.00037146065733395517, -0.07018472999334335, -0.04489270597696304, 0.006616505794227123, -0.006211348343640566, 0.0015504445182159543, 0.0022953597363084555, 0.055024828761816025, -0.0015336958458647132, -0.03560280054807663, -0.047853223979473114, 0.02633841522037983, -0.026363937184214592, 0.028941629454493523, 0.013871055096387863, 0.0031758591067045927, -0.004357833880931139, 0.03912479802966118, 0.008607200346887112, 0.00270689744502306, 0.0032731606625020504, 0.004463110584765673, 0.005640299990773201, -0.010151264257729053, -0.01422835886478424, 0.009915187954902649, 0.0007485041860491037, -0.003834638511762023, 0.02110646292567253, 0.02146376669406891, 0.01532579306513071, -0.016206292435526848, -0.03789975494146347, 0.028711935505270958, 0.06661169230937958, -6.186026439536363e-05, -0.03723618760704994, 0.010617035441100597, -0.006466565653681755, 0.019064724445343018, -0.022752612829208374, 0.035730406641960144, -0.00496078422293067, 0.029094761237502098, -0.008032961748540401, 0.05208982899785042, -0.014853640459477901, 0.043769750744104385, 0.03601114824414253, -0.007452342193573713, 0.022459113970398903, -0.006083739921450615, -0.04246814176440239, 0.03340793028473854, 0.025611046701669693, 0.005490359850227833, 0.06615229696035385, -0.041549358516931534, 0.03218288719654083, 0.026848848909139633, -0.023071635514497757, 0.0020529034081846476, 0.045964617282152176, -0.05252369865775108, 0.018745703622698784, 0.0063134352676570415, -0.008275417611002922, -0.022408070042729378, -0.0005216001300141215, 0.018758464604616165, 0.0064187124371528625, 0.029171325266361237, -0.02243359200656414, 0.0013741850852966309, 0.03248915076255798, 0.027614500373601913, 0.02473054639995098, 0.009245242923498154, 0.016844335943460464, 0.005563735030591488, 0.05186013504862785, 0.007911733351647854, 0.014879162423312664, -0.026363937184214592, -0.019919702783226967, 0.04953765869140625, 0.044050488620996475, 0.008728427812457085, -0.02231874316930771, 0.002228365046903491, -0.06962325423955917, 0.004450350068509579, -0.026363937184214592, -0.0068717231042683125, 0.03254019096493721, -0.018388399854302406, 0.0310088898986578, 0.025930067524313927, -0.01235251221805811, -0.008479591459035873, 0.017405813559889793, 0.03169797733426094, 0.02377348206937313, 0.023339612409472466, -0.019243376329541206, -0.07758602499961853, 0.007203505374491215, -0.012869327329099178, 0.03692992776632309, 0.01965172402560711, -0.0038314482662826777, 0.0068525816313922405, 0.04525000974535942, -0.02404146082699299, -0.004351453389972448, -0.04216188192367554, 0.04272335767745972, -0.026414979249238968, 0.04188114032149315, -0.02815045602619648, -0.02756345644593239, -0.02032805047929287, -0.015683095902204514, -0.015593770891427994, -0.018630854785442352, -0.013284055516123772, -0.012620490044355392, -0.03863988444209099, -0.00801382027566433, 0.026363937184214592, 0.0003971817495767027, 0.026363937184214592, 0.027742110192775726, 0.04486718401312828, -0.011931403540074825, 0.039482101798057556, -0.03358658403158188, -0.04706205055117607, 0.014777075499296188, 0.014113510958850384, 0.016384944319725037, -8.090186020126566e-05, -0.00691638607531786, -0.020940570160746574, -0.026797804981470108, -0.013973142020404339, -0.010425622574985027, 0.019702767953276634, 0.005751957651227713, -0.035934582352638245, 0.010617035441100597, 0.05604569613933563, -0.01173361111432314, -0.00782240740954876, 0.09366471320390701, -0.015606531873345375, -0.039277926087379456, -0.009621688164770603, -0.06166047602891922, -0.011714469641447067, -0.02156585268676281, 0.06023125723004341, -0.0479297898709774, 0.006240060552954674, -0.0006364478613249958, -0.012046251446008682, -0.0013040003832429647, 0.05640299990773201, -0.033254802227020264, -0.041549358516931534, 0.024679502472281456, 0.048618875443935394, -0.04211083799600601, -0.007522527128458023, 0.010597893968224525, 0.008147808723151684, 0.0022411260288208723, 0.036036666482686996, 0.06380429863929749, 0.025253741070628166, -0.046806834638118744, 0.03299958258867264, 0.033280324190855026, -0.05109448358416557, -0.02022596262395382, 0.009577025659382343, 0.03218288719654083, 0.0026367127429693937, 0.009060210548341274, -0.02586626261472702, 0.02804837003350258, 0.014509097672998905, -0.010540470480918884, 0.034326713532209396, 0.05466752499341965, 0.005018208175897598, -0.005541403312236071, 0.02968176081776619, -0.042315009981393814, -0.017201639711856842, -0.029043717309832573, 0.0884072408080101, 0.025942828506231308, -0.005219191778451204, 0.009774819016456604, 0.01494296733289957, -0.06446786224842072, 0.005375512409955263, 0.04759800806641579, 0.005388272926211357, -0.010514948517084122, 0.011739990673959255, -0.0257769376039505, 0.036700233817100525, 0.02988593466579914, -0.03731275349855423, -0.0003188221016898751, 0.04075818508863449, 0.010655318386852741, 0.06349804252386093, 0.020455658435821533, 0.04277440160512924, -0.02442428655922413, -7.49202081351541e-05, 0.034709539264440536, -0.0022443162743002176, -0.00646337540820241, -0.011995208449661732, -0.023620352149009705, 0.030753672122955322, -0.054157089442014694, -0.039762839674949646, -0.011759132146835327, 0.0136924022808671, -0.01717611774802208, 0.00968549307435751, -0.022484635934233665, -0.029247891157865524, 0.07360464334487915, -0.03274436667561531, 0.004683235660195351, -0.009947090409696102, 0.017724834382534027, 0.025062328204512596, -0.041574880480766296, 0.03700649365782738, -0.018873311579227448, -0.030370846390724182, -0.0385633185505867, -0.035551756620407104, 0.038716450333595276, -0.007126940414309502, -0.06702003628015518, -0.036419495940208435, -0.02022596262395382, -0.03989044949412346, 0.03807840496301651, -0.004625811707228422, 0.04124309867620468, 0.020672593265771866, 0.004115377087146044, 0.025827979668974876, 0.03744036331772804, 0.022203896194696426, 0.03654710203409195, -0.005863615311682224, -0.0017530231270939112, -0.029809368774294853, 0.026874370872974396, 0.02069811522960663, 0.03894614428281784, -0.010661698877811432, -0.010757405310869217, -0.029273413121700287, 0.0513496994972229, 0.05099239572882652, -0.024360481649637222, 0.007088657468557358, 0.06400847434997559, -0.042621273547410965, -0.00028851506067439914, 0.019409267231822014, 0.02043013647198677, 0.005550974048674107, 0.03481162711977959, 0.01652531325817108, -0.01670396514236927, 0.04479061812162399, -0.012224903330206871, 0.045301053673028946, 0.05584152415394783, 0.029477586969733238, -0.011376306414604187, 0.024360481649637222, -0.03187662735581398, -0.05767908692359924, -0.017712073400616646, 0.023160960525274277, 0.052370570600032806, 0.004708757158368826, 0.027129588648676872, -0.028992673382163048, -0.006878103595227003, 0.05431022122502327, 0.03925240412354469, 0.00915591698139906, 0.01274171844124794, 0.012110056355595589, -0.0009235672187060118, 0.027155110612511635, 0.03310167044401169, 0.03761901333928108, -0.005308517720550299, -0.01984313689172268, -0.017609987407922745, 0.02148928865790367, -0.013373381458222866, -0.025075089186429977, 0.0024564655032008886, -0.03399493172764778, 0.034045975655317307, 0.018388399854302406, -0.026695718988776207, 0.005940180271863937, -0.053697697818279266, -0.02214009128510952, -0.023607591167092323, 0.019128529354929924, -0.025560002774000168, -0.0108722522854805, -0.009634449146687984, 0.007656516041606665, 0.02310991659760475, 0.014866401441395283, -0.018554290756583214, -0.015402358025312424, 0.026976458728313446, 0.006980190519243479, -0.0066292667761445045, 0.004491822794079781, -0.0037389318458735943, 0.012614109553396702, -0.013488229364156723, 0.012269566766917706, -0.017507899552583694, 0.004855507053434849, 0.011861219070851803, 0.00807124376296997, -0.013016076758503914, -0.05191117897629738, -0.0035762309562414885, 0.02559828571975231, 0.010674458928406239, 0.007414059713482857, 0.026848848909139633, 0.022867461666464806, 0.051222093403339386, 0.022752612829208374, 0.02393937297165394, 0.030753672122955322, 0.0033433453645557165, 0.0062368703074753284, 0.02863536961376667, -0.01383277215063572, -0.011535817757248878, 0.024258393794298172, -0.0017865203553810716, 0.023046113550662994, -0.014572901651263237, 0.00493845297023654, -0.011331643909215927, -0.02807389199733734, 0.01198244746774435, 0.002604810521006584, 0.014802597463130951, 0.023058874532580376, 0.033356886357069016, 0.013009696267545223, 0.03396940976381302, -0.0058125718496739864, 0.020009027794003487, 0.002957329386845231, 0.045964617282152176, -0.008747569285333157, 0.06191569194197655, -0.0011628333013504744, 0.013411663472652435, 0.011682567186653614, 0.00825627613812685, 0.040502969175577164, -0.05089030787348747, -0.010802067816257477, -0.0027244435623288155, -0.006667549256235361, 0.011510295793414116, -0.03312719240784645, 0.0022570770233869553, -0.019536877050995827, 0.03052397631108761, -0.06650960445404053, 0.025827979668974876, 0.007905352860689163, -0.013730685226619244, -0.017201639711856842, 0.017163356766104698, -0.018388399854302406, 0.02319924347102642, -0.03874197229743004, -0.019728289917111397, -0.011580480262637138, -0.06023125723004341, -0.024411525577306747, -0.027818674221634865, 0.016461508348584175, -0.01822250708937645, -0.008371124044060707, 0.025317545980215073, -0.06671377271413803, -0.014547380618751049, 0.028788499534130096, -0.02489643730223179, -0.01388381514698267, 0.009219720959663391, 0.04609222710132599, -0.025611046701669693, -0.012154718860983849, -0.003461383283138275, 0.02156585268676281, -0.018094899132847786, -0.015236467123031616, 0.017112312838435173, -0.0009658375638537109, 0.006125212647020817, 0.008345602080225945, -0.00934732984751463, -0.04925692081451416, 0.026593631133437157, 0.03981388360261917, 0.023633113130927086, 0.01140820886939764, -0.02136167883872986, 0.0138455331325531, 0.02434772066771984, 0.017354769632220268, 0.039277926087379456, -0.011657045222818851, 0.08830515295267105, 0.03305062651634216, -0.0034103398211300373, 0.028865065425634384, 0.0370575375854969, -0.008849656209349632, 0.049384526908397675, -0.05066061392426491, -0.024411525577306747, -0.003140766639262438, 0.0034550027921795845, 0.052829958498477936, 0.00429402943700552, -0.01145925186574459, -0.01440701074898243, 0.059976041316986084, -0.014904684387147427, -0.002464441116899252, -0.009009166620671749, 0.0011987233301624656, -0.03437775745987892, 0.014394249767065048, -0.01833735592663288, -0.001512161921709776, 0.007126940414309502, -0.006307054776698351, -0.0027292289305478334, 0.039099276065826416, -0.030319802463054657, -0.049001701176166534, -0.01689537800848484, -0.046143271028995514, 0.009889665991067886, -0.031264107674360275, -0.03754245117306709, -0.01564481481909752, -0.05191117897629738, 0.0016716726822778583, 0.0077203200198709965, -0.02031528949737549, -0.014241119846701622, 0.004306790418922901, 0.04101340472698212, -0.047751136124134064, -0.03034532442688942, 0.004105806816369295, -0.014445293694734573, -0.009915187954902649, -0.0037772145587950945, 0.01670396514236927, -0.0165125522762537, -0.02194867841899395, -0.019524116069078445, -0.021999722346663475, -0.008696526288986206, 0.0033497256226837635, 0.016665682196617126, 0.02557276375591755, 0.027333762496709824, -0.024845393374562263, -0.02451361157000065, -0.020736398175358772, 0.021897636353969574, 0.016257336363196373, -0.04274887964129448, -0.006667549256235361, -0.0007983513060025871, 0.0014244309859350324, -0.008543395437300205, -0.006910005584359169, 0.05487169697880745, 0.00897088460624218, 0.008332841098308563, -0.009659971110522747, -0.03248915076255798, -0.006329386495053768, 0.044433314353227615, 0.011184893548488617, -0.010853111743927002, 0.01956239901483059, 0.06553977727890015, 0.026772284880280495, -0.012677914462983608, -0.005270235240459442, 0.003215736709535122, -0.015900030732154846, 0.0063134352676570415, -0.009200580418109894, -0.04392287880182266, -0.0035411387216299772, 0.035373102873563766, -0.05058404803276062, -0.009117634035646915, 0.015581009909510612, 0.0029764706268906593, 0.03922688215970993, -0.0041089970618486404, 0.012805523350834846, 0.014713271521031857, -0.0051681483164429665, -0.017137834802269936, 0.031544845551252365, -0.023709677159786224, 0.030217716470360756, 0.033254802227020264, 0.0443057045340538, -0.03797632083296776, 0.018924355506896973, 0.014585662633180618, 0.0015568248927593231, 0.011714469641447067, 0.03437775745987892, -0.040783707052469254, -0.008996406570076942, -0.03435223549604416, 0.022459113970398903, 0.00711417943239212, 0.0044056870974600315, -0.004881029017269611, -0.03958418592810631, 0.00691638607531786, 0.03310167044401169, 0.030141150578856468, 0.03973731771111488, -0.03560280054807663, 0.013373381458222866, 0.013156446628272533, 0.01766102947294712, 0.0092133404687047, -0.0029413781594485044, 0.0015448615886271, 0.00033636827720329165, 0.03228497505187988, -0.008804993703961372, 0.013590315356850624, -0.0027962233871221542, -0.017622748389840126, 0.007458722684532404, 0.013590315356850624, -0.011829317547380924, -0.015287510119378567, -0.011491154320538044, 7.058350456645712e-05, 0.033280324190855026, 0.012346131727099419, 0.014394249767065048, 0.030855759978294373, -0.006571842823177576, -0.02922236919403076, 0.022408070042729378, -0.029911454766988754, -0.014751554466784, 0.0013199514942243695, -0.02165517956018448, -0.06120108440518379, 0.03677679970860481, 0.02748689241707325, -0.021884875372052193, -0.016372183337807655, 0.005573305767029524, -0.018477724865078926, -0.031238585710525513, -0.009889665991067886, 0.027844196185469627, 0.008728427812457085, 0.011637904681265354, 0.027793152257800102, -0.015198184177279472, 0.012473740614950657, 0.037185147404670715, 0.03062606416642666, 0.004884219262748957, 0.012728957459330559, 0.023339612409472466, 0.01173361111432314, 0.03557727858424187, -0.0018726561684161425, -0.027257196605205536, 0.01698470488190651, -0.0032077610958367586, -0.05219191685318947, -0.011082806624472141, -0.018860550597310066, 0.01602764055132866, -0.006801538169384003, 0.0334334522485733, -0.0438973568379879, -0.022165613248944283, -0.047853223979473114, 0.011376306414604187, 0.023314090445637703, -0.015810705721378326, 0.005854044575244188, -0.008326461538672447, 0.04045192524790764, 0.02224217914044857, 0.0654376894235611, 0.013411663472652435, 0.005854044575244188, -0.007535287644714117, 0.004351453389972448, -0.043948400765657425, 0.01006831880658865, -0.06656064838171005, -0.01795453019440174, 0.011280599981546402, 0.005984843242913485, -0.029834890738129616, -0.049486614763736725, 0.004118567332625389, 0.008186091668903828, 0.011133850552141666, 0.03652158007025719, 0.01159324124455452, -0.0037421220913529396, 0.0021023517474532127, -0.04619431123137474, 0.020570505410432816, 0.028278065845370293, -0.0313151516020298, -0.018949877470731735, -0.03596010431647301, -0.017010226845741272, -0.04264679551124573, 0.00124179117847234, -0.03789975494146347, -0.014011424034833908, 0.004711947403848171, -0.046143271028995514, -0.0010846731020137668, 0.02224217914044857, -0.05487169697880745, -0.0017865203553810716, 0.0010639367392286658, 0.005968892015516758, -0.001010500593110919, 0.0026797805912792683, 0.012448218651115894, 0.025343067944049835, 0.007452342193573713, -0.013181968592107296, 0.0011030167806893587, -0.020468419417738914, -0.00412494782358408, 0.027410326525568962, -0.02758897840976715, -0.03243810683488846, 0.034607451409101486, 0.012709815986454487, 0.006705831736326218, -0.037567973136901855, -0.02081296220421791, 0.019524116069078445, 0.01804385520517826, 0.018822267651557922, -0.029145803302526474, 0.0551779568195343, 0.0038027362897992134, 0.019613441079854965, -0.04167696833610535, 0.009570645168423653, 0.006007174961268902, 0.0017865203553810716, 0.010738263837993145, 0.008415787480771542, 0.0009211745928041637, -0.0061092618852853775, 0.0003796355740632862, -0.020481180399656296, -0.009009166620671749, 0.007816026918590069, 0.019064724445343018, -0.019409267231822014, -0.021042658016085625, 0.007343874778598547, -0.0038824917282909155, -0.004412067122757435, 0.023926611989736557, -0.01795453019440174, -0.021412722766399384, 0.013794489204883575, -0.01764826849102974, -0.011612382717430592, -0.025432392954826355, 0.04468853026628494, 0.014534619636833668, -0.011369925923645496, -0.03904823213815689, -0.02539411187171936, -0.01604040153324604, -0.0038473992608487606, 0.013985902070999146, 0.03700649365782738, 0.020251484587788582, -0.0002775487082544714, -0.023033352568745613, -0.030575020238757133, 0.002730824053287506, -0.002277813386172056, -0.0017115502851083875, 0.013220250606536865, -0.006479326635599136, -0.021336156874895096, 0.01567033678293228, -0.010846731252968311, 0.013960381038486958, 0.004549246747046709, -0.01235251221805811, -0.015210945159196854, 0.045479703694581985, 0.01140820886939764, -0.005700914189219475, -0.013335098512470722, 0.002288979245349765, 0.014713271521031857, 0.017035748809576035, 0.025075089186429977, 0.023263048380613327, 0.023339612409472466, 0.02626184932887554, -0.002646283246576786, 0.048899613320827484, 0.004153660032898188, 0.025891784578561783, -0.02252291701734066, -0.0027132779359817505, -0.026312893256545067, -0.015274749137461185, -0.01746961660683155, 0.037950798869132996, -0.002606405643746257, -0.039456579834222794, -0.0008589653880335391, -0.006718592718243599, -0.01421559788286686, 0.045479703694581985, -0.0024229681584984064, 0.008039341308176517, -0.026874370872974396, -0.03044741228222847, -0.007458722684532404, 0.04236605390906334, -0.050150178372859955, 0.03330584615468979, -0.019358225166797638, -0.006833440624177456, -0.009583406150341034, -0.0036049429327249527, 0.02473054639995098, 0.03884405642747879, 0.020570505410432816, 0.04782770201563835, 0.00477575184777379, 0.02177002653479576, 0.009443036280572414, -0.03618979826569557, 0.014470814727246761, 0.012103675864636898, -0.0067441146820783615, 0.022854700684547424, -0.010361818596720695, -0.028482239693403244, -0.004603479988873005, 0.004794893320649862, 0.010100220330059528, -0.004077094607055187, -0.020111115649342537, 0.01926889829337597, 0.011963305994868279, 0.03519445285201073, -0.022101810202002525, 0.10285253077745438, -0.010999861173331738, 0.001925294753164053, 0.019932463765144348, 0.023454461246728897, 0.0383591465651989, -0.0009969421662390232, -0.0016158438520506024, -0.018094899132847786, 0.010655318386852741, -0.016742248088121414, -0.005445696879178286, -0.011197654530405998, -0.03636845201253891, -0.004635382443666458, 0.008084004744887352, 0.060741692781448364, 0.010221448726952076, -0.009896046482026577, -0.0033433453645557165, -0.014292162843048573, -0.025815218687057495, 0.031136497855186462, -0.021234070882201195, -0.002600025152787566, -0.05142626538872719, 0.01350098941475153, 0.018273551017045975, 0.0010615440551191568, 0.012913989834487438, -0.02470502443611622, -0.030217716470360756, -0.031085453927516937, -0.03902271017432213, -0.03738931939005852, 0.003512426745146513, -0.026414979249238968, -0.00949408020824194, 0.01513438019901514, 0.0007341481978073716, 0.0006380429840646684, -0.03299958258867264, -0.03447984158992767, -0.007101418450474739, -0.01754618249833584, -0.0015456591499969363, 0.036649189889431, -0.02996249869465828, 0.03715962544083595, 0.0048204148188233376, 0.011752751655876637, 0.0400690995156765, -0.015261988155543804, 0.000445832556579262, -0.0031327910255640745, 0.009002787061035633, -0.015083336271345615, 0.03728723153471947, -0.013934859074652195, -0.02483263425529003, -0.006827060133218765, 0.0005403426475822926, 0.026466023176908493, -0.016869856044650078, -0.021055418998003006, -0.001647746074013412, -0.013437185436487198, 0.034403279423713684, -0.007503385655581951, 0.005617968738079071, -0.021629657596349716, 0.01125507801771164, 0.011293360963463783, -0.024118024855852127, 0.018758464604616165, 0.010859491303563118, -0.01605316251516342, 0.021502049639821053, -0.0036496059037745, -0.017112312838435173, 0.012448218651115894, -0.009130395017564297, -0.016065923497080803, 0.010030035860836506, -0.023250287398695946, 0.01421559788286686, -0.00439292611554265, -0.008122287690639496, 0.022484635934233665, -0.008517874404788017, 0.025240980088710785, -0.02080020122230053, 0.0010766976047307253, -0.015695856884121895, -0.014534619636833668, -0.03647053614258766, -0.000130699118017219, 0.028405673801898956, 0.011491154320538044, -0.007101418450474739, -0.011044524610042572, -0.016091443598270416, -0.009028308093547821, 0.024066980928182602, -0.03159588947892189, 0.013909337110817432, -0.018248029053211212, -0.004077094607055187, -0.008568917401134968, -0.02212733030319214, 0.000807523145340383, 0.007975537329912186, 0.00486826803535223, 0.04849126935005188, 0.011944164521992207, 0.017775878310203552, -0.015236467123031616, 0.016474269330501556, 0.01879674568772316, 0.03006458654999733, -0.019358225166797638, -0.009519601240754128, -0.01517266221344471, 0.010336296632885933, 0.029094761237502098, 0.007299211807549, -0.005637109745293856, -0.01344994641840458, -0.02231874316930771, 0.010712741874158382, 0.005461648106575012, 0.012065392918884754, -0.02912028320133686, 0.0125120235607028, 0.02557276375591755, -0.036980971693992615, 0.05686239153146744, 0.0038729209918528795, 0.047955311834812164, 0.00047015794552862644, 0.03521997481584549, 0.017329247668385506, -0.019817614927887917, -0.00413132831454277, 0.019447550177574158, 0.013245772570371628, 0.02291850373148918, -0.015823466703295708, -0.02566208876669407, 0.04019670933485031, -0.013539272360503674, -0.04272335767745972, -0.0033784375991672277, -0.01456014160066843, 0.01049580704420805, 0.012473740614950657, 0.04139623045921326, -0.008907080627977848, -0.011248698458075523, -0.011822937056422234, 0.024590177461504936, 0.010470285080373287, -0.008460449986159801, 0.017775878310203552, -0.0022395309060811996, 0.057985346764326096, 0.025049567222595215, 0.0029700901359319687, 0.0014643087051808834, -0.01498124934732914, -0.018184226006269455, -0.014432532712817192, 0.023901090025901794, 0.005554164294153452, -0.008734808303415775, -0.004332311917096376, -0.003968627657741308, 0.00189020240213722, -0.024105263873934746, -0.023403417319059372, -0.036036666482686996, -0.019690006971359253, 0.009283525869250298, -0.01313092466443777, -0.0005303732468746603, 0.0008047317387536168, 0.0027738919015973806, -0.005372322164475918, 0.009430275298655033, -0.023033352568745613, -0.03491371124982834, 0.01217386033385992, 0.007356635760515928, -0.011956925503909588, -0.022561199963092804, 0.011727230623364449, -0.008607200346887112, 0.016742248088121414, -0.011089187115430832, 0.006386810448020697, -0.018937116488814354, 0.007522527128458023, 0.022012483328580856, 0.04226396977901459, -0.05956769362092018, -0.025521719828248024, 0.02243359200656414, 0.0037261710967868567, 0.023352373391389847, 0.03667471185326576, -0.014126271940767765, 0.0032619948033243418, -0.007241787854582071, -0.020825723186135292, -0.03315271437168121, -0.011350784450769424, -0.006648407783359289, -0.02080020122230053, -0.01178465411067009, 0.03141723573207855, 0.020940570160746574, -0.024373242631554604, -0.00877947174012661, 0.012224903330206871, -0.036215320229530334, -0.007324733771383762, 0.04897617921233177, -0.03662366792559624, -0.0165125522762537, -0.030141150578856468, -0.0004681640421040356, 0.0034709537867456675, -0.015249227173626423, 0.0005758337792940438, 0.01813318207859993, -0.044611964374780655, 0.0030721770599484444, 0.014241119846701622, 0.008887939155101776, -0.018196986988186836, -0.000594975077547133, 0.0172654427587986, 0.008983645588159561, 0.01947307214140892, -0.013207489624619484, -0.011625143699347973, -0.0082052331417799, 0.041268620640039444, 0.010438383556902409, -0.04849126935005188, -0.010438383556902409, -0.028865065425634384, 0.02863536961376667, 0.013047979213297367, 0.022561199963092804, 0.030370846390724182, -0.052625786513090134, 0.013717924244701862, 0.0007018473115749657, 0.019715528935194016, -0.0332292802631855, 0.004472681321203709, 0.00710779894143343, 6.860208486614283e-06, -0.034505363553762436, 0.01612972654402256, 0.023722438141703606, -0.020749157294631004, -0.031187541782855988, -0.016844335943460464, -0.030039064586162567, 0.0020640690345317125, 0.04818500578403473, -0.01011298131197691, -0.03256571292877197, 0.02756345644593239, 0.0175717044621706, 0.013679642230272293, -0.009296286851167679, -0.008926221169531345, -0.018005574122071266, -0.028482239693403244, 0.006737734191119671, 0.019702767953276634, -0.015453401021659374, -0.020098354667425156, -0.02128511480987072, -0.042136359959840775, 0.002968495013192296, -0.010189546272158623, 0.03146827965974808, -0.02242083102464676, -0.006032696459442377, 0.019524116069078445, -0.007439581211656332, -0.013603076338768005, -8.130063361022621e-05, 0.00182480295188725, -0.01928165927529335, -0.003923964221030474, -0.027078544721007347, 0.021923156455159187, -0.013398902490735054, -0.018082138150930405, -0.03159588947892189, -0.00020028567814733833, -0.014828119426965714, -0.011663425713777542, -0.017290964722633362, 0.04660265892744064, 0.004603479988873005, -0.03136619180440903, -0.012027110904455185, -0.0006264784606173635, -0.01967724598944187, -0.023735199123620987, 0.017316486686468124, -0.013194729574024677, 0.005598827265202999, -0.02922236919403076, -0.03960970789194107, -0.010699980892241001, 0.026032153517007828, -0.015797944739460945, 0.00902192760258913, -0.004632192198187113, -0.02797180414199829, 0.048338137567043304, -0.01083397027105093, 0.012537544593214989, 0.014917445369064808, 0.012658772990107536, -0.0022060335613787174, -0.0020736397709697485, 0.007152461912482977, 0.002877573948353529, 0.0005826129927299917, -0.002545791445299983, 0.010604274459183216, 0.00048132368829101324, -0.02566208876669407, -0.02626184932887554, 0.033458974212408066, 0.0016764579340815544, -0.007745841983705759, 0.011663425713777542, -0.010093839839100838, 0.007229027338325977, 0.005094773136079311, 0.01307988166809082, -0.010400100611150265, -0.008530634455382824, 0.012460979633033276, 0.03481162711977959, -0.01669120416045189, -0.020060071721673012, -0.04361661896109581, 0.012486501596868038, 0.014751554466784, -0.0005730423727072775, -0.01813318207859993, -0.0003124416689388454, 0.011082806624472141, 0.015198184177279472, 0.03710858151316643, -0.022076288238167763, -0.021693462505936623, -0.020277006551623344, 0.01031077466905117, 0.015708617866039276, 0.01493020635098219, 0.03305062651634216, -0.01584898866713047, -0.047674573957920074, 0.019051963463425636, 0.0022650526370853186, 0.027078544721007347, 0.022931264713406563, -0.011759132146835327, 0.023684155195951462, 0.014623945578932762, -0.016665682196617126, 0.015427879989147186, 0.008549775928258896, -0.01698470488190651, 0.004086665343493223, 0.00802020076662302, -0.023135438561439514, -0.005828522611409426, 0.008135047741234303, -0.009098493494093418, -0.01937098614871502, -0.017980052158236504, -0.019128529354929924, 0.016180770471692085, -0.005972082260996103, 0.0016206292202696204, 0.010023655369877815, 0.013577555306255817, 0.015619292855262756, 0.01216109935194254, 0.00749062467366457, -0.008900700137019157, -0.01965172402560711, 0.020264245569705963, 0.04277440160512924, 0.011204035021364689, 0.025036806240677834, -0.003017943352460861, -0.011503915302455425, 0.008913460187613964, 0.015593770891427994, -0.02319924347102642, 0.008862417191267014, -0.023645874112844467, -0.041268620640039444, -0.023645874112844467, 0.021782787516713142, -0.011382686905562878, 0.027844196185469627, -0.02661915309727192, -0.014139032922685146, -0.01888607256114483, -0.03083023801445961, 0.02155309170484543, -0.00974291656166315, 0.0004314765683375299, 0.04236605390906334, 0.012409936636686325, 0.007905352860689163, -0.013552033342421055, 0.011114709079265594, -0.006182636599987745, -0.018375638872385025, 0.012224903330206871, -0.015568248927593231, 0.046245355159044266, 0.010342677123844624, -0.032131846994161606, 0.04468853026628494, -0.03414805978536606, 0.015797944739460945, 0.03968627378344536, -0.025164416059851646, -0.001960386987775564, -0.016627401113510132, 0.013666881248354912, 0.00012691074516624212, 0.029988020658493042, 0.029145803302526474, 0.012384414672851562, 0.012148338370025158, 0.007675657048821449, 0.027231674641370773, 0.011918643489480019, -0.011944164521992207, 0.026312893256545067, -4.9498179578222334e-05, 0.021642418578267097, 0.04205979406833649, 0.011676186695694923, -0.03185110539197922, -0.0313151516020298, -0.0005953738582320511, 0.012913989834487438, 0.0553821325302124, -0.02689989283680916, -0.002170941326767206, 0.02873745560646057, -0.03407149761915207, 0.007056755479425192, 0.0028807641938328743, -0.03894614428281784, 0.0013351049274206161, 0.0007333506946451962, -0.0272827185690403, 0.010527709499001503, -0.020213201642036438, 0.010891393758356571, -0.0010192736517637968, 0.0031758591067045927, -0.02527926303446293, -0.030702628195285797, 0.027461370453238487, -0.03846123069524765, -0.022765373811125755, -0.058853086084127426, 0.023786243051290512, 0.0074012987315654755, -0.00206247391179204, 0.029477586969733238, -0.01614248752593994, 0.007637374568730593, -0.003758073318749666, -0.027895240113139153, 0.0013079881900921464, 0.005458457861095667, 0.006737734191119671, 0.015057814307510853], "index": 18}, {"title": "Foreign Economic Administration", "text": "In the administration of Franklin Delano Roosevelt, the Foreign Economic Administration was formed to relieve friction between US agencies operating abroad. As described by the biographer of the FEA's chief, Leo Crowley, the agency was designed and run by \"The Nation's #1 Pinch-hitter\".S. L.", "vector": [-0.005764643661677837, 0.010161272250115871, -0.010556652210652828, -0.024418683722615242, -0.006618665065616369, -0.008374153636395931, -0.03770345821976662, 0.011015293188393116, -0.07793734967708588, 0.03077639639377594, 0.010865048505365849, 0.030048897489905357, -0.06439953297376633, -0.049375083297491074, 0.0011129953199997544, 0.0183772724121809, -0.041593998670578, 0.00693101529031992, -0.0027399850077927113, -0.030586615204811096, -0.011719070374965668, -0.03982269763946533, 0.012051189318299294, -0.02067047916352749, 0.010888771153986454, 0.029827484861016273, -0.013181976974010468, 0.01298428699374199, 0.024434497579932213, 0.025051292032003403, 0.019183848053216934, 0.01951596885919571, 0.018092598766088486, -0.030681505799293518, 0.01719113253057003, -0.01060409750789404, 0.01654270850121975, -0.012936840765178204, -0.007456871215254068, -0.004250337369740009, -0.0004571583995129913, 0.000445791200036183, -0.044662151485681534, 0.06443116068840027, 0.041119541972875595, 0.047635409981012344, -0.061932358890771866, 0.019642489030957222, 0.011149722151458263, 0.015206323936581612, 0.002866506576538086, -0.03669128566980362, -0.022631565108895302, 0.02906835451722145, 0.02785058319568634, -0.0072196428664028645, 0.059496816247701645, 0.03022286482155323, -0.0486159548163414, -0.0050371442921459675, 0.02378607541322708, -0.049786277115345, -0.040044110268354416, -0.018551239743828773, -0.004388720728456974, 0.02894183248281479, 0.018108414486050606, 0.03131411597132683, 0.017950262874364853, -0.01418624259531498, -0.0148267587646842, 0.009259805083274841, -0.029368843883275986, 0.0377667210996151, -0.04273269698023796, -0.05019747465848923, 2.990062967000995e-05, -0.043586716055870056, -0.0005050982581451535, 0.010208717547357082, -0.007247319445014, -0.0001155869395006448, 0.01660596951842308, 0.014352302066981792, 0.007472686469554901, -0.004143584985285997, -0.03482509031891823, -0.05807344987988472, 0.0009172821301035583, -0.002866506576538086, -0.011916760355234146, 0.030317755416035652, -0.04456726089119911, 0.00831880047917366, 0.05336051434278488, 0.010248255915939808, -0.0711684376001358, 0.007638745941221714, -0.0011723024072125554, -0.01330059114843607, -0.05272790789604187, 0.01668504625558853, -0.07363561540842056, -0.005871396511793137, -0.013189884833991528, 0.037608567625284195, -0.038715630769729614, 0.02082863077521324, -0.022346891462802887, 0.13208863139152527, -0.04902714863419533, -0.029874930158257484, 0.03555259108543396, 0.014107166789472103, 0.029890745878219604, 0.0534554086625576, 0.024497758597135544, 0.028103627264499664, -0.0002970293862745166, 0.028309224173426628, 0.02136634849011898, -0.017412545159459114, 0.02957444079220295, 0.038241174072027206, 0.008014357648789883, 0.029305582866072655, 0.01181396096944809, 0.05275953933596611, 0.01959504373371601, -0.038146283477544785, -0.05921214446425438, -0.002524502808228135, 0.0437764972448349, -0.009615647606551647, 0.009860782884061337, -0.012573091313242912, -0.005487877409905195, -0.009829152375459671, 0.01831401139497757, 0.04583247750997543, 0.026316508650779724, 0.03922171890735626, -0.03311704844236374, 0.0017189155332744122, 0.0018968366784974933, -0.055353231728076935, 0.04804660379886627, -0.026743518188595772, -0.021571945399045944, 0.004792008548974991, -0.023928411304950714, 0.025114553049206734, 0.017001349478960037, -0.0005243730265647173, -0.007437102030962706, -0.061299752444028854, 0.012059097178280354, 0.005187388509511948, -0.006685879547148943, 0.035331178456544876, -0.01715950109064579, 0.01271542813628912, -0.02378607541322708, 0.012620536610484123, -0.009354696609079838, 0.008903962559998035, 0.019310370087623596, -0.000600977975409478, -0.05864279717206955, 0.025288520380854607, 0.04330204427242279, 0.00914119090884924, 0.0039063566364347935, -0.009157005697488785, -0.00028862757608294487, -0.031677864491939545, 0.009299343451857567, 0.025826236233115196, 0.004183122888207436, -0.01149765681475401, 0.007448963355273008, 0.027391942217946053, -0.011212983168661594, 0.05687149241566658, 0.003200602950528264, 0.0007250285125337541, -0.005183434579521418, -0.004958068020641804, -0.00280917645432055, -0.017618143931031227, 0.017317654564976692, 0.03419248387217522, 0.024766618385910988, 0.037608567625284195, 0.038778893649578094, 0.0012088750954717398, -0.01334803644567728, 0.043555084615945816, 0.007848297245800495, -0.008279262110590935, 0.01668504625558853, 0.022837162017822266, 0.04731910675764084, 0.01831401139497757, 0.010627820156514645, 0.028688790276646614, 0.028894387185573578, -0.061932358890771866, -0.03202579915523529, 0.035805635154247284, 0.03205743059515953, -0.08382061123847961, 0.02125564031302929, -0.02131890133023262, -0.050102584064006805, 0.010453852824866772, -0.009560293518006802, 0.013949014246463776, -0.0022081986535340548, 0.012628444470465183, -0.03030194155871868, 0.019231295213103294, -0.024134010076522827, 0.007520131766796112, -0.0055432310327887535, -0.028862757608294487, 0.01451836246997118, -0.0034417849965393543, -0.00394391780719161, 0.008176462724804878, -0.03688106685876846, 0.060635510832071304, 0.0037897194270044565, 0.03656476363539696, -0.04576921463012695, 0.022362705320119858, 0.002350535476580262, -0.033433351665735245, -0.047603778541088104, 0.037608567625284195, -0.012501922436058521, 0.026838410645723343, -0.026411399245262146, -0.01779210940003395, 0.02611090987920761, 0.024703357368707657, -0.022789716720581055, -0.010248255915939808, -0.01589428447186947, 0.028672974556684494, 0.02082863077521324, -0.03371802717447281, 0.0064842356368899345, 0.005661844741553068, 0.02258411794900894, 0.06775235384702682, 0.008437413722276688, -0.030412647873163223, -0.004744562786072493, 0.015506812371313572, 0.010311516001820564, -0.007504316978156567, 0.005321817938238382, 0.03318030759692192, -0.0392533503472805, -0.02788221463561058, 0.01245447713881731, -0.03257933259010315, 0.039316609501838684, -0.026743518188595772, -0.009497033432126045, -0.02305857464671135, 0.043555084615945816, 0.05500529706478119, -0.017602328211069107, 0.013253144919872284, 0.003406200557947159, 0.044029541313648224, 0.0604773610830307, 0.048805736005306244, -0.012541460804641247, 0.024039117619395256, 0.037576936185359955, -0.014795128256082535, -0.07306626439094543, 0.014716052450239658, -0.027107268571853638, -0.038747262209653854, 0.00921235978603363, 0.007195920217782259, -0.016305480152368546, 0.001842471887357533, 0.03722900152206421, 0.028720419853925705, 0.023912595584988594, 0.04580084607005119, 0.003981478977948427, -0.011070646345615387, -0.0008619289146736264, 0.01066735852509737, 0.04453562945127487, 0.034065961837768555, 0.048173125833272934, 0.006175839342176914, -0.02598438784480095, 0.015997083857655525, -0.03732389211654663, -0.01391738373786211, 0.009884505532681942, -0.030934549868106842, 0.03129829838871956, -0.01097575481981039, -0.030428461730480194, -0.03158297389745712, -1.3954141650174279e-05, -0.013490373268723488, 0.016843197867274284, -0.05323399230837822, 0.044693782925605774, -0.07110518217086792, -0.0027360310778021812, 0.03416085243225098, -0.030396832153201103, 0.012794503942131996, 0.009671000763773918, -0.07838017493486404, -0.011133907362818718, -0.04678138718008995, -0.010643635876476765, 0.01769721880555153, -0.005084589589387178, -0.07009300589561462, -0.009006761945784092, 0.025272704660892487, -0.07091540098190308, -0.013759232126176357, -0.044092804193496704, 0.011315782554447651, -0.0022338982671499252, 0.007136613130569458, 0.0190415121614933, 0.0038035577163100243, -0.023232541978359222, 0.0022655287757515907, -0.02482987754046917, 0.00215284526348114, -0.011616270989179611, -0.010216625407338142, 0.0019383515464141965, -0.04153073951601982, 0.0008930650656111538, -0.01589428447186947, 0.025272704660892487, 0.000450239225756377, 0.03264259174466133, -0.011711162514984608, -0.012952656485140324, -0.011157630011439323, 0.01041431538760662, 0.05513181909918785, 0.03387617692351341, 0.029226506128907204, 0.02184080332517624, 0.037576936185359955, -0.05209529772400856, 0.013427112251520157, -0.027471018955111504, -0.021144933998584747, -0.012509830296039581, -0.005175527185201645, -0.02495639957487583, 0.0018345642602071166, 0.04096139222383499, -0.028071995824575424, 0.024466129019856453, -0.01711205579340458, -0.03447715565562248, -0.002089584479108453, 0.012240971438586712, 0.0007996564963832498, -0.039885956794023514, -0.02120819501578808, -0.016321295872330666, 0.038905415683984756, 0.015158877708017826, -0.04674975946545601, -0.0248140636831522, 0.03270585089921951, 0.013015917502343655, 0.009868690744042397, -0.04798334464430809, -0.0065514505840837955, -0.05402475595474243, -0.0296535175293684, -0.05506855994462967, -0.06724626570940018, 0.027123084291815758, 0.028103627264499664, 0.012604721821844578, 0.005748828407377005, -0.0133638521656394, 0.00856393575668335, 0.002660908969119191, -0.01774466410279274, -0.012976379133760929, -0.049343451857566833, -0.024545203894376755, 0.016938088461756706, -0.008951408788561821, 0.05339214578270912, -0.02258411794900894, -0.04197356477379799, 0.016795752570033073, -0.024640096351504326, 0.03545770049095154, 0.02664862759411335, -0.04425095394253731, -0.008160647936165333, -0.021635206416249275, -0.014391840435564518, -3.496644058031961e-05, 0.04697117209434509, 0.004657579120248556, 0.013158254325389862, 0.05057704076170921, 0.015103524550795555, -0.0032045566476881504, -0.03612193837761879, 0.006049317307770252, -0.01097575481981039, 0.023817704990506172, -0.01891499012708664, -0.017017165198922157, 0.019231295213103294, 0.017649773508310318, -0.014605345204472542, 0.03023868054151535, 0.017396729439496994, 0.002854645252227783, 0.0023900733795017004, -0.006480282172560692, -0.007310580462217331, 0.0097737992182374, -0.0472874753177166, -0.057630620896816254, 0.0002799786161631346, 0.009038392454385757, 0.05386660248041153, 0.044092804193496704, 0.008975131437182426, -0.05408801510930061, -0.02544667199254036, -0.023343248292803764, -0.003350847400724888, -0.00855602789670229, 0.03390780836343765, 0.012644260190427303, -0.037545304745435715, -0.012628444470465183, 0.003532722359523177, -0.011924667283892632, 0.035299547016620636, 0.061236489564180374, -0.023343248292803764, -0.013632710091769695, -0.009931951761245728, -0.006120485719293356, -0.01603662222623825, -0.01298428699374199, -0.029732592403888702, -0.030554983764886856, 0.010793880559504032, 0.016432002186775208, 0.025241073220968246, 0.0015528558287769556, 0.048268020153045654, 0.021050043404102325, -0.06110996752977371, 0.03327520191669464, 0.0007151439785957336, -0.03189927712082863, -0.005072728265076876, 0.06231192499399185, -0.004701070953160524, 0.0037007590290158987, -0.048900626599788666, -0.022062215954065323, 0.028767865151166916, -0.03564748167991638, 0.0031689724419265985, 0.05260138586163521, -0.012114450335502625, -0.0059900106862187386, -0.00952075608074665, -0.015459367074072361, -0.003779835067689419, -0.026490475982427597, 0.03716574236750603, 0.0007620953838340938, -0.008093433454632759, -0.013775046914815903, 0.004507334437221289, 0.028119441121816635, -0.06392507255077362, -0.022014770656824112, 0.013197791762650013, 0.044693782925605774, 0.0019205594435334206, -0.0025541563518345356, -0.013585264794528484, 0.016384556889533997, 0.0377667210996151, -0.004479657858610153, -0.0008149775094352663, -0.002188429469242692, 0.003083965741097927, 0.03215232118964195, 0.0159575454890728, 0.0017762456554919481, 0.02720215916633606, -0.004179168958216906, 0.05870605632662773, 0.01708042621612549, -0.02008531615138054, 0.08723669499158859, -0.0033034018706530333, 0.007302672602236271, 0.0182981975376606, -0.01719113253057003, -0.040581826120615005, 0.024371236562728882, -0.010572466999292374, 0.02728123590350151, 0.02781895361840725, 0.0009874621173366904, 0.02369118295609951, -0.00021894180099479854, 0.004111954476684332, -0.011639993637800217, -0.04599062725901604, -0.0032757252920418978, -0.019800642505288124, 0.030507538467645645, -0.033401720225811005, -0.0272337906062603, 0.006764955818653107, 0.04456726089119911, -0.000455675704870373, 0.012865672819316387, -0.0011624179314821959, 0.030539168044924736, -0.016859013587236404, -0.0342557430267334, 0.07534365355968475, 0.06762583553791046, -0.004677348304539919, 0.0028783681336790323, 0.013197791762650013, 0.004606179893016815, -0.003467484610155225, 0.02952699549496174, -0.018171675503253937, 0.003030589548870921, -0.0016724583692848682, -0.04633856192231178, 0.019231295213103294, -0.03139318898320198, 0.0004675371164921671, -0.0546257309615612, 0.007583392783999443, 0.009560293518006802, 0.02362792193889618, 0.0005960356793366373, -0.008943500928580761, -0.031235037371516228, -0.014573715627193451, 0.007583392783999443, 0.005748828407377005, -0.0035030688159167767, 0.008334615267813206, 0.022900423035025597, -0.0427643246948719, 0.014043905772268772, 0.011268336325883865, -0.011442303657531738, 0.026443028822541237, 0.013332221657037735, 0.010319423861801624, 5.136854088050313e-05, -0.015198416076600552, -0.014621160924434662, 0.02663281187415123, -0.006879616063088179, 0.0115688256919384, 0.035805635154247284, 0.018503794446587563, -0.04067671671509743, 0.0027241697534918785, -0.020923521369695663, -0.010517113842070103, 0.012193526141345501, -0.01514306291937828, 0.027534279972314835, 0.039885956794023514, -0.02312183566391468, 0.03779834881424904, -0.04077161103487015, -0.05642866715788841, 0.0029554672073572874, -0.021508684381842613, 0.0738253965973854, -0.011861407198011875, 0.004270106554031372, 0.004404535982757807, 0.03447715565562248, 0.012517738156020641, -0.004708978347480297, -0.004432212561368942, -0.006278638262301683, -0.019832272082567215, 0.03751367703080177, -0.03359150514006615, -0.009410049766302109, 0.025731345638632774, 0.013205699622631073, -0.018804283812642097, 0.00856393575668335, -0.0079787727445364, -0.0011327643878757954, -0.0020144623704254627, -0.028056181967258453, 0.050070952624082565, -0.00976589135825634, -0.0011584641179069877, 0.013688063248991966, 0.04210008680820465, 0.014684421941637993, -0.022979499772191048, 0.009378419257700443, -0.02435542270541191, 0.04108791425824165, -0.020860260352492332, -0.007860158570110798, 0.011584640480577946, 0.0017604305176064372, -0.032864004373550415, 0.003995317034423351, -0.02068629302084446, 0.009576109237968922, -0.011125999502837658, -0.01298428699374199, -0.040455304086208344, -0.0018553216941654682, 0.0031096655875444412, 0.012343770824372768, -0.017491621896624565, 0.02133471705019474, -0.018124230206012726, 0.029400473460555077, -0.002504733856767416, -0.03151971101760864, 0.03025449439883232, 0.018108414486050606, -0.02607928030192852, 0.005816043354570866, -0.02073373831808567, -0.024118194356560707, 0.008722088299691677, 0.05617562308907509, -0.0005204192129895091, 0.035141393542289734, 0.009868690744042397, 0.01883591338992119, 0.010319423861801624, -0.00430569052696228, 0.006776817142963409, 0.015751948580145836, 0.020037870854139328, 0.02734449692070484, 0.014621160924434662, -0.034666936844587326, -0.009718446061015129, 0.024070749059319496, -0.05136780068278313, -0.0034971381537616253, -0.00530204875394702, -0.022663194686174393, -0.02968514710664749, -0.012944748625159264, -0.028688790276646614, -0.024023301899433136, -0.0008149775094352663, 0.008437413722276688, -0.014225780963897705, -0.019990423694252968, -0.03330682963132858, 0.02302694506943226, 0.0033587550278753042, -0.047129321843385696, 0.0731927901506424, -0.028862757608294487, -0.0006919153966009617, -0.025794606655836105, -0.030064713209867477, 0.02957444079220295, -0.018045153468847275, -0.013150346465408802, -0.031662046909332275, -0.013387574814260006, -0.02541504055261612, -0.0059267496690154076, -0.03077639639377594, -0.02255248837172985, 0.0017683380283415318, 0.0023011129815131426, 0.0004326942435000092, 0.009259805083274841, -0.019895533099770546, -0.06787887960672379, -0.0004766802885569632, 0.004368951544165611, 0.014320671558380127, 0.02244178205728531, -0.006266776472330093, -0.0365963950753212, -0.021192381158471107, -0.005740921013057232, -0.016171051189303398, -0.01655852422118187, -0.0071721975691616535, 0.002908021677285433, 0.021192381158471107, -0.007017998956143856, 0.022773901000618935, 9.384102304466069e-05, 0.03903193771839142, 0.012059097178280354, 0.04545291140675545, -0.021192381158471107, 0.04304900020360947, 0.01953178271651268, 0.019373631104826927, 0.012501922436058521, -0.01214608084410429, -0.024750802665948868, 0.00945749506354332, 0.033401720225811005, 0.025715529918670654, -0.008548120968043804, -0.007856205105781555, 0.002635209122672677, -0.044219326227903366, -0.013719693757593632, 0.008231816813349724, 0.006535635329782963, -0.0031887416262179613, -0.0020658615976572037, -0.07173778861761093, 0.022805532440543175, 0.03684943914413452, -0.02664862759411335, -0.024466129019856453, 0.013126623816788197, -0.027044007554650307, 0.05105149373412132, -0.019800642505288124, 0.03199416771531105, -0.03153552860021591, -0.009275619871914387, 0.02131890133023262, 0.005816043354570866, -0.010153364390134811, -0.05130453780293465, -0.048331279307603836, -0.006741232704371214, -0.004902714863419533, -0.01780792511999607, -0.024007488042116165, 0.028736235573887825, -0.02841993048787117, -0.022093847393989563, 0.011165537871420383, -0.009805429726839066, -0.03131411597132683, -0.028198517858982086, -0.07939235121011734, -0.04383976012468338, -0.02895764820277691, 0.004123815800994635, -0.0017604305176064372, -0.006824262905865908, 0.037608567625284195, -0.021571945399045944, -0.01092040166258812, 0.005867442581802607, -0.03716574236750603, 0.005602537654340267, -0.024418683722615242, -0.045927368104457855, 0.014486731961369514, -0.013174069114029408, 0.006883569993078709, -0.006286545656621456, -0.004325459711253643, -0.013189884833991528, 0.005258556921035051, 0.028846941888332367, -0.012240971438586712, -0.06307105720043182, 0.034097589552402496, -0.01652689278125763, 0.02906835451722145, 0.015530535019934177, 0.028704604133963585, -0.0013798769796267152, 0.03966454416513443, 0.025146182626485825, -0.028040366247296333, -0.024149823933839798, 0.011450211517512798, -0.04665486887097359, 0.04311225935816765, -0.04320714995265007, 0.02721797488629818, 0.01831401139497757, 0.022647378966212273, 0.02432379126548767, -0.01244656927883625, 0.02018020674586296, -0.0202118381857872, -0.004515242297202349, 0.009046299383044243, -0.03254770115017891, -0.011545103043317795, -0.016416186466813087, 0.02081281505525112, 0.04197356477379799, -0.013087085448205471, -0.03387617692351341, 0.043649978935718536, -0.014842573553323746, 0.012248879298567772, -0.012501922436058521, 0.008216001093387604, -0.01834564283490181, 0.01181396096944809, 0.035900525748729706, -0.057630620896816254, -0.01067526638507843, -0.04096139222383499, -0.0001254096714546904, -0.029906559735536575, 0.018029337748885155, -0.02375444397330284, 0.0284831915050745, -0.008690457791090012, -0.03299052640795708, -0.016859013587236404, 0.0005362344090826809, 0.023295802995562553, -0.021461239084601402, 0.044788673520088196, 0.01329268328845501, 0.028894387185573578, 0.0007047652616165578, 0.00215679919347167, -0.009014668874442577, -0.024149823933839798, 0.0012484131148084998, -0.036438241600990295, -0.03963291272521019, -0.010319423861801624, 0.0036434289067983627, 0.002293205354362726, -0.0008896054932847619, -0.006373529322445393, 0.03019123338162899, -0.013276868499815464, 0.041119541972875595, 0.031061070039868355, -0.03305378556251526, 0.011371135711669922, -0.03605867549777031, -0.014059720560908318, 0.0133638521656394, 0.0027676615864038467, -0.001203932799398899, -0.023975856602191925, -0.014684421941637993, -0.03858910873532295, 0.035331178456544876, 0.018661946058273315, 0.01329268328845501, -0.016210589557886124, -0.008587658405303955, -0.007990634068846703, 0.0017268231604248285, 0.0049224840477108955, -0.029827484861016273, 0.02892601676285267, -0.0011475911596789956, 0.01004265807569027, -0.0003281655954197049, -0.014146704226732254, 0.022141292691230774, 0.0027617309242486954, 0.027123084291815758, -0.004788054618984461, -0.013909476809203625, 0.018725207075476646, 0.0354260690510273, -0.008271354250609875, 0.019199663773179054, -0.010208717547357082, 0.002097492106258869, -0.0031867646612226963, -0.0034220158122479916, 0.03193090856075287, -0.013569449074566364, 0.013885753229260445, -0.00025254912907257676, 0.02309020608663559, -0.021113304421305656, -0.03612193837761879, 0.03631171956658363, -0.0015459366841241717, -0.011703254655003548, -0.007947142235934734, 0.019784826785326004, -0.013585264794528484, -0.02955862507224083, -0.017887001857161522, -0.0066542490385472775, -0.03158297389745712, -0.023406509310007095, 0.009338880889117718, -0.061204858124256134, -0.011062738485634327, -0.018598686903715134, 0.0182981975376606, 0.010129641741514206, -0.011276244185864925, 0.012905210256576538, -0.03365476429462433, 0.026269063353538513, -0.03137737512588501, 0.021682651713490486, -0.01187722198665142, 0.012565183453261852, -0.011323689483106136, 0.004254291299730539, 0.006298406980931759, 0.013806677423417568, -0.03745041415095329, 0.010801787488162518, -0.004384766798466444, -0.025003844872117043, -0.0412776954472065, 0.03979106619954109, -0.022283630445599556, -0.022631565108895302, -0.03922171890735626, 0.004649671725928783, -0.002775569213554263, -0.003044427838176489, -0.002271459437906742, -0.04674975946545601, -0.053075842559337616, -0.031187592074275017, 0.0019442823249846697, -0.01714368723332882, 0.014795128256082535, 0.003684943774715066, 0.019879717379808426, -0.0026470706798136234, 0.01391738373786211, -0.01419415045529604, 0.01215398870408535, -0.05582768842577934, 0.01717531681060791, -0.03615356981754303, 0.010762250050902367, 0.01246238499879837, 0.012565183453261852, -0.018234936520457268, 0.019721565768122673, -0.023390693590044975, -0.03672291710972786, -0.03219976648688316, 0.0016981580993160605, -0.03798813372850418, 0.010651543736457825, 0.014486731961369514, -0.013435020111501217, 0.001800956903025508, -0.028008734807372093, 0.01663760095834732, -0.012422846630215645, 0.03205743059515953, 0.007872020825743675, -0.02715471386909485, -0.011260428465902805, -0.04368160665035248, -0.042289867997169495, -0.023248357698321342, -0.008896054700016975, 0.005792320240288973, 0.0003464519395492971, -0.030665690079331398, 0.010018935427069664, -0.018219120800495148, 0.032927267253398895, 0.02065466344356537, 0.0075517622753977776, -0.053645189851522446, -0.006369575392454863, 0.05965496972203255, 0.005313910078257322, -0.016076160594820976, -0.013094993308186531, 0.03735552355647087, -0.022093847393989563, -0.017048794776201248, -0.013427112251520157, -0.018551239743828773, 0.00952866394072771, -0.011948390863835812, -0.003101757960394025, 0.025051292032003403, -0.024655910208821297, -0.003951825201511383, 0.03504650294780731, -0.047603778541088104, 0.002158776158466935, -0.02663281187415123, -0.003795650089159608, -0.005191342439502478, 0.02851482294499874, 0.002949536545202136, -0.014099258929491043, 0.01361689530313015, 0.0012375401565805078, -0.025177812203764915, 0.009924043901264668, -0.02141379378736019, -0.020227652043104172, -0.0159575454890728, -0.0021014458034187555, 0.006942876614630222, -0.02726542018353939, -0.005262510851025581, 0.01591010019183159, 0.020433250814676285, -0.023564660921692848, 0.011695346795022488, 0.009093745611608028, -0.035331178456544876, 0.010588282719254494, 0.008136925287544727, 0.03555259108543396, 0.01780792511999607, -0.028245963156223297, -0.0016665277071297169, -0.01512724719941616, -0.004788054618984461, 0.0007082248339429498, 0.0027241697534918785, -0.025905312970280647, 0.03602704778313637, -0.004191030282527208, -0.007528039626777172, 0.0012424823362380266, -0.02970096282660961, -0.006855892948806286, -0.01391738373786211, 0.017317654564976692, -0.03393943980336189, -0.021587761119008064, 0.017618143931031227, -0.011402766220271587, 0.016400372609496117, 0.011734885163605213, 0.005381125025451183, -0.04928019270300865, 0.014581622555851936, -0.018725207075476646, -0.010841325856745243, 0.00823972374200821, -0.018535425886511803, -0.003062219824641943, -0.006867754738777876, 0.00196998193860054, 0.0039043796714395285, -0.00273405434563756, -0.024592651054263115, -0.01953178271651268, -0.047097694128751755, 0.07287648320198059, 0.0011159606510773301, -0.020575586706399918, 0.0018750907620415092, -0.01276287343353033, 0.018219120800495148, -0.009497033432126045, 0.02195150963962078, 0.037007588893175125, 0.009172821417450905, -0.0008634115802124143, 0.016171051189303398, -0.03501487150788307, 0.004301737062633038, 0.012233064509928226, 0.0044757043942809105, 0.0019027673406526446, 0.005760689731687307, 0.002467172686010599, -0.010698989033699036, -0.0027992920950055122, 0.035868894308805466, 0.004451981279999018, -0.03072895109653473, -0.0236437376588583, -0.00740547152236104, -0.0050331903621554375, 0.0065988958813250065, 0.01951596885919571, -0.020227652043104172, 0.009077929891645908, 0.00370668969117105, 0.015751948580145836, -0.0021231917198747396, -0.007460825145244598, 0.025889497250318527, 0.020480696111917496, 0.010627820156514645, 0.029400473460555077, 0.024418683722615242, 0.001921547926031053, -0.007919466122984886, -0.040455304086208344, -0.010865048505365849, -0.03555259108543396, 0.016171051189303398, 0.007777129299938679, 0.03248443827033043, -0.022299444302916527, 0.028309224173426628, 0.012928933836519718, 0.007650607265532017, 0.019689936190843582, 0.0076150232926011086, 0.006958691868931055, -0.00784039031714201, -0.033464983105659485, -0.021603574976325035, -0.021445423364639282, -0.0018395065562799573, -0.004337321035563946, -0.00855602789670229, -0.02361210808157921, -0.014115073718130589, -0.008026218973100185, -0.03381291776895523, 0.009243989363312721, 0.0023722813930362463, 0.014423470944166183, 0.01602080650627613, -0.022331075742840767, -0.007804805878549814, 0.04637019336223602, 0.01451836246997118, 0.011355319991707802, -0.007520131766796112, -0.004823638591915369, -0.03839932754635811, -0.008690457791090012, 0.014652791433036327, 0.04754051938652992, 0.0002881333348341286, 0.007484547793865204, 0.012051189318299294, 0.04102465137839317, -0.016906458884477615, -0.005436478182673454, -0.012897303327918053, 0.05206367000937462, 0.005582768935710192, 0.014779312536120415, 0.015467274934053421, 0.013577356934547424, 0.048236388713121414, 0.017966076731681824, -0.03212068974971771, 0.016226405277848244, -0.016700860112905502, -0.012588906101882458, -0.03849421814084053, -0.018741022795438766, -0.0036888974718749523, 0.007524085696786642, -0.0026470706798136234, -0.0273128654807806, 0.010872956365346909, 0.007496409118175507, -0.0007754394900985062, 0.04181541129946709, -0.01885172910988331, -0.008022264577448368, -0.013110808096826077, -0.007800851948559284, 0.04848943278193474, -0.032895635813474655, 0.014360209926962852, -0.014581622555851936, -0.049343451857566833, 0.0038035577163100243, 0.014795128256082535, -0.0037323893047869205, 0.04621203988790512, -0.009686815552413464, -0.01665341481566429, 0.018487978726625443, 0.03963291272521019, -0.03327520191669464, 0.016874827444553375, 0.012905210256576538, -0.0010724688181653619, 0.025114553049206734, 0.015261677093803883, 0.04504171386361122, 0.0015311099123209715, 0.014494638890028, 0.035267915576696396, -0.003797627054154873, -0.025842051953077316, 0.007943188771605492, -0.005076682195067406, -0.00489085353910923, -0.020385805517435074, 0.013419205322861671, -0.00012985769717488438, -0.020986782386898994, -0.022900423035025597, -0.03548932820558548, -0.017665589228272438, 0.027059823274612427, 0.018661946058273315, 0.0449468232691288, -0.028562268242239952, 0.044124431908130646, -0.013174069114029408, 0.0022358752321451902, -0.032247211784124374, -0.000688950065523386, 0.022852977737784386, -0.02843574620783329, 0.01387784630060196, -0.013174069114029408, -0.009323066100478172, -0.013387574814260006, 0.022947868332266808, 0.0045271036215126514, 0.04561106488108635, 0.018582871183753014, -0.0006583080976270139, 0.02497221529483795, -0.02019602246582508, -0.025161998346447945, 0.015095616690814495, 0.003779835067689419, 0.003764019813388586, 0.03387617692351341, 0.0034595769830048084, 0.02541504055261612, -0.01946852169930935, 0.0056578912772238255, 0.011015293188393116, -0.002109353430569172, -0.01886754482984543, 0.004254291299730539, 0.05585931986570358, 0.00799458846449852, -0.01847216486930847, 0.0377667210996151, 0.030365200713276863, 0.026221616193652153, 0.0026470706798136234, -0.03072895109653473, -0.028530636802315712, 0.007622930686920881, -0.014937465079128742, 0.01099947839975357, -0.03012797422707081, -0.003449692390859127, -0.007694099098443985, 0.01777629554271698, -0.012573091313242912, 0.01826656609773636, -0.012818226590752602, 0.019310370087623596, 0.047097694128751755, 0.0001424604415660724, 0.008793256245553493, 0.005313910078257322, 0.011608363129198551, -0.02421308495104313, -0.006409113295376301, 0.005262510851025581, -0.025826236233115196, 0.014486731961369514, 0.02062303200364113, -0.017032980918884277, 0.03182020038366318, -0.012573091313242912, -0.018203305080533028, 0.020385805517435074, -0.010952032171189785, -0.02309020608663559, -0.014692328870296478, 0.010058472864329815, -0.006243053823709488, -0.02539922669529915, 0.006788678467273712, 0.0026253247633576393, -0.03087128885090351, -0.002981166820973158, -0.006883569993078709, 0.009125376120209694, 0.001210851944051683, -0.016716675832867622, 0.045263130217790604, -0.02301112934947014, -0.03729226440191269, -0.022821346297860146, 0.025589007884263992, -0.011102276854217052, 0.006847985554486513, -7.598714000778273e-05, -0.00185136788059026, 0.017649773508310318, -0.009805429726839066, 0.024497758597135544, -0.00017792110156733543, 0.011726977303624153, -0.024023301899433136, -0.04023389145731926, -0.00041070120641961694, 0.03767182677984238, 0.01652689278125763, 0.031108517199754715, -0.010169179178774357, 0.009750076569616795, -0.008595566265285015, -0.015111432410776615, 0.011007385328412056, -0.014708144590258598, -0.02422890067100525, -0.008342523127794266, 0.006796586327254772, 0.03903193771839142, 0.012992193922400475, -0.0032638637349009514, -0.008144833147525787, 0.012414938770234585, 0.012509830296039581, -0.005661844741553068, 0.0012148057576268911, -0.018804283812642097, -0.03767182677984238, -0.006685879547148943, 0.016273850575089455, -0.001252366928383708, -0.014075536280870438, -0.01714368723332882, -0.03390780836343765, -0.017507435753941536, -0.0018770676106214523, 0.01592591591179371, 0.020322544500231743, 0.008484859950840473, -0.010485483333468437, 0.024750802665948868, -0.00952866394072771, -0.006919153966009617, 0.023580476641654968, 0.0024375191424041986, 0.00783248245716095, -0.012090727686882019, 0.029985636472702026, 0.03912682831287384, -0.019879717379808426, 0.010256162844598293, 0.026205802336335182, 0.0124070318415761, -0.005796274170279503, -0.013822493143379688, 0.006171885412186384, -0.011845591478049755, -0.036501504480838776, -0.018614500761032104, -0.017301838845014572, -0.031567156314849854, -0.019879717379808426, 0.017507435753941536, -0.009568201377987862, 0.03270585089921951, 0.01575985550880432, -0.023279987275600433, -0.01665341481566429, 0.006405159831047058, 0.00023401567887049168, -0.010445945896208286, 0.0015923938481137156, -0.04899551719427109, 0.022331075742840767, 0.009497033432126045, -0.007812713272869587, 0.0017643842147663236, -0.03564748167991638, -0.02139797806739807, 0.019848087802529335, -0.01660596951842308, -0.0037916963919997215, -0.016969719901680946, -0.016012899577617645, -0.04387139156460762, -0.009046299383044243, -0.030602429062128067, 0.002908021677285433, -0.009259805083274841, -0.0033449167385697365, -0.007006137631833553, 0.012620536610484123, -0.01782374083995819, 0.031630419194698334, -0.006108624394983053, -0.025067105889320374, 0.023343248292803764, -0.026743518188595772, -0.022726455703377724, -0.026221616193652153, -0.03669128566980362, 0.003898449009284377, 0.008057849481701851, -0.00317885703407228, -0.029906559735536575, -0.0031966492533683777, 0.01419415045529604, -0.018788468092679977, -0.0231376513838768, 0.020543957129120827, -0.02547830156981945, -0.02242596633732319, -0.004372905474156141, 0.0021409839391708374, 0.017665589228272438, -0.03280074521899223, 0.0014095305232331157, -0.04858432337641716, -0.02307439036667347, 0.002913952339440584, -0.015886377543210983, -0.013110808096826077, -0.01709624193608761, -0.007267088629305363, 0.009987304918467999, -0.00825553946197033, 0.015562165528535843, 0.00042725776438601315, 0.0023703044280409813, 0.002467172686010599, 0.0499444305896759, -0.03488835319876671, -0.01900988072156906, -0.00017977444804273546, -0.006460512988269329, -0.01182977668941021, 0.022805532440543175, -0.03830443695187569, -0.028103627264499664, 0.05225345119833946, 0.0024394961073994637, -0.03621682897210121, 0.004578502848744392, -0.00030345431878231466, 0.029463734477758408, 0.015886377543210983, 0.019120587036013603, 0.02611090987920761, 0.026854224503040314, -0.016985533758997917, 0.027676615864038467, -0.03390780836343765, -0.021682651713490486, -0.03077639639377594, 0.010849233716726303, -0.01188512984663248, -0.02775569260120392, 0.04203682765364647, -0.002904067747294903, 0.01961085945367813, 0.0277398768812418, 0.05497366562485695, -0.03868400305509567, -0.0010181041434407234, 0.03801976144313812, -0.0195475984364748, 0.028752049431204796, -0.013893661089241505, 0.011766515672206879, 0.013442927971482277, -0.02078118547797203, -0.010319423861801624, 0.0029613978695124388, -0.00887233205139637, -0.04383976012468338, 0.02718634530901909, 0.03196253627538681, 0.008729995228350163, 0.038209546357393265, -0.009615647606551647, -0.0006795597728341818, -0.015609611757099628, -0.0012869626516476274, -0.009536570869386196, -0.01004265807569027, -0.02729705162346363, -0.011655809357762337, -0.006417021155357361, -0.010888771153986454, 0.00013714752276428044, -0.001360108028165996, 0.029179060831665993, -0.007911558263003826, -0.0065435427241027355, 0.017554882913827896], "index": 19}, {"title": "Wenceslaus III of Bohemia", "text": "Wenceslaus III (Czech: V\u00e1clav III., Hungarian: Vencel, Polish: Wac\u0142aw, Slovak: V\u00e1clav; 6 October 1289 \u2013 4 August 1306) was King of Hungary between 1301 and 1305, and King of Bohemia and Poland from 1305. He was the son of Wenceslaus II, King of Bohemia, who was later also crowned king of Poland, and Judith of Habsburg. Still a child, Wenceslaus was betrothed to Elizabeth, the sole daughter of Andrew III of Hungary.", "vector": [0.0009226285619661212, -0.005976993124932051, -0.01476205699145794, 0.03747594356536865, 0.04673995450139046, 0.0049010030925273895, 0.0018583789933472872, -0.05267101898789406, 0.01840992644429207, -0.01265600323677063, -0.0056587886065244675, 0.04482416808605194, -0.045244064182043076, 0.018974164500832558, 0.013948503881692886, 0.0277657900005579, -0.03545518219470978, 0.037370968610048294, -0.054481834173202515, 0.003365749027580023, -0.06015046313405037, 0.005055184476077557, -0.058470867574214935, 0.004914124961942434, 0.053327109664678574, -0.022307109087705612, 0.011101067066192627, 0.0201288852840662, -0.07731381058692932, 0.04532279446721077, 0.0002995467511937022, -0.0006741339457221329, 0.014276549220085144, -0.020325712859630585, -0.0012383725261315703, -0.07789117097854614, 0.047920916229486465, -0.03821076452732086, 0.0103793665766716, -0.005609581712633371, -0.008266751654446125, -0.016389163210988045, 0.0006847954355180264, -0.02275324985384941, 0.009060622192919254, -0.05358954891562462, 0.0009701952221803367, 0.01659911312162876, -0.010412170551717281, 0.004632005468010902, 0.008233947679400444, 0.012813465669751167, -0.01944654993712902, 0.03369685634970665, -0.011967107653617859, -0.05537411570549011, -0.01177684124559164, 0.02616492658853531, 0.0033624686766415834, 0.00317056174390018, -0.018685484305024147, -0.008457018062472343, -0.01419781893491745, 0.002995057264342904, 0.010392487980425358, -0.03157112002372742, -0.04736980050802231, -0.0032853777520358562, -0.010215343907475471, 0.007722196169197559, 0.048550765961408615, -0.01046465802937746, 0.0516737625002861, 0.027293402701616287, 0.0005150317447260022, 0.04177990183234215, -0.028080713003873825, 0.027293402701616287, -0.05631888657808304, -0.013305534608662128, 0.030468886718153954, -0.023251879960298538, -0.03346066176891327, -0.021401703357696533, -0.0063575259409844875, -0.08959584683179855, -0.005511167924851179, -0.04248848184943199, -0.010668046772480011, 0.0009669147548265755, -0.027634570375084877, -0.010143173858523369, -0.005370108410716057, -0.032358430325984955, -0.003598661394789815, -0.03535020723938942, 0.03553391247987747, -0.0005207725916989148, -0.05542660504579544, 0.023356854915618896, 0.012236105278134346, -0.0004592640034388751, 0.011822767555713654, 0.05537411570549011, 0.07841604948043823, 0.0026801335625350475, -0.06156761944293976, -0.028815535828471184, 0.033040765672922134, 0.009244328364729881, 0.02628302201628685, 0.014053478837013245, 0.01796378381550312, -0.015772437676787376, -0.009664226323366165, -0.017071498557925224, 0.022989444434642792, 0.03500903770327568, -0.005937627516686916, -0.010228465311229229, -0.0017156790709123015, 0.01977459527552128, 0.036347463726997375, -0.06193502992391586, 0.013686067424714565, -0.022084036841988564, -0.0031541595235466957, 0.040179040282964706, -0.023081297054886818, 0.003314901841804385, -0.0026653714012354612, -0.03681985288858414, -0.03619000315666199, 0.014460255391895771, -0.0068955207243561745, 0.029156703501939774, -0.03398553654551506, -0.005881859455257654, -0.003065587254241109, -0.009657666087150574, -0.01439464557915926, 0.040913861244916916, -0.023068174719810486, 0.0352189876139164, 0.03356563672423363, 0.021008048206567764, -0.014210940338671207, 0.019013529643416405, -0.01624482311308384, -0.010366244241595268, 0.020968681201338768, -0.02434099279344082, 0.008247069083154202, 0.02382924035191536, -0.018632996827363968, -0.008194581605494022, 0.013804163783788681, -0.019249722361564636, 0.01784568652510643, -0.013390826061367989, -0.009670787490904331, -0.0017944100545719266, 0.017071498557925224, 0.020680001005530357, 0.007000495679676533, -0.01825246401131153, -0.019971422851085663, 0.023094417527318, -0.028894266113638878, 0.01687467098236084, 0.0022848383523523808, -0.022031549364328384, -0.014000991359353065, -0.04010030999779701, -0.04736980050802231, 0.049574267119169235, -0.017084620893001556, 0.0011210961965844035, -0.014447133056819439, 0.033670611679553986, 0.009939785115420818, -0.03380183130502701, -0.0013130030129104853, 0.018265584483742714, -0.01049090176820755, -0.038630664348602295, 0.0067971074022352695, 0.011560331098735332, -0.05726366117596626, -0.0072694928385317326, 0.011796523816883564, 0.015772437676787376, 0.034589141607284546, -0.007157957646995783, -0.017937539145350456, -0.005324182100594044, 0.04293462261557579, 0.03957543522119522, -0.005589899141341448, 0.04080888628959656, -0.04298711195588112, -0.03482533246278763, 0.017819443717598915, 0.038919344544410706, 0.006993934512138367, 0.0699131041765213, -0.015549367293715477, 0.008443896658718586, -0.04408934339880943, -0.025115180760622025, 0.033775586634874344, 0.0032624145969748497, -0.014460255391895771, 0.03443167731165886, -0.0014499620301648974, -0.015037615783512592, 0.0394442155957222, 0.05610894039273262, -0.015090103261172771, 0.06067533418536186, 0.07531929761171341, -0.03506152704358101, -0.006223027128726244, -0.014919519424438477, -0.03878812491893768, 0.024262260645627975, 0.06665889173746109, 0.00869321171194315, -0.004297398962080479, 0.06062284857034683, -0.0009004854946397245, 0.03592756763100624, -0.002678493270650506, 0.01659911312162876, -0.05335335433483124, 0.003966072574257851, -0.0103793665766716, -0.02703096717596054, 0.017701346427202225, -0.027267159894108772, -0.0004760763549711555, 0.001955152489244938, -0.02617804892361164, -0.024603428319096565, 0.005760482978075743, 0.01624482311308384, 0.007138274610042572, -0.030888784676790237, 0.0012006473261862993, -0.04865574091672897, 0.06356213986873627, 0.03894558548927307, -0.0334344208240509, -0.015929900109767914, -0.0199058149009943, 0.016454773023724556, -0.030915027484297752, -0.008457018062472343, 0.015116347000002861, 0.019197234883904457, -0.0749518871307373, -0.04338076710700989, -0.03889309987425804, 0.006147576496005058, -0.021126143634319305, -0.020207615569233894, -0.04768472537398338, -0.019066017121076584, -0.0005170820513740182, -0.015759315341711044, 0.057788532227277756, 0.005734239239245653, -0.024196652695536613, -0.04988919198513031, -0.02029946818947792, 0.0018764215055853128, 0.017071498557925224, 0.04351198300719261, -0.058575842529535294, 0.020338835194706917, -0.021401703357696533, -0.02605995163321495, -0.040913861244916916, 0.034799087792634964, 0.011934302747249603, -0.013804163783788681, -0.01859363168478012, 0.03582259267568588, 0.05075523257255554, -0.007000495679676533, 0.016690965741872787, -0.030180206522345543, 0.004635286051779985, -0.0271359421312809, -0.026479849591851234, 0.017071498557925224, 0.011658744886517525, 0.008135533891618252, -0.04710736498236656, -0.013266168534755707, 0.042672187089920044, -0.01619233563542366, 0.03844695910811424, 0.014958884567022324, -0.025863124057650566, -0.0073351021856069565, -0.037029799073934555, -0.0004568036529235542, 0.035376448184251785, 0.01072053425014019, -0.009651104919612408, 0.030311424285173416, 0.03933924064040184, -0.001276917988434434, 0.0072301276959478855, -0.02256954461336136, -0.02029946818947792, 0.028815535828471184, -0.06277482956647873, 0.00843733549118042, -0.01502449344843626, 0.01842304691672325, 0.005065025761723518, -0.04185863211750984, 0.013896016404032707, -0.010280952788889408, -0.01989269256591797, -0.052198633551597595, -0.03598005324602127, 0.0009488722425885499, 0.020850585773587227, -0.03277832642197609, 0.013148072175681591, 0.03359188139438629, 0.068653404712677, -0.02445908822119236, 0.035665128380060196, 0.01578556001186371, 0.01320055965334177, -0.03582259267568588, -0.0026276460848748684, 0.07012305408716202, 0.01613985002040863, 0.015129468403756618, -0.005855616182088852, 0.015510001219809055, 0.01613985002040863, 0.045244064182043076, 0.04317081719636917, -0.005612862296402454, 0.00039262970676645637, 0.043538227677345276, 0.04849827662110329, 0.014302792958915234, 0.0010218623792752624, 0.032069750130176544, 0.0004588539304677397, 0.0184624120593071, 0.01733393594622612, -0.013167754746973515, 0.032069750130176544, 0.005383230280131102, 2.2642843759967946e-05, 0.0010948525741696358, 0.002158540766686201, -0.022254621610045433, 0.019354697316884995, 0.013449874706566334, 0.010989531874656677, 0.001784568652510643, 0.01245917659252882, 0.05096518248319626, 0.021913453936576843, 0.002429178450256586, -0.00510111078619957, -0.0013466277159750462, -0.008995013311505318, 0.028474368155002594, -0.040179040282964706, -0.006167259532958269, -0.054376859217882156, 0.022438326850533485, -0.05810345709323883, 0.0068955207243561745, -0.01283314824104309, -0.02188720926642418, -0.03193853050470352, -0.0173864234238863, 0.014184696599841118, -0.07232751697301865, -0.03283081576228142, 0.05999299883842468, 0.01859363168478012, 0.04784218594431877, -0.04776345565915108, -0.08261503279209137, 0.02234647423028946, 0.03739721328020096, 0.04513908922672272, 0.012196740135550499, -0.03842071443796158, -0.04406309872865677, 0.00011358582560205832, 0.022989444434642792, 0.028185687959194183, 0.005753921810537577, -0.006134455092251301, -0.03445792198181152, -0.028815535828471184, -0.023619292303919792, -0.019302209839224815, -0.006967690773308277, -0.06555665284395218, -0.0038545371498912573, -0.0064231352880597115, 0.007394150365144014, -0.0017288009403273463, -0.003510089125484228, 0.03096751496195793, -0.03130868449807167, -0.033670611679553986, -0.055794015526771545, 0.06503178179264069, 0.04083513095974922, -0.03238467127084732, 0.03524523228406906, -0.05946812778711319, 0.019761472940444946, 0.0355863980948925, 0.061830054968595505, 0.013804163783788681, -0.0026817736215889454, 0.0021060535218566656, 0.03267335146665573, -0.044509243220090866, 0.0029753746930509806, -0.048839446157217026, -0.021677261218428612, 0.020430687814950943, -0.008863795548677444, 0.026925992220640182, -0.048104625195264816, 0.04180614650249481, 0.04429929330945015, -0.07810112088918686, 0.01705837808549404, -0.06823351234197617, -0.02548259124159813, 0.01451274286955595, 0.0307313222438097, -0.023763632401823997, -0.01915786974132061, -0.01733393594622612, -0.02314690500497818, 0.02348807267844677, -0.04545401409268379, -0.053510818630456924, -0.0069020818918943405, -0.038683149963617325, 0.01470956951379776, -0.03529771789908409, 0.010392487980425358, -0.005872018169611692, -0.03078380972146988, -0.021847844123840332, -0.026768529787659645, 0.01502449344843626, -0.028815535828471184, -0.007289175875484943, -0.009224645793437958, 0.004960051272064447, 0.024498453363776207, -0.03472035750746727, -0.007741878740489483, -0.026296144351363182, 0.013148072175681591, -0.010608998127281666, -0.04634629935026169, 0.024157285690307617, -0.014027235098183155, 0.02766081504523754, 0.018619874492287636, -0.011068262159824371, 0.0216116514056921, 0.02981279417872429, -0.009585496038198471, 0.027188429608941078, -0.046556249260902405, -0.03141365945339203, 0.07820609956979752, -0.0436694473028183, 0.005133915226906538, 0.011927742511034012, -0.03424797207117081, 0.020916195586323738, 0.017806321382522583, -0.0032214089296758175, -0.01117323711514473, -0.005576777271926403, 0.006882399320602417, 0.014119087718427181, -0.020430687814950943, -0.0033788708969950676, -0.04020528122782707, 0.02565317414700985, -0.03821076452732086, 0.016782818362116814, -0.015982387587428093, 0.01011693011969328, -0.00467465166002512, 0.0064657810144126415, -0.022320229560136795, -0.024485332891345024, -0.04012655094265938, 0.04639878496527672, -0.01795066148042679, -0.019407184794545174, 0.02515454590320587, 0.007459759712219238, 0.01977459527552128, 0.031282439827919006, 0.0022979602217674255, -0.017005890607833862, 0.020784975960850716, 0.02651921473443508, 0.008896599523723125, 0.03626873344182968, 0.014434011653065681, -0.0013015213189646602, -0.017740711569786072, -0.006777424365282059, -0.028028225526213646, -0.011809646151959896, 0.006547792349010706, -0.028264418244361877, -0.021992184221744537, -0.003592100692912936, -0.008174899034202099, -0.002320923376828432, -0.01419781893491745, -0.005839213728904724, -0.01383040752261877, 0.008575115352869034, 0.02525952085852623, -0.046503759920597076, -0.00262928637675941, -0.033723101019859314, 0.0038250130601227283, -0.020207615569233894, -0.04083513095974922, -0.032017260789871216, -0.05999299883842468, 0.008279873989522457, 0.030547617003321648, 0.013213681057095528, 0.026807894930243492, 0.00016781588783487678, -0.00021856045350432396, 0.012846270576119423, -0.04031025618314743, 0.050151627510786057, -0.0012834788067266345, 0.010333440266549587, -0.00011850651208078489, -0.007525368593633175, 0.02970781922340393, -0.0010620480170473456, 0.06078030914068222, -0.010687729343771935, -0.019748352468013763, 0.009893858805298805, -0.004435177892446518, -0.03511401265859604, -0.002270076423883438, -0.03721350431442261, 0.0003768425085581839, 0.059888023883104324, 0.001974835293367505, 0.03713477402925491, 0.028658073395490646, -0.003414955921471119, -0.010189100168645382, 0.030600104480981827, 0.04340700805187225, -0.041543710976839066, 0.031203707680106163, -0.05099142715334892, -0.03786959871649742, -0.01159969624131918, 0.026427362114191055, -0.001626286655664444, 0.0322534553706646, -0.00041907839477062225, 0.03807954490184784, 0.07159269601106644, 0.007249810267239809, 0.010576194152235985, -0.01619233563542366, -0.014565229415893555, 0.04873447120189667, -0.04293462261557579, 0.0066855717450380325, 0.003972633741796017, 0.0054357172921299934, -0.004287557676434517, -0.03311949595808983, -0.00929681584239006, 0.0034247972071170807, -0.0088047469034791, -0.004205545876175165, -0.02314690500497818, -0.005954029504209757, -0.015549367293715477, 0.00801087636500597, 0.02205779403448105, 0.0022487533278763294, 0.027188429608941078, -0.004494226071983576, 0.035376448184251785, -0.031229952350258827, -0.02981279417872429, 0.015641219913959503, -0.0017041974933817983, 0.008109290152788162, 0.037265993654727936, -0.014932640828192234, -0.027345890179276466, -0.013220242224633694, 0.011251968331634998, -0.005783446133136749, -0.054376859217882156, -0.035087767988443375, 0.02737213484942913, -0.006518268492072821, -0.004258033353835344, -0.012072082608938217, 0.0018715007463470101, -0.01562809757888317, 0.01978771761059761, -0.027057209983468056, -0.015562488697469234, 0.02674228698015213, -0.019538402557373047, -0.021362336352467537, -0.015614976175129414, 0.016887793317437172, 0.0066396454349160194, 0.018856067210435867, -0.0054422784596681595, 0.00591466436162591, 0.010097247548401356, 0.029917769134044647, -0.004185863304883242, -0.002591561060398817, -0.004923966247588396, -0.005507887341082096, 0.010071003809571266, 0.012446054257452488, -0.009224645793437958, -0.017478276044130325, 0.000869321171194315, -0.020955560728907585, 0.005035501904785633, -0.005078147631138563, -0.01711086370050907, -0.008371726609766483, -0.005311060231178999, -0.03660990297794342, 0.019302209839224815, -0.018908554688096046, 0.02205779403448105, 0.002150339772924781, 0.01476205699145794, -0.02834315039217472, 0.03821076452732086, 0.0061377352103590965, -0.02640111930668354, 0.012524785473942757, -0.03141365945339203, 0.002025682246312499, 0.019144747406244278, 0.0019731950014829636, -0.00047812663251534104, 0.06099025905132294, 0.0192759670317173, 0.006065565161406994, 0.026479849591851234, 0.014643960632383823, -0.00022635154891759157, -0.006560914218425751, -0.009172158315777779, -0.007964950054883957, 0.014604595489799976, -0.0005461961263790727, 0.0029261677991598845, 0.01772759109735489, 0.01659911312162876, -0.00695456936955452, -0.045532744377851486, 0.02897299826145172, -0.01328585110604763, 0.019170992076396942, -0.011763718910515308, 0.013922260142862797, -0.008253630250692368, 0.004923966247588396, 0.00018042513693217188, -0.01194086391478777, -0.0058785793371498585, 0.013351460918784142, -0.02662418968975544, -0.015444392338395119, -0.025443226099014282, -0.02297632209956646, 0.002294679870828986, 0.00634112348780036, 0.024669038131833076, -0.022451449185609818, -0.013633579947054386, -0.013751676306128502, 0.0321747250854969, 0.01012349035590887, 0.02965533174574375, -0.023343732580542564, -0.010031637735664845, -0.03582259267568588, 0.029576601460576057, 0.046844929456710815, -0.0016148050781339407, 0.016271067783236504, -0.05070274695754051, 0.046949904412031174, 0.016520382836461067, 0.006869277451187372, 0.021021168678998947, -0.028763048350811005, 0.007643464952707291, 0.004399092867970467, 0.055059194564819336, 0.006948008202016354, -0.019813960418105125, 0.006285355892032385, 0.013010293245315552, 0.019407184794545174, -0.032017260789871216, -0.015523123554885387, 0.01277410052716732, -0.022267743945121765, 0.010635241866111755, 0.033381931483745575, 0.01135038211941719, -0.01921035721898079, -0.03039015457034111, -0.06193502992391586, 0.013646701350808144, -0.0015910216607153416, 0.001946951262652874, 0.003414955921471119, 0.015929900109767914, -0.007131713908165693, -0.04671370983123779, 0.007295736577361822, 0.012491980567574501, -0.0103793665766716, 0.05763107165694237, -0.036058783531188965, -0.003706916468217969, -0.008286435157060623, -0.016690965741872787, 0.01331209484487772, 0.002005999442189932, -0.006675730459392071, 0.027109697461128235, 0.018777336925268173, 0.03923426568508148, -0.06345716118812561, -0.005498046055436134, -0.007105470169335604, 0.04516533389687538, -0.049915436655282974, -0.06655391305685043, -0.041071321815252304, -0.004730419255793095, -0.041832391172647476, -0.04288213700056076, 0.027162184938788414, 0.030626347288489342, -0.029839038848876953, 0.005386510863900185, 0.034641627222299576, -0.05726366117596626, -0.005465241614729166, -0.031177464872598648, -0.016835305839776993, 0.03296203166246414, 0.003969353158026934, 0.012728173285722733, -0.0018452571239322424, 0.018659239634871483, -0.024721525609493256, 0.027582082897424698, -0.043249547481536865, -0.01417157519608736, -0.03786959871649742, 0.026387996971607208, -0.006301758345216513, -0.009342742152512074, -0.03616375848650932, 0.01847553439438343, -0.012505102902650833, -0.020391320809721947, 0.03723974898457527, 0.0033952731173485518, -0.024262260645627975, -0.024905230849981308, 0.022084036841988564, -0.024826500564813614, 0.004973173141479492, -0.001381072448566556, 0.003444480011239648, 5.2282284741522744e-05, 0.038341984152793884, -0.003214847994968295, 0.025075813755393028, -0.01989269256591797, -0.015260687097907066, 0.015457513742148876, 0.017255203798413277, 0.01596926525235176, 0.006459220312535763, 0.011553769931197166, 0.022438326850533485, -0.023356854915618896, 0.005970431957393885, -0.032988276332616806, -0.0063115996308624744, 0.033040765672922134, -0.027582082897424698, 0.014972005970776081, 0.017714468762278557, -0.047527264803647995, -0.004120253957808018, -0.027529597282409668, -0.00029995679506100714, -0.00940835103392601, -0.003601941978558898, -0.048314571380615234, -0.03044264204800129, -0.0013909138506278396, -0.033329445868730545, 0.0028425161726772785, -0.006157418247312307, -0.0004559835360851139, 0.03317198157310486, -0.017937539145350456, 0.038971830159425735, 0.03301452100276947, -0.016047995537519455, -0.015523123554885387, -0.05689624696969986, -0.019512159749865532, 0.029287921264767647, -0.007604099810123444, -0.02394733764231205, -0.00618366152048111, -0.002998337848111987, 0.03403802216053009, 0.025272641330957413, 0.030993759632110596, 0.0038840612396597862, 0.015457513742148876, 0.027949495241045952, -0.00491740508005023, -0.01259695552289486, -0.023304367437958717, -0.011429112404584885, -0.013961625285446644, 0.03716101869940758, -0.008345482870936394, 0.02907797135412693, 0.0022782774176448584, -0.015562488697469234, 0.023107539862394333, 0.013403947465121746, 0.028553098440170288, -0.02502332627773285, 0.02178223617374897, 0.034641627222299576, 0.034064266830682755, 0.012426371686160564, 0.05012538656592369, 0.00674461992457509, 0.008174899034202099, -0.031282439827919006, 0.04679244011640549, -0.015116347000002861, -0.049626756459474564, -0.0020863707177340984, -0.019341574981808662, 0.0031016722787171602, 0.005908103194087744, 0.006288636475801468, 0.00021630513947457075, -0.006475622300058603, -0.0035560154356062412, -0.028421880677342415, 0.042619697749614716, 0.016809063032269478, 0.03238467127084732, -0.002274997066706419, -0.024026067927479744, 0.004658249206840992, -9.856748511083424e-05, -0.04946929216384888, -0.003785647451877594, 0.008174899034202099, -0.026269901543855667, -0.007151396479457617, -0.037554673850536346, -0.0011924462160095572, 0.00525857275351882, -0.018095001578330994, 0.015286929905414581, -0.0036150638479739428, -0.003979194443672895, 0.00433348398655653, -0.012649443000555038, -0.05348457396030426, 0.025850001722574234, -0.024774013087153435, 0.06660640239715576, -0.003011459717527032, 0.009769201278686523, -0.021060535684227943, 0.061147719621658325, 0.002388172782957554, -0.05862833186984062, 0.002201186725869775, -0.023304367437958717, 0.016848428174853325, -0.008699771948158741, -0.02554820105433464, 0.02646672911942005, 7.258011464728042e-05, 0.01687467098236084, -0.01728144846856594, -0.04167492687702179, 0.002457062480971217, 0.016113605350255966, 0.00708578759804368, 0.04666122421622276, -0.005343864671885967, -0.003680672962218523, -0.014315915293991566, -0.01830495148897171, 0.023501195013523102, -0.009664226323366165, -0.04083513095974922, -0.0070136175490915775, 0.02565317414700985, 0.02918294630944729, -0.004126815125346184, 0.010766460560262203, -0.00564238615334034, -0.04647751525044441, -0.013751676306128502, 0.021965941414237022, -0.03624248877167702, 0.03849944472312927, 0.01932845264673233, -1.4326371456263587e-05, 0.05474426969885826, 0.03096751496195793, 0.02960284613072872, -0.0055472529493272305, 0.003165641101077199, -0.03162360563874245, 0.030285179615020752, 0.035271476954221725, 0.021191753447055817, -0.017491398379206657, 0.0016992768505588174, -0.04214731231331825, 0.016389163210988045, 0.07133025676012039, 0.00812241155654192, -0.003759403945878148, 0.007492564152926207, 0.005619422998279333, 0.0034576018806546926, 0.04639878496527672, -0.021427946165204048, 0.009559252299368382, -0.030862540006637573, -0.020680001005530357, 0.011330698616802692, -0.02810695767402649, -2.2873500711284578e-05, 0.0033444261644035578, -0.02634863182902336, -0.0028129920829087496, -0.01541814859956503, -0.006875838153064251, -0.019066017121076584, 0.060465388000011444, 0.02121799625456333, -0.010792704299092293, 0.015588732436299324, -0.010589315555989742, -0.01939406245946884, -0.020509418100118637, -0.026545459404587746, -0.0016008630627766252, 0.01439464557915926, 0.0008545590681023896, -0.029576601460576057, -0.03710853308439255, -0.023120662197470665, 0.014538985677063465, 0.059153202921152115, -0.011055140756070614, -0.01743891090154648, -0.005209365859627724, 0.06135766953229904, -0.0186461191624403, 0.03626873344182968, 0.005452119745314121, 5.9560799854807556e-05, 0.020509418100118637, -0.013298973441123962, 0.04254096746444702, -0.023802997544407845, -0.00843733549118042, 0.0037134774029254913, -0.030075231567025185, -0.0051175132393836975, -0.0003430127981118858, 0.03130868449807167, -0.007413832936435938, 0.0222414992749691, 0.03482533246278763, -0.019000407308340073, -0.04282964766025543, -0.026899749413132668, 0.015483757480978966, -0.031439900398254395, -0.0037954889703541994, 0.011704671196639538, -0.0008479981916025281, -0.035612642765045166, 0.02029946818947792, 0.0013154633343219757, -0.017176473513245583, -0.020627515390515327, -0.013062780722975731, -0.011724353767931461, -0.0028966437093913555, -0.024564063176512718, -0.02844812348484993, -0.02931416593492031, 0.007000495679676533, -0.004773064982146025, 0.010018516331911087, -0.04156995192170143, 0.02120487578213215, 0.011547208763659, 0.0091196708381176, 0.019932057708501816, -0.019695864990353584, -0.00209621200338006, -0.017766956239938736, 0.004707456100732088, -0.00803712010383606, 0.03813203424215317, 0.0015959424199536443, -0.011370064690709114, -0.013069340959191322, 0.007715635001659393, 0.01687467098236084, -0.005206085275858641, 0.019485915079712868, -0.02868431806564331, 0.025850001722574234, -0.03369685634970665, -0.0035789788234978914, 0.014525864273309708, 0.0070070563815534115, 0.019984545186161995, 0.015496879816055298, 0.016782818362116814, -0.001963353715837002, -0.0194990374147892, -0.0017730870749801397, 0.03130868449807167, -0.021231118589639664, -0.021979063749313354, -0.047920916229486465, 0.0009480520966462791, -0.008424214087426662, -0.015995509922504425, 0.0022684361319988966, 0.02302880957722664, -0.016218580305576324, -0.0326208658516407, 0.02258266694843769, 0.007328541483730078, 0.013699188828468323, 0.010799264535307884, 0.0008635803242214024, 0.0194990374147892, 0.003998877480626106, 0.01671721041202545, 0.005868738051503897, 0.0072301276959478855, -0.04595264419913292, 0.0029884965624660254, 0.027345890179276466, 2.8370828658808023e-05, 0.005448839161545038, 0.001776367542333901, -0.020037032663822174, 0.006783985532820225, 0.03876188024878502, -0.012951244600117207, 0.008863795548677444, 0.010707411915063858, -0.016166092827916145, -0.004438458476215601, 0.0016164452536031604, -0.024367235600948334, 0.01114699337631464, -0.00015079851436894387, -0.0072301276959478855, 0.002532512880861759, 0.004395812749862671, 0.02913045883178711, -0.007866536267101765, -0.020732488483190536, -0.02548259124159813, -0.003552735084667802, -0.014289671555161476, 0.013364582322537899, 0.010530267842113972, -0.010425292886793613, 0.00986105389893055, -0.02333061210811138, 0.0031557998154312372, -0.009099988266825676, -0.03660990297794342, 0.008069925010204315, -0.043984368443489075, -0.002258594846352935, 0.05343208461999893, -0.021309848874807358, 0.007820609956979752, 0.016507260501384735, 0.002294679870828986, -0.0035461741499602795, 0.005885140039026737, -0.010713973082602024, -0.01470956951379776, 0.027949495241045952, 0.0011694829445332289, -0.029392896220088005, -0.0184624120593071, 0.01961713284254074, -0.020312590524554253, 0.005603021010756493, 0.011606257408857346, 0.0013367863139137626, -0.009073744527995586, 0.01985332742333412, -0.024209773167967796, -0.04010030999779701, 0.011678427457809448, 0.023343732580542564, -0.015129468403756618, 0.02241208404302597, 0.03716101869940758, 0.04133376106619835, -0.014538985677063465, 0.01043185405433178, 0.005786726251244545, 0.011304454877972603, 0.02897299826145172, 0.00021958560682833195, 0.00288680219091475, -0.04676619544625282, 0.005750641226768494, 0.041753657162189484, -0.010189100168645382, 0.023763632401823997, -0.03923426568508148, -0.01020222157239914, 0.0005388151039369404, -0.008043681271374226, -0.01955152489244938, -0.0012514943955466151, 0.01842304691672325, -0.006816789973527193, 0.015063859522342682, -0.01268224697560072, -0.010300635360181332, 0.0009414912201464176, -0.005652227438986301, -0.0034838453866541386, -0.014604595489799976, 0.018396804109215736, 0.011245407164096832, 0.01268224697560072, -0.006039321422576904, -0.01938094012439251, -0.03301452100276947, -0.02633550949394703, 0.0470811203122139, -0.00419242400676012, -0.008030558936297894, -0.008627601899206638, 0.013298973441123962, -0.011921181343495846, -0.000769267207942903, 0.010504024103283882, -0.019512159749865532, -0.00909342709928751, -0.008653845638036728, -0.013377704657614231, -0.02566629648208618, 0.03650492802262306, -0.0047861868515610695, 0.03277832642197609, -0.01248542033135891, -0.018514899536967278, 0.013672945089638233, 0.01789817400276661, -0.008922843262553215, 0.016953403130173683, -0.023816118016839027, -0.015943022444844246, 0.0182393416762352, -0.01812124438583851, 0.009054061956703663, 0.053117163479328156, -0.010976409539580345, -0.020732488483190536, -0.01757012866437435, -0.00604588259011507, -0.010025077499449253, -0.02047005295753479, -0.012669125571846962, -0.016900915652513504, 0.02195281907916069, -0.014040356501936913, -0.038237009197473526, 0.030757566913962364, -0.006961130071431398, -0.014158452861011028, 0.010654924437403679, 0.01757012866437435, 0.014355280436575413, -0.026729164645075798, -0.03325071185827255, -0.03004898689687252, 0.017543883994221687, 0.008207703940570354, -0.017202718183398247, -0.04503411427140236, -0.04647751525044441, 0.015313173644244671, -0.015103224664926529, 0.010340000502765179, 0.0008996653486974537, -0.017360178753733635, -0.028264418244361877, -0.03067883476614952, -0.001376971835270524, 0.012984049506485462, -0.03290954604744911, 0.0004691053763963282, -0.013371143490076065, -0.017294570803642273, -0.015405027195811272, -0.030652591958642006, 0.008581675589084625, 0.01704525575041771, -0.020653758198022842, -0.006508427206426859, -0.011055140756070614, -0.006551072932779789, -0.0006950468523427844, 0.007348224055022001, -0.015378783456981182, 0.013777920044958591, 0.03461538255214691, 0.03162360563874245, 0.00995290745049715, 0.0031000319868326187, 0.012190178968012333, -0.010399049147963524, 0.023448707535862923, -0.010825508274137974, 0.04010030999779701, 0.021874088793992996, -0.040861375629901886, 0.04054645076394081, -0.009821688756346703, -0.010143173858523369, 0.01881670206785202, 0.0062033445574343204, -0.022372717037796974, 0.019485915079712868, 0.0006499405717477202, -0.04482416808605194, 0.004999416880309582, -0.014315915293991566, -0.0036117832642048597, 0.027293402701616287, -0.04886569082736969, -0.027739545330405235, -0.004317081533372402, -0.01225578784942627, 0.009014695882797241, -0.02326500229537487, -0.031676094979047775, 0.059730563312768936, -0.003182043321430683, 0.007886218838393688, -0.002324203960597515, 0.019708987325429916, -0.009828249923884869, 0.001984676579013467, 0.03330320119857788, 0.011658744886517525, 0.006518268492072821, 0.0018403364811092615, -0.016677843406796455, 0.0005425055860541761, -0.0033378652296960354, -0.013049658387899399, 0.01451274286955595, 0.0051207938231527805, -0.0338805615901947, 0.024498453363776207, -6.381513958331198e-05, 0.0036085029132664204, -0.024026067927479744, -0.0016033233841881156, -0.015588732436299324, 0.0027194989379495382, 0.0014729253016412258, 0.00044450192945078015, -0.022333351895213127, 0.0037823671009391546, 0.007761561777442694, -0.0024505015462636948, 0.008201142773032188, -0.019604012370109558, -0.033828072249889374, 0.02121799625456333, -0.013423630967736244, 0.0032214089296758175, 0.0057637630961835384, -0.004153058864176273, -0.005671910475939512, 0.019945180043578148, 0.001884622615762055, 0.02536449395120144, 0.013935381546616554, 0.002919606864452362, -0.016323555260896683, 0.031229952350258827, -0.013462996110320091, 0.04590015485882759, 0.018265584483742714, -0.003444480011239648, -0.01767510361969471, -0.012308275327086449, 0.012085204012691975, -0.022595789283514023, -0.015090103261172771, -0.02863183058798313, -0.0190922599285841, 0.010497462935745716, -0.01003819890320301, -0.027897007763385773, -0.05731614679098129, -0.005625984165817499, -0.015811802819371223, 0.012610076926648617, 0.04973173141479492, 0.03393304720520973, -0.017937539145350456, 0.02468216046690941, -0.021454188972711563, -0.00604588259011507, -0.021073656156659126, 0.017084620893001556, 0.006508427206426859, 0.0011826048139482737, -0.0019108662381768227, 0.010910800658166409, -0.008916282095015049, -0.00553085096180439, 0.01562809757888317, 0.00692832563072443, -0.03083629719913006, -0.006101650185883045, 0.001933829509653151, -0.042803406715393066, 0.01869860664010048, 0.028264418244361877, 0.023684900254011154, 0.007577856071293354, 0.057053711265325546, 0.01539190486073494, 0.02531200647354126, -0.020653758198022842, -0.002324203960597515, -0.02474776841700077, -0.02212340384721756, 0.021742869168519974, -0.0025390738155692816, 0.03325071185827255, 0.006908642593771219, 0.0073351021856069565, -0.007951827719807625, -0.007407272234559059, -0.00020431097073014826, 0.012925000861287117, -0.002995057264342904, 0.002133937319740653, -0.023789875209331512, -0.013659823685884476, -0.05324837937951088, -0.00934930332005024, 0.010759899392724037, 0.006757741793990135, -0.004225228913128376, 0.008870355784893036, 0.019971422851085663, -0.012177056632936, -0.005370108410716057, -0.012150812894105911, -0.011566892266273499, 0.021060535684227943, 0.016349798068404198, -0.01536566112190485, 0.03403802216053009, -0.022149646654725075, 0.0029163265135139227, 0.04080888628959656, -0.022307109087705612, 0.02365865744650364, -0.012341080233454704, 0.001597582595422864, -0.013016854412853718, 0.00048345737741328776, -0.0043105208314955235, 0.018291829153895378, -0.026834139600396156, 6.07909714744892e-05, 0.011612818576395512, 0.03716101869940758, -0.009998833760619164, -0.036688633263111115, -0.009178719483315945, -0.03889309987425804, -0.017425788566470146, -0.010891118086874485, 0.00012404228618834168, -0.02703096717596054, -0.006718376185745001, -0.054481834173202515, 0.0282119307667017, 0.009533008560538292, -0.014552108012139797, 0.015286929905414581, 0.01607424020767212, 0.004005438182502985, 0.024760890752077103, -0.002599762286990881, 0.04668746516108513, -0.013672945089638233, 0.029917769134044647, 0.006282075308263302, 0.044666703790426254, 0.02577127143740654, -0.004579517990350723, 0.01325304713100195, 0.011074823327362537, 0.02514142356812954, -0.013843528926372528, -0.02149355597794056, 0.020509418100118637, 0.009224645793437958, -0.01921035721898079, -0.006088528316468, -0.030573859810829163, 0.000898025173228234, 0.009578934870660305, 0.02057502791285515, 0.0013490880373865366, -0.023724265396595, -0.0012088484363630414, -0.012905318289995193, -0.001976475352421403, -0.00738102849572897, 0.010713973082602024, 0.002762144897133112, 0.02159852907061577, -0.014434011653065681, -0.007184201385825872, 0.0015295131597667933, 0.021336093544960022, -0.013095584698021412, 0.027634570375084877, -0.046897415071725845, 0.04805213585495949, 0.031781069934368134, -0.024616550654172897, -0.020955560728907585, -0.012124569155275822, 0.03524523228406906, -0.0017025573179125786, -0.017005890607833862, -0.02520703338086605, 0.018842946738004684, 0.04041523113846779, 0.00449094595387578, -0.03154487535357475, 0.0024800256360322237, -0.031151220202445984, -0.008358605206012726, -0.011317577213048935, -0.0027441023848950863, -0.042331017553806305, 0.04311832785606384], "index": 20}, {"title": "Melissa Gilbert", "text": "Melissa Ellen Gilbert (born May 8, 1964) is an American actress, television director, and 2016 Democratic candidate for Michigan's 8th congressional district.Gilbert began her career as a child actress in the late 1960s appearing in numerous commercials and guest starring roles on television. From 1974 to 1984, she starred as Laura Ingalls Wilder on the NBC series Little House on the Prairie.", "vector": [0.023501215502619743, -0.0014370293356478214, -0.02314792014658451, -0.002298187231644988, -0.03679925948381424, -0.00917155109345913, -0.03532954677939415, -0.011128807440400124, 0.05986238643527031, 0.07670751214027405, -0.046521950513124466, -0.036120928823947906, -0.02525356039404869, 0.0547749325633049, -0.032842349261045456, -0.0002612178504932672, -0.028857175260782242, -0.001039571943692863, 0.045956674963235855, 0.001017490983940661, 0.03066604770720005, 0.015643924474716187, 0.00459990743547678, 0.035668712109327316, 0.05002664029598236, 0.03490559384226799, -0.003165527479723096, 0.0022928877733647823, -0.0010510541032999754, -0.030920421704649925, -0.0055184755474328995, 0.013771457597613335, -0.001714366371743381, -0.014640565030276775, -0.034679483622312546, -0.018258310854434967, -0.05324869602918625, 0.0050450596027076244, 0.004183018580079079, 0.014280203729867935, -0.003245019121095538, 0.01459816936403513, -0.028645198792219162, -0.019770415499806404, 0.015686320140957832, 0.017749564722180367, 0.04397822171449661, 0.00664548808708787, 0.03914513811469078, 0.024872001260519028, -0.0068115368485450745, -0.009454187005758286, 0.01632225140929222, 0.011665817350149155, 0.016378778964281082, -0.040332213044166565, -0.008648673072457314, 0.056838177144527435, -0.013983434997498989, -0.03496212139725685, -0.03922992944717407, -0.008775860071182251, -0.005532607436180115, -0.0012153364950791001, 0.02727441117167473, -0.02285115234553814, 0.03394462913274765, 0.0547749325633049, 0.014979728497564793, 0.03996478393673897, 0.04946136847138405, -0.053503070026636124, -0.007037646137177944, 0.025140507146716118, 0.02077377401292324, -0.015898296609520912, -0.003925113007426262, -0.01626572385430336, -0.017933279275894165, -0.042169347405433655, 0.007942082360386848, -0.05093107745051384, 0.009044364094734192, 0.04714374989271164, 0.0018230046844109893, -0.022893548011779785, 0.02648302912712097, -0.07461600750684738, 0.04999837651848793, 0.024123014882206917, 0.029026757925748825, 0.053022585809230804, 0.04776554927229881, -0.01429433561861515, 0.03157048299908638, -0.07834680378437042, -0.007864357903599739, -0.02549380250275135, 0.03869292140007019, -0.0061932699754834175, -0.02384037896990776, -0.00802687369287014, -0.018258310854434967, -0.03024209290742874, 0.029139811173081398, 0.029055019840598106, -0.043158575892448425, 0.037873275578022, 0.015855900943279266, -0.004122958518564701, 0.03196617588400841, -0.018145255744457245, -0.039399512112140656, 0.023246843367815018, 0.005101586692035198, 0.023006601259112358, -0.006511235609650612, 0.030072512105107307, 0.02167821116745472, 0.013941040262579918, -0.024660024791955948, -0.0038297229912132025, 0.019657360389828682, -0.0011217131977900863, -0.007843160070478916, 0.01695818267762661, -0.05180725082755089, 0.03174006566405296, 0.034679483622312546, 0.039003822952508926, -0.019742151722311974, 0.035216495394706726, -0.0420280322432518, 0.02504158392548561, 0.02519703470170498, -0.03453816846013069, -0.0025578592903912067, 0.01632225140929222, 0.06331054866313934, 0.023275107145309448, 0.01683099754154682, -0.008344839327037334, 0.026256920769810677, 0.004995597992092371, -0.0340859480202198, -0.057827405631542206, 0.023911038413643837, 0.004331402480602264, 0.015177574008703232, -0.04355426877737045, -0.05135503038764, 0.00910795759409666, 0.01773543283343315, 0.019162748008966446, 0.06636302173137665, 0.048811305314302444, -0.01401169877499342, 0.031316112726926804, -0.02540901117026806, -0.056809913367033005, 0.03855160251259804, 0.014301401562988758, -0.006384049542248249, 0.038919031620025635, 0.015446078963577747, 0.031853120774030685, -0.026553688570857048, 0.029422447085380554, -0.012513726018369198, 0.026977643370628357, -0.04476960375905037, -0.022497856989502907, 0.023430556058883667, -0.01512104645371437, -0.029422447085380554, -0.015615660697221756, 0.02317618392407894, -0.010888567194342613, -0.045532722026109695, -0.06698482483625412, 0.02335989661514759, -0.012824625708162785, -0.0019731551874428988, -0.013192052952945232, -0.022413065657019615, -0.016633151099085808, -0.031429167836904526, -0.03289887681603432, -0.0027027104515582323, -0.08473438769578934, -0.01295887865126133, 0.0020155508536845446, -0.00718603003770113, -0.03448164090514183, 0.007730105426162481, 0.003684871830046177, -0.018512682989239693, -0.03224881365895271, -0.037505850195884705, -0.014979728497564793, 0.022285878658294678, -0.00019696223898790777, 0.002347648609429598, -0.03719494864344597, 0.03549912944436073, -0.011722343973815441, 0.03643183037638664, 0.0017797260079532862, -0.06087987869977951, 0.01938885636627674, 0.03315324708819389, 0.006359318736940622, 0.06359318643808365, -0.022144561633467674, -0.002935885451734066, 0.007334414403885603, 0.010987489484250546, 0.00802687369287014, -0.0009203347144648433, -0.017424533143639565, 0.03346414864063263, 0.022653305903077126, 0.014350862242281437, -0.008789991959929466, -0.048783041536808014, 0.027797289192676544, -0.044486965984106064, 0.00036588162765838206, 0.0072319586761295795, -0.02213042974472046, -0.035555656999349594, 0.01738213747739792, -0.002284055342897773, 0.0871085375547409, -0.044995713979005814, -0.011644619517028332, 0.024674156680703163, 0.008549750782549381, -0.02696351148188114, 0.036997102200984955, 0.024165410548448563, -0.016548359766602516, -0.02128252014517784, -0.008726398460566998, 0.010189041495323181, -0.038042858242988586, -0.009185682982206345, 0.02074551023542881, 0.004274875391274691, 0.004423259291797876, 0.06834147870540619, 0.01743866503238678, -0.0023794451262801886, -0.002911154879257083, -0.006306324619799852, 0.006454708520323038, 0.02928113006055355, -0.019176878035068512, 0.002391810528934002, 0.03340762108564377, -0.020674852654337883, -0.06749357283115387, -0.03990825638175011, -0.03493385761976242, -0.001354004954919219, -0.03125958517193794, -0.01509278267621994, -2.8401644158293493e-05, -0.02114120125770569, -0.024603497236967087, -0.04917873069643974, -0.015615660697221756, 0.0023829780984669924, 0.05220293998718262, 0.014909069053828716, -0.006977585610002279, -0.04021915793418884, 0.022172825410962105, 0.004656434524804354, -0.0007207227754406631, 0.03157048299908638, 0.021551024168729782, -0.03315324708819389, -0.009885207749903202, -0.018738793209195137, 0.05844920501112938, -0.015417815186083317, 0.005497277714312077, 0.014103556051850319, 0.04298899322748184, -0.03527302294969559, 0.06025807932019234, -0.023472951725125313, 0.008768794126808643, 0.027048302814364433, 0.014485115185379982, 0.02047700621187687, -0.021098805591464043, 0.014428587630391121, -0.03623398393392563, 0.04561751335859299, -0.029507238417863846, 0.01205444149672985, -0.008634542115032673, 0.0005136033287271857, -0.02597428485751152, -0.02733093872666359, 0.037477586418390274, 0.023204447701573372, -0.03066604770720005, -0.025211166590452194, -0.017240820452570915, 0.058675315231084824, 0.03597961366176605, -0.005755183286964893, 0.006864531431347132, 0.014216610230505466, -0.012379474006593227, -0.018894242122769356, -0.0199965238571167, 0.03880597651004791, 0.011807135306298733, -0.0066490210592746735, 0.009652032516896725, -0.008987837471067905, -0.003230887232348323, 0.009659098461270332, -0.03736453130841255, 0.00927753932774067, -0.004391463007777929, -0.03990825638175011, 0.051694195717573166, 0.005744584370404482, 0.009623768739402294, 0.09072627872228622, -0.043073784559965134, -0.02485787123441696, 0.04383690282702446, 0.004232479725033045, 0.042169347405433655, -0.038890767842531204, -0.03917340189218521, 0.00393924443051219, -0.0044797868467867374, -0.006009556353092194, 0.046013202518224716, -0.007242557592689991, 0.015262365341186523, 0.010711919516324997, -0.028334297239780426, 0.0006840683636255562, -0.055029306560754776, 0.023345764726400375, 0.03603614121675491, 0.012308814562857151, 0.03332282975316048, 0.011248928494751453, -0.04468481242656708, 0.001960790017619729, 0.010775512084364891, 0.045589249581098557, 0.01656249165534973, -0.01930406503379345, 0.020095447078347206, -0.0006169422413222492, -0.01752345636487007, -0.03809938579797745, -0.06958507746458054, -0.02309139259159565, -0.04564577713608742, 0.06285833567380905, 0.013566547073423862, 0.01770716905593872, -0.03060952015221119, 0.05599026754498482, -0.0133475037291646, -0.015686320140957832, -0.024617629125714302, -0.010980423539876938, 0.004585775546729565, -0.04567404091358185, 0.061049461364746094, -0.053983550518751144, 0.0018548013176769018, -0.021240124478936195, -0.018597474321722984, -0.0012100370367988944, -0.013142592273652554, 0.009143287315964699, -0.0035753503907471895, -0.005299432203173637, 0.04530661180615425, 0.02386864274740219, 0.0009989429963752627, 0.018597474321722984, -0.017594115808606148, 0.018272442743182182, -0.004313738085329533, 0.07964693754911423, -0.02357187494635582, 0.007503996137529612, -0.029535502195358276, 0.018018070608377457, -0.0344533771276474, 0.004073496907949448, -0.011135873384773731, -0.02020850218832493, -0.04154754802584648, 0.05974933132529259, 0.011467971839010715, -0.027853816747665405, -0.030920421704649925, 0.013432294130325317, -0.006970520131289959, 0.00805513747036457, -0.006115545053035021, 0.020307425409555435, -0.025140507146716118, 0.027429861947894096, 0.035131704062223434, 0.02477307990193367, -0.022017374634742737, 0.038919031620025635, 0.014202478341758251, 0.014711223542690277, 0.018272442743182182, 0.014322599396109581, 0.0020579462870955467, -0.0348208025097847, 0.03109000250697136, -0.021720606833696365, -0.027401598170399666, -0.017777828499674797, 0.019077956676483154, 0.0040558320470154285, -0.010464612394571304, -0.024094752967357635, -0.021579287946224213, 0.0007927067345008254, -0.007383875548839569, -0.03428379446268082, 0.01632225140929222, -0.014569905586540699, 0.012019112706184387, -0.08309509605169296, 0.013524151407182217, -0.03965388610959053, -0.04875477775931358, 0.018018070608377457, -0.01465469691902399, -0.03117479383945465, 0.023614270612597466, 0.006670218892395496, -0.02706243470311165, 0.011354916729032993, 0.018060464411973953, 0.031231321394443512, 0.03914513811469078, -0.04400648549199104, 0.022356538102030754, 0.00035704925539903343, 0.01698644645512104, 0.02296420745551586, 0.03872118517756462, -0.03857986629009247, -0.10497115552425385, 0.0004047441470902413, 0.05152461305260658, -0.014336730353534222, 0.03244665637612343, 0.050252750515937805, 0.02754291519522667, -0.022893548011779785, 0.0061014131642878056, 0.016788601875305176, -0.045532722026109695, 0.013672535307705402, 0.003942777402698994, 0.04669152945280075, -0.00793501641601324, 0.028998494148254395, -0.014061160385608673, 0.002596721751615405, 0.03954083099961281, 0.0025578592903912067, -9.759787644725293e-05, 0.07732931524515152, 0.00816112570464611, 0.0015403683064505458, -0.0420280322432518, -0.03222054988145828, -0.0016640217509120703, -0.018173519521951675, -0.010824973694980145, 0.017693037167191505, 0.030920421704649925, 0.003822657046839595, -0.006751476787030697, -0.0038297229912132025, 0.0022663904819637537, 0.000992760295048356, 0.06268875300884247, 0.004144155886024237, -0.0036248117685317993, 0.01169408019632101, -0.006023688241839409, 0.010443414561450481, 0.043130312114953995, 0.06738051772117615, -0.011100544594228268, 0.010196107439696789, -0.0006708197761327028, -0.012082705274224281, -0.01885184645652771, 0.014386191964149475, 0.01259851735085249, 0.0042784083634614944, 0.016915787011384964, 0.013891578651964664, -0.002552559832111001, -0.023713193833827972, 0.029648557305336, 0.01767890527844429, 0.059692803770303726, 0.01767890527844429, -0.011241862550377846, 0.0301573034375906, 0.017608247697353363, -0.02140970714390278, 0.005133383441716433, -0.009150353260338306, 0.03120305761694908, 0.04751117527484894, 0.02170647494494915, 0.01390571054071188, -0.004585775546729565, -0.0036318774800747633, 0.013192052952945232, 0.03385983780026436, -0.030355148017406464, -0.008881848305463791, -0.04058658704161644, 0.03165527433156967, -0.02077377401292324, 0.017565852031111717, -0.021127069368958473, -0.012824625708162785, -0.021423839032649994, 0.006419378798455, -0.043610796332359314, 0.009319934993982315, -0.03589482232928276, 0.026539556682109833, -0.024900265038013458, -0.01531889196485281, -0.011849530972540379, -0.01459816936403513, 0.0744464248418808, 0.04474133998155594, -0.010372755117714405, 0.0817384421825409, -0.043215103447437286, -0.04327163100242615, -0.0016790367662906647, -0.003776728641241789, -0.012690373696386814, -0.006129676476120949, 0.028645198792219162, -0.04279115051031113, 0.02197497896850109, -0.010422216728329659, -0.03764716535806656, 0.02140970714390278, -0.06851106137037277, -0.022356538102030754, 0.02146623283624649, -0.009263407438993454, 0.022978337481617928, 0.00846495945006609, 0.002686812076717615, 0.0696416050195694, -0.009510714560747147, 0.03196617588400841, 0.011178269051015377, -0.053107377141714096, 0.02375558763742447, 0.018724661320447922, -0.012322946451604366, 0.020575929433107376, 0.023826247081160545, -0.02786794863641262, -0.0181028600782156, 0.028899570927023888, -0.007398007437586784, 0.020547665655612946, 0.00434553436934948, 0.00393924443051219, 0.01534715574234724, -0.009736823849380016, -0.02044874243438244, 0.05324869602918625, 0.02095748856663704, 0.011418510228395462, 0.007864357903599739, -0.027316806837916374, -0.04776554927229881, -0.03428379446268082, 0.011644619517028332, 0.025931889191269875, -0.021452100947499275, -0.010450480505824089, -0.00846495945006609, -0.01273276936262846, 0.02799513377249241, -0.006935190409421921, -0.030439939349889755, 0.019459515810012817, -0.018512682989239693, -0.03125958517193794, -0.01743866503238678, -0.01169408019632101, -0.006624290253967047, -0.0053170970641076565, -0.0019731551874428988, -0.005129850469529629, -0.038438547402620316, -0.02104227989912033, -0.015219969674944878, -0.03018556535243988, 0.03501864895224571, 0.03069431148469448, 0.0010510541032999754, -0.02482960745692253, -0.01142557617276907, -0.030920421704649925, -0.013262712396681309, -0.03956909477710724, -0.04476960375905037, 0.02309139259159565, 0.014449785463511944, -0.0541248694062233, 0.037534113973379135, -0.029394185170531273, 0.014025830663740635, -0.00986400991678238, -0.02610146999359131, 0.00849322322756052, 0.008761728182435036, 0.014725355431437492, 0.018837714567780495, -0.0060837483033537865, -0.023684930056333542, -0.027260279282927513, -0.006917525548487902, -0.005101586692035198, -0.011121741496026516, -0.009977064095437527, -0.03162701055407524, -0.0006385815795511007, 0.012181628495454788, -0.021551024168729782, -0.011658751405775547, -0.007468666415661573, 0.011178269051015377, 0.004338468424975872, -0.03674273192882538, 0.012125100940465927, -0.010351557284593582, 0.01815938763320446, -0.0005295015871524811, 0.004469187930226326, -0.013623073697090149, 0.004380864091217518, -0.004716494586318731, 0.030439939349889755, -0.012209892272949219, -0.06461067497730255, -0.035103440284729004, -0.013531217351555824, 0.0011826566187664866, 0.01656249165534973, -0.04578709602355957, -0.024617629125714302, 0.01879531890153885, -0.00858508050441742, 0.014463917352259159, 0.008903046138584614, -0.005129850469529629, -0.02131078392267227, -0.0028139986097812653, 0.017240820452570915, -0.013354569673538208, -0.018498551100492477, 0.03809938579797745, -0.012817559763789177, 0.0005277351592667401, -0.015333023853600025, -0.03730800375342369, -0.026497161015868187, -0.026921115815639496, -0.0027433393988758326, 0.029337657615542412, -0.008797057904303074, -0.022568516433238983, 0.0021127068903297186, 0.0093058031052351, -0.010245569050312042, -0.03682751953601837, 0.00554673932492733, -0.02522529847919941, 0.01201204676181078, 0.03431205824017525, -0.0018247711705043912, -0.01746692880988121, -0.0007538442150689662, -0.036629676818847656, -0.01869639754295349, -0.019770415499806404, 0.02727441117167473, -0.01512104645371437, 0.05240078642964363, 0.015728715807199478, 0.025606857612729073, -0.018470287322998047, -0.0472002774477005, -0.010740182362496853, 0.018936637789011, -0.03575350344181061, 0.01587003283202648, 0.013460557907819748, -0.02861693501472473, 0.013036603108048439, 0.01978454738855362, 0.004924939014017582, 0.0437803752720356, 0.00012299099762458354, -0.00780076440423727, 0.020392214879393578, 0.01234414428472519, 0.023769719526171684, 0.022413065657019615, -0.0172266885638237, 0.03581003099679947, -0.014287269674241543, 0.002006718423217535, -0.007189563009887934, -0.0021091741509735584, 0.007362677715718746, -0.0172266885638237, -0.04493918642401695, 0.059636276215314865, 0.011475037783384323, 0.0005264102946966887, 0.009009035304188728, -0.0191203523427248, 0.015064519830048084, 0.05336175113916397, -0.00411235960200429, 0.030976947396993637, -0.0218901876360178, 0.017452796921133995, -0.0327010303735733, -0.01981281116604805, 0.00849322322756052, 0.0006721446407027543, 0.06280180811882019, -0.014004632830619812, -0.00493200495839119, -0.023925170302391052, -0.018993165343999863, 0.008012741804122925, -0.014301401562988758, 0.0003466712078079581, -0.033746786415576935, 0.02140970714390278, -0.0011614589020609856, -0.008344839327037334, -0.018922505900263786, -0.010881501249969006, 0.028758252039551735, -0.02597428485751152, 0.0045893085189163685, -0.002388277556747198, 0.004610505886375904, -0.029111547395586967, -0.05946669727563858, 0.0434129498898983, 0.015488473698496819, -0.03024209290742874, -0.060597240924835205, -0.027288543060421944, -0.010669523850083351, -0.025211166590452194, -0.01807459630072117, -0.03688404709100723, 0.011708212085068226, 0.0008130212081596255, -0.010443414561450481, 0.021565156057476997, -0.0057198540307581425, 0.031344376504421234, 0.02122599259018898, -0.015446078963577747, -0.006956388242542744, -0.024066489189863205, -0.030750839039683342, -0.011595157906413078, 0.006670218892395496, -0.04349774122238159, 0.03971041366457939, 0.03431205824017525, 0.022116297855973244, 0.003289181040599942, -0.06619343906641006, -0.024546969681978226, -0.005582068581134081, -0.004020502790808678, 0.02591775730252266, -0.009086759760975838, -0.03298366814851761, -0.0031443298794329166, 0.03261623904109001, -0.0031761263962835073, -0.012859955430030823, 0.024193674325942993, 0.00933406688272953, 0.018173519521951675, -0.028306033462285995, 0.0019007297232747078, 0.007744236849248409, -0.024123014882206917, 0.0444304384291172, -0.038353756070137024, -0.004688231274485588, -0.0527399517595768, -0.00046811651554889977, -0.021989110857248306, -0.012457198463380337, 0.026285184547305107, 0.007405073381960392, -0.00040805627941153944, -0.01914861612021923, -0.001015724497847259, -0.051185451447963715, 0.008994903415441513, -0.009397659450769424, 0.0021074076648801565, -0.07795111835002899, -0.01423780806362629, -0.01855507865548134, 0.01855507865548134, 0.009899339638650417, -0.01086736936122179, -0.014937332831323147, -0.008175257593393326, 0.0022027974482625723, -0.0038509208243340254, -0.009750955738127232, -0.03258797526359558, 0.004829549230635166, -0.004271342419087887, -0.01741040125489235, 0.04527834802865982, -0.027797289192676544, 0.017099501565098763, 0.006020155269652605, -0.01978454738855362, 0.011460905894637108, 0.007327348459511995, 0.00033253937726840377, 0.0067585427314043045, -0.010323294438421726, 0.002324684290215373, -0.035555656999349594, -0.05556631460785866, 0.029648557305336, -0.024038225412368774, -0.00024465713067911565, -0.017099501565098763, 0.010499942116439342, 0.027514653280377388, 0.032870613038539886, -0.027458125725388527, -0.006903393659740686, -0.002324684290215373, 0.0014334964798763394, 0.009475384838879108, -0.0172266885638237, -0.0068115368485450745, -0.007638248614966869, -0.030468203127384186, -0.018654001876711845, 0.031231321394443512, -0.023289239034056664, 0.03171180188655853, 0.010803775861859322, 0.04355426877737045, -0.03691231086850166, 0.017057105898857117, 0.021551024168729782, 0.015361287631094456, 0.025055715814232826, 0.0036212787963449955, 0.06087987869977951, -0.008139927871525288, 0.019205141812562943, -0.013114328496158123, 0.013637205585837364, -0.005578535608947277, -0.01022437121719122, -0.028970230370759964, -0.011072280816733837, 0.01975628361105919, 0.006218000315129757, 0.012690373696386814, 0.0020632457453757524, -0.01914861612021923, 0.026271052658557892, 0.016972314566373825, -0.014923200942575932, -0.024193674325942993, 0.0109450938180089, 0.009962933138012886, 0.04329989477992058, -0.009828680194914341, -0.054407503455877304, -0.004009903874248266, -0.0058293757028877735, 0.0030189098324626684, 0.026172129437327385, -0.008373103104531765, 0.022045638412237167, 0.02140970714390278, -0.04163233935832977, 0.009765087626874447, -0.02762770652770996, -0.018442023545503616, 0.0018530348315835, 0.018738793209195137, -0.0019925865344703197, -0.00529236625880003, 0.01668967865407467, 0.00614027539268136, 0.036997102200984955, -0.04493918642401695, 5.895618232898414e-05, -0.005603266414254904, -0.017184292897582054, 0.004886076785624027, -0.01962909661233425, 0.011411444284021854, -0.019614964723587036, -0.0035594520159065723, -0.0006588960532099009, 0.030750839039683342, 0.039823468774557114, -0.012132166884839535, -0.0015421347925439477, -0.003153162309899926, 0.02546553872525692, -0.015954824164509773, 0.008408432826399803, -0.02311965636909008, -0.0038933162577450275, -0.025154639035463333, 0.03866465762257576, 0.0004985882551409304, 0.008966639637947083, 0.03857986629009247, 0.0017002344829961658, 0.026313448324799538, -0.016166800633072853, 0.009221011772751808, 0.013750260695815086, -0.022073902189731598, 0.02245546132326126, -0.0509876050055027, 0.029959456995129585, -0.02471655234694481, -0.011800069361925125, 0.006041352637112141, -0.0077795665711164474, 0.01701471023261547, 0.03928645700216293, 0.016619019210338593, 0.004080562852323055, -0.02005305141210556, 0.021367311477661133, -0.011835399083793163, -0.030383411794900894, -0.05861878767609596, -0.007256689481437206, -0.013078998774290085, -0.03990825638175011, 0.014640565030276775, -0.012266418896615505, -0.011800069361925125, -0.012033244594931602, -0.01560152880847454, 0.03202270343899727, -0.030468203127384186, 0.04751117527484894, 0.001874232548289001, -0.011934321373701096, -0.031400904059410095, 0.03439684957265854, 0.009178617037832737, -0.006684350781142712, -0.007518128026276827, -0.0006160589982755482, 0.014160082675516605, 0.014202478341758251, 0.022540252655744553, -0.014711223542690277, 0.02333163470029831, -0.01749519258737564, -0.033690258860588074, 0.02540901117026806, -0.015898296609520912, 0.010139580816030502, -0.002100341720506549, -0.03450990468263626, 0.01562979258596897, 0.01789088360965252, -0.017608247697353363, 0.010323294438421726, 0.024787211790680885, -0.00994880124926567, 0.018682265654206276, 0.0032503183465451, 0.019318196922540665, 0.008323641493916512, -0.003903915174305439, 0.048330821096897125, -0.03255971148610115, 0.006755009759217501, 0.028009265661239624, 0.040388740599155426, 0.01158809196203947, 0.011135873384773731, -0.010245569050312042, 0.022229351103305817, -0.030298620462417603, 0.01927580125629902, 0.0076877097599208355, -0.004179485607892275, -0.006210934836417437, -0.030100775882601738, -0.008337773382663727, 0.015587396919727325, 0.02612973377108574, -0.0013504719827324152, 0.028306033462285995, 0.017537588253617287, 0.0049532027915120125, 0.011121741496026516, 0.005175778642296791, 0.024900265038013458, 0.007398007437586784, 0.01834310218691826, 0.030948683619499207, 0.009093825705349445, -0.033294565975666046, 0.020378082990646362, 0.011503300629556179, 0.01698644645512104, 0.025960152968764305, -0.012471330352127552, 0.009037298150360584, -0.028433220461010933, -0.013078998774290085, -0.018201783299446106, 0.005246438086032867, 0.00021186689264141023, 0.0008929543546400964, -0.013820919208228588, -0.018710529431700706, -0.013594809919595718, -0.011828333139419556, 0.009581374004483223, 0.05531194061040878, 0.005765782203525305, 0.0005741051863878965, -0.00787848886102438, 0.01070485357195139, -0.00012630312994588166, 0.0021127068903297186, -0.007751302793622017, -0.008062203414738178, 0.0004725327016785741, -0.017452796921133995, -0.016407042741775513, -0.010075987316668034, -0.017028842121362686, -0.014428587630391121, -0.04847213998436928, -0.020660720765590668, 0.029026757925748825, 0.01960083283483982, -0.003001245204359293, 0.03196617588400841, -0.03012903966009617, -0.031824856996536255, 0.03151395544409752, -0.0027910342905670404, 0.01531889196485281, -0.031429167836904526, 0.041745394468307495, -0.04349774122238159, 0.0036159793380647898, -0.04098227620124817, 0.04434565082192421, 0.014781882986426353, -0.030044248327612877, 0.013601875863969326, -0.019191009923815727, -0.013368701562285423, -0.04208455979824066, 0.023684930056333542, -0.005221707280725241, 0.013870380818843842, 0.005076856352388859, 0.015954824164509773, -0.018032200634479523, 0.026285184547305107, -0.008726398460566998, -0.004631703719496727, 0.007942082360386848, 0.0037590640131384134, 0.016067879274487495, 0.011164137162268162, 0.013220316730439663, 0.03219228610396385, -0.06274528056383133, 0.023218579590320587, 0.0010907998075708747, -0.020038919523358345, -0.0022434263955801725, 0.04366732016205788, -0.03487733006477356, -0.0015659822383895516, -0.0012594984145835042, -0.02266743779182434, 0.05952322483062744, 0.013997566886246204, -0.032418392598629, -0.021932583302259445, -0.00874759629368782, -0.029931193217635155, -0.038042858242988586, 0.03626224771142006, 0.030835630372166634, -0.01954430714249611, 0.0008708733948878944, 0.03450990468263626, -0.03640356659889221, -0.012188694439828396, -0.019982391968369484, -0.02338816039264202, -0.013163790106773376, 0.01717016100883484, 0.016972314566373825, 0.005705722142010927, 0.006514768581837416, 0.006023688241839409, -0.017933279275894165, -0.015333023853600025, -0.03298366814851761, -0.012591451406478882, 0.007398007437586784, 0.0025189968291670084, -0.00019022753986064345, 0.001309843035414815, 0.015474341809749603, -0.038466811180114746, -0.011029885150492191, -0.012895285151898861, 0.04041700437664986, -0.0076170507818460464, 0.007016448304057121, -0.013156724162399769, 0.007249623537063599, -0.029507238417863846, 0.014061160385608673, -0.006613691337406635, 0.002077377401292324, -0.005306498147547245, 0.008373103104531765, 0.0020703114569187164, 0.0056279972195625305, -0.04197150468826294, 0.01050700806081295, -0.002446571132168174, -0.0029606162570416927, -0.0014140651328489184, 3.425310205784626e-05, 0.015912428498268127, 0.03959735855460167, 0.013566547073423862, 0.007956214249134064, -0.00608728127554059, -0.022780492901802063, 0.0012383006978780031, 0.004575176630169153, 0.013997566886246204, -0.009835746139287949, 0.005603266414254904, -0.0064653074368834496, -0.0028069326654076576, 0.03603614121675491, -0.008309509605169296, -0.02482960745692253, -0.007609984837472439, -0.007405073381960392, -0.007652380038052797, -0.0021604017820209265, -0.0027433393988758326, 0.008648673072457314, 0.00841549877077341, 0.04010610282421112, -0.006221533287316561, -0.009595504961907864, 0.0004698830016423017, -0.029422447085380554, -0.008881848305463791, 0.008429630659520626, -0.005804644897580147, -0.016223328188061714, 0.014322599396109581, -0.020999884232878685, 0.005437217652797699, -0.028546275570988655, 0.023289239034056664, -0.0028828911017626524, 0.03109000250697136, 0.013658403418958187, -0.025479670614004135, -0.013255646452307701, -0.0059530287981033325, 0.01602548360824585, 0.006232132203876972, 0.0034834935795515776, -0.01250666007399559, 0.031372640281915665, -0.04106706753373146, 0.008203521370887756, -0.00790675263851881, -0.028376692906022072, -0.02314792014658451, 0.016308119520545006, -0.011460905894637108, -0.003766129957512021, -0.009150353260338306, 0.015205837786197662, 0.021536892279982567, 0.013750260695815086, 0.03109000250697136, -0.0009627302060835063, -0.03222054988145828, -0.0031266650184988976, 0.022709833458065987, -0.026030810549855232, -0.007164832670241594, 0.006804470904171467, 0.05596200376749039, -0.006281593814492226, -0.024575233459472656, 0.00933406688272953, 0.0020226165652275085, 0.03883424028754234, -0.044091276824474335, 0.00933406688272953, -0.023642534390091896, -0.0007759252330288291, -0.035159967839717865, -0.004536313936114311, 0.016604887321591377, 0.015728715807199478, -0.02386864274740219, 0.03544260188937187, -0.005786980036646128, 0.008924243971705437, 0.0011835398618131876, 0.03210749477148056, -0.0260025467723608, 0.039879992604255676, -0.013856248930096626, -0.016887525096535683, -0.01914861612021923, 0.0055361404083669186, -0.015855900943279266, -0.012266418896615505, 0.0018883643206208944, -0.027769025415182114, -0.011354916729032993, 0.01996826007962227, -0.005783447064459324, -0.0451652966439724, 0.017848487943410873, 0.010189041495323181, -0.004260743502527475, -0.01623746007680893, -0.032842349261045456, -0.0005016796058043838, -0.001985520590096712, 0.001194138778373599, -0.01437206007540226, 0.024886133149266243, -0.002056179801002145, 0.019798679277300835, 0.03292714059352875, -0.015728715807199478, 0.024278465658426285, -0.01978454738855362, 0.01989760249853134, -0.014979728497564793, 0.01650596596300602, -0.0017496958607807755, -0.06630649417638779, -0.0111994668841362, 0.005143982358276844, 0.014209544286131859, -0.008818255737423897, 0.020392214879393578, 0.00024841088452376425, -0.005613865330815315, 0.004522182047367096, 0.0063027916476130486, 0.008797057904303074, -0.055424995720386505, 0.039399512112140656, 0.004059365019202232, -0.04445870220661163, -0.013644271530210972, -0.03154221922159195, -0.04352600499987602, -0.012845823541283607, -0.012061507441103458, 0.029111547395586967, -0.020858565345406532, -0.008839452639222145, 0.016887525096535683, -3.4536012663011206e-06, -0.03569697588682175, 0.007652380038052797, 0.01109347864985466, -0.014244874007999897, 0.023105524480342865, 0.006023688241839409, 0.0344533771276474, -0.013580678030848503, 0.0028334297239780426, -0.018145255744457245, -0.016152668744325638, -0.007419205270707607, 0.03535781055688858, -0.023345764726400375, 0.06427151709794998, 0.004564577713608742, 0.0042960732243955135, -0.024702420458197594, 0.001714366371743381, 0.005009729880839586, -0.0022416599094867706, -0.024970924481749535, 0.0170429740101099, 0.02143797092139721, -0.055877212435007095, -0.018442023545503616, 0.00221339613199234, 0.022992469370365143, 0.008076334372162819, -0.013997566886246204, -0.004267809446901083, -0.00043124129297211766, -0.009503648616373539, 0.009404725395143032, -0.04284767806529999, -0.009319934993982315, -0.012753967195749283, 0.014640565030276775, -0.020434610545635223, -0.025182902812957764, 0.0067903390154242516, 0.03391636535525322, -0.014965596608817577, -0.010203173384070396, 0.0008077218080870807, -0.009009035304188728, -0.00025260625989176333, -0.012019112706184387, 0.04717201367020607, 0.01855507865548134, -0.0013133760076016188, 0.0022699234541505575, 0.018922505900263786, -0.01270450558513403, 0.01512104645371437, -0.027203751727938652, -0.011354916729032993, -0.01786261983215809, 0.016520095989108086, -0.002052646828815341, 0.01058473251760006, -0.05712081491947174, -0.011347850784659386, 0.008019807748496532, 0.00672674598172307, 0.01599721983075142, 0.017664773389697075, -0.02213042974472046, 0.032842349261045456, 0.014909069053828716, -0.008450827561318874, -0.011255994439125061, -0.002935885451734066, 0.0005272935377433896, 0.03496212139725685, 0.045023977756500244, 0.051637668162584305, -0.014463917352259159, 0.009065561927855015, -0.02648302912712097, 0.0018336036009714007, -0.010485810227692127, -0.011255994439125061, 0.004465654958039522, -0.023430556058883667, 0.021452100947499275, 0.0003932620456907898, 0.017127765342593193, -0.008888914249837399, 0.012845823541283607, -0.015587396919727325, 0.009955867193639278, 0.0015686319675296545, -0.020420478656888008, 0.024758948013186455, 0.007723039481788874, -0.0327010303735733, 0.03473601117730141, -0.03527302294969559, -0.018272442743182182, -0.005889435764402151, 0.006956388242542744, -0.03634703904390335, -0.027670102193951607, -0.02143797092139721, -0.03253144770860672, 0.014781882986426353, -0.001649889862164855, 0.0034658287186175585, -0.01960083283483982, -0.0077795665711164474, 0.018950769677758217, 0.008069268427789211, -0.007062376942485571, 0.006730278953909874, 0.03289887681603432, -0.007553457282483578, -0.023911038413643837, -0.008662804961204529, 0.002866992959752679, -0.004264276474714279, -0.03496212139725685, -0.0036212787963449955, 0.01717016100883484, 0.032729294151067734, 0.010047723539173603, -0.012513726018369198, 0.022752229124307632, 0.04041700437664986, -0.0413779653608799, 0.018781188875436783, 0.014386191964149475, -0.019925866276025772, -0.01319911889731884, 0.02685045637190342, -0.038862504065036774, -0.005493744742125273, 0.002146270126104355, 0.01070485357195139, 0.007920884527266026, -0.0009062029421329498, 0.026271052658557892, 0.053983550518751144, -0.004515116102993488, 0.0024289065040647984, 0.05358785763382912, 0.012520791962742805, -0.011736475862562656, -0.002354714320972562, -0.007482798304408789, -0.003027742262929678, -0.01365133747458458, -0.012775165028870106, 0.03301193192601204, -0.0070517780259251595, 0.018526814877986908, 0.004638769663870335, 0.003744932124391198, -0.005755183286964893, 0.00042925402522087097, -0.01683099754154682, -0.024250201880931854, 0.050281014293432236, -0.023953434079885483, -0.009383528493344784, -0.0056279972195625305, -0.01417421456426382, 0.016859261319041252, -0.003720201551914215, -0.013375767506659031, 0.00012056208652211353, -0.004818950314074755, -3.679241126519628e-05, -0.0186116062104702, -0.04279115051031113, 0.005560870748013258, 0.010796709917485714, -0.006242731120437384, 0.0061932699754834175, 0.0033580735325813293, -0.05567936971783638, -0.014584037475287914, -0.037901539355516434, -0.02642650157213211, 0.01429433561861515, -0.0012745134299620986, -0.007899686694145203, 0.03012903966009617, -0.037958066910505295, -0.013156724162399769, -0.001667554723098874, 0.035668712109327316, 0.03411421179771423], "index": 21}, {"title": "Jacob K. Javits Federal Building", "text": "The Jacob K. Javits Federal Office Building at 26 Federal Plaza on Foley Square in the Civic Center district of Manhattan, New York City houses many Federal government agencies, and, at over 41 stories, is the tallest federal building in the United States. It was built in 1963-69 and was designed by Alfred Easton Poor and Kahn & Jacobs, with Eggers & Higgins as associate architects.", "vector": [0.02560940943658352, -0.013634005561470985, -0.015596937388181686, 0.0291244275867939, -0.015049141831696033, 0.01211235299706459, 0.02559419348835945, 0.023113900795578957, -0.06902215629816055, 0.05900967866182327, -0.010438535362482071, -0.019674966111779213, 0.016814259812235832, -0.01946193352341652, -0.00637191953137517, 0.017453353852033615, -0.041084613651037216, -0.006200733594596386, -0.009167955256998539, 0.0019952666480094194, -0.034358911216259, -0.006832219194620848, 0.0005582562298513949, -0.007760427426546812, 0.013086210936307907, -0.004294863902032375, 0.04385402053594589, -0.017468569800257683, -0.021166184917092323, 0.02859184890985489, 0.020024945959448814, 0.04668429493904114, 0.033932849764823914, -0.007478921674191952, 0.035302337259054184, 0.03694571927189827, 0.04391488805413246, -0.02512248046696186, 0.05015366151928902, -0.04485831409692764, -5.462494300445542e-05, 0.011404784396290779, -0.014531780034303665, 0.004306276328861713, 0.031224306672811508, -0.026233287528157234, 0.006539301015436649, 0.0015815674560144544, -0.050092797726392746, 0.0834474191069603, 0.006227362435311079, -0.029611356556415558, 0.016692526638507843, 0.010773299261927605, 0.0013828015653416514, -0.008566902950406075, 0.008795150555670261, 0.09823787957429886, -0.005976289976388216, 0.07023947685956955, 0.021044453606009483, -0.021440083160996437, -0.028394034132361412, 0.00021909417409915477, 0.023600827902555466, 0.10529834777116776, -0.0015092890243977308, 0.027602775022387505, -0.027785371989011765, 0.003670986508950591, 0.03155907243490219, 0.03114822506904602, -0.005839340854436159, 0.008224531076848507, 0.029017910361289978, -0.028926612809300423, 0.05949660763144493, 0.005143185146152973, 0.01658601127564907, 0.00607139291241765, 0.07096986472606659, -0.030935192480683327, -0.030691727995872498, 0.0067827655002474785, -0.018457643687725067, -0.002575396792963147, -0.08229096233844757, -0.04930153861641884, 0.039836861193180084, -0.00431008031591773, 0.010248328559100628, 0.03636749088764191, -0.0139307277277112, -0.027252795174717903, 0.01952280104160309, 0.015338256023824215, 0.020542306825518608, -0.011511300690472126, -0.000816937128547579, 0.0009595920564606786, -0.004926349502056837, 0.03527190163731575, -0.027587557211518288, -0.01390029489994049, 0.003303887788206339, -0.0001974581682588905, -0.033263321965932846, 0.0007375258719548583, 0.027404960244894028, 0.022703053429722786, -0.016844691708683968, -0.030235232785344124, -0.01605343259871006, -0.016570795327425003, -0.02017711102962494, 0.041571542620658875, 0.023250848054885864, 0.007726190146058798, 0.018305478617548943, 0.008848409168422222, 0.009000574238598347, -0.023585611954331398, 0.03612402826547623, 0.00017926967120729387, -0.028835313394665718, 0.003925863187760115, 0.04074985161423683, 0.06034873425960541, 0.00411606952548027, 0.0006428981432691216, -0.06211385130882263, 0.01789463311433792, 0.031224306672811508, -0.07297845184803009, -0.0003792243078351021, -0.016327330842614174, 0.022063959389925003, 0.009624451398849487, -0.0375848151743412, 0.036489225924015045, -0.011092846281826496, 0.007022425998002291, -0.03706745430827141, 0.00040252460166811943, 0.05191877856850624, -0.054505590349435806, 0.002908258233219385, 0.02344866283237934, -0.005550227127969265, -0.007452292833477259, -0.0024859996046870947, 0.014699161984026432, 0.020557524636387825, -0.022368289530277252, 0.074987031519413, -0.0030375986825674772, 0.02124226838350296, 0.006227362435311079, -0.01701207458972931, 0.03301985561847687, -0.028181001543998718, -0.026583267375826836, 0.04196717217564583, -0.019203253090381622, 0.0017508512828499079, -0.011184144765138626, 0.01381660345941782, 0.004743751138448715, 0.023707345128059387, 0.0023014992475509644, 0.012896004132926464, -0.010438535362482071, -0.007642499171197414, -0.0316503681242466, -0.011541733518242836, -0.03807174414396286, 0.02238350734114647, 0.020983586087822914, 0.014858935959637165, -0.022474806755781174, 0.036610957235097885, 0.02649196796119213, 0.011944971047341824, 0.04321492835879326, -0.03241119533777237, 0.0009548368980176747, 0.0037965227384120226, -0.010484185069799423, 0.03253292664885521, -0.04516264423727989, -0.03855867311358452, 0.026339802891016006, 0.031832966953516006, 0.014744811691343784, 0.02005537785589695, -0.07523049414157867, 0.05061015859246254, -0.005177422426640987, -0.05657503753900528, -0.022657403722405434, 0.026400668546557426, 0.030813461169600487, -0.05143184959888458, 0.00431008031591773, 0.03090476058423519, 0.03466324135661125, 0.05322740226984024, -0.044188786298036575, -0.006136063486337662, -0.005633918102830648, -0.05873578414320946, 0.012089528143405914, 0.0036139243748039007, -0.018122879788279533, -0.012454724870622158, 0.01515565812587738, -0.0204053595662117, -0.004275843035429716, 0.007330560591071844, 0.0007513158489018679, 0.013945944607257843, 0.017514219507575035, -0.021820494905114174, -0.002116998890414834, 0.024863800033926964, -0.017803333699703217, 0.04190630838274956, 0.011922146193683147, -0.022155258804559708, 0.024452954530715942, -0.015581720508635044, -0.026841947808861732, -0.010735257528722286, 0.046927761286497116, 0.030478697270154953, 0.008795150555670261, 0.011397176422178745, -0.04370185732841492, -0.011374351568520069, 0.008467995561659336, 0.061444323509931564, 0.00732675613835454, -0.07523049414157867, 0.013892685994505882, -0.029109209775924683, 0.015718668699264526, -0.03676312044262886, 0.009951606392860413, -0.02112053520977497, -0.016920775175094604, 0.03831520676612854, 0.015855617821216583, 0.05216224491596222, 0.02710063010454178, 0.07845639437437057, 0.01576431840658188, -0.04501047730445862, -0.028683148324489594, -0.002482195384800434, -0.0446452796459198, -0.04309319704771042, 0.05420126020908356, 0.00031550510902889073, -0.018640242516994476, -0.0006752332556061447, -0.022596538066864014, -0.004675277043133974, -0.009609234519302845, 0.0074028391391038895, 0.020024945959448814, -0.005850753281265497, 0.011792805977165699, 0.02853098325431347, 0.04838854447007179, -0.024681201204657555, 0.028744013980031013, -0.01880762353539467, 0.04893634095788002, 0.002788427984341979, -0.003100366797298193, -0.005550227127969265, -0.0030547170899808407, 0.030600430443882942, 0.012340600602328777, -0.009350554086267948, 0.019614098593592644, 0.052010077983140945, 0.008247355930507183, 0.03782827779650688, -0.03734134882688522, -0.006383331958204508, 0.0119677959010005, 0.04318449646234512, 0.00735338544473052, -0.011267836205661297, -0.01345140766352415, 0.013763345777988434, -0.020085811614990234, 0.012097136117517948, -0.01390029489994049, -0.010453752242028713, 0.020131461322307587, -0.009236429817974567, -0.014470914378762245, 0.005858361721038818, -0.012211260385811329, -0.02249002270400524, 0.0510970875620842, 0.03624575957655907, -0.044675715267658234, 0.04354969039559364, -0.0004179788811597973, -0.00693493103608489, -0.002025699708610773, 0.0271614957600832, 0.016327330842614174, 0.05657503753900528, -0.003585393540561199, 0.026826731860637665, -0.05295350402593613, -0.017407704144716263, 0.02411819063127041, -0.022368289530277252, 0.03055478073656559, 0.023676911368966103, -0.05931400880217552, 0.03298942372202873, -0.02148573100566864, -0.03658052533864975, 0.003884017700329423, 0.018427209928631783, -0.027526691555976868, 0.009632059372961521, 0.002073251409456134, 0.01456221379339695, -0.021287916228175163, -0.022094393149018288, 0.026461536064743996, -0.025974607095122337, 0.02869836427271366, 0.03508930280804634, 0.02387472614645958, 0.013535098172724247, -0.01628168113529682, -0.03155907243490219, 0.01473720371723175, 0.038832567632198334, 0.017149021849036217, 0.03533276915550232, -0.030585212633013725, 0.0007028132095001638, -0.0031536247115582228, -0.04601476714015007, -0.008369088172912598, 0.0074294679798185825, 0.002288184827193618, 0.00023335966398008168, -0.055662043392658234, 0.04382358863949776, 0.04230193793773651, 0.06750050187110901, 0.033263321965932846, -0.012728622183203697, 0.04625823348760605, -0.03445021063089371, 0.019081521779298782, -0.01053744275122881, -0.011815630830824375, -0.012317775748670101, 0.05106665566563606, -0.05267960578203201, -0.02142486535012722, 0.01641863025724888, 0.04662343114614487, -0.015977350994944572, -0.01874675787985325, -0.006676250137388706, -0.004614410921931267, -0.020755339413881302, -0.009708141908049583, -0.04510177671909332, -0.06634404510259628, 0.04351925849914551, 0.04814508184790611, 0.03861953690648079, -0.04245410114526749, 0.014935018494725227, -0.01148847583681345, -0.019127171486616135, -0.035119738429784775, -0.026339802891016006, 0.004888308234512806, 0.013055777177214622, 0.0008240698953159153, 0.0065164766274392605, -0.021227050572633743, 0.0041122655384242535, -0.003866899060085416, 0.02089228667318821, 0.006079001352190971, -0.010948289185762405, 0.053683895617723465, -0.018335910513997078, 0.029580922797322273, 0.007030033972114325, -0.06780482828617096, -0.0054551237262785435, 0.010575484484434128, 0.006527888588607311, 0.028074486181139946, -0.03049391321837902, -0.06701356917619705, -0.0005159352440387011, -0.010491793043911457, 0.03359808400273323, -0.018701108172535896, 0.02489423379302025, -0.012972086668014526, 0.02667456679046154, 0.025442028418183327, 0.047353822737932205, 0.004340513609349728, -0.03256336227059364, 0.00025511454441584647, -0.003319104202091694, 0.03682398796081543, 0.03222859650850296, 0.008194098249077797, -0.02350953035056591, 0.003788914531469345, 0.009594018571078777, 0.0524057075381279, -0.01580996811389923, 0.018335910513997078, 0.038589105010032654, 0.01772725023329258, 0.03621532768011093, 0.009015790186822414, 0.022231342270970345, -0.002145529957488179, 0.048540711402893066, 0.035576231777668, 0.002219710499048233, 0.015596937388181686, -0.04625823348760605, 0.02471163496375084, -0.03581969812512398, -0.0093962037935853, 0.011526516638696194, 0.0014902682742103934, 0.024848584085702896, -0.02452903613448143, -0.06756136566400528, -0.03962382674217224, 0.0705438032746315, 0.05018409714102745, 0.016205597668886185, -0.013109035789966583, -0.046927761286497116, -0.02507683075964451, -0.02780058979988098, -0.030569996684789658, -0.00014515136717818677, -0.10669826716184616, 0.010628742165863514, -0.0027751135639846325, 0.02452903613448143, -0.001273432862944901, 0.0016795238479971886, -0.029991768300533295, -0.006463218480348587, 0.040202055126428604, -0.059161845594644547, 0.01507196668535471, -0.016570795327425003, -0.029611356556415558, -0.0009006279869936407, -0.05526641383767128, 0.024513820186257362, -0.0007204072899185121, -0.0017204182222485542, 0.02291608601808548, -0.006866456475108862, -0.03210686519742012, 0.01873154193162918, 0.011747156269848347, -0.055175114423036575, -0.01964453235268593, -0.039958592504262924, 0.050762325525283813, 0.0866733193397522, 0.03770654648542404, 0.015855617821216583, -0.035484932363033295, 0.02548767812550068, 0.0004324821347836405, -0.01952280104160309, -0.015718668699264526, -0.04802335053682327, -0.006067588925361633, -0.016814259812235832, 0.010605917312204838, 0.01660122722387314, -0.01964453235268593, -0.0204053595662117, -0.008665810339152813, 0.02565505914390087, 0.00264196889474988, -0.037919577211141586, -0.025761574506759644, 0.023707345128059387, -0.02936789207160473, -0.022185692563652992, -0.03734134882688522, -0.06774396449327469, -0.046106066554784775, -0.0065735382959246635, -0.004686689469963312, 0.0021512361709028482, -0.032624226063489914, 0.015094791539013386, 0.021927010267972946, -0.006622991990298033, -0.023783426731824875, 0.03639792650938034, -0.014417656697332859, -0.009472286328673363, -0.011868888512253761, 0.022292207926511765, -0.015657803043723106, -0.01903587207198143, -0.024011675268411636, 0.00862016063183546, -0.019553232938051224, 0.01719467155635357, 0.015163266099989414, 0.009867915883660316, -0.03752394765615463, -0.007052858825773001, -0.04720165580511093, 0.036915287375450134, -0.017468569800257683, 0.006733311805874109, -0.0317416675388813, -0.020694471895694733, -0.02411819063127041, 0.041754141449928284, 0.009023399092257023, -0.013101426884531975, -0.0016852300614118576, 0.04035422205924988, 0.005489361006766558, -0.003642455441877246, 0.009061439894139767, 0.041449811309576035, 0.007935416884720325, 0.04339752718806267, -0.0021569423843175173, 0.038467373698949814, 0.010126596316695213, 0.017757683992385864, 0.018275044858455658, -0.04701906070113182, 0.018518509343266487, -0.0033495372626930475, -0.001213517738506198, 0.0076843444257974625, 0.02728322707116604, -0.07334364205598831, 0.018640242516994476, 0.018275044858455658, -0.004043791443109512, 0.01121457852423191, 0.04038465395569801, 0.018761973828077316, 0.013634005561470985, -0.02309868298470974, -0.038102176040410995, -0.012584065087139606, -0.00640235235914588, 0.02734409272670746, 0.019020654261112213, -0.009145131334662437, 0.02524421364068985, 0.017316404730081558, 0.02058795653283596, -0.012485157698392868, -0.041449811309576035, 0.0033894807565957308, 0.007779447827488184, 0.02643110230565071, 0.022124825045466423, 0.0226269718259573, -0.03527190163731575, -0.00791259203106165, 0.012393859215080738, -0.028972262516617775, -0.03633705899119377, -0.0017223203321918845, 0.002584906993433833, 0.014037243090569973, 0.009358162060379982, -0.009601626545190811, -0.005892599001526833, -0.01605343259871006, 0.01987278088927269, 0.0401107557117939, -0.03247206285595894, -0.010042905807495117, -0.01088742259889841, 0.03718918561935425, 0.013808995485305786, 0.020633606240153313, -0.035424068570137024, -0.038406506180763245, -0.023798642680048943, -0.01062113419175148, -0.005884990561753511, -0.03283726051449776, -0.02953527309000492, -0.02017711102962494, -0.015627369284629822, 0.015231740660965443, 0.019857563078403473, 0.017225105315446854, 0.014881760813295841, 0.03274596109986305, 0.027907105162739754, 0.014197017066180706, -0.0027865259908139706, -0.020724905654788017, 0.0034085013903677464, -0.0037147339899092913, -0.0342676118016243, -0.028683148324489594, 0.003594903741031885, 0.01860980875790119, -0.021257484331727028, 0.01628168113529682, -0.003621532814577222, -0.010126596316695213, 0.047049492597579956, -0.01766638457775116, 0.03770654648542404, -0.018929356709122658, -0.020085811614990234, 0.002347148722037673, 0.004720926750451326, 0.028667930513620377, 0.04345839098095894, 0.019842347130179405, 0.004089440684765577, 0.0005829830770380795, -0.0051888348534703255, -0.0003571127890609205, 0.007262086030095816, -0.016083866357803345, -0.0004346219648141414, -0.00928207952529192, 0.014387223869562149, -0.006493651773780584, 0.01964453235268593, -0.03037218190729618, -0.010210287757217884, -0.016753392294049263, -0.032502494752407074, 0.002434643916785717, 0.02475728467106819, -0.01689034141600132, -0.007345777004957199, -0.00020589858468156308, -0.00598389795050025, 0.017027290537953377, 0.024559469893574715, -0.005569247994571924, 0.008156056515872478, 0.00607139291241765, -0.03402414917945862, 0.0005687176017090678, 0.01689034141600132, -0.0036500636488199234, -0.00817127339541912, 0.010187462903559208, -0.008673418313264847, -0.022033527493476868, -0.021577030420303345, 0.007178395055234432, -0.011785198003053665, 0.007756622973829508, 0.01856415905058384, 0.00023847146076150239, 0.03323289006948471, -0.014372006990015507, -0.010605917312204838, -0.0029367890674620867, 0.01406006794422865, 0.08904709666967392, 0.008049541153013706, -0.03228946402668953, 0.0038992343470454216, -0.0032867691479623318, 0.01127544417977333, -0.0013314458774402738, 0.0004465098900254816, -0.015163266099989414, 0.01832069456577301, -0.006170300301164389, 0.008156056515872478, 0.008376696147024632, 0.0020123852882534266, 0.03588056191802025, -0.014158975332975388, 0.01629689708352089, -0.02507683075964451, -0.02242915704846382, -0.003728048410266638, 0.014197017066180706, -0.03998902440071106, 0.029915686696767807, -0.02250523865222931, 0.06293554604053497, -0.019355418160557747, -0.04939283803105354, -0.02804405428469181, 0.01795549876987934, 0.0076653240248560905, -0.012926436960697174, -0.0226269718259573, -0.01825982891023159, 0.026537617668509483, 0.029733087867498398, 0.04558870568871498, -0.007380014285445213, 0.022124825045466423, -0.007764231413602829, 0.04062812030315399, 0.0008877890650182962, -0.01707294024527073, 0.027481041848659515, -0.05319696664810181, 0.05258830636739731, -0.03038739785552025, -0.0725523829460144, -0.011716723442077637, 0.025578977540135384, 0.02255088835954666, 0.03922819718718529, 0.02124226838350296, -0.02195744402706623, 0.02553332783281803, -0.0011583579471334815, 0.029885252937674522, 0.036550089716911316, -0.007049054838716984, 0.018838057294487953, 0.033385053277015686, 0.012135177850723267, -0.06890042126178741, 0.012972086668014526, 0.02553332783281803, -0.04969716817140579, 0.019538016989827156, -0.019248902797698975, 0.03938036412000656, -0.022961733862757683, -0.03402414917945862, 0.03712831810116768, -0.025944173336029053, -0.007064271252602339, 0.006292032543569803, 0.01956845074892044, -0.0065583218820393085, 0.021211834624409676, -0.004561153240501881, -0.02959613874554634, 9.040754957823083e-05, -0.005957269109785557, 0.01364161353558302, 0.023905159905552864, 0.008338655345141888, 0.006257795728743076, -0.04105418175458908, -0.005458928178995848, -0.002487901598215103, 0.004663864616304636, 0.0043329051695764065, 0.021409649401903152, -0.012378642335534096, 0.010788515210151672, 0.056483738124370575, 0.014630687423050404, 0.011655857786536217, 0.0021189008839428425, -0.008612552657723427, 0.00771477771922946, -0.0395020954310894, 0.04488874599337578, 0.011085237376391888, 0.03292855620384216, -0.035119738429784775, 0.005968681536614895, 0.01074286550283432, 0.05210137739777565, 0.007943025790154934, -0.03639792650938034, -0.003212588606402278, 0.006702878978103399, 0.035180602222681046, -0.03575883060693741, 0.009031007066369057, -0.008711460046470165, -0.0330502912402153, 0.03928906470537186, 0.03359808400273323, -0.011328701861202717, 0.017164239659905434, -0.0038193475920706987, -0.02189657837152481, 0.0037223421968519688, 0.002208298072218895, -0.010271153412759304, 0.058279287070035934, 0.05663590133190155, 0.02334214746952057, 0.007524570915848017, 0.014455697499215603, 0.005211659241467714, -0.009943998418748379, 0.0035093107726424932, -0.005044277757406235, -0.03317202255129814, -0.01927933655679226, -0.023981241509318352, -0.01952280104160309, -0.009685317985713482, -0.017407704144716263, 0.013497056439518929, 0.05992267280817032, 0.007376209832727909, 0.020101027563214302, -0.023920375853776932, 0.02757234126329422, 0.003986729308962822, 0.007243065629154444, 0.0023870922159403563, -0.0027199536561965942, 0.019142387434840202, -0.053501296788454056, -0.031954701989889145, 0.027191927656531334, 0.023479096591472626, 0.00841473788022995, 0.013732912950217724, 0.003326712641865015, 0.012119960971176624, 0.005158401560038328, -0.052497006952762604, 0.0032163928262889385, 0.011206969618797302, 0.008604944683611393, 0.013291633687913418, 0.0027960361912846565, 0.02734409272670746, 0.02673543244600296, -0.0005844096303917468, 0.012294951826334, 0.025700708851218224, -0.028744013980031013, 0.015977350994944572, 0.021455299109220505, 0.041145481169223785, -0.0017955498769879341, 0.049331970512866974, -0.05806625634431839, -0.008148448541760445, 0.02279435284435749, -0.02130313403904438, 0.027907105162739754, 0.0056757633574306965, -0.005592072382569313, -0.006098022218793631, 0.03308072313666344, 0.007866943255066872, -0.012759055010974407, -0.015148049220442772, 0.009350554086267948, 0.002037112135440111, 0.021105319261550903, -0.0033894807565957308, -0.022033527493476868, -0.009335337206721306, 0.0408107191324234, -0.007756622973829508, -0.015498029999434948, -0.013314458541572094, 0.014052459970116615, -0.01909673772752285, -0.0006253040046431124, 0.019659748300909996, 0.020618390291929245, 0.00852886214852333, -0.0013656830415129662, 0.01754465140402317, -0.002021895721554756, -0.017635950818657875, -0.002390896435827017, 0.0329589918255806, -0.012119960971176624, 0.01428831648081541, 0.024985533207654953, 0.032015565782785416, -0.009548368863761425, 0.01623603142797947, -0.019248902797698975, -0.044919177889823914, 0.0162208154797554, 0.004907329101115465, -0.02338779717683792, 0.01772725023329258, 0.020101027563214302, 0.00195532338693738, 0.004507895093411207, 0.01193736307322979, 0.006303444970399141, 0.0054551237262785435, -0.02757234126329422, -0.021942228078842163, 0.0607747957110405, 0.006166496314108372, 0.028439683839678764, -0.028317950665950775, -0.04123678058385849, 0.008216923102736473, -0.06323987245559692, -0.016799042001366615, 0.03222859650850296, -0.03728048503398895, -0.01399159338325262, 0.046166934072971344, 0.0197510477155447, 0.023479096591472626, 0.05003193020820618, 0.008506037294864655, -0.039532531052827835, 0.0011631130473688245, 0.02338779717683792, 0.010590700432658195, 0.018366344273090363, -0.00413509039208293, 0.025152914226055145, 0.026050688698887825, 0.0038478784263134003, 0.012431900016963482, 0.017514219507575035, -0.01628168113529682, 0.03091997653245926, -0.005763258319348097, 0.04452354833483696, -0.02793753892183304, -0.04348882660269737, 0.0003395186795387417, -0.035424068570137024, 0.022824786603450775, 0.006432785652577877, 0.010735257528722286, 0.014744811691343784, 0.016205597668886185, -0.027131062000989914, -0.0008854115149006248, 0.022520454600453377, 0.001154553727246821, -0.023357363417744637, 0.03761524707078934, -0.004903524648398161, -0.02107488550245762, -0.05204051360487938, 0.04637996479868889, 0.0045953900553286076, -0.011769981123507023, -0.019659748300909996, 0.004720926750451326, 0.01850329339504242, -0.0034237178042531013, 0.011587383225560188, -0.011731940321624279, 0.007874551229178905, 0.028211435303092003, -0.025228997692465782, -0.0362761914730072, 0.04047595337033272, 0.009274471551179886, -0.0162208154797554, 0.047353822737932205, -0.03323289006948471, -0.014151367358863354, -0.05167531594634056, -0.004408987704664469, -0.013808995485305786, 0.002411819063127041, -0.043367091566324234, 0.033567652106285095, -0.03998902440071106, -0.073769710958004, -0.02249002270400524, 0.030935192480683327, -0.008985357359051704, -0.03776741400361061, 0.04671472683548927, -0.007943025790154934, -0.025807224214076996, -0.027435392141342163, 0.011450434103608131, 0.019674966111779213, -0.010286370292305946, -0.031254738569259644, 3.0091270673437975e-05, 0.025883307680487633, 0.03014393337070942, 0.016981640830636024, -0.013055777177214622, 0.010963505133986473, 0.006851240061223507, 0.0047475555911660194, -0.007585437037050724, -0.011754765175282955, 0.011815630830824375, -0.025381162762641907, 0.03317202255129814, -0.0016833279514685273, -0.013938335701823235, 0.05115795508027077, -0.014760028570890427, 0.0011507496237754822, -0.009479894302785397, -0.06211385130882263, 0.004899720661342144, -0.008536470122635365, 0.06050090119242668, -0.012013445608317852, 0.013679655268788338, 0.004291059914976358, 0.013976377435028553, -0.019111953675746918, -0.011556950397789478, -0.010917856357991695, 0.015977350994944572, 0.004614410921931267, 0.022398723289370537, -0.010362452827394009, -0.0033000835683196783, -0.0018098152941092849, 0.01313186064362526, 0.0329589918255806, 0.04817551374435425, -0.0210140198469162, 0.021927010267972946, -0.03676312044262886, 0.01897500455379486, 0.041449811309576035, 0.024574685841798782, 0.020740121603012085, -0.02124226838350296, 0.011944971047341824, -5.655672794091515e-05, -0.014927409589290619, -0.011944971047341824, -0.026005038991570473, 0.021394433453679085, 0.020314060151576996, 0.029017910361289978, -0.01095589715987444, 0.019309768453240395, 0.014067676849663258, -0.01670774258673191, 0.010332019999623299, -0.00534099992364645, -0.014607863500714302, -0.01065156701952219, -0.035058870911598206, -0.043062761425971985, 0.017285970970988274, 0.02416384033858776, 0.0009386693127453327, 0.011435218155384064, 0.017514219507575035, -0.00645941449329257, -0.016981640830636024, 0.052070945501327515, -0.031041709706187248, -0.010773299261927605, -0.013649222441017628, 0.030767811462283134, -0.0011364840902388096, 0.0484798438847065, -0.018229395151138306, -0.039836861193180084, -0.02256610430777073, 0.05073188990354538, -0.03956296294927597, 0.023646477609872818, 0.03055478073656559, -0.038102176040410995, -0.015886051580309868, 0.0388021357357502, 0.0194010678678751, 0.00495297834277153, -0.027770156040787697, 0.010210287757217884, 0.03222859650850296, 0.006836023181676865, -0.045862603932619095, 0.032502494752407074, 0.002991948975250125, 0.03676312044262886, 0.005458928178995848, -0.0034750737249851227, -0.003123191650956869, -0.020572740584611893, 0.029398323968052864, -0.023768210783600807, -0.019964080303907394, -0.033932849764823914, -0.04397575557231903, 0.002815056825056672, 0.006874064914882183, 0.023722561076283455, -0.015315431170165539, -0.005226876121014357, 0.036884855479002, 0.030889544636011124, 0.0014465207932516932, -0.001219223951920867, 0.001510240021161735, 0.006059980485588312, 0.0011726233642548323, -0.010750474408268929, 0.0018079133005812764, -0.00984509103000164, 0.0069653638638556, 0.005131772719323635, -0.011610208079218864, 0.00788215920329094, -0.01658601127564907, -0.020664039999246597, 0.04519307613372803, -0.028378818184137344, 0.02326606586575508, 0.017742466181516647, -0.026705000549554825, 0.005508381873369217, -0.00948750227689743, 0.014402439817786217, 0.025411594659090042, 0.03158950433135033, -0.04589303582906723, -0.003359047695994377, 0.011960187926888466, -0.01462307944893837, -0.005299154669046402, 0.04415835440158844, -0.02792232111096382, -0.018062014132738113, -0.004119873978197575, 0.0197510477155447, 0.027237577363848686, 0.006299640983343124, 0.011914538219571114, -0.016692526638507843, 0.007889768108725548, 0.039471663534641266, 0.011625424027442932, -0.012599281966686249, -0.022870436310768127, -0.011678681708872318, -0.04653213173151016, -0.02238350734114647, -0.03922819718718529, -0.006999601144343615, 0.038710836321115494, -0.002664793748408556, -0.007109920959919691, -0.022703053429722786, -0.009160347282886505, 0.010818948969244957, -0.0009129914687946439, -0.00087067048298195, -0.016129516065120697, 0.009350554086267948, -0.005668155383318663, 0.0015539875021204352, 0.020877070724964142, -0.0035112129990011454, -0.012378642335534096, 0.013770954683423042, -0.019172819331288338, -0.017757683992385864, -0.008003891445696354, -0.005858361721038818, 0.01711858995258808, 0.032502494752407074, 0.003771795891225338, -0.010697216726839542, -0.012850354425609112, 0.04762772098183632, 0.0011536027304828167, -0.033871982246637344, -0.0039030383341014385, -0.0013000618200749159, -0.024589903652668, -0.006455610506236553, -0.005626309663057327, 0.017985930666327477, -0.02953527309000492, -0.01860980875790119, -0.025563759729266167, 0.004945370368659496, 0.00799628347158432, 0.002567788353189826, 0.023311715573072433, 0.00862016063183546, 0.00015192748105619103, 0.002316715894266963, 0.015612153336405754, 0.015117616392672062, -0.038528237491846085, 0.0037756001111119986, 0.004907329101115465, -0.02524421364068985, 0.006759940646588802, 0.001090834615752101, 0.00102140917442739, -0.06463979184627533, 0.03721961751580238, -0.02501596510410309, -0.02948962338268757, -0.012485157698392868, -0.004287255462259054, 0.007486529648303986, 0.008148448541760445, -0.010636350139975548, 0.03740221634507179, 0.0291244275867939, -0.0005102290888316929, 0.014006810262799263, 0.005964877549558878, 0.016722960397601128, 0.01927933655679226, 0.053501296788454056, 0.009525544010102749, 0.010902639478445053, -0.006417568773031235, -0.007688148878514767, -0.00827018078416586, 0.00897774938493967, 0.03585013002157211, 0.0003668608842417598, -0.03332418575882912, 0.0063528986647725105, -0.019294552505016327, -0.007166982628405094, 0.0204053595662117, 0.007341973017901182, 0.01611429825425148, -0.015946917235851288, -0.0021360195241868496, -0.02799840457737446, -0.018244612962007523, -0.019948862493038177, 0.0026571855414658785, -0.02112053520977497, -0.03280682489275932, 0.0027066392358392477, -0.00047789394739083946, 0.01868589222431183, -0.018761973828077316, 0.016555577516555786, -0.01297969464212656, -0.005557835567742586, -0.001552085392177105, -0.009274471551179886, 0.021196618676185608, -1.876803617051337e-05, -0.02189657837152481, -0.0014379614731296897, -0.0022063960786908865, 0.005078515037894249, 0.0063262698240578175, -0.015612153336405754, 0.03472410887479782, 0.003925863187760115, 0.017803333699703217, 0.019203253090381622, -0.014927409589290619, -0.030661296099424362, 0.00833104643970728, -0.01915760338306427, 0.017316404730081558, -0.01868589222431183, -0.010933072306215763, 0.018214179202914238, 0.018883707001805305, -0.019735831767320633, -0.05992267280817032, -0.022748703137040138, -0.025457244366407394, -0.0204053595662117, -0.0090690478682518, 0.004157915245741606, -0.0242855716496706, -0.016570795327425003, -0.036610957235097885, 0.019538016989827156, 0.006505064200609922, -0.005961073096841574, 0.008483212441205978, -0.042819298803806305, -0.0007798468577675521, -0.0158251840621233, -0.017164239659905434, -0.017270755022764206, -0.005755650345236063, -0.006550713442265987, -0.016966424882411957, -0.0004431812558323145, -0.018716324120759964, -0.019127171486616135, -0.008894057944417, 0.03992816060781479, 0.009449461475014687, 0.013504665344953537, 0.010286370292305946, 0.02734409272670746, -0.0004251116479281336, -0.0015073869144544005, -0.018122879788279533, -0.010773299261927605, 0.01587083376944065, 0.01803158037364483, -0.012614498846232891, -0.024559469893574715, -0.008521253243088722, -0.017529435455799103, -0.00016060566122177988, 0.05742716044187546, -0.0001818850141717121, 0.0038497806526720524, 0.00699579669162631, 0.0016899851616472006, 0.01576431840658188, -0.00963966827839613, -0.007836509495973587, 0.0014018223155289888, 0.0033780683297663927, -0.02083142101764679, 0.00043390868813730776, -0.006817002780735493, 0.004294863902032375, 0.027526691555976868, 0.019598882645368576, 0.0005525500164367259, 0.023083467036485672, -0.014508955180644989, 0.015855617821216583, -0.017590301111340523, 0.003277258947491646, -0.03158950433135033, 0.014478522352874279, -0.03198513388633728, -0.0029253766406327486, 0.01157977432012558, 0.05271003767848015, -0.001397067098878324, -0.023798642680048943, 0.005786083173006773, -0.02489423379302025, 0.016099082306027412, 0.0071974159218370914, -0.006702878978103399, 0.00820170622318983, 0.017316404730081558, -0.02046622522175312, 0.013740520924329758, -0.007094704546034336, -0.009708141908049583, 0.05161444842815399, -0.004066615831106901, 0.04172370955348015, 0.008703852072358131, 0.017392486333847046, 0.0033057897817343473, -0.025518110021948814, -0.030448265373706818, -0.010126596316695213, -0.022231342270970345, 0.003456053091213107, -0.0028892375994473696, -0.025822442024946213, 0.011146103963255882, -0.023205198347568512, 0.007128941360861063, 0.019918430596590042, -0.0223226398229599, 0.007768035400658846, -0.010339627973735332, 0.014820894226431847, 0.04190630838274956, 0.011328701861202717, -0.004736143164336681, 0.015452380292117596, -0.0065469094552099705, -0.02107488550245762, 0.0051888348534703255, -0.007284910883754492, -0.01381660345941782, -0.01623603142797947, -0.018168529495596886, -0.0011098552495241165, 0.017575085163116455, -0.021379215642809868, 0.003313397988677025, 0.003212588606402278, -0.000359965895768255, -0.0002815056941471994, -0.008741892874240875, 0.005017648916691542, 0.005401866044849157, -0.0317416675388813, -0.03268509358167648, 0.01742292009294033, -0.015733886510133743, -0.010309195145964622, 0.0045839776284992695, -0.00677135307341814, -0.021516164764761925, -0.027648424729704857, -0.026157204061746597, 0.006661033257842064, 0.016555577516555786, -0.008726676926016808, -0.025944173336029053, 0.018275044858455658, -0.002101782476529479, 0.009122306481003761, 0.02501596510410309, -0.028561415150761604, 0.003406599396839738, 0.017681600525975227, 0.010735257528722286, 0.031193874776363373, -0.015170874074101448, 0.02005537785589695, 0.021287916228175163, -0.02977873757481575, -0.011587383225560188, 0.027465825900435448, 0.044736579060554504, 0.006170300301164389, 0.014356790110468864, 0.0249398835003376, 0.0029215726535767317, 0.009228821843862534, -0.0020295039284974337, -0.0038022289518266916, 0.00205232878215611, -0.01605343259871006, 0.021531380712985992, -0.0453452430665493, 0.007646303158253431, 0.021866144612431526, -0.020390141755342484, -0.005105143878608942, 0.02769407443702221, 0.01666209287941456, -0.03773697838187218, 0.028865745291113853, -0.02113575115799904, -0.01854894310235977, -0.017864199355244637, -0.02017711102962494, -0.00408563669770956, -0.0028245672583580017, 0.005637722089886665, -0.030220016837120056, 0.01605343259871006, 0.026111554354429245, -0.004154111258685589, 0.0043291011825203896, -0.008597335778176785, -0.012287342920899391, 0.0275114756077528, -0.036489225924015045, -0.007516962941735983, -0.005432298872619867, 0.003547352273017168, 0.014600254595279694, -0.00862016063183546, -0.0050252568908035755, -0.021196618676185608, 0.011450434103608131, 0.015300215221941471, 0.005382845178246498, 0.02565505914390087, 0.015733886510133743, 0.032198164612054825, 0.0008302516071125865, 0.009989648126065731, -0.012462332844734192, 0.012812313623726368, -0.018716324120759964, -0.009502719156444073, -0.0021531381644308567, 0.010225503705441952, -0.025928957387804985, -0.020572740584611893, 0.017681600525975227, 0.0226269718259573, -0.026887597516179085, -0.023083467036485672, -0.01574910245835781, 0.003963904455304146, -0.023418230935931206, -0.002649577334523201, -0.028744013980031013, -0.006193125154823065, 6.99009106028825e-05, -0.049210239201784134, 0.013862253166735172, 0.016859909519553185, -7.48343882150948e-05, 0.028896179050207138, 0.009898348711431026, 0.020846636965870857, -0.010027688927948475, 0.012462332844734192, -0.0004039511550217867, 0.0012553632259368896], "index": 22}, {"title": "Iron-sulfur protein", "text": "Iron-sulfur proteins are proteins characterized by the presence of iron-sulfur clusters containing sulfide-linked di-, tri-, and tetrairon centers in variable oxidation states. Iron-sulfur clusters are found in a variety of metalloproteins, such as the ferredoxins, as well as NADH dehydrogenase, hydrogenases, Coenzyme Q - cytochrome c reductase, Succinate - coenzyme Q reductase and nitrogenase.", "vector": [0.0017397718038409948, 0.024693535640835762, -0.027004428207874298, 0.030134037137031555, -0.0013097807532176375, -0.006054538302123547, 0.012346767820417881, -0.06491626799106598, 0.02242225967347622, 0.030398139730095863, -0.033567361533641815, 0.008332417346537113, 0.04101504012942314, 0.018632395192980766, 0.03142813593149185, 0.025102894753217697, -0.003322733100503683, 0.008325815200805664, -0.018183421343564987, 0.00779761141166091, 0.03924555703997612, -0.002695490838959813, -0.05551423877477646, 0.02038867399096489, 0.0066850814037024975, -0.012696702964603901, -0.005047649145126343, 0.028417373076081276, -0.10770078748464584, 0.053639113903045654, 0.04109426960349083, -0.010821579024195671, 0.008517289534211159, 0.007791008800268173, -0.01397099532186985, -0.029869934543967247, 0.013066445477306843, -0.005965403746813536, 0.021511107683181763, -0.008636134676635265, -0.027281735092401505, -0.0438409298658371, 0.008048508316278458, 0.01898893341422081, -0.005737615749239922, 0.04072452709078789, -0.019530342891812325, -0.0038723954930901527, 0.02565750852227211, -0.009415236301720142, 0.005394283216446638, 0.004935405682772398, -0.06370139867067337, 0.021735593676567078, 0.01867200993001461, 0.005691397935152054, -0.01898893341422081, 0.0768536776304245, 0.014050225727260113, -0.01873803697526455, -0.024733150377869606, 0.02412571758031845, -0.028998399153351784, -0.029896344989538193, 0.03774017468094826, -0.0039285169914364815, -0.032035570591688156, -0.027730708941817284, 0.007691970560699701, -0.007025112863630056, -0.017509961500763893, 0.010181131772696972, 0.0104782460257411, -0.04106786102056503, -0.01995290443301201, 0.05186963081359863, 0.0007498020422644913, 0.03253736346960068, 0.014538814313709736, -0.05614808201789856, -0.0106367077678442, -0.0037535494193434715, -0.0051499889232218266, 0.004318067338317633, -0.009454851038753986, -0.017179833725094795, -0.011726127937436104, -0.03715914860367775, 0.04584810510277748, 0.04259965196251869, 0.006886459421366453, 0.003697427920997143, 0.0002812273451127112, 0.019200215116143227, 0.04426349326968193, -0.031401727348566055, 0.09555210173130035, 0.03961529955267906, 0.052107322961091995, 0.018632395192980766, -0.03887581452727318, -0.0311112143099308, -0.0022234085481613874, -0.025881994515657425, 0.0628562718629837, -0.01152805145829916, -0.03187711164355278, 0.020850852131843567, -0.014657660387456417, 0.08678391575813293, -0.001743073109537363, -0.05519731715321541, -0.006411075592041016, 0.002711997367441654, 0.013944584876298904, -0.030134037137031555, -0.003558774245902896, -0.01397099532186985, -0.018275856971740723, 0.06121883913874626, 0.040803756564855576, -0.0014979534316807985, 0.041569653898477554, 0.03594427928328514, -0.061324480921030045, 0.06882497668266296, 0.026264943182468414, -0.008616327308118343, 0.007546714507043362, 0.006269121076911688, -0.03222044184803963, -0.009956644847989082, 0.052688345313072205, -0.02623853273689747, -0.019147394225001335, 0.005004732869565487, -0.013125868514180183, 0.02115456946194172, 0.016545990481972694, -0.0039087096229195595, -0.06391268223524094, -0.019781239330768585, -0.020401878282427788, 0.0451086200773716, 0.08266392350196838, 0.005183001514524221, -0.03779299557209015, 0.0381099171936512, 0.01390497013926506, -0.06697626411914825, -0.006100756116211414, 0.023782383650541306, 0.04629707708954811, -0.06518036872148514, 0.030820701271295547, 0.055725518614053726, -0.010458438657224178, -0.004859476815909147, 0.0168232973664999, -0.015925349667668343, 0.003187380963936448, 0.026278147473931313, -0.009606709703803062, 0.008999275043606758, -0.018711626529693604, -0.011072475463151932, -0.009435043670237064, -0.05300527065992355, -0.00695248506963253, -0.0064341844990849495, 0.009771773591637611, -0.031586598604917526, 0.002969496650621295, -0.030398139730095863, 0.014723685570061207, 0.018381498754024506, 0.0004803354968316853, 0.0024132318794727325, 0.05609526112675667, 0.04310144484043121, 0.0013956140028312802, 0.03924555703997612, -0.020098160952329636, -0.010418823920190334, 0.0438409298658371, 0.04711579531431198, 0.004651496186852455, 0.024350203573703766, 0.008530493825674057, -0.017193039879202843, 0.014393558725714684, -0.011732731014490128, 0.03853248059749603, 0.024310588836669922, -0.010240554809570312, 0.008715366013348103, -0.008986069820821285, 0.027836348861455917, -0.006123865023255348, -0.08525212109088898, -0.013508817180991173, -0.04241478070616722, 0.010722540318965912, 0.00905209593474865, 0.04101504012942314, 0.036419663578271866, 0.010603695176541805, -0.0015631536953151226, 0.01772124320268631, 0.03163941949605942, 0.00689306203275919, -0.03462377190589905, -0.04624425992369652, 0.010537669062614441, -0.02147149108350277, 0.0012602616334334016, 0.00030474894447252154, 0.021563926711678505, -0.009745363146066666, 0.020969698205590248, 0.003433325793594122, 0.04278452321887016, 0.052239373326301575, 0.014684070833027363, 0.021748797968029976, 0.008167354390025139, -0.014406763948500156, 0.008754980750381947, -0.029817113652825356, -0.004866078961640596, 0.019015343859791756, 0.017259065061807632, 0.028945578262209892, -0.00681383116170764, -0.0546162910759449, 0.00047579623060300946, 0.0021012614015489817, -0.03074147179722786, -0.0495455339550972, -0.00790325179696083, 0.033118389546871185, 0.05931730568408966, -0.019226625561714172, -0.0019477522000670433, -0.04777605086565018, 0.03200916200876236, -0.012293947860598564, -0.03142813593149185, -0.02089046686887741, 0.03377864509820938, -0.04009068012237549, -0.00757312448695302, 0.013224907219409943, 0.011343180201947689, 0.018064575269818306, 0.04090939834713936, 0.013106061145663261, -0.0222373865544796, -0.007348638027906418, 0.03671017661690712, -0.0042652469128370285, -0.007850431837141514, 0.047591179609298706, -0.0336465947329998, 0.015093429014086723, 0.006731299217790365, 0.024878406897187233, -0.046455539762973785, -0.014155866578221321, -0.003634703578427434, 0.04352400824427605, -0.006965689826756716, -0.03219403326511383, 0.0051499889232218266, 0.001403867150656879, -0.0020946587901562452, -0.0013815835118293762, 0.023174948990345, 0.008840814232826233, 0.023465462028980255, 0.0024908119812607765, 0.020335853099822998, 0.0041695102117955685, -0.021313030272722244, 0.025802765041589737, -0.008787993341684341, -0.004096881952136755, 0.006123865023255348, -0.033884286880493164, -0.04154324159026146, -0.019068162888288498, -0.0323789045214653, 0.02685917168855667, -0.023584308102726936, 0.01168651320040226, 0.004625086206942797, -0.0009293088805861771, 0.028470193967223167, 0.02305610291659832, 0.09127365052700043, 0.005229219328612089, 0.0011554461671039462, -0.016942143440246582, 0.011138501577079296, 0.035284027457237244, 0.0026030552107840776, -0.0412791408598423, 0.023095719516277313, 0.01346259843558073, -0.06972292810678482, -0.02802122011780739, 0.02413892187178135, -0.025300970301032066, 0.0022613732144236565, 0.015397146344184875, -0.051790401339530945, 0.03692145645618439, -0.029737884178757668, 0.0014319280162453651, -0.026634685695171356, 0.026264943182468414, 0.007632547523826361, -0.07199420034885406, 0.008074918761849403, 0.026212122291326523, -0.018143806606531143, -0.020164186134934425, 0.0565178245306015, 0.0023901229724287987, -0.051156554371118546, 0.016545990481972694, 0.007276009768247604, -0.020718801766633987, 0.02660827524960041, 0.008840814232826233, -0.044554006308317184, -0.06586703658103943, 0.00646389601752162, -0.040750935673713684, -0.019966110587120056, 0.0037667546421289444, -0.02744019590318203, 0.00017465806740801781, -0.019279444590210915, 0.05609526112675667, -0.008206969127058983, 0.019860468804836273, 0.02343905158340931, -0.01860598474740982, -0.07627265155315399, 0.0006350827752612531, 0.028549425303936005, -0.028285322710871696, -0.06945881992578506, 0.009269979782402515, 0.012406190857291222, 0.02050752006471157, -0.029817113652825356, 0.0050080339424312115, -0.04576887562870979, -0.02293725684285164, -0.009435043670237064, 0.02470674179494381, 0.01988687925040722, 0.004390695597976446, 0.018592780455946922, -0.012756126001477242, 0.028945578262209892, -0.011098885908722878, -0.04450118541717529, -0.04178093373775482, 0.021933671087026596, 0.03253736346960068, 0.06956446170806885, -0.0276250671595335, -0.031005574390292168, -0.0038294787518680096, -0.008345622569322586, -0.03396351635456085, 0.0244558434933424, 0.04872681573033333, 0.019319061189889908, -0.0857275053858757, -0.017008168622851372, 0.06702908128499985, -0.012379780411720276, 0.013297535479068756, -0.038638122379779816, -0.02450866438448429, -0.005539539270102978, -0.07204702496528625, -0.010095298290252686, 0.015648042783141136, 0.002632766729220748, 0.04679887369275093, -0.040988627821207047, -0.041252732276916504, 0.037634532898664474, -0.015898939222097397, 0.003433325793594122, -0.026080071926116943, 0.047591179609298706, -0.0704624131321907, 0.00385919027030468, -0.010247156955301762, -0.05873628333210945, -0.011257347650825977, -0.026330968365073204, 0.015331120230257511, 0.020296238362789154, -0.004199221730232239, -0.04428990185260773, 0.010035875253379345, 0.0020831043366342783, 0.013601252809166908, -0.016876116394996643, -0.013422983698546886, 0.035099152475595474, 0.008721968159079552, -0.008385238237679005, 0.03317121043801308, 0.0026047059800475836, -0.02388802543282509, -0.01917380467057228, 0.0476175881922245, 0.028866346925497055, 0.01663842611014843, -0.009375620633363724, 0.025129303336143494, 0.004248740617185831, -0.046006567776203156, 0.011303565464913845, -0.045504771173000336, -0.010616900399327278, -0.00835222564637661, 0.024733150377869606, 0.013720097951591015, -0.0052490271627902985, 0.0012833706568926573, 0.015304709784686565, -0.02293725684285164, 0.054140906780958176, -0.023346615955233574, -0.0038955044001340866, -0.0374760739505291, 0.018051370978355408, 0.03079429268836975, -0.007348638027906418, 0.006361556705087423, 0.02883993647992611, 0.003377204295247793, -0.06787420809268951, -0.010082093067467213, 0.010425426065921783, 0.019398290663957596, -0.007130753714591265, -0.002617910970002413, -0.01374650839716196, 0.04178093373775482, 0.03264300525188446, -0.020428288727998734, -0.00147732044570148, -0.03531043604016304, 0.00010811675019795075, 0.05313732102513313, 0.014802916906774044, 0.011349783279001713, 0.02185443975031376, -0.015780093148350716, 0.03884940221905708, 0.004598675761371851, -0.01834188401699066, -0.02501045912504196, 0.002370315371081233, 0.010108503513038158, -0.02217136137187481, -0.001405517803505063, 0.007982482202351093, 0.011501641944050789, 0.016149837523698807, 0.024878406897187233, 0.028364554047584534, -0.04545195400714874, -0.012525036931037903, 0.016981758177280426, 0.04186016693711281, 0.023518282920122147, 0.05429936945438385, 0.011442218907177448, 0.04737989604473114, 0.022633539512753487, -0.016981758177280426, -0.03142813593149185, -0.029130449518561363, 0.030134037137031555, -0.015515991486608982, 0.0013972645392641425, 0.010663118213415146, -0.004661399871110916, 0.016030991449952126, 0.016215862706303596, 0.00907850544899702, 0.005622071214020252, 0.04928142949938774, -0.038268379867076874, 0.0076787653379142284, 0.01720624417066574, -0.019081369042396545, -0.007586329709738493, 0.020850852131843567, 0.007817419245839119, -0.06370139867067337, -0.023650333285331726, -0.005087264347821474, -0.019517136737704277, 0.009910427033901215, 0.038902223110198975, -0.01041222084313631, -0.0324053131043911, 0.04394657164812088, 0.02388802543282509, 0.02965865284204483, 0.006671876646578312, -0.025433020666241646, 0.01690252684056759, -0.02120739035308361, -0.014116250909864902, -0.039536066353321075, -0.018368292599916458, 0.04146401211619377, 0.033435311168432236, 0.020877262577414513, -0.011263949796557426, -0.002116117160767317, -0.026687506586313248, 0.010709336027503014, 0.030503779649734497, 0.034201208502054214, 0.0022663252893835306, 0.02947378158569336, 0.010458438657224178, 0.02172238938510418, -0.031533777713775635, -0.011158308945596218, -0.02287123166024685, -0.01140260323882103, -0.027836348861455917, -0.015608427114784718, 0.002943086437880993, -0.04769681766629219, 0.011495038866996765, 0.016215862706303596, -0.01968880370259285, 0.011613884940743446, 0.002142527373507619, -0.029579423367977142, 0.038955044001340866, -0.02273918129503727, 0.00511367479339242, -0.030635830014944077, 0.0009169291006401181, -0.009263377636671066, 0.02052072435617447, -0.029764294624328613, 0.028047630563378334, 0.05131501704454422, -0.00579373724758625, -0.013297535479068756, 0.005381077993661165, -0.040671706199645996, 0.012868368998169899, -0.011996832676231861, 0.018566370010375977, 0.0046911113895475864, -0.0055857570841908455, 0.06761010736227036, -0.002456148387864232, -0.017813678830862045, 0.017919320613145828, -0.014433173462748528, -0.01766842231154442, -0.04465964809060097, -0.016598809510469437, 0.006655369885265827, -0.000272974168183282, 0.0033706016838550568, -0.007058125454932451, -0.013759713619947433, -0.023003283888101578, -0.007665560115128756, 0.012848561629652977, -0.0015466472832486033, -0.02013777755200863, 0.033303260803222656, 0.003324383869767189, 0.0048330663703382015, 0.007526906672865152, -0.027915580198168755, -0.009441645815968513, 0.015317915007472038, 0.030635830014944077, 0.025895200669765472, 0.020415084436535835, -0.04611220583319664, 0.019464315846562386, 0.047802459448575974, 0.01784008927643299, -0.012293947860598564, 0.009164338931441307, 0.010709336027503014, 0.013198496773838997, -0.01181856356561184, 0.03969452902674675, 0.014287917874753475, 0.0317450575530529, 0.019979314878582954, -0.0012239476200193167, 0.01315227895975113, 0.008266392163932323, -0.027413787320256233, 0.024059690535068512, 0.02502366341650486, 0.04267888143658638, 0.006080948282033205, -0.011389398016035557, 0.00689306203275919, -0.01677047647535801, -0.02210533618927002, -0.005975307431071997, 0.01076215598732233, -0.003167573129758239, -0.03105839341878891, -0.03660453483462334, 0.014169071801006794, -0.020745210349559784, 0.0012817200040444732, 0.010280169546604156, 0.012234524823725224, 0.004308163654059172, 0.0035158577375113964, -0.004288355819880962, -0.0016778729623183608, 0.041120678186416626, -0.05348065122961998, -0.00581354508176446, 0.026330968365073204, 0.014129456132650375, -0.014934967271983624, 0.0010349496733397245, 0.006807228550314903, 0.011131898500025272, 0.0034795436076819897, 0.007025112863630056, -0.0035554729402065277, 0.022329824045300484, -0.00853709690272808, -0.025116099044680595, -0.0203226488083601, 0.041886575520038605, -0.01140260323882103, 0.01339657325297594, -0.00779761141166091, -0.012492024339735508, -0.02279200218617916, -0.007005305029451847, 0.03232608363032341, -0.005232520867139101, 0.014987788163125515, -0.029447371140122414, 0.02217136137187481, -0.04653476923704147, -0.04428990185260773, -0.03142813593149185, 0.014063430950045586, -0.012379780411720276, -0.006011621560901403, 0.013865354470908642, 0.034835051745176315, 0.0016465107910335064, -0.03087352216243744, -0.03224685415625572, 0.005430597346276045, 0.021933671087026596, 0.018394703045487404, -0.018011756241321564, -0.012676895596086979, 0.02560468763113022, -0.03866453096270561, -0.015846120193600655, 0.01098664291203022, -0.0020913577172905207, -0.01346259843558073, -0.003383806673809886, -0.022395849227905273, 0.003710632910951972, -0.0077778035774827, 0.019530342891812325, -0.015199069865047932, -0.056623466312885284, -0.013825738802552223, 0.024931227788329124, 0.018896497786045074, 0.016308298334479332, 0.042150676250457764, 0.017311885952949524, -0.013667277991771698, -0.0016085461247712374, -0.03259018436074257, 6.762455450370908e-05, -0.004935405682772398, 0.015489581972360611, -0.00779761141166091, 0.003400313202291727, -0.00315931998193264, 0.0010745649924501777, 0.06755729019641876, -0.03232608363032341, 0.015991374850273132, 0.0016729210037738085, 0.0044402144849300385, 0.03332966938614845, 0.028153272345662117, -0.010247156955301762, 0.014023815281689167, 0.00848427601158619, 0.01045183651149273, -0.011693115346133709, -0.01187798660248518, 9.527272777631879e-05, 0.01720624417066574, 0.005833352450281382, 0.04542554169893265, -0.026766736060380936, 0.020547134801745415, -0.023650333285331726, 0.04159606248140335, -0.0009664482204243541, 0.027598658576607704, 0.013891764916479588, -0.01000286266207695, 0.01327772717922926, -0.0016035942826420069, -0.018817266449332237, 0.04872681573033333, -0.029447371140122414, -0.00940203107893467, -0.014697276055812836, 0.04751194640994072, -0.012624074704945087, 0.020877262577414513, 0.052107322961091995, -0.02419174276292324, -0.014499199576675892, -0.022976873442530632, -0.050839632749557495, -0.01123753935098648, 0.013865354470908642, -0.013548431918025017, 0.012518433853983879, 0.06454652547836304, -0.003045425983145833, -0.011891191825270653, -0.004126593470573425, 0.042203497141599655, 0.01438035350292921, -0.0005112849175930023, -0.006384665612131357, -0.034254029393196106, -0.009976452216506004, -0.006794023793190718, -0.007322227582335472, 0.047987330704927444, 0.0038922030944377184, 0.018830472603440285, -0.039351195096969604, 0.016413938254117966, -0.01537073589861393, 0.007982482202351093, 0.023954050615429878, 0.01362766232341528, -0.022897642105817795, 0.026212122291326523, -0.04386734217405319, 0.001316383364610374, 0.030715061351656914, -0.0355481281876564, 0.028734296560287476, -0.01860598474740982, -0.01537073589861393, -0.009065301157534122, 0.018526755273342133, -0.013449394144117832, 0.035785820335149765, 0.038136325776576996, 0.05746859312057495, 0.01612342707812786, -0.03362018242478371, -0.004067170433700085, -0.010689527727663517, 0.00157965999096632, 0.018909702077507973, 0.0029513398185372353, -0.01873803697526455, 0.02692519687116146, 0.029896344989538193, -0.0032913710456341505, -0.03156018629670143, -0.05086604133248329, -0.001427801325917244, -0.011970422230660915, -0.006378063000738621, -0.03760812431573868, 0.02192046493291855, 0.08139622956514359, -0.007599534932523966, -0.013079650700092316, -0.0002368664718233049, -0.0034201208036392927, 0.022752385586500168, 0.00975196622312069, 0.008200366981327534, 0.0035554729402065277, -0.014552019536495209, 0.0279419906437397, 0.032167620956897736, -0.01397099532186985, 0.03929837420582771, 0.006860048975795507, 0.03377864509820938, -0.012392985634505749, -0.0021969983354210854, -0.02083764784038067, 0.014406763948500156, 0.007236394565552473, -0.01327112503349781, 0.028417373076081276, 0.01695534773170948, 0.013165484182536602, 0.0022102035582065582, -0.019992521032691002, 0.05488039180636406, -0.027783529832959175, -0.01988687925040722, -0.03163941949605942, 0.0035389666445553303, 0.031533777713775635, -0.024178536608815193, 0.022659949958324432, 0.03626120463013649, 0.034967102110385895, 9.599488112144172e-05, -0.020362263545393944, 0.04212426766753197, -0.0362083837389946, -0.035970691591501236, 0.011904397048056126, -0.013535226695239544, -0.035151973366737366, 0.04603297635912895, -0.018460728228092194, 0.023531487211585045, 0.004380791913717985, 0.004215728025883436, 0.05593680217862129, -0.001165349967777729, 0.018619190901517868, 0.004116689786314964, -0.020415084436535835, 0.005430597346276045, -0.01162709016352892, -0.005219315644353628, -0.0025898502208292484, 0.014842531643807888, -0.0004035808378830552, -0.031348906457424164, -0.004885886795818806, -0.001365077099762857, 0.00946145411580801, -0.027070453390479088, 0.040301963686943054, 0.007784406188875437, -0.03486146405339241, 0.03182429075241089, 0.004186016507446766, -0.005602263379842043, 0.02305610291659832, 0.025815969333052635, -0.009857607074081898, -0.011263949796557426, -0.024680331349372864, -0.02248828485608101, -0.03169224038720131, 0.02617250755429268, 0.04331272467970848, 0.012723113410174847, 1.4804154488956556e-05, 0.052556294947862625, 0.018645599484443665, -0.0238220002502203, -0.012115678749978542, -0.0008315086015500128, 0.017457140609622, -0.031797878444194794, -0.057891156524419785, 0.013706893660128117, -0.02947378158569336, 0.013409778475761414, -0.02235623262822628, 0.004905694629997015, 0.0009796533267945051, 0.007962674833834171, 0.014829326421022415, 0.0016572399763390422, -0.0380835086107254, -0.009613312780857086, 0.0037766583263874054, -0.0041596065275371075, 0.01257125474512577, 0.025551866739988327, 0.01637432351708412, 0.01175253838300705, -0.03898145258426666, 0.01595176011323929, 0.02812686190009117, -0.014974582940340042, -0.035099152475595474, -0.0007894173613749444, 0.011158308945596218, -0.005219315644353628, -0.041754525154829025, -0.03156018629670143, -0.034069158136844635, 0.040169913321733475, -0.00549332145601511, -0.021418672055006027, -0.02820609323680401, 0.019596368074417114, 0.03541607782244682, -0.01123753935098648, 0.0032946723513305187, 0.003585184458643198, 0.04241478070616722, -0.002895218087360263, 0.006767613347619772, 0.017509961500763893, 0.06803267449140549, -0.004915598314255476, 0.007599534932523966, -0.012181703932583332, 0.02412571758031845, -0.012029845267534256, -0.017628807574510574, -0.054774753749370575, -0.012208114378154278, 0.01467086561024189, 0.007982482202351093, -0.010029273107647896, -0.01644034869968891, -0.01817021705210209, -0.011184719391167164, -0.028364554047584534, 0.03398992493748665, -0.005242424551397562, 0.004975021351128817, -0.003997843712568283, -0.0042652469128370285, -0.006384665612131357, -0.04843630641698837, -0.026951607316732407, -0.007559919264167547, 0.005466911010444164, -0.023544691503047943, 0.04275811091065407, 0.040354784578084946, 0.03269582614302635, -0.010649912990629673, 0.038638122379779816, -0.01088760420680046, 0.015423555858433247, 0.014974582940340042, -0.024931227788329124, 0.0023373025469481945, -0.0168232973664999, 0.015476376749575138, 0.03060941956937313, -0.0008038604282774031, 0.009131326340138912, 0.03277505561709404, -0.005440501030534506, 0.03676299750804901, 0.01438035350292921, 0.013944584876298904, 0.052239373326301575, -0.014472789131104946, 0.028734296560287476, 0.019081369042396545, 0.005298546049743891, -0.01925303414463997, -0.010630104690790176, -0.006529921665787697, -0.021616747602820396, -0.00924356933683157, -0.012333562597632408, 0.0146048404276371, 0.013416380621492863, 0.024231357499957085, -0.016149837523698807, 0.001392312697134912, -0.01696855202317238, 0.018658805638551712, -0.014565224759280682, -0.019913289695978165, 0.023703154176473618, 0.010399015620350838, -0.022277003154158592, -0.023161744698882103, 0.020177392289042473, 0.00010667244350770488, 0.0016399082960560918, 0.04819861426949501, -0.026449814438819885, 0.013931379653513432, -0.021180979907512665, 0.05498603358864784, -0.0168232973664999, 0.0022762289736419916, -0.007936264388263226, 0.035284027457237244, -0.002294386038556695, -0.004687810316681862, -0.013838944025337696, 0.03235249221324921, -0.020098160952329636, -0.027096863836050034, -0.027545837685465813, 0.0008987720939330757, -0.040988627821207047, -0.07627265155315399, -0.0025238245725631714, 0.0292096808552742, 0.015278300270438194, 0.0038294787518680096, 0.0122279217466712, -0.004846271593123674, 0.03599710017442703, -0.012056255713105202, -0.008992672897875309, -0.03222044184803963, 0.007975880056619644, -0.005552744492888451, -0.021484697237610817, 0.032299675047397614, -0.007956072688102722, -0.011594077572226524, -0.004701015539467335, -0.010847989469766617, 0.031084803864359856, -0.005097168497741222, 0.03119044564664364, -0.000940038007684052, -0.01508022379130125, -0.007216586731374264, -0.007071330677717924, 0.04141119122505188, 0.02502366341650486, -0.004790149629116058, -0.007731585763394833, 0.02102251909673214, 0.0001611434854567051, -0.014710480347275734, -0.002944737207144499, 0.043207086622714996, 0.016796886920928955, -0.011653500609099865, 0.012729715555906296, 0.016308298334479332, 0.0035554729402065277, 0.01760239712893963, 0.017259065061807632, -0.02450866438448429, -0.03586504980921745, -0.014142661355435848, -0.019715214148163795, 0.0298435240983963, 0.006140371318906546, 0.06174704432487488, 0.012690100818872452, -0.01251183170825243, 0.00288201286457479, 0.008550302125513554, 0.000940038007684052, -0.012459011748433113, 0.017298679798841476, -0.0056715901009738445, 0.040618885308504105, 0.020745210349559784, -0.01374650839716196, 0.04056606441736221, -0.0025650905445218086, 0.019741622731089592, -0.007282612379640341, -0.01438035350292921, -0.005955500062555075, 0.019530342891812325, -0.008556904271245003, 0.004483131226152182, -0.03354095295071602, 0.0034432297106832266, 0.01438035350292921, 0.024469049647450447, -0.01968880370259285, 0.021946875378489494, 0.02293725684285164, 0.017193039879202843, -0.04413144290447235, -0.0038459852803498507, 0.008041905239224434, -0.019543547183275223, -0.01688932254910469, 0.012412793934345245, -0.003319431794807315, 0.010029273107647896, 0.03472940996289253, -0.03222044184803963, 0.01187138445675373, 0.026185711845755577, -0.00040750112384557724, -0.024165332317352295, -0.004770342260599136, -0.00819376390427351, 0.02952660247683525, -0.03372582420706749, 0.015700863674283028, -0.035917870700359344, 0.006774215959012508, 0.04241478070616722, 0.02654225006699562, -0.033567361533641815, 0.002981051104143262, 0.019002137705683708, 0.01432753261178732, -0.0036644150968641043, 0.015766888856887817, 0.010095298290252686, 0.02939455211162567, -0.011897794902324677, 0.006846844218671322, 0.039034273475408554, -0.026146097108721733, -0.015159454196691513, 0.008173956535756588, 0.003000858938321471, -0.013733303174376488, -0.014816121198236942, 0.0012016640976071358, -0.014485994353890419, 0.002434690250083804, 0.0077645983546972275, 0.004875983111560345, -0.006526620592921972, 0.025802765041589737, -0.004743931815028191, -0.02279200218617916, -0.004242138005793095, 0.0029034712351858616, -0.0022498187609016895, 0.02262033522129059, -0.014816121198236942, -0.023359820246696472, 0.004859476815909147, 0.0212866198271513, -0.04524067044258118, -0.026766736060380936, 0.03227326273918152, -0.013614457100629807, 0.020494313910603523, -0.007810816168785095, -0.0022135048639029264, 0.0005612167296931148, -0.034518130123615265, -0.010682925581932068, 0.018394703045487404, 0.010649912990629673, 0.003964831121265888, 0.006734600756317377, 0.002674032701179385, 0.009983055293560028, -0.024733150377869606, -0.021484697237610817, 0.022369438782334328, 0.07067368924617767, 0.002723551820963621, -0.02965865284204483, 0.016744066029787064, 0.005044348072260618, 0.013191894628107548, -0.009164338931441307, 0.04069811478257179, -0.039034273475408554, 0.028813527897000313, -0.02020380273461342, 0.051843222230672836, -0.003961530048400164, -0.01817021705210209, -0.011600679717957973, 0.019358675926923752, -0.002119418466463685, 0.000877313781529665, 0.006622357293963432, 0.005859762895852327, -0.016928937286138535, -0.024086100980639458, 0.004701015539467335, 0.029605833813548088, -0.0008814404136501253, -0.019451111555099487, -0.0063483514823019505, 0.0002898931852541864, 0.0010869447141885757, -0.012300550006330013, 0.00018982330220751464, -0.021577132865786552, 0.026819556951522827, 0.016215862706303596, 0.031216854229569435, -0.026383789256215096, 0.022646745666861534, -0.01638752780854702, 0.016057400032877922, 0.005879570730030537, -0.002730154199525714, -0.004859476815909147, 0.017430732026696205, 0.037185560911893845, 0.015093429014086723, -0.010068888776004314, 0.01574047841131687, 0.030318908393383026, -0.010649912990629673, -0.0008929948671720922, -0.0212866198271513, 0.017298679798841476, 0.008754980750381947, -0.014552019536495209, -0.003387107979506254, 0.022897642105817795, 0.010960232466459274, -0.009256774559617043, 0.040935806930065155, -0.025749944150447845, -0.00192959513515234, 0.06153576448559761, -0.0615885853767395, -0.014908556826412678, 0.005849859211593866, 0.004489733837544918, 0.011858179233968258, 0.008325815200805664, 0.025300970301032066, -0.005209411960095167, 0.023716358467936516, 0.02965865284204483, -0.011013053357601166, -0.03766094520688057, -0.062328070402145386, 0.02217136137187481, -0.011679910123348236, 0.020626366138458252, -0.016849707812070847, -0.0177872683852911, 0.012234524823725224, 0.008325815200805664, 0.021682772785425186, 0.01943790726363659, 0.021048927679657936, 0.03148095682263374, 0.013224907219409943, -0.010557477362453938, -0.02394084446132183, 0.031586598604917526, 0.04452759400010109, -0.006483703851699829, -0.013680483214557171, -0.0017826884286478162, 0.014367148280143738, 0.023227769881486893, -0.00385919027030468, -0.031586598604917526, -0.012029845267534256, 0.011204526759684086, 0.022184567525982857, 0.05556705966591835, 0.005816846154630184, -0.026766736060380936, 0.005301847588270903, -0.004047363065183163, 0.0451086200773716, -0.029896344989538193, -0.021748797968029976, 0.022686360403895378, 0.0070119076408445835, 0.023016488179564476, 0.021511107683181763, 0.014578429982066154, -0.004053965676575899, -0.015859324485063553, -0.022699566558003426, -0.036419663578271866, -0.011217731982469559, 0.0027895772363990545, -0.007104343269020319, 0.03148095682263374, -0.04793450981378555, 0.0006004193564876914, -0.003558774245902896, -0.009045492857694626, 0.012234524823725224, 0.02725532464683056, 0.024152126163244247, -0.006308736279606819, 0.01514624897390604, 0.04428990185260773, -0.04598015546798706, -0.021260209381580353, 0.03396351635456085, 0.01257125474512577, -0.012782536447048187, -0.03156018629670143, 0.002332350704818964, 0.00771838054060936, 0.0065992483869194984, 0.011673307977616787, -0.03148095682263374, -0.024680331349372864, 0.001429451978765428, -0.008735173381865025, 0.0010877700988203287, -0.022118542343378067, -0.006054538302123547, 0.036049921065568924, -0.035151973366737366, -0.02693840302526951, -0.0001091484009521082, 0.04183375462889671, -0.0009037239942699671, -0.005278738681226969, 0.014182277023792267, 0.020784826949238777, -0.006539825350046158, -0.04167529568076134, -0.01521227415651083, -0.007414663210511208, -0.02928891032934189, -0.008787993341684341, 0.03544248640537262, 0.02780994027853012, 0.03520479425787926, -0.00806831568479538, 0.020375467836856842, 0.03568017855286598, -0.005262231919914484, -0.009672734886407852, 0.008642737753689289, -0.013073048554360867, -0.013614457100629807, -0.011283757165074348, 0.009619914926588535, -0.024020075798034668, 0.01432753261178732, 0.03346172347664833, 0.02515571378171444, -0.026370583102107048, -0.021960079669952393, 0.007909854874014854, 0.004126593470573425, 0.007309022359549999, 0.01304663810878992, 0.014565224759280682, 0.0012082665925845504, 0.031850699335336685, 0.016361117362976074, 0.019596368074417114, -0.0043642851524055, 0.01638752780854702, 0.00981138925999403, 0.01362766232341528, 0.022818412631750107, 0.01702137291431427, 0.02272597700357437, -0.03742325305938721, 8.865727977536153e-06, 0.013522021472454071, -0.01261087041348219, 0.00031774770468473434, 0.008345622569322586, 0.013772918842732906, 0.004796752240508795, -0.03993222117424011, -0.017496757209300995, 0.04732707515358925, 0.013165484182536602, 0.0292096808552742, 0.015119838528335094, -0.03163941949605942, 0.03322403132915497, 0.028734296560287476, -0.007989085279405117, 0.011495038866996765, -0.0012107425136491656, -0.010900809429585934, 0.014948172494769096, -0.005189604125916958, 0.006972292438149452, -0.018777651712298393, -0.00040502517367713153, 0.00636815931648016, 0.0026657795533537865, 0.021035723388195038, -0.018896497786045074, 0.015278300270438194, 0.054827574640512466, -0.004172811284661293, -0.00048735071322880685, 0.009672734886407852, -0.009375620633363724, -0.0257235337048769, -0.0247727669775486, -0.015582017600536346, 0.023993665352463722, 0.026014046743512154, 0.023003283888101578, 0.026132890954613686, -0.012432601302862167, 0.001819002442061901, -0.009534081444144249, -0.006179986521601677, -0.00930299237370491, 0.04230913892388344, -0.024297382682561874, -0.02140546590089798, 0.02217136137187481, -0.005896077025681734, 0.03222044184803963, 0.0033260344062000513, 0.020798031240701675, -0.01496137771755457, -0.036102741956710815, -0.0190549585968256, -0.020177392289042473, 0.02584237977862358, -0.007639150135219097, -0.057943977415561676, -0.018262652680277824, 0.011283757165074348, 0.04458041489124298, -0.012148691341280937, 0.02470674179494381, 0.009210556745529175, -0.019345469772815704, -0.03726479038596153, -0.057257309556007385, 0.04344477877020836, -0.03145454823970795, 0.025116099044680595, -0.026146097108721733, 0.025736737996339798, -0.052107322961091995, 0.001555725815705955, 0.0010968485148623586, 0.010326387360692024, -0.02876070700585842, 0.014565224759280682, 0.02692519687116146, -0.0007828148081898689, 0.00601822417229414, 0.005483417771756649, -0.02979070506989956, -0.004050664138048887, -0.007183574140071869, 0.008649339899420738, 0.028892757371068, -0.020850852131843567, -0.009045492857694626, 0.030847111716866493, -0.009989657439291477, 0.002282831585034728, 0.0022118540946394205, 0.03702709823846817, 0.008550302125513554, 0.010498054325580597, -0.04053965583443642, 4.330344017944299e-05, -0.026317764073610306, 0.018962522968649864, -0.025670712813735008, -0.020626366138458252, 0.009613312780857086, -0.008200366981327534, 0.007348638027906418, 0.012267537415027618, 0.010471643880009651, -0.007434471044689417, -0.017549576237797737, 0.03393710404634476, 0.018962522968649864, -0.009190749377012253, -0.008147546090185642, 0.006807228550314903, 0.007995687425136566, -0.020599955692887306, 0.014274712651968002, -0.018830472603440285, -0.03449172154068947, 0.001580485375598073, 0.005367872770875692, -0.039852991700172424, 0.005367872770875692, 0.020296238362789154, 0.01644034869968891, 0.006794023793190718, 0.023174948990345, -0.0008224301273003221, 0.008306007832288742, -0.0019378483993932605, 0.030081216245889664, -0.010042478330433369, 0.029104039072990417, 0.010775361210107803, -0.016427144408226013, 0.00135352264624089, 0.0330127477645874, -0.02680635266005993, 0.01575368270277977, -0.009553889743983746, -0.01209587138146162, -0.016347913071513176], "index": 23}, {"title": "Thomas W. Osborn", "text": "Thomas Ward Osborn (March 9, 1833 \u2013 December 18, 1898) was a Union Army officer and United States Senator representing Florida.", "vector": [0.019104544073343277, -0.03285294026136398, -0.018417123705148697, 0.004163902718573809, 0.011328106746077538, 0.0011752373538911343, 0.03989899531006813, -0.016741538420319557, -0.02066555991768837, 0.061524078249931335, -0.03763623908162117, 0.020722845569252968, -0.01825959049165249, 0.019763320684432983, -0.0496947281062603, 0.050954997539520264, -0.03434235230088234, 0.011951080523431301, 0.013046656735241413, 0.012130096554756165, 0.04708826169371605, 0.028842991217970848, 0.010117961093783379, 0.024331798776984215, 0.029315592721104622, 0.051928844302892685, 0.017443278804421425, 0.01634054258465767, 0.03302479535341263, 0.013576542027294636, -0.014643475413322449, 0.023114493116736412, 0.025420213118195534, 0.03457149118185043, 0.0011868734145537019, -0.012144417501986027, -0.00537404790520668, 0.030045976862311363, -0.002015715464949608, 0.03789402171969414, 0.027983717620372772, -0.035115696489810944, 0.018660584464669228, 0.015395340509712696, 0.02248435840010643, -0.034514207392930984, -0.06559131294488907, -0.019176149740815163, -0.012316272594034672, 0.032108236104249954, -0.01532373484224081, 0.011900956742465496, -0.020350491628050804, -0.005893193185329437, 0.05018164962530136, 0.005356146488338709, 0.03428506478667259, 0.07441320270299911, 0.0036913014482706785, 0.02824150025844574, -0.030532898381352425, -0.0312776044011116, -0.011213536374270916, -0.017744025215506554, -0.01222318410873413, -0.0013936363393440843, 0.03600361570715904, 0.03391271457076073, -0.052673548460006714, -0.020135672762989998, -0.0011430145241320133, -0.021324336528778076, 0.0061402348801493645, 0.08334966003894806, 0.0004222530114930123, 0.03941207379102707, 0.03680560365319252, -0.008678675629198551, -0.012309111654758453, 0.0037306849844753742, 0.039039719849824905, -0.04903595149517059, -0.00776211591437459, 0.03319665044546127, -0.031420815736055374, -0.023687342181801796, -0.006834815256297588, -0.0480334646999836, -0.00034505254006944597, -0.008914976380765438, 0.05599607527256012, 0.06272706389427185, 0.01947689615190029, 0.028313105925917625, 0.012258987873792648, -0.005739239975810051, 0.0006681756931357086, 0.005452814977616072, -0.005939737427979708, -0.01864626444876194, -0.012989371083676815, -0.0179158803075552, -0.029086453840136528, 0.013791360892355442, 0.053561463952064514, 0.0030880188569426537, -0.0015833928482607007, 0.005635411012917757, 0.055967435240745544, 0.0695439800620079, 0.013275796547532082, 0.003981306683272123, -0.043364737182855606, -0.016813144087791443, 0.016984999179840088, -0.01589658483862877, 0.01470792107284069, 0.04597120359539986, -0.054048385471105576, 0.03666239231824875, -0.029931407421827316, 0.029201023280620575, 0.008406572043895721, -0.0222408976405859, 0.0034353092778474092, -0.029845479875802994, -0.01161453127861023, 0.049121879041194916, 0.002615417819470167, 0.032050952315330505, 0.030217831954360008, 0.03669103607535362, -0.0009344613645225763, -0.04628627002239227, -0.013397526927292347, 0.03987035155296326, 0.051928844302892685, 0.030819324776530266, 0.0038703170139342546, 0.05462123826146126, 0.007769276853650808, 0.043765731155872345, -0.009559432975947857, -0.000540179549716413, -0.014034822583198547, -0.014228159561753273, 0.00809150468558073, -0.018875403329730034, 0.031306248158216476, 0.01939096860587597, -0.011793547309935093, -0.033282577991485596, 0.011034521274268627, -0.0029555473010987043, 0.004077975172549486, -0.03606089949607849, -0.0191904716193676, -0.020722845569252968, 0.025663675740361214, 0.047116901725530624, -0.007948292419314384, -0.009745609015226364, -0.018560336902737617, 0.025377249345183372, 0.01016092486679554, -0.022813746705651283, 0.028513602912425995, 0.01407062541693449, 0.03248059004545212, 0.009695484302937984, -0.025964422151446342, 0.005237996112555265, 0.0038953793700784445, 0.003762907814234495, -0.040070850402116776, -0.010347100906074047, -0.009101152420043945, 0.010082158260047436, -0.027926431968808174, -0.01288912259042263, -0.010017712600529194, 0.005528001580387354, 0.014894097112119198, -0.006387276109308004, -0.040815554559230804, -0.03385542705655098, -0.009931785054504871, 0.050496719777584076, 0.0038130320608615875, -0.0214102640748024, 0.030074618756771088, -0.02975955232977867, 0.003521236591041088, 0.008836209774017334, 0.04505464434623718, -0.00505540007725358, -0.022856710478663445, 0.026680484414100647, -0.008585588075220585, -0.02818421460688114, 0.028742743656039238, -0.0054814573377370834, 0.05264490470290184, 0.023429561406373978, -0.02779754064977169, 0.028613852337002754, 0.01593954861164093, -0.010225370526313782, -0.02785482630133629, -0.03036104515194893, -0.04052912816405296, -0.048978663980960846, 0.003694881685078144, 0.016111403703689575, 0.00569627620279789, 0.0366051085293293, -0.02056531049311161, 0.011421194300055504, -0.021367300301790237, 0.056654855608940125, 0.007669027894735336, 0.025892814621329308, 0.004511192906647921, -0.00716062355786562, 0.0021249151322990656, 0.011729101650416851, 0.01252393051981926, 0.01662696897983551, 0.025821208953857422, 0.03497248515486717, -0.041502974927425385, 0.04113062098622322, 0.01573905162513256, 0.02824150025844574, -0.052673548460006714, 0.03016054630279541, 0.0784231498837471, -0.014478781260550022, -0.011328106746077538, -0.03491520136594772, -0.009752769023180008, 0.051098208874464035, -0.014657796360552311, -0.04058641567826271, 0.0023630058858543634, 0.036920174956321716, -0.0374930240213871, 0.011192054487764835, -0.010153763927519321, 0.05705584958195686, 0.014865454286336899, -0.02864249423146248, 0.011807868257164955, -0.013590863905847073, -0.011328106746077538, -0.06530489027500153, -0.01192959863692522, -0.0008606174378655851, 0.007790758740156889, -0.03460013493895531, -0.0014920949470251799, -0.013698273338377476, -0.009810054674744606, -0.02411697991192341, -0.03775080665946007, -0.023973768576979637, -0.019247757270932198, 0.009659681469202042, 0.007633224595338106, 0.019863570109009743, 0.00374500616453588, -0.008148789405822754, -0.002636899705976248, 0.020107030868530273, 0.05728498846292496, 0.0014509214088320732, -0.011285142973065376, -0.023429561406373978, -0.05258762091398239, 0.04052912816405296, 0.004754654131829739, -0.0017498773522675037, -0.002731777960434556, -0.025806887075304985, 0.040471844375133514, 0.020006783306598663, 0.04325016587972641, 0.06003466993570328, 0.023300670087337494, -0.022713497281074524, -0.02996004931628704, 0.025019219145178795, 0.012352075427770615, -0.014127910137176514, 0.029014846310019493, -0.030933894217014313, 0.051986128091812134, -0.07034596800804138, -0.027640007436275482, -0.03213687986135483, 0.03288158401846886, 0.07532975822687149, -0.002110593719407916, -0.0486922413110733, 0.008456696756184101, -0.017786988988518715, -0.011721940711140633, -0.02941584214568138, 0.05831611901521683, 0.013555060140788555, -0.017744025215506554, 0.0186892282217741, 0.0575714148581028, -0.034857917577028275, 0.02312881499528885, 4.076800451002782e-06, -0.0011242178734391928, 0.007106918841600418, -0.02927262894809246, -0.008334966376423836, -0.033969998359680176, -0.008191753178834915, 0.01505163125693798, -0.024217229336500168, -0.04173211380839348, -0.019749000668525696, 0.0006972657283768058, 0.0072572920471429825, -0.07223637402057648, 0.039784424006938934, 0.036089543253183365, -0.011113287881016731, 0.04511192813515663, -0.044854145497083664, 0.06879927217960358, -0.04768975451588631, -0.01084834523499012, 0.005775042809545994, -0.050153009593486786, 0.0008118356927298009, 0.008485338650643826, 0.014750884845852852, 0.010919950902462006, -0.006258385255932808, -0.00719642685726285, 0.014722242020070553, 0.05533729866147041, 0.04854902997612953, -0.05066857114434242, 0.011900956742465496, 0.0004891601274721324, -0.005839488469064236, 0.040471844375133514, -0.011056003160774708, 0.04642948508262634, 0.009036706760525703, -0.033282577991485596, 0.0217396542429924, 0.05029622092843056, -0.013691112399101257, -0.006133073940873146, -0.007590261287987232, -0.02244139462709427, 0.04872088506817818, -0.029644981026649475, -0.004926509223878384, 0.05029622092843056, 0.02715308405458927, 0.004579219035804272, 0.03620411455631256, -0.016455113887786865, 0.0339413546025753, 0.02804100140929222, -0.05797240883111954, 0.01399901881814003, -0.009974748827517033, 0.0015986092621460557, -0.027482474222779274, -0.016555361449718475, -0.0031596252229064703, 0.028599530458450317, -0.036633752286434174, 0.03551669418811798, -0.008900655433535576, -0.0004994535120204091, -0.08518277853727341, -0.01682746596634388, 0.058029692620038986, -0.02244139462709427, 0.012967889197170734, -0.02139594405889511, 0.003079068148508668, 0.03457149118185043, -0.00187250308226794, -0.015223485417664051, -0.04009949415922165, 0.003642967203631997, 0.010540437884628773, 0.017185496166348457, 0.0056533124297857285, -0.01751488633453846, -0.04806210473179817, -0.0050339181907474995, 0.012638500891625881, -0.0008418208453804255, 0.014586190693080425, -0.04196125268936157, 0.0007209852919913828, 0.013476293534040451, 0.02017863653600216, 0.00839225109666586, -0.019462574273347855, 0.010590562596917152, 0.05304589867591858, -0.005452814977616072, -0.04640084132552147, 0.008012738078832626, -0.021968793123960495, 0.02135298028588295, 0.0029215344693511724, -0.018818119540810585, -0.014600511640310287, 0.00687777902930975, 0.04456772282719612, 0.05338960886001587, 0.0050625610165297985, 0.033483076840639114, 0.04135976359248161, -0.02563503198325634, -0.019706036895513535, 0.017486242577433586, -0.009681163355708122, -0.011743422597646713, 0.053561463952064514, -0.01638350635766983, 0.04456772282719612, -0.041932612657547, -0.017085248604416847, -0.016211651265621185, 0.011507121846079826, -0.029086453840136528, -0.013390365988016129, -0.039097003638744354, -0.019548501819372177, -0.07825129479169846, 0.018388481810688972, -0.055824220180511475, -0.006530488841235638, 0.03680560365319252, 0.03351171687245369, -0.038151804357767105, -0.010590562596917152, 0.05605336278676987, 0.038209088146686554, 0.006258385255932808, -0.038295015692710876, 0.0006959231104701757, 0.00600060261785984, -0.06410190463066101, 0.01528077106922865, -0.028112608939409256, -0.01707092672586441, 0.043422020971775055, -0.003066536970436573, -0.005649731960147619, -0.006147395353764296, -0.0209090206772089, -0.030876608565449715, -0.05023893713951111, -0.008306323550641537, -0.008062861859798431, 0.05081178620457649, 0.011499961838126183, 0.06793999671936035, 0.004507612437009811, 0.06450289487838745, 0.011227858252823353, 0.0410446934401989, 0.055222731083631516, 0.006433820351958275, 0.00687419855967164, -0.01923343539237976, 0.039240218698978424, -0.00925152562558651, -0.04402351379394531, -0.04857767000794411, -0.002482946263626218, 0.003816612297669053, -0.03646189719438553, 0.02647998556494713, 0.012309111654758453, 0.010733774863183498, -0.013927413150668144, 0.001028444617986679, -0.0032222806476056576, -0.006491105537861586, -0.05333232507109642, 0.02499057725071907, -0.002148187020793557, 0.0028105448000133038, 0.029788194224238396, 0.07424134761095047, 0.014292605221271515, -0.0505826435983181, -0.008836209774017334, -0.00149478018283844, 0.04276324436068535, 0.0209090206772089, -0.01805909350514412, 0.020379135385155678, 0.040271345525979996, -0.05485037714242935, 0.0022287440951913595, 0.0037235242780297995, 0.0008185487822629511, 0.004811939317733049, 0.006505426485091448, 0.02716740593314171, 0.01983492821455002, 0.03302479535341263, 0.016311900690197945, -0.002473995555192232, -0.06163864955306053, 0.0038130320608615875, 0.043221525847911835, 0.01598251238465309, 0.025520462542772293, 0.0005415221676230431, -0.005535162054002285, -0.011943920515477657, -0.009366095997393131, -0.004486130550503731, 0.00868583656847477, -0.013082459568977356, 0.0026028866413980722, 0.03371221572160721, -0.008943619206547737, 0.03064746968448162, 0.023973768576979637, 0.016541041433811188, 0.02587849460542202, -0.005531581584364176, 0.024045374244451523, -0.053905174136161804, -0.009631038643419743, -0.0011421195231378078, 0.035402122884988785, -0.03276701271533966, -0.007933970540761948, 0.0026923944242298603, 0.0008619600557722151, 0.025792567059397697, -0.0002503980649635196, 0.029730908572673798, 0.01682746596634388, -0.025062182918190956, -0.09646791964769363, 0.03531619533896446, -0.0005643466720357537, -0.01894701085984707, 0.018875403329730034, -0.009280168451368809, -0.012975050136446953, -0.04224767908453941, -0.0063228304497897625, -0.0005124321323819458, -0.0331680104136467, -0.04035727307200432, 0.004367980640381575, -0.021023590117692947, 0.014371371828019619, -0.0012307321885600686, 0.013390365988016129, 0.03299615532159805, -0.04771839454770088, 0.037865377962589264, 0.008334966376423836, -0.003388765035197139, 0.020450741052627563, 0.0120083661749959, 0.028055323287844658, -0.029143737629055977, 0.00597912073135376, 0.026938267052173615, -0.012151578441262245, 0.030246473848819733, -0.011356748640537262, -0.010404386557638645, 0.024904649704694748, 0.020336171612143517, 0.00799841620028019, -0.0005621089367195964, 0.025305643677711487, 0.03242330253124237, 0.03852415457367897, 0.048634957522153854, -0.009695484302937984, -0.004897866398096085, 0.037521667778491974, 0.031019821763038635, 0.010604883544147015, -0.0019942335784435272, -0.0024972674436867237, -0.0022717078682035208, -0.003379814326763153, -0.044052157551050186, -0.0014186985790729523, 0.005538742523640394, 0.023014243692159653, 0.041302476078271866, 0.07034596800804138, -0.0235154889523983, -0.013562221080064774, 0.02519107423722744, 0.005925416015088558, 0.0036125346086919308, 0.007063955068588257, 0.04545563831925392, 0.024145623669028282, 0.01825959049165249, -0.004661566112190485, -0.03196502476930618, -0.017772667109966278, 0.013075298629701138, 0.0038201927673071623, -0.03523026779294014, -0.006222581956535578, 0.004117358475923538, -0.024976255372166634, -0.01707092672586441, -0.046916406601667404, 0.034313708543777466, -0.020493704825639725, -0.0186892282217741, -0.014836812391877174, 0.021854223683476448, 0.04127383604645729, -0.05333232507109642, 0.024532295763492584, -0.004994534887373447, 0.019319362938404083, 0.04201854020357132, 0.019691715016961098, -0.024088338017463684, -0.027582721784710884, -0.009129795245826244, 0.04428129643201828, -0.037865377962589264, 0.008098665624856949, 0.00390970055013895, -0.01957714557647705, -0.0541343130171299, -0.03617547079920769, -0.01170761976391077, 0.013290117494761944, -0.013376045040786266, -0.016598325222730637, 0.02027888596057892, -0.028599530458450317, 0.014507423155009747, -0.02662319876253605, -0.0444817952811718, -0.010733774863183498, 0.03952664136886597, -0.009466344490647316, -0.018517373129725456, 0.026981228962540627, -0.006376535166054964, -0.0031130812130868435, 0.012287629768252373, -0.001385580631904304, 0.01205132994800806, 0.006480364594608545, -0.013956055045127869, -0.038896508514881134, -0.011134769767522812, -0.03543076664209366, -0.035745833069086075, -0.015409662388265133, -0.0023826975375413895, 0.011356748640537262, -0.012194542214274406, -0.01573905162513256, 0.03806587681174278, 0.0019727519247680902, 0.009946106001734734, 0.006347892805933952, -0.017443278804421425, 0.013297278434038162, 0.006326410919427872, -0.01168613787740469, 0.027339261025190353, 0.016813144087791443, 0.010275495238602161, 0.012674303725361824, 0.025520462542772293, 0.0009098467417061329, -0.015295092016458511, -0.019376646727323532, 0.012760231271386147, 0.0070138308219611645, 0.046028487384319305, -0.026207882910966873, 0.00048334209714084864, 0.005334664601832628, -0.015423983335494995, 0.013562221080064774, -0.03689153119921684, 0.03757895156741142, -0.018918367102742195, -0.013146905228495598, -0.009387577883899212, -0.01498002465814352, -0.05101228132843971, 0.00027904054149985313, -0.03502977266907692, 0.04090148210525513, -0.0011376440525054932, -0.055766936391592026, 0.006995929405093193, 0.01470792107284069, 0.0356026217341423, -0.0045040324330329895, 0.02779754064977169, 0.01532373484224081, 0.013576542027294636, -0.04284917190670967, 0.019849248230457306, -0.0004963207175023854, 0.0156388022005558, 0.01634054258465767, -0.02204039879143238, -0.004726011771708727, -0.018431445583701134, -0.010805381461977959, 0.023085851222276688, -0.015767693519592285, -0.023257706314325333, -0.012044169008731842, -0.0023737468291074038, 0.024618223309516907, 0.038209088146686554, -0.007669027894735336, -0.03843822702765465, 0.0038595760706812143, 0.012309111654758453, 0.028800027444958687, 0.0020497285295277834, 0.00374500616453588, -0.010103640146553516, 0.019376646727323532, -0.004085135646164417, -0.02480440028011799, -0.009086831472814083, -0.015438304282724857, -0.015552874654531479, -0.011199215427041054, -0.005961219314485788, 0.06719528883695602, 0.018574656918644905, -0.009230043739080429, 0.016197331249713898, -0.025076504796743393, 0.014428656548261642, -0.01632622256875038, 0.006419498939067125, 0.05072585865855217, 0.005510099697858095, 0.007368281949311495, 0.03133488819003105, -0.005606768187135458, -0.005728499032557011, -0.00343709927983582, -0.0035176563542336226, -0.006147395353764296, 0.02858521044254303, -0.01815934106707573, 0.012860479764640331, -0.024217229336500168, 0.010518955998122692, -0.020823093131184578, 0.025606390088796616, -0.023257706314325333, 0.004060073755681515, -0.025692317634820938, -0.02975955232977867, -0.010361422784626484, 0.0417034737765789, -0.00839225109666586, 0.004751073662191629, -0.022026078775525093, -0.025319965556263924, -0.002534860745072365, -0.031649958342313766, 0.022641891613602638, 0.009008064866065979, 0.0038595760706812143, 0.02262757159769535, 0.028671137988567352, -0.028456319123506546, 0.000274341378826648, 0.02095198445022106, -0.029387200251221657, 0.03236601874232292, -0.00691358232870698, -0.0179158803075552, -0.04688776284456253, -0.0002058679237961769, -0.042677316814661026, -0.010332779958844185, 0.017844274640083313, 0.029243987053632736, 0.003635806730017066, -0.030676111578941345, -0.007339639123529196, 0.05539458617568016, 0.023630058392882347, -0.013941734097898006, -0.0031327728647738695, -0.03331122174859047, -0.001010542968288064, 0.015495589934289455, 0.02371598593890667, -0.04207582399249077, 0.020107030868530273, 0.0037808092311024666, 0.001917256973683834, -0.0037987108808010817, -0.024732794612646103, 0.006372955162078142, -0.01977764256298542, 0.007020991295576096, -0.01114193070679903, -0.026136275380849838, -0.004557737149298191, 0.05848797410726547, -0.02711012028157711, 0.02499057725071907, 0.05605336278676987, 0.06393004953861237, 0.010261173360049725, -0.02636541612446308, -0.0032312313560396433, -0.046228986233472824, 0.03806587681174278, 0.024489331990480423, -0.0029018428176641464, -0.03654782474040985, -0.008843369781970978, -0.03543076664209366, 0.01874651201069355, 0.04310695454478264, -0.061180368065834045, 0.003791550174355507, 0.01192959863692522, -0.0004513430467341095, 0.0010794639820232987, 0.019963819533586502, -0.007962613366544247, -0.009903142228722572, 0.020994948223233223, -0.007568779401481152, 0.006491105537861586, -0.01943393237888813, -0.010819702409207821, 0.0008239192538894713, 0.03448556363582611, -0.03236601874232292, -0.01099871750921011, -0.02027888596057892, 0.03577447682619095, 0.021138161420822144, -0.035803116858005524, -0.01293924730271101, -0.01168613787740469, 0.03617547079920769, -0.029358556494116783, 0.025506140664219856, 0.05387653410434723, 0.028313105925917625, -0.040815554559230804, 0.003884638426825404, -0.028570888563990593, -0.02519107423722744, 0.026651840656995773, 0.024861685931682587, 0.019118865951895714, 0.03356900438666344, 0.0011519653489813209, 0.04539835453033447, 0.0024005991872400045, -0.01878947578370571, 0.025420213118195534, -0.017343031242489815, -0.009136956185102463, 0.02480440028011799, 0.018073413521051407, -0.024317478761076927, 0.005155649036169052, -0.018861083313822746, 0.005628250073641539, 0.004955151583999395, -0.015266449190676212, 0.0244034044444561, -0.012266147881746292, -0.032108236104249954, -0.0007800604216754436, -0.01021104957908392, -0.009287328459322453, -8.318630716530606e-05, 0.014879776164889336, -0.0049909548833966255, -0.005699856206774712, 0.039927639067173004, -0.000208553159609437, 0.030962536111474037, -0.0037378454580903053, 0.01593954861164093, -0.010805381461977959, -0.0053382450714707375, -0.010168085806071758, -0.027124442160129547, -0.003392345504835248, 0.04121654853224754, 0.014600511640310287, -0.00445390772074461, 0.00749001232907176, -0.0065949345007538795, -0.037120673805475235, 0.0018563916673883796, -0.004937250167131424, 0.02052234672009945, -0.025549104437232018, 0.0019190470920875669, -0.006756048183888197, 0.017686739563941956, 0.03159267082810402, 0.017944522202014923, -0.014937060885131359, -0.02066555991768837, -0.0005433123442344368, -0.021281372755765915, -0.037865377962589264, 0.03311072289943695, -0.02420290745794773, -0.002975239185616374, -0.010955753736197948, -0.008270520716905594, -0.005907514598220587, 0.0331680104136467, 0.023400917649269104, 0.02967362478375435, 0.006709504406899214, 0.015037309378385544, -0.0008476388175040483, 0.001616510795429349, -0.006448141764849424, 0.04419536888599396, -0.032050952315330505, -0.006226162426173687, -0.026508629322052002, -0.018861083313822746, -0.011872313916683197, -0.021295694634318352, 0.012538252398371696, -0.004486130550503731, -0.00838509015738964, -0.01692771352827549, 0.012402200140058994, 0.02400241047143936, -0.02597874216735363, 0.044854145497083664, -0.0039848871529102325, 0.0037485864013433456, -0.006906421389430761, -0.009351774118840694, -0.00016044272342696786, 0.050697214901447296, 0.029286950826644897, 0.01987789198756218, 0.011542925611138344, 0.014278283342719078, -0.04304967075586319, 0.0011609160574153066, 0.0055494834668934345, 0.07916785776615143, -0.029014846310019493, 0.029845479875802994, 0.0020300368778407574, -0.011807868257164955, -0.031764525920152664, -0.009509308263659477, 0.040271345525979996, -0.017385995015501976, 0.046515412628650665, 0.005084042903035879, -0.002354054944589734, -0.014478781260550022, 0.016798822209239006, 0.016297578811645508, 0.008306323550641537, 0.023100171238183975, -0.025806887075304985, -0.005087622907012701, -0.04213310778141022, -0.020679881796240807, 0.014937060885131359, 0.045885276049375534, -0.012258987873792648, -0.01632622256875038, -0.025420213118195534, -0.0012853319058194757, 0.034027282148599625, -0.012781713157892227, -0.010862666182219982, -0.026694804430007935, 0.015466947108507156, 0.03336850553750992, 0.00300030130892992, 0.029186701402068138, -0.0013291907962411642, -0.011843671090900898, -0.0239594466984272, 0.024675508961081505, -0.03757895156741142, 0.02106655389070511, -0.019863570109009743, -0.016598325222730637, -0.0005325714009813964, 0.006154555827379227, 0.03720660135149956, 0.008406572043895721, -0.008528302423655987, -0.01161453127861023, 0.017199818044900894, 0.012638500891625881, 0.0017794149462133646, 0.03497248515486717, -0.02670912630856037, 0.031907737255096436, -0.010690811090171337, -0.03462877497076988, -0.013784200884401798, -0.0023630058858543634, -0.011449837125837803, -0.008263359777629375, -0.0063228304497897625, 0.007447048556059599, 0.023930804803967476, 0.0011367490515112877, 0.03414185345172882, 0.029115095734596252, -0.018961330875754356, 0.01188663486391306, -0.017944522202014923, -0.02814125083386898, -0.00749001232907176, -0.0009854808449745178, 0.0010508215054869652, 0.0067381467670202255, 0.008786085061728954, -0.04038591682910919, 0.006963706575334072, -0.021195445209741592, 0.03531619533896446, 0.0014312296407297254, 0.018588978797197342, -0.004844161681830883, -0.01350493635982275, -0.01800180785357952, 0.015667444095015526, 0.007389763370156288, -0.015681765973567963, 0.008062861859798431, -0.018417123705148697, 0.02085173688828945, 0.0011734472354874015, 0.010891309008002281, -0.02434612065553665, -0.02145322784781456, 0.01751488633453846, 0.01259553711861372, -0.005216514226049185, 0.013168387115001678, 0.0034209878649562597, 0.034514207392930984, -0.0012593746650964022, -0.007697670254856348, -0.02411697991192341, -0.04133111983537674, -0.010769577696919441, 0.0001040528150042519, -0.029788194224238396, 0.010719453915953636, 0.0005580810829997063, -0.01397753693163395, -0.03236601874232292, 0.0067381467670202255, -0.023100171238183975, -0.019548501819372177, 0.02046506293118, -0.031134391203522682, -0.013390365988016129, -0.01662696897983551, 0.021882865577936172, -0.02076580934226513, -0.015782015398144722, 0.02961633913218975, -0.05132735148072243, -0.00446464866399765, 0.012824676930904388, 0.009043867699801922, -0.03852415457367897, 0.0060077630914747715, -0.0366051085293293, -0.00799841620028019, -0.03322529420256615, 0.004425265360623598, -0.0018125328933820128, 0.011034521274268627, 0.019706036895513535, 0.023100171238183975, 0.00930165033787489, 0.03895379230380058, -0.0028624592814594507, -0.004879964981228113, -0.005008856300264597, -0.0038774777203798294, -0.0044718096032738686, -0.0018062673043459654, -0.01559583842754364, -0.011521443724632263, -0.03119167685508728, -0.026107633486390114, 0.024389084428548813, -0.002778321970254183, -0.017042284831404686, -0.023114493116736412, 0.011514282785356045, 0.002806964563205838, -0.008506820537149906, -0.012144417501986027, -0.036719679832458496, 0.0032079594675451517, -0.0031846873462200165, -0.026336774230003357, 0.04038591682910919, 0.031363531947135925, -0.010117961093783379, -0.009230043739080429, 0.012688624672591686, -0.03425642475485802, -0.043364737182855606, 0.011256500147283077, 0.014851133339107037, 0.014643475413322449, 0.03428506478667259, -0.0226848553866148, -0.012502448633313179, -0.003617905080318451, -0.0160827599465847, -0.003927601967006922, -0.02941584214568138, 0.0444817952811718, 0.011872313916683197, 0.03557397797703743, 0.01771538332104683, -0.03162131458520889, 0.02199743501842022, 0.014922739937901497, 0.009187079966068268, -0.029444484040141106, 0.024661187082529068, -0.054535310715436935, 0.0120083661749959, 0.03734981268644333, 0.010891309008002281, 0.009101152420043945, 0.008886333554983139, -0.008936458267271519, -0.05969095975160599, -0.004582799039781094, 0.009115474298596382, 0.01884676143527031, 0.0034478402230888605, 0.027725934982299805, 0.00446464866399765, 0.013905931264162064, -0.01490841805934906, -0.012258987873792648, -0.011442676186561584, -0.018316876143217087, -0.01662696897983551, 0.0026225782930850983, -0.020107030868530273, -0.01498002465814352, 0.006344312336295843, 0.003258083714172244, -0.009537951089441776, 0.04571342095732689, 0.012788874097168446, -0.008886333554983139, 0.03182180970907211, 0.0024865265004336834, -0.007805079687386751, -0.03703474625945091, 0.00993894599378109, -0.03577447682619095, -0.015237807296216488, -0.01825959049165249, -0.012509609572589397, -0.026293810456991196, -0.03030375950038433, 0.03952664136886597, 0.020722845569252968, -0.06461746990680695, -0.003284936072304845, 0.022398430854082108, -0.01687042973935604, 0.028513602912425995, 0.015567195601761341, 0.0019584305118769407, -0.0035069154109805822, -0.031420815736055374, -0.004901446867734194, -0.0006422184524126351, -0.020579632371664047, -0.02947312779724598, -0.009043867699801922, -0.004357239697128534, -0.020393455401062965, -0.022298181429505348, 0.028757063671946526, -0.007948292419314384, -0.02509082481265068, -0.045541565865278244, -0.01840280182659626, 0.014822490513324738, 0.00314888427965343, 0.027539758011698723, 0.005803685635328293, 0.020751487463712692, 0.010074997320771217, 0.011127608828246593, -0.025864172726869583, 0.02066555991768837, 0.001144804758951068, 0.007554457988590002, -0.017643775790929794, -0.02460390329360962, 0.011399712413549423, 0.012423682026565075, -0.004425265360623598, -0.008893494494259357, 0.0174719225615263, -0.008850530721247196, 0.017629455775022507, 0.033139366656541824, -0.01727142371237278, 0.014199516735970974, -0.021381622180342674, -0.004883545450866222, 0.02086605690419674, 0.03414185345172882, 0.015495589934289455, 0.03408456966280937, 0.015767693519592285, 0.019548501819372177, -0.038638725876808167, 0.0011797127081081271, -0.03523026779294014, -0.004256990738213062, -0.04937966167926788, 0.05101228132843971, -0.01898997463285923, -0.0019208373269066215, -0.0486922413110733, -0.027382224798202515, 0.024876005947589874, 0.024589581415057182, -0.008528302423655987, 0.021668046712875366, 0.012165899388492107, -0.005914675071835518, 0.003673400031402707, 0.016598325222730637, 0.030246473848819733, -0.01079822052270174, -0.0013802101602777839, -0.01666993275284767, -0.0015234226593747735, -0.0001288912317249924, 0.02209768444299698, -0.018388481810688972, 0.027625685557723045, 0.008349287323653698, -0.007676188368350267, 0.006233322899788618, 0.009287328459322453, 0.006061467807739973, 0.03268108516931534, 0.003558829892426729, 0.01666993275284767, 0.003315368667244911, -0.014879776164889336, -0.008864851668477058, 0.019161829724907875, -0.021539155393838882, -0.0006695183110423386, 0.012137257494032383, -0.040128134191036224, 0.01281751599162817, 0.0287857074290514, -0.005402690730988979, -0.009810054674744606, -0.0013130793813616037, -0.0033243196085095406, -0.023544130846858025, -0.02365870028734207, -0.007439888082444668, 0.022842388600111008, -0.027983717620372772, 0.0004708110063802451, -0.0011537554673850536, 0.011277982033789158, 0.004274892155081034, -0.031105749309062958, 0.033683571964502335, -0.02331499010324478, -0.019605787470936775, 0.009516469202935696, -0.02961633913218975, -0.04680183529853821, -0.03620411455631256, 0.02135298028588295, -0.04385165870189667, -0.026437021791934967, -0.00023204895842354745, 0.005531581584364176, -0.007035312708467245, -0.054019745439291, -0.02120976708829403, -0.0001372825790895149, 0.013189869001507759, -0.015481268055737019, -0.0005800105282105505, 0.006691602990031242, -0.027239011600613594, 0.021037911996245384, -0.015882262960076332, -0.029143737629055977, -0.009702645242214203, -0.01532373484224081, 0.021625082939863205, -0.02519107423722744, 0.018245268613100052, -0.007439888082444668, 0.031163034960627556, -0.01045451033860445, 0.0226848553866148, -0.010962914675474167, 0.008564106188714504, -0.015509910881519318, -0.029845479875802994, -0.005828747525811195, -0.002047938294708729, 0.010612044483423233, -0.010017712600529194, 0.009767090901732445, 0.0584593303501606, -0.009702645242214203, -0.0339413546025753, -0.015867941081523895, 0.015538553707301617, 0.007404084783047438, -0.04296374320983887, 0.002923324704170227, -0.02347252517938614, -0.0504680760204792, 0.017887238413095474, -0.054879020899534225, -0.015080273151397705, 0.0063120899721980095, -0.018660584464669228, 0.008571266196668148, -0.04565613716840744, -0.0011483849957585335, -0.0022931897547096014, 0.015366698615252972, -0.020135672762989998, -0.022154970094561577, -0.028370391577482224, -0.011320945806801319, -0.01230195164680481, -0.004436006303876638, 0.006326410919427872, -0.010282655246555805, 0.016412150114774704, -0.012495288625359535, -0.013640987686812878, -0.018130699172616005, -0.06862741708755493, 0.04345066472887993, 0.01992085576057434, 0.0036071641370654106, -0.02357277274131775, 0.019620109349489212, -0.02553478442132473, -0.01109180599451065, 0.009580914862453938, 0.023186098784208298, -0.018288232386112213, 0.017772667109966278, 0.0305042564868927, 0.006204680539667606, 0.00346216163598001, 0.028470639139413834, 0.004385882057249546, -0.02716740593314171, 0.03336850553750992, 0.0009353564819321036, -0.04743197187781334, -0.004901446867734194, -0.022154970094561577, -0.00570701714605093, -0.00952362921088934, -0.003284936072304845, -0.06032109260559082, 0.007235810160636902, 0.017944522202014923, -0.019405290484428406, 0.003977726213634014, -0.020049747079610825, -0.019147507846355438, -0.019720356911420822, -0.02882867120206356, 0.02327202633023262, 0.010970075614750385, -0.01834551803767681, -0.015710407868027687, 0.02484736405313015, -0.022513000294566154, 0.013590863905847073, 0.00044821028131991625, 0.014385692775249481, 0.005664053373038769, -0.03491520136594772, 0.0027675810270011425, 0.00804137997329235, 0.04654405266046524, 0.011793547309935093, -0.02489032782614231, -0.044395867735147476, 0.0035409284755587578, 0.021668046712875366, 0.027439510449767113, 0.0005701646441593766, -0.003974146209657192, 0.011836511082947254, -0.02848496101796627, -0.0018331196624785662, -0.014543226920068264, -0.0059361569583415985, 0.008241877891123295, 0.019004294648766518, 0.012473806738853455, 0.005248737055808306, -0.015366698615252972, 0.016942035406827927, 0.014679278247058392, -0.0008136258693411946, 0.018775155767798424, 0.01223034504801035, 0.05098364129662514, -0.02434612065553665, -0.012495288625359535, 0.018875403329730034, -0.021467549726366997, -0.055079516023397446, -0.011593049392104149, 0.020307527855038643, 0.0209663063287735, 0.006437400821596384, 0.006075789220631123, -0.018374159932136536, 0.037865377962589264, -0.015194843523204327, 0.013125423341989517, 0.04044320061802864, -0.021925829350948334, 0.004382301587611437, -0.018617620691657066, 0.004138840362429619, 0.011729101650416851, -0.004188964609056711, 0.0021070134826004505, 0.02559206821024418, -0.003487223759293556, 0.004937250167131424, 0.0037700682878494263, 0.0008118356927298009, 0.004117358475923538, -0.005538742523640394, 0.03723524138331413, -0.03202230855822563, 0.022355467081069946, -0.03411320969462395, 0.019706036895513535, 0.013512096367776394, -0.03288158401846886, 0.010117961093783379, 0.016311900690197945, 0.005116265732795, -0.02503354102373123, 0.032108236104249954, -0.023945124819874763, 0.007984095253050327, -0.03365493193268776, 0.029000526294112206, -0.006204680539667606, -0.0036913014482706785, 0.010332779958844185, 0.009709805250167847, -0.008671515621244907, 0.0014518164098262787, -0.02468983083963394, 0.007028152234852314, 0.009623878635466099, -0.021238408982753754, 0.014550386928021908, -0.04213310778141022, -0.026694804430007935, 0.015581517480313778, 0.007071116007864475, -0.02002110332250595, -0.02656591311097145], "index": 24}, {"title": "Baron Birdwood", "text": "Baron Birdwood, of Anzac and of Totnes in the County of Devon, was a title in the Peerage of the United Kingdom. It was created on 25 January 1938 for Sir William Birdwood, 1st Baronet. He is chiefly remembered as the commander of the Australian and New Zealand Army Corps (ANZAC) during the Gallipoli Campaign of 1915. Birdwood had already been created a Baronet, of Anzac and Totnes, on 6 October 1919.", "vector": [0.015234222635626793, 0.005028111394494772, -0.028315488249063492, 0.002980757039040327, 0.0014648291980847716, 0.04186004772782326, -0.0008469608146697283, -0.022238150238990784, -0.004067455884069204, 0.06001030281186104, 0.0016087570693343878, 0.04537563771009445, -0.059356238692998886, 0.008305240422487259, 0.028015708550810814, 0.026489561423659325, -0.04867320507764816, 0.003798336023464799, -0.0495452918112278, -0.01648784428834915, 0.05197077617049217, 0.005290417931973934, 0.004360421560704708, -0.02861526608467102, 0.009919959120452404, 0.022578807547688484, 0.029214825481176376, 0.005716240033507347, 0.048209913074970245, -0.0008635678677819669, -0.03752687945961952, -0.039134785532951355, 0.028588013723492622, -0.02790669910609722, 0.0329756885766983, -0.02559022419154644, -0.03401128947734833, 0.01561576034873724, 0.013381043449044228, -0.0021972437389194965, -0.04938177391886711, -0.05066264793276787, -0.019349370151758194, -0.013312912546098232, 0.014893565326929092, -0.046274974942207336, -0.04104246944189072, 0.030631961300969124, -0.014144117943942547, 0.0013745548203587532, 0.04733782634139061, -0.02742977812886238, 0.00439108069986105, 0.0659513771533966, 0.01849091239273548, 0.008584580384194851, 0.03938005864620209, 0.035700950771570206, -0.034447330981492996, -0.003185151843354106, -0.013721701689064503, -0.03788116201758385, -0.0509079210460186, 0.009061501361429691, -0.002514055697247386, -0.024922534823417664, 0.06840411573648453, 0.0591382198035717, -0.04605695232748985, -0.0509079210460186, 0.015206970274448395, -0.012243246659636497, 0.014089612290263176, 0.05058089271187782, 0.0419418066740036, -0.0005987063050270081, 0.027375271543860435, 0.013108517974615097, -0.06518830358982086, 0.03125877305865288, 0.02069837599992752, 0.005389208439737558, -0.01507070753723383, 0.04581167921423912, 0.020984528586268425, 0.029950646683573723, -0.036954574286937714, -0.03551018238067627, 0.0007490216521546245, -0.059628766030073166, 0.022047381848096848, 0.008141724392771721, 0.049736060202121735, -0.023369135335087776, -0.00658491812646389, -0.018368275836110115, 0.03551018238067627, -0.013871591538190842, 0.0419963113963604, -0.04387674108147621, -0.014675543643534184, -0.019076844677329063, -0.028369992971420288, -0.013019946403801441, 0.011316657066345215, 0.001078182365745306, 0.0021410351619124413, -0.02620340883731842, 0.012399949133396149, 0.025440335273742676, 0.032103605568408966, 0.015329607762396336, 0.01692388579249382, -0.0018276298651471734, -0.026966482400894165, 0.03142228722572327, 0.04139675199985504, -0.019049592316150665, -0.06082788109779358, 0.002634989097714424, -0.03730885684490204, -0.007024366874247789, -0.02103903517127037, -0.05423274263739586, 0.04085170105099678, -0.049027491360902786, -0.010526330210268497, 0.0838836133480072, -0.017755091190338135, 0.03878049924969673, -0.01056720968335867, -0.025494839996099472, 0.017727838829159737, -0.0247453935444355, 0.03191283717751503, 0.03065921552479267, -0.01770058646798134, -0.0071333772502839565, 0.016528723761439323, -0.0021069692447781563, 0.02103903517127037, 0.008543700911104679, 0.0014920817920938134, 0.002718450268730521, 0.03202184662222862, 0.0008925237925723195, 0.05186176300048828, 0.02392781339585781, 0.026244288310408592, -0.015888286754488945, 0.0012289235601201653, 0.04221433028578758, 0.030359435826539993, 0.020643871277570724, 0.0020473541226238012, -0.06764104217290878, -0.06431622058153152, -0.03041394054889679, -0.0036143807228654623, 0.06633291393518448, -0.0398978590965271, 0.005075803492218256, -0.03905302658677101, -0.0019247173331677914, 0.03812643513083458, 0.040797196328639984, -0.023873308673501015, -0.012434015050530434, -0.008605019189417362, 0.005927448160946369, -0.03425656259059906, -0.023260124027729034, 0.0647522583603859, 0.019390249624848366, -0.04014313220977783, 0.061863481998443604, -0.012590717524290085, 0.03139503672719002, -0.021297933533787727, 0.008128098212182522, -0.021488703787326813, -0.063335120677948, -0.045348383486270905, 0.0003906920610461384, -0.011153141036629677, 0.001892354805022478, 0.05327890068292618, 0.04624772071838379, -0.06262655556201935, 0.048237163573503494, 0.005576570518314838, -0.013210714794695377, 0.03055020421743393, -0.025562971830368042, 0.03000515140593052, 0.031722068786621094, 0.0019264206057414412, 0.024186713621020317, -0.01104413066059351, 0.03139503672719002, 0.0116913802921772, -0.0591927245259285, 0.03068646788597107, -0.0004556299827527255, -0.0158065278083086, 0.02670758217573166, -0.04594794288277626, 0.0398978590965271, -0.009299961850047112, 0.007998648099601269, -0.026516813784837723, -0.0016377130523324013, -0.020957276225090027, 0.005344923119992018, -0.039025772362947464, 0.015343233942985535, -0.016610480844974518, -0.026625825092196465, 0.000436893809819594, -0.0032192175276577473, -0.03346623480319977, 0.0021393317729234695, 0.01879069209098816, 0.012910936027765274, -0.0104990778490901, -0.012917748652398586, -0.014075986109673977, -0.002551527926698327, -0.0051882206462323666, 0.004036796744912863, -0.03409304842352867, -0.008005461655557156, -0.01701926998794079, 0.02738889865577221, 0.005157561041414738, 0.04324993118643761, -0.008870732970535755, -0.04186004772782326, 0.025331323966383934, -0.03177657350897789, -0.031994592398405075, 0.06360764801502228, 0.00948391668498516, -0.04186004772782326, 0.011711820028722286, -0.010730724781751633, 0.03346623480319977, -0.024990666657686234, -0.06426171213388443, 0.013374230824410915, 0.08039527386426926, 0.01562938652932644, -0.010097101330757141, -0.012583903968334198, 0.019594645127654076, -0.013054012320935726, 0.008496008813381195, 0.02984163537621498, 0.06415270268917084, 0.03782665729522705, 0.0027133405674248934, 0.041178733110427856, 0.014171370305120945, 0.04166927933692932, -0.03311195224523544, -0.046711016446352005, -0.04210532084107399, -0.005988766439259052, -0.011820830404758453, -0.04921825975179672, -0.00179697060957551, -0.0011463139671832323, 0.021257055923342705, -0.055513616651296616, -0.02943284623324871, 0.008557327091693878, 0.026762086898088455, 0.009347653947770596, -0.02467726171016693, 0.03382052108645439, 0.020275959745049477, -0.047937385737895966, -0.007235574536025524, -0.03463809937238693, -0.049163755029439926, 0.01838190294802189, 0.0134082967415452, 0.006295358762145042, 0.019144976511597633, -0.010090287774801254, -0.021079912781715393, 0.06682346016168594, -0.00023547980526927859, -0.01644696481525898, -0.007991835474967957, -0.004537563771009445, -0.01763245463371277, -0.04499410092830658, -0.002507242374122143, -0.03188558295369148, 0.020984528586268425, -0.02392781339585781, -0.036273255944252014, 0.01060127466917038, 0.05366043746471405, 0.0025958134792745113, -0.021897492930293083, 0.009047875180840492, -0.009736004285514355, 0.038044679909944534, -0.039134785532951355, -0.005603823345154524, 0.007896451279520988, -0.019144976511597633, -0.03850797191262245, -0.004302509594708681, -0.00044030038407072425, 8.53241654112935e-05, -0.03946181759238243, 0.044258277863264084, -0.03354799374938011, -0.04033390060067177, -0.04791013151407242, -0.06393468379974365, 0.023846056312322617, -0.013163022696971893, 0.07309156656265259, -0.008475570008158684, -0.04295015335083008, -0.024241218343377113, -0.018668055534362793, -0.06110040843486786, 0.04224158450961113, 0.008707216940820217, 0.02093002386391163, 0.05526834353804588, 0.002313067438080907, 0.025917256250977516, 0.001451202784664929, -0.008673151023685932, -0.01594279147684574, 0.0502266064286232, 0.011957094073295593, 0.02406407706439495, -0.014089612290263176, 0.0769614428281784, -0.009994903579354286, 0.03586446866393089, 0.001808893634006381, -0.0271572507917881, 0.0005450526950880885, 0.023137487471103668, 0.050689902156591415, 0.02426847256720066, -0.01043094601482153, 0.010199299082159996, -0.0020558706019073725, -0.027879446744918823, -0.03605523705482483, 0.06153644993901253, -0.017986739054322243, 0.020275959745049477, -0.005344923119992018, 0.04275938495993614, -0.05352417379617691, -0.021434197202324867, 0.028942298144102097, -0.0018906515324488282, -0.025276819244027138, -0.03820819407701492, -0.0025327918119728565, 0.01090786699205637, -0.03442007675766945, -0.03027767688035965, -0.016937512904405594, -0.011636875569820404, -0.031667560338974, -0.009572488255798817, -0.011159953661262989, -0.003920972812920809, 0.015111586079001427, -0.03188558295369148, 0.010233364067971706, -0.036954574286937714, 0.013469615019857883, -0.01066940650343895, 0.01090786699205637, 0.04771936312317848, 0.001016863971017301, 0.011493799276649952, -0.041478510946035385, 0.052624840289354324, -0.009477104060351849, -0.0058593167923390865, -0.032675910741090775, -0.018123002722859383, 0.014634665101766586, 0.003123833332210779, 0.03621875122189522, 0.009613366797566414, 0.020330466330051422, 0.018368275836110115, 0.056358449161052704, 0.024213965982198715, 0.044094763696193695, -0.007923703640699387, 0.015220596455037594, 0.0032072945032268763, -0.042868394404649734, -0.009122819639742374, -0.005750305950641632, -0.016269823536276817, 0.01903596520423889, 0.020671123638749123, -0.007569419220089912, 0.00064767588628456, -0.041314996778964996, 0.02368254028260708, 0.011800390668213367, -0.039679836481809616, 0.03463809937238693, -0.019267613068223, -0.05349692329764366, 0.05581339821219444, -0.013776207342743874, -0.006090964190661907, 0.003208997892215848, 0.03630051016807556, -0.04543014243245125, -0.028424497693777084, -0.004670420195907354, -0.04815540462732315, 0.014334886334836483, 0.05581339821219444, -0.018545418977737427, -0.0481826588511467, -0.031694814562797546, -0.000923182989936322, 0.006721181329339743, 0.021829361096024513, -0.02538583055138588, 0.03283942490816116, -0.04071543738245964, 0.00781469326466322, -0.08415614068508148, -0.002946691121906042, 0.020752882584929466, -0.03248514235019684, 0.016188064590096474, -0.010015343315899372, -0.02484077773988247, -0.014621038921177387, -0.015043454244732857, 0.026053519919514656, -0.027811314910650253, -0.03499238193035126, 0.03725435212254524, 0.0209981556981802, -0.028996804729104042, -0.003621193813160062, -0.04251411184668541, 0.04123323783278465, 0.016664985567331314, 0.001810596906580031, 0.04791013151407242, -0.016596855595707893, -0.022442545741796494, -0.007964582182466984, -0.007535353768616915, 0.011800390668213367, -0.002369276015087962, -0.016869381070137024, -0.003968664910644293, 0.07663440704345703, -0.023369135335087776, 0.009558862075209618, 0.0007102718227542937, -0.013013133779168129, 0.06251754611730576, 0.08448316901922226, 0.0019213107880204916, -0.03739061579108238, 0.018817944452166557, -0.015424991957843304, -0.010015343315899372, -0.061972491443157196, -0.0398978590965271, 0.025140555575489998, -0.0038971267640590668, 0.0398978590965271, -0.00980413518846035, 0.04049741476774216, -0.04652024805545807, -0.00827798806130886, -0.027743183076381683, 0.029787130653858185, -0.047256071120500565, 0.037227097898721695, 0.0030028996989130974, 0.017278170213103294, -0.017659706994891167, -0.010785230435431004, 0.03499238193035126, 0.00548118632286787, 0.019703654572367668, 0.0037540504708886147, -0.02627154067158699, 0.08039527386426926, 0.02127068117260933, 0.038889508694410324, -0.003972071688622236, 0.053878460079431534, 0.004864595364779234, 0.012359069660305977, 0.013088078238070011, -0.03373876214027405, 0.005470966454595327, 0.0010730725480243564, -0.026448681950569153, 0.00469767302274704, 0.01947200857102871, -0.0020405410323292017, -0.037772152572870255, 0.023369135335087776, 0.029814383015036583, 0.00915688555687666, -0.0025344949681311846, 0.020684750750660896, 0.025835497304797173, -0.02429572492837906, -0.00639755604788661, 0.02110716514289379, -0.010948746465146542, -0.03455634042620659, -0.029351087287068367, 0.033902280032634735, 0.01746893860399723, 0.011555117554962635, -0.031449541449546814, 0.00773974834010005, -0.010451385751366615, -0.051507480442523956, -0.00402657687664032, -0.0029892735183238983, -0.020548487082123756, 0.017305422574281693, 0.04333169013261795, 0.041751038283109665, -0.011739072389900684, -0.003651853185147047, -0.009136445820331573, 0.006901729851961136, -0.013680823147296906, 0.008707216940820217, -0.0014205436455085874, 0.00270652724429965, -0.04488509148359299, 0.01883157156407833, -0.029759878292679787, 0.006131842732429504, 0.03741787001490593, -3.071244282182306e-05, 0.021093539893627167, -0.005736679770052433, 0.028179224580526352, 0.0042003123089671135, 0.029405593872070312, 0.005593603476881981, 0.028315488249063492, 0.01726454496383667, 0.0196082703769207, 0.00015414772497024387, 0.04224158450961113, 0.015261475928127766, -0.01498894952237606, -0.019499260932207108, 0.004632947966456413, 0.0154794966802001, 0.0077329352498054504, 0.035700950771570206, 0.0035905346740037203, -0.011957094073295593, 0.03264865651726723, -0.004016357008367777, 0.009647432714700699, 0.008203043602406979, -0.01562938652932644, 0.024186713621020317, 0.03646402433514595, -0.033766016364097595, 0.03621875122189522, -0.005702613852918148, -0.026257913559675217, -0.013721701689064503, 0.036273255944252014, 0.041314996778964996, -0.04594794288277626, 0.059901293367147446, -0.012883683666586876, 0.005474373232573271, 0.013517307117581367, -0.007535353768616915, 0.015424991957843304, 0.003645039862021804, 0.0035632820799946785, -0.0031936680898070335, 0.019581018015742302, -0.007365024648606777, 0.0034678978845477104, 0.026039892807602882, 0.0028819660656154156, -0.026802966371178627, -0.01849091239273548, 0.03403853997588158, -0.003099987283349037, -0.018341023474931717, 0.01967640221118927, 0.0371180884540081, 0.03000515140593052, -0.009613366797566414, 0.039162036031484604, -0.02623066119849682, 0.029242077842354774, -0.012767859734594822, 0.024881655350327492, -0.02627154067158699, 0.00167603709269315, -0.010328749194741249, 0.002060980536043644, 0.012631596066057682, -0.019049592316150665, 0.008427876979112625, -0.013265220448374748, 0.007446782663464546, -0.014403018169105053, -0.0042684441432356834, -0.006107996683567762, -0.042023561894893646, -0.04624772071838379, -0.003226030617952347, -0.010267429985105991, -0.0005965772434137762, -0.03842621669173241, -0.017087401822209358, -0.009933585301041603, -0.006053491495549679, 0.02083463966846466, -0.04731057584285736, -0.007160630077123642, -0.003931192681193352, -0.013776207342743874, 0.031449541449546814, -0.027811314910650253, 0.0048952545039355755, 0.011173580773174763, -0.021624965593218803, -0.0014929333701729774, -0.016133559867739677, 0.015261475928127766, 0.019076844677329063, 0.03551018238067627, -0.07363662123680115, -0.005736679770052433, 0.012856430374085903, 0.011050943285226822, 0.004425146616995335, -0.01631070300936699, 0.028233729302883148, 0.029214825481176376, -0.008802601136267185, 0.0659513771533966, -0.002537901746109128, 0.0056821745820343494, -0.025208687409758568, -0.036382269114255905, -0.015356860123574734, -0.025372203439474106, 0.017278170213103294, 0.03191283717751503, -0.017387181520462036, 0.0008678261074237525, -0.011173580773174763, -0.01610630750656128, -0.02283770777285099, 0.022456170991063118, -0.011888962239027023, 0.0021291121374815702, 0.03491062670946121, 0.04033390060067177, 0.03700907900929451, 0.017864102497696877, -0.02144782431423664, -0.025917256250977516, -0.03880775347352028, -0.01992167718708515, 0.012025224976241589, 0.008414250798523426, 0.029242077842354774, 0.016365207731723785, 0.015016201883554459, -0.039816100150346756, 0.04000686854124069, 0.003173228818923235, -0.00256174779497087, 0.007760188076645136, -0.023028476163744926, -0.0007447634125128388, 0.03134053200483322, 0.01648784428834915, -0.007637551054358482, -0.017577949911355972, 0.04041565954685211, -0.01573839597404003, -0.0010126057313755155, 0.03237612918019295, -0.007555793039500713, 0.030795477330684662, 0.03801742568612099, 0.008659524843096733, -0.03869874030351639, -0.027988456189632416, -0.0009529906092211604, 0.02127068117260933, 0.024759018793702126, 0.0029228450730443, 0.008264361880719662, -0.01060127466917038, 0.00820985622704029, -0.021624965593218803, -6.806505552958697e-06, -0.04183279350399971, -0.023082982748746872, 0.004799870308488607, 0.01783685013651848, 0.015138838440179825, -0.0042105321772396564, -0.04071543738245964, -0.008380184881389141, 0.022129138931632042, 0.024486493319272995, -0.007317332550883293, 0.022646939381957054, 0.03436557203531265, -0.024554625153541565, 0.030359435826539993, 0.03177657350897789, -0.02779768779873848, -0.023573528975248337, -0.01601092331111431, -0.008645898662507534, 0.00047990187886171043, 0.0027933951932936907, 0.015111586079001427, -0.008066779933869839, -0.015683891251683235, -0.009252269752323627, 0.024309350177645683, -0.022101886570453644, 0.012583903968334198, 0.009170511737465858, 0.008468756452202797, 0.029378341510891914, -0.03278492018580437, 0.008298427797853947, 0.019117724150419235, -0.006683708634227514, 0.020875519141554832, 0.025344951078295708, 0.026053519919514656, -0.0010832922998815775, -0.0018361463444307446, -0.01507070753723383, -0.030495699495077133, 0.02454099804162979, 0.04572992026805878, -0.029514603316783905, 0.02877878211438656, 0.00827798806130886, -0.0069460151717066765, -0.007828319445252419, -0.004053829703480005, 0.04196905717253685, -0.034065794199705124, -0.006871070712804794, -0.004435366485267878, -0.013299286365509033, -0.043277185410261154, -0.012352257035672665, -0.03452908992767334, 0.024786271154880524, 0.00803952757269144, 0.01126896496862173, -0.00010214415669906884, 0.009388532489538193, 0.03150404617190361, -0.028806036338210106, 0.038998521864414215, 0.017523445188999176, 0.03237612918019295, -0.019649149850010872, -0.004881628323346376, 0.011568743735551834, -0.00045307507389225066, 0.016610480844974518, 0.003052295185625553, -0.04989957436919212, -0.02501791901886463, -0.0035155899822711945, -0.03619150072336197, 0.02351902425289154, 0.044912341982126236, 0.007126564159989357, 0.017823223024606705, 0.011316657066345215, -0.0077465614303946495, 0.009170511737465858, -0.06366215646266937, -0.040797196328639984, 0.02409132942557335, -0.018368275836110115, -0.06404369324445724, 0.0018020805437117815, -0.0087685352191329, -0.012604343704879284, -0.013415109366178513, 0.012434015050530434, 0.02018057554960251, -0.002093343064188957, -0.010751164518296719, 0.019935302436351776, 0.01767333410680294, -0.018886076286435127, -0.039298299700021744, 9.868434426607564e-05, -0.042977407574653625, 0.08350207656621933, -0.01917222887277603, -0.0337115079164505, -0.008080406114459038, 0.016542349010705948, 0.008073593489825726, 0.013769393786787987, -0.004765804391354322, -0.009736004285514355, -0.011486985720694065, 0.029242077842354774, 0.015929164364933968, -0.010015343315899372, -0.0419418066740036, 0.020916396751999855, 0.022415293380618095, 0.059356238692998886, -0.026598572731018066, 0.01838190294802189, 0.0002623066247906536, -0.01910409703850746, -0.004230971448123455, 0.005770745687186718, -0.02490890771150589, -0.031177014112472534, 0.018327396363019943, 0.004360421560704708, -0.02722538262605667, -0.02090277150273323, 0.013605877757072449, 0.0008908205199986696, 0.017346302047371864, -0.036109741777181625, 0.006196567788720131, 0.005116682033985853, -0.020889144390821457, -0.012604343704879284, 0.021597713232040405, -0.012747419998049736, -0.010846548713743687, -0.005160967819392681, -0.031994592398405075, -0.016024550423026085, -0.016051802784204483, 0.010144793428480625, -0.039816100150346756, 0.03496513143181801, 0.009681498631834984, 0.004012950696051121, -0.001773124560713768, 0.01184127014130354, 0.01842278055846691, 0.04153301566839218, 0.006608764175325632, 0.017755091190338135, 0.002776362234726548, 0.009347653947770596, 0.01451202854514122, -0.04142400622367859, 0.04098796471953392, -0.009068313986063004, 0.024527370929718018, -0.04145125672221184, -0.008829853497445583, -0.005678767804056406, 0.005896789021790028, 0.016773996874690056, -0.009708750993013382, -0.0006255331682041287, -0.0016036472516134381, -0.026802966371178627, 0.02484077773988247, -0.011439293622970581, -0.01498894952237606, -0.0058525032363832, 0.014103238470852375, 0.021638592705130577, -0.018749812617897987, 0.06938520818948746, 0.023777924478054047, 0.012284125201404095, -0.022197270765900612, -0.03799017518758774, -0.013244780711829662, -0.03221261501312256, 0.005396021995693445, 0.02440473437309265, -0.055758893489837646, -0.02905130945146084, -0.007508100941777229, 0.00016639010573271662, 0.013060825876891613, 0.04480333253741264, 0.02256518229842186, 0.003256689989939332, 0.010764790698885918, -0.02395506575703621, 0.0010398583253845572, -0.03924379497766495, -0.00451031094416976, 0.019621897488832474, -0.03106800466775894, -0.034447330981492996, 0.01175951212644577, -0.02905130945146084, 0.014770927838981152, -0.00234542996622622, 0.003306085243821144, -0.0087821613997221, -0.007147003430873156, -0.05739405006170273, -0.02035771869122982, 0.018668055534362793, -0.021079912781715393, 0.028860541060566902, 0.03657303750514984, 0.0032396570313721895, 0.0011539787519723177, 0.00938171986490488, -0.028424497693777084, 0.020602991804480553, -0.0005829508882015944, -0.018640803173184395, -0.006302171852439642, 0.01994892954826355, -0.025535719469189644, -0.026857471093535423, -0.03327546641230583, -0.02242891862988472, -0.010049409233033657, -0.004636354744434357, -0.016256196424365044, 0.021079912781715393, -0.034856121987104416, 0.01430763304233551, 3.494405245874077e-05, 0.039434563368558884, -0.01770058646798134, -0.010648966766893864, 0.02875152975320816, 0.008114472031593323, -0.031449541449546814, 0.047801122069358826, -5.264229912427254e-05, 0.009204577654600143, -0.013851151801645756, 0.027102746069431305, 0.005075803492218256, 0.03553743660449982, 0.006509973201900721, 0.022578807547688484, -0.04357696324586868, 0.05554087087512016, -0.005086022894829512, 0.017523445188999176, -0.0743451863527298, -0.034747108817100525, 0.006128436420112848, 0.00773974834010005, 0.047664858400821686, -0.028560761362314224, -0.009919959120452404, 0.06273556500673294, -0.011888962239027023, 0.015561254695057869, -0.026121651753783226, -0.005453933496028185, 0.015329607762396336, -0.01498894952237606, -0.03799017518758774, 0.017278170213103294, 0.01610630750656128, 0.019594645127654076, 0.010403693653643131, -0.011752698570489883, -0.005494812503457069, -0.0024340010713785887, -0.004643167834728956, 0.01685575395822525, 0.022742323577404022, -0.017319049686193466, -0.020480355247855186, 0.006087557412683964, 0.0055663506500422955, 0.033929530531167984, -0.013544559478759766, -0.028588013723492622, -0.0014707907103002071, 0.015397738665342331, -0.019117724150419235, 0.02984163537621498, 0.02022145502269268, -0.014294006861746311, -0.011861709877848625, -0.002875152975320816, 0.031722068786621094, 0.020344091579318047, 0.01444389671087265, -0.03139503672719002, -0.03332997113466263, 0.034883372485637665, 0.0247726459056139, 0.04551190137863159, -0.011153141036629677, -0.000347471097484231, -0.03150404617190361, -0.018599923700094223, -0.00968831218779087, 0.008972929790616035, -0.005941074341535568, 0.04289564862847328, -0.014907191507518291, -0.005896789021790028, 0.021216176450252533, -0.022115513682365417, -0.009320401586592197, -0.019553765654563904, -0.011595996096730232, 0.006775686517357826, -0.019417501986026764, -0.0024510337971150875, -0.025671983137726784, -0.028560761362314224, -0.0015184828080236912, 0.0072151352651417255, 0.0036143807228654623, -0.024827150627970695, 0.0071333772502839565, -0.03698182478547096, 0.011132701300084591, -0.0027610326651483774, -0.007841945625841618, -0.00031085035880096257, -0.002992680063471198, 0.00810765940696001, -0.011623249389231205, 0.04245960712432861, 0.01862717606127262, 0.002408451633527875, 0.016501471400260925, 0.014294006861746311, 0.005740086082369089, 0.0009964244673028588, 0.0031425694469362497, 0.027647798880934715, 0.006615577265620232, 0.0071333772502839565, -0.04523937404155731, 0.0016726304311305285, -0.028560761362314224, 0.04030664637684822, -0.014416644349694252, 0.026244288310408592, 0.005917228292673826, -0.007439969573169947, -0.00014233114779926836, 0.041778288781642914, -0.009763256646692753, -0.05044462904334068, 0.013135770335793495, -0.031177014112472534, -0.01553400233387947, 0.025372203439474106, -0.04687453433871269, -0.0005846542189829051, -0.0350741408765316, -0.019458381459116936, -0.025971760973334312, -0.01692388579249382, 0.04333169013261795, 2.688004133233335e-05, -0.006959641817957163, 0.040224891155958176, -0.00925908237695694, -0.00749447476118803, -0.013687635771930218, 0.03136778250336647, -0.007637551054358482, -0.005392615217715502, 0.004609101917594671, 0.01359225157648325, 0.0010253804503008723, -0.02052123472094536, 0.010301495902240276, 0.026462309062480927, 0.0038664676249027252, -0.03551018238067627, 0.007126564159989357, 0.010941932909190655, -0.007310519460588694, 0.012202367186546326, -0.011343909427523613, -0.017577949911355972, -0.03327546641230583, 0.03248514235019684, 0.002396528609097004, -0.0010943636298179626, -0.02932383492588997, 0.035428427159786224, 0.003055701730772853, -0.012508959509432316, -0.0037199847865849733, 0.018163882195949554, -0.02745703049004078, 0.010342375375330448, -0.016460591927170753, -0.0018071903614327312, -0.0030744378454983234, 0.0057060206308960915, -0.006128436420112848, -0.013926096260547638, -0.032566897571086884, 0.01493444386869669, -0.028233729302883148, 0.010063035413622856, -0.03553743660449982, -0.004377454519271851, 0.024350229650735855, 0.028642520308494568, 0.020466728135943413, 0.005419868044555187, 0.02752516232430935, 0.015220596455037594, -0.01917222887277603, 0.03725435212254524, -0.010771604254841805, -0.010519517585635185, 0.010546769946813583, 0.0024765832349658012, 0.0049429466016590595, 0.037199847400188446, 0.0077806273475289345, -0.056358449161052704, -0.040797196328639984, 0.014907191507518291, -0.005201846826821566, 0.022878587245941162, 0.004285477101802826, -0.005525471642613411, -0.004639761056751013, -0.014839059673249722, -0.030877236276865005, 0.010137979872524738, 0.018068498000502586, -0.024827150627970695, 0.022524302825331688, 0.007767001166939735, -0.004711299203336239, 0.0009708751458674669, 0.031122509390115738, 0.02365528792142868, -0.009770069271326065, 0.0026860879734158516, 0.03425656259059906, 0.012910936027765274, 0.0013515603495761752, -0.008734469301998615, 0.014430270530283451, -0.008877545595169067, -0.004081082064658403, 0.01780959777534008, -0.010465011931955814, -0.014130491763353348, 0.004012950696051121, -0.0006847224431112409, 0.021297933533787727, 0.0026639450807124376, 0.04622047021985054, 0.006864257622510195, -0.001592575921677053, -0.004057236015796661, -0.011814017780125141, -0.010376441292464733, 0.00469085993245244, 0.004721519071608782, 0.017550697550177574, -0.02606714516878128, 0.002813834697008133, 0.02946009859442711, 0.011800390668213367, -0.005007671657949686, 0.009742816910147667, 0.0009998310124501586, -0.025372203439474106, 0.02372341975569725, 0.020466728135943413, -0.04755584895610809, 0.014198622666299343, -0.03837171196937561, -0.02704824134707451, -0.04240509867668152, -0.00012199812772450969, -0.011180393397808075, 0.033220961689949036, 0.007801066618412733, -0.008945677429437637, 0.005447120405733585, 0.03864423558115959, 0.0047896504402160645, 0.0024152647238224745, -0.006731400731950998, 0.004489871673285961, -0.04856419563293457, -0.015465870499610901, -0.0006898323190398514, -0.009831388480961323, 0.008809414692223072, 0.010683032684028149, 0.00500426534563303, -0.020207829773426056, -0.03932555392384529, 0.011262151412665844, 0.010137979872524738, -0.003968664910644293, -0.02807021513581276, -0.0005105611053295434, 0.0027508127968758345, 0.0035428425762802362, -0.02736164629459381, 0.00718788243830204, 0.0024237812031060457, 0.02959636226296425, 0.030713720247149467, -0.026557693257927895, -0.007221948355436325, -0.007385463919490576, 0.0543145015835762, -0.005855910014361143, 0.019362997263669968, 0.019553765654563904, 0.01655597612261772, -0.04758309945464134, -0.012243246659636497, -0.019867170602083206, 0.00445239944383502, -0.011507425457239151, 0.0031050972174853086, -0.0364367738366127, 0.0070379930548369884, -0.02554934471845627, -0.015997296199202538, -0.02845175191760063, 0.010301495902240276, 0.019349370151758194, -0.04483058676123619, -0.020207829773426056, 0.01845003478229046, -0.0004345517954789102, 0.013040386140346527, 0.0055663506500422955, 0.006932388991117477, 0.031204266473650932, -0.008434690535068512, -0.02103903517127037, 0.02529044635593891, -0.005644701886922121, 0.028124719858169556, -0.004241191316395998, -0.038862258195877075, 0.01794585958123207, -0.010424133390188217, -0.03025042451918125, -0.004588662646710873, 0.021938370540738106, 0.02079376019537449, 0.04145125672221184, -0.015424991957843304, -0.005157561041414738, -0.0009189248085021973, -0.02725263498723507, 0.02324649877846241, -0.014825433492660522, -0.019894422963261604, 0.029541855677962303, 0.02786581963300705, 0.003651853185147047, 0.020889144390821457, 0.0063668969087302685, 0.05308813229203224, 0.0104990778490901, 0.038317203521728516, -0.038562480360269547, -0.025712860748171806, -0.054123733192682266, -0.015016201883554459, 0.00028061697958037257, -0.021624965593218803, 0.0010330452350899577, 0.004466025624424219, 0.04344069957733154, -0.016160812228918076, -0.04632947966456413, -0.012529399245977402, -0.027688676491379738, -0.01885882392525673, 0.0005552724469453096, -0.03741787001490593, -0.008639085106551647, 0.002660538535565138, 0.016201691702008247, 0.02640780434012413, -0.00788282509893179, 0.0158065278083086, -0.03700907900929451, -0.0009325511055067182, -0.028588013723492622, -0.01808212324976921, -7.281563739525154e-05, -0.0037574570160359144, 0.010083475150167942, 0.008434690535068512, -0.009647432714700699, -0.012904122471809387, -0.0023164739832282066, -0.01974453404545784, 0.031449541449546814, 0.009109193459153175, 0.02559022419154644, 0.02406407706439495, 0.01004259567707777, 0.0027695491444319487, 0.0018668054835870862, -0.01089424081146717, -0.004380861297249794, 0.022946719080209732, 0.00797139573842287, 0.04254136234521866, 0.015097959898412228, -0.02263331413269043, -0.0012680991785600781, -0.006421402096748352, -0.00749447476118803, 0.0057196468114852905, -0.015125212259590626, -0.006373709999024868, -0.004970199428498745, -0.02172034978866577, 0.01357862539589405, -0.02024870738387108, 0.015329607762396336, 0.000634475436527282, 0.005143934860825539, -0.0012706541456282139, 0.021842986345291138, 0.00675524678081274, -0.009150072000920773, 0.0013277143007144332, -0.006097777280956507, -0.001305571524426341, 0.017686959356069565, -0.031449541449546814, 0.007385463919490576, -0.028969550505280495, -0.015193344093859196, -0.015125212259590626, -0.006452061235904694, -0.006881290581077337, 0.009892706759274006, -0.024145834147930145, 0.018191134557127953, 0.003447458380833268, -0.02613527700304985, 0.002405045088380575, 0.001712657744064927, -0.014294006861746311, 0.044367291033267975, -0.033766016364097595, 0.013040386140346527, 0.04859144985675812, -0.01190940197557211, -0.011739072389900684, 0.02286496013402939, 0.04305916279554367, -0.0019093877635896206, -0.004374047741293907, -0.008352932520210743, 0.012938188388943672, 0.03188558295369148, 0.020957276225090027, -0.018095750361680984, -0.02290583960711956, -0.0037540504708886147, -0.015125212259590626, -0.012740607373416424, 0.015343233942985535, -0.04030664637684822, -0.01658322848379612, -0.021297933533787727, -0.0007192140910774469, 0.01933574490249157, -0.00529382424429059, -0.011568743735551834, 0.0012757639633491635, 0.0005305747617967427, 0.0013719998532906175, -0.00615909555926919, 0.029269330203533173, 0.0007677578250877559, 0.026285165920853615, 0.02093002386391163, 0.010717098601162434, -0.020207829773426056, -0.0029279550071805716, 0.008734469301998615, -0.008877545595169067, 0.006090964190661907, 0.0020030688028782606, 0.010860174894332886, -0.000491399085149169, -0.027279887348413467, 0.0014213952235877514, -0.008502822369337082, 0.026516813784837723, 0.01262478344142437, 0.003365700365975499, 0.0030352622270584106, 0.01395334955304861, -0.06202699616551399, -0.006441841833293438, 0.03932555392384529, 0.0171964131295681, -0.014225875958800316, -0.033220961689949036, 0.04158752039074898, 0.016283448785543442, -0.020344091579318047, -0.02001706138253212, -0.00026422282098792493, 0.015561254695057869, 0.007324145641177893, -0.002779768779873848, 0.01910409703850746, -0.007712495978921652, -0.0009478807332925498, -0.013026759959757328, -0.012052478268742561, -0.009967651218175888, -0.00659173121675849, 0.011132701300084591, 0.019935302436351776, 0.029650866985321045, 0.029923394322395325, -0.01665136031806469, 0.008087219670414925, 0.008352932520210743, -0.003934598993510008, 0.026285165920853615, -0.001005792524665594, -0.007848759181797504, 0.009054687805473804, -0.007521727122366428, -0.012570277787744999, 0.00029275292763486505, 0.0015789495082572103, 0.007365024648606777, 0.04166927933692932, -0.017686959356069565, -0.0034185023978352547, 0.007712495978921652, -0.005985360126942396, -0.02629879303276539, -0.01678762398660183, -0.031585805118083954, 0.014130491763353348, -0.00020907880389131606, 0.00810765940696001, 0.019349370151758194, -0.010710285976529121, -0.018027618527412415, -0.010233364067971706, -0.0023318035528063774, 0.010049409233033657, -0.0015593616990372539, 0.021161671727895737, -0.011391601525247097, -0.004227565135806799, -0.00866633839905262, 0.005103055853396654, -0.024254845455288887, 0.016092680394649506, -0.0026980109978467226, 0.015888286754488945, -0.01145291980355978, 0.042977407574653625, 0.02470451407134533, -0.006431621965020895, -0.05464153364300728, 0.017455313354730606, 0.0029228450730443, -0.03657303750514984, -0.016542349010705948, -0.014961697161197662, 0.01146654598414898, -0.022578807547688484, 0.03305744752287865, -0.021093539893627167, -0.019485633820295334, 0.013919283635914326, 0.009497543796896935, 0.005334703251719475, -0.010015343315899372], "index": 25}, {"title": "Bill Johnson (center)", "text": "William Levi Johnson, Sr. (September 14, 1926 \u2013 January 7, 2011), known as Bill \"Tiger\" Johnson, was a professional football player and coach. He was born in Tyler, Texas, where he was raised by his single mother and five older siblings. Among his siblings was older brother Gilbert Johnson, who played quarterback at Southern Methodist University with the iconic running back Doak Walker.", "vector": [0.07187927514314651, -0.03665780648589134, -0.014136985875666142, -0.007833498530089855, -0.03672025352716446, 0.04143518581986427, 0.0021954872645437717, -0.0465872623026371, 0.01088961586356163, 0.0881161242723465, -0.06207471713423729, 0.0063581308349967, -0.022060254588723183, 0.044776227325201035, -0.02248178794980049, 0.054799359291791916, -0.04302764683961868, 0.04274662211537361, 0.04440153390169144, -0.028773566707968712, 0.04768012464046478, -0.007404158357530832, 0.02081126719713211, -0.004839829634875059, 0.05973286181688309, 0.011826357804238796, 0.018375739455223083, -0.003979198634624481, -0.013028508983552456, -0.07394010573625565, 0.003674757666885853, 0.012880191206932068, 0.03703249990940094, -0.000524477509316057, 0.02499537728726864, 0.003684515366330743, -0.04646236449480057, -0.019890137016773224, 0.017189200967550278, 0.030287964269518852, 0.013824738562107086, -0.024136697873473167, -0.04958483204245567, -0.04883544147014618, 0.04627501592040062, 0.024761192500591278, -0.07194172590970993, 0.009632822126150131, 0.0005493596545420587, -0.013504685834050179, 0.015760671347379684, -0.015401585958898067, 0.012591362930834293, 0.05873367190361023, 0.014246271923184395, -0.004718833602964878, 0.003508876310661435, 0.09092634171247482, -0.008883428759872913, 0.0008235516143031418, -0.04743032902479172, -0.003065875731408596, 0.02216954156756401, -0.00829015951603651, 0.06594657897949219, -0.001378765911795199, 0.001493907067924738, 0.0473678782582283, -0.011061351746320724, 0.05536140501499176, -0.002232566475868225, 0.002765337936580181, 0.03943680226802826, 0.0330045148730278, -0.023231182247400284, -0.014222853817045689, 0.014418007805943489, 0.01840696483850479, -0.014371170662343502, -0.020873716101050377, 0.017267262563109398, -0.03987395018339157, -0.007833498530089855, 0.028867240995168686, -0.010468082502484322, 0.00832919031381607, 0.03387880697846413, -0.07906095683574677, -0.04583786800503731, -0.011787327006459236, 0.06235573813319206, 0.0018959251465275884, -0.0018090814119204879, 0.014823929406702518, 0.08068463951349258, -0.016392970457673073, -0.007732017897069454, -0.028242746368050575, 0.019359318539500237, -0.01531571801751852, 0.02702498249709606, -0.0075563788414001465, -0.02295015938580036, -0.008485313504934311, 0.028430094942450523, -0.025135887786746025, -0.034222278743982315, 0.03734475001692772, 0.009383024647831917, 0.03653290495276451, 0.0013924267841503024, 0.01812594197690487, -0.02457384392619133, 0.0007293896051123738, -0.022700361907482147, 0.0054174866527318954, 0.003555713454261422, -0.013934025540947914, -0.023434141650795937, 0.006350324489176273, -0.03241124376654625, -0.06191859394311905, -0.019437380135059357, 0.012427433393895626, 0.010905228555202484, -0.04671216011047363, -0.004098242614418268, 0.014293109066784382, 0.011069158092141151, -0.008055973798036575, -0.024292821064591408, -0.01723603717982769, -0.01444142684340477, 0.0174702238291502, 0.005444807931780815, -0.03384758159518242, 0.025526197627186775, -0.045431949198246, 0.049709733575582504, 0.047149308025836945, 0.0017944448627531528, 0.009999711997807026, -0.00452367914840579, 0.05080259591341019, 0.0714421272277832, -0.04677461087703705, 0.0295073464512825, 0.011701459065079689, 0.018547475337982178, -0.03734475001692772, -0.016908178105950356, 0.026915697380900383, -0.009172257035970688, 0.00434804055839777, 0.015385974198579788, 0.018297677859663963, -0.046680934727191925, -0.005183301400393248, -0.008758530020713806, 0.005440905224531889, -0.02752457931637764, -0.002650196896865964, -0.018001042306423187, 0.011123801581561565, -0.014222853817045689, 0.005273072049021721, 0.01932809315621853, -0.011147219687700272, -0.005034984089434147, 0.01449606940150261, -0.013020702637732029, -0.030881233513355255, -0.006982624996453524, -0.009906037710607052, -0.04849196970462799, 0.009398636408150196, 0.015659190714359283, -0.014699030667543411, 0.010647624731063843, 0.035970862954854965, -0.013668615370988846, 0.020452182739973068, -0.005554094444960356, -0.010608593933284283, -0.0003359095426276326, -0.0043831681832671165, 0.028367646038532257, 0.015838732942938805, 0.01634613424539566, -0.011342374607920647, 0.02686885930597782, -0.01995258778333664, 0.02718110755085945, -0.015448423102498055, 0.030647048726677895, 0.006955303251743317, 0.0014177968259900808, -0.02185729518532753, -0.0061161392368376255, 0.00318882311694324, 0.07150457799434662, -0.007298775017261505, -0.013637389987707138, 0.020717592909932137, -0.0026326330844312906, -0.0008552641957066953, -0.01309876423329115, -0.01121747586876154, -0.030116228386759758, 0.02081126719713211, 0.023387305438518524, 0.01195906288921833, -0.013075346127152443, 0.005792182870209217, 7.915950845927e-05, 0.008009137585759163, 0.030506538227200508, 0.04006129875779152, 0.017595121636986732, 0.049366261810064316, 0.009312768466770649, 0.04137273505330086, -0.011201863177120686, 0.01867237500846386, 0.009000521153211594, -0.039655376225709915, -0.01793859340250492, -0.004332427866756916, -0.018453801050782204, -0.029241938143968582, -0.04218457639217377, 0.0481484979391098, -0.012841160409152508, 0.046837057918310165, -0.02721233107149601, 0.013012896291911602, 0.042715396732091904, -0.030225515365600586, -0.03887476027011871, -0.06607148051261902, 0.006955303251743317, 0.004320718813687563, 0.006479126401245594, -0.04596276581287384, 0.0021642623469233513, 0.014691224321722984, -0.07350295782089233, -0.04611889272928238, -0.044276632368564606, 0.010959872044622898, -0.018625536933541298, -0.04749277979135513, -0.009625015780329704, -0.0562981441617012, 0.01611194759607315, -0.013379786163568497, -0.016486644744873047, 0.024776805192232132, 0.043308667838573456, -0.055298954248428345, -0.02279403619468212, 0.030287964269518852, -0.01914074458181858, 0.005901469383388758, -0.009250319562852383, -0.03490922227501869, -0.03465942293405533, 0.0613253228366375, 0.05739101022481918, -0.014058924280107021, -0.03768822178244591, 0.0033195766154676676, -0.009273737668991089, 0.005093530286103487, 0.0014763431390747428, -0.017673183232545853, -0.05907714366912842, -0.037438422441482544, -0.005573609843850136, 0.05536140501499176, 0.01556551642715931, 0.04633746296167374, 0.04040477052330971, -0.035346366465091705, 0.04405806213617325, 0.008040362037718296, -0.03618943318724632, 0.03987395018339157, 0.03784434497356415, -0.03987395018339157, -0.01207615528255701, 0.041091714054346085, 0.011201863177120686, -0.014277497306466103, 0.029101425781846046, 0.0043831681832671165, -0.018812885507941246, -0.05158321559429169, 0.012700648978352547, 0.0005108166951686144, 0.04243437573313713, 0.021029839292168617, -0.03141205385327339, -0.0512397438287735, -0.020311672240495682, -0.01316121406853199, 0.0029643955640494823, -0.014347752556204796, -0.007899850606918335, 0.00044836726738139987, -0.06644617766141891, -0.012646006420254707, 0.055298954248428345, 0.03381635621190071, 0.024167923256754875, -0.0014236514689400792, 0.03005377948284149, 0.035034120082855225, 0.0054174866527318954, -0.02690008468925953, 0.0046563842333853245, 0.024511395022273064, -0.015073726885020733, -0.030568987131118774, 0.04789869859814644, -0.03746964782476425, -0.007653956301510334, -0.0007362200412899256, 0.002462848788127303, 0.012286921963095665, -0.017407773062586784, 0.0013621777761727571, -0.040592119097709656, -0.003442523768171668, 0.011982480995357037, -0.012357177212834358, -0.07462704926729202, 0.006100527010858059, -0.0686943531036377, -0.011701459065079689, -0.023824451491236687, 0.0018832400674000382, 0.013457848690450191, 0.02352781593799591, -0.001623684773221612, -0.02491731569170952, 0.03634555637836456, 0.041872330009937286, -0.016908178105950356, -0.002453091088682413, 0.0008206242928281426, 0.028789179399609566, -0.005261362995952368, -0.008860010653734207, 0.04511969909071922, -0.017907369881868362, -0.05773448199033737, -0.01778247021138668, 0.022684749215841293, 0.0017105283914133906, -0.009023940190672874, 0.0102885402739048, 0.0011192106176167727, 0.07550133764743805, -0.04290274530649185, 0.017907369881868362, 0.062324512749910355, -0.016627155244350433, -0.01597924344241619, 0.024292821064591408, -0.012060542590916157, 0.02744651585817337, 0.05058402568101883, 0.019515441730618477, 0.025292012840509415, 0.002745822537690401, 0.007251937873661518, -0.017282875254750252, 0.02170117013156414, 0.007763242349028587, -0.021576272323727608, -0.00908638909459114, 0.02368393912911415, -0.012927028350532055, -0.01590118184685707, -0.026697123423218727, -0.014027698896825314, -0.025245174765586853, -0.06419799476861954, 0.012895803898572922, 0.08055974543094635, 0.04752400144934654, 0.006689893081784248, -0.03266104310750961, 0.025338849052786827, -0.001320219598710537, 0.0003932361432816833, 0.026681510731577873, 0.022653523832559586, 0.02449578233063221, 0.019421767443418503, -0.067570261657238, -0.015526484698057175, -0.06582167744636536, -0.027430905029177666, -0.020951777696609497, 0.015425004996359348, 0.027071820572018623, 0.015924600884318352, -0.0017319953767582774, 0.03186481446027756, 0.01181855145841837, -0.04646236449480057, -0.014800510369241238, 0.0034073961433023214, -0.03188042342662811, -0.037407197058200836, -0.007993524894118309, 0.0174702238291502, 0.00011721462215064093, -0.012482075951993465, -0.010046549141407013, 0.016517870128154755, -0.020358508452773094, 0.01723603717982769, 0.024823641404509544, 0.03831271454691887, -0.00157489615958184, -0.01614317297935486, -0.021404536440968513, -0.045244600623846054, 0.00881317351013422, -0.01987452618777752, 0.0756886899471283, -0.0162992961704731, -0.02379322610795498, 0.021482598036527634, 0.016205621883273125, 0.031084194779396057, 0.006451805122196674, -0.007665665354579687, 0.0384376123547554, -0.0043909745290875435, 0.014121373184025288, -0.037906792014837265, -0.05564242601394653, -0.02981959469616413, -0.00039030882180668414, 0.03968660160899162, 0.0068225981667637825, -0.03834393993020058, -0.001300704199820757, -0.00035249764914624393, -0.01720481365919113, -0.01389499381184578, -0.013543716631829739, 0.03712617605924606, -0.01658031903207302, -0.0531756728887558, 0.03531514108181, 0.015893375501036644, -0.013348561711609364, 0.03856251388788223, -0.011350180953741074, -0.061013076454401016, 0.0026423907838761806, 0.010007518343627453, 0.013481266796588898, -0.03993640094995499, -0.02112351357936859, 0.035471267998218536, -0.01253671944141388, 0.003944070544093847, 0.013301724568009377, -0.032161448150873184, -0.007146554533392191, 0.023746389895677567, 0.04040477052330971, 0.036314334720373154, 0.03253614529967308, 0.06226206570863724, 0.00021088874200358987, 0.005663380958139896, -0.01455851923674345, 0.04199723154306412, -0.0349404476583004, 0.014566325582563877, -0.013223662972450256, 0.011194056831300259, 0.0011640960583463311, 0.03737597167491913, 0.04608766734600067, -0.021763620898127556, -0.024636292830109596, -0.012286921963095665, 0.07593848556280136, -0.017688795924186707, 0.009398636408150196, -0.0011045739520341158, 0.009164451621472836, 0.01789175719022751, 0.02227882854640484, 0.035502489656209946, 0.0019017797894775867, -0.016096336767077446, -0.009258124977350235, 0.046025216579437256, 0.052270159125328064, 0.016205621883273125, -0.012880191206932068, 0.00046934635611250997, 0.002310628304257989, -0.024043023586273193, -0.020358508452773094, -0.01199809368699789, -0.024121085181832314, 0.019156357273459435, -0.018703598529100418, 0.037594545632600784, 0.05567365139722824, -0.024292821064591408, 0.019093908369541168, 0.0322238951921463, 0.045712970197200775, 0.0663837268948555, -0.003606453537940979, -0.005304296966642141, 0.0021135222632437944, 0.0008318456821143627, -0.002417963230982423, 0.0007869601831771433, 0.0018149360548704863, 0.03063143603503704, -0.000141243013786152, -0.044745005667209625, 0.0333792120218277, -0.00622932892292738, -0.0205770805478096, -0.005963918752968311, -0.017485834658145905, 0.04989708214998245, -0.04886666685342789, 0.010413439944386482, 7.37927621230483e-05, -0.011225282214581966, -0.0034932640846818686, -0.048273395746946335, -0.01681450381875038, 0.02384006232023239, -0.025682320818305016, 0.03250491991639137, -0.01637735776603222, 0.011576559394598007, -0.0019310528878122568, 0.017985431477427483, -0.00690846610814333, -0.058171626180410385, -0.006362034007906914, -0.00818867888301611, -0.0023477075155824423, -0.0007854964933358133, -0.04583786800503731, -0.03906210884451866, 0.008883428759872913, -0.001251915586180985, 0.0075485724955797195, -0.036439232528209686, 0.019359318539500237, -0.03403493016958237, 0.020904941484332085, -0.007048977538943291, -0.017766857519745827, 0.019047070294618607, -0.005948306526988745, 0.042715396732091904, -0.014324333518743515, 0.008618018589913845, 0.02643171325325966, 0.014987858943641186, 0.007048977538943291, -0.000664012914057821, -0.008243322372436523, 0.015838732942938805, 0.01801665499806404, -0.0349404476583004, 0.004000665619969368, -0.00754076661542058, -0.019109521061182022, 0.044432755559682846, -0.047024406492710114, 0.02329363115131855, -0.03419105336070061, 0.030459700152277946, 0.03269226849079132, 0.06500983983278275, -0.012294728308916092, 0.02783682569861412, 0.056391820311546326, -0.0012636248720809817, -0.013208050280809402, 0.04240315034985542, 0.021763620898127556, 0.032005324959754944, 0.008711692877113819, 0.004519776441156864, -0.03593963757157326, 0.006022465415298939, -0.02869550511240959, 0.006443998776376247, -0.009039552882313728, -0.02647855132818222, -0.01253671944141388, 0.04911646246910095, 0.0192188061773777, 0.013411011546850204, 0.0016031934646889567, -0.010226091369986534, -0.0211547389626503, 0.01906268298625946, -0.0007220713305287063, 0.008883428759872913, 0.018219616264104843, 0.0022189056035131216, -0.015222044661641121, -0.0005161834415048361, 0.02391812577843666, 0.008664855733513832, -0.030600212514400482, -0.01201370544731617, 0.03478432446718216, -0.003729400923475623, 0.00013172923354431987, -0.047929923981428146, -0.001975938444957137, -0.007357321213930845, 0.0004947164561599493, 0.038031693547964096, -0.032785940915346146, 0.052238933742046356, 0.01572163961827755, 0.05632936954498291, 0.024058636277914047, 0.028789179399609566, 0.00037567224353551865, -0.015737252309918404, -0.027618251740932465, 0.02452700585126877, -0.008899041451513767, 0.0003481066960375756, 0.020015036687254906, 0.002802417380735278, -0.020936165004968643, 0.053050775080919266, -0.01715797558426857, -0.03425350412726402, -0.0039694407023489475, -0.030256740748882294, 0.017376549541950226, 0.013543716631829739, 0.004063114989548922, 0.016236847266554832, -0.013504685834050179, 0.002398447832092643, -0.011943450197577477, 0.016986239701509476, -0.011834163218736649, 0.029835207387804985, 0.025245174765586853, -0.004781282972544432, -0.03133399412035942, -0.004492454696446657, 0.011841969564557076, -0.01668960601091385, -0.001271430985070765, 0.012138604186475277, 0.0089302659034729, -0.05726611241698265, -0.01825084164738655, 0.0051442701369524, 0.005058402195572853, -0.013699839822947979, 0.004273881670087576, -0.02480802871286869, -0.015292299911379814, 0.027227943763136864, -0.010101192630827427, -0.0018783612176775932, -0.0174702238291502, -0.010725686326622963, 0.04102926328778267, -0.01259916927665472, 0.05732855945825577, 0.028367646038532257, 0.01668960601091385, -0.01859431341290474, 0.036283109337091446, 0.02243495173752308, -0.04574419558048248, -0.03016306646168232, -0.04102926328778267, -0.007993524894118309, 0.03447207435965538, 0.01804788038134575, 0.014925409108400345, -0.01133456826210022, -0.0030814881902188063, -0.020436570048332214, -0.0640731006860733, 0.04639991372823715, -0.029991330578923225, -0.015682607889175415, 0.008524345234036446, -0.02418353408575058, 0.0021291347220540047, -0.038843534886837006, -0.020826879888772964, 0.003981150221079588, -0.015456229448318481, -0.03303574025630951, -0.012146410532295704, -0.006213716696947813, 0.04318377003073692, 0.03703249990940094, 0.0027789988089352846, 0.01692379079759121, 0.022466175258159637, -0.014784898608922958, 0.03250491991639137, 0.01073349267244339, -0.012778710573911667, 0.004508066922426224, 0.007029462140053511, 0.03856251388788223, -0.006049786694347858, 0.06632127612829208, -0.0013709597988054156, -0.02298138290643692, 0.01339539885520935, 0.006010755896568298, -0.014160403981804848, 0.009804558008909225, -0.023621490225195885, 0.012583556585013866, -0.021576272323727608, -0.03800046816468239, 0.017876144498586655, -0.002146698534488678, 0.012333759106695652, 0.004816411063075066, -0.06357350200414658, 0.031974099576473236, 0.00014356046449393034, -0.026416100561618805, -0.026915697380900383, 0.030147453770041466, -0.0004154349444434047, -0.015393780544400215, -0.033785130828619, 0.0029936686623841524, -0.02953857183456421, -0.02279403619468212, 0.0063073905184865, -0.009109808132052422, -0.002080345991998911, 0.006986528169363737, -0.006682087201625109, -0.005530675873160362, -0.015908988192677498, 0.0137779014185071, -0.0102885402739048, -0.0016851583495736122, 0.006428386550396681, -0.00968746468424797, -0.0020530244801193476, -0.019749626517295837, -0.004035793244838715, 0.021732395514845848, 0.026837635785341263, -0.03712617605924606, 0.014839541167020798, -0.046056441962718964, -0.008860010653734207, -0.01279432326555252, -0.007404158357530832, -0.020483408123254776, -0.01836012676358223, 0.03228634595870972, 0.03105296939611435, -0.0075212512165308, 0.012029318138957024, 0.021904131397604942, 0.02627559006214142, 0.0044104899279773235, 0.027774376794695854, 0.014371170662343502, 0.01395744364708662, -0.0034581362269818783, -0.024214759469032288, -0.004691512323915958, -0.029913268983364105, 0.004992050118744373, -0.002359416801482439, 0.005585319362580776, -0.040435995906591415, 0.012208860367536545, -0.008610213175415993, -0.01720481365919113, -0.00900832749903202, 0.00252334657125175, 0.0017388258129358292, 0.004176304675638676, -0.004059211816638708, 0.034846771508455276, -0.012107379734516144, 0.004160691983997822, 0.03465942293405533, 0.0014070633333176374, 0.01147507969290018, -0.03447207435965538, -0.001024560653604567, -0.04643113911151886, 0.03544004261493683, 0.001523180166259408, -0.01141262985765934, 0.014293109066784382, 0.0019749626517295837, -0.018656762316823006, 0.008594600483775139, -0.00033322616945952177, -0.010304152965545654, -0.004094339441508055, 0.008024749346077442, -0.014300915412604809, -0.03447207435965538, -0.0152376564219594, 0.020483408123254776, -0.0024804126005619764, -0.0043909745290875435, 0.017142362892627716, 0.01661154441535473, 0.03634555637836456, -0.015620158985257149, -0.017595121636986732, 0.014628774486482143, 0.007103620562702417, 0.016392970457673073, 0.02379322610795498, -0.028398869559168816, 0.008500926196575165, -0.014628774486482143, -0.020389733836054802, 0.031115420162677765, 0.00036249932600185275, 0.014012087136507034, -0.021810457110404968, 0.01925003156065941, 0.010405633598566055, 0.042340703308582306, -0.04177865758538246, 0.024464556947350502, 0.012232278473675251, 0.02457384392619133, 0.023777613416314125, 0.009437667205929756, 0.027571415528655052, -0.035190243273973465, -0.0003381050191819668, -0.015417198650538921, 0.033285535871982574, -0.038406386971473694, 0.009788945317268372, 0.01139701809734106, 0.017407773062586784, 0.014527294784784317, -0.031146643683314323, 0.06819476187229156, -0.03447207435965538, -0.027149882167577744, 0.027274779975414276, -0.01189661305397749, -0.0050466931425035, -0.032473694533109665, -0.03178675100207329, -0.005534579046070576, -0.007439286448061466, 0.02752457931637764, -0.017954206094145775, -0.019203193485736847, -0.0018081056186929345, -0.007271453272551298, -0.012474270537495613, -0.022575462237000465, 0.007314387243241072, -0.020202385261654854, -0.020436570048332214, 0.017829306423664093, -0.026181915774941444, -0.0360957607626915, -0.022185154259204865, 0.012778710573911667, 0.011240893974900246, 0.016830116510391235, -0.016002662479877472, -0.016018275171518326, 0.06301146000623703, -0.002890236908569932, -0.014371170662343502, 0.005924887955188751, 0.02713426947593689, -0.008376027457416058, 0.02530762366950512, 0.024433333426713943, 0.026837635785341263, 0.0031458891462534666, 0.009367411956191063, 0.05717243626713753, -0.047805026173591614, 0.026369264349341393, -0.0009006375912576914, 0.03089684620499611, 0.0061902981251478195, 0.028929689899086952, -0.008009137585759163, 0.04905401170253754, 0.005917081609368324, 0.006826501339673996, -0.0025311526842415333, -0.0007986694108694792, -0.0005093530053272843, 0.03637678176164627, -0.02977275662124157, 0.0026326330844312906, -0.004832023289054632, 0.002958540804684162, 0.0137779014185071, -0.02060830593109131, 0.03384758159518242, 0.03475309908390045, -0.005222332198172808, -0.008922459557652473, 0.023652715608477592, 0.021763620898127556, -0.02650977484881878, 0.02512027695775032, -0.02465190552175045, 0.02833642065525055, 0.011428242549300194, -0.008899041451513767, -0.04749277979135513, 0.03141205385327339, 0.0500844269990921, 0.006611831486225128, 0.012927028350532055, -0.02752457931637764, 0.01642419584095478, 0.03005377948284149, -0.003846493549644947, 0.01249768864363432, 0.016002662479877472, -0.023621490225195885, -0.015830926597118378, 0.017173588275909424, -0.03668902814388275, 0.013723257929086685, -0.037750668823719025, 0.020155547186732292, -0.006112236063927412, -0.043808262795209885, 0.011069158092141151, -0.04021742194890976, -0.01867237500846386, 0.03606453537940979, -0.044620104134082794, 0.014613162726163864, 0.012544525787234306, 0.04096681624650955, -0.011389211751520634, -0.02838325873017311, -0.008938072249293327, 0.032785940915346146, 0.016314908862113953, 0.023121895268559456, -0.015729445964097977, -0.004297300241887569, 0.03890598565340042, 0.025885282084345818, -0.04196600615978241, 0.07718747109174728, 0.021342087537050247, 0.0007503686938434839, -0.06001388654112816, 0.008282353170216084, 0.00439487723633647, -0.07462704926729202, 0.018469413742423058, -0.0004617841332219541, -0.006369839888066053, 0.012146410532295704, -0.012544525787234306, 0.00881317351013422, -0.011881000362336636, 0.028679892420768738, -0.023043833673000336, 0.012450851500034332, -0.04358968883752823, 0.021404536440968513, -0.009913844056427479, 0.0030814881902188063, 0.00817306712269783, -0.009422055445611477, 0.0062371352687478065, -0.02794611267745495, -0.014901991002261639, -0.04624379053711891, -0.0023516106884926558, -0.07206661999225616, 0.01203712448477745, 0.02686885930597782, 0.03515901789069176, 0.034877996891736984, 0.03109980747103691, 0.005479936022311449, -0.008266741409897804, 0.002792659681290388, -0.00881317351013422, 0.006725021172314882, -0.011553141288459301, -0.01611194759607315, 0.030756335705518723, -0.007525154389441013, -0.029413674026727676, 0.005557997617870569, 0.0029117038939148188, 0.02635365165770054, -0.02274719811975956, -0.011365792714059353, 0.02616630308330059, 0.03618943318724632, 0.0178605318069458, 0.04871053993701935, 0.04327744245529175, -0.0010460276389494538, -0.011756101623177528, -0.019499829038977623, -0.04243437573313713, 0.0047305431216955185, 0.0012099574087187648, 0.023512203246355057, -0.01968717761337757, 0.01279432326555252, 0.015807507559657097, 0.0005225259228609502, 0.00767737440764904, 0.036002084612846375, -0.030912458896636963, -0.004746155347675085, -0.01385596301406622, -0.001081155496649444, 0.0030678273178637028, 0.00968746468424797, 0.04608766734600067, -0.03350410982966423, -6.720630335621536e-05, -0.00929715670645237, 0.013535910286009312, -0.025729157030582428, -0.0007957421476021409, 0.0376569963991642, -0.034690648317337036, 0.000722559227142483, -0.025135887786746025, 0.002486267127096653, 0.01193564385175705, -0.027977336198091507, -0.009406442753970623, 0.011881000362336636, -0.00441439263522625, 0.009781138971447945, -0.01075691170990467, -0.0016090481076389551, 0.001232400070875883, 0.002041315194219351, 0.008984909392893314, 0.03381635621190071, -0.02224760316312313, 0.010819360613822937, -0.009000521153211594, -0.0022501302883028984, 0.041747432202100754, -0.021107900887727737, 0.0021545046474784613, -0.006276166066527367, 0.003731352277100086, -0.007084105163812637, -0.006092720665037632, -0.027493353933095932, -0.0004856905434280634, 0.04905401170253754, -0.01778247021138668, -0.005952209699898958, 0.006221522577106953, -0.03800046816468239, 0.0038055111654102802, -0.004059211816638708, 0.030022554099559784, -0.028117848560214043, -0.02888285368680954, 0.01137359905987978, 0.016314908862113953, -0.014472651295363903, -0.026384877040982246, 0.05005320534110069, -0.013504685834050179, 0.01812594197690487, -0.028601830825209618, 0.007228519301861525, -0.028742341324687004, 0.004679802805185318, -0.007119232788681984, 0.003908942919224501, 0.038031693547964096, -0.0211547389626503, 0.024745579808950424, -0.01750144734978676, 0.019968200474977493, 0.027649477124214172, -0.02081126719713211, 0.01645541936159134, 0.03350410982966423, 0.015440616756677628, -0.037906792014837265, -0.007271453272551298, -0.04558807238936424, 0.007665665354579687, 0.004262172617018223, 0.003596695838496089, -0.008524345234036446, 0.013653002679347992, 0.002940976992249489, -0.007571991067379713, -0.008235516026616096, 0.014238465577363968, -0.020467795431613922, 0.015815313905477524, 0.038031693547964096, -0.029679082334041595, -0.01840696483850479, -0.006584509741514921, 0.00025272497441619635, -0.006205910351127386, -0.020904941484332085, -0.040123745799064636, -0.012981671839952469, 0.037094950675964355, -0.017532672733068466, 0.03800046816468239, -0.007829595357179642, 0.022887710481882095, -0.01948421634733677, -0.04127906262874603, 0.0037957532331347466, -0.0020374120213091373, -0.014917603693902493, 0.011576559394598007, -0.0015358652453869581, 0.02177923172712326, -0.01956227794289589, -0.04721175506711006, 0.006030271295458078, 0.007490026298910379, -0.0013826689682900906, 0.015948018059134483, 0.01968717761337757, 0.010834973305463791, 0.0035693743266165257, -0.017282875254750252, -0.022778423503041267, 0.015807507559657097, -0.018500639125704765, -0.021638721227645874, -0.04049844294786453, -0.03659535571932793, 0.020873716101050377, 0.010452470742166042, -0.0007767145871184766, -0.007154360879212618, 0.00013002162449993193, -0.017033077776432037, -0.007564185187220573, -0.033722683787345886, -0.02825835905969143, 0.00031200313242152333, -0.007985718548297882, 0.015284493565559387, -0.007415867876261473, -0.0011240894673392177, 0.0019476410234346986, 0.024698741734027863, 0.0071699731051921844, -0.015651384368538857, 0.011482886038720608, 0.006982624996453524, 0.018157167360186577, 0.0035635195672512054, 0.004301203414797783, -0.044620104134082794, 0.009484504349529743, -0.005292587913572788, -0.007755436468869448, -0.0008172091329470277, 0.019031457602977753, -0.010717879980802536, -0.025292012840509415, 0.04199723154306412, -0.01976523920893669, -0.019671564921736717, 0.025338849052786827, -0.016439808532595634, -0.008087199181318283, 0.04661848768591881, -0.019421767443418503, -0.028586218133568764, 0.001630515092983842, 0.0004425126244314015, 0.0004778843722306192, 0.005920984782278538, -0.022138316184282303, -0.0493038110435009, -0.002646293956786394, -0.02778998762369156, 0.004102145787328482, -0.01987452618777752, -0.008454089052975178, -0.0043909745290875435, 0.005335521884262562, -0.021482598036527634, -0.006459611002355814, 0.008508732542395592, -0.006276166066527367, 0.007240228820592165, 0.04374581202864647, 0.01579970121383667, 0.0020354604348540306, -0.004742252174764872, -0.004613450262695551, 0.025010989978909492, 0.0295073464512825, -0.0009879692224785686, 0.007970105856657028, -0.017673183232545853, 0.00817306712269783, 0.023356080055236816, -0.01832890324294567, -0.0225130133330822, 0.007771048694849014, 0.021794844418764114, 9.16615899768658e-05, 0.047305431216955185, -0.00945327989757061, -0.021529434248805046, -0.03412860259413719, 0.004418295808136463, -0.004203625954687595, 0.0030307481065392494, 0.02344975434243679, -0.0034347176551818848, 0.006756245624274015, -0.0001247768523171544, -0.02274719811975956, -0.022606687620282173, -0.009445473551750183, -0.000857215782161802, -0.0019915509037673473, -0.023434141650795937, 0.004320718813687563, -0.012232278473675251, -0.012739679776132107, -0.001518301316536963, -0.016627155244350433, 0.04643113911151886, -0.01193564385175705, -0.0098982322961092, -0.03721984848380089, 0.012286921963095665, 0.030490925535559654, -0.0089302659034729, 0.005058402195572853, -0.02551058493554592, -0.0015602594939991832, -0.00637764623388648, -0.006514254491776228, -0.012325952760875225, -0.03194287419319153, -0.014410201460123062, -0.013738870620727539, 0.014847347512841225, -0.004882763605564833, -0.005472129676491022, 0.04355846345424652, 0.004660287406295538, -0.002224760362878442, 0.035845961421728134, -0.0014168210327625275, -0.015651384368538857, 0.008493119850754738, -0.06582167744636536, 0.0038074625190347433, -0.009500117041170597, -0.002453091088682413, 0.005597028415650129, -0.002289161318913102, -0.005319909192621708, -0.019312480464577675, 0.0021427953615784645, 0.05183301120996475, 0.03993640094995499, 0.001383644761517644, -0.010788136161863804, -0.020124323666095734, 0.013629584573209286, -0.009141032584011555, 0.021420149132609367, -0.024433333426713943, -0.0058507295325398445, -0.047180529683828354, 0.01723603717982769, -0.011162832379341125, -1.1419582733651623e-05, -0.02216954156756401, 0.0036591452080756426, 0.0037352554500102997, 0.018766049295663834, -0.02337169274687767, -0.01875043660402298, -0.040154971182346344, -0.027868051081895828, 0.010858391411602497, 0.003987004514783621, 0.047929923981428146, -0.013988668099045753, 0.013738870620727539, 0.001706625334918499, 2.4394300908170408e-06, 0.019125131890177727, -0.038062915205955505, -0.010343183763325214, 0.004789089318364859, -0.002870721509680152, 0.004098242614418268, -0.0024882187135517597, 0.007517348043620586, -0.01971840113401413, 0.0026814215816557407, -0.021529434248805046, -0.007048977538943291, -0.009367411956191063, -0.02922632545232773, 0.022840872406959534, -0.008633631281554699, 0.006381549406796694, 0.01117844507098198, 0.009788945317268372, -0.00564776873216033, -0.035471267998218536, 0.019093908369541168, 0.027321618050336838, 0.014667805284261703, -0.02065514400601387, -0.010116804391145706, 0.039155781269073486, 0.01500347163528204, -0.023480979725718498, 0.013153407722711563, 0.01723603717982769, 0.026369264349341393, -0.014222853817045689, -0.0057297335006296635, 0.015112757682800293, -0.008454089052975178, 0.038031693547964096, 0.041091714054346085, 0.01587776280939579, 0.020015036687254906, -0.029257548972964287, 0.004886666312813759, -0.021997805684804916, 0.004746155347675085, -0.0021291347220540047, 0.005901469383388758, -0.002068636706098914, -0.034565750509500504, -0.01856308802962303, -0.008141841739416122, -0.031006133183836937, 0.013411011546850204, 0.02729039266705513, -0.016798891127109528, 0.020249221473932266, -0.013504685834050179, -0.03109980747103691, -0.009172257035970688, 0.04118538647890091, 0.025213949382305145, 0.004496357869356871, -0.05198913440108299, 0.02324679307639599, 0.014792704954743385, 0.061512671411037445, 0.00688895070925355, 0.013442235998809338, -0.0018227421678602695, 0.010842779651284218, -0.011631202884018421, -0.0027789988089352846, 0.027399679645895958, 0.009031746536493301, 0.020561469718813896, 0.03063143603503704, -0.009906037710607052, 0.04983463138341904, -0.030928071588277817, 0.0019076344324275851, -0.016236847266554832, -0.007205100730061531, 0.00018137163715437055, -0.020483408123254776, 0.006412773858755827, -0.017563898116350174, -0.02279403619468212, -0.009859200567007065, 0.007993524894118309, 0.01339539885520935, -0.0026931308675557375, 0.010358796454966068, 0.024089861661195755, 0.01622123457491398, -0.006678184028714895, -0.014589743688702583, 0.022107092663645744, -0.0022950158454477787, 0.0011211620876565576, -0.023199956864118576, 0.04671216011047363, 0.04321499168872833, -0.0229033213108778, -0.0015300106024369597, 0.007177779451012611, -0.005928791128098965, 0.0025370074436068535, 0.008500926196575165, 0.027758764103055, -0.002222808776423335, 0.02127963677048683, 0.01707991398870945, 0.035346366465091705, 0.015393780544400215, 0.025963343679904938, 0.00016478350153192878, 0.03175552561879158, -7.922049553599209e-05, -0.06938129663467407, -0.030803171917796135, -0.0007967178826220334, -0.0009030770743265748, -0.02010871097445488, 0.015503066591918468, 0.0025389590300619602, -0.0019320286810398102, 0.02674396149814129, 0.026541000232100487, -0.03105296939611435, -0.01177952066063881, -0.007232422474771738, 0.03409738093614578, 0.001816887641325593, 0.0087351119145751, 0.019936975091695786, -0.020061872899532318, 0.013715452514588833, 0.0022208571899682283, 0.026619061827659607, 0.04664970934391022, 0.01914074458181858, 0.012778710573911667, -0.017360936850309372, 0.01968717761337757, 0.006709408946335316, 0.023824451491236687, 0.03768822178244591, -0.02733723074197769, 0.008571181446313858, 0.01351249124854803, -0.02760264091193676, -0.0014607307966798544, -0.019858913496136665, 0.008547763340175152, 0.010077773593366146, -0.018969008699059486, -0.00028907248633913696, -0.001503664767369628, 0.006151267327368259, 0.02721233107149601, -0.0017934690695255995, -0.017064301297068596, 0.008984909392893314, -0.009679659269750118, -0.04180988296866417, -0.010764717124402523, -0.01329391822218895, -0.03186481446027756, 0.012646006420254707, 0.010608593933284283, -0.018001042306423187, -0.03384758159518242, -0.012083961628377438, 0.0007230471237562597, 0.012872384861111641, -0.0165022574365139, 0.0022462273482233286, 0.007895947434008121, 0.01259916927665472, -0.0068967570550739765, 0.029054589569568634, -0.01878166012465954, 0.01463658083230257, -0.028430094942450523, 0.038843534886837006, 0.010483695194125175, -0.042996421456336975, -0.010952065698802471, 0.002675567055121064, -0.03105296939611435, 0.007275356445461512, -0.02073320560157299, -0.019905749708414078, 0.009070777334272861], "index": 26}, {"title": "Eumetcast", "text": "EUMETCast is a scheme for dissemination of various (mainly satellite based) meteorological data operated by EUMETSAT, the European Organisation for the Exploitation of Meteorological Satellites. The main purpose is the dissemination of EUMETSAT's own data, but various data from other providers are broadcast as well.EUMETCast is a contribution to GEONETCast and IGDDS (WMO's Integrated Global Data Dissemination Service) and provides data for GEOSS and GMES.", "vector": [-0.05129781365394592, 0.025064459070563316, -0.029005305841565132, -0.0011000141967087984, -0.024079246446490288, -0.009493101388216019, -0.060916151851415634, 0.02346140146255493, -0.04485218971967697, -0.020505767315626144, 0.02048906870186329, -0.05527205765247345, -0.029756739735603333, -0.023745276033878326, 0.020205194130539894, -0.03523384779691696, 0.0059154462069272995, -0.013283662497997284, 0.019303474575281143, 0.060648977756500244, 0.023711880668997765, -0.04271478205919266, 0.03967565298080444, 0.004817519336938858, 0.00010325678158551455, 0.002686372259631753, 0.02139078825712204, -0.006583386566489935, -0.0032562087289988995, 0.021490978077054024, 0.013074930757284164, 0.001496603712439537, -0.019103091210126877, -0.03720427304506302, -0.048692844808101654, -0.028086887672543526, 0.03977584466338158, 0.018418453633785248, -0.018952805548906326, -0.0679963231086731, -0.010929172858595848, 0.014444208703935146, 0.012164861895143986, 0.04368329420685768, -0.0413455031812191, 0.03149338439106941, -0.04652203992009163, -0.0632205456495285, 0.044418029487133026, -0.020288685336709023, 0.00888360571116209, -0.04595429077744484, -0.021223802119493484, -0.00997735746204853, -0.05039609223604202, 0.04298195615410805, 0.07173678278923035, 0.04508597031235695, -0.030023915693163872, -0.03947526961565018, 0.03513365983963013, -0.01833496056497097, 0.007042595185339451, 0.006236892193555832, -0.04184645786881447, 0.002087313449010253, -0.01620590128004551, -0.01213146559894085, -0.012649118900299072, -0.004220547620207071, 0.0314599871635437, -0.01249048300087452, 0.0074851056560873985, -0.019036298617720604, 0.0146028446033597, 0.004817519336938858, 0.010611901059746742, -0.0024797283113002777, 0.035100262612104416, -0.01893610693514347, -0.013884808868169785, -0.009952310472726822, 0.03747145086526871, 0.04471860080957413, 0.0022856080904603004, -0.013509091921150684, -0.0640888661146164, -0.05239991471171379, 0.0031831529922783375, -0.00708434171974659, -0.009376212023198605, 0.03259548544883728, -0.007589471526443958, -0.018017688766121864, -0.03267897665500641, 0.04021000489592552, 0.012715913355350494, 0.0002249080134788528, -0.05143140256404877, 0.05914610996842384, -0.013417250476777554, -0.03483308479189873, 0.023294417187571526, -0.06555833667516708, -0.00888360571116209, 0.032127927988767624, 0.025632208213210106, 0.008102950640022755, 0.02255968190729618, 0.06295336782932281, 0.003005731152370572, 0.03950866684317589, 0.008036156184971333, -0.0062535908073186874, -0.016155805438756943, -0.020722847431898117, 0.006767069920897484, -0.019403664395213127, 0.02112361043691635, 0.017984291538596153, -0.03177725896239281, -0.011096158064901829, -0.0317605584859848, 0.05907931923866272, -0.006061558146029711, 0.037972405552864075, -0.038840726017951965, 0.015279133804142475, 0.04421764612197876, -0.03874053433537483, -0.0380392000079155, 0.002730205887928605, -0.013801315799355507, -0.017366446554660797, 0.00039737229235470295, 0.03166037052869797, -0.04331592842936516, 0.06986655294895172, 0.029172291979193687, -0.06676062941551208, 0.00268845958635211, -0.00641222670674324, 0.019754333421587944, 0.02252628654241562, -0.03807259723544121, -0.05199915170669556, 0.05754305422306061, 0.021106911823153496, -0.0317605584859848, -0.05179876834154129, 0.02561550959944725, -0.0019537252373993397, 0.0029326751828193665, -0.03274577111005783, 0.02354489453136921, -0.01442751009017229, 0.015312531031668186, -0.004537819419056177, -0.04107832536101341, 0.05463751405477524, 0.0011699391761794686, -0.02705158106982708, -0.014293922111392021, -0.012615721672773361, 0.016189202666282654, -0.044050659984350204, 0.030207598581910133, -0.014218778349459171, 0.0024985140189528465, 0.014978560619056225, -0.005577301140874624, -0.021490978077054024, 0.0009267671266570687, 0.013951602391898632, -0.025832589715719223, 0.03787221387028694, 0.015112148597836494, 0.018501944839954376, -0.040844548493623734, 0.05390277877449989, -0.058377981185913086, -0.005105568561702967, 0.02708497829735279, 0.01776721142232418, -0.008967097848653793, 0.04919379949569702, 0.04238080978393555, 0.0040326896123588085, 0.014761480502784252, -0.0587119497358799, -0.011021014302968979, 0.022008631378412247, 0.025832589715719223, -0.0025924432557076216, -0.006671053357422352, 0.0008798025664873421, -0.008825160562992096, -0.009868817403912544, 0.004788296762853861, -0.04415085166692734, -0.0050512985326349735, -0.0307085532695055, 0.0428483672440052, -0.024530107155442238, 0.007585296873003244, 0.05737606808543205, 0.04431783780455589, 0.006783768534660339, 0.006103304214775562, 8.70148724061437e-05, -0.00030396500369533896, -0.028470953926444054, 0.06372150033712387, 0.028504351153969765, 0.01920328289270401, -0.01256562676280737, 0.0012523879995569587, -0.013976650312542915, -0.015496214851737022, 0.019453760236501694, 0.03199433907866478, -0.028688034042716026, 0.018201371654868126, -0.01069539412856102, -0.0012784794671460986, -0.03157687559723854, 0.03526724502444267, -0.06455642729997635, -0.04167947173118591, -0.02120710350573063, -0.04648864269256592, 0.054570719599723816, 0.021257199347019196, -0.04244760423898697, -0.032161325216293335, -0.054570719599723816, 0.002794912550598383, -0.011739050038158894, -0.03152678161859512, 0.02346140146255493, -0.05036269500851631, -0.012699214741587639, -0.02780301310122013, -0.01556300837546587, -0.021557772532105446, 0.02528153918683529, -0.008107124827802181, 0.02504776045680046, -0.055672820657491684, -0.06696101278066635, -0.03044137731194496, 0.021323993802070618, 0.011346635408699512, 0.024730488657951355, -0.01731635257601738, 0.007138611748814583, 0.0057609849609434605, -0.008203141391277313, -0.017516734078526497, -0.032127927988767624, 0.0035588692408055067, -0.002734380541369319, -0.033563997596502304, 0.012323497794568539, 0.02297714538872242, -0.04271478205919266, 0.02516465075314045, -0.0491270087659359, -0.05757645145058632, 0.0037237671203911304, -0.03643614053726196, 0.00885020848363638, 0.011396731249988079, -0.07687992602586746, -0.01780060864984989, 0.03351390361785889, 0.03252869099378586, 0.0034085826482623816, 0.013442298397421837, -0.004562866874039173, 0.05236651748418808, -0.045553527772426605, -0.003112184116616845, 0.0033710110001266003, -0.027151772752404213, 0.014811575412750244, -0.025181347504258156, 0.010987617075443268, 0.011864288710057735, 0.018268166109919548, -0.0014903417322784662, -0.013609282672405243, 0.015137196518480778, 0.07026731967926025, 0.050195712596178055, 0.01576339080929756, -0.05824439227581024, -0.023227622732520103, 0.039976224303245544, -0.0038218707777559757, 0.010770536959171295, 0.01405179314315319, 0.005477110389620066, -0.03406495228409767, -0.048692844808101654, -0.004070261027663946, -0.015362625941634178, -0.005105568561702967, -0.015045355074107647, -0.01309162937104702, 0.029606452211737633, 0.009827070869505405, -0.010778886266052723, -0.024964267387986183, 0.03500007092952728, -0.0254652239382267, -0.01244873646646738, 0.006775419227778912, 0.004038951359689236, 0.020054906606674194, 0.03753824532032013, -0.00019268511096015573, -0.07988565415143967, 0.0036194014828652143, 0.029639849439263344, 0.0039700698107481, -0.004596264101564884, 0.0023816246539354324, 0.0021770677994936705, 0.009593292139470577, -0.03870714083313942, -0.004445977509021759, 0.08683223277330399, 0.027853108942508698, -0.003473289543762803, 0.00751850288361311, 0.006074082106351852, -0.01947045885026455, -0.010194438509643078, 0.04458501189947128, 0.003602702869102359, 0.011288190260529518, -0.029439467936754227, 0.014218778349459171, -0.02369518205523491, 0.06428924947977066, 0.0039366730488836765, 0.04017660766839981, -0.007334819063544273, -0.026968088001012802, 0.000786395336035639, 0.011630509980022907, -0.03052487038075924, 0.06632646918296814, 0.04077775403857231, -0.007030071225017309, 0.015479516237974167, -0.03316323459148407, 0.02180824987590313, 0.04575390741229057, 0.012874549254775047, 0.007293072994798422, 0.021006722003221512, -0.022392697632312775, -0.0395420640707016, 0.015112148597836494, -0.010945871472358704, -0.04121191427111626, 0.021140309050679207, 0.013559187762439251, 0.04271478205919266, -0.029940422624349594, 0.004408405628055334, 0.027435647323727608, 0.004437628202140331, 0.01469468604773283, -0.01132158748805523, 0.024947568774223328, -0.017984291538596153, 0.021457580849528313, -0.008215665817260742, -0.035901788622140884, -0.03747145086526871, 0.022693270817399025, 0.02671761065721512, 0.03513365983963013, 0.0425477959215641, 0.011830892413854599, 0.04782452434301376, -0.002454680623486638, -0.048692844808101654, 0.03079204633831978, -0.016648411750793457, -0.014644590206444263, 0.0323450081050396, -0.014227127656340599, -0.004316564183682203, 0.02648383192718029, 0.0185687392950058, 0.03184405341744423, -0.01734974794089794, 0.03546762838959694, -0.017299653962254524, 0.05146479979157448, -0.035367436707019806, 9.392909851158038e-05, -0.013250265270471573, -0.033447109162807465, -0.02459689974784851, -0.006800467148423195, 0.0028763178270310163, -0.04829208180308342, 0.010595202445983887, -0.026199957355856895, 0.0247137900441885, 0.026467133313417435, -0.022125521674752235, 0.044351235032081604, -0.00450859684497118, -0.014736432582139969, -0.02384546771645546, -0.031593576073646545, 0.021323993802070618, 0.024630296975374222, 0.055439043790102005, 0.016823746263980865, 0.00952649861574173, -0.021040119230747223, -0.04067756235599518, -0.022392697632312775, 0.06295336782932281, -0.033747684210538864, -0.0069924998097121716, 0.003110097022727132, -0.0011125380406156182, 0.009058940224349499, -0.023711880668997765, 0.013108327984809875, -0.014160334132611752, -0.004408405628055334, -0.024580202996730804, -0.014928464777767658, 0.012164861895143986, 0.008537111803889275, -0.01041151862591505, -0.007864996790885925, 0.01412693690508604, -0.02803679369390011, 0.00537691917270422, -0.03496667370200157, -0.008395174518227577, 0.008783414959907532, -0.029339276254177094, -0.008169744163751602, 0.009142432361841202, 0.0025423476472496986, 0.002886754460632801, -0.00901719368994236, -0.004145404323935509, 0.028771527111530304, -0.020990023389458656, 0.02690129540860653, 0.02274336665868759, -0.02381207048892975, 0.03312983736395836, 0.016940634697675705, -0.032161325216293335, -0.017383145168423653, 0.005773508921265602, 0.024313025176525116, -0.021975234150886536, -0.046154674142599106, 0.006704450584948063, 0.012073020450770855, -0.0011334111914038658, 0.012315148487687111, -0.008800113573670387, 0.009726880118250847, 0.012766008265316486, -0.010895775631070137, 0.012398641556501389, 0.01446925662457943, 0.020455671474337578, 0.055739615112543106, -0.01078723557293415, 0.013567537069320679, 0.003974244464188814, 0.022993844002485275, -0.06933219730854034, -0.0247137900441885, 0.0383397713303566, -0.01866893097758293, 0.02252628654241562, -0.014477605931460857, -0.001374495797790587, 0.03022429719567299, -0.007409962359815836, 0.053034458309412, -0.006220194045454264, 0.009785325266420841, 0.001418329426087439, -0.01273261196911335, -0.0037634260952472687, 0.019336871802806854, 0.020873133093118668, 0.02882162295281887, 0.04528634995222092, 0.06425585597753525, -0.015320880338549614, -0.007318120449781418, 0.02599957585334778, 0.0524333119392395, 0.030023915693163872, 0.0254652239382267, 0.02187504433095455, 0.007681312970817089, 0.03610217198729515, 0.005902922246605158, -0.012064671143889427, 0.02564890682697296, -0.0077147101983428, 0.0008265760843642056, 0.03297955170273781, -0.017550131306052208, 0.0013577973004430532, 0.005911271553486586, 0.0009841682622209191, 0.038206182420253754, -0.003320915624499321, -0.024212835356593132, -0.00309757306240499, 0.006291162688285112, 0.026166560128331184, -0.016548220068216324, -0.01596377231180668, 0.014794876798987389, -0.0030286917462944984, -0.009601641446352005, 0.016155805438756943, -0.015045355074107647, -0.059212904423475266, 0.01039482094347477, -0.009735229425132275, 0.004185063298791647, 0.0191698856651783, 0.014218778349459171, -0.020021509379148483, 0.007217929698526859, -0.018201371654868126, -0.015721643343567848, 0.017834005877375603, -0.015212339349091053, 0.007126087788492441, 0.013550838455557823, -0.02264317497611046, -0.025331635028123856, -0.004020165652036667, -0.03281256556510925, -0.046989597380161285, 0.002427545376121998, 0.05006212368607521, 0.015738341957330704, 0.01309162937104702, 0.0023774500004947186, -0.024379819631576538, 0.03603537753224373, 0.05797721445560455, -0.020121701061725616, -0.04458501189947128, -0.028320668265223503, 0.022175617516040802, -0.007685487624257803, -0.0024296327028423548, 0.005435363855212927, 0.004775772802531719, 0.005631571635603905, 0.005222457926720381, 0.023979056626558304, -0.006863086484372616, 0.008950399234890938, 0.05056307837367058, -0.03660312667489052, 0.010311327874660492, 0.01572999358177185, 0.018886011093854904, 0.003055826760828495, 0.025064459070563316, -0.022776763886213303, -0.03553442284464836, 0.020856434479355812, -0.014711384661495686, -0.02501436322927475, -0.04124531149864197, -0.0416460745036602, 0.02972334250807762, -0.01908639259636402, -0.011872638016939163, 0.024396518245339394, 0.013116677291691303, -0.004913535434752703, 0.025749098509550095, 0.06893143802881241, -0.04137890040874481, -0.029873628169298172, 0.004625486209988594, 0.04688940569758415, -0.009910563938319683, -0.00480917003005743, -0.0061909714713692665, -0.018268166109919548, -0.017900798469781876, -0.02513125352561474, 0.027335455641150475, 0.06225203350186348, -0.0016124495305120945, -0.012306799180805683, 0.01947045885026455, 0.007226279005408287, 0.006833863910287619, -0.004496072884649038, 0.0326455794274807, -0.003007818479090929, -0.016698507592082024, -0.004917710088193417, 0.003226986387744546, -0.015830185264348984, 0.008215665817260742, -0.024830680340528488, -0.00622436823323369, 0.015629801899194717, -0.027135074138641357, 0.02950626239180565, -0.006270289421081543, 0.008031981997191906, 0.06519097089767456, 0.010611901059746742, -0.0007002936326898634, -0.05814420059323311, 0.031192811205983162, -0.006967451889067888, -0.03670331835746765, 0.014344017021358013, -0.042013444006443024, 0.02705158106982708, -0.0013317059492692351, 0.04187985509634018, 0.005694190971553326, 0.021524375304579735, -0.021908441558480263, 0.03830637410283089, -0.038272976875305176, -0.010937522165477276, 0.0025903559289872646, 0.013049882836639881, -0.0044668507762253284, -0.037404656410217285, 0.007247151806950569, 0.010110946372151375, 0.0016364536713808775, -0.020722847431898117, -0.061283521354198456, -0.02468039281666279, 0.03920809552073479, -0.014410811476409435, 0.009000495076179504, -0.0521327368915081, -0.04445142671465874, -0.04949437454342842, -0.024313025176525116, -0.013575886376202106, -0.028120284900069237, -0.02018849551677704, 0.01611405983567238, 0.015546309761703014, 0.024813981726765633, -0.0010196525836363435, -0.03693709895014763, 0.01938696578145027, 0.014452558010816574, -0.04976155236363411, 0.0010760100558400154, 0.0031267954036593437, 0.0009314636117778718, -0.026283450424671173, -0.006608434021472931, -0.014327319338917732, -0.017600227147340775, -0.015487865544855595, 0.007480931002646685, -0.057142291218042374, -0.022876953706145287, 0.01908639259636402, 0.009276020340621471, 0.009760277345776558, 0.014911767095327377, 0.009952310472726822, -0.038206182420253754, -0.005477110389620066, 0.018017688766121864, -0.00472567742690444, -0.026867898181080818, 0.005556428339332342, -0.0022292507346719503, -0.0063704801723361015, -0.03553442284464836, 0.03583499416708946, -0.013550838455557823, -0.03252869099378586, -0.058077406138181686, -0.02825387381017208, -0.007460057735443115, -0.03169376775622368, -0.03543423116207123, 0.04572051018476486, 0.027251962572336197, -0.031626973301172256, 0.0027573409024626017, 0.0032499469816684723, -0.012932993471622467, -0.00781907606869936, 0.000293267541565001, 0.03904110938310623, 0.016005519777536392, -0.0028804924804717302, 0.014586145989596844, 0.009267671033740044, 0.029756739735603333, -0.02573239989578724, 0.03636934980750084, 0.0012503006728366017, 0.006708625238388777, -0.015003608539700508, -0.0014026745921000838, 0.01503700576722622, 0.00619514612480998, 0.01105441153049469, -0.026550626382231712, 0.01920328289270401, 0.0037613387685269117, 0.008061204105615616, 0.03663652390241623, -0.013016486540436745, -0.00761034432798624, -0.05073006451129913, 0.00945135485380888, -0.006879784632474184, -0.006437274627387524, 0.009593292139470577, -0.06405547261238098, -0.008532936684787273, 0.0015560920583084226, -0.011939432471990585, -3.900666706613265e-05, -0.039742447435855865, -0.03456591069698334, 0.014836623333394527, -0.016431331634521484, -0.015003608539700508, 0.0033021296840161085, 0.0431489422917366, 0.024813981726765633, 0.04041038826107979, -0.03753824532032013, 0.046989597380161285, -0.013667727820575237, 0.03037458471953869, -0.01369277574121952, 0.04431783780455589, 0.009735229425132275, 0.01821807026863098, -0.02768612466752529, 0.0063704801723361015, -0.0005891441833227873, 0.0007436053710989654, 0.0011751573765650392, 0.0308588407933712, 0.012081369757652283, -0.02504776045680046, -0.021140309050679207, -0.03089223802089691, 0.014502652920782566, -0.013342106714844704, -0.02999051846563816, -0.007831599563360214, -0.033931367099285126, -0.009476402774453163, 0.025699002668261528, 0.003577655181288719, -0.07093525677919388, 0.004020165652036667, -0.02855444699525833, -0.0036360998637974262, 0.02731875702738762, 0.03055826760828495, 0.014569447375833988, 0.08375971019268036, 0.015980470925569534, 0.017550131306052208, -0.0431489422917366, 0.0033981462474912405, 0.037972405552864075, 0.016255997121334076, 0.008303332142531872, -0.004692280665040016, 0.008470317348837852, -0.026834500953555107, -0.029522961005568504, -0.03643614053726196, 0.01758352853357792, -0.004587914794683456, 0.00537691917270422, 0.029940422624349594, 0.005756810307502747, 0.01901960000395775, -0.027435647323727608, 0.01162216067314148, -0.011597112752497196, -0.018835915252566338, -0.0007070773863233626, 0.0032395103480666876, -0.004320738837122917, 0.0011156690306961536, -0.010803934186697006, 0.025147952139377594, -0.028120284900069237, 0.018769122660160065, 0.028604542836546898, 0.0015039092395454645, 0.03613556921482086, -0.04064416512846947, -0.00834507867693901, -0.030057312920689583, -0.03349720314145088, -0.02558211237192154, -0.013751220889389515, -0.007551899645477533, 0.01886931248009205, -0.021641265600919724, -0.005381093826144934, 0.0037258544471114874, 0.0004876485909335315, -0.004997028037905693, -0.0011845503468066454, -0.008036156184971333, -0.017683718353509903, 0.00027030709316022694, -0.03192754462361336, -0.03540083393454552, -0.026951389387249947, 0.01492011547088623, -0.0019641618710011244, 0.009384561330080032, 0.03361409530043602, -0.010194438509643078, -0.041145119816064835, 0.03870714083313942, -0.010277930647134781, -0.011229746043682098, 0.023344513028860092, -0.03194424510002136, 0.00041146166040562093, -0.017249558120965958, 0.009309417568147182, -0.011329936794936657, 0.009651737287640572, 0.045186158269643784, 0.012849501334130764, -0.01866893097758293, -0.027068279683589935, 0.0019224155694246292, -0.051097430288791656, -0.013308710418641567, -0.011371683329343796, 0.01995471492409706, -0.018318261951208115, -0.022810161113739014, -0.028303969651460648, 0.01456109806895256, 0.022693270817399025, 0.01088742632418871, 0.05036269500851631, 0.021824948489665985, 0.005410316400229931, 0.03543423116207123, 0.03950866684317589, -0.010728790424764156, 0.003965895157307386, 0.014193730428814888, 0.009952310472726822, -0.014110238291323185, -0.010044151917099953, -0.00312262075021863, 0.005719238426536322, -0.017533432692289352, -0.021624566987156868, 0.019821127876639366, -0.015187292359769344, 0.024930870160460472, 0.031560178846120834, 0.02255968190729618, -0.015613104216754436, -0.03237840533256531, -0.02309403568506241, 0.031560178846120834, 0.014744781889021397, -0.045553527772426605, -0.003548432607203722, -0.018117880448698997, 0.021741455420851707, 0.00323116104118526, 0.013843062333762646, -0.022776763886213303, -0.0011845503468066454, 0.017266256734728813, -0.019103091210126877, -0.042614590376615524, 0.015713294968008995, -0.009676785208284855, 0.002907627495005727, -0.037638433277606964, 0.01866893097758293, 0.006003112997859716, 0.02120710350573063, -0.03990942984819412, -0.011663907207548618, -0.033296823501586914, -0.02962315082550049, 0.010244534350931644, 0.026417037472128868, -0.021891742944717407, 0.014151984825730324, -0.020539162680506706, -0.0017888275906443596, -0.013233566656708717, -0.0013233566423878074, -0.034766290336847305, -0.00667940266430378, -0.012323497794568539, -0.006107478868216276, 0.030324488878250122, -0.0010306109907105565, 0.04982834309339523, 0.006662704050540924, 0.018117880448698997, -0.01773381419479847, -0.0017335137818008661, -0.040844548493623734, -0.05493808910250664, 0.01486167125403881, -0.04632165655493736, -0.023795371875166893, -0.029706643894314766, -0.021624566987156868, -0.02478058449923992, -0.017040826380252838, 0.011004315689206123, -0.002882579807192087, -0.034465719014406204, 0.027101676911115646, 0.007376565597951412, 0.015145545825362206, 0.026851199567317963, -0.015178943052887917, 0.01890270970761776, 0.024363121017813683, -0.03007401153445244, 0.008140522055327892, -0.036536332219839096, -0.024429915472865105, 0.009743578732013702, -0.019403664395213127, -0.00619514612480998, -0.02867133542895317, 0.012983089312911034, -0.021908441558480263, 0.017416542395949364, -0.015320880338549614, 0.003861529752612114, 0.03154347836971283, -0.012548928149044514, 0.0016980294603854418, -0.013934903778135777, 0.05420335382223129, -0.006988325156271458, -0.0007723059388808906, -0.005715063773095608, 0.009401259012520313, -0.021190404891967773, -0.00849119108170271, 0.03640274330973625, 0.008724969811737537, 0.0018326611025258899, -0.0058820489794015884, -0.027986697852611542, -0.0036319252103567123, 0.050229109823703766, 0.008031981997191906, -0.002091488102450967, -0.013049882836639881, -0.04749055206775665, -0.026417037472128868, -0.014360715635120869, 0.004959456622600555, 0.03513365983963013, -0.02746904455125332, 0.006178447511047125, 0.0029389371629804373, 0.029756739735603333, -0.02109021507203579, 0.017533432692289352, 0.01578843779861927, -0.04385028034448624, 0.020572559908032417, -0.0017950894543901086, 0.007890044711530209, 0.023377910256385803, -0.048158492892980576, 0.011480223387479782, 0.07614519447088242, 0.024045849218964577, -0.026099765673279762, 0.003876140806823969, -0.02025528810918331, -0.009326116181910038, 0.00219794106669724, 0.04678921774029732, 0.0026154036168009043, -0.0031393193639814854, 0.026767706498503685, -0.01973763480782509, 6.278247019508854e-05, -0.029940422624349594, -0.02327771857380867, 0.03904110938310623, 0.004913535434752703, 0.04304875060915947, 0.008875256404280663, -0.06108313798904419, 0.012615721672773361, 0.020990023389458656, -0.024830680340528488, 0.00044851144775748253, -0.011572064831852913, -0.013467345386743546, -0.02942276932299137, -0.012582325376570225, -0.008608080446720123, 0.015521261841058731, 0.017566829919815063, 0.02025528810918331, -0.035367436707019806, -0.014736432582139969, 0.047290172427892685, 0.02614986151456833, -0.03967565298080444, 0.01734974794089794, -0.02474718727171421, -0.02052246406674385, 0.019437061622738838, 0.003995117731392384, 0.0005787076079286635, -0.03132639825344086, 0.05290086939930916, -0.011830892413854599, 0.00865817628800869, 0.011521969921886921, 0.049026817083358765, -0.005343522410839796, 0.03990942984819412, -0.003375185653567314, 0.03381447494029999, -0.007080167066305876, -0.04304875060915947, 0.007627042941749096, 0.013342106714844704, 0.009518149308860302, 0.002073745708912611, -0.01201457530260086, 0.04308214783668518, -0.026667514815926552, 0.021474279463291168, -0.015579706989228725, 0.01947045885026455, -0.058912333101034164, -0.008591381832957268, -0.015863580629229546, 0.0068046413362026215, 0.012139814905822277, 0.000818748667370528, 0.0009158087195828557, -0.01848524622619152, 0.04241420701146126, 0.02776961773633957, 0.006729498505592346, -0.0020319996401667595, -0.009125733748078346, -0.01195613108575344, 0.032729074358940125, -0.04007641598582268, -0.015955423936247826, -0.007230453658849001, 0.009234274737536907, 0.007668789476156235, 0.008249062113463879, 0.05433694273233414, 0.017249558120965958, 0.016130758449435234, 0.01770041696727276, 0.014911767095327377, 0.02478058449923992, 0.00838682521134615, 0.009301068261265755, 0.0010410475078970194, -0.00010221312550129369, 0.024346422404050827, -0.05096384137868881, -0.014318970032036304, -0.01082898210734129, 0.02606636844575405, -0.03466609865427017, -0.047891318798065186, -0.004817519336938858, -0.016406282782554626, 0.016882190480828285, 0.01041151862591505, -0.02765272743999958, -0.0021645440720021725, 0.02274336665868759, 0.006733672693371773, 0.02984023094177246, 0.004604613408446312, -0.003439892316237092, 0.010403170250356197, 0.00027135072741657495, 0.005606523714959621, 0.016464726999402046, -0.015070402063429356, -0.01780060864984989, -0.03516705706715584, -0.038640346378088, -0.014569447375833988, -0.021190404891967773, 0.022426094859838486, 0.020923228934407234, -0.030324488878250122, 0.013492393307387829, -0.028170380741357803, -0.012682516127824783, -0.02018849551677704, 0.03780541941523552, -0.008065379224717617, -0.005372744519263506, 0.03321332857012749, -0.012974740006029606, -0.00015654849994461983, 0.022325903177261353, 0.0026028796564787626, -0.008432745933532715, 0.015095449984073639, 0.010728790424764156, 0.0302576944231987, 0.003659060224890709, -0.008261586539447308, 0.010578503832221031, 0.009893865324556828, -0.005189061164855957, 0.022209014743566513, -0.004888487979769707, -0.03753824532032013, 0.011338286101818085, 0.025899384170770645, -0.0022876954171806574, 0.02214222028851509, 0.020171796903014183, -0.019720936194062233, -0.0005693146958947182, -0.036202363669872284, 0.014410811476409435, -0.011730700731277466, 0.00931776687502861, 0.017065873369574547, 0.0126574682071805, -0.016097361221909523, -0.015596405602991581, 0.03304634615778923, -0.002584093948826194, 0.022476190701127052, -0.013634330593049526, -0.0023273543920367956, -0.009793674573302269, 0.000807790260296315, 0.020322082564234734, 0.008094601333141327, 0.04308214783668518, 0.029673246666789055, 0.016665110364556313, -0.010378122329711914, 0.02681780233979225, -0.006654355209320784, 0.01656491868197918, 0.013843062333762646, -0.00535604590550065, -0.024763885885477066, -0.013984999619424343, -0.02897190861403942, -0.0050512985326349735, -0.009200877510011196, -0.003700806526467204, -0.014060142450034618, 0.0009930393425747752, 0.009125733748078346, 0.0025089506525546312, -0.043482910841703415, 0.019370267167687416, 0.02327771857380867, -0.016013868153095245, 0.003577655181288719, 0.016130758449435234, -0.018518643453717232, 0.015838533639907837, -0.028604542836546898, 0.017249558120965958, -0.0003172716242261231, 0.034081652760505676, 0.01815127767622471, -0.0062535908073186874, -0.0029869454447180033, 0.013651029206812382, -0.004445977509021759, 0.00019020642503164709, 0.004997028037905693, 0.012298449873924255, 0.015078751370310783, 0.009651737287640572, -0.020772943273186684, 0.00011741137859644368, -0.031059222295880318, -0.003554694587364793, 0.016080662608146667, -0.04795811325311661, -0.015646500512957573, 0.007009198423475027, -0.023144129663705826, 0.0059404936619102955, 0.006487370003014803, -0.0008004846749827266, -0.01476982980966568, 0.03247859701514244, -0.014118587598204613, -0.025448525324463844, -0.0030182551126927137, 0.023945659399032593, -0.0197710320353508, -0.0023774500004947186, -0.02316082827746868, -0.014536050148308277, 0.008061204105615616, -0.0019756420515477657, -0.003646536497399211, 0.008399348706007004, 0.019069693982601166, 0.02399575524032116, 0.016798697412014008, -0.03850675746798515, -0.0160222165286541, -0.034799687564373016, -0.012056321837008, 0.0002370405272813514, 0.03877393156290054, -0.005932144355028868, 0.05246670916676521, 0.04071095958352089, 0.022876953706145287, -0.019453760236501694, -0.027552535757422447, -0.0005129572818987072, 0.02584928832948208, -0.005456237122416496, -0.002577831968665123, -0.010344725102186203, 0.03636934980750084, 0.017449939623475075, 0.03636934980750084, -0.0018587525701150298, -0.02274336665868759, -0.01626434549689293, -0.030491473153233528, -0.026834500953555107, -0.01082898210734129, -0.024997664615511894, 0.007902568206191063, 0.005147314630448818, 0.030207598581910133, -0.0062869880348443985, 0.02852104976773262, 0.002314830431714654, 0.002245949115604162, -0.0005922751734033227, -0.006082430947571993, 0.020806340500712395, 0.018802518025040627, -0.006065732799470425, -0.03411504998803139, -0.009518149308860302, 0.005581475794315338, 0.03723767027258873, -0.022275807335972786, 0.009668435901403427, 0.017533432692289352, -0.01256562676280737, 0.005276727955788374, -0.010403170250356197, 0.014536050148308277, 0.04425104334950447, -0.024847378954291344, 0.00023338772007264197, 0.02558211237192154, -0.014060142450034618, -0.007752281613647938, 0.04161268100142479, 0.008132172748446465, -0.003554694587364793, -0.031176112592220306, 0.0029097148217260838, 0.015646500512957573, -0.027368852868676186, 0.018719026818871498, -0.007794028148055077, -0.007802377454936504, -0.03723767027258873, 0.011304888874292374, -0.05206594616174698, 0.012674166820943356, 0.010261232033371925, -0.005360220558941364, -0.04658883437514305, 0.020472370088100433, -0.060949549078941345, -0.00211966666392982, 0.006140876095741987, -0.026350243017077446, -0.03312983736395836, -0.0003524950298015028, 0.02187504433095455, 0.022175617516040802, 0.021474279463291168, 0.01818467490375042, 0.02139078825712204, 0.027752919122576714, 0.02863794006407261, 0.006270289421081543, 0.0026759356260299683, -0.004671407397836447, -0.022325903177261353, 0.0075226775370538235, 0.007242977153509855, -0.03787221387028694, 0.018201371654868126, 0.023628387600183487, 0.01122139673680067, -0.013116677291691303, 0.0012649118434637785, -0.03760503605008125, -0.0658923089504242, 0.0017314264550805092, -0.009935611858963966, 0.003650711150839925, 0.005013726651668549, -0.03309644013643265, 0.02052246406674385, -0.0012200346682220697, -0.0029785961378365755, 0.03403155878186226, -0.008165569975972176, 0.01731635257601738, 0.0148282740265131, 0.019754333421587944, 0.014686336740851402, 0.04124531149864197, 0.031075920909643173, 0.013809665106236935, -0.00546041177585721, 0.0007138611981645226, 0.02882162295281887, 0.03007401153445244, 0.0076019954867661, -0.01213146559894085, -0.02776961773633957, -0.024279629811644554, 0.03640274330973625, 0.018652232363820076, -0.015688247978687286, 0.029890326783061028, 0.034081652760505676, -0.002559046261012554, -0.006712799891829491, 0.01644802838563919, 0.020021509379148483, -0.011830892413854599, 0.005305950529873371, -0.005335173103958368, -0.049627963453531265, 0.0004226809542160481, 0.04121191427111626, 0.03500007092952728, 0.022092124447226524, -0.004268555901944637, -0.007105214521288872, -0.03331352025270462, -0.020438972860574722, 0.04501917585730553, 0.06305356323719025, 0.008474492467939854, 0.012098068371415138, 0.015487865544855595, -0.0008484928985126317, 0.011513620615005493, -0.012123116292059422, 0.015120497904717922, -0.0009079813025891781, -0.0031789783388376236, -0.0008672787225805223, -0.030641760677099228, 0.005986414849758148, 0.021190404891967773, 0.00997735746204853, 0.03550102561712265, -0.009643387980759144, -0.0027051582001149654, 0.018101181834936142, 0.026116464287042618, -0.0055689518339931965, 0.052500106394290924, -0.0077355834655463696, 0.020455671474337578, 0.006458147428929806, -0.02003820799291134, 0.003752989461645484, 0.003101747715845704, -0.053401824086904526, 0.018084483221173286, -0.01244873646646738, -0.0107120918110013, 0.011004315689206123, 0.028871718794107437, -0.025699002668261528, 0.047891318798065186, -0.0033480506390333176, 0.019036298617720604, 0.023411307483911514, -0.05056307837367058, -0.022092124447226524, -0.012123116292059422, -0.001472599571570754, 0.0012690864969044924, -0.0007279505371116102, 0.022726668044924736, -0.015888629481196404, -0.008649826981127262, -0.019370267167687416, 0.002730205887928605, -0.022760065272450447, -0.01292464416474104, -0.0092843696475029, -0.03067515790462494, 0.008825160562992096, -0.012348545715212822, -0.003254121635109186, 0.012649118900299072, -0.0008944137953221798, -0.01279105618596077, -0.013158423826098442, 0.04161268100142479, 0.020388877019286156, 0.009943961165845394, -0.005318474490195513, -0.01576339080929756, -0.001572790672071278, 0.0017481249524280429, 0.0032374230213463306, 0.004030602052807808, -0.019403664395213127, -0.020589258521795273, -0.001281610457226634, 0.000629846821539104, 0.014778178185224533, -0.008733319118618965, 0.014661288820207119, -0.031743861734867096, 0.016940634697675705, 0.005986414849758148, -0.01286619994789362, -0.011964480392634869, 0.009008844383060932, -0.010837331414222717, -0.01701577939093113, -0.019670840352773666, -0.004078610334545374, -0.034048255532979965, -0.021340692415833473, 0.01848524622619152, -0.040310196578502655, 0.016514822840690613, -0.016781998798251152, -0.023795371875166893, -0.0014298096066340804, -0.0028283095452934504, -0.0401432104408741, 0.006508243270218372, -0.0019359831931069493, -0.027552535757422447, 0.004596264101564884, 0.027485743165016174, 0.018819216638803482, -0.024379819631576538, -0.013475694693624973, -0.04602108523249626, -0.00728054903447628, 0.03967565298080444, -0.0040911342948675156, -0.045553527772426605, 0.05323484167456627, -0.009685133583843708, -0.03262888267636299, -0.060949549078941345, -0.016155805438756943, -0.025532016530632973, -0.019286775961518288, -0.03067515790462494, 0.02671761065721512, 0.02165796421468258, -0.008407698012888432, -0.02474718727171421, 0.03456591069698334, 0.004867614712566137, 0.019971413537859917], "index": 27}, {"title": "Lake Miccosukee", "text": "Lake Miccosukee is a large swampy prairie lake in northern Jefferson County, Florida, located east of the settlement of Miccosukee. A small portion of the lake, its northwest corner, is located in Leon County.", "vector": [0.02749829925596714, -0.033846087753772736, -0.01946479268372059, -0.011892224662005901, -0.02899964340031147, 0.05244167894124985, 0.012827271595597267, -0.0391666404902935, -0.02174314670264721, -0.0047542559914290905, -0.02645789459347725, -0.010166996158659458, 0.015592905692756176, 0.04846443608403206, -0.0005560075514949858, -0.039693426340818405, -0.017476169392466545, -0.0014527806779369712, -0.019306756556034088, 0.05794660747051239, 0.006621058564633131, -0.009152930229902267, 0.012642895802855492, 0.01656746119260788, 0.035031359642744064, 0.02267819456756115, -0.0034735039807856083, 0.020808100700378418, 0.004211006220430136, 0.008171788416802883, 0.027682675048708916, 0.03086973913013935, 0.014341785572469234, -0.004869490396231413, -0.005639916751533747, -0.02475900575518608, -0.015922147780656815, -0.002941778162494302, 0.042801473289728165, -0.012096354737877846, -0.015592905692756176, -0.03574252128601074, 0.033793408423662186, 0.04309120401740074, 0.015079287812113762, 0.012260975316166878, -0.014829063788056374, -0.04519835487008095, -0.0051756855100393295, -0.039693426340818405, -0.017989788204431534, -0.02154560200870037, -0.02345520630478859, -0.028341159224510193, -0.0010955530451610684, -0.011971242725849152, 0.041036732494831085, 0.08686723560094833, -0.08212614804506302, -0.007276250049471855, -0.0374809205532074, -0.009495342150330544, 0.008533954620361328, 0.019912561401724815, -0.004352580290287733, 0.013722809962928295, 0.004105648957192898, 0.017002061009407043, 0.04079968109726906, 0.03184429556131363, 7.652306521777064e-06, 0.04770059511065483, -0.0041319881565868855, 0.002006730530411005, 0.0031277998350560665, 0.0025960737839341164, 0.006275354418903589, -0.03945637121796608, -0.0024281605146825314, 0.021190021187067032, 0.015974825248122215, -0.020584214478731155, 0.012840441428124905, 0.013176267966628075, 0.017858091741800308, 0.043986741453409195, 0.0027162472251802683, -0.039693426340818405, -0.006262184586375952, 0.009337306022644043, 0.01216878741979599, 0.03561082482337952, -0.0036447099409997463, 0.01232682354748249, 0.011951487511396408, -0.041089411824941635, 0.07143236696720123, 0.014117901213467121, -0.01610652357339859, 0.014368124306201935, -0.006999686826020479, -0.016119692474603653, -0.0039377352222800255, -0.014644687995314598, 0.005188855342566967, -0.026392046362161636, -0.008915876038372517, 0.010687198489904404, 0.006815311033278704, -0.030948756262660027, 0.04946533218026161, -0.001521921600215137, 0.0011046072468161583, -0.04022021219134331, -0.029947860166430473, 0.005774906370788813, 0.017779072746634483, 0.02620767056941986, -0.016593800857663155, -0.01455250009894371, -0.01693621277809143, 0.0011531703639775515, 0.04469790682196617, 0.006647397764027119, 0.019741356372833252, 0.04090503603219986, -0.03329296037554741, -0.03242376074194908, 0.025193603709340096, 0.07201182842254639, 0.05757785588502884, -0.003098167944699526, -0.0004922169027850032, -0.0036973885726183653, -0.046673357486724854, 0.06358323246240616, 0.026760796085000038, 0.015553396195173264, 0.04029923304915428, 0.001327668665908277, 0.010213089175522327, 0.011293003335595131, 0.027103208005428314, -0.031975992023944855, 0.03142286464571953, -0.030105896294116974, -0.02770901471376419, -0.00913976039737463, 0.03376706689596176, -0.05462784692645073, 0.01162224542349577, -0.03745457902550697, 0.07037878781557083, 0.0374809205532074, 0.05863143131136894, 0.043828707188367844, -0.018819477409124374, 0.012280729599297047, 0.0004930400173179805, -0.008599803782999516, 0.026326198130846024, -0.009034402668476105, 0.047252826392650604, -0.038244761526584625, -0.013327719643712044, -0.0036677569150924683, -0.010397464968264103, -0.05133542791008949, -0.018160993233323097, 0.03276617452502251, 0.012254390865564346, 0.02770901471376419, -0.02842017635703087, -0.03345099464058876, 0.03700681030750275, -0.051967572420835495, -0.00991677213460207, -0.0523889996111393, -0.034873321652412415, -0.006940423045307398, -0.014117901213467121, -0.029631787911057472, 0.044355493038892746, -0.0053468914702534676, -0.005659671500325203, -0.029236696660518646, -0.002042947104200721, 0.022862570360302925, 0.045277372002601624, -0.05215194821357727, 0.018503405153751373, -0.0390612818300724, 0.028709910809993744, -0.010456728748977184, 0.02921035885810852, 0.012847025878727436, -0.05789392814040184, 0.04240638017654419, 0.01708108000457287, 0.015803620219230652, 0.023902975022792816, 0.008428597822785378, -0.04804300516843796, 0.023428866639733315, -0.004941923543810844, 0.016751836985349655, -0.003865302074700594, -0.046620678156614304, -0.009093666449189186, 0.002678384305909276, -0.02050519734621048, -0.033530015498399734, -0.042748793959617615, -0.025193603709340096, 0.008533954620361328, 0.01584312878549099, -0.014908081851899624, -0.017370812594890594, -0.008527370169758797, -0.005231656599789858, 0.08049310743808746, -0.0036677569150924683, -0.0009918417781591415, 0.012445351108908653, -0.04172155633568764, 0.016396256163716316, 0.02428489737212658, 0.06495288014411926, 0.02030765265226364, -0.02439025416970253, 0.05531267076730728, -0.05436445400118828, 0.028393838554620743, 0.027629995718598366, -0.007052365690469742, -0.021111002191901207, 0.025865258648991585, 0.00731575908139348, 0.02475900575518608, -0.014078391715884209, -0.02112417295575142, 0.046673357486724854, -0.03511037677526474, 0.023336678743362427, -0.017897600308060646, -0.022401630878448486, 0.00731575908139348, 0.009515096433460712, -0.0382184199988842, -0.005172393284738064, -0.034451890736818314, 0.01159590668976307, 0.039640747010707855, -0.03993048146367073, 0.012313653714954853, 0.03345099464058876, 0.041616201400756836, -0.04143182560801506, -0.013472585938870907, -0.01880630850791931, -0.008211297914385796, -0.02506190724670887, 0.033740729093551636, -0.04975506290793419, -0.010265768505632877, 0.03308224678039551, 0.05075595900416374, -0.0014091561315581203, -0.04364433139562607, -0.04533005133271217, -0.011325927451252937, 0.00738160777837038, -0.007724019233137369, 0.015922147780656815, 0.05425909534096718, 0.02453511953353882, -0.023955654352903366, -0.02184850536286831, -0.010726707056164742, 0.01791076920926571, 0.07190646976232529, -0.017568357288837433, 0.008138864301145077, -0.02693200297653675, 0.04008851572871208, -0.0029845794197171926, 0.03708582744002342, 0.024377083405852318, -0.016738668084144592, -0.03092241659760475, 0.01431544590741396, -0.06974664330482483, 0.028446516022086143, 0.023850297555327415, -0.0301849152892828, -0.005304090213030577, 0.01744983159005642, 0.020083768293261528, -0.04635728523135185, -0.006709953770041466, 0.04438183456659317, 0.051388103514909744, 0.033108584582805634, -0.03226572647690773, 0.05441713333129883, -0.019715016707777977, 0.006420220714062452, 0.011325927451252937, -0.023784449324011803, -0.011767112649977207, 0.0021005645394325256, 0.010048468597233295, -0.022493818774819374, -0.03563716262578964, 0.03558448329567909, -0.04432915523648262, 0.028130443766713142, 0.0184770654886961, -0.02500922977924347, -0.011154722422361374, 0.04143182560801506, -0.0008276323205791414, -0.00306195137090981, -0.001674195984378457, 0.027629995718598366, -0.03147554397583008, -0.0033154678530991077, -0.0037599445786327124, -0.02697151154279709, 0.039430033415555954, -0.03226572647690773, 0.02868357114493847, -0.050782300531864166, -0.03877154737710953, 0.053626950830221176, 0.030421968549489975, 0.044618889689445496, 0.020413009449839592, -0.015434869565069675, 0.04488228261470795, 0.013340889476239681, -0.04964970797300339, 0.029816163703799248, 0.01806880533695221, 0.007407946977764368, 0.017107419669628143, 0.005234949290752411, 0.013485755771398544, 0.02329717017710209, 0.009067326784133911, 0.0005193793913349509, -0.018766799941658974, 0.03887690603733063, -0.0019738064147531986, 0.02899964340031147, 0.021427074447274208, 0.012162202969193459, 0.007585737854242325, 0.03755993768572807, -0.019912561401724815, -0.015026608482003212, -0.014433973468840122, 0.01662014052271843, 0.007276250049471855, 0.05763053521513939, 0.04975506290793419, -0.04345995560288429, 0.029289375990629196, 0.02776169218122959, 0.005402862560003996, 0.01064110454171896, -0.010357956402003765, -0.03500501811504364, 0.0005123830051161349, 0.02589159831404686, -0.028499195352196693, 0.026023294776678085, -0.012491445057094097, -0.03597957640886307, 0.01584312878549099, 0.007737189065665007, 0.03400412201881409, 0.055944815278053284, 0.02050519734621048, -0.004230760969221592, -0.052072927355766296, 0.01159590668976307, -0.04008851572871208, -0.03703315183520317, 0.008250806480646133, -0.016909873113036156, 0.0008156972471624613, -0.03558448329567909, -0.021045153960585594, -0.03210768848657608, 0.01791076920926571, -0.05252069979906082, 0.005452249199151993, 0.010140656493604183, -0.01646210439503193, -0.0024281605146825314, 0.05257337540388107, -0.04411844164133072, 0.020650064572691917, -0.045488085597753525, 0.021940693259239197, -0.007816207595169544, 0.03558448329567909, -0.05436445400118828, -0.012333408929407597, -0.005294212605804205, -0.006762632634490728, 0.009890432469546795, 0.007677925284951925, 0.011246909387409687, -0.028393838554620743, 0.015316342003643513, -0.009403154253959656, -0.009488756768405437, -0.003509720554575324, -0.02444293349981308, -0.010377710685133934, -0.00039982335874810815, 0.040984056890010834, -0.04095771536231041, -0.0016445642104372382, -0.0012593510327860713, 0.04822738096117973, -0.011003270745277405, -0.0770689845085144, -0.007131383754312992, -0.0009877262637019157, -0.03410948067903519, -0.03152822330594063, -0.017568357288837433, 0.005791368428617716, 2.5824925614870153e-05, -0.006614473648369312, 0.0010766215855255723, 0.022902078926563263, 0.046067554503679276, 0.03437287360429764, 0.006614473648369312, -0.002614182187244296, -0.009890432469546795, 0.012366333045065403, -0.012991893105208874, -0.003960782196372747, 0.0760154128074646, -0.01178028155118227, -0.0001105018745874986, 0.04604121297597885, -0.019688677042722702, 0.020162785425782204, -0.008316654711961746, -0.029737144708633423, 0.01776590384542942, -0.004800349473953247, -0.03700681030750275, 0.06384662538766861, 0.0186351016163826, -0.023323509842157364, 0.021967032924294472, -0.04685773327946663, -0.0027047237381339073, -0.06869307160377502, -0.003802746068686247, 0.029710806906223297, -0.03126483038067818, -0.020031088963150978, -0.05504927784204483, 0.026536911725997925, -0.027524638921022415, -0.024614138528704643, -0.024877531453967094, -0.038613513112068176, 0.046673357486724854, -0.029789824038743973, 0.017423491925001144, 0.03553180769085884, 0.030474647879600525, 0.05425909534096718, -0.04127378761768341, 0.04633094742894173, -0.03263447433710098, 0.007361853029578924, -0.0001594766363268718, 0.025601865723729134, 0.02174314670264721, -0.03755993768572807, 0.059158217161893845, 0.03576885908842087, 0.02776169218122959, -0.00820471253246069, -0.006515700835734606, 0.035136714577674866, -0.012438765726983547, 0.01870094984769821, 0.0052020251750946045, 0.025667713955044746, 0.029025983065366745, 0.06611181050539017, 0.02899964340031147, 0.05254703760147095, 0.032186705619096756, -0.016027504578232765, -0.0033171139657497406, 0.0233630184084177, 0.007710849866271019, -0.04633094742894173, 0.0038488400168716908, -0.04583049938082695, -0.014921251684427261, 0.031817954033613205, -0.022915249690413475, 0.025193603709340096, 0.024732666090130806, -0.009416324086487293, 0.010555501095950603, 0.00851420033723116, -0.04612023010849953, 0.02018912509083748, 0.030474647879600525, -0.028446516022086143, -0.006081101484596729, 0.03576885908842087, 0.011707848869264126, 0.02226993441581726, 0.05441713333129883, -0.017160097137093544, -0.05868411064147949, 0.013156513683497906, 0.04345995560288429, -0.024245386943221092, 0.07259129732847214, -0.02414003014564514, -0.011576151475310326, 0.0012461813166737556, 0.020373500883579254, 0.01573777198791504, -0.017844920977950096, -0.01750250905752182, -0.018858985975384712, -0.0059263575822114944, -0.02718222700059414, 0.005379815585911274, 0.011747357435524464, -0.008744670078158379, -0.0062654768116772175, 0.032292064279317856, 0.025746731087565422, -0.002126903971657157, 0.052889447659254074, 0.0011136613320559263, 0.02537797950208187, -0.011246909387409687, -0.0021861675195395947, 0.0025730268098413944, 0.010140656493604183, -0.009666548110544682, 0.0116024911403656, 0.002016607904806733, 0.016330407932400703, 0.02947375178337097, 0.012030505575239658, 0.0192145686596632, -0.01787126064300537, 0.012840441428124905, 0.03987780213356018, -0.006035007536411285, 0.0268266461789608, 0.0022898786701261997, 0.02936839498579502, -0.04182691499590874, 0.04261709749698639, -0.004227468278259039, -0.03869253024458885, 0.019715016707777977, 0.03408314287662506, -0.00020248389046173543, 0.019754525274038315, 0.012175372801721096, -0.004115526098757982, 0.048490773886442184, 0.04638362675905228, 0.0005004479899071157, -0.010041884146630764, 0.05017649382352829, -0.046936750411987305, 0.05710374936461449, 0.009620454162359238, -0.03597957640886307, 0.018187332898378372, 0.0004230760969221592, 0.031975992023944855, 0.01120740082114935, -0.021255869418382645, -0.019635997712612152, -0.027682675048708916, 0.010469898581504822, 0.06063322350382805, 0.0225728377699852, -0.018964344635605812, -0.04701577126979828, -0.004951801151037216, -0.006347787566483021, 0.002844651695340872, 0.020439349114894867, 0.009725810959935188, 0.005040696356445551, 0.0035294753033667803, -0.04361799359321594, 0.04327557981014252, 0.013077495619654655, 0.033108584582805634, -0.029631787911057472, 0.0038521324750036, 0.012484859675168991, 0.022151406854391098, 0.022770382463932037, 0.02408735081553459, -0.010061638429760933, -0.007974243722856045, -0.01677817665040493, 0.017423491925001144, -0.025233114138245583, 0.0028989766724407673, -0.01978086493909359, -0.030632684007287025, 0.004457938019186258, 0.023494714871048927, -0.06558502465486526, -0.0032874823082238436, -0.0012363040586933494, -0.011372021399438381, -0.014052052050828934, 0.016541123390197754, -0.008191543631255627, -0.026918834075331688, 0.027471959590911865, 0.011273249052464962, 0.04622558876872063, 0.0012363040586933494, -0.04812202230095863, 0.013169683516025543, -0.020834438502788544, 0.0016124631511047482, 0.004171497188508511, 0.014894912019371986, 0.07285469025373459, -0.0027952652890235186, -0.026813475415110588, 0.03645368292927742, 0.004500739276409149, -0.0019738064147531986, -0.0009111774852499366, 0.004234053194522858, 0.016857195645570755, 0.015579735860228539, -0.019596489146351814, -0.05349525436758995, 0.020057428628206253, -0.026852983981370926, 0.021427074447274208, -0.009021232835948467, -0.0001911661820486188, -0.011635415256023407, 0.0384291373193264, -0.002620767103508115, -0.0006909968215040863, 0.004757548216730356, 0.019965240731835365, -0.02097930572926998, -0.013288211077451706, 0.01423642784357071, -0.04648898169398308, -0.010219674557447433, -0.031817954033613205, -0.04469790682196617, 0.028815267607569695, -0.021519262343645096, -0.0018141239415854216, 0.008461521938443184, 0.01864827238023281, -0.03416216000914574, 0.006222675554454327, 0.014934421516954899, -0.0043887970969080925, -0.017844920977950096, -0.029078660532832146, 0.01796344853937626, -0.013321135193109512, -0.0047542559914290905, 0.008929045870900154, -0.03424117714166641, 0.0004420074983499944, -0.03489966318011284, -0.01827952079474926, 0.0021087955683469772, -0.016014335677027702, 0.022902078926563263, 0.03924565762281418, -0.02096613682806492, 0.017476169392466545, -0.002671799622476101, 0.007500134874135256, 0.003168955212458968, 0.013775489293038845, 0.013459417037665844, 0.019807204604148865, 0.01702840067446232, 0.006021837703883648, -0.009284626692533493, -0.004122111015021801, -0.007197231985628605, -0.03848181664943695, -0.04143182560801506, -0.005551021546125412, -0.016699159517884254, 0.011325927451252937, 0.0024907162878662348, 0.05173051729798317, 0.0004066139808855951, -0.006304985843598843, -0.024719495326280594, 0.04335459694266319, 0.006594718899577856, -0.039271995425224304, -0.02195386216044426, 0.007177477702498436, -0.0015120443422347307, 0.011569567024707794, -0.07965024560689926, 0.003875179449096322, 0.02454829029738903, 0.02770901471376419, -0.015711432322859764, -0.016712328419089317, 0.023573733866214752, -0.00026421676739118993, 0.060001078993082047, -0.02392931468784809, -0.022638686001300812, -0.009501926600933075, -0.019556980580091476, 0.006947007961571217, -0.02030765265226364, -0.010614764876663685, 0.0021812289487570524, 0.006647397764027119, 0.011536642909049988, 0.006061346735805273, -0.039904139935970306, -0.023033777251839638, -0.02066323347389698, 0.001507928711362183, 0.028262140229344368, -0.013169683516025543, 0.05768321454524994, -0.0017104126745834947, 0.017634205520153046, -0.009758735075592995, 0.04064164310693741, 0.0188984964042902, -0.039851460605859756, 0.022981097921729088, 0.014868572354316711, -0.03189697489142418, -0.007763528265058994, -0.01175394281744957, -0.023942485451698303, 0.030685363337397575, -0.005824292544275522, 0.015513887628912926, -0.01136543694883585, -0.0379023477435112, -0.005103252362459898, -0.03397778421640396, -0.03086973913013935, 0.007664755918085575, 0.006400466430932283, 0.02267819456756115, -0.004382212180644274, -0.0012791055487468839, -0.04754255712032318, 0.008112524636089802, -0.004839858505874872, 0.007348683197051287, -0.03645368292927742, 0.03447823226451874, -0.03252911940217018, 0.007111629005521536, 0.02899964340031147, -0.04988676309585571, 0.020794929936528206, 0.0011581090511754155, 0.04359165206551552, -0.02039984054863453, 0.012234635651111603, -0.011773697100579739, 0.023376189172267914, 0.02242797054350376, 0.006235845386981964, 0.022098729386925697, 0.029394732788205147, -0.04195861145853996, -0.014868572354316711, 0.02253332920372486, -0.009284626692533493, 0.05101935565471649, 0.00890270620584488, 0.031817954033613205, 0.01942528411746025, -0.04040458798408508, 0.020228633657097816, 0.025496507063508034, 0.03279251232743263, -0.043064866214990616, 0.032239384949207306, 0.0026421677321195602, 0.008915876038372517, -0.003348391968756914, 0.01651478372514248, -0.05125640705227852, -0.03194965049624443, 0.005751859396696091, 0.02558869495987892, -0.0012033798266202211, -0.00623913761228323, -0.021861674264073372, -0.023784449324011803, -0.05070328339934349, -0.015553396195173264, -0.03640100359916687, -0.012847025878727436, 0.027261244133114815, 0.02997419983148575, 0.008580048568546772, -0.007012856658548117, 0.021980201825499535, 0.0116024911403656, -0.045962195843458176, 0.024350745603442192, -0.019754525274038315, 0.005939527414739132, 0.03158090263605118, -0.019701845943927765, -0.03226572647690773, 0.028446516022086143, -0.033319298177957535, 0.048596132546663284, 0.014275937341153622, 0.008092770352959633, 0.00604488467797637, 0.0046423133462667465, -0.02149292267858982, 0.027103208005428314, -0.008310070261359215, 0.006077808793634176, -0.00525470357388258, -0.010002374649047852, 0.02583891898393631, 0.020268142223358154, 0.02552284672856331, 0.007677925284951925, -0.03387242555618286, 0.02419270947575569, 0.022348953410983086, 0.040062177926301956, 0.019148720428347588, 0.005386400502175093, -0.05244167894124985, -0.009594114497303963, 0.014065221883356571, -0.03687511384487152, 0.014671027660369873, -0.016949383541941643, 0.0038488400168716908, 0.017844920977950096, 0.010246014222502708, -0.0004154623602516949, 0.01766054518520832, 0.032134026288986206, -0.018450725823640823, -0.01278776302933693, 0.013538435101509094, 0.0033269913401454687, 0.007822792045772076, 0.023178642615675926, -0.020386669784784317, -0.059526968747377396, 0.006769217550754547, -0.024996059015393257, 0.017700055614113808, -0.017318133264780045, 0.012741669081151485, 0.012985307723283768, -0.045909516513347626, 0.0193726047873497, -0.004905707202851772, -0.0026964927092194557, 0.021045153960585594, -0.04359165206551552, 0.009666548110544682, -0.024153199046850204, 0.05710374936461449, -0.0054555414244532585, -0.02382395789027214, -0.017107419669628143, 0.07037878781557083, 0.01263631135225296, -0.019346265122294426, -0.044092100113630295, -0.037876009941101074, -0.012438765726983547, 0.01983354426920414, -0.017265455797314644, 0.021980201825499535, -0.01870094984769821, 0.07132700830698013, 0.029868843033909798, -0.0013935171300545335, 0.01568509265780449, 0.047147467732429504, 0.0011416469933465123, 0.014829063788056374, 0.045962195843458176, -0.03447823226451874, 0.01771322451531887, -0.008033506572246552, -0.004079309292137623, 0.0041122338734567165, 0.005244826432317495, 0.02407418191432953, 0.010996685363352299, -0.032028671354055405, 0.04008851572871208, 0.0009424554882571101, -0.019715016707777977, 0.021427074447274208, -0.004935339093208313, 0.03466260805726051, -0.020518366247415543, 0.056313566863536835, -0.053047485649585724, 0.001944174524396658, 0.012465105392038822, -0.02454829029738903, -0.02200654149055481, -0.0013400153256952763, -0.06742878258228302, 0.019741356372833252, 0.015566566027700901, 0.008158618584275246, 0.026813475415110588, -0.019082872197031975, -0.009231948293745518, 0.02707687020301819, 0.02366592176258564, -0.025812579318881035, -0.045119334012269974, -0.017647376284003258, 0.00428673205897212, 0.007269665133208036, -0.010232844389975071, 0.012366333045065403, -0.045962195843458176, -0.04485594108700752, 0.019715016707777977, 0.0005366646219044924, -0.010226259008049965, 0.03774431347846985, -0.011747357435524464, 0.03977244347333908, 0.039271995425224304, -0.03924565762281418, 0.017212776467204094, -0.0005420147790573537, 0.012847025878727436, 0.04174789786338806, 0.03766529634594917, -0.011826375499367714, -0.008553709834814072, 0.06885110586881638, -0.012926043942570686, 0.050044797360897064, 0.01121398527175188, -0.005919772665947676, 0.013696471229195595, 0.034504570066928864, 0.009179269894957542, -0.05568142235279083, -0.008138864301145077, 0.007210401818156242, -0.017700055614113808, 0.002270124154165387, -0.04772693291306496, -0.009080496616661549, -0.06616449356079102, -0.004721331410109997, 0.007375022862106562, 0.03297688812017441, -0.004484277218580246, 0.005185563117265701, -0.04361799359321594, -0.02739294245839119, -0.019333096221089363, -0.01771322451531887, 0.009343890473246574, 0.020900288596749306, 0.044197458773851395, 0.018727289512753487, 0.025970615446567535, -0.006166704464703798, 0.011642000637948513, -0.004211006220430136, -0.015908977016806602, 0.0192145686596632, 0.042327363044023514, 0.035031359642744064, -0.01667281985282898, 0.005659671500325203, -0.01255729328840971, -0.010825480334460735, -0.021822165697813034, 0.007618661969900131, -0.0004292493686079979, 0.002701431280001998, 0.025496507063508034, -0.020268142223358154, 0.02180899679660797, 0.0059889135882258415, -0.021413905546069145, 0.011655169539153576, 0.00422088336199522, 0.0004113468457944691, 0.016949383541941643, 0.02884160727262497, 0.00406284723430872, -0.0064366827718913555, -0.005080205388367176, 0.01573777198791504, -0.02776169218122959, -0.0134133230894804, 0.0010864988435059786, -0.01838487759232521, 0.013084081001579762, -0.03416216000914574, -0.04027289152145386, 0.01750250905752182, -0.020900288596749306, 0.017067909240722656, -0.004810227081179619, 0.04166887700557709, -0.013643791899085045, -0.011016440577805042, -0.008718330413103104, 0.0032710202503949404, -0.013097249902784824, 0.005972451530396938, -0.005109837278723717, -0.02407418191432953, -0.01286678109318018, 0.011642000637948513, 0.013801828026771545, -0.011016440577805042, 0.04438183456659317, 0.025904767215251923, 0.017160097137093544, -0.003542644903063774, -0.005475295707583427, -0.0023244491312652826, 0.003015857422724366, 0.01367013156414032, -0.02087394893169403, -0.04540906846523285, 0.03713850677013397, -0.016383087262511253, 0.004237345885485411, -0.03421483933925629, -0.033530015498399734, -0.009133175946772099, -0.01548754796385765, 0.013564773835241795, 0.01305115595459938, 0.0007309174397960305, -0.018305860459804535, 0.03360903263092041, 0.008448352105915546, 0.013393567875027657, -0.006028422620147467, 0.06384662538766861, -0.0189511738717556, 0.006854820065200329, -0.03708582744002342, 0.03397778421640396, -0.003954197280108929, 0.041616201400756836, -0.07327611744403839, -0.0005053866188973188, 0.024416593834757805, -0.01025259867310524, -0.009166100062429905, 0.010232844389975071, 0.0014066868461668491, 0.032239384949207306, -0.0035591069608926773, -0.008665652014315128, -0.00841542799025774, -0.012287314981222153, 0.0002477546804584563, 0.0013095603790134192, -0.029895180836319923, 0.00715772295370698, -0.009745566174387932, -0.022744042798876762, 0.012886535376310349, 0.0037928689271211624, 0.05001845955848694, 6.51282025501132e-05, -0.030527327209711075, 0.013044571503996849, -0.005373230669647455, -0.009817998856306076, -0.007151138037443161, -0.02020229399204254, 0.003858717391267419, 0.028104104101657867, -0.006341202650219202, -0.003430702490732074, -0.010377710685133934, -0.030158575624227524, 0.03516305610537529, 0.01589580811560154, -0.018450725823640823, 0.03687511384487152, -0.0030175037682056427, -0.04930729418992996, 0.01294579915702343, -0.010608180426061153, 0.0014791201101616025, 0.0042801471427083015, -0.0022273226641118526, 0.008020337671041489, 0.024521950632333755, -0.0019063117215409875, 0.0007646647281944752, 0.01802929677069187, 0.012386087328195572, -0.03537376970052719, 0.00230469461530447, 0.008948800154030323, -0.0374809205532074, -0.03126483038067818, -0.00888295192271471, -0.017423491925001144, 0.00507691316306591, -0.013163099065423012, 0.005824292544275522, -0.028657231479883194, 0.027893390506505966, -0.02138756588101387, 0.006874574813991785, 0.025338470935821533, -0.0009177623433060944, 0.02475900575518608, 0.02936839498579502, -0.0011811560252681375, -0.012781177647411823, -0.01535585056990385, 0.0022503696382045746, -0.011951487511396408, 0.02133488655090332, -0.0029170848429203033, 0.004793765023350716, 0.0007420293404720724, -0.012129278853535652, 0.02718222700059414, -0.021242698654532433, -0.006867989897727966, -0.03287152945995331, 0.008705160580575466, -0.01730496436357498, -0.02066323347389698, 0.008560294285416603, -0.010871573351323605, 0.010272352956235409, -0.00488266022875905, -0.017423491925001144, -0.005679426249116659, 0.002426514169201255, 0.015382190234959126, -0.02341569773852825, 0.01935943402349949, 0.0028545288369059563, 0.02776169218122959, 0.04799032583832741, 5.797747508040629e-05, 0.021269038319587708, 0.006104148458689451, -0.0002553683880250901, -0.03439921513199806, 0.001487351139076054, 0.01978086493909359, -0.021716808900237083, -0.023442037403583527, -0.016225049272179604, -0.04485594108700752, 0.02557552605867386, -0.014499821700155735, 0.00507691316306591, -0.01719960756599903, -0.008547124452888966, 0.03432019427418709, -0.011273249052464962, -0.028657231479883194, -0.0028183122631162405, -0.00044900388456881046, -0.011839545331895351, 0.008869782090187073, -0.007862301543354988, 0.0373755618929863, -0.023178642615675926, 0.018319029361009598, -0.018240012228488922, -0.008066431619226933, -0.024574629962444305, -0.015922147780656815, -0.0029961029067635536, -0.04533005133271217, 0.022019710391759872, 0.010904498398303986, -0.02283623069524765, -0.004948508460074663, -0.019082872197031975, -0.04111575335264206, 0.007803037296980619, 0.0017960155382752419, -0.0017005354166030884, 0.021348057314753532, 0.003073474857956171, -0.007269665133208036, 0.007533058989793062, 0.044302813708782196, 0.0134133230894804, 0.012741669081151485, -0.005501635372638702, 0.006038299761712551, -0.0016289252089336514, -0.017542017623782158, 0.011688094586133957, 0.02765633538365364, -0.01136543694883585, 0.00512629933655262, 0.038666192442178726, 0.0006292639300227165, 0.007210401818156242, 0.01884581707417965, -0.022717704996466637, 0.007572568021714687, 0.006788971833884716, -0.019240908324718475, -0.02537797950208187, -0.0268266461789608, 0.006028422620147467, 0.01822684146463871, 0.012445351108908653, 0.026010125875473022, 0.05360061302781105, 0.0005712350248359144, 0.013973033986985683, -0.020175954326987267, -0.039798785001039505, 0.021993370726704597, 0.023231321945786476, 0.04799032583832741, -0.0022503696382045746, -0.018938004970550537, 0.03634832799434662, 0.019096041098237038, -0.0050275265239179134, 0.002452853601425886, 0.010884743183851242, -0.023007437586784363, -0.0017515679355710745, -0.011312758550047874, -0.0025219942908734083, -0.006953592877835035, -0.009804829023778439, 0.011839545331895351, -0.01162224542349577, 0.0032183413859456778, -0.015553396195173264, -1.1150503269163892e-05, 0.008152034133672714, 0.019227737560868263, 0.007803037296980619, 0.023442037403583527, -0.01642259582877159, -0.014091561548411846, -0.002925315871834755, 0.013735979795455933, 0.0008650835952721536, 0.003073474857956171, 0.0057123503647744656, -0.00999579019844532, -0.039430033415555954, -0.004115526098757982, 0.007677925284951925, 0.027577318251132965, -0.0017647376516833901, -0.000396119401557371, -0.015777280554175377, -0.011661754921078682, 0.04359165206551552, -0.0093175508081913, 0.028051426634192467, 0.004951801151037216, -0.0018338784575462341, -0.010107732377946377, 0.02190118283033371, 0.021255869418382645, -0.03126483038067818, 0.0037928689271211624, 0.01796344853937626, 0.017489340156316757, -0.012952383607625961, 0.023705430328845978, -0.008784178644418716, -0.009225362911820412, -0.005096667446196079, -0.013959864154458046, -0.01351209543645382, -0.02475900575518608, 0.0069733476266264915, 0.01452616136521101, -0.04185325279831886, -0.001875033718533814, 0.017726393416523933, -0.022849401459097862, 0.0034438723232597113, 0.0038949339650571346, -7.52626801840961e-05, 0.00493204640224576, -0.005781491287052631, 0.0032002332154661417, 0.015987996011972427, 0.027629995718598366, -0.010687198489904404, 0.011339097283780575, -0.04293316975235939, 0.013294795528054237, -0.023916145786643028, 0.009976034983992577, -0.008112524636089802, 0.020689573138952255, -0.024153199046850204, 0.002120319055393338, 0.038192082196474075, -0.02324449084699154, 0.008000582456588745, -0.005653086584061384, -0.0004080544167663902, -0.00722357165068388, 0.010397464968264103, 0.020808100700378418, 0.005600407719612122, -0.0307117011398077, -0.020492028445005417, 0.032239384949207306, 0.016290899366140366, -0.028051426634192467, -0.004382212180644274, -0.0187931377440691, -0.03410948067903519, 0.004082601983100176, 0.006574964616447687, -0.00784913171082735, -0.048754166811704636, 0.00033356339554302394, -0.01730496436357498, -0.010595010593533516, -0.013117005117237568, 0.015184645541012287, 0.021005645394325256, 0.0071643078699707985, 0.012629726901650429, 0.030790720134973526, 0.027050530537962914, 0.006410343572497368, 0.010107732377946377, -0.005244826432317495, 0.01951747015118599, 0.024521950632333755, -0.0006683614337816834, 0.010924252681434155, -0.031765278428792953, 0.0059889135882258415, -0.050624262541532516, 0.022098729386925697, -0.041616201400756836, -0.03287152945995331, 0.0154085299000144, -0.010206504724919796, 0.03276617452502251, -0.0013515388127416372, 0.007519889157265425, -0.01222146674990654, -0.015803620219230652, -0.009093666449189186, -0.011497133411467075, 0.003470211522653699, 0.0009473941172473133, 0.01476321555674076, 0.0152504937723279, -0.012688989751040936, 0.002385359024628997, 0.033108584582805634, -0.022967929020524025, 0.028262140229344368, 0.00041443348163738847, 0.0027425866574048996, 0.00332040642388165, -0.010107732377946377, -0.010608180426061153, -0.025825750082731247, -0.008237636648118496, 0.0031903558410704136, 0.018134653568267822, -0.03761261701583862, 0.006169996690005064, 0.033688049763441086, -0.010456728748977184, 0.000609509414061904, 0.047463539987802505, -0.005040696356445551, -0.0007070474093779922, 0.04027289152145386, -0.011846130713820457, -0.01007480826228857, 0.0006342025590129197, -0.006347787566483021, 0.024930210784077644, -0.014671027660369873, 0.009956280700862408, 0.0042175911366939545, 0.014973930083215237, -0.0015383836580440402, -0.025206774473190308, 0.01941211335361004, -0.022862570360302925, -0.032028671354055405, 0.018556084483861923, 0.03226572647690773, 0.032186705619096756, 0.004421721212565899, -0.012656065635383129, -0.01667281985282898, -0.008152034133672714, -0.0052876281552016735, -0.023389358073472977, 0.01463151816278696, 0.011635415256023407, -0.01642259582877159, -0.009008063934743404, -0.02236212231218815, -0.013018231838941574, 0.03434653580188751, -0.04775327071547508, 0.02087394893169403, -0.009008063934743404, 0.023679090663790703, 0.023165473714470863, 0.018108315765857697, -0.009653378278017044, -0.006960177794098854, 0.0027656336314976215, 0.022019710391759872, -0.009429492987692356, -0.010766216553747654, 0.055944815278053284, 0.03806038573384285, -0.02169046923518181, 0.0003759532992262393, -0.0013112066080793738, 0.028209462761878967, 0.019148720428347588, 0.029394732788205147, -0.019715016707777977, -0.014460312202572823, 0.014842233620584011, -0.0077042649500072, 0.003136030863970518, 0.01812148466706276, -0.00825739186257124, 0.017897600308060646, 0.02403467334806919, -0.005304090213030577, -0.013999373652040958, 0.017581528052687645, 0.0047509633004665375, 0.008073016069829464, -0.009014648385345936, 0.03753359988331795, -0.027788031846284866, -0.029631787911057472, -0.008869782090187073, -0.03484698385000229, -0.009495342150330544, -0.017173267900943756, -0.045224692672491074, 0.0379023477435112, 0.02412685938179493, -0.0025713806971907616, 0.021005645394325256, -0.018503405153751373, -0.006347787566483021, 0.009106836281716824, 0.0152768325060606, 0.0011671632528305054, -0.0019803910981863737, 0.00393444299697876, 0.000322039908496663, 0.005557606462389231, -0.036585379391908646, -0.014289106242358685, -0.008566878736019135, -0.007645001169294119, 0.010812310501933098, -0.02158511057496071, -0.01931992545723915, -0.006874574813991785, -0.011984411627054214, 0.015606074593961239, -0.0016560876974835992, 0.0010889682453125715], "index": 28}, {"title": "Floro Dery", "text": "Floro Dery is a Filipino illustrator best known for his works in the 1980s The Transformers TV series and was the visual creator of The Transformers: The Movie. He interpreted some of the toys' box art and created the models that would become the visual guidelines both for the comics book and the animated cartoon appearances of those characters.", "vector": [-0.0020521909464150667, 0.015754757449030876, -0.024402707815170288, -0.036891527473926544, 0.026351090520620346, 0.019276222214102745, 0.014796536415815353, -0.03168519213795662, -0.05292576551437378, 0.10061325877904892, -0.012967931106686592, 0.03944678604602814, -0.023188959807157516, -0.020761465653777122, -0.005006707273423672, 0.003830889705568552, -0.019435925409197807, 0.010149162262678146, -0.05334099754691124, -0.02561645396053791, 0.048262421041727066, -0.03564583882689476, 0.007881371304392815, 0.020330265164375305, 0.034144625067710876, 0.023412544280290604, 0.023700011894106865, -0.03759422153234482, -0.04973169416189194, -0.0076098754070699215, 0.03210042044520378, 0.0030024272855371237, 0.026910053566098213, 0.022055065259337425, -0.0056734695099294186, 0.017599334940314293, 0.007769579067826271, 0.03580554202198982, 0.01436533685773611, 0.006811357568949461, 0.017551423981785774, -0.017599334940314293, 0.0275169275701046, 0.0035254566464573145, 0.000530016259290278, 0.02414718084037304, -0.033346109092235565, 0.03016800619661808, -0.019499806687235832, 0.039255138486623764, -0.0027488977648317814, -0.02338060364127159, -0.012113516218960285, 0.026191387325525284, -0.013718537986278534, -0.020122651010751724, 0.08266257494688034, 0.0673949122428894, 0.01141880638897419, -0.03202056884765625, 0.028938287869095802, -0.0630190297961235, 0.03989395499229431, -0.024402707815170288, 0.061326175928115845, 0.03016800619661808, -0.010963650420308113, 0.02599974349141121, 0.002724942285567522, 0.024674203246831894, 0.04212980344891548, -0.06452024728059769, -0.052095308899879456, 0.015395425260066986, 0.030663087964057922, 0.029018141329288483, 0.016657084226608276, -0.05084962025284767, -0.005162418354302645, -0.05043439194560051, -0.021384309977293015, 0.011314998380839825, -0.023188959807157516, 0.07193049043416977, -0.021687746047973633, -0.01807844452559948, -0.02093713916838169, -0.05557684600353241, 0.019691450521349907, -0.007637823931872845, -0.01807844452559948, -0.03144563362002373, -0.011834035627543926, -0.03775392472743988, 0.007821482606232166, 0.005086558870971203, 0.037147052586078644, 0.01177813857793808, -0.004180241376161575, -0.008967355825006962, 0.009781843982636929, -0.00861600786447525, -0.011035517789423466, -0.001972339116036892, 0.010540436021983624, 0.011235146783292294, -0.02473808452486992, 0.018254119902849197, 0.0326593816280365, 0.045483577996492386, 0.008855563588440418, -0.04161875322461128, -0.02140028029680252, 0.039925895631313324, 0.004176248796284199, 0.026175417006015778, -0.06253992021083832, -0.034112684428691864, 0.008320556953549385, -0.058547332882881165, 0.004463715013116598, -0.09218090772628784, -0.024051358923316002, 0.008560111746191978, 0.017583364620804787, -0.057365525513887405, 0.008839593268930912, -0.00042745660175569355, 0.04267279803752899, -0.0005499792168848217, -0.04909288138151169, -0.00616056565195322, 0.06733103096485138, 0.0020072744227945805, 0.04382266104221344, 0.0126644941046834, -0.0380733348429203, -0.006128625012934208, -0.010947680100798607, 0.05608789622783661, 0.042864441871643066, 0.008176823146641254, 0.021464161574840546, -0.003952663391828537, -0.05171201750636101, -0.026989905163645744, -0.026303179562091827, 0.07729653269052505, 0.04928452521562576, -0.0218634195625782, -0.044685062021017075, -0.01913248933851719, 0.031158167868852615, -0.014716684818267822, 0.06474383175373077, -0.012361057102680206, -0.072505421936512, -0.056726712733507156, -0.012696434743702412, 0.01656126044690609, -0.009047207422554493, 0.042161744087934494, -0.03612494841217995, -0.0038907784037292004, -0.0483582429587841, -0.04193815961480141, 0.05726970359683037, 0.030599206686019897, -0.019020697101950645, 0.037945572286844254, 0.03130190074443817, 0.06081512197852135, 0.0545228011906147, 0.02772454172372818, -0.03998977690935135, 0.02435479685664177, -0.06579787284135818, 0.0010710121132433414, -0.03539031371474266, -0.020889228209853172, -0.02173565700650215, 0.03388909995555878, 0.012935989536345005, -0.028363356366753578, -0.0008309576660394669, 0.037434518337249756, 0.056439246982336044, 0.05289382487535477, 0.010636258870363235, -0.01748754270374775, -0.0018815078074112535, 0.014229589141905308, -0.027820363640785217, -0.022023124620318413, 0.03131787106394768, -0.03408074378967285, -0.07327200472354889, -0.014572951942682266, -0.06084706261754036, -0.04142710939049721, 0.031621307134628296, 0.050083041191101074, 0.0666283369064331, -0.0010410677641630173, -0.009342659264802933, -0.037434518337249756, -0.023188959807157516, 0.027660660445690155, -0.0036771749146282673, -0.030231887474656105, 0.0352306105196476, 0.006252394989132881, 0.008759741671383381, 0.009087134152650833, 0.0037450490053743124, -0.005401973612606525, -0.015874536707997322, -0.017040371894836426, 0.029976362362504005, -0.015754757449030876, 0.017072312533855438, 0.03733869642019272, -0.01573878712952137, 0.0018116375431418419, 0.027708571404218674, -0.018813081085681915, -0.04516417160630226, -0.011171265505254269, -0.011307013221085072, 0.012592627666890621, -0.024003447964787483, 0.004443752113729715, 0.029848599806427956, -0.02077743597328663, -0.05110514536499977, -0.0021919317077845335, 0.031126227229833603, -0.027373192831873894, -0.029864570125937462, 0.01782291941344738, -0.01895681582391262, -0.004463715013116598, -0.020154591649770737, -0.012249264866113663, 0.08911459892988205, 0.007953238673508167, -0.026319149881601334, -0.06110259145498276, -0.032084450125694275, 0.003010412445291877, 0.007050913292914629, 0.02397150732576847, 0.07550784945487976, 0.041267406195402145, -0.01527564786374569, 0.029050081968307495, 0.003226012224331498, 0.04848600551486015, -0.00021971718524582684, 0.03896767273545265, -0.05953749641776085, 0.004200204275548458, 0.017727097496390343, -0.026191387325525284, -0.013175545260310173, 0.027916185557842255, 0.00273891631513834, 0.01550721749663353, 0.031078316271305084, -0.013638685457408428, 0.010676184669137001, -0.03951066732406616, 0.009941548109054565, -0.010117221623659134, 0.01284815277904272, 0.041395168751478195, -0.026015713810920715, 0.07001405209302902, 0.06471189111471176, 0.04315190762281418, 0.030327709391713142, -0.04264085739850998, -0.013622715137898922, 0.01523572113364935, -0.01975533366203308, 0.0339529812335968, 0.019052637740969658, -0.01651334948837757, -0.001149865798652172, -0.02805991843342781, -0.028874406591057777, -0.006356202531605959, -0.005917017813771963, -0.029896510764956474, 0.034144625067710876, 0.0061685508117079735, 0.03989395499229431, -0.016625143587589264, 0.008033090271055698, 0.006919157691299915, -0.0018535596318542957, -0.03210042044520378, -0.0044158040545880795, -0.04382266104221344, 0.016297750174999237, -0.005382010713219643, -0.012169413268566132, 0.03922319784760475, 0.009749903343617916, -0.03050338290631771, -0.048677653074264526, -0.012273220345377922, -0.022534174844622612, -0.04133128747344017, -0.01874919980764389, -0.02764469012618065, 0.012840167619287968, -0.006499935872852802, -0.03356969356536865, -0.0014173692325130105, 0.027453046292066574, 0.0137584637850523, -0.05164813622832298, 0.006128625012934208, 0.03016800619661808, 0.039670370519161224, 0.07499679923057556, -0.009781843982636929, 0.03539031371474266, 0.0009776853257790208, -0.027836333960294724, -0.0020442057866603136, 0.043119966983795166, 0.004779129754751921, -0.020250413566827774, 0.004443752113729715, -0.043375492095947266, 0.024578381329774857, -0.02708572708070278, -0.05496997386217117, 0.0043519227765500546, 0.03289893642067909, -0.03224415332078934, -0.0008614012040197849, -0.03130190074443817, -0.08010731637477875, 0.021480131894350052, 0.022486263886094093, -0.00891145970672369, -0.022310590371489525, 0.0007810503011569381, -0.043503254652023315, -0.03251564875245094, -0.028842465952038765, -0.007661779411137104, -0.0058211954310536385, 0.009542289189994335, -0.015171839855611324, 0.0012347083538770676, 0.02603168413043022, 0.007354349829256535, 0.023013286292552948, 0.03733869642019272, 0.012904048897325993, 0.04149099066853523, 0.002155998256057501, -0.01628177985548973, -0.025856008753180504, -0.01921234093606472, 0.06611727923154831, -0.0006228439742699265, 0.005609588231891394, -0.06343426555395126, -0.012760316021740437, 0.027884244918823242, -0.009598185308277607, 0.030199946835637093, 0.015467291697859764, -0.0627635046839714, 0.013502937741577625, -0.022693878039717674, 0.004395841155201197, -0.009694007225334644, -0.006268365308642387, -0.0045435670763254166, 0.0034655677154660225, -0.04289638251066208, -0.04302414506673813, -0.016401557251811028, -0.01284815277904272, 0.012033664621412754, -0.01306375302374363, 0.033186402171850204, -0.006755461450666189, -0.002106091007590294, 0.05199948698282242, 0.0390954352915287, 0.03555001690983772, 0.031030405312776566, -0.017806949093937874, -0.0302159171551466, 0.0013874248834326863, -0.00931071862578392, -0.02898620069026947, 0.021591924130916595, -0.01612207666039467, -0.0017417671624571085, 0.009622140787541866, 0.017535453662276268, 0.0486137680709362, -0.02684617228806019, 0.05608789622783661, 0.05011498183012009, 0.0052542476914823055, 0.012856137938797474, -0.05212724953889847, 0.01694454997777939, -0.0006373170763254166, -0.009198926389217377, -0.003727082395926118, 0.06880030035972595, 0.07084450870752335, -0.013111663982272148, 0.037690043449401855, 0.04097994044423103, 0.045483577996492386, 0.023652100935578346, 0.009302733466029167, 0.0056654843501746655, -0.0023536314256489277, -0.024322854354977608, 0.027708571404218674, -0.007737638428807259, -0.02183147892355919, -0.0018515633419156075, -0.005952951032668352, -0.013055767863988876, 0.010141177102923393, -0.003263941965997219, 0.0799795538187027, 0.003645234275609255, -0.005701418034732342, -0.027532897889614105, -0.014421232976019382, -0.051552314311265945, -0.001959363231435418, 0.010229013860225677, -0.06381755322217941, -0.03641241788864136, 0.026766320690512657, 0.006076721008867025, -0.024961668998003006, -0.011562539264559746, -0.05043439194560051, 0.02528107725083828, -0.0028606904670596123, 0.010772006586194038, 0.0029884532559663057, -0.02245432324707508, 0.010835887864232063, -0.01428548526018858, 0.08112941682338715, 0.00301839760504663, -0.02347642555832863, 0.026957964524626732, -0.019531747326254845, 0.005382010713219643, -0.022310590371489525, -0.03205250948667526, -0.016209913417696953, -0.007250542752444744, 0.03864826634526253, 0.030519355088472366, -0.0003520964819472283, 0.05152037367224693, 0.01656126044690609, 0.04260891675949097, -0.01354286354035139, 0.017040371894836426, -0.018637407571077347, 0.07550784945487976, -0.02767663076519966, 0.011482687667012215, -0.00918295606970787, 0.010939694941043854, 0.0136945815756917, 0.014572951942682266, 0.01921234093606472, 0.0023656091652810574, 0.07774370163679123, 0.03749839961528778, -0.013151589781045914, -0.017966652289032936, 0.015219750814139843, -0.03602912649512291, -0.043119966983795166, -0.07026957720518112, -0.0021480130963027477, -0.0007356345886364579, -0.03631659597158432, -0.022725818678736687, 0.03264341130852699, 0.029273666441440582, 0.029688894748687744, -0.01609812118113041, -0.002601172076538205, -0.011003576219081879, 0.05778075382113457, 0.02895425818860531, 0.01236904226243496, 0.02936948835849762, 0.037147052586078644, 0.039255138486623764, 0.01333524938672781, 0.003910741303116083, -0.00451961113139987, 0.023061197251081467, 0.007426216267049313, -0.016058195382356644, -0.006923150271177292, 0.03526255115866661, -0.011722242459654808, 0.027245430275797844, 0.017327837646007538, -0.007613867986947298, 0.013431071303784847, 0.0017367764376103878, 0.03205250948667526, -0.005677462089806795, 0.028714703395962715, 0.022518204525113106, 0.006887217052280903, 0.007214609067887068, 0.0176153052598238, 0.002571227727457881, -0.007370320148766041, 0.009598185308277607, 0.0060966843739151955, -0.019739363342523575, -0.03325028717517853, -0.019643539562821388, -0.018860992044210434, -0.020969079807400703, -0.05206336826086044, -0.006280343513935804, -0.008719815872609615, 0.049891397356987, -0.029018141329288483, 0.0009068169165402651, -0.021815508604049683, 0.005988884251564741, 0.029609043151140213, -0.017599334940314293, 0.056567009538412094, 0.0068153501488268375, 0.0028606904670596123, -0.07154720276594162, 0.030311739072203636, -0.004627411253750324, -0.024450618773698807, 0.023013286292552948, 0.008560111746191978, 0.0018226171378046274, 0.04369489848613739, 0.01882905140519142, -0.021416250616312027, -0.027532897889614105, -0.01913248933851719, -0.03855244442820549, -0.020250413566827774, 0.011985753662884235, -0.019787274301052094, -0.018429793417453766, 0.03516672924160957, -0.025600483641028404, 0.042576976120471954, 0.026047654449939728, -0.0003603312070481479, -0.032803114503622055, -0.01803053356707096, 0.010340807028114796, -0.015251691453158855, 0.004647374153137207, 0.03877602890133858, 0.01561102457344532, -0.000684729078784585, -0.025808097794651985, 0.021927300840616226, 0.01833397150039673, 0.008520185947418213, -0.021815508604049683, 0.0032539605163037777, 0.03551807627081871, 0.004994729533791542, 0.0067794169299304485, -0.0020382169168442488, 0.0065877726301550865, 0.011586494743824005, 0.01184202078729868, -0.026047654449939728, 0.013710551895201206, 0.024003447964787483, 0.010077295824885368, -0.020202502608299255, 0.0008698854362592101, -0.030199946835637093, 0.015619009733200073, -0.031062345951795578, 0.03740257769823074, -0.008831608109176159, 0.011179250665009022, -0.020202502608299255, 0.01638558693230152, 0.04979557543992996, 0.01367062609642744, 0.007789541967213154, -0.032675351947546005, 0.012313146144151688, -0.0359971858561039, -0.042289506644010544, -0.010396703146398067, -0.018126355484128, 0.020761465653777122, 0.03791363164782524, -0.03289893642067909, -0.011203206144273281, 0.020889228209853172, -0.02401941828429699, -0.033729396760463715, -0.0029345531947910786, 0.0028766607865691185, 0.010883798822760582, -0.018845021724700928, -0.0486137680709362, 0.022358501330018044, -0.028411267325282097, 0.006871246732771397, 0.005725373513996601, 0.026399001479148865, -0.02203909493982792, -0.010524465702474117, -0.024035388603806496, 0.010636258870363235, -0.02144819125533104, 0.007917304523289204, -0.0099016223102808, -0.0035074898041784763, -0.0318928062915802, 0.01175418309867382, 0.012201353907585144, -0.018525615334510803, 0.007014979608356953, -0.03753034025430679, 0.008759741671383381, 0.015427365899085999, -0.031126227229833603, 0.01615401729941368, 0.005070588551461697, -0.014820491895079613, 0.01327136717736721, -0.001716813538223505, 0.02708572708070278, -0.008655933663249016, 0.0013664637226611376, 0.007593905087560415, 0.012337101623415947, 0.023460455238819122, 0.01681678742170334, -0.004966781474649906, 0.0011578509584069252, 0.019499806687235832, 0.056854475289583206, -0.048677653074264526, -0.008344512432813644, 0.019978918135166168, -0.0035015009343624115, 0.018573526293039322, 0.025057490915060043, -0.02831544540822506, 0.019867125898599625, -0.02540883980691433, 0.0063322470523417, -0.007649801671504974, 0.03125398978590965, 0.019403984770178795, 0.005401973612606525, 0.012297175824642181, -0.030870702117681503, 0.012696434743702412, 0.0434713140130043, 0.0017397708725184202, -0.03826497867703438, -0.04724032059311867, 0.006791394669562578, -0.0005025672144256532, 0.0004464214143808931, -0.008456304669380188, -0.03970231115818024, 0.012456879019737244, 0.005641528870910406, -0.006891209632158279, 0.009166985750198364, -0.04407818987965584, 0.012959945946931839, -0.009765873663127422, 0.03243579715490341, -0.003497508354485035, -0.008735786192119122, -0.002251820405945182, -0.02358821965754032, 0.012233294546604156, 0.0059409732930362225, 0.01828606054186821, -0.017631275579333305, 0.016673054546117783, -0.01684872806072235, 0.004339944571256638, 0.00044667095062322915, -0.033729396760463715, -0.0074182311072945595, 0.026494823396205902, 0.04452535882592201, 0.007629838772118092, -0.005278203170746565, 0.0016918597975745797, 0.0059130252338945866, 0.00036706868559122086, -0.037945572286844254, 0.00377100077457726, 0.001421361812390387, 0.015052062459290028, 0.0016100116772577167, -0.01841382309794426, -0.0019603613764047623, 0.034272387623786926, 0.010340807028114796, -0.007478120271116495, 0.005661491770297289, -0.005186373833566904, 0.0067434837110340595, 0.0030742939561605453, 0.020074740052223206, -0.02371598221361637, 0.020378176122903824, -0.013510922901332378, -0.013239426538348198, -0.03034367971122265, 0.021847449243068695, 0.031541455537080765, -0.02199118211865425, 0.08477065712213516, -0.01112335454672575, 0.020202502608299255, 0.026957964524626732, -0.023141048848628998, 0.0007725660689175129, 0.01862143725156784, -0.01926025189459324, 0.02312507852911949, 0.00466733705252409, -0.024849876761436462, -0.0030962531454861164, -0.01777500845491886, 0.05771687254309654, 0.04845406487584114, 0.010316851548850536, 0.00819279346615076, -0.04056470841169357, 0.0011728231329470873, 0.05861121416091919, 0.0050266701728105545, -0.00618452113121748, -0.018254119902849197, -0.04014948010444641, 0.00103008805308491, 0.003283904865384102, -0.010907754302024841, -0.02397150732576847, -0.0026391015853732824, -0.013367190025746822, -0.04740002378821373, 0.016233868896961212, -0.034911204129457474, -0.021975211799144745, -0.025776157155632973, 0.033729396760463715, 0.022358501330018044, 0.01684872806072235, 0.010548421181738377, 0.04292832314968109, 0.017679186537861824, 0.034783441573381424, -0.02435479685664177, -0.009965503588318825, 0.01756739430129528, -0.02384374476969242, -0.016042225062847137, 0.034911204129457474, -0.021208634600043297, -0.02569630555808544, -0.027437075972557068, -0.0023157019168138504, 0.01731186732649803, -0.0077296532690525055, 0.010963650420308113, 0.025776157155632973, 0.0041123670525848866, -0.03186086565256119, -0.004371885675936937, -0.024322854354977608, 0.0295771025121212, 0.00743819447234273, 0.027660660445690155, -0.03542225435376167, 0.012416953220963478, -0.007462149951606989, -0.013982048258185387, -0.023204930126667023, -0.04040500521659851, -0.02651079371571541, -0.020330265164375305, 0.007258527912199497, -0.018781140446662903, 0.006635683588683605, -0.014253544621169567, 0.009382585063576698, 0.011698286980390549, -0.016233868896961212, 0.0293215773999691, -0.01095566526055336, -0.03312252089381218, -0.010213043540716171, 0.010077295824885368, -0.01080394722521305, 0.01592244766652584, 0.015251691453158855, -0.008344512432813644, -0.014932285062968731, 0.0024774018675088882, -0.0018146319780498743, -0.0037510378751903772, 0.014796536415815353, -0.014469143934547901, -0.022310590371489525, -0.012377027422189713, -0.007721668109297752, -0.0169764906167984, -0.0046793147921562195, -0.0016469431575387716, -0.033857159316539764, 0.017663216218352318, 0.0003735566569957882, -0.019483836367726326, 0.018318001180887222, -0.016114091500639915, -0.013718537986278534, -0.0008169836364686489, 0.03753034025430679, 0.0068153501488268375, 0.006563817150890827, -0.027836333960294724, 0.012712405063211918, 0.020537881180644035, -0.03144563362002373, 0.02641497179865837, -0.025392869487404823, 0.011873961426317692, 0.024754054844379425, -0.001185799133963883, -0.047847192734479904, -0.00683531304821372, -0.010692154988646507, 0.008735786192119122, 0.011434776708483696, -0.02536092884838581, -0.0015111950924620032, -0.0126644941046834, -0.01175418309867382, 0.013798389583826065, 0.0028147755656391382, 0.021352369338274002, 0.0011848009889945388, -0.012385012581944466, -0.0011598472483456135, 0.010572376661002636, -0.016784846782684326, -0.005605595652014017, 0.010093266144394875, -0.008464289829134941, -0.019372044131159782, -0.05778075382113457, 0.02528107725083828, -0.02312507852911949, -0.06860865652561188, 0.015020121820271015, -0.014429218135774136, -0.010165132582187653, -0.015595054253935814, -0.02507346123456955, -0.017168134450912476, 0.010748051106929779, -0.018349941819906235, 0.038616325706243515, -0.005928995553404093, 0.040181420743465424, 0.04899705946445465, 0.013814359903335571, 0.007038935087621212, 0.024450618773698807, -0.022518204525113106, 0.006388143170624971, -0.02072952501475811, 0.04343937337398529, 0.038488563150167465, -0.01537945494055748, -0.0031481569167226553, 0.018557555973529816, -0.003269930835813284, 0.028842465952038765, -0.0035015009343624115, -0.03513478860259056, -0.0203142948448658, 0.0025452757254242897, -0.002443464705720544, -0.01988309621810913, -0.029848599806427956, -0.01287210825830698, -0.031749073415994644, -0.025392869487404823, 0.03906349465250969, -0.01900472678244114, -0.0013095693429931998, -0.053788166493177414, -0.024450618773698807, 0.027948126196861267, 0.034112684428691864, -0.041011881083250046, 0.035965245217084885, 0.017503513023257256, -0.023955537006258965, 0.03179698437452316, 0.018845021724700928, -0.008172830566763878, -0.008272645063698292, -0.03356969356536865, -0.03590136393904686, -0.02178356796503067, 0.01141880638897419, 0.017184104770421982, -0.007210616488009691, 0.03008815459907055, -0.034112684428691864, -0.03871214762330055, 0.017535453662276268, -0.01638558693230152, 0.02451450005173683, -0.00136945815756917, -0.02607959508895874, 0.03257953003048897, 0.016864698380231857, -0.0015151876723393798, 0.025392869487404823, -0.0342085063457489, -0.019451895728707314, -0.023604189977049828, -0.05532132089138031, -0.02072952501475811, 0.012656508944928646, -0.0077655864879488945, -0.015674905851483345, -0.004787114914506674, 0.008735786192119122, 0.009861696511507034, -0.006503928452730179, 0.007709690369665623, 0.06483965367078781, 0.007621853146702051, 0.0047990926541388035, -0.018557555973529816, 0.009262807667255402, -0.054714445024728775, 0.015443336218595505, -0.029209785163402557, 0.05861121416091919, 0.019946977496147156, 0.027564838528633118, -0.021623864769935608, -0.011291042901575565, -0.020026829093694687, 0.007286475971341133, -0.042033981531858444, 0.017295897006988525, -0.009973488748073578, -0.03356969356536865, 0.02839529700577259, -0.0030084161553531885, -0.0352306105196476, -0.0031261974945664406, 0.03160533681511879, -0.011442761868238449, 0.0026311164256185293, -0.01866934821009636, -0.039287079125642776, 0.014077870175242424, -0.0028367347549647093, 0.04315190762281418, 0.042289506644010544, -0.005765299312770367, 0.009063177742064, 0.01327136717736721, 0.0021400279365479946, -0.010628273710608482, -0.025249136611819267, -0.016752906143665314, -0.010101251304149628, -0.006268365308642387, 0.029768748208880424, 0.0196754802018404, -0.00878369715064764, 0.05944167077541351, -0.003313849214464426, -0.0031102271750569344, -0.02679826132953167, 0.03016800619661808, 0.005537721794098616, 0.027245430275797844, 0.02409926988184452, 0.020378176122903824, -0.005621565971523523, -0.0028307458851486444, 0.015419380739331245, 0.006064743269234896, -0.015778712928295135, 0.010540436021983624, -0.004511625971645117, -0.007581927347928286, -0.0008089984767138958, -0.016209913417696953, 0.006627698428928852, 0.004032515455037355, 0.015746772289276123, 0.02726140059530735, -0.005058610811829567, 0.025297047570347786, -0.025057490915060043, -0.03366551548242569, -0.03353775292634964, 0.002092116978019476, 0.01882905140519142, 0.006667624693363905, 0.007490098010748625, 0.0010126205161213875, 0.011802094988524914, -0.03131787106394768, -0.008009134791791439, 0.012480834499001503, 0.006503928452730179, -0.003962645307183266, -0.005086558870971203, 0.0031641272362321615, 0.029513221234083176, -0.018270090222358704, -0.01854158565402031, 0.02823559381067753, 0.009869681671261787, -0.01215344201773405, -0.0024274943862110376, 0.013031812384724617, -0.0071627055294811726, -0.025600483641028404, -0.0067434837110340595, -0.026367060840129852, -0.0017946689622476697, -0.03328222781419754, -0.0040405006147921085, 0.026271238923072815, 0.006619713269174099, -0.030934583395719528, -0.05279800295829773, 0.042033981531858444, 0.02136833965778351, 0.009981473907828331, 0.0069351280108094215, -0.005781269632279873, 0.0004207191232126206, 0.03516672924160957, 0.022645967081189156, 0.001318552647717297, -0.011738212779164314, -0.03235594555735588, -0.004212182015180588, -0.00022533176525030285, -0.016465438529849052, -0.014964225701987743, 0.0253289882093668, 0.00743819447234273, 0.013470997102558613, 0.032419826835393906, 0.015986328944563866, -0.017854860052466393, -0.009741918183863163, -0.024386737495660782, -0.004850996192544699, -0.03555001690983772, 0.02317298948764801, -0.0033158455044031143, 0.01518781017512083, 0.009342659264802933, 0.014509070664644241, 0.008184808306396008, -0.014612877741456032, -0.02481793612241745, -0.03350581228733063, 0.0019114522729068995, -0.0048350258730351925, -0.008879519067704678, -0.02389165572822094, -0.0268781129270792, 0.004942825995385647, 0.004375878255814314, 0.036891527473926544, -0.01756739430129528, 0.015155869536101818, 0.003778985934332013, -0.04420595243573189, 0.02001085877418518, -0.0034935157746076584, 0.04580298811197281, -0.003986600786447525, -0.00901526678353548, -0.0010720102582126856, -0.008847578428685665, 0.0025093425065279007, 0.011267087422311306, 0.02355627715587616, -0.014013988897204399, 0.02085728757083416, 0.006164558231830597, 0.005154433194547892, 0.0004132330068387091, 0.003367749275639653, -0.02582406811416149, -0.0033178417943418026, 0.01985115557909012, -0.021559983491897583, 0.048901237547397614, -0.019244281575083733, -0.019052637740969658, -0.017407691106200218, 0.012113516218960285, 0.007577934768050909, -0.018813081085681915, 0.021639835089445114, 0.011698286980390549, -0.012560687027871609, -0.015810653567314148, 0.022007152438163757, 0.0006987031665630639, 0.008879519067704678, 0.0191644299775362, 0.009662066586315632, 0.0029505237471312284, -0.02409926988184452, -0.00356538244523108, 0.008655933663249016, -0.01550721749663353, 0.0006303300615400076, -0.02018653228878975, 0.011514628306031227, -0.018637407571077347, 0.004719240590929985, -0.013606744818389416, 0.019739363342523575, -0.02312507852911949, -0.02633512020111084, -0.012329116463661194, 0.04676120728254318, -0.012959945946931839, 0.0028008015360683203, -0.019244281575083733, 0.03198862820863724, 0.00740625336766243, 0.016992460936307907, -0.03606106713414192, 0.00356538244523108, -0.008156860247254372, -0.04490864649415016, 0.014820491895079613, -0.005553692113608122, 0.014381307177245617, -0.005829180590808392, 0.01731186732649803, 0.027612749487161636, -0.0101571474224329, -0.01632969081401825, 0.003475549165159464, 0.0031341826543211937, -0.02136833965778351, -0.0109317097812891, 0.020697584375739098, -0.03896767273545265, -0.006827327888458967, 0.005230292212218046, -0.003146160626783967, 0.012065605260431767, 0.024386737495660782, 0.01097962073981762, -0.014596907421946526, -0.021001020446419716, 0.006408106070011854, -0.025041520595550537, -0.008903474546968937, -0.007038935087621212, 0.01651334948837757, -0.02052191086113453, 0.010516480542719364, 0.010189088061451912, -0.00824070442467928, -0.004008559975773096, 0.0003802941646426916, -0.026941994205117226, -0.026686469092965126, 0.029257696121931076, -0.0026530756149441004, -0.0021919317077845335, -0.0031122234649956226, -0.025584513321518898, -0.021512072533369064, 0.0014942266279831529, 0.03762616217136383, -0.020889228209853172, -0.037274815142154694, 0.014293470419943333, 0.027580808848142624, 0.012672479264438152, -0.04660150408744812, 0.020713554695248604, 0.015459306538105011, -0.02700587548315525, 0.013646670617163181, -0.03309058025479317, -0.03181295469403267, -0.007478120271116495, -0.04123546555638313, 0.004284048452973366, 0.005825188010931015, 0.03906349465250969, -0.005972913932055235, 0.011179250665009022, -0.0336974561214447, -0.02039414644241333, 0.015563113614916801, -0.005813210271298885, 0.039670370519161224, 0.036380477249622345, 0.015595054253935814, -0.0027269385755062103, 0.00011428787547629327, 0.003249967936426401, 0.035581957548856735, -0.012712405063211918, -0.00013412605039775372, 0.0021220613270998, -0.03868020698428154, 0.023332692682743073, 0.0271336380392313, -0.030008303001523018, -0.00245943502523005, -0.000846928043756634, 0.03535837307572365, -0.01946786604821682, -0.0049068923108279705, -0.02347642555832863, 0.0196754802018404, -0.008839593268930912, 0.0147885512560606, 0.003078286536037922, -0.01643349789083004, 0.030327709391713142, 0.009885651990771294, 0.018046503886580467, -0.0244346484541893, -0.0068632615730166435, 0.037147052586078644, -3.290767199359834e-05, -0.013247411698102951, -0.01070014014840126, -0.04200204089283943, -0.020745495334267616, 0.03896767273545265, -0.01828606054186821, 0.014884374104440212, 0.00035783584462478757, 0.015068032778799534, -0.012560687027871609, 0.019403984770178795, -0.016992460936307907, 0.002217883476987481, 0.011235146783292294, 0.0018505651969462633, 0.0061685508117079735, -0.01244889385998249, -0.0005100533016957343, -0.015730801969766617, 0.006268365308642387, 0.018477704375982285, -0.015850581228733063, -0.016960520297288895, 0.005585632752627134, 0.04053276777267456, 0.01972339302301407, 0.030439501628279686, -0.0008374456665478647, -0.01314360462129116, 0.004236137494444847, 0.009821769781410694, 0.03227609395980835, -0.030854731798171997, -0.0393509604036808, -0.011322983540594578, 0.004759166855365038, -0.005928995553404093, 0.022981345653533936, 0.007797527126967907, -0.0403730645775795, -0.0033158455044031143, -0.02574421651661396, -0.022390441969037056, -0.03194071725010872, -0.014604892581701279, 0.004659351892769337, -0.006639676168560982, -0.032132361084222794, 0.00451961113139987, 0.022278649732470512, -0.03868020698428154, 0.018940845504403114, 0.018733229488134384, 0.0010999584337696433, 0.03647629916667938, -0.005517758894711733, -0.019020697101950645, -0.0003131687408313155, -0.008053053170442581, -0.031956687569618225, -0.014141752384603024, -0.0025073462165892124, 0.01795068196952343, 0.011770153418183327, -0.010684169828891754, 0.008671903982758522, -0.004515618551522493, -0.008871533907949924, 0.021384309977293015, -0.023364633321762085, 0.011171265505254269, 0.00819279346615076, 0.015850581228733063, -0.012488819658756256, 0.03535837307572365, -0.010795962065458298, -0.008041075430810452, -0.01137887965887785, -0.01535549946129322, 0.010205058380961418, 0.02111281268298626, 0.028012007474899292, -0.012089560739696026, -0.022997315973043442, -0.017806949093937874, -0.037690043449401855, -0.011283057741820812, -0.009342659264802933, 0.018110385164618492, 0.011314998380839825, -0.029976362362504005, 0.011171265505254269, -0.01934010349214077, -0.0159464031457901, 0.008927430026233196, 0.011434776708483696, 0.005142455454915762, 0.016401557251811028, 0.0026331127155572176, -0.00781749002635479, -0.01346301194280386, -0.012161427177488804, -0.0008604030590504408, -0.007865400984883308, 0.01165037602186203, 0.02026638388633728, 0.0054099587723612785, 0.02651079371571541, -0.03947872668504715, 0.019563687965273857, 0.02195924147963524, 0.020026829093694687, -0.0347195565700531, -0.0069351280108094215, 0.02090519852936268, -0.0008564104209654033, -0.007893349044024944, -0.013399130664765835, -0.03205250948667526, 0.02191133052110672, -0.006639676168560982, 0.009190941229462624, 0.014588922262191772, 0.0070828539319336414, -0.02127251774072647, 0.007086846511811018, 0.024578381329774857, -0.02103296108543873, 0.017407691106200218, -0.0020741501357406378, -0.01030088122934103, -0.022997315973043442, 0.004052478354424238, 0.041395168751478195, 0.034368209540843964, -0.0321483314037323, -0.005641528870910406, 0.01735977828502655, 0.018892932683229446, -0.008831608109176159, -0.019707422703504562, -0.010069310665130615, -0.06432860344648361, 0.04883735626935959, -0.004998722113668919, -0.007893349044024944, 0.024003447964787483, -0.0029804680962115526, 0.010684169828891754, 0.01558706909418106, -0.005194358993321657, -0.020026829093694687, 0.008232719264924526, 0.004032515455037355, -0.02144819125533104, 0.03331416845321655, 0.01428548526018858, 0.017184104770421982, 0.026175417006015778, -0.03016800619661808, 0.025632424280047417, 0.010173117741942406, -0.01196978334337473, -0.0073822978883981705, -0.022182827815413475, 0.030535325407981873, 0.005960936192423105, 0.011115369386970997, -0.006927142851054668, 0.0003196566831320524, 0.009869681671261787, 0.0017427653074264526, -0.002068161265924573, -0.0023436499759554863, 0.009813784621655941, 0.0031800975557416677, -0.022725818678736687, -0.0046074483543634415, -0.01836591213941574, -0.013175545260310173, 0.04516417160630226, -0.026399001479148865, -0.015547143295407295, 0.03299475833773613, -0.01055640634149313, 0.029337547719478607, 0.022741788998246193, -0.015579083934426308, 0.01815829798579216, 0.037562280893325806, 0.003607304533943534, 0.024594351649284363, -0.02620735764503479, -0.028203653171658516, -0.011834035627543926, 0.0067195282317698, 0.018302030861377716, 0.0061326175928115845, 0.002930560614913702, -0.007234571967273951, 0.0432157889008522, -0.020841317251324654, 0.003381723305210471, 0.014996166341006756, -0.0005195357371121645, 0.009622140787541866, 0.003593330504372716, -0.044940587133169174, 0.023141048848628998, -0.02363613061606884, 0.03150951489806175, 0.01101954746991396, -0.037019290030002594, 0.020042799413204193, 0.013662640936672688, 0.011003576219081879, 0.006340232212096453, 0.01681678742170334, 0.019611598923802376, -0.013255396857857704, 0.010708125308156013, 0.022773729637265205, -0.013638685457408428, -0.006679602432996035, -0.015459306538105011, 0.0012646527029573917, -0.0019633558113127947, -0.018349941819906235, -0.021144753322005272, -0.030774880200624466, 0.01777500845491886, -0.029129933565855026, 0.006176535971462727, -0.0200587697327137, 0.02350836619734764, -0.007861408405005932, 0.00506659597158432, -0.0034495973959565163, 0.02350836619734764, 0.0014523044228553772, 0.005334099754691124, -0.044046249240636826, -0.004898907151073217, 0.03868020698428154, -0.01887696236371994, -0.020330265164375305, -0.0380733348429203, -0.01694454997777939, -0.004827040713280439, 0.0007076864712871611, 0.0023576240055263042], "index": 29}, {"title": "MP4 (disambiguation)", "text": "MP4 is MPEG-4 Part 14, a file format.MP4 may also refer to: M\u00f8ller\u2013Plesset perturbation theory of the fourth order in computational chemistry Mario Party 4, a video game for Nintendo GameCube MP4 (band), a band made up of UK Members of Parliament Mammal Paleogene zone 4, a division of the Paleogene period McLaren MP4/1, the McLaren team's Formula One car MP4: Days Since a Lost Time Accident, the fourth album by Michael Penn", "vector": [-0.02004411444067955, 0.057410698384046555, -0.030754586681723595, 0.03198733180761337, -0.028945494443178177, -0.00789677258580923, -0.07326027750968933, 0.009349650703370571, 0.018571224063634872, 0.036502059549093246, 0.04831720143556595, 0.008765297941863537, 0.043674394488334656, 0.0197239201515913, -0.029137609526515007, -0.030226267874240875, -0.06864949315786362, 0.023214029148221016, 0.0016279838746413589, 0.03169915825128555, -0.026271877810359, -0.023053932934999466, -0.03458090126514435, 0.0016089724376797676, -0.012423508800566196, 0.009429698809981346, 0.043482281267642975, 0.004546748008579016, -0.02667211927473545, 0.02596769481897354, 0.001192720839753747, -0.003071856452152133, 0.04101679101586342, 0.007212358992546797, -0.012599614448845387, -0.001095662242732942, 0.057955026626586914, -0.008901380002498627, 0.02745659463107586, 0.018010884523391724, 0.00537124602124095, 0.0030478420667350292, -0.030130209401249886, 0.011414898559451103, 0.014208586886525154, 0.016345879063010216, 0.0036021771375089884, 0.0006163725047372282, 0.0003141898778267205, -0.014480751939117908, 0.006980218458920717, 0.02713640034198761, -0.05808310583233833, 0.011975237168371677, 0.012495552189648151, -0.011422903276979923, 0.03566955775022507, 0.057058483362197876, -0.0003084363997913897, -0.06704851984977722, -0.009141525253653526, -0.015073109418153763, 0.017962856218218803, -0.00692418497055769, 0.0026776182930916548, 0.0019801966845989227, 0.05395260825753212, -0.017962856218218803, 0.005855538882315159, 0.012263411656022072, 0.035861674696207047, 0.03281983733177185, -0.005535345524549484, 0.024590862914919853, -0.014688877388834953, -0.03621388599276543, 0.02649601362645626, 0.04620392620563507, 0.009685853496193886, 0.06730467826128006, 0.008565176278352737, -0.011478937231004238, -0.02121281996369362, 0.03573359549045563, -0.010806531645357609, 0.007800714578479528, 0.0025635494384914637, -0.08491531759500504, 0.00788876786828041, 0.018475165590643883, 0.022845806553959846, 0.0383271649479866, 0.031170839443802834, 0.06147715449333191, 0.08690051734447479, -0.051134902983903885, 0.024190619587898254, 0.014929022639989853, 0.02760068140923977, -0.029633909463882446, 0.00693619204685092, 0.008260992355644703, 0.043354202061891556, 0.04149708151817322, 0.03947985917329788, -0.010678453370928764, 0.030978722497820854, 0.012543581426143646, 0.012743702158331871, 0.028497222810983658, -0.0011216779239475727, 0.018667282536625862, -0.015361283905804157, 0.015057099983096123, -0.01998007483780384, 0.04156111925840378, -0.049726054072380066, -0.04079265519976616, -0.05241568014025688, 0.017354488372802734, -0.005895562935620546, -0.03477301448583603, -0.0022253450006246567, 0.0038443233352154493, -0.04133698344230652, 0.03906361013650894, 0.0017090329201892018, 0.018283050507307053, -0.0023654296528548002, 0.0016169772716239095, -0.0416891947388649, 0.050270382314920425, 0.024478795006871223, -0.01630585454404354, 0.016457946971058846, 0.057698871940374374, -0.03454887866973877, -0.012551586143672466, 0.03842322155833244, 0.03230752423405647, -0.0211647916585207, 0.006868151016533375, 0.02588764578104019, 0.009357655420899391, -0.016650062054395676, -0.03477301448583603, 0.0043866513296961784, 0.06272590905427933, 0.011550981551408768, 0.04703642800450325, -0.023934464901685715, -0.06003628298640251, -0.007028247695416212, -0.0396079383790493, 0.02598370425403118, 0.03422868624329567, -0.0026916267815977335, 0.016537996008992195, -0.04956595599651337, -0.03781485557556152, 0.03387647494673729, -0.015137148089706898, 0.0128557700663805, 0.018715310841798782, 0.05228760093450546, -0.01348014734685421, 0.0279528945684433, -0.029281696304678917, 0.014040485955774784, 0.021420946344733238, 0.009565780870616436, -0.021917246282100677, 0.09804325550794601, -0.031330935657024384, -0.016858188435435295, -0.06154119223356247, -0.0028116994071751833, 0.07089084386825562, -0.024847017601132393, 0.006059662438929081, -0.0017690692329779267, -0.018186992034316063, 0.022445565089583397, -0.018651273101568222, -0.018379107117652893, -0.02082858793437481, 0.013207982294261456, 0.018555214628577232, 0.03778283670544624, -0.0073964702896773815, 0.005739468615502119, -0.006503930781036615, 0.0836985856294632, -0.018363097682595253, 0.08779706060886383, 0.0006193743320181966, -0.04629998281598091, -0.007756688166409731, 0.004214547108858824, 0.01967589184641838, 0.0018801363185048103, -0.037270523607730865, 0.022285468876361847, 0.03317204862833023, 0.044314783066511154, 0.028785396367311478, -0.011310836300253868, 0.031426992267370224, 0.0402483232319355, 0.006227763835340738, 0.029842035844922066, -0.02135690674185753, 0.03349224105477333, 0.01592162251472473, 0.06182936951518059, -0.010286216624081135, -0.03861533850431442, 0.024222640320658684, 0.04620392620563507, -0.02625586837530136, 0.06826525926589966, 0.022109363228082657, -0.022429555654525757, 0.0017630655784159899, -0.02734452672302723, 0.008397075347602367, -0.05949195474386215, 0.0383271649479866, -0.02113277278840542, 0.0019111550645902753, -0.02636793628334999, 0.02689625509083271, -0.0060956841334700584, -0.011198768392205238, -0.02638394571840763, 0.06832929700613022, 0.01007809117436409, 0.007180339656770229, 0.023117972537875175, 0.03381243720650673, -0.024366727098822594, -0.036502059549093246, -0.015561404637992382, 0.01901949569582939, 0.01372829731553793, 0.0551053024828434, 0.002021221676841378, 2.8063835998182185e-05, -0.04498719051480293, -0.006543954834342003, 0.007300412282347679, 0.018379107117652893, -0.02588764578104019, 0.021885227411985397, 0.008581186644732952, 0.004084468353539705, 0.0421694852411747, 0.02604774199426174, -0.0007969816797412932, -0.037174466997385025, -0.04678027331829071, -0.015697486698627472, -0.05923580005764961, -0.03403656929731369, 0.01905151456594467, -0.036598119884729385, 0.007520545274019241, 9.424446034245193e-05, -0.03198733180761337, 0.014977051876485348, 0.022141382098197937, -0.00499501870945096, 0.04780489206314087, -0.03254767134785652, -0.012815745547413826, 0.0037102424539625645, -0.031218867748975754, 0.024927064776420593, 0.038199085742235184, 0.011382879689335823, -0.008717268705368042, 0.08728475123643875, -0.028545251116156578, -0.021949265152215958, -0.012047281488776207, 0.010702468454837799, -0.007292407564818859, 0.004254571162164211, -0.015505370683968067, 0.04012024775147438, 0.024558842182159424, -0.012023266404867172, 0.01632186397910118, 0.017290450632572174, -0.02134089730679989, 0.016698092222213745, -0.024734949693083763, 0.08062472939491272, 0.05609790235757828, 0.04678027331829071, -0.04028034582734108, 0.03557350113987923, -0.0038863488007336855, -0.02721644937992096, 0.03557350113987923, 0.07332431524991989, 0.005559360142797232, -0.005543350242078304, -0.009237582795321941, -0.05315212532877922, 0.018763341009616852, -0.029890064150094986, -0.025407355278730392, 0.05321616306900978, -0.021949265152215958, -0.04044044017791748, -0.036502059549093246, -0.04082467406988144, -0.07543759047985077, 1.098320080927806e-05, -0.02598370425403118, 0.02756866253912449, -0.024430764839053154, 0.01577753573656082, 0.0316191092133522, -0.05356837436556816, -0.029393764212727547, -0.0050150309689342976, -0.0400882288813591, 0.03867937624454498, -0.06432687491178513, -0.02689625509083271, 0.037718795239925385, 0.029313717037439346, 0.03205136954784393, -0.016858188435435295, 0.006247776094824076, 0.006455902010202408, 0.024398745968937874, -0.010182153433561325, 0.008485128171741962, 0.03134694695472717, 0.07562971115112305, 0.02590365521609783, 0.014929022639989853, 0.00472285458818078, 0.009221573360264301, -0.016938237473368645, -0.017658673226833344, -0.02122882939875126, 0.0008920390973798931, -0.01957983337342739, 0.023742349818348885, 0.023982495069503784, 0.0006203749217092991, -0.003972400911152363, -0.030946703627705574, -0.03378041461110115, 0.024430764839053154, 0.02030026912689209, -0.0010756500996649265, -0.017994875088334084, 0.014240606687963009, -0.04546748101711273, 0.007576579228043556, 0.009565780870616436, -0.018859397619962692, 0.023166000843048096, 0.011895189061760902, -0.009117510169744492, -0.0018651272403076291, -0.02620784007012844, -0.02006012387573719, 0.022189410403370857, -0.0410488098859787, 0.02002810500562191, 0.023262059316039085, 0.005899565760046244, -0.022269459441304207, 0.013215987011790276, -0.03397253155708313, 0.04690834879875183, 0.042489681392908096, -0.037622738629579544, -0.009309626184403896, 0.003950387705117464, -0.01397644728422165, -0.008693253621459007, -0.010158139280974865, 0.0030558467842638493, 0.00667603500187397, 0.0420093908905983, -0.007180339656770229, -0.04543545842170715, -0.025919664651155472, 0.023518214002251625, -0.009077486582100391, -0.001904150820337236, -0.029297707602381706, -0.037014368921518326, 0.03259570151567459, -0.0194037277251482, -0.0018881411524489522, 0.024126581847667694, -0.003570157801732421, 0.015881597995758057, -0.018138961866497993, -0.06221359968185425, -0.011182758957147598, -0.013288031332194805, 0.03807101026177406, 0.0032719774171710014, 0.04562757536768913, -0.03410061076283455, 0.0002574055688455701, -0.03310801088809967, -0.02721644937992096, 0.014336665160953999, -0.00789677258580923, 0.008677244186401367, 0.04213746637105942, 0.029409773647785187, 0.024158600717782974, -0.001530925277620554, 0.03384445607662201, 0.07332431524991989, 0.030658530071377754, 0.0004455192538443953, 0.0029117597732692957, 0.015689482912421227, 0.0021933256648480892, -0.023646291345357895, 0.009101500734686852, 0.012015261687338352, 0.04242563992738724, -0.01031023170799017, -0.015801550820469856, -0.013584209606051445, -0.03155507147312164, -0.0013978448696434498, -0.03592571243643761, 0.050814710557460785, -0.005255176220089197, 0.037558700889348984, -0.00509908189997077, -0.01336007472127676, 0.015681477263569832, -0.04902162775397301, 0.0018100939923897386, 0.006119698751717806, 0.025423364713788033, -0.011198768392205238, -0.04172121360898018, 0.008341041393578053, 0.0277927964925766, 0.03925572335720062, 0.029601890593767166, -0.013664258643984795, -0.0005378250498324633, -0.025151200592517853, 0.006595986429601908, 0.02007613331079483, 0.07434893399477005, -0.029970113188028336, 0.02744058519601822, -0.09477727860212326, -0.0808168426156044, 0.02662409096956253, -0.0027496619150042534, -0.003742261789739132, -0.04117688536643982, -0.05372847244143486, 0.010550376027822495, 0.005391258280724287, -0.010134125128388405, -0.049437880516052246, -0.002731650834903121, -0.011262807063758373, 0.003009818959981203, -0.007984825409948826, 0.04066457599401474, 0.022013304755091667, -0.02792087383568287, -0.006115696392953396, -0.017050305381417274, 0.006503930781036615, 0.024334706366062164, -0.037558700889348984, 0.017306460067629814, -0.006315817125141621, 0.043994590640068054, -0.0656396746635437, 0.03310801088809967, -0.00960580538958311, -0.006003628484904766, 0.04018428549170494, -3.223823296139017e-05, -0.013424113392829895, 0.03352425992488861, 0.018667282536625862, -0.005547352600842714, -0.02737654559314251, -0.00670004915446043, 0.04681229218840599, 0.010270207189023495, -0.0277127493172884, 0.001817098236642778, -0.04754873737692833, -0.012439518235623837, 0.036117829382419586, -0.015177172608673573, 0.022877827286720276, -0.018843388184905052, 0.03909562900662422, -0.0038803452625870705, -0.011807136237621307, 0.030402373522520065, 0.02095666527748108, -0.02811299078166485, 0.016714101657271385, 0.0018000879790633917, 0.04594777151942253, -0.009389675222337246, 0.021420946344733238, -0.04149708151817322, -0.02006012387573719, -0.02734452672302723, -0.0383271649479866, 0.015217197127640247, 0.006291802506893873, -0.0019131562439724803, 0.015441332012414932, 0.023774368688464165, 0.01398445200175047, -0.03297993168234825, -0.00011175504187121987, -0.005987618584185839, 0.03368435800075531, 0.0028036944568157196, 0.001049634418450296, -0.03221146762371063, 0.017050305381417274, 0.013344064354896545, 0.022829797118902206, -0.02625586837530136, 0.0020752542186528444, 0.009205563925206661, -0.02081257849931717, -0.0008995436364784837, 0.011166748590767384, 0.02017219178378582, 0.015177172608673573, 0.021949265152215958, 0.017194392159581184, 0.02630389668047428, 0.01921161077916622, 0.013047886081039906, 0.01359221525490284, 0.03560552000999451, 0.011238791979849339, 0.024911055341362953, -0.01314394362270832, -0.018186992034316063, 0.039768036454916, -0.01937170699238777, 0.025647500529885292, -0.06246975436806679, -0.0070482599548995495, -0.022589651867747307, -0.036566101014614105, 0.014168563298881054, -0.011855164542794228, 0.037494659423828125, 0.002775677479803562, 0.03323608636856079, 0.00031243881676346064, 0.004306602757424116, 0.016810160130262375, -0.02105272375047207, -0.0060996864922344685, 0.007152322679758072, -0.01060640998184681, 0.007860750891268253, 0.029345735907554626, -0.007180339656770229, 0.007016240619122982, -0.008493132889270782, 0.004934982396662235, -0.07037853449583054, 0.0015709494473412633, 0.00694819912314415, -0.00046453074901364744, -0.021901236847043037, -0.002939776750281453, -0.0009830942144617438, -0.0022853813134133816, 0.017370497807860374, -0.02752063237130642, 0.03346022218465805, 0.023838406428694725, -0.01359221525490284, 0.025071151554584503, -0.042745836079120636, 0.012847764417529106, -0.005607388913631439, 0.022957874462008476, 0.01951579563319683, -0.011647039093077183, -0.01914757303893566, 0.050334420055150986, 0.014985056594014168, -0.030674539506435394, 0.03842322155833244, 0.025743559002876282, -0.012407498434185982, 0.007836736738681793, -0.022909846156835556, -0.015185177326202393, 0.017722710967063904, -0.04930980131030083, 0.023230040445923805, -0.0025195227935910225, 0.07556567341089249, 0.010638429783284664, -0.017098333686590195, 0.00248950463719666, 0.011502952314913273, 0.013832359574735165, 0.03192329406738281, -0.02676817774772644, -0.010942613705992699, -0.011871174909174442, 0.008749287575483322, -0.02006012387573719, 0.04127294570207596, -0.016682082787156105, 0.014953036792576313, -0.043642375618219376, -0.02129286900162697, 0.016057705506682396, -0.013183968141674995, -0.031058771535754204, -0.015353279188275337, 0.02697630412876606, -0.012079300358891487, 0.023198019713163376, 0.00042700808262452483, -0.016650062054395676, -0.0004630298353731632, -0.04293794929981232, -0.050334420055150986, -0.030482422560453415, -0.007832733914256096, 0.018491175025701523, -0.006203749217092991, -0.007848743349313736, 0.003071856452152133, -0.001076650689356029, 0.010782516561448574, -0.009797921404242516, -0.018170982599258423, 0.005895562935620546, -0.02066849172115326, 0.02785683609545231, -0.029649918898940086, -0.0005263180937618017, -0.01999608427286148, -0.024462785571813583, -0.0312989167869091, 0.04847729951143265, 0.013952432200312614, 0.004646808374673128, 0.03627792373299599, 0.002255363157019019, 0.005455296952277422, -0.03627792373299599, -0.04149708151817322, 0.0011336851166561246, 0.0009270603186450899, 0.022189410403370857, 0.02012416161596775, -0.007456506602466106, -0.036117829382419586, 0.02635192684829235, -0.014616833999752998, 0.018395118415355682, -0.012247402220964432, 0.015273231081664562, -0.017770739272236824, -0.028929485008120537, 0.008525152690708637, -0.009901984594762325, 0.009125514887273312, 0.01921161077916622, -0.01949978433549404, -0.018603242933750153, -0.0008915388025343418, -0.023166000843048096, 0.0032459618523716927, -0.014816954731941223, 0.008373060263693333, -0.02739255502820015, -0.016409918665885925, -0.006155720446258783, -0.01314394362270832, -0.013207982294261456, -0.0050870743580162525, -0.015377293340861797, 0.044666994363069534, -0.029105590656399727, 0.01020616851747036, 0.043290164321660995, -0.01324000209569931, 0.03217944875359535, -0.014072504825890064, 0.01980396918952465, -0.002669613342732191, -0.0399281308054924, -0.0019912035204470158, 0.002091263886541128, 0.037750814110040665, 0.017994875088334084, -0.02002810500562191, 0.05910772457718849, -0.0023053933400660753, 0.028769386932253838, -0.013175963424146175, -0.024350717663764954, -0.0053512342274188995, 0.0038783440832048655, -0.0637185126543045, 0.024174610152840614, -0.025071151554584503, 0.0038863488007336855, 0.02159705199301243, 0.06202148273587227, -0.03163512051105499, 0.006199746858328581, -0.017354488372802734, 0.014464742504060268, 0.02694428525865078, -0.023886436596512794, 0.04588373005390167, 0.011222782544791698, -0.0019942051731050014, -0.01047833263874054, 0.07486124336719513, -0.0022253450006246567, -0.009189553558826447, 0.006483918521553278, 0.015161163173615932, -0.028353136032819748, 0.042809873819351196, -0.03238757327198982, -0.00200020894408226, 0.0014228599611669779, 0.016906218603253365, 0.015393303707242012, -0.0074645113199949265, -0.0005688437959179282, -0.0038643355946987867, -0.030482422560453415, -0.025711540132761, -0.018875407055020332, -0.04774085432291031, -0.036438021808862686, 0.01008609589189291, -0.007648622617125511, -0.003067854093387723, 0.03515724837779999, 0.012815745547413826, -0.01373630203306675, -0.010870570316910744, -0.0008530155173502862, -0.00341006089001894, -0.00014971548807807267, -0.03166713938117027, -0.006772093009203672, 0.0064478968270123005, 0.008277002722024918, -0.036950331181287766, -0.006499928422272205, -0.022605663165450096, -0.00048154103569686413, 0.008180944249033928, -0.02752063237130642, 0.008637219667434692, -0.008076881058514118, -0.023550232872366905, 0.02122882939875126, 0.029009532183408737, 0.03413262963294983, -0.040888711810112, -0.02017219178378582, 0.01073448732495308, -0.0019962063524872065, -0.006836131680756807, 0.007668634876608849, -0.008901380002498627, 0.022541623562574387, -0.004590774420648813, 0.03925572335720062, 0.035861674696207047, -0.02121281996369362, -0.018379107117652893, -0.01008609589189291, 0.023502204567193985, -0.03890351206064224, -0.015753520652651787, -0.037206485867500305, -0.014432722702622414, 0.03371637687087059, 0.02001209557056427, -0.044442858546972275, 0.003576161339879036, -0.015881597995758057, 0.0007329429499804974, 0.00982994120568037, 0.025519423186779022, 0.018475165590643883, 0.023646291345357895, -0.010150134563446045, 0.0033800427336245775, 0.014416713267564774, 0.04044044017791748, -0.013560195453464985, 0.036630138754844666, 0.011855164542794228, 0.018154973164200783, 0.0019241629634052515, 0.011462927795946598, -0.02135690674185753, -0.02798491343855858, -0.015681477263569832, -0.0013598218793049455, 0.014640848152339458, -0.003634196473285556, -0.0033280113711953163, -0.006271790713071823, 0.02678418718278408, -0.017786750569939613, 0.024654900655150414, -0.024078551679849625, -0.024286678060889244, -0.007300412282347679, -0.02002810500562191, 0.011566990986466408, 0.014905008487403393, 0.02046036534011364, 0.028945494443178177, 0.015977656468749046, -0.022157391533255577, 0.01359221525490284, 0.002327406546100974, 0.008757292293012142, -0.028961503878235817, 0.011703073047101498, -0.024526823312044144, -0.0023694320116192102, 0.005875551141798496, 0.0197239201515913, -0.0015909615904092789, -0.007108296267688274, 0.010790521278977394, -0.01938771829009056, 0.010270207189023495, 0.03291589394211769, -0.04197736829519272, -0.009309626184403896, -0.021500995382666588, 0.022413546219468117, 0.02031627856194973, -0.003974401857703924, 0.04658815637230873, -0.050622593611478806, 0.005307207349687815, -0.030066171661019325, 0.03174718841910362, 0.05561761558055878, 0.04191333055496216, 0.044506900012493134, -0.001674011698924005, 0.03265973925590515, -0.022845806553959846, 0.0420093908905983, -0.00995001383125782, 0.02604774199426174, -0.012847764417529106, -0.03624590486288071, 0.03269175812602043, -0.005883555859327316, 0.006664027459919453, 0.01922762021422386, -0.022461574524641037, 0.035829655826091766, 0.009629820473492146, 0.02734452672302723, -0.021613063290715218, -0.05267183482646942, -0.04921374469995499, 0.017082324251532555, -0.02792087383568287, 0.02057243324816227, 0.018122952431440353, 0.004630798939615488, 0.014048490673303604, 0.009877970442175865, -0.010382275097072124, 0.012151343747973442, -0.02025224082171917, -0.015073109418153763, 0.0026415965985506773, -0.021629072725772858, -0.014416713267564774, 0.01326401624828577, -0.0029257682617753744, -0.0018371102632954717, 0.011142734438180923, 0.008156930096447468, 0.04863739386200905, -0.015737511217594147, -0.025103172287344933, 0.018859397619962692, 0.03839120268821716, 0.01019816379994154, -0.044218726456165314, 0.021693110466003418, 0.014953036792576313, 0.03317204862833023, -0.005487316288053989, -0.01980396918952465, 0.007032250054180622, 0.0097018638625741, -0.02058844268321991, 0.04626796394586563, 0.01033424586057663, 0.004782890435308218, -0.007160327397286892, 0.015217197127640247, -0.02635192684829235, 0.009765902534127235, 0.03176319599151611, 0.024638891220092773, 0.04018428549170494, 0.012487547472119331, 0.03342820331454277, -0.016730111092329025, 0.018122952431440353, -0.024126581847667694, -0.017130352556705475, 0.028177030384540558, -0.02644798532128334, 0.008821330964565277, -0.036438021808862686, -0.016169773414731026, 0.04850931838154793, -0.009029457345604897, -0.023198019713163376, -0.011727087199687958, 0.016457946971058846, 0.002014217432588339, -0.010430303402245045, 0.02691226452589035, 0.005539347883313894, 0.042745836079120636, 0.016714101657271385, -0.029906073585152626, 0.006952201947569847, -0.017258429899811745, -0.015081115067005157, 0.02041233703494072, -0.05475309118628502, 0.02752063237130642, 0.04796499013900757, 0.051871348172426224, 0.037334565073251724, 0.011815140955150127, -0.00657597417011857, -6.582103196706157e-06, 0.0035341358743608, 0.044859111309051514, -0.04015226662158966, 0.05978012830018997, -0.02814500965178013, -0.017418527975678444, 0.036758214235305786, 0.018491175025701523, 0.008429094217717648, 0.05260779336094856, 0.02644798532128334, -0.014184572733938694, -0.028945494443178177, 0.00957378651946783, -0.043578337877988815, 0.04678027331829071, 0.015217197127640247, -0.005915575195103884, -0.00667603500187397, 0.00485093193128705, 0.022637682035565376, -0.03320406749844551, -0.00035796634620055556, -0.006335829384624958, 0.010534366592764854, 0.012423508800566196, 0.028321117162704468, 0.0267521683126688, 0.0001440870837541297, -0.04127294570207596, 0.02583961747586727, -0.016121743246912956, -0.0020272252149879932, 0.005719456821680069, 0.024158600717782974, 0.04226554557681084, 0.002701632911339402, -0.026271877810359, 0.018379107117652893, 0.043130066245794296, 0.04034438356757164, -0.03426070511341095, -0.0018331079045310616, 0.012623629532754421, -0.012895793654024601, 0.01323199737817049, 0.023230040445923805, 0.005627401173114777, -0.015265226364135742, 0.01021417323499918, 0.008701259270310402, -0.014152553863823414, -0.011639034375548363, 0.012503556907176971, 0.021533014252781868, -0.012879784218966961, 0.023117972537875175, -0.002995810704305768, -0.018827378749847412, 0.003682225476950407, -0.044346801936626434, -0.00046102862688712776, -0.008421089500188828, -0.04988614842295647, 0.02729649655520916, 0.017434537410736084, -0.022349506616592407, -0.00679610762745142, -0.007252383045852184, 0.016634052619338036, -0.016730111092329025, 0.0017800758359953761, 0.015337269753217697, 0.014752916060388088, -0.022109363228082657, -0.0020112155470997095, 0.004806905053555965, 0.023166000843048096, -0.006607993505895138, 0.036726195365190506, 0.029521841555833817, 0.004690835252404213, -0.008901380002498627, 0.0056954422034323215, 0.0029657925479114056, 0.018875407055020332, -0.016073714941740036, 0.024654900655150414, 0.02764870971441269, -0.005323217250406742, -0.010022057220339775, -0.009797921404242516, -0.01633787341415882, -0.004334619734436274, -0.0004267579352017492, 0.007556566968560219, 0.0022893836721777916, -0.009653834626078606, -0.01398445200175047, 0.025615481659770012, -0.0039043596480041742, -0.03201935067772865, -0.002945780288428068, -0.0024014513473957777, 0.003516125027090311, -0.009037462063133717, -0.009141525253653526, 0.012015261687338352, -0.014961042441427708, -0.002041233703494072, 0.012655648402869701, -0.0019591841846704483, 0.016890207305550575, 0.008421089500188828, -0.00341006089001894, -0.02639995515346527, 0.03245161473751068, 0.013824354857206345, 0.0517432726919651, 0.04207342863082886, -0.013696277514100075, 0.010918598622083664, -0.05212750285863876, -0.00014871488383505493, 0.001863126060925424, 0.03349224105477333, -0.0016670074546709657, 0.024254659190773964, 0.02638394571840763, -0.013920413330197334, 0.015913616865873337, 0.008893375284969807, 0.04197736829519272, 0.01962786167860031, 0.008733278140425682, 0.022989895194768906, -0.015457342378795147, 0.004630798939615488, -0.002887745387852192, 0.016778139397501945, 0.011574995703995228, 0.0038223101291805506, 0.003618186805397272, -0.013207982294261456, -0.04245765879750252, 0.008565176278352737, -0.012823750264942646, 0.0039603933691978455, -0.003231953363865614, 0.0012917807325720787, 0.0202042106539011, 0.018283050507307053, -0.024350717663764954, -0.0022373523097485304, -0.011038671247661114, 0.004374643787741661, 0.003632195293903351, 0.00667603500187397, -0.022253450006246567, 0.015489361248910427, -0.017386507242918015, -0.015089119784533978, 0.007096288725733757, -0.05225558206439018, 0.02681620791554451, -0.012047281488776207, 0.006383858155459166, -0.03877543658018112, 0.022285468876361847, 0.0038643355946987867, 0.009525757282972336, 0.04207342863082886, 0.006059662438929081, 0.012519566342234612, -0.009157534688711166, 0.037398602813482285, -0.022381527349352837, -0.029761986806988716, -0.01400846615433693, 0.003978404216468334, 0.01609772816300392, 0.02646399475634098, -0.008317026309669018, -0.0009490735828876495, -0.0077486829832196236, -0.018186992034316063, -0.038167066872119904, 0.030002132058143616, -0.016265830025076866, 0.012527571059763432, 0.018795359879732132, -0.009269602596759796, 0.023774368688464165, -0.009909989312291145, -0.03378041461110115, 0.022397536784410477, -0.012735697440803051, -0.0405685193836689, -0.0202042106539011, -0.006299807224422693, -0.011342855170369148, 0.0015679476782679558, -0.008204959332942963, -0.023262059316039085, 0.029073571786284447, 0.02121281996369362, -0.012295431457459927, -0.011903193779289722, -0.017146361991763115, -0.01340009830892086, 0.014480751939117908, 0.030946703627705574, 0.005599384196102619, -0.024766968563199043, 0.006836131680756807, -0.029121600091457367, 0.02681620791554451, -0.021869217976927757, 0.014360679313540459, 0.0008019846864044666, 0.006455902010202408, 0.036117829382419586, -0.00200020894408226, -0.006732068490236998, 0.02680019661784172, -0.010150134563446045, 0.021773159503936768, 0.013960436917841434, -0.01010210532695055, 0.004578767344355583, -0.010974632576107979, -0.02681620791554451, 0.01959584280848503, -0.024158600717782974, -0.012335455045104027, 0.008252987638115883, -0.022029314190149307, -0.03531734645366669, 0.0001409601973136887, -0.012119324877858162, 0.003578162519261241, -0.015185177326202393, 0.009093496017158031, -0.0070602670311927795, -0.02649601362645626, -0.015569409355521202, 0.003237956902012229, 0.04159313812851906, -0.023566242307424545, 0.03525330498814583, -0.029569871723651886, -0.036309946328401566, -0.002339413855224848, -0.008429094217717648, 0.015993665903806686, 0.01362423412501812, 0.017194392159581184, 0.016345879063010216, -0.00027066358597949147, 0.016025684773921967, 0.010774511843919754, 0.014993061311542988, 0.0002819203946273774, -0.0024794985074549913, 0.0019361701561138034, -0.01617777720093727, 0.008925394155085087, 0.011863170191645622, 0.011342855170369148, 0.011198768392205238, -0.009045466780662537, -0.009021452628076077, 0.0030738578643649817, -0.017082324251532555, -0.012495552189648151, -0.023950474336743355, 0.00655996473506093, 0.015313254669308662, 0.0016630050959065557, 0.03595773130655289, 0.03342820331454277, 0.015721501782536507, -0.037558700889348984, -0.015457342378795147, -0.03336416557431221, -0.012287425808608532, 0.014280631206929684, -0.0021352905314415693, -0.029425784945487976, 0.006527945399284363, 0.022957874462008476, -0.009437703527510166, 0.02796890400350094, -0.004122491460293531, 0.0038883499801158905, -0.02667211927473545, -0.006423882208764553, 0.017738720402121544, -0.024078551679849625, 0.015513376332819462, 0.014560800045728683, 0.002277376363053918, -0.010678453370928764, 0.0023694320116192102, 0.010406289249658585, -0.007688646670430899, 0.017786750569939613, -0.010382275097072124, 0.016489965841174126, -0.0023314091376960278, 0.005059057381004095, -0.0003099373134318739, 0.0036021771375089884, -0.013464136980473995, 0.01031023170799017, -0.030642518773674965, 0.0007099290378391743, -0.000910550297703594, -0.0196438729763031, 0.017626652494072914, 0.014993061311542988, -0.03352425992488861, -0.024606872349977493, -0.03173117712140083, 0.03925572335720062, -0.002451481530442834, -0.02628788724541664, -0.02606375142931938, 0.0009260596707463264, 0.00799283105880022, 0.03166713938117027, -0.0038263124879449606, -0.005587376654148102, -0.024366727098822594, 0.01946776546537876, 0.003536137053743005, -0.0077326735481619835, 0.03365233913064003, -0.03842322155833244, -0.025199228897690773, -0.00961381010711193, -0.0035521467216312885, -0.04271381348371506, -0.05472107231616974, -0.00999003741890192, -0.011302831582725048, -0.006844136398285627, -0.008389069698750973, 0.018539205193519592, -0.018058914691209793, 0.014921017922461033, -0.03160310164093971, -0.03909562900662422, 0.044699013233184814, -0.0037582714576274157, -0.010702468454837799, 0.0024194621946662664, -0.02121281996369362, 0.0011216779239475727, -0.00242746714502573, -0.0032219472341239452, -0.00537124602124095, -0.0008710264228284359, -0.00017935839423444122, 0.003952388651669025, 0.014712892472743988, 0.010542371310293674, 0.01384836994111538, -0.014264620840549469, 0.016682082787156105, -0.04255371913313866, -0.014256616123020649, -0.0033140028826892376, -0.006235768552869558, 0.012207377701997757, 0.017866797745227814, 0.017962856218218803, 0.0005783495143987238, 0.01399245671927929, 0.0069281873293221, 0.03576561436057091, -0.012823750264942646, 0.010982637293636799, -0.0027056352701038122, -0.0013968441635370255, 0.008333036676049232, -0.006539952475577593, -0.010990642011165619, -0.08139318972826004, -0.010702468454837799, 0.02094065584242344, -0.04149708151817322, 0.04879749193787575, -0.03251565247774124, 0.012767716310918331, -0.0029918081127107143, 0.0016109736170619726, 0.008164934813976288, -0.005747473798692226, 0.015273231081664562, -0.008164934813976288, -0.012735697440803051, -0.008309021592140198, 0.04767681285738945, 0.0006784099969081581, -0.0012327450094744563, 0.028449194505810738, 0.008717268705368042, 0.04838123917579651, 0.0005158117273822427, -0.0011526966700330377, 0.004782890435308218, -0.0010526361875236034, 0.03163512051105499, -0.011286821216344833, 0.02082858793437481, -0.031122809275984764, -0.017802760004997253, 0.012191368266940117, -0.02572754956781864, 0.036662157624959946, -0.0006749078747816384, -0.0013518170453608036, 0.005303204990923405, -0.00800884049385786, -0.004610786680132151, 0.0019121556542813778, -0.008453109301626682, 0.0022433558478951454, -0.00510708661749959, 0.0023754355497658253, -0.036726195365190506, 0.021244840696454048, 0.011911198496818542, -0.015017076395452023, -0.04178525507450104, 0.02004411444067955, -0.023470185697078705, 0.050270382314920425, 0.004238561727106571, -0.006992226000875235, -0.028577271848917007, -0.03294791281223297, 0.023214029148221016, -0.036758214235305786, 0.03477301448583603, 0.010390279814600945, 0.03310801088809967, 0.013536181300878525, -0.0025235251523554325, 0.02667211927473545, -0.001426862319931388, 0.0028577272314578295, 0.005879553500562906, -0.010918598622083664, 0.0627579316496849, -0.02046036534011364, -0.023198019713163376, 0.017818769440054893, 0.006139710545539856, -0.0426497757434845, 0.005583374295383692, 0.003003815421834588, 0.03307599201798439, -0.017866797745227814, -0.016858188435435295, 0.006996228359639645, -0.009389675222337246, -0.05971609055995941, -0.03589369356632233, 0.0032199460547417402, -0.018411127850413322, -0.030930694192647934, -0.0031899278983473778, -0.009781911969184875, -0.012295431457459927, -0.0009280609083361924, -0.0020552421920001507, 1.7573120203451253e-05, -0.009629820473492146, 0.0158095546066761, -0.010518357157707214, -0.0128557700663805, 0.01302387099713087, -0.023342106491327286, -0.018523195758461952, 0.017370497807860374, -0.007640617899596691, 0.01325601153075695, 0.016778139397501945, -0.0018311067251488566, 0.011350859887897968, 0.04898960888385773, -0.012143339030444622, -0.006063664797693491, 0.018987474963068962, -0.028177030384540558, -0.03214742988348007, -0.009461718611419201, -0.03855130076408386, -0.00657197181135416, -0.01035025529563427, -0.0037322556599974632, -0.04098476842045784, 0.012399493716657162, 0.05404866486787796, 0.02073252946138382, -0.015769530087709427, 0.02111676335334778, 0.021773159503936768, 0.00472685694694519, 0.04060053825378418, -0.000482291477965191, -0.01376832090318203, 0.011799131520092487, -0.010286216624081135, -0.004682830069214106, 0.02622384950518608, 0.0033960524015128613, 0.022669700905680656, 0.001381835201755166, 0.006499928422272205, -0.03877543658018112, -0.012551586143672466, 0.0019531804136931896, -0.031074780970811844, 0.025391345843672752, -0.021549023687839508, -0.01624181680381298, 0.0009976029396057129, 0.005567364860326052, -0.008685248903930187, 0.03221146762371063, -0.037878893315792084, -0.006351838819682598, 0.007812721654772758, -0.051871348172426224, -0.005143108312040567, -0.017882807180285454, 0.03589369356632233, -0.00024314694746863097, 0.016281839460134506, 0.023534223437309265, -0.001387838739901781, -0.0035301335155963898, -0.019243629649281502, 0.014416713267564774, -0.007756688166409731, -0.00011000398080796003, 0.014376688748598099, -0.0017370497807860374, 0.009149529971182346, -0.015641452744603157, -0.01620979607105255, 0.007144317962229252, 0.006343834102153778, 0.010782516561448574], "index": 30}, {"title": "Cadore", "text": "Cadore (Ladin: Cad\u00f2r; Venetian: Cad\u00f2r or, rarely, Cad\u00f2ria; German: Cadober or Kadober; Sappada German: Kadour; Friulian: Cjadovri) is an historical region in the Italian region of Veneto, in the northernmost part of the province of Belluno bordering on Austria, the Trentino-Alto Adige/S\u00fcdtirol and Friuli-Venezia Giulia. It is watered by the Piave River poured forth from the Carnic Alps.", "vector": [-0.015382952056825161, 0.029189366847276688, -0.017014123499393463, 0.018606269732117653, 0.023975864052772522, -0.020760351791977882, -0.0171233881264925, -0.033934589475393295, -0.049637533724308014, 0.015297100879251957, -0.019199423491954803, 0.00024084642063826323, -0.058909449726343155, -0.05531931295990944, -0.03624476492404938, -0.03096882440149784, -0.05747339501976967, -0.03352874889969826, -0.0036408661399036646, -0.04145826771855354, 0.025365091860294342, 0.00854608416557312, 0.010044575668871403, -0.037712037563323975, 0.06462244689464569, 0.027566000819206238, 0.015921473503112793, 0.01765410415828228, -0.007258318364620209, 0.015749771147966385, 0.006083719432353973, -0.022742731496691704, -0.009108019061386585, -0.013939092867076397, 0.011519653722643852, 0.04907559975981712, -0.060501594096422195, -0.006454440299421549, 0.011761597357690334, 0.0259738527238369, -0.015617091208696365, -0.0178570244461298, 0.0363072007894516, 0.05044921487569809, -0.035058457404375076, -0.006411514710634947, 0.01629609614610672, 0.022805167362093925, -0.014149818569421768, -0.012378164567053318, -0.0287835244089365, -0.04732735827565193, -0.04024074226617813, 0.01865309849381447, -0.01304936408996582, 0.053914476186037064, 0.036681823432445526, 0.07061641663312912, -0.038867123425006866, -0.013174237683415413, 0.021556425839662552, -0.06237471103668213, -0.02795623242855072, -0.008210484869778156, 0.0124718202278018, 0.02570849470794201, -0.027581609785556793, 0.0383676253259182, -0.0051939901895821095, 0.012776201590895653, -0.003601843025535345, -0.018106773495674133, 0.012385969050228596, 0.04408062621951103, 0.01937112584710121, 0.03524576872587204, 0.00887387990951538, -0.009771413169801235, -0.0640605166554451, -0.020651087164878845, -0.012744982726871967, 0.0174199640750885, -0.006731505040079355, -0.04595373943448067, 0.0015287345740944147, -0.08816125243902206, 0.002472120802849531, -0.048638537526130676, -0.004370600450783968, 0.021572034806013107, -0.010528463870286942, 0.04383087903261185, -0.014664924703538418, -0.07492457330226898, -0.0652468204498291, -0.023897817358374596, -0.022805167362093925, -0.004027196206152439, 0.011246491223573685, 0.017341917380690575, -0.024631455540657043, 0.037680819630622864, 0.014742971397936344, 0.018309693783521652, 0.015468803234398365, 0.006485658697783947, -0.021478379145264626, -0.040958769619464874, -0.019652092829346657, 0.02381977252662182, 0.020994490012526512, -0.018840409815311432, 0.044798653572797775, -0.014040553942322731, -0.012893270701169968, -0.043706003576517105, 0.025052905082702637, -0.006766625680029392, -0.049699969589710236, -0.026161164045333862, -0.013783000409603119, -0.04704638943076134, -0.019402343779802322, -0.0191838126629591, 0.023757334798574448, -0.025614839047193527, 0.008881684392690659, 0.038180314004421234, -0.03060981072485447, 0.06824380159378052, -0.010903086513280869, -0.055132001638412476, -0.03007909655570984, -0.018465787172317505, -0.01126210018992424, -0.00664955610409379, 0.001985306153073907, 0.05497590824961662, 0.022040313109755516, 0.04342503473162651, -0.003547210479155183, -0.015094180591404438, -0.028112325817346573, -0.018934065476059914, -0.040490489453077316, -0.043674785643815994, -0.009006558917462826, 0.0481078214943409, 0.02378855273127556, 0.013509837910532951, 0.04617227241396904, 0.0078124478459358215, 0.0174199640750885, -0.012300117872655392, 0.0310000441968441, -0.04767076298594475, -0.003738424275070429, 0.002306272042915225, 0.04180166870355606, -0.025115342810750008, -0.018403349444270134, 0.03843006491661072, 0.03621354699134827, -0.002197007182985544, -0.01927747018635273, -0.03199903666973114, -0.0014897113433107734, -0.011301123537123203, -0.04186410829424858, 0.017872633412480354, -0.01533612422645092, 0.03465261682868004, 0.015780989080667496, -0.010239692404866219, -0.025333872064948082, -0.014298106543719769, 0.016108784824609756, -0.004214507527649403, -0.017903851345181465, -0.030531765893101692, 0.013517642393708229, -0.02928302250802517, 0.008577303029596806, -0.040552929043769836, 0.004569618962705135, 0.02043255604803562, 0.06462244689464569, 0.023804161697626114, 0.06662043929100037, 0.0030145435594022274, -0.031452711671590805, -0.024303659796714783, 0.0037637893110513687, -0.005186185706406832, -0.03702522814273834, -0.006302249617874622, -0.009014363400638103, -0.005353985354304314, 0.057317301630973816, 0.0717402845621109, -0.058316294103860855, 0.030750295147299767, 0.028377683833241463, 0.010044575668871403, -0.02692602016031742, 0.021603252738714218, -0.013697149232029915, -0.014618096873164177, 0.0211037565022707, -0.007367583457380533, 0.061094749718904495, -0.026613833382725716, 0.03821153566241264, 0.03090638853609562, -0.005982259288430214, 0.0017706784419715405, -0.029126929119229317, -1.3749586287303828e-05, -0.018262865021824837, 0.03537064418196678, -0.0070124720223248005, -0.017076559364795685, -0.031031262129545212, -0.03199903666973114, -0.00016645841242279857, -0.02033890038728714, -0.0287835244089365, 0.04348747432231903, 0.011878667399287224, 0.033903371542692184, -0.0036291591823101044, -0.03521455079317093, -0.02742551639676094, -0.01300253625959158, 0.023897817358374596, -0.02666066214442253, 0.008616326376795769, -0.04763954505324364, -0.01699851267039776, 0.002083839848637581, -0.03096882440149784, 0.051885269582271576, -0.015757575631141663, -0.051885269582271576, -0.00021853001089766622, 0.01735752634704113, -0.0026906507555395365, 0.0024916324764490128, 0.02010476216673851, -0.004206702578812838, 0.04954387620091438, 0.009365571662783623, 0.03271706402301788, -0.011371365748345852, -0.06549657136201859, -0.03430921211838722, -0.0035764777567237616, 0.023866599425673485, 0.024303659796714783, 0.02222762443125248, -0.03908565267920494, 0.025599230080842972, -0.022212015464901924, -0.019199423491954803, -0.020292073488235474, -0.02683236449956894, -0.04885706678032875, -0.02010476216673851, -0.024069519713521004, -0.039928555488586426, -0.010856258682906628, -0.022477373480796814, 0.02090083435177803, 0.01907454803586006, 0.026426522061228752, 0.05247842147946358, 0.03733741492033005, 0.03037567250430584, 0.03070346638560295, -0.0023004186805337667, 0.031452711671590805, -0.05606855824589729, -0.03331021964550018, -0.04757710546255112, -0.010856258682906628, -0.02146277017891407, -0.03252975270152092, 0.01835652068257332, 0.08341602981090546, -0.05478859692811966, -0.030188361182808876, 0.04454890638589859, 0.026676271110773087, -0.0460473969578743, 0.028705477714538574, -0.0369003526866436, -0.00173458200879395, -0.02553679421544075, -0.009451422840356827, -0.008944121189415455, -0.01904333010315895, -0.043144069612026215, -0.0009550932445563376, -0.005404715426266193, 0.03324778005480766, -0.014649315737187862, 0.013205456547439098, 0.0052720364183187485, 0.007172467187047005, -0.01053626835346222, -0.027737703174352646, 0.001163867418654263, -0.009279721416532993, -0.00597055209800601, 0.006860281806439161, 0.008553889580070972, -0.03196781873703003, 0.015624895691871643, -0.007652452681213617, 0.003779398510232568, -0.01251864805817604, -0.012666936032474041, -0.060595251619815826, -0.04439281299710274, 0.05759826675057411, -0.01382982823997736, 0.03515211492776871, -0.00764464819803834, 0.03952271491289139, 0.034996021538972855, -0.01567172445356846, 0.03430921211838722, 0.003002836601808667, 0.007535383105278015, -0.006083719432353973, 0.0053227669559419155, 0.004276944790035486, -0.008007564581930637, -0.0030086899641901255, -0.034371647983789444, -0.016311705112457275, 0.027706483379006386, 0.06031428277492523, 0.03179611638188362, -0.01653023436665535, 0.013408377766609192, 0.029204975813627243, 0.01361129805445671, 0.010208473540842533, 0.008241703733801842, 0.0006404685555025935, 0.005962747614830732, -0.07804643362760544, 0.042613353580236435, 0.04823269695043564, 0.018965283408761024, -0.05716120824217796, 0.00139508000575006, -0.032873157411813736, 0.026223601773381233, -0.012229876592755318, 0.011777207255363464, -0.05987722426652908, -0.02653578855097294, 0.0158668402582407, -0.026676271110773087, -0.01101235207170248, -0.0259738527238369, 0.00023413929739035666, 0.060564033687114716, -0.024584626778960228, -0.025552403181791306, -0.032873157411813736, 0.028408901765942574, 0.0010965523542836308, -0.011995736509561539, -0.005014483351260424, -0.0046008373610675335, 0.0023179790005087852, 0.016982903704047203, 0.02175934612751007, -0.05812898278236389, -0.06893061101436615, 0.0025423625484108925, 0.0007443678914569318, -0.015125398524105549, 0.02149398811161518, 0.023211009800434113, -0.018528223037719727, -0.020916445180773735, -0.04835757240653038, 0.04813903942704201, 0.046359583735466, 0.00849925633519888, 0.00955288391560316, 0.019995495676994324, -0.032841939479112625, 0.032311223447322845, 0.02411634847521782, 0.0001282888260902837, -0.01055187825113535, -0.029267413541674614, 0.020526211708784103, -0.000830218952614814, 0.05266573280096054, -0.0043901121243834496, 0.05972113087773323, -0.014063967391848564, -0.015952691435813904, 0.005275939125567675, -0.05260329693555832, -0.030859559774398804, 0.01304936408996582, 0.007547090295702219, 0.02219640649855137, -0.0389607809484005, 0.06911791861057281, 0.008101220242679119, -0.08541401475667953, -0.0018975039711222053, 0.013018145225942135, 0.0324673168361187, 0.016186829656362534, -0.01340057235211134, -0.01179281622171402, 0.011777207255363464, -0.008530475199222565, 0.023632461205124855, 0.02851816639304161, -0.01818481832742691, -0.005494468845427036, 0.0369003526866436, 0.07030422985553741, 0.06006453558802605, -0.017778977751731873, -0.016951685771346092, 0.03262341022491455, 0.014961501583456993, 0.04273822903633118, 0.047483451664447784, 0.013143019750714302, 0.0035237965639680624, 0.054070569574832916, 0.03043811023235321, -0.01629609614610672, -0.008257312700152397, 0.02040133811533451, -0.03618232533335686, 0.0327795036137104, -0.021868610754609108, -0.03312290832400322, -0.03889834135770798, -0.02225884236395359, -0.03677548095583916, 0.00960751622915268, -0.0219934843480587, 0.01841895841062069, 0.03380971401929855, 0.03462139889597893, -0.004799855872988701, -0.05038677901029587, 0.027300642803311348, 0.019761357456445694, -0.03961636871099472, 0.0009287525899708271, 0.008304140530526638, -0.00949044618755579, -0.009958725422620773, 0.01167574618011713, -0.008187071420252323, 0.0042964559979736805, 0.005592027213424444, -0.11045131087303162, 0.010754798538982868, -0.0071763694286346436, 0.013025949709117413, 0.028908399865031242, -0.042020201683044434, -0.01603073813021183, 0.010341152548789978, 0.013072777539491653, -0.016811201348900795, -0.025052905082702637, 0.00414816802367568, 0.010762603022158146, 0.012549866922199726, 0.037743255496025085, -0.022805167362093925, -0.04623470827937126, 0.035589173436164856, -0.018590660765767097, -0.0252402164041996, 0.02269590273499489, 0.008304140530526638, -0.039866119623184204, 0.015265882946550846, -0.0025794345419853926, -0.02311735413968563, -0.014649315737187862, 0.05332132428884506, -0.010684557259082794, 0.011168444529175758, 0.05444519221782684, 0.01626487635076046, 0.02666066214442253, 0.027675265446305275, -0.0022887117229402065, 0.010044575668871403, -0.021853001788258553, 0.04255091771483421, -0.005065213423222303, 0.03746228665113449, -0.015304905362427235, -0.014173232018947601, 0.012362555600702763, 0.006696383934468031, 0.03199903666973114, 0.012136220932006836, -0.05141698941588402, -0.010622119531035423, 0.028596213087439537, -0.013939092867076397, -0.047951728105545044, -0.006126645021140575, 0.049731187522411346, 0.02948594279587269, 0.009092409163713455, 0.03126540035009384, 0.039304185658693314, -0.06040794029831886, 0.002556020626798272, 0.03983490169048309, 0.012417187914252281, -0.02911132015287876, 0.024787547066807747, 0.010528463870286942, -0.009006558917462826, -0.0191838126629591, -0.02193104848265648, 0.0010809431551024318, -0.022883214056491852, 0.019230641424655914, 0.006072012707591057, 0.02527143619954586, -0.014961501583456993, 0.042113855481147766, -0.015476607717573643, -0.010497245006263256, -0.020198417827486992, -0.03843006491661072, 0.007574406452476978, 0.030453719198703766, -0.06843111664056778, 0.02453779987990856, 0.044798653572797775, 0.002784306649118662, -0.05478859692811966, 0.002540411427617073, -0.017435573041439056, 0.004998873919248581, 0.05154186487197876, 0.029626427218317986, 0.029923003166913986, 0.024803156033158302, -0.050730183720588684, 0.014383957721292973, 0.0037403753958642483, 0.001253620837815106, 0.00740270409733057, -0.03977246209979057, -0.007199783343821764, 0.01570294238626957, 0.008475842885673046, 0.004799855872988701, 0.05547540634870529, 0.015585873275995255, 0.014766385778784752, 0.011472825892269611, -0.003043810836970806, -0.005213501863181591, -0.005041799508035183, -0.006583216600120068, -0.02772209420800209, 0.019948668777942657, 0.015031742863357067, -0.018668707460165024, -0.003385264193639159, -0.022898823022842407, -0.02987617440521717, -0.016936076804995537, -0.0006146156811155379, 0.04788929224014282, 0.05703633278608322, 0.021306676790118217, -0.007418313529342413, -0.0005853482289239764, -0.0035784291103482246, 0.04354991018772125, -0.022243233397603035, -0.017825806513428688, 0.01877797208726406, -0.0072739277966320515, 0.0034496523439884186, -0.0053149620071053505, -0.0017462889663875103, 0.006481756456196308, 0.05154186487197876, -0.014852236025035381, -0.022368108853697777, 0.00521740410476923, -0.03736863285303116, -0.03843006491661072, -0.019199423491954803, 0.008749005384743214, 0.03971002623438835, -0.026988457888364792, -0.0008141218568198383, 0.012300117872655392, -0.013244479894638062, -0.02030768245458603, 0.03324778005480766, 0.018106773495674133, 0.007874885573983192, 0.025786541402339935, -0.001108259311877191, 0.020791569724678993, 0.02928302250802517, -0.009443618357181549, -0.0034672128967940807, -0.027285033836960793, -0.0028935715090483427, -0.020682305097579956, -0.004909120500087738, -0.009779218584299088, -0.007000765297561884, 0.010138232260942459, -0.012151829898357391, -0.012666936032474041, -0.010364566929638386, -0.022352498024702072, 0.006454440299421549, -0.008429015055298805, -0.01768532209098339, -0.07879567891359329, -0.00010274081432726234, 0.011199663393199444, -0.020260853692889214, -0.004003782290965319, 0.007707085460424423, 0.01944917067885399, -0.019261859357357025, -0.0030769805889576674, -0.03515211492776871, -0.0038691519293934107, -0.023632461205124855, -0.01933990605175495, 0.016811201348900795, -0.0034555059392005205, 0.022212015464901924, 0.013634712435305119, -0.021150583401322365, -0.04501718282699585, 0.004998873919248581, -0.033278997987508774, 0.0171233881264925, -0.004905218258500099, 0.011347951367497444, -0.009053386747837067, 0.008077805861830711, 0.05634952709078789, 0.0033540455624461174, -0.0073090484365820885, 0.010903086513280869, -0.0024623649660497904, -6.73760223435238e-05, -0.011386974714696407, 0.021119365468621254, -0.02338271215558052, 0.0061617661267519, 0.014446395449340343, 0.025224607437849045, 0.0028564995154738426, -0.01477419026196003, 0.008218289352953434, -0.0259738527238369, -0.0020214025862514973, -0.027441127225756645, -0.01455566007643938, 0.01765410415828228, 0.0006843696464784443, -0.0011199663858860731, -0.017451182007789612, 0.010489440523087978, 0.007110030390322208, -0.005900310352444649, 0.008842661045491695, -0.023242227733135223, -0.004834976512938738, -0.052946701645851135, -0.008920707739889622, -0.005467152688652277, -0.02948594279587269, -0.02246176451444626, 0.003071127226576209, -0.02072913385927677, -0.008936316706240177, 0.006653458345681429, 0.05466372147202492, -0.0069695464335381985, -0.019901840016245842, 0.007355876266956329, 0.030859559774398804, -0.01983940415084362, 0.009677757509052753, -0.035589173436164856, 0.003631110303103924, 0.0637795478105545, -0.006602728273719549, -0.03221756964921951, 0.0006316883373074234, -0.002031158423051238, -0.004924729932099581, -0.01346301008015871, 0.0030633225105702877, 0.019901840016245842, 0.02232128009200096, 0.007484653033316135, 0.02057304047048092, 0.02358563244342804, 0.0025813858956098557, -0.0383676253259182, 0.016093173995614052, -0.012237681075930595, -0.010403589345514774, 0.02179056406021118, -0.03374727815389633, 0.004027196206152439, -0.014688339084386826, 0.03633841872215271, 0.025755323469638824, 0.003562819678336382, -0.03249853476881981, 0.034465305507183075, 0.008725591003894806, 0.023632461205124855, 0.0004936436889693141, 0.05279060825705528, 0.009662148542702198, -0.015741966664791107, 0.020947663113474846, 0.0090768001973629, 0.0001813360140658915, 0.0068641840480268, -0.01606195606291294, 0.010036771185696125, 0.014165427535772324, 0.027768921107053757, -0.0028233297634869814, 0.009396790526807308, 0.035464297980070114, 0.04105242341756821, -0.01759166643023491, -0.04245726019144058, -0.003139417851343751, 0.03949149698019028, -0.018887236714363098, 0.0005814459291286767, -0.014438590034842491, 0.010692361742258072, 0.0178570244461298, -0.002991129644215107, 0.01137917023152113, -0.03752472624182701, 0.005471054930239916, 0.01593708246946335, 0.000879973522387445, 0.04682786017656326, -0.02964203618466854, -0.021837392821907997, -0.012456211261451244, 0.036057453602552414, 0.014173232018947601, -0.010840649716556072, -0.04895072430372238, 0.03527698665857315, -0.04136461019515991, -0.012183048762381077, 0.01632731407880783, -0.017872633412480354, 0.02381977252662182, 0.025489965453743935, 0.014547855593264103, -0.0014789799461141229, -0.032810721546411514, 0.01732630841434002, -0.023367103189229965, 0.005759826861321926, -0.022446153685450554, -0.009264111518859863, -0.0357140488922596, 0.040989987552165985, -0.014688339084386826, -0.003744277637451887, -0.005154966842383146, 0.0602206289768219, -0.0010087501723319292, 0.026738708838820457, -0.0010906988754868507, -0.00412475410848856, 0.006157863885164261, 0.014914673753082752, 0.01059870608150959, -0.002883815672248602, 0.003923784475773573, -0.021322285756468773, 0.014641511254012585, -0.02461584471166134, -0.0587533563375473, -0.0059588453732430935, -0.01086406409740448, 0.0024584627244621515, 0.03309168666601181, -0.00391012616455555, -0.00017584837041795254, -0.04177045077085495, 0.04945022240281105, 0.00453840009868145, -0.0003377947141416371, 0.020089151337742805, 0.0043823071755468845, 0.03468383476138115, 0.029033273458480835, -0.026176774874329567, -0.03296681493520737, 0.006415416952222586, 0.014118599705398083, -0.0137283680960536, 0.006473951507359743, 0.011550872586667538, 0.04092755168676376, -0.013486423529684544, 0.0030886875465512276, -0.008639739826321602, 0.018059944733977318, 0.03858615830540657, -0.0001271912915399298, -0.002655529882758856, -0.060532815754413605, -0.03780569136142731, -0.015890253707766533, 0.04436159506440163, -0.010856258682906628, -0.01901211217045784, 0.007878787815570831, -0.008889488875865936, 0.005428129341453314, 0.029595207422971725, -0.020588649436831474, -0.0006682726088911295, -0.01235475018620491, 0.023772943764925003, 0.031109308823943138, -0.02305491641163826, -0.015031742863357067, 0.02229006215929985, 0.011254295706748962, 0.009053386747837067, 0.005307157523930073, 0.004909120500087738, 0.014368348754942417, -0.0019209178863093257, -0.007461239118129015, -0.04873219504952431, -0.049731187522411346, 0.008507061749696732, -0.0038028124254196882, -0.03861737623810768, -0.002179446630179882, -0.021088145673274994, 0.0007243684958666563, 0.024194395169615746, 0.025162169709801674, 0.021181803196668625, 0.00348282209597528, 0.034902364015579224, -0.047951728105545044, 0.026207992807030678, 0.028892790898680687, 0.01729509048163891, -0.008218289352953434, 0.009849459864199162, -0.02149398811161518, 0.033903371542692184, 0.0028038180898875, 0.021525206044316292, -0.05057409033179283, 0.002952106297016144, 0.031842947006225586, -0.04120851680636406, -0.014750775881111622, 0.009162651374936104, 0.0037462287582457066, -0.014305911026895046, -0.002146276878193021, -0.01508637610822916, 0.006817356217652559, 0.03730619698762894, 0.001015579211525619, 0.0056115384213626385, -0.0039218333549797535, -0.03014153242111206, -0.04667176678776741, -0.013884460553526878, 0.038273971527814865, 0.018668707460165024, -0.04017830267548561, 0.01791946217417717, 0.0015638554468750954, 0.050168249756097794, -0.025692885741591454, 0.0032603899016976357, 0.016717545688152313, 0.011597700417041779, -0.03176489844918251, -0.00965434405952692, -0.029532771557569504, 0.0037852521054446697, 0.028705477714538574, 0.01548441220074892, -0.024319268763065338, 0.02163447067141533, -0.011683551594614983, -0.006224202923476696, -0.031031262129545212, 0.00031121016945689917, 0.012947903014719486, -0.03892956301569939, -0.032841939479112625, 0.013915679417550564, -0.013338135555386543, -0.0053578875958919525, -0.016124393790960312, 0.02653578855097294, -0.004518888425081968, 0.018465787172317505, -0.06562144309282303, 0.028237199410796165, -0.032186347991228104, -0.001951160840690136, 0.0021774955093860626, -0.02858060412108898, -0.01980818435549736, -0.040989987552165985, 0.007574406452476978, 0.048513662070035934, 0.00209944904781878, -0.03430921211838722, 0.015351733192801476, -0.009474837221205235, 0.028408901765942574, 0.01162891834974289, -0.009474837221205235, 0.02414756640791893, 0.010200669057667255, 0.00030755173065699637, -0.04114608094096184, 0.027831358835101128, -0.020526211708784103, 0.004772539250552654, 0.02719137817621231, -0.01278400607407093, 0.005693487357348204, -0.05357107147574425, 0.024490971118211746, 0.013010340742766857, -0.007952931337058544, 0.007492457516491413, 0.011465021409094334, 0.07717231661081314, 0.0011628918582573533, -0.0027491855435073376, 0.02957959845662117, -0.009615320712327957, 0.018934065476059914, 0.02488120272755623, 0.04511084035038948, -0.012393773533403873, 0.01053626835346222, 0.02530265413224697, 0.03137466683983803, 0.01924625039100647, 0.0026438229251652956, 0.036057453602552414, 0.030812732875347137, 0.03465261682868004, 0.026941629126667976, -0.005353985354304314, 0.002460413845255971, -0.003133564256131649, -0.0009297281503677368, -0.004070121329277754, 0.04648445546627045, 0.009747999720275402, -0.01096552424132824, -0.028627432882785797, 0.026879191398620605, 0.024849984794855118, 0.02934546023607254, -0.03271706402301788, -0.021291067823767662, -0.02072913385927677, -0.029985440894961357, 0.0007146126590669155, -0.021056927740573883, -0.03983490169048309, 0.039803680032491684, -0.021010100841522217, -0.01344740018248558, -0.0027218693867325783, 0.03037567250430584, 0.0413333922624588, -0.023866599425673485, -0.01096552424132824, -0.022945651784539223, -0.010739189572632313, 0.06118840351700783, 0.029954221099615097, -0.013533251360058784, 0.029267413541674614, -0.037680819630622864, 0.04826391488313675, -0.010013357736170292, -0.00136386149097234, -0.01027091033756733, -0.0009365571895614266, -0.008772418834269047, -0.03465261682868004, 0.026207992807030678, -0.007769522722810507, 0.03427799418568611, -0.03268584609031677, 0.009747999720275402, 0.0036467197351157665, -0.02205592207610607, -0.0017160460120067, 0.053383760154247284, -0.005080822855234146, -0.0062359101139009, -0.0032311223912984133, -0.043737221509218216, -0.005439836531877518, 0.02216518670320511, -0.032935597002506256, 0.026816755533218384, 0.00443693995475769, -0.024662673473358154, 0.005732510704547167, -0.006052501033991575, -0.02748795412480831, 0.02385099045932293, -0.006903206929564476, 0.0006121767219156027, 0.02686358243227005, 0.0045579117722809315, -0.012362555600702763, 0.024693891406059265, 0.018231647089123726, -0.010957719758152962, 0.011340146884322166, -0.02630164846777916, 0.049106817692518234, 0.025115342810750008, -0.014251278713345528, 0.025365091860294342, 0.0060017709620296955, -0.011293319053947926, 0.0147585803642869, -0.03493358567357063, -0.01179281622171402, 0.008538279682397842, -0.007172467187047005, 0.020619867369532585, -0.013166433200240135, -0.010466027073562145, -0.012549866922199726, 0.013088387437164783, 0.011948908679187298, -0.02182178385555744, 0.00824950821697712, -0.00991970207542181, -0.012401578016579151, 0.01480540819466114, -0.0008614375256001949, 0.013837632723152637, 0.009170455858111382, -0.025193389505147934, -0.01791946217417717, -0.025927025824785233, 0.01824725605547428, -0.01623365841805935, -0.018637487664818764, 0.00048632684047333896, 0.016015129163861275, -0.0014370299177244306, -0.010247496888041496, -0.0017355575691908598, 0.039366621524095535, 0.008733396418392658, 0.0023901720996946096, -0.035526737570762634, 0.0206666961312294, -0.03262341022491455, 0.013619102537631989, 0.027768921107053757, 0.030828341841697693, 0.008749005384743214, 0.030328843742609024, -0.01841895841062069, 0.004331577103585005, -0.0059159197844564915, -0.0076992809772491455, -0.008631935343146324, -0.005638855043798685, -0.007874885573983192, -0.014586878940463066, 0.02080717869102955, -0.025521183386445045, 0.01436054427176714, -0.027441127225756645, 0.015531240031123161, -0.030750295147299767, -0.01868431642651558, -0.007988052442669868, -0.007765620015561581, -0.004651567433029413, 0.03182733431458473, 0.040896330028772354, -0.04292554035782814, -0.028564995154738426, 0.0023570023477077484, 0.003990123979747295, -0.0216969083994627, 0.00027730874717235565, 0.021244239062070847, 0.03574526682496071, -0.015624895691871643, -0.0035725755151361227, 0.0061617661267519, -0.019948668777942657, 0.009373377077281475, 0.0004114510375075042, -0.027316251769661903, 0.028143543750047684, 0.014618096873164177, 0.03252975270152092, 0.006407612469047308, 0.02355441451072693, -0.00032267323695123196, -0.013704953715205193, -0.037087664008140564, -0.00516667403280735, 0.015148812904953957, -0.018918456509709358, 0.004070121329277754, 0.0005429105367511511, -0.0024369999300688505, 0.01580440253019333, -0.006669067777693272, -0.00068193074548617, -0.00814804807305336, 0.012019150890409946, 0.012830833904445171, -0.0076056248508393764, -0.03799300268292427, 0.03805544227361679, -0.04439281299710274, 0.02093205414712429, -0.004237921442836523, 0.0037950079422444105, 0.0029462529346346855, 0.04011586681008339, 0.03736863285303116, 0.04083389416337013, -0.04401819035410881, 0.014181037433445454, -0.015531240031123161, -0.016748765483498573, -0.002019451465457678, 0.011753792874515057, -0.04657811298966408, -0.05716120824217796, 0.008210484869778156, -0.008772418834269047, 0.00209944904781878, 0.027815749868750572, 0.015882449224591255, 0.005088627338409424, -0.00938898604363203, 0.013658125884830952, -0.00803097803145647, -0.0017111680936068296, -0.018824800848960876, 0.01673315465450287, 0.04898194223642349, -0.020323291420936584, -0.015492217615246773, 0.009349962696433067, -0.007855373434722424, 0.019901840016245842, -0.012378164567053318, 0.03162441402673721, -0.03162441402673721, -0.0137283680960536, 0.010466027073562145, 0.018340911716222763, -0.0053149620071053505, -0.03958515077829361, 0.0010946012334898114, 0.017451182007789612, 0.019620873034000397, 0.0023257837165147066, -0.02984495647251606, -0.00069754000287503, 0.039803680032491684, 0.010801626369357109, -0.0006180302007123828, 0.004374502692371607, 0.0029969830065965652, 0.010575291700661182, 0.0066807749681174755, 0.001954087521880865, -0.02733186073601246, -0.006548095960170031, 0.03905443474650383, 0.001558977528475225, -0.021306676790118217, -0.027503563091158867, 0.01272156834602356, -0.0003809641639236361, -0.02004232443869114, -0.017935071140527725, -0.001567757804878056, -0.016186829656362534, 0.009630929678678513, -0.014165427535772324, 0.015258077532052994, 0.03412190079689026, 0.008741200901567936, -0.005791045259684324, -0.06918036192655563, 0.025130951777100563, -0.0008077805978246033, 0.04292554035782814, 0.018934065476059914, 0.006489560939371586, 0.033278997987508774, 0.027909405529499054, 0.005791045259684324, -0.0016340971924364567, 0.011824035085737705, -0.019948668777942657, -0.01656145416200161, 0.011332342401146889, -0.003244780469685793, 0.021837392821907997, 0.05968991294503212, -0.027644047513604164, 0.03123418241739273, 0.02040133811533451, 0.02948594279587269, 0.025365091860294342, 0.029002055525779724, -0.022087140008807182, -0.019168203696608543, -0.008944121189415455, 0.0203701201826334, -0.011995736509561539, -0.008382187224924564, -0.0037130590062588453, -0.03020397014915943, 0.017529228702187538, 0.03256097063422203, 0.014711752533912659, 0.012807419523596764, -0.01579659804701805, -0.021088145673274994, -0.021884219720959663, -0.011441607028245926, 0.011176249012351036, 0.013478619046509266, 0.011800620704889297, -0.006302249617874622, 0.0007619283278472722, 0.02517778053879738, 0.0034008733928203583, 0.01656145416200161, 0.03852371871471405, 0.007188076619058847, -0.014781994745135307, -0.022071531042456627, -0.018137991428375244, 0.004725711420178413, -0.008062196895480156, -0.0054008131846785545, -0.014477613382041454, 0.012440601363778114, -0.018824800848960876, -0.0012897172709926963, -0.013057168573141098, 0.011558677069842815, 0.013111800886690617, -0.012698154896497726, -0.009037776850163937, 0.007410509046167135, -0.00650126812979579, -0.016483407467603683, 0.001725801732391119, -0.015343928709626198, 0.004448646679520607, -0.02328905649483204, -0.009584101848304272, -0.005623245611786842, -0.015242468565702438, -0.007890494540333748, 0.014430785551667213, -0.010778212919831276, -0.012760591693222523, -0.0017667762003839016, 0.004394014365971088, -0.013158628717064857, 0.0033657525200396776, -0.017201434820890427, -0.01455566007643938, -0.006189082283526659, 0.011441607028245926, 0.005428129341453314, 0.020026715472340584, 0.004577423445880413, 4.149265441810712e-05, 0.03405946493148804, -0.0028135739266872406, -0.00881144218146801, -0.00022779802384320647, -0.0184501763433218, 0.010200669057667255, 0.003240878228098154, 0.008413405157625675, 0.013025949709117413, 0.005658366717398167, -0.006786137353628874, -0.00751977413892746, -0.003086736425757408, 0.006075914949178696, 0.011066984385251999, 0.006438830867409706, -0.016140002757310867, -0.015882449224591255, 0.0013404474593698978, -0.027144549414515495, 0.003990123979747295, 0.00725441612303257, 0.00913923792541027, -0.0027706483379006386, -0.051822833716869354, 0.006868086289614439, -0.001762873842380941, 0.024241222068667412, -0.024896811693906784, -0.00990409217774868, 0.012495233677327633, -0.010590901598334312, -0.014305911026895046, 0.00959190633147955, -0.01023188792169094, -0.017794586718082428, -0.03046932816505432, 0.02054182067513466, -0.023367103189229965, -0.02252420037984848, -0.0693676695227623, 0.011558677069842815, 0.015780989080667496, -0.0021657885517925024, 0.020557431504130363, 0.015773184597492218, -0.02033890038728714, -0.04020952433347702, -0.03643207624554634, 0.020323291420936584, 0.004483767785131931, 0.04070901870727539, -0.04626592621207237, -0.026723099872469902, -0.042051419615745544, -0.0010253350483253598, 0.01606195606291294, -0.019964277744293213, -0.03377849608659744, 0.003361850045621395, 0.034902364015579224, 0.007074909284710884, -0.04067780077457428, 0.0191838126629591, -0.022414935752749443, 0.006142254453152418, -0.01251864805817604, 0.029751300811767578, -0.007707085460424423, -0.00919387023895979, 0.013892265036702156, -0.02030768245458603, -0.016639498993754387, 0.005459348205476999, 0.047514669597148895, 0.008819246664643288, -0.036057453602552414, -0.024693891406059265, 0.0009960676543414593, -0.01765410415828228, 0.02193104848265648, -0.0317336805164814, 0.018200429156422615, -0.017201434820890427, -0.03415311872959137, 0.021384723484516144, 0.002926741261035204, 0.024272441864013672, -0.0034184337127953768, -0.009630929678678513, -0.005256427451968193, 0.001586293801665306, 0.01070016622543335, 0.004202800337225199, 0.026051899418234825, 0.04167679697275162, 0.04292554035782814, -0.023273447528481483, -0.027472345158457756, -0.0022399327717721462, -0.03677548095583916, -0.02143155038356781, -0.03185855597257614, -0.016405360773205757, 0.012659131549298763, 0.005826166365295649, -0.011987932026386261, -0.009568492881953716, 0.021150583401322365, 0.01566391997039318, -0.007761717773973942, -0.023601241409778595, -0.02477193810045719, -0.007863177917897701, -0.009279721416532993, -0.024366097524762154, -0.00018170184921473265, -0.02709772251546383, 0.026723099872469902, 0.012042565271258354, 0.010512854903936386, 0.014852236025035381, 0.011886471882462502, 0.0031784409657120705, -0.0057403151877224445, 0.05684902146458626, -0.03967880830168724, 0.02659822441637516, -0.002706260187551379, -0.015874644741415977, 0.023538803681731224, -0.004542302340269089, 0.004932534880936146, -0.0163897518068552, 0.0008243654738180339, -0.02769087441265583, 0.01507076621055603, 0.0035881847143173218, -0.02520899847149849, -0.010107013396918774, 0.003342338604852557, -0.029766909778118134, -0.019792575389146805, -2.7301008231006563e-05, -0.008764614351093769, -0.011465021409094334, 0.005435934290289879, 0.03377849608659744, 0.009451422840356827, -0.00854608416557312, 0.009154846891760826, 0.05597490444779396, -0.004081828519701958, 0.005775436293333769, 0.01567172445356846, -0.000799488159827888, -0.017373137176036835, -0.00985726434737444, -0.008912903256714344, 0.022368108853697777, 0.043706003576517105, 0.0022574930917471647, -0.037836913019418716, 0.014001530595123768, -0.02957959845662117, 0.0010507000843062997, -0.008452428504824638, 0.008538279682397842, 0.03596379607915878, -0.004585227929055691, 0.0050261905416846275, 0.0026360182091593742, 0.022508591413497925, -0.013439595699310303, 0.001441907836124301, 0.017966289073228836, -0.015180031768977642, 0.0056622689589858055, -0.0245065800845623, -0.02573971450328827, -0.00759391812607646, 0.00342038506641984, -0.003049664432182908, -0.036681823432445526, 0.0504804328083992, -0.03702522814273834, -0.018325302749872208, -0.004866195376962423, -0.03530820831656456, -0.03156197816133499, 0.003207708476111293, -0.011917690746486187, -0.03259219229221344, -0.0019365272019058466, 0.012300117872655392, 0.00764464819803834, 0.014618096873164177], "index": 31}, {"title": "Heart rot", "text": "In trees, heart rot is a fungal disease that causes the decay of wood at the center of the trunk and branches. Fungi enter the tree through wounds in the bark and decay the heartwood. The diseased heartwood softens resulting in trees being structurally weaker and prone to breakage. Heart rot is a major factor in the economics of logging and the natural growth dynamic of many older forests.", "vector": [-0.015310668386518955, 0.005258948542177677, -0.01632007770240307, -0.00492376321926713, -0.024703575298190117, -0.024272071197628975, -0.020943330600857735, -0.06756111979484558, 0.012582950294017792, -0.008707123808562756, -0.026198426261544228, 0.06552688777446747, -0.0003390384663362056, 0.006179746240377426, -0.018832044675946236, -0.002571683842688799, -0.014794405549764633, 0.002344373846426606, 0.03892777860164642, -0.008036752231419086, 0.019217316061258316, -0.0011683342745527625, -0.03516753390431404, 0.006961846258491278, 0.011049571447074413, 0.010379199869930744, 0.013191677629947662, -0.01753753423690796, -0.05624956265091896, 0.05436943843960762, 0.05310574918985367, 0.014470777474343777, 0.03102201782166958, 0.031253181397914886, -0.005551754496991634, -0.003559903707355261, -0.02240736037492752, 0.08284866809844971, -0.008969108574092388, -0.03310248255729675, -0.016058094799518585, -0.0016990449512377381, -0.013769584707915783, 0.006187452003359795, 0.03368809446692467, 0.07409531623125076, 0.02712307684123516, -0.008344968780875206, -0.019987858831882477, 0.0442599281668663, -0.0078055900521576405, 0.05803721770644188, -0.016936512663960457, 0.019386835396289825, 0.03310248255729675, 0.009130922146141529, 0.05702010542154312, 0.05720503255724907, -0.032763443887233734, 0.029003199189901352, -0.007062016986310482, 0.0331641249358654, -0.0111266253516078, 0.004846708849072456, 0.051071520894765854, -0.02169846184551716, 0.008568426594138145, -0.003956732805818319, -0.0694720596075058, -0.03458192199468613, -0.02390221133828163, 0.025998085737228394, -0.004850561730563641, 0.03633875772356987, 0.059115976095199585, -0.039020244032144547, 0.03424288332462311, -0.03633875772356987, -0.015857752412557602, 0.011172858066856861, -0.01134237740188837, 0.015688233077526093, -0.051287271082401276, 0.02618301473557949, -0.004916057456284761, -0.019617997109889984, -0.04197912663221359, -0.03729423135519028, -0.013669414445757866, 0.025042613968253136, -0.02513507753610611, 0.025936441496014595, 0.02861792780458927, 0.03966749832034111, 0.04009900242090225, -0.013908281922340393, -0.01417797151952982, 0.0111266253516078, -0.010941695421934128, -0.027708688750863075, 0.001927318051457405, 0.008992224000394344, -0.015295257791876793, -0.011758469976484776, -0.02740047127008438, -0.04626333713531494, -0.027508346363902092, 0.05455436930060387, 0.023671047762036324, 0.05797557532787323, 0.025813154876232147, -0.0027546873316168785, 0.03522917628288269, -0.01642795465886593, -0.0050701661966741085, 0.007146776653826237, 0.058561187237501144, -0.020989563316106796, -0.021945035085082054, 0.030806267634034157, -0.05584888160228729, -0.04059214890003204, -0.02031148597598076, 0.02246900275349617, 0.003656221553683281, -0.01930978149175644, -0.05782146751880646, -0.020665934309363365, -0.014624886214733124, 0.029974080622196198, -0.02223784103989601, 0.0021247693803161383, 0.05840707942843437, 0.025427883490920067, 0.0019234652863815427, 0.0008760098717175424, -0.002265393268316984, 0.052335210144519806, 0.006792327389121056, -0.03217783197760582, -0.021313190460205078, -0.041362691670656204, -0.05902351438999176, 0.055016692727804184, 0.006364676635712385, -0.03334905579686165, -0.052119456231594086, 0.011165152303874493, -0.008005931042134762, -0.03421206399798393, 0.0208662748336792, 0.01253671757876873, 0.047064702957868576, 0.044074997305870056, 0.021482709795236588, -0.03905106708407402, -0.012143741361796856, 0.0036774114705622196, -0.060780350118875504, -0.020650524646043777, -0.046848949044942856, 0.037756554782390594, -0.05513998121023178, -0.028772035613656044, 0.002806698903441429, -0.0375099815428257, -0.02351693995296955, -0.08167744427919388, -0.01726013980805874, 0.008776472881436348, -0.04231816157698631, 0.021282369270920753, 0.00432659313082695, 0.021004972979426384, -0.054061222821474075, -0.03723258525133133, -0.016597473993897438, 0.00926961936056614, -0.007335559464991093, 0.0010777955176308751, -0.010340672917664051, -0.05677352845668793, 0.033040840178728104, 0.009446844458580017, 0.03578396886587143, 0.005497816950082779, -0.05948583781719208, 0.05671188607811928, -0.011411726474761963, -0.04077707976102829, -0.029434701427817345, -0.0045076701790094376, -0.013299553655087948, -0.04250309243798256, 0.008206271566450596, -0.023177901282906532, -0.016998155042529106, -0.04937632754445076, 0.04894482344388962, -0.040191467851400375, 0.034027133136987686, -0.012814112938940525, 0.018939921632409096, 0.05362971872091293, 0.044753074645996094, -0.006287622265517712, 0.057729002088308334, -0.06688304245471954, 0.015326078981161118, 0.020958740264177322, 0.02080463245511055, -0.015295257791876793, -0.009539308957755566, 0.01741424761712551, -0.01852382905781269, 0.0003814182709902525, -0.005890793167054653, 0.03787984326481819, 0.008005931042134762, 0.031099073588848114, 0.03301001712679863, -0.000785952783189714, -0.018955331295728683, -0.002159443683922291, -0.05159548670053482, -0.012598360888659954, -0.031314823776483536, -0.01131926104426384, -0.02142106555402279, 0.0008986445609480143, -0.027492936700582504, 0.040807902812957764, -0.0020631260704249144, -0.016011862084269524, -0.066574826836586, -0.0012049349024891853, -0.009670301340520382, -0.024718984961509705, 0.04037639871239662, -0.06466387957334518, -0.007389497011899948, 0.061766643077135086, -0.031222360208630562, 0.003365342039614916, -0.004896793980151415, -0.00948537141084671, -0.03399631008505821, 0.009832114912569523, -0.030713802203536034, -0.01813855767250061, 0.007998225279152393, -0.033811379224061966, 0.05279753357172012, 0.0016788182547315955, -0.05609545484185219, -0.036646973341703415, 0.04111611843109131, 0.011373198591172695, 0.002436838811263442, 0.047958530485630035, -0.012051275931298733, 0.06521867215633392, -0.02174469269812107, -0.036801084876060486, -0.01370023563504219, -0.054122865200042725, -0.014748172834515572, 0.019063208252191544, -0.002452249638736248, 0.03821888193488121, 0.04481472074985504, 0.0152567308396101, -0.015079505741596222, -0.02091250754892826, 0.009416022337973118, -0.0008639701409265399, 0.03556821495294571, 0.03945174813270569, -0.019818339496850967, 0.03396548703312874, 0.0093466741964221, -0.017845751717686653, 0.0034385432954877615, 0.0471571683883667, 0.018123146146535873, 0.016119737178087234, 0.020558059215545654, -0.000841335509903729, 0.010240502655506134, 0.04154762253165245, 0.02052723802626133, -0.0011269175447523594, 0.0458318330347538, -0.07366380840539932, 0.0401606447994709, -0.03612300753593445, 0.009616363793611526, -0.011404020711779594, -0.03535246476531029, 0.010363789275288582, -0.011796996928751469, -0.000660739722661674, -0.009076983667910099, 0.007466551382094622, -0.010633478872478008, 0.04897564649581909, -0.03223947435617447, 0.012082098051905632, -0.007065869402140379, 0.013523011468350887, -0.010725943371653557, -0.02485768310725689, -0.013623181730508804, 0.008491371758282185, 0.015611180104315281, -0.021713871508836746, -6.772341293981299e-05, -0.0006631476571783423, 0.006310738623142242, 0.0320853665471077, 0.0031091368291527033, -0.023285778239369392, -0.037417516112327576, -0.007115954998880625, 0.024040909484028816, -0.011242207139730453, 0.0060641649179160595, -0.014933102764189243, 0.007123660296201706, -0.032979194074869156, 0.007008078973740339, -0.0018859014380723238, 0.04376678168773651, 0.04364349693059921, -0.03624629229307175, -0.015287552028894424, 0.004580871667712927, -0.033811379224061966, 0.009909169748425484, -0.01642795465886593, -0.0020900950767099857, -0.03190043568611145, -0.0270151998847723, -0.008136922493577003, -0.0208662748336792, -0.033194947987794876, -0.01753753423690796, -0.006179746240377426, -0.026999790221452713, 0.010309850797057152, 0.0006867455085739493, 0.009909169748425484, -0.006268358789384365, 0.03624629229307175, 0.0029376910533756018, 0.005767506547272205, -0.02545870654284954, -0.009277325123548508, -0.007801737170666456, -0.0008504856959916651, 0.06207485869526863, -0.032424405217170715, 0.012251616455614567, -0.01489457581192255, -0.013515305705368519, 0.024950148537755013, 0.028155602514743805, 0.027261773124337196, 0.0035965044517070055, 0.012698531150817871, 0.001541083911433816, 0.03427370637655258, 0.06990356743335724, 0.02724636346101761, 0.028479229658842087, -0.05131809413433075, -0.0018338898662477732, -0.02152894251048565, -0.01151189673691988, 0.0005345634999684989, 0.03227029740810394, -0.034366171807050705, -0.010309850797057152, 0.0034770704805850983, 0.006364676635712385, -0.020773811265826225, -0.016951922327280045, -0.013338080607354641, 0.025551170110702515, 0.03439699113368988, -0.016782402992248535, 0.040314752608537674, 0.009331262670457363, 0.020789220929145813, 0.03985242918133736, -0.0610269233584404, -0.05430779606103897, -0.0035213767550885677, 0.0013542274245992303, -0.05436943843960762, 0.006676746066659689, -0.007385644596070051, 0.047249630093574524, 0.011827819049358368, 0.008468256331980228, -0.013931398279964924, -0.0003664890246000141, -0.0058060334995388985, -0.002097800374031067, 0.07372545450925827, -0.0033306675031781197, 0.06602003425359726, 0.016551241278648376, -0.012282438576221466, -0.013422840274870396, 0.00790575984865427, -0.004511523060500622, -0.016844047233462334, 0.038804493844509125, 0.024842271581292152, -0.08537604659795761, -0.002097800374031067, -0.03562986105680466, 0.012120625004172325, -0.030436405912041664, 0.024503232911229134, -0.006776916328817606, -0.0017655042465776205, 0.024826861917972565, 0.008329558186233044, 0.005883087869733572, -0.017599178478121758, 0.04755784943699837, 0.031715504825115204, 0.0264141783118248, -0.02114367112517357, 0.013422840274870396, -0.015603474341332912, 0.003199675353243947, 0.0857459083199501, 0.01841595210134983, 0.008853526785969734, -0.016165969893336296, -0.024873094633221626, -0.0016961554065346718, -0.018493006005883217, 0.005139514803886414, 0.00012966776557732373, -0.0030860204715281725, -0.013076096773147583, -0.011866346001625061, -0.0016470333794131875, -0.0037621711380779743, 0.03621547296643257, 0.013253320939838886, -0.006692156661301851, -0.02402549795806408, -0.050732482224702835, 0.008637774735689163, 0.03180797025561333, 0.00995540153235197, 0.010371494106948376, -0.018123146146535873, -0.004195600748062134, 0.015071799978613853, -0.019710462540388107, 0.02046559378504753, 0.037972308695316315, -0.014355196617543697, -0.0075859855860471725, 0.01608891598880291, -0.044753074645996094, -0.08660891652107239, 0.025751512497663498, 0.03205454349517822, 0.001989924581721425, 0.0010094098979607224, 0.0010383052285760641, 0.02075839973986149, -0.05803721770644188, 0.011088098399341106, 0.01779951900243759, -0.004006817936897278, -0.00428806571289897, 0.005289770197123289, -0.043859247118234634, 0.03205454349517822, -0.012814112938940525, 0.020450182259082794, -0.00932355783879757, 0.007119807414710522, 0.03199290111660957, -0.027893617749214172, -0.05199617147445679, -0.007797884289175272, -0.017460480332374573, -0.03985242918133736, -0.007343264762312174, -0.010394610464572906, 0.030420996248722076, 0.056557778269052505, -0.02313166856765747, -0.007289326749742031, -0.007844116538763046, -0.009531604126095772, 0.009886053390800953, 0.01980292797088623, 0.04062297195196152, 0.005983258131891489, 0.01198192685842514, 0.011866346001625061, -0.043581850826740265, -0.022700166329741478, -0.01698274351656437, -0.006383940111845732, 0.0152567308396101, 0.012875756248831749, -0.00879188347607851, 0.03661615401506424, 0.03096037544310093, 0.011172858066856861, -0.002633327152580023, -0.02057347074151039, 0.005574870854616165, -0.06004062667489052, 0.0375099815428257, -0.05131809413433075, 0.00021647413086611778, 0.013569243252277374, 0.001305105397477746, 0.03707847744226456, 0.033287413418293, 0.01350759994238615, 0.025397062301635742, 0.021344011649489403, -0.010656595230102539, -0.017121441662311554, 0.036307934671640396, -0.008776472881436348, -0.007859528064727783, 0.02579774335026741, 0.021004972979426384, -0.024950148537755013, -0.0200186800211668, -0.0320853665471077, 0.00848366692662239, 0.007474256679415703, 0.0018021049909293652, -0.06349265575408936, -0.0010768324136734009, 0.02447241172194481, -0.030328530818223953, 0.030867910012602806, 0.022592289373278618, 0.005833002272993326, -0.007289326749742031, -0.010340672917664051, 0.005366824567317963, -0.004550050012767315, 0.00635311845690012, 0.010479370132088661, 0.0034462488256394863, 0.006341560278087854, 0.004623251501470804, -0.031592220067977905, 0.010140332393348217, 0.021513530984520912, -0.03347234055399895, -0.01472505647689104, 0.004342003725469112, 0.05421533063054085, -0.0166437067091465, -0.010733649134635925, -0.012159151956439018, 0.015249025076627731, 0.019571764394640923, -0.01067971158772707, -0.03202372416853905, -0.025320008397102356, -0.0173063725233078, -0.015156559646129608, -0.011719943024218082, -0.03766408935189247, 0.016674527898430824, -0.00610269233584404, -0.017845751717686653, -0.02424125000834465, 0.0156497061252594, -0.018955331295728683, -0.0027392765041440725, 0.009770471602678299, 0.026984378695487976, -0.021513530984520912, 0.03538328409194946, 0.03411959856748581, 0.023455297574400902, -0.0072700632736086845, -0.012267027981579304, -0.0011384757235646248, 0.030929554253816605, 0.004769654478877783, 0.0005177078419364989, 0.02763163484632969, 0.020604291930794716, 0.031083662062883377, -0.02552034892141819, 0.04200994595885277, -0.025397062301635742, -0.012251616455614567, 0.029557988047599792, 0.06213650107383728, 0.010479370132088661, 0.00643402524292469, 0.0009882199810817838, 0.02219160832464695, -0.009408317506313324, -0.04117776080965996, -0.004083872307091951, 0.040191467851400375, -0.08778014034032822, -3.121296686003916e-05, -0.003261318663135171, -0.017075208947062492, 0.03649286553263664, -0.03985242918133736, 0.013245616108179092, -0.022006677463650703, 0.018770402297377586, -0.00703119533136487, -0.030467228963971138, 0.02740047127008438, 0.048790715634822845, -0.014124033972620964, -0.03140728920698166, -0.030590515583753586, 0.011951105669140816, -0.02723095193505287, -0.0033306675031781197, -0.0016807445790618658, -0.011612066999077797, 0.020450182259082794, 0.021066617220640182, 0.027385059744119644, -0.06361594051122665, -0.011727648787200451, -0.013453662395477295, 0.027878208085894585, 0.011311555281281471, 0.042749665677547455, -0.00027113445685245097, -0.030374763533473015, -0.012444252148270607, -0.013091507367789745, 0.012159151956439018, 0.006029490847140551, 0.01222850102931261, 0.010024750605225563, -0.06145842373371124, -0.022006677463650703, -0.01980292797088623, 0.010047866962850094, 0.006846264936029911, -0.013515305705368519, 0.01836971938610077, 0.0012993263080716133, -0.00421486422419548, 0.006464846897870302, -0.024549465626478195, -0.003569535445421934, -0.0026391062419861555, -0.02724636346101761, -0.024888504296541214, 0.011003338731825352, 0.01048707589507103, 0.0018377425149083138, -0.01670534908771515, 0.012197678908705711, -0.0013783068861812353, 0.002563978312537074, -0.0037640973459929228, 0.023393653333187103, -0.03223947435617447, 0.026722393929958344, 0.001243462087586522, -0.03239358216524124, -0.008899759501218796, 0.00481203431263566, 0.004137810319662094, -0.02917271852493286, -0.04382842406630516, 0.02118990384042263, -0.018554650247097015, 0.0029588809702545404, -0.020111145451664925, -0.03072921186685562, 0.0017529829638078809, -0.0040222289972007275, -0.03988325223326683, 0.00048471902846358716, -0.008945992216467857, 0.008868937380611897, 0.010672005824744701, -0.0375099815428257, -0.02102038450539112, -0.017891984432935715, 9.902668352879118e-06, -0.01101104449480772, -0.006888644769787788, 0.02330118790268898, -0.029665865004062653, -0.022792629897594452, 0.016828635707497597, -0.05261260271072388, -0.008260210044682026, 0.026383355259895325, -0.0064802574925124645, 0.00599096342921257, 0.014540126547217369, -0.05742078647017479, 0.0034423961769789457, -0.011396314948797226, 0.04176337271928787, 0.011496486142277718, 0.0015613106079399586, -0.00859924778342247, -0.020665934309363365, -0.002718086587265134, -0.007998225279152393, -0.03430452570319176, 0.013268732465803623, 0.017891984432935715, -0.003018598072230816, -0.027107665315270424, 0.007770915515720844, -0.025058023631572723, 0.02380974590778351, 0.03174632787704468, 0.003005113685503602, 0.006626660469919443, 0.012721647508442402, 0.005440026056021452, -0.008198565803468227, -0.0008861232199706137, -0.008499077521264553, -0.013738762587308884, 0.022391948848962784, -0.05036262050271034, -0.005397646222263575, 0.03874284774065018, 0.047126345336437225, 0.008622364141047001, 0.04090036451816559, -0.018292665481567383, 0.008861232548952103, 0.024888504296541214, 0.023455297574400902, -0.020003268495202065, -0.05144137889146805, 0.038712028414011, 0.026321712881326675, -0.012082098051905632, 0.02763163484632969, 0.0011760396882891655, 0.0165820624679327, 0.04453732445836067, 0.019448477774858475, -0.02601349540054798, 0.006310738623142242, 0.003623473457992077, -0.008468256331980228, -0.00751663651317358, -0.005443878937512636, -0.016397131606936455, -0.025705279782414436, -0.044568147510290146, -0.008406613022089005, 0.02142106555402279, -0.00898451916873455, 0.025998085737228394, -0.03754080459475517, -0.06303033232688904, 0.008737945929169655, -0.012914283201098442, -0.008614659309387207, 0.025890208780765533, -0.02852546237409115, -0.0010585320414975286, -0.0018849382176995277, -0.03405795246362686, 0.020897097885608673, -0.036523688584566116, -0.022653933614492416, 0.0038970159366726875, -0.017876572906970978, 0.013877460733056068, 0.0031033577397465706, -0.02174469269812107, -0.017784107476472855, -0.010001634247601032, 0.016551241278648376, 0.027508346363902092, 0.011927989311516285, -0.029326826333999634, 0.013523011468350887, 0.002423354424536228, -0.00575594836845994, -0.0104331374168396, -0.041301049292087555, -0.0043073296546936035, -0.004368972964584827, -0.020265253260731697, 0.0442599281668663, -0.0050123753026127815, 0.001502556842751801, 0.006210567895323038, 0.012713941745460033, 0.014686529524624348, 0.010217386297881603, 0.0304518174380064, 0.008375790901482105, -0.04943796992301941, -0.025212131440639496, -0.013607771135866642, 0.019664229825139046, 0.04493800550699234, 0.04487636312842369, 0.0249655582010746, 0.013523011468350887, -0.002411796245723963, 0.014154855161905289, 0.025042613968253136, 0.02545870654284954, 0.03784902021288872, -0.03430452570319176, 0.023332009091973305, -0.016520420089364052, 0.004395941738039255, 0.029557988047599792, -0.022823452949523926, 0.026105960831046104, -0.02795526199042797, -0.06429401785135269, -0.006645924411714077, 0.001257909694686532, -0.005474700592458248, 0.0016046535456553102, -0.024564877152442932, 0.002702675759792328, -0.05646531283855438, -0.03017442300915718, 0.033533986657857895, -0.030374763533473015, -0.010371494106948376, 0.03538328409194946, 0.02690732479095459, 0.009716534055769444, -0.003295993199571967, 0.013546126894652843, 0.0093158520758152, 0.006341560278087854, -0.02041936106979847, -0.01880122348666191, -0.01272935327142477, 0.019648820161819458, 0.002610210794955492, 0.01992621459066868, -0.005366824567317963, 0.026676161214709282, 0.012359492480754852, -0.009023046121001244, -0.03559903800487518, 0.00776706263422966, 0.012783290818333626, 0.0006424393504858017, -0.052951641380786896, -0.03313330188393593, 0.011134331114590168, 0.030251476913690567, 0.02968127466738224, 0.03926681727170944, 0.048297569155693054, 0.024934737011790276, -0.011927989311516285, 0.009855231270194054, -0.009439138695597649, -0.04521540179848671, 0.01779951900243759, -0.022715575993061066, -0.033533986657857895, -0.028540873900055885, -0.016720760613679886, 0.03661615401506424, -0.015125738456845284, 0.002038083504885435, 0.010086393915116787, 0.05541737750172615, 0.06108856573700905, -0.004141662735491991, -0.013584654778242111, 0.01134237740188837, 0.01162747759371996, -0.016458775848150253, -0.03452027961611748, -0.016628295183181763, 0.04127022624015808, 0.03285590931773186, 0.026814859360456467, -0.0051703364588320255, -0.002500408561900258, -0.04543115198612213, -0.04586265608668327, -0.02408714033663273, 0.003868120489642024, 0.0078248530626297, 0.021621406078338623, -0.01284493412822485, 0.0020708313677459955, 0.016227614134550095, 0.0036061361897736788, 0.010764471255242825, -0.022099142894148827, 0.019833749160170555, -0.0264141783118248, 0.021821748465299606, -0.019232727587223053, -0.0038796786684542894, 0.007497373037040234, -0.004195600748062134, 0.02323954552412033, -0.0008644517511129379, 0.03926681727170944, -0.038588739931583405, -0.022607700899243355, 0.048513319343328476, 0.016181381419301033, 0.014293553307652473, 0.03627711534500122, 0.013623181730508804, -0.024272071197628975, -0.03174632787704468, -0.02046559378504753, 0.05665024369955063, 0.0019032385898754, 0.012906577438116074, -0.0045962827280163765, 0.0035521984100341797, -0.0015266361879184842, -0.033040840178728104, -0.003511744784191251, -0.017075208947062492, 0.0047272746451199055, -0.00809839554131031, -0.058992691338062286, -0.023994676768779755, 0.0005066313315182924, 0.029927849769592285, -0.0001914315071189776, 0.01836971938610077, -0.047064702957868576, -0.036153826862573624, -0.03988325223326683, 0.0019677714444696903, -0.04949961602687836, -0.01553412526845932, 0.003717864863574505, -0.025058023631572723, 0.003469365183264017, -0.04808181896805763, -0.003852709662169218, 0.012644593603909016, 0.004422910511493683, 0.005752095486968756, -0.05131809413433075, -0.010356083512306213, 0.007443435024470091, 0.029496345669031143, 0.018616292625665665, 0.008368085138499737, 0.009801293723285198, 0.03695519268512726, 0.013923692516982555, 0.02380974590778351, 0.01758376695215702, -0.00033711211290210485, -0.008167744614183903, 0.01303756982088089, 0.017075208947062492, 0.03282508626580238, -0.001972587313503027, 0.028263477608561516, -0.014077801257371902, 0.02780115231871605, -0.027986083179712296, 0.0019225021824240685, -0.004839003551751375, -0.031160715967416763, -0.04093118757009506, 0.010964811779558659, -1.0948618182737846e-05, 0.005197305232286453, 0.018385130912065506, -0.013915987685322762, -0.0010922432411462069, -0.04250309243798256, -0.024318303912878036, 0.011997338384389877, 0.018231023102998734, 0.006133513990789652, 0.024780629202723503, -0.02462651953101158, -0.008190860971808434, 0.010055572725832462, -0.028710393235087395, -0.0036523689050227404, -0.0069811102002859116, 0.05008522793650627, 0.02307002618908882, -0.017876572906970978, -0.06145842373371124, 0.0360613614320755, 8.871767022355925e-06, 0.0064378781244158745, -0.016289256513118744, 0.040253110229969025, -0.020511826500296593, 0.019556354731321335, -0.002113211201503873, 0.015464777126908302, -0.029111074283719063, -0.011635183356702328, 0.01835430972278118, 0.010078688152134418, -0.008622364141047001, -0.04577019065618515, -0.04111611843109131, 0.029265182092785835, -0.01470194011926651, -0.01702897623181343, 0.03538328409194946, 0.017321782186627388, -0.025212131440639496, 0.011118920519948006, 0.01852382905781269, 0.015272141434252262, 0.007104396820068359, -0.005790622904896736, 0.02080463245511055, -0.041362691670656204, 0.03267097845673561, -0.05908515676856041, -0.01403927430510521, -0.025643635541200638, 0.002949249232187867, -0.03538328409194946, -0.025258364155888557, 0.033811379224061966, -0.013029864057898521, -0.0045962827280163765, 0.012413430958986282, 0.011689120903611183, -0.017568355426192284, -0.006769211031496525, 0.001219382626004517, -0.008714829571545124, -0.04999276250600815, 0.015210498124361038, -0.006846264936029911, -0.01095710601657629, 0.006749947555363178, 0.014046979136765003, 0.01741424761712551, 0.005185747053474188, 0.0057058632373809814, -0.053568076342344284, -0.006973404437303543, 0.012914283201098442, -0.012128329835832119, -0.017398837953805923, -0.021960444748401642, -0.01903238520026207, 0.017999859526753426, 0.0003970699035562575, -0.012112919241189957, -0.016273844987154007, -0.016381721943616867, -0.00022116961190477014, -0.010232796892523766, -0.02518131025135517, 0.01232096552848816, -0.00984752643853426, 0.007119807414710522, -0.014486188068985939, -0.036153826862573624, 0.02263852208852768, 0.003419279819354415, 0.007038900628685951, 0.016674527898430824, 0.012274732813239098, -0.03926681727170944, -0.007967404089868069, 0.0047272746451199055, 0.03834216669201851, -0.0020091880578547716, -0.036585330963134766, -0.002766245510429144, 0.011858640238642693, -0.0010296367108821869, 0.045122936367988586, -0.013707941398024559, -0.04167090728878975, -0.013214793987572193, -0.016104325652122498, 0.0024195017758756876, 0.004873677622526884, 0.019001564010977745, 0.037972308695316315, -0.0015747951110824943, 0.052181098610162735, -0.00649181567132473, -0.028864501044154167, 0.0020265253260731697, 0.007154481951147318, 0.00471571646630764, -0.028432996943593025, -0.03211618959903717, 0.0027238656766712666, -0.017121441662311554, 0.02929600514471531, 0.010070983320474625, -0.030081957578659058, 0.008491371758282185, -0.0005331187276169658, 0.06768440455198288, 0.0015613106079399586, -0.017244728282094002, 0.03455109894275665, 0.05248931795358658, 0.006152777466922998, -0.01506409514695406, 0.004842855967581272, 0.005455437116324902, -0.017352605238556862, 0.018785811960697174, -0.005817591678351164, -0.014848343096673489, -0.01284493412822485, 0.0026660750154405832, 0.018123146146535873, -0.00140046002343297, 0.028602516278624535, -0.019617997109889984, 0.034088775515556335, 0.0304518174380064, -0.0032362760975956917, 0.009285029955208302, 0.017660820856690407, -0.016720760613679886, -0.02075839973986149, -0.006114250514656305, 0.009446844458580017, -0.03926681727170944, 0.03083708882331848, -0.012814112938940525, 9.944807243300602e-05, 0.01963340863585472, -0.0389586016535759, -0.0030609779059886932, -0.03979078680276871, 0.007928876206278801, 0.0044691432267427444, 0.01541854441165924, -0.01350759994238615, 0.009593247435986996, 0.03211618959903717, 0.008036752231419086, 0.00998622365295887, 0.016766993328928947, 0.017845751717686653, 0.030251476913690567, -0.04043804109096527, 0.014601769857108593, 0.03479767590761185, 0.020511826500296593, 0.014085507020354271, 0.0048813833855092525, 0.03362645208835602, 0.03787984326481819, 0.0320853665471077, 0.01536460593342781, 0.017337193712592125, 0.007828705944120884, 0.0029357648454606533, -0.004557755775749683, -0.008352674543857574, -0.02307002618908882, 0.013885165564715862, -0.016890279948711395, -0.011719943024218082, -0.007670745253562927, 0.002382901031523943, -0.0033075513783842325, 0.0100093400105834, -0.00317655922845006, 0.014948513358831406, 0.004546197596937418, 0.016381721943616867, -0.011296144686639309, -0.054400261491537094, 0.008553015999495983, 0.03126859292387962, 0.007493520155549049, -0.022314894944429398, 0.011396314948797226, -0.005205010995268822, -0.01439372356981039, -0.00016759286518208683, -0.0005384162068367004, 0.019510122016072273, -0.00525509612634778, 0.011165152303874493, 0.02473439648747444, 0.00033542653545737267, -0.015796110033988953, 0.003914352972060442, -0.0010845378274098039, 0.014108623377978802, 0.012636887840926647, -0.022037498652935028, -0.019602587446570396, -0.017044387757778168, -0.01830807700753212, 0.008499077521264553, 0.02639876678586006, 0.013769584707915783, -0.01598103903234005, -0.01472505647689104, -0.034859318286180496, -0.006965699139982462, -0.006387792527675629, 0.029712097719311714, 0.021559763699769974, 0.00984752643853426, 0.008915170095860958, 0.00658813351765275, -0.006079575978219509, 0.024179605767130852, 0.008506783284246922, 0.006526490207761526, -0.017660820856690407, 0.012860344722867012, -0.039698321372270584, -0.007801737170666456, -0.0010489001870155334, 0.015387722291052341, 0.019772106781601906, -0.00859924778342247, 0.03000490367412567, 0.012945104390382767, -0.004688747692853212, 0.01079529244452715, -0.021390244364738464, -0.033657271414995193, 0.008568426594138145, 0.019849160686135292, -0.009939990937709808, 0.016335489228367805, -0.08223223686218262, -0.0017106031300500035, -0.007882644422352314, -0.0008938286337070167, 0.017830340191721916, -0.008907465264201164, -0.009107805788516998, 0.047249630093574524, -0.028371354565024376, 0.020450182259082794, -0.039297640323638916, -0.02102038450539112, 0.026367945596575737, 0.008838116191327572, -0.003035935340449214, -0.041424334049224854, -0.004646367859095335, 0.005378382746130228, -0.018015271052718163, -0.004650220740586519, 0.002036157064139843, -0.040962010622024536, -0.015526420436799526, 0.010764471255242825, -0.034643564373254776, -0.0034462488256394863, 0.005621103569865227, -0.0334106981754303, -0.045801013708114624, 0.011088098399341106, 0.014948513358831406, -0.0006655555916950107, 0.004623251501470804, -0.0006775953224860132, 0.0001058893176377751, -0.00583685515448451, 0.005297475960105658, -0.029604220762848854, -0.03812641650438309, 0.032979194074869156, -0.02624465897679329, 0.020003268495202065, 0.013962220400571823, -0.01370023563504219, -0.018446773290634155, -0.003956732805818319, -0.029527166858315468, -0.0035676092375069857, 0.013322670012712479, 0.030220655724406242, 0.062383074313402176, -0.032486047595739365, 0.005597987212240696, 0.0022596141789108515, -0.013777289539575577, 0.021390244364738464, -0.008637774735689163, -0.015888575464487076, 0.006068017799407244, -0.005370677448809147, -0.036369580775499344, 0.0039027950260788202, -0.014786699786782265, -0.023732692003250122, 0.012251616455614567, -0.017938217148184776, -0.06842412799596786, 0.022838862612843513, 0.012243911623954773, -0.014532420784235, 0.014925397001206875, -0.03396548703312874, -0.023054614663124084, 0.033256590366363525, -0.004446026869118214, -0.005020080599933863, -0.00023284814960788935, 0.01370023563504219, -0.016674527898430824, 0.01389287132769823, 0.03301001712679863, -0.0039644381031394005, 0.01986457034945488, -0.021266957744956017, -0.019879981875419617, 0.0026641488075256348, 0.006511079613119364, -0.02989702671766281, -0.004711864050477743, 0.020003268495202065, -0.004719569347798824, 0.0414859764277935, -0.004322740249335766, 0.07575968652963638, -0.0022056763991713524, 0.01813855767250061, 0.015672823414206505, 0.01753753423690796, -0.028694981709122658, 0.023147080093622208, 0.00122708803974092, 0.0022904358338564634, 0.011596656404435635, 0.048235926777124405, 0.015657411888241768, -0.029912438243627548, 0.03707847744226456, -0.005509374663233757, -0.009724238887429237, -0.04336610063910484, 0.0071429237723350525, -0.015025568194687366, -0.02863333933055401, 0.024225838482379913, -0.03145352378487587, 0.010463959537446499, -0.026706984266638756, -0.003569535445421934, 0.0034462488256394863, 0.011519601568579674, -0.016674527898430824, -0.04111611843109131, 0.06207485869526863, -0.017999859526753426, 0.0015921322628855705, -0.022653933614492416, -0.0004433024150785059, 0.0019513975130394101, 0.002845226088538766, -0.0007088985876180232, -0.0025890208780765533, -0.006422467064112425, 0.0029357648454606533, -0.003215086180716753, -0.006811590865254402, 0.0017558723920956254, 0.042133234441280365, 0.007828705944120884, 0.008707123808562756, 0.018061503767967224, 0.005405351519584656, 0.02169846184551716, -0.005185747053474188, 0.024980969727039337, 0.014470777474343777, -0.01636631041765213, 0.026337124407291412, 0.01924813725054264, 0.044629789888858795, -0.005817591678351164, 0.025504937395453453, -0.023100847378373146, -0.037355873733758926, 0.0243028923869133, -0.009970813058316708, 0.016797814518213272, -0.013885165564715862, -0.00021996564464643598, -0.022730987519025803, 0.012529011815786362, -0.001958139706403017, 0.002956954762339592, 0.008044457994401455, -0.02530459687113762, 0.02385597862303257, 0.022207017987966537, 0.02712307684123516, 0.01270623691380024, 0.001509299036115408, -0.005278212483972311, -0.029218951240181923, 0.020619701594114304, 0.011095804162323475, -0.021713871508836746, -0.010201975703239441, 0.01433978509157896, 0.017183085903525352, 0.008005931042134762, 0.016844047233462334, 0.008136922493577003, -0.01067971158772707, 0.010764471255242825, 0.013445956632494926, 0.020881686359643936, 0.01769164204597473, -0.024564877152442932, -0.02336283214390278, -0.029696686193346977, -0.01489457581192255, 0.016165969893336296, -0.03134564682841301, 0.004711864050477743, -0.007663039490580559, 0.009701123461127281, 0.014940808527171612, 0.009947696700692177, -0.021236136555671692, -0.005220421589910984, 0.04765031486749649, -0.004442174453288317, 0.0037698764353990555, 0.025104256346821785, 0.009231092408299446, -0.0528283566236496, -0.019617997109889984, 0.01564200222492218, 0.023224133998155594, -0.0018724169349297881, 0.01636631041765213, -0.01719849556684494, 0.010078688152134418, -0.029943259432911873, 0.0028336679097265005, 0.01300674770027399, 0.027600811794400215, -0.03957503288984299, 0.028879912570118904, -0.006152777466922998, 0.008637774735689163, 0.0016614811029285192, -0.034705210477113724, 0.005979405250400305, 0.019849160686135292, 0.008838116191327572, 0.05893104895949364, -0.010017044842243195, 0.0020014827605336905, -0.011935695074498653, -0.01647418737411499, -0.02157517522573471, 0.017599178478121758, 0.030328530818223953, 0.015541831031441689, 0.018508417531847954, 0.01681322604417801, -0.007990519516170025, -0.013669414445757866, 0.003153442870825529, -0.009708828292787075, 0.009238798171281815, -0.02114367112517357, -0.010040161199867725, -0.032147008925676346, -0.002798993606120348, 0.00716989254578948, -0.00863006990402937, -0.005574870854616165, 0.016458775848150253, 0.002053494332358241, -0.02208373136818409, -0.017460480332374573, 0.016936512663960457, 0.023439886048436165, 0.035753145813941956, -0.03439699113368988, -0.005401499103754759, 0.003112989477813244, -0.0020939477253705263, -0.00467333709821105, -0.02163681760430336, -0.020989563316106796, -0.07273916155099869, -0.0200186800211668, 0.008522193878889084, -0.0373866967856884, -0.013661708682775497, 0.008568426594138145, -0.003852709662169218, 0.0006612212746404111, -0.0010546792764216661], "index": 32}, {"title": "Ray Collins (actor)", "text": "Ray Bidwell Collins (December 10, 1889 \u2013 July 11, 1965) was an American character actor in stock and Broadway theatre, radio, films and television. With 900 stage roles to his credit, he became one of the most successful actors in the developing field of radio drama. A friend and associate of Orson Welles for many years, Collins went to Hollywood with the Mercury Theatre company and made his feature film debut in Citizen Kane, as Kane's ruthless political rival.", "vector": [0.007792048156261444, 0.013407074846327305, -0.028745872899889946, -0.006002138368785381, -0.041455380618572235, -0.028623223304748535, -0.017324179410934448, 8.85582539922325e-06, -0.028362594544887543, 0.04121008515357971, -0.060312673449516296, 0.05053141340613365, -0.01983848586678505, -0.023594612255692482, -0.0034763342700898647, -0.018336033448576927, -0.029497098177671432, 0.036733392626047134, -0.04577876254916191, 0.019240571185946465, 0.0677022784948349, -0.046116046607494354, -0.013529724441468716, 0.054272208362817764, 0.020651035010814667, 0.002437649993225932, -0.032042067497968674, -0.052279163151979446, -0.01755414716899395, -0.00985025241971016, 0.0560506209731102, 0.019424544647336006, 0.04436829686164856, 0.014464923180639744, -0.015001513063907623, -0.07898599654436111, 0.007972189225256443, -0.0006362419808283448, -0.0011431275634095073, 0.01451091654598713, 0.005312237422913313, 0.024959083646535873, -0.059055522084236145, -0.008899722248315811, -0.004649166017770767, 0.01770745776593685, 0.002269007498398423, 0.01055548433214426, 0.014671893790364265, -0.009512967430055141, -0.0027826004661619663, -0.061355192214250565, 0.004526516888290644, -0.010877438820898533, -0.0010530571453273296, 0.01410464197397232, 0.026108918711543083, 0.062459032982587814, 0.008140831254422665, -0.019547194242477417, -0.025020407512784004, -0.05252445861697197, -0.03940100967884064, -0.015653086826205254, 0.06202976033091545, 0.014119972474873066, 0.020758353173732758, 0.0029646577313542366, -0.003552990034222603, -0.03658008202910423, 0.010724127292633057, -0.027304746210575104, -0.017891431227326393, 0.06310293823480606, -0.0421912781894207, 0.011590336449444294, -0.008600764907896519, 0.009290666319429874, -0.0031677952501922846, -0.039002399891614914, -0.015085834078490734, 0.009022371843457222, -0.032011404633522034, 0.09621818363666534, 0.00016792380483821034, -0.05479346588253975, -0.009160351939499378, -0.06304161995649338, -0.02000712789595127, 0.018428022041916847, 0.039370346814394, 0.05408823490142822, 0.027228090912103653, -0.035752199590206146, -0.0006324092391878366, -0.0396769717335701, -0.015806397423148155, -0.012563862837851048, -0.007795881014317274, 0.012295568361878395, -0.013131114654242992, -0.054210882633924484, 0.002907166024670005, -0.017032887786626816, 0.06003671512007713, 0.022720737382769585, -0.0037733749486505985, -0.026292892172932625, 0.01743149757385254, 0.05460949242115021, 0.03161279484629631, -0.04228326305747032, -0.022996699437499046, -0.039125051349401474, 0.007918530143797398, 0.016051694750785828, -0.03403511270880699, 0.03707067668437958, -0.0005255703581497073, -0.01221891213208437, -0.035874851047992706, -0.04538015276193619, 0.022782063111662865, 0.024146532639861107, 0.006082626990973949, 0.007148140575736761, 0.02925180085003376, -0.03363650292158127, -0.008025847375392914, 0.01513182744383812, -0.013637042604386806, -0.019577855244278908, -0.01048649474978447, -0.022598089650273323, 0.03749994933605194, 0.0069641671143472195, 0.003508912865072489, 0.01758480817079544, -0.023701930418610573, 0.05969943106174469, -0.008646758273243904, -0.06776360422372818, -0.0006678624777123332, 0.04338710382580757, 0.01284748874604702, -0.026323555037379265, 0.006017469335347414, -0.05859558656811714, -0.029650410637259483, -0.03943167254328728, -0.015323466621339321, -0.030815575271844864, 0.03026365488767624, -0.04994883015751839, -0.01454157941043377, -0.027228090912103653, 0.012824492529034615, -0.04301915690302849, 0.009053033776581287, -0.022674744948744774, -0.024974415078759193, 0.012916479259729385, -0.0467599555850029, 0.004304215312004089, -0.015837060287594795, -0.03520027920603752, 0.025955606251955032, -0.014756214804947376, -0.03501630574464798, 0.017017556354403496, 0.013721363618969917, 0.01400498952716589, 0.01047882903367281, -0.015024510212242603, -0.020099114626646042, -0.010294855572283268, -0.03234868869185448, -0.030202331021428108, -0.013338085263967514, 0.013890005648136139, 0.0017851187149062753, -0.05743042379617691, 0.004710490349680185, 0.01750815287232399, 0.015308136120438576, -0.007374274544417858, 0.029895707964897156, 0.0030259822960942984, 0.0006918173748999834, -0.0004000467306468636, 0.02098832093179226, 0.031091537326574326, 0.012985468842089176, 0.002370576374232769, 0.02324199676513672, 0.012732505798339844, -0.01057081576436758, -0.050930023193359375, -0.04918227344751358, -0.010195203125476837, -0.03406577557325363, 0.007159638684242964, 0.006032800767570734, -0.026093587279319763, -0.00021643246873281896, -0.019102590158581734, 0.03268597275018692, -0.02213815599679947, -0.023609943687915802, 0.032256703823804855, -0.008754076436161995, -0.046361345797777176, 0.02233745902776718, 0.06892877072095871, -0.006967999506741762, 0.02696746215224266, 0.0006755280192010105, 0.0116133326664567, 0.02351795695722103, -0.011743647046387196, -0.012126925401389599, 0.006201443262398243, 0.02578696422278881, 0.005335234105587006, 0.04176200553774834, 0.002742356387898326, -0.04078081250190735, 0.027826005592942238, 0.01411230769008398, -0.02681414969265461, -0.031198853626847267, 0.007673231884837151, 0.008347801864147186, 0.01986914686858654, -0.01169765368103981, 0.00015666500257793814, 0.026154911145567894, -0.04430697113275528, -0.03049362264573574, -0.005611194297671318, -0.05365896224975586, 0.043816376477479935, -0.024207858368754387, -0.043877702206373215, 0.07659433782100677, -0.034525711089372635, 0.006281931418925524, -0.1023506373167038, -0.043816376477479935, 0.015407787635922432, 0.016833582893013954, -0.020666366443037987, 0.05752240866422653, -0.05286174267530441, -0.0058948202058672905, 0.01641964353621006, 0.012011942453682423, -0.005070772022008896, -0.042743198573589325, 0.02590961381793022, -0.04461359605193138, 0.004963454324752092, -0.0008096754318103194, -0.001240863581188023, -0.04350975528359413, -0.041394058614969254, -0.04430697113275528, -0.06512665003538132, -0.0013443486532196403, 0.006860681809484959, -0.012410551309585571, -0.04884498938918114, -0.006661376915872097, 0.021831532940268517, -0.016833582893013954, -0.03602816164493561, 0.03038630448281765, -0.04642266780138016, 0.013322753831744194, -0.08174559473991394, 0.014196628704667091, -0.03428041189908981, 0.03605882450938225, -0.06733433157205582, -0.03654941916465759, -0.014748549088835716, 0.019654512405395508, 0.015407787635922432, 0.0443989597260952, 0.0046223364770412445, -0.019071929156780243, 0.002537302440032363, 0.00441536633297801, 0.021708883345127106, 0.006477403454482555, -0.04326445609331131, 0.03820518031716347, -0.04320313036441803, 0.02814795821905136, -0.019071929156780243, 0.033329881727695465, 0.004963454324752092, -0.020329082384705544, -0.03400444984436035, 0.0012303233379498124, 0.001423878944478929, -0.003317273687571287, 0.01339941006153822, 0.03759193792939186, -0.06892877072095871, -0.0658012181520462, -0.008002851158380508, 0.01634298637509346, 0.0034265080466866493, 0.014786876738071442, -0.0014832870801910758, 0.03854246810078621, -0.03544557839632034, -0.029987694695591927, -0.013437737710773945, 0.026430871337652206, 0.021816201508045197, -0.06641446799039841, -0.017308847978711128, -0.018090736120939255, 0.033329881727695465, 0.017354842275381088, 0.009604954160749912, -0.013054459355771542, 0.07782083004713058, -0.04105677083134651, -0.011023084633052349, 0.05365896224975586, -0.015300470404326916, -0.03639610856771469, -0.03838915377855301, -0.03483233228325844, 0.03354451805353165, 0.013284426182508469, -0.009137354791164398, 0.004246723838150501, 0.030800245702266693, -0.039033062756061554, 0.02693679928779602, -0.013246098533272743, -0.056510552763938904, -0.0069411699660122395, -0.02548034116625786, 0.03032498061656952, -0.0038500307127833366, 0.0006860681460238993, 0.010601477697491646, -0.026139581575989723, 0.02446848712861538, 0.010179871693253517, 0.025219712406396866, -0.04111809656023979, 0.01109207421541214, 0.010992421768605709, 0.0329006090760231, 0.015990370884537697, -0.0023437468335032463, 0.004273553378880024, 0.02209216170012951, -0.00757357943803072, -0.016143683344125748, 0.01996113359928131, 0.044000349938869476, -0.04191531613469124, 0.02112630009651184, -0.020589711144566536, 0.01988447830080986, -0.007684729993343353, 0.021708883345127106, 0.02932845614850521, -0.004534182604402304, -0.02449914999306202, -0.012057935819029808, -0.03501630574464798, -0.018213385716080666, -0.028623223304748535, 0.007834208197891712, 0.011299044825136662, 0.021555572748184204, -0.015959708020091057, -0.029803721234202385, -0.06911274790763855, -0.010846775956451893, -0.023134678602218628, -0.01108440849930048, -0.00781504437327385, 0.018520008772611618, 0.00784570723772049, 0.011536677367985249, 0.036886703222990036, -0.015898384153842926, 0.03308458253741264, 0.04200730100274086, 0.07978321611881256, 0.002610125346109271, -0.0513286329805851, -0.02822461538016796, 0.03979961946606636, 0.017906762659549713, -0.0007713476079516113, -0.03133683279156685, 0.004028255119919777, -0.0014190879883244634, 0.0324406772851944, 0.009911577217280865, 0.015032174997031689, -0.008378463797271252, -0.012004276737570763, 0.007646402344107628, -0.011467686854302883, -0.03780657425522804, -0.025449680164456367, 0.028408588841557503, 0.018106067553162575, 0.015990370884537697, -0.0058986530639231205, -0.004813975654542446, 0.04222193732857704, -0.014188962988555431, 0.09364255517721176, 0.043785713613033295, 0.015438450500369072, -0.0008503987337462604, 0.006672875490039587, -0.019347889348864555, -0.052095189690589905, 0.022000174969434738, 0.028653886169195175, -0.013591049239039421, 0.02908315882086754, -0.017952756956219673, -0.07064586132764816, 0.0019144751131534576, -0.0043693725019693375, -0.022690076380968094, 0.007243960164487362, 0.010946428403258324, -0.08800069987773895, -0.042589884251356125, -0.03869577869772911, -0.010670468211174011, -0.006086459383368492, -0.029665742069482803, -0.047250550240278244, 0.05994472652673721, -0.02548034116625786, -7.090648432495072e-05, 0.010034225881099701, 0.04436829686164856, -0.0008992667426355183, 0.03734663873910904, 0.03354451805353165, 0.006094125099480152, -0.048477042466402054, 0.03759193792939186, 0.009237007237970829, -0.028807198628783226, 0.005477047059684992, 0.04682127758860588, -0.0030298151541501284, 0.003936268389225006, -0.008876726031303406, -0.0258942823857069, -0.0030202330090105534, -0.013966661877930164, -0.05712379887700081, -0.017170868813991547, -0.0146029032766819, -0.0269981250166893, 0.007910864427685738, -0.034525711089372635, 0.013422406278550625, -0.011069077998399734, 0.0023073353804647923, -0.004790978971868753, -0.011896958574652672, -0.020559048280119896, -0.028531236574053764, -0.007926195859909058, -0.003690970130264759, -0.015101165510714054, -0.03152080997824669, -0.027412064373493195, -0.05096068233251572, -0.06187644973397255, 0.025173719972372055, 0.023855242878198624, 0.018075404688715935, -0.02114163152873516, -0.021340936422348022, -0.003549157176166773, 0.01119939237833023, -0.021800870075821877, -0.005365896504372358, 0.0002970406785607338, 0.020191101357340813, 0.0673956573009491, 0.03642677143216133, 0.005860325414687395, -0.02324199676513672, -0.009045368060469627, 0.0683155283331871, 0.0029550758190453053, 0.01526214275509119, -0.004641500301659107, 0.001572399283759296, 0.05359764024615288, 0.04792511835694313, 0.041271407157182693, 0.010616809129714966, -0.05372028797864914, 0.018933948129415512, -0.021678220480680466, -0.010394508019089699, 0.0020160439889878035, -0.00044843563227914274, -0.011130401864647865, 0.023793917149305344, 0.039217036217451096, 0.029957031831145287, -0.012211247347295284, 0.021938851103186607, 0.010356180369853973, -0.01285515446215868, -0.015039840713143349, 0.018075404688715935, -0.011858630925416946, 0.013054459355771542, -0.002922497224062681, -0.012701842933893204, 0.037959884852170944, -0.006669042631983757, 0.01296247262507677, 0.015729742124676704, -0.018244046717882156, 0.018290041014552116, 0.08297208696603775, 0.015806397423148155, 0.005369728896766901, 0.031168192625045776, 0.027841337025165558, -0.020160438492894173, -0.0004596944199874997, 0.004584008362144232, 0.01773812063038349, 0.03182743117213249, -0.0012926061172038317, 0.02682948112487793, 0.011835633777081966, 0.010892769321799278, -0.004748818464577198, -0.026599515229463577, -0.03170478343963623, -0.014242622070014477, -0.003922853618860245, 0.011797306127846241, -0.015576430596411228, 0.005369728896766901, 0.011544343084096909, -0.054548170417547226, -0.00871574878692627, 0.032195378094911575, -0.03492432087659836, -0.05828896537423134, -0.05712379887700081, -0.015277473255991936, 0.00880006980150938, -0.01746216043829918, -0.012870485894382, -0.020635703578591347, 0.01879596896469593, 0.010064888745546341, 0.033176571130752563, -0.006508065853267908, -0.002136776689440012, 0.010279524140059948, -0.03308458253741264, 0.028914514929056168, -0.03826650604605675, -0.030631601810455322, -0.020620372146368027, 0.00016995998157653958, 0.029543092474341393, 0.03351385518908501, -0.007067651953548193, -0.023686598986387253, -0.010110882110893726, 0.02319600246846676, 0.035537563264369965, 0.020083783194422722, 0.020421069115400314, -0.007470094133168459, 0.006251269020140171, 0.04994883015751839, 0.003508912865072489, -0.00033632671693339944, 0.03633478283882141, 0.030984219163656235, -0.024023884907364845, 0.0006146825617179275, -0.012456544674932957, 0.025204380974173546, 0.0018291957676410675, -0.016864245757460594, 0.008140831254422665, -0.006082626990973949, -0.021356267854571342, -0.024897759780287743, 0.042773857712745667, -0.015576430596411228, -0.03633478283882141, 0.0032578655518591404, -0.0234566330909729, 0.016910238191485405, 0.019194576889276505, -0.016833582893013954, 0.029635079205036163, -0.016833582893013954, -0.023180672898888588, 0.035537563264369965, -0.008685086853802204, -0.016051694750785828, -0.021678220480680466, -0.0067801931872963905, 0.05099134519696236, 0.0021386928856372833, -0.02356395125389099, -0.021356267854571342, -0.009773597121238708, 0.01118406094610691, -0.04084213823080063, -0.00871574878692627, -0.020789016038179398, 0.018198054283857346, -0.033176571130752563, -0.02696746215224266, -0.017937425523996353, 0.03544557839632034, 0.013913002796471119, -0.01752348430454731, 0.023042691871523857, 0.007447097450494766, 0.01966984197497368, -0.045226842164993286, -0.0046261693350970745, 0.01890328712761402, -0.021877525374293327, -0.013905337080359459, -0.01293180976063013, 0.00942098069936037, -0.01635831780731678, -0.028316602110862732, -0.011498349718749523, -0.012655849568545818, 0.0012169086840003729, 0.009888580068945885, 0.016051694750785828, 0.004101078025996685, 0.07254692167043686, -0.016894908621907234, -0.0023839911445975304, -0.019577855244278908, 0.036702729761600494, -0.004254389088600874, 0.007719225250184536, 0.02233745902776718, 0.0223527904599905, 6.881043373141438e-05, -0.040167566388845444, -0.00020457479695323855, -0.007140474859625101, -0.014050982892513275, -0.031980741769075394, -0.0036679734475910664, -0.008784739300608635, -0.03961564600467682, 0.0009088487131521106, -0.02673749439418316, -0.01985381729900837, 0.019685173407197, 0.008577768690884113, -0.01408164482563734, -0.024989746510982513, -0.0005476088845171034, 0.011490684002637863, -0.014480254612863064, 0.005733843427151442, -0.00731295021250844, 0.0009601121419109404, -0.003144798567518592, 0.011498349718749523, -0.01278616487979889, -0.028178621083498, -0.009543630294501781, 0.021754877641797066, 0.004591674078255892, -0.013445403426885605, 0.010724127292633057, 0.0001922380324685946, -0.025373024865984917, -0.03308458253741264, -0.025235043838620186, -0.034740347415208817, -0.014940188266336918, -0.02449914999306202, -0.013031462207436562, 0.036794718354940414, 0.010946428403258324, 0.021846864372491837, 0.023640606552362442, -0.00810250360518694, 0.043724387884140015, -0.009030036628246307, -0.027504051104187965, 0.018060073256492615, 0.019654512405395508, 0.006393082439899445, 0.01471788715571165, -0.014495586045086384, -0.01117639522999525, 0.008570102974772453, 0.007895532995462418, -0.042651209980249405, -0.026568852365016937, 0.004764149431139231, -0.03878776356577873, -0.006124787498265505, 0.012870485894382, -0.005484712775796652, 0.0020850340370088816, 0.02100365050137043, -0.04872233793139458, -0.006910508032888174, 0.034556373953819275, 0.00555753568187356, -0.03176610544323921, -0.02124894969165325, 0.026538189500570297, -0.033176571130752563, 0.020237095654010773, 0.04804776981472969, 0.006619216408580542, 0.015300470404326916, 0.009827256202697754, -0.025265706703066826, 0.011398697271943092, 0.013629376888275146, -0.011521345935761929, 0.011153399012982845, -0.014871198683977127, 0.029757728800177574, 0.03857313096523285, -0.062489695847034454, 0.0006501358584500849, 0.008240483701229095, 0.011237720027565956, 0.00817915890365839, -0.01744682900607586, -0.031214185059070587, 0.01297013834118843, -0.008777073584496975, -0.001267693005502224, 0.015039840713143349, 0.024054545909166336, 0.00022505623928736895, -0.014909526333212852, -0.026584183797240257, -0.02940511144697666, 0.0010089802090078592, 0.003353685140609741, 0.04084213823080063, -0.005933148320764303, 0.003286611521616578, 0.00041729427175596356, -0.022475440055131912, -0.034648358821868896, 0.05948479473590851, -0.014311611652374268, -0.013506727293133736, -0.016925569623708725, 0.003106470685452223, 0.010118547827005386, -0.0023207501508295536, -0.0037005520425736904, -0.015622423961758614, -0.026400210335850716, -0.04482823237776756, -0.014848201535642147, -0.02468312345445156, -0.043877702206373215, -0.0448588952422142, -0.005948479287326336, 0.005572866648435593, -0.048599690198898315, 0.03946233540773392, 0.01980782300233841, 0.025265706703066826, 0.022521434351801872, -0.05166591703891754, 0.016956232488155365, 0.004652998875826597, 0.010708795860409737, -0.019209908321499825, 0.008784739300608635, 0.015461446717381477, 0.009007040411233902, 0.0039707631804049015, 0.016848914325237274, 0.005603529047220945, 0.02452981099486351, -0.006481236312538385, 0.01973116770386696, -0.011452356353402138, 0.0006755280192010105, -0.036702729761600494, -0.013575717806816101, 0.015553433448076248, 0.001031976891681552, 0.009359655901789665, 0.010662802495062351, -0.0020524554420262575, 0.016956232488155365, -0.052156511694192886, 0.013529724441468716, -0.008585434406995773, -0.025173719972372055, 0.06874480098485947, -0.02567964605987072, 0.03403511270880699, -0.036978691816329956, -0.013606379739940166, 0.029711734503507614, 0.042743198573589325, 0.04065816476941109, 0.041332732886075974, 0.004066582769155502, -0.03360584378242493, -0.02790266089141369, -0.00011282755440333858, -0.0043923696503043175, 0.020083783194422722, 0.02106497623026371, -0.028822528198361397, -0.0033958458807319403, -0.006803189869970083, -0.03593617305159569, -0.01764613389968872, -0.021448254585266113, 0.025235043838620186, 0.03504696860909462, -0.03047829121351242, 0.0022153486497700214, -0.028730541467666626, 0.0005250913091003895, 0.0013759691501036286, 0.04436829686164856, -0.00011821740190498531, -0.013131114654242992, 0.020804347470402718, 0.0052624111995100975, 0.02903716452419758, 0.023793917149305344, -0.03848114237189293, 0.02931312471628189, -0.053107041865587234, 0.00996523629873991, 0.010432835668325424, 0.01651163026690483, -0.03296193480491638, -0.044031012803316116, 0.04093412309885025, -0.014142969623208046, 0.03841981664299965, 0.02111096866428852, 0.013276760466396809, 0.005580532364547253, -0.002914831507951021, 0.003581735771149397, 0.0024242352228611708, 0.014817539602518082, -0.034495048224925995, -0.04461359605193138, 0.003380514681339264, -0.00643141008913517, -0.0013261429267004132, -0.0035376588348299265, 0.04185399040579796, -0.0032923605758696795, -0.0013865092769265175, -0.018290041014552116, 0.019424544647336006, -0.030938224866986275, -0.016634277999401093, -0.04590141028165817, 0.023579280823469162, -0.0054387194104492664, 0.00378678971901536, -0.017906762659549713, 0.018182722851634026, 0.005377394612878561, 0.007972189225256443, -0.010294855572283268, 0.003658391535282135, 0.018136730417609215, -0.06227505952119827, 0.05286174267530441, 0.02085033990442753, 0.06227505952119827, -0.022812724113464355, 0.005852659698575735, 0.011023084633052349, -0.009566626511514187, -0.013752025552093983, 0.018320703878998756, 0.00942864641547203, 0.042620547115802765, 0.030202331021428108, 0.014165966771543026, 0.002056288067251444, 0.020053120329976082, -0.007025491446256638, 0.0061401184648275375, -0.02564898505806923, 0.024928420782089233, -0.05945413187146187, 0.01472555287182331, -0.007109812460839748, -0.047158561646938324, -0.02112630009651184, 0.02787199802696705, 0.018198054283857346, -0.020114446058869362, -0.03360584378242493, -0.022858718410134315, -0.04651465639472008, -0.0354149155318737, -0.0020428732968866825, -0.029681071639060974, -0.016879577189683914, 0.020651035010814667, 0.039094388484954834, -0.012402886524796486, 0.010440501384437084, -0.04338710382580757, 0.013215435668826103, -5.038013568992028e-06, 0.029543092474341393, -0.02439183183014393, -0.0023169172927737236, 0.012648183852434158, 0.010287189856171608, -0.003909438848495483, -0.03035564161837101, 0.013085121288895607, -0.009037702344357967, -0.018489345908164978, 0.00757357943803072, -0.038082532584667206, -0.015407787635922432, -0.014832871034741402, -0.0013318920973688364, 0.004035920836031437, -0.046116046607494354, -0.008915053680539131, -0.0032233705278486013, 0.03253266215324402, 0.02121828682720661, -0.005998305510729551, -0.01057848148047924, -0.004591674078255892, 0.005607361905276775, -0.033237896859645844, 0.02088100276887417, -0.008370798081159592, 0.01045583188533783, 0.01874997466802597, 0.031030211597681046, -0.04553346335887909, -0.001405673217959702, 0.03550690412521362, 0.036764055490493774, -0.030861569568514824, 0.0021118635777384043, 0.011460021138191223, -0.0048676347360014915, -0.03400444984436035, 0.028607893735170364, -0.024913089349865913, -0.021632228046655655, 0.00932132825255394, 0.007213297765702009, 0.026170242577791214, 0.001082761213183403, -0.007734556216746569, -0.04651465639472008, -0.03872644156217575, 0.0002824281982611865, 0.008746410720050335, -0.015361794270575047, -0.06856082379817963, 0.010195203125476837, 0.007151973433792591, -0.0007459553889930248, -0.03615080937743187, 0.02794865518808365, 0.0034054277930408716, -0.018060073256492615, 0.027228090912103653, 0.00035668836790136993, 0.04642266780138016, 0.0008911220938898623, -0.013146446086466312, -0.02443782426416874, 0.04467491805553436, 0.018949279561638832, 0.0012945225462317467, 0.00643141008913517, 0.028331933543086052, 0.0013941748766228557, -0.010026560164988041, 0.011069077998399734, -0.007466261275112629, -0.015599426813423634, 0.004089579451829195, 0.03618147224187851, 0.03354451805353165, -0.01971583627164364, -0.0076004089787602425, -0.030646933242678642, 0.009053033776581287, 0.010080219246447086, -0.021417591720819473, 0.02584828995168209, 0.011820303276181221, 0.025955606251955032, -0.026660839095711708, -0.0009744851267896593, -0.005055441055446863, 0.026538189500570297, -0.01398199237883091, 0.013844012282788754, -0.015438450500369072, -0.018397359177470207, -0.005622692871838808, -0.034740347415208817, -0.005158925894647837, -0.01980782300233841, -0.004242890980094671, 0.016710935160517693, 0.01649629883468151, -0.010655136778950691, -0.028991172090172768, -0.013767356984317303, 0.006488901562988758, 0.02327265962958336, -0.007213297765702009, -0.015009178780019283, 0.008754076436161995, -0.00811783503741026, 0.01980782300233841, -0.008876726031303406, 0.03299259766936302, -0.014564575627446175, -0.006772527936846018, -0.011322041042149067, -0.01512416172772646, 0.03593617305159569, -0.06052730977535248, -0.0269214678555727, 0.0007296660915017128, 0.02114163152873516, -0.01471022143959999, -0.041608694940805435, -0.010233530774712563, -0.005572866648435593, 0.016848914325237274, 0.0012897314736619592, 0.028730541467666626, -0.029558423906564713, -0.015047506429255009, -0.035629551857709885, 0.030049020424485207, 0.03768392279744148, 0.005423387978225946, 0.026093587279319763, -0.013284426182508469, 0.01523914560675621, -0.04596273601055145, -0.012410551309585571, 0.030922893434762955, -0.026262229308485985, -0.02344130165874958, 0.05917816981673241, 0.01163632981479168, -0.005101434420794249, 0.012525535188615322, 0.034648358821868896, -0.005576699506491423, 0.0018474014941602945, 0.023747924715280533, 0.017922094091773033, -0.014188962988555431, 0.018228717148303986, -0.028607893735170364, -0.014564575627446175, -0.019087260589003563, 0.0013146445853635669, -0.006048131734132767, -0.010287189856171608, 0.009689276106655598, -0.012494873255491257, -0.013759691268205643, -0.0036468931939452887, 0.012188250198960304, -0.00880006980150938, 0.00010528176062507555, -0.004262054804712534, -0.023947229608893394, -0.01867331936955452, -0.03418842703104019, -0.016848914325237274, -0.020666366443037987, 0.0469132661819458, -0.013782688416540623, -0.01755414716899395, -0.03161279484629631, -0.014802208170294762, 0.0423445887863636, 0.006745698396116495, 0.004698992241173983, -0.007174970116466284, -6.550166631313914e-07, 0.007117478176951408, -0.005730010569095612, -0.02569497749209404, 0.016756927594542503, -0.014786876738071442, -0.012609856203198433, -0.012195915915071964, -0.026185574010014534, -0.0041470713913440704, 0.014303946867585182, 0.029880376532673836, -0.04099544882774353, 0.01629699394106865, 0.017891431227326393, -0.017983417958021164, 0.01159800123423338, -0.005864158272743225, -0.019301895052194595, -0.010241196490824223, 0.01469489000737667, 0.01743149757385254, -0.02577163279056549, -0.029849715530872345, 0.026630176231265068, -0.0025238876696676016, -0.007726890500634909, -0.03277796134352684, 0.021816201508045197, -0.0036488096229732037, -0.03286994621157646, 0.0004903567023575306, -0.03860379010438919, 0.015055172145366669, -0.008892056532204151, -0.02088100276887417, -0.0017419998766854405, -0.022598089650273323, -0.011030749417841434, -0.023916566744446754, -0.0016145599074661732, -0.00872341450303793, -0.018290041014552116, -0.04225260019302368, 0.032195378094911575, 0.007872536778450012, -0.0025296369567513466, -0.0001810990070225671, -0.03624279797077179, 0.008531775325536728, 0.012134591117501259, 0.008623762056231499, 0.02226080372929573, -0.009788927622139454, 0.016664940863847733, -0.0018138645682483912, 0.03771458566188812, -0.006837685126811266, -0.0031352166552096605, -0.006803189869970083, 0.00246639596298337, -0.02695213072001934, -0.0009505302296020091, 0.025020407512784004, -0.03375915437936783, -0.02564898505806923, 0.02945110574364662, 0.011467686854302883, -0.001661511487327516, 0.016710935160517693, -0.004607005510479212, -0.011590336449444294, -0.0018905202159658074, 0.021862193942070007, 0.01047882903367281, 0.038971737027168274, -0.009627951309084892, 0.0008599807042628527, 0.027611369267106056, 0.014135303907096386, 0.0421912781894207, -0.022506102919578552, 0.0029857379850000143, 0.01121472381055355, 0.0014133388176560402, -0.02088100276887417, 0.02328798919916153, -0.02127961255609989, -0.006385416723787785, 0.0007593701593577862, -0.021478915587067604, -0.02581762708723545, 0.022736068814992905, 0.027136104181408882, -0.023579280823469162, -8.773479930823669e-05, 0.035537563264369965, -0.00414323853328824, -0.01770745776593685, -0.04654531925916672, -0.008968712761998177, 0.019516531378030777, -0.0074355993419885635, -0.020344411954283714, -0.011927621439099312, -0.030141007155179977, -0.027534713968634605, 0.009497636929154396, -0.048538364470005035, 0.005400391295552254, 0.007443264592438936, -0.013690701685845852, 0.02088100276887417, -0.004476690664887428, -0.028761204332113266, -0.004227559547871351, -0.008048844523727894, 0.0290524959564209, 0.016664940863847733, -0.028408588841557503, 0.00871574878692627, 0.020283088088035583, -0.003144798567518592, -0.01225724071264267, -0.03887975215911865, -0.055560022592544556, -0.041486043483018875, -0.015469112433493137, 0.01408164482563734, 0.024269182235002518, 0.01172831654548645, -0.02210749313235283, 0.02810196578502655, 0.018366696313023567, -0.027764679864048958, -0.00883073266595602, 0.009267669171094894, 0.00810250360518694, -0.018520008772611618, -0.02344130165874958, -0.04476690664887428, -0.018489345908164978, -0.022705407813191414, 0.0032578655518591404, -0.02791799232363701, 0.015599426813423634, 0.008125499822199345, -0.017278186976909637, 0.012916479259729385, -0.015116496942937374, 0.010233530774712563, -0.011575005017220974, -0.013644707389175892, 0.007021658588200808, 0.02218414843082428, -0.01048649474978447, 0.004764149431139231, -0.0008820192306302488, -0.012073266319930553, 0.00010438344907015562, -0.019117921590805054, -0.016618948429822922, 0.028439249843358994, -0.001186246401630342, 0.012640519067645073, -0.00944397784769535, 0.036764055490493774, -0.007512255106121302, -0.026660839095711708, 0.013798018917441368, 0.005841161590069532, -0.007021658588200808, 0.009397984482347965, -0.016036365181207657, 0.042620547115802765, -0.018044743686914444, -0.014043317176401615, -0.034587033092975616, -0.016940901055932045, -0.03038630448281765, -0.0037043849006295204, -0.009198679588735104, 0.026584183797240257, 0.01172831654548645, 0.0004877216415479779, -0.052187174558639526, -0.013131114654242992, 0.04433763399720192, -0.00995757058262825, -0.00818682461977005, -0.0516352541744709, -0.0025143057573586702, -0.03949299827218056, -0.05040876194834709, -0.004277385771274567, -0.0036258127074688673, -0.0420379638671875, -0.021540241315960884, 0.04899829998612404, -0.000905974127817899, 0.01119939237833023, -0.006527229677885771, -0.016603616997599602, 0.015867721289396286, 0.00827881135046482, 0.00011785807873820886, -0.00011480382818263024, 0.008838397450745106, 0.009466974064707756, 0.006485069170594215, -3.419561107875779e-05, 0.014234956353902817, -0.01640431210398674, -0.03627346083521843, -0.006331757642328739, -0.004189231898635626, -0.0010511407162994146, -0.012119260616600513, -0.02594027668237686, 0.021938851103186607, 0.011030749417841434, -0.02452981099486351, -0.03058560937643051, 0.028362594544887543, -0.0395236611366272, 0.0042122285813093185, 0.003689053701236844, -0.010379176586866379, -0.006270433310419321, 0.00528924074023962, -0.01634298637509346, -0.0014554993249475956, 0.006009804084897041, -0.027718687430024147, 0.030033688992261887, 0.028868522495031357, 0.006186111830174923, 0.005070772022008896, -0.003357517998665571, -0.006013636477291584, 0.001019520335830748, -0.012571528553962708, 0.010225865058600903, -0.023165341466665268, -0.02224547229707241, -0.017201529815793037, 0.017891431227326393, -0.030646933242678642, -0.0006779234972782433, -0.02554166689515114, 0.026492197066545486, -0.01859666407108307, -0.00528924074023962, 0.0023188337218016386, -0.01887262426316738, -0.031198853626847267, -0.021739546209573746, -0.018274709582328796, 0.019071929156780243, 0.01283982302993536, 0.001421962515451014, 0.014756214804947376, -0.02807130292057991, 0.0026580351404845715, 0.0034092606510967016, -0.010287189856171608, -0.00491746049374342, 0.01225724071264267, -0.0034035113640129566, 0.013913002796471119, 0.028745872899889946, 0.014771546237170696, 0.022000174969434738, -0.026078255847096443, 0.006910508032888174, -0.015852391719818115, 0.016971563920378685, -0.02900650165975094, 0.019041266292333603, -0.015285138972103596, -0.009781262837350368, 0.005519207566976547, 0.002261342015117407, 0.03740796446800232, -0.013867009431123734, 0.017830107361078262, 0.029589084908366203, 0.010110882110893726, -0.001017603906802833, -0.007692395709455013, -0.020727690309286118, -0.028684549033641815, -0.0027270251885056496, -0.0031256345100700855, 0.0013865092769265175, -0.04117942228913307, 0.017216861248016357, 0.0022536765318363905, 0.00935199111700058, 0.03529226779937744, -0.001944179181009531, 0.023134678602218628, -0.022966036573052406, -0.011582670733332634, -0.01625099964439869, 0.008455119095742702, -0.009022371843457222, 0.00668437359854579, -0.014119972474873066, -0.03314590826630592, 0.04191531613469124, -0.012479541823267937, 0.020237095654010773, 0.03182743117213249, -0.017155537381768227, 0.0023437468335032463, -0.034587033092975616, -0.004522684030234814, 0.006485069170594215, 0.04525750130414963, 0.024897759780287743, 0.006220607087016106, -0.012433548457920551, -0.010087884962558746, 0.01287815161049366, 0.005867991130799055, 0.00943631213158369, -0.007328281179070473, -0.004787146113812923, -0.006086459383368492, 0.0018186555244028568, 0.02452981099486351, -0.0033306884579360485, 0.007910864427685738, 0.04252856224775314, -0.012402886524796486, -0.01618967577815056, 0.03884908929467201, 0.022843386977910995, 0.01057081576436758, 0.020697029307484627, -0.04004491865634918, -0.007627238519489765, 0.018964610993862152, 0.0006597177707590163, 0.022030837833881378, 0.029635079205036163, 0.0032061231322586536, 0.02103431336581707, 0.007404936943203211, -0.037837233394384384, -0.01753881573677063, 0.01107674278318882, 0.007792048156261444, 0.006400747690349817, 0.02791799232363701, -0.01882662996649742, 0.005745342001318932, -0.004691326525062323, -0.036825381219387054, -0.011896958574652672, -0.005986807402223349, -0.0015321550890803337, 0.031214185059070587, 0.001655762316659093, -0.020743021741509438, 0.015975039452314377, -0.014066314324736595, -0.010908100754022598, 0.01859666407108307, 0.0009136396693065763, 0.01626633107662201, 0.011222388595342636, 0.012924144975841045, -0.01775345206260681, -0.04688260331749916, 0.018933948129415512, 0.0031869590748101473, -0.020543716847896576, 0.011306710541248322, 0.02232212945818901, -0.005749174859374762, -0.014403599314391613, 0.003008734667673707, 0.0042083957232534885, -0.0017649965593591332, 0.002849674317985773, -0.015116496942937374, -0.051911212503910065, -0.0013165610143914819, -0.05126730725169182, 0.0008087172172963619, -0.015714410692453384, -0.013445403426885605, 0.029681071639060974, -0.00038423651130869985, 0.019056597724556923, -0.0211722943931818, 0.02796398475766182, -0.022828055545687675], "index": 33}, {"title": "Azhdarcho", "text": "Azhdarcho /\u0251\u02d0\u0292\u02c8d\u0251rxo\u028a/ is a genus of pterodactyloid pterosaur from the late Cretaceous Period of the Bissekty Formation (middle Turonian stage, about 92 million years ago) of Uzbekistan. It is known from fragmentary remains including the distinctive, elongated neck vertebrae that characterizes members of the family Azhdarchidae, which also includes such giant pterosaurs as Quetzalcoatlus.", "vector": [0.0036942523438483477, 0.0021034819073975086, -0.028384335339069366, -0.009568016044795513, 0.02500004880130291, -0.02737060934305191, 0.005770441610366106, -0.02774490788578987, -0.019089244306087494, 0.041640754789114, -0.0025596588384360075, -0.005770441610366106, -0.023877151310443878, 0.0166563019156456, 0.04532136023044586, 0.027838481590151787, -0.06618852913379669, -0.01304587721824646, 0.016157235950231552, -0.056425563991069794, 0.03462265059351921, 0.02155338041484356, 0.03683725371956825, -0.02389274723827839, 0.0197442676872015, 0.021116698160767555, -0.013427973724901676, 7.980657392181456e-05, -0.0616033636033535, -0.025421135127544403, -0.021444208920001984, -0.01476141344755888, 0.04613234102725983, 0.039488535374403, 0.019806651398539543, 0.06674997508525848, 0.011572075076401234, -0.012078938074409962, 0.016765473410487175, -0.02935127355158329, -0.02718345820903778, 0.02825956791639328, -0.012281683273613453, 0.030879661440849304, 0.022910213097929955, -0.013903644867241383, 0.022910213097929955, 0.056987009942531586, -0.010012496262788773, -0.001261309371329844, 0.00633968785405159, 0.039488535374403, -0.07841562479734421, -0.017623240128159523, 0.03170623630285263, 0.03967568650841713, 0.0361822284758091, 0.09532146155834198, -0.0005619357689283788, 0.040486667305231094, 0.011587671004235744, -0.000763706280849874, 0.0004885867820121348, 0.031768620014190674, 0.04416727274656296, 0.025842221453785896, 0.017981944605708122, -0.02010297030210495, -0.06506562978029251, 0.004604656714946032, -0.01863696798682213, 0.04363701492547989, 0.01668749377131462, -0.02718345820903778, 0.017248941585421562, 0.0038989470340311527, -0.009536824189126492, 0.0050257425755262375, 0.0018792925402522087, -0.006316294427961111, -9.381841664435342e-05, 0.010106070898473263, -0.03955091908574104, 0.021319443359971046, 0.07585791498422623, 0.014519679360091686, -0.017794795334339142, -0.04151598736643791, -0.025311963632702827, -0.008086415939033031, 0.006636008154600859, -0.021990060806274414, -0.028384335339069366, -0.006133043672889471, 0.010620731860399246, -0.014971956610679626, -0.008710247464478016, 0.0168746430426836, -0.035246480256319046, -0.03209613263607025, -0.04759834706783295, -0.04675617441534996, 0.007450887933373451, -0.0124922264367342, -0.010698710568249226, -0.006441060453653336, -0.0051739029586315155, 0.03824087232351303, 0.004222559742629528, 0.030723702162504196, -0.023409279063344002, -0.03148789703845978, 0.02662201039493084, -0.00018398156680632383, -0.0351841002702713, 0.010230837389826775, 0.012234896421432495, -0.035215288400650024, -0.058453015983104706, -0.017825985327363014, 0.016032470390200615, -0.01756085827946663, 0.046818558126688004, 0.00924050435423851, -0.0073378183878958225, -0.02013416215777397, 0.02407989650964737, 0.014815999194979668, 0.025608284398913383, 0.04475991427898407, -0.03873993828892708, -0.026497244834899902, 0.05670628696680069, 0.011205573566257954, 0.00239785248413682, 0.021319443359971046, 0.005864016246050596, -0.025951391085982323, -0.005446828901767731, 0.03986283391714096, 0.025311963632702827, 0.015252681449055672, 0.025592688471078873, -0.0062149218283593655, -0.022879021242260933, 0.013014685362577438, -0.012936706654727459, -0.0065034436993300915, 0.07199016213417053, -0.02063322812318802, 0.042826034128665924, 0.03621342033147812, 0.01958831027150154, 0.011774820275604725, -0.03189338743686676, 0.020368099212646484, -0.03315664455294609, -0.037741806358098984, 0.030536552891135216, 0.0071935574524104595, 0.011408318765461445, 0.07011866569519043, -0.007860277779400349, -0.010862466879189014, 0.001418241998180747, -0.0062500122003257275, 0.049563415348529816, -0.0340300090610981, -0.021475400775671005, 0.019697479903697968, 0.044323232024908066, 0.03356213495135307, -0.005228488240391016, 0.042295776307582855, -0.04298199340701103, 0.03281353786587715, 0.01176702231168747, 0.03640057146549225, -0.033063072711229324, 0.03098883107304573, -0.0050257425755262375, 0.007131174206733704, 0.02317534200847149, -0.00895978044718504, 0.04001879319548607, 0.05539624020457268, 0.08970697224140167, -0.009224908426404, -0.03212732449173927, -0.0043122353963553905, -0.061353832483291626, -0.060449276119470596, 0.02864946238696575, -0.01991582103073597, -0.005747048184275627, 0.039207812398672104, 0.011478500440716743, -0.008024033159017563, -0.04831575229763985, 0.014862786047160625, 0.004499385133385658, -0.04622591659426689, 0.041048113256692886, 0.05000009760260582, 0.02339368313550949, 0.02682475559413433, -0.012593599036335945, 0.028025630861520767, 0.03499694913625717, 0.029865935444831848, 0.01994701288640499, -0.06718665361404419, -0.008203384466469288, 0.02878982573747635, -0.02172493375837803, 0.002629839815199375, -0.00842172559350729, -0.027277033776044846, 0.0069752163253724575, 0.008990972302854061, 0.03696201741695404, -0.03133193776011467, 0.01632879115641117, 0.03643176332116127, -0.016235215589404106, 0.01901126652956009, -0.006456656381487846, -0.005501414183527231, 0.009022163227200508, 0.012850929982960224, 0.020757993683218956, -0.08521538972854614, 0.036868441849946976, -0.002249692566692829, 0.01664070598781109, 0.0325951986014843, 0.022551510483026505, -0.01306147314608097, 0.0361822284758091, 0.003965229261666536, -0.00788367073982954, -0.0012856777757406235, -0.0033063071314245462, -0.02445419691503048, 0.018153497949242592, 0.006889439653605223, 0.03655652701854706, -0.019853439182043076, -0.02336249127984047, -0.01991582103073597, 0.02900816686451435, -0.011470702476799488, 0.009029961191117764, 0.002471932442858815, 0.04541493579745293, -0.03983164206147194, 0.04260769486427307, -0.033780477941036224, -0.01058174204081297, 0.0024972755927592516, -0.007825186476111412, -0.03212732449173927, 0.029631998389959335, 0.006643805652856827, -0.038303256034851074, -0.009552420116961002, 0.014433901757001877, 0.01868375390768051, -0.008835013955831528, -0.0547100268304348, 0.023877151310443878, 0.052651382982730865, 0.023066170513629913, -0.010909253731369972, 0.050124865025281906, 0.023877151310443878, 0.01737370900809765, 0.00498285423964262, 0.024578962475061417, 0.028743037953972816, -0.025686264038085938, -0.016188427805900574, 0.023268915712833405, 0.029943913221359253, 0.047535963356494904, 0.014956360682845116, -0.02225518971681595, -0.031082406640052795, 0.005641776602715254, 0.001133618876338005, -0.014597658067941666, -0.03477860987186432, -0.012344066053628922, -0.033593326807022095, -0.0337492860853672, 0.015268276445567608, -0.020617632195353508, 0.029413657262921333, -0.031815409660339355, -0.04042428359389305, -0.033593326807022095, 0.04095454141497612, -0.028353143483400345, 0.037242744117975235, 0.02099193073809147, 0.006281203590333462, 0.007680925540626049, 0.017124176025390625, -0.012648184783756733, 0.04472872242331505, -0.030739298090338707, 0.03384286165237427, -0.030474171042442322, 0.0045305765233933926, -0.013100462034344673, -0.02662201039493084, 0.00548191973939538, -0.017124176025390625, -0.032158516347408295, 0.0070492965169250965, -0.0061057512648403645, -0.04750477150082588, -0.019120436161756516, -0.015369649045169353, 0.042295776307582855, -0.014550870284438133, -0.0042030648328363895, 0.003674757666885853, 0.0033667408861219883, -0.03799134120345116, -0.02916412428021431, 0.023112958297133446, 0.009279494173824787, -0.009638196788728237, -0.023440469056367874, 0.04148479551076889, 0.056082453578710556, -0.04563327506184578, 0.0005473147029988468, -0.025608284398913383, -0.03655652701854706, 0.053368788212537766, 0.030536552891135216, 0.0007539588841609657, 0.0061057512648403645, -0.010441380552947521, 0.04859647527337074, -0.03593269735574722, 0.018340647220611572, 0.004475991241633892, 0.0006062862812541425, 0.009903325699269772, -0.07498455047607422, 0.023190937936306, -0.021147888153791428, -0.037398699671030045, 0.033437371253967285, -0.013505952432751656, 0.002709768246859312, 0.01286652497947216, -0.011907384730875492, 0.011681245639920235, 0.013474761508405209, -0.015798533335328102, 0.0019416756695136428, -0.03041178733110428, 0.024890877306461334, 0.03986283391714096, -0.013155047781765461, 0.031971365213394165, -0.036151036620140076, -0.00702590262517333, -0.0011219220468774438, 0.02465694211423397, -0.002581103006377816, 9.716907516121864e-05, 0.04366820678114891, -0.002540163928642869, 0.017857177183032036, 0.0019738420378416777, 0.010534955188632011, 0.08134762942790985, 0.011073010042309761, 0.021475400775671005, 0.06388034671545029, 0.01684345118701458, 0.023097362369298935, 0.04291960969567299, -0.002364711370319128, 0.026855947449803352, -0.03714916855096817, 0.05146609991788864, 0.009045557118952274, 0.018699349835515022, 0.010885859839618206, -0.06487847864627838, -0.013981624506413937, 0.030318211764097214, -0.02428264170885086, 0.004210862796753645, 0.059731870889663696, 0.09095463901758194, 0.0496881827712059, 0.004713826812803745, -0.017467282712459564, 0.017124176025390625, -0.02284782938659191, -0.027089884504675865, -0.02303497865796089, -0.00987213384360075, -0.050655119121074677, 0.007330020423978567, -0.018169093877077103, -0.050093673169612885, -0.013357792980968952, -0.007115578278899193, 0.03824087232351303, 0.035090524703264236, -0.03855278715491295, -0.03951972723007202, 0.013638516888022423, -0.02573304995894432, -0.009466643445193768, -0.007793995086103678, -0.06288222223520279, 0.039239004254341125, -0.011330340057611465, 0.026668798178434372, -0.026746777817606926, -0.03424835205078125, 0.05364951118826866, -0.018231475725769997, 0.011111998930573463, 0.03945734351873398, 0.0066126142628490925, -0.03080168180167675, 0.01161106489598751, -0.030131062492728233, 0.005801633466035128, -0.021459804847836494, -0.01868375390768051, 0.0680600181221962, -0.02298819273710251, -0.021335039287805557, 0.016359981149435043, -0.018418626859784126, -0.019494734704494476, 0.045758042484521866, 0.03627580404281616, 0.0035402439534664154, 0.006004378665238619, -0.011182180605828762, -0.0221148282289505, -0.017264537513256073, -0.010215241461992264, -0.021475400775671005, -0.002585001988336444, -0.004148479551076889, 0.010324412025511265, 0.0054975152015686035, -0.001987488241866231, 0.034529075026512146, -0.01935437321662903, -0.06469132751226425, 0.020024992525577545, 0.04001879319548607, 0.011470702476799488, 0.008858407847583294, 0.025436731055378914, -0.00494386488571763, 0.010285422205924988, -0.025795433670282364, -0.06110429763793945, -0.029429253190755844, 0.01701500453054905, 0.026497244834899902, -0.04416727274656296, -0.027588950470089912, -0.0023140250705182552, -0.012250491417944431, 0.032501623034477234, -0.004569565877318382, 0.029086144641041756, -1.8657070540939458e-05, -0.035059332847595215, -0.012889918871223927, 0.02122586779296398, -0.007961650379002094, -0.029990701004862785, 0.01954152248799801, 0.004959460813552141, -0.028119206428527832, -0.026044966652989388, 0.012000959366559982, -0.02701190486550331, -0.015549001283943653, -0.011267957277595997, -0.024750515818595886, -0.05892089009284973, -0.0068660457618534565, -0.011938575655221939, -0.01403620932251215, 0.0040938942693173885, -0.058577779680490494, 0.03156587481498718, 0.013778879307210445, -0.04585161805152893, 0.041204072535037994, -0.003930138889700174, -0.06955721974372864, 0.04691212996840477, 0.0019445999059826136, 0.00697131734341383, 0.014566466212272644, 0.02719905413687229, -0.004561767913401127, 0.006148639600723982, 0.01718655787408352, 0.0003533420676831156, -0.013880251906812191, -0.012375257909297943, -0.00693232798948884, -0.016079258173704147, 0.009568016044795513, 0.031253959983587265, 0.01650034449994564, -0.03126955404877663, -0.004553970415145159, 0.008811620064079762, -0.023767981678247452, -0.012461034581065178, 0.009154727682471275, -0.002286732429638505, 0.011104200966656208, -0.025078028440475464, 0.03271996229887009, -0.03225209191441536, -0.0050257425755262375, 0.005255780648440123, 0.0010653872741386294, -0.021600166335701942, 0.010722104460000992, -0.022192806005477905, 0.040642622858285904, -0.022021252661943436, -0.025421135127544403, 0.018730541691184044, -0.028524696826934814, 0.036681294441223145, 0.017326921224594116, 0.024766111746430397, -0.008647864684462547, -0.006316294427961111, -0.018059922382235527, 0.0035421934444457293, -0.001118997810408473, -0.0008036704966798425, -0.0124922264367342, 0.007135073188692331, -0.008312555029988289, -0.015720555558800697, -0.015198095701634884, -0.00018239761993754655, 0.020212141796946526, 0.00037576103932224214, 0.001164810499176383, -0.003859957680106163, 0.010542753152549267, 0.025811029598116875, 0.020726801827549934, 0.022223997861146927, -0.007630239240825176, 0.0344666913151741, 0.0010634377831593156, 0.025608284398913383, -0.03080168180167675, -0.0001477944606449455, -0.02772931195795536, 0.016812259331345558, -0.02535875141620636, 0.0249844528734684, -0.008195586502552032, -0.039394959807395935, 0.030708108097314835, -0.0010917051695287228, -0.018169093877077103, 0.020945142954587936, 0.016344387084245682, -0.021054314449429512, 0.006690593436360359, -0.03808491677045822, -0.012874322943389416, 0.02534315548837185, -0.005380547139793634, 0.002019654493778944, 0.03209613263607025, -0.007817388512194157, 0.024329429492354393, 0.011236765421926975, -0.015798533335328102, 0.0291485283523798, 0.011728032492101192, 0.022379957139492035, -0.039769262075424194, -0.020617632195353508, -0.013576134108006954, 0.010807881131768227, -0.03749227523803711, -0.025311963632702827, -0.00760294683277607, -0.0021853598300367594, -0.012078938074409962, 0.03045857511460781, 0.019603906199336052, 0.06762333959341049, -0.013810070231556892, -0.002298429375514388, -0.032501623034477234, -0.011634457856416702, -0.016344387084245682, -0.0036864543799310923, 0.025467922911047935, 0.010098272934556007, -0.017436090856790543, -0.01631319522857666, -0.022598296403884888, -0.018247071653604507, -0.022146020084619522, -0.011790416203439236, 0.01503434032201767, -0.008211182430386543, 0.018184689804911613, 0.005014046095311642, -0.014722424559295177, 0.008562088012695312, -0.017280133441090584, -0.011891788803040981, -0.009661590680480003, 0.019666289910674095, -0.03711797669529915, -0.050124865025281906, 0.0031971365679055452, 0.011774820275604725, -0.1061137467622757, -0.024875283241271973, -0.04834694415330887, 0.05268257483839989, 0.002160016680136323, 0.0009099167655222118, -0.002680526115000248, -0.01403620932251215, 0.011540883220732212, 0.00924050435423851, -0.004674837458878756, -0.012827536091208458, -0.01614164002239704, 0.010706508532166481, 0.009521229192614555, 0.028337547555565834, -0.005548201501369476, 0.017451686784625053, -0.0344666913151741, -0.018215881660580635, 0.006027772091329098, 0.0058874101378023624, -0.023830365389585495, -0.030692512169480324, -0.01403620932251215, 0.0104101886972785, -0.013973826542496681, 0.0347474180161953, 0.008024033159017563, -0.03767942637205124, 0.01632879115641117, 0.016890238970518112, -0.03247043117880821, 0.013474761508405209, 0.0022282481659203768, -0.03192457929253578, 0.0033024081494659185, 0.06762333959341049, 0.02320653386414051, 0.00511151971295476, -0.013334399089217186, -0.08727402985095978, -0.011759224347770214, 0.05527147278189659, -0.0061408416368067265, 0.012305077165365219, 0.0031425512861460447, -0.021069910377264023, -0.025124814361333847, -0.05817228928208351, -0.031425513327121735, -0.005727553274482489, -0.014028411358594894, 0.0027370608877390623, -0.00924050435423851, -0.0022594397887587547, -0.03189338743686676, -0.008983174338936806, 0.015213691629469395, 0.010511561296880245, -0.017108580097556114, 0.024688132107257843, -0.01358393207192421, 0.005275275558233261, 0.013194036670029163, -0.030754894018173218, -0.014714626595377922, -0.004604656714946032, 0.008655662648379803, -0.040829773992300034, -0.0042030648328363895, 0.013240824453532696, 0.0011765073286369443, -0.02085156925022602, 0.04335629194974899, 0.019151628017425537, 0.013716495595872402, -0.026762373745441437, 0.05835944041609764, 0.00905335508286953, -0.025608284398913383, -0.004413607995957136, 0.018668157979846, 0.009318483993411064, 0.057517267763614655, -0.03247043117880821, 0.004659241996705532, -0.03480979800224304, 0.015322862192988396, -0.022411147132515907, 0.01611045002937317, -0.03183100372552872, 0.03137872740626335, 0.000874826277140528, -0.01176702231168747, 0.00788367073982954, -0.022052444517612457, 0.013006887398660183, 0.0011121747083961964, -0.0042186607606709, -0.008679056540131569, -0.015198095701634884, 0.0013617072254419327, -0.0035051533486694098, -0.016437960788607597, 0.024173472076654434, -0.0037546860985457897, -0.0006467378698289394, -0.009739569388329983, 0.007969447411596775, -0.004803502932190895, -0.020383695140480995, -0.0024660839699208736, 0.0013285662280395627, -0.045009445399045944, -0.007283233106136322, 0.015330660156905651, 0.011267957277595997, 0.05134133622050285, -0.02952282689511776, 0.03621342033147812, -0.033780477941036224, -0.009170323610305786, -0.006764673162251711, -0.004199165850877762, -0.016079258173704147, 0.03136312961578369, 0.045945193618535995, -0.006963519379496574, 0.007045397534966469, -0.007852479815483093, -0.008257970213890076, -0.021069910377264023, 0.022395551204681396, -0.005856218747794628, 0.02573304995894432, -0.0007661430863663554, -0.018403030931949615, -0.02624771185219288, -0.006312395446002483, -0.004557868931442499, -0.01650034449994564, -0.02049286663532257, 0.009045557118952274, -0.016703089699149132, 0.03789776563644409, 0.02389274723827839, -0.05127895250916481, 0.007871974259614944, 0.0427948422729969, -0.04532136023044586, -0.027230245992541313, 0.04238935187458992, 0.045570895075798035, 0.004234256688505411, -0.0063006985001266, -0.05240184813737869, -0.011291351169347763, -0.020742397755384445, 0.012078938074409962, 0.015876512974500656, 0.060449276119470596, -0.023050574585795403, 0.029928317293524742, 0.012796344235539436, 0.01957271434366703, 0.01611045002937317, 0.009801953099668026, 0.019245203584432602, 0.01593889482319355, 0.05131014436483383, -0.014176571741700172, 0.02503124065697193, -0.04769192263484001, -0.035402439534664154, -0.002002109307795763, -0.02715226821601391, -0.016968218609690666, -0.024516578763723373, 0.01699940860271454, 0.03767942637205124, -0.020212141796946526, -0.018215881660580635, 0.019635098055005074, 0.012804142199456692, -0.002598648192360997, -0.002093734685331583, -0.02194327488541603, -0.011618861928582191, -0.008226778358221054, -0.005988782737404108, -0.004051005933433771, -0.003918441943824291, -0.015307266265153885, -0.019151628017425537, 0.0021834103390574455, 0.0718030110001564, 0.016593918204307556, -0.018356243148446083, 0.0023861555382609367, -0.02195887081325054, -0.05330640450119972, -0.024391813203692436, -0.011696841567754745, 0.0021834103390574455, -0.003688403870910406, 0.023674406111240387, 0.039956409484148026, -0.03767942637205124, -0.002427094615995884, 0.021990060806274414, 0.04713047295808792, -0.0221148282289505, -0.01832505129277706, 0.014784807339310646, 0.0010926799150183797, -0.02153778448700905, 0.0024797304067760706, 0.006678896490484476, -0.05361831933259964, 0.02846231311559677, 0.02916412428021431, 0.02029012143611908, 0.015057733282446861, -0.047036897391080856, 0.014433901757001877, 0.02500004880130291, 0.010230837389826775, 0.011899586766958237, 0.032158516347408295, -0.005517010111361742, 0.015868714079260826, -0.026731181889772415, -0.043574631214141846, -0.015276074409484863, -0.00687774270772934, 0.004959460813552141, -0.013544942252337933, -0.0030372797045856714, 0.04675617441534996, 0.027074288576841354, 0.04660021513700485, -0.04669379070401192, 0.05361831933259964, 0.02646605297923088, 0.018449816852808, -0.043761782348155975, -0.050623927265405655, 0.02484409138560295, -0.03764823451638222, 0.001152138807810843, 0.030567744746804237, 0.021693741902709007, 0.000977660994976759, 0.04603876546025276, -0.028898995369672775, -0.04978175461292267, 0.005478020757436752, -0.026528436690568924, 0.01846541278064251, -0.02228638157248497, 0.00296514923684299, -0.0315190888941288, 0.026200924068689346, -0.025655072182416916, 0.0006369904731400311, 0.0031912880949676037, 0.03265758231282234, 0.028337547555565834, 0.03714916855096817, 0.036306995898485184, -0.02665320225059986, 0.03746108338236809, 0.02083597332239151, 0.012258289381861687, -0.013038079254329205, 0.007454786915332079, 0.027027500793337822, 0.010527157224714756, -0.0037936754524707794, -0.017280133441090584, 0.0025889009702950716, -0.010020294226706028, 0.02370559796690941, 0.05430453643202782, -0.008741439320147038, 0.014254550449550152, 0.005454626865684986, 0.03515290841460228, 0.03356213495135307, -0.040330708026885986, 0.019837843254208565, -0.017857177183032036, -0.03222090005874634, 0.006417667027562857, 0.05611364543437958, -0.021038718521595, 0.005154408048838377, -0.0670618936419487, 0.025623880326747894, 0.02066441997885704, -0.006238315254449844, -0.03356213495135307, 0.0030489766504615545, -0.01203215029090643, 0.022801043465733528, 0.022223997861146927, -0.006834854371845722, 0.016172831878066063, -0.01977545954287052, 0.02354964055120945, 0.00941985659301281, 0.01813790202140808, 0.004682635422796011, -0.0045188795775175095, -0.020602036267518997, -0.010550551116466522, 0.010722104460000992, 0.05311925336718559, -0.012944504618644714, 0.0016278104158118367, -0.0064683533273637295, -0.017061792314052582, 0.0012700819643214345, 0.006039469037204981, -0.06843432039022446, 0.01331100519746542, 0.007189658470451832, 0.003140601795166731, 0.01203215029090643, -0.014082997106015682, 0.025124814361333847, -0.012266087345778942, -0.007045397534966469, 0.0016346335178241134, 0.047348812222480774, 0.01476141344755888, -0.02935127355158329, 0.018028730526566505, 0.0052440837025642395, 0.017326921224594116, 0.008078617975115776, 0.02774490788578987, 0.005832824856042862, 0.03917662054300308, 0.026232115924358368, 0.02482849545776844, -0.0601685531437397, 0.03222090005874634, 0.013303207233548164, 0.00988772977143526, 0.02573304995894432, 0.03808491677045822, -0.002852079691365361, 0.026044966652989388, -0.018777329474687576, 0.008546492084860802, 0.015330660156905651, -0.010807881131768227, -0.005279174540191889, 0.014660040847957134, -0.013981624506413937, 0.02590460516512394, 0.012484428472816944, 0.021069910377264023, -0.008686854504048824, 0.0028891197871416807, 0.00040037313010543585, 0.013022483326494694, 0.000405734172090888, -0.01394263468682766, 0.03368690237402916, -0.03200255706906319, 0.020009396597743034, -0.03955091908574104, 0.009630399756133556, 0.06650044023990631, -0.037741806358098984, 0.004655343014746904, 0.013240824453532696, -0.006363081745803356, -0.024033110588788986, 0.02935127355158329, -0.011314744129776955, -0.021147888153791428, -0.017607644200325012, -0.028914591297507286, 0.028945783153176308, 0.017077388241887093, 0.0166563019156456, -0.03593269735574722, -0.019978204742074013, -0.004343427252024412, -0.013186238706111908, 0.0025148207787424326, 0.011119796894490719, 0.016437960788607597, -0.01832505129277706, 0.006125245708972216, -0.008024033159017563, -0.006916732061654329, -0.011213371530175209, 0.005649574100971222, 0.011283553205430508, 0.017311325296759605, 0.011275755241513252, -0.0168746430426836, 0.0177324116230011, 0.023518448695540428, 0.03041178733110428, 0.018714945763349533, -0.0027526565827429295, -0.030848469585180283, -0.008218980394303799, -0.013841262087225914, -0.010846870951354504, 0.01579073630273342, 0.01955711841583252, -0.02370559796690941, -0.0024875281378626823, -0.0003506615466903895, -0.0293668694794178, 0.0337492860853672, -0.007669229060411453, -0.00661651324480772, -0.002048896625638008, 0.006316294427961111, 0.014893977902829647, 0.004101692233234644, -0.007981144823133945, 0.018886499106884003, 0.007595148868858814, 0.0016726483590900898, -0.005973186809569597, 0.0005955641390755773, 0.0006623336230404675, 0.004382416605949402, 0.026138540357351303, 0.009529026225209236, -0.008905194699764252, -0.009630399756133556, 0.0009065052145160735, 0.07517170161008835, 0.004078298807144165, 0.005364951211959124, -0.00968498457223177, -0.01241424772888422, 0.0018802672857418656, 0.0025284672155976295, 0.005322062876075506, 0.013014685362577438, -0.0273550134152174, -0.0179507527500391, 0.0034271744079887867, -0.0029437050689011812, -0.015478819608688354, 0.03696201741695404, -0.001530336681753397, -0.06462894380092621, -0.017638836055994034, -0.004861987195909023, 0.027074288576841354, 0.015361851081252098, 0.017295729368925095, 0.021631358191370964, 0.005864016246050596, 0.027417395263910294, -0.0050257425755262375, 0.01595449075102806, 0.023596428334712982, 0.007177961524575949, 0.003263418795540929, -0.0019104840466752648, 0.0011297198943793774, -0.016983812674880028, 0.014847190119326115, -0.0034232756588608027, -0.04890839383006096, 0.022177211940288544, 0.0030801682732999325, 0.037772998213768005, -0.033967625349760056, -0.014901775866746902, -0.002690273569896817, -0.004904875531792641, 0.04915792495012283, 0.01441830676048994, -0.020960738882422447, -0.047910261899232864, -0.029663190245628357, 0.004437001887708902, 0.01342017576098442, 0.027760503813624382, 0.020180949941277504, -0.008320352993905544, 0.021475400775671005, -0.028181590139865875, -0.012468832544982433, -0.0016463304636999965, 0.009256100282073021, 0.0006028746720403433, -0.01449628546833992, -2.499285983503796e-05, -0.032501623034477234, -0.016968218609690666, -0.013318803161382675, 0.001906585181131959, -0.012094534002244473, 0.006027772091329098, 0.02085156925022602, -0.00057655677665025, 0.006370879709720612, -0.025280773639678955, -0.008226778358221054, -0.02153778448700905, -0.01186059694737196, -0.006218820810317993, 0.014652242884039879, -0.011002828367054462, -0.029117336496710777, 0.023487256839871407, 0.004826896358281374, 0.00018337235087528825, -0.013966028578579426, -0.02571745589375496, -0.012188108637928963, -0.013646314851939678, 0.003702050307765603, 0.023284511640667915, 0.00747428135946393, 0.013669708743691444, 0.021085506305098534, -0.02534315548837185, 0.007201355416327715, 0.005540404003113508, 0.029663190245628357, 0.005364951211959124, -0.039207812398672104, -0.0146834347397089, 0.024890877306461334, -0.0572989247739315, 0.017981944605708122, 0.036525335162878036, -0.007037599571049213, -0.01575174555182457, 0.012461034581065178, 0.026731181889772415, 0.004491587169468403, -0.00435122475028038, -0.0020274524576961994, -0.03880232200026512, 0.01321743056178093, 0.0020469471346586943, -0.01941675692796707, 0.01514351088553667, -0.01830945536494255, 0.02610735036432743, -0.010215241461992264, 0.0325951986014843, 0.011299148201942444, -0.005727553274482489, -0.023596428334712982, 0.006912833079695702, -0.028555888682603836, -0.027604544535279274, -0.019884631037712097, -0.0002941268321592361, 0.0043122353963553905, -0.012655981816351414, -0.016016874462366104, -0.00246413447894156, 0.035433631390333176, -0.0492515005171299, 0.05854658782482147, -0.03752346709370613, -0.03334379568696022, 0.01133813802152872, -0.006678896490484476, -0.03393643721938133, -0.0002990005013998598, 0.011439510621130466, 0.0315190888941288, -0.0030002398416399956, 0.008507502265274525, -0.01550221350044012, -0.020726801827549934, 0.010028092190623283, 0.009716176427900791, 0.027245841920375824, 0.02030571736395359, 0.026871543377637863, 0.05449168384075165, -0.035995081067085266, 0.016734281554818153, -0.03718036040663719, -0.014745817519724369, 0.028680654242634773, -0.0018890398787334561, -0.018808521330356598, -0.018449816852808, -0.01529946830123663, 0.002746808109804988, 0.02375238575041294, 0.016406768932938576, -0.023190937936306, 0.00018982998153660446, -0.03368690237402916, 0.00715456809848547, 0.027479778975248337, 0.009529026225209236, 0.009552420116961002, -0.010074879042804241, 0.005953692365437746, -0.002612294629216194, -0.0002709768305066973, -0.0052440837025642395, 0.04036189988255501, -0.054429300129413605, 0.001353909377939999, 0.007661431096494198, 0.02950723096728325, 0.012055544182658195, 0.04132883995771408, -0.032314471900463104, 0.021849699318408966, -0.008086415939033031, 0.02684035152196884, 0.03530886396765709, 0.015595788136124611, 0.010456976480782032, -0.008468513377010822, 0.006558028981089592, 0.02592020109295845, 0.020742397755384445, -0.003953532315790653, 0.003072370309382677, -0.05611364543437958, -0.009521229192614555, 0.031020022928714752, -0.015798533335328102, 0.02863386832177639, -0.01204774621874094, 0.01899567060172558, -0.01865256205201149, -0.02538994327187538, 0.026372477412223816, 0.03243923932313919, 0.020336907356977463, 0.02935127355158329, -0.007758904714137316, 0.00665550259873271, -0.03353094682097435, 0.0025674565695226192, 0.002142471494153142, -0.01412978395819664, 0.003436921862885356, 0.03041178733110428, -0.022567106410861015, 0.0034759112168103456, 0.008429523557424545, -0.014301338233053684, -0.005364951211959124, -0.010932647623121738, -0.03421716019511223, 0.02953842282295227, -0.040330708026885986, 0.013170643709599972, -0.07267637550830841, -0.015814129263162613, -0.010402390733361244, -0.020399291068315506, -0.015712756663560867, 0.003703999798744917, -0.00013012735871598125, 0.010995030403137207, 0.015346256084740162, -0.015346256084740162, 0.020695611834526062, -0.022567106410861015, -0.010191847570240498, 0.012523418292403221, -0.007427494041621685, -0.03140991926193237, 0.014644444920122623, -0.03206494078040123, 0.012188108637928963, 0.01904245838522911, -0.023268915712833405, 0.01813790202140808, -0.022567106410861015, 0.027292629703879356, 0.0058133299462497234, -0.03024023398756981, 0.0134981544688344, 0.02426704578101635, -0.005021844059228897, 0.017514070495963097, 0.005988782737404108, -0.010394592769443989, -0.0002485578879714012, -0.013131653890013695, 0.012086736038327217, -0.033250220119953156, 0.002836483996361494, -0.021880891174077988, 0.0009172272984869778, -0.03337498754262924, -0.016219619661569595, -0.0028910692781209946, 0.001152138807810843, 0.018200285732746124, 0.01358393207192421, -0.008484109304845333, 0.004655343014746904, 0.008912992663681507, -0.013342197053134441, 0.023596428334712982, 0.00034676259383559227, 0.025265177711844444, 0.009357472881674767, -0.02426704578101635, -0.0024524377658963203, -0.004635848104953766, 0.009232706390321255, -0.013459165580570698, -0.022036848589777946, 0.005450727883726358, -0.038116104900836945, 0.009287292137742043, -0.012102331966161728, 0.007415797561407089, 0.003327751299366355, 0.016437960788607597, 0.011353733949363232, 0.006791966035962105, -0.019136032089591026, 0.014738019555807114, 0.06063642352819443, -0.023799173533916473, -0.029429253190755844, 0.03247043117880821, 0.013264218345284462, 0.018590180203318596, 0.008897397667169571, -0.018980074673891068, 0.00687774270772934, -0.06066761538386345, 0.010215241461992264, -0.02428264170885086, 0.008616672828793526, -0.023112958297133446, 0.01941675692796707, -0.03337498754262924, -0.0018383535789325833, 0.0022438440937548876, 0.01990022510290146, 0.02878982573747635, -0.022161616012454033, 0.02116348408162594, 0.005041338503360748, -0.002095684176310897, 0.005754845682531595, 0.016625110059976578, -0.006955721415579319, 0.005489717703312635, 0.037960149347782135, 0.013880251906812191, -0.008710247464478016, 0.019089244306087494, -0.029304485768079758, 0.027448587119579315, -0.007177961524575949, 0.017514070495963097, 0.0003794162767007947, 0.020243333652615547, -0.026029370725154877, 0.036899633705616, 0.015291670337319374, -0.03148789703845978, 0.07417356967926025, 0.012125725857913494, 0.02808801457285881, -0.03237685561180115, -0.035433631390333176, -0.00022223997802939266, 0.016375577077269554, 0.005131014157086611, 0.05839063227176666, -0.004390214569866657, 0.01955711841583252, 0.027479778975248337, 0.014566466212272644, -0.0004946789122186601, 0.023315703496336937, -0.0027507070917636156, -0.020383695140480995, -0.03980045020580292, 0.0024348923470824957, 0.0062500122003257275, -0.004932167939841747, -0.011743628419935703, -0.0020469471346586943, -0.00013938735355623066, -0.03674367815256119, -0.0039008965250104666, -0.01611045002937317, 0.029429253190755844, 0.01958831027150154, -0.007704319432377815, -0.005255780648440123, -0.0016960420180112123, 0.03602627292275429, 0.010566147044301033, 0.015330660156905651, 0.028119206428527832, 0.0022613892797380686, -0.011455106548964977, 0.05995021015405655, -0.0033667408861219883, -0.012344066053628922, 0.01830945536494255, -0.01612604595720768, 0.024235855787992477, -0.01990022510290146, -0.04254531115293503, 0.000646250497084111, -0.029850339516997337, -0.04578923434019089, -0.008749237284064293, -0.008920790627598763, -0.006951822433620691, 0.03349975496530533, 0.004136783070862293, 0.007224748842418194, -0.014558668248355389, -0.02227078564465046, -0.0014270145911723375, -0.006842652335762978, 0.00457346485927701, 0.041422415524721146, -0.0017291830154135823, -0.0060082776471972466, 0.007782298605889082, -0.013342197053134441, 0.016204023733735085, -0.03117598034441471, 0.01651594042778015, -0.04441680386662483, -0.008429523557424545, 0.009380866773426533, 0.037617042660713196, 0.02046167477965355, -0.018917690962553024, 0.025655072182416916, 0.006269507110118866, -0.018730541691184044, 0.009731772355735302, 0.007053195498883724, -0.009107940830290318, -0.008616672828793526, -0.006292900536209345, 0.007903166115283966, 0.03042738325893879, 0.0001505968248238787, 0.018527796491980553, 0.015042138285934925, -0.013381186872720718, -0.018247071653604507, -0.03346856310963631, 0.024048706516623497, -0.0066477046348154545, -0.010043688118457794, 0.0018978124717250466, 0.01975986361503601, -0.018184689804911613, 0.002298429375514388, 0.0252027940005064, -0.0004084146930836141, -0.039239004254341125, 0.016952622681856155, 0.02808801457285881, -0.012445438653230667, -0.0017759704496711493, 0.015065531246364117, -0.008951982483267784, -0.04778549447655678, -0.001624886179342866, -0.003988622687757015, 0.021631358191370964, -0.010901455767452717, 0.007505473215132952, -0.007704319432377815, -0.010480369441211224], "index": 34}, {"title": "Heather McKay", "text": "Heather Pamela McKay (n\u00e9e Blundell) AM MBE (born 31 July 1941) is a retired Australian squash player, who is considered by many to be the greatest female player in the history of the game, and possibly also Australia's greatest-ever sportswoman. She dominated the women's squash game in the 1960s and 1970s, winning 16 consecutive British Open titles between 1962 and 1977, and capturing the inaugural women's World Open title in 1979, whilst remaining undefeated during that period.", "vector": [0.0002245446521556005, 0.015260408632457256, -0.020244965329766273, 0.042084988206624985, -0.028726378455758095, -0.008067311719059944, 0.016702095046639442, -0.04285184293985367, 0.021211201325058937, 0.03659430891275406, -0.05475342646241188, 0.037023745477199554, -0.014378526248037815, 0.007208434399217367, -0.005705398973077536, 0.006798167247325182, 0.000541111861821264, 0.03288273140788078, -0.03996846824884415, -0.045183081179857254, 0.03177845850586891, 0.0047391620464622974, -0.002509532030671835, -0.07214569300413132, 0.034385766834020615, 0.03269868344068527, 0.004585791379213333, -0.010651611723005772, 0.00537948589771986, -0.03613419458270073, -0.025474913418293, 0.038864195346832275, -0.0382813885807991, 0.009493661113083363, -0.006675470154732466, 0.0014541482087224722, -0.05487612262368202, 0.003623388474807143, 0.022530192509293556, -0.02849632129073143, 0.034447114914655685, 0.012292681261897087, -0.0063342200592160225, 0.013995098881423473, 0.007035891991108656, -0.009094896726310253, -0.010966022498905659, 0.017422938719391823, 0.008466076105833054, -0.031210986897349358, 0.05760612711310387, 0.023312384262681007, -0.041900940239429474, 0.031026942655444145, -0.021870696917176247, -0.0606735460460186, 0.01769900694489479, 0.07668547332286835, 0.03447778895497322, -0.009094896726310253, -0.02401788905262947, -0.06680838018655777, 0.002170198829844594, 0.025290869176387787, 0.027530085295438766, -0.08171603828668594, -0.01789838820695877, 0.015214397571980953, -0.039845772087574005, 0.003550537396222353, -0.012591754086315632, -0.004420917481184006, 0.00569389620795846, -0.019401423633098602, 0.01717754639685154, -0.017070185393095016, 0.0224381685256958, 0.014117795042693615, -0.04515240713953972, 0.022744910791516304, -0.0049883900210261345, -0.04036723077297211, -0.0341096967458725, 0.03361891210079193, 0.0121086360886693, -0.028480984270572662, 0.016763444989919662, -0.06686972826719284, -0.004815847612917423, 0.023665135726332664, -0.03549003601074219, 0.06042814999818802, 0.05506017059087753, 0.04073532298207283, -0.006510596722364426, -0.009961443021893501, -0.017745018005371094, -0.00493470998480916, 0.005072744097560644, -0.01593524031341076, -0.03506059944629669, -0.01250740047544241, 0.03745318576693535, 0.012093299068510532, 0.0024347638245671988, 0.009102565236389637, -0.029186490923166275, 0.006591116078197956, -5.056448208051734e-05, -3.447850758675486e-05, 0.03631823882460594, -0.0038266051560640335, -0.02717733196914196, -0.020505694672465324, -0.054600056260824203, -0.0035965486895292997, -0.02329704724252224, 0.05996803939342499, -0.002547874813899398, -0.02191670797765255, -0.011395460925996304, -0.006418574135750532, 0.01453956589102745, 0.008872509002685547, 0.02999935671687126, -0.01723889447748661, -0.024600699543952942, 0.021701987832784653, -0.0011799976928159595, -0.0073618050664663315, 0.01730024255812168, 0.03969240188598633, 0.003968473058193922, 0.013251249678432941, -0.02671721763908863, 0.008542761206626892, 0.03377228230237961, 0.007265948224812746, 0.0463486984372139, 0.04321993142366409, 0.025474913418293, -0.005789753049612045, 0.03177845850586891, -0.002463520737364888, -0.0367170050740242, -0.008473744615912437, 0.0211805272847414, -0.002992650493979454, -0.021686650812625885, -0.008466076105833054, 0.028266264125704765, 0.03180913254618645, 0.05027499422430992, -0.06852613389492035, 0.026502499356865883, 0.01901799626648426, -0.0459192618727684, -0.0021011820062994957, 0.014332514256238937, 0.0535571351647377, -0.04579656198620796, -0.004340397659689188, -0.004696985241025686, -0.023450417444109917, -0.035305991768836975, 0.02033698745071888, -0.0321158766746521, 0.005187772214412689, -0.018389176577329636, 0.018711255863308907, -0.04481498897075653, 0.01490765530616045, 0.022882943972945213, 0.029631266370415688, -0.029385872185230255, 0.0056593879126012325, 0.024524014443159103, -0.01869591884315014, 0.012530406005680561, 0.0017484287964180112, -0.03395632654428482, 0.0058971126563847065, -0.02323569729924202, -0.015590156428515911, -0.026962611824274063, 0.005329640116542578, 0.03015272691845894, -0.010122482664883137, -0.027806151658296585, 0.0021050162613391876, 0.014225155115127563, -0.051900725811719894, -0.021011820062994957, -0.0011723291827365756, 0.008910851553082466, -0.03133368492126465, 0.00769922137260437, 0.022668225690722466, -0.015137712471187115, -0.006253700237721205, -0.0028565337415784597, -0.051839377731084824, -0.009930768981575966, -0.010237510316073895, 0.027422724291682243, 0.015781870111823082, 0.038986895233392715, -0.0209197960793972, -0.003552454523742199, 0.030459469184279442, -0.022223450243473053, 0.013995098881423473, 0.008757480420172215, -0.03226924687623978, -0.021287886425852776, 0.011395460925996304, -0.017392264679074287, -0.002465437864884734, -0.009156245738267899, -0.011441471986472607, -0.008243688382208347, -0.015229734592139721, -0.0473916232585907, 0.020168278366327286, 0.029984019696712494, 0.07251378148794174, -0.04552049562335014, 0.017929064109921455, -0.002869953867048025, 0.00039109590579755604, -0.013151558116078377, 0.01960080675780773, 0.031686436384916306, 0.03389497846364975, 0.023450417444109917, -0.002657151548191905, 0.008596441708505154, 0.0028546166140586138, 0.03969240188598633, -0.00374416820704937, 0.03079688549041748, -0.021149853244423866, 0.015781870111823082, -0.020766425877809525, -0.012169984169304371, 0.00015984127821866423, 0.005279794801026583, -0.04576588794589043, -0.03533666580915451, -0.04539779946208, 0.04275982081890106, -0.003038661787286401, 0.026287779211997986, 0.04404813423752785, 0.010582595132291317, 0.007081903517246246, 0.05521354079246521, -0.06410905718803406, 0.028189579024910927, 0.014401531778275967, -0.017131533473730087, -0.012898496352136135, -0.010513578541576862, 0.032146550714969635, -0.00314218713901937, -0.028649691492319107, -0.02059771679341793, 0.01463925652205944, -0.037085093557834625, -0.011433803476393223, -0.022606877610087395, -0.01849653571844101, -0.030750874429941177, 0.04125678539276123, 0.00917925126850605, 0.00681350426748395, -0.06417040526866913, -0.023113001137971878, -0.004443923011422157, -0.013542653992772102, -0.021287886425852776, -0.02271423675119877, 0.010897005908191204, 0.005091915372759104, -0.025183508172631264, 0.023527102544903755, 0.039232287555933, 0.00409500440582633, 0.010383212938904762, -0.021548617631196976, 0.01756097376346588, 0.01408712100237608, 0.039324309676885605, 0.0020321649499237537, 0.051563311368227005, 0.029370535165071487, -0.03196250647306442, -0.020122267305850983, 0.04429353028535843, 0.01043689250946045, 0.03585812821984291, 0.05567365139722824, -0.04693150892853737, 0.020613055676221848, -0.06453849375247955, -0.020505694672465324, -0.04009116441011429, 0.036164868623018265, 0.0032303754705935717, -0.024339968338608742, 0.005153263919055462, 0.0027089142240583897, -0.02771412953734398, 0.023772496730089188, -0.00016259716358035803, 0.048127803951501846, 0.01651805080473423, 0.057422082871198654, -0.03239194303750992, -0.046164654195308685, 0.029339861124753952, 0.02263755165040493, 0.010076470673084259, 0.007572690490633249, 0.004624133929610252, -0.04693150892853737, 0.03190115466713905, -0.007139417342841625, -0.00224688439629972, 0.023404406383633614, 0.0036387257277965546, -0.03245329111814499, 0.017131533473730087, -0.04067397490143776, 0.05944657698273659, -0.004773670807480812, -0.028066882863640785, 0.0489560067653656, -0.04036723077297211, 0.038465432822704315, -0.048403870314359665, -0.008197677321732044, 0.007354136556386948, 0.05226881802082062, -0.013619340024888515, 0.005636382382363081, 0.01618063449859619, -0.038404084742069244, 0.01723889447748661, 0.02383384481072426, 0.0007194055942818522, 0.01250740047544241, 0.022070078179240227, 0.03573542833328247, -0.006690807640552521, 0.023941203951835632, 0.021088505163788795, -0.022806258872151375, 0.0027875169180333614, -0.043066561222076416, 0.06009073555469513, -0.02593502588570118, 0.02276024781167507, -0.009608689695596695, 0.043066561222076416, -0.005724570248275995, 0.0025612947065383196, -0.029232501983642578, 0.009332621470093727, -0.04275982081890106, -0.0009000957361422479, -0.03521396964788437, -0.011602511629462242, -0.011556500568985939, -0.0054063256829977036, -0.024861430749297142, -0.06061219796538353, -0.03493789955973625, -0.01776035502552986, 0.004286718089133501, -0.06269804388284683, 0.0703052431344986, -0.01671743206679821, -0.02861901745200157, -0.0067023104056715965, -0.0112190842628479, 0.06441579759120941, -0.026088397949934006, 0.03665565699338913, -0.017192883417010307, 0.0021491104271262884, 0.03960037603974342, 0.031747784465551376, -0.008596441708505154, 0.008136328309774399, -0.010935348458588123, 0.038465432822704315, 0.030551491305232048, -0.01250740047544241, -0.018588557839393616, -0.011403129436075687, -0.014125463552772999, -0.023971877992153168, -0.029600592330098152, -0.006234528962522745, -0.0272540170699358, 0.0489560067653656, -0.02059771679341793, -0.011686866171658039, -0.0031920326873660088, 0.03598082438111305, 0.05429331585764885, -0.03407902270555496, -0.028526995331048965, -0.03361891210079193, 0.0054753427393734455, -4.978564538760111e-05, 0.018741929903626442, -0.008696132339537144, -0.011663860641419888, -0.01193992793560028, -0.006717647425830364, 0.049661509692668915, -0.01355799101293087, 0.0008694215212017298, 0.04125678539276123, -0.03276003524661064, 0.017468949779868126, 0.030030030757188797, 0.07472232729196548, -0.028189579024910927, -0.048005104064941406, -0.010490572080016136, 0.016732769086956978, 0.018910637125372887, -0.07257512956857681, -0.02863435447216034, 0.0072429426945745945, 0.0381893664598465, 0.021149853244423866, -0.014593245461583138, 0.01237703487277031, -0.035704754292964935, -0.011525826528668404, -0.021809348836541176, 0.024401316419243813, 0.007227605674415827, 0.008949194103479385, -0.009439981542527676, 0.012400040403008461, -0.020521031692624092, 0.022913619875907898, 0.030612841248512268, 0.032483965158462524, 0.02993800863623619, -0.013903075829148293, 0.036103520542383194, 0.061900511384010315, -0.05447736009955406, -0.012215995229780674, -0.039232287555933, 0.04291319102048874, 0.037085093557834625, -0.019922886043787003, 0.010950685478746891, -0.02633379027247429, 0.016625409945845604, 0.002549791941419244, -0.03407902270555496, -0.028726378455758095, 0.0912250354886055, 0.01771434396505356, -0.07294321805238724, -0.0005166683695279062, 0.026609858497977257, 0.036103520542383194, 0.05720736086368561, -0.02935519814491272, 0.0677899569272995, 0.016088612377643585, 0.02841963618993759, 0.008619447238743305, -0.022622214630246162, 0.05033634230494499, 0.04180891811847687, -0.05082713067531586, -0.017330916598439217, -0.03288273140788078, -0.014133132062852383, -0.003690488403663039, 0.008527424186468124, 0.029907334595918655, 0.03139503300189972, 0.025520924478769302, 0.02137991040945053, 0.010521247051656246, 0.0033185638021677732, -0.03447778895497322, -0.001231760368682444, -0.00040619337232783437, 0.02225412428379059, -0.005460005719214678, -0.006361059844493866, 0.028051545843482018, 0.04463094472885132, -0.015283414162695408, -0.012630097568035126, 0.01085866242647171, -0.04321993142366409, 0.011334112845361233, 0.060918938368558884, 0.08926188945770264, -0.024600699543952942, -0.008665458299219608, 0.009662369266152382, -0.01815911941230297, 0.020689740777015686, 0.02329704724252224, 0.02587367780506611, -0.024462666362524033, -0.011042707599699497, 0.02665586955845356, 0.03349621221423149, 0.04456959664821625, 0.023726485669612885, -0.009654700756072998, -0.016027264297008514, 0.014792627654969692, 0.007936946116387844, 0.013044198974967003, 0.03141037002205849, 0.014018104411661625, -0.0021050162613391876, 0.001081265159882605, 0.02567429654300213, 0.01711619645357132, -0.015352431684732437, -0.010605600662529469, 0.014110126532614231, -0.0058434330858290195, 0.030106715857982635, 0.005260623525828123, -0.02631845325231552, -0.07963019609451294, 0.016027264297008514, 0.00041026726830750704, -0.0011704120552167296, 0.0015816378872841597, 0.019508784636855125, 0.001944935298524797, -0.01372669916599989, -0.03190115466713905, -0.03475385531783104, 0.006456916686147451, 0.02389519289135933, -0.019984234124422073, -0.01372669916599989, -4.6730208850931376e-05, 0.02157929167151451, -0.011755882762372494, -0.014209818094968796, -0.02841963618993759, 0.043588023632764816, 0.010574926622211933, 0.0015624664956703782, 0.011081051081418991, -0.0031939498148858547, 0.01395675539970398, -0.019570132717490196, 0.006410905625671148, -0.010751303285360336, -0.01463925652205944, 0.06478388607501984, -0.0034949404653161764, -0.0016247734893113375, 0.007752901408821344, -0.03757588192820549, -0.013074873015284538, -0.008903183043003082, 0.0029696449637413025, 0.028526995331048965, 0.017208220437169075, 0.02067440375685692, 0.01328959222882986, 0.02435530535876751, -0.018082434311509132, 0.03947767987847328, 0.008696132339537144, -0.0041985297575592995, -0.024125250056385994, -0.006598785053938627, -0.03607284650206566, -0.01543678529560566, -0.029462559148669243, -0.009439981542527676, -0.00044956858619116247, -0.02263755165040493, 0.0017436358612030745, -0.019861537963151932, 0.015505802817642689, 0.016962826251983643, 0.026609858497977257, -0.011418466456234455, -0.0133662773296237, -0.02401788905262947, -0.00432506063953042, -0.015306420624256134, 0.03591947630047798, 0.005433165468275547, -0.0300760418176651, 0.01408712100237608, -0.04410948231816292, -0.0047391620464622974, -0.023711148649454117, 0.03171711042523384, -0.020628392696380615, 0.0006556607550010085, -0.016748106107115746, 0.028910422697663307, -0.038465432822704315, 0.02757609635591507, -0.020290976390242577, -0.013212907128036022, -0.020827773958444595, 0.010935348458588123, -0.005682393442839384, -0.04861858859658241, -0.010751303285360336, -0.016763444989919662, 0.019462773576378822, -0.009992117062211037, -0.0020992648787796497, 0.039232287555933, -0.0356740802526474, -0.002682074438780546, -0.00822835136204958, 0.02387985587120056, -0.020950470119714737, -0.010206836275756359, 0.01638001762330532, 0.04343464970588684, 0.02837362512946129, 0.01227734424173832, -0.05174735561013222, -0.010897005908191204, -0.018925974145531654, -0.0032821381464600563, -0.011341781355440617, 0.0208737850189209, -0.01079731434583664, -0.025981036946177483, -0.011832567863166332, 0.016487376764416695, 0.0020896790083497763, -0.022683562710881233, -0.0054063256829977036, 0.012806474231183529, -0.07355670630931854, 0.017453612759709358, -0.02743806131184101, 0.01889530010521412, -0.014194481074810028, 0.004815847612917423, 0.03383363038301468, 0.0438334159553051, 0.03196250647306442, -0.02961592935025692, 0.019784850999712944, 0.05088847875595093, -0.0004030780110042542, 0.016870804131031036, -0.035367339849472046, -0.016794119030237198, 0.0040106503292918205, -0.0015078281285241246, -0.03177845850586891, -0.03837341070175171, 0.011272764764726162, 0.011058044619858265, -0.0180977713316679, 0.01591990329325199, -0.049906905740499496, -0.013320266269147396, 0.017085522413253784, 0.019861537963151932, -0.0300760418176651, -0.02751474641263485, 0.04683948680758476, 0.0014100541593506932, 0.005751410499215126, 0.02731536515057087, -0.0030942587181925774, -0.010206836275756359, 0.03739183768630028, 0.0043135578744113445, 0.044845663011074066, -0.015950577333569527, -0.019830863922834396, -0.003859196323901415, -0.035888802260160446, -0.007959951646625996, 0.04325060546398163, 0.06226860359311104, 0.025551598519086838, -0.01861923187971115, 0.018527209758758545, 0.0027606768999248743, -0.007219937164336443, -0.005130257923156023, -0.008995206095278263, 0.044385552406311035, 0.019232716411352158, -0.04613398015499115, -0.0015135795110836625, -0.011870911344885826, -0.058986466377973557, -0.020904459059238434, -0.016686758026480675, 0.015950577333569527, 0.023373732343316078, 0.007557353470474482, -0.021165190264582634, 0.01098902802914381, -0.006640961859375238, 0.02771412953734398, 0.04677813872694969, -0.015222066082060337, -0.01056725811213255, 0.04223835840821266, 0.010605600662529469, -0.01743827573955059, -0.006058152299374342, -0.006157843396067619, 0.006966874934732914, 0.012031950987875462, 0.030306098982691765, 0.04159419983625412, -0.006537436507642269, 0.02461603656411171, 0.04555116966366768, -0.026640532538294792, -0.013642345555126667, -0.0033166466746479273, -0.03371093422174454, 0.003481520339846611, 0.026425814256072044, 0.06205388531088829, -0.05515219271183014, 0.01351964846253395, -0.04229970648884773, 0.01191692240536213, -0.007093406282365322, 0.05033634230494499, -0.02237682044506073, -0.013389283791184425, -0.012614760547876358, -0.0012518903240561485, -0.04355734959244728, 0.00168228754773736, -0.03987644612789154, -0.01638001762330532, 0.020290976390242577, -0.002668654313310981, 0.0029102135449647903, 0.02019895240664482, -0.0127374567091465, -0.018281815573573112, -0.024002552032470703, 0.0136270085349679, -0.01929406449198723, -0.01644136570394039, -0.016625409945845604, 0.003356906585395336, 0.0028622851241379976, 0.03665565699338913, -0.028941096737980843, -0.013903075829148293, -0.008182340301573277, 0.01651805080473423, -0.0017225474584847689, -0.05855702608823776, -0.01003812812268734, -0.03171711042523384, 0.005536691285669804, 0.010912342928349972, 0.023542439565062523, 0.018711255863308907, -0.004474597051739693, -0.0372384637594223, -0.008143996819853783, 0.011702203191816807, 0.032729361206293106, 0.00506507558748126, 0.017867714166641235, -0.022744910791516304, -0.0011761634377762675, -0.012653103098273277, -0.031180312857031822, 0.03843475878238678, -0.0007275533862411976, -0.04723824933171272, 0.038342736661434174, -0.017791029065847397, 0.019125357270240784, 0.0017263817135244608, -0.08748278766870499, 0.04364937171339989, 0.0004124240658711642, -0.04914005100727081, 0.016103949397802353, 0.02975396253168583, -0.010068802163004875, 0.01749962382018566, -0.008335710503160954, -0.02915581688284874, -0.015482796356081963, -0.01802108623087406, -0.049661509692668915, -0.005375651642680168, -0.006188517436385155, 0.015551813878118992, 0.018910637125372887, -0.02783682569861412, 0.0011454892810434103, 0.01180956233292818, -0.021686650812625885, 0.012315686792135239, -0.0331587977707386, -0.011019702069461346, -0.013404620811343193, -0.007208434399217367, -0.048005104064941406, -0.0024462665896862745, -0.011188410222530365, -0.01723889447748661, 0.015229734592139721, -0.01802108623087406, 0.002398338168859482, -0.010897005908191204, 0.02363446168601513, -0.016548724845051765, -0.024370642378926277, -0.047023531049489975, -0.02685525268316269, 0.0025191176682710648, -0.0024501008447259665, 0.02559760957956314, -0.05177802965044975, -0.009232930839061737, -0.02357311360538006, 0.046624768525362015, -0.0027491741348057985, -0.0016525719547644258, -0.011510489508509636, 0.005095749627798796, -0.017929064109921455, 0.0229596309363842, -0.014554902911186218, 0.015022683888673782, 0.04303588718175888, -0.014915323816239834, -0.005839598830789328, 0.015505802817642689, -0.009171582758426666, 0.008734474889934063, -0.004930875729769468, -0.01633400470018387, -0.04180891811847687, 0.017867714166641235, -0.05598039552569389, 0.019769513979554176, 0.007350302301347256, 0.033802956342697144, -0.0065681105479598045, -0.038986895233392715, 0.04877195879817009, -0.01843518763780594, 0.029002444818615913, 0.03711576759815216, 0.06294343620538712, -0.031287673860788345, 0.018143782392144203, -0.02883373759686947, 0.052422188222408295, 0.01849653571844101, 0.027208006009459496, 0.009923100471496582, -0.012392371892929077, -0.007772072684019804, 0.036747679114341736, -0.00963936373591423, 0.037943970412015915, 0.004355734679847956, -0.020091593265533447, -0.002386835403740406, -0.005736073479056358, -0.007396313827484846, 0.0060313125140964985, 0.010084139183163643, -0.01056725811213255, 0.012814142741262913, 0.0005679517635144293, -0.004305889364331961, -0.01889530010521412, -0.004236872307956219, -0.04690083488821983, 0.03322014585137367, -0.040428582578897476, -0.0017167959595099092, -0.013304929248988628, -0.01743827573955059, 0.025766318663954735, -0.007580359000712633, 0.028051545843482018, 0.0007534347823821008, 0.025582272559404373, 0.02593502588570118, -0.03555138409137726, -0.0030750874429941177, -0.014961335808038712, 0.0010573009494692087, 0.015045689418911934, -0.020613055676221848, -0.00858877319842577, -0.021962719038128853, -0.021794011816382408, -0.057882193475961685, -0.019708165898919106, 0.06125635653734207, -0.011533495038747787, -0.012706782668828964, 0.036164868623018265, 0.048526566475629807, -0.012599422596395016, 0.012821811251342297, 0.007078069262206554, -0.039232287555933, -0.0033530723303556442, -0.021149853244423866, -0.025244858115911484, 0.04285184293985367, -0.02039833553135395, 0.010720629245042801, 0.013811053708195686, -0.0315944142639637, -0.02659452147781849, 0.03199318051338196, 0.01563616842031479, 0.010444561019539833, -0.035766102373600006, 0.05699264258146286, -0.026824578642845154, 0.033925652503967285, -0.017208220437169075, 0.04187026619911194, 0.00769922137260437, 0.005774416029453278, 0.028143567964434624, -0.012515068985521793, -0.00763403857126832, -0.017683669924736023, -0.022146765142679214, -0.06186983734369278, 0.019846200942993164, -0.057544779032468796, 0.020382998511195183, -0.009117902256548405, 0.0027165827341377735, -0.02513749711215496, -0.02723868004977703, 0.0504283644258976, 0.0038649477064609528, -0.007806580979377031, -0.0020359992049634457, -0.013281923718750477, 0.013834059238433838, 0.028465647250413895, -0.017024174332618713, 0.04969218745827675, 0.02579699270427227, -0.018327828496694565, 0.01556715089827776, 0.006855681072920561, -0.006587281823158264, -0.01125742681324482, -0.023803170770406723, -0.0443548783659935, 0.053802527487277985, -0.0032418782357126474, 0.009884756989777088, -0.03039812110364437, -0.012990518473088741, 0.0038266051560640335, -0.03868015110492706, -0.0165793988853693, 0.026073060929775238, 0.008680795319378376, -0.017622321844100952, 0.00044549466110765934, -0.024385979399085045, 0.028588343411684036, 0.02343508042395115, -0.0044362545013427734, -0.02961592935025692, -0.01062860619276762, 0.035582058131694794, 0.0030808388255536556, 0.056164439767599106, 0.026548510417342186, 0.005851101595908403, -0.005134092178195715, 0.03233059495687485, 0.017024174332618713, 0.011870911344885826, 0.045183081179857254, -0.04073532298207283, -0.011932259425520897, -0.010283521376550198, -0.008665458299219608, 0.03141037002205849, 0.012354029342532158, 0.008481413125991821, 0.009524335153400898, 0.024968789890408516, -0.007591861765831709, 0.014324845746159554, 0.015022683888673782, -0.011817230843007565, 0.023465754464268684, -0.004842687398195267, 0.015199060551822186, -0.019002659246325493, 0.0025996374897658825, 0.0007817125297151506, -0.06809669733047485, -0.008282030932605267, 0.013312597759068012, 0.03785194829106331, -0.009309615939855576, -2.3028107989375712e-06, -0.008788155391812325, -0.004386409185826778, -0.013343271799385548, -0.010245178826153278, 0.02387985587120056, -0.016073275357484818, 0.011012033559381962, -0.003320480929687619, 0.005690061952918768, -0.01776035502552986, -0.0012518903240561485, 0.016763444989919662, 0.007120246067643166, 0.02973862551152706, -0.02453935146331787, -0.015199060551822186, -0.021671313792467117, 0.02368047460913658, 0.004907870199531317, 0.0067061446607112885, 0.01651805080473423, -0.04877195879817009, -0.013887738808989525, -0.009930768981575966, -0.010935348458588123, -0.0027760141529142857, -0.011464478448033333, -0.0029217165429145098, 0.010137819685041904, 0.01697816327214241, 0.014853975735604763, 0.013128552585840225, 0.003937799017876387, -0.025428902357816696, 0.00842006504535675, 0.01318990159779787, 0.015360100194811821, 0.0027089142240583897, 0.0034125035163015127, -0.00733879953622818, -0.0017762272618710995, 0.000559803971555084, -0.01644136570394039, -0.006767492741346359, -0.04533645138144493, -0.00054302898934111, 0.01822046749293804, 0.04561251774430275, 0.024953452870249748, 0.036287564784288406, -0.0129981879144907, 0.004378740210086107, 0.002321652602404356, -0.030566828325390816, -0.0034240062814205885, 0.007737563923001289, -0.006943869404494762, 0.0448763370513916, -0.018588557839393616, 0.04825050011277199, -0.01960080675780773, -0.037023745477199554, -0.03171711042523384, 0.009976780042052269, 0.019907549023628235, 0.006249865982681513, -0.021441258490085602, 0.024339968338608742, -0.001868249848484993, -0.0011857490753754973, -0.012116304598748684, -0.023404406383633614, -0.023128338158130646, 0.01907934620976448, 0.05260623246431351, -0.016226645559072495, 0.03113430179655552, -0.005157098174095154, -0.001941101043485105, -0.037146441638469696, -0.010153156705200672, -0.03941633179783821, 0.018465861678123474, -0.021947382017970085, 0.01187857985496521, -0.0071930973790585995, -0.05174735561013222, -0.026103734970092773, -0.023051653057336807, 0.0036042171996086836, 0.015291082672774792, -0.047422297298908234, -0.019064009189605713, 0.027392050251364708, 0.019846200942993164, -0.009079559706151485, 0.00011688543600030243, -0.008826497942209244, 0.016686758026480675, -0.05987601727247238, -0.030229413881897926, -0.021993393078446388, 0.00641473988071084, 0.009232930839061737, -0.00641473988071084, 0.04993757978081703, 0.0026015546172857285, 0.03987644612789154, 0.010145488195121288, 0.03693172335624695, -0.01703951135277748, -0.0024098409339785576, -0.007875598035752773, 0.01929406449198723, 0.03447778895497322, -0.006134837865829468, -0.0022526357788592577, 0.018005749210715294, -0.005552028305828571, -0.03111896477639675, -0.024247946217656136, 0.01685546711087227, 0.00881882943212986, 0.01960080675780773, -0.028051545843482018, -0.020168278366327286, 0.014079452492296696, -0.03190115466713905, -0.017883051186800003, -0.007239108439534903, 0.0011320692719891667, -0.00182990706525743, -0.011886248365044594, 0.006115666590631008, -0.009823408909142017, -0.0008718179306015372, -0.04002981632947922, -0.009976780042052269, -0.0032418782357126474, -0.03297475352883339, -0.014761953614652157, -0.020582379773259163, 0.01191692240536213, -0.006545105017721653, 0.01069762371480465, -0.014478216879069805, -0.008995206095278263, -0.040121838450431824, -0.004512940067797899, 0.032944079488515854, 0.005985300987958908, -0.015260408632457256, -0.010973691008985043, 0.030950255692005157, 0.0003319043025840074, -0.02975396253168583, 0.012384703382849693, -0.004785173572599888, -0.012231333181262016, 0.01355799101293087, -0.007599530275911093, -0.017269568517804146, -0.010920011438429356, 0.00021064540487714112, -0.0032629668712615967, -0.013120884075760841, -0.012706782668828964, -0.003477686084806919, 0.03226924687623978, 0.03177845850586891, -0.007530513219535351, -0.008282030932605267, 0.01881861500442028, -0.0070090522058308125, -0.03966172784566879, -0.01703951135277748, 0.009332621470093727, -0.010950685478746891, -0.04177824407815933, 0.02429395727813244, -0.017867714166641235, 0.021947382017970085, -0.03349621221423149, 0.006203854456543922, -0.018711255863308907, -0.03085823357105255, 0.023603787645697594, 0.005091915372759104, -0.010390881448984146, -0.008711469359695911, 0.012001276016235352, -0.007641707081347704, 0.023189686238765717, -0.0290791317820549, 0.00809798575937748, -0.024692721664905548, 0.009846414439380169, -0.009186919778585434, -0.004792842082679272, -0.006970709189772606, -0.004217701032757759, -0.021563954651355743, 0.023941203951835632, -0.021563954651355743, 0.012599422596395016, 0.036563631147146225, -0.03196250647306442, -0.017269568517804146, 0.008642452768981457, -0.01907934620976448, -0.02493811585009098, 0.0073119597509503365, -0.024125250056385994, -0.015482796356081963, 0.013964424841105938, 0.019968897104263306, 0.032146550714969635, -0.008726806379854679, -0.013834059238433838, -0.018787940964102745, 0.00778357544913888, -0.014754285104572773, -0.010245178826153278, 0.03276003524661064, 0.021287886425852776, 0.0069400351494550705, 0.017545636743307114, -0.019002659246325493, 0.0025862175971269608, 0.014731279574334621, -0.0016381933819502592, -0.0037959308829158545, 0.004056661389768124, -0.009624026715755463, 0.01079731434583664, -0.03460048511624336, -0.009785066358745098, 0.001602726406417787, -0.00904888566583395, 0.021287886425852776, -0.04048993065953255, 0.0014915324281901121, -0.02613440901041031, 0.019171368330717087, -0.006123335100710392, 0.0269932858645916, 0.008282030932605267, -0.03920161351561546, -0.04539779946208, 0.006249865982681513, -0.04389476403594017, 0.02947789616882801, -0.04607263207435608, -0.0027127484790980816, -0.006778995506465435, -0.009002874605357647, 0.0002892480115406215, 0.013028861954808235, 0.016625409945845604, 0.01756097376346588, -0.026103734970092773, 0.004355734679847956, 0.03910959139466286, 0.012062625028192997, 0.018803277984261513, 0.007975288666784763, -0.021533280611038208, 0.026027049869298935, 0.03763723000884056, 0.023803170770406723, -0.006840344052761793, 0.0036214713472872972, -0.024201935157179832, 0.00026312703266739845, 0.019202042371034622, 0.007657044567167759, 0.00828969944268465, -0.03647160902619362, -0.022070078179240227, -0.011012033559381962, -0.032606661319732666, -0.008657789789140224, -0.026947274804115295, 0.03349621221423149, 0.02171732485294342, -0.003845776431262493, 0.0012614759616553783, 0.007595696020871401, -0.00028014162671752274, -0.03690104931592941, 0.025766318663954735, 0.005456171464174986, -0.03456981107592583, -0.04953881353139877, 0.03917093947529793, 0.010107145644724369, -0.02335839532315731, -0.00404899287968874, 0.017422938719391823, -0.03797464445233345, 0.015705185011029243, -0.013320266269147396, -0.00015205291856545955, -0.010682285763323307, 0.0074308221228420734, 0.003979975823312998, 0.0012442218139767647, -0.005655553657561541, -0.04239172860980034, 0.005068909842520952, -0.02067440375685692, 0.0013582913670688868, -0.014056446962058544, -0.027407387271523476, -0.005552028305828571, 0.02539822831749916, 0.010252847336232662, -0.03144104406237602, 0.010996696539223194, 0.006548939272761345, -0.011832567863166332, -0.023481091484427452, -0.010222173295915127, -0.013703693635761738, -0.012346360832452774, 0.012653103098273277, -0.017806366086006165, -0.012921501882374287, -0.014738948084414005, 0.013435294851660728, 0.02685525268316269, 0.01980018801987171, 0.01326658669859171, -0.010674617253243923, 0.004884864669293165, 0.004233038052916527, 0.00858877319842577, 0.02769879251718521, -0.019846200942993164, -0.010850993916392326, -0.0163186676800251, -0.013090210035443306, 0.030459469184279442, 0.04665544256567955, 0.0165793988853693, -0.00851975567638874, -0.03815869241952896, 0.002193204592913389, -0.022346146404743195, -0.018864626064896584, -0.004693150985985994, 0.012308018282055855, -0.0060274782590568066, -0.0016707846662029624, 0.025490250438451767, 0.003696239786222577, -0.00291213090531528, -0.004961550235748291, -0.00018021085998043418, 0.004635636694729328, 0.026226431131362915, 0.02935519814491272, -0.04058195278048515, 0.002578549087047577, -0.011372455395758152, 0.003742251079529524, 0.010950685478746891, 0.06048950180411339, 0.03625689074397087, 0.005095749627798796, -0.003182447049766779, 0.013281923718750477, 0.022162102162837982, -0.04180891811847687, 0.04233038052916527, -0.016272656619548798, 0.016533387824892998, 0.016349341720342636, -0.015107037499547005, 0.05401724576950073, -0.0331587977707386, -0.01723889447748661, 0.005160932429134846, 0.025950362905859947, -0.013511979952454567, 0.021962719038128853, 0.021533280611038208, 0.027131319046020508, -0.006552773527801037, 0.007814249955117702, -0.024247946217656136, 0.014631588011980057, -0.008005963638424873, 0.001500159502029419, 0.0017187130870297551, -0.007101074792444706, -0.006928532384335995, 0.012875490821897984, 0.02269889973104, -0.018327828496694565, 0.008143996819853783, 0.015904566273093224, 0.016671421006321907, 0.033342842012643814, -0.00022466447262559086, 0.006391733884811401, -0.01450889091938734, 0.015007346868515015, -0.033864304423332214, -0.024048563092947006, 0.003479603212326765, 3.1003695767140016e-05, -0.015314089134335518, 0.009877088479697704, -0.0071279145777225494, -0.0032342097256332636, -0.02455468848347664, -0.0015154966386035085, 0.015413779765367508, 0.0073119597509503365, 0.002214292995631695, -0.019432097673416138, 0.028787726536393166, -0.006736818701028824, -0.05021364614367485, 0.044722966849803925, 0.0048695276491343975, 0.026824578642845154, 0.0010975608602166176, 0.023588450625538826, 0.020965807139873505, -0.01408712100237608, -0.0018078599823638797, -0.0037556709721684456, 0.015620830468833447, 0.017484286800026894, -0.002576631959527731, -0.03165576234459877, -0.012185321189463139, 0.011073382571339607, 0.03604217246174812, -0.003341569332405925, -0.0053603146225214005, -0.010068802163004875, 0.043403975665569305, -0.021686650812625885, -0.024370642378926277, 0.004187026526778936, 0.008450739085674286, 0.038802847266197205, -0.004524442832916975, -0.012223663739860058, -0.03309744969010353, 0.0267325546592474, 0.007538181729614735, 0.019309401512145996, 0.010122482664883137, -0.007875598035752773, 0.01599659025669098, 0.018864626064896584, 0.006660133134573698, 0.015689847990870476, -0.01062860619276762, -0.010958353988826275, 0.007139417342841625, 0.0037920966278761625, -0.044784314930438995, 0.006525933742523193, -0.012116304598748684, 0.041226111352443695, 0.047422297298908234, 0.02527553215622902, -0.007074234541505575, 0.019968897104263306, 0.021410584449768066, -0.040121838450431824, 0.0026322288904339075, -2.911651426984463e-05, -0.04251442477107048, -0.012262007221579552, 0.002958141965791583, 0.004608796909451485, -0.0026015546172857285, -0.0012288846774026752, -0.010651611723005772, 0.02427862025797367, 0.0051072523929178715, -0.004528277087956667, 0.004585791379213333, 0.0015461707953363657, -0.013274255208671093, -0.00805964320898056, 0.028266264125704765, 0.01075897179543972, 0.010275852866470814, -0.02969261445105076], "index": 35}, {"title": "Hong Kong Economic Times", "text": "Hong Kong Economic Times (26 January 1988), the leading financial daily in Hong Kong, was founded by Mr. Fung Siu Por, Lawrence (Chairman), Mr. Perry Mak (Managing Director), Mr. Arthur Shek (Executive Director) and other founders with HK$20 million of foundation fund in 1988.", "vector": [-0.028982525691390038, -0.040694091469049454, -0.010437874123454094, -0.06462991237640381, 0.012240270152688026, -0.033836979418992996, -0.010213576257228851, 0.010886470787227154, -0.024833008646965027, 0.03582361713051796, 0.07677405327558517, 0.01986640691757202, -0.0032423099037259817, -0.024833008646965027, 0.009957235306501389, -0.026899756863713264, 0.0062563163228333, -0.023839689791202545, -0.006460587959736586, 0.0311293788254261, -0.02555396780371666, -0.009588745422661304, -0.03109733574092388, 0.026210840791463852, -0.002931897295638919, -0.010221587494015694, -0.01614946685731411, 0.014795667491853237, 0.014010624028742313, 0.03165808320045471, 0.02193315513432026, 0.034702129662036896, 0.004055390600115061, -0.034605998545885086, -0.013241601176559925, 0.03668876737356186, 0.03627221658825874, -0.01136710960417986, -0.010093417018651962, -0.013818368315696716, 0.04787163436412811, 0.002887838752940297, -0.030055951327085495, 0.0033164082560688257, -0.029062630608677864, 0.019545981660485268, -0.021949175745248795, -0.019401790574193, -0.011150822043418884, 0.04037366807460785, 0.03399718925356865, 0.029911760240793228, -0.02707599103450775, 0.050627294927835464, -0.009644820354878902, 0.031193463131785393, 0.037137363106012344, 0.06581548601388931, -0.003917207010090351, -0.04104655981063843, -0.016566019505262375, -0.033740848302841187, 0.01757536269724369, 0.03611200302839279, 0.01328966487199068, 0.022638091817498207, -0.025185476988554, 0.015604742802679539, 0.027524586766958237, -0.0018023957964032888, -0.03652855381369591, -0.016373764723539352, 0.062451012432575226, 0.022814325988292694, 0.010389810428023338, -0.08138818293809891, 0.012520642951130867, -0.013033324852585793, -0.03515072539448738, 0.03351655229926109, -0.022285623475909233, 0.013353750109672546, 0.008198898285627365, -0.003364472184330225, 0.028998546302318573, -0.018921151757240295, -0.02326292172074318, -0.06703310459852219, -0.01847255416214466, 0.044378992170095444, 0.022445837035775185, 0.01574893482029438, -0.04425081983208656, -0.05838160216808319, 0.005066734738647938, 0.050691381096839905, -0.02725222520530224, -0.0072055780328810215, -0.013505952432751656, -0.03572748973965645, 0.021772941574454308, 0.010582066141068935, 0.038098644465208054, -0.04498780146241188, 0.020218875259160995, -0.022173473611474037, -0.01824825629591942, 0.01754331961274147, -0.0032643391750752926, 0.019097385928034782, 0.029783589765429497, 0.015909146517515182, 0.00827499944716692, 0.04037366807460785, -0.0355672761797905, 0.06309186667203903, -0.011775652877986431, -0.010125459171831608, 0.05578615516424179, 0.046974439173936844, -0.015492593869566917, -0.00126067572273314, 0.03063271939754486, -0.019786300137639046, 0.016598062589764595, -0.03649651259183884, -0.04152720049023628, 0.017831703647971153, 0.007786349859088659, -0.008190887980163097, -0.11419980227947235, 0.02299056015908718, 0.012833057902753353, -0.012929186224937439, -0.01106270495802164, 0.02323088049888611, 0.027428459376096725, -0.009869118221104145, -0.0055113257840275764, 0.008611447177827358, 0.055209387093782425, 0.014691528864204884, 0.024640753865242004, -0.032715488225221634, -0.04409060627222061, -0.03425353020429611, 0.022413793951272964, -0.003138171508908272, 0.036368343979120255, 0.034541916102170944, -0.010077395476400852, 0.01039782166481018, 0.019465874880552292, 0.02233368717133999, -0.01828029938042164, -0.04421877861022949, 0.04953784868121147, 0.011415173299610615, -0.0402134545147419, 0.012416504323482513, -0.016325701028108597, -0.003432562807574868, -0.023246901109814644, -0.034541916102170944, -0.0009898156858980656, -0.04159128665924072, 0.034605998545885086, -0.009628798812627792, -0.02366345375776291, 0.011303024366497993, -0.002737639006227255, 0.023134751245379448, -0.061489734798669815, -0.014162826351821423, -0.056138623505830765, 0.036400385200977325, 0.02452860400080681, 0.01387444231659174, -0.0003795044613070786, -0.0017413146561011672, 0.028229523450136185, 0.04210396483540535, 0.015909146517515182, 0.03784230351448059, -0.01807202212512493, -0.0023751570843160152, 0.06040028855204582, -0.006100108381360769, 0.030520569533109665, 0.015708880499005318, -0.011407162994146347, 0.0379384309053421, -0.019321683794260025, -0.023599369451403618, -0.00220893626101315, -0.013562027364969254, 0.00965283066034317, -0.030023910105228424, 0.002080765785649419, 0.0066488380543887615, 0.0021528617944568396, -0.008419191464781761, 0.020555322989821434, 0.032539252191782, -0.014891794882714748, -0.029655419290065765, 0.018120085820555687, 0.03229893371462822, -0.008931872434914112, 0.03100120835006237, 0.043385669589042664, -0.05222942680120468, 0.037233494222164154, 0.02146853692829609, -0.018648788332939148, 0.017126765102148056, 0.071134552359581, 0.028934461995959282, 0.045148011296987534, -0.00660477951169014, -0.008443223312497139, -0.026835670694708824, 0.04848044365644455, -0.014082719571888447, -0.0541519820690155, -0.008050701580941677, -0.04524414241313934, -0.021580686792731285, 0.0032783576752990484, -0.01279300544410944, 0.0260506272315979, -0.012961228378117085, -0.006128145847469568, 0.01305735670030117, -0.0007675202214159071, -0.011086736805737019, -0.030680783092975616, -0.04466737434267998, -0.007421865593641996, -0.008218925446271896, 0.03409332036972046, 0.026130734011530876, -0.015676839277148247, -0.02545784041285515, -0.0362081304192543, -0.04783958941698074, -0.032779570668935776, 0.01554866787046194, -0.027156097814440727, 0.021821005269885063, 0.06286756694316864, -0.04393039271235466, 0.04393039271235466, -0.03399718925356865, 0.06600774079561234, 0.05094772204756737, 0.03342042490839958, 0.0089719258248806, -0.034509871155023575, 0.00742587074637413, -0.004185563884675503, 0.03803455829620361, 0.006592763587832451, 0.049922358244657516, -0.054119937121868134, -0.004109462723135948, 0.0004368306545075029, 0.009188213385641575, -0.009380469098687172, 0.021885091438889503, 0.04393039271235466, -0.020811663940548897, 0.06373271346092224, 0.015188189223408699, -0.0017873758915811777, 0.003014006419107318, -0.051492445170879364, 0.05562594160437584, -0.042744819074869156, 0.04248847812414169, -0.015500604175031185, 0.01389046385884285, 0.021212195977568626, -0.02007468417286873, 0.008419191464781761, -0.03591974452137947, 0.03889970853924751, -0.036464471369981766, 0.04037366807460785, -0.022654112428426743, 0.011190875433385372, -0.0015260284999385476, 0.02110004797577858, 0.04255256429314613, 0.0003424551978241652, 0.016189519315958023, -0.03386902064085007, -0.028389737010002136, -0.0066328165121376514, -0.04591703414916992, -0.02116413228213787, 0.013778314925730228, -0.0025974526070058346, -0.019321683794260025, -0.0062402947805821896, 0.007602104917168617, 0.0043898350559175014, -0.00855537224560976, -0.01096657756716013, -0.055305514484643936, 0.014403145760297775, -0.01741514913737774, -0.003354458836838603, 0.006748971063643694, -0.012488600797951221, -0.06129748001694679, 0.043609969317913055, -0.031321633607149124, 0.008234946057200432, -0.04575682058930397, 0.05911858379840851, -0.00020815168682020158, -0.04213600978255272, 0.005022676195949316, -0.012921175919473171, -0.004654186777770519, 0.011391141451895237, 0.04780754819512367, -0.007281679194420576, -0.00347662135027349, 0.0075860838405787945, -0.01917749084532261, -0.010261639952659607, 0.039348304271698, 0.008070727810263634, 0.027140075340867043, 0.014707550406455994, 0.02428828552365303, -0.0160533394664526, 0.026627395302057266, 0.012672845274209976, 0.018857065588235855, 0.01980232261121273, 0.035471148788928986, 0.007461918983608484, -0.017655467614531517, 0.02681965008378029, 0.012448547407984734, 0.034702129662036896, 0.0040914383716881275, 0.0005597440176643431, -0.025105372071266174, 0.011639472097158432, 0.008827733807265759, 0.0037589967250823975, -0.05492100492119789, 0.01608538068830967, -0.021917132660746574, 0.016870424151420593, 0.009372458793222904, 0.0026755565777420998, 0.009588745422661304, 0.012945207767188549, 0.03393310680985451, 0.002991977147758007, -0.006460587959736586, -0.014915826730430126, 0.022541964426636696, 0.004814399406313896, -0.028357693925499916, 0.005867799744009972, -0.031225506216287613, 0.00813881866633892, 0.01377030462026596, 0.02478494495153427, 0.03611200302839279, -0.09189815819263458, 0.029911760240793228, -0.024400433525443077, -0.03954055905342102, -0.027973182499408722, 0.0003832594375126064, 0.03575953468680382, 0.03303591161966324, -0.007353775203227997, -0.07645362615585327, -0.024144094437360764, -0.062290798872709274, 0.0049425698816776276, 0.06405314058065414, -0.0014409152790904045, -0.0004521009686868638, 0.0017343052895739675, 0.010389810428023338, 0.012881122529506683, -0.00490251649171114, 0.042712774127721786, 0.021772941574454308, 0.038995835930109024, -0.011823716573417187, -0.0474550798535347, 0.00925229862332344, 0.05841364711523056, -0.011543343774974346, -0.013994602486491203, -0.0019305661553516984, 0.005883821286261082, -4.0272283513331786e-05, 0.018392447382211685, -0.02744447998702526, 0.042648691684007645, 0.023439155891537666, -0.06696902215480804, -0.0642133578658104, 0.014026644639670849, 0.005331086460500956, -0.05844568833708763, -0.03056863322854042, 0.03316408395767212, -0.027957161888480186, 0.03854724019765854, 0.00375499133951962, -0.0007670195773243904, 0.013970570638775826, 0.06174607574939728, -0.010846417397260666, 0.0185366403311491, 0.024608710780739784, -0.0024232210125774145, 0.044475119560956955, 0.02462473325431347, -0.05408789590001106, 0.03175421059131622, 0.010854428634047508, -0.00020502253028098494, -0.01530033815652132, 0.004469941835850477, 0.05104384943842888, 0.02744447998702526, 0.01674225553870201, -0.01887308619916439, -0.08010648190975189, 0.011110768653452396, 0.008979936130344868, -0.015556679107248783, -0.017927831038832664, -0.05174878612160683, 0.017222894355654716, 0.009372458793222904, -0.03303591161966324, -0.021340366452932358, 0.0056755440309643745, -0.009396490640938282, 0.04652584344148636, -0.009500628337264061, 0.027732864022254944, -0.0022670135367661715, -0.013417835347354412, 0.02462473325431347, 0.00340652815066278, 0.005751645192503929, 0.07139089703559875, 0.004826415330171585, -0.0051588574424386024, -0.03326021134853363, 0.026531266048550606, -0.010606097988784313, 0.0025453835260123014, 0.01204801443964243, 0.03524685278534889, 0.0017272960394620895, -0.01884104497730732, 0.017126765102148056, 0.028197482228279114, 0.04848044365644455, 0.0024532610550522804, 0.01977027952671051, -0.02787705510854721, 0.015196199528872967, 0.002819748129695654, 0.015148135833442211, -0.015981243923306465, 0.010918513871729374, 0.04857657104730606, -0.0004981621750630438, -0.021372409537434578, -0.0115113016217947, -0.030985187739133835, 0.008507308550179005, 0.06004782021045685, -0.013634122908115387, 0.05187695845961571, 0.03867540881037712, 0.0062402947805821896, -0.011623450554907322, -0.022477878257632256, 0.024833008646965027, -0.010710236616432667, -0.009436543099582195, -0.049089252948760986, -0.0017743585631251335, 0.04389835149049759, -0.015364423394203186, -0.027300288900732994, 0.01317751593887806, 0.01757536269724369, 0.0036488501355051994, -0.007017327938228846, -0.05130019038915634, 0.003917207010090351, 0.020715536549687386, 0.002058736514300108, -7.359783194260672e-05, 0.017431169748306274, -0.014675507321953773, 0.009829064831137657, 0.012128121219575405, 0.03704123571515083, 0.01840846985578537, 0.003957260400056839, 0.026435138657689095, -0.04607724770903587, 0.008811713196337223, 0.015172167681157589, -0.008234946057200432, -0.00813881866633892, -0.007710248697549105, 0.001800393220037222, 0.04130290076136589, -0.04646176099777222, 0.019481895491480827, 0.0011084733996540308, -0.013049345463514328, 0.04921742156147957, -0.00652066757902503, 0.005715597420930862, -0.05267802253365517, 0.03579157590866089, 0.0029038600623607635, -0.03790638595819473, 0.006568731274455786, 0.030328314751386642, 0.005911858286708593, -0.007025338243693113, -0.018600724637508392, 0.021612728014588356, -0.014515294693410397, 0.0012666836846619844, 0.006528678350150585, 0.0037049248348921537, 0.011086736805737019, -0.0011004627449437976, -0.017030637711286545, 0.0350225530564785, -0.008194892667233944, -0.01320955902338028, 0.0062683322466909885, -0.06876340508460999, -0.039348304271698, -0.018600724637508392, -0.012424515560269356, -0.029863696545362473, 0.027124054729938507, -0.014371102675795555, -0.01461943332105875, 0.02654728852212429, 0.032539252191782, 0.0162135511636734, -0.016469892114400864, 0.038995835930109024, 0.02738039568066597, 0.0009702897514216602, -0.01747923344373703, -0.043481796979904175, 0.011030662804841995, 0.01927362009882927, -0.00276567623950541, -0.017559340223670006, 0.007994626648724079, -0.014050676487386227, 0.033708807080984116, 0.03861132264137268, 0.03688102588057518, 0.01877695880830288, -0.014379112981259823, -0.016165487468242645, 0.015228241682052612, -0.0358877032995224, -0.019594045355916023, 0.0035947782453149557, -0.0546967051923275, 0.036240171641111374, 0.023807646706700325, -0.006276343017816544, 0.07741490006446838, -0.011583397164940834, -0.02774888463318348, 0.05046708509325981, 0.03889970853924751, 0.0451800562441349, -0.008182876743376255, 0.0068170614540576935, -0.0032363019417971373, -0.02026693895459175, -0.039027877151966095, 0.022509921342134476, -0.008875798434019089, -0.045372311025857925, -0.02438441291451454, -0.02286238968372345, 0.0064165289513766766, -0.03193044289946556, -0.03931625932455063, 0.03165808320045471, 0.04332158342003822, 0.016109412536025047, 0.02375958301126957, 0.013970570638775826, -0.01784772425889969, -0.021051982417702675, -0.030744867399334908, 0.010437874123454094, 0.01840846985578537, 0.04841635748744011, 0.01036577858030796, -0.01747923344373703, -0.03335633873939514, 0.020443174988031387, 0.014010624028742313, -0.026659436523914337, -0.015540657564997673, 0.015708880499005318, 0.0032282911706715822, 0.037137363106012344, 0.025794286280870438, 0.0066408272832632065, 0.027796948328614235, -0.014635453931987286, -0.012857090681791306, -0.01249661110341549, 0.002090779133141041, 0.020587366074323654, -0.012969239614903927, 0.0460452064871788, -0.009620788507163525, -0.025858372449874878, 0.009789012372493744, 0.05271006375551224, 0.051652658730745316, -0.0007580075762234628, 0.014859752729535103, 0.013730251230299473, 0.015164157375693321, 0.0033104002941399813, -0.010902492329478264, -0.021644771099090576, -0.026803629472851753, -0.014299007132649422, -0.006712923292070627, -0.04322545602917671, -0.010509970597922802, -0.037169408053159714, 0.0047663357108831406, -0.0134578887373209, -0.011527322232723236, -0.021180152893066406, -0.006372470408678055, -0.014034655876457691, 0.00519891083240509, -0.01943383179605007, 0.009756969287991524, 0.011591407470405102, 0.020843707025051117, -0.030744867399334908, 6.59626821288839e-05, -0.03380493447184563, 0.026707500219345093, 0.04072613641619682, 0.013650144450366497, -0.01917749084532261, 0.034413743764162064, -0.02657932974398136, -0.00330238975584507, -0.008947893977165222, -0.01486776303499937, 0.003454592078924179, -0.008507308550179005, 0.012809026055037975, 0.04018140956759453, -0.002355130622163415, 0.01754331961274147, -0.001629165606573224, 0.004079422447830439, 0.013554017059504986, 0.023471198976039886, 0.003899182891473174, 0.0012456558179110289, -0.0179438516497612, -0.027396416291594505, 0.0008346093818545341, 0.040982477366924286, 0.03681693971157074, 0.021612728014588356, 0.011639472097158432, 0.0011945879086852074, -0.0015360417310148478, 0.0015330377500504255, -0.023551305755972862, -0.03422148898243904, 0.005094772204756737, 0.02295851707458496, -0.02212540991604328, 0.022509921342134476, -0.02007468417286873, 0.005122809670865536, 0.002571417950093746, 0.01611742377281189, 0.04380222409963608, -0.013882453553378582, 0.02459269016981125, 0.020923813804984093, 0.026403095573186874, -0.0022269601467996836, 0.000335195567458868, -0.010598087683320045, 0.03438170254230499, 0.03861132264137268, -0.021917132660746574, -0.003610799554735422, 0.01236043032258749, -0.005591432563960552, 0.020923813804984093, 0.012817037291824818, 0.02568213827908039, -0.011847748421132565, -0.029991867020726204, 0.01317751593887806, -0.006468598265200853, -0.028726184740662575, -0.02515343576669693, 0.05633087828755379, 0.018857065588235855, -0.05444036424160004, -0.04851248487830162, -0.03399718925356865, 0.007461918983608484, -0.005186894908547401, 0.021837027743458748, -0.01556468941271305, -0.009484607726335526, -0.032715488225221634, -0.04046979546546936, 0.002489308826625347, -0.046397674828767776, -0.015492593869566917, 0.03338837996125221, -0.006424539722502232, -0.005347107537090778, 0.011575386859476566, -0.01701461710035801, -0.01813610829412937, -0.008811713196337223, -0.06424539536237717, -0.007546030450612307, 0.025890415534377098, 0.027620714157819748, 0.004698245320469141, -0.020058663561940193, -0.01107872650027275, 0.027796948328614235, 0.0011054694186896086, -0.02239777147769928, -0.02335904911160469, 0.0071975672617554665, 0.03854724019765854, -0.008042690344154835, -0.00912412814795971, -0.021772941574454308, 0.022509921342134476, -0.0013517969055101275, -0.025842351838946342, 0.004313733894377947, -0.02057134360074997, -0.009764980524778366, 0.0015520630404353142, 0.019658129662275314, 0.0028037268202751875, -0.047134652733802795, -0.0011425187112763524, 0.015885114669799805, -0.008603435941040516, 0.022638091817498207, -0.013842400163412094, 0.04947376251220703, 0.022189496085047722, 0.01633371226489544, -0.03704123571515083, -0.00385912973433733, -0.0036168077494949102, 0.03479825705289841, -0.035471148788928986, 0.038162726908922195, 0.029783589765429497, 0.004946575034409761, 0.017767617478966713, 0.013866432011127472, -0.02505730651319027, -0.016918489709496498, 0.0009492618264630437, -0.008491287007927895, -0.05187695845961571, 0.023999901488423347, 0.004618138540536165, -0.015885114669799805, 0.03109733574092388, 0.026531266048550606, -0.01584506221115589, -0.0697246789932251, -0.017190851271152496, -0.020987898111343384, 0.00714549794793129, -0.027925118803977966, -0.011471248231828213, 0.09426930546760559, -0.007850435562431812, 0.05770871043205261, 0.025537947192788124, -0.029126716777682304, -0.0500505305826664, -0.018056001514196396, -0.033548593521118164, -0.02608267031610012, 0.018792981281876564, -0.05219738185405731, -0.06273939460515976, 0.005254985298961401, 0.031241528689861298, 0.025009242817759514, 0.02468881756067276, 0.008459244854748249, -0.0013247609604150057, -0.008763649500906467, -0.04652584344148636, -0.011311035603284836, -0.04732690751552582, -0.01930566132068634, -0.00681305630132556, -0.0016531975707039237, -0.004538032226264477, -0.03591974452137947, 0.03790638595819473, 0.013938527554273605, -0.02193315513432026, 0.019481895491480827, 0.027732864022254944, 0.01671021245419979, -0.015236252918839455, 0.005623475182801485, 0.029655419290065765, -0.0292388666421175, -0.01964210905134678, -0.031017228960990906, -0.032715488225221634, 0.02146853692829609, 0.028005225583910942, -0.01079835370182991, 0.0535111278295517, 0.0030120036099106073, 0.017831703647971153, 0.011391141451895237, -0.036368343979120255, 0.0010734267998486757, 0.008038685657083988, -0.02276626229286194, 0.0015190191334113479, -0.03688102588057518, 0.008875798434019089, 0.008499297313392162, 0.038995835930109024, 0.004550048150122166, 0.05274210870265961, -0.023743560537695885, -0.05546572804450989, 0.0009392484789714217, 0.014939858578145504, -0.014515294693410397, 0.0023931812029331923, 0.012985260225832462, -0.004445909522473812, -0.0358877032995224, 0.03960464522242546, 0.030552612617611885, 0.022974539548158646, -0.03656059876084328, 0.027828991413116455, 0.02914273738861084, -0.018600724637508392, -0.013898474164307117, 0.02654728852212429, -0.025858372449874878, 0.001161544001661241, 0.0031201473902910948, 0.013714229688048363, 0.021244239062070847, 0.037361662834882736, -0.0353429801762104, 0.0015090059023350477, -0.04014936834573746, 0.014875773340463638, -0.02524956315755844, 0.004165537189692259, -0.00980503298342228, 0.005347107537090778, -0.004862463567405939, -0.02963939867913723, 0.005383155774325132, 0.010421853512525558, -0.013970570638775826, -0.012664834968745708, -0.024400433525443077, -0.0037189433351159096, 0.014731582254171371, 0.001091450802050531, -0.015388455241918564, 0.0028738200198858976, -0.019882429391145706, -0.010806364007294178, 0.0405338779091835, 0.002343114698305726, -0.025233542546629906, 0.008907840587198734, 0.00686913076788187, 0.02369549684226513, 0.020122747868299484, -0.02110004797577858, 0.02824554592370987, -0.05405585467815399, -0.022574005648493767, -0.016630105674266815, 0.01051798090338707, 0.028934461995959282, 0.0005767666734755039, 0.0062523107044398785, 0.009116117842495441, -0.007081413175910711, 0.005242969375103712, 0.027492543682456017, -0.030889058485627174, 0.008210914209485054, -0.059727393090724945, -0.01784772425889969, 0.010021320544183254, 0.04642971605062485, -0.018088042736053467, -0.0030680783092975616, -0.010165512561798096, -0.017735574394464493, -0.00965283066034317, -0.017895787954330444, 0.014907816424965858, -0.0350225530564785, 0.01834438368678093, 0.016966553404927254, 0.0005011661560274661, 0.05668334662914276, 0.021420473232865334, 0.005230953451246023, -0.03867540881037712, -0.00900396890938282, -0.015596731565892696, -0.003919209819287062, 0.032411083579063416, -0.06100909784436226, 0.02927090786397457, -0.02861403487622738, 0.020379088819026947, -0.014643465168774128, 0.051652658730745316, -0.021708857268095016, -0.006140161771327257, -0.022237559780478477, 0.039893027395009995, -0.018216213211417198, -0.022077346220612526, 0.01717482879757881, -0.00730170588940382, -0.03255527466535568, 0.0034225494600832462, -0.04293707385659218, -0.00033619688474573195, -0.0055193365551531315, -0.012993271462619305, 0.021212195977568626, -0.036176085472106934, -0.002222954761236906, 0.030392399057745934, -0.03128959238529205, 0.014699539169669151, 0.0029078652150928974, -0.02193315513432026, -0.023439155891537666, 0.02818145975470543, -0.01319353748112917, -0.002959934528917074, -0.014971901662647724, 0.0033344323746860027, 0.01837642677128315, 0.03438170254230499, -0.03700919449329376, -0.02259002812206745, 0.00044834596337750554, -0.005579416640102863, 0.0016281642019748688, -0.0016912480350583792, -0.015853073447942734, -0.020058663561940193, 0.014979911968111992, -0.011303024366497993, -0.00801465380936861, 0.0068330829963088036, -0.007449902594089508, -0.0002998986456077546, -0.010285671800374985, -0.0215646643191576, -0.011527322232723236, 0.03944443166255951, -0.019914470613002777, 0.016998594626784325, -0.010125459171831608, -0.011791674420237541, -0.02561805211007595, 0.022702176123857498, 0.0028658094815909863, -0.01757536269724369, -0.021292302757501602, -0.004237632732838392, -0.002033703261986375, 0.01389046385884285, 0.009028000757098198, 0.026306968182325363, 0.007622131612151861, -0.002377159893512726, 0.017270958051085472, 0.021051982417702675, -0.006925205234438181, -0.00980503298342228, 0.00029664431349374354, 0.004742303863167763, 0.029286930337548256, -0.037233494222164154, 0.01473959255963564, -0.0009117118897847831, 0.01441916637122631, -0.0003759998071473092, 0.019674152135849, 0.023711519315838814, -0.02654728852212429, -0.020475216209888458, -0.008387148380279541, -0.010293683037161827, 0.021724877879023552, 0.05552981421351433, -0.04242439195513725, -0.020555322989821434, -0.03518276661634445, 0.02342313528060913, 0.001486976514570415, 0.0031241527758538723, 0.017751596868038177, -0.007582078687846661, -0.003432562807574868, -0.016189519315958023, -0.03492642566561699, 0.01441916637122631, -0.006564726121723652, 0.011903823353350163, -0.025377733632922173, -0.02754060924053192, -0.015508614480495453, -0.004698245320469141, 0.010173522867262363, 0.015620764344930649, 0.05312661826610565, -0.018023958429694176, 0.015796998515725136, -0.030232185497879982, -0.016261614859104156, 0.03152991086244583, -0.006003980990499258, -0.007517993450164795, -0.01787976734340191, -0.0025373727548867464, -0.0009117118897847831, -0.00413749972358346, -0.028037268668413162, 0.002335103927180171, 0.01348993182182312, 0.025441817939281464, -0.019594045355916023, -0.013746271841228008, -0.005975943524390459, 0.000650364498142153, -0.03393310680985451, -0.04130290076136589, 0.008763649500906467, 0.011238939128816128, 0.003861132310703397, 0.0004448413092177361, 0.03508663922548294, -0.05213329941034317, 0.03177022933959961, -0.006148172542452812, 0.01364213414490223, -0.00686913076788187, 0.00829102098941803, -0.02947918511927128, 0.0038711456581950188, -0.003384498879313469, 0.010301693342626095, -0.02119617536664009, -0.017719553783535957, -0.008242957293987274, -0.026403095573186874, 0.020587366074323654, -0.046205420047044754, -0.0232949648052454, -0.023679476231336594, -0.016317689791321754, -0.026627395302057266, 0.0024833008646965027, -0.009604766964912415, -0.0008015654748305678, -0.01980232261121273, -0.011639472097158432, -0.014427177608013153, 0.0022670135367661715, 0.014691528864204884, -0.0024712849408388138, -0.017335042357444763, 0.012288333848118782, -0.01596522144973278, -0.032443124800920486, 0.022686155512928963, 0.022141432389616966, 0.02601858600974083, 0.00039903042488731444, 0.02651524543762207, 0.049794189631938934, -0.035663407295942307, 0.017495255917310715, -0.0055473740212619305, -0.007469929289072752, 0.029895739629864693, -0.015524636022746563, -0.02638707496225834, -0.00608809245750308, 0.021292302757501602, 0.0039352308958768845, 0.00015032482042443007, 0.02010672725737095, 0.03611200302839279, 0.005583421792834997, -0.011206896975636482, 0.020587366074323654, -0.02366345375776291, -0.009596756659448147, 0.0176714900881052, -0.006160188466310501, 0.00013993600441608578, 0.01980232261121273, 0.010686204768717289, 0.017335042357444763, 0.016437850892543793, 0.04505188390612602, 0.03739370405673981, -0.04562865197658539, -0.0032463150564581156, 0.04409060627222061, 0.018760938197374344, -0.004722277168184519, 0.015700871124863625, -0.018392447382211685, 0.008234946057200432, -0.01373826153576374, 0.020923813804984093, 0.02295851707458496, 0.02029898203909397, 0.007802371401339769, 0.008435212075710297, -0.0048063891008496284, -0.013369771651923656, 0.02901456691324711, 0.0026575324591249228, 0.0018194185104221106, -0.018792981281876564, -0.04684627056121826, -0.030584653839468956, -0.01701461710035801, -0.0010634135687723756, 0.004638165235519409, -0.011575386859476566, -0.007970594801008701, -0.022445837035775185, 0.031978506594896317, -0.03348451107740402, -0.0030320303048938513, 0.006180215161293745, -0.03492642566561699, -0.007538020145148039, -0.018696852028369904, -0.03678489476442337, 0.0023611385840922594, 0.020987898111343384, -0.0012837063986808062, -0.009011979214847088, -0.014274975284934044, 0.009468586184084415, -0.018264276906847954, 0.010766311548650265, -0.019225556403398514, -0.014018634334206581, 0.0474550798535347, 0.008002637885510921, -0.014451209455728531, -0.001399860717356205, 0.01961006596684456, -0.006556715350598097, -0.016774296760559082, 0.017863744869828224, -0.007926536723971367, -0.04245643690228462, -0.039059922099113464, 0.02917478047311306, 0.02292647585272789, -0.010109437629580498, -0.030264228582382202, -0.01553264632821083, -0.002415210474282503, 0.009644820354878902, -0.0024232210125774145, 0.03591974452137947, 0.015332380309700966, -0.02249390073120594, 0.0038210791535675526, 0.015612753108143806, 0.038194771856069565, -0.011327056214213371, 0.003200253937393427, 0.014066698029637337, 0.002589442068710923, 0.007914520800113678, 0.03438170254230499, -0.03393310680985451, -0.00763414753600955, 0.006921200081706047, -0.04953784868121147, -0.0089719258248806, -0.002080765785649419, 0.013257622718811035, 0.005659522954374552, 0.0008851766469888389, -0.016598062589764595, 0.00043107301462441683, 0.022814325988292694, 0.050691381096839905, -0.015492593869566917, -0.007530009374022484, -0.023134751245379448, 0.025569988414645195, -0.00365085294470191, 0.012592738494277, 0.030857017263770103, -0.015572699718177319, -0.004493973683565855, -0.020411131903529167, -0.007890488021075726, 0.022221537306904793, -0.00392922293394804, -0.017335042357444763, -0.046301547437906265, -0.042808905243873596, -0.01877695880830288, -0.017719553783535957, 0.01813610829412937, 0.014955880120396614, 0.014995933510363102, -0.008731606416404247, -0.022686155512928963, -0.012200216762721539, -0.008667521178722382, -0.05319070443511009, 0.021692834794521332, 0.026066649705171585, -0.01606134884059429, -0.0058998423628509045, -0.04203988239169121, 0.0006533684791065753, 0.003138171508908272, 0.004497978836297989, 0.02379162423312664, 0.0007590089226141572, 0.03229893371462822, -0.005875810515135527, -0.014723571017384529, -0.009476596489548683, -0.003939236048609018, -0.014347070828080177, 0.00923627708107233, 0.004509994760155678, -0.006528678350150585, 0.03473417088389397, -0.022205516695976257, -0.015676839277148247, 0.012961228378117085, -0.017895787954330444, 0.007013322319835424, 0.026435138657689095, -0.01648591458797455, -0.019962534308433533, 0.02339109219610691, 0.0005692566628567874, -0.03390106186270714, 0.02678760699927807, -0.005811725277453661, 0.0070934290997684, 0.006404513027518988, 0.016870424151420593, -0.014875773340463638, 0.00026810637791641057, -0.05860590189695358, 0.018360406160354614, -0.016077371314167976, 0.024833008646965027, -0.016469892114400864, -0.023951837792992592, -0.009716915898025036, 0.023743560537695885, -0.02558601088821888, -0.022718198597431183, -0.00490251649171114, 0.006036023609340191, 0.03483029827475548, -0.00034871354000642896, 0.01596522144973278, -0.005999975372105837, -0.002311072079464793, 0.0024953167885541916, 0.05040299892425537, 0.00568355480208993, -0.012584728188812733, 0.006356449332088232, -0.013345739804208279, -0.021612728014588356, -0.011487269774079323, 0.01651795580983162, -0.015252274461090565, -0.040021199733018875, 0.005775677505880594, -0.00994922500103712, 0.0431293286383152, 0.014699539169669151, 0.05094772204756737, 0.020907791331410408, 0.008763649500906467, -0.00252135144546628, -0.03060067631304264, 0.007550036069005728, 0.0031221501994878054, -0.015644796192646027, -0.020619409158825874, 0.03950851783156395, -0.019946513697504997, 0.02781297080218792, -0.011687535792589188, 0.047262825071811676, -0.005299043841660023, 0.01093453448265791, 0.027700820937752724, 0.013666165992617607, 0.0027496549300849438, 0.017335042357444763, -0.004381824750453234, 0.020010599866509438, 0.00040829271893016994, -0.024448499083518982, -0.006941226776689291, 0.013409825041890144, 0.004205590113997459, -0.008170860819518566, -0.002459269016981125, -0.0143230389803648, -0.019978556782007217, 0.01302531361579895, 0.00829102098941803, 0.049025166779756546, 0.017270958051085472, 0.0025473861023783684, 0.00815484020859003, -0.023487219586968422, -0.026627395302057266, -0.02289443276822567, -0.014939858578145504, 0.03358063846826553, -0.030392399057745934, 0.002881830558180809, 0.03479825705289841, 0.02119617536664009, 0.006897168233990669, 0.007782344706356525, -0.0593428798019886, 0.013842400163412094, -0.01081437524408102, 0.040918391197919846, -0.03973281383514404, 0.0021969203371554613, 0.007946562953293324, 0.015628773719072342, 0.02648320235311985, -0.007766323164105415, 0.011671514250338078, -0.04870473966002464, -0.010357768274843693, -0.02103596180677414, -0.008523330092430115, 0.007694227620959282, 0.009428532794117928, 0.02883833274245262, -0.004285696893930435, 0.012945207767188549, -0.017831703647971153, -0.025890415534377098, 0.016806339845061302, -0.0051588574424386024, -0.019562002271413803, -0.045500483363866806, 0.0011395147303119302, 0.015043997205793858, 0.0043978458270430565, 0.002739641582593322, -0.02063542976975441, -0.00880370195955038, 0.02499322220683098, -0.04383426532149315, 0.051556531339883804, -0.0017503265989944339, -0.006789024453610182, 0.0018294317414984107, 0.007846429944038391, 0.01933770440518856, -0.01747923344373703, -0.007477940060198307, -0.002979961223900318, -0.009316383861005306, -0.006284353323280811, -0.011343077756464481, 0.017190851271152496, -0.019449854269623756, -0.019529961049556732, -0.01236043032258749, 0.01986640691757202, 0.0021148112136870623, 0.015700871124863625, 0.011767642572522163, 0.021837027743458748, -0.013786325231194496, 0.03386902064085007, 0.02930295094847679, 0.021148111671209335, -0.043385669589042664, -0.0062883589416742325, -0.018857065588235855, -0.009628798812627792, 0.02283034659922123, 0.004301717970520258, -0.009893150068819523, 0.001577096409164369, 0.04412265121936798, -0.01219220645725727, -0.00010075893078465015, 0.021837027743458748, -0.02704394795000553, 0.0014689526287838817, 0.0016642122063785791, 0.026226861402392387, 0.015620764344930649, 0.006600773893296719, -0.01488378457725048, 0.01590113714337349, -0.016566019505262375, 0.0003912700922228396, -0.0021308325231075287, 0.01189581211656332, -0.05716398358345032, 0.015180177986621857, -0.03611200302839279, -0.019225556403398514, 0.022445837035775185, -0.023615390062332153, 0.03569544851779938, -0.005895837210118771, 0.0068450989201664925, 0.011695546098053455, -0.018424490466713905, -0.020587366074323654, -0.008074733428657055, 0.005891831591725349, -0.008939883671700954, -0.006184220314025879, 0.017302999272942543, 0.009781001135706902, -0.006156183313578367, -0.00408342806622386, -0.0070293438620865345, -0.003931225743144751, 0.021404452621936798, 0.01977027952671051, -0.027396416291594505, 0.013570037670433521, 0.010854428634047508, 0.011038673110306263, -0.0031862352043390274, -0.013570037670433521, -0.0012917170533910394, -0.037201449275016785, -0.025537947192788124, -0.045308224856853485, -0.028085332363843918, 0.017831703647971153, -0.02598654292523861, 0.01587710529565811, -0.01377030462026596, -0.019065342843532562, 0.03161001577973366, 0.009052032604813576, -0.03396514803171158, -0.006408518645912409], "index": 36}, {"title": "Dale Reid", "text": "Dale Reid OBE (born 20 March 1959) is a Scottish professional golfer from Ladybank, Fife. She is one of the most successful players in the history of the Ladies European Tour, with 21 tournament victories. She topped the Order of Merit in 1984 and 1987 and was made a life member of the tour after collecting her 20th title at the 1991 Ford Classic. She played for Europe in the first four Solheim Cups (1990, 1992, 1994 and 1996) and was Europe's non-playing captain in 2000 and 2002.", "vector": [0.05349265784025192, -0.01442507840692997, -0.02503391169011593, 0.022082030773162842, -0.033432912081480026, 0.02674632892012596, 0.030317943543195724, -0.014147830195724964, 0.007758881896734238, 0.03020378202199936, -0.047654129564762115, 0.01658598706126213, 0.012606654316186905, -0.0024646578822284937, -0.01751558482646942, -0.0060953907668590546, -0.03103552758693695, 0.009899403899908066, -0.05251413583755493, -0.050589703023433685, 0.03193250671029091, 0.013095916248857975, 0.03477022796869278, 0.0027887942269444466, 0.01999451220035553, 0.032552238553762436, 0.006637656129896641, -0.002529892837628722, -0.004484903067350388, 0.030790897086262703, 0.05029614642262459, 0.02762700244784355, 0.02041853964328766, -0.0036633501295000315, -0.02963297627866268, 0.015860246494412422, -0.03538995981216431, -0.01761343702673912, 0.011041015386581421, 0.05531923845410347, 0.0009168568649329245, 0.021038271486759186, -0.031948816031217575, 0.004203577060252428, 0.009711853228509426, -0.010910545475780964, -0.0024483492597937584, 0.019228002056479454, -0.0023953458294272423, 0.04990473762154579, -0.021462298929691315, 0.02474035508930683, -0.01756451092660427, 0.058091722428798676, -0.029714519158005714, 0.011057323776185513, 0.033530764281749725, 0.06308219581842422, -0.03379170596599579, 0.02637122943997383, 0.012549573555588722, -0.013381319120526314, -0.02867075987160206, 0.002778601134195924, 0.04833909869194031, -0.02739867940545082, -0.00852946937084198, 0.015762394294142723, -0.02987760677933693, 0.010323431342840195, -0.02152753435075283, -0.04100016504526138, -0.029665593057870865, 0.053949303925037384, 0.011693364940583706, 0.022946393117308617, -0.002660362748429179, 0.022538674995303154, -0.008578396402299404, -0.0394345261156559, 0.00607092771679163, -0.0038712865207344294, -0.016064107418060303, 0.011783063411712646, 0.04768674820661545, -0.07143227010965347, 0.04948071017861366, -0.08128274977207184, 0.03503116965293884, -0.002195563865825534, -0.016186421737074852, 0.0040078721940517426, 0.05988568440079689, 0.04948071017861366, 0.015419911593198776, -0.04628419876098633, -0.029649285599589348, -0.015819475054740906, 0.0051127891056239605, 0.011530277319252491, -0.037020836025476456, 0.01999451220035553, 0.03066042624413967, 0.023272568359971046, 0.008814872242510319, 0.020255452021956444, -0.03555304929614067, -0.02240820601582527, 0.0040690298192203045, 0.04621896147727966, 0.005532739218324423, -0.010241887532174587, -0.10528921335935593, -0.04618634656071663, -0.05336219072341919, -0.0022179882507771254, -0.030513647943735123, 0.0260450541973114, -0.0029029552824795246, -0.0024993140250444412, -0.036368485540151596, -0.045468758791685104, 0.0390431173145771, 0.0015676773618906736, 0.04325077310204506, 0.005055708810687065, 0.001452496973797679, 0.009271517395973206, 0.03274794667959213, -0.009214436635375023, -0.013291621580719948, 0.009328598156571388, -0.018852900713682175, 0.007921969518065453, 5.5870168580440804e-05, 0.06973616033792496, 0.004117956385016441, -0.016015179455280304, 0.03309042751789093, 0.04687131196260452, 0.053623128682374954, 0.012060311622917652, 0.030676735565066338, 0.015901019796729088, -0.023827064782381058, -0.05140513926744461, 0.015501455403864384, 0.03535734489560127, 0.03799935802817345, 0.0056346687488257885, 0.017042631283402443, 0.052220579236745834, 0.03927144035696983, -0.0179885383695364, 0.012468029744923115, 0.0028703378047794104, -0.03356338292360306, 0.02250605821609497, -0.05639561638236046, -0.004525674507021904, -0.01137534435838461, 0.07854288071393967, -0.008586550131440163, 0.022342970594763756, -0.029893916100263596, 0.040380433201789856, -0.061125148087739944, 0.05313386768102646, -0.033856939524412155, 0.03382432088255882, -0.03057888336479664, 0.008586550131440163, 0.015411756932735443, -0.033253517001867294, 0.04445761814713478, 0.030285324901342392, 0.04540352523326874, -0.006890441756695509, 0.035585664212703705, -0.039304058998823166, -0.006234014872461557, -0.015615615993738174, -0.02213095687329769, -0.04563184827566147, -0.0195704847574234, 0.012989909388124943, 0.05633037909865379, -0.022440822795033455, 0.0019723379518836737, -0.010608834214508533, 0.060929443687200546, 0.02275068871676922, 0.0197661891579628, 0.008945342153310776, -0.030741970986127853, 0.029665593057870865, -0.03224237263202667, -0.001264946418814361, -0.02097303606569767, -0.014221219345927238, 0.030187472701072693, -0.013666721992194653, -0.0008088114554993808, 0.008064670488238335, 0.017124174162745476, -0.004030296579003334, 0.003932444378733635, 0.003039540955796838, 0.015460683032870293, -0.044718559831380844, 0.017743906006217003, 0.011937996372580528, 0.057113200426101685, 0.015175280161201954, -0.03131277486681938, 0.03552043065428734, -0.025751497596502304, 0.03519425541162491, 0.014408770017325878, -0.04948071017861366, -0.03770580142736435, -0.03503116965293884, -0.02955143339931965, -0.019211692735552788, 0.01723833568394184, 0.07208462059497833, -0.044620707631111145, -0.05036138370633125, -0.024381563067436218, -0.041554663330316544, 0.005275876726955175, 0.01500403881072998, 0.04067399352788925, 0.020565317943692207, -0.0390431173145771, 0.03692298382520676, 0.019309544935822487, -0.032976265996694565, 0.053753599524497986, -0.02955143339931965, -0.009467221796512604, 0.0042158085852861404, 0.02870337851345539, -0.004961933474987745, 0.00687413290143013, 0.007844503037631512, 0.023990152403712273, -0.015615615993738174, -0.01418860163539648, 0.00025291283964179456, 0.001114090671762824, -0.015379139222204685, 0.015379139222204685, -0.008297069929540157, 0.023973844945430756, -0.03574875369668007, -0.013365010730922222, 0.005822219420224428, 0.06269078701734543, -0.015998871996998787, 0.01433537993580103, -0.018102698028087616, -0.048404332250356674, 0.04321815446019173, 0.01097578089684248, -0.017368806526064873, -0.06784434616565704, -0.013226386159658432, 0.053851451724767685, -0.03998902440071106, -0.007367472164332867, -0.0325685478746891, -0.009214436635375023, 0.030725661665201187, 0.0230279378592968, 0.00050557084614411, -0.002847913419827819, -0.007860811427235603, -0.016137495636940002, -0.0007889351691119373, 0.030970292165875435, -0.013291621580719948, -6.569681772816693e-06, -0.05029614642262459, -0.054732125252485275, -0.036009691655635834, -0.007253311108797789, 0.004117956385016441, 0.047980304807424545, 0.007881197147071362, -0.029665593057870865, 0.07188891619443893, 0.010527290403842926, 0.0012323289411142468, 0.030122239142656326, 0.033155664801597595, -0.01989666000008583, -0.02200048789381981, 0.0010223540011793375, -0.00904319528490305, -0.047980304807424545, 0.007587640080600977, -0.03137801215052605, -0.020304378122091293, -0.05120943486690521, -0.021217668429017067, -0.021266594529151917, 0.0016736842226237059, -0.026909416541457176, -0.01288390252739191, -0.04514258727431297, 0.008961651474237442, 0.04031519964337349, -0.022815924137830734, 0.022587601095438004, 0.017222026363015175, 0.012027693912386894, -0.0038447848055511713, 0.004109801724553108, -0.04100016504526138, 0.061581794172525406, 0.032829489558935165, 0.017841758206486702, 0.023451965302228928, 0.05770031362771988, -0.034737613052129745, 0.030872439965605736, 0.009638464078307152, 0.0061565483920276165, -0.016618603840470314, -0.021967869251966476, -0.016064107418060303, -0.001248637679964304, 0.009010577574372292, 0.015232360921800137, 0.005532739218324423, -0.06520233303308487, 0.02694203518331051, -0.035259488970041275, -0.023337803781032562, -0.01171782799065113, 0.008782255463302135, 0.01803746446967125, 0.019537867978215218, -0.01882028393447399, -0.03346553072333336, 0.017042631283402443, -0.02069578878581524, -0.021331828087568283, -0.011571049690246582, 0.0008393903262913227, -0.01678169146180153, 0.011334572918713093, 0.025082837790250778, 0.001830655848607421, 0.00812990590929985, 0.019162766635417938, -8.893358608474955e-05, 0.017075248062610626, 0.011407962068915367, 0.05140513926744461, -0.020989345386624336, -0.059526894241571426, 0.02917633205652237, -0.0030069234780967236, -0.002379037206992507, 0.03535734489560127, 0.02343565598130226, -0.013014372438192368, 0.005846682470291853, -0.007909737527370453, -0.02343565598130226, -0.012916520237922668, -0.0358792245388031, -0.021967869251966476, -0.017319878563284874, -0.03542257845401764, -0.03173680230975151, -0.0009413199732080102, -0.0018816206138581038, -0.008505006320774555, 0.07756435871124268, -0.07012756913900375, 0.01924430951476097, 0.024772971868515015, -0.03336767852306366, 0.0427941270172596, -0.007273696828633547, 0.0036021925043314695, -0.029910225421190262, 0.0030232323333621025, 0.01102470699697733, -0.022848540917038918, -0.0061116996221244335, 0.01113886758685112, 0.02004343830049038, 0.04295721650123596, 0.04034781828522682, 0.00871702004224062, 0.0031088530085980892, -0.04400097578763962, -0.0523836649954319, -0.016545213758945465, -0.05094849690794945, -0.003485992783680558, -0.05290554463863373, 0.026273377239704132, -0.022799614816904068, 0.038423385471105576, 0.05003520846366882, 0.011587358079850674, -0.02144598960876465, 0.00578960170969367, -0.029584050178527832, 0.017319878563284874, -0.006853747181594372, 0.03992379084229469, -0.003720430890098214, -0.0228322334587574, -0.01263111736625433, 0.005536816548556089, 0.007016834337264299, -0.01691216044127941, 0.007974972948431969, -0.008158446289598942, 0.05985306575894356, 0.010486518032848835, 0.0162353478372097, 0.009100276045501232, 0.009304135106503963, -0.0587114542722702, -0.036140162497758865, -0.022473439574241638, 0.044392384588718414, -0.024169549345970154, -0.03454190492630005, -0.03649895638227463, -0.010486518032848835, 0.020190216600894928, 0.08245697617530823, 0.015509609133005142, 0.013780883513391018, -0.018852900713682175, -0.001851041684858501, 0.0005799795035272837, 0.03812982887029648, 0.008309301920235157, 0.02955143339931965, 0.023696595802903175, 0.028034720569849014, -0.030774587765336037, 0.014449541456997395, 0.012826821766793728, 0.004362587351351976, 0.029763447120785713, 0.013674876652657986, -0.03992379084229469, 0.041228488087654114, -0.026648476719856262, 0.012614808976650238, -0.02353350818157196, 0.01984773389995098, 0.03235653415322304, 0.0039365217089653015, -0.022245118394494057, 0.026827873662114143, 0.0024646578822284937, -0.017499275505542755, -0.02162538655102253, -0.02995915152132511, 0.02717035636305809, 0.015582999214529991, -0.05280769243836403, -0.0009316366631537676, 0.005915994755923748, 0.012272325344383717, 0.04749104380607605, -0.03173680230975151, -0.0006599941989406943, 0.03878217935562134, 0.007811885327100754, -0.00787712074816227, -0.02619183249771595, 0.043544329702854156, 0.038521237671375275, -0.04778460040688515, 0.026305994018912315, -0.002062035957351327, -0.03388955816626549, 0.006454182788729668, -0.015264978632330894, 0.025947201997041702, -0.03326982632279396, -0.0044604395516216755, -0.016749072819948196, 0.004908930044621229, -0.029143713414669037, -0.022147266194224358, 0.010086954571306705, 0.009051349014043808, 0.04501211643218994, 0.047327958047389984, 0.022082030773162842, 0.029763447120785713, 0.010616987943649292, -0.023615052923560143, 0.01906491443514824, 0.022212501615285873, -0.034607142210006714, 0.04390312358736992, 0.05496044456958771, 0.018167933449149132, -0.05104634910821915, 0.003125161863863468, -0.008154368959367275, -0.014734944328665733, -0.034737613052129745, 0.006515340879559517, -0.007775190751999617, -0.02245713211596012, -0.017124174162745476, 0.008839336223900318, -0.010674068704247475, 0.025784114375710487, 0.015118199400603771, -0.01683061756193638, 0.012321251444518566, 0.017140483483672142, -0.022196192294359207, -0.008700711652636528, 0.025833040475845337, 0.014359843917191029, 0.03659680858254433, 0.005903763230890036, -0.02619183249771595, 0.030366869643330574, 0.019423706457018852, 0.0007874062284827232, 0.031165998429059982, -0.047230105847120285, 0.0007165651768445969, -0.004016026854515076, -0.015216052532196045, -0.06321267038583755, 0.002254683058708906, 0.0021629463881254196, -0.0015238476917147636, -0.004052721429616213, -0.008880107663571835, 0.011962459422647953, -0.02358243428170681, -0.02731713466346264, -0.06030971184372902, -0.014098904095590115, 0.030040694400668144, -0.004749919753521681, 0.013519943691790104, -0.008496852591633797, 0.003198551246896386, -0.05766769498586655, 0.04207654297351837, -0.05933118611574173, 0.019423706457018852, -0.013095916248857975, -0.02571887895464897, 0.01020926982164383, -0.008456080220639706, 0.050263527780771255, -0.03773842006921768, -0.011081786826252937, -0.03509640321135521, -0.03402002528309822, 0.01979880779981613, -0.04073922708630562, -0.006556112319231033, -0.0032637862022966146, -0.007175844628363848, -0.019162766635417938, 0.011660747230052948, 0.008472389541566372, -0.004733610898256302, -0.036564189940690994, -0.004839617758989334, -0.004016026854515076, -0.040804460644721985, 0.01007064525038004, 0.028344586491584778, 0.016373973339796066, -0.02195156179368496, -0.00929598044604063, -0.04967641457915306, -0.018755048513412476, 0.012215244583785534, -0.01723833568394184, 0.02968190237879753, 0.008064670488238335, 0.011986922472715378, 0.015949945896863937, 0.007453093305230141, -0.0032352458219975233, 0.011758599430322647, 0.01710786670446396, 0.01011141762137413, -0.011978767812252045, 0.00885564461350441, -0.008578396402299404, 6.513939297292382e-05, 0.025702569633722305, -0.0008439771481789649, -0.02385968342423439, 0.007110609672963619, -0.004855926614254713, -0.008337842300534248, 0.015256823971867561, 0.00706168357282877, -0.04719748720526695, -0.013740111142396927, 0.028556600213050842, -0.016422899439930916, -0.009459068067371845, -0.002915186807513237, -0.0020589781925082207, -0.0013424130156636238, -0.013927661813795567, 0.02553948387503624, 0.021788474172353745, 0.006849669851362705, -0.03565090149641037, 0.017678672447800636, 0.0012221360811963677, 0.026273377239704132, -0.017499275505542755, -0.017254645004868507, -0.023403039202094078, -0.04325077310204506, 0.008880107663571835, 0.020483775064349174, -0.04263104125857353, -0.00029024455579929054, -0.016520751640200615, 0.025702569633722305, 0.008272606879472733, 0.023174716159701347, -0.0017593051306903362, -0.020728405565023422, -0.013813501223921776, 0.04736057296395302, 0.009214436635375023, 0.003223014296963811, 0.0001818169403122738, 0.0059119174256920815, -0.014555548317730427, -0.007714033126831055, -0.00033152606920339167, -0.009548765607178211, -0.05988568440079689, 0.0044604395516216755, -0.03737962618470192, 0.03402002528309822, 0.01864088699221611, -0.0025319315027445555, 0.017140483483672142, 0.003329021157696843, -0.006356330588459969, 0.014408770017325878, -0.005491967312991619, -0.020010821521282196, 0.011220411397516727, 0.048176009207963943, 0.0051984102465212345, 0.011122559197247028, -0.00915735587477684, 0.004103686194866896, -0.02940465323626995, 0.02739867940545082, 0.010820847004652023, -0.017646053805947304, 0.035161636769771576, 0.0077384961768984795, 0.007995358668267727, -0.008170677348971367, 0.0063033271580934525, -0.01102470699697733, 0.007974972948431969, 0.024381563067436218, 0.0016482018399983644, -0.03015485592186451, 0.03155740723013878, -0.03936929255723953, 0.03415049612522125, -0.011636284179985523, -0.018167933449149132, 0.01137534435838461, 0.04899144917726517, 0.02242451347410679, 0.023451965302228928, -0.027692236006259918, -0.050491850823163986, -0.017368806526064873, -0.026485389098525047, -0.013870581053197384, -0.0003751009644474834, 0.059070248156785965, -0.002014129189774394, -0.006588730029761791, -0.02054900862276554, -0.002780639799311757, -0.025833040475845337, -0.002627745270729065, -0.03751009702682495, 0.024479415267705917, 0.022294044494628906, -0.03366123512387276, -0.021282901987433434, 0.0004092473827768117, -0.006075004581362009, -0.0007114686886779964, -0.011310109868645668, -0.03878217935562134, 0.004411513451486826, -0.004586832597851753, -0.025555791333317757, 0.02200048789381981, 0.00687413290143013, 0.036466337740421295, 0.029747137799859047, -0.009817860089242458, -0.01225601602345705, 0.00036796589847654104, 0.013006218709051609, -0.04814339429140091, 0.019586794078350067, 0.015689006075263023, 0.0081666000187397, 0.006527572404593229, -0.011986922472715378, 0.003302519442513585, -0.0020763061475008726, 0.030676735565066338, 0.0197661891579628, 0.010845310986042023, -0.026257067918777466, 0.05750460922718048, 0.01878766529262066, -0.028442438691854477, -0.013601487502455711, 0.027708545327186584, -0.01999451220035553, 0.020581627264618874, -0.07632489502429962, 0.0005239181919023395, 0.021054580807685852, 0.05942903831601143, 0.0179885383695364, -0.04879574477672577, -0.0359770767390728, 0.01710786670446396, 0.020353304222226143, -0.005010859575122595, -0.044164061546325684, 0.010396820493042469, 0.026159215718507767, -0.024772971868515015, -0.04964379593729973, 0.07104086130857468, 0.007958663627505302, 0.01095131691545248, 0.02483820728957653, 0.024430489167571068, 0.04589278623461723, 0.03165525943040848, 0.007322623394429684, -0.03976070135831833, 0.02516438253223896, 0.0010947240516543388, -0.012647425755858421, 0.03206297755241394, -0.010527290403842926, 0.008231835439801216, 0.015362830832600594, 0.001993743237107992, -0.0018479838036000729, -0.03057888336479664, -0.008627322502434254, 0.013528097420930862, -0.03649895638227463, 0.036042310297489166, 0.024544650688767433, -0.08258745074272156, -0.0492197684943676, -0.021233975887298584, -0.010714841075241566, -0.041261106729507446, -0.024854516610503197, -0.0246588122099638, -0.007807807996869087, -0.031345393508672714, -0.033530764281749725, 0.023272568359971046, -0.0075917174108326435, 0.004705070983618498, 0.03145955502986908, -0.009450913406908512, 0.0006921020685695112, -0.04295721650123596, -0.00920628197491169, -0.012166318483650684, -0.02405538782477379, -0.03878217935562134, 0.012843131087720394, 0.06719199568033218, 0.03966284915804863, -0.013234540820121765, -0.032177139073610306, -0.01761343702673912, -0.005169869866222143, -0.0037673183251172304, -0.03806459531188011, -0.004709147848188877, -0.003930405713617802, -0.010967626236379147, -0.0005417558713816106, -0.025131763890385628, -0.027366062626242638, -0.060374945402145386, 0.00337387016043067, -0.0034717225935310125, -0.03229130059480667, 0.0212013591080904, -0.0063726394437253475, 0.002774524036794901, 0.006584652699530125, -0.018934443593025208, -0.03075827844440937, -0.026012437418103218, -0.012508802115917206, -0.02646908164024353, 0.01481648813933134, 0.028915392234921455, 0.03170418739318848, 0.022799614816904068, -0.02762700244784355, -0.018167933449149132, -0.010005410760641098, -0.02050008252263069, -0.04843695089221001, -0.02503391169011593, -0.078477643430233, 0.0038203217554837465, -0.006817052140831947, -0.0007298160344362259, -0.013862427324056625, -0.012671888805925846, -0.01263111736625433, 0.024870824068784714, -0.02731713466346264, 0.0457623191177845, -0.005116866435855627, 0.0020436886698007584, 0.034509290009737015, -0.005092403385788202, -0.008142136968672276, -0.0005004743579775095, -0.043413858860731125, 0.0361727811396122, 0.004005833528935909, 0.008586550131440163, 0.036140162497758865, 0.0011303994106128812, -0.024707738310098648, 0.02358243428170681, 0.012745278887450695, 0.01723833568394184, 0.02260391041636467, 0.01580316759645939, 0.004101647529751062, 0.021609077230095863, -0.02167431265115738, 0.01668383926153183, -0.006670273840427399, 0.01971726305782795, -0.019684646278619766, -0.03335136920213699, 0.010992089286446571, -0.014147830195724964, -0.033253517001867294, -0.04067399352788925, -0.017923302948474884, 0.02405538782477379, -0.006315558683127165, -0.023924918845295906, -0.029143713414669037, -0.014058131724596024, 0.01901598833501339, -0.030269017443060875, 0.0011997114634141326, -0.0060953907668590546, 0.04703439772129059, 0.0012894095852971077, 0.0019560293294489384, 0.019929276779294014, 0.015044810250401497, 0.01500403881072998, 0.03398741036653519, 0.01268004346638918, -0.03437881916761398, 0.025409013032913208, -0.002008013427257538, -0.03666204214096069, -0.010829001665115356, -0.011489505879580975, 0.025082837790250778, -0.003834591945633292, -0.005907840095460415, 0.014686018228530884, 0.002181293675675988, -0.02963297627866268, -0.012035848572850227, 0.003096621483564377, -0.02857290767133236, 0.00517394719645381, 0.0007991281454451382, -0.054275479167699814, -0.03649895638227463, -0.02111981436610222, -0.024821897968649864, -0.036466337740421295, 0.009826014749705791, -0.013250849209725857, 0.016243502497673035, -0.001736880512908101, 0.04328338801860809, 0.02694203518331051, 0.00019124543177895248, 0.009475376456975937, 0.038195062428712845, 0.013601487502455711, 0.021217668429017067, -0.014539239928126335, -0.03048103116452694, -0.030415795743465424, -0.01821685954928398, -0.02343565598130226, -0.014115212485194206, 0.0066784280352294445, 0.03519425541162491, 0.024772971868515015, 0.016602294519543648, 0.0016940701752901077, -0.011261183768510818, 0.02591458335518837, -0.030513647943735123, -0.0009927944047376513, 0.01640659011900425, 0.06086421012878418, 0.02227773517370224, -0.013854272663593292, 0.022245118394494057, 0.03137801215052605, 0.024772971868515015, -0.03490069881081581, -0.03369385376572609, -0.05088325962424278, 0.0004915555473417044, -0.012313096784055233, 0.018950752913951874, 0.010886082425713539, 0.004211731720715761, -0.041782986372709274, -0.028882773593068123, 0.026827873662114143, 0.014628937467932701, 0.0035226873587816954, -0.004855926614254713, -0.03946714475750923, 0.018885517492890358, 0.004513442981988192, 0.0041709598153829575, 0.03561828285455704, 0.006543880794197321, -0.04621896147727966, 0.028116263449192047, -0.010796383954584599, -0.007962740957736969, 0.004786614328622818, -0.010388665832579136, -0.04165251553058624, -0.0013913392322137952, 0.048860978335142136, -0.03398741036653519, -0.021315520629286766, -0.03359599784016609, -0.03366123512387276, 0.007126918528228998, 0.009263362735509872, 0.028491364791989326, -0.02368028648197651, -0.035161636769771576, 0.0059649208560585976, 0.02885015681385994, -0.022766998037695885, 0.010135880671441555, 0.03731439262628555, -0.007151381578296423, -0.03532472625374794, -0.0015034617390483618, 0.0070535289123654366, -0.008313379250466824, 0.044392384588718414, -0.006951599381864071, -0.01020926982164383, 0.029111096635460854, 0.013536252081394196, 0.02754545770585537, 0.00539411511272192, -0.012655580416321754, 0.003114969003945589, 0.028931699693202972, -0.0075754085555672646, 0.019325854256749153, 0.009165510535240173, 0.00871702004224062, 0.02200048789381981, 0.034411437809467316, -0.026778947561979294, 0.023549817502498627, -0.011016552336513996, -0.014302763156592846, -0.003895749803632498, 0.0006915924022905529, -0.013870581053197384, -0.009002422913908958, -0.024756664410233498, -0.021168742328882217, -0.031850963830947876, -0.02232666127383709, 0.00426473468542099, 0.026778947561979294, -0.013332393020391464, 0.02144598960876465, 0.014408770017325878, 0.02363136038184166, -0.03132908418774605, 0.010282658971846104, -0.023093173280358315, 0.01593363657593727, -0.020907802507281303, 0.016814308241009712, -0.0005519488477148116, -0.06464783847332001, 0.012190781533718109, -0.007302237208932638, -0.0036633501295000315, 0.003987486474215984, 0.0074449386447668076, 0.04915453493595123, 0.01006249152123928, -0.003155740676447749, -0.011742291040718555, 0.00251562288030982, -0.011318263597786427, -0.006136162672191858, 0.00871702004224062, 0.014270145446062088, -0.002503391122445464, -0.0003954868880100548, -0.001559523050673306, 0.014506622217595577, 0.019684646278619766, -0.00629109563305974, -0.01055175345391035, 0.04302245005965233, -0.01952155865728855, -0.015648234635591507, -0.010225578211247921, 0.017792832106351852, 0.0155422268435359, -0.004435976501554251, 0.0024993140250444412, -0.0016940701752901077, 0.011114404536783695, -0.005369652062654495, 0.012166318483650684, -0.03927144035696983, -0.007171767298132181, -0.011685210280120373, 0.017499275505542755, 0.024675119668245316, -0.004774382803589106, -0.0026889031287282705, -0.0279694851487875, -0.015990717336535454, 0.010250041261315346, -0.034085262566804886, -0.022294044494628906, -0.01181568019092083, -0.010657760314643383, 0.03057888336479664, -0.005581665318459272, 0.02666478604078293, 0.000430907413829118, -0.0066091157495975494, -0.012655580416321754, -0.004501211456954479, -0.01577870361506939, -0.025196999311447144, -0.019407397136092186, 0.013829809613525867, 0.006711045745760202, -0.006959753576666117, -0.026012437418103218, -0.002904993947595358, -0.011693364940583706, -0.014588166028261185, 0.018755048513412476, -0.016202731058001518, -0.00836638268083334, -0.004374818876385689, -0.006123931147158146, -0.038651708513498306, 0.013136688619852066, -0.0324217714369297, 0.03214452043175697, 0.0037061606999486685, 0.00624624639749527, -0.007718109991401434, -0.01321007777005434, 0.011709673330187798, 0.028931699693202972, -0.011391653679311275, -0.009915712289512157, -0.04621896147727966, 0.0024646578822284937, 0.010771920904517174, 0.03113337978720665, -0.0033045578747987747, 0.017678672447800636, -0.00440335925668478, 0.007049452047795057, -0.010013564489781857, 0.00027164240600541234, -0.030725661665201187, 0.007620257791131735, 0.003718392224982381, -0.010086954571306705, -0.004917084239423275, 0.009573228657245636, 0.0009632348082959652, -0.022799614816904068, 0.01055990718305111, 0.002144599100574851, -0.01924430951476097, 0.039401911199092865, 0.006250323727726936, 0.01748296618461609, -0.0028132572770118713, 0.0011089941253885627, 0.018722431734204292, -0.03225868195295334, -0.005092403385788202, -0.02885015681385994, 0.004647990223020315, -0.018396256491541862, -0.016251657158136368, -0.01542806625366211, -0.005292185582220554, 0.012908365577459335, -0.020728405565023422, -0.00570805836468935, -0.010755612514913082, -0.023044247180223465, -0.0026848260313272476, -0.025474248453974724, 0.0522858127951622, -0.02032068744301796, 0.019097531214356422, 0.022342970594763756, -0.00278471689671278, -0.04400097578763962, -0.009051349014043808, 0.04758889600634575, 0.02521330863237381, 0.0425984226167202, -0.00972000788897276, -0.04801292344927788, -0.01984773389995098, 0.025506865233182907, -0.045044735074043274, -0.016047798097133636, -0.0005448137526400387, -0.028719687834382057, -0.015664542093873024, 0.012549573555588722, 0.044066209346055984, 0.00539411511272192, -0.0006227898993529379, 0.004468594212085009, -0.013144842348992825, -0.0068252068012952805, 0.02245713211596012, 0.012410948984324932, -0.006963830906897783, 0.022913776338100433, -0.021185049787163734, -0.0006013846723362803, 0.009499839507043362, 0.005002705380320549, -0.015305750072002411, 0.017923302948474884, 0.050491850823163986, 0.027659619227051735, -0.021511225029826164, 0.0073470864444971085, 0.022489748895168304, -0.005659131798893213, -0.007098378147929907, 0.005846682470291853, 0.007241079583764076, -0.014824642799794674, 0.008472389541566372, -0.0006752836634404957, -0.012060311622917652, 0.006050541531294584, -0.02549055777490139, -0.011032860726118088, -0.015990717336535454, -0.011725982651114464, 0.00794235523790121, -0.009948330000042915, 0.014783870428800583, -0.019929276779294014, -0.00047804988571442664, 0.002462619449943304, -0.006205474492162466, 0.03757533058524132, -0.05675440654158592, 0.004802923183888197, -0.003139432054013014, -0.021690621972084045, -0.012965446338057518, 0.029192639514803886, -0.03304150328040123, 0.005410423502326012, -0.012614808976650238, 0.010706686414778233, 0.022587601095438004, 0.0013760497095063329, 0.01780914142727852, -0.012859439477324486, -0.03969546779990196, 0.016602294519543648, -0.017972229048609734, -0.021315520629286766, -0.016194576397538185, 0.003952830098569393, 0.07136703282594681, 0.01002171915024519, 0.005418578162789345, -0.0010580293601378798, 0.014261990785598755, -0.011195948347449303, -0.003243400249630213, 0.011122559197247028, -0.006405256688594818, 0.05815695971250534, -0.005667286459356546, 0.0013801269233226776, -0.019130149856209755, -0.025833040475845337, 0.015028501860797405, -0.004990473855286837, -0.0006125969812273979, -0.009279672056436539, -0.02596350945532322, -0.003223014296963811, -0.012296788394451141, -0.022489748895168304, 0.023223642259836197, -0.019211692735552788, 0.025278544053435326, -0.01090239081531763, 0.002071209717541933, 0.004949701949954033, -0.02712143026292324, -0.0014351689023897052, -0.017580818384885788, -0.046479903161525726, -0.024870824068784714, -0.03382432088255882, 0.020059747621417046, -0.0002894800854846835, 0.026599550619721413, 0.016072260215878487, 0.02880123071372509, -0.025979818776249886, 0.023598743602633476, 0.003777511417865753, 0.022571293637156487, 0.023696595802903175, 0.0023912687320262194, -0.015811320394277573, 0.0032821334898471832, 0.04148942977190018, -0.030317943543195724, 0.023924918845295906, -0.03346553072333336, -0.02679525688290596, 0.008203295059502125, 0.00972000788897276, -0.01585209369659424, 0.025784114375710487, -0.025099147111177444, -0.0059567661955952644, 0.004026219714432955, -0.01214185543358326, -0.009141047485172749, -0.011554740369319916, -0.0032617475371807814, -0.01118779368698597, 0.015525918453931808, -0.007881197147071362, -0.014743098989129066, 0.009777088649570942, 0.0014932687627151608, 0.01339762844145298, 0.010339739732444286, 0.004030296579003334, -0.0424027182161808, -0.04054352268576622, -0.03910835459828377, -0.0008959612459875643, -0.03956499695777893, -0.02880123071372509, -0.007159535773098469, -0.01761343702673912, 0.006812975276261568, 0.008048362098634243, 0.021168742328882217, 0.02142968215048313, -0.04641466587781906, 0.027366062626242638, 0.014694172888994217, -0.0002487082383595407, 0.00830522459000349, -0.00517394719645381, -0.04990473762154579, 0.061255618929862976, 0.034280966967344284, -0.03992379084229469, 0.020565317943692207, 0.024218475446105003, 0.006572421174496412, -0.04073922708630562, -0.04954594373703003, -0.00372858508490026, 0.05323171988129616, 0.004374818876385689, 0.006751817185431719, -0.020891493186354637, -0.018559344112873077, 0.01171782799065113, -0.0014698249287903309, 0.008594704791903496, -0.0065031093545258045, -0.0016176229109987617, 0.019032297655940056, -0.000649291614536196, -0.006486800499260426, -0.04954594373703003, 0.0261429063975811, 0.04302245005965233, 0.011986922472715378, 0.0029437271878123283, -0.0018500224687159061, -0.0023973844945430756, -0.0155422268435359, -0.0029824604280292988, 0.0075224051252007484, -0.01214185543358326, -0.010486518032848835, 0.02544162981212139, 0.01325900387018919, -0.012215244583785534, 0.029339419677853584, -0.01496326643973589, 0.006344099063426256, -0.05182916671037674, -0.004586832597851753, 0.004974165000021458, -0.010258195921778679, 0.022098340094089508, 0.029013244435191154, -0.025148073211312294, -0.006344099063426256, 0.021266594529151917, 0.02032068744301796, -0.003598115174099803, -0.015607462264597416, 0.020353304222226143, -0.005332957021892071, 0.023696595802903175, -0.003076235530897975, -0.0030110005754977465, -0.00634002173319459, -0.008093210868537426, 0.002748022321611643, 0.013087761588394642, 0.03168787807226181, 0.0357813686132431, 0.011937996372580528, -0.01263111736625433, 0.023174716159701347, 0.00997279305011034, -0.0028499518521130085, 0.011611821129918098, 0.006421565543860197, -0.02977975457906723, 0.048763126134872437, 0.002884607994928956, 0.03584660589694977, -0.0013475094456225634, -0.006034233141690493, 0.00953245721757412, 0.026354920119047165, 0.011212256737053394, -0.014539239928126335, 0.014946958050131798, -0.0025584332179278135, -0.02922525815665722, -0.012419103644788265, -0.013046990148723125, 0.015379139222204685, -0.003875363850966096, 0.0106985317543149, 0.031850963830947876, 0.0326174758374691, 0.009964638389647007, 0.020809948444366455, 0.029567740857601166, -0.02036961354315281, 0.02217988297343254, -0.017972229048609734, 0.016096724197268486, 0.015110045671463013, 0.01146504282951355, -0.006649887654930353, -0.018119007349014282, -0.0036307326517999172, -0.025196999311447144, 0.013438399881124496, 0.04152204468846321, -0.03506378456950188, -0.011432425118982792, 0.00534926587715745, 0.005777370184659958, 0.022114647552371025, 0.01668383926153183, -0.0138379642739892, -0.00800351332873106, -0.02358243428170681, 0.032731637358665466, 0.012198936194181442, 0.02368028648197651, -0.018167933449149132, -0.02456095814704895, -0.011546586640179157, -0.03976070135831833, 0.020842567086219788, 0.013250849209725857, 0.045273054391145706, 0.010421283543109894, 0.008741483092308044, -0.02217988297343254, 0.01603148877620697, -0.0026379383634775877, -0.031997743993997574, 0.015697160735726357, -0.01398474257439375, 0.0016145650297403336, -0.006311481352895498, -0.03705345094203949, -0.011114404536783695, -0.04915453493595123, 0.009059503674507141, -0.013813501223921776, 0.061581794172525406, -0.00852946937084198, 0.017548201605677605, 0.011057323776185513, 0.01481648813933134, -0.02087518386542797, -0.014367997646331787, 0.004688762128353119, 0.010315276682376862, -0.010315276682376862, -0.002171100815758109, -0.005072017200291157, -0.020157599821686745, 0.0359770767390728, 0.03415049612522125, 0.01505296491086483, -0.025833040475845337, 0.014107057824730873, -0.008961651474237442, -0.004411513451486826, 0.028996935114264488, -0.05336219072341919, -0.004652067553251982, -0.038097210228443146, 0.014686018228530884, 0.024870824068784714, -0.020793640986084938, -0.042109161615371704, -0.0023953458294272423, 0.03159002587199211, -0.022212501615285873, -0.026811564341187477, 0.029747137799859047, 0.006543880794197321, 0.021331828087568283, 0.014278300106525421, -0.01244356669485569, -0.014017360284924507, -0.0035553048364818096, -0.013063298538327217, 0.01298175472766161, 0.013275312259793282, -0.028034720569849014, -0.036694660782814026, 0.0003042598837055266, 0.0011956343660131097, -0.03910835459828377, 0.004407436121255159, -0.025457939133048058, -0.013772728852927685, 0.007379703689366579], "index": 37}, {"title": "List of African countries by population", "text": "This is a list of African countries and dependent territories sorted by population, which is sorted by the 2015 the mid-year normalized demographic projections.", "vector": [0.0324319452047348, 0.07498246431350708, -0.018316054716706276, -0.02339920774102211, -0.017242148518562317, -0.014461927115917206, 0.009885896928608418, -0.015750613063573837, 0.015130135230720043, -0.011675738729536533, 0.009116264060139656, -0.051117900758981705, -0.04214482381939888, 0.033314935863018036, 0.02149004116654396, -0.023661717772483826, 0.04627339541912079, -0.00022540829377248883, 0.09722424298524857, 0.008185545913875103, -0.025320304557681084, -0.00628234725445509, -0.0023670666851103306, 0.018101273104548454, 0.02009396441280842, 0.034699078649282455, 0.02818405255675316, -0.005232306197285652, -0.009897829033434391, 0.02794540673494339, 0.04104705527424812, -0.02052352763712406, 0.032026246190071106, -0.022408828139305115, 0.024437315762043, 0.01496308296918869, -0.06543663889169693, 0.011156684719026089, 0.037896931171417236, 0.03887537866830826, 0.05064060911536217, -0.01690804585814476, -0.018041612580418587, 0.04410171881318092, 0.009050636552274227, -0.07154597342014313, -0.03885151445865631, -0.00714147137477994, 0.014139755629003048, -0.020845698192715645, -0.008113952353596687, 0.035605933517217636, -0.07646206766366959, -0.007213065400719643, -0.055843085050582886, 0.011723468080163002, -0.04414944723248482, 0.047824591398239136, -0.0003389514167793095, 0.019222907721996307, 0.024771420285105705, 0.01707509718835354, 0.03441270440816879, 4.842829002882354e-05, 0.00518159382045269, 0.006079498212784529, -0.0370139442384243, 0.012874933890998363, 0.053408898413181305, 0.04620179906487465, 0.053647544234991074, 0.002472965745255351, 0.009056602604687214, -0.009653217159211636, -0.011061226949095726, 0.019043924286961555, 0.02909090556204319, -0.005548511631786823, 0.05250204727053642, 0.03505704924464226, 0.03446043282747269, 0.0015071965754032135, 0.038517411798238754, 0.04982921481132507, 0.02971138432621956, 0.0015176372835412621, 0.0020120812114328146, -0.04319486394524574, -0.00866283755749464, -0.017027368769049644, -0.010607799515128136, 0.02854202128946781, 0.04443582147359848, 0.015106270089745522, 0.026346480473876, 0.028732938691973686, 0.031047800555825233, -0.01051830779761076, 0.06997090578079224, 0.0011932282941415906, -0.0217644851654768, -0.043099407106637955, 0.013960771262645721, 0.00497277919203043, 0.013972703367471695, 0.011419194750487804, 0.03429338335990906, -0.07536429911851883, -0.003898873459547758, 0.03367290273308754, 0.004722201265394688, 0.03446043282747269, 0.005369527265429497, 0.0037765675224363804, 0.008215377107262611, 0.0027354760095477104, -0.006598552688956261, -0.029902301728725433, 0.006306211464107037, 0.04085613787174225, 0.03488999605178833, 0.018101273104548454, 0.04856439307332039, 0.07345513254404068, -0.02194346860051155, 0.06405249238014221, -0.006932656746357679, 0.008012528531253338, 0.006336042191833258, -0.011711535975337029, -0.023661717772483826, 0.049447380006313324, -0.00047691844520159066, 0.014211349189281464, -0.0005593257956206799, -0.0005365798715502024, 0.05140427500009537, -0.04911327734589577, -0.019485417753458023, 0.06052054092288017, 3.500447201076895e-05, -0.043099407106637955, 0.017552388831973076, 0.010381086729466915, -0.015082405880093575, -0.011216346174478531, 0.002010589698329568, 0.022647473961114883, -0.006813333835452795, -0.020845698192715645, -0.009253486059606075, -0.015750613063573837, 0.05173838138580322, 0.01477216649800539, 0.00723692961037159, 0.02909090556204319, 0.023232154548168182, 0.009032738395035267, 0.00961741991341114, 0.025224845856428146, 0.011317770928144455, 0.0496382974088192, -0.031787604093551636, -0.025391899049282074, 0.012839136645197868, -0.027348792180418968, 0.005196509417146444, 0.0042836894281208515, -0.029067041352391243, -0.016919977962970734, 0.02534416876733303, -0.030737562105059624, -0.00527705205604434, 0.005253187846392393, -0.02565440908074379, 0.006264448631554842, 0.03236035257577896, -0.016657467931509018, -0.005002609919756651, -0.0018032663501799107, 0.010124541819095612, -0.025988513603806496, 0.022516218945384026, -0.020869562402367592, -0.025153253227472305, -0.01641882210969925, 0.0007524795946665108, 0.020129762589931488, -0.003523006569594145, -0.021573567762970924, -0.032408080995082855, -0.014509656466543674, -0.04445968568325043, -0.012994256801903248, 0.06443432718515396, -0.018005814403295517, -0.024210602045059204, -0.020953088998794556, -0.026585126295685768, 0.05235885828733444, -0.020368406549096107, -0.00028917143936268985, 0.021919604390859604, 0.02117980271577835, -0.0019643520936369896, -0.004716234747320414, 0.01996270939707756, -0.06815720349550247, -0.03228875994682312, 0.00930121447890997, -0.04687000811100006, -0.016717128455638885, -0.0374196395277977, 0.03173987194895744, 0.03016481176018715, 0.01603698916733265, 0.002898053266108036, -0.003534938907250762, 0.04441195726394653, 0.006052650511264801, 0.06758445501327515, 0.002270116936415434, -0.02458050288259983, -0.033171746879816055, -0.040736813098192215, -0.05407710745930672, 0.03718099370598793, 0.01847117394208908, -0.0012775000650435686, 0.015858003869652748, -0.000102356614661403, -0.03016481176018715, 0.04033111780881882, -0.019950777292251587, -0.01409202627837658, 0.023172494024038315, 0.0169796384871006, -0.023864567279815674, 0.0060198367573320866, 0.07083003222942352, -0.018423445522785187, -0.03918561711907387, -0.0129823237657547, -0.006094413809478283, -0.022420760244131088, 0.05932731181383133, -0.010202102363109589, -0.03916175290942192, 0.06896859407424927, 0.06419568508863449, -0.03376835957169533, -0.01404429692775011, -0.024771420285105705, -0.014784098602831364, -0.00440897885710001, 0.03763442113995552, 0.06433887034654617, -0.02968752011656761, -0.01256469450891018, -0.023494666442275047, -0.010017151944339275, -0.018733683973550797, -0.014354536309838295, -0.006944588851183653, 0.006461331155151129, -0.029806843027472496, 0.04987694323062897, -0.028804531320929527, 0.037610556930303574, -0.016514280810952187, -0.013781786896288395, 0.010756953619420528, -0.022611675783991814, -0.018351851031184196, 0.03715712949633598, 0.05655902251601219, 0.0461779348552227, -0.041643667966127396, 0.00812588445842266, 0.03030799888074398, -0.003955551888793707, -0.008239241316914558, 0.014318739995360374, -0.005142814014106989, -0.043934665620326996, 0.03338652849197388, -0.03911402449011803, -0.05708404257893562, -0.013101646676659584, -0.015571629628539085, -0.011801027692854404, 0.045629050582647324, 0.029520468786358833, 0.01985531859099865, 0.0008814973989501595, -0.013698261231184006, 0.004483555443584919, 0.021931536495685577, 0.02103661559522152, 0.07006637006998062, -0.0055872914381325245, 0.015213660895824432, 0.009933625347912312, 0.0033649038523435593, -0.03267059102654457, -0.024365723133087158, -0.024914607405662537, -0.05479304492473602, -0.008084122091531754, 0.0370139442384243, -0.007797746919095516, 0.01968826726078987, -0.0034722944255918264, -0.017194420099258423, 0.030833018943667412, -0.004167350009083748, 0.046297259628772736, -0.007511372212320566, 0.043481238186359406, 0.009766574017703533, 0.007839510217308998, -0.032026246190071106, -0.07975538074970245, 0.00911029800772667, -0.013495412655174732, -0.011341635137796402, -0.007576999720185995, -0.026227157562971115, 0.011622044257819653, -0.032193299382925034, 0.004769930150359869, -0.037753742188215256, -0.009987320750951767, -0.052788421511650085, 0.03916175290942192, 0.03648892045021057, 0.026083970442414284, -0.027826083824038506, -0.02370944619178772, -0.001560145989060402, -0.0056380038149654865, 0.0008650905219838023, 0.02009396441280842, 0.021752553060650826, 0.032718319445848465, 0.0022537100594490767, -0.05488850176334381, 0.012182861566543579, 0.015177864581346512, -0.018208663910627365, 0.00038630765629932284, -0.03801625594496727, 0.019604740664362907, 0.033410392701625824, 0.027659032493829727, -0.014796030707657337, 0.0067954352125525475, 0.009677081368863583, -0.003487209789454937, -0.04727570712566376, -0.010637630708515644, 0.02023715153336525, -0.03107166476547718, 0.00282496795989573, -0.050354234874248505, -0.026227157562971115, 0.02166902646422386, -0.004653590265661478, 0.034007005393505096, 0.0316682793200016, 0.009444402530789375, 0.019664403051137924, -0.004907151684165001, 0.010148406960070133, -0.055699896067380905, 0.028494292870163918, -0.016478482633829117, 0.01829219050705433, 0.004325452726334333, -0.03918561711907387, -0.00630024541169405, 0.05827727168798447, 0.03231262415647507, 0.03455589339137077, -0.033100154250860214, -0.038445815443992615, 0.05312252417206764, -0.01256469450891018, -0.030427321791648865, 0.018936533480882645, 0.05250204727053642, -0.03932880610227585, 0.02818405255675316, 0.0015392645727843046, 0.039137888699769974, -0.03429338335990906, 0.036918483674526215, 0.006485195830464363, -0.04713251814246178, -0.04092773050069809, -0.04436422884464264, -0.029353417456150055, -0.0012633304577320814, 0.0033499884884804487, -0.003994331695139408, 0.024079347029328346, -0.0005775970639660954, -0.011150718666613102, 0.029496604576706886, 0.03333880007266998, -0.00649116188287735, 0.0504019632935524, -0.05006786063313484, 0.005837869364768267, -0.022611675783991814, -0.004382131155580282, 0.006580654066056013, 0.023065103217959404, 0.029950030148029327, 0.017791034653782845, 0.010804682038724422, -0.022086655721068382, -0.015165931545197964, 0.010404950939118862, -0.06395703554153442, 0.037515100091695786, -0.01579834334552288, 0.012057572603225708, -0.05947050079703331, -0.0015101796016097069, 0.041786856949329376, 0.01447385922074318, -0.0534566268324852, -0.012445371598005295, 0.0014430604642257094, 0.004295621998608112, -0.05231112986803055, -0.04696546494960785, -0.0006476992275565863, 0.0008516667294315994, -0.065675288438797, -0.022921916097402573, -0.0005701393820345402, 0.021275261417031288, -0.020153626799583435, -0.030498916283249855, -0.03823103383183479, 0.005107017233967781, -0.0036721602082252502, -0.014628979377448559, 0.03632187098264694, 0.004483555443584919, -0.03541501611471176, 0.01745693013072014, -0.04130956530570984, -0.01683645136654377, 0.035391151905059814, -0.01927063800394535, -0.0004112908791285008, 0.025248711928725243, -0.005202475469559431, 0.01090014073997736, 0.012695949524641037, -0.03715712949633598, 0.04185844957828522, -0.014080094173550606, -0.022194046527147293, -0.011908418498933315, -0.04147661477327347, 0.045843832194805145, -0.05359981581568718, -0.009605487808585167, -0.03579685091972351, 0.01553583238273859, -0.021704822778701782, -0.010685359127819538, 0.009104331955313683, 0.06228651851415634, -0.027444250881671906, -0.018626293167471886, -0.0028264594729989767, 0.030570508912205696, -0.03846967965364456, 0.01791035756468773, -0.036608245223760605, -0.023065103217959404, -0.023232154548168182, 0.022420760244131088, -0.03457975760102272, 0.01351927686482668, 0.026847636327147484, 0.03794465959072113, 0.010577969253063202, 0.005417256616055965, -0.01645461842417717, -0.017158623784780502, 0.00885375402867794, -0.021120140329003334, 0.008203445002436638, 0.04076068103313446, -0.025224845856428146, 0.02816018834710121, 0.027444250881671906, 0.006001938600093126, -0.0027563574258238077, -0.003391751553863287, -0.024461179971694946, -0.04865984991192818, -0.03551047295331955, -0.019986573606729507, 0.028661344200372696, 0.03586844354867935, -0.0026981874834746122, -0.01836378313601017, 0.055222608149051666, 0.030809154734015465, 0.07918263226747513, 0.024747556075453758, -0.006139159668236971, -0.0040689087472856045, -0.03632187098264694, 0.03343425691127777, -0.007099708542227745, 0.0008539039990864694, -0.029759114608168602, 0.04925646632909775, -0.005852784961462021, -0.007481541484594345, 0.00318890274502337, -0.014187484979629517, -0.013936907052993774, -0.0021776417270302773, 0.009253486059606075, -0.05030650645494461, -0.0030934445094317198, -0.061188749969005585, 0.0580386258661747, -0.06190468370914459, -0.008412259630858898, 0.02038034051656723, 0.024389587342739105, 0.02205085940659046, -0.013984635472297668, -0.03403087332844734, -0.045461997389793396, 0.000855395570397377, -0.00328436098061502, 0.00798269733786583, -0.02551122196018696, -0.04434036463499069, -0.00029644265305250883, -0.0028294427320361137, -0.014796030707657337, -0.011812960729002953, -0.02166902646422386, 0.010649562813341618, 0.03333880007266998, -0.009140129201114178, -0.003171004354953766, -0.03610708937048912, 0.016323363408446312, -0.021919604390859604, 0.019210975617170334, -0.001032888307236135, -0.017158623784780502, 0.014748302288353443, -0.039209481328725815, 0.042335741221904755, -0.02370944619178772, 0.0017257065046578646, 0.035391151905059814, 0.0014937727246433496, -0.004104705527424812, 0.04992467164993286, 0.01863822713494301, 0.021704822778701782, 0.00949213095009327, -0.009414571337401867, 0.006383771542459726, -0.02534416876733303, -0.013578938320279121, 0.02450891025364399, -0.018721751868724823, -0.0062763807363808155, 0.03023640625178814, -0.008430157788097858, 0.0079170698300004, 0.021394584327936172, 0.011598179116845131, -0.012779475189745426, 0.049590568989515305, -0.0027578489389270544, 0.02892385423183441, -0.05107017233967781, -0.0024848980829119682, -0.02839883416891098, -0.03885151445865631, 0.022969644516706467, -0.008633007295429707, -0.0033082254230976105, 0.04529494792222977, 0.03562979772686958, 0.010106643661856651, -0.03978223353624344, -0.02399582229554653, 0.02280259318649769, 0.03696621209383011, -0.032408080995082855, -0.004137519281357527, 0.006052650511264801, -0.03498545289039612, -0.015189796686172485, 0.003946602810174227, -0.009969422593712807, -0.04787231981754303, 0.04324259236454964, -0.027826083824038506, 0.006413602270185947, 0.0229099839925766, 0.02787381410598755, 0.02923409454524517, -0.00564993591979146, -0.012469235807657242, -0.007117606699466705, 0.013614735566079617, 0.00817361380904913, -0.0022000146564096212, -0.04071294888854027, 0.019425757229328156, -0.026370346546173096, -0.0008658362785354257, -0.005599224008619785, -0.014843760058283806, -0.012158996425569057, -0.023792972788214684, -0.006222685799002647, -0.029806843027472496, -0.008925347588956356, -0.001980758970603347, 0.020988885313272476, 0.03770601376891136, 0.04505630210042, -0.053027067333459854, 0.012033707462251186, -0.008841821923851967, -0.006497128400951624, -0.044006261974573135, -0.02656126208603382, -0.017337607219815254, 0.024699825793504715, -0.009993286803364754, -0.0004828845849260688, -0.005903496872633696, -0.009605487808585167, 0.0036095157265663147, -0.006007904652506113, 0.0023282866459339857, -0.011783129535615444, 0.02211051993072033, 0.028446562588214874, -0.041882313787937164, 0.013638599775731564, 0.017122825607657433, 0.0024714742321521044, 0.02263554185628891, -0.004319486673921347, 0.03522409871220589, -0.06467297673225403, 0.035009317100048065, -0.00028786633629351854, -0.021478109061717987, -0.02732492797076702, -0.014056229963898659, 0.004749048501253128, 0.032789915800094604, 0.014819895848631859, -0.0679662823677063, 0.03205011412501335, 0.004892236087471247, -0.015702884644269943, -0.02123946323990822, -0.00015325525600928813, -0.022504286840558052, 0.016919977962970734, -0.0015750613529235125, -0.004206129815429449, 0.013924974016845226, 0.04749048873782158, 0.011639942415058613, 0.006306211464107037, -0.005629054736346006, -0.01767171174287796, 0.03006935305893421, -0.011383398436009884, 0.007099708542227745, -0.04596315324306488, -0.0011708552483469248, 0.01530911959707737, 0.053170252591371536, -0.014068162068724632, -0.043409645557403564, 0.05016331747174263, -0.02061898447573185, -0.052883878350257874, -0.024317992851138115, 0.010041016153991222, 0.0003652397426776588, -0.016478482633829117, -0.04968602582812309, -0.021788349375128746, -0.0038571106269955635, -0.014867625199258327, -0.032479673624038696, 0.022337233647704124, -0.0618569552898407, -0.01770750805735588, -0.016717128455638885, -0.00666418019682169, 0.0028652395121753216, 0.02038034051656723, -0.032479673624038696, 0.007266760338097811, -0.011610111221671104, 0.027229471132159233, -0.0065388912335038185, -0.01978372596204281, -0.02270713448524475, -0.005336713511496782, 0.015034676529467106, 0.02440151944756508, -0.0023730327375233173, 0.04443582147359848, 0.031238717958331108, 0.015368781052529812, -0.014175552874803543, -0.006843164563179016, 0.016752924770116806, 0.01885300688445568, -0.015595493838191032, -0.013889177702367306, -0.003794466145336628, -0.01707509718835354, -0.0021761502139270306, -0.04901782050728798, 0.0028294427320361137, 0.0370139442384243, -0.050879254937171936, -0.02385263331234455, 0.019557012245059013, 0.009080467745661736, -0.015989258885383606, 0.015822207555174828, 0.008829889819025993, -0.02503393031656742, -0.022337233647704124, -0.021263329312205315, -0.01808934099972248, -0.009289282374083996, -0.005169661715626717, -0.002868222538381815, -0.008227309212088585, 0.03281378000974655, -0.015189796686172485, 0.018447309732437134, -0.049590568989515305, -0.05016331747174263, -0.014223281294107437, 0.005614139139652252, -0.02149004116654396, -0.01652621291577816, 0.015404577367007732, -0.02932955138385296, 0.0071832346729934216, 0.012445371598005295, 0.007386083249002695, 0.04457901045680046, -0.012349912896752357, 0.005548511631786823, 0.0009478707215748727, -0.04099932312965393, -0.006694010924547911, 0.04114251211285591, -0.038660597056150436, 0.02527257613837719, 0.0008039375534281135, -0.03906629607081413, -0.005211424548178911, -0.017647847533226013, 0.024258332327008247, -0.01256469450891018, 0.004349317401647568, -0.033195611089468, 0.0036840925458818674, -0.04076068103313446, 0.010148406960070133, 0.007559101562947035, 0.03281378000974655, 0.0047371163964271545, -0.019879184663295746, 0.01783876307308674, -0.02794540673494339, 0.011067193001508713, -0.036059360951185226, 0.027826083824038506, -0.01896039769053459, 0.01878141425549984, -0.05612945929169655, -0.02128719352185726, -0.0032545302528887987, 0.02125139720737934, -0.0035200235433876514, -0.07001863420009613, -0.018077408894896507, -0.015571629628539085, -0.02663285657763481, -0.057227231562137604, 0.04739502817392349, -0.035295695066452026, 0.001953911269083619, -0.04030725359916687, 0.015774479135870934, -0.020750241354107857, 0.002695204457268119, 0.01936609484255314, 0.023804904893040657, -0.020129762589931488, 0.0124095743522048, -0.025773731991648674, 0.02092922478914261, 0.010488476604223251, -0.015142067335546017, -0.022432692348957062, 0.020607052370905876, -0.013030053116381168, -0.003612498752772808, 0.005488850176334381, 0.039806097745895386, 0.028613615781068802, -0.01419941708445549, -0.006902826018631458, 0.017898425459861755, -0.038135576993227005, -0.01313744392246008, -0.005784174427390099, 0.032026246190071106, -0.03412633016705513, 0.004593928810209036, -0.04756208136677742, 0.05274069309234619, 0.01294652745127678, -0.049972403794527054, 0.037061672657728195, 0.005837869364768267, 0.012719813734292984, 0.028756802901625633, 0.006413602270185947, -0.01645461842417717, 0.03486613184213638, 0.03648892045021057, 0.008931313641369343, -0.03434111177921295, 0.02332761324942112, 0.025821460410952568, -0.003341039177030325, -0.01515399944037199, 0.029806843027472496, -0.006944588851183653, -0.01745693013072014, -0.018805278465151787, 0.007111640647053719, -0.02930568717420101, 0.012481167912483215, -0.028732938691973686, -0.05436348170042038, 0.007600864395499229, 0.005059287883341312, 0.0035677526611834764, 0.007654559798538685, 0.03221716359257698, 0.011574314907193184, -0.005080169532448053, 0.013197105377912521, -0.023244088515639305, 0.05402937904000282, 0.004397046286612749, -0.02069057896733284, 0.013674396090209484, -0.0030352745670825243, 0.05178610980510712, 0.011824892833828926, 0.02496233582496643, -0.03746736794710159, -0.011097023263573647, -0.026608992367982864, 0.007350286468863487, 0.037061672657728195, 0.05985233187675476, -0.0038869413547217846, 0.02003430388867855, 0.03245580941438675, 0.013555074110627174, -0.0519292950630188, 0.023077035322785378, 0.002881646389141679, 0.04052203521132469, 0.033171746879816055, 0.003851144341751933, 0.01400850061327219, 0.027826083824038506, 0.0023849650751799345, -0.05923185497522354, -0.04574837535619736, -0.015822207555174828, 0.03185919672250748, -0.008579311892390251, -0.031883060932159424, -0.0024416435044258833, 0.047227974981069565, -0.012445371598005295, 0.018793346360325813, 0.018447309732437134, -0.02007010020315647, 0.007654559798538685, -0.01847117394208908, 0.027348792180418968, 0.03147736191749573, -0.038660597056150436, 0.0034543960355222225, 0.01220075972378254, -0.0018882837612181902, -0.019568944349884987, 0.004191214684396982, -0.03412633016705513, -0.028231782838702202, 0.05369527265429497, 0.0030337830539792776, -0.017373403534293175, 0.008167647756636143, -0.009820269420742989, -0.005324781406670809, 0.010756953619420528, 0.011055259965360165, 0.016502346843481064, 0.017886493355035782, 0.009885896928608418, -0.0008762770448811352, 0.0060854642651975155, -0.006437466945499182, 0.04765753820538521, 0.007314489688724279, -0.016848383471369743, -0.01553583238273859, 0.035916171967983246, -0.03687075525522232, 0.001680960413068533, -0.005008575972169638, -0.017552388831973076, 0.030665967613458633, -0.048134829849004745, -0.01936609484255314, -0.012719813734292984, 0.04298008233308792, -0.0022074724547564983, 0.00461779348552227, 0.05665447935461998, 0.0030606305226683617, -0.05359981581568718, -0.012695949524641037, 0.0003096800355706364, -0.01166380662471056, -0.06968453526496887, 0.024986201897263527, 0.05293160676956177, 0.01943768933415413, 0.0035409049596637487, 0.04333805292844772, -0.01592959836125374, 0.0007897680043242872, 0.02301737479865551, -0.002219404559582472, -0.01347154751420021, -0.014628979377448559, -0.005569393280893564, -0.018005814403295517, 0.013638599775731564, 0.028804531320929527, 0.007445744704455137, -0.02218211442232132, -0.012528897263109684, 0.04068908467888832, 0.0014907895820215344, -0.0014743827050551772, 0.019604740664362907, -0.026990825310349464, -0.012254455126821995, -0.030140947550535202, -0.0025788648054003716, 0.006198821123689413, 0.014175552874803543, 0.04176299273967743, 0.0031053766142576933, 0.06047281250357628, -0.01669326424598694, 0.0351286418735981, -0.029043177142739296, 0.041118647903203964, 0.010589901357889175, -0.00014356027531903237, -0.024150941520929337, 0.07927808910608292, -0.004701319616287947, 0.013590870425105095, 0.004561115056276321, 0.03302856162190437, 0.024795284494757652, -0.005444104317575693, -0.0015750613529235125, 0.024938471615314484, 0.006843164563179016, -0.02565440908074379, 0.03388768434524536, 0.003773584496229887, -0.007451710756868124, 0.021716754883527756, 0.00164218049030751, 0.020463865250349045, -0.006455365102738142, -0.014617047272622585, -0.014903421513736248, 0.009175925515592098, 0.012636288069188595, -0.03562979772686958, 0.005629054736346006, 0.003898873459547758, -0.05068833753466606, -0.008597210049629211, -0.02399582229554653, -0.015249458141624928, 0.03305242583155632, -0.015165931545197964, 0.0023238121066242456, 0.0019718098919838667, 0.019282570108771324, 0.017647847533226013, -0.013972703367471695, -0.029878437519073486, -0.02641807496547699, -0.0022537100594490767, -0.028756802901625633, 0.010148406960070133, 0.0013610260793939233, 0.048874631524086, 0.009724810719490051, -0.003257513279095292, -0.014366469345986843, 0.039281077682971954, 0.019330298528075218, -0.00789917167276144, -0.024795284494757652, 0.00038668056367896497, 0.02356625907123089, -0.01270788162946701, -0.0037676184438169003, -0.03300469368696213, -0.00628234725445509, -0.006813333835452795, -0.008811990730464458, -0.016084717586636543, -0.028804531320929527, -0.039281077682971954, -0.008752329275012016, -0.034174058586359024, 0.009366841986775398, 0.0124095743522048, 0.010303526185452938, 0.03231262415647507, -0.019497349858283997, -0.0066045187413692474, 0.008979042991995811, -0.02009396441280842, 0.027826083824038506, -0.024294128641486168, 0.02283838950097561, -0.01934223063290119, -0.03982996195554733, -0.00912819616496563, 0.008615108206868172, -0.019914980977773666, -0.03947199136018753, 0.03405473753809929, 0.0034156159963458776, -0.03257513418793678, 0.016824519261717796, 0.013447683304548264, 0.0015929598594084382, -0.010792749933898449, -0.04519948735833168, 0.01473637018352747, 0.005157729610800743, -0.012433439493179321, -0.021322989836335182, 0.01061973161995411, 0.002018047496676445, -0.025606678798794746, 0.00798269733786583, -0.0026966959703713655, -0.036823026835918427, 0.003976433537900448, -0.028494292870163918, 0.02141844853758812, -0.004229994490742683, 0.007469609379768372, -0.030475052073597908, 0.004698336590081453, 0.03288537263870239, 0.026083970442414284, -0.041261836886405945, 0.025558950379490852, 0.013352224603295326, -0.010166305117309093, -0.009480198845267296, -0.007051979191601276, -0.006479229778051376, -0.01656200923025608, 0.01466477569192648, -0.003552837297320366, -0.007654559798538685, 0.013495412655174732, 0.03994928300380707, 0.006145125720649958, -0.022194046527147293, 0.029568197205662727, -0.004367215558886528, -0.03839808702468872, 0.003925721161067486, -0.006652248091995716, 0.01934223063290119, -0.003305242396891117, 0.014998880214989185, -0.015237526036798954, -0.015786411240696907, -0.006234617903828621, 0.01194421574473381, 0.003660227870568633, -0.0029741215985268354, 0.0017883509863168001, 0.00583190331235528, -0.01220075972378254, -0.012994256801903248, 0.00845402292907238, -0.015702884644269943, 0.03006935305893421, 0.018137071281671524, -0.002459541894495487, 0.004364232532680035, 0.0040480270981788635, 0.004659556783735752, -0.021275261417031288, -0.011568348854780197, 0.00014104331785347313, 0.014831827953457832, 0.014032364822924137, 0.002802595030516386, -0.0032604963053017855, -0.021549703553318977, -0.003687075572088361, 0.002611678559333086, -0.00817361380904913, -0.002750391373410821, 0.013423818163573742, -0.026752179488539696, -0.02648966945707798, 0.007815645076334476, 0.008591243997216225, 0.019640538841485977, -0.0048982021398842335, -0.002361100632697344, -0.024150941520929337, 0.011777163483202457, -0.008322767913341522, -0.01718248799443245, -0.006067566107958555, -0.02187187597155571, 0.030785290524363518, -0.006163024343550205, 0.02069057896733284, -0.0036751432344317436, 0.0217644851654768, -0.013757922686636448, -0.004280706401914358, 0.015464238822460175, -0.03830263018608093, 0.014688640832901001, 0.007415913976728916, 0.01579834334552288, 0.020404204726219177, 0.008048324845731258, 0.039424262940883636, -0.007582965772598982, 0.0040987394750118256, 0.037443503737449646, -0.006652248091995716, -0.008185545913875103, -0.016084717586636543, 0.007654559798538685, 0.022898051887750626, -0.013161308132112026, 0.011616077274084091, -0.003707956988364458, 0.02780221961438656, 0.025535086169838905, -0.0006570213590748608, -0.008096054196357727, 0.04441195726394653, 0.018172867596149445, -0.004367215558886528, -0.016466550529003143, 0.008245207369327545, 0.01017227116972208, 0.004602878354489803, -0.004015213344246149, -0.017301810905337334, -0.014426130801439285, -0.01026176381856203, -0.04641658067703247, -0.03982996195554733, 0.010804682038724422, -0.0007860391633585095, -0.006228651851415634, -0.009515996091067791, 0.018864938989281654, 0.022229842841625214, -0.037992388010025024, 0.0362502746284008, -0.03290923684835434, 0.0025893053971230984, -0.00836453028023243, 0.026513533666729927, -0.005599224008619785, -0.01714669167995453, 0.02205085940659046, 0.02663285657763481, -0.007380117196589708, -0.011890520341694355, -0.00014784844825044274, 0.02777835540473461, 0.01781489886343479, -0.030665967613458633, -0.0061570582911372185, 0.02009396441280842, -0.000147568789543584, 0.008292936719954014, -0.0013528226409107447, -0.03238421678543091, 0.033171746879816055, 0.011622044257819653, 0.0127914072945714, -0.0066343494690954685, -0.009510030038654804, 0.03159668669104576, -0.018733683973550797, -0.01371019333600998, 0.01652621291577816, -0.003496158868074417, -0.04784845560789108, 0.007541202940046787, 0.007129539269953966, 0.022862253710627556, -0.014318739995360374, -0.006028786301612854, 0.01850697211921215, 0.01305391825735569, 0.007541202940046787, -0.05183383822441101, 0.038517411798238754, 0.03398314118385315, 0.02825564704835415, -0.003824296873062849, 0.006365872919559479, -0.006216719746589661, 0.01308971457183361, -0.01466477569192648, 0.011186515912413597, -0.028422698378562927, 0.0033201577607542276, 0.028279511258006096, 0.02749198116362095, -0.03307629004120827, -0.016740992665290833, 0.009396673180162907, -0.0004433589056134224, -0.019210975617170334, -0.021657094359397888, -0.010142440907657146, 0.010375120677053928, 0.0060407184064388275, 0.007433812599629164, 0.00675963843241334, -0.007302557118237019, 0.019557012245059013, -0.006425534375011921, 0.0013662463752552867, -0.014497724361717701, 0.020105896517634392, -0.006010887678712606, -0.023721378296613693, 0.018697887659072876, -0.03486613184213638, -0.005664851516485214, 0.02641807496547699, -0.037133265286684036, -0.001321500400081277, 0.01251696515828371, 0.02854202128946781, -0.0030636137817054987, 0.028207916766405106, -0.004644641187041998, 0.01251696515828371, 0.0162159726023674, -0.004441792611032724, -0.011890520341694355, -0.0328376442193985, -0.008668803609907627, -0.024389587342739105, 0.01062569860368967, -0.009050636552274227, -0.01381758414208889, 0.02245655655860901, 0.00047057942720130086, -0.0015586544759571552, 0.026704449206590652, 0.031119395047426224, -0.010023117996752262, -0.00032925643608905375, 0.011431126855313778, -0.031954653561115265, 0.03574911877512932, 0.023721378296613693, 0.016025057062506676, 0.002481914823874831, -0.023518530651926994, 0.003913789056241512, -3.505108179524541e-05, 0.007857408374547958, 0.01711089350283146, -0.005948243197053671, 0.009092399850487709, 0.019974641501903534, -0.014163619838654995, -0.00394958583638072, 0.009671115316450596, -0.023649785667657852, 0.03596390038728714, 0.02149004116654396, -0.006097396835684776, -0.02083376608788967, 0.01694384217262268, 0.016919977962970734, 0.029735250398516655, 0.0012998731108382344, 0.02610783651471138, -0.01343575119972229, 0.01023789867758751, -0.006938622798770666, -0.03543888032436371, 0.030212540179491043, 0.005781191401183605, 0.003132224315777421, 0.030140947550535202, -0.009032738395035267, 0.04252665862441063, 0.0022000146564096212, -0.01705123297870159, 0.03228875994682312, -0.017480794340372086, 0.009742708876729012, -0.01572674885392189, -0.027611304074525833, -0.01649041473865509, 0.012176894582808018, 0.028303375467658043, 0.009056602604687214, -0.013077782467007637, 0.007099708542227745, 0.043552834540605545, -0.0005567155894823372, 0.025535086169838905, -0.0006820045528002083, -0.027372658252716064, -0.010398984886705875, 0.021096276119351387, 0.02163323014974594, -0.0028055780567228794, 0.008102020248770714, -0.006222685799002647, -0.006956520956009626, -0.021167870610952377, 0.00036374820047058165, 0.014784098602831364, 0.013590870425105095, -0.012970391660928726, 0.0022954728920012712, 0.00415840046480298, -0.034007005393505096, -0.0070818099193274975, -0.009515996091067791, -0.009086433798074722, -0.00668207835406065, 0.03505704924464226, 0.014748302288353443, 0.0006417331169359386, -0.011801027692854404, 0.031572822481393814, -0.02999776042997837, -0.02572600170969963, 0.0114549919962883, 0.0081079863011837, 0.034532029181718826, 0.0267283134162426, -0.014951150864362717, 0.010804682038724422, -0.012212691828608513, -0.02978297881782055, 0.024079347029328346, -0.0236736498773098, -0.018351851031184196, 0.003209784161299467, -0.013686329126358032, 0.010858377441763878, -0.011842790991067886, 0.0035319558810442686, 0.010023117996752262, 0.043552834540605545, -0.0058289202861487865, 0.021716754883527756, -0.006837198045104742, 0.02440151944756508, 0.008931313641369343, 0.013423818163573742, -0.035916171967983246, 0.014127823524177074, -0.02992616593837738, 0.017003502696752548, -0.024079347029328346, 0.03663210943341255, -0.012528897263109684, -0.024365723133087158, 0.0074397786520421505, -0.009211722761392593, 0.020559323951601982, -0.015595493838191032, -0.0038153475616127253, 0.0027712727896869183, 0.031119395047426224, 0.01829219050705433, 0.029973896220326424, -0.028207916766405106, 0.010297560133039951, -0.005333730485290289, 0.00254306779243052, -0.01565515622496605, 0.003191885771229863, 0.027468115091323853, -0.00902677234262228, -0.03329107165336609, 0.03200238198041916, 0.00014244162593968213, -0.001680960413068533, -0.0052054584957659245, 0.00742784608155489, -0.03651278465986252, 0.026131700724363327, 0.012493100948631763, 0.027062417939305305, -0.01705123297870159, 0.02128719352185726, -0.026227157562971115, -0.024628233164548874, 0.01690804585814476, -0.0126004908233881, -0.006956520956009626, 0.0030531729571521282, 0.00206577661447227, -0.003618464805185795, -0.02052352763712406, 0.04488924890756607, 0.02503393031656742, 0.041572075337171555, 0.014724437147378922, -0.0033977176062762737, -0.016335295513272285, 0.0018957414431497455, -0.003976433537900448, -0.011168616823852062, -0.007648593746125698, 0.01109105721116066, 0.002695204457268119, -0.02287418767809868, 0.019246771931648254, -0.016538145020604134, -0.0012118725571781397, -0.02780221961438656, 7.061487849568948e-05, -0.013411886058747768, -0.01385338045656681, -0.027086282148957253, -0.011067193001508713, -0.00499962642788887, 0.024103211238980293, -0.025773731991648674, 0.015953462570905685, 0.01909165270626545, -0.016812587156891823, -0.0018987245857715607, 0.012552761472761631, 0.010118575766682625, 0.014438062906265259, 0.04212095960974693, 0.01485569216310978, -0.0009515995625406504, 0.016371091827750206, 0.03620254620909691, -0.010148406960070133, 0.0010492951842024922, -0.03345812112092972, -0.0033291070722043514, -0.03193078935146332, -0.015237526036798954, 0.009163993410766125, 0.03634573519229889, -0.0229099839925766, -0.0070818099193274975, 0.001475874218158424, 0.008567378856241703, 0.014986948110163212, -0.013125511817634106], "index": 38}, {"title": "Statistical hypothesis testing", "text": "A statistical hypothesis is a hypothesis that is testable on the basis of observing a process that is modeled via a set of random variables. A statistical hypothesis test is a method of statistical inference. Commonly, two statistical data sets are compared, or a data set obtained by sampling is compared against a synthetic data set from an idealized model.", "vector": [-0.020572399720549583, -0.01049450971186161, -0.02618958242237568, 0.0066335927695035934, 0.027870427817106247, -0.019078314304351807, -0.05321240425109863, 0.01196704525500536, 0.007542255334556103, -0.04335719347000122, 0.03485240042209625, -0.0026020780205726624, -0.02070169523358345, 0.011263101361691952, 0.06924508512020111, -0.012024509720504284, 0.00013917256728745997, 0.013504228554666042, 0.06441804021596909, 0.015673523768782616, 0.003950705286115408, 0.006306761875748634, -0.03468000888824463, 0.0008740935008972883, 0.03827155753970146, -0.010350847616791725, -0.04916113615036011, -0.01640620082616806, -0.05324113741517067, -0.002673909068107605, 0.05852790176868439, 0.05401691421866417, 0.016750989481806755, -0.02726704813539982, 0.004011761397123337, -0.025471273809671402, 0.00393633870407939, -0.008770565502345562, -0.02814338542521, 0.024178314954042435, -0.029149020090699196, 0.0033652824349701405, 0.027080288156867027, -0.005013803951442242, -0.01547239813953638, -0.008662818931043148, 0.03177803382277489, 0.0019466201774775982, -0.021175779402256012, -0.021233243867754936, 0.0007883452344685793, -0.022540567442774773, 0.061487335711717606, 0.022339440882205963, -0.017340004444122314, -0.020270708948373795, 0.014251270331442356, -0.01847493276000023, -0.04054141789674759, -0.022339440882205963, -0.006295987404882908, 0.054074376821517944, 0.032381415367126465, 0.015544228255748749, -0.00824619922786951, -0.007269297260791063, 0.08930030465126038, 0.03513972461223602, 0.04071381315588951, -0.0026918668299913406, -0.00617746589705348, 0.064820297062397, 0.029450710862874985, 0.05654536560177803, -0.011457044631242752, 0.004622324835509062, 0.04051268473267555, 0.006087677553296089, -0.0498507134616375, -0.011363664641976357, 0.01363352406769991, 0.02216704748570919, 0.00023838914057705551, -0.015889016911387444, 0.03973691165447235, 0.0035215148236602545, -0.01288648135960102, -0.045167334377765656, -0.012750002555549145, -0.004737254697829485, -0.0007232484058476985, 0.00644324067980051, -0.003904014825820923, -0.02713775262236595, -0.045655783265829086, 0.049074940383434296, 0.005768029484897852, 0.010049156844615936, 0.002664930187165737, 0.04887381196022034, 0.022497469559311867, 0.019193243235349655, 0.0024799653328955173, -0.0026236274279654026, 0.006838311441242695, -0.06401579082012177, 0.004485846031457186, 0.01623380556702614, 0.037467051297426224, 0.09010481089353561, -0.004144648555666208, -0.024537470191717148, 0.041575782001018524, -0.03936338797211647, -0.01758422888815403, -0.0203138068318367, -0.043127331882715225, -0.04384564235806465, 0.007456058170646429, -0.015458031557500362, 0.04286874085664749, 0.03350197896361351, -0.020285075530409813, 0.02305775135755539, -0.004309860058128834, 0.0019107046537101269, -0.031002260744571686, -0.015544228255748749, 0.0058937338180840015, -0.06085522472858429, 0.032668739557266235, 0.0070861284621059895, -0.005186198279261589, -0.020658595487475395, -0.014495495706796646, -0.01836000382900238, -0.015544228255748749, -0.03338705003261566, 0.017239440232515335, 0.0025446133222430944, -0.10975777357816696, -0.0053514097817242146, 0.014703805558383465, -0.015975214540958405, 0.0021872539073228836, -0.043788179755210876, -0.031002260744571686, 0.0009652290609665215, -0.005078451707959175, 0.004062043037265539, 0.005760846193879843, -0.024293243885040283, 0.022626765072345734, -0.019178876653313637, -0.05008057504892349, -0.022511836141347885, 0.024106483906507492, -0.004496620502322912, -0.009316480718553066, -0.02529887855052948, 0.0012013735249638557, -0.0007043927325867116, 0.0014572713989764452, 0.030140288174152374, 0.01649239845573902, -0.005161057226359844, 0.011413945816457272, 0.0031946836970746517, 0.0057249306701123714, -0.003868099534884095, -0.021420003846287727, -0.008763382211327553, -0.09154143184423447, -0.00820310041308403, -0.03195042908191681, -0.02629014663398266, -0.015213806182146072, 0.06631437689065933, 0.01827380619943142, 0.00923028402030468, -0.04358705133199692, -0.017454933375120163, 0.030312683433294296, 0.012857749126851559, 0.025327611714601517, 0.013317467644810677, 0.03358817473053932, 0.012074790894985199, -0.0026272188406437635, 0.03134704753756523, 0.010573523119091988, -0.006378592923283577, -0.0045181699097156525, 0.03126085177063942, 0.019020849838852882, 0.0076284524984657764, -0.05579832196235657, -0.03548451513051987, 0.03143324702978134, -0.013698171824216843, 0.027410710230469704, -0.05508001148700714, -0.029651837423443794, 0.008368311449885368, -0.042437754571437836, -0.01660732738673687, 0.06867043673992157, 0.0028121836949139833, 0.028272682800889015, -0.017138876020908356, -0.014438031241297722, -0.05872902646660805, 0.012383664958178997, 0.015070144087076187, 0.0008525442099198699, -0.019394369795918465, 0.027496907860040665, 0.010824931785464287, -0.027281414717435837, -0.025758597999811172, 0.027381977066397667, -0.019767891615629196, 0.04013916477560997, -0.02979549951851368, 0.008763382211327553, 0.02558620274066925, 0.02021324448287487, -0.05088508129119873, -0.006026620976626873, -0.004740845877677202, 0.015371833927929401, -0.010925495065748692, 0.011823383159935474, -0.00825338251888752, -0.022985920310020447, 0.04108733311295509, 0.0006006867624819279, 0.0007506339461542666, 4.1807888919720426e-05, -0.004909649025648832, 0.02538507618010044, -0.017124511301517487, 0.0054950714111328125, -0.04916113615036011, 0.008052255026996136, 0.012864932417869568, 0.021348172798752785, -0.031030992045998573, 0.03105972521007061, 0.014768454246222973, -0.015027045272290707, -0.016966482624411583, -0.016865918412804604, -0.00446788826957345, 0.013640707358717918, -0.00864126905798912, 0.022195778787136078, -0.03818536177277565, 0.005732113961130381, -0.02423577941954136, -0.009388311766088009, 0.03781183809041977, -0.04519606754183769, -0.025270145386457443, -0.017268173396587372, -0.005545353516936302, 0.07045184820890427, -0.03223775327205658, -0.0013746657641604543, 0.022698596119880676, 0.010767467319965363, 0.014710988849401474, -0.001881972188130021, 0.009991692379117012, -0.0009329051245003939, 0.007125635165721178, 0.018230708315968513, 0.003117465414106846, -0.047322262078523636, 0.01660732738673687, -0.0431847982108593, -0.007491973228752613, -0.077692411839962, 0.014193805865943432, 0.009244649671018124, -0.010221551172435284, -0.0334157831966877, -0.059246208518743515, -0.018604230135679245, 0.030513809993863106, 0.004363733343780041, -0.01216817181557417, -0.009725917130708694, -0.03749578446149826, -0.04304113611578941, 0.036576345562934875, -0.047609586268663406, 0.036375220865011215, 0.024005921557545662, 0.001735616591759026, 0.00536936754360795, 0.017124511301517487, -0.024393808096647263, 0.04680508002638817, 0.023704230785369873, -0.013540144078433514, 0.01846056804060936, 0.017110144719481468, 0.016161974519491196, -0.07752002030611038, -0.023905357345938683, -0.04746592417359352, -0.06257916986942291, -0.02519831620156765, -0.004248803947120905, -0.03367437422275543, 0.008957325480878353, -0.05654536560177803, 0.04344338923692703, -0.005563311278820038, -0.031002260744571686, -0.01583155244588852, -0.07711776345968246, 0.04327099397778511, 0.03821409121155739, 0.005254437681287527, -0.04105859994888306, 0.07223325222730637, -0.03913353011012077, -0.005243663210421801, -0.0015452643856406212, -0.06947494298219681, -0.028085920959711075, -0.011615073308348656, 0.006439649499952793, 0.0032198247499763966, 0.015687890350818634, -0.05088508129119873, -0.01494084857404232, 0.057665929198265076, 0.04778198152780533, -0.004823451861739159, -0.03513972461223602, -0.010415495373308659, 0.04102986678481102, -0.014538594521582127, -0.014193805865943432, -0.020342539995908737, 0.03910479694604874, 0.05398818105459213, 0.0004888997646048665, 0.035024795681238174, -0.01846056804060936, 0.006482747849076986, 0.03410536050796509, -0.03065747208893299, 0.03465127572417259, -0.050454095005989075, 0.026792963966727257, 0.0012965495698153973, 0.011995777487754822, -0.03200789541006088, 0.0005755458842031658, -0.042552683502435684, -0.0066874660551548, 0.03447888046503067, -0.010710001923143864, -0.013403665274381638, 0.028387611731886864, -0.03769690915942192, -0.037064798176288605, 0.02245437167584896, 0.053097475320100784, -0.021348172798752785, -0.016363102942705154, -0.001617993344552815, -0.06183212623000145, 0.000757817062549293, 0.014042960479855537, 0.009093805216252804, 0.029378879815340042, 0.00943141058087349, 0.0058470433577895164, 0.04054141789674759, -0.01445239782333374, -0.06142987310886383, 0.02294282242655754, 0.018216341733932495, 0.011004509404301643, 0.017814088612794876, 0.020356906577944756, -0.0116294389590621, -0.02344563975930214, -0.045655783265829086, 0.05663156136870384, 0.05206311121582985, -0.010530425235629082, -0.027367612347006798, -0.0035233106464147568, -0.0357431061565876, -0.03545578196644783, -0.02394845522940159, -0.03786930441856384, 0.006949649192392826, 0.0058470433577895164, 0.028962260112166405, -0.006647959351539612, 0.02159239910542965, -0.01435901690274477, 0.019767891615629196, 0.006073310971260071, 0.0015793840866535902, -0.014258453622460365, -0.0272526815533638, -0.0014734334545210004, 0.0084904246032238, -0.05413184314966202, -0.014840285293757915, 0.009776199236512184, -0.037840571254491806, 0.01049450971186161, -0.000860176223795861, 0.04220789670944214, -0.036403950303792953, -0.0002374912437517196, 0.029350146651268005, -0.019308174028992653, 0.007007114123553038, -0.015788454562425613, -0.020256342366337776, 0.004414014983922243, 0.0025104933883994818, -0.03542704880237579, 0.02443690598011017, -0.02323014661669731, -0.01962422952055931, 0.008777748793363571, -0.004568451549857855, -0.03456507623195648, -0.030054090544581413, 0.03370310738682747, -0.005484296940267086, 0.00017104757716879249, 0.02248310297727585, -0.028746766969561577, -0.044793810695409775, -0.041173528879880905, -0.02901972457766533, -0.05674649029970169, 0.011765917763113976, -0.01294394675642252, 0.04433409497141838, -0.017354369163513184, -0.00205257092602551, -0.02912028878927231, -0.0008251586114056408, 0.028387611731886864, -0.04344338923692703, 0.016248172149062157, -0.0031102823559194803, -0.02940761111676693, -0.0021980286110192537, 0.006741339340806007, -0.06033804267644882, 0.05292508006095886, -0.04200676828622818, 0.015529862605035305, 0.013360566459596157, -0.02492535673081875, 0.0048845079727470875, -0.09274818748235703, -0.06740621477365494, -0.047523390501737595, 0.009797748178243637, -0.0005319983465597034, 0.023574935272336006, 0.031030992045998573, 0.005380142014473677, -0.02470986358821392, -0.05168958753347397, -0.012232819572091103, 0.05258029326796532, -0.006023029331117868, -0.0077649313025176525, 0.029077189043164253, -0.016822820529341698, 0.05390198528766632, 0.02157803252339363, 0.028344513848423958, 0.044104233384132385, -0.024594934657216072, 0.014782819896936417, 0.07246311753988266, -0.016822820529341698, -0.01167972106486559, 0.03557071089744568, -0.02228197641670704, -0.0383002907037735, -0.031232118606567383, 0.022310709580779076, 0.022885357961058617, -0.03146198019385338, 0.01089676283299923, 0.005566902458667755, -0.02374732866883278, 0.014430847950279713, 0.001617993344552815, 0.019969018176198006, -0.0021675005555152893, 0.02315831556916237, 0.0037567613180726767, -0.010041973553597927, 0.009991692379117012, -0.01117690373212099, 0.029766766354441643, 0.0007052906439639628, -0.0030869373586028814, -0.025643667206168175, 0.005965564865618944, 0.0511724054813385, 0.020558033138513565, 0.008016339503228664, 0.0028516908641904593, -0.006181057542562485, -0.00839704368263483, 0.019092680886387825, 0.00821028370410204, 0.01461042556911707, -0.07418705523014069, -0.0617171972990036, -0.007014297414571047, 0.019006483256816864, -0.005085634998977184, 0.040857475250959396, 0.026994090527296066, -0.02831578068435192, -0.004295493941754103, 0.020428737625479698, 0.016750989481806755, 0.012419580481946468, 0.02208084985613823, -0.005886550527065992, 0.002966620260849595, 0.02629014663398266, 0.024839160963892937, -0.01583155244588852, 0.012563242577016354, 0.04709240421652794, -0.007039438001811504, -0.05691888555884361, 0.030887329950928688, 0.010523241944611073, 0.05976339429616928, 0.018733525648713112, 0.004482254385948181, -0.0036005289293825626, -0.03445014730095863, -0.001715863007120788, 0.010516058653593063, -0.012369298376142979, 0.00605894485488534, 0.034335218369960785, 0.028401978313922882, 0.001226514345034957, -0.0026918668299913406, 0.04114479944109917, 0.014639157801866531, 0.01293676346540451, -0.030513809993863106, 0.05105747655034065, -0.03858761489391327, 0.026821695268154144, -0.02373296208679676, -0.023201413452625275, -0.0023829934652894735, -0.0016871306579560041, -0.008842396549880505, -0.023804793134331703, -0.04102986678481102, -0.029623104259371758, 0.011270283721387386, 0.020787891000509262, 0.01640620082616806, -0.0183743704110384, 0.0331859216094017, 0.02100338414311409, 0.018733525648713112, -0.007060987409204245, 0.00943141058087349, 0.0013073242735117674, -0.001216637552715838, 0.024767329916357994, 0.015228171832859516, 0.03577183932065964, -0.007599719800055027, -0.0072764805518090725, -0.014739721082150936, -0.035886768251657486, 0.02754000574350357, 0.039593249559402466, 0.017943384125828743, -0.037754375487565994, 0.00031089354888536036, 0.027769865468144417, 0.0026128527242690325, 0.03654761239886284, 0.0020417962223291397, -0.03450761362910271, -0.023905357345938683, 0.05352846160531044, -0.025629300624132156, -0.00034029936068691313, 0.04887381196022034, 0.016865918412804604, 0.00037127648829482496, -0.026936626061797142, 0.03445014730095863, 0.016679158434271812, -0.004263170063495636, 0.02920648455619812, 0.03195042908191681, -0.016133243218064308, -0.029967892915010452, 0.033157188445329666, -0.01260634046047926, -0.017541131004691124, -0.03146198019385338, 0.0052508460357785225, 0.005322677083313465, 0.0019484158838167787, -0.045081134885549545, 0.012670988216996193, -0.015170707367360592, 0.01611887663602829, 0.0026900710072368383, 0.004959930665791035, -0.005401691421866417, 0.012290284037590027, 0.05352846160531044, -0.03827155753970146, 0.06418818235397339, 0.011449861340224743, 0.018316905945539474, 0.01923634298145771, -0.01933690533041954, 0.021807892248034477, 0.010135354474186897, 0.04169071465730667, 0.034220289438962936, 0.035197190940380096, 0.014983946457505226, 0.023474371060729027, 0.004230846185237169, -0.0010074297897517681, -0.03717972710728645, -0.024781694635748863, 0.014926481992006302, -0.010810566134750843, -0.01244831271469593, -0.055827055126428604, -0.024480005726218224, -0.013245636597275734, 0.0159321166574955, 0.022626765072345734, 0.03723718971014023, 0.010120987892150879, -0.018331270664930344, -0.029421977698802948, -0.017253806814551353, 0.029738035053014755, -0.0029791907873004675, -0.02393409051001072, -0.004252395126968622, 0.011643805541098118, 0.0400816984474659, -0.016262538731098175, -0.028071556240320206, 0.0017706342041492462, 0.010638170875608921, -0.034823670983314514, -0.024738596752285957, -0.0027098245918750763, 0.020773526281118393, 0.030427612364292145, -0.01963859610259533, 0.00420211348682642, 0.01547239813953638, 0.024853525683283806, 0.015946483239531517, -0.032582543790340424, -0.04970705136656761, 0.010480143129825592, -0.020385637879371643, 0.009323664009571075, 0.021822258830070496, 0.026045920327305794, 0.014998313039541245, -0.02558620274066925, -0.034335218369960785, 0.022195778787136078, 0.010587889701128006, 0.026634935289621353, -0.030398879200220108, -0.04950592666864395, 0.03378930315375328, -0.005627959035336971, -0.01396394707262516, -0.05022423714399338, -0.05959099903702736, -0.02863183803856373, 0.022641131654381752, -0.01649239845573902, -0.03137578070163727, -0.041374657303094864, -0.0008543399744667113, 0.023416906595230103, -0.015170707367360592, -0.0012103524059057236, -0.046632684767246246, 0.03761071339249611, 0.014280003495514393, 0.009151269681751728, -0.015414932742714882, 0.04160451516509056, 0.0013064263621345162, -0.01690901815891266, 0.009208734147250652, 0.00304024713113904, -0.014430847950279713, 0.00034478880115784705, 0.027611836791038513, 0.0017778172623366117, 0.04993691295385361, 0.008720283396542072, 0.030226485803723335, -0.0010639966931194067, -0.01866169460117817, -0.004054860211908817, -0.057694658637046814, -0.042236629873514175, 0.015644792467355728, -0.0027457401156425476, -0.04979325085878372, -0.020083947107195854, -0.00820310041308403, 0.015127608552575111, -0.025729864835739136, 0.002907359739765525, -0.0076284524984657764, 0.0050604939460754395, 0.0018155286088585854, 0.013030143454670906, 0.04005296528339386, -0.039794374257326126, -0.02695099264383316, -0.016075778752565384, 0.0007982220267876983, 0.017598595470190048, -0.00671619875356555, 0.043213531374931335, -0.015529862605035305, 0.04510986804962158, 0.025844793766736984, 0.039794374257326126, 0.02354620210826397, -0.0017562679713591933, -0.02999662607908249, -0.00473366305232048, 0.028057189658284187, -0.0007043927325867116, 0.04901747405529022, 0.07361240684986115, 0.002435070928186178, -0.011507326737046242, 0.020945919677615166, -0.0015219193883240223, 0.03660507872700691, 0.003437113482505083, 0.003965071402490139, 0.025456907227635384, -0.002444049809128046, -0.04582817852497101, -0.02626141346991062, -0.03367437422275543, -0.020687328651547432, -0.020141413435339928, 0.01514197513461113, 0.0012453700182959437, 0.021664230152964592, -0.018230708315968513, 0.0046007754281163216, 0.02705155499279499, 0.057694658637046814, -0.02088845521211624, -0.02088845521211624, 0.0009571480914019048, -0.0134323975071311, -0.009725917130708694, -0.01652112975716591, -0.027295781299471855, 0.03789803758263588, 0.011794649995863438, -0.009014790877699852, -0.004065634682774544, -0.01290084794163704, 0.03812789544463158, 0.0022554935421794653, -0.01769915781915188, 0.01649239845573902, 0.0012866727774962783, -0.0015425707679241896, 0.001539877150207758, 0.002242923015728593, -0.001192394644021988, 0.004015353042632341, 0.03407662734389305, 0.014955214224755764, 0.04427662864327431, 0.02394845522940159, -0.019796624779701233, -0.0012633277801796794, -0.06798086315393448, -0.012635072693228722, 0.007851128466427326, 0.012821833603084087, 0.021463103592395782, -0.015400567092001438, -0.022712962701916695, 0.01245549600571394, -0.018230708315968513, -0.005735705606639385, 0.0194231029599905, 0.004428381100296974, -0.025270145386457443, -0.04916113615036011, 0.02228197641670704, -0.05180451646447182, -0.010559157468378544, 0.037064798176288605, -0.02256930060684681, 0.015558594837784767, -0.05918874591588974, 0.017138876020908356, 0.0077649313025176525, -0.009079438634216785, -0.005811127834022045, -0.03200789541006088, 0.03976564109325409, 0.010975777171552181, 0.025054654106497765, 0.026721132919192314, 0.02851690724492073, 0.009273381903767586, 0.0617171972990036, -0.0470636710524559, -0.018977750092744827, -0.03332958370447159, -0.006536621134728193, 0.024968456476926804, -0.022052116692066193, 0.014754087664186954, -0.034220289438962936, 0.019078314304351807, 0.02363239973783493, 0.03028395026922226, 0.027396343648433685, 0.026907892897725105, 0.026017189025878906, -0.013849017210304737, -0.0437307134270668, -0.01962422952055931, -0.017354369163513184, -0.00620619859546423, -0.014588876627385616, 0.02647690661251545, 0.028373245149850845, 0.01192394644021988, -0.015946483239531517, -0.02528451196849346, -0.011083523742854595, 0.011248734779655933, 0.011026058346033096, -0.0017679404700174928, 0.013037326745688915, 0.037467051297426224, 0.023890990763902664, -0.006852677557617426, -0.02804282307624817, 0.042351558804512024, 0.04393184185028076, -0.01371972169727087, -0.012635072693228722, 0.012484228238463402, 0.008167184889316559, 0.010214368812739849, 0.018690425902605057, 0.014825918711721897, 0.0359729640185833, 0.014969580806791782, -0.039305925369262695, 0.010853664018213749, -0.03344451263546944, 0.015989581122994423, 0.006033804267644882, 0.02784169651567936, -0.00632471963763237, -0.026520006358623505, 0.040282826870679855, -0.004611550364643335, 0.03344451263546944, -0.06263663619756699, 0.025629300624132156, -0.05243663117289543, -0.02988169714808464, 0.005290353205054998, -0.00787267740815878, 0.003304226091131568, -0.038041699677705765, 0.0005387325072661042, 0.019983384758234024, -0.007937326095998287, 0.05976339429616928, 0.02040000446140766, 0.020241975784301758, 0.03720846027135849, -0.014481130056083202, -0.0023470779415220022, 0.04620169848203659, -0.0027367612347006798, 0.0038429584819823503, 0.0028570780996233225, -0.020917188376188278, 0.01935127191245556, 0.01719634234905243, 0.001270510838367045, -0.021563665941357613, 0.0183743704110384, 0.022626765072345734, -0.031634371727705, -0.005872184410691261, -0.008547889068722725, 0.006432466208934784, 0.02450873702764511, 0.03887493908405304, -0.03717972710728645, 0.01913577876985073, 0.011119439266622066, 0.0054950714111328125, 0.007987607270479202, 0.005193381570279598, -0.006845494266599417, 0.013346199877560139, -0.030140288174152374, 0.007578170858323574, -0.02489662542939186, -0.0158171858638525, 0.011945495381951332, 0.037150993943214417, 0.006216973066329956, 0.009086621925234795, -0.003625669749453664, -0.005035353358834982, 0.0663718432188034, 0.01440929900854826, 0.023761695250868797, -0.021534934639930725, -0.006795212626457214, -0.04051268473267555, -0.012864932417869568, -0.00790859293192625, -0.0002583671303000301, 0.0036400360986590385, -0.03416282311081886, 0.0488450825214386, -0.00026263209292665124, 0.0018442609580233693, -0.006989156361669302, -0.005265212617814541, -0.01000605896115303, 0.031203387305140495, 0.002928909147158265, -0.009575072675943375, 0.013037326745688915, 0.0028319372795522213, 0.0046546487137675285, -0.009294931776821613, 0.03028395026922226, -0.0021082398016005754, -0.020960286259651184, -0.028775498270988464, -0.00349098676815629, 0.003860916243866086, -0.013576059602200985, 0.019265074282884598, -0.049563389271497726, 0.015889016911387444, 0.012433946132659912, 0.011076340451836586, -0.025356343016028404, -0.03850141540169716, 0.009991692379117012, -0.02443690598011017, -0.0051287333481013775, -0.0036202825140208006, -8.176387927960604e-05, 0.021218877285718918, -0.007007114123553038, 0.004805494099855423, 0.004385282751172781, 0.014667890034615993, 0.01846056804060936, -0.0372946560382843, -0.005028170067816973, -0.04904620721936226, -0.02343127317726612, -0.0009786974405869842, -0.030513809993863106, -0.03097352758049965, 0.05148846283555031, -0.01313070673495531, -0.04519606754183769, 0.0033563035540282726, -0.03304225951433182, -0.003857324831187725, -0.014912116341292858, -0.005940423812717199, -0.0074129593558609486, -0.007229790091514587, -0.0046869730576872826, 0.024192681536078453, -0.00011492960038594902, -0.04442029073834419, 0.015027045272290707, 0.024365074932575226, 0.021563665941357613, -0.02101775072515011, -0.017253806814551353, -0.05648789927363396, 0.018819723278284073, 0.03126085177063942, -0.006838311441242695, -0.028502540662884712, 0.0003459111612755805, 0.018187610432505608, 0.032668739557266235, -0.00771464966237545, -0.008950143121182919, 0.0012390847550705075, 0.030600005760788918, 0.017167609184980392, 0.008425776846706867, -0.005193381570279598, 0.0011654580011963844, -0.026045920327305794, -0.0017966729355975986, -0.004525353200733662, -0.012678171508014202, -0.0021423595026135445, -0.010824931785464287, 0.0015784862916916609, 0.011334932409226894, -0.02999662607908249, 0.027611836791038513, -0.028200851753354073, -0.03146198019385338, 0.03048507682979107, -0.0018406694289296865, -0.004119507968425751, 0.018115779384970665, 0.03939212113618851, 0.016664791852235794, 0.006396550685167313, -0.007294438313692808, -0.005089226644486189, -0.014926481992006302, 0.009934227913618088, 0.004018944688141346, 0.0042344373650848866, -0.01963859610259533, -0.01795775070786476, -0.0010927291586995125, -0.010322114452719688, -0.012247186154127121, -0.019308174028992653, 0.007064579054713249, -0.030255217105150223, -0.009251832962036133, -0.014215354807674885, 0.003119261236861348, 0.0030617965385317802, -0.012369298376142979, 0.014883383177220821, 0.03672000765800476, 0.05275268852710724, -0.010674086399376392, -0.0017751236446201801, 0.009100987575948238, -0.00048665504436939955, -0.00532626872882247, -0.013497045263648033, 0.02324451133608818, -0.02950817532837391, -0.030456343665719032, 0.008950143121182919, 0.0059152827598154545, 0.025844793766736984, 0.0062457057647407055, 0.0015650179702788591, 0.020428737625479698, -0.014926481992006302, 0.041661981493234634, 0.0114354956895113, 0.04505240544676781, 0.022138314321637154, 0.012146621942520142, 0.023618033155798912, -0.011521692387759686, -0.0030079232528805733, 0.009804931469261646, -0.013999862596392632, -0.029335780069231987, -0.0011968840844929218, 0.011564791202545166, 0.013245636597275734, -0.01122718583792448, -0.036978598684072495, 0.013899298384785652, -0.008282114751636982, -0.016348736360669136, -0.010243101045489311, -0.01788591966032982, -0.014983946457505226, 0.0437307134270668, 0.011370847932994366, -0.02450873702764511, -0.01044422760605812, 0.04407550394535065, -0.012196904048323631, -0.013410847634077072, -0.02452310360968113, 0.020874088630080223, -0.019609862938523293, 0.0034101768396794796, 0.03445014730095863, -0.029824232682585716, -0.005699790082871914, 0.025025920942425728, 0.021721694618463516, -0.007815212942659855, -0.010343664325773716, -0.001407887670211494, 0.003381444374099374, -0.007901410572230816, -0.006622818298637867, 0.032668739557266235, -0.03174930438399315, 0.014811552129685879, 0.021132681518793106, 0.01392084825783968, 0.038357753306627274, -0.026792963966727257, 0.0023776062298566103, -0.012283101677894592, 0.036174092441797256, -0.0036526063922792673, -0.04594310745596886, -0.0004660036356654018, 0.011765917763113976, 0.016190707683563232, 0.01797211728990078, 0.01925070770084858, 0.014229721389710903, -0.02266986481845379, -0.01060225535184145, -0.00889267772436142, -0.003789085429161787, -0.009575072675943375, 0.011981410905718803, 0.03973691165447235, 0.036174092441797256, -0.031088456511497498, -0.04197803884744644, -0.033070992678403854, 0.011291833594441414, 0.003117465414106846, 0.032956063747406006, 0.0024171131663024426, -0.03192169591784477, 0.01817324385046959, -0.029738035053014755, 0.0113780302926898, 0.019983384758234024, -0.01640620082616806, 0.029852963984012604, 0.0032719022128731012, 0.01583155244588852, -0.0063354941084980965, 0.012010143138468266, -0.00840422697365284, -0.027410710230469704, 0.01746929995715618, 0.004525353200733662, -0.029565639793872833, 0.0004177421797066927, -0.013655073009431362, -0.04111606627702713, -0.020069582387804985, -0.029824232682585716, -0.03028395026922226, -0.01758422888815403, -0.00836112815886736, 0.005926057696342468, -0.027094652876257896, 0.01749803125858307, 0.054763954132795334, 0.018115779384970665, -0.007251339498907328, 0.009488875046372414, 0.014739721082150936, 0.002508697798475623, 0.014768454246222973, -0.005064085591584444, 0.026318879798054695, 0.015371833927929401, -0.015127608552575111, -0.015759721398353577, 0.030829865485429764, -0.002718803472816944, 0.00348021206445992, -0.003525106469169259, -0.009294931776821613, 0.030312683433294296, 0.005322677083313465, -0.026247048750519753, 0.013949580490589142, -0.029738035053014755, -0.019466200843453407, 0.0032629233319312334, -0.017454933375120163, -0.014869017526507378, 0.03275493532419205, -0.013288735412061214, 0.0003515229618642479, -0.00583626888692379, 0.004069226328283548, -0.01746929995715618, 0.0006267254939302802, -0.010595072992146015, -0.015486763790249825, 0.00644324067980051, 0.00407640915364027, 0.047322262078523636, -0.021319441497325897, 0.031117189675569534, -0.006529437843710184, -0.0063678184524178505, -0.013547326438128948, -0.018992116674780846, 0.04404677078127861, 0.019107045605778694, 0.015673523768782616, 0.007258522789925337, 0.014330284669995308, 0.010559157468378544, 0.02706592157483101, 0.026821695268154144, 0.021333808079361916, 0.0005041638505645096, -0.009575072675943375, -0.024350710213184357, 0.005807536654174328, 0.00021392169583123177, -0.004949156194925308, 0.01915014535188675, 0.022727329283952713, -0.0007780195446684957, 0.015213806182146072, -0.017627328634262085, 0.011112255975604057, -0.002605669666081667, 0.02108958177268505, -0.021951554343104362, 0.02080225758254528, 0.00235605682246387, -0.021549301221966743, 0.02041437104344368, 0.012678171508014202, -0.011061973869800568, -0.02001211792230606, 0.006522255018353462, 0.0045864093117415905, -0.012987044639885426, 0.038329023867845535, 0.0012193312868475914, -0.010027607902884483, -0.008217466995120049, 0.017138876020908356, -0.028832964599132538, -0.03016902133822441, 0.028789864853024483, -0.0013369545340538025, 0.05901635065674782, -0.012024509720504284, -0.004931198433041573, -0.012663805857300758, -0.021563665941357613, -0.01670789159834385, -0.019178876653313637, -0.03798423334956169, -0.02001211792230606, -0.004834226332604885, -0.03407662734389305, -0.031289584934711456, -0.03459380939602852, -0.01420817244797945, 0.0014698418090119958, 0.024551836773753166, 0.01363352406769991, -0.0174836665391922, 0.035886768251657486, 0.04358705133199692, 0.04778198152780533, -0.016276905313134193, -0.028876062482595444, -0.018834087997674942, 0.0015829757321625948, -0.01642056740820408, -0.007994790561497211, -0.009287748485803604, -0.019667327404022217, -0.007614085916429758, -0.01591775007545948, -0.00888549443334341, 0.02256930060684681, -0.010063523426651955, -0.014581693336367607, 0.011485776863992214, -0.03818536177277565, 0.010128171183168888, -0.050856348127126694, -0.01709577813744545, 0.013245636597275734, -0.00019652512855827808, 0.012283101677894592, -0.020543666556477547, 0.036001697182655334, -0.007556621450930834, -0.014236904680728912, -0.027367612347006798, -0.019667327404022217, -0.015572961419820786, 0.018532399088144302, -0.0036777472123503685, 0.04620169848203659, -0.019121412187814713, -0.022928455844521523, -0.0004565757990349084, 0.012793101370334625, 0.007987607270479202, 0.008066621609032154, -0.0008857660577632487, 0.02393409051001072, -0.007405776064842939, 0.01591775007545948, -0.03505352884531021, -0.015271270647644997, 0.03126085177063942, 0.04114479944109917, -0.01244831271469593, 0.012319017201662064, 0.0154292993247509, -0.013683806173503399, -0.025428174063563347, 0.0004987764987163246, 0.022928455844521523, 0.016133243218064308, -0.007980423979461193, 0.01955239847302437, 0.01746929995715618, -0.00967563595622778, 0.002918134443461895, -0.02940761111676693, -0.014667890034615993, 0.004715705290436745, -0.018302539363503456, 0.02169296331703663, -0.010422678664326668, 0.008066621609032154, 0.011787467636168003, -0.011090707033872604, 0.0488450825214386, -0.017253806814551353, -0.029321415349841118, -0.001095422776415944, 0.00461514201015234, -0.012189720757305622, 0.003986620809882879, 0.0011897009098902345, -0.029910428449511528, -0.0016224827850237489, -0.004209296777844429, 0.009790565818548203, -0.015616059303283691, 0.0004255986714269966, 0.032668739557266235, -0.01972479373216629, -0.01652112975716591, 0.0027978175785392523, 0.008598171174526215, 0.011780284345149994, 0.031892966479063034, -0.027812963351607323, 0.005890142172574997, -0.009438593871891499, 0.00026622365112416446, 0.014926481992006302, -0.001657500397413969, -0.022210145369172096, -0.05479268729686737, -0.007922959513962269, 0.04134592413902283, 0.04577071592211723, 0.007251339498907328, -0.0047085219994187355, -0.011090707033872604, 0.005656691268086433, -0.005387325305491686, 0.003063592128455639, 0.014466763474047184, -0.032783668488264084, 0.02909155562520027, 0.02101775072515011, 0.0158171858638525, 0.029824232682585716, 0.021333808079361916, -0.006507888901978731, -0.017052680253982544, 0.013087608851492405, -0.019767891615629196, -0.0025194722693413496, -0.022052116692066193, -0.010630988515913486, 0.0036921135615557432, 0.000571954355109483, -0.01049450971186161, -0.0027116204146295786, -0.03195042908191681, 0.0043421839363873005, 0.038731276988983154, 0.012979862280189991, -0.023761695250868797, -0.015213806182146072, -0.012965495698153973, -0.01983972266316414, -0.0016799475997686386, -0.012857749126851559, 0.019221976399421692, 0.0055920435115695, 0.006867043673992157, 0.0021710919681936502, 0.01538620050996542, 0.012965495698153973, -0.006288804113864899, -0.014495495706796646, -0.03562817722558975, -0.026132117956876755, 0.004888099618256092, -0.009129720740020275, -0.0024997189175337553, -0.026318879798054695, -0.030054090544581413, -0.009100987575948238, 0.009086621925234795, 0.03269747272133827, -0.012527327053248882, -0.016779722645878792, -0.027180850505828857, -0.005398099776357412, 0.04192057251930237, -0.01815887726843357, 0.0248104277998209, 0.002697254065424204, -0.027310146018862724, 0.005067677237093449, -0.011299016885459423, 0.0017490849131718278, -0.017325637862086296, 0.024752963334321976, 0.002097465330734849, 0.014215354807674885, 0.026692399755120277, -0.005692606791853905, 0.009251832962036133, 0.005293944850564003, 0.01591775007545948, 0.012829016894102097, -0.0003043838660232723, 0.01040831208229065, 0.021606765687465668, -0.03815662860870361, 0.014416482299566269, -0.020974652841687202, -0.024968456476926804, -0.006295987404882908, -0.0194231029599905, -0.007843945175409317, -0.0380704291164875, -0.029479442164301872, 0.03858761489391327, 0.020744793117046356, -0.020385637879371643, -0.03967944532632828, -0.01190957985818386, 0.020385637879371643, 0.015256904996931553, -0.018834087997674942, -0.010472959838807583, -0.001930458121933043, 0.0008291990961879492, 0.0009248241549357772, -0.013798735104501247, -0.0006155018927529454, -0.002532042795792222, -0.005940423812717199, -0.045454658567905426, 0.009531973861157894, -0.02070169523358345, 0.017555497586727142, -0.02305775135755539, 0.02412085048854351, -0.000772183237131685, -0.021132681518793106, -0.012218452990055084, -0.003857324831187725, -0.02656310424208641, 0.0004996744100935757], "index": 39}, {"title": "Horace Farquhar, 1st Earl Farquhar", "text": "Horace Brand Farquhar, 1st Earl Farquhar GCB GCVO PC (19 May 1844 \u2013 30 August 1923), was a British financier, courtier and Conservative politician.", "vector": [0.0055586532689630985, -0.002701384946703911, -0.01830918900668621, -0.00044727849308401346, -0.02689693681895733, -0.019882192835211754, -0.04296707734465599, -0.01609848253428936, -0.08196622133255005, 0.008899513632059097, -0.01786988228559494, 0.08508387953042984, -0.04461093619465828, 0.010281205177307129, -0.017969081178307533, 0.0502510741353035, -0.02333996631205082, 0.0017200293950736523, -0.08797480911016464, -0.0019928249530494213, 0.04461093619465828, 0.012449398636817932, -0.015333238057792187, -0.02922101318836212, 0.009657672606408596, 0.04018952324986458, 0.025196392089128494, 0.004520612768828869, 0.04356226697564125, -0.005509053822606802, -0.01108187809586525, 0.03795047104358673, 0.021823646500706673, 0.035371314734220505, 0.017473088577389717, -0.0021115087438374758, 0.019287003204226494, 0.018337532877922058, 0.0020530526526272297, -0.004595011472702026, 0.011861294507980347, -0.005292943213135004, -0.041890066117048264, 0.03469109535217285, 0.022546378895640373, 0.0003195162571500987, 0.012272259220480919, 0.0428253635764122, -0.0002382532984483987, 0.015304895117878914, 0.051923274993896484, -0.027803894132375717, -0.017218006774783134, 0.041294876486063004, 0.043193817138671875, 0.005696822423487902, 0.024331949651241302, 0.03367077186703682, -0.009856069460511208, 0.011847122572362423, -0.025168050080537796, -0.04030289128422737, -0.028257371857762337, -0.030042942613363266, -0.0258482675999403, 0.015446607954800129, 0.004407242871820927, 0.016509447246789932, -0.044979386031627655, -0.03829058259725571, 0.020009733736515045, -0.04251359775662422, 0.008127182722091675, 0.027081161737442017, 0.02526724897325039, 0.006582522299140692, 0.049400802701711655, -0.016282707452774048, 0.0015349180903285742, 0.014752218499779701, 0.01130861695855856, -0.029929572716355324, -0.020874176174402237, 0.04257028177380562, 0.0031991482246667147, -0.06116289645433426, -0.002109737368300557, -0.04588634520769119, -0.012669051997363567, 0.05107300356030464, -0.011960492469370365, 0.0236233901232481, -0.008148440159857273, -0.000751073588617146, 0.01461050659418106, 0.04001946747303009, 0.03707185760140419, -0.012746994383633137, -0.009530131705105305, -0.02051989734172821, 0.01026703417301178, 0.024785427376627922, -0.021015889942646027, 0.03653335198760033, 0.03055310621857643, 0.015276553109288216, -0.019386200234293938, -0.015559976920485497, 0.03659003600478172, 0.03897079825401306, 0.006323897745460272, -0.03882908821105957, 0.014057829976081848, 0.02406269684433937, -0.0034223448019474745, 0.01314378809183836, 0.007209597621113062, 0.007879187352955341, -0.0065789795480668545, -0.03766704723238945, 0.042315203696489334, -0.06870197504758835, 0.003443601541221142, -0.024700401350855827, 0.06399713456630707, -0.04840881749987602, -0.0071918838657438755, 0.039934441447257996, -0.00208848062902689, -0.025508159771561623, -0.02316991053521633, -0.019442886114120483, 0.032735470682382584, -0.050307758152484894, 0.014072000980377197, 0.0031725773587822914, 0.01232185773551464, -0.023155739530920982, -0.011549527756869793, 0.02333996631205082, 0.03296221047639847, 0.02363756112754345, 0.02112925797700882, 0.002611043630167842, 0.04257028177380562, 0.024700401350855827, 0.03304723650217056, 0.014823074452579021, 0.007145827170461416, 0.03738362342119217, -0.03327397629618645, 0.013986974023282528, 0.025649871677160263, -0.0014622906455770135, -0.01906026341021061, -0.06473404169082642, 0.004967005457729101, -0.03114829584956169, -0.033330660313367844, -0.006352240219712257, -0.021653592586517334, 0.03647666797041893, -0.06309018284082413, -0.012187231332063675, 0.024303607642650604, 0.04619811102747917, -0.0003987864183727652, 0.013405954465270042, -0.006784461904317141, 0.00199459632858634, -0.008502719923853874, 0.01232185773551464, 0.0023099055979400873, -0.01799742318689823, 0.0006341611733660102, 0.01758645847439766, -0.004155704285949469, -0.015701688826084137, 0.0176998283714056, -0.03738362342119217, -0.008984540589153767, -0.005544481799006462, -0.0169912688434124, 0.01948539912700653, -0.00967892911285162, 0.02747795544564724, 0.04353392496705055, 0.02553650178015232, 0.005771221127361059, -0.013568923808634281, -0.013767320662736893, 0.025281419977545738, -0.03970770165324211, -0.020732464268803596, -0.023680074140429497, 0.04367563873529434, 0.016495276242494583, 0.007248568814247847, -0.013490982353687286, 0.00870820228010416, 0.04900400713086128, 0.019272832199931145, 0.004251359961926937, 0.00671360595151782, -0.01728886365890503, 0.0059448182582855225, 0.027704695239663124, 0.00804924126714468, -0.010451260022819042, 0.04784196987748146, 0.015078156255185604, -0.04710506647825241, 0.0030025229789316654, 0.011159819550812244, 0.011549527756869793, 0.01920197531580925, -0.010699255391955376, 0.04050128906965256, 0.025153879076242447, -0.03619324415922165, -0.021738620474934578, -0.02039235644042492, 0.028144001960754395, -0.0026553284842520952, -0.012846192345023155, 0.014199541881680489, -0.01202426292002201, -0.031204981729388237, -0.014780561439692974, 0.0059129330329597, -8.502719720127061e-05, 0.025323932990431786, -0.04206012189388275, 0.08332665264606476, -0.03888577222824097, 0.01846507377922535, -0.03327397629618645, -0.040557973086833954, 0.023524191230535507, -0.03466275334358215, 0.01743057556450367, 0.04931577295064926, 0.0354846827685833, -0.03480446711182594, -0.004931577481329441, 0.053397081792354584, -0.034039221704006195, -0.0026677283458411694, -0.031516749411821365, 0.02404852584004402, -0.009246707893908024, -0.08304323256015778, 0.008956198580563068, 0.024105209857225418, -0.016452763229608536, -0.00017437218048144132, -0.016424421221017838, 0.05178156495094299, 0.06292012333869934, 0.020123103633522987, -0.04271199554204941, -0.0066037788055837154, 0.05067620798945427, 0.04203177988529205, -0.0679083913564682, 0.00620698556303978, -0.0635436624288559, -0.05433237925171852, 0.008878256194293499, 0.0032629186753183603, 0.019272832199931145, 0.01684955693781376, -0.010720512829720974, 0.02188033238053322, -0.05274520441889763, -0.01965545304119587, -0.03746865317225456, -0.03335900232195854, -0.0034152590669691563, 0.04523446783423424, 0.02197953127324581, -0.015460778959095478, -0.016778700053691864, -0.036249928176403046, -0.026485972106456757, -0.013391783460974693, 0.01612682454288006, 0.005576367024332285, 0.026117520406842232, -0.03925422206521034, -0.023850128054618835, 0.016240194439888, 0.021214285865426064, 0.011131477542221546, -0.036845117807388306, 0.0007794160046614707, -0.013682292774319649, -0.022121243178844452, -0.01995304971933365, 0.010982680134475231, 0.018521757796406746, 0.025451473891735077, 0.021611079573631287, -0.019244488328695297, -0.018436729907989502, -0.002164650708436966, -0.0016961154760792851, 0.02924935519695282, 0.060482680797576904, 0.016197681427001953, 0.023269109427928925, -0.008899513632059097, 0.021200114861130714, -8.308972610393539e-05, -0.04529115557670593, -0.0486922413110733, -0.03590982034802437, -0.01904609240591526, -0.07760149240493774, 0.0060688164085149765, 0.02424692176282406, 0.009799384512007236, -0.06286343932151794, -0.04563126340508461, 0.017983252182602882, -0.046169769018888474, 0.02494131214916706, 0.014504223130643368, -0.034492701292037964, -0.014794732443988323, 0.029135987162590027, -0.035683080554008484, 0.05387889966368675, -0.010869310237467289, 0.00487489253282547, 0.002154022455215454, -0.023566704243421555, 0.010302461683750153, 0.016594475135207176, 0.005909390281885862, 0.01597094163298607, 0.05379387363791466, 0.07204637676477432, 0.021214285865426064, 0.007694961503148079, 0.02570655569434166, 0.049089036881923676, 0.007060800213366747, 0.020335670560598373, 0.01653778925538063, 0.00042823594412766397, 0.04418579861521721, 0.02832822874188423, -0.005824362859129906, 0.03157343342900276, 0.008736544288694859, -0.024020183831453323, 0.01225100178271532, 0.033302318304777145, 0.01978299394249916, 0.03588147833943367, -0.03072316013276577, 0.014964786358177662, 0.04619811102747917, -0.022107072174549103, -0.01670784503221512, 0.02054823935031891, -0.02083166316151619, 0.022999856621026993, -0.020590752363204956, -0.012165974825620651, 0.008290152065455914, -0.030184654518961906, -0.033585742115974426, 0.01432708278298378, 0.004697752650827169, -0.05801689252257347, 0.02479959838092327, -0.01803993619978428, -0.006770290434360504, 0.025451473891735077, -0.0010991536546498537, 0.0664912685751915, -0.023382479324936867, 0.04611308500170708, -0.05217835679650307, 0.002614586381241679, -0.0025596730411052704, -0.003904165467247367, -0.0034365158062428236, -0.015744201838970184, 0.020732464268803596, 0.03738362342119217, 0.03279215469956398, -0.01801159419119358, -0.0009149280958808959, 0.014334168285131454, 0.006224699318408966, 0.0605960488319397, -0.042456913739442825, -0.04744517803192139, 0.025890782475471497, 0.018932722508907318, 0.021625250577926636, -0.015574147924780846, -0.0136681217700243, 0.000315309182042256, -0.013519324362277985, 0.01653778925538063, 0.04047294706106186, 0.004548955243080854, 0.007758731953799725, -0.03956598788499832, 0.0075319926254451275, -0.008630260825157166, -0.0250830240547657, -0.002102651633322239, -0.03865903243422508, -0.004293873440474272, -0.056061264127492905, 0.02183781936764717, 0.030241340398788452, 0.03012797050178051, 0.027846407145261765, 0.03293386846780777, 0.018209991976618767, 0.011322788894176483, 0.012328943237662315, 0.02377927303314209, -0.02053406834602356, 0.016509447246789932, -0.01830918900668621, 0.06377039849758148, 0.04461093619465828, -0.014525479637086391, -0.02169610746204853, -0.0031460062600672245, 0.04818207770586014, -0.0004058720078319311, 0.01829501800239086, -0.007694961503148079, -0.03973604366183281, -0.05084626376628876, 0.004811122082173824, 0.0010663827415555716, 0.045262809842824936, -0.03296221047639847, -0.016920411959290504, 0.0634869709610939, 0.01018200721591711, -0.01917363330721855, -0.014752218499779701, -0.01092599518597126, -0.0012594653526321054, 0.013335098512470722, -0.053680505603551865, 0.03341569006443024, 0.007850844413042068, -0.01262653898447752, 0.042598627507686615, -0.0019733395893126726, 0.011216504499316216, 0.007631191052496433, -0.02984454669058323, 0.002293962985277176, 0.008878256194293499, -0.016722016036510468, 0.008609003387391567, -0.010989765636622906, 0.025352276861667633, -0.008984540589153767, 0.007475307676941156, 0.03072316013276577, 0.009615158662199974, 0.018365874886512756, 0.020789150148630142, -0.00901996809989214, -0.023424992337822914, 0.0840635597705841, 0.020165616646409035, 0.009430933743715286, -0.04118150472640991, 0.056486401706933975, 0.06694474816322327, -0.03928256407380104, -0.0546441450715065, 0.014936444349586964, -0.026386773213744164, -0.012527340091764927, 0.064960777759552, 0.020321499556303024, 0.0143979387357831, 0.009218364953994751, -0.01047960203140974, 0.0019981390796601772, 0.050449471920728683, -0.01049377303570509, 0.08519725501537323, 0.020562410354614258, -0.03613656014204025, 0.0413799025118351, 0.050449471920728683, 0.05821528658270836, -0.019116947427392006, -0.0012373228091746569, 0.02586243860423565, -0.0590655617415905, -0.009267964400351048, -0.007999641820788383, -0.010826796293258667, 0.04418579861521721, 0.011096049100160599, -0.04013283550739288, 0.029419410973787308, 0.015078156255185604, -0.061219580471515656, 0.018932722508907318, 0.027364585548639297, -0.009671843610703945, 0.018380045890808105, -0.015885915607213974, 0.015460778959095478, 0.02970283478498459, 0.008233467116951942, 0.07215974479913712, 0.03721357136964798, -0.014086171984672546, -0.00835392251610756, 0.017033781856298447, -0.019556256011128426, 0.0634302869439125, 0.006890745833516121, -0.028739193454384804, -0.011514099314808846, -0.04067134112119675, 0.036873459815979004, 0.014064915478229523, 0.006182185839861631, 0.006182185839861631, -0.0191878043115139, -0.0020512810442596674, -0.006692348979413509, 0.0169912688434124, -0.01669367402791977, -0.030071286484599113, 0.022206269204616547, 0.017685657367110252, -0.022206269204616547, -0.03041139431297779, 0.03724191337823868, 0.0077020470052957535, -0.021611079573631287, 0.0012266944395378232, -0.009253793396055698, 0.04067134112119675, -0.03185685724020004, -0.04050128906965256, 0.017501430585980415, 0.008630260825157166, -0.018380045890808105, 0.023878471925854683, -0.007206054870039225, -0.02407686784863472, 0.013384697958827019, 0.018833523616194725, 0.046424850821495056, 0.0057747638784348965, 0.018209991976618767, -0.0012160660699009895, -0.01639607734978199, 0.029589464887976646, 0.03146006166934967, -0.028852561488747597, 0.02379344403743744, -0.05637303367257118, 0.008198038674890995, 0.014709705486893654, 0.03931090608239174, 0.04741683229804039, 0.06161637604236603, -0.018380045890808105, 0.00996943935751915, 0.013405954465270042, -0.006912002805620432, -0.012661966495215893, 0.005317742470651865, -0.013278414495289326, 0.03114829584956169, -0.005696822423487902, -0.042740337550640106, -0.010536286979913712, -0.008304323069751263, -0.0003669012221507728, 0.018535928800702095, 0.02376510202884674, 0.07663784921169281, 0.013271328061819077, -0.023580875247716904, -0.007928785867989063, 0.01040874607861042, -0.03318895027041435, 0.010096979327499866, -0.049570854753255844, -0.027548812329769135, 0.006791547406464815, -0.030071286484599113, 0.02821485884487629, 0.0027616124134510756, 0.005399227142333984, 0.008382264524698257, 0.012300601229071617, 0.008438949473202229, -0.01978299394249916, 0.027137847617268562, 0.00886408518999815, 0.023722589015960693, 0.010840967297554016, -0.01388068962842226, 0.007011201232671738, 0.00031420207233168185, -0.00029338811873458326, -0.02719453163444996, 0.013554752804338932, 0.036108218133449554, -0.011691239662468433, -0.028285713866353035, -0.035371314734220505, 0.00501660443842411, -0.01462467759847641, -0.00011979092232650146, -0.02112925797700882, 0.020718293264508247, -0.015276553109288216, -0.022036215290427208, -0.00945219025015831, -0.00026283145416527987, 0.028866734355688095, -0.009934010915458202, 0.0056861937046051025, 0.013576009310781956, -0.04529115557670593, -0.01101102214306593, -0.019542085006833076, -0.0025242448318749666, -0.009027054533362389, -0.01785571128129959, 0.04965588450431824, 0.005395684391260147, -0.026259232312440872, -0.04682164266705513, -0.045829661190509796, 0.012725736945867538, 0.035342972725629807, 0.010217434726655483, 0.002437446266412735, -0.006639207247644663, -0.008389350026845932, -0.0169912688434124, -0.05580618232488632, 0.014794732443988323, -0.03412424772977829, -0.06138963624835014, -0.012265173718333244, -0.013278414495289326, 0.010663827881217003, 0.056939881294965744, 0.011025193147361279, -0.051186371594667435, 0.007829587906599045, 0.023595048114657402, -0.028129830956459045, -0.02260306291282177, -0.02995791658759117, -0.027832236140966415, -0.018380045890808105, -0.006214071065187454, 0.015432436019182205, 0.03613656014204025, 0.02156856656074524, 0.003904165467247367, -0.014461709186434746, -0.007411537226289511, -0.038318924605846405, -0.01743057556450367, -0.037610363215208054, 0.012746994383633137, -0.02037818543612957, 0.022064557299017906, 0.0709126815199852, -0.008743629790842533, 0.003626055782660842, -3.6341378290671855e-05, -0.01592842862010002, -0.003101721405982971, 0.013335098512470722, 0.023283280432224274, 0.015347409062087536, -0.047190096229314804, -0.025281419977545738, 0.024912968277931213, 0.03126166760921478, 0.021625250577926636, 0.006185728590935469, 5.984010567772202e-05, 0.039622675627470016, 0.00671360595151782, 0.00011912664922419935, -0.018380045890808105, -0.008701116777956486, -0.047785285860300064, 0.03880074620246887, -0.03233867883682251, -0.026981964707374573, 0.012378542684018612, -0.031375035643577576, 0.0048217508010566235, 0.027237046509981155, -0.02261723391711712, -0.02360921911895275, -0.006702977232635021, 0.038177210837602615, 0.016041798517107964, -0.00634869746863842, 0.01684955693781376, 0.05379387363791466, 0.014022402465343475, 0.02553650178015232, 0.03177183121442795, -0.0051618595607578754, 0.007050171960145235, 0.004308044910430908, 0.0016668873140588403, -0.013561838306486607, -0.013221729546785355, -0.007283996790647507, 0.016041798517107964, 0.00029515952337533236, -0.0015189754776656628, 0.007928785867989063, 0.006451438646763563, -0.0019963677041232586, 0.007588677573949099, 0.000950356072280556, -0.04707672446966171, -0.008871170692145824, 0.00660732202231884, -0.012931219302117825, -0.0038616519887000322, 0.024912968277931213, 0.01755811646580696, 0.021951187402009964, -0.02111508697271347, -0.007071428466588259, -0.0009822412393987179, -0.029759518802165985, 0.020633267238736153, -0.016736187040805817, -0.004067134112119675, -0.015120670199394226, -0.025734897702932358, -0.003039722330868244, 0.01564500480890274, -0.01123776100575924, 0.020590752363204956, 0.028144001960754395, -0.0023719044402241707, -0.007099770940840244, 0.011457415297627449, 0.024997996166348457, 0.009650587104260921, -0.01115273404866457, -0.015446607954800129, -0.025309761986136436, -0.0053106569685041904, 0.0031991482246667147, 0.003326689125970006, -0.001783799729309976, 0.060766104608774185, -0.0025065308436751366, -0.007560335099697113, -0.031686801463365555, 0.004013992380350828, 0.032707128673791885, 0.03945261985063553, -0.025749070569872856, -0.013009161688387394, -0.023368308320641518, -0.0038474807515740395, -0.028158172965049744, -0.0014295197324827313, 0.01625436544418335, 0.03202690929174423, -0.017232179641723633, 0.026344260200858116, 0.03806384280323982, -0.050591181963682175, 0.010571714490652084, 0.007801245432347059, -0.027279559522867203, -0.0369301475584507, 0.0038085097912698984, 0.004793408326804638, 0.018124964088201523, 0.0169629268348217, 0.008318494074046612, -0.008991626091301441, 0.008892428129911423, 0.004885521251708269, -0.022078728303313255, -0.021355997771024704, 0.0057747638784348965, 0.04120984673500061, 0.04078471288084984, 0.0034896580036729574, -0.012180145829916, 0.010904737748205662, 0.008942026644945145, -0.012357286177575588, 0.011039364151656628, -0.01726052165031433, -0.049712568521499634, 0.010819710791110992, -0.0036561693996191025, -0.02658517099916935, 0.005353170447051525, 0.0017935424111783504, 0.036419983953237534, -0.031233323737978935, -0.012095118872821331, -0.017019610852003098, -0.025763241574168205, -0.026103349402546883, -0.0353996567428112, -0.022050386294722557, -0.03355740010738373, 0.0023010484874248505, 0.019230317324399948, 0.022971514612436295, 0.00929630734026432, 0.04472430422902107, 0.023835957050323486, -0.014525479637086391, 0.0009786984883248806, -0.05336873605847359, -0.04220183193683624, 0.015035643242299557, 0.015134841203689575, -0.014291654340922832, -0.020888349041342735, -0.041436586529016495, -0.00900579709559679, 0.034747783094644547, -0.006235328037291765, 0.019570427015423775, -0.01803993619978428, -0.004757980350404978, 0.00601921696215868, -0.00835392251610756, -0.0005819048965349793, -0.041124820709228516, 0.04194675013422966, 0.01189672201871872, -0.02404852584004402, 0.017543945461511612, 0.03225364908576012, -0.007177712395787239, 0.030921557918190956, -0.02054823935031891, 0.008736544288694859, -0.01934368722140789, -0.022489693015813828, -0.02423275075852871, -0.003946679178625345, -0.03942427784204483, -0.031119953840970993, -0.00509808911010623, -0.0015056899283081293, -0.022532207891345024, 0.04390237480401993, 0.026344260200858116, 0.01948539912700653, 0.009466361254453659, -0.014220798388123512, -0.031119953840970993, 0.010763025842607021, 0.008609003387391567, 0.04401574656367302, 0.04240022972226143, -0.008956198580563068, 0.0015003758016973734, -0.012739908881485462, 0.011471586301922798, -0.04004780948162079, -0.031119953840970993, -0.019527912139892578, 0.0022408210206776857, -0.004789865575730801, -0.008899513632059097, 0.002115051494911313, 0.0012488369829952717, 0.023424992337822914, 0.012690309435129166, -0.007138741668313742, 0.043789006769657135, -0.00044041432556696236, -0.033444032073020935, 0.05195161700248718, -0.008474376983940601, 0.00952304620295763, -0.014723876491189003, 0.015375752002000809, 0.031828515231609344, -0.004410786088556051, 0.0546724870800972, 0.03503120690584183, -0.002074309391900897, -0.0038651947397738695, 0.032140281051397324, -0.044384196400642395, -0.03369911387562752, -0.007673704531043768, 0.0007298167911358178, -0.03721357136964798, 0.0042903306894004345, -0.00464815367013216, 0.011577869765460491, -0.011620383709669113, 0.060936156660318375, -0.002208935795351863, -0.015375752002000809, 0.010330804623663425, 0.00879322923719883, -1.4627888958784752e-05, -0.009218364953994751, -0.04741683229804039, 0.03865903243422508, -0.022234613075852394, -0.049400802701711655, -0.015404094010591507, -0.0023541904520243406, 0.0026978421956300735, 0.013186301104724407, -0.040841396898031235, -0.005126431584358215, 0.004226560238748789, -0.006153843365609646, 0.0027562982868403196, -0.021370168775320053, -0.044979386031627655, -0.023254938423633575, -0.020449040457606316, 0.01181169506162405, 0.0064549813978374004, 0.008701116777956486, 0.004524155519902706, 0.043335527181625366, -0.003379831090569496, -0.03721357136964798, -0.05699656531214714, -0.002414418151602149, -0.019556256011128426, -0.01755811646580696, 9.465918265050277e-05, -0.01359726581722498, -0.009643501602113247, -0.01432708278298378, 0.0033869165927171707, 0.009012882597744465, -0.03012797050178051, 0.007283996790647507, 0.022829802706837654, 0.04755854606628418, 0.030071286484599113, -0.013972803018987179, -0.015049814246594906, 0.023099055513739586, 0.026372602209448814, 0.029164329171180725, 0.011485757306218147, 0.020590752363204956, -0.040104493498802185, 0.013320927508175373, -0.004155704285949469, -0.003420573193579912, 0.008694031275808811, 0.0693821907043457, -0.026783566921949387, 0.004173418506979942, -0.011053536087274551, 0.0007865015650168061, -0.07374691963195801, 0.010600057430565357, -0.0008378721540793777, -0.0383472666144371, 0.053822215646505356, 0.0057960208505392075, 0.03231033682823181, 0.012279344722628593, 0.011195247992873192, -0.011414901353418827, -0.026202548295259476, 0.040217865258455276, 0.01292413379997015, -0.06116289645433426, -0.053538791835308075, 0.009728528559207916, -0.024360291659832, 0.05390724167227745, 0.010571714490652084, -0.00018710411677602679, -0.030808188021183014, -0.021044231951236725, 0.045829661190509796, 0.005693279672414064, 0.009976524859666824, -0.06558430939912796, 0.003932507708668709, 0.008183867670595646, -0.007957128807902336, 0.0383756086230278, -0.040246207267045975, 0.005069746635854244, -0.008757801726460457, 0.028455769643187523, -0.017317205667495728, 0.025508159771561623, -0.016013454645872116, -0.010642570443451405, 0.00214162259362638, 5.8566911320667714e-05, -0.006596693303436041, 0.002455160254612565, -0.024459490552544594, -0.03661837801337242, -0.008559404872357845, 0.022206269204616547, 0.03942427784204483, 0.029334383085370064, -0.02849828265607357, 0.02572072669863701, -0.045858003199100494, -0.006430181674659252, -0.006316812243312597, 0.010585886426270008, 0.003943136427551508, 0.0007032458088360727, -0.008892428129911423, -0.0005664051277562976, 0.017543945461511612, -0.048805613070726395, 0.02995791658759117, -0.0062388707883656025, -0.012810764834284782, -0.0035746851935982704, -0.009806470014154911, -0.011124392040073872, -0.04648153483867645, -0.007461136672645807, 0.010961422696709633, 0.020420698449015617, 0.003904165467247367, -0.01710463874042034, -0.018224162980914116, -0.024615373462438583, 0.04146492853760719, 0.025479817762970924, -0.06666132062673569, 0.03131835162639618, 0.03514457494020462, -0.003094635671004653, 0.005810191854834557, 0.005300028715282679, 0.033444032073020935, -0.0008892428013496101, 0.00431867316365242, 0.02791726402938366, -0.0020264815539121628, 0.003872280241921544, -0.004407242871820927, 0.001957396976649761, 0.007857929915189743, -0.013207557611167431, 0.007772902958095074, -0.004385986365377903, -0.022064557299017906, 0.028583308681845665, 0.008339750580489635, 0.013767320662736893, 0.003147777635604143, -0.003889994230121374, -0.007872100919485092, 0.039792727679014206, 0.016622817143797874, 0.0050272331573069096, 0.01874849759042263, 0.009395505301654339, -0.003587084822356701, 0.04160664230585098, -0.032707128673791885, 0.016296880319714546, -0.0008334436570294201, -0.019003579393029213, -0.0369584895670414, 0.0013267785543575883, 0.015885915607213974, 0.012059690430760384, -0.03613656014204025, 0.012300601229071617, -0.0047544375993311405, 0.020760808140039444, 0.012917048297822475, -0.00827598012983799, -0.003872280241921544, -0.006741948425769806, -0.013824005611240864, -0.0075107356533408165, 0.041861724108457565, -0.012527340091764927, 0.016367735341191292, -0.0036561693996191025, -0.021667763590812683, -0.01818164996802807, -0.0059129330329597, 0.023212425410747528, -0.005395684391260147, -0.015772545710206032, -0.026627684012055397, 0.008091755211353302, -0.028441596776247025, 0.04818207770586014, -0.016013454645872116, 0.018422558903694153, -0.011988834477961063, 0.013802748173475266, 0.031091611832380295, 0.03678843379020691, 0.03885743021965027, -0.0002271820412715897, -0.01815330609679222, 0.016892069950699806, -0.01019617822021246, -0.007935871370136738, -0.01202426292002201, 0.006855317857116461, -0.009303392842411995, 0.012881620787084103, -0.0649040937423706, 0.012378542684018612, -0.004347015637904406, 0.017926568165421486, -0.0020158530678600073, -0.026188377290964127, 0.029787860810756683, 0.004003363661468029, -0.01622602343559265, 0.03029802441596985, 0.01611265353858471, 0.011287360452115536, -0.014723876491189003, 0.018124964088201523, 0.0057251644320786, -0.005207915790379047, -0.017784856259822845, 0.024303607642650604, -0.025338103994727135, -0.007298167794942856, 0.00806341227144003, -0.04650987684726715, 0.002745670033618808, 0.008183867670595646, -0.00929630734026432, -0.040387917309999466, -0.004031706135720015, 0.002414418151602149, 0.03191354125738144, -0.020576581358909607, -0.007772902958095074, -0.0029653236269950867, -0.02705281972885132, -0.024105209857225418, 0.009445104748010635, -0.002906867302954197, 0.009289220906794071, -0.01322881504893303, 0.006260127294808626, 0.051753219217061996, -0.00015156541485339403, 0.009771042503416538, 0.015276553109288216, 0.013221729546785355, 0.03605153039097786, 0.011677068658173084, -0.0027793266344815493, -0.013108359649777412, -0.027520470321178436, -0.012669051997363567, -0.010238692164421082, -0.01174083910882473, -0.007517821621149778, -0.00431867316365242, -0.019003579393029213, -0.015446607954800129, 0.0442708283662796, 0.03573976457118988, -0.006784461904317141, 0.00842477846890688, -0.015262382104992867, -0.01567334681749344, 0.006260127294808626, 0.015361580066382885, -0.019244488328695297, -0.022702261805534363, -0.010330804623663425, -0.016041798517107964, 0.004896149504929781, -0.017983252182602882, 0.044695962220430374, -0.0038297667633742094, -0.009707272052764893, -0.014064915478229523, -0.011315702460706234, -0.02924935519695282, 0.017473088577389717, -0.025295590981841087, -0.037015173584222794, -0.014908102340996265, -0.01667950116097927, 0.006040473934262991, 0.03854566439986229, -0.020406527444720268, -0.062409963458776474, -0.02655682899057865, 0.017345547676086426, 0.02054823935031891, -0.007638276554644108, -0.023878471925854683, -0.01641024835407734, -0.03208359703421593, -0.01159912720322609, 0.016466934233903885, -0.0273079015314579, 0.009728528559207916, -0.03384082391858101, -0.033585742115974426, -0.045432865619659424, 0.0061148726381361485, -0.0048819780349731445, 0.014362511225044727, 0.02793143503367901, -0.00893494114279747, -0.03381248190999031, 0.008835743181407452, 0.027251217514276505, 0.028285713866353035, 0.025026338174939156, -0.007659533526748419, 0.020463211461901665, 0.026670197024941444, 0.018422558903694153, -0.031686801463365555, -0.0017386290710419416, 0.005831448826938868, -0.003904165467247367, -0.0037093115970492363, 0.04563126340508461, -0.01292413379997015, -0.03647666797041893, -0.012796592898666859, 0.008488548919558525, -0.018507586792111397, -0.006051102187484503, 0.018705982714891434, 0.0028909246902912855, -0.015021471306681633, -0.002104423241689801, -0.00982064101845026, 0.0103378901258111, -0.02231963910162449, 0.005764135625213385, 0.008750715292990208, 0.005505511071532965, -0.05155482515692711, -0.01271156594157219, 0.032565414905548096, -0.007152913138270378, -0.043930720537900925, 0.024487832561135292, -0.01697709783911705, -0.022262955084443092, 0.005307114217430353, -0.029306041076779366, 0.006890745833516121, 0.012364371679723263, -0.0229006577283144, -0.018124964088201523, -0.014525479637086391, -0.004297416191548109, 0.028739193454384804, -0.010274119675159454, 0.0075532495975494385, 0.017912397161126137, 0.001681058551184833, 0.0005017490475438535, 0.007857929915189743, -0.009317563846707344, -0.020434869453310966, 0.004091933835297823, -0.0016739729326218367, 0.03854566439986229, 0.011988834477961063, -0.009027054533362389, 0.023708416149020195, -0.018535928800702095, -0.0003848366322927177, -0.016452763229608536, 0.012343115173280239, -0.011641640216112137, 0.009012882597744465, -0.006575436796993017, -0.000711659959051758, 0.006476238369941711, -0.050704553723335266, -0.00634869746863842, -0.010316633619368076, 0.018535928800702095, 0.01932951621711254, -0.013186301104724407, -0.01728886365890503, -0.05288691818714142, -0.012669051997363567, 0.007461136672645807, -0.02686859481036663, 0.002231963910162449, -0.0004258002736605704, 0.0013037503231316805, -0.010840967297554016, 0.013639779761433601, 0.020165616646409035, -0.024856284260749817, 0.0114503288641572, -0.04313713312149048, 0.02261723391711712, -5.9452610003063455e-05, 0.02613169141113758, -0.006550637073814869, -0.002217792673036456, 0.015503291971981525, -0.005718078929930925, -0.0017120580887421966, -0.002244363771751523, -0.0025649871677160263, -0.019414544105529785, -0.021171772852540016, -0.038772400468587875, -0.002789954887703061, 0.005363799165934324, -0.009756870567798615, -0.009225451387465, 0.013051674701273441, -0.011110220104455948, 0.03607987239956856, 0.02420440874993801, -0.012343115173280239, -0.026060836389660835, -0.010890566743910313, -0.0310349278151989, -0.009423847310245037, -0.005888133309781551, 0.008084669709205627, -0.007652447558939457, 0.025493988767266273, -0.006734862457960844, 0.015418265014886856, -0.041408244520425797, 0.004198217764496803, -0.02939106710255146, 0.013916118070483208, -0.014121600426733494, -0.014582164585590363, 0.012619453482329845, 0.019386200234293938, -0.020860005170106888, 0.00730525329709053, 0.0034453729167580605, 0.01130861695855856, -0.005997960455715656, 0.0035339428577572107, 0.014036573469638824, 0.011804609559476376, -0.012222659774124622, 0.015276553109288216, 0.004782780073583126, -0.007879187352955341, 0.003719939850270748, 0.0035923991817981005, 0.046623244881629944, -0.0007289311033673584, 0.00019728967163246125, -0.009707272052764893, -0.02083166316151619, 0.012208488769829273, -0.015602490864694118, 0.02716618962585926, 0.019697967916727066, 0.03681677579879761, -0.0052433437667787075, -0.018436729907989502, -0.0029848089907318354, 0.034464359283447266, -0.0015561748296022415, 0.007779988460242748, -0.01210928987711668, 0.008198038674890995, -0.0022691632620990276, -0.0427970215678215, 0.016481105238199234, 0.006249499041587114, 0.004984719678759575, 0.0036012560594826937, 0.02275894582271576, -0.014107429422438145, -0.016665330156683922, 0.01667950116097927, 0.017954910174012184, 0.013363441452383995, -0.0013560067163780332, 0.011712496168911457, -0.016211852431297302, 0.007865015417337418, -0.005994417238980532, -0.018252504989504814, 0.00019230760517530143, 0.0048819780349731445, -0.021171772852540016, -0.0016916869208216667, 0.01388068962842226, -0.004113190807402134, 0.006586065050214529, -0.004272616468369961, -0.021667763590812683, -0.03188519924879074, 0.003787253051996231, 0.003223947947844863, 0.007602848578244448, -0.038318924605846405, 0.01462467759847641, 0.0018883123993873596, 0.03520125895738602, -0.002182364696636796, -0.002476417226716876, 0.009600987657904625, -0.00936716329306364, -0.05402061343193054, 0.006802175659686327, -0.036986831575632095, 0.008538147434592247, -0.05492756888270378, 0.04500773176550865, 0.015871742740273476, 0.0008113011717796326, -0.023212425410747528, 0.016722016036510468, 0.012265173718333244, -0.01789822429418564, -0.006132586859166622, -0.0032877183984965086, 0.011471586301922798, -0.006674635224044323, -0.042740337550640106, -0.0006983744096942246, -0.047926995903253555, 0.015758374705910683, 0.007581591606140137, -0.010174921713769436, -0.010486687533557415, 0.006472695618867874, 0.023127397522330284, -0.01859261468052864, -0.02967449277639389, -0.009027054533362389, 0.04220183193683624, 0.03999112546443939, 0.02922101318836212, 8.870838428265415e-06, 0.011684154160320759, 0.014723876491189003, 0.0033160606399178505, -0.017090465873479843, 0.020477384328842163, -0.02572072669863701, 0.02260306291282177, 0.013122530654072762, -0.027577154338359833, -0.02394932694733143, -0.007900443859398365, 0.0042442744597792625, 0.010734683834016323, -0.031970225274562836, 0.018932722508907318, 0.017388062551617622, -0.0018280846998095512, -0.012761165387928486, -0.0009494703845120966, 0.0018989407690241933, 0.008155525662004948, 0.05934898555278778, -0.030609790235757828, -0.03341569006443024, -0.02110091596841812, -0.009848983958363533, -0.03131835162639618, -0.0214268546551466, 0.010628399439156055, -0.014879759401082993, 0.03959432989358902, -0.01210928987711668, -0.03041139431297779, 0.00471900962293148, 0.013845262117683887, 0.00332137499935925, -0.0055161393247544765, -0.0043576438911259174, -0.017458917573094368, -0.006323897745460272, -0.007074971217662096, -0.033160608261823654, -0.027562983334064484, 0.0011514099314808846, 0.011563698761165142, 0.014582164585590363, -0.03381248190999031, -0.022631404921412468, 0.024416977539658546, 0.03585313633084297, 0.000994641100987792, 0.006309726741164923], "index": 40}, {"title": "Shaun Young", "text": "Shaun Young (born 13 June 1970, Burnie, Tasmania) is a former Australian cricketer.He played in one Test at The Oval in London in 1997. He was called into the test team as a replacement as he happened to be in England at the time. He played in 138 first-class cricket matches for Tasmania and Gloucestershire taking 274 wickets with his best bowling 7/64. He was dropped from the Tasmanian team in 2002.", "vector": [0.012097458355128765, 0.030350737273693085, -0.014826327562332153, -0.0204189233481884, -0.0037938421592116356, 0.03649069368839264, -0.02919255569577217, -0.02049824967980385, -0.022513171657919884, 0.05054754391312599, -0.036332037299871445, 0.013715741224586964, 0.024401167407631874, 0.021529508754611015, 0.01913381554186344, 0.015619602985680103, -0.05410141870379448, -0.007916893810033798, -0.054513923823833466, -0.004831050522625446, 0.04204362630844116, -0.007254508323967457, -0.041980162262916565, -0.021640567108988762, 0.011478702537715435, 0.03303201124072075, -0.04597827419638634, -0.0298747718334198, -0.02290980890393257, -0.026003586128354073, 0.007750305812805891, 0.026987247169017792, 0.030921896919608116, -0.011843609623610973, -0.035031065344810486, 0.0014407874550670385, -0.018784774467349052, 0.01055850274860859, -0.039187829941511154, 0.008186607621610165, -0.007234676741063595, -0.007663045544177294, -0.023972798138856888, 0.02079969458281994, -0.008055717684328556, -0.008087447844445705, -0.004172631539404392, -0.03168344125151634, -0.02414732053875923, -0.01761072687804699, 0.023830009624361992, 0.027510810643434525, -0.030001696199178696, 0.03604646027088165, -0.0011016619391739368, -0.043185941874980927, 0.013953723944723606, 0.06695248931646347, 0.03544357046484947, -0.08929114043712616, 0.014421756379306316, -0.011669089086353779, 0.012200583703815937, 0.0022687693126499653, 0.02414732053875923, -0.015215032733976841, 0.02897043712437153, 0.01762659102678299, -0.01664292998611927, 0.0033853051718324423, 0.007817734032869339, -0.006782509386539459, 0.0009762251866050065, 0.026780996471643448, -0.011050334200263023, 0.04502634331583977, 0.0018582489574328065, 0.04029841721057892, -0.06790442019701004, 0.04052053391933441, 0.04956388100981712, -0.036300309002399445, -0.05188024789094925, 0.023433370515704155, -0.013144582509994507, -0.002478987444192171, -0.0032464817631989717, -0.06447746604681015, -0.009384454227983952, -0.03683973476290703, 0.053974494338035583, 0.027241095900535583, 0.07291792333126068, 0.02792331390082836, -0.036934927105903625, 0.0014546697493642569, 0.057084135711193085, -0.019578050822019577, -0.055465854704380035, 0.0030322973616421223, -0.026193970814347267, -0.046327315270900726, 0.026257432997226715, -0.008234204724431038, 0.006909433286637068, -0.018816504627466202, -0.07577371597290039, -0.006171687040477991, 0.04052053391933441, 0.009804890491068363, 0.02167229913175106, -0.014421756379306316, -0.04264651611447334, -0.00236197910271585, -0.012137121520936489, 0.010027008131146431, -0.017658323049545288, 0.008718102239072323, -0.004144866950809956, 0.008622909896075726, 0.016801584511995316, -1.3053417205810547e-05, 0.019324202090501785, -0.0033912546932697296, 0.04283690080046654, -0.025591082870960236, -0.025242039933800697, 0.0076233819127082825, 0.030350737273693085, 0.014810461550951004, -0.012240247800946236, -0.008614976890385151, -0.008369061164557934, 0.018689582124352455, -0.052927371114492416, 0.0006048728828318417, 0.017531398683786392, 0.007377466186881065, 0.03331758826971054, 0.03899744525551796, 0.01069336012005806, -0.02739975042641163, 0.0818026140332222, 0.0020922652911394835, -0.017658323049545288, -0.04835810139775276, 0.0056877885945141315, -0.016849180683493614, -0.03899744525551796, 0.007492491509765387, 0.002488903235644102, 0.006453299894928932, 0.0015885350294411182, -0.028145430609583855, -0.00035127249429933727, 0.004957974888384342, 0.016420811414718628, 0.03595126420259476, 0.03871186450123787, 0.037537816911935806, -0.01556407380849123, 0.020339595153927803, -0.04873887449502945, 0.004019925836473703, -0.016404947265982628, -0.05619566887617111, -0.0535302609205246, -0.02484540268778801, 0.015151570551097393, 0.03433298319578171, -0.011780147440731525, -0.02359202690422535, 0.03680800274014473, 0.027732927352190018, 0.0029767679516226053, 0.006536593660712242, -0.034777216613292694, -0.0282564889639616, 0.033412784337997437, 0.0009856453398242593, -0.04991292208433151, -0.019086219370365143, 0.0298271756619215, -0.03617338463664055, -0.04185323789715767, -0.018404001370072365, 0.053593721240758896, 0.01665879413485527, -0.023988664150238037, 0.01193086989223957, 0.030572855845093727, -0.027145903557538986, 0.0032306162174791098, -0.0025880627799779177, 0.012977994047105312, 0.06999866664409637, 0.03168344125151634, 0.029462268576025963, -0.04934176430106163, 0.013144582509994507, 0.005168192554265261, -0.061145711690187454, 0.03044593147933483, -0.025575216859579086, -0.003831522772088647, 0.016769854351878166, 0.011312115006148815, 0.009130606427788734, -0.021275660023093224, -0.01759486086666584, 0.054545655846595764, 0.06974481791257858, 0.011772215366363525, 0.032270465046167374, -0.0376012809574604, 0.002015912439674139, 0.04128208011388779, -0.0001701824803603813, 0.010963073931634426, 0.016404947265982628, -0.008218338713049889, 0.014199639670550823, -0.009257529862225056, -0.03274643048644066, -0.008852959610521793, 0.03683973476290703, -0.005259419325739145, 0.03737916424870491, -0.010891678743064404, -0.034079134464263916, -0.012486163526773453, 0.06746018677949905, 0.02517857775092125, -0.02016507461667061, -0.05219755694270134, 0.045121535658836365, 0.02327471598982811, -0.0470888614654541, 0.07050636410713196, -0.03921956196427345, 0.026543013751506805, 0.036014728248119354, 0.007532155141234398, -0.009392387233674526, 0.028716588392853737, 0.009654168039560318, 0.028526203706860542, -0.05188024789094925, -0.005398242734372616, 0.01886410266160965, -0.013461892493069172, -0.0409964993596077, 0.004438378848135471, -0.011089997366070747, -0.015659267082810402, 0.00052951171528548, -0.02049824967980385, -0.013557085767388344, 0.051118701696395874, -0.014231370761990547, -0.017452070489525795, 0.026654072105884552, 0.02232278510928154, 0.03642722964286804, 0.004608933348208666, 0.0003492893010843545, -0.02895457111299038, 0.03244498744606972, -0.011732551269233227, -0.023020867258310318, 0.02708244137465954, 0.0004940622020512819, -0.043852295726537704, 0.02925601601600647, -0.003904900746420026, -0.05241967365145683, -0.052007172256708145, -0.023179523646831512, -0.023496832698583603, 0.03357143700122833, 0.01734101213514805, 0.02860553003847599, 0.028129564598202705, -0.06412842869758606, 0.012851070612668991, -0.008805363439023495, 0.0314137265086174, 0.0658101737499237, -0.012882801704108715, -0.022703558206558228, -0.012708280235528946, -0.027891581878066063, 0.018150154501199722, 0.00801208708435297, 0.024115588515996933, 0.036268576979637146, -0.035665687173604965, -0.03487240895628929, 0.007111718878149986, -0.04673982039093971, 0.020974215120077133, 0.020625174045562744, -0.03234979137778282, -0.019942957907915115, -0.03296854719519615, -0.02133912220597267, 0.01243063434958458, 0.014786663465201855, 0.0042122951708734035, -0.0407426543533802, -0.016420811414718628, 0.01694437488913536, -0.0022985171526670456, -0.02581319957971573, 0.025860795751214027, 0.024734344333410263, 0.0042757573537528515, -0.013192178681492805, -0.017832843586802483, 0.015802057459950447, -0.022084802389144897, 0.006393804214894772, -0.018134288489818573, -0.018086692318320274, 0.028827648609876633, -0.021942012012004852, 0.006881668698042631, -0.005584662780165672, -0.018641984090209007, -0.0019395597046241164, -0.028081968426704407, -0.027145903557538986, 0.023512698709964752, -0.007555953226983547, 0.004656529985368252, 0.026844458654522896, 0.0439474880695343, 0.004049673676490784, -0.04182150959968567, 0.04566096514463425, -0.015413351356983185, 0.03814070671796799, -0.0026554912328720093, 0.018356405198574066, -0.03706185147166252, 0.02294154092669487, 0.027828119695186615, -0.026574743911623955, -0.013691943138837814, 0.03306373953819275, 0.0007313012611120939, -0.00271498691290617, 0.023116061463952065, 0.008702237159013748, -0.03166757524013519, 0.022481439635157585, 0.007520256098359823, -0.013787135481834412, 0.02416318468749523, -0.025686275213956833, 0.03414259850978851, 0.019911225885152817, 0.00960657186806202, 0.03363490104675293, 0.002594012301415205, 0.009344791062176228, 0.01921314373612404, -0.03623684495687485, 0.012145054526627064, 0.014889789745211601, 0.012502028606832027, 0.009209933690726757, 0.0024988192599266768, -0.0033178767189383507, -0.01757899485528469, -0.034713756293058395, -0.046041734516620636, 0.012851070612668991, 0.02614637464284897, -0.0039088670164346695, 0.011708753183484077, 0.02008574642241001, -0.02706657536327839, -0.0017253751866519451, -0.025606947019696236, -0.011431106366217136, -0.009757294319570065, -0.027463212609291077, -0.001186939189210534, -0.001381291775032878, 0.023814143612980843, 0.02324298582971096, -0.0078692976385355, -0.00977315939962864, 0.0024670881684869528, 0.005303049925714731, 0.06422361731529236, 0.06777749955654144, 0.054260075092315674, -0.04550230875611305, -0.000594461162108928, -0.04159938916563988, -0.033507976680994034, -0.026558877900242805, 0.029160823673009872, 0.005683822091668844, 0.009693832136690617, -0.02330644801259041, 0.01980016753077507, -0.026257432997226715, 0.0755198672413826, 0.02387760579586029, -0.019324202090501785, -0.007563886232674122, 0.0014705352950841188, 0.016611197963356972, -0.007421096321195364, 0.00013237792882137, 0.032556045800447464, -0.007916893810033798, -0.005541032645851374, 0.015627536922693253, -0.025987720116972923, -0.03022381290793419, -0.00809538085013628, 0.061463020741939545, 0.019990554079413414, 0.034396443516016006, 0.006976861972361803, -0.018150154501199722, -0.004093303810805082, -0.05118216574192047, -0.011772215366363525, 0.04531192034482956, 0.02736802026629448, -0.033476244658231735, -0.05194370821118355, -0.015453015454113483, 0.021862685680389404, 0.02708244137465954, -0.018689582124352455, 0.014048917219042778, -0.032254599034786224, -0.026558877900242805, 0.00811124686151743, -0.03353970870375633, -0.0004184530698694289, 0.0012563507771119475, 0.04220227897167206, 0.05321295186877251, -0.022227592766284943, -6.804820441175252e-05, 0.006251014303416014, 0.01662706397473812, -0.00464463047683239, -0.024639150127768517, -0.03050939366221428, 0.022751154378056526, -0.028526203706860542, 0.03420605883002281, 0.01019359566271305, 0.0722833052277565, 0.018324675038456917, -0.08408725261688232, 0.003486447734758258, 0.022560767829418182, 0.014842192642390728, -0.04845329374074936, -0.0007198979146778584, -0.0057829818688333035, -0.00464463047683239, 0.00897988397628069, -0.07659872621297836, 0.006362073123455048, -0.005989233497530222, 0.01702370122075081, 0.0470571294426918, -0.01792803592979908, -0.023798277601599693, -0.003831522772088647, -0.020577577874064445, 0.016246290877461433, -0.014390025287866592, 0.02922428585588932, 0.025019923225045204, -0.029969966039061546, -0.036014728248119354, -0.004827084019780159, -0.030049292370676994, -0.0061002918519079685, -0.017134759575128555, 0.04759655520319939, 0.026812726631760597, 0.004311454948037863, -0.052610062062740326, -0.05806779861450195, -0.010201528668403625, -0.020847292616963387, -0.03108055144548416, -0.019324202090501785, 0.0016926525859162211, -0.006738879252225161, 0.04055226594209671, -0.012295776978135109, -0.014850125648081303, 0.04734271019697189, -0.0019246857846155763, 0.05781394988298416, -0.05229274928569794, -0.01980016753077507, 0.02573387138545513, 0.06371592730283737, 0.022497305646538734, 0.009313059970736504, 0.019022757187485695, -0.00698479451239109, 0.0021160636097192764, 0.011058266274631023, 0.05562451109290123, 0.05096004530787468, -0.017515532672405243, 0.018388137221336365, 0.004081404767930508, 0.006568324752151966, 0.029160823673009872, -0.013691943138837814, 0.001003989833407104, -0.026717534288764, -0.007274340372532606, 0.027748793363571167, -0.022846346721053123, 0.004565303213894367, -0.01458834484219551, 0.00819454062730074, -0.016016241163015366, -0.03649069368839264, -0.032556045800447464, -0.03493587300181389, -0.00910680741071701, -0.005164226517081261, 0.009923881851136684, -0.011224854737520218, 0.0020605341996997595, -0.00815487653017044, 0.005164226517081261, 0.015881383791565895, 0.026590609923005104, -0.025844929739832878, -0.006798374932259321, -0.008234204724431038, -0.021640567108988762, 0.008186607621610165, -0.00790499523282051, -0.003821606980636716, 0.025416560471057892, -0.013065255247056484, -0.07736027240753174, 0.034428175538778305, 0.02481367066502571, -0.0036589852534234524, 0.020180940628051758, -0.029097361490130424, -0.006611954886466265, 0.013557085767388344, 0.015151570551097393, 0.013858530670404434, 0.0011363677913323045, 0.012795541435480118, -0.046676356345415115, -0.005453771911561489, -0.017182357609272003, 0.004351118579506874, -0.005275284871459007, 0.013914059847593307, -0.013731606304645538, -0.030953627079725266, 0.009995277039706707, 0.05099177733063698, 0.013025591149926186, 0.02448049560189247, 0.004918310791254044, -0.05321295186877251, 0.011653224006295204, -0.006286711897701025, -0.035062797367572784, -0.01919727772474289, 0.002562281209975481, -0.040679190307855606, -0.014326563104987144, -0.01197053398936987, -0.03168344125151634, -0.031937289983034134, -0.04902445524930954, 0.0117880804464221, 0.030572855845093727, -0.006366039626300335, -0.032270465046167374, 0.012097458355128765, 0.02294154092669487, 0.012081592343747616, 0.05489469692111015, 0.027574270963668823, 0.01734101213514805, -0.016833314672112465, -0.0008537632529623806, -0.04924657195806503, -0.009384454227983952, 0.02895457111299038, -0.036300309002399445, -0.021291526034474373, 0.029097361490130424, -0.008789497427642345, -0.01132004801183939, -0.0025008025113493204, 0.00730607146397233, -0.005001605022698641, 0.027558406814932823, -0.010891678743064404, 0.013795068487524986, 0.01539748627692461, 0.031318534165620804, 0.011097930371761322, 0.048929259181022644, 0.0008041834807954729, 0.001228586072102189, -0.033761825412511826, -0.050166770815849304, 0.009241664782166481, 0.021497778594493866, 0.054228343069553375, -0.0203713271766901, -0.021196333691477776, -0.029033899307250977, 0.03645896166563034, 0.020625174045562744, 0.005683822091668844, 0.021212199702858925, 0.0004167177830822766, 0.010280855931341648, -0.041313812136650085, 0.016404947265982628, 0.03306373953819275, 0.0440744124352932, 0.020577577874064445, -0.03636376932263374, 0.00768684409558773, -0.0038414387963712215, 0.004898478742688894, -0.009027480147778988, 0.013779203407466412, -0.046422507613897324, 0.035316646099090576, 0.020593443885445595, -0.00865464098751545, -0.008305598981678486, -0.009844554588198662, 0.014390025287866592, -0.01694437488913536, -0.009789025411009789, -0.02614637464284897, 0.021466046571731567, 0.007476625964045525, -0.004831050522625446, 0.017721785232424736, -0.006270846351981163, 0.0030084990430623293, -0.012851070612668991, -0.03176276758313179, 0.03804551437497139, -0.011954668909311295, 0.01305732224136591, -0.029462268576025963, -0.012684482149779797, -0.0024532058741897345, 0.026558877900242805, -0.014183773659169674, -0.030906030908226967, 0.012240247800946236, 0.03417432680726051, 0.01303352415561676, 0.029097361490130424, -0.04848502576351166, -0.041662853211164474, -0.0015151570551097393, 0.010653696022927761, -0.03353970870375633, 0.0032365659717470407, 0.021846819669008255, -0.006532627623528242, 0.00833733007311821, 0.0053109824657440186, 0.0036808003205806017, 0.031207475811243057, 0.0022687693126499653, -0.019419394433498383, -0.019578050822019577, -0.01055850274860859, -0.05413315072655678, 0.011891206726431847, -0.020958350971341133, 0.0075757852755486965, 0.025353098288178444, 0.025844929739832878, -0.011058266274631023, -0.02173576131463051, -0.018340539187192917, -0.013327036052942276, -0.012993860058486462, 0.013945790939033031, -0.031889691948890686, -0.011232787743210793, 0.004815184976905584, 0.013810934498906136, -0.009519311599433422, 0.00882122851908207, -0.008027952164411545, 0.01789630576968193, 0.014104446396231651, -0.05368891730904579, 0.05432353541254997, -0.018768908455967903, 0.009900083765387535, -0.009789025411009789, 0.018943428993225098, -0.0020684669725596905, 0.03960033506155014, -0.031572382897138596, -0.014017186127603054, 0.008503918536007404, 0.005886107683181763, -0.017531398683786392, 0.021180467680096626, 0.032587774097919464, 0.011367644183337688, 0.021767491474747658, 0.054577384144067764, 0.008852959610521793, -0.018102556467056274, 0.05410141870379448, 0.0008656623540446162, 0.015960711985826492, -0.010820283554494381, -0.007155349012464285, -0.07666219025850296, 0.001380300149321556, 0.007429029326885939, 0.008860892616212368, -0.011518366634845734, 0.0057869479060173035, -0.028208892792463303, -0.0015121822943910956, -0.021751627326011658, 0.05527546629309654, -0.01239097025245428, -0.056100476533174515, 0.009900083765387535, 0.007920860312879086, -0.009154404513537884, -0.027288692072033882, -0.018816504627466202, 0.02917668968439102, 0.03956860303878784, -0.006588156800717115, -0.02133912220597267, 0.0014199638972058892, 0.03239738941192627, 0.01851505972445011, -0.0057353852316737175, 0.03518972173333168, -0.005707620643079281, -0.009090942330658436, -1.9072709619649686e-05, -0.04677154868841171, 0.03810897469520569, 0.04121861979365349, 0.0029113227501511574, 0.020276132971048355, -0.02674926444888115, -0.021767491474747658, -0.03373009338974953, -0.0018166019581258297, -0.01826121285557747, -0.030652182176709175, 8.973934018285945e-05, -0.030430065467953682, 0.013477758504450321, 0.01859438791871071, 0.0016073753358796239, -0.030731510370969772, -0.02392520196735859, 0.018118422478437424, 0.023703085258603096, 0.013929925858974457, -0.019276605919003487, -0.016182828694581985, 0.01951458863914013, -0.007294172421097755, 0.020815560594201088, 0.011145527474582195, -0.03829936310648918, -0.021307392045855522, 0.022179994732141495, -0.012145054526627064, -0.036332037299871445, 0.02701897919178009, -0.02072036825120449, -0.03173103928565979, -0.025876661762595177, -0.021926147863268852, 0.04524846002459526, 0.03373009338974953, -0.006798374932259321, 0.021005947142839432, 0.014977050013840199, -0.03636376932263374, 0.015175368636846542, -0.007270373869687319, -0.02831995114684105, -0.011248652823269367, -0.05949569493532181, -0.011915004812180996, 0.00972556322813034, 0.006659551523625851, -0.04277344048023224, -0.012002265080809593, 0.04280516877770424, -0.013485691510140896, -0.016611197963356972, 0.016111435368657112, -0.0018047027988359332, -0.025416560471057892, -0.0721563771367073, -0.013128716498613358, -0.021862685680389404, -0.012922464869916439, 0.01303352415561676, -0.011915004812180996, 0.006564358249306679, 0.05698894336819649, 0.004680328071117401, 0.006373972166329622, -0.019387664273381233, -0.03082670271396637, -0.01981603354215622, 0.00448200898244977, -0.036966659128665924, 0.013263573870062828, -0.0014278966700658202, -0.025210309773683548, -0.03480894863605499, 0.0038275565020740032, 0.0003862262237817049, 0.008408725261688232, 0.018292943015694618, -0.023417506366968155, -0.009083009324967861, 0.051055241376161575, 0.018689582124352455, 0.010098402388393879, -0.0047239582054317, 0.004303521942347288, 0.007286239415407181, -0.002560298191383481, -0.01696023903787136, 0.01949872262775898, -0.02636849321424961, 0.018356405198574066, -0.020609309896826744, 0.005648124497383833, -0.04274170845746994, -0.020260266959667206, 0.028240622952580452, 0.027272827923297882, -0.016166964545845985, 0.012026063166558743, -0.004894512705504894, -0.03385701775550842, 0.002419491531327367, 0.03353970870375633, -0.012835204601287842, -0.052070632576942444, -0.07399678230285645, -0.0724736899137497, -0.016246290877461433, -0.002217206172645092, 0.01697610504925251, -0.013446027413010597, 0.003371422877535224, 0.0299065038561821, 0.006568324752151966, -0.035665687173604965, -0.018959295004606247, -0.030017562210559845, 0.007206912152469158, 0.012351306155323982, 0.02013334259390831, -0.0251151155680418, -0.05146774277091026, -0.010257057845592499, -0.009273395873606205, 0.025955988094210625, 0.02008574642241001, -0.0011780147906392813, -0.011502501554787159, 0.02708244137465954, -0.029081495478749275, 0.02801850624382496, 0.03890225291252136, -0.008392859250307083, 0.021577104926109314, -0.03871186450123787, 0.039441678673028946, 0.0029926334973424673, 0.020276132971048355, 0.009527243673801422, 0.016151098534464836, -0.0029767679516226053, 0.02106940932571888, -0.011756349354982376, -0.019086219370365143, -0.0037065818905830383, 0.021783357486128807, -0.02895457111299038, 0.011589761823415756, -0.027590136975049973, -0.01887996681034565, 0.0009147463133558631, -0.02765359915792942, -0.013311170041561127, 0.03142959251999855, 0.019022757187485695, 0.01385059766471386, 0.028716588392853737, -0.02732042409479618, -0.014318631030619144, 0.003716497914865613, -0.024766074493527412, -0.013993388041853905, -0.03082670271396637, -0.01590518280863762, 0.012073660269379616, -0.015698930248618126, 0.012779675424098969, -0.014001320116221905, -0.03423779085278511, -0.007377466186881065, -0.01919727772474289, 0.013580883853137493, -0.03969552740454674, -0.012692415155470371, 0.04461383819580078, -0.0061478884890675545, -0.0038097077049314976, -0.013049389235675335, 0.008559447713196278, 0.03331758826971054, -0.011407308280467987, 0.00877363234758377, 0.014231370761990547, 0.037886857986450195, -0.03801378235220909, 0.010772687382996082, -0.040710922330617905, 0.010106335394084454, 0.015897249802947044, 0.028716588392853737, -0.03541183844208717, 0.018705446273088455, -0.04458210989832878, -0.027843985706567764, 0.014643874019384384, 0.011089997366070747, -0.015984511002898216, -0.028351683169603348, 0.01274001132696867, 0.025416560471057892, -0.0064295013435184956, -0.001107611577026546, 0.06784095615148544, -0.00894021987915039, -0.02638435736298561, -0.02006988227367401, -0.021926147863268852, -0.017515532672405243, 0.012200583703815937, -0.004251959268003702, -0.04534365236759186, 0.01116139255464077, 0.033222395926713943, -0.0376647412776947, -0.021307392045855522, -0.021577104926109314, -0.01827707700431347, -0.038775328546762466, -0.038489747792482376, 0.025575216859579086, -0.009217866696417332, -0.007405230775475502, 0.006707148160785437, -0.00502540310844779, 0.011193123646080494, 0.017182357609272003, -0.04534365236759186, -0.013263573870062828, -0.022830482572317123, 0.03528491407632828, 0.007984322495758533, 0.01978430151939392, 0.0075599197298288345, 0.0094479164108634, -0.038521479815244675, -0.003815657226368785, 0.022893942892551422, -0.030319007113575935, 0.015960711985826492, -0.046359047293663025, 0.03969552740454674, -0.02322711981832981, 0.03871186450123787, 0.038204170763492584, 0.013096985407173634, -0.01113759446889162, 0.03741089254617691, -0.02487713284790516, -0.017103029415011406, 0.022735288366675377, 0.0014596277615055442, -0.02478194050490856, -0.005445839371532202, 0.014136177487671375, 0.0002177790302084759, -0.021957878023386, 0.0032722633332014084, -0.0377282053232193, -0.02010161243379116, -0.008043818175792694, 0.005473603960126638, 0.05806779861450195, -0.011518366634845734, 0.010296721942722797, 0.007964490912854671, -0.0011819811770692468, -0.036300309002399445, 0.013461892493069172, -0.035380106419324875, 0.009622436948120594, 0.036903198808431625, 0.008678439073264599, 0.0016162997344508767, 0.04439172148704529, 0.008575312793254852, 0.03874359652400017, 0.005354612600058317, -0.007270373869687319, -0.017198221758008003, -0.011375577189028263, -0.018721312284469604, 0.022893942892551422, 0.06822173297405243, -0.0001202308849315159, -0.005207856651395559, -0.03212767466902733, 0.018292943015694618, -0.01981603354215622, 0.04055226594209671, -0.014088580384850502, 0.01334290113300085, 0.010328453034162521, 0.014580411836504936, 0.0008800405194051564, 0.011899138800799847, -0.02076796442270279, -0.012652751058340073, -0.017674187198281288, -0.033127203583717346, 0.03956860303878784, 0.009685899131000042, -0.0008225279743783176, -0.02855793386697769, 0.0034190192818641663, 0.00928132887929678, 0.0017065348802134395, -0.015532342717051506, 0.012779675424098969, -0.00849598553031683, 0.025543484836816788, 0.01634148508310318, 0.030350737273693085, -0.02354443073272705, 0.007008593063801527, -0.01035225111991167, -0.0188482366502285, -0.0376647412776947, -0.017753515392541885, 0.019609780982136726, 0.012152987532317638, -0.03528491407632828, 0.08979883790016174, 0.006826139520853758, 0.009178202599287033, -0.005517234094440937, -0.033222395926713943, -0.043820563703775406, 0.0011700820177793503, 0.01983189955353737, -0.016000375151634216, 0.005469637457281351, 0.004172631539404392, -0.015960711985826492, 0.011510433629155159, -0.03296854719519615, -0.0011066199513152242, -0.04426479712128639, -0.02573387138545513, 0.011454904451966286, -0.019609780982136726, -0.031651709228754044, -0.03338105231523514, -0.0029271882958710194, -0.005291150417178869, 0.026336761191487312, -0.032207004725933075, 0.003972329199314117, -0.022386247292160988, -0.023734815418720245, -0.01726168394088745, -0.016611197963356972, -0.0266858022660017, -0.009979411028325558, 0.0102173937484622, 0.0010163848055526614, -0.03484068065881729, 0.018372271209955215, 0.012311642989516258, 0.016016241163015366, 0.013723674230277538, 0.0036788173019886017, 0.008146943524479866, -0.005608460865914822, 0.012970061972737312, -0.0031988853588700294, -0.015334024094045162, 0.011859475634992123, 0.018816504627466202, 0.0470888614654541, -0.0005533099756576121, 0.009915949776768684, -0.010971006006002426, -0.01567513309419155, 0.02544829249382019, -0.0023342145141214132, 0.004628764931112528, -0.013453960418701172, 0.01699197106063366, 0.02259249798953533, -0.004898478742688894, -0.0007015534210950136, 0.015897249802947044, -0.020054016262292862, -0.01622249372303486, 0.008242136798799038, 0.030715644359588623, -0.0015994426794350147, -0.011954668909311295, -0.018991027027368546, -0.03334932029247284, 0.015016713179647923, -0.006635753437876701, -0.03490414097905159, 0.03674454241991043, -0.012422701343894005, -0.0042757573537528515, -0.037855129688978195, -0.020990081131458282, 0.030556989833712578, 0.020038150250911713, -0.03176276758313179, 0.0018929546931758523, -0.000867149792611599, -0.02638435736298561, 0.006366039626300335, -0.01948285661637783, 0.025400696322321892, -0.040679190307855606, -0.002659457502886653, 0.00030937761766836047, -0.01853092573583126, -0.04045707359910011, 0.007258474826812744, -0.020006420090794563, -0.013231842778623104, 0.006639719475060701, -0.011677022092044353, 0.01665879413485527, -0.0012662666849792004, -0.035697419196367264, 0.028066102415323257, 0.014509016647934914, -0.028351683169603348, 0.021275660023093224, 0.015000848099589348, -0.024369437247514725, 0.02073623239994049, 0.011883273720741272, -0.005850410088896751, 0.02479780651628971, -0.017769381403923035, -0.03737916424870491, 0.0060844263061881065, -0.03161998093128204, -0.012351306155323982, -0.011756349354982376, 0.058924537152051926, 0.0071672480553388596, 0.025083385407924652, 0.01762659102678299, -0.02078383043408394, -0.05219755694270134, 0.009654168039560318, -0.004505807533860207, -0.015445082448422909, -0.0034725654404610395, -0.03499933332204819, 0.009543109685182571, -0.006909433286637068, 0.018927564844489098, 0.030731510370969772, -0.03079497255384922, -0.021862685680389404, 0.024988193064928055, -0.02298913709819317, -0.012827271595597267, 0.012137121520936489, -0.03741089254617691, 0.002451222622767091, -0.0628274530172348, 0.00030912971124053, -0.0102094616740942, -0.004125034902244806, -0.0203713271766901, 0.02140258438885212, -0.01019359566271305, -0.02544829249382019, -0.01788043975830078, -0.013921992853283882, 0.00777013786137104, -0.014659739099442959, 0.027272827923297882, -0.023116061463952065, -0.01396165695041418, -0.02233865112066269, 0.0220530703663826, -0.02608291245996952, -0.017721785232424736, -0.0022370382212102413, -0.02298913709819317, -0.02800264023244381, -0.014334496110677719, 0.010899611748754978, 0.018816504627466202, -0.022402113303542137, -0.030858434736728668, -0.0022390212398022413, -0.013089053332805634, -0.0032801961060613394, 0.013858530670404434, -0.020863156765699387, -0.011423173360526562, -0.005334780551493168, -0.021291526034474373, 0.0001317581773037091, 0.004144866950809956, 0.014786663465201855, 0.008599110879004002, 0.024956461042165756, -0.013327036052942276, -0.016151098534464836, 0.0036094055976718664, 0.008408725261688232, 0.01945112645626068, 0.0029807344544678926, 0.024067992344498634, 0.009757294319570065, -0.0440109483897686, -0.04109169542789459, 0.024321841076016426, -0.014096513390541077, -0.009336858056485653, -0.04486768692731857, 0.0050650667399168015, -0.007524222135543823, 0.01083614956587553, 0.012906599789857864, -0.007714608684182167, 0.012763810344040394, -0.013699875213205814, 0.008376994170248508, -0.014255168847739697, 0.03585607185959816, 0.010653696022927761, -0.055148541927337646, 0.03044593147933483, 0.014294832944869995, 0.0006385871092788875, -0.016166964545845985, -0.005386343691498041, -0.02229105494916439, -0.0022132399026304483, -0.013977522030472755, 0.037252239882946014, 0.017705919221043587, -0.022497305646538734, -0.018657850101590157, -0.029144957661628723, -0.00866257306188345, -0.011169325560331345, 0.0266858022660017, -0.04210708662867546, -0.023655489087104797, -0.007714608684182167, -0.015492679551243782, -0.013945790939033031, -0.0026931718457490206, 0.03300027921795845, -0.0282564889639616, 0.03187382593750954, 0.005806779954582453, 0.0049817729741334915, -0.03966379910707474, -2.478987335052807e-05, -0.004204362630844116, 0.0035201620776206255, -0.011280383914709091, -0.03306373953819275, -0.0204665195196867, -0.021846819669008255, -0.005124562419950962, -0.04651769995689392, -0.01005080621689558, -0.027780523523688316, -0.022449709475040436, 0.012502028606832027, -0.00023587564646732062, -0.04220227897167206, 0.00989215075969696, 0.0033773723989725113, -0.008020020090043545, 0.009463782422244549, -0.01384266559034586, -0.04658116400241852, 0.004505807533860207, -0.011558030731976032, -0.027875715866684914, 0.018324675038456917, 0.014683538116514683, 0.0050135040655732155, -0.02137085422873497, 0.0173251461237669, 0.034079134464263916, 0.02138672024011612, -0.02887524478137493, 0.002586079528555274, -0.006960996426641941, -0.0172775499522686, -0.014929452911019325, -0.009471714496612549, -0.02549588866531849, -0.016769854351878166, 0.009257529862225056, -0.005763149820268154, 0.012977994047105312, 0.00494210934266448, -0.006322409491986036, 0.017864573746919632, 0.01891169883310795, -0.0019008874660357833, 0.008670506067574024, -0.019609780982136726, -0.00023587564646732062, 0.0061796195805072784, -0.02703484334051609, -0.0003049154474865645, 0.019419394433498383, -0.013358767144382, 0.06193898618221283, 0.029081495478749275, 0.010328453034162521, 0.014175841584801674, -0.020545847713947296, -0.03645896166563034, 0.004505807533860207, -0.024972327053546906, 0.00478345388546586, -0.014318631030619144, 0.021164601668715477, 0.002080366248264909, -0.00247105467133224, -0.029636789113283157, -0.037886857986450195, -0.009868352673947811, 0.01853092573583126, -0.031286802142858505, 0.009551042690873146, 0.012145054526627064, -0.009693832136690617, -0.03246085345745087, 0.03052525781095028, -0.02801850624382496, -0.01672225631773472, 0.010447444394230843, -0.04591481015086174, -0.014810461550951004, 0.02771706134080887, -0.007797902449965477, 0.025305502116680145, 0.016452543437480927, 0.014231370761990547, 0.023417506366968155, -0.006826139520853758, 0.044772494584321976, -0.03146132454276085, -0.015460948459804058, -0.0005116629763506353, 0.047660019248723984, -0.010526771657168865, 0.013715741224586964, -0.02105354331433773, 0.0034150530118495226, -0.019927091896533966, -0.005985266994684935, 0.008765699341893196, 0.012152987532317638, 0.020529981702566147, 0.03271469846367836, 0.01854679174721241, -0.004037774633616209, -0.02611464448273182, 0.012462365441024303, -0.0051047308370471, 0.004608933348208666, -0.002135895425453782, -0.04315420985221863, -0.011383510194718838, 0.02917668968439102, -0.031508918851614, -0.01180394645780325, -0.05153120681643486, 0.023671355098485947, 0.006968928966671228, 0.012827271595597267, 0.00831353198736906, -0.011954668909311295, -0.02014920860528946, -0.009170269593596458, -0.010328453034162521, -0.001276182709261775, 0.013882328756153584, 0.005901973228901625, 0.002104164334014058, -0.013358767144382, 0.011446971446275711, 0.021942012012004852, 0.02008574642241001, -0.017103029415011406, -0.027558406814932823, 0.015968644991517067, 0.025543484836816788, 0.008948152884840965, -0.013446027413010597, -0.003976295702159405, 0.01856265775859356, 0.0033912546932697296, -0.03247671574354172, 0.051404282450675964, 0.032524313777685165, 0.001677778665907681, -0.0038116909563541412, -0.06758710741996765, 0.02735215425491333, 0.0007089903810992837, 0.030271410942077637, -0.031064685434103012, -0.0012751910835504532, 0.0061280569061636925, 0.011423173360526562, 0.014334496110677719, -0.0188006404787302, 0.017436204478144646, 0.017372742295265198, 0.008741901256144047, 0.03344451263546944, -0.008567379787564278, -0.0034309185575693846, 0.01756312884390354, -0.03426951915025711, 0.027447348460555077, 0.008718102239072323, -0.00865464098751545, -0.010756821371614933, -0.006373972166329622, 0.00023265296476893127, 0.015595804899930954, -0.04255132004618645, -0.006251014303416014, -0.0012940313899889588, 0.02197374403476715, -0.020561711862683296, -0.03268297016620636, -0.02643195539712906, 0.021640567108988762, -0.007663045544177294, 0.004085371270775795, -0.03238152340054512, 0.010019075125455856, 0.02387760579586029, 0.003060061950236559, 0.019070353358983994, -0.005584662780165672, 0.007155349012464285, -0.055148541927337646, 0.0004541504895314574, -0.03363490104675293, 0.008543581701815128, 0.01694437488913536, -0.0266699381172657, 0.008305598981678486, 0.010027008131146431, 0.0377282053232193, -0.02641608938574791, -0.006695249117910862, -0.029398806393146515, 0.009320992045104504, 0.021878549829125404, 0.008876757696270943, 0.01734101213514805, -0.019244873896241188], "index": 41}, {"title": "Fichtelberg", "text": "The Fichtelberg (German pronunciation: [\u02c8f\u026a\u00e7t\u0259lb\u025b\u0250\u032fk]) is a mountain with two main peaks in the middle of the Ore Mountains in the east German state of Saxony, near the Czech border. At 1,214.6 m (3,985 ft) above sea level, the Fichtelberg is the highest mountain in Saxony, the second highest in the Ore Mountains and used to be the highest mountain in East Germany. Its subpeak is 1,206 m (3,957 ft) high.", "vector": [0.02628307417035103, 0.04610802233219147, -0.007010071538388729, -0.0029493365436792374, -0.0032196766696870327, -0.00965715292841196, -0.03682634234428406, -0.0024630995467305183, -0.012818630784749985, 0.03442331776022911, -0.046017907559871674, 0.03223055973649025, 0.0032440824434161186, 0.024105334654450417, -0.033402033150196075, 0.023819975554943085, 0.016460714861750603, 0.012886215932667255, -0.02485627867281437, -0.05046350136399269, 0.0010372428223490715, -0.04703919589519501, -0.0456274189054966, 0.009784813039004803, -0.01281112153083086, 0.013659689575433731, -0.00562457786872983, -0.019885024055838585, -0.035594791173934937, -0.027094095945358276, 0.045807644724845886, 0.03190014138817787, 0.017737319692969322, -0.0005181520245969296, -0.00928167998790741, -0.0037265645805746317, 0.03901910036802292, -0.03430316597223282, 0.014027652330696583, -0.02372986078262329, 0.0030150441452860832, 0.012623385526239872, -0.014395615085959435, 0.022843746468424797, -0.0314796157181263, -0.024240504950284958, 0.013329273089766502, 0.009078924544155598, -0.011872440576553345, -0.04517684876918793, 0.015664711594581604, 0.001669913879595697, 0.017061470076441765, 0.037787552922964096, -0.016415657475590706, 0.00476099131628871, 0.02942202426493168, 0.1589600294828415, 0.0012775451177731156, -0.009116471745073795, 0.006555749569088221, -0.02419544756412506, -0.059835296124219894, -0.028175456449389458, -0.018758606165647507, -0.032470859587192535, -0.0376974381506443, 0.012135270982980728, -0.0219876691699028, 0.0002649427915457636, -0.015033918432891369, 0.01508648507297039, 0.023023974150419235, 0.05268630012869835, 0.03223055973649025, 0.007393053267151117, -0.020681025460362434, -0.053827736526727676, 0.009229114279150963, -0.04547723010182381, 0.012465686537325382, 0.028490852564573288, -0.07251124829053879, -0.017722301185131073, 0.022843746468424797, -0.03361229598522186, -0.029151683673262596, -0.036225587129592896, -0.027634775266051292, 0.05911438912153244, -0.011692213825881481, 0.03574497997760773, -0.049322064965963364, -0.02200268767774105, 0.010415607132017612, 0.0014981352724134922, 0.04923195391893387, -0.010333003476262093, -0.01620539277791977, 0.027860058471560478, 0.029271835461258888, -0.05295664072036743, 0.009897454641759396, 0.039529744535684586, 0.011189080774784088, 0.028325645253062248, -0.017857471480965614, 0.031659841537475586, 0.012255421839654446, -0.01510150358080864, 0.02137189358472824, 0.028040286153554916, 0.004250348545610905, 0.009476926177740097, 0.040641143918037415, 0.033101655542850494, 0.03018798865377903, 0.03724687173962593, -0.012871197424829006, -0.01994509808719158, -0.022137857973575592, 0.01806773617863655, 0.005951239261776209, -0.00793748814612627, 0.008928735740482807, 0.0031201764941215515, 0.05169505253434181, -0.008065149188041687, 0.016716035082936287, 0.022738615050911903, -0.009371793828904629, -0.038117967545986176, 0.02862602286040783, -0.01572478748857975, 0.016475733369588852, 0.0008588933269493282, 0.06548240035772324, 0.04589775949716568, 0.0314796157181263, 0.006919958163052797, -0.02153710275888443, 0.046768855303525925, -0.031059084460139275, 0.05647106468677521, -0.01587497629225254, -0.028851306065917015, -0.005196539219468832, -0.008605829440057278, -0.01092624943703413, -0.0408514067530632, 0.018338076770305634, 0.0019655984360724688, -0.007070146966725588, -0.0180827546864748, -0.0220177061855793, -0.014215388335287571, 0.010731004178524017, -0.0023072785697877407, 0.035114187747240067, 0.032170481979846954, -0.016430675983428955, -0.020635968074202538, 0.030533423647284508, -0.019734833389520645, 0.03649592772126198, -0.007967526093125343, 0.019374379888176918, 0.03787766396999359, 0.009078924544155598, 0.010956287384033203, 0.027905115857720375, -0.0016502016223967075, -0.015454447828233242, -0.015634674578905106, -0.02641824446618557, -0.015769844874739647, 0.04061110317707062, -0.016085240989923477, 0.038117967545986176, 0.018202906474471092, 0.007002561818808317, -0.00809518713504076, 0.026613490656018257, -0.02014034427702427, -0.043915264308452606, 0.03376248851418495, 0.008906207978725433, 0.03526437655091286, -0.02012532576918602, -0.054608721286058426, 7.397981244139373e-05, 0.02249831147491932, 0.028220511972904205, -0.031659841537475586, 0.04935210570693016, -0.03550468012690544, -0.011970062740147114, 0.055449776351451874, 0.01743694208562374, 0.01899890787899494, -0.0581531785428524, 0.01085866428911686, 0.02122170478105545, 0.002502524061128497, 0.041602350771427155, 0.010948778130114079, 0.03421305492520332, -0.003976253792643547, -0.011662175878882408, 0.036736227571964264, 0.03478377312421799, -0.020410684868693352, -0.007535732816904783, 0.03595524653792381, 0.04658862575888634, 0.01227044127881527, 0.026298092678189278, -0.004813557490706444, 0.003927442245185375, 0.053527358919382095, 0.09984564781188965, -0.03283131495118141, -0.015769844874739647, 0.005992541089653969, -0.028701117262244225, 0.013960067182779312, -0.03271116316318512, -0.0180827546864748, -0.0267486609518528, -0.03238074854016304, -0.04211299493908882, 0.004832331091165543, -0.049922823905944824, -0.0036495926324278116, -0.041091710329055786, -0.009957530535757542, -0.014613389037549496, -0.004449348896741867, 0.02955719456076622, -0.0306836124509573, 0.03817804157733917, 0.0010945022804662585, 0.0049449726939201355, -0.011271684430539608, -0.01313402783125639, 0.000625161686912179, -0.00936428364366293, -0.043795112520456314, 0.009619605727493763, 0.01557459868490696, 0.029902629554271698, -0.031990256160497665, 0.024646013975143433, -0.004937463440001011, 0.017872489988803864, -0.04511677473783493, -0.011504476889967918, 0.008665905334055424, -0.018833700567483902, -0.0259226206690073, -0.042863938957452774, 0.009957530535757542, 0.03916928917169571, 0.011279193684458733, 0.008861150592565536, 0.01359210442751646, 0.005827333312481642, 0.027799982577562332, -0.040010347962379456, -0.025261789560317993, 0.008665905334055424, 0.01760215125977993, 0.0005622700555250049, -0.050703804939985275, 0.0012212243163958192, 0.030728669837117195, 0.0313895009458065, 0.05836344510316849, -0.0029042798560112715, -0.0010184691054746509, 0.013058933429419994, -0.007501940242946148, -0.0023016463965177536, 0.07515457272529602, -0.02532186545431614, 0.07124966382980347, -0.009694700129330158, -0.011391835287213326, 0.06037597730755806, -0.06818580627441406, 0.002123296959325671, -0.003035695059224963, 0.006897429935634136, -0.01697135716676712, -0.004096405114978552, 0.010400587692856789, -0.008793565444648266, 0.01695633865892887, 0.044245678931474686, -0.002868609968572855, -0.022828727960586548, 0.06728467345237732, -0.011174061335623264, 0.011219117790460587, -0.0016783620230853558, 0.009319227188825607, -0.056531138718128204, 0.03409290313720703, -0.059805259108543396, -0.01775234006345272, 0.015071465633809566, -0.030938932672142982, 0.011279193684458733, 0.05112433433532715, -0.014177841134369373, -0.0029080344829708338, 0.012525762431323528, -0.01712154597043991, -0.011256664991378784, -0.02796519175171852, 0.031990256160497665, -0.004317933693528175, -0.01484618242830038, 0.02261846326291561, 0.07407321035861969, -0.004595783539116383, 0.0016117156483232975, -0.01965973898768425, 0.026643527671694756, 0.012300479225814342, -0.024255523458123207, 0.03478377312421799, 0.023144124075770378, -0.021777404472231865, -0.03535449132323265, -0.04968252032995224, -0.04325443133711815, 0.006713448092341423, -0.03032315894961357, 0.01790252886712551, 0.023639747872948647, 0.009289189241826534, 0.02105649746954441, 0.05295664072036743, -0.02656843326985836, -0.03208037093281746, 0.04908176511526108, -0.007516959216445684, -0.009769794531166553, 0.004310424439609051, 0.0006237537018023431, 0.03694649413228035, -0.07425343990325928, 0.038298193365335464, 0.021011440083384514, 0.014102746732532978, -0.08050130307674408, -0.04830078035593033, 0.0676451250910759, 0.005523200612515211, 0.0017881877720355988, -0.0235946923494339, 0.05959499254822731, 0.020350608974695206, -0.026132885366678238, 0.011594590730965137, 0.008508206345140934, 0.004734707996249199, 0.0014042671537026763, 0.019299285486340523, -0.013719764538109303, -0.024495825171470642, 0.020380647853016853, 0.028565946966409683, -0.059685107320547104, -0.024630995467305183, 0.012300479225814342, -0.0029230534564703703, -0.031209273263812065, 0.009184056892991066, -0.05139467492699623, -0.0008753202273510396, 0.02251332998275757, 0.011519496329128742, -0.011151532642543316, -0.0005632087122648954, -0.029166704043745995, -0.03631569817662239, -0.046468477696180344, 0.02688383124768734, -0.04103163257241249, 0.021356875076889992, 0.00660080648958683, -0.02027551457285881, -0.0009246010449714959, -0.04421564191579819, -0.01352451927959919, 0.046017907559871674, -0.02922677807509899, -0.03526437655091286, 0.005440596491098404, 0.015124032273888588, 0.02326427586376667, 0.045987870544195175, 0.04106167331337929, 0.021101554855704308, 0.021131591871380806, 0.012307988479733467, -0.01979490928351879, 0.019254229962825775, -0.015920033678412437, -0.03283131495118141, 0.059685107320547104, -0.017211658880114555, 0.04538711532950401, -0.012555800378322601, -0.0062966737896203995, -0.010242889635264874, -0.004355480894446373, 0.031659841537475586, -0.025877565145492554, -0.015424409881234169, -0.009889945387840271, -0.009942512027919292, -0.020801175385713577, 0.03424309194087982, 0.006240352988243103, 0.024270541965961456, -0.010948778130114079, -0.00012144188804086298, -0.05866382271051407, -0.0065632592886686325, 0.025877565145492554, 0.029016515240073204, 0.02233310416340828, 0.04965248331427574, 0.005699672270566225, 0.036375775933265686, 0.05280645191669464, 0.04697911813855171, 0.06506187468767166, 0.003418677020817995, 0.06470142304897308, 0.011061419732868671, -0.0067697688937187195, 0.019569626078009605, -0.04463617131114006, -0.002797270193696022, 0.0017177866538986564, -0.048481009900569916, 0.026132885366678238, -0.02185249887406826, 0.036736227571964264, -0.01077606063336134, 0.020380647853016853, -0.013111499138176441, 0.062839075922966, 0.018593396991491318, 0.020966384559869766, -0.04962244629859924, -0.03319177031517029, -0.016250450164079666, 0.011264175176620483, -0.0503433533012867, 0.04031072556972504, 0.05569007992744446, 0.025426996871829033, 0.04214303195476532, 0.02294887974858284, 0.009627114981412888, -0.0019900042098015547, -0.02623801864683628, -0.10050647705793381, 0.014786106534302235, 0.024105334654450417, 0.026222998276352882, 0.012150289490818977, -0.051484789699316025, 0.04067118093371391, 0.017887510359287262, 0.07022837549448013, 0.002954968484118581, -0.013486972078680992, -0.005729710217565298, -0.028881344944238663, 0.010460663586854935, -0.01839815266430378, -0.039559781551361084, -0.013501990586519241, 0.03913925215601921, -0.0040025366470217705, -0.04649851471185684, 0.025667300447821617, 0.0033360731322318316, -0.0009353958303108811, 0.052445996552705765, -0.0050163124687969685, 0.001950579578988254, -0.03018798865377903, -0.00456574559211731, -0.01335180178284645, 0.0165207888931036, 0.0034862621687352657, 0.0259226206690073, -0.01650577038526535, 0.05121444910764694, 0.01745196059346199, 0.06151741370558739, -0.03892898932099342, -0.005444351118057966, 0.05457868054509163, 0.02419544756412506, 0.03598528355360031, -0.04508673772215843, -0.029196741059422493, -0.003326686332002282, -0.0005932465428486466, -0.004993784241378307, -0.016130298376083374, 0.00895877368748188, -0.0024499581195414066, 0.004573254846036434, 0.003223431296646595, 0.0330115407705307, 0.06301930546760559, 0.016851205378770828, -0.015244183130562305, 0.001301012234762311, 0.00895877368748188, -0.014275464229285717, -0.08140243589878082, -1.3640211363963317e-05, -0.0487813875079155, 0.041602350771427155, 0.020996421575546265, 0.025832507759332657, 0.0004322627210058272, -0.05250607430934906, -0.006334220990538597, -0.010700966231524944, -0.026688585057854652, -0.03352218493819237, -0.031419537961483, -0.0034055355936288834, -0.04319435730576515, -0.03995027393102646, 0.008861150592565536, -0.000696501461789012, 0.007809828035533428, -0.02278367057442665, -0.007997564040124416, -0.013930029235780239, -0.02451084367930889, 0.02388005144894123, -0.015326786786317825, 0.0157097689807415, -0.03313169255852699, -0.01650577038526535, -0.005087652243673801, -0.018368113785982132, 0.028190474957227707, -0.003465611021965742, -0.04385518655180931, 0.040490955114364624, -0.014951314777135849, -0.015379353426396847, -0.0027390718460083008, 0.024285560473799706, -0.030908895656466484, -0.005132709164172411, 0.007265392690896988, -0.019584644585847855, 0.015679731965065002, 0.01778237707912922, -0.01085866428911686, 0.011887459084391594, 0.012082705274224281, -0.061697639524936676, 0.018608417361974716, -0.029211759567260742, 0.020485779270529747, -0.02374488115310669, 0.0015751071041449904, -0.02077113837003708, -0.017346829175949097, 0.001974985236302018, -0.02954217605292797, -0.08002069592475891, -0.006300428416579962, 0.0019186644349247217, -0.01622041128575802, 0.06500180065631866, 0.0047159343957901, -0.003321054158732295, -0.002519420348107815, -0.024330617859959602, 0.0057146912440657616, 0.03241078555583954, -0.07407321035861969, -0.0005937158712185919, -0.0165207888931036, -0.015619656071066856, 0.018202906474471092, -0.055720116943120956, -0.034333206713199615, 0.011144023388624191, 0.018923813477158546, -0.05905431509017944, -0.022708576172590256, -0.0028479588218033314, -0.008410584181547165, 0.0004890529089607298, 0.040160536766052246, 0.012540780939161777, 0.009033868089318275, -0.01384742558002472, 0.0057146912440657616, -0.0018454473465681076, 0.019554607570171356, -0.01140685472637415, 0.022137857973575592, -0.038148004561662674, -0.024886317551136017, 0.020380647853016853, -0.03190014138817787, 0.023159142583608627, 0.04172250255942345, -0.0044005378149449825, -0.011572062037885189, 0.00024171041150111705, -0.022753633558750153, 0.0015093993861228228, 0.03385259956121445, -1.6324253010679968e-05, -0.00895877368748188, 0.010250398889183998, 0.024180429056286812, -0.005673389416188002, 0.026628509163856506, 0.007952507585287094, 0.03493396192789078, 0.005598295014351606, -0.004937463440001011, -0.06392043828964233, -0.005256615113466978, -0.020681025460362434, 0.006593296770006418, 0.016100261360406876, 0.021927593275904655, -0.024615976959466934, -0.014005123637616634, 0.01359210442751646, 0.010408097878098488, 0.006886165589094162, -0.004359235521405935, -0.0032159218098968267, 0.007682167459279299, -0.026538396254181862, -0.0005941851995885372, 0.005628332495689392, 0.02344450168311596, -0.019584644585847855, -0.01525920256972313, -0.010220360942184925, -0.020035212859511375, -0.009769794531166553, -0.004896161146461964, -0.01604018546640873, 0.0074756573885679245, -0.010025115683674812, -0.01179734617471695, -0.0102128516882658, 0.00778729934245348, 0.025216732174158096, 0.012202856130897999, 0.002433061832562089, 0.00841809343546629, -0.0227986890822649, 0.016896262764930725, 0.008463149890303612, 0.00785488449037075, -0.031239312142133713, 0.01328421663492918, -0.02939198724925518, -0.06319952756166458, -0.008065149188041687, -0.017497017979621887, 0.020996421575546265, 0.01107643824070692, 0.019584644585847855, 0.008290432393550873, 0.019089020788669586, -0.057612501084804535, 0.009544510394334793, -0.006157748866826296, 0.012766065075993538, 0.009086434729397297, -0.0005768196424469352, -0.02057589218020439, -0.0251416377723217, 0.013584595173597336, 0.02625303715467453, -0.006439353339374065, 0.011572062037885189, -0.021326838061213493, 0.008680923841893673, -0.020215438678860664, -0.006567013915628195, -0.016100261360406876, -0.04067118093371391, 0.007982545532286167, -0.04589775949716568, -0.03129938617348671, -0.010393078438937664, 0.01605520397424698, -0.01794758439064026, 0.023369407281279564, -0.01281112153083086, 0.0026564679574221373, 0.015033918432891369, 0.02107151597738266, 0.02123672515153885, 0.01321663148701191, -0.028070323169231415, -0.009093943983316422, -0.00036866706795990467, 0.030278101563453674, -0.000830732868053019, 0.02248329296708107, 0.027875078842043877, -0.00816277228295803, 0.004629575647413731, -0.0009931247914209962, -0.014440672472119331, -0.010070172138512135, -0.010588324628770351, -0.0012690969742834568, -0.010956287384033203, 0.03051840513944626, -0.00495623704046011, -0.010715984739363194, -0.027454549446702003, -0.0023204199969768524, 0.008388055488467216, -0.015754826366901398, 0.009664662182331085, 0.007595808710902929, -0.013494481332600117, -0.029196741059422493, 0.0534672848880291, 0.01622041128575802, 0.003131440607830882, 0.01791754737496376, -0.021507063880562782, -0.013689727522432804, 0.021612197160720825, -0.024270541965961456, -0.03974000737071037, 0.04184265434741974, -0.019779890775680542, -0.021792422980070114, 0.029151683673262596, -0.039709970355033875, 0.0012512620305642486, 0.01934434287250042, -0.001478422898799181, -0.031659841537475586, 0.0019900042098015547, 0.020816195756196976, -0.0029943932313472033, 0.027574699372053146, 0.016385620459914207, 0.010378059931099415, -0.007430600468069315, -0.016746073961257935, -0.05079391971230507, 0.028656059876084328, 0.024150390177965164, 0.030848819762468338, 0.007051373366266489, -0.01540939137339592, 0.0023448257707059383, 0.018308037891983986, 0.014418143779039383, -0.03724687173962593, 0.0017403149977326393, -0.0037453381810337305, 0.01123413722962141, -0.05295664072036743, 0.05563000589609146, -0.015664711594581604, 0.00746439304202795, -0.006506938487291336, 0.0004118463839404285, 0.001384554780088365, -0.003938706591725349, 0.018668493255972862, -0.01235304493457079, 0.036075398325920105, -0.003664611605927348, -0.003242204897105694, 0.007922469638288021, 0.024585938081145287, 0.001262526260688901, 0.053827736526727676, -0.04968252032995224, 0.016625922173261642, 0.009852398186922073, -0.02562224306166172, 0.022993935272097588, 0.030908895656466484, 0.02485627867281437, 0.006735976319760084, 0.013254178687930107, -0.04181261733174324, 0.02799522876739502, -0.02234812267124653, -0.02263348177075386, 0.02392510697245598, 0.022303065285086632, -0.017481999471783638, -0.012480705976486206, 0.014260445721447468, -0.003227186156436801, 0.022047745063900948, 0.06578277796506882, -0.012135270982980728, -0.033582258969545364, 0.013899991288781166, -0.047159343957901, 0.003242204897105694, 0.028100362047553062, -0.0022059008479118347, -0.04067118093371391, -0.06590293347835541, 0.018788643181324005, -0.007565770763903856, -0.007284166291356087, -0.026943905279040337, -0.012863687239587307, -0.0298575721681118, 0.028325645253062248, -0.00793748814612627, 0.0180977750569582, -0.03664611652493477, -0.00855326373130083, 0.004498160444200039, -0.07689676433801651, 0.007952507585287094, 0.020681025460362434, 0.03974000737071037, 0.0020331835839897394, 0.03550468012690544, -0.013704746030271053, -0.02356465347111225, 0.021507063880562782, -0.024736128747463226, -0.042353298515081406, -0.005575766321271658, 0.014200369827449322, -0.026598472148180008, 0.008988811634480953, -0.002068853471428156, -0.0019824947230517864, 0.006262881215661764, 0.004141461569815874, 0.03241078555583954, -0.008117714896798134, 0.035444602370262146, -0.008290432393550873, -0.028250550851225853, -0.01534180622547865, 0.010528248734772205, -0.0314796157181263, -0.002384250285103917, 0.006859882269054651, -0.0228137094527483, -0.010783569887280464, -0.012608366087079048, 0.037186793982982635, 0.0061952960677444935, 0.018022678792476654, 0.014583352021872997, -0.02894141897559166, -0.00235796719789505, 0.005677144043147564, 0.007899940945208073, 0.045807644724845886, 0.03568490594625473, -0.01637060008943081, 0.030938932672142982, 0.025877565145492554, 0.013291725888848305, -0.0016520789358764887, 0.027139151468873024, 0.030713649466633797, -0.013096480630338192, 0.0071076941676437855, -0.035144224762916565, 0.012796103022992611, 0.015469466336071491, -0.026928886771202087, -0.01617535576224327, -0.009379303082823753, -0.01203013863414526, 0.01476357877254486, 0.014252935536205769, -0.0172717347741127, -0.0019196030916646123, 0.02811538055539131, -0.005568257067352533, 0.048841461539268494, 0.0066871652379632, -0.015499504283070564, 0.0005679021705873311, 0.005249105393886566, -0.029677346348762512, -0.029962705448269844, -0.009807341732084751, 0.027709869667887688, -0.006758505012840033, -0.007085165940225124, 0.022528350353240967, 0.021326838061213493, -0.014057690277695656, -0.012901234440505505, 0.034333206713199615, 0.018518302589654922, 0.008125225082039833, -0.004791028797626495, 0.022242991253733635, -0.007734733168035746, 0.01172225084155798, -0.027784964069724083, -0.019854985177516937, -0.03129938617348671, -0.012202856130897999, -0.029992742463946342, -0.0013226018054410815, -0.014012633822858334, 0.01947951316833496, -0.01791754737496376, 0.05472886934876442, -0.01634056307375431, -0.022918840870261192, 0.006172767840325832, 0.01697135716676712, 0.005196539219468832, 0.007749752141535282, 0.002887383569031954, -0.02419544756412506, -0.011061419732868671, 0.016145316883921623, -0.005012557841837406, 0.043795112520456314, 0.02311408706009388, -0.004302914720028639, 0.03346210718154907, -0.03000776097178459, -0.03250090032815933, 0.0007514143362641335, -0.0012690969742834568, -0.017557093873620033, 0.011729761026799679, -0.006668391637504101, -0.010678437538444996, 0.0018867492908611894, -0.018608417361974716, -0.039709970355033875, -0.03790770471096039, 0.009882436133921146, 0.044125527143478394, 0.00040527561213821173, 0.020876269787549973, -0.0027353172190487385, 0.017181621864438057, 0.0306385550647974, 0.01841317117214203, 0.06410066783428192, -0.013321763835847378, -0.020696043968200684, 0.03553471714258194, 0.011091457679867744, 0.018142830580472946, 0.007021335419267416, -0.0043404619209468365, -0.02957221306860447, -0.008117714896798134, -0.009214094839990139, 0.037667401134967804, 0.05553989112377167, -0.005530709866434336, 0.024165410548448563, 0.008470659144222736, -0.0009433746454305947, 0.02029053308069706, -0.05923454090952873, -0.007682167459279299, 0.012788592837750912, -0.029136665165424347, -0.010633381083607674, -0.014966333284974098, -0.01758713088929653, -0.03574497997760773, -0.024015219882130623, 0.023714842274785042, -0.046288248151540756, -0.0290765892714262, 0.004727198742330074, 0.0106033431366086, 0.03220052272081375, 0.042683713138103485, 0.010182813741266727, 0.0014896871289238334, 0.009874926880002022, -0.023369407281279564, 0.0027803739067167044, -0.0010034502483904362, -0.006657127290964127, 0.03980008512735367, 0.02329431287944317, -0.023008953779935837, -0.008733490481972694, 8.864670962793753e-05, -0.008312961086630821, 0.05445852875709534, -0.04806048050522804, -0.008433111943304539, 0.0025475809816271067, -0.013990105129778385, 0.0345735065639019, 0.00975477509200573, -0.03241078555583954, 0.02970738336443901, -0.030608518049120903, 0.0055795214138925076, -0.020545855164527893, 0.023324351757764816, 0.00432919804006815, -0.01572478748857975, -0.028175456449389458, -0.02673364244401455, -0.030398253351449966, -0.030398253351449966, -0.01715158298611641, -0.04019057750701904, -0.01932932436466217, 0.0009903087047860026, -0.0034074129071086645, -0.004265367519110441, -0.0019862495828419924, 0.029752440750598907, 0.0061652581207454205, -0.007212826516479254, -0.03421305492520332, 0.023474540561437607, -0.02969236485660076, -0.02565228007733822, -0.02246827445924282, -0.0013423141790553927, 0.0012475074036046863, -0.0034505922812968493, 0.01163964718580246, 0.0015798005042597651, 0.01170723233371973, -0.006135220639407635, 0.006199050694704056, 0.021161628887057304, -0.010573305189609528, -0.02278367057442665, 0.0034036580473184586, 0.0030413272324949503, 0.039860159158706665, -0.022573405876755714, 0.02655341476202011, 0.028821269050240517, -0.021431969478726387, -0.00973975658416748, 0.01695633865892887, -0.053377170115709305, 0.010723493993282318, 0.06022578850388527, 0.004017555620521307, 0.016400638967752457, -0.005035086069256067, 0.011594590730965137, -0.0008875231142155826, 0.0330415777862072, 0.016911281272768974, -0.022393180057406425, -0.017647206783294678, 0.023369407281279564, 0.029962705448269844, 0.03346210718154907, -0.010558286681771278, -0.05097414553165436, -0.012052667327225208, -0.029151683673262596, -0.03096897155046463, -0.0003484853950794786, -0.03493396192789078, -0.033101655542850494, 0.025892583653330803, -0.0038316966965794563, 0.030908895656466484, 0.028100362047553062, -0.024946391582489014, 0.016746073961257935, 0.00011979919509030879, -0.025967678055167198, -0.03871872276067734, 0.007629601284861565, 0.0077422428876161575, -0.008050130680203438, 0.02562224306166172, -0.02297891676425934, 0.011804855428636074, 0.009649642743170261, 0.017481999471783638, -0.023189181461930275, -0.001913971034809947, -0.00936428364366293, 0.009574548341333866, 0.0014671587850898504, 0.022062763571739197, 0.0007485983078368008, 0.015935052186250687, -0.03036821447312832, 0.05451860651373863, 0.005279143340885639, -0.029947686940431595, -0.01101636327803135, 0.0029925156850367785, -0.007287920918315649, -0.008748508989810944, 0.035144224762916565, 0.007520713843405247, -0.010911230929195881, -0.027094095945358276, -0.008125225082039833, -0.02327929437160492, 0.014072708785533905, 0.005834842566400766, 0.029932666569948196, 0.015995128080248833, 0.00255321292206645, -0.03721683472394943, 0.03223055973649025, -0.011534514836966991, -0.01793256588280201, 0.0007063576485961676, 0.029632288962602615, 0.0054781436920166016, -0.005376765970140696, -0.07371275871992111, 0.008733490481972694, -0.02545703575015068, -0.018473247066140175, 0.011864930391311646, -0.010235380381345749, -0.006127710919827223, 0.002384250285103917, 0.015244183130562305, 0.022122839465737343, -0.04328446835279465, -0.003152091521769762, 0.02874617464840412, -0.02297891676425934, -0.034994035959243774, 0.01092624943703413, -0.005992541089653969, 0.03391267731785774, -0.0071677700616419315, 0.007408072240650654, -0.01218032743781805, 0.015439429320394993, -0.028430776670575142, -0.021507063880562782, 0.017872489988803864, -0.009844888933002949, -0.014328029938042164, -0.010160285979509354, 0.004118933342397213, -0.012232894077897072, 0.023774918168783188, -0.003968744073063135, 0.008433111943304539, -0.014162822626531124, 0.022288046777248383, -0.011549534276127815, -0.017962604761123657, -0.023789936676621437, -6.928640505066141e-05, 0.0036045359447598457, 0.019719814881682396, -0.012796103022992611, -0.03505411371588707, -0.024435749277472496, 0.013930029235780239, -0.0051101804710924625, -0.023054011166095734, 0.02970738336443901, -0.0015976354479789734, -0.011857421137392521, 0.012255421839654446, 0.004126442596316338, 0.006653372664004564, 0.00012402325228322297, 0.002575741382315755, -0.0071377321146428585, 0.0149287860840559, -0.030308140441775322, -0.03817804157733917, -0.002384250285103917, 0.017091507092118263, 0.003225308610126376, 0.0032159218098968267, -0.00809518713504076, 0.014838673174381256, -0.0059887864626944065, 0.015664711594581604, 0.003874876070767641, -0.014523276127874851, 0.013532028533518314, -0.03550468012690544, -0.0036176773719489574, 0.001048506936058402, 0.007794809062033892, -0.0025100335478782654, 0.009018849581480026, -0.019374379888176918, -0.043164316564798355, -0.005196539219468832, -0.01637060008943081, 0.0066984291188418865, -0.02403024025261402, 0.028686098754405975, 0.016580864787101746, 0.02044072188436985, 0.011496967636048794, 0.03187010437250137, 0.03096897155046463, -0.0027540908195078373, -0.008275413885712624, 0.014418143779039383, 0.018938831984996796, 0.018202906474471092, -0.0008828297141008079, -0.019764872267842293, 0.010731004178524017, -0.022663520649075508, 0.007456883788108826, -0.016295505687594414, 0.011301722377538681, 0.013179084286093712, -0.01946449466049671, 0.01854834146797657, 0.02864104136824608, 0.013013876974582672, -0.03334195911884308, -0.03111916035413742, 0.015003880485892296, 0.03328188136219978, 0.017737319692969322, -0.0038823855575174093, -0.02249831147491932, -0.038268156349658966, 0.011511987075209618, 0.01841317117214203, 0.013577084988355637, -0.012886215932667255, 0.02814541757106781, -0.03505411371588707, 0.0007608011364936829, 0.014252935536205769, 0.04019057750701904, -0.013772331178188324, 0.002770987106487155, 0.03565486893057823, 0.00675475038588047, 0.028025267645716667, -0.02859598584473133, -0.011294212192296982, 0.025997715070843697, -0.005440596491098404, -0.02090630866587162, -0.019915061071515083, -0.04136205092072487, -0.008020092733204365, 0.011384326033294201, -0.002502524061128497, 0.0003498934383969754, 0.0330115407705307, 0.015754826366901398, 0.004821066744625568, -0.017181621864438057, 0.024135371670126915, 0.018278000876307487, 0.028971457853913307, 0.02089129015803337, 0.022843746468424797, 0.02529182657599449, -0.02781500294804573, 0.0346035435795784, 0.05127452313899994, -0.01248821523040533, 0.009296698495745659, 0.021582158282399178, 0.007847375236451626, 0.021356875076889992, -0.010175304487347603, -0.019569626078009605, -0.0008274475112557411, -0.0037453381810337305, 0.007562016136944294, 0.006735976319760084, -0.006848618388175964, -0.03892898932099342, -0.022573405876755714, -0.0006016946863383055, -0.01013024803251028, -0.025021487846970558, -0.0149287860840559, -0.01637060008943081, 0.033552221953868866, 0.0049149347469210625, 0.0002675241557881236, -0.02216789685189724, -0.01622041128575802, -0.019614683464169502, 0.03346210718154907, 0.018187887966632843, 0.029346929863095284, 0.014741050079464912, 0.005763502791523933, -0.0011695967987179756, -0.009597077034413815, -0.013426896184682846, 0.03445335477590561, -0.022047745063900948, 0.002571986522525549, 0.0014737294986844063, -0.0002891138137783855, 0.017497017979621887, -0.007997564040124416, -0.009259151294827461, 0.02297891676425934, -0.006762259639799595, 0.0024199201725423336, -0.03397275134921074, -0.0007528223213739693, 0.006285409443080425, -0.0314796157181263, -0.026132885366678238, -0.007175279315561056, 0.009942512027919292, 0.01588999666273594, 0.033251844346523285, 0.007471902761608362, 0.0056921630166471004, 0.03274120017886162, -0.008185300044715405, -0.03274120017886162, -0.003182129468768835, 0.0006040413863956928, -0.013179084286093712, 0.013990105129778385, -0.009454397484660149, 0.005530709866434336, 0.029437042772769928, 0.016610903665423393, 0.004982519894838333, -0.0023898824583739042, 0.003660856746137142, 0.016595885157585144, 0.000717621820513159, 0.01209772378206253, -0.007727223914116621, 0.013622142374515533, -0.006394296418875456, -0.00726914731785655, 0.014245426282286644, -0.0036739984061568975, 0.011113985441625118, 0.051484789699316025, 0.04199284315109253, -0.0011968185426667333, -0.0251416377723217, -0.008590810932219028, -0.016070222482085228, 0.015664711594581604, 0.01996011845767498, 0.0028779967688024044, -0.042203109711408615, 0.003056346205994487, 0.015364334918558598, 0.028265569359064102, 0.012473195791244507, 0.014726031571626663, 0.005369256716221571, -0.016595885157585144, -0.013937539421021938, 0.010378059931099415, -0.04103163257241249, -0.0033079127315431833, 0.005951239261776209, 0.00031375419348478317, 0.005669634789228439, -0.004366745240986347, -0.019224191084504128, 0.03910921514034271, -0.016550827771425247, 0.031029047444462776, -0.010137757286429405, 0.008170281536877155, -0.004490651190280914, -0.0010287946788594127, 0.015063956379890442, -0.00910896249115467, -0.0172717347741127, -0.007719714660197496, -0.014605879783630371, -0.002265976509079337, 0.0439753383398056, -0.0036007813178002834, -0.016746073961257935, 0.012593347579240799, -0.013329273089766502, -0.0005937158712185919, 0.03862861171364784, -0.023038992658257484, 0.04181261733174324, -0.003750970121473074, 0.010475683026015759, -0.006135220639407635, 0.01602516695857048, -0.00404759356752038, -0.01399761438369751, -0.004302914720028639, -0.01196255348622799, 0.04466620832681656, 0.017256716266274452, -0.007535732816904783, 0.028701117262244225, 0.0036946493200957775, -0.01917913556098938, -0.005947484169155359, -0.015484485775232315, -0.007182789035141468, 0.027709869667887688, -0.017331810668110847, -0.0007598624797537923, -0.008065149188041687, -0.026928886771202087, 0.023654766380786896, 0.00424283929169178, -0.00048060479457490146, -0.010430625639855862, -0.01092624943703413, 0.010348021984100342, 0.03980008512735367, 0.004926199093461037, 0.014665955677628517, 0.007817337289452553, -0.03961985930800438, 0.02736443467438221, 0.013329273089766502, 0.03958981856703758, 0.004310424439609051, 0.018668493255972862, -0.04760991409420967, 0.007982545532286167, 0.015146560035645962, 0.005703427363187075, -0.005237841513007879, -0.005695917643606663, -0.005853616166859865, -0.013877463527023792, -0.015664711594581604, -0.02075611986219883, 0.007430600468069315, -0.0037678664084523916, 0.023234238848090172, 0.042833901941776276, -0.007246619090437889, 0.008448131382465363, 0.024600958451628685, -0.010746022686362267, -0.02406027726829052, 0.02861100435256958, 0.011309231631457806, -0.013644670136272907, 0.025201713666319847, 0.02392510697245598, 0.001421163440681994, -0.0037941494956612587, 0.025742394849658012, -0.005380521062761545, 0.04415556415915489, 0.02796519175171852, 0.011159042827785015, -0.0313895009458065, 0.025066543370485306, 0.019254229962825775, 0.011977572925388813, 0.027514623478055, -0.007092675194144249, 0.0005725955707021058, -0.014906258322298527, 0.016926299780607224, -0.004096405114978552, 0.008147752843797207, 0.02578745037317276, -0.010355531238019466, 0.01382489688694477, 0.0086508858948946, -0.02811538055539131, -0.04785021394491196, -0.024150390177965164, 0.04451601952314377, -0.029046552255749702, -0.021822461858391762, -0.01131674088537693, 0.03943962976336479, -0.010423116385936737, -0.04950229451060295, -0.023369407281279564, -0.005237841513007879, -0.035775020718574524, -0.022573405876755714, -0.013577084988355637, -0.01525920256972313, 0.011782326735556126, -0.0137648219242692, -0.016145316883921623, -0.005797295365482569], "index": 42}, {"title": "Steve Booth", "text": "Steve Booth is a British political activist and journalist, and was one of the defendants in the GANDALF trial.After involvement in the 1990 anti-Poll Tax movement, and having written a number of articles for 'Freedom' magazine, he first became involved with the UK Green Anarchist magazine in 1990, and published a novel, City-Death, explaining his idea of green anarchism.", "vector": [-0.0031693733762949705, 0.006851681508123875, -0.035086631774902344, -0.04351947084069252, -0.014541000127792358, 0.03900187835097313, -0.026653794571757317, -0.001064104726538062, -0.03945364058017731, 0.04973116144537926, -0.024677347391843796, 0.005999927408993244, 0.011971619911491871, 0.02872435748577118, 0.020385634154081345, 0.02861141785979271, 0.018315071240067482, -0.029910225421190262, -0.015896277502179146, -0.03224431350827217, 0.03058786503970623, -0.031754907220602036, -0.031510207802057266, -0.01833389513194561, -0.01518099196255207, 0.00797637365758419, 0.04231477901339531, 3.306945291114971e-05, -0.0006446980405598879, 0.035274866968393326, -0.04841352999210358, 0.0015917454147711396, -0.014992759563028812, -0.003527016146108508, -0.009162241593003273, -0.006842270027846098, -0.020950334146618843, 0.002163503086194396, -0.0331290103495121, -0.022380905225872993, -0.028649063780903816, 0.01647038757801056, -0.025354987010359764, 0.017053911462426186, -0.027463195845484734, -0.0035317218862473965, -0.058051060885190964, -0.031867846846580505, -0.0126398466527462, 0.03907717391848564, 0.04517592117190361, -0.0006464627222158015, 0.042917124927043915, 0.01810801587998867, -0.0022917368914932013, -0.004757589194923639, 0.013063371181488037, 0.030399631708860397, -0.023604419082403183, -0.038474828004837036, 0.014710409566760063, -0.03378782421350479, 0.0034728990867733955, -0.00400465726852417, -0.02509145997464657, 0.04630532115697861, 0.03201843425631523, 0.018032722175121307, -0.019237414002418518, -0.0071952068246901035, 0.008823422715067863, 0.010258698835968971, 0.02175973542034626, 0.05398522689938545, 0.018588010221719742, -0.035839565098285675, 0.007651671767234802, -0.05466286465525627, -0.043143004179000854, 0.028140835464000702, 0.021044449880719185, -0.042804185301065445, -0.030983153730630875, -0.022606784477829933, 0.008879892528057098, -0.03713837265968323, 0.0020729161333292723, -0.09803175181150436, 0.0029787872917950153, -0.008682247251272202, 0.07845551520586014, 0.0055387564934790134, -0.011576330289244652, 0.0028729063924402, -0.03002316504716873, -0.003559956792742014, -0.020686807110905647, -0.023830298334360123, -0.002411735476925969, -0.02351030334830284, 0.03907717391848564, -0.017976252362132072, -0.029533758759498596, -0.0005841105594299734, 0.0313972644507885, -0.00037499546306207776, 0.011143393814563751, 0.0038470120634883642, 0.0381171852350235, 0.11745739728212357, 0.03167961537837982, -0.024376174435019493, -0.017025675624608994, 0.034823108464479446, -0.0068140351213514805, 0.047660596668720245, -0.002590556861832738, 0.024112649261951447, -0.0011682211188599467, -0.0011758680921047926, -0.018070368096232414, -0.05059703439474106, -0.02386794611811638, -0.034634873270988464, 0.002550557255744934, -0.01153868343681097, -0.0568087212741375, -0.010493990033864975, 0.03469134494662285, -0.02505381405353546, -0.08131665736436844, 0.0007576378411613405, 0.011077512986958027, -0.037834834307432175, -0.020837394520640373, 0.0019705642480403185, 0.003032904351130128, 0.03721366450190544, 0.004399946425110102, 0.04980645328760147, 0.011971619911491871, -0.01060693059116602, -0.04186302050948143, 0.021797383204102516, -0.04374535009264946, -0.036385439336299896, -0.02627732791006565, -0.013722186908125877, -0.058803994208574295, -0.005294053349643946, -0.0034705461002886295, -0.0019270353950560093, -0.00888459850102663, 0.012178676202893257, -0.02031034231185913, -0.0033529005013406277, -0.06411216408014297, -0.04276654124259949, -0.023246776312589645, 0.021383270621299744, -0.062003955245018005, -0.01308219414204359, 0.008719894103705883, 0.0399806909263134, 0.02927023358643055, -0.01055045984685421, 0.018578598275780678, 0.04619238153100014, -0.039905399084091187, 0.04295477271080017, 0.013430424965918064, -0.022230317816138268, 0.08048843592405319, 0.012122205458581448, -0.021383270621299744, -0.01597157120704651, -0.006056397221982479, -0.004738766234368086, -0.004042304120957851, -0.0058634583838284016, -0.046117085963487625, 0.018277425318956375, 0.006988150533288717, 0.024922050535678864, 0.0012246910482645035, 0.0585404671728611, 0.002063504420220852, 0.0232844240963459, -0.0011270451359450817, -0.028423184528946877, 0.006009338889271021, -0.031623147428035736, 0.005152878817170858, -0.03444664180278778, 0.016912735998630524, 0.07958491891622543, -0.0359901525080204, -0.0205550454556942, -0.036856021732091904, -0.04649355262517929, 0.04961822181940079, 0.0419759601354599, 0.030983153730630875, -0.03083256632089615, 0.02597615495324135, 0.038587767630815506, -0.00692697474732995, -0.005896399263292551, -0.022587960585951805, -0.005011703819036484, 0.06392393261194229, 0.0009229299612343311, 0.0016046863747760653, 0.05887928605079651, -0.024809110909700394, -0.01987740583717823, -0.008569307625293732, 0.027990248054265976, 0.009646941907703876, 0.011849268339574337, -0.037288960069417953, -0.0249785203486681, 0.000455288594821468, -0.015378637239336967, -0.001759978593327105, -0.010051642544567585, -0.02452676184475422, -0.01567981019616127, 0.01341160200536251, 0.0208562184125185, -0.039943043142557144, 0.042013607919216156, -0.043030064553022385, 0.002331736497581005, -0.02949611283838749, 0.014089240692555904, 0.01042810920625925, -0.01462570484727621, -0.00582581153139472, -0.006348158232867718, -0.026992613449692726, 0.03369370847940445, -0.031867846846580505, -0.01619745045900345, -0.028216129168868065, 0.03734542801976204, 0.00833872240036726, -0.00858813151717186, -0.041486553847789764, -0.018748007714748383, -0.0009146947995759547, 0.025656159967184067, -0.003687014104798436, 0.0010576342465355992, -0.011293980292975903, 0.009496355429291725, -0.0061363959684967995, -0.0014199827564880252, 0.03369370847940445, -0.010202229022979736, 0.011773974634706974, 0.007581084500998259, -0.012922195717692375, 0.11790915578603745, -0.042352426797151566, 0.03823012486100197, -0.01953858695924282, -0.00039411286707036197, -0.03587721288204193, 0.02607027254998684, 0.031416088342666626, -0.028969060629606247, -0.03216902166604996, 0.03796659782528877, -0.023943239822983742, 0.006503450684249401, -0.02407500147819519, 0.05722283571958542, 0.0061458079144358635, 0.014550412073731422, 0.02870553359389305, -0.07476615160703659, 0.002022328320890665, 0.004823470953851938, -0.04156184941530228, 0.018202131614089012, -0.02119503729045391, -0.0319996103644371, 0.0277078989893198, 0.011021043173968792, -0.05278053507208824, 0.05876634642481804, 0.021910322830080986, 0.059933390468358994, 0.003957598935812712, 0.013609246350824833, -0.014484530314803123, 0.002262325491756201, -0.001699979417026043, -0.007166971918195486, -0.0025576159823685884, 0.0465688481926918, -0.04528886079788208, 0.008912833407521248, 0.002809377619996667, 0.010381050407886505, -0.00896459724754095, 0.005938751623034477, 0.004536415450274944, -0.08711423724889755, 0.008606954477727413, -0.004734060261398554, -0.004207007586956024, -0.024564407765865326, 0.014221004210412502, -0.001638803631067276, 0.031096093356609344, -0.023717358708381653, -8.477838127873838e-05, -0.05933104455471039, -0.018136249855160713, 0.017533905804157257, -0.06012162193655968, 0.011501036584377289, 0.05929339677095413, -0.01308219414204359, 0.05500168725848198, 0.027463195845484734, -0.05522756651043892, -0.008282252587378025, 0.02507263608276844, -0.054512280970811844, 0.03813600912690163, 0.002785848453640938, -0.01160456519573927, -0.036498378962278366, -0.015557458624243736, 0.04491239786148071, 0.0001414688740624115, 0.013571600429713726, 0.023227954283356667, -0.019933875650167465, -0.006235218606889248, -0.02550557255744934, -0.021609149873256683, -0.013929243199527264, 0.0647898018360138, 0.008470485918223858, -0.009002244099974632, -0.02913847006857395, 0.0010441049234941602, 0.005783459171652794, 0.03167961537837982, -0.031303148716688156, 0.016959793865680695, 0.040055982768535614, 0.011228099465370178, -0.0788319855928421, -0.003117609303444624, -0.006950503680855036, 0.04031950980424881, -0.05918045714497566, -0.01237632054835558, 0.007957550697028637, 0.01606568694114685, -0.015783337876200676, 0.01396688912063837, -0.00013705715537071228, 0.021496210247278214, 0.04272889345884323, -0.05631931498646736, 0.003604662138968706, -0.008630483411252499, 0.011341039091348648, -0.01359042339026928, -0.0102116409689188, -0.02010328508913517, 0.004522297997027636, -0.014221004210412502, 0.011698681861162186, 0.001211749971844256, -0.019707996398210526, 0.010493990033864975, -0.0017305671935901046, -0.02439499832689762, -0.02143974043428898, -0.0021799735259264708, 0.04261595383286476, 0.020159754902124405, -0.013684540055692196, -0.056055791676044464, 0.020404458045959473, -0.027331432327628136, 0.00853166077286005, -0.009543413296341896, -0.018089191988110542, 0.0302678681910038, 0.04329359158873558, -0.018936241045594215, -0.0008564601885154843, 0.0008076372323557734, -0.016573917120695114, -0.028329068794846535, 0.02529851719737053, 0.013421013951301575, -0.05198995769023895, -0.007049326319247484, -0.050634678453207016, 0.010795162990689278, -0.028027895838022232, 0.004369358532130718, -0.006508156191557646, -0.017580963671207428, 0.03548192232847214, -0.006955209653824568, 0.027105553075671196, 0.008541072718799114, 0.006446980405598879, 0.03570780158042908, -0.05398522689938545, -0.009966937825083733, -0.011002219282090664, -0.0036728966515511274, -0.012056324630975723, -0.016809208318591118, 0.009623412974178791, 0.023547949269413948, -0.014879819937050343, -0.0016258626710623503, 0.0008799892966635525, 0.010691635310649872, -0.01870094984769821, -0.031736087054014206, 0.055491089820861816, -0.03574544936418533, -0.0282725989818573, 0.012461025267839432, 0.015397460199892521, 0.01557628158479929, 0.056281670928001404, 0.003724660724401474, 0.0076469662599265575, 0.05835223197937012, -0.05402287468314171, -0.04973116144537926, 0.010061054490506649, -0.04329359158873558, -0.003482310799881816, 0.0358583889901638, 0.03047492355108261, -0.06061102822422981, -0.07092619687318802, -0.07062502205371857, 0.02475264109671116, 0.04973116144537926, -0.04163714125752449, -0.025147929787635803, 0.005223466083407402, -0.001778801903128624, 0.029514936730265617, 0.015369225293397903, 0.04935469478368759, 0.04894058406352997, -0.03809836134314537, -0.028122011572122574, -0.07502967864274979, -0.0048070005141198635, -0.005279935896396637, 0.013402190059423447, 0.0056328726932406425, -0.026126742362976074, 0.0024376173969358206, -0.03337371349334717, 0.07740141451358795, 0.013910419307649136, -0.005101114511489868, 0.015444518066942692, -0.03877599909901619, 0.028460830450057983, 0.027237316593527794, -0.03237607702612877, -0.036498378962278366, -0.03646073490381241, 0.020592691376805305, 0.037063080817461014, -0.03975481167435646, -0.008046961389482021, -0.054625220596790314, 0.0031270207837224007, 0.007868140004575253, 0.0090634198859334, 0.03397605940699577, -0.05424875393509865, 0.0224185511469841, 0.02409382537007332, -0.0006799917318858206, -0.0351242795586586, -0.01042810920625925, -0.018550362437963486, 0.003607015125453472, -0.036592498421669006, -0.011293980292975903, 0.04585356265306473, 0.008409310132265091, 0.007430498022586107, -0.0032611368224024773, 0.04630532115697861, 0.022155025973916054, 0.004247007425874472, -0.010776340030133724, 0.03324194997549057, 0.03224431350827217, -0.0031458442099392414, 0.012809256091713905, -0.0554157979786396, -0.002611733041703701, -0.0516887828707695, 0.012470437213778496, 0.04799941927194595, -0.009759881533682346, 0.03610309213399887, -0.001979975961148739, -0.012470437213778496, 0.02044210582971573, 0.04547709599137306, 0.010239875875413418, 0.012564553879201412, -0.010023407638072968, -0.07386263459920883, -0.035293690860271454, 0.0030681979842483997, 0.013533953577280045, 0.015642162412405014, 0.03397605940699577, -0.010032819584012032, 0.006192866247147322, -0.01175515167415142, 0.007844611071050167, 0.006404628045856953, -0.03004198893904686, 0.0012317497748881578, 0.009261064231395721, 0.0061411019414663315, 0.034070175141096115, 0.008094019256532192, -0.005096408538520336, 0.006705801002681255, 0.005656402092427015, -0.011435155756771564, -0.03303489461541176, -0.018390364944934845, -0.002494087442755699, -0.008051667362451553, -0.008621071465313435, 0.023773828521370888, -0.02386794611811638, -0.03821130096912384, 0.01131280418485403, -0.008461073972284794, 0.016432741656899452, 0.03467252105474472, -0.0379854217171669, -0.04348182678222656, 0.04664414003491402, -0.011698681861162186, -0.018663302063941956, 0.03137844428420067, 0.03888893872499466, -0.041486553847789764, -0.005072879604995251, 0.05710989609360695, -0.0038823059294372797, -0.002271737204864621, -0.011124570854008198, -0.033957235515117645, 0.007054032292217016, 0.031510207802057266, -0.0039740693755447865, -0.01865389198064804, -0.03476663678884506, 0.052517011761665344, -0.02904435433447361, -0.015331578440964222, -0.00014830702275503427, -0.03365606069564819, 0.029006706550717354, -0.017251554876565933, -0.011661035008728504, -0.023378539830446243, 0.03565133363008499, -0.009374003857374191, 0.019256237894296646, 0.0015129228122532368, 0.0007864610524848104, 0.02861141785979271, -0.016028041020035744, -0.00966576486825943, 0.013468071818351746, -0.006856387481093407, -0.012611611746251583, 0.058051060885190964, 0.018729183822870255, 0.03866305947303772, -0.04664414003491402, -0.029420819133520126, -0.05214054509997368, 0.012291615828871727, -0.007232853211462498, 0.017420964315533638, -0.01447511836886406, 0.02130797691643238, 0.047434717416763306, -0.039717163890600204, -0.027745544910430908, 0.015651574358344078, -0.01860683225095272, 0.0023752653505653143, 0.024922050535678864, 0.00409642094746232, -0.03271489590406418, -0.002004681620746851, -0.021289153024554253, 0.03137844428420067, 0.02473381720483303, 0.02351030334830284, 0.031058447435498238, -0.009901056066155434, -0.00042999477591365576, 0.023002073168754578, 0.03610309213399887, -0.00554816797375679, -0.011905738152563572, -0.005830517504364252, 0.0034681931138038635, -0.004247007425874472, -0.0011182216694578528, 0.034936048090457916, 0.016875090077519417, 0.005199936684221029, -0.03751483932137489, 0.0023787945974618196, 0.021383270621299744, -0.004395240917801857, 0.003861129516735673, -0.01833389513194561, 0.02053622156381607, 0.016639798879623413, -0.004258771892637014, -0.0051858192309737206, -0.012291615828871727, -0.025449102744460106, -0.002245855052024126, -0.00882812775671482, 0.006823446601629257, 0.015171580947935581, -0.009185770526528358, -0.0027223199140280485, 0.0343901701271534, 0.028780827298760414, 0.03919011354446411, -0.02164679579436779, -0.02586321532726288, -0.00889400951564312, 0.003903482109308243, -0.0016929206904023886, 0.009331651031970978, -0.0181268397718668, 0.01087045669555664, 0.022042086347937584, 0.001072928193025291, 0.04634296894073486, 0.042352426797151566, -0.01704449951648712, 0.01418335735797882, 0.01407982874661684, -0.005891693290323019, -0.04250301420688629, -0.005510521586984396, -0.006785800214856863, -0.04807471111416817, 0.022173848003149033, -0.00789637491106987, 0.010315168648958206, -0.01485158409923315, 0.03657367452979088, -0.0022093849256634712, -0.051199380308389664, 0.0035528980661183596, 0.006997562013566494, 0.015275108627974987, -0.04517592117190361, -0.0010376344434916973, 0.01976446621119976, 0.00866813026368618, 0.009068124927580357, -0.023115012794733047, -0.01883271336555481, -0.02981610968708992, -0.02586321532726288, -0.00045911208144389093, -0.03322312608361244, 0.022907957434654236, -0.024658523499965668, -0.0046446495689451694, -0.03060668706893921, 0.00963282398879528, 0.0039175995625555515, -0.024658523499965668, 0.012319850735366344, -0.03397605940699577, -0.00930341612547636, 0.0003829365305136889, -0.025769099593162537, -0.0051858192309737206, 0.04630532115697861, -0.006437568925321102, 0.028762003406882286, -0.001977622974663973, -0.02251266874372959, 0.02893141284584999, -0.0034917222801595926, -0.0038964233826845884, -0.016300978139042854, -0.042126547545194626, -0.020460927858948708, -0.0036281913053244352, -0.020818570628762245, -0.01039046235382557, 0.0026799675542861223, 0.003079962683841586, -0.02759495936334133, -0.042578306049108505, 0.007595201954245567, 0.00626815902069211, 0.00591051671653986, -0.019952699542045593, -0.03211254999041557, 0.0055387564934790134, 0.03036198392510414, 0.014465706422924995, 0.06750036031007767, 0.013129252940416336, 0.017091557383537292, 0.012206911109387875, 0.005948163103312254, -0.0015870395582169294, 0.025787921622395515, 0.014164534397423267, -0.006211689207702875, 0.01815507374703884, 0.007294028997421265, 0.02418794110417366, 0.026145564392209053, 0.013562188483774662, -0.0016717443941161036, -0.003785836510360241, 0.004075244534760714, -0.023830298334360123, -0.011745739728212357, 0.0015635103918612003, -0.00728932349011302, 0.007359910756349564, 0.00047970007290132344, -0.00015352755144704133, -0.01826801337301731, 0.035180751234292984, 8.205782796721905e-05, -0.0278396625071764, 0.008823422715067863, 0.00886106863617897, 0.013675128109753132, -0.03597132861614227, -0.02221149578690529, -0.0038587767630815506, -0.006009338889271021, -0.016169216483831406, -0.0009811645140871406, -0.011792798526585102, 0.007279911544173956, -0.031321972608566284, -0.03691249340772629, 0.05929339677095413, -0.03367488458752632, 0.004898764193058014, 0.0005711695412173867, -0.008715188130736351, 0.024018531665205956, -0.001499981852248311, 0.005096408538520336, -0.011613977141678333, 0.00040999503107741475, -0.0018576245056465268, 0.015472753904759884, 0.01326101552695036, 0.017750373110175133, -0.01649862341582775, -0.008969303220510483, 0.04227713495492935, 0.01153868343681097, -0.026107918471097946, 0.007712847553193569, -0.008065784350037575, -0.031961966305971146, -0.014098652638494968, 0.07446497678756714, -0.0528181828558445, -0.02851730026304722, -0.05044644698500633, 0.031058447435498238, -0.018795065581798553, 0.009750469587743282, 0.05865340679883957, 0.006992856506258249, 0.02917611598968506, 0.002303501358255744, 0.027971426025032997, -0.02859259396791458, -0.03873835504055023, -0.0009611648274585605, 0.010851632803678513, 0.001697626430541277, 0.00626815902069211, 0.024225588887929916, 0.004287006799131632, -0.0006305805873125792, 0.06418745964765549, 0.020893864333629608, -0.04227713495492935, -0.04408417269587517, -0.005228172056376934, 0.01892682909965515, -0.0252796933054924, -0.05692166090011597, -0.013402190059423447, -0.009430473670363426, 0.026427915319800377, -0.018249189481139183, 0.01308219414204359, 0.025580866262316704, 0.0468323715031147, -0.027670253068208694, -0.019406823441386223, 0.006470509804785252, -0.033543121069669724, 0.018465658649802208, -0.034973692148923874, -0.013957478106021881, -0.010117524303495884, 0.021402092650532722, -0.03593368083238602, -0.0001368365774396807, 0.03922775760293007, -0.004310535732656717, 0.02927023358643055, -0.03260195627808571, -0.011265745386481285, 0.006512862164527178, 0.03533133491873741, -0.02573145180940628, 0.02239972911775112, 0.011021043173968792, -0.03427723050117493, 0.028122011572122574, -0.024112649261951447, 0.01579274982213974, 0.011021043173968792, 0.0009982232004404068, -0.03604662045836449, 0.03542545437812805, -0.014531588181853294, -0.006912857294082642, -0.02913847006857395, 0.02928905561566353, -0.005830517504364252, 0.013891596347093582, 0.003642308758571744, -0.0519523099064827, -0.015397460199892521, 0.03768424689769745, -0.0005182290333323181, -0.011341039091348648, 0.001334101427346468, -0.0488276444375515, -0.0016458623576909304, 0.005618755239993334, -0.04916646331548691, -0.023340893909335136, 0.010635165497660637, -0.004009363241493702, 0.004759942181408405, -0.02915729396045208, 0.022832663729786873, -0.05037115514278412, -0.028630241751670837, 0.010286933742463589, 0.008941068314015865, 0.007971667684614658, -0.076234370470047, -0.025260869413614273, -0.027256140485405922, 0.01551039982587099, 0.024131471291184425, -0.009637529961764812, 0.004795236047357321, 0.057147540152072906, 0.029759639874100685, 0.004025833681225777, 0.0208562184125185, 0.03678072988986969, 0.02682320401072502, -0.022060908377170563, 0.014484530314803123, -0.022155025973916054, 0.0011535154189914465, 0.019952699542045593, 0.007966961711645126, 0.0038093654438853264, -0.026013802736997604, 0.04265360161662102, 0.05022056773304939, 0.019133886322379112, 0.02704908326268196, -0.02759495936334133, 0.03757130727171898, -0.036479558795690536, -0.05846517160534859, -0.010173994116485119, 0.023547949269413948, 0.0028258480597287416, 0.025430278852581978, 0.017524493858218193, -0.009703411720693111, 0.031660791486501694, -0.006550508551299572, 0.008286958560347557, 0.041900668293237686, -0.0026164387818425894, 0.0011770445853471756, -0.03574544936418533, -0.013750421814620495, 0.027086731046438217, 0.02859259396791458, 0.022889133542776108, 0.026352621614933014, -0.013458659872412682, 0.002004681620746851, -0.03002316504716873, -0.031434912234544754, -0.014286885038018227, -0.007581084500998259, 0.029025530442595482, -0.0024046767503023148, -0.014964524656534195, -0.0045881797559559345, 0.010164582170546055, 0.028442008420825005, -0.020573867484927177, -0.014202180318534374, 0.011736327782273293, -0.0010682223364710808, -0.0017140968702733517, 0.015228050760924816, -0.006056397221982479, -0.008724600076675415, 0.032846659421920776, 0.0015129228122532368, 0.012959842570126057, -0.031660791486501694, -0.038248948752880096, -0.025110283866524696, 3.0900358979124576e-05, 0.007218735758215189, -0.013646893203258514, -0.01491746585816145, -0.04525121673941612, -0.0014611587394028902, -0.01160456519573927, 0.039039526134729385, 0.010079877451062202, -0.020235048606991768, 0.014108064584434032, -0.0278396625071764, -0.0574110671877861, -0.012103382498025894, 0.028084365651011467, 0.012348085641860962, 0.003661131951957941, -0.003383488394320011, 0.02439499832689762, 0.026653794571757317, 0.005755224265158176, -0.0008858715882524848, -0.011877503246068954, -0.027689075097441673, 0.01231043878942728, 0.029571406543254852, -0.0009823410073295236, -0.022155025973916054, 0.004522297997027636, -0.030870214104652405, 0.005614049732685089, -0.038154833018779755, -0.010522224940359592, 0.009232829324901104, 0.008771657943725586, 0.01352454163134098, -0.05089820548892021, -0.002269384218379855, 0.023943239822983742, 0.03975481167435646, -0.0059152222238481045, 0.023020897060632706, 0.005491698160767555, 0.020743276923894882, -0.002447029110044241, 0.015124522149562836, 0.00728932349011302, -0.007430498022586107, -0.01164221204817295, 0.055716972798109055, 0.004661120008677244, -0.001054104883223772, 0.015275108627974987, 0.005929339677095413, -0.005406993441283703, 0.017957428470253944, 0.0009623412624932826, 0.019387999549508095, 0.013204545713961124, -0.005157584324479103, 0.015388048253953457, 0.029778461903333664, 0.004708178341388702, -0.0257126297801733, -0.040357157588005066, -0.04747236520051956, -0.006842270027846098, 0.02386794611811638, -0.01436217874288559, -0.03137844428420067, 0.027011437341570854, 0.007458732929080725, -0.050822913646698, 0.025994978845119476, -0.02373618260025978, -0.029458466917276382, -0.019689172506332397, 0.006277570966631174, -0.0033929001074284315, -0.03390076383948326, 0.02166561968624592, 0.009082242846488953, 0.009609295055270195, -0.006625801790505648, -0.010446932166814804, 0.027463195845484734, -0.012912784703075886, -0.013825714588165283, -0.032752543687820435, -0.01601862907409668, 0.011924561113119125, -0.019228002056479454, -0.007326969876885414, -0.01599980518221855, 0.007995197549462318, -0.036178383976221085, 0.048639409244060516, -0.0004517592315096408, 0.005228172056376934, -0.03250784054398537, 0.001392924226820469, -0.009195182472467422, 0.014823349192738533, -0.024432644248008728, 0.012319850735366344, 0.012103382498025894, -0.00433406513184309, -0.013279838487505913, -0.03791012987494469, 0.008296369574964046, -0.030211398378014565, -0.013006901368498802, -0.03702543303370476, 0.01944446936249733, -0.018748007714748383, 0.018428010866045952, 0.005646990146487951, -0.023058542981743813, -0.022173848003149033, -0.016235096380114555, -0.019199766218662262, 0.03333606570959091, 0.028554948046803474, 0.015378637239336967, 0.007101090159267187, 0.027783192694187164, -0.0023764418438076973, 0.0437077060341835, -0.029514936730265617, 0.035086631774902344, 0.004284653812646866, -0.02253149077296257, -0.04325594753026962, -0.029082000255584717, 0.01546334195882082, 0.006846975535154343, 0.013185722753405571, 0.002750554820522666, -0.004992880392819643, -0.020272694528102875, -0.029966695234179497, 0.03501133993268013, -0.01917153224349022, 0.014042182825505733, -0.009604589082300663, -0.007176383398473263, -0.01867271400988102, -0.035161927342414856, 0.006169336847960949, -0.05613108351826668, -0.0041387733072042465, -0.040018338710069656, -0.02162797376513481, 0.012828079983592033, -0.008865774609148502, -0.03235725313425064, -0.013166898861527443, 0.001983505440875888, 0.009872821159660816, 0.029966695234179497, 0.004508180543780327, -0.019519763067364693, 0.002795260166749358, -0.0029246704652905464, -0.01579274982213974, 0.010126936249434948, 0.025336163118481636, -0.018465658649802208, -0.019482117146253586, -0.007449321448802948, 0.009355180896818638, -0.021816205233335495, 0.01440923660993576, 0.02861141785979271, 0.03941599279642105, -0.01076692808419466, -0.01447511836886406, 0.014051593840122223, -0.02672908827662468, 0.00186350685544312, -0.0151339340955019, -0.008301075547933578, 0.030776096507906914, 0.02407500147819519, 0.019933875650167465, -0.013421013951301575, 0.02938317321240902, -0.010136347264051437, 0.028103187680244446, -0.0151339340955019, 0.010371638461947441, 0.03636661916971207, -0.020611515268683434, -0.029759639874100685, -0.00773167097941041, -0.012225734069943428, 0.01286572590470314, -0.022380905225872993, -0.005086997058242559, 0.0031223150435835123, 0.005242289509624243, -0.010013995692133904, -0.03956658020615578, 0.003967010881751776, 0.01696920581161976, 0.005938751623034477, 0.012479848228394985, 0.047886479645967484, 0.0014423354296013713, -0.03124667890369892, 0.02917611598968506, -0.011736327782273293, 0.018823301419615746, -0.014013947919011116, -0.0012505730846896768, 0.01039046235382557, -0.011661035008728504, -0.02748201973736286, -0.006541097071021795, 0.032526664435863495, 0.007891668938100338, -0.01645156554877758, 0.006846975535154343, -0.006009338889271021, 0.0024658525362610817, -0.014126887544989586, -0.018757419660687447, 0.005872869864106178, -0.013458659872412682, 0.0037528956308960915, -0.018183309584856033, -0.002127032959833741, -0.0003605838574003428, 0.011058689095079899, 0.028234951198101044, 0.0063575697131454945, -0.03821130096912384, -0.018588010221719742, -0.02836671471595764, 0.022117378190159798, -0.002529381075873971, -0.0278396625071764, 0.00411759689450264, -0.014371590688824654, 0.005298759322613478, -0.016573917120695114, 0.017891546711325645, -0.012733963318169117, 0.03260195627808571, -0.017251554876565933, 0.012564553879201412, -0.019482117146253586, -0.0013893948635086417, 0.01473864447325468, -0.034728989005088806, -0.006771682761609554, -0.00043440648005343974, -0.04559003561735153, 0.007759905885905027, -0.022475020959973335, -0.03382547199726105, -0.03403252735733986, 0.04811235889792442, -0.012169264256954193, 0.029100824147462845, -0.030211398378014565, 0.024903226643800735, 0.011623388156294823, 0.013402190059423447, 0.01054104883223772, -0.027651429176330566, 0.01490805484354496, 0.0052517009899020195, -0.032093729823827744, -0.00888459850102663, -0.0017952723428606987, 0.030757274478673935, 0.01226338092237711, -0.0030070224311202765, -0.009218711405992508, 0.018917417153716087, 0.020159754902124405, -0.005204642657190561, 0.0017164497403427958, -0.0003152902936562896, 0.020950334146618843, -0.014192769303917885, -0.004595238249748945, -0.01933152973651886, 0.004091714974492788, -0.0088140107691288, -0.022060908377170563, -0.005957574583590031, 0.006644625216722488, 0.05620637536048889, 0.009985760785639286, -0.016592739149928093, -0.006286982446908951, -0.007910491898655891, -0.02142091654241085, -0.02836671471595764, 0.04016892611980438, 0.006992856506258249, 0.018870359286665916, 0.014700998552143574, 0.00620698370039463, -0.022682078182697296, -0.01076692808419466, 0.01599980518221855, -0.016329213976860046, 0.042578306049108505, 0.03359959274530411, -0.015011582523584366, -0.025204399600625038, 0.03713837265968323, 0.01440923660993576, 0.020291518419981003, -0.030870214104652405, -0.009162241593003273, 0.02375500649213791, 0.004183478653430939, 0.016489211469888687, 0.012451613321900368, 0.022663254290819168, -0.0076940241269767284, -0.010268110781908035, -0.026013802736997604, -0.015218638814985752, 0.00679521169513464, 0.001737625920213759, 0.0009029302163980901, -0.0018552716355770826, -0.016460977494716644, -0.020611515268683434, -0.006239924114197493, 0.041486553847789764, -0.006602272856980562, -0.013063371181488037, -0.009844586253166199, 0.025411456823349, -0.00021690913126803935, -0.02949611283838749, 0.006828152574598789, -0.017100969329476357, -0.0005129349301569164, -0.009675176814198494, 0.012978666462004185, 0.00178115488961339, 0.019613878801465034, -0.022343257442116737, -0.003357606241479516, -0.008992832154035568, 0.004482298623770475, 0.014343355782330036, 0.024037355557084084, 0.015783337876200676, 0.03548192232847214, -0.04016892611980438, 0.0005161702283658087, -0.01892682909965515, 0.027124376967549324, -0.005562285427004099, 0.002487028716132045, -0.016319802030920982, -0.01608451083302498, -0.02936434932053089, 0.014371590688824654, 0.007444615475833416, -0.0024187942035496235, -0.01485158409923315, 0.0012176323216408491, -0.019115062430500984, -0.00027073200908489525, 0.009844586253166199, 0.0041928901337087154, 0.025223223492503166, 0.004769354127347469, -0.02230561152100563, 0.003999951295554638, -0.02573145180940628, 0.007435203995555639, -0.02430088073015213, 0.004475239664316177, -0.00618816027417779, -0.007223441731184721, -0.006955209653824568, -0.0150680523365736, 0.006602272856980562, 0.05146290361881256, 0.023227954283356667, 0.019745642319321632, -0.04427240416407585, -0.001821154379285872, -0.02262560836970806, -0.00094175327103585, 0.012997489422559738, 0.0023976180236786604, 0.01120927557349205, -0.030399631708860397, -0.0025576159823685884, -0.0224185511469841, 0.0027787897270172834, -0.0171950850635767, -0.001622333307750523, 0.027783192694187164, 0.014381001703441143, 0.0063622756861150265, 0.008602248504757881, 0.0229832511395216, -0.02430088073015213, -0.022682078182697296, -0.0208562184125185, 0.04363241046667099, 0.02913847006857395, 0.013778656721115112, -0.02561851218342781, 0.01917153224349022, -0.00994811486452818, -0.04122303053736687, -0.004661120008677244, -0.0009458708809688687, -0.019162120297551155, 0.011256334371864796, -0.03294077515602112, -0.00955282524228096, 0.017373906448483467, 0.018164485692977905, -0.026578500866889954, 0.0020987980533391237, -0.02618321217596531, -0.0024187942035496235, -0.0038752472028136253, 0.01878565363585949, -0.005623461212962866, -0.008061078377068043, -0.0010835162829607725, 0.02684202790260315, -0.022907957434654236, 0.0005523462314158678, 0.006164630874991417, -0.03580191731452942, -0.0071999127976596355, -0.02748201973736286, -0.01060693059116602, -0.006879916414618492, 0.0027576135471463203, 0.006437568925321102, 0.02913847006857395, -0.043670058250427246, 0.0034517229069024324, -0.03907717391848564, 0.005392875522375107, -0.011962207965552807, -0.022663254290819168, 0.010296345688402653, -0.015284520573914051, -0.035613685846328735, -0.007166971918195486, 0.031510207802057266, 0.008752834983170033, -0.015849219635128975, 0.010183406062424183, -0.002245855052024126, 0.0065316855907440186, 0.02759495936334133, -0.010861044749617577, -0.017091557383537292, -0.02253149077296257, 0.006738741882145405, -0.024244410917162895, 0.04705825075507164, -0.005110526457428932, -0.002109386259689927, 0.0114257438108325, -0.014315120875835419, 0.015764513984322548, -0.017543315887451172, -0.0023129130713641644, 0.04649355262517929, -0.04924175515770912, 0.017100969329476357, 0.004124655853956938, -0.022776193916797638, -0.012912784703075886, 0.006399922538548708, 0.03632897138595581, -0.0003720543172676116, 0.020027991384267807, 0.01989622972905636, -0.020686807110905647, 0.00038352474803104997, -0.0036752496380358934, -0.01182103343307972, -0.0017070381436496973, 0.0025811451487243176, -0.006404628045856953, 0.04250301420688629, -0.004369358532130718, 0.02462087757885456, -0.005505815614014864, 0.01329866237938404, -0.04107244312763214, -0.01198103092610836, 0.020385634154081345, -0.0004488180857151747, -0.008404604159295559, -0.003929364029318094, -0.021458562463521957, 0.0034681931138038635, -0.011529271490871906, 0.02230561152100563, 0.0005902869743295014, -0.024357352405786514, 0.00035705449408851564, -0.01164221204817295, -0.00101410539355129, 0.01638568378984928, 0.02586321532726288, 0.027877308428287506, -0.0039811283349990845, 0.010569283738732338, 0.006089338101446629, 0.026107918471097946, -0.006842270027846098, 0.022926781326532364, 0.004917587619274855, 0.0006394039955921471, -0.012545729987323284, -0.0102116409689188, -0.013223368674516678, 0.004324653185904026, -0.030757274478673935, -0.007915197871625423, 0.034521933645009995, 0.032639604061841965, -0.006258747540414333, -0.009985760785639286, 0.012018677778542042, 0.004515239503234625, -0.02751966565847397, 0.06121337413787842, -0.015849219635128975, -0.014653939753770828, -0.04419711232185364, 0.01640450768172741, -0.006108161062002182, 0.02087504044175148, 0.018842123448848724, 0.01153868343681097, -0.025336163118481636, 0.005402287468314171, -0.014286885038018227, -0.03608426824212074, -0.040470097213983536, -0.02076210081577301, 0.02586321532726288, -0.017119793221354485, -0.022343257442116737, 0.029420819133520126, -0.021063273772597313, -0.013901007361710072, -0.00789637491106987, -0.015369225293397903, -0.020159754902124405, 0.013665716163814068, -0.04464887082576752], "index": 43}, {"title": "Menora Mivtachim Arena", "text": "Menora Mivtachim Arena (Hebrew: \u05d4\u05d9\u05db\u05dc \u05de\u05e0\u05d5\u05e8\u05d4 \u05de\u05d1\u05d8\u05d7\u05d9\u05dd\u200e) is a large multi-purpose sports arena in southern Tel Aviv, Israel. It is one of the major sporting facilities in the Greater Tel Aviv Area.The arena is home to the Maccabi Tel Aviv basketball club, a member of the Maccabi Tel Aviv sports club. It hosted the Israeli Super League final four, the State Cup final four and most of the Israeli national basketball team home games.", "vector": [0.05847686529159546, 0.007657866925001144, -0.021507851779460907, 0.013256796635687351, -0.0230539683252573, 0.04788367450237274, -0.020283205434679985, 0.0104936882853508, -0.00013119503273628652, 0.015859169885516167, -0.043444328010082245, -0.030294690281152725, -0.02092614397406578, 0.0645388662815094, 0.019288180395960808, -0.01665518991649151, 0.0025985464453697205, -0.033340997993946075, -0.01246077660471201, -0.04234214872121811, -0.003113280748948455, 0.002495216904208064, -0.007332569919526577, 0.013203218579292297, -0.014006893150508404, -0.00342900981195271, -0.03765787556767464, -0.0007362229516729712, -0.007347878068685532, 0.02962113358080387, -0.006345198955386877, 0.016349028795957565, 0.036494459956884384, -0.042495228350162506, -0.012996559962630272, 0.05027173459529877, -0.02141600288450718, 0.019089175388216972, -0.05272102728486061, 0.055200934410095215, 0.0023574442602694035, -0.0472407341003418, -0.01349407248198986, -0.01705319993197918, 0.012116344645619392, -0.004293916281312704, -0.01070800144225359, 0.001680061686784029, -0.00852659996598959, -0.05057789385318756, 0.003809798276051879, -0.03891313821077347, -0.00019924422667827457, 0.004986607003957033, 0.022594725713133812, 0.0029774215072393417, 0.008771529421210289, 0.08401074260473251, 0.024615392088890076, 0.03346346318721771, -0.018216615542769432, 0.03171833977103233, -0.0031228482257574797, 0.01246077660471201, 0.018446234986186028, 0.04623040184378624, 0.00037935335421934724, 0.008748567663133144, 0.006046691443771124, 0.007860698737204075, 0.0011098358081653714, 0.015093766152858734, -0.07549944519996643, -0.04782244190573692, -0.015185615047812462, -0.027217766270041466, 0.04313816875219345, 0.05281287431716919, -0.034198250621557236, 0.016027558594942093, 0.02309989184141159, -0.007271337788552046, -0.01665518991649151, 0.025610417127609253, 0.024952169507741928, -0.0071565271355211735, -0.009123614989221096, -0.061660945415496826, -0.03882129117846489, 0.021538468077778816, 0.013784925453364849, -0.044332198798656464, -0.08835823833942413, 0.08584771305322647, 0.011121319606900215, 0.025855345651507378, -0.024079609662294388, -0.00913126952946186, 0.001233257120475173, 0.06313052028417587, -0.03713740035891533, 0.015522392466664314, -0.015859169885516167, 0.018048224970698357, 0.05486415699124336, 0.02577880583703518, -0.0236203670501709, 0.01751244254410267, -0.009284350089728832, -0.024753164499998093, 0.017145048826932907, -0.02877919003367424, 0.0505472794175148, 0.008687335066497326, -0.007749715354293585, 0.00565633550286293, -0.048618461936712265, -0.025120558217167854, -0.056425582617521286, 0.03487180545926094, -0.04828168451786041, -0.04812860116362572, -0.05011865124106407, -0.011182552203536034, -0.014450826682150364, -0.012652128003537655, 0.008626102469861507, 0.01482587493956089, 0.06637583673000336, 0.029054734855890274, 0.024722548201680183, -0.011167244054377079, 0.018078841269016266, -0.06466133147478104, 0.011021817103028297, 0.01181783713400364, -0.016869504004716873, -0.020359745249152184, -0.0031037130393087864, -0.014129357412457466, 0.02143131196498871, -0.0023765794467180967, -0.046934571117162704, 0.02743207849562168, -0.014940685592591763, 0.010975892655551434, -0.046016085892915726, -0.003612706670537591, -0.03986223787069321, 0.015024879947304726, 0.03652507811784744, 0.0032127832528203726, 0.020665908232331276, 0.024293921887874603, 0.010363569483160973, 0.009115961380302906, -0.0274167712777853, 0.021890554577112198, -0.015407581813633442, 0.04047456383705139, -0.016854194924235344, -0.03977039083838463, 0.0011012250324711204, -0.010095678269863129, -0.0027363193221390247, -0.02928435616195202, -0.040290866047143936, 0.030355921015143394, 0.004179105628281832, 0.028075017035007477, -0.018874861299991608, 0.031259097158908844, -0.030218148604035378, -0.034228865057229996, -0.0452812984585762, 0.001076349290087819, -0.0026789139956235886, -0.016318412497639656, 0.0003556736628524959, 0.013509380631148815, 0.003231918206438422, -0.06919252127408981, -0.018476851284503937, 0.025151174515485764, -0.023222357034683228, -0.009758900851011276, 0.002456946764141321, -0.10850366950035095, -0.010348262265324593, -0.01266743615269661, 0.03444317728281021, 0.010156910866498947, 0.08094912767410278, -0.005269806366413832, 0.03848451375961304, -0.01875239796936512, 0.05008803680539131, 0.01371603924781084, 0.037688493728637695, -0.062181420624256134, 0.015996942296624184, 0.046505946666002274, -0.019992351531982422, 0.025885961949825287, 0.009337928146123886, 0.03278990462422371, -0.04053579643368721, -0.012613857164978981, -0.01350172609090805, 0.01700727641582489, 0.021967094391584396, -0.004071949049830437, 0.000710868916939944, 0.004642175044864416, 0.027187149971723557, 0.03364715725183487, -0.031182557344436646, -0.026850370690226555, -0.03526981547474861, 0.016058174893260002, -0.01618064008653164, 0.011366249062120914, -0.029054734855890274, 0.0035495609045028687, -0.030294690281152725, -0.008549562655389309, 0.005082282237708569, 0.03364715725183487, -0.0214006956666708, 0.020160740241408348, -0.061722178012132645, -0.010363569483160973, -0.021951785311102867, -0.007057024631649256, 0.03879067301750183, -0.004117873497307301, 0.03456564247608185, -0.024646008387207985, 0.0030309997964650393, 0.020696524530649185, -0.03885190561413765, 0.04782244190573692, -0.056027572602033615, -0.019869888201355934, 0.010562574490904808, -0.014741680584847927, -0.00731726223602891, 0.0373823307454586, -0.027278997004032135, -0.02573288232088089, -0.0037523929495364428, -0.027814781293272972, 0.00919250212609768, 0.03845389559864998, 0.00955989584326744, 0.03909683600068092, 0.030294690281152725, -0.022334488108754158, -0.017956377938389778, 0.061262935400009155, -0.00699961930513382, 0.0024320711381733418, -0.015874478965997696, 0.022839654237031937, -0.01608879119157791, 0.051251448690891266, -0.05896672233939171, 0.01792576164007187, -0.02833525463938713, -0.011764259077608585, -0.020329128950834274, -0.03233066573739052, 0.02790662832558155, 0.006004594266414642, 0.03214696794748306, 0.031595874577760696, -0.039954088628292084, 0.05676236003637314, 0.013517034240067005, -0.06539611518383026, 0.046077318489551544, -0.01200153399258852, 0.06239573284983635, -0.03713740035891533, -0.020145433023571968, 0.056884825229644775, 0.046475328505039215, 0.001914466731250286, -0.0056946054100990295, -0.07905092090368271, -0.01396096870303154, -0.0028645244892686605, 0.022120175883173943, -0.008105628192424774, 0.032085735350847244, -0.010317645967006683, 0.0017575589008629322, -0.00676617119461298, -0.010608498938381672, 0.006926905829459429, -0.037749722599983215, 0.006528895813971758, -0.02394183725118637, -0.05244548246264458, 0.02406430058181286, -0.0025507088284939528, -0.007696136832237244, 0.08578647673130035, -0.021140458062291145, 0.016058174893260002, 0.004554153885692358, -0.04494452103972435, -0.030355921015143394, -0.015767322853207588, -0.039127450436353683, 0.008985842578113079, -0.028473028913140297, -0.03802527114748955, -0.0009883278980851173, 0.0055874488316476345, 0.05021050199866295, 0.031151941046118736, 0.018094150349497795, -0.004668964073061943, 0.0017537318635731936, -0.04111750051379204, -0.0010983546962961555, -0.049077704548835754, 0.03321853280067444, 0.009911981411278248, -0.025105250999331474, 0.00916188582777977, -0.02570226602256298, 0.02011481672525406, 0.009651743806898594, -0.0232070479542017, 0.014565637335181236, -0.025181790813803673, -0.06839650124311447, 0.038178350776433945, -7.138289220165461e-06, -0.024998094886541367, 0.00392269529402256, 0.02262534201145172, -0.03499427065253258, -0.036402612924575806, -0.03967854380607605, 0.008863378316164017, -0.0038346739020198584, 0.0003949006204493344, 0.0007218716200441122, -0.0046230400912463665, -0.006069653667509556, 0.051220834255218506, 0.04010716825723648, -0.03833143040537834, -0.030738623812794685, -0.040780723094940186, -0.00229238485917449, -0.005618065129965544, 0.014573291875422001, -0.02045159414410591, -0.013685422949492931, 0.021461928263306618, -0.007810947485268116, -0.006096442695707083, -0.022058943286538124, 0.031106017529964447, -0.019992351531982422, -0.019395336508750916, 0.010830466635525227, -0.004527364391833544, 0.005051666405051947, 0.10317645967006683, 0.037780340760946274, -0.05924226716160774, -0.013111370615661144, -0.013333337381482124, 0.031243789941072464, -0.0018302722601220012, -0.02747800201177597, 0.03530042991042137, 0.0007917147595435381, 0.01616533286869526, 0.020711831748485565, -0.007275164593011141, 0.06163032725453377, -0.012185231782495975, -0.033402230590581894, 0.009337928146123886, 0.00097732525318861, -0.0231305081397295, 0.004221202805638313, 0.01046307198703289, 0.012590895406901836, 0.0037504795473068953, -0.00775354215875268, -0.003277842653915286, 0.007619596552103758, -0.0434749461710453, 0.003893992630764842, -0.02141600288450718, 0.011121319606900215, -0.011044779792428017, 0.016364337876439095, -0.02175278030335903, -0.015981635078787804, -0.027324922382831573, -0.019839271903038025, -0.06417147070169449, -0.006008421070873737, -0.03263682499527931, -0.03698432072997093, -0.01353234238922596, -0.02917720004916191, -0.0007496175239793956, 0.043015703558921814, 0.0006946041248738766, -0.01792576164007187, -0.006636052392423153, 0.007990817539393902, 0.007730580400675535, -0.003926522564142942, 0.007677001878619194, 0.00033366828574799, 0.037535410374403, -0.05140453204512596, 0.013647153042256832, 0.008419443853199482, 0.024936862289905548, 0.04828168451786041, -0.05017988383769989, -0.015782630071043968, -0.043872956186532974, 0.04812860116362572, -0.012047458440065384, -0.0011930734617635608, 0.0287332646548748, 0.001491580973379314, 0.02054344303905964, 0.03533104807138443, -0.00031309807673096657, -0.011419827118515968, 0.03487180545926094, -0.01198622677475214, -0.049536947160959244, 0.013739001005887985, -0.003295064205303788, 0.02130884677171707, -0.004852661397308111, 0.0235438272356987, -0.022502876818180084, -0.035912755876779556, 0.014297746121883392, -0.011932647787034512, 0.016471493989229202, 0.01783391274511814, 0.014986610040068626, 0.0083122868090868, 0.03386147320270538, -0.03977039083838463, -0.005480292718857527, -0.003888252191245556, -0.01616533286869526, -0.011335632763803005, 0.008687335066497326, -0.007458861917257309, 0.007776504382491112, -0.002303865971043706, -0.022793730720877647, 0.020803680643439293, 0.016379645094275475, -0.02490624599158764, 0.022854963317513466, -0.01927287131547928, -0.022380411624908447, -0.010478380136191845, -0.06150786206126213, 0.02230387181043625, 0.009322620928287506, 0.004760812968015671, -0.021951785311102867, -0.002747800201177597, 0.012315349653363228, 0.05716037005186081, 0.023268280550837517, -0.023804062977433205, -0.03698432072997093, -0.04794490709900856, 0.00985074881464243, 0.07053963094949722, 0.0232070479542017, -0.04313816875219345, 0.020206665620207787, -0.027171840891242027, -0.030340613797307014, -0.016027558594942093, -0.0452812984585762, -0.0191810242831707, 0.013983930461108685, -0.013394569978117943, 0.009536933153867722, 0.032055117189884186, 0.018048224970698357, -0.021982401609420776, -0.012736322358250618, -0.036004602909088135, 0.049904339015483856, -0.030723316594958305, 0.021125148981809616, 0.027156533673405647, 0.035514745861291885, -0.005078455433249474, -0.017986994236707687, 0.015905095264315605, 0.012016842141747475, -0.00046378697152249515, -0.014068124815821648, 0.026697291061282158, -0.010646769776940346, 0.01751244254410267, 0.006371987983584404, -0.02574818953871727, 0.0076349047012627125, 0.05030234903097153, -0.0401684008538723, -0.03707616776227951, 0.008725604973733425, 0.039525460451841354, -0.07268276065587997, 0.03612706810235977, 0.021538468077778816, -0.030692700296640396, -0.013830849900841713, 0.008021433837711811, 0.015951018780469894, -0.0083122868090868, -0.03272867575287819, 0.013853811658918858, -0.009682360105216503, -0.019854579120874405, -0.03147341310977936, 0.0021546122152358294, 0.006528895813971758, 0.015162653289735317, 0.006276312749832869, 0.01621125638484955, -0.009246080182492733, 0.038208965212106705, 0.027340229600667953, 0.011381557211279869, 0.011412173509597778, -0.017160357907414436, 0.0054726386442780495, -0.002556449268013239, 0.00490241264924407, 0.001691542798653245, -0.034749340265989304, -0.01569078117609024, -0.008029087446630001, 0.04665902629494667, -0.030340613797307014, 0.024584775790572166, 0.05881364271044731, 0.012843478471040726, 0.002508611651137471, -0.002990816021338105, 0.04727134853601456, -0.00740911066532135, 0.006203599274158478, -0.027263689786195755, 0.017527751624584198, 0.01066973153501749, 0.032912369817495346, -0.0009065253543667495, -0.042127836495637894, 0.004959817975759506, -0.004883277229964733, -0.038117118179798126, 0.009253733791410923, 0.011833145283162594, -0.02228856459259987, 0.042464613914489746, 0.042954470962285995, 0.03799465298652649, -0.015147345140576363, 0.02704937569797039, -0.041239965707063675, -0.03401455283164978, -0.01697666011750698, -0.017803296446800232, -0.016762347891926765, 0.023329513147473335, -0.005373136140406132, -0.028243407607078552, 0.0073708402924239635, -0.001554726855829358, -0.004772293847054243, 0.020788371562957764, -0.01575201377272606, 0.003930349368602037, -0.001601607771590352, -0.023237664252519608, -0.01610410027205944, -0.013585920445621014, 0.00829697959125042, -0.027202457189559937, 0.05541524663567543, -0.03845389559864998, -0.009506317786872387, 0.0022598551586270332, 0.01622656360268593, 0.00980482529848814, 0.0076310778968036175, -0.011917339637875557, 0.012284734286367893, 0.005319557618349791, -0.003128588665276766, 0.010149256326258183, -0.06429393589496613, 0.00870264321565628, 0.011504021473228931, 0.008672026917338371, -0.03432071581482887, 0.020359745249152184, 0.007030235603451729, 0.037351712584495544, -0.045189451426267624, -0.0017556453822180629, 0.01875239796936512, 0.020574059337377548, -0.020665908232331276, -0.015905095264315605, -0.011703026480972767, 0.01353234238922596, -0.021461928263306618, 0.024309230968356133, -0.042464613914489746, 0.04757751151919365, -0.005629546474665403, 0.01878301426768303, 0.009399160742759705, 0.0023478767834603786, -0.01569078117609024, 0.012897057458758354, 0.008717951364815235, -0.028228098526597023, 0.01572139747440815, -0.015874478965997696, -0.005438195075839758, 0.007217759732156992, -0.03187142312526703, 0.001343284035101533, -0.0007118256762623787, 0.041178733110427856, 0.003277842653915286, 0.00610409677028656, 0.03921930119395256, 0.011396865360438824, -0.019563725218176842, -0.0279831700026989, 0.022594725713133812, -0.044240351766347885, -0.005464984569698572, 0.012698052451014519, -0.016915427520871162, -0.02962113358080387, 0.026865679770708084, 0.006946041248738766, -0.028932269662618637, 0.011764259077608585, 0.013631844893097878, -0.014504405669867992, 0.0012724840780720115, 0.029391512274742126, -0.004048986826092005, -0.03181019052863121, 0.06380407512187958, -0.05024111643433571, -0.028580185025930405, 0.035086117684841156, -0.013807888142764568, -0.03787218779325485, 0.005763492081314325, -0.02698814496397972, -0.0232070479542017, 0.007588980253785849, 0.03181019052863121, -0.02089552953839302, -0.016440877690911293, 0.03141218051314354, -0.045158833265304565, -0.023804062977433205, 0.01550708431750536, -0.018461544066667557, 0.005568313878029585, 0.019334103912115097, 0.00049033691175282, 0.018936093896627426, -0.07500959187746048, -0.0031955617014318705, 0.02833525463938713, 0.006391123402863741, 0.05670112743973732, -0.04319940134882927, 0.024783780798316002, 0.00808266643434763, -0.029513977468013763, 0.005637200083583593, 0.010945277288556099, -0.006184464320540428, -0.045189451426267624, 0.035086117684841156, 0.010531959123909473, -0.037780340760946274, -0.03762726113200188, -0.013777271844446659, 0.05094528943300247, -0.018063534051179886, 0.023819372057914734, 0.03523920103907585, 0.009659398347139359, -0.004091084469109774, -0.040352098643779755, -0.036831241101026535, 0.008365865796804428, 0.023819372057914734, 0.01613471657037735, -0.0063031017780303955, -0.0021278229542076588, -0.03548412770032883, 0.01178722083568573, 0.012476084753870964, 0.007830082438886166, -0.017650214955210686, 0.022594725713133812, -0.03958669304847717, 0.052996572107076645, 0.011924994178116322, -0.005047839134931564, -0.003417528700083494, 0.029850754886865616, 0.00011899640230694786, -0.037719108164310455, 0.02094145305454731, 0.014879452995955944, 0.01375430915504694, -0.01663988269865513, -0.014519713819026947, -0.0365556925535202, -0.012499047443270683, -0.013394569978117943, 0.017956377938389778, -0.016915427520871162, 0.022334488108754158, 0.024324538186192513, 0.01706850901246071, 0.05149637907743454, -0.005591276101768017, -0.008610794320702553, 0.001024684519506991, 0.024646008387207985, 0.0010973979951813817, -0.0309529360383749, -0.025365488603711128, -0.054251834750175476, 0.0358821377158165, -0.03621891513466835, -0.007122084032744169, -0.01835438795387745, 0.010983547195792198, 0.02000766061246395, -0.027141224592924118, 0.013218526728451252, 0.0029104487039148808, 0.013723693788051605, -0.004236510954797268, 0.013210873119533062, -0.023758139461278915, -0.003915041219443083, -0.0314427949488163, 0.01525450125336647, -0.0169613528996706, 0.03827019780874252, -0.05048604682087898, -0.020574059337377548, 0.056058187037706375, -0.015055496245622635, 0.0014313054271042347, 0.03970915824174881, 0.03352469578385353, 0.03450440987944603, 0.0030156916473060846, -0.04218906909227371, -0.011151935905218124, -0.02789132110774517, 0.04880215600132942, -0.0104936882853508, 0.018109457567334175, 0.010907006449997425, -0.026942219585180283, -0.006517414934933186, 0.014940685592591763, 0.03520858287811279, -0.015338695608079433, 0.03138156235218048, 0.013830849900841713, -0.038606975227594376, -0.013126677833497524, 0.02135477028787136, -0.023865295574069023, -0.010126294568181038, 0.002146958140656352, -0.0027573679108172655, 0.01421355176717043, 0.02046690322458744, 0.01781860552728176, -0.04013778641819954, 0.028212791308760643, -0.018461544066667557, 0.0146115617826581, 0.014466134831309319, -0.005017223302274942, 0.013915044255554676, 0.00980482529848814, -0.015231539495289326, 0.009651743806898594, -0.001801569596864283, -0.006582474336028099, -0.003580177202820778, -0.028595492243766785, -0.05991582199931145, -0.03876005858182907, 0.05795639008283615, -0.012491392903029919, 0.0007233067881315947, -0.014588600024580956, 0.043811723589897156, 0.01913509890437126, 0.04944509640336037, 0.022839654237031937, -0.028197482228279114, 0.010501342825591564, 0.006750863045454025, 0.03061615861952305, -0.007298126816749573, 0.05244548246264458, -0.03496365249156952, 0.022441644221544266, -0.03404516726732254, 0.03168772533535957, 0.029988527297973633, 0.014381940476596355, 0.03133564069867134, 0.0033065450843423605, -0.024799088016152382, 0.010968239046633244, 0.002303865971043706, 0.058293167501688004, -0.014091087505221367, -0.008541908115148544, -0.0016819752054288983, -0.02352851815521717, -0.035514745861291885, -0.00144470005761832, -0.008649065159261227, 0.035943370312452316, -0.025840038433670998, -0.004883277229964733, -0.011419827118515968, -0.0008926523732952774, 0.008932264521718025, 0.008120936341583729, 0.004910066723823547, -0.0257634986191988, 0.0006458096322603524, 0.0209873765707016, 0.0014954080106690526, 0.025564493611454964, -0.005893610417842865, 0.026712598279118538, 0.00044082486419938505, -0.030417153611779213, 0.032575592398643494, -0.028243407607078552, -0.010577882640063763, -0.046536561101675034, -0.0182778462767601, -0.013172602280974388, -0.0073976293206214905, 0.013585920445621014, -0.005258325487375259, 0.006371987983584404, 0.007141218986362219, 0.006712592672556639, 0.029850754886865616, -0.05229239910840988, 0.031565260142087936, 0.008878686465322971, -0.01174129731953144, 0.01092231459915638, -0.0061691561713814735, -0.04313816875219345, 0.01836969517171383, 0.014573291875422001, 0.009919635951519012, -0.011902031488716602, 0.004221202805638313, 0.00699961930513382, -0.000147220678627491, 0.010348262265324593, 0.0525067113339901, 0.037780340760946274, -0.008809800259768963, 0.00621508015319705, -0.015361658297479153, 0.015859169885516167, 0.05008803680539131, -0.001447570277377963, 0.006712592672556639, -0.015086112543940544, 0.0015068891225382686, -0.018936093896627426, 0.015216231346130371, -0.013356299139559269, -0.01835438795387745, -0.022885579615831375, 0.03964792564511299, 0.0020436285994946957, 0.006854192819446325, -0.004022197797894478, 0.0044890944845974445, 0.010325299575924873, 0.0020474556367844343, -0.024615392088890076, 0.036433231085538864, -0.010003830306231976, 0.025870654731988907, -0.014971301890909672, -0.06594720482826233, 0.054282449185848236, -0.031197866424918175, 0.07194797694683075, -0.0013672028435394168, 0.030631467700004578, -0.0045197103172540665, -0.015223884955048561, -0.0619058720767498, -0.007619596552103758, 0.016838887706398964, 0.01569078117609024, -0.019869888201355934, 0.003980100620537996, 0.017956377938389778, -0.00024636441958136857, 0.013815541751682758, -0.005763492081314325, -0.013830849900841713, 0.03141218051314354, -0.007018754258751869, 0.0014026027638465166, 0.02129353955388069, -0.031259097158908844, -0.010287029668688774, -0.0029295836575329304, 0.029590517282485962, 0.04185228794813156, 0.0005668773083016276, -0.022778421640396118, -0.009889019653201103, -0.0004668964247684926, 0.007585153449326754, 0.043015703558921814, 0.02143131196498871, 0.0011758519103750587, -0.0226406492292881, 0.016440877690911293, -0.007730580400675535, 0.014626869931817055, 0.0505472794175148, 0.0231305081397295, 0.01200153399258852, 0.019104482606053352, 0.011381557211279869, -0.03481057286262512, -0.0006209340062923729, 0.007906623184680939, -0.024324538186192513, -0.015024879947304726, 0.02262534201145172, -0.03569843992590904, -0.03563721105456352, 0.039035603404045105, 0.00805970374494791, -0.023451978340744972, 0.04068887606263161, -0.011657102964818478, 0.03450440987944603, -0.05008803680539131, -0.04794490709900856, -0.03986223787069321, -0.015300425700843334, -0.00655185803771019, 0.043321866542100906, 0.02045159414410591, 0.017803296446800232, -0.03266744315624237, 0.05627249926328659, -0.003090318525210023, -0.04589362442493439, -0.0083122868090868, 0.04809798672795296, -0.008342903107404709, -0.004263299982994795, 0.025166483595967293, 0.027324922382831573, 0.046536561101675034, -0.007462688721716404, 0.014879452995955944, 0.014902415685355663, 0.007164181210100651, 0.016410261392593384, -0.037351712584495544, 0.007271337788552046, -0.000757271540351212, 0.0073976293206214905, 0.017236897721886635, 0.02790662832558155, 0.013034829869866371, -0.027753548696637154, 0.010945277288556099, -0.020359745249152184, -0.010003830306231976, 0.005200920160859823, 0.03658631071448326, -0.02187524549663067, -0.0182778462767601, 0.0401684008538723, -0.03398393839597702, 0.0070264083333313465, -0.015376965515315533, -0.012223501689732075, -0.02484501339495182, -0.015001918189227581, -0.007477996870875359, -0.014473789371550083, -0.013379261828958988, 0.004435515962541103, -0.026926912367343903, 0.0015327214496210217, -0.013555304147303104, -0.012613857164978981, 0.028151558712124825, 0.017757372930645943, -5.7554792874725536e-05, -0.05060851201415062, -0.0019862232729792595, 0.0007587067084386945, 0.03940299525856972, 0.00446230499073863, -0.013761963695287704, -0.018415620550513268, 0.021278230473399162, 0.015438198111951351, -0.03575967252254486, -0.0292231235653162, 0.022839654237031937, -0.026835063472390175, -0.001421737833879888, -0.00020546313317026943, -0.021216997876763344, -0.02406430058181286, -0.0021220825146883726, 0.00010518325143493712, 0.016471493989229202, 0.00267508695833385, -0.02357444167137146, -0.009001150727272034, 0.015797937288880348, 0.026452360674738884, -0.0017690398963168263, 0.012927672825753689, 0.014060471206903458, 0.03014160878956318, 0.03548412770032883, -0.02046690322458744, -0.03612706810235977, 0.0033295073080807924, 0.0029295836575329304, -0.02701876126229763, -8.359646744793281e-05, 0.014665139839053154, 0.006058172322809696, 0.021553775295615196, -0.01700727641582489, 0.01153463777154684, -0.0026597788091748953, -0.005595102906227112, -0.02005358412861824, 0.006050518248230219, -0.012476084753870964, -0.01833907887339592, -0.021630316972732544, -0.023773446679115295, 0.005709913559257984, 0.0452812984585762, 0.0021239961497485638, -0.007309608161449432, 0.02662075124680996, -0.02920781634747982, -0.004427861887961626, 0.022365104407072067, 0.003930349368602037, 0.04745504632592201, 0.024523543193936348, -0.00016240915283560753, 0.025105250999331474, 0.007011100649833679, 0.027631083503365517, -0.0357290580868721, -0.018201306462287903, 0.006245696451514959, -0.01463452447205782, 0.0028032921254634857, -0.022058943286538124, 0.020619982853531837, -0.03321853280067444, -0.01044776476919651, 0.002692308509722352, 0.005836205556988716, 0.003528512315824628, -0.007076159585267305, 0.003249139990657568, 0.010631461627781391, 0.0028071191627532244, 0.007003446575254202, -0.0033562963362783194, -0.03006506897509098, -0.006230388302356005, -0.007382321171462536, -0.011856107972562313, -0.010088024660944939, -0.04313816875219345, -0.02577880583703518, -5.271122063277289e-05, -0.0018465371103957295, 0.027722932398319244, 0.03364715725183487, -0.008549562655389309, 0.04629163444042206, -0.017665524035692215, -0.0010572142200544477, -0.016349028795957565, 0.01836969517171383, 0.013210873119533062, -0.00522770918905735, 0.01881363056600094, 0.00783773697912693, 0.005568313878029585, -0.01882893778383732, -1.9987210180261172e-05, 0.0248603206127882, -0.011764259077608585, -0.014022201299667358, -0.02704937569797039, -0.01742059364914894, -0.02187524549663067, -0.025595109909772873, -0.01529277116060257, 0.04754689335823059, 0.006406431086361408, -0.010807503946125507, -0.01650211028754711, -0.020420977845788002, -0.005308076739311218, -0.0104936882853508, -0.003101799637079239, -0.0309529360383749, 0.0007620553369633853, -0.04567930847406387, -0.005438195075839758, 0.035055503249168396, 0.027615776285529137, -0.04243399575352669, 0.003293150570243597, -0.023222357034683228, 0.024186765775084496, -0.03456564247608185, -0.0022579417563974857, -0.0444546639919281, 0.00753922900184989, 0.011481059715151787, -0.03872944042086601, 0.029942603781819344, -0.0024301577359437943, -0.023849988356232643, -0.0023670117370784283, -0.029468053951859474, -0.022150790318846703, 0.02744738757610321, -0.007148873060941696, 0.013777271844446659, 0.017328746616840363, -0.0018675856990739703, -0.0013997325440868735, -0.026804447174072266, -0.034290097653865814, -0.02101799286901951, 0.0373823307454586, -0.00019553679157979786, -0.025197099894285202, -0.04062764346599579, -0.00895522627979517, 0.0025641033425927162, -0.029927294701337814, 0.004944509826600552, -0.015200923196971416, -0.009246080182492733, 0.012942980974912643, 0.0021316499914973974, -0.023819372057914734, -0.016456184908747673, 0.008970534428954124, 0.0006247609853744507, -0.03217758238315582, -0.03168772533535957, 0.027600467205047607, -0.0102487588301301, 0.009889019653201103, 0.003769614500924945, -0.001711634686216712, 0.005407579243183136, -0.013509380631148815, 0.03168772533535957, -0.026804447174072266, -0.012506701052188873, 0.011159590445458889, 0.009873711504042149, -0.008756221272051334, 0.0007558364304713905, -0.014933031983673573, -0.016792964190244675, -0.004527364391833544, 0.033830855041742325, -0.004064294975250959, -0.005097590386867523, 0.018048224970698357, -0.02219671569764614, -0.03450440987944603, 0.0025220061652362347, 0.009184847585856915, 0.012093382887542248, -0.001508802641183138, -0.015935711562633514, -0.017588984221220016, -5.3929588830214925e-06, 0.03101416863501072, 0.003574436530470848, -0.05244548246264458, 0.028672033920884132, -0.013670114800333977, -0.012177577242255211, 0.0010409493697807193, -0.007581326644867659, 0.040290866047143936, 0.036371998488903046, -0.005572141148149967, 0.0035648690536618233, 0.007221586536616087, 0.012904711067676544, 0.009674706496298313, -0.013685422949492931, 0.03456564247608185, 0.02571757324039936, 0.019502492621541023, -0.03104478493332863, -0.033739008009433746, -0.007198624312877655, 0.0006051475065760314, -0.007960201241075993, 0.01178722083568573, -0.02141600288450718, -0.03958669304847717, -0.003199388738721609, 0.03147341310977936, -0.011220822110772133, 0.031182557344436646, -0.02444700337946415, -0.022074250504374504, -0.025564493611454964, 0.010126294568181038, 0.008595487102866173, -0.007190970238298178, -0.006593955215066671, -0.015514738857746124, 0.011305016465485096, -0.01829315535724163, 0.011879069730639458, 0.009743592701852322, 0.01504018809646368, -0.0037275173235684633, -0.0012198626063764095, 0.007179489359259605, -0.036861855536699295, 0.03539228066802025, 0.022441644221544266, -0.02094145305454731, -0.014121703803539276, 0.006111750844866037, 0.033769622445106506, -0.018415620550513268, 0.0037351713981479406, 0.005771146155893803, 0.022533493116497993, -0.03680062294006348, -0.009950251318514347, 0.03842328116297722, -0.03061615861952305, 0.034228865057229996, 0.011580562219023705, -0.005204746965318918, -0.02182932198047638, -0.0013298894045874476, -0.03269805759191513, -0.008388827554881573, 0.007830082438886166, 0.005510908551514149, 0.0019479531329125166, -0.011389210820198059, 0.05140453204512596, -0.003861463163048029, -0.002916189143434167, -0.04368925839662552, 0.009529279544949532, 0.021660933271050453, 0.009314966388046741, 0.02443169429898262, -0.015828553587198257, 0.015323387458920479, 0.014565637335181236, -0.02611558325588703, 0.0034921555779874325, -0.0001872847933555022, -0.012146960943937302, -0.010577882640063763, -0.0084806764498353, -0.005897437687963247, 0.0037141228094697, -0.009659398347139359, 0.010225797072052956, -0.030187532305717468, 0.007898968644440174, -0.024967478588223457, 0.009881365112960339, -0.015996942296624184, 0.018645241856575012, -0.02662075124680996, 0.0196708831936121, 0.00043819379061460495, 0.018216615542769432, 0.006130885798484087, -0.014075779356062412, 0.04087257385253906, -0.010547267273068428, -0.016379645094275475, 0.00600076699629426, -0.006563338916748762, -0.017129741609096527, -0.03484118729829788, 0.020267898216843605, -0.005166477058082819, 0.0013394569978117943, -0.010577882640063763, 0.0032912371680140495, -0.005939534865319729, 0.0040375059470534325, 0.006938387174159288, 0.015277463011443615, 0.004910066723823547, 0.009667051956057549, 0.001143322209827602, -0.017359362915158272, 0.013509380631148815, 0.03444317728281021, 0.006861846894025803, -0.034198250621557236, -0.010409493930637836, -0.011542292311787605, -0.014787605032324791, 0.04809798672795296, -0.013440493494272232, -0.025533877313137054, -0.03306545317173004, 0.003585917642340064, 0.01651741750538349, -0.0003078359004575759, 0.01882893778383732, 0.01546116080135107, 0.008641410619020462, 0.029988527297973633, -0.01181783713400364, -0.04546499624848366, 0.005859167315065861, 0.01911979168653488, 0.00895522627979517, 0.032024502754211426, -0.025059325620532036, 0.031259097158908844, -0.004458478186279535, 0.02089552953839302, 0.014665139839053154, 0.012537317350506783, 0.00349980965256691, -0.033769622445106506, 0.0011414086911827326, -0.005774972960352898, 0.01442786492407322, 0.007814774289727211, -0.008427097462117672, 0.0029793349094688892, -0.031595874577760696, -0.006593955215066671, 0.012774592265486717, 0.006900116801261902, 0.025044018402695656, 0.01328741293400526, -0.03520858287811279, -0.007148873060941696, -0.025977810844779015, -0.04895523935556412, -0.033432845026254654, 0.033830855041742325, 0.024186765775084496, -0.021676240488886833, 0.02703406848013401, -0.04375049099326134, 0.017634907737374306, -0.006035210564732552, 0.008373519405722618, -0.0035782635677605867, -0.018170690163969994, -0.025962503626942635, -0.04408726841211319, -0.025442028418183327, 0.015009571798145771, -0.004297743551433086, -0.03830081596970558, -0.00468809949234128, 0.0169613528996706, -0.0006836014217697084, -0.01663988269865513, -0.018568700179457664, 0.0003516074502840638, -0.014955993741750717, -0.0053693088702857494, 0.010072716511785984, -0.0012418680125847459, 0.037259865552186966, 0.010968239046633244, 0.0011873329058289528, 0.028626108542084694, -0.00047431126586161554, -0.005985459312796593, -0.0016628401353955269, -0.021691549569368362, 0.01657865010201931, -0.017986994236707687, -0.002654038369655609, 0.013869119808077812, 0.019380029290914536, 0.01738997921347618, -0.020267898216843605, -0.021722164005041122, 0.014542675577104092, 0.032055117189884186, -0.03940299525856972, -0.008251055143773556, 0.00047765992349013686, 0.02440107800066471, -0.005813243333250284, -0.04846537858247757, 0.03346346318721771, -0.02666667476296425, -0.004048986826092005, -0.007646385580301285, 0.020650599151849747, -0.013761963695287704, -0.01414466556161642, 0.006245696451514959, 0.021538468077778816, 0.01700727641582489, -0.009483355097472668, -0.01174895092844963, 0.011174897663295269, -0.012782246805727482, 0.04396480321884155, 0.04026024788618088, 0.005817070137709379, -0.01693073660135269, 0.026880986988544464, 0.010838120244443417, -0.04965940862894058, 0.026819756254553795, -0.007386148441582918, 0.012812862172722816, 0.012070421129465103, -0.0030558754224330187, -0.006490625906735659, 0.010738617740571499, -0.01575201377272606, 0.03716801851987839, 0.035055503249168396, -0.02835056371986866, 0.003777268575504422, -0.022074250504374504, 0.018078841269016266, -0.001343284035101533, -0.01659395918250084, -0.01399158500134945, 0.01697666011750698, 0.010011483915150166, 0.014971301890909672, -0.0059586698189377785, -0.015568316914141178, 0.007688482757657766, 0.030386537313461304, -0.023314205929636955, -0.01708381623029709, 0.015522392466664314, 0.015614241361618042, -0.010593190789222717, -0.03355531021952629, -0.014504405669867992, -0.0013758136192336679, 0.03181019052863121, -0.00114906276576221], "index": 44}, {"title": "The Monkey's Uncle", "text": "The Monkey's Uncle is a 1965 Walt Disney production starring Tommy Kirk as genius college student Merlin Jones and Annette Funicello as his girlfriend, Jennifer. The title plays on the idiom \"monkey's uncle\" and refers to a chimpanzee named Stanley, Merlin's legal \"nephew\" (a legal arrangement resulting from an experiment to raise Stanley as a human); Stanley otherwise has little relevance to the plot. Jones invents a man-powered airplane and a sleep-learning system.", "vector": [-0.006288918666541576, -0.010909094475209713, -0.027995027601718903, 0.0008603157475590706, -0.02231632173061371, 0.009315071627497673, -0.04423413798213005, -0.01894562691450119, -0.006317976396530867, 0.023312585428357124, 0.029389798641204834, -0.01228726003319025, -0.08468246459960938, -0.007260276470333338, -0.011033627204596996, 0.012445001862943172, -0.044134508818387985, 0.03420507535338402, -0.04516398161649704, 0.027181411162018776, 0.007546702399849892, 0.008024078793823719, -0.003127854783087969, -0.010103780776262283, 0.0308343805372715, 0.02055625431239605, -0.023777509108185768, 0.0160896684974432, -0.0028310511261224747, -0.01891241781413555, -0.019227901473641396, 0.006180990021675825, 0.010585308074951172, 0.030668336898088455, -0.0003821607679128647, 0.008509757928550243, -0.01470320113003254, -0.04831882193684578, -0.055392295122146606, -0.026218356564641, -0.006849317345768213, -0.00362391141243279, 0.0023889588192105293, 0.04519719257950783, 0.012735579162836075, -0.011108347214758396, -0.0988958403468132, 0.01568286120891571, -0.04317145422101021, 0.015076800249516964, 0.0387214720249176, 0.04167705774307251, 0.005026983562856913, 0.01243670005351305, 0.010352847166359425, 0.03267747163772583, -0.021286847069859505, 0.010925699025392532, -0.005292654037475586, -0.017833132296800613, 0.03354090079665184, 0.0030116240959614515, -0.023229563608765602, 0.011033627204596996, 0.03237859159708023, -0.03012039139866829, 0.041710264980793, 0.006911583710461855, 0.0658530741930008, 0.005890412721782923, 0.032694075256586075, 0.023196354508399963, -0.011432133615016937, -0.006666668690741062, 0.02817767672240734, 0.004777917638421059, -0.008459944278001785, 0.010029060766100883, -0.0081942742690444, 0.0329265370965004, -0.020506441593170166, -0.040116243064403534, 0.0028767131734639406, 0.026168543845415115, 0.017949363216757774, 0.014221672900021076, 0.06645083427429199, -0.05552513152360916, -0.015732673928141594, 0.04579494893550873, 0.027712753042578697, 0.022864267230033875, 0.029439611360430717, 0.02078871615231037, -0.009248653426766396, -0.02520548738539219, 0.0196596160531044, 0.003816937794908881, -0.012860111892223358, 0.034570373594760895, 0.042108774185180664, 0.005217934492975473, -0.01163138635456562, -0.013424661941826344, -0.04164385050535202, 0.03755916655063629, -0.0024491497315466404, 0.030336249619722366, 0.04131175950169563, 0.009066005237400532, -0.01151515543460846, -0.009331676177680492, 0.0245745200663805, -0.030286435037851334, 0.005628893617540598, 0.05635535344481468, -0.07126610726118088, 0.0163138285279274, -0.025902872905135155, -0.040979672223329544, 0.029240358620882034, -0.026351191103458405, -0.0810294970870018, -0.03868826478719711, 0.005475302692502737, -0.005641346797347069, -0.043569959700107574, 0.0577833317220211, 0.04376921430230141, -0.01416355837136507, -0.06429225951433182, -0.0013158991932868958, -0.02415941096842289, -0.007521795574575663, -0.06558740139007568, 0.00999585259705782, -0.029024500399827957, -0.019858868792653084, -0.001070984173566103, 0.04742218181490898, -0.036596108227968216, 0.02528850920498371, -0.023644672706723213, -0.015026986598968506, 0.005392280872911215, -0.05625572428107262, -0.0007544626714661717, 0.055458713322877884, 0.03825655207037926, -0.015998344868421555, -0.00581569317728281, 0.004296389874070883, -0.03148195147514343, 0.0420091450214386, -0.01579909212887287, 0.05266917496919632, -0.012063100934028625, -0.04370279610157013, -0.04536323621869087, 0.03855542838573456, -0.02400997094810009, 0.041212134063243866, -0.0007684726733714342, -0.018580330535769463, -0.0006200707866810262, -0.03184724971652031, 0.05529266968369484, 0.009522626176476479, -0.0034890007227659225, 0.025271905586123466, -0.005944377277046442, -0.04798673093318939, -0.011249484494328499, -0.01209630910307169, -0.005911168176680803, 0.015184728428721428, -0.022216694429516792, 0.029871325939893723, 0.015840603038668633, -0.02528850920498371, -0.033026162534952164, 0.015591536648571491, 0.01924450695514679, 0.04001661762595177, 0.030369456857442856, -0.04486510530114174, 0.0211540125310421, 0.030136996880173683, -0.010153594426810741, -0.024973025545477867, 0.020473232492804527, -0.023960156366229057, -0.01811540685594082, -0.022814452648162842, 0.04503114894032478, 0.00896637886762619, -0.035168129950761795, 0.04157743230462074, -0.037459537386894226, 0.0018389378674328327, 0.023644672706723213, -0.06050645560026169, 0.05499378964304924, -0.012768788263201714, -0.007870487868785858, 0.01149855088442564, -0.03387298807501793, 0.0003341636620461941, 0.018845999613404274, 0.02588626742362976, 0.02210046350955963, -0.025554180145263672, -0.023063519969582558, -0.02892487496137619, -0.020772110670804977, -0.004503944888710976, -0.009090911597013474, 0.009821506217122078, -0.008248238824307919, -0.008825241588056087, -0.026849323883652687, -0.004873393103480339, 0.024823585525155067, 0.04981321841478348, -0.04449980705976486, -0.017716901376843452, -0.02615193836390972, 0.0682108998298645, 0.019975099712610245, 0.0131838982924819, -0.04622666537761688, 0.032212547957897186, -0.01999170519411564, 0.03297634795308113, -0.018430890515446663, -0.005790786352008581, -0.003190121380612254, -0.031232886016368866, -0.03709424287080765, 0.037525955587625504, 0.0211540125310421, 0.033291831612586975, 0.030784567818045616, -0.0025238697417080402, 0.034902460873126984, -0.00655458914116025, -0.025836454704403877, -0.08674141764640808, -0.0530344694852829, -0.01236198004335165, 0.03666252642869949, -0.005944377277046442, 0.026251565665006638, 0.0060813636519014835, -0.05353260412812233, 0.025188883766531944, -0.008675801567733288, -0.0020641351584345102, -0.017168955877423286, -0.0052843522280454636, -0.0423080250620842, -0.02228311263024807, -0.005035285837948322, -0.01725197769701481, -0.03626402094960213, 0.021917816251516342, -0.0065794955007731915, -0.08873394131660461, -0.013200502842664719, -0.041511014103889465, -0.021220430731773376, -0.006662517786026001, 0.025089256465435028, 0.015242843888700008, -0.025537576526403427, -0.04157743230462074, 0.04745539277791977, 0.020323792472481728, 0.027480291202664375, -0.0015846829628571868, 0.051971789449453354, 0.02967207320034504, -0.07936906069517136, -0.004483189433813095, 0.03304276615381241, 0.021502705290913582, 0.0032295568380504847, -0.028526369482278824, -0.01158987544476986, 0.03915318846702576, -0.024292245507240295, 0.009348280727863312, -0.008493153378367424, 0.05170612037181854, -0.011158160865306854, 0.003161063650622964, -0.0029618109110742807, 0.018613537773489952, 0.00582399545237422, -0.0098298080265522, 0.05751766264438629, 0.0035367384552955627, -0.031863853335380554, 0.01057700626552105, 0.052868425846099854, 0.03586551547050476, -0.006616855505853891, -0.003418432082980871, -0.046492334455251694, -0.002239519264549017, 0.024890003725886345, 0.044964730739593506, -0.054827746003866196, 0.029954347759485245, -0.03279370069503784, -0.027779171243309975, 0.05884601175785065, -0.04234123229980469, -0.0148194320499897, -0.006014945916831493, -0.015774184837937355, 0.028742225840687752, -0.02997095137834549, -0.01826484687626362, 0.07724369317293167, 0.007094232365489006, -0.002685762709006667, 0.002080739475786686, -0.03769199922680855, -0.018962230533361435, -0.05067664757370949, -0.023877134546637535, -0.008185971528291702, 0.010701538994908333, 0.04948112741112709, -0.03712745010852814, 0.004396016243845224, 0.04639270901679993, 0.023312585428357124, -0.014205069281160831, 0.011747617274522781, 0.0390203520655632, 0.04273974150419235, 0.07571608573198318, 0.014811129309237003, -0.017799923196434975, 0.0601743645966053, 0.01879618689417839, 0.03169780969619751, 0.017567461356520653, 0.0009147989912889898, -0.059443771839141846, 0.018580330535769463, -0.05001246929168701, -0.0020973440259695053, 0.02580324560403824, -0.019476966932415962, -0.022183485329151154, -0.02925696223974228, 0.06718142330646515, -0.03286011889576912, -0.004196763504296541, 0.02701536752283573, -0.003063512733206153, 0.0032150279730558395, -0.029605654999613762, 0.04177668318152428, -0.0043295989744365215, 0.014503948390483856, 0.002926526591181755, -0.0022768790367990732, -0.017119141295552254, -0.015309262089431286, -0.04592778533697128, 0.035168129950761795, 0.062366146594285965, 0.01751764863729477, 0.0717974528670311, 0.006185140926390886, -0.0021336660720407963, -0.0023287679068744183, -0.031050238758325577, 0.0242756400257349, 0.007430471479892731, -0.010145291686058044, 0.027745962142944336, -0.046691589057445526, -0.03666252642869949, 0.005620591342449188, 0.019144879654049873, -0.036330439150333405, 0.015965135768055916, -0.015774184837937355, 0.0003881279844790697, 0.008144460618495941, -0.02532171830534935, -0.046193454414606094, 0.009373187087476254, 0.008559570647776127, -0.005334165412932634, -0.026915742084383965, 0.01163138635456562, -0.02757991850376129, -0.07963472604751587, -0.021735167130827904, 0.015226240269839764, 0.029921138659119606, -0.015350772999227047, -0.006841015070676804, 0.008181820623576641, 0.016081366688013077, -0.03259444981813431, -0.05625572428107262, 0.013217106461524963, 0.029090918600559235, -0.002953508635982871, 0.00322540570050478, 0.01042756624519825, 0.02070569433271885, -0.021519308909773827, 0.021768376231193542, 0.0198090560734272, 0.027447082102298737, 0.03041927143931389, -0.021054387092590332, 0.054794538766145706, -0.03466999903321266, -0.059144891798496246, -0.027031973004341125, -0.02836032398045063, -0.007932755164802074, -0.013590705581009388, 0.06419263035058975, 0.02180158533155918, -0.024823585525155067, -0.051374029368162155, 0.01138231996446848, -0.007887092418968678, -0.04552927985787392, -0.01766708679497242, 0.004391865339130163, -0.01084267720580101, -0.09192199259996414, -0.03819013386964798, -0.013399755582213402, -0.061834804713726044, 0.01834786869585514, -0.041710264980793, -0.008866752497851849, -0.00999585259705782, -0.042075563222169876, -0.01148194633424282, -8.464355050818995e-05, -0.0017932758200913668, 0.0017071404727175832, 0.011066836304962635, -0.0021855549421161413, -0.0024927363265305758, -0.014396019279956818, 0.012038193643093109, 0.05871317908167839, 0.044732268899679184, 0.009439604356884956, -0.04536323621869087, -0.02374430000782013, -0.05157328397035599, -0.029954347759485245, 0.0063553364016115665, -0.01063512172549963, 0.010369451716542244, -0.0494479201734066, 0.009838109835982323, -0.06186801567673683, -0.0063304295763373375, 0.040315497666597366, -0.04951433837413788, 0.02671648934483528, -0.028161071240901947, 0.04307182878255844, 0.022482365369796753, 0.016039855778217316, 0.018298054113984108, 0.009813203476369381, 0.026284774765372276, -0.021369870752096176, -0.03249482065439224, -0.047023676335811615, 0.00036892914795316756, -0.034836042672395706, -0.04366958513855934, 0.03609797731041908, 0.014753014780580997, 0.00905770342797041, -0.0018026158213615417, -0.007077627815306187, 0.026251565665006638, 0.027696147561073303, -0.007870487868785858, -0.003347863210365176, 0.013673728331923485, -0.014852641150355339, -0.0317310206592083, 0.01710253767669201, 0.03593193367123604, -0.04449980705976486, 0.029024500399827957, 0.006255709566175938, 0.005657951347529888, 0.03493566811084747, 0.02937319315969944, -0.009572439827024937, 0.06920716166496277, 0.012909925542771816, 0.013831470161676407, 0.016795355826616287, 0.011921962723135948, 0.046193454414606094, 0.022648409008979797, 0.04901620373129845, 0.016371943056583405, 0.016413453966379166, 0.0259194765239954, 0.016081366688013077, 0.024707354605197906, 0.008567873388528824, 0.006782899610698223, 0.011888754554092884, 0.0064093004912137985, -0.019078461453318596, -0.021369870752096176, 0.004690744448453188, 0.011988380923867226, 0.003167290473356843, 0.002748029073700309, -0.008625988848507404, -0.0043835630640387535, -0.002777086803689599, 0.04014945402741432, 0.02303031086921692, -0.046459127217531204, -0.008700708858668804, 0.01230386458337307, 0.025089256465435028, 0.02303031086921692, -0.018995439633727074, -0.048783741891384125, 0.054860956966876984, -0.031050238758325577, -0.011797429993748665, -0.04984642565250397, 0.015774184837937355, 0.046127039939165115, 0.017866339534521103, 0.030601918697357178, -0.00021897059923503548, -0.000691158405970782, -0.05296805500984192, -0.05871317908167839, 0.034304700791835785, -0.006400998216122389, 0.031116655096411705, -0.026550443843007088, -0.0034433386754244566, 0.007608968764543533, -0.022748036310076714, 0.02243255265057087, -0.005068494938313961, 0.010311336256563663, -0.005255294498056173, 0.003212952520698309, 0.049281876534223557, -0.005155668128281832, 0.01740141771733761, -0.02213367260992527, -0.03372354805469513, 0.009165631607174873, -0.04028228670358658, -0.028974687680602074, 0.009165631607174873, -0.012735579162836075, -0.012785391882061958, 0.0010050854180008173, 0.014802827499806881, 0.02502283826470375, -0.00415525259450078, 0.01662101037800312, 0.01142383087426424, 0.021618936210870743, -0.005803239531815052, -0.0033810720779001713, -0.01483603660017252, 0.017268581315875053, -0.03646327555179596, 0.01382316742092371, 0.03023662231862545, 0.02347862906754017, 0.03510171175003052, 0.022814452648162842, -0.019676219671964645, -0.03712745010852814, 0.0160149484872818, -0.05877959728240967, 0.009539230726659298, 0.01315068919211626, 0.033075977116823196, 0.0018877133261412382, 0.009489418007433414, -0.04250727966427803, 0.026384400203824043, -0.002411789959296584, -0.04689083993434906, 0.019908681511878967, 0.039518486708402634, 0.018879208713769913, 0.021286847069859505, 0.003686178009957075, -0.00662100687623024, -0.012934831902384758, 0.014122046530246735, 0.025753432884812355, -0.04632629081606865, 0.0064881714060902596, 0.0078082215040922165, -0.0035388139076530933, -0.037227075546979904, 0.006803655065596104, -0.015375679358839989, 0.056521397083997726, 0.006313825026154518, -0.0032025747932493687, 0.004470736254006624, 0.028194280341267586, -0.04861769825220108, 0.01369033195078373, 0.004860939923673868, 0.00038579298416152596, -0.020091330632567406, -0.002758406801149249, 0.020174352452158928, 0.03623081371188164, -0.029306774958968163, -0.005006228107959032, 0.00890826340764761, 0.006629308685660362, 0.014728107489645481, -0.03666252642869949, 0.03732670471072197, -0.02317975088953972, 0.012146122753620148, 0.0012826903257519007, 0.002318390179425478, -0.001099004060961306, 0.0008468246669508517, 0.00581569317728281, 0.013532590121030807, -0.014885849319398403, 0.03443753719329834, -0.005159819032996893, 0.0010445208754390478, 0.021403077989816666, -0.003702782327309251, 0.00988792348653078, -0.014337903819978237, 0.00825238972902298, -0.0024138654116541147, 0.009223747067153454, 0.04572853446006775, -0.03279370069503784, 0.002731424756348133, 0.013515986502170563, 0.026168543845415115, 0.003787880064919591, 0.005363223142921925, 0.02975509501993656, 0.004283936694264412, 0.012536326423287392, -0.017982570454478264, -0.006990454625338316, -0.0164632685482502, -0.025687014684081078, -0.016903284937143326, -0.004690744448453188, -0.023810718208551407, 0.02347862906754017, 0.02570362016558647, 0.007824826054275036, -0.026533840224146843, -0.0031776682008057833, 0.009896225295960903, -0.04197593778371811, -0.023843925446271896, -0.02412620186805725, 0.014454134739935398, 0.004333749879151583, 0.013673728331923485, -0.037193868309259415, 0.021934419870376587, -0.0048692417331039906, 0.025388136506080627, 0.02490660920739174, -0.001882524462416768, 0.009663764387369156, -0.051971789449453354, 0.013416360132396221, -0.010660028085112572, -0.0001076691914931871, -0.005080948118120432, 0.025338323786854744, -0.009746786206960678, -0.0390203520655632, 0.02836032398045063, 0.03144874423742294, -0.02817767672240734, 0.03453716263175011, -0.0315815806388855, 0.03229556977748871, 0.008625988848507404, -0.01957659423351288, -0.007467831484973431, -0.0023993365466594696, 0.03530096635222435, 0.005981737282127142, 0.01555002573877573, 0.015076800249516964, 0.018447494134306908, -0.001191366114653647, 0.014404322020709515, 0.03256123885512352, 0.020805319771170616, 0.0011986305471509695, -0.024292245507240295, -0.023362398147583008, 0.04689083993434906, 0.013582403771579266, 0.0024325454141944647, 0.021585727110505104, 0.018364472314715385, 0.0017631803639233112, -0.03755916655063629, 0.014711502939462662, 0.009074307978153229, 0.05721878260374069, 0.02239934355020523, 0.03433791175484657, 0.021917816251516342, -0.0333748534321785, -0.02314654178917408, 0.030369456857442856, -0.033590711653232574, 0.03676215559244156, -0.005110005848109722, 0.01065172627568245, -0.014786222949624062, -0.01155666634440422, 0.0297883041203022, -0.008455793373286724, 0.027031973004341125, -0.015350772999227047, -0.0019997931085526943, 0.03646327555179596, -0.01838107779622078, -0.03375675529241562, 0.0007669159676879644, 0.00017253015539608896, 0.009506022557616234, -0.009838109835982323, -0.044134508818387985, -0.007530097849667072, -0.016272317618131638, -0.002243670402094722, -0.02543794922530651, -0.042972203344106674, -0.016828564926981926, -0.022449156269431114, 0.014885849319398403, -0.02434205822646618, 0.020024912431836128, -0.013316732831299305, -0.038920726627111435, -0.01403072290122509, -0.026948949322104454, 0.015740975737571716, 0.021021177992224693, 0.024956421926617622, 0.0006387507310137153, -0.011465341784060001, -0.028526369482278824, -0.011664594523608685, -0.0005105854943394661, 0.036330439150333405, -0.027895402163267136, 0.018580330535769463, -0.006400998216122389, 0.007019512355327606, 0.03523454815149307, -0.01894562691450119, 0.026201751083135605, 0.008899961598217487, -0.04144459590315819, -0.032278966158628464, -0.010352847166359425, 0.00409921258687973, 0.016073064878582954, -0.023129936307668686, 0.00080894585698843, 0.017351603135466576, -0.007077627815306187, 0.018762977793812752, 0.011199671775102615, 0.04775426909327507, -0.009555835276842117, 0.01942715421319008, 0.011780825443565845, 0.012038193643093109, 0.0488501600921154, 0.020323792472481728, 0.03410544991493225, 0.030336249619722366, -0.006097967736423016, -0.01632213033735752, 0.015151520259678364, 0.007405564654618502, 0.033408064395189285, 0.005491907242685556, 0.004215443506836891, 0.04048154130578041, 0.025089256465435028, 0.00370900915004313, -0.027281038463115692, 0.021851398050785065, -0.01215442456305027, -0.009597346186637878, -0.0009682443924248219, -0.010012456215918064, -0.02010793425142765, 0.007999172434210777, -0.008526362478733063, -0.0420091450214386, -0.01572437211871147, 0.02127024345099926, -0.013408057391643524, 0.040049824863672256, -0.0007845581858418882, -0.00664176233112812, 0.016679124906659126, 0.041710264980793, -2.372289600316435e-05, -0.005114156752824783, 0.02141968347132206, -0.005450396332889795, 0.008941472508013248, -0.014694899320602417, 0.037160661071538925, 0.019792450591921806, -0.004520549438893795, -0.03437111899256706, -0.02633458748459816, -0.015674559399485588, 0.023096727207303047, 0.006986303720623255, 0.0390203520655632, 0.04167705774307251, 0.0033022011630237103, -0.020174352452158928, 0.025902872905135155, -0.011955171823501587, 0.03447074443101883, -0.012179331853985786, -0.004665838088840246, -0.01725197769701481, -0.03453716263175011, 0.026417609304189682, -0.0018254468450322747, 0.024557916447520256, -0.0196596160531044, 0.033408064395189285, -0.013698634691536427, -0.04330429062247276, 0.03068494237959385, -0.0057824840769171715, -0.04114571586251259, -0.020091330632567406, -0.003495227312669158, -0.0294894240796566, -0.013756750151515007, -0.01069323718547821, 0.016239108517766, -0.03915318846702576, -0.00565379997715354, -0.018729768693447113, -0.01643005944788456, -0.02123703435063362, -0.027281038463115692, -0.022565387189388275, 0.010834374465048313, 0.0184640996158123, -0.006886677350848913, -0.015749279409646988, -0.0131091782823205, -0.01763387955725193, 0.020423417910933495, 0.0002755293680820614, -0.005732670892030001, -0.0032108768355101347, -0.04244086146354675, 0.034902460873126984, 0.07080118358135223, 0.012818600982427597, 0.003134081605821848, 0.03332504257559776, -0.006434207316488028, 0.04951433837413788, -0.018430890515446663, -0.02895808406174183, 0.025637201964855194, -0.023379003629088402, -0.03390619531273842, -0.005907017271965742, -0.013698634691536427, -0.005965132731944323, 0.005890412721782923, 0.017866339534521103, 0.004391865339130163, -0.023096727207303047, 0.003922790754586458, -0.0013989211292937398, 0.02198423258960247, -0.021934419870376587, 0.0023287679068744183, -0.010344544425606728, -0.03276049345731735, 0.017052724957466125, -0.009273560717701912, 0.007413866929709911, 0.016870075836777687, -0.07378997653722763, -0.03375675529241562, 0.04337070882320404, 0.01057700626552105, 0.02764633484184742, -0.004487340804189444, -0.034869249910116196, -0.020655879750847816, 0.012071402743458748, -0.03312578797340393, -0.010153594426810741, -0.02389374002814293, 0.02543794922530651, -0.026218356564641, -0.0315815806388855, 0.019759243354201317, 0.0005863430560566485, 0.042972203344106674, -0.01808219775557518, -0.027065180242061615, 0.021519308909773827, 0.018630143254995346, -0.0065255314111709595, 0.002685762709006667, 0.026550443843007088, -0.030850986018776894, -0.009398093447089195, -0.03395600989460945, -0.021934419870376587, -0.016064763069152832, 0.03729349374771118, -0.013731843791902065, 0.008767126128077507, 0.04433376342058182, 0.0006397885154001415, -0.031017029657959938, 0.030253227800130844, 0.06200085207819939, 0.017451230436563492, 0.009738483466207981, 0.05300126224756241, 0.024242432788014412, -0.0021160240285098553, -0.012561232782900333, -0.025670411065220833, 0.02088834159076214, -0.028974687680602074, 0.01462848111987114, 0.004782069008797407, -0.04858449101448059, -0.0018420512787997723, 0.00658364687114954, -0.02513906918466091, 0.02513906918466091, 0.018430890515446663, -0.01909506693482399, 0.0006626195390708745, -0.018580330535769463, -0.051639702171087265, 0.04433376342058182, 0.023063519969582558, -0.014578668400645256, -0.02535492740571499, -0.01382316742092371, -0.017999175935983658, -0.015234542079269886, -0.008119554258883, -0.033889591693878174, -0.01237858459353447, 0.0208551324903965, 0.0163138285279274, 0.03795767202973366, -0.014180161990225315, -0.004823579918593168, 0.028675807639956474, -0.029655467718839645, 0.0060190968215465546, -0.012129518203437328, 0.01942715421319008, 0.027928609400987625, -0.02809465490281582, -0.013773354701697826, -0.018729768693447113, 0.016264015808701515, 0.08023248612880707, -0.0021398926619440317, -0.020539648830890656, -0.014246580190956593, -0.019144879654049873, -0.0184640996158123, 0.010643423534929752, 0.00834786519408226, -0.012611046433448792, 0.027031973004341125, -0.0016064762603491545, -0.014180161990225315, -0.008040683344006538, 0.01613117940723896, 0.003069739555940032, 0.01867995597422123, 0.014288091100752354, -0.02445828914642334, 0.01632213033735752, 0.031183073297142982, 0.018696561455726624, 0.014288091100752354, 0.0011975927045568824, -0.048451654613018036, 0.019609803333878517, -0.02183479256927967, -0.015342471189796925, 0.03968453034758568, 0.014180161990225315, -0.029605654999613762, -0.0032938988879323006, -0.03493566811084747, 0.011149858124554157, 0.027148203924298286, 0.0017133670626208186, -0.007243671920150518, 0.01665421947836876, 0.024890003725886345, 0.005342467688024044, 0.04835202917456627, -0.013798261061310768, -0.013740145601332188, -0.0003471358504611999, 0.003156912513077259, 0.025238696485757828, 0.004404318518936634, 0.004474887158721685, 0.0028393534012138844, 0.01294313371181488, 0.012627650052309036, -0.00902449432760477, -0.008709010668098927, 0.020273979753255844, 0.031166469678282738, 0.01170610636472702, -0.009215445257723331, -0.019161483272910118, 0.004640931263566017, 0.014188464730978012, 0.004219594411551952, -0.005085099022835493, -0.023129936307668686, -0.02269822172820568, 0.02738066390156746, 0.027629731222987175, 0.002712744753807783, 0.0015784562565386295, -0.0036882536951452494, 0.02063927613198757, -0.026052312925457954, -0.02314654178917408, -0.010967209935188293, 0.031050238758325577, -0.02985472045838833, -0.012204238213598728, 0.03503529727458954, 0.001516189775429666, 0.024557916447520256, 0.029090918600559235, -0.036894988268613815, 0.013515986502170563, 0.022266507148742676, -0.03450395539402962, 0.02213367260992527, -0.01395600289106369, -0.005657951347529888, -0.013706936500966549, -0.0017445003613829613, -0.014769618399441242, 0.023843925446271896, -0.00810294970870018, -0.022150276228785515, 0.033441271632909775, -0.01811540685594082, -0.017285186797380447, -0.003916563931852579, 0.02666667476296425, -0.027114994823932648, -0.008526362478733063, 0.014254882000386715, -0.00033027201425284147, 0.010593610815703869, -0.02445828914642334, -0.01838107779622078, 0.006836864165961742, -2.6949728635372594e-05, 0.014968871138989925, 0.0017403492238372564, 0.03789125382900238, 0.0022914079017937183, 0.03315899893641472, -0.025637201964855194, 0.01217102911323309, 0.011390621773898602, 0.01942715421319008, 0.010585308074951172, -0.004449980799108744, -0.014354508370161057, -0.01564965210855007, -0.003322956617921591, -0.006849317345768213, -0.0027895402163267136, -0.0022229147143661976, -0.0033914498053491116, -0.0029327531810849905, 0.015674559399485588, 0.010676632635295391, -0.05170612037181854, 0.022714827209711075, 0.02806144580245018, 0.03523454815149307, -0.05001246929168701, -0.007787466049194336, -0.027397269383072853, -0.015392283909022808, -0.006006643641740084, -0.031083447858691216, 0.04190951958298683, -0.007393111474812031, 0.0046326289884746075, -0.004296389874070883, -0.02967207320034504, -0.019892077893018723, 0.02314654178917408, 0.006924036890268326, 0.010925699025392532, 0.026650071144104004, 0.0008260691538453102, -0.027696147561073303, 0.025936082005500793, -0.028841853141784668, -0.006176838651299477, -0.010610215365886688, 0.006733086425811052, -0.006264011841267347, -0.02224990352988243, -0.04048154130578041, -0.0028642599936574697, 0.007841430604457855, 0.002721047028899193, 0.014919058419764042, -0.03231217339634895, 0.008899961598217487, -0.019078461453318596, 0.018015779554843903, 0.007061023265123367, 0.011041929945349693, 0.01335824467241764, -0.00567455543205142, 0.016969703137874603, 0.028260698541998863, 0.019294319674372673, 0.021037781611084938, -0.004138648044317961, -0.014371112920343876, 0.011797429993748665, -0.002488585188984871, -0.0048401840031147, 0.029804907739162445, 0.01984226517379284, 0.013366546481847763, 0.019892077893018723, -0.008642593398690224, -0.015201332978904247, 0.04370279610157013, 0.0065794955007731915, -0.007567457854747772, 0.00481942854821682, 0.0015193030703812838, -0.028974687680602074, 0.003022001823410392, -0.02749689482152462, -0.007936906069517136, -0.03360731527209282, 0.005936075001955032, 0.013142387382686138, -0.03437111899256706, -0.027729356661438942, -0.012071402743458748, 0.003588627092540264, 0.00923204980790615, -0.022565387189388275, 0.03050229325890541, 0.03765879198908806, -0.03819013386964798, 0.02678290568292141, -0.0211540125310421, -0.019892077893018723, 0.0019997931085526943, 0.03732670471072197, -0.038920726627111435, -0.0213034525513649, 0.03347448259592056, 0.022532178089022636, -0.03828975930809975, 0.027131598442792892, 0.0022602747194468975, 0.016222504898905754, -0.011324204504489899, -0.027662940323352814, 0.01849730685353279, -0.006201745476573706, 0.002781237941235304, 0.009032797068357468, -0.02386053092777729, -0.015018684789538383, 0.0007404527277685702, 0.008592779748141766, -0.05150686576962471, 0.014678294770419598, -0.031199678778648376, -0.007546702399849892, -0.019344132393598557, -0.03387298807501793, -0.025687014684081078, -0.042706530541181564, -0.013989211991429329, 0.026948949322104454, 0.011581572704017162, -0.01688668131828308, 0.013308431021869183, -0.0476546436548233, -0.008011626079678535, 0.039784155786037445, -0.019045252352952957, 0.04536323621869087, -0.009464510716497898, -0.019792450591921806, -0.008298051543533802, -0.005753426346927881, -0.002833126811310649, -0.017434624955058098, 0.02183479256927967, -0.011789128184318542, 0.03739312291145325, 0.0065794955007731915, 0.006334580946713686, -0.006185140926390886, -0.005620591342449188, 0.01221254002302885, -0.01455376110970974, 0.0007155460771173239, 0.01755085587501526, 0.010195105336606503, 0.02311333268880844, 0.030585315078496933, -0.05207141488790512, 0.018065594136714935, -0.004682442173361778, -0.01628061942756176, 0.005201329942792654, 0.013391452841460705, 0.01864674687385559, 0.023163145408034325, -0.0036550448276102543, -0.024524707347154617, 0.009605648927390575, 0.0010284354211762547, 0.012611046433448792, 0.011490249074995518, -0.006791201885789633, 0.01330012921243906, 0.027480291202664375, 0.0033997520804405212, 0.0057036131620407104, -0.023345794528722763, 0.01491075661033392, 0.0027750113513320684, -0.013233711011707783, 0.004321296699345112, 0.023545047268271446, 0.018065594136714935, 0.030884195119142532, -0.025222092866897583, -0.005707764532417059, 0.025554180145263672, 0.004223745781928301, 0.03076796419918537, -0.011124951764941216, 0.0044375271536409855, -0.024690750986337662, -0.018148615956306458, 0.02836032398045063, -0.0044997939839959145, -0.009406396187841892, -0.01864674687385559, 0.014562063850462437, -0.026234960183501244, 0.019012045115232468, 0.022648409008979797, -0.03334164619445801, -0.0020246997009962797, -0.02787879668176174, 0.033408064395189285, 0.040614377707242966, -0.025537576526403427, -0.013200502842664719, -0.04131175950169563, 0.0130344582721591, 0.020539648830890656, 0.01628061942756176, -0.015599839389324188, -0.028792038559913635, -0.0002047011803369969, 0.026998763903975487, -0.005931924097239971, -0.0017683692276477814, -0.002351599046960473, -0.019875474274158478, -0.012112913653254509, 0.02344541996717453, -0.009373187087476254, 0.012021590024232864, 0.02791200578212738, 0.002592362929135561, 0.0008411169401369989, -0.030884195119142532, 0.027629731222987175, 0.004161478951573372, 0.009647159837186337, 0.014354508370161057, 0.0057036131620407104, -0.0193607360124588, 0.016720635816454887, -0.026019103825092316, -0.01330012921243906, -0.01228726003319025, 0.00017914596537593752, 0.00745537830516696, 0.005761728622019291, 0.0019219599198549986, -0.028144467622041702, 0.009256956167519093, -0.0034329609479755163, 0.008356167003512383, -0.012353677302598953, -0.015143217518925667, 0.0037152357399463654, -0.018165219575166702, -0.033706944435834885, 0.05230387672781944, 0.010792863555252552, -0.016064763069152832, -0.019028648734092712, -0.029605654999613762, 0.03065173327922821, 0.033889591693878174, -0.018962230533361435, 0.021403077989816666, -0.005491907242685556, -0.02037360519170761, 0.044134508818387985, -0.013466172851622105, 0.028293907642364502, -0.02955584228038788, -0.014279788359999657, -0.005159819032996893, -0.03563305363059044, -0.011000419035553932, -0.027845587581396103, 0.0323287770152092, 0.0011674972483888268, 0.005163969937711954, 0.017085934057831764, 0.007721048779785633, -0.006982152350246906, 0.03559984639286995, 0.030402665957808495, 0.01841428503394127, -0.012536326423287392, 0.011747617274522781, 0.011747617274522781, 0.03672894462943077, -0.009647159837186337, -0.004740557633340359, -0.012029891833662987, 0.015043591149151325, -0.006982152350246906, 0.015965135768055916, -0.00412619486451149, 0.01669573038816452, -0.01687837764620781, 0.019559990614652634, 0.04373600333929062, 0.0008027192088775337, -0.003885430982336402, -0.0041531771421432495, -0.01912827603518963, -0.052204251289367676, 0.009290165267884731, -0.015035289339721203, -0.0026359492912888527, -0.021286847069859505, 0.03735991194844246, 0.022797849029302597, 0.007783315144479275, -0.0017268582014366984, -0.004420923069119453, 0.006903281435370445, 0.010311336256563663, -0.03124949149787426, -0.0018576178699731827, -0.02153591439127922, 0.030934007838368416, 0.009954340755939484, -0.002683687023818493, -0.01170610636472702, 0.003659195965155959, 0.0011332506546750665, 0.015657953917980194, 0.0031403081957250834, -0.03556663542985916, -0.03146534785628319, -0.007251974195241928, -0.008875054307281971, -0.0009454133687540889, 0.022498968988656998, -0.029688676819205284, 0.018364472314715385, -0.016338735818862915, -0.00121938600204885, 0.02716480754315853, -0.02562059834599495, -0.029506029561161995, 0.0078082215040922165, -0.0026546292938292027, 0.03496887907385826, -0.023910343647003174, -0.03231217339634895, -0.01369033195078373, -0.0016500628553330898, 0.010161896236240864, 0.01677045039832592, -0.018746374174952507, 0.012677463702857494, -0.008659197948873043, -0.006168536841869354, -0.03423828259110451, 0.007941056974232197, 0.0074802846647799015, -0.01076795719563961, 0.02580324560403824, 0.0058447509072721004, -0.036894988268613815, 0.009514324367046356, -0.010593610815703869, 0.0247239600867033, 0.031564973294734955, 0.0097550880163908, -0.030967216938734055, -0.004769615363329649, 0.004404318518936634, -0.0080074742436409, -0.013657123781740665, 0.010992116294801235, 0.015018684789538383, -0.019227901473641396, -0.015184728428721428, 0.022382738068699837, 0.03995019942522049, -0.02382732182741165, -0.0018814867362380028, -0.0294894240796566, -0.014919058419764042, 0.01909506693482399, -0.03443753719329834, -0.008858450688421726, 0.004616024903953075, -0.002949357498437166, 0.017351603135466576, 0.0016801583115011454, -0.011897056363523006, -0.044400181621313095, -0.021037781611084938, 0.004777917638421059, 0.030220018699765205, -0.015051893889904022, 0.033590711653232574, -0.0006377129466272891, 0.009630555287003517, -0.016853472217917442, 0.008742219768464565, -0.010975511744618416, -0.026683280244469643, -0.003802408929914236, -0.020357001572847366, 0.009182236157357693, -0.021170616149902344, 0.008472397923469543, 0.03619760274887085, -0.016554592177271843, 0.00013225150178186595, -0.01969282515347004, -0.010917396284639835, -0.018779583275318146, 0.0015597763704136014, -0.03407223895192146], "index": 45}, {"title": "Northern Light Group", "text": "Northern Light Group, LLC is a company specializing in strategic research portals, enterprise search technology, and text analytics solutions. The company provides custom, hosted, turnkey solutions for its clients using the software as a service (SaaS) delivery model. Northern Light markets its strategic research portals under the tradename SinglePoint.", "vector": [0.014532499946653843, -0.01595800556242466, -0.024147484451532364, -0.034728750586509705, 0.01582406461238861, -0.022119248285889626, 0.009681954979896545, 0.02110513113439083, -0.029715565964579582, 0.04048817604780197, 0.014551633968949318, 0.018923820927739143, -0.034422602504491806, -0.013690590858459473, -0.006343020126223564, 0.005783341825008392, -0.06394682824611664, -0.00963411945849657, -0.020856386050581932, -0.0009387765312567353, 0.016895584762096405, -0.06356413662433624, 0.013604486361145973, 0.04951956495642662, 0.015230901539325714, 0.006744840182363987, 0.007247115485370159, -0.0026213990058749914, -0.0705672949552536, 0.006175594870001078, 0.025199871510267258, 0.008825695142149925, 0.049022071063518524, 0.0353601835668087, -0.029084132984280586, -0.07714949548244476, 0.02301856130361557, -0.03007911704480648, -0.009629336185753345, -0.00965803675353527, -0.014580335468053818, -0.0022291457280516624, -0.02508506551384926, 0.023937007412314415, 0.014790812507271767, -0.0353601835668087, 0.005419790279120207, -0.038306865841150284, 0.0016718592960387468, -0.022463666275143623, 0.014790812507271767, -0.00440806383267045, -0.030385266989469528, -0.020091013982892036, 0.04641980677843094, 0.00011615116818575189, 0.00877785962074995, 0.10026372224092484, 0.008041189052164555, 0.015393543057143688, -0.01236075721681118, -0.0025974810123443604, 0.023649992421269417, -0.028892790898680687, 0.026137452572584152, 0.03400164842605591, -0.013681023381650448, -0.026213988661766052, 0.020473700016736984, -0.004123441409319639, -0.01578579656779766, -0.008155995048582554, 0.013059158809483051, 0.01947871595621109, 0.02313336730003357, -0.012178980745375156, -0.013862798921763897, -0.006357370875775814, 0.004807492718100548, -0.03359982743859291, 0.08595126867294312, -0.007419324479997158, 0.007223197724670172, -0.013834097422659397, 0.027285510674118996, -0.02110513113439083, -0.04978744313120842, -0.09582456946372986, -0.016426796093583107, 0.010179447010159492, 0.019115164875984192, 0.012265085242688656, -0.026003511622548103, 0.003073446685448289, 0.04106220602989197, 0.03834513574838638, 0.04978744313120842, 0.005587215069681406, -0.016388526186347008, 0.01314526330679655, -0.005845528095960617, 0.003161942819133401, -0.005276282783597708, -0.03679525479674339, -0.00883047841489315, 0.021717429161071777, 0.04833323881030083, 0.022291457280516624, -0.006873996928334236, 0.059507668018341064, 0.023764798417687416, -0.014637738466262817, 0.00803162157535553, -0.010830013081431389, 0.023764798417687416, 0.034346066415309906, -0.01242772676050663, -0.011662354692816734, -0.0004708831256721169, -0.009485828690230846, 0.004195195157080889, 0.008983553387224674, -0.027055898681282997, -0.02294202335178852, -0.020588506013154984, -0.018177583813667297, 0.008261233568191528, 0.008313852362334728, 0.014628170989453793, 0.04431503638625145, -0.018837716430425644, 0.018799448385834694, 0.024338828399777412, -0.025180736556649208, -0.016551168635487556, 0.031035833060741425, 0.0008072282071225345, -0.006792676169425249, 1.5200929738057312e-05, -0.009988103993237019, -0.005529812071472406, -0.007213630713522434, -0.05005532503128052, -0.057670775800943375, -0.05131818726658821, -0.04293736442923546, -0.018349792808294296, 0.04289909824728966, -0.05082069709897041, -0.045463092625141144, -0.018244553357362747, 0.04898380488157272, 0.0013154830085113645, 0.027113301679491997, 0.0006667107227258384, -0.008672621101140976, -0.009586283937096596, -0.003415472339838743, -0.024128351360559464, 0.006089490372687578, 0.0088735306635499, 0.015383975580334663, -0.0072518992237746716, -0.006773541681468487, 0.01622588559985161, 0.025659093633294106, -0.007275816984474659, -0.018330657854676247, -0.06004342809319496, 0.03903396800160408, 0.019019491970539093, 0.04465945437550545, -0.014733409509062767, -0.030825354158878326, -0.031074101105332375, -0.012121577747166157, -0.002189681399613619, 0.00984459649771452, 0.022616740316152573, -0.016331123188138008, -6.974489224376157e-06, 0.016579870134592056, -0.01413067989051342, -0.026960225775837898, -0.03884262591600418, -0.021832235157489777, 0.11289235949516296, 0.06440605223178864, 0.03180120512843132, 0.029218073934316635, -0.03863214701414108, -0.028835387900471687, 0.03696746379137039, -0.006830944679677486, -0.003944057505577803, 0.02835703082382679, 0.0067544071935117245, -0.020550236105918884, 0.0029012379236519337, -0.04270775616168976, 0.04232506826519966, 0.014685573987662792, -0.0032719650771468878, 0.03243263438344002, -0.02663494274020195, -0.0064626093953847885, -0.017086928710341454, -0.002750555519014597, -0.039646267890930176, 0.00048613076796755195, 0.021602623164653778, -0.03384857252240181, -0.029658162966370583, 0.024281425401568413, -0.010284685529768467, 0.0002152608649339527, -0.03249003738164902, -0.038134656846523285, 0.01151884812861681, 0.021832235157489777, -0.0264627356082201, 0.03941665589809418, 0.06918962299823761, -0.002242300659418106, -0.012494697235524654, 0.0016192400362342596, -0.030806221067905426, 0.027610793709754944, 0.027668194845318794, -0.00705098919570446, -0.029122402891516685, -0.020837251096963882, 0.03757976368069649, 0.023401247337460518, -0.03861301392316818, 0.0006553497514687479, 0.033140603452920914, -0.050629355013370514, -0.00974892545491457, -0.020856386050581932, -0.027132434770464897, -0.03358069434762001, -0.024281425401568413, 0.03172466531395912, 0.020550236105918884, -0.10370789468288422, 0.019880536943674088, -0.017306972295045853, -0.004362619947642088, 0.03763716667890549, -0.018665507435798645, 0.00895006861537695, 0.026481868699193, -0.02498939447104931, 0.01059083454310894, -0.001238945871591568, 0.03867041692137718, 0.027151569724082947, 0.015470080077648163, 0.0009100750903598964, -0.002025843830779195, 0.005032320506870747, 0.04469772055745125, 0.047108642756938934, -0.09942181408405304, -0.02135387808084488, -0.013948903419077396, -0.009997670538723469, 0.022291457280516624, 0.012351189740002155, -0.0029179805424064398, -0.06295184046030045, 0.008691755123436451, 0.04289909824728966, -0.0351114384829998, 0.040067221969366074, 0.027955209836363792, -0.02150695212185383, 0.0036259496118873358, 0.010801311582326889, 0.011853697709739208, -0.046725958585739136, 0.03960799798369408, -0.052466247230768204, 0.006347803398966789, 0.018875986337661743, -0.025142468512058258, -0.03872781991958618, 0.007419324479997158, -0.0013142871903255582, -0.03132284805178642, 0.04569270461797714, 0.025582557544112206, 0.005472409538924694, 0.016417227685451508, -0.01497258897870779, 0.04087086021900177, 0.015575318597257137, -0.01770879328250885, 0.031361114233732224, 0.0351114384829998, 0.0057546403259038925, -0.09130886942148209, -0.004553962964564562, 0.012753009796142578, 0.050629355013370514, -0.0019493066938593984, 0.07691988348960876, -0.04194238409399986, -0.0178618673235178, -0.0026596675161272287, -0.023956142365932465, -0.00286057754419744, -0.04446810856461525, -0.010552565567195415, 0.01952655240893364, 0.03930184990167618, 0.019823133945465088, 0.03859388083219528, -0.0076202345080673695, 0.05663752555847168, 0.0007749390788376331, -0.04906034097075462, 0.055642541497945786, 0.0006912265089340508, -0.01410197839140892, 0.004946216009557247, 0.0529254712164402, 0.01923953741788864, -0.043243516236543655, -0.015441378578543663, -0.01584319956600666, -0.005902931094169617, -0.008423875086009502, -0.012475562281906605, 0.0014147422043606639, -0.004759656731039286, 0.0019337600097060204, 0.021966174244880676, 0.003613990731537342, 0.025754766538739204, -0.04106220602989197, -0.0001599507813807577, -0.010284685529768467, 0.018742045387625694, -0.04431503638625145, -0.013700157403945923, 0.03352329134941101, 0.0527723953127861, 0.012781711295247078, 0.0011259338352829218, -0.0078020100481808186, 0.024090081453323364, 0.004106699023395777, 0.015144797042012215, 0.006534363143146038, -0.0087348073720932, -0.03742668777704239, 0.033140603452920914, 0.09130886942148209, -0.010973520576953888, -0.001518784905783832, -0.04198065027594566, -0.004329135175794363, -0.07244245707988739, 0.045156944543123245, 0.032738786190748215, 0.06697004288434982, 0.036240361630916595, 0.025314677506685257, -0.01151884812861681, 0.010782177560031414, -0.0696488469839096, 0.023496918380260468, 0.007596316747367382, 0.0357237346470356, 0.05196875333786011, 0.012006772682070732, -0.028777984902262688, 0.000656545627862215, 0.025716496631503105, 0.05135645717382431, 0.0022602390963584185, 0.00786419678479433, 0.038211192935705185, 0.010141178034245968, 0.037943314760923386, -0.00405168766155839, 0.048448044806718826, -0.018273254856467247, -0.015489215031266212, -0.006433907896280289, 0.02655840665102005, -0.014752544462680817, -0.00703663844615221, 0.010217715054750443, -0.03685265779495239, 0.020244088023900986, -0.0035350616089999676, -0.00786419678479433, 0.020244088023900986, -0.031303711235523224, -0.0009017038391903043, -0.022425398230552673, -0.06953404098749161, 0.0088496133685112, 0.0178714357316494, -0.020492833107709885, 0.003951232880353928, 0.014762111008167267, -0.023401247337460518, -0.06226300820708275, -0.028835387900471687, 0.006237781140953302, 0.03375290334224701, -0.03323627635836601, -0.004149750806391239, 0.014178515411913395, 0.03740755468606949, 0.002609439892694354, 0.029103267937898636, 0.003688136115670204, -0.018206285312771797, -0.020358894020318985, -0.05449448153376579, -0.0004499549977481365, 0.05901017785072327, -0.0348818264901638, 0.0714092031121254, -0.04768267273902893, 0.0066396016627550125, -0.00188712019007653, -0.01603454165160656, -0.02148781716823578, 0.025563422590494156, -0.010055073536932468, 0.03396337851881981, 0.06008169800043106, -0.034403469413518906, 0.002424076432362199, -0.055642541497945786, 0.050208400934934616, -0.03164812922477722, 0.019899670034646988, -0.03884262591600418, -0.0005629669176414609, -0.01932564191520214, -0.02097119204699993, 0.03784764185547829, -0.02454930543899536, -0.004455899819731712, -0.005816826596856117, 0.00790724903345108, -0.016292855143547058, 0.003267181571573019, 0.012112011201679707, 0.014618604443967342, -0.009452343918383121, 0.03321714326739311, 0.011317937634885311, -0.013614053837954998, 0.022195786237716675, 0.03335108235478401, -0.04768267273902893, -0.059431131929159164, -0.018818583339452744, -0.05828307196497917, -0.017096495255827904, 0.012733875773847103, 0.015470080077648163, -0.034422602504491806, -0.0002616017300169915, 0.04297563433647156, 0.023439515382051468, -0.006797459442168474, -0.020244088023900986, 0.025793034583330154, -0.01595800556242466, 0.00969152245670557, -0.003472875105217099, -0.013489680364727974, 0.027457717806100845, -0.02489372156560421, 0.04064125195145607, 0.022731546312570572, 0.012829546816647053, -0.01589103415608406, -0.012743443250656128, 0.04944302886724472, -0.006716138683259487, -0.00523801427334547, -0.009189247153699398, -0.0359342135488987, -0.0262905266135931, -0.02663494274020195, 0.029581625014543533, -0.04316697642207146, -0.012025906704366207, -0.020588506013154984, -0.012848681770265102, 0.02655840665102005, 0.04416196048259735, 0.05713501572608948, 0.020760713145136833, -0.03715880960226059, 0.04802709072828293, -0.019134297966957092, 0.032738786190748215, -0.01416894793510437, 0.012733875773847103, 0.043587930500507355, -0.008658270351588726, -0.05801519379019737, -0.0018345009302720428, 0.02301856130361557, 0.01968919299542904, -0.032509174197912216, -0.034518275409936905, 0.003582897363230586, -0.005376738030463457, 0.008509979583323002, -0.009567148983478546, -0.016465064138174057, 0.016340691596269608, 0.04289909824728966, 0.020378027111291885, 0.004714212846010923, 0.01147101167589426, 0.03241350129246712, 0.017086928710341454, -0.00751977926120162, 0.07443241775035858, 0.026941092684864998, 0.018866417929530144, -0.03023219108581543, 0.04251641035079956, 0.009949835017323494, -0.012619069777429104, 0.005228447262197733, -0.020033610984683037, -0.02320990338921547, -0.008026838302612305, -0.00016712614160496742, 0.026271391659975052, -0.032949261367321014, 0.04377927631139755, 0.0527723953127861, -0.007242332212626934, 0.014771678484976292, 0.01413067989051342, -0.016761645674705505, 0.018522001802921295, 0.020531103014945984, -0.018215851858258247, 0.02328644134104252, -0.007256682496517897, 0.01953611895442009, 0.005615916568785906, -0.013508814387023449, 0.02137301117181778, 0.0264053326100111, 0.01497258897870779, -0.006902698427438736, -0.005912498105317354, -0.026137452572584152, 0.0007157423533499241, 0.009614985436201096, 0.04309044033288956, -0.039531461894512177, -0.00010964849934680387, 0.03126544505357742, 0.010858714580535889, -0.020052744075655937, -0.01059083454310894, -0.038000717759132385, 0.005041887518018484, -0.004757265094667673, -0.013040024787187576, -0.030978430062532425, -0.008897448889911175, -0.008251666091382504, -0.032585710287094116, 0.009968969970941544, 0.05820653587579727, -0.047032106667757034, -0.012150279246270657, -0.0010589638259261847, 0.014676007442176342, 0.0016706634778529406, -0.024511035531759262, 0.0131835313513875, 0.0061086248606443405, 0.04389408230781555, -0.0037048785015940666, 0.003075838554650545, 0.05548946559429169, 0.011136162094771862, 0.04018202796578407, -0.004592231474816799, -0.013384441845119, -0.005563297308981419, 0.00153433158993721, 0.020741580054163933, 0.006213863380253315, 0.003260006196796894, 0.011136162094771862, 0.01965092495083809, 0.00286057754419744, 0.01933520846068859, -0.0024826752487570047, -0.028012612834572792, -0.02477891743183136, 0.030557474121451378, -0.00264053326100111, 0.004190411418676376, 0.01411154493689537, 0.01065780408680439, 0.040220294147729874, -0.03233696520328522, -0.010428193025290966, -0.004745305981487036, -0.04485079646110535, 0.005290633533149958, -0.002566387876868248, 0.026080049574375153, 0.009461910463869572, 0.022655010223388672, 0.018435897305607796, 0.0017196950502693653, 0.0022064237855374813, 0.013403575867414474, -0.012676472775638103, -0.03403991833329201, 0.03369550034403801, 0.008122509345412254, -0.020052744075655937, 0.013097427785396576, 0.02110513113439083, 0.014388992451131344, 0.04423849657177925, -0.006586982402950525, 0.007438458502292633, -0.006218647118657827, 0.04198065027594566, -0.005917281843721867, -0.05200702324509621, 0.013547083362936974, -0.008993119932711124, 0.059507668018341064, -0.013097427785396576, -0.022176651284098625, 0.04488906264305115, 0.04205719009041786, -0.0004224494332447648, 0.0053193350322544575, -0.016407661139965057, -0.016426796093583107, -0.0001765438064467162, 0.005434140563011169, 0.03403991833329201, 0.020569371059536934, 0.009380590170621872, -0.02655840665102005, -0.003341326955705881, 0.016455497592687607, -0.0009919938165694475, -0.012599935755133629, 0.03203081712126732, -0.02148781716823578, 0.0024826752487570047, -0.021985309198498726, 0.003169118193909526, 0.008476493880152702, -0.00619472935795784, -0.009040956385433674, -0.025295542553067207, 0.04263121634721756, -0.006845295429229736, -0.03417385742068291, 0.04259295016527176, -0.025639960542321205, -0.011872832663357258, 0.026271391659975052, -0.018694208934903145, -0.037905044853687286, 0.00526671577244997, 0.01143274363130331, -0.017115630209445953, -0.01503955852240324, -0.01607281155884266, 0.005132775753736496, -0.007567615248262882, 0.02131560817360878, -0.011337071657180786, 0.009710656479001045, -0.05013186112046242, -0.008395173586905003, 0.01929694041609764, -0.019009925425052643, -0.027821270748972893, -0.021947041153907776, -0.007161011453717947, 0.014991723001003265, -0.006170811131596565, -0.03671871870756149, 0.017316540703177452, -0.004790749866515398, 0.0007976610795594752, 0.010418625548481941, 0.031208040192723274, -0.013700157403945923, 0.0013011322589591146, 0.012006772682070732, 0.016283288598060608, -0.004310000687837601, -0.014149813912808895, 0.034613944590091705, 0.010801311582326889, -0.004046903923153877, 0.00266923476010561, 0.021564355120062828, 0.04890726879239082, -0.023726530373096466, -0.04588404670357704, -0.03206908330321312, -0.023898739367723465, 0.0019528943812474608, 0.01149014662951231, 0.0027601225301623344, 0.001563032972626388, 0.000700195727404207, -0.027763867750763893, 0.032719649374485016, 0.009423642419278622, 0.014063709415495396, -0.001039829570800066, -0.016426796093583107, 0.022329727187752724, 0.041368354111909866, -0.04381754249334335, 0.029696431010961533, 0.02475978247821331, 0.03025132603943348, -0.05457102134823799, -0.0046113659627735615, -0.002729029394686222, -0.0018560269381850958, 0.018483731895685196, 0.036240361630916595, -0.010552565567195415, -0.02146868221461773, -0.023401247337460518, -0.011145728640258312, -0.052274905145168304, -0.020511968061327934, -0.0030949728097766638, 0.010026372037827969, 0.004429589956998825, 0.010122044011950493, 0.01600584015250206, -0.01612064614892006, 0.011346639133989811, -0.030653147026896477, -0.0035278862342238426, 0.034767020493745804, -0.023382112383842468, -0.05529812350869179, -0.027323778718709946, -0.011183997616171837, 0.015393543057143688, 0.045042138546705246, -0.03141851723194122, 0.012064175680279732, -0.053078543394804, -0.0043937130831182, 0.00010479018237674609, 0.00667787017300725, 0.013097427785396576, -0.018234986811876297, -0.004886421374976635, -0.04921341687440872, 0.028012612834572792, 0.039722803980112076, -0.005979468114674091, 0.004343485925346613, -0.01415938138961792, 0.04749133065342903, 0.005419790279120207, 0.02807001583278179, -0.010705639608204365, 0.009337537921965122, 0.01576666161417961, -0.024051813408732414, 0.03419299051165581, 0.005147126503288746, 0.0026046563871204853, 0.06727619469165802, -0.013814963400363922, -0.015651855617761612, 0.0037933746352791786, 0.08266016840934753, -0.010102909989655018, -0.009696305729448795, -0.010303819552063942, -0.002227949909865856, -0.04978744313120842, -0.029371147975325584, -0.039990682154893875, -0.027304643765091896, 0.01957438699901104, 0.029505088925361633, 0.0030327863059937954, 0.013059158809483051, -0.005945983342826366, 0.032681383192539215, -0.0032791404519230127, -0.026156585663557053, 0.004329135175794363, -0.023898739367723465, -0.016847750172019005, -0.03327454626560211, 0.016560735180974007, 0.020014476031064987, 0.006170811131596565, -0.0360681526362896, 0.03206908330321312, -0.007711122278124094, -0.03719707578420639, -0.025563422590494156, -0.036412570625543594, -0.010887416079640388, 0.013547083362936974, -0.01140404213219881, -0.024070948362350464, -0.0359150767326355, -0.007754174526780844, -0.002705111401155591, 0.046725958585739136, 0.013929769396781921, 0.007586749270558357, -0.018110614269971848, 0.02841443382203579, 0.06176551431417465, -0.014149813912808895, -0.01231292076408863, 0.012934786267578602, -0.008581733331084251, -0.01059083454310894, -0.0069170487113296986, 0.029313744977116585, 0.005381521303206682, 0.027591658756136894, 0.001157625112682581, 0.018579404801130295, 0.005348036531358957, -0.03415472432971001, -0.015345707535743713, 0.04289909824728966, -0.029485953971743584, 0.0009339929674752057, 0.005415006540715694, 0.00895006861537695, 0.023956142365932465, 0.004819451365619898, 0.010189013555645943, -0.0043674036860466, -0.0036474757362157106, -0.0358385406434536, 0.06241608038544655, 0.04251641035079956, 0.0012652555014938116, -0.029313744977116585, 0.034843556582927704, 0.010361222550272942, -0.01624501869082451, -0.027591658756136894, -0.0019995342008769512, -0.01435072347521782, 0.041674502193927765, 0.00806032307446003, -0.02150695212185383, -0.0018105830531567335, -0.016551168635487556, -0.0044224145822227, -0.016828615218400955, -0.013011323288083076, -0.013106994330883026, 0.0032002113293856382, 0.016599003225564957, -0.03886175900697708, -0.00406603841111064, -0.01154754962772131, 0.017287839204072952, -0.006132542621344328, 0.0009202401852235198, 0.05801519379019737, -0.03363809734582901, -0.027783000841736794, 0.007998136803507805, -0.01575709506869316, 7.418277527904138e-05, -0.0089070163667202, 0.027668194845318794, -0.01604411005973816, 0.047146912664175034, -0.029792102053761482, -0.009270567446947098, 0.007342786993831396, -0.013508814387023449, 0.02290375530719757, -0.03683352470397949, 0.03182033821940422, 0.010523864068090916, -0.0016359825385734439, 0.016474630683660507, 0.008710889145731926, -0.006333452649414539, 0.05828307196497917, -0.00987329799681902, 0.02477891743183136, 0.027476852759718895, 0.0014637738931924105, -0.03214562311768532, -0.02091378904879093, -0.06371721625328064, 0.010849147103726864, 0.040143758058547974, -0.006271266378462315, -0.005539379548281431, 0.02454930543899536, 0.009461910463869572, 0.0035948562435805798, -0.007845062762498856, 0.012465995736420155, 0.024013545364141464, -0.010734341107308865, 0.031131504103541374, 0.003353285836055875, -0.052313171327114105, -0.010160312987864017, 0.012198115698993206, 0.024262290447950363, 0.006864429451525211, -0.012800845317542553, 0.01799580827355385, 0.00813207682222128, -0.004702253732830286, -0.027266375720500946, 0.03400164842605591, 0.01326006930321455, 0.004245422314852476, 0.024032678455114365, 0.009409291669726372, -0.0032815320882946253, -0.033083200454711914, -0.043396588414907455, -0.019029060378670692, -0.018713343888521194, 0.011633653193712234, 0.004790749866515398, 0.013747993856668472, 0.007706338539719582, 0.006783108692616224, 0.0003710260207299143, -0.02462584152817726, 0.02120080217719078, -0.0018536351853981614, 0.005711588077247143, 0.04622846469283104, 0.014360290952026844, 0.01626415364444256, 0.022406263276934624, -0.0071083917282521725, 0.027744732797145844, 0.048448044806718826, 6.65963307255879e-05, -0.0014613820239901543, 0.020186685025691986, 0.009514530189335346, 0.016484199091792107, 0.04787401482462883, -0.0010350459488108754, -0.02129647508263588, -0.016886018216609955, 0.019899670034646988, 0.004556355066597462, -0.03369550034403801, 0.03876608982682228, -0.013671455904841423, 0.013747993856668472, -0.0035135354846715927, 0.020894654095172882, 0.020511968061327934, -0.02324817329645157, -0.007969435304403305, 0.0699549987912178, 0.013394009321928024, -0.040067221969366074, 0.020033610984683037, -0.022616740316152573, 0.0020019260700792074, -0.03417385742068291, 0.0011887182481586933, 0.04431503638625145, -0.05185394734144211, -0.05614003166556358, -0.011346639133989811, 0.026711480692029, -0.004941432736814022, 0.04289909824728966, -0.008576949127018452, 0.04974917694926262, 0.02311423234641552, 0.009337537921965122, -0.023477783426642418, -0.011107460595667362, 0.009155761450529099, 0.009710656479001045, 0.01576666161417961, -0.015460513532161713, 0.01967005804181099, -0.007027070969343185, 0.003613990731537342, -0.008266016840934753, 0.004077997524291277, 0.01788100227713585, -0.022195786237716675, 0.0032552224583923817, 0.06811810284852982, -0.016790347173810005, 0.0018667900003492832, 0.001274822629056871, 0.009538447484374046, 0.010810879059135914, 0.020492833107709885, 0.002676409902051091, 0.02472151443362236, -0.04752959683537483, -0.04044990614056587, 0.0349774993956089, 0.012714741751551628, 0.03145678713917732, 0.04397061839699745, 0.06142110005021095, -0.028988461941480637, 0.008093807846307755, -0.03386770933866501, 0.0019026667578145862, -0.005888580344617367, -0.004790749866515398, -0.008940501138567924, 0.0021789183374494314, 0.015460513532161713, 0.038134656846523285, -0.0025926975067704916, -0.018081912770867348, 0.00036534550599753857, 0.00977762695401907, -0.012982621788978577, 0.013097427785396576, 0.0016622921684756875, 0.005285849794745445, 0.0021406495943665504, 0.003405905095860362, 0.007481510750949383, 0.008730024099349976, -0.04982571303844452, -0.007218413986265659, -0.01414024643599987, -0.023669127374887466, -0.018474165350198746, 0.012035474181175232, 0.016799913719296455, 0.01231292076408863, -0.005108857527375221, 0.03212648630142212, -0.009423642419278622, -0.00035278862924315035, -0.016350258141756058, 0.0179766733199358, -0.009256216697394848, -0.01924910396337509, -0.006520012393593788, 0.005348036531358957, 0.027342911809682846, -0.005611132830381393, 0.01576666161417961, -0.00978719349950552, 0.002485067117959261, 0.0004831410478800535, -0.025104200467467308, 0.030614877119660378, 0.004463075194507837, -0.03344675526022911, 0.014025440439581871, 0.008993119932711124, -0.011509280651807785, 0.07404973357915878, -0.00717536173760891, -0.0016359825385734439, 0.009375805966556072, -0.01411154493689537, -0.005123208276927471, 0.03700573369860649, -0.002999301301315427, -0.008500412106513977, -0.01613021455705166, -0.0037503226194530725, -0.009433208964765072, -0.025754766538739204, -0.009514530189335346, 0.014666439965367317, 0.010083775036036968, -0.02307596430182457, 0.023975275456905365, -0.00027640091138891876, 0.00874915812164545, -0.027266375720500946, 0.020894654095172882, 0.012112011201679707, 0.015537050552666187, 0.01506826002150774, 0.021621758118271828, 0.0024587572552263737, -0.026960225775837898, 0.017240002751350403, -0.0005656576831825078, 0.0013465762604027987, 0.01254253275692463, 0.01972746104001999, -0.013709724880754948, 0.006266482640057802, -0.003391554346308112, -0.053652573376894, -0.00201986450701952, -0.020091013982892036, -0.007467160001397133, -0.02498939447104931, 0.017278270795941353, 0.031016698107123375, 0.008591299876570702, -0.04236333817243576, -0.0033006665762513876, -0.012733875773847103, 0.02288462035357952, -0.0348818264901638, -0.00580725958570838, -0.01326006930321455, -0.018885552883148193, -0.005013186018913984, -0.056101761758327484, 0.0009082812466658652, 0.033064067363739014, 0.011920668184757233, -0.004659201484173536, -0.026309659704566002, 0.01411154493689537, -0.0043961051851511, -0.014695141464471817, -0.03409732133150101, -0.009337537921965122, 0.01323136780411005, 0.02127734012901783, -0.004391321446746588, -0.03170553222298622, -0.0030471370555460453, -0.013795829378068447, -0.007749390788376331, 0.008868747390806675, 0.023898739367723465, 0.023630859330296516, -0.010112476535141468, -0.011758026666939259, -0.010877848602831364, 0.016981689259409904, 0.03382943943142891, 0.016378959640860558, 0.00670657167211175, 0.025180736556649208, -0.021908771246671677, -0.007146660704165697, -0.0029610327910631895, 0.0012293786276131868, -0.03176293522119522, -0.0011624086182564497, -0.018464598804712296, 0.01605367660522461, -0.02125820517539978, 0.02271241322159767, -0.02674974873661995, 0.019899670034646988, 0.016857316717505455, 0.0008753941510803998, 0.030595744028687477, 0.027936076745390892, -0.02114339917898178, -0.020626774057745934, 0.016321556642651558, -0.008576949127018452, 0.000435006309999153, -0.017010390758514404, -0.0018380885012447834, 0.024300558492541313, 0.03182033821940422, -0.02807001583278179, 0.011222265660762787, -0.018148882314562798, -0.01414024643599987, -0.03195427730679512, 0.033025797456502914, 0.02456843852996826, 0.004668768960982561, 0.0021430414635688066, 0.03159072622656822, 0.02665407769382, 0.005061022005975246, -0.006845295429229736, -0.004960566759109497, 0.0349966324865818, -0.0353410504758358, 0.0019098421325907111, -0.0013908243272453547, -0.0065630641765892506, 0.010466461069881916, -0.0008664249326102436, 0.001171377836726606, 0.018292389810085297, -0.02829962782561779, 0.034422602504491806, -0.030882757157087326, -0.010313387028872967, -0.018416762351989746, 0.003618774237111211, 0.0029179805424064398, -0.00706533994525671, 0.011710191145539284, 0.05101203918457031, -0.000342922518029809, 0.011040490120649338, 0.02143041417002678, 0.002453973749652505, -0.020091013982892036, -0.002779256785288453, 0.017144331708550453, -0.004233463667333126, 6.226121331565082e-05, 0.0003548814565874636, 0.003929706756025553, -0.02479805052280426, 0.0177279282361269, -0.023362979292869568, 0.006429124157875776, -0.029352014884352684, -0.006271266378462315, -0.02506593056023121, 0.031361114233732224, 0.0028725366573780775, 0.02843356691300869, 0.002683585276827216, 0.004379362799227238, -0.02474064752459526, 0.0008389194263145328, -0.014235918410122395, -0.020282356068491936, -0.00664916867390275, 0.0021777222864329815, -0.004058863036334515, -0.010102909989655018, 0.02114339917898178, -0.03771370276808739, 0.004166493657976389, -0.0015977139119058847, 0.019823133945465088, 0.005386305041611195, 0.027629926800727844, -0.006763974670320749, 0.009418858215212822, -0.04209545627236366, 0.004946216009557247, 0.036221228539943695, -0.004565922077745199, 0.012293786741793156, -0.007687204517424107, 0.029677297919988632, -0.004185627680271864, 0.01047602854669094, 0.016799913719296455, -0.029218073934316635, -0.003348502330482006, 0.010992654599249363, -0.045118674635887146, -0.022731546312570572, 0.02282721735537052, -0.07619277387857437, -0.005199745763093233, 0.015508349053561687, -0.03025132603943348, -0.0017747061792761087, -0.02665407769382, 0.0029084132984280586, -0.016579870134592056, 0.0017687267391011119, -0.014723842963576317, -0.03214562311768532, 0.02870144695043564, 0.020741580054163933, -0.007027070969343185, 0.009519313462078571, -0.027610793709754944, 0.039531461894512177, -0.018273254856467247, 0.013881933875381947, -0.011738891713321209, 0.05652271956205368, -0.014838648959994316, 0.003429823089390993, 0.029390282928943634, 0.004226288292557001, -0.013499247841536999, -0.0022889403626322746, 0.003164334688335657, 0.0008951264317147434, 0.00990199949592352, -0.022387130185961723, -0.010370790027081966, 0.004173669032752514, -0.02102859504520893, 0.012676472775638103, -0.02481718547642231, 0.023516053333878517, 0.022769814357161522, -0.054150063544511795, -0.018990790471434593, -0.02298029325902462, -0.01320266630500555, -0.02135387808084488, 0.025314677506685257, 0.011002222076058388, -0.010284685529768467, -0.020014476031064987, 0.01603454165160656, -0.01596757210791111, -0.0003997274616267532, -0.020722445100545883, -0.016943421214818954, 0.02154522016644478, -0.006921832449734211, 0.009323187172412872, 0.03394424542784691, -0.014704708009958267, 0.0180053748190403, -0.023477783426642418, -0.00265488401055336, -0.023362979292869568, -0.003252830822020769, 0.006520012393593788, -0.026041779667139053, -0.0264627356082201, 0.032662246376276016, 0.023898739367723465, -0.0011438722722232342, -0.0029682081658393145, -0.007161011453717947, -0.03304493427276611, 0.013891500420868397, 0.015106528997421265, 0.004661593586206436, 0.0035494123585522175, -0.004171276930719614, -0.018301956355571747, -0.029026729986071587, 0.03337021544575691, 0.032738786190748215, 0.040143758058547974, 0.0008568578050471842, 0.002094009891152382, 0.009366239421069622, -0.010456894524395466, -0.002235125284641981, 0.01054299809038639, 0.004774007480591536, -0.026003511622548103, 0.01804364286363125, -0.015613587573170662, 0.03912964090704918, -0.011576250195503235, 0.01328877080231905, -0.025735631585121155, -0.023420382291078568, -0.005434140563011169, 0.01320266630500555, -0.014035007916390896, -0.016369393095374107, -0.00011271297989878803, -0.019009925425052643, -0.00045772831072099507, 0.014494230970740318, 0.018502866849303246, -0.0005758227780461311, 0.029658162966370583, -0.023707395419478416, -0.007902465760707855, -0.010275118052959442, 0.019765730947256088, 0.03382943943142891, 0.020091013982892036, 0.00011353515583323315, -0.011030923575162888, 0.008548247627913952, 0.03702486678957939, 0.013374874368309975, 0.005902931094169617, 0.0027242456562817097, 0.006103841122239828, -0.01608237810432911, 0.03145678713917732, 0.006950533948838711, -0.007811577524989843, 0.01603454165160656, -0.04439157247543335, 0.01792883686721325, -0.041444890201091766, -0.01970832794904709, -0.018675075843930244, 0.005606349557638168, -0.03736928477883339, -0.010724774561822414, -0.029428550973534584, 0.04634327068924904, 0.01518306601792574, -0.001533135655336082, 0.03342761844396591, 0.022501934319734573, 0.008414307609200478, -0.00972979050129652, -0.016522467136383057, -0.012322488240897655, -0.008275584317743778, -0.013757560402154922, -0.04240160435438156, -0.017000824213027954, -0.015163931995630264, 0.006371721625328064, -0.03717794269323349, 0.01613978110253811, -0.006338236387819052, -0.024090081453323364, -0.00797900278121233, 0.0016599004156887531, -0.025372080504894257, -0.06677870452404022, -0.043626200407743454, -0.03185860812664032, -0.010935251601040363, -0.005056238267570734, 0.006697004660964012, 0.025888705626130104, -0.014465529471635818, 0.018388060852885246, -0.0178044643253088, -0.03229869529604912, 0.041865844279527664, 0.000154718742123805, -0.0006427928456105292, -0.008356904610991478, -0.013212232850492, -0.009251433424651623, -0.005816826596856117, 0.020511968061327934, 0.030461803078651428, 0.02851010486483574, 0.026424465700984, 0.027553390711545944, 0.019038626924157143, -0.015374409034848213, -0.043320052325725555, 0.011604951694607735, -0.005596782546490431, -0.05885710194706917, -0.01970832794904709, 0.006328669376671314, 0.04442984238266945, -0.00490794749930501, -0.011719757691025734, 0.007696771528571844, -0.022138383239507675, 0.020033610984683037, 0.034900959581136703, 0.0013214624486863613, -0.01796710677444935, -0.005926848854869604, -0.002992125926539302, -0.0017340457998216152, -0.008285150863230228, -0.009428425692021847, -0.02114339917898178, 0.011738891713321209, 0.016254587098956108, 0.007778092287480831, -0.00378859112970531, 0.010447327047586441, -0.015383975580334663, 0.039799340069293976, -0.03669958561658859, 0.002463540993630886, -0.0019923588261008263, -0.008151210844516754, 0.006094274111092091, 0.020741580054163933, -0.019067328423261642, -0.016924286261200905, -0.027649061754345894, 0.01060040108859539, -0.008940501138567924, 0.0008981161518022418, 0.0021262988448143005, -0.009170112200081348, 0.0011988834012299776, 0.01064823754131794, 0.013470546342432499, 0.02133474312722683, -0.0071083917282521725, -0.04427676647901535, -0.017144331708550453, -0.011758026666939259, -0.032987531274557114, -0.00980632845312357, -0.0063669378869235516, 0.005123208276927471, 0.016532033681869507, -0.009342321194708347, -0.01575709506869316, -0.010830013081431389, -0.009681954979896545, 0.009519313462078571, -0.027036763727664948], "index": 46}, {"title": "Vitelline membrane", "text": "The vitelline membrane is a structure directly adjacent to the outer surface of the plasma membrane of an ovum. It is composed mostly of protein fibers, with protein receptors needed for sperm binding which, in turn, are bound to sperm plasma membrane receptors.", "vector": [-0.056395791471004486, 0.0002140840661013499, -0.0029928055591881275, 0.029788170009851456, -0.019245248287916183, 0.021085841581225395, 0.02456088364124298, -0.025665240362286568, -0.025356018915772438, -0.03645848110318184, 0.030863076448440552, 0.06461220234632492, 0.0029375876765698195, -0.03371967747807503, -0.014827823266386986, 0.052479010075330734, -0.006519383285194635, 0.005823638755828142, -0.03115757182240486, -0.014032687060534954, -0.007137822452932596, -0.0053414031863212585, -0.0068470085971057415, -0.0015497799031436443, 0.027461659163236618, 0.0004465740639716387, 0.008142787031829357, 0.00024387867597397417, -0.009298679418861866, 0.037842608988285065, 0.013797091320157051, 0.012670647352933884, 0.03198215737938881, 0.03731251507997513, -0.03133426979184151, -0.02248469367623329, -0.0656723827123642, 0.0013169448357075453, 0.02635730244219303, -0.0650244951248169, 0.05377478897571564, 0.028006475418806076, -0.00337012717500329, 0.015932179987430573, -0.0058310008607804775, 0.04037526622414589, 0.015770208090543747, 0.024619782343506813, -0.023265104740858078, -0.021777905523777008, 0.07391824573278427, 0.005094763357192278, 0.011153997853398323, 0.020290706306695938, -0.025915559381246567, 0.0031915896106511354, -0.006283787079155445, 0.07656870037317276, -0.0004104523977730423, -0.05230231210589409, -0.02186625450849533, -0.0055806804448366165, -0.0005876095383428037, 0.003151096636429429, 0.009747784584760666, 0.04299626871943474, -0.0053229969926178455, -0.024737579748034477, -0.004767138045281172, 0.023559600114822388, 0.03280674293637276, -0.015475712716579437, -0.0020412185695022345, 0.0013381117023527622, -0.03801930323243141, 0.045646727085113525, -0.0008328686817549169, 0.04013966768980026, 0.026460375636816025, -0.02210184931755066, -0.016845114529132843, 0.01830286532640457, -0.0018378328531980515, 0.049210116267204285, 0.03863774612545967, 0.014238833449780941, 0.02905193157494068, -0.030627479776740074, -0.02961147204041481, -0.011750350706279278, 0.009983380325138569, 0.04611791670322418, 0.019907861948013306, 0.032129403203725815, 0.01046929694712162, 0.0058346823789179325, 0.05866340547800064, 0.0005728848045691848, -0.02064410038292408, 0.004829718265682459, 0.0007877741591073573, -0.008113337680697441, -0.006486252415925264, 0.015254841186106205, -0.01348050870001316, 0.021763181313872337, 0.022352170199155807, -0.03536884859204292, 0.017124883830547333, 0.007318201009184122, -0.007299794815480709, -0.03645848110318184, 0.03268894553184509, -0.03048023208975792, 0.002087233355268836, -0.020526301115751266, -0.06101936474442482, 0.04025746509432793, -0.04332021623849869, -0.0057868268340826035, 0.04479268938302994, -0.019215798005461693, -0.009283955208957195, 0.018391212448477745, -0.021071117371320724, 0.005418708082288504, -0.03607563674449921, 0.014805736020207405, 0.022249097004532814, 0.015284290537238121, -0.02693156711757183, -0.007502260152250528, 0.04314351826906204, 0.009276592172682285, 0.0262984037399292, -0.0001463272055843845, 0.001481677987612784, 0.02696101740002632, -0.012236267328262329, 0.060901567339897156, -0.011492667719721794, 0.01584383100271225, -0.025841936469078064, 0.07768778502941132, 0.005297228693962097, -0.05186057090759277, -0.02300005964934826, 0.00709732947871089, 0.02628367953002453, -0.031039772555232048, 0.040581412613391876, -0.051330480724573135, 0.01509286928921938, 0.013215463608503342, -0.007020024582743645, -0.048945069313049316, 0.011603103019297123, -0.010690168477594852, 0.0904688611626625, 0.009909756481647491, 0.0017881368985399604, -0.05716148018836975, -0.06802834570407867, 0.0016730997012928128, 0.030067939311265945, -0.017772773280739784, -0.001262647332623601, -0.005808914080262184, -0.03698857128620148, -0.005661666393280029, -0.003533940063789487, -0.009063083678483963, -0.0018599199829623103, -0.021777905523777008, -0.015726033598184586, -0.010395674034953117, -0.016506444662809372, 0.020747173577547073, -0.015056056901812553, -0.04464544355869293, -0.007980814203619957, -0.0395212285220623, 0.01541681308299303, 0.015637684613466263, -0.006302193272858858, 0.016977636143565178, 0.0009156953892670572, 0.02336817793548107, -0.012022758834064007, -0.0191127248108387, 0.027667805552482605, -0.0066408622078597546, 0.07621530443429947, 0.031245918944478035, 0.024958452209830284, -0.032747846096754074, 0.02039377950131893, 0.010866865515708923, -0.0017356799216941, -0.05085928738117218, -0.009040996432304382, -0.01640337146818638, -0.00303145800717175, 0.02962619811296463, -0.05227286368608475, 0.04223058372735977, -0.018641533330082893, -0.05981193482875824, -0.025208773091435432, -0.03790150582790375, -0.004340120125561953, -0.0205851998180151, -0.013789728283882141, 0.0395212285220623, -0.03321903571486473, -0.01939249597489834, -0.05780936777591705, -0.0911167562007904, 0.03286564350128174, 0.020806072279810905, -0.02179262973368168, 0.021174190565943718, 0.010108540765941143, 0.027137715369462967, -0.019893137738108635, -0.02065882459282875, -0.012405602261424065, -0.03410252183675766, -0.029493674635887146, -0.006033466197550297, 0.01178716216236353, 0.0025621065869927406, 0.05557120591402054, -0.03472096100449562, -0.05651359260082245, -0.04334966465830803, 0.0347798615694046, -0.014312457293272018, 0.02487010322511196, -0.03919728472828865, 0.053156349807977676, -0.027711980044841766, -0.005779464263468981, 0.0006865414907224476, -0.004086118191480637, 0.023471251130104065, -0.041759390383958817, 0.003533940063789487, -0.01647699624300003, -0.026740146800875664, 0.07268136739730835, -0.012089019641280174, 0.04214223474264145, 0.03221775218844414, 0.02484065294265747, 0.053068000823259354, -0.0061034089885652065, -0.038137104362249374, -0.05474662035703659, 0.010270513594150543, -0.010999388061463833, 0.0023320321924984455, -0.004995371680706739, 0.009099895134568214, 0.010955214500427246, -0.0188624057918787, 0.03698857128620148, -0.009629986248910427, 0.016638968139886856, 0.00433275755494833, 0.006489933468401432, -0.021984051913022995, 0.042024437338113785, -0.023485977202653885, 0.019878413528203964, 0.04847387596964836, 0.004251771606504917, -0.013509958051145077, 0.01646227017045021, -0.01046929694712162, -0.005028502084314823, -0.016580069437623024, -0.05203726515173912, -0.0009626305545680225, 0.018700432032346725, 0.05719092860817909, 0.006802834570407867, -0.027711980044841766, -0.026563448831439018, -0.02036432921886444, -0.0013555972836911678, 0.03445591405034065, -0.016020528972148895, -0.01734575629234314, 0.021925153210759163, 0.017154334113001823, -0.02933170273900032, 0.0032136766240000725, -0.029537849128246307, -0.0329834409058094, -0.0008775030728429556, -0.005632217042148113, -0.028845785185694695, 0.023500701412558556, -0.023132583126425743, -0.01858263462781906, -0.023839371278882027, 0.03374912589788437, 0.05336249619722366, -0.020761897787451744, 0.056101299822330475, 0.01121289748698473, 0.022337445989251137, -0.05295019969344139, -0.005205199122428894, -0.040522512048482895, -0.008194323629140854, -0.006044509820640087, 0.036664627492427826, 0.010115903802216053, -0.013892801478505135, 0.014680575579404831, -0.006353729870170355, 0.012339340522885323, 0.05810386314988136, 0.015549336560070515, 0.009791959077119827, -0.03704747185111046, 0.019053826108574867, 0.013863352127373219, -0.05716148018836975, 0.0048002684488892555, -0.03533940017223358, 0.011242346838116646, 0.003018573857843876, 0.02782977744936943, 0.026475099846720695, 0.009313404560089111, -0.008474093861877918, -0.00956372544169426, 0.02005510963499546, -0.003924145828932524, 0.019834239035844803, -0.011838698759675026, -0.037842608988285065, -0.03949178010225296, 0.011603103019297123, -0.012000671587884426, -0.0032891409937292337, -0.018774056807160378, 0.0007049473933875561, -0.015313739888370037, -0.02725551277399063, -0.011021475307643414, 0.03112812153995037, 0.003983044996857643, 0.0073439693078398705, -0.022617215290665627, 0.040522512048482895, 0.02927280403673649, -0.018788781017065048, 0.013951701112091541, 0.03209995478391647, 0.047413695603609085, -0.053656987845897675, -0.01272218395024538, -0.027682529762387276, 0.006519383285194635, 0.05589514970779419, -0.02008455991744995, 0.0034308668691664934, -0.04544058069586754, 0.022823363542556763, 0.06425880640745163, -0.033366285264492035, -0.02419276535511017, 0.006132858339697123, -0.030362434685230255, 0.06985421478748322, 0.026254229247570038, 0.010793241672217846, -0.05289130285382271, -0.03207050636410713, -0.011131911538541317, 0.028286244720220566, -0.025046799331903458, -0.0001016928072203882, -0.04570562392473221, -0.03448536619544029, 0.03048023208975792, -0.015446262434124947, 0.0073550124652683735, 0.0400218702852726, -0.003931508399546146, 0.06714486330747604, -0.005046908278018236, -0.0022896986920386553, 0.037842608988285065, -0.026372026652097702, 0.020261256024241447, 0.0066445437259972095, 0.01033677440136671, 0.011448493227362633, -0.035987287759780884, 0.10012830048799515, -0.014636402018368244, 0.022366896271705627, -0.006950082257390022, 0.020864970982074738, -0.02008455991744995, 0.033955272287130356, -0.04667745903134346, -0.006037147715687752, -0.03660573065280914, -0.01822924055159092, 0.01540208887308836, 0.005297228693962097, -0.01332589890807867, 0.03796040639281273, -0.022852811962366104, -0.0036278103943914175, -0.0509476363658905, -0.019922586157917976, 0.035427749156951904, 0.009526913054287434, 0.018950752913951874, -0.040551960468292236, -0.005753695964813232, -0.026165880262851715, 0.05792716518044472, -0.031540416181087494, -0.008731776848435402, 0.016594793647527695, -0.011315970681607723, 0.021380336955189705, -0.05047644302248955, 0.04667745903134346, -0.030745279043912888, 0.016815664246678352, -0.025032075121998787, 0.005337722133845091, 0.01374555379152298, -0.056660838425159454, 0.03698857128620148, -0.046795256435871124, -0.04064030945301056, 0.020717723295092583, -0.038991138339042664, 0.04974020645022392, 0.0043106707744300365, 0.04600011929869652, 0.006033466197550297, -0.02749110758304596, 0.0013132636668160558, 0.023530149832367897, 0.012339340522885323, 0.03919728472828865, -0.012206817977130413, -0.00022340206487569958, 0.013465783558785915, -0.04602956771850586, 0.0019013333367183805, 0.07597970962524414, -0.03533940017223358, 0.009107258170843124, -0.0027608906384557486, 0.028183171525597572, 0.029449500143527985, 0.016992362216114998, -0.02157175913453102, 0.04794378578662872, 0.008790675550699234, -0.07327035814523697, 0.016992362216114998, 0.04255452752113342, -0.04464544355869293, 0.013981150463223457, 0.04128820076584816, -0.010822691023349762, 0.023559600114822388, 0.05713203176856041, 0.047354795038700104, -0.016094151884317398, 0.05692588537931442, -0.026224780827760696, 0.020747173577547073, 0.05065314099192619, 0.010461934842169285, 0.03295399248600006, -0.020850246772170067, 0.05047644302248955, 0.0026688610669225454, 0.0550411157310009, -0.015549336560070515, -0.03433811664581299, 0.007391824387013912, 0.013414246961474419, 0.02628367953002453, -0.0014632720267400146, 0.04782598838210106, -0.013495233841240406, 0.05981193482875824, 0.013414246961474419, 0.06478890031576157, 0.02002565935254097, 0.036340683698654175, -0.016624242067337036, -0.013694017194211483, 0.034249767661094666, 0.009350216016173363, -0.01789057068526745, 0.009644711390137672, 0.026165880262851715, 0.056395791471004486, 0.032718393951654434, -0.011396956630051136, 0.04187718778848648, 0.0024498302955180407, -0.04791433736681938, -0.004472642671316862, -0.005300910212099552, -0.009512188844382763, -0.03224720433354378, 0.01680094003677368, 0.012655923143029213, 0.00641999114304781, 0.017728598788380623, -0.003335156012326479, 0.07868906110525131, 0.008503543213009834, -0.031187020242214203, -0.001177979982458055, 0.04985800385475159, 0.023559600114822388, -0.021174190565943718, 0.006162308156490326, 0.0028878916054964066, -0.014606951735913754, -0.01612360216677189, -0.019657541066408157, 0.02305895835161209, -0.015063419006764889, 0.015784932300448418, -0.03731251507997513, -0.0021958283614367247, -0.002928384579718113, 0.006305874325335026, 0.026843219995498657, -0.009158794768154621, -0.05153662711381912, 0.06437660753726959, -0.04962240904569626, -0.03525105118751526, 0.035751692950725555, 0.005989292170852423, -0.004748731851577759, 0.016874562948942184, 0.020437953993678093, -0.03050968237221241, -0.011919685639441013, 0.0009460651781409979, 0.008871661499142647, 0.02750583365559578, 0.013134476728737354, 0.015284290537238121, 0.049504611641168594, -0.01769915036857128, -0.026475099846720695, -0.029964866116642952, -0.028197895735502243, -0.019495569169521332, -0.014135760255157948, 0.003743767738342285, 0.0413176491856575, 0.006114452611654997, 0.035162702202796936, -0.026813769713044167, 0.0012212339788675308, 0.002582353074103594, 0.013082940131425858, 0.030274085700511932, -0.02626895345747471, 0.02668124809861183, 0.018420662730932236, -0.013789728283882141, -0.0179641954600811, -0.008974735625088215, -0.009342853911221027, -0.0257241390645504, -0.015593510121107101, 0.034897658973932266, -0.022852811962366104, -0.01348050870001316, -0.015284290537238121, 0.0016169616719707847, -0.000775350141339004, 0.005271460395306349, 0.027005191892385483, 0.02330927923321724, 0.030715828761458397, 0.012641198001801968, 0.02336817793548107, 0.010962576605379581, 0.01317128911614418, 0.05616019666194916, 0.022263823077082634, -0.008238498121500015, -0.009144069626927376, 0.0014918012311682105, -0.033366285264492035, -0.061431657522916794, -0.05318579822778702, -0.0027811371255666018, 0.045970670878887177, 0.0006754979258403182, 0.0020633055828511715, -0.013193376362323761, -0.03351353108882904, 0.058781202882528305, 0.02246996946632862, -0.01227307878434658, 0.009048358537256718, 0.035751692950725555, 0.0030701104551553726, -0.020158182829618454, -0.01909800060093403, -0.04125874862074852, -0.024074966087937355, -0.01287679374217987, -0.014422892592847347, 0.03310123831033707, -0.010844778269529343, -0.031216470524668694, -0.01703653670847416, 0.03504490479826927, -0.05350974202156067, -0.009799321182072163, -0.07268136739730835, 0.01510759349912405, -0.008120699785649776, -0.0012506834464147687, -0.030274085700511932, 0.013347986154258251, -0.05627799406647682, -0.009335491806268692, 0.0004463439981918782, 0.027137715369462967, 0.0006538709276355803, 0.003309387480840087, 0.016226675361394882, 0.030892524868249893, 0.00820168573409319, -0.03854939714074135, -0.01641809567809105, 0.004921747837215662, 0.008783313445746899, 0.04108205437660217, -0.023220930248498917, 0.011153997853398323, -0.02305895835161209, 0.004192872438579798, 0.04105260223150253, -0.007513303775340319, 0.004067711997777224, -0.0019455075962468982, -0.025208773091435432, 0.014444979839026928, -0.012030120939016342, 0.011647277511656284, 0.008105974644422531, -0.001233197865076363, -0.024678681045770645, 0.023162031546235085, -0.026828493922948837, 0.028757436200976372, 0.0032007924746721983, -0.023456526920199394, 0.010248426347970963, -0.004572034813463688, 0.007461767178028822, -0.009364941157400608, 0.01731630600988865, 0.02634257823228836, -0.004159742034971714, 0.008429919369518757, -0.005282504018396139, 0.017816947773098946, -0.012648560106754303, -0.0050542703829705715, 0.013362710364162922, 0.012361427769064903, 0.0011586537584662437, 0.008753864094614983, 0.02095331996679306, 0.011934409849345684, 0.007855653762817383, 0.0042296843603253365, -0.008150149136781693, 0.020835520699620247, -0.03380802646279335, -0.0119638592004776, 0.03251224756240845, -0.0006934436969459057, 0.03145206719636917, -0.033660780638456345, 0.024929001927375793, 0.00042793803731910884, -0.013046128675341606, 0.030656930059194565, -0.01880350522696972, 0.011632552370429039, 0.03165821358561516, 0.02360377460718155, -0.007049473933875561, -0.016992362216114998, 0.007973452098667622, -0.011146635748445988, 0.031039772555232048, -0.016697866842150688, -0.008047075942158699, 0.005385577213019133, 0.04812048375606537, -0.0047855437733232975, -0.0055144187062978745, -0.002236321335658431, 0.017169058322906494, 0.023397628217935562, 0.005735290236771107, -0.01406213641166687, -0.006316917948424816, -0.06131386011838913, -0.002595237223431468, 0.006939038634300232, -0.007634783163666725, -0.0008894669590517879, 0.011713538318872452, -0.03769535943865776, 0.04308461770415306, -0.01392961386591196, -0.00472296355292201, -0.020172907039523125, 0.03080417774617672, 0.0024498302955180407, -0.011168722994625568, -0.018450111150741577, -0.07391824573278427, 0.013959063217043877, 0.02336817793548107, -0.034897658973932266, -0.0328361913561821, 0.03133426979184151, 0.01733103021979332, -0.015490436926484108, -0.02691684290766716, 0.04514608532190323, -0.03595783933997154, 0.055217813700437546, -0.0032670539803802967, -0.0017734121065586805, -0.014415530487895012, -0.00254001934081316, 0.016830390319228172, 0.010012829676270485, 0.005757377482950687, -0.016226675361394882, -0.029979592189192772, 0.04600011929869652, -0.0016335269901901484, -0.0005236489232629538, -0.03539830073714256, 0.0068985456600785255, 0.00884221214801073, 0.03704747185111046, -0.04585287347435951, -0.02451670914888382, -0.022941160947084427, -0.0031271688640117645, -0.003003848949447274, 0.006824921816587448, -0.020717723295092583, 0.0008126221364364028, -0.04482213780283928, -0.00619543856009841, -0.039315082132816315, -0.0008618580177426338, -0.029979592189192772, 0.03133426979184151, 0.00030001677805557847, -0.031216470524668694, 0.04340856522321701, 0.012486588209867477, 0.008047075942158699, -0.007170953322201967, -0.002418540185317397, 0.018700432032346725, -0.014687938615679741, -0.018729882314801216, -0.028197895735502243, 0.00017439626390114427, -0.03645848110318184, 0.03819600120186806, -0.00746544823050499, 0.012972504831850529, 0.0472075492143631, 0.013414246961474419, -0.0037492895498871803, -0.0063279615715146065, -0.01793474517762661, -0.0334840826690197, -0.01285470649600029, -0.020114008337259293, -0.0347798615694046, -0.02270556427538395, 0.0006124575738795102, -0.03672352805733681, 0.0334840826690197, 0.0071046920493245125, -0.028610190376639366, 0.00026412520674057305, 0.044998835772275925, 0.020526301115751266, 0.00014023024414200336, 0.0023890906013548374, 0.01849428564310074, -0.05118323117494583, -0.04223058372735977, 0.04782598838210106, -0.0009543478954583406, 0.027005191892385483, -0.042583975940942764, 0.031893808394670486, -0.007958727888762951, -0.0013132636668160558, 0.03077472746372223, -0.011735625565052032, 0.03589894250035286, -0.010086453519761562, -0.031893808394670486, 0.0170659851282835, -0.005197837017476559, -0.04046361520886421, -0.0014402646338567138, -0.009976018220186234, -0.020246531814336777, 0.005348765291273594, 0.01647699624300003, 0.0278445016592741, -0.0037989856209605932, 0.035192154347896576, -0.01029996294528246, -0.0006267221760936081, -0.035722244530916214, 0.015770208090543747, 0.034838758409023285, -0.024251664057374, -0.007782030384987593, 0.017743322998285294, -0.0028253113850951195, 0.026872668415308, -0.0070862858556210995, -0.02606280706822872, 0.028197895735502243, 0.013112390413880348, 0.030332984402775764, -0.001707150717265904, -0.0006805595476180315, -0.01150002982467413, 0.04985800385475159, 0.040581412613391876, 0.005775783210992813, 0.0023117857053875923, -0.021674832329154015, -0.02065882459282875, 0.02426638826727867, -0.012979866936802864, -0.024457810446619987, -0.014231471344828606, 0.02600390836596489, 0.01105828769505024, 0.0024314243346452713, -0.011742988601326942, -0.010719617828726768, -0.03109867312014103, 0.022514142096042633, 0.025326570495963097, -0.012376152910292149, 0.046500761061906815, -0.006666630506515503, 0.006394222844392061, -0.040228016674518585, -0.0296409223228693, -0.006033466197550297, 0.027270236983895302, 0.029743995517492294, -0.01822924055159092, -0.01540208887308836, 0.05495276674628258, 0.028212621808052063, -0.0006115372525528073, 0.027991749346256256, -8.409212750848383e-05, -0.00016576847701799124, -0.00017485641001258045, -0.0296409223228693, -0.029964866116642952, -0.01703653670847416, 0.041435446590185165, -0.018788781017065048, -0.03436756506562233, -0.021409787237644196, 0.009931843727827072, 0.03710636869072914, -0.011838698759675026, -0.022352170199155807, 0.012030120939016342, 0.01435663178563118, -0.007443360984325409, 0.01198594644665718, 0.019672265276312828, 0.019539743661880493, 0.021660108119249344, 0.016992362216114998, 0.033631328493356705, -0.0025289759505540133, 0.004122930113226175, -0.05828056111931801, -0.02214602380990982, 0.022867536172270775, 0.01613832637667656, -0.036900222301483154, -0.03106922283768654, -0.02241106890141964, 0.007296113763004541, 0.002221596660092473, -0.011036200448870659, -0.05981193482875824, 0.01448915433138609, 0.00942383985966444, 0.010034916922450066, -0.028816336765885353, 0.014849910512566566, 0.01672731526196003, 0.06255073845386505, 0.0028032243717461824, -0.0031860677991062403, 0.0017089913599193096, -0.025311846286058426, 0.025061525404453278, -0.02478175424039364, 0.004086118191480637, 0.003780579660087824, 0.016948187723755836, -0.014106310904026031, -0.0068948641419410706, 0.024678681045770645, 0.03563389554619789, 0.011396956630051136, -0.012788445688784122, -0.0010472978465259075, 0.024457810446619987, 0.004093480762094259, -0.02005510963499546, 0.02635730244219303, 0.026372026652097702, -0.01825869083404541, 0.015770208090543747, -0.04190663993358612, -0.014187296852469444, 0.03946233168244362, 0.0037345646414905787, 0.015225391834974289, 1.6450307157356292e-05, -0.01435663178563118, 0.039315082132816315, 0.021925153210759163, 0.04061086103320122, 0.026754871010780334, -0.004137654788792133, 0.043261315673589706, 0.042878471314907074, 0.02569468878209591, -0.023854095488786697, 0.04249563068151474, 0.04155324399471283, -0.026872668415308, -0.014908809214830399, -0.0014338225591927767, 0.007863016799092293, -0.0043106707744300365, 0.030951425433158875, 0.00568375363945961, 0.02933170273900032, 0.002954153111204505, -0.005956161301583052, -0.00754643464460969, -0.008628703653812408, -0.002333872951567173, 0.03533940017223358, -0.018067268654704094, -0.019289422780275345, -0.00471191992983222, -0.006375816650688648, 0.024693405255675316, 0.000359605997800827, -0.02126253955066204, 0.042053885757923126, -0.008326846174895763, 0.010999388061463833, -0.016565343365073204, 0.007001618854701519, 0.002059624530375004, -0.036635179072618484, -0.016079427674412727, 0.021424511447548866, 0.045057736337184906, -0.014474429190158844, -0.010579733178019524, 0.01588800549507141, 0.04211278632283211, 0.05336249619722366, 0.033071789890527725, 0.04458654299378395, -0.02273501455783844, 0.003195270663127303, -0.01256757415831089, 0.017404654994606972, -0.025061525404453278, -0.021615933626890182, -0.01390752661973238, 0.00011561229621293023, 0.021350888535380363, -0.024001343175768852, 0.0066408622078597546, 0.012383515015244484, 0.006202801130712032, 0.05433432757854462, -0.010668081231415272, -0.0725046694278717, 0.01939249597489834, -0.03165821358561516, 0.012685372494161129, 0.003843159880489111, -0.023117857053875923, 0.02273501455783844, 0.025827212259173393, 0.02755000814795494, 0.007528028450906277, -0.010859503410756588, -0.006994256284087896, -0.014584865421056747, 0.02542964369058609, -0.020864970982074738, 0.02182208001613617, 0.021939877420663834, 0.007973452098667622, 0.014363993890583515, 0.002983602462336421, 0.022499417886137962, 0.005680072586983442, -0.02872798778116703, 0.007995539344847202, -0.019804788753390312, 0.015181217342615128, -0.026445651426911354, -0.01909800060093403, 0.00956372544169426, 0.024251664057374, 0.04226003214716911, 0.033395733684301376, 0.007285070139914751, -0.002545541152358055, -0.010874227620661259, -0.017713874578475952, 0.017463553696870804, 0.011529479175806046, 0.039904072880744934, 0.011242346838116646, 0.008429919369518757, -0.020114008337259293, 0.002722238190472126, 0.0021258858032524586, 0.005367171484977007, 0.017537176609039307, -0.036929674446582794, 0.011249708943068981, 0.018435386940836906, -0.0008549558115191758, 0.03878499194979668, 0.0029228630010038614, -0.0008954488439485431, -0.02121836505830288, 0.022823363542556763, 0.03050968237221241, 0.011176085099577904, 0.011846061795949936, -0.005974567495286465, -0.020202357321977615, -0.023736298084259033, 0.0057684206403791904, 0.014386081136763096, -0.002186625497415662, -0.005396620836108923, -0.0001776173012331128, -0.0037916230503469706, -0.006677674129605293, 0.03018573857843876, 0.019893137738108635, 0.006935357116162777, 0.01792002096772194, -0.013105027377605438, 0.026843219995498657, -0.0065819635055959225, 0.00044956503552384675, 0.003463997505605221, 0.05000524967908859, -0.013900164514780045, 0.005411345511674881, 0.004086118191480637, 0.00018946612544823438, 0.01375291682779789, 0.007156228646636009, -0.006673993077129126, -0.008488818071782589, -0.002335713477805257, -0.0070862858556210995, 0.004480005241930485, -0.0025068887043744326, 0.01880350522696972, -0.019569192081689835, -0.01677148975431919, 0.01435663178563118, -0.015004520304501057, -0.010137990117073059, 0.045882321894168854, 0.01850901171565056, -0.0012580457841977477, 0.007561159320175648, -0.02361849881708622, -0.03687077388167381, -0.03083362616598606, 0.012442413717508316, 0.034249767661094666, -0.017772773280739784, 0.08245860040187836, -0.003541302401572466, 0.01792002096772194, 0.005392939783632755, 0.024398911744356155, -0.0035836361348628998, 0.034131970256567, -0.021100567653775215, 0.037253618240356445, 0.005871494300663471, -0.0365762785077095, 0.037872057408094406, 0.019554467871785164, 0.01675676554441452, 0.007156228646636009, 0.02062937431037426, 0.015902729704976082, 0.007137822452932596, 0.032482799142599106, 0.01582910679280758, 0.025945009663701057, 0.018347037956118584, -0.01678621582686901, 0.005772102158516645, 0.016565343365073204, -0.03584004193544388, 0.02364794909954071, 0.025179322808980942, 0.0013666409067809582, -0.009865582920610905, 0.019009651616215706, 0.021984051913022995, 0.010329412296414375, -0.0044836862944066525, -0.039020586758852005, -0.0038689281791448593, -0.01883295550942421, -0.005624854471534491, 0.0037695360369980335, -0.026975741609930992, -0.012184730730950832, -0.048886168748140335, 0.01344369724392891, 0.002674382645636797, -0.02248469367623329, -0.015770208090543747, -0.005300910212099552, 0.051271580159664154, -0.0033333152532577515, 0.011735625565052032, -0.022867536172270775, 0.02059992589056492, -0.007759943138808012, -0.0052935476414859295, 0.003068269696086645, 0.005646941717714071, -0.009799321182072163, 0.026121707633137703, -0.00018302403623238206, -0.01733103021979332, 0.005363490432500839, 0.0015120478346943855, 0.0006667550769634545, -0.002701991703361273, 0.003349880687892437, -0.00792927760630846, 0.0032744163181632757, -0.03704747185111046, -0.014945621602237225, 0.024649232625961304, 0.019907861948013306, -0.023220930248498917, -0.00650465814396739, -0.003463997505605221, -0.0004518657806329429, 0.0023927718866616488, -0.028624914586544037, -7.040271157165989e-05, 0.02780032902956009, 0.04582342132925987, -0.006795471999794245, 0.004686151631176472, -0.017478277906775475, -0.004156060516834259, 0.011978584341704845, -0.02872798778116703, 0.005569636821746826, 0.014724750071763992, 0.02934642694890499, 0.000606475630775094, -0.011588378809392452, -0.019201073795557022, -0.002136929426342249, -0.0290666576474905, -0.025488542392849922, -0.004995371680706739, -0.0009110938990488648, 0.009217693470418453, -0.02607753314077854, 0.015946904197335243, 0.017124883830547333, 0.03257114812731743, -0.0008798038470558822, -0.009828770533204079, 0.018405938521027565, -0.016933463513851166, -0.012501312419772148, -0.01610887609422207, 0.027947574853897095, -0.01769915036857128, -0.02358905039727688, -0.018435386940836906, 0.006210163235664368, 0.009902394376695156, -0.0017089913599193096, -0.011131911538541317, -0.00017474137712270021, 0.0011402477975934744, 0.001169697381556034, 0.015652408823370934, 0.012398239225149155, -0.05377478897571564, -0.008304758928716183, 0.012361427769064903, 0.015387363731861115, -0.003336996538564563, -0.009526913054287434, -0.02545909211039543, -0.005893581081181765, -0.006648224778473377, 0.042053885757923126, 0.008893748745322227, 0.0011761394562199712, 0.007575883995741606, 0.016874562948942184, 0.0015645046951249242, -0.001269089407287538, 0.016211949288845062, 0.03109867312014103, 0.013583581894636154, 0.01089631486684084, -0.0028860510792583227, -0.010712255723774433, -0.026121707633137703, -0.0359283909201622, -0.019215798005461693, -0.006688717752695084, 0.0030848351307213306, -0.00024065763864200562, 0.014864635653793812, -0.01392961386591196, 0.016697866842150688, -0.0054702446796, -0.015740757808089256, 0.03507435321807861, -0.03316013887524605, 0.013738191686570644, -0.007483854424208403, 0.02722606249153614, 0.02006983384490013, -0.02514987252652645, -0.03896168991923332, 0.01526956632733345, -0.04037526622414589, 0.02453143335878849, 0.0025050481781363487, -0.008967372588813305, -0.0016767808701843023, 0.0025731499772518873, -0.028536565601825714, 0.04108205437660217, 0.01509286928921938, 0.01945139467716217, -0.014157847501337528, -0.018347037956118584, -0.014341906644403934, -0.01553461141884327, 0.01979006454348564, 0.008768588304519653, -0.013605669140815735, -0.004969603382050991, 0.01120553445070982, 0.05003470182418823, -0.0377248115837574, 0.041729941964149475, 0.017272131517529488, 0.02360377460718155, -0.012913606129586697, -0.01374555379152298, -0.009652073495090008, 0.016064701601862907, -0.004641977604478598, 0.009784596040844917, -0.01643282175064087, -0.01856791041791439, 0.01789057068526745, 0.007966089993715286, -0.007450723554939032, -0.03115757182240486, -0.00024502904852852225, -0.007380781229585409, -0.004439512267708778, 0.014283007942140102, 0.038873340934515, 0.004840761423110962, -0.0032983440905809402, -0.007042111828923225, 0.017787497490644455, -0.0014844388933852315, -0.01672731526196003, -0.03849049657583237, 0.010115903802216053, 0.014113673008978367, 0.005967204924672842, 0.010653357021510601, -0.026092257350683212, 0.036635179072618484, -0.01887713000178337, -0.018950752913951874, -0.011014113202691078, 0.007818842306733131, 0.009549000300467014, 0.015961628407239914, 0.027432208880782127, -0.024693405255675316, 0.018435386940836906, 0.004494729917496443, 0.015195942483842373, -0.005013777408748865, 0.0018001006683334708, 0.009880307130515575, -0.037577562034130096, 0.042878471314907074, 0.011183448135852814, -0.01300931628793478, -0.015932179987430573, 0.025945009663701057, 0.000494199397508055, -0.0135983070358634, -0.0014283007476478815, 0.017493003979325294, 0.004612527787685394, 0.0011384072713553905, -0.005790507886558771, -0.010373586788773537, 0.024973176419734955, -0.01510759349912405, -0.018008369952440262, -0.01134542003273964, -0.03737141564488411, -0.014246195554733276, 0.02039377950131893, -0.03878499194979668, -0.0127000967040658, 0.0248259287327528, -0.019672265276312828, -0.010358861647546291, -0.0395212285220623, -0.0164917204529047, -0.04046361520886421, 0.011190810240805149, -0.00925450585782528, -0.0033977359998971224, -0.016830390319228172, -0.006725529674440622, 0.006177032832056284, 0.013811815530061722, 0.01940722018480301, -0.004958559758961201, 0.020246531814336777, -0.0323355495929718, -0.02308840863406658, -0.015210666693747044, 0.0007707486511208117, 0.011713538318872452, 0.010189526714384556, 0.048267729580402374, -0.011301245540380478, 0.016904013231396675, 0.0008029590244404972, 0.0038983775302767754, -0.022381620481610298, -0.015991078689694405, -0.005484969355165958, 0.02419276535511017, 0.014054774306714535, 0.03257114812731743, -0.007145185023546219, 0.03595783933997154, -0.01448915433138609, 0.0334840826690197, 0.019377771764993668, -0.016992362216114998, -0.0038063479587435722, -0.005381896160542965, -0.0022620896343141794, -0.021925153210759163, 0.004730326123535633, -0.022646665573120117, 0.04567617550492287, 0.01152211707085371, -0.0035247369669377804, -0.01178716216236353, -0.01408422365784645, 0.007303475867956877, -0.04658911004662514, 0.011028837412595749, 0.0028161085210740566, 0.0043106707744300365, -0.019583918154239655, -0.021321438252925873, 0.04193608835339546, 3.6840636312263086e-05, 0.018729882314801216, 0.011426405981183052, -0.010726980865001678, -0.020747173577547073, -0.040551960468292236, 0.020541027188301086, -0.008290034718811512, -0.025827212259173393, 0.012972504831850529, 0.017875846475362778, 0.013635118491947651, -0.006604050286114216, 0.012059570290148258, -0.010130628012120724, -0.004148698411881924, 0.02039377950131893, 0.019613366574048996, 0.04108205437660217, 0.006335323676466942, 0.01587328128516674, -0.0188624057918787, 0.0008526550373062491, 0.012295166030526161, 0.005168387200683355, 0.006129177287220955, 0.008636065758764744, -0.004491048865020275, 0.0209091454744339, 0.001388728036545217, -0.023132583126425743, 0.030362434685230255, 0.026121707633137703, -0.07503733038902283, 0.027432208880782127, 0.0128620695322752, -0.0173899307847023, -0.023265104740858078, 0.010373586788773537, -0.019893137738108635, -0.02002565935254097, -0.021733731031417847, 0.0454111285507679, 0.008937923237681389, -0.024045517668128014, 0.008319484069943428, -0.0009966815123334527, -0.030067939311265945, 0.02059992589056492, -0.0277708787471056, -0.01912745088338852, 0.01678621582686901, 0.010049642063677311, 0.009806683287024498, 0.020099284127354622, 0.022366896271705627, -0.0023817282635718584, -0.04667745903134346, -0.01730158179998398, 0.018744606524705887, -0.031245918944478035, 0.007811479736119509, -0.0278445016592741, 0.035162702202796936, 0.0024001342244446278, -0.021645382046699524, -0.008915835991501808, -0.0017954992363229394, 0.01762552559375763, -0.00552914384752512, -0.0038468409329652786, -0.014231471344828606, -0.023780470713973045, -0.01557878591120243, -0.037548113614320755, 0.03896168991923332, -0.026843219995498657, 0.018641533330082893, 0.023456526920199394, 0.0005604607868008316, -0.027873951941728592], "index": 47}, {"title": "Andy Sutcliffe", "text": "Andy Sutcliffe (born 9 May 1947 in Mildenhall, Suffolk \u2013 died 13 July 2015 in Pluckley, Kent) was a British former racing driver from England. After a promising start in Formula 3, his single attempt at Formula One was at the 1977 British Grand Prix with the RAM team, in a March 761. He failed to pre-qualify.", "vector": [0.023267796263098717, 0.0511021688580513, -0.024106554687023163, -0.03892463073134422, -0.01671304926276207, 0.06703858822584152, 0.014018148183822632, -0.018312904983758926, -0.024261880666017532, -0.030537040904164314, -0.052966076880693436, 0.008566214703023434, 0.017489679157733917, 0.04137877747416496, 0.014654983766376972, 0.05076045170426369, -0.020456399768590927, 0.02565981261432171, -0.06747350096702576, -0.05697348341345787, 0.05231371149420738, -0.013629834167659283, -0.04016723856329918, 0.030987486243247986, -0.011129089631140232, 0.008340992033481598, 0.0024910366628319025, 0.010204900987446308, -0.008931229822337627, -0.06958593428134918, -0.03373675048351288, 0.012620216235518456, 0.042994167655706406, -0.003504537045955658, -0.018576959148049355, 0.007020723540335894, 0.041782625019550323, -0.02499191276729107, -0.040136173367500305, 0.06865397840738297, -0.02825375273823738, -0.019664239138364792, -0.026902418583631516, 0.005032554268836975, -0.03280479833483696, 0.006143133156001568, -0.002473562490195036, -0.009785521775484085, -0.04460955411195755, 0.012480423785746098, 0.006698422599583864, -0.001643540570512414, 0.005921794101595879, -0.0035627842880785465, 0.0036035573575645685, 0.007304192986339331, -0.051381755620241165, 0.07741434872150421, -0.020829182118177414, -0.0063722385093569756, 0.003071566578000784, -0.009645728394389153, 0.002329886192455888, 0.01289980299770832, -0.0047063701786100864, -0.017101364210247993, 0.02851780690252781, 0.0015416080132126808, -0.0705178901553154, -0.025488954037427902, 0.015322884544730186, -0.031966038048267365, 0.0014930687611922622, 0.037029657512903214, 0.0002824986877385527, -0.016992636024951935, 0.013963784091174603, 0.027570320293307304, -0.08673389256000519, -0.006158665753901005, 0.003015260910615325, -0.08375164121389389, -0.0876658484339714, 0.0338299460709095, 0.013070661574602127, -0.04777820035815239, 0.03463764116168022, -0.07586109638214111, 0.07026936858892441, -0.003555017989128828, -0.013886121101677418, -0.03516574949026108, 0.02666942961513996, -0.0028405196499079466, 0.019990423694252968, -0.04215540736913681, 0.0381169356405735, -0.01530735194683075, -0.014748179353773594, -0.02555108442902565, -0.029574021697044373, -0.014530722983181477, 0.0345444455742836, -0.034109532833099365, 0.01890314370393753, -0.012938634492456913, -0.028331415727734566, -0.004531628452241421, 0.07213327288627625, 0.03898676112294197, 0.022832883521914482, -0.020363204181194305, -0.040384694933891296, -0.01926039159297943, -0.021528147161006927, 0.010616514831781387, 0.00956029910594225, 0.01515202596783638, 0.007506116759032011, -0.03184177726507187, 0.008263329975306988, 0.02544235624372959, -0.0425281897187233, 0.015392781235277653, 0.030583638697862625, -0.031546659767627716, 0.032929059118032455, -0.0004684042069129646, -0.002426964696496725, -0.013396845199167728, -0.041782625019550323, -0.017412016168236732, 0.00011776846076827496, 0.008706008084118366, 0.007785703055560589, -0.004764616955071688, -0.016837310045957565, 0.01789352484047413, 0.037992678582668304, 0.03504148870706558, -0.014678282663226128, -0.0016814011614769697, 0.0035783168859779835, 0.029698282480239868, 0.005187879782170057, -0.02508510835468769, 0.0009431184735149145, 0.019710836932063103, 0.002438614144921303, -0.02360951341688633, -0.02381143718957901, -0.03479296714067459, -0.021900929510593414, -0.04224860295653343, -0.0007771141245029867, 0.00824779737740755, -0.062409885227680206, 0.02477445639669895, 0.016992636024951935, -0.006360589060932398, -0.020207880064845085, 0.0475296787917614, -0.033861011266708374, -0.009785521775484085, -0.01747414655983448, -0.0070828539319336414, -0.06946167349815369, -0.02350078523159027, -0.02238244004547596, 0.019710836932063103, -0.034264858812093735, -0.0013445384101942182, 0.04277671128511429, 0.028300350531935692, 0.005308257415890694, 0.03243201598525047, -0.02881292626261711, 0.031236007809638977, 0.03190390765666962, 0.0038015975151211023, -0.0226930920034647, -0.006593578029423952, -0.008527383208274841, 0.009933081455528736, -0.012915335595607758, -0.025721943005919456, 0.03923528268933296, -0.015136493369936943, -0.0026774276047945023, -0.027912035584449768, -0.010103940032422543, 0.023081405088305473, 0.024960847571492195, 0.049331456422805786, 0.011160154826939106, 0.04557257145643234, -0.031096214428544044, -0.010080641135573387, -0.06790841370820999, -0.008504084311425686, -0.008651643991470337, -0.029605086892843246, -0.007117802277207375, 0.005844131112098694, -0.013319182209670544, 0.0008227410726249218, 0.027119874954223633, 0.07095280289649963, 0.023267796263098717, -0.03111174702644348, 0.028750795871019363, -0.00436853663995862, -0.0066867731511592865, 0.057874370366334915, 0.00034584247623570263, 0.041565168648958206, 0.02534916065633297, 0.030956421047449112, 0.03296012431383133, 0.009599130600690842, 0.0073663233779370785, -0.009140919893980026, -0.009265180677175522, -0.011641664430499077, 0.07157409936189651, 0.0027240251656621695, -0.037837352603673935, -0.025846203789114952, 0.006147016305476427, -0.04367759823799133, -0.02545788884162903, 0.02478998899459839, -0.009979679249227047, 0.02780330739915371, -0.011859120801091194, 0.003654038067907095, 7.141343667171896e-05, -0.005343205761164427, -0.0011989205377176404, -0.0030230272095650434, 0.0018619673792272806, 0.009769989177584648, 0.014258903451263905, -0.04547937586903572, -0.020611725747585297, 0.00453551160171628, 0.024044424295425415, -0.049393586814403534, -0.05663176625967026, -0.019990423694252968, 0.06359036266803741, -0.01556363981217146, -0.019446782767772675, -0.027523722499608994, -0.03463764116168022, -0.028269285336136818, -0.005801416467875242, -0.0028152791783213615, 0.004830630496144295, -0.004578226245939732, -0.031204942613840103, 0.0011620307341217995, 0.014903505332767963, 0.04405038058757782, -0.029247837141156197, -0.02611025795340538, -0.039017826318740845, -0.021170899271965027, -0.017909057438373566, -0.044329967349767685, 0.0431184247136116, 0.004558810498565435, -0.03662580996751785, -0.0331154502928257, 0.01380069274455309, -0.07058002054691315, -0.03755776584148407, -0.009265180677175522, -0.053028207272291183, -0.03224562481045723, -0.028937185183167458, 0.009078789502382278, -0.010189368389546871, -0.05604152753949165, -0.04019830375909805, 0.0016940213972702622, 0.04175155982375145, 0.002520160283893347, 0.014592853374779224, 0.016744114458560944, -0.0359734408557415, 0.00603052182123065, -0.011734860017895699, 0.020021488890051842, 0.01849929615855217, 0.037992678582668304, -0.050667256116867065, 0.011447506956756115, -0.008612812496721745, -0.01039905846118927, 0.037682026624679565, -0.00911762099713087, 0.005677156150341034, -0.0037472336553037167, -0.012356163002550602, 0.002791980281472206, -0.032121364027261734, -0.025100640952587128, -0.04190688580274582, -0.03243201598525047, -0.0418136902153492, 0.047902461141347885, -0.020829182118177414, 0.0172722227871418, 0.05796756595373154, -0.008170134387910366, 0.056600701063871384, -0.01295416709035635, -0.0067023057490587234, -0.025923866778612137, 0.01865462213754654, 0.0030366182327270508, -0.033239707350730896, -0.0034132832661271095, 0.08747945725917816, -0.044733814895153046, 0.03789948299527168, 0.04302522912621498, -0.0284712091088295, 0.007242062594741583, -0.023112470284104347, -0.015524808317422867, -0.007098386529833078, 0.030940888449549675, 0.0034928875975310802, -0.04619387537240982, -0.028704198077321053, 0.06014212965965271, -0.013194922357797623, 0.012231902219355106, 0.05069832131266594, -0.0032288338989019394, -0.02693348377943039, 0.029294434934854507, -0.03469977155327797, 0.03417166322469711, 0.08281968533992767, -0.01686837524175644, -0.012457124888896942, -0.022087320685386658, 0.0007096445187926292, 0.006329523865133524, 0.006853748578578234, 0.009777755476534367, -0.009086555801331997, 0.030071064829826355, -0.022258179262280464, -0.053028207272291183, -0.0007373119005933404, -0.001959045883268118, 0.05663176625967026, -0.030443845316767693, 0.005265542771667242, 0.03606663644313812, 0.009544766508042812, 0.044485293328762054, 0.0063722385093569756, -0.01588982343673706, 0.018763350322842598, 0.01736541837453842, -0.012441592290997505, 0.03662580996751785, -0.019508913159370422, 0.01967977173626423, -0.03839652240276337, -0.009055490605533123, -0.016060682013630867, 0.026187920942902565, -0.017846927046775818, -0.02601706236600876, -0.0028424609918147326, -0.023221198469400406, -0.06865397840738297, 0.013653133064508438, -0.030474910512566566, 0.012480423785746098, -0.023283328860998154, -0.012301798909902573, -0.015229688957333565, 0.043615467846393585, 0.01380069274455309, 0.031966038048267365, -0.0010688352631404996, -0.022149451076984406, 0.01584322564303875, -0.017039233818650246, 0.032276690006256104, 0.07200901210308075, 0.03122047521173954, -0.06865397840738297, -0.017536276951432228, -0.058278217911720276, 0.010189368389546871, -0.04103706032037735, 0.02927890233695507, -0.05128856003284454, -0.026296649128198624, -0.01310949306935072, 0.025566617026925087, -0.012394994497299194, 0.005692688282579184, -0.006084885913878679, -0.0012018328998237848, -0.007552714087069035, 0.02003702148795128, 0.00799927581101656, -0.00837982352823019, -0.027414994314312935, -0.047591809183359146, -0.012736710719764233, -0.045292988419532776, 0.017101364210247993, -0.016573257744312286, 0.032929059118032455, 0.015680134296417236, 0.028378013521432877, 0.0013222104171290994, 0.019291456788778305, 0.026048127561807632, -0.006376121658831835, -0.03086322546005249, 0.0022036840673536062, 0.00799927581101656, 0.01579662784934044, -0.005580077413469553, -0.005525713320821524, -0.0230503398925066, 0.038303326815366745, 0.05100897327065468, 0.06877823919057846, -0.03709178790450096, 0.008108003996312618, -0.06697645783424377, -0.004123898688703775, 0.00868270918726921, -0.058122891932725906, 0.012565853074193, -0.008496318012475967, 0.0017241158057004213, 0.018281839787960052, -0.006756669841706753, -0.013575470075011253, -0.01660432107746601, 0.04985956475138664, 0.03286692872643471, -0.015276286751031876, -0.00015204933879431337, 0.02457253262400627, -0.031034084036946297, -0.006247978191822767, 0.037029657512903214, 0.026700494810938835, 0.03317758068442345, -0.014740413054823875, -0.015656834468245506, 0.01034469436854124, 0.006570279132574797, -0.01675964705646038, -0.0198350977152586, -0.01279884111136198, 0.0007285748142749071, -0.028129491955041885, -0.0648019015789032, 0.02918570674955845, -0.0048112147487699986, 0.04985956475138664, 0.015369482338428497, -0.00623244559392333, 0.05507851019501686, -0.00039365366683341563, 0.024401674047112465, 0.021900929510593414, 0.005420868285000324, 0.010546618141233921, 0.05063619092106819, -0.015082129277288914, -0.02753925509750843, -0.005925677251070738, -0.04007404297590256, 0.007657559122890234, 0.028533339500427246, 0.029729347676038742, 0.0025026861112564802, 0.0016969337593764067, -0.03572491928935051, -0.011874653398990631, 0.01988169550895691, 0.027679046615958214, 0.018421633169054985, 0.014289968647062778, 0.008993360213935375, 0.041068125516176224, -0.008853567764163017, -0.023376524448394775, -0.03970126062631607, 0.0020464167464524508, 0.03333290293812752, 0.016946038231253624, -0.01722562499344349, -0.045044466853141785, 0.09120727330446243, 0.053835902363061905, 0.015043298713862896, -0.0015755854547023773, 0.027150940150022507, -0.035538531839847565, -0.028735263273119926, -0.012829906307160854, 0.022444570437073708, -0.02222711406648159, 0.007238179445266724, 0.026032594963908195, 0.0030074946116656065, 0.008830268867313862, -0.011028127744793892, -0.027818839997053146, 0.005102450493723154, -0.006275160238146782, 0.010181602090597153, -0.002246398478746414, 0.021233029663562775, 0.013303649611771107, -0.0011057251831516623, 0.01640239916741848, -0.04389505460858345, 0.02131069265305996, 0.017412016168236732, 0.005521830171346664, 0.023423122242093086, -0.018126513808965683, -0.0073003098368644714, -0.00853514950722456, -0.009195283986628056, 0.018266307190060616, 0.03622196242213249, -0.018219709396362305, 0.015882058069109917, -0.005894612055271864, -0.00750999990850687, -0.016588790342211723, -0.0037064605858176947, 0.008760372176766396, -0.01977296732366085, 0.0489586740732193, -0.010034043341875076, 0.01952444575726986, 0.01947784796357155, 0.0065663959830999374, -0.011144622229039669, 0.035383205860853195, -0.013101726770401001, -0.03734030947089195, -0.02892165258526802, 0.025923866778612137, 0.028067361563444138, 0.03111174702644348, -0.011874653398990631, 0.026436440646648407, -0.0618196465075016, -0.01305512897670269, 0.04523085802793503, -0.008271096274256706, -0.014903505332767963, 0.00650426559150219, -0.006313991267234087, -0.010764073580503464, 0.009971912950277328, 0.03317758068442345, -0.0029337150044739246, -0.0194157175719738, 0.017101364210247993, 0.009358376264572144, -0.0036501549184322357, 0.05458146706223488, -7.911905413493514e-05, 0.009870951063930988, -0.00901665911078453, -0.009956380352377892, -0.0201302170753479, -0.028191622346639633, -0.02059619314968586, -0.03215242922306061, -0.02626558393239975, 0.022164983674883842, -0.025271497666835785, 0.010305862873792648, 0.014173474162817001, 0.014740413054823875, -0.02472785860300064, -0.005428634583950043, 0.013963784091174603, 0.02249116823077202, -0.029558489099144936, -0.011012595146894455, -0.028222687542438507, -0.040446825325489044, -0.0010639813262969255, -0.012022212147712708, -0.013956017792224884, -0.012938634492456913, -0.025022977963089943, -0.02350078523159027, 0.018732285127043724, -0.025333628058433533, 0.02064279094338417, -0.015377248637378216, 0.03404740244150162, 0.006341173313558102, 0.030801095068454742, -0.002395899500697851, 0.007610961329191923, 0.009086555801331997, 0.03258734196424484, 0.026079192757606506, 0.03050597570836544, 0.010865035466849804, -0.025209367275238037, 0.019229326397180557, -0.0104534225538373, 0.042900972068309784, 0.04902080446481705, -0.010927165858447552, 0.02115536667406559, -0.01305512897670269, -0.025411291047930717, -0.0014746238011866808, -0.005149048287421465, 0.011657197028398514, 0.017800331115722656, -0.0003443862951826304, -0.008488551713526249, 0.011610599234700203, -0.024339543655514717, 0.028688665479421616, -0.020363204181194305, -0.03320864215493202, -0.009203050285577774, 0.02371824160218239, 0.012589151971042156, 0.047094766050577164, -0.017334353178739548, -0.03730924427509308, 0.03473083674907684, -0.017443081364035606, -0.03504148870706558, -0.05830928310751915, -0.005836364813148975, 0.03420272842049599, 0.00113387790042907, -0.022366907447576523, 0.018934208899736404, 0.004131664987653494, -0.025473421439528465, 0.03351929411292076, -0.03224562481045723, 0.023625046014785767, -0.011377610266208649, 0.006698422599583864, 0.0002854110498446971, -0.0034928875975310802, 0.00948263704776764, 0.01814204640686512, -0.027787774801254272, 0.021077703684568405, 0.02918570674955845, -0.007401271723210812, -0.0374024398624897, 0.023873567581176758, 0.022196048870682716, -0.01109025813639164, 0.039421673864126205, -0.04001191258430481, -0.013668665662407875, -0.012612449936568737, -0.018437165766954422, -0.001196008175611496, -0.0659823790192604, 0.032618407160043716, 0.01001851074397564, -0.017101364210247993, -0.0107796061784029, -0.010865035466849804, -0.021341757848858833, 0.0042442758567631245, -0.029729347676038742, -0.00873707327991724, -0.045510441064834595, -0.03202816843986511, -0.026809222996234894, -0.008706008084118366, -0.0005116041866131127, 0.0032754316926002502, 0.02595493197441101, -0.04249712452292442, -0.02171453833580017, 0.007370206527411938, -0.017054766416549683, 0.0030230272095650434, -0.021497083827853203, -0.022801818326115608, 0.0020425335969775915, -0.013280350714921951, -0.06163325533270836, 0.010026277042925358, 0.028393546119332314, 0.022149451076984406, 0.028843991458415985, 0.002762856660410762, -0.003426874289289117, -0.007704156916588545, -0.030925355851650238, -0.04265245050191879, -0.005642207805067301, -0.015858758240938187, -0.003688986413180828, 0.0011630015214905143, -0.013101726770401001, -0.015967486426234245, -0.01762947253882885, 0.0091719850897789, -0.030490443110466003, -0.012387228198349476, 0.054239749908447266, 0.012053277343511581, -0.008473019115626812, -0.014491891488432884, 0.02084471471607685, -0.04255925491452217, 0.01809544861316681, 0.012992998585104942, 0.0215592123568058, 0.00848078541457653, -0.007424570620059967, 0.014585087075829506, -0.00017061561811715364, -0.009505935944616795, -0.04103706032037735, -0.04081960394978523, -0.028191622346639633, 0.01860802434384823, -0.0005732490681111813, 0.0222737118601799, -0.00026284027262590826, -0.013474508188664913, -0.05321459844708443, -0.02407548949122429, -0.020891312509775162, 0.012635748833417892, -0.027880970388650894, -0.026389844715595245, -0.023842502385377884, 0.011385376565158367, -0.0048927608877420425, -0.00485392939299345, 0.05315246805548668, 0.01379292644560337, -0.007168283220380545, -0.0025279265828430653, 0.011517403647303581, 0.009140919893980026, 0.020922377705574036, -0.013031830079853535, 0.013047362677752972, 0.01870121993124485, 0.007708040066063404, 0.04743648320436478, 0.021792201325297356, 0.02611025795340538, 3.3370764867868274e-05, -0.0010086465626955032, -0.014755945652723312, 0.03761989623308182, -0.05100897327065468, 0.03907995671033859, -0.011098024435341358, 0.02084471471607685, -0.015439379028975964, -0.016107279807329178, -0.017505211755633354, 0.021838799118995667, 0.023190133273601532, 0.02146601863205433, -0.01568789966404438, -0.012045511044561863, 0.019788499921560287, -0.04880334809422493, 0.018048850819468498, 0.007443986367434263, 0.012550320476293564, -0.016728581860661507, -0.01823524199426174, -0.015804395079612732, -0.0018163403728976846, -0.007704156916588545, 0.02458806522190571, -0.019508913159370422, 0.023795904591679573, -0.01716349460184574, -0.02749265730381012, 0.023174600675702095, 0.03317758068442345, -0.012837672606110573, -0.007020723540335894, -0.007506116759032011, -0.01738095097243786, -0.0018483763560652733, -0.01767607033252716, 0.006733370944857597, -0.04436103254556656, 0.02693348377943039, -0.0072847772389650345, 0.018079916015267372, 0.012356163002550602, -0.01200667954981327, 0.021450486034154892, -0.0026055893395096064, 0.01860802434384823, -0.04007404297590256, 0.048927608877420425, -0.01584322564303875, -0.028082894161343575, 0.0007853658171370625, -0.044640619307756424, -0.03650154918432236, -0.007044022437185049, 0.01615387760102749, 0.01477147825062275, -0.005576194263994694, 0.0006130512920208275, 0.031298138201236725, 0.027197537943720818, -0.051226429641246796, -0.02708880975842476, -0.026545168831944466, -0.019244858995079994, -0.010733009316027164, 0.032276690006256104, -0.012076576240360737, 0.029372097924351692, -0.019089533016085625, 0.0162004753947258, -0.023128002882003784, -0.024261880666017532, 0.009948614053428173, -0.0396701954305172, 0.03209029883146286, 0.027834372594952583, -0.012457124888896942, -0.018716752529144287, -0.013280350714921951, 0.035134684294462204, 0.01644899696111679, -0.009886483661830425, -0.00539368623867631, 0.019943825900554657, 0.0008703095372766256, 7.226287561934441e-05, 0.017971187829971313, -0.06147792935371399, -0.03417166322469711, 0.01487244013696909, 0.010585449635982513, -0.011696028523147106, -0.051630277186632156, -0.05048086494207382, 0.020223412662744522, -0.0015056888805702329, 0.0023900747764855623, -0.012961933389306068, -0.006123717408627272, -0.006018872372806072, -0.021077703684568405, -0.05905484780669212, -0.0034249327145516872, 0.008185666985809803, -0.0183439701795578, 0.01387058850377798, 0.014445293694734573, -0.03581811487674713, -0.034979358315467834, -0.011866887100040913, 0.013948251493275166, -0.03693646192550659, -0.03504148870706558, 0.0008877837099134922, 0.00468695443123579, -0.01809544861316681, -0.010290330275893211, -0.020363204181194305, 0.023190133273601532, 0.00858174730092287, 0.01392495259642601, -0.01428220234811306, -0.006046054419130087, -0.002747324062511325, -0.008014808408915997, 0.012076576240360737, 0.0010931049473583698, -0.004201561212539673, 0.004492796957492828, -0.046939440071582794, 0.08201199024915695, -0.05231371149420738, 0.003281256416812539, 0.04762287437915802, 0.04501340165734291, -0.0649261623620987, 0.007544947788119316, 0.03336396813392639, 0.019291456788778305, -0.009537000209093094, 0.032276690006256104, -0.055327028036117554, -0.004422900732606649, -0.015470444224774837, -0.04721902683377266, 0.018825480714440346, -0.04460955411195755, -0.009700092487037182, 0.03327077254652977, -0.026250051334500313, 0.013637600466609001, -0.00468695443123579, 0.000857689359690994, 0.019229326397180557, 0.014934570528566837, -0.027011146768927574, -0.015175324864685535, -0.00512186624109745, -0.003102631773799658, -0.008317693136632442, -0.007525532506406307, 0.02392016537487507, 0.025628747418522835, -0.0532456636428833, 0.001654219115152955, -0.032214559614658356, 0.032214559614658356, -0.04563470184803009, -0.014554021880030632, 0.013684198260307312, -0.024805521592497826, -0.0010241791605949402, -0.00517623033374548, 0.04498233646154404, -0.008278862573206425, -0.01446082629263401, -0.0050053722225129604, 0.007847833447158337, 0.021590277552604675, -0.03721604868769646, 0.004104482941329479, -0.03345716372132301, 0.009078789502382278, -0.02350078523159027, 0.004178262315690517, 0.005549012217670679, -0.01644899696111679, -0.047343287616968155, -0.03246308118104935, -0.02524043247103691, -0.007055671885609627, 0.024292945861816406, -0.008729306980967522, -0.018778882920742035, 0.003399692242965102, 0.005618908908218145, 0.022444570437073708, 0.0269800815731287, 0.026995614171028137, -0.02892165258526802, -0.027011146768927574, 0.011820289306342602, -0.0063062249682843685, 0.006574162282049656, -0.007634260226041079, -0.061198342591524124, 0.01078737247735262, 0.02039426937699318, -0.018157579004764557, -0.03519681468605995, 0.00042253456194885075, -0.019804032519459724, -0.0037588831037282944, -0.018079916015267372, 0.009645728394389153, -0.003405516967177391, -0.007913846522569656, -0.008938996121287346, -0.006853748578578234, -0.03184177726507187, 0.025022977963089943, -0.016309203580021858, -0.015245221555233002, -0.03821013122797012, 0.04286990687251091, -0.03305331990122795, -0.008123536594212055, -0.018017785623669624, 0.007948795333504677, -0.012426059693098068, -0.03050597570836544, -0.01599855162203312, -0.02070492133498192, -0.014911271631717682, -0.029869141057133675, -0.019943825900554657, 0.0030133193358778954, -0.0004089435678906739, 0.04016723856329918, -0.0013115317560732365, 0.00666735740378499, 0.013886121101677418, -0.041720494627952576, -0.004760734271258116, 0.03404740244150162, -0.017815863713622093, 0.003498712321743369, 0.013575470075011253, -0.004236509557813406, -0.00021150997781660408, -0.012138706631958485, 0.029962336644530296, -0.01055438444018364, -0.04125451669096947, -0.03519681468605995, 0.031158344820141792, 0.061136212199926376, 0.011975615285336971, 0.04973530396819115, 0.01443752832710743, 0.008317693136632442, -0.004488913808017969, 0.04405038058757782, -0.007824534550309181, -0.009350609965622425, -0.021838799118995667, -0.007975976914167404, -0.029263369739055634, -0.02213391847908497, 4.213817373965867e-05, 0.009894249960780144, -0.00024148299416992813, -0.029698282480239868, -0.0017037292709574103, -0.005362621508538723, 0.006888696923851967, -0.029294434934854507, 0.049486782401800156, 0.00661687646061182, 0.0003523952909745276, -0.022087320685386658, -0.011385376565158367, 0.013761861249804497, -0.0043918355368077755, 0.008511850610375404, 0.02263096161186695, 0.01216200552880764, -0.015905356034636497, 0.013031830079853535, 0.005894612055271864, 0.0033220292534679174, 0.0020425335969775915, -0.004519979003816843, 0.002442497294396162, 0.020456399768590927, -0.021217497065663338, 0.009777755476534367, -0.009265180677175522, 0.0011717386078089476, 0.05448827147483826, -0.00671783834695816, 0.0012134823482483625, -0.011509637348353863, -0.012348396703600883, -0.017334353178739548, 0.003479296574369073, 0.030599171295762062, 0.015579172410070896, -0.03836545720696449, -0.00047325811465270817, -0.0069857751950621605, 0.004881111439317465, -0.0007581837708130479, -0.014678282663226128, -0.015058830380439758, -0.0033977506682276726, 0.04150303825736046, -0.03162432089447975, 0.016697516664862633, -0.004298639949411154, -0.05405335873365402, -0.009537000209093094, -0.00044753230758942664, 0.012154239229857922, -0.005362621508538723, 0.01275224331766367, -0.009443805553019047, -0.019400184974074364, -0.002623063512146473, -0.0021473783999681473, 0.048213109374046326, -0.03777522221207619, -0.046318136155605316, -0.0037161684595048428, -0.05318353325128555, -0.04193795099854469, -0.013707497157156467, -0.01014277059584856, -0.007156633771955967, -0.011859120801091194, -0.031810712069272995, 0.014476358890533447, 0.02300374209880829, 0.010880568064749241, -0.01696157082915306, -0.01738095097243786, 0.012845438905060291, 0.0008096354431472719, 0.00021102458413224667, -0.017132429406046867, -0.02186986431479454, 0.01905846782028675, 0.0026560702826827765, -0.016573257744312286, 0.016790712252259254, 0.04672198370099068, -0.008845801465213299, -0.017877992242574692, -0.005098567344248295, 0.02075151912868023, -0.03976339101791382, 0.0070673213340342045, -0.007968210615217686, 0.012177538126707077, -0.0073507907800376415, 0.0008795320172794163, 0.011556235142052174, -0.03039724752306938, -0.02309693768620491, -0.024510402232408524, 0.03392314165830612, 0.019788499921560287, -0.02514723874628544, 0.03699859231710434, -0.008069172501564026, -0.011602832935750484, 0.028424611315131187, -0.03780628740787506, -0.003339503426104784, 0.01035246066749096, 0.01338907890021801, -0.005941209848970175, 0.018514828756451607, -0.009032191708683968, -0.012969699688255787, 0.0036676290910691023, -0.04088173434138298, -0.00020253020920790732, 0.007785703055560589, -0.014484125189483166, -0.0016814011614769697, -0.009039958007633686, 0.04358440265059471, -0.011268883012235165, 0.024463804438710213, -0.012783308513462543, -0.00869047548621893, -0.02626558393239975, 0.002232807455584407, 0.018639089539647102, -0.01952444575726986, 0.005017021670937538, 0.005094684194773436, 0.006690656300634146, 0.011478572152554989, 0.007696390617638826, -0.007700273767113686, 0.006383887957781553, 0.00879143737256527, 0.014095811173319817, -0.001004763413220644, 0.007902197539806366, -0.023842502385377884, -0.030086597427725792, -0.007117802277207375, 0.013070661574602127, 0.011998913250863552, -0.012829906307160854, 0.0241220872849226, -0.03215242922306061, -0.02079811692237854, 0.021761136129498482, 0.006011106073856354, 0.009669027291238308, 0.04159623384475708, -0.02100004069507122, -0.00581306591629982, -0.00367927853949368, -0.01814204640686512, -0.041005995124578476, 0.046535592526197433, 0.011579534038901329, 0.0324009507894516, 0.02162134274840355, 0.0019075942691415548, 0.027787774801254272, -0.015136493369936943, 0.019027404487133026, 0.006779968738555908, -0.03010213002562523, -0.02575300820171833, -0.021062171086668968, -0.006294575985521078, -0.011851354502141476, -0.007292543537914753, 0.0059373266994953156, 0.009459338150918484, -0.0011513520730659366, -0.03137579932808876, -0.05417761951684952, -0.020192347466945648, -0.005028671119362116, 0.021481551229953766, 0.012728944420814514, -0.0720711424946785, 0.0410991907119751, 0.013637600466609001, -0.009630195796489716, 0.02207178808748722, 0.0068343328312039375, 0.0011552352225407958, 0.004279224202036858, -0.018219709396362305, 0.04296310245990753, 0.0057237534783780575, 0.0006989658577367663, -0.012977465987205505, -0.01359100267291069, 0.02253776602447033, -0.008845801465213299, -0.002359009813517332, -0.021481551229953766, -0.01188241969794035, 0.02390463277697563, -0.008845801465213299, -0.011688262224197388, 0.029977869242429733, -0.02646750584244728, 0.009777755476534367, -0.024712326005101204, -0.032214559614658356, 0.002492978237569332, -0.01579662784934044, -0.02140388824045658, 0.0029045913834124804, -0.020471932366490364, -0.031453464180231094, 0.006150899454951286, 0.026591766625642776, -0.014064745977520943, 0.0031569956336170435, -0.026172388345003128, 0.027275200933218002, 0.013901653699576855, 0.03907995671033859, -0.020627258345484734, 0.02054959535598755, -0.032773733139038086, 0.04743648320436478, -0.009366142563521862, 0.032618407160043716, -0.007564363535493612, -0.010135005228221416, 0.003980222158133984, 0.02390463277697563, 0.0010426240041851997, -0.003984105307608843, -0.015633536502718925, -0.025287030264735222, -0.004997605923563242, 0.032680537551641464, 0.005358738359063864, 0.018934208899736404, -0.02718200534582138, -0.0027143172919750214, 0.012356163002550602, -0.009047724306583405, 0.03041278012096882, 0.026840288192033768, -0.01803331822156906, 0.03603557124733925, 0.03157772496342659, -0.0022638726513832808, 0.006112067960202694, 0.014491891488432884, -0.03055257350206375, 0.0027803308330476284, -0.015027766115963459, 0.014856907539069653, -0.006578045431524515, -0.036967527121305466, 0.01310949306935072, -0.0662309005856514, -0.01870121993124485, 0.02314353547990322, 0.03358142450451851, 0.006061587017029524, 0.017645005136728287, -0.011082491837441921, 0.027119874954223633, -0.007168283220380545, -0.031204942613840103, 0.012379461899399757, -0.01742754876613617, 0.01295416709035635, -0.0007931320578791201, -0.05784330517053604, -0.03404740244150162, 0.003339503426104784, 0.007774053607136011, -0.014647217467427254, 0.015478210523724556, -0.0066207596100866795, -0.0226930920034647, -0.017645005136728287, 0.009839885868132114, 0.03485509753227234, -0.023314394056797028, -0.036315158009529114, 0.004659772384911776, 0.007005190942436457, -0.00016005832003429532, -0.008519616909325123, 0.016014084219932556, -0.009459338150918484, 0.016014084219932556, -0.021683473140001297, -0.009513702243566513, -0.01595195382833481, -0.0024444388691335917, -0.0042947567999362946, -0.014484125189483166, 0.0012484306935220957, -0.002273580525070429, -0.017753733322024345, -0.0021473783999681473, -0.05277968943119049, -0.005036437418311834, 0.007758521009236574, -0.022366907447576523, 0.005999456625431776, -0.006915878504514694, -0.008030341006815434, -0.02247563563287258, -0.002617238787934184, -0.009785521775484085, -0.03789948299527168, 0.009086555801331997, -0.03463764116168022, 0.046380266547203064, 0.03839652240276337, 0.011564001441001892, 0.03336396813392639, 0.040136173367500305, -0.0022755220998078585, -0.003252132795751095, -0.0018619673792272806, 0.016138345003128052, 0.009443805553019047, 0.030133193358778954, -0.014538489282131195, 0.007428453769534826, -0.016309203580021858, 0.028129491955041885, 0.004395718686282635, -0.003859844757243991, 0.017505211755633354, -0.011750392615795135, -0.028129491955041885, 0.017256690189242363, 0.012029978446662426, -0.0104534225538373, 0.006430485751479864, 0.015835460275411606, 0.02146601863205433, -0.015229688957333565, -0.009249648079276085, -0.03510361909866333, -0.016790712252259254, 0.03003999963402748, 0.04532405361533165, -0.016946038231253624, -0.018918676301836967, -0.03994978219270706, -0.02488318458199501, -0.003209418151527643, 0.009948614053428173, 0.02028554119169712, 0.025877268984913826, -0.007840067148208618, -0.0042287432588636875, -0.012837672606110573, -0.008348758332431316, -0.019912760704755783, -0.007587662432342768, -0.03342609852552414, -0.011074725538492203, 0.002941481303423643, 0.01481807604432106, 0.014755945652723312, -0.013093960471451283, 0.009568065404891968, 0.0018998279701918364, 0.024960847571492195, -0.025333628058433533, 0.02503851056098938, -0.00490441033616662, -0.016014084219932556, 0.003155054058879614, 0.0010241791605949402, -0.03041278012096882, -0.0008688533562235534, -0.010391292162239552, 0.026343246921896935, -0.00709062023088336, 0.017707135528326035, -0.016681984066963196, 0.012767775915563107, -0.015920888632535934, 0.028331415727734566, 0.00027279084315523505, 0.02222711406648159, 0.008053639903664589, -0.03101855143904686, 4.659772457671352e-05, -0.007630377076566219, -0.03296012431383133, 0.04451635852456093, 0.01874781772494316, 0.012394994497299194, -0.010958231054246426, -0.027275200933218002, -0.030474910512566566, -0.028067361563444138, 0.02753925509750843, 0.022506700828671455, 0.0035064786206930876, 0.010841736570000648, -0.02253776602447033, 0.04355333745479584, -0.025939399376511574, -0.03342609852552414, -0.0453861840069294, -0.016340268775820732, -0.003838487435132265, -0.03317758068442345, 0.023019274696707726, 0.018048850819468498, -0.012426059693098068, -0.007723572663962841, -0.030335117131471634, 0.0023900747764855623, -0.007078970782458782, 0.014856907539069653, 0.028036296367645264, 0.012472657486796379, -0.007059555035084486, 0.00327737326733768, -0.043460141867399216, -0.02677815780043602, -0.017101364210247993, 1.473622614867054e-05, -0.002339594066143036, 0.00019015268480870873, 0.010430123656988144, 0.018514828756451607, 0.02298820950090885, 0.011835821904242039, -0.008286628872156143, 0.01001851074397564, -0.016883907839655876, -0.008154601790010929, -0.003380276495590806, 0.011532936245203018, 0.0060227555222809315, -0.010034043341875076, -0.003292905865237117, 0.008768138475716114, 0.02253776602447033, 0.00787889864295721, -0.01997489109635353, -0.038769304752349854, -0.01655772514641285, -0.027414994314312935, 0.003714226884767413, -0.0030424429569393396, -0.032773733139038086, -0.012014445848762989, 0.0295429565012455, 0.03106514923274517, -0.03693646192550659, -0.0034967707470059395, -0.01408027857542038, 0.03566278889775276, -0.007657559122890234, -0.007762404158711433, 0.014002615585923195, -0.010282563976943493, -0.0070828539319336414, 0.0016066506505012512, -0.03050597570836544, 0.005145165137946606, 0.016216007992625237, -0.017349885776638985, -0.015835460275411606, -0.01818864420056343, -0.00907102320343256, -0.04370866343379021, -0.036253027617931366, -0.008309926837682724, 0.018359502777457237, 0.016169410198926926, -0.026545168831944466, -0.010088407434523106, -0.004807331599295139], "index": 48}, {"title": "Perry Greeley Holden", "text": "Perry Greeley Holden (October 13, 1865 \u2013 October 8, 1959) was the first professor of agronomy in the United States.", "vector": [-0.042185183614492416, -0.013899726793169975, -0.01151136215776205, 0.005064860451966524, -0.02779945358633995, -0.026771901175379753, -0.0301878172904253, -0.01803770661354065, 0.024897312745451927, 0.042935021221637726, -0.05340494215488434, 0.0007897571776993573, -0.009067454375326633, 0.00041939577204175293, 0.01438573095947504, 0.026466412469744682, -0.01741284504532814, 0.030215589329600334, -0.03271504119038582, -0.003122578375041485, 0.06187530606985092, -0.06559671461582184, -0.007234523072838783, 0.04335159435868263, 0.06726301461458206, 0.002051633084192872, -0.00758166890591383, 0.003648504614830017, 0.05215521901845932, 0.03235400840640068, 0.017607245594263077, 0.014607904478907585, 0.0387137234210968, 0.016413064673542976, -0.006477744784206152, -0.04346268251538277, -0.04274061694741249, -0.01745450124144554, 0.008616164326667786, 0.022522833198308945, -0.008956367149949074, 0.0156493429094553, -0.013024918735027313, 0.041963011026382446, 0.00763721251860261, 0.034492429345846176, -0.011053129099309444, -0.014031642116606236, -0.029382439330220222, 0.0384637787938118, -0.015107794664800167, 0.018884742632508278, 0.0007146868738345802, -0.030076730996370316, -0.005648065824061632, 1.2102649407097488e-06, 0.009324342012405396, 0.10842064768075943, -0.011858507990837097, -0.024105818942189217, -0.05626542866230011, 0.010004748590290546, -0.04662865400314331, -0.005960497073829174, 0.04271284490823746, 0.0024734153412282467, -0.012670829892158508, 0.01569100096821785, -0.013892783783376217, 0.028715919703245163, 0.03477014601230621, -0.03474237397313118, 0.013837240636348724, 0.04865598678588867, 0.023841988295316696, -0.023744788020849228, 0.041574206203222275, -0.009664544835686684, 0.005172475706785917, -0.0055959937162697315, -0.06926257163286209, -0.035075634717941284, 0.018093250691890717, 0.0241752490401268, -0.012622229754924774, -0.027507850900292397, 0.021273108199238777, -0.042851705104112625, 0.015191109851002693, 0.014677333645522594, -0.0012037288397550583, 0.07120659202337265, 0.01182379387319088, 0.011615505442023277, -0.019342975690960884, 0.03699187934398651, -0.02935466729104519, -0.009129940532147884, 0.057487379759550095, 0.0019231889164075255, -0.03510340675711632, -0.006328471936285496, -0.006224328186362982, -0.01509390864521265, -0.03282612934708595, 0.03235400840640068, -0.05684863403439522, 0.01967623643577099, 0.046212077140808105, 0.05887596681714058, 0.025661034509539604, -0.030687708407640457, 0.0001145581845776178, 0.023355985060334206, 0.00043349858606234193, 0.01913468912243843, -0.026494184508919716, 0.0004873062134720385, -0.013233206234872341, 0.010074177756905556, -0.02585543505847454, -0.022564491257071495, -0.0038255490362644196, 0.02182854153215885, 0.014038585126399994, -0.04318496584892273, -0.022203460335731506, 0.0026764958165585995, 0.022522833198308945, -0.04857267066836357, -0.026799673214554787, 0.01896805875003338, 0.01240005623549223, -0.006467330269515514, -0.013670610263943672, 0.03668639063835144, 0.08925818651914597, 0.044795721769332886, 0.0408521443605423, 0.046434253454208374, -0.021509166806936264, 0.024466851726174355, -0.05176641419529915, 0.00439833989366889, -0.018357081338763237, -0.041963011026382446, -0.06598551571369171, 0.02196739986538887, -0.021286994218826294, 0.026410868391394615, -0.012879117392003536, -0.002905612112954259, 0.0632638931274414, -0.03054885007441044, -0.013510922901332378, -0.052488479763269424, 0.027785567566752434, -0.021314766258001328, -0.06742963939905167, -0.02577212080359459, -0.020217783749103546, 0.02461959607899189, -0.012122338637709618, 0.03815829008817673, -0.012233425863087177, -0.022383974865078926, -0.0204677302390337, 0.014649561606347561, 0.00027099085855297744, -0.002839654451236129, 0.014843964017927647, -0.04062997177243233, 0.02854928933084011, -0.0314653143286705, -0.05993128940463066, 0.004929473623633385, 0.037908345460891724, 0.00917159765958786, -0.02439742162823677, 0.0060438122600317, -0.03185411915183067, 0.013663667254149914, 0.024244677275419235, 0.014059414155781269, -0.001092642080038786, 0.009886718355119228, 0.026813559234142303, 0.08120439946651459, -0.015746543183922768, 0.0014875206397846341, -0.03390922397375107, 0.00655411696061492, -0.056820861995220184, 0.022731121629476547, 0.023175468668341637, -0.005044031888246536, -0.04940582066774368, -0.013726153410971165, -0.06065335124731064, -0.008671707473695278, -0.020120583474636078, -0.033881451934576035, -0.011129501275718212, 0.008518963120877743, -0.02502228505909443, -0.007036649622023106, 0.0050544459372758865, 0.07148430496454239, 0.0011082636192440987, 0.010442152619361877, 0.027646709233522415, -0.04446246102452278, 0.008824451826512814, 0.0407688282430172, -0.007533068768680096, 0.025133371353149414, 0.005672365892678499, -0.008879994973540306, -0.017621131613850594, 3.1527908959105844e-06, 0.005585579667240381, -0.003301358548924327, -0.012990203686058521, 0.005925782490521669, 0.002213055966421962, -0.03999122232198715, -0.01971789449453354, 0.011053129099309444, -0.010011691600084305, -0.029910100623965263, -0.03107651136815548, -0.014982822351157665, -0.030882110819220543, 0.05732075124979019, -0.03746400028467178, 0.03915807232260704, -0.03488123044371605, 0.0276328232139349, 0.0042212954722344875, -0.03093765303492546, 0.010449095629155636, 0.013254035264253616, -0.04704522714018822, -0.023106038570404053, -0.014274644665420055, 0.03788057342171669, -0.03743622824549675, -0.06926257163286209, -0.01380946859717369, 0.02130088023841381, 0.028799233958125114, -0.04610099270939827, 0.014087185263633728, -0.029632383957505226, 0.016565807163715363, -0.007421982008963823, 0.034020308405160904, -0.009935319423675537, 0.02227288857102394, 0.005040560383349657, -0.03252064064145088, 0.032242923974990845, 0.00693944888189435, -0.005335634108632803, -0.025605490431189537, -0.02152305282652378, 0.0033308661077171564, 0.026577498763799667, 0.01702404022216797, -0.018662570044398308, -0.010678211227059364, -0.013122119940817356, 0.013184606097638607, 0.05184973031282425, 0.03210406377911568, 0.00037860614247620106, -0.028938092291355133, 0.012483370490372181, -0.007130379322916269, 0.01233062706887722, -0.020259441807866096, -0.04462909325957298, 0.017954392358660698, -0.04462909325957298, -0.006519402377307415, -0.003013227367773652, -0.020453844219446182, -0.02466125413775444, 0.024230793118476868, -0.04865598678588867, -0.023925304412841797, -0.009553458541631699, -0.0039053927175700665, 0.0410187728703022, -0.0006226931582204998, -0.0008335844031535089, 0.000454327353509143, -0.02480011247098446, 0.006595774553716183, -0.04201855510473251, 0.08703645318746567, 0.011178101412951946, 0.029465753585100174, 0.00489475904032588, 0.003940107300877571, -0.04918364807963371, -0.021995171904563904, -0.03563106805086136, 0.018843086436390877, -0.040602199733257294, 0.0006300700479187071, 0.0037838916759938, 0.04857267066836357, 0.0230227243155241, 0.002466472564265132, 0.009254912845790386, 0.03565884009003639, 0.09120219945907593, -0.006613131612539291, -0.02907695062458515, -0.05015565827488899, -0.007352552842348814, -0.009567344561219215, -0.0528772808611393, 0.010317179374396801, 0.006463858764618635, -0.011761306785047054, 0.008414819836616516, 0.01363589521497488, 0.0132401492446661, -0.049211420118808746, -0.051072120666503906, 0.017246214672923088, -0.02073156088590622, 0.04190746694803238, -0.06965138018131256, -0.010393551550805569, 0.034325797110795975, -0.028521517291665077, -0.0014319773763418198, -0.0217868834733963, -0.011094787158071995, -0.011525248177349567, 0.030965425074100494, 0.040907688438892365, -0.022745007649064064, 0.08986916393041611, 0.02913249470293522, 0.00431849667802453, 0.0012627436080947518, 0.0005858088843524456, -0.0013989984290674329, -0.0011881073005497456, -0.0013304371386766434, 0.0065923030488193035, 0.02231454662978649, -0.028146598488092422, -0.009296569973230362, 0.02793831191956997, 0.010247750207781792, 0.005995211657136679, -0.03682525083422661, 0.04848935455083847, 0.03646421805024147, -0.008317618630826473, 0.03077102266252041, -0.0032024220563471317, 0.012587514705955982, 0.01816267892718315, -0.010608782060444355, -0.027507850900292397, 0.03210406377911568, 0.010532409884035587, -0.0004651756607927382, -0.01120587345212698, -0.032603953033685684, 0.007505296729505062, 0.01674632355570793, -0.022661691531538963, -0.02103704959154129, 0.02678578719496727, 0.029465753585100174, 0.011122558265924454, -0.00138424476608634, -0.04504566639661789, -0.06709638237953186, 0.008435647934675217, 0.00738032441586256, 0.007880214601755142, -0.05698749050498009, -0.024786226451396942, 0.004703828599303961, 0.0133442934602499, 0.009699259884655476, 0.027466192841529846, 0.007845500484108925, 0.02761893719434738, -0.012858288362622261, 0.05604325234889984, -0.006061169318854809, 0.020134469494223595, -0.06193085014820099, -0.00915076956152916, 0.019523492082953453, 0.013552580960094929, -0.004495541099458933, 0.003060092218220234, 0.054654669016599655, 0.021273108199238777, 0.020176127552986145, -0.005818167235702276, 0.01025469321757555, -0.038519322872161865, 0.01873200014233589, 0.009935319423675537, -0.0026851745788007975, 0.01603814586997032, 0.02064824476838112, 0.023175468668341637, 0.033353790640830994, 0.028438201174139977, 0.029271353036165237, -0.026147037744522095, -0.016829639673233032, 0.010067234747111797, -0.019995611160993576, 0.026758015155792236, 0.011421103961765766, 0.0006795383524149656, 0.0436570830643177, -0.013969155959784985, 0.020745446905493736, 0.03310384601354599, 0.015607684850692749, 0.01553825568407774, 0.0026712885592132807, 0.023439299315214157, 0.0276328232139349, 0.045878816395998, 0.06081998348236084, -0.008630050346255302, -0.034186940640211105, -0.04049111157655716, 0.014649561606347561, -0.07220637053251266, -0.038213834166526794, -0.03263172507286072, -0.0059674400836229324, 0.0005163797177374363, 0.029854558408260345, -0.019148575142025948, 0.025036171078681946, 0.012518085539340973, 0.016996270045638084, -0.0074080959893763065, -0.029160264879465103, -0.011143387295305729, -0.00028118828777223825, 0.003874149639159441, 0.014594018459320068, 0.008039901964366436, 0.0005476228543557227, 0.025702690705657005, -0.021578596904873848, -0.05282173678278923, 0.012094567529857159, 0.008720307610929012, 0.0003041866875719279, -0.015524369664490223, -0.0016012110281735659, 0.011629391461610794, 0.01980120874941349, -0.0035999042447656393, 0.03849155083298683, -0.00040312332566827536, 0.005391177721321583, -0.0015656285686418414, 0.05246070772409439, 0.014871735125780106, 0.039185844361782074, 0.0018815314397215843, -0.0230227243155241, -0.026674700900912285, 0.0031937432941049337, 0.04279616102576256, -0.016871295869350433, 0.03907475620508194, 0.001379905384965241, 0.010400494560599327, 0.05632096901535988, -0.03288166970014572, 0.04462909325957298, -0.01080318447202444, 0.012761088088154793, 0.040907688438892365, 0.034631285816431046, 0.019551264122128487, 0.038436006754636765, -0.017871076241135597, 0.03263172507286072, 0.013045747764408588, 0.015885401517152786, 0.027605051174759865, -0.019079145044088364, -0.028632603585720062, 0.011344731785356998, 0.03849155083298683, -0.023966960608959198, 0.0432405099272728, 0.01573265716433525, 0.001191578689031303, 0.051905274391174316, 0.00833150465041399, 0.03965796157717705, 0.04640648141503334, 0.00046127027599141, -0.011323902755975723, -0.0008791473228484392, 0.019467948004603386, 0.041352033615112305, -0.008435647934675217, 0.0012297647772356868, -0.02431410737335682, 0.0020776689052581787, 0.007185922469943762, 0.04482349380850792, -0.02271723560988903, -0.033603735268116, 0.026049837470054626, -0.008921653032302856, 0.010726812295615673, -0.01688518188893795, -0.026049837470054626, 0.008761965669691563, 0.024494623765349388, 0.023633701726794243, -0.011233645491302013, 0.06015346199274063, 0.03435356914997101, -0.012545857578516006, -0.02966015599668026, 0.013254035264253616, 0.037325140088796616, -0.041046544909477234, 0.0435737669467926, 0.028368772938847542, -0.022800549864768982, 0.018620911985635757, 0.012198710814118385, 0.011546076275408268, 0.0384637787938118, -0.0029594197403639555, -0.023133810609579086, 0.012122338637709618, 0.06881822645664215, 0.019690122455358505, -0.050766635686159134, -0.007741356268525124, 0.00961594469845295, -0.009317399002611637, -0.017315642908215523, -0.014746762812137604, -0.04582327604293823, 0.0063423579558730125, -0.07559451460838318, 0.002933383919298649, 0.015927059575915337, 0.024675138294696808, 0.0484338141977787, -0.00693944888189435, -0.01626032032072544, -0.02255060523748398, -0.0035894899629056454, 0.03982459008693695, -0.020620472729206085, 0.004662171006202698, -0.022689463570713997, -0.04099100083112717, -0.05804281309247017, -0.021731341257691383, 0.004183109384030104, 0.0035651896614581347, 0.001058795372955501, -0.0278411116451025, -0.03235400840640068, -0.005248847883194685, -0.004276839084923267, 0.02816048450767994, -0.02714681811630726, -0.04507343843579292, -0.04054665565490723, -0.021717455238103867, 0.0005853750044479966, 0.0022564490791410208, 0.014968936331570148, -0.03690856322646141, -0.008456476964056492, -0.025536060333251953, -0.039046984165906906, 0.042990561574697495, -0.00414492329582572, 0.026313668116927147, -0.04229627177119255, -0.02338375523686409, -0.007345609832555056, -0.0386304073035717, -0.003915807232260704, -0.01056712493300438, 0.026882987469434738, -0.00270253187045455, 0.008150988258421421, -0.006658260710537434, 0.010511581785976887, -0.0048045008443295956, -0.008081559091806412, 0.008109331130981445, -0.012059852480888367, 0.01856536976993084, 0.03735291212797165, 0.012858288362622261, 0.0770941898226738, -0.0007307423511520028, -0.044045887887477875, 0.0008327165269292891, 0.02143973857164383, 0.0064881592988967896, -0.02431410737335682, -0.02741065062582493, -0.006606188602745533, -0.01605203188955784, -0.009456257335841656, -0.025966523215174675, -0.0361587293446064, -0.028743689879775047, -0.005686251912266016, -0.03482569009065628, -0.012358398176729679, 0.047850608825683594, 0.0034853459801524878, 0.024564052000641823, 0.009824232198297977, -0.004578855820000172, -0.031132055446505547, -0.01741284504532814, -0.032159607857465744, 0.018856972455978394, 0.026105381548404694, 0.0042803105898201466, 0.0015100851887837052, -0.004019950982183218, 0.02709127590060234, -0.05482130125164986, 0.02125922217965126, -0.005873710848391056, 0.03346487507224083, -0.03699187934398651, -0.02259226329624653, -0.051738642156124115, 0.026188695803284645, 0.00432196818292141, -0.0027459249831736088, 0.017968278378248215, -0.010525466874241829, 0.011872394010424614, 0.024994513019919395, 0.0040685515850782394, -0.017496159300208092, 0.019148575142025948, 0.040018994361162186, 0.01127530261874199, -0.011615505442023277, -0.005068331956863403, 0.016496378928422928, -0.005398120731115341, 0.002650459762662649, -0.026452526450157166, -0.04201855510473251, 0.013823354616761208, -0.03629758954048157, 0.008435647934675217, -0.008560621179640293, 0.013844183646142483, -0.012066795490682125, -0.005276619456708431, -0.02081487514078617, 0.005731381010264158, -0.010747640393674374, 0.04840604215860367, -0.0019891466945409775, 0.04343491047620773, -0.008067673072218895, 0.01215705368667841, -4.5942604629090056e-05, 0.02346707135438919, 0.009567344561219215, -0.009622887708246708, 0.021273108199238777, -0.029243580996990204, -0.03899144008755684, -0.005953554064035416, -0.023106038570404053, 0.04723963141441345, -0.0048045008443295956, -0.002999341581016779, 0.01882920041680336, -0.01191405113786459, -0.012205653823912144, -0.04057442769408226, -0.023855874314904213, -0.001143846195191145, 0.01714901253581047, 0.012844402343034744, 0.003497496247291565, 0.0067832330241799355, 0.020481614395976067, -0.057487379759550095, 0.020009497180581093, 0.014982822351157665, -0.005398120731115341, -0.01821822300553322, 0.0033447518944740295, 0.040463339537382126, -0.0009902339661493897, -0.004679528530687094, 0.0008292450802400708, 0.011997366324067116, -0.018593139946460724, 0.03576992452144623, -0.024564052000641823, 0.02020389772951603, -0.002787582576274872, 0.014031642116606236, 0.026452526450157166, -0.003860263852402568, 0.02081487514078617, -0.03576992452144623, -0.031937435269355774, -0.005769566632807255, 0.005443249829113483, -0.01087261363863945, 0.037019651383161545, 0.02656361274421215, 0.05770955607295036, -0.021536938846111298, 0.0007841160986572504, 0.01188628003001213, 0.017565589398145676, 0.025563832372426987, 0.0033673164434731007, -0.01476064883172512, 0.04371262714266777, 0.009025796316564083, -0.03196520730853081, 0.0060507552698254585, 0.012247311882674694, -0.023550385609269142, 0.0034002952743321657, -0.044656865298748016, 0.0023605928290635347, -0.002936855424195528, 0.005484906956553459, -0.0003634184831753373, 0.01133778877556324, 0.024952856823801994, 0.050322286784648895, 0.028299342840909958, -0.03807497397065163, -0.041213177144527435, 0.004061608575284481, 0.031409770250320435, 0.011893223039805889, -0.010518524795770645, -0.038602638989686966, 0.007907986640930176, 0.02334209904074669, 0.0335204191505909, 0.006859605200588703, 0.047933921217918396, -0.00883833784610033, -0.04646202176809311, -0.0003686256823129952, -0.012879117392003536, -0.02832711488008499, 0.0228144358843565, 0.0076996986754238605, -0.004190052393823862, 0.0043427967466413975, 0.0030757137574255466, -0.038436006754636765, -0.008768908679485321, 0.0012445184402167797, 0.04476794973015785, 0.005422420799732208, -0.004991959780454636, 0.013899726793169975, 0.017621131613850594, -0.021009277552366257, -0.0037491770926862955, 0.0012445184402167797, -0.021231450140476227, 0.019259661436080933, -0.019370747730135918, 0.0036311473231762648, 0.05634874105453491, -0.008720307610929012, -0.03979681804776192, 0.006304171867668629, -0.024258563295006752, -0.00819958932697773, 0.00027836771914735436, 0.013101290911436081, 0.03152085840702057, 0.030909880995750427, -0.014128843322396278, 0.028007740154862404, -0.005234961863607168, 0.007574726361781359, -0.015552141703665257, -0.0530439130961895, 0.02461959607899189, -0.030965425074100494, -0.025397202000021935, -0.011150330305099487, -0.01900971680879593, 0.03535335138440132, 0.026994073763489723, -0.0013200227404013276, -0.031576402485370636, -0.009595115669071674, -0.0037075194995850325, 0.019787322729825974, 0.012163996696472168, -0.01816267892718315, -0.012858288362622261, -0.006977634970098734, 0.009178540669381618, -0.022036829963326454, 0.0228977520018816, 0.03699187934398651, -0.014691219665110111, 0.030132275074720383, -0.016343634575605392, -0.008553678169846535, -0.010303294286131859, -0.01476064883172512, 0.05254402011632919, -0.015329968184232712, -0.05132206901907921, -0.011747421696782112, -0.035158947110176086, 0.011796021834015846, -0.011497476138174534, -0.021411966532468796, 0.0700957253575325, 0.02263392135500908, -0.014746762812137604, 0.009963090531527996, -0.0138788977637887, 0.03746400028467178, 0.011462762020528316, 0.03504786267876625, 0.027868881821632385, 0.011816850863397121, 0.0031468786764889956, 0.02696630358695984, 0.005783452652394772, 0.019509606063365936, -0.027327334508299828, 0.003148614428937435, 0.002204377204179764, -9.063765901373699e-05, 0.006189613603055477, 0.009817289188504219, -0.04065774008631706, -0.009942262433469296, 0.01107395812869072, -0.0005376423941925168, 0.018370967358350754, 0.01639917865395546, 0.010393551550805569, -0.02311992458999157, -0.014246872626245022, -0.044573549181222916, 0.015107794664800167, -0.013080461882054806, 0.011254473589360714, 0.008102388121187687, 0.034714601933956146, -0.011296131648123264, 0.020051153376698494, -0.010983699932694435, -0.03177080303430557, 0.0050718034617602825, -0.0020672546233981848, 0.003967878874391317, 0.032159607857465744, 0.020439958199858665, 0.010483809746801853, -0.04115763306617737, 0.010969813913106918, -0.0026730243116617203, 0.03579769656062126, 0.04535115510225296, 0.06448584794998169, 0.04049111157655716, -0.02563326247036457, 0.03371481969952583, -0.028216028586030006, 0.02255060523748398, 0.018468167632818222, 0.0012531970860436559, 0.013184606097638607, 0.04521229863166809, -0.0019926181994378567, 0.016787981614470482, 0.03324270248413086, 0.03160417452454567, 0.021995171904563904, -0.0002414834452793002, -0.004846158437430859, 0.0036554476246237755, -0.02135642245411873, -0.019565150141716003, -0.020190011709928513, -0.005495321471244097, 0.00022152255405671895, 0.016815753653645515, -0.0055543361231684685, 0.005050974432379007, 0.03704742342233658, -0.008859166875481606, 0.019329089671373367, -0.022772779688239098, -0.007866328582167625, 0.009692316874861717, 0.03654753416776657, -0.020259441807866096, -0.02368924394249916, -0.05504347383975983, -0.029910100623965263, 0.00270253187045455, 0.001233236282132566, -0.018509825691580772, 0.0030566207133233547, -0.02324489690363407, -0.005453663878142834, 0.052127446979284286, 0.062930628657341, -0.021453624591231346, 0.0033065658062696457, 0.03910252824425697, 0.005894539412111044, -0.012559742666780949, 0.02316158264875412, 0.002416136208921671, 0.05154424160718918, 0.021148135885596275, 0.013406779617071152, 0.011789078824222088, 0.002122798003256321, -0.027521736919879913, -0.04199078306555748, -0.011830735951662064, -0.016274206340312958, -0.002461265306919813, -0.0026278954464942217, -0.00819958932697773, 0.022953294217586517, -0.015357740223407745, -0.03124314174056053, -0.0216202549636364, 0.028938092291355133, 0.015413283370435238, -0.019245775416493416, 0.015010593459010124, 0.0228144358843565, 0.005186361726373434, 0.030743252485990524, 0.01980120874941349, 0.04782283678650856, 0.005745266564190388, 0.027743909507989883, -0.004304610658437014, 0.0182043369859457, 0.022161802276968956, 0.0010492488509044051, -0.022328432649374008, -0.015399397350847721, -0.03840823471546173, 0.009296569973230362, -0.04296279326081276, -0.046961914747953415, 0.057487379759550095, -0.004450412001460791, 0.030076730996370316, 0.00699499249458313, 0.011080901138484478, -0.00394357880577445, 0.03257618099451065, -0.0013955270405858755, -0.04146312177181244, -0.010754583403468132, 0.04410143196582794, -0.04904479160904884, -0.005960497073829174, 0.0030722422525286674, 0.02245340496301651, 0.04782283678650856, 0.012684715911746025, -0.0010154021438211203, -0.006734632886946201, -0.024647368118166924, -0.006151427514851093, -0.024508509784936905, 0.021717455238103867, -0.011809907853603363, -0.019870638847351074, 0.05507124587893486, -0.018662570044398308, -0.015621570870280266, 0.008095445111393929, -0.01131696067750454, 0.03460351377725601, 0.029299123212695122, -0.013663667254149914, 0.0033343376126140356, 0.00016033806605264544, -0.0192318893969059, -0.011566905304789543, -0.011455819010734558, -0.023897532373666763, -0.014094128273427486, 0.00826207548379898, -0.037686172872781754, -0.06459692865610123, 0.03718627989292145, 0.014732876792550087, -0.045878816395998, 0.015385511331260204, -0.013358178548514843, 0.02267557755112648, 0.01405247114598751, -0.025161143392324448, 0.022383974865078926, -0.01773221790790558, 0.00598826864734292, -0.015677114948630333, -0.011358617804944515, -0.008345390670001507, -0.010011691600084305, 0.005391177721321583, -0.022397860884666443, 0.06193085014820099, -0.0026626100298017263, -0.016121461987495422, 0.008109331130981445, -0.028035512194037437, -0.012858288362622261, -0.02413359098136425, -0.030743252485990524, 0.03488123044371605, -0.0433238223195076, 0.008963310159742832, -0.021162021905183792, 0.032992757856845856, 0.006529816426336765, -0.005186361726373434, 0.020190011709928513, 0.00387762114405632, -0.005880653392523527, 0.026896873489022255, -0.023578157648444176, 0.03282612934708595, -0.0015456676483154297, -0.05223853141069412, -0.0012549328384920955, -0.01971789449453354, -0.007310895249247551, -0.009428486227989197, 0.004363625310361385, 0.03190966323018074, -0.007078307215124369, -0.0253277737647295, 0.01582985930144787, -0.03454797342419624, 0.0060333977453410625, 0.03115982748568058, -0.0020117112435400486, -0.000454327353509143, -0.003592961234971881, -0.019953953102231026, -0.01255279965698719, 0.0156493429094553, -0.006047283764928579, 0.02107870578765869, 0.024244677275419235, -0.02346707135438919, 0.023314327001571655, -0.014219100587069988, -0.024022504687309265, 0.050655547529459, -0.014621790498495102, -0.02457793802022934, 0.06170867756009102, -0.009956147521734238, -0.011504419147968292, -0.02356427162885666, 0.03235400840640068, -0.06143096089363098, 0.007234523072838783, 0.015524369664490223, -0.00426642457023263, 0.0011264887871220708, -0.02081487514078617, 0.012136224657297134, 0.024105818942189217, 0.01728787273168564, -0.012226482853293419, -0.01737118698656559, -0.011698820628225803, 0.011573848314583302, 0.0074705821461975574, -0.027827225625514984, 6.607300747418776e-06, -0.009400714188814163, -0.004044251050800085, -0.0005819034995511174, -0.021800769492983818, -0.03243732452392578, 0.02664692886173725, -0.004915587604045868, -0.018662570044398308, -0.021064819768071175, -0.0013365121558308601, 0.01605203188955784, -0.02877146191895008, 0.02081487514078617, -0.013052690774202347, 0.0011733535211533308, -0.00795658677816391, 0.009157711640000343, 0.024938970804214478, -0.0004903437802568078, -0.0015517426654696465, -0.003700576489791274, -0.005998683162033558, 0.011330845765769482, 0.023480957373976707, -0.024425193667411804, 0.0059674400836229324, -2.59681496572739e-06, -0.04510121047496796, 0.0006235610344447196, 0.003013227367773652, 0.0016958082560449839, 0.01789884828031063, -0.004683000035583973, 0.017315642908215523, 0.008234303444623947, -0.03265949711203575, -0.0018086307682096958, 0.034853462129831314, -0.018190450966358185, 0.015704885125160217, -0.008428704924881458, 0.009685373865067959, 0.01367755327373743, -0.003294415771961212, -0.01873200014233589, 0.02010669745504856, 0.010011691600084305, 0.02077321708202362, 0.0002636139979586005, 0.019787322729825974, -0.006863076705485582, -0.02328655496239662, -0.00324928667396307, -0.029326895251870155, 0.008428704924881458, -0.022869979962706566, 0.0025393732357770205, -0.01799605041742325, 0.003679747926071286, 0.017037926241755486, 0.003375994972884655, -0.0029403266962617636, -0.03849155083298683, 0.006106298416852951, -0.019370747730135918, 0.027591165155172348, -0.029826786369085312, 0.02160636894404888, -0.01188628003001213, 0.006331943441182375, -0.009650659747421741, -0.0120876245200634, -0.0266052708029747, 0.031215369701385498, -0.019245775416493416, 0.004582327324897051, 0.0010423059575259686, 0.010379666462540627, -0.019926181063055992, 0.035603296011686325, 0.016413064673542976, 0.010782355442643166, -0.015218881890177727, -0.005342577118426561, -0.015107794664800167, 0.031409770250320435, 0.01737118698656559, 0.013837240636348724, 0.007241466082632542, -0.0002677363809198141, -0.009407657198607922, -0.011129501275718212, 0.025036171078681946, -0.012039024382829666, 0.011900165118277073, 0.004558027256280184, 0.004540669731795788, 0.010726812295615673, -0.027646709233522415, -0.009157711640000343, -0.02502228505909443, 0.005127346608787775, 0.012198710814118385, 0.00992143340408802, 0.03660307824611664, -0.010025576688349247, 0.0002349744609091431, -0.03932470083236694, 0.0216619111597538, 0.0028066756203770638, -0.006352772004902363, -0.004262953065335751, 0.04635093733668327, -0.008380104787647724, 0.012684715911746025, 0.027771681547164917, 0.003084392286837101, -0.037102967500686646, -0.023925304412841797, -0.015385511331260204, 0.007692755665630102, 0.0037769486662000418, 0.036714162677526474, 0.01657969318330288, 0.008650878444314003, -0.003634618828073144, -0.04490680992603302, 0.03063216432929039, -0.04918364807963371, 0.007914929650723934, 0.012309798039495945, 0.0037491770926862955, -0.011171159334480762, -0.003417652565985918, 0.02625812590122223, -0.008761965669691563, -0.033131614327430725, 0.002678231569007039, 0.03935247287154198, 0.04854489862918854, 0.008810565806925297, 0.03338156268000603, -0.0316319465637207, 0.03588101267814636, -0.0019856751896440983, 0.012455599382519722, -0.01945406384766102, 0.02607760950922966, 0.01551048457622528, -0.004412225913256407, -0.010143606923520565, 0.01737118698656559, -0.04171306639909744, -0.0042004669085145, -0.016940725967288017, 0.018245995044708252, 0.012920774519443512, 0.004662171006202698, -0.0387137234210968, 0.010886499658226967, 0.01971789449453354, 0.0031815932597965, 0.011434989981353283, -0.014691219665110111, -0.023050496354699135, 0.024813996627926826, -0.02130088023841381, 0.014732876792550087, -0.010469923727214336, 0.012802745215594769, -0.02125922217965126, -0.012011252343654633, 5.576033072429709e-05, 0.0015743072144687176, -0.014635676518082619, -0.0009381620911881328, 0.0060090976767241955, -0.011053129099309444, 0.03415916860103607, 0.005172475706785917, -0.026938531547784805, -0.003474931698292494, -0.009539572522044182, -0.011705763638019562, 0.012754145078361034, 0.027827225625514984, 0.009636773727834225, -0.002466472564265132, 0.00337078794836998, -0.008137103170156479, -0.009588172659277916, 0.0021818126551806927, -0.00490517308935523, 0.017801648005843163, -0.016954611986875534, 0.014371844939887524, 0.021953513845801353, -0.018190450966358185, -0.04057442769408226, -0.015010593459010124, -0.0064048441126942635, 0.004801029339432716, -0.009796461090445518, 0.003919278737157583, -0.0359921008348465, 0.005422420799732208, 0.006710332352668047, 8.793914275884163e-06, -0.04260176047682762, -0.01931520365178585, 0.010851784609258175, 0.00870642252266407, 0.010067234747111797, 0.03040999174118042, 0.015302196145057678, 0.012059852480888367, -0.016065917909145355, -0.006519402377307415, -0.0001710779033601284, -0.01900971680879593, 0.01631586253643036, 0.008928596042096615, 0.020564930513501167, -0.0008257735753431916, -0.00431849667802453, -0.03946356102824211, -0.011802964843809605, -0.019259661436080933, -0.016899067908525467, -0.004023422487080097, -0.0060333977453410625, -0.006349300500005484, -0.00897025316953659, -0.003327394602820277, 0.03229846432805061, 0.019856752827763557, -0.005130818113684654, 0.0036103185266256332, -0.008616164326667786, 0.0006331075564958155, -0.006755461450666189, 0.009782575070858002, 0.010574067942798138, 0.006908205803483725, 0.004047722555696964, -0.03374259173870087, 4.637654001271585e-06, 0.0027337749488651752, 0.007560840342193842, -0.017176784574985504, 0.00763721251860261, -0.013871954753994942, -0.000440224539488554, 0.008213474415242672, -0.009553458541631699, 0.007852442562580109, 0.01741284504532814, -0.03857486695051193, 0.0182043369859457, -0.027341220527887344, 0.03218737989664078, -0.012039024382829666, -0.022786663845181465, -0.007852442562580109, 0.02391141839325428, 0.017579473555088043, -0.0006725954008288682, 0.008234303444623947, 0.009838118217885494, 0.0027476607356220484, 0.016107575967907906, 0.030382219702005386, 0.05007234215736389, 0.021731341257691383, -0.01527442503720522, 0.02785499580204487, -0.022022943943738937, 0.004891287535429001, 0.01919023133814335, 0.03257618099451065, -0.05448804050683975, 0.0022234702482819557, 0.025563832372426987, -0.015107794664800167, 0.04646202176809311, -0.026008179411292076, 0.006390958093106747, 0.012747202068567276, 0.014024699106812477, -0.005266204942017794, -0.02091207541525364, 0.0021575125865638256, 0.008380104787647724, 0.009511801414191723, -0.014510703273117542, 0.031354229897260666, -0.05148869752883911, -0.04782283678650856, -0.013594238087534904, 0.04735071584582329, 0.013094347901642323, -0.04040779545903206, -0.030687708407640457, -0.022397860884666443, -0.00948402937501669, -0.021453624591231346, -0.007442810572683811, -0.019690122455358505, -0.0070921932347118855, 0.00870642252266407, -0.006422201171517372, -0.002344971289858222, 0.009386828169226646, -0.03540889546275139, 0.02824380062520504, -0.018134908750653267, 0.019551264122128487, 0.02860483154654503, 0.01702404022216797, -0.0028500687330961227, -0.024966740980744362, -0.006727689877152443, -0.0003569094988051802, 0.01727398671209812, -0.008102388121187687, -0.030882110819220543, 0.0205927025526762, 0.02130088023841381, 0.008296789601445198, 0.010379666462540627, -0.004669114015996456, 0.03913030028343201, -0.007421982008963823, 0.01834319531917572, 0.014677333645522594, 0.022439518943428993, -0.012934660539031029, -0.0240919329226017, 0.039491333067417145, 0.0432405099272728, -0.02988232858479023, 0.024647368118166924, 0.019565150141716003, 0.02091207541525364, -0.009407657198607922, -0.005918839480727911, -0.017565589398145676, -0.007064421661198139, -0.0066790892742574215, 0.019856752827763557, 0.01882920041680336, 0.04007453843951225, 0.052793968468904495, -0.03354819118976593, 0.0034992319997400045, 0.006557588465511799, 0.02475845441222191, 0.03696410730481148, 0.05396037921309471, -0.014302415773272514, 0.009081339463591576, 0.02771613746881485, -0.033131614327430725, -0.002641781233251095, 0.05926476791501045, -0.002051633084192872, 0.015302196145057678, -0.00035365502117201686, -0.02028721384704113, 0.005675837397575378, -0.024786226451396942, -0.02877146191895008, -0.00038164365105330944, -0.04190746694803238, -0.03465905785560608, -0.0035756039433181286, 0.0014354487648233771, -0.01794050633907318, -0.004436525981873274, 0.024203021079301834, -0.03263172507286072, 0.013323464430868626, -0.035075634717941284, -0.0029524769634008408, -0.017162898555397987, -0.0065332879312336445, -0.010115834884345531, -0.01012277789413929, -0.044656865298748016, 0.025161143392324448, 0.04454577714204788, 0.01887085847556591, 0.013594238087534904, -0.009511801414191723, 0.00934517104178667, -0.007796899415552616, 0.029549069702625275, -0.06537453830242157, -0.008484249003231525, 0.023578157648444176, -0.038824811577796936, -0.03324270248413086, -0.025050057098269463, 0.04310164973139763, -0.011657163500785828, -0.034631285816431046, 0.008060730993747711, -0.023439299315214157, 0.0009338227682746947, -0.011143387295305729, -0.0010579274967312813, -0.012233425863087177], "index": 49}, {"title": "Pralamba", "text": "Pralamba was an asura killed by Balarama. According to the pertinent legend, the asura had attempted to join Krishna and Balarama in a game of jumping, whose conditions dictated that the loser carry the victor on his back. Pralamba promptly lost, and was forced to carry Balarama on his back.", "vector": [-0.00600378168746829, -0.025160886347293854, -0.010686120018362999, 0.020333418622612953, -0.01752248778939247, 0.027895433828234673, -0.012939448468387127, -0.04873298481106758, -0.017965514212846756, 0.026352476328611374, -0.019462641328573227, 0.05964061990380287, -0.017782192677259445, -0.03495331481099129, 0.027360746636986732, 0.004193481057882309, -0.028812041506171227, 0.013481774367392063, -0.06342926621437073, 0.009952833876013756, 0.01930987276136875, -0.001443657441996038, -0.004338610917329788, -0.026077494025230408, -0.013542881235480309, 0.017537765204906464, -0.009104971773922443, -0.010342392139136791, -0.010479883290827274, -0.009547999128699303, 0.014963624067604542, -0.01698780059814453, 0.021066704764962196, 0.0260927714407444, -0.024824798107147217, -0.01740027405321598, 0.015437204390764236, -0.01435255166143179, -0.044883232563734055, -0.03712261840701103, -0.009479253552854061, 0.013443582691252232, -0.01769053190946579, 0.003091642167419195, -0.03153131157159805, -0.025894172489643097, -0.023847082629799843, 0.032142382115125656, 0.0053468793630599976, -0.04195008799433708, 0.053346578031778336, 0.014497681520879269, 0.017125291749835014, -0.009731320664286613, 0.047877486795186996, -0.025221994146704674, 0.010984017513692379, 0.016361450776457787, 0.004151470027863979, 0.014375466853380203, 0.007741517387330532, -0.031714633107185364, -0.0011791778961196542, 0.0018379897810518742, 0.03192850947380066, -0.01996677555143833, 0.07693395763635635, -0.06404034048318863, 0.005797544959932566, -0.005369794555008411, 0.040544621646404266, 0.03687819093465805, -0.010197263211011887, -0.01174021977931261, -0.017965514212846756, 0.008318216539919376, -0.015796208754181862, 0.01960013248026371, -0.03501442074775696, 0.0055378396064043045, -0.042866695672273636, -0.022609662264585495, 0.023098519071936607, 0.038283657282590866, 0.01930987276136875, -0.007401608861982822, 0.012733211740851402, -0.05676858127117157, 0.0004399240424390882, -0.01976817660033703, 0.05252163112163544, 0.02699410170316696, -0.0011228446383029222, -0.0006125041400082409, 0.002365994034335017, 0.04176676645874977, -0.016773924231529236, 0.030400829389691353, -0.01075486559420824, 0.018668247386813164, -0.037183728069067, 0.01840854249894619, -0.0027192700654268265, -0.036419887095689774, 0.034586671739816666, 0.03645044192671776, -0.07901160418987274, 0.02305268868803978, -0.00881471298635006, 0.06709569692611694, -0.02584834210574627, -0.05802128091454506, 0.027314916253089905, -0.005702064838260412, -0.044822126626968384, -0.024687305092811584, 0.02227357216179371, -0.03363950923085213, -0.055668652057647705, 0.021219473332166672, 0.018683524802327156, 0.011915902607142925, -0.06006837263703346, -0.004220215603709221, -0.020806999877095222, -0.05734910070896149, 0.0064544472843408585, 0.039475247263908386, 0.04222507029771805, 0.03583936765789986, -0.007966849952936172, -0.01804189942777157, -0.014367829076945782, -0.03406726196408272, -0.03669486939907074, 0.0013548610731959343, -0.03229515254497528, 0.007737698499113321, -0.009357038885354996, 0.044822126626968384, -0.013351921923458576, -0.03593102842569351, 0.025710850954055786, 0.038864172995090485, -0.008165448904037476, 0.01608646847307682, -0.05881567299365997, 0.0006282583344727755, 0.03312009945511818, -0.02477896772325039, 0.02163194678723812, -0.03751981630921364, 0.025390038266777992, 0.022899920120835304, 0.02853705920279026, 0.06886781007051468, -0.02728436142206192, -0.028735658153891563, 0.024030404165387154, 0.020394526422023773, -0.03733649477362633, 0.005999962333589792, -0.00741688534617424, 0.0017587414477020502, -0.00789046660065651, 0.03455611690878868, 0.0008387917187064886, -0.05099395290017128, 0.04234728589653969, 0.0349227599799633, 0.04897741600871086, 0.00607634661719203, 0.06113774701952934, -0.004239311441779137, -0.011396491900086403, 0.00866958312690258, -0.01256516668945551, 0.004384441301226616, -0.030843855813145638, 0.02383180521428585, -0.012343652546405792, -0.07369527220726013, -0.007867551408708096, -0.008134895004332066, 0.0016747190384194255, -0.011900626122951508, 0.023694314062595367, -0.006527012214064598, -0.03038555197417736, -0.02829262986779213, 0.01263391226530075, -0.014039377681910992, -0.018622417002916336, -0.0001397588348481804, 0.008432792499661446, 0.04292780160903931, 0.03217293694615364, 0.0343116894364357, 0.04366108775138855, -0.020180650055408478, 0.038039226084947586, -0.035656046122312546, 0.007153360638767481, 0.025038672611117363, -0.041980642825365067, 0.03180629387497902, -0.01978345401585102, -0.043997179716825485, 0.020776445046067238, -0.02144862525165081, 0.014658087864518166, -0.03608379885554314, -0.006026696879416704, 0.04133901745080948, -0.0065766614861786366, -0.0003609143604990095, -0.021250026300549507, 0.009311208501458168, -0.002276242943480611, 0.011213170364499092, -0.07369527220726013, 0.005988504737615585, 0.0042775035835802555, 0.02447343058884144, 0.014123399741947651, 0.03055359609425068, -0.03782535344362259, 0.015238606370985508, -0.059487853199243546, -0.00555693544447422, -0.0017730634426698089, 0.05368266999721527, 0.05682969093322754, -0.011595089919865131, -0.015444843098521233, 0.05517979711294174, -0.027207978069782257, -0.0012994826538488269, -0.018148835748434067, -0.028980085626244545, -0.018423818051815033, 0.0326617956161499, -0.04097237437963486, -0.02823152393102646, -0.021051427349448204, -0.0018255773466080427, 0.02985086292028427, -0.06709569692611694, -0.05744076147675514, -0.05536311864852905, 0.010647928342223167, 0.02120419591665268, -0.03535051271319389, 0.06837894767522812, 0.008837628178298473, -0.014245614409446716, 0.004846564028412104, -0.01758359558880329, 0.03531995788216591, 0.016407281160354614, -0.004953501746058464, -0.05557699128985405, -0.015070561319589615, -0.06000726297497749, -0.010617374442517757, -0.04344721511006355, -0.01408520806580782, 0.023862358182668686, 0.007493269629776478, -0.013657458126544952, 0.05380488187074661, -0.0028682188130915165, -0.07607845216989517, 6.46876942482777e-05, -0.027452407404780388, 0.005175015423446894, 0.009471614845097065, 0.020287588238716125, 0.03336452692747116, 0.03733649477362633, 0.0045906780287623405, 0.01381786447018385, 0.026703843846917152, 0.01259572058916092, 0.050199560821056366, 0.006324594374746084, 0.026138601824641228, 0.0011409858707338572, 0.028903702273964882, 0.0386197455227375, -0.014795579016208649, -0.02574140578508377, -0.0022094070445746183, 0.0010159070370718837, 0.014512958005070686, 0.028689827769994736, -0.014153953641653061, 0.045494306832551956, -0.03525885194540024, 0.009326484985649586, 0.07778945565223694, 0.01834743469953537, -0.028643997386097908, -0.0410945862531662, -0.01918765902519226, -0.03663376346230507, -0.07063991576433182, -0.007435981649905443, -0.024565091356635094, 0.04265281930565834, 0.015887869521975517, -0.060801658779382706, -0.02894953265786171, -0.0194168109446764, 0.009547999128699303, 0.027498237788677216, 0.012549890205264091, -0.00134435819927603, -0.0536215603351593, 0.00875360518693924, -0.01197700947523117, 0.023847082629799843, 0.0010369126684963703, -0.02335822395980358, 0.052154988050460815, -0.0028605805709958076, -0.026367753744125366, -0.016468388959765434, -0.003047721227630973, -0.05062730982899666, -0.041613999754190445, -0.0018914586398750544, 0.024565091356635094, -0.029636988416314125, -0.005495828110724688, 0.01573510281741619, -0.025695575401186943, -0.014306721277534962, -0.01152634434401989, -0.02580251172184944, -0.04778582602739334, -0.0056829690001904964, 0.002574140438809991, 0.0019363341853022575, 0.04384440928697586, 0.015215691179037094, 0.032906223088502884, -0.03562549501657486, 0.003933775704354048, 0.017721086740493774, 0.000799644913058728, 0.04466935992240906, 0.03253958001732826, -0.005312506575137377, 0.039353031665086746, -0.06452919542789459, 0.029392559081315994, -0.010938187129795551, -0.042530607432127, 0.050199560821056366, 0.01367273461073637, 0.004269865341484547, -0.022976305335760117, 0.00629786029458046, -0.0051826536655426025, -0.0408807136118412, 0.05844902992248535, -0.038864172995090485, -0.05181889981031418, -0.0010416866280138493, -0.03913915902376175, 0.004938225261867046, 0.036969851702451706, 0.000933794304728508, -0.0029923429246991873, -0.03562549501657486, -0.003712262026965618, 0.0102201784029603, -0.037733692675828934, 0.009242462925612926, -0.007485631387680769, 0.011167339980602264, -0.02276242896914482, -0.008822350762784481, 0.03257013484835625, -0.0065881190821528435, -0.0014742109924554825, -0.032784007489681244, 0.04332499951124191, -0.006110719405114651, 0.029499497264623642, 0.03260068595409393, -0.0020127182360738516, 0.06465140730142593, -0.0067523447796702385, -0.017262782901525497, 0.003551855683326721, 0.012672103941440582, 0.01853075623512268, 0.01798079162836075, -0.02800237201154232, 0.05414097383618355, -0.008470985107123852, -0.009723681956529617, -0.03257013484835625, 0.022747153416275978, 0.01781274750828743, -0.0006311227334663272, 0.06642352044582367, -0.03865030035376549, -0.006771440617740154, 0.021479178220033646, -0.07400081306695938, 0.003861210774630308, 0.018362712115049362, 0.0252678245306015, 0.009670212864875793, 0.03782535344362259, -0.04390551894903183, 0.01063265185803175, -0.05893788859248161, 0.012473505921661854, -0.00012686903937719762, 0.009761874563992023, -0.05184945464134216, 0.014589342288672924, -0.01781274750828743, -0.008234194479882717, -0.007905743084847927, 0.0012689291033893824, 0.03715317323803902, 0.011747857555747032, 0.0484885573387146, 0.05087173730134964, -0.03782535344362259, -0.022655492648482323, 0.03415892273187637, 0.04271392896771431, -0.0024309204891324043, 0.013061662204563618, 0.014902516268193722, 0.0004898123443126678, -0.016712816432118416, -0.007531461771577597, 0.022197188809514046, -0.047755271196365356, -0.009219547733664513, 0.005579850636422634, 0.00956327561289072, 0.06232933700084686, -0.0026447956915944815, -0.02406095713376999, -0.019615409895777702, -0.021876374259591103, 0.010342392139136791, 0.014742109924554825, -0.03284511715173721, -0.0013061662903055549, -0.045494306832551956, 0.01033475436270237, -0.03510608151555061, -0.03742815554141998, 0.04121680185198784, -0.009143163450062275, -0.011388853192329407, -0.012939448468387127, -0.008012680336833, -0.032386813312768936, -0.0015124030178412795, -0.0038879450876265764, -0.022609662264585495, 0.0011963642900809646, -0.05615751072764397, -0.019875114783644676, -0.004655604250729084, 0.004120916128158569, -0.01326026115566492, 0.0031164668034762144, -0.08353353291749954, -0.020165374502539635, 0.009387592785060406, 0.008493900299072266, -0.0125346127897501, -0.023312393575906754, 0.023785974830389023, -0.00626730639487505, 0.002660072408616543, -0.013298452831804752, -0.05432429537177086, 0.012160331010818481, -0.0023106157314032316, -0.042377837002277374, -0.03403670713305473, -0.014245614409446716, -0.0008020318928174675, -0.008883458562195301, -0.0402696393430233, 0.009471614845097065, -0.02645941451191902, -0.036664314568042755, -0.006897474639117718, -0.03608379885554314, 0.0431416779756546, 0.020944491028785706, 0.052032776176929474, 0.033272866159677505, 0.021188918501138687, -0.004846564028412104, 0.02013481967151165, -0.053652115166187286, 0.03461722657084465, 0.01721695251762867, 0.022029142826795578, 0.01929459534585476, 0.010113240219652653, 0.006064889021217823, -0.03241736441850662, 0.011213170364499092, 0.0009376134839840233, -0.01752248778939247, -0.024641474708914757, 0.01620868220925331, -0.017247505486011505, -0.014612257480621338, 0.005270495545119047, -0.005675330758094788, 0.01182424183934927, 0.033028438687324524, -0.03367006406188011, -0.05762408301234245, 0.016880862414836884, 0.019432086497545242, 0.01995149813592434, 0.03736704960465431, -0.006966220214962959, 0.0029904332477599382, -0.021311134099960327, 0.018194666132330894, -0.01953902468085289, 0.015437204390764236, 0.01680447719991207, 0.01924876496195793, -0.020654231309890747, 0.00989172700792551, -0.005071897059679031, -0.024213725700974464, 0.023510992527008057, -0.04573873430490494, -0.011274277232587337, -0.01863769441843033, 0.005988504737615585, -0.020684784278273582, 0.013848417438566685, 0.04442492872476578, -0.0009514581179246306, 0.006973858457058668, 0.035717155784368515, 0.0388336218893528, -0.0032157660461962223, 0.05337713286280632, -0.0033838108647614717, -0.01223671529442072, 0.01906544342637062, 0.021219473332166672, -0.004605954512953758, 0.01637672819197178, 0.019615409895777702, -0.003162297187373042, 0.012106862850487232, -0.017614148557186127, 0.008677221834659576, 0.010678482241928577, -0.030309168621897697, -0.014512958005070686, -0.04039185494184494, -0.02079172246158123, 0.004254588391631842, 0.02853705920279026, -9.823996151681058e-06, -0.026581628248095512, -0.022747153416275978, -0.011961732991039753, -0.01573510281741619, 0.00570588419213891, 0.0028834957629442215, -0.026596905663609505, 0.020868105813860893, 0.013038747012615204, 0.03993355110287666, 0.03473943844437599, 0.016392003744840622, 0.014184507541358471, 0.022533277049660683, 0.004166746512055397, -0.016666986048221588, 0.0008383142994716763, 0.013718564994633198, 0.01900433748960495, 0.008860543370246887, -0.020806999877095222, -0.00155632384121418, -0.0024576550349593163, 0.004403537139296532, 0.04433326795697212, 0.04072794318199158, -0.01144232228398323, -0.024626199156045914, 0.014612257480621338, 0.06825673580169678, -0.01200756337493658, 0.017736362293362617, 0.04900796711444855, -0.021876374259591103, -0.010013941675424576, -0.006786717567592859, -0.03229515254497528, 0.014176868833601475, -0.04867187887430191, 0.024503983557224274, 0.004647966008633375, -0.021295856684446335, 0.01174021977931261, -0.0019401534227654338, 0.037794798612594604, -0.013993547298014164, -0.012435314245522022, -0.021066704764962196, -0.028017647564411163, -0.02108198218047619, 0.023755421862006187, 0.04106403514742851, 0.05557699128985405, 0.016880862414836884, -0.03531995788216591, 0.01301583182066679, 0.018194666132330894, 0.0023125254083424807, -0.04842745140194893, -0.0204403568059206, 0.014153953641653061, 0.012580443173646927, 0.011633281596004963, 0.02818569354712963, -0.09404397010803223, -0.010907634161412716, -0.005029886029660702, 0.02293047495186329, 0.02872038073837757, -0.02566502057015896, 0.02746768295764923, 0.003173754783347249, -0.019493194296956062, 0.0135581586509943, -0.018072452396154404, -0.007233563810586929, 0.00370844267308712, 0.00989172700792551, -0.006847824901342392, -0.019523749127984047, 0.01793496124446392, -0.025817789137363434, 0.00392995635047555, -0.016178129240870476, -0.03305898979306221, 0.006569023244082928, 0.01203811727464199, -0.021540286019444466, 0.01822522096335888, 0.01114442478865385, -0.0006373289506882429, 0.006263487506657839, 0.0013854146236553788, -0.011121509596705437, 0.0007371054962277412, 0.001899096998386085, -0.008027957752346992, 0.013023470528423786, 0.008096703328192234, -0.011281915940344334, 0.02948421984910965, 0.0006807722966186702, -0.0011934998910874128, 0.01930987276136875, -0.026123324409127235, -0.031897954642772675, -0.015513588674366474, -0.005041343625634909, -0.030354999005794525, -0.008845265954732895, -0.007630760781466961, -0.009738958440721035, 0.028995363041758537, 0.02085283026099205, -0.012702657841145992, 0.0587545670568943, 0.02186109870672226, 0.03165352717041969, -0.024580368772149086, -0.020409801974892616, 0.0382225476205349, 0.029682818800210953, -0.023251287639141083, -0.0019210573518648744, 0.008654306642711163, 0.016422558575868607, -0.008906373754143715, 0.007481812033802271, -0.0098611731082201, -0.03250902518630028, 0.046074822545051575, -0.03263124078512192, 0.004109458532184362, -0.00296369893476367, 0.015933699905872345, -0.0033952684607356787, 0.0005303913494572043, -0.0014541601995006204, -0.009853535331785679, -0.0019382437458261847, 0.026046941056847572, 0.008539730682969093, 0.027849603444337845, 0.019340425729751587, -0.010365307331085205, -0.021051427349448204, 0.01698780059814453, -0.020532017573714256, -0.0490996278822422, 0.0011543530272319913, -0.015215691179037094, -0.03556438535451889, -0.012809595093131065, -0.01740027405321598, 0.021906929090619087, 0.016193406656384468, 0.03516719117760658, -0.03984189033508301, 0.004369164351373911, -0.021784713491797447, -0.0016393914120271802, 0.00899803452193737, 0.03703095763921738, -0.001200183411128819, 0.011327746324241161, -0.0222888495773077, -0.05854069069027901, 0.0027593716513365507, 0.0021081981249153614, -0.03131743520498276, -0.003477381309494376, 0.004170565865933895, 0.005541658494621515, 0.03840586915612221, -0.01680447719991207, -0.014604618772864342, 0.021280579268932343, 0.032081276178359985, -0.0008464300772175193, -0.021662499755620956, 0.024397047236561775, -0.02013481967151165, 0.0030840036924928427, -0.005782268010079861, 0.012397121638059616, -0.002423282014206052, -0.003998701926320791, 0.003719900269061327, -0.04968014732003212, 0.0039490521885454655, -0.006805813405662775, -0.0015534594422206283, 0.023266563192009926, -0.005255218595266342, -0.017644701525568962, 0.0011801326181739569, -0.038039226084947586, -0.003135562874376774, 0.0026314284186810255, -0.03651154786348343, 0.04986346885561943, -0.025710850954055786, 0.024091510102152824, -0.018561309203505516, 0.029270345345139503, -0.027987094596028328, -0.004919128958135843, 0.00600378168746829, -0.007588749751448631, 0.0002613764663692564, 0.00577844912186265, 0.05499647557735443, 0.02401512674987316, -0.019936222583055496, -0.0008297211024910212, 0.013267898932099342, -0.030186953023076057, 0.0005938855465501547, 0.02995780110359192, -0.029621711000800133, -0.053591009229421616, 0.010059772059321404, 0.018316881731152534, -0.04723586142063141, 0.01361162681132555, 0.03299788385629654, -0.02001260593533516, 0.025237271562218666, 0.008142533712089062, 0.007115168962627649, 0.022059695795178413, 0.005255218595266342, -0.022854089736938477, 0.01286306418478489, 0.000221871625399217, 0.03342563286423683, -0.013474135659635067, 0.006244391202926636, -0.047266412526369095, -0.008111979812383652, 0.029499497264623642, 0.009097333066165447, 0.004762541968375444, 0.04735807329416275, 0.008791797794401646, 0.010854165069758892, 0.006393339950591326, 0.03556438535451889, 0.022655492648482323, -0.04476102069020271, 0.013886610046029091, 0.0037046235520392656, 0.021586116403341293, 0.030523043125867844, -0.0001682834845269099, 0.006160368677228689, 0.00896748062223196, 0.03391449153423309, -0.023266563192009926, 0.01918765902519226, 0.08017263561487198, -0.03412836790084839, -0.05194111540913582, 0.0051979306153953075, -0.029514774680137634, 0.0073901512660086155, 0.0058166407980024815, -0.02132640965282917, 0.01179368793964386, 0.012389483861625195, 0.015108753927052021, 0.0033398899249732494, 0.012244354002177715, 0.002751733176410198, 0.044058285653591156, -0.0326617956161499, -0.002027994953095913, -0.006313136778771877, 0.024137340486049652, 0.007676591165363789, 0.013688011094927788, 0.004250769037753344, -0.014467127621173859, -0.03137854486703873, -0.032906223088502884, 0.010372946038842201, -0.01912655122578144, 0.017018353566527367, -0.020394526422023773, 0.051207829266786575, -0.014367829076945782, -0.012710296548902988, -0.012870702892541885, 0.024091510102152824, 0.005453817080706358, 0.0003258254728280008, 0.009372315369546413, -0.005094812251627445, -0.018912676721811295, -0.0098611731082201, 0.011663835495710373, -0.004716711584478617, 0.03611434996128082, -0.005744076333940029, 0.03272290155291557, 0.017950238659977913, 0.001432199846021831, 0.006240572314709425, 0.00697003910318017, 0.02406095713376999, -0.013390113599598408, -0.01758359558880329, -0.03062998130917549, -0.0010903815273195505, -0.04604427143931389, 0.05866290628910065, -0.032081276178359985, 0.0010808334918692708, 0.045310985296964645, -0.04903852194547653, -0.009929918684065342, -0.010991656221449375, 0.017369719222187996, -0.021433347836136818, 0.014199784025549889, -0.0029446028638631105, -0.017705809324979782, 0.05163557827472687, 0.024213725700974464, -0.013519966043531895, -0.009968111291527748, -0.018698800355196, 0.05890733376145363, -0.0257872361689806, 0.0031470204703509808, 0.033578403294086456, 0.015750378370285034, -0.004903852473944426, 0.008990395814180374, 0.012015202082693577, -0.016392003744840622, -0.008791797794401646, -0.026306645944714546, -0.015796208754181862, -0.01057154405862093, 0.012947086244821548, 0.039047498255968094, -0.028980085626244545, 0.031959060579538345, -0.02626081556081772, 0.01853075623512268, 0.007187733426690102, -0.006950943265110254, 5.042536940891296e-05, -0.023159626871347427, -0.014497681520879269, -0.040300194174051285, -0.04628869891166687, 0.026673289015889168, -0.030156400054693222, -0.0587545670568943, 0.013688011094927788, -0.006801994517445564, 0.04803025349974632, -0.020043158903717995, 0.03400615230202675, -0.007455077487975359, -0.012824872508645058, 0.0006201425567269325, -0.006863101851195097, -0.01307693962007761, 0.04106403514742851, 0.003609143663197756, -0.022731876000761986, -0.012313099578022957, 0.025237271562218666, 0.029942525550723076, 0.005499647464603186, -0.03586992248892784, -0.011106232181191444, 0.001885729841887951, 0.022349955514073372, -0.013023470528423786, 0.03379227593541145, -0.016880862414836884, -0.027452407404780388, 0.00021077207929920405, -0.015024730935692787, -0.025634467601776123, -0.017843300476670265, 0.013122770003974438, 0.008257109671831131, 0.06135162338614464, 0.024641474708914757, -0.02656635269522667, -0.014627533964812756, 0.008730689994990826, -0.014207422733306885, -0.005396529100835323, 0.0035671324003487825, 0.054354846477508545, 0.05368266999721527, -0.00019012452685274184, -0.011243723332881927, 0.020272310823202133, -0.03079802542924881, 0.026764949783682823, -0.00726793659850955, 0.021066704764962196, 0.011663835495710373, 0.03038555197417736, -0.049405165016651154, 0.011694389395415783, -0.009349400177598, -0.04295835644006729, 0.008982757106423378, 0.016728093847632408, -0.018087729811668396, 0.04204174876213074, -0.002341169398277998, -0.029942525550723076, 0.017782192677259445, -0.03730593994259834, -0.01846964843571186, -0.004059809260070324, 0.018927952274680138, 0.01746137998998165, -0.0007075067260302603, 0.013206792064011097, 0.0012822962598875165, 0.04833579063415527, 0.01775163970887661, 0.0065766614861786366, 0.0022819717414677143, -0.05618806555867195, -0.00023917737416923046, -0.0257872361689806, 0.012175608426332474, -0.01400118600577116, -0.028689827769994736, 0.0770561695098877, -0.016407281160354614, -0.015108753927052021, -0.010403499938547611, 0.03730593994259834, -0.02091393619775772, 0.012878340668976307, 0.03131743520498276, -0.003110738005489111, 0.0011152062797918916, -0.004701434634625912, 0.012175608426332474, -0.0037141714710742235, 0.014467127621173859, 0.00025588637799955904, -0.01182424183934927, -0.0111978929489851, 0.0234193317592144, 0.02853705920279026, -0.05774629861116409, 0.0017826113617047668, 0.020700061693787575, 0.012672103941440582, 0.012557527981698513, -0.00152958941180259, -0.028399568051099777, -0.008005042560398579, -0.008302940055727959, -0.008631391450762749, 0.019432086497545242, -0.015238606370985508, 0.021601391956210136, -0.0008488171151839197, 0.00029264617478474975, -0.045005448162555695, 0.011167339980602264, -0.010915271937847137, -0.00311264768242836, 0.025710850954055786, 0.020654231309890747, -0.005006970837712288, 0.00035757257137447596, -0.031836848706007004, -0.009227186441421509, 0.020287588238716125, 0.01637672819197178, -0.0019878933671861887, 0.029652265831828117, -0.009945196099579334, -0.004338610917329788, 0.0194168109446764, 0.03531995788216591, 0.010884718969464302, -0.0012775223003700376, 0.011587451212108135, 0.008761243894696236, 0.012840148992836475, 0.009769512340426445, 0.00630167918279767, -0.0035575844813138247, -0.01758359558880329, -0.005186473019421101, -0.03865030035376549, -0.017125291749835014, -0.03102717734873295, -0.01810300536453724, -0.010197263211011887, 0.01703363098204136, 0.010166709311306477, 0.026841334998607635, -0.02150973118841648, 0.004800733644515276, 0.030599426478147507, -0.014658087864518166, 0.0004921993240714073, 0.021540286019444466, 0.013474135659635067, 0.02056257054209709, -0.016101745888590813, -0.007791167125105858, -0.021188918501138687, 0.07180095463991165, -0.030339721590280533, -0.030950793996453285, 0.02685661055147648, -0.023251287639141083, 0.0269177183508873, 0.0035251211374998093, 0.04366108775138855, -0.007600207347422838, 0.03379227593541145, 0.006866920739412308, -0.0021731245797127485, -0.017018353566527367, 0.033211760222911835, 0.014810855500400066, 0.017079461365938187, 0.001594515866599977, 0.005010789725929499, -0.0008827124838717282, -0.00470525398850441, -0.014375466853380203, -0.026108048856258392, 0.05719633400440216, -0.011908263899385929, 0.00039313884917646646, 0.0439666248857975, -0.0047205304726958275, 0.02751351334154606, -0.043630536645650864, 0.05212443694472313, -0.02091393619775772, 0.05041343346238136, 0.027895433828234673, 0.018301604315638542, 0.016941970214247704, 0.020409801974892616, 0.03913915902376175, 0.00682109035551548, 0.010052133351564407, -0.006080165505409241, -0.005931216757744551, 0.013962993398308754, 0.009227186441421509, 0.029148131608963013, -0.034586671739816666, 0.026963548734784126, 0.015399012714624405, -0.002438558964058757, 0.023908188566565514, 0.05789906531572342, -0.030339721590280533, -0.00463268905878067, -0.005843375343829393, -0.036603208631277084, 0.02574140578508377, -0.007023508194833994, 0.021127812564373016, -0.01584203913807869, -0.023006858304142952, -0.01138121448457241, -0.0006301679532043636, 0.02537476271390915, -0.0029350549448281527, -0.014283806085586548, -0.0009285428677685559, -0.01182424183934927, -0.027437129989266396, -0.052399419248104095, 0.033456187695264816, 0.029835587367415428, 0.029209237545728683, 0.0075352806597948074, -0.02960643544793129, -0.029056470841169357, -0.02703993208706379, 0.0343116894364357, -0.04115569591522217, -0.04793859273195267, -0.005514923948794603, -0.010365307331085205, -0.04216396436095238, -0.0050757164135575294, 0.011243723332881927, -0.02514561079442501, 0.022181911394000053, 0.05496592074632645, -0.0030286251567304134, -0.04072794318199158, 0.024259556084871292, -0.02222774177789688, 0.04320278391242027, 0.00046618105261586607, -0.0008005996933206916, 0.008325855247676373, -0.025771958753466606, -0.010441691614687443, -0.022655492648482323, 0.008577922359108925, -0.029056470841169357, -0.0075543769635260105, 0.006836367305368185, -0.02615387924015522, -0.0013653638307005167, 0.04555541276931763, -0.0038573916535824537, -0.0400557667016983, -0.009097333066165447, 0.003284511622041464, 0.003712262026965618, -0.010991656221449375, 0.059182316064834595, -0.00034516016603447497, -0.021586116403341293, -0.01697252318263054, 0.01799606904387474, 0.018087729811668396, 0.02471785992383957, 0.023510992527008057, 0.014176868833601475, -0.0337006151676178, -0.03788645938038826, -0.011404129676520824, -0.03269234672188759, 0.028246799483895302, -0.003660702845081687, -0.020226480439305305, 0.026764949783682823, 0.012924171052873135, -0.01976817660033703, -0.007435981649905443, -6.367321475408971e-05, 0.015406651422381401, -0.029866140335798264, 0.011770772747695446, 0.018087729811668396, -0.01966124027967453, -0.007661314215511084, -0.05010790005326271, -0.005824279505759478, 0.003437279723584652, 0.020333418622612953, -0.0027861061971634626, 0.005488189868628979, 0.005178834777325392, -0.020470909774303436, 0.02477896772325039, 0.009693128056824207, 0.002602784428745508, -0.00778734777122736, -0.015299713239073753, -0.007309948094189167, -0.01152634434401989, -0.03156186640262604, -0.0587545670568943, 0.0017787922406569123, 0.005545477848500013, 0.027559343725442886, 0.009066780097782612, -0.020929213613271713, -0.029835587367415428, 0.006771440617740154, -0.022533277049660683, -0.021998589858412743, 0.0007089389255270362, -0.037397600710392, -0.02293047495186329, -0.0020757350139319897, -0.018546033650636673, 0.01804189942777157, 0.003626330057159066, 0.013519966043531895, 0.0037428156938403845, 0.003284511622041464, -0.0005361201474443078, -0.002877766964957118, -0.011472875252366066, 0.00851681549102068, -0.027177423238754272, 0.03001890890300274, 0.006798175163567066, 0.00031532265711575747, -0.009723681956529617, -0.01441365946084261, 0.032020170241594315, 0.01248114462941885, 0.028094032779335976, 0.00937995407730341, -0.031195221468806267, -0.01504000835120678, -0.015528865158557892, 0.020776445046067238, -0.01680447719991207, 0.019325150176882744, -0.013390113599598408, -0.005136823281645775, 0.04653312638401985, -0.040361300110816956, 0.0269177183508873, 0.002453835681080818, -0.02245689369738102, 0.012137415818870068, -0.017430827021598816, 0.017476657405495644, -0.050535649061203, -0.031714633107185364, -0.010342392139136791, 0.003462104359641671, 0.011037486605346203, 0.049771808087825775, -0.011068040505051613, 0.01033475436270237, -0.0072144679725170135, -0.002215135842561722, -0.030477212741971016, 0.0314396508038044, -0.045005448162555695, 0.012542251497507095, 0.0025932365097105503, -0.027803773060441017, 0.013588711619377136, -0.0063093178905546665, 0.010670843534171581, -0.024503983557224274, 0.011457598768174648, 0.01799606904387474, 0.02293047495186329, 0.010052133351564407, 0.023251287639141083, -0.024290109053254128, -0.011480513960123062, 0.020868105813860893, 0.0030973709654062986, -0.02966754138469696, 0.0035881379153579473, -0.004663242492824793, 0.005885386373847723, -0.012847787700593472, 0.015528865158557892, -0.014619896188378334, -0.012855425477027893, -0.011098594404757023, -0.01917238160967827, -0.00022461666958406568, 0.013810225762426853, 0.02150973118841648, -0.004518113099038601, -0.0175683181732893, -0.001233601476997137, 0.020302865654230118, 0.01167911197990179, -0.026046941056847572, 0.023083241656422615, 0.005018428433686495, -0.017721086740493774, 8.002416871022433e-05, 0.013451220467686653, -0.0157198254019022, 0.023633206263184547, -0.008791797794401646, 0.03318120539188385, 0.007183914538472891, 0.007905743084847927, 0.011480513960123062, 0.01027364656329155, 0.007875189185142517, 0.019034890457987785, -0.0020757350139319897, -0.02389291301369667, 0.006133634597063065, 0.007646037731319666, 0.01822522096335888, -0.010823611170053482, -0.013917163014411926, -0.0008726870873942971, -0.02699410170316696, 0.0004129509616177529, -0.0001438167382730171, -0.014398382045328617, -0.014551150612533092, 0.056738030165433884, 0.01758359558880329, 0.0004458915500435978, -0.03993355110287666, 0.015376097522675991, 0.0004022094653919339, 0.004361526109278202, -0.00440735649317503, -0.021876374259591103, 0.017125291749835014, -0.01865296997129917, 0.01822522096335888, -0.029087023809552193, 0.04158344492316246, 0.006263487506657839, 0.017430827021598816, 0.005098631605505943, 0.019523749127984047, -0.004178204108029604, -0.012083947658538818, 0.006836367305368185, -0.03211183100938797, -0.015979530289769173, -0.011717304587364197, -0.00831057783216238, 0.005702064838260412, 0.0538354367017746, -0.0031699356622993946, -0.013978270813822746, -0.0065881190821528435, 0.0501384511590004, 0.03192850947380066, 0.010831249877810478, -0.009250101633369923, 0.03102717734873295, -0.011625643819570541, -0.024977564811706543, -0.005297229625284672, -0.005797544959932566, 0.03253958001732826, 0.04760250449180603, 0.04133901745080948, -0.0045906780287623405, -0.027452407404780388, -0.0770561695098877, -0.004327153321355581, -0.014520596712827682, -0.0069280280731618404, 0.03975022956728935, 0.013565796427428722, -0.036908745765686035, 0.025985833257436752, -0.01290125586092472, 0.02251800149679184, 0.010357669554650784, 0.02525254711508751, 0.008027957752346992, -0.02520671673119068, 0.016392003744840622, 0.01441365946084261, -0.004025436472147703, 0.03742815554141998, -0.0380086749792099, -0.0029235973488539457, 0.0005819505313411355, 0.01319151557981968, -0.0035174828954041004, 0.011892987415194511, -0.0447915717959404, -0.011969371698796749, -0.015826763585209846, -0.008761243894696236, -0.03956690803170204, -0.03776424378156662, -0.03755037114024162, 0.024137340486049652, 0.03134799003601074, 0.003998701926320791, 0.024870628491044044, 0.020165374502539635, 0.011579813435673714, 0.007294671144336462, 0.007791167125105858, -0.010854165069758892, -0.008692498318850994, 0.007936296984553337, 0.017782192677259445, 0.024580368772149086, -0.019386256113648415, 0.0006034335237927735, 0.004403537139296532, -0.016300342977046967, -0.013863694854080677, -0.02459564432501793, 0.005877748131752014, -0.010097963735461235, -0.0012593810679391026, 0.038925282657146454, -0.03217293694615364, -0.0026829876005649567, -0.0018217582255601883, 0.004785457160323858, 0.022961027920246124, 0.004819829948246479, 0.022838814184069633, 0.00905150268226862, -0.01697252318263054, -0.0032062181271612644, 0.025008119642734528, -0.008134895004332066, 0.022365232929587364, 0.01649894192814827, -0.02286936715245247, 0.0013290814822539687, -0.011060401797294617, 0.019554302096366882, 0.005702064838260412, 0.009601467289030552, 0.006973858457058668, -0.002352626994252205, -0.03330342099070549, 0.003200489329174161, -0.012076308950781822, -0.026077494025230408, -0.01266446616500616, -0.03269234672188759, 0.02264021523296833, -0.008623752743005753, -0.011343022808432579, 0.008577922359108925, 0.00019275023078080267, 0.014925431460142136, -0.006691237445920706, 0.014703918248414993, 0.019264042377471924, -0.029514774680137634, -0.008348770439624786, -0.001730097457766533, -0.0012412398355081677, 0.023266563192009926, -0.01930987276136875, 0.03038555197417736, 0.010831249877810478, -0.0028815860860049725, -0.0047510843724012375, -0.004877117928117514, 0.017308613285422325, -0.025344207882881165, -0.013688011094927788, 0.004907671362161636, -0.011396491900086403, 0.020333418622612953, 0.00818836409598589, -0.03831420838832855, -0.030782748013734818, -0.036603208631277084, -0.027895433828234673], "index": 50}, {"title": "Jefferson Township, Berks County, Pennsylvania", "text": "Jefferson Township is a township in Berks County, Pennsylvania, United States. The population was 1,977 at the 2010 census.", "vector": [0.03500353544950485, 0.02087990939617157, -0.02843172661960125, 0.02222885936498642, 0.01690223440527916, -0.00976547971367836, -0.04893116280436516, -0.03915415331721306, -0.05137541517615318, 0.04763985797762871, 0.012613263912498951, -0.03387364745140076, -0.017974477261304855, 0.014942221343517303, 0.021041322499513626, -0.07194402813911438, -0.017882240936160088, 0.0006200704956427217, 0.00891229696571827, -0.02043025940656662, 0.020084373652935028, 0.002811754820868373, 0.03161386400461197, 0.024211931973695755, 0.01813589036464691, 0.009736655279994011, 0.024742288514971733, 0.0013078766642138362, 0.02271309867501259, -0.027670780196785927, 0.03230563551187515, -0.0047069150023162365, 0.029446320608258247, -0.05695568770170212, -0.010624426417052746, 0.01600293442606926, 0.055387675762176514, -0.012590204365551472, 0.036156486719846725, -0.022136623039841652, -0.013235855847597122, 0.005450567230582237, -0.04581819847226143, 0.040583811700344086, 0.022528626024723053, -0.005070094019174576, 0.01685611717402935, -0.029999736696481705, 0.026909833773970604, -0.0074134632013738155, -0.010566779412329197, 0.014411864802241325, -0.01819353736937046, -0.018850719556212425, -0.02836254984140396, 0.018504833802580833, 0.03608730807900429, 0.11520268023014069, -0.05635615438222885, 0.01734035462141037, -0.0008394910837523639, 0.0033349054865539074, -0.014527159743010998, -0.008422293700277805, 0.0020003668032586575, -0.05280506983399391, -0.005410213954746723, -0.006485338788479567, 0.0067332228645682335, -0.008572177030146122, -0.01773235760629177, 0.06410397589206696, 0.0036029662005603313, 0.02571076527237892, 0.036640722304582596, -0.0018245420651510358, 0.02621806412935257, -0.022517096251249313, 0.02531876415014267, 0.036133427172899246, 0.002960196929052472, -0.0038277911953628063, 0.002922726096585393, -0.00023689502268098295, -0.001317244372330606, -0.00633545545861125, -0.04750150442123413, -0.06608704477548599, -0.04985352233052254, 0.02757854387164116, -0.013281974010169506, 0.028685374185442924, -0.018942954018712044, -0.028062783181667328, 0.04650996997952461, -0.013454916886985302, 0.02490370161831379, -0.02355475164949894, 0.022932158783078194, 0.030899036675691605, 0.009523360058665276, -0.018793070688843727, 0.001856248127296567, 0.025088174268603325, 0.01111442968249321, 0.019000602886080742, 0.015691637992858887, 0.008064879104495049, 0.03454235568642616, -0.018389539793133736, 0.03876215219497681, 0.048193275928497314, -0.03684825450181961, -0.01724812015891075, -0.002141603035852313, -0.023278042674064636, 0.05054529011249542, 0.004369677510112524, -0.008825825527310371, 0.02084532007575035, -0.018908366560935974, 0.004035321995615959, 0.0015363047132268548, -0.010341953486204147, 0.011189371347427368, -0.028616197407245636, 0.043812066316604614, -0.023324161767959595, -0.0013936272589489818, -0.043304771184921265, -0.017017530277371407, -0.021859915927052498, -0.010318894870579243, 0.007718994747847319, -0.02843172661960125, 0.013477975502610207, 0.03643319383263588, 0.028547020629048347, 0.012002200819551945, 0.002529282122850418, -0.0248345248401165, 0.030507033690810204, 0.010180541314184666, -0.045057252049446106, -0.00578780472278595, -0.02262086234986782, -0.018320361152291298, -0.0068196943029761314, 0.015887638553977013, -0.023635458201169968, 0.02266697958111763, 0.009044886566698551, 0.038024261593818665, 0.00884888507425785, 0.025526294484734535, 0.0009367711609229445, -0.011483373120427132, 0.043373946100473404, 0.007119460962712765, -0.01740953139960766, -0.022390272468328476, 0.012059847824275494, 0.045172546058893204, 0.03154468908905983, -0.013016795739531517, 0.03412729501724243, 0.031729161739349365, -0.03541859984397888, -0.006248984485864639, -0.022102035582065582, -0.033066581934690475, -0.052574481815099716, -0.049161750823259354, 0.008289704099297523, -0.016314230859279633, -0.018931424245238304, 0.007713229861110449, -0.014065979979932308, -0.04971516877412796, 0.03161386400461197, 0.02217121236026287, 0.03274375572800636, 0.03495742008090019, -0.053589075803756714, 0.02748630754649639, -0.02716348133981228, -0.03504965454339981, -0.009379241615533829, 0.07235909253358841, -0.027255717664957047, -0.03950003907084465, 0.057555221021175385, 0.054419200867414474, 0.03456541523337364, 0.05317401513457298, 0.019842255860567093, -0.010388071648776531, -0.021594736725091934, -0.0027368131559342146, 0.030022796243429184, 0.04717867821455002, 0.009079474955797195, -0.006381573621183634, 0.025918297469615936, 0.05340460315346718, 0.01736341416835785, 0.018354950472712517, -0.0017236589919775724, 0.0015435107052326202, 0.062397606670856476, 0.0013114797184243798, -0.030760683119297028, -0.030045855790376663, -0.03474988788366318, -0.04088357836008072, 0.061936426907777786, -0.020268846303224564, 0.009131357073783875, 0.02361239865422249, 0.11713963747024536, 0.03860073909163475, -0.005580273922532797, 0.018481774255633354, 0.010901134461164474, 0.013823860324919224, 0.04254382476210594, -0.008024525828659534, 0.02753242664039135, 0.006375808734446764, 0.02124885283410549, 0.035718366503715515, 0.011033723130822182, -0.01106254756450653, 0.01737494394183159, -0.023416398093104362, 0.005874276161193848, -0.04302806407213211, 0.03380446881055832, 0.05377354845404625, -0.014942221343517303, -0.031775277107954025, -0.0008834472973830998, 0.0015103634214028716, -0.0065314569510519505, 0.06654822826385498, 0.0008812855230644345, -0.05377354845404625, -0.015507166273891926, -0.018758483231067657, 0.0604606531560421, -0.043258652091026306, 0.00455703167244792, 0.014411864802241325, 0.00754028744995594, 0.011183606460690498, -0.06119854003190994, -0.046809736639261246, 0.0016559232026338577, 0.04254382476210594, -0.02981526590883732, 1.5864310626056977e-05, 0.02614888735115528, 0.004634855780750513, -0.03368917480111122, 0.018873777240514755, -0.016233524307608604, 0.014838455244898796, 0.03682519495487213, -0.02801666408777237, -0.007557581644505262, 0.014204333536326885, -0.022470979019999504, 0.020972145721316338, 0.023289572447538376, 0.05252836272120476, 0.0540502555668354, -0.009534889832139015, -0.001010992331430316, -0.05026858299970627, -0.03186751529574394, 0.014515629969537258, -0.01086654607206583, -0.010353483259677887, -0.0383240282535553, 0.01736341416835785, 0.012267379090189934, -0.010947252623736858, -0.010768544860184193, 0.021145086735486984, -0.02349710464477539, -0.02797054685652256, -0.02308204211294651, 0.05160600319504738, -0.008099467493593693, 0.015322694554924965, -0.013858448714017868, 0.004343735985457897, -0.03694049268960953, -0.049115635454654694, 0.0036317899357527494, -0.007782406639307737, -0.02972302958369255, -0.011339254677295685, -0.04782433062791824, -0.01086654607206583, 0.017939887940883636, 0.007955349050462246, 0.01740953139960766, -0.00975394994020462, -0.06161360442638397, -0.01151796244084835, -0.006808164529502392, 0.006808164529502392, -0.007742053363472223, -0.006214396096765995, -0.022032858803868294, 0.012774677015841007, 0.03161386400461197, 0.024211931973695755, -0.061567485332489014, 0.019876843318343163, 0.051283176988363266, 0.014792338013648987, 0.00049973139539361, -0.002829049015417695, -0.031775277107954025, 0.011045252904295921, 0.03165998309850693, 0.06645599007606506, -0.0016905117081478238, 0.009448418393731117, 0.004384089261293411, -0.016245054081082344, -0.016798468306660652, 0.038485441356897354, 0.020510965958237648, -0.009148651733994484, -0.01464245468378067, 0.014999868348240852, 0.0024903700686991215, -0.009333123452961445, 0.006375808734446764, 0.029653852805495262, 0.039684511721134186, 0.011558315716683865, -0.01867777667939663, -0.030068913474678993, 0.038923561573028564, -0.01380080170929432, 0.009223593398928642, 0.0002325714594917372, 0.059768885374069214, -0.025849120691418648, 0.04127557948231697, 0.035257186740636826, 0.04116028547286987, -0.058431461453437805, -0.038831327110528946, 0.004237087909132242, -0.02311663143336773, 0.029676910489797592, 0.06862353533506393, 0.004358147736638784, 0.0532662495970726, -0.011788904666900635, -0.01086654607206583, -0.004199617076665163, 0.020534023642539978, 0.008877708576619625, -0.00432932423427701, -0.017155883833765984, 0.03585672006011009, -0.009777008555829525, 0.010365013033151627, -0.021975211799144745, -0.02269003912806511, -0.004631973337382078, 0.01508057489991188, -0.04049157351255417, -0.01731729693710804, 0.0398920401930809, -0.04521866515278816, 0.05460367351770401, -0.02083379030227661, -0.030483976006507874, -0.04722479730844498, -0.008283939212560654, 0.023681575432419777, -0.06913083046674728, 0.003683672519400716, -0.04706338420510292, 0.006502633448690176, -0.004280323628336191, -0.05026858299970627, 0.0005227903602644801, 0.021052852272987366, -0.012705499306321144, 0.028201136738061905, -0.021064380183815956, 0.046348556876182556, -0.03064538910984993, 0.011195136234164238, -0.038900505751371384, -0.006958048325031996, 0.0005382831441238523, 0.0040872045792639256, 0.0030639623291790485, -0.041114166378974915, -3.906966230715625e-05, 0.07009930908679962, -0.03511882945895195, -0.028293373063206673, -0.004265911877155304, 0.016567878425121307, -0.03567224740982056, -0.01240573264658451, -0.05418860912322998, 0.05737074837088585, -0.01645258441567421, -0.0018692187732085586, -0.013673976995050907, 0.014861514791846275, -0.02926184982061386, -0.026886774227023125, -0.02757854387164116, -0.00018933587125502527, -0.03242092952132225, 0.015841521322727203, -0.03239786997437477, -0.0082032335922122, -0.030852919444441795, -0.0051565649919211864, -0.0743882805109024, 0.04436548426747322, 0.017905300483107567, -0.02626418136060238, -0.009390770457684994, -0.013466445729136467, 0.0240505188703537, 0.008278175257146358, 0.034058116376399994, 0.0033118464052677155, -0.03954615443944931, -0.022551685571670532, 0.05649450793862343, 0.03332022950053215, -0.04231323301792145, -0.02360086888074875, 0.006410397123545408, 0.030899036675691605, -0.01782459393143654, -0.03165998309850693, -0.02094908617436886, -0.013051384128630161, 0.0009893744718283415, 0.002706548199057579, 0.0050153289921581745, -0.0031100802589207888, -0.014792338013648987, -0.0470864437520504, -0.003484788816422224, -0.01065901480615139, -0.006312396842986345, -0.015403401106595993, -0.0628126710653305, 0.014031391590833664, 0.05916935205459595, 0.05188271030783653, -0.02803972363471985, -0.008969943970441818, -0.017628593370318413, 0.05192882940173149, -0.008110997267067432, 0.04261299967765808, -0.028270313516259193, -0.024327227845788002, 0.015806932002305984, 0.023635458201169968, -0.013812330551445484, -0.042405471205711365, -0.028547020629048347, -0.003502083010971546, -0.04275135323405266, -0.0057301572524011135, -0.03587977588176727, -0.01287844218313694, 0.023681575432419777, -0.007107931654900312, -0.009696302004158497, -0.007857348769903183, -0.026033591479063034, 0.04484972357749939, -0.053958021104335785, 0.021686973050236702, 0.04028404504060745, 0.04925398901104927, -0.031775277107954025, -0.000438480987213552, -0.014653983525931835, -0.02398134209215641, 0.026287240907549858, -0.009079474955797195, 0.04717867821455002, -0.015022927895188332, 0.05160600319504738, 0.006975342519581318, -0.026540890336036682, 0.02621806412935257, -0.039799805730581284, -0.003721143351867795, 0.01158137433230877, -0.016314230859279633, -0.01019207015633583, -0.011027958244085312, -0.04805492237210274, 0.01728270761668682, 0.029953619465231895, -0.049484577029943466, 0.010324659757316113, -0.0005815187469124794, -0.012325026094913483, 0.016314230859279633, 0.001591069856658578, -0.03599507361650467, 0.013501035049557686, 0.039384741336107254, 0.008497235365211964, 0.011039488017559052, -0.03770143911242485, -0.023254984989762306, -0.007015695795416832, 0.017986007034778595, -0.019657783210277557, 0.024165814742445946, 0.04851610213518143, -0.027716897428035736, -0.0071482849307358265, 0.01064748503267765, 0.008935355581343174, -0.025157351046800613, -0.05252836272120476, -0.015161281451582909, -0.010088304989039898, 0.013454916886985302, -0.018020594492554665, -0.021156616508960724, 0.017490237951278687, -0.01333962194621563, -0.002327516209334135, -0.005142153240740299, 0.04593349248170853, -0.017928360030055046, -0.016706233844161034, -0.004162146244198084, 0.0178130641579628, 0.0038594973739236593, -0.012002200819551945, 0.03066844679415226, -0.017501767724752426, -0.029515499249100685, 0.02884678728878498, 0.026886774227023125, -0.00936194695532322, -0.04879280924797058, -0.041044991463422775, 0.02750936709344387, 0.009044886566698551, 0.03320493549108505, 0.03553389385342598, 0.0006845635361969471, 0.018389539793133736, -0.050453055649995804, -0.005222859792411327, -0.0279244277626276, -0.005588921252638102, 0.0020709848031401634, -0.011817729100584984, -0.008503000251948833, -0.013916096650063992, -0.04980740323662758, 0.002193485852330923, -0.003983439411967993, -0.007044519297778606, -0.004499384202063084, 0.005897334776818752, 0.006197101902216673, -0.03163692355155945, 0.013501035049557686, -0.014573276974260807, -0.01603752188384533, -0.0027670778799802065, -0.006514162756502628, 0.011500667780637741, -0.006254749372601509, 0.03772449493408203, -0.023635458201169968, -0.0346115343272686, -0.0008243586635217071, 0.055387675762176514, 0.011368079110980034, 0.02228650636970997, 0.02937714383006096, -0.007130990736186504, -0.029538556933403015, 0.03244398906826973, 0.0036548487842082977, 0.033158816397190094, -0.015818461775779724, 0.02714042365550995, 0.047363150864839554, -0.025549354031682014, -0.05049917474389076, 0.05072976276278496, -0.0029184024315327406, -0.011506432667374611, -0.03694049268960953, -0.024073578417301178, 0.038393206894397736, -0.0016688938485458493, 0.023347219452261925, 0.0025307233445346355, -0.019784606993198395, -0.017190471291542053, -0.01734035462141037, 0.03415035456418991, -0.019219662994146347, 0.03408117592334747, -0.02748630754649639, -0.003251316724345088, -0.009863479994237423, -0.018308833241462708, -0.002056573051959276, 0.006139454431831837, 0.0016170111484825611, 0.019231192767620087, 0.01553022488951683, 0.022782275453209877, -0.0030380210373550653, 0.04014568775892258, 0.018827660009264946, 0.04441159963607788, -0.007228991016745567, -0.017882240936160088, -0.00016672725905664265, -0.021663915365934372, -0.02933102659881115, -0.037078846246004105, 0.004758797585964203, -0.013143620453774929, -0.009419594891369343, 0.049530696123838425, -0.030760683119297028, 0.013823860324919224, 0.001364082912914455, -0.07208237797021866, -0.024650052189826965, -0.015668578445911407, 0.0018000418785959482, 0.015126693062484264, -0.04452689737081528, 0.02316274866461754, -0.002081073122099042, 0.013431857340037823, -0.026471711695194244, 0.013281974010169506, -0.008503000251948833, -0.008802766911685467, 0.012394203804433346, 0.025987474247813225, -0.01817047782242298, 0.013766213320195675, 0.05386578291654587, 0.005459214095026255, 0.021421795710921288, 0.022839922457933426, 0.00709063746035099, -0.005496684927493334, -0.03020726703107357, -0.02670230157673359, 0.028500903397798538, -0.01288997195661068, -0.0055687446147203445, -0.004265911877155304, -0.013016795739531517, -0.008341587148606777, -0.02085684984922409, 0.010964546352624893, -0.014919161796569824, 0.020061315968632698, -0.006473809480667114, -0.01019207015633583, 0.019000602886080742, 0.0362948402762413, -0.013881508260965347, -0.017893770709633827, -0.023301102221012115, -0.013743153773248196, 0.007027225103229284, -0.018308833241462708, -0.05580274015665054, -0.06493409723043442, 0.03168304264545441, 0.02173309214413166, 0.008404999040067196, 0.044596072286367416, 0.012463380582630634, 0.0032974346540868282, -0.025664648041129112, 0.015126693062484264, -0.0039286743849515915, 0.011425726115703583, -0.012659382075071335, -0.0036144955083727837, 0.01950789988040924, -0.002794460626319051, 0.007228991016745567, 0.004718444310128689, -0.006214396096765995, -0.02349710464477539, -0.011713963001966476, 0.03295128792524338, 0.053542960435152054, 0.01818200759589672, -0.03431176766753197, -0.022309565916657448, 0.010284306481480598, -0.031198803335428238, -0.009967245161533356, 0.005914628971368074, 0.027878310531377792, 0.016994470730423927, 0.03341246768832207, -0.017098236829042435, 0.0010700809070840478, 0.026471711695194244, 0.03770143911242485, -0.03998427838087082, -0.05298954248428345, -0.028155017644166946, 0.015714697539806366, 0.008531823754310608, -0.05640227347612381, -0.03189057484269142, 0.007966878823935986, 0.002934255637228489, 0.019300369545817375, -0.038854386657476425, 0.004185205325484276, -0.0010441396152600646, -0.017075177282094955, -0.038001205772161484, -0.027832193300127983, -0.044204071164131165, -0.04833162948489189, -0.03468070924282074, 0.028985140845179558, 0.006767811719328165, 0.017432590946555138, 0.04252076521515846, 0.014400335028767586, -0.002719518728554249, -0.004430206958204508, 0.01597987487912178, 0.03585672006011009, -0.01823965646326542, -0.029054319486021996, -0.0041736760176718235, 0.029446320608258247, 0.011235489509999752, -0.0011875376803800464, -0.011466079391539097, -0.04086051881313324, 0.0217446219176054, -0.0034127295948565006, 0.0365254282951355, 0.028062783181667328, 0.03541859984397888, -0.020741555839776993, -0.04229017347097397, -0.0041102636605501175, 0.018424127250909805, 0.00744805159047246, -0.02838560752570629, -0.03435788303613663, -0.001203390653245151, -0.004271676763892174, -0.019346486777067184, -0.02714042365550995, 0.003277258016169071, -0.0006769973551854491, -0.010088304989039898, -0.014849985018372536, 0.031221862882375717, 0.0013568770373240113, 0.010491837747395039, 0.023773811757564545, 0.007494169287383556, 0.03297434747219086, 0.030829859897494316, 0.018896836787462234, -0.012186672538518906, 0.02886984683573246, -0.006779341027140617, 0.0008956973906606436, 0.006272043567150831, -0.05718627944588661, -0.021859915927052498, 0.02536488138139248, 0.01085501629859209, 0.033573880791664124, -0.03375834971666336, -0.004228441044688225, 0.008497235365211964, 0.0009230799041688442, -0.041460052132606506, 0.014342687092721462, 0.00743652181699872, -0.0008827266865409911, -0.0006193498848006129, -0.029584676027297974, 0.0007450933917425573, 0.010099834762513638, -0.018793070688843727, -0.06262819468975067, -0.05464978888630867, 0.030760683119297028, -0.011909964494407177, -0.00957524310797453, -0.023681575432419777, 0.003810497000813484, 0.024258051067590714, 0.03020726703107357, -0.04694809019565582, -0.0373094342648983, 0.009875009767711163, -0.003202316351234913, 0.02762466110289097, -0.002052249386906624, -0.022943688556551933, 0.013720095157623291, -0.0009569477988407016, 0.019750019535422325, 0.011091371066868305, 0.0027022245340049267, -0.007378874812275171, 0.05298954248428345, 0.014042920432984829, 0.0006553795537911355, 0.03205198794603348, -0.03477294743061066, 0.024719228968024254, 0.005309330765157938, -0.021594736725091934, -0.01995754987001419, 0.0024687524419277906, -0.02441946230828762, -0.017582474276423454, 0.01814742013812065, -0.03631789982318878, -0.001996043138206005, 0.009039121679961681, 0.011252784170210361, 0.021652385592460632, 0.016982940956950188, -0.012117495760321617, 0.013893037103116512, 0.034334827214479446, -0.009846185334026814, 0.011886905878782272, -0.026494771242141724, 0.020591672509908676, 0.038001205772161484, 0.020061315968632698, -0.06548751145601273, -0.013950685039162636, -0.0005127020995132625, -0.029169613495469093, -0.02036108262836933, 0.008975708857178688, 0.0082032335922122, -0.034842122346162796, 0.010935722850263119, 0.039776746183633804, 0.013673976995050907, 0.007880407385528088, 0.018354950472712517, -0.03594895452260971, 0.004949034191668034, 0.04261299967765808, -0.004185205325484276, 0.022447919473052025, 0.0014274951536208391, -0.01242879219353199, 0.006652516778558493, 0.0069811069406569, 0.012636322528123856, 0.051698241382837296, 0.01397374365478754, 0.006006865296512842, 0.02137567661702633, 0.015564813278615475, 0.029123496264219284, -0.027647720649838448, -0.04044545814394951, 0.062397606670856476, 0.041529227048158646, -0.011731257662177086, -0.01001912821084261, 0.008099467493593693, 0.02797054685652256, 0.03332022950053215, 0.01596834510564804, -0.027186540886759758, -0.0068600475788116455, -0.006623692810535431, 0.002186279743909836, -0.040560752153396606, -0.019715430215001106, -0.008964180015027523, 0.06119854003190994, -0.03509577363729477, -0.008410763926804066, 0.03770143911242485, -0.004410030320286751, -0.0020825143437832594, 0.003159080632030964, 0.020626259967684746, -0.010947252623736858, -0.00039524538442492485, 0.034519296139478683, -0.02707124687731266, -0.006842753384262323, 0.012647852301597595, -0.018343420699238777, -0.016694704070687294, -0.015726227313280106, 0.021168146282434464, -0.01468857191503048, 0.0028881377074867487, -0.01176008116453886, 0.019761549308896065, -0.01220973115414381, -0.028178077191114426, 0.005859863944351673, -0.04118334501981735, 0.01774388737976551, 0.005450567230582237, 0.005294919013977051, 0.016141287982463837, 0.01996907964348793, -0.00911982823163271, -0.003749967087060213, -0.013616329059004784, 0.0049115633592009544, -0.014400335028767586, -0.01909283734858036, -0.0022035741712898016, 0.011829257942736149, 0.028754552826285362, 0.0235432218760252, -0.023750752210617065, -0.002511987928301096, -0.03018420934677124, -0.003150433534756303, -0.0041506169363856316, 0.011212430894374847, -0.003974792081862688, -0.024742288514971733, -0.04411183297634125, 0.01553022488951683, -0.08227445185184479, 0.022874511778354645, 0.026794537901878357, -0.006364279426634312, -0.018770013004541397, 0.01694835163652897, 0.030922096222639084, -0.012947618961334229, 0.024211931973695755, 0.01683305762708187, 0.017928360030055046, 0.01240573264658451, -0.03435788303613663, 0.026563948020339012, 0.03138327598571777, -0.014296569861471653, -0.02571076527237892, 0.001890836632810533, 0.028662316501140594, 0.006375808734446764, -0.019657783210277557, -0.018989073112607002, 0.006560280453413725, -0.017132824286818504, 0.05059140920639038, -0.020245786756277084, -0.03590283542871475, 0.01600293442606926, -0.02309357188642025, 0.03866991400718689, -0.016982940956950188, 0.00754028744995594, -0.003288787556812167, 0.017075177282094955, -0.022136623039841652, -0.02661006711423397, 0.00455703167244792, -0.017109764739871025, -0.017536357045173645, 0.03375834971666336, 0.010065246373414993, 0.005211330018937588, 0.021514032036066055, -0.02353169210255146, -0.010572543367743492, -0.01592222787439823, -0.016072111204266548, -0.00566386291757226, 0.03765532001852989, 0.007932290434837341, -0.017570944502949715, 0.029146553948521614, 0.06290490925312042, 0.04053769260644913, -0.03498047590255737, -0.0061798072420060635, -0.02794748730957508, 0.01047454308718443, 0.0028751669451594353, -0.015057516284286976, -0.02803972363471985, 0.026471711695194244, 0.018308833241462708, 0.01353562343865633, -0.037493906915187836, -0.030829859897494316, 0.007966878823935986, 0.01731729693710804, 0.04037627950310707, 0.016325760632753372, 0.01156407967209816, -0.02134108915925026, -0.033158816397190094, 0.0035482009407132864, -0.012555615976452827, -0.014042920432984829, -0.01814742013812065, -0.02358933910727501, -0.01131619606167078, -0.029676910489797592, -0.017859183251857758, 0.02707124687731266, -0.043835125863552094, 0.026356417685747147, -0.040676046162843704, -0.0014505541184917092, 0.0011284489883109927, -0.009719361551105976, -0.005675392225384712, 0.011454549618065357, -0.0169137641787529, -0.011143253184854984, -0.02672536112368107, -0.01954248733818531, 0.017859183251857758, -0.05072976276278496, 0.018112830817699432, 0.024626994505524635, 0.010693603195250034, 0.006560280453413725, 0.010353483259677887, -0.018550951033830643, -0.034450121223926544, -0.018919896334409714, 0.012993737123906612, -0.006554516032338142, -0.0027656368911266327, 0.004118910990655422, 0.03419647365808487, -0.01378927193582058, -0.015207399614155293, 0.04143699258565903, -0.005623509641736746, -0.03147551044821739, 0.0006276366766542196, -0.004614679142832756, 0.01443492341786623, -0.006525692064315081, -0.01868930645287037, -0.00025022600311785936, 0.0051767416298389435, 0.0217446219176054, -0.01736341416835785, 0.054373081773519516, -0.05252836272120476, -0.01594528742134571, 0.00709063746035099, -0.002447134582325816, -0.003715378697961569, 0.041921231895685196, 0.00015186502423603088, -0.02271309867501259, 0.004412912763655186, 0.023347219452261925, 0.0008257998269982636, 0.004179440904408693, 0.021179676055908203, -0.04805492237210274, -0.014757749624550343, -0.029515499249100685, 0.0055053322575986385, 0.01443492341786623, -0.02437334507703781, -0.014861514791846275, 0.019726959988474846, 0.0006546589429490268, -0.014665513299405575, 0.04316641762852669, 0.03325105458498001, -0.029953619465231895, 0.00911406334489584, 0.021571679040789604, -0.010641721077263355, 0.0025105467066168785, -0.0024846054147928953, 0.013201267458498478, 0.011177842505276203, -0.010347718372941017, -0.00349055347032845, 0.0033003168646246195, -0.035764481872320175, -0.00689463596791029, -0.0011824935209006071, 0.0478704497218132, 0.018977543339133263, -0.017962947487831116, 0.0023909283336251974, -0.05400414019823074, 0.017006000503897667, -0.04118334501981735, 0.010699368081986904, 0.0032743755728006363, -0.026771480217576027, 0.032674580812454224, 0.03908497467637062, -0.02094908617436886, 0.029607733711600304, -0.013950685039162636, -0.012982207350432873, -0.02524958737194538, 0.019842255860567093, -0.010053716599941254, -0.016129758208990097, -0.016291171312332153, 0.01913895644247532, -0.01736341416835785, 0.01651023142039776, -0.010301601141691208, -0.047270916402339935, -0.011644786223769188, 0.0028477844316512346, -0.011051017791032791, 0.014377276413142681, 0.03348164260387421, -0.01313209068030119, 0.0230359248816967, -0.0045800902880728245, -0.0024658699985593557, 0.020084373652935028, 0.013097502291202545, -0.003435788443312049, 0.03774755448102951, 0.022966746240854263, -0.014607865363359451, -0.0014671278186142445, -0.0030581976752728224, 0.0008092261850833893, 0.05003799498081207, 0.0033262583892792463, 0.027371013537049294, -0.038900505751371384, 0.01351256389170885, -0.010353483259677887, 0.003954615443944931, -0.0029011082369834185, -0.0034098471514880657, -0.0017438356298953295, -0.013443387113511562, -0.03016114979982376, 0.004657914396375418, -0.04053769260644913, -0.007822760380804539, 0.013823860324919224, -0.015645520761609077, -0.01867777667939663, -0.004920210689306259, 0.0014274951536208391, 0.03242092952132225, 0.0023433691821992397, 0.02089143916964531, 0.001462804269976914, 0.012970677576959133, 0.01307444367557764, -0.0068600475788116455, 0.02836254984140396, 0.02212509512901306, 0.0051969182677567005, -0.015564813278615475, 0.012036789208650589, 0.004167911130934954, -0.001614128821529448, 0.010889604687690735, 0.029607733711600304, -0.012117495760321617, -0.01553022488951683, -0.029953619465231895, 0.03059927001595497, -0.051283176988363266, 0.008024525828659534, 0.03694049268960953, 0.0009288446744903922, -0.011829257942736149, -0.05543379485607147, 0.03846238553524017, 0.0036750254221260548, -0.017605533823370934, -0.01954248733818531, -0.013281974010169506, 0.021525559946894646, 0.004026675131171942, -0.004401383455842733, 0.004755915142595768, -0.0445038378238678, 0.010255482979118824, -0.008047585375607014, -0.02446558140218258, 0.006675575394183397, 0.02181379869580269, 0.013697035610675812, 0.02451169863343239, 0.031221862882375717, 0.024603934958577156, 0.018574010580778122, 0.01242879219353199, 0.014019861817359924, 0.03594895452260971, 0.019830726087093353, 0.0013727301266044378, -0.003692319616675377, 0.015195869840681553, 0.03500353544950485, -0.0035885542165488005, -0.004214029293507338, -0.005747451446950436, 0.01826271414756775, 0.011852317489683628, 0.013443387113511562, 0.01091266330331564, 0.008520293980836868, -0.027232658118009567, -0.008860413916409016, -0.019657783210277557, 0.003680790076032281, -0.02762466110289097, -0.028339490294456482, 0.01694835163652897, 0.011662080883979797, 0.03521106764674187, 0.015853051096200943, -0.0012423027073964477, -0.008670177310705185, 0.005537038203328848, 0.0059953355230391026, 0.029238790273666382, -0.019242720678448677, 0.029561616480350494, 0.005908864550292492, -0.008831590414047241, -0.014492570422589779, -0.016314230859279633, 0.011235489509999752, -0.021214263513684273, -0.024142755195498466, 0.014411864802241325, 0.05497261509299278, -0.004764562472701073, 0.0020608967170119286, 0.01444645319133997, -0.005764745641499758, 0.026932891458272934, 0.006318161264061928, -0.01686764694750309, -0.02626418136060238, -0.0017712181434035301, 0.008866178803145885, -0.023301102221012115, 0.02836254984140396, 0.01815894991159439, 0.0005408052238635719, 0.017974477261304855, 0.008935355581343174, 0.0016977175837382674, 0.002027749316766858, 0.012763147242367268, 0.01110866479575634, 0.024142755195498466, -0.0478704497218132, 0.025872178375720978, -0.020545553416013718, 0.03509577363729477, 0.03299740329384804, -0.02711736410856247, -0.0029212848749011755, -0.005747451446950436, 0.011235489509999752, 0.024211931973695755, 0.008330057375133038, -0.003920027054846287, -0.03251316770911217, -0.010526426136493683, -0.00028103135991841555, -0.016613997519016266, 0.03283599019050598, 0.0026474595069885254, 0.027278777211904526, 0.009973010048270226, -8.1911184679484e-06, 0.030945155769586563, -0.004055498633533716, -0.012832324020564556, 0.012371144257485867, -0.010145952925086021, -0.007488404866307974, -0.05520320683717728, -0.0075345225632190704, -0.008946885354816914, -0.02891596406698227, 0.012820794247090816, 0.00421979371458292, -0.022874511778354645, 0.02451169863343239, 0.04307417944073677, 2.72192824013473e-06, -0.0030264914967119694, -0.00422555860131979, 0.0022741921711713076, 0.005317978095263243, 0.0017351885326206684, 0.0030726094264537096, -0.0029443439561873674, -0.02259780280292034, 0.013109032064676285, -0.013939155265688896, 0.010140188038349152, -0.02446558140218258, -0.019865313544869423, 0.002030631760135293, -0.010509131476283073, 0.012717029079794884, 0.010238188318908215, -0.01047454308718443, 0.02976914681494236, 0.0008121085702441633, -0.049161750823259354, -0.01202525943517685, 0.008070643991231918, 0.049161750823259354, -0.021064380183815956, 0.03544165566563606, 0.02976914681494236, 0.005211330018937588, 0.0018548069056123495, -0.0013410239480435848, 0.010555249638855457, -0.016233524307608604, -0.03332022950053215, 0.017478710040450096, 0.004000733606517315, 0.011725492775440216, 0.03447318077087402, -0.007759348023682833, 0.022805335000157356, 0.035326361656188965, 0.0009958598529919982, 0.04833162948489189, -0.02568770758807659, -0.0021992505062371492, 0.041114166378974915, -0.006462280172854662, 0.04222099855542183, -0.0030985509511083364, 0.03500353544950485, -0.00743652181699872, 0.005194035824388266, 0.026932891458272934, 0.010624426417052746, -0.010071011260151863, -0.010030657984316349, -0.0019917197059839964, -0.004366795066744089, 0.05677121505141258, -0.04833162948489189, 0.005222859792411327, 0.00825511571019888, -0.009160180576145649, 0.0015824227593839169, 0.02880067005753517, 0.019196603447198868, 0.009938421659171581, -0.011229724623262882, -0.04272829741239548, 0.016740821301937103, 0.01352409366518259, -0.018124360591173172, 0.017455650493502617, 0.00015519776206929237, 0.019334957003593445, 0.008820060640573502, -0.009062180295586586, 0.00818593893200159, 0.03410423547029495, -0.020291905850172043, 0.007177108433097601, -0.021894505247473717, 0.012613263912498951, -0.009419594891369343, 0.03101433254778385, -0.010803133249282837, 0.006542986258864403, 0.026494771242141724, 0.003461729735136032, 0.018424127250909805, -0.011529491282999516, -0.013097502291202545, 0.01641799509525299, -0.011471844278275967, -0.02312815934419632, 0.013178208842873573, 0.010687838308513165, 0.001733747310936451, 0.020142022520303726, -0.007223226595669985, 0.01912742666900158, -0.00216177967377007, -0.02402746118605137, 0.0018144537461921573, -0.010976076126098633, -0.03783979266881943, -0.011143253184854984, 0.008699001744389534, -0.011275842785835266, -0.018089773133397102, 0.0032801402267068624, -0.0006593427970074117, 0.04007651284337044, -0.009206298738718033, 0.010053716599941254, -0.00754605233669281, 0.058016400784254074, 0.045564550906419754, 0.011074076406657696, -0.008260880596935749, -0.002916961442679167, -0.00172510021366179, 0.0076613472774624825, 0.018770013004541397, -0.034842122346162796, 0.007586405612528324, 0.004571443423628807, 0.015069045126438141, -0.04049157351255417, 0.03631789982318878, 0.028085840865969658, -0.026471711695194244, -0.030437856912612915, 0.01333962194621563, 0.00014907271543052047, 0.016187405213713646, 0.00018312074826098979, -0.014723160304129124, 0.013570211827754974, -0.0007494169403798878, 0.002646018285304308, 0.01782459393143654, -0.03689437359571457, 0.04664832353591919, -0.004830856807529926, -0.03154468908905983, -0.010267011821269989, 0.023370278999209404, -0.03560306876897812, 0.01112595945596695, -0.024995937943458557, -0.005162329878658056, 0.0021228676196187735, -0.03735555335879326, 0.0169137641787529, 0.012809265404939651, 0.020188139751553535, -0.0029356968589127064, 0.007079107686877251, 0.03691743314266205, -0.010382306762039661, 0.0073096975684165955, -0.019300369545817375, 0.009436888620257378, 0.04009957239031792, -0.026356417685747147, -0.007119460962712765, -0.024304168298840523, -0.014481041580438614, 0.02700207009911537, 0.03412729501724243, -0.010347718372941017, -0.017190471291542053, -0.0028074311558157206, 0.012301967479288578, 0.017663180828094482, 0.003784555708989501, 0.017997536808252335, -0.004121793434023857, 0.031314097344875336, -0.02439640462398529, -0.01738647371530533, 0.004208264406770468, 0.006496868561953306, 0.04514949023723602, 0.06539527326822281, -0.006496868561953306, 0.0066352225840091705, -0.015680108219385147, 0.028131959959864616, -0.009396535344421864, 0.014953750185668468, -0.004902916494756937, 0.026886774227023125], "index": 51}, {"title": "Epsom Downs", "text": "Epsom Downs is an area of chalk upland near Epsom, Surrey; in the North Downs. Part of the area is taken up by the racecourse, the gallops are part of the land purchased by Stanly Wootton in 1925 in order that racehorses can be trained without interference. It is open to users such as ramblers, model aircraft flyers, golfers and cyclists. But all users are subject to the controls laid down by the purchase order; see 'The Wootton Family - Australia to Epsom' by Bill Eacott page 66/67.", "vector": [-0.018810689449310303, 0.03345569223165512, -0.017085833474993706, -0.017264828085899353, -0.01608509197831154, 0.04077818989753723, 0.024196796119213104, -0.02167460136115551, 0.019982289522886276, 0.0006885184557177126, -0.021804779767990112, -0.019331401214003563, -0.003205627901479602, -0.020047379657626152, 0.04761252552270889, 0.0410710908472538, -0.056822601705789566, 0.008294765837490559, 0.0036510799545794725, 0.027890590950846672, 0.04207997024059296, -0.0038707549683749676, -0.0302500631660223, -0.02063317969441414, -0.020372822880744934, 0.04728708043694496, -0.017199739813804626, 0.018729329109191895, -0.019754478707909584, -0.007538107223808765, 0.0016831581015139818, -0.017883174121379852, -0.015312162227928638, 0.025303306058049202, -0.030900951474905014, 0.04279594495892525, 0.008225608617067337, -0.03228409215807915, -0.06040249392390251, 0.027174612507224083, 0.02292756177484989, -0.05513029173016548, 0.010861708782613277, 0.03784919157624245, -0.036905400454998016, -0.0404527448117733, -0.002503888215869665, -0.0008603938040323555, -0.014669409021735191, -0.016475625336170197, -0.022862473502755165, 0.005585440434515476, 0.0257914736866951, 0.004417908377945423, -0.05067170411348343, -0.025319579988718033, 0.009616883471608162, 0.0935327410697937, -0.0011146472534164786, 0.023659812286496162, 0.0139778396114707, -0.020193828269839287, 0.009755197912454605, 0.014075472950935364, 0.01558879017829895, -0.0029900209046900272, 0.025221945717930794, 0.004450452979654074, 0.020356550812721252, -0.015255209058523178, -0.0008298833854496479, 0.02806958556175232, 0.009625019505620003, 0.048686493188142776, -0.030933495610952377, 0.00394601421430707, 0.0038809252437204123, 0.0567900575697422, -0.004147382918745279, 0.020828446373343468, -0.023480817675590515, -0.03449711203575134, -0.08897651731967926, 0.007302159909158945, 0.05298236012458801, 0.002654406474903226, 0.007566583808511496, -0.055065203458070755, 0.06069539114832878, -0.017004473134875298, 0.03125894069671631, -0.03252817317843437, -0.008087295107543468, 0.009031083434820175, -0.008803272619843483, 0.020177556201815605, 0.030900951474905014, 0.004816578235477209, 0.01993347331881523, 0.020161284133791924, -0.004015170969069004, 0.0113498754799366, -0.015141303651034832, -0.03941132500767708, -0.0012865226017311215, 0.013684939593076706, -0.01207398995757103, -0.004580630920827389, 0.05519538000226021, -0.02849266305565834, 0.06118356063961983, -0.03420421481132507, 0.03563616797327995, -0.005024048965424299, -0.04552967846393585, 0.005890544969588518, -0.00392160564661026, -0.019689390435814857, 0.025514846667647362, 0.0022801451850682497, 0.0002285738883074373, 0.007582855876535177, -0.001893679960630834, 0.018127257004380226, 0.02045418508350849, -0.0030632459092885256, 0.010821028612554073, -0.023676084354519844, 0.010096914134919643, 0.005585440434515476, 4.980189987691119e-05, 0.002227260498329997, 0.003378520254045725, -0.010113186202943325, 0.005931225139647722, -0.007928640581667423, -0.01941276155412197, 0.01817607320845127, 0.052591826766729355, -0.008062887005507946, -0.011463780887424946, 0.016377992928028107, 0.011382419615983963, 0.014970445074141026, -0.014295147731900215, 0.05194093659520149, -0.0013119479408487678, 0.025221945717930794, 0.021430518478155136, 0.011048839427530766, -0.013481536880135536, -0.012423842214047909, 0.005174566991627216, 0.029859529808163643, 0.00011333348811604083, 0.008640550076961517, -0.11397065222263336, -0.012814375571906567, -0.01889205165207386, 0.049272291362285614, 0.0057074823416769505, -0.03262580558657646, 0.0010882049100473523, 0.011838042177259922, 0.004731148947030306, -0.013180500827729702, 0.007184186484664679, 0.011211561970412731, 0.03475746884942055, -0.0003434964455664158, -0.010642034001648426, -0.012122806161642075, -0.04569240286946297, -0.005019980948418379, 0.022130222991108894, 0.023448273539543152, -0.021300340071320534, 0.05366579070687294, 0.04797051474452019, 0.06697647273540497, -0.02942018024623394, -0.02509176731109619, 0.026377273723483086, -0.016874294728040695, -0.003610399551689625, -0.029176095500588417, -0.030526690185070038, 0.03407403454184532, 0.04982554540038109, -0.06609777361154556, -0.014311419799923897, 0.00435688765719533, 0.0744616910815239, 0.004971164278686047, 0.008892769925296307, 0.012033308856189251, -0.029127279296517372, 0.06326640397310257, 0.050932057201862335, 0.0004706231993623078, 0.0077618504874408245, -0.053503070026636124, 0.006972647737711668, -0.029859529808163643, -0.017476366832852364, -0.005874272435903549, 0.03125894069671631, 0.0271583404392004, 0.01991720125079155, 0.033911313861608505, 0.0007220798870548606, 0.020079923793673515, -0.03810954466462135, 0.03270716965198517, -0.07381080090999603, 0.02250448428094387, 0.01889205165207386, 0.011886859312653542, 0.02776041254401207, -0.015645742416381836, 0.02227667346596718, -0.0491095706820488, -0.00851850863546133, -0.0025282965507358313, 0.007879824377596378, 0.0524616464972496, -0.008298833854496479, 0.04767761379480362, -0.022878745570778847, -0.054121412336826324, 0.00392160564661026, -0.03187728673219681, 0.01796453446149826, 0.00678551709279418, -0.053600702434778214, 0.01244011428207159, -0.03579889237880707, 0.008738183416426182, 0.0016129841096699238, -0.015873553231358528, -0.012554019689559937, 0.03697049245238304, -0.0020970827899873257, -0.06215989217162132, -0.03361841291189194, -0.011301059275865555, -0.01284691970795393, 0.030803319066762924, 0.02837875671684742, -0.011862450279295444, 0.018403884023427963, 0.006187513004988432, 0.03853262588381767, -0.0066878837533295155, 0.02878556214272976, -0.03810954466462135, -0.053405437618494034, 0.008868361823260784, -0.04364210367202759, -0.018940867856144905, -0.035766348242759705, -0.005406446289271116, 0.030917223542928696, -0.015645742416381836, -0.02889946848154068, -0.022130222991108894, -0.010609489865601063, -0.001730957766994834, 0.0003854482783935964, -0.02352963387966156, -0.02457105740904808, 0.012358753010630608, -0.03654741123318672, -0.022113950923085213, 0.02540094032883644, -0.014173106290400028, 0.05347052589058876, -0.007940844632685184, -0.011325467377901077, -0.0530799925327301, 0.02011246792972088, -0.005569168366491795, -0.005504079628735781, -0.034236758947372437, -0.006427528336644173, 0.018745601177215576, 0.018208617344498634, 0.012342480942606926, 0.029680535197257996, -0.017915718257427216, -0.00917753390967846, -0.029468996450304985, 0.01993347331881523, 0.06782262772321701, 0.007253343239426613, 0.003588025225326419, -0.07986406981945038, -0.026247095316648483, -0.03374858945608139, -0.03269089758396149, -0.04139653593301773, 0.0392160564661026, -0.023301823064684868, 0.04683145880699158, 0.013701211661100388, 0.0118787232786417, -0.014889083802700043, -0.009738925844430923, -0.02147933468222618, -0.025205673649907112, 0.0861126035451889, -0.005479671061038971, 0.007489290554076433, -0.010145731270313263, -0.016361720860004425, -0.048133235424757004, -0.010959342122077942, -0.017720451578497887, -0.0183713398873806, 0.01295269001275301, -0.016142046079039574, -0.028639113530516624, -0.059295982122421265, -0.012578428722918034, 0.057213135063648224, -0.008079159073531628, 0.019363945350050926, 0.03077077306807041, -0.021593239158391953, 0.0026849168352782726, -0.035863980650901794, -0.03495273366570473, -0.005715618375688791, 0.005516283679753542, 0.059816692024469376, 0.008176792412996292, 0.02694680169224739, -0.026084372773766518, -0.005711550358682871, 0.029599172994494438, 0.0291923675686121, 0.03086840733885765, 0.009348392486572266, -0.002491684164851904, 0.01652444340288639, -0.0011949914041906595, 0.03850007802248001, -0.017476366832852364, -0.05389360338449478, -0.02673526294529438, 0.0008690383983775973, 0.04497642442584038, -0.02003110572695732, 0.04471606761217117, 0.007013328373432159, -0.019217494875192642, -0.005459330976009369, -0.046896547079086304, -0.029045918956398964, -0.0057644350454211235, 0.009006675332784653, -0.0014797552721574903, -0.008746320381760597, 0.017671633511781693, -0.061866991221904755, 0.033488236367702484, 0.022976379841566086, 0.008404603227972984, 0.005837659817188978, 0.030298879370093346, 0.010186411440372467, -0.010072506032884121, -0.015523700974881649, 0.006041062995791435, -0.023659812286496162, -0.0311775803565979, -0.021495606750249863, 0.02714206837117672, -0.02260211855173111, -0.00014212769747246057, 0.019884657114744186, 0.07146760076284409, 0.0032341042533516884, 0.03654741123318672, 0.0055488282814621925, -0.03177965059876442, 0.02157696709036827, -0.004853190388530493, -0.009991144761443138, 0.009934192523360252, -0.03413912281394005, 0.052884723991155624, 0.02557993493974209, 0.0029615445528179407, 0.055390648543834686, -0.015222664922475815, 0.01547488383948803, 0.017313646152615547, 0.02034027874469757, 0.0108861168846488, 0.0006163104553706944, -0.03898824751377106, -0.00031679985113441944, 0.025254489853978157, 0.006098015699535608, -0.024424606934189796, -0.008127975277602673, 0.02043791301548481, 0.012586564756929874, -0.023985257372260094, 0.011170880869030952, 0.05490247905254364, 0.03094976767897606, 0.03778410330414772, 0.036189425736665726, 0.005142022389918566, -0.06743209064006805, 0.045464590191841125, 0.002538466826081276, -0.07478713989257812, -0.011268514208495617, -0.040615469217300415, -0.041233811527490616, -0.023903895169496536, -0.008534780703485012, 0.05844982713460922, -0.005646461620926857, 0.022065134719014168, 0.020177556201815605, -0.016874294728040695, 0.019754478707909584, -0.0037344752345234156, 0.01785062812268734, -0.001143123721703887, -0.016036275774240494, 0.009088036604225636, 0.03207255154848099, 0.00228217919357121, 0.06814806908369064, 0.036059245467185974, -0.017378734424710274, -0.028964556753635406, -0.029062191024422646, -0.026084372773766518, 0.010284044779837132, 0.008502236567437649, -0.006606522481888533, 0.025205673649907112, -0.020616905763745308, 0.005430854391306639, 0.029436452314257622, 0.003647011937573552, 0.02312282845377922, 0.007241139188408852, 0.02610064670443535, -0.031242668628692627, 0.026149462908506393, -0.0007047906401567161, 0.013448992744088173, 0.000703265133779496, 0.05324271321296692, 0.048361048102378845, 0.023350639268755913, -0.05275454744696617, -0.009291439317166805, 0.039801858365535736, 0.011284786276519299, 0.02889946848154068, -0.008412739261984825, 0.03207255154848099, -0.011065111495554447, -0.05047643557190895, -0.06479599326848984, 0.05386105924844742, -0.03501782566308975, 0.02857402339577675, -0.0004629956092685461, -0.033081430941820145, 0.018957139924168587, 0.028248580172657967, 0.003496493911370635, -0.031633201986551285, 0.039053335785865784, 0.03488764539361, -0.03778410330414772, -0.004328411538153887, 0.02229294553399086, -0.01734619028866291, -0.032153911888599396, 0.01981956698000431, -0.009494842030107975, 0.0026361001655459404, 0.003323601558804512, 0.003644977929070592, -0.018745601177215576, -0.0009519250597804785, -0.010357270017266273, 0.009022947400808334, 0.017102107405662537, 0.06964511424303055, -0.024294428527355194, 0.03417166694998741, -0.0012397399405017495, -0.013912750408053398, 0.05366579070687294, 0.017720451578497887, -0.016345448791980743, 0.02588910609483719, -0.005589508451521397, 0.007468950469046831, 0.059719059616327286, 0.013302542269229889, -0.00095751864137128, -0.00239811884239316, 0.012098398059606552, -0.020828446373343468, 0.0007978474604897201, 0.03249562904238701, 0.003911435604095459, 0.0305592343211174, -0.020812172442674637, 0.013229317031800747, -0.003242240520194173, 0.012204167433083057, -0.0239364393055439, -0.007749646436423063, 0.004926415625959635, 0.027386151254177094, 0.003728373209014535, 0.007289955858141184, -0.00339275854639709, -0.011528870090842247, 0.02640981785953045, 0.013880206272006035, -0.032267820090055466, -0.025661295279860497, -0.06499125808477402, -0.031112490221858025, 0.015596926212310791, 0.01289573684334755, -0.03664504736661911, 0.018940867856144905, -0.04022493585944176, 0.04282849282026291, 0.010031825862824917, 0.009909783490002155, -0.04012730345129967, -0.0009280252270400524, -0.001328220241703093, 0.05298236012458801, 0.008477828465402126, 0.01120342593640089, -0.04718944802880287, 0.00023798126494511962, -0.046180568635463715, -0.03387876972556114, 0.015873553231358528, 0.01222857553511858, 0.0030449398327618837, 0.02227667346596718, 0.02042163908481598, 0.032235272228717804, -0.009551795199513435, -0.03671013563871384, -0.005971905775368214, 0.01580032892525196, -0.0004146874416619539, -0.01485653966665268, -0.06489362567663193, -0.022764839231967926, 0.01284691970795393, 0.023285550996661186, 0.024912772700190544, 0.009478569962084293, 0.038955703377723694, 0.015181983821094036, -0.029761895537376404, -0.012627244926989079, 0.02847639098763466, -0.020405367016792297, 0.025726385414600372, 0.01653257943689823, 0.012334344908595085, 0.028834380209445953, 0.011447508819401264, -0.017460094764828682, -0.029778167605400085, -0.017671633511781693, -0.03374858945608139, -0.025986740365624428, -0.008429011330008507, 0.006191581021994352, -0.005597644951194525, -0.026914257556200027, -0.024343246594071388, 0.020096195861697197, 0.018615422770380974, -0.004454520996659994, -0.015580653212964535, -0.0205355454236269, 0.011829906143248081, 0.02951781265437603, -0.024099161848425865, 0.008640550076961517, -0.021202705800533295, -0.039574045687913895, 0.01993347331881523, 0.042893581092357635, -0.04357701167464256, 0.013383903540670872, -0.016548851504921913, -0.01817607320845127, 0.007013328373432159, 0.04155925661325455, -0.009079900570213795, -0.040713101625442505, 0.009226350113749504, 0.04767761379480362, 0.004230778198689222, 0.01755772903561592, -0.035343267023563385, -0.04100600257515907, -0.004613175056874752, 0.02086099050939083, 0.03872789070010185, -0.008746320381760597, 0.008534780703485012, -0.035766348242759705, 0.01641053706407547, 0.011227834038436413, -0.010511856526136398, 0.018029622733592987, -0.026051828637719154, -0.02217903919517994, 0.03449711203575134, 0.039899490773677826, -0.0009671802399680018, 0.022748567163944244, -0.010821028612554073, -0.0028883195482194424, -0.02601928450167179, 0.017980806529521942, -0.005308812949806452, -0.010023689828813076, -0.011626503430306911, 0.01589796133339405, 0.051452770829200745, 0.03137284517288208, 0.05626934766769409, -0.04930483549833298, 0.01177295297384262, 0.021918684244155884, 0.03976931422948837, -0.0005893595516681671, -0.010568808764219284, -0.026295913383364677, -0.027060706168413162, -0.03531072288751602, -0.014897219836711884, -0.024847684428095818, -0.03495273366570473, 0.0156782865524292, -0.012537747621536255, 0.0041860295459628105, -0.003207661909982562, -0.026149462908506393, -0.03107994608581066, 0.01692311279475689, -0.01222857553511858, -0.022048862650990486, -0.003724304959177971, -0.0583847351372242, 1.9990680812043138e-05, 0.03827226907014847, 0.0016221372643485665, -0.01005623396486044, -0.012204167433083057, -0.006565841846168041, -0.0012956757564097643, 0.03449711203575134, 0.03233290836215019, -0.05005335807800293, -0.010658306069672108, -0.0355059914290905, -0.07485222816467285, 0.017574001103639603, 0.019673118367791176, -0.002131661167368293, 0.0135791702196002, -0.020991167053580284, 0.03352078050374985, -0.005312880966812372, -0.012114670127630234, -0.0029290001839399338, -0.015971187502145767, 0.037816647440195084, -0.0010780347511172295, -0.03446456789970398, 0.003622603602707386, -0.008876497857272625, 0.02911100722849369, 0.016068819910287857, 0.026605084538459778, -0.018452700227499008, 0.021121345460414886, -0.00635023508220911, -0.016695300117135048, -0.03278852999210358, -0.016744118183851242, 0.010910525918006897, 0.008900905959308147, 0.019982289522886276, -0.0038809252437204123, 0.057766392827034, 0.04224269092082977, -0.013082867488265038, 0.06905931234359741, -0.014823995530605316, -0.010560672730207443, 0.015548109076917171, 0.03160065785050392, 0.0118136340752244, 0.0051664309576153755, -0.00327478488907218, 0.008640550076961517, 0.03579889237880707, -0.019900929182767868, -0.0270281620323658, 0.032560717314481735, 0.008534780703485012, -0.007672353181988001, -0.01331881433725357, -0.009063628502190113, -0.0017970636254176497, -0.015434203669428825, -0.018420156091451645, -0.00570341432467103, -0.036059245467185974, -0.021951228380203247, -0.027402423322200775, 0.04207997024059296, -0.013603578321635723, 0.03908587992191315, 0.020405367016792297, 0.0055122156627476215, -0.004312139004468918, 0.0183713398873806, -0.020177556201815605, -0.0590030811727047, 0.011235970072448254, 0.004983368329703808, -0.022781113162636757, 0.018110984936356544, -0.045171692967414856, 0.003311397507786751, 0.027744140475988388, 0.027744140475988388, 0.06372202932834625, -0.0030876542441546917, 0.0036795565392822027, 0.0008085260633379221, 0.04409772530198097, -0.0460178479552269, 0.00804254598915577, 0.01962430030107498, 0.08415994048118591, -0.03306515887379646, -0.004523678217083216, 0.00239811884239316, 0.013530353084206581, -0.015385386534035206, 0.006858741864562035, -0.028671657666563988, 0.015580653212964535, 0.0367426797747612, 0.03540835902094841, 0.03456220030784607, -0.0028801835142076015, -0.004967096261680126, -0.005760367028415203, 0.03127521276473999, -0.019152406603097916, -0.03156811371445656, 0.008420875295996666, -0.0355059914290905, -0.017704179510474205, 0.011724136769771576, -0.013929023407399654, -0.07700015604496002, -0.0014136494137346745, 0.031031129881739616, 0.02889946848154068, 0.027695324271917343, 0.05148531496524811, 0.00059952971059829, 0.06479599326848984, 0.025661295279860497, 0.03879297897219658, -0.017362462356686592, -0.021088801324367523, -0.009665700607001781, 0.02126779593527317, 0.032674625515937805, 0.012139078229665756, 0.03508291393518448, -0.03335805609822273, 0.0036958286073058844, -0.008795136585831642, 0.023985257372260094, 0.031242668628692627, 0.018908323720097542, 0.009974872693419456, 0.004198233596980572, -0.006586182396858931, 0.03384622558951378, -0.0015997629379853606, -0.0245547853410244, 0.006093947682529688, 0.017085833474993706, 0.059588879346847534, -0.009568067267537117, -0.015954915434122086, -0.021446790546178818, 0.005178635008633137, 0.0059068170376122, 0.001152276759967208, 0.0013211010955274105, -0.0032117299269884825, 0.006716359872370958, 0.00763574056327343, 0.0087219113484025, 0.007045872509479523, 0.0029574765358120203, 0.015133167617022991, -0.004373160190880299, 0.016491897404193878, -0.032251548022031784, 0.005544759798794985, 0.013025914318859577, -0.003488357877358794, 0.013009642250835896, -0.01692311279475689, -0.04172198101878166, -0.018957139924168587, 0.01570269465446472, 0.025661295279860497, -0.0038849932607263327, 0.03148675337433815, -0.04435807839035988, -0.036905400454998016, 0.025514846667647362, 0.018908323720097542, 0.027727868407964706, 0.009120580740272999, -0.010365406051278114, -0.019347673282027245, 0.028329940512776375, 0.01991720125079155, -0.04139653593301773, -0.014775178395211697, 0.031324028968811035, -0.007908300496637821, -0.007363181095570326, -0.032446812838315964, 0.024229340255260468, -0.010430495254695415, -0.011309195309877396, 0.0017960466211661696, -0.04735216870903969, -0.033683501183986664, -0.008754456415772438, -0.002052334137260914, -0.03531072288751602, -0.012977098114788532, -0.005459330976009369, -0.016044411808252335, -0.023985257372260094, -0.02094235084950924, 0.009079900570213795, -0.049369923770427704, 0.007106893230229616, 0.015409795567393303, -0.0279556792229414, 0.009869103319942951, -0.0060166544280946255, 0.010463039390742779, -0.018127257004380226, 0.014742634259164333, 0.022439396008849144, -0.016858022660017014, -0.01222857553511858, -0.04904447868466377, 5.418777436716482e-05, 0.022585846483707428, 0.03404149040579796, 0.00655363779515028, -0.028313668444752693, -0.017915718257427216, 0.0171346515417099, -0.01119528990238905, 0.0087219113484025, -0.02302519604563713, -0.0404527448117733, 0.008437147364020348, -0.027125796303153038, 0.0076886252500116825, 0.019445305690169334, 0.01610136404633522, -0.0043650236912071705, 0.012464523315429688, -0.0453995019197464, -0.00805475004017353, -0.05076933652162552, -0.005630189087241888, 0.058059293776750565, -0.05210365727543831, -0.010145731270313263, 0.019949745386838913, 0.041429080069065094, -0.02424561232328415, -0.026670172810554504, 0.0056342571042478085, 3.775664299610071e-05, 0.024294428527355194, -0.017915718257427216, -0.01512503158301115, 0.03544090315699577, 0.05799420177936554, -0.002804924501106143, -0.006329894997179508, 0.00500370841473341, -0.0011126132449135184, 0.044130269438028336, 0.017574001103639603, 0.004312139004468918, -0.0037019308656454086, 0.04269831255078316, -0.01939648948609829, -0.045659858733415604, 0.030201246961951256, 0.027532601729035378, 0.002918829908594489, -0.027386151254177094, -0.010576944798231125, -0.030217519029974937, 0.0011461747344583273, -0.018599150702357292, 0.02165832929313183, -0.0484912246465683, -0.007001123856753111, -0.008990403264760971, -0.0011227834038436413, 0.002215056447312236, 0.013017778284847736, 0.01315609272569418, 0.003488357877358794, -0.003533106530085206, 0.013660531491041183, -0.019949745386838913, -0.010365406051278114, 0.05438176915049553, -0.015865417197346687, -0.0205355454236269, 0.02291128970682621, 0.04533441364765167, -0.05171312391757965, 0.023920167237520218, -0.027402423322200775, -0.05633443593978882, 0.0226997509598732, 0.02230921760201454, -0.015662014484405518, -0.023985257372260094, -0.012456386350095272, -0.013473400846123695, 0.00025832155370153487, 0.05818947032094002, 0.022764839231967926, 0.03950895741581917, -0.024017801508307457, 0.00068038230529055, -0.028818106278777122, -0.010951206088066101, -0.008420875295996666, -0.00032137639936991036, 0.01383139006793499, -0.014474142342805862, -0.002455071546137333, 0.013587306253612041, 0.010764075443148613, -0.00394601421430707, 0.02230921760201454, -0.018957139924168587, -0.006732632406055927, -0.015613198280334473, 0.038434989750385284, 0.003915503621101379, 0.0020930147729814053, -0.017622817307710648, -0.03345569223165512, -0.001235671923495829, 0.021235251799225807, 0.00295544252730906, -0.0423077791929245, -0.0009488739888183773, 0.014539231546223164, -0.00459283497184515, 0.02457105740904808, 0.03615688160061836, -0.02878556214272976, -0.003998898901045322, -0.012936417013406754, -0.033276695758104324, -0.02147933468222618, 0.028248580172657967, 0.0019689390901476145, 0.019754478707909584, -0.0355059914290905, -0.020291462540626526, 0.03335805609822273, -0.0183713398873806, -0.021137617528438568, -0.0012377059319987893, -0.0734853595495224, -0.01949412375688553, 0.02518940158188343, -0.022455668076872826, -0.01817607320845127, 0.027581417933106422, 0.007330636493861675, 0.018208617344498634, -0.0028089925181120634, 0.007106893230229616, -0.021902412176132202, -0.025238217785954475, 0.012326208874583244, -0.00591088505461812, -0.0008105601300485432, -0.01383139006793499, 0.01569455862045288, -0.023594724014401436, -0.01846897229552269, -0.0325932614505291, 0.022146495059132576, -0.025140585377812386, -0.02963171899318695, 0.021544422954320908, 0.017899446189403534, -0.00763980858027935, -0.048458680510520935, -0.003620569594204426, -0.006301418412476778, -0.0012834715889766812, 0.008762592449784279, -0.004853190388530493, 0.01135801151394844, 0.011984492652118206, -0.01724855601787567, 0.002158103510737419, 0.006008518394082785, -0.010576944798231125, -0.013294406235218048, -0.00042994265095330775, -0.0017167195910587907, 0.00015878130216151476, 0.01310727559030056, 0.02302519604563713, -0.014230059459805489, 0.02889946848154068, -0.03116130642592907, 0.031633201986551285, -0.0002227260556537658, -0.030217519029974937, -0.02343200147151947, 0.011471916921436787, 0.011919403448700905, 0.03986694663763046, 0.02022637240588665, 0.011244106106460094, -0.009006675332784653, 0.03181219473481178, 0.005068797618150711, -0.008278493769466877, -0.024294428527355194, 0.009112444706261158, 0.007188254501670599, 0.03446456789970398, -0.001998432446271181, -0.0069970558397471905, -0.009413480758666992, -0.0034130988642573357, -0.0010210820473730564, 0.024001529440283775, 0.0003335805668029934, 0.00719639053568244, -0.04234032332897186, -0.018452700227499008, 0.08318360149860382, 0.015360978431999683, 0.02878556214272976, -0.010788483545184135, -0.024701233953237534, -0.02416425198316574, -0.055488280951976776, 0.011447508819401264, 0.007180118467658758, -0.014343964867293835, 0.05298236012458801, -0.021528150886297226, -0.013066595420241356, -0.0283950287848711, 0.014417190104722977, -0.013457128778100014, 0.00435688765719533, 0.0398344025015831, 0.001339407404884696, 0.0029920549131929874, -0.03151929751038551, -0.006797721143811941, -0.04357701167464256, 0.003887027269229293, -0.023659812286496162, 0.03361841291189194, 0.029241185635328293, -0.012765559367835522, -0.03651486709713936, -0.02509176731109619, -0.007696761749684811, -0.01599559560418129, 0.022455668076872826, 0.006586182396858931, -0.019656846299767494, -0.013603578321635723, 0.024082889780402184, 0.0042714583687484264, 0.022016318514943123, 0.024310700595378876, -0.006866878364235163, -0.008909041993319988, 0.010227092541754246, 0.0021723418030887842, -0.05373087897896767, 0.022439396008849144, -0.018289979547262192, -0.008591733872890472, 0.000796321895904839, 0.008909041993319988, 0.01817607320845127, -0.02631218545138836, 0.02588910609483719, -0.011056975461542606, 0.013920886442065239, 0.03430184721946716, -0.013920886442065239, -0.0056342571042478085, 0.009551795199513435, 0.003748713294044137, 0.007131301797926426, 0.01991720125079155, -0.01527148112654686, 0.005133886355906725, -0.029696807265281677, 0.01222857553511858, 0.012090262025594711, -0.012863192707300186, -0.020307734608650208, 0.043511923402547836, -0.028118401765823364, 0.006301418412476778, 0.016638347879052162, 0.014897219836711884, -0.01785062812268734, -0.012008900754153728, 0.04982554540038109, -0.00766014913097024, -0.013546626083552837, -0.022943833842873573, 0.005406446289271116, 0.009462297894060612, -0.023903895169496536, 0.020909806713461876, 0.03954150155186653, 0.015605062246322632, 0.00048613265971653163, 0.0171346515417099, 0.026263367384672165, 0.012041444890201092, 0.026979345828294754, 0.015409795567393303, -0.02940390631556511, -0.04159180074930191, -0.02891574054956436, 0.005605780985206366, -0.009348392486572266, 0.015011126175522804, 0.019217494875192642, -0.0015306059503927827, 0.00047469124547205865, 0.005386105738580227, 0.025221945717930794, 0.0301198847591877, -0.04468352347612381, 0.010642034001648426, 0.010755939409136772, -0.004763693083077669, -0.024017801508307457, 0.0131154116243124, -0.0023126897867769003, -0.0010678645921871066, 0.008608005940914154, 0.014425326138734818, -0.016028139740228653, -0.047221992164850235, 0.004426044877618551, -0.005178635008633137, -0.024798868224024773, 0.023269278928637505, 0.0236272681504488, -0.01663021184504032, -0.0007892028079368174, -0.0007098757196217775, -0.010698986239731312, -0.00938907265663147, 0.019526667892932892, -0.018631694838404655, 0.006228193175047636, 0.014042928814888, -0.04048529267311096, 0.013627986423671246, -0.03220272809267044, -0.029680535197257996, 0.004771829582750797, -0.013196772895753384, 0.007517767138779163, 0.0008441215613856912, -0.029355090111494064, 0.004133144859224558, 0.01827370561659336, -0.036059245467185974, -0.01588982529938221, -0.0028313668444752693, 0.014880947768688202, -0.02590538002550602, 0.004405704326927662, 0.035245634615421295, -0.004885734990239143, 0.004975232295691967, -0.011040703393518925, 0.0118136340752244, -0.03459474816918373, -0.02437579073011875, 0.010438631288707256, 0.005341357085853815, 0.034627292305231094, 0.00959247536957264, 0.010511856526136398, 0.002898489823564887, 0.006541433744132519, -0.00980401411652565, -0.0245547853410244, -0.019250039011240005, -0.0248639564961195, -0.00790016446262598, -0.001995381433516741, 0.0016556987538933754, 0.002733733505010605, -0.009543659165501595, -0.0012153316056355834, 0.012033308856189251, -0.038662802428007126, 0.015499292872846127, 0.07036109268665314, -0.017508912831544876, -0.0009676887420937419, 0.013058459386229515, -0.011504461988806725, 0.019022228196263313, 0.006911626551300287, -0.013538490049540997, -0.012505203485488892, -0.006150900386273861, 0.01807844080030918, -0.025417212396860123, -0.020926078781485558, 0.024815140292048454, 0.0257914736866951, 0.008445283398032188, -0.0077618504874408245, -0.02291128970682621, 0.00722893513739109, -0.021316612139344215, 0.04396754503250122, 0.028346212580800056, -0.0040294090285897255, -0.015596926212310791, 0.01680920645594597, 0.03397640213370323, -0.006423459853976965, 0.023171646520495415, 0.02920863963663578, -0.00020060599490534514, -0.007871688343584538, 0.024017801508307457, -0.01491349283605814, 0.003323601558804512, 0.010609489865601063, -0.026605084538459778, 0.016361720860004425, 0.012366889975965023, -0.006329894997179508, -0.009511114098131657, -0.029159823432564735, 0.01026777271181345, 0.019429033622145653, -0.014929764904081821, -0.013326950371265411, 0.03221900016069412, -0.024326972663402557, 0.019884657114744186, 0.03810954466462135, 0.020991167053580284, -0.02652372419834137, -0.02032400667667389, 0.01558879017829895, 0.025108039379119873, 0.049369923770427704, -0.01641053706407547, 0.00251405849121511, -0.030477873980998993, 0.01962430030107498, 0.002328961854800582, -0.033781133592128754, -0.004857258405536413, 0.0012478760909289122, -0.009071764536201954, -0.011569550260901451, 0.04025747999548912, -0.0046538556925952435, 0.01931512914597988, 8.784457895671949e-05, 0.00851850863546133, 0.005914953071624041, -0.00013043203216511756, 0.026653900742530823, -0.039801858365535736, -0.015653878450393677, -0.00012598260946106166, -0.03589652478694916, -0.021332884207367897, -0.01182177010923624, -0.01972193457186222, -0.008388331159949303, 0.012358753010630608, 0.0007073332089930773, -0.0010454903822392225, 0.013937159441411495, -0.031210124492645264, -0.02291128970682621, 0.04002966731786728, -0.0033663162030279636, -0.019380217418074608, 0.0416894368827343, 0.02312282845377922, -0.013937159441411495, 0.01619899831712246, 0.00456842640414834, -0.016020003706216812, -0.007753714453428984, 0.04204742610454559, -0.013180500827729702, 0.012318072840571404, -0.02074708417057991, 0.017069561406970024, 0.012139078229665756, 0.035961613059043884, 0.0063624391332268715, 0.0171346515417099, 0.017167195677757263, -0.0018438462866470218, 0.013147956691682339, 0.01047117542475462, -0.015173847787082195, -0.013400175608694553, -0.014327692799270153, 0.011862450279295444, 0.014295147731900215, -0.013766300864517689, -0.03311397507786751, 0.01609322801232338, 0.000692077970597893, 0.025661295279860497, -0.022976379841566086, 0.04943501204252243, 0.033585868775844574, -0.01732991822063923, -0.005402378272265196, -0.03384622558951378, -0.017997078597545624, 0.040713101625442505, -0.02590538002550602, 0.02509176731109619, 0.0152796171605587, -0.01295269001275301, -0.0035473445896059275, -0.0015407761093229055, 0.027272246778011322, 0.003567684907466173, 0.012684198096394539, 0.01270047016441822, -0.0279556792229414, 0.04263322427868843, -0.009267031215131283, -0.01619086228311062, -0.024082889780402184, -0.015963051468133926, -0.002505922457203269, -0.02571011334657669, -0.011048839427530766, -0.003929741680622101, 0.04790542647242546, 0.027402423322200775, -0.012358753010630608, 0.001383138936944306, -0.00024853277136571705, 0.026035556569695473, 0.00924262311309576, 0.015743376687169075, 0.005304744932800531, -0.0013668667525053024, -0.020258918404579163, -0.026897985488176346, 0.023253006860613823, -0.011325467377901077, 0.012879464775323868, 0.01577592082321644, -0.004682332277297974, 0.04614802449941635, 0.009690108709037304, 0.04653855785727501, -0.017199739813804626, -0.004426044877618551, 0.018322523683309555, -0.020405367016792297, -0.022846201434731483, -0.018094712868332863, -0.008648687042295933, -0.01619086228311062, 0.021804779767990112, 0.012554019689559937, 0.016760390251874924, 0.003937878180295229, -0.013196772895753384, -0.022520756348967552, 0.008331377990543842, -0.009559931233525276, 0.015100623480975628, -0.0019292754586786032, 0.0014329726109281182, -0.027809228748083115, -0.03291870653629303, -0.017362462356686592, -0.008144247345626354, 0.017118379473686218, -0.025368396192789078, -0.0010770177468657494, -0.021023713052272797, 0.046603646129369736, -0.017411278560757637, -0.009462297894060612, 0.0005944446311332285, -0.004332479555159807, -0.023594724014401436, 0.041526712477207184, -0.016792934387922287, 0.009421616792678833, -0.016223406419157982, 0.03853262588381767, 0.007505563087761402, 0.031193852424621582, -0.034529656171798706, -0.03264208137989044, -0.018713057041168213, -0.019445305690169334, 0.008290697820484638, -0.007212663069367409, 0.022878745570778847, -0.006940103136003017, 0.015181983821094036, -0.03589652478694916, 0.026361001655459404, 0.02271602302789688, -0.007505563087761402, -0.001532639958895743, 0.026165734976530075, -0.011992628686130047, -0.008245948702096939, 0.030787046998739243, 0.004340615589171648, 0.00025921143242157996, 0.011642775498330593, 0.01621527038514614, -0.01755772903561592, 0.018322523683309555, -0.005353561602532864, -0.02663762867450714, 0.02073081210255623, 0.002802890492603183, -0.00722486712038517, 0.023301823064684868, 0.008648687042295933, -0.014701953157782555, 0.010764075443148613, 0.0016445115907117724, 0.025108039379119873, 0.03046160191297531, -0.017704179510474205, -0.023187918588519096, -0.023187918588519096, 0.050834424793720245, 0.0038219382986426353, -0.028443846851587296, 0.004047715570777655, -0.005272200331091881, 0.010048097930848598, -0.04510660097002983, 0.004507405683398247, 0.01672784611582756, 0.0017919786041602492, -0.022667206823825836, -0.0001021463394863531, -0.027125796303153038, -0.029176095500588417, -0.01910359039902687, -0.01175668090581894, 0.014335828833281994, -0.020372822880744934], "index": 52}, {"title": "Vichitravirya", "text": "In the epic Mahabharata, Vichitravirya (Sanskrit: \u0935\u093f\u091a\u093f\u0924\u094d\u0930\u0935\u0940\u0930\u094d\u092f, vicitrav\u012brya) is the younger son of queen Satyavat\u012b and king \u015aa\u1e45tanu and grandfather of the Pandavas and Kaurava. His elder brother, Chitr\u0101ngada, had initially succeeded their father to the throne of Hastinapura, but when he died childless, Vichitravirya succeeded him.Vichitravirya was still a child when he was crowned king, hence Bhishma ruled as his regent.", "vector": [0.024954576045274734, 0.006638835649937391, -0.016168976202607155, 0.04166955128312111, 0.028987513855099678, 0.0384928360581398, -0.022299041971564293, -0.06968916207551956, -0.02660497836768627, -0.00312552647665143, 0.02460712380707264, 0.014853619039058685, -0.056088853627443314, -0.02274576760828495, 0.04789888858795166, 0.04554117098450661, -0.02485530450940132, 0.02573634497821331, -0.04896606504917145, -0.017856605350971222, -0.04616162180900574, 0.018278513103723526, -0.029831327497959137, -0.030278053134679794, -0.01458062045276165, -0.02026395872235298, -0.042488548904657364, -0.021827498450875282, -0.015151435509324074, 0.004439333453774452, 0.021666180342435837, 0.03583730384707451, 0.005785713903605938, -0.01870042085647583, -0.01290540024638176, -0.045069627463817596, -0.05653557926416397, -0.0038374951109290123, -0.029409421607851982, -0.053607046604156494, -0.01946978084743023, -0.006086633540689945, 0.014766755513846874, -0.0003139098989777267, 0.018067559227347374, 0.0192464180290699, -0.017335426062345505, 0.0012789064785465598, -0.009617004543542862, -0.035266488790512085, 0.05020697042346001, -0.007004902232438326, 0.03414967283606529, 0.0699373409152031, -0.007433013990521431, -0.014791573397815228, 0.006725698709487915, 0.0010950976284220815, 0.03181677311658859, 0.005608885549008846, -0.010057525709271431, -0.01585875079035759, 0.012179471552371979, 0.02387499064207077, -0.002492665546014905, -0.011496974155306816, -0.02133113704621792, 0.00226930296048522, -0.003403178881853819, -0.0027641132473945618, 0.03988264873623848, -0.0025655687786638737, -0.010932362638413906, 0.0019559746142476797, -0.0006530256359837949, -0.002917675068601966, 0.015548525378108025, 0.060655377805233, -0.020003369078040123, 0.06025829166173935, 0.007830102927982807, 0.014295211993157864, -0.018985828384757042, 0.091727614402771, 0.03943592309951782, -0.041247643530368805, 0.00946189183741808, -0.04174400493502617, -0.01383607741445303, 0.023093219846487045, 0.050877057015895844, -0.04067682847380638, 0.007979012094438076, -0.010926158167421818, -0.0029409420676529408, 0.03139486536383629, 0.038443200290203094, 0.006818766705691814, -0.042637456208467484, 0.0054413634352386, 0.031196322292089462, -0.04626089334487915, -0.007439218461513519, 0.0032914974726736546, -1.229997451446252e-06, -0.026009343564510345, -0.030575869604945183, 0.0018706625560298562, 0.03583730384707451, 0.03864174708724022, -0.026183070614933968, -0.02248517796397209, 0.014382075518369675, 0.035961393266916275, -0.003921255934983492, -0.00030596036231145263, 0.014977709390223026, -0.005038069561123848, -0.030054690316319466, -0.052068326622247696, 0.014816392213106155, -0.0010997509816661477, -0.020971274003386497, -0.04005637764930725, 0.0027051703073084354, -0.01775733381509781, -0.027423974126577377, 0.019817234948277473, 0.02274576760828495, 0.054847948253154755, -0.045764531940221786, -0.045144081115722656, -0.032933589071035385, 0.05514576658606529, 0.003958483226597309, 0.015809115022420883, 0.0042687091045081615, -0.021753044798970222, 0.00907721184194088, 0.008276828564703465, 0.009858980774879456, 0.0466579832136631, -0.019420145079493523, 0.012365606613457203, 0.01775733381509781, -0.020499730482697487, -0.015287934802472591, 0.011292224749922752, 0.04516889899969101, -0.007681194692850113, -0.02453266829252243, 0.011726541444659233, -0.006719494238495827, 0.05186977982521057, 0.0025407506618648767, 0.00771842198446393, 0.03017878159880638, -0.0416199155151844, 0.04216591268777847, -0.00585086178034544, -0.016243431717157364, 0.031196322292089462, -0.06581754237413406, -0.013612715527415276, 0.061151739209890366, -0.026530524715781212, -0.01625584065914154, -0.008810416795313358, -0.03477012366056442, 0.010373956523835659, -0.004845729563385248, -0.023068401962518692, 0.024693986400961876, 0.04569007828831673, -0.01190026756376028, 0.017658062279224396, -0.04276154562830925, -0.021492455154657364, -0.010981999337673187, -0.003521064529195428, -0.034323401749134064, -0.06517226994037628, -0.0707811564207077, 0.03434821963310242, 0.05737939476966858, 0.05504649505019188, 0.0567341223359108, -0.009120643138885498, -0.097137950360775, 0.022410722449421883, -0.01975518837571144, 0.014543392695486546, 0.01129842922091484, 0.008531213738024235, -0.01190026756376028, -0.02479325793683529, 0.04487108439207077, -0.0041291075758636, 0.05996047332882881, -0.009288164786994457, 0.014444120228290558, -0.04159509763121605, -0.01990409754216671, 0.01935810036957264, -8.61361768329516e-05, 0.035489849746227264, -0.020760321989655495, -0.03305767849087715, 0.011602451093494892, 0.009827958419919014, -0.028441516682505608, 0.030749596655368805, 0.013550669886171818, -0.001997855259105563, -0.006793948356062174, -0.0018489466747269034, -0.004501378629356623, -0.028168516233563423, -0.05410340800881386, 0.00016936397878453135, -0.005432056728750467, 0.018613558262586594, 0.02023914083838463, 0.0041229031048715115, -0.022038452327251434, -0.01909751072525978, -0.05802466347813606, -0.02551298215985298, -0.05693266913294792, 0.025860436260700226, 0.03000505454838276, 0.06358391046524048, 0.03970892354846001, -0.02675388753414154, -0.025785982608795166, -0.0016472998540848494, 0.02248517796397209, -0.05047996714711189, 0.014890845865011215, -0.019854461774230003, 0.03194086626172066, 0.005357602145522833, -0.0165164303034544, 0.003257372649386525, 0.03506794199347496, 0.015238299034535885, -0.009064802899956703, -0.04804779589176178, 0.0009205955429933965, -0.02729988470673561, 0.05271359533071518, 0.021715817973017693, 0.004147720988839865, 0.01698797382414341, -0.027721792459487915, 0.06105246767401695, -0.01659088395535946, 0.020512141287326813, 0.02792033553123474, 0.016466794535517693, -0.016057295724749565, -0.06110210344195366, -0.00674431212246418, 0.03764902055263519, 0.0037940635811537504, -0.022770585492253304, 0.007761853281408548, 0.013637533411383629, -0.012204289436340332, 0.011447337456047535, 0.03792202100157738, -0.013972577638924122, -0.023701263591647148, -0.04578934982419014, 0.007606740575283766, -0.048320796340703964, -0.013550669886171818, 0.061151739209890366, 0.007811489515006542, 0.02876415103673935, 0.06899425387382507, 0.020313596352934837, -0.023031175136566162, -0.022336268797516823, -0.0074950591661036015, 0.03551466763019562, 0.04035419225692749, 0.04129727929830551, 0.02259685844182968, -0.0334547683596611, 0.03864174708724022, -0.035713210701942444, 0.015771888196468353, -0.03663147985935211, -0.016566066071391106, -0.005965644959360361, -0.022373495623469353, -0.009536346420645714, -0.03079923242330551, -0.07375932484865189, 0.05370631814002991, 0.0014254882698878646, -0.00915166549384594, 0.006471313536167145, -0.08135365694761276, -0.01851428486406803, 0.008841440081596375, 0.045292988419532776, -0.006477518007159233, -0.009058598428964615, -0.0322386808693409, -0.015908386558294296, 0.015734661370515823, 0.04104910045862198, 0.06700880825519562, 0.021715817973017693, 0.006207621656358242, 0.0076005361042916775, -0.03742565959692001, 0.056088853627443314, -0.01862596720457077, -0.026257524266839027, 0.036284029483795166, -0.008264419622719288, 0.03888992592692375, 0.007110379170626402, -0.01325285341590643, 0.02485530450940132, -0.004302834160625935, -0.027696972712874413, 0.01208640355616808, 0.006589199416339397, -0.019879279658198357, -0.001563538797199726, 0.04169436916708946, 0.00017837992345448583, 0.036432936787605286, 0.012508310377597809, -0.02161654457449913, -0.017744924873113632, -0.019953733310103416, 0.039311833679676056, 0.03794683888554573, 0.017074836418032646, 0.033876676112413406, 0.021641362458467484, -0.01290540024638176, 0.011881654150784016, -0.006936652585864067, -0.02146763727068901, 0.0004719312419183552, 0.029111603274941444, 0.006148678716272116, -0.024309305474162102, -0.01208640355616808, 0.021480046212673187, 0.013513443060219288, -0.008829031139612198, 0.03640811890363693, -0.015846341848373413, -0.011317042633891106, 0.005515817552804947, -0.0583224818110466, 0.02321731112897396, 0.0161441583186388, -0.05792539194226265, -0.0020862696692347527, -0.030898505821824074, 0.023937035351991653, 0.018563920632004738, 0.009703868068754673, 0.007867330685257912, 0.028168516233563423, 0.026034163311123848, 0.019668325781822205, 0.011720336973667145, 0.03412485495209694, 0.004585139453411102, 0.025761162862181664, 0.001969934906810522, 0.0007759527070447803, -0.025202756747603416, -0.013662351295351982, 0.03365331143140793, -0.009598391130566597, -0.031990502029657364, 0.026803523302078247, 0.004141516517847776, 0.003150344593450427, -0.017434699460864067, 0.00954875536262989, 0.014456530101597309, 0.02033841423690319, -0.032064955681562424, 0.017372652888298035, -0.00834507867693901, 0.03779793158173561, -0.036507390439510345, 0.04834561422467232, -0.027101339772343636, 0.0029083683621138334, 0.029111603274941444, -0.0007018862525001168, -0.021492455154657364, -0.011838222853839397, 0.04308418184518814, -0.04611198604106903, 0.020685866475105286, 0.024706395342946053, -0.011720336973667145, 0.0015930102672427893, 0.0361599363386631, 0.022472769021987915, -0.00503186509013176, 0.014121485874056816, -0.005401033908128738, 0.032610952854156494, 0.05479831248521805, 0.02285744808614254, -0.014506165869534016, -0.0040360395796597, 0.010342933237552643, 0.021169818937778473, 0.028788968920707703, -0.04564044252038002, 0.00043896972783841193, -0.01345139741897583, 0.02729988470673561, 0.040776100009679794, -0.030923323705792427, 0.003303906414657831, -0.024073533713817596, 0.025934889912605286, 0.028714515268802643, -0.02063623070716858, -0.06834898144006729, -0.00794798880815506, 0.020499730482697487, 0.016566066071391106, -0.015809115022420883, 0.02953351102769375, 0.0057577937841415405, -0.006638835649937391, -0.06214446574449539, -0.026183070614933968, 0.011273611336946487, 0.027275066822767258, -0.019221600145101547, 0.02365162782371044, 0.020152278244495392, 0.005798123311251402, -0.028242971748113632, -0.04472217336297035, -0.028242971748113632, -0.03290877118706703, 0.04636016860604286, 0.009772117249667645, -0.0033163155894726515, -0.016206204891204834, 0.013128762133419514, 0.012167061679065228, -0.0005715913139283657, -0.031767137348651886, -0.025438528507947922, 0.0014076502993702888, 0.005469283554702997, 0.03576285019516945, -0.018539102748036385, -0.008084488101303577, 0.013699578121304512, 0.015647796913981438, 0.021628953516483307, -0.04112355411052704, 0.0069986977614462376, 0.02690279483795166, -0.031072232872247696, 0.014890845865011215, 0.0007767282659187913, 0.023539945483207703, -0.004557219333946705, -0.0015829280018806458, -0.007743239868432283, -0.06586717814207077, 0.0392870157957077, -0.011658291332423687, -0.0023778819013386965, -0.07480168342590332, 0.00550340861082077, -0.028391879051923752, 0.034869398921728134, -0.012291152030229568, -0.01753397099673748, 0.060456834733486176, -0.045367445796728134, -0.0404534637928009, 0.018712829798460007, -0.06820007413625717, 0.007420605048537254, 0.014419302344322205, -0.022696131840348244, 0.04305936396121979, -0.011397701688110828, 0.011037839576601982, -0.027821063995361328, -0.009430869482457638, 0.013004671782255173, -0.02485530450940132, 0.020735502243041992, -0.014779164455831051, -0.04283599928021431, 0.020077824592590332, 0.033628493547439575, 0.011745154857635498, -0.011676904745399952, 0.028863422572612762, -0.02059900388121605, 0.05097632855176926, -0.004597548861056566, -0.003449712647125125, -0.009492914192378521, -0.015647796913981438, 0.023142855614423752, -0.014630256220698357, -0.011348065920174122, -0.015325162559747696, 0.03263577073812485, -0.012551742605865002, 0.001286662183701992, -0.03623439371585846, 0.0036203369963914156, 0.015027345158159733, -0.007743239868432283, -0.03397594764828682, -0.013302489183843136, 0.006496131420135498, 0.01100681722164154, 0.04509444534778595, -0.02208808809518814, 0.018675602972507477, 0.0021777863148599863, 0.002779624657705426, -0.018824510276317596, 0.004523094277828932, 0.0188493300229311, -0.006012178957462311, -0.027275066822767258, -0.04655871167778969, 0.02566189132630825, -0.014419302344322205, -0.03834392875432968, 0.025934889912605286, -0.03385185822844505, 0.005680237431079149, 0.026083799079060555, -0.006309995893388987, 0.03824465721845627, 0.014568210579454899, -0.00498533109202981, 0.04658352956175804, -0.01195610873401165, -0.019184373319149017, -0.007687399163842201, 0.026853159070014954, 0.031370047479867935, -0.013426579535007477, 0.0431586354970932, 0.01644197665154934, -0.006688471883535385, 0.0326605886220932, 0.02660497836768627, 0.0357876680791378, 0.025128303095698357, -0.001009009894914925, -0.05172087252140045, 0.015523706562817097, 0.003297701943665743, -0.0022088089026510715, -0.0020862696692347527, 0.0052055916748940945, 0.028416696935892105, 0.07048333436250687, -0.0019637304358184338, 0.02784588187932968, 0.009108234196901321, -0.016069704666733742, -0.03481976315379143, -0.014853619039058685, 0.04519371688365936, 0.006949061527848244, -0.02041286788880825, -0.01764565333724022, -0.002069207141175866, 0.018563920632004738, 0.009858980774879456, 0.0400315560400486, -0.020934047177433968, -0.009567368775606155, 0.059662654995918274, -0.005897395312786102, -0.028342243283987045, -0.01325285341590643, 0.04725361987948418, -0.002115741139277816, 0.018898965790867805, 6.858901906525716e-05, -0.008438145741820335, -0.031767137348651886, -0.052614323794841766, 0.028193335980176926, -0.002546955132856965, -0.04229000210762024, -0.018650785088539124, -0.03047659806907177, 0.03576285019516945, 0.04554117098450661, 0.045764531940221786, 0.002669494366273284, -0.007011106703430414, 0.0020040597300976515, 0.008090692572295666, 0.002069207141175866, 0.006967674940824509, -0.0025857333093881607, 0.012793718837201595, -0.018563920632004738, -0.02628234401345253, -0.03970892354846001, 0.011931289918720722, -0.021417999640107155, 0.02729988470673561, 0.0004889936535619199, 0.04472217336297035, 0.011192952282726765, 0.01796828769147396, 0.007544695399701595, -0.05762757360935211, -0.005338988732546568, -0.007172424346208572, 0.01862596720457077, -0.00021328034927137196, -0.0031643048860132694, -0.014456530101597309, -0.0006173496367409825, -0.03747529536485672, -0.0384928360581398, -0.026331979781389236, 0.01764565333724022, -0.007612945046275854, -0.022174950689077377, 0.01851428486406803, -0.03164304792881012, 0.005553044844418764, -0.01113711204379797, -0.03251168131828308, 0.02063623070716858, -0.0003474530822131783, -0.025364074856042862, 0.01862596720457077, -0.02103332057595253, 0.0014324684161692858, 0.019296053797006607, -0.026853159070014954, -0.009300574660301208, 0.02358958125114441, -0.004085675813257694, -0.017918651923537254, 0.011019226163625717, -0.001861355733126402, 0.0016721179708838463, 0.014828801155090332, 0.026803523302078247, -0.004234584514051676, -0.01593320444226265, -0.02595970779657364, 0.014084258116781712, 0.0012750286841765046, -0.01956905424594879, 0.004591344390064478, -0.05549322068691254, 0.02125668339431286, 0.037673842161893845, 0.021628953516483307, 0.006812562234699726, 0.00136034085880965, 0.05062887817621231, -0.016714975237846375, 0.044672537595033646, 0.0010508904233574867, 0.016863882541656494, 0.003204634180292487, 0.015995251014828682, 0.05186977982521057, 0.014903254806995392, -0.009071007370948792, 0.01734783500432968, 0.03710302338004112, 0.014928072690963745, 0.029483875259757042, 0.008537418209016323, 0.016938338056206703, 0.0221625417470932, -0.007737035397440195, 0.014568210579454899, 0.022249406203627586, -0.012483492493629456, -0.023639218881726265, -0.013352124951779842, 0.0024290692526847124, -0.002545404015108943, -0.010038912296295166, 0.012278743088245392, -0.0025655687786638737, 0.022286633029580116, -0.024904940277338028, -0.03437303751707077, -0.008010034449398518, -0.005543737672269344, -0.02595970779657364, 0.029210876673460007, 0.01920919120311737, 0.032536499202251434, 0.04159509763121605, -0.012880581431090832, 0.03132041171193123, 0.02628234401345253, -0.012868172489106655, 0.002596591366454959, -0.015846341848373413, 4.5734093873761594e-05, 0.002345308195799589, -0.008456760086119175, -0.0074950591661036015, 0.022336268797516823, 0.01388571411371231, 0.020896820351481438, -0.016901109367609024, -0.015871159732341766, -0.007662581279873848, 0.03263577073812485, -0.018898965790867805, -0.011751359328627586, -0.009319188073277473, 0.015064572915434837, -0.004771275445818901, -0.021566908806562424, 0.0031829182989895344, 0.015374798327684402, 0.0059160091914236546, -0.015833932906389236, 0.04603753238916397, 0.042811181396245956, -0.021492455154657364, 0.01570984348654747, -0.06586717814207077, 0.027002068236470222, -0.008773189969360828, -0.02067345753312111, -0.024545077234506607, -0.005131137557327747, 0.013165989890694618, -0.014779164455831051, 0.06035756319761276, 0.021306319162249565, -0.0031301798298954964, 0.03948555886745453, -0.04896606504917145, 0.008065874688327312, -0.008953121490776539, -0.0023282459005713463, -0.005484794732183218, -0.025289619341492653, 0.003353542648255825, 0.048395249992609024, -0.018787283450365067, 0.021008502691984177, -0.01721133664250374, 0.0104049788787961, -0.003750631818547845, -0.017695289105176926, -0.012669628486037254, -0.007985216565430164, -0.027026886120438576, -0.0036451551131904125, -0.0020878207869827747, -0.035489849746227264, -0.028118880465626717, 0.023974262177944183, 0.033876676112413406, 0.021641362458467484, 0.020003369078040123, 0.026108616963028908, 0.05549322068691254, 0.014208348467946053, 0.009182688780128956, 0.06358391046524048, 0.02744879201054573, 0.019085101783275604, 0.027399156242609024, 0.002588835544884205, -0.007364764343947172, 0.015734661370515823, -0.0017962083220481873, 0.00851260032504797, 0.03109705075621605, -0.022075679153203964, -0.06120137870311737, 0.027275066822767258, 0.01935810036957264, 0.03680520877242088, -0.023167675361037254, 0.021318728104233742, -0.00387782440520823, -0.01290540024638176, -0.02464435063302517, -0.03414967283606529, -0.02806924469769001, -0.02242313139140606, -0.02504143863916397, 0.02960796467959881, 0.015176254324615002, -0.017223745584487915, 0.03062550723552704, 0.038219839334487915, -0.04229000210762024, -0.019159555435180664, -0.035961393266916275, 0.04911497235298157, -0.0038126769941300154, 0.024433396756649017, -0.0017946572043001652, -0.007904557511210442, -0.0011276713339611888, 0.0032790882978588343, -0.0021715816110372543, -0.03678039088845253, 0.044275447726249695, -0.02252240478992462, -0.03007950820028782, -0.00756330881267786, 0.02752324752509594, -0.028019608929753304, -0.007135197054594755, -0.01870042085647583, -8.759035699767992e-05, -0.046856530010700226, -0.06472554057836533, -0.02893787808716297, 0.018427422270178795, 0.028317425400018692, -0.007426809519529343, 0.03102259524166584, 0.013860896229743958, 0.03583730384707451, -0.0008794905734248459, -0.01975518837571144, 0.022373495623469353, 0.05842175334692001, -0.013476215302944183, -0.002596591366454959, -0.02620788849890232, 0.02023914083838463, 0.0031798160634934902, -0.014257985167205334, 0.02963278442621231, 0.014382075518369675, -0.01500252727419138, 0.05767720937728882, -0.0011610205983743072, 0.045144081115722656, 0.01567261479794979, -0.00997066218405962, 0.007885944098234177, 0.05926556885242462, 0.01621861383318901, 0.02259685844182968, -0.016069704666733742, 0.013898123055696487, 0.032685406506061554, -0.01742229051887989, 0.01297985389828682, -0.00756330881267786, -0.037202298641204834, -0.03233795240521431, 0.022038452327251434, 0.017943469807505608, -0.009337801486253738, -0.0008182209567166865, 0.009573573246598244, 0.0018799692625179887, -0.0544012226164341, -0.0053513976745307446, 0.04564044252038002, -0.022398313507437706, -0.045590806752443314, 0.02643125131726265, -0.013674760237336159, -0.02658016048371792, 0.01255794707685709, -0.03817020356655121, -0.002466296311467886, 0.007197242230176926, 0.020177096128463745, -0.019916506484150887, -0.020474912598729134, 0.00030731759034097195, -0.009952048771083355, 0.04884197562932968, 0.011292224749922752, -0.003069685772061348, 0.011118498630821705, -0.04794852435588837, 0.029583146795630455, -0.005360704381018877, -0.012384220026433468, 0.041942548006772995, 0.026257524266839027, -0.0431586354970932, -0.014977709390223026, -0.008990348316729069, -0.010653159581124783, -0.009809345006942749, 0.040230102837085724, -0.010504251345992088, 0.0015573343262076378, 0.057429030537605286, -0.026530524715781212, 0.027572883293032646, -0.026654614135622978, -0.006868402939289808, -0.022137723863124847, -0.02660497836768627, -0.028168516233563423, 0.007284105289727449, -0.02581080049276352, 0.04951206222176552, -0.05390486121177673, -0.05216759815812111, -0.02496698498725891, 0.011583837680518627, -0.05040551349520683, 0.011503178626298904, -0.010324319824576378, 0.011875449679791927, -0.014630256220698357, -0.031121868640184402, -0.02438376098871231, 0.014133894816040993, -0.0009717828361317515, -0.06388173252344131, 0.02846633456647396, -0.008711145259439945, 0.026331979781389236, -0.011925085447728634, -0.002115741139277816, -0.010764840990304947, -0.004945001564919949, 0.013848486356437206, -0.05405377224087715, -0.02201363444328308, 6.199671770446002e-05, -0.0025578129570931196, -0.029111603274941444, 0.034397855401039124, -0.006483722478151321, -0.038145385682582855, 0.0025795288383960724, -0.01691352017223835, 0.002367024077102542, 0.015412026084959507, -0.009703868068754673, -0.0014704710338264704, 0.03263577073812485, 0.03864174708724022, 0.012533129192888737, -0.01531275361776352, 0.028863422572612762, -0.03521684929728508, 0.010795863345265388, 0.042190730571746826, 0.015188663266599178, 0.025438528507947922, 0.0035644962918013334, -0.009027575142681599, -0.01018782053142786, -0.005438261199742556, 0.032387591898441315, -0.011565223336219788, -0.007333741523325443, -0.022584449499845505, 0.010727613233029842, -0.02321731112897396, 0.029409421607851982, -0.03561393916606903, -0.026406433433294296, 0.01954423449933529, -0.014890845865011215, 0.02252240478992462, 0.044746991246938705, -0.02180268056690693, -0.02150486409664154, -0.03613511845469475, -0.024197624996304512, -0.0244954414665699, -0.016640519723296165, 0.022956721484661102, -0.0001691700890660286, -0.03896437957882881, 0.04323308914899826, 0.03156859427690506, 0.031370047479867935, 0.014853619039058685, -0.01028088852763176, -0.014555801637470722, -0.01836537756025791, 0.019159555435180664, -0.018539102748036385, -0.03278467804193497, 0.020189505070447922, 0.002467847429215908, 0.05787575617432594, -0.003477632999420166, -0.007178628817200661, -0.03181677311658859, 0.013848486356437206, -0.015548525378108025, 0.007606740575283766, -0.015598161146044731, 0.002804442774504423, 0.06815043836832047, -0.012334584258496761, 0.010194025002419949, -0.013736805878579617, 0.03896437957882881, 0.006508540827780962, 0.015374798327684402, -0.013215625658631325, 0.01800551451742649, -0.03980819508433342, -0.007774262689054012, 0.01275649107992649, 0.019221600145101547, -0.024619532749056816, -0.015560934320092201, -0.011075066402554512, 0.030600689351558685, -0.005416545085608959, -0.011583837680518627, 0.023750899359583855, 0.003072788007557392, 0.0010943220695480704, 0.035018306225538254, 0.010367751121520996, 0.00920130219310522, 0.022063270211219788, -0.03675557300448418, -0.04531780630350113, -0.01618138514459133, 0.016317885369062424, 0.014530983753502369, -0.015225890092551708, 0.02125668339431286, -0.036830026656389236, -0.004547912627458572, -0.035489849746227264, -0.0028944083023816347, 0.017037609592080116, 0.00838230550289154, -0.0016736690886318684, 0.016851473599672318, -0.012992262840270996, -0.0024725007824599743, -0.011800995096564293, 0.016714975237846375, 0.014096667990088463, -0.020909229293465614, 0.008667713031172752, 0.010522864758968353, 0.0213931817561388, 0.011794790625572205, 0.0074640363454818726, 0.0186631940305233, -0.01148456521332264, 0.010045116767287254, -0.035489849746227264, 0.012588969431817532, 0.04067682847380638, -0.017149291932582855, -0.010237456299364567, 0.0061641898937523365, 0.018712829798460007, 0.0023902910761535168, -0.011894063092768192, -0.0022243200801312923, 0.005242818500846624, 0.004305936396121979, 0.02729988470673561, -0.023428265005350113, -0.030228417366743088, -0.020115051418542862, 0.01534998044371605, 0.0002497319073881954, -0.0001959270884981379, -0.017509153112769127, -0.026629796251654625, 0.01396016776561737, 0.030749596655368805, 0.00958598218858242, 0.03839356452226639, -0.012806127779185772, 0.0028432209510356188, 0.0005390176083892584, 0.007575717754662037, -0.04752661660313606, 0.024073533713817596, -0.00800382997840643, -0.024818075820803642, -0.03154377639293671, 0.009002757258713245, -0.003421792294830084, 0.03342995047569275, -0.009399846196174622, -0.034646034240722656, -0.0012409038608893752, 0.018898965790867805, -0.009492914192378521, -0.00756330881267786, -0.003704098053276539, 0.00664504012092948, 0.007097969762980938, 0.026480887085199356, -0.005115625914186239, -0.0005397931672632694, -0.005320375319570303, 0.008754576556384563, -0.0002497319073881954, 0.03164304792881012, 0.016243431717157364, 0.0047991955652832985, -0.041322097182273865, -0.0024554384872317314, 0.0081651471555233, 0.0014223860343918204, 0.0003175938327331096, -0.008264419622719288, 0.010895135812461376, -0.00025089524569921196, -0.027101339772343636, 0.02643125131726265, -0.04057755693793297, 0.013017081655561924, -0.01760842464864254, 0.030972959473729134, -0.0014223860343918204, 0.00550340861082077, 0.007457831874489784, 0.01982964389026165, 0.042960092425346375, -0.005869475193321705, 0.002846323186531663, 0.035961393266916275, 0.019780006259679794, 0.01461784727871418, 0.03007950820028782, -0.00266639213077724, 0.009890003129839897, 0.01534998044371605, -0.03951037675142288, -0.011546609923243523, -0.03630884736776352, -0.023713672533631325, 0.021492455154657364, -0.003874722169712186, 0.013004671782255173, 0.010256070643663406, 0.0024600918404757977, -0.011751359328627586, -0.04757625237107277, -0.026108616963028908, 0.009325392544269562, 0.006018383428454399, -0.010082343593239784, -0.0080720791593194, -0.00035307591315358877, -0.008661508560180664, 0.010814476758241653, 0.013649942353367805, 0.020288778468966484, -0.026232706382870674, 0.04859379306435585, -0.0034838374704122543, 0.0050287628546357155, 0.0038126769941300154, -0.002038184553384781, -0.028317425400018692, -0.03511757776141167, 0.013674760237336159, -0.028044426813721657, -0.023018766194581985, -0.030650325119495392, -0.010498046875, -0.002092474140226841, -0.012167061679065228, 0.021343545988202095, 0.015014936216175556, -0.0008127919863909483, -0.0035365759395062923, -0.006986288819462061, -0.012080199085175991, 0.034397855401039124, -0.03630884736776352, -0.011050248518586159, -0.019817234948277473, -0.01702520065009594, -0.01836537756025791, 0.01035534217953682, -0.015871159732341766, 0.020983682945370674, -0.03335549682378769, 0.054550133645534515, 0.01702520065009594, -0.019444962963461876, -0.04129727929830551, 0.011813404969871044, 0.029732055962085724, 0.018874147906899452, -0.04348127171397209, -0.0431586354970932, 0.02165377140045166, 0.015697432681918144, -0.011335656978189945, -0.0021855419036000967, -0.003375258529558778, -0.023266946896910667, 0.023664036765694618, -0.021591726690530777, -0.02398667111992836, -0.0007701359572820365, -0.043803904205560684, 0.008376101031899452, 0.01975518837571144, 0.018750056624412537, 0.00851260032504797, -0.01954423449933529, -0.049660973250865936, 0.046062350273132324, 0.020077824592590332, -0.00664504012092948, 0.010981999337673187, 0.014903254806995392, -0.021591726690530777, 0.026530524715781212, -0.03132041171193123, -0.003100708359852433, 0.000883368426002562, 0.025761162862181664, -0.006061815191060305, -0.01337694376707077, 0.006638835649937391, -0.0015712945023551583, -0.00794798880815506, -0.010833090171217918, -0.0451192632317543, -0.010677977465093136, -0.00574228260666132, 0.0068932208232581615, -0.014543392695486546, -0.029260512441396713, 0.010851703584194183, 0.008115511387586594, -0.026952430605888367, 0.006818766705691814, -0.03236277028918266, -0.04129727929830551, -0.0069986977614462376, 0.01126120239496231, 0.03841838240623474, 0.03740084171295166, -0.013649942353367805, 0.0020211220253258944, 0.0011966966558247805, -0.012440061196684837, -0.020326005294919014, -4.1080704249907285e-05, -0.01815442368388176, -0.016814246773719788, -0.028193335980176926, 0.004979126621037722, -0.01811719685792923, 0.002542301779612899, 0.025835618376731873, -0.03127077594399452, 0.014568210579454899, 0.017658062279224396, 0.02931014820933342, 0.00012777431402355433, 0.01500252727419138, -0.0008058119565248489, 0.004504480864852667, -0.008177556097507477, -0.009281960316002369, 0.0022848141379654408, 0.03998192027211189, 0.00028540787752717733, 0.0030371120665222406, -0.05216759815812111, -0.03757456690073013, -0.010504251345992088, 0.02227422408759594, 0.019345691427588463, 0.017583606764674187, -0.025388892740011215, -0.028242971748113632, 0.004532401449978352, 0.008779394440352917, 0.008655304089188576, 0.03459639847278595, 0.022584449499845505, 0.005807430017739534, -0.004501378629356623, -0.04730325564742088, -0.025066258385777473, -0.03913810849189758, 0.007060742937028408, 0.034199308604002, -0.020388050004839897, 0.04400245100259781, -0.029558328911662102, 0.001083464128896594, 0.0073895822279155254, -0.007135197054594755, 0.006477518007159233, -0.006055610720068216, -0.007712217513471842, -0.019457371905446053, -0.034571580588817596, -0.009592186659574509, -0.008394714444875717, -0.0018287820275872946, 0.00929437018930912, -0.015337571501731873, -0.01234078872948885, 0.022348677739501, 1.4372187251865398e-05, 0.012446265667676926, 0.014741937629878521, 0.0011013020994141698, 0.018985828384757042, -0.041024282574653625, -0.002574875485152006, -0.0009663538658060133, -0.0056119877845048904, 0.007172424346208572, -0.004808502271771431, 0.017360243946313858, 0.021058138459920883, -0.02541371062397957, 0.023750899359583855, 0.007203446701169014, -0.019234009087085724, 0.008742167614400387, 0.003066583536565304, 0.002748602069914341, -0.01135427039116621, 0.018129605799913406, -0.032610952854156494, -0.008965530432760715, -0.005211796145886183, -0.018563920632004738, 0.006458904594182968, -0.003220145357772708, -0.00017973716603592038, 0.020747913047671318, 0.0066946763545274734, -0.013004671782255173, -0.02868969738483429, -0.034025583416223526, 0.006887016352266073, -0.018601149320602417, -0.013116353191435337, -0.008276828564703465, -0.012992262840270996, -0.03236277028918266, -0.04298491030931473, -0.008183760568499565, 0.005943929310888052, -0.029583146795630455, -0.010876522399485111, -0.02133113704621792, 0.02581080049276352, 0.007557104341685772, -0.011664495803415775, 0.022944312542676926, 0.0031084641814231873, -0.00046805341844446957, -0.026480887085199356, -0.010944771580398083, -0.000793015118688345, 0.0030603790655732155, -0.024408578872680664, -0.019482189789414406, -0.04812224954366684, -0.005767100490629673, 0.004197357222437859, -0.009530141018331051, -0.015213481150567532, 0.015449252910912037, 0.007240673992782831, -0.008431941270828247, 0.011348065920174122, 0.01702520065009594, 0.022696131840348244, -0.012129834853112698, 0.03318176791071892, 0.020040597766637802, 0.010380160994827747, 0.0061828033067286015, -0.006607812829315662, 0.013749214820563793, 0.012570356018841267, 0.07083079218864441, 0.017707698047161102, 0.005304863676428795, -0.0010400324827060103, 0.0004951981827616692, -0.0357876680791378, -0.026877976953983307, 0.0161441583186388, 0.007315128110349178, -0.027548065409064293, 0.013054308481514454, 0.023539945483207703, -0.055642127990722656, -0.0039864033460617065, 0.005236614029854536, -0.014332439750432968, 0.01640474796295166, 0.025364074856042862, -0.0042283800430595875, 0.015498888678848743, -0.020934047177433968, -0.03958483412861824, -0.0061828033067286015, 0.003626541467383504, 0.020313596352934837, 0.0080720791593194, -0.0039864033460617065, 0.05559249222278595, 0.001687629264779389, -0.005801225546747446, -0.0322386808693409, -0.002287916373461485, 0.012167061679065228, -0.02690279483795166, -0.015064572915434837, -0.03072477877140045, 0.0020536959636956453, 0.018216468393802643, 0.010932362638413906, 0.009008961729705334, -0.010119570419192314, 0.03819502145051956, -0.000743378943298012, -0.00898414384573698, 0.009399846196174622, -0.00595013378188014, 0.018104786053299904, 0.030972959473729134, -0.00794798880815506, -0.03668111562728882, 0.02658016048371792, 0.013165989890694618, -0.04943760856986046, -0.02697724848985672, 0.014047031290829182, 0.023130446672439575, -0.012073994614183903, 0.013600305654108524, -0.03983301296830177, 0.03613511845469475, 0.02402389794588089, -0.009071007370948792, 0.0010159900411963463, 0.0388651080429554, 0.013314898125827312, -0.01644197665154934, -0.04695580154657364, 0.0025516084861010313, 0.03685484454035759, -0.02161654457449913, -0.005109421443194151, 0.023204902186989784, -0.006095940247178078, 0.03072477877140045, -0.0027346417773514986, 0.008642895147204399, 0.003027805360034108, -0.038691382855176926, 0.02970723807811737, 0.04859379306435585, -0.003378360765054822, -0.004094982519745827, -0.02705170400440693, -0.0373263880610466, -0.012892991304397583, -0.01091995369642973, 0.02092163823544979, 0.015263116918504238, 0.020040597766637802, -0.005813634488731623, -0.000541732064448297, -0.013550669886171818, -0.021939178928732872, 0.049189429730176926, -0.042885635048151016, 0.012446265667676926, -0.014940482564270496, 0.020760321989655495, -0.00059136823983863, -0.0020738604944199324, -0.027945155277848244, 0.035638757050037384, 0.014481347985565662, 0.026034163311123848, 0.0023747796658426523, -0.03568839281797409, -0.013786441646516323, -0.0006072673131711781, 0.017372652888298035, 0.011019226163625717, -0.03648257255554199, 0.003933665342628956, 0.004119800869375467, -0.00987759418785572, -0.007575717754662037, 0.024942167103290558, 0.020251549780368805], "index": 53}, {"title": "Fletcher, Ohio", "text": "Fletcher is a village in Miami County, Ohio, United States. The population was 473 at the 2010 census. It is part of the Dayton Metropolitan Statistical Area.", "vector": [-0.013839196413755417, 0.03106866590678692, -0.011130952276289463, 0.0069328416138887405, -0.0027645283844321966, 0.023427309468388557, 0.00399946141988039, -0.012918790802359581, -0.0694476068019867, -0.005926354322582483, -0.027082446962594986, 0.02484433725476265, -0.03151893615722656, 0.014024602249264717, -0.027572447434067726, 0.0046980432234704494, -0.06748760491609573, 0.00636669248342514, -0.05188705399632454, -0.01826244220137596, -0.02399677038192749, 0.0037809479981660843, 0.00016916182357817888, -0.04216650873422623, 0.02728109620511532, -0.001883852295577526, 0.018169740214943886, -0.009396086446940899, -0.018606767058372498, -0.019560281187295914, 0.007932706736028194, 0.024288121610879898, 0.01258108764886856, -0.01873919926583767, 0.05331732705235481, 0.02638055384159088, -0.013316088356077671, -0.011223654262721539, 0.052469756454229355, 0.02436758019030094, -0.033611368387937546, -0.030989205464720726, -0.0013830919051542878, 0.030803799629211426, 0.022434065118432045, -0.009031896479427814, 0.020434334874153137, -0.012044736184179783, -0.03567731752991676, -0.03414110094308853, -0.02802271768450737, -0.005853516515344381, -0.01997082121670246, 0.0038968264125287533, 0.011746763251721859, -1.9295828678878024e-05, 0.06076003238558769, 0.08968329429626465, -0.06038922071456909, -0.021480552852153778, -0.06219030171632767, -0.005078786518424749, 0.01899082027375698, -0.011336222290992737, 0.026777852326631546, 0.03673677518963814, 0.007840003818273544, 0.013441898860037327, -0.019136495888233185, -0.0016852036351338029, -0.017295684665441513, 0.029082177206873894, -0.017547305673360825, 0.012389061041176319, 0.0031965894158929586, 0.019878119230270386, -0.0071248686872422695, -0.03845839947462082, 0.016209738329052925, -0.05376759544014931, 0.01114419475197792, -0.017851902171969414, -0.028314068913459778, -0.014302710071206093, 0.026645420119166374, -0.04047137126326561, -0.03456488251686096, -0.05196651443839073, -0.04182218387722969, 0.011150816455483437, -0.03218109905719757, 0.05758165195584297, -0.012673790566623211, -0.013309466652572155, 0.010693924501538277, -0.008442572318017483, 0.04632489010691643, 0.0015875346725806594, 0.0036286506801843643, -0.012203655205667019, -0.020977308973670006, -0.012150682508945465, -0.04547732323408127, 0.038988128304481506, 0.015295954421162605, 0.004400069825351238, -0.018302172422409058, 0.01613027974963188, 0.07336760312318802, -0.027254609391093254, 0.007462571375072002, 0.004926489200443029, -0.0011811323929578066, 0.03136001527309418, 0.01783865876495838, -0.020315146073698997, -0.029638394713401794, -0.05090705305337906, 0.051993001252412796, -0.007502301130443811, 8.923674613470212e-05, -0.006237570662051439, 0.025546230375766754, 0.02283136360347271, 0.006237570662051439, -0.03437947854399681, 0.0023440553341060877, 0.013839196413755417, 0.002549325581640005, 0.01624946855008602, -0.03247245028614998, 0.002991319168359041, 0.009674194268882275, 0.02344055287539959, 0.0002632096002344042, 0.018222711980342865, 0.05684002861380577, -0.02868488058447838, 0.006277300417423248, 0.008627977222204208, -0.03792866691946983, 0.043014075607061386, 0.0028224678244441748, 0.026327582076191902, 0.004327232018113136, 0.012018249370157719, -0.012925412505865097, -0.019004063680768013, 0.027055960148572922, -0.01586541347205639, -0.04939732328057289, -0.0029234474059194326, 0.028949744999408722, -0.029956232756376266, -0.030247583985328674, -0.03546542301774025, 0.020791903138160706, 0.02308298461139202, 0.021507037803530693, -0.011402438394725323, 0.010581357404589653, 0.017322171479463577, 0.05779354274272919, -0.01504433248192072, -0.02521514892578125, -0.006406422238796949, -0.027519473806023598, -0.0014037844957783818, -0.010958789847791195, 0.015507846139371395, 0.04407353699207306, -0.05194002762436867, -0.013031357899308205, 0.01960000954568386, -0.02887028641998768, 0.0015420109266415238, 0.06250814348459244, -0.022261904552578926, 0.03469731658697128, 0.005625070538371801, -0.0003838473348878324, 0.0074758147820830345, 0.03430001810193062, -0.029585421085357666, -0.011031627655029297, 0.014726494438946247, -0.0035591234918683767, -0.011720276437699795, 0.046245429664850235, -0.03607461228966713, 0.017626766115427017, 0.0061845979653298855, 0.027545960620045662, 0.014660278335213661, 0.0067639900371432304, -0.01513703539967537, -0.0443384014070034, -0.011720276437699795, 0.03493569418787956, 0.07983031123876572, -0.02081838995218277, 0.0065421657636761665, -0.029082177206873894, 0.02533433772623539, 0.008588247932493687, -0.013574331067502499, 0.00415175873786211, -0.02063298411667347, 0.02093757875263691, 0.05880003049969673, 0.03308163955807686, -0.06436219811439514, 0.0030922989826649427, 0.05315840616822243, 0.0333465039730072, 0.02533433772623539, 0.01047541107982397, -0.011322978883981705, 0.004866894334554672, 0.05019192025065422, -0.016752712428569794, -0.016196494922041893, -0.0807308554649353, -0.0022198997903615236, 0.0050920299254357815, 0.00651898980140686, 0.02736055478453636, -0.014752981252968311, -0.0016703049186617136, 0.03864380344748497, -0.016103792935609818, 0.010177438147366047, -0.018725955858826637, 0.01093230303376913, -0.036101099103689194, 0.029294069856405258, 0.02900271862745285, 0.0030906435567885637, -0.012918790802359581, 0.036789748817682266, -0.0032810152042657137, -0.0008649497758597136, 0.004688110668212175, -0.024764878675341606, 0.014766223728656769, 0.025122445076704025, -0.03406164050102234, 0.016408387571573257, -0.048867594450712204, -0.02357298508286476, 0.03747839853167534, -0.013878926634788513, 0.04854975640773773, -0.0018722645472735167, 0.03027407079935074, 0.02095082215964794, -0.023467039689421654, 0.00263375137001276, -0.00048296479508280754, -0.0405508317053318, 0.0038935155607759953, -0.04592759162187576, 0.03957083076238632, 0.016871901229023933, 0.003065812401473522, -0.01598460227251053, -0.01303797960281372, -0.011918925680220127, -0.006273990031331778, -0.05848219245672226, 0.012885682284832, -0.013157169334590435, 0.017481090500950813, -0.004714597016572952, 0.039464887231588364, -0.022500282153487206, 0.024248391389846802, -0.02704271674156189, 0.03631299361586571, -0.05472110956907272, 0.018156496807932854, 0.023030012845993042, -0.01562703587114811, -0.01434244029223919, -0.018328659236431122, -0.017414873465895653, 0.018116766586899757, -0.021295147016644478, 0.02325514703989029, 0.01628919690847397, -0.03644542396068573, -0.02783731184899807, 0.026645420119166374, -0.023308120667934418, -0.0005255914875306189, -0.006088584195822477, 0.02411595918238163, 0.01691163145005703, 0.008806761354207993, -0.01569325104355812, -0.024592716246843338, -0.02137460559606552, -0.024089472368359566, -0.03779623657464981, -0.010753518901765347, -0.042828671634197235, -0.010965411551296711, -0.050271376967430115, -0.02759893424808979, -0.027731366455554962, -0.019758928567171097, 0.021904336288571358, -0.03257839381694794, -0.0017431428423151374, 0.038855697959661484, -0.03101569227874279, 0.05514489486813545, 0.0021106430795043707, 0.048814620822668076, -0.05774057283997536, -0.01831541582942009, 0.024764878675341606, -0.011561357416212559, -0.032022178173065186, 0.04349083453416824, -0.015110548585653305, 0.015613792464137077, 0.023056497797369957, -0.0417427234351635, -0.01468676421791315, -0.01997082121670246, 0.022354606539011, 0.02058001048862934, -0.03284326195716858, 0.04645732045173645, 0.019705956801772118, -0.02448676899075508, 0.02362595871090889, 0.026089202612638474, 0.023970283567905426, -0.007641355507075787, 0.02167920023202896, 0.018288929015398026, 0.038008127361536026, 0.022632714360952377, -0.007138112094253302, 0.05832327529788017, -0.010859465226531029, 0.03008866496384144, -0.014262980781495571, 0.0004966218839399517, 0.033611368387937546, 0.012124195694923401, -0.006717638578265905, 0.020169470459222794, -0.012534736655652523, -0.02863190695643425, 0.016752712428569794, 0.04187515750527382, -0.02453974261879921, -0.013653790578246117, 0.0019550349097698927, 0.029294069856405258, 0.01770622469484806, 0.008680950850248337, 0.022924065589904785, 0.013296223245561123, -0.022818120196461678, 0.02924109622836113, 0.004366961773484945, -0.0020742241758853197, 0.014554332010447979, -0.012746628373861313, -0.004694732371717691, -0.03816704824566841, 0.00441331323236227, -0.02638055384159088, -0.0293735284358263, 0.014752981252968311, -0.006313719786703587, 0.044417861849069595, 0.030115151777863503, 0.046987053006887436, -0.06457408517599106, -0.03247245028614998, 0.03864380344748497, -0.00888622086495161, -0.02455298602581024, -0.06536868214607239, 0.0021354740019887686, -0.014210007153451443, 0.00879351794719696, 0.04168975353240967, 0.02881731279194355, -0.006704395636916161, -0.021891092881560326, -0.06838814169168472, 0.00572439469397068, -0.01508406177163124, -0.0027032785583287477, 0.0061481790617108345, -0.010859465226531029, -0.03284326195716858, -0.021771904081106186, 0.038431912660598755, 0.011680547147989273, -0.024208661168813705, -0.03456488251686096, -0.01697784662246704, 0.03920001909136772, -0.0504302978515625, -0.008190950378775597, 0.015574062243103981, 0.009614599868655205, 0.015799198299646378, -0.02265920117497444, 0.004916556645184755, -0.002562568988651037, -0.08888869732618332, -0.019560281187295914, -0.010740276426076889, -0.026711635291576385, -0.02692352794110775, 0.026751365512609482, 0.021771904081106186, 0.044603265821933746, -0.02136136218905449, 0.04388813301920891, -0.0356508307158947, -0.009475545957684517, -0.012839331291615963, 0.015958117321133614, -0.02722812257707119, 0.02374514751136303, 0.02497676946222782, 0.041981104761362076, -0.016103792935609818, -0.00448946189135313, -0.006588517222553492, 0.022619470953941345, -0.00018499165889807045, -0.04815245792269707, -0.03591569513082504, -0.014951629564166069, -0.009541762061417103, -0.0070851389318704605, -0.025042986497282982, -0.016898388043045998, 0.0383259654045105, -0.0033521978184580803, -0.0024946972262114286, 0.03286974877119064, -0.062243275344371796, 0.04277569800615311, -0.02185136266052723, 0.0187524426728487, 0.06076003238558769, 0.009084870107471943, -0.006684530526399612, -0.03729299455881119, 0.008760410360991955, -0.03308163955807686, 0.015216494910418987, -0.020301902666687965, -0.012885682284832, -0.03157190978527069, 0.03994164243340492, -0.017679739743471146, -0.027440015226602554, -0.014766223728656769, -0.05379408225417137, 0.013011493720114231, -0.05604543536901474, 0.026486501097679138, 0.024314606562256813, 0.019573524594306946, 0.023493526503443718, 0.007919463329017162, 0.03226055949926376, 0.014951629564166069, 0.017255954444408417, -0.020897848531603813, 0.1069524884223938, -0.007654598448425531, 0.02002379484474659, -0.01428946666419506, -0.03636596351861954, 0.03027407079935074, 0.021202443167567253, -0.019255686551332474, 0.02826109528541565, -0.03533299267292023, -0.0075552742928266525, 0.021957308053970337, -0.018169740214943886, 0.04926488921046257, -0.03045947477221489, -0.0015055920230224729, 0.03292271867394447, -0.022579742595553398, 0.015547575429081917, 0.017136765643954277, 0.03856434300541878, -0.027002986520528793, -0.014143791049718857, 0.05037732422351837, -0.04494759067893028, -0.02337433584034443, -0.022261904552578926, -0.06266705691814423, 0.004989394452422857, 0.00014070954057388008, -0.006161422003060579, -0.008224057964980602, 0.028605420142412186, -0.021149471402168274, 0.04717245697975159, -0.013825953006744385, 0.0059594628401100636, 0.0017100346740335226, -0.006164732854813337, 0.01862001046538353, 0.04462975263595581, 0.0070454091764986515, 0.004876826889812946, -0.0017630077200010419, 0.0067010847851634026, 0.0051152054220438, -0.015852170065045357, -0.011104465462267399, -0.015560818836092949, -0.010707167908549309, 0.03655137121677399, 0.034882720559835434, 0.032631367444992065, 0.03864380344748497, -0.013508114963769913, 0.0027661838103085756, 0.015905143693089485, 0.0054959487169981, 0.0026618933770805597, -0.06881193071603775, -0.0010139363585039973, 0.004611962009221315, -0.0004771708627231419, 0.0016222981503233314, 0.013309466652572155, -0.06128976121544838, 0.04410002380609512, -0.010660816915333271, 0.07077193260192871, 0.024460284039378166, -0.05477408319711685, -0.021904336288571358, -0.0037147316616028547, 0.004751015920192003, -0.03228704258799553, 0.009290140122175217, -0.022195687517523766, 0.0010139363585039973, -0.016395144164562225, -0.011256762780249119, -0.002051048446446657, -0.013441898860037327, -0.008707436732947826, 0.021586498245596886, -0.03644542396068573, -0.013759736903011799, -0.0013028047978878021, 0.03591569513082504, 0.04492110386490822, -0.050085972994565964, 0.01757379248738289, -0.014157034456729889, 0.022871093824505806, 0.006406422238796949, -0.002003041561692953, -0.016011089086532593, -0.016951359808444977, 0.004515948239713907, -0.013508114963769913, 0.02863190695643425, -0.0012779736425727606, 0.00925040990114212, 0.0069328416138887405, 0.04653678089380264, -0.03255191072821617, 0.014183521270751953, -0.003956420812755823, 0.010488654486835003, -0.02130839042365551, 0.0013268081238493323, -0.025811094790697098, 0.00619784090667963, -0.008111490868031979, 0.018792172893881798, -0.035571370273828506, 0.07050706446170807, -0.006244192365556955, -0.0072374362498521805, 0.002635406795889139, 0.035200558602809906, -0.022182444110512733, 0.004628515802323818, 0.0500594861805439, -0.001296183094382286, -0.011197168380022049, 0.01403784565627575, -0.013031357899308205, 0.03252542391419411, 0.012554600834846497, -0.026844067499041557, 0.06711678951978683, 0.021811632439494133, 0.021838119253516197, 0.0022645958233624697, -0.0333465039730072, 0.04749029502272606, 0.026301095262169838, -0.026910284534096718, 0.012753250077366829, -0.03088326007127762, -0.017732711508870125, 0.06653408706188202, 0.004217975307255983, 0.04934434965252876, 0.044179484248161316, -0.0070917606353759766, -0.022818120196461678, -0.010587978176772594, -0.0059495302848517895, 0.04939732328057289, -0.018024062737822533, -0.008310139179229736, -0.014541088603436947, -0.02044757828116417, 0.03694866970181465, 0.00016129865252878517, 0.00842932891100645, -0.019931090995669365, 0.030432989820837975, 0.00036874174838885665, 0.0024119268637150526, -0.01753406412899494, -0.002272872719913721, 0.0014675176935270429, 0.010462167672812939, 0.0005342823569662869, 0.025599202141165733, 0.058588139712810516, -0.006866625044494867, -0.04195461794734001, 0.02289757877588272, 0.01654081977903843, 0.01880541630089283, -0.020235685631632805, -0.028367042541503906, -0.018765686079859734, -0.004456353839486837, -0.017732711508870125, -0.03199569135904312, -0.018527306616306305, 0.025930283591151237, -0.0016032609855756164, -0.022871093824505806, -0.0047377729788422585, -0.037319477647542953, 0.00036067163455300033, 0.033002179116010666, 0.0019169604638591409, -0.026605689898133278, 0.02863190695643425, -0.0027214880101382732, -0.02924109622836113, 0.00983311329036951, 0.013210142031311989, 2.8141907023382373e-05, -0.012985006906092167, -0.02966487966477871, 0.031095150858163834, 0.03271082788705826, 0.004178245551884174, -0.019984064623713493, -0.021321633830666542, 0.03133352845907211, -0.01777244172990322, 0.0073632472194731236, 0.015507846139371395, 0.012673790566623211, 0.011111087165772915, -0.03567731752991676, -0.0027827380690723658, 0.038617316633462906, -0.049238406121730804, -0.07008328288793564, 0.051675163209438324, 0.018037306144833565, -0.028843799605965614, -0.0020278727170079947, 0.013150547631084919, 0.00596939492970705, 0.034458938986063004, -0.0018242577789351344, 0.0049761515110731125, -0.0061084493063390255, -0.014726494438946247, 0.0057939221151173115, -0.007945950143039227, -0.03596866875886917, -0.040497858077287674, -0.003645204706117511, 0.03811407461762428, 0.000960963370744139, -0.04518596827983856, -0.002130507957190275, -0.017692983150482178, 0.010733654722571373, 0.01508406177163124, -0.02088460512459278, -0.015494602732360363, 0.013276358135044575, 0.011779870837926865, 0.0022596295457333326, -0.024089472368359566, -0.017692983150482178, 0.011428925208747387, -0.037637315690517426, -0.009482166729867458, -0.005850205663591623, 0.02430136501789093, 0.0217983890324831, -0.015269467607140541, -0.04372921213507652, -0.021891092881560326, -0.036418937146663666, -0.0005860138335265219, 0.0017944604624062777, -0.0039001372642815113, 0.028287582099437714, 0.013653790578246117, 0.010799870826303959, -0.022619470953941345, 0.023215416818857193, -0.004986083600670099, -0.015269467607140541, 0.005085408221930265, -0.03377028927206993, -0.01818298175930977, 0.013614061288535595, 0.035995155572891235, -0.023414066061377525, -0.012912169098854065, -0.06113084405660629, -0.04725191742181778, -0.013031357899308205, 0.012329465709626675, 0.001921926741488278, 0.018037306144833565, 0.047092996537685394, 0.04155731946229935, 0.013018115423619747, 0.003966353368014097, 0.03776974976062775, 0.004072299227118492, 0.007462571375072002, -0.04457677900791168, -0.01606406271457672, -0.006015746388584375, -0.008753788657486439, -0.0023506770376116037, -0.018540550023317337, -0.01826244220137596, 0.02624812163412571, -0.017414873465895653, 0.03241947665810585, 0.00014888310397509485, 0.004257705062627792, -0.006624936126172543, -0.00949541013687849, -0.019864875823259354, -0.037266507744789124, -0.005029124207794666, -0.01746784709393978, -0.004568921402096748, -0.036604344844818115, 0.0045027052983641624, 0.011859330348670483, 0.022023525089025497, -0.0280756913125515, 0.05201948806643486, -0.014368926174938679, 0.009932437911629677, -0.04494759067893028, -0.03718704730272293, 0.04076272249221802, -0.028525961562991142, 0.0010503552621230483, 0.0022232106421142817, 0.03896164149045944, -0.0065785846672952175, 0.04854975640773773, -0.0037081099580973387, 0.00934311281889677, 0.031174611300230026, -0.004830475430935621, -0.04280218482017517, -0.005135070066899061, -0.006283922120928764, -0.006085273344069719, 0.056310299783945084, 0.013720007613301277, -0.01770622469484806, 0.04976813495159149, 0.007654598448425531, -0.022301632910966873, -0.010018519125878811, 0.01594487391412258, -0.01636865735054016, 0.008382976986467838, -0.018937848508358, 0.006681219674646854, 0.015110548585653305, 0.051251377910375595, -0.012044736184179783, -0.029161637648940086, -0.015852170065045357, -0.014210007153451443, -0.056257326155900955, -0.04621894285082817, -0.04529191553592682, 0.019017307087779045, 0.0037345965392887592, -0.027916772291064262, -0.06118381768465042, 0.0022679066751152277, -0.00684013869613409, -0.03882921114563942, 0.004469596780836582, -0.019864875823259354, 0.024036498740315437, 0.03294920548796654, 0.024645688012242317, 0.004188178107142448, 0.02857893332839012, -0.006800408940762281, 0.010025140829384327, 0.033664342015981674, -0.030327042564749718, -0.003146927338093519, -0.027572447434067726, 0.03472380340099335, 0.02631433866918087, 0.051251377910375595, -0.014130547642707825, 0.003883583238348365, -0.021096497774124146, 0.0006787165766581893, 0.004529191646724939, -0.03986218199133873, 0.025056229904294014, -0.02589055337011814, 0.015295954421162605, 0.001083463430404663, 0.024645688012242317, 0.01434244029223919, -0.025374067947268486, 0.017692983150482178, 0.012130817398428917, -0.011435546912252903, -0.018792172893881798, -0.0008930916665121913, -0.04632489010691643, -0.012190411798655987, 0.0052045974880456924, -0.021705687046051025, 0.015031089074909687, -0.004112028982490301, 0.035015154629945755, 0.008965680375695229, 0.030327042564749718, -0.013547845184803009, -0.025983257219195366, -0.0057111517526209354, -0.016699738800525665, 0.036233533173799515, 0.0010735309915617108, 0.02076541632413864, -0.019454333931207657, -0.017865143716335297, -0.03893515467643738, -0.014792710542678833, 0.035995155572891235, -0.0068467603996396065, 0.028181636705994606, 0.03194272145628929, 0.048125971108675, 0.006128313951194286, 0.025506500154733658, 0.00432061031460762, 0.008224057964980602, 0.014647034928202629, -0.013667033985257149, 0.014223250560462475, -0.02557271532714367, 0.045212455093860626, 0.05673408508300781, 0.008747166953980923, 0.007945950143039227, -0.043305426836013794, 0.043305426836013794, 0.019944334402680397, -0.000431233347626403, 0.050695162266492844, -0.02125541679561138, -0.03355839475989342, 0.027625419199466705, 0.0035061505623161793, -0.0056416247971355915, -0.013289601542055607, -0.03236650303006172, 0.0028489541728049517, 0.010064870119094849, -0.01818298175930977, -0.014170277863740921, 0.0065421657636761665, 0.001080152578651905, 0.01586541347205639, 0.001532906200736761, 0.0026883797254413366, -0.0016239535761997104, -0.002006352413445711, -0.015560818836092949, -0.005552232731133699, 0.007018922828137875, 0.01880541630089283, -0.018421361222863197, 0.008038653060793877, -0.03814056143164635, -0.02460595965385437, -0.0064196656458079815, 0.009396086446940899, 0.0005102789727970958, 0.018394874408841133, -0.029029205441474915, -0.039041101932525635, 0.0074758147820830345, 0.0070785172283649445, -0.03882921114563942, 0.0181962251663208, 0.009515275247395039, -0.0455302931368351, -0.020368119701743126, -0.0340881273150444, 0.0038935155607759953, 0.020606497302651405, -0.014488115906715393, -0.02643352746963501, 0.013461763970553875, 0.04298758879303932, -0.0033654409926384687, 0.015375413931906223, 0.013746493496000767, 0.0036750019062310457, 0.0032528734300285578, -0.03766380250453949, 0.007210949901491404, -0.018540550023317337, -0.05519786849617958, -0.00882662646472454, -0.014461629092693329, -0.06727571040391922, -0.04354380816221237, 0.058270301669836044, 0.011415681801736355, -0.036604344844818115, 0.0011488519376143813, 0.03808758780360222, 0.0005839445511810482, 0.009303383529186249, 0.030856773257255554, -0.013388926163315773, 0.010256897658109665, -0.0047013540752232075, 0.05331732705235481, 0.01995757780969143, 0.02156001143157482, -0.01513703539967537, -0.011700411327183247, 0.0068931118585169315, 0.012958520092070103, -0.0053270976059138775, 0.0006327790324576199, -0.0050920299254357815, -0.016156764701008797, 0.0071645984426140785, -0.01007811352610588, -0.0401800200343132, -0.03424704447388649, 0.03212812542915344, 0.008687572553753853, -0.016818927600979805, 0.02839352935552597, -0.07029516994953156, -0.04579515755176544, 0.0027645283844321966, 0.02117595635354519, -0.007773787714540958, -0.015031089074909687, 0.00278604868799448, 0.027572447434067726, 0.0017398319905623794, 0.0007387250661849976, -0.00020040762319695204, 0.008389598689973354, -0.0037511505652219057, 0.012859196402132511, -0.016156764701008797, -0.013084331527352333, 0.009720545262098312, 0.012865817174315453, 0.012706899084150791, 0.024407310411334038, -0.023705417290329933, 0.006873246748000383, -0.02044757828116417, -0.0002859714441001415, -0.02075217291712761, 0.0029764205683022738, 0.013501493260264397, 0.0004411657864693552, -0.019268929958343506, 0.0007234125514514744, 0.023003526031970978, 0.006280611269176006, -0.0055588544346392155, 0.030432989820837975, 0.02655271627008915, 0.007230814546346664, 0.015958117321133614, -0.01850081980228424, -0.0022215552162379026, 0.005744259804487228, -0.013667033985257149, -0.013137304224073887, -0.011051492765545845, -0.03437947854399681, 0.008157841861248016, 0.006826895289123058, 0.007892977446317673, -0.002395372837781906, 0.002560913562774658, 0.03332001715898514, -0.03509461134672165, 0.014845683239400387, -0.03859082981944084, -0.01983838900923729, 0.011137573048472404, 0.030194610357284546, 0.015825683251023293, 0.0068533821031451225, -0.0027314203325659037, 0.00870081502944231, -0.03755785897374153, -0.007257301360368729, 0.0046980432234704494, -0.0062607466243207455, -0.014315953478217125, 0.04057731851935387, 0.025480013340711594, -0.03339947760105133, -0.022791633382439613, -0.002784393262118101, -0.0070387874729931355, 0.016222981736063957, -0.0068931118585169315, -0.0013433621497824788, -0.021321633830666542, -0.014607304707169533, 0.004370272625237703, -0.02465893141925335, -0.011925546452403069, 0.01924244314432144, 0.0011654060799628496, -0.011005140841007233, 0.00487020518630743, 0.02069919928908348, -0.02325514703989029, 0.024208661168813705, 0.014832439832389355, 0.013998115435242653, -0.0021536836866289377, -0.009382843039929867, -0.0035525017883628607, 0.06197841092944145, -0.06383246928453445, -0.011773249134421349, -0.0060720304027199745, 0.03316110000014305, 0.003105542156845331, -0.02313595823943615, 0.019891362637281418, -0.018898118287324905, -0.0016115379985421896, 0.015838926658034325, 0.016514332965016365, 0.0045821648091077805, 0.017666496336460114, -0.01389216911047697, -0.03302866593003273, -0.042087048292160034, 0.02472514845430851, 0.0200900100171566, -0.038061100989580154, -0.008343247696757317, 0.028367042541503906, -0.03249893710017204, -0.021573254838585854, -0.005545611027628183, -0.002597332466393709, -0.0009692403837107122, -0.025241635739803314, -0.033982180058956146, -0.04566272720694542, -0.027492986992001534, -0.0057111517526209354, 0.010263519361615181, -0.005025813356041908, 0.06086597964167595, 0.037266507744789124, 0.009753653779625893, -0.053582191467285156, -0.012144060805439949, 0.029585421085357666, 0.024089472368359566, -0.0037180425133556128, 0.0008955748053267598, 0.0322340726852417, -0.04815245792269707, 0.013733250088989735, -0.026592446491122246, 0.0032015556935220957, 0.013402169570326805, -0.0012730074813589454, 0.022129470482468605, 0.044788673520088196, -0.0024897309485822916, -0.023718660697340965, 0.011998385190963745, 0.017600279301404953, 0.038246504962444305, 0.0371340736746788, -0.011309735476970673, -0.017971090972423553, -0.032631367444992065, 0.006512368097901344, -0.003021116368472576, -0.009998654015362263, 0.007343382108956575, -0.043994076550006866, -0.04073623940348625, -0.0075950040481984615, -0.0046218945644795895, 0.01114419475197792, 0.03649839758872986, -0.006793787237256765, -0.027307581156492233, 0.018024062737822533, 0.0003168033726979047, 0.002789359539747238, 0.022434065118432045, 0.020778659731149673, -0.017110278829932213, 0.019335145130753517, -0.0065752738155424595, 0.004784123972058296, 0.015958117321133614, 0.004323921166360378, 0.015653522685170174, -0.011130952276289463, 0.015163521282374859, -0.031174611300230026, -0.0013657101662829518, -0.02697650156915188, 0.0006629902054555714, 0.021838119253516197, -0.011587844230234623, 0.0015395277878269553, 0.033664342015981674, -0.016832171007990837, -0.054058946669101715, 0.036180559545755386, -0.009237167425453663, 0.028923258185386658, -0.006525611504912376, -0.007535409182310104, 0.013759736903011799, -0.026658663526177406, -0.020301902666687965, -0.026897041127085686, 0.006866625044494867, -0.03535947948694229, -0.05996543541550636, 0.003532636910676956, 0.015772711485624313, 0.025016499683260918, 0.0068864901550114155, -0.0011703722411766648, -0.006760679185390472, -0.033902719616889954, -0.019573524594306946, -0.006800408940762281, -0.004363650921732187, 0.022725418210029602, -0.007919463329017162, -0.0060687195509672165, -0.015706494450569153, -0.013117439113557339, 0.01239568181335926, 0.060707058757543564, 0.027307581156492233, 0.023771634325385094, 0.018725955858826637, -0.0018606766825541854, 0.009859600104391575, -0.012561222538352013, -0.009720545262098312, -0.03215461224317551, -0.01154149230569601, -0.00699243601411581, -0.024288121610879898, -0.01978541538119316, 0.011111087165772915, -0.021758660674095154, 0.029505962505936623, 0.030936231836676598, -0.0013284635497257113, 0.022566499188542366, 0.01831541582942009, 0.03999461606144905, 0.04410002380609512, -0.010429059155285358, 0.030936231836676598, -0.0008682605694048107, 0.008316760882735252, 0.03350542485713959, 0.01593163050711155, 0.009548383764922619, -0.01844784803688526, -0.025188662111759186, 0.02607595920562744, -0.0031634813640266657, 0.017017576843500137, 0.004585475195199251, 0.023175688460469246, 0.012038114480674267, 0.043305426836013794, 0.010111221112310886, 0.04420597106218338, -0.009720545262098312, 0.012746628373861313, -0.0051714894361793995, 0.028367042541503906, 0.03279028832912445, -0.0027396974619477987, 0.014143791049718857, 0.01916298270225525, -0.029876772314310074, 0.00769432820379734, 0.024526499211788177, 0.007177841849625111, 0.0027678392361849546, 0.041848670691251755, -0.021599741652607918, -0.00894581526517868, 0.009766897186636925, 0.022751903161406517, 0.026605689898133278, -0.017732711508870125, 0.015918387100100517, 0.020169470459222794, -0.005896557122468948, -0.004006083123385906, 0.01715000905096531, 0.031704340130090714, 0.03663083165884018, -0.006677908822894096, -0.00873392354696989, -0.014196764677762985, 0.020791903138160706, 0.0240629855543375, 0.0001375021820422262, 0.015454873442649841, 0.014673521742224693, 0.002244730945676565, 0.0021917580161243677, -0.008382976986467838, 0.0383259654045105, 0.016222981736063957, -0.019268929958343506, 0.005373448599129915, 0.005929665174335241, -0.02026217244565487, 0.01758703589439392, -0.024288121610879898, 0.01605081930756569, 0.015097305178642273, -0.029347043484449387, 0.009660950861871243, -0.012726763263344765, 0.03933245316147804, -0.024579472839832306, -0.010952168144285679, 0.0017580414423719049, -0.009581491351127625, -0.022937308996915817, 0.012667168863117695, 0.0012117574224248528, -0.007932706736028194, -0.004479529336094856, -0.0031287178862839937, 0.0061117601580917835, -6.414699601009488e-05, -0.029876772314310074, -0.0033108126372098923, -0.023533254861831665, -0.012700277380645275, 0.010256897658109665, 0.014885413460433483, -0.0085220318287611, 0.026168663054704666, -0.00907162670046091, -0.014249737374484539, -0.02876433916389942, 0.001275490503758192, -0.002163616009056568, 0.02271217480301857, -0.004648380912840366, 0.0058667599223554134, 0.019917847588658333, -0.004145137500017881, -0.01880541630089283, -0.009078248403966427, -9.384084114572033e-05, -0.03374380245804787, -0.004459664691239595, -0.007985680364072323, 0.006760679185390472, -0.045768674463033676, 0.012144060805439949, 0.010508518666028976, -0.030538935214281082, -0.006356759928166866, -0.024804607033729553, 0.05268165096640587, -0.018103523179888725, 0.0007896287715993822, -0.015613792464137077, -0.02118919976055622, -0.00827703159302473, 0.030141636729240417, 0.0024864203296601772, -0.012018249370157719, -0.02612893283367157, 0.005568786524236202, -0.013825953006744385, 0.009442437440156937, -0.008508788421750069, -0.014157034456729889, 0.011223654262721539, 0.042219482362270355, -0.03167785331606865, 0.007760544773191214, -0.016077306121587753, -0.0022695621009916067, -0.0076612201519310474, 0.0007573483744636178, 0.002550981007516384, -0.019984064623713493, -0.010945546440780163, -0.02386433631181717, 0.0045490562915802, 0.014474872499704361, 0.004247772507369518, 0.0072043281979858875, 0.033055152744054794, 0.0034266910515725613, 0.02167920023202896, 0.016620278358459473, 0.02015622705221176, -0.03271082788705826, -0.02521514892578125, -0.005135070066899061, -0.007760544773191214, 0.027625419199466705, -0.02998271770775318, -0.002749629784375429, 0.009402708150446415, -0.01504433248192072, 0.0037047993391752243, -0.02857893332839012, -0.015415143221616745, -0.015653522685170174, -0.07696977257728577, -0.03162488341331482, -0.027757853269577026, 0.010852843523025513, -0.008859734050929546, 0.012892303988337517, -0.004482840187847614, 0.027122177183628082, -0.017613522708415985, -0.013302844949066639, 0.007230814546346664, 0.008157841861248016, -0.013382304459810257, 0.014541088603436947, -0.014713251031935215, 0.014872170053422451, -0.020050281658768654, 0.008859734050929546, 0.01148189790546894, -0.01740163005888462, 0.038802724331617355, 0.007502301130443811, 0.03774326294660568, -0.048125971108675, 0.029691366478800774, 0.004595407750457525, -0.012137439101934433, -0.010011897422373295, 0.0293735284358263, 0.021043524146080017, 0.020315146073698997, -0.030300555750727654, 0.03130704537034035, 0.006522300653159618, -0.0014584129676222801, 0.0004552367317955941, -0.055091921240091324, -0.010190680623054504, 0.03591569513082504, -0.023096228018403053, 0.0046583134680986404, 0.0014410311123356223, -0.006717638578265905, 0.0033902721479535103, 0.004979461897164583, 0.012064601294696331, -0.04598056524991989, -0.02887028641998768, 0.020169470459222794, -0.013799467124044895, -0.02868488058447838, 0.008462436497211456, -0.0008972302312031388, 0.029876772314310074, -0.03430001810193062, 0.029347043484449387, 0.04592759162187576, 0.0217983890324831, 0.010031762532889843, -0.03790218383073807, -0.019441090524196625, -0.009521896950900555, -0.008296896703541279, 0.054058946669101715, -0.01434244029223919, 0.027757853269577026, -0.008528653532266617, 0.05477408319711685, -0.024764878675341606, 0.05779354274272919, 0.009217302314937115, -0.01868622563779354, -0.0029664880130439997, 0.03212812542915344, -0.021043524146080017, -0.031836774200201035, -0.010508518666028976, -0.003648515557870269, -0.006002502981573343, -0.007250679656863213, -0.007177841849625111, 0.0007490713614970446, 0.0019964200910180807, 0.0390675887465477, 0.06897084414958954, 0.04036542773246765, 0.008051896467804909, 0.0018557104049250484, -0.01948082074522972, 0.06197841092944145, 0.017918117344379425, 0.014872170053422451, 0.008833248168230057, -0.033002179116010666, 0.04635137692093849, 0.02355974167585373, 0.021215686574578285, 0.02844650112092495, 0.011064735241234303, 0.011521628126502037, -0.018831901252269745, -0.01684541441500187, 0.007833382114768028, 0.005307232495397329, -0.015375413931906223, 0.0470135398209095, -0.01782541535794735, 0.01775919832289219, 0.047702185809612274, 0.03260488063097, -0.018593523651361465, -0.028552448377013206, 0.010515140369534492, 0.01574622467160225, 0.017732711508870125, 0.020129740238189697, 0.01129649206995964, 0.017176495864987373, 0.013256493955850601, -0.025930283591151237, -0.030856773257255554, 0.006720949430018663, 0.011832844465970993, -0.03734596446156502, -0.00456561055034399, 0.011018384248018265, -0.0314924493432045, -0.029823798686265945, -0.003065812401473522, 0.006939463317394257, 0.01348825078457594, 0.016765953972935677, -0.002079190220683813, 0.022434065118432045], "index": 54}, {"title": "David E. Davis", "text": "David Evan Davis, Jr.", "vector": [0.04507243260741234, -0.020444175228476524, -0.03391487896442413, -0.018947429955005646, -0.008971964940428734, 0.07619792222976685, 0.00044195432565174997, 0.009091024287045002, -0.029917890205979347, 0.06718343496322632, 0.006930949632078409, 0.004634806886315346, 0.016055990010499954, 0.013139039278030396, 0.017110515385866165, 0.02246818132698536, -0.06044808402657509, 0.049562666565179825, -0.007526245899498463, -0.003237986471503973, 0.014142538420855999, -0.04044612869620323, -0.031414635479450226, 0.03619401156902313, 0.00019812204118352383, 0.037656739354133606, 0.00628888001665473, -0.005221598781645298, 0.04901839420199394, 0.005965718999505043, -0.0052003380842506886, 0.04908642917871475, 0.05949560925364494, 0.020716309547424316, -0.011727336794137955, 0.02840413711965084, -0.02039314992725849, 0.009184570983052254, 0.03507145494222641, 0.014380657114088535, 0.02367578260600567, -0.0467732772231102, -0.056570153683423996, -0.0034505922812968493, 0.006845907308161259, 0.019525717943906784, -0.043609704822301865, 0.013666301034390926, -0.004826151765882969, 0.06555062532424927, -0.012007975950837135, -0.008784872479736805, -0.028608238324522972, 0.01699995994567871, 0.02068229392170906, 0.028183026239275932, -0.025053469464182854, 0.08660710602998734, -0.017535727471113205, -0.016557740047574043, 0.06595882773399353, -0.047657717019319534, 0.032486166805028915, 0.014091513119637966, 0.004383931867778301, 0.039017416536808014, -0.0021154277492314577, 0.024356121197342873, -0.01307100523263216, 0.010426188819110394, 0.026737306267023087, 0.0065567633137106895, -0.009813884273171425, 0.1040237694978714, 0.02154972404241562, -0.009252605028450489, -0.013589763082563877, 0.050685226917266846, 0.005234355106949806, -0.0009423752781003714, 0.016838381066918373, -0.052250005304813385, -0.002574656391516328, 0.01423608511686325, 0.005795634351670742, -0.030649254098534584, 0.017467692494392395, -0.07708236575126648, 0.018301108852028847, 0.008329895325005054, 0.022842368111014366, 0.007709086872637272, 0.045310549437999725, -0.04398389160633087, 0.03677229955792427, -0.0012947693467140198, 0.015214071609079838, -0.005731852725148201, -0.0007042567594908178, -0.08497428894042969, 0.010017985478043556, 0.022706300020217896, -0.015562745742499828, 0.010604777373373508, 0.00818532332777977, -0.03200992941856384, -0.026618247851729393, 0.021838868036866188, -0.0076453047804534435, 0.045242518186569214, 0.0009264298132620752, 0.017875896766781807, -0.002194091910496354, 0.04401790723204613, -0.021583741530776024, 0.03138061612844467, -0.008852905593812466, -0.015248089097440243, 0.038575198501348495, -0.023233562707901, -0.02005298063158989, -0.03782682493329048, 0.0320439487695694, 0.018760336562991142, 0.013300619088113308, -0.01530761830508709, -0.014338135719299316, -0.00030934144160710275, 0.022519206628203392, -0.0022025962825864553, -0.031567711383104324, 0.023131512105464935, 0.005812642630189657, 0.022502198815345764, -0.020580243319272995, 0.027247561141848564, 0.018182048574090004, 0.031278565526008606, 0.00423510791733861, 0.06589079648256302, -0.022008953616023064, 0.014516724273562431, 0.0233866386115551, 0.013955445028841496, 0.01643868163228035, 0.011029989458620548, 0.0627952516078949, 0.007717590779066086, 0.034187015146017075, 0.03374479338526726, -0.014338135719299316, 0.020733319222927094, -0.02564876526594162, -0.005361918359994888, 0.007683573756366968, 0.017025472596287727, 0.0025533956941217184, -0.027162518352270126, -0.052181970328092575, -0.02918652631342411, -0.003977854736149311, -0.009388672187924385, -0.012101522646844387, 0.03840511292219162, -0.003688710741698742, -0.05602588132023811, 0.00818532332777977, 0.01104699820280075, -0.025342613458633423, -0.001504186075180769, 0.034459151327610016, -0.0114466967061162, 0.0274856798350811, -0.053882814943790436, -0.030768312513828278, 0.0033974407706409693, -0.0008047129958868027, -0.02041015774011612, -0.03296240419149399, 0.001574345980770886, -0.018794354051351547, 0.014142538420855999, 0.029441652819514275, 0.04371175542473793, 0.008478719741106033, 0.0012022858718410134, 0.007122294511646032, 0.025206545367836952, 0.007496480830013752, -0.04207894206047058, -0.013479208573698997, 0.003386810654774308, -0.012620280496776104, -0.021481690928339958, 0.053746748715639114, -0.004983480088412762, 0.04415397346019745, -0.02542765438556671, -0.03343864157795906, 0.01819905824959278, 0.01679585874080658, -0.004932454787194729, 0.03345565125346184, -0.00828737486153841, 0.04078629985451698, 0.06626497954130173, -0.0038269045762717724, 0.0046305544674396515, -0.048508141189813614, -0.019746826961636543, -0.007190328557044268, -0.01427860651165247, -0.007500732783228159, 0.007398682180792093, 0.0060465093702077866, 0.029305584728717804, -0.02423706278204918, 0.013156047090888023, 0.03731657192111015, 0.029458660632371902, 0.0005862605175934732, 0.0032528690062463284, 0.013419678434729576, -0.015316122211515903, -0.018828369677066803, -0.043609704822301865, -0.023624757304787636, 0.0029403383377939463, -0.005672323051840067, 0.00458803353831172, 0.01211853139102459, -0.011259603314101696, 0.011115031316876411, 0.02889738231897354, -0.035887859761714935, -0.0340169295668602, -0.03155070170760155, -0.025597739964723587, 0.0039395857602357864, 0.022978436201810837, -0.020631268620491028, -0.0037886356003582478, -0.018760336562991142, -0.0399358756840229, 0.040071941912174225, 0.04292936623096466, -0.0010523988166823983, -0.00995845627039671, -0.025750815868377686, -0.0004276034305803478, 0.020665284246206284, -0.03309847414493561, 0.02034212462604046, -0.030138999223709106, -0.012815877795219421, -0.011029989458620548, 0.0026596987154334784, 0.023488689213991165, -0.02712850086390972, -0.001083758077584207, -0.018045980483293533, 0.00175399798899889, -0.0032953901682049036, 0.02876131422817707, -0.02459423989057541, 0.029016440734267235, -0.04207894206047058, 0.019219566136598587, 0.02381185069680214, -0.031142499297857285, -0.010188070125877857, -0.011846396140754223, -0.014134034514427185, -0.01339416578412056, 0.025053469464182854, -0.02367578260600567, -0.03126155957579613, 0.027162518352270126, -0.022978436201810837, 0.015775350853800774, 0.062387049198150635, 0.011769857257604599, 0.037078455090522766, -0.04082031548023224, -0.04391585662961006, -0.008619039319455624, 0.011973959393799305, 0.02535962127149105, 0.06936051696538925, -0.011769857257604599, 0.009159058332443237, 0.011531739495694637, 0.015537232160568237, 0.0009354655630886555, 0.004256368149071932, -0.018658285960555077, 0.004507243167608976, -0.0902809277176857, -0.013028483837842941, -0.060686200857162476, 0.03359171748161316, 0.018182048574090004, 0.0274856798350811, 0.013334636576473713, 0.020359132438898087, -0.024917401373386383, -0.023896893486380577, 0.027655763551592827, 0.004932454787194729, -0.028676271438598633, -0.015043986961245537, 0.002804270712658763, 0.051127444952726364, 0.022417156025767326, 0.00582965137436986, -0.008776367641985416, 0.04337158426642418, 0.04514046385884285, 0.02508748508989811, -0.008253357373178005, 0.003979980945587158, 0.013751343823969364, -0.03939160332083702, 0.009677816182374954, 0.004143687430769205, -0.006118795368820429, -0.04653516039252281, 0.027689781039953232, -0.026618247851729393, 0.03537760674953461, -0.022519206628203392, -0.014567750506103039, -0.009312134236097336, 0.014720826409757137, 0.0660608783364296, 0.013198568485677242, -0.013683309778571129, 0.01303698867559433, 0.018045980483293533, 0.0010784430196508765, -0.009558756835758686, 0.008389425463974476, -0.007011739537119865, 0.0009620413184165955, -0.0029956158250570297, -0.03054720349609852, 0.010052002966403961, 0.034050945192575455, 0.017892904579639435, -0.07300033420324326, 0.0007685699965804815, 0.04813395440578461, 0.01630261354148388, 0.003644063603132963, 0.024135012179613113, -0.049494631588459015, -0.017093507573008537, -0.01253523863852024, 0.0070755211636424065, -0.04194287583231926, 0.0018528596265241504, -0.02076733484864235, -0.021736817434430122, 0.03160172700881958, -0.03075130470097065, -0.04993685334920883, -0.010273112915456295, -0.00529388478025794, -0.05116146057844162, 0.06344157457351685, -0.007539002224802971, 0.04663721099495888, -0.008580770343542099, 0.002530009252950549, 0.045956872403621674, -0.030768312513828278, 0.01920255646109581, -0.036228030920028687, -0.022417156025767326, 0.018454184755682945, -0.003142313798889518, -0.006935201585292816, 0.015928426757454872, 0.00688842823728919, 0.018947429955005646, -0.042487144470214844, -0.03871126472949982, 0.04003792628645897, 0.020869385451078415, 0.0053746746852993965, -0.0615026094019413, -0.007058512885123491, -0.010740845464169979, 0.011208578012883663, 0.031278565526008606, -0.023556724190711975, 0.027587730437517166, -0.0004977633361704648, 0.08497428894042969, -0.02161775901913643, -0.0362960621714592, 0.014873902313411236, 0.0013255971716716886, -0.04656917601823807, 0.027876874431967735, -0.048644211143255234, -0.007232849486172199, 0.013062501326203346, 0.03095540590584278, 0.004753865767270327, 0.008147054351866245, -0.014304119162261486, -0.024781333282589912, 0.006314392667263746, 0.005247111432254314, -0.03684033453464508, 0.031193524599075317, 0.035105470567941666, 0.05816895142197609, -0.01891341246664524, 0.037792809307575226, -0.010154053568840027, -0.002014440018683672, -0.010315634310245514, 0.049052413552999496, 0.053100425750017166, 0.03854118287563324, -0.019287599250674248, 0.0012724457774311304, 0.011064006015658379, -0.002438588533550501, 0.0004656067176256329, -0.03452718257904053, 0.0690203532576561, -0.045446619391441345, -0.04299739748239517, -0.023403648287057877, -0.016098512336611748, -0.03973177447915077, 0.03789485991001129, 0.007794129196554422, -0.04411995783448219, 0.05143359676003456, -0.026056967675685883, -0.06663916260004044, -0.0045242514461278915, -0.04139860346913338, 0.0014616649132221937, -0.0006564204231835902, -0.026193035766482353, -0.011922934092581272, -0.019814861938357353, -0.037452638149261475, -0.03314949944615364, 0.00921008363366127, -0.03905143588781357, -0.06810189038515091, 0.005013245157897472, -0.026465171948075294, -0.02457723207771778, 0.0031359356362372637, 0.02627807855606079, -0.009550252929329872, -0.02641414664685726, -0.03126155957579613, 0.021651776507496834, 0.002885060850530863, -0.014227581210434437, -0.009057007730007172, 0.05259017273783684, -0.03269026800990105, -0.0341700054705143, 0.04592285677790642, 0.02649918757379055, -0.008627544157207012, 0.008147054351866245, 0.011965454556047916, -0.06170671060681343, 0.013385661877691746, 0.09980566799640656, 0.017110515385866165, -0.006233602296561003, 0.05037907138466835, -0.03132959082722664, -0.023403648287057877, -0.0008451081230305135, 0.03721452131867409, -0.023981936275959015, -0.019712811335921288, 0.011191570200026035, 0.003314524656161666, 0.07150358706712723, -0.02039314992725849, -0.03345565125346184, -0.01579236052930355, 0.012356650084257126, -0.013581259176135063, 0.02445817179977894, 0.026397136971354485, 0.001953847473487258, 0.006148559972643852, 0.0653805360198021, -0.016897909343242645, -0.04058219864964485, -0.025614747777581215, -0.03670426830649376, -0.00767081743106246, 0.0013819377636536956, 0.008861410431563854, 0.01721256598830223, 0.011497722007334232, 0.008653056807816029, -0.055651698261499405, 0.0037567445542663336, -0.011140544898808002, -0.044528160244226456, 0.02325057052075863, 0.04755566641688347, -0.015171550214290619, 0.03554769232869148, 0.0072413538582623005, 0.010604777373373508, 0.01420206855982542, 0.007849406450986862, 0.049494631588459015, -0.030513186007738113, 0.019457682967185974, -0.013292115181684494, 0.008079021237790585, -0.022366130724549294, 0.0010513357119634748, -0.005327901802957058, 0.002340789884328842, -0.0217538271099329, -0.044460125267505646, 0.027689781039953232, 0.021634766831994057, -0.013615275733172894, 0.010477214120328426, 0.006671570241451263, -0.00699473125860095, -0.03871126472949982, 0.0074156904593110085, -0.017306113615632057, 0.02018904685974121, -0.033761803060770035, -0.06721745431423187, 0.004349914845079184, 0.021090496331453323, 0.001069938763976097, 0.05507341027259827, -0.04010596126317978, -0.018539227545261383, 0.003121053334325552, 0.023471681401133537, -0.023131512105464935, -0.02345467358827591, 0.03350667655467987, -0.010077515617012978, -0.031839847564697266, 0.0018539226148277521, -0.01720406301319599, -0.01989990472793579, -0.0036759544163942337, -0.05677425488829613, -0.0013883159263059497, -0.04357568547129631, 0.03144865110516548, -0.037010420113801956, -0.006186828948557377, -0.014057496562600136, -0.01629410870373249, -0.008988973684608936, -0.001060371519997716, -0.025274578481912613, -0.002156886039301753, 0.02933960221707821, -0.01402347907423973, 0.04633105918765068, 0.014610270969569683, 0.03840511292219162, 0.017246583476662636, 0.00949922762811184, 0.01573283039033413, 0.0027553713880479336, -0.006208089645951986, -0.01857324317097664, 0.021736817434430122, 0.03311548009514809, 0.007122294511646032, -0.019661786034703255, -0.022485191002488136, 0.04044612869620323, 0.011285115964710712, 0.04235107824206352, 0.059767745435237885, -0.013002971187233925, 0.002657572738826275, -0.003824778599664569, -0.023607749491930008, -0.005149312783032656, 0.006658813916146755, 0.06065218523144722, -0.0003888028732035309, -0.01743367686867714, -0.010715332813560963, -0.007258362136781216, -0.01989990472793579, -0.02501945197582245, -0.043745771050453186, 0.006484477315098047, -0.00949922762811184, 0.008852905593812466, 0.032707277685403824, -0.003975728526711464, 0.03704443573951721, 0.012705323286354542, 0.047929853200912476, -0.026873374357819557, 0.021073488518595695, -0.0024322103708982468, -0.024032961577177048, 0.0033230287954211235, 0.017025472596287727, 0.047725751996040344, -0.025835858657956123, 0.03677229955792427, -0.035887859761714935, -0.009150554426014423, -0.002336537931114435, -0.013980957679450512, 0.031125491484999657, 0.023352622985839844, -0.02500244416296482, -0.002500244416296482, -0.015707317739725113, 0.022281089797616005, -0.03138061612844467, 0.005026001483201981, -0.02090340293943882, -0.0435076542198658, 0.013793865218758583, 0.023777833208441734, 0.03738460689783096, -0.047283533960580826, 0.009014486335217953, 0.026890382170677185, 0.03626204654574394, 0.007534749805927277, -0.0062165940180420876, 0.015316122211515903, -0.022842368111014366, -0.002680959179997444, 0.00793870072811842, 0.0038928124122321606, -0.02586987428367138, -0.01998494565486908, -0.016523724421858788, 0.03871126472949982, -0.0026214297395199537, -0.005366170778870583, -0.04071826487779617, -0.019712811335921288, -0.003167826682329178, -0.02614201046526432, -0.02282536029815674, 0.0228933934122324, 0.005549011752009392, 0.029611736536026, 0.014814373105764389, 0.028523195534944534, -0.00602099671959877, 0.0011480713728815317, -0.015129029750823975, -0.0028723045252263546, 0.0074752201326191425, -0.0027085980400443077, 0.00043398162233643234, -0.0487462617456913, 0.013164551928639412, 0.031227542087435722, -0.0017380524659529328, -0.005621297750622034, 0.0073051354847848415, 0.015358643606305122, 0.0051408084109425545, 0.02287638559937477, -0.016957439482212067, 0.015622274950146675, 0.026159018278121948, 0.0013649292523041368, 0.028438152745366096, -0.00035638047847896814, 0.003682332579046488, 0.01310502178966999, -0.010188070125877857, 0.026941407471895218, -0.025529704988002777, -0.04224902763962746, 0.008704082109034061, 0.053100425750017166, -0.02245117351412773, 0.029441652819514275, 0.029220541939139366, 0.012985962443053722, -0.02166878432035446, 0.010358154773712158, -0.052045904099941254, -0.010936442762613297, -0.008478719741106033, 0.036534182727336884, 0.02345467358827591, 0.024032961577177048, 0.013802369125187397, 0.03966373950242996, -0.046875327825546265, 0.0015966696664690971, -0.005047261714935303, -0.04769173637032509, 0.0017486828146502376, 0.013657797127962112, 0.00291482568718493, -0.04585482180118561, 0.002277008257806301, 0.031227542087435722, 0.03180582821369171, 0.023964926600456238, -0.030275067314505577, 0.03338761627674103, -0.0010412369156256318, -0.019508708268404007, 0.05476725846529007, -0.0036738284397870302, 0.01257776003330946, -0.020086996257305145, -0.019814861938357353, 0.029662761837244034, 0.007487976457923651, 0.052454106509685516, -0.01807999797165394, 0.04840609058737755, -0.025529704988002777, 0.019389649853110313, -0.016549237072467804, -0.021940920501947403, 0.023335613310337067, 0.03292838856577873, 0.0233866386115551, 0.020512208342552185, -0.03854118287563324, 0.0037588707637041807, -0.042623214423656464, 0.04486833140254021, 0.01996793784201145, -0.03479931876063347, 0.002106923609972, 0.013793865218758583, -0.03537760674953461, 0.031856853514909744, 0.017391154542565346, 0.0036568199284374714, 0.017960939556360245, -0.00917606707662344, 0.002311025047674775, 0.03132959082722664, 0.0011342519428581, 0.033693768084049225, -0.012620280496776104, -0.016268596053123474, 0.010808879509568214, -0.015103517100214958, 0.006365417968481779, -0.024066977202892303, -0.014014975167810917, -0.03462923318147659, 0.01328361127525568, -0.03046216070652008, -0.06170671060681343, -0.007768616080284119, -0.006526998244225979, -0.014457195065915585, -0.004284007009118795, -0.03216300532221794, -0.020291099324822426, -0.022944418713450432, -0.014584758318960667, 0.025971924886107445, 0.04292936623096466, -0.012560751289129257, -0.022723309695720673, -0.03229907527565956, -0.014788860455155373, 0.001293706358410418, -0.012297119945287704, 0.008219340816140175, -0.014440186321735382, -0.004656067118048668, -0.009847900830209255, -0.007266866508871317, 0.01339416578412056, -0.013011476024985313, -0.004341410472989082, -0.016557740047574043, -0.0063271489925682545, -0.005272624082863331, -0.03471427783370018, 0.0389493852853775, 0.012756348587572575, 0.018675293773412704, -0.008006734773516655, 0.023488689213991165, -0.002014440018683672, 0.01763777807354927, 0.0017943930579349399, 0.026822349056601524, 0.011004476808011532, 0.0012416179524734616, 0.004838908091187477, -0.002644816180691123, 0.026737306267023087, -0.026261068880558014, 0.011531739495694637, -0.0043924362398684025, 0.0004733136738650501, 0.023624757304787636, -0.0477597676217556, 0.025631755590438843, -0.053236495703458786, 0.007951457053422928, -0.009754354134202003, 0.02996891550719738, -0.009201579727232456, -0.011242595501244068, -0.009142049588263035, -0.010494222864508629, -0.0033931888174265623, 0.00391619885340333, 0.00864030048251152, 0.04490234702825546, 0.032707277685403824, 0.07442904263734818, -0.02663525566458702, -0.033064454793930054, -0.02195792831480503, -0.015571249648928642, -0.01282438263297081, 0.00811729021370411, -0.035173505544662476, -0.004707092419266701, -0.01438916102051735, 0.01527360174804926, 0.014491211622953415, -0.0706871822476387, -0.03032609261572361, -0.009295126423239708, -0.05554964765906334, 0.010715332813560963, 0.03165275231003761, -0.021515708416700363, -0.011021485552191734, 0.04718147963285446, -0.004122426733374596, -0.0090740155428648, -0.03871126472949982, 0.07340853661298752, -0.028319094330072403, 0.03564974293112755, -0.023760825395584106, 0.06143457442522049, -0.022723309695720673, -0.003843913087621331, 0.0474536158144474, 0.007105286233127117, -0.0007356160786002874, -0.012024984695017338, 0.007870666682720184, 0.01069832406938076, 0.024985434487462044, 0.03479931876063347, 0.016387656331062317, -0.004617798142135143, 0.018250083550810814, -0.010392172262072563, -0.03229907527565956, 0.03813297674059868, 0.0067353518679738045, 0.0006819331320002675, 0.02076733484864235, -0.005157817155122757, 0.02882934734225273, 0.021413657814264297, 0.011761353351175785, 0.031142499297857285, -0.007547506131231785, -0.0003545201907400042, 0.0024300843942910433, -0.022655274718999863, 0.002457723254337907, -0.00786216277629137, -0.001574345980770886, 0.0040076193399727345, 0.03554769232869148, 0.03442513197660446, 0.06010791286826134, -0.009949952363967896, -0.019576743245124817, 0.05449512228369713, -0.0032932639587670565, 0.056434087455272675, -0.01490791980177164, -0.030632244423031807, 0.004190460313111544, 0.01565629243850708, 0.025903891772031784, 0.00391407310962677, 0.05150163173675537, -0.02558073028922081, 0.0072456058114767075, 0.04473226144909859, -0.038439132273197174, 0.009116536937654018, 0.006106039043515921, 0.016243083402514458, 0.03684033453464508, 0.021906903013586998, -0.01506099570542574, -0.03996989130973816, 0.07293229550123215, -0.037724774330854416, 0.025342613458633423, 0.0412285178899765, 0.018454184755682945, -0.014125529676675797, -0.004277628846466541, 0.013445191085338593, -0.011956950649619102, -0.04435807466506958, 0.008465963415801525, 0.004332906566560268, -0.014610270969569683, 0.04116048663854599, 0.034391116350889206, -0.020954428240656853, -0.0023152772337198257, 0.00483465613797307, -2.617709105834365e-05, -0.03362573683261871, 0.014372153207659721, -0.021141521632671356, -0.01864127814769745, 0.002217478584498167, 0.030632244423031807, 0.023709800094366074, 0.01947469264268875, 0.015282105654478073, -0.02076733484864235, 0.007917440496385098, -0.04003792628645897, 0.024815350770950317, -0.04146663844585419, -0.027876874431967735, -0.0012192942667752504, 0.016404664143919945, -0.005527751054614782, 0.00963529571890831, 0.02025708183646202, 0.02437313087284565, -0.019253581762313843, -0.02379484288394451, 0.01672782562673092, -0.012620280496776104, 0.031856853514909744, -0.012220581993460655, -0.006144308019429445, -0.005553263705223799, 0.027094485238194466, -0.0005628739017993212, -0.0025895386934280396, -0.030768312513828278, 0.0006548258825205266, -0.027672771364450455, 0.004383931867778301, -0.004366923123598099, 0.009235596284270287, 0.029713787138462067, 0.03979980945587158, -0.0045667728409171104, 0.018947429955005646, 0.03462923318147659, -0.03081933781504631, -0.034050945192575455, -0.005855164024978876, 0.011514730751514435, -0.028387127444148064, 0.028217043727636337, -0.003607920603826642, 0.0005596848204731941, -0.0024215802550315857, -0.02806396782398224, 0.013810873031616211, -0.05949560925364494, 0.02663525566458702, 0.022213054820895195, -0.008236349560320377, -0.02444116398692131, -0.029934898018836975, 0.01233113743364811, -0.009261108934879303, -0.027519695460796356, -0.01708500273525715, -0.01869230344891548, 0.009414184838533401, 0.033268555998802185, 0.014508220367133617, -0.011166057549417019, 0.0033336591441184282, 0.017484702169895172, -0.03650016710162163, 0.022162029519677162, 0.032843343913555145, 0.0222470723092556, -0.017535727471113205, -0.007947205565869808, -0.04605892300605774, -0.004507243167608976, 0.012220581993460655, -0.006926697213202715, 0.01864127814769745, 0.04003792628645897, -0.006131551694124937, -0.011812378652393818, 0.00921008363366127, 0.011489218100905418, -0.02515552006661892, -0.05418897047638893, 0.015248089097440243, 0.020069988444447517, 0.02558073028922081, -0.016829876229166985, 0.04912044480443001, -0.02757072076201439, 0.008861410431563854, 0.014074504375457764, 0.022417156025767326, -0.0034272056072950363, -0.006586527917534113, 0.02969677932560444, 0.036670248955488205, 0.011429687961935997, -0.027893882244825363, 0.01857324317097664, -0.03413598984479904, -0.01091093011200428, 0.007143555209040642, -0.0008998541161417961, 0.00591469369828701, -0.0074071865528821945, -0.01920255646109581, -0.01891341246664524, -0.006067769601941109, 0.01664278283715248, -0.030002931132912636, 0.0016859640600159764, -0.006709839217364788, 0.011029989458620548, -0.005889181047677994, -0.007492228876799345, -0.005782878026366234, 0.02471330016851425, -0.016413168981671333, 0.00047171913320198655, 0.0008217214490287006, -0.018607260659337044, 0.013836385682225227, -0.0017529348842799664, -0.01364078838378191, -0.025699790567159653, -0.013156047090888023, 0.010468710213899612, -0.005676575005054474, 0.02835310995578766, 0.029373617842793465, -0.017408164218068123, -0.03711247071623802, -0.008661560714244843, 0.024883383885025978, -0.0027893881779164076, 0.0016381277237087488, 0.0004209594917483628, 0.007794129196554422, -0.03207796439528465, 0.024900391697883606, -0.007704834453761578, 0.01991691254079342, -0.006841654889285564, 0.005910441745072603, -0.006811890285462141, 0.057080406695604324, 0.0014680430758744478, 0.013674805872142315, 0.009312134236097336, -0.060618169605731964, -0.028659263625741005, -0.0024662273935973644, -0.019933920353651047, -0.010120037011802197, -0.007483724504709244, 0.020920412614941597, -0.023692792281508446, 0.012050497345626354, -0.011531739495694637, -0.0015658418415114284, -0.0024024457670748234, -0.0092441001906991, 0.010307129472494125, 0.0017784476513043046, 0.030292075127363205, -0.036228030920028687, -0.010034994222223759, -0.03224804997444153, -0.014822877012193203, 0.01293493714183569, -0.006799133960157633, -0.011149048805236816, -0.020359132438898087, -0.017960939556360245, -0.008572266437113285, 0.006254862993955612, 0.009813884273171425, -0.0015265097608789802, -0.0220939964056015, -0.044596195220947266, -0.017391154542565346, -0.021311607211828232, 0.030853355303406715, -0.00499623641371727, 0.003191213123500347, -0.012135539203882217, 0.011378662660717964, -0.011506226845085621, 0.03871126472949982, -0.025121502578258514, 0.0032337342854589224, -0.011531739495694637, 1.98155266843969e-05, -0.01665979065001011, 0.02537662908434868, 0.012526734732091427, -0.04146663844585419, -0.025393638759851456, -0.022128012031316757, -0.031924888491630554, 0.041840825229883194, 0.008878418244421482, 0.002423706231638789, -0.008776367641985416, -0.004028880037367344, -0.001800771220587194, -0.03005395643413067, -0.009082520380616188, -0.0008929444011300802, -0.04139860346913338, 0.002204722259193659, -0.014992961660027504, 0.01385339442640543, -0.0039459639228880405, -0.009677816182374954, -0.041126467287540436, -0.014261597767472267, -0.017960939556360245, -0.0038396609015762806, 0.031771812587976456, 0.024203045293688774, 0.02954370342195034, 0.04000391066074371, -0.02954370342195034, -0.012790365144610405, 0.037010420113801956, -0.016472699120640755, 0.04337158426642418, -0.009133545681834221, -0.012509725987911224, -0.010477214120328426, -0.003958720248192549, 0.010783366858959198, -0.008988973684608936, 0.008300131186842918, 0.005595785100013018, -0.05973372980952263, 0.01607299968600273, -0.020580243319272995, 0.035615723580121994, -0.031431641429662704, 0.006008240394294262, -0.00010005760850617662, 0.004468974191695452, 0.0022089744452387094, -0.0010646235896274447, 0.03427205607295036, -0.011472209356725216, -0.02103947103023529, -0.03250317648053169, 0.0034931134432554245, 0.00945670623332262, 0.004753865767270327, -0.017484702169895172, 0.009541749022901058, -0.028659263625741005, -0.004443461541086435, 0.00645046029239893, -0.0027851362247020006, -0.002838287502527237, 0.009371664375066757, 0.024781333282589912, -0.021566733717918396, -0.04323551803827286, -0.003867299761623144, 0.005621297750622034, 0.0036802066024392843, -0.012390666641294956, -0.021158529445528984, 0.040071941912174225, -0.005689331330358982, 0.002131373155862093, -0.009779867716133595, 0.00483465613797307, 7.632216693309601e-06, -0.004473226144909859, 0.018369141966104507, -0.010893921367824078, 0.0037907615769654512, -0.03311548009514809, 0.011531739495694637, -0.009448202326893806, 0.0008908183663152158, -0.01261177659034729, 0.007334900554269552, -0.01420206855982542, 0.002984985476359725, 0.046365074813365936, 0.034033939242362976, 0.005259867757558823, -0.02394791878759861, -0.019525717943906784, -0.00042707190732471645, -0.018454184755682945, 0.0016466319793835282, 0.03435710072517395, -0.018369141966104507, 0.027621746063232422, 0.03799691051244736, 0.017187053337693214, 0.014440186321735382, -0.007985474541783333, 0.03267326205968857, 0.01120007410645485, -0.026805341243743896, 0.023913901299238205, 0.020648276433348656, 0.015026978217065334, 0.019032472744584084, -0.04704541340470314, 0.038643233478069305, 0.0063866786658763885, 0.06738753616809845, 0.01857324317097664, -0.010392172262072563, -0.01743367686867714, 0.009108033031225204, -0.007504985202103853, -0.02537662908434868, 0.02551269717514515, -0.028080975636839867, -0.052386071532964706, 0.011744344606995583, -0.02336963079869747, -0.009728841483592987, 0.005004740785807371, -0.02260424941778183, 0.014882407151162624, -0.013045492582023144, 0.01983186975121498, -0.017841879278421402, 0.0369764007627964, -0.012144044041633606, -0.021804852411150932, -0.003174204844981432, 0.010749349370598793, 0.02105647884309292, -0.021209554746747017, -0.019950930029153824, 0.007096781861037016, 0.016098512336611748, 0.01331762783229351, 0.006191081367433071, -0.014729330316185951, 0.004105417989194393, -0.0072413538582623005, 0.019712811335921288, 0.02933960221707821, 0.011293620802462101, 0.01677885092794895, -0.01785888895392418, 0.021702801808714867, -0.019236573949456215, 0.030904380604624748, -0.021277589723467827, 0.025308595970273018, -0.011608277447521687, 0.017943929880857468, -0.008206584490835667, -0.036874350160360336, 0.006539754569530487, -0.014678305014967918, -0.01807999797165394, -0.029611736536026, 0.025563722476363182, 0.0008174693211913109, 0.012594767846167088, 0.017467692494392395, 0.025529704988002777, -0.01713602803647518, 0.03408496454358101, -0.03854118287563324, -0.02663525566458702, 0.02833610214293003, 0.009805380366742611, -0.05177376791834831, -0.02627807855606079, -0.007058512885123491, 0.009924438782036304, 0.007143555209040642, -0.00963529571890831, -0.017340129241347313, -0.02041015774011612, -0.0284721702337265, 0.027604738250374794, 0.02296142838895321, 0.004088409710675478, 0.012297119945287704, -0.023403648287057877, 0.024560222402215004, -0.00019971658184658736, 0.06973470747470856, -0.007326396182179451, -0.014669801108539104, 0.02876131422817707, 0.010281616821885109, 0.01374283991754055, 0.006539754569530487, -0.05235205590724945, -0.010120037011802197, -0.013734335079789162, -0.00953324418514967, 0.003237986471503973, 0.013632284477353096, 0.011599772609770298, -0.012807373888790607, 0.009363159537315369, 0.01650671474635601, -0.011633790098130703, 0.021362632513046265, -0.02869327925145626, -0.029730796813964844, 0.001143819303251803, 0.016540732234716415, -0.012883911840617657, -0.03626204654574394, -0.01041768491268158, 0.021073488518595695, 0.02804695814847946, -0.0029701031744480133, 0.004507243167608976, -0.011081014759838581, -0.012016480788588524, -0.008725342340767384, -0.005549011752009392, -0.0016094259917736053, 0.01215254794806242, -0.01580086350440979, 0.02282536029815674, -0.030292075127363205, 0.03789485991001129, -0.011531739495694637, -0.02105647884309292, -0.010655803605914116, 0.01637915149331093, 0.031839847564697266, -0.03541162237524986, 0.00458803353831172, -0.007296631578356028, 0.0018401033012196422, -0.006986226886510849, -0.017467692494392395, 0.04150065407156944, 0.021651776507496834, -0.016472699120640755, 0.002181335585191846, -0.00036966835614293814, -0.011072510853409767, 0.012628785334527493, 0.002016566228121519, -0.016549237072467804, -0.024032961577177048, -0.03663623332977295, 0.02331860549747944, -0.006692830938845873, -0.005017497111111879, 0.03799691051244736, 0.008895426988601685, -0.009405680932104588, 0.00380777008831501, -0.003852417226880789, 0.024220053106546402, 0.0026724550407379866, 0.012909424491226673, -0.015834880992770195, 0.028948407620191574, 0.024407146498560905, 0.0040033673867583275, -0.041058432310819626, -0.009252605028450489, -0.004033132456243038, 0.027434654533863068, 0.03200992941856384, -0.03476530313491821, 0.009201579727232456, -0.01806299015879631, -0.0009338710224255919, -0.017391154542565346, 0.011132040061056614, -0.004413696471601725, 0.029662761837244034, 0.0011661428725346923, 0.022349122911691666, 0.003965098410844803, 0.026618247851729393, -0.004439209122210741, 0.0065610152669250965, -0.019661786034703255, -0.029662761837244034, 0.03639811649918556, 0.00892944447696209, 0.02246818132698536, -0.03434009104967117, -0.0032060956582427025, -0.04656917601823807, 0.007390177808701992, 0.03238411620259285, 0.0004911193973384798, -0.007628296501934528, -0.012526734732091427, -0.02296142838895321, -0.008334147743880749, -0.01257776003330946, 0.009839396923780441, -0.02549568936228752, -0.04061621427536011, -0.016532227396965027, -0.00807476881891489, -0.013793865218758583, 0.0026001690421253443, 0.003897064598277211, -0.025104494765400887, 0.018947429955005646, -0.009014486335217953, 0.003960846457630396, -0.024815350770950317, -0.00970332883298397, 0.02501945197582245, 0.01544368639588356, -0.035241540521383286, -0.00664180563762784, 0.04500439763069153, 0.017807861790060997, -0.0042372336611151695, -0.025682782754302025, -0.012968954630196095, 0.009031495079398155, -0.015316122211515903, 0.016804363578557968, -0.016948934644460678, -0.015571249648928642, -0.009320639073848724, 2.097821379720699e-05, 0.015043986961245537, -0.018828369677066803, -0.0017848258139565587, -0.0010816321009770036, 0.017807861790060997, -0.0033655499573796988, 0.02692439965903759, -0.01708500273525715, -0.011259603314101696, -0.023284588009119034, 0.006101786624640226, 0.00811729021370411, -0.018930422142148018, -0.0111235361546278, 0.029424645006656647, 0.00172742223367095, -0.008266113698482513, 0.012007975950837135, -0.028097983449697495, -0.005965718999505043, 0.019440675154328346, -0.020512208342552185, -0.012841391377151012, 0.006242106668651104, 0.033489666879177094, -0.011999472044408321, -0.008725342340767384, -0.006203837692737579, 0.024645265191793442, -0.03012199141085148, 0.0076453047804534435, -0.024611247703433037, -0.01434663962572813, 0.02231510542333126, -0.009142049588263035, 0.043031416833400726, 0.023114504292607307, -0.017050985246896744, -0.01694043166935444, -0.04867822676897049, -0.007772868499159813, 0.002103734528645873, 0.03012199141085148, -0.007819641381502151, -0.026397136971354485, 0.015035483054816723, -0.012637289240956306, 0.007942953146994114, 0.009439698420464993, -0.003760996740311384, 0.005638306029140949], "index": 55}, {"title": "Newport Tower (Jersey City)", "text": "The Newport Tower (also known as Newport Office Center II and 525 Washington Boulevard) in Newport, Jersey City, New Jersey is the fourth tallest building in Jersey City. It has 37 floors, it is 531 ft (162 m) tall and is connected to a mall (called the Newport Centre Mall) within the complex. The mall is one of the few enclosed, regional shopping facilities in Hudson County. The building was developed by Melvin Simon & Associates in 1990.", "vector": [-0.018348103389143944, -0.03591682016849518, -0.01979321986436844, 0.005041669122874737, -0.029860321432352066, -0.03724827244877815, 0.00991284754127264, 0.025557447224855423, -0.034098245203495026, 0.08540798723697662, -0.01596122607588768, -0.025963379070162773, 0.00849208701401949, -0.03796271234750748, 0.027960561215877533, -0.016708141192793846, -0.03374102711677551, 0.010781540535390377, -0.0007687327452003956, 0.018185731023550034, -0.008289121091365814, 0.0010325881885364652, -0.03627403825521469, 0.03893695026636124, 0.030672183260321617, 0.007822300307452679, -0.006669454276561737, -0.005565320607274771, -0.06410469859838486, -0.047575172036886215, -0.03877457603812218, 0.017568714916706085, 0.0516994372010231, -0.01795841008424759, -0.006563912145793438, 0.05098499730229378, 0.017032885923981667, -0.008240409195423126, -0.035721972584724426, -0.011244302615523338, 0.03089950606226921, -0.007948138751089573, -0.00720528420060873, -0.01416700892150402, 0.0566030889749527, -0.06615059822797775, -0.005650566425174475, -0.02674276754260063, -0.009799186140298843, 0.048062290996313095, 0.0018490179209038615, -0.035527125000953674, 0.01823444291949272, 0.022131385281682014, -0.004757517017424107, -0.016480818390846252, 0.008410900831222534, 0.15340963006019592, 0.001280713826417923, 0.04936126992106438, 0.061214469373226166, 0.03403329849243164, -0.0201504398137331, 0.013249604031443596, 0.02438836358487606, 0.06647533923387527, -0.0030465158633887768, 0.03835240751504898, -0.0019697826355695724, -0.018624136224389076, -0.03232838585972786, 0.04945869371294975, -0.019403524696826935, -0.02055637165904045, 0.026125751435756683, -0.005723634269088507, 0.03640393540263176, 0.03322143480181694, 0.014329382218420506, 0.003152057994157076, 0.05683040991425514, 0.04796486720442772, -0.04280141741037369, -0.013411976397037506, -0.039196744561195374, 0.00449772085994482, -0.05082262307405472, -0.05361543223261833, 0.021709216758608818, 0.05631081759929657, 0.010270066559314728, 0.030509810894727707, -0.06858618557453156, -0.038904473185539246, -0.029486864805221558, 0.02455073781311512, 0.015092533081769943, 0.021351996809244156, 0.007599037606269121, 0.0630979910492897, 0.05533658340573311, 0.043385960161685944, 0.019289864227175713, 0.025232702493667603, -0.004392178729176521, 0.009027916938066483, 0.05725257843732834, 0.01828315481543541, 0.03138662502169609, -0.01782851107418537, 0.07176868617534637, -0.027018800377845764, 0.0039801583625376225, -0.04367822781205177, -0.014905804768204689, 0.01795841008424759, -0.0041892132721841335, -0.011974979192018509, -0.0040674335323274136, -0.017974646762013435, -0.011577166616916656, -0.0574149526655674, 0.024290941655635834, -0.0439704991877079, -0.003192651318386197, -0.017763562500476837, -0.01995559222996235, 0.026190700009465218, 0.0031277022790163755, -0.0032149774488061666, -0.024404602125287056, 0.02039399929344654, 0.03546217456459999, -0.030038930475711823, -0.026158224791288376, 0.046633411198854446, 0.016870513558387756, 0.01950094848871231, -0.014532347209751606, 0.01925739087164402, -0.015847565606236458, -0.05679793655872345, -0.00069617253029719, -0.07196353375911713, 0.033042822033166885, -0.06413717567920685, -0.003219036851078272, 0.011942504905164242, -0.006109268870204687, -0.022017724812030792, 0.03130543604493141, 0.08034196496009827, 0.0061904555186629295, -0.001422789879143238, 0.027343545109033585, -0.029632998630404472, -0.08923997730016708, 0.008151104673743248, -0.0270837489515543, 0.04296378791332245, -0.013858500868082047, -0.08326467126607895, -0.016838038340210915, -0.073262520134449, -0.03883952647447586, -0.022813349962234497, 0.03314024582505226, 0.04224935173988342, 0.03676115721464157, -0.007412309292703867, 0.021465657278895378, 0.002900380641222, -0.02068626880645752, -0.01766613870859146, -0.0060686757788062096, -0.07741925865411758, 0.05001075938344002, -0.007327063474804163, 0.04445761814713478, -0.04617876559495926, 0.05520668253302574, -0.0067384629510343075, 0.0037325401790440083, -0.040495727211236954, -0.02584971860051155, -0.0053664143197238445, -0.00962869543582201, 0.013736722059547901, 0.008808713406324387, -0.029454389587044716, -0.05683040991425514, 0.03614414110779762, 0.015912514179944992, 0.0307371336966753, -0.018559187650680542, -0.04150243476033211, 0.05819433927536011, -0.011041336692869663, -0.020621320232748985, -0.00039527579792775214, 0.0455942265689373, -0.007217462174594402, -0.03325390815734863, -0.022537317126989365, 0.06400727480649948, -0.00663697998970747, -0.002405144041404128, 0.02174169011414051, 0.0117070646956563, 0.06754700094461441, -0.02630436047911644, -0.03516990318894386, 0.00494830496609211, -0.017406342551112175, 0.028918560594320297, 0.011828843504190445, -0.03403329849243164, -0.004542373586446047, -0.013801670633256435, -0.003324578981846571, 0.03721579909324646, -0.010497388429939747, -0.0054638381116092205, -0.0053420583717525005, -0.0769646093249321, 0.0018662700895220041, -0.006170158740133047, 0.058324236422777176, 0.006446192041039467, 0.04738032445311546, 0.004160797689110041, -0.02373887412250042, -0.03029872663319111, 0.034585364162921906, 0.02088111639022827, 0.0015719697112217546, 0.021205861121416092, -0.02854510210454464, 0.024940431118011475, 0.03357865288853645, 0.0060118455439805984, 0.03783281520009041, -0.03219848498702049, -0.01203180942684412, -0.01188567467033863, -0.05121231824159622, -0.023917483165860176, -0.013566230423748493, -0.007059148512780666, -0.0003762477426789701, -0.024372126907110214, 0.007278351578861475, 0.03789776563644409, 0.04458751529455185, 0.02976289764046669, -0.035527125000953674, -0.03130543604493141, 0.007716757711023092, 0.04942622035741806, -0.05306336656212807, -0.06111704558134079, 0.03167889267206192, 0.010594812221825123, 0.018559187650680542, 0.0026771181728690863, -0.010481150820851326, -0.025346362963318825, 0.030639709904789925, -0.04429524391889572, -0.0038198153488337994, 0.042281825095415115, -0.00850832462310791, 0.060240235179662704, 0.06819649040699005, 0.03484515845775604, 0.02243989333510399, 0.019533423706889153, -0.030363675206899643, -0.002167674247175455, 0.031013166531920433, 0.018965119495987892, -0.00018837758398149163, -0.024664398282766342, -0.005423245020210743, -0.01164211519062519, 0.057512372732162476, 0.0223911814391613, 0.05423244833946228, 0.01523054949939251, -0.05202418193221092, -0.03284797817468643, 0.021936537697911263, 0.006417776923626661, 0.01570954918861389, -0.02055637165904045, -0.03851478174328804, 0.00090725690824911, -0.02227752096951008, 0.026612868532538414, 0.013769196346402168, -0.02549249865114689, 0.042606569826602936, -0.05182933434844017, 0.004940186161547899, 0.015693312510848045, 0.018705323338508606, -0.014102060347795486, 0.00494830496609211, -0.014491754584014416, -0.05186180770397186, 0.04604886844754219, 0.006157980766147375, 0.007789825554937124, 0.019403524696826935, -0.011609640903770924, -0.030526049435138702, 0.08560283482074738, -0.018575426191091537, 0.017925934866070747, 0.0012218537740409374, -0.00283949077129364, 0.032182250171899796, 0.007209343370050192, 0.009336424060165882, -0.00455861072987318, -0.039066847413778305, 0.028902322053909302, 0.01758495159447193, -0.008073977194726467, -0.04299626499414444, -0.010635404847562313, -0.0023198984563350677, -0.00938513595610857, -0.06819649040699005, 0.026320599019527435, -0.03292916342616081, 0.028431441634893417, -0.004075552336871624, -0.05306336656212807, 0.024161042645573616, 0.05377780646085739, -0.011966860853135586, 0.02052389644086361, 0.03575444594025612, 0.0011528454488143325, -0.056538138538599014, 0.025508735328912735, -0.007972494699060917, 0.04078799858689308, 0.02724612131714821, 0.0007915664464235306, -0.01645646244287491, -0.018055833876132965, 0.01807207055389881, 0.0598505400121212, 0.03089950606226921, -0.04056067392230034, -0.06589080393314362, 0.03526732698082924, 0.008216053247451782, 0.05234892666339874, 0.008743764832615852, -0.010456795804202557, 0.03588434308767319, -0.039553966373205185, 0.003456506645306945, 0.008151104673743248, -0.010984506458044052, -0.0193385761231184, 0.051894281059503555, -0.039846234023571014, -0.02633683569729328, -0.00623916694894433, 0.012332199141383171, -0.009815423749387264, -0.0338059738278389, -0.0025066270027309656, 0.010797778144478798, 0.0346178375184536, 0.002610139548778534, 0.005983430426567793, -0.04923137277364731, -0.009677407331764698, -0.004534254781901836, 0.03221472352743149, 0.014913923107087612, 0.02606080286204815, -0.009125339798629284, -0.0307371336966753, 0.021725453436374664, -0.013070994056761265, -0.00686024222522974, 0.02377134934067726, 0.02287829853594303, -0.006194514688104391, 0.011577166616916656, -0.03078584559261799, 0.022894537076354027, 0.034098245203495026, 0.014816499315202236, -0.028106696903705597, 0.024615686386823654, 0.026564156636595726, 0.008451493456959724, -0.005784523673355579, -0.016261614859104156, 0.017373867332935333, -0.004992957226932049, -0.017763562500476837, -0.015141244977712631, 0.0012046017218381166, -0.05247882381081581, -0.03676115721464157, -0.024972906336188316, 0.020166676491498947, -0.03555959835648537, 0.0270837489515543, -0.018331866711378098, 0.006742522120475769, -0.013070994056761265, 0.004420593846589327, 0.019695796072483063, -0.039229221642017365, -0.0021027252078056335, -0.038254983723163605, 0.02271592617034912, 0.0003133283753413707, 0.06865113228559494, 0.0047128647565841675, 0.003777192672714591, -0.0162859708070755, -0.006295997649431229, 0.029048457741737366, 0.028236594051122665, -0.009547509253025055, -0.034715261310338974, 0.03802766278386116, 0.019159967079758644, -0.03562454879283905, 0.010042745620012283, 0.016756853088736534, 0.02752215601503849, -0.03974881395697594, 0.006052438635379076, -0.0040796115063130856, 0.019598372280597687, -0.029568050056695938, -0.014102060347795486, -0.03702095150947571, 0.036014243960380554, -0.016188548877835274, -0.006446192041039467, -0.024891719222068787, -0.006121446844190359, 0.028837373480200768, 0.0037386291660368443, -0.0014989021001383662, 0.006827767938375473, -0.030201302841305733, 0.010602930560708046, -0.02149813249707222, -0.02308938279747963, -0.03864467889070511, -0.05218655243515968, -0.026499208062887192, 0.01616419292986393, -0.034422989934682846, -0.01674061454832554, -0.005281168967485428, -0.02732730843126774, -0.008155163377523422, 0.07417180389165878, -0.03643641248345375, 0.042444195598363876, -0.02805798500776291, -0.03487763553857803, 0.032961636781692505, -0.048679303377866745, 0.0022285638842731714, -0.02511904016137123, -0.008069918490946293, 0.03737817332148552, 0.03848230466246605, 0.01966332085430622, -0.033448755741119385, -0.009937203489243984, -0.03695600479841232, -0.021969012916088104, -0.029210830107331276, 0.05923352390527725, 0.06748205423355103, -0.01701664924621582, -0.012210419401526451, -0.028837373480200768, -0.01860789954662323, -0.02271592617034912, 0.01739010587334633, -0.029015982523560524, -0.005066025070846081, 0.003901001764461398, 0.026109514757990837, -0.06209128350019455, 0.03164641931653023, 0.011983097530901432, -0.007895367220044136, 0.02092982828617096, 0.019046306610107422, 0.0346178375184536, -0.007692401763051748, 0.0005500371917150915, 0.012527045793831348, -0.033773500472307205, -0.02997398190200329, 0.011163116432726383, -0.024079855531454086, -0.03494258224964142, -0.0033814094495028257, 0.0025999911595135927, 0.013257722370326519, -0.005796701647341251, 0.010351252742111683, -0.01995559222996235, -0.0354297012090683, -0.02973042242228985, 0.016562005504965782, 0.014735313132405281, -0.021514369174838066, 0.015587769448757172, 0.009920965880155563, 0.004980779252946377, -0.011715183034539223, 0.014199484139680862, 0.0046641528606414795, -0.03266936540603638, -0.0009224793175235391, -0.008410900831222534, -0.01258387602865696, 0.010010270401835442, -0.03159770742058754, -0.022667214274406433, 0.026856428012251854, -0.010659760795533657, 0.005029491148889065, -0.05452471971511841, -0.01990688033401966, -0.025914667174220085, 0.03659878298640251, -0.01147974282503128, -0.007046971004456282, -0.01107381097972393, 0.06053250655531883, 0.0019647085573524237, -0.019809456542134285, -0.0003014041285496205, 0.022829586640000343, -0.034747734665870667, 0.03526732698082924, -0.02757086791098118, 0.00488741509616375, 0.01227536890655756, -0.00444900942966342, 0.04413287341594696, -0.031256724148988724, 0.013931568711996078, -0.0333838053047657, 0.02198524959385395, 0.009815423749387264, 0.019208678975701332, -0.019208678975701332, -0.004863059148192406, 0.01726020686328411, -0.013184655457735062, -0.007992791011929512, 0.03484515845775604, 0.024453314021229744, 0.003188591916114092, -0.013549993745982647, -0.02825283259153366, -0.004432771820574999, -0.0073189446702599525, 0.005163448862731457, -0.007550325710326433, 0.0009229867137037218, 0.019565898925065994, -0.015327973291277885, -0.0002912558557000011, -0.015417277812957764, -0.006961725186556578, 0.06641039252281189, 0.0018378548556938767, 0.015823209658265114, 0.02849639020860195, 0.0226022657006979, 0.0003770088660530746, 0.001973841805011034, 0.07436665147542953, -0.019192440435290337, 0.002717711264267564, 0.005106618162244558, -0.021157149225473404, -0.02263474091887474, 0.000616508477833122, -0.011146878823637962, -0.013817908242344856, 0.013688010163605213, -0.0035701675806194544, 0.03757302090525627, -0.02279711328446865, -0.0015049909707158804, -0.010716591961681843, -0.030201302841305733, 0.04465246573090553, -0.019354814663529396, 0.007124097552150488, -0.00523245707154274, -0.022618502378463745, -0.004964542109519243, 0.0338059738278389, 0.0007661957060918212, -0.020377760753035545, -0.009052271954715252, 0.0007377804722636938, 0.04432772099971771, 0.028642525896430016, 0.00635282788425684, 0.0086544593796134, 0.007294589187949896, 0.008881781250238419, 0.022342469543218613, 0.01852671429514885, -0.022894537076354027, 0.0041100564412772655, 0.0018672848818823695, -0.006945488043129444, -0.016318446025252342, 0.012794961221516132, 0.0020803988445550203, -0.013363264501094818, 0.01022135466337204, 0.015401041135191917, -0.018542950972914696, 0.004339407663792372, -0.011211828328669071, -0.0073920125141739845, 0.0026060801465064287, -0.04893910139799118, -0.025476260110735893, 0.03005516715347767, 0.019452236592769623, 0.027505917474627495, 0.028398968279361725, -0.003182502929121256, 0.003976099193096161, -0.009929084219038486, -0.0173089187592268, -0.0403008796274662, 0.007176869083195925, 0.01844552718102932, 0.023430366069078445, -0.040203455835580826, -0.01378543395549059, -0.0028618171345442533, -0.0025878131855279207, -0.00979106780141592, 0.04377565160393715, 0.0026811775751411915, 0.007111920043826103, 0.03607919067144394, 0.009864135645329952, -0.0038116967771202326, -0.017032885923981667, 0.0047737546265125275, -0.00989660993218422, 0.020783692598342896, 0.003432150697335601, -0.031825028359889984, -0.00663697998970747, 0.0039679803885519505, 0.000361025333404541, 0.029503101482987404, 0.010960150510072708, 0.016886750236153603, 0.022115148603916168, 0.03659878298640251, 0.006434014067053795, -0.0017607278423383832, -0.008727527223527431, -0.013655535876750946, 0.03387092426419258, -0.014028992503881454, -0.01898135617375374, -0.019111255183815956, -0.0061052097007632256, -0.01950094848871231, 0.010611048899590969, -0.01624537818133831, 0.06793669611215591, -0.01406958606094122, 0.02658039517700672, -0.015579651109874249, -0.0018246620893478394, 0.026515444740653038, -0.00036787541466765106, 0.018916407600045204, -0.002691325731575489, 0.017292682081460953, 0.006393420975655317, 0.02325175702571869, 0.014978872612118721, 0.018494239076972008, 0.039196744561195374, -0.015806972980499268, -0.0033692314755171537, -0.004282577428966761, -0.015620243735611439, -0.02406361885368824, 0.020783692598342896, 0.016838038340210915, -0.03301034867763519, -0.0019302042201161385, 0.042281825095415115, 0.023917483165860176, -0.027148699387907982, -0.006515200715512037, 0.019679559394717216, 0.020215388387441635, -0.017779799178242683, -0.018169494345784187, -0.024940431118011475, 0.014719076454639435, -0.010481150820851326, -0.006275700870901346, 0.0007261099526658654, 0.008727527223527431, -0.011820725165307522, 0.05488193780183792, -0.02190406434237957, -0.018948882818222046, 0.0513097420334816, -0.0822254866361618, -0.0008428152650594711, -0.015043821185827255, -0.0046763308346271515, -0.014995109289884567, 0.004032929427921772, 0.012567639350891113, 0.016886750236153603, -0.03387092426419258, -0.004233865533024073, -0.04491226002573967, 0.0024031144566833973, -0.004465246573090553, -0.02703503705561161, -0.05153706297278404, 0.05267367139458656, 0.013030401431024075, 0.030477337539196014, -0.017568714916706085, -0.010838370770215988, -0.00867069698870182, -0.011000743135809898, 0.0268726646900177, 0.0026527622248977423, 0.05546648055315018, -0.011617759242653847, -0.034585364162921906, 0.009498797357082367, -0.015392922796308994, 0.0006231048610061407, 0.008751883171498775, -0.0013791522942483425, 0.00877623911947012, 0.048679303377866745, -4.265451934770681e-05, -0.014597296714782715, -0.019695796072483063, 0.015319854952394962, 0.028155408799648285, -0.0006185381207615137, -0.010497388429939747, -0.022293757647275925, -0.03029872663319111, -0.0020184942986816168, 0.02011796459555626, 0.020085491240024567, -0.005841354373842478, -0.007359538227319717, 0.013387620449066162, -0.006555793806910515, 0.03877457603812218, 0.025963379070162773, -0.03594929352402687, 0.001935278414748609, -0.02222880907356739, -0.021075963973999023, 0.024161042645573616, -0.01311158761382103, 0.026190700009465218, -0.0015770439058542252, 0.03594929352402687, 0.03465031087398529, 0.05377780646085739, 0.022699689492583275, 0.02617446333169937, -0.019565898925065994, -0.0005173089448362589, 0.002900380641222, 0.016074886545538902, 0.0073798345401883125, 0.003939565271139145, -0.012941095978021622, -0.0040430775843560696, 0.013728602789342403, 0.0201504398137331, 0.016464581713080406, 0.028106696903705597, 0.014175128191709518, 0.0037020952440798283, 0.04634113982319832, -0.006348768714815378, -0.01553093921393156, 0.02914588153362274, 0.038125086575746536, 0.021887825801968575, -0.03721579909324646, 0.05410255119204521, 0.03981376066803932, -0.013939687982201576, -0.000497266068123281, -0.007209343370050192, -0.015336091630160809, -0.04702310636639595, -0.005800761282444, -0.03916427120566368, 0.02068626880645752, 0.0017414460889995098, -0.0067019290290772915, 0.05394017696380615, -0.033773500472307205, -0.007241818122565746, -0.00426633981987834, 0.022894537076354027, 0.028480153530836105, -0.02133576013147831, 0.019371051341295242, -0.003432150697335601, 0.002200148766860366, 5.0741437007673085e-05, 0.01648893766105175, -0.01455670315772295, 0.003846200881525874, -0.001796246855519712, 0.03559207543730736, 0.056245867162942886, 0.015279261395335197, -0.01799088343977928, -0.03728074952960014, 0.005618092138320208, 0.027635816484689713, 0.01416700892150402, 0.0333838053047657, 0.025378836318850517, 0.04185965657234192, 0.009360780008137226, 0.003194680903106928, 0.027587104588747025, 0.011341726407408714, 0.026158224791288376, 0.0011812606826424599, -0.014426805078983307, 0.018429290503263474, -0.013379502110183239, 0.012957333587110043, -0.024161042645573616, -0.033611126244068146, -0.0047615766525268555, -0.020978540182113647, 0.012015572749078274, 0.015449753031134605, -0.0011203709291294217, 0.02308938279747963, -0.009157815016806126, 0.02443707548081875, 0.013135943561792374, 0.0038238747511059046, -0.005386711098253727, -0.030314963310956955, -0.0020519837271422148, 0.03236085921525955, -0.04572412371635437, -0.013403858058154583, 0.038742102682590485, -0.03575444594025612, -0.00500919483602047, -0.004323170520365238, 0.011390437372028828, -0.0054394821636378765, -0.007708638906478882, 0.04091789573431015, 0.024566974490880966, 0.01971203275024891, -0.021189624443650246, -0.056862883269786835, -0.03370855003595352, 0.04461998865008354, -0.017682375386357307, 0.022342469543218613, -0.0014867241261526942, 0.02841520495712757, 0.02500537969172001, 0.025183990597724915, 0.002853698330000043, -0.007509732618927956, -0.00523245707154274, -0.04185965657234192, -0.0066897510550916195, 0.0039618914015591145, 0.029162118211388588, -0.012462097220122814, -0.020426472648978233, -0.031240487471222878, -0.005289287306368351, -0.0034341805148869753, 0.00623916694894433, -0.026759004220366478, 0.000495743821375072, -0.026239411905407906, 0.013517518527805805, 0.02044270932674408, 0.025346362963318825, -0.03057475946843624, -0.011276776902377605, -0.013980280607938766, -0.04552927613258362, -0.012486453168094158, 0.04075552150607109, -0.014857092872262001, -0.004704745952039957, 0.024047382175922394, -0.0015689252177253366, -0.0024213814176619053, -0.027538392692804337, -0.013509400188922882, 0.021611792966723442, -0.021205861121416092, 0.05884382873773575, 0.02549249865114689, 0.02219633385539055, 0.02104348875582218, 0.020670032128691673, 0.05650566518306732, 0.006730344146490097, -0.02732730843126774, 0.021806640550494194, 0.006320353597402573, 0.019533423706889153, 0.004045107401907444, 0.028447680175304413, -0.028074221685528755, -0.009904728271067142, 0.04458751529455185, 0.009482559747993946, 0.0035762565676122904, -0.01034313440322876, -0.005358295980840921, 0.028967272490262985, 0.04198955371975899, -0.0333838053047657, 0.03754054382443428, 0.0028293426148593426, -0.020458947867155075, 0.010952032171189785, 0.06517636030912399, -0.008630103431642056, 0.037443120032548904, -0.004822466056793928, 0.0566030889749527, -0.011228065006434917, 0.006949547212570906, 0.030590998008847237, 0.024615686386823654, 0.011146878823637962, 0.0005173089448362589, 0.029210830107331276, 0.017211494967341423, -0.00995344016700983, 0.015871921554207802, -0.010732828639447689, -0.053030889481306076, 0.03284797817468643, -0.014637889340519905, -0.008962967433035374, 0.03247452154755592, -0.010724710300564766, -0.00573175260797143, -0.007948138751089573, -1.9345172404428013e-05, 0.031208014115691185, -0.00853267963975668, -0.03822251036763191, -0.004660093691200018, -0.04828961193561554, -0.002167674247175455, 0.0061539215967059135, -0.023203045129776, -0.008946729823946953, -0.004582966677844524, 0.014215720817446709, -0.04108026623725891, -0.00949067808687687, -0.03000645712018013, 0.02349531464278698, -0.03367607668042183, -0.0051756263710558414, -0.022098910063505173, 0.0238200593739748, 0.016724377870559692, 0.01726020686328411, 0.0029450329020619392, 0.03627403825521469, -0.010976388119161129, -0.030428625643253326, -0.0016724377637729049, -0.009588101878762245, -0.015060058794915676, 0.021644268184900284, 0.012591995298862457, 0.025021618232131004, -0.01750376634299755, 0.003424032125622034, -0.0023016314953565598, -0.01982569508254528, 0.008037443272769451, -0.03291292488574982, -0.023560263216495514, -0.027587104588747025, -0.0008220112649723887, 0.05549895390868187, -0.010351252742111683, -0.007639630697667599, 0.000985398655757308, -0.019549660384655, -0.022780874744057655, 0.014337500557303429, -0.0006225974066182971, 0.007412309292703867, 0.00427445862442255, 0.02068626880645752, -0.01852671429514885, 0.017000410705804825, -0.0034585364628583193, 0.021351996809244156, -0.0015557324513792992, -0.004286636598408222, -0.005727693438529968, -0.01062728650867939, 0.006555793806910515, -0.010554218664765358, 0.04575659707188606, 0.015206193551421165, 0.005033550783991814, -0.010083338245749474, -0.014702838845551014, -0.001283758319914341, 0.005585617385804653, -0.028967272490262985, -0.02333294227719307, -0.0022346528712660074, -0.004493661690503359, -0.004936126992106438, 0.016277853399515152, 0.032880451530218124, 0.016294090077280998, -0.006458370015025139, 0.02011796459555626, -0.020572608336806297, 5.051944390288554e-05, 0.0019159966614097357, -0.02703503705561161, 0.008849306963384151, -0.007810121867805719, 0.03831993415951729, -0.009019797667860985, 0.010732828639447689, -0.010870845057070255, 0.024128567427396774, -0.03008764237165451, 0.06598822772502899, -0.0001220965787069872, 0.00719716539606452, -0.016359038650989532, 0.029080932959914207, 0.007298648357391357, -0.0010138138895854354, -0.01739010587334633, -0.029990218579769135, -0.034098245203495026, 0.07527593523263931, -0.022001486271619797, 0.029746660962700844, 0.00906039122492075, 0.001151830656453967, -0.012835553847253323, 0.007351419422775507, -0.008743764832615852, 0.0034524474758654833, 0.004286636598408222, -0.012981689535081387, 0.029941506683826447, -0.0105866938829422, -0.05163448676466942, 0.012056165374815464, -0.007217462174594402, 0.012486453168094158, 0.0023077204823493958, 0.0028049866668879986, 0.005873828660696745, 0.03854725509881973, -0.0032027994748204947, -0.01799088343977928, 0.009092865511775017, 0.0040471372194588184, -0.031208014115691185, -0.02141694538295269, -0.023755110800266266, -0.005524727515876293, -0.020329048857092857, -0.010952032171189785, 0.008500205352902412, 0.020426472648978233, -0.03357865288853645, -0.014321262948215008, -0.007209343370050192, 0.0054881940595805645, -0.0033387865405529737, 0.023722637444734573, -0.01329019758850336, -0.013931568711996078, 0.013079112395644188, 0.03000645712018013, -0.0012492542155086994, -0.027018800377845764, -0.006170158740133047, 0.009579983539879322, 0.0307371336966753, -0.009937203489243984, 0.009003560990095139, 0.0030404268763959408, -0.018055833876132965, 0.03156523406505585, 0.0028922618366777897, 0.010773422196507454, -0.002691325731575489, 0.03111059032380581, 0.017114071175456047, 0.016756853088736534, 0.009044153615832329, -0.024615686386823654, 0.005195923149585724, -0.009214645251631737, 0.03935911878943443, -0.027798188850283623, -0.03159770742058754, 0.03757302090525627, -0.00405931519344449, -0.0031297318637371063, -0.010692236013710499, 0.015904396772384644, 0.03367607668042183, 0.007245877292007208, 0.027099987491965294, 0.009068509563803673, -0.03187374025583267, -0.01685427501797676, -0.0032596299424767494, -0.02344660274684429, 0.009441966190934181, -0.0027562747709453106, 0.005776405334472656, -0.014710957184433937, -0.015547175891697407, 0.014767787419259548, -0.027229884639382362, 2.8700625989586115e-05, -0.03815755993127823, -0.0008336817845702171, 0.02455073781311512, -0.001389300567097962, 0.01158528495579958, 0.02101101353764534, -0.0012380910338833928, -0.009279593825340271, 0.00922276359051466, 0.029259542003273964, 0.0032900748774409294, -0.011333607137203217, 0.003596553113311529, 0.022991960868239403, 0.0066166832111775875, 0.009839779697358608, -0.007400131318718195, 0.03227967396378517, 0.017779799178242683, 0.0692356750369072, 0.014256314374506474, -0.011877555400133133, -0.019890643656253815, -0.045301955193281174, 0.004453068599104881, 0.026515444740653038, 0.0013223218265920877, -0.01828315481543541, -0.013509400188922882, 0.012129233218729496, -0.023949958384037018, -0.0014715016586706042, -0.010562337934970856, -0.004412475507706404, 0.030769607052206993, 0.018997594714164734, -0.0015506583731621504, -0.023625213652849197, -0.004582966677844524, 0.014702838845551014, 0.013574349693953991, 0.001796246855519712, -0.014743432402610779, -0.009888491593301296, -0.012023691087961197, 0.012324079871177673, -0.007274292409420013, -0.041599858552217484, 0.0047128647565841675, -0.009027916938066483, -0.0012563579948619008, -0.030152590945363045, 0.021595556288957596, 0.006174217909574509, 0.01823444291949272, -0.015774497762322426, 0.021465657278895378, -0.004384060390293598, 0.007684283424168825, 0.03141909837722778, 0.0012188092805445194, 0.02039399929344654, 0.029210830107331276, 0.03526732698082924, 0.014443042688071728, -0.03370855003595352, -0.013160299509763718, 0.02039399929344654, -0.003923328127712011, 0.02927577868103981, 0.017568714916706085, 0.04286636784672737, 0.008435256779193878, 0.01494639739394188, -0.0016683784779161215, -0.022813349962234497, -0.005816998425871134, -0.01971203275024891, -0.019371051341295242, -0.01604241319000721, 0.015149363316595554, -0.0007154542836360633, -0.021709216758608818, 0.032068587839603424, 0.009937203489243984, -0.015254905447363853, -0.007753291632980108, 0.029649237170815468, -0.008362188935279846, -0.002742067212238908, 0.004997016862034798, 0.004879296757280827, 0.010383727960288525, -0.014215720817446709, 0.027213647961616516, -0.0014704868663102388, 0.008354070596396923, -0.0015181838534772396, -0.024290941655635834, -0.019841931760311127, 0.013866620138287544, -0.016724377870559692, 0.017779799178242683, -0.026726529002189636, 0.016196666285395622, 0.02333294227719307, 0.010968268848955631, 0.005752049386501312, 0.01693546213209629, -0.009441966190934181, -0.006868361029773951, -0.011731420643627644, 0.00837030727416277, 0.004765635821968317, -0.005256813019514084, 0.03903437405824661, 0.01914372853934765, -0.02938944101333618, -0.0443926677107811, -0.028610052540898323, -0.016350921243429184, 0.013549993745982647, -0.011146878823637962, -0.02443707548081875, -0.013200892135500908, 0.014443042688071728, -0.01074906624853611, 0.0018794628558680415, 0.004599203821271658, 0.01247833389788866, 0.03005516715347767, -0.010554218664765358, 0.01739010587334633, -0.0008428152650594711, -0.01742257922887802, 0.009247119538486004, 0.025216463953256607, -0.02630436047911644, -0.030477337539196014, -0.018883932381868362, 0.015806972980499268, -0.006827767938375473, 0.025135278701782227, 0.029210830107331276, 0.009677407331764698, 0.013209010474383831, 0.03314024582505226, 0.013095350004732609, -0.009198407642543316, -0.048711780458688736, 0.004142530728131533, 0.00922276359051466, 0.00048305848031304777, -0.016537649556994438, 0.021709216758608818, -0.029097169637680054, 0.007030733395367861, 0.012104877270758152, -0.00022579939104616642, 0.02039399929344654, 0.015449753031134605, -0.007525969762355089, 0.001497887191362679, 0.01836434006690979, -0.02011796459555626, -0.04893910139799118, -0.01652953028678894, 0.01958213560283184, 0.0018693145830184221, -0.026499208062887192, 0.0033083416055887938, -0.0022569792345166206, -0.021969012916088104, 0.03757302090525627, -0.025589922443032265, -0.0073311226442456245, 0.0014238046715036035, 0.015847565606236458, -0.013931568711996078, -0.03403329849243164, 0.009685525670647621, -0.038092613220214844, 0.011406674981117249, -0.007128157187253237, 0.03273431584239006, 0.05419997498393059, 0.008313477039337158, 0.010692236013710499, -0.02633683569729328, 0.03968386352062225, 0.011650233529508114, 0.017130309715867043, 0.0008179519791156054, -0.019858168438076973, -0.02141694538295269, 0.027944324538111687, -0.00962869543582201, 0.011999335139989853, -0.0014187305932864547, 0.02128704823553562, 0.02235870622098446, -0.013330790214240551, 0.018575426191091537, -0.007996850647032261, -0.0002412755275145173, 0.014897685497999191, 0.03594929352402687, -0.014629771001636982, 0.006109268870204687, -0.035072483122348785, 0.012843672186136246, -0.009994033724069595, -0.03154899552464485, 0.006949547212570906, -0.0008808713755570352, -0.00020499540551099926, 0.0037264511920511723, -0.04825713485479355, 0.02312185801565647, -0.024826770648360252, -0.01877027191221714, 0.026807716116309166, 0.04205450415611267, -0.0009651021100580692, 0.0032332444097846746, 0.012161707505583763, -0.018104543909430504, 6.66377763991477e-06, 0.001398434047587216, -0.005532846320420504, -0.017698613926768303, -0.02830154448747635, -0.00023924587003421038, 0.01742257922887802, -0.0023503433912992477, -0.0019931236747652292, 0.008017146959900856, 0.022829586640000343, 0.0025330125354230404, -0.022569790482521057, 0.004883355926722288, -0.007911604829132557, -0.02536259964108467, -0.020799929276108742, 0.019890643656253815, -0.02557368390262127, -0.008792475797235966, 0.005260872188955545, -0.0072377584874629974, 0.0009356720838695765, -0.022098910063505173, -0.024242229759693146, -0.0006951576797291636, 0.04088541865348816, 0.019841931760311127, -0.0006291938479989767, -0.0382874570786953, 0.0012685359688475728, 0.016708141192793846, -0.012145470827817917, -0.018575426191091537, 0.008451493456959724, 0.020377760753035545, -0.005800761282444, 0.032555706799030304, -0.016472700983285904, -0.0025066270027309656, 0.004294755402952433, 0.0015496434643864632, -0.006742522120475769, 0.024907955899834633, 0.020085491240024567, -0.01130113285034895, 0.02101101353764534, 0.018137019127607346, 0.009961558505892754, 0.0029612702783197165, -0.0162859708070755, -0.037767864763736725, 0.008589510805904865, 0.0006799352704547346, 0.03429309278726578, -0.018088307231664658, -0.01117935311049223, 0.018299391493201256, 0.0038421417120844126, -0.04841950908303261, 0.027944324538111687, 0.02092982828617096, -0.016310326755046844, -0.004574847873300314, 0.0014390271389856935, -0.01231596153229475, 0.00849208701401949, -0.0039375354535877705, 0.01011581253260374, -0.0018195878947153687, -0.004509898833930492, -0.019371051341295242, 0.02287829853594303, 0.02922706864774227, -0.0036006122827529907, -0.007103801239281893, 0.015441633760929108, 0.021839113906025887, 0.012161707505583763, -0.0012492542155086994, -0.014102060347795486, 0.025135278701782227, -0.0012076462153345346, -0.014581059105694294, -0.02422599121928215, -0.022163860499858856, 0.011349844746291637, 0.018737798556685448, 0.012900503352284431, 0.002559398068115115, -0.00906039122492075, 0.01722773350775242, 0.01682180166244507, 0.004154708702117205, 0.010335016064345837, 0.004201390780508518, -0.0048346440307796, -0.04923137277364731, -0.015003228560090065, -0.00877623911947012, 0.013712366111576557, 0.014889567159116268, -0.009076627902686596, 0.037767864763736725, 0.046438563615083694, -0.0031540878117084503, -0.008914255537092686, 0.004118175245821476, 0.005585617385804653, -0.03721579909324646, 0.013614942319691181, -0.021595556288957596, -0.011203709058463573, 0.013801670633256435, -0.025151515379548073, -0.0038807052187621593, 0.010489270091056824, 0.024989143013954163, 0.006405598949640989, -0.006251344922930002, 0.009092865511775017, -0.023625213652849197, -0.007830418646335602, 0.010481150820851326, 0.03037991374731064], "index": 56}, {"title": "Thomas P. Hughes", "text": "Thomas Parke Hughes (September 13, 1923 - February 3, 2014) was an American historian of technology. He was an emeritus professor of history at the University of Pennsylvania and a visiting professor at MIT and Stanford.He received his Ph.D. from the University of Virginia in 1953.He, along with John B. Rae, Carl W.", "vector": [-0.0011566150933504105, 0.02045382373034954, -0.032816026359796524, 0.03800065815448761, 0.04102752357721329, 0.0012109337840229273, -0.013973033986985683, 0.005210855044424534, 0.004982341546565294, 0.052116043865680695, -0.013133902102708817, -0.006492028944194317, 0.015688756480813026, 0.03257627412676811, 0.003187949536368251, 0.008166545070707798, -0.07078671455383301, 0.0034164628013968468, -0.06113670393824577, 0.01801135204732418, 0.05613188445568085, -0.018071290105581284, -0.07528205960988998, 0.007567165419459343, 0.031197700649499893, 0.03095794841647148, 0.022536667063832283, 0.004802527837455273, 0.021472768858075142, 0.018311042338609695, -0.014849626459181309, 0.061196643859148026, 0.03016377054154873, -0.047380946576595306, 0.013508514501154423, -0.030133802443742752, -0.02745157852768898, -0.00461896788328886, -0.021292954683303833, 0.03566307574510574, 0.016273152083158493, -0.014752226881682873, -0.02067859098315239, 0.026597462594509125, -0.006877879146486521, 0.006896609906107187, -0.03067324310541153, -0.018535809591412544, 0.01612330786883831, 0.013298731297254562, -0.007619611453264952, -0.046272095292806625, -0.026357712224125862, 0.013366161845624447, -0.032905932515859604, -0.016333090141415596, 0.0715659037232399, 0.06982770562171936, -0.010017129592597485, 0.010211927816271782, -0.007649580482393503, 0.031197700649499893, -0.013043995015323162, 0.006769241765141487, 0.04741091653704643, 0.0039933654479682446, 0.00921545922756195, 0.023016171529889107, -0.014579905197024345, -0.004390454385429621, 0.04192659258842468, -0.03725143149495125, 0.013276254758238792, 0.027511516585946083, 0.04417426511645317, -0.02096329629421234, 0.014572412706911564, 0.010122020728886127, -0.0023038648068904877, -0.001865568570792675, -0.007331159897148609, -0.03269615024328232, -0.021772459149360657, 0.00305683515034616, 0.0005694105057045817, -0.0015583866043016315, 0.028725260868668556, -0.05652148276567459, 0.02578830160200596, 0.05568234995007515, 0.010002144612371922, 0.03707161918282509, 0.03749118372797966, -0.042675815522670746, -0.054843220859766006, 0.016887515783309937, 0.014917056076228619, -0.006394629366695881, 0.03635236248373985, -0.02906990423798561, 0.003877235809341073, 0.011987589299678802, 0.03722146525979042, 0.014744734391570091, 0.04956867918372154, -0.08019696921110153, -0.03725143149495125, 0.028545446693897247, 0.06233546510338783, 0.06020766496658325, 0.002470567123964429, 0.03647223860025406, -0.012144926004111767, 0.0019386179046705365, -0.06287490576505661, -0.008099114522337914, -0.012796751223504543, 0.03854009881615639, -0.03602270409464836, 0.012407154776155949, -0.0009739916422404349, 0.017471911385655403, 0.020393885672092438, 0.01897035911679268, -0.0035232272930443287, 0.011118489317595959, -0.03016377054154873, -0.0024761862587183714, -0.009859791956841946, -0.03626245632767677, -0.015014455653727055, 0.05930859595537186, 0.03374506160616875, -0.030778134241700172, -0.047560758888721466, -0.004693890456110239, 0.046541813760995865, 0.0071738227270543575, 0.0024537097197026014, 0.02478433959186077, -0.012070003896951675, 0.054093994200229645, -0.04075780138373375, -0.08337368071079254, -0.055532507598400116, -0.03964895009994507, -0.025158952921628952, -0.002210211707279086, 0.01603339985013008, 0.06695068627595901, -0.017292097210884094, -0.012032542377710342, -0.03353527933359146, -0.014534952118992805, -0.013785727322101593, -0.01598844677209854, -0.02054373174905777, -0.002099701203405857, -0.02016911841928959, 0.01583860255777836, -0.01420529279857874, -0.012174895033240318, -0.037101589143276215, 0.013673343695700169, -0.025158952921628952, -0.05831962078809738, 0.03623248636722565, -0.007342398166656494, -0.0010788830695673823, 0.016707701608538628, -0.020199088379740715, -0.008990691974759102, 0.051336850970983505, -0.0026597464457154274, -0.008511188440024853, 0.0010217546951025724, -0.019749553874135017, 0.03593279793858528, -0.014287707395851612, 0.016692718490958214, -0.017891475930809975, -0.015553897246718407, 0.0072562373243272305, 0.021532706916332245, 0.019779521971940994, 0.014804672449827194, 0.025084029883146286, 0.07875846326351166, -0.049538712948560715, -0.04702131822705269, -0.030643275007605553, -0.003806059481576085, 0.0016379916341975331, 0.008248959667980671, 0.0015040677972137928, -0.02629777416586876, 0.03173714131116867, -0.0011360113276168704, -0.03722146525979042, 0.013201332651078701, -0.012871673330664635, -0.005169647745788097, 0.022416790947318077, 0.030043894425034523, -0.05115703493356705, -0.012287278659641743, 0.03140748292207718, 0.018490856513381004, -0.033924877643585205, 0.005031041335314512, -0.035303451120853424, -0.027526501566171646, 0.020274009555578232, 0.010968644171953201, -0.04072783514857292, 0.013868141919374466, -0.014017987065017223, 0.03955904394388199, 0.032726116478443146, -0.021337907761335373, 0.020513761788606644, 0.011305795051157475, 0.024724403396248817, -0.01754683442413807, -0.016917485743761063, -0.006937817204743624, -0.016363058239221573, 0.011380717158317566, 0.0072824605740606785, 0.0358428917825222, 0.0019386179046705365, 0.01718720607459545, -0.0012596333399415016, 0.055562473833560944, -0.0003273173642810434, 0.0007613992202095687, 0.014175323769450188, -0.026792261749505997, -0.02339078299701214, -0.03173714131116867, -0.02381034940481186, 0.016752656549215317, 0.011568023823201656, -0.0032403951045125723, 0.01068393886089325, -0.004926149733364582, -0.015074393711984158, -0.05861930921673775, -0.011350748129189014, 0.04941883683204651, 0.01621321402490139, -0.018775561824440956, 0.01515680830925703, -0.004547791555523872, -0.021337907761335373, 0.04030826687812805, -0.03994864225387573, -0.026058021932840347, -0.0348239466547966, -0.017696678638458252, -0.012489569373428822, 0.012871673330664635, -0.01072889193892479, 0.036682020872831345, -0.05643157660961151, 0.03164723515510559, 0.021502738818526268, 0.017771601676940918, 0.01723215915262699, -0.0468115359544754, -0.017247144132852554, -0.04956867918372154, 0.0068329256027936935, -0.02698705904185772, -0.016617795452475548, -0.03311571478843689, -0.052985142916440964, -0.034614164382219315, -0.027301734313368797, 0.054603468626737595, -0.0466916598379612, -0.03500375896692276, -0.017696678638458252, -0.011867713183164597, 0.01952478662133217, -0.026447618380188942, 0.019869428128004074, 0.01658782549202442, 0.03215670958161354, -0.08403299748897552, -0.01598844677209854, -0.04564274474978447, 0.012631922028958797, 0.0026560002006590366, -0.01865568570792675, -0.03458419442176819, 0.004004604183137417, -0.02012416534125805, -0.0537043996155262, -0.03578295186161995, 0.08199510723352432, 0.030778134241700172, -0.0233458299189806, -0.0003952158149331808, -0.04822007566690445, -0.05043778195977211, 0.00872846320271492, 0.02463449537754059, 0.03653217852115631, -0.03919941559433937, -0.0030081355944275856, 0.016363058239221573, 0.011935143731534481, -0.0208584051579237, 0.05355455353856087, -0.0010704542510211468, 0.026702355593442917, 0.05112706869840622, -0.02109815739095211, -0.004626460373401642, 0.0037760904524475336, -0.0031542344950139523, -0.05790005624294281, 0.014842133969068527, 0.04120733588933945, -0.04968855530023575, 0.007226268760859966, 0.012212356552481651, -0.0099496990442276, 0.012519538402557373, -0.03925935551524162, -0.024035116657614708, 0.015733711421489716, -0.021248001605272293, 0.11124482750892639, -0.058049898594617844, -0.0028020988684147596, 0.05592210218310356, -0.08181529492139816, 0.019554754719138145, 0.01841593347489834, 0.042316190898418427, -0.03961898013949394, -0.0030868041794747114, 0.00893824640661478, -0.04150702804327011, 0.030298631638288498, 0.06092692166566849, -0.019584722816944122, 0.019779521971940994, 0.0006906911730766296, -0.07887833565473557, 0.03353527933359146, 0.028455540537834167, -0.02174248918890953, -0.038809821009635925, 0.07576156407594681, -0.0014375741593539715, 0.052895236760377884, -0.04630206152796745, 0.061376456171274185, 0.008915768936276436, 0.02509901486337185, 0.04699134826660156, -0.0025286320596933365, 0.027811206877231598, -0.02225196175277233, -0.018221136182546616, -0.04486355185508728, -0.0018824260914698243, -0.024949170649051666, 0.03071819618344307, 0.0022570383735001087, -0.0308081042021513, 0.011553038842976093, 0.0030680736526846886, -0.0006658731144852936, 0.0039933654479682446, -0.022761434316635132, -0.0010301833972334862, -0.04546293243765831, 0.007746979594230652, 0.04063792526721954, 0.03542332723736763, -0.019359955564141273, -0.020184103399515152, -0.025413688272237778, -0.005394414998590946, 0.020528746768832207, -0.014145354740321636, 0.013598421588540077, -0.02915981039404869, -0.0052295858040452, -0.01810126006603241, 0.02915981039404869, -0.030373554676771164, 0.005866426508873701, 0.021218033507466316, 0.014130370691418648, -0.0018777434015646577, 0.013628390617668629, 0.021218033507466316, -0.02694210596382618, -0.04504336789250374, 0.017786584794521332, -0.004308039788156748, -0.03215670958161354, 0.011732853017747402, -0.04408435896039009, 0.002376914257183671, -0.0006335627986118197, 0.009155521169304848, 0.017217174172401428, -0.030987918376922607, -0.011013597249984741, -0.0005324175581336021, -0.014759719371795654, 0.017861507833003998, 0.026417650282382965, -0.025323782116174698, 0.07594137638807297, 0.033325497061014175, 0.03713155537843704, 0.005664135795086622, 0.04213637486100197, 0.04144708812236786, -0.023825332522392273, -0.00596382562071085, -0.002099701203405857, 0.021352892741560936, -0.017022376880049706, -0.01994435116648674, 0.003577546216547489, 0.05996791273355484, -0.0198993980884552, -0.023375798016786575, -0.014594890177249908, 0.04513327404856682, 0.026222851127386093, 0.045343056321144104, -0.004780051298439503, -0.009620040655136108, -0.0551728792488575, 0.012362201698124409, -0.10411220788955688, 0.03329552710056305, -0.0795975923538208, -0.053914181888103485, 0.00016564881661906838, 0.03266618028283119, -0.010571555234491825, -0.023600565269589424, -0.0323365218937397, -0.019359955564141273, -0.016108322888612747, -0.03910950943827629, 0.0038472667802125216, -0.00020720735483337194, -0.005570482928305864, 0.016452966257929802, 0.016887515783309937, 0.05361449345946312, 0.009792361408472061, -0.032036833465099335, -0.05061759427189827, -0.010174466297030449, 0.009073106572031975, -0.012579476460814476, -0.007327413652092218, 0.030613305047154427, 0.042406097054481506, 0.039079539477825165, 0.05115703493356705, 0.04657178372144699, -0.0019002201734110713, 0.03329552710056305, -0.0012128069065511227, 0.013928079977631569, 0.0005562990554608405, -0.02016911841928959, 0.009987160563468933, 0.031197700649499893, 0.028575414791703224, -0.005956333130598068, -0.021667568013072014, -0.005926364567130804, -0.007372367195785046, -0.009080599062144756, -0.013276254758238792, 0.009807346388697624, 5.581135701504536e-05, 0.014707273803651333, -0.0023319607134908438, 0.014602381736040115, -0.017202191054821014, 0.018685653805732727, -0.03266618028283119, 0.03473404049873352, -0.018730608746409416, -0.011395702138543129, 0.02827572636306286, 0.08019696921110153, 0.014062940143048763, -0.049808431416749954, -0.004843735136091709, 0.014602381736040115, 0.03824041038751602, 0.04495345801115036, -0.024065084755420685, 0.010601524263620377, 0.010653969831764698, -0.011485609225928783, 0.017696678638458252, 0.02496415376663208, 0.021292954683303833, -0.002871402306482196, -0.0317671112716198, 0.02607300691306591, 0.01805630698800087, 0.025713378563523293, 0.03125763684511185, 0.03860003873705864, -0.011478116735816002, 0.016602810472249985, -0.01570374146103859, -0.0021914811804890633, -0.04555283859372139, -0.013201332651078701, 0.016917485743761063, -0.02478433959186077, -0.024065084755420685, 9.406277240486816e-05, -0.0169025007635355, 0.004285563249140978, -0.014864610508084297, 0.04270578548312187, 0.020199088379740715, 0.02842557057738304, 0.025998083874583244, -0.03997860848903656, 0.011125980876386166, 0.013133902102708817, 0.05628173053264618, 0.0015714979963377118, -0.026447618380188942, 0.011096011847257614, 0.007368620950728655, 0.007053947076201439, -0.004888688679784536, 0.016183245927095413, -0.02072354406118393, -0.004180671647191048, 0.014549936167895794, 0.004169433377683163, 0.0327860563993454, -0.006203577388077974, -0.027481548488140106, -0.004221878945827484, -0.025578517466783524, 0.003884728066623211, 0.006645619869232178, 0.0009332525660283864, -0.010009637102484703, -0.042675815522670746, -0.04123730584979057, -0.00710639264434576, -0.00953762512654066, 0.031167732551693916, -0.01783153787255287, -0.003575673094019294, -0.013043995015323162, -0.005810234695672989, -0.03857006877660751, 0.025908177718520164, -0.017157236114144325, 0.030088849365711212, -0.011845236644148827, -0.019359955564141273, -0.051936231553554535, 0.019929366186261177, -0.012639414519071579, 0.012886658310890198, 0.020333947613835335, 0.036322396248579025, -0.02874024398624897, 0.00218211580067873, -0.011830251663923264, -0.035723015666007996, -0.003408970544114709, -0.02565344050526619, -0.02445468120276928, -0.015673773363232613, -0.00682917982339859, 0.02496415376663208, 0.05352458357810974, 0.033085744827985764, 0.00022230891045182943, -0.032306551933288574, 0.010489140637218952, 0.03311571478843689, 0.008503695949912071, 0.04390454664826393, 0.0144150760024786, 0.012826720252633095, -0.019030297175049782, -0.004131972324103117, 0.009635024704039097, -0.07797926664352417, -0.0023300875909626484, -0.007308683358132839, 0.000565196096431464, -0.043365102261304855, 0.008001715876162052, -0.018161198124289513, 0.04935889691114426, 0.011687899008393288, 0.01241464726626873, 0.01759178750216961, 0.019180143252015114, 0.009118059650063515, 0.01980949006974697, 0.02118806354701519, 0.032905932515859604, -0.028245756402611732, 0.030643275007605553, -0.0144150760024786, -0.013336192816495895, 0.004941134247928858, -0.025413688272237778, 0.007278714329004288, -0.009125552140176296, 0.013530991040170193, 0.009275397285819054, 0.004929895978420973, -0.004420423414558172, -0.007226268760859966, -0.00598630215972662, 0.011178426444530487, 0.035033728927373886, -0.020528746768832207, -0.00012502681056503206, -0.009859791956841946, -0.032396458089351654, 0.02285134233534336, -0.00948517955839634, 0.001955475425347686, 0.008930753916501999, -0.0035344657953828573, -0.010204435326159, 0.007136361673474312, 0.016932468861341476, -0.019015314057469368, -0.025173937901854515, 0.019000329077243805, 0.014092909172177315, -0.01515680830925703, 0.0012680621584877372, 0.015074393711984158, 0.01050412468612194, -0.01907525025308132, -0.028979996219277382, -0.03569304570555687, 0.02160762995481491, 0.05661138892173767, 0.00992722250521183, -0.007125123403966427, -0.025353750213980675, -0.003236649092286825, -0.03215670958161354, 0.027106935158371925, -0.005750296637415886, 0.004776305053383112, -0.016647763550281525, 0.009305366314947605, -0.024154992774128914, -0.03377503156661987, -0.03476400673389435, 0.0258931927382946, 0.013126409612596035, -0.0056491512805223465, 0.02671733871102333, 0.008893292397260666, -0.019359955564141273, -0.025683410465717316, -0.02800600416958332, 0.013800712302327156, -0.028994981199502945, 0.028725260868668556, -0.03260624408721924, 0.0007108265999704599, -0.039678920060396194, 0.010833784006536007, 0.0003577546158339828, 0.0179214458912611, 0.013029010966420174, -0.0011715994914993644, 0.011118489317595959, -0.0482800155878067, -0.004412931390106678, -0.025113999843597412, -0.02671733871102333, 0.02892005816102028, -0.004555284045636654, 0.006484536454081535, 0.011538054794073105, 0.016243183985352516, 0.01169539149850607, -0.048160139471292496, -0.04090764746069908, -0.017666708678007126, 0.026732323691248894, 0.008720970712602139, -0.01374826580286026, 0.009934714064002037, 0.018116243183612823, 0.021248001605272293, -0.004251847974956036, 0.009013168513774872, -0.04887939617037773, 0.014115385711193085, -0.0010601524263620377, 0.021937288343906403, -0.004461630713194609, 0.01490207202732563, -0.0012989676324650645, -0.042346157133579254, -0.02611795999109745, 0.04141712188720703, -0.050048183649778366, -0.002416248433291912, 0.0051359329372644424, -0.003176711034029722, 0.05292520672082901, 0.005622928496450186, 0.02698705904185772, 0.024904215708374977, 0.013590929098427296, -0.02569839358329773, -0.013388638384640217, 0.02307610958814621, 0.04836992174386978, -0.014100401662290096, 0.014295199885964394, 0.003963396418839693, -0.043544918298721313, -0.006480790209025145, 0.016198229044675827, 0.011223380453884602, -0.0009360621334053576, -0.009410257451236248, -0.0004570268210954964, -0.015523928217589855, -0.0547233447432518, -0.03671199083328247, 0.01068393886089325, -0.03200686350464821, 0.04363482445478439, -0.019644660875201225, 0.011260841973125935, -0.018685653805732727, -0.04357488453388214, 0.024859262630343437, -0.015508943237364292, 0.015598850324749947, -0.024574557319283485, -0.004289309028536081, -0.007342398166656494, -0.006222308147698641, 0.017531849443912506, 0.011230872943997383, 0.01093867514282465, 0.0033565249759703875, 0.030927980318665504, 0.004761320538818836, 0.0308081042021513, -0.01574869453907013, 0.014280215837061405, -0.00819651409983635, -0.013103933073580265, -0.008653541095554829, -0.026657400652766228, -0.02165258303284645, -0.06898857653141022, 0.002747780177742243, -0.013418607413768768, 0.010376757010817528, -0.019060267135500908, 0.008885800838470459, -0.007593388669192791, -0.00829391274601221, -0.04423420503735542, 0.0072562373243272305, 0.01861073262989521, -0.002253292128443718, 0.02169753611087799, 0.012624429538846016, 0.007289952598512173, 0.011987589299678802, 0.0233458299189806, 0.01038424950093031, 0.0008105670567601919, 0.006136147305369377, -0.0024387252051383257, -0.00624103844165802, 0.016138290986418724, -0.022821372374892235, 0.03248636797070503, -0.04570268467068672, -0.00644707540050149, -0.02915981039404869, 0.014939532615244389, 0.015164299868047237, 0.02805095911026001, 0.02458954229950905, 0.00712886918336153, 0.024529604241251945, 0.0238553024828434, -0.004678905941545963, -0.0342545360326767, 0.005053517874330282, -0.02336081489920616, 0.0022589112631976604, -0.01574869453907013, 0.013823188841342926, 0.014295199885964394, 0.018685653805732727, 0.031946923583745956, -0.01439259946346283, 0.015553897246718407, -0.0008377264603041112, -0.01796639896929264, 0.04417426511645317, -0.022791404277086258, -0.053494617342948914, -0.018251104280352592, 0.02836563251912594, -0.015958478674292564, 0.03422456607222557, 0.02533876709640026, 0.02270149625837803, 0.026972075924277306, -0.00558546744287014, -0.018400948494672775, -0.018850483000278473, 0.003575673094019294, -0.007361128926277161, -0.007421066984534264, -0.04830998554825783, -0.0007033343426883221, -0.0238553024828434, 0.02256663702428341, -0.03266618028283119, -0.029968973249197006, 0.0047201132401824, 0.04111742973327637, 0.017801569774746895, -0.0029875319451093674, 0.020259026437997818, -0.013883126899600029, -0.012534522451460361, 0.03434444218873978, -0.026687370613217354, -0.0010114528704434633, -0.021712521091103554, 0.010931182652711868, 0.005300762131810188, 0.0317671112716198, 0.002629777416586876, 0.04947877302765846, -0.018341010436415672, 0.003925935365259647, 0.03895966336131096, -0.0055779749527573586, -0.0646730437874794, 0.009177997708320618, -8.563399751437828e-05, -0.019794506952166557, -0.015643803402781487, 0.03662208467721939, 0.02270149625837803, -0.014130370691418648, -0.013793219812214375, -0.014010494574904442, 0.0002183286560466513, 0.012084987945854664, -0.004499092232435942, -0.0025473625864833593, 0.006585681810975075, 0.0019779521971940994, 0.05067753419280052, -0.002612919779494405, -0.0005085360025987029, -0.002685969229787588, -0.03007386438548565, 0.006608158349990845, 0.00013111425505485386, 0.0009510466479696333, 0.012092480435967445, -0.019374940544366837, -0.020094195380806923, 0.007394844200462103, 0.010878737084567547, -0.014250246807932854, -0.013156378641724586, -0.007604626938700676, -0.06107676774263382, 0.041986532509326935, 0.013186347670853138, 0.010054590180516243, -0.01142567116767168, -0.0045140767470002174, 0.047830481082201004, -0.03224661573767662, -0.044563863426446915, -0.002749653300270438, 0.025818269699811935, 0.0026822229847311974, -0.02791609801352024, -0.024199945852160454, -0.04441401734948158, -0.010668953880667686, -0.0006611904827877879, 0.0149245485663414, 0.01658782549202442, 0.014025479555130005, -0.004637698642909527, -0.0012605699012055993, -0.031077824532985687, 0.010122020728886127, -0.01301402598619461, -0.032036833465099335, 0.016363058239221573, 0.0027983528561890125, -0.02045382373034954, 0.01847587153315544, 0.005169647745788097, -0.011657929979264736, -0.023840317502617836, -0.011822760105133057, 0.01340362336486578, -0.00997217558324337, -0.006799210794270039, -0.007934285327792168, 0.01612330786883831, -0.029744205996394157, -0.0045140767470002174, -0.04039817675948143, 0.04015842452645302, 0.003500750521197915, 0.02312106266617775, 0.0003898307913914323, 0.03623248636722565, 0.024394743144512177, 0.03536338731646538, -0.02243177592754364, -0.025593502447009087, 0.00446912320330739, -0.025593502447009087, -0.001136947888880968, 0.01068393886089325, -0.020004289224743843, -0.008091622963547707, -0.017217174172401428, -0.010796322487294674, -0.02141283079981804, -0.0061998311430215836, -0.0007155092316679657, -0.03416462987661362, 0.0020603667944669724, 0.022087132558226585, -0.04675159603357315, 0.06191589683294296, 0.0009037518175318837, -0.008765924721956253, -0.026462603360414505, -0.017022376880049706, -0.0027384147979319096, 0.0422862209379673, 0.003770471317693591, 0.023106077685952187, 0.012287278659641743, 0.026702355593442917, 0.011545546352863312, -0.031197700649499893, 0.029444515705108643, 0.04914911463856697, -0.047980327159166336, 0.03946913778781891, -0.01717222109436989, -0.045582808554172516, -0.03467410057783127, -0.008698494173586369, 0.03317565098404884, -0.05199616774916649, 0.025248859077692032, -0.0014853371540084481, 0.02247672900557518, -0.028620369732379913, 0.002554854843765497, -0.0072562373243272305, -0.0002458392409607768, 0.040607959032058716, 0.009290381334722042, -0.024244898930191994, -0.009957191534340382, 0.005008564796298742, 0.013868141919374466, 0.03782084211707115, -0.014834641478955746, 0.04195656254887581, -0.014047956094145775, -0.011500593274831772, 0.03946913778781891, -0.024904215708374977, -0.022551652044057846, -0.027466563507914543, -0.02036391757428646, 0.0213678777217865, 0.005746550392359495, 0.014055448584258556, -0.02911485731601715, 0.014744734391570091, 0.006162370089441538, -0.014632350765168667, -0.010174466297030449, 0.02496415376663208, 0.008488711901009083, 0.0040645417757332325, 0.004555284045636654, -0.020783482119441032, 0.0037255180068314075, 0.014107894152402878, 0.03173714131116867, -0.01616826094686985, -0.024469666182994843, 0.024110037833452225, -0.010092051699757576, -0.020978281274437904, 0.011867713183164597, 0.022551652044057846, -0.0208584051579237, -0.009050630033016205, -0.026837214827537537, 0.015823617577552795, 0.0333554670214653, -5.256276926957071e-05, -0.014819657430052757, 0.010863753035664558, 0.02667238563299179, -0.040697865188121796, -0.015808632597327232, 0.0032816024031490088, 0.01579364947974682, -0.02611795999109745, -0.016647763550281525, 0.014115385711193085, -0.0422862209379673, -0.002822702517732978, 0.01374826580286026, -0.0075034815818071365, -0.012129941955208778, -0.044054388999938965, -0.006919086445122957, -0.010871244594454765, 0.01169539149850607, 0.015718726441264153, 0.02141283079981804, -0.011036073789000511, 0.00026644289027899504, 0.02234186977148056, 0.004446646198630333, -0.013208825141191483, -0.002316976198926568, 0.013665851205587387, -0.007458528038114309, 0.03155732899904251, 0.006638127379119396, -0.016557857394218445, -0.01787649281322956, 0.005120948422700167, 0.011163442395627499, -0.020648622885346413, 0.0005108773475512862, 0.011081027798354626, -0.027436595410108566, 0.022716481238603592, 0.042256250977516174, -0.016228199005126953, -0.03128760680556297, -0.020348932594060898, -0.007301190868020058, -0.0021409085020422935, 0.0002910268085543066, 0.014827148988842964, -0.020438838750123978, 0.009620040655136108, -0.018505841493606567, 0.03542332723736763, -0.029639314860105515, -0.0038397745229303837, -0.022686513140797615, 0.002431232947856188, -0.03071819618344307, -0.004233117215335369, 0.04063792526721954, -0.011066042818129063, -0.00423686346039176, 0.00048699582112021744, -0.02265654318034649, -0.026147928088903427, 0.03185701742768288, 0.037431247532367706, -0.03746121749281883, -0.02929467149078846, 0.01648293435573578, 0.004180671647191048, 0.0029968973249197006, -0.02467944845557213, -0.004633952397853136, 0.012219849042594433, 0.008578618057072163, 0.019494816660881042, 0.02354062721133232, 0.012564491480588913, -0.042406097054481506, -0.008099114522337914, 0.008533664979040623, 0.004248101729899645, -0.02800600416958332, -0.001126646064221859, -0.028290709480643272, -0.014834641478955746, -0.01293910387903452, 0.01038424950093031, 0.00020170523202978075, -0.03446431830525398, 0.010976136662065983, -0.019359955564141273, 0.003407097654417157, -0.0218773502856493, -0.017307082191109657, -0.015044424682855606, -0.016452966257929802, -0.018535809591412544, 0.011800282634794712, 0.009305366314947605, 0.013261270709335804, 0.06605161726474762, -0.0014553682412952185, -0.013328700326383114, -0.011560531333088875, -0.035123635083436966, -0.013231301680207253, 0.04753078892827034, 0.007368620950728655, 0.02270149625837803, 0.0038397745229303837, 0.024080069735646248, -0.023510659113526344, -0.015111854299902916, 0.010781337507069111, 0.006668096408247948, -0.009590071626007557, -0.019060267135500908, -0.014504983089864254, 0.019704598933458328, 0.005488068331032991, -0.009964683093130589, -0.00285641779191792, 0.0017466292483732104, -0.010668953880667686, -0.024529604241251945, 0.007177568972110748, 0.01814621314406395, -0.004510330501943827, -0.02216205559670925, 0.021128125488758087, 0.03395484760403633, 0.01874559186398983, 0.024289852008223534, 0.017486896365880966, -0.017262129113078117, -0.010301833972334862, -0.002341326093301177, 0.01708231493830681, -0.007499735336750746, 0.014489998109638691, -0.015958478674292564, 0.025953130796551704, 0.02951943874359131, -0.03665205463767052, 0.014497490599751472, 0.00842877384275198, 0.008578618057072163, -0.02343573607504368, -0.021262986585497856, -0.029789159074425697, -0.006668096408247948, -0.006188592873513699, 0.020393885672092438, -0.033325497061014175, -0.004330516792833805, -0.016288137063384056, 0.0012409028131514788, 0.006480790209025145, -0.017217174172401428, -0.044054388999938965, -0.032036833465099335, -0.004506584256887436, -0.03179708123207092, 0.009942206554114819, 0.008848339319229126, -0.0009721185779199004, -0.019270049408078194, -0.01592850871384144, -0.012032542377710342, -0.006499520968645811, -0.0263427272439003, -0.012287278659641743, 0.044653769582509995, -0.009575086645781994, 0.02960934489965439, 0.0005113455699756742, -0.04321525990962982, -0.0007735741091892123, 0.037521153688430786, -0.041656870394945145, 0.0031542344950139523, 0.026792261749505997, -0.033235590904951096, 0.0013710805214941502, -0.033805001527071, 0.04108746349811554, -0.014032971113920212, -0.040607959032058716, -0.019794506952166557, -0.010609016753733158, -0.007308683358132839, -0.00065042037749663, -0.00048137662815861404, -0.015763679519295692, 0.019419893622398376, 0.005664135795086622, -0.012729321606457233, -0.018086275085806847, -0.022326884791254997, 0.02718185819685459, 0.0011612976668402553, 0.017561817541718483, -0.017426958307623863, 0.018311042338609695, 0.0397987961769104, -0.02294124849140644, 0.03209676966071129, 0.0059675718657672405, 0.03994864225387573, -0.01499197818338871, 0.01718720607459545, 0.00010202328121522442, -0.022746451199054718, -0.0526854544878006, -0.007417320739477873, -0.004304293543100357, 0.027721300721168518, 0.006986516993492842, 0.029789159074425697, -0.003279729513451457, -0.019000329077243805, -0.01370331272482872, 0.028305694460868835, -0.035393357276916504, 0.005300762131810188, -0.025323782116174698, 0.03164723515510559, 0.0050048185512423515, -0.012661891058087349, 0.015538912266492844, -0.0393492616713047, -0.026777276769280434, 0.0030324854888021946, -0.03964895009994507, 0.014729750342667103, -0.020154133439064026, 0.022716481238603592, 0.00670181168243289, 0.007911808788776398, 0.012362201698124409, -0.009380288422107697, 0.0008499013492837548, -0.018895437940955162, -0.043095383793115616, 0.03368512541055679, -0.014872102998197079, -0.021083172410726547, 0.004461630713194609, -0.00796425435692072, -0.017576802521944046, 0.010099544189870358, 0.02556353434920311, 0.03260624408721924, 0.05343467742204666, 0.023225953802466393, 0.03925935551524162, -0.00018695488688535988, -0.06431341916322708, -0.0010957405902445316, 0.005724073853343725, -0.01522423792630434, -0.002206465695053339, 0.015164299868047237, -0.0023151030763983727, -0.016288137063384056, 0.00967248622328043, -0.023420752957463264, -0.004798781592398882, -0.022746451199054718, 0.031707171350717545, 0.002444344339892268, 0.005806488450616598, -0.0075634196400642395, 0.038300346583127975, 0.012684367597103119, -0.007979239337146282, 0.02256663702428341, -0.0074622742831707, 0.010309326462447643, -0.012429631315171719, 0.004188164137303829, -0.006229800172150135, -0.05070750042796135, 0.007761964108794928, 0.00011554444063222036, -0.03904957324266434, -0.02662743255496025, -0.02933962456882, -0.00040317632374353707, 0.0002669111709110439, 0.011530562303960323, -0.008346359245479107, 0.011920158751308918, 0.030373554676771164, 0.021817412227392197, -6.227927224244922e-05, -0.0039034585934132338, -0.058799125254154205, 0.002107193460687995, 0.006031255703419447, -0.055472567677497864, 0.027751268818974495, -0.024080069735646248, -0.040787771344184875, -0.023061124607920647, -0.06389384716749191, -0.006124909035861492, 0.0014366375980898738, 0.002305737929418683, 0.014452537521719933, 0.026357712224125862, -0.005555498413741589, 0.00687413290143013, -0.03296586871147156, -0.03149738907814026, -0.011478116735816002, -0.007724502589553595, -0.034194596111774445, -0.0033677632454782724, -0.004120733588933945, -0.03626245632767677, 0.014624858275055885, -0.002264530397951603, 0.006548220757395029, -0.0063309455290436745, 0.02087339013814926, 0.012129941955208778, 0.036921773105859756, -0.0017953288042917848, 0.011373225599527359, -0.01667773351073265, 0.006866640876978636, -0.045253150165081024, -0.00584020372480154, -0.0412672758102417, -0.0036730722058564425, -0.045253150165081024, -0.024199945852160454, -0.025353750213980675, 0.007259983569383621, 0.0313175767660141, 0.024349790066480637, 0.019914383068680763, -0.027481548488140106, 0.014587397687137127, -0.0027552724350243807, 0.02031896263360977, 0.026132944971323013, 0.040458112955093384, -0.01293910387903452, 0.03746121749281883, -0.01961469277739525, 0.0368618369102478, 0.0129465963691473, -0.00682917982339859, -0.005652897525578737, 0.023780379444360733, 0.015553897246718407, -0.011268333531916142, 0.0016576588386669755, -0.001560259610414505, 0.01096115168184042, 0.00794177781790495, -0.005083486903458834, -0.019015314057469368, 0.025069044902920723, 0.0017147872131317854, 0.02556353434920311, 0.027331702411174774, -0.005386922974139452, 0.005150916986167431, -0.028994981199502945, 0.04033823683857918, -0.0024761862587183714, -0.03191695734858513, 0.009050630033016205, 0.004832496866583824, 0.02054373174905777, -0.0040420652367174625, 0.015299160964787006, -0.011965112760663033, -0.0031036618165671825, 0.01703736186027527, -0.007132615428417921, 0.01292411983013153, -0.012099972926080227, -0.018985344097018242, -0.01772664673626423, -0.004023334477096796, 0.015066901221871376, -0.015051916241645813, 0.0020510016474872828, -0.014152847230434418, 0.032726116478443146, 0.028935043141245842, -0.003156107384711504, 0.020468808710575104, 0.014340153895318508, -0.019195126369595528, -0.04441401734948158, -0.014115385711193085, 0.021442800760269165, 0.017816554754972458, -0.03791075199842453, -0.03515360504388809, 0.0029369592666625977, 0.007623357232660055, 0.01634807512164116, 0.011043566279113293, -0.00611367030069232, -0.02372044138610363, 0.007540942635387182, -0.013898110948503017, 0.0038322824984788895, -0.031197700649499893, -0.004420423414558172, 0.026687370613217354, -0.022311899811029434, 0.02054373174905777, 0.017606770619750023, 0.0033059522975236177, -0.01841593347489834, 0.001879616524092853, -0.005383176729083061, -0.0014553682412952185, 0.007376113440841436, 0.022132085636258125, 0.021997226402163506, -0.011103504337370396, 0.014220277778804302, -5.08945740875788e-05, -0.009387780912220478, -0.00183372653555125, -0.003970888908952475, 0.019240081310272217, 0.006787972524762154, -0.0001171833646367304, -0.003405224531888962, 0.02607300691306591, -0.03206679970026016, 0.01123836450278759, 0.034434348344802856, 0.007259983569383621, 0.0018590128747746348, 0.0016857547452673316, -0.02265654318034649, 0.028845136985182762, -0.03524351119995117, -0.011852729134261608, 0.020019274204969406, 0.006398375611752272, 0.02758643962442875, -0.0022589112631976604, -0.006087447516620159, -0.006184846628457308, -0.030478445813059807, 0.016228199005126953, -0.030133802443742752, -0.006739272736012936, -0.022461745887994766, -0.015568881295621395, -0.0021221779752522707, -0.007117630913853645, -0.030613305047154427, 0.0075858961790800095, -0.0018262342782691121, -0.015493959188461304, 0.029834112152457237, -0.008833354339003563, 0.0021933543030172586, -0.0268521998077631, -0.031437452882528305, 0.00021704091341234744, -0.0154340211302042, -0.002270149765536189, 0.0050759948790073395, 0.024559572339057922, -0.01801135204732418, 0.00700150104239583, -0.017651725560426712, -0.0012427758192643523, -0.00794177781790495, 0.008233975619077682, -0.022446760907769203, -0.0024218675680458546, -0.01630312204360962, -0.03374506160616875, -0.02196725644171238, -0.007911808788776398], "index": 57}, {"title": "Kjelvatnet (Fauske)", "text": "Kjelvatnet (Lule Sami: Giebbnej\u00e1vrre) is a lake in the municipality of Fauske in Nordland county, Norway. The 3.85-square-kilometre (1.49 sq mi) lake lies about 7 kilometres (4.3 mi) south of the village of Sulitjelma near the border with Junkerdal National Park. Water flows into the lake from the large lake Balvatnet (in Saltdal) and it flows out of the lake to the north to the lake Langvatnet.", "vector": [-0.005133721977472305, -0.0011205541668459773, 0.00229629036039114, 0.049728039652109146, -0.002314091194421053, 0.0010653719073161483, -0.04172484204173088, -0.032041262835264206, -0.05878503620624542, 0.016903545707464218, 0.017060192301869392, 0.007383730728179216, -0.018996907398104668, -0.006767826620489359, -0.061690110713243484, 0.06402555853128433, 0.0158782247453928, 0.00165902532171458, -0.002232207916676998, -0.021303879097104073, -0.043348267674446106, -0.03981660678982735, 0.06863950192928314, 0.036940015852451324, 0.006486575584858656, 0.015123475342988968, -0.005899152252823114, 0.03443367779254913, -0.010630578733980656, -0.04175332561135292, 0.045057132840156555, -0.019965266808867455, -0.011833906173706055, 0.016034871339797974, 0.0285808052867651, 0.02368205226957798, -0.016846584156155586, 0.003556580049917102, 0.03292417526245117, -0.01043121051043272, -0.0008032566402107477, -0.006796307861804962, 0.015522211790084839, -0.003830710891634226, -0.02057761140167713, -0.02895106002688408, -0.03355076164007187, 0.020079191774129868, -0.021460525691509247, -0.05049702897667885, 0.035487476736307144, -0.038648881018161774, -0.029164668172597885, 0.03426279127597809, 0.03286721557378769, -0.029136188328266144, 0.011748462915420532, 0.14422839879989624, -0.011613177135586739, 0.03506026044487953, -0.01271682046353817, -0.01434024516493082, 0.001845932682044804, -0.009484213776886463, 0.009064117446541786, 0.0043184501118958, -0.007519016042351723, 0.00194561667740345, -0.04272168129682541, 0.07137369364500046, 0.03921850398182869, 0.08629780262708664, 0.026387758553028107, 0.06265846639871597, 0.011627417989075184, 0.027128268033266068, 0.006105640437453985, 0.0240095853805542, 0.009939911775290966, 0.00833784881979227, 0.008017435669898987, 0.013236600905656815, 0.0051978048868477345, -0.0278830174356699, -0.022528566420078278, 0.029848216101527214, -0.0011339046759530902, -0.029791252687573433, -0.02188774198293686, -0.0025472803972661495, 0.022357679903507233, -0.008693862706422806, 0.006144802086055279, -0.019979506731033325, 0.04551283270120621, 0.00767566217109561, 0.03229759261012077, -0.011705741286277771, -0.006561338435858488, 0.05867110937833786, 0.016875064000487328, 0.03044631890952587, 0.007120280526578426, -0.03574380651116371, -0.01728804036974907, 0.02546212263405323, -0.0043647317215800285, 0.0054434542544186115, -0.003499617800116539, 0.009491333737969398, 0.028438400477170944, -0.01535132434219122, -0.023140911012887955, -0.07046229392290115, 0.005229846108704805, -0.008672501891851425, 0.036968495696783066, -0.04030078649520874, 0.0019100152421742678, 0.031614046543836594, 0.0015077193966135383, -0.014881386421620846, 0.015607655048370361, -0.0687534287571907, 0.02647320181131363, -0.028167828917503357, 0.03602861985564232, 0.0036402433179318905, 0.009947031736373901, 0.10241811722517014, -0.02754124440252781, -0.054228056222200394, 0.007590218912810087, -0.008252404630184174, -0.05878503620624542, -0.01629120111465454, 0.0318988561630249, 0.0061483620665967464, -0.011257163248956203, -0.0012077775318175554, 0.004702945239841938, 0.010317286476492882, -0.04206661507487297, -0.013386127538979053, 0.0035583600401878357, -0.02964884787797928, -0.03916154429316521, -0.016504809260368347, 0.0023977544624358416, -0.052547670900821686, 0.031927336007356644, -0.013735020533204079, 0.02754124440252781, 0.04357611760497093, 0.03688305243849754, 0.006511496379971504, -0.0268719382584095, 0.033038102090358734, 0.011776943691074848, -0.007839429192245007, -0.0481615774333477, -0.004635302349925041, 0.021446283906698227, -0.0446014367043972, 0.0028089506085962057, 0.015750059857964516, 0.021047549322247505, -0.0072092837654054165, 0.024280156940221786, 0.017957346513867378, 0.014105275273323059, 0.027299154549837112, 0.0026451842859387398, -0.021389322355389595, 0.012040394358336926, -0.09860164672136307, 0.002901514293625951, 0.03349379822611809, -0.02939251810312271, -0.003344751661643386, -0.0031970059499144554, -0.019196275621652603, 0.004802629351615906, -0.0050233579240739346, -0.02087666280567646, -0.002020379528403282, 0.0127025805413723, 0.01290906872600317, 0.027014344930648804, -0.023511165753006935, -0.014838664792478085, -0.010922510176897049, -0.0057282657362520695, 0.03993053361773491, -0.02721371129155159, 0.017957346513867378, -0.004037199076265097, 0.04032927006483078, 0.03423430770635605, 0.0332944318652153, 0.04237990826368332, 0.02335451915860176, -0.04687992483377457, 0.03150011971592903, -0.01399135123938322, 0.022841859608888626, -0.0278830174356699, 0.011007953435182571, -0.026245353743433952, 0.024636169895529747, -0.032696329057216644, -0.0017079772660508752, -0.016106074675917625, -0.02680073492228985, 0.052547670900821686, -0.004656663630157709, -0.008045916445553303, 0.0010084097739309072, 0.02084818109869957, -0.0086369002237916, -0.04952866956591606, -0.021389322355389595, -0.01693202741444111, 0.027470041066408157, -0.014995310455560684, -0.028039664030075073, 0.015493730083107948, -0.022186793386936188, -0.009420131333172321, 0.04975651949644089, 0.03995901346206665, -0.01875481940805912, -0.031215310096740723, -0.03420582786202431, -0.058215413242578506, -0.028110867366194725, 0.025946302339434624, -0.03044631890952587, -0.00831648800522089, -0.03967420384287834, 0.0211472325026989, -0.0024903181474655867, 0.00012660748325288296, -0.021360840648412704, -0.009363168850541115, 0.006561338435858488, -0.008231043815612793, 0.05482615903019905, -0.0006003286689519882, -0.021716855466365814, 0.01043121051043272, -0.017515890300273895, 0.010060956701636314, -0.010025355033576488, -0.02869473025202751, 0.007266246248036623, -0.0480191707611084, -0.002533039776608348, -0.004706505220383406, -0.012624257244169712, -0.025234274566173553, 0.03115834668278694, 0.038364071398973465, 0.019566530361771584, -0.01948108710348606, -0.021716855466365814, -0.010324406437575817, -0.02823903225362301, -0.00988294929265976, -0.026017505675554276, 0.010082317516207695, 0.03642735630273819, 0.0027039265260100365, -0.028139349073171616, 0.029278593137860298, 0.034405194222927094, -0.02089090272784233, 0.0064153727144002914, -0.028865616768598557, 0.008743704296648502, 0.006906671915203333, -0.02338300086557865, -0.010901149362325668, 0.003713226178660989, 0.020677294582128525, 0.02126115746796131, -0.011833906173706055, 0.024265915155410767, 0.012424889020621777, 0.016362404450774193, -0.03150011971592903, 0.02680073492228985, 6.224682874744758e-05, 0.03360772505402565, -0.020292799919843674, -0.013649577274918556, -0.02936403639614582, 0.0010618118103593588, -0.010886908508837223, -0.018470007926225662, -0.013656698167324066, -0.028068145737051964, -0.01975165866315365, 0.0034479957539588213, 0.026402000337839127, -0.0012780902907252312, -4.633744902093895e-05, -0.007405091542750597, -0.03326595202088356, -0.01398423034697771, 0.004336250945925713, -0.010182000696659088, 0.005806588567793369, -0.03488937392830849, 0.008074398152530193, -0.010210482403635979, -0.028367197141051292, 0.016348164528608322, -0.025689972564578056, -0.019879823550581932, 0.015365565195679665, -0.004183164797723293, -0.01149213220924139, 0.00170263706240803, 0.022514326497912407, -0.0494147464632988, 0.04172484204173088, 0.045370426028966904, 0.00830936711281538, -0.029962139204144478, -0.005681983660906553, 0.06687367707490921, -0.051436904817819595, 0.018954185768961906, -0.015109235420823097, 0.01913931407034397, -0.04984196275472641, 0.01204751431941986, -0.011214441619813442, -0.003029679413884878, -0.008458892814815044, -0.0432058610022068, 0.06767114251852036, -0.02620263211429119, 0.024265915155410767, 0.037680525332689285, -0.02052064798772335, -0.008622659370303154, 0.02081969939172268, 0.045370426028966904, 0.0006265846895985305, 0.02332603931427002, -0.017743738368153572, -0.03562988340854645, 0.031699489802122116, -0.007252005860209465, -0.01950956881046295, 0.033009618520736694, 0.01061633788049221, 0.028110867366194725, 0.028025424107909203, -0.0311298668384552, -0.020250078290700912, -0.013286443427205086, -0.04067104309797287, 0.022727934643626213, 0.016134556382894516, 0.02047792635858059, 0.010125039145350456, -0.02222951501607895, 0.030189989134669304, 0.03258240222930908, -0.014653537422418594, 0.057788196951150894, 0.05719009414315224, -0.03543051704764366, 0.006219564937055111, -0.0008878099615685642, -0.013557014055550098, 0.009569657035171986, 0.029933659359812737, -0.03537355363368988, 0.04534194618463516, -0.0070526376366615295, 0.029221631586551666, 0.0025561805814504623, -0.0003043919859919697, 0.0007591999019496143, -0.02156020887196064, 0.02506338804960251, -0.006244485732167959, 0.03890521079301834, -0.002137864241376519, -0.016732659190893173, 0.006280087400227785, 0.0009754784405231476, -0.01975165866315365, 0.05764579027891159, -0.005614341236650944, -0.04286408796906471, -0.016447847709059715, 0.06949393451213837, -0.016063353046774864, -0.011007953435182571, 0.009712062776088715, 0.005959674715995789, 0.03141467645764351, 0.026587126776576042, 0.022841859608888626, -0.01594942808151245, -0.010174880735576153, -0.03431975096464157, 0.004667344037443399, -0.06698759645223618, 0.03967420384287834, 0.01832760125398636, 0.007091799285262823, -0.017031710594892502, 0.004336250945925713, 0.02332603931427002, 0.0021200634073466063, -0.02724219299852848, 0.0285808052867651, 0.0022037269081920385, -0.058158449828624725, 0.01798582822084427, -0.018598172813653946, 0.03075961209833622, -9.184049122268334e-05, -0.010958111844956875, -0.018541209399700165, 0.05308881029486656, -0.014304643496870995, 0.014468410052359104, 0.0027733491733670235, -0.013706539757549763, -0.00600239634513855, -0.0727977454662323, 0.00990431010723114, 0.024849778041243553, 0.010523774661123753, 0.0458546057343483, 0.008572817780077457, 0.012289604172110558, 0.007689903024584055, -0.017216838896274567, 0.040870409458875656, -0.03275328874588013, -0.009448612108826637, -0.03332291170954704, 0.036940015852451324, -0.019595012068748474, -0.03326595202088356, -0.006123441271483898, 0.0020880221854895353, -0.007038397248834372, 0.039417874068021774, 0.04884512349963188, -0.040784966200590134, -0.011997672729194164, 0.04001597687602043, -0.023254835978150368, 0.026416240260004997, -0.016519051045179367, -0.01659025251865387, -0.0790066346526146, -0.00013951299479231238, 0.013172518461942673, 0.001622533891350031, -0.0194383654743433, 0.013720780611038208, 0.009804625995457172, -0.07678510248661041, -0.00405499991029501, 1.1890311952811317e-06, 0.001234478666447103, -0.011257163248956203, -0.030503282323479652, -0.005347330588847399, -0.0494147464632988, 0.08555728942155838, 0.008736584335565567, -0.006141242105513811, 0.028196310624480247, -0.005820829421281815, 0.02868049032986164, -0.0038912333548069, 0.0005424763658083975, -0.005375811830163002, -0.014276162721216679, 0.02295578457415104, 0.01733076199889183, -0.0001606513251317665, -0.03793685510754585, -0.011563335545361042, 0.01982286013662815, -0.0158782247453928, 0.04069952294230461, -0.06015212833881378, -0.004044319503009319, 0.026088707149028778, 0.03349379822611809, 0.03967420384287834, 0.052205897867679596, -0.01764405518770218, 0.032696329057216644, 0.026416240260004997, 0.07268382608890533, 0.011093396693468094, -0.006386891473084688, 0.021403562277555466, -0.02016463503241539, -0.03933243080973625, -0.019680455327033997, -0.012389288283884525, 0.015251641161739826, 0.04773436114192009, -0.07627244293689728, -0.025319717824459076, 0.010338647291064262, -0.030303914099931717, -6.970087270019576e-05, -0.007291167043149471, -0.044686879962682724, 0.01694626733660698, 0.04386092722415924, 0.01429040264338255, 0.010424090549349785, -0.010210482403635979, 0.0007075778557918966, 0.014810183085501194, 0.042978011071681976, -0.009989753365516663, 0.020007988438010216, 0.014119516126811504, -0.010744502767920494, -0.009113959036767483, -0.01519467867910862, -0.018811780959367752, 0.019267478957772255, -0.03226911276578903, -0.041582439094781876, 0.04309193789958954, -0.02862352691590786, -0.017102913931012154, 0.005190684460103512, -0.012809384614229202, 0.0014641076559200883, -0.02504914626479149, -0.03708241879940033, 0.030902016907930374, 0.01656177267432213, 0.013720780611038208, 0.031955819576978683, 0.06174707040190697, 0.019580772146582603, 0.010844186879694462, 0.025319717824459076, 0.002814290812239051, -0.017544370144605637, 0.01906811073422432, 0.01553645171225071, -0.029278593137860298, -0.01293042954057455, -0.0005571619258262217, 0.031329233199357986, 0.028395678848028183, 0.007504775654524565, -0.06539265811443329, 0.019908303394913673, 0.026729533448815346, -0.0038698725402355194, 0.020064949989318848, -0.044373586773872375, 0.0033322912640869617, 0.00075163459405303, -0.013471570797264576, -0.0004049659473821521, 0.014397206716239452, -0.03494633734226227, -0.014753221534192562, 0.028367197141051292, -0.0311298668384552, 0.021161474287509918, 0.019879823550581932, 0.045057132840156555, -0.03394949808716774, 0.010053835809230804, -0.06003820523619652, 0.010538015514612198, -0.0020559809636324644, 0.018113993108272552, 0.016034871339797974, -0.006892431527376175, 0.017174117267131805, -0.029079224914312363, 0.011057795956730843, 0.015151957049965858, -0.00635129027068615, -0.031357716768980026, -0.013421728275716305, -0.004670904017984867, -0.019324440509080887, -0.01837032288312912, 0.023254835978150368, 0.060949601233005524, 0.01832760125398636, 0.0010386708891019225, 0.00884338840842247, -0.0012567294761538506, -0.06282935291528702, -0.06841165572404861, 0.030531762167811394, 0.03506026044487953, -0.002744868164882064, -0.007704143412411213, -0.0158782247453928, 0.018640894442796707, 5.482059714267962e-05, 0.027299154549837112, -0.027726372703909874, -0.030133027583360672, 0.020606091246008873, -0.009498453699052334, -0.00935604888945818, 0.031699489802122116, 0.046481192111968994, -0.022813377901911736, -0.034091901034116745, -0.026729533448815346, 0.03597165644168854, -0.012161439284682274, -0.020762737840414047, -0.032012779265642166, 0.007138081360608339, 0.008231043815612793, -0.02053488790988922, -0.0044893366284668446, 0.003919714596122503, 0.0059739151038229465, 0.0033839133102446795, 0.02504914626479149, 0.01728804036974907, -0.060949601233005524, 0.013450209982693195, -0.029079224914312363, -0.009121078997850418, 0.018954185768961906, -0.013827584683895111, 0.05901288613677025, 0.02265673317015171, 0.034405194222927094, 0.009840227663516998, 0.0035156384110450745, -0.017473168671131134, 0.013001631945371628, 0.0021556648425757885, -0.007768225856125355, 0.014326004311442375, -0.028552325442433357, -0.03562988340854645, 0.01024608314037323, -0.02685769833624363, -0.01765829510986805, 0.004179604817181826, 0.0024048746563494205, 0.013222360983490944, 0.034120384603738785, -0.0037523878272622824, 0.029620366171002388, -0.03349379822611809, -0.014454169198870659, -0.017786459997296333, 0.016333922743797302, 0.017117153853178024, 0.011185960844159126, 0.03956027701497078, -0.001828131964430213, 0.016761140897870064, -0.005617901217192411, -0.026601368561387062, -0.017131395637989044, 0.02195894531905651, -0.03400645777583122, 0.001696406863629818, 0.008053037337958813, 0.025576047599315643, 0.02680073492228985, -0.00882202759385109, -0.017088674008846283, 0.03309506177902222, 0.04736410453915596, 0.032326072454452515, -0.008836268447339535, -0.014439928345382214, 0.02012191340327263, -0.042636238038539886, -0.010901149362325668, 0.0003293129848316312, -0.010680420324206352, 0.03488937392830849, 0.027099788188934326, -0.026729533448815346, 0.0108014652505517, 0.026273835450410843, -0.008238164708018303, -0.0066823833622038364, 0.017829181626439095, 0.03562988340854645, -0.01434024516493082, -0.0046637835912406445, -0.058215413242578506, 0.023895660415291786, 0.007739745080471039, -0.035886213183403015, -0.0024529367219656706, -0.012951790355145931, -0.02298426441848278, -0.050753358751535416, -0.005884911864995956, 0.007654301356524229, -0.00260780262760818, -0.0016180836828425527, 0.0009345368016511202, 0.04317738115787506, 0.0033892535138875246, 0.050753358751535416, 0.040841929614543915, -0.04106977581977844, 0.013329165056347847, 0.023169392719864845, -0.013927268795669079, -0.00654709804803133, 0.01112899836152792, 0.017174117267131805, -0.006490135565400124, 0.0005131051875650883, 0.012432009913027287, 0.020634572952985764, -0.034832410514354706, 0.02936403639614582, -0.06687367707490921, -0.012752422131597996, 0.044031813740730286, -0.015422527678310871, -0.020079191774129868, 0.024194713681936264, 0.011541974730789661, 0.015166196972131729, 0.023909902200102806, -0.019538048654794693, 0.024137750267982483, 0.0020114791113883257, -0.05377235636115074, -0.041553955525159836, 0.01871209777891636, -0.018868742510676384, -0.047164738178253174, 0.047392588108778, 0.011549094691872597, 0.011050675064325333, 0.013158278539776802, -0.05192108452320099, -0.02473585493862629, 0.026686811819672585, 0.002689685905352235, -0.03004758432507515, -0.011185960844159126, -0.012232641689479351, -0.05135146155953407, 0.030332393944263458, 0.021375082433223724, 0.025319717824459076, -0.023952623829245567, 0.004863151349127293, 0.01129276491701603, -0.0073196482844650745, -0.0013208120362833142, -0.005464815068989992, 0.008615539409220219, 0.00067375652724877, 0.01838456466794014, 0.05277551710605621, -0.018626654520630836, -0.006586259230971336, -0.007106039673089981, -0.01006807666271925, 0.012410649098455906, 0.0007489644922316074, 0.0275697261095047, -0.037310268729925156, -0.022813377901911736, 0.024137750267982483, -0.03115834668278694, 0.011250043287873268, 0.014895626343786716, -0.006696623750030994, 0.02154596894979477, -0.003469356568530202, 0.00398023659363389, 0.002353252610191703, -0.0010929630370810628, 0.004425254184752703, -0.001703527057543397, 0.008850508369505405, 0.021759577095508575, 0.03075961209833622, -0.004727866034954786, 0.015821263194084167, -0.019167795777320862, -0.024237435311079025, 0.0004668233741540462, 0.010096557438373566, 0.03036087565124035, -0.006408252287656069, -0.029962139204144478, -0.0026345038786530495, -0.04528498277068138, 0.02332603931427002, 0.04912993684411049, 0.006764266639947891, 0.021802298724651337, 0.0035280990414321423, -0.010132159106433392, -0.03787989169359207, 0.018256399780511856, -0.008458892814815044, 0.023140911012887955, -0.013158278539776802, -0.0062409257516264915, -0.011962071061134338, 0.014354485087096691, -0.03947483375668526, -0.008409051224589348, 0.013186759315431118, -0.051436904817819595, 0.05115209519863129, -0.02789725922048092, -0.008579937741160393, 0.019224757328629494, 0.020962106063961983, -0.014276162721216679, 0.03568684682250023, 0.030474800616502762, 0.0036384633276611567, 0.006668142508715391, -0.034519121050834656, -0.053629953414201736, -0.018199436366558075, 0.011356847360730171, 0.008807786740362644, -0.03178493306040764, 0.01980862021446228, -0.012994511984288692, -0.008878990076482296, 0.001758709317073226, -0.011648778803646564, -0.015721580013632774, -0.021118752658367157, 0.007917751558125019, 0.003280669217929244, 0.00902139488607645, -0.01269545964896679, 0.030275432392954826, 0.01590670645236969, -0.0503261424601078, 0.011997672729194164, -0.01838456466794014, 0.022913062945008278, -0.03246847912669182, 0.004745666868984699, -0.060664787888526917, 0.02084818109869957, 0.029506443068385124, -0.007454933598637581, 0.01624847948551178, -0.052519187331199646, -0.018569691106677055, 0.01343596912920475, 0.011926469393074512, -0.0068212286569178104, 0.036284949630498886, 0.00265586469322443, -0.02188774198293686, -0.012182800099253654, 0.023881420493125916, -0.0208339411765337, 0.019623493775725365, 0.06761418282985687, -0.040158383548259735, -0.0282675139605999, -0.011541974730789661, -0.03261088579893112, -0.011776943691074848, 0.04163939878344536, -0.03477545082569122, 0.02933555468916893, -0.024280156940221786, -0.0046175019815564156, 0.020079191774129868, 0.012937549501657486, 0.02758396603167057, -0.03431975096464157, -0.011449410580098629, 0.005607220809906721, -0.003766628447920084, 0.005546698346734047, -0.022201035171747208, -0.04411725699901581, 0.04736410453915596, -0.010851307772099972, 0.014810183085501194, -0.04693688824772835, -0.02719947136938572, 0.011356847360730171, -0.022443123161792755, 0.0011632757959887385, 0.018897224217653275, 0.012510333210229874, 0.0792914405465126, -0.02510610967874527, 0.04608245566487312, 0.014219200238585472, 0.0194383654743433, -0.017587093636393547, -0.012175679206848145, 0.005560939200222492, 0.021446283906698227, -0.006942273583263159, -0.006159042473882437, 0.027099788188934326, -0.007768225856125355, 0.04252231493592262, -0.018299121409654617, -0.029150428250432014, -0.008223923854529858, 0.03218366578221321, -0.01661873422563076, 0.012524573132395744, -0.02581813745200634, 0.023696294054389, -0.030873535200953484, 0.010538015514612198, -0.025561807677149773, 0.01835608296096325, 0.002445816295221448, 0.026045985519886017, -0.03990205004811287, -0.018626654520630836, 0.04779132083058357, 0.004984196275472641, 0.016576012596488, -0.010288805700838566, -0.006447413936257362, 0.04699385166168213, 0.0014187159249559045, -0.020036468282341957, 0.013735020533204079, 0.010936751030385494, -0.008736584335565567, 0.023083949461579323, 0.009455732069909573, 0.03150011971592903, 0.010829946957528591, -0.045370426028966904, 0.028125107288360596, 0.010837066918611526, -0.0014649976510554552, -0.01362109649926424, 0.0039766766130924225, 0.0004192065098322928, 0.0025490603875368834, 0.005058959126472473, 0.023126671090722084, 0.053572990000247955, -0.01362109649926424, 0.014610815793275833, -0.0155649334192276, 0.018968427553772926, -0.01080858614295721, 0.0058493101969361305, 0.00956253707408905, -0.017971588298678398, 0.0209051426500082, -0.004816869739443064, 0.030218470841646194, 0.006935153156518936, 0.03323746845126152, 0.0290365032851696, 0.037652041763067245, 0.012289604172110558, 0.007291167043149471, -0.009932790882885456, 0.015750059857964516, 0.05553818866610527, 0.014105275273323059, 0.004197405185550451, -0.035857733339071274, -0.006411812733858824, -0.022428883239626884, 0.035515960305929184, 0.015436767600476742, 0.04565523937344551, -0.00681054824963212, -0.02264249138534069, 0.006301448214799166, -0.007287607062608004, -0.04138306900858879, 0.02897954173386097, 0.031044423580169678, 0.006141242105513811, -0.00617684330791235, 0.0018112213583663106, -0.022870341315865517, -0.024123510345816612, 0.03725330904126167, -0.0017400184879079461, 0.001173066208139062, 0.04770587757229805, 0.059582505375146866, 0.01631968282163143, -0.05058247223496437, 0.004019398242235184, 0.016390886157751083, 0.0029602565336972475, 0.005251206923276186, -0.0017409085994586349, 0.017245318740606308, -0.008743704296648502, -0.04556979611515999, 0.007981834001839161, 0.024522246792912483, 0.005361570976674557, 0.016718419268727303, 0.026017505675554276, -0.0388767309486866, 0.05727553740143776, 0.0038769927341490984, -0.02758396603167057, 0.03523114696145058, -0.0019669774919748306, 0.004621061962097883, 0.029278593137860298, 0.03243999928236008, -0.016433607786893845, -0.003031459404155612, -0.03648431599140167, 0.008522975258529186, -0.036284949630498886, 0.0015851524658501148, -0.010146399959921837, -0.013193879276514053, -0.0034711367916315794, 0.008871869184076786, -0.030588725581765175, 0.00039673311403021216, 0.004759907256811857, 0.029136188328266144, -0.020591851323843002, 0.004852470941841602, 0.00867962185293436, -0.004770588129758835, 0.04021534323692322, -0.0002282939967699349, 0.00331805064342916, -0.023553887382149696, 0.021460525691509247, 0.015123475342988968, -0.003926834557205439, -0.00810287892818451, 0.04981348291039467, 0.04198117181658745, 0.04283560812473297, 0.049357783049345016, -0.013891667127609253, 0.014781702309846878, -0.0012211280409246683, 0.011057795956730843, 0.015265881083905697, -0.009911430068314075, -0.0020809019915759563, 0.03312354534864426, -0.019367162138223648, -0.0424368716776371, -0.0023906342685222626, 0.008807786740362644, -0.024935221299529076, -0.022713694721460342, 0.03491785377264023, -0.004136882722377777, -0.005674863699823618, 0.014226320199668407, -0.00956253707408905, -0.019210517406463623, -0.018968427553772926, -0.003373232902958989, 0.013471570797264576, -0.01663297601044178, -0.016860824078321457, 0.018868742510676384, 0.011435170657932758, -0.03286721557378769, 0.011264283210039139, 0.027455801144242287, 0.011791184544563293, 0.030531762167811394, -0.010509533807635307, -0.017131395637989044, -0.0035512398462742567, -0.025034906342625618, -0.03913306072354317, -0.020420964807271957, 0.004343370907008648, 0.03711090236902237, 0.023781737312674522, -0.028780173510313034, 0.02372477389872074, 0.021731095388531685, 0.014909867197275162, 0.0043682921677827835, -0.02435135841369629, -0.004606821574270725, 0.020591851323843002, 0.007511896081268787, 0.00326820882037282, 0.01906811073422432, -0.008359209634363651, 0.02477857656776905, 0.023753255605697632, 0.0034853771794587374, -0.03708241879940033, -0.02543364092707634, 0.040784966200590134, 0.04064255952835083, -0.0034479957539588213, 0.013379006646573544, 0.018227918073534966, -0.008159841410815716, -0.031671006232500076, 0.015451008453965187, 0.02476433478295803, 0.02620263211429119, 0.023881420493125916, 0.030133027583360672, 0.038762807846069336, 0.02019311487674713, -0.019381403923034668, -0.015337084420025349, -0.00867962185293436, -0.0018957746215164661, 0.0030510402284562588, 0.019623493775725365, 0.032326072454452515, 0.02443680167198181, 0.009605258703231812, 0.0076187001541256905, 0.012553054839372635, 0.02372477389872074, -0.002127183834090829, 0.02862352691590786, 0.040072936564683914, 0.014326004311442375, -0.010117918252944946, -0.011962071061134338, -0.0068069882690906525, -0.01147077139467001, -0.018840262666344643, 0.028381437063217163, -0.010182000696659088, 0.019908303394913673, 0.002376393647864461, 0.00810999982059002, 0.013371886685490608, -0.011613177135586739, 0.0014009152073413134, 0.0162627212703228, -0.020022228360176086, 0.010360008105635643, -0.029506443068385124, 0.02654440514743328, -0.013222360983490944, 0.026088707149028778, -0.015522211790084839, 0.024963703006505966, 0.0127025805413723, 0.04727866128087044, 0.015465249307453632, 0.02326907590031624, 0.00644029350951314, -0.04762043431401253, -0.03958876058459282, 0.02440832182765007, -0.03243999928236008, 0.03580076992511749, 0.008053037337958813, 0.018954185768961906, -0.019196275621652603, -0.029477961361408234, 0.023525407537817955, -0.02046368643641472, -0.023468444123864174, 0.003987357020378113, -0.0030848614405840635, 0.013371886685490608, 0.0075830984860658646, 0.01627696119248867, -0.011719981208443642, -0.018897224217653275, 0.0018939946312457323, -0.03508874028921127, 0.007668542210012674, 0.024864019826054573, -0.013407488353550434, 0.023254835978150368, 0.028837135061621666, 0.012268243357539177, 0.03403494134545326, 0.0026968063320964575, 0.022528566420078278, -0.011157479137182236, 0.0070526376366615295, -0.011000833474099636, -0.008522975258529186, 0.022742176428437233, 0.03921850398182869, 0.003380353096872568, 0.007924872450530529, -0.024522246792912483, 0.023226354271173477, -0.03224062919616699, 0.01800006814301014, 0.014995310455560684, -0.011990551836788654, 0.011000833474099636, -0.012674098834395409, 0.001965197501704097, -0.016775380820035934, -0.006515056826174259, 0.015778541564941406, -0.014995310455560684, 0.029905177652835846, -0.009291966445744038, 0.020335521548986435, 0.01590670645236969, 0.005375811830163002, 0.03634191304445267, 0.016006389632821083, -0.003766628447920084, 0.005692664068192244, -0.03141467645764351, 0.029591886326670647, 0.0015744720585644245, -0.012389288283884525, 0.029449479654431343, 0.06482303142547607, -0.015094994567334652, 0.029819734394550323, 0.045484352856874466, 0.0026772255077958107, 0.02933555468916893, 0.0010360007872805, -0.0009514474659226835, -0.007568858098238707, -0.04767739772796631, -0.028523843735456467, -0.019523808732628822, 0.0011748463148251176, 0.003223706968128681, 0.014062553644180298, 0.01656177267432213, 0.006333489436656237, -0.04853183031082153, 0.028552325442433357, -0.000882469757925719, -0.0011134338565170765, 0.05382931977510452, 0.03853495791554451, -0.007066878490149975, 0.006949393544346094, 0.00531172938644886, 0.00988294929265976, -0.00644029350951314, 0.04556979611515999, 0.006137681659311056, -0.012795143760740757, -3.362663846928626e-05, 0.01449689082801342, -0.006586259230971336, -0.008010315708816051, -0.010516653768718243, 0.0021467646583914757, -0.025248514488339424, -0.008387690410017967, 0.006703744176775217, 0.024992184713482857, -0.005518217571079731, -0.018142474815249443, 0.026259593665599823, 0.026088707149028778, 0.004343370907008648, 0.002052420750260353, 0.018284879624843597, -0.000296381680527702, -0.015507970936596394, 0.014119516126811504, -0.016390886157751083, -0.02120419591665268, -0.0006933372933417559, -0.01876905933022499, -0.0015878225676715374, -0.01663297601044178, -0.01396999042481184, -0.041924212127923965, -0.002157445065677166, 0.02338300086557865, 0.0104525713250041, 0.0311298668384552, 0.019495327025651932, 0.024579208344221115, 0.013813343830406666, -0.008195443078875542, -0.0037310270126909018, -0.03568684682250023, -0.007419332396239042, 0.03278177231550217, 0.04340523108839989, 0.005984595511108637, 0.01184102613478899, -0.01980862021446228, -0.017800701782107353, -0.013592615723609924, 0.0008023665868677199, -0.04531346634030342, -0.011385328136384487, -0.009242123924195766, -0.0017106473678722978, -0.006369090639054775, 0.0008757945033721626, -0.04707929491996765, -0.006942273583263159, 0.016875064000487328, -0.03896217420697212, -0.0001814558927435428, 0.004247247241437435, 0.0005424763658083975, 0.010295925661921501, -0.00026612047804519534, 0.02010767161846161, 0.0332944318652153, 0.004279288463294506, 0.00255796080455184, 0.0029887377750128508, -0.0057425061240792274, 0.007903511635959148, 0.026957381516695023, 0.006052238401025534, -0.02047792635858059, 0.011734222061932087, 0.021004827693104744, -0.022827619686722755, 0.023397240787744522, -0.01800006814301014, 0.011591816321015358, -0.031329233199357986, -0.0023550328332930803, -4.007939060102217e-05, 0.05009829252958298, 0.001084952731616795, -0.006728664971888065, 0.0031792051158845425, 0.01982286013662815, -0.01946684718132019, 0.006201764103025198, 0.006714424584060907, -0.06345593929290771, -0.024493765085935593, 0.006575578823685646, -0.030560243874788284, -0.05089576542377472, 0.010609217919409275, 0.0145182516425848, 0.02118995413184166, -0.0007405091891996562, 0.011990551836788654, 0.01834184303879738, 0.01731652207672596, 0.018811780959367752, -0.03947483375668526, 0.009327567182481289, -0.01872633770108223, 0.01869785599410534, 0.012310964986681938, 0.03206974267959595, -0.015422527678310871, -0.013813343830406666, -0.005550258792936802, 0.00974054355174303, -0.010011114180088043, 0.006436733528971672, 0.01631968282163143, -0.022172553464770317, -0.01905387081205845, -0.031272273510694504, -0.0008869199082255363, -0.02657288685441017, 0.03933243080973625, 0.013058594428002834, -0.008323607966303825, -0.036569759249687195, 0.011983431875705719, 0.007561737671494484, 0.024821298196911812, -0.028851376846432686, 0.027996942400932312, -0.03827862814068794, -0.020435204729437828, 0.008466013707220554, 0.02549060434103012, 0.00015753621119074523, 0.003624222707003355, -0.01693202741444111, 0.0023318917956203222, -0.035943176597356796, -0.004596141166985035, -0.022129831835627556, -0.021403562277555466, 0.009256364777684212, 0.01905387081205845, -0.011577576398849487, 0.008245284669101238, -0.007383730728179216, 0.012417769059538841, -0.0070704384706914425, 0.014710498973727226, 0.031955819576978683, 0.0339210145175457, -0.01798582822084427, -0.005212045274674892, 0.01985134184360504, -0.004759907256811857, -0.025946302339434624, 0.00407636072486639, 0.010466812178492546, -4.166476719547063e-05, -0.00194561667740345, 0.026373518630862236, 0.025889338925480843, -0.029449479654431343, 0.008458892814815044, 0.03255392238497734, 0.0029780573677271605, 0.016490569338202477, -0.0027395279612392187, -0.015963668003678322, 0.012481851503252983, -0.006767826620489359, -0.012973151169717312, -0.034091901034116745, 0.008466013707220554, 0.005368691403418779, 0.04833246394991875, -0.011114757508039474, -0.022443123161792755, -0.026088707149028778, -0.00165902532171458, 0.014546733349561691, 0.0035423394292593002, -0.010908269323408604, -0.04451599344611168, 0.010794345289468765, -0.0388767309486866, 0.017045950517058372, 0.03397797793149948, 0.031215310096740723, -0.006895991507917643, 0.03429127112030983, -0.002625603461638093, -0.0008935952209867537, -0.017117153853178024, -0.0021467646583914757, 0.013920147903263569, -0.0022482285276055336, -0.01341460831463337, 0.039104580879211426, -0.016020631417632103, 0.024977942928671837, -0.02190198190510273, -0.019609251990914345, -0.028523843735456467, -0.014418567530810833, 0.04500017315149307, -0.028751691803336143, 0.0018121113535016775, -0.018826020881533623, 0.011698620393872261, -0.005521777551621199, -0.009014274924993515, 0.009263484738767147, 0.02264249138534069, 0.01982286013662815, 0.007191483397036791, -0.02614567056298256, 0.038734324276447296, 0.01253881398588419, -0.0177294984459877, -0.00318098533898592, -0.026715291664004326, -0.013841825537383556, -0.017786459997296333, 0.04975651949644089, -0.03181341290473938, -0.03668368607759476, -0.00741221196949482, -0.034832410514354706, -0.0155649334192276, -0.00990431010723114, 0.0002983842568937689, -0.012588655576109886, 0.01839880459010601, -0.016106074675917625, -0.00018635108426678926, -0.014881386421620846, 0.018470007926225662, -0.016163036227226257, -0.010096557438373566, -0.007931992411613464, -0.017231078818440437, -0.03141467645764351, 0.007654301356524229, 0.037965334951877594, 0.02015039324760437, 0.022784898057579994, 0.005083880387246609, 0.019552290439605713, -0.03318050503730774, 0.033465318381786346], "index": 58}, {"title": "Alexis Arg\u00fcello", "text": "Alexis Arg\u00fcello (April 19, 1952 \u2013 July 1, 2009), also known by the ring name El Flaco Explosivo (lit. \"The Explosive Thin Man\"), was a Nicaraguan professional boxer and politician. As a boxer he was a three-time world champion, and has regularly been cited as one of the greatest fighters of his era, having never lost any of his world titles in the ring, instead relinquishing them each time in pursuit of titles in higher weight classes. His trainer was Daniel Lozano.", "vector": [0.05211864411830902, 0.020026104524731636, -0.011991768144071102, -0.012148572131991386, -0.023879000917077065, 0.01432142686098814, 0.007007643114775419, -0.012297909706830978, -0.023834198713302612, -0.004621983040124178, -0.07520616054534912, 0.03527342155575752, -0.02779163233935833, -0.012596583925187588, 0.018562600016593933, 0.03760308027267456, -0.047847602516412735, 0.00825087446719408, -0.05531445890665054, -0.07867077738046646, 0.00013743678573518991, 0.00100242521148175, -0.005189463961869478, 0.008400211110711098, 0.04512966796755791, 0.02590998448431492, -0.005827879998832941, 0.007877531461417675, -0.019413821399211884, 0.017576975747942924, -0.02556650899350643, 0.019249550998210907, 0.026223592460155487, 0.03864843770861626, 0.0020701854955404997, -0.03145039081573486, 0.0540301576256752, 0.025581443682312965, 0.00835540983825922, 0.005663609132170677, 0.02422247640788555, -0.05501578375697136, -0.041694916784763336, -0.04435311630368233, -0.012081370688974857, -0.020563717931509018, -0.023072579875588417, 0.008698885329067707, -0.007653526030480862, -0.02856818586587906, 0.033511243760585785, -0.020578650757670403, -0.016158273443579674, -0.020294910296797752, 0.0528951957821846, -0.027059881016612053, 0.0013785680057480931, -0.0034515534061938524, 0.0038024955429136753, 0.04832548275589943, 0.048773493617773056, -0.02523796819150448, 0.019727429375052452, -0.009191697463393211, -0.019921567291021347, 0.009072228334844112, 0.013828614726662636, -0.0037296938244253397, -0.06839638948440552, 0.012387511320412159, -0.002960607875138521, 0.0023203250020742416, -0.0315101258456707, -0.041127435863018036, -0.004371843300759792, -0.0030744774267077446, 0.009049827232956886, -0.00561134098097682, -0.038887377828359604, 0.024371812120079994, 0.012066436931490898, -0.046891845762729645, 0.0337800495326519, 0.055463794618844986, -0.01288779079914093, -0.04874362424015999, 0.007623658515512943, -0.07472828030586243, -0.02138507179915905, 0.02637293003499508, 0.008669017814099789, -0.02882205881178379, -0.056061144918203354, 0.031420525163412094, 0.045756883919239044, 0.0003367084718775004, 0.038499101996421814, 0.0033059497363865376, 0.011342152021825314, -0.03826016187667847, -0.019846899434924126, 0.030643969774246216, -0.027209216728806496, 0.020130639895796776, -0.009572507813572884, 0.013081928715109825, -0.041336506605148315, 0.006544698029756546, 0.015269717201590538, 0.07843183726072311, 0.03130105510354042, -0.023206982761621475, -0.0016352410893887281, 0.03602010756731033, -0.007877531461417675, 0.027492957189679146, -0.017830848693847656, 0.04832548275589943, 0.01455289963632822, 0.00853461492806673, 0.019622894003987312, -0.03903671354055405, 0.0033638179302215576, 0.04662303999066353, 0.05313413590192795, -0.041903987526893616, 0.011782696470618248, 0.016292676329612732, -0.01438862830400467, 0.012895257212221622, 0.0003502421313896775, 0.012529381550848484, 0.06905347108840942, 0.03189840167760849, -0.03787188604474068, 0.02740335650742054, -0.06439415365457535, -0.012118704617023468, -0.026895610615611076, 0.0360499732196331, 0.020294910296797752, 0.017621776089072227, -0.012708586640655994, 0.0021373871713876724, -0.015665460377931595, -0.05161089822649956, 0.04139624163508415, -0.012006701901555061, -0.010513330809772015, -0.001219897298142314, -0.030076488852500916, -0.011566157452762127, 0.006369227077811956, -0.013208865188062191, 0.021519474685192108, 0.0026918009389191866, -0.064155213534832, 0.011924566701054573, 0.0177412461489439, 0.009923449717462063, -0.01455289963632822, 0.05193943902850151, -0.011536289937794209, 0.007810329552739859, -0.001084560644812882, -0.01709909737110138, 0.05423923209309578, 0.012200839817523956, 0.008893023245036602, 0.0511927530169487, 0.018637267872691154, -0.023416055366396904, -0.0008689551614224911, 0.057584382593631744, 0.0006407494656741619, 0.006813504733145237, 0.028702588751912117, -0.012872857041656971, -0.005917482078075409, -0.005357468035072088, -0.004065702203661203, -0.024162741377949715, -0.013694210909307003, 0.007929799146950245, -0.0060630859807133675, 0.025267835706472397, 0.011200281791388988, -0.060272447764873505, 0.02252003364264965, -0.05152129754424095, 0.009632241912186146, -0.007944732904434204, -0.05229784920811653, -0.009512772783637047, 0.006238556932657957, 0.04987858608365059, 0.0286727212369442, -0.0371849350631237, -0.042083192616701126, 0.023057647049427032, 0.04850468784570694, -0.03957432880997658, -0.020683186128735542, 0.01026692520827055, -0.024580884724855423, -0.011289884336292744, 0.020011169835925102, 0.041336506605148315, -0.048415083438158035, 0.010826938785612583, 0.016232941299676895, 0.04223252832889557, -0.006048152223229408, -0.017621776089072227, -0.005189463961869478, -0.002452861750498414, 0.0075751240365207195, -0.022012287750840187, -0.0018639134941622615, -0.019040478393435478, 0.0224752314388752, 0.03566169738769531, -0.047100916504859924, -0.00475265271961689, 0.02322191745042801, -0.017532173544168472, 0.004536114167422056, -0.015545991249382496, 0.017502306029200554, -0.025163300335407257, -0.007646059151738882, -0.01606867089867592, 0.03009142354130745, 0.04073915630578995, 0.05364188179373741, 0.03817056119441986, 0.009923449717462063, -0.053373076021671295, -0.006496163550764322, 0.03375018388032913, -0.027104681357741356, 0.04563741385936737, -0.02832924574613571, -0.01766657829284668, 0.027343621477484703, 3.473837205092423e-05, -0.024625686928629875, -0.017412705346941948, -0.04393497109413147, 0.042680539190769196, -0.0043494426645338535, -0.024909427389502525, 0.05868947505950928, 0.015710262581706047, -0.029971953481435776, -0.028866859152913094, 0.0455179437994957, -0.04984872043132782, 0.025656111538410187, 0.004009700845927, -0.03437739610671997, -0.04369603097438812, 0.06839638948440552, 0.06391627341508865, -0.06397601217031479, -0.02446141466498375, 0.035811033099889755, 0.01639721170067787, -0.007212981581687927, -0.07944732904434204, -0.0027104681357741356, 0.00647749612107873, 0.04199358820915222, 0.0068844398483633995, 0.005361201707273722, 0.018786605447530746, -0.020160507410764694, 0.04411417618393898, 0.00727644981816411, 0.027537759393453598, 0.010222123935818672, -0.02647746540606022, 0.05173036828637123, -0.07251808792352676, 0.04429338127374649, 0.007354851812124252, -0.03948472812771797, -0.011080811731517315, 0.022325895726680756, 0.0002353225863771513, -0.02729881927371025, -0.002740335650742054, -0.018741805106401443, 0.015575858764350414, 0.0154713224619627, 0.016471881419420242, -0.02616385743021965, -2.660066820681095e-05, 0.03500461205840111, -0.00036144242039881647, 0.02938953973352909, 0.06278131157159805, -0.046324364840984344, -0.039454858750104904, 0.014493164606392384, -0.004801187198609114, 0.0135075394064188, 0.07526589184999466, -0.025163300335407257, 0.008930358104407787, -0.07669953256845474, 0.030285561457276344, 0.010505864396691322, -0.004446511622518301, 0.019249550998210907, 0.015165181830525398, 0.050685007125139236, -0.01639721170067787, -0.0023819266352802515, -0.0007527522393502295, 0.013559808023273945, 0.03009142354130745, 0.03148026019334793, -0.005898815114051104, -0.016800422221422195, -0.03739400580525398, 0.01455289963632822, 0.008795954287052155, -0.011782696470618248, 0.006107886787503958, -0.045368608087301254, -0.010580533184111118, -0.04943057522177696, -0.007201781030744314, -0.029658345505595207, 0.005237998440861702, -0.060989268124103546, 0.03742387518286705, 0.012805655598640442, -0.0036064907908439636, 0.012133638374507427, 0.045159537345170975, 0.03270482271909714, 0.032167207449674606, -0.04085862636566162, -0.010961342602968216, -0.017472438514232635, -0.0038752974942326546, 0.03566169738769531, 0.021519474685192108, 0.0007289516506716609, 0.014187023043632507, 0.03091277740895748, 0.035064347088336945, -0.0010154922492802143, 0.031629595905542374, 0.03500461205840111, 0.003705426584929228, 0.03852896764874458, -0.0033078165724873543, 0.02461075223982334, 0.07562430202960968, -0.011200281791388988, 0.05543392896652222, 0.034676071256399155, 0.02187788300216198, 0.03342163935303688, -0.009146897122263908, -0.031629595905542374, -0.006003350950777531, -0.012200839817523956, 0.010625333525240421, -0.03631877899169922, -0.015060645528137684, 0.0239387359470129, -0.013537406921386719, 0.0337800495326519, -0.03357097879052162, -0.028598053380846977, -0.008497280068695545, -0.03700572997331619, 0.04450245201587677, -0.0094157038256526, -0.001339367008768022, -0.0037763617001473904, -0.026746273040771484, -0.023923801258206367, -0.044203776866197586, 0.03363071382045746, -0.042650673538446426, 0.030046623200178146, 0.018189257010817528, 0.009281300008296967, -0.0018107121577486396, -0.029285002499818802, -0.028986329212784767, 0.014799305237829685, 0.019846899434924126, 0.03357097879052162, -0.03443713113665581, -0.022968044504523277, -0.015269717201590538, -0.04262080416083336, -0.019817031919956207, 0.0275825597345829, 0.0039648995734751225, 0.00430090818554163, 0.018144456669688225, -0.0074332538060843945, -0.04719052091240883, 0.01435876078903675, 0.07640085369348526, -0.06493176519870758, -0.04017167538404465, -0.0021205865778028965, -0.06827691942453384, 0.007989534176886082, -0.011319750919938087, 0.03721480444073677, -0.01851779967546463, -0.009161830879747868, 0.034825410693883896, 0.026567067950963974, -0.03091277740895748, 0.04542834311723709, 0.008915424346923828, 0.04847481846809387, 0.029464207589626312, 0.045547813177108765, -0.05408989265561104, -0.032585352659225464, 0.0005189463845454156, 0.003393685445189476, 0.03055436909198761, -0.03413845971226692, -0.10053373128175735, 0.005607607774436474, 0.01848793216049671, -7.262682629516348e-05, -0.006014551036059856, -0.003602757351472974, 0.01777111366391182, -0.0077057937160134315, -0.03437739610671997, -0.016277743503451347, -0.007515389006584883, -0.014702236279845238, 0.045965954661369324, -0.007582590915262699, -0.020399445667862892, 0.016979627311229706, -0.020279977470636368, 0.020384512841701508, -0.019309286028146744, 0.015590792521834373, -0.009355968795716763, -0.040231410413980484, -0.004248640034347773, -0.016277743503451347, -0.006283358205109835, 0.01738283783197403, 0.03646811842918396, 0.023983536288142204, -0.031032247468829155, -0.00916929729282856, 0.034676071256399155, -0.005122262053191662, -0.018756737932562828, -0.015068111941218376, -0.0026171323843300343, 0.025297703221440315, -0.0005922148702666163, 0.044801127165555954, -0.08589869737625122, 0.03213734179735184, -0.003335817251354456, 0.01140188705176115, -0.014343827031552792, 0.017218565568327904, -0.013798747211694717, 0.028762323781847954, -0.026865743100643158, 0.04999805614352226, -0.020683186128735542, 0.07658006250858307, -0.03342163935303688, -0.018219124525785446, -0.029942085966467857, 0.02290830947458744, -0.004838521592319012, 0.06397601217031479, 0.014724637381732464, -0.03073357231914997, 0.06379680335521698, -0.02789616771042347, -0.03171919658780098, -0.025163300335407257, 0.019428756088018417, 0.011327218264341354, 0.01002051867544651, 0.06385654211044312, 0.011760295368731022, 0.014791838824748993, 0.054298967123031616, 0.0477878674864769, 0.0028318045660853386, 0.02585024945437908, 0.0360499732196331, 0.010819472372531891, -0.055493663996458054, 0.0315101258456707, 0.030853042379021645, -0.005630008410662413, -0.020160507410764694, 0.030001820996403694, -0.0247451551258564, -0.010057852603495121, -0.02414780668914318, 0.06761983036994934, 0.028598053380846977, -0.0005394802428781986, -0.005249198526144028, 0.0019731163047254086, 0.014702236279845238, 0.031808800995349884, 0.006645500659942627, -0.02991221845149994, -0.00017838782514445484, -0.0135075394064188, 0.001358034205622971, 0.004241173155605793, 0.005264132283627987, -0.026133989915251732, 0.0038416965398937464, -0.03861857205629349, 0.02647746540606022, 0.016188140958547592, 0.016277743503451347, -0.007660992443561554, -0.003908898215740919, -0.016949759796261787, 0.029792748391628265, 0.026417730376124382, 0.004689184483140707, -0.047996941953897476, 0.011946966871619225, 0.025924919173121452, -0.0456075482070446, -0.002413660753518343, 0.03533315658569336, -0.018174324184656143, 0.0066156331449747086, 0.036945994943380356, 0.023356320336461067, -0.013821147382259369, -0.004931857343763113, 0.00343848648481071, -0.00911702960729599, -0.004603315610438585, 0.030853042379021645, 0.022923242300748825, -0.08536107838153839, 0.006828438490629196, 0.01862233504652977, -0.02719428390264511, -0.003845429979264736, 0.04641396552324295, 0.005626274738460779, -0.031420525163412094, 0.004513713531196117, 0.011932033114135265, 0.01341793779283762, 0.0455179437994957, -0.0069852424785494804, 0.016023870557546616, 0.019802097231149673, 0.02846364863216877, -0.06911320239305496, 0.03843936696648598, -0.0013431004481390119, 0.03440726548433304, -0.02208695560693741, 0.027522824704647064, 0.04468165710568428, -0.003761427942663431, -0.007855131290853024, 0.004364376422017813, 0.011760295368731022, -0.026567067950963974, -0.010289325378835201, -0.01288779079914093, -0.05035646632313728, -0.01008772011846304, 0.013768879696726799, -0.042680539190769196, 0.025118498131632805, 0.03148026019334793, -0.023923801258206367, 0.02552170865237713, -0.001074293628334999, 0.01989169977605343, 0.013813680969178677, 0.021997353062033653, -0.004831054713577032, -0.0035878235939890146, -0.0239387359470129, -0.010438662953674793, -0.01261898409575224, -0.02205708809196949, -0.04181438311934471, 0.013350735418498516, -0.04061968997120857, -0.01663615182042122, -0.016830289736390114, 0.021922685205936432, -0.014381161890923977, -0.0012964325724169612, -0.020011169835925102, 0.020384512841701508, 0.018502864986658096, 0.022490166127681732, -0.03566169738769531, -0.0048347883857786655, -0.02050398290157318, 0.013268600217998028, -0.008579416200518608, 0.029180467128753662, 0.01523984968662262, -0.02148960717022419, 0.061168473213911057, -0.04817614331841469, -0.014642501249909401, -0.014007818885147572, 0.0005530139314942062, -0.030569301918148994, -0.010617867112159729, 0.05609101057052612, 0.032167207449674606, 0.009796513244509697, -0.0365278534591198, -0.005693476647138596, 0.019145015627145767, -0.015799863263964653, -0.0686950609087944, -0.010894140228629112, -0.028583118692040443, -0.03443713113665581, 0.007847663946449757, 0.004442778415977955, 0.017427638173103333, 0.0016361745074391365, -0.01699456013739109, 0.0012357643572613597, -0.00949037168174982, 0.0270150788128376, -0.021758414804935455, 0.0456075482070446, 0.009923449717462063, 0.0085868826135993, -0.01290272455662489, -0.07186100631952286, 0.0048347883857786655, -0.005532938987016678, -0.020414380356669426, -0.01663615182042122, 0.033690448850393295, -0.026298262178897858, -0.012081370688974857, 0.0048347883857786655, -0.03476567566394806, -0.03395925462245941, -0.016680952161550522, -0.013126729987561703, 0.012148572131991386, 0.012342710047960281, -0.008482346311211586, -0.008459946140646935, 0.04118717089295387, -0.045010197907686234, -0.027836432680487633, 0.01671081967651844, 0.014291559346020222, -0.03721480444073677, -0.022460298612713814, -0.01805485412478447, 0.0018657802138477564, 0.004778787028044462, 0.022878441959619522, -0.001563372672535479, 0.004005967639386654, 0.03261522203683853, -0.023879000917077065, -0.006656700745224953, -0.0007345518097281456, 0.003662492148578167, 0.012409912422299385, -0.0010098920902237296, -0.019025545567274094, 0.0012133638374507427, -0.0033078165724873543, 0.014231824316084385, 0.03610970824956894, 0.025372371077537537, -0.06791850924491882, 0.004241173155605793, -0.017800981178879738, -0.005742011126130819, -0.02177334763109684, -0.01735297031700611, -0.01730816811323166, 0.00040951030678115785, -0.02422247640788555, 0.03306323289871216, 0.026582002639770508, -0.010968809016048908, -0.025969719514250755, -0.028866859152913094, 0.01854766719043255, 0.0003073077241424471, -0.0239387359470129, -0.02138507179915905, 0.04318828508257866, -0.004509980324655771, -0.01929435133934021, -2.1408872271422297e-05, -0.02205708809196949, 0.005868947599083185, 0.04130663722753525, -0.008990093134343624, 0.0056150746531784534, -0.0008381544030271471, 0.004297174513339996, 0.019339153543114662, -0.007407119497656822, 0.042083192616701126, -0.0427701435983181, 0.014806772582232952, -0.010505864396691322, 0.01025199145078659, -0.013440337963402271, -0.010737337172031403, 0.009184231050312519, -0.02216162346303463, -0.0027702029328793287, -0.02517823316156864, 0.009923449717462063, 0.008698885329067707, 0.04474139213562012, -0.0405002199113369, 0.005622541531920433, 0.033690448850393295, 0.005764411762356758, 0.004924390465021133, -0.03422806039452553, -0.01007278636097908, 0.005980950314551592, 0.03512408211827278, 0.01283552311360836, -0.04996819049119949, -0.0016240408876910806, 0.01084933988749981, 0.02283364161849022, -0.004580915439873934, 0.010475996881723404, 0.007758061867207289, 0.01347020547837019, -0.0044502452947199345, 0.04082876071333885, -0.023595260456204414, 0.04987858608365059, 0.0013010994298383594, -0.03148026019334793, 0.00670150201767683, 0.007653526030480862, -0.011439220979809761, -0.010909073986113071, -0.027836432680487633, 0.011745361611247063, -0.0077057937160134315, -0.01513531431555748, -0.051849838346242905, 0.016845224425196648, -0.023998470976948738, 0.0029344737995415926, -0.005469470750540495, -0.0019152481108903885, 0.040410615503787994, 0.011058411560952663, 0.014784371480345726, -0.004905723500996828, 0.0016921758651733398, 0.025641178712248802, 1.8127539078705013e-05, -0.02489449270069599, -0.03691612929105759, -0.013641943223774433, 0.016979627311229706, -0.023953668773174286, 0.02213175594806671, -0.020668253302574158, -0.008982625789940357, -0.010752269998192787, -0.01621800847351551, 0.019712496548891068, 0.0012805655132979155, -0.027268951758742332, 0.004599582403898239, 0.024760089814662933, -0.00772819435223937, -0.012424846179783344, 0.014642501249909401, -0.010446129366755486, 0.032376281917095184, 0.01585959829390049, 0.01745750568807125, 0.030031688511371613, 0.033899519592523575, 0.012006701901555061, -0.025252901017665863, -0.0029102065600454807, -0.006555898115038872, 0.009199164807796478, 0.005809212569147348, -0.001922714989632368, 0.008377810940146446, -0.005402269307523966, 0.04259093850851059, 0.005107328295707703, 0.0009688243735581636, -0.013029661029577255, -0.03891724720597267, -0.012783254496753216, 0.005432136822491884, 0.014351294375956059, 0.02358032576739788, -0.022355761379003525, 0.020369578152894974, -0.019055413082242012, 0.024416614323854446, 0.06439415365457535, 0.0024211276322603226, 0.014769437722861767, -0.024117939174175262, -0.017427638173103333, -0.023983536288142204, -0.011439220979809761, -0.02598465420305729, 0.021862950176000595, 0.022400563582777977, -0.058898549526929855, -0.02425234392285347, 0.02903112955391407, 0.005099861416965723, -0.020862391218543053, -0.007235381752252579, -0.021131198853254318, 0.01432142686098814, 0.026328129693865776, -0.0010546932462602854, 0.01730816811323166, -0.008781020529568195, 0.01989169977605343, 0.029718080535531044, -0.025581443682312965, 0.017412705346941948, -0.04029114544391632, 0.023744598031044006, -0.01593426801264286, -0.03802122175693512, -0.029434340074658394, -0.02035464532673359, 0.030210893601179123, 0.006234823260456324, -0.0393652580678463, -8.87272326508537e-05, 0.0024080604780465364, 0.008452478796243668, 0.0018480464350432158, 0.013656876981258392, 0.027836432680487633, 0.0008050202741287649, -0.023625127971172333, -0.018428197130560875, 0.006428961642086506, 0.03843936696648598, 0.011640826240181923, 0.01730816811323166, -0.02443154715001583, -0.03291389346122742, -0.02580544911324978, 0.014306493103504181, 0.006343092769384384, 0.005992150865495205, -0.001960049383342266, 0.005454536993056536, 0.029822615906596184, -0.03566169738769531, 0.0023016578052192926, 0.030882909893989563, -0.021638944745063782, 0.009064760990440845, 0.0224752314388752, 0.03395925462245941, 0.001768711139447987, -3.3717515179887414e-05, 0.015560925006866455, -0.02241549640893936, 0.021862950176000595, -0.009542640298604965, 0.0009268232970498502, 0.012499514035880566, -0.011155480518937111, 0.03282429277896881, -0.003277949057519436, 0.015015844255685806, 0.031241318210959435, -0.001004291931167245, -0.0011480288812890649, 0.008459946140646935, 0.02074292115867138, 0.026955343782901764, -0.026133989915251732, -0.02156427502632141, -0.005462003871798515, -0.013477671891450882, -0.003296616254374385, -0.01568039506673813, 0.004498779773712158, -0.016949759796261787, 0.007015109993517399, 0.017248433083295822, -0.008116470649838448, 0.0015708395512774587, 0.009057294577360153, 0.011036010459065437, 0.004431578330695629, 0.053402941673994064, 0.01432142686098814, -0.015426521189510822, -0.015307052060961723, 0.0021000527776777744, 0.048982564359903336, -0.0060257515870034695, 0.020832523703575134, 0.011693093925714493, -0.014015286229550838, -0.02931487001478672, 0.021370137110352516, 0.029374605044722557, 0.004756386391818523, 0.005465737544000149, -0.004987858701497316, -0.003397418884560466, 0.01617320626974106, 0.003257415257394314, -0.007855131290853024, 0.01438862830400467, -0.03996260464191437, 0.006264690775424242, -0.038857512176036835, -0.011484022252261639, 0.018189257010817528, 0.02541717328131199, 0.004028367809951305, -0.02378939837217331, -0.03279442340135574, 0.046712640672922134, -0.03148026019334793, -0.03386965021491051, 0.008191139437258244, -0.020668253302574158, 0.011834964156150818, -0.00756019027903676, 0.03855883702635765, 0.00515212956815958, 0.03763294592499733, -0.03682652488350868, -0.026208659633994102, 0.023774463683366776, 0.01545638870447874, -0.02988235093653202, -0.010647734627127647, 0.00835540983825922, -0.040410615503787994, -0.006735102739185095, -0.0058204131200909615, 0.008347943425178528, 0.03864843770861626, -0.04748919606208801, 0.03876790776848793, -0.03688625991344452, 0.013089396059513092, 0.022564833983778954, -0.029733015224337578, 0.035422757267951965, -0.006354293320327997, -0.05364188179373741, -0.017517240718007088, 0.009184231050312519, -0.04566728323698044, 0.007922332733869553, 0.025551576167345047, -0.021325336769223213, 0.014829172752797604, -0.003029676154255867, 0.028612986207008362, 0.01929435133934021, 0.004215039312839508, -0.03476567566394806, 0.005428403150290251, 0.0014793705195188522, 0.04396484047174454, -0.02906099706888199, 0.013410470448434353, -0.010461063124239445, -0.022012287750840187, 0.03969379886984825, 0.008855689316987991, -0.0154713224619627, 0.05331334099173546, 0.008452478796243668, -0.02722415141761303, -0.006343092769384384, 0.0483553484082222, -2.528813638491556e-05, 0.001624974189326167, 0.024088071659207344, -0.006850839126855135, 0.01978716440498829, -0.01037146057933569, 0.00028630721499212086, -0.01936902105808258, -0.001267498591914773, -0.006723902653902769, -0.030972512438893318, 0.0029008728452026844, 0.00350008811801672, 0.0264475978910923, -0.022534966468811035, -0.011730428785085678, 0.025342503562569618, 0.003229414578527212, -0.014508098363876343, 0.0021971219684928656, -0.006779904011636972, -0.022296028211712837, -0.0478774718940258, -0.011991768144071102, -0.025790514424443245, 0.0270150788128376, -0.016845224425196648, -0.003920098766684532, 0.00629455829039216, -0.01820419169962406, -0.019637826830148697, -0.015799863263964653, -0.014717170037329197, 0.004879589192569256, -0.025730781257152557, 0.007944732904434204, 0.016830289736390114, -0.025372371077537537, -0.0041702380403876305, -0.01699456013739109, 0.003296616254374385, 0.022594701498746872, 0.011028544045984745, 0.0003110411635134369, -0.029971953481435776, -0.0216688122600317, 0.037543345242738724, -0.030419964343309402, -0.0011788296978920698, 0.00041604379657655954, -0.030390096828341484, -0.00772819435223937, -0.04148584231734276, 0.015874532982707024, -0.010490930639207363, -0.006828438490629196, 0.044412851333618164, 0.008982625789940357, -0.0069217742420732975, -0.02014557272195816, -0.025999587029218674, -0.0005777478800155222, 0.0027384688146412373, 0.029538875445723534, 0.0399327389895916, -0.05417949706315994, -0.010819472372531891, 0.007459387648850679, -0.01083440613001585, -0.02779163233935833, -0.015545991249382496, 0.005428403150290251, 0.021967485547065735, 0.006682834587991238, 0.023416055366396904, 0.021444806829094887, -0.01087174005806446, -0.034825410693883896, -0.0055777402594685555, -0.023072579875588417, 0.021190933883190155, -0.0023613928351551294, 0.007410853169858456, -0.006903106812387705, 0.009348501451313496, 0.05868947505950928, 0.01568039506673813, 0.019996237009763718, 0.03688625991344452, 0.01720363274216652, -0.024879559874534607, 0.008123937994241714, -0.024670487269759178, -0.007455653976649046, -0.009064760990440845, 0.007758061867207289, -0.00047647865721955895, -0.0073212506249547005, 0.007291383575648069, 0.0023987269960343838, 0.015874532982707024, -0.005827879998832941, -0.008019401691854, 0.047668397426605225, 0.022594701498746872, 0.02800070494413376, -0.008728752844035625, -0.027851367369294167, -0.015889465808868408, 0.0017715112771838903, 0.00366435875184834, -0.0019171148305758834, -0.008385277353227139, -0.036199308931827545, -0.011693093925714493, -0.03784201666712761, 0.01869700290262699, 0.0030315429903566837, -0.013873415999114513, 0.005364934913814068, -0.010946408845484257, -0.00996825098991394, -0.006832171697169542, 0.002703001257032156, 0.016680952161550522, 0.001390701625496149, 0.011103212833404541, -0.0140750203281641, 0.021131198853254318, -0.007112178951501846, 0.02499902807176113, -0.015545991249382496, -0.007772995624691248, 0.018368462100625038, -0.0050289263017475605, -0.02241549640893936, 0.0023053912445902824, 0.02275897189974785, 0.014194490388035774, -0.016845224425196648, 0.0011797629995271564, -0.01720363274216652, -0.005350001156330109, -0.002585398266091943, -0.02562624402344227, -0.010707469657063484, 0.003765161382034421, 0.015844665467739105, 3.3425840229028836e-05, 0.0002009050513152033, 0.00826580822467804, -0.007825263775885105, -0.024386746808886528, 0.04713078588247299, -0.008810888044536114, -0.027239084243774414, -0.010349060408771038, -0.007459387648850679, -0.020518915727734566, -0.005547872744500637, 0.006974041927605867, 3.823846054729074e-05, -0.02995702065527439, 0.00532760052010417, 0.00012600317131727934, 0.0022419230081140995, 0.005656142253428698, 0.007205514702945948, 0.0076385922729969025, -0.05767398327589035, -0.00854954868555069, 0.0149038415402174, -0.021161066368222237, 0.004047035239636898, -0.009856248274445534, -0.009863714687526226, 0.053014665842056274, -0.05229784920811653, 0.01932421885430813, 0.057614248245954514, -0.00021513874526135623, -0.020548783242702484, -0.027522824704647064, 0.0023221918381750584, 0.007489255163818598, 0.020369578152894974, -0.0031230119056999683, -0.0005805479595437646, -0.023416055366396904, 0.03882764279842377, 0.034676071256399155, -0.01745750568807125, -0.019130080938339233, -0.013813680969178677, -0.00015902066661510617, -0.029613545164465904, 0.026104122400283813, -0.025790514424443245, -0.010767203755676746, -0.043248020112514496, 0.013813680969178677, 0.029270069673657417, -0.0065782987512648106, -0.013627009466290474, 0.05173036828637123, 0.00973677821457386, -0.031062114983797073, -0.03479554131627083, 0.000432377535616979, 0.0043121082708239555, 0.021638944745063782, -0.02141493931412697, 0.006507363636046648, -0.015889465808868408, -0.008138871751725674, 0.011812563985586166, 0.007063644472509623, -0.04205332323908806, -0.02290830947458744, -0.02265443652868271, 0.008736219257116318, -0.004946791101247072, 0.015949200838804245, -0.02616385743021965, -0.02378939837217331, 0.016964692622423172, -0.027746831998229027, 0.029255134984850883, -0.0031248785089701414, 0.003399285487830639, 0.010147455148398876, 0.008706352673470974, 0.026955343782901764, -0.028836991637945175, 0.011610958725214005, 0.026044389232993126, -0.01848793216049671, -0.01898074336349964, -0.017039362341165543, 0.04091836139559746, 0.015045711770653725, -0.010214656591415405, -0.030016755685210228, -0.026253459975123405, -0.002208322286605835, -0.006481229793280363, -0.020668253302574158, 0.02807537280023098, -0.002581664826720953, -0.008482346311211586, 0.0034067523665726185, -0.01706922985613346, -0.009841314516961575, 0.00010383594781160355, 0.0309426449239254, 0.0286727212369442, -0.002663800260052085, -0.03814069181680679, -0.017084162682294846, 0.010864273644983768, 0.015904400497674942, 0.015157714486122131, 0.010707469657063484, -0.0500577911734581, -0.01311926357448101, 0.02634306252002716, -0.013231266289949417, 0.03891724720597267, 0.0026918009389191866, -0.012738454155623913, -0.00805673561990261, 0.03682652488350868, 0.0012310976162552834, -0.0025480641052126884, -0.004319575149565935, -0.03174906596541405, 0.022176558151841164, 0.01380621362477541, -0.019100213423371315, 0.036169443279504776, 0.03930552303791046, 0.004741452634334564, 0.023729663342237473, -0.00716818030923605, 0.0008731553098186851, 0.03091277740895748, -0.03497474640607834, -0.05540405958890915, -0.022101888433098793, 0.017621776089072227, 0.021549342200160027, -0.0015167047968134284, 0.03590063750743866, -0.013276067562401295, -0.0036736924666911364, -0.0023427256383001804, 0.0143363606184721, -0.009094628505408764, 0.0022120557259768248, 0.014747037552297115, -0.011342152021825314, 0.0433376245200634, -0.004890789743512869, -0.04829561337828636, -0.00996825098991394, -0.0013300334103405476, -0.006496163550764322, 0.006350559648126364, -0.02665667049586773, -0.009841314516961575, -0.002473395550623536, -0.008176205679774284, -0.03509421646595001, -0.00920663122087717, 0.033720314502716064, -0.02311738207936287, 0.025148365646600723, -0.02765722945332527, -0.00018772139446809888, 0.0025499307084828615, -0.011498956009745598, -0.019025545567274094, 0.008848222903907299, -0.031032247468829155, 0.014597700908780098, -0.020294910296797752, -0.002374459756538272, -0.011954434216022491, -0.009647175669670105, 7.927699334686622e-05, 0.002335258759558201, 0.020907191559672356, 0.010894140228629112, 0.00658576563000679, -0.04053008556365967, -0.018039921298623085, 0.027358554303646088, -0.014597700908780098, -0.01456783339381218, -0.03897697851061821, 0.022400563582777977, -0.020100772380828857, -0.03153999149799347, -0.02882205881178379, -0.024341944605112076, -0.0016352410893887281, 0.010147455148398876, 0.027955902740359306, -0.0013552340678870678, 0.023445922881364822, -0.016621217131614685, 0.006066819187253714, -0.0005427469732239842, 0.016277743503451347, -0.02708974853157997, -0.00943810399621725, 0.02967328019440174, -0.06965082138776779, -0.008542081341147423, 0.01865220256149769, 0.001838712953031063, 0.014993444085121155, 0.03300349786877632, 0.003957432694733143, 0.02131040208041668, 0.007855131290853024, -0.005215597804635763, 0.015083045698702335, -0.05543392896652222, -0.010797071270644665, 0.024984095245599747, 0.0026357995811849833, -0.009998118504881859, 0.02365499548614025, 0.01898074336349964, -0.03858870267868042, -0.050117526203393936, -0.0039761001244187355, 0.025581443682312965, -0.021922685205936432, -0.0041067698039114475, 0.017711378633975983, -0.0009538906742818654, -0.011476554907858372, 0.03724467009305954, -0.0085868826135993, -0.006962841842323542, -0.010095187462866306, -0.02934473752975464, -0.009005026891827583, 0.024491282179951668, 0.0224752314388752, 0.006313225254416466, 0.03455660119652748, -0.01578493043780327, 0.0236101932823658, -0.00025690646725706756, -0.0043867770582437515, 0.025939851999282837, 0.018099654465913773, 0.008430078625679016, -0.0066156331449747086, -0.025536641478538513, -0.0188314076513052, -0.028941527009010315, -0.00601828470826149, -0.0018760472303256392, 0.011879765428602695, 0.005051326937973499, -0.0365278534591198, 0.009184231050312519, -0.027537759393453598, 0.03148026019334793, -0.013671810738742352, -0.038319896906614304, -0.007489255163818598, -3.721760367625393e-05, -0.0011928300373256207, 0.048773493617773056, 0.022325895726680756, -0.02074292115867138, 0.012663785368204117, -0.00773566123098135, -0.008101536892354488, 0.009184231050312519, -0.0051297289319336414, -0.010475996881723404, -0.019443688914179802, -0.004495046567171812, -0.00892289076000452, 0.0024024604354053736, 0.023714730516076088, -0.040559954941272736, 0.006081752944737673, 0.017039362341165543, 0.006440162193030119, -0.027672162279486656, 0.005547872744500637, 0.011872299015522003, -0.009975717402994633, -0.017800981178879738, 0.02941940724849701, -0.02970314770936966, 0.018846340477466583, 0.0337800495326519, -0.005898815114051104, 0.002475262153893709, -0.017158832401037216, -0.010998676531016827, -0.0236101932823658, 0.009886114858090878, -0.006727635860443115, -0.004928124137222767, 0.0016025736695155501, -0.02131040208041668, -0.006089219823479652, 0.019145015627145767, 0.015919333323836327, -0.0002452394983265549, -0.004457712173461914, 0.015000910498201847, -0.011431754566729069, -0.02740335650742054, 0.032376281917095184, 0.016949759796261787, -0.003767027985304594, 0.007302583660930395, 0.014425963163375854, -0.018010053783655167, -0.014769437722861767, -0.02499902807176113, -0.004173971712589264, 0.020951993763446808, 0.00973677821457386, 0.014351294375956059, -0.01064026728272438, 0.001246964675374329, -0.015426521189510822, 0.009818913415074348, -0.007660992443561554, 0.015336918644607067, 0.01083440613001585, -0.0037128934636712074, -0.028583118692040443, -0.018786605447530746, 0.0019787163473665714, -0.0022456564474850893, -0.021056529134511948, 0.044203776866197586, -0.01117041427642107, -0.030509566888213158, -0.010475996881723404, 0.037931621074676514, -0.02662680298089981, 0.011633358895778656, -0.01408995408564806, 0.016188140958547592, -0.011043477803468704, -0.0016651084879413247, -0.024655552580952644, 0.002676867414265871, -0.03736414015293121, 0.030584236606955528, 0.010752269998192787, 0.013089396059513092, 0.0182639267295599, -0.01083440613001585, -0.005376134999096394, 0.032167207449674606, -0.0016959093045443296, 0.013477671891450882, 0.024401679635047913], "index": 59}, {"title": "Ogron", "text": "Ogrons are a fictional extraterrestrial race from the British science fiction television series Doctor Who. Ogrons are low-intelligence, ape-like hominids who live in scattered communities on an unnamed planet on the outer fringes of the Milky Way, far from the central spaceways. The dominant lifeform on their home planet is a giant slug-like lizard named the Eater, which preys on and is prayed to by the Ogrons. Ogrons are hired mercenaries.", "vector": [-0.020616374909877777, -0.020223993808031082, -0.02184256725013256, -0.03233877196907997, -0.01177961751818657, 0.003856373718008399, 0.01400311291217804, -0.055652767419815063, -0.029771940782666206, 0.0008685526554472744, -0.037701316177845, 0.056993402540683746, -0.02800622582435608, 0.01667621172964573, 0.024327648803591728, 0.015204780735075474, -0.01393771544098854, 0.03691655397415161, -0.02651844546198845, -0.010136520490050316, 0.03449686989188194, -0.00145610305480659, -0.01051255315542221, -0.04303116351366043, 0.055521972477436066, 0.023232251405715942, 0.037308935075998306, 0.00985858403146267, 0.019897008314728737, -0.012400888837873936, 0.01728113181889057, 0.008195050060749054, 0.006748143117874861, 0.04659529775381088, -0.022839870303869247, -0.04993053898215294, -0.002352244919165969, -0.014117557555437088, 0.0265511441975832, -0.017133990302681923, 0.03318893164396286, -0.015899622812867165, 0.005530125927180052, 0.03268210589885712, -0.02341209165751934, 0.03197908774018288, 0.007586040999740362, 0.003940163645893335, 0.036720361560583115, 0.012163824401795864, -0.0012987416703253984, -0.012572554871439934, -0.004663616884499788, 0.02025669254362583, -0.012245570309460163, 0.02025669254362583, 0.04705307260155678, 0.01621025800704956, 0.007160961162298918, 0.0034721670672297478, -0.03104718215763569, -0.01018556859344244, -0.04332545027136803, 0.01659446582198143, 0.04682418331503868, 0.01798414997756481, 0.019995104521512985, 0.05346197262406349, 0.002429903717711568, -0.011722395196557045, 0.002499388065189123, 0.010733267292380333, 0.012449936009943485, -0.02422955445945263, -0.04770704358816147, 0.011959459632635117, 0.013806921429932117, -0.02941225841641426, -0.010332711040973663, -0.08540835976600647, 0.008607868105173111, 0.031276069581508636, 0.020142247900366783, 0.04986514151096344, 0.052513714879751205, 0.010651521384716034, 0.016283830627799034, -0.053298477083444595, -0.018556371331214905, -0.005252189002931118, -0.0030981784220784903, 0.054704513400793076, -0.0065315160900354385, 0.027662891894578934, 0.0006110523245297372, -0.036524172872304916, -0.011624299921095371, -0.016790656372904778, -0.017624465748667717, 0.011673348024487495, -0.01059429906308651, -0.011125648394227028, -0.028447654098272324, -0.006658222526311874, 0.038191791623830795, 0.049538157880306244, 0.052382923662662506, 0.0602632500231266, -0.03864957019686699, 0.050944190472364426, 0.007095564156770706, -0.016406448557972908, -0.004083219449967146, -0.013847795315086842, 0.007091477047652006, 0.005145919043570757, -0.01819668896496296, 0.005697705317288637, -0.08671630173921585, -0.016054941341280937, 0.0031533571891486645, -0.008526121266186237, -0.02200605906546116, 0.010030250996351242, -0.0014673430705443025, -0.012310967780649662, -0.04989783838391304, 0.05496609956026077, 0.016807004809379578, 0.03904195502400398, -0.006715444847941399, -0.019864309579133987, 0.004855720326304436, -0.017771609127521515, 0.06742420792579651, 0.0265511441975832, 0.025194158777594566, 0.006948421243578196, 0.017640816047787666, 0.04911307618021965, -0.05064990371465683, 0.02025669254362583, 0.012654301710426807, 0.0377667136490345, -0.012229221872985363, 0.0378648079931736, -0.0057058800011873245, 0.011043902486562729, 0.018654467537999153, -0.023281298577785492, 0.0529060959815979, -0.02727051079273224, 0.008836757391691208, -0.0018341788090765476, 0.005068260245025158, -0.008109216578304768, -0.005329847801476717, -0.027515748515725136, -0.02030573971569538, 0.02192431315779686, -0.04924387112259865, 0.03331972286105156, -0.06510262191295624, 0.008231835439801216, 0.01808224432170391, -0.039009254425764084, 0.08880899846553802, 0.035935599356889725, -0.01548271719366312, 0.006482468452304602, -0.01881795935332775, -0.000675427436362952, 0.031390514224767685, 0.027744637802243233, -0.02949400432407856, 0.06912452727556229, 0.012776920571923256, 0.0059347692877054214, -0.005812149960547686, 0.023755425587296486, -0.01016104407608509, 0.01365160383284092, 0.010937632992863655, -0.013586207292973995, 0.02576638199388981, 0.018000498414039612, -0.00024932570522651076, 0.02867654338479042, 0.01971716806292534, -0.0006641873042099178, 0.0037174054887145758, -0.03094908595085144, -0.018670815974473953, -0.011722395196557045, 0.01736287958920002, 0.03016432374715805, -0.0379956029355526, -0.027744637802243233, -0.05656832456588745, -0.02506336383521557, 0.009171916171908379, -0.03191369026899338, 0.043488942086696625, 0.008227747865021229, -0.012997634708881378, -0.023820823058485985, 0.0051336572505533695, -0.009458027780056, -0.007418461609631777, 0.01286684162914753, 0.04898228123784065, -0.005611871834844351, 0.0007275405805557966, 0.05375625565648079, -0.06703183054924011, -0.01577700302004814, 0.005476990714669228, 0.0052113160490989685, 0.002407423686236143, 0.011853189207613468, -0.02653479389846325, -0.02043653279542923, 0.021744471043348312, 0.0010851799743250012, 0.0022704987786710262, -0.029919084161520004, -0.03466036170721054, 0.02566828578710556, -0.017003195360302925, -0.020600026473402977, -0.07455247640609741, 0.020027803257107735, 0.005260363686829805, -0.0113708870485425, -0.08174613118171692, 0.050976887345314026, 0.038911160081624985, 0.011616125702857971, -0.010169219225645065, -0.01880161091685295, 0.02723781205713749, 0.018409229815006256, -0.002517780987545848, 0.011746919713914394, 0.07245977222919464, 0.011166521348059177, -0.013112079352140427, -0.05990356579422951, 0.008150089532136917, 0.029216067865490913, -0.009907631203532219, -0.0023256775457412004, -0.022447487339377403, 0.012785094790160656, -0.004169052932411432, -0.03691655397415161, 0.04842640832066536, 0.007471596356481314, -0.014321922324597836, 0.0020038019865751266, -0.044077515602111816, 0.0010243812575936317, -0.057091500610113144, 0.013324619270861149, -0.03181559592485428, -0.07984962314367294, 0.020125897601246834, -0.045810531824827194, -0.01814764179289341, -0.025553841143846512, -0.023869870230555534, -0.022202249616384506, -0.04594132676720619, -0.00795389898121357, -0.003222841303795576, -0.0008981856517493725, 0.021008756011724472, -0.011346363462507725, 0.08096136897802353, 0.009000249207019806, -0.010708743706345558, -0.059249598532915115, -0.04002290591597557, -0.0013743569143116474, 0.039761319756507874, 0.07030167430639267, -0.01736287958920002, -0.04394672065973282, 0.015531765297055244, 0.03103083185851574, -0.014403668232262135, 0.028218764811754227, 0.021662725135684013, 0.047314662486314774, 0.0053911576978862286, 0.016888750717043877, 0.061571188271045685, 0.007316278759390116, -0.0041281795129179955, -0.00227254256606102, 0.0011710133403539658, -0.008317668922245502, -0.02875828929245472, -0.02859479747712612, 0.001105616451241076, 0.0038911160081624985, -0.07396390289068222, -0.030573053285479546, 0.02408241108059883, 0.010823188349604607, 0.0044592516496777534, -0.003468079725280404, -0.006343499757349491, -0.010144694708287716, -0.033679407089948654, -0.017035894095897675, 0.013545334339141846, 0.01661081425845623, -0.01166517287492752, 0.00018916565750259906, 0.008591518737375736, -0.035118140280246735, -0.06425245851278305, -0.011943110264837742, 0.0454508513212204, 0.032829247415065765, -0.03250226378440857, 0.006380285602062941, -0.03166845068335533, 0.018556371331214905, -0.03345051780343056, -0.00030884711304679513, 0.02182621695101261, -0.022872567176818848, 0.019030500203371048, 0.013005809858441353, -0.03622988611459732, 0.005121395457535982, 0.017755260691046715, -0.0011955371592193842, 0.0033454603981226683, -0.01584240049123764, 0.0603613443672657, -0.016414623707532883, -0.0376359187066555, 0.003811413422226906, 0.03258400782942772, 0.01614486053586006, -0.04607212170958519, 0.029837338253855705, 0.0007295842515304685, 0.025390349328517914, -0.0683397650718689, 0.03423528000712395, -0.011681522242724895, -0.01356985792517662, 0.0023215902037918568, -0.0017084941500797868, 0.03694925084710121, 0.030017180368304253, -0.02957575023174286, -0.01434644591063261, 0.0001129118463722989, -0.0018597245216369629, -0.08069977909326553, -0.024703681468963623, 0.03871496766805649, 0.03619718924164772, -0.008975725620985031, 0.006184095051139593, 0.006813540123403072, 0.01976621523499489, 0.013422715477645397, -0.026060666888952255, -0.04326005280017853, 0.02882368676364422, 0.055391181260347366, 0.017591767013072968, 0.0015286527341231704, 0.015262003056704998, 0.0031697063241153955, 0.03181559592485428, -0.05055180937051773, 0.05382165312767029, 0.014534462243318558, 0.016921449452638626, -0.04218100383877754, -0.024327648803591728, 0.0094662019982934, 0.03878036513924599, 0.0151066854596138, 0.019831612706184387, 0.05002863332629204, 0.02112320065498352, 0.027466701343655586, 0.018490975722670555, -0.008992074988782406, 0.014150255359709263, -0.047151170670986176, 0.04600672423839569, -0.005848935805261135, 0.023068759590387344, 0.025455746799707413, -0.015703432261943817, 0.044993072748184204, -0.041984815150499344, -0.016022242605686188, 0.02354288659989834, -0.022807171568274498, 0.01960272341966629, -0.032845597714185715, 0.023248599842190742, -0.04303116351366043, 0.027417652308940887, 0.0018086332129314542, 0.001165904221124947, 0.013013984076678753, 0.020796217024326324, -0.04034988954663277, -0.0031983174849301577, -0.0377994105219841, 0.020567327737808228, 0.006846238858997822, 0.0226600281894207, -0.04162513092160225, 0.05150006338953972, 0.0014090989716351032, 0.0059388563968241215, -0.026077017188072205, -0.05807245150208473, 0.04361973702907562, -0.018916055560112, 0.024720029905438423, 0.032240673899650574, -0.015041288919746876, 0.030017180368304253, -0.0071037388406693935, 2.2560016077477485e-05, 0.036654967814683914, 0.05130387470126152, 0.022414790466427803, 0.040415287017822266, -0.06549499928951263, -0.01889970526099205, -0.049472760409116745, -0.026240509003400803, 0.019962405785918236, 0.013095730915665627, 0.003206492168828845, 0.031439561396837234, 0.009237312711775303, -0.05833404138684273, -0.03196273744106293, -0.012482634745538235, 0.03462766110897064, 0.0024748642463237047, 0.0832502618432045, -0.01169787161052227, 0.019079547375440598, 0.026894478127360344, 0.023951616138219833, 0.003572306130081415, -0.0003913596156053245, -0.007087389938533306, 0.005734491162002087, 0.027450351044535637, -0.06202896684408188, 0.0019404488848522305, -0.0016052896389737725, -0.026649238541722298, -0.028267811983823776, 0.005603697616606951, -0.04672608897089958, 0.010324536822736263, 0.012572554871439934, 0.007598303258419037, -0.028087971732020378, 0.05074799805879593, -0.03152130916714668, 0.016733434051275253, 0.04129814729094505, 0.0046431804075837135, -0.00773318437859416, 0.01250715833157301, 0.006462031975388527, 0.015392797067761421, 0.03160305693745613, 0.03317258134484291, -0.00865691527724266, -0.010479854419827461, 0.010569775477051735, -0.048034027218818665, 0.03420258313417435, 0.01819668896496296, -0.00046212109737098217, -0.02723781205713749, 0.01283414289355278, -0.030834641307592392, -0.004344807006418705, -0.02115589939057827, -0.018409229815006256, -0.03907465189695358, -0.01952097751200199, 0.0038420683704316616, 0.012482634745538235, 0.0027405391447246075, 0.032207977026700974, 0.04917847365140915, -0.003931988961994648, -0.012482634745538235, 0.023722728714346886, -0.01726478338241577, 0.001856659073382616, -0.0024503404274582863, 0.03956512734293938, 0.020681772381067276, 0.012997634708881378, 0.009449852630496025, 0.05820324644446373, -0.008877630345523357, -0.045810531824827194, -0.006224968004971743, -0.02642035111784935, 0.022169550880789757, 0.015351924113929272, 0.036033693701028824, 0.009547947905957699, 0.022398440167307854, 0.00264040008187294, 0.00950707495212555, 0.007128262892365456, -0.009703266434371471, -0.03564131259918213, -0.004806672688573599, 0.003903377801179886, -0.017117640003561974, 0.02709066867828369, 0.012245570309460163, 0.0002909651375375688, -0.023150505498051643, -0.029951782897114754, 0.024638283997774124, -0.03485655039548874, 0.02429495006799698, 0.04921117052435875, 0.005767189897596836, 0.006486555561423302, -0.01674160733819008, -0.034333374351263046, -0.001074961619451642, -0.007467509247362614, 0.01958637312054634, -0.024556538090109825, -0.02486717328429222, 0.011199220083653927, -0.04100386053323746, -0.02262732945382595, 0.008141915313899517, -0.06314071267843246, 0.008542470633983612, 0.029265115037560463, 0.023706378415226936, -0.05519498884677887, -0.019798913970589638, 0.01630835421383381, 0.016807004809379578, -0.047151170670986176, 0.039009254425764084, -0.002337939338758588, -0.0019097940530627966, 0.01246628537774086, -0.013455413281917572, -0.014616208150982857, 0.003621353767812252, 0.01363525539636612, -0.0020508060697466135, 0.009678741917014122, -0.0376359187066555, -0.004851633217185736, 0.016618989408016205, 0.005554649978876114, 0.022807171568274498, -0.030622102320194244, 0.01827843487262726, -0.04767434671521187, -0.04738005995750427, 0.011885887943208218, -0.0009395696106366813, -0.009335407987236977, -0.02936321124434471, -0.008084692992269993, 0.02051827870309353, -0.016512718051671982, 0.03698195144534111, 0.0024891698267310858, -0.005620046518743038, -0.010716917924582958, 0.02190796285867691, -0.023575585335493088, -0.02418050542473793, 0.025897175073623657, -0.005456554237753153, -0.005170443095266819, -0.018916055560112, -0.03103083185851574, 0.017918752506375313, 0.06104801222681999, -0.006224968004971743, 0.0014489502646028996, 0.00901659857481718, -0.02483447454869747, 0.022480186074972153, 0.01477152667939663, -0.0008849019068293273, 0.02795717678964138, 0.010692394338548183, -0.014853272587060928, -0.03577210754156113, 0.003623397322371602, -0.03343416750431061, -0.016381924971938133, 0.0018382661510258913, 0.04152703657746315, 0.036033693701028824, 0.00469222804531455, -0.008566995151340961, 0.013905017636716366, 0.002104962943121791, -0.0021744470577687025, 0.035739410668611526, 0.025848127901554108, 0.03495464473962784, 0.012531681917607784, -0.002317502861842513, -0.0011321839410811663, 0.024654634296894073, -0.02429495006799698, -0.011092950589954853, 0.029771940782666206, 0.023248599842190742, 0.003010301385074854, 0.04283497482538223, 0.009008423425257206, -0.05826864391565323, 0.0038461554795503616, -0.009752313606441021, 0.03714544326066971, 0.007884414866566658, -0.00150208524428308, -0.029167020693421364, 0.014926844276487827, 0.014477239921689034, -0.02870924212038517, -0.026616541668772697, -0.005693618208169937, -0.04208290949463844, -0.01213930081576109, -0.035902902483940125, -0.027630193158984184, 0.02200605906546116, 0.017787959426641464, -0.029346860945224762, 0.010144694708287716, -0.030033528804779053, -0.002288891701027751, -0.043488942086696625, 0.02127034403383732, -0.00218262174166739, 0.0021151811815798283, 0.039009254425764084, -0.010790489614009857, -0.02032208815217018, 0.01674160733819008, -0.05496609956026077, -0.005035561975091696, -0.02025669254362583, -0.019275737926363945, -0.033581312745809555, -0.01955367438495159, -0.02112320065498352, -0.021580979228019714, -0.019357483834028244, 0.05718959495425224, -0.03248591348528862, -0.037276238203048706, -0.007430723402649164, -0.03835528716444969, 0.003989211283624172, -0.015376447699964046, 0.007013818249106407, -0.015351924113929272, 0.03026241809129715, 0.002421729266643524, 0.07056326419115067, -0.013896842487156391, 0.012409063056111336, -0.049374666064977646, -0.02563558705151081, 0.00550151476636529, -0.014199303463101387, -0.014845097437500954, 0.02859479747712612, 0.011346363462507725, 0.009605170227587223, -0.02563558705151081, -0.028365908190608025, -0.015016764402389526, 0.017133990302681923, -0.004863895010203123, 0.03619718924164772, -0.002100875601172447, -0.004778061527758837, -0.03413718566298485, 0.01507398672401905, 0.0076718744821846485, -0.005636395886540413, 0.018638119101524353, 0.02032208815217018, 0.028251463547348976, 0.017117640003561974, 0.03858417645096779, 0.0377340167760849, 0.02254558354616165, -0.0010172284673899412, 0.014027636498212814, -0.02725416049361229, 0.041069258004426956, -0.011869538575410843, 0.039695922285318375, 0.009981202892959118, -0.03479115292429924, -0.0379956029355526, -0.010316361673176289, 0.0187689121812582, 0.004773973952978849, 0.02949400432407856, -0.0013590294402092695, -0.00864874105900526, 0.012351840734481812, 0.055391181260347366, -0.0093844560906291, 0.012327317148447037, 0.02032208815217018, -0.038943856954574585, -0.014608033932745457, -0.012155650183558464, 0.014068509452044964, -0.030687497928738594, -0.017738910391926765, 0.012637952342629433, 0.021711772307753563, -0.022120503708720207, -0.0012496940325945616, -0.003652008483186364, -0.009572472423315048, 0.01635740138590336, 0.018425578251481056, 0.017787959426641464, 0.01803319714963436, -0.007712747436016798, 0.018556371331214905, 0.024376697838306427, -0.02560288831591606, 0.0076718744821846485, 0.04237719625234604, 0.019864309579133987, -0.04823021963238716, -0.04296576604247093, -0.005342109594494104, 0.003220797749236226, 0.016463670879602432, 0.003760322229936719, 0.008195050060749054, -0.04754355177283287, 0.020828913897275925, 0.027008922770619392, -0.011550728231668472, 0.02575003169476986, -0.016602639108896255, -0.018441928550601006, -0.025161460041999817, 0.01286684162914753, -0.012033030390739441, 0.0005098914843983948, 0.003907465375959873, -0.002961253747344017, 0.049505457282066345, 0.013071206398308277, 0.015294701792299747, 0.03109622932970524, -0.029232416301965714, 0.022480186074972153, 0.030573053285479546, 0.017052242532372475, -0.03184829279780388, 0.010471679270267487, -0.001992562087252736, 0.026060666888952255, -0.016283830627799034, -0.01055342610925436, 0.029134321957826614, 0.01625930517911911, -0.0024891698267310858, 0.03307448700070381, 0.004786236211657524, 0.0010688307229429483, -0.03166845068335533, 0.014608033932745457, -0.03632798045873642, -0.021744471043348312, 0.021368438377976418, 0.05604514852166176, -0.007442985195666552, 0.025864476338028908, -0.0006892220699228346, 0.024343999102711678, 0.0025566103868186474, 0.0024626022204756737, 0.004246711730957031, -0.04309656098484993, -0.012171999551355839, 0.003427206538617611, -0.0053707207553088665, 0.016757957637310028, 0.03708004578948021, 0.0985531359910965, 0.008804058656096458, -0.0015644165687263012, -0.029085274785757065, -0.01055342610925436, -0.02037113718688488, 0.02109050191938877, 0.04404481500387192, -0.013545334339141846, 0.0020600026473402977, 0.020927010104060173, 0.0527426041662693, -0.03304178640246391, 0.05218673124909401, 0.026698287576436996, -0.000561493739951402, -0.033712103962898254, 0.05068260431289673, -0.01742827519774437, 0.0032637142576277256, -0.0044633387587964535, -0.018687166273593903, -0.05843213573098183, 0.007720922119915485, 0.06284642964601517, 0.03397369384765625, -0.04751085117459297, -0.003040956100448966, 0.032861944288015366, -0.013504461385309696, -0.04286767169833183, -0.0020354788284748793, 0.0015603293431922793, -0.04080766811966896, 0.01957002468407154, 0.02637130208313465, 0.008117390796542168, 0.02790812961757183, 0.006547865457832813, -0.02506336383521557, -0.016618989408016205, 0.04005560651421547, -0.01971716806292534, -0.02416415698826313, -0.02413145825266838, -0.016569940373301506, 0.016022242605686188, -0.0009712462197057903, -0.0012834143126383424, -0.04751085117459297, -0.021531932055950165, -0.02404971234500408, -0.036687664687633514, -0.006392547395080328, 0.01597319357097149, -0.020992407575249672, 0.006850325968116522, 0.016602639108896255, 0.004340719897300005, 0.04172322526574135, -0.008877630345523357, 0.04934196546673775, 0.005636395886540413, 0.025243205949664116, 0.0038645484019070864, -0.046529900282621384, 0.002883594948798418, 0.020044151693582535, 0.023232251405715942, -0.010610648430883884, 0.0302133709192276, -0.0017871748423203826, 0.028856385499238968, -0.01726478338241577, 0.0004585447022691369, 0.015049463137984276, -0.008526121266186237, 0.00864874105900526, -0.01818034052848816, 0.06418706476688385, 0.020207643508911133, 0.023722728714346886, -0.006502904929220676, -0.0015613511204719543, -0.024442093446850777, -0.010610648430883884, 0.021433835849165916, 0.009122868068516254, 0.008403502404689789, 0.03858417645096779, -0.03194638714194298, 0.0682743713259697, -0.013496286235749722, -0.0016175516648218036, 0.008787709288299084, 0.014673430472612381, -0.002948991721495986, 0.035183534026145935, -0.009204614907503128, -0.036000996828079224, -0.059282295405864716, -0.0018556371796876192, -0.006208618637174368, -0.02422955445945263, 0.005632308777421713, 0.0009738008375279605, -0.0007219205144792795, -0.0018668773118406534, -0.018523674458265305, 0.007610565051436424, -0.01055342610925436, 0.05388705059885979, 0.015899622812867165, 0.003764409339055419, -0.009646044112741947, 0.02879098802804947, 0.003488516202196479, 0.030622102320194244, 0.04218100383877754, 0.006940246559679508, 0.002102919388562441, 0.007377588655799627, -0.007806755602359772, -0.017935100942850113, -0.017003195360302925, 0.03157035633921623, -0.0018862920114770532, -0.007095564156770706, -0.0004840903857257217, -0.02429495006799698, 0.01968446932733059, 0.009923980571329594, 0.04211560636758804, -0.050290219485759735, -0.0035253020469099283, -0.01096215657889843, 0.07455247640609741, -0.003995342180132866, 0.0022664114367216825, -0.0017841093940660357, -0.01213930081576109, -0.03225702419877052, 0.04133084416389465, -0.01473882794380188, 0.008534296415746212, -0.024066060781478882, 0.010537076741456985, 0.0379956029355526, -0.023052409291267395, 0.02957575023174286, 0.02565193735063076, -0.001505150692537427, 0.010774140246212482, 0.02125399373471737, -0.00906564574688673, 0.014084858819842339, -0.05735308676958084, -0.028349559754133224, -0.006846238858997822, -0.012482634745538235, 0.03315623104572296, -0.04411021247506142, 0.010537076741456985, 0.00136618223041296, -0.013537159189581871, -0.030442260205745697, 0.050224825739860535, 0.00019567980780266225, -0.030573053285479546, 0.03835528716444969, 0.030000830069184303, -0.006445682607591152, 0.014035810716450214, -0.01729748211801052, -0.01746097393333912, 0.002989864908158779, -0.016406448557972908, -0.008235923014581203, 0.020861612632870674, -0.0007040385971777141, 0.0375378243625164, 0.011632475070655346, -0.043390847742557526, -0.023085108026862144, -0.00011731847189366817, -0.0015409146435558796, -0.05006133019924164, 0.002254149643704295, -0.013855969533324242, 0.0046431804075837135, 0.018687166273593903, 0.008334018290042877, -0.028856385499238968, 0.008951202034950256, 0.07049786299467087, 0.0030164322815835476, -0.00451238639652729, 0.007892589084804058, -0.0018556371796876192, -0.015049463137984276, 0.037276238203048706, -0.04963625222444534, 0.0011291184928268194, -0.0043856799602508545, 0.0008450506720691919, -0.005489252973347902, -0.004291671793907881, -0.017084941267967224, -0.006711357738822699, -0.009220964275300503, -0.006850325968116522, -0.032093532383441925, -0.0030368687584996223, 0.023918919265270233, -0.02504701539874077, 0.024589236825704575, 0.01283414289355278, -0.003192186588421464, -0.008125565946102142, 0.0006953530246391892, -0.047837838530540466, -0.019161293283104897, -0.01729748211801052, -0.00031676626531407237, -0.028987178578972816, -0.01016104407608509, 0.02789178118109703, -0.01164882443845272, -0.01594049669802189, 0.011853189207613468, 0.0048761568032205105, 0.017591767013072968, -0.022496536374092102, 0.02413145825266838, 0.008158263750374317, 0.013847795315086842, -0.027760986238718033, 0.02127034403383732, -0.0036663140635937452, 0.028218764811754227, 0.008918503299355507, 0.006282190326601267, 0.026044318452477455, 0.004442902281880379, -0.03153765946626663, -0.007729096803814173, -0.008219573646783829, 0.0032882383093237877, 0.008387153036892414, 0.02424590289592743, 0.03488925099372864, 0.01809859462082386, 0.002840678207576275, 0.018360180780291557, -0.013496286235749722, 0.024589236825704575, -0.0021397050004452467, 0.007712747436016798, -0.012049379758536816, -0.022431138902902603, 0.029935434460639954, 0.008673264645040035, 0.015343748964369297, -0.013226523995399475, -0.016136687248945236, -0.0038298063445836306, -0.0016849922249093652, 0.0049497284926474094, -0.011125648394227028, -0.011714220978319645, -0.02252923510968685, 0.006466119084507227, -0.012588904239237309, 0.0011086818994954228, 0.017657164484262466, 0.0150985112413764, -0.042606085538864136, 0.017166687175631523, 0.016954148188233376, 0.041886717081069946, 0.003934032749384642, -0.00368470698595047, 0.014542637392878532, 0.026845430955290794, 0.001260934048332274, -0.0377667136490345, -0.015850575640797615, -0.02730320766568184, -0.03691655397415161, 0.020828913897275925, 0.0068666753359138966, -0.018638119101524353, -0.02493257075548172, 0.01734652929008007, 0.006032864563167095, 0.033646710216999054, -0.016586290672421455, 0.009850408881902695, -0.013896842487156391, 0.006024689879268408, 0.0011005073320120573, -0.029265115037560463, -0.01401128713041544, -0.019292088225483894, 0.041134655475616455, 0.02339574322104454, 0.00150208524428308, 0.008182788267731667, 0.01052890159189701, 0.03255131095647812, 0.007034254726022482, 0.0017074723728001118, -0.019422881305217743, 0.023117806762456894, 0.0132755720987916, 0.007765882648527622, 0.015588987618684769, -0.026240509003400803, 0.012319141998887062, -0.010749616660177708, 0.023771775886416435, -0.017902404069900513, 0.0014530374901369214, -0.02336304448544979, 0.017657164484262466, 0.005603697616606951, -0.005342109594494104, 0.040480684489011765, 0.023624632507562637, -0.0002595439727883786, -0.002487126039341092, 0.04705307260155678, 0.018719865009188652, -0.030425909906625748, -0.012760571204125881, -0.02480177767574787, -0.03914004936814308, -0.04205021262168884, -0.01821303926408291, -0.023052409291267395, -0.017199385911226273, 0.00623314268887043, -0.03616448864340782, -0.02045288309454918, -0.00942532904446125, 0.0006156505551189184, 0.053985144942998886, 0.001537849078886211, 0.029117973521351814, 0.01806589588522911, 0.024605585262179375, 0.008517947047948837, 0.005595522932708263, 0.01059429906308651, -0.01579335331916809, -0.01625930517911911, -0.015662558376789093, 0.0013723132433369756, -0.013185651041567326, 0.001566460239700973, 0.009180090390145779, -0.022987011820077896, -0.0026363127399235964, 0.032845597714185715, 0.022447487339377403, -0.0033597659785300493, -0.0112973153591156, 0.012327317148447037, -0.0188343096524477, 0.02117224782705307, -0.019373834133148193, -0.022905265912413597, 0.005407506600022316, 0.012597079388797283, 0.00047591576003469527, 0.01441184338182211, 0.013095730915665627, 0.010986680164933205, -0.008436201140284538, -0.01022644154727459, -0.029068924486637115, 0.009147392585873604, -0.00795389898121357, -0.03175019845366478, 0.038943856954574585, 0.02198971062898636, 0.00408935034647584, -0.013815096579492092, 0.02946130558848381, 0.007451159879565239, 0.04002290591597557, 0.02050193026661873, -0.011125648394227028, -0.0035048655699938536, 0.01213112659752369, -0.0033842897973954678, -0.023134155198931694, -0.013218349777162075, -0.008485248312354088, 0.03009892627596855, -0.00810512900352478, -0.004124092403799295, -0.03502004221081734, 0.04136354476213455, -0.01611216366291046, -0.005219490732997656, 0.002666967688128352, 0.03111257776618004, 0.026060666888952255, 0.0190141499042511, -0.0526772066950798, 0.002006867667660117, -0.01279326993972063, -0.00777405733242631, 0.011379062198102474, 0.0189978014677763, -0.026681937277317047, 0.007492033299058676, -0.005591435357928276, 0.008485248312354088, 0.013283746317029, 0.015801528468728065, -0.0010494160233065486, -0.010406282730400562, -0.02570098452270031, -0.032894644886255264, -0.004316195845603943, -0.01133818831294775, -0.016014067456126213, -0.026829080656170845, 0.016790656372904778, -0.002268455224111676, 0.0008573125815019011, -0.032861944288015366, 0.022480186074972153, 0.004704489838331938, -0.0066091748885810375, 0.05535848066210747, -0.03099813312292099, -0.03616448864340782, 0.02798987552523613, 0.001875051879324019, 0.0263222549110651, -0.009327233768999577, -0.013087555766105652, 0.006870762445032597, 0.029902735725045204, 0.00828088354319334, -0.013806921429932117, 0.017640816047787666, 0.002838634420186281, 0.013954064808785915, -0.0009247531415894628, -0.037701316177845, -0.009000249207019806, 0.025864476338028908, 0.026943525299429893, 0.02947765588760376, 0.033712103962898254, -0.0013600513339042664, -0.013831445947289467, -0.019030500203371048, -0.003974905703216791, -0.01585874892771244, 0.007696398533880711, -0.022856218740344048, 0.013586207292973995, 0.0048761568032205105, 0.004402029328048229, 0.006069650407880545, 0.02857844904065132, 0.026109714061021805, -0.0377667136490345, 0.014624383300542831, 0.0034905599895864725, -0.03315623104572296, -0.011092950589954853, 0.025553841143846512, 0.013422715477645397, -0.005354371853172779, -0.0019363615429028869, -0.01554811466485262, 0.00718957232311368, -0.061603885143995285, 0.010782315395772457, -0.015008590184152126, -0.0009084038902074099, 0.012997634708881378, -0.0049497284926474094, -0.03397369384765625, 0.019046848639845848, -0.002581134205684066, 0.029820989817380905, -0.04250798746943474, 0.006024689879268408, -0.04741275683045387, 0.004169052932411432, -0.038813065737485886, -0.002887682057917118, -0.0068421512842178345, 0.00715278647840023, 0.031145276501774788, 0.027826383709907532, -0.011820490472018719, -0.0005098914843983948, -0.017706211656332016, -0.02576638199388981, -0.010945807211101055, 0.02575003169476986, -0.0011117474641650915, -0.012711524032056332, 0.02944495715200901, -0.0009313949849456549, -0.011387236416339874, 0.014158430509269238, -0.01242541242390871, 0.009891281835734844, -0.00037552131107077, -0.014076683670282364, -0.005039649084210396, 0.005387070123106241, -0.0019711037166416645, -0.02182621695101261, 0.04077497124671936, -0.036000996828079224, -0.018490975722670555, 0.0008792818407528102, -0.006674571894109249, -0.01824573613703251, 0.04394672065973282, -0.006617349572479725, -0.007974334992468357, 0.013267396949231625, -0.0018239605706185102, 0.005599610041826963, -0.008575169369578362, -0.029003528878092766, -0.03721084073185921, -0.037701316177845, 0.017215736210346222, -0.05107498541474342, 0.020616374909877777, 0.0014622339513152838, 0.003073654603213072, -0.017755260691046715, -0.0010667870519682765, -0.025128761306405067, -0.022496536374092102, -0.010610648430883884, 0.0030613925773650408, -0.012449936009943485, 0.019995104521512985, -0.024327648803591728, -0.023624632507562637, 0.05974007397890091, 0.026616541668772697, -0.01441184338182211, -0.029902735725045204, 0.037570521235466, 0.02480177767574787, 0.02733590640127659, -0.00909834448248148, -0.038093697279691696, -0.022283995524048805, -0.0038277627900242805, 0.013349143788218498, -0.03310718387365341, 0.047281961888074875, 0.0003839513810817152, -0.007377588655799627, -0.013103905133903027, -0.014460890553891659, -0.010741441510617733, -0.011681522242724895, -0.01060247328132391, 0.016447322443127632, 0.010733267292380333, 0.0064293332397937775, 0.013676128350198269, 0.014207477681338787, -0.004532822873443365, 0.014084858819842339, -7.963861571624875e-05, 0.04303116351366043, 0.027401303872466087, 0.029052576050162315, 0.0013774223625659943, -0.008395328186452389, 0.001005988335236907, 0.01477970089763403, -0.035837505012750626, -0.017673514783382416, 0.03320527821779251, 0.005575086455792189, 0.0264693982899189, -0.013479937799274921, -0.008231835439801216, -0.027597494423389435, 0.014321922324597836, 0.00218262174166739, 0.0028611146844923496, -0.006789016537368298, -0.015286526642739773, 0.018572721630334854, -0.003163575427606702, 0.013087555766105652, -0.004990601446479559, 0.035052742809057236, 0.01547454297542572, -0.0226763766258955, -0.009956679306924343, -0.021401137113571167, -0.013112079352140427, -0.00532167311757803, -0.023918919265270233, 0.02795717678964138, -0.03920544683933258, 0.003942207433283329, 0.04885149002075195, -0.015302876010537148, -0.0036050044000148773, -0.00792120024561882, 0.0024523839820176363, 0.01177144329994917, 0.026861779391765594, 0.016471846029162407, -0.03498734533786774, -0.029085274785757065, -0.029886385425925255, 0.011158347129821777, 0.0027425826992839575, 0.051728952676057816, 0.0451238639652729, -0.002885638503357768, -0.008452550508081913, 0.001874030102044344, 0.014730652794241905, 0.028921781107783318, -0.010479854419827461, -0.007712747436016798, 0.04074227437376976, -0.01323469914495945, -0.028153367340564728, 0.011248268187046051, 0.033679407089948654, -0.05964197963476181, 0.002098832046613097, 0.0047944108955562115, -0.01952097751200199, -0.045647040009498596, 0.015368273481726646, -0.001491866889409721, -0.040317192673683167, 0.00047438303590752184, 0.004357068799436092, 0.027646541595458984, 0.009923980571329594, 0.026567492634058, 0.006175920367240906, -0.031341467052698135, 0.016921449452638626, -0.0009329277672804892, 0.01736287958920002, -0.013537159189581871, 0.0008849019068293273, 0.02565193735063076, -0.012360014952719212, -0.017559070140123367, -0.017003195360302925, -0.020828913897275925, 0.005808062851428986, 0.007892589084804058, -0.025913523510098457, -0.018392879515886307, -0.018490975722670555, -0.0003926368954125792, 0.013340968638658524, 0.003329111263155937, -0.0047167520970106125, -0.023003362119197845, 0.02499796822667122, -0.02341209165751934, 0.018523674458265305, 0.006650047842413187, -0.011861364357173443, 0.03407178819179535, -0.01622660830616951, -0.019161293283104897, 0.0009579624747857451, -0.0045655216090381145, -0.029870036989450455, 0.013766048476099968, 0.006331237964332104, 0.012294618412852287, 0.006776754278689623, -0.0020252603571861982, 0.011035728268325329, -0.02123764529824257, -0.012703348882496357, 0.009220964275300503, 0.005174530204385519, 0.014714304357767105, 0.0017166688339784741, 0.0031083966605365276, -0.0032146666198968887, 0.02189161442220211, 0.0013569857692345977, -0.02882368676364422, 0.0022030582185834646, 0.030393213033676147, -0.03413718566298485], "index": 60}, {"title": "United States Assistant Attorney General", "text": "Many of the divisions and offices of the United States Department of Justice are headed by an Assistant Attorney General.The President of the United States appoints individuals to the position of Assistant Attorney General with the advice and consent of the Senate.", "vector": [-0.002060866681858897, -0.008987119421362877, -0.024587998166680336, -0.04351158067584038, 0.05110633000731468, 0.016993248835206032, 0.02444559708237648, -0.005585304461419582, 0.004248312208801508, 0.05914410203695297, -0.02156592160463333, 0.005094810388982296, -0.002418848220258951, 0.0010729560162872076, 0.00013819870946463197, -0.013528145849704742, -0.047055795788764954, 0.010419045574963093, -0.021186184138059616, -0.018480554223060608, -0.007582881487905979, 0.002555316314101219, 0.013219608925282955, 0.0001451210118830204, -0.0009073153487406671, 0.01122598722577095, -0.017024895176291466, -0.014287620782852173, -0.004331380128860474, 0.03645479306578636, -0.01037948951125145, 0.02082226797938347, 0.04553684592247009, -0.013330365531146526, -0.011067763902246952, 0.001163934706710279, -0.03588518500328064, -0.04022052139043808, 0.01859131082892418, 0.005858240649104118, -0.0034097256138920784, -0.025284184142947197, -0.050156984478235245, 0.011716481298208237, 0.03335360437631607, -0.03439788147807121, -0.00556948222219944, -0.015355631709098816, 0.01436673291027546, 0.02567974291741848, -0.01974634639918804, 0.010276644490659237, 0.01251551229506731, 0.03253084048628807, -0.018433086574077606, -0.015529678203165531, 0.03857499361038208, 0.00931938923895359, -0.018654601648449898, 0.036264922469854355, -0.0012153575662523508, -0.015458477661013603, -0.07202353328466415, 0.014050284400582314, 0.009327300824224949, -0.025252537801861763, 0.027182871475815773, 0.04496724158525467, -0.06325792521238327, 0.016676802188158035, 0.07765630632638931, 0.014255975373089314, -0.005288634914904833, 0.007428613491356373, -0.010862072929739952, 0.013520234264433384, 0.018385620787739754, -0.040536969900131226, 0.019857103005051613, 0.021012136712670326, 0.011914261616766453, -0.05499863624572754, -0.0009720882517285645, 0.023781055584549904, -0.040188878774642944, -0.014445844106376171, -0.03395485505461693, -0.039650917053222656, 0.017752723768353462, 0.02115453965961933, 0.019271673634648323, 0.0548720583319664, -0.00888427346944809, 0.0143350875005126, 0.03898637369275093, -0.014208508655428886, 0.003089322242885828, -0.00460431631654501, 0.03259412944316864, -0.019556477665901184, 0.02169249951839447, 0.04560013487935066, -0.04778362438082695, -0.007124032359570265, -0.04401789605617523, -0.025537341833114624, 0.02234121784567833, -0.02151845395565033, 0.015023361891508102, 0.054555609822273254, -0.03357511758804321, 0.002009443938732147, 0.009912729263305664, 0.02086973562836647, 0.0034670818131417036, -0.009857350960373878, -0.04743553325533867, -0.013986995443701744, -0.021834902465343475, -0.018860291689634323, -0.002545427531003952, -0.03012583591043949, 0.03639150410890579, -0.008203910663723946, -0.008385867811739445, 0.029809387400746346, -0.008251377381384373, 0.056422650814056396, 0.025521518662571907, -0.02368612214922905, -0.009382679127156734, 0.05509357154369354, -0.025015203282237053, -0.008773516863584518, -0.04072684049606323, 0.012879427522420883, 0.006570248398929834, -0.001401270623318851, 0.02890751138329506, 0.05281514674425125, -0.00406239926815033, -0.028448661789298058, -0.015608790330588818, 0.0072783008217811584, 0.03598012030124664, 0.0018996760481968522, -0.024018391966819763, 0.05357462167739868, -0.05211896076798439, 0.021091248840093613, -0.004040643572807312, -0.01568790152668953, 0.013915793970227242, -0.046929217875003815, -0.006989541929215193, -0.01753121055662632, 0.01653440110385418, -0.020711511373519897, 0.03001507930457592, 0.013219608925282955, -0.015339809469878674, -0.021202005445957184, 0.013520234264433384, 0.048511456698179245, -0.009382679127156734, -0.02433484047651291, 0.003641128074377775, 0.0220405925065279, -0.012214886955916882, 0.018860291689634323, 0.05341639742255211, 0.030869487673044205, 0.03477761894464493, -0.011850971728563309, -0.004829785320907831, -0.020252661779522896, 0.010181710124015808, 0.021597566083073616, -0.040473680943250656, 0.005577393341809511, 0.020252661779522896, -0.001069000456482172, 0.008401690050959587, 0.0002155801048502326, 0.011447501368820667, -0.001519938581623137, 0.004224578849971294, -0.03395485505461693, 0.009794061072170734, 0.014627802185714245, -0.048163361847400665, 0.004149422515183687, 0.05088481307029724, -0.012072485871613026, 0.029524585232138634, 0.00241093710064888, 0.011289277113974094, -0.01729387603700161, -0.02180325798690319, -0.05936561897397041, 0.06389082223176956, -0.001774085802026093, 0.00027194738504476845, 0.05876436457037926, 0.04825829714536667, 0.044872306287288666, -0.016281241551041603, -0.03756235912442207, -0.022372862324118614, -9.294110896007624e-06, -0.03452445939183235, -0.03259412944316864, 0.014596156775951385, 0.014493311755359173, -0.03053721785545349, 0.005355880130082369, -0.01070384867489338, 0.00041978785884566605, 0.038068678230047226, -0.04113822057843208, -0.00879725068807602, 0.002723429352045059, -0.039650917053222656, 0.023844346404075623, 0.006993497721850872, -0.029271425679326057, -0.021328585222363472, -0.012032929807901382, -0.03382827714085579, -0.0021716232877224684, -0.08195999264717102, 0.027167048305273056, -0.01753121055662632, 0.006198422517627478, -0.02041088603436947, 0.05721377208828926, 0.028701819479465485, -0.00879725068807602, 0.0036529949866235256, -0.025648098438978195, -0.06790971010923386, 0.018338153138756752, -0.05113797262310982, -0.0031051444821059704, 0.02140769734978676, 0.01846473291516304, -0.027293628081679344, -0.0136942807585001, -0.016692623496055603, 0.07683353871107101, 0.01445375569164753, -0.002717495895922184, -0.007784617133438587, -0.02737274020910263, 0.03898637369275093, -0.0016989294672384858, 0.03560038283467293, -0.04297361895442009, -0.0050156982615590096, -0.04003065451979637, -0.01870206743478775, 0.04167618229985237, -0.041296444833278656, 0.002863853005692363, 0.01070384867489338, -0.06487181037664413, 0.06018838286399841, -0.022784246131777763, -0.025663921609520912, 0.03147073835134506, -0.021075427532196045, 0.00855991430580616, 0.0014873049221932888, 0.05316323786973953, 0.004248312208801508, 0.059776999056339264, 0.007986352778971195, 0.017626145854592323, 0.04594822973012924, 0.0025276271626353264, -0.003728151321411133, -0.008010086603462696, 0.07506143301725388, -0.013425299897789955, -0.020679866895079613, -0.003660906106233597, 0.01090953964740038, 0.014161041006445885, 0.007982397451996803, 0.036201633512973785, -0.02379687875509262, 0.005589260254055262, 0.03134416043758392, -0.07385893166065216, 0.005814729258418083, 0.025584809482097626, 0.011890527792274952, -0.0481950081884861, 0.006135132629424334, -0.040948353707790375, 0.0014655491104349494, -0.021439341828227043, 0.0020905337296426296, -0.039840783923864365, 0.024951912462711334, 0.020743155851960182, -0.03911295533180237, -0.025363296270370483, 0.028274616226553917, -0.020315952599048615, 0.020315952599048615, 0.0033503917511552572, -0.010537713766098022, 0.0011500901309773326, -0.021945659071207047, 0.003202056745067239, -0.002250735415145755, 0.007847907021641731, 0.069871686398983, -0.02373358979821205, -0.04313184320926666, 0.020363420248031616, -0.010047219693660736, 0.013037651777267456, 0.01740463264286518, 0.02175579033792019, -0.011423767544329166, 0.019904570654034615, -0.02221463993191719, 0.01939825341105461, -0.015498033724725246, -0.00920072104781866, -0.022784246131777763, 0.007705505006015301, -0.004450047854334116, 0.03518900275230408, 0.023005759343504906, 0.03721426799893379, 0.02884422242641449, 0.0034927930682897568, -0.016391998156905174, 0.02977774292230606, -0.014342999085783958, 0.03272070735692978, -0.02609112486243248, 0.021233651787042618, -0.019952036440372467, 0.054840411990880966, 0.021249473094940186, 0.04123315587639809, 0.0006991519476287067, -0.0207589790225029, 0.015292342752218246, 0.01573536917567253, 0.000526588992215693, -0.021360229700803757, -0.0323726162314415, -0.00044624091242440045, 0.05041014403104782, -0.003967464901506901, 0.013607257977128029, 0.03272070735692978, -0.061992134898900986, 0.023844346404075623, -0.050505075603723526, -0.022483620792627335, -0.019097628071904182, 0.028163859620690346, -0.04629632085561752, -0.010458601638674736, -0.0034255480859428644, 0.03439788147807121, 0.06708694249391556, -0.012143686413764954, -0.002903409069404006, -0.007262478116899729, -0.05287843570113182, -0.03480926528573036, -0.03930282220244408, -0.008805161342024803, 0.042119208723306656, 0.018132461234927177, -0.008014041930437088, 0.029160669073462486, 0.032214391976594925, -0.039081308990716934, 0.026470862329006195, 0.0035956387873739004, 0.004422358702868223, -0.00032040345831774175, -0.022024771198630333, -0.016724269837141037, -0.03632821515202522, -0.023701943457126617, 0.016898315399885178, 0.0015654279850423336, -0.005427080672234297, -0.014240153133869171, -0.024319017305970192, -0.034619394689798355, 0.017214763909578323, -0.0465494804084301, 0.0012034907704219222, 0.015600878745317459, 0.00812479853630066, -0.05946055054664612, -0.057593509554862976, 0.04477737098932266, -0.00358377187512815, 0.011392123065888882, -0.04113822057843208, -0.024872800335288048, -0.061232659965753555, 0.04139138013124466, 0.014857226982712746, -0.025948723778128624, -0.008947563357651234, 0.027056291699409485, 0.03417636826634407, 0.02613859251141548, 0.053036659955978394, 0.04034710302948952, -0.006321046035736799, 0.012824049219489098, 0.04556849226355553, 0.0295404065400362, 0.055947981774806976, -0.01198546215891838, -0.01234146673232317, -0.03961927071213722, 0.04515710845589638, 0.015039184130728245, -0.016439465805888176, 0.00987317319959402, -0.009928551502525806, -0.036613017320632935, -0.030094191431999207, 0.002052955562248826, 0.016898315399885178, 0.02719869278371334, 0.0019283541478216648, -0.011914261616766453, -0.03196123242378235, 0.018543845042586327, -0.049397509545087814, -0.03518900275230408, -0.03724591061472893, 0.04357486963272095, 0.008741872385144234, 0.027515141293406487, -0.04667605832219124, -0.02942964993417263, 0.008915917947888374, 0.02585379034280777, 0.046454545110464096, 0.01647111028432846, 0.0033088577911257744, -0.04385967180132866, -0.05420751869678497, -0.011937995441257954, 0.00526094576343894, -0.017309697344899178, 0.01811663992702961, -0.028765110298991203, 0.010426957160234451, -0.03363840654492378, 0.0012519467854872346, -0.047277309000492096, -0.009343123063445091, -0.01666097901761532, 0.021787434816360474, -0.0002556305262260139, -0.04272045940160751, 0.021660855039954185, 0.01670844666659832, -0.035378869622945786, -0.015490122139453888, -0.022942468523979187, -0.016961604356765747, 0.011297188699245453, 0.01601226069033146, 0.07423866540193558, 0.029983434826135635, -0.005616949405521154, 0.011083586141467094, -0.022436153143644333, -0.0034492816776037216, -0.010775049217045307, -0.04215085506439209, -0.03639150410890579, -0.02175579033792019, 0.07120076566934586, -0.022024771198630333, -0.007772750221192837, 0.030568862333893776, -0.00814853236079216, 0.007408835459500551, -0.015102474018931389, 0.00203713309019804, 0.08094736188650131, -0.01670844666659832, 0.017958415672183037, 0.019366608932614326, -0.06338450312614441, -0.02450888603925705, -0.017214763909578323, -0.03014165721833706, 0.01900269277393818, -0.01457242388278246, -0.0006492125685326755, -0.008963385596871376, -0.020189372822642326, -0.002537516178563237, -0.004038665909320116, 0.019065983593463898, -0.008251377381384373, -0.020062793046236038, -0.00040124598308466375, 0.008322578854858875, 0.01624959707260132, -0.04167618229985237, -0.02403421513736248, -0.07468169182538986, -0.005154144484549761, 0.048638034611940384, -0.018654601648449898, 0.02223046123981476, 0.0269771795719862, 0.00514623336493969, 0.02984103187918663, -0.04537862166762352, -0.024762043729424477, -0.02795816771686077, 0.004806051962077618, -0.012420577928423882, 0.027214515954256058, -0.04351158067584038, -0.02509431540966034, -0.018021704629063606, 0.044935595244169235, 0.00897129625082016, 0.00987317319959402, 0.007305989973247051, -0.018733713775873184, -0.01612301729619503, 0.007476080674678087, 0.04718237370252609, -0.04389131814241409, 0.004541026894003153, -0.005462680943310261, 0.029176492244005203, -0.012238620780408382, -0.028480306267738342, 0.0017256296705454588, 0.03522064536809921, -0.016455288976430893, -0.0423407219350338, -0.014793937094509602, 0.006459491793066263, -0.026597442105412483, 0.022119704633951187, -0.0010976784396916628, -0.009145342744886875, -0.006696827709674835, -0.03370169550180435, 0.014999628067016602, 0.0018057305132970214, 0.05515686050057411, 0.031565673649311066, 0.017246408388018608, 0.016803380101919174, -0.018797002732753754, 0.07094760984182358, 0.021265296265482903, 0.028053103014826775, -0.00545476982370019, 0.010869983583688736, -0.021534277126193047, 0.010189620777964592, -0.027103759348392487, 0.019160917028784752, -0.02058493345975876, 0.02819550409913063, 0.002020321786403656, 0.027182871475815773, -0.0016544288955628872, 0.0035620161797851324, 0.011518701910972595, -0.018385620787739754, -0.02931889332830906, 0.012325643561780453, 0.012903161346912384, 0.01208039652556181, -0.017736902460455894, -0.02110707201063633, 0.0009389601182192564, -0.004374891519546509, 0.012555068358778954, -0.009192810393869877, -0.017610322684049606, 0.0054903700947761536, 0.005696061532944441, 0.05610620602965355, 0.004715072922408581, -0.04670770466327667, 0.03601176664233208, 0.04037874564528465, -0.002573116682469845, -0.0022388685029000044, -0.030220769345760345, 0.039777494966983795, -0.010925361886620522, -0.013322454877197742, -0.05275185778737068, -0.011447501368820667, -0.01509456243366003, -0.011154786683619022, 0.05389107018709183, -0.03229350224137306, 0.00791910756379366, 0.025822144001722336, -0.06430220603942871, 0.0014447822468355298, 0.06075798720121384, -0.019920391961932182, -0.024002568796277046, 0.005229300819337368, 0.005075032357126474, 0.02613859251141548, 0.015664169564843178, -0.03781551867723465, 0.004208756610751152, -0.04385967180132866, 0.015260697342455387, -0.013646814040839672, 0.00144379329867661, -2.6406707547721453e-05, -0.08202328532934189, 0.0208064466714859, 0.004537071101367474, -0.016613511368632317, 0.013195875100791454, 0.06028331443667412, 0.07101089507341385, -0.024429773911833763, -0.01939825341105461, 0.035790253430604935, -0.017246408388018608, -0.006186555605381727, 0.00630522333085537, 0.035442158579826355, -0.011914261616766453, -0.03563202917575836, -0.02450888603925705, -0.04711908474564552, 0.00011131300561828539, -0.022784246131777763, -0.02169249951839447, 0.06917550414800644, 0.002020321786403656, -0.02232539653778076, -0.028132213279604912, -0.0007307967753149569, -0.001155034638941288, 0.01265791431069374, -0.031280871480703354, -0.020442530512809753, 0.025252537801861763, 0.009121608920395374, 0.019857103005051613, -0.015893593430519104, -0.06243516132235527, 0.020442530512809753, -0.003943731542676687, 0.04509381949901581, -0.026518329977989197, 0.005700016859918833, -0.03534722700715065, -0.04629632085561752, -0.013259164988994598, 0.029160669073462486, 0.012673736549913883, -0.00783604010939598, -0.031502384692430496, 0.0066454047337174416, 0.017388809472322464, -0.004248312208801508, 0.024018391966819763, 0.01716729626059532, -0.08601052314043045, -0.0273885615170002, 0.0807574912905693, 0.018480554223060608, -0.020790623500943184, 0.020379241555929184, 0.01007886417210102, -0.013298721052706242, -0.018480554223060608, -0.03229350224137306, -0.023591186851263046, 0.002988454420119524, 0.028860043734312057, -0.011518701910972595, -0.011969639919698238, -0.029825210571289062, 0.004529159981757402, 0.012238620780408382, 0.030458105728030205, 0.013583524152636528, -0.005316324066370726, 0.0008410590817220509, 0.007962618954479694, -0.020062793046236038, 0.023543721064925194, -0.038258545100688934, -0.01007886417210102, 0.014279709197580814, -0.04813171923160553, -0.044239409267902374, -0.0278474111109972, 0.017436277121305466, 0.049808893352746964, -0.017341341823339462, -0.04677099362015724, -0.009857350960373878, -0.007547281216830015, -0.008631114847958088, -0.003421592526137829, -0.0024069815408438444, -0.011249721050262451, -0.0017503522103652358, 0.008053597994148731, -0.010798783041536808, -0.00268189562484622, 0.009651659056544304, 0.02327474020421505, -0.05398600548505783, -0.00804173108190298, 0.00030878387042321265, -0.03192958980798721, -0.007151721511036158, -0.03294222056865692, -0.01939825341105461, -0.010719670914113522, 0.01359934639185667, 0.036201633512973785, -0.01770525798201561, 0.039018020033836365, -0.006162821780890226, -0.004113822244107723, 0.011748126707971096, -0.02561645396053791, 0.01705653965473175, 0.031059356406331062, 0.06809958070516586, -0.0008934707148000598, -0.0015525722410529852, -0.01500753965228796, -0.009121608920395374, 0.06300476938486099, -0.011597814038395882, 0.041359733790159225, -0.016502754762768745, 0.017847659066319466, -0.00337808090262115, 0.0025414717383682728, 0.03395485505461693, -0.0006502014584839344, -0.01136838924139738, 0.05639100819826126, 0.0070409649051725864, -0.00858364813029766, 0.023069048300385475, -0.0315973199903965, 0.06256174296140671, -0.005446858704090118, 0.007357412483543158, -0.0208064466714859, -0.014501222409307957, -0.004659694619476795, -0.0195248331874609, 0.017452098429203033, -0.04436598718166351, -0.036613017320632935, 0.04474572464823723, -0.04518875479698181, -0.005968997720628977, 0.004034710116684437, -0.03800538554787636, 0.022309573367238045, -0.0014823604142293334, 0.01037948951125145, -0.02561645396053791, -0.008362134918570518, 0.0024940045550465584, 0.006127221509814262, 0.03490419685840607, 0.001596083864569664, 0.0006091620889492333, -0.041359733790159225, 0.007009319961071014, -0.034619394689798355, -0.008741872385144234, 0.020062793046236038, 0.020679866895079613, -0.02017355151474476, -0.01017379853874445, 0.014833493158221245, -0.007713416591286659, 0.013108852319419384, -0.029888499528169632, 0.01005513034760952, 0.01783183589577675, 0.0018650644924491644, -0.008726049214601517, 0.03094859980046749, 0.006040198262780905, -0.012555068358778954, 0.0020331775303930044, -0.022420329973101616, -0.026597442105412483, 0.01700907200574875, -0.03370169550180435, -0.00632895715534687, 0.0037400180008262396, -0.01887611486017704, -0.002586961258202791, -0.013156319037079811, -0.013979083858430386, 0.015110384672880173, -0.001979776890948415, -0.045695070177316666, -0.007804395165294409, 0.012570890597999096, 0.00130831403657794, -0.01794259250164032, 0.011637370102107525, 0.01518949680030346, 0.006716605741530657, 0.016130929812788963, -0.025173427537083626, 0.012966451235115528, -0.047055795788764954, -0.021486809477210045, 0.03515735641121864, -0.02613859251141548, 0.033923208713531494, -0.017278052866458893, -0.027182871475815773, -0.021739967167377472, -0.009398501366376877, -0.02555316500365734, -0.002096466952934861, 0.03294222056865692, 0.02561645396053791, 0.02093302458524704, -0.04604316130280495, -0.000704590929672122, -0.00042918240069411695, -0.020664045587182045, -0.02808474749326706, 0.010688026435673237, 0.0532265305519104, -0.000568617251701653, 0.018955226987600327, 0.009881083853542805, 0.030442282557487488, -0.0348409079015255, -0.003352369414642453, 0.020727334544062614, 0.023179804906249046, 0.05211896076798439, 0.006087665446102619, 0.03153402730822563, -0.03322702273726463, 0.02485697902739048, 0.05389107018709183, -0.001053177984431386, 0.04686592519283295, 0.036138344556093216, -0.016581866890192032, -0.003827041247859597, -0.023765234276652336, -0.068226158618927, 0.018844470381736755, 0.01881282404065132, 0.040125586092472076, -0.023955103009939194, -0.019255852326750755, -0.012388933449983597, 0.018338153138756752, 0.007669904734939337, 0.024587998166680336, -0.009398501366376877, 0.009564636275172234, 0.0439862497150898, 0.005268856883049011, -0.002292269142344594, 0.015015450306236744, 0.02503102459013462, 0.011289277113974094, -0.004169200547039509, 0.051327843219041824, 0.007982397451996803, 0.02550569735467434, 0.02427154965698719, 0.022720955312252045, -0.024904446676373482, 0.003362258430570364, -0.004240401089191437, 0.022182993590831757, 0.011708570644259453, -0.03480926528573036, -0.010751315392553806, -0.033733341842889786, -0.036676306277513504, 0.024350661784410477, 0.00491285277530551, -0.04392296075820923, 0.05680238828063011, -0.0012578802416101098, 0.004639916587620974, -0.010308288969099522, -0.010822516866028309, -0.002444559708237648, -0.020648222416639328, -0.031565673649311066, 0.057245418429374695, 0.04724566265940666, 0.05715048313140869, -0.033733341842889786, -0.012650002725422382, -0.02392345853149891, -0.02297411486506462, 0.04028381034731865, -0.016162574291229248, 0.014746470376849174, 0.02632846124470234, -0.06373259425163269, 0.016328709200024605, 0.004034710116684437, -0.0070409649051725864, -0.022436153143644333, 0.028891688212752342, 0.032973866909742355, 0.022705134004354477, 0.015039184130728245, -0.021945659071207047, 0.01781601458787918, -0.001562461256980896, 0.03632821515202522, 0.014374643564224243, -0.029524585232138634, -0.007966574281454086, -0.0038428637199103832, 0.022942468523979187, -0.0060560209676623344, 0.04392296075820923, 0.06385917961597443, 0.03616999089717865, -0.04420776665210724, 0.0037657294888049364, -0.01175603736191988, 0.0019313207594677806, 0.010063041932880878, 0.06784641742706299, -0.0036193723790347576, 0.01816410757601261, 0.0006516848225146532, 0.01963558979332447, -0.04126479849219322, -0.04389131814241409, -0.013979083858430386, 0.02011026069521904, -0.007923062890768051, 0.022135527804493904, -0.007741105742752552, 0.00878933910280466, -0.03446117043495178, -0.01445375569164753, 0.032562483102083206, -0.002343691885471344, -0.01640782132744789, -0.04427105560898781, 0.009018763899803162, -0.007044920232146978, 0.03223021328449249, -0.004517293069511652, -0.017452098429203033, 0.024587998166680336, -0.016004350036382675, 0.024429773911833763, 0.004319513216614723, 0.005585304461419582, -0.016629334539175034, -0.028464484959840775, 0.01870206743478775, 0.04344829171895981, 0.010458601638674736, 0.005652549676597118, -0.0291290245950222, -0.010775049217045307, -0.01922420784831047, 0.024065859615802765, 0.003777596168220043, 0.03118593618273735, -0.0008806150290183723, 0.038195256143808365, -0.007001408841460943, -0.0033602805342525244, 0.036264922469854355, -0.012673736549913883, -0.014161041006445885, 0.051264550536870956, -0.04661276936531067, 0.038131967186927795, 0.007507725153118372, 0.006566293071955442, 0.0008895151549950242, -0.04990382492542267, 0.0010002718772739172, -0.0018284752732142806, 0.03404979035258293, 0.013543968088924885, -0.008599470369517803, 0.023591186851263046, 0.018069172278046608, 0.007416746579110622, -0.02931889332830906, 0.003419614629819989, -0.015877770259976387, 0.0291290245950222, -0.032325148582458496, 0.01178768277168274, -0.011360477656126022, 0.005688149947673082, -0.04028381034731865, 0.03477761894464493, -0.004402580671012402, -0.00030927834450267255, 0.00847289152443409, 0.02526836097240448, -0.006036242935806513, -0.006677049677819014, -0.03541051596403122, 0.012539246119558811, 0.02373358979821205, 0.01155034638941288, 0.010972829535603523, 4.7343564801849425e-05, -0.0033484138548374176, -0.00032213403028436005, -0.021898191422224045, 0.021122893318533897, -0.012048752047121525, -0.022673489525914192, 0.007096343208104372, 0.02338549681007862, -0.018496377393603325, 0.021771611645817757, 0.001935276435688138, -0.007851862348616123, 0.019271673634648323, 0.0003938292502425611, 0.011202254332602024, -0.0015476277330890298, 0.03980914130806923, 0.02802145667374134, 0.002070755697786808, 0.0006220178329385817, -8.065711881499738e-05, -0.03243590518832207, -0.013504412025213242, -0.02351207472383976, 0.020917203277349472, -0.02082226797938347, -0.052213896065950394, -0.007456302642822266, -0.013377833180129528, 0.010854161344468594, 0.006878785323351622, -0.01647111028432846, -0.01134465541690588, -0.020648222416639328, 0.0025493830908089876, -0.01158199179917574, 0.004537071101367474, -0.02439812943339348, 0.0037143067456781864, 0.004750673193484545, -0.017388809472322464, 0.018907759338617325, 0.01753121055662632, -0.0044381809420883656, -0.044587504118680954, -0.015719547867774963, -0.002751118503510952, 0.0415179580450058, 0.00427995715290308, 0.021265296265482903, 0.000577022903598845, -0.03487255424261093, -0.0365813709795475, -0.009176988154649734, -0.008781427517533302, 0.008639026433229446, -0.021059604361653328, -0.026660731062293053, -0.016423644497990608, 0.029635341838002205, -0.02099631540477276, 0.019382430240511894, 0.029461294412612915, -0.021613389253616333, -0.0026027834974229336, 0.04278374835848808, -0.013559790328145027, -0.010672204196453094, 0.02931889332830906, -0.03993571922183037, -0.029651163145899773, 0.006427846848964691, -0.0005646616336889565, -0.028100568801164627, -0.022531086578965187, -0.01265791431069374, -0.006210288964211941, -0.010806694626808167, -0.0005799895734526217, 0.013868327252566814, -0.010434867814183235, -0.006162821780890226, 0.01019753236323595, -0.019271673634648323, 0.009382679127156734, -0.01477811485528946, 0.00449751503765583, -0.0005053276545368135, 0.01917674019932747, -0.01046651229262352, -0.021613389253616333, 0.00402482133358717, -0.06752996891736984, -0.005703972652554512, -0.010031396523118019, 0.04272045940160751, 0.02298993617296219, -0.005652549676597118, -0.026122769340872765, -0.003609483363106847, -0.010205443017184734, 0.014469577930867672, 0.007519592065364122, -0.0277999434620142, 0.0137180145829916, -0.02761007472872734, 0.022958291694521904, -0.010561446659266949, -0.01040322333574295, -0.010949095711112022, -0.010411133989691734, 0.011890527792274952, 0.02632846124470234, -0.005968997720628977, -0.00219140131957829, 0.010901628993451595, -0.006724516861140728, -0.01677173562347889, 0.011542435735464096, 0.016328709200024605, 0.009097876027226448, 0.011740215122699738, -0.004248312208801508, -0.02004697173833847, -0.030632151290774345, 0.005585304461419582, 0.008002175018191338, 0.04262552410364151, -0.02238868549466133, 0.007017231080681086, -0.01070384867489338, -0.004220623057335615, 0.016281241551041603, -0.014279709197580814, -0.006530692335218191, 0.00955672562122345, 0.011566168628633022, -0.037499070167541504, 0.01541892159730196, -0.008298845030367374, -0.010482335463166237, 0.006617715582251549, -0.0012786471052095294, 0.021914014592766762, 0.003720239968970418, -0.0075631034560501575, -0.022610198706388474, 0.01653440110385418, 0.007163588423281908, 0.025489874184131622, 0.04360651597380638, -0.010798783041536808, 0.016550222411751747, 0.001774085802026093, -0.004588494077324867, -0.038606636226177216, -0.012151597999036312, -0.004192933905869722, -0.027578430250287056, 0.03351182863116264, 0.004576627165079117, -0.008931741118431091, 0.007127987686544657, -0.009540902450680733, -0.01675591431558132, 0.0006783850840292871, -0.003253479488193989, 0.044935595244169235, 0.002853963989764452, -0.015482211485505104, -0.018148284405469894, -0.010893717408180237, -0.002199312672019005, -0.022467797622084618, -0.018781179562211037, -0.012650002725422382, 0.02058493345975876, -0.016866670921444893, 0.03126504644751549, -0.007266433909535408, 0.00035278990981169045, 0.00023869563301559538, 0.015608790330588818, -0.016629334539175034, 0.022879179567098618, -0.01757867820560932, -0.018385620787739754, 0.02433484047651291, 0.02156592160463333, 0.013338277116417885, 0.009904817678034306, 0.016676802188158035, 0.018084995448589325, 0.032625772058963776, 0.04082177206873894, -0.015893593430519104, 0.006396202370524406, 0.008314667269587517, 0.010181710124015808, 0.006412024609744549, 0.00750376982614398, -0.00012954583507962525, -0.03705604374408722, 0.010506068356335163, 0.04132809117436409, 0.0033820364624261856, -0.0038507748395204544, -0.015474299900233746, 0.017895126715302467, 0.023227272555232048, -0.023322205990552902, 0.017325520515441895, 0.017515389248728752, 0.037720583379268646, 0.01007886417210102, 0.003830996807664633, -0.033733341842889786, 0.011202254332602024, -0.011170608922839165, -0.02672402188181877, -0.03512571007013321, 0.049682311713695526, 0.02098049223423004, -0.002157778711989522, -0.015933148562908173, 0.03077455423772335, -0.01539518777281046, -0.006764072924852371, -0.004339291248470545, 0.013536056503653526, 0.036075055599212646, -0.0036351946182549, -0.00545476982370019, 0.015047095715999603, 0.01590941660106182, 0.033100444823503494, -0.001963954418897629, -0.01477811485528946, 0.010363667272031307, -0.0011184454197064042, 0.030853666365146637, -0.030758731067180634, -0.01857548952102661, 0.0145407784730196, 0.005735617130994797, 0.004517293069511652, 0.01008677575737238, -0.009050408378243446, 0.0017958416137844324, 0.009952285327017307, 0.008836806751787663, -0.006704738829284906, -0.01060891430824995, -0.004588494077324867, -0.00416524475440383, -0.017214763909578323, -0.014184774830937386, -0.03354347124695778, -0.011700659058988094, 0.020774802193045616, 0.009675392881035805, -0.005288634914904833, 0.004509381949901581, -0.02262602187693119, -0.015316075645387173, 0.028068924322724342, 0.031692251563072205, -0.0216292105615139, -0.016835026443004608, -0.009176988154649734, 0.011083586141467094, -0.03683453053236008, 0.00855991430580616, -0.004544982220977545, -0.029208136722445488, 0.00707656517624855, 0.01716729626059532, 0.04446092247962952, 0.005949219688773155, 0.004050532355904579, 0.00955672562122345, 0.024461418390274048, -0.04566342383623123, 0.018211573362350464, -0.017388809472322464, 0.003560038283467293, -0.007373235188424587, -8.943360444391146e-05, 0.03167643025517464, -0.039714206010103226, 0.005122499540448189, 0.03341689333319664, -0.00028307249885983765, 0.0032752351835370064, 0.021249473094940186, 0.0007476080791093409, -0.015450566075742245, -0.039081308990716934, 0.005114588420838118, -0.015086651779711246, -0.016518577933311462, -0.01924002915620804, 0.006597937550395727, 0.010165886953473091, 0.018749535083770752, -0.0138999717310071, -0.0139474393799901, -0.0019471432315185666, -0.014216420240700245, 0.039081308990716934, -0.012523423880338669, 0.03408143296837807, 0.008662760257720947, 0.015545500442385674, 0.010339933447539806, -0.010553536005318165, 0.0026522285770624876, -0.0283062607049942, -0.030331525951623917, -0.027309449389576912, 0.0315973199903965, 0.009398501366376877, -0.00016020172915887088, 0.032340969890356064, -0.030220769345760345, -0.024983558803796768, 0.005059210117906332, -0.010411133989691734, -0.0506632998585701, -0.023369673639535904, 0.012911072000861168, -0.02392345853149891, -0.023353852331638336, -0.03692946583032608, 0.03079037554562092, -0.043828029185533524, 0.03582189604640007, 0.020838091149926186, -0.00920072104781866, -0.010181710124015808, -0.03417636826634407, -0.015118296258151531, 0.00876560527831316, -0.018148284405469894, 0.027467673644423485, -0.028179680928587914, -0.02713540382683277, -0.026660731062293053, -0.012064574286341667, -0.028005635365843773, -0.033796630799770355, 0.014944249764084816, -0.00017688939988147467, -0.0009869217174127698, -0.024524709209799767, 0.027103759348392487, 0.019303318113088608, -0.01787930354475975, 0.033859919756650925, 0.030458105728030205, -0.02832208201289177, -0.01605972833931446, 0.0058186850510537624, -0.014216420240700245, -0.005632771644741297, 0.003593660891056061, -0.001162945874966681, 0.004537071101367474, 0.0010897673200815916, 0.045631781220436096, -0.018195752054452896, -0.03107517957687378, 0.012903161346912384, -0.004117777571082115, -0.00952508021146059, -0.006139088422060013, -0.02977774292230606, -0.015292342752218246, 0.015387277118861675, -0.025632275268435478, -0.01917674019932747, 0.016202129423618317, -0.004204800818115473, 0.0051383222453296185, 0.04221414402127266, 0.016850847750902176, 0.001247991225682199, -0.00461618322879076, -0.024667110294103622, -0.010656381025910378, 0.009240277111530304, -0.03623327985405922, -0.008298845030367374, 0.05632771924138069, 0.005264901090413332, -0.03178718686103821, -0.01980963535606861, 0.0011926128063350916, 0.0038092411123216152, -0.005945263896137476, 0.00943805743008852, -0.016724269837141037, -0.018686246126890182, 0.016075551509857178, 0.014746470376849174, 0.015316075645387173, -0.004339291248470545, 0.020205195993185043, -0.022119704633951187, 0.033923208713531494, -0.023432962596416473, 0.02286335825920105, -0.01306929625570774, -0.009010852314531803, -0.012293999083340168, 0.009588370099663734, 0.02996761165559292, 0.001503127277828753, 0.01445375569164753, -0.016835026443004608, 0.0076303486712276936, 0.001138223335146904, -0.027293628081679344, -0.008496624417603016, 0.006281489972025156, -0.04917599633336067, -0.05528343841433525, -0.0025157604832202196, 0.0034275257494300604, -0.02596454694867134, -0.01935078576207161, -0.026344284415245056, 0.023179804906249046, -0.00964374840259552, -0.02732527256011963, 0.019129272550344467, 0.02485697902739048, 0.005201611667871475, -0.01711982861161232, 0.01583821512758732, 0.029176492244005203, 0.012808226980268955, -0.007377190515398979, -0.0020351551938802004, 0.013449033722281456, 0.021328585222363472, -0.011075674556195736, -0.007147765718400478, -0.012262354604899883, -0.010632648132741451, 0.005431036464869976, 0.02086973562836647, -0.004001087509095669, -0.0199362151324749, -0.003522460116073489, 0.013551879674196243, 1.3404223864199594e-05, 0.005379613488912582, 0.0017622190061956644, -0.025584809482097626, -0.0003547677188180387, 0.038606636226177216, 0.0008054586942307651, 0.0025592721067368984, -0.01974634639918804, -0.01541892159730196, 0.0033583028707653284, -0.03439788147807121, 0.01688249222934246, 0.007507725153118372, -0.015956882387399673, 0.011210164986550808, -0.032388437539339066, -0.025758855044841766, -0.0012529357336461544, -0.01922420784831047, 0.01735716499388218, 0.02098049223423004, 0.001587183796800673, 0.0014457710785791278, -0.0012915028491988778, -0.022531086578965187, -0.011067763902246952, -0.010070952586829662, -0.002846052870154381, 0.008097109384834766], "index": 61}, {"title": "Shining Tears", "text": "Shining Tears (\u30b7\u30e3\u30a4\u30cb\u30f3\u30b0\u30fb\u30c6\u30a3\u30a2\u30fc\u30ba, Shainingu Ti\u0101zu) is an action role-playing game co-developed by Nextech and Amusement Vision and published by Sega in 2004 for the PlayStation 2 as a part of the Shining Force video game series. It tells the story of a mysterious boy named Xion.An anime adaptation for the game was announced by Sega, entitled Shining Tears X Wind. It is produced by Studio Deen and began airing in early April 2007.", "vector": [-0.017639024183154106, 0.018688242882490158, -0.022535374388098717, 0.020056787878274918, 0.007146846037358046, -0.040873877704143524, 0.023827889934182167, -0.0217902772128582, 0.004938166588544846, 0.05346449092030525, -0.027340488508343697, -0.03054896555840969, 0.020452145487070084, -0.021927133202552795, 0.0217902772128582, 0.009503784589469433, -0.037194013595581055, 0.017182843759655952, -0.028252851217985153, -0.0009584567160345614, -0.022261666133999825, 0.031111590564250946, 0.036342471837997437, -0.01329009234905243, 0.0220335740596056, -0.005135845392942429, -0.020452145487070084, -0.031202826648950577, -0.05997268483042717, 0.05136605724692345, -0.020391320809721947, -0.027735846117138863, 0.02375185862183571, 0.02084750309586525, -0.019250866025686264, 0.010887536220252514, -0.008036400191485882, 0.026808276772499084, 0.005284104496240616, -0.005181463435292244, 0.009017190895974636, 0.013442153111100197, -0.04707795009016991, 0.014430547133088112, 2.0952875274815597e-05, 0.024557780474424362, -0.045253220945596695, -0.02658018469810486, -0.0022714044898748398, -0.012499378062784672, -0.026230446994304657, 0.038988325744867325, 0.01420245599001646, -0.009602623991668224, -0.014103616587817669, 0.0015082505997270346, 0.07718593627214432, 0.042181599885225296, 0.016954751685261726, -0.05501550808548927, 0.00862943660467863, -0.031963128596544266, -0.01466624066233635, 0.022793877869844437, 0.04957174137234688, -0.03266260772943497, 0.0293324813246727, 0.07225918024778366, -0.0013048696564510465, 0.0025032968260347843, -0.007983178831636906, 0.003714079037308693, -0.033088378608226776, 0.026914719492197037, -0.004436366725713015, -0.025971943512558937, 0.01896195113658905, 0.0012364423600956798, -0.043458908796310425, -0.01999596320092678, 0.009245282039046288, 0.043793439865112305, -0.04017439857125282, 0.012423347681760788, 0.02635209448635578, -0.011784693226218224, -0.03397032991051674, -0.06544686108827591, -0.0038186206948012114, 0.0025108999107033014, -0.013404138386249542, -0.001398006803356111, 0.018490564078092575, -0.046804238110780716, 0.006990984082221985, -0.018505770713090897, 0.03251054883003235, -0.01252218708395958, -0.0071164341643452644, 0.02033049613237381, 0.03184147924184799, -0.00585433142259717, -0.03106597252190113, -0.07025197893381119, -0.042941901832818985, 0.02727966383099556, -0.03363579511642456, 0.040448106825351715, 0.0032674011308699846, -0.011404542252421379, -0.020862707868218422, 0.0348522812128067, -0.0029708831571042538, -0.01509961299598217, -0.016331303864717484, 0.0008634188561700284, -0.0016337005654349923, 0.024922724813222885, -0.045070748776197433, -0.014476165175437927, -0.01329009234905243, -0.03199354186654091, 0.005865735933184624, -0.00510543305426836, -0.0030336081981658936, 0.005527401342988014, 0.014004777185618877, 0.016924340277910233, -0.015038789249956608, 0.025971943512558937, -0.010454162955284119, 0.03588629141449928, 0.07426637411117554, 0.03515639901161194, 0.002609739312902093, 0.0005165307084098458, -0.02136450819671154, 0.004561816807836294, -0.013624626211822033, 0.0030526157934218645, 0.022580992430448532, -0.017106812447309494, -0.02881547622382641, 0.022854702547192574, 0.009496182203292847, -0.02093873918056488, -0.03904915228486061, -0.004660656210035086, -0.006949167232960463, -0.025105198845267296, 0.0010045500239357352, 0.05519798398017883, -0.026656216010451317, -0.01544174924492836, -0.0025204038247466087, 0.05516757071018219, -0.009214869700372219, 0.001707830117084086, 0.02855697274208069, -0.01059101801365614, 0.002056618919596076, -0.04056975618004799, -0.02513561025261879, 0.010408544912934303, 0.0046720607206225395, -0.04917638376355171, -0.0009636837639845908, 0.028192026540637016, -0.04196871444582939, 0.0073141129687428474, 0.021394919604063034, -0.01316844392567873, -0.007998385466635227, 0.023615004494786263, -0.030670614913105965, 0.0346393957734108, 0.010986375622451305, -0.057448480278253555, -0.02325005829334259, 0.020543381571769714, -0.04178624227643013, -0.024071186780929565, -0.025850294157862663, 0.02504437416791916, 0.0037558956537395716, -0.0009940959280356765, 0.008933558128774166, 0.0037178806960582733, -0.06757570803165436, -0.05851290374994278, -0.04263778030872345, 0.00038632884388789535, 0.05912114307284355, -0.01879468560218811, 0.005557813216000795, 0.033848680555820465, -0.000638179131783545, -0.02855697274208069, -0.0038376282900571823, 0.0036228427197784185, -0.011054802685976028, -0.015647031366825104, 0.05741806700825691, 0.015890328213572502, 0.031871892511844635, 0.024344895035028458, -0.02239852026104927, -0.08126116544008255, 0.02221604809165001, 0.02186630852520466, 0.05097069963812828, 0.025698233395814896, 0.023873507976531982, 0.005078822840005159, 0.0027656012680381536, -0.013115223497152328, 0.005037005990743637, 0.025683028623461723, -0.002929066540673375, 0.019068393856287003, -0.005208074115216732, 0.01877947896718979, -0.014293692074716091, 0.03045772947371006, 0.0023227250203490257, -0.012248477898538113, -0.03302755206823349, -0.005056013353168964, -0.021775072440505028, 0.01364743523299694, -0.04394550248980522, 0.014027586206793785, 0.037711016833782196, -0.021166829392313957, -0.014871522784233093, -0.00875868834555149, 0.0009370732004754245, -0.04367179051041603, -0.003742590546607971, 0.0062192766927182674, 0.006356131285429001, -0.004592228680849075, 0.00688454182818532, 0.024998756125569344, 0.05878661200404167, -0.010309705510735512, -0.0053867450915277, -0.0015738267684355378, 0.028511354699730873, -0.05045369267463684, 0.015069201588630676, 0.014392531476914883, -0.006648847833275795, 0.04093470051884651, 0.010720268823206425, 0.05535004287958145, 0.0067742979153990746, 0.049024324864149094, 0.021212447434663773, 0.014993171207606792, -0.04573981463909149, -0.009024794213473797, 0.03929244726896286, 0.0202544666826725, 0.013624626211822033, 0.02651936188340187, -0.005930361803621054, -0.0386233814060688, -0.014096013270318508, -0.032054364681243896, -0.01333571132272482, -0.06824477761983871, 0.02805517241358757, -0.03871461749076843, -0.0025013962294906378, -0.007268494460731745, -0.001957779750227928, 0.027492549270391464, 0.028085585683584213, -0.005189066287130117, -0.007021396420896053, 0.0005127291660755873, -0.0011252481490373611, 0.00956460926681757, 0.009891538880765438, -0.004957173950970173, 0.010020790621638298, -0.023462943732738495, -0.04038728401064873, -0.028420118615031242, 0.028252851217985153, -0.04443209618330002, 0.047230008989572525, 0.02977345697581768, 0.04738206788897514, 0.008310109376907349, -0.026823481544852257, -0.021410126239061356, 0.06176699697971344, -0.031354885548353195, -0.007519394624978304, 0.020284878090023994, -0.0252116397023201, -0.007496585603803396, -0.004774701315909624, 0.02110600471496582, 0.016833104193210602, 0.04650011658668518, -0.025105198845267296, -0.001403709058649838, 0.028526561334729195, -0.025667821988463402, -0.036068763583898544, 0.02102997526526451, -0.011389335617423058, -0.030077578499913216, 0.005033204331994057, -0.011450160294771194, -0.03631206229329109, 0.027933524921536446, 0.05979021266102791, -0.01012723334133625, -0.008226475678384304, -0.01557100098580122, 0.036768242716789246, 0.007492783945053816, 0.0029499747324734926, -0.01766943745315075, 0.017365315929055214, 0.004759495612233877, -0.014863919466733932, 0.06532521545886993, -0.05197430029511452, 0.011632632464170456, 0.016270479187369347, 0.018977157771587372, 0.013404138386249542, -0.029636602848768234, 0.01826247200369835, 0.025409318506717682, -0.07980138063430786, 0.03378785401582718, -0.04494909942150116, -0.018049588426947594, -0.083390012383461, 0.014635828323662281, -0.026215240359306335, 0.0023208241909742355, -0.014118822291493416, -0.005972178187221289, 0.0007465222734026611, -0.052460893988609314, 0.04129964858293533, -0.029651809483766556, 0.027507754042744637, -0.0015728763537481427, -0.029727838933467865, -0.004653052892535925, -0.003073523985221982, 0.03816720098257065, 0.005561614874750376, 0.026625802740454674, 0.0007978427456691861, 0.06246647611260414, -0.0029746845830231905, -0.047047536820173264, 0.003265500534325838, 0.005398149602115154, -0.03831925988197327, 0.0015443650772795081, -0.03369661793112755, 0.005649049766361713, -0.027310075238347054, 0.07457049936056137, 0.03987027704715729, -0.005052212160080671, 0.032054364681243896, 0.03643370792269707, -0.03001675382256508, 0.02214001677930355, -0.024755459278821945, -0.00999037828296423, -0.024329688400030136, 0.04348931834101677, -0.001715433201752603, 0.013753877021372318, 0.01766943745315075, 0.010978772304952145, -0.00943535752594471, -0.03062499687075615, 0.017015576362609863, 0.04348931834101677, -0.013062002137303352, 0.05136605724692345, 0.007268494460731745, 0.009731875732541084, 0.06854890286922455, 0.030609790235757828, 0.06115875765681267, 0.013556198216974735, 0.012856720015406609, 0.02060420624911785, 0.03351414576172829, 0.019509369507431984, 0.009116030298173428, 0.03165900707244873, -0.018460150808095932, 0.007705668918788433, -0.017380522564053535, 0.014255677349865437, 0.034548159688711166, 0.007371135521680117, -0.014696653001010418, -0.054255206137895584, 0.0060063921846449375, -0.00918445736169815, 0.0701911523938179, 0.0360383503139019, 0.06003350764513016, -0.041573356837034225, -0.02951495349407196, -0.01441534049808979, 0.01488672848790884, -0.006116636097431183, -0.015890328213572502, -0.0015861816937103868, 0.014567401260137558, 0.016833104193210602, 0.040508933365345, 0.008887939155101776, 0.020102405920624733, -0.05799589678645134, -0.049450092017650604, -0.032997142523527145, 0.03220642730593681, -0.03549093380570412, 0.013875525444746017, 0.005052212160080671, 0.029286863282322884, -0.010651841759681702, 0.009511387906968594, 0.046865064650774, -0.028039967641234398, 0.00613184180110693, 0.05604952201247215, -0.02334129624068737, 0.022444138303399086, -0.018825097009539604, 0.0525217168033123, 0.010492178611457348, -0.0043413289822638035, -0.036768242716789246, 0.0016479563200846314, 0.029834281653165817, 0.02539411373436451, 0.030214432626962662, -0.03549093380570412, -0.02077147178351879, 0.03716360032558441, 0.0056756604462862015, -0.0012155340518802404, 0.027127603068947792, 0.03664659336209297, -0.029925517737865448, -0.010940756648778915, -0.04650011658668518, -0.017988763749599457, -0.03853214532136917, -0.01888592168688774, -0.008165651932358742, -0.020619411021471024, 0.017973557114601135, -0.022200841456651688, -0.015647031366825104, -0.02033049613237381, -0.006067216396331787, -0.0025755257811397314, -0.02299155667424202, -0.010074011981487274, -0.010583414696156979, -0.024588191881775856, 0.006454970687627792, -0.02290032058954239, 0.04236407205462456, 0.0038015139289200306, 0.0059797815047204494, 0.010484575293958187, -0.008348125033080578, -0.011077611707150936, 0.0523088313639164, 0.07554368674755096, -0.014270883053541183, 0.010279294103384018, -0.04893308877944946, -0.030336081981658936, -0.03193271532654762, -0.05233924463391304, -0.027416517958045006, 0.008903145790100098, 0.03354455903172493, -0.009283296763896942, 0.02223125286400318, 0.0028302271384745836, -0.005595828406512737, 0.046713002026081085, 0.038471322506666183, -0.040022339671850204, 0.011298099532723427, 0.03088349848985672, 0.008340521715581417, 0.021911926567554474, -0.02762940339744091, -0.034091975539922714, -0.004508595447987318, -0.04385426640510559, -0.014613019302487373, 0.01363983191549778, 0.05656652897596359, 0.004428763873875141, 0.01964622363448143, -0.007758889812976122, 0.006356131285429001, -0.0068807401694357395, 0.04838566854596138, 0.026641009375452995, -0.03707236424088478, -0.0009807905880734324, -0.011389335617423058, -0.01648336462676525, -0.00999798160046339, -0.03631206229329109, 0.030396904796361923, 0.03515639901161194, 0.03716360032558441, -0.05757012590765953, 0.031963128596544266, 0.022839495912194252, 0.007260891608893871, -0.03406156599521637, -0.004656854551285505, -0.03619041293859482, 0.011488175019621849, 0.028800269588828087, 0.0014502775156870484, -0.05869537591934204, -0.012149638496339321, 0.009214869700372219, -0.014164441265165806, 0.02831367589533329, 0.030305668711662292, 0.038136787712574005, -0.006865534000098705, 0.014156837947666645, 0.04376302659511566, 0.031020354479551315, -0.03996151313185692, -0.025804676115512848, 0.009404945187270641, -0.0013105719117447734, 0.011404542252421379, 0.00952659361064434, 0.028161615133285522, 0.021410126239061356, -0.016255274415016174, -0.027675021439790726, -0.01991993375122547, 0.027568578720092773, 0.010233675129711628, -0.056231994181871414, -0.0020604205783456564, -0.02092353254556656, -0.008599024266004562, 0.0075155929662287235, 0.04443209618330002, -0.031871892511844635, 0.02084750309586525, -0.013822305016219616, 0.019281279295682907, 0.018338503316044807, 0.009382136166095734, -7.12783876224421e-05, -0.03466980531811714, 0.02772063948214054, 0.015038789249956608, -0.027142809703946114, -0.02616962231695652, 0.021486157551407814, -0.0010834314161911607, -0.031172413378953934, -0.026975542306900024, -0.017213255167007446, 0.023037174716591835, 0.052977897226810455, 0.01067465078085661, 0.027766257524490356, -0.0032864087261259556, 0.0023075188510119915, 0.02299155667424202, 0.04677382856607437, -0.049115560948848724, 0.03232807293534279, 0.02898274175822735, -0.03241930902004242, 0.004649251699447632, 0.009214869700372219, -0.003187569323927164, 0.014050395227968693, 0.057174768298864365, -0.017654230818152428, 0.023888712748885155, 0.04382385313510895, -0.004786105826497078, 0.021334096789360046, 0.005493187811225653, -0.000562148867174983, -0.01896195113658905, -0.007831119000911713, 0.032632194459438324, -0.0006277249776758254, -0.010400942526757717, 0.00392696401104331, 0.0007916652830317616, 0.06003350764513016, 0.017045987769961357, 0.010058806277811527, 0.03831925988197327, -0.01487912517040968, 0.0010359125444665551, 0.013115223497152328, -0.00647397805005312, 0.03682906553149223, 0.0002295164013048634, -0.046013522893190384, 0.0006619386258535087, 0.03403115272521973, 0.0022371909581124783, 0.04452333226799965, 0.004668259061872959, 0.06222318112850189, -0.0555933378636837, 0.024162422865629196, -0.007321715820580721, 0.032723430544137955, 0.04333725944161415, -0.026139209046959877, -0.0011271488619968295, -0.007329318672418594, -0.018764272332191467, -0.023143617436289787, 0.005287905689328909, -0.016939546912908554, 0.03369661793112755, -0.004721480421721935, -0.003567720763385296, 0.04282025247812271, -0.027234045788645744, 0.017076401039958, 0.05145729333162308, 0.009123633615672588, -0.031780656427145004, -0.043975912034511566, -0.010165248066186905, -0.011518587358295918, 0.02068023569881916, 0.031963128596544266, -0.015996770933270454, 0.011510984040796757, 0.00019922308274544775, -0.018733860924839973, -0.0506361648440361, 0.023554179817438126, 0.01033251453191042, 0.005272699985653162, -0.008211269974708557, 0.053738199174404144, -0.022672228515148163, -0.0017230361700057983, -0.015403734520077705, 0.017076401039958, 0.018475357443094254, -0.017122019082307816, 0.03012319654226303, 0.032388899475336075, -0.014263280667364597, 0.012871925719082355, -0.010841918177902699, -0.006599428132176399, -0.027340488508343697, 0.009959966875612736, 0.024329688400030136, 0.0016726661706343293, 0.019843902438879013, 0.009823111817240715, -0.025029167532920837, 0.016528982669115067, -0.005801110062748194, -0.01887071505188942, 0.045009925961494446, -0.040204811841249466, -0.00669446587562561, -0.04966297745704651, 0.006686863023787737, -0.058391254395246506, 0.031446121633052826, -0.0334533229470253, -0.04531404748558998, -0.011693457141518593, -0.013693053275346756, 0.01827767863869667, -0.018384121358394623, -0.027158016338944435, 0.012560201808810234, 0.027675021439790726, 0.0029575778171420097, 0.06091545894742012, -0.004998990800231695, -0.03184147924184799, 0.0009698612266220152, 0.013883128762245178, 0.012005181051790714, 0.01535811647772789, 0.03214560076594353, 0.029043566435575485, 0.02204878069460392, -0.01033251453191042, -0.006607030984014273, 0.014149234630167484, 0.0027541967574507, 0.016498571261763573, -0.011488175019621849, -0.015175643377006054, 0.04266819357872009, -0.055806223303079605, 0.014483768492937088, 0.051335643976926804, 0.023478150367736816, 0.010438957251608372, 0.021090799942612648, -0.017715055495500565, -0.018642624840140343, -0.005303111858665943, 0.02589591220021248, 0.0059151556342840195, 0.015426543541252613, 0.028587384149432182, 0.002623044652864337, 0.012119226157665253, 0.003900353331118822, 0.014438149519264698, -0.007823515683412552, -0.005584423895925283, -0.013404138386249542, 0.01800397038459778, -0.018247267231345177, -0.03047293610870838, 0.012408141046762466, 0.011853120289742947, -0.014529386535286903, 0.007112632505595684, -0.04145170748233795, -0.04917638376355171, 0.008051606826484203, -0.011070008389651775, -0.0202544666826725, -0.015723060816526413, -0.0018066695192828774, -0.0012364423600956798, -0.009465769864618778, -0.020406527444720268, -0.03695071488618851, 0.038136787712574005, -0.020208848640322685, -0.015464558266103268, -0.030731437727808952, 0.0015263078967109323, -0.013753877021372318, 0.016772279515862465, -0.05039286985993385, 0.00874348171055317, -0.020558588206768036, -0.0042500924319028854, 0.007523196283727884, -0.013586610555648804, -0.05705312266945839, 0.020953943952918053, 0.0005341126816347241, 0.04394550248980522, -0.005101631861180067, 0.010887536220252514, 0.02359979785978794, 0.021942337974905968, 0.011396938934922218, -0.040873877704143524, -0.004812716506421566, -0.029621396213769913, 0.031020354479551315, -0.004786105826497078, -0.012978368438780308, 0.008218873292207718, 0.01248417142778635, -0.000134953748784028, 0.017380522564053535, -0.0010216569062322378, 0.014734667725861073, 0.054772213101387024, 0.006272498052567244, -0.025683028623461723, 0.0018560892203822732, -0.015373322181403637, 0.03494351729750633, 0.004740487784147263, 0.01585991680622101, -0.032723430544137955, 0.016361715272068977, -0.01674186810851097, 0.00035164004657417536, -0.04339808225631714, -0.009853524155914783, -0.004345130641013384, -0.024223247542977333, 0.0003849032800644636, 0.0066792601719498634, 6.498213042505085e-05, 0.02598715014755726, -0.026884306222200394, 0.014985567890107632, 0.020315291360020638, 0.011974768713116646, 0.05516757071018219, -0.041147585958242416, 0.006063414737582207, -0.04811196029186249, -0.007435761392116547, 0.01296316273510456, -0.015844710171222687, 0.010157645680010319, -0.015723060816526413, 0.003792010247707367, -6.337836384773254e-05, 0.03251054883003235, 0.009762288071215153, 0.03284507989883423, -0.020741060376167297, 0.006420757155865431, 0.001955878920853138, -0.007758889812976122, 0.033240437507629395, 0.003816720098257065, 0.024329688400030136, 0.00862183328717947, -0.011077611707150936, 0.009678654372692108, 0.011746678501367569, 0.016148831695318222, 0.009876333177089691, -0.0346393957734108, -0.010385735891759396, 0.022809084504842758, 0.025424525141716003, -0.028344087302684784, 0.017213255167007446, -0.0021060386206954718, 0.010256484150886536, -0.002142153214663267, -0.017882321029901505, 0.028176821768283844, 0.0050408076494932175, -0.04452333226799965, 0.01988952048122883, 0.02162301167845726, -0.004451572895050049, 0.00944296084344387, 0.030138403177261353, -0.03688989207148552, -0.019676636904478073, 0.040265634655952454, -0.03567340597510338, -0.04075222834944725, 0.03664659336209297, -0.014377325773239136, -0.0129555594176054, -0.04467539116740227, 0.011548999696969986, 0.011351320892572403, -0.017106812447309494, -0.021075593307614326, -0.0020984357688575983, -0.012461362406611443, 0.008507788181304932, 0.017000369727611542, 0.04932844638824463, -0.037376485764980316, 0.012157241813838482, 0.03679865598678589, 0.005732682999223471, 0.0044059548527002335, 0.030670614913105965, -0.04306355118751526, -0.02332608960568905, -0.024679427966475487, 0.0020110008772462606, -0.03999192640185356, -0.014392531476914883, -0.0009527544025331736, -0.016452951356768608, -0.03360538184642792, 0.013069604523479939, 0.01522126141935587, 0.0010207064915448427, -0.031020354479551315, 0.01316844392567873, 0.012248477898538113, 0.02642812393605709, 0.0028549369890242815, -0.0430939607322216, -0.04123882204294205, -0.004029604606330395, 0.051943887025117874, -0.011488175019621849, 0.0097774937748909, -0.025591792538762093, 0.024937931448221207, -0.04306355118751526, -0.0007384440978057683, -0.005690866149961948, -0.0025622204411774874, 0.002387350657954812, -0.01544935256242752, -0.005470378324389458, -0.011632632464170456, -0.0051738605834543705, -0.016848308965563774, 0.010796299204230309, -0.023827889934182167, 0.02762940339744091, -0.02058899961411953, -0.059151556342840195, 0.056171171367168427, -0.003968780394643545, -0.04941968247294426, 0.03129406273365021, -0.003594331443309784, 0.01205840241163969, -0.011085215024650097, -0.01411121990531683, -0.017076401039958, 0.02445133775472641, -0.02445133775472641, 0.01716763712465763, -0.010948359966278076, 0.02557658590376377, -0.03819761052727699, 0.005223280284553766, -0.0058505297638475895, -0.03834967315196991, -0.008416552096605301, -0.007321715820580721, -0.029651809483766556, -0.004599831998348236, 0.015061598271131516, -0.028115997090935707, 0.034548159688711166, -0.049450092017650604, 0.040204811841249466, 0.0026002356316894293, -0.011906341649591923, -0.03947491943836212, 0.0005189066287130117, -0.04339808225631714, -0.001315323868766427, 0.012879529036581516, -0.010271690785884857, 0.025683028623461723, 0.027234045788645744, 0.003734987461939454, -0.01922045461833477, -0.014711858704686165, 0.0013058200711384416, 0.015456955879926682, 0.01320645958185196, -0.018916333094239235, 0.010986375622451305, 0.03199354186654091, -0.0011594617972150445, -0.011434953659772873, -0.03001675382256508, -0.051609352231025696, 0.01750217005610466, -0.024496955797076225, 0.01286432333290577, -0.028800269588828087, 0.002012901706621051, 0.035308461636304855, -0.023386914283037186, 0.0009864928433671594, 0.007983178831636906, -0.06435202807188034, 0.0024139613378793, -0.012088814750313759, -0.017045987769961357, 0.03064020164310932, -0.12189174443483353, -0.023189235478639603, 0.027735846117138863, -0.007694264408200979, 0.027234045788645744, 0.024846695363521576, 0.007462372072041035, -0.03053376078605652, 0.002026206813752651, -0.0015576703008264303, 0.05601910874247551, -0.032723430544137955, 0.014438149519264698, 0.011054802685976028, 0.006569016259163618, 0.015426543541252613, 0.0001869869593065232, 0.046986714005470276, 0.08363330364227295, -0.02051296830177307, 0.004782304633408785, 0.007739882450550795, -0.02788790687918663, 0.00033120688749477267, 0.03801513835787773, 0.010226072743535042, 0.018338503316044807, 0.008865130133926868, -0.02238331362605095, -0.0034004542976617813, 0.03962698206305504, 0.01556339766830206, -0.018475357443094254, 0.01081150583922863, -0.008895542472600937, -0.013761480338871479, 0.033757444471120834, -0.019159629940986633, -0.014118822291493416, -0.005246089305728674, 0.03223683685064316, -0.0028568378183990717, 0.02934768795967102, 0.008082018233835697, -0.016589807346463203, 0.009671051055192947, 0.015061598271131516, 0.006652649492025375, 0.016544189304113388, 0.006363734137266874, -0.021136417984962463, -0.0015025483444333076, -0.003885147161781788, 0.014346913434565067, -0.015586206689476967, -0.006698267534375191, 0.02385830134153366, 0.013016384094953537, 0.00281882262788713, -0.0005231833783909678, 0.0402960479259491, -0.021653423085808754, 0.05276501178741455, 0.0036988731008023024, -0.03637288510799408, 0.023736653849482536, -0.011450160294771194, -0.0173196978867054, -0.013008780777454376, 0.011138435453176498, 0.041147585958242416, 0.018855508416891098, -0.011898738332092762, 0.0020851304288953543, 0.031780656427145004, -0.004493389278650284, -0.022185634821653366, 0.01329009234905243, 0.04905473440885544, -0.031963128596544266, -0.03588629141449928, 0.002590731717646122, 0.03807596489787102, 0.020482556894421577, 0.023143617436289787, 0.025166021659970284, -0.01320645958185196, 0.009967569261789322, -0.012833910994231701, 0.00750418845564127, -0.021258065477013588, -0.04443209618330002, 0.027081985026597977, 0.014491370879113674, 0.03433527424931526, -0.022961143404245377, 0.026488948613405228, 0.018414532765746117, 0.04272901639342308, -0.05054492875933647, -0.02428407035768032, -0.016711454838514328, -0.024147216230630875, 0.003531606402248144, 0.03327085077762604, -0.003404255723580718, 0.017045987769961357, 0.004379344172775745, 0.021318890154361725, 0.0215469803661108, -0.0035924306139349937, -0.001784810796380043, 0.021212447434663773, 0.0027522961609065533, -0.017198048532009125, -0.013252077624201775, -0.010659445077180862, 0.000983641715720296, 0.017380522564053535, 0.03877544030547142, -0.020391320809721947, -0.020208848640322685, -0.04768618941307068, -0.003949773032218218, 0.0204977635294199, -0.015092010609805584, 0.006435962859541178, -0.007207670249044895, 0.0037996130995452404, 0.0009461017907597125, 0.005424760282039642, 0.001378048793412745, -0.023310882970690727, 0.013122825883328915, 0.03363579511642456, 0.015084407292306423, -0.006785702425986528, 0.00772467628121376, -0.003683666931465268, -0.0010710766073316336, -0.030336081981658936, 0.010286896489560604, 0.02513561025261879, -0.012111623771488667, 0.007519394624978304, 0.01569264940917492, -0.009518991224467754, -0.012575408443808556, 0.030594583600759506, -0.019509369507431984, -0.005337325390428305, -0.002064222004264593, 0.006648847833275795, 0.02942371740937233, 0.010621430352330208, -0.022687435150146484, -0.029226038604974747, 0.009602623991668224, -0.024177629500627518, 0.006534802261739969, 0.05595828592777252, -0.029195627197623253, 0.017198048532009125, -0.011206863448023796, -0.041816651821136475, 0.022778671234846115, 0.021060386672616005, 0.0006172708235681057, 0.006895946338772774, 0.013153238222002983, -0.007914751768112183, 0.013708258979022503, -0.03044252283871174, 0.0022029774263501167, -0.009686257690191269, 0.0107734901830554, -0.03527804836630821, -0.014263280667364597, -0.005132043734192848, 0.008690261282026768, 0.0012088813818991184, -0.02042173221707344, -0.05644487962126732, 0.01922045461833477, 0.00545137096196413, 0.04123882204294205, -0.02101476863026619, -0.0018342304974794388, -0.009404945187270641, -0.00015099138545338064, 0.008804306387901306, 0.03853214532136917, -0.011845516972243786, 0.019372515380382538, -0.01576867885887623, -0.058391254395246506, 0.015373322181403637, -0.021927133202552795, 0.0004376492870505899, -0.018916333094239235, 0.012332111597061157, 0.025242052972316742, -0.013693053275346756, -0.008340521715581417, 0.028602590784430504, -0.02306758612394333, 0.013023986481130123, 0.006230681203305721, -0.008332918398082256, 0.031628597527742386, -0.027081985026597977, -0.020300084725022316, 0.005690866149961948, -0.04075222834944725, -0.017973557114601135, -0.016011977568268776, -0.003455576254054904, 0.016285685822367668, 0.02633688785135746, -0.0266105979681015, -0.0008182758465409279, -0.015365718863904476, -0.013883128762245178, 0.039931103587150574, 0.027735846117138863, 0.02093873918056488, -0.024557780474424362, 0.006234482862055302, 0.029058773070573807, 0.033240437507629395, -0.011412144638597965, 0.013282489962875843, -0.011503380723297596, 0.010887536220252514, 0.023402119055390358, -0.004930563736706972, 5.345878889784217e-06, 0.016346510499715805, 0.011260083876550198, 0.024937931448221207, -0.032632194459438324, 0.019144423305988312, -0.01964622363448143, -0.027218839153647423, 0.030822675675153732, 0.00025755257229320705, -0.023356501013040543, -0.0193116907030344, -0.008112430572509766, 0.00884232111275196, 0.05766136199235916, -0.010347721166908741, -0.03184147924184799, 0.0015320101520046592, -0.0010976871708407998, 0.03430486097931862, -0.012362523004412651, -0.013472565449774265, 0.01741093397140503, -0.012248477898538113, 0.01750217005610466, -0.003879444906488061, -0.008158048614859581, 0.03202395513653755, 0.033666208386421204, -0.009017190895974636, 0.014643431641161442, 0.0006134692812338471, -0.02463380992412567, 0.012514583766460419, -0.0006909251678735018, 0.029575778171420097, 0.036768242716789246, -0.004881144035607576, -0.02469463460147381, -0.019798284396529198, -0.0161336250603199, 0.038988325744867325, -0.01273507159203291, -0.0047138771042227745, 0.035125989466905594, -0.01698516495525837, -0.013799495995044708, 0.012005181051790714, 0.012438553385436535, -0.009389739483594894, -0.0322672501206398, 0.01046176627278328, 0.01826247200369835, -0.021258065477013588, 0.0009950462263077497, 0.013807098381221294, -0.0014512279303744435, 0.0009285197593271732, 0.008363330736756325, 0.012506980448961258, 0.006918755359947681, -0.0031856687273830175, 0.01896195113658905, 0.04008316248655319, 0.009914347901940346, -0.019159629940986633, -0.018901126459240913, -0.05136605724692345, 0.02461860328912735, -0.018581800162792206, 0.008173255249857903, -0.007701867260038853, 0.023265264928340912, -0.02633688785135746, 0.006283902563154697, -0.01274267490953207, -0.004554213490337133, 0.02410159818828106, -0.012020386755466461, 0.017076401039958, -0.051183585077524185, -0.04093470051884651, -0.03746772184967995, -0.0454661063849926, -0.025181228294968605, -0.01674186810851097, -0.03451774641871452, -0.004193069878965616, -0.01680269092321396, 0.004660656210035086, -0.013054398819804192, 0.010826711542904377, 0.02907397784292698, -0.013715862296521664, 0.0022504962980747223, -0.01320645958185196, -0.006394146475940943, -0.001822825986891985, -0.0322672501206398, 0.01294795610010624, -0.029302069917321205, -0.014856316149234772, 0.034608982503414154, 0.01768464222550392, 0.017730260267853737, -0.00027062027947977185, -0.003257897449657321, -0.025409318506717682, -0.01544174924492836, -0.013563801534473896, -0.013761480338871479, -0.01888592168688774, -0.0043413289822638035, 0.03576464205980301, 0.013442153111100197, 0.009769890457391739, 0.011412144638597965, 0.03354455903172493, 0.022778671234846115, 0.02589591220021248, -0.0027389908209443092, -0.014164441265165806, 0.012491774745285511, -0.020117612555623055, -0.014065601862967014, 0.00019601556414272636, 0.01655939407646656, -0.007952767424285412, 0.011191656813025475, 0.046865064650774, 0.004687266889959574, 0.010188057087361813, 0.0046074348501861095, -0.030853087082505226, 0.0048431288450956345, 0.02101476863026619, 0.021683836355805397, -0.01157941110432148, -0.02831367589533329, 0.013480168767273426, 0.003461278509348631, 0.026124004274606705, 0.0036589570809155703, 0.019098805263638496, 0.001574777183122933, 0.038897089660167694, -0.003792010247707367, 0.021410126239061356, -0.025698233395814896, -0.010750681161880493, -0.0054399664513766766, -0.0026971742045134306, -0.008583818562328815, -0.006101429928094149, -0.007371135521680117, 0.010857123881578445, 0.005116837564855814, -0.0012554499553516507, -0.024512162432074547, -0.000815899926237762, -0.023280471563339233, 0.002145954640582204, 0.031963128596544266, -0.0036532548256218433, -0.007614432368427515, 0.013571404851973057, 0.002573624951764941, -0.0027979142032563686, -0.012529789470136166, -0.013708258979022503, 0.012126829475164413, -0.022246459499001503, 0.03208477795124054, -0.020969150587916374, -0.013814701698720455, 0.014719462022185326, 0.0040372079238295555, -0.024055980145931244, 0.008925954811275005, 0.027142809703946114, 0.0014065601862967014, 0.008644642308354378, 0.04373261705040932, -0.01205840241163969, -0.0023360303603112698, -0.024223247542977333, 0.010887536220252514, -0.04056975618004799, -0.000803545000962913, -0.01972225494682789, -0.021577393636107445, 0.007428158074617386, 0.02607838623225689, -0.03688989207148552, -0.025089992210268974, 0.010028393939137459, -0.0012107822112739086, 0.004356535151600838, -0.012316904962062836, -0.016544189304113388, 0.014521783217787743, -0.03509557619690895, -0.034365687519311905, -0.044918689876794815, -0.004995189141482115, -0.03433527424931526, 0.04151253029704094, 0.057357240468263626, -0.013449756428599358, 0.012803498655557632, 0.010545399971306324, 0.0010634735226631165, 0.013198856264352798, -0.005219478625804186, -0.05097069963812828, 0.002921463456004858, 0.0036342472303658724, -0.0009038099087774754, -0.04564857855439186, -0.013723465614020824, 0.026747452095150948, -0.04060016945004463, -0.038745030760765076, 0.0032978132367134094, -0.0004167409788351506, -0.005265096668154001, -0.02265702374279499, 0.011100420728325844, 0.01742614060640335, 0.05732683092355728, -0.027842288836836815, -0.008074415847659111, 0.017562994733452797, 0.013198856264352798, 0.005500790663063526, 0.002026206813752651, 0.03439609706401825, 0.03287549316883087, -0.038288846611976624, 0.025865500792860985, -0.024922724813222885, 0.0021820690017193556, 0.03831925988197327, 0.009549402631819248, 0.02761419676244259, 0.001403709058649838, -0.0020052986219525337, 0.002436770359054208, 0.004679663572460413, -0.0430939607322216, 0.01792793907225132, -0.0071164341643452644, -0.007454768754541874, -0.01090274192392826, 0.01433170773088932, -0.028769858181476593, 0.008005988784134388, -0.03731565922498703, 0.022839495912194252, 0.019342102110385895, 0.004535206127911806, 0.01433170773088932, 0.026397712528705597, 0.015152834355831146, -0.023386914283037186, -0.0023341295309364796, -0.01689392700791359, -0.03801513835787773, -0.016589807346463203, -0.0033377292566001415, -0.03637288510799408, -0.01500837691128254, -0.01570785604417324, 0.061554115265607834, -0.0300319604575634, 0.0034327670000493526, -0.010302103124558926, -0.009762288071215153, -0.00020979605324100703, 0.040448106825351715, 0.0008211270323954523, 0.0027199832256883383, 0.025865500792860985, -0.011951959691941738, -0.01741093397140503, -0.015434146858751774, -0.008675054647028446, 0.026534566655755043, 0.02452736720442772, -0.012590614147484303, 0.0013580908998847008, -0.007359731011092663, -0.0021801681723445654, 0.015517779625952244, 0.012073608115315437, -0.0227330531924963, 0.0013286290923133492, -0.004337527323514223, 0.006511993240565062], "index": 62}, {"title": "Falling Star (The Outer Limits)", "text": "\"Falling Star\" is an episode of The Outer Limits television series. It first aired on 30 June 1996, during the second season.", "vector": [-0.030039062723517418, -0.015257558785378933, -0.01758229359984398, -0.03421247750520706, 0.011464987881481647, -0.0279126837849617, -0.029674086719751358, 0.004835924133658409, -0.08384913206100464, 0.047192905098199844, 0.010020955465734005, 0.05369899049401283, -0.00850551389157772, -0.016519103199243546, 0.025103960186243057, -0.02286650240421295, -0.027928553521633148, 0.03535500913858414, 0.01066362950950861, 0.0053357817232608795, 0.0062878914177417755, 0.01939130201935768, -0.013686577789485455, 0.016550840809941292, 0.0315941758453846, -0.002523090923205018, 0.006656833924353123, 0.01731252856552601, 0.007652582135051489, 0.029912114143371582, 0.003415693761780858, -0.008394434116780758, 0.03710054233670235, 0.05896732956171036, -0.034910690039396286, 0.008941897191107273, 0.008957765996456146, 0.0013875016011297703, -0.024786589667201042, 0.029229769483208656, 0.0061966474168002605, -0.032816048711538315, -0.06613989174365997, -0.0014638687716796994, -0.013147048652172089, 0.018835904076695442, -0.02572283148765564, -0.02580217458307743, -0.005926883313804865, -0.009862270206212997, -0.026579730212688446, -0.0187724307179451, -0.029816903173923492, 0.006339463870972395, 0.007755727507174015, 0.00956870336085558, 0.027976159006357193, 0.050557028502225876, -0.015543191693723202, -0.02854742482304573, 0.0146466214209795, -0.002989227883517742, -0.014154698699712753, 0.011314237490296364, -0.016043048352003098, -0.01010823156684637, 0.03909997269511223, 0.006145074963569641, -0.030880093574523926, -0.01637628674507141, 0.02745249681174755, 0.018010742962360382, -0.018899379298090935, -0.00860072486102581, -0.013170851394534111, 0.0009481426095589995, -0.011925174854695797, -0.004288461059331894, -0.05896732956171036, -0.03992513567209244, 0.016265207901597023, 0.021025756374001503, 0.022104814648628235, 0.017963137477636337, -0.016884079203009605, -0.013226390816271305, -0.03332383930683136, -0.060268547385931015, -0.005470663774758577, 0.0251674335449934, 0.026706678792834282, 0.06753631681203842, -0.02965821884572506, -0.03421247750520706, 0.03200675547122955, 0.01940716989338398, 0.03313341736793518, 0.01317878533154726, -0.052397772669792175, 0.024120112881064415, -0.017883794382214546, -0.014083290472626686, -0.027801604941487312, -0.028595030307769775, 0.02362819015979767, -0.01966106705367565, -0.001365682459436357, -0.005173129495233297, 0.035481955856084824, 0.027389023452997208, -0.014035684987902641, 0.023564716801047325, -0.0032391566783189774, -0.009243398904800415, 0.054587624967098236, 0.017804453149437904, 0.00016389180382248014, 0.04373357445001602, -0.03824307397007942, -0.012996298260986805, 0.02526264451444149, -0.0047684828750789165, -0.0393538698554039, 0.018423324450850487, 0.00019476098532322794, -0.007200330030173063, 0.03805265203118324, 0.00752563402056694, 0.0042924280278384686, -0.042337145656347275, -0.03837002441287041, 0.0411946140229702, -0.008259551599621773, 0.016963422298431396, -0.0034890854731202126, -0.021644627675414085, -0.04170240834355354, -0.05274688079953194, 0.0067956834100186825, 0.0024973044637590647, -0.005359584465622902, 0.02518330328166485, -0.03732270374894142, 0.026135412976145744, 0.0012724549742415547, -0.015043334104120731, -0.004578060936182737, -0.03011840581893921, 0.02691296860575676, -0.02984864078462124, 0.0430036224424839, 0.040052082389593124, -0.03275257349014282, 0.019788013771176338, 0.04751027747988701, 0.0061768121086061, 0.042241934686899185, -0.008497579954564571, 0.0029535237699747086, -0.027055785059928894, -0.032260652631521225, -0.0007577206706628203, -0.031721122562885284, -0.01492432039231062, -0.041035931557416916, -0.03678317368030548, 0.03694185987114906, 0.05290556326508522, -0.03919518366456032, 0.0025845812633633614, 0.04144851118326187, -0.012742402032017708, -0.04309883341193199, -0.03332383930683136, 0.013607234694063663, 0.0066727022640407085, 0.062204502522945404, 0.08594377338886261, -0.005438927095383406, -0.013035968877375126, -0.02570696361362934, 0.013694511726498604, -0.007263803854584694, -0.02938845381140709, -0.02810310572385788, 0.0005201891181059182, -0.029610613361001015, 0.0041139074601233006, -0.033355578780174255, -0.03906823694705963, -0.03868739306926727, 0.02005777880549431, 0.033260367810726166, -0.047192905098199844, -0.02261260710656643, 0.047097694128751755, -0.012559914030134678, 0.005629349034279585, -0.06258534640073776, 0.01629694551229477, -0.008680067025125027, -0.06893274933099747, -0.03430768847465515, -0.03157830610871315, 0.031229199841618538, 0.008886357769370079, 0.0357041172683239, 0.008049294352531433, 0.018613746389746666, 0.039576027542352676, -0.036656226962804794, -0.03411726653575897, 0.017693372443318367, 0.01969280280172825, -0.0061966474168002605, 0.014257843606173992, -0.009267201647162437, 0.06734589487314224, -0.03259389102458954, -0.03795744106173515, 0.04281320050358772, -0.021993735805153847, 0.001343863201327622, -0.020279938355088234, 0.028944136574864388, 0.010330391116440296, -0.007965984754264355, -0.005030313041061163, -0.03376815840601921, -0.05471457168459892, 0.005438927095383406, -0.021200310438871384, -0.02719860151410103, -0.004066301975399256, -0.02564348839223385, 0.04601863771677017, -0.014075355604290962, -0.001435107085853815, 0.033260367810726166, -0.036370594054460526, 0.013948407955467701, 0.01056841854006052, 0.023659927770495415, 0.03516458719968796, 0.03424421325325966, -0.003931419923901558, 0.004693107679486275, -0.025056354701519012, -0.008568988181650639, 0.004609798081219196, 0.023866217583417892, -0.019169142469763756, 0.011718884110450745, 0.02096228301525116, 0.020660782232880592, -0.029785167425870895, -0.02800789475440979, 0.009362412616610527, -0.025770436972379684, -0.005760264117270708, -0.02023233287036419, 0.022374579682946205, 0.06728242337703705, 0.014186435379087925, -0.023358425125479698, -0.007485962938517332, 0.008767344057559967, -0.00022748977062292397, -0.022374579682946205, -0.025881515815854073, 0.03532327339053154, -0.012409163638949394, -0.04646295681595802, 0.015678074210882187, 0.03998861089348793, -0.002602433320134878, 0.04449526220560074, 0.037290964275598526, 0.005748362746089697, -0.036751437932252884, 0.01157606765627861, -0.003118159482255578, -0.028420476242899895, -0.0421149879693985, -0.008465842343866825, -0.0027452497743070126, 0.01975627802312374, 0.004554258193820715, 0.0021105099003762007, 0.01674126274883747, -0.024754853919148445, -0.014503804966807365, -0.020184727385640144, 0.05300077423453331, 0.020454490557312965, 0.04284493997693062, -0.02497701160609722, 0.04868454486131668, 0.04062334820628166, -0.013742117211222649, -0.03789396956562996, 0.025960858911275864, -0.006863124202936888, -0.02069251798093319, -0.024405745789408684, -0.014670424163341522, 0.0759148821234703, 0.00047977405483834445, -0.022025471553206444, -0.031435489654541016, -0.004494751337915659, -0.045891690999269485, -0.008065163157880306, -0.023136267438530922, 0.017804453149437904, 0.009084713645279408, 0.012988363392651081, -0.02286650240421295, 0.002374323783442378, -0.03576758876442909, 0.023453636094927788, -0.025103960186243057, -0.018804168328642845, 0.02124791592359543, 0.03046751208603382, -0.016249340027570724, 0.04884323105216026, 0.0013081590877845883, -0.05525410175323486, 0.01977214589715004, -0.006367234047502279, 0.004907332360744476, -0.004447145853191614, 0.010822313837707043, -0.021073361858725548, 0.007771595846861601, -0.024120112881064415, -0.019058063626289368, 0.04274972900748253, -0.032070230692625046, -0.04221019893884659, 0.029499534517526627, 0.030277090147137642, -0.011131749488413334, -0.03678317368030548, 0.015098873525857925, 0.05611100047826767, 0.018169427290558815, 0.00035406582173891366, 0.04674858972430229, 0.0008633453398942947, -0.0005722576170228422, -0.0016354467952623963, 0.009370346553623676, 0.06153802573680878, -0.06518778204917908, 0.027611183002591133, -0.006605261471122503, 0.038750868290662766, 0.0750897228717804, 0.010020955465734005, 0.005236603785306215, 0.034085530787706375, 0.04128982499241829, -0.004522521514445543, -0.006486247759312391, 0.08162754029035568, 0.03306994587182999, -0.02845221385359764, -0.019565856084227562, 0.022184157744050026, 0.0028602962847799063, -0.05814217031002045, -0.010171705856919289, 0.01831224374473095, -0.03948081657290459, 0.016177931800484657, 0.00910058245062828, -0.07750173658132553, 0.005625381600111723, -0.03805265203118324, 0.032022625207901, 0.06395003944635391, 0.01912153698503971, 0.033799897879362106, 0.024881800636649132, -0.0585547499358654, 0.014971925877034664, -0.004673271905630827, -0.024643773213028908, -0.0558253675699234, -0.003147912910208106, 0.00988607294857502, -0.007648615166544914, -0.0009278111392632127, -0.041956301778554916, -0.026198886334896088, 0.015384506434202194, 0.027944421395659447, -0.003514871932566166, 0.04021076858043671, 0.02710339054465294, -0.005438927095383406, -0.01570187695324421, -0.0043241651728749275, 0.030895961448550224, -0.012155267409980297, 0.0011742686619982123, -0.011401514522731304, 0.057983484119176865, 0.02297758124768734, 0.037671808153390884, -0.009965415112674236, -0.01039386447519064, 0.017979005351662636, 0.04284493997693062, 0.043892260640859604, 0.01533690094947815, -0.00860072486102581, 0.012432966381311417, 0.014083290472626686, 0.06550514698028564, 0.002866246970370412, 0.014368923380970955, -0.028134843334555626, -0.00034960280754603446, -0.0016681755660101771, -0.048018068075180054, -0.026976441964507103, -0.08949831873178482, 0.043416205793619156, -0.06791716068983078, -0.04382878541946411, 0.0035902471281588078, -0.02635757066309452, 0.026484519243240356, -0.018820036202669144, -0.02591325342655182, -0.04157545790076256, 0.04157545790076256, 0.002501271665096283, 0.06740937381982803, -0.03541848435997963, 0.013972210697829723, 0.016979290172457695, -0.02881718799471855, -0.011599870398640633, -0.007799365557730198, 0.03268910199403763, -0.03909997269511223, -0.026770152151584625, 0.024374010041356087, 0.024310534819960594, -0.005359584465622902, 0.022311104461550713, 0.05246124789118767, 0.010965130291879177, 1.0901842870225664e-05, 0.01244883518666029, 0.0025052388664335012, 0.035101111978292465, 0.04344794154167175, 0.056967899203300476, -0.03586279973387718, 0.032070230692625046, 0.01377385389059782, -0.042686253786087036, -0.029769297689199448, -0.01685234345495701, -0.008894291706383228, 0.02123204804956913, -0.012472637929022312, -0.08943483978509903, 0.010028889402747154, 0.06268055737018585, 0.03909997269511223, -0.008354762569069862, -0.02580217458307743, -0.05649184435606003, -0.0329747349023819, -0.018375718966126442, 0.05090613290667534, 5.299829808791401e-06, -0.008949832059442997, 0.04294015094637871, 0.02683362551033497, -0.016773000359535217, 0.009052976965904236, -0.03233999386429787, -0.0046812063083052635, 0.06613989174365997, -0.04884323105216026, -0.003772734897211194, -0.030594460666179657, -0.021739838644862175, 0.02343776822090149, -0.06874232739210129, 0.004363836254924536, -0.026944706216454506, -0.013059771619737148, 0.02965821884572506, 0.007581173907965422, 0.043416205793619156, 0.06848842650651932, -0.05077918618917465, 0.05188998207449913, 0.0006749069434590638, -0.007513732649385929, -0.009536965750157833, -0.029721692204475403, 0.031102251261472702, -0.015924034640192986, 0.0265479926019907, 0.02699231170117855, -0.02407250739634037, -0.0050065102986991405, 0.03513285145163536, 0.03011840581893921, 0.013067706488072872, -0.004939069505780935, -0.011996583081781864, 0.007589108310639858, -0.006918664090335369, 0.04357488825917244, -0.016773000359535217, 0.029420191422104836, 0.0173918716609478, -0.003286762163043022, 0.01070330012589693, -0.04725638031959534, 0.02048622816801071, 0.025230908766388893, 0.0010969097493216395, 0.031165726482868195, -0.02680188976228237, 0.024231193587183952, -0.026071937754750252, 0.043162308633327484, 0.005415124353021383, -0.027960289269685745, -0.023929690942168236, -0.03430768847465515, 0.0029753430280834436, 0.03224478289484978, -0.01977214589715004, 0.015321033075451851, 0.03092769905924797, 0.014503804966807365, 0.00553810503333807, -0.022755423560738564, 0.009894006885588169, -0.007839037105441093, 0.04125808924436569, 0.015455914661288261, 0.026341702789068222, -0.04106766730546951, 0.02094641514122486, 0.018883509561419487, -0.0004973781760782003, 0.06429914385080338, 0.020343411713838577, -0.01831224374473095, -0.011377711780369282, -0.014170566573739052, -0.013012166135013103, -0.010092363692820072, -0.0494144968688488, -0.014670424163341522, -0.031260937452316284, -0.029436059296131134, 0.006188713479787111, -0.0033819731324911118, 0.021739838644862175, 0.001988520845770836, 0.014995728619396687, 0.01656670868396759, -0.011211092583835125, -0.01931195892393589, 0.00019550482102204114, -0.007878707721829414, -0.0192167479544878, 0.013059771619737148, 0.015987509861588478, -0.004268625285476446, -0.053318146616220474, 0.0073907519690692425, -0.016130326315760612, 0.025468936190009117, 0.03145135939121246, -0.004538389854133129, -0.024548562243580818, -0.0003798521065618843, -0.02683362551033497, -0.011457053944468498, -0.012909021228551865, 0.020470360293984413, 0.045161738991737366, -0.009394149295985699, -0.004931135103106499, -0.010124100372195244, 0.0338633693754673, -0.01286141574382782, -0.029071085155010223, -0.027801604941487312, 0.008529316633939743, 0.01616206206381321, -0.03351426497101784, 0.012718599289655685, 0.016344550997018814, 0.01157606765627861, 0.004685173276811838, -0.00597448879852891, 0.004332099575549364, 0.01666191965341568, 0.0054944665171206, -0.04513000324368477, -0.016614314168691635, 0.00629185838624835, -0.011203157715499401, -0.03535500913858414, -0.02756357751786709, 0.010187574662268162, 0.0031022909097373486, 0.029499534517526627, -0.048652809113264084, 0.011544330976903439, -0.009267201647162437, 0.0057245600037276745, -0.010735037736594677, 0.023755138739943504, 0.030419906601309776, 0.020248200744390488, 0.007378850597888231, -0.008009622804820538, -0.05109655484557152, 0.013186720199882984, 0.037925705313682556, -0.009925744496285915, 0.030880093574523926, -0.05198519304394722, 0.003794554155319929, 0.01029865350574255, 0.02204134128987789, 0.03694185987114906, -0.01020344253629446, 0.011972780339419842, 0.024294666945934296, -0.022549131885170937, -0.018518535420298576, 0.04335273057222366, -0.005756296683102846, 0.02534198760986328, -0.019169142469763756, 0.017629899084568024, 0.01702689565718174, -0.019438907504081726, 0.05392114818096161, 0.00024298633798025548, -0.018740693107247353, -0.036116696894168854, -0.010147903114557266, 0.014035684987902641, -0.025738699361681938, -0.01491638645529747, -0.016788868233561516, 0.007128921803086996, 0.05665053054690361, 0.013353339396417141, -0.038401760160923004, -0.04532042518258095, -0.030166011303663254, 0.03038816899061203, 0.009648045524954796, -0.034910690039396286, 0.009560768492519855, -0.015059202909469604, -0.009655979461967945, 0.04265451803803444, 0.006521951872855425, 0.001494613941758871, -0.029959719628095627, -0.011496725492179394, 0.03487895429134369, 0.008124670013785362, -0.016503235325217247, -0.010052692145109177, 0.026849495247006416, -0.009536965750157833, 0.014186435379087925, -0.025500671938061714, -0.026944706216454506, 0.0042963954620063305, 0.022771291434764862, 0.032530415803194046, -0.008616593666374683, -0.009663914330303669, -0.01712210662662983, 0.0054547954350709915, -0.014408593997359276, 0.017550555989146233, -0.008077064529061317, -0.014535542577505112, -0.0439557321369648, -0.02764291875064373, -0.0007562329992651939, -0.032816048711538315, -0.018724825233221054, -0.0329747349023819, 0.008204012177884579, -0.0178361888974905, 0.008124670013785362, 0.006398970726877451, -0.021105099469423294, -0.003623967757448554, 0.024104245007038116, -0.028071369975805283, -0.03306994587182999, 0.057253532111644745, -0.0035664443857967854, -0.032355863600969315, 0.026611467823386192, 0.013575498014688492, -0.007283639628440142, -0.015138545073568821, -0.020010173320770264, -0.027579445391893387, -0.04173414409160614, 0.02096228301525116, 0.025929121300578117, 0.009663914330303669, 0.007577206939458847, 0.0047724503092467785, 0.010060626082122326, -0.026595598086714745, 0.02683362551033497, 0.03313341736793518, 0.011591936461627483, 0.0137341832742095, -0.005589677486568689, 0.025595882907509804, 0.002243408700451255, 0.020978150889277458, 0.012226675637066364, 0.020264068618416786, 0.007446291856467724, 0.004066301975399256, 0.013876999728381634, 0.011615739203989506, -0.01587642915546894, 0.019248485565185547, -0.006212516222149134, -0.028864793479442596, 0.009743256494402885, -0.015765350311994553, -0.0215176809579134, 0.0016007345402613282, -0.012512308545410633, -0.008291289210319519, -0.03367294743657112, 0.00997334998100996, 0.017994875088334084, -0.0018109921365976334, 0.027484234422445297, -0.029086953029036522, -0.006529885809868574, 0.02370753325521946, -0.026103675365447998, 0.015384506434202194, -0.012163202278316021, 0.01542417798191309, 0.009068845771253109, -0.007109086029231548, -0.03313341736793518, -0.10352606326341629, 0.04271798953413963, 0.008362697437405586, 0.004375737626105547, -0.01016377191990614, -0.0059308502823114395, -0.03259389102458954, -0.008164340630173683, 0.029991457238793373, 0.005018411669880152, -0.010219311341643333, -0.0028126908000558615, -0.016868211328983307, 0.0064981491304934025, 0.036180172115564346, 0.016439761966466904, -0.0006154000875540078, -0.042337145656347275, -0.023929690942168236, 0.010362127795815468, -0.028420476242899895, -0.0069424668326973915, 0.016709525138139725, -0.004482849966734648, -0.0002610863302834332, -0.0030705539975315332, -0.00046663294779136777, 0.04989055171608925, -0.006121272221207619, -0.02535785548388958, -0.004153578542172909, 0.005161228124052286, -0.009949547238647938, -0.02948366478085518, -0.0173918716609478, -0.02270781807601452, 0.01236155815422535, 0.015622533857822418, 0.004788318648934364, 0.023485373705625534, 0.014503804966807365, -0.005887211766093969, 0.0494462326169014, 0.00027893841615878046, 0.010973065160214901, -0.0201371219009161, -0.041226353496313095, 0.004423343110829592, 0.0132660623639822, 0.017915531992912292, 0.03443463519215584, 0.0012665042886510491, 0.046367745846509933, -0.02699231170117855, 0.012115596793591976, 0.042337145656347275, -0.024120112881064415, -0.015352769754827023, 0.01712210662662983, 0.04284493997693062, -0.014487937092781067, -0.03551369532942772, -0.023041056469082832, -0.016503235325217247, -0.0067361765541136265, -0.0031538635957986116, 0.0187724307179451, 0.005022379104048014, 0.0077477931044995785, 0.027150996029376984, 0.002969392342492938, 0.022850634530186653, 0.01950238086283207, 0.014289580285549164, -0.010005086660385132, 0.007053546607494354, 0.0022672114428132772, 0.0025330085773020983, 0.0051572611555457115, 0.011139684356749058, 0.034371163696050644, -0.012710665352642536, 0.0003813397779595107, 0.016725394874811172, -0.00430432939901948, 0.028801320120692253, -0.023310819640755653, 0.00979086197912693, 0.028420476242899895, 0.024278799071907997, -0.01848679780960083, 0.021105099469423294, 0.0057245600037276745, 0.0057523297145962715, 0.010338325053453445, -0.015043334104120731, -0.04922407492995262, -0.012837613001465797, -0.022644342854619026, 0.00027769868029281497, -0.009306873194873333, -0.03405379131436348, 0.022263498976826668, -0.02415185049176216, -0.007489929907023907, 0.029626481235027313, 0.02554827742278576, 0.00686709163710475, 0.017550555989146233, 0.010147903114557266, -0.012385360896587372, 0.00464550219476223, -0.0002623260661493987, -0.016709525138139725, 0.013115311972796917, -0.04751027747988701, -0.020470360293984413, 0.026849495247006416, -0.022580869495868683, -0.016582578420639038, 0.06823453307151794, -0.014360988512635231, 0.07851731777191162, 0.011861700564622879, -0.03608496114611626, -0.035831063985824585, 0.0015918085118755698, 0.010401799343526363, -0.03367294743657112, 0.016899948939681053, -0.006922631058841944, 0.0077200233936309814, 0.0009258275385946035, 0.027753999456763268, 0.021168572828173637, 0.009354478679597378, 0.0032808114774525166, 0.01728079281747341, 0.020454490557312965, 0.014614884741604328, -0.009552834555506706, 0.008449974469840527, 0.00028811238007619977, 0.02837287075817585, 0.038116127252578735, 0.006212516222149134, 0.009663914330303669, -0.005831672344356775, -0.022914107888936996, 0.008957765996456146, 0.0027631018310785294, -0.03468853235244751, -0.0448761060833931, 0.0018556222785264254, -0.014027750119566917, -0.010623957961797714, -0.023183872923254967, 0.059824228286743164, -0.013480287045240402, 0.011917239986360073, 0.004248789977282286, -0.0038857979234308004, -0.032530415803194046, -0.02946779690682888, 0.03186393901705742, 0.015035400167107582, 0.005327847320586443, 0.008941897191107273, -0.009259267710149288, 0.023406030610203743, -0.031625911593437195, 0.023215608671307564, 0.012829679064452648, 0.013900802470743656, -0.03449811041355133, 0.04265451803803444, -0.019518250599503517, 0.055698420852422714, -0.019423039630055428, -0.0017782633658498526, -0.025056354701519012, 0.0060776337049901485, 0.029721692204475403, 0.0031221264507621527, -0.007105119060724974, -0.027420761063694954, -0.019565856084227562, -0.022279368713498116, 0.009076779708266258, 0.017629899084568024, 0.001988520845770836, -0.025960858911275864, 0.002304899040609598, -0.02994385175406933, -0.04582821577787399, 0.009536965750157833, -0.010258982889354229, -0.012623388320207596, -0.00969565100967884, -0.00046564117656089365, -0.01867721974849701, 0.024088377133011818, 0.016693657264113426, 0.03459332138299942, 0.012004517018795013, -0.011187289841473103, -0.010235180146992207, 0.020613176748156548, 0.020010173320770264, 0.01683647371828556, 0.018962852656841278, 0.019819751381874084, 0.003445447189733386, -0.02370753325521946, 0.017169712111353874, 0.009306873194873333, 0.011750620789825916, 0.011536396108567715, 0.030911829322576523, 0.012782073579728603, -0.023739269003272057, 0.0247231163084507, 0.03176872804760933, -0.05703137442469597, -0.03348252549767494, -0.05112829431891441, 0.02407250739634037, 0.012599585577845573, -0.019264353439211845, -0.022374579682946205, -0.009425886906683445, 0.007232067175209522, -0.003631901927292347, -0.0260878074914217, -0.010044758208096027, -0.03141961991786957, 0.00041580418474040926, 0.01821703277528286, 0.029785167425870895, -0.032086096704006195, -0.0009654987952671945, 0.016582578420639038, -0.02005777880549431, -0.015939904376864433, -0.012020385824143887, -0.011695081368088722, 0.06747284531593323, 0.006129206623882055, -0.023406030610203743, -0.002531025093048811, -0.03827481344342232, -0.014178501442074776, 0.029610613361001015, -0.03779875859618187, -0.0013775838306173682, -0.0012526194332167506, 0.004463014658540487, 0.012337755411863327, -0.007370916195213795, 0.003939353860914707, -0.005228669382631779, -0.014472068287432194, 0.013670708984136581, -0.025024617090821266, 0.042971886694431305, 0.01605098322033882, 0.031070515513420105, -0.0035029705613851547, 0.00480418698862195, -0.002124394988641143, 0.05300077423453331, 0.018248770385980606, -0.027611183002591133, -0.01395634189248085, 0.003760833526030183, 0.003324449760839343, 0.00969565100967884, -0.004585995338857174, -0.006105403881520033, 0.028404608368873596, -0.028944136574864388, 0.022311104461550713, 0.006625096779316664, -0.032816048711538315, 0.00897363480180502, 0.035481955856084824, -0.020819466561079025, 0.002610367489978671, -0.0021779511589556932, -0.023675795644521713, -0.0020192661322653294, 0.016598446294665337, 0.0302136167883873, -0.02689710073173046, -0.021120967343449593, 0.006720307748764753, -0.0054944665171206, -0.002463584067299962, -0.00716462591663003, -0.013377142138779163, 0.03440289944410324, -0.009211662225425243, 0.05154087394475937, -0.007283639628440142, -0.052302561700344086, -0.010211377404630184, 0.004609798081219196, 0.024643773213028908, -0.03161004185676575, 0.025119828060269356, -0.015090939588844776, 0.01712210662662983, -0.031165726482868195, -0.002084723673760891, 0.0031875839922577143, -0.010909590870141983, 0.0009580604382790625, -0.011504659429192543, 0.0045304554514586926, 0.026690809056162834, 0.012012450955808163, 0.042876675724983215, -0.00979086197912693, 0.009243398904800415, 0.06341050565242767, 0.006871058605611324, -0.011917239986360073, -0.022469790652394295, -0.0021997701842337847, -0.003735047299414873, 0.018264638260006905, -0.003147912910208106, 0.04532042518258095, -0.015939904376864433, 0.00028662470867857337, 0.009965415112674236, 0.03697359561920166, -0.00498667499050498, 0.033165156841278076, -0.003842159640043974, -0.02964235097169876, 0.015789153054356575, -0.004879562649875879, 0.002283079782500863, -0.028864793479442596, -0.031625911593437195, -0.01748708263039589, 0.025326119735836983, 0.012202872894704342, 0.012060056440532207, 0.010100297629833221, 0.025786304846405983, 0.025008749216794968, 0.0021779511589556932, 0.015709809958934784, -0.011655409820377827, -0.016995159909129143, -0.03503764048218727, 0.012655124999582767, 0.0494462326169014, 0.017423609271645546, -0.005982422735542059, 0.02910282090306282, 0.023961428552865982, -0.0025052388664335012, -0.015503520146012306, 0.01098099909722805, -0.02480245940387249, -0.030959434807300568, -0.005470663774758577, 0.0016523071099072695, 0.013567564077675343, 0.01176648959517479, -0.015805020928382874, 0.02680188976228237, -0.027658788487315178, 0.0017584277084097266, -0.015249624848365784, 0.002776986686512828, 0.00553810503333807, -0.013694511726498604, -0.01710623875260353, -0.033101681619882584, 0.014480002224445343, -0.026786020025610924, 0.00686709163710475, -0.008656264282763004, -0.004990641959011555, -0.02700817957520485, -0.015344835817813873, 0.03798918053507805, 0.030308827757835388, -0.017820321023464203, -0.004048449918627739, -0.008251617662608624, 0.021263783797621727, 0.0096083739772439, 0.006010192912071943, 0.022184157744050026, -0.009267201647162437, 0.05388941243290901, 0.004558225627988577, -0.013028034940361977, 0.028769582509994507, 0.01966106705367565, -0.01267099380493164, -0.017740977928042412, 0.030895961448550224, 0.008259551599621773, -0.008061195723712444, -0.003326433477923274, 0.026294097304344177, 0.0365927517414093, 0.022374579682946205, 0.0040246471762657166, 0.03200675547122955, 0.01847092993557453, -0.005728526972234249, 0.021105099469423294, -0.018137691542506218, 0.002084723673760891, 0.036370594054460526, -0.010822313837707043, -0.03703707084059715, 0.019724540412425995, -0.002739299088716507, 0.02140660025179386, 0.002015298930928111, -0.00951316300779581, 0.004359869286417961, -0.015924034640192986, 0.013202588073909283, -0.0043519348837435246, 0.01363897230476141, -0.010124100372195244, -0.01904219575226307, -0.022088946774601936, -0.0008345837122760713, 0.0041734143160283566, -0.01404361892491579, 0.015733612701296806, 0.02497701160609722, -0.03468853235244751, 0.015559060499072075, -0.028721977025270462, -0.0019081865902990103, -0.02992798388004303, 0.019327828660607338, 0.002255310071632266, -0.03954429179430008, -0.036370594054460526, 0.015749482437968254, 0.00928307045251131, 0.014963991940021515, -0.029150426387786865, -0.005855475086718798, -0.021470075473189354, 0.007081316318362951, -0.021263783797621727, 0.02005777880549431, 0.005220734979957342, -0.030229484662413597, -0.016788868233561516, 0.0029336882289499044, 0.0029793099965900183, 0.033641211688518524, 0.015947837382555008, -0.02518330328166485, -0.026135412976145744, 0.003842159640043974, -0.01977214589715004, -0.003982992377132177, 0.049097124487161636, 0.008132603950798512, -0.02096228301525116, -0.0018476879922673106, 0.01248850580304861, -0.03681490942835808, -0.009822598658502102, -0.03275257349014282, 0.025691093876957893, -0.023723401129245758, 0.011790292337536812, 0.0014727948000654578, 0.04646295681595802, 0.0018923181341961026, -0.004673271905630827, 0.021105099469423294, -0.05242950841784477, 0.0023485373239964247, -0.043511416763067245, -0.0014509755419567227, -0.012417097575962543, 0.008283354341983795, 0.027230339124798775, -0.0019438907038420439, -0.03827481344342232, -0.028420476242899895, -0.014710095711052418, 0.03817960247397423, 0.0018179345643147826, -0.00019662057457026094, 0.010711234994232655, -0.0034394965041428804, -0.004625666420906782, -0.03770354762673378, 0.006327562499791384, 0.007406620308756828, 0.02094641514122486, 0.026659073308110237, 0.015400375239551067, 0.0009188851108774543, 7.122227543732151e-05, 0.015217887237668037, -0.04189283028244972, -0.021184442564845085, -0.005795968230813742, -0.028261791914701462, 0.02664320357143879, 0.019835619255900383, -0.017058633267879486, 0.015987509861588478, -0.0042646583169698715, 0.06153802573680878, 0.007172560319304466, 0.017788583412766457, 0.005998291540890932, -0.020613176748156548, -0.03259389102458954, -0.037925705313682556, -0.009648045524954796, -0.058713436126708984, 0.011282500810921192, -0.0007656548987142742, 0.04138503596186638, -0.023406030610203743, -0.004478882998228073, -0.05366725102066994, -0.010520813055336475, 0.0013775838306173682, -0.009822598658502102, 0.030991172417998314, -0.0338633693754673, -0.014963991940021515, 0.03200675547122955, -0.0205973070114851, 0.009227530099451542, 0.013440615497529507, -0.019899094477295876, -0.015963707119226456, -0.01354376133531332, -0.049287546426057816, -0.0034811513032764196, -0.033450789749622345, 0.018708957359194756, 0.018835904076695442, 0.005256439093500376, -0.014075355604290962, -0.020343411713838577, 0.0061966474168002605, -0.0042051514610648155, -0.020930545404553413, -0.027595313265919685, 0.003177666338160634, 0.010639826767146587, 0.03313341736793518, 0.0025171402376145124, -0.022390447556972504, -0.04071855917572975, -0.00016091646102722734, 0.007958050817251205, -0.03268910199403763, -0.008616593666374683, -0.02902347967028618, 0.027976159006357193, -0.015765350311994553, 0.008029459044337273, -0.009687717072665691, 0.006926598493009806, 0.027611183002591133, -0.018534403294324875, 0.009346543811261654, 0.013797656632959843, -0.0029832771979272366, -0.023659927770495415, 0.02508809231221676, -0.02353297919034958, 0.01628107577562332, -0.008156406693160534, 0.020438622683286667, -0.04798633232712746, 0.015487652271986008, -0.02115270495414734, -0.00448681740090251, 0.0160271804779768, -0.03484721854329109, -0.038306549191474915, -0.0033918910194188356, 0.012329821474850178, 0.03430768847465515, 0.027753999456763268, 0.0022771290969103575, -0.01589229889214039, 0.006355332676321268, -0.013305733911693096, 0.0066131954081356525, 0.02269194833934307, 0.019518250599503517, 0.017264923080801964, -0.006954368203878403, -0.01294869277626276, 0.04747853800654411, 0.018343981355428696, 0.0146466214209795, -0.03275257349014282, 0.0011812112061306834, 0.029229769483208656, 0.008926029317080975, 0.012321886606514454, -0.008997437544167042, -0.02497701160609722, 0.01189343724399805, 0.023025186732411385, -0.00028116992325522006, -0.011591936461627483, 0.004098039120435715, -0.015765350311994553, -0.015209953300654888, -0.00860865879803896, 0.03722749277949333, -0.0019171126186847687, 0.060617655515670776, 0.007973918691277504, -0.017534688115119934, -0.006986105348914862, -0.03357773646712303, -0.01748708263039589, -0.013210522942245007, 0.0067917159758508205, -0.014757701195776463, -0.009751190431416035, -0.02050209604203701, -0.015075070783495903, -0.010806445963680744, 0.005716625601053238, 0.010639826767146587, -0.037386175245046616, -0.008592790924012661, 0.026849495247006416, -0.016328681260347366, 0.03194328024983406, 0.023041056469082832, -0.001127655035816133, 0.006153009366244078, -0.034466374665498734, 0.04246409609913826, 0.00524057075381279, -0.026468651369214058, -0.01637628674507141, 0.015368638560175896, -0.0035029705613851547, 0.021628759801387787, -0.0014489920577034354, -0.006279957015067339, 0.013353339396417141, -0.009045043028891087, -0.046272534877061844, -0.02353297919034958, -0.049573179334402084, 0.009497295133769512, -0.0036814911291003227, -0.00044679734855890274, -0.025421330705285072, -0.0020311675034463406, -0.006779814604669809, 0.0066766696982085705, -0.01542417798191309, -0.020343411713838577, -0.024183588102459908, -0.038116127252578735, -0.017185581848025322, 0.024865932762622833, -0.0037707514129579067, 0.010973065160214901, 0.03862391784787178, -0.014416528865695, -0.04100419208407402, -0.004105973057448864, 0.008965699933469296, -0.00028216169448569417, 0.023723401129245758, -0.020724255591630936, 0.0676632672548294, -0.020010173320770264, 0.005617447663098574, -0.014345120638608932, -0.021533548831939697, 0.029626481235027313, 0.05023965612053871, -0.02508809231221676, 0.005716625601053238, -0.016185864806175232, -0.013845262117683887, -0.014813240617513657, -0.0022017539013177156, -0.028975874185562134, 0.004665337968617678, 0.027706393972039223, -0.019327828660607338, -0.0009674823377281427, -0.006839321460574865, -0.02591325342655182, -0.0012040220899507403, 0.014115027152001858, 0.006351365242153406, -0.004201184492558241, -0.018074216321110725, -0.02370753325521946, 0.04097245633602142, -0.02535785548388958, -0.007997721433639526, -0.014202304184436798, -0.00716462591663003, 0.011829963885247707, 0.0539846234023571, 0.02042275480926037, -0.008156406693160534, 0.006160943303257227, -0.025976726785302162, -0.010235180146992207, 0.016773000359535217, -0.029324980452656746, 0.022469790652394295, -0.0023802744690328836, 0.011544330976903439, 0.008616593666374683, 0.009624242782592773, 0.010076494887471199, -0.025024617090821266, -0.011377711780369282, -0.03256215155124664, -0.021946130320429802, -0.03319689258933067, 0.009624242782592773, -3.514624040690251e-05, 0.0023882086388766766, -0.02242218516767025, -0.015305164270102978, -0.021374864503741264, -0.030895961448550224, -0.0393538698554039, 0.013615169562399387, 0.0016195783391594887, -0.024913538247346878, -0.03038816899061203, -0.03643406555056572, 0.016709525138139725, 0.04217846319079399, -0.020629044622182846, 0.00021534044935833663, -0.027262074872851372, -0.014083290472626686, -0.01176648959517479], "index": 63}, {"title": "Athletics at the 2004 Summer Olympics \u2013 Women's heptathlon", "text": "The women's heptathlon competition at the 2004 Summer Olympics in Athens was held at the Olympic Stadium on 20\u201321 August.", "vector": [-0.009629865176975727, -0.027945220470428467, -0.013117847964167595, 0.03463166952133179, -0.06854644417762756, -0.0287034772336483, 0.010126179084181786, 0.008196069858968258, 0.05266440287232399, -0.002536714542657137, -0.042958710342645645, -0.04946593567728996, -0.028731049969792366, -0.002669409615918994, -0.01298687607049942, 0.004625368397682905, -0.017233114689588547, 0.019466526806354523, -0.030109699815511703, -0.01341425720602274, 0.00825121533125639, 0.0427105538547039, -0.014255233108997345, 0.014310379512608051, -0.01493077166378498, -0.017508845776319504, 0.005349159240722656, -0.024057429283857346, 0.023974711075425148, 0.008168497122824192, 0.01832224801182747, 0.015109995380043983, 0.01909429207444191, -0.014475816860795021, -0.03645148500800133, 0.01275939866900444, 0.008416653610765934, 0.017260689288377762, -0.02837260067462921, -0.0011210141237825155, -0.0033294379245489836, 0.06810527294874191, -0.007582570891827345, 0.07207578420639038, -0.003787838853895664, -0.015675241127610207, 0.003377690678462386, -0.003022688440978527, -0.033280592411756516, -0.011663372628390789, -0.02630462683737278, 0.013889891095459461, -0.005518043413758278, -0.018225742504000664, 0.013117847964167595, -0.05150633677840233, 0.043096575886011124, 0.07505366206169128, 0.02287179045379162, -0.0021610327530652285, -0.014475816860795021, 0.022940723225474358, -0.018666910007596016, -0.0016397309955209494, -0.010188218206167221, -0.03286699950695038, 0.02434694580733776, 0.1148139089345932, 0.017715642228722572, 0.044061630964279175, 0.003932597115635872, -0.007775581907480955, -0.0301924180239439, -0.018735842779278755, -0.017191756516695023, -0.058013562113046646, 0.014434457756578922, -0.027628131210803986, -0.046984367072582245, 0.01675058901309967, -0.013586588203907013, -0.06314213573932648, -0.022099748253822327, 0.026538997888565063, 0.022499555721879005, 0.008520052768290043, 0.005452557932585478, -0.0714140310883522, -0.04524726793169975, 0.00589372543618083, -0.010863755829632282, 0.01314542070031166, -0.02052808739244938, 0.0017233116086572409, -0.03650663048028946, 0.02285800501704216, -0.0024643356446176767, 0.02077624388039112, -0.016585150733590126, -0.030826596543192863, -0.019177010282874107, -0.009188697673380375, 0.007996165193617344, -0.015385725535452366, 0.04326201230287552, 0.04910748451948166, 0.03669964149594307, 0.026842301711440086, -0.005904065445065498, -0.017329620197415352, -0.010188218206167221, -0.005804113112390041, 0.004339298699051142, -0.019190797582268715, -0.03402506187558174, 0.002650453243404627, -0.05928191915154457, -0.026332201436161995, -0.020624592900276184, 0.03929150477051735, 0.0118563836440444, -0.0006074673146940768, 0.02709045819938183, 0.022899363189935684, 0.023657621815800667, 0.00893364753574133, 0.0015690751606598496, 0.03576216101646423, -0.018556619063019753, -0.01442067138850689, 0.001850836561061442, 0.020541874691843987, -0.0015130675164982677, 0.010567346587777138, 0.0009056002018041909, 0.0012020098511129618, -0.030936889350414276, -0.026925019919872284, 0.022223826497793198, -0.008416653610765934, -0.0067381481640040874, 0.009002579376101494, -0.019714685156941414, -0.014186300337314606, -0.05462208390235901, -0.008106458000838757, 0.025105202570557594, -0.01302134245634079, -0.012283764779567719, -0.027366187423467636, -0.013786492869257927, -0.018542831763625145, -0.031653787940740585, -0.016157768666744232, -0.009636757895350456, 0.038547031581401825, 0.01668165624141693, -0.030026979744434357, -0.005797219928354025, 0.03813343867659569, -0.016061263158917427, -0.02487083151936531, -0.01818438433110714, 0.0013777875574305654, 0.001295930240303278, -0.0001702847221167758, -0.0039808498695492744, 0.028400175273418427, -0.007754901889711618, -0.0015845849411562085, -0.016585150733590126, -0.04974166303873062, -0.003267398802563548, 0.0062900870107114315, -0.053739748895168304, 0.04149734228849411, 0.027504052966833115, 0.054070621728897095, 0.01158754713833332, -0.015468444675207138, -0.006062610074877739, 0.019563032314181328, 0.0014406885020434856, -0.00423590000718832, -0.051919929683208466, 0.025408506393432617, 0.0014915261417627335, -0.020693525671958923, -0.002505694981664419, 0.037830136716365814, 0.038216158747673035, -0.0032846317626535892, 0.07279267907142639, 0.03948451578617096, -0.054401498287916183, -0.027697063982486725, 0.004197986796498299, -0.03170893341302872, 0.0016819520387798548, 0.010787930339574814, -0.005628335755318403, -0.026856087148189545, -0.041993655264377594, 0.00909219216555357, -0.03170893341302872, -0.004263472743332386, 0.044392507523298264, -0.03427322208881378, 0.018404968082904816, 0.015578736551105976, 0.023588689044117928, 0.05327100679278374, 0.0027538519352674484, -0.007996165193617344, -0.004411677364259958, 0.04781155660748482, 0.043537743389606476, 0.023133734241127968, -0.039070919156074524, 0.009850448928773403, -0.03129533678293228, -0.008719956502318382, -0.016461072489619255, 0.06496195495128632, 0.007623930461704731, 0.012166579253971577, -0.003818858414888382, -0.015275433659553528, 0.002186882309615612, 0.0257255956530571, -0.011105019599199295, -0.04058743268251419, -0.01778457500040531, 0.003763712476938963, 0.05280226469039917, 0.05156148225069046, 0.01622670143842697, 0.004194540437310934, 0.05277469381690025, -0.011442788876593113, -0.04927292466163635, 0.003960169851779938, -0.022513343021273613, -0.05528383329510689, -0.05194750428199768, 0.0035534685011953115, 0.009050832130014896, 0.020610805600881577, -0.021658578887581825, 0.03576216101646423, 0.029889116063714027, 0.002171372529119253, -0.022678779438138008, 0.02936522848904133, 0.06021939963102341, 0.004942457657307386, 0.04604688659310341, -0.0523335263133049, -0.028951633721590042, -0.003908470738679171, -0.03876761719584465, 0.03416292741894722, 0.024953551590442657, -0.006510671228170395, 0.0038981307297945023, 0.05305042117834091, -0.01792244054377079, 0.012656000442802906, -0.029833970591425896, -0.03209495544433594, -0.03612060844898224, 0.0030261350329965353, 0.006090183276683092, 0.0024419324472546577, 0.046791356056928635, 0.021920522674918175, 0.02525685355067253, -0.018074091523885727, -0.011208418756723404, -0.018818562850356102, -0.035817306488752365, -0.0017388213891535997, 0.035955172032117844, -0.03377690538764, 0.024636462330818176, -0.002540161134675145, 0.01695738546550274, -0.00843733362853527, 0.03551400452852249, 0.02507762983441353, 0.02442966401576996, -0.0012347527081146836, -0.05136847123503685, 0.023037228733301163, 0.00925073679536581, 0.030440574511885643, -0.038161009550094604, 0.01143589522689581, 0.014806692488491535, -0.05878560245037079, -0.02837260067462921, 0.05015525966882706, -0.016847094520926476, -0.010450161062180996, -0.056276462972164154, -0.050954874604940414, 0.012738718651235104, -0.021796444430947304, -0.04623989388346672, 0.020569447427988052, 0.015082422643899918, 0.020624592900276184, 0.008003058843314648, 0.02077624388039112, 0.016612723469734192, 0.005090662278234959, 0.002112779999151826, 0.04188336431980133, -0.019121864810585976, 0.0036086144391447306, -0.009085298515856266, 0.04896962270140648, -0.009912488050758839, 0.050872158259153366, -0.007203442510217428, -0.012421629391610622, 0.001780180842615664, -0.05346401780843735, 0.0025746275205165148, -0.023023443296551704, -0.010470841079950333, -0.04855602607131004, -0.04221424087882042, 0.017384767532348633, -0.0011735751759260893, -0.05572500079870224, -0.03181922435760498, -0.024112574756145477, 0.04422706738114357, 0.0010787930805236101, -0.021865377202630043, 0.018349820747971535, 0.010787930339574814, 0.05817899852991104, 0.016268061473965645, 0.033032435923814774, 0.03686508163809776, 0.011111913248896599, 0.020169638097286224, 0.07428161799907684, 0.00045280010090209544, 0.0560007318854332, 0.03190194442868233, 0.055366553366184235, 0.010953368619084358, 0.013131634332239628, -0.04400648549199104, -0.05657976493239403, 0.039705097675323486, -0.06876702606678009, 0.04210394620895386, 0.009140444919466972, -0.004949350841343403, -0.026414919644594193, -0.044833675026893616, -0.012325123883783817, 0.03642391413450241, 0.009691904298961163, -0.020376436412334442, 0.00025052641285583377, -0.01760535128414631, 0.010043459944427013, -0.018101664260029793, -0.02098304219543934, -0.020224783569574356, -0.009126657620072365, -0.016847094520926476, -0.0348246805369854, -0.0039808498695492744, -0.0090577257797122, 0.004590902011841536, 0.04817000404000282, -0.012483668513596058, 0.06556855887174606, 0.010905115865170956, 0.05707607790827751, 0.09518194198608398, -0.05271954834461212, -0.020555660128593445, -0.017508845776319504, 0.002026614500209689, 0.003729246323928237, -0.052443817257881165, -0.0045288628898561, -0.02033507637679577, -0.024774327874183655, 0.036782361567020416, 0.057517245411872864, -0.013703773729503155, -0.011849489994347095, -0.009933168068528175, -0.036341194063425064, -0.03460409492254257, -0.05065157264471054, 0.00577998673543334, 0.010553560219705105, -0.002169649349525571, 0.04345502331852913, -0.02117605321109295, 0.033418457955121994, -0.039319075644016266, 0.05467722937464714, -0.034962546080350876, -0.03752683103084564, -0.010484627448022366, 0.0025125881657004356, 0.01895642653107643, 0.017246901988983154, -0.009367921389639378, -0.033804479986429214, -0.03294971585273743, 0.04086316376924515, -0.031929515302181244, -0.016309421509504318, -0.00010011363337980583, 0.007651503197848797, -0.08906073868274689, -0.02369897998869419, -0.03416292741894722, 0.02442966401576996, -0.04298628494143486, -0.05271954834461212, 0.013814065605401993, 0.008292575366795063, 0.03259126842021942, -0.00767907639965415, -0.0327291339635849, 0.019204584881663322, 0.011615119874477386, 0.011987355537712574, -0.04058743268251419, 0.01155997347086668, -0.01497213076800108, 0.010532880201935768, -0.018280889838933945, 0.0031174705363810062, 0.011725411750376225, 0.0062349410727620125, 0.009202484041452408, 0.02163100615143776, -0.030468149110674858, 0.0351831279695034, -0.008561411872506142, 0.024691607803106308, 0.020817603915929794, 0.020210998132824898, 0.006303873844444752, -0.002186882309615612, -0.038409169763326645, -0.0307163055986166, 0.029310083016753197, 0.014186300337314606, 0.024788113310933113, -0.03135048225522041, 0.004011869430541992, -0.009974527172744274, -0.01136006973683834, -0.0030898975674062967, -0.003045091638341546, -0.0003642649680841714, -0.03311515599489212, -0.012201045639812946, -0.07025596499443054, -0.025560157373547554, -0.03545885905623436, 0.050237979739904404, -0.003262228798121214, -0.01883234828710556, 0.010208897292613983, 0.0033242679201066494, 0.021672366186976433, 0.053215861320495605, 0.04615717753767967, -0.01988012157380581, 0.009326562285423279, -0.01669544167816639, 0.0175915639847517, -0.062314946204423904, -0.029199790209531784, 0.004266919568181038, 0.005414644721895456, -0.005966104567050934, 0.08597256988286972, 0.00883024837821722, 0.010215790942311287, 0.047701265662908554, 0.0029003333766013384, -0.017315834760665894, -0.00414284085854888, 0.013758919201791286, 0.03838159516453743, 0.011718519032001495, -0.008009952493011951, 0.06485166400671005, 0.03228796645998955, -0.00042738128104247153, 0.03253612294793129, 0.04761854559183121, 0.06430020183324814, 0.014958344399929047, 0.09716720134019852, 0.03374933451414108, -0.038271304219961166, 0.0053284792229533195, 0.024264227598905563, -0.003560361685231328, 0.0025797972921282053, 0.001759501057676971, 0.012394056655466557, 0.008713062852621078, 0.02143799513578415, -0.03487982600927353, -0.04111132025718689, 0.03432836756110191, -0.004566775634884834, 0.019177010282874107, -0.03838159516453743, -0.007582570891827345, 0.00090904685202986, 0.010436374694108963, 0.05021040514111519, 0.0066140699200332165, -0.018735842779278755, -0.024112574756145477, -0.006658875849097967, -0.023023443296551704, -0.018473898991942406, 0.010856863111257553, -0.01042258832603693, 0.02376791276037693, -0.023919563740491867, 0.02298208326101303, -0.022499555721879005, 0.009940060786902905, -0.014269019477069378, -0.005997124128043652, 0.006503778044134378, 0.003667206969112158, -0.01442067138850689, 0.015440871939063072, 0.006538243964314461, -0.002416082890704274, -0.03408021107316017, 0.032122526317834854, -0.016116410493850708, -0.013648627325892448, 0.016268061473965645, 0.01617155596613884, 0.007947913371026516, -0.004439250566065311, 0.014641255140304565, 0.003712013131007552, 0.02163100615143776, -0.02357490174472332, 0.0035362353082746267, -0.029640959575772285, 0.013524549081921577, 0.07896903157234192, -0.015964757651090622, 0.01851525902748108, 0.01104298047721386, 0.007637716829776764, 0.023671407252550125, -0.010767250321805477, -0.024691607803106308, -0.018363608047366142, -0.011470361612737179, -0.02831745520234108, -0.013972610235214233, 0.01275939866900444, 0.035955172032117844, -0.0003345378499943763, 0.025546370074152946, -0.021341489627957344, 0.012649106793105602, 0.01818438433110714, 0.008878501132130623, -0.0015285772969946265, -0.06430020183324814, 0.008009952493011951, -0.011759878136217594, -0.029172217473387718, 0.016212916001677513, -0.013827851973474026, 0.019824976101517677, 0.01837739534676075, -0.043289586901664734, -0.0013484912924468517, -0.027834927663207054, 0.034466229379177094, 0.030964462086558342, 0.05663491040468216, -0.023395678028464317, -0.010077926330268383, 0.0059557645581662655, 0.01493077166378498, -0.021065760403871536, 0.020693525671958923, -0.031846798956394196, 0.03283942490816116, 0.028758622705936432, -0.005204400978982449, 0.008740636520087719, -0.0034793659579008818, -0.009374815039336681, 0.0593370646238327, 0.0005208709044381976, 0.018597979098558426, 0.05098244920372963, -0.00745159899815917, 0.02143799513578415, 0.01988012157380581, -0.004129054490476847, 0.0018594531575217843, 0.04486124590039253, 0.026842301711440086, -0.01832224801182747, -0.013042021542787552, 0.003205359447747469, -0.004590902011841536, 0.004011869430541992, -0.012028714641928673, -0.02936522848904133, 0.0008883671252988279, -0.001980084925889969, 0.028675904497504234, 0.031267765909433365, -0.03281185030937195, 0.03372175991535187, 0.01035365555435419, -0.008127137087285519, 0.0068346536718308926, -0.00843733362853527, 0.024250440299510956, -0.007610143627971411, -0.03333573788404465, 0.0002776685869321227, 0.044116776436567307, -0.01657136343419552, -0.024126362055540085, 0.0011718518799170852, -0.01528922002762556, 0.03998082876205444, 0.010146858170628548, 0.022251399233937263, -0.004587455186992884, -0.03306001052260399, -0.01688845269382, -0.011939102783799171, -0.013552121818065643, -0.05103759467601776, -0.0030554314143955708, 0.012028714641928673, 0.03314272686839104, 0.015178928151726723, -0.0002248921518912539, 0.004094588104635477, -0.028400175273418427, 0.007065577432513237, -0.0038326450157910585, 0.014269019477069378, -0.04395133629441261, 0.0009099085000343621, 0.015744173899292946, -0.02980639599263668, -0.014848052524030209, 0.0023816165048629045, 0.0112015251070261, -0.02565666288137436, -0.002946862718090415, -0.003594827838242054, -0.030936889350414276, -0.032508548349142075, -0.016847094520926476, -0.032508548349142075, 0.00782383419573307, 0.018804775550961494, 0.011373856104910374, 0.018225742504000664, -0.0343007929623127, 0.029199790209531784, 0.03394234552979469, 0.026318414136767387, 0.018225742504000664, -0.05994366854429245, 0.015440871939063072, 0.011242884211242199, -0.009905594401061535, -0.018349820747971535, -0.05236109718680382, -0.013531442731618881, 0.037251103669404984, 0.006348679773509502, -0.0006940637249499559, 0.042765699326992035, 5.923883509240113e-05, -0.006486544851213694, -0.04138705134391785, -0.019397594034671783, 0.031185045838356018, -0.019852548837661743, -0.012428523041307926, 0.01220793928951025, -0.010980941355228424, 0.05489781126379967, -0.025146562606096268, 0.020100705325603485, 0.01954924687743187, 0.027765996754169464, 0.008754422888159752, 0.02611161582171917, -0.007065577432513237, -0.03890548273921013, 0.013662413693964481, -0.03292214497923851, -0.030688732862472534, -0.040808018296957016, -0.0181154515594244, 0.003894684137776494, 0.0032398258335888386, 1.929301106429193e-05, 0.004518522880971432, 0.014034649357199669, -0.0011623736936599016, 0.029503094032406807, 0.0009805642766878009, -0.016405925154685974, 0.03259126842021942, -0.00886471476405859, 0.014765333384275436, 0.008733742870390415, -0.06727807968854904, 0.0004937287885695696, 0.007754901889711618, 0.013876104727387428, -0.01376581285148859, 0.02369897998869419, 0.036975372582674026, -0.009629865176975727, -0.07516396045684814, 0.007596357259899378, -0.03995325416326523, 0.034962546080350876, -0.018915068358182907, 0.011677158996462822, -0.004680514335632324, 0.025753168389201164, -0.013510762713849545, -0.033859625458717346, -0.004756339825689793, -0.010112391784787178, 0.00925762951374054, -0.016667868942022324, -0.019245943054556847, 0.01746748574078083, -0.009423067793250084, -0.0010262320283800364, -0.003763712476938963, 0.014055329374969006, 0.011815023608505726, -0.00825121533125639, -0.01954924687743187, 0.013331538066267967, 0.009002579376101494, -0.011828810907900333, -0.0027762548997998238, -0.011925316415727139, -0.019893908873200417, -0.020555660128593445, 0.018018946051597595, 0.0005910958861932158, -0.024760540574789047, -0.014985917136073112, -0.029392801225185394, -0.05999881401658058, -0.03181922435760498, 0.006231494713574648, -0.017481273040175438, -0.03612060844898224, 0.001985254930332303, 0.007430919446051121, -0.008451119996607304, 0.017095251008868217, 0.01786729507148266, -0.04014626517891884, -0.016998745501041412, 0.048142433166503906, 0.015675241127610207, 0.060109108686447144, 0.010608705691993237, 0.018349820747971535, 0.023326745256781578, 0.0161026231944561, -0.017743214964866638, 0.0034948757383972406, -0.016350779682397842, -0.045357558876276016, -0.056910641491413116, -0.02649763785302639, 0.014448244124650955, -0.00903015211224556, -0.030550867319107056, 0.006962178740650415, 0.014096688479185104, -0.007203442510217428, 0.031157473102211952, -0.023202667012810707, -0.038023147732019424, 0.017246901988983154, -0.008402867242693901, 0.01093958131968975, -0.011801237240433693, -0.0036741001531481743, 0.017122823745012283, -0.01552359014749527, 0.042434822767972946, 0.012869690544903278, -0.009168017655611038, -0.02955823950469494, -0.010560452938079834, 0.01428280584514141, -0.0070138778537511826, -0.010450161062180996, -0.033087581396102905, 0.03234311193227768, 0.029916688799858093, -0.038740042597055435, -0.015316792763769627, 0.00948510691523552, 0.017329620197415352, 0.007368880324065685, 0.021065760403871536, -0.01000209990888834, 0.011994248256087303, 0.0174123402684927, -0.003076111199334264, -0.009850448928773403, -0.021217411383986473, -0.013648627325892448, 0.03940179571509361, 0.09038424491882324, 0.018556619063019753, 0.018983999267220497, -0.011883956380188465, -0.006962178740650415, 0.011939102783799171, -0.03294971585273743, -0.010215790942311287, -0.011456575244665146, 0.010787930339574814, -0.023326745256781578, -0.010519093833863735, 0.0307163055986166, -0.02942037582397461, 0.02864833176136017, 0.005452557932585478, 0.03245340287685394, -0.012669786810874939, 0.0026022004894912243, -0.012021820992231369, -0.015109995380043983, 0.02287179045379162, 0.018611764535307884, -0.01778457500040531, -0.007989272475242615, 0.003953276667743921, -0.014269019477069378, 0.005738627631217241, 0.017688069492578506, 0.0039222571067512035, -0.004011869430541992, 0.026318414136767387, -0.057241518050432205, 0.03636876866221428, 0.003041644813492894, 0.02999940700829029, -0.008147817105054855, 0.0016095730243250728, -0.0509273037314415, 0.031984660774469376, 0.007692862767726183, -0.006159115582704544, 0.04703951254487038, 0.012835224159061909, -0.013683093711733818, 0.0009564378997310996, -0.011690945364534855, 0.023547329008579254, 0.017632924020290375, -0.010967154987156391, 0.021837804466485977, -0.010856863111257553, -0.010870649479329586, -0.022265184670686722, 0.021644793450832367, -0.03909849375486374, -0.00730684120208025, 0.035238273441791534, -0.050237979739904404, 0.0126008540391922, -0.022954510524868965, -0.03862975165247917, 0.006545137148350477, -0.016350779682397842, 0.03187436982989311, -0.00600746413692832, 0.02142420969903469, -0.003877450944855809, -0.01825331524014473, 0.027628131210803986, -0.027131816372275352, -0.010057246312499046, -0.012476775795221329, -0.02376791276037693, -0.03424564749002457, -0.054125770926475525, -0.03253612294793129, -0.01007103268057108, -0.009533359669148922, 0.012704253196716309, 0.0007280991412699223, 0.034659240394830704, 0.056138597428798676, -0.008781995624303818, 0.026925019919872284, -0.0027211089618504047, -0.04615717753767967, 0.05241624265909195, -0.020927894860506058, 0.04072529822587967, 0.03771984204649925, -0.029144644737243652, 0.02266499400138855, -0.0054284315556287766, -0.022223826497793198, -0.006017804145812988, -0.021672366186976433, -0.0018146471120417118, 0.029723677784204483, -0.01617155596613884, 0.07279267907142639, 0.018156809732317924, -0.01139453612267971, -0.013827851973474026, 0.05288498476147652, -0.02363004721701145, -0.0027693617157638073, -0.004018762614578009, -0.0070586842484772205, -0.010208897292613983, -0.007775581907480955, 0.006982858292758465, -0.01282833144068718, 0.015826893970370293, -0.04825272411108017, 0.02604268491268158, 0.025298213586211205, -0.023464610800147057, -0.015895826742053032, -0.006827760487794876, 0.004925224464386702, -0.05131332576274872, 0.045109402388334274, 0.015882039442658424, -0.022430622950196266, 0.013627948239445686, 0.018294675275683403, 0.012028714641928673, 0.007134509738534689, 0.006048823706805706, -0.0035465750843286514, 0.03052329458296299, 0.038409169763326645, -0.013627948239445686, -0.026538997888565063, -0.009926274418830872, -0.05117546021938324, 0.014269019477069378, 0.010098605416715145, 0.0035672548692673445, 0.021520715206861496, -0.03890548273921013, 0.019204584881663322, -0.009312775917351246, -0.02947552129626274, -0.029117072001099586, 0.01967332512140274, -0.014875625260174274, 0.015151355415582657, -0.0034965991508215666, -0.003093344159424305, 0.012290658429265022, 0.0026607930194586515, 0.025298213586211205, -0.04067015275359154, 0.05696578696370125, -0.020569447427988052, 0.04604688659310341, 0.0264287069439888, 0.01337979082018137, 0.007361987140029669, 0.003701673122122884, 0.0009883191669359803, 0.03920878469944, 0.03871247172355652, 0.03176407888531685, -0.029172217473387718, 0.017757002264261246, 0.007727329153567553, 0.005752413999289274, -0.017881080508232117, 0.014393097721040249, 0.020183425396680832, 0.006241834256798029, -0.014020862989127636, 0.016971172764897346, 0.011615119874477386, 0.00023329330724664032, 0.030082127079367638, -0.015027277171611786, 0.005111342296004295, -0.0020386776886880398, 0.019852548837661743, -0.04885932803153992, -0.024512384086847305, 0.023933351039886475, -0.0024695054162293673, 0.05713122338056564, -0.02117605321109295, 0.03962237760424614, -0.010932688601315022, -0.010167538188397884, -0.004487503319978714, -0.024002283811569214, -0.004956244025379419, -0.033804479986429214, 0.0008383910753764212, -0.0058316863141953945, -0.023685194551944733, 0.03612060844898224, -0.017053890973329544, -0.010794823989272118, -0.01298687607049942, -0.006307320203632116, 0.004222113173455, 0.009953847154974937, 0.011987355537712574, -0.019563032314181328, -0.011346283368766308, 0.04695679247379303, 0.0013062701327726245, -0.01337979082018137, -0.024043641984462738, -0.015234074555337429, -0.012876584194600582, -0.01509620901197195, 0.006827760487794876, -0.01026404369622469, -0.020803816616535187, 0.012731825932860374, 0.003320821328088641, -0.006286640651524067, 0.01555116381496191, 0.004907991271466017, -0.0029347995296120644, 0.03625847399234772, -0.0076859695836901665, 0.03038542903959751, -0.0023626601323485374, -0.037499260157346725, 0.0024574422277510166, -0.009298989549279213, -0.030357856303453445, 0.04993467405438423, -0.01016064453870058, 0.016474857926368713, 0.025863459333777428, -0.03410778194665909, 0.031074754893779755, 0.01528922002762556, -0.011911529116332531, -0.028786195442080498, 0.0264287069439888, 0.018983999267220497, -0.006658875849097967, -0.004556435626000166, -0.030799023807048798, -0.00867170374840498, 0.011808130890130997, 0.04709465801715851, 0.006383146159350872, -0.0413043312728405, -0.00987112894654274, 0.01007103268057108, 0.03499011695384979, -0.023023443296551704, 0.0030261350329965353, 0.016971172764897346, -0.0015837233513593674, -0.01909429207444191, 0.030440574511885643, 0.03176407888531685, -0.010408801957964897, 0.032232820987701416, 0.0166265107691288, -0.008299468085169792, -0.03876761719584465, 0.016998745501041412, 0.0017302047926932573, -0.05611102283000946, -0.016585150733590126, -0.016392139717936516, -0.013166100718080997, -0.004918331280350685, 0.0341353565454483, 0.007334413938224316, -0.044392507523298264, 0.022320332005620003, 3.7697441257478204e-06, -0.011573760770261288, -0.0025349913630634546, -0.017495058476924896, -0.016902239993214607, 0.0030313050374388695, -0.015440871939063072, 0.008947433903813362, 0.00568003486841917, 0.004876971710473299, 0.00021336751524358988, -0.03085416927933693, 0.02994426153600216, 0.022775284945964813, -0.012780078686773777, -0.01182191725820303, 0.03818858414888382, -0.022058388218283653, 0.043675608932971954, 0.0231888797134161, 0.00883024837821722, 0.025284426286816597, 0.0006359019898809493, -0.008582091890275478, -0.012421629391610622, -0.03157106786966324, 0.0196871105581522, 0.0014915261417627335, 0.016833307221531868, 0.005628335755318403, 0.015537377446889877, -0.018294675275683403, 0.009202484041452408, 0.013683093711733818, 0.00987112894654274, 0.00812024436891079, -0.020665952935814857, -0.015054849907755852, 0.021479355171322823, -0.03918121010065079, 0.007175869308412075, 0.04193850979208946, 0.006800187285989523, -0.010291616432368755, 0.017246901988983154, 0.006648535840213299, -0.006024697329849005, 0.022030815482139587, -0.016667868942022324, 0.021768871694803238, -0.0011055043432861567, 0.002965819090604782, -0.007048344239592552, 0.00016996159683912992, -0.0019042593194171786, 0.022499555721879005, 0.03774741664528847, 0.03493497148156166, 0.022265184670686722, -0.009519573301076889, 0.004442697390913963, 0.011291136965155602, -0.001296791946515441, 0.0042600263841450214, -0.02558773010969162, -0.009505786933004856, 0.0397326722741127, -0.035624295473098755, -0.024443451315164566, 0.008306361734867096, 0.00843733362853527, 0.012731825932860374, 0.04265540838241577, 0.004525416065007448, 0.01694360002875328, -0.009884915314614773, 0.005101002287119627, -0.022747712209820747, -0.003176063299179077, 0.04905233904719353, -0.01022268459200859, -0.015316792763769627, 0.003045091638341546, -0.01974225789308548, 0.0031588301062583923, 0.010656958445906639, 0.00957471877336502, -0.005890279076993465, 0.008685490116477013, -0.021065760403871536, 0.024195294827222824, 0.006248727906495333, -0.024181507527828217, -0.031019607558846474, -0.0023213005624711514, -0.01806030422449112, -0.011415216140449047, 0.003956723492592573, 0.0216172207146883, 0.01322124619036913, -0.015109995380043983, 0.013110954314470291, 0.018363608047366142, 0.014627468772232533, -0.03410778194665909, -0.012924836948513985, 0.021217411383986473, 0.0015820000553503633, -0.004577115643769503, 0.01093958131968975, 0.007065577432513237, 0.0032191460486501455, -0.013793385587632656, -0.006269407458603382, -0.01035365555435419, 0.027765996754169464, 0.007334413938224316, -0.010560452938079834, 0.02363004721701145, -0.022251399233937263, -0.03805071860551834, -0.011746091768145561, 0.019507886841893196, -0.002674579620361328, -0.04215909540653229, -0.019438954070210457, -0.0025091415736824274, 0.0026642396114766598, 0.0011425556149333715, -0.00801684521138668, -0.012649106793105602, 0.014007076621055603, -0.01213900651782751, -0.0062246015295386314, 0.008520052768290043, 0.0539051853120327, -0.023133734241127968, -0.013428043574094772, -0.023271599784493446, -0.026594143360853195, -0.017426125705242157, -0.011029194109141827, -0.01528922002762556, 0.017095251008868217, -0.011897742748260498, 0.002460888819769025, -0.0064589716494083405, 0.003691333346068859, -0.01146346889436245, 0.00046787908650003374, -0.025573942810297012, -0.01380027923732996, -0.01629563421010971, -0.017839720472693443, 0.0033621808979660273, -0.02656657062470913, -0.0013657243689522147, 0.027421332895755768, 0.021865377202630043, -0.018790990114212036, -0.021768871694803238, 0.003131257137283683, 0.010787930339574814, 0.02415393479168415, 0.027311041951179504, -0.014406885020434856, -0.005697268061339855, -0.008347720839083195, 0.03181922435760498, -0.01127045787870884, -0.025022484362125397, 0.02252712845802307, -0.04290356487035751, -0.006507224403321743, 0.009443746879696846, -0.007148296572268009, 0.010712104849517345, -0.017370980232954025, -0.0036947799380868673, 0.023340532556176186, -0.013621054589748383, 0.017302047461271286, -0.05657976493239403, -0.02474675327539444, -0.009464426897466183, 0.016805734485387802, -0.018267102539539337, 0.04122161120176315, -0.014875625260174274, -0.012897263281047344, -0.044254641979932785, -0.009733263403177261, 0.017439913004636765, -0.03645148500800133, -0.03752683103084564, 0.004353085067123175, 0.0022334118839353323, -0.004632261581718922, -0.0002496647648513317, 0.018722057342529297, -0.003095067571848631, -0.011497934348881245, 0.04759097099304199, 0.02130013145506382, -0.0034380066208541393, 0.018983999267220497, -0.018391180783510208, -0.012683573178946972, -0.005042409524321556, -0.031846798956394196, 0.00840975996106863, -0.022044600918889046, -0.04105617478489876, -0.0066071767359972, -0.00014572753570973873, 0.013069595210254192, 0.012745612300932407, 0.0015432254876941442, 0.004677067510783672, -0.012276871129870415, -0.05456693843007088, 0.022913150489330292, -0.03206738084554672, 0.019507886841893196, 0.0064451852813363075, 0.017095251008868217, -0.01629563421010971, 0.009161124005913734, -0.014792906120419502, -0.0006996644660830498, 0.005645568482577801, 0.03824372962117195, -0.017881080508232117, -0.01253192126750946, -0.006448631640523672, -0.033087581396102905, -0.008630344644188881, 0.04135947674512863, 0.02287179045379162, -0.021079547703266144, -0.01000209990888834, 0.030440574511885643, -0.0011658202856779099, 0.0020645272452384233, 0.011918422766029835, 0.007968592457473278, -0.008299468085169792, -0.006831206846982241, 0.0012494008988142014, 0.04193850979208946, 0.029199790209531784, 0.04011869430541992, 0.02662171609699726, -0.009636757895350456, -0.014985917136073112, 0.017646709457039833, 0.006431398913264275, -0.009774623438715935, -0.013297071680426598, 0.012573281303048134, 0.0218791626393795, 0.006469311658293009, -0.03774741664528847, -0.018942641094326973, -0.026980165392160416, -0.013524549081921577, -0.00237127672880888, -0.004239346366375685, -0.0026090936735272408, -0.01851525902748108, 0.04248996824026108, 0.01000209990888834, 0.019066719338297844, 0.019728470593690872, 0.008775102905929089, 0.02163100615143776, 0.010905115865170956, -0.014792906120419502, 0.0378025621175766, -0.006693342234939337, 0.022968295961618423, -0.0043806578032672405, -0.02487083151936531, 0.011139485985040665, 0.009788409806787968, 0.002228241879492998, -0.0036947799380868673, 0.018101664260029793, 0.001983531517907977, 0.007623930461704731, -0.011525508016347885, 0.04574358090758324, -0.0018284335965290666, 0.003856771159917116, 0.015413298271596432, -0.022292757406830788, -0.006045376881957054, 0.02655278518795967, 0.01668165624141693, 0.03661692515015602, -0.02864833176136017, -0.010705211199820042, -0.021148478612303734, 0.03209495544433594, -0.0003541405312716961, 0.012221725657582283, 0.006355572957545519, -0.021961882710456848, -0.011684052646160126, 0.003722352907061577, -0.00348281254991889, -0.0343007929623127, 0.033611468970775604, 0.010098605416715145, -0.011029194109141827, 0.04378589987754822, 0.01688845269382, -0.012132113799452782, -0.03372175991535187, -0.017260689288377762, -0.03940179571509361, -0.03592760115861893, -0.006703681778162718, -0.012318231165409088, 0.018749630078673363, -0.04648805409669876, -0.01104298047721386, -0.009230056777596474, 0.0036258476320654154, 0.002521204762160778, 0.013469402678310871, 0.013083381578326225, -0.029640959575772285, -0.037251103669404984, 0.00493556447327137, -0.021217411383986473, -0.01078103668987751, 0.04317929595708847, -0.04124918580055237, -0.006138435564935207, 0.038877908140420914, 0.023216452449560165, -0.005728287622332573, -0.0008694106945767999, -0.01986633613705635, -0.00745159899815917, 0.03369418904185295, -0.03157106786966324, -0.0034810893703252077, -0.0042600263841450214, 0.02423665300011635, 0.004646047949790955, -0.020031774416565895, -0.02936522848904133, -0.020431581884622574, -0.006565817166119814, 0.006769167724996805, -0.0006811388884671032, -0.016309421509504318, -0.012538814917206764, -0.012917943298816681, 0.049190204590559006, 0.011794344522058964, -0.026208121329545975, 0.0003905454941559583, 0.03545885905623436, -0.026208121329545975, 0.014751547016203403, 0.014269019477069378, 0.02558773010969162, 0.026401132345199585, 0.008947433903813362, 0.00392915029078722, -0.05357430875301361, 0.009112871252000332, 0.01299376878887415, -0.011118805967271328, 0.011711625382304192, 0.007610143627971411, -0.008526945486664772, 0.0022540914360433817, -0.0018112004036083817, 0.0504034161567688, 0.012304444797337055, -0.019563032314181328, 0.03507283702492714, 0.05735180899500847, 0.010636279359459877, -0.0029606493189930916, 0.020238570868968964, -0.005369838792830706, 0.02422286756336689, 0.014103582128882408, -0.030964462086558342, 0.01974225789308548, -0.02135527692735195, 0.02884134277701378, -0.01078103668987751, -0.008699276484549046, 0.01766049675643444, -0.004484056495130062, -0.0051630414091050625, -0.03013727255165577, -0.018294675275683403, -0.02709045819938183, -0.006338339764624834, -0.023740340024232864, -0.004318618681281805], "index": 64}, {"title": "Governor General's Award for French-language poetry", "text": "This is a list of recipients of the Governor General's Award for French-language poetry. The award was created in 1981 when the Governor General's Award for French language poetry or drama was divided.", "vector": [0.011040100827813148, -0.0014217814896255732, -0.018122799694538116, 0.014702661894261837, -0.006384912878274918, -0.0030761584639549255, -0.0032432342413812876, 0.006794412154704332, 0.006807515863329172, 0.026050705462694168, -0.022460216656327248, -0.016642050817608833, -0.0016920510679483414, -0.014178503304719925, 0.015410277061164379, -0.013018800877034664, 0.013536408543586731, -0.006800964009016752, -0.03168541565537453, 0.004730535671114922, -0.012494642287492752, -0.001723172958008945, 0.03121367283165455, -0.00821619387716055, 0.04714810848236084, 0.006715788040310144, -0.02601139433681965, -0.01805727928876877, 0.019249742850661278, 0.023495430126786232, 0.024124421179294586, -0.0025388954672962427, -0.02040289156138897, -0.015619940124452114, -0.01520061306655407, -0.04439627379179001, 0.004478284157812595, 0.07804728299379349, -0.011590467765927315, -0.08517584949731827, 0.002679763361811638, -0.021700184792280197, 0.034384835511446, -0.015711668878793716, 0.013058112934231758, -0.016458595171570778, -0.0034561739303171635, -0.0012506108032539487, 0.010325933806598186, 0.023390598595142365, 0.030086731538176537, 0.011498739942908287, -0.022853335365653038, 0.020180124789476395, 0.02395406924188137, 0.00837344117462635, 0.047331564128398895, 0.05317593738436699, 0.034620705991983414, -0.03684838116168976, -0.07783762365579605, -0.016694465652108192, -0.013156392611563206, -0.02396717295050621, 0.009467623196542263, 0.004904163535684347, -0.017467601224780083, 0.05220624431967735, -0.011446324177086353, 0.024268565699458122, 0.0024357016663998365, -0.03181645646691322, -0.03037501871585846, -0.04743639752268791, -0.010679741390049458, 0.017716577276587486, 0.016668258234858513, -0.036507681012153625, 0.002131034154444933, -0.003226854372769594, -0.01141356397420168, 0.03593110293149948, -0.027282480150461197, -0.0031793524976819754, -0.00777065847069025, -0.04421281814575195, 0.01800486445426941, -0.03228819742798805, 0.006715788040310144, 0.008681384846568108, -0.005687125958502293, 0.020953258499503136, 0.04837988317012787, 0.019315261393785477, 0.029693610966205597, -0.018502814695239067, 0.0576050840318203, -0.02551344223320484, 0.001306302729062736, -0.04405556991696358, -0.04670257493853569, -0.06662061810493469, -0.02162156254053116, 0.0044356961734592915, 0.027465935796499252, 0.01841108687222004, -0.022551944479346275, -0.07862386107444763, 0.029850859194993973, 0.028671501204371452, -0.018948350101709366, 0.03365101292729378, -0.018515920266509056, -0.008832080289721489, 0.03042743355035782, 0.028592877089977264, -0.007927905768156052, 0.014270231127738953, -0.023652678355574608, -0.04667636379599571, -0.025303779169917107, -0.036533888429403305, -0.024281669408082962, 0.012435673736035824, -0.014348854310810566, -0.0005507765454240143, 0.017323456704616547, 0.031790249049663544, -0.002063876250758767, 0.009008984081447124, -0.03794911876320839, 0.003931193146854639, -0.03716287761926651, 0.02202778495848179, -0.021778808906674385, -0.01340536866337061, -0.02242090366780758, -0.03524969890713692, -0.028619086369872093, -0.01959044486284256, 0.0066928560845553875, -0.0030892626382410526, 0.07175737619400024, -0.07317260652780533, -0.022067097947001457, 0.0024127697106450796, 0.0040556807070970535, 0.015121988952159882, 0.02356095053255558, 0.018935246393084526, 0.011918067000806332, -0.008419305086135864, 0.025461027398705482, -0.009900054894387722, 0.01961665414273739, 0.0494806170463562, 0.058076824992895126, 0.01919732615351677, 0.028645293787121773, 0.025487234815955162, -0.061326611787080765, -0.020560139790177345, 0.007875490002334118, 0.03042743355035782, -0.03504003584384918, -0.030139146372675896, 0.014466790482401848, 0.0033677220344543457, -0.012527401559054852, 0.009126920253038406, 0.026548657566308975, 0.011007340624928474, 0.05207520350813866, -0.05755266547203064, -0.034148965030908585, -0.009657630696892738, -0.02073049172759056, 0.032524071633815765, -0.01679929904639721, 0.07002764940261841, 0.018227631226181984, -0.0016191601753234863, 0.023809926584362984, -0.04746260493993759, -0.04743639752268791, 0.003813257208094001, 0.04434385895729065, 0.026863152161240578, -0.02403269335627556, 0.014846805483102798, -0.010456973686814308, -0.049690280109643936, 0.020953258499503136, -0.054302878677845, 0.056504350155591965, 0.017651056870818138, 0.0041113728657364845, -0.019026974216103554, -0.024137524887919426, -0.024884451180696487, 0.06253217905759811, -0.02675832062959671, -0.04140856862068176, -0.02833079732954502, 0.04594254121184349, 0.025251364335417747, 0.008248953148722649, 0.01497784536331892, -0.050922054797410965, 0.008111361414194107, -0.005922997370362282, -0.036507681012153625, -0.016576530411839485, -0.007305467035621405, 0.022984376177191734, 0.007914802059531212, -0.019367678090929985, 0.02080911584198475, -0.004173616413027048, -0.03147575259208679, 0.026234161108732224, 0.021333273500204086, -0.01461093407124281, -0.00430465629324317, 0.016864817589521408, -0.08480893820524216, -0.03587868809700012, 0.0606452040374279, -0.01592133194208145, -0.03509245067834854, -0.04022920876741409, -0.01995735615491867, 0.0025601894594728947, 7.713942613918334e-05, -0.013241568580269814, -0.025290675461292267, -0.04620462283492088, -0.017402080819010735, 0.05419804900884628, -0.009290719404816628, -0.05828648805618286, 0.01961665414273739, -0.017441393807530403, 0.025644483044743538, 0.0051072752103209496, 0.00036424960126169026, -0.021031882613897324, 0.013811592012643814, -0.012658441439270973, 0.02354784682393074, 0.006650268100202084, -0.015711668878793716, -0.0219491608440876, -0.02083532325923443, -0.04400315508246422, -0.010699396952986717, 0.053280770778656006, 0.018437296152114868, 0.041382357478141785, 0.019302157685160637, 0.014768182300031185, 0.006859932094812393, -0.020284956321120262, 0.02911703661084175, -0.06289909034967422, -0.009388999082148075, 0.03435862809419632, -0.021673977375030518, -0.003551177680492401, -0.03721529617905617, -0.07443059235811234, -0.008904152549803257, -0.0034758299589157104, -0.020193228498101234, -0.0012735427590087056, 0.06494330614805222, -0.004533975850790739, -0.012304633855819702, 0.06531021744012833, 0.0033366000279784203, 0.0023472497705370188, -0.06321358680725098, -0.007076147478073835, -0.017008962109684944, 0.02192295342683792, -0.004651912022382021, 0.01869937591254711, 0.04439627379179001, -0.034201379865407944, -0.05440771207213402, 0.03962642699480057, 0.04830125719308853, 0.020127708092331886, -0.059754133224487305, -0.01801796816289425, 0.06326600164175034, -0.00399343715980649, 0.006610956508666277, -0.03422758728265762, 0.029483947902917862, 0.02395406924188137, 0.048170220106840134, -0.02561827562749386, -0.04025541618466377, -0.001466007437556982, -0.04245688393712044, -0.007764106150716543, 0.03042743355035782, 0.030112938955426216, 0.029012205079197884, -0.027649391442537308, 0.002614243421703577, 0.02956257201731205, -0.02922186814248562, -0.015436484478414059, -0.006918899714946747, 0.004281724337488413, 0.005238314624875784, 0.034987617284059525, -0.0060376571491360664, 0.06468123197555542, -0.009323479607701302, -0.0026453654281795025, -0.006722340360283852, 0.02875012531876564, 0.0038230852223932743, -0.01475507766008377, -0.021857433021068573, -0.028881164267659187, -0.009736254811286926, -0.01956423744559288, -0.038499485701322556, 0.005798509810119867, -0.04646670073270798, 0.05270419642329216, 0.005221934989094734, -0.007547890767455101, 0.002404579659923911, 0.025277571752667427, -0.031737830489873886, 0.0017886928981170058, 0.009388999082148075, 0.04992615059018135, 0.03611455857753754, -0.004678119905292988, -0.03766082972288132, -0.04206376522779465, -0.025867249816656113, 0.010135926306247711, 0.0022276761010289192, 0.00044676370453089476, 0.04903507977724075, 0.019498717039823532, 0.028068717569112778, -0.04560184106230736, -0.011223556473851204, 0.04562804847955704, -0.006807515863329172, -0.0015896762488409877, -0.01997045986354351, 0.0018149007810279727, 0.03988850489258766, -0.03351997211575508, 0.06436673551797867, 0.014820598065853119, -0.058129239827394485, -0.025788625702261925, -0.011492188088595867, -0.007593754678964615, -0.03582627326250076, -0.00778376217931509, 0.07338227331638336, -0.00838654488325119, -0.026967983692884445, 0.000793200102634728, -0.0359048955142498, -0.032183367758989334, 0.011046652682125568, -0.02358715794980526, -0.02597208134829998, -0.001294017769396305, 0.021857433021068573, -0.00748892268165946, 0.04392452910542488, 0.0021998300217092037, -0.0038787771482020617, 0.019459405913949013, -0.020664971321821213, 0.04908749833703041, -0.06358049809932709, -0.03160679340362549, -0.002106464235112071, 0.005346422549337149, -0.04505147412419319, -0.02277471125125885, 6.96660645189695e-05, 0.01714000105857849, -0.00777065847069025, 0.028199758380651474, 0.005598674062639475, 0.005136759020388126, 0.00429810443893075, -0.05393596738576889, 0.03116125613451004, -0.013510200195014477, 0.003865673206746578, 0.030453642830252647, -0.01340536866337061, -0.008072049356997013, 0.015606836415827274, -0.012226010672748089, 0.04203755781054497, -0.0024357016663998365, 0.04633566364645958, 0.04077957570552826, -0.00489105936139822, 0.03202611953020096, 0.03522349148988724, -0.015672355890274048, 0.006646992173045874, 0.01679929904639721, 0.04646670073270798, -0.030925385653972626, 0.04075336828827858, 0.04167064651846886, 0.011708403006196022, 0.028854956850409508, 0.030191563069820404, 0.031082633882761, -0.010784572921693325, 0.012710857205092907, 0.007397194858640432, 0.028540462255477905, 0.07705138623714447, -0.009487279690802097, 0.007082699332386255, -0.052966274321079254, 0.00689269183203578, 0.03247165307402611, 0.0028222689870744944, -0.02002287656068802, -0.010515941306948662, -0.0624273456633091, -0.01517440564930439, -0.00836033746600151, -0.03624559938907623, -0.02872391790151596, -0.016458595171570778, 0.02204088866710663, -0.018070384860038757, 0.04308587685227394, 0.0022014682181179523, 0.016537219285964966, -0.044920433312654495, 0.001063060131855309, 0.043374162167310715, -0.026863152161240578, -0.007148219272494316, -0.039731256663799286, 0.02838321402668953, -0.028121134266257286, 0.021411897614598274, -0.043714866042137146, 0.02192295342683792, 0.03593110293149948, 0.051341380923986435, -0.05550844594836235, -0.0044356961734592915, -0.011066308245062828, -0.013392264023423195, -0.009297271259129047, 0.0006728073349222541, -0.02838321402668953, 0.00017915593343786895, 0.04153960570693016, 0.01238325797021389, 0.013654343783855438, 0.04405556991696358, -0.009028639644384384, 0.06641095131635666, 0.03475174680352211, -0.03344134986400604, 0.021044986322522163, 0.010686293244361877, -0.0017198969144374132, -0.07516441494226456, -0.0050908951088786125, -0.04321691393852234, -0.010738709010183811, 0.05388355255126953, 0.005005719140172005, 0.027361104264855385, 0.00344306998886168, -0.04222101345658302, -0.002615881385281682, 0.02555275522172451, -0.012992593459784985, -0.0019492165884003043, -0.0031416784040629864, -0.02202778495848179, 0.021293962374329567, -0.004127752501517534, 0.018175216391682625, 0.0018558506853878498, 0.022302968427538872, -0.006021277513355017, -0.018961453810334206, 0.021503625437617302, -0.007659274619072676, 0.01239636167883873, -0.011230108328163624, 0.028645293787121773, -0.044134195894002914, 0.01140046026557684, 0.016209619119763374, 0.04431765154004097, 0.015488900244235992, -0.00047092416207306087, -0.02641761675477028, -0.0015831241616979241, 0.029274284839630127, 0.009913158603012562, -0.0176379531621933, 0.013005697168409824, -0.015056469477713108, 0.028592877089977264, -0.026168642565608025, 0.0375559963285923, -0.007292363326996565, -0.006971315480768681, -0.003885329235345125, -0.026915568858385086, 0.000904993386939168, 0.011066308245062828, 0.007862386293709278, 0.013241568580269814, -0.012815689668059349, -0.046912238001823425, 0.00896312016993761, 0.018568335101008415, 0.011374251917004585, -0.025880353525280952, -0.032550279051065445, -0.02111050672829151, 0.0006597033352591097, 0.003941020928323269, 0.020284956321120262, -0.0005810794536955655, 0.0033054782543331385, -0.009945918805897236, -0.02751835063099861, -0.03239303082227707, 0.015030261129140854, 0.03446345776319504, -0.0024389775935560465, -0.03401792421936989, -0.061379026621580124, 0.025434819981455803, 0.03168541565537453, -0.046519119292497635, -0.021490521728992462, 0.01672067493200302, 0.01961665414273739, -0.005002443213015795, -5.2467094064923e-05, 0.022997479885816574, 0.022853335365653038, -0.015777187421917915, 0.010529045015573502, -0.03876156359910965, 0.0067092361859977245, 0.045261137187480927, 0.021857433021068573, -0.042509302496910095, -0.0020524102728813887, -0.02070428431034088, 0.0008746904786676168, 0.03556419163942337, -0.05676642805337906, -0.02316783182322979, -0.007135115563869476, -0.028068717569112778, 0.011623227037489414, 0.01871247962117195, 0.014440582133829594, 0.009513487108051777, -0.013385712169110775, 0.0367959663271904, 0.027754222974181175, -0.005520050413906574, -0.03910226747393608, -0.017349665984511375, 0.015659252181649208, -0.050109606236219406, -0.0023554398212581873, -0.03158058598637581, 0.008504481054842472, -0.009952470660209656, -0.019341470673680305, 0.024989284574985504, -0.010312830097973347, 0.04235205426812172, -0.01712689734995365, -0.028592877089977264, 0.031318504363298416, 0.02509411610662937, 0.0239802785217762, -0.00027948326896876097, 0.007606858387589455, -0.03129229694604874, -0.014270231127738953, 0.021883642300963402, 0.0188435185700655, 0.00857655331492424, 0.000104934188129846, -0.0021572422701865435, -0.011125276796519756, 0.02515963651239872, 0.04471077024936676, -0.02872391790151596, 0.004461904056370258, -0.03118746541440487, -0.011374251917004585, -0.03244544565677643, 0.06515297293663025, 0.03404413163661957, -0.006345600821077824, -0.04075336828827858, -0.012049106881022453, 0.00037714882637374103, -0.037005629390478134, 0.005932825617492199, -0.03745116665959358, -0.014781286008656025, 0.004239136353135109, 0.005988517310470343, 0.018987663090229034, 0.0029483947437256575, -0.01563304476439953, 0.03483036905527115, -0.004016369115561247, -0.0004635531804524362, -0.01910559833049774, 0.014990950003266335, -0.02403269335627556, -0.00517607107758522, -0.0001544835977256298, 0.025683794170618057, 0.00719408318400383, 0.04140856862068176, -0.02709902450442314, -0.027334894984960556, 0.004314484540373087, 0.027072817087173462, 0.015135093592107296, -0.017795201390981674, 0.021687081083655357, -0.051367588341236115, 0.04064853489398956, -0.003721529385074973, -0.007646170444786549, -0.017022065818309784, -0.019000766798853874, -0.02720385603606701, -0.014768182300031185, 0.004173616413027048, -0.018083488568663597, -0.015108885243535042, -0.003341514151543379, 0.00040274253115057945, 0.002701057121157646, 0.03226199001073837, 0.006977867800742388, -0.03155437484383583, -0.021713290363550186, 0.007980321533977985, -0.04544459283351898, -0.029431531205773354, -0.039311930537223816, -0.0030728825367987156, -0.015108885243535042, -0.04308587685227394, -0.015017157420516014, 0.01235705055296421, 0.014060567133128643, 0.010063854046165943, 0.0047895037569105625, -0.023390598595142365, 0.010666636750102043, -0.019393885508179665, -0.03189507871866226, -0.009677287191152573, -0.019315261393785477, 0.04607358202338219, -0.011708403006196022, 0.009847638197243214, -0.01757243275642395, 0.04188030958175659, -0.04560184106230736, -0.008465168997645378, -0.020101500675082207, -0.005644537974148989, -0.013045009225606918, 0.04583771154284477, -0.025054803118109703, -0.015292340889573097, -0.009369343519210815, 0.030610889196395874, -0.018463503569364548, -0.015043365769088268, 0.0033103921450674534, 0.027675598859786987, 0.0028468389064073563, 0.03543315455317497, 0.00017270632088184357, 0.00837344117462635, 0.024871347472071648, -0.03121367283165455, -0.021778808906674385, -0.005441426299512386, -0.012343945913016796, 0.03915468230843544, -0.045759085565805435, -0.018895935267210007, -0.004278448410332203, 0.016052370890975, -0.009814878925681114, -0.011655987240374088, -0.0026699353475123644, 0.00777721032500267, 0.014191607013344765, 0.0036494575906544924, -0.00660440418869257, 0.015790292993187904, 0.02111050672829151, -0.010470077395439148, -0.023010583594441414, -0.009690390899777412, 0.036193184554576874, -0.03304823115468025, 0.0645763948559761, -0.033782053738832474, -0.02555275522172451, 0.0071089076809585094, 0.010804228484630585, -0.004779675509780645, 0.044501107186079025, 0.0022882819175720215, -0.008635520935058594, 0.007849282585084438, -0.026994192972779274, 0.009487279690802097, 0.04125132039189339, -0.011217004619538784, 0.03247165307402611, -0.013274328783154488, 0.017441393807530403, -0.04007196053862572, 0.00548073835670948, 0.004226032644510269, -0.015803396701812744, 0.01297293696552515, 0.028566669672727585, 0.0013054837472736835, 0.02679763361811638, 0.016655154526233673, 0.031056424602866173, -0.011439771391451359, -0.01915801502764225, 0.058915480971336365, -0.004612599965184927, -0.008792768232524395, 0.004170340485870838, 0.020651867613196373, 0.027701806277036667, -0.030977800488471985, -0.014309543184936047, -0.01016213372349739, 0.0014750163536518812, 0.02590656280517578, -0.06284667551517487, 0.040176793932914734, -0.022696087136864662, 0.007580650504678488, 0.013680552132427692, -0.0038263611495494843, 0.01458472665399313, 0.028592877089977264, -0.025264468044042587, -0.028645293787121773, 0.059282392263412476, 0.018175216391682625, -0.004674843978136778, 0.00917933601886034, 0.029326699674129486, 0.015017157420516014, 0.03367722034454346, 0.03357238695025444, 0.012108074501156807, -0.034122757613658905, -0.017651056870818138, 0.003970505204051733, 0.012664993293583393, -0.0006666647968813777, -0.04434385895729065, -0.004517596215009689, -0.04646670073270798, -0.0009393913205713034, 0.004665015731006861, 0.008281713351607323, 0.015082677826285362, -0.026994192972779274, -0.004140856675803661, -0.05802441015839577, -0.005608502309769392, 0.04041266441345215, 0.007593754678964615, -0.051288966089487076, 0.008170329965651035, -0.009087608195841312, -0.036193184554576874, -0.0115773631259799, -0.006781307980418205, -0.01759864017367363, -0.048091594129800797, 0.014663349837064743, -0.030191563069820404, 0.019354574382305145, 0.03519728034734726, 0.024661684408783913, -0.017323456704616547, -0.034384835511446, 0.059754133224487305, -0.007449611090123653, 0.013221913017332554, 0.03787049278616905, 0.07222911715507507, 0.008419305086135864, 0.007737898267805576, -0.005746094044297934, -0.02231607213616371, -0.003249786328524351, -0.02282712794840336, 0.0017280869651585817, -0.017349665984511375, 0.0011302180355414748, -0.03640284761786461, -0.033755842596292496, -0.025683794170618057, -0.015253028832376003, -0.03234061598777771, 0.014702661894261837, 0.00660768011584878, 0.04667636379599571, -0.017008962109684944, 0.013864007778465748, 0.016995858401060104, -0.015672355890274048, -0.010679741390049458, -0.01497784536331892, 0.00748892268165946, 0.03186887130141258, 0.025631379336118698, -0.04077957570552826, 0.015069573186337948, 0.03865673020482063, -0.005644537974148989, -0.0576050840318203, 0.003931193146854639, 0.0031433163676410913, -0.015056469477713108, 0.03821119666099548, -0.0019393885741010308, -0.040176793932914734, 0.03475174680352211, 0.0031940944027155638, 0.055718109011650085, -0.01517440564930439, -0.0016093321610242128, 0.016130995005369186, -0.01910559833049774, 0.006807515863329172, -0.039311930537223816, -0.018450399860739708, -0.027046607807278633, 0.006794412154704332, -0.02352163940668106, 0.032524071633815765, -0.021071195602416992, -0.027465935796499252, -0.024176837876439095, -0.03317926824092865, -0.03504003584384918, 0.0017968828324228525, -0.006705960258841515, 0.0375559963285923, 0.03726771101355553, -0.0020737042650580406, -0.03564281761646271, 0.03223578259348869, 0.014230919070541859, 0.0033464280422776937, 0.04083199054002762, 0.039285723119974136, -0.006814068183302879, -0.030872968956828117, 0.03433242067694664, -0.011151484213769436, 0.04282379522919655, 0.03994091972708702, -0.02754455991089344, 0.021411897614598274, 0.024124421179294586, -0.0275969747453928, -0.0057362657971680164, -0.023508533835411072, 0.05259936302900314, 0.03150196000933647, 0.019367678090929985, 0.01875179074704647, -0.0031121945939958096, -0.013824695721268654, -0.015266133472323418, 0.0026044154074043036, -0.03598352149128914, 0.0034168618731200695, -0.004019645042717457, 0.01837177574634552, 0.051682084798812866, -0.014427478425204754, -0.002273540012538433, -0.01378538366407156, -0.012455330230295658, 0.009965574368834496, 0.02040289156138897, 0.011911515146493912, 0.022145720198750496, -0.030951593071222305, -0.024452021345496178, 0.0033939299173653126, 0.011144932359457016, -0.012468433938920498, 0.009238303638994694, -0.018542127683758736, 0.01717931404709816, 0.026561761274933815, -0.0034070340916514397, -0.022565048187971115, 0.008563448674976826, -0.01564614847302437, 0.05886306241154671, 0.04395074024796486, 0.008491377346217632, 0.005208830814808607, -0.01677308976650238, -0.005664194002747536, -0.0034168618731200695, -0.044501107186079025, -0.010057302191853523, 0.01753312163054943, 0.002953308867290616, 0.016589634120464325, 0.009696942754089832, 0.007338227238506079, 0.03446345776319504, 0.015672355890274048, -0.011623227037489414, -0.01915801502764225, 0.003063054522499442, -0.02709902450442314, 0.00917278416454792, -0.014453686773777008, -0.02561827562749386, 0.040963031351566315, -0.014283334836363792, 0.002209658036008477, -0.009631423279643059, -0.0021392242051661015, -0.04007196053862572, 0.03226199001073837, -0.043374162167310715, 0.06882208585739136, -0.0073316749185323715, -0.0022882819175720215, -0.010836988687515259, 0.011859099380671978, -0.016130995005369186, 0.019302157685160637, 0.00399998901411891, 0.024517539888620377, 0.010686293244361877, -0.013890215195715427, -0.014126087538897991, -0.028173550963401794, 0.04950682446360588, -0.014663349837064743, 0.03991471230983734, 5.9377394791226834e-05, 0.006142489146441221, -0.031737830489873886, 0.023403702303767204, -0.022905752062797546, -0.013811592012643814, -0.0318426638841629, -0.034515876322984695, -0.007619962561875582, -0.027780430391430855, 0.06819309294223785, 0.03483036905527115, 0.016196515411138535, 0.006820620037615299, 0.0002364858373766765, 0.007063043769448996, 0.004671567585319281, 0.005323490593582392, -0.03994091972708702, -0.02358715794980526, 0.013968839310109615, -0.05026685446500778, 0.011112172156572342, 0.006800964009016752, 0.002760025206953287, -0.010928716510534286, 0.05346422642469406, -0.018581438809633255, 0.013071216642856598, 0.014270231127738953, 0.0024357016663998365, 0.019800109788775444, 0.009860742837190628, 0.01758553646504879, -4.1589770262362435e-05, 0.0026535552460700274, -0.00037223484832793474, -0.05917755886912346, 0.004638807848095894, 0.018987663090229034, 0.0021850881166756153, -0.021005675196647644, 0.021805018186569214, -0.01994425244629383, 0.010398006066679955, 0.010398006066679955, 0.014492998830974102, -0.011452876031398773, 0.013628136366605759, 0.034620705991983414, 0.029667403548955917, 0.002419321797788143, -0.023390598595142365, 0.03674355149269104, -0.01259947381913662, -0.015777187421917915, 0.035302113741636276, -0.044894225895404816, 0.01377227995544672, -0.020075293257832527, 0.02637830562889576, -0.04848471283912659, 0.0002371000882703811, 0.004127752501517534, 0.015790292993187904, 0.023652678355574608, 0.00917278416454792, -0.006522504612803459, -0.013811592012643814, 0.00748237082734704, 0.048904042690992355, 0.009434862993657589, -0.017035169526934624, -0.02113671414554119, -0.018437296152114868, 0.02031116373836994, 0.007600306533277035, 0.0007723156595602632, -0.013483991846442223, -0.00489105936139822, 0.004163788631558418, -0.024242356419563293, -0.015528212301433086, -0.01058146171271801, 0.005366078577935696, -0.003721529385074973, -0.01520061306655407, -0.019393885508179665, -0.018450399860739708, -0.010057302191853523, -0.021031882613897324, -0.004943475127220154, -0.00012213316222187132, -0.001977062551304698, 0.026155536994338036, 0.029483947902917862, 0.0041310288943350315, -0.0023505259305238724, -0.04680740460753441, -0.017022065818309784, 0.02513342723250389, 0.013732967898249626, -0.024150628596544266, -0.0383160300552845, -5.9223832067800686e-05, -0.003924641292542219, 0.016904130578041077, 0.0014094965299591422, 0.025814834982156754, -0.022669879719614983, 0.0022375041153281927, -0.016262035816907883, 0.0010548700811341405, -0.015292340889573097, 0.013942630961537361, 0.03787049278616905, -0.0018787826411426067, 0.0005163786117918789, 0.015095781534910202, 0.02201468124985695, -0.032183367758989334, 0.021673977375030518, 0.02117602713406086, 0.008052393794059753, 0.0211891308426857, -0.002101550344377756, -0.023744406178593636, -0.003171162446960807, 0.010922164656221867, -0.005831269547343254, -0.008563448674976826, -0.005864029750227928, 0.015868915244936943, -0.009343135170638561, 0.02111050672829151, -0.0416182316839695, 0.019026974216103554, 0.05039789527654648, -0.01678619347512722, -0.012999145314097404, -0.02033737301826477, 0.04544459283351898, -0.02709902450442314, -0.006168697029352188, -0.004648635629564524, -0.05270419642329216, 0.02388855069875717, -0.0057297139428555965, -0.023062998428940773, 0.01879110373556614, -0.032183367758989334, -0.013293984346091747, 0.05351664125919342, 0.0038525692652910948, -0.004864851478487253, 0.002398027805611491, 0.039338137954473495, 0.0454183854162693, 0.005012270994484425, 0.005637986119836569, -0.014348854310810566, -0.008687936700880527, 0.012501194141805172, -0.0032645282335579395, -0.020573243498802185, 0.02670590579509735, 0.024674788117408752, -0.012828793376684189, 0.01590822823345661, 0.014637142419815063, -0.04190651699900627, -0.0010049112606793642, -0.01991804502904415, -0.0013390625827014446, -0.0063554286025464535, -0.026116225868463516, 0.0013243206776678562, -0.018253840506076813, -0.029300492256879807, -0.009520038962364197, -0.0020327544771134853, -0.02311541512608528, -0.014060567133128643, 0.043767284601926804, -0.01831935904920101, -0.028933580964803696, 0.0030352086760103703, -0.022866439074277878, 0.024609267711639404, -0.03868294134736061, -0.020193228498101234, -0.013346400111913681, 0.03724150359630585, 0.006345600821077824, -0.021477418020367622, -0.00214413832873106, -0.013510200195014477, -0.009022087790071964, -0.017480704933404922, -0.0023865618277341127, -0.01461093407124281, 0.010280069895088673, 0.023456119000911713, -0.011636331677436829, -0.030453642830252647, 0.025356195867061615, 0.005742817651480436, -0.007731346413493156, 0.022630568593740463, 0.007148219272494316, 0.023691989481449127, -0.025801731273531914, 0.008098257705569267, 0.0014750163536518812, 0.009061399847269058, 0.009133472107350826, 0.06358049809932709, -0.01685171388089657, 0.009900054894387722, 0.0036560094449669123, 0.0033939299173653126, -0.029641196131706238, 0.009644526988267899, -0.016550322994589806, -0.05123655125498772, 0.00039107180782593787, -0.00172153499443084, -0.025329986587166786, -0.03865673020482063, 0.023377494886517525, -0.03278614953160286, 0.05702850595116615, -0.0026732112746685743, 0.004877955187112093, -0.036586303263902664, 0.048537131398916245, 0.030139146372675896, -0.04633566364645958, 0.005929549690335989, -0.022604359313845634, -0.01632755436003208, -0.011839442886412144, -0.008799320086836815, 0.04020300135016441, -0.021857433021068573, -0.010456973686814308, 0.015069573186337948, 0.026994192972779274, 0.0034561739303171635, 0.021778808906674385, -0.013824695721268654, 0.007377538830041885, 0.0033742741215974092, 0.02522515505552292, -0.017061378806829453, 0.002812440972775221, 0.005280902609229088, 0.019800109788775444, -0.011066308245062828, 0.012324290350079536, -0.029850859194993973, -0.012284978292882442, -0.01759864017367363, 0.010293173603713512, 0.016956545412540436, 0.011026996187865734, 0.010253861546516418, -0.03228819742798805, -0.0407271608710289, -0.007600306533277035, -0.006244045216590166, 0.025447923690080643, 0.038945019245147705, 0.005520050413906574, 0.01997045986354351, -0.027649391442537308, -0.029379116371273994, -0.02201468124985695, -0.008242401294410229, -0.01803107187151909, -0.022591255605220795, 0.014624037779867649, -0.0013177687069401145, 0.03821119666099548, -0.016484802588820457, 0.002466823672875762, 0.030820554122328758, 0.0030057246331125498, -0.003934469074010849, 0.003960676956921816, -0.010987685061991215, -0.031764041632413864, -0.002812440972775221, 0.015095781534910202, 0.004855023231357336, -0.01399504765868187, -0.011524947360157967, -0.022119512781500816, -0.013110528700053692, -0.0008714144350960851, -0.015475796535611153, -0.030217770487070084, 0.0016543770907446742, -0.004763295408338308, 0.004674843978136778, -0.018909038975834846, -0.01237015426158905, -0.010555253364145756, 0.01235705055296421, -0.018070384860038757, -0.0037477375008165836, -0.043741073459386826, 0.032602693885564804, 0.04185410216450691, -0.00798687431961298, -0.02675832062959671, 0.008091705851256847, -0.02120223455131054, -0.01521371677517891, -0.006214560940861702, -0.029824651777744293, -0.016982754692435265, 0.008471720851957798, -0.010640429332852364, 0.010771469213068485, 0.011393907479941845, -0.013149840757250786, -0.003957401029765606, -0.013313640840351582, -0.04384590685367584, 0.023691989481449127, -0.027728015556931496, -0.029248075559735298, 0.017061378806829453, -0.005723162088543177, 0.014741973951458931, -0.0015806672163307667, -0.015030261129140854, -0.027701806277036667, -0.004239136353135109, 0.04361003637313843, 0.035013824701309204, -0.03113504871726036, -0.031239880248904228, 0.013143288902938366, -7.447768439305946e-05, -0.0015143282944336534, 0.0012522487668320537, 0.008550344966351986, 0.011898411437869072, -0.029405323788523674, 0.019013870507478714, -0.0009688753052614629, 0.02641761675477028, -0.014126087538897991, 0.011079412885010242, -0.02476651594042778, 0.001339881680905819, 0.0028648569714277983, 0.04442248120903969, 0.027649391442537308, 0.03561661019921303, -0.02801630273461342, 0.006286632735282183, -0.019878732040524483, 0.006568368524312973, -0.0013390625827014446, -0.011249763891100883, 0.004609324038028717, -0.015305444598197937, 0.027072817087173462, 0.03194749727845192, -0.019328365102410316, 0.018673166632652283, 0.017755888402462006, -0.003963952884078026, 0.01877799816429615, 0.004196548368781805, -0.004950027447193861, 0.004933647345751524, 0.007338227238506079, -0.05561327934265137, -0.006676476448774338, 0.02159535326063633, -0.02872391790151596, -0.026496240869164467, -0.01438816636800766, 0.024229252710938454, -0.029483947902917862, -0.02553965151309967, -0.009081056341528893, -0.006578196305781603, -0.0050581349059939384, -0.00400326494127512, 0.02796388603746891, 0.03325789421796799, -0.02318093553185463, -0.03307443857192993, 0.011590467765927315, 0.007587202824652195, 0.0029418428894132376, -0.0032890981528908014, 0.016877921298146248, -0.005870581604540348, -0.014938533306121826, 0.0098017742857337, 0.03645526245236397, -0.018293151631951332, 0.009159679524600506, -0.024674788117408752, -0.011944275349378586, -0.017074482515454292, -0.022971270605921745, 0.009015535935759544, -0.010135926306247711, -0.012402914464473724, -0.016864817589521408, -0.028461838141083717, 0.012881209142506123, -0.005533154122531414, 0.024858243763446808, 0.008556896820664406, 0.028514252975583076, -0.018083488568663597, 0.012429121881723404, 0.0023881997913122177, -0.001139226951636374, -0.014296438544988632, -0.01475507766008377, 0.016943441703915596, 0.011151484213769436, -0.019053181633353233, 0.008838632144033909, 0.00011066717706853524, 0.005169518757611513, -0.0006527418736368418, -0.01558062806725502, 0.05660917982459068, 0.028592877089977264, -0.004144132602959871, -0.008661728352308273, 0.006846827920526266, -0.020953258499503136, 0.04945440962910652, -0.009539695456624031, -0.03210474178195, 0.007914802059531212, -0.005097446963191032, -0.030899178236722946, -0.016170307993888855, 0.0155413169413805, -0.023770613595843315, 0.010273518040776253, -0.003678941400721669, -0.003228492336347699, -0.028252175077795982, 0.03142333775758743, 0.025447923690080643, 0.0010909060947597027, 0.001520880265161395, -0.024242356419563293, -0.015698565170168877, 0.003231768263503909, -0.01997045986354351, 0.01872558332979679, 0.039731256663799286, -0.0005315300659276545, -0.01755932904779911, 0.017651056870818138, 0.013680552132427692, 0.0037772213108837605, 0.033310309052467346, -0.009362791664898396, -0.015148197300732136, -0.004687947686761618, 0.00977556686848402, 0.0137984873726964, 0.01596064306795597, -0.0027780430391430855, 0.011754266917705536, -0.03283856436610222, -0.021071195602416992, -0.0031957323662936687, 0.013084321282804012, 0.02399338223040104, 0.005811613518744707, 0.023823030292987823, -0.012311186641454697, 0.02476651594042778, -0.007534786593168974, 0.012409466318786144, -0.0005921359406784177, 0.009821430779993534, 0.02112361043691635, 0.04269275814294815, 0.006568368524312973, -0.019760796800255775, 0.03595731407403946, -0.008930359967052937, -0.044579729437828064, -0.03624559938907623, 0.02751835063099861, 0.03118746541440487, 0.00458966800943017, 0.030165355652570724, -0.0019852526020258665, -0.04117269441485405, 0.005303834564983845, 0.00837344117462635, -0.014781286008656025, -0.021071195602416992, -0.004579839762300253, -0.013339848257601261, -0.013890215195715427, 0.024609267711639404, -0.017454497516155243, 0.009166231378912926, -0.016275139525532722, -0.034568291157484055, 0.019787004217505455, -0.007154771592468023, 0.007364435121417046, -0.02121533825993538, 0.02640451304614544, 0.02840942144393921, 0.013307088986039162, -0.007226843386888504, -0.0003099909517914057, -0.0068992436863482, -0.0040982686914503574, 0.023665782064199448, 0.01176737155765295, 0.043374162167310715, -0.0207435954362154, 0.00028705899603664875, -0.026221057400107384, 0.013955735601484776, 0.017061378806829453, -0.019354574382305145], "index": 65}, {"title": "Black Arrow", "text": "Black Arrow, officially capitalised BLACK ARROW, was a British satellite carrier rocket. Developed during the 1960s, it was used for four launches between 1969 and 1971. Its final flight was the first and only successful orbital launch to be conducted by the United Kingdom, and placed the Prospero satellite into low Earth orbit.Black Arrow originated from studies by the Royal Aircraft Establishment for carrier rockets based on the Black Knight rocket, with the project being authorised in 1964.", "vector": [-0.014135890640318394, 0.03546791151165962, -0.020262327045202255, -0.057675138115882874, -0.02767062932252884, 0.001184621243737638, -0.028501631692051888, 0.021641438826918602, -0.07178451120853424, 0.007664675824344158, 0.02689266949892044, -0.011519115418195724, -0.024258213117718697, -0.021234776824712753, -0.0010912438156083226, 0.07192595303058624, -0.030004510655999184, 0.03173723816871643, 0.020280007272958755, -0.020527539774775505, 0.019519727677106857, -0.03336388245224953, -0.030216680839657784, -0.01761903055012226, -0.006926497910171747, 0.023480253294110298, -0.006011510733515024, 0.01863568276166916, -0.03702383115887642, -0.005945207085460424, 0.0015393445501103997, -0.0228260587900877, 0.028201056644320488, 0.06807151436805725, 0.029456401243805885, -0.0008133220253512263, 0.010829559527337551, -0.000709999178070575, -0.05870063230395317, -0.04490951821208, -0.013057354837656021, -0.039216265082359314, -0.02316199615597725, 0.05123928561806679, 0.004862251225858927, 0.0013415393186733127, 0.016275281086564064, 0.011395348235964775, -0.004902033135294914, 0.013145758770406246, -0.006683385465294123, 0.03140130266547203, -0.042823173105716705, 0.025425152853131294, 0.01392371952533722, 0.0445912629365921, 0.019201472401618958, 0.05944323167204857, -0.02696339227259159, -0.04918830096721649, 0.009583055041730404, 0.002559312153607607, 0.03592761605978012, 0.01879481039941311, -0.010467100888490677, -0.03995886445045471, 0.03237375244498253, -0.02247244119644165, -0.020580582320690155, 0.0038610694464296103, 0.015550362877547741, -0.056791093200445175, 0.04225738346576691, -0.015930503606796265, 0.009918992407619953, -0.004422438330948353, 0.05463402345776558, 0.02698107436299324, -0.011527955532073975, 0.044838797301054, 0.03145434334874153, -0.012058382853865623, -0.056260667741298676, -0.002676448319107294, -0.028943656012415886, 0.0445912629365921, 0.010369855910539627, -0.061741750687360764, -0.014065166935324669, -0.01744222082197666, -0.01865336298942566, 0.038791924715042114, 0.016089631244540215, -0.030446533113718033, 0.0047296443954110146, 0.003967154771089554, 0.014374583028256893, -0.006966279819607735, -0.0011802009539678693, 0.05969076231122017, -0.013561260886490345, -0.029385678470134735, -0.014339220710098743, 0.014807765372097492, -0.056755732744932175, 0.026114709675312042, -0.038155410438776016, -0.0017316244775429368, 0.023851552978157997, 0.052724484354257584, -0.020421454682946205, 0.002237740671262145, 0.0012266134144738317, -0.00907030887901783, -0.024558788165450096, -0.010414058342576027, 0.02188897132873535, -0.009335522539913654, -0.05343171954154968, -0.016407888382673264, -0.010193046182394028, -0.03808468580245972, -0.02194201387465, -0.025920219719409943, 0.016699623316526413, -0.02756454423069954, 0.012579970061779022, 0.015338192693889141, 0.030570298433303833, -0.016832228749990463, -0.07730095088481903, -0.029226548969745636, -0.01141302939504385, 0.021517671644687653, 0.002121709519997239, 0.016752665862441063, -0.023621700704097748, -0.0465715266764164, 0.011775488033890724, 0.04034784436225891, -0.008588504046201706, -0.07256247103214264, 0.028784526512026787, -0.00551644479855895, -0.0057020946405828, -0.028943656012415886, 0.011138975620269775, 0.03131289780139923, -0.024399660527706146, -0.05039060488343239, 0.038756560534238815, 0.019325237721204758, -0.014851966872811317, 0.009512331336736679, -0.014975734055042267, -0.015656448900699615, -0.033416926860809326, -0.005405939184129238, -0.01394139975309372, 0.07418911159038544, 0.005180507432669401, 0.007540909573435783, -0.0015305040869861841, 0.003240027464926243, -0.010334493592381477, -0.0013547999551519752, 0.004040088504552841, 0.006599401123821735, -0.043424323201179504, 0.014984574168920517, 0.05873599275946617, -0.03925162926316261, 0.03290418162941933, 0.003469879273325205, -0.03557399660348892, 0.03582153096795082, -0.004437909461557865, -0.010325653478503227, -0.005030219908803701, -0.015629926696419716, -0.06517184525728226, 0.04204521328210831, -0.019077705219388008, 0.05523517355322838, -0.004773846827447414, -0.023639380931854248, 0.02264925092458725, 0.01815829798579216, -0.05809948220849037, 0.008442636579275131, 0.0031560431234538555, -0.009574214927852154, 0.0016763715539127588, 0.021517671644687653, 0.02788279950618744, 0.07132480293512344, -0.04950655624270439, -0.043813303112983704, -0.05304273962974548, -0.04239882901310921, 0.029155826196074486, -0.014595594257116318, -0.020173922181129456, -0.0038124469574540854, -0.02715788222849369, 0.00927363894879818, 0.06043336167931557, -0.0007260225247591734, 0.03217926248908043, 0.017053240910172462, -0.005105363670736551, -0.014560231938958168, 0.029279593378305435, 0.007112147286534309, -0.015382394194602966, 0.005569487810134888, -0.030075233429670334, 0.010069279931485653, -0.05438648909330368, -0.014869648031890392, 0.0112539017572999, 0.020403774455189705, 0.03741281107068062, -0.012694896198809147, -0.024647193029522896, -0.007143089082092047, -0.030446533113718033, 0.05085030570626259, 0.014940371736884117, -0.0440608374774456, -0.06411099433898926, 0.03583921119570732, -0.006886715535074472, 0.02268461138010025, -0.043919388204813004, 0.019678857177495956, 0.014772403053939342, -0.012120266444981098, -0.01893625780940056, 0.056260667741298676, -0.03691774606704712, -0.0037925560027360916, -0.010458259843289852, -0.020934201776981354, 0.06259043514728546, -0.034283291548490524, 0.01141302939504385, -0.002906300127506256, -0.05329027399420738, -0.011863892897963524, 0.007638154551386833, 0.05435112863779068, -0.03744817525148392, 0.007872426882386208, -0.024240532889962196, -0.034919802099466324, -0.009291320107877254, 0.011855052784085274, 0.05300737917423248, 0.030428851023316383, 0.0054678223095834255, -0.005379417911171913, 0.030075233429670334, 0.05778122320771217, -0.002501849317923188, -0.01363198459148407, -0.03463691100478172, -0.025778772309422493, -0.06354520469903946, -0.025301387533545494, 0.019979432225227356, 0.014215454459190369, 0.043424323201179504, 0.02721092477440834, -0.03766034543514252, 0.016876431182026863, -0.005565067287534475, 0.02249012142419815, -0.056791093200445175, 0.01884785294532776, 0.013110397383570671, -0.025425152853131294, -0.001014442415907979, -0.05817020684480667, -0.014409944415092468, 0.0037417232524603605, -0.048551786690950394, -0.009653778746724129, 0.043035343289375305, 0.03193172812461853, -0.042434193193912506, 0.021429266780614853, 0.025690367445349693, -0.003918532282114029, 0.06619734317064285, -0.03157811239361763, -0.017353815957903862, -0.047703105956315994, 0.019961751997470856, 0.03295722231268883, -0.051805075258016586, 0.01558572519570589, -0.002422285033389926, -0.012792141176760197, -0.013066194951534271, 0.003169303759932518, -0.038615114986896515, -0.0032643387094140053, -0.00875647272914648, 0.0010415163123980165, -0.043530408293008804, -0.034424737095832825, 0.013092716224491596, -0.01807873323559761, 0.0469958670437336, -0.000743150885682553, 0.013419813476502895, 0.006422591861337423, -0.056649647653102875, -1.1283668754913379e-05, -0.015046456828713417, -0.003978205379098654, -0.12213975191116333, -0.005618110299110413, 0.056083858013153076, -0.0022134294267743826, 0.04137333855032921, -0.013322568498551846, -0.015718331560492516, -0.025566600263118744, 0.004314142744988203, -0.013331408612430096, 0.03232070803642273, -0.019060024991631508, 0.030888555571436882, -0.03247983753681183, -0.030057553201913834, -0.030199000611901283, 0.011846211738884449, 0.016522813588380814, 0.034725312143564224, -0.04038320481777191, 0.009848268702626228, -0.0002217020810348913, -0.021146371960639954, -0.020138559862971306, -0.027988886460661888, -0.01898930035531521, 0.03106536529958248, -0.019519727677106857, 0.0009315631468780339, 0.01852959766983986, 0.03988813981413841, -0.03702383115887642, 0.011713605374097824, -0.047773826867341995, 0.004448959603905678, -0.0466422513127327, -0.0032223465386778116, 0.016955995932221413, 0.04087827354669571, -0.021676799282431602, 0.0007696722750551999, 0.033717501908540726, 0.010643909685313702, -0.021022606641054153, 0.08232232928276062, 0.014047485776245594, -0.019784942269325256, -0.01754830591380596, -0.0005511472118087113, 0.025920219719409943, -0.02305591106414795, -0.039074819535017014, -0.011289263144135475, -0.04215129837393761, -0.020898839458823204, -0.006259043235331774, -0.008080177009105682, 0.0011144500458613038, -0.03124217316508293, 0.014409944415092468, -0.06520720571279526, 0.007315477821975946, 0.04211593419313431, -0.02240171656012535, -0.003158253151923418, -0.024046042934060097, 0.025159940123558044, -0.00940624624490738, -0.016425568610429764, -0.020757392048835754, 0.0230028685182333, 0.014745881780982018, -0.02240171656012535, -0.08366607874631882, 0.03278041258454323, 0.02211882174015045, 0.004212477710098028, 0.003613536711782217, 0.029509443789720535, 0.04002958908677101, -0.02236635610461235, 0.01774279586970806, -0.023957638069987297, 0.019024662673473358, 0.0009199600317515433, -0.046960506588220596, -0.016823388636112213, -0.0456521175801754, 0.003509661415591836, -0.042787808924913406, -0.02332112565636635, -0.017026718705892563, 0.011519115418195724, 0.0037262525875121355, -0.019979432225227356, -0.025601962581276894, -0.015028776600956917, -0.029686253517866135, -0.03590993583202362, 0.030181318521499634, -0.005065581761300564, -0.003832337912172079, 0.013623143546283245, -0.02680426463484764, 0.007244754116982222, 0.0005566725158132613, -0.03608674556016922, -0.056932542473077774, 0.004353925120085478, -0.039180904626846313, 0.042787808924913406, 0.02296750620007515, -0.04947119578719139, 0.01849423535168171, 0.012120266444981098, 0.03709455579519272, -0.013269525952637196, 0.028590036556124687, -0.017035560682415962, 0.029173506423830986, -0.05031988024711609, -0.012641852721571922, -0.0013404341880232096, 0.0222425889223814, 0.03152506798505783, 0.02782975696027279, 0.06340375542640686, -0.022896783426404, -0.03971133008599281, 0.025301387533545494, 0.024983130395412445, 0.004460010211914778, -0.01824670284986496, -0.025389792397618294, 0.05024915561079979, 0.0076956176199018955, -0.015992386266589165, -0.0031427822541445494, -0.029721615836024284, 0.043070703744888306, 0.025442834943532944, -0.03751889988780022, -0.007302217185497284, -0.0003259918303228915, -0.0218359287828207, 0.014127049595117569, -0.004462220706045628, 0.021057967096567154, -0.005224709864705801, -0.009954353794455528, -0.019466685131192207, 0.043176788836717606, 0.0231089536100626, 0.029756978154182434, 0.05877135694026947, -0.0056578922085464, 0.012951268814504147, -0.03992350399494171, -0.008323290385305882, -0.03301026672124863, -0.015921661630272865, 0.00896864291280508, 0.024417340755462646, -0.002784743905067444, -0.012129106558859348, -0.029102783650159836, 0.02247244119644165, -0.0077221388928592205, 0.07213812321424484, -0.02307359129190445, -0.024505745619535446, -0.02236635610461235, -0.0115544768050313, 0.009874789975583553, 0.003989255987107754, 0.02673354186117649, 0.024611830711364746, -0.013101557269692421, 0.01761019043624401, 0.04162086918950081, -0.0061485376209020615, 0.042823173105716705, 0.08069568872451782, 0.05046132579445839, -0.037731070071458817, 0.09774009138345718, 0.01879481039941311, 0.01150143425911665, -0.000745913537684828, 0.00886255782097578, -0.00686461478471756, 0.0228260587900877, -0.005476662889122963, -0.0447680726647377, 0.02708715945482254, 0.01879481039941311, 0.025690367445349693, -0.03318707272410393, -0.004990437999367714, 0.0009475864353589714, 0.002822315786033869, 0.00913219153881073, 0.03720064088702202, 0.021765204146504402, 0.0008973063668236136, 0.008486838079988956, -0.0038389682304114103, -0.03737745061516762, -0.014321539551019669, 0.020598264411091805, 0.002725070808082819, -0.013570101000368595, -0.03306330740451813, 0.043530408293008804, -0.024717917665839195, 0.024841682985424995, -0.0014940372202545404, 0.023674743250012398, -0.042434193193912506, 0.030764788389205933, 0.023798508569598198, 0.05466938391327858, 0.028943656012415886, -0.012818662449717522, 0.05940786749124527, -0.011200858280062675, 0.004902033135294914, -0.02227795124053955, -0.0220304187387228, 0.012155627831816673, 0.009432767517864704, -0.008102278225123882, 0.03978205472230911, 0.000334279757225886, 0.016814548522233963, 0.001534924260340631, -0.03681166097521782, 0.04176231846213341, 0.024841682985424995, -0.025460515171289444, -0.014038645662367344, 0.009680300019681454, -0.043495047837495804, -0.025442834943532944, -0.02194201387465, 0.03780179098248482, -0.04130261391401291, -0.015143702737987041, 0.01758366823196411, -0.0031825643964111805, -0.009830587543547153, -0.008013874292373657, -0.017344975844025612, -0.0231089536100626, -0.006714326795190573, -0.03971133008599281, -0.010033918544650078, 0.012208670377731323, 0.02756454423069954, -0.019572770223021507, 0.007691197097301483, -0.0009652673616074026, 0.009865949861705303, 0.04087827354669571, 0.006334186997264624, 0.0443083681166172, 0.0063562882132828236, -0.0040555596351623535, -0.031047683209180832, -0.017062081024050713, 0.034265611320734024, 0.01345517486333847, 0.004101972095668316, 0.039039455354213715, 0.0033306421246379614, 0.012986631132662296, -0.004320773296058178, -0.030764788389205933, -0.007872426882386208, -0.010582027025520802, -0.028943656012415886, 0.010617388412356377, -0.003293070010840893, -0.004371605813503265, -0.0026676077395677567, 0.010449419729411602, 0.026486007496714592, 0.01879481039941311, -0.02344489097595215, 0.001612278283573687, 0.005401519127190113, 0.001518348464742303, 0.02740541659295559, 0.01812293566763401, -0.04869323596358299, 0.019413642585277557, -0.00461471825838089, -0.019219152629375458, 0.006749688647687435, -0.016955995932221413, 0.009689140133559704, -0.012721417471766472, -0.02791816182434559, -0.013464015908539295, 0.004570516292005777, -0.008464736863970757, -0.011828531511127949, 0.008685749024152756, -0.02694571204483509, -0.0011133450316265225, -0.020209284499287605, -0.010803038254380226, -0.02777671441435814, -0.03148970752954483, 0.06831905245780945, 0.0056623127311468124, -0.03233839198946953, -0.03297490254044533, 0.021906651556491852, 0.03301026672124863, -0.024010680615901947, -0.0012487145140767097, -0.006144117563962936, -0.016089631244540215, -0.030163638293743134, -0.01372922956943512, 0.012703736312687397, -0.0014299438335001469, -0.061883196234703064, 0.047809191048145294, 0.02211882174015045, 0.01822902262210846, 0.012358958832919598, -0.04982481524348259, 0.00912335142493248, 0.011961137875914574, -0.004325193352997303, 0.02217186614871025, -0.015293990261852741, 0.033664457499980927, -0.009494650177657604, 0.0035494433250278234, 0.04010030999779701, 0.01145723182708025, -0.020545221865177155, -0.04052465409040451, 0.006206000689417124, -0.03656413033604622, -0.020474497228860855, 0.007536489516496658, -0.024841682985424995, -0.0224370788782835, 0.01780468039214611, 0.0006188319530338049, -0.005768397822976112, 0.03663485124707222, -0.0058744833804667, 0.00229188846424222, 0.03769570589065552, -0.03628123551607132, -0.002006783615797758, -0.008000613190233707, -0.008822775445878506, -0.00014945896691642702, 0.0029151407070457935, -0.012854023836553097, -0.03217926248908043, -0.07928121834993362, -0.03265664726495743, -0.06814224272966385, -0.008062496781349182, -0.01904234290122986, 0.0027648527175188065, 0.043212153017520905, -0.006908816751092672, -0.021482309326529503, -0.014922690577805042, 0.002943872008472681, -0.00016520603094249964, -1.2371458979032468e-05, -0.019961751997470856, -0.019891027361154556, -0.04013567417860031, -0.021623756736516953, -0.007452505175024271, -0.024116765707731247, 0.016876431182026863, 0.03138362243771553, 0.010944485664367676, -0.0232857633382082, -0.048021361231803894, 0.03304562717676163, 0.02236635610461235, -0.03603370115160942, 0.004219107795506716, 0.039180904626846313, 0.0052114492282271385, -0.021411586552858353, 0.0111654968932271, 0.030305085703730583, 0.003934003412723541, -0.0007967461715452373, -0.01364966481924057, 0.004990437999367714, 0.03246215730905533, -0.010414058342576027, -0.0006464584148488939, -0.0043229833245277405, -0.0230028685182333, -0.03486676141619682, 0.012977790087461472, 0.01874176785349846, 0.008062496781349182, 0.03336388245224953, -0.028307141736149788, -0.020969564095139503, 0.01165172178298235, 0.0021471260115504265, 0.0115544768050313, 0.008416114374995232, 0.0006309875752776861, -0.047031231224536896, 0.019961751997470856, -0.007576271425932646, -0.047667741775512695, -0.0050125387497246265, 0.012482725083827972, -0.008782994002103806, 0.016275281086564064, -0.04066609963774681, 0.0031781441066414118, -0.03269200772047043, -0.009609576314687729, -0.007337579037994146, 0.013207642361521721, 0.004256679676473141, 0.0067850505001842976, -0.001633274368941784, 0.02811265178024769, 0.019077705219388008, -0.01766323298215866, -0.004769426304847002, 0.024293575435876846, -0.034247927367687225, 0.012633012607693672, 0.002992494497448206, 0.004765006247907877, -0.01796380802989006, -0.01350821740925312, 0.008234885521233082, -0.04098435863852501, -0.021623756736516953, 0.011766647920012474, 0.03631659597158432, 0.03173723816871643, -0.003876540344208479, -0.021234776824712753, -0.0232857633382082, -0.0072403340600430965, 0.02287910133600235, -0.008119959384202957, -0.012818662449717522, -0.004170485306531191, -0.0016741615254431963, -0.003255498129874468, -0.02286142110824585, -0.007624893914908171, -0.010475941002368927, -0.002318409737199545, 0.06046872213482857, -0.003629007376730442, 0.04080754891037941, 0.03232070803642273, -0.009017265401780605, 0.012712576426565647, -0.002099608536809683, -0.030269723385572433, 0.01766323298215866, 0.01898930035531521, -0.016231078654527664, -0.0443083681166172, -0.0025946740061044693, -0.01106825191527605, -0.03677630051970482, -0.01158983912318945, 0.0020089938770979643, -0.0223486740142107, 0.03734209015965462, 0.01737149804830551, -0.006082233972847462, -0.005162826739251614, -0.0006149642867967486, 0.015232106670737267, 0.01815829798579216, 0.0010183100821450353, 0.005481082946062088, -0.011757807806134224, 0.008535460568964481, -0.0224370788782835, -0.020969564095139503, 0.033399246633052826, 0.020845796912908554, -0.016284121200442314, 0.020969564095139503, 0.019395962357521057, -0.024558788165450096, -0.003480929881334305, -0.03148970752954483, -0.009945513680577278, -0.029067421332001686, 0.011890414170920849, -0.02729932963848114, -0.02653905190527439, 0.004932974930852652, 0.024099085479974747, 0.005087682977318764, -0.042823173105716705, -0.003125101327896118, 0.015992386266589165, 0.015833258628845215, 0.0056932540610432625, -0.001940480200573802, -0.0019603711552917957, 0.006382809951901436, 0.007045844104140997, -0.004048929084092379, -0.011634040623903275, 0.014533710666000843, 0.006829252932220697, 0.033841267228126526, 0.020651306957006454, 0.013048513792455196, 0.025301387533545494, -0.029633210971951485, -0.014365741983056068, 0.03741281107068062, -0.007461345288902521, -0.03709455579519272, -0.001617803587578237, 0.010086961090564728, -0.012323596514761448, -0.038756560534238815, -0.008650386705994606, 0.043282877653837204, -0.006568459328263998, 0.02657441236078739, 0.013472856022417545, 0.002439965959638357, -0.01325184479355812, 0.012314756400883198, -0.010166524909436703, -0.029597848653793335, -0.02326808124780655, -0.009892471134662628, -0.003091949736699462, -0.005905425176024437, 0.04101971909403801, 0.03157811239361763, 0.03124217316508293, -0.03695311024785042, 0.006594980601221323, 0.006130856927484274, -0.016788028180599213, 0.0029239810537546873, -0.025283705443143845, 0.00890676025301218, 0.001501772552728653, -0.02673354186117649, -0.004024617839604616, 0.021818246692419052, -0.01754830591380596, 0.03242679685354233, 0.005361736752092838, -0.0007779601728543639, 0.04087827354669571, 0.0016056479653343558, -0.03509661182761192, -0.0009746603318490088, 0.02790048159658909, 0.037731070071458817, -0.0452985018491745, -0.04158550873398781, 0.014984574168920517, -0.012199830263853073, -0.024099085479974747, 0.038226135075092316, 0.019873347133398056, 0.006320926360785961, 0.005321954842656851, -0.017159326002001762, 0.002100713551044464, 0.0457582026720047, 0.015364713966846466, -0.013075035065412521, -0.025584282353520393, -0.003982625901699066, -0.01557688508182764, 0.006320926360785961, 0.00579933961853385, 0.03200245276093483, -0.04027711972594261, -0.011377668008208275, 0.00676736980676651, -0.008181842975318432, -0.03260360285639763, 0.025761090219020844, 0.002565942471846938, 0.0038964312989264727, 0.020173922181129456, 0.011784329079091549, 0.011855052784085274, 0.0227022934705019, -0.028289461508393288, -0.004910873714834452, 0.0014398894272744656, -0.005052321124821901, -0.00468102190643549, -0.016849910840392113, 0.008137640543282032, 0.012800981290638447, -0.0035339726600795984, -0.02715788222849369, 0.0038013963494449854, -0.06464141607284546, -0.03949915990233421, -0.004126283340156078, 0.0049815974198281765, -0.0115102743729949, 0.024046042934060097, -0.004163855221122503, -0.011775488033890724, -0.028077291324734688, -0.024470383301377296, 0.04862251132726669, 0.016443248838186264, -0.04126725345849991, -0.038367580622434616, -0.034672271460294724, -0.024824002757668495, 0.001052014296874404, -0.009830587543547153, -0.006802731193602085, -0.00907030887901783, -0.015055297873914242, -0.028254099190235138, -0.0453692227602005, -0.009388565085828304, 0.03318707272410393, -0.026026304811239243, 0.033911991864442825, 0.00699280109256506, -0.015019935555756092, 0.04229274392127991, 0.008380752988159657, 0.0038455985486507416, 0.030853193253278732, 0.010953325778245926, -0.013030833564698696, 0.008703429251909256, -0.01870640553534031, -0.01838815025985241, -0.003251077840104699, 0.00917639397084713, 0.023780828341841698, -0.027988886460661888, 0.023922275751829147, 0.01804337278008461, 0.03555631637573242, -0.043919388204813004, -0.0008823880925774574, 0.0010763256577774882, -0.024770960211753845, 0.013481696136295795, 0.042929258197546005, 0.03196709230542183, -0.004769426304847002, -0.008133220486342907, 0.012703736312687397, 0.012129106558859348, -0.007434824015945196, -0.011863892897963524, 0.00012998233432881534, 0.0004166065191384405, 0.02696339227259159, 0.004216897767037153, 0.0231973584741354, 0.025071535259485245, 0.0024863784201443195, 0.010502462275326252, 0.031047683209180832, 0.0024753278121352196, -0.03113608807325363, 0.0036820501554757357, -0.001617803587578237, 0.0112539017572999, -0.06591444462537766, 0.020173922181129456, 0.04894076660275459, 0.006303245667368174, -0.028766846284270287, 0.013799953274428844, -0.010714633390307426, -0.029350316151976585, 0.034495461732149124, 0.019696537405252457, -0.0233034435659647, 0.029403358697891235, 0.007540909573435783, -0.029138145968317986, -0.0030278563499450684, -0.0030123856849968433, -0.008508939296007156, -0.008800674229860306, -0.0018819122342392802, 0.009397405199706554, 0.05017843097448349, 0.011395348235964775, -0.004937394987791777, 0.010025077499449253, -0.034495461732149124, -0.0222249086946249, 0.038650475442409515, 0.005542966537177563, -0.038261495530605316, 0.007178450934588909, -0.003750563831999898, -0.033823587000370026, 0.010979847051203251, -0.010016237385571003, 0.006590560544282198, 0.03194941207766533, -0.003575964830815792, 0.02668049745261669, -0.008442636579275131, -0.019307557493448257, 0.014533710666000843, 0.06322694569826126, 0.03720064088702202, -0.0114041892811656, 0.025884857401251793, -0.01890089549124241, -0.005578328389674425, 0.011961137875914574, -0.009812907315790653, -0.0110328895971179, -0.04947119578719139, 0.0030344866681843996, 0.021871289238333702, 0.03741281107068062, 0.034619227051734924, -0.001386846648529172, -0.0034787196200340986, -0.01803453080356121, 0.03111840784549713, -0.012783300131559372, 0.023993000388145447, 0.0223133135586977, 0.016346003860235214, 0.0010050494456663728, 0.0021018185652792454, 0.021429266780614853, -0.015099500305950642, 0.0010083646047860384, -0.0011255006538704038, 0.005675573367625475, 0.05891280248761177, -0.026079347357153893, 0.013852995820343494, -0.009954353794455528, 0.02335648611187935, -0.0222425889223814, -0.01879481039941311, -0.017044400796294212, -0.01872408762574196, 0.002780323615297675, 0.08409042656421661, -0.013207642361521721, 0.043742578476667404, -0.0036312176380306482, -0.024152128025889397, -0.01738033816218376, 0.02781207673251629, -0.006365128792822361, 0.021871289238333702, -0.03134825825691223, -0.010758835822343826, -0.005909845232963562, 0.017000198364257812, -0.002811265178024769, 0.0443437322974205, -0.052017245441675186, 0.025513557717204094, -0.00224768603220582, -0.0007492286968044937, 0.0011636251583695412, 0.0021846978925168514, -0.004972756840288639, 0.028837569057941437, -0.015842098742723465, 0.007280115969479084, 0.012641852721571922, 0.0065507786348462105, 0.05134537070989609, 0.0002225308708148077, -0.001065827556885779, -0.010679272003471851, 0.0075188083574175835, 0.0220480989664793, -0.0033593736588954926, -0.028536994010210037, 0.01844119280576706, -0.052865929901599884, 0.013110397383570671, 0.03755426034331322, 0.047703105956315994, -0.013578941114246845, -0.024399660527706146, -0.0039207423105835915, 0.0013636404182761908, -0.025036172941327095, -0.008738791570067406, 0.007739820051938295, 0.0017647761851549149, -0.020545221865177155, -0.052936654537916183, -0.024399660527706146, -0.009105670265853405, -0.0008260301547124982, -0.01759250834584236, 0.0012929168296977878, 0.03233839198946953, -0.0006155167939141393, 0.0005539098638109863, 0.00451747328042984, 0.02797120437026024, -0.021553033962845802, -0.029314953833818436, -0.012182149104773998, 0.0018056632252410054, 0.003449988318607211, -0.01150143425911665, -0.015196745283901691, -0.0452631376683712, -0.006515416782349348, -0.023621700704097748, -0.020792754366993904, -0.014082847163081169, 0.034194886684417725, 0.008005033247172832, 0.01754830591380596, -0.01805221289396286, 0.03324011713266373, -0.025053855031728745, 0.015240947715938091, 0.007448084652423859, 0.043070703744888306, -0.01826438307762146, -0.010131163522601128, 0.016867591068148613, 0.01757482811808586, -0.016328323632478714, -0.020792754366993904, 0.025796452537178993, 0.00436718575656414, 0.014321539551019669, 0.000265351845882833, 0.017115123569965363, 0.008685749024152756, 0.019926389679312706, 0.011138975620269775, -0.004619138780981302, -0.016540493816137314, 0.012977790087461472, -0.006789470557123423, -0.00465892069041729, -0.004212477710098028, -0.01858264021575451, 0.01325184479355812, 0.0026167752221226692, -0.004057769663631916, -0.00942392647266388, 0.02208346128463745, 0.02323272079229355, -0.008491259068250656, -0.03727136552333832, -0.023975318297743797, 0.01771627552807331, -0.01790192537009716, 0.023745466023683548, 0.005078842397779226, -0.006382809951901436, 0.04094899445772171, 0.05431576445698738, -0.005450141616165638, -0.016063109040260315, 0.008752051740884781, 0.0027095999103039503, -0.025018492713570595, -0.012836342677474022, -0.0462179072201252, 0.019837984815239906, 0.015055297873914242, -0.016505133360624313, -0.02676890231668949, 0.03499052673578262, -0.011969977989792824, -0.006281144451349974, 0.009874789975583553, -0.016496291384100914, 0.012465043924748898, 0.021111011505126953, 0.004373815841972828, -0.003158253151923418, -0.02728164941072464, 0.008588504046201706, -0.01777815818786621, 0.004994858056306839, 0.04869323596358299, 0.006427011918276548, -0.00217254227027297, -0.004875511862337589, -0.025266025215387344, -0.034460101276636124, 0.011943456716835499, 0.04066609963774681, 0.000514127837959677, -0.0031759340781718493, -0.029951468110084534, 0.005145145580172539, 0.020315369591116905, -0.017132805660367012, 0.008181842975318432, -0.020651306957006454, -0.005962888244539499, 0.02249012142419815, 0.0012597651220858097, -0.020032474771142006, -0.037731070071458817, -0.025053855031728745, 0.003213505959138274, -0.014896169304847717, -0.002073087031021714, 0.014012123458087444, -0.0013360140146687627, -0.014038645662367344, -0.0023007288109511137, -0.010661590844392776, -0.007023742888122797, 0.0450156070291996, 0.0442730076611042, 0.023639380931854248, 0.034141842275857925, -0.01777815818786621, -0.004941815510392189, -0.019590452313423157, -0.0020432504825294018, -0.0442022830247879, 0.01810525543987751, 0.024753278121352196, 0.01842351257801056, -0.025796452537178993, -0.019643494859337807, -0.008566402830183506, 0.042575638741254807, 0.0232150387018919, -0.0225431639701128, -0.010113482363522053, 0.011421870440244675, -0.020704349502921104, 0.039322350174188614, 0.005224709864705801, -0.0029969147872179747, -0.0045108431950211525, 0.014427625574171543, -0.02749381959438324, 0.025460515171289444, 0.025725729763507843, -0.013075035065412521, -0.01856495812535286, 0.0006757423980161548, 0.028696121647953987, -0.013517058454453945, -0.015930503606796265, 0.010811878368258476, -0.022419398650527, -0.02668049745261669, 0.001820028992369771, -0.002336090663447976, -0.026061667129397392, 0.008429375477135181, 0.0229144636541605, -0.01814061775803566, 0.004479901399463415, 0.019130747765302658, 0.019767262041568756, 0.0035715445410460234, -0.039004094898700714, -0.007129828445613384, -0.014259656891226768, -0.026379922404885292, -0.0032532881014049053, 0.008318869397044182, -0.0014774613082408905, -0.029244231060147285, -0.015214425511658192, -0.015329351648688316, -0.019891027361154556, -0.0006818202091380954, 0.009804066270589828, -0.015196745283901691, 0.016257598996162415, 0.038438305258750916, 0.0013603252591565251, -0.038650475442409515, -0.014330380596220493, -0.006665704306215048, -0.010573185980319977, 0.002225585049018264, 0.0115986792370677, 0.009768704883754253, -0.0003409101045690477, -0.017123963683843613, 0.01384415477514267, -0.024134445935487747, 0.013269525952637196, -0.03202013298869133, 0.00774424010887742, 0.020474497228860855, -0.007708878256380558, -0.00941508635878563, -0.012217511422932148, 0.019289877265691757, 0.0458996519446373, 0.0014332589926198125, -0.01840583048760891, 0.012111425399780273, 0.03571544587612152, 0.0047296443954110146, -0.0006983960629440844, -0.025195302441716194, -0.002559312153607607, -0.03511429578065872, 0.015267468988895416, 0.009963194839656353, 0.002983654150739312, -0.01354357972741127, -0.023533295840024948, -0.020474497228860855, 0.021199414506554604, 0.0227376539260149, 0.006714326795190573, 0.008999585174024105, -0.004278780892491341, -0.033204756677150726, 0.011430710554122925, 0.04034784436225891, 0.02678658440709114, 0.02344489097595215, 0.01354357972741127, -0.016478611156344414, -0.00024642772041261196, -0.024541107937693596, 0.0462886318564415, -0.026379922404885292, 0.015152542851865292, -0.05866527184844017, -0.021022606641054153, 0.0232857633382082, 0.0061750588938593864, -0.012394320219755173, 0.0036002760753035545, 0.05371461436152458, 0.008111119270324707, 0.01890089549124241, -0.01817597821354866, -0.00027750746812671423, 0.029615530744194984, -0.010467100888490677, 0.0030742688104510307, -0.020474497228860855, -0.0001359220186714083, 0.0023338806349784136, 0.004906453657895327, 0.021270139142870903, -0.00041329136001877487, 0.02305591106414795, 0.015691811218857765, 0.03223230689764023, -0.008354231715202332, -0.005741876550018787, 0.008358651772141457, 0.03260360285639763, -0.02802424691617489, -0.0013890567934140563, -0.008199523203074932, 0.043848663568496704, -0.005498764105141163, 0.0234979335218668, -0.026079347357153893, 0.029244231060147285, -0.0020653516985476017, 0.01749526336789131, 0.007700037676841021, -0.006250202655792236, -0.01861800253391266, -0.029898423701524734, 0.020686669275164604, -0.02660977467894554, 0.01364082470536232, 0.011085933074355125, 0.02774135395884514, -0.025778772309422493, 0.009052627719938755, 0.008274667896330357, -0.045793566852808, -0.03223230689764023, -0.03117145039141178, -0.023886913433670998, -0.009485810063779354, -0.03191404789686203, -0.014180092141032219, 0.019555089995265007, -0.015665289014577866, -0.016841070726513863, 0.02259620651602745, -0.03576848655939102, 0.025690367445349693, -0.0454753078520298, -0.003843388520181179, -0.022419398650527, -0.024435022845864296, -0.0052335504442453384, -0.0472080372273922, 0.005445721093565226, -0.014118209481239319, 0.03709455579519272, -0.025301387533545494, -0.01865336298942566, -0.0012962319888174534, 0.007540909573435783, 0.007947570644319057, 0.025106897577643394, -0.02724628709256649, 0.03223230689764023, 0.001447624759748578, 0.0014553602086380124, 0.01828206516802311, 0.017230050638318062, 0.009450447745621204, -0.0460764616727829, 0.003438937710598111, -0.01856495812535286, -0.012429682537913322, 0.007311057765036821, -1.911403342091944e-05, 0.0016730563947930932, 0.0036931007634848356, -0.0028046348597854376, 0.023427210748195648, -0.011713605374097824, -0.009202915243804455, -0.005503184162080288, -0.008252566680312157, 0.010290291160345078, 0.029898423701524734, 0.05527053400874138, -0.0013990022707730532, 0.014825445599853992, 0.01776931807398796, -0.023869233205914497, -0.014648636803030968, -0.01883017271757126, -0.0008741001365706325, 0.016319483518600464, -0.01741570048034191, -0.01904234290122986, -0.024346617981791496, 0.005326375365257263, 0.0024686974938958883, -0.02669817954301834, -0.00946812890470028, -0.013039673678576946, -0.0012951268581673503, -0.011846211738884449, -0.02784743905067444, -0.019979432225227356, 0.006303245667368174, -0.042575638741254807, 0.017088603228330612, -0.008102278225123882, -0.00448432145640254, -0.0018609161488711834, -0.019891027361154556, 0.006373969372361898, 0.043070703744888306, -0.016160354018211365, 0.007107727229595184, 0.01833510771393776, 0.020386092364788055, 0.0017194688552990556, -0.04147942364215851, -0.01763671077787876, -0.008897919207811356, -0.038721200078725815, -0.01865336298942566, 0.02694571204483509, 0.04063073918223381, 0.038190774619579315, -0.021358544006943703, -0.03177260234951973, -0.008314449340105057, -0.016743825748562813, 0.056755732744932175, -0.009105670265853405], "index": 66}, {"title": "Carol Bruneau", "text": "Carol Bruneau (born 1956) is a Canadian writer. She lives in Halifax, Nova Scotia, where she is currently a part-time faculty member of the Nova Scotia College of Art and Design University, where she teaches writing in the foundation program. She has a Master's degree from Dalhousie University.Her book Purple for Sky (2000) won the Thomas Head Raddall Award and the fiction category of the Dartmouth Book Awards in 2001.", "vector": [-0.04255025461316109, -0.04091265797615051, -0.0324244424700737, -0.019460123032331467, -0.005799826234579086, -0.002688390202820301, -0.040776193141937256, -0.03392557427287102, -0.013189488090574741, 0.052512310445308685, -0.002818033332005143, -0.03245173394680023, 0.004772915970534086, -0.021206894889473915, 0.010849087499082088, -0.027593526989221573, -0.026706494390964508, 0.03258820250630379, 0.00674485694617033, 0.020715614780783653, 0.00634910399094224, -0.029831577092409134, 0.019596589729189873, 0.013817233964800835, 0.019896816462278366, 0.059171877801418304, 0.024604910984635353, -0.009354778565466404, 0.024563970044255257, -0.026624614372849464, 0.01645786128938198, -0.0003518277080729604, 0.023349419236183167, -0.022271333262324333, -0.046098385006189346, 8.415878255618736e-06, -0.031223535537719727, 0.02673378773033619, -0.03954799473285675, -0.01347606722265482, 0.06086406111717224, -0.040994539856910706, -0.029422178864479065, 0.0031489646062254906, 0.028958192095160484, -0.07167220860719681, -0.03436226770281792, 0.015188721939921379, -0.016976432874798775, 0.029422178864479065, 0.012909730896353722, 0.0021510531660169363, 0.0079969372600317, 0.0014687207294628024, -0.003759652143344283, 0.014451802708208561, -0.009259252808988094, 0.08209824562072754, -0.018682263791561127, 0.0003714447666425258, -0.015925640240311623, -0.0032496086787432432, -0.031223535537719727, -0.006250165868550539, 0.012766441330313683, 0.01705831289291382, 0.007539774291217327, 0.004445396363735199, -0.024031750857830048, -0.0028316800016909838, 0.03392557427287102, -0.05114764720201492, -0.02610604278743267, 0.05726134404540062, 0.0018849435728043318, -0.017413126304745674, 0.005045848898589611, 0.015093195252120495, 0.0083244564011693, -0.02420915849506855, -0.007915057241916656, -0.02800292707979679, -0.009743708185851574, -0.0026986252050846815, -0.02128877490758896, -0.03018639050424099, 0.04729929193854332, -0.06714151799678802, -0.003225727006793022, 0.017508652061223984, -0.012473038397729397, -0.032751962542533875, 0.05698841065168381, 0.013237250968813896, 0.016294101253151894, 0.0017049784073606133, 0.017467712983489037, -0.01674444042146206, -0.03400745242834091, -0.019924109801650047, 0.031687524169683456, 0.042331911623477936, 0.0626654177904129, -0.027115894481539726, 0.01521601527929306, 0.034962717443704605, 0.0026815668679773808, -0.02253061905503273, 0.0022261098492890596, 0.027702700346708298, 0.03597256913781166, -0.004960557445883751, -0.024168217554688454, -0.007717180997133255, -0.02554653026163578, 0.025437356904149055, 0.0170856062322855, 0.02816668711602688, -0.0048377374187111855, -0.006949556525796652, -0.0194464772939682, -0.018709557130932808, -0.029394885525107384, -0.00681650172919035, 7.830831600585952e-05, -0.026269802823662758, -0.05412261560559273, 0.0021510531660169363, 0.04702635854482651, -0.0010149696609005332, 0.013141724281013012, -0.012507155537605286, -0.03212421387434006, -0.02953135222196579, -0.028084807097911835, -0.02364964596927166, -0.005605361890047789, -0.01789075881242752, 0.011517773382365704, 0.005380191840231419, 0.03302489593625069, 0.007580714300274849, 0.07745838910341263, -0.006055701058357954, -0.06523098796606064, -0.06594061851501465, -0.022025693207979202, 0.024714084342122078, -0.0006550392135977745, -0.057861797511577606, 0.016157634556293488, 0.004366928245872259, 0.02955864556133747, 0.017781585454940796, 0.0073623680509626865, 0.03392557427287102, -0.02772999368607998, -0.02486419677734375, -0.0026099218521267176, 0.03171481564640999, -0.031660228967666626, 0.006506040692329407, -0.03313406556844711, -0.00493326410651207, 0.017440419644117355, -0.039165887981653214, -0.039848219603300095, 0.04396950826048851, 0.019501063972711563, 0.017904404550790787, -0.015543535351753235, -0.007034848444163799, 0.04467913508415222, -0.007553420960903168, -0.04462454840540886, -0.003626597346737981, 0.025587469339370728, -0.010507920756936073, -0.018054518848657608, 0.010364631190896034, -0.0016196868382394314, 0.00016248042811639607, 0.011340366676449776, -0.03398016095161438, 0.005885118152946234, 0.008965848945081234, 0.009375249035656452, 0.010787677019834518, -0.022298626601696014, -0.05666089430451393, -0.020251629874110222, -0.05136599391698837, 0.017754292115569115, -0.0415131114423275, 0.04945546016097069, 0.0006149521796032786, -0.05344028398394585, -0.00014499566168524325, -0.045825451612472534, -0.021015841513872147, -0.001722036744467914, -0.0201015155762434, -0.008112933486700058, -0.0019378244178369641, 0.01291655469685793, 0.06550392508506775, 0.014615562744438648, 0.04596192017197609, 0.016826320439577103, -0.015407068654894829, 0.04334176331758499, -0.005110670812427998, 0.017972638830542564, -0.01754959300160408, -0.024263745173811913, -0.0012734030606225133, -0.04459725320339203, -0.005509835202246904, -0.024441150948405266, 0.004680801182985306, 0.04593462496995926, 0.0380195677280426, 0.011538242921233177, 0.0010055875172838569, -0.013414657674729824, 0.022639792412519455, -0.027347886934876442, 0.08952202647924423, -0.014001463539898396, -0.03378910571336746, -0.01718113385140896, 0.031414590775966644, -0.028357740491628647, 0.068342424929142, 0.005670183338224888, 0.020865729078650475, -0.038756486028432846, -0.001960000256076455, 0.020838435739278793, -0.0009143255883827806, -0.02566934935748577, -0.0009927938226610422, -0.00801058392971754, -0.03711888939142227, 0.01978764310479164, -0.06326587498188019, 0.020306216552853584, -0.021643588319420815, -0.02676108106970787, 0.0183547455817461, -0.021206894889473915, 0.001458485727198422, 0.009388895705342293, -0.011265309527516365, 0.006622036918997765, 0.03359805420041084, -0.03392557427287102, 0.0036811840254813433, 0.028466911986470222, 0.061409927904605865, 0.0008064317516982555, 0.012377511709928513, 0.009040906094014645, 0.050519898533821106, -0.022735320031642914, -0.06479429453611374, -0.032779254019260406, -0.04923711344599724, -0.000881061889231205, -0.008147050626575947, 0.023008253425359726, -0.06577685475349426, 0.0657222718000412, 0.04421514645218849, -0.053140055388212204, 0.0038142388220876455, 0.0030824372079223394, -0.07374650239944458, -0.03258820250630379, 0.005748651456087828, -0.003633420681580901, -0.020715614780783653, 0.002077702432870865, -0.031414590775966644, -0.02427739091217518, -0.010746737010776997, 0.012131872586905956, 0.007321428041905165, 0.07232724875211716, -0.04023032635450363, 0.00872703269124031, 0.005195962265133858, -0.008651976473629475, -0.028494205325841904, 0.027184126898646355, -0.021029489114880562, 0.030814137309789658, -0.05390426889061928, 0.035890690982341766, 0.013380540534853935, 0.034526024013757706, -0.03367993235588074, -0.013987816870212555, -0.027279654517769814, -0.007123551331460476, 0.004097406752407551, -0.011742942966520786, 0.008235753513872623, 0.04156769812107086, -0.003565187333151698, -0.039165887981653214, 0.007573890965431929, 0.015052255243062973, -0.047626812011003494, 0.04478830844163895, 0.003411662532016635, -0.017849819734692574, 0.032997600734233856, -0.0016700088744983077, -0.01611669361591339, 0.020742908120155334, -0.013612533919513226, -0.007689887657761574, -0.032724667340517044, 0.039411526173353195, -0.0055575985461473465, -0.00429528346285224, -0.02467314340174198, 0.010030288249254227, 0.025355476886034012, -0.04530688002705574, -0.02072926238179207, 0.03971175104379654, 0.038510847836732864, 0.04525229334831238, 0.009184195660054684, -0.011415422894060612, 0.019269069656729698, 0.009914292022585869, 0.022926373407244682, -0.020865729078650475, -0.0021544648334383965, 0.02974969893693924, 1.384655297442805e-05, -0.015093195252120495, -0.03215150907635689, 0.027593526989221573, 0.040312204509973526, 0.0021834641229361296, 0.0036914190277457237, 0.0007079200004227459, 0.07571161538362503, 0.0032803136855363846, -0.012739147990942001, 0.012036345899105072, -0.022134866565465927, 0.0363546758890152, -0.05502329394221306, -0.00657427404075861, 0.004749034531414509, 0.028685258701443672, 0.02629709616303444, 0.007150844670832157, 0.012015875428915024, 0.050274260342121124, -0.024850551038980484, 0.02231227420270443, 0.018504858016967773, 0.026706494390964508, 0.027470707893371582, -0.022571559995412827, 0.058735184371471405, -0.017699705436825752, -0.07915057241916656, -0.018900610506534576, -0.03105977736413479, -0.058516837656497955, 0.012902908027172089, -0.026037808507680893, -0.008078817278146744, -0.01353747770190239, 0.05202103033661842, -0.02763446792960167, 0.004994674120098352, -0.016007520258426666, 0.044488079845905304, -0.012206928804516792, 0.0319877490401268, 0.04991944879293442, -0.02190287411212921, -0.03485354408621788, -0.06943415850400925, 0.040093857795000076, -0.04255025461316109, 0.011176606640219688, -0.0015633944422006607, -0.01839568465948105, 0.031632937490940094, 0.0639754980802536, 0.019801290705800056, -0.05709758400917053, 0.009409365244209766, -0.03818332776427269, -0.004093995317816734, 0.04121288284659386, 0.005185727030038834, 0.024918783456087112, -0.028030220419168472, 0.008897616527974606, 0.004261166788637638, -0.004984438885003328, 0.00463644927367568, 0.011354013346135616, 0.05698841065168381, -0.01293020136654377, 0.031223535537719727, 0.04268672317266464, 0.03258820250630379, -0.048281848430633545, 0.03550858423113823, 0.026256155222654343, -0.0023557529784739017, -0.04241378977894783, 0.002323342254385352, 0.005840766243636608, 0.01667620614171028, -0.038074154406785965, -0.00871338602155447, 0.014233455993235111, 0.031141655519604683, 0.00932066235691309, -0.06086406111717224, 0.03493542596697807, 0.02000598981976509, 0.019214482977986336, 0.051857270300388336, -0.04620755836367607, -0.025232655927538872, 0.02934029884636402, 0.026365328580141068, -0.025914989411830902, -0.019924109801650047, -0.03550858423113823, -0.023144720122218132, -0.010903674177825451, 0.026269802823662758, -0.023349419236183167, -0.015952933579683304, -0.004527276381850243, -0.020278923213481903, -0.05035613849759102, 0.028112100437283516, 0.008883969858288765, -0.049619220197200775, 0.026215216144919395, 0.017808878794312477, -0.04241378977894783, 0.034553319215774536, -0.07434695214033127, 0.019842229783535004, -0.03436226770281792, 0.023267539218068123, -0.05567833408713341, -0.014915788546204567, 0.000462706753751263, -0.002430809661746025, -0.003957528620958328, -0.0450066514313221, -0.03247902914881706, 0.0018798260716721416, 0.05281253904104233, -0.00415540486574173, -0.042113564908504486, -0.012670914642512798, 0.056933823972940445, -0.018996138125658035, 0.05477765575051308, -0.0005833943141624331, -0.012466215528547764, 0.023704232648015022, 0.023008253425359726, -0.013066668063402176, 0.00721225468441844, 0.03736452758312225, -0.001951470971107483, 0.0067789736203849316, -0.03987551108002663, -0.03065037727355957, -0.007260018028318882, -0.0038824721705168486, -0.0003995909937657416, 0.05245772376656532, 0.046316731721162796, -0.05797097086906433, -0.005073142237961292, 0.010214517824351788, -0.002338694641366601, -0.056060440838336945, -0.001481514540500939, 0.0028487383387982845, 0.02972240559756756, 0.03913859277963638, 0.04637131839990616, -0.03578151762485504, -0.008706563152372837, 0.005642889998853207, 0.004059878643602133, -0.030131803825497627, 0.02112501487135887, -0.008235753513872623, -0.015639061108231544, 0.060918647795915604, 0.024727730080485344, 0.0037630638107657433, 0.006369573995471001, -0.010412394069135189, 0.013598887249827385, -0.013469244353473186, -0.03179669380187988, 0.009054552763700485, 0.05024696886539459, -0.012084108777344227, 0.016143986955285072, -0.03728264942765236, 0.0075943609699606895, -0.025341829285025597, 0.058080144226551056, 0.013735353946685791, 0.022203100845217705, -0.023690585047006607, 0.017686059698462486, 0.030350150540471077, 0.01783617213368416, -0.013360070995986462, 0.03769204765558243, -0.016375981271266937, 0.04571627825498581, -0.025287242606282234, -0.02663826197385788, -0.001462750369682908, -0.03307948261499405, 0.0008213577675633132, -0.007928703911602497, -0.06850618869066238, 0.018805084750056267, -0.017699705436825752, 0.01689455285668373, 0.004360104911029339, -0.019610237330198288, 0.004564804490655661, -0.044761013239622116, 0.04855478182435036, -0.01120389997959137, 0.03690054267644882, 0.028494205325841904, -0.0019292952492833138, -0.019487416371703148, -0.02128877490758896, 0.0315510556101799, 0.008467746898531914, -0.0049366760067641735, -0.004899147432297468, 0.06801490485668182, -0.025464650243520737, -0.0026713318657130003, -0.007915057241916656, -0.007403308060020208, -0.00390635384246707, -0.014697442762553692, -0.035808809101581573, -0.011026493273675442, 0.006594744045287371, 0.04959192872047424, -0.046289440244436264, -0.01898249052464962, 0.0060898177325725555, -0.009655005298554897, -0.022762613371014595, -0.01995140314102173, 0.03769204765558243, -0.009825588203966618, -0.02685660868883133, -3.1651165954826865e-06, 0.007580714300274849, -0.016853613778948784, 0.002002645982429385, -0.03799227625131607, -0.008617859333753586, 0.004175874870270491, 0.007348721381276846, 0.0025229244492948055, -0.012022699229419231, 0.039657168090343475, -0.034962717443704605, -0.007710357662290335, 0.03108707070350647, 0.014547329396009445, 0.030077217146754265, -0.02863067202270031, -0.04620755836367607, 0.0052369022741913795, 0.002659390913322568, -0.040967244654893875, -0.006850618403404951, -0.007880941033363342, 0.0015096607385203242, 0.025027956813573837, 0.008242577314376831, 0.038483552634716034, -0.02433197759091854, -0.0415131114423275, -0.008604212664067745, -0.0034304268192499876, 0.038292501121759415, 0.013844527304172516, -0.027457060292363167, -0.0209749024361372, 0.009996171109378338, -0.01194764208048582, 0.007130374666303396, 0.00352083588950336, -0.01978764310479164, 0.012984788045287132, 0.02505525015294552, 0.017413126304745674, -0.06708693504333496, 0.015584474429488182, -0.00986652821302414, 0.022298626601696014, -0.008051523938775063, 0.011142490431666374, -0.006120522506535053, 0.006082994397729635, -0.005472306627780199, -0.009771001525223255, 0.04145852476358414, 0.026965782046318054, 0.0367913693189621, -0.015925640240311623, 0.03599986433982849, -0.005601949989795685, 0.04421514645218849, -0.028466911986470222, 0.015693647786974907, -0.03086872398853302, -0.039848219603300095, 0.0052266670390963554, -0.013196310959756374, 0.05079283192753792, 0.005540539976209402, -0.003971175290644169, 0.04724470525979996, 0.02396351844072342, 0.014465449377894402, 0.02034715563058853, 0.013612533919513226, -0.00871338602155447, -0.014588269405066967, -0.024468444287776947, -0.009388895705342293, -0.04170416295528412, -0.034526024013757706, -0.0205382090061903, 0.0024768670555204153, -0.011831645853817463, 0.03395286574959755, 0.0024376329965889454, 0.0007057876791805029, 0.004875265993177891, 0.0007224195869639516, 0.0022073457948863506, 0.027034014463424683, 0.016225866973400116, 0.0013373717665672302, 0.004926440771669149, -0.015761882066726685, 0.00634910399094224, 0.001500278594903648, 0.00852915644645691, 0.016594326123595238, -0.023158365860581398, 0.014206163585186005, -0.007321428041905165, -0.021275127306580544, 0.0016947434050962329, -0.005677006673067808, 0.015175075270235538, 0.021616294980049133, -0.0024359270464628935, 0.006239931099116802, -0.0004678242257796228, -0.003288842737674713, 0.009757354855537415, -0.004670565947890282, -0.003943881951272488, -0.00588852958753705, -0.005922646261751652, -0.02579217031598091, 0.011094726622104645, 0.025601116940379143, -0.015516242012381554, -0.023376712575554848, -0.04216815158724785, 0.045634400099515915, 0.012800558470189571, -0.012295631691813469, -0.008522333577275276, 0.03065037727355957, 0.006611802149564028, -0.054996002465486526, -0.0027805049903690815, 0.06130075454711914, -0.0051686689257621765, -0.04017573967576027, 0.02268073335289955, -0.009156902320683002, 0.0631021112203598, 0.006915440317243338, -0.010992377065122128, 0.02717048116028309, -0.00930701568722725, 0.002365987980738282, 0.004288460128009319, 0.002077702432870865, 0.03447143733501434, 0.017031019553542137, 0.0035788340028375387, -0.062064968049526215, 0.018245572224259377, 0.00760118430480361, -0.01976034976541996, 0.015611767768859863, 0.041867922991514206, 0.005861236248165369, 0.012616327963769436, 0.022516973316669464, 0.007901410572230816, 0.01269820798188448, 0.01686725951731205, -0.0006264665280468762, 0.0037664754781872034, -0.007464717607945204, 0.028985485434532166, -0.015911994501948357, -0.006956379860639572, -0.0015557181322947145, -0.0036914190277457237, -0.03040473721921444, 0.02309013344347477, -0.005465483292937279, -0.020156102254986763, 0.0027634466532617807, -0.005830531474202871, -0.0009791471529752016, -0.04023032635450363, 0.011729296296834946, 0.014001463539898396, -0.034307681024074554, -0.05354945734143257, 0.016662560403347015, 0.0024205746594816446, -0.004626214504241943, 0.006819913629442453, -0.01711289957165718, 0.006403690669685602, -0.012841498479247093, -0.0010448216926306486, -0.025437356904149055, 0.014956728555262089, -0.04978298023343086, -0.02955864556133747, 0.007867294363677502, 0.005202785599976778, -0.024727730080485344, 0.01888696476817131, -0.009184195660054684, -0.024700436741113663, -0.01277326513081789, -0.016266807913780212, -0.0019088252447545528, -0.026378976181149483, 0.02934029884636402, -0.01779523305594921, -0.005076554138213396, -0.007191784679889679, -0.016321394592523575, -0.008256223984062672, -0.008065170608460903, -0.0250825434923172, -0.025751229375600815, 0.011169783771038055, -0.023226598277688026, 0.003162611275911331, -0.021698174998164177, 0.002925500739365816, -0.0034338384866714478, -0.02187558077275753, 0.0033383117988705635, 0.07811342924833298, -0.030568497255444527, -0.014247102662920952, 0.008078817278146744, -0.01562541536986828, -0.007321428041905165, 0.024782316759228706, 0.01465650275349617, -0.06299293786287308, -0.02345859259366989, -0.020592795684933662, 0.009416189044713974, 0.03796498104929924, -0.002367693930864334, 0.006939321756362915, -0.01255491841584444, -0.020824788138270378, 0.03157835081219673, -0.027907399460673332, 0.021520767360925674, -0.007184961345046759, -0.006611802149564028, -0.0032291386742144823, 0.0004211271007079631, 0.05556916072964668, -0.047381170094013214, -0.015243308618664742, 0.07036212831735611, -0.01764511875808239, -0.019282717257738113, 0.020388096570968628, -0.002899913117289543, -0.004407868254929781, 0.03534482419490814, 0.006154639180749655, -0.013360070995986462, 0.013837703503668308, 0.01162012293934822, 0.00852915644645691, 0.01851850561797619, 0.0029272064566612244, -0.008522333577275276, 0.0012571976985782385, -0.011865762993693352, 0.00877479650080204, -0.0075261276215314865, 0.03660031780600548, 0.036081742495298386, 0.005458660423755646, -0.014888495206832886, -0.042386494576931, -0.05011050030589104, 0.0026764492504298687, 0.026187922805547714, 0.0015795998042449355, 0.031114362180233, 0.00011023935076082125, -0.00525054894387722, 0.009873352013528347, -0.01275961846113205, -0.038292501121759415, -0.0419498048722744, -0.0008051524055190384, 0.007819530554115772, 0.01954200305044651, 0.011340366676449776, 0.0035413058940321207, 0.0186140313744545, -0.006908616982400417, 0.004882089328020811, 0.0367913693189621, -0.026406269520521164, -0.012090932577848434, 0.0166489128023386, 0.023949870839715004, 0.032315269112586975, -0.03335241228342056, -0.027811873704195023, -0.04301424324512482, 0.012732325121760368, 0.03176940232515335, 0.013687590137124062, -0.037200767546892166, 0.03559046611189842, -0.014165223576128483, 0.026119688525795937, -0.022612499073147774, -0.03709159418940544, -0.025819461792707443, -0.008733856491744518, 0.025901341810822487, -0.01348971389234066, -0.007635300979018211, 0.015911994501948357, -0.00036611405084840953, -0.018832378089427948, 0.004049643408507109, -0.032779254019260406, -0.004755857866257429, 0.003503777552396059, -0.026938488706946373, 0.0052266670390963554, 0.02349953167140484, 0.004223638214170933, -0.03643655776977539, -0.01988316886126995, 0.00587488291785121, -0.027238713577389717, 0.017931697890162468, 0.010801323689520359, -0.010173577815294266, 0.004080348648130894, -0.06151910126209259, -0.0024649263359606266, -0.001286196755245328, -0.01050109788775444, 0.014219810254871845, 0.0350445993244648, 0.00494008744135499, 0.05122952535748482, -0.007184961345046759, -0.006086406297981739, -0.0016248043393716216, -0.02371787838637829, -0.04847290366888046, 0.03346158564090729, -0.04817267507314682, 0.01954200305044651, 0.014629209414124489, -0.0027651526033878326, -0.003977998625487089, 0.00031238034716807306, -0.03157835081219673, 0.010303220711648464, 0.008419983088970184, 0.029886163771152496, -0.00031195388874039054, 0.048936888575553894, -0.02255791239440441, -0.03490813076496124, -0.018095457926392555, -0.02564205601811409, 0.0017484771087765694, 0.0046159797348082066, 0.006639095488935709, -0.029476765543222427, -0.014151576906442642, 0.02931300550699234, -0.03127812221646309, -0.026774728670716286, -0.009948408231139183, 0.014206163585186005, 0.06796032190322876, -0.007908234372735023, 0.01542071532458067, 0.042495667934417725, 0.024563970044255257, 0.029231125488877296, -0.014847556129097939, -0.06823325157165527, -0.01699008047580719, -0.01275961846113205, -0.0017049784073606133, -0.00018327025463804603, -0.011913525871932507, -0.020033283159136772, -7.425696821883321e-05, 0.040066566318273544, 0.00782635435461998, 0.01888696476817131, 0.004257754888385534, 0.0010303221642971039, 0.016485154628753662, 0.01978764310479164, 0.004250931553542614, 0.046944476664066315, 0.030814137309789658, 0.014451802708208561, 0.011852116324007511, 0.012445745058357716, -0.021711820736527443, 0.006004526279866695, -0.015243308618664742, 0.02240779995918274, 0.0136330034583807, -0.01795899122953415, 0.007928703911602497, 0.0011667886283248663, 0.030786843970417976, 0.034089334309101105, 0.01745406538248062, 0.005107258912175894, -0.02156170830130577, 0.012500331737101078, -0.04825455695390701, 0.010153108276426792, 0.04721741005778313, 0.03179669380187988, 0.05666089430451393, -0.02498701773583889, 0.009702768176794052, -0.010248634964227676, -0.020169749855995178, -0.019473770633339882, 0.022858139127492905, 0.025532882660627365, 0.010030288249254227, 0.0367094911634922, -0.02542370930314064, 0.07451070845127106, -0.012520802207291126, 0.02766176126897335, 0.011190253309905529, -0.019214482977986336, 0.012513978406786919, 0.022789906710386276, 0.020183395594358444, -0.0003586510429158807, -0.04506123811006546, 0.06326587498188019, -0.005533716641366482, 0.018341097980737686, 0.04481559991836548, -0.008549626916646957, 0.0008081375854089856, 0.014247102662920952, -0.015802821144461632, -0.0079969372600317, 0.012984788045287132, 0.015120488591492176, -0.013517007231712341, -0.0065367454662919044, 0.035181064158678055, 0.014397216029465199, -0.0029135597869753838, 0.005462071858346462, -0.02797563374042511, 0.01851850561797619, 0.052512310445308685, 0.02433197759091854, -0.03226068243384361, 0.03482625260949135, 0.018709557130932808, 0.03911130130290985, 0.00486161932349205, 0.012984788045287132, 0.005182315595448017, 0.02816668711602688, 0.002234638901427388, -0.006987085100263357, 0.019965048879384995, -0.016471507027745247, 0.009470775723457336, 0.011504126712679863, 0.0087611498311162, 0.016157634556293488, -0.02433197759091854, -0.027770934626460075, -0.03597256913781166, -0.014451802708208561, 0.005035614129155874, 0.010091697797179222, -0.0008179461001418531, -0.011169783771038055, -0.013046197593212128, -0.002986910520121455, -0.013387364335358143, 0.006311575882136822, -0.02632438950240612, -0.01854579709470272, 0.011169783771038055, 0.01370806060731411, 0.010494274087250233, -0.00010949304851237684, 0.008303986862301826, 0.03395286574959755, 0.029394885525107384, -0.0012606093659996986, -0.010043934918940067, -0.0010388512164354324, -0.024632204324007034, -0.024850551038980484, 0.02228498086333275, -0.024495737627148628, -0.0032956660725176334, -0.02561476267874241, 0.0004750740190502256, -0.0266109686344862, -0.010248634964227676, -0.0367094911634922, 0.010562507435679436, -0.01544800866395235, -0.005424543749541044, 0.018873317167162895, 0.02041538991034031, -0.02274896577000618, 0.02299460582435131, -0.017003726214170456, -0.029831577092409134, 0.02296731248497963, -0.031441882252693176, -0.021916519850492477, 0.00814022682607174, -0.005260783713310957, -0.028521498665213585, 0.008283516392111778, -0.03348888084292412, 0.03960258141160011, -0.004701271187514067, 0.03463519737124443, 0.019364597275853157, 0.017495006322860718, -0.01813639886677265, -0.011224370449781418, 0.023049192503094673, -0.022544266656041145, 0.06359338760375977, 0.0019378244178369641, -0.0008836206397973001, -0.030295563861727715, -0.005219843704253435, -0.03291572257876396, 0.038510847836732864, -0.0038858838379383087, 0.041594989597797394, 0.011558713391423225, 0.009129608981311321, 0.05379509553313255, 0.011729296296834946, 0.014151576906442642, -0.015052255243062973, -0.015024961903691292, -0.005049260798841715, 0.013209957629442215, -0.010357807390391827, 0.01956929638981819, 0.015843762084841728, 0.016880907118320465, -0.033188652247190475, 0.0029988514725118876, 0.011476833373308182, 0.005922646261751652, -0.056060440838336945, -0.02134336158633232, 0.030268270522356033, 0.02822127379477024, 0.005680418107658625, 0.024700436741113663, -0.01589834690093994, 0.002679860917851329, -0.010978730395436287, 0.035399410873651505, -0.048309143632650375, 0.00463644927367568, 0.00010848021338460967, 0.02931300550699234, 0.03269737586379051, 0.006250165868550539, 0.028385033831000328, 0.018504858016967773, 0.003933647181838751, 0.0023284596391022205, -0.0006780679686926305, 0.0035174242220818996, 0.011408600024878979, -0.015502595342695713, -0.026815667748451233, 0.04656236991286278, -0.016580680385231972, -0.024468444287776947, 0.0021834641229361296, 0.01608940027654171, -0.012268338352441788, -0.014533682726323605, -0.0367913693189621, 0.006775562185794115, -0.02168452739715576, -0.016253160312771797, -0.02819398045539856, -0.001092584920115769, 0.013196310959756374, -0.025601116940379143, 0.03395286574959755, 0.02107042819261551, -0.002104995772242546, -0.009545831941068172, -0.01159282959997654, -0.019460123032331467, 0.009996171109378338, -0.011510949581861496, -0.007805883884429932, -0.017495006322860718, 0.027429766952991486, -0.022325919941067696, 0.014479096047580242, 0.011429069563746452, 0.022080279886722565, -0.00391317717730999, 0.009600418619811535, 0.004220226779580116, -0.006314987316727638, 0.05082012712955475, 0.0025246303994208574, 0.024482090026140213, 0.00760800763964653, 0.026338035240769386, 0.008802089840173721, 0.03354346752166748, 0.012145519256591797, -0.026474501937627792, 0.01733124628663063, 0.0055951266549527645, -0.0009612359572201967, -0.02887631207704544, 0.001180435298010707, 0.018654970452189445, -0.031660228967666626, -0.007150844670832157, -0.004663742613047361, 0.004073525313287973, -0.028794432058930397, -0.0019292952492833138, -0.001096849562600255, 0.0011335249291732907, -0.049400873482227325, -0.006884735077619553, 0.006881323643028736, 0.010337337851524353, 0.00020064841373823583, -0.01655338704586029, 0.03796498104929924, 0.01596658118069172, 0.004994674120098352, -0.0034543084912002087, 0.004639861173927784, 0.0402030311524868, -0.018122751265764236, 0.009136432781815529, 0.0067994436249136925, -0.01565270870923996, -0.01655338704586029, -0.016444213688373566, 0.01089002750813961, -0.03771934285759926, 0.0367094911634922, 0.015038608573377132, -0.018190985545516014, 0.020210688933730125, 0.017153840512037277, 0.036982424557209015, -0.06386632472276688, -0.0019889993127435446, -0.013967346400022507, -0.0012094343546777964, 0.003974586725234985, -0.03269737586379051, -0.006622036918997765, 0.03436226770281792, -0.04290506988763809, 0.013482891023159027, -0.04380574822425842, -0.025505589321255684, 0.01143589336425066, 0.0190097838640213, 0.018927903845906258, 0.007567067630589008, 0.024850551038980484, -0.03935693949460983, -0.007955997250974178, -0.022448740899562836, 0.02128877490758896, -0.012473038397729397, -0.014042403548955917, 0.026406269520521164, 0.003411662532016635, -0.02999533712863922, -0.017726998776197433, -0.01895519718527794, -0.02707495540380478, -0.018504858016967773, -0.019241776317358017, -0.016321394592523575, 0.01973305642604828, 0.015161428600549698, -0.007785413879901171, -0.002577511128038168, 0.008065170608460903, -0.02822127379477024, 0.032943014055490494, 0.0023779289331287146, -0.017604179680347443, -0.016157634556293488, -0.013592063449323177, 0.009225135669112206, 0.02240779995918274, -0.020674675703048706, 0.021820994094014168, 0.010548860765993595, 0.0064412192441523075, -0.006079582963138819, 0.023513179272413254, 0.013885467313230038, 0.009764178656041622, -0.0019275894155725837, 0.02228498086333275, -0.029258418828248978, -0.01910531148314476, -0.009716414846479893, -0.012036345899105072, -0.002043585991486907, 0.01089002750813961, 0.016362333670258522, 0.03425309434533119, -0.045607104897499084, -0.010200871154665947, -0.029149245470762253, 0.011108373291790485, -0.023663291707634926, 0.03280654922127724, -1.7498097804491408e-05, 0.02190287411212921, 0.008979495614767075, 0.013571593910455704, -0.00549277663230896, -0.0008844735566526651, 0.004274813458323479, 0.016512447968125343, -0.015229661948978901, -0.056933823972940445, -0.05043802037835121, -0.045634400099515915, -0.04721741005778313, 0.002662802580744028, -0.012568565085530281, -0.014247102662920952, 0.015830114483833313, -0.002168111503124237, 0.016485154628753662, 0.008672446012496948, -0.02175276167690754, -0.018846023827791214, -0.02479596436023712, 0.0012358748354017735, 0.0083244564011693, 3.912750617018901e-05, 0.009798294864594936, 0.02586040273308754, -0.00029596174135804176, 0.006871088407933712, -0.027702700346708298, 0.01973305642604828, -0.025805816054344177, 0.011551889590919018, -0.006352515891194344, -0.015270601958036423, -0.03062308393418789, 0.001891766907647252, 0.02863067202270031, 0.020237982273101807, 0.006734622176736593, -0.025314535945653915, 0.013291837647557259, 0.0027805049903690815, -0.013298660516738892, -0.0069632031954824924, 0.028903605416417122, -0.00415540486574173, 0.026051456108689308, -0.012343395501375198, 0.031196242198348045, 0.016375981271266937, -0.0009561184560880065, 0.02860337868332863, 0.02333577163517475, 0.0031677286606281996, 0.02294001914560795, -0.023608705028891563, -0.019773997366428375, -0.0026099218521267176, -0.046535078436136246, -0.008911263197660446, 0.0021954048424959183, 0.04350552335381508, 0.018627677112817764, -0.02586040273308754, 0.02934029884636402, 0.012739147990942001, -0.013373717665672302, 0.011135666631162167, -0.01795899122953415, 0.008031053468585014, -0.024468444287776947, 0.014042403548955917, -0.004264578223228455, 0.007082611788064241, -0.012268338352441788, 0.00822893064469099, 0.031878575682640076, -0.008767972700297832, 0.03987551108002663, -0.007799060549587011, 0.02156170830130577, 0.0060727596282958984, -0.010514744557440281, -0.013783116824924946, 0.013783116824924946, -0.003270078683272004, -0.017276659607887268, 0.0100507577881217, -0.010780854150652885, 0.005926058162003756, -0.006826736964285374, -0.001264873892068863, 0.03657302260398865, 0.03621821105480194, 0.01845027133822441, 0.0183547455817461, -0.011831645853817463, -0.01176341250538826, 0.006601567380130291, 0.0033417234662920237, 0.015038608573377132, 0.0016418626764789224, 0.03649114444851875, 0.017222072929143906, -0.019091663882136345, -0.007669417653232813, 0.0003049173392355442, 0.01442450936883688, 0.0010832028929144144, -0.027457060292363167, 0.013209957629442215, 0.011108373291790485, 0.027689054608345032, 0.011347189545631409, -0.0075943609699606895, 0.03463519737124443, 0.01486120279878378, 0.018996138125658035, 0.009614065289497375, 0.05032884702086449, -0.019623883068561554, -0.021179601550102234, -0.013018904253840446, 0.03624550253152847, -0.005680418107658625, 0.006601567380130291, -0.004042820073664188, 0.019269069656729698, -0.012084108777344227, -0.025505589321255684, -0.02194381318986416, 0.016853613778948784, -0.008263046853244305, -0.035890690982341766, -0.007915057241916656, 0.010432864539325237, -0.019364597275853157, 0.01602116785943508, 0.040039271116256714, 0.002475161338225007, -0.00399164529517293, -0.027088601142168045, -0.0005680418107658625, -0.003111436264589429, 0.009211488999426365, -0.0038961186073720455, 0.037146180868148804, -0.012043168768286705, 0.0032496086787432432, -0.024045398458838463, -0.033215947449207306, -0.019610237330198288, 0.008570096455514431, -0.04549793154001236, 0.026215216144919395, 0.015789175406098366, -0.0014533682260662317, 0.021247833967208862, -0.017999932169914246, 0.0047797393053770065, -0.004926440771669149, 0.006492394022643566, -0.00416905153542757, -0.005383603740483522, 0.0071576680056750774, 0.026338035240769386, 0.023936225101351738, 0.016935493797063828, 0.0350445993244648, 0.028248567134141922, 0.01786346547305584, 0.015407068654894829, -0.01316219475120306, -0.005601949989795685, -0.019801290705800056, 0.01633504033088684, -0.013325953856110573, -0.02253061905503273, -0.02865796536207199, 0.006724386941641569, 0.02950405888259411, 0.0038927069399505854, 0.014697442762553692, 0.00658109737560153, -0.009095492772758007, 0.02788010612130165, 0.02066102810204029, -0.019037077203392982, 0.006584508810192347, -0.0484183169901371, -0.01543436199426651, 0.011831645853817463, 0.002297754865139723, 0.006386632565408945, -0.013592063449323177, -0.060481954365968704, -0.014465449377894402, -0.011476833373308182, -0.020265275612473488, -0.020579148083925247, -0.022380506619811058, 0.016785379499197006, 0.009614065289497375, -0.009811941534280777, -0.002775387605652213, -0.011545066721737385, -0.025723936036229134, 0.005298311822116375, 0.018777791410684586, -0.007239548023790121, 0.044051386415958405, -0.03239714726805687, -0.05709758400917053, -0.0388929545879364, 0.013189488090574741, 0.01043968740850687, -0.013414657674729824], "index": 67}, {"title": "Prince Edward\u2014Hastings", "text": "Prince Edward\u2014Hastings is a federal electoral district in Ontario, Canada, that has been represented in the House of Commons since 1968. Its population in 2006 was 113,227.", "vector": [0.010339894331991673, 0.07722382992506027, -0.02827201969921589, -0.016543831676244736, 0.029038473963737488, -0.0029139702674001455, 0.013224942609667778, -0.016890903934836388, -0.02940000779926777, -0.0149675402790308, 0.009906052611768246, -0.02358652837574482, -0.026232963427901268, -0.0027458565309643745, -0.016601676121354103, 0.03138121962547302, -0.02921201102435589, -0.025394203141331673, 0.015545995905995369, 0.016717368736863136, 0.00785253569483757, -0.05692003667354584, -0.07369524985551834, -0.021561933681368828, 0.01326832640916109, 0.02902401238679886, -0.02394806407392025, 0.014504775404930115, 0.014808464795351028, 0.0177875105291605, -0.05087517574429512, 0.012133107520639896, 0.0362691693007946, 0.020679788663983345, -0.002641011495143175, 0.03569071367383003, 0.03184398263692856, -0.042024802416563034, 0.027751410380005836, -0.038091305643320084, 0.02415052242577076, -0.025914812460541725, -0.011084656231105328, 0.012270490638911724, 0.022935766726732254, -0.022357311099767685, -0.043355248868465424, 0.007306617684662342, -0.010643583722412586, 0.010723121464252472, 0.02789602428674698, 0.009515595622360706, -0.06814207136631012, 0.032277826219797134, -0.003864806843921542, 0.022588692605495453, 0.025495432317256927, 0.08167793601751328, -0.007375309709459543, 0.007411463186144829, -0.05801910161972046, 0.007447616662830114, -0.01833704486489296, 0.03349258005619049, 0.00045892319758422673, 0.06536548584699631, -0.00850329827517271, 0.029877234250307083, 0.011301577091217041, -0.01852504163980484, 0.006540164351463318, 0.012841715477406979, 0.05859755724668503, 0.06172121688723564, -0.014468621462583542, 0.03719469904899597, 0.011923417448997498, 0.006084630265831947, -0.03774423152208328, 0.00033328987774439156, -0.004389032255858183, -0.024005908519029617, 0.007910381071269512, 0.023311762139201164, -0.036934394389390945, -0.0025379741564393044, 0.013470785692334175, -0.06270459294319153, -0.027187414467334747, 0.05804802477359772, -0.024179445579648018, 0.01982656680047512, 0.04112819582223892, -0.036384861916303635, 0.016775213181972504, 0.013167096301913261, 0.0217210091650486, -0.003253812901675701, 0.0265944991260767, 0.02040502242743969, 0.01631244830787182, 0.03279843553900719, 0.023976987227797508, 0.042198337614536285, 0.05558958649635315, -0.027071723714470863, -0.05686219036579132, -0.03138121962547302, 0.055300358682870865, 0.02598712034523487, -0.010889427736401558, 0.03424457460641861, 0.015184461139142513, 0.010065128095448017, 0.004128727130591869, -0.026334192603826523, 0.01587860658764839, 0.05590773746371269, 0.020260408520698547, 0.028966166079044342, -0.014425237663090229, 0.023470837622880936, 0.03759961575269699, -0.024439750239253044, 0.016124451532959938, -0.0030477382242679596, 0.016326909884810448, 0.02791048400104046, -0.01650044694542885, -0.021966852247714996, -0.020954554900527, 0.026623420417308807, 0.012581409886479378, -0.0790170431137085, 0.027635717764496803, 0.03612455353140831, 0.02148962765932083, 0.027635717764496803, 0.009031138382852077, 0.03195967525243759, -0.044772468507289886, 0.0113305002450943, 0.03048461303114891, -0.01008682046085596, 0.03386857733130455, 0.021185938268899918, 0.037339311093091965, 0.020867787301540375, -0.012769408524036407, -0.007736844476312399, -0.052841924130916595, -0.0022415155544877052, 0.006146091036498547, -0.018756425008177757, 0.0006222917581908405, -0.02491697669029236, 0.02321053296327591, 0.052870847284793854, -0.02188008464872837, 0.05232131481170654, -0.03945067524909973, -0.00701015954837203, 0.004768643528223038, 0.02360098995268345, -0.014013088308274746, 0.02921201102435589, -0.006626932416111231, 0.020144717767834663, -0.027057262137532234, -0.001793212490156293, 0.024844670668244362, -0.017353668808937073, 0.016688445582985878, -0.023904679343104362, -0.036963317543268204, -0.010151896625757217, -0.012306643649935722, -0.020694250240921974, 0.031207682564854622, -0.008373145014047623, -0.037888843566179276, -0.04063650965690613, 0.0415620394051075, -0.007035466842353344, -0.0211280919611454, -0.01198126282542944, 0.040173742920160294, 0.0021041324362158775, -0.02190900780260563, -0.045379843562841415, -0.052870847284793854, 0.0453220009803772, 0.029081856831908226, 0.03138121962547302, 0.03167044743895531, -0.002360822167247534, 0.020650867372751236, 0.023673297837376595, -0.022530848160386086, 0.021677624434232712, 0.020694250240921974, 0.010267587378621101, 0.006435318849980831, -0.026840342208743095, 0.021561933681368828, 0.04228510707616806, 0.04451216012239456, 0.03681870177388191, 0.010874966159462929, 0.050817329436540604, 0.021851161494851112, -0.03129445016384125, 0.0029826618265360594, 0.02264653891324997, -0.04075219854712486, 0.058076947927474976, 0.008640681393444538, 0.021894546225667, 0.0052567156963050365, -0.004374570678919554, 0.07126573473215103, 0.011670342646539211, -0.001473254174925387, -0.06860484182834625, -0.013644322752952576, 0.056399423629045486, 0.00318150594830513, 0.02096901647746563, -0.010303741320967674, 0.013926319777965546, -0.02056409791111946, -0.0144107760861516, 0.03664516657590866, 0.04676814004778862, -0.04231403023004532, 0.01263202540576458, 0.025668969377875328, -0.03496764227747917, -0.015603841282427311, 0.02452651970088482, -0.01759951375424862, 0.02653665281832218, 0.0038503454998135567, -0.030918454751372337, 0.03242243826389313, 0.07265403121709824, 0.039016831666231155, 0.055097900331020355, 0.02824309654533863, 0.036008864641189575, 0.047433361411094666, -0.05316007509827614, 0.01777304895222187, 0.03372396528720856, 0.018756425008177757, -0.010527892969548702, -0.028286481276154518, -0.0073355408385396, 0.008568374440073967, 0.008900986053049564, -0.02410713955760002, -0.019349342212080956, 0.016760751605033875, 0.012031877413392067, -0.023976987227797508, -0.04419401288032532, 0.03785992041230202, -0.004150419030338526, -0.035285793244838715, -0.0314679853618145, 0.021431781351566315, -0.018944421783089638, -0.006572702433913946, 0.03204644098877907, -0.019595185294747353, 0.011359422467648983, -0.020274870097637177, -0.050209950655698776, -0.04621860757470131, 0.036355938762426376, -0.022371772676706314, -0.0013729282654821873, -0.06831561028957367, -0.014381853863596916, -0.0254809707403183, -0.028763707727193832, 0.018235813826322556, 0.04989179968833923, 0.049862876534461975, -0.0545772910118103, -0.010267587378621101, -0.008553912863135338, 0.05414344742894173, 0.01495307870209217, 0.0012454873649403453, -0.057729873806238174, -0.041619881987571716, -0.03343473747372627, -0.03467841446399689, -0.031091991811990738, -0.033781807869672775, 0.009060061536729336, 0.020621944218873978, -0.0044541084207594395, -0.0004519184585660696, -0.021619779989123344, -0.0460161454975605, 0.024627748876810074, 0.012848946265876293, -0.05504005402326584, -0.003839499317109585, 0.04130173474550247, 0.05281300097703934, 0.009378212504088879, -0.025394203141331673, -0.04361555725336075, 0.0006109937676228583, 0.013658784329891205, -0.013767244294285774, -0.05281300097703934, -0.025770198553800583, -0.030455689877271652, -0.03288520500063896, -0.006120783742517233, 0.019595185294747353, -0.042718950659036636, 0.029645852744579315, 0.015256768092513084, -0.016934288665652275, -0.001983018359169364, -0.04844566062092781, -0.03719469904899597, -0.006532933562994003, -0.03028215281665325, 0.06756361573934555, 0.02098347805440426, 0.012834484688937664, -0.010520662181079388, 0.017888741567730904, 0.053593914955854416, -0.016052143648266792, 0.08023180067539215, 0.005075948312878609, -0.01814904622733593, -0.004880719352513552, 0.03195967525243759, 0.02076655812561512, 0.029472315683960915, -0.012689870782196522, -0.05781664326786995, 0.0005558597040362656, 0.006612471304833889, 0.05501113086938858, -0.021590856835246086, 0.02280561439692974, 0.009255290031433105, -0.05365176126360893, -0.011930647306144238, 0.061258453875780106, -0.07566200196743011, 0.002494589891284704, -0.001463312073610723, -0.020318254828453064, 0.053217917680740356, 0.031178759410977364, 0.015126614831387997, 0.007107773795723915, 0.05307330563664436, -0.006467857398092747, -0.015415842644870281, -0.000620935985352844, 0.0171945933252573, -0.039392828941345215, 0.016008760780096054, 0.025119436904788017, 0.04410724341869354, -0.038640838116407394, -0.00664139399304986, -0.017454899847507477, -0.029645852744579315, -0.014765080064535141, 0.01774412766098976, -0.00955897942185402, 0.0407232791185379, -0.021388396620750427, -0.008734679780900478, 0.023167148232460022, -0.018091199919581413, -0.03624024614691734, -0.006102707237005234, 0.009370981715619564, 0.01628352701663971, 0.04832996800541878, -0.003969651646912098, 0.007386155426502228, 0.002449398161843419, -0.0006751662003807724, 0.0018673271406441927, 0.05258161947131157, -0.053767453879117966, -0.027968330308794975, -0.005741172470152378, -0.016196757555007935, 0.0005667057703249156, 0.04373124614357948, -0.0059327855706214905, 0.003908190876245499, -0.027447720989584923, -0.016326909884810448, 0.022689921781420708, 0.00954451784491539, -0.02433852106332779, 0.0018781732069328427, -0.012660947628319263, 0.022892381995916367, 0.008177916519343853, -0.037339311093091965, 0.013940781354904175, 0.02169208601117134, -0.016688445582985878, -0.004725259728729725, -0.014757849276065826, -0.01188003271818161, -0.0183081217110157, -0.0407232791185379, 0.0177875105291605, -0.02133055217564106, -0.00879975687712431, 0.047057367861270905, -0.003595463465899229, -0.021417319774627686, -0.01814904622733593, -0.01036881748586893, 0.016919827088713646, -0.07566200196743011, 0.037339311093091965, -0.04870596528053284, -0.03143906593322754, 0.0516560897231102, 0.026637881994247437, -0.043846938759088516, -0.04364447668194771, 0.019305957481265068, -0.021446242928504944, -0.0006656759069301188, 0.022487463429570198, -0.02244407869875431, -0.04185126721858978, 0.0250615905970335, 0.013644322752952576, 0.0016476947348564863, 0.027158493176102638, -0.016341371461749077, -0.01814904622733593, 0.013716629706323147, -0.0011523921275511384, -0.05851078778505325, -0.009009446948766708, -0.028864936903119087, -0.016052143648266792, -0.03372396528720856, 0.0400291308760643, 0.01757059060037136, -0.010065128095448017, -0.02117147669196129, 0.020433945581316948, -0.022675462067127228, 0.007924842648208141, -0.01384678203612566, 0.03288520500063896, -0.03407103568315506, -0.0030947376508265734, -0.02809848263859749, 0.023485299199819565, -0.0222416203469038, 0.008676834404468536, 0.016804136335849762, -0.02115701511502266, 0.005636326968669891, 0.03349258005619049, 0.010057897306978703, -0.01929149590432644, 0.03305874019861221, -0.012588640674948692, -0.02490251511335373, -0.01346355490386486, -0.05631265789270401, -0.025741275399923325, 0.009269751608371735, 0.032682742923498154, 0.001627810299396515, 0.014548159204423428, 0.028879398480057716, -0.01477954164147377, 0.03213321045041084, -0.006453395821154118, -0.020477330312132835, -0.026146195828914642, 0.05107763409614563, 0.026073887944221497, 0.009074523113667965, 0.029125241562724113, 0.03739715740084648, -0.03291412442922592, 0.00041124579729512334, -0.007209003437310457, 0.005629096645861864, 0.011988493613898754, -0.06889406591653824, -0.003293581772595644, 0.02957354485988617, 0.03178613632917404, 0.008626219816505909, -0.00018980575259774923, 0.025032667443156242, -0.011713726446032524, 0.036355938762426376, 0.015835223719477654, -0.06415072828531265, 0.02733202837407589, 0.022212697193026543, 0.01644260250031948, -0.014251700602471828, -0.0015835223020985723, 0.01888657733798027, 0.025567740201950073, 0.025683430954813957, 0.0033640810288488865, 0.012805561535060406, -0.017498282715678215, -0.03514118120074272, -0.038640838116407394, 0.0043962630443274975, 0.004280571825802326, 0.016688445582985878, -0.008365915156900883, -0.02264653891324997, 0.00021014208323322237, 0.0215474721044302, 0.014381853863596916, -0.04234295338392258, 0.024280676618218422, 0.021229322999715805, -0.015256768092513084, -0.031525831669569016, -0.010484508238732815, 0.0027567027136683464, 0.01869857870042324, -0.029240932315587997, 0.018944421783089638, 0.03242243826389313, 0.007924842648208141, -0.0005906574660912156, 0.022877920418977737, 0.01570507138967514, -0.017859818413853645, -0.011916186660528183, 0.010180819779634476, 0.009313136339187622, -0.04804074019193649, 0.02526405081152916, -0.007715152110904455, 0.012660947628319263, -0.02990615740418434, -0.0426032580435276, 0.013535861857235432, 0.01684752106666565, 0.02955908328294754, -0.026695728302001953, 0.016052143648266792, 0.027418797835707664, -0.02002902701497078, 0.004135957919061184, -0.02561112307012081, 0.026912648230791092, 0.02653665281832218, 0.02711510844528675, -0.007259618490934372, 0.034302420914173126, 0.011995724402368069, -0.01929149590432644, -0.011265424080193043, 0.019190266728401184, 0.015126614831387997, -0.011308807879686356, -0.010390509851276875, -0.014837387017905712, -0.051164403557777405, -0.026883726939558983, 0.0075199236162006855, 0.02242961712181568, 0.03123660571873188, 0.006417242344468832, 0.00599063141271472, 0.0051735625602304935, 0.03178613632917404, -0.020159179344773293, -0.014063702896237373, 0.031901828944683075, 0.055676355957984924, 0.02806955948472023, 0.05443267524242401, -0.009920514188706875, -0.01667398400604725, -0.02546650916337967, -0.015126614831387997, 0.010723121464252472, -0.019031191244721413, 0.014273392967879772, 0.0013901012716814876, -0.04167772829532623, -0.03389750048518181, 0.008105609565973282, 0.020274870097637177, -0.017816433683037758, 0.021070247516036034, 0.04419401288032532, 0.03719469904899597, 0.032104287296533585, -0.019320419058203697, 0.051742859184741974, -0.027635717764496803, 0.03505441173911095, 0.04847458377480507, 0.0189010389149189, -0.019985642284154892, -0.025104975327849388, -0.011959570460021496, 0.003781653707846999, -0.0008143570739775896, -0.01590752974152565, 0.0031724676955491304, -0.0051988703198730946, 0.0018266544211655855, 0.013810628093779087, 0.018481658771634102, 0.019219188019633293, 0.026334192603826523, 0.0057050189934670925, 0.02018810249865055, 0.03444703295826912, 0.02357206679880619, 0.013441863469779491, -0.03158367797732353, 0.008445451967418194, -0.022950228303670883, -0.008387606590986252, -0.03612455353140831, 0.044425394386053085, -0.006717316340655088, -0.0011677573202177882, 0.05093301832675934, -0.013239403255283833, -0.0015437535475939512, -0.043875861912965775, -0.011207577772438526, -0.03540148586034775, -0.009305905550718307, 0.022675462067127228, -0.034504879266023636, -0.016138913109898567, -0.030455689877271652, -0.046131838113069534, 0.002201746916398406, -0.0009689131984487176, 0.019493956118822098, -0.02524958923459053, 0.009313136339187622, -0.008778064511716366, -0.004808412399142981, -0.013868474401533604, 0.0037780385464429855, 0.017816433683037758, 0.04092573747038841, -0.004801182076334953, -0.009869899600744247, -0.051366861909627914, 0.006475087720900774, 0.003085699398070574, 0.01574845425784588, 0.014757849276065826, -0.02096901647746563, -0.005596558563411236, 0.023615451529622078, 0.012111415155231953, 0.011930647306144238, 0.0055097900331020355, 0.02018810249865055, 9.614565351512283e-05, 0.006026784889400005, 0.018279198557138443, -0.017266901209950447, 0.02861909382045269, 0.007903150282800198, -0.02153301052749157, 0.006207552272826433, 0.018105661496520042, 0.036992236971855164, -0.025365279987454414, 0.004844565875828266, -0.005777325946837664, 0.01963857002556324, 0.0006281666574068367, 0.005357945337891579, 0.02322499454021454, -0.04205372557044029, 0.009804823435842991, 0.018814269453287125, -0.03343473747372627, 0.04381801560521126, 0.0023481682874262333, 0.02601604349911213, -0.00971805490553379, 0.013825089670717716, 0.023152686655521393, -0.00523502379655838, 0.028734784573316574, -0.006999313365668058, 0.01836596615612507, -0.023702220991253853, 0.06970390677452087, 0.009161291643977165, 0.008365915156900883, 0.038264840841293335, -0.009313136339187622, 0.015184461139142513, 0.011070194654166698, -0.006084630265831947, 0.01644260250031948, 0.024598825722932816, -0.03803345933556557, 0.04882165789604187, 0.010043435730040073, 0.014013088308274746, 0.04118604212999344, 0.023167148232460022, -0.0036099248100072145, -0.006062938366085291, 0.00859729666262865, 0.030831685289740562, 0.041648805141448975, -0.016211219131946564, 0.02581358328461647, -0.021937930956482887, 0.009566210210323334, 0.02114255353808403, 0.021475166082382202, -0.03086060844361782, -0.06137414276599884, 0.03609563410282135, -0.0006435319082811475, -0.0007971841841936111, 0.017874279990792274, -0.04081004485487938, -0.01310925092548132, 0.003358658170327544, -0.0009553556446917355, -0.003810576628893614, 0.03164152428507805, 0.02825755812227726, -0.030744917690753937, 0.009248059242963791, 0.017932124435901642, 0.05625481158494949, 0.012791100889444351, 0.027794793248176575, 0.017483821138739586, -0.002387937158346176, 0.012747716158628464, 0.019927797839045525, 0.023138225078582764, 0.03352150321006775, -0.008344222791492939, -0.00504341023042798, 0.023051457479596138, 0.016558293253183365, -0.044454317539930344, -0.007386155426502228, 0.027968330308794975, 0.0030603918712586164, 0.014620466157793999, -0.04095466062426567, -0.04419401288032532, 0.0006394646479748189, -0.03942175209522247, -0.04656567797064781, -0.014822926372289658, -0.009920514188706875, -0.04994964599609375, 0.00908175390213728, -0.0071294656954705715, 0.0009119714959524572, 0.0027639332693070173, 0.018496118485927582, -0.0060159387066960335, 0.02809848263859749, 0.028676938265562057, 0.006757085211575031, 0.01947949454188347, -0.0005418502259999514, 0.004211880266666412, 0.012610333040356636, -0.007143927272409201, 0.0072704642079770565, 0.019016729667782784, 0.01798997074365616, 0.022906843572854996, 0.014280623756349087, 0.02153301052749157, -0.01188003271818161, 0.038409456610679626, 0.004219111055135727, -0.009934975765645504, -0.05428806319832802, 0.02617511712014675, -0.01010128203779459, 0.009963898919522762, -0.013203250244259834, -0.024598825722932816, 0.03991343826055527, -0.003083891700953245, 0.00917575228959322, -0.004034728277474642, -0.03164152428507805, 0.015054307878017426, -0.012603102251887321, 0.0189010389149189, -0.02938554622232914, -0.03537256270647049, 0.012125876732170582, -0.0047903358936309814, -0.04352878779172897, 0.0211280919611454, -0.020347177982330322, 0.041793420910835266, 0.03517010435461998, 0.02041948400437832, 0.02355760708451271, 0.048734888434410095, -0.004783105105161667, 0.02433852106332779, 0.0031164297834038734, -0.025365279987454414, -0.018582887947559357, -0.05738279968500137, -0.010202511213719845, -0.0189010389149189, -0.021894546225667, -0.03783100098371506, -0.018611811101436615, 0.05350714549422264, 0.017715204507112503, 0.01346355490386486, 0.012538026086986065, -0.0106508145108819, 0.012856177054345608, 0.0189010389149189, 0.01495307870209217, -0.026840342208743095, -0.046478912234306335, 0.03311658650636673, -0.011417267844080925, -0.013637091964483261, 0.007169234566390514, 0.005549558904021978, 0.001905288314446807, 0.038438376039266586, 0.03421565145254135, -0.0032574282959103584, -0.0384962223470211, -0.021099168807268143, 0.025350818410515785, -0.012538026086986065, -0.06796853989362717, -0.04020266607403755, -0.013456324115395546, -0.02078101970255375, 0.006861930247396231, 0.02542312629520893, -0.0030766609124839306, -0.022718844935297966, -0.05214777588844299, 0.008510529063642025, 0.009761438705027103, 0.05093301832675934, 0.0030314691830426455, 0.001921557355672121, 0.05000749230384827, 0.007838074117898941, -0.004276956431567669, 0.032653819769620895, -0.008582836017012596, 0.009638517163693905, -0.0010141050443053246, 0.02770802564918995, 0.005929170176386833, -0.03945067524909973, 0.035083334892988205, 0.0005129274795763195, 0.03476518392562866, 0.024237291887402534, -0.02601604349911213, 0.022487463429570198, 0.0036731932777911425, 0.014822926372289658, -0.01741151511669159, -0.015126614831387997, -0.032856281846761703, 0.009689131751656532, 0.034302420914173126, -0.0012825445737689734, 0.008351453579962254, -0.001025854959152639, -0.01945057138800621, 0.01570507138967514, 0.005715864710509777, 0.005520636215806007, -0.0013702168362215161, 0.00439264765009284, -0.021836699917912483, -0.015112154185771942, 0.04728874936699867, -0.034880876541137695, -0.025206204503774643, -0.007230695337057114, 0.005383252631872892, 0.007866996340453625, 0.0014850040897727013, 0.00532540725544095, 0.01911795884370804, -0.0008731064735911787, 0.012986329384148121, 0.034909799695014954, 0.011438960209488869, 0.030397843569517136, 0.009855438023805618, 0.005394098814576864, -0.05145363137125969, -0.04390478506684303, 0.05596558377146721, -0.0040058051235973835, 0.022530848160386086, -0.031554754823446274, -0.00668839318677783, 0.024222830310463905, 0.01281279232352972, 0.0016205796273425221, 0.02319607138633728, 0.004269725643098354, -0.012494642287492752, -0.02770802564918995, 0.01302248239517212, -0.008488836698234081, 0.026681266725063324, 0.027982791885733604, 0.0025831658858805895, -0.030947377905249596, -0.0025361664593219757, 0.0010611045872792602, 0.015300151892006397, 0.024251753464341164, -0.020665327087044716, 0.014526467770338058, -0.012682639993727207, 0.03349258005619049, -0.02692710980772972, 0.0028922781348228455, -0.04135957732796669, -0.022227158769965172, -0.024280676618218422, 0.011207577772438526, 0.033232275396585464, 0.023441914469003677, 0.07496785372495651, -0.007744074799120426, 0.023456376045942307, -0.0018637117464095354, 0.02658003754913807, 0.028127405792474747, 0.008727449923753738, -0.0007113196770660579, 0.02318160980939865, 0.019493956118822098, -0.026710189878940582, 0.02564004622399807, 0.04338417202234268, 0.04196695610880852, 0.01741151511669159, -0.026796957477927208, 0.02039056085050106, 0.007274079602211714, -0.023716680705547333, 0.027057262137532234, -0.03308766335248947, 0.043789092451334, -0.001374735962599516, -0.018828731030225754, -0.01665952242910862, -0.012306643649935722, 0.03221997991204262, 0.021012401208281517, 0.002337322337552905, -0.02117147669196129, 0.00034684743150137365, -0.030831685289740562, 0.025018205866217613, -0.009797592647373676, 0.05327576398849487, -0.02245854027569294, 0.002033633179962635, -0.01908903568983078, 0.020332716405391693, 0.013384017162024975, 0.001044835546053946, -0.033752888441085815, -0.0171945933252573, -0.009472210891544819, -0.011077425442636013, 0.021243782714009285, 0.010216972790658474, -0.01741151511669159, -0.004793951287865639, -0.0111208101734519, 0.02169208601117134, -0.03276951238512993, 0.044627852737903595, -0.012241567485034466, -0.013622630387544632, 0.01664506085216999, 0.009573440998792648, -0.0056797112338244915, 0.012993560172617435, -0.006637778598815203, -0.008517758920788765, -0.04054974019527435, 0.008300838060677052, -0.04133065417408943, 0.03560394421219826, -0.021026862785220146, 0.0028398556169122458, 0.00696677528321743, -0.02733202837407589, 0.004924103617668152, -0.0035810018889606, 0.02900955080986023, 0.013340633362531662, -0.016572754830121994, 0.03149690851569176, 0.012689870782196522, -0.031352296471595764, 0.03942175209522247, -0.008112840354442596, 0.01758505217730999, 0.011489574797451496, -0.01402031909674406, 0.04627645015716553, -0.0037744231522083282, -0.003270082175731659, -0.013087558560073376, -0.026811419054865837, 0.004309494514018297, -0.010202511213719845, 0.03878545016050339, -0.04115711897611618, -0.02824309654533863, 0.03820699453353882, -0.039971284568309784, 0.0012780254473909736, 0.03759961575269699, 0.008720219135284424, 0.025943735614418983, -0.003271889640018344, 0.011742649599909782, 0.006395550444722176, 0.019739799201488495, 0.005632712040096521, -0.0021222091745585203, 0.006428088527172804, -0.0282286349684, -0.01907457411289215, 0.009992821142077446, 0.03534363955259323, 0.011279884725809097, 0.014056472107768059, 0.013781705871224403, 0.021749932318925858, 0.019320419058203697, -0.0010918349726125598, 0.00859729666262865, 0.027765870094299316, -0.005350714549422264, 0.012046338990330696, 0.0037888844963163137, 0.02770802564918995, -0.0035105026327073574, 0.009580671787261963, -0.027028340846300125, 0.04827212542295456, -0.01495307870209217, 0.011344960890710354, -0.03942175209522247, -0.01667398400604725, -0.034157805144786835, -0.03702116012573242, 0.019884413108229637, 0.010925580747425556, -0.03615347668528557, 0.004135957919061184, -0.030542457476258278, 0.01780197210609913, 0.025133898481726646, -0.008257454261183739, 0.030918454751372337, -0.011590804904699326, -0.006084630265831947, -0.021836699917912483, 0.02075209654867649, -0.02229946479201317, 0.015169999562203884, -0.006927006412297487, -0.016399217769503593, 0.004092573653906584, -0.0007641941192559898, 0.017613975331187248, 0.021648703143000603, -0.026666805148124695, -0.004530030768364668, 0.007917611859738827, 0.01346355490386486, -0.0002883239940274507, 0.02023148536682129, 0.013731091283261776, -0.023485299199819565, -0.010708659887313843, 0.00683662248775363, 0.021764393895864487, 0.005748402792960405, -0.04769366979598999, 0.04211157187819481, -0.018293660134077072, -0.020795481279492378, -0.003058584174141288, -0.0113305002450943, -0.016731830313801765, -0.008517758920788765, -0.022039160132408142, 0.005676095839589834, 0.024193907156586647, -0.012697101570665836, 0.013543092645704746, 0.013167096301913261, 0.007266848813742399, -0.008185147307813168, -0.0012744100531563163, -0.010310972109436989, 0.02487359195947647, -0.022212697193026543, -0.03366611897945404, -0.013615399599075317, 0.010766505263745785, 0.007219849620014429, -0.005661634728312492, -0.004812027793377638, 0.05145363137125969, -0.043673399835824966, 0.005021717865020037, 0.02020256407558918, -0.016775213181972504, -0.04092573747038841, 0.01610998995602131, 0.0010276626562699676, 0.02057855948805809, 0.004443262238055468, 0.029877234250307083, -0.008076687343418598, -0.0434420183300972, -0.024410828948020935, 0.04176449775695801, -0.0003461695450823754, -0.0012780254473909736, 0.028315404430031776, 0.0034924258943647146, 0.010390509851276875, -0.007780228275805712, 0.01927703432738781, 0.02658003754913807, -0.0038864989764988422, 0.024078216403722763, 0.010455586016178131, 0.012118645943701267, -0.019204728305339813, 0.0282286349684, 0.01610998995602131, -0.006149706430733204, -0.02825755812227726, 0.010151896625757217, 0.01644260250031948, -0.008365915156900883, -0.007939303293824196, 0.03010861575603485, -0.0220680832862854, 0.006026784889400005, 0.008821448311209679, 0.036008864641189575, -0.0045083388686180115, 0.0008645200286991894, 0.0008102898136712611, -0.036037787795066833, 0.013904627412557602, -0.019595185294747353, 0.013326171785593033, -0.007910381071269512, 0.0009372789063490927, -0.008546682074666023, -0.002302976557984948, -0.030831685289740562, -0.013666014187037945, 0.0025759353302419186, 0.014837387017905712, 0.014446930028498173, 0.041070349514484406, -0.030397843569517136, 0.01699213497340679, -0.012219875119626522, -0.0076066916808485985, 0.017107825726270676, -0.01702105812728405, -0.0012536218855530024, 0.009898821823298931, -0.01686198264360428, -0.009667440317571163, -0.03193075209856033, 0.011619728058576584, -0.0017010211013257504, 0.0016296179965138435, 0.01189449429512024, -0.026912648230791092, 0.023976987227797508, -0.03392642363905907, 0.04026051238179207, 0.0046493373811244965, 0.03462057188153267, -0.04323955997824669, -0.02695603296160698, 0.024251753464341164, 0.011431729421019554, -0.04491708055138588, -0.013311710208654404, 0.008011610247194767, -0.0033243123907595873, -0.008705757558345795, 0.013600938022136688, 0.027765870094299316, 0.020318254828453064, -0.006739008240401745, -0.02020256407558918, -0.04081004485487938, 0.023427452892065048, -0.002415052382275462, -0.00017726501391734928, 0.04054974019527435, -0.021099168807268143, -0.004750567022711039, 0.005672480445355177, -0.002489167032763362, 0.022342849522829056, -0.029790466651320457, -0.007230695337057114, 0.0028398556169122458, 0.03447595611214638, -0.004363724961876869, 0.009204675443470478, -0.00815622415393591, -0.008792526088654995, -0.014034779742360115, 0.005177177954465151, 0.013897396624088287, -0.007035466842353344, -0.01610998995602131, -0.01451200619339943, -0.024439750239253044, -0.0299350805580616, -0.0509619414806366, 0.02148962765932083, 0.0006073784315958619, -0.0020715943537652493, -0.004721644334495068, -0.014468621462583542, -0.020520713180303574, -0.010419432073831558, 0.003080276306718588, 0.024960361421108246, 0.016413679346442223, -0.005195254925638437, -0.007118619978427887, -0.033810731023550034, 0.05897355452179909, -0.021619779989123344, 0.023282838985323906, 0.021359475329518318, 0.01816350780427456, -0.008445451967418194, -0.04697059839963913, 0.029313240200281143, -0.017845356836915016, -0.02036163955926895, -0.05125116929411888, 0.007339156232774258, 0.0052024852484464645, -0.0006656759069301188, 0.0006516664288938046, -0.02491697669029236, 0.0053687915205955505, -0.018582887947559357, -0.031525831669569016, 0.013600938022136688, 0.026073887944221497, 0.0381491482257843, -0.02021702565252781, -0.023094842210412025, -0.007975457236170769, -0.010759275406599045, -0.005578481592237949, -0.030571380630135536, 0.04861919581890106, -0.0038503454998135567, -0.0037888844963163137, 0.019016729667782784, -0.020057950168848038, -0.011200346983969212, 0.02153301052749157, -0.04676814004778862, -0.005423021502792835, -0.009638517163693905, -0.002984469523653388, -0.04153311625123024, -0.0029880849178880453, -0.04095466062426567, 0.018799807876348495, -0.005809864029288292, 0.0022234388161450624, 0.044280778616666794, -0.00014145048044156283, -0.004573415033519268, 0.014822926372289658, 0.007664537522941828, 0.012002954259514809, -0.030600303784012794, 0.015039847232401371, 0.015473688952624798, 0.002977238968014717, -0.01644260250031948, 0.015300151892006397, 0.005632712040096521, 0.007389770820736885, 0.019146881997585297, -0.007151158060878515, 0.01029651053249836, 0.026464344933629036, 0.00402388209477067, 0.01780197210609913, -0.0016531178262084723, 0.010918349958956242, -0.0023734758142381907, -0.0001516186457592994, 0.01289956085383892, -0.00824299268424511, 0.008445451967418194, 0.01739705353975296, 0.011207577772438526, 0.05498220771551132, 0.0026446268893778324, 0.0062979357317090034, 0.0056507885456085205, 0.04549553617835045, 0.019392725080251694, -0.010260356590151787, -0.0027621258050203323, 0.0299350805580616, 0.012856177054345608, 0.0403762049973011, -0.027809254825115204, -0.002415052382275462, -0.006467857398092747, 0.03389750048518181, -0.009284213185310364, 0.005929170176386833, 0.020824402570724487, 0.024063754826784134, -0.001542849699035287, 0.03297197073698044, 0.07282756268978119, 0.011077425442636013, -0.023817911744117737, -0.004052804782986641, 0.05101978778839111, -0.025379741564393044, 0.010267587378621101, 0.00871298834681511, -0.009689131751656532, 0.023340685293078423, -0.02302253432571888, 0.0016314256936311722, 0.0007565115229226649, 0.00692339101806283, -0.05521359294652939, 0.015647225081920624, -0.03817807137966156, 0.006088245660066605, -0.0014904271811246872, -0.010535123758018017, 0.010867735370993614, 0.03817807137966156, 0.0039190370589494705, -0.03644270449876785, 0.013615399599075317, 0.0077729979529976845, 0.03294304758310318, -0.012046338990330696, -0.02036163955926895, -0.005090409889817238, 0.006048476789146662, 0.002331899246200919, 0.012292182072997093, -0.00787422712892294, 0.004801182076334953, 0.003973267041146755, -0.005444713868200779, -0.02092563360929489, 0.023817911744117737, -0.005086794495582581, 0.005618250463157892, -0.04402047395706177, -0.016919827088713646, -0.008886524476110935, 0.006319628097116947, -0.03178613632917404, 0.028026176616549492, -0.007371694315224886, -0.022979149594902992, -0.030397843569517136, -0.00229213060811162, 0.01924811117351055, 0.022371772676706314, -0.01812012307345867, -0.014150471426546574, -0.016240142285823822, -0.026146195828914642, -0.0009083561017177999, 0.027245260775089264, -0.025871429592370987, -0.04925549775362015, -0.0509619414806366, 0.0025668968446552753, -0.010838812217116356, 0.002584973582997918, 0.0018402120331302285, -0.02338407002389431, -0.013384017162024975, -0.01486631017178297, -0.010896658524870872, 0.020867787301540375, 0.027245260775089264, 0.030397843569517136, -0.02491697669029236, 0.018018893897533417, -0.0005847825086675584, 0.023311762139201164, 0.007968226447701454, 0.0018456350080668926, 0.005853248294442892, 0.021778855472803116, 0.029616929590702057, 0.0060990918427705765, -0.02190900780260563, -0.01887211576104164, 0.02448313497006893, 0.03221997991204262, -0.038091305643320084, 0.012892330065369606, 0.013138174079358578, -0.0009463172755204141, -0.01981210522353649, 0.009501134045422077, 0.025582201778888702, 0.03028215281665325, -0.0028814321849495173, -0.009956668131053448, 0.028156328946352005, 0.011525728739798069, 0.028141867369413376, -0.006616086233407259, 0.01177157275378704, 0.017686281353235245, -0.012935714796185493, 0.005047025624662638, 0.012169260531663895, 0.0027223569341003895, 0.024063754826784134, 0.050788406282663345, -0.0005454656202346087, 0.0020426714327186346, -0.005357945337891579, -0.030368922278285027, -0.02376006543636322, 0.009566210210323334, 0.0046493373811244965, -0.02733202837407589, -0.015126614831387997, -0.022313926368951797, -0.04228510707616806, 0.013976934365928173, -0.001876365509815514, 0.016746290028095245, 0.0013241211418062449, -0.03890114277601242, 0.02919754944741726, -0.030166462063789368, 0.002651857677847147, 0.011974032036960125, -0.013600938022136688, 0.027722487226128578, -0.006525702774524689, 0.030021848157048225, -0.034736260771751404, -0.024454211816191673, -0.007830843329429626, 0.0006019553984515369, -0.0019089035922661424, 0.015010924078524113, -0.012010185047984123, -0.020838864147663116, 0.0021294397301971912, 0.011626958847045898, -0.007400617003440857, 0.008763602934777737], "index": 68}, {"title": "Les Insomniaques s'amusent", "text": "Les Insomniaques s'amusent is the first album by Qu\u00e9b\u00e9cois singer and musician Daniel B\u00e9langer.", "vector": [0.008316775783896446, -0.019163016229867935, -0.015719765797257423, -0.037081167101860046, -0.011726918630301952, -0.02495032735168934, -0.03212818130850792, -0.00637663621455431, 0.02661897987127304, 0.02170572616159916, -0.013574355281889439, -0.013786247931420803, -0.036710355430841446, 0.030989259481430054, -0.003886900842189789, 0.013408814556896687, 0.035041701048612595, -0.011270025745034218, -0.02691033110022545, -0.018235987052321434, 0.009773535653948784, 0.004582172725349665, -0.022341402247548103, 0.018262473866343498, 0.025771411135792732, -0.008872993290424347, 0.009462319314479828, 0.04979470744729042, 0.003285987302660942, -0.0022116266191005707, 0.0032677778508514166, -0.053635258227586746, -0.014170303009450436, 0.000426681712269783, -0.00035260216100141406, -0.03959738835692406, -0.00029900827212259173, 0.03501521423459053, -0.022367889061570168, -0.05572769418358803, -0.029029255732893944, 0.00367169757373631, -0.020593291148543358, 0.0076347473077476025, -0.027122223749756813, 0.030803853645920753, -0.06976556777954102, 0.003135344944894314, -0.000633193994872272, 0.015746252611279488, 0.03978279232978821, 0.01630247011780739, -0.007184476125985384, -0.00806515384465456, 0.02476492151618004, 0.014448411762714386, 0.036577921360731125, -0.011554756201803684, 0.040021173655986786, -0.023745190352201462, -0.013289624825119972, -0.002188450889661908, -0.013733274303376675, -0.0019864910282194614, 0.004585483577102423, 0.02655276283621788, 0.018050581216812134, 0.012402325868606567, 0.034432511776685715, 0.058482296764850616, -0.016514362767338753, 0.0338498055934906, -0.04137198626995087, 0.01938815228641033, -0.008137991651892662, -0.02961196005344391, 0.014302735216915607, -0.011567999608814716, -0.028128713369369507, -0.04269631579518318, -0.0233081616461277, -0.048046596348285675, -0.0067640021443367004, 0.021361399441957474, 0.007932720705866814, 0.011793134734034538, 0.013958410359919071, -0.04812605679035187, -0.020950859412550926, 0.03440602496266365, 0.030062230303883553, -0.011183944530785084, 0.010309888049960136, 0.014090843498706818, 0.05763472616672516, -0.028976282104849815, 0.0159978736191988, -0.01668652519583702, -0.04738443344831467, -0.03501521423459053, -0.006432920228689909, -0.05461525917053223, -0.0022910863626748323, -0.06833529472351074, 0.015865441411733627, 0.034670889377593994, 0.05334390699863434, -0.0015908482018858194, -0.01918950304389, -0.010687321424484253, -0.04582172632217407, -0.006310419645160437, -0.007078529801219702, -0.019414639100432396, 0.08126072585582733, 0.021043561398983, -0.03337305039167404, -0.050854168832302094, 0.011660702526569366, 0.01846112310886383, 0.0003250809677410871, -0.027148710563778877, -0.031916290521621704, 0.06891799718141556, -0.0021752077154815197, 0.0016612031031399965, 0.04600713402032852, -0.03631305694580078, -0.0578995905816555, 0.039888739585876465, -0.02244734950363636, 0.0008666067151352763, 0.0012109318049624562, -0.0068136644549667835, 0.007886369712650776, -0.0458746999502182, -0.026102492585778236, -0.040074147284030914, 0.009740428067743778, -0.0019186192657798529, -0.021798428148031235, 0.0009833130752667785, 0.033876292407512665, 0.015931658446788788, -0.039703335613012314, -0.01888490840792656, -0.039464954286813736, 0.0017249364173039794, -0.03864387050271034, -0.03702819347381592, 0.029691418632864952, 0.01679247058928013, -0.018222743645310402, -0.011356106959283352, 0.0013458476169034839, 0.041186582297086716, -0.02300356701016426, -0.03795522078871727, -0.002582438290119171, -0.007502314634621143, -0.027307629585266113, 0.055409856140613556, 0.014858952723443508, -0.025943573564291, -0.007826774381101131, -0.0117467837408185, -0.01594490185379982, -0.009852995164692402, 0.06038932874798775, 0.011799756437540054, 0.013097597286105156, -0.013667058199644089, -0.01667328178882599, -0.004820551723241806, 0.019295450299978256, -0.03538602590560913, 0.0060621085576713085, -0.021785184741020203, 0.01589192822575569, 0.03141304478049278, 0.011567999608814716, 0.03996820002794266, 0.027916820719838142, -0.02055356092751026, 0.0529995821416378, -0.04274928569793701, 0.016938146203756332, -0.029479527845978737, -0.02212950959801674, -0.04224604368209839, -0.02839357778429985, -0.03448548540472984, 0.006277311593294144, -0.023904109373688698, -0.006793799344450235, 0.05482715368270874, -0.02894979529082775, 0.008654478937387466, 0.03096277266740799, -0.05360877141356468, -0.0008624682086519897, 0.0077936663292348385, -0.006413055118173361, -0.029161687940359116, 0.017097067087888718, 0.01889815181493759, -0.01097205188125372, 0.06536880135536194, -0.02177194133400917, -0.007098394446074963, 0.02502978779375553, 0.015441657043993473, -0.04317307099699974, 0.0391206294298172, -0.007290421985089779, -0.019242476671934128, -0.027148710563778877, 0.005529066547751427, 0.05199309065937996, -0.015838954597711563, 0.02655276283621788, 0.019957613199949265, 0.010097996331751347, -0.031624935567379, 0.02722817100584507, 0.02152032032608986, -0.015534359961748123, 0.046271998435258865, -0.020262207835912704, -0.02310951240360737, 0.013653814792633057, 0.0839623510837555, 0.002698316937312484, 0.059012025594711304, 0.005886635277420282, 0.008243937976658344, -0.010899214074015617, 0.008111504837870598, 0.037557922303676605, -0.011978540569543839, -0.006624947767704725, 0.045159563422203064, -0.012495028786361217, 0.020924372598528862, 0.014342465437948704, -0.0005297309253364801, 0.0006224338430911303, 0.043755777180194855, -0.016461389139294624, 9.849685011431575e-05, 0.026460060849785805, -0.016818957403302193, 0.00318004097789526, -0.0013549524592235684, 0.0007569358567707241, 0.03967684879899025, -0.006648123264312744, 0.029241148382425308, 0.024685461074113846, -0.04518605023622513, -0.04121306911110878, -0.003966360352933407, -0.012289757840335369, 0.017136795446276665, -0.0391206294298172, 0.006588528398424387, 0.01238246075809002, -0.052152011543512344, -0.05236390233039856, -0.01569327898323536, 0.0030525745823979378, 0.023824648931622505, 0.017030850052833557, -0.013600842095911503, -0.038299545645713806, 0.02759898267686367, -0.004449740052223206, 0.0115613779053092, 0.047914162278175354, -0.05758175253868103, 0.015772739425301552, -0.0037941979244351387, -0.021546805277466774, -0.041054148226976395, -0.015521116554737091, 0.023387620225548744, 0.030274122953414917, -0.010389348492026329, 0.005029133055359125, -0.01487219613045454, -0.022487077862024307, -0.02551978826522827, -0.01413057278841734, 0.032234128564596176, 0.018845178186893463, 0.01736193150281906, 0.04658983647823334, -0.044735778123140335, 0.0045987265184521675, 0.004787443205714226, 0.018474366515874863, 0.059276893734931946, -0.009031912311911583, -0.020407885313034058, -0.018130041658878326, 0.03782279044389725, -0.025480058044195175, 0.015918415039777756, -0.03411467373371124, 0.015017872676253319, -0.05035092681646347, 0.007780423387885094, -0.024301407858729362, -0.002065950771793723, -0.026049518957734108, -0.024870866909623146, 0.050244979560375214, -0.028049252927303314, 0.012653947807848454, 0.017679769545793533, 0.051860660314559937, -0.039517927914857864, 0.013998140580952168, -0.009614616632461548, 0.055833641439676285, 0.013878950849175453, 0.04341145232319832, 0.013693545013666153, 0.05321147292852402, -0.03292277827858925, -0.036524947732686996, 0.022301672026515007, -0.02047410048544407, 0.027519522234797478, -0.012965165078639984, 0.012673812918365002, -0.004578861873596907, -0.01180637814104557, -0.0026784520596265793, 0.02570519410073757, 0.006462717428803444, 0.014633817598223686, 0.01852734014391899, 0.008475694805383682, 0.045768752694129944, 0.04820551723241806, 0.025347625836730003, -0.02060653455555439, -0.028605470433831215, -0.01864652894437313, 0.00043330335756763816, 0.010203942656517029, 0.0060587977059185505, -0.030009258538484573, 0.00431068567559123, -0.013256517238914967, 0.0027148709632456303, -0.03451197221875191, 0.027916820719838142, 0.03594224527478218, -0.02183815836906433, -0.028658444061875343, 0.04462983086705208, 0.03281683102250099, 0.04831146076321602, -0.017812203615903854, 0.016660038381814957, -0.034856297075748444, 0.04889416694641113, -0.0051516336388885975, 0.013733274303376675, 0.03898819908499718, -0.08835911750793457, -0.021983833983540535, 0.01247516367584467, 0.010548267513513565, 0.041477933526039124, 0.026155464351177216, 0.0044464292004704475, -0.0011877560755237937, -0.03506818786263466, -0.020341668277978897, -0.028790876269340515, 0.026539519429206848, -0.0023424040991812944, -0.0005524927983060479, 0.017706256359815598, -0.0045623076148331165, 0.016103820875287056, -0.008992183022201061, 0.06616339832544327, -0.05064227804541588, -0.03128061071038246, -0.04028603807091713, -0.028711417689919472, 0.018937882035970688, -0.020315181463956833, 0.01797112263739109, 0.008475694805383682, -0.023996811360120773, 0.0036915624514222145, -0.01582571119070053, -0.05043038725852966, -0.041848745197057724, -0.007091773208230734, -0.010309888049960136, 0.04298766702413559, 0.021189237013459206, 0.016355443745851517, -0.000538421852979809, 0.02778438851237297, -0.004025955218821764, -0.04004766047000885, 0.0360746756196022, 0.014951655641198158, 0.02341410703957081, 0.016765983775258064, 0.0261289793998003, -0.0029880136717110872, 0.03202223405241966, 0.01685868762433529, 0.0051450119353830814, 0.009694076143205166, -0.002794330706819892, -0.015348954126238823, 0.014739763922989368, 0.019335178658366203, -0.04505361616611481, 0.07924775034189224, -0.037981707602739334, 0.06060121953487396, 0.027307629585266113, -0.03660440817475319, 0.00403257692232728, 0.011660702526569366, -0.014196788892149925, 0.006264068186283112, 0.04606010392308235, -0.03361142799258232, 0.028287632390856743, 0.0639914944767952, -0.008323397487401962, -0.0229373499751091, -0.03255196660757065, 0.02269897051155567, -0.02097734622657299, 0.000684925529640168, 0.04121306911110878, 0.0023341269697993994, -0.016090577468276024, -0.0257581677287817, -0.09815914183855057, -0.03286980465054512, 0.010640970431268215, -0.004754335153847933, 0.046987134963274, 0.005545620806515217, -0.0006067074718885124, -0.030062230303883553, 0.03276385739445686, -0.025003300979733467, 0.025466814637184143, -0.015229764394462109, -0.005790621507912874, 0.01699111983180046, 0.02379816211760044, 0.0044795372523367405, -0.009124615229666233, -0.013190300203859806, -0.023639243096113205, -0.03432656452059746, 0.03475034981966019, -0.013051246292889118, -0.018474366515874863, -0.000686580955516547, -0.06822934746742249, -0.055092018097639084, 0.005449607037007809, 0.0035988595336675644, -0.014382194727659225, 0.020937616005539894, -0.044232532382011414, 0.004022644367069006, -0.030750881880521774, 0.007177854422479868, 0.012561244890093803, 0.04420604556798935, -0.03602170571684837, 0.00868096575140953, 0.0030889934860169888, 0.014753006398677826, -0.024804651737213135, -0.005380080081522465, 0.027493035420775414, -0.019467612728476524, -0.04794064909219742, 0.014991385862231255, 0.013455165550112724, -0.044974155724048615, 0.01699111983180046, 0.03837900608778, 0.023692216724157333, 0.039147116243839264, 0.05609850585460663, 0.010707186535000801, -0.005813797004520893, -0.0178519319742918, -0.014474897645413876, 0.03030060976743698, 0.008296910673379898, -0.01143556647002697, 0.010991916991770267, 0.02023572288453579, 0.003456494305282831, -0.0023705458734184504, 0.03072439506649971, -0.01336908433586359, -0.048470381647348404, -0.016328956931829453, 0.024076271802186966, 0.049450382590293884, 0.0011554756201803684, 0.007191097363829613, 0.0391206294298172, -0.023467080667614937, 0.011971918866038322, 0.043941181153059006, 0.02109653502702713, 0.07485098391771317, -0.00548602594062686, 0.05260228365659714, -0.020897885784506798, -0.02570519410073757, 0.01183948665857315, -0.028896823525428772, 0.05768769979476929, -0.004204739350825548, 0.020129775628447533, -0.0184478797018528, 0.0440206415951252, 0.01009137462824583, -0.009475561790168285, -0.049450382590293884, 0.0015958144795149565, -0.0009435832616873085, -0.043808747082948685, 0.036577921360731125, 0.00901866890490055, 0.014925169758498669, 0.00022534257732331753, 0.014713277108967304, 0.008098261430859566, -0.023281674832105637, -0.004651699680835009, -0.048602815717458725, -0.04351739585399628, -0.03218115493655205, -0.03390277922153473, 0.007588395848870277, 0.013488274067640305, -0.029161687940359116, -0.017626797780394554, 0.01515030488371849, -0.015004629269242287, 0.052761200815439224, -0.039756305515766144, 0.01643490232527256, 0.00446298299357295, 0.009607994928956032, 0.0005061413394287229, 0.037743330001831055, 0.018540583550930023, 0.00029962905682623386, -0.044311992824077606, 0.013786247931420803, 0.016726255416870117, -0.017308957874774933, -0.008661100640892982, 0.05911797285079956, -0.0398622527718544, -0.004691429436206818, -0.028711417689919472, 0.028420064598321915, 0.01704409345984459, 0.004688119050115347, 0.025043031200766563, -0.039279550313949585, -0.012965165078639984, -0.003684940980747342, 0.021268697455525398, 0.00029900827212259173, -0.029691418632864952, 0.032843317836523056, -0.02894979529082775, -0.008793533779680729, -0.021387886255979538, 0.05231092870235443, 0.03297575190663338, 0.006187919527292252, 0.00990596879273653, -0.005055619869381189, 0.03294926509261131, -0.010501915588974953, 0.020315181463956833, 0.0025294653605669737, 0.04386172071099281, -0.0002406551066087559, 0.006353460717946291, 0.0022877755109220743, -0.0250165443867445, -0.04918551817536354, 0.003625346114858985, 0.04055090248584747, -0.006608393508940935, 0.018010852858424187, -0.01232286635786295, 0.0022546672262251377, -0.001963315298780799, 0.036154136061668396, 0.029214661568403244, 0.008224072866141796, 0.009144480340182781, 0.04280225932598114, -0.029506012797355652, -0.00199973420239985, 0.02709573693573475, -0.040921714156866074, -0.007687720470130444, -0.006651434116065502, -0.00044323582551442087, 0.0034366294275969267, -0.006979205179959536, 0.010594618506729603, 0.013150570914149284, 0.053555797785520554, 0.04563632234930992, 0.00762150390073657, -0.010601240210235119, 0.03535953909158707, -0.013640571385622025, -0.06197851896286011, 0.009859616868197918, 0.033478993922472, 0.02900276891887188, -0.03016817755997181, -0.020738966763019562, 0.03392926603555679, -0.021056804805994034, -0.016170037910342216, 0.036948733031749725, 0.038352519273757935, 0.03647197410464287, 0.029717905446887016, 0.03724008426070213, -0.016845444217324257, 0.006260757800191641, 0.04020657762885094, -0.018739232793450356, -0.00797245092689991, 0.01846112310886383, 0.021387886255979538, -0.02648654766380787, -0.015454900451004505, -0.045477401465177536, 0.006121703423559666, 0.030830340459942818, 0.037743330001831055, 0.013415436260402203, -0.012289757840335369, -0.022553294897079468, -0.031042233109474182, -0.0238643791526556, -0.0004072306619491428, -0.02992979809641838, 0.03967684879899025, -0.004284198861569166, -0.02447357028722763, -0.020275451242923737, -0.032843317836523056, -2.1649648260790855e-05, -0.015600576065480709, -0.0010155935306102037, 0.0013458476169034839, 0.04802010953426361, 0.04285523295402527, 0.005684675183147192, 0.0052675120532512665, -0.015772739425301552, -0.02373194694519043, 0.004350415430963039, -0.015070845372974873, 0.029532499611377716, -0.009303399361670017, 0.0564163438975811, 0.017825447022914886, -0.011336241848766804, -0.006899745669215918, 0.02746654860675335, -0.02476492151618004, 0.02582438290119171, 0.017772473394870758, -0.017216255888342857, 0.023096268996596336, -0.00038343414780683815, 0.027810875326395035, -0.0030476083047688007, -0.002009666757658124, -0.004340482875704765, -0.010064887814223766, -0.02942655421793461, 0.010766780935227871, 0.030035745352506638, -0.008071775548160076, 0.016765983775258064, 0.000638160272501409, 0.027731414884328842, 0.015666792169213295, -0.013786247931420803, 0.00507548451423645, -0.0013210165780037642, 0.04494766891002655, 0.05615147948265076, -0.00962786003947258, -0.01962653174996376, 0.06822934746742249, 0.01115745771676302, -0.04256388172507286, -0.004251090809702873, 0.013667058199644089, -0.0051450119353830814, -0.0861872211098671, 0.004499402362853289, 0.0025112556759268045, 0.017322201281785965, 0.01741490513086319, -0.029161687940359116, -0.0059826490469276905, 0.034432511776685715, 0.006317041348665953, 0.005591972265392542, -0.004744402598589659, 0.013799491338431835, -0.02175869792699814, 0.03239304572343826, 0.003333994187414646, 0.009800022467970848, -0.003724670736119151, 0.02116275206208229, -0.029876824468374252, -0.01802409440279007, -0.0197457205504179, 0.017931392416357994, 0.0005015889764763415, 0.005913121625781059, -0.014951655641198158, 0.04312009736895561, 0.055462829768657684, -0.02709573693573475, -0.018977610394358635, -0.043384965509176254, 0.009886103682219982, -0.06229635700583458, 0.052761200815439224, -0.008581641130149364, -0.021374642848968506, -0.047251999378204346, -0.03234007582068443, -0.016156794503331184, -0.06965962052345276, -0.003979603759944439, 0.022301672026515007, -0.024076271802186966, -0.030274122953414917, -0.04163685068488121, 0.007787044625729322, 0.0019335179822519422, 0.025903843343257904, 0.005207917187362909, 0.018977610394358635, 0.0003991605481132865, -0.001792808179743588, 0.03022114932537079, 0.024566272273659706, 0.035783324390649796, 0.041610363870859146, 0.03249899297952652, 0.007780423387885094, -0.029506012797355652, 0.019242476671934128, -0.013263138011097908, -0.005204606335610151, 0.042219556868076324, 0.002847303869202733, -0.0008955763769336045, -0.040259551256895065, 0.003281021025031805, 0.0436498299241066, 0.0376373827457428, -0.059329867362976074, 0.0022364577744156122, 0.0045623076148331165, -8.090812480077147e-05, 0.01515030488371849, 0.0089259659871459, 0.0372665710747242, 0.01575949601829052, -0.024367623031139374, -0.021877888590097427, -0.008839884772896767, -0.007767179980874062, 0.011402458883821964, 0.020129775628447533, -0.010376105085015297, -0.021560048684477806, -0.025917086750268936, -0.012852597050368786, -0.04388820752501488, 0.025678707286715508, -0.002357302699238062, -0.013825977221131325, -0.013574355281889439, -0.007257313933223486, 0.017918149009346962, -0.030274122953414917, 0.03631305694580078, 0.0034796700347214937, 0.03435305133461952, 0.013196921907365322, 0.01717652566730976, 0.021175993606448174, -0.015799226239323616, -0.01018407754600048, 0.03379683569073677, -0.003060851711779833, 0.011832864955067635, -0.007290421985089779, 0.021308427676558495, 0.025307895615696907, 0.04452388733625412, 0.011336241848766804, 0.025599248707294464, -0.012985029257833958, -0.03361142799258232, -0.0331081822514534, -0.011985162273049355, 0.04889416694641113, -0.015733009204268456, 0.037504952400922775, 0.02844655141234398, 0.002880411921069026, -0.027056008577346802, -0.00715798931196332, 0.021930860355496407, -0.021308427676558495, 0.005863459315150976, -0.00021013349760323763, -0.05615147948265076, -0.017388418316841125, 0.010733673349022865, 0.001575949601829052, 0.07882396131753922, -0.013547868467867374, 0.0163686852902174, -0.037504952400922775, 0.026208437979221344, -0.0233081616461277, 0.019586801528930664, -0.0030277434270828962, 0.011793134734034538, -0.038167115300893784, -0.04523902386426926, 0.01422327570617199, 0.02545357123017311, 0.010415834374725819, 0.0038571034092456102, 0.01864652894437313, 0.04033901169896126, -0.020871398970484734, -0.040259551256895065, -0.020500587299466133, -0.03390277922153473, -0.022050051018595695, 0.008330019190907478, 0.008204207755625248, -0.008283667266368866, 0.037743330001831055, -0.01834193430840969, 0.027254657819867134, -0.018249230459332466, 0.02263275533914566, 0.02410275861620903, -0.023043295368552208, -0.04711956903338432, 0.0024284853134304285, 0.015190035104751587, -0.011905702762305737, 0.036207109689712524, 0.01368030160665512, -0.02146734669804573, -0.022791674360632896, -0.008018801920115948, -0.011574621312320232, 0.05880013480782509, 0.027916820719838142, -0.036392517387866974, 0.0012399015249684453, 0.015282738022506237, 0.0076744770631194115, 0.015097332186996937, -0.022778430953621864, -0.027493035420775414, 0.020010586827993393, 0.03864387050271034, -0.010693943127989769, 0.0008583296439610422, -0.025241678580641747, 0.006939475424587727, 0.022765187546610832, -0.005919743329286575, 0.03538602590560913, 0.005462850444018841, 0.00024934601970016956, 0.0268706027418375, 0.023096268996596336, -0.011389215476810932, -0.026566006243228912, 0.02428816445171833, -0.006787177640944719, 0.036339543759822845, 0.0036419001407921314, 0.0220103207975626, 0.003492913441732526, 0.014951655641198158, 0.023771675303578377, 0.02214275300502777, 0.010594618506729603, -0.020381398499011993, -0.030936287716031075, -0.014938412234187126, 0.014421924948692322, -0.0069725834764540195, 0.027201684191823006, 0.02244734950363636, -0.0061779869720339775, 0.020500587299466133, 0.015733009204268456, -0.06489203870296478, -0.014607330784201622, -0.025718437507748604, 0.005370147526264191, -0.0011587864719331264, -0.014236519113183022, -0.03647197410464287, 0.052522823214530945, 0.00840285699814558, -0.025744924321770668, 0.01355449017137289, -0.032896291464567184, -0.006194541230797768, -0.019083557650446892, -0.004506023600697517, -0.024817895144224167, 0.03782279044389725, 0.009621238335967064, 0.021056804805994034, 0.017017606645822525, 0.002393721602857113, -0.015680035576224327, 0.007932720705866814, 0.005045687314122915, 0.013759761117398739, -0.0018226054962724447, 0.001295357709750533, 0.023202214390039444, 0.010038401000201702, 0.004506023600697517, 0.01869950257241726, -0.011925567872822285, -0.004817240871489048, 0.04256388172507286, 0.0250165443867445, 0.022712213918566704, -0.0020344979129731655, -0.014276249334216118, -0.04055090248584747, 0.024553028866648674, -0.0014459999511018395, -0.0006791315972805023, 0.0078135309740901, 0.024248434230685234, -0.006939475424587727, -0.05673418566584587, 0.0015825711889192462, -0.016779227182269096, 0.04251090809702873, 0.010925700888037682, -0.0085551543161273, -0.028049252927303314, 0.00021996250143274665, 0.026327628642320633, 0.0004900011117570102, -0.04468280449509621, 0.014276249334216118, -0.018792204558849335, 0.025413842871785164, 0.045106589794158936, -0.007045421749353409, 0.010925700888037682, -0.009852995164692402, 0.002410275861620903, 0.037743330001831055, 0.026380600407719612, 0.023043295368552208, -0.0059760273434221745, -0.0053535932675004005, -0.0027628778479993343, -0.025930330157279968, 0.00858826283365488, -0.006608393508940935, 0.052655257284641266, -0.017308957874774933, -0.0002971459471154958, -0.010237050242722034, -0.013143949210643768, -0.00843596551567316, -0.0021321671083569527, 0.022169239819049835, -0.014647061005234718, 0.004760956857353449, -0.022103022783994675, -0.003539264900609851, 0.06028338149189949, -0.02065950632095337, 0.007694341707974672, -0.026764655485749245, -0.007820152677595615, -0.04073631018400192, 0.04224604368209839, -0.030141690745949745, 0.013773004524409771, 0.024513298645615578, 0.002699972363188863, -0.013825977221131325, -0.013667058199644089, 0.0044464292004704475, 0.001953382743522525, -0.008098261430859566, -0.004241158254444599, -0.012898948043584824, -0.03604818880558014, -0.03573035076260567, -0.012402325868606567, -0.01487219613045454, 0.017335444688796997, 0.04015360400080681, 0.0024831139016896486, 0.0165540911257267, -0.017494363710284233, -0.024447083473205566, -0.05673418566584587, -0.017679769545793533, 0.01575949601829052, -0.009290155954658985, -0.0007912855944596231, -0.007952585816383362, 0.002401998732239008, 0.008568397723138332, 0.004840416368097067, -0.026592493057250977, 0.00013595048221759498, -0.015322467312216759, 0.01932193525135517, 0.023493567481637, -0.015799226239323616, 0.03506818786263466, 0.005767445545643568, -0.026076005771756172, 0.01986491121351719, -0.033770348876714706, -0.018792204558849335, 0.005125146824866533, -0.059276893734931946, -0.010501915588974953, 0.014077600091695786, -0.0077142068184912205, -0.0094093456864357, 0.020500587299466133, -0.0011049855966120958, -0.016646794974803925, -0.041054148226976395, -0.012687056325376034, -0.023904109373688698, 0.03128061071038246, -0.010316509753465652, -0.0038372385315597057, -0.0002058915124507621, 0.034432511776685715, -0.022473834455013275, -0.02114950865507126, -0.03231358900666237, -0.0006654745084233582, -0.016911661252379417, 0.011203809641301632, -0.017745986580848694, -0.04420604556798935, 0.02648654766380787, 0.020646262913942337, 0.006310419645160437, 0.005015889648348093, -0.0011827899143099785, -0.03766386955976486, -0.00999867171049118, 0.0004891733988188207, 0.0017232809914276004, -0.01564030535519123, -0.012673812918365002, 0.03610116243362427, -0.00258409371599555, 0.0018192947609350085, 0.017706256359815598, 0.04113360866904259, 0.0029019322246313095, 0.0099655631929636, 0.014607330784201622, -0.013759761117398739, 0.007495692931115627, -0.005515823606401682, 0.015137061476707458, 0.004648388829082251, -0.02348032407462597, 0.019533827900886536, 0.02913520112633705, 0.013408814556896687, 0.0233081616461277, -0.0013458476169034839, 0.010170834138989449, 0.006866637151688337, 0.004333861172199249, -0.007522179279476404, -0.0017597000114619732, -0.020752210170030594, -0.018871665000915527, -0.014210032299160957, 0.0745331421494484, 0.0036485218442976475, 0.0060290005058050156, 0.012713542208075523, -0.02569195069372654, 0.011660702526569366, 0.0038736574351787567, -0.014461655169725418, 0.018606798723340034, -0.024725191295146942, 0.051224980503320694, -0.03896171227097511, -0.018673015758395195, -0.0001552980684209615, -0.019096801057457924, 0.011852730065584183, 0.023718703538179398, -0.036207109689712524, 0.004880146123468876, -0.0003064576303586364, 0.002550985664129257, -0.0009377893293276429, -0.009747049771249294, 0.013971653766930103, -0.032287102192640305, -0.017626797780394554, -0.002065950771793723, -0.001374817336909473, 0.004946362692862749, -0.014170303009450436, 0.0024351070169359446, -0.04741092026233673, 0.012150703929364681, 0.016170037910342216, 0.0009195798193104565, 0.016461389139294624, 0.011236917227506638, 0.0009113027481362224, 0.011170701123774052, 0.004287509713321924, 0.0018623353680595756, -5.845663690706715e-05, 0.029479527845978737, 0.007138124667108059, -0.0011968608014285564, -0.02023572288453579, -0.004456361755728722, 0.036577921360731125, 0.021679239347577095, 0.02379816211760044, 0.004787443205714226, -0.02759898267686367, -0.004724537953734398, -0.0014344120863825083, -0.015031115151941776, -0.005406566429883242, 0.04942389577627182, 0.004019333515316248, -0.010203942656517029, -0.0031270680483430624, -0.03234007582068443, 0.007171232718974352, -0.03573035076260567, 0.02072572335600853, -0.007581774145364761, -0.011879215948283672, 0.009680832736194134, 0.03165142238140106, -0.010448942892253399, 0.024500055238604546, 0.0165540911257267, 0.0035260214935988188, 0.013561111874878407, 0.01505760196596384, -0.01072705164551735, -0.01717652566730976, -0.011051511391997337, -0.015362197533249855, -0.0171103086322546, -0.009415967389941216, 0.007018934935331345, 0.01662030816078186, -0.013971653766930103, 0.027916820719838142, -0.02692357450723648, 0.016262739896774292, -0.029161687940359116, -0.014739763922989368, -0.04727848619222641, -0.016461389139294624, 0.030989259481430054, 0.017507607117295265, -0.006009135395288467, -0.024976814165711403, -0.021493833512067795, -0.0033902779687196016, 0.006432920228689909, 0.01199178397655487, 0.014819223433732986, 0.011091241613030434, 0.04719902575016022, 0.00868096575140953, -0.002537742257118225, 0.016540849581360817, -0.011203809641301632, 0.012528136372566223, 0.01422327570617199, 0.004022644367069006, -0.006701096426695585, 0.01687193103134632, -0.011415701359510422, -0.028976282104849815, -0.05445634201169014, -0.0053867013193666935, 0.020076802000403404, -0.012283136136829853, -0.015123818069696426, -0.003057540860027075, -0.028420064598321915, -0.014911926351487637, 0.008694209158420563, 0.01262746099382639, -0.009025290608406067, -0.004502713214606047, 0.0021636197343468666, -0.0033935888204723597, -0.007694341707974672, 0.004423253238201141, -0.002401998732239008, -0.007184476125985384, -0.017428148537874222, -0.006436231080442667, -0.056628238409757614, -0.001052840263582766, 0.007091773208230734, 0.032896291464567184, 0.0034035213757306337, 0.02582438290119171, -0.0004982781829312444, -0.030750881880521774, 0.019600044935941696, 0.0214541032910347, -0.021533561870455742, -0.030141690745949745, -0.03403521329164505, -0.06409744173288345, 0.0077142068184912205, 0.007588395848870277, 0.008707452565431595, 0.023347891867160797, -0.021718967705965042, -0.0009651035652495921, 0.007323530502617359, -0.007469206117093563, -0.00367169757373631, 0.00809163972735405, 0.024923840537667274, -0.03358494117856026, 0.0161832794547081, -0.012422190979123116, 0.014236519113183022, 0.021123021841049194, 0.026261411607265472, -0.021917616948485374, -0.02447357028722763, -0.03469737619161606, 0.03035358339548111, -0.01753409393131733, 0.03535953909158707, -0.04849686846137047, -0.023586269468069077, -0.03790224716067314, -0.031360071152448654, 0.02226194366812706, -0.0032677778508514166, -0.024208704009652138, 0.0036882515996694565, -0.029876824468374252, 0.004131901543587446, 0.021440859884023666, 0.01667328178882599, -0.007356638554483652, 0.01042907778173685, 0.006032310891896486, -0.034803323447704315, -0.012581110000610352, -0.013349220156669617, 0.0033886225428432226, -0.026234924793243408, 0.008144613355398178, -0.003285987302660942, -0.020513830706477165, -0.042775772511959076, -0.01734868809580803, 0.03353196755051613, 0.012773137539625168, 0.010177455842494965, 0.003684940980747342, -0.00013295005192048848, -4.855004954151809e-05, 0.03766386955976486, -0.008508803322911263, -0.010323131456971169, -0.004969538189470768, 0.02194410376250744, 0.013600842095911503, -0.008806777186691761, 0.0077936663292348385, -0.0044464292004704475, -0.0029565608128905296, -0.01613030768930912, -0.001402131631039083, -0.012071243487298489, 0.015733009204268456, 0.009065020829439163, 0.0208581555634737, -0.01589192822575569, 0.03557143360376358, -0.032525479793548584, -0.0060190679505467415, -0.002701627789065242, -0.02036815509200096, 0.017375174909830093, -0.01697787642478943, 0.009654346853494644, -0.040444958955049515, -0.024116002023220062, -0.012865840457379818, 0.007859882898628712, 0.005774067249149084, 0.010621105320751667, -0.024566272273659706, -0.0005177292041480541, -0.004181563854217529, 0.001748112146742642, -0.010422456078231335, 0.04738443344831467, 0.03724008426070213, -0.0021172682754695415, -0.009680832736194134, 0.023215457797050476, -0.023043295368552208, 0.018924638628959656, 0.026566006243228912, 0.008356506004929543, -0.053741205483675, -0.028473038226366043, 0.009826509281992912, 0.017772473394870758, 0.003315784502774477, -0.0052244714461266994, -0.0017166592879220843, 0.03766386955976486, -0.00012332799087744206, 0.005654877983033657, 0.009753670543432236, 0.06081311032176018, -0.004876835271716118, 0.011971918866038322, -0.006687853019684553, 0.019083557650446892, -0.021109778434038162, 0.04640442878007889, 0.017388418316841125, -0.0029201419092714787, 0.016448145732283592, -0.00016512707225047052, -0.021414373070001602, 0.0376373827457428, 0.013706788420677185, 0.0242749210447073, -0.03220764175057411, 0.010601240210235119, 0.024063028395175934, 0.03742549195885658, -0.019891396164894104, 0.022778430953621864, -0.015282738022506237, -0.0092239398509264, 0.021056804805994034, -0.03109520673751831, 0.004155077040195465, -0.03686927258968353, 0.009376238100230694, 0.04280225932598114, -0.014514627866446972, 0.025943573564291, 0.02955898642539978, -0.0022232146002352238, 0.010131103917956352, -0.0008037011721171439, -0.012898948043584824, -0.00018240540521219373, 0.0018292271997779608, -0.01802409440279007, -0.008627993054687977, -0.033399537205696106, -0.031677909195423126, -0.02114950865507126, 0.02900276891887188, 0.0016777572454884648, 0.004780821967869997, 0.010998538695275784, 0.013117462396621704, 0.020315181463956833, 0.005366836674511433, 0.017587067559361458, 0.0012208642438054085, -0.017613554373383522, -0.003330683335661888, 0.0022414240520447493, -0.01299827266484499, 0.040683336555957794, 0.023957081139087677, -0.008389613591134548, -0.007416233420372009, 0.009184210561215878, -0.006595150101929903, -0.015746252611279488, 0.011455431580543518, 0.003231358714401722, -0.024063028395175934, 0.003231358714401722, -0.006350149866193533, -0.01177989225834608, 0.0172957144677639, -0.02937358058989048, 0.0023010186851024628, -0.00171003770083189, -0.007992316037416458, 0.025744924321770668, -0.010501915588974953, -0.019454369321465492, 0.033505480736494064, -0.015269494615495205, 0.02336113527417183, -0.029347093775868416, 0.0017795648891478777, -0.02337437868118286, 0.035412512719631195, 0.0003134931030217558, 0.01343530137091875, -0.010587996803224087, -0.017891662195324898, -0.05726391449570656, 0.026261411607265472, 0.01724274270236492, 0.014567600563168526, 0.039888739585876465, -0.03342602401971817, 0.04574226588010788, 0.022712213918566704, 0.014342465437948704, 0.006724271923303604, 0.0037081167101860046, -0.022434106096625328, -0.022963836789131165, 0.007661233656108379, -0.03673684224486351, 0.03332007676362991, -0.04052441567182541, -0.018474366515874863, -0.013865707442164421, 0.03440602496266365, -0.017269229516386986, -0.024142486974596977, 0.04052441567182541, -0.012110973708331585, -0.002353991847485304, 0.03297575190663338, 0.02447357028722763, -0.035174135118722916, 0.0025195328053086996, -0.003714738180860877, 0.020447613671422005, 0.0013673680368810892, 0.03514764830470085, 0.04709308221936226, 0.0022960526403039694, 0.03263142704963684, 0.02765195444226265, -0.010594618506729603, 0.004744402598589659, -0.03241953253746033, -0.018302204087376595, 0.013329355046153069, 0.014805980026721954, 0.05162227898836136, -0.023467080667614937, -0.011918946169316769, -0.022301672026515007, 0.023533297702670097, -0.011799756437540054], "index": 69}, {"title": "Jeff Stover", "text": "Jeff Stover is a retired defensive lineman for the San Francisco 49ers American football team during the 1980s.", "vector": [-0.014568816870450974, 0.03197459504008293, -0.038306817412376404, -0.00041192761273123324, -0.03335389122366905, -0.007797725964337587, -0.020046817138791084, 0.003487425157800317, -0.0462377704679966, 0.07109645009040833, -0.06551656872034073, 0.01963929831981659, -0.010101777501404285, 0.01536034420132637, 0.012829022482037544, -0.06244450435042381, -0.04460769519209862, 0.020031142979860306, 0.012131537310779095, -0.04956062138080597, 0.03557957336306572, 0.024529529735445976, -0.015250627882778645, 0.032758284360170364, 0.03445105999708176, 0.005348691251128912, 0.01788382977247238, -0.009858833625912666, 0.013032781891524792, 0.025344569236040115, -0.00014400323561858386, 0.017350919544696808, 0.005642575677484274, -0.005513266660273075, -0.018228653818368912, 0.06476423144340515, -0.0294667836278677, 0.002981944475322962, 0.0234480369836092, 0.01999979466199875, 0.016128361225128174, -0.06545387953519821, 0.029889976605772972, 0.012962250038981438, 0.041410233825445175, 0.036896172910928726, -0.00019408598018344492, -0.015430876985192299, -0.0006034420803189278, 0.02542293816804886, 0.025266198441386223, -0.035266097635030746, 0.015187932178378105, -0.05517185106873512, -0.006614352576434612, -0.006978768855333328, -0.018103262409567833, 0.09040659666061401, -0.020987246185541153, 0.010376069694757462, -0.03191189840435982, -0.04228796809911728, 0.0076684169471263885, -0.017491983249783516, 0.007546945009380579, 0.009600215591490269, 0.028244225308299065, 0.05742888152599335, 0.02899656817317009, 0.003900822252035141, -0.010360395535826683, 0.019780362024903297, 0.05407468229532242, 0.039215900003910065, -0.016363469883799553, -0.008816524408757687, -0.004192747175693512, -0.0003257216012571007, -0.05112800374627113, 0.008040670305490494, 0.004823618568480015, -0.024654921144247055, -0.009553194046020508, 0.01722552999854088, 0.02484300546348095, -0.022131435573101044, 0.04385535046458244, -0.0658300444483757, -0.002805613912642002, 0.017241202294826508, -0.0024745045229792595, 0.0018064078176394105, 0.013330584391951561, -0.01722552999854088, 0.04263279214501381, 0.03313445672392845, -0.009561031125485897, 0.012507708743214607, 0.007104159332811832, -0.02275838889181614, 0.007574373856186867, -0.006583004724234343, 0.019827382639050484, -0.017742766067385674, 0.0348585769534111, 0.006324386689811945, -0.013009271584451199, 0.02830692008137703, 0.018510783091187477, 0.023259950801730156, 0.04470173642039299, 0.013416790403425694, -0.007433309685438871, 0.04830671474337578, -0.00785258412361145, 0.014560979790985584, 0.00895758904516697, 0.02148880809545517, 0.024404138326644897, -0.03039153851568699, 0.011347846128046513, 0.000153799366671592, -0.015548430383205414, 0.012680120766162872, 0.0432283990085125, -0.011449726298451424, 0.011935614980757236, -0.006661374121904373, 0.021520156413316727, 0.02346370927989483, -0.0671466514468193, 0.0024784228298813105, -0.02159852534532547, 0.009412129409611225, -0.04999949038028717, 0.008173897862434387, 0.040030937641859055, 0.03460779786109924, -0.010744404047727585, 0.013573529198765755, 0.023824207484722137, -0.0014752984279766679, 0.016222404316067696, 0.024231726303696632, -0.009788300842046738, -0.03583035618066788, 0.061033859848976135, 0.08451323956251144, -0.007805563043802977, -0.0787452757358551, 0.01962362416088581, 0.030328843742609024, 0.0012813349021598697, -0.019263125956058502, 0.052162475883960724, -0.03347928076982498, -0.042789530009031296, 0.018181633204221725, -0.029889976605772972, -0.019607950001955032, -0.04573620855808258, 0.016551554203033447, -0.04507790878415108, 0.04736628755927086, -0.04727224260568619, -0.020266249775886536, 0.05761696398258209, -0.019263125956058502, 0.005771884694695473, -0.00040507031371816993, -1.3806432434648741e-05, 0.005987399723380804, 0.006477206479758024, 0.012891717255115509, -0.003411015262827277, -0.04858884587883949, -0.01206100545823574, -0.011488910764455795, 0.04573620855808258, -0.002268785610795021, -0.03039153851568699, 0.00924755446612835, -0.025234851986169815, -0.015046868473291397, -0.024325769394636154, -0.004470957443118095, 0.005058725830167532, 0.012805511243641376, 0.060469601303339005, -0.08702105283737183, -0.015376018360257149, -0.005744455382227898, 0.011097065173089504, -0.0024470752105116844, 0.03730369359254837, 0.0600307323038578, 0.023024842143058777, 0.0171001385897398, -0.019451212137937546, -0.03717830404639244, 0.04883962497115135, 0.040469806641340256, 0.02112830989062786, -0.016473185271024704, 0.030219126492738724, -0.013816473074257374, 0.0006734844646416605, 0.030563950538635254, -0.04482712969183922, 0.006504635792225599, 0.009905855171382427, -0.016896378248929977, 0.012680120766162872, -0.037585821002721786, -0.010352558456361294, 0.021629873663187027, 0.015454387292265892, -0.017147159203886986, 0.04275818169116974, 0.02819720469415188, 0.027397839352488518, 0.004659043159335852, -0.03611248359084129, -0.011927777901291847, 0.04357322305440903, -0.002482341369614005, -0.03793064504861832, -0.025673719123005867, 0.03727234527468681, 0.01547789853066206, -0.06291471421718597, 0.0020532705821096897, -0.008706807158887386, 0.04009363427758217, -0.006974850315600634, -0.042664140462875366, -0.01547006145119667, -0.016426164656877518, -0.008581416681408882, -0.008761665783822536, -0.005333017557859421, 0.02576776221394539, 0.009341597557067871, 0.031206578016281128, 0.030234800651669502, 0.07209957391023636, -0.026300672441720963, -0.027695640921592712, -0.044889822602272034, -0.0011432092869654298, -0.05633171275258064, -0.013299237005412579, -0.018228653818368912, -0.011841571889817715, 0.021394765004515648, -0.0066927215084433556, -0.007354940287768841, 0.013213030993938446, 0.024169031530618668, -0.0017025688430294394, -0.01835404522716999, -0.014913640916347504, 0.0408773235976696, -0.02250760607421398, 0.0005128278280608356, 0.01265661045908928, -0.014263177290558815, 0.018432414159178734, 0.039560724049806595, -0.015517082996666431, 0.012100189924240112, -0.011018696241080761, -0.010399580001831055, 0.032052963972091675, 0.02816585637629032, -0.01777411252260208, -0.03142601251602173, -0.012578241527080536, 0.03278963267803192, 0.029294371604919434, 0.022585976868867874, -0.026410387828946114, 0.012452851049602032, 0.00508615467697382, 0.013260052539408207, 0.023620449006557465, -0.00826010387390852, 0.013071966357529163, 0.03479588404297829, -0.0011363520752638578, -0.03454510122537613, -0.03325984627008438, 0.050751831382513046, 0.02112830989062786, 0.06677047908306122, 0.012915228493511677, 0.0205483790487051, 0.045924294739961624, 0.03175516054034233, 0.013620550744235516, 0.025595350190997124, 0.009396455250680447, -0.006626107729971409, -0.06426266580820084, -0.046613942831754684, -0.031943246722221375, -0.003916495945304632, 0.02114398404955864, 0.006050094962120056, -0.03257019817829132, -0.00795054528862238, -0.041849102824926376, -0.0265671256929636, 0.006516390945762396, 0.04250740259885788, 0.023604774847626686, 0.004831455182284117, 0.0025058521423488855, -0.04062654450535774, -0.015234953723847866, 0.016253752633929253, 0.0016917930915951729, 0.008126876316964626, 0.015736516565084457, -0.011089228093624115, -0.00861276499927044, 0.01730389893054962, 0.034137580543756485, -0.025908825919032097, 0.00756261870265007, 0.011567279696464539, 0.004020335152745247, -0.007284408435225487, 0.008636275306344032, -0.0027879809495061636, 0.016457511112093925, -0.027695640921592712, 0.0007538128411397338, -0.016598576679825783, -0.00158795400056988, -0.0169904213398695, -0.03595574572682381, -0.037711214274168015, -0.014239666052162647, -0.009866670705378056, -0.02967054210603237, 0.07297731190919876, 0.03514070808887482, -0.028557701036334038, -0.023620449006557465, 0.0007498943596147001, -0.019106388092041016, 0.015618962235748768, 0.013510833494365215, -0.022962147369980812, 0.01398104801774025, -0.004228013101965189, -0.030924448743462563, 0.00013298257545102388, -0.001412603072822094, 0.06285202503204346, 0.008965425193309784, 0.04125349596142769, 0.013440301641821861, 0.025548327714204788, 0.002940800739452243, 0.03514070808887482, -0.013260052539408207, -0.007437228225171566, -0.01068170927464962, 0.033761411905288696, -0.04413747787475586, 0.0029505968559533358, 0.08401168137788773, 0.028009118512272835, -0.050062183290719986, 0.005450571421533823, -0.009945039637386799, -0.04006228595972061, -0.007300082128494978, -0.0010550441220402718, 0.018448086455464363, 0.0233383197337389, 0.007660579867660999, -0.0013792961835861206, 0.012578241527080536, 0.028573375195264816, 0.04448230564594269, -0.04125349596142769, 0.006865133531391621, -0.00669664004817605, 0.01061901357024908, -0.046707987785339355, -0.055391281843185425, 0.05993669107556343, -0.02990565076470375, 0.003810697700828314, 0.04056384786963463, -0.02032894641160965, -0.004992112051695585, -0.013620550744235516, 0.005199790000915527, -0.04031306877732277, -0.05347907543182373, -0.012852532789111137, -0.018338371068239212, -0.03542283549904823, 0.002513688988983631, 0.023134559392929077, 0.018683195114135742, -0.020062491297721863, 0.03316580504179001, -0.02885550446808338, 0.0020415151957422495, 0.06169215962290764, -0.0015713005559518933, 0.04849480092525482, 0.0247332900762558, -0.01368324551731348, 0.018165959045290947, 0.014365056529641151, 0.07310269773006439, -0.007966219447553158, -0.038996465504169464, 0.014216155745089054, -0.006289120763540268, -0.03313445672392845, -0.02562669664621353, 0.002159068826586008, -0.014169134199619293, -0.030172105878591537, -0.008377657271921635, -0.03595574572682381, 0.04589294642210007, -0.008314961567521095, -0.08093961328268051, -0.013416790403425694, -0.01293873880058527, 0.03557957336306572, 0.0265671256929636, -0.023526405915617943, 0.01507037878036499, -0.038745686411857605, 0.02031327225267887, 0.008189571090042591, -0.03488992527127266, -0.03974881023168564, -0.023698817938566208, 0.01137919444590807, 0.03108118660748005, 0.013111150823533535, -0.03815007954835892, -0.015234953723847866, -0.023416688665747643, -0.022585976868867874, 0.0016016685403883457, 0.023714490234851837, -0.016582902520895004, -0.05084587633609772, 0.021316396072506905, 0.010070430114865303, -0.03294637054204941, 0.0054348972626030445, -0.004882395267486572, 0.016708293929696083, 0.0021335987839847803, -0.059654563665390015, -0.028918199241161346, -0.030799057334661484, -0.009568867273628712, 0.03579900786280632, -0.020234903320670128, 0.007456820458173752, 0.053290992975234985, 0.03554822504520416, -0.002196294255554676, 0.011340009048581123, -0.029388414695858955, -0.0010187983280047774, -0.005587717052549124, 0.01270363200455904, 0.020532704889774323, -0.05128474161028862, -0.05084587633609772, 0.029607847332954407, -0.01398104801774025, -0.0205483790487051, -0.01398104801774025, 0.007527352310717106, 0.0006470349035225809, 0.005238974466919899, 0.020125186070799828, -0.0247332900762558, -0.016002971678972244, 0.013158172369003296, 0.0034325667656958103, -0.01057199202477932, -0.0068847257643938065, 0.018056241795420647, -0.004525815602391958, 0.04655124992132187, -0.027444859966635704, 0.02158285118639469, 0.04285222664475441, 0.011818060651421547, -0.023479383438825607, 0.053886596113443375, 0.021535830572247505, -0.03104984015226364, 0.021896326914429665, 0.004835373722016811, 0.029592173174023628, -0.053667161613702774, 0.0011559443082660437, -0.03777390718460083, -0.011340009048581123, -0.011332172900438309, -0.006649618502706289, 0.02413768507540226, 0.03347928076982498, -0.012468524277210236, 0.0065477387979626656, 0.03868298977613449, -0.003965476527810097, 0.0380873866379261, 0.010117451660335064, 0.017617374658584595, -0.05633171275258064, -0.02816585637629032, 0.012664447538554668, 0.048338063061237335, 0.0030642319470643997, 0.01962362416088581, 0.051002614200115204, -0.022366542369127274, -0.005297751631587744, -0.050657790154218674, 0.01310331467539072, 0.038745686411857605, -0.03108118660748005, 0.024874353781342506, -0.05316559970378876, -0.009890181012451649, -0.014294524677097797, -0.009553194046020508, -0.01824432797729969, -0.015336833894252777, -0.02620662935078144, -0.01791517809033394, 0.0026077318470925093, 0.03843221068382263, 0.028683092445135117, 0.03664539381861687, -0.02449818141758442, 0.0204386617988348, -0.06291471421718597, -0.019796036183834076, 0.09147241711616516, 0.006347897462546825, -0.040469806641340256, 0.003493302734568715, 0.0018289389554411173, -0.031002817675471306, 0.02446683496236801, -0.02020355500280857, 0.00385380070656538, -0.008722481317818165, 0.03871433809399605, -0.03652000427246094, 0.009145674295723438, -0.013267889618873596, -0.014827434904873371, -0.005811069160699844, -0.04288357496261597, 0.01229611225426197, -0.010164473205804825, -0.001126555842347443, 0.003373790066689253, -0.00013053354632575065, -0.033980842679739, 0.011144086718559265, -0.03291502222418785, -0.05162956565618515, 0.010211494751274586, -0.005301669705659151, 0.009380782023072243, -0.015376018360257149, 0.016582902520895004, -0.01121461857110262, -0.021065615117549896, 0.013730267062783241, -0.024968396872282028, -0.020501358434557915, 0.010007734410464764, 0.0346391424536705, -0.0003433546517044306, -0.009012446738779545, 0.004870639648288488, 0.032413460314273834, 0.003336564637720585, 0.03927859663963318, 0.027115710079669952, 0.02045433595776558, -0.06056364253163338, 0.021912001073360443, 0.009059468284249306, 0.015626799315214157, 0.0022766224574297667, 0.008589253760874271, -0.024325769394636154, 0.014952825382351875, -0.030987143516540527, 0.07717789709568024, -0.005705270916223526, -0.014114275574684143, -0.003810697700828314, -0.07109645009040833, 0.01673964038491249, 0.019607950001955032, 0.0017495902720838785, -0.013957537710666656, 0.03561092168092728, 0.014012396335601807, -0.017491983249783516, 0.012256927788257599, 0.007981893606483936, 0.0005588696803897619, -0.0019533499144017696, -0.02101859450340271, 0.0102193308994174, 0.017617374658584595, -0.0623818077147007, 0.02609691210091114, 0.008636275306344032, -0.024043641984462738, 0.008738155476748943, 0.00025494449073448777, -0.05028161779046059, 6.76545751048252e-05, -0.018542129546403885, 0.008565743453800678, 0.007840828970074654, 0.023761512711644173, 0.021676894277334213, -0.032726939767599106, -0.010956000536680222, -0.010783588513731956, -0.04159832000732422, 0.038056038320064545, 0.04438826069235802, 0.0007327511557377875, -0.046143729239702225, 0.02611258625984192, 0.0023647877387702465, 0.015783537179231644, 0.020250577479600906, -0.007746785879135132, 0.016896378248929977, 0.005673923064023256, -0.03739773854613304, -0.015877580270171165, 0.0021453541703522205, -0.0014978295657783747, 0.030344517901539803, -0.00476484140381217, 0.006116708740592003, -0.015517082996666431, 0.024090662598609924, -0.022241152822971344, 0.04862019419670105, -0.005419223569333553, 0.04934118688106537, -0.0006764233112335205, -0.00952968280762434, 0.008879219181835651, 0.005321262404322624, -0.027100035920739174, -0.011488910764455795, -0.0352974459528923, -0.00999206118285656, -0.04351052641868591, 0.06050094962120056, 0.007272652816027403, 0.029404088854789734, 0.01894965022802353, -0.0019259207183495164, -0.008040670305490494, 0.023730164393782616, 0.0029917405918240547, 0.007746785879135132, -0.007586129475384951, 0.029654869809746742, 0.03981150686740875, 0.03974881023168564, 0.006097116507589817, -0.024654921144247055, -0.0024940967559814453, -0.03570496290922165, -0.04554812237620354, -0.013698919676244259, -0.027444859966635704, 0.031927574425935745, 0.028557701036334038, 0.006269528530538082, 0.021441787481307983, 0.009466988034546375, -0.009004609659314156, -0.0475543737411499, 0.03288367763161659, -0.010407417081296444, 0.0030897019896656275, -0.021943349391222, 0.013644061051309109, 0.013064130209386349, -0.055610716342926025, 0.027303796261548996, 0.0007557720527984202, -0.030642319470643997, -0.010760078206658363, 0.006857296451926231, 0.003248399356380105, 0.011355683207511902, -0.04633181542158127, -0.0032150924671441317, -0.0009869609493762255, -0.01022716797888279, -0.04896501824259758, -0.0034325667656958103, -0.010391742922365665, 0.005756210535764694, 0.02623797580599785, -0.032852329313755035, -0.017946524545550346, 0.00025298527907580137, 0.013032781891524792, -0.0005466244765557349, -0.01952958106994629, -0.003593223402276635, 0.007288326509296894, 0.006626107729971409, 0.03858894854784012, -0.04554812237620354, 0.0032111741602420807, 0.003738206345587969, -0.021457461640238762, -0.001973921898752451, -0.04282087832689285, 0.037836603820323944, -0.01766439527273178, -0.02540726400911808, 0.016912052407860756, 0.01730389893054962, -0.015195769257843494, -0.0019033895805478096, 0.010830610059201717, 0.0004146215505897999, 0.005732700228691101, -0.0054348972626030445, -0.026363367214798927, -0.02471761591732502, 0.03235076740384102, 0.03617518022656441, 0.02056405320763588, 0.03789930045604706, -0.005274240858852863, -0.019592275843024254, -0.010705219581723213, 0.016896378248929977, -0.012625263072550297, -0.006869052071124315, 0.00861276499927044, 0.012162884697318077, -0.025031091645359993, -0.0021335987839847803, 0.002691978821530938, 0.012319623492658138, -0.013361932709813118, -0.008847871795296669, -0.035266097635030746, -0.056770578026771545, -0.04379265382885933, 0.011175434105098248, -0.0432283990085125, -0.03247615694999695, -0.03028182126581669, -0.01576002687215805, -0.0031523972284048796, 0.011308661662042141, 0.013651898130774498, -0.02658279985189438, -0.007347103673964739, 0.038651641458272934, -0.006195077672600746, 0.008988936431705952, 0.0018622458446770906, -0.006751498207449913, -0.041755057871341705, 0.006394919008016586, 0.02531322091817856, 0.002693937858566642, 0.03325984627008438, 0.0031328049954026937, -0.01662992313504219, -0.02830692008137703, 0.026394713670015335, -0.040250372141599655, 0.04238201305270195, -0.030908774584531784, -0.009670747444033623, -0.0059834811836481094, -0.00501954136416316, 0.01438073068857193, 0.030219126492738724, -0.0063008759170770645, 0.006379245314747095, -0.013463811948895454, 0.00029119019745849073, 0.0003078436420764774, -0.019592275843024254, -0.006293039303272963, -0.01766439527273178, 0.00020020856754854321, -0.021457461640238762, -0.0012431299546733499, -0.020187880843877792, 0.025830456987023354, 0.012256927788257599, -0.0023804616648703814, 0.025093786418437958, -0.007108077872544527, -0.03003104031085968, 0.002360869199037552, -0.03915320336818695, 0.007985811680555344, -0.04351052641868591, 0.03890242427587509, 0.01753900572657585, -0.012719305232167244, 0.016708293929696083, 0.008722481317818165, 0.02377718687057495, -0.012852532789111137, -0.015297649428248405, 0.010509297251701355, 0.051096655428409576, -0.02703734114766121, -0.022664345800876617, -0.00918485876172781, -0.027350816875696182, -0.012876044027507305, 0.009098652750253677, -0.01195912528783083, -0.006347897462546825, 0.010736566968262196, 0.013502996414899826, 0.02910628542304039, 0.003940006718039513, 0.001029574079439044, -0.030532604083418846, -0.0037871869280934334, 0.035736311227083206, 0.006124545354396105, 0.030469907447695732, -0.02805613912642002, 0.01826000213623047, -0.015438714064657688, 0.02277406118810177, -0.02760159783065319, 0.03291502222418785, -0.05125339329242706, 0.01904369331896305, -0.0220530666410923, 0.019780362024903297, -0.0049607641994953156, -0.017821134999394417, -0.007586129475384951, 0.002180620329454541, 0.003906699828803539, 0.0052154636941850185, 0.032068636268377304, 0.0029172899667173624, 0.03601843863725662, -0.030516929924488068, -0.008244429714977741, 0.012421502731740475, -0.01056415494531393, -0.05325964465737343, -0.028824156150221825, -0.04727224260568619, -0.02007816545665264, -0.04310300573706627, -0.013024944812059402, -0.022711366415023804, -0.008244429714977741, -0.022476259618997574, -2.4276054318761453e-05, 0.015187932178378105, -0.01826000213623047, -0.013471649028360844, 0.0267865601927042, 0.009490498341619968, 0.003749961731955409, 0.0023275623098015785, -0.009576704353094101, 0.020705116912722588, 0.04617507755756378, 0.0036480817943811417, -0.008479537442326546, 0.029968345537781715, -0.013126824982464314, 0.06310280412435532, 0.02032894641160965, -0.02863606996834278, 0.045579470694065094, 0.043604571372270584, 0.038745686411857605, 0.005999154876917601, -0.003458036808297038, 0.03912185877561569, 0.01766439527273178, 0.0033620346803218126, 0.0021316397469490767, -0.009145674295723438, 0.030234800651669502, -0.011347846128046513, -0.0032092148903757334, 0.01131649874150753, 0.020250577479600906, 0.01871454156935215, 0.07448199391365051, -0.01264877337962389, -0.0205483790487051, 0.0038283306639641523, -0.03592439740896225, -0.005442734342068434, 0.04078328236937523, 0.012829022482037544, 0.03335389122366905, 0.040124982595443726, 0.004396506585180759, 0.040720585733652115, 0.013565692119300365, 0.0032601547427475452, 0.038526251912117004, -0.006269528530538082, -0.016880705952644348, 0.016097014769911766, -0.05178630352020264, -0.04285222664475441, -0.0013019067700952291, 0.047742459923028946, -0.026943298056721687, -0.02830692008137703, -0.03083040565252304, -0.006104953121393919, -0.004847129341214895, 0.0103290481492877, -0.003961558453738689, 0.016661271452903748, -0.005419223569333553, 0.0021923757158219814, -0.010235005058348179, 0.018338371068239212, 0.02899656817317009, 0.029529478400945663, 0.00016077912005130202, -0.0006656475597992539, -0.009498335421085358, -0.03322850167751312, -0.03567361459136009, -0.028228551149368286, -0.019216105341911316, -0.00629695737734437, 0.013526507653295994, 0.002488219179213047, 0.010877631604671478, 0.06266393512487411, -0.007182528264820576, -0.00501954136416316, 0.0019944936502724886, -0.007472494151443243, 0.008753828704357147, -0.026426061987876892, 0.029372740536928177, 0.04272683709859848, 0.0035364057403057814, -0.002582262037321925, 0.029639195650815964, -0.009686421602964401, -0.022272499278187752, -0.045454081147909164, 0.004521897528320551, -0.027883727103471756, -0.03257019817829132, 0.01201398391276598, 0.015783537179231644, -0.01604999229311943, -0.033980842679739, -0.03294637054204941, -0.005818906240165234, 0.00025445467326790094, 0.02703734114766121, -0.008847871795296669, 0.01379296276718378, -0.010877631604671478, -0.014858782291412354, -0.0031994187738746405, 0.03473318740725517, -0.07554781436920166, 0.004894150421023369, -0.02589315176010132, 0.008918403647840023, 0.035046663135290146, -0.005842416547238827, -0.01791517809033394, 0.01811893656849861, -0.0013009271351620555, 0.024106336757540703, -0.01996844820678234, 0.05777370557188988, -0.020281923934817314, 0.0063008759170770645, 0.0022922963835299015, 0.0004525815893430263, -0.01432587206363678, 0.009012446738779545, -0.025093786418437958, 0.03949802741408348, 0.03473318740725517, 0.0014645226765424013, -0.06865133345127106, 0.021049940958619118, -0.01604999229311943, -0.055736105889081955, -0.002472545253112912, -0.029263023287057877, -0.008432515896856785, 0.04943523183465004, -0.020626747980713844, -0.006359652616083622, 0.013095477595925331, 0.04034441336989403, -0.017021769657731056, 0.029576500877738, -0.05141013115644455, -0.06294606626033783, 0.0027468372136354446, -0.02112830989062786, -0.022554628551006317, -0.004631614312529564, -0.025109460577368736, 0.03479588404297829, 0.007629232481122017, 0.01777411252260208, 0.017507657408714294, -0.004839292261749506, 0.0231188852339983, -0.022256825119256973, 0.010407417081296444, -0.004114377778023481, 0.013260052539408207, -0.038056038320064545, 0.00546232657507062, 0.023385340347886086, -0.0014596246182918549, -0.02184930630028248, 0.019263125956058502, 0.005489755887538195, -0.01951390691101551, -0.010250679217278957, 0.03871433809399605, -0.04896501824259758, 0.011802387423813343, 0.002974107628688216, 0.014466936700046062, -0.023181581869721413, -0.02794642187654972, -0.022006044164299965, -0.03300906717777252, -0.0205483790487051, 0.03692752122879028, 0.016927726566791534, -0.011551606468856335, -0.005423142109066248, 0.009913691319525242, 0.051096655428409576, -0.012217743322253227, 0.003054435830563307, 0.023855555802583694, 0.00546232657507062, -0.007727193646132946, 0.014992009848356247, 0.03004671446979046, -0.0376485176384449, -0.023949598893523216, 0.031958919018507004, -0.007723275106400251, 0.03652000427246094, -0.011175434105098248, 0.021081289276480675, -0.01126947719603777, -0.03351062908768654, -0.03952937573194504, 0.05316559970378876, 0.02611258625984192, 0.017507657408714294, -0.0066417814232409, 0.019921425729990005, 0.001835796283558011, 0.017413614317774773, -0.013887004926800728, 0.01329139992594719, -0.017727091908454895, -0.01027418952435255, -0.0036461225245147943, 0.009898018091917038, 0.0056464942172169685, -0.0005941357812844217, 0.01062685064971447, -0.021441787481307983, 0.011183271184563637, -0.0184951089322567, 0.01235880795866251, 0.02412201091647148, -0.02448250912129879, 0.004988193511962891, -0.005924704484641552, 0.025156483054161072, -0.022789735347032547, 0.012789838016033173, -0.03780525550246239, -0.0038165755104273558, 0.022147109732031822, 0.05369850993156433, 0.002966270549222827, 0.0171001385897398, -0.005920785944908857, 0.00158207630738616, 0.02219413034617901, 0.0036324081011116505, 0.03811873123049736, -0.037491779774427414, -4.022539360448718e-05, 0.030799057334661484, 0.0701560229063034, 0.00029192492365837097, 0.009365107864141464, 0.002096373587846756, -0.012907391414046288, 0.008675459772348404, 0.002613609656691551, -0.007213876117020845, -0.02412201091647148, 0.014811760745942593, 0.029294371604919434, 0.0009374904329888523, 0.021316396072506905, -0.004208420868963003, -0.026363367214798927, -0.007178610190749168, 0.024858679622411728, -0.0072021204978227615, -0.002705693244934082, -0.008448189124464989, 0.0012137414887547493, -0.018620498478412628, -0.008573579601943493, -0.005082236602902412, 0.012155048549175262, -0.000502052076626569, 0.0234480369836092, -0.01896532252430916, -0.03150438144803047, 0.01780546084046364, -0.004549326375126839, 0.0038400860503315926, 0.04357322305440903, 0.03949802741408348, -0.011488910764455795, 0.025203503668308258, 0.012162884697318077, -0.018040567636489868, -0.0011216577840968966, 0.0059834811836481094, -0.05695866420865059, 0.0016104851383715868, -0.021426113322377205, 0.0048157814890146255, -0.026723865419626236, -0.01811893656849861, -0.020140860229730606, 0.01443558931350708, -0.025564001873135567, -0.029278697445988655, -0.004408262204378843, -0.02758592553436756, 0.006579086184501648, 0.01601080782711506, -0.025611022487282753, -0.010054755955934525, -0.003489384427666664, 0.01927880011498928, -0.016833683475852013, 0.0009144694777205586, -0.02034461870789528, -0.0013185602147132158, 0.005677841603755951, -0.011825897730886936, -0.051566869020462036, 0.032852329313755035, 0.009796137921512127, 0.009435640648007393, 0.02714705839753151, 0.022272499278187752, -0.01952958106994629, -0.04576755687594414, 0.047178201377391815, -0.022006044164299965, 0.00716293603181839, 0.007703682873398066, -0.018087590113282204, 0.021175332367420197, 0.0410967580974102, 0.005387875717133284, 0.024890027940273285, 0.030689341947436333, 0.003379667643457651, -0.02956082671880722, 0.02633201889693737, -0.015893254429101944, 0.0010491664288565516, -0.026958972215652466, 0.004984274972230196, -0.002523485105484724, -0.001905348850414157, -0.010187983512878418, 0.01507037878036499, 0.020877528935670853, 0.03357332572340965, 0.025219177827239037, -0.013040618970990181, -0.01195912528783083, 0.00018037139670923352, -0.023933924734592438, -0.009490498341619968, -0.011300824582576752, 0.03222537413239479, -0.01590109057724476, -0.013651898130774498, 0.023542078211903572, 0.0032915023621171713, 0.012891717255115509, -0.029654869809746742, -0.0029897813219577074, 0.008518721908330917, 0.02413768507540226, 0.00045870416215620935, 0.005231137853115797, -0.0018730215961113572, 0.01096383761614561, 0.005474081728607416, -0.0029643112793564796, -0.018651846796274185, 0.014396404847502708, -0.012789838016033173, 0.03730369359254837, 0.01547006145119667, 0.017382267862558365, -0.020626747980713844, -0.011966962367296219, -0.01896532252430916, 0.028479332104325294, 0.003577549709007144, 0.02368314377963543, -0.00011161474685650319, 0.004557163454592228, 0.03664539381861687, 0.002319725463166833, 0.002206090372055769, 0.011410541832447052, 0.03429431840777397, -0.008087691850960255, 0.023824207484722137, -0.023730164393782616, 0.03705291450023651, -0.0009962671902030706, -0.008761665783822536, -0.027977770194411278, -0.04583025351166725, 0.006927828770130873, -0.02703734114766121, 0.02288377843797207, 0.0007082608062773943, -0.005720944609493017, -0.0007229549810290337, 0.00615197466686368, -0.007629232481122017, -0.0006916073616594076, -0.01547789853066206, 0.0059717255644500256, -0.019796036183834076, 0.017852481454610825, -0.018573477864265442, -0.014161297120153904, 0.008628438226878643, -0.03197459504008293, 0.004882395267486572, -0.0006264630355872214, -0.04103406146168709, 0.05755427107214928, 0.015485734678804874, -0.036206524819135666, -0.02056405320763588, -0.025109460577368736, 0.013510833494365215, -0.0010805140482261777, 0.03003104031085968, -0.0012872125953435898, 0.014459099620580673, 0.0062656099908053875, 0.014263177290558815, -0.0011774958111345768, 0.023244276642799377, 0.026018543168902397, -0.01791517809033394, 0.0008576518739573658, -0.012844696640968323, -0.009427803568542004, -0.012421502731740475, -0.007789888884872198, 0.0073118372820317745, 0.023495057597756386, -0.019701993092894554, 0.0005701352492906153, -0.025031091645359993, -0.04561081901192665, -0.009999897330999374, 0.02321292832493782, -0.006363571155816317, -0.007111996412277222, -0.01478041335940361, 0.011441889218986034, -0.00019053489086218178, 0.03473318740725517, 0.002758592367172241, -0.011222455650568008, 0.01905936561524868, -0.013087640516459942, -0.011097065173089504, -0.02379286102950573, -0.03510935977101326, -0.01061901357024908, -0.02470194175839424, 0.007096322253346443, 0.0031680711545050144, -0.018416740000247955, 0.009372944943606853, 0.006453695707023144, -0.016457511112093925, 0.020375967025756836, -0.016692619770765305, 0.010164473205804825, -0.0020571888890117407, -0.036081135272979736, -0.005446652881801128, 0.0169904213398695, 0.012311786413192749, 0.009153511375188828, 0.00748424930498004, 0.023056190460920334, -0.0031621933449059725, -0.02874578721821308, -0.005963888950645924, 0.03197459504008293, 0.02308753877878189, -0.02727244794368744, -0.0068494598381221294, 0.01502335723489523, -0.009631562978029251, 0.011159760877490044, 0.007832991890609264, -0.029043590649962425, 0.026958972215652466, -0.0067044771276414394, 0.018683195114135742, -0.014145622961223125, 0.023134559392929077, 0.02909061126410961, -0.055704761296510696, -0.009905855171382427, 0.00894191488623619, -0.017868155613541603, -0.03730369359254837, -0.007660579867660999, 0.005920785944908857, 0.0436672642827034, 0.010360395535826683, 0.0009291637106798589, -0.006943502463400364, -0.009341597557067871, -0.0017789786215871572, 0.028479332104325294, -0.024670593440532684, -0.01431803498417139, -0.013087640516459942, 0.0007445064838975668, -0.0015713005559518933, 0.007977974601089954, 0.015305486507713795, 0.004036008846014738, -0.0348585769534111, 0.032382115721702576, -0.003963517490774393, 0.021786611527204514, 0.03266424313187599, 0.015407365746796131, 0.03235076740384102, 0.014553142711520195, -0.011535932309925556, 0.007300082128494978, -0.029529478400945663, -0.029278697445988655, -0.020485684275627136, 0.0014743187930434942, -0.005274240858852863, -0.0046433694660663605, 0.01695907488465309, 0.005626901518553495, -0.011465400457382202, -0.010791425593197346, -0.003389463759958744, -0.056770578026771545, -0.010109614580869675, 0.008510884828865528, -0.001361663220450282, -0.009890181012451649, -0.05025026947259903, 0.006355734542012215, 0.02206873893737793, -0.001770162140019238, -0.00230992934666574, 0.030093736946582794, 0.02288377843797207, 0.024686267599463463, 0.010493623092770576, -0.028150182217359543, -0.012672284618020058, 0.00894975196570158, 0.0040595196187496185, 0.01195128820836544, 0.023479383438825607, -0.015908928588032722, -0.013839984312653542, -0.011144086718559265, 0.048776932060718536, -0.011778876185417175, 0.029294371604919434, -0.025564001873135567, 0.025830456987023354, -0.0006093197735026479, -0.013487323187291622, -0.0030309250578284264, -0.02401229366660118, -0.016426164656877518, -0.032632894814014435, 0.010611176490783691, -0.02669251710176468, -0.012170721776783466, 0.010689545422792435, 0.0207678135484457, 0.012225580401718616, 0.009286738932132721, -0.023385340347886086, 0.04031306877732277, -0.02264867164194584, -0.020611073821783066, -0.003530528163537383, -0.008534395135939121, -0.005125339608639479, -0.00040066204383037984, -0.008354146964848042, 0.0063008759170770645, 0.0017525290604680777, -0.0035697126295417547, 0.022209804505109787, 0.0247332900762558, -0.03561092168092728, 0.03567361459136009, 0.03244480863213539, 0.014835271053016186, 0.015454387292265892, 0.02970189042389393, 0.008573579601943493, 0.019247451797127724, -0.014741228893399239, 0.011010859161615372, 0.04943523183465004, 0.01566598378121853, -0.008424678817391396, 0.005670004524290562, 0.0008708766545169055, -0.006434103474020958, 0.006179403979331255, -0.020046817138791084, -0.00035413040313869715, 0.063698410987854, -0.04031306877732277, 0.023730164393782616, -0.038651641458272934, -0.02565804496407509, 0.04658259451389313, 0.005474081728607416, -0.017821134999394417, -0.04159832000732422, 0.037617169320583344, 0.024090662598609924, 0.004682553932070732, -0.01896532252430916, -0.029419761151075363, -0.011097065173089504, 0.009521846659481525, -0.018918301910161972, -0.01896532252430916, -0.0402190238237381, 0.0034952620044350624, 0.013079803436994553, 0.03153572604060173, -0.011465400457382202, -0.010407417081296444, -0.014600164256989956, -0.029576500877738, 0.022225478664040565, 0.05266403779387474, 0.0015115441055968404, 0.000897326273843646, -0.022664345800876617], "index": 70}, {"title": "Tablets of Bah\u00e1\u2019u\u2019ll\u00e1h Revealed After the Kit\u00e1b-i-Aqdas", "text": "The Tablets of Bah\u00e1\u2019u\u2019ll\u00e1h Revealed After the Kit\u00e1b-i-Aqdas are selected tablets written by Bah\u00e1'u'll\u00e1h, the founder of the Bah\u00e1'\u00ed Faith, and published together as of 1978.As his mission drew to a close after his writing of the Kit\u00e1b-i-Aqdas in 1873, he continued to write unnumbered tablets and letters, doing so until the last days of his life in 1892.Six of the tablets in this volume were translated into English and published in 1917.", "vector": [0.03467293083667755, -0.0244834516197443, -0.007326378487050533, 0.036854337900877, 0.01987665891647339, -0.039408884942531586, -0.016231408342719078, -0.009436030872166157, -0.023134421557188034, 0.059873949736356735, 0.0033653981518000364, -0.006041930057108402, 0.009371450170874596, -0.0044919815845787525, -0.023823287338018417, -0.0006215940811671317, 0.022215932607650757, 0.0018019949784502387, -0.030912868678569794, -0.029621245339512825, -0.05083258077502251, 0.008661056868731976, 0.020393308252096176, 0.0008077134843915701, 0.019101684913039207, 0.0018145523499697447, -0.04735954850912094, -0.04049959033727646, 0.030912868678569794, 0.07462716847658157, 0.014853676781058311, 0.00028074884903617203, -0.011380642652511597, 0.010089019313454628, -0.030941572040319443, 0.0011615647235885262, 0.014071526005864143, 0.030884165316820145, -0.021369202062487602, -0.049225226044654846, -0.0005188920185901225, 0.03504606708884239, -7.977348286658525e-05, 0.018082736060023308, -0.046326249837875366, -0.05137793347239494, 0.006903012748807669, -0.02848748490214348, -0.011201250366866589, 0.021742338314652443, -0.0656144991517067, -0.08237691223621368, -0.024282531812787056, 0.03478774055838585, 0.026478292420506477, -0.0010359900770708919, 0.015700407326221466, 0.05037333816289902, 0.011847062967717648, -0.010454978793859482, 0.010490857064723969, -0.05255474895238876, 0.04380040615797043, 0.00907724630087614, -0.035304389894008636, 0.0010700746206566691, -0.009285341948270798, 0.02370847761631012, 0.018355412408709526, -0.04222175478935242, 0.02494269609451294, 0.015226812101900578, -0.0025294304359704256, 0.06377752125263214, -0.005353064276278019, 0.04724473878741264, -0.009995735250413418, 0.05241123214364052, 0.02432558685541153, -0.0025312243960797787, -0.027210213243961334, 0.015757814049720764, 0.024583911523222923, -0.020852552726864815, -0.041131049394607544, -0.013497470878064632, -0.05238252878189087, -0.030080487951636314, 0.0034245976712554693, -0.020235443487763405, 0.0014109198236837983, 0.051664963364601135, -0.061022061854600906, -0.0025832480750977993, 0.018541980534791946, 0.030912868678569794, 0.008417082950472832, 0.005044509656727314, 0.051664963364601135, -0.05427691340446472, 0.009414504282176495, -0.010318640619516373, -0.002328511094674468, -0.036222878843545914, 0.04133196920156479, 0.003953804727643728, 0.048880793154239655, -0.029678650200366974, -0.031745247542858124, -0.008000893518328667, -0.0015696820337325335, 0.013511822558939457, -0.011882941238582134, 0.010160775855183601, -0.012112563475966454, -0.028630999848246574, -0.011351940222084522, -0.0346442274749279, -0.03438590094447136, -0.012399590574204922, 0.0025688966270536184, -0.017264708876609802, 0.07169948518276215, -0.030740652233362198, -0.004194190260022879, -0.01917344145476818, -0.009967031888663769, -0.020608579739928246, 0.03154432773590088, -0.01611659862101078, -0.05528150871396065, -0.025114912539720535, 0.0038210544735193253, -0.00021841004490852356, -0.02167058177292347, 0.004517096094787121, -0.02512926422059536, 0.0076851630583405495, 0.029004136100411415, 0.0044561028480529785, -0.02212982438504696, -0.02568896673619747, 0.02268952876329422, 0.0057836053892970085, 0.0028864210471510887, 0.03145822137594223, 0.007064465899020433, 0.010067491792142391, 0.040298670530319214, 0.0028056944720447063, 0.01938871294260025, 0.031257301568984985, -0.025732021778821945, 0.029032837599515915, -0.041073646396398544, 0.06636077165603638, 0.008087001740932465, 0.005683145951479673, -0.0007929136627353728, 0.0035107058938592672, -0.02234509587287903, -0.0014997189864516258, 0.020938660949468613, -0.009270990267395973, 0.03550530970096588, 0.054104696959257126, 0.03318038582801819, 0.017092490568757057, -0.023636719211935997, 0.036567311733961105, 0.05398988351225853, -0.004997867625206709, 0.0012064126785844564, 0.01328937616199255, 0.0388922356069088, 0.011940347030758858, 0.03186006098985672, -0.0009615423623472452, -0.036997854709625244, 0.004430987872183323, -0.018599385395646095, -0.00484000239521265, 0.03142951801419258, -0.005948646459728479, 0.02274693362414837, 0.010376046411693096, 0.018685493618249893, 0.0408727265894413, -0.026004698127508163, 0.016044840216636658, -0.04646976292133331, 0.01692027412354946, 0.034529417753219604, 0.030912868678569794, 0.026808375492691994, 0.01858503557741642, -0.025832481682300568, -0.032950762659311295, -0.056659240275621414, -0.010519560426473618, 0.0449485182762146, -0.014042823575437069, 0.0019338482525199652, 0.013210443779826164, -0.006493998691439629, 0.0698051005601883, 0.038576506078243256, -0.03386925160884857, -0.00716133788228035, 0.043599486351013184, -0.0010889108525589108, -0.014767568558454514, 0.002502521499991417, 0.004395109601318836, 0.02799953892827034, 0.013411362655460835, -0.04911041632294655, -0.036165472120046616, 0.03760061040520668, -0.04374299943447113, 0.013777323067188263, -0.0654996931552887, -0.02590423822402954, -0.014315499924123287, 0.04377170279622078, 0.01740822196006775, 0.0286740530282259, 0.011516980826854706, -0.001519452198408544, 0.02944902889430523, 0.040269967168569565, -0.036997854709625244, 0.00551092904061079, 0.038260772824287415, -0.003304404905065894, 0.000582127773668617, 0.01638927310705185, 0.016001787036657333, 0.033323898911476135, -0.003388719167560339, -0.013963891193270683, 0.027525942772626877, -0.02488528937101364, 0.039782021194696426, 0.015183757990598679, 0.05964432656764984, -0.011581562459468842, -0.013490295968949795, 0.019345657899975777, -0.02642088755965233, 0.06498304009437561, 0.010555438697338104, 0.02185714989900589, 0.015829570591449738, -0.016690652817487717, 0.061596114188432693, -0.01657584123313427, 0.03708396106958389, 0.005184435285627842, -0.016432328149676323, 0.009694356471300125, 0.03719877079129219, 0.009845045395195484, -0.051693663001060486, -0.07307721674442291, 0.057434216141700745, -0.014982839114964008, -0.08008068799972534, 0.024928344413638115, -0.004377170465886593, 0.04222175478935242, -0.024153370410203934, -0.03932277485728264, 0.0022477845195680857, -0.06727926433086395, 0.034529417753219604, -0.012119739316403866, 0.0698051005601883, -0.014258094131946564, 0.03630898520350456, -0.03886353224515915, -0.09328395873308182, -0.043570782989263535, -0.01917344145476818, 0.00721515528857708, -0.01617400348186493, -0.029678650200366974, 0.015628650784492493, -0.02349320612847805, -0.038232073187828064, -0.021139580756425858, -0.030166596174240112, -0.0028092823922634125, -0.0011965461308136582, -0.011330412700772285, -0.043599486351013184, 0.012356536462903023, 0.0052526043727993965, -0.0025294304359704256, -0.02268952876329422, 0.005159320309758186, 0.028530539944767952, -0.0510047972202301, -0.014114580117166042, -0.0009714089101180434, -0.03992553427815437, 0.035390499979257584, 0.04420224577188492, -0.015155055560171604, -0.03223319724202156, -0.040183860808610916, 0.01895816996693611, -0.041016239672899246, -0.05367415398359299, 0.04457538202404976, -0.011538508348166943, 0.0009391183266416192, -0.04931133612990379, 0.006881485693156719, 0.004305413458496332, 0.035734932869672775, -0.025660265237092972, -0.018628088757395744, 0.026994941756129265, 0.029118945822119713, -0.007527297828346491, 0.05846751481294632, -0.024339936673641205, -0.0017840557266026735, -0.03645250201225281, -0.007412486709654331, -0.028889324516057968, 0.010261235758662224, 0.04959836229681969, 0.00474671833217144, -0.032089680433273315, -0.007168513257056475, 0.012421118095517159, -0.00015887424524407834, -0.03556271642446518, -0.032922063022851944, -0.009407328441739082, 0.0011911643669009209, -0.03398406505584717, -0.030338814482092857, -0.03341000899672508, 0.005489401984959841, -0.025660265237092972, 0.02642088755965233, 0.011804008856415749, 0.0006722723483107984, -0.024655668064951897, -0.030166596174240112, 0.008330974727869034, 0.0612516812980175, 0.016647599637508392, 0.015341623686254025, -0.0408727265894413, 0.0550231859087944, -0.029592541977763176, 0.029965678229928017, -0.01371991727501154, -0.02281869202852249, 0.013145862147212029, 0.01328937616199255, -0.04750306159257889, 0.05177977308630943, 0.01043345220386982, -0.047675278037786484, 0.017465626820921898, -0.03231930360198021, 0.07703819870948792, -0.0014180955477058887, -0.010031613521277905, 0.08111398667097092, -0.0012082066386938095, -0.022990908473730087, -0.032864656299352646, 0.014781919308006763, -0.007943487726151943, -0.007329966407269239, 0.04529295116662979, -0.0029240932781249285, 0.05958692356944084, 0.02571767009794712, -0.0193600095808506, -0.04971317574381828, -0.03803115338087082, 0.006246437318623066, -0.032864656299352646, -0.009184882044792175, 0.013224795460700989, 0.03467293083667755, 0.0153272720053792, -0.025760723277926445, 0.014695811085402966, 0.03312298282980919, 0.008955259807407856, -0.0038067030254751444, -0.009708707220852375, 0.06165352091193199, 0.027698159217834473, 0.0030460800044238567, 0.041102346032857895, -0.00021134647249709815, 0.007505770772695541, -0.024497803300619125, 0.03590714931488037, 0.006745147984474897, -0.028013890609145164, 0.005536044016480446, 0.026349131017923355, -0.003582462901249528, 0.018054034560918808, -0.010533911176025867, -0.034988660365343094, 0.04058569669723511, 0.04578089714050293, -0.01186858955770731, -0.03429979458451271, -0.014049999415874481, 0.03105638176202774, -0.026564400643110275, -0.02985086664557457, -0.0024504978209733963, -0.0347590371966362, 0.037457097321748734, -0.035821039229631424, -0.03969591110944748, -0.006196207366883755, 0.02901848591864109, 0.0471012219786644, 0.00042964439489878714, -0.004369994625449181, 0.027468537911772728, -0.06285903602838516, -0.08473053574562073, -0.0061280382797122, 0.030137894675135612, 0.024454748257994652, 0.02312006987631321, -0.022086771205067635, -0.03407017141580582, 0.014444662258028984, 0.01063437107950449, 0.018010979518294334, -0.03800245001912117, 0.005780017469078302, 0.019647037610411644, -0.018757252022624016, -0.012327834032475948, -0.04626884311437607, -0.011136669665575027, 0.005263368133455515, 0.0899544358253479, -0.04173380881547928, -0.031687844544649124, -0.04690030589699745, -0.009687180630862713, 0.0007704896270297468, 0.0035107058938592672, -0.0020540410187095404, 0.0022208758164197206, -0.03309427946805954, 0.026133859530091286, -0.04655586928129196, 0.031659141182899475, -0.042307864874601364, -0.0023482441902160645, 0.009902451187372208, -0.029004136100411415, -0.0043233525939285755, -0.0430254302918911, -0.005302834324538708, 0.022086771205067635, 0.0011310679838061333, -0.04417354241013527, -0.02630607597529888, -0.03708396106958389, 0.007943487726151943, 0.036108069121837616, 0.023421449586749077, -0.025488046929240227, 0.007764095440506935, -0.03805985674262047, -0.010376046411693096, -0.027669457718729973, -0.03226189687848091, -0.011882941238582134, 0.04543646425008774, -0.006052693817764521, 0.007656460162252188, 0.016676301136612892, 0.01938871294260025, 0.029133297502994537, -3.0748949939152226e-05, -0.004646258894354105, -0.05387507379055023, -0.04250878095626831, -0.032032277435064316, -0.008589300327003002, 0.024870937690138817, -0.0020970951300114393, 0.01976184733211994, 0.01670500449836254, 0.033266495913267136, -0.04646976292133331, -0.027583349496126175, -0.005751315038651228, 0.020264146849513054, 0.045924410223960876, -0.027640754356980324, -0.07525862753391266, 0.025430642068386078, 0.010239708237349987, -0.03280724957585335, 0.010167951695621014, 0.004097318276762962, 0.005815896205604076, -0.05588426813483238, -0.018283655866980553, -0.004926110617816448, -0.021096525713801384, -0.00016291056817863137, 0.015025893226265907, 0.00510191498324275, 0.004111669957637787, 0.022244635969400406, -0.0015983846969902515, 0.04239397123456001, 0.013231970369815826, -0.012169968336820602, -0.018972521647810936, -0.016044840216636658, -0.004814887419342995, 0.008409908041357994, 0.036165472120046616, -0.027124105021357536, 0.016590192914009094, 0.03765801712870598, 0.01938871294260025, -0.028085647150874138, 0.00628231605514884, 0.005726200062781572, -0.003306198865175247, 0.014114580117166042, 0.027296321466565132, 0.018082736060023308, -0.026593104004859924, -0.049741875380277634, 0.051693663001060486, 0.03401276469230652, -0.029334217309951782, 0.013856255449354649, -0.020709039643406868, -0.010268411599099636, 0.031171193346381187, 0.0017876435304060578, -0.03461552411317825, -0.00489381980150938, 0.0018109645461663604, 0.02293350175023079, 0.08013809472322464, 0.06836996227502823, -0.013691214844584465, -0.03194616734981537, 0.004466866608709097, 0.028473135083913803, -0.014114580117166042, 0.001538288313895464, 0.0008767794934101403, 0.0010772503446787596, -0.012736848555505276, 0.02111087739467621, -0.020335903391242027, -0.006511937826871872, -0.018111439421772957, -0.02620561607182026, -0.009744585491716862, -0.013109983876347542, 0.026492644101381302, 0.005399705842137337, 0.03909315541386604, -0.011976225301623344, 0.021168282255530357, 0.020407659932971, 0.02019238844513893, 0.0010180509416386485, -0.03341000899672508, 0.008998313918709755, -0.011459575966000557, 0.03025270625948906, 0.005991700571030378, -0.0016234996728599072, -0.018326710909605026, -0.012019279412925243, -0.003482003230601549, -0.01305975392460823, 0.007634933106601238, 0.011036209762096405, -0.038232073187828064, -0.03269243985414505, 0.02426818013191223, -0.017149897292256355, 0.00201816251501441, 0.005876889452338219, 0.030539732426404953, -0.02429688349366188, 0.024067262187600136, -0.004517096094787121, 0.009421680122613907, 0.014595352113246918, -0.01105056144297123, -0.028013890609145164, 8.08386248536408e-05, 0.00730843935161829, 0.03717007115483284, -0.017365166917443275, -0.007505770772695541, 0.014265269972383976, -0.02376588247716427, -0.05022982507944107, -0.0234645027667284, -0.03444330766797066, 0.020694687962532043, 0.00962977483868599, 0.0122560765594244, -0.004452514927834272, 0.003996858838945627, 0.008618002757430077, -0.009192057885229588, -0.03671082481741905, 0.014839325100183487, 0.013389836065471172, 0.013267849572002888, -0.03544790297746658, 0.015384677797555923, 0.006465295795351267, -0.020307200029492378, -0.03613676875829697, -0.01162461657077074, 0.0327785462141037, 0.0019266725284978747, 0.03992553427815437, -0.024426044896245003, -0.008897854946553707, 0.051636260002851486, 0.014602527022361755, -0.0031931817065924406, -0.01593003049492836, -0.0065370528027415276, -0.0012324246345087886, 0.04690030589699745, 0.014057175256311893, -0.015384677797555923, -0.0009624392841942608, -0.024024207144975662, -0.010828115046024323, 0.00912030041217804, -0.00024285222752951086, -0.03966720774769783, -0.014286797493696213, -0.02861664816737175, 0.00014541982091031969, 0.004621143918484449, -0.029592541977763176, -0.021598823368549347, -0.015355974435806274, 0.009522139094769955, -0.029535137116909027, -0.01082093920558691, -0.02172798663377762, -0.0017526621231809258, 0.023938098922371864, -0.01134476438164711, -0.02432558685541153, -0.005374591331928968, -0.04532165080308914, -0.04730214178562164, -0.017881818115711212, 0.02413901872932911, -0.08042512089014053, 0.011394994333386421, -0.0027608464006334543, -0.00321470876224339, 0.01338266022503376, 8.542153409507591e-06, -0.013734268955886364, 0.0046247318387031555, -0.0038138788659125566, 0.029965678229928017, 0.015542542561888695, -0.026435239240527153, -0.0014369317796081305, 0.002829015487805009, 0.052152909338474274, 0.013669687323272228, 0.016059191897511482, -0.03148692473769188, 0.01673370786011219, 0.018714196979999542, 0.0076851630583405495, -0.02411031536757946, 0.03028140775859356, -0.010318640619516373, -0.014473364688456059, 0.016130948439240456, 0.01214844174683094, -0.008036771789193153, 0.0021473250817507505, -0.034529417753219604, -0.014681460335850716, -0.016217056661844254, 0.028659703209996223, 0.006705681327730417, -0.030798057094216347, -0.021196985617280006, 0.015786515548825264, -0.03421368449926376, -0.00797936599701643, 0.017680898308753967, 0.014695811085402966, -0.07548824697732925, -0.012772726826369762, 0.021168282255530357, 0.015068947337567806, -0.01598743535578251, 0.021943258121609688, 0.02089560590684414, 0.010103370063006878, 0.015255515463650227, 0.03071194887161255, -0.01781005971133709, -0.0007669017650187016, -0.04078661650419235, 0.021527066826820374, -0.021785391494631767, 0.001253951690159738, -0.036538608372211456, -0.06601633876562119, 0.011581562459468842, 0.03274984657764435, -0.01796792633831501, 0.013461592607200146, 0.02716715820133686, 0.02386634238064289, 0.03194616734981537, 0.002961765741929412, 0.041418079286813736, 0.029965678229928017, -0.0010646928567439318, -0.015542542561888695, 0.023636719211935997, -0.01799662783741951, 0.0137988505885005, 0.004438163712620735, -0.01874290034174919, 0.027267618104815483, -0.03851909935474396, 0.012937767431139946, -0.026219967752695084, 0.073593869805336, -0.005266955588012934, -0.005496577825397253, -0.0367395281791687, -0.014997189864516258, -0.014136107638478279, 0.03180265426635742, -0.029965678229928017, -0.007534473668783903, -0.015298569574952126, -0.001488955458626151, -0.009651301428675652, 0.01381320133805275, 0.038949642330408096, -0.01555689424276352, 0.0035412025172263384, -0.028415728360414505, -0.03429979458451271, 0.010103370063006878, 0.05364545062184334, 0.005256192293018103, -0.01157438661903143, 0.04004034399986267, -0.028358323499560356, -0.0193600095808506, -0.0026765321381390095, -0.022388150915503502, 0.006942479405552149, 0.009758937172591686, -0.013081281445920467, 0.0008175800903700292, 0.012227374128997326, -0.011710724793374538, 0.0326637364923954, -0.04374299943447113, 0.006996296811848879, 0.013892133720219135, 0.004682137165218592, -0.01781005971133709, -0.004194190260022879, -0.02787037566304207, 0.04813452437520027, 0.0046319072134792805, -0.029994379729032516, -0.026047751307487488, -0.03869131579995155, -0.026506995782256126, 0.01673370786011219, 0.033323898911476135, -0.019934063777327538, 0.02416772022843361, 0.008079825900495052, 0.017637843266129494, 0.011136669665575027, 0.018541980534791946, 0.011273007839918137, 0.004513508640229702, 0.015413380227982998, -0.013734268955886364, -0.026047751307487488, -0.0018154493300244212, -0.002769815968349576, 0.011172547936439514, -0.07169948518276215, -0.010842466726899147, -0.006702093873172998, -0.011925995349884033, -0.0051557328552007675, 0.011208426207304, 0.006214146967977285, -0.0017060200916603208, 0.012155617587268353, -0.02454085648059845, -0.003304404905065894, 0.010899871587753296, 0.027238916605710983, -0.0035429964773356915, 0.06343308836221695, 0.0327785462141037, 0.024842236191034317, 0.00019026787776965648, -0.022416852414608, -0.016748057678341866, -0.02188585139811039, -0.013619458302855492, -0.0040506767109036446, -0.007362257223576307, -0.017236005514860153, 0.0004964679828844965, -0.006084984168410301, -0.004710840061306953, 0.012794253416359425, 0.03137211129069328, 0.007498594932258129, 0.032520223408937454, -0.003482003230601549, 0.02797083556652069, 0.010627195239067078, -0.012607686221599579, -0.008201812393963337, -0.02673661708831787, 0.003004819853231311, -0.009601072408258915, 0.024626964703202248, 0.014071526005864143, 0.019804902374744415, -0.03142951801419258, -0.02024979516863823, 0.0039681559428572655, -0.0037492974661290646, 0.009751761332154274, 0.050057608634233475, -0.02848748490214348, 0.031228598207235336, 0.004398697521537542, -0.006734384223818779, 0.03748580068349838, 0.03613676875829697, -0.030482327565550804, -0.035333093255758286, -0.028300918638706207, 0.059012867510318756, 0.007972190156579018, 0.06463860720396042, 0.024454748257994652, -0.009457558393478394, -0.013167389668524265, 0.007390959654003382, 0.0041475482285022736, 0.0025868359953165054, 0.02633477933704853, -0.006038342602550983, 0.027310673147439957, 0.022402500733733177, -0.006239261478185654, 0.02537323720753193, -0.010849641636013985, -0.019403062760829926, -0.01941741444170475, -0.004872292745858431, 0.011674846522510052, 0.04127456247806549, -0.02663615718483925, 0.0022190818563103676, -0.034529417753219604, 0.017279058694839478, 0.008811745792627335, 0.005966585595160723, 0.0224742591381073, -0.0012279398506507277, 0.022675177082419395, 0.004240832291543484, -0.06245719641447067, -0.01555689424276352, -0.032864656299352646, 0.010117721743881702, -0.04816322401165962, 0.02062293142080307, 0.007032175548374653, -0.009615423157811165, 0.03636639192700386, -0.012198671698570251, -0.02475612796843052, -0.019116036593914032, 0.02537323720753193, 0.010770709253847599, -0.0008296890300698578, 0.034529417753219604, -0.01898687332868576, -0.021900203078985214, -0.028229160234332085, -0.006246437318623066, 0.0005368312704376876, -0.02735372632741928, -0.029649946838617325, -0.026133859530091286, -0.025861183181405067, -0.030740652233362198, -0.03401276469230652, -2.086836138914805e-05, 0.030884165316820145, 0.01115819625556469, -0.016618896275758743, -0.012973645702004433, 0.01461687870323658, -0.026478292420506477, 0.01512635312974453, -0.029319865629076958, 0.0234645027667284, -0.014487716369330883, 0.02475612796843052, -0.013597930781543255, -0.01938871294260025, 0.007103932090103626, -0.01960398256778717, -0.004552974831312895, -0.00048032269114628434, -0.04159029573202133, -0.04044218361377716, -0.05430561676621437, -0.022560367360711098, 0.03312298282980919, 0.007520121987909079, -0.02510056085884571, 0.004208541475236416, -0.006849195342510939, -0.006569343619048595, -0.03757190704345703, 0.005259780213236809, -0.01969009079039097, -0.03648120164871216, -0.028272215276956558, 0.00917053036391735, -0.01638927310705185, -0.005482226610183716, -0.033754441887140274, 0.016776761040091515, 0.0012907270574942231, 0.0076636360026896, 0.022330744192004204, 0.025043154135346413, -0.02392374724149704, 0.012464172206819057, 0.02488528937101364, 0.07256057113409042, -0.03524698317050934, -0.0027769915759563446, -0.026994941756129265, 0.0194461178034544, 0.019058629870414734, -0.01750868186354637, 0.03223319724202156, 0.038605205714702606, 0.007613406050950289, 0.046354953199625015, 0.03541920334100723, -0.02207241952419281, -0.042709700763225555, 0.008739989250898361, -0.0007866349187679589, 0.011882941238582134, -0.010096194222569466, 0.011387818492949009, -0.016719356179237366, -0.02059422805905342, -0.035792335867881775, 0.07020694017410278, -0.024009855464100838, -0.006723620928823948, 0.02333534136414528, 0.005091151222586632, 0.003803115338087082, 0.0023213354870676994, 0.03711266443133354, -0.001791231450624764, 0.022086771205067635, 0.01925954967737198, -0.055798158049583435, 0.01793922297656536, -0.007728217169642448, 0.016346219927072525, 0.04916782304644585, -0.0029743232298642397, -0.014437486417591572, 0.017982276156544685, 0.0002026010915869847, -0.04911041632294655, 0.016805464401841164, -0.0245695598423481, 0.015198109671473503, 0.003306198865175247, -0.0022011427208781242, -0.005736963357776403, -0.05752032250165939, -0.015757814049720764, 0.0049332864582538605, -0.020048875361680984, -0.010490857064723969, 0.0173508170992136, -0.03309427946805954, -0.003198563354089856, -0.020981714129447937, 0.04305413365364075, -0.007007060572504997, 0.002269311575219035, -0.01228477992117405, 0.03145822137594223, 0.006648276001214981, -0.027124105021357536, -0.010282762348651886, 0.005360239651054144, 0.019704442471265793, 0.022402500733733177, 0.024827884510159492, -0.011904467828571796, -0.032979466021060944, 0.004549386911094189, -0.016661949455738068, 0.024368640035390854, -0.0030030258931219578, -0.01651843637228012, 0.02365107089281082, -0.03645250201225281, 0.022431204095482826, -0.0024989338126033545, 0.03886353224515915, -0.03352481871843338, 0.02373717911541462, -0.022058067843317986, -0.008625178597867489, 0.012105387635529041, -0.020938660949468613, -0.012629212811589241, 0.028257863596081734, 0.013971067033708096, -0.007591878995299339, -0.011890117079019547, 0.014250918291509151, -0.015269866213202477, 0.015355974435806274, -0.007060877978801727, 0.013131511397659779, -0.00536382757127285, -0.027267618104815483, 0.009737410582602024, 0.018298007547855377, -0.01237806398421526, -0.013188916258513927, -0.02550239861011505, 0.0008758825715631247, 0.0052956584841012955, 0.011222777888178825, -0.0057405512779951096, -0.009758937172591686, -0.015915678814053535, -0.018441520631313324, 0.025975994765758514, -0.003404864575713873, -0.004617555998265743, -0.020909957587718964, -0.0015212460421025753, 0.002507903380319476, 0.0015230400022119284, -0.018785953521728516, 0.013562052510678768, -0.022029366344213486, -0.0052884831093251705, -0.03484514728188515, 0.043197646737098694, 0.026492644101381302, 0.004875880666077137, 0.017853114753961563, 0.006397126708179712, -0.011646143160760403, -0.013691214844584465, -0.02121133729815483, -0.026937536895275116, 0.026033399626612663, -0.01219149585813284, 0.011567210778594017, 0.008316623978316784, -0.0024235891178250313, -0.012248901650309563, -0.012069509364664555, 0.03728488087654114, -0.01086399331688881, -0.0003946629003621638, 0.023722827434539795, -0.0012333216145634651, -0.024454748257994652, 0.029592541977763176, 0.009845045395195484, 0.01703508570790291, 0.015786515548825264, 0.028889324516057968, -0.012435468845069408, 0.008539070375263691, 0.007857379503548145, -0.013267849572002888, -0.027066700160503387, 0.0022639299277216196, 0.0030604314524680376, 0.017020734027028084, 0.022302042692899704, -0.0086754085496068, 0.008646705187857151, -0.013210443779826164, 0.011165372096002102, -0.009019841440021992, -0.004334116354584694, 0.00020417077757883817, -0.007426838390529156, 0.015499488450586796, 0.005327949300408363, -0.028329620137810707, 0.034931253641843796, -0.0013230176409706473, 0.024598263204097748, 0.016633247956633568, 0.014609702862799168, 0.022488608956336975, -0.010519560426473618, -0.004075791221112013, -0.01143804844468832, 0.02663615718483925, 0.026033399626612663, -0.023206178098917007, 0.011122317984700203, 0.005058860871940851, 0.0031931817065924406, 0.004779009148478508, -0.01509764976799488, -0.015671705827116966, 0.0023231294471770525, 0.007150574121624231, 0.01670500449836254, 0.022158527746796608, -0.02220158278942108, -0.03200357407331467, -0.011488278396427631, -0.0020953011699020863, 0.01361228246241808, -0.028358323499560356, -0.013145862147212029, 0.03257763013243675, 0.0409875363111496, -0.04572349041700363, 0.0153272720053792, 0.03105638176202774, 0.02898978441953659, -0.029736055061221123, 0.004061440005898476, 0.019474821165204048, -0.019647037610411644, -0.010555438697338104, 0.0027339374646544456, -0.01700638234615326, 0.006203383207321167, 0.0366247184574604, 0.017264708876609802, 0.02703799679875374, -0.00424442021176219, -0.017881818115711212, -0.0204937681555748, -0.025201020762324333, -0.0010637958766892552, 0.039035748690366745, -0.004936873912811279, -0.04787619784474373, 0.01864244043827057, 0.009751761332154274, -0.00878304336220026, -0.013038227334618568, 0.003702655667439103, -0.002579660154879093, 0.004732367116957903, -0.014049999415874481, 0.00917053036391735, 0.05594167113304138, 0.025143614038825035, -0.021340498700737953, -0.022416852414608, -0.0055611589923501015, -0.017637843266129494, 0.014638406224548817, 0.04041348025202751, -0.03398406505584717, 0.0030263469088822603, 0.006698505952954292, 0.015729110687971115, -0.007986541837453842, 0.019991470500826836, 0.019532226026058197, 0.010691776871681213, 0.002857718151062727, -0.01713554561138153, -0.011610264889895916, -0.015112001448869705, -0.004728779196739197, 0.0069353035651147366, 0.004352055490016937, 0.013684039004147053, -0.0450633279979229, -0.002059422666206956, 0.022560367360711098, 0.03461552411317825, -0.0008642220636829734, 0.010835290886461735, 0.011136669665575027, -0.005442760419100523, -0.024626964703202248, 0.050459444522857666, 0.014659932814538479, 0.0032487933058291674, 0.029133297502994537, -0.021814094856381416, -0.011014683172106743, 0.016030490398406982, -0.0022154939360916615, -0.027468537911772728, -0.014136107638478279, -0.023349693045020103, 0.03794504329562187, -0.04621143639087677, -0.004140372853726149, -0.009809167124330997, 0.04448927193880081, -0.005019394680857658, 0.0008117498364299536, 0.04288191720843315, 0.019962767139077187, 0.02821481041610241, 0.02373717911541462, 0.010067491792142391, -0.022976556792855263, -0.036567311733961105, 0.0020091929472982883, -0.028788864612579346, -0.05450653284788132, 0.02534453384578228, 0.004179839044809341, 0.01551384013146162, -0.007577527780085802, 0.0011149226920679212, -0.017666546627879143, 0.0018405643058940768, -0.006633924786001444, -0.013217619620263577, 0.019804902374744415, -0.006684154272079468, -0.0007799076847732067, 0.0034604761749505997, 0.00754882488399744, 0.00291691767051816, -0.004309001378715038, -0.035763636231422424, 0.023478854447603226, 0.04181991517543793, 0.005170084070414305, 0.00044960176455788314, 0.03731358423829079, 0.012930591590702534, -0.002567102899774909, -0.03145822137594223, -0.013468768447637558, -0.0014450043672695756, 0.02990827150642872, -0.008847624994814396, 0.03639509528875351, -0.03361092880368233, 0.015442082658410072, 0.01966138742864132, -0.008574948646128178, 0.004779009148478508, 0.015413380227982998, 0.0327211432158947, -0.04032737389206886, -0.0346442274749279, -0.02151271514594555, 0.011516980826854706, 0.028788864612579346, 0.013734268955886364, 0.0015051007503643632, -9.490970114711672e-05, 0.006723620928823948, 0.023019609972834587, 0.024038558825850487, -0.013605106621980667, -0.005345888435840607, -0.005134205799549818, -0.00527054350823164, -0.011359116062521935, -0.009235111996531487, -0.027482889592647552, 0.004481217823922634, 0.0005072315107099712, 0.02692318521440029, 0.034529417753219604, -0.015671705827116966, -0.024210775271058083, 0.008180285803973675, -0.00022625844576396048, 0.00910594966262579, -0.026191264390945435, -0.017580438405275345, 0.03226189687848091, 0.02947773039340973, -0.032462816685438156, -0.03191746398806572, -0.016719356179237366, 0.014236567541956902, -0.026478292420506477, -0.015872623771429062, 0.02716715820133686, 0.018498927354812622, 0.016202706843614578, -0.006673390977084637, -0.023105718195438385, -0.0013902897480875254, 0.024411695078015327, -0.0011337589239701629, -0.016030490398406982, -0.02376588247716427, -0.0037241827230900526, 0.012370888143777847, -0.010792236775159836, -0.04316894710063934, -0.020536823198199272, 0.006540640722960234, -0.00850319117307663, 0.0510047972202301, 0.014057175256311893, -0.00921358447521925, -0.02695188857614994, 0.006605221889913082, 0.019316954538226128, 0.005281307268887758, 0.05878324434161186, -0.01877160184085369, 0.010670249350368977, 0.012880361638963223, 0.029649946838617325, 0.007340730167925358, -0.022833043709397316, -0.03814596310257912, 0.007441189605742693, -0.03714136779308319, -0.0045816777274012566, -0.018714196979999542, 0.012779902666807175, -0.016504084691405296, 0.01228477992117405, -0.0183410607278347, 0.016690652817487717, -0.011122317984700203, 0.02824351191520691, -0.0214553102850914, -0.013684039004147053, 0.008618002757430077, -0.01182553544640541, 0.005797956604510546, -0.015083298087120056, -0.04609662666916847, 0.0038856356404721737, 0.027425484731793404, 0.0009758936939761043, 0.0026765321381390095, 0.05884065106511116, 0.007182864937931299, 0.003986095078289509, -0.024827884510159492, 0.008000893518328667, 0.012248901650309563, -0.014064351096749306, 0.022459907457232475, 0.008790219202637672, 0.031659141182899475, -0.028573594987392426, 0.03843298926949501, -0.024985749274492264, 0.01697768084704876, 0.02080949768424034, 0.0015876211691647768, -0.026248671114444733, 0.02574637345969677, -0.008266394026577473, -0.01571475900709629, -0.028114350512623787, -0.0014019502559676766, 0.028143052011728287, 0.006619573105126619, 0.023450152948498726, -0.009809167124330997, 0.00495481351390481, 0.015671705827116966, 0.0031070734839886427, -0.021598823368549347, 0.009134652093052864, 0.004441751632839441, 0.0049440497532486916, 0.020579876378178596, 0.010232532396912575, -0.016504084691405296, 0.006813316605985165, -0.0173795185983181, 0.023421449586749077, -0.00014990463387221098, -0.015872623771429062, 0.03935147821903229, 0.009220760315656662, 1.8948303477372974e-05, -0.025416290387511253, 0.01590132713317871, 0.03676823154091835, 0.010663074441254139, 0.017867466434836388, 0.020953012630343437, -0.02673661708831787, -0.0019087332766503096, 0.036969151347875595, 0.022804340347647667, 0.015815218910574913, -0.005640091840177774, 0.04738825187087059, 0.02432558685541153, 0.016877220943570137, -0.016475381329655647, -0.022990908473730087, 0.0005058860988356173, 0.0367395281791687, 0.019331306219100952, 0.013877782970666885, 0.016016138717532158, 0.01874290034174919, -0.002136561321094632, -0.02599034644663334, -0.001754455966874957, 0.044833704829216, 0.00272855581715703, -0.014724514447152615, -0.0025724845472723246, -0.026004698127508163, 0.0003960083413403481, 0.034931253641843796, 0.034184981137514114, -0.011136669665575027, 0.014767568558454514, -0.036854337900877, 0.02182844653725624, -0.0020414835307747126, -0.006346897222101688, -0.014781919308006763, -0.026076454669237137, -0.00394304096698761, 0.0173795185983181, -0.01772395148873329, -0.004857941530644894, 0.0007686957251280546, 0.025488046929240227, 0.004029149655252695, -0.02580377832055092, 0.0007328172796405852, 0.012083860114216805, -0.01304540317505598, -0.0036918921396136284, 0.0025384000036865473, -0.01461687870323658, 0.02333534136414528, -0.018628088757395744, -0.01697768084704876, 0.01874290034174919, -0.005012218840420246, -0.004072203766554594, -0.030023083090782166, 0.0407579131424427, 0.0044561028480529785, 0.012478522956371307, 0.022086771205067635, 0.006727208383381367, 0.00377441244199872, 0.0028935966547578573, -0.04115975275635719, -0.015886975452303886, 0.002873863559216261, 0.012098211795091629, -0.008015245199203491, 0.008008069358766079, -0.00341921579092741, 0.019460469484329224, -0.006565755698829889, -0.021498365327715874, -0.025975994765758514, -0.0031770362984389067, -0.004204954020678997, 0.01593003049492836], "index": 71}, {"title": "Alum Rock, Birmingham", "text": "Alum Rock (also known as \"The Rock\") is an inner-city suburb of Birmingham, England, located roughly 2 miles east of Birmingham city centre. The area is officially a division of Saltley.", "vector": [0.01738770864903927, 0.03056560643017292, -0.019092386588454247, -0.007378288544714451, -0.04642651975154877, 0.012058739550411701, -0.02967621013522148, -0.04260211065411568, -0.025496045127511024, -0.004610040690749884, -0.011154519394040108, 0.048205312341451645, -0.026429910212755203, -0.00123403815086931, 0.01450458075851202, 0.005903372075408697, -0.00489538861438632, 0.018514279276132584, 0.05958959087729454, 0.010242887772619724, 0.03931134194135666, -0.06190202385187149, -0.032551925629377365, -0.010005715303122997, -0.013429893180727959, 0.005440144333988428, 0.006433304399251938, -0.010035362094640732, -0.0296613872051239, 0.01649831235408783, -0.018366046249866486, -0.02970585599541664, 0.031069599092006683, 0.008004572242498398, -0.008849498815834522, 0.06522244215011597, -0.002525516552850604, -0.0025570159777998924, -0.023065026849508286, 0.007893397472798824, 0.03433072194457054, -0.015141982585191727, -0.016913363710045815, 0.0001308617793256417, -0.01643901877105236, -0.04150518774986267, -0.00292759807780385, 0.022323861718177795, -0.018484631553292274, 0.03596128150820732, 0.06836497783660889, 0.0625542476773262, 0.013548479415476322, -0.016943011432886124, -0.019285090267658234, -0.0070558818988502026, -0.015401389449834824, 0.1032293364405632, -0.05268194153904915, 0.02198292687535286, 0.043491508811712265, -0.004050461575388908, -0.006233189720660448, 0.015831265598535538, 0.08057935535907745, -0.0031925642397254705, 0.017506295815110207, -0.03833300620317459, -0.013103781268000603, 0.039667099714279175, -0.016735484823584557, 0.04319504275918007, 0.004391397349536419, 0.04328398406505585, -0.03261122107505798, 0.01133239921182394, -0.015386566519737244, -0.03376743569970131, -0.036465272307395935, 0.00864197313785553, 0.047404855489730835, 0.029320450499653816, -0.03925205022096634, -0.018232636153697968, -0.010613469406962395, 0.008441858924925327, 0.020900826901197433, -0.058344434946775436, -0.028001178056001663, -0.024132302030920982, 0.00030318243079818785, 0.025629453361034393, 0.018306752666831017, -0.03068419359624386, 0.030951011925935745, -0.019329559057950974, -0.009583251550793648, -0.017832407727837563, -0.0034204721450805664, 0.04100119695067406, 0.02656332030892372, -0.05383815988898277, -0.030358079820871353, 0.005784785840660334, 0.04455878585577011, 0.03264086693525314, -0.009598074480891228, 0.005610612221062183, 0.012103209272027016, -0.0010265122400596738, 0.0015212392900139093, 0.01968531869351864, 0.03317450359463692, -0.0455964133143425, 0.004417337942868471, 0.013504009693861008, 0.012888843193650246, 0.004902800545096397, -0.034805066883563995, 0.007611755281686783, -0.03584269434213638, -0.0551426075398922, -0.0001767213107086718, -0.016691014170646667, 0.020826710388064384, -0.027749182656407356, -0.005406791809946299, 0.04230564460158348, 0.025570161640644073, 0.10311074554920197, -0.05861125513911247, -0.011665922589600086, -0.008419623598456383, -0.007937867194414139, 0.001564782694913447, 0.008501151576638222, 0.02422124147415161, 0.01654278300702572, 0.03065454587340355, 0.009813012555241585, 0.019018270075321198, 0.0013294630916789174, -0.017817584797739983, -0.0265781432390213, 0.0016342668095603585, 0.020055899396538734, -0.018573570996522903, -0.030980657786130905, 0.03341167792677879, 0.020722948014736176, 0.0001595818903297186, 0.035694461315870285, -0.012088386341929436, 0.005021386779844761, -0.01722465269267559, 0.007974925450980663, -0.03931134194135666, 0.04289857670664787, -0.020055899396538734, 0.03237404674291611, 0.03130676969885826, -0.03447895124554634, 0.03628739342093468, -0.007341230288147926, -0.0033130033407360315, 0.014519404619932175, -0.004802743438631296, 0.01528280321508646, 0.013741182163357735, 0.005925606936216354, 0.017862053588032722, -0.023079849779605865, 0.0312771238386631, -0.028445877134799957, -0.012095797806978226, 0.01869215816259384, -0.006170190870761871, -0.025318164378404617, -0.001934438245370984, -0.011732627637684345, -0.006826121360063553, -0.03768078237771988, 0.04298751801252365, -0.027793653309345245, -0.05736609920859337, -0.025510868057608604, -0.06338435411453247, -0.016142552718520164, 0.028030825778841972, -0.010072419419884682, 0.012874020263552666, -0.001195127028040588, 0.01869215816259384, -0.003294474445283413, 0.0643923357129097, 0.009390548802912235, -0.0024810468312352896, 0.015890557318925858, -0.0014082117704674602, 0.004736038390547037, 0.04716768115758896, 0.007400523405522108, -0.03539799526333809, -0.024784527719020844, 0.05309699475765228, 0.013140839524567127, 0.00611089775338769, -0.0076784598641097546, -0.03364884853363037, 0.026059329509735107, 0.012614612467586994, -0.01712089031934738, -0.05413462594151497, 0.03062490001320839, -0.03987462818622589, 0.040437910705804825, 0.009531370364129543, 0.03536834940314293, 0.023687604814767838, 0.006781651172786951, 0.04793849214911461, 0.027719536796212196, 0.01876627467572689, 0.01974461041390896, -0.031010305508971214, -0.009598074480891228, -0.03593163564801216, 0.0012868461199104786, -0.006981765851378441, -0.03456789255142212, -0.021508581936359406, 0.006185014266520739, -0.013807887211441994, 0.026948725804686546, -0.007626578211784363, 0.030891718342900276, 0.0008643826004117727, -0.024028539657592773, 0.05321558192372322, 0.09593627601861954, -1.8847571482183412e-05, 0.027615774422883987, 0.025614630430936813, -0.050606682896614075, 0.027008019387722015, -0.014719518832862377, -0.009153376333415508, 0.0021641990169882774, -0.0218050479888916, 0.007737752981483936, -0.005384556949138641, -0.013733770698308945, -0.00272563099861145, 0.01457128580659628, 0.024013716727495193, -0.014889986254274845, 0.004810154903680086, 0.005051033105701208, 0.028016002848744392, -0.024917935952544212, -0.010339238680899143, -0.03290768340229988, 0.027704713866114616, -0.025481220334768295, 0.004576688166707754, 0.028757166117429733, -0.025629453361034393, -0.010027949698269367, -0.023717250674962997, -0.0227240901440382, -0.006885414477437735, -0.03160323575139046, 0.042691051959991455, -0.011480631306767464, -0.01790652424097061, -0.024843819439411163, 0.026859786361455917, -0.02278338372707367, -0.03350061550736427, -0.01405247114598751, 0.037295375019311905, -0.006029369775205851, 0.07939349859952927, -0.03347096964716911, -0.011576983146369457, 0.04340256750583649, -0.03791795298457146, -0.014593521133065224, 0.006952119059860706, 0.003703967435285449, -0.021419642493128777, -0.00413569575175643, 0.03439001366496086, 0.033263444900512695, 0.010687585920095444, -0.018543925136327744, -0.04645616561174393, -0.024087833240628242, 0.013022253289818764, 0.01803993433713913, 0.01133239921182394, 0.01639454998075962, -0.03341167792677879, 0.004943564534187317, 0.008968085050582886, 0.035635169595479965, -0.005595788825303316, -0.0212565865367651, -0.023346668109297752, -0.04856107011437416, -0.0577811524271965, 0.0033741495572030544, -0.0010589382145553827, -0.03702855855226517, -0.019107209518551826, 0.0018390134209766984, -0.03314485773444176, -0.0197149645537138, -0.005729198455810547, -0.006614889483898878, -0.024754879996180534, -0.020174486562609673, -0.048946477472782135, 0.015490328893065453, 0.06021216884255409, -0.006336953025311232, 0.04289857670664787, 0.0409715510904789, 0.016023967415094376, -0.021716106683015823, -0.036524564027786255, 0.034152839332818985, -0.03533870354294777, -0.02828282117843628, 0.02048577554523945, -0.023761719465255737, 0.022412801161408424, 0.004157930612564087, 0.004054167307913303, -0.007111469283699989, -0.012414498254656792, 0.000600342929828912, 0.026252031326293945, -0.000999645097181201, -0.011940153315663338, 0.019122032448649406, 0.05872984230518341, -0.048234958201646805, 0.016928186640143394, -0.01881074346601963, 0.0007712738588452339, -0.03201828896999359, 0.029290804639458656, 0.005573553964495659, 0.024073008447885513, -0.05715857446193695, -0.0036057631950825453, -0.08793170750141144, 0.011562159284949303, 0.011858625337481499, -0.006885414477437735, -0.005195560399442911, 0.01368930097669363, 0.0008731839479878545, -0.014393405988812447, 0.014304466545581818, 0.04325433447957039, 0.05185183882713318, 0.03839229792356491, 0.0015694149769842625, -0.030254317447543144, 0.02445841394364834, -0.011376868933439255, -0.04787920042872429, 0.00830103736370802, 0.03427142649888992, 0.01738770864903927, -0.026385441422462463, -0.002749718725681305, 0.0015888705383986235, 0.001314639812335372, -0.015401389449834824, -0.013496598228812218, -0.014237761497497559, -0.020841533318161964, -0.000312446994939819, 0.007826692424714565, 0.03299662470817566, 0.03367849439382553, 0.024488061666488647, 0.002675602212548256, 0.008686442859470844, 0.03385637328028679, -0.00624430738389492, 6.577830936294049e-05, 0.000772663566749543, -0.07091458141803741, 0.0625542476773262, 0.013748593628406525, -0.00492874113842845, -0.01792134717106819, -0.012607201002538204, -0.031039951369166374, 0.0596192367374897, -0.014252585358917713, -0.008886557072401047, 0.00467303954064846, -0.043580446392297745, -0.03925205022096634, -0.01885521411895752, 0.02029307186603546, -0.008367742411792278, 0.012807315215468407, -0.06036040186882019, -0.005736609920859337, -0.02574804052710533, -0.01099146343767643, 0.021478934213519096, 0.007152233272790909, 0.01142875012010336, -0.028460700064897537, -0.06124980002641678, -0.05357133969664574, 0.006974353920668364, -0.0314253568649292, 0.030076438561081886, -0.017002303153276443, -0.02201257273554802, -0.055350132286548615, -0.00935349054634571, 0.04378797486424446, -0.026252031326293945, 0.003868876490741968, 0.04799778759479523, -0.05858160927891731, 0.023880306631326675, 0.011962388642132282, -0.028016002848744392, -0.014889986254274845, 0.0122069725766778, 0.003972639329731464, 0.004065284971147776, 0.028460700064897537, -0.012103209272027016, -0.02359866350889206, -0.015460683032870293, 0.022531388327479362, -0.023020556196570396, 0.016216669231653214, -0.014600932598114014, -0.006859473418444395, -0.011458396911621094, -0.01456387434154749, 0.0024754879996180534, 0.006689005997031927, -0.059085600078105927, 0.006933589931577444, 0.05164431408047676, 0.05543907359242439, 0.030209848657250404, 0.006700123194605112, 0.005695845931768417, -0.016854071989655495, -0.04106048867106438, -0.01814369671046734, -0.045922525227069855, 0.004695274401456118, 0.04307645559310913, -0.02353937178850174, 0.01869215816259384, -0.053749218583106995, -0.028519993647933006, -0.09516546875238419, 0.025496045127511024, -0.04186094552278519, -0.03519047051668167, -0.006481479853391647, -0.012384851463139057, -0.015490328893065453, 0.03462718427181244, -0.012436733581125736, -0.022145982831716537, -0.0030721251387149096, 0.006588948890566826, 0.04150518774986267, 0.020619183778762817, 0.026059329509735107, 0.004691568668931723, 0.024636294692754745, 0.01457128580659628, 0.029542800039052963, -0.011265694163739681, -0.04316539689898491, -0.00011818092752946541, -0.019181326031684875, 0.015386566519737244, 0.0314253568649292, -0.04414373263716698, -0.044262319803237915, 0.05111067369580269, -0.03690997138619423, 0.005725492723286152, 0.004406220279633999, -0.00907184835523367, 0.006518538109958172, -0.003281503915786743, -0.014593521133065224, 0.04598182067275047, -0.008686442859470844, -0.03815512731671333, 0.031217830255627632, -0.03400460630655289, 0.00010654233483364806, 0.03059525229036808, -0.027912238612771034, -0.02660779096186161, 0.01093216985464096, -0.02352454699575901, 0.00043242290848866105, -0.01337059959769249, -0.008693854324519634, 0.00821209792047739, -0.010835818946361542, 0.0072893486358225346, 0.0005558730335906148, 0.02039683610200882, -0.017461825162172318, 0.004421043675392866, -0.011169342324137688, -0.016023967415094376, -0.030239494517445564, -0.03364884853363037, 0.012169914320111275, -0.01065793912857771, 0.013578126206994057, 0.04005250707268715, -0.03456789255142212, 0.014867751859128475, 0.022323861718177795, -0.006677888333797455, -0.02193845622241497, 0.0011840095976367593, 0.01955190859735012, -0.005647670477628708, 0.007819280959665775, 0.006944707594811916, -0.001925173681229353, -0.004172753542661667, -0.008108334615826607, 0.02969103306531906, -0.009094083681702614, 0.01728394627571106, 0.031692177057266235, -0.02814941108226776, -0.018262282013893127, 0.02678566984832287, 0.02976514957845211, -0.060063935816287994, -0.024577001109719276, 0.1050674170255661, 0.05620988458395004, -0.012362617067992687, -0.0312771238386631, 0.011510278098285198, 0.01799546368420124, -0.0026996901724487543, -0.005240030121058226, -0.0029498329386115074, -0.020678477361798286, -0.02122693881392479, 0.031662531197071075, -0.02435465157032013, 0.0202634260058403, 0.020159663632512093, -0.009939010255038738, 0.010613469406962395, -0.03370814397931099, -0.058433376252651215, 0.005121443886309862, -0.007671048399060965, 0.01534209679812193, -0.02582215704023838, 0.0012257001362740993, 0.007945278659462929, 0.022323861718177795, -0.024562178179621696, -0.023109495639801025, -0.015075277537107468, -0.005955253262072802, 0.032581571489572525, -0.0033445029985159636, -0.015519975684583187, 0.01709124445915222, 0.007167056668549776, -0.0005285426159389317, 0.013607772067189217, 0.009598074480891228, -0.031039951369166374, -0.038006894290447235, 0.0035372055135667324, 0.027289660647511482, -0.017002303153276443, -0.010783937759697437, 0.01799546368420124, 0.01580161787569523, 0.03833300620317459, 0.06510385125875473, -0.02973550371825695, -0.009316432289779186, 0.0034260309766978025, -0.033293090760707855, -0.013548479415476322, 0.03433072194457054, 0.02116764523088932, -0.008093511685729027, -0.05045844987034798, 0.013741182163357735, 0.013155662454664707, 0.025688746944069862, -0.04298751801252365, 0.021464111283421516, -0.0736420601606369, -0.0125553198158741, 0.023835835978388786, 0.007341230288147926, -0.027838122099637985, 0.016898540779948235, -0.00702994130551815, 0.004658216144889593, 0.0024273123126477003, 0.009642545133829117, -0.02982444316148758, -0.021760577335953712, 0.030283965170383453, -0.017432179301977158, -0.037977248430252075, 0.008968085050582886, 0.09326808899641037, 0.0360502190887928, -0.030773133039474487, 0.03424178063869476, -0.0017287652008235455, 0.017624881118535995, -0.023183612152934074, 0.002343931468203664, -0.00979077722877264, 0.014230350032448769, -0.0073671708814799786, 0.034894004464149475, -0.01944814622402191, -0.0343603678047657, 0.03453824669122696, 0.0005123296868987381, 0.0003731297911144793, 0.029616916552186012, 0.0022327566985040903, -0.015564445406198502, -0.02270926721394062, -0.02502170018851757, -0.002710807602852583, -0.021360348910093307, 0.0036632034461945295, 0.00331670930609107, -0.05274123698472977, -0.0028812752570956945, -0.0036965557374060154, -0.02208668924868107, 0.007767399773001671, 0.02890539914369583, 0.00784151628613472, -0.028757166117429733, 0.006288777105510235, -0.031810760498046875, -0.011317575350403786, 0.013318718411028385, -0.010694997385144234, 0.029468683525919914, -0.016809601336717606, -0.005862608086317778, 0.006903943605720997, -0.019433321431279182, -0.06267283111810684, -0.005099209025502205, 0.0029794794972985983, -0.04524065554141998, -0.006351775955408812, 0.0010367032373324037, 0.010502294637262821, -0.010843230411410332, -0.029646562412381172, -0.04168306663632393, -0.02969103306531906, -0.016720661893486977, -0.0003048037178814411, -0.019892843440175056, 0.01483069360256195, 0.017017127946019173, -0.018425339832901955, -0.03732502460479736, -0.0016157376812770963, -0.0032666807528585196, -0.019314736127853394, -0.015164216980338097, -0.006348070222884417, -0.023005733266472816, 0.04331362992525101, 0.0007504286477342248, 0.012288500554859638, 0.04162377491593361, -0.04417337849736214, 0.014726930297911167, 0.01799546368420124, -0.05709927901625633, -0.0028423641342669725, 0.02187916450202465, 0.00865679606795311, -0.008256567642092705, -0.03750290349125862, 0.029957851395010948, 0.0033741495572030544, -0.038866642862558365, 0.00764140160754323, 0.023228082805871964, -0.02598521299660206, -0.014875163324177265, 0.007997160777449608, 0.024013716727495193, 0.013296484015882015, -0.0015953556867316365, -0.013459539972245693, -0.014608344063162804, 0.0032092405017465353, -0.039548516273498535, -0.00471380352973938, 0.030165378004312515, -0.0027126604691147804, 0.008945850655436516, 0.005117738153785467, 0.03631703928112984, -0.002090082736685872, -0.02352454699575901, 0.03201828896999359, 0.032581571489572525, -0.02262032777070999, 0.0018788509769365191, 0.005366027820855379, -0.04023038595914841, -0.047493793070316315, 0.005188148468732834, 0.001522165723145008, -0.0018686599796637893, 0.022931616753339767, -0.011132284067571163, -0.02419159561395645, -0.05045844987034798, 0.0015638562617823482, 0.05158501863479614, -0.003794759977608919, -0.022546211257576942, 0.011302752420306206, -0.010428179055452347, 0.04212776571512222, -0.04058614373207092, -0.01798064075410366, 0.007960102520883083, -0.01370412390679121, -0.021627167239785194, 0.01578679494559765, -0.004461807664483786, -0.017521118745207787, 0.016068438068032265, -0.009916774928569794, 0.012629436329007149, -0.01484551653265953, 0.05357133969664574, 0.05407533049583435, 0.05116996914148331, 0.01959637738764286, 0.006626006681472063, -0.013896826654672623, 0.024591824039816856, 0.022561034187674522, -0.018306752666831017, -0.017491472885012627, -0.015890557318925858, -0.0157126784324646, -0.044321611523628235, -0.046604398638010025, -0.023880306631326675, 0.011651099659502506, -0.03510152921080589, 0.02262032777070999, 0.04304680973291397, 0.04687121510505676, -0.013919061049818993, -0.001607399550266564, 0.015208686701953411, -0.03308556601405144, -0.02103423699736595, 0.005851490423083305, 0.02745271660387516, -0.01058382261544466, -0.002254991792142391, -0.01562373898923397, -0.02980961836874485, 0.02279820665717125, -0.001337801106274128, -0.016187023371458054, 0.011243458837270737, 0.045092422515153885, -0.012777668423950672, 0.024651117622852325, 0.0026107504963874817, -0.0019622319377958775, -0.03996356576681137, 0.021360348910093307, 0.03044702112674713, -0.003109183395281434, 0.03596128150820732, -0.012599789537489414, -0.011903095059096813, -0.03554622828960419, 0.010606057941913605, 0.01299260649830103, 0.02361348830163479, 0.04930223524570465, 0.033263444900512695, -0.04230564460158348, 0.021775400266051292, -0.003116594860330224, 0.028416231274604797, -0.015023396350443363, 0.009894540533423424, 0.004906506277620792, -0.012429321184754372, 0.03842194750905037, -0.04639687016606331, 0.00624430738389492, 0.006444421596825123, 0.02276856079697609, 0.013229778967797756, -0.029957851395010948, 0.05784044414758682, -0.01889968477189541, -0.0026830139104276896, -0.010613469406962395, 0.017698997631669044, -0.03658385947346687, -0.01092475838959217, -0.01337059959769249, 0.013185309246182442, -0.00649259751662612, -0.006325835362076759, 0.004194988869130611, -0.03391566872596741, 0.020871181041002274, 0.008100923150777817, -0.007997160777449608, 0.03477541729807854, 0.0033519144635647535, 0.020752593874931335, -0.06124980002641678, -0.002690425608307123, -0.026192737743258476, -0.0034204721450805664, 0.009738896042108536, -0.004561864770948887, 0.015075277537107468, 0.030120907351374626, 0.0020178190898150206, -0.004561864770948887, -0.016231494024395943, -0.04876859486103058, -0.012347793206572533, 0.003600204596295953, -0.0016379726585000753, -0.005002857651561499, 0.057662565261125565, -0.005740315653383732, -0.024591824039816856, 0.0019566731061786413, 0.018529102206230164, 0.004469219595193863, -0.022294215857982635, -0.009753718972206116, 0.02897951565682888, -0.01895897649228573, 0.04135695472359657, -0.01065052766352892, -0.02104905992746353, -0.028534816578030586, 0.004758273251354694, 0.0003244908875785768, 0.04755308851599693, 0.0015203128568828106, 0.024784527719020844, 0.01451199222356081, -0.05576518550515175, -0.03524976223707199, 0.004487748723477125, 0.007044764701277018, 0.02503652311861515, -0.02497722953557968, 0.002581103937700391, 0.006677888333797455, 0.0289646927267313, 0.024754879996180534, 0.019299913197755814, 0.04939117282629013, 0.017743468284606934, -0.02045612782239914, -0.019359204918146133, -0.015060453675687313, -0.009990891441702843, 0.031217830255627632, -0.013911649584770203, -0.05125890672206879, 0.0037892013788223267, -0.01728394627571106, -0.00018274327157996595, 0.02494758367538452, 0.04942082241177559, -0.04497383534908295, -0.011384280398488045, -0.03551658242940903, 0.01958155445754528, 0.03430107235908508, -0.00172413291875273, 0.020886003971099854, -0.024636294692754745, -0.003655791748315096, -0.014371171593666077, 0.018618041649460793, 0.00607013376429677, 0.03133641555905342, 0.027245191857218742, -0.0037669665180146694, -0.04847213253378868, 0.0004314964753575623, 0.003320415038615465, -0.004698980133980513, 0.030773133039474487, -0.00863456167280674, -0.020085547119379044, 0.0025199579540640116, 0.007782222703099251, -0.038777705281972885, -0.038748059421777725, -0.04091225564479828, 0.016631722450256348, -0.04844248294830322, -0.027185898274183273, 0.0037280553951859474, 0.006036781240254641, 0.019122032448649406, 0.02107870578765869, -0.003729908261448145, 0.0006851135403849185, -0.021641992032527924, -0.029261158779263496, -0.03919275477528572, -0.02740824781358242, -0.007393111474812031, -0.017639705911278725, -0.06302859634160995, -0.008160216733813286, 0.004710097797214985, -0.02909810096025467, 0.00786375068128109, 0.0331152118742466, 0.008100923150777817, 0.03418248891830444, -0.027956709265708923, 0.023732073605060577, -0.0010691292118281126, -0.04402514547109604, 0.019062740728259087, 0.005251147318631411, 0.06492597609758377, 0.022160805761814117, -0.027141429483890533, -0.0020196721889078617, 0.006118309684097767, 0.02829764410853386, -0.00489538861438632, 0.020144838839769363, 0.01955190859735012, 0.015356919728219509, 0.03865911811590195, -0.001109893200919032, -0.02903880923986435, -0.012866608798503876, -0.03696926310658455, -0.000766178360208869, -0.011651099659502506, -0.01645384170114994, 0.01869215816259384, -0.01407470554113388, -0.04094190523028374, -0.0030183906201273203, 0.006718652322888374, 0.024117479100823402, 0.013933884911239147, -0.0643923357129097, 0.017002303153276443, 0.014637990854680538, -0.010450413450598717, -0.01012430153787136, -0.03545729070901871, -0.016883717849850655, 0.01630561053752899, 0.02445841394364834, -0.0008263979689218104, 0.007393111474812031, 0.04767167195677757, 0.00900514330714941, -0.0315735898911953, -0.003980051260441542, 0.005117738153785467, 0.0439065583050251, -0.010806172154843807, -0.004395103082060814, -0.02820870466530323, -0.02429535798728466, -0.01637972705066204, 0.03302627056837082, -0.02115282230079174, -0.031128890812397003, 0.031692177057266235, -0.003194417105987668, 0.011310163885354996, 0.03278909996151924, -0.04257246479392052, 0.03382672742009163, -0.004939858801662922, 0.024665940552949905, -0.019952137023210526, 0.04532959684729576, 0.019166503101587296, 0.02362831123173237, 0.020189309492707253, -0.027764005586504936, -0.02814941108226776, -0.026830140501260757, -0.010783937759697437, -0.03397496044635773, -0.015935027971863747, -0.005614317953586578, -0.005436438601464033, -0.048264604061841965, -0.011132284067571163, 0.01493445597589016, 0.03812548145651817, -0.004999151919037104, -0.006903943605720997, -0.049806226044893265, 0.018543925136327744, 0.020811887457966805, 0.027008019387722015, -0.00036039104452356696, -0.011176754720509052, -0.019848374649882317, -0.019863197579979897, -0.030980657786130905, -0.011628864333033562, 0.005191854201257229, -0.008382565341889858, 0.011110049672424793, 0.008931026794016361, -0.01064311619848013, 0.031158538535237312, 0.011843802407383919, 0.006318423897027969, 0.019181326031684875, -0.009249728173017502, 0.03302627056837082, 0.005429026670753956, 0.015112335793673992, 0.016172200441360474, -0.03468647971749306, -0.015171628445386887, -0.015008572489023209, -0.003868876490741968, 0.003950404468923807, 0.005121443886309862, 0.01575714908540249, 0.0035946457646787167, 0.013177897781133652, 0.004617452155798674, 0.003064713440835476, -0.003470500698313117, 0.005473496858030558, 0.03513117879629135, 0.02112317644059658, 0.02181987091898918, 0.019374029710888863, 0.00818986352533102, 0.02101941406726837, 0.028564464300870895, 0.02038201130926609, 0.0027701007202267647, -0.03824406489729881, -0.01575714908540249, -0.0017065303400158882, -0.022145982831716537, -0.033233799040317535, -0.024799350649118423, 0.012029092758893967, -0.031781114637851715, -0.03047666698694229, -0.005073267966508865, 0.008782794699072838, -0.01637972705066204, -0.010302180424332619, -0.007363465148955584, -0.0021160233300179243, -0.02345043234527111, 0.019922491163015366, 0.01884039118885994, -0.026504026725888252, -0.0031240065582096577, 0.011169342324137688, 0.04254281893372536, -0.019344381988048553, 0.031069599092006683, -0.017432179301977158, 0.002332814037799835, -0.006448127329349518, 0.04879824444651604, 0.024754879996180534, 0.014867751859128475, -0.01250343769788742, -0.006881708279252052, -0.02276856079697609, -0.01658725179731846, 0.03851088508963585, 0.0016351932426914573, -0.007900808937847614, -0.003983756992965937, 0.03287803754210472, -0.01946296915411949, -0.021478934213519096, 0.023065026849508286, -0.004910212010145187, 0.004821272566914558, -0.028371760621666908, -0.0468415692448616, 0.03610951453447342, -0.009027378633618355, -0.007411640603095293, -0.007908220402896404, 0.050517745316028595, -0.02346525527536869, 0.0072893486358225346, 0.009212669916450977, 0.0010765407932922244, 0.023361491039395332, 0.007626578211784363, -0.013096368871629238, 0.013592949137091637, 0.020945297554135323, 0.025614630430936813, 0.00453221844509244, 0.02894986979663372, -0.00856785662472248, -0.04085296392440796, 0.003466794965788722, -0.04165342077612877, 0.003457530401647091, -0.015964673832058907, 0.009546193294227123, 0.03978568688035011, -0.015964673832058907, 0.015097511932253838, 0.029439037665724754, 0.010524529963731766, -0.006166485138237476, 0.007307877764105797, 0.007708106655627489, 0.005769962444901466, 0.007626578211784363, -0.005662493407726288, 0.020782241597771645, -0.007348641753196716, 0.027126604691147804, 0.010724644176661968, 0.007708106655627489, -0.030091261491179466, 0.02831246703863144, 0.006299894768744707, 0.0034742066636681557, 0.003902228781953454, 0.00568102253600955, -0.0022679620888084173, 0.03056560643017292, 0.011643687263131142, -0.026474380865693092, 0.02591109648346901, 0.022264568135142326, 0.05440144240856171, -0.01012430153787136, -0.023895129561424255, -0.013904238119721413, 0.005076974164694548, 0.008805029094219208, -0.005228912457823753, -0.010457824915647507, -0.044262319803237915, -0.002477340865880251, 0.013563302345573902, 0.008389977738261223, 0.008501151576638222, 0.003639115719124675, -0.002755277557298541, 0.04168306663632393, -0.02436947450041771, -0.015104924328625202, 0.030165378004312515, 0.02985408902168274, 0.016957834362983704, 0.019092386588454247, -0.01892933063209057, -0.0406750850379467, 0.039518870413303375, 0.03771042823791504, -0.04079367220401764, 0.03160323575139046, -0.004328398033976555, -0.008908792398869991, -0.02183469384908676, -0.003791054245084524, -0.005781079642474651, -0.03711749613285065, -0.006563007831573486, -0.01946296915411949, -0.0064518335275352, -0.01731359213590622, -0.005818137899041176, -0.030862072482705116, 0.042216707020998, 0.006325835362076759, 0.002371725160628557, -0.008130569942295551, -0.02967621013522148, -0.0015786795411258936, 0.0019566731061786413, 0.0019714965019375086, 0.0014276673318818212, -0.020915649831295013, -0.01572750136256218, -0.013830121606588364, 0.041149429976940155, 0.02207186631858349, -0.026252031326293945, 0.031128890812397003, 0.015890557318925858, 0.02193845622241497, 0.003894817316904664, 0.001785279018804431, 0.0029072160832583904, -0.008968085050582886, -0.0018353075720369816, -0.006789063103497028, 0.007170762401074171, 0.004954681731760502, 0.031781114637851715, -0.011295340955257416, 0.00034325162414461374, 0.005225206725299358, 0.020960120484232903, 0.0008824484539218247, 0.03347096964716911, 0.00900514330714941, -0.01372635830193758, 0.007307877764105797, 0.01884039118885994, -0.05953029915690422, -0.011488042771816254, -0.005332675762474537, 0.014163645915687084, 0.015594092197716236, 0.015356919728219509, -0.010524529963731766, -0.05585412681102753, 0.01632043346762657, 0.0035297938156872988, 0.05558730661869049, -0.021375171840190887, -0.010094654746353626, -0.02656332030892372, -0.004743450321257114, 0.045122068375349045, 0.009205257520079613, -0.00985007081180811, -0.03341167792677879, 0.013822710141539574, 0.017417356371879578, 0.033352382481098175, -0.005832961294800043, 0.01660207472741604, 0.015949850901961327, -0.0027423070278018713, -0.020915649831295013, -0.007333818357437849, -0.03498294577002525, 0.013303895480930805, 0.003548322943970561, -0.000733752443920821, -0.012659082189202309, -0.01723947562277317, -0.010813583619892597, -0.006618595216423273, -0.011569571681320667, -0.006214660592377186, 0.02419159561395645, 0.015149394050240517, 0.018632864579558372, -0.018573570996522903, -0.023168789222836494, 0.0022142278030514717, 0.00432469230145216, 0.0014063587877899408, -0.01577197201550007, -0.009635132737457752, 0.006748299114406109, -0.016098083928227425, -0.03148464858531952, -0.002075259340927005, -0.014230350032448769, -0.018217813223600388, -0.007945278659462929, -0.007967513985931873, -0.009160787798464298, -0.01718018390238285, -0.008004572242498398, 0.03148464858531952, 0.010724644176661968, 0.0031536531168967485, 0.00864938460290432, 0.031217830255627632, 0.022457271814346313, 0.00908667128533125, -8.917130617192015e-05, 0.02121211588382721, -0.003700261702761054, 0.008945850655436516, 0.03433072194457054, -0.017447002232074738, -0.008782794699072838, -0.02343560755252838, -0.021419642493128777, -0.023302199319005013, -0.019329559057950974, -0.01491963304579258, -0.03361920267343521, 0.008923615328967571, 0.02659296803176403, 0.010443001985549927, -0.018543925136327744, 0.02574804052710533, 0.022531388327479362, 0.00827880296856165, 0.023984069004654884, -0.010843230411410332, 0.006318423897027969, 0.0003330605977680534, -0.005043621640652418, 0.004250575788319111, -0.030713839456439018, -0.03868876397609711, 0.037206437438726425, 0.002240168396383524, -0.005251147318631411, -0.0197149645537138, -0.005073267966508865, 0.007619166746735573, -0.005073267966508865, 0.010257710702717304, -0.045833587646484375, 0.005769962444901466, 0.038836997002363205, 0.06124980002641678, 0.019270265474915504, 0.003185152541846037, 0.012258853763341904, 0.009649956598877907, -0.00303136114962399, -0.014378583058714867, 0.018558748066425323, -0.014519404619932175, -0.011028521694242954, 0.026059329509735107, 0.020634008571505547, -0.004250575788319111, 0.011206400580704212, -0.04470701888203621, -0.018618041649460793, 0.008478917181491852, 0.020722948014736176, -0.02184951677918434, -0.015053042210638523, 0.01529762614518404, -0.010168771259486675, -0.002658926183357835, -0.010109477676451206, 0.011525101028382778, 0.028831282630562782, 0.006970648188143969, 0.017002303153276443, 0.030862072482705116, 0.013748593628406525, 0.002041907049715519, 0.011028521694242954, -0.01955190859735012, -0.0011108196340501308, -0.013681888580322266, 0.022397978231310844, 0.028594110161066055, -0.027082135900855064, 0.02577768638730049, -0.024680763483047485, -0.01580161787569523, -0.018973801285028458, 0.03690997138619423, 0.01369671244174242, 0.005158502142876387, -0.023865483701229095, -0.021716106683015823, 0.008738324046134949, -0.03871840983629227, 0.011888272128999233, 0.03610951453447342, 0.028860928490757942, 0.008456681855022907, -0.0005957106477580965, -0.008352919481694698, 0.006918766535818577, -0.008108334615826607, -0.021419642493128777, -0.0055068489164114, 0.006248013116419315, -0.029290804639458656, 0.02109353058040142, 0.006444421596825123, 0.011873448267579079, -0.0102058295160532, 0.05973782390356064, -0.008738324046134949, 0.009909363463521004, -0.016127729788422585, 0.014889986254274845, -0.018262282013893127, -0.010346650145947933, 0.04500348120927811, 0.010383708402514458, -0.0029257452115416527, 0.0033148564398288727, 0.03204793483018875, 0.016231494024395943, -0.023153966292738914, 0.013244601897895336, 0.010472648777067661, 0.0024903113953769207, -0.026118621230125427, 0.010969228111207485, -0.013296484015882015, 0.0082046864554286, -0.01257014274597168, 0.001746367895975709, -0.02977997250854969, -0.023168789222836494, -0.01057641115039587, -0.020159663632512093, -0.0165576059371233, 0.017521118745207787, -0.012525673024356365, 0.031781114637851715, -0.012525673024356365, 0.01179192028939724, 0.013466951437294483, 0.0012062445748597383, -0.0012636847095564008, 0.017076419666409492, -0.00246807630173862, -0.019981782883405685, 0.056061651557683945, 0.05425320938229561, 0.050517745316028595, -0.005799608770757914, 0.027897415682673454, -0.01808440312743187, -0.04912435635924339, -0.028445877134799957, 0.008427035994827747, 0.010694997385144234, 0.011888272128999233, 0.008041630499064922, 0.024665940552949905, -0.003980051260441542, -0.01328166015446186, 0.01814369671046734, -0.029394567012786865, 0.01796581782400608, -0.031010305508971214, -0.02600003592669964, 0.015460683032870293, 0.013985766097903252, -0.0031147419940680265, -0.00470639206469059, -0.0028053061105310917, 0.0009176537860184908, 0.049094706773757935, -0.028564464300870895, -0.0637994036078453, -0.04642651975154877, 0.0028386584017425776, -0.01660207472741604, 0.019255442544817924, -0.01568303257226944, 0.00571437506005168, -0.011584394611418247, 0.005436438601464033, -0.02359866350889206, 0.012325558811426163, 0.004632275551557541, 0.021389994770288467, 0.034923650324344635, -0.01491963304579258, 0.003652086015790701, 0.015935027971863747, -0.03602057322859764, -0.08692372590303421, -0.003729908261448145, 0.010835818946361542, 0.018603218719363213, 0.016676191240549088], "index": 72}, {"title": "173 Hours in Captivity", "text": "173 Hours In Captivity: The Hijacking of IC 814 is a 2000 book (ISBN 81-7223-394-9) written by Neelesh Misra, a New Delhi-based correspondent of the Associated Press. The book is about the hijacking of Indian Airlines Flight 814 on its journey from Kathmandu to New Delhi on Christmas Eve, December 24, 1999.", "vector": [-0.006944699212908745, -0.001118911779485643, -0.013426940888166428, -0.042452022433280945, -0.04637115076184273, 0.02707335352897644, -0.03354775533080101, 0.03241904824972153, -0.01223552506417036, 0.020645979791879654, 0.011091139167547226, 0.004393345210701227, 0.006885912269353867, -0.030600570142269135, -0.06126384809613228, -0.04677874222397804, -0.007748120930045843, 0.0044325366616249084, -0.022480132058262825, -0.008622086606919765, 0.0149632403627038, 0.0014735930599272251, -0.013278014026582241, -0.006976052187383175, 0.04677874222397804, 0.012486349791288376, 0.0073522888123989105, 0.022401750087738037, 0.05170116946101189, -0.02486296370625496, -0.06051137298345566, -0.02390669658780098, -0.005541650578379631, -0.020128654316067696, -0.021414129063487053, -0.004115086980164051, -0.03489593788981438, 0.039410777390003204, -0.011898480355739594, 0.00919428002089262, 0.010001621209084988, 0.004220903385430574, -0.03683982789516449, 0.024831609800457954, -0.02523919939994812, -0.046057622879743576, -0.01780852861702442, -0.029064271599054337, -0.029189683496952057, 0.014626194722950459, 0.007524730637669563, 0.0007069131825119257, -0.03683982789516449, -0.009860532358288765, 0.012745012529194355, 0.04329855367541313, 0.061984967440366745, 0.06590409576892853, 0.0161154642701149, -0.04922427982091904, -0.010448401793837547, -0.07838261127471924, 0.02194713056087494, 0.010613005608320236, -0.012987998314201832, -0.013897236436605453, 0.023828312754631042, -0.016977673396468163, -0.01502594631165266, 0.031603869050741196, -0.009978106245398521, 0.009695928543806076, 0.024768903851509094, -0.003525257809087634, -0.014594841748476028, -0.03652629628777504, 0.02599167264997959, 0.02346775308251381, 0.01763608679175377, 0.027810148894786835, -0.02199416048824787, -0.0004955250769853592, 0.011294933967292309, -0.0013491606805473566, -0.0149632403627038, -0.043079081922769547, -0.020254066213965416, -0.09694360941648483, -0.027292825281620026, -0.02059894986450672, 0.038971833884716034, 0.02290339767932892, -0.010080003179609776, -0.022480132058262825, -0.03019298054277897, -0.007324854843318462, 0.04439590871334076, -0.02865668199956417, 0.0011355680180713534, -0.06063678488135338, 0.00228289351798594, -0.020112978294491768, -0.005557327065616846, -0.020818421617150307, 0.046841446310281754, -0.002435739617794752, 0.00970376655459404, 0.020693009719252586, -0.002284853020682931, 0.015394343994557858, -0.050196222960948944, 0.030647600069642067, 0.012274716980755329, 0.01369344163686037, -0.02592896670103073, -0.002420063130557537, 0.021226011216640472, -0.0066076540388166904, 0.006384263746440411, -0.042765550315380096, -0.004593221005052328, 0.00020648918871302158, 0.011914156377315521, 0.05029028281569481, 0.02428293228149414, 0.043267201632261276, -0.01914103329181671, 0.00016570572915952653, -0.02776312083005905, -0.004009270574897528, 0.023749930784106255, 0.004514838103204966, 0.00038358490564860404, 0.044615380465984344, -0.0036134382244199514, 0.013677765615284443, 0.004056300036609173, -0.05226552486419678, 0.019360505044460297, 0.03621276468038559, 0.03524082154035568, 0.010213254019618034, -0.02675982192158699, 0.027089029550552368, -0.003491945331916213, 0.013881560415029526, -0.014242120087146759, -0.045054323971271515, -0.03671441227197647, 0.03799989074468613, -0.004561868030577898, 0.021476835012435913, -0.024894315749406815, -0.003450794378295541, -0.006772257387638092, 0.042138490825891495, 0.0011404670076444745, 0.00041493793833069503, -0.02296610362827778, -0.026164114475250244, 0.007438509725034237, -0.05872425064444542, 0.00550245912745595, -0.0137953395023942, 0.01084815338253975, -0.01578625664114952, -0.025286229327321053, -0.0001309234503423795, 0.01863938383758068, 0.049098867923021317, -0.01026812195777893, 0.03276393190026283, 0.012995836324989796, -0.004134682472795248, -0.01661711372435093, -0.013497484847903252, 0.047468509525060654, 0.06123249605298042, -0.05170116946101189, 0.03238769248127937, -0.014782960526645184, 0.019548622891306877, -0.02205686643719673, -0.0406021922826767, -0.030600570142269135, 0.010362180881202221, 0.03354775533080101, 0.010534622706472874, 0.006756580900400877, -0.013740471564233303, -0.048346392810344696, 0.004365911241620779, -0.01928212121129036, 0.019313475117087364, -0.04097842797636986, -0.017228497192263603, -0.004138601943850517, 0.025035405531525612, 0.01667981967329979, -0.037122003734111786, 0.0010326908668503165, -0.018059352412819862, -0.02238607406616211, -0.003940685652196407, -0.0029628626070916653, 0.024345638230443, -0.014281311072409153, 0.012188496068120003, 0.03342234343290329, 0.03988107293844223, -0.009758634492754936, -0.012760688550770283, 0.0251137875020504, 0.024768903851509094, 0.03367316722869873, -0.0039014944341033697, -0.030867071822285652, -0.06026054918766022, 0.053174760192632675, -0.0026081812102347612, -0.00012498351861722767, 0.013928589411079884, 0.04966321960091591, -0.024706197902560234, -0.048471804708242416, 0.03615006059408188, -0.019579974934458733, 0.06628033518791199, -0.019689710810780525, -0.012917454354465008, 0.0023730334360152483, 0.034268878400325775, -0.0018664859235286713, 0.033516403287649155, -0.02890750579535961, 0.0161154642701149, -0.0018811826594173908, 0.044489968568086624, -0.008308556862175465, -0.05079193040728569, -0.024329962208867073, 0.058567486703395844, -0.008912102319300175, 0.0058904532343149185, -0.03067895397543907, 0.007634466048330069, -0.0017038419609889388, 0.05452294275164604, -0.026822529733181, 0.007418913766741753, 0.008426130749285221, -0.004311043303459883, 0.07248823344707489, 0.004146439954638481, 0.052547700703144073, 0.033829934895038605, -0.017197145149111748, 0.024549433961510658, -0.015653006732463837, 0.06301961839199066, 0.042953670024871826, -0.010134871117770672, 0.00916292704641819, -0.002514122286811471, -0.024894315749406815, 0.012925292365252972, 0.008347747847437859, -0.06916481256484985, -0.0005545569583773613, 0.005051759071648121, -0.010918697342276573, -0.007273905910551548, 0.03859559819102287, -0.029691332951188087, -0.011961186304688454, 0.015143520198762417, 0.006396020762622356, 0.0216963067650795, 0.00465984595939517, 0.004440374672412872, 0.030098922550678253, -0.03342234343290329, 0.016773877665400505, -0.010393533855676651, -0.008418291807174683, 0.015841124579310417, 0.0032038891222327948, 0.01782420463860035, -0.004577544517815113, -0.05072922632098198, -0.018059352412819862, 0.017024703323841095, -0.04358072951436043, 0.025270553305745125, -0.0173695869743824, 0.02226066030561924, 0.05402129516005516, -0.01997188851237297, 0.004836206790059805, -0.042201194912195206, -0.012807718478143215, 0.06929022818803787, -0.059257254004478455, -0.0028786014299839735, -0.0068702357821166515, -0.001865506055764854, -0.015880316495895386, 0.009884047321975231, -0.03226228058338165, -0.010957888327538967, -0.03019298054277897, -0.005416238214820623, 0.013035028241574764, -0.007175927981734276, 0.06985457986593246, -0.03868965432047844, -0.011639817617833614, -0.04091572016477585, -0.01655440777540207, -0.02053624391555786, 0.030459482222795486, 0.01920373924076557, 0.016044920310378075, 0.008833720348775387, 0.014438076876103878, -0.018733443692326546, 0.044301848858594894, -0.0013452415587380528, -0.015903830528259277, -0.03771771118044853, -0.0334850512444973, 0.001404028502292931, -0.03862695023417473, -0.024329962208867073, -0.02351478300988674, 0.009978106245398521, -0.03056921809911728, -0.0017204983159899712, 0.005980593152344227, -0.0021241686772555113, -0.0173695869743824, 0.007446347735822201, -0.006846720818430185, 0.0173695869743824, 0.011710361577570438, 0.023953724652528763, 0.05631006509065628, -0.004169954918324947, -0.0014422399690374732, -0.045054323971271515, 0.0007005445659160614, 0.002806097501888871, 0.028625328093767166, -0.002874682191759348, -0.009045353159308434, -0.03270122408866882, 0.008919941261410713, -0.008480998687446117, 0.018655061721801758, -0.027496619150042534, 0.06345856189727783, -0.02517649345099926, 0.02442402020096779, -0.00030250789131969213, 0.017259851098060608, -0.02840585820376873, 0.001964464085176587, -0.009852694347500801, -0.011812259443104267, -0.01901562139391899, 0.029503213241696358, 0.031431425362825394, -0.036933884024620056, 0.014532135799527168, 0.0029942155815660954, -0.017416615039110184, -0.04019460082054138, -0.047280389815568924, 0.0034409966319799423, 0.01211011316627264, 0.008951294235885143, -0.000986641040071845, -0.01635061204433441, -0.033265579491853714, 0.0011404670076444745, -0.004459970630705357, -0.0502275750041008, -0.02351478300988674, 0.016044920310378075, -0.00018456655379850417, -0.018341530114412308, -0.021602246910333633, -0.03511540964245796, -0.058881014585494995, -0.04006918892264366, -0.026477646082639694, -0.006850639823824167, 0.013097734190523624, 0.06311367452144623, 0.0016156615456566215, 0.016585759818553925, 0.05104275420308113, -0.010707064531743526, 0.06690739840269089, -0.012627438642084599, 0.00890426430851221, 0.02409481443464756, -0.0390658937394619, -0.0508546382188797, 0.0007554123876616359, 0.014351855963468552, 0.06985457986593246, -0.012125789187848568, 0.03190172091126442, -0.033140167593955994, -0.040351368486881256, -0.026023026555776596, 0.053801823407411575, -0.0381566546857357, -0.006164791993796825, -0.02617979235947132, 0.03759229928255081, -0.03140007331967354, -0.002782582538202405, -0.037247415632009506, -0.007434590253978968, 0.0056788199581205845, 0.005298664327710867, 0.038971833884716034, 0.0013374033151194453, -0.04351802542805672, -0.0215552169829607, -0.01674252562224865, 0.038846421986818314, -0.03235634043812752, -0.026822529733181, -0.021210333332419395, 0.0209281574934721, 0.009782149456441402, 0.029942156746983528, -0.008598572574555874, -0.019768094643950462, -0.054366178810596466, 0.010103518143296242, 0.029283743351697922, -0.004412940703332424, -0.006940780207514763, 0.008159630000591278, 0.06471268087625504, -0.061420612037181854, -0.07831989973783493, -0.008951294235885143, 0.033328283578157425, -0.030475158244371414, 0.04812692105770111, 0.01265095267444849, -0.028060974553227425, -0.048691276460886, -0.014038325287401676, 0.07606248557567596, -0.005377046763896942, 0.031729280948638916, -0.0024729713331907988, -0.014955401420593262, 0.03821935877203941, -0.03169792890548706, 0.005259472876787186, 0.01755770482122898, -0.0032391613349318504, -0.003433158388361335, -0.0011179319117218256, 0.044176436960697174, -0.02174333669245243, -0.013238823041319847, 0.013301528990268707, -0.00970376655459404, -0.03840747848153114, 0.01243148185312748, -0.053049348294734955, -0.04364343732595444, 0.06734633445739746, 0.05743877589702606, 0.02586626075208187, 0.0005927684833295643, 0.005988431163132191, 0.011208713054656982, -0.03944212943315506, -0.017589056864380836, -0.05420941114425659, 0.0286723580211401, 3.6986792110837996e-05, 0.04075895622372627, 0.03379858285188675, 0.006678198464214802, -0.0313216894865036, 0.04066489636898041, -0.04812692105770111, -0.05442888289690018, 0.055463533848524094, -0.007944077253341675, 3.058758738916367e-05, 0.014140223152935505, 0.04304772987961769, -0.006521433126181364, 0.05201470106840134, -0.0036095192190259695, 0.05656089261174202, 0.03229363635182381, 0.051450345665216446, 0.0036722251679748297, -0.012666629627346992, 0.05891237035393715, -0.0024455373641103506, 0.02517649345099926, -0.03546029329299927, 0.02619546838104725, -0.007708929479122162, 0.009735120460391045, 0.03210551664233208, -0.003936766646802425, 0.01693064346909523, 0.02955024316906929, -0.012729335576295853, 0.0038113542832434177, 0.03887777402997017, -0.02251148596405983, 0.04210713878273964, -0.017667440697550774, -0.04304772987961769, 0.020724361762404442, 0.036494944244623184, -0.013975619338452816, -0.014155899174511433, -0.017150115221738815, 0.011835774406790733, 0.015010269358754158, 0.0039642006158828735, 0.000687317515257746, -0.011498728767037392, 0.022229308262467384, -0.007501215673983097, -0.011146007105708122, -0.021727658808231354, -0.003866222221404314, -0.04881668835878372, 0.004942023660987616, -0.03583652898669243, 0.017651762813329697, -0.05442888289690018, -0.022527161985635757, -0.018153412267565727, 0.010244606994092464, 0.009891885332763195, 0.01870208978652954, -0.017197145149111748, 0.018858855590224266, 0.017871234565973282, 0.007164170499891043, 0.006027622614055872, 0.01622520014643669, 0.0001946093252627179, 0.02226066030561924, 0.00045804836554452777, 0.0275906790047884, 0.017353909090161324, 0.03342234343290329, -0.02447105012834072, 0.007132817525416613, 0.00374081009067595, -0.02296610362827778, 0.021837394684553146, 0.012345260940492153, -0.027496619150042534, -0.024345638230443, -0.0032685548067092896, -0.0009939894080162048, -0.0066076540388166904, -0.03771771118044853, 0.03771771118044853, -0.008559380657970905, -0.02694794163107872, -0.03273257613182068, 0.018231794238090515, -0.02447105012834072, 0.03301475569605827, -0.003572287503629923, -0.019768094643950462, -0.052923936396837234, -0.03602464869618416, 0.03759229928255081, -0.009750796481966972, 0.02892318367958069, -0.010871668346226215, 0.00643913121894002, -0.019485916942358017, -0.008935617282986641, 0.005941401701420546, 0.011044109240174294, 0.0004367381043266505, -0.03017730452120304, -0.025458671152591705, 0.04053948447108269, -0.019564298912882805, 0.028766417875885963, -0.009076706133782864, -0.004122925456613302, 0.013042866252362728, -0.014391046948730946, 0.022370396181941032, 0.042953670024871826, -0.02890750579535961, 0.0009533285046927631, -0.013129087164998055, -0.007399318274110556, -0.02555273100733757, -0.01347397081553936, 0.004738228861242533, 0.010895182378590107, -0.0012168900575488806, -0.07537271827459335, 0.03430023044347763, 0.017071731388568878, 0.04630844667553902, 0.045555971562862396, 0.006533190608024597, -0.010032974183559418, -0.0011561434948816895, 0.04229525476694107, -0.029832420870661736, 0.012862586416304111, 0.019517268985509872, 0.0071406555362045765, -0.006066814064979553, 0.017542028799653053, 0.04571273922920227, -0.004667684435844421, 0.005294745322316885, -0.04583815112709999, -0.010244606994092464, 0.019313475117087364, -0.024580786004662514, 0.022354720160365105, -0.02447105012834072, 0.032826635986566544, -0.005757202859967947, -0.039285365492105484, 0.07054434716701508, -0.0378117710351944, 0.022119572386145592, -0.011639817617833614, 0.0027159573510289192, 0.025474347174167633, 0.04301637411117554, 0.024267256259918213, 0.01505729928612709, 0.00025253897183574736, -0.006827125325798988, 0.00805773213505745, -0.00024666026001796126, 0.019815122708678246, -0.0038093947805464268, -0.032826635986566544, -0.021774688735604286, -0.004773500841110945, -0.00514973746612668, -0.023248281329870224, -0.015276770107448101, 0.001614681794308126, 0.0026199386920779943, -0.017212821170687675, -0.01017406303435564, 0.025333259254693985, -0.000777947367168963, -0.008065570145845413, -0.04862857237458229, -0.021853070706129074, -0.02630520425736904, 0.022417426109313965, -0.01782420463860035, -0.03809394687414169, -0.008410453796386719, -0.0353662334382534, -0.009633222594857216, 0.02505108155310154, -0.01116168312728405, -0.020818421617150307, 0.05743877589702606, 0.01080896146595478, 0.018529647961258888, -0.03088274784386158, 0.024486728012561798, 0.008300717920064926, -0.022856369614601135, 0.005882614757865667, -0.015402182936668396, -0.02632088027894497, 0.030396776273846626, 0.027183089405298233, -0.007708929479122162, 0.04938104376196861, 0.008198820985853672, 0.036181412637233734, -0.0181377362459898, 0.01857667788863182, -0.01356802973896265, 0.002130047418177128, -0.006290204357355833, 0.02467484585940838, 0.007806907873600721, -0.015613815747201443, 0.004742147866636515, 0.02066165581345558, 0.0032117273658514023, -0.0011718199821189046, 0.04916157200932503, 0.038971833884716034, 0.030287040397524834, -0.00670563243329525, -0.00257486873306334, -0.03988107293844223, 0.022433102130889893, 0.0020888964645564556, 0.016726849600672722, -0.062423910945653915, 0.018231794238090515, 0.008896426297724247, -0.04110383987426758, 0.0019291919888928533, -0.02675982192158699, 0.011702523566782475, -0.016209524124860764, -0.0011355680180713534, 0.004593221005052328, 0.004111167974770069, 0.07907237857580185, -0.041824959218502045, 0.007771635893732309, -0.008473159745335579, -0.0021222091745585203, 0.028703711926937103, 0.03288934379816055, -0.023044487461447716, -0.023938048630952835, -0.003572287503629923, 0.018717767670750618, 0.003954402636736631, -0.0019389898516237736, 0.018592355772852898, 0.00273555307649076, 0.004052381031215191, -0.0046637654304504395, -0.015308124013245106, 0.03658900037407875, -0.05486782640218735, 0.002888399176299572, 0.037122003734111786, 0.023310987278819084, -0.02865668199956417, -0.00705443462356925, -0.006474403664469719, 0.012000377289950848, 0.04235796257853508, -0.013136925175786018, -0.0011198915308341384, 0.03279528394341469, -0.015449211932718754, 0.015919508412480354, -0.036432236433029175, -0.002782582538202405, -0.022182278335094452, -0.039222657680511475, 0.056404124945402145, -0.0011825975961983204, 0.013278014026582241, 0.008253688924014568, -0.06929022818803787, 0.03514676168560982, -0.005032163579016924, 0.0024122248869389296, 0.018169088289141655, -0.03423752263188362, 0.0030647600069642067, 0.015966538339853287, 0.014218605123460293, -0.039410777390003204, 0.026226820424199104, -0.03790583088994026, 0.016476023942232132, -0.03207416459918022, -0.015135682187974453, 0.010785447433590889, 0.03727876767516136, 0.005137979984283447, 0.015645168721675873, 0.029769714921712875, -0.0173695869743824, -0.0023181657306849957, -0.0350213497877121, -0.018984267488121986, 0.007991107180714607, 0.023044487461447716, -0.007818665355443954, 0.02327963523566723, -0.04053948447108269, 0.002004635287448764, -0.058065835386514664, 0.023640194907784462, -0.013881560415029526, -0.0034743091091513634, -0.007230795919895172, -0.044489968568086624, -0.002576828235760331, 0.008888588286936283, 0.038344770669937134, -0.0038897369522601366, 0.033829934895038605, -0.02194713056087494, -0.01857667788863182, -0.02815503254532814, -0.006027622614055872, 0.01490053441375494, 0.021633600816130638, 0.06722092628479004, -0.005322179291397333, -0.02624249830842018, 0.02561543695628643, 0.03749823942780495, -0.007285663392394781, 0.015268932096660137, -0.02726147137582302, -0.019940536469221115, -0.02351478300988674, -0.00465984595939517, -0.019579974934458733, -0.0011326286476105452, -0.00047739906585775316, -0.025521377101540565, 0.042765550315380096, 0.023028811439871788, -0.01699334941804409, 0.003925009164959192, 0.013654250651597977, -0.009899723343551159, 0.0016411358956247568, -0.03263852000236511, 0.026524674147367477, -0.001224728301167488, -0.03213686868548393, -0.020583273842930794, -0.009789987467229366, -0.022809339687228203, 0.029079947620630264, -0.02536461316049099, 0.008159630000591278, -0.009656737558543682, -0.013230984099209309, -0.01518271118402481, -0.006074652075767517, 0.0023710739333182573, 0.0007407156517729163, -0.004742147866636515, 0.02338937111198902, -0.01353667676448822, 0.006654683500528336, 0.03702794387936592, -0.022041190415620804, -0.04690415412187576, -0.050697870552539825, 0.01928212121129036, 0.004507000092417002, 0.003697699634358287, -0.013654250651597977, 0.05467970669269562, 0.010997080244123936, -0.019297799095511436, -0.039348069578409195, 0.059884313493967056, -0.008394777774810791, -0.011710361577570438, -0.015880316495895386, -0.0011247904039919376, -0.006458727177232504, 0.024392668157815933, 0.0216963067650795, 2.584176581876818e-05, -0.0037368908524513245, 0.03796853497624397, -0.04367478936910629, 0.007469862699508667, -0.027919884771108627, 0.029409155249595642, -0.0028531269636005163, -0.009962429292500019, -0.023671548813581467, 0.008136115036904812, -0.024439698085188866, -0.008998323231935501, -0.008763175457715988, -0.03198010474443436, 0.0015118045266717672, -0.0017430332954972982, -0.002161400392651558, 0.000911687733605504, -0.024753227829933167, 0.0027453508228063583, -0.031556837260723114, -0.00967241358011961, -0.0493183359503746, -0.028013944625854492, 0.003370452206581831, -0.06245526298880577, 0.02561543695628643, 0.0006569442339241505, 0.025348935276269913, -0.01984647661447525, -0.021006539463996887, -0.030459482222795486, 0.01226687803864479, 0.008755337446928024, -0.009985944256186485, -0.019940536469221115, -0.009296177886426449, 0.025521377101540565, -0.0010777608258649707, 0.02619546838104725, -0.019642682746052742, -0.007626628037542105, -0.018733443692326546, 0.024643491953611374, -0.004224822856485844, -0.024251578375697136, 0.002827652730047703, -0.024392668157815933, -0.036181412637233734, 0.025568407028913498, -0.004393345210701227, -0.05649818480014801, -0.02030109614133835, -0.013897236436605453, -0.022668249905109406, -4.8927893658401445e-05, 0.026979293674230576, 0.026681439951062202, -0.033767227083444595, -0.026650087907910347, -0.036996591836214066, -0.04558732733130455, -0.0025983834639191628, 0.029409155249595642, -0.014061840251088142, -0.03266987204551697, -0.029330771416425705, -0.01145169883966446, 0.03398669883608818, -0.005169332958757877, 0.007951915264129639, -0.034456994384527206, -0.03778041899204254, -0.009633222594857216, 0.028296122327446938, 0.028013944625854492, 0.02396940253674984, 0.015480564907193184, 0.0035664087627083063, -0.036244116723537445, 0.039912424981594086, -0.02440834417939186, -0.010675711557269096, 0.014806474559009075, -0.0017763458890840411, -0.028954535722732544, -0.005714092403650284, 0.003090234473347664, 0.0006662521627731621, -0.0061216820031404495, 0.003149021416902542, 0.01705605536699295, -0.011569272726774216, -0.010252445004880428, -0.007422833237797022, -0.0353662334382534, 0.02904859557747841, -0.009186442010104656, -0.029518891125917435, -0.012948807328939438, 0.029942156746983528, -0.019109679386019707, 0.006552786100655794, -0.01508865226060152, 0.00017011475574690849, -0.00630979984998703, 0.003090234473347664, -0.0071249790489673615, -0.0517638735473156, -0.007669738493859768, 0.05442888289690018, -0.007258229423314333, -0.01680523157119751, -0.009985944256186485, 0.016914967447519302, 0.010675711557269096, -0.042138490825891495, -0.01315260212868452, 0.053237468004226685, -0.006352910306304693, 0.04088436812162399, 0.008245850913226604, 0.07179847359657288, 0.02111627534031868, 0.011263580992817879, -0.004620654974132776, 0.005921806208789349, -0.00013178076187614352, -0.013999134302139282, 0.008418291807174683, -0.017730146646499634, 0.0025807474739849567, -0.011373316869139671, -0.039724305272102356, 0.0644618570804596, -0.03511540964245796, 0.03818800672888756, -0.018937237560749054, -0.009554839693009853, -0.009209956973791122, 0.01744796894490719, -0.011530081741511822, 0.0022632977925240993, -0.001071882201358676, 0.034645114094018936, 0.007277825381606817, 0.044740792363882065, 0.011921994388103485, 0.047092270106077194, 0.020018918439745903, -0.008582895621657372, -0.016632789745926857, 0.07273906469345093, -0.0110049182549119, 0.024047784507274628, 0.021084921434521675, 0.04837774485349655, -0.0018645263044163585, 0.025474347174167633, 0.027089029550552368, -0.018670737743377686, 0.009915400296449661, 0.0013863923959434032, 0.025286229327321053, -0.038971833884716034, -0.04649656265974045, -0.04336125776171684, 0.04508567601442337, 0.01915670931339264, 0.022919075563549995, -0.002326003974303603, -0.04981998726725578, -0.009468618780374527, -0.007172008510679007, 0.017150115221738815, 0.031933076679706573, 0.02003459446132183, -0.03868965432047844, -0.033516403287649155, -0.02638358622789383, 0.013591544702649117, 0.041824959218502045, 0.0017126599559560418, -0.029377801343798637, 0.008629925549030304, -0.0232639592140913, 0.011412507854402065, 0.002200591843575239, -0.015190549194812775, 0.037247415632009506, 0.007395399268716574, -0.024267256259918213, -0.025145141407847404, -0.004785258322954178, 0.031478457152843475, -0.030428128316998482, 0.003413562662899494, 0.002376952674239874, -0.00039019843097776175, 0.02505108155310154, 0.019313475117087364, 0.028045296669006348, 0.028829123824834824, 0.02284069173038006, -0.01801232434809208, -0.01229823101311922, -0.009061029180884361, -0.003893656190484762, 0.020018918439745903, 0.021727658808231354, 0.0024788500741124153, 0.0025533135049045086, 0.039159949868917465, -0.02707335352897644, 0.012376613914966583, -0.0006015865365043283, -0.0350213497877121, 0.005913967732340097, 0.056843068450689316, 0.019564298912882805, -0.02226066030561924, 0.0016068434342741966, 0.0032999077811837196, -0.006313719321042299, 0.024941345676779747, -0.00291583314538002, -0.024110490456223488, -0.012948807328939438, 0.05910048633813858, -0.004420779179781675, -0.004228741861879826, -0.0010640439577400684, -0.027355531230568886, 0.008990485221147537, 0.0011757391039282084, 0.025380289182066917, -0.004350234754383564, -0.03558570519089699, 0.04781339317560196, -0.030396776273846626, -0.04132331162691116, 0.031102219596505165, 0.042640138417482376, -0.02802962064743042, -0.003587963990867138, -0.0053927237167954445, 0.01502594631165266, -0.003246999578550458, 0.0452737957239151, -0.017855558544397354, 0.006325476337224245, 0.014782960526645184, -0.001190435839816928, 0.03270122408866882, -0.012682306580245495, -0.028452886268496513, 0.0010973565513268113, 0.029707008972764015, 0.018623707816004753, 0.03749823942780495, -0.025004051625728607, -0.030334070324897766, 0.03931671753525734, -0.019674034789204597, -0.015425697900354862, -0.02238607406616211, -0.02009730041027069, -0.02378128282725811, -0.0010424887295812368, 0.047970157116651535, 0.03183901682496071, -0.015308124013245106, 0.008379100821912289, -0.01113033015280962, 0.014822151511907578, 0.011255742982029915, -0.019579974934458733, 0.018153412267565727, 0.030537864193320274, -0.004706875886768103, -0.03596194088459015, 0.02669711597263813, -0.0011179319117218256, -0.006834963336586952, -0.0019233132479712367, 0.0012276676716282964, 0.015214064158499241, 0.01693064346909523, 0.008755337446928024, -0.029032917693257332, -0.04539920762181282, -0.012658791616559029, -0.0044834851287305355, 0.013991295360028744, 0.005224200896918774, -0.010613005608320236, -0.017353909090161324, 0.006058975588530302, -0.004322800785303116, -0.0027316338382661343, 0.007944077253341675, -0.04367478936910629, -0.02117898128926754, 0.009445104748010635, 0.021147627383470535, 0.0129409683868289, 0.007203361950814724, 0.006756580900400877, -0.020065948367118835, -0.02904859557747841, -0.01578625664114952, 0.016961997374892235, 0.003664386924356222, -0.0251137875020504, 0.03361046314239502, 0.0017596895340830088, 0.018184766173362732, -0.011530081741511822, 0.03204280883073807, 0.016272230073809624, -0.02473755180835724, -0.0007363066542893648, 0.020379478111863136, -0.01782420463860035, 0.011459537781774998, 0.02478458173573017, 0.05493053421378136, -0.010785447433590889, 0.00702308164909482, 0.0049459426663815975, 0.026775499805808067, 0.02226066030561924, -0.007262148894369602, -0.008355585858225822, -0.01055813767015934, 0.004032785072922707, -0.03166657313704491, -0.016899291425943375, -0.02296610362827778, -0.03803124278783798, -0.03480187803506851, 0.024063460528850555, -0.02694794163107872, 0.018733443692326546, 0.0007456145831383765, 0.004581463523209095, 0.0015529554802924395, 0.0161154642701149, 0.045054323971271515, 0.023875342682003975, 0.013168278150260448, -0.013136925175786018, 0.004115086980164051, -0.003537015290930867, -0.009586192667484283, -0.004507000092417002, -0.0030079325661063194, -0.002235863823443651, -0.026461968198418617, 0.02478458173573017, -3.1720461265649647e-05, 0.04260878637433052, 0.010119195096194744, 0.0014197049895301461, 0.00954700168222189, 0.03746688738465309, -0.02130439318716526, -0.005353532265871763, -0.014453752897679806, 0.02625817432999611, -0.04411373287439346, -0.03138439729809761, 0.022715279832482338, 0.005302583333104849, -0.03082004189491272, -0.009954591281712055, -0.01863938383758068, -0.011686846613883972, 0.005290826316922903, -0.021351423114538193, -0.048471804708242416, -0.02776312083005905, 0.0240321084856987, 0.02371857687830925, -0.0008313455618917942, 0.005220281891524792, -0.033892638981342316, 0.01743229292333126, 0.052547700703144073, -0.030161628499627113, -0.02721444144845009, -0.0003118158201687038, -0.04000648483633995, -0.019830800592899323, -0.018858855590224266, 0.012737173587083817, 0.026524674147367477, -0.004773500841110945, -0.007556083612143993, 0.018310178071260452, -0.008198820985853672, -0.018106382340192795, -0.023232605308294296, -0.02226066030561924, 0.029754038900136948, 0.009398074820637703, 0.033265579491853714, 0.023577488958835602, -0.023985078558325768, -0.010291636921465397, -0.018216118216514587, -0.01232958398759365, -0.0061412774957716465, 0.008951294235885143, -0.0026473726611584425, -0.018796149641275406, -0.006239255890250206, -0.024894315749406815, -0.03146278113126755, -0.018811825662851334, -0.019485916942358017, -0.00031818440766073763, -0.011475213803350925, 0.012596085667610168, 0.050823282450437546, -0.030647600069642067, 0.027684736996889114, 0.03567976504564285, 0.014445914886891842, -0.01730688102543354, -0.005051759071648121, -0.0044834851287305355, 0.01017406303435564, -0.025693818926811218, 0.011138169094920158, 0.0006804590229876339, -0.020144330337643623, 0.005326098296791315, 0.005984512157738209, -0.0015715713379904628, -0.019674034789204597, 0.011976862326264381, 0.013011513277888298, -0.0022143085952848196, 0.03489593788981438, 0.03232498839497566, 0.03044380620121956, 0.016523053869605064, -0.025772202759981155, -0.007850018329918385, -0.020975185558199883, 0.027857178822159767, -0.003482147352769971, 0.015292447060346603, -0.013842368498444557, -0.011577111668884754, -0.0110049182549119, -0.0001840766635723412, -0.027183089405298233, 0.0021359261590987444, -0.0016989430878311396, -0.014163737185299397, 0.01058949064463377, -0.00453443406149745, 0.005298664327710867, -0.04267149418592453, -0.015127843245863914, -0.0042679328471422195, 0.008222335949540138, 0.03790583088994026, -0.009343206882476807, -0.01163197960704565, 0.02777879685163498, -0.005239877384155989, -0.008849396370351315, -0.025035405531525612, 0.015268932096660137, -0.014320502988994122, 0.00377216306515038, -0.015457050874829292, 0.009860532358288765, -0.018216118216514587, -0.04006918892264366, 0.005020406097173691, -0.010471916757524014, -0.033453699201345444, -0.009742958471179008, 0.013489646837115288, -0.031478457152843475, 0.023953724652528763, -0.013677765615284443, 0.015895992517471313, -0.018106382340192795, 0.05772095173597336, 0.0019203738775104284, 0.03329693153500557, 0.011498728767037392, -0.008888588286936283, -0.015308124013245106, 0.006129520013928413, -0.020473537966609, 0.008363424800336361, -0.007571760099381208, 0.012117951177060604, -0.004119005985558033, 0.026273850351572037, 0.000795093597844243, 0.009272662922739983, -0.03317151963710785, 0.01940753310918808, 0.006219659931957722, 0.003372411709278822, -0.02036380209028721, 0.002931509632617235, -0.0010709024500101805, 0.025599760934710503, 0.006000188644975424, -0.028766417875885963, 0.02059894986450672, -0.008567219600081444, 0.012815556488931179, 0.02542731910943985, -0.014555650763213634, 0.016852261498570442, -0.025474347174167633, 0.024878639727830887, 0.0001223503495566547, -0.001590187195688486, 0.007505134679377079, 0.010699226520955563, 0.04216984286904335, 0.02467484585940838, 0.019799446687102318, -0.008190982975065708, -0.01601356640458107, 0.0071406555362045765, -0.020144330337643623, 0.013082057237625122, -0.007689333986490965, 0.014038325287401676, 0.018028000369668007, -0.012815556488931179, -0.03266987204551697, -0.006901588756591082, 0.026524674147367477, 0.00812043808400631, 0.0021084921900182962, -0.02142980508506298, 0.00702308164909482, 0.006337233819067478, 0.02149251103401184, 0.013779662549495697, -0.009774311445653439, -0.04596356302499771, -0.024126166477799416, -0.01515135820955038, -0.003041245276108384, -0.0036839826498180628, -0.020834097638726234, -0.00022926913516130298, -0.0018880411516875029, 0.005055678077042103, 0.03524082154035568, 0.032952047884464264, -0.0030980727169662714, 0.024753227829933167, 0.007755959406495094, -0.013066381216049194, 0.025333259254693985, 0.012643114663660526, 0.017996646463871002, -0.006329395808279514, -0.018608031794428825, -0.011733876541256905, 0.01661711372435093, 0.026712793856859207, -0.0070857880637049675, 0.019862152636051178, 0.0011140127899125218, -0.007344450335949659, 0.02605437859892845, 0.017197145149111748, -0.0173695869743824, 0.015966538339853287, -0.006329395808279514, -0.01984647661447525, 0.031211955472826958, -0.018811825662851334, -0.0038858179468661547, 0.05543218180537224, -0.011812259443104267, -0.019689710810780525, -0.03229363635182381, -0.0015774499624967575, 0.008622086606919765, 0.020003242418169975, -0.03831341862678528, -0.0017175589455291629, 0.01148305181413889, -0.013740471564233303, -0.0071210600435733795, 0.054491590708494186, -0.02592896670103073, -0.01780852861702442, 0.009837017394602299, 0.02890750579535961, -0.006983890663832426, -0.02180604264140129, -0.006431293208152056, 0.028484240174293518, -0.0006520453025586903, -0.012353098951280117, -4.360032471595332e-05, 0.0068388828076422215, -0.00776771642267704, 0.00029834380256943405, -0.004800934810191393, -0.011028433218598366, 0.009837017394602299, -0.0030510430224239826, -0.01553543284535408, -0.025270553305745125, -0.029957832768559456, 0.02359316498041153, -0.042326610535383224, -0.0037094568833708763, -0.01576274260878563, -0.026085732504725456, 0.026806851848959923, -0.006051137577742338, -0.009962429292500019, -0.01106762420386076, -0.02365587092936039, -0.010855991393327713, 0.0010268121259287, 0.0034351178910583258, 0.013991295360028744, 0.03530352562665939, 0.015558947809040546, -0.01388939842581749, -0.01356802973896265, -0.03273257613182068, 0.00728958286345005, -0.004095491487532854, 0.007712848950177431, 0.008277203887701035, -0.034519702196121216, -0.009899723343551159, -0.0005756223108619452, -0.00890426430851221, -0.024204550310969353], "index": 73}, {"title": "Jubilee (biblical)", "text": "The Jubilee (Hebrew yovel \u05d9\u05d5\u05d1\u05dc) year is the year at the end of seven cycles of shmita (Sabbatical years), and according to Biblical regulations had a special impact on the ownership and management of land in the Land of Israel; there is some debate whether it was the 49th year (the last year of seven sabbatical cycles, referred to as the Sabbath's Sabbath), or whether it was the following (50th) year. Jubilee deals largely with land, property, and property rights.", "vector": [-0.007218821905553341, 0.000699120108038187, -0.013559678569436073, 0.007747226394712925, -0.03489097207784653, -0.006568477489054203, -0.0091129494830966, -0.010665646754205227, -0.01128347311168909, 0.0755700096487999, -0.010405508801341057, -0.06435156613588333, 0.005763676483184099, 0.03719969466328621, 0.015502582304179668, 0.005336887668818235, 0.034143075346946716, -0.011478576809167862, 0.04422341287136078, 0.012234602123498917, -0.038858070969581604, -0.005324693862348795, -0.01055996585637331, -0.00483287125825882, -0.017786916345357895, -0.012047627940773964, 0.012462222948670387, -0.01845351979136467, -0.03349273279309273, 0.02832249365746975, 0.02861514873802662, 0.007332631852477789, -0.00664164125919342, -0.014283186756074429, 0.02687547728419304, 0.0005273885908536613, -0.00814149808138609, 0.006373374257236719, -0.03963848575949669, -0.0915684774518013, 0.013177601620554924, -0.019429035484790802, 0.0041784620843827724, 0.013592195697128773, 0.02206292934715748, 0.0025688600726425648, -0.010738810524344444, 0.01920141465961933, -0.04750765115022659, 0.027412012219429016, -0.006531895603984594, 0.015218056738376617, 0.03667941689491272, 0.07433435320854187, 0.02518458291888237, -0.05391354113817215, -0.007804131601005793, 0.029980871826410294, -0.06318094581365585, -0.0011320055928081274, -0.004865388385951519, -0.023249808698892593, -0.01120218075811863, 0.003971165046095848, -0.006365244742482901, -0.0026907995343208313, 0.012868687510490417, 0.045751720666885376, 0.012982497923076153, 0.006474990397691727, -0.01770562306046486, -0.02773718349635601, 0.03726472705602646, 0.0036703806836158037, -0.027493305504322052, 0.036419279873371124, 0.03466334939002991, 0.028989097103476524, -0.059506502002477646, 0.04806044325232506, -0.024127773940563202, -0.024745600298047066, -0.04077658802270889, -0.04090665653347969, -0.001985582523047924, 0.029216717928647995, 0.04106924310326576, -0.07127773761749268, 0.03654934838414192, -0.00013070396380499005, -0.016843916848301888, -0.04289020597934723, -0.06269319355487823, -0.034728385508060455, 0.04910099506378174, -0.012267119251191616, 0.012608549557626247, 0.015803366899490356, 0.00916985422372818, -0.06679035723209381, 0.03220830112695694, -0.06331101804971695, -0.05745792016386986, -0.014762815088033676, 0.007970781996846199, -0.011250955983996391, -0.011039594188332558, 0.0011777328327298164, 0.009283664636313915, -0.003737447317689657, 0.019819242879748344, 0.041459448635578156, 0.020794758573174477, -0.002298560691997409, -0.031818095594644547, 0.017689364030957222, -0.016226090490818024, -0.04503634199500084, -0.0043288543820381165, 6.630463030887768e-05, -0.013421480543911457, -0.04253251850605011, 0.008999139070510864, -0.014055565930902958, 0.007946394383907318, -0.04048393294215202, -0.005572637543082237, 0.02204667218029499, 0.043312929570674896, -0.027899770066142082, -0.05976663902401924, -0.05739288404583931, -0.042630068957805634, -0.02007937990128994, 0.0036581866443157196, 0.0041337511502206326, 0.00190428935457021, 0.032696060836315155, -0.028793994337320328, 0.02066469006240368, -0.013128825463354588, -0.015193668194115162, 0.016234219074249268, 0.0703672543168068, 0.04763771966099739, -0.057945676147937775, -0.0008322374778799713, 0.030940130352973938, -0.010242922231554985, -0.04136189818382263, 0.054466333240270615, 0.030598698183894157, 0.01059248298406601, -0.001737638609483838, -0.002672508591786027, 0.0195591039955616, -0.04549158364534378, 0.03219204396009445, -0.018014537170529366, 0.023835118860006332, -0.005405987147241831, -0.024908186867833138, -0.029980871826410294, 0.0351836271584034, -0.01421815250068903, -0.012527257204055786, 0.01985175907611847, -0.04526396468281746, 0.029151683673262596, 0.0165106151252985, -0.04393075779080391, -0.05199502781033516, -0.05267788842320442, -0.05212509632110596, 0.053295716643333435, -0.036874521523714066, 0.03625669330358505, 0.00856015644967556, -0.023184774443507195, -0.024940703064203262, -0.03198068216443062, 0.010454284958541393, -0.009682000614702702, 0.009226759895682335, 0.015258703380823135, -0.0037963849026709795, 0.018323451280593872, 0.008340665139257908, -0.043833207339048386, -0.03437069430947304, -0.00972264725714922, -0.011437930166721344, 0.03139537200331688, 0.027428271248936653, 0.0017427194397896528, -0.030257267877459526, 0.0001978977379621938, 0.023022187873721123, -0.062010329216718674, -0.0243228767067194, 0.04806044325232506, 0.02380260080099106, 0.050336647778749466, 0.04396327584981918, 0.03528117761015892, 0.019233932718634605, -0.004946681205183268, -0.051962509751319885, 0.06763580441474915, -0.05088943988084793, 0.06854628771543503, 0.03905317559838295, -0.005023909732699394, -0.046564649790525436, 0.010031560435891151, -0.01029982790350914, 0.02588370256125927, 0.025786152109503746, 0.03661438450217247, 0.0006950554670765996, 0.04932861402630806, -0.05749043449759483, -0.011153404600918293, -0.030679991468787193, 0.01363284233957529, 0.010803844779729843, 0.007039976771920919, -0.005418180953711271, -0.041231829673051834, -0.014104342088103294, -0.022469395771622658, 0.02907039038836956, -0.03778500482439995, 0.009072302840650082, -0.04532899707555771, -0.011234697885811329, -0.006068525370210409, 0.022355584427714348, 0.019412776455283165, -0.05414116382598877, 0.018209639936685562, -0.02604628913104534, -0.038858070969581604, -0.013356446288526058, -0.03541124612092972, 0.003912227228283882, -0.022306809201836586, 0.03674445301294327, -0.03986610472202301, 0.006714805029332638, 0.028127390891313553, -0.009771423414349556, -0.020209448412060738, 0.008174015209078789, -0.03485845401883125, -0.01850229501724243, -0.030598698183894157, 0.012242731638252735, -0.034273143857717514, 0.061425019055604935, -0.0097795519977808, 0.024648047983646393, -0.02206292934715748, -0.05323068052530289, 0.019705431535840034, 0.036646902561187744, -0.020518362522125244, 0.003511859104037285, 0.001754913479089737, 0.01427505724132061, 0.049068477004766464, 0.028680182993412018, 0.028420045971870422, 0.03970351815223694, -0.022843344137072563, -0.007832583971321583, 0.008535768836736679, 0.021558912470936775, -0.0019916794262826443, -0.007243209518492222, 0.022664498537778854, -0.00731230853125453, -0.01238905917853117, 0.04266258701682091, 0.02890780381858349, 0.02430661767721176, -0.04106924310326576, -0.008137432858347893, -0.01549445278942585, 0.01450267806649208, -0.006231111474335194, -0.041296862065792084, 0.012437834404408932, 0.02929801121354103, -0.00011679522867780179, -0.0378500372171402, -0.02733071893453598, 0.019802983850240707, 0.006292080972343683, -0.035606350749731064, -0.0065400246530771255, 0.004397953394800425, -0.021623948588967323, -0.013559678569436073, -0.005930326879024506, -0.013226376846432686, -0.04438599944114685, 0.011689938604831696, 0.02791602909564972, -0.0028777734842151403, 0.052320197224617004, -0.004084974993020296, -0.02269701659679413, 0.01364097185432911, 0.0831790342926979, -0.03732976317405701, -0.010543706826865673, -0.02768840827047825, 0.018437260761857033, 0.012055757455527782, 0.037980105727910995, 0.008271566592156887, -0.02025822550058365, -0.05407612770795822, 0.03677697107195854, -0.008035816252231598, -0.03729724511504173, -0.012681713327765465, -0.01462461706250906, 0.004971069283783436, -0.011063982732594013, -0.05911629647016525, 0.014088083058595657, 0.02687547728419304, 0.007287920918315649, -0.027249425649642944, -0.0067513869144022465, 0.044776204973459244, 0.010755068622529507, -0.026420237496495247, 0.012884946539998055, -0.03963848575949669, 0.011340378783643246, -0.016478098928928375, -0.008007364347577095, 0.0037211887538433075, -0.010153500363230705, -0.030273526906967163, 0.048775821924209595, -0.025574790313839912, 0.0008098818943835795, 0.023477429524064064, -0.0029326463118195534, 0.00728385616093874, 0.018811209127306938, -0.011023336090147495, -0.06835118681192398, -0.029054131358861923, 0.00732856709510088, -0.01364097185432911, 0.0486457534134388, -0.023054705932736397, 0.0060319434851408005, 0.013771040365099907, -0.027769701555371284, -0.05856350436806679, 6.164457317936467e-06, -0.0024794377386569977, -0.01603911630809307, -0.02019319124519825, -0.03765493631362915, 0.006292080972343683, 0.042500000447034836, 0.0020953279454261065, -0.016388677060604095, 0.01398240216076374, -0.051214613020420074, 0.015575746074318886, 0.028127390891313553, 0.004808483179658651, 0.0074301837012171745, 0.02321729063987732, -0.007808196358382702, 0.0026481207460165024, 0.010787585750222206, -0.007978911511600018, 0.01218582596629858, 0.004369500558823347, -0.01128347311168909, -0.021136188879609108, -0.02907039038836956, 0.01677888259291649, -0.002062810817733407, 0.014266927726566792, 0.0044629876501858234, 0.0539785772562027, 0.016860175877809525, -0.02251817099750042, 0.027412012219429016, 0.008072398602962494, 0.05924636498093605, -0.050336647778749466, 0.05192999169230461, 0.017315417528152466, 0.03521614521741867, 0.027720926329493523, -0.045881789177656174, 0.00305458577349782, 0.02407899685204029, 0.0025790215004235506, 0.012941851280629635, 0.03609410673379898, 0.0006533928099088371, 0.01804705336689949, -0.013136954978108406, -0.009332440793514252, 0.026550306007266045, 0.04380068928003311, -0.0064058913849294186, -0.01059248298406601, -0.032923679798841476, 0.018599847331643105, -0.06568477302789688, 0.023721307516098022, -0.060677122324705124, -0.009291794151067734, -0.00843821745365858, -0.03237088769674301, -0.03651683032512665, 0.033687833696603775, -0.04380068928003311, -0.012234602123498917, 0.031232785433530807, 0.04984889179468155, 0.03895562142133713, -0.010868879035115242, -0.002457082038745284, -0.0010923751397058368, 0.015258703380823135, 0.027460787445306778, 0.01840474270284176, -0.017543036490678787, -0.05153978615999222, -0.010698163881897926, -0.010511189699172974, -0.01000717282295227, -0.04119931161403656, -0.01569768600165844, 0.02554227225482464, 0.012917463667690754, 0.03463083505630493, -0.023542463779449463, -0.028306234627962112, -0.005060491617769003, 0.03131407871842384, 0.06422150135040283, -0.015274961479008198, -0.07153787463903427, -0.002747704740613699, 0.015079858712852001, -0.028533855453133583, 0.03253347426652908, 0.023835118860006332, -0.05355585366487503, -0.022436877712607384, -0.002007937990128994, -0.0037252535112202168, -0.014161246828734875, 0.011275344528257847, 0.025038255378603935, 0.0014002725947648287, -0.0054466333240270615, -0.08857689052820206, 0.0565149188041687, -0.021656464785337448, -0.016632555052638054, 0.026777926832437515, -0.010950172320008278, 0.04162203520536423, 0.016681330278515816, 0.025688599795103073, -0.013145084492862225, -0.05280795693397522, 0.05014154687523842, -0.018323451280593872, 0.04659716784954071, 0.012267119251191616, -0.028582632541656494, -0.023574979975819588, 0.015014823526144028, 0.03157421573996544, 0.010324215516448021, -0.0009887265041470528, 0.009698259644210339, 0.028127390891313553, 0.020063120871782303, -0.027997322380542755, -0.03446824848651886, 0.026013771072030067, -0.0323871448636055, -0.04591430723667145, -0.01741296797990799, 0.0008662789477966726, 0.039605967700481415, -0.009438121691346169, -0.010186017490923405, -0.02025822550058365, 0.006133559625595808, 0.0007539929356426001, -0.0182258989661932, -0.005999425891786814, 0.012632938101887703, -0.03152544051408768, -0.01122656837105751, 0.020225707441568375, -0.0004123081162106246, 0.010746939107775688, -0.005950650200247765, -0.030777543783187866, -0.015470065176486969, -0.0035423440858721733, 0.00852763932198286, 0.009958396665751934, -0.037622418254613876, 0.024696825072169304, -0.0032374951988458633, 0.019185157492756844, 0.0008474799105897546, 0.006466860882937908, 0.016291124746203423, 0.03254973143339157, 0.019754208624362946, -0.050336647778749466, 0.027769701555371284, 0.02227429300546646, -0.022355584427714348, -0.049068477004766464, 0.02089231088757515, -0.0047271898947656155, -0.021250000223517418, 0.008365053683519363, -0.015421289019286633, 0.009828328154981136, -0.0059018745087087154, 0.024583013728260994, 0.013901108875870705, 0.03710214048624039, 0.0032171718776226044, -0.008917845785617828, -0.025233358144760132, 0.05830336734652519, -0.02240436151623726, -0.0029163877479732037, 0.01671384833753109, 0.006625382695347071, 0.003654122119769454, 0.035021040588617325, 0.03736228123307228, 0.010405508801341057, 0.012787395156919956, 0.0020871986635029316, 0.013242635875940323, 0.004038231447339058, 0.022371843457221985, -0.018209639936685562, -0.03654934838414192, -0.05605967715382576, 0.0863657221198082, -0.03713465854525566, 0.006491248961538076, -0.04188217222690582, -0.011722455732524395, -0.025526013225317, -0.03006216511130333, 0.004345112945884466, -0.018209639936685562, -0.0023453040048480034, 0.03424062579870224, 0.014055565930902958, 0.048775821924209595, -0.005084879230707884, 0.005844969302415848, -0.0168926939368248, 0.00230059283785522, -0.009999043308198452, 0.01827467419207096, -0.01978672482073307, 0.010104724206030369, -0.032354630529880524, 0.010551836341619492, -0.03511859104037285, 0.03476090356707573, -0.03168802708387375, -0.02396518737077713, -0.011218438856303692, 0.04363810271024704, -0.0003830934292636812, 0.005044233053922653, 0.030013389885425568, -0.0042678844183683395, -0.0016766688786447048, 0.006926166824996471, -0.02890780381858349, 0.0009562093182466924, 0.003552505746483803, -0.022469395771622658, -0.016591908410191536, -0.03921576216816902, -0.005206819158047438, -0.01543754804879427, -0.035086072981357574, 0.042500000447034836, -0.023347361013293266, -0.018551070243120193, -0.02692425437271595, 0.03191564604640007, -0.06376625597476959, -0.0023574980441480875, -0.0068245502188801765, -0.024095255881547928, -0.033330146223306656, 0.021786533296108246, -0.014478289522230625, -0.022371843457221985, -0.016665073111653328, 0.0022314938250929117, -0.025753634050488472, -0.0027659956831485033, 0.007231015712022781, -0.0004862339701503515, 0.034208111464977264, 0.007222886197268963, -0.046922340989112854, -0.014779074117541313, 0.01639680564403534, 0.014705910347402096, 0.00635305093601346, -0.03385042026638985, 0.011624904349446297, 0.003524053143337369, 0.015917176380753517, 0.019006311893463135, 0.004824741743505001, 0.027005547657608986, -0.008495122194290161, 0.018437260761857033, 0.003591120010241866, 0.04532899707555771, 0.005117396824061871, -0.005552314221858978, -0.02656656503677368, 0.04503634199500084, 0.023119740188121796, 0.02988331951200962, -0.033102523535490036, 0.013600325211882591, -0.008836553432047367, 0.01827467419207096, 0.01944529451429844, 0.0020059056114405394, -0.036354247480630875, 0.038728002458810806, -0.007210692390799522, 0.01612853817641735, 0.012592291459441185, -0.03680948540568352, -0.01799827814102173, -0.0024489527568221092, 0.02430661767721176, -0.03404552489519119, 0.00876338966190815, 0.013128825463354588, -0.0032151394989341497, 0.00274973688647151, 0.033622801303863525, 0.0026704762130975723, -0.025526013225317, -0.004101233556866646, 0.04916602745652199, 0.025233358144760132, -0.006548154167830944, -0.02733071893453598, 0.01798201911151409, -0.02105489745736122, 0.027070581912994385, -0.014023048803210258, 0.03993114084005356, -0.029639441519975662, -0.009641353972256184, -0.00394677696749568, -0.0151774100959301, 0.019591622054576874, 0.008991009555757046, -0.05433626472949982, 0.017965761944651604, -0.04649961739778519, 0.002824933035299182, 0.03654934838414192, -0.03710214048624039, -0.025103289633989334, -0.021965378895401955, 0.006084783934056759, -0.06880642473697662, 0.031818095594644547, 0.009177983738481998, 0.04380068928003311, -0.014722169376909733, -0.028403786942362785, 0.03993114084005356, -0.011966334655880928, -0.025217099115252495, -0.00543850427493453, -0.0499139241874218, -0.04223986342549324, 0.016494357958436012, -0.002215235261246562, 0.002686734776943922, 0.006999330595135689, -0.013811687007546425, -0.012080145068466663, 0.009121078997850418, -0.043312929570674896, -0.04188217222690582, -0.003117587883025408, 0.007100946735590696, 0.01430757436901331, -0.05212509632110596, -0.041296862065792084, 0.01433196198195219, 0.009551932103931904, -0.008909717202186584, 0.03241966292262077, -0.01978672482073307, -0.0061660767532885075, 0.00965761300176382, 0.03290742263197899, -0.025135807693004608, 0.02263198234140873, 0.01151922345161438, -0.024387910962104797, 0.012063886970281601, -0.02251817099750042, -0.0043085310608148575, 0.04162203520536423, 0.011998851783573627, -0.0014388867421075702, 0.06275822222232819, -0.007930135354399681, -0.05215761065483093, 0.036061592400074005, -0.011389154009521008, -0.008755260147154331, 0.03069625049829483, 0.0013443835778161883, 0.038565415889024734, 0.009088561870157719, 0.019705431535840034, -0.05183244124054909, 0.02344491146504879, 0.02570485882461071, -0.02258320525288582, 0.011787489987909794, -0.005019844975322485, -0.05280795693397522, -0.00869835540652275, 0.009438121691346169, 0.019754208624362946, 0.027818476781249046, -0.016006598249077797, 0.02380260080099106, -0.031427886337041855, -0.026436494663357735, -0.01664881408214569, 0.0024835022632032633, 0.0031582345254719257, -0.002715187380090356, -0.04276013746857643, 0.008991009555757046, 0.018664881587028503, -0.02716813236474991, -0.007523670792579651, 0.003875645576044917, 0.0444510318338871, -0.024696825072169304, -0.001723412424325943, -0.02437165193259716, 0.0005050330073572695, -0.009730776771903038, 0.04302027449011803, 0.016860175877809525, 0.010316086001694202, 0.015592004172503948, -0.003891904139891267, 0.019055087119340897, 0.027298200875520706, 0.0036663159262388945, 0.029037872329354286, -0.0029163877479732037, 0.014340091496706009, 0.001700040651485324, 0.022258033975958824, -0.040191277861595154, 0.017510520294308662, 0.007560252211987972, 0.021493878215551376, 0.043442998081445694, 0.019689174368977547, -0.003696800908073783, -0.006954619195312262, 0.020745983347296715, -0.03625669330358505, 0.01488475501537323, 0.01741296797990799, -0.008869070559740067, -0.006357115693390369, -0.006747322157025337, -0.013673488982021809, -0.06441660225391388, 0.00847073458135128, 0.04962126910686493, -0.005101138260215521, -0.017087796702980995, 0.027932288125157356, 0.01897379569709301, -0.03541124612092972, 0.04640206694602966, 0.013901108875870705, 0.033622801303863525, 0.018876243382692337, 0.04201224073767662, 0.0038268696516752243, 0.005531991366297007, -0.03853289783000946, 0.000835794024169445, -0.018323451280593872, 0.01546193566173315, -0.007422054186463356, 0.006787968799471855, 0.00946250930428505, 0.03843534737825394, -0.0002535326639190316, 0.01770562306046486, -0.0006244321120902896, 0.009901491925120354, -0.016543133184313774, 0.03256599232554436, 0.012234602123498917, -0.016087891533970833, -0.029054131358861923, -0.005361275747418404, 0.013730393722653389, -0.028972838073968887, -0.0004755642730742693, 0.01564890891313553, 0.027135616168379784, -0.03950841724872589, -0.027314459905028343, 0.011218438856303692, -0.005824645981192589, 0.01059248298406601, 0.008068334311246872, -0.011299732141196728, 0.0067310635931789875, -0.008917845785617828, 0.014665263704955578, -0.02726568467915058, 0.0018179155886173248, -0.02778596058487892, -0.014998565427958965, -0.016746366396546364, 0.016144797205924988, 0.025379685685038567, 0.05209257826209068, 0.021201223134994507, 0.05235271528363228, 0.07374904304742813, 0.010974559932947159, 0.017543036490678787, -0.013624712824821472, -0.055441852658987045, -0.01770562306046486, 0.025981254875659943, 0.027412012219429016, 0.007186304312199354, 0.02710309810936451, 0.016226090490818024, -0.041752103716135025, -0.048027925193309784, 0.0017610103823244572, 0.005032038781791925, -0.024810634553432465, 0.023135999217629433, -0.01845351979136467, -0.01311256643384695, -0.009421862661838531, 0.022014154121279716, -0.004320724867284298, -0.0201281551271677, -0.01596595160663128, -0.017152830958366394, 0.027054322883486748, 0.006418085191398859, 0.016274865716695786, -0.011714326217770576, 0.0003084054624196142, 0.013535290956497192, 0.020176932215690613, 0.000730621162801981, -0.023867635056376457, -0.009186113253235817, 0.04822302982211113, 0.0036195723805576563, 0.0302897859364748, -0.0025017932057380676, 0.019396519288420677, -0.01677888259291649, 0.011535481549799442, 0.017266640439629555, -0.02378634177148342, 0.03336266055703163, -0.031541697680950165, -0.006783904042094946, -0.012299636378884315, 0.002125812927260995, 0.00828782469034195, -0.046922340989112854, -0.013258893974125385, 0.009251147508621216, 0.02820868417620659, 0.009934009052813053, 0.006393697578459978, 0.02337987720966339, 0.026907995343208313, -0.024810634553432465, 0.0018890469800680876, 0.0075724464841187, 0.02084353379905224, -0.0018595781875774264, -0.005401922389864922, -0.0023615628015249968, 0.021900344640016556, 0.021656464785337448, 0.0539785772562027, -0.0499139241874218, 0.029525630176067352, 0.01700650341808796, -0.03892310708761215, 0.040061209350824356, -0.0050279744900763035, -0.021965378895401955, -0.005353146698325872, 0.002318883780390024, -0.002776157110929489, -0.01128347311168909, 0.014925401657819748, 0.04454858601093292, -0.022469395771622658, 0.0045320866629481316, -0.03557383269071579, 0.030712509527802467, 0.00732856709510088, 0.014291316270828247, -0.0038695484399795532, 0.008271566592156887, 0.00815369188785553, -0.020095638930797577, -0.006938360631465912, -0.012868687510490417, -0.0243228767067194, -0.013039402663707733, 0.014071824960410595, -0.010608741082251072, 0.004292272496968508, 0.006617253180593252, -0.019542846828699112, 0.018307192251086235, 0.03736228123307228, -0.013941755518317223, 0.01729915849864483, 0.02900535613298416, -0.031249042600393295, -0.015770848840475082, -0.0015232282457873225, 0.04311782494187355, -0.020680949091911316, 0.018957536667585373, -0.015014823526144028, -7.208406168501824e-05, 0.0015638747718185186, 0.03103768080472946, -0.03150917962193489, -0.023314842954277992, 0.00019243586575612426, -0.041231829673051834, 0.017250383272767067, 0.02042081020772457, 0.0005164648173376918, -0.009226759895682335, -0.0580432265996933, -0.020924827083945274, -0.026615340262651443, -0.004406082443892956, 0.015827754512429237, 0.05101950839161873, 0.01840474270284176, -0.02739575318992138, -0.04266258701682091, 0.04536151513457298, 0.026078805327415466, -0.021396327763795853, 0.016461839899420738, -0.0017193477833643556, -0.024452945217490196, -0.014144988730549812, 0.03677697107195854, 0.00423536729067564, 0.0235587228089571, -0.009771423414349556, 0.0861055850982666, 0.017315417528152466, -0.014283186756074429, -0.02071346528828144, -0.02645275369286537, -0.007019653916358948, -0.03284238651394844, 0.007291985210031271, 0.0006574574508704245, 0.02019319124519825, -0.014770944602787495, -0.022014154121279716, 0.008690225891768932, -0.0024591144174337387, 0.008104915730655193, -0.033460214734077454, -0.007730967830866575, 0.007438312750309706, -0.0013626745203509927, 0.012592291459441185, 0.012852429412305355, -0.01241344679147005, 0.014405125752091408, 0.04210979491472244, -0.03282612934708595, 0.030712509527802467, -0.015974082052707672, -0.027834735810756683, -0.010446155443787575, 0.0034915360156446695, 0.01601472869515419, -0.00821059662848711, -0.008015493862330914, -0.008568285964429379, -0.03882555291056633, 0.012380929663777351, 0.026013771072030067, 0.03440321236848831, -0.020550880581140518, -0.010836361907422543, 0.007820390164852142, -0.015754589810967445, -0.014933531172573566, 0.046271998435258865, 0.013600325211882591, -0.0017925114370882511, -0.0010192114859819412, -0.0633760541677475, -0.002243687864392996, 0.050694338977336884, 0.01007220707833767, 0.009186113253235817, -0.03677697107195854, 0.007117205299437046, 0.03250095620751381, -0.013584066182374954, -0.01915263943374157, -0.011754972860217094, -0.011592387221753597, -0.017510520294308662, 0.006897713989019394, -0.00484506506472826, -0.0005319613264873624, 0.013332057744264603, -0.0337853878736496, -0.008356924168765545, -0.014031178317964077, -0.010438025929033756, -0.005219012964516878, -0.007202562876045704, 0.024387910962104797, -0.007092817686498165, -0.011381025426089764, 0.019933052361011505, -0.03700459003448486, 0.02105489745736122, -0.02890780381858349, -0.002465211320668459, -0.028176166117191315, 0.052027542144060135, -0.03476090356707573, 0.004341048188507557, 0.03381790220737457, -0.02726568467915058, -0.032175783067941666, 0.029980871826410294, -0.019396519288420677, 0.03726472705602646, 0.0054425690323114395, 0.021867826581001282, 0.0189250186085701, 0.01944529451429844, 0.003322852775454521, 0.0012559774331748486, -0.013811687007546425, -0.027720926329493523, 0.02466430701315403, 0.014527065679430962, 0.007548058405518532, -0.007003395352512598, 0.0004430470580700785, -0.021607689559459686, -0.005145849194377661, 0.0004318692663218826, 0.021672723814845085, -0.006239240523427725, -0.010015302337706089, -0.007783808279782534, -0.017494261264801025, 0.009852715767920017, 0.01067377533763647, -0.001605537487193942, 0.00228433427400887, 0.005966908764094114, -0.01990053616464138, 0.01128347311168909, 0.004373565316200256, -0.027525821700692177, 0.012787395156919956, -0.016681330278515816, -0.020811017602682114, 0.012616679072380066, 0.019347742199897766, -0.008844682015478611, -0.01277113612741232, 0.0035403117071837187, 0.006783904042094946, -0.031883127987384796, 0.021965378895401955, -0.013145084492862225, -0.003322852775454521, 0.012039498426020145, 0.006958683952689171, 0.016161056235432625, -0.011803749017417431, -0.022030413150787354, 0.03230585157871246, -0.012283378280699253, 0.05206006020307541, -0.01090952567756176, -0.0009684032993391156, -0.013063791207969189, -0.03593152388930321, -0.0008850779267959297, 0.00394068006426096, -0.00393661530688405, 0.011153404600918293, -0.0351836271584034, 0.012510998174548149, 0.004170332569628954, 0.002770060207694769, 0.01363284233957529, 0.028127390891313553, 0.016087891533970833, -0.0048572588711977005, -0.015486323274672031, -0.010364862158894539, -0.005853098817169666, -0.013299540616571903, -0.008869070559740067, 0.0038390636909753084, -0.01565703935921192, -0.01903882995247841, 0.02687547728419304, -0.006056331098079681, -0.042857687920331955, -0.010462413541972637, 0.033053748309612274, 0.015274961479008198, -0.03807765990495682, 0.06285577267408371, 0.015047341585159302, 0.016697589308023453, -0.014738427475094795, 0.00012390836491249502, 0.05531178414821625, -0.004048393107950687, 0.017201606184244156, -0.014234410598874092, 0.023054705932736397, -0.005832775495946407, -0.0020292773842811584, -0.005174302030354738, 0.03957344964146614, 0.011738714762032032, -0.012486610561609268, -0.010161629877984524, -0.010738810524344444, -0.018957536667585373, 0.009584449231624603, -0.04497130960226059, 0.010828232392668724, 0.02170524001121521, 0.016437452286481857, 0.007791937794536352, -0.011356636881828308, 0.013933626934885979, -0.0030728767160326242, 0.028159907087683678, -0.07069242745637894, 0.016502486541867256, -0.035606350749731064, 0.028403786942362785, 0.008771518245339394, 0.0007351938984356821, 0.05222264677286148, -0.0061416891403496265, 0.026550306007266045, 0.036939557641744614, -0.04578423872590065, -0.01174684427678585, -0.025526013225317, 0.033021230250597, 0.015600133687257767, 0.017949502915143967, 0.033102523535490036, 0.01944529451429844, 0.023705050349235535, 0.014982306398451328, 0.007523670792579651, -0.007271662354469299, -0.03963848575949669, -0.012673584744334221, 0.014462031424045563, 0.023054705932736397, 0.014518936164677143, 0.01094204280525446, 0.002680637873709202, 0.0836993083357811, -0.04750765115022659, -0.032289594411849976, -0.025786152109503746, 0.00965761300176382, 0.013706006109714508, -0.01087700854986906, -0.01155174057930708, 0.004210979212075472, 0.018843725323677063, -0.0032293659169226885, -0.012437834404408932, 0.008608932606875896, -0.012641067616641521, 0.0026399914640933275, 0.001501888851635158, -0.021721499040722847, 0.01555135753005743, 0.0016583779361099005, 0.02594873681664467, -0.03648431599140167, -0.012746748514473438, 0.02663159929215908, -0.005670189391821623, 0.029281752184033394, 0.013071920722723007, 0.02606254816055298, -0.009877104312181473, 0.02570485882461071, -0.036126624792814255, -0.014478289522230625, 0.005942521151155233, -0.024160290136933327, -0.002664379309862852, 0.03133033588528633, 0.029785769060254097, -0.005857163108885288, -0.0064262147061526775, -0.009381216019392014, -0.025217099115252495, -0.031996939331293106, 0.011933817528188229, -0.01616918481886387, 0.008722743019461632, 0.03703710809350014, -0.01296623982489109, -0.010795715264976025, -0.023607498034834862, -0.010462413541972637, 0.026729149743914604, 0.004658090882003307, -0.00011171441292390227, 0.010405508801341057, 0.013380833901464939, 0.01250286865979433, -0.023753825575113297, -0.025135807693004608, -0.010161629877984524, -0.05134468153119087, -0.01926644891500473, -0.018729915842413902, 0.0022883990313857794, -0.011982593685388565, 0.014697780832648277, 0.02077849954366684, -0.016047244891524315, 0.035086072981357574, 0.01628299616277218, 0.004910099320113659, -0.01543754804879427, 0.04809296131134033, -0.02105489745736122, 0.002054681535810232, -0.006483119912445545, -0.03742731362581253, -0.0018138508312404156, 0.007243209518492222, -0.019754208624362946, -0.018811209127306938, 0.011494835838675499, 0.014340091496706009, -0.007393601816147566, 0.05297054350376129, -0.010746939107775688, 0.0008627223432995379, 0.007527735084295273, -0.03170428425073624, 0.016144797205924988, -0.02762337401509285, -0.004406082443892956, -0.016404934227466583, -0.009413734078407288, 0.007483024150133133, -0.006202658638358116, 0.018437260761857033, 0.043377965688705444, -0.0002258422173326835, 0.04002869129180908, -0.002963131293654442, -0.007499282713979483, 0.027005547657608986, 0.01921767368912697, -0.008779647760093212, 0.01793324388563633, -0.015624521300196648, 0.03846786543726921, 0.00818620901554823, 0.00046337032108567655, 0.011055853217840195, -0.0040057143196463585, -0.006194529589265585, 0.009999043308198452, 0.01712031289935112, -0.02084353379905224, 0.013901108875870705, -0.04672723636031151, 0.009438121691346169, -0.022388102486729622, 0.006568477489054203, -0.012933721765875816, -0.015998469665646553, -0.01897379569709301, 0.009860845282673836, 0.015478193759918213, -0.008324407041072845, 0.012429704889655113, -0.03233836963772774, -0.015608263202011585, -0.018583588302135468, 0.013584066182374954, -0.00021314018522389233, -0.020355775952339172, -0.019282707944512367, 0.001021243748255074, 0.0033452084753662348, 0.024127773940563202, 0.025916220620274544, -0.009023526683449745, 0.01687643490731716, 0.003538279328495264, 0.027720926329493523, -0.013884850777685642, -0.010234793648123741, 0.014681522734463215, -0.0038797101005911827, -0.031086457893252373, 0.015868401154875755, 0.007930135354399681, -0.030972646549344063, -0.0022396231070160866, -0.019071346148848534, -0.0011777328327298164, -0.007393601816147566, 0.0009328376036137342, -0.002056713914498687, -0.022794567048549652, 0.027119357138872147, -0.016591908410191536, 0.023412395268678665, 0.025834927335381508, 0.01938026025891304, -0.007710644509643316, 0.018030796200037003, 0.0070155891589820385, 0.0075846402905881405, 0.014949789270758629, -0.010454284958541393, 0.0036947685293853283, -0.03544376417994499, 0.004450793843716383, -0.02999713085591793, 0.0017071537440642715, -0.013966144062578678, 0.030940130352973938, -0.03801262378692627, 0.02285960130393505, 0.002453017281368375, -0.030891353264451027, -0.009820198640227318, -0.0015008726622909307, 0.006771709769964218, -0.03012719936668873, 0.015104246325790882, 0.008308148011565208, 0.003383822739124298, -0.01485223788768053, 0.017738141119480133, 0.011307861655950546, 0.029265493154525757, 0.023574979975819588, 0.0021420714911073446, -0.001266139093786478, 0.020583396777510643, -0.027477046474814415, 0.019071346148848534, -0.018209639936685562, -0.005036103539168835, 0.011120887473225594, 0.011600516736507416, -0.00732856709510088, -0.029281752184033394, 0.002652185270562768, 0.02581866830587387, 0.024794375523924828, 0.038565415889024734, 0.005462891887873411, -0.019412776455283165, 0.0017732044216245413, 0.029899578541517258, 0.007324502803385258, 0.022436877712607384, 0.030858837068080902, -0.005824645981192589, 0.01920141465961933, 0.00578806409612298, 0.032013196498155594, -0.02739575318992138, 0.012909334152936935, 0.00930805318057537, 0.004231302533298731, -0.014982306398451328, 0.004751577973365784, -0.029281752184033394, 0.03180183470249176, 0.03541124612092972, 0.016413064673542976, 0.024696825072169304, -0.020339516922831535, 0.023656273260712624, -0.011267215013504028, -0.04669472202658653, -0.011567999608814716, -0.006519701331853867, 0.036939557641744614, -0.03150917962193489, 0.03833779692649841, -0.021038638427853584, 0.024631790816783905, -0.0010547771817073226, -0.001498840400017798, 0.021380068734288216, -0.015510711818933487, -0.01770562306046486, 0.01520179770886898, -0.0025810538791120052, 0.03433817997574806, -0.008324407041072845, 0.02773718349635601, -0.006373374257236719, -0.015486323274672031, -0.022079188376665115, 0.0021745888516306877, -0.022355584427714348, -0.004954810719937086, 0.006861132103949785, 0.02170524001121521, -0.019461553543806076, 0.007645610254257917, -0.020063120871782303, 0.01612853817641735, 0.001941887428984046, -0.0024265970569103956, 0.007052171044051647, -0.025395944714546204, 0.011844395659863949, -0.0248268935829401, -0.021087413653731346, 0.007304179482161999, 0.00788136012852192, -0.03934583067893982, 0.0007011524285189807, 0.0010283569572493434, 0.013616583310067654, -0.022258033975958824, 0.006556283216923475, 0.028111131861805916, 0.00521088344976306, -0.025460978969931602, 0.007060300093144178, 0.051734887063503265, -0.038045141845941544, 0.005869357381016016, 0.04402830824255943, -0.018941277638077736, -0.0007128383149392903, -0.006068525370210409, -0.007011524401605129, 0.01308817882090807, 0.006499378476291895, -0.01459209993481636], "index": 74}, {"title": "Vonda Ward", "text": "Vonda Ward (born March 16, 1973, Macedonia, Ohio, United States) is an American female boxer who was also a well known NCAA basketball player.", "vector": [0.03396308422088623, 0.02457417920231819, -0.029978083446621895, -0.009539852850139141, -0.03918585181236267, -0.028785601258277893, 0.02391001209616661, -0.011773869395256042, -0.03194039314985275, 0.052227675914764404, -0.060590144246816635, 0.04386521130800247, -0.024000579491257668, -0.008815307170152664, -0.0015094703994691372, 0.004030286334455013, -0.03731410950422287, 0.011071966029703617, -0.012536152265965939, -0.06016749143600464, 0.0044378433376550674, 0.039819829165935516, 0.003256682539358735, -0.031185658648610115, 0.036408428102731705, 0.0006990734837017953, -0.016589080914855003, -0.007826603949069977, 0.014498463831841946, 0.03595558553934097, -0.04978233575820923, -0.010226662270724773, -0.024815693497657776, 0.0055397567339241505, 0.0017943830462172627, -0.008090761490166187, -0.017238153144717216, 0.012875783257186413, 0.007309610489755869, -0.029027117416262627, 0.011909721419215202, -0.022989235818386078, -0.027623308822512627, 0.013328623957931995, 0.0020698613952845335, -0.02899692766368389, -0.002651007380336523, -0.01728343591094017, 0.0195627361536026, -0.022551488131284714, -0.0030264882370829582, -0.027849730104207993, -0.009366264566779137, -0.009690800681710243, 0.04259725660085678, -0.03166868910193443, -0.020257093012332916, 0.05902029573917389, 0.06089203804731369, 0.0064643071964383125, -0.039759453386068344, -0.045253925025463104, -0.027019521221518517, -0.019109895452857018, 0.0358952060341835, 0.032332856208086014, 0.0007943588425405324, 0.07535276561975479, -0.03200077265501022, 0.04084626957774162, 0.006656764540821314, -0.027955392375588417, -0.02022690325975418, -0.02077031321823597, -0.015434334985911846, -0.031517744064331055, -0.005434093531221151, 0.03550274670124054, -0.04301990941166878, -0.009728536941111088, 0.004634074401110411, -0.056635331362485886, -0.003781223436817527, 0.0036529183853417635, 0.01182670146226883, -0.06357889622449875, 0.003075546119362116, -0.0768018588423729, -0.04917854815721512, -0.001853818423114717, 0.017781561240553856, 0.02975166216492653, 0.00612844992429018, 0.03136679530143738, 0.020649556070566177, -0.015577735379338264, -0.021419385448098183, -0.02258167788386345, -0.02425719052553177, 0.04081607982516289, 0.019849536940455437, -0.0044378433376550674, 0.023094898089766502, 0.031125281006097794, 0.020272187888622284, -0.004351048730313778, -0.0484841912984848, 0.008920970372855663, -0.01114743947982788, 0.04160100594162941, 0.030129030346870422, 0.0011792738223448396, -0.019200464710593224, -0.0011009699665009975, 0.026974236592650414, 0.017177773639559746, 0.0060831657610833645, 0.08000193536281586, -0.028378045186400414, -0.010370061732828617, 0.030385639518499374, 0.009796462953090668, -0.00975117925554514, 0.04093683883547783, 0.027110088616609573, -0.01969859004020691, -0.04561619833111763, 0.07142814248800278, -0.036348048597574234, 0.06303548812866211, -0.011305933818221092, 0.01600038632750511, -0.03586501628160477, -0.025011925026774406, -0.019472168758511543, -0.015321125276386738, 0.04972195625305176, 0.010845544748008251, 0.006652990821748972, 0.030370544642210007, 0.037555623799562454, -0.024604368954896927, 0.00025826095952652395, 0.0018962722970172763, -0.009298337623476982, -0.0075020682998001575, 0.00133588130120188, -0.024272285401821136, -0.008928517811000347, -0.0493294931948185, 0.04537468031048775, -0.009932315908372402, 0.046401120722293854, -0.04015191271901131, 0.0032661166042089462, -0.02766859345138073, -0.011373859830200672, -0.0010236096568405628, 0.037827327847480774, 0.008837949484586716, -0.026008175686001778, 0.018204214051365852, -0.01440034806728363, 0.001872686785645783, -0.030370544642210007, 0.03130641579627991, -0.015177725814282894, 0.05769196152687073, -0.015321125276386738, 0.018672149628400803, -0.002418926451355219, 0.03652918338775635, 0.013472023420035839, -0.0010292701190337539, -0.04881627485156059, 0.01954764313995838, 0.04416710510849953, 0.027019521221518517, 0.025087399408221245, -0.011336122639477253, 0.014422990381717682, 0.03532160818576813, 0.0006434117676690221, -0.02606855519115925, -0.03885376825928688, 0.03130641579627991, 0.010875734500586987, -0.024815693497657776, 0.0263251643627882, -0.028106339275836945, 0.044982220977544785, -0.05092953145503998, -0.0012415394885465503, 0.010226662270724773, 0.023487361147999763, -0.015562640503048897, 0.03864244371652603, 0.04495203122496605, 0.0009151164558716118, 0.0167551226913929, -0.014558842405676842, -0.057178739458322525, 0.04015191271901131, 0.009728536941111088, 0.03544236719608307, -0.030702628195285797, -0.024000579491257668, -0.03655937314033508, -0.0020868428982794285, 0.013592781499028206, -0.027547836303710938, -0.023623213171958923, 0.00743414182215929, 0.0007184136193245649, -0.026898764073848724, 0.01796269789338112, -0.029812041670084, -0.039216041564941406, -0.013472023420035839, 0.0007330366061069071, -0.04295952990651131, 0.012755025178194046, -0.0405745655298233, 0.020272187888622284, 0.013245603069663048, 0.02443832717835903, -0.0008382278028875589, 0.005445414688438177, -0.026038365438580513, 0.02010614611208439, -0.0358952060341835, -0.0017000411171466112, 0.027155373245477676, -0.03335929661989212, 0.02579684928059578, -0.015087157487869263, 0.005403904244303703, -0.003756694495677948, -0.04489165171980858, 0.005939766298979521, 0.005211446899920702, 0.016528701409697533, -0.015924913808703423, -0.05065782740712166, -0.023623213171958923, 0.033449865877628326, 0.0053322045132517815, -0.051201239228248596, 0.005834103096276522, 0.001760419923812151, 0.025540240108966827, 0.02009105123579502, -0.026566680520772934, -0.014853189699351788, 0.03864244371652603, 0.007894530892372131, 0.01689097471535206, -0.05754101276397705, 0.00827189814299345, 0.02819690853357315, -0.0670204907655716, -0.04220479354262352, -0.04241611808538437, 0.013698444701731205, -0.007226589601486921, -0.0688922330737114, -0.03994058817625046, -0.01159273274242878, 0.017434382811188698, -0.03885376825928688, -0.03363100066781044, -0.025510050356388092, 0.0010528556304052472, 0.006592612247914076, 0.05002385005354881, -0.011736133135855198, -0.008626624010503292, 0.05929199978709221, 0.017192868515849113, 0.03254418447613716, -0.0020604270976036787, 0.0012641814537346363, 0.008649265393614769, -0.03994058817625046, -0.018672149628400803, -0.01004552561789751, 0.0036812210455536842, 0.028106339275836945, 0.033932894468307495, -0.011955006048083305, 0.002341566141694784, 0.05560889095067978, 0.0031132828444242477, -0.010377609170973301, 0.04821248725056648, 0.01095120795071125, 0.002452889457345009, -0.018943853676319122, 0.010309683158993721, -0.03550274670124054, 0.003462347900494933, -0.019789157435297966, -0.05802404507994652, -0.027547836303710938, -0.03411403298377991, -0.035804640501737595, 0.014045622199773788, -0.006460533477365971, -0.00026628002524375916, -0.013313529081642628, -0.017238153144717216, 0.044650137424468994, 0.027442172169685364, 0.013894675299525261, 0.04084626957774162, 0.022023173049092293, 0.04045380651950836, 0.031849827617406845, -0.01968349516391754, -0.03643861785531044, 0.03381213918328285, 0.037012215703725815, 0.02872522361576557, 0.008822854608297348, -0.02833276055753231, -0.031910207122564316, -0.005883160978555679, 0.0032170589547604322, -0.04794078320264816, 0.0010330438381060958, -0.00793981458991766, 0.0274723619222641, 0.02410624362528324, -0.04555581882596016, 0.00931343249976635, -0.001663247705437243, -0.018596675246953964, -0.010279493406414986, -0.04214441403746605, -0.010581388138234615, -0.00014552238280884922, 0.08664360642433167, -0.003571784356608987, -0.004690679255872965, -0.04458975791931152, -0.039216041564941406, 0.029932798817753792, -0.02270243503153324, -0.041631195694208145, -0.007581315468996763, 0.0006646387046203017, 0.024423232302069664, 0.009494569152593613, 0.04172176495194435, 0.032604560256004333, 0.04688415303826332, -0.008000193163752556, -0.020468419417738914, -0.016362659633159637, -0.03221210092306137, -0.020951449871063232, 0.03698202595114708, -0.03891414776444435, 0.019170274958014488, 0.010566293261945248, -0.05243900418281555, 0.013019182719290257, -0.00034434793633408844, 0.04301990941166878, -0.03652918338775635, 0.002832144033163786, -0.029510147869586945, -0.007456784136593342, -0.030430924147367477, 0.005781271960586309, -0.03511028364300728, -0.03532160818576813, -0.05098991096019745, 0.010422893799841404, 0.0021151455584913492, -0.03511028364300728, 0.06756389886140823, -0.055639080703258514, -0.040302861481904984, -0.006732237990945578, 0.016438134014606476, 0.017706088721752167, 0.02324584499001503, 0.01968349516391754, -0.04449918866157532, 0.022536393254995346, 0.046250175684690475, -0.013124845921993256, -0.017902320250868797, 0.050204988569021225, -0.004803889896720648, -2.8081456093786983e-06, 0.018038172274827957, -0.043804831802845, 0.0028736544772982597, 0.00299629895016551, -0.04419729486107826, 0.0010122886160388589, -0.0038566971197724342, 0.006803938187658787, 0.0001058398192981258, -0.021751469001173973, -0.046189796179533005, 0.01035496685653925, 0.028438422828912735, 0.012679551728069782, -0.005452962126582861, -0.05412961170077324, -0.018657054752111435, 0.022415636107325554, -0.012724836356937885, 0.04763888567686081, 4.823229755857028e-05, -0.032846078276634216, 0.011434238404035568, 0.0012481433805078268, 0.0036604658234864473, 0.0661751851439476, -0.005815234966576099, 0.02277790941298008, 0.0023453396279364824, -0.053495634347200394, 0.019668400287628174, -0.0577523410320282, 0.06744313985109329, 0.020664650946855545, -0.04051418602466583, 0.017162678763270378, 0.044982220977544785, 0.006241660099476576, -0.04359350726008415, -0.06418268382549286, 0.015849439427256584, 0.032604560256004333, 0.0029434673488140106, 0.0065322332084178925, 0.01061912439763546, 0.00846812967211008, -0.02135900780558586, -0.04917854815721512, 0.016921164467930794, -0.006494496483355761, 0.003075546119362116, 0.029042212292551994, 0.0014896586071699858, -0.014815452508628368, -0.016438134014606476, 0.005260504316538572, 0.018657054752111435, -0.006419023033231497, 0.04594828188419342, 0.02452889457345009, 0.010890829376876354, -0.01225689984858036, 0.018053267151117325, -0.017509857192635536, -0.003526500426232815, -0.002371755428612232, -0.0020547667518258095, -0.03852168470621109, 0.03462725132703781, -0.022626962512731552, -0.06351851671934128, -0.02546476572751999, -0.047669075429439545, 0.061133552342653275, -0.014347516931593418, -0.01034742034971714, 0.04292934015393257, 0.024755315855145454, 0.018189119175076485, 0.0745074599981308, 0.006505817640572786, 0.0058756135404109955, 0.011328576132655144, 0.023547738790512085, -9.646459511714056e-05, 0.010060620494186878, 0.03139698505401611, 0.02618931233882904, -0.036136724054813385, -0.04172176495194435, -0.014226758852601051, 0.029796946793794632, 0.007219042629003525, -0.0017123055877164006, 0.047336991876363754, -0.028091244399547577, 0.04066513478755951, 0.001433053519576788, 0.006185055244714022, 0.005045405123382807, -0.03598577529191971, 0.040695324540138245, 0.030249787494540215, 0.06394116580486298, 0.02733650989830494, 0.021525049582123756, -0.014694694429636002, -0.0011292726267129183, 0.0027604440692812204, 0.031729068607091904, 0.004283122252672911, 0.028091244399547577, -0.0073926313780248165, 0.002381189726293087, 0.07607731223106384, -0.016302280128002167, 0.0105889355763793, -0.016966447234153748, -0.033932894468307495, 0.00981910526752472, -0.01814383454620838, 0.04401616007089615, -0.005094463005661964, 0.04024248197674751, 0.03858206421136856, -0.03438573703169823, 0.014302232302725315, 0.006369965150952339, 0.002579307649284601, -0.025208156555891037, 0.008581339381635189, -0.00144060084130615, -0.009826652705669403, -0.011766321957111359, -0.004366143140941858, -0.006728464737534523, -0.02685347944498062, 0.018475918099284172, 0.04039343073964119, 0.016392849385738373, 0.005592587869614363, 0.015623019076883793, -0.009600232355296612, 0.01172103825956583, -0.011758774518966675, 0.01882309652864933, -0.013238055631518364, -0.026898764073848724, -0.0372537299990654, -0.01138895470649004, -0.02471003122627735, -0.002581194508820772, -0.016045670956373215, -0.00183306320104748, 0.0023510002065449953, -0.030325261875987053, -0.0138644864782691, 0.027683688327670097, -0.03456687182188034, -0.0037925445940345526, 0.015894724056124687, 0.035744260996580124, -0.028438422828912735, 0.012732382863759995, -0.010521008633077145, -0.0011839908547699451, 0.007547352463006973, -0.024604368954896927, 0.008370013907551765, 0.008626624010503292, 0.03209134191274643, -0.014649410732090473, 0.017177773639559746, 0.012536152265965939, -0.0017198529094457626, 0.02303451858460903, -0.022732624784111977, 0.010981397703289986, 0.0010075715836137533, -0.0021113718394190073, 0.015562640503048897, 0.012453131377696991, 0.019109895452857018, -0.011026681400835514, -0.021253343671560287, 0.005490698851644993, -0.031246038153767586, 0.0016321148723363876, 0.0029981855768710375, 0.006543554365634918, 0.011343670077621937, -0.03489895537495613, -0.021721279248595238, -0.009328527376055717, -0.016785310581326485, -0.0014877718640491366, -0.01640794426202774, 0.02525344118475914, -0.021660901606082916, -0.022400541231036186, 0.005739761516451836, 0.03323853760957718, 0.018672149628400803, -0.02766859345138073, 0.0031868694350123405, 0.023608118295669556, -0.016423039138317108, -0.03411403298377991, -0.002900070045143366, 0.0097813680768013, -0.0029472410678863525, -0.019849536940455437, -0.0007155833300203085, -0.002134013921022415, -0.0531635507941246, 0.01105687115341425, 0.0009047388448379934, -0.022611867636442184, -0.01534376759082079, 0.019804252311587334, -0.004671811126172543, 0.04238593205809593, 0.020619366317987442, 0.02410624362528324, -0.005249183624982834, -0.034264978021383286, -0.03988020867109299, -0.005147294141352177, -0.003447253257036209, -0.03592539578676224, -0.026113837957382202, -0.02022690325975418, 0.005766177084296942, 0.008083214052021503, -0.020845787599682808, 0.011471975594758987, 0.01962311565876007, -0.04033305123448372, 0.000881153391674161, 0.032513994723558426, -0.0749301165342331, 0.0047699264250695705, -0.04084626957774162, 0.015253199264407158, 0.04386521130800247, 0.02759311906993389, -0.021449575200676918, -0.0219024159014225, -0.01566830277442932, 0.029449768364429474, -0.013472023420035839, 0.012543699704110622, 0.02431756816804409, -0.009736084379255772, 0.0072945160791277885, -0.020060861483216286, -0.018913663923740387, 0.021147681400179863, -0.03348005563020706, -0.002581194508820772, -0.0064680809155106544, -0.02612893283367157, -0.03604615479707718, 0.015449429862201214, -0.01607586070895195, -0.006109581794589758, 0.01393241249024868, -0.0045321849174797535, -0.037404678761959076, -0.04305009916424751, 0.032181911170482635, -0.0035623502917587757, -0.0017406081315129995, -0.0045019956305623055, 0.0073284790851175785, 0.007003942970186472, -0.05325411632657051, 0.001417958759702742, -0.03160830959677696, -0.03323853760957718, 0.032936643809080124, -0.001665134564973414, -0.06315624713897705, 0.01707211136817932, 0.03592539578676224, -0.0038755654823035, 0.0396386943757534, 0.01903442293405533, -0.009902126155793667, 0.00449067447334528, -0.0031623404938727617, -0.006652990821748972, 0.03658956289291382, -0.0404839962720871, -0.002226468874141574, 0.043774642050266266, 0.04582752287387848, -0.0006325624417513609, 0.03897452726960182, 0.023291129618883133, -0.016438134014606476, 0.0031283774878829718, 0.018808001652359962, -0.004449164029210806, 0.030778102576732635, -0.03142717480659485, 0.006924695800989866, -0.017298530787229538, -0.0038397153839468956, 0.01530603040009737, 0.009517211467027664, -0.01936650648713112, -0.028227098286151886, -0.010075715370476246, 0.012166331522166729, -0.024211905896663666, -0.0035944264382123947, -0.013947507366538048, -0.014672053046524525, 0.06155620515346527, 0.01815892942249775, -0.032181911170482635, -0.012528604827821255, 0.021389195695519447, 0.02410624362528324, 0.027653498575091362, 0.01126064918935299, -0.029434673488140106, 0.003262343117967248, -0.03088376484811306, 0.02116277627646923, 0.055035293102264404, 0.014679600484669209, -0.02679309993982315, -0.01132102869451046, 0.005464282818138599, -0.016513606533408165, 0.04332180321216583, 0.028891265392303467, -0.025434577837586403, -0.013592781499028206, 0.019849536940455437, 0.021343912929296494, 0.004845400340855122, 0.0340234637260437, -0.010664409026503563, -0.03571407124400139, -0.013683349825441837, 0.02680819481611252, 0.0605599544942379, 0.0006731294561177492, -0.0563938170671463, -0.03094414435327053, 0.010875734500586987, 0.011373859830200672, -0.007577541749924421, -0.029661094769835472, -0.008800212293863297, -0.01443808525800705, -0.036348048597574234, 0.03474801033735275, 0.01001533679664135, -0.05376733839511871, 0.010271945968270302, -0.0008556810789741576, 0.007373763248324394, -0.0064643071964383125, 0.008694550022482872, -0.03843111917376518, 0.0031736616510897875, -0.017841940745711327, -0.0010075715836137533, 0.01114743947982788, -0.018249498680233955, -0.04072551429271698, -0.016906069591641426, -0.021947700530290604, 0.008800212293863297, -0.0022340163122862577, -0.0047737001441419125, -0.0022698661778122187, 0.050416313111782074, -0.006120902486145496, -0.05633343756198883, 0.004939741920679808, -0.04066513478755951, -0.025494955480098724, -0.014392800629138947, -0.040302861481904984, 0.06333737820386887, 0.046461500227451324, -0.06424306333065033, 0.003992549143731594, 0.004618979524821043, 0.0016689082840457559, -0.03637823835015297, -0.0782509446144104, 0.004600111395120621, 0.007011490408331156, 0.004777473863214254, -0.011758774518966675, 0.026747817173600197, -0.02700442634522915, 0.008120951242744923, -0.007324705366045237, -0.048061538487672806, 0.010211567394435406, 0.004894457757472992, -0.01061912439763546, -0.010604029521346092, -0.013034277595579624, -0.020860882475972176, 0.025011925026774406, 0.06466571241617203, 0.004124627914279699, -0.006656764540821314, 0.01568339765071869, -0.02988751418888569, 0.01262672059237957, -0.01523810438811779, -0.038280170410871506, 0.01628718711435795, -0.0661751851439476, -0.012438036501407623, 0.02150995470583439, 8.001372771104798e-05, 0.000380669574951753, -0.026491206139326096, -0.06376003473997116, 0.015192819759249687, 0.0031944168731570244, 0.02794029749929905, -0.03302721306681633, -0.043804831802845, 0.015192819759249687, -0.009856842458248138, -0.028438422828912735, -0.030491303652524948, 0.023940201848745346, -0.015698492527008057, 0.013638065196573734, 0.007064321544021368, 0.015894724056124687, -0.004539732355624437, -0.03508009389042854, 0.026687437668442726, -0.008792665787041187, 0.012988992966711521, -0.028091244399547577, 0.020679745823144913, -0.07142814248800278, -0.005162389017641544, -0.019200464710593224, 0.01121536549180746, 0.013758823275566101, -0.010249304585158825, 0.0012792762136086822, -0.011502164416015148, 0.006728464737534523, 0.0027774255722761154, 0.003484989982098341, 0.008188877254724503, 0.014287137426435947, 0.008483223617076874, 0.010105905123054981, 0.0023377924226224422, -0.034536685794591904, 0.005434093531221151, 0.005524661857634783, 0.0188834760338068, -0.029042212292551994, 0.007143568713217974, -0.01473243162035942, 0.007275647483766079, 0.010649314150214195, -0.003466121619567275, -0.010339872911572456, -0.028589369729161263, -0.0009042671299539506, -0.009539852850139141, 0.02692895196378231, 0.014121095649898052, 0.0387028232216835, -0.029238441959023476, 0.0012877669651061296, -0.02612893283367157, 0.03894433751702309, 0.023291129618883133, 0.006652990821748972, -0.020679745823144913, -0.012943709269165993, -0.03341967612504959, 0.015117346309125423, 0.014347516931593418, 0.004751058295369148, 0.023426981642842293, 0.03287626802921295, -0.01835516095161438, 0.026204407215118408, 0.012687099166214466, -0.020392945036292076, -0.01360032893717289, 0.002435907954350114, -0.0037887708749622107, -0.01889857091009617, -0.029842231422662735, 0.025887418538331985, -0.007977551780641079, -0.016845690086483955, 0.010128546506166458, 0.026445921510457993, -0.015079610049724579, 0.009698348119854927, -0.0277289729565382, -0.01969859004020691, -0.003683107905089855, 0.0288761705160141, -0.01302673015743494, 0.02149485982954502, 0.03719335049390793, 0.016392849385738373, 0.04305009916424751, -0.013645612634718418, -0.0036415974609553814, -0.027879919856786728, -0.03154793381690979, -0.04540487006306648, -0.007351120933890343, 0.008211519569158554, -0.036015965044498444, 0.008988896384835243, -0.009268148802220821, 0.0002724122314248234, -0.00048137956764549017, 0.00997759960591793, -0.005566172301769257, 0.0009155881707556546, 0.014611673541367054, 0.041299112141132355, -0.0016123030800372362, -5.993659215164371e-05, 0.037012215703725815, -0.018838191404938698, -0.0012688986025750637, -0.030717723071575165, 0.0035906529519706964, 0.016860784962773323, 0.001996274571865797, 0.003141585271805525, 0.059624083340168, -0.02143448032438755, 0.05458245053887367, 0.015351314097642899, 0.02605346031486988, 0.012151237577199936, -0.015102251432836056, 0.006841674912720919, 0.004396332893520594, 0.040423620492219925, -0.010581388138234615, 0.014362611807882786, -0.03320835158228874, 0.019940104335546494, 0.041842520236968994, -0.00913984328508377, -0.0025208157021552324, -0.015381503850221634, -0.05434093624353409, 0.023064708337187767, 0.045857712626457214, -0.03139698505401611, -0.027970487251877785, -0.0010490819113329053, 0.01849101297557354, 0.0022698661778122187, -0.014422990381717682, 0.05874859169125557, -0.010966302827000618, -0.007411499973386526, 0.005505793262273073, 0.013992791064083576, 0.05376733839511871, 0.01802307739853859, 0.017177773639559746, -0.009856842458248138, -0.0034548004623502493, 0.03867263346910477, -0.01788722537457943, 0.014656958170235157, -0.021675996482372284, 0.03242342546582222, -0.04308028519153595, -0.0030057330150157213, -0.036015965044498444, -0.007309610489755869, 0.014445632696151733, 0.006328454706817865, -0.007705846801400185, 0.03924623131752014, 0.006490722764283419, -0.03006865084171295, -0.012151237577199936, -0.024619463831186295, -0.034325357526540756, 0.02178165875375271, -0.009562495164573193, 0.022491110488772392, -0.043804831802845, 0.014339969493448734, 0.015970196574926376, 0.03556312248110771, -0.008520960807800293, 0.03474801033735275, -0.010905924253165722, 0.05117104947566986, 0.02665724791586399, 0.048665326088666916, -0.009954957291483879, -0.02806105650961399, 0.020649556070566177, 0.009003991261124611, 0.017464572563767433, 0.03885376825928688, 0.04561619833111763, 0.0059888241812586784, -0.0005141633446328342, 0.0475483201444149, -0.007490747142583132, 0.003943491727113724, -0.0007622825796715915, -0.008694550022482872, 0.030657345429062843, -0.007256779354065657, 0.02116277627646923, -0.01126064918935299, 0.0004290197975933552, -0.01763061434030533, 0.018038172274827957, 0.017781561240553856, -0.0031321512069553137, 0.04688415303826332, -0.03858206421136856, -0.0013519194908440113, -0.00285478588193655, 0.018128739669919014, -0.005645419470965862, 0.001945330062881112, -0.011336122639477253, 0.002430247375741601, -0.01269464660435915, 0.0016509833512827754, 0.009162485599517822, -0.0022566583938896656, 0.0209665447473526, 0.03568388149142265, 0.004728415980935097, -0.0009033237001858652, 0.0072945160791277885, -0.038340549916028976, -0.014362611807882786, 0.009554947726428509, -0.01477016881108284, 0.02264205738902092, 0.014943757094442844, -0.025887418538331985, 0.030913954600691795, -0.056816466152668, 0.0027415757067501545, -0.018641959875822067, -0.03988020867109299, -0.03894433751702309, -0.002652894239872694, -0.022023173049092293, 0.0174796674400568, -0.015049420297145844, -0.017917415127158165, 0.0076039573177695274, -0.01781175099313259, -0.025600619614124298, 0.027985582128167152, -0.008400202728807926, -0.00023880293883848935, -0.011917268857359886, -0.0072982897982001305, 0.011736133135855198, -0.011426690965890884, -0.013683349825441837, -0.033057402819395065, 0.03317816182971001, 0.013751275837421417, -0.00910965446382761, 0.03791789710521698, -0.033449865877628326, -0.011411597020924091, -0.03417441248893738, 0.0363178588449955, -0.03568388149142265, -0.005347298923879862, -0.05219748988747597, -0.024815693497657776, 0.00010890593694057316, 0.005566172301769257, 0.020468419417738914, 0.03423478826880455, -0.03559331223368645, -0.04851438105106354, -0.01607586070895195, 0.03269512951374054, 0.010792713612318039, 0.000763226009439677, 0.017268342897295952, 0.008830402046442032, -0.009947409853339195, 0.0009651176515035331, 0.014913568273186684, -0.020951449871063232, 0.013781465590000153, 0.01983444206416607, 0.007803962100297213, 0.0009868163615465164, 0.006490722764283419, 0.007962456904351711, -0.015773966908454895, -0.02860446460545063, -0.03127622604370117, 0.004879363346844912, 0.014694694429636002, -0.016785310581326485, -0.0011670093517750502, -0.02010614611208439, 0.027547836303710938, -0.006177507806569338, 0.004830305464565754, -0.008219067007303238, -0.023336412385106087, -0.030506398528814316, 0.007173758465796709, 0.00039859453681856394, -0.016498511657118797, 0.0003502443141769618, -0.0353819876909256, 0.0104832723736763, -0.02425719052553177, 0.0064643071964383125, -0.06738276034593582, 0.03501971438527107, -0.009464379400014877, 0.01477016881108284, 0.01453620009124279, 0.03480838984251022, 0.036800891160964966, -0.012551247142255306, 0.016996636986732483, -0.020377852022647858, -0.012905972078442574, -0.01523810438811779, -0.0034151768777519464, 0.03203096240758896, -0.029766757041215897, -0.006264302413910627, 0.003294419264420867, -0.01067950390279293, -0.02024199813604355, -0.021268438547849655, 0.011170081794261932, -0.021600522100925446, 0.018385350704193115, -0.01708720624446869, 0.004505769349634647, 0.004664263688027859, -0.030868669971823692, 0.01687587983906269, 0.02874031662940979, 0.021660901606082916, -0.005890708416700363, -0.03236304596066475, 0.014445632696151733, 0.023396791890263557, -0.0014660732122138143, 0.008098308928310871, -0.01954764313995838, 0.024679841473698616, -0.008792665787041187, -0.022460920736193657, 0.011290838941931725, 0.02874031662940979, -0.0251326821744442, 0.01182670146226883, 0.03867263346910477, 0.0018085342599079013, -0.033057402819395065, 0.02794029749929905, -0.006105808075517416, -0.03991039842367172, -0.003503858344629407, -0.03559331223368645, 0.012166331522166729, 0.035804640501737595, -0.0014396574115380645, -0.0006561479531228542, -0.005713345482945442, -0.043231233954429626, -0.01640794426202774, 0.005181257147341967, -0.05458245053887367, 0.025751566514372826, -0.005883160978555679, 0.0027057258412241936, -0.019592925906181335, -0.001998161431401968, -0.01196255348622799, -0.02083069272339344, -3.6822824768023565e-05, -0.014113549143075943, -0.01674002781510353, 0.0019396694842725992, 0.009366264566779137, -0.0165437962859869, -0.022959046065807343, -0.03296683356165886, 0.014634315855801105, 0.014309779740869999, 0.037555623799562454, 0.0030981882009655237, 0.01621171273291111, 0.01962311565876007, -0.01674002781510353, -0.007441689260303974, -0.010279493406414986, 0.010226662270724773, 0.006373738870024681, -0.011034228838980198, -0.00820397213101387, 0.02807614952325821, -0.022476015612483025, -0.0015273954486474395, -0.008241708390414715, 0.01868724450469017, -0.01119272317737341, -0.007309610489755869, 0.005958634428679943, 0.0019396694842725992, -0.006905827205628157, -0.020815597847104073, -0.01835516095161438, 0.004471806343644857, 0.01473243162035942, 0.007222816348075867, -0.0018047606572508812, -0.016226807609200478, 0.0032019643113017082, -0.001762306783348322, -0.02899692766368389, 0.008460582233965397, -0.0207099337130785, 0.009094559587538242, -0.028438422828912735, 0.012973898090422153, 0.017736278474330902, 0.025027019903063774, 0.014807905070483685, -0.04549543932080269, -0.0003110924153588712, -0.009856842458248138, -0.028121434152126312, 0.024211905896663666, 0.027110088616609573, 0.029253536835312843, -0.01504187285900116, -0.03658956289291382, -0.0051246522925794125, -0.027638403698801994, -0.01443808525800705, -0.0011500278487801552, 0.02110239677131176, -0.0531635507941246, 0.02069484069943428, 0.004132175352424383, 0.01714758388698101, -0.015834344550967216, -0.01566830277442932, -0.0027585572097450495, 0.005290694069117308, -0.010890829376876354, 0.0138644864782691, 0.02671762742102146, -0.017102301120758057, 0.019004233181476593, 0.034868765622377396, 0.02271752990782261, -0.022143932059407234, -0.03562350198626518, 0.00837756134569645, -0.024483609944581985, 0.019713684916496277, 0.0066416701301932335, -0.018611770123243332, 0.025268536061048508, 0.01968349516391754, -0.015094704926013947, -0.008883233182132244, -0.005335978232324123, 0.009585137479007244, -0.021811848506331444, 0.007894530892372131, -0.03692164644598961, -0.0335102453827858, 0.005041631404310465, 0.00752093642950058, 0.012075763195753098, -0.015894724056124687, -0.01640794426202774, 0.03435554727911949, -0.05455226078629494, -0.01707211136817932, -0.03936699032783508, 0.015139988623559475, 0.016166428104043007, 0.013373908586800098, -0.024227000772953033, -0.010143641382455826, 0.025827039033174515, -0.014943757094442844, -0.04452937841415405, -0.047186046838760376, -0.02143448032438755, 0.004283122252672911, -0.005049178842455149, 0.01044553518295288, 0.016045670956373215, 0.018234403803944588, -0.01720796339213848, 0.01580415479838848, 0.02137410081923008, 0.01708720624446869, -0.04320104420185089, -0.00968325324356556, 0.029253536835312843, -0.008988896384835243, -0.049540821462869644, -0.0004202931886538863, 0.0027396888472139835, -0.014241853728890419, -0.022415636107325554, -0.02203826792538166, -0.00017547594325151294, -6.574451163032791e-06, 0.020528798922896385, -0.0027170467656105757, 0.013683349825441837, 0.01092101912945509, -0.025102494284510612, 0.0014811678556725383, -0.0358952060341835, 0.012604078277945518, -0.03314797207713127, -0.016845690086483955, 0.008173782378435135, 0.003279324620962143, -0.0251779668033123, -0.05403904244303703, -0.03616691380739212, 0.027623308822512627, -0.0006481288583017886, 0.02392510697245598, 0.005588814150542021, -0.02143448032438755, 0.03136679530143738, 0.008053025230765343, 0.0040529281832277775, -0.009524758905172348, -0.010309683158993721, 0.0023264712654054165, -0.007271873764693737, -0.0009764386923052371, -0.013434287160634995, -0.0027359151281416416, -0.023940201848745346, 0.02135900780558586, -0.0018585354555398226, -0.006871864199638367, -0.031578123569488525, -0.014906020835042, -0.008762476034462452, -0.011630469933152199, 0.0021415611263364553, 0.015487167052924633, 0.0122267110273242, 0.0015594717115163803, -0.01366825494915247, -0.01989481970667839, 0.013751275837421417, -0.013509760610759258, 0.0030246013775467873, -0.04398597031831741, -0.043502938002347946, 0.004286895971745253, 0.0022925082594156265, -0.009222864173352718, 0.008920970372855663, 0.02412133850157261, 0.016332469880580902, -0.003468008479103446, -0.018657054752111435, -0.005060499534010887, 0.003486876841634512, 0.018234403803944588, 0.008588886819779873, 0.018007982522249222, -0.005792592652142048, 0.004535958636552095, 0.011079513467848301, 0.010702145285904408, -0.013004087843000889, 0.027245942503213882, 0.05098991096019745, -0.021660901606082916, 0.03154793381690979, -0.016845690086483955, 0.042899150401353836, -0.019879726693034172, -0.019925009459257126, 0.037555623799562454, -0.017162678763270378, -0.02237035147845745, 0.02566099725663662, -0.006154865957796574, -0.003301966702565551, -0.02069484069943428, 0.014815452508628368, 0.00891342293471098, -0.023200560361146927, 0.013509760610759258, -0.018521202728152275, -0.008792665787041187, 0.013939959928393364, -0.004275575280189514, -0.007026584818959236, -0.014853189699351788, 0.025600619614124298, -0.008120951242744923, 0.041359491646289825, -0.010800261050462723, 0.006577517371624708, -0.014551294967532158, 0.017057016491889954, 0.01470978930592537, -0.014241853728890419, 0.0131625821813941, -0.010566293261945248, -0.0006622801884077489, -0.0484841912984848, -0.03236304596066475, -0.008905875496566296, -0.033932894468307495, -0.05002385005354881, -0.030974334105849266, 0.009419095702469349, 0.026944046840071678, 0.016966447234153748, 0.012400299310684204, 0.012075763195753098, -0.025268536061048508, -0.03188001736998558, 0.026113837957382202, -0.006309586577117443, -0.0013707878533750772, -0.023864727467298508, 0.01829478144645691, -0.04730680584907532, -0.0052189938724040985, 0.015547545626759529, 0.02511758916079998, 0.007962456904351711, -0.013147487305104733, -0.037404678761959076, 0.005109557416290045, 0.008611529134213924, 0.006279397290199995, -0.01587962917983532, -0.02827238105237484, -0.0221137423068285, -0.01997029408812523, -0.013034277595579624, -0.004030286334455013, -0.006426570471376181, -0.006834127474576235, 0.0125663410872221, 0.052559759467840195, 0.016256997361779213, 0.028710128739476204, -0.020453324541449547, 0.020619366317987442, -0.0009047388448379934, -0.001107573974877596, 0.02867993898689747, 0.03803865611553192, 0.012271994724869728, 0.01450601126998663, 0.04461994767189026, 0.03891414776444435, 0.014543747529387474, 0.048001158982515335, 0.016589080914855003, -0.0069473376497626305, -0.03435554727911949, -0.0036019738763570786, 0.010898376815021038, 0.027713878080248833, -0.056363627314567566, 0.024423232302069664, 0.006569969933480024, -0.0005995428073219955, 0.047336991876363754, -0.015502261929214, 5.1298411563038826e-05, -0.017781561240553856, 0.0377669520676136, -0.032453615218400955, 0.0165437962859869, -0.012747477740049362, -0.019140085205435753, 0.01963821053504944, 4.2276966269128025e-05, 0.008573791943490505, -0.012158784084022045, -0.016453227028250694, 0.033661190420389175, 0.011268196627497673, 0.020755218341946602, -0.015260746702551842, -0.04160100594162941, -0.005792592652142048, -0.015253199264407158, -0.06273359060287476, 0.034536685794591904, 0.008988896384835243, 0.02913277968764305, -0.016332469880580902], "index": 75}, {"title": "List of flora of the Sonoran Desert Region by common name", "text": "The Sonoran Desert is located in the southwestern United States and northwestern Mexico in North America.The Sonoran Desert Region, as defined by the Arizona-Sonora Desert Museum, includes the Sonoran Desert and some surrounding areas. All of Sonora, the Baja California Peninsula, and the islands of the Gulf of California are included.", "vector": [0.07355865836143494, 0.03149097412824631, -0.017765160650014877, -0.003800176316872239, 0.02606974169611931, -0.06207840517163277, 0.028062840923666954, -0.048791076987981796, -0.028142565861344337, 0.046080462634563446, -0.083125539124012, 0.007553847040981054, 0.0014533017529174685, 0.0022588460706174374, -0.00465388735756278, 0.041084423661231995, -0.005584000609815121, 0.016556013375520706, 0.03313860297203064, 0.05104992166161537, 0.013081376440823078, 0.01733996532857418, 0.027531348168849945, 0.005813207011669874, 0.015652474015951157, 0.06627720594406128, -0.04695742577314377, -0.016290266066789627, -0.04669167846441269, -0.024594847112894058, 0.011108207516372204, -0.03675275668501854, 0.03816121071577072, 0.061972107738256454, -0.011387242004275322, 0.027664221823215485, -0.003411521902307868, 0.009938922710716724, 0.005849746987223625, 0.03106577694416046, -0.00308432150632143, -0.04913654550909996, 0.04477830231189728, -0.014310454949736595, -0.0012323998380452394, -0.03313860297203064, -0.015054545365273952, 0.02386404573917389, -0.00542123056948185, 0.028966380283236504, -0.00850389152765274, -0.005039219744503498, -0.057188667356967926, 0.015240567736327648, -0.003634084714576602, 0.037071652710437775, 0.0352911502122879, 0.11533402651548386, -0.04360901564359665, -0.0481267087161541, -0.023717883974313736, 0.02390390634536743, 0.07345236092805862, 0.008198282681405544, 0.008012260310351849, 0.001493163756094873, 0.003165706293657422, -0.01787145808339119, -0.021233152598142624, 0.0108424611389637, -0.004813335370272398, 0.025325650349259377, -0.035530321300029755, 0.008045478723943233, -0.022149980068206787, 0.06978505849838257, -0.011241081170737743, 0.015878358855843544, -0.005069116596132517, -0.015413302928209305, 0.0036839123349636793, -0.01583849824965, 0.024249376729130745, 0.02976362034678459, -0.022149980068206787, 0.019625386223196983, 0.01206489559262991, -0.0438481904566288, -0.0035942227113991976, -0.02335912548005581, -0.005726839415729046, 0.008988878689706326, -0.006311481818556786, -0.006075631827116013, 0.031809866428375244, 0.059899285435676575, 0.028089415282011032, 0.013579651713371277, 0.018190354108810425, 0.006308159790933132, -0.031650420278310776, -0.022216415032744408, -0.03093290515244007, 0.02335912548005581, -0.0047967261634767056, 0.015227280557155609, 0.051501691341400146, 0.013134526088833809, -0.041562769562006, -0.008258075453341007, -0.0025428629014641047, -0.01991770789027214, 0.0058763218112289906, -0.008291293866932392, -0.026335489004850388, -0.01516084372997284, -0.01606438122689724, -0.0021126854699105024, -0.062237855046987534, 0.01561261247843504, 0.02102055586874485, -0.005879643373191357, 0.01710079424083233, 0.01118128839880228, -0.025485098361968994, 0.005617219023406506, 0.03162384405732155, 0.013347122818231583, 0.0420411117374897, 0.0037603143136948347, 0.04217398539185524, 0.02787681855261326, 0.0642043799161911, -0.008796212263405323, -0.03885215148329735, -0.003154079895466566, -0.0027471554931253195, 0.04355586692690849, 0.01914704218506813, 0.03316517546772957, -0.014111144468188286, 0.01327404286712408, 0.007381111849099398, 0.03933049738407135, 0.0046206689439713955, -0.06340713798999786, -0.0737181082367897, 0.05851740017533302, 0.01874842308461666, -0.03199589252471924, -0.00995885394513607, 0.0352911502122879, 0.08397592604160309, -0.015041257254779339, 0.049694616347551346, 0.005956045817583799, -0.0012664486421272159, -0.04220056161284447, 0.08163735270500183, 0.010098370723426342, 0.030507709830999374, 0.061068568378686905, -0.011599838733673096, -0.017618998885154724, -0.0025926902890205383, -0.0601118803024292, -0.020661799237132072, 0.002860097913071513, 0.014934958890080452, 0.006088919006288052, 0.060537077486515045, 0.03877243027091026, -0.044804878532886505, 0.022880783304572105, 0.005142196547240019, -0.048791076987981796, 0.006889480631798506, -0.0034580277279019356, -0.04036691039800644, -0.015320291742682457, 0.010510277934372425, -0.02516620233654976, 0.06500162184238434, -0.007361181080341339, -0.021299589425325394, 0.03587578982114792, -0.03483938053250313, 0.03866612911224365, 0.010350829921662807, 0.030507709830999374, -0.014137718826532364, -0.001380221452564001, -0.015386728569865227, -0.042227134108543396, 0.037603143602609634, -0.005142196547240019, 0.009068602696061134, 0.024275952950119972, 0.012556526809930801, -0.005461092572659254, 0.002906603505834937, -0.03754999488592148, 0.022947218269109726, 0.06138746440410614, 0.029843343421816826, 0.040552932769060135, -0.004062601365149021, -0.019266627728939056, -0.011872229166328907, 0.05027925595641136, 0.006457642652094364, -0.004949530586600304, -0.03279313072562218, -0.0011742678470909595, -0.004906346555799246, 0.011274299584329128, -0.011606482788920403, -0.0395696684718132, -0.0070289974100887775, -0.012596389278769493, 0.042227134108543396, -0.015572750940918922, -0.018549112603068352, 0.002806948497891426, -0.010450485162436962, -0.011553333140909672, -0.019027456641197205, 0.02747819945216179, -0.015679050236940384, -0.01740640215575695, -0.009918991476297379, -0.07254882156848907, 0.00728810066357255, 0.02346542477607727, -0.04305094853043556, 0.029816769063472748, 0.05612568184733391, -0.03032168745994568, 0.00512226577848196, 0.00537140341475606, -0.02747819945216179, -0.0037237743381410837, -0.02507319115102291, -0.007839525118470192, 0.04034033417701721, 0.012197769246995449, -0.0035277861170470715, -0.020741522312164307, 0.04690427705645561, 0.05200660973787308, -0.024541698396205902, -0.005231886170804501, -0.016675598919391632, 0.03082660585641861, -0.02888665534555912, -0.06792483478784561, 0.005783310625702143, 0.0018020941643044353, 0.022415725514292717, -0.003288614097982645, 0.0016210542526096106, 0.010822530835866928, 0.01753927581012249, -0.036035239696502686, -0.022840920835733414, -0.005982620175927877, 0.019691823050379753, 0.005919505376368761, -0.02222970314323902, -0.015971370041370392, -0.00960673950612545, -0.027265600860118866, -0.0026391958817839622, 0.019426075741648674, 0.0407123789191246, 0.06160006299614906, 0.06659609824419022, 0.03327147290110588, 0.02593686804175377, 0.007872743532061577, 0.01820364221930504, -0.01844281330704689, 0.010869036428630352, -0.03906475007534027, -0.0239703431725502, 0.03173014521598816, -0.017725298181176186, 0.0039396933279931545, 0.0019349674694240093, -0.014589488506317139, -0.02785024419426918, -0.005494310986250639, 0.04799383506178856, -0.011094920337200165, 0.06462957710027695, 0.030773457139730453, -0.008105271495878696, -0.014735649339854717, -0.05585993453860283, 0.027172589674592018, -0.0020313006825745106, 0.0013719168491661549, -0.008311225101351738, 0.03417501226067543, 0.05793276056647301, 0.057720161974430084, -0.034493908286094666, 0.02888665534555912, -0.05019953474402428, -0.017592424526810646, -0.05349479243159294, -0.032181914895772934, 0.019798122346401215, -0.01067637000232935, 0.002918229904025793, -0.02624247781932354, 0.03361694514751434, -0.027823669835925102, -0.018761709332466125, -0.016688887029886246, 0.00925462506711483, -0.053813688457012177, 0.005351472180336714, -0.02038276381790638, 0.02747819945216179, 0.03454705700278282, -0.022880783304572105, 0.018469389528036118, -0.020236603915691376, -0.030002791434526443, 3.122003545286134e-05, -0.03970254212617874, 0.006314803846180439, -0.032580532133579254, 0.03930392116308212, 0.004241980146616697, 0.041323598474264145, 0.022336002439260483, 0.042227134108543396, -0.026295626536011696, -0.002453173277899623, 0.029072677716612816, 0.023040231317281723, -0.01850925013422966, 0.03717795014381409, -0.02787681855261326, -0.004617347382009029, 0.05232550576329231, -0.026029879227280617, 0.014350316487252712, 0.00035896553890779614, -0.022149980068206787, -0.029364999383687973, 0.013978270813822746, -0.004165578167885542, -0.00982598029077053, -0.02674739621579647, 0.0057002645917236805, 0.04387476295232773, 0.04193481430411339, -0.018363090232014656, -0.026933418586850166, -0.04666510224342346, -0.03470650687813759, -0.02939157374203205, 7.619453390361741e-05, -0.019426075741648674, 0.031278375536203384, 0.005391334183514118, 0.00037225286359898746, -0.020940832793712616, 0.05413258448243141, 0.025990016758441925, -0.03042798675596714, 0.005869678221642971, 0.0330057293176651, 0.0197848342359066, 0.041217297315597534, -0.012981721200048923, -0.02551167458295822, 0.008118558675050735, 0.08285979181528091, -0.007633571047335863, 0.00349788973107934, 0.05543474107980728, -0.020303040742874146, 0.0033733209129422903, -0.01031096838414669, -0.001871852669864893, -0.026959992945194244, 0.031544122844934464, 0.01516084372997284, 0.007480766624212265, -0.017512701451778412, -0.009015453048050404, -0.03677932918071747, -0.004039348568767309, 0.008895867504179478, -0.003634084714576602, 0.03853325545787811, -0.026269052177667618, 0.005813207011669874, 0.02419622801244259, 0.01680847257375717, 0.0034945677034556866, 0.015904933214187622, -0.02657466009259224, -0.007826237007975578, -0.013765674084424973, 0.004022739361971617, -0.034998826682567596, 0.014868522062897682, -0.00845074187964201, 0.03260710835456848, -0.025697696954011917, -0.027292175218462944, 0.045176923274993896, 0.03646043315529823, 0.02456827275454998, -0.008404236286878586, -0.014363603666424751, 0.01619725488126278, -0.007633571047335863, -0.01914704218506813, -0.06346029043197632, 0.03377639129757881, 0.039011601358652115, 0.01720709167420864, -0.0024199550971388817, 0.001510603353381157, 0.03082660585641861, 0.006032447796314955, -0.039383646100759506, 0.03170356899499893, 0.029099252074956894, -0.025923581793904305, -0.052298929542303085, -0.008822787553071976, 0.04142989590764046, 0.040552932769060135, -0.011001909151673317, 0.053813688457012177, -0.014350316487252712, 0.009188189171254635, -0.02333255112171173, 0.035397447645664215, 0.013280685991048813, 0.009952209889888763, 0.009560233913362026, -0.016383277252316475, -0.018084056675434113, 0.008889223448932171, -0.022654898464679718, 0.022375863045454025, 0.01553288847208023, -0.04047320783138275, -0.008012260310351849, 0.015307004563510418, 0.024076642468571663, 0.018349802121520042, -0.0006049887742847204, -0.048551905900239944, 0.023691309615969658, -0.06946615874767303, 0.007839525118470192, -0.0008586937328800559, -0.02657466009259224, 0.004255267325788736, -0.02591029368340969, -0.02888665534555912, -0.002586046699434519, -0.024315813556313515, -0.028089415282011032, -0.011526758782565594, -0.010862392373383045, -0.010237887501716614, -0.03648700937628746, -0.0197848342359066, -0.02095411904156208, 0.01626369170844555, -0.011553333140909672, 0.01690148375928402, 0.011048414744436741, 0.005374724976718426, 0.037098225206136703, -0.006401171442121267, -0.006630377843976021, 0.030720306560397148, -0.010071796365082264, 0.07573778182268143, 0.005364759359508753, -0.015333578921854496, -0.024953605607151985, -0.03497225418686867, 0.0007922570803202689, 0.008271362632513046, -0.042758628726005554, -0.04849875345826149, 0.0031391317024827003, 0.02222970314323902, -0.05607253313064575, -0.05633828043937683, 0.03600866347551346, -0.03515827655792236, 0.002918229904025793, -0.003946336917579174, -0.05136881768703461, 0.06122801825404167, -0.032819706946611404, 0.009659889154136181, 0.007035641465336084, -0.020396051928400993, 0.0029663965106010437, 0.004972783382982016, -0.006942629814147949, 0.006002551410347223, -0.0006178608746267855, 0.015400015749037266, -0.006590515840798616, 0.003210551105439663, 0.005431196186691523, 0.031172076240181923, -0.013293974101543427, 0.009546946734189987, 0.02300036884844303, -0.010908897966146469, 0.022003818303346634, 0.009533659555017948, -0.03329804912209511, 0.01334047969430685, -0.02436896413564682, 0.01720709167420864, -0.015506314113736153, -0.027797095477581024, 0.011885516345500946, -0.04073895514011383, 0.023372413590550423, -0.0076734330505132675, 0.024408824741840363, 0.028195714578032494, -0.036300987005233765, 0.018522538244724274, 0.004733611363917589, -0.05532844364643097, -0.059155192226171494, 0.014004846103489399, -0.01074280682951212, 0.001003193436190486, -0.044432830065488815, -0.006431067828088999, 0.003800176316872239, 0.04036691039800644, 0.014988108538091183, 0.036300987005233765, 0.007334606256335974, -0.059367790818214417, -0.004736933391541243, 0.0015404998557642102, 0.0249668937176466, -0.02212340384721756, 0.0056404718197882175, 0.03279313072562218, 0.012782411649823189, 0.007905961014330387, -0.002375110285356641, 0.0034380967263132334, -0.03080003149807453, -0.01176593080163002, 0.04988063871860504, 0.006600481458008289, -0.0015878359554335475, -0.011493540368974209, -0.0026441786903887987, 0.007148583419620991, 0.024913743138313293, 0.009148326702415943, -0.032314788550138474, -0.0008811160805635154, -0.007195089478045702, -0.038506682962179184, 0.0194526519626379, -0.04839245602488518, -0.04371531680226326, -0.0219240952283144, -0.005872999783605337, 0.0036241193301975727, 0.009918991476297379, 0.0012440262362360954, -0.01270268764346838, 0.010769381187856197, 0.046505656093358994, 0.003388269105926156, 0.023252828046679497, 0.030135665088891983, -0.004962817765772343, -0.005623862612992525, 0.0018535825656726956, -0.01387197244912386, 0.005869678221642971, -0.0065805502235889435, 0.06005873158574104, -0.004524335730820894, 0.002207357669249177, -0.007879386655986309, 0.0300559401512146, 0.01240372285246849, 0.06160006299614906, 0.005564069375395775, 0.009334349073469639, 0.020396051928400993, -0.0011875551426783204, 0.008138489909470081, -0.0014250661479309201, -0.0072017330676317215, 0.021233152598142624, 0.012848848477005959, 0.007992329075932503, -0.0065572974272072315, 0.01561261247843504, -0.030348261818289757, 0.025192778557538986, -0.007972397841513157, -0.026215901598334312, -0.009932279586791992, -0.04616018384695053, -0.014523051679134369, 0.000685127975884825, 0.008902511559426785, 0.027371900156140327, -0.027903392910957336, 0.028594333678483963, -0.031278375536203384, -0.06149376556277275, -0.021977243945002556, 0.02051563747227192, -0.00895566027611494, -0.038373809307813644, -0.04411393776535988, 0.006118815392255783, 0.006078953389078379, -0.009580165147781372, 0.032580532133579254, -0.018216930329799652, -0.04934914410114288, -0.005118943750858307, 0.005584000609815121, 0.029364999383687973, -0.011393885128200054, 0.019532375037670135, 0.00425194576382637, -0.004793404135853052, 0.0151475565508008, -0.046505656093358994, -0.015253854915499687, 0.010470416396856308, 0.011360667645931244, 0.00823150109499693, -0.026694245636463165, -0.0067532854154706, -0.006341378204524517, -0.01031096838414669, -0.0007910113781690598, -0.03800176456570625, 0.027637647464871407, -0.0045608761720359325, -0.01793789491057396, 0.0024232768919318914, -0.0377625934779644, -0.012981721200048923, 0.027159303426742554, 0.004524335730820894, -0.034493908286094666, 0.005437839776277542, 0.01066308282315731, 0.004328347742557526, -0.0028036267030984163, -0.02664109691977501, 0.011221149936318398, -0.014469902031123638, 0.017791735008358955, -0.00020325463265180588, -0.036965351551771164, 0.00401609530672431, -0.003363355528563261, -0.017632286995649338, -0.004766829777508974, 0.06021818146109581, -0.0058630346320569515, -0.012011746875941753, -0.00801890343427658, 0.008025547489523888, -0.003687234129756689, -0.0372842475771904, 0.027929967269301414, 0.022269565612077713, 0.001643476658500731, 0.04273205250501633, -0.02965732105076313, -0.01516084372997284, -0.01934635266661644, 0.0384269580245018, 0.04129702225327492, -0.008364374749362469, -0.007241595070809126, 0.0072017330676317215, -0.052272357046604156, -0.01586507260799408, 0.001112813944928348, 0.04589443653821945, 0.03765629231929779, 0.010291037149727345, 0.0014458276564255357, -0.024315813556313515, 0.011971884407103062, -0.016688887029886246, -0.03212876245379448, 0.01797775737941265, 0.004707036539912224, -0.015134269371628761, -0.013333835639059544, 0.024342387914657593, 0.05102334916591644, -0.031012628227472305, 0.024355676025152206, 0.009965498000383377, 0.002710615284740925, -0.01723366789519787, -0.043927911669015884, 0.01199845876544714, 0.005155484192073345, -0.03279313072562218, 0.03406871482729912, -0.014855234883725643, 0.01183236762881279, -0.028275437653064728, -0.015918221324682236, 0.006437711417675018, -0.027159303426742554, -0.012901997193694115, -0.012078182771801949, 0.0005701095215044916, -0.014483190141618252, -0.025392087176442146, 0.04538951814174652, -0.004826622549444437, 0.012244274839758873, 0.03972911834716797, 0.008477316237986088, -0.026295626536011696, 0.030614009127020836, -0.0025478454772382975, 0.01700778305530548, -0.0054544489830732346, -0.03781574219465256, -0.016316842287778854, -0.004687105771154165, 0.05322904512286186, -0.06765908747911453, 0.004637278150767088, 0.061334315687417984, -0.033085450530052185, 0.043901339173316956, -0.028036266565322876, 0.03983541578054428, 0.003007919294759631, 0.004122394137084484, -0.03438761085271835, -0.013885259628295898, -0.018921157345175743, 0.045708414167165756, 0.04283835366368294, 0.025259215384721756, -0.0291524026542902, 0.04616018384695053, 0.014177581295371056, -0.0497477650642395, -0.0066038030199706554, 0.01019138190895319, -0.01817706786096096, 0.020409338176250458, -0.014390178956091404, -0.014748936519026756, 0.05522214248776436, 0.02862090989947319, 0.03303230181336403, -0.06096227094531059, 0.012828917242586613, 0.023957056924700737, -0.021060418337583542, -0.008404236286878586, -0.0017854849575087428, 0.0016002928605303168, -0.006258332636207342, -0.05248495563864708, -0.003879900323227048, 0.009068602696061134, -0.020037293434143066, 0.020223315805196762, -0.03388269245624542, -0.009839268401265144, -0.010423910804092884, 0.012995008379220963, -0.03935707360506058, 0.005384690593928099, 0.03263368457555771, -0.0124834468588233, -0.03303230181336403, 0.0013885259395465255, -0.030454561114311218, -0.01927991583943367, 0.012323998846113682, 0.006288229022175074, -0.047542065382003784, 0.005158805754035711, -0.013885259628295898, -0.018854720517992973, -0.024820731952786446, -0.006896124221384525, -0.001949915662407875, -0.030374836176633835, 0.050226107239723206, 0.013028226792812347, -0.04278520122170448, -0.016051094979047775, 0.0171672310680151, 0.012436941266059875, -0.001676694955676794, -0.03789546713232994, -0.002175800269469619, 0.04334327206015587, -0.025857144966721535, 0.0024365640711039305, -0.011692850850522518, -0.00646096421405673, -0.0005306627717800438, 0.011945310048758984, 0.039915140718221664, 0.016928058117628098, 0.004155612550675869, 0.011991815641522408, 0.042758628726005554, -0.02912582829594612, -0.017898034304380417, -0.013765674084424973, 0.060430776327848434, 0.020701659843325615, 0.005175414960831404, -0.005258460994809866, -0.009952209889888763, 0.0013262416468933225, 0.02507319115102291, -0.018482675775885582, 0.031278375536203384, -0.006560619454830885, -0.01897430792450905, -0.006447677034884691, -0.0033766427077353, -0.0077199386432766914, -0.016276979818940163, 0.01380553562194109, -0.023784320801496506, 0.0014234052505344152, -0.013400272466242313, 0.023624872788786888, -0.017831597477197647, -0.010636507533490658, 0.02064851112663746, 0.002307012677192688, -0.028062840923666954, -0.008610189892351627, 0.037842314690351486, -0.01573219895362854, -0.006982491817325354, -0.03832066059112549, 0.021180003881454468, 0.025524960830807686, -0.00035647416370920837, 0.026083029806613922, 0.031783293932676315, -0.018495963886380196, -0.0408984012901783, -0.005975976586341858, -0.009048671461641788, 0.012629607692360878, 0.010981977917253971, -0.013533146120607853, 0.005623862612992525, 0.008464029058814049, 0.059367790818214417, -0.006660274229943752, -0.04002143815159798, -0.0007357859285548329, -0.033590368926525116, -0.015891646966338158, 0.044539131224155426, -0.011420460417866707, 0.010968690738081932, 0.0030029367189854383, -0.016928058117628098, 0.006078953389078379, 0.009234694764018059, -0.034254737198352814, 0.046505656093358994, -0.01300165243446827, -0.013533146120607853, 0.027770519256591797, 0.022668184712529182, 0.0003068542864639312, -0.04150962084531784, 0.052697550505399704, -0.004218727350234985, -0.019306490197777748, -0.012164550833404064, 0.004205440171062946, -0.006437711417675018, -0.026335489004850388, -0.010237887501716614, 0.0015787009615451097, -0.004029382951557636, -0.024661283940076828, 0.04552239179611206, -0.0413767471909523, -0.017459550872445107, -0.008457385934889317, 0.014616062864661217, -0.016755323857069016, 0.031544122844934464, -0.02212340384721756, -0.00414232537150383, -0.042864926159381866, -0.0001296552800340578, -0.0061487117782235146, -0.036540158092975616, 0.0035709699150174856, -0.014775510877370834, -0.0239703431725502, -0.006869549863040447, -0.009400785900652409, -0.025219352915883064, -0.01516084372997284, 0.05442490428686142, 0.010138233192265034, -0.012330641970038414, 0.011094920337200165, -0.000808035780210048, 0.015360153280198574, 0.005221920553594828, -0.0033052233047783375, 0.03970254212617874, 0.014031420461833477, 0.03704507648944855, 0.033085450530052185, -0.021033843979239464, -0.010098370723426342, -0.003856647526845336, 0.002610960276797414, 0.003491245908662677, 0.008118558675050735, -0.015679050236940384, -0.01694134622812271, -0.03175671771168709, -0.003233803901821375, -0.02302694320678711, 0.009746256284415722, 0.010756094008684158, -0.031012628227472305, -0.02939157374203205, -0.012443584389984608, 0.01914704218506813, 0.0150279700756073, 0.00728810066357255, -0.019638674333691597, -0.0028667415026575327, -0.03159727156162262, -0.0025794028770178556, -0.006630377843976021, -0.0009492136305198073, -0.01687490940093994, 0.036540158092975616, -0.012948502786457539, 0.012516665272414684, -0.008258075453341007, -0.00781294982880354, 0.024023493751883507, 0.023345839232206345, 0.018429527059197426, -0.022840920835733414, 0.01586507260799408, 0.010702944360673428, 0.04315724968910217, 0.032686833292245865, 0.0030942868907004595, 0.038506682962179184, 0.026760682463645935, -0.03587578982114792, 0.01650286465883255, 0.018868008628487587, 0.012031677179038525, -0.03340434655547142, 0.022987080737948418, 0.003467993112280965, 0.04448598250746727, 0.015386728569865227, -0.030906328931450844, -0.017300104722380638, 0.027690796181559563, 0.02155204862356186, -0.011407173238694668, 0.030374836176633835, 0.01868198625743389, -0.010443841107189655, -0.009932279586791992, 0.005760057829320431, 0.029710469767451286, 0.06175950914621353, 0.02024989016354084, 0.028169140219688416, 0.03175671771168709, -0.004145646933466196, -0.003567648120224476, 0.00036623203777708113, -0.019266627728939056, -0.03276655450463295, -0.033723242580890656, -0.04002143815159798, 0.03093290515244007, -0.020063867792487144, -0.013911834917962551, 0.03550374507904053, -0.006620412226766348, 0.05017295852303505, 0.0203561894595623, 0.01619725488126278, 0.005716873798519373, -0.020435914397239685, 0.012264206074178219, 0.007547203451395035, -0.0006934325210750103, -0.03858640789985657, 0.009135039523243904, -0.013898547738790512, 0.05429203063249588, 0.015253854915499687, 0.024820731952786446, -0.03478623181581497, -0.000708380772266537, -0.009261269122362137, -0.014390178956091404, -0.017127368599176407, 0.02694670483469963, -0.0020744844805449247, 0.02172478474676609, 0.0037237743381410837, -0.007939179427921772, -0.013818823732435703, -0.02480744570493698, -0.0031391317024827003, 0.006062344182282686, -0.009998715482652187, 0.026215901598334312, 0.0028169138822704554, -0.008244788274168968, 0.024594847112894058, 0.05102334916591644, 0.014018133282661438, 0.008782925084233284, 0.0036938777193427086, -0.04910997301340103, -0.0038832221180200577, 0.0069559174589812756, -0.028036266565322876, 0.011307517997920513, -0.01890787109732628, -0.001380221452564001, 0.03188959136605263, 0.021817795932292938, -0.017725298181176186, -0.0005900405230931938, -0.0037736017256975174, -0.009566877968609333, 0.04166906699538231, -0.023372413590550423, -0.016051094979047775, 0.002237254288047552, -0.004069244954735041, 0.004996036179363728, 0.031916167587041855, -0.022415725514292717, -0.026906844228506088, -0.005843103397637606, 0.0038167855236679316, 0.010423910804092884, 0.02787681855261326, -0.007839525118470192, 0.041695643216371536, -0.026388637721538544, 0.018336515873670578, 0.01019138190895319, -0.0054411618039011955, -0.005015966948121786, 0.020369477570056915, -0.004232014529407024, -0.004736933391541243, 0.011619769968092442, 0.019027456641197205, 0.026215901598334312, -0.03715137392282486, -0.013699237257242203, -0.0007175158243626356, -0.03754999488592148, -0.012901997193694115, 0.00048457231605425477, -5.330502972356044e-05, 0.012742549180984497, -0.007381111849099398, 0.01112813875079155, 0.04002143815159798, -0.045469243079423904, 0.014536338858306408, 0.004275198560208082, -0.008072053082287312, -0.008889223448932171, -0.005720195826143026, 0.03273998200893402, 0.04379504173994064, 0.000282563385553658, 0.025245927274227142, 0.01844281330704689, -0.01312123890966177, -0.004979426972568035, -0.02102055586874485, 0.0008258906309492886, -0.013699237257242203, 0.0027023106813430786, 0.009434004314243793, 0.03853325545787811, 0.0050657945685088634, -0.019465938210487366, -0.014589488506317139, 0.009460578672587872, 0.013247468508780003, -0.0028816896956413984, -0.004574163351207972, -0.020024007186293602, -0.00902209710329771, 0.023638160899281502, -0.035769492387771606, -0.0014400144573301077, -0.02955102175474167, -0.04722316935658455, -0.0330057293176651, -0.011586551554501057, -0.02289406955242157, -0.004730289336293936, -0.011573264375329018, 0.0022339322604238987, 0.0348128043115139, -0.0016750340582802892, -0.008849361911416054, -0.025458524003624916, -0.04124387353658676, 0.011307517997920513, -0.0313846729695797, -0.007547203451395035, -0.015811922028660774, -0.016024520620703697, 0.005211955402046442, -0.034493908286094666, -0.02503333054482937, 0.03196931630373001, 0.021140141412615776, -0.025830570608377457, 0.0036075101234018803, 0.008962304331362247, 0.019200192764401436, 0.00022546938271261752, 0.015758773311972618, -0.0026823796797543764, -0.013553076423704624, -0.013141169212758541, -0.008749706670641899, 0.026295626536011696, 0.047382619231939316, 0.005354794207960367, -0.009447291493415833, 0.001996421255171299, -0.01793789491057396, -0.04735604301095009, -0.0001126308852690272, -0.017260242253541946, 0.014337029308080673, -0.004813335370272398, -0.009042028337717056, 0.037868890911340714, 0.012496734037995338, 0.029072677716612816, 0.027199164032936096, 0.029099252074956894, -0.001503129256889224, 0.011280943639576435, 0.003936371766030788, 0.002072823466733098, 0.009367567487061024, 0.0006805604207329452, -0.013559720478951931, -0.006497504189610481, 0.036035239696502686, -0.02245558798313141, 0.007945823483169079, 0.002227288670837879, 0.0135065708309412, -0.014948246069252491, -0.020223315805196762, 0.04100470244884491, -0.007959110662341118, -0.04188166558742523, -0.002526253694668412, 0.02309338003396988, 0.006414458621293306, 0.020781384781003, -0.013898547738790512, -0.001065477728843689, -0.013559720478951931, -0.01562589965760708, -0.00530496658757329, -0.009121752344071865, -0.019598811864852905, -0.049986936151981354, -0.0028385058976709843, 0.036300987005233765, -0.03494567796587944, 0.005049185361713171, 0.0017439620569348335, 0.00858361553400755, 0.015267142094671726, 0.005896252579987049, 0.01599794626235962, 0.0233989879488945, -0.023438850417733192, -0.01211804524064064, -0.026893556118011475, -0.009859198704361916, -0.017765160650014877, -0.014988108538091183, -0.00605902262032032, -0.016024520620703697, 0.024860594421625137, 0.011945310048758984, -0.011254368349909782, -0.030241962522268295, -0.03893187642097473, 0.01797775737941265, 0.015360153280198574, -0.014815373346209526, -0.009852555580437183, 0.025285789743065834, 0.003989520948380232, 0.007387755438685417, -0.028169140219688416, 0.0323413610458374, -0.016210542991757393, 0.028328588232398033, 0.003441418521106243, 0.0024432078935205936, -0.019904419779777527, 0.02470114640891552, -0.0032852923031896353, -0.009865842759609222, -0.026428500190377235, -0.00020636884437408298, -0.031172076240181923, 0.008410880342125893, 0.009872485883533955, -0.00980604998767376, -0.013413559645414352, 0.03840038552880287, -0.03507855162024498, -0.021060418337583542, 0.016077669337391853, -0.01177921798080206, 0.04243973270058632, -0.02112685516476631, 0.021299589425325394, -0.013147813268005848, 0.02664109691977501, -0.01437689084559679, -0.003969589713960886, -0.05766701325774193, -0.01676861010491848, 0.006447677034884691, 0.014722362160682678, -0.016662312671542168, -0.017446264624595642, 0.020940832793712616, -0.0012523308396339417, 0.021605199202895164, 0.032288212329149246, 0.04525664448738098, -0.006102206185460091, -0.004630634561181068, -0.02436896413564682, 0.025857144966721535, -0.008105271495878696, -0.02688026800751686, -0.00803219061344862, -0.01241701003164053, -0.015386728569865227, 0.009068602696061134, 0.018030906096100807, 0.002104380866512656, -0.015227280557155609, 0.01054349634796381, -0.02600330486893654, -0.0033284761011600494, 0.04291807487607002, -0.029072677716612816, 0.0177385862916708, -0.013659375719726086, 0.013400272466242313, 0.006630377843976021, 0.005092369392514229, -0.002597673097625375, 0.00448447372764349, -0.03582264110445976, 0.0006701797246932983, 0.007268169429153204, -0.034626781940460205, 0.03999486193060875, -0.019293203949928284, 0.015718910843133926, -0.03802833706140518, 0.02031632699072361, -0.04940229281783104, 0.0065938374027609825, -0.012011746875941753, -0.009693107567727566, 0.017193805426359177, 0.010576714761555195, 0.005132231395691633, 0.025631260126829147, -0.013513214886188507, -0.03289942815899849, -0.0001548804430058226, 0.009686463512480259, -0.027903392910957336, 0.0016692208591848612, 0.019253341481089592, -0.015785347670316696, -0.049588315188884735, -0.02787681855261326, 0.015466452576220036, -0.010915542021393776, -0.018602261319756508, 0.03311202675104141, -0.007268169429153204, 0.005424552597105503, -0.014855234883725643, -0.021512188017368317, -0.0017506057629361749, 0.010603289119899273, -0.01676861010491848, 0.014297166839241982, -0.00803219061344862, -0.07164528220891953, 0.009912348352372646, 0.03196931630373001, 0.024422112852334976, -0.016954632475972176, -0.004743576981127262, -0.01161312684416771, 0.013300617225468159, 0.00896894745528698, -0.008118558675050735, 0.020502351224422455, -0.028966380283236504, -0.010716231539845467, -0.0038267511408776045, -0.02476758323609829, -0.030614009127020836, -0.026534797623753548, -0.013672662898898125, -0.009055315516889095, -0.044432830065488815, -0.006331412587314844, 0.02175135910511017, 0.012111401185393333, -0.0008001464302651584, 0.001358629553578794, 0.017924608662724495, -0.03800176456570625, 0.02315981686115265, 0.0030660515185445547, 0.01561261247843504, -0.001432540244422853, 0.007241595070809126, -0.034759655594825745, -0.03518484905362129, -0.02965732105076313, 0.029444724321365356, 0.04190823808312416, -0.003517820732668042, -0.03130494803190231, -0.034600209444761276, 0.02333255112171173, 0.0022322714794427156, 0.02745162323117256, 0.011041771620512009, -0.03353722020983696, 0.005205311346799135, 0.05046527832746506, -0.011041771620512009, 0.01991770789027214, -0.011041771620512009, 0.013526502065360546, 0.03664645552635193, -0.034600209444761276, -0.016888195648789406, -0.02333255112171173, -0.04900367185473442, 0.042997799813747406, -0.01670217327773571, 0.01516084372997284, -0.013214250095188618, -0.006623734254390001, -0.008470673114061356, 0.006348021794110537, -0.03789546713232994, -0.036965351551771164, 0.021060418337583542, -0.01606438122689724, -0.03922419995069504, 0.028328588232398033, -0.002984666498377919, 0.011148069985210896, 0.057454414665699005, -0.008623477071523666, -8.641954627819359e-05, 0.02044920064508915, 0.015067832544445992, -0.026959992945194244, -0.009859198704361916, 0.01727352850139141, 0.03215533867478371, -0.029046103358268738, 0.0018735135672613978, 0.002772069303318858, -0.033058878034353256, -0.024275952950119972, 0.00448447372764349, 0.005985942203551531, 0.01351985801011324, 0.005208633374422789, -0.0028268794994801283, -0.00015820226690266281, 0.02406335435807705, -0.004916312173008919, 0.02436896413564682, 0.02031632699072361, 0.004803369753062725, -0.007693364284932613, 0.016011232510209084, 0.011912091635167599, -0.0197848342359066, 0.010736162774264812, -0.013659375719726086, -0.0004687936161644757, 0.01340691652148962, -0.04036691039800644, -0.023518573492765427, 0.020289752632379532, 0.022774484008550644, -0.0019980822689831257, -0.0004982748650945723, 0.005623862612992525, 0.027265600860118866, -0.032314788550138474, 0.001247348147444427, -0.01176593080163002, 0.018735134974122047, 0.01696792058646679, -0.00937421154230833, -0.020502351224422455, -0.016011232510209084, -0.016183968633413315, -0.05750756338238716, 0.02637534961104393, -0.028860080987215042, -0.0001946386182680726, 0.029444724321365356, 0.006676883436739445, 0.013739099726080894, 0.0013511553406715393, -0.0067798602394759655, 0.0224954504519701, -0.01767214946448803, 0.019904419779777527, 0.014270592480897903, -0.012257562018930912, -0.019465938210487366, -0.0013254111399874091, -0.0027920003049075603, -0.010370761156082153, -0.012031677179038525, -0.011553333140909672, 0.01501468289643526, 0.01444332767277956, -0.012217700481414795, -0.007427617441862822, -0.03337777405977249, -0.03685905411839485, -0.028328588232398033, 0.0036041883286088705, -0.01283556129783392, 0.021366026252508163, -0.06882836669683456, -0.011393885128200054, 0.0015811922494322062, 0.003019545692950487, 0.02864748425781727, 0.001838634256273508, -0.003677268512547016, 0.016529439017176628, -0.02242901362478733, 0.02912582829594612, -0.0006980000762268901, -0.004966139793395996, -0.010045222006738186, 0.02406335435807705, -0.011872229166328907, 0.02798311784863472, -0.015240567736327648, -0.009706394746899605, -0.0007619453244842589, -0.014762223698198795, 0.008982235565781593, 0.03518484905362129], "index": 76}, {"title": "Multnomah people", "text": "The Multnomah were a tribe of Chinookan people who lived in the area of Portland, Oregon, in the United States through the early 19th century. Multnomah villages were located throughout the Portland basin and on both sides of the Columbia River. The Multnomah spoke a dialect of the Upper Chinookan language in the Oregon Penutian family.", "vector": [0.006801684387028217, 0.03566597402095795, -0.02064003236591816, -0.024768037721514702, 0.001402728259563446, -0.006719124037772417, -0.05415944382548332, -0.035157911479473114, -0.06818196177482605, 0.006249166559427977, -0.04084821045398712, 0.021059183403849602, -0.02380272001028061, -0.009862760081887245, 0.012002971954643726, -0.03627564758062363, -0.0471227802336216, 0.04023853689432144, 0.040772002190351486, 0.03498008847236633, -0.0061539048328995705, -0.01083442848175764, 0.0015734054613858461, 0.005842716433107853, 0.061018284410238266, 0.00843383464962244, -0.0022624649573117495, -0.02572065405547619, 0.018366452306509018, -0.0035088052973151207, 0.007811457850039005, -0.03492928296327591, 0.026063596829771996, 0.011958517134189606, -0.004286775831133127, 0.012606295756995678, 0.02565714716911316, 0.010961444117128849, 0.0018242612713947892, 0.017007386311888695, -0.02124970592558384, 0.02735915593802929, -0.0007688411860726774, 0.025911178439855576, -0.02459021657705307, -0.01876020058989525, 0.02340897172689438, 0.02097027190029621, 0.007106521632522345, -0.005779208615422249, 0.057614266872406006, -0.01869669370353222, 0.0004640037950593978, -0.05507395416498184, -0.009043509140610695, 0.02672407776117325, 0.02611440233886242, 0.05253364145755768, 0.006763579323887825, -0.020170073956251144, -0.026393836364150047, -0.03015349805355072, 0.024183766916394234, -0.01957309991121292, 0.01996684819459915, 0.018125122413039207, 0.0003234928008168936, 0.027181332930922508, 0.00392795680090785, -0.01972552016377449, 0.0032515989150851965, 0.04468408226966858, -0.005985609255731106, -0.022748490795493126, 0.0005668069934472442, -0.01083442848175764, -0.04371876269578934, 0.002386305248364806, -0.027003511786460876, 0.006446040701121092, 0.0028499120380729437, -0.0027054317761212587, 0.03343050181865692, -0.005591860972344875, 0.035488151013851166, -0.04056877642869949, -0.016346905380487442, -0.020068461075425148, -0.053549766540527344, -0.049561478197574615, 0.0030007429886609316, -0.005458494648337364, -0.05314331874251366, 0.0035215069074183702, -0.009659534320235252, -0.024272676557302475, 0.045979637652635574, 0.011120214127004147, -0.012002971954643726, 0.01436546165496111, -0.045547787100076675, 0.004280425142496824, 0.017223311588168144, 0.011583820916712284, 0.06355859339237213, -0.003061075462028384, 0.011056706309318542, 0.01353986095637083, -0.015267272479832172, 0.03340509533882141, 0.01376848854124546, 0.018366452306509018, 0.011221826076507568, -0.01094239205121994, 0.03500549495220184, 0.040772002190351486, -0.06574326008558273, -0.01872209645807743, -0.04094982147216797, -0.020373297855257988, -0.02088136039674282, -0.027181332930922508, -0.06731825321912766, -0.026216015219688416, -0.016359606757760048, -0.08408430963754654, 0.0011058293748646975, 0.06630213558673859, 0.003699328750371933, 0.044480856508016586, -0.007055715192109346, -0.04115304723381996, -0.05067921429872513, -0.007373254280537367, -0.022418249398469925, -0.021935589611530304, 0.050653811544179916, -0.009767497889697552, 0.010821727104485035, -0.012441175989806652, -0.0011486971052363515, 0.041813530027866364, -0.031042607501149178, -0.004496351350098848, -0.022291233763098717, -0.07219565659761429, 0.0017051841132342815, 0.048164308071136475, 0.0033817896619439125, 0.00047511764569208026, 0.026343030855059624, 0.007201783359050751, 0.017896495759487152, 0.007487568538635969, -0.050044137984514236, 0.01957309991121292, 0.002560951514169574, 0.019674712792038918, -0.01644851826131344, -0.016816861927509308, -0.014581388793885708, 0.04003531113266945, 0.047580037266016006, 0.004502702038735151, 0.03292243927717209, -0.05990054830908775, 0.0222531296312809, -0.03614863380789757, 0.024514006450772285, 0.02437428943812847, -0.026774883270263672, 0.08789478242397308, -0.014670299366116524, -0.06777551025152206, -0.018556976690888405, 0.04006071388721466, 0.00024331422173418105, 0.005702999420464039, 0.033963967114686966, 0.039349425584077835, -0.009081614203751087, -0.018036212772130966, 0.006366655696183443, 0.00835762545466423, 0.024869650602340698, -0.01475920993834734, -0.005267971195280552, 0.07321178168058395, -0.023294657468795776, -0.012301458977162838, 0.00041954833432100713, 6.301163375610486e-05, 0.052940092980861664, 0.017642464488744736, 0.050653811544179916, 0.035767585039138794, 0.019890639930963516, 0.04067038744688034, -0.006033239886164665, -0.011069407686591148, 0.015279973857104778, -0.002189431106671691, -0.021770469844341278, 0.0077733532525599, 0.020932167768478394, 0.02939140424132347, -0.011075758375227451, -0.01902693323791027, 0.008021033369004726, -0.004858345724642277, 0.07204323261976242, -0.057614266872406006, -0.015305377542972565, 0.010167596861720085, -0.01353986095637083, 0.013247724622488022, 0.02561904303729534, 0.04112764447927475, -0.007684442680329084, 0.00437568686902523, 0.03589460253715515, 0.024488603696227074, -0.030077289789915085, -0.006985856685787439, -0.03988289088010788, 0.03312566131353378, -0.07006179541349411, 0.023421673104166985, -0.010961444117128849, 0.027765605598688126, 0.006055467762053013, 0.009856408461928368, 0.004245495889335871, 0.01848076656460762, 0.011653679423034191, 0.03879055753350258, 0.014238446019589901, 0.02221502549946308, 0.015292675234377384, 0.045065127313137054, -0.03277001902461052, 0.04453166201710701, -0.018048914149403572, -0.012803169898688793, 0.05179695412516594, -0.02197369560599327, -0.007506620604544878, -0.06264408677816391, -0.00963413156569004, -0.038434915244579315, 0.026952706277370453, 0.0062999725341796875, 0.04303287714719772, 0.01240307092666626, -0.04349013417959213, 0.0270543172955513, -0.04039095342159271, -5.442816109280102e-05, -0.004121655598282814, -0.020474910736083984, -0.03823168948292732, 0.029747048392891884, -0.01125993113964796, 0.03523411974310875, 0.002821333473548293, -0.012339563108980656, -0.03683451935648918, 0.0003260727971792221, 0.0003875959664583206, 0.008109944872558117, 0.023815421387553215, -0.012377668172121048, -0.0471227802336216, 0.051390502601861954, -0.0017972703790292144, 0.011044004932045937, 0.05609007924795151, -0.007055715192109346, -0.003126170951873064, -0.057614266872406006, 0.02559363842010498, -0.04463327303528786, -0.06051022186875343, -0.11939464509487152, 0.003330983454361558, 0.009938969276845455, -0.00931659247726202, -0.025453921407461166, -0.008776776492595673, -0.033608321100473404, -0.009945319965481758, -0.025149084627628326, -0.0034071928821504116, 0.003581839380785823, 0.009024457074701786, 0.004242320545017719, 0.03619943931698799, 0.029416808858513832, 0.006138027645647526, 0.01981442980468273, -0.008865687064826488, 0.00487104756757617, 0.018188631162047386, -0.014225744642317295, 0.030966397374868393, -0.0035088052973151207, 0.02936600148677826, -0.0017147102626040578, -0.0053346543572843075, -0.014162236824631691, -0.03914619982242584, -0.04689415171742439, -0.008281415328383446, 0.015826141461730003, -0.005302900448441505, -0.0008906967705115676, 0.03373533859848976, 0.01249198243021965, 0.00570617476478219, 0.023320060223340988, -0.004502702038735151, -0.0007311334484256804, -0.01406062487512827, 0.02452670782804489, -0.028095845133066177, 0.005283847916871309, -0.057817492634058, -0.02133861742913723, -0.026470046490430832, -0.012834924273192883, -0.023231148719787598, -0.014594090171158314, -0.00746216531842947, -0.020208178088068962, -0.013196918182075024, 0.040594179183244705, -0.0011232940014451742, -0.003826344385743141, 0.009183226153254509, 0.10379713028669357, 0.0027403610292822123, -0.03398936986923218, 0.05939248576760292, 0.036123231053352356, 0.02827366814017296, 0.022659579291939735, -0.02097027190029621, 0.018048914149403572, -0.016981983557343483, 0.05507395416498184, 0.00042272370774298906, 0.06330456584692001, -0.005210814066231251, 0.04595423489809036, 0.03782523795962334, -0.003100767731666565, -0.016893072053790092, 0.015508602373301983, -0.010993198491632938, 0.022240428254008293, -0.053244929760694504, -0.0035024546086788177, -0.036123231053352356, 0.006341252941638231, -0.023091431707143784, -0.016524726524949074, -0.012060129083693027, 0.004280425142496824, 0.01656283065676689, -0.020830554887652397, 0.03945104032754898, -0.005661719478666782, -0.0011074170470237732, -0.019979549571871758, -0.01656283065676689, -0.016219889745116234, 0.03386235237121582, -0.0338115468621254, 0.01015489548444748, -0.041356272995471954, -0.002440286800265312, 0.0949060395359993, 0.034573640674352646, 0.005906224250793457, -0.006055467762053013, -0.03414178639650345, 0.013641472905874252, 0.008598954416811466, -0.03012809529900551, -0.027003511786460876, 0.04201675206422806, 0.018518870696425438, 0.04049256816506386, 0.04026393964886665, 0.040594179183244705, 0.053600575774908066, -0.12244302034378052, 0.010720115154981613, -0.0015599100152030587, 0.012079181149601936, 0.04745301976799965, -0.05863039195537567, -0.011869605630636215, 0.009856408461928368, 0.04780866205692291, -0.042931266129016876, -0.04803729057312012, -0.027155930176377296, -0.02288820780813694, 0.0032309587113559246, -0.05375299230217934, 0.03955265134572983, -0.054057829082012177, -0.0012296695495024323, 0.007316097151488066, -0.05659814178943634, -0.044125210493803024, 0.032084133476018906, 0.009024457074701786, -0.0017210610676556826, 0.004607490263879299, -0.017820285633206367, -0.000910542905330658, -0.015114854089915752, -0.010110439732670784, 0.03464984893798828, 0.008243311196565628, 0.0014956084778532386, -0.0052584451623260975, 0.03376074135303497, 0.044125210493803024, -0.010561345145106316, 0.03172849118709564, 0.024780739098787308, 0.04026393964886665, -0.0696045383810997, -0.03221115097403526, 0.003661224152892828, 0.008490991778671741, 0.04425222799181938, 0.026012791320681572, -0.011113863438367844, -0.010815376415848732, -0.026343030855059624, -0.05314331874251366, -0.0015829316107556224, -0.012980991974473, -0.03967966511845589, -0.01935717463493347, 0.033913157880306244, 0.023116834461688995, -0.03558976575732231, -0.004518579225987196, -0.030712366104125977, 0.002807044191285968, -0.017337625846266747, 0.04277884587645531, -0.0056871226988732815, 0.05903683975338936, -0.0011359956115484238, -0.01590234972536564, -0.02024628408253193, -0.0070430138148367405, -0.025453921407461166, -0.04394739121198654, -0.06396504491567612, -0.0005914162611588836, -0.0032404849771410227, -0.023332761600613594, -0.06117070093750954, 0.03627564758062363, 0.02185938134789467, 0.0036707501858472824, -0.020678136497735977, -0.02951841987669468, 6.717933138133958e-05, 0.01531807892024517, -0.03914619982242584, -0.01714710332453251, -0.0023513759952038527, -0.015368885360658169, 0.01531807892024517, -0.04867237061262131, 0.004042270593345165, -0.010643905028700829, 0.006769930478185415, -0.08098513633012772, 0.021681558340787888, 0.0054489681497216225, -0.011247229762375355, 0.04618286341428757, 0.0392732173204422, -0.010764569975435734, 0.004966309294104576, -0.012237951159477234, 0.06081505864858627, -0.02873092330992222, -0.040136922150850296, 0.00948171317577362, -0.05113647133111954, 0.009958021342754364, 0.03561516851186752, 0.09023186564445496, -0.03668209910392761, -0.005131429526954889, 0.007360552903264761, -0.01217444334179163, -0.0062999725341796875, -0.004563034512102604, -0.009646832942962646, 0.014251148328185081, 0.010878884233534336, 0.016334204003214836, -0.022621475160121918, -0.014301953837275505, 0.01144410390406847, 0.031169623136520386, 0.0040930770337581635, 0.005991959944367409, 0.008973650634288788, 0.01747734285891056, -0.002313271164894104, -0.012987342663109303, -0.023358164355158806, -0.027181332930922508, 0.010916989296674728, -0.009183226153254509, 0.02142752893269062, 0.03203332796692848, -0.03691072762012482, -0.04310908913612366, 0.02768939547240734, -0.015140256844460964, 0.02391703426837921, 0.044734887778759, -0.03929862007498741, -0.014428969472646713, 0.003658048575744033, -0.027486171573400497, -0.0029864537063986063, 0.020474910736083984, -0.005071097053587437, -0.033303484320640564, -0.0035564361605793238, 0.0028943675570189953, 0.0381808839738369, 0.018772901967167854, -0.014301953837275505, 0.02118619903922081, -0.009043509140610695, -0.03777443245053291, 0.03061075508594513, -0.03619943931698799, 0.002992804627865553, -0.018404556438326836, -0.03028051368892193, -0.014898926950991154, 0.014035221189260483, 0.00978654995560646, 0.012504683807492256, 0.058223940432071686, 8.623166650068015e-05, 0.022837400436401367, -0.006700071971863508, -0.042448606342077255, -0.007894018664956093, 0.006903296802192926, -0.009684938006103039, -0.00012771019828505814, 0.02218962088227272, 0.005785559769719839, -0.023777315393090248, -0.0040486217476427555, 0.02480614185333252, 0.008897441439330578, 0.021173497661948204, 0.006401584949344397, -0.012072830460965633, -0.005544229876250029, -0.05349896103143692, 0.006350778974592686, 0.02136402018368244, 0.01141234952956438, 0.013946310617029667, -0.007906720042228699, 0.01924286037683487, -0.00819250475615263, 0.026165209710597992, 0.0025879424065351486, -0.022392846643924713, 0.0044391946867108345, -0.009119718335568905, 0.0028880166355520487, 0.0058331904001533985, -0.0026943180710077286, 0.0014979899860918522, -0.031195025891065598, 0.0035596115048974752, -0.021059183403849602, -0.013730384409427643, 0.06198360398411751, -0.01483541913330555, 0.0069604539312422276, -0.02583496831357479, 0.0621868260204792, 0.03871434926986694, -0.03619943931698799, 0.017337625846266747, -0.013006395660340786, -0.003489752998575568, -0.017832987010478973, -0.010459733195602894, 0.025403115898370743, 0.023637598380446434, 0.001959215383976698, 0.01647392101585865, -0.02009386382997036, 0.028705520555377007, 0.006004661321640015, -0.0037977658212184906, 0.021999098360538483, -0.00892284419387579, 0.01902693323791027, -0.03459904342889786, -0.007652688771486282, -0.031017204746603966, 0.014962434768676758, -0.014898926950991154, 0.0077543011866509914, 0.018582379445433617, -0.07224646210670471, 0.003753310302272439, 0.0142892524600029, -0.01860778219997883, 0.03492928296327591, -0.016512025147676468, -0.03721556439995766, -0.03218574821949005, 0.0005223515909165144, -0.02240554802119732, -0.048494547605514526, -0.04577641561627388, 0.021287810057401657, -0.0262922253459692, 0.014695702120661736, -0.008427483960986137, -0.02450130507349968, 0.010910638608038425, 0.029340598732233047, -0.022075306624174118, -0.008033735677599907, -0.016461219638586044, -0.027892621234059334, -0.014797315001487732, -0.006909647490829229, -0.003854922717437148, -0.0023815419990569353, -0.047681648284196854, 0.0069985585287213326, -0.007443112786859274, -0.006947752088308334, -0.01830294542014599, 0.013501755893230438, -0.010599450208246708, 0.015699125826358795, -0.024463200941681862, 0.01924286037683487, -0.05893522873520851, 0.01007868628948927, 0.033481307327747345, 0.03442122042179108, -0.020944869145751, -0.032058730721473694, -0.01760435849428177, -0.005306075792759657, 0.019928744062781334, 0.01176164299249649, -0.0053727589547634125, -0.025365011766552925, -0.02386622689664364, 0.007309746462851763, -0.026012791320681572, 0.02185938134789467, -0.004420142155140638, -0.062390051782131195, 0.006242815870791674, 0.003365912940353155, -0.05243203043937683, -0.008427483960986137, 0.009672236628830433, 0.021478334441781044, 0.020843256264925003, 0.0004624160937964916, -0.016397710889577866, -0.0016242116689682007, 0.02644464373588562, -0.0001935002946993336, -0.0020703538320958614, 0.018125122413039207, -0.03256679326295853, -0.0005548993358388543, 0.030966397374868393, 0.0035024546086788177, -0.01021205261349678, -0.018290244042873383, 0.035030897706747055, -0.013565263710916042, -0.010427978821098804, -0.0033055804669857025, 0.015597512945532799, -0.0022307110484689474, -0.003419894492253661, -0.004813890438526869, 0.021046482026576996, -0.03236357122659683, -0.06335537135601044, 0.02751157432794571, -0.007982929237186909, 0.010961444117128849, 0.009678587317466736, 0.023942437022924423, 0.026216015219688416, -0.00939280167222023, 0.01159652229398489, -0.022075306624174118, 0.05184775963425636, 0.010656607337296009, -0.021999098360538483, -0.004426492843776941, -0.0021973694674670696, -0.024399692192673683, -0.0104724345728755, 0.0035754884593188763, 0.0030547247733920813, -0.0030182076152414083, 0.029493017122149467, 0.018074316903948784, 0.021910186856985092, 0.015051346272230148, -0.000414785259636119, 0.007163678761571646, -0.00413435697555542, 0.05283848196268082, -0.028908746317029, -0.004023218527436256, -0.022900909185409546, -0.009945319965481758, -0.005283847916871309, -0.009773848578333855, -0.01062485296279192, -0.0006346809677779675, -0.04564939811825752, 0.0009740507230162621, -0.05786829814314842, 0.0034802269656211138, 0.009049859829246998, -0.014225744642317295, -0.041356272995471954, 0.010224753990769386, -0.00673182588070631, -0.027867218479514122, -0.015851544216275215, -0.0008303643553517759, -0.023396270349621773, -0.015826141461730003, -0.014873524196445942, -0.004858345724642277, -0.015762632712721825, -0.008427483960986137, 0.002761001233011484, -0.03200792521238327, 0.00388667662627995, 0.02166885696351528, -0.008656111545860767, 0.028857938945293427, 0.027765605598688126, -0.030813978984951973, 0.005645842291414738, -0.013247724622488022, 0.0012717434437945485, -0.03190631419420242, 0.0562933050096035, 0.042118366807699203, 0.012180794030427933, -0.027105124667286873, -0.0002079880068777129, 0.009253084659576416, 0.013819294981658459, -0.015978559851646423, -0.009068911895155907, -0.011723537929356098, -0.004826591815799475, -0.0012987343361601233, -0.0012606296222656965, -0.004204215481877327, -0.023447075858712196, 0.0741771012544632, 0.045522384345531464, 0.003626294666901231, -0.004512228537350893, 0.057309430092573166, -0.005179060157388449, 0.001617067027837038, 0.005252094008028507, -0.04130546748638153, 0.006252341903746128, -0.023624897003173828, -0.027740202844142914, -0.02613980695605278, 0.013476353138685226, 0.009214980527758598, -0.003997815307229757, 0.01869669370353222, -0.016613638028502464, -0.0198525357991457, -0.04331231117248535, 0.023383567109704018, 0.03444662317633629, 0.006271393969655037, -0.03383694961667061, 0.011215475387871265, -0.0006632594740949571, 0.04224538058042526, -0.0038199934642761946, 0.029188180342316628, 0.013209620490670204, -0.004832942970097065, -0.01653742790222168, -0.024882351979613304, 0.03498008847236633, -0.00971034076064825, 0.0013908206019550562, -0.025022068992257118, -0.010796324349939823, -0.03985748812556267, 0.02954382263123989, -0.015597512945532799, -0.022176919505000114, 0.0011606048792600632, 0.009703990072011948, -0.015572110190987587, -0.03172849118709564, 0.06315214931964874, -0.013438248075544834, 0.001332869753241539, 0.033481307327747345, 0.012460228055715561, -0.040721192955970764, 0.020500313490629196, 0.0011868018191307783, -0.003365912940353155, -0.015368885360658169, 0.015025942586362362, 0.025174487382173538, 0.03264300525188446, -0.043515536934137344, -0.016054769977927208, 0.03523411974310875, 0.010389874689280987, 0.016651742160320282, 0.024768037721514702, -0.013819294981658459, -0.02271038480103016, 0.0018274366157129407, -0.0010073923040181398, 0.028476892039179802, 0.033328887075185776, -0.03492928296327591, -0.03584379702806473, -0.011304386891424656, 0.004670998081564903, -0.020944869145751, -0.006674668751657009, 0.011234527453780174, 0.0058776456862688065, -0.005702999420464039, -0.047681648284196854, 0.028502296656370163, -0.004807539749890566, 0.032058730721473694, -0.007735248655080795, -0.03569137677550316, -0.008338572457432747, -0.023002522066235542, 0.05227961391210556, 0.023612195625901222, 0.023180343210697174, -0.00281498278491199, 0.0246537234634161, -0.02480614185333252, -0.02611440233886242, -0.019433382898569107, 0.017121700569987297, 0.0016353256069123745, -0.016727952286601067, 0.044125210493803024, -0.027918023988604546, -0.009265786036849022, 0.028832536190748215, -0.03604702278971672, 0.007322448305785656, -0.04133087024092674, -0.018214033916592598, -0.00604276591911912, 0.024755336344242096, 0.03048373945057392, 0.05339735001325607, -0.012041077017784119, -0.014111430384218693, -0.02875632606446743, -0.009430906735360622, 0.02066543512046337, 0.009843707084655762, -0.048621565103530884, -0.0008232197142206132, -0.046767134219408035, -0.010142194107174873, 0.032846227288246155, -0.03076317347586155, 0.0019528644625097513, -0.018671290948987007, -0.04453166201710701, 0.024183766916394234, 0.014733807183802128, -0.005086973775178194, 0.016092874109745026, 0.017401134595274925, -0.00722083542495966, -0.013311232440173626, 0.01353986095637083, -0.0050583952106535435, 0.0027244840748608112, -0.04318529739975929, 0.029315195977687836, 0.05431186035275459, -0.00851004384458065, 0.04128006473183632, -0.004607490263879299, 0.011653679423034191, -0.0069287000223994255, 0.028680117800831795, 0.014746508561074734, 0.013387441635131836, 0.028019636869430542, 0.010612151585519314, 0.01574993133544922, 0.0014170175418257713, 0.01507674902677536, 0.01369227934628725, 0.04425222799181938, -0.011539365164935589, 0.03830789774656296, -0.02149103581905365, -0.0020465385168790817, -0.021833978593349457, 0.03058535046875477, -0.012625348754227161, -0.008421133272349834, 0.02939140424132347, -0.041813530027866364, 0.016639040783047676, 0.025403115898370743, 0.016740653663873672, -0.0246537234634161, 0.00644286535680294, 0.008941896259784698, 0.02027168683707714, -0.02401864528656006, -0.0044836499728262424, 1.0605304851196706e-05, 0.006373006850481033, 0.03063615784049034, 9.68121639743913e-06, -0.005490248557180166, -0.014263849705457687, 0.012555490247905254, -0.002125923288986087, -0.021376721560955048, 0.04023853689432144, -0.0070049092173576355, 0.061323121190071106, -0.02561904303729534, 0.009469011798501015, 0.013501755893230438, 0.00830046832561493, 0.06472714245319366, -0.006788982544094324, -0.002148150932043791, -0.008668812923133373, 0.00604276591911912, -0.015203764662146568, 0.012047427706420422, 0.018645886331796646, 0.009551571682095528, 0.03058535046875477, 0.013984414748847485, -0.049383655190467834, 0.026774883270263672, 0.0025625391863286495, -0.017985405400395393, 0.014632194302976131, 0.03929862007498741, 0.011266281828284264, 0.012409421615302563, 0.0207289420068264, -0.01468300074338913, -0.041203852742910385, -0.011361543089151382, -0.026038194075226784, -0.006852490361779928, 0.011437753215432167, -0.01599126122891903, 0.004642419517040253, -0.042296186089515686, 0.003629470244050026, 0.013514457270503044, 0.017985405400395393, -0.035513557493686676, -0.007258940488100052, 0.015648318454623222, -0.007055715192109346, 0.013336636126041412, -0.07656498998403549, -0.027562379837036133, -0.021910186856985092, -0.01148855872452259, -0.030559947714209557, 0.007030312437564135, -0.0009478537831455469, 0.011964867822825909, -0.01515295822173357, 0.0016019840259104967, 0.005439442116767168, 0.019280964508652687, 0.006979505997151136, 0.004420142155140638, -0.010764569975435734, 0.0025974686723202467, 0.01369227934628725, 0.016791459172964096, -0.02234204113483429, 0.0035437345504760742, -0.02003035694360733, -0.006865192204713821, 0.004648770205676556, -0.00978654995560646, -0.024272676557302475, -0.00753837451338768, 0.0019608030561357737, 0.009284839034080505, -0.01217444334179163, 0.02443779818713665, -0.027943426743149757, -0.002329148119315505, 0.018048914149403572, -0.012460228055715561, 0.04648770019412041, 0.004185163415968418, -0.02908656746149063, -0.022875506430864334, -0.005849067587405443, -0.0018750674789771438, 0.017426537349820137, 0.011755291372537613, 0.03124583140015602, -0.019839832559227943, -0.051873162388801575, 0.008948247879743576, 0.02358679287135601, -0.026190612465143204, 0.03200792521238327, -0.04308368265628815, -0.0032579496037214994, 0.024425094947218895, 0.01005963422358036, 0.011304386891424656, 0.025885775685310364, 0.012117286212742329, 0.022850101813673973, -0.017401134595274925, -0.006681019440293312, 0.0344720296561718, 0.0021814925130456686, 0.024641022086143494, 0.008103594183921814, 0.015927754342556, 0.0025990563444793224, 0.012345913797616959, 0.007373254280537367, -0.005420389585196972, 0.0017591657815501094, -0.007868614979088306, -0.023485179990530014, -0.0045916130766272545, 0.016766056418418884, 0.003800941165536642, -0.014035221189260483, -0.005614088382571936, -0.03058535046875477, -0.046436894685029984, 0.03370993584394455, -0.0036326455883681774, -0.026673272252082825, -0.02583496831357479, 0.020474910736083984, -0.01987793855369091, 0.010091387666761875, -0.050196558237075806, -0.01625799387693405, -0.021198900416493416, 0.007595531642436981, -0.017439238727092743, 0.026647867634892464, 0.016067471355199814, 0.009024457074701786, 0.009291189722716808, 0.004366160370409489, 0.00552517781034112, 0.024450499564409256, 0.030051885172724724, 0.005852242931723595, -0.0035310331732034683, -0.028705520555377007, 0.026774883270263672, 0.005579159129410982, -0.042626429349184036, -0.005388636142015457, 0.0018988829106092453, 0.0013979652430862188, 0.028908746317029, 0.019560398533940315, 0.015089450404047966, -0.01869669370353222, -0.014314656145870686, 0.012612647376954556, 0.02085595764219761, 0.005490248557180166, -0.02589847706258297, -0.024717232212424278, 0.015356183052062988, 0.01778218150138855, -0.005315601825714111, -0.011037653312087059, 0.003527857596054673, -0.0236757043749094, 0.035157911479473114, -0.0054489681497216225, 0.03416718915104866, -0.040441758930683136, 0.0032023803796619177, -0.02559363842010498, 0.012091883458197117, 0.005426740739494562, 0.02081785351037979, -0.02626682072877884, -0.009767497889697552, 0.025707952678203583, -0.006788982544094324, -0.014200341887772083, -0.02231663651764393, 0.007366903591901064, 0.021160796284675598, 0.01644851826131344, -0.005950680002570152, -0.04186433553695679, 0.012409421615302563, -0.030839381739497185, -0.009754796512424946, -0.023599494248628616, 0.017820285633206367, -0.015813440084457397, 0.01280952151864767, -0.020474910736083984, -0.03830789774656296, 0.026368433609604836, -0.011507611721754074, -0.006112624891102314, 0.026241417974233627, 0.011958517134189606, -0.0338115468621254, -0.042296186089515686, -0.001284445053897798, -0.015813440084457397, 0.019903341308236122, -0.012803169898688793, -0.026622464880347252, -0.045700203627347946, -0.03200792521238327, -0.026647867634892464, 0.017832987010478973, 0.004801189061254263, -0.032236553728580475, 0.022088009864091873, -0.028553102165460587, -0.015178361907601357, -0.003947009332478046, -0.03978127986192703, -0.004147058818489313, 0.020754344761371613, -0.006700071971863508, 0.005344180390238762, -0.04503972455859184, 0.0006061024614609778, -0.008160751312971115, -0.035335734486579895, 0.0077733532525599, -0.004128006286919117, 0.004985361360013485, 0.0077733532525599, 0.02279929630458355, -0.017998106777668, 0.00400416599586606, -0.022418249398469925, 0.02443779818713665, -0.019865237176418304, -0.029899466782808304, -0.005931627470999956, 0.01826483942568302, 0.03246518224477768, -0.025403115898370743, -0.010421628132462502, -0.012930185534060001, -0.020195476710796356, -0.03149986267089844, -0.02273578941822052, 0.006376182194799185, 0.01784568838775158, 0.0222531296312809, 0.01086618285626173, -0.003731082659214735, -0.024869650602340698, 0.029645435512065887, -0.03216034546494484, 0.004474123939871788, -0.03498008847236633, -0.017591657117009163, -0.01199027057737112, 0.02452670782804489, -0.018506169319152832, -0.021021077409386635, 0.016816861927509308, 0.01884911209344864, -0.00117806950584054, 0.012669803574681282, 0.0008803767268545926, 0.01616908237338066, 0.005248918663710356, 0.011291684582829475, -0.021325916051864624, -0.022723086178302765, -0.019255561754107475, -0.008795828558504581, -0.013235023245215416, -0.020220879465341568, -0.003921606112271547, -0.004966309294104576, -0.008910142816603184, -0.009488063864409924, -0.004921853542327881, -0.04097522422671318, -0.02875632606446743, 0.010243806056678295, -0.007411358878016472, -0.015292675234377384, 0.03157607465982437, -0.010218403302133083, 0.035996213555336, -0.019992252811789513, 0.018226735293865204, 0.0051822355017066, 0.01614367961883545, 0.014340058900415897, -0.0077924057841300964, 0.02124970592558384, -0.008490991778671741, 0.052787672728300095, -0.03480226919054985, -0.006341252941638231, 0.02009386382997036, 0.02544122003018856, 0.00044614222133532166, -0.003826344385743141, 0.03724096715450287, -0.015915051102638245, 0.018061615526676178, 0.032998647540807724, -0.001530537731014192, 0.012091883458197117, -0.03246518224477768, -0.0036929778289049864, 0.0207289420068264, -0.01352715864777565, -0.013679577969014645, -0.01515295822173357, 0.018887216225266457, 0.013387441635131836, -0.012352265417575836, -0.014251148328185081, -0.01970011554658413, -0.01346365176141262, -0.01240307092666626, -0.0029483491089195013, 0.0069287000223994255, 0.002870552008971572, 0.024336185306310654, 0.0029150075279176235, -0.012746013700962067, 0.02511098049581051, 0.0062174126505851746, 0.03358291834592819, 0.03894297778606415, 0.012034726329147816, -0.022926311939954758, 0.02923898585140705, 0.04282965138554573, 0.013209620490670204, 0.02194829285144806, -0.01547049731016159, 0.012873029336333275, -0.04432843625545502, 0.01693117618560791, -0.024628320708870888, -0.023535987362265587, 0.003966061398386955, 0.011888657696545124, 0.015406989492475986, 0.005709350109100342, 0.04087361320853233, -0.007392306812107563, 0.010770920664072037, -0.017096295952796936, 0.027181332930922508, -0.002329148119315505, 0.013476353138685226, -0.01120277401059866, 0.0006231701700016856, -0.007405008189380169, -0.00023279573360923678, 0.036250244826078415, -0.0031388725619763136, -0.013870101422071457, 0.024933157488703728, -6.216816836968064e-05, -0.016766056418418884, 0.0009454722166992724, 0.0059411535039544106, -0.03233816474676132, 0.00808454118669033, 0.024755336344242096, 0.001971916761249304, -0.015826141461730003, 0.016677144914865494, -0.04920583590865135, 2.037954982370138e-05, -0.03061075508594513, 0.002983278362080455, -0.011177371256053448, -0.017909197136759758, 0.0025990563444793224, 0.010180298238992691, 0.004845644347369671, 5.919124305364676e-05, 0.022176919505000114, 0.009462660178542137, 0.016194486990571022, 0.0028197458013892174, -0.011120214127004147, -0.009361048229038715, 0.02720673754811287, -0.018671290948987007, -0.0004624160937964916, -0.01926826313138008, -0.0054807220585644245, 0.01817592978477478, -0.016130978241562843, 0.023154940456151962, -0.007957525551319122, -0.03434501215815544, -0.02626682072877884, 0.007214484736323357, 0.027003511786460876, 0.016575533896684647, -0.003292878856882453, 0.01023110467940569, 0.02611440233886242, 0.023993242532014847, 0.02672407776117325, -0.004502702038735151, -0.010015178471803665, 0.0032738265581429005, 0.0002574050158727914, 0.00481706578284502, 0.026190612465143204, -0.0006326963775791228, 0.008078190498054028, -0.021808573976159096, 0.015457795932888985, 0.015851544216275215, 0.01094239205121994, 0.013730384409427643, -0.02216421812772751, 0.00793212279677391, 0.004315354395657778, 0.006903296802192926, 0.015889648348093033, -0.013882802799344063, 0.002003670670092106, -0.03048373945057392, -0.002440286800265312, 0.05227961391210556, -0.0001410071417922154, 0.04204215481877327, 0.015495900996029377, -0.01522916741669178, 0.004820241127163172, 0.0183283481746912, 0.007646337617188692, 0.01101860124617815, 0.013831996358931065, 0.033481307327747345, -0.023485179990530014, -0.022900909185409546, -0.006423812825232744, 0.0016250055050477386, -0.0032468356657773256, -0.01068201009184122, -0.029289793223142624, -0.011405998840928078, 0.013908205553889275, -0.0008271889528259635, -0.0058331904001533985, 0.01817592978477478, 0.031017204746603966, -0.008554499596357346, 0.06330456584692001, -0.02875632606446743, 0.01256819162517786, -0.028324473649263382, -0.00636030500754714, -0.018366452306509018, 0.05304170399904251, -0.03571677953004837, 0.02611440233886242, 0.03320187330245972, -0.023447075858712196, -0.04221997782588005, -0.006401584949344397, -0.035945408046245575, -0.05103486031293869, -0.018252138048410416, -0.01460679154843092, -0.007512971293181181, -0.017972704023122787, -0.0026450995355844498, 0.0037755381781607866, 0.023167641833424568, 0.05553121119737625, 0.03924781456589699, 0.014822717756032944, 0.0071192230097949505, -0.009469011798501015, -0.002313271164894104, -0.010351769626140594, -0.03373533859848976, -0.011787045747041702, -0.019433382898569107, -0.027714800089597702, -0.005261620506644249, 0.031322043389081955, -0.0018941197777166963, 0.005252094008028507, 0.009570623748004436, 0.011723537929356098, 0.013438248075544834, -0.013552562333643436, 0.016829563304781914, 0.0005187792703509331, 0.01531807892024517, 0.019255561754107475, -0.024158362299203873, -0.002162440214306116, -0.022088009864091873, 0.025580937042832375, -0.003848572028800845, -0.0166898462921381, 0.038257092237472534, -0.015216466039419174, 0.015940455719828606, -0.004318529739975929, 0.014555985108017921, -0.00022664341668132693, -0.0008021827670745552, -0.03683451935648918, -0.021109988912940025, -0.012199846096336842, -0.006738176569342613, -0.012822222895920277, 0.046462297439575195, 0.010193000547587872, -0.012949238531291485, -0.005464845336973667, -0.01580073870718479, -0.04158490151166916, 0.015915051102638245, 0.00965318363159895, 0.027613187208771706, -0.033938564360141754, 0.01726141758263111, -0.04143248125910759, -0.004420142155140638, -0.043388523161411285, 0.016588235273957253, 0.013984414748847485, 0.022697683423757553, 0.01909044198691845, -0.024488603696227074, 0.004394738934934139, -0.018518870696425438, -0.015978559851646423, -0.01614367961883545, -0.017528150230646133, -0.0015130731044337153, -0.019077740609645844, -0.02459021657705307, 0.0031277586240321398, -0.04318529739975929, -0.022265831008553505, -0.001686131814494729, -0.007487568538635969, -0.026088999584317207, -0.011590171605348587, -0.002252938924357295, -0.03203332796692848, 0.010999549180269241, -0.005071097053587437, -0.024082154035568237], "index": 77}, {"title": "Gray wolf", "text": "The gray wolf or grey wolf (Canis lupus) also known as the timber wolf, or western wolf, is a canid native to the wilderness and remote areas of North America and Eurasia. It is the largest extant member of its family, with males averaging 43\u201345 kg (95\u201399 lb), and females 36\u201338.5 kg (79\u201385 lb). Like the red wolf, it is distinguished from other Canis species by its larger size and less pointed features, particularly on the ears and muzzle.", "vector": [-0.007719092071056366, -0.008680134080350399, -0.00616989191621542, 0.01832900010049343, 0.03856470808386803, 0.003325206460431218, 0.0006165086524561048, -0.030169041827321053, 0.006873374804854393, 0.02584819495677948, -0.06003054976463318, 0.0001552083413116634, 3.4147036785725504e-05, -0.03542786464095116, -0.016483798623085022, 0.05815459415316582, -0.029261818155646324, 0.011740093119442463, 0.024079877883195877, 0.021388959139585495, 0.02177337557077408, 0.004193988628685474, 0.0741770938038826, -0.01983591355383396, 0.028446853160858154, -0.0006419763085432351, -0.015714963898062706, -0.03521259129047394, -0.047237154096364975, -0.02111217752099037, 0.034812796860933304, 0.014138855040073395, 0.02944633737206459, 0.05630939453840256, -0.019067080691456795, -0.055110011249780655, 0.010679102502763271, 0.0029254129622131586, 0.03721155971288681, 0.019543757662177086, 0.0278010331094265, 0.057785555720329285, -0.029031166806817055, -0.04434633627533913, 0.014384881593286991, 0.008088132366538048, 0.0249102171510458, 0.0359506718814373, 0.04800598695874214, -0.026601651683449745, -0.004559184890240431, -0.048867080360651016, -0.01900557428598404, 0.021158307790756226, 0.009195253252983093, -0.04997420310974121, 0.05080454424023628, 0.08955377340316772, -0.0032617778051644564, -0.048159755766391754, 0.015684211626648903, -0.0347512923181057, -0.0533570721745491, 0.00979494396597147, 0.00257943756878376, 0.014923065900802612, 0.03850319981575012, -0.02540227212011814, 0.00041541055543348193, 0.004343911539763212, 0.005996904335916042, 0.003413622500374913, 0.004539964254945517, 0.014900000765919685, 0.046898867934942245, 0.0010494582820683718, -0.01599174551665783, 0.012393602170050144, 0.020927658304572105, 0.0036481167189776897, 0.013423839583992958, 0.003546246327459812, -0.004055598750710487, 0.040748193860054016, -0.01797533594071865, 0.016499174758791924, -0.014538648538291454, -0.07485366612672806, -0.03653498739004135, 0.025171620771288872, 0.03665800020098686, 0.008134262636303902, -0.0024679568596184254, 0.01969752460718155, 0.02352631650865078, -0.032414037734270096, -0.019743654876947403, -0.006166047882288694, -0.003603908699005842, -0.021404335275292397, 0.017683180049061775, 0.0030157507862895727, 0.029815377667546272, -0.028600620105862617, -0.026401754468679428, 0.010463829152286053, 0.043392982333898544, 0.004059442784637213, -0.029061920940876007, 0.01634540781378746, -0.002018188824877143, -0.0060968524776399136, -0.00863400474190712, -0.017191125079989433, 0.00510121276602149, 0.006054566707462072, -0.002517930930480361, -0.0730084627866745, 0.0038999097887426615, 0.028462229296565056, 0.006600438617169857, 0.014154232107102871, -0.013170124031603336, -0.01343921571969986, -0.008580186404287815, -0.022096285596489906, 0.01763704977929592, 0.04182456433773041, 0.018821053206920624, -0.03764210641384125, -0.025525284931063652, 0.02667853608727455, -0.03416697680950165, -0.019636016339063644, -0.02910805121064186, -0.007757533807307482, 0.019513003528118134, 0.0001658999390201643, 0.012332095764577389, 0.03339814394712448, 0.004785990808159113, -0.0023929954040795565, 0.041424769908189774, 0.05043550208210945, 0.010755985975265503, -0.01819060929119587, -0.03161444887518883, -0.0036154412664473057, -0.010333127342164516, 0.006512023042887449, -0.005454876460134983, -0.003392479382455349, 0.040871210396289825, 0.019036326557397842, -0.01937461458146572, 0.04646832123398781, -0.013223942369222641, -0.012447420507669449, -0.03896450251340866, 0.023587822914123535, -0.0033098298590630293, -0.010179360397160053, 0.012601187452673912, -0.02271135337650776, 0.0072731683030724525, 0.025125490501523018, 0.05609412118792534, 0.02875438705086708, -0.014646285213530064, 0.01281646080315113, -0.020235707983374596, -0.041332509368658066, -0.006250619422644377, -0.026340248063206673, -0.0004766769998241216, -0.0147769870236516, 0.002154656918719411, 0.06667327135801315, 0.019313106313347816, 0.08248049765825272, 0.03675026074051857, 0.008833901025354862, -0.02675541862845421, 0.034136224538087845, -0.018036842346191406, 0.0044515482150018215, -0.0059584625996649265, 0.03129153698682785, -0.026171104982495308, -0.0056047989055514336, 0.04314695671200752, -0.01008710078895092, 0.007519195321947336, -0.04105572775006294, 0.05920020863413811, 0.027170589193701744, 0.020804645493626595, 0.054464191198349, 0.043054696172475815, 0.05984602868556976, 0.04588400572538376, -0.0521884448826313, 0.0021565789356827736, 0.014346440322697163, -0.019328484311699867, -0.013062487356364727, 0.01147100143134594, 0.01436950545758009, -0.04453085735440254, 0.04296243563294411, -0.0019643704872578382, -0.015484314411878586, -0.01935923658311367, 0.017206503078341484, 0.03896450251340866, 0.004759081639349461, 0.02815469726920128, 0.0046706655994057655, 0.02400299347937107, 0.040994223207235336, 0.027416616678237915, -0.008126573637127876, 0.04566873237490654, 0.014861558564007282, 0.012862591072916985, 0.021358205005526543, 0.0243412796407938, 0.056862954050302505, 0.014008153229951859, -0.03558163344860077, -0.02051248773932457, 0.023956863209605217, 0.0742385983467102, 0.045022912323474884, -0.04394654557108879, 0.03462827950716019, -0.007822884246706963, -0.03733457252383232, -0.02618648111820221, -0.03687327355146408, -0.028446853160858154, 0.013346956111490726, -0.01888255961239338, -0.05274200439453125, 0.01124804001301527, -0.024418164044618607, -0.016622187569737434, -0.07202436029911041, -0.057570282369852066, -0.043392982333898544, -0.009087616577744484, 0.027539629489183426, -0.004059442784637213, -0.020558618009090424, -0.02306501567363739, -0.04474613070487976, 0.030461197718977928, 0.0347512923181057, -0.01280877273529768, 0.005424122791737318, -0.03973333537578583, -0.010064035654067993, -0.03272157162427902, 0.004736016504466534, -0.07368503510951996, -0.04508441686630249, 0.03533560410141945, -0.014530960470438004, -0.005497162230312824, -0.06796491146087646, -0.0440080501139164, 0.032291021198034286, -0.031583696603775024, 0.019851291552186012, -0.019266976043581963, 0.03410547226667404, 0.0018749936716631055, 0.013892828486859798, 0.08094283193349838, 0.03407471626996994, -0.0022642158437520266, -0.011025077663362026, -0.010855934582650661, 0.007642208598554134, 0.08155789971351624, 0.002369930502027273, -0.03687327355146408, -0.03330588340759277, 0.042378123849630356, 0.004128637723624706, -0.011517131701111794, 0.030322808772325516, 0.015445872209966183, -0.03887224197387695, -0.0021142931655049324, 0.0014848103746771812, 0.017683180049061775, 0.0027793345507234335, -0.027893293648958206, 0.015368989668786526, 0.004955134354531765, 0.029400207102298737, -0.025909701362252235, -0.03155294060707092, 0.03693477809429169, 0.018959444016218185, -0.028785141184926033, 0.023341797292232513, -0.04228586331009865, 0.005358772352337837, 0.004697574768215418, 0.015015325509011745, -0.010809804312884808, -0.016299277544021606, 0.012531992048025131, -0.0196821466088295, 0.00817270390689373, 0.033551909029483795, -0.03198349103331566, 0.02467956766486168, 0.01832900010049343, 0.017191125079989433, -0.0272474717348814, 0.03902600705623627, -0.008211146108806133, -0.0011561339488252997, -0.010832869447767735, -0.02271135337650776, -0.03281382843852043, -0.056032612919807434, -0.03352115675806999, 0.0007265480235219002, -0.02886202372610569, 0.008510990999639034, 0.07780598849058151, -0.00016914345906116068, -0.024833334609866142, 0.010371568612754345, 0.009241383522748947, 0.018405882641673088, 0.03026130050420761, -0.009864138439297676, -0.011286481283605099, -0.008434107527136803, 0.005943085998296738, -0.00864169280976057, 0.025340763852000237, 0.04250113666057587, -0.01726800948381424, 0.011148091405630112, 0.0008817563648335636, 0.016837462782859802, -0.04462311789393425, -0.0035923763643950224, -0.001383900991640985, -0.02852373756468296, -0.00021575400023721159, -0.04588400572538376, 0.023849226534366608, 0.008311093784868717, -0.004889783449470997, 0.02944633737206459, -0.008726264350116253, -0.04668359458446503, -0.030169041827321053, -0.03144530579447746, 0.018036842346191406, -0.010333127342164516, 0.01692972145974636, -0.00582776078954339, -0.015330547466874123, 0.0039287409745156765, -0.013285449706017971, -0.005416434723883867, -0.007161687593907118, -0.024156760424375534, 0.05015872046351433, 0.0038672343362122774, 0.036104440689086914, 0.01891331374645233, -0.01771393232047558, 0.06224479153752327, 0.027662642300128937, 0.04010237380862236, 0.0359506718814373, 0.009064551442861557, -0.027416616678237915, 0.0001782733597792685, 0.006758049596101046, -0.0202664602547884, 0.02783178724348545, 0.002466034609824419, 0.04419257119297981, 0.012877967208623886, 0.013400774449110031, -0.07202436029911041, -0.03416697680950165, 0.004263184033334255, 0.022988133132457733, 0.021281322464346886, -0.0025275414809584618, -0.013985088095068932, -0.04157853499054909, 0.03754984587430954, 0.05037399381399155, 0.023095769807696342, 0.00990258064121008, 0.030538082122802734, 0.032967597246170044, -0.02630949579179287, 0.002621723571792245, 0.07343900948762894, -0.05148111656308174, -0.012270588427782059, -0.0008913667988963425, -0.02689380943775177, -0.0486825592815876, 0.049082353711128235, -0.007980495691299438, -0.012001496739685535, -0.024279773235321045, 0.010463829152286053, 0.0045553408563137054, -0.027877915650606155, -0.035858411341905594, 0.03545861691236496, -0.023510940372943878, 0.08020474761724472, 0.03985634818673134, -0.0144925182685256, -0.03259855508804321, -0.012324406765401363, -0.02841610088944435, -0.01971290074288845, -0.032291021198034286, 0.0076268319971859455, 0.019051702693104744, 0.006481269374489784, -0.008203457109630108, -0.03001527488231659, -0.00437466474249959, 0.0869089812040329, 0.009487410075962543, 0.016499174758791924, -0.032291021198034286, -0.01983591355383396, -0.030184417963027954, 0.029231064021587372, 0.06276759505271912, 0.0284007228910923, -0.006431295536458492, 0.008264964446425438, 0.031921982765197754, -0.04760619252920151, -0.01657605916261673, -0.0029561661649495363, 0.0004613003402482718, -0.016376161947846413, -0.021127555519342422, 0.002319956198334694, 0.012086068280041218, -0.02072776108980179, 0.03219876438379288, -0.03235252946615219, -0.05031248927116394, 0.045268937945365906, 0.006950258277356625, 0.026263365522027016, -0.023849226534366608, 0.0336134172976017, -0.0336134172976017, -0.006458204705268145, -0.03126078471541405, -0.002252683276310563, -0.009956398978829384, -0.014338752254843712, 0.037396080791950226, 0.022111661732196808, -0.04831352084875107, 0.014930753968656063, 0.018974820151925087, 0.012478173710405827, -0.024079877883195877, -0.02235768921673298, 0.0007289506029337645, -0.006638880353420973, 0.03003065101802349, 0.037611354142427444, -0.0029119583778083324, -0.022173168137669563, -0.011724716983735561, 0.0440388061106205, 0.007792131509631872, -0.04034840315580368, -0.02852373756468296, -0.002125825732946396, 0.044469352811574936, -0.03896450251340866, 0.02235768921673298, 0.04314695671200752, -0.023510940372943878, -0.029246440157294273, 0.020943034440279007, -0.0029446338303387165, 0.005839293356984854, 0.007211661897599697, -0.018390506505966187, 0.01957450993359089, -0.02920030988752842, -0.019389990717172623, -0.019313106313347816, 0.025202374905347824, -0.016084004193544388, -0.03327513113617897, -0.010056346654891968, 0.027401238679885864, -0.014354128390550613, -0.0056047989055514336, 0.009548916481435299, 0.057662539184093475, -0.016437668353319168, -0.0023449433501809835, -0.026986069977283478, 0.027185965329408646, -0.007684494834393263, 0.0671653300523758, 0.04348524287343025, 0.009372085332870483, -0.01645304448902607, -0.034474510699510574, -0.032414037734270096, -0.026801548898220062, 0.020773891359567642, 0.0002866308786906302, 0.017683180049061775, -0.02980000153183937, 0.010556088760495186, -0.049543656408786774, -0.008034314028918743, 0.04656057804822922, 0.016391538083553314, -0.02038947492837906, -0.03816491365432739, 0.0038518577348440886, 0.0012656927574425936, -0.02583281882107258, -0.011440248228609562, -0.03607368469238281, -0.06209102272987366, -0.018452012911438942, 0.017560165375471115, -0.01948225125670433, 0.02269597537815571, -0.00515887513756752, 0.049666669219732285, 0.02944633737206459, -0.005239602643996477, 0.032875336706638336, 0.001452135038562119, -0.01705273613333702, 0.04714489355683327, 0.01048689428716898, 0.006385165266692638, 0.021988648921251297, -0.015053767710924149, 0.038779981434345245, -0.006711919791996479, 0.015676522627472878, -0.029261818155646324, 0.0049666669219732285, -0.012086068280041218, -0.007542260456830263, -0.005389525555074215, -0.013985088095068932, 0.02398761734366417, 0.010125542059540749, -0.02038947492837906, -0.028462229296565056, -0.008295717649161816, 0.006196801085025072, -0.0029734650161117315, -0.04613003134727478, -2.961962536573992e-06, 0.015453561209142208, 0.015960991382598877, -0.020435605198144913, -0.02203477919101715, -0.039241280406713486, 0.011724716983735561, -0.00816501583904028, -0.016160888597369194, 0.025125490501523018, 0.005320330616086721, -0.007596078794449568, -0.026155728846788406, -0.01888255961239338, 0.009495098143815994, -0.021158307790756226, -0.023249536752700806, -0.008657069876790047, -0.011148091405630112, 0.010663725435733795, 0.01078673917800188, -0.008826212957501411, -0.014746233820915222, -0.0544949434697628, 0.0405636765062809, 0.01077905111014843, -0.03256780281662941, -0.009356708265841007, -0.028785141184926033, -0.056155625730752945, 0.03428998962044716, -0.005485629662871361, 0.03312136232852936, -0.006285217124968767, -0.01855964958667755, 0.012001496739685535, -0.026048092171549797, -0.03742683306336403, 0.013093240559101105, -0.00915681105107069, -0.015222910791635513, 0.00245065800845623, 0.014730856753885746, 0.024495046585798264, 0.00034092977875843644, -0.037396080791950226, 0.0024833334609866142, 0.015015325509011745, 0.055479053407907486, -0.044684626162052155, -0.02710908278822899, -0.00863400474190712, -0.00834184791892767, 0.01889793761074543, 0.024064499884843826, -0.02294200286269188, -0.009425903670489788, 0.036104440689086914, 0.004962822888046503, 0.051542624831199646, -0.004778302740305662, -0.03385944291949272, -0.0036346621345728636, -0.010240866802632809, 0.03410547226667404, 0.010348504409193993, 0.010171672329306602, 0.047483179718256, 0.005658617243170738, -0.006508178543299437, 0.004109417088329792, -0.014523272402584553, 0.02178875170648098, 0.0254945307970047, 0.021404335275292397, -0.054064396768808365, 0.026601651683449745, -0.007519195321947336, -0.012416667304933071, -0.01646842248737812, -0.04250113666057587, -0.04843653365969658, 0.005316486116498709, -0.005639396607875824, -0.03198349103331566, -0.034966565668582916, 0.014292621985077858, -0.037857379764318466, -0.02444891817867756, -0.02829308621585369, 0.026140352711081505, -0.039579566568136215, 0.009610423818230629, -0.03548937290906906, -0.026586275547742844, -0.028800517320632935, -0.013293137773871422, 0.03908751532435417, -0.051880910992622375, -0.006969478912651539, 0.02435665763914585, -0.013370021246373653, -0.0579393208026886, 0.011132714338600636, -0.032168008387088776, -0.010625284165143967, -0.022511456161737442, 0.0068618422374129295, 0.008795459754765034, 0.02191176638007164, -0.010210113599896431, 0.015345924533903599, 0.01902095042169094, 0.042593397200107574, 0.007184752728790045, 0.019097832962870598, -0.020450981333851814, 0.025479154661297798, -0.004520743153989315, -0.03176821395754814, 0.008303405717015266, 0.0009937178110703826, -0.0266631580889225, -0.018375130370259285, -0.02675541862845421, -0.016898969188332558, 0.01222445908933878, 0.029630858451128006, 0.007007920648902655, 0.02480258047580719, -0.00962579995393753, 0.02226542867720127, 0.026263365522027016, 0.01321625430136919, 0.0011205753544345498, -0.017913829535245895, -0.02340330369770527, 0.034351497888565063, 0.0324755422770977, 0.023803096264600754, 0.014969195239245892, 0.024725697934627533, -0.04302394390106201, -0.01002559345215559, 0.01240897923707962, -0.02015882357954979, 0.030753355473279953, 0.003878766903653741, -0.03126078471541405, -0.02689380943775177, 0.05264974385499954, 0.0038480134680867195, 0.014507895335555077, 0.016299277544021606, 0.008795459754765034, 0.019866667687892914, 0.011125026270747185, -0.03468978404998779, 0.008426419459283352, 0.04047141596674919, 0.047021880745887756, 0.007838261313736439, -0.027908669784665108, 0.024387409910559654, 0.03468978404998779, 9.129902173299342e-05, -0.05022022873163223, 0.03422848507761955, -0.04326996952295303, -0.017560165375471115, 0.012601187452673912, -0.011978431604802608, -0.0324447900056839, -0.004563028924167156, -0.0030887899920344353, -0.028908153995871544, -0.016084004193544388, 0.02976924739778042, -0.0382879264652729, 0.0336441695690155, -0.013739061541855335, 0.02040485106408596, 0.01396971195936203, 0.045268937945365906, -0.049912694841623306, -0.0032367906533181667, 0.002967698732391, -0.005743189249187708, 0.04416181892156601, 0.020943034440279007, 0.0010898220352828503, 0.022465325891971588, 0.05080454424023628, -0.054187413305044174, 0.017652425915002823, 0.005608642939478159, -0.035981424152851105, -0.028462229296565056, -0.03868772089481354, -0.029246440157294273, 0.02191176638007164, 0.009179876185953617, -0.01206300314515829, -0.004889783449470997, -0.01546893734484911, 0.04207058995962143, 0.005608642939478159, 0.03791888803243637, 0.0055702016688883305, -0.022219298407435417, 0.001698161824606359, 0.025479154661297798, -0.01280877273529768, 0.03290608897805214, 0.011463313363492489, 0.03896450251340866, 0.021757999435067177, -0.00553560396656394, -0.0029273349791765213, -0.017006605863571167, -0.015476626344025135, 0.014930753968656063, 0.017360268160700798, -0.018021466210484505, -0.02235768921673298, -0.0021892543882131577, -0.008018936961889267, -0.0029388675466179848, 0.02086615189909935, 0.016729824244976044, -0.006219866219907999, 0.005120433401316404, -0.004193988628685474, 0.015661146491765976, 0.03272157162427902, 0.018867183476686478, 0.011924613267183304, -0.01785232312977314, -0.014800052158534527, 0.008449484594166279, 0.008188080973923206, -0.0033847910817712545, -0.038779981434345245, 0.02654014527797699, 0.011078896000981331, 0.01281646080315113, 0.007196285296231508, -0.02793942391872406, 0.00816501583904028, 0.014477142132818699, -0.02690918557345867, -0.004428483080118895, 0.013477657921612263, 0.001260887598618865, 0.018851807340979576, 0.013254696503281593, 0.019989680498838425, -0.0017289151437580585, -0.016068628057837486, 0.016376161947846413, 0.003033049637451768, 0.03456677123904228, -0.010648349300026894, 0.01314705889672041, -0.0027947111520916224, -0.004094040486961603, -0.008534056134521961, 0.01430799812078476, -0.009771878831088543, -0.0029061920940876007, -0.021465841680765152, 0.00886465422809124, 0.017790816724300385, -0.010794427245855331, -0.023434055969119072, 0.009010733105242252, -0.016406914219260216, -0.004328534938395023, -0.0010494582820683718, -0.012908720411360264, -0.0035231811925768852, -0.002904270077124238, -0.0009706527926027775, 0.02735511027276516, 0.039794839918613434, 0.011978431604802608, 0.05612487345933914, -0.0072731683030724525, -0.0007577819051221013, 0.017175748944282532, 0.0202664602547884, -0.012877967208623886, -0.01891331374645233, 0.022526832297444344, -0.028262333944439888, -0.019282354041934013, 0.010755985975265503, 0.018390506505966187, -0.016022497788071632, -0.015146027319133282, 0.06704231351613998, 0.03490505740046501, -0.007061738986521959, -0.03653498739004135, -0.02145046554505825, -0.014146543107926846, 0.0011465235147625208, -0.05744726583361626, -0.03570464625954628, 0.021542726084589958, -0.035304851830005646, 0.02052786387503147, -0.005262667778879404, 0.06107616424560547, 0.03490505740046501, 0.016253147274255753, -0.019728276878595352, 0.0018077206332236528, 0.01725263148546219, -0.028462229296565056, 0.042470384389162064, -0.01728338561952114, -0.01321625430136919, -0.008587874472141266, 0.03290608897805214, 0.019174717366695404, -0.009433591738343239, 0.02261909283697605, -0.008326470851898193, 0.006823400501161814, -0.020804645493626595, -0.04656057804822922, 0.01762167178094387, -0.04222435504198074, 0.0130394222214818, -0.012309030629694462, -0.02065087854862213, 0.04554571956396103, 0.006569685414433479, 0.0022469169925898314, -0.015515067614614964, 0.038656968623399734, 0.0034366874024271965, -0.03512033075094223, -2.2794723918195814e-05, -0.0283853467553854, 0.022173168137669563, -0.004812899976968765, -0.021865636110305786, 0.001357952831313014, -0.013954334892332554, -0.0393950492143631, -0.012101445347070694, -0.026524769142270088, 0.025586791336536407, 0.028585243970155716, -0.03653498739004135, -0.021296698600053787, 0.005581733770668507, -0.034966565668582916, 0.03871847316622734, -0.027985552325844765, -0.03419772908091545, 0.0335826650261879, -0.04382353276014328, 0.002994607901200652, 0.04674509912729263, 0.013962022960186005, 0.05172714218497276, -0.022111661732196808, 0.030860992148518562, -0.0301229115575552, -0.003438609419390559, 0.0016750968061387539, 0.006727296393364668, 0.06289061158895493, 0.014761610887944698, 0.023710837587714195, -0.03226026892662048, 0.04825201258063316, -0.012032249942421913, 0.017221879214048386, -0.028123943135142326, 0.013254696503281593, -0.04563798010349274, -0.011455624364316463, -0.0005871968460269272, 0.0475446879863739, 0.00020518254314083606, 0.025217751041054726, 0.011409495025873184, 0.015084520913660526, 0.016391538083553314, 0.01117884460836649, -0.01060221903026104, 0.004267028067260981, 0.034935809671878815, 0.003944117575883865, -0.021527348086237907, 0.011271104216575623, -0.019743654876947403, 0.022757483646273613, 0.05830836296081543, 0.0007371194660663605, 0.007834416814148426, 0.042039837688207626, -0.01570727676153183, 0.007015609182417393, -0.028262333944439888, 0.021527348086237907, 0.0440388061106205, 0.02191176638007164, -0.021235192194581032, -0.002452580025419593, 0.005946930032223463, 0.016837462782859802, -0.03232177719473839, -0.011747781187295914, -0.017821568995714188, -0.034013211727142334, -0.02308039367198944, -0.029415583238005638, 0.013715996406972408, 0.01636078581213951, -0.03838018700480461, 0.01263962872326374, -0.03149143606424332, 0.02421826682984829, 0.029707740992307663, -0.03816491365432739, 0.0022373066749423742, -0.06974861025810242, 0.009664242155849934, -0.019190093502402306, -0.00788823515176773, 0.02269597537815571, 0.009433591738343239, 0.04732941463589668, -0.0034405316691845655, -0.013646801002323627, -0.015161404386162758, -0.006339035462588072, -0.018605779856443405, 0.008787770755589008, 0.01995892822742462, -0.008487925864756107, 0.04812899976968765, 0.0032848427072167397, 0.03834943473339081, -0.024418164044618607, 0.028785141184926033, 0.03438225015997887, -0.012255212292075157, 0.00017863375251181424, 0.015837978571653366, -0.00961811188608408, 0.0312761627137661, 0.0020431759767234325, -0.0032560115214437246, 0.005285732913762331, 0.025909701362252235, 0.01320856623351574, -0.022926626726984978, -0.00914912298321724, -0.003967182710766792, -0.03173746168613434, -0.026171104982495308, 0.01299329288303852, 0.013008669018745422, 0.01725263148546219, 0.030415067449212074, -0.010502270422875881, 0.02989226207137108, 0.00852636806666851, -0.018482767045497894, 0.011855418793857098, 0.021388959139585495, 0.00980263203382492, 0.019559133797883987, 0.0018932534148916602, 0.012278277426958084, 0.03315211832523346, 0.008380289189517498, -0.027385862544178963, 0.021542726084589958, 0.013546853326261044, 0.01691434532403946, -0.04010237380862236, 0.018698040395975113, -0.004578405525535345, -0.0033944016322493553, 0.02492559514939785, -0.023710837587714195, 0.020327968522906303, 0.007830573245882988, -0.0020239551085978746, -0.01460015494376421, -0.020128071308135986, 0.029999898746609688, -0.014361816458404064, 0.028662126511335373, -0.01460015494376421, -0.0278164092451334, 0.009495098143815994, -0.023495562374591827, 0.05815459415316582, -0.032383281737565994, -0.01600712165236473, -0.011394117958843708, 0.017437152564525604, -0.0029965301509946585, 0.008695511147379875, 0.043762024492025375, -0.03638121858239174, -0.01636078581213951, 0.03850319981575012, -0.00669654319062829, 0.0034366874024271965, -0.0005131966318003833, -0.03616594523191452, 0.00991026870906353, 0.00817270390689373, -0.012801083736121655, -0.011301858350634575, -0.007822884246706963, 0.03964107483625412, -0.02804706059396267, -0.018621155992150307, -0.015315170399844646, 0.03638121858239174, 0.001308939652517438, 0.00768065033480525, -0.0074077146127820015, 0.003759597660973668, 0.022865120321512222, -0.041424769908189774, 0.015545820817351341, 0.00984107330441475, -0.040994223207235336, 0.019559133797883987, 0.023387925699353218, -0.01280877273529768, -0.005097368732094765, -0.01725263148546219, -0.015207533724606037, -0.04127100110054016, -0.026986069977283478, 0.06246006488800049, -0.01809834875166416, -0.009233694523572922, -0.01299329288303852, 0.02514086849987507, 0.005781630985438824, -0.0003241115191485733, -0.034597523510456085, -0.040625181049108505, -0.02733973227441311, -0.043977297842502594, -0.006196801085025072, 0.01565345749258995, -0.02095841057598591, -0.015522755682468414, 0.019882043823599815, -0.010256243869662285, -0.026001961901783943, -0.006512023042887449, 0.009556605480611324, 0.03951806202530861, -0.034843552857637405, 0.011570950038731098, 0.017652425915002823, -0.000978341093286872, 0.006442828103899956, 0.014331063255667686, -0.04508441686630249, 0.011255728080868721, -0.0015934081748127937, 0.02540227212011814, 0.020143447443842888, -0.04696037247776985, -0.010802116245031357, 0.00215850118547678, -0.0038518577348440886, -0.027201343327760696, -0.0009908346692100167, 0.0016529927961528301, -0.016837462782859802, 0.0004629821632988751, -0.005474097095429897, -0.009202941320836544, 0.012939474545419216, 0.026724666357040405, -0.012262900359928608, -0.01912858709692955, -0.010140919126570225, 0.009848762303590775, 0.016253147274255753, -0.03281382843852043, -0.0020527865272015333, -0.029738495126366615, 0.008780082687735558, -0.0039518061093986034, -0.010986636392772198, 0.0015222911024466157, 0.01368524320423603, 0.015322859399020672, -0.007219349965453148, 0.018636533990502357, -0.009702683426439762, -0.007772910408675671, -0.004459236282855272, 0.011309546418488026, 0.0020047342404723167, 0.021050671115517616, 0.023695459589362144, 0.00457456149160862, 0.002398761687800288, 0.03764210641384125, -0.012877967208623886, -0.007073271553963423, -0.027170589193701744, 0.018528897315263748, -0.027631890028715134, -0.013108617626130581, -0.03139917552471161, -0.02272672951221466, -0.021819505840539932, 0.017790816724300385, 0.03278307616710663, -0.006842621602118015, 0.021834881976246834, 0.005704747512936592, -0.017529413104057312, 0.003298297291621566, -0.01771393232047558, 0.026724666357040405, 0.05440268665552139, 0.016637565568089485, -0.01597636751830578, 0.002735126530751586, 0.008257275447249413, -0.008141950704157352, -0.01216295175254345, 0.01694509945809841, -0.014523272402584553, -0.044315584003925323, 0.02747812308371067, -0.032875336706638336, -0.01694509945809841, 0.004501522518694401, -0.003905676072463393, 0.053941383957862854, 0.035181839019060135, 0.015315170399844646, 2.8455862775444984e-05, -0.016253147274255753, -0.009779566898941994, -0.017529413104057312, 0.03324437513947487, -0.03779587522149086, -0.012078380212187767, 0.03149143606424332, 6.012521043885499e-05, -0.0007476909668184817, 0.03548937290906906, -0.031583696603775024, -0.01390051655471325, -0.014592466875910759, -0.007496130187064409, 0.014538648538291454, -0.013562229461967945, -0.0039594946429133415, -0.06233705207705498, 0.0012435887474566698, -0.008403354324400425, -0.006750361528247595, 0.01234747190028429, -0.013823633082211018, -0.008772394619882107, 0.012416667304933071, 0.015038390643894672, -0.023726213723421097, -0.006104541011154652, 0.003990247845649719, 0.00611222954466939, 0.014538648538291454, 0.013785191811621189, -0.026232611387968063, 0.009133746847510338, 0.023710837587714195, -0.003357881912961602, -0.013915893621742725, 0.00991026870906353, 0.02283436618745327, 0.0023353327997028828, -0.005320330616086721, 0.0013877451419830322, 0.05120433494448662, 0.015668833628296852, -0.017467904835939407, -0.017929205670952797, 0.0055702016688883305, 0.013370021246373653, 0.0196821466088295, 0.018159857019782066, -0.023141900077462196, 0.03502807021141052, -0.00567783834412694, -0.01636078581213951, 0.002106604864820838, -0.0008024703711271286, 0.0014886546414345503, -0.04671434685587883, -0.026986069977283478, -0.00023965993023011833, -0.0023276444990187883, -0.022203922271728516, 0.0062890611588954926, 0.04164004325866699, 0.02015882357954979, -0.045607224106788635, -0.012378225103020668, -0.009894891642034054, -0.009464344941079617, -0.04105572775006294, -0.005058926995843649, 0.004163235425949097, 0.02225005254149437, 0.002615957288071513, -0.021004540845751762, 0.004924381151795387, 0.007400026079267263, 0.030691849067807198, 0.023372549563646317, 0.018821053206920624, -0.024864086881279945, -0.025340763852000237, 0.039333540946245193, -0.023264912888407707, 0.016975851729512215, -0.04545345902442932, -0.0076268319971859455, 0.009487410075962543, 0.004778302740305662, -0.03302910178899765, -0.007799819577485323, -0.017544789239764214, -0.004336223006248474, -0.015476626344025135, 0.014915376901626587, 0.013646801002323627, 0.04373127222061157, -0.013431527651846409, -0.0046937307342886925, -0.01049458235502243, -0.014984572306275368, -0.021465841680765152, 0.010210113599896431, 0.007607611361891031, -0.0035385580267757177, -0.00012853941007051617, 0.006419762969017029, -0.006857998203486204, 0.007461532950401306, -0.023372549563646317, -0.01875954680144787, 0.024710319936275482, -0.03189123049378395, -0.027078328654170036, 0.0007347168866544962, -0.005028173327445984, -0.006915660575032234, 0.02678617276251316, 0.02411063015460968, -0.0022738261613994837, -0.03186047449707985, 0.006550464779138565, -0.0020470202434808016, -0.014108101837337017, -0.000948068278376013, -0.04034840315580368, -0.021634984761476517, 0.036227453500032425, 0.011570950038731098, -0.014615532010793686, 0.011324922554194927, 0.017667802050709724, -0.009010733105242252, -0.001334887812845409, 0.004605314694344997, -0.0018413570942357183, -0.008095820434391499, 0.0004903718363493681, -0.006669634021818638, -0.008541744202375412, -0.01875954680144787, -0.040379155427217484, 0.0579700730741024, 0.017314139753580093, -0.009748813696205616, -0.008426419459283352, 0.03149143606424332, 0.024541176855564117, -0.006273684557527304, -0.0031522188801318407, 0.0028177760541439056, 0.039364293217659, 0.012439732439815998, -0.01563808135688305, -0.009764189831912518, 0.01829824596643448, 0.011009701527655125, -0.02560216747224331, -0.014792364090681076, 0.0075307278893888, 0.04262414947152138, -0.027062952518463135, 0.051757898181676865, 0.005481785628944635, 0.03152218833565712, -0.007561481092125177, 0.0428701788187027, 0.010448452085256577, 0.013346956111490726, -0.003215647768229246, 0.010456141084432602, -0.04569948464632034, -0.009710371494293213, -0.010271620936691761, 0.012209082022309303, -0.006727296393364668, -0.02886202372610569, 0.015945615246891975, 0.02641713246703148, 0.015945615246891975, -0.006066099274903536, -0.0260788444429636, 0.00915681105107069, -0.012124510481953621, -0.004416950512677431, -0.03352115675806999, -0.00045529380440711975, 0.0005328980041667819, 0.00834953598678112, -0.009118369780480862, 0.00443232711404562, 0.001973981037735939, 0.011117338202893734, -0.024618061259388924, -0.024310527369379997, -0.016868215054273605, 0.03336739167571068, -0.011678586713969707, -0.024833334609866142, -0.003159907180815935, 0.0031752840150147676, -0.02038947492837906, -0.029507843777537346, 0.006646568886935711, -0.016606811434030533, 0.02966161072254181, 0.009541228413581848, -0.010263931937515736, 0.0074077146127820015, -0.03152218833565712, -0.0225883387029171, 0.014061971567571163, 0.030507327988743782, 0.011901548132300377, 0.002064318861812353, 0.013446904718875885, -0.04157853499054909, 0.04656057804822922, 0.024864086881279945, -0.011978431604802608, -0.019728276878595352, -0.016391538083553314, -0.007438467815518379, 0.004578405525535345, -0.016207018867135048, -0.009272136725485325, 0.009072239510715008, -0.02827771008014679, 0.0030311276204884052, 0.010102476924657822, 0.009472033008933067, -0.03930278867483139, -0.002285358728840947, 0.009602734819054604, -0.002485255477949977, 0.02632487192749977, -0.012301341630518436, -0.05052776262164116, -0.00979494396597147, 0.00904148630797863, -0.04360825568437576, -0.028769763186573982, 0.006761894095689058, 0.027877915650606155, -0.014615532010793686, 0.0237569659948349, 0.01682208478450775, -0.009518163278698921, 0.04268565773963928, -0.013293137773871422, 0.043392982333898544, -0.009102992713451385, 0.0027293602470308542, -0.023203406482934952, -0.003457830287516117, 0.01772930845618248, 0.0179445818066597, 0.007127089891582727, 0.006419762969017029, 0.006454360205680132, 0.020927658304572105, -0.00834953598678112, 0.04360825568437576, 0.004109417088329792, -0.003707701340317726, 0.011586326174438, 0.016729824244976044, 0.01623777113854885, 0.017913829535245895, -0.01240897923707962, 0.008072755299508572, -0.0179445818066597, -0.025786688551306725, 0.004278560634702444, 0.0047821467742323875, 0.024310527369379997, -0.0015828367322683334, -0.03118390217423439, -0.024295151233673096, 0.03419772908091545, -0.014338752254843712, -0.0010754064423963428, -0.0042593395337462425, -0.013077864423394203, 0.050497010350227356, 0.005374148953706026, -0.013293137773871422, 0.007015609182417393, -0.014746233820915222, 0.025340763852000237, -0.00834953598678112, 0.008141950704157352, 0.0057970075868070126, 0.017544789239764214, -0.026386378332972527, 0.0030580367892980576, 0.0417015478014946, 0.014138855040073395, -0.04124024882912636], "index": 78}, {"title": "CUC Broadcasting", "text": "CUC Broadcasting was a Canadian media company, active from 1968 to 1995. Active primarily as a cable television distributor, the company also had some holdings in broadcast media and publishing.The company was founded in 1968 by chairman Geoffrey Conway, with shareholders including Jerry Grafstein, Michael Koerner and Ken Lefolii.", "vector": [0.03923020139336586, -0.0008029687451198697, -0.03432251885533333, -0.020537244156003, 0.018380364403128624, 0.006474546156823635, -0.051264964044094086, 0.023960119113326073, -0.05707915872335434, 0.012910017743706703, -0.026789069175720215, -0.026398329064249992, -0.044325437396764755, -0.01742696203291416, -0.009049516171216965, -0.01351175643503666, -0.021959533914923668, 0.02449152246117592, -0.003225550753995776, 0.05057726055383682, 0.04013671353459358, -0.02777373045682907, -0.024100784212350845, -0.01627037301659584, 0.02320989966392517, -0.00029647324117831886, -0.024319598451256752, 0.00419653719291091, 0.039105162024497986, -0.011948799714446068, 0.020756058394908905, 0.031806159764528275, -0.0024323505349457264, -0.024757225066423416, -0.0205216147005558, -0.024194560945034027, -0.016708001494407654, -0.009338662959635258, -0.04942067340016365, -0.07914809882640839, 0.0006520457682199776, 0.0020455189514905214, 0.013277312740683556, 0.03913642093539238, -0.001182962441816926, -0.0016577104106545448, -0.0507022999227047, -0.025632482022047043, 0.011339247226715088, 0.03335348516702652, 0.01194098498672247, -0.05189014598727226, 0.03713583946228027, 0.012714648619294167, -0.0021881386637687683, 0.028477061539888382, -0.006576138082891703, 0.06620682030916214, 0.006736340932548046, 0.01429323386400938, -0.023678787052631378, 0.021475017070770264, 0.04516943544149399, 0.004720127675682306, 0.006611304823309183, 0.04804527387022972, -0.032259415835142136, 0.009174552746117115, -0.019333768635988235, -0.02133435197174549, -0.07358397543430328, -0.03441629558801651, 0.03463510796427727, 0.0197713952511549, 0.03213438019156456, 0.033634815365076065, 0.04904556646943092, -0.0018374503124505281, 0.020646650344133377, 0.043575219810009, 0.046107206493616104, -0.022584717720746994, -0.004911589901894331, 0.008275852538645267, 0.02300671488046646, -0.007353708613663912, -0.061611734330654144, -0.08696287870407104, 0.006064270157366991, 0.041480857878923416, 0.04223107546567917, -0.017973996698856354, 0.02327241748571396, -0.06058018282055855, 0.018161550164222717, 0.012402057647705078, 0.02097487263381481, -0.013449237681925297, -0.0339786671102047, 0.019505692645907402, 0.007420134264975786, -0.021771980449557304, 0.032572004944086075, -0.037229616194963455, 0.03916768357157707, -0.01475430652499199, -0.0053609395399689674, 0.022944197058677673, 0.031040308997035027, 0.0633935034275055, 0.01170654222369194, 0.018224069848656654, 0.04238737002015114, 0.01616096682846546, -0.03613554686307907, 0.028805281966924667, -0.011159507557749748, 0.04413788393139839, -0.046513576060533524, 0.0288834311068058, -0.008775998838245869, -0.01662985421717167, -0.04395032674074173, -0.033165931701660156, -0.0060564554296433926, -0.014777750708162785, -0.032415710389614105, 0.003499068086966872, 0.030884014442563057, 0.01013577077537775, -0.06458134949207306, 0.021725090220570564, -0.018864881247282028, 0.0006510689272545278, -0.0258512943983078, -0.026851586997509003, 0.009182367473840714, 0.03754220902919769, 0.02782062068581581, -0.03375985473394394, 0.05285917967557907, 0.04470054805278778, -0.013214794918894768, 0.0207873173058033, -0.03197808191180229, -0.022053312510252, 0.007900743745267391, 0.056797828525304794, -0.004055871162563562, -0.030149424448609352, 0.014090050011873245, -0.002317082602530718, 0.01602030172944069, -0.010424917563796043, 0.00396014004945755, 0.028101952746510506, 0.013081943616271019, -0.0011214211117476225, 0.007713188882917166, 0.0033310502767562866, 0.0031063754577189684, 0.017770811915397644, -0.02930542826652527, -0.015137230977416039, 0.03757346794009209, -0.03416622057557106, 0.026585884392261505, -0.029743056744337082, -0.03050890378654003, 0.017145629972219467, 0.04185596480965614, 0.015324785374104977, -0.03654191642999649, -0.02914913184940815, -0.04279373958706856, -0.0001073311286745593, -0.040543083101511, -0.0036006602458655834, -0.007623318582773209, 0.03172801062464714, -0.018224069848656654, 0.007150524295866489, 0.03163423389196396, -0.01864606700837612, -0.008064853958785534, 0.03263452649116516, 0.03082149662077427, 0.021381240338087082, -0.04282499849796295, -0.031602974981069565, 0.010542139410972595, 0.02038094773888588, 0.037073321640491486, -0.0017466035205870867, 0.019193101674318314, 0.0031728011090308428, -0.012151984497904778, 0.03149356693029404, -0.039761606603860855, -0.02422582171857357, 0.023147381842136383, -0.01013577077537775, 0.0009719633962959051, -0.00026863309904001653, 0.029117872938513756, 0.015582673251628876, 0.025226112455129623, -0.0215375367552042, -0.01784895919263363, 0.05110866576433182, 0.006552693899720907, -0.007959354668855667, 0.0496707484126091, 0.021615684032440186, 0.0012044530594721437, -0.011347061954438686, 0.008955738507211208, 0.004079315811395645, -0.022647235542535782, 0.0056461794301867485, 0.09990415722131729, 0.011597135104238987, 0.006935617886483669, -0.03982412442564964, -0.02944609522819519, -0.030180683359503746, -0.02924291044473648, -0.016192225739359856, -0.022115830332040787, 0.003163032466545701, -0.034947700798511505, 0.049139343202114105, -0.037635985761880875, 0.011206395924091339, 0.01930250972509384, -0.02417893148958683, -0.0276174359023571, -0.02417893148958683, -0.07570959627628326, 0.0016411039978265762, -0.040480565279722214, 0.06751970946788788, -0.017192518338561058, 0.0021627405658364296, 0.015020009130239487, -0.009033886715769768, 0.03229067474603653, -0.04066811874508858, -0.014957490377128124, -0.06126788258552551, 0.00889322068542242, 0.017020592465996742, 0.046107206493616104, -0.037729762494564056, -0.01575459912419319, -0.028367655351758003, 0.029274169355630875, -0.00864314753562212, 0.0035068828146904707, 0.025929443538188934, 0.005845455918461084, 0.016536075621843338, 0.03150919824838638, -0.022850418463349342, 0.01733318343758583, -0.017973996698856354, -0.014394826255738735, -0.02260034717619419, -0.06114284694194794, 0.0071036359295248985, 0.014863713644444942, 0.016911186277866364, 0.030040018260478973, 6.996670708758757e-05, -0.05820448696613312, 0.028648987412452698, 0.00572823453694582, 0.03488518297672272, -0.05495353788137436, 0.004384092055261135, 0.0653940886259079, -0.049858301877975464, -0.040418047457933426, -0.029696166515350342, 0.007412319537252188, -0.00017668731743469834, -0.006388583220541477, 0.02255345694720745, -0.0003118586027994752, -0.013714940287172794, -0.02099050208926201, 0.0006789090693928301, 0.044106625020504, 0.024444634094834328, -0.007412319537252188, 0.005607105325907469, 0.005548494402319193, -0.010839100927114487, -0.04516943544149399, 0.010120141319930553, 0.021553166210651398, 0.009112034924328327, -0.008783813565969467, -0.05698538199067116, -0.03569791838526726, -0.016754889860749245, -0.004294222220778465, 0.04251240938901901, 0.032915856689214706, -0.0319468230009079, -0.006349509581923485, -0.02752365916967392, -0.020443467423319817, -0.021912645548582077, -0.009158923290669918, 0.0017895848723128438, 0.0597987025976181, 0.009033886715769768, 0.004513035994023085, -0.017161259427666664, 0.07183346897363663, 0.029117872938513756, -0.10734383016824722, 0.020302800461649895, 0.0344788134098053, -0.0200214684009552, 0.028977207839488983, 0.03857375681400299, 0.011831577867269516, 0.04548202455043793, 0.007599874399602413, 0.015442007221281528, 0.005020996555685997, 0.045231953263282776, 0.03369733691215515, -0.014308864250779152, -0.013089758343994617, 0.005802474915981293, -0.022240865975618362, -0.009112034924328327, 0.030649570748209953, -0.0029285892378538847, -0.010370214469730854, 0.013707125559449196, -0.01825532875955105, -0.00594314094632864, 0.035354070365428925, 0.008447778411209583, -0.004387999419122934, -0.05210895836353302, 0.0008899081731215119, 0.023381823673844337, -0.017051851376891136, 0.050764817744493484, 0.017567627131938934, 0.026070108637213707, 0.008744739927351475, -0.049545712769031525, -0.04557580128312111, 0.03529154881834984, 0.07127080112695694, -0.04288751631975174, -0.005337495356798172, 0.04798275604844093, -0.004868608433753252, 0.05739175155758858, -0.0008024803246371448, -0.006732433568686247, 0.019599471241235733, -0.0010598796652629972, 0.004372369963675737, 0.0020044913981109858, -0.029836833477020264, 0.01687992736697197, 0.037792280316352844, 0.04223107546567917, -0.04229359328746796, 0.0010227594757452607, -0.05432835593819618, 0.006474546156823635, -0.05110866576433182, 0.034447554498910904, 0.0010628101881593466, 0.010503065772354603, -0.03313467279076576, 0.01692681573331356, -0.016801778227090836, -0.02777373045682907, -0.02169383130967617, -0.01312883198261261, -0.014097864739596844, 0.019958950579166412, 0.008400889113545418, 0.017614515498280525, -5.220029561314732e-05, 0.003710067132487893, 0.006025196053087711, 0.005626642145216465, 0.02144375815987587, -0.01931813918054104, -0.020240282639861107, 0.03279082104563713, 0.014238530769944191, 0.028445802628993988, -0.024100784212350845, 0.021178055554628372, -0.027539288625121117, -0.028477061539888382, -0.017145629972219467, 0.007892929017543793, 0.01744259148836136, -0.09183930605649948, -0.03263452649116516, 0.002918820595368743, -0.0024323505349457264, 0.02869587577879429, 0.028555208817124367, -0.008674406446516514, -0.014949675649404526, 0.009385552257299423, 0.02514796517789364, 0.01966198906302452, 0.0017905617132782936, -0.03654191642999649, 0.058016933500766754, -0.015879634767770767, 0.023288046941161156, -0.039105162024497986, -0.010714064352214336, 0.015246637165546417, 0.030290091410279274, -0.014144753105938435, -0.014629269950091839, 0.054265838116407394, 0.008877591229975224, 0.011370506137609482, -0.03754220902919769, -0.01188628189265728, -0.030852755531668663, 0.017411332577466965, 0.05013963580131531, 0.010854730382561684, -0.046857427805662155, -0.021990792825818062, 0.004821719601750374, -0.022615976631641388, -0.05564124137163162, -0.05295295640826225, -0.01972450688481331, -0.0007399620953947306, -0.019943321123719215, -0.017458220943808556, -0.01244113128632307, -0.05379695072770119, -0.06520653516054153, -0.007138802204281092, 0.016582965850830078, -0.020443467423319817, 0.016801778227090836, 0.009362107142806053, -0.0037413262762129307, 0.010409288108348846, 9.273947216570377e-05, -0.025257371366024017, -0.05457843095064163, 0.01825532875955105, -0.06508149206638336, -0.04229359328746796, -0.02707040123641491, -0.013136646710336208, 0.02255345694720745, 0.008783813565969467, -0.023053603246808052, 0.010846915654838085, 0.026242034509778023, -0.041387081146240234, 0.05954863131046295, -0.061924323439598083, 0.017348812893033028, 0.04076189547777176, 0.006099436432123184, 0.010174844413995743, -0.030837126076221466, 0.04785771667957306, -0.04132455959916115, -0.039355237036943436, -0.06298713386058807, 0.007080191280692816, -0.036573175340890884, -0.02099050208926201, 0.03204060345888138, 0.064893938601017, 0.013933754526078701, 0.021521907299757004, 0.026382699608802795, -4.856764280702919e-05, -0.001554164569824934, 0.018474141135811806, -0.013675866648554802, -0.05767308175563812, -0.011401765048503876, 0.047420091927051544, 0.04641979932785034, 0.01683303713798523, -0.01803651452064514, -0.04585713520646095, 0.03610428795218468, 0.07889802753925323, -0.02300671488046646, 0.011870652437210083, 0.0048764231614768505, 0.08596259355545044, 0.036323100328445435, 0.011995689012110233, -0.006212750915437937, -0.03463510796427727, 0.013832162134349346, -0.02818010002374649, -0.0010081067448481917, -0.04951445013284683, 0.03457259014248848, 0.013292942196130753, 0.037948574870824814, 0.0273673627525568, 0.006962969899177551, -0.010159214958548546, 0.02513233572244644, 0.02336619421839714, 0.06445631384849548, -0.007166154216974974, -0.009080775082111359, -0.013832162134349346, 0.031556084752082825, -0.026898475363850594, -0.013621163554489613, 0.027132919058203697, 0.017520738765597343, 0.012738092802464962, -0.011737801134586334, -0.015957782045006752, -0.03107156977057457, 0.018208440393209457, 0.03354103863239288, -0.01429323386400938, -0.009940401650965214, 0.026038849726319313, 0.00821333471685648, 0.014730862341821194, 0.0023913229815661907, 0.004317666403949261, 0.002365924883633852, 0.017958367243409157, 0.0019146213307976723, -0.02200642228126526, 0.026382699608802795, 0.016004670411348343, 0.025960702449083328, -0.025929443538188934, -0.04038678854703903, 0.009916956536471844, 0.00933084823191166, 0.004794368054717779, 0.01474649179726839, 0.011690911836922169, -0.03741716966032982, -0.003774539101868868, 0.005802474915981293, 0.022022051736712456, -0.03713583946228027, -0.009487143717706203, -0.00396014004945755, 0.043106332421302795, 0.019021175801753998, -0.04445047304034233, 0.005231995601207018, -0.025226112455129623, 0.029868092387914658, 0.006415935233235359, -0.020896723493933678, 0.002467517042532563, 0.00876818411052227, -0.010596842505037785, 0.032665785402059555, 0.0038526870775967836, -0.004716220311820507, -0.009901327081024647, -0.011276728473603725, 0.00032187128090299666, -0.02017776481807232, -0.005204644054174423, -0.05282791703939438, -0.07164590805768967, 0.004239518661051989, -0.013300756923854351, 0.0053726620972156525, -0.01652044616639614, -0.045794617384672165, 0.0339786671102047, -0.021099908277392387, -0.00897136889398098, 0.014238530769944191, 0.05839204415678978, -0.01961510069668293, -0.06483142077922821, 0.002444072626531124, 0.01866169646382332, 0.016864297911524773, -0.02782062068581581, 0.006494082976132631, -0.03025883249938488, -0.03579169511795044, -0.003958186600357294, 0.03416622057557106, -0.0025026835501194, 0.007978891022503376, -0.023803822696208954, -0.011034470982849598, 0.022240865975618362, 0.040011677891016006, 0.01748947985470295, 0.031040308997035027, -0.038042351603507996, -0.01728629507124424, -0.025991961359977722, 0.055891312658786774, 0.015442007221281528, -0.03929271921515465, -0.0053140511736273766, -0.007478745188564062, -0.005997844506055117, 0.017301924526691437, 0.005575845949351788, 0.02691410481929779, 0.0032783006317913532, 0.025788776576519012, -0.051264964044094086, 0.010206104256212711, 0.0004625373403541744, 0.00031649862648919225, 0.001915598171763122, -0.055172353982925415, 0.010112326592206955, -0.01956821046769619, 0.02539803832769394, -0.018427252769470215, -0.03222815692424774, 0.006079899612814188, 0.001412521698512137, -0.0024655633606016636, 0.02655462548136711, -0.04641979932785034, -0.012034762650728226, 0.00182768190279603, -0.008611888624727726, -0.034041184931993484, -0.012675574980676174, 0.002789876889437437, 0.021771980449557304, -0.02352249063551426, -0.027304844930768013, -0.025413667783141136, -0.03732339292764664, 0.0041770003736019135, 0.003143495647236705, -0.015449821949005127, -0.010510880500078201, -0.0013627024600282311, -0.009854438714683056, -0.02347560226917267, -0.013113202527165413, 0.017020592465996742, 0.04982704296708107, 0.030852755531668663, -0.001197615172713995, -0.030696459114551544, 0.013730569742619991, -0.02803943306207657, 0.005739956628531218, -0.015801487490534782, -0.023710045963525772, 0.005239810794591904, -0.010362399742007256, 0.0552348718047142, -0.0011790550779551268, 0.004743571858853102, 0.00731072761118412, -0.00965125486254692, -0.02575751766562462, 0.0035166514571756124, -0.012151984497904778, 0.01090161968022585, -0.0023874156177043915, 0.03036823868751526, -1.9216424334445037e-05, -0.030524535104632378, 0.030852755531668663, -0.012683389708399773, 0.010503065772354603, -0.017598886042833328, 0.00697078462690115, -0.02985246293246746, 0.021412499248981476, -0.0028719319961965084, -0.014519862830638885, -0.010682805441319942, -0.004091037902981043, -0.0011350968852639198, -0.016645483672618866, -0.040480565279722214, -0.02397574856877327, -0.007279468234628439, -0.011104803532361984, -0.03247822821140289, -0.04395032674074173, 0.005630549509078264, -0.02038094773888588, 0.008705666288733482, -0.024616559967398643, -0.01437138207256794, -0.00858844444155693, 0.038292426615953445, 0.008572814986109734, 0.018208440393209457, 0.01176124531775713, 0.005583661142736673, 0.0010764860780909657, 0.033322226256132126, -0.02528863027691841, 0.010354585014283657, 0.004259055480360985, 0.01512941624969244, -0.0022154904436320066, -0.011425209231674671, 0.024710336700081825, 0.021318722516298294, 0.021349981427192688, -0.01784895919263363, 0.01678614877164364, 0.03400992602109909, 0.0037569559644907713, 0.016848668456077576, 0.006075992248952389, 0.010659361258149147, -0.00882288720458746, -0.014934046193957329, -0.019536951556801796, 0.0009358199895359576, 0.012347353622317314, -0.0014437807258218527, 0.018739843741059303, 0.01617659628391266, -0.00019634637283161283, -0.0076975589618086815, 0.019505692645907402, -0.011307988315820694, 0.021068649366497993, -0.0063456022180616856, -0.0038097056094557047, -0.05217147618532181, -8.950366463977844e-05, 0.020771687850356102, 0.014988750219345093, 0.01936502754688263, 0.007205227855592966, 0.010026363655924797, 0.0022174441255629063, 0.008752554655075073, 0.03269704431295395, 0.0026511643081903458, 0.005888437386602163, -0.011651838198304176, -0.013871235772967339, -0.03183741867542267, -0.03350977972149849, 0.005103052128106356, 0.00882288720458746, 0.02031842991709709, -0.05057726055383682, 0.0044661471620202065, -0.03610428795218468, -0.01972450688481331, 0.005571938585489988, 0.02539803832769394, -0.026945363730192184, 0.0030966070480644703, -0.002184231299906969, -0.0016508724074810743, 0.02327241748571396, -0.0027801082469522953, -0.013754013925790787, -0.04438795521855354, -0.013996272347867489, 0.0011526801390573382, -0.01107354462146759, -0.029883721843361855, 0.005310143809765577, 0.01972450688481331, -0.02442900463938713, -0.015176304616034031, -0.008455593138933182, 0.037792280316352844, -0.021209314465522766, -0.010745324194431305, -0.010479621589183807, 0.03782353922724724, 0.009487143717706203, -0.029946239665150642, -0.02928979881107807, -0.04535698890686035, 0.032415710389614105, 0.021381240338087082, -0.05432835593819618, 0.008658776991069317, 0.0028269970789551735, -0.016098449006676674, -0.008205519989132881, -0.02210020087659359, -0.037635985761880875, -0.0023385731037706137, 0.04035552963614464, -0.008940109051764011, -0.023022344335913658, 0.012167613953351974, -0.012488019652664661, -0.004219981841742992, 0.04216855764389038, 0.028977207839488983, -0.02767995372414589, 0.008346186019480228, 0.03329096734523773, 0.005857178475707769, -0.0029832925647497177, -0.036979544907808304, -0.00714661693200469, 0.01180813368409872, 0.006326064933091402, 0.009119849652051926, -0.027554918080568314, 0.04516943544149399, 0.030024388805031776, -0.006583952810615301, -0.05164007097482681, 0.014410455711185932, -0.047263793647289276, -0.04238737002015114, 0.0025788776110857725, -0.005009274464100599, -0.03407244384288788, -0.010776583105325699, -0.03604177013039589, -0.0026374885346740484, -0.0062674544751644135, 0.010862545110285282, 0.005614920053631067, -0.020396579056978226, -0.015629561617970467, -0.006767600309103727, 0.003540095640346408, 0.002633581170812249, -0.02306923270225525, 0.020865464583039284, 0.008627518080174923, -0.028352025896310806, -0.018536660820245743, -0.009557477198541164, 0.023178640753030777, 0.006689452566206455, 0.016848668456077576, 0.03149356693029404, 0.01941191591322422, -0.03451007232069969, 0.0021920460276305676, 0.02306923270225525, 0.001353910774923861, -0.034791406244039536, -0.02569499984383583, -0.022381532937288284, 0.03516651317477226, 0.028805281966924667, 0.028617728501558304, 0.0030184590723365545, -0.020162135362625122, -0.010510880500078201, 0.020646650344133377, 0.022522198036313057, 0.0015463497256860137, 0.00024115925771184266, 0.016754889860749245, -0.0005548494518734515, 0.017755182459950447, 0.009862253442406654, 0.041887227445840836, -0.012081651017069817, 0.0016831083921715617, -0.03111845813691616, 0.03476014360785484, -0.002977431518957019, 0.02164694294333458, 0.0010979766957461834, -0.06908266246318817, -0.027804991230368614, -0.0005216366262175143, 0.0068144891411066055, 0.017677035182714462, 0.03522903099656105, -0.0025964609812945127, -0.021068649366497993, 0.0030575329437851906, -0.008377444930374622, 0.019536951556801796, -0.021459387615323067, 0.022084571421146393, -0.008322741836309433, 0.02230338379740715, -0.006740248296409845, 0.014215086586773396, -0.017598886042833328, -0.00858844444155693, -0.03025883249938488, -0.02194390445947647, 0.042699962854385376, 0.01738007180392742, 0.002828950760886073, -0.04988956078886986, 0.03247822821140289, 0.0009529148228466511, 0.02397574856877327, 0.003723743138834834, 0.04826408624649048, 0.019193101674318314, -0.01008888240903616, -0.010151400230824947, 0.005103052128106356, 0.02331930585205555, 0.010526509955525398, -0.011925355531275272, -0.03923020139336586, 0.0102686220780015, 0.05457843095064163, -0.0012923694448545575, -0.009690328501164913, -0.0050131818279623985, -0.00988569762557745, -0.005067885387688875, 0.002688284730538726, 0.054672207683324814, -0.030790235847234726, -0.028445802628993988, -0.028414543718099594, -0.005693067796528339, -0.03694828227162361, 0.0131835350766778, -0.03161860257387161, -0.025663740932941437, -0.02899283729493618, 0.014176012948155403, -0.02266286499798298, -0.018083402886986732, -0.0027508027851581573, -0.0456070601940155, 0.0030653479043394327, -0.010526509955525398, 0.01330857165157795, -0.0028777930419892073, 0.005767308175563812, 0.02803943306207657, 0.017551997676491737, -0.02270975336432457, -0.024804115295410156, 0.05082733556628227, -0.03329096734523773, 0.03161860257387161, -0.051077406853437424, 0.05754804611206055, 0.01697370409965515, 0.015668636187911034, 0.014683973044157028, -0.008072668686509132, 0.008885405957698822, 0.01487934309989214, 0.03182178735733032, 0.01606719009578228, 0.006439379416406155, 0.046107206493616104, -0.003524466184899211, 0.051421258598566055, -0.01683303713798523, -0.00889322068542242, -0.0010061530629172921, 0.014683973044157028, -0.00996384583413601, -0.020459096878767014, 0.015426377765834332, -0.034385036677122116, 0.004376277327537537, 0.031196605414152145, 0.0037725854199379683, -0.001958579523488879, -0.015567043796181679, -0.003680761903524399, -0.0339474081993103, 0.00261013675481081, 0.007209135219454765, 0.041480857878923416, -0.005794660188257694, 0.005540679674595594, -0.034228742122650146, 0.040730636566877365, -0.004223889205604792, 0.04094945266842842, -0.00815863162279129, -0.038292426615953445, 0.022162718698382378, -0.00406759325414896, 0.02803943306207657, -0.041137006133794785, -0.03300963342189789, 0.01905243657529354, 0.06858251988887787, 0.005696975160390139, 0.003254856215789914, -0.00538438418880105, -0.007396690081804991, -0.04988956078886986, -0.022725382819771767, 0.03626058250665665, -0.04557580128312111, -0.015692079439759254, 0.00513040367513895, -0.023553749546408653, 0.04019923135638237, -0.011894096620380878, -0.025569962337613106, 0.016082819551229477, 0.008299297653138638, 0.027914397418498993, 0.003952325321733952, -0.016145337373018265, -0.001206406857818365, 0.002838719170540571, -0.026195146143436432, 0.007064561825245619, -0.00826022308319807, -0.009557477198541164, -0.020459096878767014, -0.009698143228888512, -0.04798275604844093, 0.0022994992323219776, 0.012050392106175423, -0.0047240350395441055, 0.009846623986959457, -0.025585591793060303, 0.014105679467320442, 0.025101076811552048, -0.008705666288733482, -0.03000875934958458, -0.06273706257343292, 0.019177472218871117, 0.014301048591732979, 0.01294909231364727, -0.0007145640556700528, -0.0023190362844616175, -0.002276055049151182, -0.01449641864746809, -0.007045025005936623, -0.00894792377948761, 0.02058413252234459, -0.035197772085666656, 0.013019424863159657, -0.007326357066631317, -0.0009524264023639262, -0.010885990224778652, 0.0047552939504384995, 0.007111450657248497, -0.0030575329437851906, -0.0049194046296179295, -0.01703622192144394, -0.011323617771267891, -0.0021725089754909277, 0.0021920460276305676, -0.020912352949380875, -0.007045025005936623, -0.0044075362384319305, -0.043418921530246735, -0.010979766957461834, -0.0034189666621387005, 0.04141834005713463, 0.042606186121702194, 0.002805506344884634, 0.011339247226715088, -0.002041611587628722, 0.015020009130239487, -0.0013627024600282311, -0.027836250141263008, 0.013410164043307304, -0.010323325172066689, -0.04085567593574524, 0.04826408624649048, -0.0380110926926136, -0.03232193365693092, 0.005822011735290289, 0.028805281966924667, -0.019068066030740738, -0.010596842505037785, -0.004927219357341528, 0.0030966070480644703, -0.0026023220270872116, -0.016895556822419167, -0.02803943306207657, 0.0029500797390937805, 0.0006574184517376125, -0.010299880988895893, -0.026335811242461205, -0.0046302578411996365, 0.022850418463349342, -0.027898767963051796, 0.0005484999273903668, -0.01176124531775713, 0.015074712224304676, -0.03654191642999649, 0.010096697136759758, -0.015676449984312057, -0.021756349131464958, -0.019583841785788536, -0.030805867165327072, 0.015965597704052925, -0.012769351713359356, 0.02732047438621521, -0.010417102836072445, 0.001020805793814361, -0.011839393526315689, 0.018208440393209457, 0.008299297653138638, -0.004513035994023085, 0.004348925780504942, -0.009416811168193817, -0.0044505177065730095, -0.0263514406979084, -0.005720419809222221, -0.019802654162049294, 0.004583369009196758, -0.030071277171373367, 0.012128540314733982, 0.03979286551475525, 0.0023815545719116926, -0.0018169365357607603, -0.004309851676225662, 0.028101952746510506, -0.012628685683012009, 0.019677618518471718, -0.017817700281739235, -0.004997552372515202, 0.006544879171997309, 0.0024362578988075256, 0.02655462548136711, 0.012128540314733982, 0.013199164532124996, -0.00624791719019413, 0.008580629713833332, 0.005204644054174423, 0.00722085777670145, 0.03116534650325775, 0.0261013675481081, 0.007189598400145769, -0.013472681865096092, -0.028570838272571564, 0.02352249063551426, -0.02478848583996296, -0.011487727984786034, 0.020365318283438683, 0.01891176961362362, 0.004415351431816816, -0.001217152108438313, -0.019583841785788536, -0.006251824554055929, -0.03863627836108208, -0.007463115733116865, 0.031149717047810555, 0.021256204694509506, 0.01961510069668293, 0.00021441804710775614, 9.365526784677058e-05, 0.002531989011913538, -0.05782938003540039, 0.03898012638092041, 0.0015062990132719278, 0.02185012772679329, 0.0018247513798996806, 0.016739260405302048, 0.006455008871853352, 0.03669821098446846, -0.01803651452064514, -0.0007941771182231605, 0.01866169646382332, -0.03676072880625725, 0.01738007180392742, -0.020099615678191185, -0.014308864250779152, 0.005978307221084833, 0.048639196902513504, -0.042543668299913406, 0.02352249063551426, -0.013519571162760258, 0.014668343588709831, -0.02417893148958683, 0.016911186277866364, -0.015410748310387135, -0.010299880988895893, -0.02185012772679329, -0.00017668731743469834, 0.012034762650728226, 0.009995104745030403, -0.01262087095528841, 0.008697851561009884, 0.0334472618997097, -0.014129123650491238, 0.02114679664373398, -0.02488226257264614, -0.0023874156177043915, 0.007646763231605291, 0.008650962263345718, -0.005501605570316315, 0.019443174824118614, -0.012097280472517014, -0.001388100441545248, -0.00271758995950222, -0.021412499248981476, -0.017520738765597343, 0.011620579287409782, 0.010878174565732479, 0.02033405937254429, -0.0009714749758131802, 0.014160382561385632, 0.04144959896802902, 0.0100107342004776, -0.06008003652095795, -0.004802182782441378, 0.024288339540362358, 0.002508544595912099, -0.03882383182644844, -0.01830221712589264, -0.012589612044394016, -0.0024499339051544666, 0.009377737529575825, 0.003200152888894081, -0.004579461645334959, 0.011972243897616863, 0.011300173588097095, 0.009252700954675674, -0.0022447959054261446, -0.02453841269016266, -0.005923604127019644, -0.033322226256132126, 0.011487727984786034, -0.022975455969572067, -0.00034629247966222465, -0.0506710410118103, 0.010167029686272144, -0.007236487232148647, -0.020115245133638382, 0.026898475363850594, -0.004430980887264013, 0.017661405727267265, -0.01803651452064514, 0.02038094773888588, -0.03610428795218468, -0.023491231724619865, -0.03744842857122421, 0.021006131544709206, -0.017145629972219467, 0.03622932359576225, 0.01789584755897522, 0.013902495615184307, -0.013167905621230602, 0.025585591793060303, -0.006115065887570381, -0.021834498271346092, -0.007338079158216715, 0.009252700954675674, 0.0200214684009552, -0.0007277514669112861, 0.023991378024220467, -0.026992253959178925, 0.00815863162279129, 0.009721587412059307, 0.0017348813125863671, 0.015942152589559555, -0.012894388288259506, -0.023491231724619865, 0.007607689127326012, 0.031087199226021767, -0.028305135667324066, -0.010487436316907406, -0.011644023470580578, 0.03111845813691616, -7.497305341530591e-05, -0.005458624567836523, 0.0016938537592068315, -0.0017329276306554675, 0.015301341190934181, 0.0066777304746210575, 0.04182470589876175, -0.0007165177376009524, -0.027382992208003998, 0.006681637838482857, 0.05510983616113663, -0.020396579056978226, 0.004204351920634508, 0.05104614794254303, 0.03357229754328728, 0.04345018044114113, 0.01631726324558258, -0.022319015115499496, -0.008799443021416664, -0.02447589300572872, -0.01574678346514702, 0.0105186952278018, -0.011433024890720844, 0.009244886226952076, -0.0021490647923201323, 0.04029301181435585, -0.005571938585489988, -0.029993129894137383, -0.00509523693472147, 0.02503855712711811, -0.010784397833049297, -0.020912352949380875, 0.007537356112152338, -0.006599582266062498, -0.02772684209048748, 0.012183243408799171, -0.0023014529142528772, -0.015848375856876373, 0.0005020996904931962, -0.01652044616639614, -0.03107156977057457, 0.027851879596710205, -0.032165639102458954, -0.003962093964219093, 0.012714648619294167, 0.0042551481164991856, 0.0003211386501789093, -0.00015214401355478913, 0.04413788393139839, -0.012613056227564812, 0.013269498012959957, -0.005228088237345219, 7.546148117398843e-05, 0.015926523134112358, 0.03385363146662712, -0.025663740932941437, -0.00761550385504961, 0.019708877429366112, -0.02910224348306656, -0.0002392055612290278, -0.015035638585686684, -0.014590196311473846, -0.01692681573331356, 0.013066313229501247, 0.0035107904113829136, -0.014082235284149647, -0.011550245806574821, -0.010120141319930553, -0.022272124886512756, -0.014762121252715588, 0.02306923270225525, -0.022115830332040787, -0.013191349804401398, 0.024913521483540535, 0.009135479107499123, 0.019193101674318314, 0.019990209490060806, -0.0008376468322239816, 0.016286002472043037, -0.009362107142806053, -0.00650189770385623, 0.00603301078081131, -0.02874276414513588, 0.057454269379377365, -0.03554162383079529, 0.018317846581339836, -0.04532572999596596, -0.007064561825245619, 0.0062088435515761375, 0.03797983378171921, 0.0010032225400209427, 0.014019716531038284, -0.013496126979589462, -0.016457928344607353, 0.05629768222570419, -0.013582088984549046, -0.01742696203291416, 0.0020357503090053797, 0.013714940287172794, 0.008494666777551174, 0.023350564762949944, -0.02767995372414589, 0.008017965592443943, -0.02031842991709709, -0.013292942196130753, -0.003245087806135416, -0.002002537716180086, 0.03638561815023422, -0.0026316274888813496, -0.0005362893571145833, 0.05620390549302101, 0.02417893148958683, 0.009096404537558556, -0.008432148955762386, -0.030743347480893135, 0.03097779117524624, 0.016958074644207954, 0.03416622057557106, 0.03541658818721771, 0.044981878250837326, 0.011495542712509632, -0.0025026835501194, 0.03704206272959709, -0.00727556087076664, -0.03732339292764664, -0.01814592070877552, 0.02828950621187687, 0.02291293814778328, -0.0016733399825170636, 0.01911495439708233, -0.007142709568142891, 0.020568503066897392, 0.011862837709486485, 0.015152860432863235, -0.00453648017719388, 0.012714648619294167, 0.024038266390562057, 0.04960823059082031, -0.009854438714683056, 0.04238737002015114, 0.003885899903252721, 0.023663155734539032, -0.009698143228888512, 0.014660528860986233, -0.018833622336387634, 0.0006095528951846063, -0.029258539900183678, -0.001519974903203547, 0.01269901916384697, 0.013316386379301548, 0.00038268003845587373, 0.0015336507931351662, 0.005677438341081142, 0.025585591793060303, -0.008807257749140263, -0.04210603982210159, -0.012784981168806553, -0.04776393994688988, 0.015903079882264137, -0.0011946846498176455, 0.0005992960068397224, -0.005794660188257694, 0.012628685683012009, -0.010487436316907406, 0.009877882897853851, 0.00024238030891865492, -0.028352025896310806, 0.003985538147389889, 0.02575751766562462, -0.03127475455403328, 0.03563540056347847, -0.03594799339771271, 0.001749534043483436, -0.016035931184887886, -0.02655462548136711, -0.013730569742619991, 0.007068469189107418, 0.041137006133794785, 0.007021580822765827, 0.0020064450800418854, 0.008572814986109734, -0.0030477645341306925, -0.003143495647236705, -0.027351733297109604, 0.0021588332019746304, -0.002828950760886073, 0.0273673627525568, 0.011964429169893265, 0.009940401650965214, 0.01814592070877552, -0.0015404886798933148, -0.023288046941161156, 0.02280353009700775, 0.004513035994023085, 0.03898012638092041, -0.008354000747203827, -0.011870652437210083, -0.0068301185965538025, 0.023835081607103348, -0.009299589321017265, -0.024976039305329323, -0.0020650557707995176, -0.023131752386689186, -0.040730636566877365, 0.05379695072770119, 0.003807751927524805, -0.030024388805031776, -0.027336103841662407, -0.023647526279091835, 0.018208440393209457, 0.022381532937288284, -0.007017673458904028, 0.026882845908403397, -0.006783229764550924, -0.005161662586033344, -0.01498093456029892, -0.03607302904129028, 0.039917901158332825, 0.013621163554489613, -0.01223794650286436, -0.020771687850356102, -0.0038057982455939054, 0.002893422730267048, -0.011855022981762886, -0.028305135667324066, -0.019536951556801796, -0.014199457131326199, -0.0349789597094059, -0.021053019911050797, -0.03061831183731556, 0.006892636884003878, -0.03882383182644844, 0.010143585503101349, -0.028602097183465958, 0.03572917729616165, -0.008346186019480228, -0.029696166515350342, -0.007982798852026463, 0.030071277171373367, 0.014637084677815437, 0.01697370409965515], "index": 79}, {"title": "Hardtack (game)", "text": "Hardtack is a set of rules for American Civil War miniature wargaming by Lou Zocchi. It was published as a thirty-page pamphlet by Guidon Games in 1971, with an introduction by Gary Gygax and artwork by Don Lowry. Hardtack was the first set of American Civil War rules published in the United States and had an early following.", "vector": [-0.01987696997821331, -0.048177510499954224, -0.03492619842290878, 0.007129239849746227, -0.02134193852543831, -0.005335484631359577, 0.00368323246948421, 0.0022453151177614927, -0.0007616175571456552, 0.05267230421304703, 0.034360188990831375, 0.036324579268693924, 0.029033027589321136, 0.023705866187810898, -0.0160647202283144, -0.03136365860700607, -0.006846234202384949, 0.026719041168689728, -0.027734531089663506, -0.04225104674696922, 0.1127360463142395, 0.019960206001996994, 0.008931318297982216, 0.027068637311458588, 0.042384225875139236, 0.0035105159040540457, 0.007861724123358727, -0.019011305645108223, 0.006030512508004904, -0.0106210270896554, -0.007711898069828749, 0.019460784271359444, 0.02725175768136978, 0.004086931236088276, 0.051740050315856934, -0.012410620227456093, 0.004365774802863598, 0.04488133266568184, 0.0036020763218402863, -0.018112346529960632, 0.021491764113307, -0.019643906503915787, -0.01937754824757576, 0.022823555395007133, -0.0009899988071992993, 0.00022408930817618966, -0.056501202285289764, 0.0037976831663399935, -0.014042063616216183, -0.0008089585462585092, 0.03133036568760872, -0.022906791418790817, 0.03715694695711136, 0.01802911050617695, 0.031446896493434906, -0.006679760292172432, 0.060163624584674835, 0.07011875510215759, -0.02194124460220337, -0.013825647532939911, -0.03292851522564888, -0.027434879913926125, 0.025420546531677246, -0.03912133723497391, 0.011278598569333553, -0.022723671048879623, 0.01245223917067051, 0.08423573523759842, 0.013692468404769897, -0.00603467458859086, -0.003479301929473877, 0.01166981179267168, -0.01726333051919937, 0.031097302213311195, 0.03892156854271889, -0.043849192559719086, 0.03432689234614372, -0.003479301929473877, -0.01766286790370941, 0.004715370014309883, -0.023372918367385864, -0.000756415247451514, -0.040086887776851654, 0.027684589847922325, -0.031247127801179886, -0.019061248749494553, 0.044947922229766846, -0.047511618584394455, -0.01569015346467495, 0.006521610543131828, 0.001993523444980383, 0.02680227905511856, -0.007333170156925917, -0.016780557110905647, 0.0015117899747565389, 0.028084127232432365, -0.011361835524439812, -0.004009937401860952, 0.019860321655869484, 0.0018301710952073336, -0.005564386025071144, -0.005730859935283661, 0.01576506718993187, -0.06072963401675224, -0.03675740957260132, -0.036624230444431305, -0.04521428048610687, 0.03026493266224861, 0.007029355503618717, 0.008240452036261559, -0.004461497534066439, 0.007345655467361212, 0.024638120085000992, -0.05809934809803963, -0.059863969683647156, -0.0011060101678594947, 0.006983574945479631, -0.026086442172527313, -0.005322999320924282, -0.006296870764344931, -0.050075314939022064, 0.031446896493434906, 0.020542863756418228, -0.0356253907084465, -0.0014191889204084873, -0.015473738312721252, -0.045414045453071594, 0.016855470836162567, -0.03324481472373009, -0.004109821282327175, -0.01144507247954607, 0.0029736380092799664, 0.05959761515259743, 0.0037851976230740547, 0.027218462899327278, 0.013925531879067421, 0.00710426876321435, -0.025187483057379723, -0.0019321363652125, 0.020393038168549538, 0.007766001857817173, 0.028849905356764793, -0.003075603162869811, -0.024538235738873482, -0.01287674717605114, -0.002228667726740241, -0.013267960399389267, -0.017912577837705612, -0.004902652930468321, 0.0118695804849267, -0.03892156854271889, 0.03073105961084366, 0.004311671014875174, 0.02796759456396103, -0.009305884130299091, 0.0027759503573179245, -0.04974236711859703, 0.03469313681125641, 0.015049229376018047, 0.05120733380317688, 0.014175242744386196, 0.039987001568078995, 0.010604379698634148, 0.039487581700086594, 0.03222932294011116, 0.0356253907084465, 0.018511883914470673, 0.05526929348707199, 0.010479524731636047, -0.003052712883800268, 0.011619869619607925, 0.005231438670307398, 0.028700079768896103, 0.018645063042640686, 0.012335707433521748, 0.03181314095854759, 0.03519255667924881, 0.023223092779517174, 0.05773310735821724, -0.036224693059921265, -0.020459627732634544, 0.0004307508934289217, 0.05030837655067444, -0.005909819155931473, -0.005164849106222391, -0.0023888987489044666, -0.006163691636174917, 0.016772232949733734, -0.0048901671543717384, -0.044947922229766846, -0.08137238025665283, -0.0026635804679244757, -0.062327783554792404, 0.01766286790370941, -0.03992041200399399, -0.011986112222075462, -0.03719024360179901, -0.04378260299563408, -0.002832135185599327, 0.02916620671749115, -0.015856627374887466, 0.05280548334121704, 0.04521428048610687, -0.009747039526700974, 0.015315587632358074, 0.024288523942232132, 0.0296656284481287, 0.005543577019125223, 0.04025335982441902, 0.0006991898990236223, 0.0065132868476212025, 5.6575074268039316e-05, -0.009880218654870987, -0.0024513264652341604, -0.028000889346003532, 0.010571084916591644, 0.04481474310159683, 0.00886472873389721, 0.03226261958479881, 0.03539232537150383, 0.03635787218809128, -0.023422861471772194, -0.04867693409323692, -0.017862636595964432, 0.0070335171185433865, 0.006217795889824629, -0.011278598569333553, -0.03808920085430145, -0.03232920914888382, -0.030947476625442505, 0.018461942672729492, -0.03339464217424393, -0.007840914651751518, -0.026519272476434708, -0.004034908022731543, -0.018545178696513176, -0.004390745889395475, 0.007437216117978096, 0.010562761686742306, 0.01525732222944498, -0.01082079578191042, 0.03207949921488762, -0.03136365860700607, 0.0047112079337239265, -0.023206444457173347, 0.03133036568760872, -0.006667274981737137, -0.048610344529151917, -0.01362587884068489, -0.049775660037994385, 0.01726333051919937, -0.012585417367517948, 0.0612623505294323, 0.034759726375341415, -0.024538235738873482, -0.028550254181027412, 0.0653243139386177, -0.009214323945343494, 0.05104086175560951, -0.016206221655011177, -0.03093082830309868, 0.005052479449659586, -0.035558801144361496, -0.025919968262314796, -0.05470328405499458, -0.009680449962615967, -0.037523191422224045, -0.04488133266568184, -0.026785630732774734, 0.043349772691726685, 0.02545384131371975, -0.03825567290186882, -0.029249442741274834, 0.015731772407889366, -0.020293153822422028, -0.012726920656859875, -0.002378494245931506, 0.04914306104183197, -0.022856850177049637, -0.016580788418650627, -0.021724827587604523, -0.018994659185409546, 0.0761118158698082, -0.010854090563952923, -0.051973115652799606, 0.015498708933591843, -0.019593963399529457, -0.023156503215432167, 0.014283450320363045, -0.02886655367910862, 0.01072091143578291, 0.03469313681125641, 0.044348616153001785, 0.010229813866317272, 0.018961364403367043, 0.005726697854697704, 0.016697321087121964, -0.014641368761658669, 0.02615303173661232, -0.017912577837705612, 0.001269362517632544, 0.002426355378702283, -0.05646790564060211, -0.00936415046453476, -0.036024924367666245, -0.0043824221938848495, -0.0021537544671446085, 0.028383780270814896, -0.040086887776851654, -0.07438048720359802, 0.0042325956746935844, -0.03201290965080261, -0.019610611721873283, 0.023173149675130844, -0.007607851643115282, -0.04970907047390938, 0.05407068505883217, 0.009921837598085403, -0.00849432498216629, -0.029232796281576157, 0.021974539384245872, -0.06249425560235977, -0.03449336811900139, -0.01782934181392193, 0.05616825446486473, 0.0009130046237260103, 0.03409383073449135, 0.010362992994487286, 0.0015336397336795926, 0.0010810390813276172, -0.016697321087121964, -0.02735164202749729, 0.0025054304860532284, -0.02585337869822979, -0.016073044389486313, 0.0058723627589643, 0.012984954752027988, -0.008773168548941612, 0.05417056754231453, 0.004374098498374224, 0.018961364403367043, 0.05596848577260971, 0.020609453320503235, 0.05460340157151222, 0.013184723444283009, -0.030148401856422424, -0.016247840598225594, 0.04764479771256447, -0.01912783645093441, -0.009439063258469105, 0.000940576836001128, 0.03868850693106651, -0.0031505161896348, 0.01154495682567358, 0.00926426611840725, 0.02363927662372589, 0.02259049192070961, -0.031946320086717606, 0.02299002930521965, 0.040586307644844055, 0.014175242744386196, -0.07751019299030304, -0.011411777697503567, 0.03669082000851631, -0.010304726660251617, -0.007162534631788731, -0.0009546231012791395, -0.04934282973408699, -0.0038705153856426477, -0.011112124659121037, 0.0013838133309036493, 0.004478144459426403, -0.03354446589946747, 0.013992121443152428, 0.031213833019137383, -0.012751891277730465, 0.01942748948931694, -0.03912133723497391, -0.06898673623800278, -0.01857847347855568, 0.00787004828453064, -0.01114541944116354, 0.02299002930521965, 0.011270275339484215, 0.020492922514677048, 0.007724383380264044, -0.0008448544540442526, -0.0029965280555188656, 0.031746551394462585, -0.021508412435650826, 0.009838600642979145, 0.03945428505539894, -0.06911991536617279, 0.06189495325088501, 0.03031487576663494, -0.03848873823881149, 0.030448054894804955, 0.008939642459154129, 0.007437216117978096, -0.0072041526436805725, 0.015507033094763756, 0.010013397783041, 0.003941266797482967, 0.018295468762516975, -0.0005654906271956861, 0.041185613721609116, 0.020060090348124504, -0.013575936667621136, -0.03975393995642662, -0.012868423014879227, 0.03314492851495743, 0.011519985273480415, -6.684962863801047e-05, 0.019044600427150726, 0.025137539952993393, 0.016822176054120064, -0.06306026875972748, 0.02343950793147087, -0.043649423867464066, -0.009796981699764729, -0.00789501890540123, -0.02740158513188362, -0.015107495710253716, -0.0274515263736248, -0.004798606503754854, -0.048976585268974304, 0.015973160043358803, -0.014225184917449951, 0.01792922616004944, -8.047316555348516e-07, 0.07251597940921783, -0.03818908706307411, -0.01608969084918499, 0.018045756965875626, -0.0016688996693119407, -0.0691865012049675, -0.01766286790370941, 0.04934282973408699, 0.013858942314982414, 0.016930382698774338, 0.026785630732774734, -0.045813582837581635, 0.022956734523177147, -0.028650138527154922, -0.01721338927745819, 0.015656858682632446, -0.07751019299030304, 0.01413362380117178, 0.07358141243457794, -0.005909819155931473, -0.03083094395697117, -0.024721356108784676, -0.022673729807138443, -0.00038939257501624525, 0.056900739669799805, -0.011519985273480415, -0.03895486518740654, -0.006871205288916826, 0.0023119046818464994, -0.014166918583214283, -0.012385649606585503, 0.02303997054696083, 0.03798931837081909, -0.0022390722297132015, 0.03103071264922619, 0.002692713402211666, 0.0019727142062038183, 0.03279533609747887, -0.02525407262146473, -0.02911626361310482, -0.0336277037858963, -0.06522442400455475, -0.05297195538878441, 0.009622184559702873, 0.014125300571322441, -0.015373853966593742, -0.022307487204670906, -0.0029195339884608984, -0.031247127801179886, -0.04125220328569412, 0.027834415435791016, -0.0013723681913688779, -0.006829586811363697, 0.03307833895087242, 0.011178714223206043, -0.04131879284977913, 0.00039979719440452754, -0.010121606290340424, 0.03379417583346367, 0.033111635595560074, -0.003920457325875759, 0.007054326590150595, 0.04904317483305931, -0.009455710649490356, -0.01112044882029295, 0.031197186559438705, 0.014616398140788078, 0.02209107019007206, -0.022573845461010933, 0.007907504215836525, 0.0010222530690953135, 0.02219095453619957, 0.048377279192209244, 0.055901896208524704, 0.029782159253954887, 0.03675740957260132, 0.023822398856282234, 0.0928923711180687, 0.011353511363267899, 0.0045031155459582806, 0.022657081484794617, -0.004049474839121103, 0.0036894751247018576, 0.0053105135448277, 0.028500311076641083, -0.006983574945479631, -0.000569652474950999, -0.0061845011077821255, 0.0037519028410315514, -0.009730392135679722, -0.025969909504055977, -0.013409462757408619, -0.0311305969953537, 0.010204842314124107, 0.02680227905511856, -0.0003038146533071995, 0.027434879913926125, 0.011802990920841694, 0.04478144645690918, -0.028034184128046036, 0.02299002930521965, 0.006371784023940563, 0.01992691121995449, -0.0052480860613286495, -0.018162289634346962, 0.03739001229405403, -0.009414092637598515, 0.009905190207064152, -0.009314208291471004, -0.01352599449455738, -0.025986557826399803, -0.015723448246717453, -0.005256409756839275, 0.012543799355626106, -0.029832102358341217, -0.005963923409581184, -0.024787945672869682, 0.024371761828660965, -0.008889700286090374, 0.007054326590150595, 0.019943559542298317, 0.01673893816769123, -0.012568769976496696, -0.01144507247954607, -0.0004146237624809146, 0.005539414938539267, 0.01413362380117178, 0.01736321486532688, 0.026236267760396004, 0.006113749463111162, 0.04261728748679161, 0.028983084484934807, 0.014583103358745575, -0.010804148390889168, -0.008806463330984116, 0.016922060400247574, 0.03267880156636238, 0.021508412435650826, 0.03103071264922619, 0.02801753766834736, 0.03509267419576645, 0.06109587848186493, 0.028034184128046036, 0.031596723943948746, 0.021092228591442108, 0.028933143243193626, -0.07651134580373764, -0.01706356182694435, 0.03758978098630905, 0.028150716796517372, 0.006658951286226511, -0.012726920656859875, -0.045513931661844254, -0.009114439599215984, -0.03066447004675865, 0.030497996136546135, -0.0038830009289085865, -0.020143328234553337, -0.002794678555801511, -0.018262173980474472, -0.014882756397128105, 0.03036481700837612, -0.027934299781918526, 0.020592806860804558, 0.0012350273318588734, 0.03224597126245499, -0.0075329383835196495, -0.01671396754682064, 0.023223092779517174, -0.03063117526471615, 0.015032581984996796, -0.01797916740179062, 0.036823999136686325, 0.02570355124771595, -0.027901004999876022, -0.004873519763350487, 0.031546782702207565, 0.008190509863197803, 0.02189130149781704, -0.02996527962386608, 0.02413869835436344, 0.018245525658130646, 0.028184011578559875, 0.016530847176909447, -0.034859608858823776, -0.03695717826485634, 0.005784963723272085, -0.029382621869444847, 0.006933632772415876, 0.000753814063500613, 0.056201547384262085, -0.014899403788149357, 0.027434879913926125, 0.0010399408638477325, 0.012244146317243576, -0.009663802571594715, -0.031996261328458786, 0.0005389588768593967, -0.007607851643115282, -0.02655256725847721, 0.015623563900589943, -0.0036457758396863937, -0.03053129091858864, -0.00742889242246747, 0.040686190128326416, 0.02042633295059204, 0.023472802713513374, 0.009763686917722225, 0.0035812673158943653, -0.043349772691726685, 0.02279026061296463, 0.03472642973065376, 0.01495766919106245, 0.009946808218955994, -0.017080210149288177, -0.005751668941229582, 0.05646790564060211, -0.030681118369102478, 0.022707022726535797, 0.04175162315368652, 0.011461719870567322, -0.002268205164000392, 0.04568040370941162, 0.009597213007509708, 0.008889700286090374, 0.015981482341885567, -0.01668899692595005, 0.01982702687382698, -0.011802990920841694, -0.004915138240903616, -0.027368290349841118, -0.046213120222091675, -0.006708893459290266, 0.02333962358534336, 0.03798931837081909, -0.03609151393175125, -0.00875652115792036, 0.00027572221006266773, 0.00855675246566534, -0.024987714365124702, -0.022723671048879623, 0.020060090348124504, -0.018212230876088142, 0.01897801086306572, 0.047012194991111755, -0.01164484117180109, -0.019410843029618263, 0.013983797281980515, -0.04168503358960152, -0.04111902415752411, 0.011719753965735435, -0.029149558395147324, 0.009014555253088474, -0.008290394209325314, -0.02204112894833088, -0.025287367403507233, -0.00042216709698550403, 0.011378482915461063, 0.021708181127905846, 0.003433521604165435, 0.021158818155527115, 0.033710941672325134, -0.013659173622727394, 0.047112081199884415, -0.029282737523317337, -0.013867265544831753, -0.0031713254284113646, -0.04211786761879921, -0.024371761828660965, 0.02530401386320591, -0.028533605858683586, 0.05789957940578461, 0.02037638984620571, -0.02525407262146473, 0.014250155538320541, 0.0036083192098885775, -0.014083681628108025, -0.031097302213311195, 0.010770853608846664, 4.1325816710013896e-05, -0.011278598569333553, 0.03083094395697117, 0.04684572294354439, -0.028283895924687386, -0.004798606503754854, 0.026469331234693527, -0.004553057719022036, -0.02545384131371975, -0.00833201315253973, 0.004076526500284672, -0.029049674049019814, 0.015881597995758057, 0.023705866187810898, 0.0011184957111254334, -0.00700438441708684, 0.024688061326742172, 0.012543799355626106, -0.022473961114883423, -0.012926689349114895, -0.0026365285739302635, 0.00936415046453476, -0.013667497783899307, -0.033411286771297455, 0.0005909819155931473, 0.021108875051140785, -0.017696162685751915, 0.013417786918580532, -0.009272589348256588, 0.0066839223727583885, 0.02338956668972969, 0.03352781757712364, 0.030098458752036095, -0.00991351343691349, -0.031097302213311195, 0.006817101500928402, -0.009339178912341595, -0.011278598569333553, 0.05147369205951691, 0.02550378255546093, -0.003858029842376709, -0.0002983522426802665, -0.013051544316112995, 0.0175629835575819, -0.016747262328863144, -0.03209614381194115, -0.008211319334805012, 0.013417786918580532, -0.004511439241468906, 0.004598838277161121, -0.01626448892056942, -0.008606694638729095, 0.021724827587604523, -0.03962076082825661, 0.006929471157491207, 0.02460482530295849, -0.0025408060755580664, -0.019544022157788277, 0.03888827562332153, 0.0034231171011924744, 0.0054395305924117565, -0.008606694638729095, 0.04045312851667404, 0.004461497534066439, -0.038388852030038834, -0.013168076053261757, 0.008123920299112797, 0.04288364574313164, -0.015307264402508736, -0.0160647202283144, -0.041185613721609116, -0.006775483023375273, 0.0259532630443573, -0.008548428304493427, -0.02032644860446453, 0.03394400328397751, -0.024205287918448448, -0.027218462899327278, 0.020492922514677048, -0.005876524373888969, 0.003335718298330903, 0.002426355378702283, 0.03449336811900139, -0.015482061542570591, 0.021375233307480812, 0.0469789020717144, 0.011961140669882298, -0.017279978841543198, -0.009605537168681622, 0.004786121193319559, 0.01736321486532688, 0.04208457097411156, 0.00583490589633584, 0.034759726375341415, 0.017529688775539398, 0.041385382413864136, -0.028500311076641083, -0.03868850693106651, 0.01505755353718996, -0.021758122369647026, 0.04944271221756935, 0.04115231707692146, 0.07784313708543777, 0.033910710364580154, 0.0030631176196038723, -0.042750466614961624, 0.014025416225194931, 0.013109810650348663, 0.0005259530735202134, 0.06003044545650482, 0.012835128232836723, -0.04111902415752411, 0.013867265544831753, 0.010953974910080433, 0.01393385510891676, 0.025986557826399803, 0.01591489277780056, 0.027268406003713608, -0.015232350677251816, 0.01673893816769123, -0.03975393995642662, -0.017746105790138245, -0.015507033094763756, -0.01671396754682064, -0.050175197422504425, -0.0656905546784401, 0.0351259671151638, -0.0017282059416174889, 0.034060534089803696, 0.022973380982875824, 0.03925451636314392, -0.019111189991235733, -0.03482631593942642, 0.02094240114092827, -0.0037935213185846806, -0.022457312792539597, -0.00700438441708684, -0.0009723108960315585, -0.011228656396269798, -0.06492477655410767, 0.01967720128595829, 0.04588017240166664, 0.05243924260139465, 0.03344458341598511, 0.004018261097371578, -0.001642888062633574, 0.016772232949733734, -0.01591489277780056, 0.05410397797822952, -0.01526564545929432, -0.012061025016009808, 0.028899848461151123, 0.0006102304323576391, 0.01666402630507946, 0.01776275224983692, 0.02132529206573963, -0.021525058895349503, 0.0014150271890684962, -0.022623786702752113, 0.059064898639917374, 0.015615240670740604, -0.040586307644844055, -0.012552122585475445, 0.014674663543701172, -0.0065840380266308784, -0.04121890664100647, -0.00011861256643896922, -0.019893616437911987, -0.01092068012803793, 0.0022349106147885323, 0.04131879284977913, -0.016497552394866943, -0.008598370477557182, -0.032412443310022354, 0.005289704538881779, 0.011112124659121037, -0.03595833480358124, 0.03133036568760872, 0.04441520571708679, -0.0030672794673591852, 0.03852203115820885, -0.016580788418650627, 0.005314675625413656, 0.002332713920623064, -0.006063807290047407, 0.03675740957260132, 0.022457312792539597, -0.016147956252098083, 0.0031775683164596558, -0.019993500784039497, 0.03429359942674637, 0.012718596495687962, 0.035259146243333817, 0.002619881182909012, 0.04111902415752411, 0.03479301929473877, 0.022207602858543396, 0.00603883620351553, 0.027035342529416084, 0.05706721171736717, -0.03118053823709488, -0.005277218762785196, 0.0375564843416214, -0.014624721370637417, -0.0005582073936238885, -0.024704709649086, 0.00504415575414896, -0.004061960149556398, -0.014866109006106853, 0.01473292987793684, 0.038222379982471466, -0.02343950793147087, 0.012011082842946053, -0.04894329234957695, -0.007129239849746227, 0.010296403430402279, -0.00020588123879861087, -0.011236980557441711, -0.024122050032019615, 0.028983084484934807, -0.002007049508392811, -0.002746817423030734, -0.019593963399529457, -0.01124530378729105, 0.008947965689003468, -0.04950930178165436, 0.005064964760094881, -0.01668899692595005, -0.04568040370941162, -0.013442757539451122, -0.06296038627624512, -0.009763686917722225, -0.024171993136405945, 0.020209917798638344, 0.02154170721769333, 0.017845990136265755, 0.00020210957154631615, 0.004415716975927353, -0.013059868477284908, 0.01623951643705368, 0.006271899677813053, 0.026136383414268494, 0.01827882044017315, -0.009821953251957893, -0.0038101687096059322, -0.038122497498989105, -0.022573845461010933, 0.006729702465236187, -0.019360899925231934, -0.05476987361907959, 0.0032982616685330868, -0.006463344674557447, 0.023522745817899704, -0.026619156822562218, 0.01528229285031557, -0.023256387561559677, 0.0009223687811754644, 0.005839067976921797, -0.03377753123641014, -0.01882818527519703, 0.040086887776851654, 0.005493634846061468, -0.01134518813341856, -0.007999065332114697, 0.011902875266969204, -0.02445499785244465, 0.0018228879198431969, -0.02072598598897457, 0.037623073905706406, 0.0018541017780080438, 0.03825567290186882, -0.021358586847782135, 0.013034896925091743, -0.045347459614276886, -0.011678135953843594, 0.0003272250178270042, 0.06845401972532272, -0.011311893351376057, 0.05596848577260971, -0.01535720657557249, 0.02906632237136364, -0.026186326518654823, 0.027368290349841118, -0.021674886345863342, -0.013143104501068592, 0.028650138527154922, 0.03429359942674637, -0.010804148390889168, -0.017230035737156868, 0.016880441457033157, -0.04478144645690918, 0.014616398140788078, 0.03695717826485634, -0.009114439599215984, 0.011486690491437912, -0.03056458570063114, -0.01947743259370327, 0.00044401679770089686, 0.025670256465673447, -0.0420512780547142, -0.04864363744854927, -0.02112552337348461, -0.011053859256207943, 0.008244614116847515, -0.0021121359895914793, -0.008698254823684692, 0.010013397783041, -0.013775705359876156, -0.0035146777518093586, -0.032046202570199966, 0.05230606347322464, 0.010912355966866016, 0.04930953308939934, 0.0037914402782917023, -0.0058557153679430485, -0.01972714252769947, 0.005485311150550842, -0.011403453536331654, -0.011678135953843594, 0.01277686282992363, -0.016056396067142487, 0.02715187333524227, 0.03502608463168144, -0.013351197354495525, 0.03649105131626129, -0.02941591665148735, 0.025969909504055977, -0.009131086990237236, -0.015107495710253716, 0.005689241457730532, 0.0356253907084465, -0.05350467190146446, -0.0043824221938848495, 0.022057775408029556, 0.028233952820301056, -0.034559957683086395, -0.020209917798638344, 0.031396955251693726, 0.005655946675688028, 0.04378260299563408, -0.0405530147254467, 0.007944961078464985, -0.010346345603466034, 0.018312115222215652, -0.002746817423030734, 0.02114216983318329, 0.030497996136546135, -0.012818480841815472, -0.025021009147167206, 0.009963455609977245, 0.0016043910291045904, 0.018262173980474472, -0.028333837166428566, -0.021092228591442108, -0.03768966346979141, -0.028000889346003532, 0.0055768718011677265, 0.005360455717891455, -0.048210807144641876, -0.023972224444150925, -0.004777797497808933, -0.01656414195895195, 0.00762866111472249, 0.0021912110969424248, -0.028650138527154922, -0.005759992636740208, 0.024005519226193428, -0.01051281951367855, -0.05437033623456955, 0.03629128262400627, -0.0010956055484712124, -0.04884340614080429, -0.01435836311429739, 0.018362058326601982, 0.010188194923102856, -0.011236980557441711, -0.035725273191928864, 0.004411555361002684, 0.007845076732337475, 0.013534318655729294, -0.017146799713373184, -0.014350039884448051, 0.005356294102966785, 0.02082587033510208, -0.0259532630443573, -0.014882756397128105, -0.0076702795922756195, 0.015007611364126205, 0.03715694695711136, -0.013159751892089844, 0.020992344245314598, -0.015332235023379326, -0.026785630732774734, -0.06439206004142761, 0.0212420541793108, -0.01987696997821331, 0.013575936667621136, 0.01611466147005558, -0.004923461936414242, 0.008590047247707844, -0.028184011578559875, 0.01216923352330923, 0.014166918583214283, -0.01270194910466671, 0.0023431184235960245, 0.028350485488772392, -0.018012462183833122, 0.0004934386815875769, -0.029698923230171204, 0.009513976983726025, -0.013043221086263657, 0.018095700070261955, -0.04994213581085205, -0.03935440257191658, -0.010030045174062252, -0.010953974910080433, -0.020592806860804558, -0.0023160665296018124, -0.002386817941442132, 0.003110978752374649, -0.02650262601673603, -0.029349327087402344, -0.019943559542298317, -0.01736321486532688, 0.01912783645093441, 0.008773168548941612, 0.025087598711252213, 0.014166918583214283, 0.020060090348124504, 0.029998574405908585, -0.013534318655729294, -0.049276240170001984, 0.001562772667966783, 0.03299510478973389, 0.009572242386639118, 0.006259414367377758, -0.02388898655772209, 0.00019664714636746794, 0.013684145174920559, -0.002058032201603055, 0.017130151391029358, -0.03141360357403755, 0.011003917083144188, 0.03459325060248375, 0.053637851029634476, -0.005901495460420847, -0.0173132736235857, -0.0017479746602475643, 0.0073623028583824635, 0.007087621372193098, 0.020442979410290718, 0.007025193423032761, 0.00971374474465847, 0.01802911050617695, 0.0004825138603337109, 0.012344030663371086, 0.008352821692824364, 0.03685729578137398, -0.0721830278635025, 0.0056975651532411575, 0.0013754896353930235, -0.015273969620466232, 0.004719531629234552, 0.005339646711945534, 0.056601084768772125, 0.01144507247954607, 0.005352132022380829, 0.03201290965080261, 0.016356049105525017, 0.021475117653608322, 0.007433054503053427, 0.030081812292337418, -0.011403453536331654, 0.027801120653748512, -0.025337308645248413, -0.016281135380268097, 0.024871183559298515, -0.003610400017350912, -0.0063551366329193115, 0.004894329234957695, 0.035259146243333817, 0.015273969620466232, 0.01350102387368679, 0.017479747533798218, -0.01370911579579115, -0.020343095064163208, 0.027734531089663506, 0.010138253681361675, -0.005081612151116133, -0.021724827587604523, 0.01696367748081684, 0.004765312187373638, 0.003115140600129962, -0.015124143101274967, 0.04185150936245918, -0.03294515982270241, -0.0042825378477573395, -0.0030964124016463757, -0.01648922823369503, 0.0154570909217, -0.001020172145217657, 0.0039724805392324924, -0.02670239470899105, -0.01196946483105421, 0.0004913577577099204, -0.0003373695071786642, 0.004105659667402506, -0.013967149890959263, -0.024471646174788475, -0.009214323945343494, 0.012160909362137318, -0.026485977694392204, -0.013434434309601784, -0.016156280413269997, -0.02229083888232708, -0.03046470135450363, -0.036923885345458984, 0.002084043575450778, 0.014766224659979343, 0.00040890122181735933, 0.00017973965441342443, -0.04228433966636658, -0.003914214670658112, 0.01726333051919937, -0.008889700286090374, 0.032412443310022354, 0.009014555253088474, 0.009572242386639118, -0.022906791418790817, 0.014100329019129276, 0.03063117526471615, 0.008386116474866867, 0.0009676288464106619, -0.01837870478630066, -0.04964248090982437, -0.014258479699492455, -0.001665778225287795, -0.00411606440320611, -0.007058488205075264, 0.009846923872828484, 0.038022611290216446, 0.0031838109716773033, -0.0010638715466484427, -0.020409684628248215, -0.0016012697014957666, 0.021724827587604523, 0.02358933538198471, -0.00787004828453064, 0.017046915367245674, 0.007295713294297457, 0.007745192851871252, -0.022773612290620804, 0.0016179170925170183, -0.009039525873959064, 0.015049229376018047, 0.020442979410290718, 0.05963090807199478, -0.01807905174791813, 0.012019407004117966, -0.022274192422628403, -0.030348170548677444, 0.006417564116418362, 0.010204842314124107, -0.001656414126046002, 0.031147243455052376, 0.016372695565223694, 0.005801611114293337, 0.0017167608020827174, -0.011736401356756687, -0.020060090348124504, -0.019960206001996994, -0.022407371550798416, -0.01603974960744381, -0.03675740957260132, -0.0042617288418114185, -0.00722912373021245, -0.022823555395007133, 0.0010695940582081676, -0.01518240850418806, -0.03729012608528137, 0.019943559542298317, -0.010604379698634148, -0.018212230876088142, -0.00875652115792036, 0.018911421298980713, 0.005797449499368668, 0.005693403072655201, 0.003206701250746846, 0.017646221444010735, 0.014200213365256786, 0.006467506289482117, -0.029848748818039894, -0.016081366688013077, -0.051939819008111954, -0.005560224410146475, -0.014691310934722424, 0.04881011322140694, -0.011028887704014778, 0.02996527962386608, 0.013992121443152428, 0.03825567290186882, -0.02585337869822979, -0.025220777839422226, -0.0010336980922147632, 0.01638934388756752, -0.001215258613228798, 0.01166981179267168, 0.03565868362784386, -0.01581500843167305, -0.0259532630443573, 0.041185613721609116, -0.008798139169812202, 0.004848548676818609, -0.02017662301659584, 0.010030045174062252, -0.021874655038118362, 0.017579631879925728, -0.016430962830781937, -0.02122540771961212, -0.027834415435791016, -0.01546541415154934, 0.023705866187810898, -0.001391096506267786, -0.024205287918448448, 0.007274904288351536, 0.02986539527773857, -0.027018694207072258, -0.017396509647369385, -0.02154170721769333, 0.015898246318101883, -0.009638831950724125, -0.013900560326874256, 0.008298718370497227, -0.0002905487781390548, -0.001778148114681244, 0.011703106574714184, -0.004873519763350487, -0.005468663759529591, 0.037822842597961426, -0.021408528089523315, -0.019510727375745773, -0.04311670735478401, -0.01591489277780056, 0.0020830032881349325, 0.013143104501068592, -0.0008667040965519845, 0.012135938741266727, -0.018861480057239532, 0.005780802108347416, 0.01927766390144825, 0.010288079269230366, -0.009655479341745377, 0.02801753766834736, -0.027950948104262352, -0.03469313681125641, -0.025686904788017273, -0.007990741170942783, 0.014541484415531158, -0.02981545403599739, 0.023572687059640884, 0.015581945888698101, -0.026868868619203568, -0.002426355378702283, 0.006196986418217421, -0.0008370509603992105, 0.01390888448804617, -0.018095700070261955, 0.00029653141973540187, 0.03695717826485634, 0.029232796281576157, 0.004756988491863012, 0.0036624232307076454, -0.004719531629234552, 0.045813582837581635, 0.010055016726255417, 0.032911866903305054, -0.02077592723071575, 0.01766286790370941, -0.010837443172931671, 0.019410843029618263, -0.002053870353847742, 0.006067969370633364, -0.02159164845943451, -0.019360899925231934, 0.030747707933187485, 0.006954442244023085, 0.038422148674726486, 0.02017662301659584, 0.0017552579520270228, -0.022057775408029556, -0.0016449689865112305, 0.013184723444283009, -0.005114906933158636, 0.005468663759529591, -0.02801753766834736, -0.005676755681633949, 0.0009410970960743725, 0.011911199428141117, 0.014541484415531158, 0.011561604216694832, 0.019593963399529457, 0.030747707933187485, -0.009705421514809132, -0.006309356074780226, 3.4465276257833466e-05, 0.025187483057379723, 0.01483281422406435, 0.009622184559702873, 0.011736401356756687, -0.010121606290340424, 0.0020725985523313284, -0.023705866187810898, -0.024088755249977112, 0.0014576860703527927, -0.008049007505178452, 0.0020060089882463217, 0.047611501067876816, -0.017945872619748116, 0.024971067905426025, -0.01827882044017315, -0.022723671048879623, 0.016048071905970573, 0.024787945672869682, 0.02881661057472229, -0.031197186559438705, 0.011128772050142288, -0.024671414867043495, -0.008223804645240307, 0.026768984273076057, -0.0037976831663399935, -0.034160420298576355, -0.011153743602335453, -0.002877915510907769, -0.005202305503189564, -0.00291745294816792, -0.0038330587558448315, 0.006958603858947754, 0.030098458752036095, -0.001193408970721066, -0.003354446729645133, 0.006812939420342445, -0.0006180339260026813, 0.0014254316920414567, -0.05829911679029465, -0.013059868477284908, -0.0420512780547142, 0.004665427841246128, -0.0023306328803300858, -0.024022165685892105, 0.024388408288359642, -0.018545178696513176, -0.006617332808673382, 0.023722514510154724, 0.01463304553180933, -0.0026760660111904144, 0.009722068905830383, 0.006908661685883999, -0.002049708506092429, 0.025770140811800957, -0.0031359498389065266, -0.03915463387966156, -0.0005145080504007638, -0.01837870478630066, -0.005227276589721441, 0.027035342529416084, 0.009447387419641018, 0.02142517641186714, -0.003610400017350912, -0.017796047031879425, 0.031546782702207565, 0.01124530378729105, -0.02433846704661846, -0.0036083192098885775, -0.012019407004117966, 0.002871672622859478, -0.013009926304221153, -0.006380107719451189, -0.027484821155667305, 0.02946585975587368, -0.03472642973065376, 0.0030776839703321457, 0.03519255667924881, -0.0014712120173498988, -0.018894774839282036, -0.020409684628248215, -0.025820083916187286, -0.041085727512836456, -0.0003581787459552288, -0.017146799713373184, 0.011561604216694832, -0.0003053753462154418, 0.02129199728369713, -0.009205999784171581, 0.008369469083845615, -0.024388408288359642, 0.0065840380266308784, -0.0044198790565133095, -0.02229083888232708, -0.008698254823684692, 0.008706578984856606, -0.017679516226053238, -0.0045031155459582806, 0.011611546389758587, -0.005385426804423332, -0.009597213007509708, 0.013659173622727394, 0.004960918799042702, -0.016347724944353104, 0.018062405288219452, -0.013484376482665539, 0.01932760514318943, -0.015273969620466232, -0.022573845461010933, 0.020159974694252014, 0.01776275224983692, -0.021258702501654625, -0.0027301700320094824, -0.018295468762516975, -0.00916438177227974, -0.025919968262314796, 0.0019425408681854606, -0.03982052952051163, -0.027901004999876022, 0.026719041168689728, -0.02881661057472229, 0.002193292137235403, -0.007453863508999348], "index": 80}, {"title": "Adjournment sine die", "text": "Adjournment sine die (from the Latin \"without day\") means \"without assigning a day for a further meeting or hearing\". To adjourn an assembly sine die is to adjourn it for an indefinite period.", "vector": [-0.008480370976030827, 0.004539786372333765, -0.01259988360106945, 0.05502670630812645, 0.026314949616789818, 0.031424809247255325, 0.009562263265252113, 0.025183124467730522, 0.00039634708082303405, -0.035818956792354584, -0.005621678661555052, 0.02167113497853279, -0.018025990575551987, -0.04224373400211334, -0.021787647157907486, -0.0077771409414708614, -0.03701736032962799, 0.022253692150115967, 0.04314253479242325, -0.006695248652249575, -0.04091217368841171, 0.01522971410304308, 0.018259013071656227, 0.02035621926188469, 0.042476754635572433, 0.0003061027091462165, -0.029460759833455086, -0.0015500187873840332, -0.01909123733639717, 0.003923940006643534, -0.009961731731891632, 0.0005529093905352056, 0.07157133519649506, 0.03731696307659149, -0.007960230112075806, -0.03725038468837738, 0.07729703933000565, -0.015787305310368538, -0.004606364294886589, -0.0010912548750638962, -0.04307595640420914, 0.01754329912364483, -0.051065314561128616, 0.024866878986358643, -0.04643814638257027, 0.019523994997143745, -0.019057948142290115, -0.007956069894134998, 0.000991908018477261, 0.028362222015857697, -0.008001841604709625, 0.02152133360505104, -0.006603704299777746, 0.031657833606004715, 0.006761827040463686, 0.010885501280426979, 0.029460759833455086, -0.034853577613830566, -0.05173109471797943, -0.04733694717288017, -0.016220062971115112, -0.030542651191353798, 0.016669463366270065, 0.01815914548933506, 0.0018912309315055609, 0.02668112888932228, 0.02786288782954216, -0.003499505342915654, -0.020223064348101616, -0.006021146662533283, 0.026098571717739105, -0.049966778606176376, -0.036584604531526566, 0.004240185488015413, -0.026398172602057457, -0.029444115236401558, -0.03758327290415764, 0.033854905515909195, -0.02693079598248005, -0.014239367097616196, -0.04157795384526253, -0.019074592739343643, -0.03182427957653999, -0.015953749418258667, -0.005080732516944408, -0.01248337235301733, -0.01682758703827858, -0.049101267009973526, 0.008929772302508354, -0.0003867244813591242, 0.003665950382128358, -0.0344541072845459, 0.055759064853191376, 0.007311095017939806, -0.006170947104692459, -0.02974371612071991, 0.018841570243239403, 0.021771002560853958, 0.006770148873329163, -0.08448746800422668, -0.010719056241214275, -0.049267709255218506, 0.010594221763312817, -0.011018657125532627, -0.05229700729250908, 0.025865547358989716, -0.00137005012948066, 0.00935420673340559, -0.009087895043194294, 0.041211772710084915, 0.01706060953438282, -0.010153142735362053, 0.017410144209861755, 0.0068533713929355145, -0.05938756465911865, -0.036584604531526566, -0.006187591701745987, -0.02951069362461567, -0.0029668814968317747, 0.03035956248641014, -0.003921859432011843, -0.03521975502371788, 0.028828268870711327, -0.03147474303841591, 0.007951908744871616, 0.0014740782789885998, 0.04330898076295853, 0.018192434683442116, -0.026830928400158882, 0.036584604531526566, -0.019623862579464912, -0.043475426733493805, -0.02065582014620304, -0.0038323954213410616, 0.01877499185502529, 0.006532964762300253, -0.0440080501139164, -0.009878508746623993, -0.014497356489300728, 0.02278631553053856, -0.009637163951992989, 0.02067246474325657, 0.03184092044830322, 0.03511988744139671, 0.032306969165802, -0.03904798999428749, -0.005309594329446554, 0.003703400492668152, -0.012500016950070858, 0.03215716779232025, -0.02866182290017605, 0.007128005847334862, 0.02623172663152218, -0.008384665474295616, -0.006483031436800957, -0.013357209041714668, 0.023901497945189476, -0.003366349497810006, 0.0001643644063733518, -0.03904798999428749, 0.020689109340310097, 0.03438752889633179, -0.008018486201763153, 0.04164453223347664, -0.04513987526297569, 0.0055134897120296955, -0.009420785121619701, -0.048868242651224136, 0.005534294992685318, 0.00896306149661541, -0.015595893375575542, -0.011218390427529812, -0.014189433306455612, -0.05472710356116295, 0.011800948530435562, 0.006050274707376957, 0.008680105209350586, 0.038082607090473175, 0.015263003297150135, 0.040812306106090546, -0.040046658366918564, 0.01792612299323082, 0.002727616811171174, -0.020139841362833977, 0.030642518773674965, -0.02779630944132805, 0.03335557132959366, -0.02551601268351078, 0.051531363278627396, -0.03285623714327812, -0.016078583896160126, -0.0382157638669014, 0.06464722752571106, 0.010793955996632576, 0.019707083702087402, 0.0029606397729367018, -0.029377536848187447, 0.006541287060827017, 0.0018756267381832004, 0.010793955996632576, -0.009753675200045109, -0.015471059828996658, -0.02097206562757492, 0.08954739570617676, -0.06438091397285461, -0.00046942682820372283, 0.05479368194937706, 0.01714383251965046, 0.027430130168795586, -0.021854223683476448, 0.002577816369011998, -0.011709403246641159, -0.03239019215106964, 0.03350537270307541, 0.02065582014620304, 0.0029315119609236717, -0.0579228475689888, -0.042776357382535934, 0.04783628508448601, -0.02363518625497818, -0.002844128292053938, -0.0399467907845974, -0.029061291366815567, 0.02589883655309677, -0.03412121906876564, -0.009404140524566174, 0.02348538488149643, 0.01987352967262268, -0.010785633698105812, 0.02762986533343792, -0.009995019994676113, 0.013240696862339973, 0.018275657668709755, -0.005326238926500082, -0.007331900764256716, -0.02080562151968479, 0.05439421534538269, -0.04727037250995636, 0.02340216189622879, -0.036351580172777176, -0.015346226282417774, 0.05489354953169823, -0.02348538488149643, 0.0018381766276434064, -0.01200900413095951, -0.018908148631453514, 0.023069271817803383, -0.005850540474057198, -0.010519322007894516, -0.010768989101052284, -0.017243698239326477, 0.031108563765883446, -0.002606944413855672, -0.010003342293202877, -0.0361851342022419, 0.022053958848118782, -0.012192093767225742, -0.017018998041749, -0.0077688186429440975, 0.03308925777673721, 0.007598212920129299, 0.009470718912780285, 0.0004806098295375705, -0.025782326236367226, -0.020372863858938217, 0.009312596172094345, 0.009087895043194294, 0.0028690951876342297, 0.01909123733639717, -0.03204065561294556, -0.06697745621204376, -0.01965714991092682, -0.01885821484029293, 0.005887990817427635, -0.029310958459973335, 0.005575906485319138, 0.010993690229952335, 0.025848902761936188, 0.09340891242027283, 0.053894881159067154, -0.01490514725446701, -0.042310312390327454, -0.03521975502371788, -0.046837612986564636, 0.04467383027076721, 0.00907957274466753, -0.02010655216872692, 0.004781131632626057, -0.006811760365962982, 0.00783123541623354, -0.0243342537432909, 0.004167365841567516, 0.03578566759824753, 0.0353529118001461, 0.0518309623003006, 0.017343565821647644, -0.01568743772804737, -0.021970735862851143, -0.03405464068055153, -0.034154508262872696, 0.02122173272073269, 0.04800272732973099, 0.013581909239292145, 0.02559923566877842, 0.01291612908244133, -0.01181759312748909, 0.016877518966794014, 0.033072616904973984, -0.006025307811796665, -0.042310312390327454, 0.04244346544146538, -0.0573236458003521, 0.06691087782382965, -0.021621201187372208, 0.0067743100225925446, -0.015637503936886787, 0.0009846260072663426, -0.027263686060905457, 0.03077567368745804, -0.0234687402844429, 0.0097786420956254, 0.01225034985691309, 6.607409886782989e-06, -0.027646509930491447, 0.04940086603164673, -0.048801664263010025, -0.002569494303315878, -0.007743852213025093, 0.06870847940444946, -0.01784290000796318, -0.017709745094180107, -0.019290972501039505, 0.005771479103714228, 0.006840887945145369, -0.02991016022861004, 0.0013336403062567115, -0.0010491234716027975, 0.011642825789749622, 0.04513987526297569, -0.04357529431581497, 0.028711756691336632, -0.03442081809043884, 0.07723046839237213, -0.022320270538330078, 0.04540618881583214, 0.04737023636698723, -0.018675126135349274, -0.005754834972321987, 0.026664484292268753, 0.02065582014620304, 0.0006897063576616347, -0.027962755411863327, -0.005022476892918348, 0.007473378907889128, 0.006391486618667841, -0.04021310433745384, -0.017010675743222237, -0.03179099038243294, 0.018758347257971764, -0.01216712687164545, -0.0005425065755844116, 0.000173856969922781, 0.041677821427583694, -0.013756676577031612, -0.0019713325891643763, -0.045739077031612396, -0.01800934597849846, -0.0015760257374495268, 0.03615184873342514, 0.06644482910633087, -0.02574903704226017, -0.016919130459427834, 0.04467383027076721, 0.002650636015459895, 0.026031993329524994, 0.012266994453966618, 0.039247725158929825, -0.025449436157941818, 0.01925768330693245, -0.006229202728718519, 0.02528299018740654, 0.06567918509244919, -0.023335585370659828, 0.03277301415801048, -0.01784290000796318, -0.06448078155517578, 0.012075582519173622, 0.004477369599044323, -0.006557931657880545, -0.022187113761901855, 0.0015312937321141362, 0.024983389303088188, 0.017743034288287163, -0.04037955030798912, 0.006170947104692459, 0.016919130459427834, -0.013523654080927372, 0.015121525153517723, 0.056624576449394226, 0.006757665891200304, 0.008459565229713917, -0.04357529431581497, -0.0012493774993345141, 0.006899144034832716, -0.015188103541731834, 0.025233056396245956, -0.018192434683442116, -0.01240847259759903, -0.009920120239257812, -0.028828268870711327, -0.0144058121368289, 0.033372215926647186, 0.022719739004969597, -0.033788327127695084, -0.01754329912364483, 0.0023323101922869682, -0.002054555108770728, 0.007194583769887686, 0.02261987142264843, -0.0005539496778510511, -0.013665132224559784, -0.03848207741975784, -0.03701736032962799, -0.005704901181161404, 0.08209066092967987, 0.007552440278232098, -0.0030168150551617146, 0.016503019258379936, -0.011676114052534103, -0.013465397991240025, -0.07257000356912613, 0.0804927870631218, 0.06970715522766113, 0.04553934186697006, -0.0010787714272737503, -0.01060254406183958, -0.046071965247392654, 0.03167447820305824, -0.025382857769727707, 0.08242354542016983, -0.04107861965894699, -0.04900139942765236, 0.0063706813380122185, 0.014139500446617603, 0.02363518625497818, -0.03571908921003342, -0.015096558257937431, -0.02027299627661705, 0.07190422713756561, 0.015654148533940315, -0.0040820627473294735, -0.034853577613830566, 0.03428766503930092, 0.012075582519173622, 0.10166458785533905, 0.025765681639313698, 0.012308605015277863, -0.06671114265918732, 0.0440080501139164, 0.0007760496810078621, 0.006487192586064339, 0.037982743233442307, 0.01775967888534069, -0.015096558257937431, 0.06754336506128311, 0.004835226107388735, 0.026647839695215225, -0.01593710482120514, 0.022503359243273735, 0.016944097355008125, -0.028145844116806984, -0.016810942441225052, -0.08029305189847946, 0.022436780855059624, 0.012017326429486275, -0.008243187330663204, -0.08262328058481216, -0.005942085292190313, -0.010860534384846687, 0.02261987142264843, 0.02714717388153076, -0.027646509930491447, -0.04600539058446884, -0.020289640873670578, -0.025948770344257355, 0.04940086603164673, 0.0195572841912508, -0.018259013071656227, -0.03758327290415764, 0.00896306149661541, 0.05266318842768669, 0.01925768330693245, 0.044640541076660156, 0.0008545909076929092, 0.013065929524600506, -0.011201746761798859, 0.016369862481951714, 0.018958082422614098, 0.03891483321785927, 0.048868242651224136, -0.01714383251965046, 0.04161124303936958, 0.0440080501139164, 0.02872840128839016, -0.0175266545265913, 0.0033205770887434483, -0.015104880556464195, -0.02458392083644867, -0.031041987240314484, 0.036984071135520935, -0.040512703359127045, -0.026880862191319466, -0.004385824780911207, -0.009920120239257812, 0.03748340532183647, 0.010402810759842396, -0.02536621317267418, -0.03961390256881714, -0.020456086844205856, 0.03328899294137955, 0.0003867244813591242, 0.0015770660247653723, 0.01784290000796318, 0.02255329303443432, -0.021421467885375023, 0.01676100865006447, 0.040412839502096176, -0.005247177556157112, -0.024450765922665596, 0.008621849119663239, -0.007548279128968716, -0.029077935963869095, 0.034786999225616455, 0.02481694519519806, -0.006911627482622862, 0.03465384244918823, -0.07456734776496887, 0.043242402374744415, 0.01644476316869259, 0.004369180183857679, 1.5157220332184806e-05, 0.013065929524600506, 0.0004051894648000598, -0.009970053099095821, -0.007244517095386982, -0.009853541851043701, 0.014056277461349964, -0.0011328660184517503, 0.01357358694076538, -0.0019297213293612003, 0.05432763695716858, -0.045905523002147675, -0.0280959103256464, 0.027529997751116753, -0.02018977515399456, -0.012025648728013039, -0.046604592353105545, 0.006840887945145369, 0.01365680992603302, 0.03531962260603905, 0.010377843864262104, 0.017826255410909653, 0.027979398146271706, 0.006208397448062897, -0.006915788631886244, 0.011434769257903099, -0.0048685153014957905, 0.008263993076980114, 0.006129336077719927, -0.04134492948651314, 0.015446092933416367, -0.020139841362833977, -0.0077688186429440975, 0.0006111651309765875, 0.06364855915307999, 0.03253998979926109, 0.0055842287838459015, -0.01722705364227295, -0.02363518625497818, -0.027896177023649216, 0.028611889109015465, -0.03608527034521103, -0.0007235154625959694, 0.020639175549149513, -0.05369514599442482, 0.023219073191285133, 0.02223704755306244, -0.05319581180810928, -0.006299941800534725, 0.04037955030798912, 0.014730379916727543, -7.659069524379447e-05, 0.045605920255184174, 0.01123503502458334, 0.017826255410909653, -0.010261332616209984, -0.023968074470758438, -0.002517480170354247, -0.000666300009470433, 0.03661789372563362, -0.01566247083246708, 0.03515317663550377, -0.04211057722568512, -0.03591882437467575, -0.04194413125514984, 0.011060267686843872, 0.06334895640611649, -0.013207408599555492, -0.02082226611673832, 0.0014563935110345483, -0.04710392653942108, -0.012300282716751099, -0.019157815724611282, -0.037450116127729416, -0.0020732800476253033, -0.02558259107172489, 0.02137153409421444, 0.00516395503655076, -0.013598553836345673, 0.002746341982856393, -0.03452068567276001, 0.01887485943734646, 0.015754016116261482, 0.021338244900107384, -0.009820252656936646, -0.0021200927440077066, 0.016145162284374237, 0.01785954460501671, 0.010003342293202877, 0.019224394112825394, 0.02543279156088829, 0.015803949907422066, -0.008971383795142174, 0.04314253479242325, 0.02316913940012455, -0.008596882224082947, 0.029211092740297318, -0.017809610813856125, -0.008209898136556149, -0.014930113218724728, 0.0056508067063987255, 0.006266653072088957, 0.02168777957558632, 0.017909478396177292, -0.009445752017199993, -0.005742351524531841, 0.064014732837677, 0.040113236755132675, 0.03262321278452873, 0.017193764448165894, 0.015163136646151543, 0.00706558907404542, 0.0049309320747852325, 0.03060922957956791, 0.05535959452390671, -0.002513319021090865, 0.0076356627978384495, -0.019507350400090218, 0.012441761791706085, 0.00672853784635663, -0.012275316752493382, -0.058522049337625504, -0.052629899233579636, 0.010768989101052284, 0.03263985738158226, -0.07117186486721039, -0.01767645590007305, 0.0012358538806438446, -0.014497356489300728, -0.007806268986314535, -0.010061598382890224, -0.02473372220993042, -0.02270309440791607, -0.049267709255218506, 0.021721068769693375, -0.03052600659430027, -0.013149152509868145, -0.015554281882941723, 0.01036952156573534, -0.0008384665125049651, -0.004643814638257027, 0.013215729966759682, -0.048102594912052155, -0.035186465829610825, -0.003326818812638521, 0.02435089834034443, -0.002663119463250041, 0.02080562151968479, -0.016885841265320778, -0.0047353594563901424, -0.015329581685364246, 0.03605198115110397, -0.020023329183459282, -0.008588559925556183, -0.021105222404003143, -0.010194754227995872, 0.003372591221705079, -0.00025655931676737964, -0.01832559145987034, -0.00812667515128851, -0.012375183403491974, 0.060685835778713226, 0.042310312390327454, 0.009221050888299942, 0.0385153666138649, 0.04061257094144821, 0.018641836941242218, 0.031724411994218826, -0.0021367373410612345, 0.0009669412393122911, -0.01678597554564476, -0.02684757299721241, -0.004814420826733112, 0.006254169624298811, 0.05955401062965393, -0.0023614380042999983, -0.00022327032638713717, -0.06048610061407089, -0.02120508812367916, -0.015371193177998066, -0.01240847259759903, -0.005946246441453695, -0.009903475642204285, 0.029294313862919807, 0.024950100108981133, -0.013049285858869553, -0.0555926188826561, 0.003399638459086418, -0.01608690619468689, 0.0032748046796768904, -0.018425457179546356, 0.022270336747169495, 0.0204227976500988, 0.006820082664489746, 0.028512023389339447, -0.03954732418060303, 0.007435929030179977, 0.001392936334013939, -0.003626419696956873, -0.006974044255912304, -0.01699403114616871, -0.03328899294137955, -0.008409632369875908, 0.012192093767225742, 0.004880998749285936, -0.04484027251601219, 0.02230362594127655, 0.023502029478549957, -0.043475426733493805, -0.0020847232080996037, -0.007723046466708183, -0.003626419696956873, 0.019124526530504227, -0.001357566798105836, -0.009737030602991581, -0.04314253479242325, 0.007057266775518656, -0.02653132751584053, 0.022270336747169495, 0.051930829882621765, 0.0011536716483533382, 0.009029639884829521, -0.019191104918718338, 0.0031728572212159634, 0.002700569573789835, 0.022087248042225838, -0.022170469164848328, 0.013556942343711853, 0.002079521771520376, 0.06581234186887741, 0.015421126037836075, -0.01769310049712658, 0.0013981377705931664, 0.01581227220594883, -0.021737713366746902, 0.021721068769693375, -0.014355878345668316, -0.001783041749149561, -0.004743681754916906, -0.013590231537818909, -0.021771002560853958, -0.0385153666138649, -0.007981035858392715, 0.012691428884863853, -0.004581397864967585, -0.01900801621377468, 0.013856543228030205, -0.001703980378806591, 0.026980729773640633, -0.009196084924042225, 0.03904798999428749, 0.019690439105033875, 0.040978752076625824, -0.018275657668709755, 0.013215729966759682, -0.026265015825629234, -0.0032331934198737144, -0.033155836164951324, -0.08382168412208557, -0.05579235404729843, 0.017426788806915283, -0.014181111007928848, 0.0460386797785759, 0.024517344310879707, -0.021854223683476448, -0.019124526530504227, 0.009728708304464817, -0.0014636754058301449, -0.0008504297584295273, -0.01785954460501671, 0.0157040823251009, -0.023918142542243004, 0.04627170041203499, -0.004926770925521851, 0.015629181638360023, 0.005209727678447962, -0.019590573385357857, -0.008189092390239239, -0.0212883111089468, 0.04737023636698723, -0.004298441112041473, 0.006624509580433369, -0.0024987549986690283, -0.02300269529223442, -0.011792626231908798, -0.011559602804481983, 0.036285001784563065, 0.001668610842898488, 0.02739684097468853, 0.030476072803139687, -0.017709745094180107, -0.002511238446459174, -0.022436780855059624, 0.046837612986564636, -0.02033957466483116, -0.010186431929469109, 0.014056277461349964, 0.009745352901518345, -0.009528974071145058, 0.04404133930802345, -0.0009924281621351838, 0.014222722500562668, -0.022653160616755486, -0.045605920255184174, 0.002507077297195792, 0.009462396614253521, 0.002373921452090144, -0.07203738391399384, 0.008696749806404114, -0.01879163645207882, 0.0347537100315094, -0.021654490381479263, 0.012633172795176506, 0.013015996664762497, 0.0020389507990330458, 0.034553974866867065, -0.014181111007928848, 0.01145973615348339, 0.001737269340083003, -0.006170947104692459, 0.02300269529223442, 0.05456066131591797, -0.038781676441431046, -0.009037962183356285, 0.015562604181468487, 0.01847539097070694, 0.01284122932702303, -0.05049940198659897, 0.028711756691336632, -0.03811589628458023, 0.00354111660271883, -0.01617012917995453, 0.015512671321630478, 0.004331730306148529, 0.007390156388282776, 0.00023627383052371442, 0.0037949453108012676, 0.006445581559091806, 0.025798970833420753, 0.02010655216872692, -0.007311095017939806, 0.002606944413855672, -0.048102594912052155, -0.04181097447872162, 0.045040007680654526, 0.02693079598248005, 0.007073910906910896, 0.0010382004547864199, -0.014588901773095131, -0.02316913940012455, 0.022969406098127365, -0.02849537879228592, -0.0006590180564671755, 0.011160135269165039, 0.04117848351597786, -0.010635833255946636, 0.012616528198122978, 0.004623008891940117, 0.0007625260041095316, -0.016369862481951714, -0.012466727755963802, -0.02230362594127655, 0.031275007873773575, -0.007881169207394123, -0.000979944714345038, 0.015795627608895302, 0.009645486250519753, -0.015587571077048779, -0.01924103870987892, -0.008159964345395565, -0.04513987526297569, -0.02230362594127655, -0.013365531340241432, 0.027430130168795586, 0.03585224598646164, -0.025715747848153114, -0.04753668233752251, 0.04374173656105995, -0.00034875422716140747, 0.015554281882941723, -0.008521982468664646, -0.0023531157057732344, -0.03234025835990906, -0.0019130768487229943, 0.009703741408884525, -0.0021325761917978525, 0.02942747063934803, -0.00496838241815567, 0.02167113497853279, 0.0047353594563901424, -0.012549950741231441, 0.03149138763546944, 0.04530632123351097, -0.02543279156088829, 0.036351580172777176, -0.031657833606004715, -0.021554622799158096, -0.0014199836878105998, -0.014996691606938839, 0.008168286643922329, -0.011326580308377743, 0.0489681102335453, -0.008563593961298466, 0.019207749515771866, 0.006254169624298811, -0.003522391663864255, -0.04171111062169075, 0.018641836941242218, -0.024217743426561356, -0.009204406291246414, -0.04091217368841171, 0.035020019859075546, 0.008779971860349178, -0.010860534384846687, 0.01365680992603302, -0.05079900473356247, -0.02691415138542652, 0.004585559014230967, -0.001785122323781252, 0.006483031436800957, -0.028079265728592873, -0.01032791007310152, 0.03938087821006775, 0.00528462789952755, 0.03951403498649597, 0.01678597554564476, 0.006516320630908012, 0.0015042463783174753, -0.0028316450770944357, 0.0144807118922472, 0.02769644185900688, -0.004071659874171019, 0.017260342836380005, -0.001238974742591381, -0.04194413125514984, -0.00508489366620779, -0.0009216890321113169, -0.004019645974040031, 0.020239708945155144, -0.017559943720698357, 0.013948088511824608, 0.031807634979486465, 0.02604863792657852, -0.02027299627661705, 0.009820252656936646, -0.005542617291212082, -0.021088577806949615, 0.019906818866729736, -0.017809610813856125, 0.012782973237335682, -0.011284968815743923, -0.03804931789636612, 0.018924793228507042, -0.02676435001194477, 0.005059927236288786, 0.011984037235379219, 0.005800607148557901, -0.008438759483397007, -0.020705753937363625, 0.015795627608895302, -0.021820934489369392, 0.023851564154028893, -0.022270336747169495, -0.02175435796380043, 0.020223064348101616, -0.0296771377325058, 0.0012171288253739476, 0.019191104918718338, 0.005159793887287378, -0.014921790920197964, 0.03764985129237175, -0.010419455356895924, -0.024633854627609253, 0.0347537100315094, -0.031341586261987686, -0.022819604724645615, 0.0010558852227404714, -0.01870841346681118, -0.028978068381547928, 0.012891163118183613, 0.017043964937329292, 0.047470103949308395, -0.016669463366270065, 0.01549602672457695, -0.004776970483362675, 0.016802620142698288, 0.03788287565112114, -0.005313755478709936, 0.028129199519753456, -0.02684757299721241, -0.006112691480666399, 0.02904464676976204, -0.014738702215254307, 0.0016207578592002392, -0.008971383795142174, -0.02395143173635006, -0.006915788631886244, 0.026947440579533577, 0.004772809334099293, 0.030476072803139687, -0.013507009483873844, 0.02316913940012455, -0.009429107420146465, 0.028512023389339447, 0.00027411404880695045, 0.008929772302508354, 2.145579674106557e-05, -0.024833589792251587, -0.011351547203958035, 0.006657798774540424, -0.02153797820210457, -0.0037283673882484436, 0.0067826323211193085, -0.027729731053113937, -0.02245342545211315, 0.001668610842898488, -0.0011880010133609176, -0.0021065690089017153, -0.025166479870676994, -0.0408455953001976, 0.016652818769216537, -0.02691415138542652, 0.0263648834079504, -0.01900801621377468, -0.005267983302474022, 0.002604863839223981, 0.06098543480038643, 0.0263648834079504, 0.016536308452486992, 0.00034693372435867786, -0.00916279572993517, -0.01522971410304308, -0.00823486503213644, -0.0011827995767816901, 0.009012995287775993, 0.0007438009488396347, -0.006695248652249575, 0.004764487035572529, 0.0031000375747680664, 0.02137153409421444, 0.011517991311848164, 0.003613936249166727, -0.028828268870711327, -0.011984037235379219, -0.01025301031768322, 0.027513353154063225, -0.006803438067436218, -0.0021429790649563074, -0.015737371519207954, -0.0033143353648483753, -0.02606528252363205, 0.001851700246334076, -0.01676100865006447, 0.027430130168795586, -0.007344384212046862, -0.012633172795176506, 0.019707083702087402, 0.0018402572022750974, -0.01052764430642128, 0.022270336747169495, -0.013640165328979492, -0.010311265476047993, -0.009595552459359169, 0.030076606199145317, 0.016652818769216537, -0.009404140524566174, -0.0312916524708271, 0.021404823288321495, 0.023385517299175262, -0.004369180183857679, -0.014996691606938839, -0.032140523195266724, -0.0002551289217080921, -4.557731517706998e-05, -0.0010766908526420593, 0.004323408007621765, 0.003412121906876564, -0.02866182290017605, -0.004993348848074675, -0.00530127203091979, 0.01987352967262268, 0.017160475254058838, -0.0036825949791818857, 0.02832893282175064, -0.013548620045185089, -0.0361851342022419, -0.002802517032250762, -0.0015021658036857843, 0.02395143173635006, -0.0020909649319946766, 0.009570585563778877, -0.018808281049132347, -0.0064330981113016605, -0.01995675079524517, 0.03249005600810051, 0.004208977334201336, 0.02559923566877842, -0.004406630527228117, -0.006166785955429077, -0.001205685781314969, -0.010436099022626877, -0.02308591641485691, 0.005679934751242399, 0.006969883106648922, -0.019074592739343643, 0.01648637466132641, 0.02676435001194477, 0.006050274707376957, 0.01173437014222145, 0.0005183200119063258, 0.026564616709947586, -0.02982693910598755, -0.0020285481587052345, -0.006607864983379841, 0.017276987433433533, -0.02621508203446865, -0.014489034190773964, -0.0028919812757521868, -0.01373170968145132, -0.0003162454522680491, -0.056458134204149246, 0.010577578097581863, 0.009104539640247822, 0.03974705934524536, 0.013348886743187904, -0.01259988360106945, -0.019307617098093033, -0.006037791259586811, -0.029061291366815567, 0.0032061461824923754, 0.03521975502371788, 0.029477404430508614, 0.01490514725446701, -0.0017570346826687455, 0.010003342293202877, -0.053661856800317764, 0.0009752634796313941, -0.014097888953983784, 0.013798288069665432, 0.03144145384430885, 0.007227872498333454, 0.02589883655309677, 0.01275800634175539, -0.0391145683825016, 0.004142398945987225, 0.006957399658858776, -0.01474702451378107, 0.015970394015312195, -0.03725038468837738, -0.002413452137261629, 0.002881578402593732, 0.0110769122838974, -0.017942767590284348, 0.025549301877617836, -0.007956069894134998, 0.007956069894134998, 0.015196425840258598, 0.018675126135349274, -0.008322248235344887, 0.014372522942721844, 0.02120508812367916, -0.02701401896774769, 0.016752686351537704, 0.005209727678447962, -0.03515317663550377, -0.004843548405915499, 0.022603226825594902, -0.01232524961233139, 0.003605614183470607, 0.011326580308377743, -0.004851870704442263, 0.008114192634820938, -0.008338892832398415, -0.005600873380899429, 0.016353217884898186, -0.03954732418060303, -0.01989017426967621, -0.020023329183459282, 0.008954739198088646, -0.010294620878994465, 0.011401480063796043, -0.030625874176621437, 0.0023926463909447193, 0.008613526821136475, 0.004897643346339464, 0.005742351524531841, -0.0011276646982878447, -0.014771990478038788, 0.011476380750536919, -0.03741682693362236, -0.03402135148644447, 0.037683140486478806, -0.02559923566877842, -0.036285001784563065, 0.04454067349433899, 0.007132166996598244, -0.014280978590250015, -0.0031146013643592596, -0.0030563457403331995, -0.004414952825754881, 0.037283673882484436, -0.024717077612876892, -0.001762236119247973, 0.016095228493213654, -0.022669805213809013, -0.0037554146256297827, 0.01621174067258835, -0.019474061205983162, 0.000944575178436935, -0.018641836941242218, -0.013049285858869553, 0.0006049234070815146, -0.02959391474723816, 0.006141819525510073, -0.012974385172128677, -0.0337383933365345, -0.035253044217824936, 0.027663154527544975, 0.009071250446140766, -0.00841379351913929, -0.033455438911914825, 0.0334387943148613, 0.008355537429451942, 0.038948122411966324, -0.052163854241371155, 0.019191104918718338, 0.016902485862374306, 0.01900801621377468, -0.017160475254058838, 0.03661789372563362, -0.00848869327455759, 0.057889558374881744, 0.0023260684683918953, -0.026015348732471466, 0.02613185904920101, 0.004914287477731705, -0.034320950508117676, 0.0030272179283201694, 0.014297622255980968, 0.0002237904554931447, 0.007057266775518656, -0.010194754227995872, -0.018209079280495644, 0.04314253479242325, -0.01593710482120514, -0.023219073191285133, -0.017643166705965996, 0.012733040377497673, 0.022669805213809013, 0.009320918470621109, -0.013939766213297844, -0.023701762780547142, 0.002783792093396187, -0.011368190869688988, -0.015620860271155834, 0.004581397864967585, -0.0021679457277059555, -0.01432258915156126, -0.01041113305836916, 0.01393144391477108, 0.006012824364006519, 0.029610559344291687, -0.0361851342022419, 0.01393144391477108, -0.04064586013555527, -0.00183505576569587, -0.03257327899336815, -0.012991029769182205, -0.02010655216872692, -0.0031707766465842724, 0.002373921452090144, 0.0029731232207268476, 0.010719056241214275, 0.04157795384526253, 0.01416446641087532, 0.004764487035572529, 0.06304935365915298, 0.018891504034399986, 0.0032103073317557573, -0.02754664234817028, -0.008051775395870209, -0.04294280335307121, 0.0074276067316532135, 0.02401800826191902, -0.01236686110496521, 0.01150134764611721, -0.010469388216733932, -0.03605198115110397, -0.002673522336408496, 0.0428762249648571, 0.001795525080524385, 0.011268324218690395, -0.009387495927512646, 0.02088884264230728, 0.019474061205983162, -0.0320073664188385, -0.02065582014620304, -0.023368872702121735, 0.0066453153267502785, 0.01934090442955494, -0.0042214603163301945, 0.0011131006758660078, -0.00037866231286898255, 0.019374193623661995, -0.01721040904521942, 0.002648555440828204, 0.023435451090335846, 0.019124526530504227, 0.0331391915678978, -0.011576247401535511, -0.03387155011296272, -0.0041486406698822975, -0.0008285838412120938, 0.029926804825663567, -0.03237354755401611, 0.009212728589773178, 0.031041987240314484, 0.02488352358341217, -0.02982693910598755, 0.004163204692304134, 0.004000920802354813, 0.025632524862885475, 0.026398172602057457, 0.0019172379979863763, -0.004856031853705645, -0.025848902761936188, 0.0019942186772823334, -0.008014325052499771, -0.0003568163956515491, 0.0010985367698594928, -0.0022366042248904705, -0.011800948530435562, 0.015446092933416367, -0.02583225816488266, 0.009112861938774586, -0.014397489838302135, 0.021820934489369392, -0.0019234796054661274, -0.030176471918821335, -0.019141171127557755, 0.029460759833455086, -0.004427436273545027, 0.015762338414788246, 0.036584604531526566, -0.037050649523735046, 0.0651465579867363, 0.03402135148644447, -0.009454074315726757, -0.023285651579499245, 0.006200075149536133, 0.011176779866218567, -0.046837612986564636, -0.001363808405585587, 0.02152133360505104, -0.00951232947409153, -0.001845458522439003, -0.0013606876600533724, -0.014330911450088024, 0.013174119405448437, 0.02175435796380043, 0.0067118932493031025, 0.03928101062774658, 0.016794297844171524, 0.03124172054231167, -0.008226542733609676, -0.014014665968716145, -0.008738360367715359, 0.015079913660883904, 0.006158463656902313, 0.0022282819263637066, 0.013507009483873844, 0.0005060967523604631, 0.011476380750536919, 0.004485691897571087, -0.02503332309424877, 0.007802107837051153, -0.012932773679494858, 0.04367515817284584, -0.011151812970638275, -0.018175790086388588, 0.0033205770887434483, -0.023818274959921837, -0.008713394403457642, -0.02308591641485691, 0.004552269820123911, 0.012491694651544094, 0.007090555503964424, -0.021970735862851143, 0.03258992359042168, -0.0022532488219439983, -0.0015021658036857843, -0.0022324430756270885, 0.04154466465115547, -0.03685091435909271, 0.03255663439631462, 0.0599534772336483, 0.003990517929196358, -0.0021658651530742645, 0.012316927313804626, -0.035818956792354584, 0.03154132142663002, -0.015504349023103714, 0.006408131215721369, -0.012807940132915974, -0.018575258553028107, -0.0006756625371053815, 0.003705481067299843, -0.00993676483631134, 0.003570244647562504, 0.016686107963323593, 0.027996042743325233, -0.01236686110496521, -0.03152467682957649, 0.007839557714760303, 0.004344213753938675, -0.0003383514122106135, 0.010044953785836697, 0.0030501040164381266, 0.03492015600204468, -0.011135168373584747, 0.028195777907967567, 0.012042293325066566, -0.0037491729017347097, -0.012433439493179321, -0.0036430642940104008, 0.020838910713791847, 0.0015583409694954753, -0.01815914548933506, -0.016353217884898186, 0.01942412741482258, 0.013748354278504848, 0.004319246858358383, -0.018458746373653412, -0.011251679621636868, -0.011101879179477692, -0.037916164845228195, 0.0012733039911836386, -0.001184880151413381, -0.003466216381639242, -0.030426140874624252, -0.032140523195266724, -0.0011505507864058018, -0.025865547358989716, -0.021504689007997513, -0.010968723334372044, 0.0131824417039752, 0.03961390256881714, 0.006133497226983309, 0.0057257069274783134, 0.021071933209896088, 0.01847539097070694, 0.01295774057507515, -0.04350871592760086, 0.01400634367018938, 0.01413117814809084, -0.02480030059814453, 0.0005752753932029009, -0.02067246474325657, -0.008813261054456234, -0.019856885075569153, 0.010244688019156456, 0.0050765713676810265, -0.0033122547902166843, -0.026647839695215225, 0.019474061205983162, 0.015828916803002357, -0.041378218680620193, 0.015412803739309311, -0.0334387943148613, -0.02817913331091404, -0.018741702660918236, -0.011218390427529812, -0.017792966216802597, 0.007444251328706741, 0.04307595640420914, -0.029876871034502983, 0.032839592546224594, -0.02629830501973629, 0.02942747063934803, -0.006299941800534725, -0.01784290000796318, 0.0042901188135147095, -0.010885501280426979, 0.0011443091789260507, 0.013507009483873844, -0.004389985930174589, -0.02644810453057289, -0.021321600303053856, 0.01847539097070694, -0.03638486936688423, 0.007119683548808098, -0.015246358700096607, -0.0038719261065125465, -0.03811589628458023, 0.0015250520082190633, 0.02646474912762642], "index": 81}, {"title": "BATRAL-class landing ship", "text": "The B\u00e2timent de Transport L\u00e9ger \"\\Light ferry ship\") are small landing ships of the French Navy. They have been used for regional transport and patrol needs in French Overseas Departments and Territories since the 1970s. On 9 January 2014 it was announced that the two remaining Batrals in French service would be replaced in 2015/16 by three 1500-tonne B\u00e2timents Multimission (B2M) at a cost of ~\u20ac100m (US$136m).", "vector": [-0.047751978039741516, 0.010834340937435627, -0.013125896453857422, -0.0066219219006598, -0.026049597188830376, 0.006436575669795275, -0.013985229656100273, 0.0018176586600020528, -0.026369741186499596, 0.005151787772774696, 0.03194698318839073, 0.0035573875065892935, -0.007881435565650463, -0.007308546453714371, 0.012687805108726025, -0.024549975991249084, -0.032283976674079895, -0.0019324470777064562, 0.020169060677289963, -0.0037616898771375418, 0.015282654203474522, -0.01786065474152565, 0.007986745797097683, 0.006411300972104073, -0.02047235518693924, -0.0005544595769606531, 0.009216771461069584, -0.009924458339810371, 0.003178269835188985, -0.051795899868011475, 0.042629677802324295, 0.019343426451086998, -0.006874667014926672, -0.01559437345713377, 0.0015912411035969853, -0.050346825271844864, 0.017658459022641182, -0.012005393393337727, -0.05735629051923752, -0.01658007875084877, 0.008311102166771889, -0.03214917704463005, -0.012114915996789932, 0.04225898161530495, 0.0031508891843259335, -0.007607628125697374, -0.026740433648228645, 0.049403246492147446, 0.013858857564628124, -0.007738213054835796, -0.04020332172513008, 0.03341290354728699, -0.011264007538557053, 0.06530933827161789, 0.01652953028678894, 0.02165183238685131, 0.0517285019159317, 0.11821731179952621, -0.040978409349918365, -0.005236036144196987, -0.01973096840083599, -0.06116431951522827, 0.03545171394944191, -0.03418798744678497, -0.0099160335958004, 0.027212224900722504, 0.02158443257212639, 0.04947064444422722, -0.026049597188830376, 0.009562190622091293, -0.0010588967707008123, -0.029975570738315582, -0.0016628522425889969, -0.004473588429391384, 0.00903984997421503, 0.03535061702132225, 0.04967283830046654, -0.013496588915586472, -0.018315596505999565, 0.024870119988918304, 0.026150694116950035, 0.043101467192173004, 0.008736556395888329, 0.0069715529680252075, -0.0013985229888930917, 0.04306776821613312, -0.038686852902173996, -0.05068381875753403, -0.038417257368564606, -0.017523661255836487, -0.003631104715168476, 0.026689883321523666, 0.0364626944065094, 0.018163949251174927, -0.005526693072170019, 0.032115478068590164, 0.04124800115823746, -0.0008977717370726168, 0.007464405614882708, -0.005914235487580299, -0.03454183414578438, 0.013555563054978848, -0.034086890518665314, -0.00012874204549007118, 0.06756719201803207, 0.012173890136182308, -0.028374850749969482, 0.03636159747838974, -0.01961302012205124, 0.06611812114715576, -0.044921230524778366, -0.0517285019159317, -0.06062512844800949, -0.011213458143174648, -0.02591479942202568, -0.013210144825279713, -0.01279732771217823, -0.029891321435570717, 0.032873716205358505, 0.064803846180439, 0.015088883228600025, -0.015333203598856926, -0.01636945828795433, -0.01007610559463501, -0.013446040451526642, -0.05927715450525284, -0.013917830772697926, 0.04047291725873947, 0.02606644667685032, 0.035586513578891754, -0.055098436772823334, -0.05428965017199516, 0.0027612403500825167, -0.013597686775028706, -0.03235137462615967, 0.02655508741736412, -0.005412958096712828, -0.03157629072666168, -0.05853576958179474, 0.006377601530402899, -0.005252886097878218, -0.0546940416097641, 0.013151170685887337, 0.018905334174633026, 0.0028475949075073004, -0.027970459312200546, -0.003548962762579322, 0.015400602482259274, -0.003631104715168476, 0.005324496887624264, 0.06719650328159332, -0.00866073276847601, 0.07508214563131332, 5.1305942179169506e-05, 0.006276503670960665, 0.011078661307692528, -0.0721840038895607, 0.05698559805750847, 0.010994412936270237, -0.006786206271499395, 0.005821562372148037, -0.007809823844581842, -0.04205678775906563, -0.037675872445106506, -0.0033804660197347403, -0.009056700393557549, 0.043910250067710876, 0.03508102148771286, 0.022511165589094162, 0.010775366798043251, 0.015872392803430557, 0.004311410244554281, -0.026774132624268532, -0.03963043540716171, 0.04542672261595726, 0.011668399907648563, 0.024819569662213326, 0.07663232088088989, -0.04047291725873947, -0.008669157512485981, -0.010615294799208641, -0.023656941950321198, -0.013285968452692032, 0.022005675360560417, -0.057929180562496185, 0.0011900082463398576, 0.07737370580434799, 0.030312564224004745, -0.017877504229545593, -0.008871353231370449, -0.004802157171070576, -0.009216771461069584, -0.015821844339370728, -0.004650509916245937, -0.0029044626280665398, 0.050144631415605545, 0.0061290692538022995, -0.003018197836354375, 0.021095791831612587, -0.0046252356842160225, 0.01578814536333084, -0.04677469655871391, -0.047111690044403076, 0.012561432085931301, 0.047381285578012466, -0.04239378124475479, -0.014566543512046337, 0.03808026388287544, 0.012274987995624542, -0.030211465433239937, -0.026942629367113113, -0.02197197452187538, 0.014457020908594131, 0.03925974294543266, -0.013269118964672089, -0.008677582256495953, -0.0033657224848866463, -0.04697689041495323, 0.06237749382853508, -0.028341151773929596, 0.014482295140624046, 0.016596930101513863, -0.04111320525407791, 0.0046757846139371395, -0.04027072340250015, 0.026302341371774673, 0.005092814099043608, 0.02729647234082222, 0.0023231487721204758, -0.009267320856451988, -0.014347497373819351, 0.04178719222545624, -0.022999806329607964, -0.06541043519973755, -0.06692690402269363, -0.020725099369883537, 0.020219609141349792, -0.02352214604616165, -0.0009172541322186589, 0.022157322615385056, 0.009309445507824421, 0.027953609824180603, -0.020034262910485268, -0.0028497010935097933, 0.04229268431663513, -0.005193911958485842, -0.0001318355352850631, 0.010564745403826237, -0.02288185805082321, 0.0019514028681442142, 0.03471032902598381, -0.020910445600748062, 0.0021672893781214952, 0.022426916286349297, -0.0174899622797966, -0.002074616262689233, 0.011761073023080826, 0.05449184775352478, 0.04616810753941536, -0.0005828934372402728, -0.0026390801649540663, -0.03267151862382889, -0.026689883321523666, -0.01554382499307394, 0.023977085947990417, -0.0018650483107194304, -0.024297229945659637, -0.04296667128801346, -0.012443484738469124, -0.057389989495277405, -0.10507456958293915, -0.060490332543849945, -0.00410500168800354, 0.01897273398935795, -0.03538431599736214, 0.014313798397779465, 0.013606112450361252, 0.012418209575116634, -0.0022241570986807346, 0.03626050055027008, 0.015577523969113827, 0.01421270053833723, -0.011727373115718365, -0.006352327298372984, -0.029453231021761894, 0.07076863199472427, 0.028138956055045128, -0.033935245126485825, 0.03481142595410347, 0.00036147815990261734, -0.04077621176838875, 0.0428655706346035, 0.012965824455022812, -0.05594091862440109, 0.03653009235858917, -0.021786628291010857, 0.030936002731323242, -0.01319329533725977, -0.04552781954407692, -0.007430706173181534, -0.04549412056803703, 0.014010503888130188, -0.0187199879437685, -0.03182903304696083, 0.04920104891061783, 0.007498105056583881, 0.022915557026863098, 0.029133087024092674, -0.007388581987470388, 0.030481060966849327, 0.014305373653769493, -0.026959478855133057, -0.025527257472276688, -0.05799657851457596, 0.000583419983740896, 0.01437277253717184, 0.018046000972390175, -0.0333792045712471, -0.024617373943328857, 0.043371062725782394, -0.041450198739767075, -0.006183830555528402, -0.06814008206129074, 0.0032477746717631817, 0.026976328343153, -0.05071752145886421, 0.017607910558581352, -0.012965824455022812, -0.00906512513756752, -0.0005439285305328667, 0.01711084507405758, -0.03774327039718628, 0.021517034620046616, 0.006613497156649828, -0.0588727630674839, 0.013387066312134266, 0.0024389903992414474, -0.003885956248268485, -0.012308686971664429, 0.003744840156286955, 0.012148614972829819, -0.03760847449302673, -0.0017007640562951565, 0.010632144287228584, -0.004722121171653271, 0.03454183414578438, 0.01389255654066801, 0.01044679805636406, 0.007236935198307037, -0.04448314011096954, 0.0008519616676494479, 0.047583479434251785, 0.013757758773863316, -0.015653347596526146, 0.07824988663196564, -0.042461179196834564, 0.021601282060146332, -0.025678902864456177, 0.007034739013761282, -0.01759105920791626, -0.023640092462301254, -0.03545171394944191, -0.03551911190152168, 0.024920668452978134, 0.032115478068590164, 0.008728131651878357, 0.010632144287228584, 0.014836138114333153, -0.04596590995788574, -0.00914094876497984, 0.01828189752995968, 0.004317729268223047, -0.011558876372873783, 0.046033311635255814, 0.022528015077114105, 0.0016228342428803444, 0.028408551588654518, -0.0052865855395793915, -0.02276390977203846, -0.003319385927170515, 0.0293184332549572, 0.01554382499307394, -0.03642899543046951, -0.038046564906835556, 0.042629677802324295, 0.0316605381667614, 0.0014596030814573169, 0.007965683937072754, 0.007060013711452484, 0.010868039913475513, 0.07959786057472229, -0.021769778802990913, 0.04498863220214844, 0.010960713028907776, -0.02953747846186161, -0.0324019230902195, 0.001092069549486041, -0.04128170385956764, -0.011895869858562946, -0.0013616642681881785, -0.002626443048939109, -0.011339831165969372, 0.00860597100108862, 0.026622485369443893, -0.0008972451323643327, -0.015105732716619968, 0.013210144825279713, -0.007156899198889732, -0.01930972747504711, -0.042730774730443954, -0.04229268431663513, -0.01978151686489582, 0.019208628684282303, -0.017304616048932076, -0.027582917362451553, -0.038518354296684265, 0.00534555921331048, 0.009309445507824421, -0.048864055424928665, -0.0034583956003189087, -0.009536915458738804, 0.027010027319192886, -0.057558488100767136, 0.07285799086093903, 0.050784919410943985, -0.017978603020310402, 0.031171897426247597, -0.017093993723392487, -0.018433542922139168, -0.007266422268003225, 0.05530063062906265, -0.021500185132026672, -0.04495492950081825, -0.022477464750409126, 0.032385073602199554, -0.00670617027208209, 0.04714538902044296, -0.006432363297790289, 0.002014589263126254, 0.01117133442312479, -0.02330309897661209, 0.03113819845020771, -0.03433963656425476, 0.006878879386931658, -0.026740433648228645, -0.014600242488086224, 0.03417113795876503, 0.010244602337479591, 0.022999806329607964, 0.009326294995844364, 0.0027633465360850096, 0.03727148100733757, -0.031475190073251724, -0.022207871079444885, -0.010943863540887833, -0.005985846742987633, 0.008277402259409428, -0.003563706064596772, -0.04677469655871391, 0.034845124930143356, -0.015569099225103855, -0.009772811084985733, 0.006554523482918739, -0.00845432374626398, 0.00667668366804719, -0.02409503422677517, -0.056749701499938965, -0.043371062725782394, 0.0022747060284018517, 0.002367379143834114, -0.0357213094830513, -0.03428908810019493, -0.05688450112938881, 0.03437333554029465, -0.01609986461699009, -0.012940550222992897, -0.03471032902598381, 0.03278946503996849, -0.015813419595360756, -0.02222472056746483, 0.03619309887290001, -0.024549975991249084, 0.02761661633849144, -0.013606112450361252, 0.0036858662497252226, 0.01668117754161358, -0.03102025017142296, 0.016226235777139664, -0.012401360087096691, -0.004401977639645338, 0.03642899543046951, -0.025443008169531822, 0.0007845629588700831, -0.009545340202748775, -0.005236036144196987, -0.04030442237854004, -0.033177006989717484, 0.004511500243097544, -0.03086860291659832, 0.009932883083820343, -0.03471032902598381, -0.017776407301425934, 0.05577242374420166, 0.0246342234313488, -0.01961302012205124, 0.020590301603078842, -0.030986551195383072, 0.03791176900267601, 0.013538713566958904, -0.00706422608345747, -0.0021988824009895325, -0.03555281460285187, -0.01929287798702717, -0.021685531362891197, 0.0085006607696414, 0.0068915169686079025, 0.03551911190152168, -0.029823923483490944, -0.06231009587645531, 0.0020998907275497913, -0.006108006928116083, -0.002236794214695692, -0.03939453884959221, -0.013900981284677982, -0.007384369615465403, 0.018248196691274643, 0.011238732375204563, 0.020135361701250076, 0.056817103177309036, -0.04930214583873749, 0.025173412635922432, 0.03460923209786415, -0.019983714446425438, 0.03882164880633354, -0.00927574560046196, 0.04377545416355133, -0.03528321906924248, -0.006815693341195583, -0.04792047291994095, 0.022426916286349297, 0.019899465143680573, -0.006710382644087076, 0.05405375361442566, -0.008504873141646385, -0.0045957486145198345, -0.00557302962988615, 0.06335477530956268, 0.011415654793381691, -0.03359825164079666, -0.041820891201496124, -0.018534641712903976, -0.02532505989074707, -0.0023736979346722364, 0.023100903257727623, -0.007447556126862764, 0.0008166826446540654, 0.026083296164870262, -0.019174929708242416, 0.021634981036186218, 0.020708249881863594, -0.01319329533725977, 0.010868039913475513, 0.006529248785227537, 0.01743941381573677, 0.0018208179390057921, -0.004734758287668228, 0.00090303726028651, 0.021180041134357452, -9.319976379629225e-05, 0.02101154439151287, 0.002466371050104499, 0.019596170634031296, 0.0017039233352988958, -0.044011350721120834, -0.020236458629369736, 0.010960713028907776, 0.008761830627918243, 0.0174899622797966, -0.018046000972390175, 0.005787862930446863, -0.0024979643058031797, -0.04030442237854004, 0.012595131993293762, 0.02121374011039734, 0.028172655031085014, -0.0010910164564847946, -0.025813700631260872, -0.021028393879532814, 0.0485270619392395, -0.04111320525407791, -0.029031988233327866, 0.0010836446890607476, 0.029503779485821724, -0.040607716888189316, 0.03501362353563309, 0.028138956055045128, -0.022089922800660133, 0.025341909378767014, 0.03693448752164841, -0.002132536843419075, -0.013757758773863316, 0.04714538902044296, 0.019865766167640686, 0.0406414158642292, 0.025830550119280815, 0.016765426844358444, -0.006794631015509367, 0.0046757846139371395, -0.012831026688218117, 0.00807520654052496, -0.03167738765478134, 0.013446040451526642, 0.0054087452590465546, 0.04984133690595627, 0.0032456684857606888, 0.04222528263926506, 0.008012020029127598, -0.007468617986887693, 0.006916791200637817, -0.04808897152543068, 0.022359518334269524, -0.01242663525044918, 0.04397765174508095, -0.01335336733609438, -0.03390154615044594, -0.03245247155427933, 0.010295150801539421, 0.026201244443655014, 0.013395491056144238, 0.02271336130797863, 0.04057401418685913, 0.0470442920923233, 0.009461091831326485, -0.01802915148437023, 0.0023062992841005325, -0.04151759669184685, -0.011727373115718365, -0.01818079873919487, 0.034575533121824265, -0.004418827127665281, -0.003597405506297946, -0.044550538063049316, 0.025560956448316574, -0.04330366477370262, -0.027060577645897865, -0.0205734521150589, -0.00154911691788584, -0.002145174192264676, 0.013707210309803486, 0.03824876248836517, -0.03491252660751343, 0.03310960903763771, 0.020708249881863594, 0.007384369615465403, 0.04124800115823746, 0.005299222655594349, -0.012544582597911358, 0.00593108544126153, 0.013681935146450996, -0.010775366798043251, -0.04525822401046753, -0.04084360972046852, -0.04178719222545624, -0.011954843997955322, 0.005248673725873232, -0.022511165589094162, -0.017557360231876373, -0.0037174595054239035, -0.011120785027742386, -0.010312000289559364, 0.03545171394944191, -0.011137634515762329, -0.014794014394283295, -0.03481142595410347, -0.007847735658288002, 0.029655426740646362, -0.020910445600748062, -0.019916314631700516, 0.00508017698302865, -0.012005393393337727, 0.006899941712617874, -0.03149203956127167, 0.0036879724357277155, 0.00028670774190686643, -0.003083490300923586, -0.02643713913857937, -0.02399393543601036, -0.010092955082654953, -0.010859615169465542, -0.023235701024532318, -0.0023715917486697435, -0.003142464207485318, -0.008222641423344612, 0.024769021198153496, 0.0333792045712471, 0.016824400052428246, 0.00603639567270875, 0.011718948371708393, 0.0009930776432156563, -0.013285968452692032, 0.021146342158317566, 0.002685416955500841, -0.030295714735984802, 0.0016007190570235252, 0.004035497084259987, 0.002546407049521804, -0.002091465750709176, -0.059614147990942, 0.014296948909759521, 0.02224157005548477, -0.0008930327603593469, -0.0043851276859641075, 0.04158499464392662, 0.01866943947970867, -0.0182313472032547, 0.023640092462301254, -0.004054452758282423, 0.03700188547372818, -0.03096970170736313, 0.011685249395668507, -0.007835098542273045, 0.04165239632129669, 0.01433907262980938, 0.004612598568201065, -0.01626836135983467, 0.02069140039384365, -0.006929428782314062, -0.010472072288393974, -0.005349771585315466, 0.0006945225177332759, -0.02766716480255127, 0.0025864250492304564, -0.0039407177828252316, 0.028273753821849823, 0.021078942343592644, 0.047313883900642395, -0.022679662331938744, 0.0031319332774728537, -0.0033909969497472048, 0.004248224198818207, -0.0014006291748955846, 0.02793676033616066, -0.0475497804582119, -0.004031284712255001, -0.03747367486357689, 0.006124856416136026, 0.007889860309660435, -0.0026980540715157986, 0.007902497425675392, 0.02335364930331707, -0.012687805108726025, -0.04158499464392662, 0.019714118912816048, -0.03273891657590866, -0.024600524455308914, 0.016445282846689224, 0.022157322615385056, -0.027380721643567085, 0.005926873069256544, 0.04168609529733658, -0.0035363254137337208, 0.033025361597537994, 0.045831114053726196, 0.012519308365881443, 0.02190457656979561, -0.03221657872200012, 0.01545957662165165, -0.051357805728912354, 0.0014827713603153825, 0.012788902968168259, 0.0045746867544949055, 0.009907608851790428, 0.04404504969716072, -0.05698559805750847, 0.02805470861494541, 0.027212224900722504, 0.013614537194371223, 0.015602798201143742, -0.0023905476555228233, 0.019663570448756218, 0.02761661633849144, 0.022578563541173935, -0.006255441810935736, -0.021988825872540474, 0.01652110554277897, 0.01865258999168873, 0.007455980870872736, -0.028644446283578873, -0.0011447247816249728, -0.02015221118927002, 0.060692526400089264, 0.003928080201148987, 0.006836755201220512, 0.004869556054472923, 0.02089359611272812, 0.014010503888130188, 0.034036342054605484, 0.01578814536333084, -0.054087456315755844, 0.0059395101852715015, 0.036867085844278336, -0.014204275794327259, -0.03081805445253849, 0.018062850460410118, 0.018315596505999565, 0.0008351120050065219, 0.0006466062623076141, -0.02293240651488304, -0.00989075843244791, 0.0026348677929490805, 0.008778680115938187, -0.005800500512123108, 0.0015312141040340066, 0.0027043726295232773, -0.006908366456627846, -0.0014975147787481546, -0.009326294995844364, -0.06116431951522827, 0.022477464750409126, 0.00716953631490469, 0.004237693268805742, 0.020506054162979126, 0.024330928921699524, 0.00844589900225401, -0.04377545416355133, -0.007418069057166576, 0.04121430218219757, 0.021196890622377396, -0.011710523627698421, 0.0021335899364203215, -0.005311859771609306, -0.00044677965342998505, 0.03290741518139839, -0.02687523141503334, -0.039967428892850876, 0.026268642395734787, 0.0013879919424653053, 0.01807969994843006, -0.012805752456188202, 0.05570502206683159, -0.0341205894947052, -0.012114915996789932, 0.027127975597977638, -0.022426916286349297, 0.00393018638715148, -0.015569099225103855, 0.026521386578679085, 0.0021588646341115236, -0.014414896257221699, 0.02357269451022148, 0.03449128195643425, 0.024769021198153496, 0.027852511033415794, 0.03108764998614788, -0.006874667014926672, -0.018534641712903976, 0.007776124868541956, 0.02714482508599758, -0.01154202688485384, 0.0025843188632279634, -0.020489204674959183, -8.082578278845176e-05, -0.0003733256016857922, 0.016032464802265167, -0.001048365724273026, 5.525508458958939e-05, -0.007211660500615835, 0.01060687005519867, 0.039158642292022705, 0.02842540107667446, 0.055536527186632156, -0.016487406566739082, -0.022966105490922928, 0.018467243760824203, 0.040978409349918365, 0.013446040451526642, 0.003580555785447359, -0.0043050916865468025, 0.0331433080136776, -0.013934680260717869, -0.022831309586763382, 0.01389255654066801, -0.03444073349237442, 0.010834340937435627, 0.0035763434134423733, 0.02234266884624958, -0.007308546453714371, 0.036327898502349854, 0.025662053376436234, -0.033345505595207214, -0.0023105116561055183, 0.041349101811647415, -0.0024179283063858747, -0.0029149935580790043, -0.014482295140624046, -0.009781235828995705, 0.04380915313959122, -0.014457020908594131, -0.03774327039718628, -0.036395296454429626, -0.004172400571405888, -0.027262773364782333, -0.014937235973775387, -0.0026011685840785503, 0.02202252484858036, 0.008702856488525867, -0.03700188547372818, 0.01578814536333084, 0.01005083043128252, 0.017287766560912132, 0.01695919781923294, -0.02000056393444538, -0.032604120671749115, -0.023067204281687737, -0.008563847281038761, -0.01178634725511074, 0.013513438403606415, -0.0016565335681661963, -0.007569716311991215, -0.021887727081775665, -0.005501418840140104, -0.005897385999560356, 0.032553572207689285, -0.03160998970270157, -0.04367435723543167, -0.021786628291010857, -0.01770900748670101, 0.032115478068590164, 0.03230082616209984, 0.0005971103091724217, 0.00771715072914958, -0.03784436732530594, 0.005282372701913118, -0.006364964414387941, -0.011339831165969372, 0.029722824692726135, 0.02616754360496998, -0.031542591750621796, -0.027094276621937752, -0.04899885132908821, -0.03535061702132225, -0.0065713729709386826, 0.02805470861494541, -0.04077621176838875, -0.0028433825355023146, -0.03460923209786415, -0.010682693682610989, 0.0110870860517025, -0.028122106567025185, 0.04640400409698486, 0.053716760128736496, -0.024920668452978134, -0.03368249908089638, 0.013917830772697926, 0.03491252660751343, -0.021230589598417282, -0.03619309887290001, -0.00922519713640213, 0.008403775282204151, 0.03059900924563408, 0.009157798252999783, 0.04394394904375076, 0.024162432178854942, -0.003464714391157031, -0.0396641343832016, -0.052436187863349915, -0.03760847449302673, 0.017085568979382515, -0.033564552664756775, 0.0006092210533097386, -0.04768458008766174, -0.022275269031524658, 0.0005644640768878162, 0.024971216917037964, -0.010194052942097187, 0.03027886524796486, 0.006925215944647789, -0.009081974625587463, -0.0035721310414373875, 0.001643896335735917, 0.000724009471014142, -0.03332865610718727, -0.020455503836274147, -0.004612598568201065, 0.004692634101957083, 0.04569631814956665, 0.028088407590985298, 0.005425595212727785, 0.03447443246841431, 0.016504256054759026, -0.01117133442312479, -0.013311242684721947, -0.0007724522729404271, -0.029790224507451057, -0.003578449599444866, -0.01053104642778635, -0.037136681377887726, 0.023387348279356956, -0.0070726508274674416, -0.008803955279290676, 0.01178634725511074, -0.0031003400217741728, -0.04417984560132027, -0.0026180180720984936, 0.024667922407388687, 0.004351428244262934, -0.019697269424796104, -0.008770255371928215, 0.0019092786824330688, 0.018163949251174927, 0.029402682557702065, 0.01535847783088684, -0.005391895771026611, -0.02815580554306507, -0.01754051074385643, 0.004210312385112047, 0.015307929366827011, -0.02436462976038456, -0.01610828936100006, 0.048021573573350906, -0.007565503939986229, -0.026571936905384064, -0.02357269451022148, 0.00011854009062517434, -0.013319667428731918, -0.0012868938501924276, -0.0205734521150589, 0.025089165195822716, 0.026571936905384064, 0.009975006803870201, -0.008761830627918243, 0.009023000486195087, 0.016917072236537933, 0.045561518520116806, -0.004789520055055618, 0.013100622221827507, 0.028004158288240433, 0.03679968789219856, -0.043842852115631104, -0.011693674139678478, 0.005353983957320452, 0.04047291725873947, -0.012595131993293762, 0.013690360821783543, 0.004814794287085533, 0.022831309586763382, -0.003959673456847668, 0.03508102148771286, 0.006495549343526363, 0.041450198739767075, -0.02222472056746483, 0.020017413422465324, 0.011685249395668507, -0.03305906057357788, 0.026251792907714844, -0.0006445000180974603, -0.0379454679787159, 0.0003462081658653915, 0.03241877257823944, 0.02458367496728897, 0.020388105884194374, -0.04471903666853905, 0.007257997058331966, 0.021921426057815552, -0.028021007776260376, 0.00020864636462647468, -0.025527257472276688, 0.023808589205145836, 0.003976522944867611, 0.018703138455748558, -0.0010467859683558345, -0.03268836811184883, -0.025207113474607468, -0.013698785565793514, -0.018147099763154984, 0.03064955770969391, 0.018736837431788445, 0.01021090243011713, -0.008492236025631428, 0.03588980808854103, 0.013799883425235748, -0.005530905444175005, 0.01444859616458416, -0.06055773049592972, 0.013673510402441025, 0.0016933922888711095, 0.0031403580214828253, -0.0001532267197035253, 0.009317870251834393, -0.03268836811184883, -0.001716560567729175, 0.062242697924375534, -0.04131540283560753, -0.027178524062037468, -0.04020332172513008, -0.033665649592876434, 0.0059689972549676895, 0.06618551909923553, -0.021618131548166275, -0.02377489022910595, -0.011693674139678478, -0.015291079878807068, -0.01924232766032219, -0.02025330811738968, -0.009023000486195087, 0.02985762245953083, 0.029925022274255753, 0.0037216718774288893, 0.027919910848140717, -0.010135078802704811, 0.013100622221827507, -0.021146342158317566, 0.009014575742185116, -0.0015501700108870864, 0.0070726508274674416, -0.012030667625367641, 0.01170209888368845, -0.01522368099540472, 0.013125896453857422, 0.02357269451022148, -0.009444242343306541, -0.009014575742185116, 0.0210620928555727, -0.015316354110836983, -0.01012665405869484, 0.0005565658211708069, -0.008306889794766903, -0.01117133442312479, -0.0008335323072969913, 0.04242748022079468, -0.0005555127281695604, 0.00619646767154336, 0.028964590281248093, 0.00577101344242692, 0.02778511308133602, -0.006398663856089115, -0.010842765681445599, 0.004616810940206051, 0.002868657000362873, 0.002999241929501295, -0.0013690360356122255, 0.032334525138139725, -0.012611981481313705, 0.020927295088768005, -0.004187143873423338, -0.008837654255330563, 0.01023617759346962, -0.025763152167201042, 0.02778511308133602, 0.03391839563846588, 0.0003032941312994808, -0.01357241254299879, 0.018416693434119225, -0.0022304756566882133, -0.003725884249433875, -0.016588503494858742, 0.013538713566958904, 0.000825634051579982, -0.03551911190152168, -0.0005128619377501309, 0.03198068216443062, 0.0014827713603153825, -0.0032140754628926516, 0.013985229656100273, -0.014920386485755444, 0.011752648279070854, -0.013547138310968876, -0.0027022664435207844, -0.00018179218750447035, 0.024381479248404503, -0.003856469178572297, -0.009671713225543499, -0.01781010627746582, -0.01234238687902689, -0.017102420330047607, 0.010345700196921825, 0.011533602140843868, 0.014010503888130188, 0.017405712977051735, -0.007316971197724342, 0.03336235508322716, -0.009292595088481903, -0.0027085852343589067, 0.022140471264719963, 0.016377883031964302, -0.015914516523480415, 0.04269707575440407, 0.01764160953462124, -0.03471032902598381, -0.011390379630029202, 0.008896628394722939, -0.011070235632359982, 0.003776433179154992, -0.006963127758353949, 0.023050354793667793, 0.00329200504347682, -0.02606644667685032, -0.003949142526835203, 0.003321492113173008, 0.028138956055045128, 0.0032646243926137686, -0.01506360899657011, 0.020067961886525154, -0.028812943026423454, 0.0006460797158069909, 0.02197197452187538, -0.020067961886525154, -0.03378359600901604, 0.015771295875310898, 0.006714595016092062, 0.011112360283732414, -0.027111126109957695, -0.012679380364716053, 0.04808897152543068, 0.039900027215480804, 0.038518354296684265, 0.00459996098652482, -0.01898958347737789, 0.03615939989686012, -0.029840772971510887, -0.0349799245595932, -0.0066514089703559875, 0.0017397288465872407, 0.029739676043391228, 0.03828246146440506, -0.0008282667840830982, 0.01845039427280426, -0.047111690044403076, -0.005581454839557409, -0.017978603020310402, -0.012283412739634514, 0.0016860205214470625, 0.03386784717440605, 0.001757631660439074, -0.01988261565566063, 0.030093519017100334, -0.035215821117162704, 0.016066163778305054, -0.0031993319280445576, 0.009562190622091293, 0.016024040058255196, -0.011803196743130684, -0.010960713028907776, -0.009503216482698917, 0.02527451142668724, 0.034356486052274704, 0.001222654478624463, 0.04546042159199715, -0.004307197872549295, -0.009949732571840286, 0.020876746624708176, 0.007995170541107655, -0.026622485369443893, 0.011432504281401634, 0.041719794273376465, -0.017557360231876373, -0.0036353173200041056, -0.013749334029853344, -0.03219972923398018, 0.013361792080104351, 0.013521864078938961, 0.02714482508599758, -0.019006432965397835, 0.0031888007652014494, -0.028408551588654518, 0.01529950462281704, 0.020303858444094658, -0.0037364151794463396, 0.0052065495401620865, -0.00014230076340027153, 0.0507512204349041, -0.009006150998175144, -0.0022978743072599173, 0.029722824692726135, 0.00935999397188425, 0.02554410696029663, 0.0006497655413113534, -0.025527257472276688, 0.007308546453714371, -0.04579741507768631, 0.03599090501666069, -0.006883091758936644, 0.0008514351211488247, -0.0282063540071249, 0.0069715529680252075, -0.01834929548203945, -0.013909406028687954, -0.004869556054472923, 0.0044651636853814125, 0.015240530483424664, 0.024027636274695396, -0.019056981429457664, 0.029807073995471, 0.004081833641976118, -0.020657701417803764, 0.02170238085091114, -0.02739757113158703, 0.013858857564628124, 0.02825690433382988, 0.022106772288680077, 0.005910023115575314, -0.012628830969333649, -0.006124856416136026, -0.007375944871455431, 0.01770900748670101, 0.0264876876026392, 0.00288550672121346, 0.019798368215560913, -0.0010520515497773886, 0.03514841943979263, 0.025560956448316574, 0.0055182683281600475, -0.011019687168300152, 0.032283976674079895, -0.01572917029261589, -0.014928811229765415, 0.010295150801539421, 0.03912494331598282, -0.01567019708454609, 0.011120785027742386, -0.009932883083820343, -0.008525935001671314, 0.013858857564628124, 0.014996210113167763, -0.008862928487360477, -0.006402876228094101, -0.009562190622091293, -0.019663570448756218, 0.012165464460849762, -0.001101547502912581, 0.004743183497339487, -0.03899014741182327, -0.0008272136910818517, 0.029874471947550774, 0.03358140215277672, 0.007055801339447498, -0.013783033937215805, 0.025493556633591652, -0.024280380457639694, 0.045932210981845856, 0.019545622169971466, -0.019697269424796104, -0.0002132536901626736, -0.013715635053813457, -3.0062847145018168e-05, -0.02222472056746483, -0.021348537877202034, 0.025257661938667297, 0.01961302012205124, 0.003586874343454838, 0.020977845415472984, -0.026453988626599312, -0.0037848581559956074, 0.027279622852802277, 0.01877053640782833, -0.010910164564847946, -0.03454183414578438, -0.023100903257727623, -5.1470487960614264e-05, -0.027582917362451553, 0.005332922097295523, 0.0029255247209221125, 0.005741526372730732, -0.015796570107340813, 0.0182313472032547, -0.0054087452590465546, 0.01904013194143772, 0.020455503836274147, 0.018163949251174927, -0.006175405811518431, 0.003955461084842682, -0.006348114926367998, 0.01599034108221531, 0.003367828670889139, -0.04670729860663414, -0.01679070107638836, -0.004321941640228033, -0.007055801339447498, -0.0028644446283578873, 0.04920104891061783, 0.02101154439151287, 0.0030582158360630274, -0.009983432479202747, 0.030615858733654022, 0.03993372991681099, -0.00807520654052496, 0.010067680850625038, -0.01117133442312479, -0.022848159074783325, 0.0023736979346722364, -0.005690977443009615, -0.015855543315410614, 0.029284734278917313, 0.004743183497339487, 0.044651638716459274, 0.012864726595580578, 0.0007882488425821066, -0.02212362177670002, -0.05203179270029068, -0.013370216824114323, 0.010059255175292492, -0.022528015077114105, 0.00015796569641679525, 0.06163610890507698, -0.010842765681445599, -0.021618131548166275, -0.0018587297527119517, 0.010312000289559364, 0.0052865855395793915, 0.026959478855133057, 0.006503974087536335, 0.007797186728566885, 0.007814036682248116, -0.021247439086437225, -0.03710298240184784, -0.0012858407571911812, -0.03855205327272415, -0.0033278106711804867, -0.0034963074140250683, -0.023808589205145836, 0.016386307775974274, 0.022157322615385056, 0.0032477746717631817, -0.02025330811738968, -0.0033446603920310736, -0.02554410696029663, 0.001370089128613472, -0.02537561021745205, 0.018298747017979622, -0.007430706173181534, 0.037237782031297684, -0.03754107281565666, 0.027279622852802277, 0.016664328053593636, -0.01106181088835001, 0.008677582256495953, -0.04417984560132027, -0.019764667376875877, -0.03378359600901604, -0.011963268741965294, -0.0012416103854775429, -0.031272996217012405, 0.018366144970059395, 0.03838355839252472, -0.03882164880633354, 0.008538572117686272, 0.013201720081269741, -0.0031235083006322384, -0.003970204386860132, -0.003108764998614788, -0.010817490518093109, -0.003382572205737233, -0.032334525138139725, 0.009646438993513584, 0.0210620928555727, -0.002321042586117983, 0.03784436732530594, -0.012114915996789932, 0.002936055650934577, -0.01663905382156372, 0.01522368099540472, 0.00975596159696579, -0.04296667128801346, 0.0068114809691905975, -0.01993316411972046, -0.0012753097107633948, 0.003907018341124058, -0.024347780272364616, 0.02618439309298992, 0.038046564906835556, -0.015392177738249302, 0.03460923209786415, 0.004460951313376427, 0.03348030149936676, 0.023016655817627907, 0.019276026636362076, -0.019916314631700516, -0.0025843188632279634, 0.0018987476360052824, 0.024769021198153496, -0.02714482508599758, -0.00667668366804719, 0.008028869517147541, 0.010741667822003365, 0.02153388410806656, -0.012940550222992897, -0.008997726254165173, 0.03219972923398018, 0.0019261284032836556, -0.033446602523326874, 0.021129490807652473, 0.001992474077269435, 0.0025527256075292826, 0.021685531362891197, -0.00786037277430296, 0.01909068040549755, -0.007826673798263073, -0.01909068040549755, 0.00017205097537953407, 0.004612598568201065, 0.0055688172578811646, -0.024971216917037964, -0.02047235518693924, 0.0011468309676274657, -0.050784919410943985, -0.02660563588142395, -0.011533602140843868, 0.021129490807652473, 0.007249572314321995, 0.014600242488086224, -0.00399969145655632, 0.0011320875491946936, 0.016512680798768997, -0.008226853795349598, -0.043910250067710876, -0.028071558102965355, 0.021314838901162148, -0.008302677422761917, 0.05479514226317406, 0.028880340978503227, 0.012013818137347698, -0.021129490807652473, -0.0063607520423829556, -0.0007608681335113943, -0.011314556002616882, -0.021196890622377396, -0.02884664200246334, 0.0006376548553816974, -0.03017776645720005, 0.03865315392613411, 0.010834340937435627, -0.034845124930143356, 0.005059114657342434, -0.010960713028907776, 0.019158080220222473, 0.0015027803601697087], "index": 82}, {"title": "Historical parks of Thailand", "text": "Historical parks in Thailand (Thai: \u0e2d\u0e38\u0e17\u0e22\u0e32\u0e19\u0e1b\u0e23\u0e30\u0e27\u0e31\u0e15\u0e34\u0e28\u0e32\u0e2a\u0e15\u0e23\u0e4c) are managed by the Fine Arts Department, a sub-division of the Ministry of Education. There are currently ten parks, with four them registered as World Heritage Sites by the UNESCO.", "vector": [0.027070073410868645, 0.0030636305455118418, -0.026276154443621635, 0.007753514684736729, 0.046072907745838165, 0.043767981231212616, 0.0015878378180786967, -0.02827375754714012, -0.018695509061217308, -0.012209705077111721, -0.012600261718034744, -0.007836747914552689, -0.0037391020450741053, -0.02617371454834938, 0.029503051191568375, -0.01740219071507454, -0.04448506981134415, -0.027607889845967293, 0.03928618133068085, -0.005637464579194784, -0.022677909582853317, 0.0053077321499586105, -0.019066859036684036, -0.03144943341612816, 0.020667502656579018, 0.032653115689754486, 0.011249318718910217, -0.010244115255773067, -0.009091651998460293, 0.028529860079288483, -0.013278934173285961, 0.004376158118247986, 0.08430906385183334, -0.011799939908087254, -0.01489238254725933, 0.016224117949604988, 0.03828737884759903, -0.0028347386978566647, -0.020321764051914215, 0.014264930039644241, 0.02993842586874962, -0.06607454270124435, 0.036008063703775406, 0.03260189667344093, 0.01866989955306053, -0.030962837859988213, -0.030348191037774086, -0.05536944046616554, -0.01975833624601364, -0.009840752929449081, -0.004126457497477531, -0.021320564672350883, -0.01791439577937126, 0.033831190317869186, -0.03431778401136398, 0.008675484918057919, 0.015571055002510548, 0.06668918579816818, 0.0191308856010437, 0.08005776256322861, 0.03703247755765915, 0.06909655779600143, -0.0532693974673748, -0.001645460957661271, 0.044305797666311264, -0.01732536032795906, 0.0039503867737948895, -0.018823562189936638, -0.028171315789222717, -0.00284594320692122, 0.0035246158950030804, -0.003777517471462488, -0.017773538827896118, 0.018311355262994766, 0.04415213689208031, -0.039439842104911804, 0.02269071526825428, 0.05900610238313675, 0.004965194500982761, 0.028581080958247185, 0.03790322691202164, -0.052910853177309036, -0.04922297224402428, 0.01756865717470646, -0.05180961266160011, -0.030732344835996628, -0.0009747915901243687, -0.03052746318280697, -0.007439788430929184, 0.01476433128118515, -0.02768472023308277, 0.019322961568832397, -0.03459949791431427, 0.008707498200237751, -0.00952062476426363, 0.0122865354642272, -0.006562636233866215, 0.03211529925465584, 0.025763949379324913, 0.0016934802988544106, 0.035751961171627045, -0.009322145022451878, -0.02088518999516964, -0.025827975943684578, -0.020040050148963928, -0.07140148431062698, -0.03475315868854523, -0.029682323336601257, 0.029298169538378716, 0.013970412313938141, 0.0016078458866104484, -0.009117262437939644, 0.041002072393894196, 0.05782802775502205, -0.03552147001028061, 0.026942022144794464, 0.021410200744867325, -0.022793155163526535, -0.03611050546169281, 0.07452593743801117, -0.020321764051914215, 0.008816341869533062, 0.02197362668812275, -0.015673495829105377, -0.023497438058257103, 0.013688698410987854, -0.025559067726135254, -0.008304135873913765, -0.010500217787921429, -0.013599062338471413, -0.00784315075725317, 0.04031059145927429, 0.009098054841160774, 0.022741936147212982, -0.035880014300346375, -0.03070673532783985, 0.0019671902991831303, 0.014777136035263538, -0.02683958224952221, -0.020910799503326416, -0.015199705958366394, 0.008361758664250374, -0.022370586171746254, -0.023010844364762306, -0.009527026675641537, -0.016211312264204025, -0.007081244606524706, 0.04947907477617264, -0.0026826777029782534, 0.043767981231212616, 0.021819965913891792, 0.01865709386765957, -0.044946055859327316, 0.030604293569922447, -0.03716052696108818, -0.01933576725423336, -0.04010571166872978, 0.028965234756469727, -0.033651918172836304, -0.023971229791641235, -0.021410200744867325, 0.008144071325659752, 0.005144466646015644, -0.0033229347318410873, -0.011044436134397984, 0.006162475328892469, 0.019643090665340424, -0.02763350121676922, 0.01310606487095356, 0.011710303835570812, 0.0029211733490228653, 0.000725891615729779, -0.029323779046535492, -0.0330628827214241, 0.007042828947305679, -0.025892000645399094, -0.02214009314775467, -0.011876771226525307, -0.026813970878720284, -0.04264112934470177, 0.006709895562380552, 0.004180879332125187, 0.042052093893289566, 0.007849553599953651, 0.010929190553724766, 0.05234742909669876, -0.028068875893950462, -0.017043646425008774, -0.046329010277986526, 0.06228422001004219, -0.01745341159403324, 0.026737140491604805, 0.05526700243353844, 0.003716693026944995, -0.016121676191687584, -0.051860831677913666, 0.05332062020897865, 0.051988884806632996, -0.020654696971178055, 0.009936791844666004, 0.0025594281032681465, -0.02214009314775467, 0.020782748237252235, 0.023433413356542587, -0.047122929245233536, -0.0019511837745085359, -0.010557841509580612, -0.007330944761633873, 0.030373800545930862, 0.08943112194538116, -0.024176111444830894, -0.026813970878720284, -0.0074782040901482105, -0.00800961721688509, -0.05941586568951607, 0.03506048396229744, 0.04189842939376831, 0.01505884900689125, 0.0648452490568161, -0.011838355101644993, 0.0020984429866075516, 0.005118856206536293, 0.02335658296942711, 0.010685892775654793, -0.014815551228821278, -0.04005448892712593, -0.019604675471782684, 0.04458751156926155, 0.02080835960805416, -0.006697090342640877, 0.04965834692120552, -0.006876362022012472, -0.012382574379444122, -0.031346991658210754, 0.006428182125091553, 0.0764210969209671, 0.01677473820745945, -0.07949433475732803, -0.006825141608715057, 0.033831190317869186, -0.0006346549489535391, 0.054959677159786224, -0.04387042298913002, -0.001497401506640017, -0.014674695208668709, 0.00333894114010036, 0.00758064491674304, -0.014700304716825485, 0.04781440645456314, 0.0625915452837944, 0.029503051191568375, -0.026788361370563507, -0.000799921341240406, 0.04136061295866966, -0.016198506578803062, 0.036853205412626266, 0.007638268172740936, 0.02558467723429203, 0.004241704009473324, -0.01224812027066946, -0.026224935427308083, 0.011543837375938892, -0.008060838095843792, -0.009021223522722721, -0.06172079220414162, 0.05227059870958328, -0.03974716737866402, 0.016877179965376854, -0.00659464905038476, 0.010916384868323803, -0.01321490854024887, -0.033651918172836304, 0.00305082555860281, 0.05577920749783516, 0.048966869711875916, 0.04484361410140991, 0.020488230511546135, -0.010052038356661797, 0.002162468619644642, 0.06090126559138298, -0.022370586171746254, -0.015378978103399277, -0.04105329141020775, 0.035495858639478683, -0.019566260278224945, 0.03234579414129257, -0.03605928644537926, 0.012363366782665253, 0.047916848212480545, -0.012517028488218784, -0.01941259764134884, -0.0485571064054966, 0.028401808813214302, -0.07780405133962631, -0.007183685898780823, -0.0053493487648665905, -0.03375435993075371, 0.012152081355452538, -0.03623855859041214, -0.015289342030882835, 0.023420607671141624, 0.008195292204618454, -0.030604293569922447, 0.0017414995236322284, -0.04202648252248764, 0.018272940069437027, -0.014405786991119385, 0.0382617712020874, 0.007606255356222391, -0.04302528500556946, 0.0036974851973354816, -0.05516456067562103, -0.06627942621707916, 0.03431778401136398, -0.015891183167696, -0.006780323572456837, -0.018964417278766632, 0.005663075018674135, 0.010180089622735977, 0.03442022576928139, -0.020360179245471954, 0.016300948336720467, -0.021487031131982803, 0.007350152358412743, 0.0301176980137825, -0.002828336087986827, 0.03915812820196152, -0.050554707646369934, 0.043767981231212616, -0.022511443123221397, 0.016006430611014366, -0.05557432398200035, -0.012645079754292965, -0.009450196288526058, 0.07027462869882584, -0.016262533143162727, -0.01224812027066946, 0.023382192477583885, -0.00045498277177102864, -0.04927419498562813, 0.011415786109864712, 0.01900283433496952, 0.003758309641852975, 0.01601923443377018, 0.02696763351559639, -0.03057868406176567, -0.02919572778046131, 0.060542721301317215, 0.024419410154223442, 0.008348953910171986, 0.000560225045774132, -0.025072472169995308, -0.03431778401136398, 0.01933576725423336, 0.03183358907699585, -0.0028587484266608953, 0.055932868272066116, 0.006287325639277697, 0.06187445670366287, 0.001317329122684896, -0.003927977755665779, -0.007811137940734625, -0.02294681780040264, 0.017338164150714874, 0.06894289702177048, 0.02642981708049774, 0.02868352271616459, 0.03662271052598953, -0.00395358819514513, 0.006626661866903305, 0.021192513406276703, -0.014162489213049412, -0.0017046848079189658, 0.02814570628106594, 0.019553454592823982, 0.02189679630100727, -0.005218096077442169, 0.01046180259436369, 0.014751525595784187, -0.041002072393894196, 0.03070673532783985, 0.009392572566866875, 0.030553072690963745, 0.03782639652490616, 0.027018854394555092, -0.02881157398223877, 0.051066912710666656, -0.0625915452837944, 0.01430334523320198, -0.020437009632587433, 0.025341380387544632, 0.03045063279569149, -0.020142491906881332, -0.04043864458799362, 0.027735941112041473, 0.010186491534113884, -0.015891183167696, -0.028068875893950462, -0.04922297224402428, -0.05654751509428024, 0.025315769016742706, -0.03703247755765915, 0.046738773584365845, 0.025763949379324913, -0.015750326216220856, -0.02005285583436489, 0.031014058738946915, 0.05301329493522644, -0.001751103438436985, 0.006428182125091553, -0.061925675719976425, 0.02490600384771824, -0.014661889523267746, 0.0020104076247662306, 0.016249727457761765, 0.016761932522058487, -0.025827975943684578, 0.03142382204532623, -0.013112467713654041, -0.0002194881672039628, -0.008880367502570152, 0.03283238783478737, -0.027121294289827347, 0.02173032984137535, -0.020232127979397774, 0.021141292527318, -0.047532692551612854, 0.015366172417998314, 0.023996839299798012, -0.02512369304895401, -0.05506211891770363, -0.00859865453094244, -0.0051316614262759686, 0.01404724270105362, -0.028657911345362663, 0.0074269832111895084, -0.039363011717796326, 0.04243624582886696, 0.04256429895758629, 0.015366172417998314, 0.004180879332125187, -0.054754793643951416, 0.029221337288618088, -0.0012300941161811352, -0.031475044786930084, 0.01815769448876381, -0.0492485836148262, -0.01769670844078064, 0.04658511281013489, 0.04177037999033928, -0.04684121534228325, 0.0036046479362994432, 0.02470112219452858, 0.05321817845106125, 0.00880993902683258, -0.007388568017631769, 0.014661889523267746, -0.0341385118663311, -0.0038991663604974747, 0.0005058031529188156, -0.0002895162906497717, 0.021064462140202522, 0.02567431330680847, -0.04282040148973465, -0.027966434136033058, -0.0498376190662384, 0.03539341688156128, 0.011979212053120136, -0.008361758664250374, 0.03741662949323654, 0.03941423445940018, 0.003244503401219845, -0.040080100297927856, 0.035547077655792236, -0.018772341310977936, -0.007170880679041147, 0.006914777681231499, 0.006434584967792034, -0.009059639647603035, -0.037262968719005585, -0.041206952184438705, 0.016621077433228493, 0.033575087785720825, 0.03810810670256615, 0.06822580844163895, -0.023932814598083496, 0.007727904245257378, 0.025687118992209435, 0.015122874639928341, 0.02906767651438713, 0.01954064890742302, -0.010455399751663208, 0.03070673532783985, 0.022319365292787552, -0.019643090665340424, -0.0051060509867966175, -0.011025228537619114, -0.0150332385674119, 0.028324978426098824, 0.009392572566866875, -0.05367916449904442, 0.022319365292787552, 0.004244904965162277, -0.010621867142617702, 0.0028811574447900057, 0.03452266752719879, 0.01136456523090601, 0.0544474720954895, 0.0015038041165098548, 0.029707932844758034, 0.0013021230697631836, -0.01063467189669609, -0.018990028649568558, 0.008252914994955063, -0.0020888391882181168, 0.05367916449904442, 0.012485015206038952, -0.0095398323610425, 0.004270515404641628, -0.006914777681231499, 0.0017879181541502476, 0.04307650402188301, -0.038773976266384125, -0.0035150120966136456, -0.027992043644189835, -0.008316940627992153, -0.056342631578445435, -0.015250925906002522, -0.051015693694353104, -0.02735178731381893, 0.014982018619775772, 0.0124594047665596, -0.010135271586477757, -0.02621212974190712, 0.01496921293437481, -0.015878377482295036, -0.03616172447800636, 0.007350152358412743, -6.127461529104039e-05, -0.03019452840089798, -0.03780078515410423, -0.03170553594827652, 0.012299340218305588, -0.018400991335511208, -0.05011933296918869, -0.02385598234832287, 0.0039087701588869095, 0.006588246673345566, -0.0008971603820100427, -0.016300948336720467, -0.017594268545508385, -0.01920771598815918, 0.00788796879351139, 0.01241458673030138, -0.015314952470362186, -0.017427800223231316, -0.009680688381195068, -0.04451068118214607, 0.016326557844877243, 0.0011356561444699764, 0.011947198770940304, 0.027992043644189835, 0.001271710847504437, -0.006946790497750044, -0.024777952581644058, -0.017299748957157135, -0.024880394339561462, -0.0022040854673832655, 0.02536698989570141, -0.011966407299041748, 0.023394998162984848, -0.017171697691082954, -0.0016806750791147351, 0.04123256355524063, -0.003188480855897069, -0.0150332385674119, -0.011697499081492424, 0.008060838095843792, -0.05921098589897156, 0.009091651998460293, -0.01318929810076952, 0.009853558614850044, 0.03257628530263901, -0.008291330188512802, 0.040489863604307175, 0.013611868023872375, 0.0038127314765006304, -0.0019527844851836562, 0.02545662596821785, 0.0012885176111012697, 0.037058085203170776, -0.004680280108004808, 0.01318929810076952, 0.04266674071550369, 0.0026378596667200327, 0.020782748237252235, -0.020437009632587433, -0.03941423445940018, 0.043255776166915894, -0.010564243420958519, 0.010103258304297924, -0.007471801247447729, -0.020795553922653198, 0.03293482959270477, -0.010807541199028492, -0.007145270239561796, 0.010269725695252419, -0.03918373957276344, -0.021883990615606308, 0.034036073833703995, 0.01874672994017601, -0.027735941112041473, 0.030143309384584427, -0.031193330883979797, 0.04381920397281647, 0.030629904940724373, 0.004600247833877802, 0.02927255816757679, 0.006108053494244814, -0.0034285772126168013, 0.023766346275806427, -0.001821531681343913, 0.026096882298588753, -0.016493026167154312, -0.0318848080933094, -0.04148866608738899, -0.0038671535439789295, -0.04381920397281647, 0.032064080238342285, -0.03418973460793495, 0.0004409771354403347, -0.003004406811669469, -0.0005130060599185526, -0.035419028252363205, -0.01031454373151064, -0.005403770599514246, -0.006837946828454733, -0.035419028252363205, -0.001927174162119627, 0.018567457795143127, 0.03175675496459007, -0.0073181395418941975, -0.006392967887222767, 0.026557868346571922, -0.016544245183467865, -0.046866826713085175, -0.009866363368928432, -0.024521850049495697, 0.0300664771348238, -0.01900283433496952, -0.06187445670366287, 0.005707893054932356, 0.007830345071852207, 0.01749182678759098, -0.02193521149456501, -0.005723899230360985, -0.004296125844120979, -0.05111813545227051, 0.023599879816174507, 0.0016182500403374434, -0.00653062341734767, 0.0113069424405694, -0.024022450670599937, 0.00653062341734767, 0.013650283217430115, 0.009059639647603035, -0.02529015950858593, 0.006044027861207724, 0.06868679076433182, 0.01911807991564274, -0.013727114535868168, -0.02479075826704502, 0.013099662028253078, 0.025533456355333328, 0.011543837375938892, -0.015327757224440575, -0.004837143234908581, -0.025469431653618813, 0.006482603959739208, -0.02490600384771824, -0.021115683019161224, -0.054959677159786224, -0.009213301353156567, -0.005259712692350149, -0.020104076713323593, 0.0011292536510154605, 0.0010948397684842348, 0.011761524714529514, -0.028401808813214302, -0.011127670295536518, -0.0027531059458851814, 0.009360560216009617, -0.037134915590286255, -0.018272940069437027, 0.02940060943365097, -0.0030972440727055073, 0.0007162877591326833, -0.015545444563031197, -0.005896768532693386, -0.010500217787921429, -0.04046425595879555, 0.011812745593488216, 0.007548632100224495, 0.018170498311519623, 0.017338164150714874, 0.017466215416789055, -0.01063467189669609, -0.015250925906002522, -0.027787161991000175, 0.03057868406176567, 0.001180474180728197, -0.014021632261574268, -0.017043646425008774, 0.033447034657001495, -0.026327375322580338, 0.011569447815418243, -0.006850752048194408, -0.03523975610733032, 0.015481418929994106, -0.003238100791350007, 0.005000408738851547, -0.011063644662499428, -0.044433850795030594, 0.005294926930218935, -0.03662271052598953, -0.015148485079407692, -0.04604729637503624, -0.010058440268039703, -0.04064352810382843, 0.013496621511876583, -0.0231516994535923, 0.028299367055296898, -0.003854348324239254, 0.03162870556116104, 0.00431853486225009, 0.02855547145009041, -0.03283238783478737, 0.0005902370903640985, -0.005227699875831604, -0.02125653810799122, -0.0008071242482401431, -0.0492485836148262, 0.0019783948082476854, 0.00978953205049038, 0.014982018619775772, 0.022280950099229813, -0.05040104687213898, -0.022050457075238228, 0.012913987971842289, -0.018183303996920586, -0.017543047666549683, -0.016467414796352386, 0.016326557844877243, -0.058237794786691666, 0.004449787549674511, 0.01845221221446991, -0.01577593758702278, 0.007164477836340666, 0.030168918892741203, 0.06904533505439758, -0.05793046951293945, 0.031193330883979797, -0.016621077433228493, 0.05086203292012215, 0.026609089225530624, -0.0162369217723608, -0.010602659545838833, -0.0023161303251981735, 0.0009411780629307032, 0.012926792725920677, 0.04374236986041069, 0.004840344190597534, 0.015878377482295036, 0.03808249905705452, -0.01035936176776886, -0.021794354543089867, 0.003220493672415614, -0.05577920749783516, -0.03926056995987892, 0.02532857470214367, 0.010929190553724766, -0.006117657292634249, -0.04235941544175148, -0.0034605900291353464, 0.01664668694138527, -0.03385680168867111, -0.02201204188168049, 0.011319747194647789, -0.02637859620153904, 0.015404587611556053, 0.03221774101257324, 0.02189679630100727, 0.024637097492814064, -0.03931179270148277, 0.00333894114010036, 0.03198724985122681, 0.0008555436506867409, 0.02788960374891758, 0.010141673497855663, -0.018093667924404144, 0.0033613501582294703, 0.02134617418050766, 0.004536222200840712, -0.04248746857047081, 0.006204092409461737, -0.02051384001970291, 0.023087674751877785, -0.0012525031343102455, 0.037852004170417786, 0.015302146784961224, -0.02453465573489666, 0.05280841141939163, 0.010109661146998405, -0.0416935496032238, 0.006908375304192305, 0.003601446747779846, -0.005615055561065674, -0.0010716305114328861, -0.010269725695252419, 0.0364946611225605, -0.033318985253572464, -0.02562309242784977, -0.007913579232990742, 0.04584241658449173, 0.037186138331890106, -0.013778334483504295, 0.017389385029673576, -0.0036654723808169365, 0.007689489051699638, -0.03908129781484604, -0.005426179617643356, 0.0049972073175013065, -0.0011076449882239103, -0.0347275510430336, 0.006908375304192305, 0.03544463962316513, 0.030296970158815384, -0.0018327361904084682, -0.0021656700409948826, -0.01486677210777998, 0.0029227740596979856, 0.004491404164582491, 0.016198506578803062, -0.015327757224440575, -0.036340996623039246, -0.015391782857477665, -0.016928400844335556, -0.032448235899209976, 0.0133173493668437, 0.018529042601585388, 0.035162925720214844, -0.007017218973487616, 0.026160908862948418, 0.04374236986041069, -0.0017703111516311765, 0.06750871986150742, -0.009418183006346226, 0.020693112164735794, 0.0054165758192539215, -0.03150065243244171, 0.015532639808952808, -0.03477877005934715, -0.01824733056128025, 0.05501089617609978, -0.011095657013356686, -0.005493406672030687, 0.009994414635002613, -0.020962020382285118, -0.032653115689754486, 0.023881593719124794, 0.022076068446040154, 0.0301176980137825, 0.02386878803372383, -0.018093667924404144, 0.011012423783540726, -0.01516128983348608, -0.012933195568621159, -0.014405786991119385, 0.03964472562074661, -0.028324978426098824, -0.0025482235942035913, -0.0324738435447216, 0.0295286625623703, 0.043050892651081085, -0.02650664746761322, 0.026685919612646103, -0.007132465019822121, -0.018132083117961884, 0.021371785551309586, 0.0053493487648665905, -0.03098844736814499, -0.04827539250254631, -0.007254113908857107, 0.03813371807336807, -0.007715099025517702, 0.038569092750549316, 0.012856364250183105, -0.01126212440431118, 0.008144071325659752, 0.011230111122131348, 0.019258936867117882, -0.023241335526108742, -0.035905621945858, -0.021397395059466362, -0.008003215305507183, -0.02512369304895401, 0.018336966633796692, 0.0025770352222025394, -0.01819610968232155, 0.0266346987336874, -0.03262750804424286, 0.01394480187445879, 0.01325332373380661, -0.03452266752719879, 0.03974716737866402, -0.03823615983128548, -0.02344621904194355, 0.009757519699633121, -0.042000871151685715, 0.002892361953854561, -0.009930389001965523, -0.001211686758324504, -0.019527845084667206, -0.006521019618958235, 0.0010100057115778327, -0.003895964939147234, 0.010877969674766064, -0.021333370357751846, 0.004766714759171009, -0.033447034657001495, -0.0388508066534996, -0.022805960848927498, 0.026199324056506157, 0.011076449416577816, 0.00011504621215863153, 0.04297406226396561, 0.020667502656579018, 0.0058359443210065365, -0.03290921822190285, -0.029707932844758034, 0.06976242363452911, -0.005851950496435165, 0.022409001365303993, 0.0007170880562625825, -0.059159763157367706, -0.014328955672681332, 0.02637859620153904, -0.00751661928370595, 0.025994442403316498, -0.07186246663331985, -0.00653062341734767, 0.028888404369354248, -0.011729511432349682, 0.02151264250278473, 0.031014058738946915, -0.012337756343185902, 0.000687076011672616, -0.04235941544175148, -0.023087674751877785, 0.02164069376885891, 0.011121267452836037, 0.0106922946870327, -0.011236513964831829, 0.022165704518556595, 0.029426220804452896, -0.03641783073544502, -0.003972795791924, 0.017286943271756172, -0.02587919495999813, 0.01727413944900036, -0.03370313718914986, 0.034240953624248505, 0.016557050868868828, -0.013739919289946556, -0.03293482959270477, 0.007190088275820017, -0.0018455414101481438, -0.002405766397714615, 0.016249727457761765, -0.032729946076869965, -0.014367371797561646, 0.023164505138993263, 0.005669477395713329, -0.018336966633796692, 0.021397395059466362, 0.01577593758702278, 0.03196163848042488, -0.0249188095331192, 0.021128486841917038, 0.02473953738808632, -0.018605874851346016, 0.013054843991994858, 0.027274956926703453, -0.028760353103280067, -0.015583859756588936, -0.011082852259278297, -0.013650283217430115, 0.04671316593885422, 0.005615055561065674, -0.016582660377025604, -0.010596256703138351, 0.024048060178756714, -0.009488611482083797, -0.017018036916851997, 0.013560647144913673, -0.014585059136152267, -0.021909601986408234, 0.05624019354581833, 0.029323779046535492, -0.034701939672231674, -0.0034221746027469635, 0.004590644035488367, -0.009027626365423203, -0.007977604866027832, 0.006159274373203516, -0.05388404428958893, 0.021499836817383766, -0.03967033699154854, -0.033523865044116974, -0.021615082398056984, -0.022959623485803604, -0.008323343470692635, 0.018042447045445442, -0.008067240938544273, 0.00952062476426363, 0.037134915590286255, -0.014367371797561646, 0.008361758664250374, -0.00039735963218845427, 0.012510625645518303, -0.0013925593812018633, 0.03091161698102951, -0.01325332373380661, -0.0014773934381082654, -0.01664668694138527, -0.029298169538378716, -0.02068030647933483, -0.011870368383824825, 0.011774329468607903, 0.0479680672287941, 0.0024889998603612185, -0.030015256255865097, -0.010384971275925636, 0.023126089945435524, -0.025354184210300446, 0.02630176581442356, 0.002871553413569927, 0.052910853177309036, 0.01874672994017601, -4.145415005041286e-06, -0.005016414914280176, 0.021064462140202522, 0.00350220687687397, 0.002836339408531785, -0.020795553922653198, 0.009219703264534473, 0.009635870344936848, 0.02130775898694992, -0.007094049826264381, 0.0226138848811388, 0.009469403885304928, 0.006972400937229395, 0.00659464905038476, 0.019809557124972343, -0.007830345071852207, 0.006780323572456837, -0.016032040119171143, 0.026942022144794464, 0.018042447045445442, -0.006268118042498827, 0.007190088275820017, -0.023676710203289986, -0.012824351899325848, 0.007900773547589779, -0.016557050868868828, -0.0020296152215451, 0.0228571817278862, 0.01516128983348608, -0.009270924143493176, -0.026352986693382263, -0.019054053351283073, 0.009315742179751396, 0.02893962524831295, -0.013983217068016529, 0.05664995685219765, -0.009206898510456085, 0.008112058974802494, -0.034292176365852356, -0.015391782857477665, 0.02520052343606949, 0.019322961568832397, -0.015993624925613403, 0.027966434136033058, 0.017466215416789055, -0.010500217787921429, 0.015583859756588936, -0.013035636395215988, 0.0006374560762196779, -0.007740709464997053, -0.0007214898359961808, 0.019386988133192062, -0.0016518635675311089, -0.012216106988489628, -0.046149738132953644, 0.04965834692120552, 0.004603449255228043, 0.0012372969649732113, -0.03283238783478737, 0.02105165645480156, -0.0369812548160553, 0.008611459285020828, 0.03967033699154854, -0.04448506981134415, -0.0014037638902664185, 0.01664668694138527, 0.02855547145009041, -0.03523975610733032, -0.018055252730846405, -0.0022857182193547487, -0.015238121151924133, -0.011524629779160023, -0.017376579344272614, 0.022255340591073036, -0.01592959836125374, 0.02034737356007099, 0.02381756715476513, 0.0022889194078743458, 0.009827948175370693, -0.029426220804452896, 0.033447034657001495, -0.005781522486358881, 0.011479811742901802, -0.015186900272965431, 0.019515039399266243, -0.009251716546714306, -0.012760326266288757, 0.012664287351071835, -0.011787135154008865, 0.006434584967792034, 0.0053077321499586105, -0.0026954826898872852, -0.008963600732386112, 0.009078847244381905, -0.047199759632349014, -0.003358148969709873, -0.010103258304297924, 0.03523975610733032, -0.006338546052575111, 0.019322961568832397, -0.01601923443377018, -0.027787161991000175, 0.0037006866186857224, -0.006181683391332626, 0.0003741502878256142, 0.013138077221810818, -0.00866268016397953, 0.03019452840089798, -0.0242785532027483, -0.01849062740802765, 0.011652681045234203, -0.012356963939964771, 0.005301329772919416, 0.00987916812300682, -0.018772341310977936, 0.014418591745197773, 0.004312132019549608, 0.038441043347120285, -0.006998010911047459, 0.00164866226259619, -0.013394180685281754, 0.008041630499064922, -0.01983516849577427, 0.025520652532577515, 0.013266129419207573, -0.016249727457761765, -0.006444188766181469, -0.027838382869958878, 0.006876362022012472, -0.0030092087108641863, -0.002258507302030921, 0.0021432610228657722, 0.012382574379444122, 0.006889167241752148, 0.0324738435447216, -0.00020188109192531556, -0.001807125867344439, 0.011454201303422451, -0.02298523299396038, 0.03493243083357811, -5.952390893071424e-06, -0.012427392415702343, -0.0051060509867966175, -0.0017735124565660954, -0.012126470915973186, -0.007439788430929184, 0.025008445605635643, -0.008528226055204868, 0.04374236986041069, 0.01685156859457493, 0.018042447045445442, 0.01576313190162182, -0.026186518371105194, 0.004555429797619581, -0.010621867142617702, -0.027018854394555092, -0.0029787966050207615, -0.013547842390835285, 0.001179673825390637, -0.024765148758888245, -0.03175675496459007, 0.03603367507457733, -0.01413687877357006, -0.005762314889580011, 0.00859865453094244, -0.015020433813333511, -0.009763922542333603, -0.009482208639383316, 0.0030844390857964754, -0.0266346987336874, 0.027479838579893112, -0.02495722472667694, 0.0013397381408140063, -0.010212101973593235, -0.008477005176246166, -0.021154098212718964, 0.00878432858735323, 0.012446600012481213, -0.003354947781190276, -0.015507029369473457, 0.039234962314367294, -0.0176582932472229, -0.005435783416032791, -0.01400882750749588, 0.037519071251153946, -0.020897993817925453, -0.03395923972129822, -0.012113666161894798, 0.017875980585813522, -0.025597482919692993, 0.00955903995782137, -0.017543047666549683, 0.022716324776411057, -0.018849171698093414, -0.010160882025957108, -0.022844376042485237, -0.00802882481366396, -0.026916412636637688, -0.007919981144368649, 0.003329337341710925, -0.02289559692144394, -0.009699896909296513, 0.013138077221810818, -0.022741936147212982, 0.023010844364762306, 0.018349770456552505, -0.017210112884640694, 0.015788741409778595, -0.015417393296957016, 0.005720697809010744, -0.02293401211500168, 0.023215726017951965, 0.0006558634340763092, -0.007119659800082445, 0.013010025955736637, -0.01924613118171692, 0.03570074215531349, -0.003402967005968094, -0.01598081924021244, -0.03854348137974739, -0.03595684468746185, -0.02482917346060276, -0.002261708490550518, -0.040028881281614304, 0.002948384266346693, 0.0015350165776908398, -0.017901591956615448, 0.0025498243048787117, -0.022165704518556595, 0.034958042204380035, -0.024304162710905075, -0.02650664746761322, -0.025315769016742706, -0.05237303674221039, -0.016825959086418152, -0.010474607348442078, 8.838550274958834e-05, 0.02914450690150261, -0.016032040119171143, -0.031193330883979797, -0.021333370357751846, -0.009187690913677216, -0.00327651621773839, 0.03280678018927574, 0.015186900272965431, -0.036084894090890884, 0.014213710092008114, -0.0009988012025132775, 0.001493399846367538, 0.009847155772149563, -0.0007182885310612619, 0.015878377482295036, -0.01423931960016489, 0.03170553594827652, -0.02893962524831295, -0.0020024043042212725, -0.05419136956334114, -0.052398648113012314, -0.003182078246027231, -0.040028881281614304, 0.02272913046181202, -0.022473027929663658, -0.012696299701929092, -0.0013813548721373081, -0.012625872157514095, -0.0011540636187419295, -0.016493026167154312, -0.003937581554055214, 0.026942022144794464, 0.007382165640592575, 0.005515815690159798, 0.03208969160914421, -0.0049299802631139755, 0.014149683527648449, -0.06335984915494919, -0.01656985655426979, -0.011883173137903214, -0.020693112164735794, -0.0022553058806806803, 0.023433413356542587, -0.0035950441379100084, -0.01153103169053793, -0.05439624935388565, -0.017709514126181602, -0.020641891285777092, 0.019386988133192062, 0.012613066472113132, -0.000375150702893734, -0.015417393296957016, -0.05629141256213188, -0.003326136153191328, 0.006780323572456837, 0.008835549466311932, -0.0001141458487836644, -0.024649901315569878, -0.05972319096326828, -0.0076958914287388325, -0.022703519091010094, -0.03539341688156128, -0.011191695928573608, -0.03882519528269768, 0.023471828550100327, 0.009744714014232159, -0.0138807762414217, -0.004187282174825668, -0.0036558685824275017, 0.02068030647933483, 0.03867153450846672, 0.006303332280367613, 0.002112848684191704, 0.014610668644309044, -0.012088055722415447, -0.005983203649520874, 0.00899561308324337, -0.015571055002510548, -0.019310157746076584, 0.035342197865247726, -0.007036426570266485, -0.016428999602794647, 0.020782748237252235, 0.031090889126062393, 0.014559448696672916, 0.012062445282936096, 0.004907571244984865, 0.0034093696158379316, 0.00166947057005018, -0.0015166092198342085, 0.0037743160501122475, -0.0009163680952042341, -0.011038034223020077, -0.022114483639597893, 0.005362153984606266, 0.009597455151379108, -9.038631105795503e-05, -0.006284124217927456, -0.016249727457761765, -0.02294681780040264, -0.021410200744867325, -0.0019367779605090618, 0.011921589262783527, 0.012638676911592484, 0.009917584247887135, 0.035675130784511566, 0.010231309570372105, -0.006463396362960339, -0.0138807762414217, 0.007471801247447729, 0.028709132224321365, -0.015302146784961224, 0.011537434533238411, 0.006383364088833332, 0.025892000645399094, 0.009418183006346226, 0.002983598504215479, 0.015596665441989899, 0.024188917130231857, 0.029477441683411598, 0.014495423063635826, -0.016044845804572105, -0.004597046412527561, -0.005563835147768259, -0.011960004456341267, -0.0005710293771699071, 0.01505884900689125, -0.021627888083457947, -0.008022422902286053, 0.013535036705434322, -0.006031222641468048, -0.03892763704061508, 0.00563106220215559, 0.0399264395236969, 0.002357747172936797, -0.0066330647096037865, 0.03229457139968872, 0.024124890565872192, -0.006044027861207724, -0.011166085489094257, 0.006521019618958235, 0.012408184818923473, 0.003777517471462488, -0.02260107919573784, 0.031270161271095276, 0.01837538182735443, 0.015148485079407692, -0.0023449419531971216, -0.0011852760799229145, -0.04056669399142265, 0.019233325496315956, -0.014687499962747097, -0.01381675060838461, -0.030015256255865097, 0.013496621511876583, 0.0049171750433743, -0.015507029369473457, 0.007330944761633873, -0.022665103897452354, -0.01832416094839573, 0.019566260278224945, 0.01983516849577427, -0.03618733584880829, -0.0088035361841321, -0.021000435575842857, -0.01715889200568199, 0.03879958763718605, 0.019028443843126297, 0.011588655412197113, 0.005320537369698286, -0.012126470915973186, 0.0014741921331733465, 0.014290540479123592, -0.003476596437394619, 0.02886279486119747, 0.0014998024562373757, -0.012081652879714966, 0.023241335526108742, 0.038902025669813156, -0.004116853699088097, -0.027531059458851814, 0.01245300192385912, -0.028965234756469727, 0.020104076713323593, -0.012913987971842289, -0.01042338740080595, -0.023305362090468407, -0.03372874855995178, 0.028529860079288483, -0.029349390417337418, 0.0231004785746336, 0.0173637755215168, -0.008336148224771023, 0.005230901297181845, -0.004280119203031063, 0.01318929810076952, -0.013035636395215988, 0.018695509061217308, -0.012241717427968979, 0.04474117234349251, 0.020667502656579018, 0.04092523828148842, 0.018106473609805107, -0.003639862174168229, 0.023164505138993263, 0.02440660446882248, 0.006028021685779095, 0.0226138848811388, -0.041795987635850906, 0.015801547095179558, 0.01423931960016489, 0.012446600012481213, 0.04333260655403137, 0.017056452110409737, 0.010429789312183857, 0.023202920332551003, -0.009757519699633121, -0.008989211171865463, 0.03572634980082512, -0.010000817477703094, 0.02919572778046131, -0.013394180685281754, -0.030373800545930862, -0.019054053351283073, 0.02239619567990303, 0.014060048386454582, -0.044689953327178955, 0.01581435278058052, 0.00305082555860281, -0.022127289324998856, 0.0071004522033035755, -0.0024121690075844526, -0.000944379367865622, 0.022421807050704956, 0.005688684992492199, 0.009962402284145355, 0.030604293569922447, -0.002466590842232108, 0.012670690193772316, 0.020078465342521667, -0.04415213689208031, 0.00950141716748476, -0.012337756343185902, 0.001500602811574936, 0.007190088275820017, -0.03951667249202728, -0.050093721598386765, -0.012856364250183105, 0.00657544145360589, -0.0009667883859947324], "index": 83}, {"title": "Bonilla observation", "text": "On August 12, 1883, the astronomer Jos\u00e9 Bonilla reported that he saw more than 300 dark, unidentified objects crossing before the Sun while observing sunspot activity at Zacatecas Observatory in Mexico. He was able to take several photographs, exposing wet plates at 1/100 second. These represent the earliest photos of an unidentified flying object.", "vector": [0.03938209265470505, -0.020690200850367546, -0.013534711673855782, -0.04537702351808548, -0.04417803883552551, -0.03200371563434601, -0.004519256297498941, 0.02880641631782055, 0.034647632390260696, 0.051433444023132324, -0.06960269808769226, 0.01139037124812603, -0.007412964012473822, -0.020367396995425224, -0.033387161791324615, 0.03314121440052986, -0.01301207672804594, 0.028883274644613266, -0.02583969384431839, -0.0472831055521965, 0.01958344504237175, -0.008277617394924164, -0.00106928835157305, 0.03304898366332054, 0.05020371451973915, 0.01393437385559082, 0.021489525213837624, 0.03861350938677788, -0.04762127995491028, 0.01337330974638462, 0.05469222739338875, 0.024825166910886765, 0.00033697474282234907, 0.028698815032839775, 0.02238108031451702, -0.01876874826848507, 0.004576900042593479, -0.04602263122797012, 0.018784120678901672, -0.011805404908955097, 0.007778040133416653, -0.02439476177096367, 0.021120605990290642, 0.0032683908939361572, -0.06274695694446564, -0.03633851185441017, -0.024732938036322594, -0.042794592678546906, -0.04835911840200424, -0.022749997675418854, 0.010306671261787415, -0.040181417018175125, -0.020505741238594055, -0.01580202579498291, -0.02102837711572647, 0.027469085529446602, 0.017262330278754234, 0.03609256446361542, 0.0222888495773077, -0.021105235442519188, 0.07575134932994843, -0.03686114773154259, -0.003443242982029915, 0.022181248292326927, -0.00011768897093134001, -0.02390287071466446, 0.00931520201265812, 0.0026093325577676296, 0.0060410466976463795, 0.018123140558600426, 0.02651604637503624, 0.006682812236249447, -0.004215667024254799, 0.0025881966575980186, 0.03317195549607277, 0.009000083431601524, 0.02822229638695717, -0.02880641631782055, -0.043194252997636795, 0.0065137241035699844, 0.02534780278801918, -0.01546385046094656, 0.023195775225758553, 0.01953732967376709, 0.030604897066950798, 0.006006460636854172, 0.013480911031365395, -0.05149492993950844, -0.044823646545410156, -0.014088090509176254, 0.00893859751522541, 0.020813174545764923, -0.008861739188432693, 0.04033513367176056, 0.009392060339450836, -0.024871282279491425, 0.05496891587972641, -0.03360236436128616, -0.004035050515085459, 0.05048040300607681, -0.030589524656534195, -0.014218749478459358, -0.03415574133396149, -0.02633158676326275, 0.03357161954045296, -0.06290066987276077, -0.02548614703118801, 0.00568365678191185, -0.034278713166713715, 0.05466148257255554, -0.016816552728414536, 0.008231502957642078, -0.015317820012569427, -0.024609964340925217, 0.00550304027274251, 0.05546080693602562, -0.012220438569784164, 0.051525671035051346, -0.017001012340188026, 0.023533951491117477, 0.036492228507995605, -0.014326350763440132, 0.0441165529191494, 0.05758209154009819, -0.014956586994230747, 0.013888259418308735, 0.043962836265563965, 0.010176013223826885, -0.021643241867423058, 0.006433023139834404, 0.007977871224284172, -0.03101992979645729, 0.03587736189365387, 0.02574746496975422, -0.018753377720713615, -0.006033360958099365, -0.01876874826848507, 0.04147263243794441, 0.02623935602605343, 0.004784416873008013, -0.04476216062903404, 0.011259712278842926, -0.019660303369164467, 0.07765742391347885, -0.047067902982234955, -0.028299152851104736, -0.004799788352102041, -0.03246486186981201, -0.013842144049704075, 0.019014695659279823, 0.03074324131011963, -0.0052378796972334385, 0.02044425532221794, -0.02147415466606617, 0.0027323055546730757, 0.04442398250102997, 0.03381756693124771, 0.004415498115122318, -0.02025979571044445, -0.014779813587665558, -0.030374322086572647, 0.020628714933991432, 0.015509964898228645, -0.0033279559575021267, -0.009553462266921997, -0.055214859545230865, 0.022949829697608948, 0.0006907621864229441, 0.01918378286063671, 0.02665439061820507, 0.0409807413816452, -0.021397296339273453, -0.01841520145535469, -0.00046282989205792546, 0.017123986035585403, -0.004976562224328518, 0.04811317101120949, 0.013357938267290592, 0.045530740171670914, -0.003310662694275379, -0.0648067519068718, -0.011490286327898502, 0.042333442717790604, -0.012858361005783081, -0.001810008310712874, 0.011943749152123928, 0.02124357968568802, 0.009099999442696571, -0.04325573891401291, 0.01008378341794014, 0.013580827042460442, -0.03809087723493576, 0.014241806231439114, 0.01773885078728199, 0.032833781093358994, -0.02786874771118164, -0.0652986466884613, -0.06203985959291458, -0.04848209023475647, -0.041718579828739166, -0.017139356583356857, -0.0020751687698066235, -0.03237263485789299, 0.01886097900569439, 0.008277617394924164, -0.028760302811861038, 0.013250336982309818, -0.006171705666929483, -0.007028673309832811, -0.0008488016901537776, 0.00893859751522541, -0.039412833750247955, -0.010652532801032066, 0.029697971418499947, -0.025870436802506447, 0.020382769405841827, 0.005768200848251581, -0.042517904192209244, 0.014864357188344002, -0.0477135106921196, 0.035938847810029984, -0.007678124587982893, -0.022135132923722267, 0.021013004705309868, 0.012912161648273468, 0.02728462591767311, 0.009491975419223309, 0.024702195078134537, -0.03643074259161949, -0.05426182225346565, -0.02809932269155979, -0.03953580930829048, -0.0048420606181025505, -0.0024786738213151693, 0.03381756693124771, 0.018430573865771294, 0.0256552342325449, 0.03507803753018379, 0.00025819518486969173, -0.016017228364944458, 0.022842228412628174, 0.05048040300607681, -0.040765538811683655, 0.008854053914546967, 0.05109526589512825, 0.019199153408408165, -0.03972026705741882, -0.0868804007768631, -0.04156486317515373, 0.03268006443977356, 0.06560607999563217, -0.002513259882107377, 0.010967651382088661, 0.0378141850233078, -0.024118073284626007, -0.05739763006567955, -0.025670606642961502, 0.014702955260872841, 0.00732841994613409, 0.003727617906406522, -0.0387057401239872, 0.007109374739229679, -0.002203906187787652, 0.00594113115221262, -0.010844678618013859, 0.004534628242254257, 0.0026881122030317783, -0.041657090187072754, 0.010975337587296963, -0.035047296434640884, -0.021489525213837624, -0.017262330278754234, 0.008362161926925182, 0.0017466003773733974, -0.04549999535083771, 0.06689729541540146, 0.005679813679307699, 0.051740873605012894, 0.002225042087957263, -0.0008396747871302068, 0.022842228412628174, -0.030866215005517006, -0.02588580921292305, -0.031096788123250008, -0.013004391454160213, 0.04749830812215805, -0.03972026705741882, -0.018445944413542747, 0.07907161861658096, -0.011628630571067333, -0.020336654037237167, 0.015071874484419823, -0.04479290172457695, 0.020136823877692223, 0.025363173335790634, 0.009584205225110054, 0.001077934866771102, -0.017170099541544914, 0.006067947018891573, -0.027884120121598244, -0.019568072631955147, 0.04577668756246567, -0.015740539878606796, 0.07286148518323898, 0.015210218727588654, 0.01152102928608656, -0.014487752690911293, -0.03390979394316673, 0.002119362121447921, -0.071139857172966, -0.09376688301563263, 0.025409288704395294, -0.005868116393685341, 0.04537702351808548, 0.0022192776668816805, -0.010952279902994633, 0.04848209023475647, -0.025317059829831123, -0.01953732967376709, -0.019998477771878242, -0.017984796315431595, -0.011597887612879276, 0.03006689064204693, -0.03430945798754692, 0.054231077432632446, 0.010913850739598274, 0.008285303600132465, -0.03907465934753418, -0.04048885032534599, -0.013811401091516018, -0.0004212784697301686, -0.07372229546308517, 0.006033360958099365, 0.03181925415992737, 0.009707177989184856, -0.005898859351873398, -0.009968495927751064, 0.041933782398700714, 0.012097465805709362, 0.01850743032991886, 0.016416890546679497, -0.009645692072808743, 0.04669898375868797, -0.007751139812171459, -0.04651452228426933, 0.03317195549607277, 0.05254019796848297, -0.011797718703746796, -0.009599576704204082, 0.029544254764914513, 0.0008276656735688448, -0.022842228412628174, -0.02809932269155979, -0.054415538907051086, 0.034463174641132355, -0.01469526905566454, 0.0056144846603274345, -0.016170945018529892, 0.014457008801400661, 0.02777651883661747, -0.028821788728237152, 0.02408733032643795, 0.019752532243728638, 0.0034336356911808252, -0.004254096187651157, 0.02719239704310894, 0.0477135106921196, 0.022396450862288475, -0.019030066207051277, 0.004957347642630339, -0.036984119564294815, 0.0454692542552948, -0.08110067248344421, 0.00558374123647809, -0.058043237775564194, 0.0024440877605229616, -0.026884963735938072, 0.01154408697038889, -0.0029071576427668333, -0.007020987570285797, -0.05558377876877785, -0.019276011735200882, 0.03390979394316673, -0.001032780739478767, 0.01729307323694229, 0.007109374739229679, -0.025455404072999954, 0.004634543787688017, -0.0076934960670769215, -0.06449931859970093, 0.03928986191749573, 0.008070101030170918, -0.004815160296857357, 0.01733918860554695, -0.010629476048052311, -0.030820099636912346, 0.00742833549156785, 0.009591891430318356, 0.019875505939126015, 0.05884256213903427, 0.03560067340731621, 0.04079627990722656, 0.03716857731342316, 0.018384458497166634, 0.013281079940497875, 0.07409121096134186, -0.004008150193840265, 0.051248982548713684, 0.02646993100643158, 0.00801630038768053, 0.02809932269155979, 0.023195775225758553, 0.039597295224666595, -0.02935979515314102, -0.0044885133393108845, 0.0004087890265509486, 0.009638005867600441, -0.02255016751587391, 0.032341890037059784, 0.013972803018987179, -0.03218817338347435, 0.03769121319055557, -0.03615405037999153, 0.02607026882469654, -0.03701486065983772, 0.021673984825611115, 0.06013378128409386, 0.00670971255749464, -0.01944510079920292, 0.004972719121724367, 0.03470911830663681, 0.05380067229270935, 0.02152026817202568, 0.008838681504130363, -0.011766975745558739, -0.02872955985367298, 0.04334796965122223, -0.016232430934906006, 0.03615405037999153, -0.02089003287255764, 3.2664695027051494e-05, 0.056475333869457245, -0.05669053643941879, -0.0027668916154652834, -0.062009118497371674, 0.001665899413637817, -0.023656923323869705, -0.021489525213837624, -0.03889020159840584, 0.0076819672249257565, -0.08528175204992294, 0.007674281485378742, 0.018246114253997803, -0.026454558596014977, 0.001323880860581994, -0.01082930713891983, -0.014433952048420906, -0.05795101076364517, 0.017446789890527725, 0.0328645259141922, 0.005376224406063557, 0.0396280363202095, 0.035539187490940094, -0.045315537601709366, -0.02980557270348072, -0.014049661345779896, -0.029498139396309853, -0.002607411239296198, 0.01039890106767416, -0.019829390570521355, 0.025778207927942276, 0.03978175297379494, -0.032126687467098236, 0.0042925248853862286, 0.04780574142932892, -0.015832768753170967, -0.06388445198535919, 0.030651012435555458, 0.022227363660931587, -0.03191148489713669, 0.02201216109097004, 0.00209822622127831, -0.027069423347711563, -0.0063407933339476585, 0.009207600727677345, 0.0027419128455221653, -0.04703715816140175, -0.02696182206273079, -0.08694188296794891, 0.051525671035051346, 0.05290911719202995, 0.025040369480848312, -0.01724695786833763, 0.024287160485982895, -0.0023883655667304993, -0.019644930958747864, -0.014787498861551285, 0.009384374134242535, -0.01922989822924137, 0.011989864520728588, -0.0032876054756343365, 0.031096788123250008, 0.01102913822978735, -0.012151266448199749, -0.02030591107904911, 0.036123309284448624, 0.014687583781778812, 0.023841382935643196, 0.038920942693948746, -0.006329264957457781, 0.011813090182840824, -0.05426182225346565, 0.027299998328089714, 0.024364018812775612, -0.017754221335053444, 0.019798647612333298, 0.03298749774694443, -0.013919002376496792, 0.009953124448657036, 0.017139356583356857, 0.008431334048509598, -0.026393072679638863, 0.03529324010014534, -0.0039927782490849495, 0.04989628121256828, -0.01675506681203842, 0.022673141211271286, 0.009899323806166649, -0.0023595436941832304, 0.03011300414800644, -0.04297905042767525, 0.010560302995145321, -0.005376224406063557, -0.044147294014692307, 0.004407812375575304, 0.03344864770770073, -0.031542565673589706, 0.034647632390260696, 0.007040202151983976, -0.04470067098736763, -0.00780878309160471, -0.032710809260606766, 0.03839830681681633, -0.014918157830834389, -0.027991721406579018, -0.02485590986907482, 0.007151646539568901, 0.012789187952876091, -0.00222888495773077, -0.03879797086119652, 0.0024613807909190655, 0.03975101187825203, -0.023195775225758553, 0.06738918274641037, -0.016447633504867554, 0.0018417122773826122, 0.006260092370212078, 0.00028797771665267646, 0.015771282836794853, 0.031634796410799026, 0.0016995248151943088, -0.0020943833515048027, -0.00127488374710083, 0.007482136134058237, -0.014111148193478584, 0.021996788680553436, -0.0315118208527565, 0.04399357736110687, 0.004707559011876583, -0.0072438763454556465, 0.0018484373576939106, 0.012881417758762836, -0.014257177710533142, 7.091360748745501e-05, 5.311015047482215e-05, -0.013027448207139969, 0.00028821788146160543, -0.06243952363729477, -0.017170099541544914, -0.022089019417762756, -0.023072803393006325, -0.015148731879889965, -0.0011730467667803168, -0.0003129566030111164, -0.02133580856025219, 7.199442916316912e-05, -0.01172854658216238, -0.03799864649772644, 0.010329728946089745, -0.028345268219709396, -0.0024421662092208862, 0.018615033477544785, 0.021089863032102585, 0.07366080582141876, 0.013296451419591904, 0.05091080814599991, 0.015863511711359024, -0.008246874436736107, 0.0019464314682409167, 0.016539864242076874, 0.019614188000559807, 0.012935218401253223, -0.009422803297638893, -0.019199153408408165, 0.024241045117378235, 0.012935218401253223, 0.04045810550451279, 0.011129053309559822, 0.00891553983092308, -0.006947972346097231, 0.017093243077397346, -0.04925067350268364, -0.03695337474346161, 0.009799407795071602, 0.01981401816010475, 0.010437330231070518, -0.011805404908955097, -0.027838004752993584, -0.008362161926925182, -0.01190531998872757, 0.002463302109390497, -0.020367396995425224, -0.014426265843212605, 0.057920265942811966, 0.004304053727537394, -0.04510033503174782, 0.02999003231525421, 0.051740873605012894, -0.0024460090789943933, 0.005034205969423056, -0.006390751339495182, -0.030543409287929535, 0.017754221335053444, -0.0028226138092577457, -0.011559458449482918, -0.018077025189995766, 0.027084795758128166, -0.05281689018011093, 0.024317903444170952, -0.062101349234580994, -0.027023309841752052, 0.022258106619119644, -0.003677660133689642, -0.023165032267570496, 0.0006691458402201533, 0.0025805109180510044, 0.0033048985060304403, -0.01652449183166027, -0.00986089464277029, 0.032926011830568314, -0.011336570605635643, -0.014833614230155945, 0.006344636436551809, 0.005372381303459406, 0.023964356631040573, -0.023211147636175156, 0.016278546303510666, 0.001258551492355764, -0.003729539457708597, -0.02553226239979267, -0.014987329952418804, -0.013173478655517101, 0.008631165139377117, -0.014587667770683765, -0.005406967364251614, 0.015786655247211456, 0.0011326962849125266, 0.010675590485334396, -0.004807474557310343, -0.044454727321863174, 0.020152194425463676, 0.008362161926925182, -0.002632390009239316, -0.048143915832042694, 0.014103461988270283, -0.01456461101770401, -0.028191551566123962, -0.00841596256941557, 0.01019906997680664, -0.028206923976540565, 0.03249560669064522, -0.03904391825199127, 0.01246638409793377, 0.011267397552728653, 0.014280235394835472, -0.017861822620034218, 0.019644930958747864, -0.01746216043829918, -0.002113597933202982, -0.02128969505429268, -0.0003607527178246528, -0.023918241262435913, -0.001357506262138486, 0.03461689129471779, 0.03341790288686752, 0.0015784732531756163, -0.01526401937007904, -0.007332263048738241, 0.04423952475190163, -0.0034528502728790045, -0.031849998980760574, 0.018538175150752068, -0.027177024632692337, -0.029744086787104607, 0.02102837711572647, -0.027653545141220093, -0.02224273420870304, -0.003873648354783654, -0.007539779879152775, -0.006775041576474905, -0.013096620328724384, -0.008185387589037418, -0.02628547139465809, 0.016862668097019196, -0.020229052752256393, -0.004280996508896351, 0.01589425653219223, -0.015402363613247871, 0.011359627358615398, 0.00668665487319231, 0.03146570920944214, 0.028191551566123962, 0.013849830254912376, 0.017216214910149574, 0.039597295224666595, -0.019199153408408165, -0.005387753248214722, 0.029329052194952965, -0.012819931842386723, 0.012297296896576881, 0.021673984825611115, 0.023165032267570496, 0.02493276819586754, 0.015071874484419823, 0.013181164860725403, -0.02997465990483761, -0.0009434332023374736, -0.014211063273251057, 0.005257094278931618, -0.051248982548713684, 0.016124829649925232, 0.025993410497903824, 0.0016995248151943088, -0.032034456729888916, -0.0171086136251688, 0.006156334187835455, 0.0002728462568484247, 0.008246874436736107, 0.014787498861551285, 0.02175084315240383, 0.044854387640953064, -0.0023595436941832304, -0.002430637599900365, -0.041257429867982864, -0.0009155721636489034, -0.03043580800294876, -0.011175167746841908, -0.00013774413673672825, 0.02733074128627777, 0.004446241073310375, 0.01172854658216238, 0.014895100146532059, -0.01629391871392727, 0.04663749784231186, -0.009230658411979675, -0.016232430934906006, 0.01687803864479065, -0.002065561478957534, 0.0068788002245128155, 0.03729155287146568, -0.026408445090055466, 0.0007118982030078769, -0.0360003337264061, -0.04928141459822655, -0.01339636743068695, -0.017231587320566177, 0.009576519951224327, -0.013880573213100433, -0.044454727321863174, -0.01918378286063671, -0.024779051542282104, 0.03606182336807251, -0.0508800633251667, 0.03507803753018379, 0.026101011782884598, 0.006859585642814636, -0.06849594414234161, -0.03876722604036331, -0.014418580569326878, -0.01211283728480339, -0.018538175150752068, 0.003942820709198713, 0.032803039997816086, -0.03246486186981201, 0.03125050291419029, 0.038828711956739426, -0.005994932260364294, -0.029636485502123833, -0.0019031987758353353, -0.01298901904374361, 0.031450334936380386, 0.028376011177897453, -0.0308354701846838, -0.0041234372183680534, -0.0025881966575980186, -0.0033625420182943344, -0.00896165519952774, -0.005522254854440689, -0.005349324084818363, -0.020229052752256393, 0.040181417018175125, 0.00095400121062994, 0.03088158555328846, 0.00044313500984571874, -0.012635472230613232, 0.018661146983504295, -0.03178851306438446, 0.038552023470401764, 0.0076627531088888645, 0.00015635820454917848, -0.021458782255649567, 0.013734542764723301, -0.02854510024189949, -0.02313428930938244, -0.019829390570521355, 0.048605065792798996, -0.02182770147919655, -0.008308361284434795, -0.0023384077940136194, -0.01670895144343376, 0.001492968644015491, 0.038521282374858856, 0.027115538716316223, 0.044362496584653854, 0.04199526831507683, 0.02224273420870304, -0.003537394106388092, -0.012205067090690136, 0.019383613020181656, 0.06492972373962402, 0.08091621100902557, 0.011159796267747879, -0.013496282510459423, -0.019245268777012825, 0.00018457953410688788, 0.05533783510327339, -0.011252026073634624, 0.022273479029536247, -0.0006902818568050861, 0.016862668097019196, 0.025363173335790634, 0.016416890546679497, 0.010521874763071537, 0.03845979645848274, 0.01245101261883974, -0.022627025842666626, -0.006694340612739325, -0.012174323201179504, -0.013165793381631374, -0.04021215811371803, 0.05057263374328613, -0.027084795758128166, -0.0007921188371255994, -0.009169171564280987, 0.010099154897034168, 0.011067566461861134, 0.008070101030170918, 0.0373530387878418, -0.016724323853850365, 0.00634847953915596, -0.0032914483454078436, 0.003794868942350149, -0.014264863915741444, -0.003954349551349878, -0.0034451645333319902, -0.01381908729672432, 0.009000083431601524, 0.0034124997910112143, 0.005752828903496265, 0.021397296339273453, -0.01733918860554695, 0.018430573865771294, 0.0085543068125844, -0.01548690814524889, -0.00501883402466774, -0.04789796844124794, -0.016678208485245705, 0.008039357140660286, -0.006717398297041655, 0.037476010620594025, 0.013165793381631374, 0.03268006443977356, -0.010921536013484001, 0.027991721406579018, 0.02065945789217949, -0.008446705527603626, 0.009530404582619667, 0.011205911636352539, -0.02773040346801281, -0.03661520034074783, -0.018830236047506332, 0.018968580290675163, 0.010322043672204018, 0.03092770092189312, 0.013942060060799122, -0.004676815588027239, -0.020859289914369583, 0.0022192776668816805, -0.0009174935985356569, 0.004757516551762819, -0.0052263508550822735, 0.011267397552728653, -0.010575675405561924, -0.004669129848480225, -0.0414111465215683, -0.02322651818394661, -0.013173478655517101, 0.0096764350309968, 0.0030493452213704586, 0.03470911830663681, 0.01881486363708973, 0.025409288704395294, -0.005034205969423056, -0.0034067353699356318, 0.003969721030443907, -0.040857765823602676, 0.02179695852100849, -0.009799407795071602, 0.025563005357980728, 0.005975717678666115, 0.0414111465215683, -0.0010702491272240877, 0.005606798455119133, -0.021551012992858887, 0.02201216109097004, 0.003812161972746253, 0.00840059109032154, 0.01809239760041237, 0.030635640025138855, -0.027484457939863205, 0.011843834072351456, 0.054323308169841766, 0.0025555319152772427, -0.05091080814599991, -0.021504897624254227, -0.010675590485334396, 0.016017228364944458, 0.028191551566123962, 0.026393072679638863, 0.0008103726431727409, -0.010091468691825867, -0.0033471703063696623, -0.0011211675591766834, 0.01764662005007267, -0.013227279298007488, 0.004730616230517626, 0.005264780018478632, -0.0060218325816094875, 0.013135049492120743, -0.004822846036404371, 0.007051730994135141, -0.0034394001122564077, -0.05893479287624359, 0.004035050515085459, -0.05001925304532051, 0.013488597236573696, 0.017892565578222275, -0.04583817347884178, -0.003195375669747591, 0.008861739188432693, 0.02021368034183979, 0.013580827042460442, 0.034862834960222244, -0.017431417480111122, 0.030358951538801193, -0.06308513134717941, 0.016601350158452988, 0.012581671588122845, -0.008123901672661304, 0.0014881649985909462, 0.005675971042364836, -0.006183234509080648, -0.03793716058135033, 0.014572296291589737, -0.033294931054115295, 0.042118240147829056, -0.0015928841894492507, 0.016401519998908043, 0.0012393369106575847, -0.002130890963599086, -0.017800336703658104, -0.0378141850233078, 0.015110302716493607, -0.03366385027766228, 0.03667668625712395, 0.0022269636392593384, -0.03354087471961975, 0.02196604572236538, 0.0011240497697144747, 0.0016831924440339208, -0.01724695786833763, 0.07027904689311981, -0.01206672191619873, -0.017277700826525688, -0.007447550073266029, -0.005798943806439638, 0.0005846019485034049, 0.02035202644765377, -0.026715876534581184, -0.02457922138273716, 0.046883441507816315, -0.0012316510546952486, 0.008116215467453003, 0.006237035151571035, 0.025147970765829086, 0.011597887612879276, -0.02291908673942089, -0.018153883516788483, 0.04002770036458969, 0.03231114521622658, -0.022765370085835457, 0.0016601349925622344, -0.01580202579498291, -0.006509881466627121, -0.011913006193935871, -0.02327263355255127, -0.015832768753170967, -0.02345709316432476, -0.017185471951961517, 0.006198605988174677, 0.01580202579498291, 0.02056722901761532, -0.03307972848415375, -0.0006888407515361905, -0.02128969505429268, 0.007140117697417736, -0.026223985478281975, 0.014457008801400661, 0.030374322086572647, 0.005456925369799137, -0.03231114521622658, -0.01228961069136858, -0.0333256721496582, 0.01855354569852352, -0.026270098984241486, 0.0071900757029652596, 0.023195775225758553, -0.015025759115815163, -0.03609256446361542, -0.019644930958747864, 0.0018811021000146866, -0.023626180365681648, 0.01858428865671158, 0.025947295129299164, 0.051740873605012894, -0.01155177317559719, -0.039996955543756485, 0.007459078915417194, 0.030266720801591873, -0.0008733001886866987, 0.045407768338918686, -0.003581587690860033, 0.0009525601053610444, 0.0014708719681948423, 0.016309289261698723, 0.018922464922070503, -0.006148648448288441, -0.01062178984284401, 0.023779897019267082, 0.0015448478516191244, 0.005433867685496807, 0.02507111243903637, 0.01909155212342739, 0.011090624146163464, -0.023257261142134666, 0.014510809443891048, -0.004154180642217398, -0.015310133807361126, -0.002225042087957263, -0.040949996560811996, 0.02467145025730133, 0.030604897066950798, 0.030820099636912346, -0.012735387310385704, 0.0032837623730301857, -0.01451849564909935, 0.029098477214574814, 0.027991721406579018, -0.021089863032102585, -0.006171705666929483, -0.013165793381631374, 0.0014285999350249767, 0.009238343685865402, -0.024517735466361046, -0.03676891699433327, -0.021720100194215775, 0.05057263374328613, 0.0477135106921196, 0.020413512364029884, -0.014149576425552368, 0.001369034987874329, -0.01864577643573284, 0.0036046451423317194, -0.023779897019267082, -0.017907937988638878, -0.009976182132959366, -0.019276011735200882, -0.00836984720081091, -0.004899703897535801, -0.0035354727879166603, -0.028376011177897453, 0.028345268219709396, -0.012543242424726486, 0.02264239639043808, 0.012866046279668808, 0.014057346619665623, -0.008285303600132465, -0.015325506217777729, -0.02359543740749359, 0.0076512242667376995, -0.0005149492644704878, -0.057428374886512756, -0.017400674521923065, -0.00896165519952774, 0.019060809165239334, -0.011866890825331211, 0.008500506170094013, -0.004669129848480225, -0.025470774620771408, -0.019706416875123978, -0.02593192458152771, -0.02065945789217949, -0.024287160485982895, 0.012366469018161297, -0.005207136273384094, -0.0048190029338002205, -0.006844214163720608, -0.008854053914546967, -0.02156638354063034, -0.033110469579696655, 0.010798563249409199, 0.012328039854764938, -0.024148816242814064, 0.017277700826525688, 0.031634796410799026, -0.004769045393913984, -0.00026708192308433354, 0.0042925248853862286, -0.01701638475060463, 0.008769509382545948, 0.021627869457006454, -0.01287373248487711, 0.00853124912828207, 0.017861822620034218, 0.021120605990290642, -0.018691889941692352, 0.01112136710435152, 0.010560302995145321, -0.010106840170919895, 0.008769509382545948, -0.027346113696694374, -0.01764662005007267, -0.020198309794068336, 0.008830996230244637, 0.014203377068042755, -0.022135132923722267, 0.012658529914915562, -0.010406587272882462, -0.029006248340010643, -0.0007964420947246253, 0.006978715769946575, 0.0337560772895813, 0.017477532848715782, -0.009353631176054478, 0.010468073189258575, -0.0012278081849217415, 0.01114442478865385, 0.011559458449482918, 0.016693580895662308, -0.0193528700619936, 0.05524560436606407, 0.012404898181557655, 0.007674281485378742, 0.0007335145492106676, 0.025455404072999954, -0.02310354635119438, 0.016170945018529892, -0.016601350158452988, 0.045530740171670914, 0.008900168351829052, 0.023779897019267082, 0.017446789890527725, -0.0041349660605192184, 0.016954896971583366, 0.023564694449305534, -0.008123901672661304, -0.0055376263335347176, -0.010491130873560905, -0.003965877927839756, 0.008223816752433777, 0.015148731879889965, -0.008977026678621769, -0.02079780213534832, 0.0027207769453525543, 0.01188226230442524, -0.05902702361345291, 0.010744762606918812, -0.00041359267197549343, -0.018876349553465843, -0.022135132923722267, 0.03793716058135033, 0.004392440430819988, -0.031942225992679596, 0.0249942559748888, 0.01967567391693592, -0.0027438343968242407, 0.02808395028114319, 0.018338343128561974, -0.002715012524276972, 0.02808395028114319, 0.02511722780764103, 0.020244425162672997, 0.00019514752784743905, -0.03307972848415375, 0.003141575027257204, 0.05835067108273506, 0.026577532291412354, -0.01395743153989315, 0.00952271930873394, 0.013496282510459423, 0.008838681504130363, -0.009484290145337582, 0.05546080693602562, -0.00817001610994339, 0.00889248214662075, -0.031849998980760574, 0.0016678208485245705, 0.015202532522380352, 0.007835683412849903, 0.017954053357243538, -0.01152102928608656, -0.01564062386751175, -0.008000928908586502, 0.0019387456122785807, -0.006260092370212078, 0.021812329068779945, -0.0027822633273899555, -0.0014872043393552303, -0.027346113696694374, -0.02196604572236538, -0.00929983053356409, 0.0013392524560913444, -0.02268851175904274, 0.01594037003815174, -0.027668917551636696, -0.016693580895662308, -0.012258867733180523, 0.020106079056859016, -0.008485134690999985, -0.019383613020181656, -0.0039927782490849495, 0.008154644630849361, -0.011913006193935871, 0.007459078915417194, 0.035416215658187866, 0.006156334187835455, 0.01850743032991886, 0.02313428930938244, -0.03729155287146568, -0.0032299617305397987, -0.005449239630252123, 0.04586891457438469, 0.0026054896879941225, 0.006552153266966343, 0.0007930795545689762, 0.007143960800021887, -0.0014420502120628953, -0.02516334317624569, 0.013173478655517101, -0.010045354254543781, 0.0002963840670417994, -0.0028360639698803425, -0.020813174545764923, 0.015679053962230682, 0.009561148472130299, -0.020244425162672997, 0.02539391815662384, -0.011444171890616417, -0.0014939294196665287, -0.0021481839939951897, 0.014257177710533142, -0.015740539878606796, -0.030466552823781967, -0.013503968715667725, 0.005499197170138359, 0.014672212302684784, -0.028698815032839775, 0.004623014945536852, 0.013711486011743546, 0.026408445090055466, -0.039505064487457275, -0.031942225992679596, 0.03928986191749573, -0.009000083431601524, 9.877467527985573e-05, 0.02733074128627777, -0.016370775178074837, -0.028191551566123962, 0.0014036211650818586, 0.04190303757786751, -0.04808242991566658, 0.022980572655797005, -0.0029744086787104607, 0.000991469481959939, 0.04033513367176056, -0.03160405158996582, -0.01697026938199997, 0.007566680200397968, 0.02002922259271145, -0.0013949745334684849, 0.0025805109180510044, -0.011044509708881378, 0.058904051780700684, -0.001545808627270162, -0.012258867733180523, -0.034370943903923035, -0.044546958059072495, 0.009868580847978592, 0.008677279576659203, -0.030420437455177307, -0.020859289914369583, 0.01692415401339531, -0.024840539321303368, 0.01139037124812603, 0.023257261142134666, -0.022473309189081192, 0.013050505891442299, 0.005176393315196037, -0.006540624424815178, -0.012573985382914543, -0.025670606642961502, -0.01492584403604269, -2.1060921426396817e-05, 0.012666215188801289, -0.014795185066759586, -0.012458698824048042, -0.030850842595100403, -0.010514188557863235, -0.008700337260961533, 0.02196604572236538, 0.008654222823679447, -0.005529940593987703, 0.022396450862288475, 0.0003571499837562442, -0.006805785000324249, 0.021858444437384605, 0.028529727831482887, 0.04070405289530754, 0.020920775830745697, 0.015425421297550201, -0.013534711673855782, -0.0027092481032013893, 0.013734542764723301, -0.02817618101835251, -0.03134273365139961, 0.023795269429683685, 0.02813006564974785, -0.0008771431166678667, -0.03483209386467934, -0.009007769636809826, -0.03772195801138878, -0.027207769453525543, -0.019260641187429428, -0.013165793381631374, -0.030374322086572647, 0.03134273365139961, -0.0007258286932483315, 0.018830236047506332, 0.01156714465469122, 0.01764662005007267, 0.0015323584666475654, -0.02494814060628414, -0.022365707904100418, 0.0036699743941426277, -0.002520945854485035, 0.015271704643964767, 0.009130742400884628, -0.01064484752714634, -0.026039525866508484, 0.00259972526691854, 0.009369002655148506, -0.013488597236573696, 0.0024037372786551714, -0.005748986266553402, 0.042425673454999924, 0.033694591373205185, 0.012904475443065166, -0.012328039854764938, 0.027761146426200867, 0.0017417967319488525, 0.025578375905752182, -0.052202023565769196, 0.03627702593803406, -0.020244425162672997, 0.0028149280697107315, 0.016124829649925232, 0.0011240497697144747, 0.006963344290852547, -0.015786655247211456, -0.0008070101030170918, -0.01318885013461113, 0.01886097900569439, -0.02224273420870304, 0.04826688766479492, 0.01022212766110897, 0.003372149309143424, -0.032218918204307556, 0.030543409287929535, 0.000530320918187499, 0.0012451012153178453, 0.017385302111506462, 0.004446241073310375, 0.0124894417822361, -0.00010784152254927903, 0.004561528563499451, 0.008830996230244637, -0.019967734813690186, -0.05466148257255554, 0.006544467527419329, 0.009491975419223309, -0.004046579357236624, 0.010714019648730755, -0.013288766145706177, 0.015356249175965786, 0.005003462545573711, -0.028376011177897453, 0.016124829649925232, -0.017354559153318405, -0.027930235490202904, -0.02390287071466446, -0.007020987570285797, -0.048420604318380356, 0.05604492872953415, 0.015271704643964767, -0.011989864520728588, 0.00556068355217576, -0.012858361005783081, 0.022442566230893135, 0.02070557326078415, -0.03137347847223282, -0.010076097212731838, 0.025639863684773445, -0.031450334936380386, -0.006732769776135683, 0.005187922157347202, -0.008592735975980759, -0.03255709260702133, 0.016370775178074837, -0.008316046558320522, 0.006479138042777777, 0.02922145090997219, -0.023518579080700874, -0.006014146376401186, 0.012743073515594006, -0.015094931237399578, 0.042118240147829056, -0.026131754741072655, -0.0014593432424589992, -0.0038313765544444323, 0.02462533675134182, 0.02822229638695717, 0.0008363122469745576, -0.00853124912828207, 0.018568918108940125, 0.002513259882107377, -0.007747296709567308, 0.019214525818824768, 0.014141891151666641, 0.012720015831291676, -0.033879052847623825, -0.001936824177391827, 0.0007637774106115103, -0.018753377720713615, -0.032249659299850464, 0.02250405214726925, 0.020582599565386772, -0.006502195727080107, -0.011236654594540596, 0.009407431818544865, 0.012443327344954014, 0.013219594024121761, 0.017185471951961517, -0.012074408121407032, -0.003620016621425748, -0.022519424557685852, -0.014387836679816246, -0.0056990282610058784, -0.03148107975721359, -0.008023985661566257, 0.0018657305045053363, -0.0028360639698803425, 0.023472465574741364, 0.007908699102699757, 0.008154644630849361, 0.020336654037237167, -0.04291756451129913, -0.012704644352197647, 0.02686959318816662, 0.0012249259743839502, 0.01629391871392727, -0.013450168073177338, -0.03799864649772644, -0.02457922138273716, 0.008408276364207268, 0.030143748968839645, -0.02660827524960041, -4.998778968001716e-05, 0.0024287160485982895, 0.012720015831291676, 0.004288682248443365, -0.0005754750454798341, -0.011421114206314087, -0.026531416922807693, 0.021135978400707245, -0.032926011830568314, -0.04669898375868797, -0.021305065602064133, 0.008454391732811928, -0.0052263508550822735, 0.009807094000279903, 0.007847212255001068, -0.0166628360748291, 0.026054896414279938, 0.0034720648545771837, 0.0024440877605229616, -0.015133360400795937], "index": 84}, {"title": "Rhodes Scholarship", "text": "The Rhodes Scholarship, named after Cecil John Rhodes, is an international postgraduate award for selected foreign students to study at the University of Oxford. It describes itself as \"perhaps the most prestigious scholarship\" in the world.", "vector": [0.02137630805373192, -0.002015131525695324, -0.025521298870444298, 0.02288626879453659, -0.015121813863515854, -0.031146641820669174, 0.047341711819171906, -0.022560590878129005, -0.010362476110458374, 0.041894011199474335, -0.05181238055229187, 0.0260098148137331, 0.0006805001175962389, -0.01773463748395443, 0.030939392745494843, 0.05344076827168465, -0.002429630607366562, 0.00839360523968935, -0.06199721619486809, 0.018075119704008102, -0.014329824596643448, -0.007101997267454863, -0.008252971805632114, -0.03541006147861481, 0.020384471863508224, 0.006809627171605825, 0.011983463540673256, -0.03342638909816742, -0.06809627264738083, -0.016180265694856644, -0.007734848186373711, 0.01946665160357952, 0.007131604012101889, -0.018933724611997604, 0.009548281319439411, -0.029592271894216537, 0.013441612012684345, -0.010925010778009892, 0.04227890446782112, -0.008334391750395298, 0.04233811795711517, -0.017349746078252792, 0.019496258348226547, 0.015706554055213928, 0.01373028103262186, -0.01373768225312233, -0.04500275477766991, -0.004244914278388023, 0.012627417221665382, 0.0011435733176767826, -0.0014026351273059845, -0.02333037555217743, 0.010776975192129612, -0.003349300241097808, -0.02383369579911232, 0.0020947004668414593, 0.02565453015267849, 0.0303768590092659, -0.0063433158211410046, -0.03792666271328926, -0.037541769444942474, 0.017201710492372513, -0.009318826720118523, -0.03917016088962555, 0.05646069347858429, -0.01065114513039589, 0.030643321573734283, 0.01369327213615179, -0.003371505532413721, 0.009644504636526108, -0.004615002777427435, 0.04035444185137749, 0.030909786000847816, -0.010340270586311817, -0.03656473755836487, 0.01485534943640232, -0.011798419058322906, -0.022205306217074394, -0.00861565861850977, 0.02130229026079178, 0.034403420984745026, 0.014588885940611362, 0.001471101539209485, 0.0031161445658653975, -0.018726475536823273, -0.01714249700307846, 0.030495287850499153, -0.04766739159822464, 0.04127226397395134, 0.0159878209233284, -0.015573320910334587, 0.04627585783600807, 0.011132259853184223, -0.0034011127427220345, 0.017246121540665627, -0.053529590368270874, 0.028008293360471725, 0.0031809101346880198, 0.026335492730140686, 0.025846976786851883, 0.01181322243064642, -0.018001101911067963, -0.03647591546177864, 0.047341711819171906, 0.008512034080922604, -0.02005879394710064, -0.029118558391928673, -0.024647889658808708, 0.03780823573470116, 0.04695682227611542, -0.0068873455747962, 0.017912279814481735, -0.025121603161096573, 0.012849470600485802, -0.00432633375748992, 0.036949630826711655, 0.026069030165672302, 0.040798548609018326, -0.028008293360471725, -0.0199847761541605, -0.04941420629620552, 0.006987269502133131, -0.0038785268552601337, -0.01808992214500904, -0.03366324305534363, -0.052345309406518936, 0.009755531325936317, 0.09717041999101639, 0.013204755261540413, 0.026779599487781525, 0.025980208069086075, 0.007623821962624788, -0.020014382898807526, -0.010910207405686378, -0.008438016287982464, 0.0520196296274662, 0.019244598224759102, 0.024070551618933678, -0.04571332409977913, 0.02855602279305458, -0.052878234535455704, -0.02978471666574478, -0.006498753093183041, -0.012960497289896011, 0.005821491125971079, -0.027371739968657494, 0.005436599254608154, -0.0207841657102108, 0.011346911080181599, -0.007079791743308306, 0.015588125213980675, -0.015440089628100395, -0.05945100635290146, 0.024248193949460983, -0.059628646820783615, 0.03597259521484375, -0.04411454126238823, -0.023093517869710922, 0.037393733859062195, 0.0031957137398421764, -0.024943960830569267, -0.00594362011179328, 0.014899760484695435, 0.029991967603564262, -0.006554265972226858, -0.013404603116214275, 0.0007702465518377721, 0.0031716579105705023, -0.013271370902657509, 0.015736160799860954, -0.012397962622344494, -0.024322211742401123, -7.62729105190374e-05, -0.029473843052983284, -0.036446310579776764, -0.002244586357846856, 0.04257497191429138, -0.004648310597985983, 0.009126381017267704, -0.037097666412591934, -0.01576576754450798, 0.06241171434521675, 0.04482511058449745, 0.0055883354507386684, -0.008008713833987713, -0.015055197291076183, 0.05569090694189072, 0.020947005599737167, -0.05394408851861954, -0.03277503326535225, 0.03170917555689812, -0.03896291181445122, 0.013560039922595024, 0.03218289092183113, 0.0607537180185318, 0.0026442818343639374, -0.03096899949014187, 0.02266421541571617, -0.00501469848677516, 0.022146092727780342, 0.06614220142364502, 0.01104343868792057, 0.021405914798378944, 0.04962145909667015, 0.0007623821729794145, 0.020399274304509163, 0.062234070152044296, -0.017823459580540657, -0.005477308761328459, -0.008489828556776047, 0.00523305032402277, -0.049887921661138535, 0.0004792645340785384, -0.005632746033370495, -0.028245149180293083, 0.0034973355941474438, -0.021169058978557587, -0.00792729388922453, -0.018430404365062714, 0.02333037555217743, -0.015107009559869766, -0.043552007526159286, 0.005854798946529627, 0.004341137129813433, 0.014374234713613987, 0.0025369562208652496, 0.017260923981666565, -0.016106247901916504, 0.009555683471262455, -0.010288458317518234, -0.01626908779144287, 0.023271160200238228, -0.0038785268552601337, 0.03612063080072403, -0.019140973687171936, 0.05237491428852081, 0.020813774317502975, -0.02121346816420555, 0.003602810902521014, 0.01946665160357952, -0.002995865885168314, 0.031797997653484344, 0.020295649766921997, -0.03253817558288574, 0.026069030165672302, 0.01050310954451561, -0.058829259127378464, -0.019140973687171936, 0.036298274993896484, -0.033248744904994965, -0.0066171810030937195, -0.005044305231422186, -0.04757856950163841, 0.04737132042646408, 0.0017616209806874394, 0.031946033239364624, -0.004078374709933996, -0.04707524925470352, 0.022856662049889565, -0.05844436585903168, 0.03395931422710419, -0.015218036249279976, 0.0063285124488174915, -0.0045964983291924, -0.05296705663204193, 0.054388195276260376, -0.021524343639612198, -0.047045640647411346, 0.03576534613966942, -0.04802267625927925, -0.01729053258895874, -0.054240159690380096, 0.04041365534067154, -0.0014562979340553284, 0.006802225485444069, 0.012212918139994144, 0.008326989598572254, -0.06054646894335747, -0.005340375937521458, 0.032005246728658676, 0.024011338129639626, -0.06211564317345619, 0.011939052492380142, 0.0036453711800277233, 0.02282705530524254, -0.0047778417356312275, -0.03191642835736275, 0.013486022129654884, 0.045150790363550186, -0.006087954621762037, -0.03697923570871353, -0.0009205949609167874, 0.02113945223391056, 0.009511272422969341, -0.010850992985069752, -0.01634310558438301, -0.04663114249706268, -0.013523031026124954, -0.011679991148412228, 0.0018088072538375854, -0.004492873791605234, 0.0559573695063591, -0.0471048578619957, 0.0027775138150900602, 0.0028348774649202824, 0.011605973355472088, -0.0027016454841941595, -0.02922218292951584, 0.010925010778009892, 0.005988030694425106, 0.017334941774606705, -0.025772958993911743, 0.06708963215351105, -0.003963646944612265, -0.003556549781933427, -0.04201243817806244, 0.0007087193662300706, 0.029103754088282585, 0.09083450585603714, -0.035854168236255646, -0.024440640583634377, -0.010843590833246708, 0.0071686129085719585, -0.043848078697919846, 0.05122023820877075, -0.0705832690000534, 0.01933342032134533, -0.03387049213051796, -0.004922176245599985, 0.004082075320184231, 0.01518842950463295, -0.02979952096939087, 0.019585080444812775, -0.02282705530524254, 0.01723131723701954, -0.00527005922049284, 0.030998608097434044, 0.04372964799404144, -0.012975300662219524, 0.006672694347798824, 0.00941505003720522, -0.006491350941359997, 0.025906190276145935, 0.03952544555068016, 0.014004146680235863, -0.001432242221198976, 0.054684266448020935, 0.023167535662651062, 0.06856998801231384, -0.037156879901885986, 0.0005505065200850368, 0.05166434496641159, -0.021095041185617447, -0.01122848317027092, 0.014263208024203777, -0.01766061969101429, 0.01446305587887764, -0.044795505702495575, 0.012960497289896011, 0.04627585783600807, 0.008719283156096935, -0.004256017040461302, -0.01933342032134533, 0.02130229026079178, -0.010236646048724651, -0.006613480392843485, 0.0171572994440794, 0.05675676092505455, 0.021983252838253975, 0.020473292097449303, -0.052730198949575424, 0.049088530242443085, 0.04470668360590935, -0.04976949095726013, 0.011176670901477337, -0.018874509260058403, -0.028437595814466476, -0.01133950985968113, -0.05696401372551918, -0.006842934992164373, 0.01708328165113926, 0.004093178082257509, 0.009170791134238243, 0.06418813765048981, -0.046187035739421844, -0.009585290215909481, 0.03641670197248459, -0.0025129003915935755, -0.01634310558438301, 0.02855602279305458, -0.01962949149310589, 0.0319756418466568, 0.06300385296344757, 0.0055698310025036335, -0.003826714353635907, -0.016683585941791534, -0.037097666412591934, 0.03173878416419029, -0.019066955894231796, 0.03366324305534363, -0.044292185455560684, -0.023345177993178368, -0.037097666412591934, 0.041094619780778885, 0.061523500829935074, -0.04361122101545334, -0.029903145506978035, -0.052345309406518936, -0.001075106905773282, 0.004851859528571367, -0.03552848845720291, 0.027934275567531586, -0.015321660786867142, 0.03387049213051796, 0.020236436277627945, 0.03925898298621178, 0.047193676233291626, -0.002557310974225402, -0.02805270254611969, 0.012768050655722618, 0.0033048896584659815, -0.028067506849765778, 0.006210084073245525, 0.03022882342338562, 0.002842279151082039, 0.021746397018432617, -0.0456245020031929, -0.014485261403024197, -0.06170114502310753, 0.006746712140738964, -0.025447281077504158, 0.04180518910288811, 0.005802986677736044, 0.060280002653598785, -0.012190712615847588, -0.010362476110458374, -0.01911136694252491, 0.0023981730919331312, 0.02028084546327591, 0.07757053524255753, -0.00617677578702569, -0.04926617071032524, -0.036239057779312134, -0.04097619280219078, -0.05382566154003143, 0.02834877371788025, -0.05252294987440109, -0.0038896293845027685, 0.028881700709462166, 0.0019152075983583927, 0.016165463253855705, -0.04461786150932312, -0.025595316663384438, -0.013486022129654884, 0.009614897891879082, -0.049384601414203644, -0.038252342492341995, 0.005251554772257805, -0.0043818471021950245, 0.014507466927170753, 0.013256567530333996, 0.07247811555862427, 0.04216047376394272, -0.08100495487451553, -0.002559161512181163, 0.03241974860429764, -0.006247092969715595, -0.046483106911182404, 0.009563085623085499, 0.0352916345000267, -0.04746014252305031, -0.002220530528575182, -0.051841989159584045, 0.023730071261525154, 0.02812672033905983, 0.058829259127378464, 0.07561647146940231, -0.003658324247226119, 0.01816393993794918, -0.0030846870504319668, 0.012227721512317657, -0.03662395104765892, 0.008593453094363213, 0.02210168167948723, -0.0043670437298715115, -0.03617984429001808, 0.00015775019710417837, 0.04257497191429138, -0.04106501117348671, 0.027194097638130188, 0.016594765707850456, 0.00482965400442481, 0.019214991480112076, -0.027194097638130188, 0.012249927036464214, 0.0013138139620423317, 0.018223155289888382, -0.007257434073835611, -0.005740071646869183, 0.018548833206295967, 0.004311530385166407, 0.03182760626077652, 0.005969526246190071, -0.009740727953612804, -0.05107220262289047, 0.037393733859062195, 0.020961808040738106, 0.00626559741795063, -0.010925010778009892, 0.010118218138813972, 0.058533187955617905, 0.0480818897485733, -0.015247643925249577, 0.023211946710944176, 0.026542741805315018, 0.0072204251773655415, -0.0017468173755332828, 0.009799941442906857, 0.020887792110443115, -0.017423763871192932, 0.003373356070369482, 0.03973269462585449, -0.04728249832987785, -0.022471770644187927, -0.0008026292780414224, -0.014337225817143917, -0.010258851572871208, 0.0047630383633077145, -0.014085565693676472, 0.0022889969404786825, -0.012338748201727867, 0.018119528889656067, 0.03395931422710419, -0.009585290215909481, -0.009215202182531357, 0.07076090574264526, 0.0223829485476017, -0.019348222762346268, 0.008164150640368462, -0.025388065725564957, 0.009481665678322315, 0.03132428601384163, -0.0019300112035125494, -0.028881700709462166, 0.022146092727780342, 0.0006157346069812775, 0.017838262021541595, -0.022782644256949425, -0.018696866929531097, 0.004337436519563198, 0.042101260274648666, -0.04526921734213829, -0.051486704498529434, -0.004300427623093128, 0.0009293846087530255, -0.0003573666326701641, -0.04482511058449745, -0.027593793347477913, -0.016328301280736923, -0.017705030739307404, 0.03493634983897209, -0.009067166596651077, 0.0002391696471022442, -7.89329205872491e-05, 0.008482427336275578, 0.023093517869710922, 0.02411496266722679, 0.007423974107950926, -0.010843590833246708, -0.0392293743789196, -0.013019710779190063, 0.015018188394606113, -0.003256778232753277, -0.013012309558689594, 0.006239690817892551, -0.03073214367032051, 0.021613163873553276, -0.0020650934893637896, -0.012242525815963745, 0.009489067830145359, -0.038548409938812256, -0.011931651271879673, -0.0044151549227535725, -0.013567442074418068, -0.01643192581832409, -0.0006629208801314235, -0.016032230108976364, -0.007227827329188585, 0.06685277819633484, -0.04645350202918053, -0.02863004058599472, -0.006372923031449318, -0.01507740281522274, 0.0010621538385748863, -0.01700926385819912, 0.03117625042796135, 0.01096942089498043, 0.008800703100860119, 0.0036490720231086016, 0.012812461704015732, 0.0029459039214998484, 0.007009475026279688, -0.0017616209806874394, 0.018918920308351517, -0.00644694035872817, 0.021820414811372757, 0.009999789297580719, -0.023300766944885254, 0.0023630147334188223, 0.01925940252840519, 0.017053674906492233, 0.0010741816367954016, -0.01391532551497221, 0.03541006147861481, -0.01569174975156784, 0.0091929966583848, -0.004067271947860718, 0.04600939527153969, -0.009163389913737774, 0.04674956947565079, 0.00348808360286057, 0.019096562638878822, -0.005973227322101593, -0.0013221409171819687, 0.036801595240831375, 0.01376728992909193, 0.003371505532413721, 0.019170580431818962, 0.018519224599003792, 0.0014655501581728458, -0.011620776727795601, -0.01771983504295349, -0.018489617854356766, 0.012087088078260422, -0.01569174975156784, -0.008260373957455158, 0.027416151016950607, 0.04026562348008156, 0.011420928873121738, -0.028023095801472664, 0.02565453015267849, 0.03973269462585449, 0.02325635775923729, 0.014685109257698059, 0.0005259881727397442, 0.000936786353122443, 0.02948864735662937, 0.0471048578619957, 0.07052405178546906, -0.02113945223391056, -0.017246121540665627, 0.01585458777844906, 0.01289388071745634, 0.01315294299274683, 0.0036860809195786715, -0.0058103883638978004, -0.04725288972258568, -0.015750963240861893, -0.013552638702094555, 0.018785689026117325, -0.01808992214500904, -0.028363578021526337, -0.015469696372747421, 0.020236436277627945, 0.03313031792640686, -0.01093241199851036, -0.01911136694252491, 0.008060526102781296, -0.004022861365228891, -0.024381425231695175, -0.0024777420330792665, -0.022723430767655373, -0.028511613607406616, 0.0017477426445111632, 0.021050630137324333, -0.017853066325187683, -0.06531320512294769, 0.004992492962628603, -0.03700884431600571, 0.040443263947963715, 0.01250158715993166, -0.06170114502310753, 0.011872436851263046, -0.05800025910139084, 0.014292815700173378, 0.006902149412781, 0.013197354041039944, 0.03831155598163605, -0.046335071325302124, 0.00904496107250452, -0.008090132847428322, 0.018489617854356766, -0.044440221041440964, 0.009666710160672665, -0.008297382853925228, 0.04754896089434624, 0.029340611770749092, -0.04586135968565941, -0.06448420882225037, -0.02740134857594967, -0.03902212530374527, -0.0030846870504319668, -0.0009057914721779525, 0.021924039348959923, 0.003132798708975315, 0.0673857033252716, 0.022175699472427368, 0.01968870498239994, -0.02994755655527115, -0.0028200738597661257, -0.01860804669559002, -0.006968765053898096, -0.025254834443330765, -0.0327158160507679, 0.005277460906654596, -0.02929620072245598, 0.0006333138444460928, -0.010081209242343903, -0.005384786520153284, 0.04026562348008156, 0.024159373715519905, -0.007398067973554134, 0.0034732799977064133, -0.0008780347998254001, 0.020310454070568085, -0.018060315400362015, -0.005162733606994152, 0.016091445460915565, 0.02137630805373192, 0.0053958892822265625, 0.0335744209587574, 0.03446263447403908, -0.02609863691031933, 0.008053123950958252, 0.03612063080072403, 0.01714249700307846, 2.4605098587926477e-05, -0.01261261384934187, -0.00430412869900465, 0.013967137783765793, -0.020695345476269722, 0.0004549774748738855, -0.001744041801430285, 0.03277503326535225, 0.01983674056828022, 0.005629044957458973, 0.011783615685999393, -0.01723131723701954, 0.010384681634604931, -0.0029921650420874357, 0.04118344187736511, 7.72559578763321e-05, -0.004429958760738373, -0.02476631850004196, -0.007838472723960876, -0.01391532551497221, 0.003993254154920578, -0.029991967603564262, -0.018356386572122574, 0.015232839621603489, 0.004270820412784815, 0.012257329188287258, -0.0033011888153851032, -0.0007831996772438288, 0.026394708082079887, 0.021257879212498665, -0.01656515896320343, 0.014026351273059845, 0.007398067973554134, -0.0015293904580175877, 0.009962780401110649, 0.001509960857219994, 0.022146092727780342, -0.03458106517791748, -0.02753457985818386, 0.018489617854356766, 0.037897054105997086, -0.021243076771497726, 0.03771941363811493, -0.024958763271570206, -0.01365626323968172, 0.03395931422710419, 0.0019004041096195579, -0.007949499413371086, -0.006639386527240276, -0.009873959235846996, -0.026054225862026215, 0.035498883575201035, -0.025269638746976852, -0.04381847009062767, -0.03925898298621178, -0.021317094564437866, 0.01496637612581253, 0.01504039391875267, 0.012198114767670631, -0.02195364609360695, 0.027889864519238472, -0.04971027746796608, -0.016032230108976364, -0.027282919734716415, 0.0038341162726283073, -0.041449904441833496, 0.005573531612753868, 0.043640829622745514, 0.016594765707850456, 0.01771983504295349, 0.013086327351629734, 0.0048111495561897755, -0.0504208467900753, 0.0043818471021950245, 0.002736804075539112, 0.005010997410863638, 0.013278773054480553, 0.019969971850514412, 0.0017209112411364913, 0.02492915652692318, 0.009074568748474121, -0.05782261863350868, 0.027445757761597633, 0.014973778277635574, -0.025980208069086075, -0.037245698273181915, -0.012161105871200562, 0.02448505163192749, -0.042249295860528946, 0.024144569411873817, -0.018652457743883133, 0.025832172483205795, -0.016816819086670876, 0.014411243610084057, 0.008660069666802883, -0.0032826843671500683, -0.027445757761597633, -0.006117561832070351, 0.034906741231679916, 0.04337436333298683, 0.015484499745070934, 0.0010945365065708756, -0.0034344205632805824, -0.011324706487357616, 0.02156875468790531, -0.023670855909585953, -0.02065093442797661, -0.048585209995508194, -0.055039551109075546, 0.027223704382777214, 0.007801464293152094, -0.0015136617003008723, 0.03771941363811493, -0.03908133879303932, 0.0027997191064059734, 0.050687313079833984, 0.015810178592801094, 0.024292604997754097, -0.023804089054465294, -0.005203443579375744, 0.04272300750017166, -0.04426257684826851, -0.04577253758907318, -0.014403841458261013, 0.026261474937200546, 0.0005107220495119691, 0.0010741816367954016, -0.007764455396682024, 0.0009770335163921118, 0.01649114117026329, -0.00849723070859909, -0.009644504636526108, -0.01692044362425804, -0.03167957067489624, 0.0003996955056209117, -0.008408409543335438, -0.033396780490875244, -0.029118558391928673, 0.01948145590722561, -0.006698600482195616, -0.009000550955533981, -0.01056972611695528, 0.045950181782245636, 0.0024037244729697704, -0.03058410808444023, 0.003654623404145241, -0.0007281489670276642, -0.03102821484208107, 0.032745424658060074, -0.00659497594460845, -0.01823795773088932, 0.05625344067811966, -0.018371189013123512, -0.020769363269209862, -0.01046610064804554, -0.022042466327548027, 0.004973988514393568, 0.017823459580540657, -0.0029051941819489002, 0.04876285046339035, -0.038696445524692535, 0.02281225100159645, -0.015588125213980675, 0.0004299964930396527, 0.024618282914161682, 0.0056031388230621815, 0.0031883118208497763, -0.022279324010014534, -0.0062878024764359, -0.024692300707101822, 0.05326312780380249, -0.004685319494456053, 0.02652793936431408, 0.00655796704813838, -0.012671828269958496, -0.009814745746552944, 0.020828576758503914, 0.010340270586311817, 0.020221631973981857, -0.007261135149747133, 0.025624923408031464, -0.048585209995508194, -0.004918475169688463, -0.0172165147960186, -0.001686678035184741, 0.04227890446782112, -0.03943662345409393, 0.014470458030700684, 0.0343145988881588, 0.01533646509051323, -0.008304784074425697, -0.012072284705936909, 0.006165673490613699, -0.003710136516019702, 0.00492587685585022, 0.0159878209233284, 0.03096899949014187, 0.037245698273181915, 0.010850992985069752, -0.03890369459986687, 0.057941045612096786, -0.008978345431387424, -0.017112888395786285, 0.04680878669023514, 0.0001761389576131478, -0.02338958904147148, -0.005255255848169327, -0.024588676169514656, -0.03372245654463768, -0.0009173566941171885, -0.047993067651987076, 0.014566680416464806, 0.0036638753954321146, -0.018134333193302155, -0.056579120457172394, 0.010436493903398514, -0.013056719675660133, -0.01307892519980669, -0.010236646048724651, 0.03508438542485237, 0.0009964631171897054, 0.05012477934360504, 0.012198114767670631, -0.0018393395002931356, 0.013685869984328747, 0.0034991861321032047, 0.021331897005438805, 0.007324050180613995, -0.06679356098175049, -0.0248403362929821, 0.007224126253277063, 0.009622299112379551, -0.03413695842027664, 0.002035486279055476, -0.007146407850086689, 0.019895954057574272, -0.012220320291817188, 0.04192361608147621, 0.0068244305439293385, -0.017482977360486984, 0.025091996416449547, -0.00045012004557065666, 0.032094068825244904, 0.05059849098324776, -0.052789416164159775, 0.028156328946352005, -0.014581484720110893, 0.013959735631942749, -0.00753870140761137, 0.03327835351228714, 0.025624923408031464, 0.013663665391504765, -0.0159286055713892, 0.011687392368912697, 0.010880599729716778, 0.002919997787103057, -0.007623821962624788, -0.026631563901901245, -0.013900521211326122, 0.027090473100543022, -0.016772408038377762, -0.008993148803710938, -0.024011338129639626, -0.023345177993178368, -0.03831155598163605, -0.013463817536830902, -0.004022861365228891, -0.06975426524877548, -0.052078843116760254, 0.05551326647400856, 0.004851859528571367, 0.024366622790694237, -0.0057437727227807045, 0.011517152190208435, -0.00528486305847764, 0.027786239981651306, -0.0336928516626358, -0.047489747405052185, 0.016298694536089897, -0.04926617071032524, 0.014307619072496891, -0.011724401265382767, -0.025254834443330765, -0.02050289884209633, -0.013019710779190063, -0.010747368447482586, -0.005421795416623354, 0.016106247901916504, -0.024647889658808708, 0.03407774493098259, 0.016609568148851395, 0.0038304151967167854, 0.005599438212811947, 0.004011758603155613, -0.007364759687334299, -0.02137630805373192, -0.009533477947115898, -0.009000550955533981, -0.03493634983897209, -0.01392272673547268, 0.003299338510259986, -0.006643087603151798, -0.001346196630038321, 0.041094619780778885, -0.010999028570950031, 0.007298144046217203, 0.0041412897408008575, -0.00666899373754859, -0.0031957137398421764, -0.014744323678314686, 0.017468174919486046, -0.00904496107250452, -0.031294677406549454, -0.037245698273181915, 0.059687864035367966, 0.01195385679602623, -0.003845218801870942, -0.004996194038540125, -0.03392970934510231, -0.04746014252305031, -0.027919471263885498, 0.003223470179364085, 0.012220320291817188, 0.001772723626345396, -0.03422577679157257, -0.0312354639172554, -0.0103920828551054, -0.019925560802221298, 0.01628389023244381, -0.0036657259333878756, -0.027519775554537773, 0.005059109069406986, 0.05610540509223938, 0.007897687144577503, -0.012346150353550911, 0.046838391572237015, -0.02179080620408058, -0.011739205569028854, -0.010133021511137486, 0.032005246728658676, 0.008682274259626865, 0.02825995348393917, 0.03212367743253708, -0.008660069666802883, 0.00789028499275446, -0.0004059407510794699, 0.035350847989320755, -0.014085565693676472, -0.01663917675614357, 0.02993275225162506, -0.00038003455847501755, -0.0019503660732880235, -0.010044200345873833, -0.021761199459433556, 0.002416677540168166, -0.005710464436560869, 0.02783065102994442, 0.012064882554113865, -0.027297722175717354, -0.01773463748395443, -0.018060315400362015, 0.014329824596643448, -0.04506196826696396, 0.019599882885813713, -0.005710464436560869, -0.0061693741008639336, 0.021761199459433556, 0.002220530528575182, 0.015232839621603489, -0.006754113826900721, -0.02521042339503765, 0.0156177319586277, -0.00047116883797571063, 0.0018967032665386796, 0.010658547282218933, 0.007050184532999992, 0.0098073435947299, 0.0180159043520689, 0.019673900678753853, -0.004241213668137789, -0.027934275567531586, 0.0012323944829404354, 0.010813984088599682, -0.02892611175775528, 0.0007952275336720049, -0.0005033202469348907, 0.016224676743149757, 0.0049813902005553246, 0.008948738686740398, 0.005421795416623354, -0.0006532060797326267, -0.013856111094355583, 0.019644293934106827, 0.012323944829404354, -0.002561012050136924, -0.02442583627998829, 0.026394708082079887, 0.011739205569028854, 0.01883010007441044, 0.01180582121014595, 0.008326989598572254, -0.005566129926592112, -0.018060315400362015, -0.021539146080613136, 0.005817790050059557, -0.0045705921947956085, -0.006087954621762037, 0.0098073435947299, -0.029459038749337196, -0.027519775554537773, 0.02768261544406414, 0.05335194990038872, 0.0049998946487903595, 0.07117541134357452, -0.011065644212067127, -0.009718522429466248, 0.016802014783024788, 0.02164277248084545, -0.015025590546429157, 0.051338668912649155, 0.0045853955671191216, -0.005617942661046982, -0.012072284705936909, -0.03188681975007057, 0.030051181092858315, 0.014692510478198528, 0.01045869942754507, 0.030288036912679672, -0.00421530706807971, 0.007860678248107433, -0.0021835218649357557, -0.010754769667983055, 0.032153282314538956, -0.003462177235633135, 0.01773463748395443, 0.04343358054757118, -0.01612105220556259, -0.019066955894231796, 0.022797446697950363, 0.00742767471820116, -0.035054776817560196, -0.011613375507295132, -0.01391532551497221, -0.022131288424134254, -0.014211395755410194, -0.003989553544670343, 0.010480904020369053, -0.023493213579058647, 0.001336019253358245, 0.02108023688197136, 0.00020493647025432438, -0.0015552965924143791, -0.003919236361980438, 0.003397411899641156, 0.008793300949037075, -0.012553399428725243, -0.04914774373173714, 0.014714716002345085, 0.026898028329014778, 0.001263851998373866, -0.008341792970895767, 0.002227932447567582, 0.0035935586784034967, 0.03268621116876602, 0.007416572421789169, 0.02331557124853134, 0.011828026734292507, 0.040295228362083435, 0.021198665723204613, 0.0006259120418690145, -0.010821386240422726, -0.014285413548350334, -0.01381170004606247, 0.007020577788352966, 0.03863723203539848, 0.0046039000153541565, -0.0075016925111413, 0.007027979474514723, 0.034906741231679916, -0.00900795217603445, -0.013352790847420692, -0.045150790363550186, -0.007631223648786545, -0.0103920828551054, -0.00017382591613568366, -0.05071691796183586, -0.0303768590092659, 0.010821386240422726, 0.03387049213051796, -0.01296789851039648, 0.0067393104545772076, -0.04503235965967178, 0.026335492730140686, 0.0260098148137331, 0.03241974860429764, 0.01293088961392641, 0.03176839277148247, -0.018726475536823273, 0.012745846062898636, -0.006047245115041733, -0.010562323965132236, 0.0005703988135792315, -0.02747536450624466, -0.007542402483522892, 0.018178744241595268, -0.007061287295073271, -0.00915598776191473, -0.0015145869692787528, -0.005806687753647566, 0.01823795773088932, 0.02441103383898735, -0.018267564475536346, -0.0003157316823489964, 0.006062048487365246, -0.036298274993896484, 0.013959735631942749, -0.008637864142656326, 0.009563085623085499, -0.0098073435947299, -0.007446179166436195, 0.01881529577076435, -0.012397962622344494, 0.010488306172192097, -0.025402870029211044, 0.011502348817884922, 0.005529121030122042, 0.029251789674162865, 0.016609568148851395, 0.048644423484802246, 0.03736412897706032, -0.006606078706681728, -0.02427780069410801, 0.002783064963296056, 0.04630546644330025, -0.02667597495019436, 0.01133950985968113, -0.022264519706368446, 0.030273234471678734, 0.01714249700307846, 0.0065690698102116585, -0.058533187955617905, 0.0009520524763502181, -0.03866684064269066, -0.008741488680243492, 0.015647338703274727, -0.002448135055601597, -0.052286095917224884, 0.008193758316338062, 0.03236053138971329, 0.014174386858940125, 0.034403420984745026, -0.021983252838253975, -0.014670305885374546, 0.010073807090520859, -0.0034214674960821867, -0.014899760484695435, 0.02863004058599472, -0.010170030407607555, -0.015528910793364048, 0.03330795839428902, 0.00019383382459636778, 0.0009659308125264943, -0.011642982251942158, 0.02259019762277603, -0.003582456149160862, -0.024470247328281403, 0.03218289092183113, -0.01976272277534008, -0.00780886597931385, -0.027712222188711166, 0.003543596714735031, 0.01042909175157547, -0.01657996140420437, -0.01526244729757309, 0.021095041185617447, -0.0028903905767947435, 0.005643848795443773, -0.014625894837081432, -0.0021224571391940117, 0.002013280987739563, -0.00455948943272233, -0.00697616720572114, -0.006006535142660141, -0.013996744528412819, 0.02084338106215, -0.00934103224426508, -0.01583978533744812, 0.013426808640360832, -0.008082731626927853, 0.015306857414543629, -0.0171572994440794, -0.0119908656924963, -0.030939392745494843, -0.022501377388834953, -0.00527005922049284, -0.02457387186586857, 0.0008678573649376631, 0.00893393438309431, 0.01773463748395443, 0.014255806803703308, 0.030184412375092506, 0.0017634714022278786, 0.004045066423714161, 0.04201243817806244, -0.0030994906555861235, 0.019377831369638443, -0.0002037799422396347, 0.010628939606249332, -0.04213086888194084, 0.015454893000423908, 0.037156879901885986, -0.01450006477534771, 0.01925940252840519, -0.00162098731379956, 0.023078715428709984, 0.001979973167181015, -9.691691229818389e-05, 0.005880705080926418, -0.0020984013099223375, 0.0032845349051058292, 0.03958465903997421, -0.0005195116391405463, 0.0035158400423824787, -0.008334391750395298, 0.002559161512181163, 0.007349956315010786, -0.008800703100860119, 0.010414288379251957, -0.021924039348959923, 0.0037434445694088936, -0.0303768590092659, 0.03102821484208107, 0.008489828556776047, 0.004681618884205818, 0.020325256511569023, 0.004629806149750948, 0.0015090355882421136, -0.019969971850514412, 0.014847948215901852, 0.005747473333030939, 0.007364759687334299, -0.027445757761597633, -0.03967348113656044, 0.00753870140761137, 0.0034991861321032047, -0.003410364966839552, 0.013123336248099804, -0.02005879394710064, 0.0076164198108017445, -0.02433701604604721, -0.015484499745070934, -0.035202812403440475, 0.0020040287636220455, -0.008141945116221905, 0.006820729933679104, -0.026764795184135437, -0.004411454312503338, 0.028156328946352005, -0.006413632538169622, -0.019022544845938683, 0.0031346490141004324, -0.001017743139527738, 0.006891046650707722, -0.007412871345877647, 0.009133782237768173, -0.008001311682164669, 0.004714926704764366, -0.00014849798753857613, -0.009755531325936317, 0.0012157404562458396, -0.036505524069070816, -0.007523898035287857, 0.007235229015350342, 0.0006675469921901822, 0.0005518943653441966, -0.01773463748395443, -0.010244048200547695, -0.0207841657102108, -0.01808992214500904, 0.01457408256828785, 0.0057918839156627655, -0.008586051873862743, -0.041745975613594055, 0.0351732037961483, -0.026838812977075577, -0.024603478610515594, -0.01591380313038826, -0.013604450970888138, 0.01976272277534008, -0.005991731770336628, -0.0006171224522404373, -0.04020640626549721, -0.009355835616588593, -0.01896333135664463, 0.006691198796033859, 0.0495622418820858, -0.0076164198108017445, -0.010991626419126987, 0.01991075836122036, 0.008956139907240868, 0.014485261403024197, 0.025832172483205795, -0.009792540222406387, -0.0327158160507679, 0.013989342376589775, -0.03606141731142998, 0.008963542059063911, 0.023582035675644875, -0.008171552792191505, 0.014633296988904476, -0.02368566021323204, 0.052878234535455704, 0.026986848562955856, 0.0183859933167696, -0.017542192712426186, -0.03890369459986687, -0.004566891118884087, 0.036002203822135925, 0.0012000116985291243, 0.004722328390926123, -0.005680857691913843, 0.02420378290116787, 0.008985747583210468, 0.007631223648786545, 0.010910207405686378, 0.01788267306983471, 0.003127247327938676, 0.02762340009212494, -0.008785899728536606, 0.001167629030533135, -0.027608597651124, 0.002226081909611821, -0.007079791743308306, 0.026942437514662743, -0.031205857172608376, 0.008452819660305977, 0.04731210693717003, 0.01671319454908371, 0.032153282314538956, 0.00753870140761137, -0.016239481046795845, -0.030613714829087257, -0.016520747914910316, 0.01261261384934187, 0.026409510523080826, 0.02993275225162506, 0.05317430570721626, -0.01464810036122799, 0.009725923649966717, -0.019747918471693993, 0.027593793347477913, -0.004859261214733124, -0.011902044527232647, -0.00178937753662467, 0.004233811516314745, -0.028955718502402306, -0.039347801357507706, 0.003676828695461154, -0.016328301280736923, -0.04278222471475601, 0.019348222762346268, 0.016091445460915565, -0.012486783787608147, 0.021420719102025032, 0.001506259897723794, 0.00988876260817051, -0.013471218757331371, -0.0030236225575208664, -0.01450006477534771, -0.010858395136892796, -0.008682274259626865, -0.0059473211877048016, -0.0014044856652617455, 0.005336675327271223, 0.033455993980169296, 0.010177431628108025, -0.002263090806081891, -0.02550649456679821, 0.0300067700445652, -0.014773930422961712, 0.023093517869710922, -0.00803091935813427, -0.0013785794144496322, -0.038341160863637924, 0.016047034412622452, -0.0016802015015855432, 0.017172103747725487, -0.022146092727780342, 0.03407774493098259, 0.03015480563044548, 0.0009881361620500684, -0.02375967800617218, -0.043048687279224396, -0.031057821586728096, -0.0027275518514215946, 0.0022704924922436476, -0.023804089054465294, 0.0006041693850420415, 0.04787464067339897, -0.015395678579807281], "index": 85}, {"title": "Savai'i", "text": "Savai\u02bbi is the largest (area 1700 km2) and highest (Mt Silisili at 1,858 m) island in Samoa and the Samoa Islands chain. The island is the fourth largest in Polynesia, behind the two main islands of New Zealand and the Island of Hawaii.The island of Savai'i is also referred to by Samoans as Salafai, a classical Samoan term used in oratory and prose.", "vector": [0.001201200415380299, -0.008997833356261253, -0.009939546696841717, 0.0025519065093249083, 0.028760071843862534, 0.023962143808603287, -0.005416572093963623, -0.03832843154668808, -0.0399506539106369, 0.005938982591032982, -0.004626082256436348, 0.007719302084296942, -0.06769339740276337, -0.0266704298555851, 0.012778435833752155, 0.04440489038825035, 0.011025610379874706, 0.048639167100191116, 0.027316570281982422, -0.0009906896157190204, -0.0015895713586360216, 0.009286534041166306, -0.023920901119709015, 0.039263270795345306, -0.013658285140991211, 0.019824102520942688, 0.006313605699688196, -0.003629378043115139, -0.05141618847846985, -0.007643690332770348, -0.0017090040491893888, -0.012682202272117138, -0.0012433025985956192, 0.05735517293214798, 0.008138605393469334, 0.042315248399972916, 0.005918360780924559, 0.002699693664908409, -0.059334833174943924, 0.00732749467715621, 0.03159208595752716, -0.009513369761407375, 0.046384550631046295, 0.02133634313941002, 0.018476834520697594, -0.056530315428972244, -0.007135027553886175, 0.055760446935892105, 0.015287380665540695, 0.005375328939408064, -0.02601054310798645, 0.012991524301469326, -0.0412704274058342, 0.03321430832147598, -0.022312426939606667, -0.0017253293190151453, -0.007925516925752163, 0.07929641008377075, 0.0218999981880188, -0.028237661346793175, -0.00949274841696024, 0.021556306630373, 0.053615812212228775, 0.033956680446863174, -0.013087757863104343, -0.03145461156964302, 0.04918907210230827, -0.008990959264338017, 0.0007690088823437691, 0.014984932728111744, 0.029254987835884094, -0.0013876528246328235, 0.011073727160692215, 0.0698380321264267, -0.021542558446526527, 0.013960733078420162, 0.01670338772237301, -0.04061054065823555, -0.03524896129965782, -0.011596137657761574, -0.02625800110399723, -0.023563463240861893, -0.01937043108046055, -0.008234838955104351, 0.022999808192253113, 0.02818267047405243, -0.027646513655781746, -0.03197702020406723, 0.020827680826187134, -0.01560357678681612, 0.016909603029489517, -0.008234838955104351, 0.007829283364117146, -0.004667325410991907, 0.02548813261091709, -0.004069302696734667, 0.005880554672330618, 0.007306872867047787, 0.030932199209928513, 0.018064403906464577, 0.02327476255595684, 0.01807815209031105, 0.06279923766851425, 0.0041999053210020065, -0.021735025569796562, 0.021954987198114395, -0.00944463163614273, -0.019356682896614075, 0.024553293362259865, -0.022546136751770973, 0.08309075981378555, -0.0038184081204235554, -0.013005271553993225, -0.00012061409506713971, 0.006176129449158907, -0.00681883143261075, 0.007183144334703684, -0.010785027407109737, -0.037503574043512344, 0.013397079892456532, -0.0070662894286215305, 0.09562861174345016, -0.011706119403243065, -0.07858153432607651, 0.012022314593195915, 0.03337927907705307, 0.025680599734187126, 0.04520225524902344, 0.058070048689842224, -0.011843595653772354, -0.02235366962850094, -0.009698962792754173, 0.03346176818013191, -0.001538876909762621, -0.021322596818208694, -0.008812240324914455, 0.007018172647804022, 0.05719020217657089, -0.01177485752850771, 0.030272312462329865, -0.008008003234863281, -0.005313464440405369, -0.003945574164390564, 0.03450658917427063, -0.004588276147842407, 0.01053069531917572, 0.010970620438456535, 0.009877682663500309, -0.020167794078588486, -0.03769604116678238, 0.03326930105686188, 0.01439378410577774, -0.021432576701045036, 0.009698962792754173, 0.0038630880881100893, 0.0786365270614624, -0.0001888153055915609, -0.017954424023628235, -0.004454236943274736, 0.02415461093187332, -0.06263426691293716, -0.04289264976978302, 0.007382485084235668, 0.011135592125356197, -0.023948395624756813, -0.009183426387608051, -0.0036465625744313, -0.051196228712797165, -0.011279942467808723, 0.004412993788719177, 0.0033183377236127853, -0.02832014672458172, 0.02056647650897503, 0.002689382992684841, 0.038905832916498184, -0.02741280198097229, -0.011554894968867302, 0.032059505581855774, -0.011974197812378407, 0.13659659028053284, -0.03480903431773186, -0.05306590721011162, 0.03984067216515541, -0.008585403673350811, -0.05147118121385574, -0.012256025336682796, 0.019535401836037636, 0.05325837433338165, 0.02811393328011036, -0.039648205041885376, -0.010578812099993229, -0.012929659336805344, 0.03511148318648338, -0.003149928990751505, 0.038245946168899536, -0.02906252071261406, -0.03860338404774666, 0.05177363008260727, 0.021611297503113747, 0.004450799897313118, 0.021858753636479378, 0.04209528863430023, -0.01737702265381813, 0.010620055720210075, 0.03920828178524971, 0.02892504446208477, 0.003271939465776086, -0.004663888365030289, 0.0015053671086207032, 0.018586814403533936, -0.0006345396977849305, -0.01765197515487671, 0.02612052485346794, -0.014421278610825539, 0.049161575734615326, 0.027261579409241676, -0.0183943472802639, -0.04566967487335205, 0.026422971859574318, 0.025226928293704987, 0.01479246560484171, -0.0011324621737003326, 0.04418493062257767, 0.00884660892188549, -0.03907080367207527, 0.0026859459467232227, -0.03720112517476082, 0.024457059800624847, 0.01866930164396763, 0.021886250004172325, 0.007045667618513107, -0.024663273245096207, -0.005151929799467325, 0.04176534339785576, -0.03109717182815075, -0.028595101088285446, 0.003024481702595949, -0.004254895728081465, -0.017954424023628235, 0.009032201953232288, -0.021886250004172325, 0.0348915196955204, 0.008599151857197285, 0.003234133357182145, -0.0023422548547387123, 0.028375137597322464, 0.019741617143154144, -0.03975818678736687, 0.055128052830696106, 0.034341614693403244, 0.031784553080797195, 0.010736910626292229, -0.00025905718212015927, 0.049409035593271255, -0.01948041282594204, 0.0013945266837254167, 0.02517193742096424, 0.007238134741783142, -0.03923577815294266, 0.022614875808358192, -0.02684914879500866, -0.05149867758154869, -0.021735025569796562, -0.016978340223431587, 0.004261769820004702, 0.032416947185993195, -0.00798738095909357, 0.03131713345646858, -0.018243124708533287, -0.026093028485774994, 0.01688210666179657, 0.03791600465774536, -0.047126926481723785, 0.022133708000183105, 0.039125796407461166, 0.048776641488075256, 0.021212615072727203, 0.030272312462329865, 0.032939355820417404, 0.02151506394147873, 0.00814547948539257, -0.03137212619185448, -0.0036981164012104273, 0.035853855311870575, 0.012049810029566288, 0.025144441053271294, -0.009726458229124546, 0.05999471992254257, 0.06131449341773987, -0.01877928152680397, -0.038245946168899536, -0.0304372850805521, 0.011699245311319828, 0.021281354129314423, -0.013204612769186497, 0.007299999240785837, -0.052323535084724426, 0.053753290325403214, 0.04883163422346115, -0.003529707668349147, 0.011816100217401981, 0.047154419124126434, -0.024127116426825523, 0.023920901119709015, 0.04047306627035141, 0.005626223515719175, -0.00767805939540267, -0.04286515340209007, 0.010434461757540703, 0.006715724244713783, 0.028842557221651077, -0.009465252980589867, 0.038493406027555466, 0.009575234726071358, 0.031179657205939293, -0.004670761991292238, -7.856563752284274e-05, -0.01479246560484171, -0.0583450011909008, -0.005323775112628937, -0.016194725409150124, -0.0070662894286215305, 0.028265157714486122, -0.008069867268204689, 0.029337473213672638, -0.01860056258738041, -0.01762448064982891, -0.05724519118666649, -0.019425421953201294, 0.0042823911644518375, 0.010922503657639027, -0.0025862755719572306, 0.0013214923674240708, 0.0023267888464033604, 0.10195253044366837, 0.002819985616952181, -0.03604632243514061, 0.0018971749814227223, -0.031152162700891495, 0.020442746579647064, 0.011279942467808723, 0.006220809184014797, 0.09199923276901245, 0.040170617401599884, 0.04355253651738167, 0.04124293476343155, -0.009726458229124546, -0.029529940336942673, 0.005169114097952843, 0.02713784947991371, 0.0005194031982682645, -0.010241994634270668, 0.016620902344584465, 0.06411901116371155, 0.01748700439929962, -0.016648396849632263, -0.030162332579493523, -0.05191110447049141, -0.013390205800533295, -0.023535966873168945, 0.016648396849632263, 0.007238134741783142, 0.006492325104773045, -0.0437999963760376, -0.008825987577438354, -0.033544253557920456, 0.036623723804950714, -0.011108096688985825, 0.010262616910040379, 0.007733049802482128, 0.044872310012578964, -0.034726548939943314, 0.012909037992358208, -0.02881506271660328, -0.026491710916161537, -0.00993267260491848, -0.015644818544387817, 0.0304372850805521, 0.00919717364013195, -0.018861768767237663, 0.0016978341154754162, 0.03629378229379654, -0.032664403319358826, -0.01642843522131443, 0.015369866043329239, -0.02429208718240261, 0.024718264117836952, -0.01796817034482956, 0.04844669997692108, 0.04773182049393654, -0.024058377370238304, 0.019040487706661224, 0.03956571966409683, -0.08584029227495193, -0.010736910626292229, -0.03505649417638779, -0.010283238254487514, -0.033626738935709, 0.006402965169399977, -0.020593971014022827, 0.050041425973176956, 0.013300846330821514, 0.0028835684061050415, 0.053120896220207214, -0.01470997929573059, 0.029887378215789795, 0.023439733311533928, 0.03183954581618309, 0.00979519635438919, -0.031784553080797195, 0.010956872254610062, 0.05697023868560791, -0.00958210788667202, -0.011183708906173706, 0.050316378474235535, -0.03005235083401203, -0.0285401102155447, 0.0009554612915962934, -0.012833425775170326, 0.019397925585508347, -0.04102297127246857, -0.016304707154631615, 0.04910658672451973, -0.030382294207811356, -0.05757513642311096, 0.07335743308067322, -0.01521864254027605, 0.03296685218811035, -0.02282108925282955, -0.003973069135099649, -0.03461656719446182, 0.0007831861148588359, 0.031894534826278687, -0.04718191549181938, -0.04858417436480522, -0.0013378176372498274, -0.051581162959337234, -0.004083050414919853, 0.029254987835884094, 0.023632200434803963, -0.02583182416856289, -0.009788323193788528, -0.01345894392579794, -0.022119959816336632, -0.06081957742571831, -0.013266476802527905, -0.042947642505168915, 0.00016421990585513413, 0.005554048344492912, 0.019466664642095566, 0.00263267382979393, 0.052213553339242935, 0.03835592791438103, -0.03057476133108139, 0.010152635164558887, -0.04390997439622879, -0.01198794599622488, 0.019782859832048416, -0.027701502665877342, 0.029639922082424164, 0.02099265344440937, -0.016414687037467957, 0.04355253651738167, -0.04995894059538841, 0.020758943632245064, 0.021212615072727203, 0.0031585213728249073, 0.02755028009414673, 0.005316901486366987, 0.016029752790927887, -0.04630206525325775, -0.0032152303028851748, -0.047154419124126434, 0.012324763461947441, -0.023384742438793182, -0.03923577815294266, 0.015576081350445747, -0.015301127918064594, 0.03497400879859924, -0.031784553080797195, 0.07445724308490753, 0.032444439828395844, -0.041545379906892776, 0.0006371173658408225, -0.004000564571470022, 0.0037977867759764194, -0.026876645162701607, 0.05180112272500992, 0.014558755792677402, -0.011877965182065964, 0.009155930951237679, 0.004382061772048473, 0.0685182586312294, -0.016125986352562904, 0.005131308455020189, 0.018724292516708374, 0.010551316663622856, 0.0018387474119663239, -0.04470733925700188, 0.059334833174943924, -0.018133142963051796, 0.05430319532752037, -0.020167794078588486, 0.04044556990265846, -0.01882052607834339, 0.028237661346793175, 0.016304707154631615, 0.047126926481723785, -0.021528810262680054, 0.006970055866986513, 0.031262144446372986, 0.040665533393621445, -0.059444814920425415, -0.03519396856427193, -0.014723727479577065, 0.030409788712859154, -0.0073343683034181595, -0.020965157076716423, -0.008262334391474724, 0.04451487213373184, -0.011417418718338013, 0.022298678755760193, -0.03923577815294266, 0.008447927422821522, 0.001993408426642418, -8.581537258578464e-05, -0.009499622508883476, 0.014215064235031605, 0.016689639538526535, 0.0009803789434954524, -0.041187942028045654, -0.05254349857568741, -0.022243687883019447, 0.024800751358270645, -0.01789943315088749, -0.027426550164818764, -0.03967570140957832, -0.02305479906499386, -0.020868923515081406, 0.05977475643157959, -0.019219206646084785, -0.018765535205602646, -0.012118548154830933, -0.046357057988643646, 0.029007529839873314, -0.02713784947991371, -0.02266986481845379, -0.0009717866196297109, -0.015411109663546085, -0.04173784703016281, 0.055018071085214615, -0.03766854479908943, -0.0034248819574713707, 0.018064403906464577, 0.025955552235245705, -0.01405696664005518, -0.005179425235837698, 0.014833708293735981, -0.016442183405160904, -0.007540583144873381, -0.0013266477035358548, 0.0405830480158329, 0.003282250137999654, -0.00028676725924015045, -0.02741280198097229, 0.03134462982416153, -0.031124666333198547, 0.052213553339242935, -0.00949274841696024, -0.051581162959337234, -0.010812521912157536, 0.013452069833874702, 0.0031739873811602592, -0.009815817698836327, 0.04481732100248337, -0.011795478872954845, -0.015466099604964256, -0.002209933940321207, -0.0387408621609211, -0.023357247933745384, 0.0225323885679245, 0.002136040246114135, -0.022037474438548088, 0.03373672068119049, 0.03478154167532921, 0.04008813202381134, -0.008599151857197285, 0.012008567340672016, -0.007904895581305027, -0.019494159147143364, 0.053478337824344635, -0.008076741360127926, 0.006427023559808731, -0.021226363256573677, 0.013603294268250465, 0.04025310277938843, -0.031069675460457802, -0.007643690332770348, -0.052598487585783005, -0.016167229041457176, -0.001263924059458077, -0.009554612450301647, -0.011094349436461926, -0.003691242542117834, 0.010132013820111752, 0.032801877707242966, 0.06208436191082001, 0.0020793313160538673, -0.04165536165237427, 0.032444439828395844, -0.045229751616716385, 0.0034970571286976337, -0.006069585215300322, -0.003149928990751505, -0.011238698847591877, 0.026601692661643028, 0.03120715357363224, -0.009293407201766968, 0.010420714505016804, -0.004261769820004702, 0.00012619908375199884, -0.026367980986833572, 0.0196866262704134, -0.000724329031072557, -0.027742747217416763, 0.026807906106114388, 0.013232107274234295, -0.02678041160106659, -0.006932249758392572, 0.04492730274796486, 0.0017416547052562237, 0.009245290420949459, 0.0071487752720713615, -8.645979687571526e-05, 0.01354830339550972, -0.02804519422352314, 0.03351675719022751, -0.00030932200024835765, -0.04729189723730087, 0.008702258579432964, -0.007794914301484823, 0.05719020217657089, 0.017322031781077385, -0.03629378229379654, 0.01019387785345316, -0.02671167254447937, -0.02481449767947197, -0.009960168041288853, -0.014517512172460556, -0.012015441432595253, 0.020937662571668625, 0.006268925964832306, 0.005145055707544088, -0.0014271773397922516, -0.008468548767268658, 0.025158189237117767, 0.03640376403927803, -0.02316478081047535, 0.008798492141067982, 0.004907908849418163, -0.02713784947991371, -0.01593351922929287, -0.04275517538189888, 0.006251741200685501, -0.027055364102125168, -0.011032484471797943, -0.01510866079479456, -0.011781731620430946, -0.023068547248840332, -0.033681727945804596, 0.008729754015803337, -0.03291185945272446, -0.0225323885679245, -0.009204047732055187, 0.030794722959399223, -0.03247193619608879, -0.012943407520651817, 0.027041615918278694, 0.0042205266654491425, 0.014215064235031605, 0.029777398332953453, -0.0380534790456295, -0.0025415958371013403, 0.026409225538372993, 0.013706400990486145, -0.010626928880810738, 0.0012630647979676723, -0.01818813383579254, 0.027811484411358833, 0.01389886811375618, 0.011706119403243065, 0.05680526793003082, 0.05009641498327255, 0.010083897039294243, 0.04237024113535881, 0.014201316982507706, -0.026134271174669266, -0.00426520686596632, 6.981225305935368e-05, 0.01825687102973461, -0.030547264963388443, 0.0013678906252607703, 0.028031446039676666, -0.019810356199741364, 0.04539472237229347, 0.015397361479699612, -0.0014151481445878744, 0.010798774659633636, 0.022161202505230904, 0.012840299867093563, 0.014187568798661232, 0.003973069135099649, -0.017541993409395218, 0.0501239113509655, -0.01898549683392048, -0.02119886688888073, 0.034699052572250366, -0.009224669076502323, -0.025859318673610687, 0.004454236943274736, 0.04426741600036621, -0.004980084020644426, -0.01242787018418312, 0.0393182635307312, 0.00629298435524106, -0.040033139288425446, -0.011699245311319828, -0.009389640763401985, -0.03464406356215477, 0.003849340369924903, -0.0006096221040934324, 0.0206352137029171, -0.024347078055143356, 0.011664876714348793, 0.002043243730440736, 0.005880554672330618, -0.04998643323779106, -0.028512613847851753, 0.024127116426825523, -0.017294537276029587, -0.008365442045032978, -0.03464406356215477, -0.01066817156970501, 0.012503482401371002, 0.026354234665632248, 0.004980084020644426, 0.027605269104242325, 0.0069253756664693356, -0.013830129988491535, -0.011218077503144741, -0.02275235205888748, 0.056915245950222015, -0.0029505882412195206, -0.018064403906464577, 0.03907080367207527, 0.01484745554625988, 0.002087923465296626, -0.008344819769263268, 0.02786647528409958, -0.0036156305577605963, 0.019920336082577705, 0.03513897955417633, -0.003184298053383827, 0.007190017960965633, 0.008551035076379776, -0.0033389590680599213, -0.04050055891275406, -0.017803199589252472, -0.011417418718338013, -0.027055364102125168, -0.011025610379874706, -0.01821562834084034, 0.056145381182432175, -0.00910781417042017, 0.045064777135849, 0.012317889370024204, -0.013190864585340023, -0.004698257427662611, -0.049299053847789764, -0.02892504446208477, 0.0007741642184555531, -0.0006633238517679274, 0.017775705084204674, 0.022202445194125175, 0.005756826139986515, -0.019012991338968277, -0.030547264963388443, -0.011403671465814114, 0.015741052106022835, -0.0019366993801668286, -0.014380035921931267, 0.004564217757433653, 0.007279377896338701, -0.027000373229384422, -0.02266986481845379, -0.022559884935617447, -0.046384550631046295, 0.018518077209591866, 0.014462522231042385, -0.004004001617431641, -0.014613745734095573, -0.008289829827845097, 0.03629378229379654, 0.0029557435773313046, 0.008894725702702999, 0.007190017960965633, 0.0010774716502055526, -0.01927419751882553, -0.00936901941895485, -0.003945574164390564, 0.02558436617255211, 0.008654141798615456, 0.02187250182032585, -0.013087757863104343, 0.009485874325037003, 0.03923577815294266, 0.037751030176877975, -0.03071223758161068, -0.014888699166476727, 0.005310027860105038, 0.028210166841745377, 0.024333329871296883, 0.009561486542224884, 0.0096714673563838, 0.011307437904179096, 0.026299243792891502, -0.005698398686945438, 0.02119886688888073, -0.009128435514867306, 0.00935527216643095, -0.018064403906464577, 0.01547984778881073, -0.028141427785158157, 0.010977493599057198, 0.0209514107555151, 0.007891148328781128, 0.03975818678736687, 0.0035846983082592487, 0.029227491468191147, 0.013472691178321838, 0.02576308511197567, -0.007526835426688194, -0.00568808801472187, 0.017473256215453148, -0.04542221873998642, -0.0030485400930047035, -0.013768265955150127, 0.007409980520606041, 0.010771279223263264, 0.004478295333683491, -0.018243124708533287, -0.048941612243652344, 0.016799621284008026, 0.02772899903357029, 0.004873539786785841, 0.03285687044262886, -0.033626738935709, -0.03923577815294266, 0.01726704090833664, 0.023370996117591858, -0.03211449831724167, 0.02618926204741001, 0.017720714211463928, -0.02463577874004841, 0.0004528130230028182, -0.01306026242673397, 0.018971748650074005, 0.0021875938400626183, 0.027082858607172966, -0.05152617022395134, -0.0317295640707016, 0.014957437291741371, -0.0021858755499124527, -0.02555687166750431, 0.002077612793073058, 0.004358003381639719, -0.009753953665494919, -0.02594180405139923, -0.02305479906499386, 0.039510730654001236, -0.014490016736090183, 0.025020712986588478, -0.021542558446526527, 0.01393323764204979, -0.00702848332002759, -0.02330225706100464, -0.05485310032963753, 6.503280019387603e-05, 0.04643954336643219, 0.051223721355199814, -0.010702541097998619, 0.005877118092030287, 0.016483426094055176, 0.03131713345646858, 0.016717135906219482, 0.049024101346731186, -0.006763841025531292, 0.03285687044262886, -0.05001392960548401, 0.02558436617255211, 0.01579604297876358, -0.03337927907705307, -0.0317295640707016, -0.017734460532665253, -0.0685732513666153, -0.012537851929664612, 0.033434271812438965, 0.016139734536409378, -0.03909830003976822, 0.023755930364131927, 0.0024866051971912384, 0.0041277301497757435, -0.005725893657654524, -0.03150960057973862, -0.026161767542362213, 0.006024905014783144, -0.006571373902261257, -0.00024359107192140073, 0.012345384806394577, 0.04731939360499382, -0.036348771303892136, 0.004880413878709078, -0.008296702988445759, 0.029749901965260506, -0.031124666333198547, 0.011816100217401981, -0.05009641498327255, 0.01645592972636223, 0.007341241929680109, -0.031399618834257126, 6.535501597682014e-05, 0.026601692661643028, 0.029529940336942673, -0.04303012788295746, -0.009575234726071358, -0.038245946168899536, -0.017858190461993217, -0.03632127493619919, -0.03601882979273796, 0.034561578184366226, 0.011403671465814114, 0.029887378215789795, 0.03480903431773186, -0.051581162959337234, -0.025983048602938652, 0.018628058955073357, -0.005983662325888872, 0.04011562466621399, -0.007258756086230278, -0.018435591831803322, 0.011108096688985825, 0.01332146767526865, 0.015644818544387817, -0.004766995552927256, 0.03821844980120659, -0.05521053820848465, -0.005712146405130625, 0.013238981366157532, -0.05303841084241867, 0.022477397695183754, -0.035606399178504944, 0.01983785070478916, 0.0010327917989343405, 0.037366095930337906, -0.0018679611384868622, -0.019824102520942688, 0.007389358710497618, -0.03986816853284836, 0.010936250910162926, -0.02194124087691307, 0.016717135906219482, 0.0088809784501791, 0.020731447264552116, -0.016620902344584465, 0.03134462982416153, 0.018793029710650444, -0.004557344131171703, -0.014173821546137333, 0.014545007608830929, -0.026601692661643028, -0.007561204489320517, -0.029887378215789795, 0.03337927907705307, -0.01898549683392048, 0.0076643116772174835, -0.0014649833319708705, 0.007946138270199299, -0.0118985865265131, -0.013507060706615448, 0.03835592791438103, 0.027605269104242325, -0.018696796149015427, -0.012269772589206696, -0.006385780870914459, -0.009747079573571682, 0.014215064235031605, -0.027756493538618088, 0.0027357812505215406, -0.040665533393621445, 0.0029608989134430885, 0.015672314912080765, -0.035826362669467926, -0.026546701788902283, -0.016277210786938667, -0.04528474062681198, 0.03714613616466522, -0.013782013207674026, 0.005804942920804024, 0.015534837730228901, -0.002600023290142417, 0.02386591024696827, -0.021363839507102966, -0.03981317952275276, -0.03703615441918373, -0.012304142117500305, 0.00568808801472187, 0.012221655808389187, -0.0020363698713481426, 0.0007187440060079098, 0.016345949843525887, -0.020099056884646416, 0.002792490180581808, -0.018050657585263252, -0.033159319311380386, 0.0027082860469818115, 0.012434744276106358, -0.016510920599102974, -0.005241289269179106, 0.012792183086276054, 0.03021732158958912, 0.017074573785066605, 0.024195853620767593, 0.009334650821983814, -0.03398417681455612, -0.022862331941723824, -0.021845007315278053, -0.016153482720255852, 0.00979519635438919, -0.01358267292380333, 0.020552728325128555, -0.013843878172338009, -0.015191147103905678, 0.022876080125570297, -0.01631845347583294, -0.01211167499423027, -0.047016944736242294, 0.005172551143914461, 0.004567654803395271, -0.017363274469971657, 0.03145461156964302, 0.015012427233159542, 0.006987240165472031, -0.0026309555396437645, -0.017294537276029587, -0.024979470297694206, 0.010028906166553497, 0.02695913054049015, 0.022367417812347412, -0.008014876395463943, 0.002512382110580802, 0.008551035076379776, 0.006808520760387182, -0.001191748888231814, -0.014015723019838333, 0.015328623354434967, -0.04074801877140999, -0.014613745734095573, 0.011135592125356197, -0.00900470744818449, -0.031152162700891495, -0.008839735761284828, 0.004883850459009409, 0.02618926204741001, 0.0200028233230114, 0.001955602318048477, 0.016222219914197922, -0.017005836591124535, 0.014929941855370998, 0.000669338449370116, -0.02264237031340599, 0.006052400451153517, 0.004110545851290226, 0.007526835426688194, -0.023247266188263893, 0.010922503657639027, 0.021473821252584457, 0.027701502665877342, 0.014998679980635643, 0.003976506181061268, 0.03288436681032181, -0.028705080971121788, 0.007616194896399975, 0.026656681671738625, 0.04616459086537361, 0.0038046606350690126, -0.0017064263811334968, -0.026161767542362213, 0.019494159147143364, -0.010558190755546093, -0.011444914154708385, 0.006086769513785839, -0.010633802972733974, 0.02194124087691307, -0.01846308633685112, 0.02524067461490631, 0.020786438137292862, -0.016332201659679413, 0.02165254019200802, 0.005639971233904362, 0.006705413572490215, -0.045119769871234894, 0.03758605942130089, 0.01959039270877838, -0.006389217916876078, -0.004962899722158909, 0.017596984282135963, 0.0070869107730686665, 0.015837285667657852, -0.010118266567587852, -0.03186703845858574, 0.008296702988445759, -0.004244585055857897, -0.0064304606057703495, -0.03337927907705307, 0.0298323892056942, -0.023494724184274673, -0.029117511585354805, -0.02930997870862484, 0.014077587984502316, 0.0017450916348025203, 0.0010499763302505016, -0.010991241782903671, 0.024333329871296883, -0.030354799702763557, -0.022559884935617447, -0.022477397695183754, -0.0077467975206673145, -0.052488505840301514, 0.013005271553993225, -0.015631072223186493, 0.009424010291695595, 0.051828619092702866, 0.005055696237832308, -0.003766854526475072, 0.03670620918273926, 0.003811534494161606, -0.011018737219274044, 0.029969865456223488, -0.008729754015803337, -0.009272785857319832, -0.040390580892562866, 0.03194952383637428, 0.009039076045155525, -0.003694679355248809, 0.01993408426642418, 0.013644536957144737, 0.007000987883657217, 0.030024854466319084, -0.02007156051695347, 0.013740770518779755, 0.007953012362122536, -0.02478700317442417, -0.018243124708533287, 0.012929659336805344, -0.02172127738595009, 0.021913744509220123, 0.006433897651731968, -0.032554421573877335, -0.05413822457194328, 0.017885684967041016, 0.02755028009414673, 0.05402824282646179, 0.004371751099824905, 0.005897739436477423, -0.009822691790759563, 0.008709132671356201, -0.019507907330989838, -0.03447909280657768, -0.03161958232522011, -0.003074317006394267, -0.012228529900312424, 0.013177117332816124, -0.053230877965688705, 0.021143877878785133, 0.03967570140957832, -0.005921797826886177, 0.006045526824891567, -0.025543123483657837, 0.04047306627035141, 0.021556306630373, -0.022614875808358192, -0.014833708293735981, -0.019425421953201294, -0.01151365227997303, 0.017074573785066605, 0.017981918528676033, -0.014737474732100964, -0.031674571335315704, 0.019741617143154144, 0.021473821252584457, 0.0051862988620996475, 0.013087757863104343, 0.0015225516399368644, -0.011238698847591877, -0.025323161855340004, -0.01629095897078514, 0.028842557221651077, -0.026766663417220116, 0.006636675447225571, 0.003218667348846793, 0.01618097722530365, 0.028031446039676666, -0.0158647820353508, 0.01484745554625988, -0.02400338649749756, 0.015961015596985817, 0.0069219390861690044, -0.002687664469704032, 0.014325045049190521, 0.014998679980635643, -0.0016600280068814754, 0.03249943256378174, -0.026161767542362213, 0.0004712864465545863, 0.03120715357363224, 0.015672314912080765, -0.015768548473715782, -0.01857306808233261, 0.010675045661628246, -0.019384179264307022, 0.008812240324914455, 0.02053898014128208, -0.008956590667366982, -0.015026175417006016, -0.0008759826887398958, -0.0031653952319175005, 0.008564782328903675, -0.015301127918064594, -0.0029213745146989822, -0.03175705671310425, 0.020305270329117775, -0.005299716722220182, -0.007636816240847111, 0.011871091090142727, 0.034836530685424805, 0.004062429070472717, 0.023151032626628876, 0.008468548767268658, -0.016730884090065956, -0.005024764221161604, 0.013507060706615448, 0.002534721978008747, -0.002854354679584503, -0.01151365227997303, -0.013823256827890873, -0.05378078296780586, 0.0012759532546624541, 0.037751030176877975, 0.022559884935617447, -0.024800751358270645, -0.03692617267370224, -0.013170243240892887, -0.03505649417638779, 0.026340486481785774, -0.030767228454351425, 0.007884274236857891, -0.0072312611155211926, 0.032801877707242966, 0.003746233182027936, -0.0002294138103025034, 0.02113012969493866, 0.007574952207505703, 0.003701553214341402, -0.007155648898333311, 0.009884556755423546, -0.004306449554860592, 0.0006311028264462948, 0.00568808801472187, -0.004828860051929951, -0.020195290446281433, -0.006303295027464628, -0.012654706835746765, 0.003359580645337701, 0.03288436681032181, -0.023989640176296234, 0.0028509178664535284, -0.031922031193971634, -0.038768358528614044, 0.0010585685959085822, 0.00603865273296833, 0.0008347397670149803, 0.0031739873811602592, 0.0013996820198372006, 0.03676120191812515, -0.014311297796666622, -0.0036396889481693506, 0.015768548473715782, -0.01783069409430027, 0.018971748650074005, -0.003397386521100998, -0.006756967399269342, -0.016730884090065956, -0.01783069409430027, -0.008626647293567657, -0.020758943632245064, -0.015562333166599274, -0.015672314912080765, -0.06279923766851425, -0.009774575009942055, -0.027825232595205307, 0.0009460097644478083, 0.0075818258337676525, -0.019535401836037636, -0.02295856550335884, 0.02169378288090229, -0.0008678200538270175, 0.0462745726108551, 0.02264237031340599, -0.03643125668168068, 0.014215064235031605, -0.01930169202387333, -0.01246223971247673, -0.016098491847515106, -0.021432576701045036, 0.0007333509274758399, -0.000859227788168937, 0.002582838758826256, -0.0008716865559108555, -0.011809226125478745, -0.012022314593195915, -0.010248868726193905, -0.0037702915724366903, 0.006354848388582468, -0.00996704213321209, 0.006237993482500315, 0.011809226125478745, -0.009630224667489529, -0.005588417407125235, 0.009204047732055187, -0.000400829769205302, -0.012414122931659222, 0.032032012939453125, -0.00023091745970305055, 0.030272312462329865, -0.0002255472936667502, 0.0016591688618063927, -0.0016729164635762572, 0.005829001311212778, -0.01607099547982216, -0.025914309546351433, -0.03541393205523491, 0.010035780258476734, 5.3835989092476666e-05, 0.0038871464785188437, -0.019384179264307022, 0.03511148318648338, 0.049931444227695465, 0.02815517596900463, 0.016937097534537315, -0.016689639538526535, -0.00252269278280437, -0.012530977837741375, -0.0387408621609211, -0.03018982708454132, -0.016304707154631615, -0.00504538556560874, -0.0033612989354878664, 0.00568808801472187, -0.007093784399330616, 0.023920901119709015, 0.020621467381715775, -0.017596984282135963, -0.01751449890434742, -0.010145762003958225, -0.03758605942130089, 0.005303153768181801, -0.0016866640653461218, -0.0029608989134430885, -0.032939355820417404, -0.02137758769094944, 0.012166664935648441, 0.03524896129965782, -0.017926927655935287, 0.007141901180148125, 0.0024230224080383778, 0.009485874325037003, 0.024470806121826172, 0.011974197812378407, 0.0017227516509592533, -0.03258191794157028, -0.004248022101819515, 0.01930169202387333, 0.007135027553886175, -0.016648396849632263, -0.0196866262704134, 0.0016299551352858543, 0.01388512086123228, 0.0387408621609211, 0.013713275082409382, 0.021212615072727203, 0.01319773867726326, 0.004430178552865982, -0.005138182081282139, 0.0006366877933032811, 0.03538643568754196, -0.00874350219964981, 0.015892276540398598, 0.0008136886754073203, -0.007836157456040382, -0.0177619569003582, -0.005402824375778437, 0.03159208595752716, 0.019631635397672653, -0.03819095715880394, -0.036101315170526505, 0.016414687037467957, -0.024718264117836952, -0.01053069531917572, 0.004237711429595947, 0.010455083101987839, 0.0006856637774035335, 0.002974646631628275, -0.02587306685745716, -0.0016643241979181767, 0.0033681727945804596, 0.02720658853650093, 0.018050657585263252, -0.015823539346456528, 0.01593351922929287, 0.029859883710741997, -0.009685215540230274, 0.019576646387577057, -0.06257927417755127, 0.002844044007360935, 0.0017253293190151453, 0.02200997807085514, 0.01961788907647133, 0.002550187986344099, -0.0023989640176296234, -0.00569496164098382, -0.01769321784377098, 0.010070149786770344, -0.022628622129559517, -0.015782296657562256, 0.00513474503532052, 0.01568606309592724, 0.007829283364117146, -0.005602165125310421, -0.020016569644212723, 0.02941995859146118, -0.032279469072818756, 0.013177117332816124, 0.01943916827440262, 0.011802352964878082, -0.010448209941387177, -0.024484554305672646, 0.0015612168936058879, -0.028760071843862534, -0.002153224777430296, 0.00209307880140841, 0.0020449620205909014, -0.010888134129345417, -0.04355253651738167, 0.029364967718720436, 0.010620055720210075, 0.008688511326909065, -0.009155930951237679, -0.0050213271751999855, -0.018023161217570305, 0.0285676047205925, -0.012063558213412762, -0.009905178099870682, 0.01246223971247673, -0.010290111415088177, 0.02777024172246456, 0.013438322581350803, -0.014008849859237671, 0.02772899903357029, -0.01263408549129963, 0.0044473628513514996, 0.010379471816122532, 0.03373672068119049, 0.0008360286010429263, 0.028980033472180367, -0.0026859459467232227, -0.010241994634270668, -0.03302184119820595, -0.026546701788902283, -0.009059697389602661, 0.017569489777088165, 0.02558436617255211, -0.008241713047027588, -0.027110354974865913, 0.0017665723571553826, -0.0012175258016213775, 0.015521090477705002, 0.017115816473960876, 0.04671449586749077, 0.013837004080414772, 0.01509491354227066, -0.001383356750011444, 0.0014323326759040356, 0.001536299241706729, 0.01803690940141678, 0.023439733311533928, -0.038273442536592484, -0.0033131823875010014, 0.0025639357045292854, -0.03222448006272316, -0.0066160536371171474, -0.04292014613747597, -0.005959603935480118, -0.031262144446372986, -0.0013300846330821514, -0.02955743484199047, 0.014737474732100964, -0.00021308848226908594, 0.014668736606836319, 0.03082221932709217, -0.020401503890752792, -0.002780460985377431, 0.025350656360387802, 0.021776268258690834, 0.019150469452142715, -0.008963463827967644, 0.008612899109721184, 0.013754517771303654, -0.016414687037467957, 0.02352221868932247, 0.012661580927670002, 0.01453126035630703, -3.305341670056805e-05, -0.047016944736242294, 0.008454801514744759, -0.013252729550004005, 0.01765197515487671], "index": 86}, {"title": "Joshua Gregory", "text": "Joshua Gregory (1790 \u2013 20 August 1838) was an early settler in colonial Western Australia. Two of his sons, Augustus Charles and Francis Thomas, became renowned Australian explorers.Joshua Gregory entered the army in 1805 as an ensign in the 78th Highlanders (Ross-shire Buffs). At the age of 16 he saw active service when his regiment was sent to Sicily at the height of the Napoleonic Wars.", "vector": [0.037484049797058105, 0.012617848813533783, -0.019056489691138268, -0.029858311638236046, -0.04968523606657982, 0.047358203679323196, 0.036855123937129974, -0.0008225186611525714, -0.035848841071128845, 0.008038473315536976, -0.07194925099611282, 0.025047019124031067, 0.03226395696401596, 0.033396024256944656, 0.025597330182790756, 0.0340563990175724, -0.031210504472255707, 0.029040705412626266, 0.014646138064563274, 0.0196854155510664, 0.040377113968133926, -0.02231118641793728, 0.022358356043696404, -0.007087221369147301, 0.10320692509412766, 0.004068371839821339, 0.007767248898744583, 0.023883504793047905, -0.03716958686709404, 0.00625389302149415, 0.030078435316681862, 0.022075338289141655, 0.03638342767953873, -0.014072242192924023, -0.012531370855867863, -0.01423733588308096, -0.008121020160615444, -0.011996783316135406, 0.0055070421658456326, -0.01704392209649086, 0.05286131799221039, -0.05191792547702789, 0.018175991252064705, 0.028333162888884544, -0.005444149486720562, 0.001307971659116447, -0.022625649347901344, -0.020361512899398804, -0.05883612483739853, -0.00017627154011279345, -0.03437086194753647, -0.0022877221927046776, -0.02176087535917759, 0.0027456595562398434, -0.012405585497617722, -0.03465387970209122, 0.02908787503838539, 0.08547118306159973, 0.01650933548808098, 0.01500777155160904, 0.0050117624923586845, 0.00325273210182786, -0.019465291872620583, 0.016808075830340385, 0.02982686460018158, -0.012452755123376846, 0.07232660800218582, 0.034024953842163086, -0.056163184344768524, -0.0011713765561580658, 0.04748399183154106, -0.016792351379990578, 0.11974770575761795, 0.04113182798027992, 0.0054520112462341785, -0.019905541092157364, 0.04732675850391388, 0.03198093920946121, -0.02349042519927025, 0.013380422256886959, 0.05556570366024971, -0.03625764325261116, -0.00842762179672718, 0.022452695295214653, 0.005943360272794962, 0.0019084004452452064, -0.01237413939088583, -0.07081718742847443, 0.012861558236181736, -0.030235666781663895, 0.013859979808330536, -0.004276704043149948, 0.02573883906006813, -0.022264016792178154, 0.012209045700728893, 0.021525027230381966, 0.049182094633579254, -0.009363151155412197, 0.001887763850390911, -0.044999729841947556, -0.07043983042240143, -0.029763972386717796, -0.022798605263233185, 0.0041116103529930115, 0.028160206973552704, -0.024135075509548187, 0.0014583246083930135, -0.01624204032123089, 0.05949649587273598, 0.06691783666610718, 0.036949463188648224, 0.009433905594050884, -0.04424501582980156, -0.0013983799144625664, 0.013797086663544178, -0.01938667520880699, -0.006293200887739658, -0.0032271817326545715, 0.045094069093465805, -0.020094219595193863, -0.01115559320896864, 0.020361512899398804, -0.012350554578006268, -0.03908781334757805, -0.004449658561497927, -0.05132044479250908, 0.010809683240950108, 0.08402465283870697, 0.04858461394906044, 0.019921263679862022, -0.03644632175564766, 0.013993626460433006, -0.03754694387316704, -0.009654030203819275, 0.02048729732632637, -0.02982686460018158, 0.036037519574165344, 0.0021678328048437834, 0.016886690631508827, 0.04088025540113449, -0.02103760838508606, -0.05128899961709976, 0.02556588314473629, 0.014119411818683147, -0.0019477084279060364, -0.033490363508462906, 0.020188556984066963, 0.0017678745789453387, -0.02628915011882782, -0.039024922996759415, -0.050439946353435516, 0.03446520119905472, 0.004394627641886473, 0.005990529898554087, 0.005841159727424383, -0.009756230749189854, -0.025219973176717758, -0.02955957129597664, -0.007759387139230967, -0.00830183643847704, 0.008710639551281929, 0.0002454289351589978, 0.0001089566940208897, 0.032672759145498276, 0.0074645779095590115, -0.009213780984282494, 0.016823798418045044, -0.03199666365981102, 0.024999849498271942, 0.023065898567438126, -0.021163394674658775, -0.004276704043149948, -0.0253929290920496, -0.017609957605600357, -0.006088799796998501, -0.03028283640742302, -0.011045531369745731, 0.037106696516275406, 0.00652511790394783, -0.02174515277147293, -0.012767218984663486, -0.03232685104012489, 0.03289288282394409, -0.013679162599146366, -0.014355259947478771, -0.013985765166580677, 0.04911920055747032, 0.02682373858988285, -0.0008696881704963744, 0.020330065861344337, 0.004280634690076113, 0.007358446251600981, -0.01114773191511631, 0.03418218344449997, 0.04613179713487625, 0.02665078267455101, 0.05128899961709976, 0.012900865636765957, -0.04405633732676506, -0.009984216652810574, 0.011965337209403515, -0.04245257377624512, -0.004669783171266317, -0.006474017631262541, 0.009245227091014385, -0.030345728620886803, 0.041823647916316986, -0.00480736093595624, -0.010754652321338654, -0.010841129347682, 0.004665852524340153, -0.020786037668585777, 0.005467734299600124, -0.008278251625597477, -0.0017767188837751746, 0.021776597946882248, 0.062326669692993164, 0.0040290639735758305, 0.03940228000283241, 0.05006259307265282, 0.006430779118090868, 0.0424211286008358, 0.03798719123005867, -0.03569160774350166, 0.02276715822517872, 0.039748188108205795, -0.03855322673916817, 0.008812840096652508, -0.0029087874572724104, -0.04786134883761406, 0.015565943904221058, 0.05610029026865959, -0.006513325497508049, 0.004378904588520527, -0.05654054135084152, 0.0270124152302742, 0.023600487038493156, 0.03933938592672348, 0.056068845093250275, -0.02476400136947632, 0.00330972857773304, 0.01500777155160904, -0.021682258695364, -0.030330006033182144, 0.04031422361731529, 0.04886763170361519, -0.03996831178665161, -0.03553437814116478, -0.009017241187393665, -0.0031682199332863092, 0.0005306571838445961, -0.026509273797273636, -0.012531370855867863, -0.0422324500977993, -0.04235823452472687, -0.006536910310387611, -0.015723176300525665, 0.04459092766046524, 0.038930583745241165, 0.012067537754774094, 0.0005915844812989235, -0.0003034081601072103, 0.01795586757361889, -0.011320686899125576, -0.025896070525050163, -0.03704380244016647, -0.025172803550958633, 0.007071498315781355, -0.0012529406230896711, -0.006713795941323042, -0.006057353690266609, -0.013529792428016663, -0.05110032111406326, -0.007252315059304237, -0.008553408086299896, -0.01822316087782383, -0.04179220274090767, -0.03166647627949715, -0.013789225369691849, -0.007126529235392809, 0.045565761625766754, -0.0612574927508831, -0.020707422867417336, -0.056603431701660156, 0.025880347937345505, 0.04028277471661568, -0.03361615166068077, 0.03977963328361511, 0.021462135016918182, -0.03600607439875603, -0.020188556984066963, -0.015652421861886978, -0.0007276882533915341, -0.009488936513662338, -0.040094099938869476, -0.0424211286008358, -0.03625764325261116, -0.03333313390612602, -0.04562865570187569, -0.03852178156375885, 0.04893052205443382, -0.014205889776349068, -0.02276715822517872, 0.01051880419254303, -0.0053969803266227245, -0.019999880343675613, -0.007578570861369371, -0.050974536687135696, 0.03465387970209122, -0.058804675936698914, 0.002049908973276615, -0.009127303957939148, -0.00718156062066555, -0.002297549042850733, -0.01345903892070055, -0.02210678532719612, 0.03238974139094353, 0.018883533775806427, -0.04207521677017212, -0.008262529037892818, 0.017091091722249985, -6.645498797297478e-05, -0.021697983145713806, -0.046823617070913315, -0.012248354032635689, -0.03117905743420124, -0.022908667102456093, -0.024701109156012535, -0.03833310306072235, 0.0006849408382549882, 0.012727910652756691, -0.022091062739491463, 0.007334861438721418, 0.005070724058896303, 0.015833238139748573, -0.027232540771365166, -0.016163425520062447, 0.08188629895448685, 0.008820701390504837, 0.0018189748516306281, 0.0013826567446812987, 0.0024252999573946, 0.023065898567438126, 0.044811051338911057, -0.01591971516609192, 0.00619100034236908, 0.06018831580877304, 0.025047019124031067, 0.02029862068593502, -0.017059646546840668, 0.0006682349485345185, 0.022625649347901344, -0.014355259947478771, 0.010251510888338089, 0.004021202214062214, -0.005927637219429016, 0.03361615166068077, -0.04015699028968811, 0.03732682019472122, 0.008954348973929882, 0.009143026545643806, -0.005554211791604757, -0.01037729624658823, 0.07251528650522232, 0.015282927080988884, -0.029119322076439857, 0.025219973176717758, -0.046006012707948685, -0.031870875507593155, -0.004040856380015612, -0.005263333208858967, 0.07547124475240707, -0.00657621817663312, -0.00723266089335084, -0.009937047027051449, -0.007716148626059294, -0.05260974541306496, 0.0007782971952110529, 0.0011576188262552023, -0.023144515231251717, 0.02783002145588398, 0.002865548711270094, -0.0031092579010874033, -0.008757809177041054, 0.03471677377820015, -0.03547148406505585, -0.05537702515721321, -0.0227357130497694, 0.021713705733418465, 0.0073466538451612, -0.015424435026943684, 0.07043983042240143, 0.058867570012807846, 0.008576991967856884, 0.017169708386063576, 0.004245257470756769, 0.005935498978942633, 0.03644632175564766, 0.007912687957286835, 0.015896130353212357, 0.012405585497617722, -0.05257830023765564, -0.0015123729826882482, 0.034307967871427536, 0.005974806845188141, 0.02122628688812256, -0.04940221831202507, 0.03798719123005867, 0.035219915211200714, -0.039936866611242294, 0.004044787026941776, 0.012940173968672752, -0.041006043553352356, 0.009638306684792042, -0.0031230158638209105, -0.01191816758364439, 0.004878115374594927, 0.047012295573949814, -0.01514141820371151, 0.026241980493068695, 0.002244483446702361, 0.013529792428016663, -0.023726271465420723, 0.019638245925307274, 0.0017560821725055575, 0.03496834263205528, 0.0135062076151371, 0.03515702113509178, 0.016029777005314827, -0.004492897540330887, 0.01849045418202877, -0.003541645361110568, -0.012971620075404644, 0.05666632577776909, -0.02157219685614109, -0.010306541807949543, -0.02600613236427307, -0.015762483701109886, -0.0018582828342914581, 0.010495220310986042, -0.029024982824921608, 0.024056458845734596, -0.040660131722688675, -0.013993626460433006, -0.02855328656733036, -0.03191804513335228, -0.07232660800218582, 0.00905654951930046, 0.010102140717208385, 0.043364517390728, 0.0030267112888395786, 0.03952806442975998, 0.02674512192606926, -0.029591016471385956, -0.01382853277027607, -0.06440212577581406, -0.006328578107059002, 0.01856907084584236, -0.04323873296380043, 0.029936926439404488, 0.015440158545970917, 0.0015516809653490782, 0.04688651114702225, -0.04062868654727936, 0.035314254462718964, -0.03814442455768585, -0.0007252314826473594, -0.0311947800219059, -0.037012357264757156, -0.0009640271891839802, -0.022091062739491463, 0.006403263192623854, -0.027877191081643105, 0.0505971796810627, 0.009764092043042183, -0.012130429968237877, -0.012680741026997566, 0.022452695295214653, 0.03751549869775772, -0.010668174363672733, 0.008647746406495571, 0.020251451060175896, 0.005133616738021374, 0.028238823637366295, 0.015927577391266823, -0.022892944514751434, 0.02248414047062397, 0.0009542002226226032, -0.054905328899621964, 0.006902473978698254, -0.04396199807524681, 0.03389916568994522, -0.024150798097252846, 0.008136743679642677, -0.020786037668585777, -0.01811309903860092, -0.018065929412841797, 0.011312824673950672, 0.025597330182790756, -0.03399350494146347, -0.019528184086084366, -0.00024555178242735565, 0.06367886066436768, -0.025958962738513947, 0.041477736085653305, -0.006529048550873995, -0.04452803358435631, 0.036572106182575226, -0.014253058470785618, -0.005786128807812929, -0.047546882182359695, 0.004575444385409355, 0.002682766877114773, -0.01205181423574686, -0.009889877401292324, -0.0030345728155225515, 0.012083260342478752, 0.06584866344928741, -0.0011291205883026123, 0.016100531443953514, -0.03509412705898285, 0.03342747315764427, -0.03808153048157692, 0.0016922068316489458, 0.012751495465636253, -0.034024953842163086, 0.026792291551828384, 0.03644632175564766, -0.06823858618736267, 0.0342450775206089, 0.016745181754231453, 0.00625389302149415, -0.03619474917650223, 0.03981108218431473, 0.019150828942656517, 0.014803370460867882, 0.012224769219756126, 0.02946523204445839, -0.01028295699506998, -0.01957535371184349, 0.0038757629226893187, -0.008136743679642677, 0.02646210417151451, -0.014473183080554008, 0.016619397327303886, 0.010809683240950108, -0.012908726930618286, -0.004669783171266317, 0.007032190449535847, -0.004744468256831169, 0.021870937198400497, -0.049465112388134, -0.02113194763660431, -0.025314312428236008, 0.04738965258002281, -0.015723176300525665, -0.032138172537088394, 0.06767255067825317, -0.00695357471704483, -0.04720097407698631, 0.0192137211561203, -0.02874196507036686, -0.02067597582936287, -0.02781429886817932, 0.007087221369147301, 0.03540859371423721, -0.0348111130297184, 0.04251546785235405, -0.0384274423122406, 0.016808075830340385, -0.01060528215020895, -0.018537623807787895, -0.01676090620458126, -0.010793960653245449, 0.007665048353374004, -0.025345759466290474, 0.032672759145498276, -0.01571531407535076, 0.015031356364488602, -0.010102140717208385, 0.00806598924100399, -0.02665078267455101, -0.008632023818790913, 0.035943180322647095, 0.002818379318341613, -0.00816032849252224, -0.006513325497508049, -0.013246775604784489, 0.04543997719883919, -0.056068845093250275, -0.08326993882656097, -0.024638216942548752, 0.03616330400109291, 0.015801791101694107, -0.0023034452460706234, 0.0174998939037323, -0.027138201519846916, 0.0032900746446102858, 0.01238200068473816, -0.006171346642076969, 0.04588022828102112, -0.00030881300335749984, 0.03081742487847805, -0.0194023996591568, -0.016792351379990578, -0.017814358696341515, 0.0030031264759600163, 0.02185521461069584, 0.008038473315536976, -0.036760784685611725, 0.019999880343675613, -0.01784580387175083, 0.0010878472821787, -0.015290788374841213, 0.008018819615244865, 0.004752330016344786, 0.015094248577952385, 0.016257762908935547, 0.040377113968133926, 0.0043278043158352375, -0.004917423240840435, -0.02937089279294014, 0.035597268491983414, -0.011139869689941406, 0.012098983861505985, 0.0013600547099485993, -0.03108471818268299, -0.019370952621102333, 0.012680741026997566, 0.031068995594978333, -0.0340563990175724, 0.0010947261471301317, -0.04154063016176224, -0.007590363267809153, -0.028804857283830643, 0.01005497109144926, 0.032861437648534775, 0.000349103647749871, 0.04025132954120636, -0.004339596722275019, -0.022264016792178154, 0.02421369031071663, -0.003954378888010979, 0.0005321312346495688, -0.009685476310551167, -0.008270390331745148, -0.016996752470731735, -0.011768797412514687, -0.009952770546078682, 0.0270124152302742, 0.005161132663488388, -0.023018728941679, 0.020597361028194427, -0.016839521005749702, -0.031399182975292206, -0.028773412108421326, -0.05147767812013626, -0.018474731594324112, 0.01948101446032524, -0.005176855716854334, -0.010911883786320686, -0.04433935508131981, -0.03009415790438652, 0.035943180322647095, -0.026446381583809853, 0.010888298973441124, -0.04415067657828331, -0.024260859936475754, 0.0458487793803215, -0.026179088279604912, 0.010125725530087948, -0.04216955602169037, -0.014292366802692413, -0.018175991252064705, 0.020235726609826088, 0.0176885724067688, -0.01814454421401024, -0.04893052205443382, -0.022547034546732903, 0.015746761113405228, 0.06572287529706955, -0.03663500025868416, -0.00852196104824543, 0.002116732532158494, -0.009858431294560432, -0.0017865458503365517, -0.0036536729894578457, -0.02374199591577053, 0.005711443722248077, 0.0015054941177368164, 0.005157201550900936, 0.04993680492043495, -0.012963758781552315, -0.003783389227464795, -0.025581607595086098, 0.02955957129597664, -0.004076233133673668, -0.035219915211200714, -0.05767260864377022, -0.05650909245014191, -0.032232511788606644, 0.019103659316897392, 0.011438610032200813, 0.002971680136397481, 0.018521901220083237, -0.0030168844386935234, -0.005251540802419186, -0.015314373187720776, -0.005841159727424383, -0.03465387970209122, -0.007417408283799887, 0.030204221606254578, -0.04525129869580269, 0.01028295699506998, -0.03254697471857071, -0.062043651938438416, 0.015613113529980183, -0.03264131397008896, -0.009748369455337524, 0.01138357911258936, 0.008922901935875416, 0.019543906673789024, 0.01776718907058239, -0.03333313390612602, 0.00015514352708123624, 0.04525129869580269, -0.01305023580789566, -0.026682229712605476, 0.017657127231359482, 0.013097405433654785, -0.0015487328637391329, -0.026760844513773918, 0.0024881926365196705, 0.001653881510719657, -0.029150767251849174, -0.006867097225040197, -0.002657216740772128, 0.005542419385164976, -0.007798695005476475, 0.003830558620393276, 0.018427561968564987, 0.02575456164777279, 0.011501503176987171, -0.06053422763943672, -0.0032763166818767786, 0.007244453299790621, 0.008797116577625275, -0.03716958686709404, -0.013946456834673882, -0.013270360417664051, -0.013608409091830254, -0.03506268188357353, -0.024732556194067, -0.01291658915579319, -0.03333313390612602, -0.0085140997543931, -0.014213751070201397, -0.026131918653845787, 0.005664274096488953, 0.01911938190460205, 0.02882058173418045, 0.010503081604838371, 0.003272386034950614, 0.0426098071038723, 0.002751555759459734, 0.0349997878074646, 0.02103760838508606, 0.000539501488674432, -0.006702003534883261, -0.018506178632378578, -0.03143062815070152, -0.022814327850937843, 0.00915875006467104, -0.006324647460132837, 0.046634938567876816, -0.006584079936146736, 0.010479496791958809, -0.001222476945258677, -0.015157141722738743, -0.02493695728480816, -0.03345891833305359, 0.014921293593943119, -0.00029480954981409013, 0.013970041647553444, 0.01621059514582157, -0.000134875372168608, 0.040188439190387726, 0.0037676659412682056, -0.025455821305513382, -0.020503021776676178, -0.001347279641777277, -0.007307345978915691, -0.0420437715947628, -0.008113158866763115, 0.023396085947752, 0.009465351700782776, 0.015251480974256992, 0.0097011998295784, -0.01580965332686901, -0.00838045310229063, 0.019166551530361176, -0.000332152092596516, -0.03628908842802048, 0.03207527846097946, -0.03371048718690872, -0.010817544534802437, -0.00348071800544858, 0.03455954045057297, -0.03327023983001709, 0.019921263679862022, 0.01759423315525055, 0.013718470931053162, 0.012499924749135971, 0.0018229057313874364, 0.005440218839794397, -0.0029009259305894375, -0.011462194845080376, 0.007043982855975628, -0.03273565322160721, -0.01913510449230671, -0.03264131397008896, 0.004952800460159779, -0.012877280823886395, -0.003848247230052948, 0.040094099938869476, 0.01260212529450655, -0.0006240135408006608, -0.011391440406441689, 0.013875702396035194, 0.0028026560321450233, -0.02194955386221409, -0.02820737659931183, -0.055156901478767395, -0.010314403101801872, 0.009127303957939148, 0.04207521677017212, -0.019103659316897392, 0.014567522332072258, 0.027436941862106323, 0.05260974541306496, -0.007224799133837223, -0.014748338609933853, 0.018364669755101204, -0.02212250791490078, -0.0176885724067688, 0.018097374588251114, 0.008081712760031223, -0.02518852800130844, -0.024795448407530785, -0.008687054738402367, 0.0059197754599153996, 0.01522789616137743, -0.021242011338472366, 0.04267269745469093, -0.0055974507704377174, -0.010660313069820404, 0.0042413268238306046, -0.001965397037565708, -0.041477736085653305, -0.018521901220083237, 0.01159584242850542, -0.004724814556539059, -0.009449629113078117, 0.011171316727995872, 0.025534437969326973, -0.03490544855594635, 0.022499864920973778, -0.017531340941786766, -0.027263985946774483, 0.0074881622567772865, 0.01776718907058239, -0.004551859572529793, -0.017201153561472893, -0.039559509605169296, 0.027311155572533607, 0.03471677377820015, -0.02338036149740219, 0.003696911735460162, 0.009473212994635105, -0.03716958686709404, -0.013616270385682583, -0.025408651679754257, -0.039748188108205795, 0.027531281113624573, 0.03232685104012489, 0.006187069695442915, 0.025896070525050163, 0.006116315256804228, 0.01427664328366518, 0.013899287208914757, -0.018474731594324112, 0.030502961948513985, -0.025958962738513947, -0.015581667423248291, -0.025628777220845222, 0.03080170229077339, 0.0023977842647582293, -0.013168159872293472, -0.027342602610588074, -0.014575383625924587, 0.001549715525470674, 0.009795538149774075, 0.010243648663163185, 0.02493695728480816, 0.021509304642677307, 0.002433161484077573, 0.059056248515844345, 0.004744468256831169, -0.00010152503818972036, 0.03045579232275486, 0.004677644930779934, 0.03528280556201935, -0.042012326419353485, 0.027625620365142822, -0.012256215326488018, -0.018521901220083237, -0.06660337001085281, 0.03018849715590477, 0.004646198358386755, 0.00711866794154048, 0.017295492812991142, -0.04025132954120636, -0.04760977625846863, 0.02094327099621296, -0.007948065176606178, -0.014205889776349068, -0.020833207294344902, -0.022877220064401627, 0.05566004291176796, 0.03465387970209122, 0.012012505903840065, 0.012492063455283642, -0.03506268188357353, -0.005279056262224913, -0.00852196104824543, -0.009143026545643806, 0.022248294204473495, 0.023962119594216347, 0.010330126620829105, 0.001905452343635261, 0.0133646996691823, -0.025817453861236572, -0.001991929719224572, -0.00842762179672718, -0.022169677540659904, 0.04349030554294586, -0.008993656374514103, 0.025408651679754257, -0.010031386278569698, 0.0008922902052290738, 0.058238644152879715, -0.001695154933258891, -0.015848960727453232, -0.0012264077086001635, -0.010676036588847637, 0.043175842612981796, -0.005231886636465788, -0.0014622553717345, 0.019559631124138832, 0.021100502461194992, -0.013616270385682583, 0.022043893113732338, -0.009882016107439995, -0.002385991858318448, 0.005381256807595491, 0.006069145631045103, -0.0036733269225806, 0.0016607604920864105, -0.03336457908153534, 0.00996849313378334, -0.011234208941459656, -0.003582918783649802, -0.014355259947478771, 0.005157201550900936, -0.0190250426530838, 0.040471453219652176, -0.016918137669563293, 0.03833310306072235, -0.009858431294560432, -0.01059742085635662, -0.0024135075509548187, 0.011312824673950672, -0.05411916971206665, 0.00929239671677351, 0.03352181240916252, 0.009654030203819275, -0.016525058075785637, 0.04452803358435631, 0.008136743679642677, 0.006823858246207237, -0.05981096252799034, 0.01590399257838726, 0.00580578250810504, -0.04742109775543213, -0.026069024577736855, -0.01831750012934208, -0.03427652269601822, 0.00016030269034672529, 0.025235697627067566, -0.007016467396169901, 0.016289209946990013, 0.05720091238617897, -0.000616151955910027, -0.043647535145282745, 0.006014114711433649, -0.013176021166145802, 0.0016882759518921375, -0.00117334199603647, -0.0006525117787532508, -0.012004644609987736, 0.03028283640742302, -0.07786116749048233, 0.016430718824267387, -0.03282999247312546, 0.010416603647172451, -0.02775140479207039, 0.023883504793047905, 0.014646138064563274, 0.007397754117846489, 0.007185491267591715, -0.009048687294125557, -0.040660131722688675, -0.005852952133864164, 0.016650842502713203, -0.032578419893980026, 0.010856852866709232, -0.03679222986102104, 0.0007468508556485176, 0.0029598877299576998, 0.04842738062143326, 0.018364669755101204, -0.007955927401781082, 0.01666656695306301, -0.005845090374350548, -0.007122598588466644, 0.02584890089929104, 0.011808104813098907, 0.00905654951930046, -0.0018258538329973817, 0.04213811084628105, 0.031682200729846954, 0.008529823273420334, -0.019559631124138832, 0.0001396660227328539, -0.060408443212509155, 0.0037696314975619316, -0.007590363267809153, 0.011242070235311985, -0.018977873027324677, -0.002627735724672675, 0.012727910652756691, -0.0004918405902571976, -0.03055012971162796, -0.026352042332291603, -0.04069158062338829, 0.04559721052646637, -0.02564449980854988, -0.03026711381971836, -0.006344301626086235, 0.00187597144395113, -0.011815967038273811, 0.019606800749897957, 0.020361512899398804, -0.027263985946774483, 0.023977842181921005, -0.013962180353701115, 0.01866341009736061, 0.012421309016644955, 0.01712253876030445, -0.013962180353701115, -0.031116165220737457, 4.382221231935546e-05, -0.042106665670871735, 0.0023800956550985575, -0.016116255894303322, 0.021006163209676743, 0.008050265721976757, -0.007499954663217068, -0.019292335957288742, -0.017877250909805298, 0.05682355910539627, -0.004477174486964941, 0.0016912240535020828, -0.03193376958370209, -0.013514069840312004, 0.03036145307123661, 0.018160268664360046, 0.0172168780118227, -0.0174998939037323, -0.008718500845134258, -0.012995204888284206, -0.011407163925468922, -0.012067537754774094, 0.013128851540386677, -0.03990542143583298, 0.008498376235365868, -0.034307967871427536, 0.04943366348743439, -0.028600456193089485, -0.03133628889918327, 0.0039976174011826515, -0.0498424656689167, -0.013655577786266804, 0.020723145455121994, 0.018631963059306145, 0.00806598924100399, -0.015416573733091354, -0.0005758613115176558, -0.04088025540113449, 0.04949655756354332, 0.0002962836006190628, 0.026996692642569542, -0.024245137348771095, -0.042012326419353485, 0.002838033251464367, 0.02529858984053135, 0.03017277456820011, -0.006143830716609955, 0.006509394850581884, -0.004595098085701466, -0.010188617743551731, -0.014245197176933289, 0.03691801801323891, 0.012091122567653656, -0.007177629973739386, -0.021792322397232056, -0.022358356043696404, -0.010565973818302155, 0.013301806524395943, 0.024182245135307312, 0.024056458845734596, -0.011957474984228611, -0.0017875285120680928, -0.007955927401781082, 0.01641499623656273, -0.00284589477814734, -0.01029081828892231, -0.0011133974185213447, -0.01282224990427494, -0.035314254462718964, -0.021918106824159622, -0.029622463509440422, -0.007818348705768585, 0.016383549198508263, -0.02347470074892044, -0.001990947173908353, -0.019622523337602615, 0.0001655847008805722, -0.04628903046250343, 0.00123033847194165, -0.0027201094198971987, 0.011572257615625858, 0.016179148107767105, 0.022342633455991745, -0.004146987572312355, 0.015322234481573105, 0.009999940171837807, -0.008309698663651943, -0.023694826290011406, 0.006859235465526581, 0.0027102823369205, 0.004532205406576395, 0.028128761798143387, -0.009937047027051449, -0.02122628688812256, 0.007586432155221701, -0.0002751555875875056, -0.06100592389702797, 0.006116315256804228, 0.02492123283445835, -0.005184717010706663, -0.017468448728322983, -0.0016145736444741488, -0.03600607439875603, 0.018003037199378014, -0.02655644342303276, -0.011815967038273811, 0.013576962053775787, 0.015793930739164352, 0.014001487754285336, -0.0032743513584136963, -0.0344337560236454, -0.036666445434093475, -0.015801791101694107, 0.014433875679969788, -0.029512401670217514, -0.0393708311021328, -0.03770417720079422, 0.009048687294125557, 0.014308090321719646, 0.008687054738402367, 0.0026336319278925657, -0.0008691968396306038, 0.01822316087782383, -0.002963818609714508, -0.03808153048157692, 0.008191774599254131, 0.011776658706367016, -0.004135195165872574, 0.018427561968564987, -0.005817574914544821, -0.014992048032581806, 0.009543967433273792, 0.014268781989812851, -0.018521901220083237, 0.011792382225394249, -0.01345903892070055, -0.022798605263233185, -0.0382387638092041, 0.01504707895219326, 0.0044968281872570515, 0.04515695944428444, 0.0025746701285243034, 0.028883473947644234, -0.0021973138209432364, 0.011242070235311985, 0.013710609637200832, -0.005617104470729828, 0.024685386568307877, 0.002128524938598275, -0.02210678532719612, -0.0012480270816013217, -0.01580965332686901, -0.011021946556866169, -0.011863135732710361, -0.01704392209649086, -0.010141448117792606, -0.03833310306072235, 0.009182334877550602, 0.02220112457871437, -0.06043988838791847, 0.004032994620501995, -0.006084869150072336, -0.007893034256994724, 0.00745278550311923, -0.05657198652625084, 0.021446412429213524, -0.009347427636384964, 0.004980315919965506, 0.0027849674224853516, 0.003586849430575967, 0.0070754289627075195, -0.015707451850175858, 0.002657216740772128, -0.0036379497032612562, 0.008333283476531506, 0.00700467498973012, -0.012083260342478752, 0.021462135016918182, -0.0022012447007000446, 0.012554955668747425, 0.019056489691138268, -0.0504085011780262, 0.008207498118281364, 0.020424405112862587, -0.0031013963744044304, 0.024811170995235443, -0.004992108326405287, 0.0003626157413236797, -0.0040565794333815575, -0.04776700958609581, -0.01459110714495182, -0.020345790311694145, -0.010251510888338089, 0.01732693985104561, 0.006293200887739658, 0.012547094374895096, -0.014952740631997585, 0.007920550182461739, -0.030408622696995735, -0.016996752470731735, 0.0063482322730124, 0.03698090836405754, -0.01913510449230671, 0.022405525669455528, -0.0044221431016922, -0.012554955668747425, -0.006792412139475346, 0.009999940171837807, 0.00750388577580452, 0.008404037915170193, 0.023537594825029373, -0.0011595842661336064, -0.02349042519927025, 0.01047163549810648, 0.03073880821466446, -0.006572287529706955, 0.022798605263233185, -0.027436941862106323, -0.011674458160996437, -0.0429871641099453, -0.019701140001416206, -0.004834876395761967, 0.005432357080280781, 0.014347397722303867, 0.022688543424010277, -0.02638348937034607, 0.01704392209649086, -0.0088442862033844, -0.01128923986107111, -0.046037457883358, 0.013207467272877693, 0.00874994695186615, 0.02077031508088112, 0.021525027230381966, -0.03654066100716591, -0.012177599593997002, 0.01051880419254303, -0.012806526385247707, 0.017814358696341515, 0.03155641257762909, -0.01784580387175083, 0.02693380042910576, -0.006859235465526581, -0.01976403221487999, 0.0012264077086001635, 0.045660100877285004, -0.015518774278461933, -0.02963818609714508, 0.03245263546705246, 0.0033647597301751375, 0.01776718907058239, -0.00111634552013129, 0.028804857283830643, -0.007220868486911058, 0.019072212278842926, -0.017169708386063576, -0.023003006353974342, -0.006497602444142103, -0.002983472542837262, -0.014504630118608475, -0.014095827005803585, 0.005341948941349983, -0.009992077946662903, -0.030691638588905334, -0.03218534216284752, -0.00011479146633064374, 0.02446526102721691, 0.012209045700728893, -0.035597268491983414, -0.00819963589310646, 0.027861466631293297, -0.00015674041060265154, 0.03355325758457184, 0.03415073826909065, 0.003262558951973915, -0.01318388245999813, 0.012790803797543049, 0.007665048353374004, -0.04198088124394417, 0.00580578250810504, 0.01273577194660902, -0.0052083018235862255, 0.011344271712005138, 0.0015713348984718323, -0.00519257877022028, 0.04103748872876167, -0.0018808848690241575, 0.0038737973663955927, 0.0020056876819580793, -0.0024980194866657257, -0.01549518946558237, -0.016116255894303322, -0.013026650995016098, 0.0113678565248847, -0.00795199628919363, 0.013899287208914757, -0.03691801801323891, 0.021509304642677307, 0.018160268664360046, 0.004316011909395456, 0.00421381089836359, -0.00919805746525526, -0.004166641738265753, -0.01327822171151638, -0.02682373858988285, 0.00452827475965023, -0.05386760085821152, 0.010990499518811703, 0.0022169677540659904, 0.022185400128364563, 0.013584824278950691, 0.022609926760196686, -0.003791250754147768, 0.009858431294560432, -0.007767248898744583, 0.0066351802088320255, 0.0307230856269598, 0.030785977840423584, -0.00348071800544858, 0.018065929412841797, -0.012759356759488583, 0.033930614590644836, -0.010526666417717934, 0.018474731594324112, 0.014638276770710945, -0.004701229743659496, 0.008655608631670475, 0.012570679187774658, -0.027421219274401665, 0.02600613236427307, -0.02718537114560604, -8.230099774664268e-05, 0.03713814169168472, -0.0462261363863945, -0.027625620365142822, 0.03506268188357353, -0.02311306819319725, 0.020534466952085495, 0.01073892880231142, -0.018459009006619453, -0.0014760131016373634, 0.010432327166199684, 0.041760753840208054, 0.02048729732632637, 0.04333307221531868, -0.03282999247312546, 0.0026021855883300304, -0.012940173968672752, 0.04521985352039337, -0.0346224345266819, -0.04352175071835518, -0.019072212278842926, 0.004433935508131981, 0.041100382804870605, -0.003791250754147768, -0.028050145134329796, -0.007558916695415974, 0.007197283674031496, 0.005330156534910202, -0.013757779262959957, -0.009724784642457962, -0.0011301032500341535, -0.0004680101410485804, 0.01713826134800911, -0.02077031508088112, -0.013215329498052597, -0.014072242192924023, -0.01913510449230671, -0.021902384236454964, 0.032767098397016525, -0.00763753242790699, 0.017153983935713768, 0.050534285604953766, -0.03135201334953308, -0.020707422867417336, -0.015817515552043915, -0.012539233081042767, 0.00829397514462471, 0.022892944514751434, 0.03209100291132927, 0.0232074074447155, -3.6666937376139686e-05, 0.015558082610368729, 0.011234208941459656, 0.05556570366024971, 0.03452809527516365, 0.013325391337275505, -0.019984155893325806, -0.0024213690776377916, -0.013396145775914192, 0.0010524700628593564, 0.01577034592628479, -0.009543967433273792, -0.002022393513470888, -0.005117893684655428, 0.012523509562015533, -0.021965276449918747, -0.030770255252718925, 0.03279854357242584, -0.002444953890517354, 0.014567522332072258, 0.0196854155510664, 0.025172803550958633, -0.00700467498973012, 0.013262499123811722, -0.0028557218611240387, -0.03355325758457184, -0.014111550524830818, 0.014182304963469505, 0.005660343449562788, -0.020157111808657646, 0.016383549198508263, -0.002385991858318448, 0.02176087535917759, 0.020817484706640244, -0.005939429625868797, -0.010188617743551731, -0.001019058283418417, 0.014315951615571976, 0.013859979808330536, 0.024323752149939537, 0.011352133005857468, -0.008474791422486305, -0.024449538439512253, -0.023458978161215782, -0.03298722207546234, -0.024622492492198944, -0.0026611476205289364, 0.01014931034296751, -0.002704386133700609, 0.022169677540659904, -0.01345903892070055, -0.0050667934119701385, -0.026965245604515076, 0.01301092840731144, 0.014669722877442837, 0.02003132551908493, -0.034590985625982285, -0.016069086268544197, -0.04402489215135574, 0.0052397483959794044, 0.0123662780970335, 0.008121020160615444, 0.006399332545697689, 0.014536076225340366, 0.012712188065052032, -0.0008593698148615658, 0.025141358375549316, -0.010841129347682, -0.007810487411916256, -0.01327822171151638, 0.022531310096383095, -0.012413447722792625, 0.007362376898527145, -0.012649294920265675, 0.010793960653245449, 0.0034335486125200987, -0.02636776491999626, -0.004123402759432793, -0.024591047316789627, -0.002820344641804695, 0.011981059797108173, -0.01949673891067505, 0.02410362847149372, -0.02455960027873516], "index": 87}, {"title": "Cynric of Wessex", "text": "Cynric was King of Wessex from 534 to 560. Everything known about him comes from the Anglo-Saxon Chronicle. There he is stated to have been the son of Cerdic, and also (in the regnal list in the preface) to have been the son of Cerdic's son, Creoda. During his reign it is said that the Saxons expanded into Wiltshire against strong resistance and captured Searobyrig or Old Sarum, near Salisbury, in 552.", "vector": [0.0034433980472385883, 0.06477025151252747, -0.021929355338215828, -0.0037375078536570072, 0.024573039263486862, 0.040580544620752335, -0.011288529261946678, -0.04845872148871422, -0.023819589987397194, 0.018479349091649055, -0.034526508301496506, -0.012458359822630882, -0.058108165860176086, -0.02717706747353077, 0.0484851598739624, 0.024202924221754074, -0.05305873230099678, -0.015848884359002113, -0.012127898633480072, -0.00563765550032258, 0.013826466165482998, 0.00533363176509738, 0.00780547596514225, -0.010931632481515408, 0.05905989184975624, 0.01290778536349535, -0.03291386365890503, -0.008241684176027775, -0.048379410058259964, -0.00652328971773386, 0.023753497749567032, 0.01587532088160515, -0.01547876838594675, 0.06027598679065704, 0.0008290426922030747, -0.04874952882528305, 0.019298890605568886, 0.02019774354994297, -0.004533917643129826, -0.020012686029076576, 0.0493575744330883, 0.015743136405944824, 0.020871883258223534, 0.03748743608593941, 0.02565694972872734, -0.00637127785012126, -0.033812712877988815, -0.005736793391406536, -0.03257018327713013, -0.018915556371212006, 0.04280123859643936, -0.01587532088160515, -0.03333685174584389, -0.025775916874408722, -0.03412995487451553, 0.03553110733628273, 0.002270263386890292, 0.03693225979804993, 0.012101462110877037, 0.04388514906167984, 0.014566697180271149, 0.027150630950927734, 0.0013928908156231046, -0.02096441201865673, 0.01170490961521864, -0.01735578291118145, -0.01681382767856121, -0.023132232949137688, 0.016060378402471542, -0.03357478231191635, -0.004335641395300627, -0.005568258929997683, -0.02543223649263382, -0.003387219738215208, -0.054829999804496765, 0.017871301621198654, 0.011942841112613678, -0.0011128255864605308, -0.0009690753067843616, 0.027203505858778954, -0.005208056885749102, -0.0007703859591856599, -0.01746153086423874, 0.024335108697414398, 0.048934586346149445, -0.012213818728923798, 0.01948394812643528, -0.049807000905275345, 0.023515567183494568, -0.016906356438994408, 0.08042085915803909, -0.05321735143661499, -0.003972134552896023, -0.06228518858551979, 0.01001295167952776, 0.00318563892506063, 0.06947600841522217, -0.009074443951249123, -0.004177020397037268, -0.011182782240211964, -0.02722994238138199, -0.026714423671364784, 0.01506899669766426, -0.009953469038009644, 0.005601305048912764, 0.028525346890091896, -0.005819408688694239, 0.024083958938717842, 0.0018538831500336528, 0.07042773067951202, 0.02717706747353077, -0.014447730965912342, 0.030111556872725487, 0.03685295209288597, -0.04444032162427902, -0.033812712877988815, -0.027705805376172066, -0.018056359142065048, -0.07793579250574112, 0.008426741696894169, -0.030983973294496536, -0.01779199205338955, 0.02897477336227894, 0.0197086613625288, 0.030375925824046135, -0.00012330306344665587, -0.006315099541097879, 0.011341403238475323, 0.008406913839280605, 0.0411621555685997, -0.014183362945914268, -0.06582772731781006, 0.011057207360863686, 0.03865065425634384, 0.0718553215265274, -0.011301747523248196, -0.005545126739889383, -0.005898719187825918, 0.03669432923197746, 0.010786229744553566, 0.027811553329229355, 0.04454607143998146, 0.009656054899096489, 0.009081053547561169, -0.020871883258223534, 0.006946278735995293, -0.001014513662084937, 0.012372439727187157, 0.01801670528948307, -0.0015746441204100847, -0.01599428616464138, -0.015637388452887535, 0.00807645358145237, 0.0124715780839324, -0.003902737982571125, -0.04956907033920288, -0.03793686255812645, -0.03717019408941269, 0.06519324332475662, 0.0411621555685997, 0.0033161707688122988, 0.05694494768977165, -0.024216143414378166, 0.004114232957363129, 0.02635752595961094, 0.013410085812211037, -0.03307248279452324, 9.412959479959682e-05, -0.050520796328783035, 0.005138660315424204, -0.004454607143998146, -0.017421875149011612, -0.0019612829200923443, -0.04208744317293167, 0.01227991096675396, 0.03510811924934387, -0.04161158204078674, 0.01356209721416235, 0.026291433721780777, 0.06233806163072586, 0.009074443951249123, -0.019364982843399048, -0.07545073330402374, 0.006295271683484316, 0.013575315475463867, 0.039813876152038574, 0.00021996274881530553, 0.029133394360542297, -0.01097128726541996, -0.0195368230342865, 0.03307248279452324, -0.03843916207551956, 0.018466129899024963, 0.047797802835702896, 0.002380967605859041, 0.010766401886940002, 0.021413838490843773, 0.048617344349622726, 0.005568258929997683, -0.006718261167407036, 0.052159879356622696, 0.03761962056159973, 0.0032979953102767467, -0.020620733499526978, 0.00604412192478776, -0.013628189451992512, 0.013152326457202435, 0.018267855048179626, -0.04153227061033249, 0.0014028046280145645, -0.0015647303080186248, -0.006321708671748638, 0.00594828836619854, -0.019893718883395195, -0.030587419867515564, 0.0334954708814621, 0.012081634253263474, 0.0277322418987751, -0.013092843815684319, 0.029054082930088043, 0.015346583910286427, -0.024810971692204475, 0.046317338943481445, 0.01964256912469864, 0.006325013004243374, -0.004999866709113121, -0.031406961381435394, 0.009292548522353172, -0.002959273522719741, 0.03730237856507301, 0.006794266868382692, 0.05768517777323723, 0.003535927040502429, 0.007831912487745285, -0.05699782073497772, 0.015809228643774986, 0.043700091540813446, -0.04803573340177536, -0.007871568202972412, 0.006847140844911337, 0.017818428575992584, 0.029556384310126305, -0.0024272319860756397, -0.058213915675878525, 0.0017828341806307435, 0.0017828341806307435, -0.015796009451150894, -0.03172420337796211, -0.0255512036383152, -0.044678255915641785, 0.012841693125665188, 0.04687251150608063, 0.008697719313204288, -0.012167554348707199, -0.03143339976668358, -0.04999205842614174, -0.01317876297980547, 0.027058102190494537, 0.01709141582250595, 0.027864426374435425, -0.017977049574255943, -0.04147939756512642, 0.020501766353845596, 0.003045193152502179, -0.03809548169374466, -0.054988618940114975, -0.015452330932021141, 0.01018479187041521, -0.005551735870540142, -0.03336328640580177, 0.03619202971458435, 0.034896623343229294, -0.026925917714834213, -0.022775335237383842, -0.027150630950927734, 0.002549502532929182, -0.015187962912023067, 0.0204092375934124, -0.023766716942191124, -0.0006943800253793597, -0.015320147387683392, 0.014209799468517303, 0.003810209222137928, -0.011956059373915195, -0.002093466930091381, 0.021387401968240738, -0.030640294775366783, -0.011149736121296883, 0.04562998190522194, -0.025366144254803658, -0.002921270439401269, 0.026463273912668228, -0.03772536665201187, 0.02614603191614151, -0.040369048714637756, -0.04280123859643936, -0.036429960280656815, -0.09184157103300095, -0.03656214475631714, -0.05213344097137451, 0.03595409914851189, 0.01768624410033226, -0.00029514249763451517, 0.024493729695677757, -0.00013796724670100957, 0.02025061659514904, 0.022312689572572708, -0.054116204380989075, -0.003787076799198985, -0.014579915441572666, -0.07471050322055817, -0.023013265803456306, 0.04679320007562637, 0.02684660814702511, -0.017183944582939148, -0.008710937574505806, 0.04142652451992035, 0.02047532983124256, -0.03598053380846977, 0.061756450682878494, 0.022907519713044167, 0.00523779820650816, 0.020435674116015434, -0.05152539536356926, -0.012075025588274002, 0.019497167319059372, 0.0054724253714084625, 0.014170144684612751, -0.005624437239021063, -0.003440093481913209, 0.04007824510335922, 0.04192882403731346, 0.003985353279858828, -0.016086814925074577, -0.01588853821158409, -0.07217256724834442, -0.012240255251526833, 0.005072568077594042, -0.04108284413814545, -0.03272880241274834, -0.02778511494398117, 0.014619571156799793, 0.005826017819344997, 0.03563685715198517, -0.02892190031707287, 0.016179343685507774, 0.018743718042969704, -2.3893840989330783e-05, -0.054988618940114975, -0.058055292814970016, 0.0005543474107980728, -0.006338231731206179, 0.024652350693941116, -0.008677891455590725, 0.03450007364153862, 0.03344259783625603, -0.026621894910931587, 0.014540260657668114, -0.024810971692204475, -0.011638817377388477, -0.01018479187041521, -0.02265636995434761, -0.012180772610008717, 0.013225027360022068, 0.00033066701143980026, -0.022233380004763603, 0.011572725139558315, 0.039338015019893646, 0.029556384310126305, 0.039390888065099716, 0.009616399183869362, 0.01296726893633604, 0.01077962014824152, -0.029027646407485008, 0.007091681472957134, 0.046264465898275375, 0.004596705082803965, 0.02881615236401558, -0.02002590335905552, 0.004666101653128862, -0.015505204908549786, 0.005750012118369341, 0.004596705082803965, 0.0015680348733440042, -0.03772536665201187, 0.016800610348582268, 0.008710937574505806, 0.04679320007562637, -0.03693225979804993, 0.008777029812335968, -0.00269490503706038, 0.007137945853173733, 0.0017068282468244433, 0.031142594292759895, 0.05578172579407692, -0.02194257453083992, 0.0038796057924628258, 0.05583459883928299, 0.1138898953795433, 0.009907204657793045, -0.05387827381491661, -0.06640933454036713, 0.03159201890230179, -0.04681963846087456, 0.056521955877542496, 0.030587419867515564, -0.027467872947454453, -0.01522761769592762, 0.0006237440975382924, -0.04161158204078674, 0.0069594974629580975, 0.04634377360343933, -4.4147451262688264e-05, 0.010977896861732006, 0.04676676541566849, 0.048775963485240936, -0.026159249246120453, 0.005968115758150816, 0.00272299419157207, 0.012273301370441914, -0.016959231346845627, -0.03973456472158432, 0.004081186838448048, 0.004471130203455687, -0.035716164857149124, 0.016575897112488747, -0.04073916748166084, 0.04065985605120659, -0.013191981241106987, 0.0347115658223629, -0.07497487217187881, 0.023383382707834244, 0.014368420466780663, 0.02794373594224453, -0.01348278671503067, -0.027547184377908707, -0.07037486135959625, -0.011592552997171879, -0.01758049614727497, 0.05157826840877533, 0.03341616317629814, 0.0008649802766740322, -0.04777136445045471, -0.0258155707269907, -0.05509436875581741, 0.04229893907904625, -0.03164489194750786, -0.0317506417632103, 0.006407628301531076, 0.00018691670265980065, -0.018426476046442986, -0.045709289610385895, 0.05020355433225632, 0.014183362945914268, 0.024929936975240707, -0.04502193257212639, 0.051604706794023514, -0.008195419795811176, -0.011724737472832203, 0.0010070782154798508, 0.027362126857042313, 0.019801190122961998, -0.044889748096466064, -0.01730290986597538, 0.019840845838189125, -0.017593715339899063, -0.02804948389530182, -0.047454122453927994, -0.023872463032603264, 0.014090834185481071, 0.0027692585717886686, 0.013033360242843628, -0.01768624410033226, -0.004785067401826382, -0.0047982861287891865, 0.041400086134672165, 0.029450636357069016, -0.019669007509946823, 0.04195525869727135, 0.02117590606212616, 0.05266217887401581, -0.018637970089912415, -0.037143755704164505, 0.06371277570724487, 0.0156109519302845, -0.0306138563901186, -0.028234541416168213, 0.017699461430311203, -0.07211969047784805, 0.03106328286230564, 0.027058102190494537, 0.0010814318666234612, 0.07434038817882538, -0.029106957837939262, -0.01654946058988571, -2.552032492530998e-05, -0.013760373927652836, 0.013158935122191906, 0.006724870298057795, 0.004081186838448048, -0.007607199717313051, 0.008492833934724331, 0.0024272319860756397, 0.002314875600859523, -0.001741526648402214, 0.06693807244300842, -0.02489028126001358, 0.043250665068626404, 0.013760373927652836, 0.03389202430844307, 0.056310463696718216, 0.010079043917357922, 0.0003688764991238713, -0.011156344786286354, 0.001260706689208746, -0.008552316576242447, -0.021625332534313202, 0.011632207781076431, -0.0008315211161971092, -0.00958335306495428, -0.01801670528948307, -0.02559085749089718, -0.02752074785530567, 0.009570134803652763, -0.0026238560676574707, 0.038624219596385956, 0.0511024072766304, -0.00144328607711941, -0.006106909364461899, 0.010581344366073608, 0.04433457553386688, -0.003516099415719509, 0.0011557855177670717, -0.025286834686994553, -0.007289957720786333, 0.001361497095786035, 0.006539812311530113, 0.009827894158661366, -0.01998624950647354, 0.05757943168282509, -0.008585362695157528, 0.007111509330570698, -0.0007435360457748175, 0.027097757905721664, 0.03159201890230179, -0.006106909364461899, -0.006344840861856937, 0.06566910445690155, 0.012101462110877037, 0.025670168921351433, 0.008254902437329292, -0.0038796057924628258, -0.04163801670074463, 0.01582244597375393, -0.0017068282468244433, 0.015452330932021141, 0.008050017058849335, -0.0039820484817028046, 0.018968431279063225, -0.015108652412891388, 0.03849203512072563, -0.017276473343372345, -0.0047751534730196, 0.022828208282589912, -0.032993171364068985, 0.02593453787267208, 0.011678473092615604, 0.0021546022035181522, -0.008942260406911373, -0.01784486509859562, 0.03978743776679039, -0.014540260657668114, 0.0021529498044401407, 0.012094852514564991, -0.0014201538870111108, 0.007111509330570698, 0.012015542015433311, -0.004834636580199003, 0.025471892207860947, 0.004203456919640303, -0.016404056921601295, 0.011506632901728153, 0.021982230246067047, 0.03973456472158432, -0.016774173825979233, -0.012015542015433311, -0.009656054899096489, 0.015452330932021141, 0.0641886368393898, -0.04245756193995476, -0.050467923283576965, 0.03997249901294708, 0.013985087163746357, 0.016298310831189156, 0.04999205842614174, -0.004907337948679924, -0.03182995319366455, 0.05921851471066475, -0.028075920417904854, 0.007441969588398933, -0.012656635604798794, 0.01632474735379219, 0.012002323754131794, -0.014857502654194832, 0.034077081829309464, -0.05726218968629837, -0.033918462693691254, -0.00815576408058405, -0.029873626306653023, 0.006741393357515335, -0.021360963582992554, -0.027097757905721664, -0.041400086134672165, -0.02091153711080551, 0.011645426973700523, -0.01039628591388464, -0.009788238443434238, 0.03320466727018356, 0.0020819008350372314, 0.007164382841438055, -0.009219846688210964, 0.04214031621813774, 0.018743718042969704, -9.474920807406306e-05, 0.03674720227718353, -0.015055778436362743, -0.008314385078847408, -0.012610371224582195, 0.015386238694190979, 0.04721619188785553, -0.017725899815559387, -0.022616714239120483, 0.0028072616551071405, -0.000620852573774755, -0.020343145355582237, 0.007329612970352173, 0.004656187724322081, -0.029292015358805656, -0.004834636580199003, -0.029952935874462128, -0.0009376815869472921, -0.02046211250126362, 0.02609315887093544, -0.014593133702874184, -0.015901757404208183, -0.001073170336894691, -0.013225027360022068, 0.04092422500252724, 0.014738536439836025, -0.016628770157694817, 0.001217746757902205, 0.02871040441095829, -0.028023047372698784, -0.017382219433784485, 0.023211542516946793, -0.02663511410355568, 0.013462958857417107, -0.010601171292364597, -0.011420713737607002, -0.006645559798926115, 0.028128795325756073, -0.03777823969721794, -0.010178182274103165, 0.021162688732147217, 0.02544545568525791, -0.028736840933561325, 0.014646007679402828, -0.021189125254750252, 0.012352611869573593, 0.007673291955143213, 0.00012196056195534766, -0.0021727774292230606, -0.005260930396616459, -0.011691691353917122, 0.0011194348335266113, -0.0011466977884992957, 0.011566116474568844, 0.0030204085633158684, 0.0019745011813938618, 0.023211542516946793, -0.02073969878256321, 0.0026155945379287004, 0.0001970370503840968, -0.011552897281944752, -0.014289109967648983, -0.0002645749191287905, -0.0114669781178236, 0.002893181284889579, 0.01154628861695528, 0.013852902688086033, 0.015624170191586018, 0.04557710513472557, 0.004930470138788223, 0.0011029117740690708, -0.00010388850932940841, -0.040527671575546265, 0.00957674439996481, 0.01871727965772152, -0.0007195776561275125, 0.0594828836619854, -0.007593981456011534, 0.04925182834267616, 0.03487018868327141, 0.010958069004118443, -0.002303309505805373, 0.013733936473727226, 0.0127756018191576, -0.0002914248325396329, 0.021546022966504097, -0.019470730796456337, -0.0156109519302845, -0.013165544718503952, -0.030983973294496536, -0.01660233363509178, -0.002410709159448743, -0.013191981241106987, 0.02614603191614151, -0.0042464169673621655, -0.011169563978910446, 0.008869558572769165, 0.017064977437257767, -0.01200893335044384, -0.0075675444677472115, 0.03722306713461876, 0.015082215890288353, -0.003483053296804428, 0.035293176770210266, -0.019933374598622322, 0.003724289359524846, 0.008591972291469574, -0.017038540914654732, 0.0493575744330883, -0.03040236234664917, 0.018466129899024963, 0.027758678421378136, -0.014368420466780663, 0.009543698281049728, 0.0013780201552435756, 0.05567597970366478, -0.04153227061033249, -0.034738004207611084, 0.0242425799369812, 0.0516311414539814, 0.020316708832979202, 0.026516146957874298, -0.0076005905866622925, -0.03399777412414551, -0.019246017560362816, -0.018519004806876183, 0.028578219935297966, 0.004553745035082102, -0.030693167820572853, 0.01958969607949257, -0.05120815336704254, 0.007012370973825455, -0.027256378903985023, 0.002257044892758131, -0.021955793723464012, 0.029609257355332375, 0.02128165401518345, -0.013654625974595547, 0.02183682657778263, -0.022008666768670082, -0.02368740551173687, 0.05757943168282509, 0.0012020498979836702, 0.014778192155063152, -0.0017580497078597546, 0.015042560175061226, 0.023753497749567032, 0.020210962742567062, -0.023819589987397194, 0.010059216059744358, -0.009841112419962883, 0.022801771759986877, 0.004884205758571625, 0.010561516508460045, -0.022828208282589912, 0.022392001003026962, -0.04525986313819885, 0.0217178612947464, -0.009669273160398006, -0.014751754701137543, 0.008433351293206215, -0.00027345604030415416, 0.032993171364068985, -0.008036798797547817, -0.02255062200129032, 0.009986515156924725, 0.036271341145038605, -0.0022256511729210615, 0.01697244867682457, -0.023013265803456306, 0.03788398578763008, -0.010944850742816925, 0.02330407127737999, 0.027150630950927734, 0.020396020263433456, -0.0002994797832798213, -0.038888588547706604, -0.011585943400859833, 0.017263254150748253, -0.018902339041233063, 0.00544598838314414, 0.014341983944177628, 0.03487018868327141, -0.020118432119488716, 0.027705805376172066, -0.0028898767195641994, -0.012623589485883713, 0.012167554348707199, 0.013720718212425709, 0.007448578719049692, 0.023185105994343758, -0.022087976336479187, -0.006880186963826418, 0.0026238560676574707, -0.0027940431609749794, 0.013231636956334114, 0.03344259783625603, -0.012973877601325512, -0.006807485595345497, -0.0021760822273790836, -0.0033756536431610584, 0.0019745011813938618, 0.019854065030813217, 0.06577485054731369, -0.06794267147779465, -0.003339302958920598, -0.0022983525414019823, -0.0013961954973638058, 0.014368420466780663, -0.02063395082950592, -0.012319565750658512, 0.0264236181974411, 0.014170144684612751, -0.0105086425319314, -0.011314965784549713, -0.0038663872983306646, -0.02794373594224453, 0.02614603191614151, 0.003489662427455187, 0.011255483143031597, -0.03693225979804993, -0.02952994592487812, 0.030746040865778923, -0.03143339976668358, 0.010462378151714802, -0.0031030236277729273, -0.0664622113108635, 0.027864426374435425, 0.011030769906938076, -0.011837094090878963, 0.009642836637794971, -0.02166498824954033, 0.002266958821564913, 0.0373288132250309, -0.006417542230337858, 0.004692538641393185, -0.04777136445045471, 0.00313772214576602, 0.024361545220017433, 0.018902339041233063, -0.015862101688981056, 0.007911222986876965, 0.016575897112488747, 0.04073916748166084, -0.011116690002381802, 0.04002537205815315, -0.025128213688731194, 0.019113833084702492, -0.011863530613481998, 0.008400305174291134, -0.04208744317293167, -0.02630465291440487, -0.05223919078707695, -0.01208824384957552, 0.0528472363948822, -0.011843702755868435, 0.013529051095247269, -0.02253740280866623, 0.02799661085009575, -0.00943795032799244, 0.016033941879868507, 0.011889967136085033, -0.00013373322144616395, 0.02482418902218342, 0.015386238694190979, 0.030375925824046135, -0.04528630152344704, 0.012431922368705273, -0.013747154735028744, -0.013535660691559315, -0.004527308512479067, 0.035451799631118774, -0.012643417343497276, 0.011757783591747284, 0.00156886107288301, -0.05530586466193199, -0.02085866406559944, 0.003661501919850707, 0.01555807888507843, -0.035716164857149124, -0.043356411159038544, -0.014738536439836025, -0.02047532983124256, 0.036456398665905, -0.00044818699825555086, -0.01047559641301632, 0.02346269227564335, -0.017818428575992584, -0.013826466165482998, -0.03833341225981712, 0.0002542480069678277, 0.015597733668982983, -0.03711731731891632, -0.05007136985659599, 0.013733936473727226, -0.0014978119870647788, 0.035187430679798126, 0.03320466727018356, 0.028075920417904854, -0.026621894910931587, 0.01643049344420433, 0.020343145355582237, 0.020488549023866653, 0.03307248279452324, -0.034579381346702576, -0.009477606043219566, -0.013158935122191906, 0.0009343769634142518, -0.008611799217760563, 0.009715537540614605, -0.04372652992606163, -0.0044083427637815475, -0.026383962482213974, -0.047189753502607346, 0.018955212086439133, 0.00253132707439363, 0.0007274260860867798, -0.010819275863468647, -0.024427637457847595, 0.01773911714553833, 0.032226502895355225, 0.03656214475631714, -0.016496585682034492, -0.019034521654248238, -0.005769839510321617, -0.01394543144851923, -0.00845978781580925, -0.012815256603062153, -0.038624219596385956, -0.0032203372102230787, -0.006946278735995293, -0.0320943184196949, 0.018637970089912415, -0.0018274463945999742, 0.007005761843174696, -0.05535873770713806, -0.03701157122850418, 0.005459206644445658, -0.015108652412891388, 0.002448712009936571, 0.003483053296804428, -0.04163801670074463, -0.023171886801719666, 0.02145349234342575, 0.01378681045025587, -0.030904661864042282, 0.011718127876520157, 0.02331729047000408, 0.05065298080444336, -0.01866440661251545, -0.040633417665958405, -0.014500604942440987, 0.043858710676431656, 0.019576476886868477, 0.031221903860569, 0.05136677250266075, 0.010376458056271076, -0.03500237315893173, -0.011281920596957207, -0.03674720227718353, 0.010911804623901844, 0.0647173747420311, 0.0788346454501152, 0.010178182274103165, 0.029027646407485008, -0.009543698281049728, -0.002569330157712102, -0.005571563262492418, -0.01576957292854786, 0.0020422455854713917, -0.01992015726864338, -0.01329111959785223, 0.011566116474568844, -0.01670808158814907, 0.04983343929052353, -0.01304657943546772, -0.013284510932862759, -0.005260930396616459, -0.005181619897484779, 0.013588533736765385, -0.009477606043219566, -0.030058683827519417, -0.0014928551390767097, -0.018241416662931442, 0.015862101688981056, 0.03666789457201958, -0.02958282083272934, -0.023158669471740723, 0.024057522416114807, 0.006070558447390795, -0.06403002142906189, 0.02717706747353077, -0.02440120093524456, -0.039655257016420364, -0.005601305048912764, -0.04896102100610733, 0.04071272909641266, 0.02222016081213951, -0.02384602651000023, -0.01285491231828928, -0.02871040441095829, -0.015320147387683392, 0.046475958079099655, -0.005627741571515799, -0.001429241499863565, 0.002324789296835661, 0.02391211874783039, 0.025630513206124306, -0.006282053422182798, 0.0044347792863845825, 0.013145716860890388, -0.017659807577729225, -0.020131651312112808, 0.004996562376618385, 0.007104899734258652, -0.0030435407534241676, 0.011863530613481998, 0.013628189451992512, -0.030904661864042282, -0.03743455931544304, -0.006635645870119333, 0.005611218512058258, -0.026027066633105278, 0.026701204478740692, 0.013681063428521156, 0.007527889218181372, -0.04105640947818756, 0.0047949813306331635, 0.008433351293206215, -0.014844284392893314, -0.01468566246330738, -0.0038432551082223654, 0.0060209897346794605, 0.010059216059744358, -0.013588533736765385, -0.007686510216444731, -0.01241209451109171, 0.0014085876755416393, -0.0016266916645690799, -0.0009748583543114364, -0.011129908263683319, 0.022180506959557533, 0.02728281542658806, -0.030111556872725487, -0.02968856878578663, -0.01015174575150013, -0.0162189994007349, 0.02095119282603264, 0.019893718883395195, 0.02570982463657856, 0.02576269768178463, 0.0025957669131457806, 0.045709289610385895, -0.0007625375292263925, -0.018360383808612823, 0.019179925322532654, -0.008823294192552567, -0.011744564399123192, 0.015465549193322659, 0.004943688400089741, -0.0017481358954682946, -0.02942419983446598, 0.029926499351859093, -0.018862683326005936, 0.010211228393018246, 0.002043897984549403, -0.008492833934724331, -0.011744564399123192, -0.0236345324665308, 0.029212703928351402, 0.002708123531192541, 0.025471892207860947, 0.03405064716935158, -0.027203505858778954, 0.0012788820313289762, -0.04346216097474098, -0.0003143505018670112, 0.008387086912989616, 0.004210066050291061, 0.002936141099780798, -0.02177073433995247, 0.006133346352726221, -0.00637127785012126, 0.013377039693295956, 0.03426213935017586, -0.03531961515545845, -0.018135670572519302, -0.008340821601450443, 0.005360068753361702, -0.029715005308389664, 0.023290853947401047, -0.03143339976668358, -0.0277322418987751, 0.0028353508096188307, 0.01206180639564991, 0.008096281439065933, 0.015280491672456264, 0.03711731731891632, -0.043700091540813446, 0.0005229536909610033, 0.022193724289536476, -0.01001295167952776, 0.007012370973825455, -0.005366677884012461, 0.006377886980772018, 0.009530480019748211, 0.023608095943927765, -0.015967849642038345, -0.017765553668141365, -0.03502880781888962, -0.030085120350122452, -0.005555040203034878, 0.04660814255475998, 0.02553798444569111, -0.003668111050501466, -0.005558345001190901, -0.0028089138213545084, -0.004930470138788223, -0.025894882157444954, -0.006149869412183762, -0.00799714308232069, 0.011281920596957207, 0.00013631493493448943, -0.010568125173449516, 0.0062357890419662, -0.005574868060648441, 0.04425526410341263, -0.017567278817296028, 0.0034995763562619686, 0.019232798367738724, 0.020713262259960175, 0.01746153086423874, 0.023185105994343758, 0.009186800569295883, 0.0005080829723738134, 0.00500647583976388, 0.034526508301496506, 0.00996007863432169, 0.009702319279313087, -0.0029724917840212584, 0.004054749850183725, -0.0013193633640184999, 0.018135670572519302, -0.010541688650846481, -0.019893718883395195, -0.040474798530340195, 0.01471209991723299, -0.004768544342368841, 0.015981068834662437, -0.0021678206976503134, 0.016496585682034492, 0.027917299419641495, 0.0036119327414780855, -0.029027646407485008, 0.018029922619462013, 0.0032203372102230787, 0.011956059373915195, 0.020396020263433456, 0.019364982843399048, 0.008129327557981014, -0.023211542516946793, -0.01789773814380169, 0.026172468438744545, -0.034420762211084366, -0.0011962668504565954, 9.578189929015934e-05, 0.02309257723391056, 0.01070030964910984, 0.014077615924179554, 0.013489396311342716, 0.027705805376172066, 0.01018479187041521, -0.014500604942440987, -0.023991430178284645, 0.01220060046762228, -0.006377886980772018, 0.0108589306473732, -0.0077592115849256516, -0.016523022204637527, 0.027203505858778954, 0.03653571009635925, 0.007983924821019173, -0.05958862975239754, 0.02128165401518345, -0.004642969463020563, 0.047084007412195206, 0.01514830719679594, 0.006394410040229559, -0.00027738025528378785, -0.006731479428708553, 0.0018505785847082734, 0.007369268219918013, -0.0016333007952198386, 0.008149155415594578, -0.008631627075374126, 0.005935070104897022, 0.011526460759341717, 0.007501452695578337, -0.030164431780576706, 0.008710937574505806, -0.0059086331166327, -0.025313271209597588, -0.03301960974931717, -0.006814094725996256, 0.0023347032256424427, 0.002597419312223792, 0.03537248820066452, 0.0043092044070363045, 0.03598053380846977, 0.010350021533668041, -0.0012458359124138951, 0.040580544620752335, 0.0030468455515801907, -0.016774173825979233, 0.0182281993329525, -0.010198010131716728, 0.011751173995435238, -0.01525405514985323, -0.004487653262913227, -0.015187962912023067, -0.0230264849960804, -0.020210962742567062, 0.0032748631201684475, 0.01873049885034561, -0.021546022966504097, -0.020752916112542152, -0.005558345001190901, -0.01845291256904602, 0.016800610348582268, -0.008241684176027775, 0.0026916004717350006, 0.0018770154565572739, 0.0001930095604620874, 0.016959231346845627, 0.025419019162654877, 0.020819008350372314, -0.028631094843149185, -0.03235868737101555, 0.011037379503250122, 0.01937820203602314, 0.010303757153451443, -0.004940384067595005, -0.0017018713988363743, -0.036112718284130096, 0.008373867720365524, 0.0004374470445327461, 0.026555802673101425, -0.002473496599122882, -0.01012530829757452, -0.025352926924824715, 0.008102890104055405, 0.021056940779089928, -0.0021298176143318415, -0.026185687631368637, 0.0008732417481951416, 0.006394410040229559, -0.007369268219918013, -0.014434512704610825, -0.017012104392051697, -0.031089719384908676, -0.023660968989133835, -0.029292015358805656, -0.014011523686349392, -0.005911937449127436, -0.023594876751303673, -0.008935650810599327, 0.016575897112488747, -0.014394857920706272, 0.029662130400538445, -0.006919842213392258, -0.010839102789759636, -0.0033905243035405874, 0.001910061459057033, -0.009589962661266327, 0.007706338074058294, 0.007005761843174696, -0.012901176698505878, -0.01746153086423874, 0.03516099229454994, -0.0077592115849256516, 0.014223018661141396, -0.0006873577367514372, -0.02762649394571781, -0.009715537540614605, -0.009259502403438091, -0.010792838409543037, 0.014196581207215786, 0.0048908148892223835, -0.006288662552833557, 0.016800610348582268, -0.005687224678695202, 0.007190819829702377, 0.019404638558626175, -0.018360383808612823, 0.024929936975240707, -0.061439208686351776, -0.006529898848384619, 0.00511883245781064, 0.004457911476492882, 0.02635752595961094, -0.01220060046762228, -0.009847722016274929, 0.020316708832979202, -5.5455395340686664e-05, -0.00303032249212265, -0.06392427533864975, -0.02303970418870449, 0.004206761717796326, 0.020660387352108955, 0.0060540358535945415, 0.005251016933470964, -0.0025676777586340904, -0.024427637457847595, 0.04346216097474098, 0.0277322418987751, -0.022722462192177773, 0.03220006823539734, 0.004847854841500521, -0.012451750226318836, -8.901778346626088e-05, 0.05316447839140892, -0.041505832225084305, -0.0014416337944567204, 0.018162107095122337, -0.01674773544073105, -0.027917299419641495, 0.004117537289857864, -0.01632474735379219, 0.0023826200049370527, 0.02358165942132473, 0.013529051095247269, 0.010158354416489601, -0.027362126857042313, 0.01665520668029785, -0.06519324332475662, -0.028208104893565178, 0.010277320630848408, -0.028366725891828537, 0.0007633636705577374, 0.018241416662931442, -0.0014639399014413357, -0.019338546320796013, -0.01604715920984745, 0.02674086019396782, 0.018690843135118484, 0.041241466999053955, -0.021678205579519272, 0.007501452695578337, 0.024599477648735046, 0.035293176770210266, -0.017778772860765457, -0.007957488298416138, -0.018254635855555534, 0.009986515156924725, -0.0032368602696806192, -0.051446083933115005, -0.038624219596385956, 0.012207209132611752, 0.010964677669107914, -0.015042560175061226, -0.00308980536647141, 0.015412676148116589, -0.0033310414291918278, 0.022140851244330406, -0.037910424172878265, 0.009715537540614605, 0.031354088336229324, 0.004937079269438982, 0.0035194039810448885, 0.03180351480841637, -0.01440807618200779, -0.059800125658512115, 0.01697244867682457, -0.04576216638088226, 0.025789134204387665, 0.019550040364265442, 0.02609315887093544, -0.03775180131196976, -0.0020323318894952536, -0.005898719187825918, -4.776186324306764e-05, 0.0019398028962314129, -0.009748583659529686, 0.015914976596832275, -0.021638551726937294, -0.011348011903464794, -0.02717706747353077, 0.03394489735364914, 0.010905195027589798, 0.018426476046442986, -0.003757335478439927, 0.014447730965912342, 0.013522442430257797, 0.018043141812086105, -0.01479141041636467, 0.028525346890091896, 0.012577325105667114, 0.0210172850638628, 0.01348278671503067, 0.004937079269438982, 0.02194257453083992, -0.02215406857430935, -0.00962961744517088, 0.006807485595345497, -0.019232798367738724, -0.01509543415158987, 0.0020719871390610933, -0.014143708162009716, -0.011671863496303558, -0.0030352792236953974, 0.0028981382492929697, -0.0017861387459561229, -0.006367973051965237, 0.027811553329229355, -0.023951774463057518, 0.05342884734272957, -0.016628770157694817, -0.030428798869252205, -0.03656214475631714, 0.007686510216444731, 0.008023579604923725, 0.03389202430844307, -0.01709141582250595, 0.027970174327492714, 0.00927932932972908, -0.0060507310554385185, 0.016800610348582268, 0.025088557973504066, -0.002944402629509568, -0.008869558572769165, -0.0169195756316185, -0.039047207683324814, -0.004143974278122187, -0.018043141812086105, 0.008578754030168056, -0.004160497337579727, -0.012326175346970558, 0.05615184083580971, 0.008439959958195686, -0.025313271209597588, -0.031909260898828506, 0.005548431072384119, 0.009867548942565918, 0.04869665205478668, -0.02844603732228279, -0.0004013029101770371, 0.008948869071900845, -0.0005270844558253884, -0.027811553329229355, 0.026648331433534622, -0.028736840933561325, 0.007045417092740536, -0.011103471741080284, 0.008611799217760563, -0.0333104133605957, -0.00239583826623857, -0.0027362126857042313, 0.014223018661141396, -0.013733936473727226, 0.024956373497843742, 0.011903185397386551, 0.00035586461308412254, 0.038729965686798096, 0.007356049958616495, 0.03481731563806534, -0.029450636357069016, 0.01479141041636467, 0.00765346409752965, -0.023832809180021286, 0.03547823429107666, -0.005366677884012461, -0.01468566246330738, -0.03116903081536293, -0.027388563379645348, -0.007898004725575447, -0.0359276607632637, 0.04711044207215309, 0.004190238658338785, 0.007772429846227169, 0.0027196896262466908, 0.0011847007554024458, -0.004322422668337822, 0.019034521654248238, -0.00125161895994097, -0.0326230563223362, -0.016417276114225388, -0.047295499593019485, -0.024163268506526947, -0.01653624139726162, 0.020594295114278793, 0.0008269773097708821, 0.048670217394828796, -0.0249431561678648, 0.020316708832979202, 0.010997723788022995, 0.011169563978910446, -0.010766401886940002, -0.013971867971122265, 0.0108589306473732, 0.009953469038009644, -0.020607514306902885, -0.025855226442217827, -0.01669486239552498, -0.016390839591622353, -0.014156926423311234, 0.007838522084057331, -0.01932532712817192, -0.019735097885131836, 0.002410709159448743, 0.02407073974609375, -0.012696291320025921, 0.03291386365890503, 0.028234541416168213], "index": 88}, {"title": "Tsq'altubo", "text": "Tsq'altubo, located in the north of Imereti region of Western Georgia, is a resort situated about 30 km northwest to the city of Kutaisi.et:Tskaltuboka:\u10ec\u10e7\u10d0\u10da\u10e2\u10e3\u10d1\u10ddfi:Tsqaltubo", "vector": [0.014487741515040398, 0.023813346400856972, -0.020972061902284622, -0.0013942692894488573, 0.04062194004654884, 0.004290059674531221, -0.004328740295022726, -0.0056368568912148476, -0.02599354088306427, 0.023166321218013763, 0.005313344299793243, -0.008544954471290112, -0.0009766918374225497, 0.011161187663674355, -0.03448926657438278, 0.014129064977169037, -0.034826844930648804, -0.01925603672862053, 0.022941268980503082, 0.013735223561525345, -0.014656530693173409, 0.008390231058001518, 0.009311539120972157, 0.032688844949007034, -0.01195590291172266, -0.020915798842906952, -0.0248964112251997, -0.007926060818135738, 0.012954573146998882, -0.02237863838672638, -0.04104391485452652, -0.017483750358223915, 0.014072801917791367, 0.006530032958835363, -0.02118304744362831, 0.020381297916173935, -0.02911614067852497, 0.006417506840080023, 0.005608725361526012, 0.016372554004192352, -0.007082114461809397, 0.03828702121973038, 0.006980137899518013, 0.05522220954298973, -0.0030680957715958357, -0.03873712569475174, -0.017638474702835083, -0.008256605826318264, 0.033898502588272095, 0.0034179817885160446, 0.010774378664791584, -0.0040825894102454185, 0.00025692005874589086, 0.00429709255695343, 0.03440487012267113, -0.008066718466579914, -0.009937465190887451, 0.1251290738582611, 0.00907945353537798, 0.016710132360458374, 0.00878407247364521, -0.004912469536066055, 0.01822923682630062, -0.0004303246096242219, 0.04529177397489548, 0.007504087407141924, 0.010830641724169254, -0.01393214426934719, -0.07083521038293839, 0.024769818410277367, 0.04565748572349548, 0.04852690175175667, 0.009065387770533562, 0.010239879600703716, 0.029256798326969147, 0.023939939215779305, -0.0011111957719549537, 0.022336440160870552, -0.005126972682774067, -0.0040192934684455395, 0.005257081240415573, -0.009199013002216816, -0.029960086569190025, 0.0025283219292759895, 0.04034062474966049, 0.03809010237455368, -0.08090630173683167, -0.05443452298641205, 0.015162898227572441, 0.009156815707683563, 0.028764497488737106, -0.02183007262647152, -0.03327960893511772, -0.005577077157795429, -0.029284929856657982, 0.04458848759531975, 0.01925603672862053, 0.016499146819114685, -0.006835963577032089, 0.06661547720432281, 0.011977002024650574, -0.034939371049404144, 0.01669606752693653, 0.011308877728879452, 0.05696636438369751, -0.009163848124444485, 0.03907470405101776, 0.017497817054390907, 0.040790729224681854, 0.03496750071644783, 0.016780462116003036, 0.013988407328724861, -0.022674018517136574, -0.042112912982702255, -0.05828854441642761, -0.014867517165839672, -0.012631060555577278, -0.025135528296232224, -0.011794147081673145, -0.0017801988869905472, -0.03316708281636238, -0.008734842762351036, 0.021154915913939476, -0.028159668669104576, 0.000808781711384654, -0.010999430902302265, 0.00126504001673311, 0.012764684855937958, 0.0037203957326710224, 0.04416651278734207, -0.0012808640021830797, -0.06504011154174805, -0.0099866958335042, -0.008256605826318264, 0.006786733400076628, -0.006132675334811211, -0.009487360715866089, 0.04306938499212265, -0.0023946971632540226, -0.01458620186895132, -0.046979665756225586, 0.020339101552963257, -0.02627485617995262, -0.004202148411422968, -0.058626122772693634, -0.02085953578352928, -0.023110058158636093, -0.028975483030080795, 0.01730089634656906, 0.0016140469815582037, 0.03944041579961777, -0.027160998433828354, -0.02692188136279583, 0.03125413879752159, 0.04093138501048088, 0.06402737647294998, -0.03763999789953232, 0.02981942892074585, 0.006487835664302111, -0.011688653379678726, -0.04301312193274498, -0.020972061902284622, 0.03688044473528862, -0.030382059514522552, 0.05257784202694893, -0.042056649923324585, -0.00936076883226633, 0.04830184951424599, 0.022350506857037544, 0.001958658220246434, 0.03854020684957504, -0.02237863838672638, 0.0009125167271122336, -0.027822090312838554, 0.015008174814283848, -0.008270671591162682, -0.0242353193461895, -0.0041810497641563416, 0.048948876559734344, 0.013116328977048397, -0.04247862100601196, -0.06661547720432281, 0.00919197965413332, -0.010253945365548134, -0.009431097656488419, -0.0050390614196658134, 0.02358829416334629, 0.01910131424665451, 0.07139784097671509, -0.03744307532906532, -0.03626155108213425, 0.01189963985234499, -0.027428248897194862, -0.021745678037405014, 0.009445163421332836, 0.01739935576915741, -0.024474438279867172, 0.07634899020195007, 0.010387570597231388, -0.02402433380484581, -0.022406769916415215, 0.02561376430094242, -0.03432047739624977, 0.006698822136968374, 0.023335110396146774, -0.00018285498663317412, -0.018355827778577805, 0.01679452694952488, -0.005235982593148947, 0.002081733662635088, -0.03960920497775078, -0.019762404263019562, -0.006628493312746286, 0.006681240163743496, 0.04509485512971878, 0.006586296018213034, 0.024333780631422997, -0.035276949405670166, 0.04180346429347992, 0.04962403327226639, 0.060820382088422775, 0.014037637040019035, 0.0021573372650891542, -0.046810876578092575, 0.038990311324596405, 0.01680859364569187, -0.014445544220507145, 0.00407555652782321, -0.003036447800695896, 0.04863942787051201, 0.02232237532734871, -0.036964841187000275, 0.007377495523542166, -0.01904505118727684, -0.02976316586136818, 0.01910131424665451, 0.005837293807417154, -0.01772286929190159, -0.0016843758057802916, 0.001625475357286632, -0.005028512328863144, 0.05043984577059746, 0.0477110855281353, 0.02429158240556717, 0.00206590979360044, 0.009796807542443275, -0.009290440008044243, 0.03398289531469345, -0.023433569818735123, -0.005285212770104408, -0.0054715839214622974, -0.0019252521451562643, 0.025909146293997765, -0.006586296018213034, -0.015134766697883606, -0.02550123818218708, 0.011196351610124111, -0.05274663120508194, -0.006994203664362431, -0.07106026262044907, -0.02298346534371376, -0.007194640580564737, 0.034995634108781815, -0.0407063327729702, 0.01441741269081831, 0.01436114963144064, 0.008741875179111958, -0.020156245678663254, -0.012307547964155674, -0.018918458372354507, -0.00037669888115487993, -0.004979282151907682, 0.023897740989923477, 0.014403346925973892, 0.013418743386864662, 0.04042501747608185, -0.03839954733848572, 0.021028324961662292, -0.011484700255095959, 0.023883674293756485, 0.020592285320162773, -0.021084588021039963, -0.00021867874602321535, 0.04526364430785179, 0.06768447905778885, -0.021900402382016182, 0.020972061902284622, 0.08158145844936371, -0.0033634768333286047, -0.04565748572349548, -0.008059685118496418, 0.026302987709641457, 0.07820567488670349, -0.0029485367704182863, 0.000345490436302498, 0.023180386051535606, -0.008080784231424332, 0.0008795501198619604, 0.0248964112251997, 0.0012369084870442748, 0.04129709675908089, 0.025838816538453102, -0.024713555350899696, -0.012687323614954948, 0.042647410184144974, 0.02970690280199051, 0.01735715940594673, 0.04230983182787895, -0.03173237293958664, -0.00418808264657855, 0.004342806059867144, 0.016020910814404488, -0.04875195398926735, 0.018651209771633148, 0.014129064977169037, 0.019002852961421013, -0.04551682621240616, -0.011618324555456638, -0.09260901808738708, -0.035642657428979874, -0.0013503137743100524, 0.03173237293958664, -0.047964271157979965, -0.03063524328172207, 0.08715150505304337, 0.03184489905834198, 0.00655113160610199, 0.006333112251013517, 0.05845733359456062, -0.0062627834267914295, -0.030128875747323036, 0.007461890112608671, -0.04450409114360809, 0.03108534961938858, 0.03989052027463913, -0.02031097002327442, 0.0017476717475801706, 0.019452957436442375, -0.004191598854959011, 0.04748603329062462, -0.01258182991296053, 0.011020530015230179, 0.044194646179676056, 0.035811446607112885, 0.014185328036546707, 0.006280365865677595, 0.028033077716827393, -0.02341950498521328, -0.00014725101937074214, -0.012068429961800575, 0.0006399924750439823, 0.026907814666628838, -0.032041821628808975, 0.058851175010204315, 0.046698350459337234, 0.007075081579387188, -0.08355066925287247, -0.028483182191848755, 0.05246531590819359, 0.01630222611129284, 0.014129064977169037, -0.017483750358223915, -0.0021801942493766546, 0.015458280220627785, -0.02275841310620308, 0.05752899497747421, 0.02709067054092884, 0.035923972725868225, -0.03676791861653328, 0.005024995654821396, -0.01569739729166031, 0.02523398958146572, -0.03457365930080414, 0.0861387699842453, 0.019284168258309364, -0.032041821628808975, 0.026077935472130775, -0.053984418511390686, 0.04155028238892555, 0.0029327126685529947, -0.028412852436304092, -0.022181717678904533, 0.0355863943696022, -0.012532600201666355, 0.04351948946714401, -0.029200535267591476, -0.014726859517395496, -0.007764304522424936, 0.022420834749937057, 0.0027252426370978355, -0.028145603835582733, 0.043857067823410034, 0.010626688599586487, -0.06616537272930145, 0.015064437873661518, 0.037246156483888626, -0.02510739676654339, -0.009529558010399342, 0.00459598982706666, -0.01061262283474207, 0.03392663225531578, 0.02796274796128273, -0.0531967356801033, 0.030466454103589058, -0.0053414758294820786, -0.025599699467420578, -0.03567079082131386, 0.017005514353513718, -0.03758373484015465, 0.01488158293068409, -0.06549021601676941, -0.06515263766050339, 0.04644516855478287, -0.004965216387063265, 0.02669682912528515, 0.012335679493844509, 0.01228644885122776, 0.017919789999723434, -0.021379968151450157, 0.0007538372883573174, -0.020761074498295784, -0.012631060555577278, -0.030382059514522552, -0.024826081469655037, 0.010753280483186245, -0.008200342766940594, 0.012328646145761013, 0.0034988599363714457, 0.05280289426445961, -0.08495724201202393, 0.028651971369981766, -0.017047710716724396, -0.05238092318177223, 0.005875974893569946, -0.02008591778576374, 0.02544497512280941, 0.024150924757122993, -0.021422166377305984, 0.0018056930275633931, 0.006421023514121771, -0.01834176294505596, -0.0015375643270090222, 0.02917240373790264, 0.0013133911415934563, 0.05992017313838005, 0.01165348943322897, 0.03688044473528862, 0.021914467215538025, 0.041015781462192535, -0.009276374243199825, 0.03983425721526146, 0.06127048656344414, -0.01817297376692295, 0.026063868775963783, -0.012272383086383343, -0.06897853314876556, 0.025979474186897278, 0.04655769467353821, 0.0602014884352684, -0.01914351060986519, -0.001329215127043426, -0.02616233006119728, -0.011562061496078968, -0.06205817312002182, -0.02822999842464924, 0.003941931761801243, -0.035642657428979874, -0.0113581083714962, -0.006438605487346649, 0.030325796455144882, 0.0023226100020110607, 0.026935946196317673, -0.035220686346292496, -0.004736647475510836, -0.03254818916320801, -0.025529369711875916, 0.0028659002855420113, -0.013742255978286266, -0.04039688780903816, 0.044841669499874115, 0.019073182716965675, -0.005914655514061451, 0.024038398638367653, -0.025037068873643875, -0.001607014099135995, 0.04745790362358093, 0.020325034856796265, 0.013728190213441849, 0.015514543280005455, -0.022730281576514244, 0.020972061902284622, 0.019523287191987038, 0.06352101266384125, -0.01800418458878994, 0.008931763470172882, 0.0030505135655403137, -0.05100247636437416, -0.05634747073054314, -0.017202435061335564, -0.024994870647788048, -0.026612434536218643, 0.05209960788488388, -0.01176601555198431, 0.004409618675708771, -0.031000955030322075, -0.019621746614575386, -0.013573466800153255, 0.01356643345206976, -0.03344839811325073, -0.024432240054011345, 0.03150732070207596, 0.02391180582344532, -0.0337015800178051, -0.04323817417025566, -0.024643227458000183, 0.012525566853582859, 0.03960920497775078, -0.028061209246516228, 0.022083256393671036, -0.035642657428979874, -0.00039406129508279264, 0.009086486883461475, -0.03769626095890999, -0.013242920860648155, -0.02665463089942932, 0.00678321672603488, -0.03139479458332062, -0.006456187926232815, 0.017554080113768578, 0.0035639142151921988, -0.036796052008867264, 0.01964987814426422, -0.0007569142035208642, 0.010999430902302265, 0.01717430353164673, 0.01910131424665451, -0.0005652680993080139, -0.060539066791534424, -0.01308116503059864, -0.007511120289564133, -0.01870747283101082, -0.0030839198734611273, -4.2334668250987306e-05, -0.0026338151656091213, -0.01343280915170908, 0.019734272733330727, 0.019002852961421013, -0.010704049840569496, -0.028862956911325455, -0.03474244847893715, 0.02090173214673996, 0.02987569198012352, 0.023222584277391434, 0.02671089395880699, 0.01575366035103798, 0.014107965864241123, -0.003825888969004154, -0.02211138792335987, 0.0005160378641448915, 0.023616425693035126, 0.009902301244437695, 0.011337009258568287, 0.03491123765707016, 0.013889946974813938, -0.01580992341041565, -0.012054364196956158, -0.03744307532906532, -0.029425587505102158, -0.03156358376145363, 0.00018483298481442034, 0.024769818410277367, 0.00244216900318861, 0.011808212846517563, -0.03758373484015465, 0.012406008318066597, 0.004497529473155737, -0.03139479458332062, -0.04689527302980423, -0.015134766697883606, -0.031704243272542953, 0.0035533648915588856, 0.018679341301321983, -0.0026742543559521437, 0.025754421949386597, 0.010879872366786003, -0.0143400514498353, -0.037949442863464355, -0.0008492207853123546, -0.06819084286689758, -0.0172305665910244, -0.017919789999723434, 0.0010654819197952747, 0.0008008697186596692, -0.0034443552140146494, -0.015317621640861034, 0.007701008580625057, 0.024446306750178337, -0.011991067789494991, -0.009789775125682354, 0.01211765967309475, -0.0015823990106582642, 0.03136666491627693, 0.01211765967309475, -0.012019199319183826, -0.03223874047398567, 0.006122125778347254, -0.00592168839648366, 0.02292720228433609, -0.023785214871168137, 0.029313061386346817, -0.0581197552382946, -0.019579550251364708, 0.030269533395767212, -0.019903061911463737, 0.011737884022295475, -0.009733512066304684, 0.008115948177874088, 0.0526341050863266, 0.013524236157536507, -0.03471431881189346, 0.01662573777139187, -0.025023002177476883, -0.0031858966685831547, 0.004986315034329891, 0.03671165555715561, -0.008537921123206615, -0.01569739729166031, -0.025965409353375435, -0.016541343182325363, -0.0003874679678119719, 0.01669606752693653, -0.012891276739537716, 0.07938719540834427, -0.04723285138607025, 0.038765259087085724, 0.015528609044849873, 0.01178711373358965, -0.027836157009005547, 0.0008122981525957584, -0.003528749803081155, 0.0033652351703494787, -0.0034355639945715666, 0.031760506331920624, -0.05980764701962471, -0.011744916439056396, -0.039215363562107086, 0.02484014816582203, 0.04745790362358093, 0.009536591358482838, 0.01422752533107996, -0.06413990259170532, 0.021211178973317146, 0.05738833546638489, 0.015387951396405697, 0.021647218614816666, 0.0026338151656091213, -0.023292912170290947, -0.00027406270965002477, 0.01543014869093895, 0.009325604885816574, -0.049595899879932404, 0.015387951396405697, 0.034995634108781815, 0.02834252454340458, -0.006125642452389002, 0.018946589902043343, 0.008931763470172882, 0.011161187663674355, -0.0016492113936692476, 1.659321060287766e-05, -0.03879338875412941, -0.01680859364569187, -0.02769549936056137, 0.02178787626326084, 0.026359250769019127, -0.005186752416193485, -0.0026742543559521437, -0.03232313692569733, -0.025796620175242424, 0.006442122161388397, 0.006723437458276749, -0.017216501757502556, -0.03471431881189346, 0.02031097002327442, -0.019931193441152573, 0.005517297890037298, -0.0006193333538249135, -0.003430289449170232, 0.04475727677345276, -0.01267325785011053, 0.037611864507198334, 0.021408099681138992, -0.02730165608227253, -0.001967449439689517, 0.007511120289564133, 0.023433569818735123, -0.03434860706329346, -0.00919197965413332, -0.02665463089942932, -0.040734466165304184, -0.010366471484303474, -0.007356396876275539, 0.021000193431973457, 0.018510552123188972, 0.020015588030219078, 0.009156815707683563, -0.0014074560021981597, -0.0022593140602111816, 0.01286314520984888, -0.01023284625262022, -0.011906673200428486, -0.027315722778439522, -0.018468353897333145, 0.04011557251214981, 0.00752518605440855, 0.026668697595596313, 0.02046569250524044, -0.05221213400363922, -0.043969593942165375, 0.05631933733820915, -0.008566053584218025, -0.009213078767061234, -0.06143927574157715, -0.03792131319642067, -0.00327029125764966, 0.03432047739624977, 0.020170312374830246, 0.051733896136283875, 0.014783122576773167, -0.0004134017217438668, 0.0012421831488609314, -0.012567764148116112, 0.02790648490190506, -0.00608696136623621, 0.04166280850768089, 0.0015015208628028631, -0.0344611331820488, -0.011055693961679935, 0.005591142922639847, -0.042703673243522644, 0.04357575252652168, -0.032913897186517715, -0.0189325250685215, 0.019438892602920532, 0.008573086000978947, 0.02385554276406765, -0.026851551607251167, -0.0005683449562638998, -0.02270215004682541, -0.013960275799036026, 0.005861909128725529, -0.03749933838844299, 0.012272383086383343, -0.013826650567352772, -0.03375784307718277, -0.004332256969064474, -0.027315722778439522, 0.00787683017551899, 0.010542294010519981, 0.014206426218152046, 0.016766395419836044, 0.011864475905895233, 0.03704923391342163, -0.004778844770044088, -0.03150732070207596, 0.018398026004433632, -0.020606352016329765, 0.026893749833106995, -0.004110720939934254, -0.028117472305893898, 0.026007605716586113, 0.0405094139277935, 0.03944041579961777, 0.021140851080417633, 0.022533360868692398, -0.020662615075707436, 0.030128875747323036, 0.0006672448944300413, -0.026992209255695343, 0.00936076883226633, 0.037611864507198334, -0.0013371271779760718, -0.002101074205711484, -0.029678771272301674, -0.03311081975698471, -0.046529561281204224, -0.0005815316108055413, -0.011266680434346199, -0.007546284701675177, 0.0420285165309906, 0.00033340268419124186, 0.007729140110313892, -0.0012342712143436074, 0.00900209229439497, -0.014347083866596222, 0.014740925282239914, 0.0401437021791935, 0.007300133816897869, 0.03583957999944687, 0.0030012833885848522, 0.014129064977169037, -0.0012448205379769206, 0.05429386720061302, -0.05691010132431984, -0.0023735985159873962, -0.05013040080666542, -0.001185920089483261, -0.048076797276735306, 0.01430488657206297, 0.03327960893511772, 0.03353279083967209, 0.03643034026026726, 0.014445544220507145, 0.02123931050300598, 0.021633151918649673, -0.008432428352534771, -0.032801371067762375, -0.025360580533742905, 0.013798519037663937, -0.0034724867437034845, -0.006072895601391792, 0.012595895677804947, 0.013249954208731651, -0.005700152833014727, -0.018510552123188972, 0.02341950498521328, 0.043041251599788666, 0.027428248897194862, -0.00791199505329132, 0.012476337142288685, -0.05851359665393829, 0.0013485555537045002, -0.023236649110913277, -0.03229500353336334, 0.0021204145159572363, -0.02599354088306427, -0.044082120060920715, 0.009965596720576286, -0.003045239020138979, 0.0010610864264890552, -0.005981468129903078, 0.006283882074058056, 0.020943930372595787, 0.00787683017551899, 0.03145105764269829, 0.044672880321741104, -0.02166128344833851, -0.021590955555438995, -0.008805171586573124, 0.004546759650111198, 0.028412852436304092, 0.025895079597830772, 0.0019270103657618165, -0.00051647744840011, 0.01575366035103798, 0.012237219139933586, -0.021379968151450157, 0.004068523645401001, 0.03536134213209152, -0.0001274710230063647, 0.04098764806985855, 0.02911614067852497, -0.0038856687024235725, -0.015303555876016617, 0.002074700780212879, -0.02173161320388317, 0.03693670779466629, -0.029088009148836136, 0.0008276825537905097, 0.03792131319642067, -0.02576848864555359, -0.049933478236198425, 0.005510265007615089, 0.021759744733572006, 0.007919027470052242, -0.0012984463246539235, -0.04427903890609741, -0.015387951396405697, -0.025754421949386597, 0.03820262849330902, 0.01772286929190159, -0.004901920445263386, 0.027512643486261368, -0.007250903639942408, -0.007630679290741682, 0.023616425693035126, -0.0401437021791935, 0.0009432855877093971, -0.018960656598210335, 0.011688653379678726, 0.00296084419824183, -0.01586618646979332, -0.0263170525431633, -0.01178711373358965, 0.015613003633916378, -0.017877591773867607, 0.000429225736297667, -0.012574797496199608, 0.005313344299793243, -0.004880821797996759, 0.006343661807477474, -0.04230983182787895, 0.01904505118727684, 0.02243490144610405, -0.01745561882853508, -0.06273332983255386, -0.010197682306170464, -0.004919502418488264, -0.026359250769019127, 0.037189893424510956, -0.023503899574279785, 0.05350618436932564, -0.031000955030322075, -0.01849648542702198, -0.020381297916173935, -0.016935184597969055, 0.03645847365260124, -0.015669265761971474, 0.019467024132609367, 0.042872462421655655, -0.008713743649423122, 0.04290059581398964, 0.0025371129158884287, 0.00911461841315031, -0.018398026004433632, -0.01630222611129284, 0.0035797380842268467, 0.02468542382121086, -0.0014426204143092036, -0.0269781444221735, 0.01663980446755886, 0.017976053059101105, 0.012110627256333828, -0.02002965472638607, -0.019678009673953056, 0.029903823509812355, -0.004603022709488869, 0.003171830903738737, 0.012525566853582859, -0.012708421796560287, -0.0018619560869410634, -0.009381867945194244, -0.02166128344833851, 0.00562279112637043, -0.027667367830872536, 0.008073750883340836, -0.020339101552963257, -0.0023384341038763523, -0.0469515360891819, 0.0412689670920372, -0.005721251480281353, -0.013207756914198399, -0.01647101528942585, -0.013868847861886024, 0.04672648385167122, -0.016386620700359344, -0.0365428663790226, 0.012314580380916595, -0.0420285165309906, -0.03353279083967209, -0.017033645883202553, 0.023827411234378815, 0.011224483139812946, 0.012363811023533344, 0.05494089424610138, -0.020015588030219078, -0.02002965472638607, 0.01652727834880352, -0.01921384036540985, 0.009691314771771431, -0.015880253165960312, 0.01184337679296732, 0.01620376482605934, 0.01898878812789917, -0.024980805814266205, -0.021112719550728798, 0.004775328561663628, -0.020817337557673454, 0.015795858576893806, -0.006582779809832573, 0.02616233006119728, 0.0006457067211158574, 0.017469685524702072, 0.002809637226164341, 0.00936076883226633, 0.020915798842906952, 0.009395933710038662, 0.005520814098417759, 0.01543014869093895, 0.0036430340260267258, 0.03195742517709732, 0.011400305666029453, 0.027104735374450684, 0.034826844930648804, -0.005380156449973583, 0.03797757625579834, 0.015950581058859825, -0.008798138238489628, -0.02709067054092884, 0.012785783968865871, 0.01620376482605934, -0.007328265346586704, -0.013123362325131893, 0.03097282350063324, -0.032970160245895386, -0.04332256689667702, -0.01575366035103798, -0.009297473356127739, 0.010654820129275322, 0.03339213505387306, -0.004304125439375639, 0.03544573858380318, -0.00043340149568393826, -0.027175065129995346, 0.02730165608227253, 0.0056368568912148476, 0.015008174814283848, -0.03108534961938858, 0.007504087407141924, 0.03508002683520317, -0.013671927154064178, -0.04596693068742752, -0.09620986133813858, -0.026823420077562332, -0.006698822136968374, 0.01680859364569187, -0.03119787573814392, -0.011773047968745232, 0.0031911712139844894, -0.022195782512426376, 0.020015588030219078, -0.0004415332805365324, -0.0012852596119046211, -0.012631060555577278, -0.01921384036540985, -0.02762516960501671, 0.0033810590393841267, -0.013151493854820728, -0.005482133477926254, 0.022899070754647255, -0.0024527183268219233, -0.022463032975792885, -0.022125454619526863, -0.00935373641550541, 0.009726478718221188, 0.03153545409440994, -0.028483182191848755, 0.06217069923877716, -0.011104924604296684, 0.03364531695842743, -0.03848394379019737, -0.004022809676826, 0.0027164516504853964, 0.01302490197122097, -0.014136097393929958, -0.024333780631422997, -0.022688085213303566, 0.0070258514024317265, 0.0038751193787902594, 0.020831404253840446, 0.007043433841317892, 0.0016553651075810194, 0.008882532827556133, 0.01482531987130642, 0.0005441694520413876, 0.009438131004571915, 0.023447636514902115, 0.012265350669622421, 0.006568714044988155, -0.004135335795581341, 0.009318571537733078, 0.007082114461809397, 0.04706406220793724, 0.024150924757122993, 0.010795477777719498, -0.030438322573900223, 0.02363049052655697, -0.009318571537733078, -0.005383673124015331, 0.02226611226797104, -0.016133436933159828, 0.021590955555438995, -0.017118040472269058, 0.003458420978859067, -0.031816769391298294, 0.013995439745485783, 0.01948108896613121, -0.009276374243199825, -0.014670596458017826, 0.0060060834512114525, -0.0065581644885241985, 0.007834632880985737, -0.024868279695510864, -0.008910664357244968, -0.015908384695649147, -0.002327884780243039, 0.026499908417463303, 0.0022083257790654898, 0.012265350669622421, 0.026415513828396797, -0.015275424346327782, -0.0053731235675513744, -0.03282950446009636, -0.013868847861886024, 0.011850410141050816, -0.0060025667771697044, 0.025698158890008926, -0.03631781414151192, -0.014178294688463211, -0.025909146293997765, -0.01877780072391033, -0.007658810820430517, -0.018299564719200134, 0.010296142660081387, 0.008038586936891079, 0.005548945628106594, -0.01178711373358965, 0.004979282151907682, 0.013165559619665146, 0.008931763470172882, 0.004617088474333286, 0.016119370236992836, 0.015373884700238705, 0.023560162633657455, -0.015627069398760796, 0.017047710716724396, 0.014572136104106903, -0.01206139661371708, 0.05254971235990524, 0.0076166135258972645, -0.013130394741892815, 0.019832734018564224, 0.0308602973818779, -0.011337009258568287, -0.01881999894976616, -0.023897740989923477, 0.01630222611129284, -0.009402966126799583, 0.0010478997137397528, 0.013911045156419277, -0.003917316440492868, -0.019073182716965675, 0.011147121898829937, 0.0024052464868873358, 0.03755560144782066, -0.0017283313209190965, 0.00024065651814453304, 0.00971241295337677, 0.0005199938896112144, -0.017990117892622948, -0.02796274796128273, -0.0012632817961275578, 0.027386052533984184, 0.021464362740516663, -0.004050941206514835, -0.009325604885816574, 0.044897932559251785, 0.020972061902284622, 0.015908384695649147, -0.005738833453506231, -0.003628968261182308, -0.013151493854820728, -0.018426157534122467, -0.008685612119734287, -0.020972061902284622, -0.02917240373790264, 0.005812678951770067, 0.006670690607279539, 0.006185421720147133, -0.009888235479593277, 0.0230959914624691, -0.010415702126920223, -0.0025986507534980774, -0.008425395004451275, -0.004086105618625879, -0.0012949298834428191, 0.014023571275174618, 0.022181717678904533, -0.006424539722502232, -0.009149782359600067, -0.01690705306828022, -0.0280190110206604, -0.029200535267591476, -0.008059685118496418, -0.0026549138128757477, -0.010464931838214397, 0.019059116020798683, 0.0014118514955043793, 0.0068922266364097595, -0.014515873044729233, -0.027315722778439522, -0.026795288547873497, -0.012933474034070969, -0.017272764816880226, -0.001803934806957841, 0.014965977519750595, 0.0053731235675513744, -0.025304317474365234, -0.0072860680520534515, 0.003115567844361067, 0.012328646145761013, 0.05384376272559166, 0.008755940943956375, -0.01223018579185009, -0.022533360868692398, -0.01821517013013363, -0.0002181293093599379, 0.018412090837955475, -0.023771148175001144, -0.0012140516191720963, 0.01009922195225954, -0.024277517572045326, -0.004690933972597122, -0.005183235742151737, 0.023222584277391434, -0.02959437668323517, -0.012954573146998882, -0.005404771771281958, 0.02424938604235649, 0.012012166902422905, -0.0013626213185489178, -0.012961605563759804, -0.0235742274671793, 0.0007485626265406609, 0.012588863261044025, 0.019115379080176353, -0.02747044712305069, 0.024474438279867172, 0.021703481674194336, -0.039749860763549805, -0.002945020329207182, 0.023166321218013763, 0.03659912943840027, 0.0003788966569118202, 0.021520625799894333, -0.034995634108781815, 0.016878921538591385, 0.024544766172766685, 0.0391872301697731, 0.015387951396405697, 0.032576318830251694, -0.004666318651288748, 0.009501426480710506, 0.02436191216111183, 0.008326934650540352, -0.009072421118617058, 0.04337882995605469, 0.007890895940363407, -0.011716784909367561, -0.030775902792811394, 0.038708996027708054, 0.03282950446009636, 0.018651209771633148, 0.016049042344093323, 0.027175065129995346, 0.03747120872139931, -0.002971393521875143, 0.004979282151907682, 0.018074512481689453, -0.013826650567352772, 0.003987645264714956, 0.019495155662298203, 0.0029344710055738688, -0.0552784726023674, 0.011533929966390133, 0.02468542382121086, 0.012223153375089169, 0.012989737093448639, -0.024826081469655037, -0.02965063974261284, 0.04124083369970322, -0.0020905248820781708, 0.009501426480710506, 0.0010276802349835634, 0.0020325034856796265, 0.02604980394244194, 0.010387570597231388, -0.010239879600703716, 0.04059380665421486, -0.010141419246792793, 0.0053379591554403305, 0.01592244952917099, 0.023517964407801628, -0.0038012738805264235, -0.0049406010657548904, -0.03356092423200607, -0.003664132673293352, 0.010647786781191826, 0.024474438279867172, -0.012553698383271694, 0.015078503638505936, -0.007335298229008913, -0.03820262849330902, 0.04185972735285759, 0.027540775015950203, 0.00752518605440855, 0.04371640831232071, 0.02845505066215992, 0.008052652701735497, 0.03769626095890999, 0.022519296035170555, 0.005953336600214243, 0.018580880016088486, -0.01078141201287508, -0.012884244322776794, -0.00787683017551899, -0.011407338082790375, 0.011161187663674355, -0.020704811438918114, 0.0033898502588272095, 0.010141419246792793, -0.0021854687947779894, -0.009529558010399342, -0.006283882074058056, 0.015303555876016617, 0.01969207637012005, 0.03944041579961777, -0.03420795127749443, -0.014150163158774376, 0.020507890731096268, -0.020015588030219078, -0.025402778759598732, -0.005014446564018726, 0.020943930372595787, 0.005510265007615089, 0.0070258514024317265, 0.028862956911325455, 0.024375976994633675, 0.018412090837955475, 0.03353279083967209, -0.01223018579185009, 0.06526516377925873, -0.0034267730079591274, 6.736184877809137e-05, -0.052887290716171265, -0.015472345985472202, -0.012940507382154465, -0.009719446301460266, -0.01223018579185009, 7.321342309296597e-06, 0.0031472158152610064, -0.008481658063828945, -1.0061695320473518e-05, -0.016456948593258858, 0.008812204003334045, -0.01970614120364189, -0.008200342766940594, -0.0344611331820488, 0.013439841568470001, 0.005130489356815815, -0.012771718204021454, 0.007869797758758068, -0.046642087399959564, 0.005594659596681595, 0.013826650567352772, 0.03156358376145363, 0.022941268980503082, -0.007036400958895683, -0.007272002287209034, -0.025473106652498245, -0.002378873061388731, -0.04155028238892555, -0.019846798852086067, 0.018046380952000618, 0.01141437143087387, -0.009775709360837936, -0.0013371271779760718, -0.02237863838672638, -0.018834063783288002, -0.007588481996208429, -0.009817906655371189, 0.01143546961247921, -0.01327105239033699, 0.005615758243948221, 0.012469303794205189, 0.009881202131509781, 0.0029344710055738688, -0.022097323089838028, -0.04540430009365082, -0.019115379080176353, 0.022519296035170555, 0.029960086569190025, 0.022969400510191917, 0.024263450875878334, 0.03848394379019737, 0.019452957436442375, 0.007008269429206848, 0.017638474702835083, -0.02232237532734871, 0.04098764806985855, -0.0026215077377855778, -0.022139519453048706, 0.017877591773867607, -0.004501046147197485, 0.0051797195337712765, -0.022252045571804047, -0.0140095055103302, -0.012919408269226551, 0.00516916997730732, -0.007567383348941803, 0.0032368849497288465, 0.017371224239468575, -0.009262308478355408, -0.004054457880556583, 0.027667367830872536, 0.02813153713941574, -0.00038856687024235725, -0.02769549936056137, 0.0023841478396207094, -0.01717430353164673, -0.012019199319183826, -0.000520433415658772, 0.011231516487896442, 0.024882344529032707, -0.014909714460372925, -0.008024521172046661, 0.02112678438425064, 0.00642805639654398, -0.06368979811668396, -0.026401447132229805, -0.005795096512883902, -0.024390043690800667, 0.007426725700497627, 0.009923399426043034, 0.012019199319183826, -0.007391561288386583, -0.02550123818218708, 0.0016711890930309892, 0.003991161938756704, 0.028469115495681763, 0.01321478933095932, 0.00888956617563963, 0.006751568987965584, 0.0012158098397776484, -0.02073294296860695, 0.039271626621484756, 0.02118304744362831, -0.004392036236822605, 0.019115379080176353, -0.016724199056625366, 0.02171754650771618, -0.002558211563155055, -0.0032966644503176212, -0.014459609985351562, 0.017469685524702072, -0.009564722888171673, -0.018524616956710815, -0.025093331933021545, -0.016724199056625366, 0.01717430353164673, 0.003625451819971204, 0.011590193025767803, -0.019452957436442375, 0.04214104264974594, -0.00039142396417446434, -0.021478429436683655, 0.017807263880968094, 0.009817906655371189, 0.03856833651661873, 0.015739595517516136, -0.01728682965040207, -0.01387588120996952, -0.02298346534371376, -0.008741875179111958, -0.03381410613656044, -0.023883674293756485, -0.0015920691657811403, -0.015500477515161037, -0.009564722888171673, 0.016006844118237495, -0.004093138501048088, -0.003486552508547902, 0.03440487012267113, 0.022842807695269585, -0.0012202054494991899, 0.005211367271840572, -0.03637407720088959, -0.01395324245095253, 0.02768143266439438, -0.014347083866596222, -0.003062821226194501, -0.013383578509092331, -0.019579550251364708, 0.021408099681138992, -0.02336324192583561, 0.01384071633219719, 0.012588863261044025, 7.763644680380821e-05, -0.022842807695269585, 0.002774472814053297, -0.009388900361955166, -0.030550848692655563, 0.02620452642440796, 0.003917316440492868, 0.003804790321737528, -0.023503899574279785, 0.0061643230728805065, 0.03536134213209152, 0.013967308215796947, 0.01876373589038849, 0.005584110040217638, -0.023321043699979782, 0.017483750358223915, 0.0049441177397966385, 0.013580499216914177, 0.008706711232662201, 0.014614333398640156, -0.006378826219588518, -0.004247861914336681, 0.021914467215538025, -0.0005903227138333023, -0.002486124634742737, 0.034179817885160446, -0.010879872366786003, -0.056881967931985855, -0.021042389795184135, -0.05021479353308678, 0.031873032450675964, 0.04683900997042656, -0.007778370287269354, 0.014951911754906178, -0.005826744716614485, 0.022899070754647255, 0.02112678438425064, -0.008390231058001518, 0.030775902792811394, 0.015387951396405697, -0.011287779547274113, -0.018355827778577805, -0.0011191077064722776, -0.0055700442753732204, -0.020339101552963257, -0.044672880321741104, 0.01680859364569187, 0.03749933838844299, 0.03004448115825653], "index": 89}, {"title": "Fernando Mezzasoma", "text": "Fernando Mezzasoma (August 3, 1907 \u2013 April 28, 1945) was an Italian fascist journalist and political figure.", "vector": [-0.01641802117228508, 0.06070755422115326, -0.025051983073353767, 0.02358151227235794, 0.0010480484925210476, 0.007831274531781673, -0.03485962748527527, -0.00838438794016838, -0.027237456291913986, 0.02827622927725315, -0.03990509733557701, 0.030893398448824883, -0.038636986166238785, -0.021719813346862793, -0.010084198787808418, -0.0015471994411200285, -0.10468680411577225, 0.00937594473361969, -0.04001302272081375, -0.041065286844968796, 0.014300001785159111, -0.021760284900665283, -0.014907076954841614, -0.008465331047773361, -0.02073500119149685, 0.026104247197508812, 0.00945014227181673, 0.012289906851947308, 0.01281603891402483, 0.012330378405749798, 0.024040190503001213, 0.003919009584933519, 0.008472076617181301, -0.009348963387310505, 0.012242689728736877, -0.03809736296534538, 0.029814153909683228, 0.038556043058633804, 0.016957642510533333, 0.03523736074566841, 0.020276322960853577, -0.007345614023506641, 0.031406041234731674, 0.009531085379421711, -0.041065286844968796, -0.024768682196736336, -0.031298115849494934, -0.033375661820173264, -0.027291417121887207, -0.0004222125862725079, 0.0425492487847805, -0.003949363715946674, -0.04621868208050728, 0.03726094588637352, 0.002170294988900423, -0.04030981659889221, 0.0382862314581871, 0.013787359930574894, -0.0465424582362175, 0.002617170102894306, 0.0037335145752876997, -0.045652080327272415, -0.020586606115102768, -0.01626962423324585, -0.019601793959736824, 0.02339264377951622, -0.007541227154433727, -0.019075661897659302, 0.04451887309551239, -0.03664037957787514, -0.005025236401706934, 0.045571137219667435, 0.056768305599689484, -0.020451700314879417, -0.011021793819963932, -0.013173539191484451, 0.012559718452394009, -0.0047958968207240105, -0.08580000698566437, -0.01057660486549139, 0.0022782194428145885, -0.043115854263305664, -0.02811434306204319, 0.03796245530247688, 0.003418172476813197, 0.0030606724321842194, -0.04732491075992584, -0.04638057202100754, -0.056768305599689484, 0.0006644104141741991, -0.024890096858143806, -0.011197171173989773, -0.011075755581259727, 0.010414717718958855, 0.03755773976445198, -0.009989765472710133, 0.028653964400291443, 0.009335472248494625, -0.01838764362037182, -0.03904170170426369, -0.04138905927538872, -0.013544529676437378, -0.024161605164408684, -0.0033051890786737204, 0.05541925132274628, 0.046407550573349, -0.01601330377161503, -0.019224058836698532, 0.043223775923252106, 0.0685320794582367, 0.05088641867041588, -0.0330788716673851, 0.004812759812921286, 0.017146511003375053, -0.010090944357216358, -0.026266135275363922, -0.022205473855137825, 0.01670132204890251, -0.0382862314581871, -0.024957548826932907, 0.05420510098338127, -0.047972455620765686, 0.054501891136169434, 0.043547552078962326, 0.017106039449572563, 0.012323632836341858, -0.04055264592170715, 0.0006011733785271645, -0.003032004926353693, -0.04055264592170715, 0.03564208000898361, 0.010097689926624298, 0.04179377853870392, -0.03723396733403206, -0.02806038036942482, 0.024390945211052895, -0.03437396511435509, 0.022353870794177055, 0.0027014859952032566, 0.028977738693356514, 0.043034911155700684, 0.01397622749209404, -0.007588444277644157, -0.006954387295991182, 0.024620285257697105, -0.02364896424114704, 0.015932360664010048, -0.0027621935587376356, -0.013767124153673649, -0.026603398844599724, 0.03744981437921524, -0.038259249180555344, 0.011966133490204811, -0.00941641628742218, 0.0044552600011229515, -0.045786984264850616, -0.05892679840326309, 0.0003859566932078451, 0.029490379616618156, -0.04451887309551239, -0.016863208264112473, 0.00401681661605835, 0.011075755581259727, 0.040714532136917114, 0.008526038378477097, -0.033672455698251724, 0.015689529478549957, 0.013780614361166954, 0.026616889983415604, 0.031513966619968414, -0.026576418429613113, -0.0040876418352127075, 0.010421463288366795, 0.005972948856651783, 0.019777171313762665, -0.0020404483657330275, -0.011547925882041454, -0.0025783847086131573, -0.045463211834430695, 0.013396133668720722, 0.033699437975883484, 0.017497265711426735, 0.007325378246605396, -0.01286325603723526, -0.04441094771027565, 0.06302793323993683, 0.031325098127126694, 0.01618868112564087, -0.0010008314857259393, -0.05876491218805313, -0.02321726642549038, 0.04969925060868263, 0.021800756454467773, 0.01872490718960762, -0.004978019278496504, 0.016795756295323372, 0.03548019379377365, -0.03569604083895683, -0.014907076954841614, -0.06281208246946335, 0.01505547296255827, 0.03345660865306854, 0.020073963329195976, 0.028842832893133163, -0.010124670341610909, 0.03326774016022682, -0.002854941412806511, 0.017807548865675926, -0.03440094739198685, 0.03005698323249817, 0.03467075899243355, -0.04457283392548561, 0.06896378099918365, 0.025078965350985527, 0.004293372854590416, -0.009915567003190517, -0.0020404483657330275, -0.011021793819963932, 0.034050192683935165, 0.04662340134382248, -0.0053523825481534, -0.004863349720835686, -0.06551019847393036, -0.008944245986640453, -0.012411321513354778, 0.008829575963318348, 0.032269436866045, 0.01420556753873825, -0.0002618013240862638, 0.05328774079680443, -0.009861604310572147, 0.016917170956730843, -0.03324075788259506, 0.04942943900823593, 0.0032866394612938166, 0.06351359188556671, -0.031190192326903343, -0.061624910682439804, -0.05185773968696594, 0.04932151362299919, -0.028600003570318222, 0.07754378020763397, -0.02362198382616043, 0.0068093640729784966, 0.00027782138204202056, -0.008795849978923798, -0.05293698608875275, -0.03232339769601822, -0.03936547413468361, -0.008674434386193752, 0.00032988653401844203, -0.04913264513015747, -0.01655292697250843, 0.003713278565555811, 0.006276486441493034, -0.019197076559066772, 0.01151419896632433, 0.0020370755810290575, -0.028896795585751534, 0.020181888714432716, -0.007993160746991634, -0.010542877949774265, 0.02846509777009487, -0.013423114083707333, -0.013611982576549053, 0.005760472267866135, -0.010266321711242199, 0.0024030073545873165, -0.022583208978176117, -0.015500661917030811, -0.02316330373287201, -0.013699671253561974, 0.04959132522344589, -0.007494010031223297, -0.02579396404325962, -0.01852254942059517, -0.04198264703154564, 0.03256623074412346, -0.001146698254160583, -0.00233049551025033, 0.030893398448824883, -0.018104340881109238, 0.007912217639386654, -0.019305001944303513, -0.002693054499104619, 0.0211397185921669, -0.02768264338374138, -0.01838764362037182, 0.02099132351577282, -0.01415160484611988, -0.0232037752866745, -0.015743492171168327, -0.024175096303224564, -0.01875188946723938, 0.0006091834511607885, 0.00017643132014200091, 0.0333486832678318, -0.017362359911203384, 0.008640708401799202, 0.029328493401408195, 0.008984717540442944, 0.047972455620765686, 0.031406041234731674, -0.031864721328020096, 0.029463399201631546, -0.024080662056803703, 0.02572651207447052, 0.03893377631902695, 0.021625379100441933, 0.0031078895553946495, -0.019331982359290123, 0.01898122765123844, -0.012586698867380619, -0.002467087469995022, -0.014731699600815773, -0.017969435080885887, 0.01590537838637829, -0.04508547484874725, -0.006117972079664469, -0.006310212891548872, -0.03021887131035328, -0.026239152997732162, -0.05806340277194977, -0.003517665434628725, -0.028600003570318222, -0.03310585394501686, -0.0014536086237058043, -0.01844160631299019, 0.018239246681332588, 0.02099132351577282, 0.036235664039850235, -0.024377455934882164, 0.03947339951992035, -0.002736898837611079, 0.010515897534787655, 0.015527643263339996, -0.02533528581261635, 0.08202265202999115, 0.0012343869311735034, -0.006667712703347206, -0.010650803335011005, 0.05104830488562584, -0.04505849629640579, 0.006134835537523031, 0.01415160484611988, 0.02364896424114704, 0.08849812299013138, 0.022421322762966156, 0.03526434302330017, 0.014313491992652416, 0.00033094047103077173, 0.004465377889573574, 0.0032208729535341263, 0.03960830718278885, -0.004563184455037117, 0.008580001071095467, -0.01663387008011341, -0.038663964718580246, -0.009348963387310505, -0.014178586192429066, -0.010367500595748425, 0.019952548667788506, 0.03904170170426369, 0.027035096660256386, 0.009510849602520466, -0.008586745709180832, 0.007865000516176224, 0.01272835023701191, -0.004155094735324383, 0.038798872381448746, 0.015864906832575798, 0.007811038289219141, -0.004779033362865448, -0.026239152997732162, 0.0473518930375576, -0.057631704956293106, 0.03286302089691162, 0.002971297362819314, -0.04260321334004402, 0.005797571502625942, 0.008559765294194221, -0.012134765274822712, -0.01536575611680746, 0.017281416803598404, -0.014596793800592422, -0.012930708937346935, -0.043088871985673904, -0.006772264838218689, -0.019709719344973564, -0.012883491814136505, -0.014259529300034046, 0.017348868772387505, 0.03790849447250366, -0.028653964400291443, -0.008640708401799202, 0.0015691216103732586, 0.027089059352874756, 0.04969925060868263, -0.01610773801803589, 0.00020225311163812876, 0.01635056734085083, -0.017092548310756683, 0.04408717527985573, 0.040741514414548874, 0.03067754954099655, -0.009133114479482174, -0.029139624908566475, 0.009902076795697212, -0.02302839793264866, 0.03024585172533989, -0.022826040163636208, -0.005743608810007572, 0.02795245498418808, -0.0040640332736074924, -0.014556322246789932, -0.019871605560183525, 0.026630379259586334, -0.004974646493792534, 0.01411113329231739, -0.043412644416093826, 0.019547831267118454, 0.0036424531135708094, -0.006573278922587633, 0.000606653920840472, 0.08277811855077744, 0.03731491044163704, -0.029274530708789825, -0.009564812295138836, -0.0062967222183942795, -0.011898680590093136, 0.008681179955601692, -0.0028836086858063936, -0.00209441059269011, 0.019210567697882652, 0.04816132411360741, -0.05844113603234291, 0.01034726481884718, -0.01277556736022234, 0.010509151965379715, -0.00806735921651125, 0.02364896424114704, -0.03245830535888672, 0.01536575611680746, 0.024283021688461304, -0.1029600128531456, -0.003337229136377573, 0.01888679340481758, -0.03197264298796654, -0.009160094894468784, 0.03793547675013542, -0.07317283749580383, -0.06351359188556671, 0.014502359554171562, 0.018050378188490868, 0.06006000563502312, -0.047648683190345764, 0.06124717369675636, 0.007689623162150383, -0.029058681800961494, 0.022758586332201958, 0.014219057746231556, 0.04522038251161575, 0.02364896424114704, -0.017186982557177544, 0.015703020617365837, -0.02590188942849636, 0.03674830496311188, 0.015864906832575798, -0.029490379616618156, 0.024768682196736336, -0.009470378048717976, 0.05833321437239647, 0.020168397575616837, -0.012438302859663963, 0.04629962518811226, 0.03526434302330017, -0.02598283253610134, 0.035965852439403534, -0.001569964806549251, 0.0039932080544531345, -0.02351405844092369, -0.006580024026334286, 0.017969435080885887, 0.036127738654613495, 0.009517595171928406, -0.04961830750107765, -0.020289814099669456, 0.009800896979868412, -0.054744720458984375, 0.019574813544750214, 0.038421135395765305, 0.04411415383219719, -0.027372360229492188, 0.004195566289126873, -0.03518339991569519, 0.06032981723546982, 0.022097548469901085, 0.005558113567531109, -0.025038493797183037, 0.005753727164119482, 0.01859000138938427, 0.035938870161771774, 0.047783590853214264, -0.02309585176408291, 0.022272925823926926, 0.0021399413235485554, 0.036019813269376755, -0.003320365911349654, -0.021733304485678673, 0.00936919916421175, 0.028438115492463112, 0.03931151330471039, 0.02833019196987152, 0.0026660733856260777, -0.029409436509013176, -0.03591189160943031, -0.006225896999239922, -0.008822831325232983, 0.01840113289654255, 0.02564556896686554, 8.278781751869246e-05, -0.015217360109090805, 0.038421135395765305, 0.0022057078313082457, 0.04209056869149208, -0.031621888279914856, -0.05158792808651924, -0.0063237035647034645, -0.036100756376981735, -0.008411368355154991, -0.02541622892022133, 0.017308397218585014, -0.010913869366049767, 0.029841134324669838, -0.016849718987941742, 0.012411321513354778, -0.03558811545372009, 0.014057171531021595, 0.01513641607016325, -0.029868116602301598, 0.015878397971391678, 0.011844717897474766, -0.01633707620203495, -0.034023210406303406, -0.006934151519089937, 0.022542737424373627, -0.009618774056434631, -0.03243132308125496, 0.027453305199742317, -0.036397550255060196, 0.02770962566137314, 0.0026003068778663874, -0.003215814009308815, 0.010198868811130524, 0.010178633034229279, -0.012330378405749798, -0.026198681443929672, 0.052316419780254364, -0.016957642510533333, 0.014003208838403225, 0.024067172780632973, -0.014569812454283237, 0.013746888376772404, 0.0018060497241094708, -0.011541180312633514, 0.03073151223361492, -0.041065286844968796, -0.020424718037247658, -0.02368943579494953, -0.049834154546260834, 0.04176679626107216, 0.01599981263279915, 0.006677830591797829, -0.019966039806604385, -0.0305426437407732, 0.022812549024820328, 0.04646151512861252, 0.012161746621131897, 0.01187844481319189, -0.03073151223361492, 0.009436652064323425, -0.059412457048892975, 0.002231002552434802, 0.04360151290893555, 0.02091037854552269, -0.0010615390492603183, -0.014124623499810696, 0.007844764739274979, 0.004836368374526501, 0.027156511321663857, 0.035750001668930054, -0.008141557686030865, 0.024458399042487144, 0.02331170067191124, 0.027520757168531418, 0.05693019554018974, -0.006576651707291603, -0.020519152283668518, 0.005436698440462351, 0.007925707846879959, 0.00027697821496985853, 0.029058681800961494, -0.005949340295046568, -0.03531830385327339, 0.036262646317481995, -0.02364896424114704, -0.012532737106084824, -0.009045425802469254, -0.014434906654059887, -0.018117832019925117, 0.0301379282027483, -0.027264436706900597, -0.01398971863090992, 0.03197264298796654, 0.0376117005944252, -0.01039448194205761, 0.0019342100713402033, -0.0042090569622814655, 0.018306700512766838, 0.007345614023506641, -0.006239387206733227, 0.004293372854590416, 0.019871605560183525, 0.016687830910086632, -0.009335472248494625, 0.019264530390501022, 0.01639103889465332, 0.03696415573358536, -0.01625613309442997, 0.019777171313762665, -0.030003022402524948, 0.028950758278369904, -0.014515850692987442, -0.012397831305861473, 0.03221547603607178, 0.0037436324637383223, 0.01834717206656933, -0.03699113428592682, 0.004910566378384829, -0.047756608575582504, 0.0032259318977594376, -0.026279624551534653, 0.001765577937476337, -0.052424345165491104, -0.019480379298329353, 0.013079104945063591, 0.006647476926445961, -0.028384152799844742, -0.033969249576330185, 0.03248528763651848, -0.0006547140656039119, -0.04678528755903244, 0.012357359752058983, 0.007190472446382046, 0.031028304249048233, -0.010219104588031769, -0.02092386968433857, 0.024175096303224564, 0.01040122751146555, 0.015622076578438282, 0.014893586747348309, -0.027547737583518028, 0.012020095251500607, 0.041065286844968796, -0.022906983271241188, 0.029625285416841507, -0.019750190898776054, 0.006256250664591789, -0.017470285296440125, -0.022920474410057068, 0.050130948424339294, -0.024323493242263794, -0.0070285857655107975, -0.0006568219978362322, -0.03329471871256828, -0.024768682196736336, 0.01639103889465332, -0.0332137756049633, -0.009301746264100075, 0.02360849268734455, 0.052856042981147766, 0.027439814060926437, 0.011224151588976383, 0.012647407129406929, -0.03952736034989357, 0.006067382637411356, -0.01837415248155594, 0.0369371734559536, 0.03299792855978012, -0.0011416393099352717, 0.0030994578264653683, -0.004610401578247547, 0.017294907942414284, 0.031163210049271584, 0.02768264338374138, -0.0028701182454824448, -0.004822877701371908, -0.061948686838150024, -0.0015902005834504962, 0.006016793195158243, 0.014421416446566582, 0.019642265513539314, -0.014839624054729939, 0.01653943583369255, 0.003456957871094346, -0.005241085309535265, 0.005433326121419668, -0.0005438384832814336, -0.02819528616964817, -0.043061889708042145, 0.0027621935587376356, -0.014407926239073277, 0.019561322405934334, -0.009922312572598457, -0.017875000834465027, -0.04039075970649719, -0.009335472248494625, -0.0127688217908144, -0.021908681839704514, 0.015810944139957428, 0.029706228524446487, 0.03906868398189545, -0.00922754779458046, -0.008175283670425415, -0.06394528597593307, 0.026859719306230545, 0.006799245718866587, -0.01639103889465332, 0.012330378405749798, 0.01397622749209404, 0.006134835537523031, 0.02565905824303627, 0.005517642013728619, 0.008930755779147148, -0.002433361019939184, 0.015176888555288315, -0.01049566175788641, -0.05191170424222946, -0.004225920420140028, -0.016876699402928352, 0.007966180332005024, 0.015082454308867455, 0.006816109176725149, -0.03995906189084053, -0.03048868291079998, 0.006667712703347206, 0.0014325296506285667, 0.004239410627633333, 0.024512359872460365, 0.02797943726181984, 0.007352359127253294, -0.019912077113986015, -0.027250945568084717, 0.008984717540442944, -0.017888491973280907, -0.03008396551012993, 0.015568114817142487, -0.061948686838150024, -0.01670132204890251, 0.03283604234457016, -0.001235230010934174, -0.014043680392205715, -0.014569812454283237, 0.05191170424222946, -0.03262019157409668, 0.015433209016919136, -0.010886888019740582, -0.057361893355846405, -0.015703020617365837, -0.0006188797997310758, -0.002495754975825548, -0.023864813148975372, 0.0284111350774765, 0.010016745887696743, 0.0024417927488684654, -0.024363964796066284, 0.029517361894249916, -0.011332076974213123, -0.009011698886752129, 0.027520757168531418, -0.06313585489988327, 0.008789104409515858, -0.048215288668870926, 0.01393575593829155, -0.033888306468725204, -0.02795245498418808, -0.013247736729681492, -0.017443303018808365, -0.009618774056434631, -0.005726745817810297, -0.02132858708500862, 0.02131509594619274, -0.007986416108906269, -0.031756795942783356, -0.01903519034385681, -0.026171701028943062, 0.004974646493792534, 0.008256226778030396, -0.020087454468011856, -0.027439814060926437, -0.04978019371628761, -0.030812455341219902, 0.04004000499844551, 0.06113925203680992, 0.031271133571863174, 0.0017419694922864437, -0.03494057059288025, 0.0029409436974674463, -0.041146229952573776, -0.023972738534212112, -0.00824273657053709, 0.03588490933179855, -0.007676132954657078, 0.036343589425086975, -0.010880142450332642, 0.033780381083488464, -0.025159908458590508, -0.02797943726181984, -0.02542972005903721, 0.015595096163451672, 0.011662594974040985, 0.011332076974213123, -0.02569952979683876, 0.033591512590646744, 0.015851415693759918, 0.022259436547756195, 0.008748632855713367, -0.02074849233031273, -0.004961156286299229, -0.016957642510533333, 0.017375851050019264, -0.014812642708420753, -0.0326741524040699, -0.03245830535888672, -0.011669340543448925, 0.03952736034989357, 0.04926755279302597, -0.0036424531135708094, 0.022475285455584526, 0.033996228128671646, -0.006849835626780987, -0.013335425406694412, -0.04888981580734253, 0.0003737308725249022, -0.00699485931545496, 0.03701811656355858, -0.020168397575616837, -0.05380038172006607, -0.022745097056031227, -0.06059962883591652, 0.024377455934882164, 0.009166840463876724, 0.0130386333912611, -0.008053869009017944, 0.020438209176063538, -0.003895401256158948, -0.008755378425121307, 0.001345684053376317, 0.03914962708950043, 0.019426416605710983, -0.0019325237954035401, 0.004610401578247547, -0.026117738336324692, -0.030974343419075012, 0.011325331404805183, -0.04357453063130379, -0.02337915264070034, -0.033699437975883484, -0.020546134561300278, -0.05072453245520592, -0.009585048072040081, -0.017173491418361664, 0.015082454308867455, -0.01590537838637829, -0.02335217222571373, 0.011952642351388931, -0.024512359872460365, -0.000516435771714896, 0.03709905967116356, 0.013504058122634888, 0.03534528613090515, 0.05908868461847305, 0.003571627661585808, -0.022272925823926926, 0.01875188946723938, 0.020532643422484398, -0.001698968349955976, 0.02370292693376541, -0.029571322724223137, 0.01635056734085083, -0.014610284008085728, 0.008775614202022552, -0.007736840285360813, -0.03429302200675011, 0.004171957727521658, 0.0009628892294131219, 0.01657990738749504, 0.0029190215282142162, -0.06448490917682648, -0.04033679515123367, -0.01403019018471241, -0.014812642708420753, 0.049834154546260834, 0.0014611970400437713, 0.033645473420619965, 0.0027605073992162943, 0.027358870953321457, -0.017524246126413345, 0.010124670341610909, -0.03583094850182533, 0.01066429354250431, -0.033834341913461685, -0.0010354010155424476, 0.010772217996418476, -0.06318981945514679, 0.033753398805856705, -0.026333587244153023, -0.0027976064011454582, 0.027291417121887207, -0.017686134204268456, 0.03029981441795826, -0.027534248307347298, 0.026832738891243935, 0.004381061531603336, -0.012148255482316017, -0.020195379853248596, 0.00023566334857605398, 0.04381736367940903, 0.019507359713315964, -0.0070960381999611855, -0.0063000950030982494, -0.003693042788654566, 0.014192076399922371, -0.0027402713894844055, -0.026266135275363922, -0.021760284900665283, -0.021436510607600212, 0.0036053541116416454, -0.007386085577309132, -0.006738538388162851, 0.022731605917215347, 0.03065056912600994, 0.03008396551012993, 0.019669247791171074, -0.00812132190912962, -0.031621888279914856, -0.031567927449941635, -0.036046795547008514, -0.022165002301335335, 0.051614910364151, -0.005338891874998808, -0.022664153948426247, -0.012269671075046062, -0.01040122751146555, 0.013962737284600735, 0.017227454110980034, -0.012134765274822712, 0.006158444099128246, 0.0425492487847805, 0.00040071201510727406, -0.009983019903302193, 0.017794057726860046, -0.021935662254691124, -0.0015733373584225774, -0.04408717527985573, -0.01614820957183838, 0.004505849443376064, -0.015176888555288315, 0.01505547296255827, 0.031190192326903343, -0.06043774262070656, 0.033753398805856705, 0.022596700116991997, -0.014839624054729939, -0.010934105142951012, -0.00470483535900712, 0.024094153195619583, 0.0321345329284668, -0.014907076954841614, 0.009483869187533855, -0.016903681680560112, 0.024620285257697105, 0.007406321354210377, 0.01633707620203495, -0.0008486409788019955, 0.015716511756181717, -0.024687739089131355, -0.012114529497921467, 0.033807363361120224, 0.013308444991707802, -0.006397901568561792, 0.031513966619968414, 0.01519037876278162, -0.00955132208764553, 0.017483774572610855, 0.007858255878090858, 0.026954153552651405, -0.0011163444723933935, -0.014124623499810696, 0.008593491278588772, -0.015203868970274925, -0.02587490901350975, -0.029517361894249916, -0.02833019196987152, -0.043196797370910645, -0.0007402948685921729, 0.007264670450240374, -0.0032175004016608, 0.006856580730527639, 0.03038075752556324, 0.001789186499081552, 0.011298350058495998, 0.02571302093565464, 0.01864396408200264, 0.020519152283668518, -0.03968925029039383, 0.014947548508644104, 0.03046170063316822, -0.0013684494188055396, 0.04424906149506569, 0.0028094106819480658, -0.011122972704470158, -0.0026036794297397137, 0.019426416605710983, -0.015851415693759918, 0.0330788716673851, -0.02822226658463478, -0.006074127741158009, -0.012101039290428162, -0.006627241149544716, 0.019251039251685143, 0.022326888516545296, 0.006016793195158243, 0.02368943579494953, -0.05860302597284317, 0.022650662809610367, -0.00465761823579669, 0.014880095608532429, -0.007851510308682919, -0.0118379732593894, -0.01036075595766306, -0.02534877508878708, -0.00838438794016838, -0.009052170440554619, 0.0080336332321167, -0.045544154942035675, -0.0037065334618091583, -0.018212266266345978, 0.022853020578622818, -0.031729813665151596, 0.0007141568930819631, 0.02111273817718029, -0.015810944139957428, -0.009780661202967167, 0.010131415911018848, 0.011399528943002224, -0.03688321262598038, -0.033915285021066666, -0.02575349248945713, 0.01643151044845581, 0.029355473816394806, -0.029949059709906578, -0.015257831662893295, -0.01892726682126522, 0.01608075574040413, 0.029706228524446487, 0.03310585394501686, 0.033780381083488464, 0.04022887349128723, -0.011851463466882706, -0.008795849978923798, -0.0020185261964797974, -0.050346795469522476, 0.014583303593099117, 0.019224058836698532, 0.0017352242721244693, -0.0010075767058879137, -0.029004719108343124, 0.012350614182651043, -0.029031701385974884, 0.07792151719331741, -0.012836274690926075, -0.03048868291079998, -0.001827971893362701, -0.004354080650955439, 0.0370720773935318, -0.013713161461055279, -0.0030286323744803667, -0.03502151370048523, -0.006357430014759302, -0.005561486352235079, 0.02541622892022133, 0.010765472427010536, -0.005625566467642784, -0.0029628658667206764, -0.00174871482886374, 0.008944245986640453, -0.05218151584267616, 0.000813649850897491, 0.027277927845716476, -0.0018347171135246754, -0.03208056837320328, 0.004205684177577496, -0.033699437975883484, 0.03065056912600994, -0.0066879489459097385, -0.0032815805170685053, -0.0008962795836851001, -0.031406041234731674, 0.02827622927725315, -0.02352754957973957, -0.002190530765801668, 0.0067823827266693115, 0.023905284702777863, -0.0047925240360200405, 0.011891935020685196, -0.004397924989461899, 0.0005750354030169547, -0.01636405847966671, 0.003229304449632764, -0.03947339951992035, -0.006279859226197004, -0.02795245498418808, -0.014259529300034046, -0.017942454665899277, -0.0016525945393368602, -0.0025395993143320084, 0.011055519804358482, -0.008856557309627533, -0.0035817455500364304, -0.028977738693356514, -0.02364896424114704, -0.005564859136939049, 0.006546297576278448, 0.056768305599689484, 0.0007440890767611563, 0.0065395524725317955, -0.03445490822196007, -0.008182029239833355, -0.00828995369374752, -0.040930382907390594, -0.019075661897659302, 0.002920707920566201, 0.04265717417001724, -0.017294907942414284, 0.029247550293803215, 0.002514304593205452, 0.029841134324669838, -0.00037562797660939395, -0.003922382369637489, 0.005288302432745695, -0.040741514414548874, 0.0026660733856260777, -0.011237642727792263, 0.014758680947124958, -0.017834529280662537, -0.011035284027457237, -0.005514269229024649, 0.0071500008925795555, -0.03817830607295036, 0.036370567977428436, 0.0017504011048004031, -0.022326888516545296, -0.005301793105900288, -0.01295094471424818, -0.014583303593099117, 0.00928151048719883, -0.033915285021066666, -0.011176935397088528, 0.001419039093889296, 0.020411228761076927, -0.019183587282896042, -0.010590095072984695, -0.01398971863090992, -0.006192170549184084, 0.0006787441670894623, -0.007757076062262058, -0.0033911913633346558, 0.0034434671979397535, -0.04678528755903244, 0.0020758609753102064, -0.01680924743413925, 0.001505884574726224, 0.01633707620203495, 0.03059660643339157, -0.0030387502629309893, -0.0324043408036232, 0.03318679705262184, 0.023837832733988762, 0.007440047804266214, 0.012647407129406929, 0.029895097017288208, -0.03491358831524849, -0.007129764650017023, -0.005773962941020727, -0.006792500615119934, -0.0010219104588031769, -0.027116039767861366, -0.04217151179909706, -0.015487171709537506, -0.010853161104023457, -0.02537575736641884, 0.03742283210158348, 0.004984764847904444, -0.011338821612298489, 0.0037706135772168636, -0.03275509923696518, -0.0007837176672182977, 0.013429859653115273, -0.031190192326903343, -0.022057076916098595, -0.024107644334435463, 0.02348707802593708, 0.010596840642392635, -0.010805943980813026, -0.040984343737363815, 0.0210722666233778, 0.020073963329195976, -0.0052781845442950726, 0.02613122947514057, 0.0026812502183020115, -0.0006972937262617052, 0.0003996580489911139, -0.052532270550727844, -0.005787453148514032, 0.01411113329231739, -0.0284111350774765, 0.0007048821425996721, -0.006222524214535952, 0.015932360664010048, -0.03771962597966194, -0.020492171868681908, -0.014246039092540741, 0.007986416108906269, -0.00802014209330082, -0.00764240650460124, -0.007757076062262058, -0.007662642281502485, -0.01896773837506771, 0.019979530945420265, -0.04894377663731575, 0.005335519555956125, -0.0017385968239977956, 0.0056221941486001015, -0.02100481279194355, 0.0003676179621834308, 0.04149698466062546, 0.002133195986971259, 0.017106039449572563, -0.017510756850242615, -0.022704625502228737, 0.03191868215799332, -0.031406041234731674, 0.010644057765603065, 0.020100945606827736, 0.010367500595748425, 0.02092386968433857, 0.026117738336324692, 0.018158303573727608, 0.04263019189238548, -0.06275811791419983, 0.021679341793060303, 0.005230967421084642, -0.007156745996326208, -0.03051566332578659, 0.012249435298144817, -0.014839624054729939, -0.01636405847966671, 0.004357453435659409, 0.04168585315346718, -4.945663022226654e-05, 0.03742283210158348, -0.04238736256957054, 0.041038304567337036, -0.0037099060136824846, 0.02073500119149685, 0.0013625472784042358, -0.0025682668201625347, 0.05612076073884964, -0.017133019864559174, -0.020006511360406876, -0.02827622927725315, -0.0058683967217803, 0.04662340134382248, 0.006209033541381359, 0.0068801892921328545, -0.011062265373766422, -0.028815852478146553, -0.006512571591883898, 0.0009561439510434866, -0.009160094894468784, 0.009295000694692135, 0.0009451828664168715, 0.009517595171928406, -0.009861604310572147, -0.004077523946762085, -0.009780661202967167, -0.01895424723625183, -0.0037099060136824846, -0.007568208035081625, 0.01844160631299019, 0.0004768072394654155, 0.006725047715008259, 0.005750354379415512, 0.029571322724223137, 0.004492358770221472, -0.02128811553120613, -0.009052170440554619, 0.025119436904788017, 0.06518641859292984, -0.013214010745286942, -0.009787406772375107, -0.004232665523886681, -0.01181773655116558, 0.027143022045493126, -0.043115854263305664, -0.027008116245269775, -0.022461794316768646, 0.004215802066028118, 0.010590095072984695, 0.03769264370203018, -0.020438209176063538, 0.01863047294318676, 0.04611076042056084, 0.031082266941666603, -0.0025615214835852385, -0.04673132672905922, 0.008863302879035473, -0.009821132756769657, -0.036127738654613495, 0.021881699562072754, -0.006023538298904896, -0.022340379655361176, -0.02065405808389187, 0.006836344953626394, -0.04648849368095398, 0.027304908260703087, -0.014542831107974052, -0.005284929648041725, 0.005649175029247999, 0.04891679808497429, -0.013827831484377384, -4.782300675287843e-05, 0.007939198985695839, -0.003952736034989357, 0.0037706135772168636, -0.008350661024451256, 0.024809153750538826, 0.003895401256158948, -0.0038245758041739464, -0.048296231776475906, -0.017942454665899277, -0.0184685867279768, -0.0016129659488797188, -0.006239387206733227, -0.014731699600815773, -0.02061358653008938, 0.020262831822037697, 0.019669247791171074, 0.02569952979683876, 0.02302839793264866, 0.00526469387114048, -0.011237642727792263, -0.007500755600631237, 0.010252831503748894, -0.007325378246605396, 0.03326774016022682, -0.0465424582362175, -0.0032664036843925714, 0.004866722039878368, -0.01531179342418909, 0.012532737106084824, -0.014664246700704098, -0.005092689301818609, -0.008128066547214985, 0.0302728321403265, 0.004195566289126873, -0.010853161104023457, 0.0008570725913159549, -0.037476796656847, 0.012316888198256493, 0.017551228404045105, 0.010785708203911781, 0.031325098127126694, 0.0058346702717244625, -0.009719953872263432, 0.005898750387132168, 0.015756983309984207, -0.036289624869823456, 0.0094029251486063, 0.013308444991707802, -0.012087548151612282, 0.012141510844230652, -0.04856604337692261, -0.024660756811499596, 0.029247550293803215, -0.004927429836243391, -0.015581605024635792, -0.003881910815834999, 0.0032647172920405865, -0.006613750476390123, -0.01621566154062748, 0.003053927095606923, 0.007898727431893349, -0.021989624947309494, 0.045840948820114136, -0.00526469387114048, -0.01617518998682499, -0.019696228206157684, 0.008404623717069626, 0.012377595528960228, -0.02142302133142948, 0.012438302859663963, -0.008526038378477097, 0.006067382637411356, 0.005854906048625708, -0.004937547724694014, 0.006117972079664469, -0.008431604132056236, 0.02564556896686554, 0.0017841275548562407, -0.02811434306204319, 0.018158303573727608, -0.006097736302763224, -0.015028491616249084, 0.027277927845716476, 0.008667689748108387, -0.03483264520764351, 0.016984624788165092, -0.0006530277896672487, 0.017659151926636696, 0.011709812097251415, 0.019426416605710983, -0.05412415415048599, 0.006010047625750303, -0.07937850058078766, -0.015487171709537506, 0.00634056655690074, -0.011945897713303566, -0.01639103889465332, -0.01160188764333725, -0.01598632149398327, 0.0010337147396057844, -0.000995772541500628, -0.005025236401706934, 0.012802548706531525, -0.025173397734761238, -0.006451863795518875, -0.029112644493579865, -0.003723396686837077, -0.03251226618885994, -0.01397622749209404, -0.013065614737570286, 0.003473821096122265, -0.002649210160598159, 0.05444793030619621, -0.0040640332736074924, 4.458210969460197e-05, 0.013497312553226948, -0.009166840463876724, 0.0011753656435757875, -0.022515757009387016, -0.005929104518145323, -0.0281413234770298, 0.008269717916846275, 0.03726094588637352, -0.036478493362665176, 0.03224245458841324, 0.02360849268734455, 0.012364105321466923, -0.0052512031979858875, -0.013106086291372776, -0.002209080383181572, 0.010468680411577225, 0.012391085736453533, 0.036262646317481995, -0.020073963329195976, -0.01401669904589653, -0.0048195053823292255, -0.022745097056031227, 0.031433023512363434, 0.006374293006956577, -0.00814830232411623, -0.0030994578264653683, -0.004205684177577496, 0.013908774591982365, -0.010954340919852257, -0.017915474250912666, 0.019291510805487633, 0.003355778520926833, 0.007433302700519562, 0.012087548151612282, -0.006883562076836824, -0.027250945568084717, -0.004829623270779848, -0.007069057319313288, 0.036154720932245255, -0.02808736078441143, 0.0016981251537799835, 0.010698019526898861, 0.012424812652170658, -0.010138161480426788, -0.0016694576479494572, 0.025038493797183037, 0.010967831127345562, -0.017348868772387505, -0.02100481279194355, -0.008613727055490017, -0.021530944854021072, 0.003155106445774436, 0.014893586747348309, 0.018266228958964348, 0.028492078185081482, -0.003723396686837077, 0.03229641914367676, 0.007446793373674154, -0.007210708223283291, 0.0016804187325760722, 0.029571322724223137, 0.027615191414952278, 0.017713114619255066, 0.021517455577850342, 0.010455189272761345, 0.022340379655361176, -0.01863047294318676, 0.019305001944303513, -0.02822226658463478, -0.0017158315749838948, -0.013659199699759483, 0.00955132208764553, 0.004603656008839607, 0.03008396551012993, -0.0040640332736074924, 0.019588302820920944, 0.024310002103447914, -0.02122066169977188], "index": 90}, {"title": "Fuzhou", "text": "Fuzhou (Chinese: \u798f\u5dde; formerly Foochow) is the capital and one of the largest cities in Fujian province, People's Republic of China. Along with the many counties of Ningde, those of Fuzhou are considered to constitute the Mindong (lit. East of Fujian) linguistic and cultural area.Fuzhou's core counties lie on the north (left) bank of the estuary of Fujian's largest river, the Min River. All along its northern border lies Ningde, and Ningde's Gutian County lies upriver.", "vector": [0.00944509543478489, 0.09612657874822617, -0.013512429781258106, -0.010648109018802643, 0.0045900726690888405, -0.0046974848955869675, -0.0004128648724872619, -0.027382899075746536, -0.04923766106367111, -0.042993441224098206, -0.011507405899465084, 0.01715727709233761, -0.05562509223818779, 0.023129383102059364, 0.007121415343135595, 0.008012935519218445, -0.022341696545481682, 0.03892610967159271, -0.025592699646949768, -0.005023301113396883, -0.006716830190271139, 0.026595210656523705, 0.0036537982523441315, -0.013727253302931786, 0.0062298960983753204, 0.04127484932541847, -0.010841450653970242, -0.02318667061626911, -0.016340944916009903, 0.024203503504395485, 0.04943816363811493, -0.012087429873645306, 0.009974994696676731, -0.029130134731531143, -0.02211255021393299, 0.031650736927986145, 0.03929847106337547, -0.004264256451278925, 0.018847225233912468, 0.044769320636987686, 0.013712931424379349, -0.013548233546316624, 0.049409519881010056, 0.028328124433755875, 0.003200877457857132, -0.04330851882696152, 0.0011331966379657388, -0.03480148687958717, -0.014414690434932709, -0.01488014217466116, 0.03497334569692612, -0.030562294647097588, -0.01405664999037981, 0.04176178574562073, -0.018116824328899384, 0.03434319794178009, 0.008285045623779297, 0.08329442143440247, -0.03786630928516388, 0.006172609515488148, 0.017415065318346024, -0.039241183549165726, 0.0003311870095785707, 0.023415815085172653, -0.019577626138925552, 0.035488925874233246, -0.013082781806588173, -0.01775878295302391, 0.006734732538461685, -0.02132486179471016, 0.0019978631753474474, 0.06324418634176254, 0.03199445456266403, 0.011915571056306362, -0.0011681055184453726, -0.007354141678661108, -0.006025813054293394, -0.025621341541409492, -0.0234731025993824, -0.024103252217173576, 0.049409519881010056, 0.02206958457827568, -0.033254753798246384, -0.006462621968239546, -0.006444720085710287, -0.030562294647097588, -0.04794871434569359, -0.03050500713288784, -0.07292558252811432, -0.009717205539345741, -0.018546471372246742, 0.007447232026606798, -0.011908410117030144, 0.02464747242629528, 0.016083156690001488, 0.0024758465588092804, 0.03637686371803284, 0.0040816557593643665, -0.019362803548574448, 0.029874857515096664, 0.00020911773026455194, 0.03374169021844864, 0.023072097450494766, 0.04316530004143715, 0.04199093207716942, 0.04193364456295967, -0.021253254264593124, -0.03995726257562637, 0.026466315612196922, 0.0257215928286314, 0.04138942435383797, 0.05917685106396675, 0.0450843945145607, 0.0411316342651844, 0.000989085528999567, 0.04972459375858307, 0.01629798114299774, -0.017500994727015495, -0.017271850258111954, 0.003480148734524846, 0.004826379008591175, 0.03772309422492981, 0.03354118764400482, -0.014300117269158363, -0.0077694677747786045, 0.022313052788376808, 0.03236681595444679, -0.020938178524374962, 0.01709998957812786, 0.00046724220737814903, -0.012832153588533401, 0.011077756993472576, 0.03219495713710785, 0.006519908085465431, -0.027526114135980606, -0.013462304137647152, 0.0234731025993824, 0.003517742967233062, -0.027984406799077988, 0.01874697394669056, 0.001644298667088151, 0.047060776501894, -0.06049443781375885, 0.0009568618843331933, 0.017443709075450897, -0.04156128317117691, 0.042563796043395996, 0.030590936541557312, 0.038496460765600204, -0.020121848210692406, -0.010877255350351334, -0.038639675825834274, 0.05556780844926834, -0.007275372743606567, 0.021725866943597794, -0.011557530611753464, -0.004471919499337673, 0.0020694711711257696, 0.023072097450494766, -0.06324418634176254, 0.015080644749104977, -0.017300492152571678, 0.029588425531983376, -0.015152252279222012, -0.024404006078839302, -0.04731856659054756, 0.011407154612243176, -0.0286288782954216, 0.007662056013941765, 0.020923856645822525, 0.04075927287340164, 0.0170570258051157, -0.011500244960188866, -0.037092942744493484, -0.028514305129647255, -0.005087748169898987, 0.027096467092633247, 0.04293615743517876, 0.02501983568072319, 0.03448641300201416, 0.00955966766923666, -0.044540174305438995, 0.041160278022289276, -0.020279385149478912, -0.049037158489227295, -0.0052810898050665855, -0.024203503504395485, -0.013627002015709877, 0.037322089076042175, -0.0037379376590251923, -0.016054512932896614, 0.007221666630357504, 0.044167812913656235, -0.04803464561700821, 0.05688539519906044, -0.010547858662903309, -0.017314814031124115, 0.04780549928545952, 0.03749394789338112, -0.009531024843454361, -0.02169722318649292, -0.0055854241363704205, -0.02815626561641693, 0.011872606351971626, -0.006691767368465662, 0.00880778394639492, -0.013004012405872345, 0.007099932990968227, -0.03866831958293915, -0.013641323894262314, 0.039899978786706924, -0.03792359679937363, 0.010884416289627552, 0.04588640481233597, -0.008199116215109825, 0.0029538299422711134, 0.002805243246257305, -0.011779516004025936, 0.02534923143684864, -0.015166574157774448, 0.009774492122232914, 0.017357779666781425, -0.023014811798930168, 0.00486218323931098, -0.05104218050837517, 0.04316530004143715, -0.04333716258406639, 0.04050148278474808, -0.019506018608808517, 0.016899487003684044, -0.003974243998527527, 0.009731527417898178, -0.044253744184970856, 0.036290932446718216, -0.013784539885818958, -0.005227384157478809, -0.024905262514948845, -0.00034103309735655785, 0.004704645369201899, 0.053963787853717804, -0.0157967247068882, 0.03259596228599548, -0.001917304121889174, 0.02877209335565567, 0.022799987345933914, -0.019563306123018265, 0.006544970907270908, -0.003603672608733177, 0.005968526937067509, -0.028557270765304565, -0.017458030954003334, -0.018431898206472397, 0.02947385236620903, 0.039155252277851105, -0.026681140065193176, 0.018589437007904053, -0.0021016946993768215, -0.02291456051170826, 0.008650246076285839, -0.026738427579402924, -0.022313052788376808, -0.01687084510922432, 0.03359847143292427, -0.002721104072406888, -0.0046581001952290535, 0.011213812977075577, -0.037092942744493484, 0.03102058544754982, -0.022613806650042534, 0.013734414242208004, 0.022141193971037865, 0.008478387258946896, 0.016283659264445305, -0.011636300012469292, -0.04989645257592201, -0.013190193101763725, -0.0026315939612686634, 0.020866570994257927, 0.032825104892253876, 0.0017848294228315353, 0.02000727504491806, 0.06158287823200226, -0.006351629737764597, -0.028170587494969368, -0.046888917684555054, -0.004908728413283825, -0.016412552446126938, 0.035775355994701385, -1.8167733287555166e-05, -0.028013048693537712, 0.002092743758112192, -0.04897987097501755, -0.005288250744342804, -0.021195968613028526, -0.012223485857248306, 0.005950624588876963, 0.014751248061656952, 0.02005023881793022, -0.005016140174120665, 0.0011645250488072634, -0.0404728427529335, -0.012259289622306824, 0.010075245052576065, 0.006641641724854708, 0.050440672785043716, 0.03182259574532509, -0.019949989393353462, -0.005556780844926834, -0.06484820693731308, -0.04686027392745018, 0.040415555238723755, -0.004504143260419369, -0.05258891358971596, 0.00504836393520236, -0.023029131814837456, -0.013784539885818958, -0.01276770606637001, -0.03904068097472191, -0.021912047639489174, -0.026366064324975014, -0.04370952397584915, -0.02174018882215023, -0.030476365238428116, -0.01565350778400898, 0.005793087184429169, 0.008220598101615906, -0.022098228335380554, 0.02060878276824951, 0.035632140934467316, 0.04840700700879097, -0.03929847106337547, -0.03631957620382309, -0.01785903424024582, -0.014565067365765572, -0.0419050008058548, 0.0037522590719163418, 0.009616954252123833, 0.019004762172698975, -0.008664567954838276, 0.07498789578676224, -0.005972106941044331, 0.014249991625547409, 0.03251003101468086, 0.020723354071378708, 0.025707270950078964, 0.029674354940652847, 0.03594721481204033, -0.023859785869717598, 0.015195216983556747, -0.05797383561730385, 0.0006731151952408254, -0.05763011798262596, 0.001617445726878941, 0.002286085393279791, 0.015152252279222012, 0.008170472458004951, -0.0329110361635685, -0.018618078902363777, -0.004786994773894548, 0.02202662080526352, -0.04325123131275177, 0.01213755551725626, -0.036290932446718216, 0.01972084306180477, 0.024618830531835556, 0.004661680664867163, -0.019949989393353462, 0.016856523230671883, 0.008764819242060184, 0.02145375683903694, 0.020837927237153053, 0.0694311186671257, -0.018102502450346947, 0.014486297965049744, 0.014937428757548332, -0.005821730475872755, 0.008313688449561596, -0.0167276281863451, 0.002474056323990226, -0.025607019662857056, 0.025750236585736275, 0.02984621375799179, 0.05350549519062042, 0.04282158240675926, 0.014471977017819881, -0.030304504558444023, -0.010948862880468369, -0.007099932990968227, -0.01639823243021965, 0.035546209663152695, -0.05430750548839569, 0.02005023881793022, 0.005538878496736288, 0.026179883629083633, 0.012968208640813828, -0.024962548166513443, -0.0835808590054512, 0.005499494262039661, 0.009409290738403797, -0.061411019414663315, 0.012717580422759056, 0.016412552446126938, 0.019190942868590355, 0.007547483313828707, 0.002354112919420004, 0.028972595930099487, -0.011399993672966957, -0.008635925129055977, -0.057716045528650284, 0.05952056869864464, 0.002805243246257305, -0.022785665467381477, 0.012638811953365803, -0.016269337385892868, -0.013720092363655567, 0.023788176476955414, -0.032080382108688354, -0.018145466223359108, 0.021969333291053772, 0.014808534644544125, 0.026136919856071472, -0.03640550747513771, 0.021826118230819702, -0.029502496123313904, 0.004629456903785467, 0.02788415551185608, 0.01164346095174551, 0.02408893033862114, -0.01396355964243412, 0.05304720625281334, -0.011772355064749718, -0.009194467216730118, 0.01377737894654274, 0.017930643633008003, 0.0072145056910812855, -0.020393958315253258, 0.037236157804727554, -0.0143430819734931, 0.017357779666781425, 0.04428238794207573, 0.02487661875784397, -0.018388934433460236, 0.020393958315253258, 0.006143966224044561, -0.033197470009326935, -0.01009672787040472, 0.01026142667979002, -0.01525250356644392, 0.006373112089931965, 0.03248138725757599, -0.029259027913212776, -0.020207777619361877, -0.035402994602918625, 0.03692108392715454, -0.0015932780224829912, 0.011349868029356003, 0.025363553315401077, 0.007884040474891663, 0.03497334569692612, -0.009710044600069523, 0.0034568761475384235, -0.014565067365765572, 0.021482400596141815, 0.0003311870095785707, 0.015309790149331093, -0.03987133502960205, 0.04531354084610939, -0.045571330934762955, -0.0327964648604393, -0.0012271821033209562, -0.011235294863581657, 0.031135158613324165, -0.029216064140200615, -0.04176178574562073, -0.031708020716905594, 0.020222099497914314, -0.02749747224152088, -0.06960297375917435, 0.04330851882696152, -0.0018528569489717484, -0.004095977637916803, -0.018961798399686813, -0.035259779542684555, -0.038725607097148895, 0.02586480975151062, 0.023888427764177322, -0.007540322374552488, -0.012187681160867214, 0.05731504410505295, 0.012574364431202412, 0.04293615743517876, -0.018116824328899384, -0.01813114620745182, 0.0015207749092951417, -0.0007720237481407821, 0.025664307177066803, -0.03102058544754982, -0.034887418150901794, -0.05270348861813545, -0.044167812913656235, 0.021568330004811287, 0.07624819874763489, 0.02300048992037773, -0.03514520451426506, -0.012388183735311031, 0.03497334569692612, -0.054049719125032425, 0.013175872154533863, -0.022656770423054695, -0.04296480119228363, 0.016369588673114777, -0.019749486818909645, 0.014479137025773525, -0.026179883629083633, -0.022098228335380554, -0.033340685069561005, 0.030476365238428116, 0.039756760001182556, 0.015811046585440636, 0.004389570560306311, -0.014586549252271652, 0.02553541213274002, -0.04834971949458122, -0.012889440171420574, 0.027296969667077065, -0.023158026859164238, -0.021711545065045357, -0.004196228925138712, -0.01818843185901642, -0.06897282600402832, -0.03666329383850098, 0.010648109018802643, 0.004421793855726719, -0.0009568618843331933, 0.08031553030014038, -0.03566078469157219, -0.0012039095163345337, -0.023401493206620216, 0.006251378450542688, -0.009960672818124294, -0.045571330934762955, -0.009710044600069523, -0.008471226319670677, 0.003045130055397749, -0.006727571599185467, -0.004618715960532427, 0.01808818057179451, -0.02638038620352745, -0.02037963643670082, 0.018388934433460236, 0.01907637156546116, 0.04743313789367676, -0.056255243718624115, 0.023315563797950745, 0.01794496364891529, -0.0011976438108831644, -0.011901249177753925, -0.00615112716332078, -0.03574671223759651, -0.008972481824457645, 0.013555394485592842, 0.042105503380298615, -0.028199229389429092, 0.022155513986945152, -0.021639937534928322, 0.023014811798930168, 0.003039759583771229, -0.03580399975180626, -0.05046931654214859, 0.030447721481323242, 0.010948862880468369, -0.02165425941348076, 0.005026881583034992, -0.01934848167002201, 0.04061605781316757, 0.007755146361887455, -0.015553257428109646, -0.04465474933385849, -0.013154389336705208, -0.01185828447341919, 0.02338717319071293, -0.0036162040196359158, 0.022842951118946075, 0.03205174207687378, 0.05193012207746506, 0.018059536814689636, 0.022928880527615547, -0.019992953166365623, 0.009366326034069061, -0.021725866943597794, -0.012345219030976295, 0.03623364865779877, -0.012080269865691662, 0.02910149097442627, 0.007461553439497948, 0.026451995596289635, -0.02159697189927101, -0.0045113037340343, -0.03210902586579323, 0.00890087429434061, 0.015639187768101692, -0.008335171267390251, -0.003447925206273794, -0.05894770473241806, -0.03419997915625572, 0.024805011227726936, -0.029445208609104156, 0.0036537982523441315, -0.01452926266938448, -0.00687436806038022, -0.023516066372394562, 0.020866570994257927, 0.027583401650190353, 0.01485149934887886, -0.010963184759020805, 0.025191694498062134, -0.0029681515879929066, 0.009495221078395844, 0.03823867067694664, -0.01833164691925049, 0.027569079771637917, -0.05783062055706978, 0.049925096333026886, 0.018202753737568855, -0.04118892177939415, -0.03293967992067337, 0.017400743439793587, -0.06335875391960144, -0.019548984244465828, -0.022241445258259773, -0.025521090254187584, 0.0008257297449745238, 0.02834244631230831, 0.009244592860341072, 0.032538674771785736, -0.004905147943645716, -0.01562486495822668, -0.04399595409631729, -0.01606883481144905, -0.026824356988072395, -0.029416566714644432, -0.0007711286307312548, 0.025735914707183838, -0.03222360089421272, 0.02343013696372509, -0.02844269759953022, -0.0417904295027256, -0.005123552400618792, 0.013698610477149487, 0.016412552446126938, 0.019463054835796356, 2.9006834665779024e-05, 0.011142204515635967, -0.010304391384124756, -0.00874333642423153, 0.011185169219970703, 0.029531138017773628, 0.0115718524903059, 0.01846054196357727, 0.02295752428472042, 0.0143430819734931, -0.022227123379707336, 0.013834665529429913, -0.012789188884198666, -0.03314018249511719, 0.0017275429563596845, -0.01926255226135254, 0.0034819389693439007, 0.01532411202788353, 0.03546028211712837, 0.010719717480242252, 0.019620591774582863, 0.026695461943745613, -0.03829595819115639, -0.03631957620382309, -0.010862933471798897, 0.016226371750235558, -0.03743666037917137, 0.010948862880468369, 0.003673490369692445, -0.021869082003831863, -0.009294718503952026, -0.0046581001952290535, -0.03130701556801796, -0.0321376696228981, 0.011450119316577911, 0.015266825444996357, -0.01443617232143879, 0.020322350785136223, 0.020222099497914314, -0.001010567881166935, -0.022986168041825294, 0.015911297872662544, 0.019477374851703644, 0.008650246076285839, 0.009337683208286762, -0.027855511754751205, -0.00046097650192677975, 0.007762307301163673, -0.043509021401405334, 0.0041890679858624935, 0.021725866943597794, -0.0003972006088588387, -0.06146830692887306, 0.010254265740513802, -0.0010794906411319971, -0.018546471372246742, 0.019291194155812263, -0.020966822281479836, -0.0030111162923276424, 0.017744462937116623, -0.058403484523296356, 0.01827436126768589, -0.013669966720044613, -0.0482637919485569, -0.02076631970703602, 0.02633742243051529, -0.05642710253596306, 0.005417145323008299, 0.03566078469157219, -0.025521090254187584, 0.00032357865711674094, 0.02506279945373535, 0.008499869145452976, -0.034658271819353104, 0.007200184278190136, 0.004360927268862724, 0.029731640592217445, -0.03480148687958717, 0.005256026983261108, -0.02000727504491806, 0.05576831102371216, -0.01645551808178425, 0.005034042522311211, -0.007293274626135826, 0.056914038956165314, -0.01934848167002201, 0.023644961416721344, 0.04010047763586044, -0.009810295887291431, 0.0030737733468413353, -0.005853953771293163, 0.041876357048749924, 0.022198479622602463, -0.0004963329411111772, -0.030247218906879425, -0.017816070467233658, 0.049581378698349, -0.01701406016945839, 0.0367492251098156, 0.004611555021256208, -0.04213414713740349, 0.029903501272201538, -0.027855511754751205, -0.014364564791321754, -0.009316200390458107, -0.01990702375769615, -0.01112788263708353, -0.021382149308919907, 0.02914445474743843, -0.007955648936331272, -0.02456154301762581, 0.02394571527838707, -0.016656020656228065, -0.0019835415296256542, -0.05476579815149307, -0.01532411202788353, -0.005485172849148512, -0.007468714378774166, -0.01311858557164669, 0.0021894145756959915, -0.01066243089735508, 0.009029768407344818, -0.04502711072564125, 0.00908705499023199, 0.010841450653970242, 0.0315934494137764, -0.026409029960632324, 0.015639187768101692, -0.0090226074680686, -0.019878380000591278, -0.002275344217196107, -0.013548233546316624, 1.6083828086266294e-05, -0.023372851312160492, -0.028499983251094818, -0.0046974848955869675, -0.02501983568072319, -0.002570727141574025, 0.035259779542684555, -0.05969242751598358, -0.0033369327429682016, -0.024346720427274704, -0.025320587679743767, 0.006007911171764135, -0.009144341573119164, 0.033111538738012314, -0.005334795918315649, 0.014579388312995434, -0.025377875193953514, 0.03703565523028374, -0.00781243247911334, 0.0025581957306712866, 0.025936417281627655, 0.06152559444308281, 0.0028840121813118458, -0.0002163904282497242, -0.023501744493842125, -0.06169745326042175, 0.017644211649894714, 0.018303005024790764, 0.004428954795002937, 0.009323361329734325, 0.07756578177213669, -0.009738687425851822, 0.014550745487213135, 0.00596136599779129, -0.013741575181484222, -0.00561048649251461, -0.028084658086299896, 0.04600097984075546, -0.011937053874135017, 0.00047574564814567566, 0.00974584836512804, -0.014300117269158363, 0.024762045592069626, 0.02126757614314556, -0.053304992616176605, -0.0067454734817147255, -0.006376692093908787, -0.016756271943449974, -0.030963297933340073, -0.023673605173826218, -0.0011296161683276296, -0.014722604304552078, -0.018546471372246742, 0.05178690329194069, -0.017558282241225243, 0.026881642639636993, 0.022155513986945152, -0.039670832455158234, -0.01916230097413063, 0.012867957353591919, 0.01485149934887886, -0.02764068730175495, -0.02287159487605095, 0.013097102753818035, -0.03368440270423889, 0.010626627132296562, -0.03846781700849533, 0.025621341541409492, 0.0157967247068882, 0.02970299869775772, 0.003567868610844016, 0.039527613669633865, 0.023258278146386147, -0.0547371543943882, -0.027239682152867317, -0.022227123379707336, -0.013311927206814289, 0.021754510700702667, 0.01565350778400898, -0.03557485342025757, -0.002545664319768548, -0.003988565411418676, -0.0008069326286204159, 0.01850350759923458, -0.02811329998075962, -0.008507030084729195, 0.014386046677827835, -0.013440821319818497, -0.04766228422522545, -0.01356255542486906, 0.005094909109175205, -0.003132849931716919, -0.03652007877826691, -0.0032277305144816637, 0.013899113051593304, 0.03242410346865654, 0.030104001984000206, 0.025463804602622986, 0.013440821319818497, 0.041074346750974655, -0.01063378807157278, -0.004622296430170536, 0.03995726257562637, -0.005324054509401321, 0.009795974008738995, 0.0193055160343647, -0.010232782922685146, 0.010254265740513802, 0.0392698273062706, 0.04995374009013176, 0.01860375888645649, -0.0004059278580825776, -0.011249616742134094, -0.0261082760989666, -0.025463804602622986, 0.021811796352267265, -0.0059255617670714855, -0.010619466193020344, -0.01488014217466116, 0.027254004031419754, -0.03293967992067337, -0.011593335308134556, 0.012624490074813366, 0.002520601497963071, 0.017930643633008003, -0.00991054717451334, 0.03660601004958153, 0.026967572048306465, 0.02408893033862114, -0.042850226163864136, -0.07859694212675095, -0.020408280193805695, -0.01424283068627119, -0.04012912139296532, 0.058317553251981735, -0.007568965665996075, 0.01977812871336937, -0.003788063069805503, 0.009180145338177681, -0.006176189985126257, -0.01785903424024582, -0.009502381086349487, -0.011722229421138763, 0.031077871099114418, 0.021009786054491997, -0.005377760622650385, 0.007662056013941765, 0.017185918986797333, 0.019520340487360954, 0.027196718379855156, 0.012388183735311031, 0.02118164673447609, -0.02033667080104351, -0.027683652937412262, -0.03351254388689995, 0.0004121935344301164, 0.016269337385892868, 0.02431807667016983, -0.0033082894515246153, 0.030762797221541405, -0.05384921655058861, -0.04007183760404587, -0.0020014436449855566, 0.0021786733996123075, 0.001600438728928566, -0.030189933255314827, 0.04935223236680031, -0.04863615334033966, -0.026638176292181015, 0.01621205173432827, -0.036806512624025345, 0.045857761055231094, -0.0010293649975210428, -0.028170587494969368, 0.019692199304699898, 0.00817763339728117, -0.015725117176771164, 0.03494470193982124, 0.030161289498209953, 0.008356653153896332, -0.0071572195738554, 0.007776628714054823, 0.005735800601541996, 0.01374873612076044, -0.04161857068538666, -0.008771980181336403, 0.007418588735163212, -0.002130337990820408, -0.011937053874135017, -0.024289432913064957, 0.015052000992000103, 0.012925243936479092, 0.010390320792794228, 0.02006456069648266, -0.006061617285013199, 0.02287159487605095, -0.014937428757548332, 0.009101376868784428, 0.03079143911600113, 0.01916230097413063, 0.005220223218202591, -0.004350185859948397, 0.025649985298514366, 0.0141497403383255, 0.0036949727218598127, -0.05837484076619148, 0.01695677451789379, -0.0011681055184453726, -0.009044090285897255, 0.03265324607491493, -0.036290932446718216, -0.01635526679456234, -0.023487424477934837, -0.04133213683962822, -0.016799235716462135, 0.0006292553152889013, -0.0032742756884545088, 0.005463690496981144, 0.0018886609468609095, -0.041446708142757416, -0.015223860740661621, -0.047404494136571884, 0.022184157744050026, -0.005646290723234415, 0.004006467759609222, -0.01752963848412037, 0.0046366178430616856, -0.01907637156546116, -0.03187987953424454, 0.009702883660793304, -0.04153263941407204, 0.02460450865328312, -0.018388934433460236, -0.005750122480094433, -0.015610544010996819, -0.00845690444111824, 0.009258913807570934, -0.02060878276824951, -0.013712931424379349, -0.03468691557645798, -0.03228088468313217, -0.006233476102352142, 0.03534570708870888, -0.0643899142742157, -3.896482303389348e-05, -0.021167324855923653, -0.03818138688802719, -0.0015136140864342451, -0.005861114710569382, 0.0008266248623840511, 0.02404596656560898, -0.04998238384723663, 0.03013264574110508, -0.047060776501894, 0.0012540350435301661, -0.014493458904325962, 0.022943202406167984, -0.013627002015709877, -0.01752963848412037, 0.004407472442835569, 0.02216983586549759, -0.010039441287517548, -0.07097785174846649, 0.0104762502014637, -0.008464065380394459, -0.009144341573119164, -0.02272837981581688, 0.04353766515851021, -0.01324031874537468, 0.01695677451789379, -0.021969333291053772, -0.01612612046301365, 0.007278953213244677, -0.018245717510581017, 0.028757771477103233, -0.005105650518089533, 0.003920537885278463, -0.026494959369301796, 0.028227873146533966, -0.008850748650729656, -0.043365802615880966, -0.005689255427569151, 0.028414053842425346, 0.015094966627657413, 0.03712158650159836, 0.007712181657552719, 0.0008378135971724987, 0.0030164869967848063, -0.03293967992067337, 0.001573585788719356, 0.0045900726690888405, 0.038124099373817444, 0.018618078902363777, -0.008285045623779297, 0.006684606894850731, -0.018589437007904053, -0.004944532178342342, 0.032166313380002975, -0.003100626403465867, 0.011256777681410313, 0.012445470318198204, 0.037178874015808105, -0.026838678866624832, 0.002259232336655259, 0.029416566714644432, 0.0012898390414193273, 0.026136919856071472, -0.012846475467085838, 0.006315825507044792, 0.0035338548477739096, 0.0025546152610331774, 0.0005706262309104204, -0.002463315147906542, -0.023559032008051872, 0.00039362022653222084, -0.031564805656671524, -0.0018815001240000129, -0.016097478568553925, -0.01775878295302391, -0.01715727709233761, -0.014994715340435505, 0.032825104892253876, 0.024633152410387993, -0.004532786551862955, -0.0247334036976099, -0.01794496364891529, -0.015209538862109184, 0.02103842981159687, 0.010583662427961826, 0.0045900726690888405, -0.000532584497705102, 0.01466531865298748, 0.01443617232143879, -0.009330522269010544, -0.01709998957812786, 0.011901249177753925, -0.00943793449550867, -0.00459365313872695, 0.021024107933044434, -0.0154386842623353, -0.0041210404597222805, -0.018589437007904053, -0.015352754853665829, -0.01145728025585413, 0.025649985298514366, 0.005216642748564482, 0.006752634420990944, -0.008335171267390251, -0.005624808371067047, 0.014937428757548332, 0.016097478568553925, 0.018589437007904053, 0.012810670770704746, 0.007221666630357504, -0.008564316667616367, -0.023115061223506927, -0.013977881520986557, 0.04485525190830231, 0.01738642156124115, 0.0030057458207011223, 0.025463804602622986, 0.025735914707183838, 0.0036233647260814905, -0.0017329135444015265, 0.05768740549683571, -0.03583264350891113, 0.017028382048010826, 0.0022950363345444202, 0.0006704299012199044, 0.016698986291885376, -0.0231437049806118, -0.006283601745963097, -0.0022771344520151615, 0.010504893027245998, -0.008163311518728733, -0.016011549159884453, 0.007841075770556927, 0.013934916816651821, -0.007096352521330118, -0.005954205058515072, -0.032452743500471115, 0.013311927206814289, -0.004876504652202129, 0.03485877439379692, -0.019334159791469574, -0.020966822281479836, -0.00017599904094822705, 0.013691449537873268, -0.0068994308821856976, 0.004400311503559351, -0.01625501550734043, 0.0030308086425065994, -0.03918389603495598, 0.012817831709980965, 0.014579388312995434, 0.011865445412695408, -0.001245979219675064, -0.017500994727015495, -0.008578638546168804, -0.028972595930099487, 0.004536366555839777, -0.014063810929656029, -0.041446708142757416, -0.02549244835972786, -0.01583968847990036, -0.00716796051710844, -0.01450061984360218, -0.009108537808060646, 0.0008172263042069972, 0.0016997948987409472, 0.0011842172825708985, -0.009638437069952488, 0.009223110042512417, -0.01668466441333294, -0.04110299050807953, 0.007468714378774166, -0.027239682152867317, -0.026409029960632324, -0.034457769244909286, 0.0033261915668845177, -0.0005607801140286028, -0.023014811798930168, 0.010404642671346664, 0.001204804633744061, -0.009237431921064854, -0.02126757614314556, -0.007053387816995382, -0.028600234538316727, 0.0078697195276618, 0.03167937695980072, 0.009215949103236198, -0.012166199274361134, -0.03116380050778389, 0.02174018882215023, 0.027382899075746536, 0.03354118764400482, 0.0327964648604393, 0.028886666521430016, 0.014751248061656952, 0.03677786886692047, 0.02076631970703602, -0.019276874139904976, 0.054479364305734634, 0.000131803477415815, -0.028013048693537712, -0.006040134932845831, -0.007776628714054823, -0.008170472458004951, -0.005252446513622999, -0.013233157806098461, 0.0457431897521019, -0.03626229241490364, -0.021353505551815033, 0.021955013275146484, 0.0143430819734931, 0.006079519167542458, -0.007099932990968227, 0.011278259567916393, 0.012159038335084915, 0.01110640075057745, 0.008786301128566265, 0.009230270981788635, 0.04104570671916008, 0.04138942435383797, 0.0035804000217467546, 0.00963127613067627, -0.017959285527467728, 0.00298784370534122, 0.005732220131903887, -0.010483411140739918, 0.03251003101468086, -0.006913752295076847, -0.01846054196357727, 0.017816070467233658, -0.027869833633303642, -0.010483411140739918, -0.014865820296108723, -0.0042105503380298615, -0.0034246526192873716, 0.014092453755438328, -0.012287932448089123, 0.044311027973890305, 0.024074608460068703, -0.039613544940948486, 0.012481274083256721, 0.035861287266016006, 0.02718239650130272, -0.0012943146284669638, 0.024776367470622063, -0.032023098319768906, 0.038639675825834274, 0.02258516289293766, 0.038782890886068344, 0.02264244854450226, -0.013927755877375603, -0.009566828608512878, -0.020737675949931145, 0.011242455802857876, 0.024489935487508774, -0.007705020718276501, -0.02357335388660431, -0.04834971949458122, -0.019004762172698975, -0.016985418274998665, -0.0019155140034854412, 0.017916321754455566, 0.027826867997646332, -0.04643062502145767, -0.013576876372098923, 0.009309039451181889, 0.004242774099111557, 0.00034729880280792713, -0.013447982259094715, 0.03468691557645798, 0.0179879292845726, -0.03789495304226875, -0.003428232856094837, 0.04385273903608322, 0.005628388840705156, 0.011894088238477707, 0.023315563797950745, 0.040701985359191895, -0.025377875193953514, 0.011185169219970703, -0.002923396648839116, -0.008242080919444561, 0.03889746591448784, 0.010196979157626629, -0.011901249177753925, -0.04855022206902504, 0.01506632287055254, -0.01084861159324646, -0.005467270500957966, -0.0074973576702177525, -0.02563566341996193, 0.020265063270926476, 0.014923106878995895, -0.0039348597638309, -0.041733141988515854, 0.0007071290165185928, 0.03228088468313217, 0.01351958978921175, -0.0027282647788524628, 0.0016720467247068882, -0.007411427795886993, -0.038353245705366135, -0.01715727709233761, -0.03958490118384361, 0.043136660009622574, 0.015811046585440636, 0.0009514912962913513, 0.0047440300695598125, -0.02103842981159687, 0.037092942744493484, -0.006928073707967997, -0.013490946963429451, 0.046029623597860336, 0.00339779956266284, 0.014142579399049282, -0.00016044666699599475, -0.03737937659025192, 0.005116391461342573, -0.005463690496981144, -0.012524238787591457, 0.020078882575035095, 0.03021857514977455, -0.01488014217466116, -0.020021596923470497, -0.0130541380494833, -0.02792711928486824, -0.029817570000886917, -0.014779890887439251, 0.022613806650042534, -0.002441832795739174, 0.00042382985702715814, -0.0006520803435705602, 0.01794496364891529, 0.002452573971822858, 0.0038525103591382504, -0.00827072374522686, 0.03583264350891113, 0.015052000992000103, 0.015682151541113853, -0.030934656038880348, -0.04803464561700821, -0.013412178494036198, 0.030676865950226784, 0.026165563613176346, -0.016140442341566086, 0.01452926266938448, -0.014020846225321293, 0.009924869053065777, 0.0068815285339951515, 0.0007044436642900109, -0.004944532178342342, -0.03646279126405716, -0.059119563549757004, 0.002706782426685095, 0.01901908405125141, -0.016741950064897537, 0.006537810433655977, 0.05164368823170662, 0.0417904295027256, 0.03485877439379692, -0.006072358228266239, 0.0009819247061386704, -0.0032169893383979797, -0.0055854241363704205, 0.001805416657589376, 0.01583968847990036, -0.04643062502145767, -0.014923106878995895, 0.02629445679485798, -0.019362803548574448, 0.0016013338463380933, 0.020723354071378708, 0.019090693444013596, 0.005134293343871832, 0.029731640592217445, -0.012495595961809158, -0.019334159791469574, -0.012481274083256721, 0.020308028906583786, -0.002581468317657709, -2.5286573873017915e-05, 0.02910149097442627, -0.001428579562343657, -0.021281898021697998, -0.0019137237686663866, 0.021582650020718575, 0.0007747090421617031, 0.014751248061656952, 0.03623364865779877, 0.028056014329195023, 0.02047988772392273, -0.0010034070583060384, 0.014937428757548332, -0.011507405899465084, -0.0329110361635685, 0.02216983586549759, 0.022155513986945152, 0.012381022796034813, -0.020694712176918983, -0.024346720427274704, -0.006741893012076616, -0.00266560772433877, -0.010490572080016136, -0.0022986168041825294, 0.013111424632370472, -0.015610544010996819, 0.02338717319071293, 0.04809193313121796, -0.011958535760641098, -0.012474113143980503, 0.03523113578557968, 0.01450061984360218, -0.012287932448089123, -0.017415065318346024, -0.023129383102059364, -0.036720581352710724, 0.0019029825925827026, 0.020179133862257004, -0.0019298355327919126, -0.03351254388689995, -0.027211040258407593, -0.0014536423841491342, -0.008721854537725449, 0.01645551808178425, 0.035173848271369934, -0.03382761776447296, 0.03205174207687378, -0.029502496123313904, -0.01860375888645649, -0.004307221155613661, 0.040186408907175064, 0.0027927120681852102, -0.02417485974729061, -0.014085293747484684, 0.010533536784350872, -0.00022892182460054755, -0.004880085121840239, -0.017372099682688713, 0.003360205329954624, -0.06708237528800964, 0.017185918986797333, -0.026494959369301796, 0.020880892872810364, -0.013462304137647152, 0.013827504590153694, -0.026867320761084557, 0.009523863904178143, 0.0010472669964656234, 0.007107093930244446, 0.028170587494969368, 0.005739381071180105, -0.00909421592950821, -0.0209525004029274, -0.014507780782878399, 0.0067239911295473576, -0.0209525004029274, 0.030333148315548897, -0.015109287574887276, 0.015667829662561417, 0.012051626108586788, 0.05273212864995003, 0.025807522237300873, 0.0007697860128246248, 0.0046366178430616856, 0.01823139563202858, -0.033569831401109695, -0.013354891911149025, -0.03302560746669769, -0.02460450865328312, 0.046029623597860336, -0.04316530004143715, 0.056856751441955566, 0.03468691557645798, 0.005997169762849808, 0.018804261460900307, -0.0005594374961219728, 0.02652360312640667, 0.029903501272201538, 0.015352754853665829, -0.024962548166513443, 0.00017778923211153597, -0.03929847106337547, 0.03079143911600113, -0.05333363637328148, -0.020465565845370293, -0.02699621580541134, -0.002089163288474083, 0.008227759040892124, -0.0007066814578138292, 0.0012415036326274276, 0.022656770423054695, 0.015682151541113853, 0.03669193759560585, 0.024518579244613647, -0.04353766515851021, 0.003195506986230612, 0.023587675765156746, -0.013791700825095177, -0.016799235716462135, 0.001075910171493888, -0.01658441312611103, -0.010433285497128963, -0.02023642137646675, -0.0329110361635685, 0.004153263755142689, 0.005066265817731619, 0.022714057937264442, -0.011206652037799358, 0.03368440270423889], "index": 91}, {"title": "Patricide", "text": "Patricide is (i) the act of killing one's father, or (ii) a person who kills his father. The word patricide derives from the Latin word pater (father) and the Latin suffix -cida (cutter or killer). Patricide is a sub-form of parricide, which is defined as an act of killing a close relative.", "vector": [-0.02162994258105755, 0.009556903503835201, -0.03192991763353348, 0.04835101589560509, -0.04882187023758888, 0.04479016736149788, -0.008497477509081364, -0.047703590244054794, -0.007471159100532532, 0.03758018836379051, 0.0345490537583828, -0.03781561553478241, -0.03966961055994034, -0.041553035378456116, -0.022571654990315437, -0.0428478866815567, -0.010358829982578754, -0.0023524402640759945, 0.023380938917398453, -0.040081609040498734, -0.014699532650411129, -0.004568773787468672, -0.009630474261939526, -0.01789252460002899, 0.08952148258686066, 0.004469452425837517, -0.00014806211402174085, -0.010027759708464146, -0.0021390835754573345, -0.014066820032894611, -0.014515604823827744, -0.0006492661777883768, 0.021747658029198647, 0.034078195691108704, 0.014110962860286236, -0.04114103317260742, -0.03602047637104988, 0.0020912622567266226, 0.06274154782295227, 0.010380901396274567, 0.027559785172343254, 0.013412036001682281, -0.0344313383102417, 0.03961075469851494, -0.01818680949509144, 0.04031703621149063, -0.013750463724136353, 0.0038514542393386364, -0.09782031178474426, -0.05915127322077751, 0.014787818305194378, -0.020187946036458015, -0.0019202092662453651, 0.03663847595453262, 0.02444036491215229, 0.005639235023409128, 0.03937532380223274, -0.013809320516884327, -0.0300759207457304, 0.04220046103000641, -0.02062937431037426, -0.018392808735370636, -0.017833666875958443, 0.012359967455267906, 0.039905037730932236, 0.012234896421432495, -0.009770260192453861, -0.0002317493926966563, -0.0013941748766228557, 0.02202722802758217, 0.04902787134051323, 0.0044473810121417046, -0.012985322624444962, -0.01815738156437874, -0.030458491295576096, 0.012212825007736683, 0.025190791115164757, 0.01250710990279913, 0.022409798577427864, -0.012926465831696987, 0.011131327599287033, -0.009704045951366425, 0.02717721462249756, 0.03581447899341583, 0.02848678268492222, -0.00645955465734005, 0.011050399392843246, -0.06486040353775024, 0.028575068339705467, 0.023792937397956848, 0.023439794778823853, -0.016936099156737328, 0.008688762784004211, 0.01206568256020546, 0.028163067996501923, 0.026794644072651863, 0.047585874795913696, 0.02318965271115303, -0.002093101618811488, -0.031135346740484238, -0.0344901941716671, 0.019216805696487427, -0.025396790355443954, -0.04955758526921272, -0.007294587790966034, 0.016950812190771103, -0.0854603499174118, 0.029369637370109558, 0.021747658029198647, 0.08234092593193054, -0.03675618767738342, -0.003139652544632554, 0.03457847982645035, 0.011815540492534637, 0.0010143633699044585, -0.05918070301413536, 0.04031703621149063, -0.011925897561013699, -0.027957068756222725, -0.012028897181153297, -0.03178277239203453, -0.04561416432261467, 0.007901550270617008, 0.007268838118761778, -0.02995820716023445, 0.022659940645098686, 0.02574993297457695, 0.003910311032086611, -0.040729034692049026, -0.003735579550266266, 0.002306458307430148, -0.051970720291137695, -0.0012277199421077967, 0.08334149420261383, 0.0343136228621006, -0.029384350404143333, -0.01877537928521633, -0.014228676445782185, 0.01880480721592903, 0.02703007124364376, 0.011668398045003414, -0.00615423358976841, -0.006573589984327555, 0.009409761056303978, 0.01316189393401146, -0.021615229547023773, 0.009409761056303978, 0.046879589557647705, 0.028148354962468147, 0.034843336790800095, 0.015317531302571297, -0.030752776190638542, 0.012396752834320068, 0.015111532062292099, 0.02669164352118969, -0.0013748625060543418, 0.007099624257534742, -0.03861018270254135, 0.009983616881072521, 0.03275391459465027, -0.024675792083144188, 0.04893958568572998, -0.00719894515350461, 0.014000605791807175, 0.020070232450962067, 0.021865371614694595, -0.039139896631240845, -0.008254692889750004, 0.018819522112607956, 0.00030233178404159844, 0.02532321959733963, -0.04361302778124809, 0.04814501479268074, -0.04620273411273956, -0.008725548163056374, -0.0517941489815712, 0.024793505668640137, 0.002484868513420224, 0.0052272360771894455, 0.02995820716023445, 0.012440895661711693, 0.037521328777074814, -0.023572223260998726, -0.004697523545473814, 0.007842693477869034, 0.0060990555211901665, 0.0037999541964381933, 0.006128483917564154, 0.043524742126464844, -0.04826273024082184, -0.027559785172343254, 0.015214531682431698, -0.01706852577626705, 0.032135915011167526, 0.026941785588860512, 0.021835941821336746, -0.006992945913225412, 0.03354848176240921, 0.017818953841924667, 0.023204367607831955, 0.010138115845620632, -0.07363009452819824, 0.0027386893052607775, 0.09581917524337769, 0.015096817165613174, 0.0019606733694672585, 0.023719366639852524, 0.00943183246999979, 0.03937532380223274, -0.021924227476119995, 0.013198679313063622, 0.010851757600903511, 0.005959270056337118, 0.040787894278764725, 0.004469452425837517, 0.012926465831696987, -0.023410366848111153, 0.02017323300242424, 0.045084454119205475, 0.011234327219426632, -0.0041898819617927074, 0.018819522112607956, 0.045231595635414124, -0.016141528263688087, 0.018142666667699814, -0.01581781543791294, -0.014339033514261246, -0.005631878040730953, -0.024822935461997986, 0.032224200665950775, 0.02703007124364376, -0.015611816197633743, -0.016582956537604332, -0.016376957297325134, -0.04184731841087341, -0.007629337254911661, -0.026132503524422646, -0.045084454119205475, -0.004186203237622976, -0.026338502764701843, -0.03343077003955841, -0.007261481136083603, -0.008004550822079182, -0.00591144897043705, 0.04052303731441498, 0.03287162631750107, -0.0052272360771894455, -0.07827979326248169, -0.04220046103000641, -0.01461124699562788, -0.029811063781380653, 0.015641244128346443, 0.04461359605193138, -0.02922249399125576, -0.010454472154378891, -0.01227903924882412, 0.029663922265172005, 0.013345821760594845, 0.018245667219161987, 0.0474681593477726, -0.03975789621472359, -0.03607933223247528, -0.0469384491443634, 0.0018834236543625593, 0.011366755701601505, -0.08075178414583206, -0.02544093318283558, -0.013463536277413368, -0.02532321959733963, -0.008975690230727196, 0.0035001514479517937, 0.011293184943497181, -0.029207780957221985, -0.05294186249375343, -0.024190222844481468, 0.007644051220268011, 0.0346079096198082, 0.04476074129343033, -0.009784974157810211, 0.030576204881072044, -0.027294928207993507, -0.04196503385901451, -0.035549622029066086, 0.023145509883761406, 0.053736429661512375, -0.01328696496784687, -0.03525533527135849, 0.005756949074566364, 0.026838786900043488, 0.023483937606215477, 0.010174902155995369, 0.03178277239203453, 0.0075704799965023994, 0.020040804520249367, -0.01544995978474617, -0.04976358264684677, -0.0013242822606116533, -0.08063407242298126, -0.01724509708583355, -0.015420530922710896, 0.02541150525212288, -0.020850088447332382, 0.032165344804525375, 0.016950812190771103, -0.021644657477736473, -0.00033130045630969107, -0.003855132730677724, 0.019496377557516098, -0.02398422174155712, -0.01305889431387186, -0.02285122498869896, -0.040699608623981476, 0.017598239704966545, 0.058032989501953125, -0.0021335657220333815, -0.04896901547908783, -0.006919374689459801, -0.013088323175907135, -0.011896468698978424, 0.00171237054746598, -0.0517352931201458, 0.02032037451863289, -0.00034739417606033385, -0.040052179247140884, 0.016980241984128952, -0.058739274740219116, -0.017200954258441925, -0.03504933789372444, -0.028810495510697365, -0.03337191045284271, -0.023763509467244148, 0.023174939677119255, 0.011830254457890987, -0.010785543359816074, -0.015832530334591866, 0.009255261160433292, -0.017171526327729225, 0.05953384190797806, 0.05488414317369461, -0.06274154782295227, -0.017863096669316292, 0.008924190886318684, 0.031311918050050735, 0.0600929856300354, -0.014361104927957058, 0.026382645592093468, -0.025602789595723152, 0.010962113738059998, -0.01968766190111637, 0.02964920736849308, 0.0005927082384005189, 0.03204762935638428, -0.041670747101306915, -0.03966961055994034, 0.014868746511638165, -0.05732670798897743, 0.02398422174155712, -0.03334248438477516, 0.04387788474559784, -0.007710265461355448, 0.0013435946311801672, -0.027809927240014076, 0.000797328248154372, -0.06509582698345184, -0.015979671850800514, -0.06427183002233505, 0.061564408242702484, 0.05509014055132866, 0.025823503732681274, 0.0383453294634819, 0.01480988971889019, -0.043230459094047546, 0.07480723410844803, 0.01286025159060955, -0.013507679104804993, 0.013882892206311226, 0.04476074129343033, 0.015302817337214947, -0.010866471566259861, 0.018701808527112007, -0.008806477300822735, -0.01602381467819214, -0.012433539144694805, 0.0030587241053581238, -0.060622699558734894, -0.019672948867082596, 0.0026890286244452, 0.0018356023356318474, -0.0030899918638169765, -0.02800121158361435, -0.015332245267927647, 0.03354848176240921, -0.031135346740484238, -0.030635062605142593, 0.01986423321068287, -0.011337327770888805, 0.0016176474746316671, 0.002551082521677017, 0.017348097637295723, -0.05785641819238663, 0.018024953082203865, -0.040081609040498734, 0.045055024325847626, 0.037462472915649414, 0.02093837410211563, -0.007673479616641998, 0.021291514858603477, -0.026588644832372665, -0.05052872374653816, 0.015096817165613174, 0.010601614601910114, 0.020702945068478584, 0.01227903924882412, 0.04190617427229881, 0.05176471918821335, -0.02096780203282833, -0.014118320308625698, 0.006838446483016014, -0.006761196535080671, 0.02882521040737629, -0.04905730113387108, 0.005436914507299662, 0.007125373929738998, 0.004657058976590633, 0.03275391459465027, 0.016582956537604332, 0.01226432528346777, 0.0047490233555436134, 0.05058757960796356, 0.019040236249566078, -0.07262952625751495, -0.019672948867082596, 0.009115476161241531, 0.10711971670389175, -0.019525805488228798, -0.04558473825454712, -0.019761234521865845, 0.002392904367297888, 0.014339033514261246, 0.03160620108246803, 0.00619469815865159, -0.06244726479053497, -0.018701808527112007, 0.026882929727435112, 0.0256910752505064, 0.005782699212431908, -0.010270544327795506, 0.003349330509081483, 0.02861921116709709, -0.023660508915781975, 0.0033107055351138115, -0.01989366114139557, -0.0258970744907856, -0.01965823397040367, 0.05158815160393715, -0.006591982673853636, -0.004462095443159342, -0.05912184342741966, -0.024263793602585793, 0.02452865056693554, -0.032135915011167526, 0.021262086927890778, -0.02976692095398903, -0.03696218878030777, 0.05423671379685402, -0.01293382328003645, 0.011727254837751389, -0.005852591712027788, -0.003932382445782423, -0.0016912188148126006, 0.011101899668574333, 0.014316962100565434, -0.04031703621149063, -0.034931622445583344, 0.02461693435907364, -0.04470188170671463, 0.02617664635181427, -0.011455041356384754, 0.009637831710278988, -0.0004575211205519736, 0.03928703814744949, 0.0030734383035451174, -0.02492593415081501, 0.025073077529668808, 0.005238271784037352, -0.0561789944767952, -0.044231027364730835, -0.02964920736849308, -0.05326557531952858, 0.011020971462130547, 0.018657665699720383, 0.0028950280975550413, -0.005859948694705963, -0.049528155475854874, 0.004693844821304083, -0.005050665233284235, -0.013721035793423653, 0.028722209855914116, 0.004234024789184332, -0.001844798680394888, 0.015758957713842392, -0.0386984683573246, 0.02065880224108696, 0.018731236457824707, 0.046879589557647705, 0.034755051136016846, 0.0017638703575357795, 0.010270544327795506, 0.007140088360756636, 0.01675952784717083, -0.023086654022336006, 0.03749190270900726, -0.040022753179073334, 0.015096817165613174, 0.006735446397215128, -0.0023303688503801823, 0.006389661692082882, -0.02182122878730297, -0.008821191266179085, -0.009777616709470749, -0.011800826527178288, -0.042494744062423706, -0.007364480756223202, -0.04228874668478966, -0.011366755701601505, 0.028207210823893547, 0.017348097637295723, 0.014706890098750591, 0.006967195775359869, -0.020467517897486687, 0.03245962783694267, 0.027692213654518127, 0.004620273597538471, 0.03089991956949234, 0.0038588112220168114, -0.011903826147317886, -0.02705950103700161, -0.030635062605142593, 0.0035130265168845654, 0.0035369370598345995, 0.01139618456363678, 0.008460692130029202, 0.026044217869639397, 0.03166506066918373, -0.015832530334591866, -0.004605559166520834, 0.018569380044937134, 0.05414842814207077, -0.03946360945701599, -0.04582016542553902, 0.008379763923585415, -0.03678561747074127, 0.01141089852899313, 0.051058437675237656, 0.04484902322292328, -0.004267131444066763, 0.009696688503026962, 0.0023653151001781225, 0.02157108671963215, -0.014912889339029789, 0.028898781165480614, 0.01834866590797901, 0.0071180169470608234, 0.004002275411039591, -0.036461904644966125, 0.023380938917398453, 0.025705790147185326, -0.017598239704966545, 0.03599104657769203, 0.010550115257501602, 0.01767181046307087, -0.02102665975689888, -0.027412641793489456, 0.01983480527997017, 0.03872789815068245, 0.00025841896422207355, -0.01681838370859623, 0.01789252460002899, 0.003950775135308504, -0.03599104657769203, -0.0193492341786623, -0.0022144941613078117, -0.03087048977613449, 0.01986423321068287, 0.008416549302637577, -0.0018218077020719647, -0.03710933029651642, 0.02779521234333515, 0.0171273835003376, 0.0014162462903186679, -0.030487919226288795, -0.02285122498869896, 0.03357791155576706, 0.017774811014533043, -0.009137547574937344, 0.0015799422981217504, -0.005959270056337118, 0.01670067012310028, 0.015744244679808617, 0.023454509675502777, 0.004822594579309225, 0.032989341765642166, 0.0009840152924880385, -0.02635321579873562, -0.002955724485218525, -0.008166407234966755, 0.0559435673058033, -0.10735514760017395, 0.003231616457924247, 0.06321240216493607, -0.0038404185324907303, -0.04193560406565666, -0.052853576838970184, -0.0343136228621006, 0.023969508707523346, 0.022601082921028137, 0.022571654990315437, -0.043230459094047546, 0.003641776042059064, -0.02413136512041092, -0.01986423321068287, 0.023910650983452797, 0.015288102440536022, -0.023483937606215477, -0.05500185489654541, -0.0024536007549613714, 0.0030624025966972113, -0.0069966246373951435, 0.004337024409323931, 0.006385983433574438, 0.015758957713842392, -0.0010474704904481769, 0.006555196829140186, 0.0016360403969883919, -0.03275391459465027, -0.02486707828938961, 0.019923090934753418, -0.037433043122291565, -0.013470892794430256, -0.002271511824801564, 0.0140447486191988, -0.008960976265370846, -0.0037742042914032936, -0.028751637786626816, -0.009623117744922638, 0.0214828010648489, -0.005587735213339329, 0.009490689262747765, 0.009380332194268703, 0.02669164352118969, -0.012713109143078327, -0.030281919986009598, 0.006069627124816179, -0.007460123393684626, 0.016965527087450027, -0.04534931108355522, -0.014236033894121647, -0.0129191093146801, 0.013522393070161343, 0.002540046814829111, -0.022983653470873833, -0.028045354411005974, -0.016833098605275154, -0.002479350659996271, -0.018760664388537407, -0.002242083428427577, -0.017789524048566818, -0.03178277239203453, -0.030752776190638542, 0.02501421980559826, -0.017833666875958443, -0.013412036001682281, 0.0016820223536342382, -0.011190185323357582, 0.0021280478686094284, 0.010631043463945389, -0.003628901205956936, -0.012448253110051155, 0.02745678462088108, 0.015001174993813038, -0.017083240672945976, -0.005264021921902895, -0.011999468319118023, -0.009174332953989506, 0.029119495302438736, -0.00944654643535614, 0.006242519244551659, -0.0004543023824226111, -0.012330538593232632, -0.03928703814744949, -0.0049807727336883545, 0.03978732228279114, 0.0010787382489070296, 0.03684447333216667, 0.016376957297325134, 0.011440327391028404, -0.009865902364253998, -0.009247904643416405, -0.012095111422240734, 0.007879478856921196, 0.03790390118956566, -0.0015422370051965117, -0.03866904228925705, 0.012161324732005596, -0.008092835545539856, 0.005183093715459108, -0.010270544327795506, -0.02245394140481949, -0.0009463099995627999, -0.026706358417868614, 0.001094372128136456, 0.044083885848522186, -0.001933084218762815, 0.0037282223347574472, 0.0029060638044029474, 0.020423375070095062, 0.010947399772703648, -0.01831923797726631, 0.013676892966032028, 0.020379232242703438, 0.0043333456851542, 0.016170958057045937, -0.011013614013791084, 0.025308504700660706, -0.004623952321708202, -0.011506541632115841, -0.04891015589237213, -0.02096780203282833, -0.006065948400646448, 0.00857840571552515, -0.018422236666083336, 0.03104706108570099, 0.025131933391094208, 0.00679430365562439, 0.015700101852416992, -0.015611816197633743, -0.009027190506458282, -0.03357791155576706, -0.05423671379685402, -0.004520952235907316, -0.026824072003364563, -0.022071370854973793, 0.0025952253490686417, -0.03793332725763321, -0.012654252350330353, -0.007232052274048328, -0.012448253110051155, 0.024881791323423386, -0.006882588844746351, 0.020040804520249367, 0.045937880873680115, 0.015582387335598469, 0.005870984401553869, -0.02273351140320301, 0.015376388095319271, -0.027927640825510025, -0.051264435052871704, -0.02355751022696495, 0.007938336580991745, -0.01776009611785412, -0.0034394552931189537, 0.005172058008611202, -0.009726117365062237, 0.011661040596663952, 0.027250785380601883, -0.044289883226156235, 0.01403003465384245, -0.02404307946562767, 0.0030679204501211643, 0.016009101644158363, 0.013853463344275951, 0.031459059566259384, 0.02102665975689888, -0.059769272804260254, -0.026927072554826736, -0.03758018836379051, -0.00472327321767807, 0.022998368367552757, 0.008696120232343674, -0.040876179933547974, 0.00879176240414381, -0.023748794570565224, -0.034755051136016846, -0.010395615361630917, 0.008585763163864613, -0.018113238736987114, 0.03369562700390816, 0.009777616709470749, -0.010093973018229008, 0.004745344631373882, 0.026309072971343994, -0.028589781373739243, -0.004167810548096895, 0.03675618767738342, -0.006669232621788979, -0.02435207925736904, -0.027074214071035385, 0.011771397665143013, -0.01621510088443756, -0.05002843961119652, 0.03849247097969055, -0.002484868513420224, -0.0025786717887967825, 0.0076881940476596355, 0.021291514858603477, 0.004355417098850012, 0.05158815160393715, -0.005304486025124788, -0.024970076978206635, -0.05423671379685402, 0.018701808527112007, 0.05511957034468651, 0.0033327769488096237, 0.026882929727435112, -0.04537873715162277, 0.00821055006235838, 0.010667828842997551, -0.03381333872675896, -0.0018236469477415085, 0.03257734328508377, -0.029487350955605507, 0.0021409229375422, 0.06650839745998383, -0.018083808943629265, -0.004164131823927164, -0.00802662130445242, 0.07056953012943268, -0.015015888959169388, 0.009829116985201836, -0.016597671434283257, 0.012757251970469952, 0.008048692718148232, 0.01798081025481224, -0.04043475165963173, 0.03084106184542179, -0.015611816197633743, 0.029781635850667953, 0.001980905421078205, -0.0007265159511007369, 0.028442639857530594, -0.0035829192493110895, -0.004719594959169626, 0.039110466837882996, -0.03087048977613449, -0.03346019610762596, -0.032253630459308624, -0.009571617469191551, -0.014912889339029789, 0.014552390202879906, -0.04496673867106438, 0.009748188778758049, -0.04702673479914665, 0.025117220357060432, 0.0256910752505064, -0.06097583845257759, -0.0013638267992064357, 0.0384041853249073, -0.0014705050271004438, -0.021924227476119995, -0.021306229755282402, -0.013051536865532398, 0.02663278765976429, -0.0473504476249218, 0.0139417489990592, -0.017259811982512474, 0.009777616709470749, 0.049469299614429474, -0.028383782133460045, 0.008519548922777176, -0.031282488256692886, 0.012801394797861576, -0.02279236912727356, 0.048557016998529434, -0.011020971462130547, -0.02051166072487831, 0.010991542600095272, 0.029178351163864136, -0.018819522112607956, 0.026809358969330788, 0.039051610976457596, -0.00620941212400794, 0.027383213862776756, -0.014508247375488281, -0.004370131529867649, 0.0070039816200733185, 0.01546467375010252, 0.04149417579174042, 0.003936061169952154, 0.03195934370160103, -0.03234191611409187, 0.014471461996436119, 0.009601046331226826, -0.006113769486546516, -0.04187674820423126, 0.011035685427486897, 0.024087222293019295, -0.008938904851675034, 0.007165838498622179, -0.016494670882821083, -0.05411900207400322, 0.006334483157843351, 0.013478250242769718, -0.04411331191658974, 0.023013083264231682, 0.0279129259288311, 0.006389661692082882, 0.03275391459465027, -0.009240547195076942, 0.0012709430884569883, 0.010211687535047531, 0.0045356666669249535, -0.017568811774253845, -0.030782204121351242, -0.01667124219238758, 0.03243020176887512, 0.015273388475179672, -0.03693275898694992, -0.019334521144628525, -0.0024168151430785656, -0.02876635268330574, 0.03805104270577431, 0.019923090934753418, -0.030487919226288795, -0.004693844821304083, -0.0002706041850615293, 0.013228108175098896, 0.04022875055670738, 0.02401365153491497, 0.030635062605142593, 0.009284690022468567, -0.014272819273173809, -0.004962379578500986, 0.011043041944503784, 0.009152261540293694, -0.003141491673886776, -0.05226500704884529, -0.017039097845554352, -0.0027442071586847305, -0.036432474851608276, -0.030664490535855293, -0.04234760254621506, 0.026618072763085365, 0.02523493394255638, -0.021777085959911346, 0.07539580017328262, 0.02626493014395237, -0.015126246027648449, -0.01675952784717083, -0.024749362841248512, -0.019643519073724747, -0.03101763315498829, -0.018966663628816605, -0.006731768138706684, -0.025279076769948006, -0.009483331814408302, -0.020452803000807762, -0.006492661312222481, -0.011741968803107738, -0.004517273977398872, -0.007379194721579552, 0.00025474041467532516, 0.04187674820423126, 0.032312486320734024, 0.005418521352112293, -0.04293617233633995, 0.00505802221596241, 0.011065113358199596, -0.03705047443509102, 0.014817247167229652, -0.003097349079325795, 0.0005076415254734457, -0.046761877834796906, 0.009012476541101933, 0.045996736735105515, -0.0013509518466889858, -0.004590845201164484, 0.010601614601910114, 0.026426788419485092, 0.0035056693013757467, 0.006382304709404707, -0.016185671091079712, 0.02617664635181427, 0.01077082846313715, 0.004031703807413578, -0.013139822520315647, 0.04387788474559784, -0.03607933223247528, 0.039228182286024094, -0.005749592091888189, 0.031341347843408585, 0.001635120715945959, 0.01031468715518713, 0.009049261920154095, -0.04896901547908783, 0.014236033894121647, -0.00645955465734005, 0.023292653262615204, 0.005179414991289377, -0.02401365153491497, -0.016259243711829185, -0.030281919986009598, 0.0022163335233926773, -0.027648070827126503, -0.0429656021296978, -0.012514467351138592, 0.007265159394592047, -0.01435374841094017, 0.007872122339904308, -0.04222988709807396, -0.02276293933391571, 0.010594258084893227, -0.001023559831082821, -0.00422666734084487, 0.021291514858603477, 0.020364517346024513, 0.030576204881072044, 0.03587333485484123, -0.03596162050962448, -0.018848950043320656, 0.058945272117853165, -0.004991808440536261, 0.04552587866783142, 0.023866508156061172, 0.044260453432798386, -0.0234692245721817, 0.04049360752105713, -0.03716818615794182, 0.008401835337281227, 0.023969508707523346, 0.014471461996436119, 0.013904963620007038, -0.015288102440536022, 0.015729529783129692, 0.01602381467819214, -0.004679130390286446, -0.021350372582674026, -0.03178277239203453, -0.03519647940993309, -0.004679130390286446, -0.006702339742332697, 0.01238939631730318, 0.016612384468317032, 0.0019202092662453651, 0.0033051876816898584, -0.01858409307897091, -0.0026375288143754005, 0.013309036381542683, -0.03192991763353348, -0.003581079887226224, -0.046820733696222305, -0.02273351140320301, -0.023145509883761406, -0.004300238564610481, 0.021247372031211853, -0.027839355170726776, 0.010035116225481033, -0.0026908679865300655, -0.006823732051998377, -0.032077059149742126, -0.013559178449213505, 0.004587166476994753, -0.005403807386755943, 0.01227903924882412, -0.00013357777788769454, 0.024646364152431488, -0.004182524513453245, 0.005337593145668507, -0.0008198594441637397, 0.003770525800064206, -0.005286093335598707, -0.010704615153372288, -0.006080662366002798, -0.00024761317763477564, -2.1051143903605407e-06, 0.01886366493999958, 0.019584663212299347, 0.00262833246961236, -0.003088152501732111, 0.02102665975689888, 0.022939510643482208, 0.004969737026840448, 0.03351905569434166, 0.008409191854298115, -0.013853463344275951, -0.03610876202583313, -0.01892252080142498, -0.0024131364189088345, -0.01260275300592184, 0.027765784412622452, -0.02444036491215229, -0.009946830570697784, 0.01645052805542946, -0.015920815989375114, 0.01642110012471676, -0.0010318366112187505, 0.02526436187326908, -0.0012222020886838436, -0.010476543568074703, -0.03169448673725128, 0.01647995598614216, -0.019143234938383102, 0.008092835545539856, 0.013735749758780003, 0.04896901547908783, 0.006385983433574438, 0.026029502972960472, -0.01901080645620823, 0.00444002402946353, -0.02677992917597294, 0.003788918722420931, 0.026103073731064796, 0.00635287631303072, -0.01789252460002899, -0.03540247678756714, 0.009056619368493557, -0.02105608768761158, -0.02157108671963215, -0.008821191266179085, 0.0007872122223488986, -0.024366792291402817, 0.02922249399125576, -0.01627395674586296, -0.005381735973060131, 0.02264522574841976, -0.006926731672137976, -0.01051332987844944, 0.002801224822178483, 0.015361674129962921, 0.01238939631730318, 0.01549410168081522, -0.01989366114139557, -0.01293382328003645, -0.02111494354903698, 0.022115513682365417, -0.007533694617450237, 0.04493730887770653, 0.027839355170726776, -0.0052198790945112705, 0.003796275705099106, -0.0473504476249218, -0.00663612550124526, 0.019878948107361794, -0.0047674160450696945, -0.020408660173416138, 0.019569948315620422, -0.012786680832505226, -0.023601653054356575, 0.022586369886994362, -0.0010437918826937675, 0.02307193912565708, -0.009696688503026962, 0.0005140790017321706, 0.010461829602718353, 0.005374378524720669, 0.01226432528346777, 0.006926731672137976, -0.01718624122440815, -0.015420530922710896, -0.0140153206884861, 0.024425650015473366, -0.03849247097969055, 0.02279236912727356, 0.0259265024214983, 0.04529045149683952, 0.013478250242769718, 0.021718228235840797, -0.03884561359882355, -0.0037558116018772125, -0.0035111871547997, -0.024690506979823112, 0.021762371063232422, 0.03357791155576706, -0.0010217205854132771, 0.00599605543538928, 0.053765859454870224, -0.03784504160284996, -0.016170958057045937, -0.001600174349732697, -0.0006170787382870913, -0.006466911640018225, 0.012242253869771957, 0.007842693477869034, 0.010925328359007835, 0.008100192993879318, -0.00012622064969036728, 0.01227903924882412, -0.003170920303091407, -0.006073305383324623, -0.004410595633089542, -0.00599605543538928, 0.0016544332029297948, 0.005142629146575928, -0.011712540872395039, -0.021865371614694595, -0.00036601690226234496, 0.012411467730998993, -0.004620273597538471, 0.02273351140320301, -0.006242519244551659, 0.009704045951366425, 0.0018622719217091799, -0.012874966487288475, 0.029237208887934685, 0.027191927656531334, -0.019113807007670403, -0.030782204121351242, -0.01684781350195408, -0.03510819375514984, 0.034078195691108704, 0.0076881940476596355, -0.0034541694913059473, -0.010719329118728638, 0.00909340474754572, -0.042671315371990204, 0.025955932214856148, -0.004925594199448824, -0.022189084440469742, 0.0021022979635745287, -0.00040992972208186984, -0.029855206608772278, 0.000574315432459116, -0.008379763923585415, -0.020526373758912086, -0.0236752238124609, -0.014699532650411129, 0.043583597987890244, -0.0012387556489557028, 0.0025731539353728294, 0.02188008464872837, 0.014206605963408947, -0.01849580928683281, 0.016465242952108383, 0.027765784412622452, -0.0025363683234900236, 0.013492964208126068, -0.024881791323423386, -0.01687724143266678, -0.007445408962666988, 0.0034063481725752354, 0.015346959233283997, 0.019981946796178818, -0.031429633498191833, 0.023969508707523346, -0.0020563160069286823, 0.009961545467376709, 0.018701808527112007, 0.000969301036093384, 0.03087048977613449, 0.01892252080142498, -0.005028593819588423, 0.024278508499264717, -0.013088323175907135, 0.008033978752791882, 0.02202722802758217, 0.025985360145568848, -1.984411574085243e-05, 0.03964018076658249, 0.035637907683849335, 0.023425081744790077, -0.03961075469851494, -0.0171273835003376, -0.04011103883385658, 0.013419393450021744, -0.001683861599303782, 0.014618604443967342, 0.019569948315620422, -0.008725548163056374, 0.008291478268802166, -0.0023873865138739347, -0.01445674803107977, 0.005473699886351824, 0.039169326424598694, -0.0015477548586204648, -0.014618604443967342, 0.0023285294882953167, 0.03610876202583313, -0.024455077946186066, -0.029443208128213882, -0.02005551941692829, -0.020585231482982635, -0.004443702753633261, -0.0129485372453928, 0.019334521144628525, 0.017289239913225174, -0.03516704961657524, 0.003593954723328352, -0.015729529783129692, -0.026529787108302116, 0.014971746131777763, -0.018113238736987114, 0.011315256357192993, 0.0024131364189088345, 0.0008198594441637397, -0.017142098397016525, -0.027162499725818634, 0.006216769572347403, 0.025882359594106674, 0.006003412883728743, -0.0071180169470608234, -0.030031777918338776, -0.0032757592853158712, 0.014037392102181911, -0.008688762784004211, -0.011455041356384754, -0.045084454119205475, -0.02635321579873562, 0.009895331226289272, 0.00020117135136388242, 0.03699161857366562, 0.002212654799222946, 0.006669232621788979, -0.04108217731118202, -0.011388827115297318, 0.015082103200256824, -0.00516470056027174, -0.0051132007502019405, -0.0024664755910634995, 0.004454738460481167, -0.007592551410198212, -0.017804238945245743, 0.0029115816578269005, 0.0007692791987210512, 0.009748188778758049, 0.012249610386788845, -0.025485076010227203, -0.014780460856854916, -0.00040602125227451324, -0.01317660789936781, 0.0017767453100532293, 0.009571617469191551, 0.00117713981308043, -0.019084379076957703, 0.0051941294223070145, 0.009137547574937344, -0.02763335593044758, -0.010498614981770515, 0.02763335593044758, 0.009063975885510445, 0.00041774666169658303, 0.004892487078905106, 0.017509954050183296, -0.01459653303027153, -0.00023531299666501582, 0.04649702087044716, 0.009843830950558186, 0.022601082921028137, 0.01217603962868452, -0.002878474537283182, 0.01815738156437874, -0.03084106184542179, -0.02745678462088108, -0.0023101367987692356, 0.001088854274712503, -0.020393947139382362, 0.002177708549425006, -0.04623216390609741, 0.01581781543791294, -0.02660335786640644, -0.018422236666083336, 0.02833963930606842, -0.032224200665950775, 0.009505403228104115, 0.04378959909081459, -0.019305091351270676, -0.00027014437364414334, 0.03204762935638428, 0.010189616121351719, -0.019981946796178818, 0.032312486320734024, 0.000429701991379261, 0.02477879263460636, 0.020761802792549133, 0.06127012521028519, -0.023351509124040604, -0.033107057213783264, -0.040729034692049026, 0.01803966611623764, -0.008983047679066658, -0.0215122289955616, -0.013669535517692566, 0.005032272543758154, 0.0096599031239748, -0.017053812742233276, -0.03275391459465027, 0.03098820336163044, 0.0058746631257236, 0.010219044983386993, -0.02956092171370983, 0.0035884371027350426, 0.013772535137832165, 0.024793505668640137, 0.021335657685995102, 0.007607265841215849, -0.04311274364590645, -0.005197807680815458, -0.002731332089751959, 0.0019294056110084057, 0.0017224865732714534, -0.01590610109269619, 0.031253062188625336, -0.028604496270418167, -0.01645052805542946, -0.0021574764978140593, -0.011506541632115841, 0.004520952235907316, 0.030370205640792847, -0.010211687535047531, 0.022689368575811386, -0.0015183263458311558, 0.003490955103188753, 0.0052198790945112705, 0.009424475021660328, 0.024749362841248512, 0.02675050124526024, 0.0046423450112342834, -0.00039153691614046693, -0.0076955510303378105, -0.00504330825060606, 0.01752466894686222, 0.03543190658092499, -0.02051166072487831, -0.00729090953245759, 0.013809320516884327, 0.028295496478676796, 0.016170958057045937, -0.0004464854428078979, 0.020908944308757782, -0.00626091193407774, 0.019599376246333122, -0.028045354411005974, 0.014110962860286236, 0.007044445723295212, -0.01142561249434948, 0.007114338222891092, 0.01971709169447422, 0.01007190253585577, 0.0027037428226321936, 0.0020305661018937826, 0.007636694237589836, -0.038374755531549454, 0.003604990430176258, 0.00941711850464344, 0.022071370854973793, 0.019040236249566078, -0.006065948400646448, -0.021615229547023773, 0.01752466894686222, -0.02404307946562767, -0.029472636058926582, 0.01424339134246111, 0.012698395177721977, -0.034931622445583344, -0.0009794171201065183, 0.008534262888133526, -0.01445674803107977, -0.012433539144694805, 0.02188008464872837, 0.007386552169919014, 0.004649701993912458, 0.018790094181895256, 0.017627667635679245, 0.01142561249434948, -0.03201820328831673, -0.01801023818552494, -0.014522962272167206, -0.008659333921968937, 0.03275391459465027, -0.03266562893986702, -0.007026053033769131, -0.017568811774253845, -0.01226432528346777, 0.00039843423292040825, 0.01706852577626705, -0.016582956537604332, -0.019820090383291245, 0.021409230306744576, 0.001914691412821412, -0.029001781716942787, 0.04222988709807396, 0.030120063573122025, 0.004016989376395941, -0.015258674509823322, 0.04376016929745674, 0.013963820412755013, 0.005197807680815458, -0.014302248135209084, -0.008909476920962334, 0.0342547670006752, 0.006963517516851425, -0.009578974917531013, -0.013095679692924023, -0.02620607428252697, 0.008725548163056374, 0.04526102542877197, 0.0005361503572203219, -0.013441464863717556, -0.023366224020719528, 0.025955932214856148, 0.03245962783694267, -0.018024953082203865, 0.0192903783172369, -0.034048765897750854, -0.0346079096198082, -0.026161931455135345, -0.006628768052905798, -0.018848950043320656, 0.008526906371116638, 0.013507679104804993, 0.013522393070161343, -0.019069664180278778, -0.057885847985744476, 0.005124236457049847, -0.0024499220307916403, -0.014221319928765297, 0.0020894231274724007, -0.017142098397016525, 0.020187946036458015, 0.0010539079084992409, 0.05673813819885254, -0.033107057213783264, -0.005631878040730953, 0.005782699212431908, -0.009608402848243713, -0.023631080985069275, -0.027339071035385132, -0.036550190299749374, -0.0006529447273351252, -0.02392536588013172, -0.008585763163864613, -0.03552019223570824, 0.003021938493475318, -3.2798113807075424e-06, 0.016656527295708656, 0.0022218513768166304, 0.017686525359749794, -0.007151124067604542], "index": 92}, {"title": "Beni Mellal", "text": "Beni-Mellal (Berber: Bni Mellal, Arabic: \u0628\u0646\u064a \u0645\u0644\u0627\u0644\u200e) is a Moroccan city located at (32\u00b020\u203222\u2033N 6\u00b021\u203239\u2033W). It is the capital city of the Tadla-Azilal Region, with a population of 489,248 (2010 census).", "vector": [0.017672881484031677, 0.031421344727277756, 0.007017173338681459, -0.010213885456323624, 0.03908825293183327, 0.0003459856379777193, -0.06684507429599762, -0.025365782901644707, -0.026197446510195732, -0.06325852125883102, -0.01639939472079277, -0.01394338347017765, -0.046391312032938004, 0.03994590789079666, 0.021376390010118484, 0.017114106565713882, -0.02446914277970791, 0.014554137364029884, 0.02910827472805977, -0.016594314947724342, -0.012364519760012627, -0.0002984735183417797, 0.036489300429821014, 0.03552768751978874, -0.019518136978149414, -0.008946896530687809, -0.009622624143958092, -0.014943980611860752, -0.013774451799690723, -0.04368840157985687, -0.012455482967197895, 0.004246039781719446, 0.016763247549533844, -0.003437115577980876, -0.0062959641218185425, -0.0059808408841490746, -0.03521581366658211, -0.014749058522284031, -0.0070106759667396545, 0.05247286334633827, 0.019959960132837296, -0.02793874591588974, -0.04160923883318901, 0.007030168082565069, 0.03508586809039116, -0.05847644433379173, 0.06596142798662186, -0.01734801195561886, 0.00348259718157351, -0.01972605474293232, 0.022870786488056183, 0.01895936205983162, -0.03446211665868759, -0.028692442923784256, 0.029758013784885406, 0.011903204955160618, 0.03355248644948006, 0.1191360130906105, -0.020635686814785004, 0.02255891263484955, -0.005964597221463919, -0.026977133005857468, 0.022039122879505157, 0.014450179412961006, 0.02228602208197117, 0.04428616166114807, -0.02307870425283909, 0.00851157121360302, 0.026405364274978638, 0.03019983507692814, -0.004938011057674885, 0.020648682489991188, -0.04761281982064247, -0.02228602208197117, -0.028562495484948158, 0.04267480969429016, 0.013839425519108772, -0.00972658209502697, 0.051199376583099365, 0.009486178867518902, -0.00754346139729023, -0.061543211340904236, 0.01625645160675049, 0.01476205326616764, -0.0011484123533591628, 0.031993113458156586, 0.002546973992139101, -0.0536423921585083, -0.037528883665800095, 0.01890738308429718, -0.030459729954600334, -0.0026103234849870205, -0.04498787969350815, 0.015749655663967133, 0.005529272835701704, 0.0065915947780013084, -0.003152854973450303, 0.005990586709231138, 0.033110663294792175, 0.019414179027080536, -0.02161029540002346, -0.00031857480644248426, -0.01271537784487009, -0.05049765855073929, 0.00784234143793583, 0.06518174707889557, 0.03599550202488899, -0.04925016313791275, 0.02895233780145645, -0.012007162906229496, 0.019089311361312866, -0.004967248998582363, 0.04015382379293442, 0.005155673250555992, -0.03004389815032482, 0.007458995562046766, -0.01841358281672001, -0.010727179236710072, 0.017724860459566116, 0.0008893292397260666, -0.04568959400057793, -0.01607452519237995, 0.019933970645070076, -0.0005908557213842869, 0.008531063795089722, 0.005607241299003363, 0.013917393982410431, -0.020856598392128944, -0.006627330556511879, -0.003375390311703086, -0.04228496551513672, -0.034722015261650085, -0.012526953592896461, 0.010311346501111984, -0.0581645704805851, -0.03295472636818886, 0.043480485677719116, -0.015580723993480206, 0.006614335812628269, -0.03165524825453758, -0.012617917731404305, -0.018595509231090546, -0.07162714749574661, 0.046781156212091446, -0.030355772003531456, -0.06253080815076828, -0.011682294309139252, 0.00957714207470417, 0.07162714749574661, 0.0210645142942667, 0.010727179236710072, -0.011974676512181759, -0.01580163463950157, -0.0003599956107791513, 0.03157728165388107, 0.03869841247797012, -0.0038821862544864416, 0.006042566150426865, -0.023585500195622444, -0.04618339613080025, 0.07329047471284866, 0.05166718736290932, 0.05754082277417183, 0.03415024280548096, -0.019933970645070076, -0.008251676335930824, -0.0036255395971238613, 0.014632105827331543, 0.001154097612015903, 0.014593121595680714, -0.038152631372213364, 0.0006793825887143612, -0.05296666547656059, -0.07516172528266907, 0.05034172162413597, -0.008602534420788288, 0.07536964118480682, 0.025989530608057976, 0.02079162560403347, 0.016620304435491562, 0.03435815870761871, -0.028068693354725838, 0.025274818763136864, -0.00866101123392582, 0.010018964298069477, -0.051823124289512634, 0.009642115794122219, -0.059983838349580765, 0.04264882206916809, -0.009356231428682804, -0.06840444356203079, 0.007666911464184523, 0.04636532440781593, 0.014177288860082626, 0.028302598744630814, 0.03817862272262573, -0.013774451799690723, 0.02073964662849903, 0.04657324030995369, 0.008082743734121323, 0.018296629190444946, 0.028380567207932472, -0.04893828555941582, 0.03927018120884895, 0.08602534979581833, 0.020063918083906174, 0.019843006506562233, -0.03337055817246437, -0.02848452515900135, 0.051277343183755875, -0.0010907481191679835, 0.005311610642820597, -0.023832399398088455, 0.012254063971340656, 0.07178308814764023, -0.013410598039627075, 0.004220050293952227, -0.028796400874853134, 0.011727775447070599, 0.028770411387085915, 0.01083113718777895, -0.03745091333985329, -0.08280264586210251, -0.0642981007695198, -0.0028799648862332106, 0.011136514134705067, 0.004986741114407778, 0.007062654942274094, -0.04870438203215599, -0.0118967080488801, -0.023559510707855225, -0.007569450885057449, -0.008303655311465263, -0.0022269778419286013, -0.03329258784651756, 0.02359849400818348, 0.031447332352399826, -0.019440168514847755, -0.021298421546816826, 0.026418358087539673, 0.015762651339173317, 0.014151299372315407, -0.024573100730776787, 0.0058021629229187965, 0.0366712287068367, -0.037476904690265656, -0.026639269664883614, -0.0018777436343953013, 0.04015382379293442, 0.011669299565255642, -0.0058508929796516895, -0.013189687393605709, 0.018725456669926643, 0.013462577015161514, -0.0017851559678092599, -0.01051926240324974, -0.009408210404217243, 0.038048673421144485, 0.019011342898011208, -0.027237027883529663, -0.014099320396780968, 0.01811470277607441, -0.01734801195561886, 0.0128778126090765, 0.020011939108371735, 0.010525760240852833, -0.05164119973778725, 0.013098723255097866, -0.04004986584186554, 0.008303655311465263, -0.05164119973778725, -0.01925824210047722, 0.022545918822288513, 0.04168720915913582, 0.02248094417154789, -0.013735467568039894, 0.008401116356253624, -0.023780420422554016, 0.0018956114072352648, -0.050133805721998215, 0.055669575929641724, 0.03942611813545227, 0.017205068841576576, 0.005610490217804909, -0.04049168899655342, 0.014060336165130138, 0.008712990209460258, -0.04095949977636337, -0.023663468658924103, -0.005084202159196138, -0.0043922308832407, 0.01069469191133976, -0.003706756979227066, 0.017140096053481102, -0.03661924973130226, 0.01967407576739788, 0.011708283796906471, 0.007088644430041313, 0.00018923627794720232, 0.02851051650941372, -0.027548903599381447, 0.0027256521862000227, -0.012546446174383163, 0.019635090604424477, -0.02496294490993023, -0.0012629288248717785, 0.04381835088133812, 0.009239278733730316, -0.02079162560403347, -0.020037928596138954, -0.01645137369632721, -0.025794610381126404, 0.024625081568956375, -0.017685875296592712, -0.03615143895149231, -0.00845959223806858, -0.022052116692066193, -0.02079162560403347, -0.03165524825453758, 0.028666453436017036, -0.016906190663576126, -0.04145330190658569, -0.001793277682736516, -0.04932812973856926, -0.036905135959386826, 0.02352052554488182, -0.0003599956107791513, 0.00867400597780943, 0.010109927505254745, -0.05858040228486061, -0.05080953240394592, 0.011052047833800316, -0.03895830735564232, -0.016243457794189453, -0.020635686814785004, 0.022169070318341255, 0.0357356034219265, -0.025443751364946365, 0.006140026729553938, 0.0026720487512648106, -8.172489469870925e-05, 0.02029782347381115, 0.028380567207932472, 0.01773785427212715, 0.05044567957520485, 0.009707089513540268, -0.01925824210047722, 0.017127100378274918, 0.02791275642812252, -0.005048466380685568, 0.0004954254254698753, -0.008914409205317497, -0.024729039520025253, 0.03739893436431885, 0.020128892734646797, -0.045247774571180344, -0.04870438203215599, -0.024975938722491264, -0.026587290689349174, 0.026483332738280296, -0.015489760786294937, -0.025105886161327362, -0.02793874591588974, 0.0017981507116928697, -0.022584902122616768, -0.005464299116283655, 0.006520123686641455, 0.008920906111598015, -0.016568325459957123, -0.011389912106096745, 0.06045164912939072, 0.04379235953092575, 0.0038432020228356123, 0.06939204782247543, -0.0028149911668151617, 0.03009587712585926, 0.03022582456469536, 0.0028734675142914057, 0.0032584373839199543, -0.01065570767968893, -0.023169666528701782, -0.0064746420830488205, -0.008056754246354103, -0.03544972091913223, -0.00859603751450777, -0.004915270023047924, 0.045195795595645905, -0.033188629895448685, -0.01816668175160885, -0.027756819501519203, 0.006497382652014494, -0.03495591878890991, 0.038646433502435684, -0.02843254618346691, 0.03955606743693352, 0.02908228524029255, -0.024923959746956825, -0.010889613069593906, 0.020830608904361725, -0.009908508509397507, -0.0007541024824604392, -0.007796859368681908, 0.004609893076121807, -0.020167876034975052, 0.02046675607562065, -0.015385802835226059, 0.014333226718008518, -0.09881220012903214, 0.024495132267475128, 0.01942717470228672, 0.011298948898911476, -0.00029360048938542604, -0.008095738478004932, 0.007270571310073137, -0.02089558355510235, -0.028692442923784256, 0.014372210949659348, 0.0038821862544864416, -0.043506473302841187, -0.026665259152650833, -0.02602851577103138, -0.037996694445610046, -0.0015869857743382454, -0.014814033173024654, -0.033630453050136566, 0.04555964842438698, -0.04787271469831467, 0.03238295391201973, -0.03009587712585926, 0.036489300429821014, -0.05073156580328941, -0.007400518748909235, -0.034280192106962204, 0.01506093330681324, 0.048574432730674744, 0.008355634286999702, 0.04389631748199463, -0.007160115987062454, 0.004847047384828329, 0.020206861197948456, 0.004434463568031788, -0.004233045037835836, -0.026314400136470795, 0.06653320044279099, -0.03378638997673988, -0.00022903273929841816, 0.02793874591588974, -0.04361043497920036, 0.004236293490976095, -0.012650404125452042, -0.0548379123210907, 0.026951143518090248, -0.023663468658924103, 0.04036174342036247, 0.01274136733263731, 0.00433050561696291, 0.02163628488779068, 0.04457204416394234, -0.0030375265050679445, 0.008173707872629166, -0.033734411001205444, -0.0057404376566410065, -0.028770411387085915, -0.01476205326616764, 0.009193796664476395, -0.027003122493624687, -0.00755645614117384, 0.05644926056265831, 0.014216273091733456, 0.030797595158219337, 0.01704913191497326, 0.06741684675216675, -0.02354651503264904, -0.020921573042869568, 0.018764441832900047, -0.028068693354725838, -0.029861971735954285, -0.0487823486328125, -0.025963541120290756, -0.020128892734646797, 0.03765882924199104, 0.002482000272721052, -0.02294875681400299, 0.012143608182668686, 0.009785058908164501, 0.02076563611626625, -0.014359216205775738, -0.010350330732762814, -0.023949353024363518, -0.013449582271277905, 0.008855932392179966, -0.018972357735037804, 0.006075053010135889, 0.033136650919914246, -0.01058423612266779, 0.01702314242720604, 0.00754346139729023, -0.0097655663266778, -0.06346643716096878, 0.01202015858143568, -0.028224630281329155, 0.006201751995831728, 0.02144136279821396, -0.00967460311949253, 0.03773679956793785, 0.042908716946840286, -0.035891544073820114, -0.032538894563913345, 0.02461208589375019, -0.015541739761829376, 0.009733079001307487, 0.03552768751978874, 0.020726650953292847, -0.02270185574889183, -0.008180204778909683, -0.026743227615952492, 0.017425980418920517, -0.030797595158219337, -0.03602148965001106, -0.006497382652014494, 0.009992974810302258, -0.01950514316558838, 0.0009664857061579823, 0.024196254089474678, -0.015008954331278801, -0.007329047657549381, -0.015775645151734352, -0.020583707839250565, -0.006243984680622816, -0.07490182667970657, 0.004307764582335949, 0.012819335795938969, -0.013709478080272675, 0.02471604384481907, 0.009375723078846931, 0.006672812160104513, -0.023754430934786797, -0.03732096776366234, -0.04641730338335037, 0.00975257158279419, -0.007647419348359108, 0.010454288683831692, 0.0354757085442543, 0.0075044771656394005, 0.02446914277970791, 0.011565341614186764, 0.03071962483227253, 0.014515153132379055, -0.009518666192889214, -0.011181996203958988, 0.04106345772743225, -0.010798649862408638, 0.023442557081580162, -0.020609697327017784, -0.04418220371007919, 0.021753236651420593, 0.004934762138873339, -0.02161029540002346, -0.02632739581167698, 0.019076315686106682, 0.028848379850387573, -0.025911562144756317, -0.007335545029491186, 0.021233446896076202, -0.026951143518090248, 0.00955115258693695, -0.00972658209502697, 0.004512432496994734, 0.017153089866042137, -0.022091101855039597, 0.010337335988879204, -0.017101110890507698, 0.03500789776444435, -0.025599688291549683, -0.0014675963902845979, -0.013748462311923504, 0.008017770014703274, -0.013371613807976246, -0.015125907026231289, 0.0003518738958518952, 0.02404031716287136, -0.021896179765462875, 0.051797136664390564, 0.004171319771558046, 0.007153618615120649, -0.003982895519584417, 0.040257785469293594, -0.005288869608193636, 0.005526023916900158, 0.012169597670435905, 0.08004775643348694, -0.02900431677699089, -0.02346854656934738, -0.00985003262758255, -0.02294875681400299, -0.0172700434923172, 0.012936289422214031, 0.010246372781693935, -0.004460453055799007, 0.005958099849522114, -0.010590733960270882, -0.01285182312130928, 0.015502755530178547, 0.001162219326943159, 0.05650123953819275, -0.007744880393147469, -0.004103097133338451, 0.019843006506562233, -0.02431320585310459, -0.000877958838827908, -0.011013063602149487, 0.021597299724817276, 0.01395637821406126, 0.0026785461232066154, -0.01945316419005394, 0.009109330363571644, -0.01095458772033453, -0.04389631748199463, -0.000756538996938616, -0.07562953233718872, -0.012474974617362022, -0.016711268573999405, 0.0074460008181631565, -0.0007134938496164978, -0.008043759502470493, -0.009992974810302258, 0.017140096053481102, -0.0010330838849768043, 0.006926210131496191, -0.03069363534450531, 0.019466158002614975, 0.021675268188118935, 0.018127698451280594, 0.0017071872716769576, -0.004743089433759451, -0.0195311326533556, -0.007465492933988571, -0.012910299934446812, -0.017412986606359482, -0.010155409574508667, 0.020427770912647247, -0.01830962486565113, 0.0013092226581647992, -0.04719698801636696, -0.008979382924735546, 0.00039227947127074003, -0.006705299019813538, -0.006536366883665323, -0.005292118061333895, -0.006624081637710333, 0.023689458146691322, -0.03724299743771553, 0.01912829466164112, 0.006429160479456186, -0.006913215387612581, 0.0014667841605842113, 0.01590559259057045, -0.012832330539822578, 0.023481542244553566, 0.011454885825514793, -0.03570961579680443, -0.016711268573999405, 0.0032600618433207273, -0.007608435116708279, 0.03617742657661438, 0.0030245317611843348, -0.0442601703107357, 0.03498191013932228, 0.033136650919914246, -0.01858251541852951, -0.040283773094415665, -0.03126540407538414, 0.005025725346058607, -0.011214482598006725, 0.006153021473437548, 0.006640325300395489, -0.06705299019813538, -0.01069469191133976, -0.0037327464669942856, 0.012721875682473183, 0.017659885808825493, -0.02436518482863903, -0.015294838696718216, 0.060503628104925156, -0.032590873539447784, 0.0017542933346703649, -0.0295500960201025, 0.00037420864100567997, 0.016802232712507248, -0.0017851559678092599, 0.051277343183755875, 0.0033851363696157932, -0.025885572656989098, -0.018348608165979385, 0.014606116339564323, -0.004847047384828329, 0.012312540784478188, -0.039218202233314514, -0.015593718737363815, -0.03734695538878441, -0.006630579009652138, -0.015762651339173317, -0.051745157688856125, -0.009278262965381145, -0.02791275642812252, 0.035813573747873306, 0.0024072802625596523, -0.032123059034347534, 0.03191514313220978, -0.02515786699950695, 0.0019443418132141232, -0.0025453497655689716, 0.05112140625715256, 0.012923294678330421, -0.022883782163262367, -0.01890738308429718, -0.0020223103929311037, 0.008803953416645527, 0.01734801195561886, 0.0069002206437289715, 0.024183258414268494, 0.04293470457196236, 0.0005027349689044058, -0.008966388180851936, -0.014956975355744362, -0.0026476834900677204, 0.008186702616512775, -0.01256593782454729, -0.022584902122616768, 0.0016430256655439734, -0.06835246831178665, 0.005152424331754446, -0.01478804275393486, 0.010129420086741447, -0.0070691523142158985, 0.011104026809334755, 0.001187396701425314, -0.012260560877621174, 0.01623046211898327, 0.01895936205983162, -0.0017299281898885965, -0.04314262047410011, 0.040777575224637985, -0.03846450522542, -0.01751694455742836, 0.023962346836924553, -0.017828818410634995, 0.012819335795938969, 0.0015082049649208784, 0.005815157666802406, 0.01304024737328291, -0.009304252453148365, 0.017776839435100555, -0.03888033702969551, -0.014476168900728226, 0.04218100756406784, 0.07703296840190887, 0.013098723255097866, 0.005958099849522114, -0.050575628876686096, -0.023286620154976845, -0.039166223257780075, 0.043558452278375626, -0.00949267577379942, -0.004986741114407778, -0.0351378470659256, -0.057800717651844025, 0.005600743927061558, -0.015424787066876888, 0.019414179027080536, 0.006672812160104513, -0.01702314242720604, 0.007166613359004259, 0.02228602208197117, 0.042986683547496796, 0.020908577367663383, 0.051771145313978195, -0.02384539507329464, -0.017412986606359482, -0.023936357349157333, 0.017893793061375618, -0.03823060169816017, 0.05473395064473152, 0.030771605670452118, 0.013566534966230392, 0.03469602391123772, -0.009447194635868073, -0.034202221781015396, -0.010590733960270882, -0.025352787226438522, -0.00851157121360302, -0.032668840140104294, -0.02485898695886135, -0.011851225979626179, -0.007907315157353878, 0.021220451220870018, -0.0007435442530550063, -0.013007760047912598, 0.012929791584610939, 0.020674671977758408, 0.004687861539423466, -0.01509991753846407, 0.029835982248187065, 0.03136936575174332, -0.0012840452836826444, 0.03326660022139549, -0.016035540029406548, 0.010148911736905575, 0.010285357013344765, -0.014892001636326313, -0.008992377668619156, -0.02044076658785343, 0.00048811588203534484, -0.0078033567406237125, 0.004876285791397095, 0.0023260631132870913, 0.0330067053437233, -0.0006107539520598948, 0.025794610381126404, 0.03352649509906769, 0.05416218191385269, -0.028900358825922012, 0.009031361900269985, -0.02595054730772972, 0.0007082147058099508, -0.010207388550043106, 0.0012669896241277456, -0.005454552825540304, -0.04020580276846886, 0.013228671625256538, -0.010012466460466385, 0.026691248640418053, -0.03882835805416107, -0.0027597632724791765, -0.019037332385778427, -0.023143677040934563, -0.057124990969896317, -0.005724193993955851, -0.0012182592181488872, 0.04883432760834694, -0.013397603295743465, 0.007627927232533693, 0.06065956503152847, -0.004704105202108622, -0.007218592334538698, 0.03136936575174332, 0.03191514313220978, -0.027081090956926346, 0.024703050032258034, -0.008284162729978561, 0.002542101079598069, 0.005698204506188631, -0.024079300463199615, -0.0127283725887537, -0.009661608375608921, -0.022350996732711792, 0.01868647336959839, 0.0028620969969779253, 0.010077441111207008, 0.031109469011425972, 0.001973580103367567, -0.0003626351826824248, -0.005210901144891977, -0.03734695538878441, -0.0033494008239358664, -0.008115231059491634, -0.03924419358372688, -0.0075629535131156445, 0.003107373369857669, 0.020999541506171227, 0.00832314696162939, -0.04329855740070343, 0.014736063778400421, 0.020583707839250565, 0.020154882222414017, -0.018231656402349472, -0.012845325283706188, 0.04010184481739998, 0.008297157473862171, 0.011552346870303154, 0.021675268188118935, 0.025937551632523537, 0.020726650953292847, -0.012949284166097641, -0.053486455231904984, 0.013917393982410431, -0.0075629535131156445, -0.025118881836533546, -0.028328588232398033, -0.045715585350990295, -0.005282372236251831, -0.03220102936029434, 0.033084671944379807, -0.001965458272024989, 0.028822390362620354, 0.019193269312381744, 0.0059808408841490746, 0.012643907219171524, -0.026366379112005234, -0.001351455575786531, 0.034176234155893326, -0.018374597653746605, 0.008667509071528912, -0.010168404318392277, 0.024923959746956825, -0.01977803371846676, 0.015125907026231289, 0.02161029540002346, 0.0011792749864980578, 0.01781582273542881, -0.005555262323468924, 0.016009550541639328, 0.01945316419005394, -0.0327468104660511, -0.01808871328830719, -0.020037928596138954, -0.009083340875804424, 0.030797595158219337, 0.006084798835217953, 0.04345449432730675, 0.03064165636897087, 0.0018143941415473819, 0.004629385191947222, -0.06253080815076828, 0.0012645531678572297, -0.002853975398465991, 0.010168404318392277, 0.03383836895227432, 0.0295500960201025, -0.003960154950618744, 0.030511708930134773, 0.009512168355286121, 0.009570645168423653, 0.005951602477580309, 0.05416218191385269, -0.01365749817341566, 0.010408807545900345, 0.016295436769723892, -0.009947492741048336, -0.0014034346677362919, 0.01923225261271, -0.024845991283655167, 0.022299017757177353, -0.01316369790583849, -0.026119478046894073, -0.01803673431277275, -0.010233378037810326, 0.0019232253544032574, -0.023910367861390114, 0.02292276732623577, -0.010486776009202003, -0.0469890721142292, -0.007679906208068132, 0.011110524646937847, 0.04654724895954132, 0.03544972091913223, -0.03282477706670761, 0.023286620154976845, -0.05265479162335396, 0.014853017404675484, 0.023104693740606308, 0.020401781424880028, -0.03191514313220978, 0.014021351933479309, 0.00493151368573308, 0.0073745292611420155, -0.0028344832826405764, -0.018023740500211716, 0.03139535337686539, -0.014229267835617065, -0.005318108014762402, 0.0366712287068367, 0.03981596231460571, 0.04181715473532677, -0.040257785469293594, 0.002548598451539874, -0.02193516492843628, 0.0140083571895957, 0.039114244282245636, 0.010727179236710072, 0.020986545830965042, -0.015918588265776634, 0.03625539690256119, -0.02218206413090229, 0.049094222486019135, 0.06372632831335068, -0.01208513230085373, -0.019466158002614975, 0.023689458146691322, 0.014242262579500675, -0.021896179765462875, -0.05473395064473152, 0.01882941462099552, -0.011792750097811222, 0.030355772003531456, 0.006029571406543255, 0.0035345761571079493, 0.0233256034553051, 0.011104026809334755, -0.009928001090884209, 0.00597434351220727, -0.006815754342824221, 0.019765038043260574, -0.015385802835226059, 0.051797136664390564, -0.0006968443049117923, -0.03134337440133095, 0.003183717606589198, 0.006744283251464367, 0.025079896673560143, 0.0008121728315018117, 0.025989530608057976, -0.0030716375913470984, 0.03555367887020111, 0.0351378470659256, 0.011136514134705067, -0.021571310237050056, 0.00987602211534977, 0.024183258414268494, 0.013085728511214256, 0.017361007630825043, 0.012637409381568432, -0.02848452515900135, 0.028744421899318695, -0.02461208589375019, 0.013878409750759602, 0.011246969923377037, -0.04589751362800598, 0.0330067053437233, -0.006455149967223406, -0.003100875997915864, 0.005288869608193636, 0.009265268221497536, 0.03745091333985329, -0.04490990936756134, -0.015528745017945766, 0.03355248644948006, 0.017711864784359932, 0.010538754984736443, -0.009798053652048111, -0.004447458311915398, 0.02084360457956791, -0.014372210949659348, 0.012585430406033993, -0.02114248275756836, -0.017724860459566116, -0.014619111083447933, -0.020986545830965042, -0.0077513777650892735, 0.01860850490629673, -0.004694358911365271, -0.014593121595680714, 0.012117618694901466, -0.0005847644642926753, 0.010018964298069477, -0.01565869338810444, -0.003159352345392108, -0.009102833457291126, -0.012487969361245632, -0.013631508685648441, 0.0007260825368575752, -0.02357250452041626, -0.03500789776444435, -0.0017802828224375844, 0.010987074114382267, 0.04228496551513672, 0.03282477706670761, 0.011305445805191994, 0.02436518482863903, 0.011039053089916706, -0.0048080631531775, -0.014671090058982372, -0.0019817017018795013, 0.002015813020989299, 0.03170722723007202, 0.0354757085442543, 0.01669827289879322, -0.0219611544162035, 0.02962806634604931, -0.02079162560403347, 0.008394618518650532, 0.0022091101855039597, 0.02193516492843628, 0.01504793856292963, 0.015749655663967133, -0.023832399398088455, 0.0005543079460039735, -0.00849857646971941, -0.028354577720165253, -0.02567765675485134, -0.008134723640978336, 0.0210645142942667, -0.030797595158219337, 0.009343236684799194, 0.014463174156844616, -0.016763247549533844, 0.02731499634683132, -0.0032389452680945396, -0.0055617596954107285, -0.0307456161826849, -0.011084535159170628, 5.908557432121597e-05, 0.023442557081580162, -0.007900817319750786, -0.016529342159628868, -0.003713254351168871, -0.028666453436017036, 0.05143328383564949, -0.028562495484948158, -0.04587152227759361, -0.02277982421219349, 0.03680117428302765, 0.04171319678425789, 0.01888139359652996, 0.010356828570365906, -0.00652662105858326, 0.015723666176199913, 0.015333822928369045, 0.008940398693084717, 0.026717238128185272, -0.0030586428474634886, 0.012799844145774841, -0.0031853418331593275, -0.008011273108422756, 0.04259684309363365, -0.02952410653233528, -0.022221049293875694, 0.02002493292093277, 0.002553471364080906, -0.018673477694392204, -0.026613280177116394, 0.008290660567581654, 0.028276609256863594, 0.02223404310643673, 0.043922308832407, -0.009557650424540043, 0.003580057993531227, 0.003924419172108173, 0.0001221304846694693, -0.01399536244571209, 0.009336738847196102, 0.024300212040543556, -0.010194393806159496, 0.021376390010118484, 0.0131766926497221, -0.011233975179493427, -0.01278035156428814, -0.0015926709165796638, -0.02796473540365696, 0.03004389815032482, 0.028744421899318695, -0.0038334557320922613, -0.0035703119356185198, 0.001139478525146842, -8.253706619143486e-05, -0.028250619769096375, 0.0012921669986099005, -0.01920626312494278, -0.06372632831335068, -0.016321426257491112, -0.011981173418462276, 0.02692515403032303, -0.008479084819555283, 0.03170722723007202, 0.004031626041978598, -0.013397603295743465, -0.010226880200207233, -0.026197446510195732, 0.0043175108730793, 0.03157728165388107, -0.017750849947333336, 0.02580760419368744, -0.025079896673560143, 0.001905357465147972, -0.01972605474293232, -0.06653320044279099, -0.023403571918606758, -0.036359354853630066, 0.0061660162173211575, -0.049588024616241455, -0.025118881836533546, 0.021155478432774544, -0.008907911367714405, 0.03456607460975647, -0.004031626041978598, -0.022325007244944572, -0.027756819501519203, 0.028328588232398033, 0.006084798835217953, -0.030433740466833115, -0.002205861499533057, 0.007523969281464815, 0.005704701878130436, 0.01650335267186165, 0.016802232712507248, 0.0007102451636455953, 0.036957114934921265, 0.028120672330260277, 0.0030212830752134323, -0.02471604384481907, -0.0034566076938062906, -0.029498117044568062, 0.024300212040543556, -0.020661676302552223, -0.018075719475746155, 0.023416567593812943, 0.008992377668619156, -0.04101147875189781, 0.020154882222414017, 0.035397741943597794, -0.032097071409225464, -0.016659289598464966, -0.0077513777650892735, -0.020037928596138954, -0.0005116689135320485, -0.020336808636784554, 0.007043162826448679, -0.006620833184570074, 0.020141886547207832, 0.013358619064092636, 0.03446211665868759, 0.002808493794873357, 0.02213008515536785, 0.024157268926501274, 0.018205666914582253, 0.004434463568031788, -0.033734411001205444, -0.029809992760419846, -0.025989530608057976, -0.010181399062275887, 0.020752640441060066, 0.017283037304878235, -0.01304024737328291, -0.005181662738323212, -0.05520176514983177, -0.008751974441111088, 0.014073330909013748, 0.03825658932328224, -0.016061529517173767, 0.011630315333604813, -0.013248163275420666, 0.010142414830625057, -0.024209247902035713, 0.020804619416594505, 0.01582762412726879, 0.06502580642700195, -0.0060393172316253185, -0.006705299019813538, -0.017335018143057823, -0.015450776554644108, 0.019881991669535637, 0.0018192671705037355, -0.006815754342824221, 0.0130272526293993, -0.001158158527687192, 0.005971094593405724, 0.020921573042869568, 0.011552346870303154, 0.01645137369632721, 0.012273555621504784, -0.009992974810302258, -0.010402309708297253, -0.023130683228373528, 0.03376040235161781, -0.02567765675485134, 0.030329782515764236, 0.015346817672252655, 0.03843851760029793, 0.029887961223721504, 0.0497179739177227, 0.03890632838010788, 0.014489163644611835, 0.0010103429667651653, -0.008699995465576649, -0.02044076658785343, 0.010051450692117214, -0.02292276732623577, 0.009525163099169731, 0.023663468658924103, -0.020960556343197823, -0.009668105281889439, -0.0025226089637726545, -0.017114106565713882, -0.027548903599381447, 0.03230498731136322, -0.042440902441740036, -0.019894985482096672, -0.011669299565255642, 0.02550872415304184, 0.02739296667277813, 0.02384539507329464, -0.04205106198787689, -0.01476205326616764, 0.02456010691821575, -0.053434476256370544, -0.01173427328467369, -0.00871948804706335, 0.03017384558916092, -0.0051979064010083675, -0.02622343599796295, 0.013209179043769836, 0.001120798522606492, 0.004986741114407778, 0.024807007983326912, 0.017880797386169434, 0.009772063232958317, -0.002361798658967018, -0.013774451799690723, -0.008303655311465263, 0.014606116339564323, -0.019037332385778427, 0.01778983324766159, 5.888253144803457e-05, 0.005227144341915846, 0.01863449439406395, -0.013111717998981476, -0.0024755029007792473, -0.005480542313307524, 0.015268849208950996, 0.0022887031082063913, -0.01072068139910698, -0.012936289422214031, -0.008687000721693039, -0.008602534420788288, -0.04568959400057793, 0.013274152763187885, 0.007523969281464815, 0.013358619064092636, -0.013222173787653446, -0.03555367887020111, 0.026288410648703575, 0.01637340523302555, -0.02572963573038578, -0.03555367887020111, 0.03986794129014015, 0.0045806546695530415, -0.008505074307322502, 0.011402906849980354, 0.016490356996655464, -0.001158158527687192, 0.011370419524610043, -0.011311943642795086, -7.91868515079841e-05, -0.0016422135522589087, 0.013865415006875992, 0.01838759332895279, 0.025612682104110718, 0.030901553109288216, -0.012150106020271778, -0.014099320396780968, 0.020882587879896164, -0.008258173242211342, -0.03113545849919319, -0.013105221092700958, -0.02845853567123413, -0.007679906208068132, -0.03508586809039116, 0.028224630281329155, 0.03186316415667534, -0.009135319851338863, 9.101411706069484e-05, -0.011656304821372032, 0.003934165462851524, 0.011558843776583672, 0.007777367252856493, -0.03012186661362648, -0.010057948529720306, -0.016737258061766624, -0.033084671944379807, -0.025794610381126404, 0.03238295391201973, 0.04436412826180458, -0.0012093253899365664, -0.01623046211898327, -0.014632105827331543, 0.027574893087148666, 0.0007727824850007892, 0.004986741114407778, -0.0345400869846344, -0.0045221783220767975, 0.04379235953092575, 0.002525857649743557, -0.0012759235687553883, 0.005022476892918348, -0.006013327743858099, 0.017231058329343796, -0.015138901770114899, -0.008056754246354103, -0.026665259152650833, 0.017906786873936653, -0.025222839787602425, 0.018478557467460632, -0.0014464798150584102, -0.05416218191385269, 0.011500367894768715, -0.026977133005857468, -0.003982895519584417, 0.026665259152650833, 0.02002493292093277, 0.004483194090425968, -0.024352191016077995, -0.008069748990237713, -0.006234238855540752, 0.00755645614117384, -0.0626867488026619, 0.0210645142942667, 0.036931123584508896, 0.026119478046894073, 0.01393038872629404, 0.030381761491298676, -0.002974177012220025, 0.014177288860082626, 0.03321462124586105, -0.002590831369161606, 0.009284759871661663, 0.00866101123392582, 0.015242859721183777, 0.0037392438389360905, -0.02376742660999298, 0.0020434269681572914, 0.008641518652439117, 0.014242262579500675, -0.002397534204646945, 0.014463174156844616, 0.023611489683389664, -0.024651071056723595, 0.003632036969065666, 0.0022367241326719522, -0.027756819501519203, -0.004421468824148178, 0.027107080444693565, 0.0008194823749363422, -0.004099848680198193, -0.004541670437902212, 0.042960695922374725, -0.010155409574508667, -0.00738102663308382, -0.008102236315608025, 0.0363333635032177, 0.004544919356703758, 0.004730094689875841, -0.022013133391737938, 0.03012186661362648, 0.011201487854123116, -0.034202221781015396, -0.00947968102991581, 0.007322550285607576, -0.03243493661284447, -0.03490393981337547, 0.002278957050293684, -0.020011939108371735, 0.00635119155049324, -0.0015187632525339723, 0.027522914111614227, 0.0017396742478013039, 0.02002493292093277, -0.021623289212584496, -0.0054935370571911335, 0.040725596249103546, 0.028822390362620354, -0.016165487468242645, -0.043012674897909164, -0.023182662203907967, -0.02736697532236576, 0.006802759598940611, -0.022870786488056183, 0.016087519004940987, -0.0018322619143873453, 0.004278526641428471, 0.023754430934786797, -0.013800441287457943, 0.026340389624238014, -0.016841216012835503, 0.006399922072887421, -0.029861971735954285, -0.00755645614117384, -0.011695289053022861, 0.015216870233416557, 0.028250619769096375, 0.03469602391123772, -0.024261226877570152, 0.0017461716197431087, 0.022883782163262367, 0.025326797738671303, -0.002413777634501457, 0.0048308041878044605, 0.0064746420830488205, -0.001591858803294599, 0.015359812416136265, -0.02161029540002346, -0.004145330283790827, 0.04966599494218826, -0.029472127556800842, 0.03771080821752548, -0.016269447281956673, 7.030371489236131e-05, 0.026262421160936356, 0.03557966649532318, -0.013222173787653446, 0.029861971735954285, 0.0025144871324300766, -0.04368840157985687, 0.009544655680656433, -0.028042703866958618, -0.007913812063634396, -0.015528745017945766, -0.02905629575252533, -0.00215875543653965, -0.001247497508302331, 0.02853650599718094, 0.016529342159628868, 0.02466406486928463, -0.022818807512521744, -0.016282441094517708, -0.006393424700945616, 0.007595440372824669, 0.046807143837213516, -0.020128892734646797, 0.016633300110697746, 0.029498117044568062, 0.008855932392179966, 0.015775645151734352, 0.0015691178850829601, -0.008589539676904678, -0.014385205693542957, -0.04976995289325714, -0.018842410296201706, -0.05385030806064606, 0.0009616126772016287, 0.002530730562284589, 0.03004389815032482, -0.007426508702337742, -0.04501386731863022, 0.02488497644662857, 0.014645100571215153, 0.028094682842493057], "index": 93}, {"title": "High-speed steel", "text": "High-speed steel (HSS or HS) is a subset of tool steels, commonly used in tool bits and cutting tools.It is often used in power-saw blades and drill bits. It is superior to the older high-carbon steel tools used extensively through the 1940s in that it can withstand higher temperatures without losing its temper (hardness). This property allows HSS to cut faster than high carbon steel, hence the name high-speed steel.", "vector": [0.025558795779943466, 0.039122700691223145, -0.023505879566073418, 0.015382200479507446, 0.037890952080488205, 0.013343948870897293, 0.0008614912512712181, -0.04448960721492767, 0.011298365890979767, -0.0006002944428473711, -0.00047519488725811243, 0.04290593042969704, 0.03111632913351059, 0.012852716259658337, -0.007456481456756592, 0.05619122460484505, 0.022068839520215988, 0.024224400520324707, 0.01000796165317297, -0.0478035993874073, 0.06475481390953064, -0.028696822002530098, -0.06311248242855072, -0.03284664452075958, -0.0020675789564847946, -0.02954731695353985, 0.004494417924433947, 0.0025038234889507294, -0.09150136262178421, -0.02145296521484852, -0.0018705357797443867, -0.007342838216573, -0.011364351958036423, -0.013167984783649445, 0.058390773832798004, 0.012647424824535847, -0.008446279913187027, 0.001985095674172044, -0.055311404168605804, 0.00019750144565477967, 0.025397494435310364, -0.05173346400260925, -0.033726464956998825, 0.038301534950733185, 0.008475607261061668, 0.001821962301619351, -0.0031141990330070257, 0.002324193250387907, 0.023344580084085464, -0.005997445434331894, -0.006279721390455961, 0.05129355564713478, 0.0037575680762529373, 0.0324360616505146, 0.00177155586425215, 0.006466683000326157, 0.06622117757797241, 0.1239960789680481, -0.016848569735884666, 0.008666235022246838, -0.04135157912969589, -0.009487401694059372, 0.006704967934638262, -0.024327045306563377, -0.007064227946102619, -0.025676105171442032, 0.010191258043050766, 0.026995835825800896, -0.033491846174001694, -0.013409935869276524, -0.06059032678604126, -0.010271907784044743, 0.08053293079137802, 0.02752372808754444, -0.007771750446408987, -0.006107422988861799, 0.02783166617155075, 0.005858140531927347, -0.0027384422719478607, -0.007254855707287788, 0.014949622564017773, 0.020807761698961258, 0.012581437826156616, -0.008160337805747986, 0.02148229256272316, -0.007144878152757883, -0.004241469781845808, -0.037568349391222, 0.014260428957641125, -0.015895429998636246, -0.02926870621740818, 0.004743700847029686, 0.043463148176670074, -0.0006552832201123238, -0.023388570174574852, 0.04217274487018585, -0.00038240128196775913, -0.012163522653281689, 0.009575383737683296, 0.030207181349396706, -0.012889374978840351, 0.013571236282587051, 0.00857092160731554, -0.017713725566864014, -0.0009256448247469962, -0.04457758739590645, -0.00646301731467247, 0.01564614661037922, 0.03613130748271942, -0.02305130660533905, -0.018564218655228615, -0.026423951610922813, 0.008717558346688747, -9.760512330103666e-05, 0.01286004763096571, -0.022318121045827866, 0.02657058835029602, -0.0031581902876496315, 0.013688545674085617, 0.02415108121931553, -0.04255400225520134, 0.06463750451803207, 0.002666956977918744, 0.007529799826443195, -0.03419570252299309, 0.028154266998171806, -0.01922408491373062, -0.008160337805747986, -0.01244946476072073, -0.048448801040649414, 0.005733498837798834, 0.005755494814366102, 0.0631711333990097, -0.0014535373775288463, 0.01970798708498478, -0.02291933260858059, 0.036424580961465836, 0.021130364388227463, 0.0093920873478055, 0.010367222130298615, -0.048888709396123886, -0.005682175979018211, -0.03838951513171196, 0.025998705998063087, 0.040765032172203064, -0.006268723402172327, -0.022992650046944618, 0.006184407044202089, -0.019620005041360855, 0.03445965051651001, 0.04047175869345665, -0.02790498360991478, -0.015734128654003143, -0.026981171220541, -0.0009998796740546823, -0.009736684150993824, -0.04789157956838608, 0.02772901952266693, -0.028095612302422523, -0.00558319641277194, 0.02291933260858059, -0.05079498887062073, -0.005744496826082468, 0.029151396825909615, -0.02469363808631897, 0.009252781979739666, -0.020133232697844505, -0.01991327852010727, -0.03319857269525528, 0.0148543082177639, 0.03170287609100342, 0.03915202617645264, 0.020103905349969864, -0.04736368730664253, 0.005586862098425627, 0.00836563017219305, -0.019356058910489082, 0.016789915040135384, 0.017904354259371758, -0.005935124587267637, -0.008328970521688461, 0.010873119346797466, 0.031028347089886665, -0.025573458522558212, 0.013101998716592789, -0.02387247234582901, 0.013497917912900448, 0.07695499807596207, -0.025353504344820976, -0.020441170781850815, -0.03011919930577278, 0.004780360031872988, 0.016921887174248695, 0.004076503217220306, -0.000938017328735441, -0.03008987195789814, -0.03762700408697128, -0.017977671697735786, 0.006899261847138405, -0.027362428605556488, -0.014385070651769638, 0.01202421821653843, 0.021057045087218285, -0.009538724087178707, 0.06721831113100052, 0.048272836953401566, 0.027860993519425392, 0.006008442956954241, -0.0508829727768898, 0.012794061563909054, 0.035632744431495667, 0.008944844827055931, -0.014927626587450504, -0.03272933512926102, -0.005487882532179356, -0.011379015631973743, 0.006133084185421467, -0.023931127041578293, -0.015602155588567257, 0.025764087215065956, -0.01819762773811817, -0.0022307124454528093, 0.02541215904057026, -0.031820185482501984, -0.022567404434084892, -0.029122069478034973, -0.012574106454849243, 0.031438931822776794, 0.024165745824575424, 0.005707837641239166, 0.062174003571271896, -0.0010521190706640482, 0.017229825258255005, 0.020235879346728325, -0.031438931822776794, 0.01523556374013424, -0.002892411081120372, -0.024869602173566818, -0.008380293846130371, -0.06287786364555359, 0.03979722782969475, 0.006041436456143856, 0.009897984564304352, -0.0009852160001173615, -0.08147140592336655, -0.025118885561823845, 0.015088927000761032, -0.04070637747645378, -0.0044724224135279655, -0.007815741933882236, 0.005605191923677921, -0.011730944737792015, 0.018564218655228615, 0.04821418225765228, 0.03504619747400284, -0.004740034695714712, -0.016335340216755867, 0.014304419979453087, 0.027567720040678978, -0.024224400520324707, 0.019751977175474167, -0.011093074455857277, -6.121800311120751e-07, 0.054460909217596054, -0.042466018348932266, 0.003728240728378296, 0.032084133476018906, -0.03988521173596382, -0.008175001479685307, 0.018490901216864586, 0.022068839520215988, -0.03794960677623749, 0.017743052914738655, 0.002098739380016923, 0.020367851480841637, -0.050736334174871445, 0.006833275314420462, 0.017699062824249268, -0.008600248955190182, 0.00877621304243803, -0.007515136152505875, -0.006287053227424622, 0.05648449808359146, 0.03794960677623749, -0.030207181349396706, -0.05243732035160065, -0.03179085999727249, 0.011899576522409916, 0.04091166704893112, -0.012750070542097092, -0.014802985824644566, -0.03275866061449051, 0.02425372786819935, 0.013820518739521503, 0.008350965566933155, 0.016027402132749557, -0.007269519381225109, -0.02572009526193142, 0.03783229738473892, -0.004439429379999638, 0.04589731991291046, 0.0327879898250103, -0.021335655823349953, -0.03387310355901718, -0.01311666239053011, 0.005253263749182224, 5.5704800615785643e-05, -0.023300588130950928, 0.014883635565638542, -0.07806943356990814, -0.010836459696292877, 0.030383145436644554, -0.01130569726228714, 0.05607391521334648, 0.020030587911605835, -0.008453612215816975, -0.0011703449999913573, -0.034166377037763596, -0.029386015608906746, -0.0022160487715154886, -0.02940068021416664, 0.006653645075857639, -0.08575320243835449, -0.005942456424236298, 0.031849514693021774, -0.0007299763383343816, -0.04135157912969589, 0.0324360616505146, 0.054050326347351074, -0.025588123127818108, 0.03445965051651001, -0.03161489591002464, -0.026687897741794586, 0.016540631651878357, 0.021335655823349953, -0.07806943356990814, -0.004762030206620693, -0.014693007804453373, -0.05437292903661728, -0.02107170969247818, 0.007859732955694199, 0.02649727091193199, 0.0062174005433917046, 0.04220207408070564, 0.053434450179338455, 0.018124308437108994, -0.050120458006858826, 0.017801707610487938, -0.002157394075766206, 0.009047490544617176, 0.0006332877092063427, -0.002492825733497739, 0.010345226153731346, 0.009890652261674404, -0.008328970521688461, -0.03193749487400055, -0.006701301783323288, -0.009700024500489235, -0.015426191501319408, 0.019268076866865158, 0.05372772365808487, -0.00804302841424942, 0.01824161782860756, -0.022068839520215988, 0.02145296521484852, -0.01068982295691967, -0.02574942260980606, 0.022054174914956093, -0.022977987304329872, -0.01865220069885254, -0.006957916542887688, -0.017772380262613297, 0.06000377982854843, -0.013175317086279392, -0.05023777112364769, -0.01670193113386631, 0.017391124740242958, -0.04220207408070564, -0.06328844279050827, 0.023784490302205086, 0.028506195172667503, 0.06064898148179054, 0.020543815568089485, 0.03149758651852608, 0.014465720392763615, -0.04314054921269417, -0.0067526246421039104, -0.011826258152723312, -0.02052915282547474, -0.006734295282512903, 0.02032386139035225, 0.0017779712798073888, -0.012838052585721016, -0.020001260563731194, 0.026805207133293152, 0.03337453678250313, -0.017713725566864014, -0.027948975563049316, 0.01246412843465805, 0.00366775318980217, -0.0007872563437558711, 0.024957584217190742, -0.018329599872231483, 0.006939586717635393, 0.005047971848398447, -0.05416763573884964, -0.013791191391646862, -0.01950269564986229, -0.039914537221193314, 0.008021033369004726, 0.01333661749958992, -0.04894736409187317, 0.04176216199994087, -0.002118901815265417, -0.00872488971799612, -0.004333117511123419, 0.03882942721247673, 0.015895429998636246, 0.02605736069381237, -0.04932862147688866, -0.03378511965274811, -0.06258458644151688, 0.019751977175474167, -0.0010832793777808547, 0.02459099143743515, 0.0440496951341629, -0.04293525591492653, 0.03422503173351288, 0.027127807959914207, -0.04627857729792595, -0.02769969217479229, -0.00707889162003994, -0.00039683585055172443, 0.07214530557394028, -0.03575005382299423, -0.003390975994989276, 0.02913673222064972, -0.004883005749434233, 0.001687239739112556, 0.046395886689424515, -0.009626706130802631, -0.04085301235318184, -0.01901879347860813, 0.009604711085557938, -0.02636529691517353, 0.0006484095938503742, -0.04572135582566261, -0.009142804890871048, 0.015499509871006012, -0.03674718365073204, -0.049739204347133636, 0.006840607151389122, -0.02497224695980549, -0.018769510090351105, 0.010968432761728764, -0.048038218170404434, 0.013923164457082748, 0.011679621413350105, 0.00788906030356884, -0.017743052914738655, 0.013380608521401882, 0.08176468312740326, 0.04434296861290932, -0.04296458512544632, 0.033726464956998825, 0.022068839520215988, 0.0006195405148901045, 0.048008888959884644, -0.002157394075766206, 0.0372164212167263, -0.0631711333990097, -0.03231875225901604, -0.04255400225520134, 0.029693953692913055, -0.01111506950110197, -0.02137964591383934, 0.02981126308441162, -0.015484846197068691, -0.0512349009513855, 0.005381570663303137, 0.015690138563513756, -0.01922408491373062, 0.008754217065870762, 0.049299292266368866, 0.01937072165310383, 0.008153006434440613, 0.04231938347220421, -0.023007314652204514, -0.025324176996946335, 0.03284664452075958, -0.006932254880666733, -0.013974487781524658, -0.03821355104446411, -0.03531014174222946, -0.004754698369652033, 0.057774901390075684, 0.011840921826660633, 0.0018668698612600565, -0.0020455834455788136, -0.002626631874591112, -0.021115699782967567, -0.02459099143743515, -0.04753965139389038, -0.013754532672464848, 0.03094036504626274, 0.026453278958797455, -0.01752309873700142, -0.04032512009143829, 0.003999518696218729, -0.005055303685367107, -0.048038218170404434, -0.037861622869968414, -0.00729151489213109, 0.009216123260557652, -0.002580807777121663, 0.03566206991672516, -0.01786036230623722, 0.0015781786059960723, 0.008783544413745403, 0.019927941262722015, 0.0016111718723550439, 0.039122700691223145, -0.02893144078552723, -0.008182333782315254, 0.023916462436318398, -0.0283448938280344, 0.01891614869236946, 0.01505959965288639, -0.00018959680164698511, -0.008182333782315254, -0.023799153044819832, -0.033081263303756714, -0.03343319147825241, 0.018388254567980766, -0.02025054208934307, 0.017464444041252136, 0.007735091261565685, 0.022992650046944618, 0.009744015522301197, 0.017127178609371185, -0.010902446694672108, 0.052202701568603516, 0.018901484087109566, -0.006437355652451515, 0.011027087457478046, 0.030001889914274216, -0.00558319641277194, -0.018505563959479332, -0.013160653412342072, -0.02940068021416664, -0.011965563520789146, 0.03959193825721741, -0.005663846619427204, -0.01467101275920868, 0.007287849206477404, -0.006048768293112516, -0.03489955887198448, -0.044694896787405014, 0.040383774787187576, 0.003647590521723032, -0.005850808694958687, 0.012310159392654896, 0.04557471722364426, -0.00826298352330923, -0.024678973481059074, 0.013849846087396145, 0.00023484800476580858, 0.018094981089234352, -0.04399104043841362, 0.009861324913799763, 0.0018448743503540754, 0.009758679196238518, 0.01272074319422245, -0.0008523264550603926, -0.040354449301958084, -0.02708381786942482, -0.0553407296538353, -0.028476867824792862, -0.005704171489924192, -0.0037868954241275787, -0.011994890868663788, -0.026731889694929123, -0.016232693567872047, -0.018021663650870323, 0.005869138054549694, 0.02608668804168701, -0.019268076866865158, -0.05126422643661499, -0.005220270249992609, 0.0011034419294446707, -0.012060876935720444, 0.024297717958688736, -0.04384440556168556, 0.02705449052155018, -0.0028869120869785547, 0.01286004763096571, -0.029723281040787697, -0.05932925269007683, -0.027245119214057922, 0.08375894278287888, 0.04237803816795349, 0.03170287609100342, 0.031820185482501984, 0.00966336578130722, -0.02212749421596527, 0.029254041612148285, -0.000954055693000555, -0.03363848477602005, -0.012838052585721016, -0.004109496250748634, 0.023095296695828438, 0.007779082283377647, 0.047422342002391815, 0.00030083456658758223, 0.03665919974446297, -0.00918679591268301, -0.00700923940166831, 0.0032223437447100878, 0.027582382783293724, -0.054460909217596054, 0.025016238912940025, 0.01786036230623722, 0.0006997325108386576, 0.01311666239053011, -0.007302512880414724, 0.0009169382974505424, 0.0028209255542606115, 0.03070574626326561, 0.04252467304468155, 0.004487086087465286, -0.018666865304112434, -0.0042707971297204494, -0.021438300609588623, -0.004857344087213278, 0.005931458901613951, 0.0010035455925390124, 0.052818577736616135, 0.014627020806074142, 0.014751662500202656, -0.0059461225755512714, 0.028784804046154022, 0.012214845977723598, 0.023520544171333313, -0.022068839520215988, -0.017743052914738655, 0.03302260860800743, 0.006188073195517063, 0.01162829902023077, -0.002558812266215682, -0.010205921716988087, -0.012163522653281689, -0.034166377037763596, -0.015719465911388397, 0.027142472565174103, -0.014832313172519207, -0.006664642598479986, -0.001512192073278129, 0.007669104728847742, 0.03410772234201431, 0.0020804095547646284, -0.0123834777623415, -0.02223013900220394, 0.020881080999970436, 0.005487882532179356, 0.01588076539337635, 0.060062434524297714, -0.014553702436387539, 0.005905797239392996, -0.02500157430768013, 0.010308567434549332, -0.03419570252299309, -0.03718709200620651, -0.0023846810217946768, 0.024224400520324707, 0.025485476478934288, -0.02063179761171341, -0.0019631001632660627, -0.0020804095547646284, 0.033139917999506, 0.024708300828933716, 0.025265522301197052, 0.005066301673650742, -0.003645757446065545, -0.025368167087435722, 0.050765663385391235, -0.04143955931067467, -0.03844816982746124, 0.008013701066374779, -0.009678029455244541, 0.01395249180495739, -0.003709911135956645, -0.006957916542887688, -0.028843458741903305, 0.03319857269525528, 0.026629243046045303, 0.02363785356283188, -0.008702894672751427, -0.04363911226391792, 0.011701617389917374, 0.008673567324876785, 0.0011813427554443479, 0.0064923446625471115, -0.0026339637115597725, -0.01203888189047575, 0.05337579548358917, 0.042055435478687286, 0.008673567324876785, -0.05721767991781235, -0.029957899823784828, -0.019458703696727753, 0.001026457641273737, 0.02844754047691822, 0.019356058910489082, -0.02530951239168644, 0.03706978261470795, 0.016657941043376923, -0.01048453152179718, 0.0035999335814267397, -0.035192832350730896, 0.038682788610458374, 0.05918261408805847, 0.024957584217190742, -0.00944341067224741, -0.006679306272417307, 0.021775566041469574, -0.01580744795501232, 0.026247987523674965, 0.01241280511021614, -0.013754532672464848, 0.0019814297556877136, 0.036453910171985626, -0.029019422829151154, -0.02746507339179516, 0.019268076866865158, 0.0032461723312735558, -0.01629134826362133, 0.00028754561208188534, -0.017889689654111862, -0.005975449923425913, 0.017801707610487938, -0.008336301892995834, -0.01916543021798134, -0.01819762773811817, -0.032260097563266754, -0.011173724196851254, 0.00810901541262865, 0.031204311177134514, 0.013138657435774803, -0.000333369622239843, 0.026614580303430557, 0.008842199109494686, -0.02469363808631897, 0.018784174695611, -0.02690785378217697, 0.005509878043085337, 0.02438570000231266, -0.03384377434849739, 0.0070862234570086, -0.001434291247278452, -0.005014978814870119, -0.031820185482501984, 0.05047238990664482, -0.04190880060195923, -0.002853918820619583, 0.030353818088769913, 0.052642613649368286, 0.02250874973833561, -0.01110040582716465, 0.0011281869374215603, 0.02947399765253067, 0.0005219353479333222, 0.04214341938495636, -0.014304419979453087, -0.0073465039022266865, 0.010132603347301483, 0.01292603462934494, 0.02572009526193142, 0.010315898805856705, -0.011679621413350105, -0.004663050174713135, 0.018872156739234924, 0.011914240196347237, -0.0036714191082865, 0.03695247322320938, 0.04633723199367523, 0.0023095295764505863, -0.033110588788986206, -0.017097851261496544, 0.039533283561468124, 0.010572513565421104, 0.053199831396341324, 0.02001592330634594, -0.0006158745964057744, 0.048243507742881775, 0.00823365617543459, -0.0009623040095902979, -0.03158556669950485, 0.02420973591506481, -0.03114565648138523, -0.015587491914629936, -0.0015974247362464666, -0.015176909044384956, 0.028183594346046448, -0.004780360031872988, 0.053199831396341324, -0.02445901930332184, -0.027685029432177544, 0.01005928497761488, 0.05023777112364769, -0.004556738771498203, -0.012933366000652313, 0.054871492087841034, 0.009824666194617748, 0.03844816982746124, -0.003077539848163724, 0.020001260563731194, -0.003775897668674588, -0.00022247552988119423, 0.02168758399784565, 0.030383145436644554, -0.03569139912724495, -0.030823055654764175, -0.0013683047145605087, -0.012845383957028389, 0.007793745957314968, 0.0416741780936718, 0.01847623661160469, -0.0044174338690936565, 0.02988458052277565, -0.010917110368609428, 0.011994890868663788, -0.03531014174222946, -0.005150617565959692, -0.020382516086101532, -0.05915328860282898, 0.026731889694929123, -0.04569202661514282, 0.06393364816904068, 0.018212290480732918, -0.016643276438117027, 0.027846328914165497, -0.03566206991672516, -0.010029957629740238, 0.028095612302422523, -0.014465720392763615, -0.006048768293112516, -0.026042696088552475, -0.004556738771498203, -0.008798208087682724, 0.022010184824466705, 0.05129355564713478, 0.0029455667827278376, 0.023608526214957237, 0.06305382400751114, -0.010645831935107708, 0.031204311177134514, 0.03111632913351059, -0.016760587692260742, 0.016437985002994537, -0.040589068084955215, 0.030823055654764175, 0.010440540499985218, -0.034166377037763596, 0.036835163831710815, 0.00021961152378935367, -0.0013472256250679493, 0.023623188957571983, 0.000476111366879195, 0.052642613649368286, 0.02988458052277565, 0.00877621304243803, 0.01156231202185154, 0.003830886445939541, -0.026995835825800896, -0.009494733065366745, -0.012889374978840351, -0.06293651461601257, -0.011892245151102543, 0.003728240728378296, 0.040794357657432556, 0.054020997136831284, 0.00025363583699800074, -0.0033488180488348007, -0.018212290480732918, 0.011261706240475178, 0.04026646539568901, -0.039973191916942596, -0.0072145308367908, 0.022156821563839912, 0.004945326130837202, -0.012933366000652313, 0.03217211365699768, 0.039738573133945465, -0.003878543386235833, 0.0024616653099656105, 0.02469363808631897, -0.0017358132172375917, 0.01137168426066637, 0.014179779216647148, -0.016115384176373482, -0.0015891763614490628, -0.011122401803731918, -0.014458389021456242, -0.0196346677839756, 0.011093074455857277, -0.01636466756463051, -0.03073507361114025, 0.017801707610487938, 0.020103905349969864, -0.008189665153622627, 0.02001592330634594, 0.04627857729792595, -0.0009659699280746281, -0.0002884620917029679, -0.0031746868044137955, 0.00415715342387557, 0.004648386500775814, 0.005553869064897299, -0.019971933215856552, -0.014685676433146, 0.042231399565935135, -0.020573142915964127, 0.0031123661901801825, 0.008614912629127502, -0.03841884434223175, 0.0016322509618476033, -0.0007826739456504583, -0.006759956479072571, 0.009414083324372768, -0.02585206925868988, -0.035574089735746384, -0.02909274213016033, 0.01991327852010727, -0.019004130735993385, -0.022626059129834175, -0.02073444426059723, -0.012016885913908482, 0.011137065477669239, -0.015660811215639114, -0.017669735476374626, 0.00041608192259445786, 0.012566774152219296, -0.018256282433867455, 0.018842829391360283, 0.010037289001047611, -0.02308063395321369, -0.044079024344682693, -0.0025826406199485064, -0.027450410649180412, 0.06950584799051285, 0.0029290702659636736, 0.04352180287241936, -0.012427468784153461, -0.01595408469438553, -0.06786351650953293, -0.014502380043268204, -0.012845383957028389, 0.01601273939013481, -0.05624987930059433, 0.014121124520897865, 0.01896013878285885, -0.036424580961465836, 0.02240610308945179, 0.025294849649071693, -0.012625428847968578, -0.02988458052277565, -0.014978949911892414, -0.04281794652342796, -0.061763420701026917, -0.007559127174317837, 0.02124767377972603, 0.01844690926373005, 0.019150767475366592, 0.03472359478473663, -0.00807968806475401, -0.010645831935107708, 0.020778434351086617, 0.025148212909698486, 0.044518932700157166, 0.016995206475257874, -0.009516729041934013, 0.03481157869100571, -0.026717225089669228, 0.017699062824249268, 0.054284945130348206, -0.013622559607028961, 0.029224714264273643, 0.005256929434835911, -0.01601273939013481, 0.02161426469683647, 0.002098739380016923, -0.017640408128499985, 0.026731889694929123, 0.0026138010434806347, -0.005850808694958687, 0.042260728776454926, -0.004912333097308874, 0.02821292169392109, -0.051146917045116425, -0.05680709704756737, 0.017567088827490807, -0.04296458512544632, -0.06745292991399765, -0.04352180287241936, 0.002054748125374317, 0.01891614869236946, -0.02944467030465603, 0.04011983051896095, -0.03821355104446411, -0.029151396825909615, 0.015924757346510887, -0.03410772234201431, -0.02394578978419304, 0.010323231108486652, -0.017332470044493675, 0.03548610582947731, -0.01205354556441307, -0.03264135122299194, 0.02261139452457428, 0.028095612302422523, 0.02001592330634594, -0.02813960239291191, -0.007225528359413147, -0.0068442728370428085, -0.011884912848472595, 0.006085427477955818, 0.002307696733623743, -0.0003842342412099242, 0.010719150304794312, -0.023388570174574852, -0.03730440139770508, 0.0022362112067639828, 0.004054507706314325, -0.061528801918029785, 0.027685029432177544, -0.00782307330518961, 0.008438948541879654, -0.009098813869059086, -0.005282591097056866, 0.0017468109726905823, -0.028462203219532967, -0.01703919656574726, 0.022274130955338478, -0.005080965347588062, 0.019590677693486214, -0.007830405607819557, 0.02258206717669964, -0.002327859168872237, 0.042260728776454926, -0.04522278904914856, 0.010425876826047897, -0.020705116912722588, 0.00763244554400444, 0.023300588130950928, -0.028872786089777946, -0.01088045071810484, -0.025148212909698486, -0.0016111718723550439, 0.006312714423984289, -0.005528207402676344, -0.015176909044384956, -0.04231938347220421, -0.0014287923695519567, -0.0011153562227264047, 0.003204014152288437, 0.01875484734773636, -0.02032386139035225, 0.0024854938965290785, 0.00015202112263068557, -0.013021348044276237, 0.012002222239971161, -0.014443725347518921, -0.0182709451764822, 0.009531392715871334, 0.003733739722520113, 0.006356705445796251, -0.02533883973956108, 0.005649182945489883, 0.0019631001632660627, 0.0032645019236952066, -0.023857807740569115, -0.005938790738582611, 0.005348577629774809, -0.011679621413350105, 0.002599137369543314, 0.019766641780734062, 0.030617764219641685, 0.01355657260864973, -0.009568051435053349, -0.00788906030356884, -0.006004777271300554, 0.017772380262613297, 0.02343256212770939, 0.01881350204348564, 0.003418470500037074, -0.006224732380360365, 0.01327063050121069, 0.057364318519830704, -0.03882942721247673, -0.0010035455925390124, -0.0034917888697236776, -0.015088927000761032, -0.03841884434223175, -0.005847142543643713, 0.0065326695330441, 0.016819242388010025, -0.00489400327205658, -0.012955361977219582, -0.03750969469547272, -0.012816056609153748, 0.034958213567733765, 0.03833086043596268, 0.01744977943599224, 0.004384440369904041, -0.0007043149089440703, -0.0040508415549993515, -0.020367851480841637, -0.01724448800086975, 0.019883951172232628, 0.04290593042969704, 0.008673567324876785, 0.006972580216825008, 0.0036329268477857113, -0.01646731235086918, 0.0013087334809824824, 0.002974894130602479, 0.016130048781633377, 0.0006117504090070724, 0.00024217984173446894, -0.0009760512039065361, -0.002976727206259966, -0.016115384176373482, 0.015411527827382088, -0.031820185482501984, -0.007042232435196638, 0.008607580326497555, -0.03152691200375557, 0.0033836441580206156, 0.002428672043606639, 0.00244700163602829, -0.006382367108017206, -0.013644554652273655, -0.002930903108790517, -0.019869286566972733, 0.018798837438225746, 0.020573142915964127, 0.0013976320624351501, 0.04727570712566376, 0.01354190893471241, 0.009824666194617748, -0.0008921932894736528, -0.013673882000148296, 0.018461573868989944, 0.031233638525009155, -0.02063179761171341, 0.005275259260088205, -0.021320991218090057, 0.030793728306889534, 0.0074711451306939125, -0.01420910656452179, 0.02769969217479229, -0.002388346940279007, 0.03261202573776245, 0.03363848477602005, -0.03572072461247444, 0.0036109313368797302, 0.02677587978541851, -0.001668910146690905, -0.010235249064862728, 0.049885839223861694, -0.004883005749434233, 0.016613949090242386, 0.008145674131810665, 0.018637537956237793, -0.021335655823349953, 0.005722501315176487, -0.018124308437108994, -0.0004871091223321855, -0.006921257358044386, 0.006184407044202089, 0.02690785378217697, 0.012346819043159485, 0.02950332500040531, -0.00034940801560878754, 0.029957899823784828, 0.016555294394493103, -0.03111632913351059, -0.019971933215856552, 0.013710541650652885, -0.015734128654003143, -0.0008940262487158179, -0.010814464651048183, -0.014495047740638256, 0.0013866343069821596, 0.04316987469792366, -0.013255966827273369, 0.00196859915740788, -0.005326582118868828, 0.0026064692065119743, -0.035808708518743515, -0.023887135088443756, 0.02217148430645466, -0.0016514969756826758, 0.006514340173453093, -0.014055137522518635, -0.014539038762450218, -0.007661772891879082, -0.028359558433294296, 0.006602322217077017, 0.0003106867370661348, 0.015015608631074429, -0.020690452307462692, -0.0060231066308915615, -0.005172613076865673, 0.02261139452457428, -0.01503027230501175, -0.060062434524297714, -0.03906404599547386, 0.028183594346046448, -0.0035559425596147776, -0.018769510090351105, -0.007669104728847742, 0.02410709112882614, -0.025382831692695618, 0.012156191281974316, -0.01347592193633318, 0.021731574088335037, -0.013659218326210976, -0.029532652348279953, -0.01355657260864973, 0.0035724390763789415, -0.010836459696292877, 8.076480298768729e-05, 0.0402957946062088, 0.003711744211614132, -0.0005411814781837165, 0.0024415028747171164, 0.006906593684107065, 0.008702894672751427, -0.033961083739995956, -0.0167312603443861, 0.01752309873700142, -0.015074263326823711, 0.053639743477106094, -0.008783544413745403, 0.021057045087218285, -0.01437773834913969, -0.007830405607819557, -0.008482939563691616, -0.013717873021960258, 0.010403880849480629, 0.03445965051651001, -0.03011919930577278, 0.05856674164533615, 0.018417581915855408, -0.0024579993914812803, 0.02896076813340187, -0.013549240306019783, 0.03730440139770508, 0.009985966607928276, -0.0283448938280344, 0.0338144488632679, -0.017640408128499985, 0.023315252736210823, -0.037451039999723434, 0.06616252660751343, -0.0024268392007797956, 0.00048481792327947915, -0.005542871076613665, 0.01775771751999855, 0.006085427477955818, -0.012955361977219582, -0.027230454608798027, -0.018769510090351105, 0.020793098956346512, 0.04487086087465286, 0.02435637265443802, -0.011144396848976612, 0.038712117820978165, -0.012354150414466858, 0.009751347824931145, -0.01629134826362133, -0.03921068087220192, 0.024165745824575424, -0.008409621194005013, 0.03487023338675499, 0.0032974951900541782, -0.0324360616505146, 0.0046447208151221275, -0.015440855175256729, 0.00831430684775114, 0.004300124477595091, 0.05745229870080948, 0.02181955613195896, -0.0033854772336781025, -0.006316380575299263, 0.02274336852133274, -0.01379852369427681, -0.007133880630135536, 0.02674655243754387, 0.01703919656574726, -0.0053962343372404575, 0.03481157869100571, -0.044929515570402145, -0.03982655704021454, -0.04073570296168327, -0.004039844032377005, -0.011093074455857277, -0.019209422171115875, 0.0317615307867527, -0.004853678401559591, -0.026893189176917076, -0.029561979696154594, 0.0082849794998765, -0.014810317195951939, -0.010095943696796894, 0.017068523913621902, 0.013204644434154034, 0.031233638525009155, -0.03445965051651001, -0.010462536476552486, 0.019561350345611572, 0.002351687755435705, -0.027333101257681847, 0.018666865304112434, -0.024327045306563377, -0.012016885913908482, 0.013681214302778244, 0.026555925607681274, -0.05504745617508888, -0.007383163087069988, 0.002344355918467045, -0.015008277259767056, 0.021878210827708244, -0.002896076999604702, -0.0039042048156261444, 0.026819871738553047, -0.02291933260858059, 0.01646731235086918, 0.021291663870215416, 0.0433751679956913, 0.03460628539323807, -0.0001539686491014436, -0.005506211891770363, 0.010557849891483784, -0.019561350345611572, -0.0010961100924760103, -0.0075737908482551575, 0.02462031878530979, 0.00565284863114357, -0.02294865995645523, -0.006979912053793669, -0.05607391521334648, 0.007053230423480272, 0.00720719899982214, 0.0002046041627181694, 0.01601273939013481, 0.011027087457478046, 0.005579530261456966, 0.020646462216973305, -0.041820816695690155, 0.017288479954004288, -0.02489892952144146, 0.014348411001265049, 0.00381622277200222, 0.007031234912574291, 0.008328970521688461, -0.009032826870679855, -0.005326582118868828, 0.013036011718213558, -0.020470498129725456, 0.002155561000108719, -0.014861640520393848, 0.014956953935325146, 0.015836775302886963, -0.01844690926373005, -0.004344115499407053, 0.009912648238241673, 0.03501686826348305, -0.029943235218524933, 0.004003184847533703, -0.004611727315932512, -0.001837542513385415, 0.0215116199105978, -0.006015774793922901, -0.01137168426066637, -0.01005928497761488, -0.006202736869454384, -0.0021757236681878567, -0.0032150119077414274, -0.005891133565455675, -0.013233971782028675, -0.013659218326210976, -0.020705116912722588, 0.01505959965288639, -0.01504493597894907, -0.03469426929950714, -0.013101998716592789, 0.0069945757277309895, 0.026101350784301758, -0.03575005382299423, -0.01314598973840475, -0.005810483358800411, -0.011921572498977184, 0.019238749518990517, 0.008013701066374779, -0.01898946613073349, 0.009678029455244541, 0.014011146500706673, -0.007522467989474535, -0.004314788151532412, -0.0093920873478055, 1.4950080185371917e-05, 0.005132288206368685, -0.0018467073095962405, 0.016144711524248123, 0.0030097204726189375, 0.017669735476374626, 0.015822110697627068, 0.01662861369550228, 0.005737164989113808, -0.011027087457478046, -0.003392809070646763, 0.009223454631865025, 0.03363848477602005, 0.021394310519099236, 0.006690304260700941, 0.011012423783540726, -0.0069945757277309895, -0.007779082283377647, -0.0012299162335693836, 0.014106460846960545, -0.00944341067224741, 0.003504619700834155, -0.0026247987989336252, 0.03337453678250313, 0.015103590674698353, 0.01205354556441307, -0.01898946613073349, -0.003966525662690401, 0.005799485836178064, 0.04463624209165573, -0.021804893389344215, 0.02217148430645466, 0.011547648347914219, -0.011943567544221878, 0.016965879127383232, 0.012632761150598526, -0.012376146391034126, 0.008380293846130371, -0.07466746121644974, -0.009098813869059086, -0.0274944007396698, -0.010924441739916801, 0.029957899823784828, -0.0060927593149244785, 0.006583992391824722, -0.0009485568152740598, -0.008849531412124634, 0.018798837438225746, 0.004351447336375713, -0.03275866061449051, -0.03610198199748993, 0.012082872912287712, -0.029122069478034973, 0.02811027504503727, -0.0022068838588893414, -0.021570274606347084, -0.022670049220323563, -0.0023828481789678335, 0.00826298352330923, 0.013365944847464561, 0.045516062527894974, 0.0047253710217773914, -0.00810901541262865, -0.01241280511021614, -0.018564218655228615, 0.01286004763096571, 0.012764734216034412, 0.021540947258472443, -0.011408342979848385, 0.01595408469438553, -0.007159541826695204, 0.01490563154220581, 0.010594509541988373, 0.048859383910894394, -0.02643861621618271, 0.01960534043610096, -0.0029895578045397997, 0.0372164212167263, 0.031820185482501984, -0.02346188947558403, -0.011723612435162067, 0.0179336816072464, 0.008123679086565971, 0.014011146500706673, -0.00674529280513525, 0.015367536805570126, -0.00826298352330923, 0.014260428957641125, 0.012251504696905613, -0.02415108121931553, -0.034342341125011444, -0.011349688284099102, -0.03366781026124954, -0.0005498880054801702, 0.013717873021960258, 0.000322371837683022, 0.01731780730187893, -0.04381507635116577, -0.01703919656574726, 0.0379202775657177, -0.01327063050121069, 0.02366718091070652, 0.014788322150707245, 0.0010209587635472417, -0.01314598973840475, -0.0021922201849520206, -0.018021663650870323, -0.01483964454382658, -0.0032205109018832445, 0.014546371065080166, -0.016027402132749557, 0.027685029432177544, -0.0009316019713878632, -0.0017532262718304992, 0.010220585390925407, -0.010931774042546749, 0.01203888189047575, -0.003077539848163724, 0.014297088608145714, -0.011745608411729336, 0.0029950567986816168, -0.051557499915361404, -0.0032571700867265463, -0.02114502713084221], "index": 94}, {"title": "Cricket poetry", "text": "The game of cricket has inspired much poetry, most of which romanticises the sport and its culture.", "vector": [-0.0013973518507555127, 0.011464058421552181, -0.027261095121502876, 0.05063745006918907, -0.027315428480505943, 0.05960223823785782, -0.02391967549920082, -0.03827691450715065, -0.023580100387334824, -0.01996702142059803, 0.012829150073230267, 0.015335215255618095, -0.00465218024328351, -0.027804415673017502, -0.0011511598713696003, -0.031648408621549606, 0.03338703140616417, 0.014085578732192516, -0.033495694398880005, -0.027274679392576218, -0.006485885940492153, 0.04588339850306511, 0.003484041430056095, -0.029420794919133186, 0.04292230308055878, 0.03254488483071327, -0.0291491337120533, -0.004587660543620586, -0.012937814928591251, 0.013046478852629662, 0.006146310828626156, 0.004356749821454287, 0.05574466288089752, -0.013746003620326519, -0.015824204310774803, 0.003579122480005026, -0.00483215507119894, 0.03412051498889923, 0.004302417393773794, -0.06470944732427597, -0.027193181216716766, -0.01688367873430252, 0.06976232677698135, 0.007103912997990847, -0.003721744054928422, -0.009732224978506565, -0.013895416632294655, -0.01231978740543127, 0.013026104308664799, -0.015158636495471, 0.08247601985931396, -0.01343359425663948, -0.004788009915500879, 0.005433203186839819, 0.00360968429595232, 0.00660813320428133, 0.021488318219780922, -0.021366070955991745, 0.03667411953210831, -0.031268082559108734, -0.042623478919267654, -0.008170179091393948, 0.02549530565738678, -0.040749020874500275, 0.02363443374633789, -0.03509848937392235, -0.009535270743072033, -0.029638122767210007, 0.008822163566946983, 0.0008820465300232172, 0.002821869682520628, 0.027166014537215233, -0.02656836248934269, 0.02966528758406639, 0.025087814778089523, -0.00793926790356636, 0.02643253281712532, 0.03259921818971634, -0.0060648126527667046, 0.016842929646372795, -0.003229360096156597, -0.004478996619582176, -0.05090911313891411, 0.027736501768231392, -0.011185606941580772, -0.018581554293632507, 0.030480269342660904, -0.03993404284119606, 0.03172990679740906, 0.06367713958024979, 0.027057351544499397, 0.03482683002948761, 0.0341748483479023, 0.01687009446322918, -0.04914332181215286, 0.018989045172929764, 0.002329485723748803, 0.015009223483502865, 0.018404975533485413, 0.005979918874800205, 0.05536433681845665, -0.016530519351363182, -0.018228396773338318, -0.04751335829496384, -0.012469200417399406, -0.014954891055822372, -0.07595618069171906, -0.0323275588452816, 0.04512275010347366, -0.029692454263567924, 0.006231204606592655, -0.026486864313483238, 0.017399832606315613, -0.03599496930837631, 0.013229848816990852, -0.01457456685602665, 0.027179596945643425, -0.00285412953235209, -0.0007165036513470113, 0.027980994433164597, -0.044552262872457504, 0.009229653514921665, -0.018703801557421684, 0.019804025068879128, 0.02800816111266613, 0.018282728269696236, -0.03528865426778793, -0.016340358182787895, 0.033441364765167236, -0.0015756288776174188, -0.01687009446322918, -0.0015467649791389704, 0.01961386203765869, 0.029040470719337463, 0.03757059946656227, 0.035859137773513794, -0.04191716015338898, -0.05574466288089752, 0.03355002775788307, -0.011185606941580772, 0.009148155339062214, 0.0032480366062372923, 0.028687311336398125, 0.024150587618350983, 0.0029543042182922363, 0.007789854891598225, -0.01572912186384201, -0.030507434159517288, -0.016340358182787895, 0.04561173915863037, -0.017182504758238792, 0.023240525275468826, 0.018133314326405525, -0.028904639184474945, -0.04995829984545708, 0.04102068394422531, 0.021379653364419937, -0.011212772689759731, 0.017033090814948082, 0.031213751062750816, -0.017535662278532982, -0.015172218903899193, 0.0017793739680200815, -0.017929568886756897, 0.05710296332836151, -0.027396926656365395, -0.06345981359481812, -0.026391783729195595, 0.004316000733524561, 0.007681190501898527, 0.0070020402781665325, 0.02879597619175911, 0.007273700553923845, 0.019708944484591484, -0.004261668771505356, -0.011178814806044102, -0.022792287170886993, -0.03297954052686691, -0.0015671395231038332, 0.04167266562581062, -0.03588630631566048, -0.03814108297228813, -0.00016671018966007978, -0.0542776994407177, -0.039173394441604614, 0.0768798217177391, 0.02118949219584465, 0.03863007202744484, 0.02836131863296032, 0.03765209764242172, 0.013155142776668072, -0.0019933064468204975, 0.0019440678879618645, -0.05161542817950249, 0.04042302817106247, 0.016421856358647346, 0.004777822643518448, -0.009229653514921665, -0.007796646095812321, -0.03322403505444527, 0.03023577481508255, 0.013345304876565933, 0.028252655640244484, -0.045204248279333115, 0.012000586837530136, 0.06889301538467407, -0.013094019144773483, 0.032273225486278534, 0.014248575083911419, -0.0020866894628852606, 0.0017284377245232463, 0.04903465509414673, -0.009100615046918392, 0.016897261142730713, -0.021855058148503304, -0.002769235521554947, 0.002156302332878113, 0.044117607176303864, -0.02449016273021698, -0.035234320908784866, 0.015253717079758644, 0.009317942894995213, -0.028850307688117027, 0.006723588798195124, -0.07579318434000015, -0.030779095366597176, -0.053598545491695404, -0.004733677953481674, -0.052185915410518646, -0.01407199539244175, 0.04343845695257187, 0.009229653514921665, -0.05196858569979668, -0.028632979840040207, 0.004261668771505356, 0.0291491337120533, 0.0020866894628852606, -0.007626858539879322, 0.027233930304646492, 0.057917945086956024, 0.03871157020330429, -0.0028592231683433056, 0.015674790367484093, -0.019858356565237045, -0.031920067965984344, -0.0007716846303083003, -0.0032259642612189054, -0.02053750678896904, -0.04281364008784294, -0.025807714089751244, 0.030561767518520355, 0.00023642921587452292, -0.02893180586397648, 0.020157182589173317, 0.02435433305799961, 0.007239743135869503, 0.06862135231494904, -0.013644130900502205, 0.007368781603872776, 0.018119731917977333, 0.02068692073225975, 0.0007534324540756643, 0.016340358182787895, -0.009759390726685524, -0.028415651991963387, 0.015158636495471, 0.031702738255262375, 0.016286026686429977, -0.02548172138631344, 0.05802660807967186, 0.014397988095879555, -0.0723702609539032, 0.003200496081262827, -0.008394298143684864, -0.025305142626166344, 0.03708161041140556, 0.010058216750621796, -0.003380470909178257, 0.023240525275468826, 0.00624818354845047, 0.04034153372049332, 0.004720095079392195, 0.11529256403446198, 0.013114393688738346, -0.05384304001927376, -0.018649470061063766, -0.02038809470832348, 0.00041237162076868117, -0.03287087753415108, -0.041319508105516434, 0.03238188847899437, 0.0038168251048773527, -0.006017272360622883, 0.007952851243317127, 0.024965567514300346, 0.02923063188791275, -0.01615019515156746, -9.773398051038384e-05, -0.007477445527911186, 0.02117590792477131, 0.00782381184399128, 0.0032123811542987823, -0.012801984325051308, 0.05237607657909393, -0.02068692073225975, -0.046997204422950745, 0.06552442908287048, 0.030561767518520355, -0.013053270056843758, -0.013121184892952442, -0.04612789303064346, -0.013121184892952442, 0.02004851959645748, -0.011864757165312767, -0.026975853368639946, 0.03297954052686691, -0.006231204606592655, 0.020741252228617668, -0.037380434572696686, -0.034229177981615067, 0.0067439633421599865, -0.014248575083911419, -0.009813723154366016, 0.019776858389377594, 0.055473003536462784, 0.008176970295608044, 0.01063549518585205, -0.04762202501296997, 0.011586305685341358, 0.012224706821143627, -0.010560788214206696, 0.004492579493671656, 0.025943543761968613, -0.03757059946656227, 0.01623169332742691, 0.04400894418358803, 0.05579899623990059, -0.05134376883506775, -0.00944019015878439, -0.026907937601208687, -0.035859137773513794, 0.032436221837997437, -0.010750950314104557, 0.03129524737596512, 0.02944795973598957, -0.0020153787918388844, 0.000795879343058914, -0.0341748483479023, 0.03425634652376175, -0.0313224159181118, 0.0006001991569064558, 0.06737171858549118, -0.06394879519939423, 0.0008578518172726035, 0.011953046545386314, 0.01902979426085949, 0.044986922293901443, -0.08611626923084259, 0.008149804547429085, -0.03504415974020958, 0.01923353783786297, -0.0161637794226408, -0.015280883759260178, -0.0788901075720787, 0.03556031361222267, -0.028415651991963387, 0.0029339296743273735, -0.03776076063513756, 0.04023286700248718, -0.017902404069900513, -0.03488116338849068, 0.026052208617329597, -0.016353940591216087, -0.03911906108260155, -0.0283069871366024, -0.030290106311440468, -0.019858356565237045, -0.009874846786260605, -0.01693801023066044, -0.00310711283236742, -0.008224510587751865, -0.034582335501909256, 0.04289513826370239, 0.007389156147837639, -0.05550016835331917, -0.002670758869498968, 0.027030184864997864, -0.007817020639777184, -0.012686529196798801, 0.016842929646372795, 0.02311827801167965, 0.025087814778089523, -0.011307853274047375, 0.004088485147804022, 0.015498211607336998, 0.05867859348654747, 0.03640246018767357, -0.013277390040457249, -0.009311151690781116, -0.02557680383324623, -0.003020521253347397, -0.003928884863853455, -0.04775785282254219, 0.00944019015878439, 0.021922973915934563, -0.025250811129808426, 0.01752207987010479, 0.019980603829026222, -0.03588630631566048, -0.003647037548944354, 0.007952851243317127, 0.0525934062898159, -0.019831189885735512, -0.0060580214485526085, 0.03360436111688614, 0.00804793182760477, -0.002565490547567606, 0.04332979395985603, 0.004862716421484947, -0.025033483281731606, 0.003431407269090414, 0.017345501109957695, -0.022357629612088203, -0.00821771938353777, -0.03892889991402626, 0.04509558528661728, -0.015430296771228313, 0.020877081900835037, 0.004353353753685951, -0.01127389632165432, -0.025549637153744698, 0.025807714089751244, 0.04544874280691147, 0.050528787076473236, 0.03322403505444527, -0.05797227472066879, -0.03604930266737938, 0.05104494094848633, 0.04134667292237282, 0.019831189885735512, 0.0024279626086354256, -0.03058893233537674, -0.01145726628601551, -0.05824393406510353, -0.02792666293680668, 0.014316489920020103, -0.01623169332742691, -0.017929568886756897, -0.03197439759969711, -0.02980111911892891, 0.05006696656346321, -0.007891727611422539, -0.0433841273188591, 0.008482588455080986, 0.03746193274855614, -0.004159796051681042, -0.0291491337120533, 0.010295920073986053, -0.033006709069013596, 0.030643263831734657, -0.030561767518520355, 0.03933639079332352, -0.014982056804001331, -0.053326886147260666, -0.058787256479263306, -0.02534589171409607, 0.025237226858735085, 0.04778502136468887, -0.014221408404409885, -0.003108810866251588, -0.03729894012212753, -0.04259631037712097, -0.09768898785114288, 0.03569614514708519, -0.015484628267586231, -0.0525934062898159, 0.0564509779214859, 0.004088485147804022, -0.02556321956217289, -0.00501212989911437, -0.002672456670552492, 0.008129430003464222, -0.026446115225553513, 0.02779083326458931, 0.02457166090607643, 0.015688372775912285, -0.015783455222845078, -0.03944505378603935, 0.004723490681499243, 0.022968865931034088, -0.03697294741868973, -0.022058803588151932, -0.00031686609145253897, -0.018948296085000038, -0.026731358841061592, 0.02284661866724491, 0.01213641744107008, -0.014289324171841145, -0.009976718574762344, 0.009847680106759071, -0.0061361235566437244, -0.04066752269864082, 0.0003612230939324945, 0.03352286294102669, -0.022276131436228752, 0.022928116843104362, 0.033278368413448334, 0.04373728483915329, -0.0311594195663929, 0.05313672497868538, 0.04946931451559067, 0.05737462267279625, -0.025468138977885246, -0.012285830453038216, -0.008489379659295082, 0.006479094736278057, 0.05998256057500839, 0.022588541731238365, 0.00611914461478591, -0.014099162071943283, -0.018703801557421684, 0.015960033982992172, 0.019573112949728966, 0.011735718697309494, -0.01593286730349064, 0.018866797909140587, 0.03871157020330429, 0.002382119884714484, -0.07209860533475876, -0.01446590293198824, -0.0009592999122105539, 0.024734657257795334, 0.03308820724487305, -0.04544874280691147, -0.02398759126663208, 0.007626858539879322, 0.0050664618611335754, -0.03879306837916374, -0.0075114029459655285, -0.011674595065414906, -0.05550016835331917, 0.01954594813287258, -0.02478898875415325, 0.00034042412880808115, 0.014099162071943283, 0.02743767574429512, -0.01037741731852293, 0.02334919013082981, -0.028035327792167664, -0.008536919951438904, 0.0017233440885320306, -0.021800726652145386, 0.014275740832090378, -0.011335019953548908, -0.022588541731238365, 0.005338122136890888, -0.054196201264858246, 0.014859810471534729, -0.0005021467804908752, -0.01681576296687126, 0.007063163910061121, 0.015212967991828918, -0.005147960036993027, 0.040830519050359726, 0.007531777489930391, 0.0035859139170497656, 0.02579413168132305, -0.02758708782494068, 0.027301844209432602, -0.04653538390994072, 0.00944019015878439, 0.0584612637758255, 0.04553024098277092, -0.01446590293198824, -0.008564086630940437, -0.023743096739053726, -0.019478032365441322, 0.023797428235411644, 0.013053270056843758, -0.015212967991828918, -0.014751145616173744, 0.01396333146840334, 0.00664548622444272, 0.0028677124064415693, -0.01708742417395115, -0.02053750678896904, 0.002494179643690586, 0.02196372300386429, -0.02398759126663208, 0.014479486271739006, -0.027166014537215233, -0.003200496081262827, -0.008244885131716728, -0.0291491337120533, 0.00624818354845047, 0.01360338181257248, 0.0044348519295454025, -0.018500056117773056, -0.0014397987397387624, -0.0252100620418787, 0.04580190032720566, 0.0007148057920858264, -0.012190748937427998, 0.029773952439427376, 0.027464840561151505, 0.007097121328115463, 0.013141559436917305, -0.010370626114308834, 0.013311346992850304, 0.02182789333164692, -0.051751259714365005, -0.022955281659960747, 0.0003085889620706439, 0.017128173261880875, -0.03477250039577484, -0.0291491337120533, -0.0036572248209267855, 0.017114588990807533, 0.004271856043487787, 0.005844088736921549, 0.027899498119950294, -0.015321631915867329, -0.016123030334711075, -0.03746193274855614, 0.054196201264858246, -0.020279429852962494, -0.006163289770483971, -0.0034976243041455746, 0.006305911112576723, 0.0075114029459655285, 0.00448578828945756, 0.02284661866724491, -0.02190939150750637, 0.02893180586397648, -0.007008831948041916, 0.013426803052425385, 0.005949357058852911, 0.000777202716562897, -0.0008052176563069224, -0.017046675086021423, -0.0020866894628852606, -0.02341710403561592, 0.002565490547567606, -0.03175707161426544, -0.021298155188560486, 0.010397791862487793, -0.018649470061063766, 0.03001844696700573, 0.02276512049138546, 0.04596489667892456, 0.0007610729080624878, 0.010533622466027737, -0.0023906093556433916, 0.022493461146950722, 0.026826439425349236, 0.049306318163871765, 0.013698463328182697, -0.02334919013082981, 0.015851369127631187, 0.0027182993944734335, 0.030697597190737724, -0.0004626711888704449, 0.009277193807065487, -0.01973610930144787, 0.0110565684735775, 0.015443879179656506, -0.032653551548719406, 0.013630547560751438, 0.024585243314504623, -0.039254892617464066, -0.007395947352051735, 0.008380715735256672, -0.004139421507716179, -0.03914622589945793, 0.03330553323030472, 0.0062651620246469975, -0.0331697054207325, -0.016612017527222633, -0.00148479244671762, 0.019763275980949402, -0.02412342093884945, -0.02233046479523182, -0.022805869579315186, -0.05617931857705116, 0.027233930304646492, -0.012034544721245766, 0.03814108297228813, -0.02743767574429512, -0.0011503109708428383, -0.013114393688738346, -0.022656455636024475, 0.019491614773869514, -0.017359083518385887, 0.04246048256754875, 0.0544406920671463, 0.03230039030313492, -0.013005729764699936, 0.003392356215044856, -0.00796643365174532, -0.001701271627098322, -0.03474533185362816, 0.0011503109708428383, 0.009745807386934757, -0.00855050329118967, -0.01213641744107008, 0.027532756328582764, -0.0034076368901878595, 0.006611528806388378, -0.012523532845079899, 0.002151208696886897, -0.0020034934859722853, 0.016136612743139267, 0.012944606132805347, 0.013189099729061127, 0.03355002775788307, -0.014289324171841145, 0.0019746297039091587, -0.00023982497805263847, -0.01688367873430252, 0.028605813160538673, 0.0033295347820967436, 0.027845164760947227, -0.02663627825677395, -0.006003689486533403, 0.007980016991496086, 0.0683496966958046, -0.0037251398898661137, -0.003776076016947627, -0.002298923907801509, -0.003360096365213394, -0.01443873718380928, -0.0010798490839079022, -0.002616426907479763, 0.014262157492339611, 0.014628899283707142, 0.013420010916888714, -0.002888086950406432, -0.0064383456483483315, -0.044552262872457504, 0.020646171644330025, -0.01623169332742691, -0.027980994433164597, -0.02685360610485077, 0.004326188005506992, 0.04588339850306511, 0.011042985133826733, 0.015769870951771736, 0.0035519564989954233, 0.001264068647287786, -0.033061038702726364, 0.005599594675004482, -0.031213751062750816, 0.0505831204354763, -0.0026435928884893656, -0.004923840053379536, 0.0025400223676115274, -0.012897065840661526, 0.012414868921041489, -0.009643935598433018, 0.019016209989786148, -0.021488318219780922, 0.05954790487885475, 0.027166014537215233, -0.006638695020228624, -0.00723295146599412, 0.018567971885204315, -0.03246338665485382, 0.02189580723643303, -0.017033090814948082, -0.005358496215194464, -0.018866797909140587, 0.016503354534506798, 0.010839239694178104, 0.03857574239373207, -0.012557490728795528, -0.03748910129070282, -0.015824204310774803, -0.030290106311440468, -0.004105464089661837, 0.0038202209398150444, -0.012815567664802074, 0.019002627581357956, -0.04433493688702583, 0.00797322578728199, -0.02398759126663208, -0.007497820071876049, 0.014031246304512024, -0.006197247188538313, -0.031186584383249283, -0.009868054650723934, 0.006954499986022711, 0.02664986066520214, -0.00339405401609838, -0.003864365629851818, 0.008102264255285263, -0.010927529074251652, 0.02569904923439026, -0.0012674643658101559, -0.025087814778089523, -0.05395170673727989, -0.044552262872457504, 0.011593096889555454, 0.022113136947155, 0.00023133559443522245, 0.013528675772249699, 0.012082085013389587, -0.04012420400977135, -0.041754163801670074, 0.014601732604205608, 0.0008701613987796009, 0.05137093365192413, 0.006030855234712362, 0.024748239666223526, -0.062373168766498566, 0.0025790734216570854, 0.02318619377911091, 0.04006987065076828, -0.0021987492218613625, 0.0267177764326334, 0.04379161447286606, 0.009935969486832619, -0.02405550703406334, 0.022031638771295547, 0.029393628239631653, -0.022574957460165024, 0.024829737842082977, 0.04107501357793808, -0.0012199238408356905, 0.0029033678583800793, -0.0006405236781574786, 0.0016112842131406069, -0.03857574239373207, 0.023539351299405098, -0.01730475202202797, 0.0040511321276426315, 0.03977104648947716, 0.033278368413448334, -0.004251481499522924, -0.00019748418708331883, -0.017780156806111336, 0.008163387887179852, 0.004923840053379536, 0.007165036629885435, -0.022778702899813652, -0.0343378409743309, 0.001136727980338037, -0.0028269633185118437, 0.011267104186117649, -0.03412051498889923, -0.0007385760545730591, -0.009073449298739433, 0.030860593542456627, 0.04797518253326416, 0.014357239007949829, -0.05169692635536194, -0.00721936859190464, 0.05884158983826637, 0.036728452891111374, 0.016027947887778282, -0.005127585493028164, -0.010289127938449383, 0.03211022913455963, 0.0026249161455780268, -0.015756288543343544, 0.02083633281290531, 0.018146898597478867, 0.05270206928253174, 0.019342202693223953, 0.01310081034898758, -0.04251481220126152, -0.0564509779214859, 0.02463957481086254, 0.006995248608291149, -0.01507713831961155, 0.024014757946133614, -0.002930533839389682, 0.03947221860289574, -0.0018303102115169168, 0.009379066526889801, -0.003193704644218087, 0.011953046545386314, -4.650588380172849e-05, -0.034799665212631226, -0.005304164253175259, -0.041618335992097855, 0.053462717682123184, -0.021814309060573578, 0.02018434926867485, -0.0030833426862955093, -0.008353549987077713, 0.005229457747191191, 0.00671679712831974, -0.018038233742117882, 0.03346852958202362, -0.038602907210588455, 0.0018303102115169168, -0.020143600180745125, -0.005643739365041256, -0.016421856358647346, -0.03431067615747452, 0.011987004429101944, -0.025373058393597603, -0.020496757701039314, -0.005487535148859024, 0.03811391815543175, -0.010248378850519657, -0.0052430410869419575, -0.010234796442091465, 0.04661688208580017, 0.0033176494762301445, -0.018554387614130974, 0.020360928028821945, 0.03455517068505287, 0.0015781756956130266, 0.036239463835954666, -0.007185410708189011, 0.010105757042765617, -0.0036809949669986963, 0.02018434926867485, 0.012761235237121582, 0.040613193064928055, -0.014452319592237473, -0.04960514232516289, 0.01346076000481844, -0.0004715850518550724, 0.01019404735416174, 0.026826439425349236, -0.019410118460655212, -0.030480269342660904, -0.018649470061063766, 0.02584846317768097, -0.0028286613523960114, 0.022737953811883926, 0.021433984860777855, -0.013134768232703209, 0.008122638799250126, 0.02485690265893936, -0.03743476793169975, -0.008598043583333492, -0.06590475142002106, -0.014778312295675278, -0.05063745006918907, 0.023376354947686195, -0.022968865931034088, 0.04892599210143089, -0.03640246018767357, 0.020632587373256683, 0.03295237571001053, -0.034500837326049805, -0.01738625019788742, -0.0030544789042323828, -0.005144563969224691, 0.00476084416732192, 0.015321631915867329, 0.0056335520930588245, 0.02844281680881977, -0.011796842329204082, -0.01923353783786297, -0.023648016154766083, 0.011824008077383041, -0.026242369785904884, -0.025468138977885246, -0.01701950840651989, 0.0007131078746169806, 0.022737953811883926, 0.045068416744470596, -0.018364226445555687, -0.010187255218625069, -0.011586305685341358, 0.015226551331579685, -6.727833533659577e-05, -0.012401285581290722, -0.05737462267279625, -0.007212576922029257, -0.016041532158851624, 0.008210928179323673, 0.0007143812836147845, -0.0028082868084311485, 0.024177752435207367, 0.018690217286348343, -0.0010017467429861426, 0.02598429284989834, -0.03914622589945793, 0.01752207987010479, 0.00916173867881298, 0.0033465134911239147, -0.020279429852962494, -0.02492481842637062, -0.001428762567229569, 0.03172990679740906, -0.04126517474651337, -0.019654611125588417, -0.01152518205344677, -0.002694529015570879, -0.027315428480505943, 0.0056301564909517765, 0.015987198799848557, 0.007491028402000666, -0.03843991085886955, -0.02988261543214321, 0.010309502482414246, 0.021922973915934563, 0.01810614950954914, 0.003928884863853455, -0.015362381003797054, 0.008380715735256672, -0.004886487033218145, 0.05998256057500839, 0.04895315691828728, 0.008210928179323673, -0.018554387614130974, 0.037516266107559204, -0.013637339696288109, 0.004010383039712906, 0.03865724056959152, -0.022996030747890472, -0.03721744194626808, -0.025033483281731606, -0.03053460083901882, 0.024150587618350983, -0.010289127938449383, -0.011844382621347904, -0.0034415945410728455, -0.01968177780508995, 0.015688372775912285, 0.01310081034898758, -0.04770352318882942, 0.009358691982924938, 0.014425153844058514, -0.007572526577860117, 0.042052991688251495, -0.012061710469424725, -0.005606386344879866, 0.016408272087574005, -0.024530911818146706, 0.012020961381494999, 0.04186283051967621, 0.011749301105737686, -0.001011934014968574, -0.010730575770139694, -0.004190357867628336, 0.01738625019788742, 0.01257107313722372, 0.008699916303157806, 0.007613275665789843, 0.0029424189124256372, 0.005175125785171986, 0.027125265449285507, -0.0025773756206035614, -0.022724371403455734, 0.00897157657891512, 0.03409335017204285, 0.017331916838884354, 0.009725432842969894, -0.02822548896074295, -0.019858356565237045, 0.016421856358647346, 0.015634041279554367, -0.011267104186117649, 0.022248966619372368, 0.010730575770139694, -0.014914141967892647, 0.0010509851854294538, -0.02261570654809475, -0.0028456400614231825, 0.004203940741717815, 0.042052991688251495, -0.0014423455577343702, 0.03140391409397125, -0.015837786719202995, 0.044063277542591095, 0.0024075880646705627, 0.02591637894511223, -0.019070541486144066, 0.024082671850919724, -0.005090232007205486, -0.012706903740763664, 0.03797809034585953, 0.037516266107559204, 0.03814108297228813, -0.022303298115730286, -0.027383342385292053, -0.0038202209398150444, -0.007334824185818434, -0.02993694879114628, -0.027451258152723312, 0.01159988809376955, -0.0012199238408356905, 0.022574957460165024, -0.0027896100655198097, -0.003647037548944354, 0.023933259770274162, 0.004709907807409763, -0.015769870951771736, 0.0005136074614711106, 0.011783258989453316, -0.04251481220126152, 0.0393635556101799, -0.03151257708668709, 0.01782090589404106, -0.00014431944873649627, -0.030072778463363647, -0.0281439907848835, 0.009786556474864483, -0.021420402452349663, 0.016353940591216087, 0.015742706134915352, -0.007538569159805775, -0.036375295370817184, -0.021719228476285934, 0.001552707515656948, 0.02262929081916809, 0.04110218212008476, 0.004244689829647541, -0.0007657420355826616, 0.014493068680167198, -0.00502571277320385, 0.019423700869083405, -0.0018914337269961834, -0.02333560585975647, -0.00448578828945756, 0.0025162522215396166, -0.008509754203259945, -0.016068696975708008, -0.05438636243343353, 0.00897157657891512, 0.00628553656861186, -0.006784712430089712, -0.03531581908464432, 0.0054501816630363464, -0.011987004429101944, 0.010255170986056328, -0.02038809470832348, 0.0323275588452816, 0.0008353549637831748, 0.01665276661515236, 0.020374510437250137, 0.022099552676081657, 0.020795583724975586, -0.014031246304512024, -0.009480939246714115, -0.014139911159873009, -0.024245668202638626, -0.005949357058852911, 0.00018305225239600986, -0.030344437807798386, 0.010166880674660206, -0.000542471359949559, -0.02190939150750637, 0.051751259714365005, -0.01504997257143259, -0.017141755670309067, -0.016476187855005264, 0.022574957460165024, 0.03303387388586998, 0.0064417412504553795, 0.0020866894628852606, -0.006013876758515835, 0.025970710441470146, -0.010547204874455929, 0.02866014651954174, 0.02089066617190838, 0.0066930269822478294, -0.0019933064468204975, 0.00037926304503344, -0.032653551548719406, 0.026622693985700607, 0.007708356715738773, -0.025318725034594536, -0.007783063221722841, -0.009895221330225468, 0.02298244833946228, -0.04126517474651337, -0.0003056176647078246, -0.02936646156013012, 0.005535075441002846, -0.028741642832756042, -0.06579608470201492, -0.04574757069349289, -0.006513052154332399, 0.0053788707591593266, -0.037597764283418655, 0.02291453257203102, 0.004696324933320284, -0.022113136947155, -0.007239743135869503, 0.00010309290519217029, -0.04224315285682678, 0.03713594377040863, 0.012109250761568546, 0.04178133234381676, 0.0021274385508149862, -0.013807127252221107, -0.003198798280209303, -0.002981470199301839, 0.009861263446509838, 0.010547204874455929, -0.01242845132946968, 0.018146898597478867, 0.022656455636024475, -0.00843504723161459, -0.026174455881118774, 0.006390804890543222, 0.005351705010980368, 0.00014325827942229807, 0.04093918576836586, 0.031186584383249283, -0.013583007268607616, -0.0037353269290179014, 0.0031139045022428036, -0.0010441937483847141, -0.008346757851541042, -0.022072387859225273, 0.006703214254230261, -0.02879597619175911, 0.0018642677459865808, 0.0011537066893652081, -0.028958972543478012, -0.043411292135715485, 0.002764142118394375, -0.028823141008615494, -0.03963521495461464, -0.027383342385292053, 0.01738625019788742, -0.016218110918998718, -0.01731833443045616, -0.014710397459566593, -0.056559644639492035, 0.00027017449610866606, 1.4604385796701536e-05, 0.036945778876543045, -0.03221889212727547, 0.037869423627853394, -0.023077528923749924, -0.043139632791280746, 0.021556232124567032, 0.010852823033928871, -0.03509848937392235, -0.025019899010658264, 0.02291453257203102, -0.002220821799710393, -0.02196372300386429, -0.006574175786226988, 0.019858356565237045, -0.009195695631206036, -0.006906959228217602, -0.005810131318867207, -0.014941307716071606, 0.004136025905609131, 0.007029206492006779, -0.018513638526201248, -0.0030833426862955093, -0.005878046620637178, 0.007681190501898527, -0.011314645409584045, 0.003864365629851818, 0.00422091968357563, -0.021012911573052406, -0.022710788995027542, -0.0031139045022428036, -0.0333327017724514, -0.019708944484591484, 0.009895221330225468, 0.009779765270650387, 0.03944505378603935, -0.016408272087574005, -0.017861654981970787, 0.011464058421552181, 0.011531973257660866, 0.00029394475859589875, 0.03425634652376175, -0.040966350585222244, -0.009650726802647114, 0.04156400263309479, 0.04710587114095688, 0.010241587646305561, -0.01030271127820015, 0.003918697591871023, -0.008747456595301628, -0.018500056117773056, -0.006930729374289513, -0.02923063188791275, 0.010499664582312107, -0.007294075097888708, 0.012652571313083172, -0.016408272087574005, 0.002760746283456683, -0.03289804235100746, -0.00423450255766511, -0.005412828642874956, 0.020714085549116135, -0.004923840053379536, 0.005341517738997936, -0.00012330824392847717, -0.024897651746869087, 0.0100514255464077, 0.007314449641853571, 0.008672750554978848, 0.002166489604860544, -0.019124874845147133, -0.019994186237454414, 0.026826439425349236, 0.03330553323030472, -0.027899498119950294, -0.0006719343946315348, 0.011857965029776096, -0.028768809512257576, 0.0033906581811606884, 0.009372275322675705, 0.019708944484591484, 0.030317272990942, 0.015090721659362316, 0.001390560413710773, 0.011464058421552181, -0.01644902117550373, -0.002601145999506116, -0.00915494654327631, -0.02857864834368229, 0.02549530565738678, -0.02226254902780056, 0.026989435777068138, -0.00013487502292264253, -0.00422091968357563, -0.007572526577860117, 0.00879499688744545, 0.015756288543343544, -0.020360928028821945, 0.02313186228275299, -0.04273214191198349, -0.014927725307643414, -0.025196479633450508, -0.018269145861268044, 0.009555645287036896, -0.03849424421787262, -0.03276221454143524, 0.006020667962729931, 0.012183957733213902, -0.010506455786526203, 0.01629960909485817, -0.014194242656230927, -0.011864757165312767, 0.00169702700804919, 1.554617665533442e-05, -0.0018557783914729953, 0.024870486930012703, 0.00538566242903471, -0.0293121300637722, 0.0033550027292221785, -0.03490832820534706, 0.030860593542456627, -0.007063163910061121, -0.005253227893263102, 0.006811878178268671, 0.008890078403055668, -0.02988261543214321, 0.016992341727018356, 0.04911615327000618, 0.013223057612776756, 0.022289715707302094, -0.013847876340150833, 0.009324735030531883, 0.01044533308595419, -0.050012633204460144, -0.013610173016786575, -0.013243432156741619, 0.019084125757217407, -0.007959642447531223, -0.012815567664802074, 0.013053270056843758, 0.009392649866640568, -0.003776076016947627, 0.016530519351363182, -0.014696814119815826, -0.03841274604201317, 0.030860593542456627, 0.005779569502919912, 0.0015977012226358056, -0.009311151690781116, -0.026038624346256256, -0.005368683487176895, 0.005643739365041256, -0.03705444559454918, 0.0025705841835588217, -0.01242845132946968, -0.005575824528932571, -0.026120122522115707, -0.012706903740763664, -0.018771715462207794, 0.009847680106759071, -0.03667411953210831, -0.0034398967400193214, -0.0011469151359051466, 0.04879016429185867, 0.009847680106759071, 0.00012171648268122226, -0.006156498100608587, -0.008054723031818867, -0.040178537368774414, 0.0023549539037048817, -0.012346954084932804, 0.003704765345901251, -0.01780732348561287, 0.005429807119071484, -0.0059357741847634315, -0.006244787480682135, -0.03642962500452995, 0.01788882166147232, -0.005236249417066574, 0.015919284895062447, 0.04881732910871506, 0.012550698593258858, -0.044416435062885284, 0.00075852609006688, -0.01730475202202797, 0.01195983774960041, 0.003701369510963559, 0.0036028926260769367, 0.009868054650723934, -0.049523644149303436, 0.07171827554702759, 0.03186573460698128, 0.023077528923749924, -0.0007296621915884316, -0.013379261828958988, -0.004804988857358694, 0.012577865272760391, 0.0206054225564003, 0.04308529943227768, 0.0010739065473899245, -0.05900458246469498, 0.0005390755832195282, 0.009277193807065487, 0.011925880797207355, 0.015837786719202995, 0.017780156806111336, 0.008835745975375175, -0.06688272953033447, 0.003596101189032197, -0.0075793182477355, -0.010764533653855324, 0.008557294495403767, -0.022670039907097816, 0.007280491758137941, -0.0033821689430624247, 0.026772107928991318, -0.000561572436708957, 0.041401006281375885, 0.03784225881099701, 0.00865916721522808, 0.00698166573420167, -0.006166685372591019, -0.02578054741024971, 0.004618222359567881, 0.0231997761875391, -0.033006709069013596, 0.0005743065266869962, -0.009134572930634022, 0.0022632686886936426, 0.0002784516545943916, 0.01213641744107008, 0.010886779986321926, 0.0180925652384758, 0.011932672001421452, 0.022276131436228752, -0.024150587618350983, 0.05463085696101189, -0.040966350585222244, 0.00734161539003253, 0.017576411366462708, -0.03197439759969711, -0.013311346992850304, -0.03268071636557579, -0.012903857044875622, 0.017399832606315613, -0.008306008763611317, -0.02857864834368229, -0.01586495339870453, -0.028469983488321304, 0.018500056117773056, -0.017494913190603256, 0.006835648324340582, 0.030616099014878273, -0.02713884972035885, -0.012951397337019444, 0.027980994433164597, -0.008523337543010712, -0.01149122416973114, -0.011015819385647774, -0.0027862144634127617, 0.008890078403055668, 0.0072533260099589825, -0.005188708659261465, -0.023933259770274162, 0.015919284895062447, 0.006115749012678862, -0.01518580224364996, -0.005657322704792023, -0.03023577481508255, 0.02262929081916809, 0.016978759318590164, -0.0016426949296146631, -0.00013338937424123287, -0.02118949219584465, -0.002723393030464649, 0.00606820872053504, 0.007884935475885868, -0.03566897660493851, -0.028334153816103935, 0.002641894854605198, 0.008815371431410313, -0.0013837688602507114, 0.006580966990441084, -0.017562828958034515, 0.026812857016921043, -0.008516545407474041, -0.0028965764213353395, 0.002081595826894045, 0.00891045294702053, -0.025957128033041954, -0.0226972047239542, 0.01837780885398388, 0.034066181629896164, 0.010968278162181377, 0.028171157464385033, -0.0005068159662187099, 0.023783845826983452, 0.0011579514248296618, 0.00709032965824008, -0.014411570504307747, 0.0030629681423306465, -0.05406036972999573, 0.0013752795057371259, 0.009827305562794209, 0.03892889991402626, 0.01923353783786297, -0.00785776972770691], "index": 95}, {"title": "Clint Stennett", "text": "W. Clinton \"Clint\" Stennett (October 1, 1956 \u2013 October 14, 2010) was a Democratic politician and a minority leader of the Idaho Senate. Stennett represented District 25, which includes Blaine, Gooding, Camas and Lincoln Counties. Stennett served in the Idaho Senate from 1994 to 2010, but was unable to fulfill his duties after the 2008 session due to poor health. He served as the minority leader from 1999 to 2009.", "vector": [0.035401877015829086, -0.027498804032802582, -0.021522914990782738, -0.010113664902746677, 0.02487524226307869, -0.007089282386004925, 0.02983085811138153, 1.987977339013014e-05, -0.019320419058203697, 0.049135081470012665, -0.007915218360722065, 0.04550744220614433, -0.019530951976776123, 0.007712782826274633, -0.01033229473978281, 0.022008759900927544, -0.02928023412823677, 0.03093210607767105, 0.021296188235282898, -0.02740163542330265, 0.04145873710513115, -0.04026032239198685, -0.041167233139276505, 0.002064839471131563, 0.06464972347021103, 0.027061544358730316, 0.009959814138710499, -0.006052813958376646, -0.029118286445736885, -0.031547509133815765, -0.011376860551536083, 0.007340302225202322, 0.04181502386927605, 0.03909429535269737, 0.024859048426151276, 0.02532869763672352, 0.004963712301105261, -0.002483880380168557, -0.012518595904111862, 0.042495205998420715, -0.019644316285848618, -0.023935943841934204, -0.019530951976776123, -0.01319068018347025, 0.013287849724292755, -0.000880087201949209, -0.010696678422391415, -0.006931382697075605, 0.012154212221503258, 0.01590331271290779, -0.026689061895012856, -0.03381478413939476, -0.024891437962651253, -0.0033280353527516127, 0.05208253860473633, 0.0272234920412302, 0.000954482180532068, 0.0782533660531044, -0.05094890296459198, -0.030219532549381256, -0.031094053760170937, 0.0064576840959489346, -0.04638196527957916, 0.02226787619292736, 0.01695597544312477, 0.022332657128572464, 0.030349092558026314, 0.001865440746769309, -0.04009837284684181, -0.011028672568500042, 0.028988726437091827, -0.0360172800719738, 0.03844650089740753, 0.03770153969526291, 0.03494841977953911, 0.0018522824393585324, -0.016891196370124817, -0.03776631876826286, -0.03588772192597389, 0.008672325871884823, -0.0034515210427343845, -0.03426823765039444, 0.005129708908498287, 0.006077106110751629, -0.0052187805995345116, -0.02612224407494068, 0.03193618357181549, -0.05732966214418411, 0.013846570625901222, 0.023482488468289375, 0.05072217434644699, 0.005639845971018076, 0.004380698781460524, -0.01805722340941429, -0.008137896656990051, -0.024664711207151413, 0.04667346924543381, -0.01695597544312477, -0.007073087617754936, -0.05072217434644699, 0.0059192064218223095, 0.03702135756611824, 0.03423584997653961, 0.0598236620426178, 0.05347529426217079, 0.033879563212394714, -0.02890775352716446, -0.024583736434578896, 0.013563161715865135, 0.07954895496368408, 0.006004229187965393, -0.017652353271842003, -0.02670525759458542, -0.0062309568747878075, 0.026915790513157845, 0.03284309431910515, -0.029863247647881508, 0.06189659982919693, 0.009109586477279663, -0.03977447748184204, -0.0152555201202631, -0.01891554892063141, -0.0330212377011776, -0.019952017813920975, -0.004032509867101908, -0.009190560318529606, -0.02532869763672352, 0.01868882216513157, -0.005745112430304289, 0.003996071871370077, -0.02702915482223034, -0.04048704728484154, -0.037410032004117966, -0.010259417816996574, -0.02602507546544075, 0.004060850944370031, 0.051661472767591476, 0.008664228953421116, 0.01910988800227642, 0.0019646340515464544, 0.03303743153810501, 0.013441700488328934, -0.05593690648674965, 0.03468930348753929, -0.015968091785907745, -0.04210653156042099, 0.04285149276256561, 0.013733207248151302, -0.015239325352013111, 0.008996222168207169, 0.010542827658355236, 0.0031539411284029484, -0.030575819313526154, -0.012745322659611702, 0.029976611956954002, -0.07838292419910431, -0.060730572789907455, 0.003489983733743429, -0.028065621852874756, 0.007486055605113506, -0.02905350551009178, 0.017247483134269714, -0.021603889763355255, 0.025458255782723427, 0.031320780515670776, -0.041167233139276505, 0.0360172800719738, 0.03179043158888817, -0.04732126370072365, 0.022105928510427475, -0.005534579511731863, -0.0539611391723156, 0.02259177342057228, -0.006097349803894758, -0.038835179060697556, -0.017668548971414566, 0.0215391106903553, -0.004538598004728556, 0.008445598185062408, -0.005809891503304243, 0.019320419058203697, 0.003390790428966284, -0.0229156706482172, 0.00151522783562541, -0.015190741047263145, -0.006405051331967115, 0.05927303805947304, -0.002747046295553446, 0.041879802942276, -0.04265715554356575, 0.027709336951375008, -0.04291627183556557, -0.004789617843925953, 0.01786288619041443, 0.03491603210568428, 0.05172625556588173, -0.01289917342364788, 0.009425384923815727, -0.011660270392894745, 0.03279450908303261, 0.020324498414993286, -0.0009651100262999535, 0.00702045438811183, 0.025539230555295944, -0.0059880344197154045, -0.01154690608382225, 0.004898932762444019, -0.0003152928838972002, -0.033199381083250046, -0.011976068839430809, -0.011093451641499996, 0.015304104425013065, -2.584212415968068e-05, 0.03504559025168419, -0.037960655987262726, 0.014275733381509781, 0.016421547159552574, 0.03702135756611824, 0.04184741526842117, 0.008024533279240131, 0.057621169835329056, -0.0007226938032545149, -0.03285928815603256, -0.019919628277420998, 0.011992263607680798, -0.025393476709723473, -0.01718270406126976, 0.02647853083908558, 0.027385439723730087, 0.008745202794671059, -0.04324016720056534, -0.019320419058203697, -0.02515055425465107, 0.04884357750415802, -0.03436540812253952, -0.01642964407801628, 0.030041391029953957, -0.004579085391014814, -0.035855330526828766, -0.016526812687516212, -0.01755518466234207, 0.05502999573945999, -0.031628482043743134, 0.03111024759709835, 0.009287728928029537, 0.017846690490841866, -0.0065427073277533054, -0.022688942030072212, -0.02813040092587471, 0.047353651374578476, -0.03689179942011833, -0.015798047184944153, 0.002599268453195691, 0.010478048585355282, 0.0002546888426877558, -0.02442178875207901, -0.050786953419446945, -0.04003359377384186, 0.01600858010351658, -0.03115883283317089, -0.015287909656763077, -0.0069435290060937405, 0.014162370003759861, 0.030672987923026085, 0.0087047154083848, 0.03423584997653961, -0.01642964407801628, 0.029474571347236633, 0.050365887582302094, -0.003724808571860194, 0.03967730700969696, -0.022688942030072212, 0.023336734622716904, 0.02757977694272995, -0.011247302405536175, 0.011012477800250053, -0.013142095878720284, -0.01901271753013134, -0.07268235087394714, 0.023352930322289467, -0.03180662542581558, -0.013636037707328796, 0.020454056560993195, -0.030122363939881325, -0.02885916829109192, 0.017717132344841957, 0.042268477380275726, -0.024891437962651253, 0.028648635372519493, -0.004575036466121674, -0.031191222369670868, 0.026365166530013084, 0.034300629049539566, 0.032697342336177826, 0.0022612016182392836, 0.019725291058421135, -0.02680242620408535, 0.02497241273522377, 0.030721573159098625, -0.0045547932386398315, -0.005020393989980221, 0.002083058701828122, 0.040389880537986755, -0.03880278766155243, 0.008720910176634789, 0.02327195554971695, 0.005307852290570736, -0.009020514786243439, 0.0004327053320594132, -0.0020709126256406307, -0.06011516973376274, 0.005020393989980221, 0.026332776993513107, 0.033879563212394714, 0.010000301524996758, -0.00504063768312335, 0.002067876048386097, 0.0015466052573174238, -0.010704775340855122, -0.009401093237102032, 0.008510377258062363, 0.0014656311832368374, 0.03676224127411842, -0.007044746540486813, 0.025004802271723747, -0.04887596517801285, -0.011538809165358543, 0.02923164889216423, -0.04732126370072365, 0.010437561199069023, -0.05405830964446068, -0.0317094586789608, 0.022300265729427338, -0.03527231886982918, -0.02923164889216423, 0.018397314473986626, -0.04320777952671051, -0.007453665602952242, 0.03728047385811806, 0.026510920375585556, -0.008405111730098724, -0.038640838116407394, -0.011109646409749985, 0.0044171372428536415, -0.010251320898532867, -0.013984226621687412, 0.0743018314242363, 0.007105477154254913, 0.01727987267076969, 0.005226877983659506, 0.000804173992946744, 0.015061181969940662, -0.01317448541522026, -0.0016984316753223538, 0.01157119870185852, 0.0248266588896513, -0.05017155036330223, -0.0011771610006690025, 0.02116663008928299, 0.055645398795604706, 0.029199259355664253, 0.02071317471563816, 0.0019869019743055105, -0.014032810926437378, 0.022462215274572372, -0.006287638563662767, 0.024227449670433998, 0.010818139649927616, -0.0379282683134079, -0.005797745659947395, 0.002263226080685854, -0.03624400496482849, 0.019984407350420952, 0.039968814700841904, 0.039385803043842316, -0.025992685928940773, -0.0003780478145927191, 0.03964491933584213, -0.025506841018795967, -0.012607666663825512, 0.0394829697906971, 0.004498111084103584, 0.018397314473986626, -0.03656790405511856, -0.017992444336414337, -0.039418190717697144, -0.011886997148394585, 0.03546665608882904, -0.022575577720999718, -0.03783109784126282, 0.0012996342265978456, -0.04145873710513115, -0.030980689451098442, 0.0006402014405466616, 0.01833253540098667, -0.030753962695598602, -0.012154212221503258, 0.011150132864713669, 0.05668186768889427, -0.04641435295343399, -0.03190379589796066, -0.07404271513223648, 0.0356609933078289, -0.008834274485707283, -0.006032570265233517, -0.023531073704361916, -0.020275915041565895, -0.012364745140075684, 0.006886846851557493, -0.030543429777026176, -0.010073177516460419, -0.010040787979960442, -0.06691699475049973, 0.028017038479447365, 0.050365887582302094, -0.01983865350484848, -0.041393958032131195, 0.03854367136955261, 0.011806023307144642, 0.01923944614827633, 0.034300629049539566, -0.02432461827993393, 0.03153131529688835, 0.01896413415670395, 0.026332776993513107, 0.0007849426474422216, -0.004202555865049362, 0.019757680594921112, 0.008931443095207214, -0.026996763423085213, -0.049361810088157654, -0.024065501987934113, -0.011976068839430809, 0.04884357750415802, -0.019628120586276054, -0.026770036667585373, -0.05483565852046013, 0.015490344725549221, -0.019579537212848663, 0.03556382283568382, -0.021846812218427658, -0.020956097170710564, -0.014470071531832218, 0.06312740594148636, -0.0434345044195652, 0.0195633415132761, -0.006069008726626635, 0.020923707634210587, -0.008510377258062363, -0.013020634651184082, -0.039742086082696915, -0.012162309139966965, 0.007271474227309227, 0.0008846420096233487, 0.01129588671028614, 0.011652172543108463, 0.013757498934864998, -0.0032875484321266413, 0.04230086877942085, -0.04609045758843422, -0.01539317611604929, -0.059953223913908005, -0.00029935111524537206, -0.0029879442881792784, -0.027741726487874985, -0.013555063866078854, 0.020648395642638206, -0.03987164422869682, -0.01174934208393097, 0.039515361189842224, 0.011619783006608486, 0.024162670597434044, -0.07494962215423584, -0.00457098800688982, 0.029085896909236908, 0.028875363990664482, -0.004518354777246714, 0.00374505203217268, 0.027919869869947433, 0.0029231649823486805, 0.008648033253848553, -0.023854969069361687, 0.0031154784373939037, -0.015263617038726807, 0.041393958032131195, 0.01841351017355919, -0.04916747286915779, -0.06335413455963135, -0.04589612036943436, -0.02890775352716446, 0.012793907895684242, 0.053540073335170746, 0.03617922589182854, -0.019822459667921066, -0.0018421607092022896, 0.024227449670433998, -0.05007438361644745, 0.009222949855029583, 0.03455974534153938, -0.0031397705897688866, 0.03336132690310478, 0.06691699475049973, 0.001359352725557983, -0.0201625507324934, -0.06464972347021103, 0.0020628152415156364, 0.04842251166701317, 0.017166508361697197, -0.004530500620603561, -0.017247483134269714, 0.02089131809771061, 0.051013682037591934, -0.00966830737888813, 0.010291808284819126, 0.042819101363420486, -0.03462452441453934, -0.004607426002621651, 0.0047693741507828236, 0.009101488627493382, -0.010388976894319057, -0.016243403777480125, -0.009206755086779594, -0.019773874431848526, 0.010704775340855122, -0.015182643197476864, 0.006959723774343729, 0.014065200462937355, -0.03536948561668396, -0.052762720733881, -0.056519921869039536, -0.003536543808877468, 0.0017227239441126585, 0.024178866297006607, 0.003971779718995094, -0.03106166422367096, 0.05447937175631523, -0.01778191141784191, -0.0014727164525538683, 0.0061054471880197525, -0.007696588058024645, 0.011101548559963703, 0.0272234920412302, 0.0038563914131373167, -0.03698896989226341, 0.029749883338809013, 0.03336132690310478, -0.043272558599710464, -0.0014484241837635636, 0.004773423075675964, -0.028551466763019562, -0.0007029564003460109, 0.0269805695861578, -0.011344471015036106, 0.00012291615712456405, -0.03101307898759842, -0.031077858060598373, 0.00517829367890954, 0.030413871631026268, 0.0047693741507828236, 0.0010971990413963795, -0.0067006065510213375, -0.030527234077453613, -0.04026032239198685, -0.019207056611776352, -0.011992263607680798, 0.010243223048746586, -0.06319218873977661, 0.030915910378098488, -0.010680483654141426, 0.005546725820749998, 0.02850288338959217, -0.021474331617355347, -1.2256820980383054e-07, 0.017522795125842094, -0.007947607897222042, 0.0379282683134079, 0.02349868416786194, -0.007060941308736801, -0.01613003946840763, 0.021409550681710243, -0.0052754622884094715, -0.0012055018451064825, 0.05736204981803894, -0.02717490680515766, -0.010308003053069115, 0.033053625375032425, 0.012834394350647926, -0.017247483134269714, 0.00800429005175829, 0.021571500226855278, -0.02753119356930256, -0.014210954308509827, 0.019628120586276054, 0.02029210887849331, 0.02534489333629608, 0.053216177970170975, -0.009619723074138165, 0.011198718100786209, -0.013579356484115124, 0.007473909296095371, 0.027110127732157707, 0.017700938507914543, 0.010243223048746586, -0.04048704728484154, 0.023887358605861664, -0.04910269379615784, -0.04984765499830246, -0.01833253540098667, 0.0016093602171167731, -0.029296427965164185, 0.048228174448013306, -0.05379918962717056, 0.01495591551065445, -0.023158591240644455, -0.0017864910187199712, -0.029312623664736748, 0.034333016723394394, 0.035401877015829086, -0.023660631850361824, -0.026996763423085213, -0.0269805695861578, -0.03909429535269737, 0.021830616518855095, 0.04055183008313179, 0.04599328711628914, 0.04064899682998657, -0.0003836147952824831, 0.007652052212506533, -0.006040667649358511, -0.016364865005016327, -0.0449892096221447, -0.034430187195539474, -0.013538869097828865, 0.015895215794444084, -0.014324317686259747, -0.019644316285848618, 0.026316581293940544, -0.00688279839232564, -0.011142035946249962, 0.009870742447674274, 0.02221929281949997, 0.03627639636397362, 0.04942658916115761, 0.016219111159443855, -0.013506479561328888, -0.011101548559963703, 0.02089131809771061, 0.04045465961098671, 0.022964254021644592, 0.010955795645713806, 0.025118164718151093, -0.0277579203248024, -0.015522734262049198, -0.006959723774343729, -0.025134360417723656, -0.03284309431910515, 0.0007545773987658322, 0.025684984400868416, 0.05959693714976311, -0.016632080078125, -0.011603588238358498, -0.024486567825078964, 0.03284309431910515, -0.014146175235509872, 0.021020876243710518, 0.051985371857881546, 0.046479132026433945, 0.016526812687516212, -0.01623530685901642, 0.026818621903657913, -0.057750727981328964, 0.039418190717697144, 0.024211255833506584, -0.0003557799500413239, 0.019401393830776215, -0.0015304104890674353, -0.04622001573443413, -0.01255098544061184, 0.024713294580578804, -0.018478289246559143, 0.022656552493572235, -0.019028913229703903, -0.017069339752197266, 0.009457774460315704, -0.03870561718940735, 0.018267756327986717, 0.0087047154083848, -0.010688580572605133, 0.020324498414993286, -0.010097470134496689, 0.00859135203063488, 0.020972291007637978, 0.005826086271554232, -0.011765536852180958, 0.018996523693203926, -0.015409370884299278, 0.024357007816433907, -0.032000962644815445, -0.00682611670345068, -0.022575577720999718, -0.00336244935169816, 0.025490645319223404, 0.023450098931789398, 0.02304522879421711, 0.009716891683638096, 0.04126439988613129, -0.01237284205853939, -0.025280114263296127, -0.013546966947615147, 0.007692539133131504, -0.006781580857932568, 0.036405954509973526, -0.009716891683638096, 0.02254318818449974, 0.0075508346781134605, 0.012996342964470387, 0.02116663008928299, -0.016162430867552757, 0.018202977254986763, -0.022332657128572464, 0.019223250448703766, 0.03179043158888817, -0.006170226261019707, -0.002961627673357725, -0.019028913229703903, 0.04907030239701271, -0.015385078266263008, 0.010810041800141335, 0.018445899710059166, 0.01993582211434841, -0.020032992586493492, -0.04417946934700012, 0.04142634943127632, -0.024033112451434135, 0.03247061371803284, -0.01647822931408882, 0.031822819262742996, -0.01723128743469715, 0.016664469614624977, -0.005328095518052578, 0.007056892849504948, -0.04252759739756584, -0.029166869819164276, 0.001460570259951055, 0.03624400496482849, -0.01695597544312477, 0.03582294285297394, 0.018866965547204018, 0.003151916665956378, -0.0008654106641188264, 0.03478647395968437, -0.04356406629085541, -0.002805752446874976, 0.002356346230953932, -0.030025195330381393, -0.03536948561668396, -0.009303923696279526, 6.838515400886536e-05, 0.04252759739756584, 0.031029274687170982, -0.010413268581032753, 0.0053240470588207245, 0.038640838116407394, 0.021425746381282806, 0.00333208404481411, 0.001055699773132801, 0.05726488307118416, 0.008785689249634743, -0.0010435536969453096, 0.033231768757104874, -0.0018158440943807364, -0.05869002640247345, -0.01484255213290453, -0.010696678422391415, -0.005239024292677641, 0.01796005479991436, -0.0016528838314116001, 0.056293193250894547, 0.028891557827591896, -0.039385803043842316, -0.05856046825647354, 0.037086136639118195, 0.00289279967546463, -0.0028361177537590265, -0.017377041280269623, -0.011878900229930878, 0.062382444739341736, 0.031223611906170845, -0.03899712488055229, -0.03394434228539467, 0.013142095878720284, 0.009344411082565784, 0.021587694063782692, -0.011142035946249962, 0.039742086082696915, 0.0019190860912203789, 0.02437320351600647, -0.0014959964901208878, -0.0005835195770487189, 0.004664108157157898, 0.051564306020736694, -0.032778315246105194, 0.015061181969940662, -0.01713411882519722, 0.06264156103134155, -0.02469710074365139, -0.007267425302416086, -0.04000120609998703, -0.005287608597427607, -0.0009549882961437106, 0.03747481107711792, -0.008526572957634926, 0.003449496580287814, -0.0001495490432716906, -0.006380758713930845, 0.0072755226865410805, -0.03669746220111847, 0.0403251014649868, -0.006522463634610176, -0.030446261167526245, -0.019579537212848663, 0.00286445883102715, 0.04919986054301262, -0.021782033145427704, -0.028017038479447365, 0.03407390043139458, 0.03669746220111847, -0.025361087173223495, -0.0008077166276052594, 0.011255399323999882, 0.004526452161371708, 0.04699736833572388, -0.03511036932468414, -0.0006290675373747945, -0.05645514279603958, 0.03676224127411842, -0.07864204049110413, -0.029668910428881645, -0.011214912869036198, 0.03899712488055229, 0.03313460201025009, -0.03349088877439499, -0.012308062985539436, -0.018947938457131386, 0.04443858563899994, 0.013822278939187527, 0.006712752860039473, -0.0026883401442319155, 0.0007702661096118391, -0.007635857444256544, 0.020227329805493355, 0.01833253540098667, -0.030964495614171028, 0.02442178875207901, 0.037086136639118195, 0.02740163542330265, 0.03028431348502636, -0.01705314591526985, 0.013854668475687504, -0.018041029572486877, 0.04175024479627609, 0.024178866297006607, -0.0017115899827331305, -0.02474568411707878, -0.012154212221503258, 0.016615884378552437, 0.004429283086210489, -0.03617922589182854, 0.012210894376039505, -0.06445538252592087, 0.03436540812253952, 0.009660209529101849, 0.012866783887147903, -0.02652711421251297, -0.0005410081939771771, 0.034754082560539246, -0.019579537212848663, 0.006008278112858534, 0.025830736383795738, 0.008324136957526207, -0.008012386970221996, -0.015036890283226967, -0.04087572544813156, -0.04081094637513161, 0.021863006055355072, -0.02226787619292736, -0.053216177970170975, -0.002866483060643077, -0.0004823019844479859, -0.00580584304407239, 0.004307821858674288, -0.007814000360667706, 0.016372961923480034, -0.04596089944243431, 0.008445598185062408, 0.018543068319559097, 0.014445778913795948, -0.007437470834702253, -0.014874941669404507, -0.03326416015625, 0.011830315925180912, -0.034851253032684326, -0.011563100852072239, 0.031175028532743454, 0.04022793099284172, -0.007660149596631527, -0.0035405925009399652, 0.008206725120544434, 0.037539590150117874, -0.01307731680572033, 0.025733567774295807, -0.049135081470012665, 1.706465809547808e-05, -0.01676163822412491, 0.04126439988613129, 0.018931744620203972, -0.01690739206969738, 0.010024593211710453, 0.020680785179138184, -0.0012915368424728513, -0.012016556225717068, 0.05020394176244736, -0.0016619933303445578, -0.01351457741111517, -0.022624162957072258, -0.028600051999092102, 0.00289279967546463, -0.033150795847177505, -0.007951656356453896, 0.03569338098168373, -0.021587694063782692, -0.019692901521921158, 0.021879201754927635, -0.014057103544473648, 0.043272558599710464, -0.0031903793569654226, 0.02562020532786846, 0.03345849737524986, -0.010413268581032753, -0.01276151742786169, 0.018931744620203972, 0.027158712968230247, -0.012891076505184174, 0.003330059815198183, 0.011579295620322227, 0.00950635876506567, -0.0010354563128203154, -0.005376680288463831, 0.010243223048746586, 3.0523438908858225e-05, 0.04485965147614479, 0.011360665783286095, -0.02396833337843418, 0.0011903191916644573, 0.014478168450295925, 0.0217172522097826, -0.013717012479901314, 0.02730446681380272, 0.0029049457516521215, -0.0028320690616965294, -0.008332234807312489, -0.019093692302703857, -0.019854849204421043, -0.004182312171906233, 0.036859408020973206, 0.016186721622943878, 0.011206815019249916, -0.0008699654717929661, -0.02642994560301304, -0.028891557827591896, -0.007769464515149593, 0.03164467588067055, -0.001584055833518505, 0.01836492493748665, -0.04728887230157852, 0.025118164718151093, -0.03345849737524986, 0.006360515486449003, 0.04511876776814461, 0.021506721153855324, 0.03478647395968437, 0.055191945284605026, 0.0021093753166496754, 0.033782392740249634, 0.025717373937368393, 0.04288388416171074, -0.002659999066963792, 0.03643834590911865, 0.04045465961098671, 0.0406813882291317, -0.03559621423482895, -0.03647073358297348, 0.017765717580914497, -0.003473788732662797, 0.009457774460315704, 0.024211255833506584, -0.06409909576177597, -0.004745081998407841, 0.02702915482223034, -0.0006032570381648839, 0.0008942576823756099, 0.03821977600455284, -0.013943740166723728, 0.011741244234144688, -0.003907000180333853, 0.003423179965466261, -0.0017298092134296894, 0.02642994560301304, -0.007805902976542711, 0.03766915202140808, 0.009733086451888084, 0.01509357150644064, 0.01961192674934864, 0.00633217440918088, 0.03143414482474327, -0.038090214133262634, -0.00043877839925698936, -0.005133757833391428, -0.01610574871301651, 0.019676705822348595, -0.0017480283277109265, -0.011814121156930923, 0.007441519759595394, 0.028470491990447044, -0.010623801499605179, -0.012777713127434254, 0.026235608384013176, 0.00014524729340337217, 0.012882978655397892, 0.01264815405011177, 0.015514637343585491, 0.0305110402405262, -0.006866603624075651, 0.019142277538776398, 0.004979907069355249, -0.018591653555631638, 0.017943860962986946, 0.05026872083544731, -0.00020357394532766193, -0.0465439110994339, 0.03582294285297394, 0.015352688729763031, -0.021312382072210312, 0.02562020532786846, -0.030980689451098442, -0.006781580857932568, -0.04252759739756584, 0.012583374977111816, -0.03133697435259819, -0.029523156583309174, -0.01319877803325653, -0.012518595904111862, -0.012955855578184128, -0.008137896656990051, 0.023288151249289513, -0.03439779579639435, 0.04311060905456543, -0.015425565652549267, -0.02204114943742752, 0.020097771659493446, -0.003611444728448987, -0.025944100692868233, 0.0187859907746315, 0.03216291218996048, 0.0006862554582767189, 0.012316159904003143, 0.0040932404808700085, 0.014089493080973625, -0.020194940268993378, -0.004400942008942366, 0.008834274485707283, -0.021231409162282944, 0.0066317785531282425, 0.012891076505184174, -0.03990403562784195, 0.029992805793881416, -0.020696979016065598, 0.02106945961713791, -0.04168546572327614, -0.022850889712572098, -0.0023158593103289604, 0.03614683821797371, -0.0330212377011776, 0.007660149596631527, 0.006858506239950657, 0.020535031333565712, 0.002060790779069066, 0.024988606572151184, -0.005380728747695684, 0.005028491374105215, -0.009749281220138073, 0.0010045849485322833, -0.016291989013552666, -0.01647822931408882, 0.006514366250485182, 0.017603768035769463, -0.012777713127434254, 0.03368522599339485, -0.043499287217855453, -0.021247602999210358, -0.0031397705897688866, -0.02996041625738144, -0.020194940268993378, -0.007016405463218689, -0.01846209354698658, 0.003864488797262311, -0.015870923176407814, 0.02863244153559208, -0.026867205277085304, -0.015644196420907974, 0.00845369603484869, 0.01838112063705921, -0.009125781245529652, 0.014834455214440823, -0.0059313527308404446, -0.013166388496756554, -0.028162790462374687, 0.00898002739995718, -0.011530711315572262, -0.0005293681751936674, -0.04732126370072365, -0.0065629505552351475, -0.00454669538885355, -0.0022105928510427475, 0.002259177388623357, -0.028373323380947113, 0.0007910157437436283, 0.0001891504361992702, 0.042268477380275726, 0.0024676856119185686, -0.03060820885002613, -0.03311840444803238, -0.004639816004782915, -0.005457654129713774, 0.001134649501182139, -0.008963832631707191, -0.018656432628631592, -0.008712813258171082, 0.02377399429678917, 0.0021923736203461885, 0.01703695021569729, -0.01681022346019745, -0.0046681566163897514, 0.013976129703223705, 0.04184741526842117, -0.00495966337621212, -0.004830104764550924, 0.01676163822412491, -0.009684502147138119, 9.672609303379431e-05, -0.0026296337600797415, -0.021571500226855278, -0.0037754173390567303, 0.0027409731410443783, 0.03815499320626259, -0.008793787099421024, 0.02639755606651306, -0.00994361937046051, -0.006846359930932522, 0.029895637184381485, -0.00980596337467432, -0.014162370003759861, -0.006878749467432499, 0.0005809891736134887, 0.006996162235736847, 0.03621161729097366, -0.02098848670721054, -0.01864023692905903, -0.00032541464315727353, -0.016121942549943924, -0.01773332804441452, 0.025166749954223633, -0.04395274072885513, -0.012518595904111862, 0.021101849153637886, -0.007226938381791115, -0.01805722340941429, 0.04126439988613129, 0.02034069411456585, -0.014210954308509827, -0.02963651902973652, -0.010567119345068932, 0.040163151919841766, -0.007858536206185818, -0.0026377311442047358, 0.005534579511731863, 0.03834933415055275, -0.019644316285848618, -0.04200936108827591, 0.01470489613711834, -0.0021761788520962, -0.024583736434578896, 0.029539350420236588, -0.029814662411808968, 0.006073057185858488, -0.03821977600455284, 0.012324257753789425, 0.013595551252365112, 0.005907060578465462, 0.007174305152148008, -0.004643864464014769, -0.012016556225717068, -0.012380939908325672, 0.009976008906960487, -0.006927334237843752, -0.029847051948308945, -0.0013370848027989268, -0.02349868416786194, 0.01509357150644064, 0.028259960934519768, -0.02694818004965782, -0.00584228103980422, 0.007036649156361818, 0.01565229333937168, 0.035531435161828995, -0.0035588114988058805, 0.0140004213899374, -0.00039803830441087484, 0.017668548971414566, -0.02051883563399315, 0.01282629743218422, -0.03812260553240776, -0.004777472000569105, -0.021296188235282898, -0.02895633690059185, 0.0014798016054555774, -0.00043599490891210735, -0.022705137729644775, 0.007818048819899559, -0.012696738354861736, -0.03245441988110542, 0.005789647810161114, -0.016891196370124817, -0.013368823565542698, -0.0036276394966989756, -0.07779991626739502, 0.015660390257835388, 0.04097289219498634, 0.0009585308725945652, 0.0152555201202631, 0.020858928561210632, 0.005077076144516468, -0.04268954321742058, -0.012704836204648018, -0.01280200481414795, 0.011903192847967148, -0.0028806535992771387, 0.002382662845775485, -0.022883279249072075, 0.019919628277420998, -0.007854487746953964, -0.00740912975743413, 0.00886666402220726, -0.02808181755244732, -0.007623711135238409, -0.006988064851611853, -0.0017945884028449655, 0.02144194208085537, -0.003973803948611021, 0.0032875484321266413, -0.006789678242057562, 0.025782153010368347, 0.032826900482177734, 0.03737764433026314, 0.023628242313861847, 0.013749402016401291, -0.04181502386927605, 0.00749010406434536, 0.021199019625782967, 0.004006193485110998, -0.025231529027223587, -0.007154061459004879, 0.018154392018914223, -0.009449677541851997, -0.024437982589006424, 0.009595430456101894, 0.0007707722252234817, 0.015765657648444176, -0.019725291058421135, 0.03909429535269737, -0.011393055319786072, 0.009214852005243301, -0.0033138650469481945, -0.018267756327986717, 0.012267575599253178, 0.004781520459800959, -0.0027652655262500048, -0.0011538808466866612, -0.009652112610638142, 0.007603467907756567, 0.011085353791713715, 0.025684984400868416, 0.004054777789860964, -0.010963892564177513, -0.019093692302703857, -0.01317448541522026, -0.0013836448779329658, -0.007133818231523037, -0.0044738189317286015, -0.004996101837605238, -0.0050811246037483215, -0.0031154784373939037, -0.035531435161828995, -0.010777652263641357, 0.00015726688434369862, -0.018543068319559097, -0.012486206367611885, 0.0023705167695879936, 0.005004199221730232, 0.014988305978477001, 0.022413630038499832, -0.02437320351600647, -0.011886997148394585, 0.0283571295440197, 0.004202555865049362, 0.008882858790457249, 0.019045107066631317, 0.00754678575322032, 0.027644557878375053, 0.00672489870339632, 0.011603588238358498, -0.026559503749012947, -0.021360967308282852, -0.020648395642638206, -0.03253539279103279, 0.003423179965466261, -0.024616125971078873, 0.011352568864822388, -0.0037187354173511267, -0.025134360417723656, 0.00037551738205365837, 0.0035021298099309206, -0.02199256420135498, -0.04113484174013138, -0.02474568411707878, 0.0034393747337162495, -0.00641314871609211, -0.009328216314315796, 0.03634117543697357, 9.46384752751328e-05, 0.0014271684922277927, 0.007562980987131596, -0.00025380318402312696, 0.04275432229042053, -0.03656790405511856, -0.004190409556031227, 0.03689179942011833, 0.001110357348807156, 0.027612168341875076, -0.034754082560539246, -0.0021964223124086857, 0.0026053416077047586, 0.028842974454164505, 0.018251562491059303, -0.029928026720881462, 0.013749402016401291, 0.0019514757441356778, -0.01781430095434189, 0.006016375496983528, -0.010429464280605316, -0.023110007867217064, 0.011085353791713715, 0.013506479561328888, -0.030770156532526016, -0.010461853817105293, -0.0004896402242593467, 0.027385439723730087, 0.025182943791151047, -0.010939600877463818, 0.0051499526016414165, -0.024859048426151276, 0.0016022749477997422, 0.005870622117072344, 0.02029210887849331, 0.010348489508032799, 0.006571047939360142, -0.0002457057707943022, -0.0217172522097826, -0.02557162009179592, -0.004898932762444019, -0.029668910428881645, -0.026267997920513153, -0.018526874482631683, 0.011789828538894653, 0.051467135548591614, 0.027968453243374825, -0.0020729368552565575, -0.00625524902716279, 0.005907060578465462, 0.014283831231296062, 0.005348339211195707, 0.030543429777026176, -0.03183901682496071, -0.011328276246786118, -0.0002316618338227272, 0.005550774279981852, -0.006360515486449003, 0.0018340633250772953, -0.004975858144462109, 0.03436540812253952, -0.023514878004789352, -0.012332355603575706, 0.008971930481493473, -0.01979007013142109, -0.025490645319223404, -0.03316698968410492, -0.019903432577848434, -0.016972171142697334, 0.0016457985620945692, -0.03724808618426323, -0.0244703721255064, -0.006320028565824032, 0.005939450114965439, -0.002704534912481904, 0.022251682355999947, 0.011344471015036106, 0.009061001241207123, 0.07015595585107803, -0.021782033145427704, 0.0025284162256866693, -0.015336493961513042, 0.01074526272714138, -0.0008072105119936168, 0.05713532492518425, 0.004842251073569059, -0.035855330526828766, -0.025863127782940865, -0.039288632571697235, 0.019547147676348686, -0.020308304578065872, -0.024357007816433907, -0.0030871375929564238, 0.0009686526609584689, -0.006344320718199015, 0.03224388509988785, 0.012931563891470432, 0.009133878163993359, -0.008834274485707283, 0.039612527936697006, -0.022802306339144707, 0.02194398082792759, -0.010113664902746677, 0.03352327644824982, 0.028292350471019745, -0.020745564252138138, -0.04336972534656525, -0.022786110639572144, 0.0114578353241086, 0.015644196420907974, 0.014883039519190788, 0.015223130583763123, 0.0014200832229107618, -0.0025182943791151047, -0.03715091571211815, 0.031596094369888306, 0.04123201221227646, 0.014065200462937355, -0.003767319954931736, 0.04022793099284172, 0.007664198521524668, -0.02029210887849331, 0.01332833617925644, -0.03352327644824982, -0.01102057471871376, -0.037636760622262955, -0.03381478413939476, -0.0023239566944539547, 0.011239204555749893, -0.031045468524098396, -0.013636037707328796, 0.005328095518052578, 0.007384837605059147, -0.0006437440752051771, 0.006012326572090387, -0.012704836204648018, -0.031677067279815674, -0.004380698781460524, -0.007320058532059193, -0.02286708541214466, -0.05098129063844681, 0.01668066345155239, -0.011814121156930923, -0.013814181089401245, -0.00043953751446679235, 0.00023710228560958058, 0.030770156532526016, -0.006259297952055931, 0.026316581293940544, 0.011352568864822388, 0.025684984400868416, -0.027158712968230247, 0.0038563914131373167, 0.014996402896940708, -0.020227329805493355, -0.02341770939528942, -0.013020634651184082, 0.0018016736721619964, -0.010761457495391369, 0.026867205277085304, -0.01319068018347025, 0.0036964674945920706, -0.0048462999984622, 0.00214783800765872, -0.027288271114230156, -0.027563583105802536, 0.038284555077552795, -0.05214731767773628, -0.0083160400390625, -0.02547445148229599, -0.014065200462937355, 0.01676163822412491, -0.009069099090993404, 0.012607666663825512, 0.003943438641726971, 0.01553083211183548, 0.014421487227082253, 0.033328939229249954, -0.02945837751030922, -0.04401751980185509, 0.011700756847858429, 0.009935521520674229, -0.02519913949072361, -0.006263346411287785, -0.017328457906842232, -0.009846450760960579, -0.06241483613848686, -0.004064899869263172, 0.02294806018471718, -0.010688580572605133, -0.006514366250485182, 0.00011254134733462706, -0.011498321779072285, 0.030397675931453705, -0.04443858563899994, -0.011838412843644619, 0.02024352364242077], "index": 96}, {"title": "Soyuz 1", "text": "Soyuz 1 (Russian: \u0421\u043e\u044e\u0437 1 , Union 1) was a manned spaceflight of the Soviet space program. Launched into orbit on 23 April 1967 carrying cosmonaut Colonel Vladimir Komarov, Soyuz 1 was the first crewed flight of the Soyuz spacecraft. The mission plan was complex, involving a rendezvous with Soyuz 2 and an exchange of crew members before returning to Earth.", "vector": [0.027997292578220367, 0.01810913160443306, 0.0026427116245031357, -0.022966979071497917, -0.04242710769176483, -0.03782796487212181, 0.0009494718397036195, 0.03363124653697014, -0.013517173007130623, -0.013783060945570469, -0.03590207174420357, -0.039006493985652924, -0.021041085943579674, 0.0021702214144170284, 0.028299111872911453, 0.07927775382995605, -0.0028044001664966345, 0.01566583663225174, -0.02280888333916664, -0.04136355593800545, 0.05001569911837578, -0.0103983785957098, 0.023872435092926025, 0.0312166940420866, 0.04403680935502052, -0.04139230027794838, 0.021889053285121918, 0.035557135939598083, -0.029980674386024475, -0.02975071594119072, 0.017289908602833748, -0.03196405619382858, -0.016715016216039658, 0.03196405619382858, 0.06657262146472931, -0.04472668096423149, 0.019014587625861168, -0.006553781218826771, -0.029161451384425163, -0.008314390666782856, -0.008515603840351105, -0.02884525991976261, 0.024116763845086098, -0.009622273035347462, -0.01609700545668602, -0.01399146020412445, -0.015536485239863396, 0.010010325349867344, 0.024418583139777184, 0.0034637306816875935, -0.0097013209015131, 0.02529529482126236, 0.014817869290709496, 0.04443923383951187, 0.021213553845882416, 0.023699967190623283, 0.013409380801022053, 0.04489915072917938, -0.044640447944402695, -0.053148865699768066, -3.208509588148445e-05, -0.0702519342303276, -0.05004444345831871, -0.010944526642560959, 0.020035022869706154, -0.012051195837557316, 0.013179423287510872, -0.009794740937650204, -0.025913305580615997, -0.0026966077275574207, 0.056282032281160355, 0.028586557134985924, 0.025453390553593636, 0.0028151795268058777, 0.017117440700531006, -0.05478730797767639, 0.07939273118972778, 0.022248361259698868, -0.03955264389514923, -0.03857532516121864, 0.03915021941065788, 0.022392084822058678, 0.014437002129852772, 0.03207903355360031, 0.031705353409051895, -0.04685378447175026, -0.008077247999608517, -0.06772240251302719, -0.0008928807801567018, -0.024375466629862785, -0.04027125984430313, 0.05458609759807587, -0.0042003123089671135, 0.01842532306909561, 0.08071498572826385, -0.06047875061631203, 0.044927895069122314, -0.01006062887609005, -0.04314572364091873, -0.0005636647110804915, -0.009765995666384697, -0.024131136015057564, -0.00966538954526186, -0.04510036110877991, 0.03848909214138985, 0.03397618234157562, 0.0395238995552063, 0.044209275394678116, 0.021716585382819176, 0.03713809326291084, -0.052401501685380936, 0.0064603607170283794, -0.0004356611461844295, -0.018008526414632797, 0.007509540766477585, -0.035442158579826355, -0.02575520984828472, -0.0047967638820409775, -0.039753854274749756, -0.014523236081004143, 0.0304980780929327, 0.011311021633446217, -0.011950589716434479, -0.014587911777198315, -0.03147539496421814, 0.022090265527367592, 0.01440825778990984, 0.009873788803815842, -0.006370533723384142, 0.016326963901519775, 0.06697504222393036, -0.01276981271803379, -0.034579817205667496, 0.03064180165529251, 0.019963162019848824, 0.01753423921763897, -0.048233527690172195, 0.031417906284332275, -0.008400624617934227, 0.033257562667131424, -0.023757455870509148, 0.002008532639592886, 0.00964383129030466, 0.08887846767902374, 0.008005386218428612, 0.03647696599364281, -0.006560967303812504, 0.0330563522875309, -0.024317976087331772, -0.03075677901506424, 0.03294137120246887, -0.06910214573144913, 0.019373895600438118, 0.003249942325055599, 0.003564337035641074, 0.011138553731143475, 0.041679747402668, -0.01605388894677162, 0.045905210077762604, 0.024763518944382668, 0.0020516496151685715, -0.029578248038887978, 0.003161911852657795, 0.0035140339750796556, -0.0025151572190225124, -0.040012557059526443, 0.003469120478257537, 0.010685824789106846, -0.013941156677901745, 0.00833594985306263, -0.0007213111384771764, -0.05967390164732933, 0.009011449292302132, -0.029405780136585236, 0.035298433154821396, 0.01031214464455843, 0.022320223972201347, 0.01566583663225174, -0.014975964091718197, 0.01655692048370838, 0.006115424912422895, 0.04556027427315712, 0.0005407587741501629, 0.030871758237481117, 0.009550411254167557, 0.015766441822052002, 0.01605388894677162, 0.01605388894677162, 0.0005057262605987489, 0.047227464616298676, 0.019086450338363647, -0.027221186086535454, 0.030843013897538185, 0.03236648067831993, -0.010858292691409588, 0.02733616530895233, 0.02194654382765293, 0.03138916194438934, 0.002497191773727536, -0.030153142288327217, 0.009543225169181824, -0.03420613706111908, -0.029089588671922684, -0.03411990404129028, -0.02582707069814205, -0.014163928106427193, 0.042513344436883926, 0.01698809117078781, 0.02493598684668541, -0.01796540804207325, 0.04265706613659859, -0.046077679842710495, 0.0603637732565403, 0.016441941261291504, 0.02553962543606758, -0.019517619162797928, -0.029262056574225426, 0.03420613706111908, -0.02302446775138378, 0.04208217188715935, -0.004674599505960941, -0.03363124653697014, 0.06640014797449112, -0.01153379213064909, -0.002213338389992714, 0.015335272997617722, 0.01734739914536476, -0.022320223972201347, 0.0020732081029564142, -0.09296020865440369, -0.08600400388240814, 0.026215124875307083, 0.021889053285121918, 0.0431169793009758, -0.009995953179895878, 0.012834487482905388, 0.027034346014261246, 0.01318661030381918, -0.025625858455896378, -0.030411843210458755, -0.019158311188220978, -0.014171114191412926, -0.028040409088134766, -0.04645135998725891, 0.033861201256513596, 0.04898088797926903, 0.06024879217147827, 0.0023211308289319277, -0.02917582355439663, 0.009248591959476471, 0.03676441311836243, 0.03535592555999756, -0.0287446528673172, 0.026387592777609825, -0.009169544093310833, -0.018410950899124146, -0.0034906789660453796, -0.017979780212044716, -0.04107610881328583, 0.008932401426136494, -0.05073431506752968, 0.05708688125014305, 0.023556243628263474, 0.003916459158062935, -0.015680208802223206, -0.05967390164732933, 0.0004913539160043001, -0.040185026824474335, 0.016010772436857224, -0.01957510970532894, 0.02515157125890255, -0.007660450413823128, -0.0016653933562338352, -0.009974394924938679, 0.0033882760908454657, 0.018669651821255684, 0.010470240376889706, 0.0588403046131134, -0.022507064044475555, -0.041765980422496796, 0.036591943353414536, -0.02040870487689972, 0.05608081817626953, -0.08186477422714233, -0.03963887691497803, -0.01770670711994171, -0.022363340482115746, -0.00038064210093580186, -0.010599590837955475, 0.018525930121541023, -0.043030746281147, 0.008343135938048363, -0.04127732291817665, -0.03205028921365738, -0.009521666914224625, 0.07099929451942444, 0.028428463265299797, 0.02374308370053768, 0.01806601509451866, -0.010175607167184353, -0.011806866154074669, 0.007739497814327478, 0.031532883644104004, 0.026646293699741364, -0.02338377572596073, 0.014199858531355858, 0.036735668778419495, -0.0681823194026947, -0.0033541417215019464, 0.019014587625861168, -0.030239375308156013, -0.002560070715844631, 0.009464177303016186, -0.025568369776010513, 0.04900963604450226, -0.01115292590111494, 0.02242082916200161, 0.027609240263700485, -0.011914659291505814, 0.01465977355837822, -0.014465746469795704, 0.011375696398317814, 0.011691887862980366, -0.05401120334863663, 0.048520974814891815, -0.008163481950759888, -0.014803496189415455, 0.034551072865724564, -0.01064989436417818, 0.0014013018226251006, 0.04725620895624161, -0.025683347135782242, 0.01695934496819973, 0.019460130482912064, 0.0287015363574028, 0.012151801958680153, 0.028974611312150955, -0.022320223972201347, 0.006981357932090759, -0.04495663940906525, 0.05329258739948273, -0.0006521443137899041, 0.006898717023432255, -0.03018188662827015, -0.02137164957821369, 0.06789486855268478, 0.03035435453057289, -0.008918028324842453, -0.00659330515190959, -0.03130292892456055, 0.0004376822616904974, 0.0222339890897274, 0.012194919399917126, -0.02500784955918789, 0.003948797006160021, -0.024519190192222595, -0.014702890068292618, -0.01445856038480997, -0.004128450993448496, -0.025137199088931084, -0.029017727822065353, -0.001185716944746673, 0.02975071594119072, 0.035298433154821396, -0.011936217546463013, -0.05205656588077545, 0.00869525782763958, -0.00833594985306263, 0.01619761250913143, 0.002392992377281189, 0.000190433333045803, 0.022176500409841537, 0.0136537104845047, -0.0031134053133428097, -0.03064180165529251, -0.04573274403810501, -0.01460228394716978, 0.003641588380560279, 0.019488874822854996, 0.017778567969799042, -0.0031026259530335665, -0.024332350119948387, -0.05990385636687279, 0.017289908602833748, -0.0003941161558032036, -0.011612839996814728, 0.02206152118742466, -0.0034978650510311127, 0.019963162019848824, -0.014465746469795704, -0.04357689619064331, -0.008364694193005562, -0.0037547703832387924, 0.028227249160408974, 0.02270827628672123, -0.03265392780303955, 0.011167298071086407, -0.01412081066519022, -0.014142369851469994, 0.06122611090540886, -0.04556027427315712, 0.01655692048370838, 0.01741925999522209, -0.034867264330387115, 0.02313944697380066, -0.0011938014067709446, -0.05452860891819, 0.001882774755358696, -0.0265456885099411, 0.024706030264496803, -0.0037152464501559734, -0.026502570137381554, 0.021615980193018913, -0.019819438457489014, 0.03107297047972679, -0.031561627984046936, 0.010132490657269955, 0.02572646550834179, -0.02946327067911625, -0.029808206483721733, -0.042513344436883926, 0.04443923383951187, 0.01451604999601841, 0.03239522501826286, 0.003999100066721439, -0.02141476608812809, 0.02069615013897419, 0.018985843285918236, -0.025237806141376495, -0.02931954711675644, 0.048233527690172195, -0.04130606725811958, 0.01379743404686451, 0.03518345579504967, -0.022478319704532623, 0.010139676742255688, 0.05645449832081795, 0.0015171787235885859, -0.0017040190286934376, 0.0116775156930089, 0.008874911814928055, 0.05564964935183525, -0.015320900827646255, -0.02338377572596073, -0.05271769315004349, -0.02884525991976261, -0.018367834389209747, 0.007304735016077757, 0.005396808497607708, -0.023656850680708885, -0.0183247160166502, -0.03958138823509216, 0.005540532059967518, 0.04216840863227844, 0.0035607439931482077, 0.0025870187673717737, -0.007459237705916166, -0.006410057656466961, -0.01839657872915268, 0.03207903355360031, 0.02543901838362217, 0.009061751887202263, 0.04282953217625618, -0.010297772474586964, 0.02565460279583931, 0.028874004259705544, 0.006424430292099714, -0.06381312757730484, 0.01445856038480997, -0.011267904192209244, -0.02043744921684265, 0.002463057404384017, -0.007531099021434784, -0.0480610616505146, 0.012741067446768284, 0.01854030229151249, -0.006995730102062225, 0.02288074418902397, -0.011095436289906502, -0.00494767352938652, -0.01064989436417818, 0.014932847581803799, 0.0011282276827841997, 0.001262968173250556, 0.05349380150437355, 0.0020678185392171144, 0.064675472676754, -0.03345877677202225, -0.028658419847488403, -0.00035818532342091203, 0.05013067647814751, 0.001404894981533289, 0.04656633734703064, 0.05481605604290962, -0.00731192110106349, -0.001782168517820537, -0.01796540804207325, 0.013718386180698872, 0.02647382579743862, 0.0011461930116638541, 0.04541655257344246, 0.006309451535344124, -0.017074324190616608, 0.012496737763285637, 0.011993707157671452, 0.021328533068299294, 0.005993260070681572, -0.02206152118742466, 0.035154711455106735, -0.02712058089673519, -0.004017065279185772, 0.014092066325247288, 0.051107995212078094, 0.05358003452420235, -0.009097683243453503, 0.015004709362983704, 0.004293732810765505, -0.029836950823664665, 0.008752747438848019, 0.030986737459897995, -0.001139006926678121, 0.006086680572479963, -0.0022887929808348417, 0.023843690752983093, 0.007617333438247442, -0.00930608157068491, 0.024691658094525337, 0.0033002456184476614, 0.04196719452738762, -0.025956422090530396, -0.009428245946764946, 0.0003878282441291958, -0.02280888333916664, -0.01904333382844925, 0.009974394924938679, 0.013610593043267727, -0.01681562326848507, -0.014480119571089745, -0.011052318848669529, -0.014034576714038849, -0.011196042411029339, 0.021386021748185158, -0.03575835004448891, 0.003298449097201228, -0.005285423249006271, 0.013337519019842148, 0.026286985725164413, -0.03662068769335747, -0.00023085549764800817, -0.011612839996814728, 0.0013599813682958484, 0.03302760794758797, -0.0388052836060524, 0.007753870449960232, 0.03998381271958351, -0.05530471354722977, 0.008450928144156933, 0.027063092216849327, -0.008436555974185467, 0.032711416482925415, 0.0005546819884330034, -0.021041085943579674, 0.018669651821255684, 0.0009041091543622315, 0.044784169644117355, 0.008422183804214, -0.015076571144163609, 0.026128889992833138, -0.02381494641304016, -0.034263625741004944, 0.006496291607618332, -0.04547404125332832, 0.02608577348291874, -0.038747791200876236, 0.018152248114347458, -0.023398147895932198, 0.023153819143772125, -0.0005708508542738855, 0.03777047619223595, -0.008982704021036625, 0.0013734555104747415, 0.011497861705720425, 0.012245221994817257, -0.016844367608428, 0.015823932364583015, 0.033717479556798935, -0.006758586503565311, 0.016154495999217033, 0.0015998196322470903, -0.005572869908064604, 0.0215584896504879, -0.03380371257662773, -0.026028282940387726, 0.008472486399114132, -0.015306527726352215, 0.022392084822058678, 0.02364247851073742, 0.03894900530576706, 0.027149325236678123, -0.018669651821255684, -0.009988767094910145, -0.012942280620336533, -0.026459453627467155, 0.0222339890897274, -0.013502800837159157, 0.026172006502747536, -0.02697685733437538, -0.001409386284649372, -0.003063102252781391, 0.00830001849681139, -0.027134953066706657, -0.0035355924628674984, 0.02252143621444702, -0.0012584768701344728, -0.020178746432065964, -0.006025597918778658, -0.015450251288712025, -0.0019043333595618606, 0.03503973409533501, 0.03268267214298248, 0.011713446117937565, 0.03248145803809166, 0.01348842866718769, 0.014774751849472523, -0.016614409163594246, 0.04639387130737305, -0.018295971676707268, 0.031245438382029533, -0.00020121257693972439, 0.015090943314135075, -0.031130459159612656, 0.012503924779593945, -0.01273388136178255, 0.018554674461483955, -0.0012117668520659208, 0.005860316101461649, 0.0423121303319931, -0.05734558403491974, -0.0006350771873258054, -0.02543901838362217, -0.02608577348291874, -0.011131366714835167, 0.009801927022635937, -0.007782614789903164, -0.012137429788708687, -0.011296648532152176, 0.010628336109220982, 0.035269688814878464, -0.03613203018903732, 0.03210777789354324, -0.0036523675080388784, 0.013589034788310528, 0.03245271369814873, 0.0019905671942979097, -0.0366494320333004, -0.014235789887607098, -0.0008017063373699784, -0.013574662618339062, 0.007595774717628956, -0.007315514143556356, 0.003436782630160451, 0.029434524476528168, 0.010743314400315285, -0.003641588380560279, -0.00046216012560762465, 0.003643384901806712, -0.011792493984103203, 0.00012441044964361936, -0.00039613727130927145, -0.0011946996673941612, 0.031015481799840927, -0.030411843210458755, 0.03633324056863785, 0.03811541199684143, -0.0009683355456218123, 0.020839873701334, -0.04193845018744469, 0.03348752111196518, 0.0022259140387177467, 0.0018558267038315535, 0.020207490772008896, -0.017936663702130318, -0.019129566848278046, 0.021041085943579674, -0.007883220911026001, -0.00297327502630651, 0.03308509662747383, -0.03782796487212181, -0.04860720783472061, 0.0029085995629429817, -0.012051195837557316, -0.00019200530368834734, 0.0008133838418871164, 0.042513344436883926, -0.006582525558769703, 0.011584095656871796, 0.002576239639893174, 0.0027990106027573347, -0.002330113435164094, 0.0018558267038315535, -0.0006781941629014909, -0.0016995276091620326, 0.020250609144568443, -0.007696380838751793, 0.015708953142166138, -0.02316819131374359, -0.008091620169579983, 0.01566583663225174, 0.016930600628256798, 0.018094759434461594, -0.019891301169991493, -0.01609700545668602, -0.05320635437965393, 0.01720367558300495, -0.03187781944870949, -0.030153142288327217, -0.022578924894332886, -0.0013734555104747415, 0.012841673567891121, -0.03483851999044418, -0.00284751714207232, 0.01810913160443306, -0.0012207494582980871, -0.0373680479824543, -0.02946327067911625, -0.006057935766875744, -0.035988304764032364, -0.003492475487291813, -0.03251020237803459, 0.006647201254963875, 0.004031437449157238, -0.010261841118335724, 0.006474733352661133, 0.03210777789354324, 0.014020204544067383, 0.0038410043343901634, -0.021587233990430832, -0.03118794970214367, 0.007854476571083069, 0.024993475526571274, 0.0409611314535141, 0.01602514460682869, -0.03742554038763046, 0.011397255584597588, -0.002238489920273423, -0.010067814961075783, 0.040328748524188995, -0.02503659389913082, -0.0287015363574028, -0.0016088023548945785, 0.004904556553810835, 0.03351626545190811, -0.0005600716103799641, -0.017491120845079422, -0.008709629997611046, -0.01609700545668602, 0.02690499648451805, 0.0062878928147256374, 0.006758586503565311, 0.025841442868113518, 0.05145293101668358, 0.0037403979804366827, -0.02438983879983425, 0.032855138182640076, 0.013071631081402302, -0.0011614636750891805, -0.0001121153763961047, -0.007408934645354748, -0.0056052072905004025, 0.009320453740656376, 0.016140123829245567, 0.01228833943605423, -0.04561776667833328, -0.029693227261304855, -0.017994152382016182, -0.020063769072294235, 0.009564783424139023, -0.0017058155499398708, -0.025266550481319427, -0.012108685448765755, 0.011691887862980366, -0.035269688814878464, -0.029262056574225426, 0.026416337117552757, -0.006769366096705198, -0.00031776315881870687, 0.026603177189826965, -0.011447558179497719, 0.0025079711340367794, 0.014199858531355858, -0.04081740975379944, -0.0013734555104747415, 0.0123745733872056, 0.026071401312947273, -0.011311021633446217, -0.03092924691736698, -0.001334829838015139, 0.003052322892472148, -0.010441495105624199, -0.010326516814529896, 0.036994367837905884, -0.04271455481648445, -0.011253532022237778, -0.022622043266892433, -0.01445856038480997, 0.003909273073077202, -0.0013204575516283512, 0.01463821530342102, -0.026387592777609825, 0.01993441767990589, -0.014990337193012238, -0.009370757266879082, 0.017304280772805214, 0.017361771315336227, -0.027249932289123535, 0.021457884460687637, 0.021529745310544968, -0.018957098945975304, 0.005795640870928764, -0.011770935729146004, 0.03751177340745926, -0.00046754974755458534, 0.010010325349867344, -0.036275751888751984, 0.05631077662110329, -0.02191779762506485, -0.014307651668787003, 0.005515380296856165, 0.015119687654078007, -0.014889730140566826, -0.002003143075853586, 0.01835346221923828, 0.023484382778406143, 2.3495385903515853e-05, 0.02230585180222988, -0.02862967550754547, 0.0731263980269432, 0.0008600939181633294, 0.018310343846678734, 0.04058745130896568, -0.012992583215236664, -0.023455636575818062, -0.033717479556798935, -0.0027181662153452635, -0.021357277408242226, 0.010189979337155819, -0.025022221729159355, 0.008867725729942322, -0.011045132763683796, -0.04716997593641281, -0.03489600867033005, 0.005766896065324545, -0.005281830206513405, 0.01455198135226965, -0.038460347801446915, 0.003212215146049857, -1.771276947692968e-05, 0.00894677359610796, 0.007516726851463318, -0.014731635339558125, 0.05978887900710106, 6.6703596530715e-06, -0.007516726851463318, -0.018195366486907005, -0.005375250242650509, -0.03633324056863785, 0.017146185040473938, -0.026172006502747536, -0.06208845227956772, 0.03411990404129028, -0.010685824789106846, 0.010182793252170086, -0.022004032507538795, 0.004793170839548111, -0.013984274119138718, -0.0008268579258583486, 0.006862786132842302, 0.001845047459937632, -0.031015481799840927, 0.02108420431613922, 0.0022115418687462807, 0.012762626633048058, -0.012856046669185162, 0.017131812870502472, 0.03075677901506424, -0.004897370468825102, 0.023843690752983093, 0.032423969358205795, 0.02582707069814205, -0.04581897705793381, 2.122163823514711e-05, 0.02977946028113365, -0.020308097824454308, -0.01140444166958332, -0.05047561228275299, -0.041047364473342896, 0.01691622845828533, 0.0459914468228817, -0.044065553694963455, -0.005845943931490183, 0.0020750046242028475, -0.00022456760052591562, -0.035729605704545975, -0.0016510210698470473, -0.03383245691657066, -0.034263625741004944, -0.007617333438247442, -0.026861878111958504, 0.013775874860584736, -0.017289908602833748, -0.012906349264085293, 0.02069615013897419, -0.03843160346150398, 0.04849223047494888, -0.031532883644104004, -0.027278676629066467, -0.006327416747808456, 0.013732758350670338, 0.02594204992055893, 0.03216526657342911, 0.01774982362985611, -0.056885670870542526, 0.0009584545623511076, 0.0051345136016607285, 0.01767796277999878, -0.06369815021753311, -0.02349875494837761, -0.013711200095713139, 0.012281153351068497, -0.020379958674311638, -0.007157418876886368, 0.018885238096117973, -0.01412081066519022, -0.035873327404260635, -0.005486635956913233, -0.02781045250594616, 0.0595589205622673, 0.03064180165529251, 0.031101714819669724, -0.03337254375219345, -0.010621149092912674, 0.018008526414632797, 0.010103745386004448, 0.020178746432065964, -0.0069310544058680534, -0.03857532516121864, 0.008795863948762417, 0.023699967190623283, 0.01703120768070221, -0.011857169680297375, -0.01287760492414236, -0.01731865294277668, -0.026631921529769897, -0.04280078783631325, 0.017002463340759277, -0.01312912069261074, -0.004886591341346502, -0.02266515977680683, -0.046365126967430115, 0.001954636536538601, 0.00758140254765749, -0.008565906435251236, -0.033430032432079315, 0.02237771265208721, 0.003564337035641074, -0.019589481875300407, -0.0337749682366848, -0.016326963901519775, -0.01153379213064909, 0.024763518944382668, -0.016226356849074364, -0.0038805282674729824, 0.05573588237166405, -0.07416120916604996, -0.0007612842018716037, -0.01501908153295517, -0.03791419789195061, 0.017548611387610435, -0.01516280509531498, 0.03613203018903732, -0.019876927137374878, -0.05234401300549507, -0.0038014804013073444, -0.06318075209856033, 0.0012827301397919655, 0.009974394924938679, -0.0222339890897274, 0.0009584545623511076, -0.02977946028113365, 0.0013527952833101153, 0.003294855821877718, -0.011167298071086407, 0.04386433959007263, 0.004002693109214306, 0.006453174632042646, 0.016010772436857224, 0.08502668887376785, 0.01806601509451866, 0.01117448415607214, 0.005996853578835726, -0.019057705998420715, -0.026631921529769897, 0.0017372550209984183, -0.0054794494062662125, 0.016571292653679848, 0.03046933375298977, 0.021098576486110687, -0.02129978872835636, -0.03618951886892319, -0.0010473832953721285, 0.007355038076639175, -0.011921845376491547, 0.009888160973787308, -0.06398560106754303, 0.001176734222099185, 0.013833364471793175, -0.018525930121541023, -0.03236648067831993, 0.07663324475288391, 0.04906712472438812, -0.015867048874497414, -0.016829995438456535, -0.022075893357396126, 0.025410274043679237, -0.008652140386402607, 0.023872435092926025, 0.04558902233839035, 0.00459914468228817, -0.005598021205514669, 0.027580495923757553, -0.000665169267449528, -0.024634167551994324, -0.0005623172619380057, -0.017907919362187386, -0.01670064404606819, -0.0015126874204725027, -0.011461930349469185, 0.015478995628654957, -0.006920275278389454, 0.0265456885099411, -0.006129797548055649, -0.01081517618149519, 0.023728711530566216, -0.00582079216837883, 0.02776733599603176, -0.039897579699754715, -0.03575835004448891, 0.006474733352661133, -0.014278906397521496, -0.00022355705732479692, -0.0025439017917960882, 0.003524813102558255, -0.015708953142166138, 0.004132044035941362, 0.004254208877682686, -0.014760379679501057, -0.04576148837804794, 0.006262741517275572, 0.040759917348623276, -0.01228833943605423, -0.03245271369814873, 0.017663588747382164, 0.02436109445989132, 0.01993441767990589, 0.02931954711675644, -0.041449788957834244, 0.004383559804409742, -0.009888160973787308, 0.02781045250594616, 0.005443518981337547, 0.026991229504346848, 0.01020435243844986, 0.02242082916200161, 0.019244546070694923, -0.02464853972196579, 0.0008780593634583056, -0.02773859165608883, -0.00704962620511651, 0.004591958597302437, 0.0028834480326622725, 0.03621826320886612, -0.009342011995613575, 0.0035122374538332224, -0.01856904663145542, 0.012712323106825352, 0.005411181133240461, -0.010283399373292923, 0.036591943353414536, 0.0015513129765167832, -0.020178746432065964, -0.006769366096705198, -0.011562536470592022, 0.014178300276398659, -0.024404210969805717, -0.020724894478917122, -0.008364694193005562, -0.015177177265286446, -0.008953959681093693, -0.030268119648098946, 0.0215584896504879, -0.00817066803574562, 0.006352568510919809, -0.02457667887210846, 0.009945650584995747, 0.018640907481312752, -0.020379958674311638, 0.020638661459088326, -0.029089588671922684, 0.02539590187370777, 0.02633010223507881, 0.006873565260320902, 0.035585880279541016, -0.011814052239060402, 0.028543440625071526, -0.004052996169775724, 0.00297686830163002, -0.00657533947378397, -0.006722656078636646, 0.013330332934856415, 0.029578248038887978, -0.03202154487371445, -0.001377048552967608, 0.0006296875653788447, 0.05151041969656944, -0.0016573088942095637, 0.01892835460603237, 0.015996400266885757, 0.003909273073077202, -0.03239522501826286, 0.019531991332769394, 0.0001857174065662548, -0.04498538374900818, 0.025568369776010513, -0.015867048874497414, 0.03909273073077202, -0.007559843827039003, 0.000790927093476057, -0.0240736473351717, -0.003397258697077632, -0.017117440700531006, 0.025352785363793373, 0.027422400191426277, -0.027508633211255074, 0.056885670870542526, -0.022751392796635628, 0.012108685448765755, -0.034579817205667496, -0.02324005216360092, -0.005296202376484871, -0.031561627984046936, 0.010089373216032982, 0.020423077046871185, -0.002152255969122052, -0.014271720312535763, 0.012604530900716782, 0.01997753418982029, -0.017692334949970245, 0.007283176761120558, -0.03308509662747383, -0.010197165422141552, -0.02338377572596073, 0.00545070506632328, -0.0036218264140188694, -0.03532717749476433, -0.03480977565050125, -0.06013381481170654, -0.030239375308156013, -0.0294201523065567, -0.024777891114354134, 0.05036063492298126, 0.02198966033756733, 0.013725572265684605, -0.020308097824454308, -0.009924091398715973, -0.0437493622303009, 0.03167660906910896, 0.00804850272834301, -0.0279829204082489, -0.033142585307359695, 0.022507064044475555, 0.011706260032951832, 0.008616209961473942, 0.03863281384110451, 0.011857169680297375, 0.023326287046074867, 0.03046933375298977, -0.005928584840148687, -0.01002469751983881, 0.02737928181886673, -0.04570399969816208, 0.0028600930236279964, -0.010599590837955475, -0.018008526414632797, -0.015910165384411812, -0.011972147971391678, -0.02237771265208721, -0.0233550313860178, 0.005914212670177221, -0.01304288674145937, -0.019991906359791756, 0.030124396085739136, 0.0020929700694978237, 0.0329701192677021, -0.0029175824020057917, -0.007811359595507383, -0.015090943314135075, -0.025597114115953445, 0.018669651821255684, -0.02367122285068035, -0.031245438382029533, -0.013452498242259026, -0.013955529779195786, 0.012511110864579678, 0.02417425438761711, 0.019158311188220978, 0.02781045250594616, 0.01248236559331417, 0.015191549435257912, -0.00909049715846777, -0.0002957555407192558, -0.0502169094979763, 0.04487040266394615, -0.03179158642888069, -0.0233119148761034, -0.015680208802223206, -0.019891301169991493, 0.005389622412621975, 0.015795188024640083, 0.02306758426129818, 0.008364694193005562, -0.033430032432079315, 0.01979069411754608, 0.01911519467830658, -0.052430249750614166, 0.007674822583794594, -0.03912147507071495, -0.012115871533751488, -0.021544117480516434, 0.006126204505562782, -0.0031044224742799997, -0.05202782154083252, -0.03092924691736698, -0.00855153426527977, 0.011828425340354443, 0.031532883644104004, 0.0002721759374253452, 0.010836734436452389, -0.014142369851469994, 0.017002463340759277, -0.034004926681518555, 0.01243206299841404, -0.05358003452420235, -0.03288388252258301, -0.005924991797655821, -0.020638661459088326, -0.004308104980736971, -0.02069615013897419, -0.02862967550754547, 0.01997753418982029, -0.0007419713656418025, 0.014537608250975609, -0.0047033438459038734, 0.020926108583807945, -0.03205028921365738, 0.015263411216437817, -0.016657527536153793, -0.0003718839434441179, -0.008041316643357277, 0.009658203460276127, -0.03782796487212181, -0.018152248114347458, 0.055132243782281876, -0.01703120768070221, 0.048635952174663544, 0.02055242657661438, 0.0026552872732281685, -0.009004263207316399, 0.00791915226727724, -0.025553997606039047, 0.009694134816527367, -0.015507740899920464, 0.01835346221923828, 0.007495168596506119, -0.007358631119132042, -0.015220293775200844, 0.02776733599603176, 0.007897594012320042, 0.0008515603840351105, -0.025783954188227654, -0.0013285420136526227, 0.005562090314924717, 0.0182815995067358, -0.0024522782769054174, -0.018295971676707268, 0.001537838950753212, 0.002777452114969492, 0.0330563522875309, -0.01681562326848507, -0.01785043068230152, 0.03825913369655609, -0.058150433003902435, -0.01106669194996357, -0.011957775801420212, -0.004056589212268591, -0.005874688737094402, 0.05386748164892197, -0.002772062551230192, 0.008724002167582512, -0.03374622389674187, -0.006715469527989626, -0.012151801958680153, 0.013617780059576035, -0.02234896831214428, -0.015090943314135075, -0.005041093565523624, -0.015263411216437817, -0.003109812270849943, 0.022435201331973076, -0.006111831869930029, 0.015565229579806328, -0.0143507681787014, 0.0037152464501559734, 0.010470240376889706, -0.0005712999845854938, -0.0040278444066643715, -0.008501231670379639, -0.023369403555989265, -0.015349645167589188, -0.013474056497216225, -0.007423306815326214, -0.02781045250594616, -0.013876481913030148, 0.02119918167591095, -0.0032768906094133854, -0.019819438457489014, -0.04222589731216431, -0.004369187168776989, -0.024734774604439735, 0.009931277483701706, -0.007229280192404985, -0.01251829694956541, -0.00011554003140190616, -0.00024994375417008996, -0.0012530871899798512, -0.013071631081402302, -0.034436095505952835, -0.0005367166013456881, 0.0226364154368639, 0.0011309224646538496, 0.02719244174659252, 0.02438983879983425, -0.02589893341064453, 0.018842119723558426, 0.020825501531362534, 0.0019438571762293577, 0.015680208802223206, 0.023153819143772125, 0.01634133607149124, -0.009794740937650204, 0.026028282940387726, 0.010836734436452389, 0.018942726776003838, -0.00631304457783699, -0.02781045250594616, 0.042484596371650696, -0.012654833495616913, 0.017663588747382164, 0.001915112603455782, -0.021472256630659103, -0.007890406996011734, 0.018727142363786697, -0.005885467864573002, 0.0010375023121014237, 0.02428923174738884, -0.03923645243048668, -0.03216526657342911, 0.006154948845505714, -0.01983381062746048, -0.02903209999203682, 0.018267227336764336, 0.006259148474782705, 0.021026713773608208, -0.0091623580083251, -0.04788859188556671, 0.03541341423988342, 0.009780368767678738, 0.0344073511660099, 0.01426453422755003, -0.020969225093722343, -0.034263625741004944, 0.007373003754764795, -0.043921831995248795, -0.011454744264483452, 0.042197152972221375, 0.0168874841183424, 0.015478995628654957, -0.004818322602659464, -0.00011408034333726391, 0.00880305003374815, -0.0027828416787087917, 0.031015481799840927, 0.01724679209291935, 0.03998381271958351, 0.028141016140580177, 0.025783954188227654, 0.01914393901824951, -0.036735668778419495, 0.0030110024381428957, -0.009629459120333195, -0.005051872693002224, 0.04639387130737305, 0.014544794335961342, -0.007495168596506119, 0.048377253115177155, 0.007365817669779062, 0.0019510433776304126, 0.002834941493347287, 0.02931954711675644, 0.004070961382240057, 0.0280260369181633, 0.017448004335165024, 0.0026534907519817352, 0.01979069411754608, -0.044209275394678116, 0.03294137120246887, 0.0011399051873013377, 0.0265888050198555, -0.03423488140106201, -0.0020372772123664618, -0.021242298185825348, 0.015924537554383278, 0.006154948845505714, -0.015407134778797626, -0.03167660906910896, -0.0008618904976174235, -0.029434524476528168, -0.0036469779442995787, 0.018454067409038544, -0.00944980513304472, -0.019560737535357475, -0.004746460821479559, -0.04489915072917938, 0.006018411833792925, -0.02194654382765293, -0.03794294223189354, 0.016729388386011124, -0.02719244174659252, 9.059899639396463e-06, 0.009528852999210358, 0.01624072901904583, -0.01474600750952959, -0.024547934532165527, -0.03420613706111908, -0.015507740899920464, 0.02148662880063057, 0.0028690756298601627, -0.012194919399917126, 0.00679811043664813, -0.02622949704527855, -0.002145069884136319, -0.032567691057920456, 0.0062878928147256374, -0.023081956431269646, 0.01273388136178255, -0.014322023838758469, 0.009974394924938679, -0.04142104461789131, -0.011612839996814728, 0.014760379679501057, 0.024131136015057564, -0.022507064044475555, 0.012022451497614384, -0.004157195333391428, -0.018640907481312752, 0.0011228380026295781, -0.013466870412230492, -0.029218940064311028, -0.002078597666695714, -0.02898898348212242, -0.03360249847173691, 0.008853353559970856, 0.0029624958988279104, -0.02446169964969158, 0.007473609875887632, -0.016643155366182327, -0.00533572630956769, 0.0013608797453343868, -0.02927643060684204, -0.027364909648895264, 0.0033002456184476614, 3.435884354985319e-05, 0.013768688775599003, 0.008429369889199734, 0.00409611314535141, 0.021860308945178986, -0.0020336841698735952, 0.007588588632643223, -0.03219401091337204, -0.03409115970134735, -0.00780417351052165, -0.006560967303812504, -0.012065568007528782, -0.0029463269747793674, -0.01648505963385105, 0.012848860584199429, -0.016298217698931694, -0.029233312234282494, 0.013624966144561768, 0.031245438382029533, -0.023728711530566216, 0.01645631343126297, -0.034292370080947876, -0.008889283984899521, -0.0032535353675484657, -0.019100822508335114, -0.03409115970134735, 0.02608577348291874, -0.019014587625861168, 0.03288388252258301, -0.005770489107817411, -0.00029081504908390343, 0.0071897562593221664, 0.011167298071086407, 0.013337519019842148, 0.001416572486050427, -0.01354591827839613, -0.0016411400865763426, 0.011483489535748959, -0.023455636575818062, -0.015723325312137604, 0.02737928181886673, 0.013143492862582207, -0.012604530900716782, 0.0233550313860178, 0.024346722289919853, -0.025712093338370323], "index": 97}, {"title": "Bob Wilson (footballer, born 1941)", "text": "Robert \"Bob\" Primrose Wilson OBE (born 30 October 1941 in Chesterfield, England) is a former Scotland international football goalkeeper and later broadcaster and is noted for creating the charity the Willow FoundationAs a player, Wilson is most noted for his career at Arsenal between 1963 and 1974. He made over 300 appearances for Arsenal and two appearances for Scotland.", "vector": [0.02003723941743374, 0.005079223774373531, -0.02599387988448143, 0.01989741250872612, 0.011102280579507351, -0.005596584174782038, -0.007173136342316866, -0.014737788587808609, 0.001047830213792622, 0.08288957178592682, -0.02238633669912815, 0.028832372277975082, -0.011864339001476765, 0.03154502063989639, -0.0036669687833637, 0.04709380492568016, 0.005110684782266617, 0.03769741579890251, -0.03450935706496239, -0.06040535867214203, 0.02656717039644718, -0.022358370944857597, -0.016583507880568504, 0.00018330474267713726, 0.025085002183914185, 0.03017471358180046, 0.020191049203276634, 0.01304587908089161, 0.0006217941408976912, -0.013835903257131577, 0.021295685321092606, 0.020554600283503532, 0.010389162227511406, 0.0019156328635290265, -0.006851533427834511, -0.002890927717089653, -0.01696104183793068, -0.018037710338830948, -0.004261234309524298, 0.022638026624917984, -0.007606600411236286, 0.009207622148096561, 0.031489089131355286, -0.02149144373834133, -0.005628045182675123, 0.009046820923686028, -0.026427343487739563, 0.021169841289520264, -0.025532448664307594, 0.0023403579834848642, 0.04723363369703293, -0.050981003791093826, 0.030118782073259354, 0.08115571737289429, 0.013136766850948334, -0.0319644995033741, -0.01580047607421875, 0.041276995092630386, 0.035711869597435, -0.036830488592386246, 0.029447611421346664, -0.06113245710730553, 0.015646666288375854, -0.011857347562909126, 0.021351614966988564, -0.003427514573559165, 0.03512459620833397, -0.010333231650292873, -0.06762044131755829, 0.0001246428582817316, 0.0046177939511835575, 0.024413831532001495, 0.030146747827529907, 0.0060335444286465645, -0.02020503208041191, 0.036438971757888794, 0.06292224675416946, -0.012738259509205818, 0.02270793914794922, 0.023043524473905563, -0.002567577175796032, -0.007319954689592123, -0.024917209520936012, -0.01086457446217537, -0.04038209840655327, -0.02100204862654209, -0.0036215248983353376, -0.06146804243326187, 0.017072902992367744, 0.027797650545835495, -0.013374472968280315, 0.05204369127750397, 0.01280118152499199, -0.02568626031279564, -0.014947528950870037, -0.01677926629781723, -0.03548814728856087, -0.01981351710855961, 0.015772510319948196, -0.00892796739935875, -0.023518936708569527, -0.003285939572378993, -0.01497549470514059, 0.005044266581535339, -0.015017443336546421, -0.021211788058280945, 0.020806290209293365, -0.011095289140939713, 0.02750401385128498, -0.004761116579174995, 0.03000692091882229, 0.01571657881140709, -0.02835696004331112, 0.032244157046079636, -0.04519215598702431, 0.020624514669179916, 0.00885805394500494, -0.014220427721738815, -0.04041006416082382, 0.00442902697250247, -0.0035603505093604326, -0.02662310190498829, -0.01610809564590454, -0.03506866469979286, 0.01633181795477867, -0.029671335592865944, -0.015828439965844154, 0.006393599323928356, -0.0003165775560773909, 0.002829753328114748, -0.022232526913285255, -0.016933076083660126, -0.05086914077401161, 0.04152868315577507, -0.05047762393951416, 0.0447726733982563, -0.01508735679090023, 0.015688613057136536, 0.049750521779060364, 0.029084060341119766, 0.01620597392320633, 4.1948165744543076e-05, 0.047289565205574036, 0.0902724489569664, 0.011332996189594269, -0.05176403373479843, 0.019114380702376366, 7.805199129506946e-05, 0.0030534768011420965, 0.00983684416860342, -0.017869917675852776, 0.003705421229824424, 0.0026357430033385754, 0.032328050583601, -0.002307149115949869, -0.03993465378880501, -0.024959158152341843, -0.04421336576342583, 0.005841281730681658, 0.016947058960795403, -0.014737788587808609, -0.0016709351912140846, -0.0003089307574555278, 0.019240224733948708, -0.03529239073395729, -0.0009281031670980155, -0.01399670448154211, 0.007236058358103037, 0.04798870161175728, 0.016569525003433228, -0.014402203261852264, -0.0031181469094008207, 0.00455137575045228, 0.012961982749402523, -0.020232997834682465, 0.0017102615674957633, -0.06454424560070038, -0.00599858770146966, 0.010109507478773594, -0.0030150243546813726, -0.01985546387732029, -0.033222947269678116, -0.01594030298292637, -0.022190578281879425, -0.016667403280735016, -0.019463948905467987, 0.028720509260892868, -0.005477731116116047, 0.006519443821161985, -0.03579576686024666, 0.026553187519311905, 0.019394034519791603, 0.008158917538821697, -0.0406058244407177, 0.036914385855197906, 0.01462592650204897, 0.006190849933773279, -0.041864268481731415, 0.007795367389917374, -0.012269837781786919, 0.05380551144480705, 0.04491250216960907, 0.01647164672613144, -0.016975024715065956, 0.003023763420060277, 0.041332926601171494, 0.0138219203799963, 0.013786963187158108, -0.01861100271344185, -0.01726866140961647, 0.0380050353705883, 0.008130952715873718, -0.03165687993168831, 0.05056152120232582, 0.01780000515282154, -0.005739907268434763, -0.014122548513114452, 0.03400597721338272, -0.008319719694554806, 0.020988065749406815, 0.00020668210345320404, 0.014346272684633732, -0.017646195366978645, -0.007487747352570295, -0.01931013911962509, 0.031321294605731964, -0.032300084829330444, 0.0010513258166611195, 0.020540617406368256, 0.0010172430193051696, -0.03512459620833397, 0.030734021216630936, -0.008515477180480957, 0.028832372277975082, 0.0058307950384914875, 0.05053355544805527, 0.03711014240980148, -0.03537628427147865, 0.006330677308142185, -0.012025140225887299, 0.02323928289115429, 0.012332760728895664, -0.033139050006866455, -0.06336969137191772, 0.0372220054268837, 0.02020503208041191, -0.024623572826385498, 0.015786493197083473, -0.05545547232031822, -0.009410372003912926, 0.05070134997367859, 0.0059111956506967545, -0.006956404075026512, -0.013675102032721043, -0.019575810059905052, -0.035851698368787766, -0.005572114605456591, 0.04376591742038727, 0.04301084950566292, 0.01571657881140709, -0.07589821517467499, -0.01395475585013628, 0.01883472502231598, 0.06734078377485275, -0.06443238258361816, -0.017016971483826637, -0.060069773346185684, -0.011207151226699352, 0.023267248645424843, -0.03862027823925018, 0.01682121306657791, 0.003375079482793808, 0.031097572296857834, 0.01714281737804413, -0.030482333153486252, -0.02319733425974846, -0.01406661793589592, 0.015171253122389317, -0.018331347033381462, -0.0003611474821809679, 0.02358885109424591, -0.03210432827472687, 0.02172914892435074, -0.053973305970430374, -0.006596348714083433, -0.022693956270813942, -0.003235252108424902, 0.02768578939139843, 0.0031618429347872734, -0.01931013911962509, -0.037054210901260376, 0.07863882929086685, 0.009927731938660145, 0.03375428915023804, 0.04910731688141823, -0.004914926830679178, 0.006627810187637806, -0.02242828533053398, 0.012283820658922195, 0.03392208367586136, 0.0030167722143232822, 0.014919564127922058, -0.03820079565048218, -0.06281038373708725, -0.04242357611656189, -0.030817918479442596, -0.005844777449965477, -0.002476689638569951, 0.03339073807001114, -0.009270544163882732, -0.07930999994277954, -0.034956805408000946, -0.020023256540298462, -0.0010137473000213504, 0.032383982092142105, 0.030817918479442596, 0.02007918804883957, 0.002868205774575472, -0.03543221578001976, 0.03341870382428169, -0.01388484239578247, 0.025406604632735252, -0.0586715005338192, -0.004079458769410849, 0.03624321520328522, -0.053749579936265945, 0.010633859783411026, -0.0197575856000185, -0.026357430964708328, -0.031125538051128387, -0.01633181795477867, -0.05738509073853493, 0.014052635058760643, 0.023295214399695396, 0.02666505053639412, 0.007134683430194855, -0.031852640211582184, 0.056322403252124786, -0.072262704372406, 0.012989948503673077, 0.030482333153486252, 0.009927731938660145, -0.026553187519311905, -0.018093641847372055, -0.05777660384774208, -0.01757628098130226, 0.07612193375825882, -0.04927511140704155, -0.026818860322237015, -0.04144478589296341, 0.0006436421535909176, 0.03339073807001114, 0.060908734798431396, 0.03702624514698982, -0.018093641847372055, -0.0038242742884904146, 0.016947058960795403, -0.03350260108709335, 0.011053341440856457, -0.056602057069540024, 0.005809820722788572, 0.011053341440856457, -0.00017817046318668872, 0.022540146484971046, -0.012871094979345798, -0.003205538960173726, 0.036215249449014664, -0.03176874294877052, -0.0074318163096904755, -0.030286574736237526, 0.013982721604406834, 0.0027336219791322947, -0.0011640615994110703, 0.029279818758368492, 0.026147689670324326, 0.02136559784412384, -0.03241194784641266, -0.04463284835219383, -0.014821684919297695, -0.005834290757775307, -0.04854800924658775, -0.003546367632225156, -0.03355853259563446, -0.008019090630114079, -0.001001512398943305, -0.042311716824769974, -0.006134918890893459, -0.05100896954536438, 0.03235601633787155, 0.022554129362106323, 0.015926320105791092, 0.045387912541627884, -0.005460252519696951, -0.08233026415109634, -0.010200395248830318, -0.019729619845747948, 0.0017967796884477139, 0.021757114678621292, 0.033055152744054794, -0.010920505039393902, 0.0018701889785006642, 0.007071761414408684, -0.022232526913285255, -0.011416892521083355, 0.013304559513926506, -0.018233468756079674, -0.024246038869023323, -0.017100868746638298, 0.01887667365372181, 0.02358885109424591, 0.005505696404725313, 0.046142980456352234, -0.035991523414850235, -0.06062908098101616, 0.025490501895546913, 0.001368558849208057, 0.0043800873681902885, -0.013765988871455193, 0.020988065749406815, -0.015325062908232212, -0.013430403545498848, -0.012528518214821815, 0.02554643154144287, 0.005019797012209892, 0.014905581250786781, 0.02554643154144287, 0.029475577175617218, 0.06219514459371567, -0.005925178062170744, -0.00938939768821001, -0.04910731688141823, 0.014695839956402779, -0.010277300141751766, 0.018932605162262917, -0.020484687760472298, -0.0481564924120903, -0.08434377610683441, -0.010710764676332474, 0.004114415962249041, 0.005309938453137875, 0.025448553264141083, 0.07405249029397964, -0.0013327281922101974, -0.027224358171224594, -0.028384923934936523, -0.0019663202110677958, 0.00872521847486496, 0.045387912541627884, 0.008774157613515854, 0.03610338643193245, 0.0010618128580972552, -0.0051456415094435215, 0.009445328265428543, 0.01798178069293499, -0.02911202609539032, -0.05212758481502533, 0.06325783580541611, 0.012885077856481075, -0.039095688611269, 0.032300084829330444, -0.05514785274863243, 0.012745250947773457, 0.049163248389959335, 0.007788375951349735, -0.01745043694972992, 0.006617323029786348, 0.0009420858696103096, -0.02177109755575657, -0.0013003931380808353, -0.023449024185538292, -0.020904168486595154, 0.0349847674369812, -0.04505232721567154, 0.00808201264590025, -0.00825679674744606, -0.0195478443056345, 0.005142145790159702, -0.018792778253555298, 0.045331984758377075, -0.030678091570734978, 0.03551611304283142, -0.036522869020700455, -0.042926955968141556, 0.0018911630613729358, 0.0670052021741867, -0.012067088857293129, -0.050142038613557816, -0.029056094586849213, 0.012234881520271301, -0.004893952514976263, 0.02030291222035885, 0.012724276632070541, -0.02862263098359108, 0.030202679336071014, 0.013807937502861023, -0.01085758302360773, -0.009724983014166355, 0.002553594531491399, 0.024861278012394905, 0.023742660880088806, 0.028287045657634735, -0.006938925478607416, 0.013982721604406834, 0.028077304363250732, 0.035460181534290314, -0.0100605683401227, 0.013276593759655952, 0.06868312507867813, 0.009578164666891098, 0.042619336396455765, 0.01606614701449871, -0.0016482132486999035, -0.0083686588332057, -0.015213200822472572, -0.019505895674228668, -0.03912365436553955, -0.02030291222035885, -0.028301028534770012, 0.023071490228176117, 0.006099962163716555, -0.014262376353144646, 0.023602833971381187, -0.001861449796706438, 0.06991361081600189, 0.03263567015528679, 0.015143287368118763, 0.013542265631258488, -0.004771603737026453, -0.09066396951675415, -0.015492855571210384, -0.009424353949725628, 0.028077304363250732, 0.02852475270628929, -0.016709351912140846, -0.024497728794813156, 0.021113909780979156, 0.026245567947626114, 0.028832372277975082, 0.012500553391873837, 0.024469763040542603, 0.050365764647722244, -0.016989005729556084, 0.010410136543214321, -0.044716741889715195, -0.012982957065105438, 0.0020135119557380676, -0.0032789481338113546, -0.004103928804397583, -0.03492883965373039, -0.028860338032245636, -0.03529239073395729, 0.011130246333777905, 0.007103222422301769, 0.017212729901075363, 0.04124902933835983, -0.0002529998600948602, -0.04793277010321617, -0.02199482172727585, -0.014821684919297695, -0.014723805710673332, 0.032244157046079636, 0.0007485125679522753, -0.023337163031101227, 0.00994870625436306, 0.031181469559669495, 0.03733386471867561, -0.01949191465973854, 0.022889714688062668, -0.034481391310691833, 0.00697737792506814, -0.011277064681053162, -0.00934744905680418, 0.029084060341119766, 0.007858289405703545, -0.053078409284353256, -0.0030062850564718246, 0.031181469559669495, 0.012046114541590214, 0.0021603305358439684, -0.020023256540298462, 0.014793719165027142, -0.024413831532001495, 0.0009045072947628796, -0.0267069973051548, -0.00200302479788661, -0.00685502914711833, 0.012724276632070541, 0.011312021873891354, -0.019338103011250496, -0.04169647395610809, -0.01195522677153349, -0.03610338643193245, 0.004684211686253548, 0.011444857344031334, 0.03476104512810707, 0.005037275608628988, 0.01075271237641573, 0.019394034519791603, -0.006858524866402149, 0.006288729142397642, 0.0030779466032981873, -0.010941479355096817, -0.016681386157870293, 0.024917209520936012, 0.0001365500211250037, 0.0015957780415192246, -0.014807702042162418, 0.02964336983859539, -0.019156329333782196, -0.017702125012874603, 0.007264023646712303, 0.016947058960795403, -0.028105270117521286, 0.020484687760472298, 0.025350674986839294, -0.014793719165027142, -0.04144478589296341, 0.027294272556900978, 0.018932605162262917, -0.002623508218675852, -0.022721922025084496, -0.0300908163189888, -0.01132600475102663, 0.016499610617756844, 0.04348626360297203, -0.01557675190269947, 0.015255149453878403, -0.06197142228484154, 0.005100197624415159, 0.009822862222790718, 0.041193097829818726, -0.008445563726127148, -0.020177066326141357, -0.015297097153961658, 0.010584920644760132, -0.0010784174082800746, 0.06079687178134918, -0.026720980182290077, 0.02105797827243805, -0.023518936708569527, 0.019352085888385773, 0.016191991046071053, -0.009731974452733994, -0.0026497256476432085, -0.02185499295592308, 0.007718462496995926, 0.006215319503098726, -0.018009744584560394, 0.0028856841381639242, -0.024134177714586258, -0.10397551953792572, -0.03227212280035019, 0.021337632089853287, -0.007424825336784124, 0.01315074972808361, 0.020624514669179916, 0.028021374717354774, -0.0008616851991973817, -0.017995761707425117, -0.0018894152017310262, -0.022498199716210365, 0.04015837609767914, 0.011060332879424095, 0.02613370679318905, -0.009906758554279804, 0.010473058559000492, -0.02732223831117153, 0.011011392809450626, 0.06560692936182022, 0.03202043101191521, 0.009193639270961285, -0.0017382270889356732, -0.02065248042345047, -0.0045758457854390144, 0.016038181260228157, 0.013528282754123211, -0.029056094586849213, -0.0003574333095457405, 0.05447668209671974, 0.003971092868596315, -0.016261905431747437, -0.02465153858065605, -0.0007174884085543454, -0.031321294605731964, 0.03635507449507713, -0.008270779624581337, -0.015283114276826382, 0.031237399205565453, 0.0032702090684324503, 0.02648327499628067, 0.0016508350381627679, -0.018261434510350227, 0.011235116980969906, -0.04203205928206444, 0.0238964706659317, 0.030286574736237526, -0.01322066318243742, -0.023756643757224083, -0.03464918211102486, 0.010899531655013561, -0.005631540901958942, 0.019785551354289055, -0.0017950318288058043, -0.02007918804883957, -0.00878814049065113, 0.011319013312458992, -0.003046485362574458, -0.012954991310834885, 0.012598431669175625, 0.0031653386540710926, -0.013828911818563938, 0.024287987500429153, -0.05109286308288574, -0.002924136584624648, 0.0319644995033741, -0.01602419838309288, 0.014255384914577007, 0.01333252526819706, 0.006019561551511288, 0.03797707334160805, -0.01266135461628437, 0.006026552990078926, -0.014989477582275867, -0.0009237335179932415, 0.02185499295592308, 0.021799063310027122, 0.010703773237764835, -0.03845248371362686, -0.02919592335820198, -0.003497428260743618, 0.0010521997464820743, 0.025532448664307594, 0.003132129553705454, 0.01905844919383526, 0.0015782996779307723, -0.01066182553768158, -0.02639937773346901, -0.004726159851998091, 0.024945175275206566, 0.0002013293415075168, 0.010640851221978664, 0.024427814409136772, 0.06661368161439896, -0.010137473233044147, -0.03241194784641266, -0.02091815136373043, -0.05542750656604767, -0.022442268207669258, -0.02323928289115429, -0.011242108419537544, 0.039822790771722794, 0.07181525975465775, 0.014150514267385006, 0.0028856841381639242, -0.0225681122392416, 0.026902755722403526, 0.004806560464203358, 0.029000164940953255, -0.017688142135739326, 0.018303383141756058, -0.005149137228727341, 0.009291518479585648, -0.0008752309950068593, -0.020890185609459877, 0.026651067659258842, 0.013367481529712677, -0.003929144702851772, -0.0022494702134281397, 0.012353734113276005, 0.03092977963387966, 0.042087990790605545, -0.010976436547935009, -0.021603304892778397, -0.013437394984066486, 0.028692545369267464, 0.01793983206152916, 0.024008333683013916, -0.030901813879609108, -0.018499139696359634, -0.02154737338423729, -0.06297817826271057, -0.03252381086349487, -0.03811689838767052, -0.027881545946002007, -0.01700298860669136, 0.01268931943923235, -0.009235587902367115, 0.007536686956882477, -0.04099734127521515, -0.03397801145911217, -0.013255620375275612, 0.03115350380539894, 0.01659749075770378, -0.0002228496305178851, 0.006841046269983053, -0.00850149430334568, 0.02474941685795784, 0.007606600411236286, -0.0007135557825677097, -0.006099962163716555, -0.011179185472428799, -0.0056909676641225815, -0.029531508684158325, -0.011367952451109886, -0.035096630454063416, -0.04161258041858673, -0.034201737493276596, -0.003946623299270868, 0.002829753328114748, -0.011123254895210266, 0.013115792535245419, 0.011668581515550613, 0.017478402704000473, -0.02096009999513626, -0.015227183699607849, 0.015059391036629677, -0.006257267668843269, 0.019743602722883224, 0.0231414046138525, -0.032915327697992325, 0.030202679336071014, -0.0068864901550114155, -0.0259519312530756, 0.030566228553652763, -0.007257032673805952, 0.02639937773346901, 0.009864809922873974, 0.011409901082515717, 0.0133534986525774, -0.02862263098359108, 0.00890000257641077, 0.021085944026708603, -0.0439896434545517, -0.0173106100410223, -0.013975730165839195, 0.060069773346185684, 0.010473058559000492, -0.03587966412305832, 0.012276829220354557, 0.009997646324336529, 0.039822790771722794, 0.004991831723600626, -0.01310880109667778, -0.025979897007346153, 0.04192019999027252, -0.0038941879756748676, 0.025182882323861122, -0.052239447832107544, -0.04384981468319893, -0.03560001030564308, -0.037725381553173065, 0.012011157348752022, -0.04494046792387962, -0.00666626263409853, -0.013989713042974472, -0.007963160052895546, -0.0028647100552916527, 0.007047291845083237, -0.01985546387732029, 0.021533390507102013, 0.025071019306778908, -0.02733622118830681, -0.017520349472761154, -0.04116513207554817, 0.002284427173435688, -0.008249805308878422, 0.03680252283811569, -0.02693072147667408, 0.00044132964103482664, -0.0511767603456974, -0.0026637085247784853, 0.02407824620604515, 0.0013711806386709213, -0.018806761130690575, -0.05635036900639534, 0.02114187553524971, -0.05288265272974968, -0.04256340488791466, 0.013059861958026886, 0.04625484347343445, 0.002567577175796032, -0.006068501155823469, -0.004047997761517763, -0.007305971812456846, -0.01284313015639782, -0.014458133839070797, -0.02585405297577381, -0.003764847759157419, 0.006536922417581081, 0.008466538041830063, 0.018219485878944397, 0.03582373261451721, -0.02888830192387104, -0.0041773379780352116, -0.02061053179204464, -0.011444857344031334, -0.026147689670324326, -0.02925185300409794, -0.02817518450319767, -0.01708688586950302, 0.013157741166651249, 0.025085002183914185, 0.024329936131834984, -0.03940330818295479, 0.024539675563573837, 0.02416214346885681, 0.017058920115232468, 0.017883900552988052, -0.013241637498140335, -0.04782090708613396, 0.011717520654201508, 0.024329936131834984, -0.0004754125257022679, 0.07092036306858063, 0.02590998262166977, 0.035991523414850235, -0.023798592388629913, 0.0009831601055338979, 0.004121406935155392, -0.021169841289520264, 0.005089710466563702, 0.03635507449507713, -0.03864824399352074, 0.015926320105791092, -0.030789952725172043, -0.02799340896308422, -0.006005578674376011, -0.016905110329389572, 0.0346212200820446, 0.02456764131784439, 0.03850841522216797, 0.011654598638415337, 0.020051222294569016, 0.006089475005865097, 0.03560001030564308, 0.004289199598133564, 0.04250747337937355, 0.009892775677144527, -0.03271956741809845, -0.039011791348457336, 0.0074667735025286674, 0.025476519018411636, -0.007683505304157734, -0.012325769290328026, 0.0068060895428061485, -0.006071996875107288, 0.004268225748091936, -0.01508735679090023, -0.012675337493419647, -0.005656010936945677, 0.05710543319582939, 0.008508485741913319, 0.014765754342079163, -0.01745043694972992, -0.029139991849660873, 0.047513287514448166, 0.0026304994244128466, 0.026902755722403526, -0.015632683411240578, -0.030062850564718246, -0.040298204869031906, -0.01816355437040329, -0.06868312507867813, 0.005778359714895487, 0.005558131728321314, -0.004166850820183754, 0.03529239073395729, -0.03506866469979286, 0.0013169975718483329, 0.0032037911005318165, 0.03744572773575783, 7.280847057700157e-05, -0.008005107752978802, -0.00257631647400558, -0.00018177538004238158, 0.001744344481267035, -0.008851062506437302, 0.009396389126777649, 0.010179420933127403, 0.008089004084467888, -0.05702153965830803, 0.016219956800341606, -0.0150454081594944, -0.013346507214009762, 0.021757114678621292, 0.00819387473165989, -0.021211788058280945, 0.04552774131298065, 0.0034956804011017084, -0.029699301347136497, -0.0707525685429573, 0.02430197037756443, 0.00400604959577322, -0.01068279892206192, 0.016317835077643394, 0.009913749992847443, -0.0007402102928608656, -0.019925378262996674, 0.006267754826694727, -0.01824745163321495, -0.014500082470476627, -0.009424353949725628, -0.008473529480397701, -0.04317864403128624, -0.01659749075770378, 0.005502200685441494, -0.030873849987983704, 0.0027248829137533903, 0.013800946064293385, -0.016038181260228157, -0.006411077920347452, 0.02658115327358246, -0.01121414266526699, 0.0008761048666201532, 0.013556248508393764, 0.0006244159303605556, -0.0074667735025286674, -0.01026331726461649, 0.020512651652097702, 0.043821848928928375, -0.01887667365372181, 0.005565123166888952, -0.015646666288375854, 0.002307149115949869, -0.02052663452923298, 0.01036818791180849, 0.0020012769382447004, -0.011556719429790974, 0.04463284835219383, 0.017841951921582222, 0.006582366302609444, -0.0010539476061239839, 0.03632710874080658, 0.0019191285828128457, -0.03940330818295479, 0.007417833898216486, -0.017296627163887024, 0.04603111743927002, -0.02919592335820198, 0.019128363579511642, 0.009934723377227783, -0.02363079972565174, -0.03459325432777405, -0.0034816977567970753, -0.04723363369703293, 0.013619170524179935, -0.029895057901740074, 0.013633153401315212, 0.01696104183793068, -0.02711249701678753, -0.020442739129066467, 0.026413360610604286, 0.012682328000664711, 0.020414773374795914, -0.017198747023940086, 0.0012724276166409254, -0.005075728055089712, 0.004317165352404118, 0.04670228809118271, 0.0077743930742144585, 0.00045924499863758683, -0.02212066575884819, -0.011298038996756077, -0.0008629960939288139, 0.04001854732632637, -0.008592382073402405, 0.023001577705144882, -0.014989477582275867, -0.002887431997805834, -0.012500553391873837, 0.007438807748258114, 0.035683903843164444, 0.0034380017314106226, -0.017953814938664436, 0.02804933860898018, 0.009927731938660145, 0.014038652181625366, -0.0071661449037492275, 0.005180598236620426, -0.002557090250775218, 0.029671335592865944, 0.006889985874295235, 0.005995091982185841, -0.017953814938664436, -0.04206002503633499, -0.03490087389945984, -0.0018090145895257592, 0.02003723941743374, 0.007138179149478674, 0.029056094586849213, -0.005033779889345169, -0.004268225748091936, 0.028035355731844902, -0.03400597721338272, 0.031405191868543625, 0.011228125542402267, -0.010088533163070679, 0.05979011580348015, -0.017282644286751747, 0.03627118095755577, -0.018862690776586533, -0.014793719165027142, -0.01217195950448513, -0.021533390507102013, 0.024847296997904778, -0.0022704442963004112, -0.002211017766967416, 0.02381257526576519, -0.05327416956424713, -0.020946117118000984, -0.01753433234989643, -0.012556483969092369, 0.014919564127922058, 0.011906287632882595, 0.045248087495565414, -0.020932134240865707, 0.008578399196267128, -0.02862263098359108, 0.0005623675533570349, -0.006274746265262365, -0.03375428915023804, -0.010277300141751766, 0.023337163031101227, 0.01820550300180912, 0.012402674183249474, 0.009018855169415474, -0.0011623137397691607, 0.017660176381468773, -0.023938419297337532, 0.02760189212858677, -0.03249584510922432, -0.01904446631669998, -0.01896057091653347, 0.005442774388939142, -0.025001106783747673, -0.024022314697504044, 0.00042341428343206644, 0.0034642191603779793, -0.03814486414194107, 0.005376356188207865, 0.0042577385902404785, -0.008795131929218769, -0.0015529560623690486, 0.024385865777730942, -0.005124667659401894, -0.019729619845747948, -0.013073844835162163, 0.02065248042345047, -0.03862027823925018, 0.01865295134484768, -0.01602419838309288, -0.014150514267385006, 0.018219485878944397, -0.0012872843071818352, 0.034425459802150726, 0.010039594024419785, 0.019925378262996674, -0.012025140225887299, -0.02509898506104946, 0.008767166174948215, 0.010361196473240852, -0.003799804486334324, -0.00917266495525837, -0.02448374591767788, -0.01793983206152916, 0.002646230161190033, 0.0030202679336071014, 0.015646666288375854, 0.00393963186070323, 0.029839128255844116, 0.011158212088048458, 0.008424589410424232, -0.02821713127195835, -0.02291768044233322, -0.021841010078787804, 0.047737009823322296, -0.023966385051608086, 0.013647136278450489, -0.020484687760472298, -0.02911202609539032, 0.0075716436840593815, -0.005229537840932608, 0.0057154372334480286, -0.012738259509205818, -0.003694934071972966, -0.003918657545000315, -0.0072290669195353985, -0.005460252519696951, -0.005659506656229496, -0.002053712261840701, -0.0024277500342577696, 0.020065205171704292, -0.0034537322353571653, -0.011857347562909126, -0.017827969044446945, -0.006306207273155451, -0.04496843367815018, 7.242612628033385e-05, 0.0012112532276660204, 0.06269852072000504, -0.009249569848179817, -0.003652985906228423, -0.0018457192927598953, -0.0028647100552916527, -0.0016237435629591346, -0.04348626360297203, -0.025826087221503258, -0.03179670870304108, -0.030146747827529907, 0.02465153858065605, -0.024637555703520775, -0.014073609374463558, 0.0001496588229201734, -0.0033296355977654457, 0.03778131306171417, -0.034117840230464935, 0.022498199716210365, -0.00012256728950887918, 0.009221605025231838, 0.022498199716210365, -0.013528282754123211, -0.015380993485450745, -0.00934744905680418, 0.002966084750369191, -0.0018369799945503473, -0.01402466930449009, -0.00981587078422308, -0.005663002375513315, -0.013073844835162163, 0.037194039672613144, -0.020191049203276634, -0.03587966412305832, 0.03979482501745224, -0.008040064945816994, -0.004911431111395359, -0.03459325432777405, -0.017030954360961914, -0.022064734250307083, -0.014003695920109749, 0.00400604959577322, 0.005767872557044029, -0.003530637128278613, -0.0026532213669270277, -0.04228375107049942, -0.04695397987961769, 0.018457192927598953, 0.03551611304283142, -0.01732459105551243, -0.0038557355292141438, -0.02813323587179184, 0.003943127579987049, 0.012150985188782215, -0.005711941514164209, -0.007347919978201389, -0.028692545369267464, 0.001232227310538292, 0.006477495655417442, 0.035320352762937546, 0.00336634018458426, 0.007844306528568268, 0.022889714688062668, -0.002158582676202059, 0.007403851021081209, 0.024385865777730942, 0.014472116716206074, -0.01838727854192257, -0.01248657051473856, -0.035236459225416183, -0.011647607199847698, 0.00040440651355311275, -0.014003695920109749, 0.0436260923743248, 0.00903283804655075, 0.03520849347114563, -0.029223887249827385, -0.009193639270961285, -0.019128363579511642, -0.00040528044337406754, -0.018988536670804024, 0.03134926036000252, 0.009669051505625248, 0.008962924592196941, 0.002689925953745842, 0.008487512357532978, 0.021910924464464188, 0.004229773301631212, 0.0055511402897536755, -0.025140933692455292, -0.01448609959334135, -0.0014105070149526, -0.0040375106036663055, 0.0087461918592453, -0.01061987690627575, -0.028776440769433975, -0.02515491656959057, 0.002191791543737054, -0.008340693078935146, -0.00028271315386518836, -0.01455601304769516, -0.013255620375275612, 0.010053576901555061, 0.025630328804254532, 0.0011448353761807084, -0.005400826223194599, -0.004467479418963194, -0.048631906509399414, 0.009361431933939457, -0.014891598373651505, -0.01740848831832409, 0.007536686956882477, -0.03266363590955734, -0.01682121306657791, -0.018009744584560394, 0.00861335638910532, 0.051484379917383194, 0.031852640211582184, -0.004411548841744661, -0.02585405297577381, -0.007564652245491743, 0.00941736251115799, 0.002751100342720747, -0.0042157904244959354, 0.024315953254699707, -0.007050787098705769, -0.006659271195530891, 0.02105797827243805, -0.005809820722788572, 0.006970386486500502, -0.05537157878279686, -0.017380522564053535, -0.0402422733604908, -0.0010915262391790748, -0.039682962000370026, -0.010515006259083748, 0.024623572826385498, -0.019156329333782196, 0.012472587637603283, -0.013877850957214832, 0.012745250947773457, -0.030118782073259354, -0.02319733425974846, -0.005540653597563505, -6.909430521773174e-05, 0.007312963251024485, 0.013542265631258488, 0.016191991046071053, -0.011144229210913181, -0.07019326090812683, -0.027406133711338043, -0.05956639349460602, 0.017156798392534256, -0.003569089574739337, -0.004068972077220678, -0.041948165744543076, 0.00757863512262702, 0.022624043747782707, 0.024581624194979668, 0.019967326894402504, -0.010403145104646683, -0.017562298104166985, -0.00865530502051115, -0.007257032673805952, 0.01873684674501419, -0.007250041235238314, -0.015786493197083473, 0.0150454081594944, -0.007928202860057354, 0.0033174005802720785, -0.027545960620045662, 0.03325091302394867, 0.01333252526819706, 0.013786963187158108, 0.023309197276830673, 0.0413888543844223, 0.010696781799197197, -0.015478872694075108, -0.011179185472428799, 0.02247023396193981, -0.0016482132486999035, 0.008550434373319149, 0.016303854063153267, 0.002506402786821127, 0.016261905431747437, -0.023155387490987778, -0.025308726355433464, -0.02862263098359108, 0.00023879866057541221, -0.002473193919286132, 0.004946387838572264, 0.017254678532481194, -0.026804877445101738, 0.0036914385855197906, 0.006117440760135651, 0.008893011137843132, -0.01567463018000126, 0.004027023911476135, -0.007865280844271183, -0.02790951170027256, -0.016583507880568504, -0.03199246525764465, -0.0293357502669096, -0.01700298860669136, 0.01838727854192257, 0.019519878551363945, 0.026511240750551224, 0.012989948503673077, 0.004096937365829945, 0.01359819620847702, 0.021868975833058357, 0.012668346054852009, -0.026818860322237015, 0.01511532161384821, -0.010046585462987423, 0.0036634730640798807, 0.031125538051128387, -0.03898382931947708, -0.0024889244232326746, 0.005547644570469856, -0.032747533172369, 0.046618394553661346, -0.012675337493419647, 0.009396389126777649, 0.004845012910664082, 0.020596548914909363, 0.03350260108709335, 0.018443210050463676, -0.04379388317465782, 0.004998823162168264, 0.008851062506437302, -0.00037338235415518284, -0.0003838693955913186, -0.003013276495039463, -0.03154502063989639, 0.016863161697983742, 0.02590998262166977, -0.0011902791447937489, -0.004236764740198851, 0.04320660978555679, 0.030789952725172043, -0.01526913233101368, -0.006473999936133623, 0.0083686588332057, 0.05042169243097305, 0.032467879354953766, -0.02030291222035885, -0.010703773237764835, 0.008634330704808235, 0.007291989400982857, 0.025029070675373077, -0.00019630430324468762, 0.02684682607650757, -0.02825907990336418, -0.010773686692118645, 0.012430639006197453, 0.0035236459225416183, -0.012290812097489834, 0.010689790360629559, 0.007047291845083237, 0.0006357768434099853, -0.0083686588332057, 0.011724512092769146, -0.009676042944192886, 0.0036599773447960615, -0.012745250947773457, -0.010088533163070679, -0.0050477623008191586, 0.02385452203452587, -0.008809114806354046, 0.028245097026228905, 0.03070605732500553, 0.021924907341599464, -0.03417377173900604, -0.005037275608628988, 0.042675264179706573, -0.020372824743390083, 0.0014061374822631478, 0.014611943624913692, -0.043598126620054245, 0.018051693215966225, -0.012773215770721436, 0.04829632118344307, 0.007739436347037554, -0.019422000274062157, 0.006687236484140158, -0.019771568477153778, 0.008459546603262424, 0.0016726830508559942, 0.03204839676618576, 0.03934737667441368, 0.021617287769913673, 0.029895057901740074, -0.021757114678621292, 0.02118382230401039, 0.014262376353144646, -0.03898382931947708, 0.019282173365354538, 0.012710293754935265, 0.008948941715061665, 0.007417833898216486, 0.03355853259563446, 0.0002971328212879598, -0.008627339266240597, 0.03154502063989639, -0.025840070098638535, 0.04281509295105934, 0.01424140203744173, -0.07310166954994202, 0.007257032673805952, -0.03115350380539894, -0.028119252994656563, 0.03308311849832535, 0.023826558142900467, -0.019883429631590843, -0.032915327697992325, -0.03711014240980148, -0.038927897810935974, -0.021127892658114433, -0.0029416149482131004, -0.008179891854524612, 0.010403145104646683, 0.008529460057616234, 0.0063411640003323555, 0.020988065749406815, -0.015353028662502766, -0.018135590478777885, 0.008844071067869663, 0.00981587078422308, 0.0029276323039084673, -0.0011981443967670202, 0.019156329333782196, -0.02140754647552967, -0.01268931943923235, 0.02332318015396595, 0.010494032874703407, -0.020708410069346428, -0.03601948916912079], "index": 98}, {"title": "University of Monastir", "text": "The University of Monastir (Arabic: \u062c\u0627\u0645\u0639\u0629 \u0627\u0644\u0645\u0646\u0633\u062a\u064a\u0631\u200e) is a university located in Monastir, Tunisia. It was founded in 2004 and is organized in 6 Faculties.", "vector": [0.01370352040976286, 0.08861248940229416, -0.023745546117424965, 0.009841619059443474, 0.026930395513772964, 0.02426552213728428, -0.06265704333782196, 0.0036425364669412374, 0.0031144365202635527, -0.0054516177624464035, -0.0017657499993219972, -0.012641903944313526, -0.01959657482802868, -0.009787455201148987, -0.0074475654400885105, 0.027970347553491592, -0.02119983360171318, 0.06798679381608963, -0.0010318263666704297, 0.03739490360021591, -0.021925631910562515, 0.019899895414710045, -0.011970268562436104, -0.028338663280010223, 0.03119852766394615, 0.024698834866285324, 0.01349769625812769, -0.03732990473508835, -0.008005456067621708, 0.028706979006528854, -0.01930408924818039, 0.011536955833435059, -0.01502512488514185, -0.023377230390906334, -0.0027258088812232018, 0.029291952028870583, -0.02024654485285282, -0.005524739157408476, -0.03654994070529938, -0.0066621857695281506, 0.04766441881656647, -0.02404886484146118, 0.05706730857491493, 0.017884990200400352, 0.005484116263687611, -0.04757775738835335, -0.019618241116404533, -0.06902674585580826, -0.04892102628946304, -0.014104334637522697, 0.03966979682445526, 0.044631227850914, 0.0036723266821354628, -0.03041856549680233, -0.04666779935359955, -0.001960740890353918, -0.013411033898591995, 0.05256085470318794, 0.011753612197935581, -0.017061695456504822, 0.027082055807113647, 0.0633070170879364, -0.0013879553880542517, -0.023918870836496353, 0.04757775738835335, 0.0024861327838152647, 0.02112400345504284, 0.0043439618311822414, 0.04983098432421684, -0.011211970821022987, 0.04541119188070297, 0.02608543634414673, -0.044457901269197464, -0.015588431619107723, -0.04402459040284157, -0.020842351019382477, -0.056114017963409424, -0.04088307172060013, -0.004693320486694574, -0.020029887557029724, -0.01140696182847023, -0.05004763975739479, 0.019271591678261757, -0.07747634500265121, -0.021513985469937325, 0.02851198799908161, 0.03509834408760071, -0.007983789779245853, -0.0047447760589420795, 0.046234484761953354, 0.010572834871709347, 0.004828730598092079, -0.02235894463956356, 0.0037941960617899895, -0.01250107679516077, -0.010188269428908825, -0.0380232073366642, 0.013291873037815094, -0.022532271221280098, -0.014981793239712715, -0.004907268565148115, 0.0008436060161329806, 0.04393792897462845, -0.016270898282527924, 0.02472050115466118, 0.011190305463969707, 0.040731411427259445, -0.010881570167839527, 0.03615996241569519, 0.02413552813231945, 0.02599877305328846, 0.04274631664156914, 0.002840907545760274, 0.038413189351558685, -0.02115650102496147, 0.02649708278477192, -0.04203135147690773, 0.03009358048439026, -0.05312415957450867, 0.020820684731006622, -0.04740443080663681, 9.732614125823602e-05, -0.003978353925049305, -0.009435388259589672, -0.024980487301945686, 0.04658113420009613, -0.02376721240580082, 0.02810034155845642, -0.006770513951778412, 0.013335204683244228, 0.04580117389559746, 0.028533654287457466, -0.04322296008467674, -0.011916104704141617, -0.004105639643967152, 0.01805831491947174, 0.024828828871250153, 0.04003811255097389, -0.0004962786915712059, 0.023983867838978767, -0.0036777432542294264, 0.040319763123989105, -0.02326890267431736, 0.004831438884139061, -0.002784035401418805, -0.04714444279670715, -0.01113614160567522, 0.02955194003880024, 0.04541119188070297, -0.012717733159661293, 0.03633328527212143, 0.03743823245167732, -0.009164568036794662, 0.006651353091001511, 0.0005944511503912508, 0.028533654287457466, -0.0021015675738453865, 0.04315796494483948, 0.02699539251625538, -0.015263446606695652, 0.00529183354228735, 0.017884990200400352, -0.005611401982605457, -0.033126771450042725, 0.011688615195453167, -0.027537034824490547, -0.02454717457294464, -0.04567117989063263, 0.042507994920015335, 0.00153419841080904, -0.010399509221315384, -0.014808468520641327, 0.0027813271153718233, -0.022618932649493217, -0.030938539654016495, -0.008650008589029312, -0.017874157056212425, 0.004335836973041296, -0.015252613462507725, -0.0016804415499791503, -0.03451337292790413, 0.0003165215312037617, 0.023333899676799774, -0.048747699707746506, 0.01539344061166048, 0.00503184599801898, 0.008476683869957924, -0.04161970317363739, -0.03241180256009102, -0.005012888461351395, -0.015653427690267563, 0.014667641371488571, 0.037178244441747665, 0.01113614160567522, 0.00441166665405035, 0.011851107701659203, 0.00958704762160778, 0.08986909687519073, -0.006413030903786421, -0.004503746051341295, 0.02732037752866745, -0.03286678344011307, 0.03379840403795242, -0.011114475317299366, 0.038456518203020096, 0.046971116214990616, 0.007555893622338772, -0.01801498420536518, -0.03245513513684273, 0.00611512828618288, 0.002352076582610607, -0.028013678267598152, -0.0033690077252686024, 0.013172712177038193, 0.018404964357614517, 0.026670409366488457, -0.019000770524144173, -0.05134757608175278, -0.024850495159626007, -0.022120622918009758, -0.06391365081071854, -0.08094284683465958, -0.007626306731253862, -0.00787546206265688, -0.009175400249660015, -0.007539644371718168, 0.010480755940079689, -0.045064542442560196, 0.0043520862236619, 0.062137067317962646, -0.07808298617601395, -0.015447604469954967, 0.008996658958494663, 0.003970229532569647, -0.04140304774045944, 0.033711742609739304, 0.023247236385941505, -0.0042654238641262054, -0.027255380526185036, 0.03405839204788208, -0.016130072996020317, 0.045194536447525024, -0.0025321722496300936, 0.0646502822637558, 0.017495008185505867, -0.0017386679537594318, 0.025738785043358803, -0.013584359548985958, 0.01518761646002531, -0.006212623789906502, -0.010724494233727455, -0.011255302466452122, 0.0013920177007094026, -0.0040731411427259445, -0.036723267287015915, -0.010637831874191761, 0.03278012201189995, -0.0332350991666317, -0.034860022366046906, -0.05078427121043205, -0.04211801290512085, -0.023117242380976677, 0.021383991464972496, -0.018534958362579346, 0.015945915132761, -0.03158850967884064, -0.02950860746204853, 0.005562654230743647, -0.03167517110705376, -0.010995314456522465, 0.009402889758348465, -0.046971116214990616, 0.0687667578458786, -0.015761757269501686, 0.05364413559436798, -0.00878000259399414, 0.001538260723464191, 0.04441457241773605, 0.02545713260769844, -0.06309035420417786, -0.014364322647452354, 0.014418486505746841, -0.05667732656002045, -0.06495360285043716, -0.0016763792373239994, 0.006033882033079863, 0.004717694129794836, 0.02294391766190529, -0.010280348360538483, -0.041814692318439484, 0.04675446078181267, -0.04740443080663681, -0.006050131283700466, 0.07041334360837936, -0.012576906941831112, -0.009554549120366573, -0.0057901437394320965, 0.03962646424770355, 0.007068416569381952, 0.012121927924454212, 0.007268823683261871, 0.024698834866285324, -0.03369007632136345, -0.030266905203461647, 0.006694684270769358, -0.0291402917355299, -0.004124597180634737, -0.0006259339861571789, -0.00029773334972560406, -0.032758455723524094, 0.0015991954132914543, -0.02732037752866745, -0.043461281806230545, 0.004335836973041296, 0.01987822912633419, 0.012371082790195942, 0.001933658728376031, -0.03382007032632828, -0.007431316189467907, 0.0026581038255244493, -0.016552552580833435, -0.02823033556342125, -0.0003014571266248822, -0.03206515312194824, 0.01864328794181347, -0.019856562837958336, 0.004579575732350349, 0.00797837320715189, -0.0007698074332438409, -0.03704825043678284, -0.009809120558202267, -0.024287188425660133, -0.02210978977382183, -0.01689920201897621, 0.03345175459980965, 0.0010975003242492676, 0.04653780534863472, -0.027623696252703667, -0.008964160457253456, -0.016801707446575165, 0.0009038636344484985, 0.04588783532381058, 0.01140696182847023, 0.03934480994939804, 0.007880878634750843, 0.03083021193742752, -0.027212049812078476, 0.026475418359041214, 0.012620237655937672, -0.038001541048288345, 0.00014835888578090817, -0.025283807888627052, -0.013129380531609058, -0.007274240255355835, 0.03466503322124481, -0.05633067712187767, 0.004089390393346548, -0.0633070170879364, 0.029768595471978188, 0.008281692862510681, -0.014440151862800121, 0.055940695106983185, 0.02736370824277401, 0.0014624310424551368, -0.03310510516166687, 0.008579595014452934, 0.015848418697714806, 0.004644572734832764, 0.002119170967489481, -0.015685927122831345, 0.00946788676083088, 0.0013425928773358464, 0.03611662983894348, 0.04493454843759537, 0.03423171862959862, -0.033625081181526184, -0.007664221804589033, 0.033993396908044815, 0.0018280387157574296, -0.038911499083042145, 0.010296597145497799, -0.05520406365394592, 0.005876806098967791, 0.004582284018397331, 0.009711625054478645, -0.016130072996020317, 0.05386079102754593, -0.04406792297959328, -0.012815228663384914, -0.04584450274705887, -0.02827366627752781, -0.029248619452118874, -0.018664952367544174, 0.02294391766190529, 0.03518500551581383, -0.030656887218356133, -0.047101110219955444, -0.053167492151260376, -0.03037523292005062, -0.01107656117528677, -0.018004151061177254, -0.01801498420536518, -0.048661038279533386, 0.013811848126351833, -0.03091687522828579, 0.027948681265115738, -0.002346660243347287, -0.003377132350578904, -0.02285725437104702, -0.02690873108804226, -0.009987861849367619, -0.017245853319764137, 0.009939114563167095, 0.06313368678092957, 0.012631070800125599, 0.03624662384390831, 0.01101698074489832, -0.01757083833217621, -0.02446051314473152, 0.030201908200979233, 0.04853104427456856, 0.024352185428142548, -0.008438768796622753, 0.045194536447525024, 0.012533575296401978, 0.051564235240221024, -0.05728396400809288, -0.03360341489315033, -0.05923387408256531, 0.02872864529490471, 0.005121216643601656, 0.00192418007645756, -0.020192380994558334, 0.0182208064943552, 0.052517522126436234, 0.010838238522410393, -0.010572834871709347, 0.03550999239087105, 0.047014448791742325, -0.033625081181526184, -0.0017467925790697336, -0.039734791964292526, 0.03871650621294975, 0.05797726660966873, -0.009494968689978123, 0.0034908768720924854, 0.00801628828048706, -0.014180164784193039, 0.0019052226562052965, 0.009641211479902267, 0.07535310834646225, 0.00440083397552371, -0.04541119188070297, -0.03685326129198074, 0.025305472314357758, -0.025023819878697395, 0.04588783532381058, 0.03228181228041649, 0.014288492500782013, 6.804366421420127e-05, -0.016758376732468605, 0.016433391720056534, -0.0147976353764534, 0.008054203353822231, -0.02968193218111992, -0.046234484761953354, -0.015761757269501686, -0.020517366006970406, -0.013021052815020084, 0.011981101706624031, -0.00692217331379652, 0.0025755034293979406, -0.03284511715173721, 0.03243346884846687, 0.003935022745281458, 0.00479352381080389, 0.007474647369235754, 0.009034574031829834, 0.01872994937002659, -0.013031885027885437, -0.0008862602990120649, 0.02290058694779873, 0.020690690726041794, 0.036224957555532455, -0.010989897884428501, 0.014905963093042374, -0.01980239897966385, 0.02500215359032154, 0.002010842552408576, 0.023290567100048065, -0.012641903944313526, -0.009153734892606735, 0.03087354265153408, 0.02454717457294464, -0.01641172543168068, 0.005178089253604412, 0.04840105026960373, 0.030635220929980278, -0.026302091777324677, 0.02309557795524597, -0.07127997279167175, -0.00787546206265688, 0.03817486763000488, -0.014905963093042374, -0.04060141742229462, 0.06478027999401093, 0.003146934788674116, 0.022878920659422874, -0.03037523292005062, 0.01029118150472641, 0.00820586271584034, 0.034903354942798615, 0.018296636641025543, 0.019520746544003487, 0.024373849853873253, 0.02495882287621498, 0.038001541048288345, 0.012576906941831112, 0.007783382665365934, 0.00797837320715189, 0.04588783532381058, 0.0010975003242492676, -0.000725122052244842, 0.010204518213868141, -0.025197144597768784, -0.024525510147213936, -0.02896696701645851, -0.034578368067741394, 0.037178244441747665, -0.02153564989566803, 0.001083959243260324, -0.0015612804563716054, 0.009169983677566051, 0.04931100830435753, -0.005925553850829601, 0.02992025576531887, -0.01504679024219513, -0.024937156587839127, -0.009104987606406212, 0.0014339948538690805, 0.001570759224705398, 0.003271512221544981, -0.005386620759963989, -0.027385374531149864, 0.0056763989850878716, -0.02115650102496147, 0.0030358985532075167, -0.010399509221315384, -0.030266905203461647, 0.019206594675779343, -0.021102337166666985, 0.05607068911194801, 0.00290861283428967, 0.0111578069627285, -0.023030580952763557, -0.0066188545897603035, -0.03054855950176716, -0.011320299468934536, -0.053254153579473495, -0.030158577486872673, 0.033581748604774475, 0.0036750349681824446, 0.04649447277188301, 0.016682546585798264, 0.01192693691700697, 0.024005534127354622, 0.0016817956930026412, 0.023983867838978767, -0.02004072070121765, 0.02513214759528637, 0.016595883294939995, 0.016151737421751022, 0.026583746075630188, 0.00028385379118844867, 0.008081285282969475, -0.010567418299615383, 0.01574009098112583, -0.006656769197434187, 0.02049569971859455, 0.010117855854332447, 0.05260418355464935, -0.010339928790926933, 0.0016872120322659612, -0.027493702247738838, 0.03650661185383797, 0.006575522944331169, -0.004747484344989061, 0.016379227861762047, -0.015512601472437382, -0.023485558107495308, 0.06547357887029648, -0.045237865298986435, -0.021524818614125252, -0.008086701855063438, 0.000903186562936753, 0.02318223938345909, 0.005381204653531313, -0.0034367127809673548, 0.011396128684282303, 0.019704904407262802, -0.03520667180418968, 0.0022261450067162514, -0.04441457241773605, 0.036809928715229034, 0.0024184274952858686, 0.03737323731184006, -0.022228950634598732, -0.02235894463956356, -0.023485558107495308, -0.047057781368494034, 0.019455749541521072, -0.033495087176561356, 0.037221577018499374, 0.02892363630235195, -0.029356949031352997, -0.03050522692501545, 0.017787493765354156, -0.015490936115384102, 0.02905363030731678, 0.029811926186084747, 0.027797022834420204, 0.02781868726015091, -0.021113170310854912, -0.004918101243674755, 0.008899163454771042, 0.028078675270080566, -0.003260679543018341, -0.027537034824490547, -0.026345424354076385, 0.006283036898821592, -0.009343309327960014, 0.019618241116404533, 0.0016587759600952268, 0.012327752076089382, -0.019748235121369362, 0.0038266945630311966, 0.013281039893627167, -0.020029887557029724, 0.010664913803339005, -0.003122560912743211, -0.010356178507208824, -0.03752489760518074, 0.024850495159626007, 0.0009221439831890166, 0.0033256765455007553, -0.00011645283666439354, -0.007079249247908592, -0.02554379589855671, -0.0063588665798306465, 0.01211109571158886, -0.03128518909215927, 0.0364416129887104, 0.019412416964769363, 0.011298634111881256, 0.0001987145806197077, -0.014700139872729778, -0.01587008498609066, 0.03345175459980965, 0.011807776056230068, -0.0332350991666317, -0.012121927924454212, 0.009922864846885204, -0.004647280555218458, -0.005359538830816746, 0.008536264300346375, 0.020755687728524208, 0.01711585931479931, -0.02781868726015091, 0.010935734026134014, 0.019065767526626587, 0.024807162582874298, -0.009771205484867096, -0.008325023576617241, 0.0111578069627285, -0.00717132817953825, -0.034361712634563446, -0.058540571480989456, 0.04311463236808777, -0.03356008231639862, -0.017050862312316895, -0.022640598937869072, -0.02723371610045433, 0.039453137665987015, 0.035726647824048996, 0.008297941647469997, -0.022077292203903198, 0.02768869325518608, 0.0028463241178542376, 0.010708244517445564, -0.05113092064857483, 0.017300017178058624, -0.006369699724018574, 0.0009167275857180357, 0.01719168946146965, 0.0042410497553646564, 0.021438155323266983, 0.02235894463956356, -0.021513985469937325, 0.043006304651498795, -0.04404625669121742, 0.021871468052268028, 0.022640598937869072, -0.03124186024069786, -0.02083151787519455, -0.0027325793635100126, -0.005169964395463467, -0.004807064775377512, 0.008530847728252411, 0.007257991004735231, 0.03295344486832619, 0.006255954969674349, -0.0020270918030291796, 0.040774744004011154, -0.016335895285010338, -0.019824065268039703, 0.002056882018223405, -0.00022224211716093123, 0.015220114961266518, 0.004801648668944836, 0.035943303257226944, 0.0320868194103241, 0.020961511880159378, -0.03046189621090889, 0.022044792771339417, 0.045237865298986435, 0.019444916397333145, 0.03821819648146629, 0.013172712177038193, 0.00769672030583024, 6.626640242757276e-05, 0.002862573368474841, 0.004414374940097332, -0.019856562837958336, 0.022965583950281143, -0.056027356535196304, 0.026973728090524673, -0.0043087550438940525, -0.026627076789736748, 0.03542332723736763, 0.028490323573350906, -0.03652827814221382, 0.03291011229157448, 0.012620237655937672, 0.03037523292005062, 0.021264830604195595, -0.019780732691287994, -0.029898589476943016, -0.0014719096943736076, 0.0005172672681510448, 0.045107871294021606, -0.05399078503251076, -0.009695376269519329, -0.03384173661470413, -0.0011164577445015311, -0.031220193952322006, 0.03148018196225166, 0.03611662983894348, 0.005232253111898899, 0.026692073792219162, -0.011049478314816952, -0.005159131716936827, -0.04261632263660431, 0.02476383186876774, 0.03884650021791458, -0.04909434914588928, -0.006250538397580385, 0.011244469322264194, -0.020398205146193504, -0.00857417844235897, 0.021633146330714226, -0.007962124422192574, -0.04662446677684784, 0.011796943843364716, 0.0037129498086869717, 0.051564235240221024, 0.05728396400809288, 0.029898589476943016, -0.040363095700740814, 0.0010873444844037294, -0.020268211141228676, -0.0019079308258369565, 0.012826061807572842, 0.022467274218797684, 0.04393792897462845, -0.030700217932462692, -0.03964813053607941, -0.0348166897892952, -0.020929012447595596, -0.029248619452118874, 0.024005534127354622, 0.015588431619107723, -0.02736370824277401, 0.010453673079609871, 0.00771838566288352, 0.01971573568880558, 0.047967735677957535, 0.019889062270522118, 0.03297511115670204, -0.007155078928917646, -0.019564077258110046, -0.005800976417958736, -0.009473303332924843, -0.027927014976739883, 0.00370482518337667, -0.020766520872712135, 0.02028987556695938, -0.03971312567591667, -0.013053551316261292, -0.016216734424233437, 0.0061476267874240875, -0.004579575732350349, 0.007886294275522232, -0.0034448374062776566, 0.030028583481907845, -0.019488247111439705, 0.03269345685839653, 0.08271943032741547, -0.04298463836312294, 0.005941803101450205, -0.02446051314473152, 0.05836724489927292, 0.006992586888372898, 0.016801707446575165, 0.03641995042562485, 0.001058908412232995, 0.014115167781710625, 0.025067150592803955, 0.02025737799704075, -0.007680471055209637, -0.0111578069627285, -0.027493702247738838, -0.019206594675779343, 0.00919706653803587, -0.01661754958331585, -0.0032444302923977375, -0.008021704852581024, -0.030440229922533035, 0.021145669743418694, -0.007182161323726177, 0.012674402445554733, -0.0016845038626343012, 0.011710280552506447, 0.00636428315192461, 0.02025737799704075, 0.005516614764928818, -0.010448257438838482, 0.014104334637522697, -0.008958743885159492, -0.02677873708307743, 0.008926245383918285, 0.021438155323266983, 0.0371132493019104, 0.05186755210161209, 0.04107806086540222, 0.04818439483642578, 0.001882202923297882, -0.04814106225967407, -0.01006369199603796, 0.0016411725664511323, -0.001005421276204288, -0.018318302929401398, 0.027493702247738838, -0.017300017178058624, -0.040688078850507736, -0.01607590913772583, -0.00613679364323616, -0.0002750521234702319, -0.023550555109977722, 0.03293177857995033, 0.0007711615180596709, 0.019000770524144173, -0.006965504959225655, 0.0040189772844314575, 0.025803782045841217, 0.00022190359595697373, -0.020571529865264893, -0.002671644790098071, -0.003821277990937233, -0.03041856549680233, 0.008633759804069996, -0.012858560308814049, 0.04148970916867256, -0.0018957438878715038, -0.026843734085559845, -0.01345436554402113, 0.013790182769298553, -0.022293947637081146, -0.010166604071855545, 0.02203396148979664, 0.036138296127319336, 0.036311618983745575, -0.03295344486832619, 9.15712007554248e-05, -0.014645976014435291, 0.011331131681799889, -0.008086701855063438, 0.005313499365001917, 0.03145851567387581, -0.01056200172752142, -0.01930408924818039, -0.0019092849688604474, -0.026627076789736748, 0.006694684270769358, -0.023377230390906334, -0.027472037822008133, -0.01192693691700697, 0.029855258762836456, -0.026930395513772964, -0.004991223104298115, -0.014960127882659435, -0.01992155984044075, 0.05035095661878586, -0.0500909686088562, -0.05585402995347977, 0.008937078528106213, 0.00851459801197052, -0.004774566274136305, 0.04170636460185051, -0.06023049354553223, 0.010502421297132969, 0.016292564570903778, -0.03100353665649891, -0.0250454843044281, 0.0005744781228713691, -0.008417102508246899, 0.012782730162143707, 0.00605554785579443, 0.03269345685839653, 0.029486943036317825, -0.02178480476140976, 0.0029438193887472153, -0.02294391766190529, 0.009863284416496754, 0.012349417433142662, 0.0473610982298851, -0.011948603205382824, -0.013519362546503544, 0.04092640429735184, 0.00637511583045125, 0.025305472314357758, 0.021503152325749397, 0.014602644369006157, 0.03243346884846687, -0.008043370209634304, -0.0018564749043434858, 0.014613477513194084, -0.02169814333319664, -0.01459181122481823, -0.013411033898591995, 0.022618932649493217, 0.029573604464530945, -0.012945222668349743, -0.024525510147213936, 0.04567117989063263, 0.027623696252703667, 0.007350069936364889, 0.021091505885124207, -0.00541370315477252, -0.023550555109977722, 0.004815189633518457, -0.00581722566857934, 0.01914159767329693, 0.01846996136009693, 0.009180816821753979, 0.0017088777385652065, 0.025262141600251198, 0.013887678273022175, -0.012067764066159725, -0.0015653427690267563, -0.006732598878443241, -0.012511909939348698, -0.007041334640234709, 0.053297486156225204, -0.019856562837958336, -0.00738798500970006, -0.008855831809341908, 0.052387528121471405, 0.004189594183117151, -0.008043370209634304, 0.008585011586546898, 0.009327059611678123, -0.014732638373970985, 0.02210978977382183, -0.0069330064579844475, 9.377161768497899e-05, -0.003742740023881197, 0.019239092245697975, -0.027667028829455376, 0.04987431317567825, -0.011363630183041096, 0.012555240653455257, -0.03319176658987999, 0.014765136875212193, 0.025500463321805, -0.016379227861762047, 0.043829597532749176, 0.02335556410253048, 0.03304010629653931, -0.037546563893556595, -0.037546563893556595, 0.009603297337889671, -0.021015675738453865, 0.018090812489390373, -0.025023819878697395, -0.002096151001751423, 0.040774744004011154, -0.0076588052324950695, 0.015295945107936859, 0.03054855950176716, -0.01624923385679722, -0.004677071236073971, 0.01165611669421196, 0.05390412360429764, -0.0037535729352384806, 0.007106331642717123, -0.014830133877694607, 0.0132052106782794, 0.023702215403318405, 0.02500215359032154, -0.015696760267019272, -0.017711663618683815, -0.0038754420820623636, 0.010285764932632446, -0.006960088387131691, -0.014017672277987003, 0.012587739154696465, -0.019856562837958336, -0.002320932224392891, -0.007268823683261871, 0.033083438873291016, -0.03195682540535927, -0.013519362546503544, 0.002832782920449972, 0.00960871297866106, 0.003886274993419647, -0.004460414405912161, -0.019694071263074875, 0.008417102508246899, -0.007490896619856358, -0.022174786776304245, -0.01384434662759304, 0.007339237257838249, -0.0014840966323390603, 0.04224800691008568, -0.016953367739915848, -0.00843335222452879, -0.0025308181066066027, 0.004457706585526466, 0.011027812957763672, 0.011087393388152122, 0.010805740021169186, 0.039084821939468384, 0.015133452601730824, -0.02905363030731678, 0.018123311921954155, -0.038369856774806976, 0.04016810655593872, -0.01751667447388172, -0.011536955833435059, -0.02203396148979664, -0.013649356551468372, 0.0007149662706069648, 0.03087354265153408, -0.011027812957763672, 0.03154517710208893, 0.00979828741401434, -0.005121216643601656, 0.05186755210161209, 0.02141648903489113, 0.007095498498529196, -0.0020338622853159904, -0.02313890866935253, 0.012316918931901455, 0.0582805834710598, 0.017083359882235527, 0.034903354942798615, 0.0006652029696851969, -0.0004783368203788996, -0.01908743381500244, -0.046927787363529205, -0.031025202944874763, 0.020690690726041794, 0.0373515710234642, -0.038456518203020096, 0.009294561110436916, 0.00686259288340807, 0.010529503226280212, -0.048877693712711334, -0.012046098709106445, -0.02181730419397354, -0.0033690077252686024, -0.00685176020488143, 0.008249194361269474, 0.010670330375432968, 0.051607564091682434, 0.03345175459980965, 0.016541719436645508, -0.028576985001564026, 0.003899815957993269, -0.02768869325518608, -0.017083359882235527, 0.005763061344623566, -0.00558973615989089, -0.007095498498529196, -0.005402870010584593, 0.010605333372950554, 0.046061161905527115, -0.02066902443766594, 0.05485741049051285, 0.004048767499625683, -0.01848079450428486, -0.016606716439127922, -0.043872930109500885, 0.00473394338041544, -0.02409219741821289, 0.006131377536803484, 0.012923557311296463, -0.012046098709106445, -0.00981453713029623, 0.04057975113391876, 0.0066621857695281506, 0.024893825873732567, -0.04207468032836914, 0.057760607451200485, 0.023052245378494263, -0.010513254441320896, -0.0034773359075188637, 0.00039946031756699085, -0.011515290476381779, 0.01347603090107441, -0.011753612197935581, 0.0419013574719429, 0.01967240497469902, 0.010491588152945042, 0.029486943036317825, -0.0021069839131087065, -0.007100915070623159, 2.5960689526982605e-05, 0.0057901437394320965, -0.011439460329711437, 0.00878000259399414, 0.00661343801766634, -0.013432699255645275, 0.04021143540740013, -0.011970268562436104, 0.020528199151158333, 0.004000019747763872, 0.011493624188005924, 0.04411125183105469, 0.03288844972848892, 0.0019526162650436163, 0.008384604007005692, 0.005156423430889845, 0.024525510147213936, -0.004761025309562683, -0.01598924584686756, 0.03466503322124481, -0.010708244517445564, -0.019542410969734192, -0.009234980680048466, -0.00439000129699707, -0.00880166795104742, 0.006023049354553223, 0.0464511401951313, -0.02459050714969635, 0.012338584288954735, 0.02099400945007801, 0.004243758041411638, -0.011482791975140572, -0.0006577554158866405, 0.00480435648933053, -0.034080058336257935, -0.015295945107936859, -0.0678567960858345, -0.006694684270769358, -0.03364674746990204, 0.02227228321135044, -0.01117947231978178, 0.006174708716571331, 0.020896514877676964, 0.0009532883414067328, -0.014310157857835293, -0.004089390393346548, 0.024893825873732567, -0.02946527674794197, 0.013129380531609058, -0.0028436158318072557, -0.028663648292422295, 0.0320868194103241, 0.008167947642505169, 0.021914798766374588, -0.0020690690726041794, -0.01950991339981556, -0.00019752974912989885, -0.010058275423943996, -0.02677873708307743, -0.015978412702679634, 0.008070453070104122, -0.0018253305461257696, 0.0127502316609025, -0.011471958830952644, 0.03124186024069786, 0.01574009098112583, -0.032628461718559265, -0.01506845559924841, -0.03743823245167732, 0.005595152731984854, -0.008178780786693096, -0.005012888461351395, -0.02968193218111992, -0.05286417156457901, -0.004966848995536566, 0.03637661784887314, -0.011959435418248177, 0.005643900483846664, 0.024070531129837036, 0.008335856720805168, 0.011233637109398842, -0.0018713700119405985, 0.03343008831143379, -0.005140174180269241, 0.0153717752546072, 0.022922251373529434, -0.0024116570129990578, 0.02376721240580082, 0.025262141600251198, -0.007653389126062393, -0.01686670444905758, 0.008601261302828789, 0.019206594675779343, 0.03501168265938759, 0.037719886749982834, -0.016888370737433434, -0.001004067249596119, -0.03637661784887314, -0.019737401977181435, -0.02950860746204853, 0.00582805834710598, 0.06179041787981987, 0.003065688768401742, -0.04757775738835335, 0.00793504249304533, -0.01186194084584713, -0.011699448339641094, -0.009229565039277077, 0.0227705929428339, -0.022922251373529434, -0.02078818529844284, -0.030591890215873718, -0.025760451331734657, 0.013270207680761814, 0.03460003435611725, -0.018004151061177254, 0.015935081988573074, -0.0025064442306756973, -0.03810986876487732, 0.008617510087788105, -0.012262755073606968, 0.0019471998093649745, -0.004078557714819908, -0.020647360011935234, 0.038868166506290436, 0.011796943843364716, 0.004035226535052061, 0.04352628067135811, 0.006640519946813583, -0.003344633849337697, 0.007593808230012655, 0.06287369877099991, 0.009597880765795708, -0.006895091384649277, 0.01863245479762554, -0.002136774128302932, 0.018773281946778297, -0.004974973853677511, -0.00137712259311229, -0.014916796237230301, 0.004874770063906908, 0.0023507224395871162, -0.028013678267598152, -0.016151737421751022, -0.025760451331734657, 0.03245513513684273, -0.009099571034312248, 0.010957399383187294, -0.015360942110419273, 0.02963860146701336, -0.004154387395828962, -0.014960127882659435, 0.014765136875212193, 0.040233101695775986, -0.014017672277987003, 0.009435388259589672, -0.0005365632241591811, 0.01661754958331585, -0.04363460838794708, 0.00607721321284771, 0.013107715174555779, -0.0075613101944327354, 0.018794946372509003, 0.005492241121828556, -0.00746923079714179, 0.005703480914235115, 0.02818700298666954, -0.007176744751632214, -0.024850495159626007, 0.023117242380976677, -0.0027312252204865217, -0.009803703986108303, 0.04057975113391876, 0.014505148865282536, -0.0016398184234276414, -0.03678826615214348, 0.018784113228321075, 0.013183544389903545, 0.002832782920449972, 0.04094806686043739, 0.014645976014435291, 0.031046869233250618, 0.004227508790791035, 0.02066902443766594, 0.0005517968675121665, -0.01926075853407383, 0.017841657623648643, -0.0307435505092144, -0.004384584724903107, 0.004040642641484737, 0.04419791325926781, -0.006878842134028673, 0.005616818554699421, 0.002792160026729107, 0.009863284416496754, 0.028620315715670586, -0.0021340660750865936, -0.04083973914384842, -0.016270898282527924, -0.05455409362912178, 0.006710933521389961, 0.04083973914384842, 0.016595883294939995, -0.0034069225657731295, 0.020777354016900063, -5.0863487558672205e-05, 0.02918362244963646, 0.036593273282051086, 0.007745468057692051, 0.02777535654604435, -0.02124316431581974, -0.01393100991845131, -0.004116472322493792, 0.02591211162507534, 0.026540415361523628, -0.00740965036675334, 0.005963468458503485, -0.002824658527970314, 0.0031144365202635527, 0.001378476619720459, -0.037589892745018005, 0.022044792771339417, -0.0023155156522989273, -0.005600569304078817, -0.008200446143746376, 0.007534227799624205, 0.016845038160681725, -0.01744084432721138, -0.012089429423213005, 0.035856641829013824, 0.010258683003485203, -0.0003447884228080511, -0.026800401508808136, 0.002203125273808837, 0.009440804831683636, -0.030028583481907845, -0.009039990603923798, -0.005272876471281052, 0.009928281418979168, 0.006023049354553223, 0.0546407550573349, 0.008525431156158447, 0.02381054311990738, -0.006071797106415033, -0.03514167666435242, -0.0043520862236619, 0.010166604071855545, -0.00975495669990778, -0.014743471518158913, 0.02157898247241974, 0.03728657588362694, -0.014331824146211147, 0.05442409962415695, -0.023485558107495308, -0.019943226128816605, -0.008612093515694141, 0.012013600207865238, -0.006938422564417124, -0.004325004294514656, -0.005995966959744692, 0.051564235240221024, -0.0018998062005266547, -0.006093462463468313, 0.013692687265574932, -0.006337201222777367, -0.0007515270262956619, 0.0009512571850791574, 0.0188924428075552, 0.05459742620587349, -0.006348033901304007, 0.007035918068140745, -0.02335556410253048, 0.016151737421751022, 0.00795670785009861, 0.029443610459566116, 0.0074583981186151505, 0.0016641922993585467, -0.02946527674794197, 0.016725877299904823, 0.02454717457294464, 0.009511218406260014, -0.011796943843364716, 0.04356960952281952, 0.03410172462463379, 0.019434083253145218, 0.03574831411242485, 0.023247236385941505, -0.0021381282713264227, -0.06668685376644135, -0.005958052352070808, -0.019737401977181435, -0.036224957555532455, 0.002234269632026553, 0.026692073792219162, 0.02992025576531887, 0.04274631664156914, -0.01921742595732212, -0.005903888028115034, -0.01846996136009693, -0.01926075853407383, -0.0026107102166861296, 0.02781868726015091, -0.017061695456504822, -0.005386620759963989, -0.0026134182699024677, 0.01004744227975607, -0.03392839804291725, 0.036809928715229034, 0.00818419735878706, -0.014537647366523743, 0.019000770524144173, -0.0031333938241004944, -0.005584320053458214, -0.0067759305238723755, -0.01484096609055996, 0.010128688998520374, -0.007756300736218691, 0.04361294209957123, -0.008736670948565006, -0.043287958949804306, 0.006006800103932619, 0.011807776056230068, -0.00425729900598526, -0.012013600207865238, -0.03158850967884064, -0.008839583024382591, 0.013779349625110626, -0.007333820685744286, 0.055940695106983185, -0.034860022366046906, -0.018448296934366226, -0.03202182427048683, -0.00979287177324295, -0.009673709981143475, -0.01880577951669693, -0.008530847728252411, 0.004173344932496548, 0.042464662343263626, 0.00872042216360569, -0.059450529515743256, 0.002840907545760274, 0.03806653618812561, 0.02099400945007801, 0.004855812527239323, -0.01270690094679594, 0.00212323316372931, 0.007490896619856358, 0.018740782514214516, 0.03206515312194824, -0.001734605641104281, -0.01454848051071167, 0.0011252594413235784, 0.003978353925049305, -0.029313616454601288, 0.02066902443766594, 0.00849293265491724, 0.011796943843364716, 0.010388677008450031, -0.014645976014435291, 0.02417885884642601, 0.016953367739915848, 0.018859943374991417, -0.018567457795143127, 0.0005277615855447948, -0.034405045211315155, -0.01025326643139124, 0.008893746882677078, -0.014830133877694607, 0.006456362083554268, 0.022922251373529434, -0.013389368541538715, -0.013887678273022175, 0.00529183354228735, -0.012414414435625076, 0.016433391720056534, -0.0211673341691494, -0.013140213675796986, 0.02313890866935253, -0.0021814596839249134, 0.012511909939348698, -0.0021922923624515533, 0.020517366006970406, 0.04558451473712921, -0.015285111963748932, 0.015350108966231346, -0.003274220507591963, 0.03050522692501545, 0.0014746179804205894, 0.015501768328249454, -0.07179994881153107, -0.020755687728524208, -0.016314230859279633, 0.02404886484146118, -0.012327752076089382, 0.000824648595880717, -0.010193686001002789, -0.016920868307352066, 0.01698586530983448, -0.007360902614891529], "index": 99}, {"title": "Jarkko Wiss", "text": "Jarkko Wiss (born 17 April 1972) is a Finnish former footballer. Wiss is currently working as a manager of the Finland national under-18 football team.", "vector": [0.006705993786454201, 0.04774228855967522, -0.008756163530051708, -0.04268447309732437, -0.011321617290377617, 0.04590042307972908, 0.04107649624347687, 0.009333573281764984, -0.03189640864729881, 0.019456516951322556, -0.03610638529062271, -0.002424755599349737, -0.027174806222319603, 0.004699677228927612, -0.0427137054502964, 0.014354846440255642, 0.0020465156994760036, 0.0397024042904377, -0.04142732545733452, -0.028402715921401978, 0.04861936718225479, 0.022935593500733376, -0.015538902021944523, -0.013046537525951862, 0.029469827190041542, -0.028037264943122864, 0.014822620898485184, 0.020640572533011436, -0.028899725526571274, 0.02362263947725296, 0.03692499175667763, 0.023798054084181786, 0.016606014221906662, -0.06198019161820412, 0.013718964532017708, 0.038416024297475815, 0.024426627904176712, 0.01893027126789093, -0.03534625098109245, 0.004436553921550512, 0.026063838973641396, -0.005565791856497526, 0.004560806322842836, 0.014917638152837753, 0.00958938803523779, 0.011818628758192062, -0.044994112104177475, -0.006124929059296846, -0.008478422649204731, -0.03572631627321243, 0.07273901998996735, 0.02276017889380455, 0.016006676480174065, -0.02898743376135826, 0.010780752636492252, -0.028621984645724297, 0.019544225186109543, 0.09068988263607025, -0.0154658118262887, 0.03449840843677521, -0.018330933526158333, -0.0025617992505431175, 0.001768774352967739, -0.029996072873473167, 0.023388750851154327, -0.011007331311702728, 0.0015586409717798233, 0.015202688053250313, 0.001157560502178967, 0.044350918382406235, -0.0006367953028529882, -0.013543548993766308, 0.020128944888710976, -0.029732950031757355, -0.03552166745066643, -0.024207357317209244, 0.05353100597858429, 0.015085744671523571, 0.04347384348511696, 0.0007290712092071772, 0.0004184393910691142, -0.05221538618206978, -0.06630711257457733, -0.0036764193791896105, -0.03414757549762726, -0.03613562136888504, 0.012695706449449062, -0.0567469596862793, -0.031194746494293213, -0.0012425273889675736, -0.016547542065382004, 0.049876511096954346, 0.011306999251246452, 0.04136885330080986, 0.008814635686576366, -0.011204673908650875, 0.006314963102340698, -0.02081598900258541, 0.001997180050238967, 0.009684405289590359, 0.02422197535634041, -0.009757494553923607, -0.012023280374705791, -0.05013963580131531, 0.018915653228759766, -0.05148448795080185, -0.006881409324705601, 0.015787407755851746, 0.031867172569036484, 0.028417332097887993, 0.051221366971731186, 0.025903042405843735, -0.03645721450448036, 0.018594058230519295, 0.017190732061862946, 0.030434612184762955, -0.005419612396508455, -0.0340891070663929, 0.002591035095974803, 0.031107040122151375, -0.010612646117806435, -0.0029016670305281878, -0.0015979268355295062, 0.024441245943307877, 0.002474091248586774, 0.03274425119161606, 0.01260799914598465, 0.015275778248906136, -0.0028340588323771954, -0.019573461264371872, -0.05329711735248566, 0.014903020113706589, -0.04414626955986023, -0.011182746849954128, 0.02138608880341053, 0.03750970959663391, -0.04233364015817642, -0.006855827756226063, -0.009077759459614754, 0.053735654801130295, 0.0737915113568306, 0.0033146245405077934, 0.03160405158996582, -0.00278837769292295, 0.023286426439881325, -0.004897019825875759, 0.02898743376135826, -0.0030515012331306934, -0.049905747175216675, -0.009340882301330566, 0.03417681157588959, -0.024061178788542747, -0.04420474171638489, -0.020158180966973305, -0.007762141991406679, 0.0223070215433836, 0.009106995537877083, -0.009720949456095695, 0.014471789821982384, 0.0154658118262887, -0.0028413678519427776, -0.007056824862957001, -0.016971463337540627, 0.00019254606741014868, -0.045666538178920746, 0.004001669120043516, -0.06127852946519852, 0.019412662833929062, 0.01933957450091839, -0.0027207694947719574, -0.012220622971653938, 0.028651220723986626, 0.014340228401124477, 0.02467513270676136, 0.02977680414915085, 0.0034352228976786137, 0.0052843960002064705, 0.0382990799844265, -0.004681404680013657, 0.012308330275118351, -0.017950866371393204, 0.01895950734615326, 0.007586726453155279, -0.018623292446136475, -0.05736091360449791, -0.023067155852913857, -0.005448848009109497, 0.014120958745479584, 0.05247851088643074, -0.04689444601535797, 0.016006676480174065, 0.03745123744010925, 0.0406087189912796, -0.017497709020972252, 0.004027250688523054, -0.005503665655851364, 0.034586116671562195, 0.014259829185903072, -0.03949775546789169, 0.003734891302883625, 0.05318017303943634, -0.03502465412020683, -0.02238011173903942, 0.011979426257312298, 0.0152903962880373, 0.025040581822395325, 0.014369464479386806, -0.04128114506602287, -0.04844395071268082, -0.017029935494065285, 0.005510974675416946, 0.013507003895938396, 0.054466553032398224, -0.021079111844301224, -0.00906314142048359, -0.03172099590301514, 0.030405376106500626, 0.006420942954719067, 0.041515033692121506, -0.015743553638458252, -0.0015211824793368578, -0.016971463337540627, 0.020640572533011436, -0.026063838973641396, 0.034206047654151917, 0.00071216921787709, 0.024441245943307877, -0.025449885055422783, -0.022175459191203117, 0.03405987098813057, 0.035697080194950104, 0.045023348182439804, 0.03025919757783413, -0.035317014902830124, -0.013119627721607685, -0.0302299614995718, 0.027145570144057274, -2.2983331291470677e-05, 0.014617969281971455, -0.04771305248141289, 0.031048567965626717, 0.011270454153418541, -0.01825784333050251, -0.011562814004719257, -0.033855218440294266, -0.011979426257312298, -0.04549112170934677, 0.013916307128965855, -0.076598159968853, 0.021824628114700317, -0.003608811181038618, 0.0010780752636492252, -0.0255668293684721, -0.03657415881752968, -0.005529247224330902, -0.006972771603614092, 0.0074551645666360855, -0.02786185033619404, 0.04245058447122574, 0.013178099878132343, -0.005653499625623226, -0.015875114127993584, -0.03020072542130947, -0.011211982928216457, -0.05285857990384102, 0.008624602109193802, -0.04686520993709564, -0.03511236235499382, 0.02786185033619404, -0.0037458548322319984, -0.008069119416177273, 0.06010909005999565, 0.00422093877568841, 0.07431776076555252, 0.03686651960015297, -0.015275778248906136, 0.0003460347361396998, 0.03435222804546356, -0.011116965673863888, 0.0822114646434784, 0.027247894555330276, 0.017497709020972252, 0.008573438972234726, 0.001554986578412354, 0.008273771032691002, 0.024952873587608337, -0.021941572427749634, -0.0019715987145900726, 0.031048567965626717, 0.031077804043889046, -0.033855218440294266, -0.013879762031137943, 0.006632903590798378, -0.018667146563529968, 0.06291574239730835, -0.06069381162524223, 0.0046777501702308655, 0.009932910092175007, -0.01358009409159422, 0.012023280374705791, 0.005364794749766588, 0.03622332960367203, -0.05455426126718521, -0.05528515949845314, -0.039146922528743744, -0.02384190820157528, -0.009026596322655678, 0.04306453838944435, 0.008734236471354961, 0.03449840843677521, -0.008851180784404278, 0.0212545283138752, -0.029835276305675507, -0.008368787355720997, -0.026794739067554474, 0.019076449796557426, 0.023958852514624596, 0.03160405158996582, -0.03403063490986824, 0.03166252374649048, 0.03327050060033798, 0.007181077729910612, -0.03484924137592316, 0.015129598788917065, 0.05046123266220093, -0.012673779390752316, 0.0059166233986616135, 0.028066501021385193, -0.04861936718225479, 0.01449371688067913, 0.03964393213391304, -0.032451894134283066, -0.03063926473259926, -0.04133961722254753, 0.024631278589367867, -0.03139939904212952, -0.08835101127624512, -0.025464503094553947, -0.049730334430933, 0.0032433620654046535, 0.004568115342408419, 0.025683771818876266, -0.006537886802107096, -0.010861151851713657, -0.028271153569221497, -0.012534908950328827, 0.04037483036518097, -0.01831631548702717, -0.007034897804260254, 0.010203342884778976, 0.0005084312288090587, -0.014734913595020771, 0.02729174867272377, 0.018520968034863472, 0.019324956461787224, 0.007623271085321903, 0.045666538178920746, -0.006033566780388355, -0.013667801395058632, -0.016430597752332687, -0.008821944706141949, 0.0151149807497859, -0.010013309307396412, 0.0022091406863182783, 0.04455557093024254, 0.014756840653717518, 0.045666538178920746, -0.013711655512452126, -0.08022341877222061, 0.01828707940876484, 0.029294410720467567, -0.008975433185696602, 0.030434612184762955, 0.0706925019621849, 0.03239342197775841, -0.04721604287624359, -0.047479163855314255, -0.006830246187746525, -0.016810664907097816, -0.003402332542464137, -0.002455818932503462, -0.02422197535634041, -0.019134921953082085, 0.037422001361846924, 0.016240565106272697, 0.00620167376473546, 0.013565476052463055, 0.0007034898153506219, 0.010298359207808971, -0.038796089589595795, -0.009925601072609425, 0.018696382641792297, -0.005942204501479864, -0.015611991286277771, -0.007871776819229126, -0.009545533917844296, 0.02923593856394291, -0.009604006074368954, -0.01969040557742119, -0.032159533351659775, -0.028753546997904778, 0.0021963499020785093, -0.0072541674599051476, -0.05832570046186447, -0.0034918675664812326, -0.024748222902417183, -0.035287778824567795, 0.01219138689339161, 0.00010301100701326504, -0.0061797467060387135, 0.0295282993465662, -0.01966116949915886, -0.027598727494478226, -0.025318322703242302, 0.002667779568582773, 0.01742462068796158, 0.03441070020198822, 0.001052493811585009, 0.00823722593486309, -0.008134899660944939, -0.008931579068303108, -0.015085744671523571, 0.015275778248906136, 0.01847711391746998, 0.01569969952106476, 0.05809181183576584, -0.020611336454749107, 0.05242003872990608, 0.031223982572555542, 0.020611336454749107, -0.035287778824567795, -0.013843216933310032, 3.2890431612031534e-05, 0.026341581717133522, -0.004897019825875759, 0.0014736740849912167, -0.030463848263025284, 0.04897020012140274, 0.0015476775588467717, -0.019734259694814682, 0.03262730687856674, -0.004199011716991663, -0.004407317843288183, 0.02289174124598503, 0.014099031686782837, 0.0156412273645401, -0.04277217760682106, 0.037714362144470215, 0.027730287984013557, 0.0840240865945816, 0.014932256191968918, -0.032130297273397446, 0.03791901469230652, -0.021590741351246834, -0.0008030746830627322, 0.009472444653511047, 0.006844864226877689, 0.02680935710668564, -0.015582755208015442, -0.039117686450481415, 0.019266484305262566, 0.02664855867624283, -0.05350176990032196, 0.004611969459801912, -0.015158834867179394, -0.03373827412724495, 0.01701531745493412, 0.043210718780756, -0.002735387533903122, -0.01650368794798851, 0.023374132812023163, -0.022833269089460373, -0.004831239115446806, 0.027817996218800545, 0.042596764862537384, 0.054788149893283844, 0.01742462068796158, 0.0005801506922580302, -0.01976349577307701, -0.03172099590301514, 0.04446786269545555, 0.01286381296813488, -0.05730244144797325, 0.03476153314113617, 0.07431776076555252, -0.020435921847820282, 0.06157088652253151, -0.027876468375325203, 0.010795370675623417, -0.011087729595601559, 0.09121613204479218, 0.010824606753885746, 0.003775090677663684, -0.005291705019772053, -0.036281801760196686, 0.005394030828028917, 0.03294890373945236, -0.013609330169856548, -0.031867172569036484, -0.010875768959522247, 0.012008662335574627, -0.01083922479301691, -0.002687879139557481, 0.07367456704378128, 0.01739538460969925, -0.030493084341287613, 0.03020072542130947, 0.018184754997491837, 0.011402016505599022, -0.01882794499397278, 0.012505672872066498, 0.010524937883019447, -0.01803857460618019, -0.034235283732414246, -0.022423965856432915, 0.008566129952669144, -0.04476022347807884, -0.0266193225979805, 0.03230571374297142, 0.002764623612165451, -0.02508443593978882, -0.00599336763843894, -0.019017977640032768, -0.010159488767385483, 0.0562499463558197, 0.01101464033126831, 0.006811973638832569, -0.04207051545381546, -0.0032908704597502947, 0.014449862763285637, -0.005598682444542646, 0.0055475193075835705, -0.006684066727757454, 0.016971463337540627, -0.06408517807722092, 0.02604922279715538, -0.011562814004719257, -0.00543423043563962, 0.017161495983600616, 0.05066588148474693, 0.04493563994765282, -0.011073111556470394, -0.015217306092381477, 0.007414964959025383, -0.00013293216761667281, 0.005887387320399284, -0.03160405158996582, -0.004728913307189941, 0.006062802858650684, 0.0205528661608696, -0.01174553856253624, -0.008990051224827766, 0.045081816613674164, -0.022833269089460373, 0.03593096882104874, -0.01602129451930523, 0.0009291546884924173, -0.02017279900610447, -0.01442793570458889, -0.04768381640315056, 0.027715669944882393, 0.010605337098240852, -0.0018491731025278568, 0.01035683136433363, 0.04031636193394661, 0.041515033692121506, -0.0560452938079834, 0.021619977429509163, -0.052653927356004715, 0.03537548705935478, 0.03517083451151848, 0.03099009580910206, -0.02221931330859661, -0.0020154525991529226, -0.014639896340668201, 0.009552842937409878, 0.014237902127206326, -0.033884454518556595, 0.03677881136536598, 0.0046448600478470325, 0.018301697447896004, -0.005912968888878822, -0.015933586284518242, 0.05326788127422333, -0.0004090747388545424, 0.046397436410188675, 0.016445215791463852, 0.028812017291784286, -0.01201597135514021, 0.014822620898485184, -0.004915292374789715, -0.036661867052316666, 0.02793494053184986, 0.03821137174963951, 0.001878409064374864, -0.016109002754092216, -0.011380089446902275, -0.010079090483486652, 0.04785923287272453, -0.002130569191649556, -0.02648776024580002, 0.012454509735107422, -0.005967786069959402, 0.019997382536530495, -0.0058033340610563755, -0.022497056052088737, 0.010539555922150612, -0.012805341742932796, -0.02694091759622097, -0.01244720071554184, 0.04835624247789383, -0.04651438072323799, 0.0115043418481946, 0.007864467799663544, -0.0005294446018524468, 0.004264792427420616, -0.020669808611273766, -0.02221931330859661, 0.010751516558229923, 0.02378343604505062, -0.01726382225751877, 0.020055854693055153, 0.001746847410686314, 0.013638565316796303, 0.03344591334462166, -0.0030350559391081333, -0.021429942920804024, -0.022497056052088737, -0.010400685481727123, -0.002167114056646824, 0.006117620505392551, 0.003722100518643856, -0.0020245888736099005, 0.00041478488128632307, -0.01841864176094532, 0.010093707591295242, 0.06613169610500336, 0.0036453562788665295, -0.015246542170643806, -0.007107987534254789, 0.044380154460668564, 0.0378020703792572, -0.029323646798729897, 0.004085722379386425, -0.05250774696469307, -0.03581402450799942, 0.023403368890285492, -0.06724265962839127, 0.017804687842726707, -0.0031921991612762213, -0.02413426712155342, 0.02202928066253662, 0.04005323722958565, 0.0219561904668808, 0.010634573176503181, -0.014866475015878677, 0.039819348603487015, 0.013382751494646072, -0.023227954283356667, -0.02243858389556408, 0.009808657690882683, -0.014946874231100082, -0.017833922058343887, 0.017293058335781097, -0.04414626955986023, 0.019061831757426262, -0.01358009409159422, 0.034966181963682175, -0.022994065657258034, -0.014501025900244713, 0.017117641866207123, -0.003537548705935478, -0.002145186997950077, -0.02202928066253662, 0.004973764065653086, -0.011730920523405075, -0.012454509735107422, -0.05584064498543739, 0.028651220723986626, -0.006022603716701269, 0.014778767712414265, -0.016942227259278297, 0.024821313098073006, -0.016927609220147133, 0.02144456095993519, 0.022263167425990105, 0.026034604758024216, 0.02192695438861847, -0.0019588079303503036, -0.012352184392511845, 0.004118612967431545, 0.019573461264371872, 0.038825325667858124, 0.030083781108260155, 0.02221931330859661, 0.008551511913537979, -0.020509012043476105, -0.04718680679798126, 0.013287734240293503, 0.005320941098034382, -0.01306846458464861, 0.035609375685453415, -0.018520968034863472, -0.0005623350152745843, 0.02049439400434494, -0.010736898519098759, -0.0015586409717798233, -0.00911430362612009, -0.01682528294622898, -0.029645241796970367, 0.020830607041716576, -0.03099009580910206, 0.01966116949915886, -0.009947528131306171, 0.04034559801220894, 0.015933586284518242, 0.0049956911243498325, 0.020421303808689117, -0.04002400115132332, 0.05794563144445419, 0.019032595679163933, 0.03692499175667763, -0.04037483036518097, -0.04932102933526039, 0.030376140028238297, -0.027788760140538216, -0.009194702841341496, 0.022555526345968246, -0.006077420897781849, -8.342520595761016e-05, -0.04999345541000366, 0.014734913595020771, -0.01742462068796158, 0.007937557063996792, -0.020918315276503563, 0.03540472313761711, -0.05399877950549126, 0.014786076731979847, -0.007126260083168745, -0.018199373036623, 0.016415979713201523, -0.045344941318035126, -0.04660208895802498, -0.033387441188097, -0.009669787250459194, -0.03938081115484238, -0.007513636257499456, 0.0013549030991271138, 0.008653838187456131, 0.04277217760682106, -0.018053192645311356, 0.013075773604214191, 0.02295021153986454, -0.004089376889169216, -0.016620632261037827, -0.021619977429509163, -0.0013265807647258043, -0.00028596402262337506, -0.00646479707211256, -0.05320940911769867, 0.01637212559580803, -0.018623292446136475, -0.0056352270767092705, 0.0005216787685640156, 0.04823929816484451, -0.00699835317209363, -0.005423266906291246, -0.0223070215433836, -0.0051455250941216946, 0.011906336061656475, 0.05622071027755737, -0.017293058335781097, 0.04160274192690849, 0.021810010075569153, -0.0014727604575455189, -0.018974125385284424, -0.018462495878338814, -0.015626609325408936, 0.002638543490320444, -0.031428635120391846, -0.05002269148826599, -0.018155518919229507, -0.05326788127422333, -0.008390714414417744, 0.022233931347727776, 0.031487107276916504, 0.048853255808353424, 0.007056824862957001, -0.027540255337953568, 0.05759480223059654, -0.013002684339880943, 0.014544880017638206, 0.007097024470567703, -0.01163590420037508, 0.008990051224827766, -0.012666470371186733, 0.013587403111159801, -0.005605991464108229, 0.03745123744010925, -0.03125321865081787, -0.013214644975960255, 0.004224593285471201, 0.0312824547290802, 0.020216651260852814, 0.006325926166027784, -0.033884454518556595, -0.015246542170643806, -0.020918315276503563, 0.043678492307662964, 0.01007178146392107, 0.025318322703242302, 0.024148885160684586, 0.0011867964640259743, 0.006899681873619556, -0.06338351964950562, -0.011847864836454391, -0.03724658489227295, 0.015392721630632877, -0.009991382248699665, -0.06993236392736435, -0.04926255717873573, 0.02387114427983761, 0.016971463337540627, -0.01863791048526764, -0.04429244622588158, -0.010035236366093159, 0.005368449259549379, -0.009852511808276176, -0.011577432043850422, -0.053706418722867966, -0.024412009865045547, 0.0166937205940485, -0.027467165142297745, -0.010210651904344559, -0.05040276050567627, -0.012169459834694862, 0.02186848223209381, 0.02292097732424736, 0.003131899982690811, 0.020406685769557953, 0.008324934169650078, -0.019222630187869072, -0.024075796827673912, 0.020976785570383072, 0.01688375510275364, -0.027744906023144722, -0.04095955193042755, -0.049876511096954346, 0.015611991286277771, -0.0418073944747448, -0.009487062692642212, -0.006205328274518251, 0.003141036257147789, 0.0026330617256462574, 0.00608107540756464, 0.017190732061862946, -0.008069119416177273, 0.00289253075607121, 0.033592093735933304, -0.010312977246940136, 0.004962800536304712, -0.0036727648694068193, -0.016620632261037827, -0.024850549176335335, 0.00958938803523779, -0.05449578911066055, 0.02071366272866726, -0.03788977861404419, -0.008916961029171944, 0.002446682658046484, 0.021751537919044495, 0.01704455353319645, -0.007586726453155279, 0.014018632471561432, -0.004728913307189941, 0.014515643939375877, -0.031867172569036484, 0.014435244724154472, -0.01898874342441559, 0.013507003895938396, 0.029996072873473167, -0.02821268141269684, -0.01425252016633749, 0.018535586073994637, -0.03786054253578186, 0.015173452906310558, 0.005923932418227196, -0.021619977429509163, 0.010371449403464794, 0.009823275730013847, 0.017146877944469452, -0.00965516921132803, -0.022263167425990105, 0.014384082518517971, 0.004111303947865963, 0.026034604758024216, -0.01672295667231083, -0.004199011716991663, -0.024909019470214844, 0.016415979713201523, -0.01192095410078764, -0.013806672766804695, 0.027876468375325203, 0.005931240972131491, -0.014201357960700989, -0.004114958457648754, 0.00318854465149343, 4.376825745566748e-05, 0.05239080265164375, -0.005843533203005791, 0.026692412793636322, -0.011774774640798569, -0.059290483593940735, 0.03443993628025055, 0.0016070629935711622, 0.014055177569389343, -0.012206004932522774, 0.0291774682700634, -0.0009323523845523596, 0.006110311485826969, 0.04806388542056084, -0.003194026416167617, 0.010407994501292706, -0.021663831546902657, 0.004951837006956339, 0.007827922701835632, 0.0003455779515206814, -0.032861195504665375, 0.014310992322862148, 0.03265654295682907, -0.055811408907175064, -0.00442924490198493, 0.02381267212331295, -0.0003805240266956389, -0.009794039651751518, 0.023037919774651527, 0.032539598643779755, 0.016299035400152206, 0.03096085973083973, -0.04405856132507324, 0.019237248227000237, 0.04970109835267067, -0.008997360244393349, 0.03604791313409805, 0.002792032202705741, -0.01104387640953064, -0.03952699154615402, -0.06192171946167946, -0.02888510748744011, 0.043210718780756, 0.06490378826856613, -0.012374111451208591, -0.007652507163584232, 0.020801370963454247, -0.016971463337540627, -0.012776105664670467, -0.005156488623470068, 0.01663525030016899, 0.014435244724154472, -0.011672448366880417, 0.002494191052392125, -0.026443907991051674, -0.04587118700146675, 0.017790069803595543, 0.001997180050238967, 0.014186739921569824, -0.051981501281261444, 0.0073418752290308475, 0.01463258732110262, 0.017833922058343887, -0.002104987623170018, 0.015407339669764042, 0.019047213718295097, 0.036691103130578995, 0.0012005007592961192, 0.024850549176335335, -0.019924292340874672, 0.0018080601003021002, 0.05119213089346886, 0.0061212750151753426, -0.004381736274808645, 0.023403368890285492, 0.005682735703885555, -0.03403063490986824, 0.0347907692193985, 0.01707378774881363, -0.0011201018933206797, 0.010539555922150612, -0.0013649528846144676, 0.011350853368639946, -0.02106449380517006, -0.02993760257959366, 0.017673125490546227, 0.0039029978215694427, -0.029513681307435036, -0.022000044584274292, 0.011928263120353222, -0.034936945885419846, 0.044672515243291855, -0.003935888409614563, 0.009004669263958931, -0.003206817200407386, -0.011511650867760181, -0.008478422649204731, 0.008807326667010784, 0.024616660550236702, -0.03262730687856674, 0.02224854938685894, -0.009004669263958931, -0.0018053192179650068, -0.003141036257147789, -0.031487107276916504, 0.019734259694814682, -0.0033529968932271004, 0.01463258732110262, -0.05984596908092499, 0.004228247795253992, 0.019237248227000237, 0.005518283694982529, 0.05142601579427719, -0.003360305679962039, -0.01931033842265606, 0.06373434513807297, 0.04516952484846115, -0.006424597464501858, 0.04335689917206764, 0.007696360815316439, -0.0015796542866155505, 0.01985120214521885, 0.021108347922563553, 0.03020072542130947, -0.03332896903157234, 0.03473229706287384, 0.015875114127993584, 0.007835231721401215, 0.006980080623179674, -0.002000834560021758, 0.017994720488786697, -0.020962169393897057, 0.007334566209465265, 0.026853209361433983, 0.013046537525951862, 0.021283764392137527, -0.00782061368227005, -0.02977680414915085, -0.012586072087287903, -0.008536893874406815, -0.0026093076448887587, 0.012140223756432533, 0.002792032202705741, -0.012235241010785103, 0.013770127668976784, 0.023198718205094337, 0.008069119416177273, -0.03335820510983467, 0.024602042511105537, 0.0028907035011798143, -0.006475760601460934, 0.03648645058274269, 0.02604922279715538, 0.007908321917057037, -0.010291050188243389, -0.024952873587608337, 0.027891086414456367, 0.012973448261618614, -0.0368957556784153, 0.026882445439696312, 0.03993629291653633, 0.027686433866620064, 0.009333573281764984, 0.006782738026231527, 0.0206551905721426, -0.006950844544917345, 0.0340891070663929, 0.058881182223558426, 0.021079111844301224, -0.019061831757426262, -0.021473797038197517, -0.01701531745493412, 0.01612362079322338, -0.01966116949915886, -0.045403413474559784, -0.02812497317790985, 0.0032671161461621523, 0.0024137923028320074, -0.00033529967186041176, 0.023768818005919456, 0.012008662335574627, 0.012132914736866951, 0.05209844559431076, -0.005364794749766588, -0.014515643939375877, 0.018433259800076485, 0.02537679485976696, 0.00043054489651694894, -0.0067352293990552425, -0.04686520993709564, -0.03593096882104874, -0.004546188749372959, 0.009172775782644749, 0.02642928995192051, -0.0291774682700634, -0.024251211434602737, 0.007184732239693403, 0.002126914681866765, 0.03099009580910206, 0.011211982928216457, 0.019705023616552353, -0.025128290057182312, 0.014237902127206326, -0.02238011173903942, 0.0354924313724041, 0.018374787643551826, -0.011928263120353222, -0.010583410039544106, 0.011862481944262981, 0.003979742061346769, -0.021561505272984505, 0.03063926473259926, -0.008661147207021713, -0.03324126452207565, 0.009172775782644749, -0.002823095303028822, -0.024207357317209244, -0.009618624113500118, -0.031837936490774155, -0.003530239686369896, 0.0018117146100848913, 0.03862067684531212, 0.006446524523198605, -0.03210106119513512, -0.01618209294974804, -0.029411355033516884, -0.032539598643779755, 0.013653183355927467, 0.02799341268837452, 0.008134899660944939, 0.005437884479761124, 0.029469827190041542, -0.0010725934989750385, 0.012184077873826027, 0.016679102554917336, -0.02384190820157528, 0.012885740026831627, 0.045403413474559784, -0.00696546258404851, -0.014062486588954926, -0.009582079015672207, -0.016240565106272697, 0.013704346492886543, -0.013178099878132343, 0.01596282236278057, 0.004231902305036783, -0.03446917235851288, 0.004202666226774454, 0.017848540097475052, 0.008244534954428673, 0.028066501021385193, -0.009903674013912678, 0.008032574318349361, -0.013229262083768845, -0.011380089446902275, -0.013879762031137943, -0.01723458617925644, -0.015041890554130077, -0.003482731292024255, 0.034556880593299866, -0.028168827295303345, 0.015875114127993584, 0.03645721450448036, 0.01189171802252531, -0.027598727494478226, -0.0025837260764092207, -0.0069910441525280476, -0.025844570249319077, -0.009501680731773376, -0.016766810789704323, 0.0007423187489621341, 0.004893365316092968, -0.02311100997030735, -0.003652665065601468, -0.027788760140538216, -0.009808657690882683, -0.007784069050103426, -0.013090391643345356, 0.014946874231100082, 0.007118951063603163, -0.053004756569862366, 0.007827922701835632, 0.01976349577307701, 0.0003293611225672066, 0.02926517464220524, -0.05072435364127159, 0.005616954993456602, -0.038386788219213486, -0.018491731956601143, 0.0003910306841135025, 0.025449885055422783, -0.009918292053043842, 0.013441222719848156, 0.0017103024292737246, -0.03613562136888504, 0.0023662839084863663, 0.010714971460402012, -0.021824628114700317, 0.01469836849719286, -0.018345551565289497, -0.008544202893972397, -0.019997382536530495, -0.007484400644898415, -0.03265654295682907, -0.008653838187456131, 0.04043330252170563, -0.005255159921944141, 0.021751537919044495, -0.008017956279218197, -0.0203043594956398, 0.05154296010732651, 0.016255183145403862, 0.021079111844301224, 0.0034443591721355915, -0.004294028505682945, -0.028709692880511284, 0.003194026416167617, -0.01330966129899025, 0.006680412217974663, -0.03482000529766083, -0.029601387679576874, 0.006015294697135687, -0.00868307426571846, 0.0210060216486454, -0.005236887838691473, -0.006475760601460934, 0.02157612331211567, 0.008463804610073566, 0.012900358065962791, -0.01077344361692667, -0.0030770825687795877, -0.002205486176535487, -0.010853842832148075, -0.027233276516199112, 0.007071442902088165, 0.014822620898485184, -0.030142253264784813, -0.038035955280065536, 0.02780337817966938, 0.02993760257959366, 0.015714317560195923, 0.005496356636285782, 0.0012388728791847825, 0.01650368794798851, 0.010371449403464794, -0.030756209045648575, 0.004491371102631092, 0.00422093877568841, -0.011467796750366688, -0.006705993786454201, -0.025391412898898125, -2.048514261332457e-06, -0.02243858389556408, -0.06157088652253151, -0.002634888980537653, -0.026692412793636322, 0.011643213219940662, -0.01976349577307701, -0.0031081459019333124, -0.0027573145925998688, -0.03467382490634918, -0.019953528419137, -0.018725618720054626, 0.0004383106715977192, 0.012666470371186733, 0.011738229542970657, 0.010583410039544106, -0.020055854693055153, -0.009070450440049171, 0.011979426257312298, 0.008734236471354961, 0.03230571374297142, -0.00015451651415787637, -0.003738545812666416, 0.030171489343047142, -0.03613562136888504, -0.0031958536710590124, -0.03125321865081787, -0.04654361680150032, -0.03581402450799942, -0.01841864176094532, -0.01777545176446438, 0.001956980675458908, -0.05771174281835556, 0.04142732545733452, -0.021488415077328682, -0.016386743634939194, 0.006819282658398151, 0.015451193787157536, 0.014859165996313095, -0.020962169393897057, 0.006885063834488392, 0.0019368809880688787, 0.02534755878150463, 0.035580139607191086, -0.021912336349487305, 0.025069817900657654, 0.010590719059109688, -0.014479098841547966, 0.0057485164143145084, -0.025610683485865593, -0.053677186369895935, 0.03555090352892876, -0.03192564472556114, 0.0021872136276215315, -0.05709778890013695, 0.01171630248427391, 0.03613562136888504, 0.015538902021944523, -0.004794694017618895, -0.018667146563529968, 0.006607322487980127, 0.013075773604214191, -0.00498838210478425, -0.003382232738658786, 0.005050508305430412, -0.008909652940928936, -0.02923593856394291, 0.0020830605644732714, 0.03555090352892876, 0.014800693839788437, 0.012052515521645546, 0.04315224662423134, -0.02403194271028042, 0.006176092196255922, 0.010393376462161541, -0.004370772745460272, -0.02575686201453209, 0.012388729490339756, -0.023900380358099937, 0.005529247224330902, 0.0028249225579202175, -0.016869137063622475, -0.009633242152631283, 0.025654537603259087, -0.0002528452023398131, 0.017439236864447594, -0.009428590536117554, 0.008990051224827766, 0.017468472942709923, -0.023885762318968773, 0.03727582097053528, -0.03028843365609646, -0.025303704664111137, -0.009326264262199402, -0.03847449645400047, -0.02604922279715538, 0.02961600571870804, 0.001576913520693779, -0.015041890554130077, 0.001594272325746715, 0.005065126344561577, 0.007422273978590965, -0.01449371688067913, -0.01857944019138813, 0.000633597606793046, -0.020187415182590485, 0.018243225291371346, -0.03821137174963951, 0.018111664801836014, -0.010488392785191536, 0.015305014327168465, -0.00478007597848773, 0.013704346492886543, 0.032861195504665375, 0.01988043822348118, -0.001184055581688881, 0.020757516846060753, -0.00010672259668353945, 0.005620609503239393, 0.017029935494065285, -0.007484400644898415, 0.0024137923028320074, -0.0002987547486554831, -0.02259938046336174, 0.0013512485893443227, 0.013704346492886543, 0.015904350206255913, -0.016240565106272697, 0.011723611503839493, 0.03329973667860031, 0.026604704558849335, 0.017600035294890404, -0.005525592714548111, 0.007444201037287712, -0.02780337817966938, -0.004016287159174681, -0.03160405158996582, -0.00047325677587650716, -0.03686651960015297, 0.015407339669764042, -0.01707378774881363, -0.00941397249698639, 0.011095038615167141, -0.03221800550818443, -0.003088046098127961, 0.02850504033267498, 0.017146877944469452, -0.01236680243164301, 0.012995375320315361, 0.004122267477214336, -0.004809312056750059, -0.035667844116687775, -0.009070450440049171, 0.006782738026231527, 0.017848540097475052, -0.02993760257959366, 0.03552166745066643, -0.02036283165216446, 0.03517083451151848, 0.032451894134283066, 0.002764623612165451, 0.03695422783493996, 0.01771697960793972, 0.007159150671213865, -0.0248651672154665, 0.033855218440294266, 0.005945859011262655, -0.010897696018218994, -0.00820068083703518, -0.013894380070269108, 0.027364838868379593, -0.002424755599349737, 0.010890386998653412, 0.013675110414624214, -0.00016399534069932997, -0.0017148705665022135, 0.0009159071487374604, 0.012827268801629543, 0.01739538460969925, -0.00896812416613102, -0.01950037106871605, -0.013821289874613285, -0.0223070215433836, 0.003972433041781187, 0.03151634335517883, 0.012695706449449062, -0.0011867964640259743, 0.020582100376486778, 0.030025308951735497, 0.004041868727654219, 0.003797017503529787, 0.008405332453548908, 0.025654537603259087, 0.012878431007266045, -0.0020958513487130404, 0.0018354688072577119, 0.029484445229172707, 0.02642928995192051, 0.004294028505682945, -0.028621984645724297, -0.0034005052875727415, -0.010459157638251781, -0.0021835591178387403, 0.0055475193075835705, -0.009399354457855225, 0.006479415111243725, 0.0023955197539180517, 0.01615285687148571, -0.010291050188243389, -0.004290373995900154, 0.0219561904668808, -0.000965699611697346, -0.010269124060869217, 0.007981411181390285, 0.018082428723573685, 0.013221953995525837, 0.027087097987532616, 0.006826591677963734, 0.010108325630426407, -0.026502378284931183, 0.02828577160835266, -0.0106784263625741, 0.018491731956601143, 0.0007633321220055223, -0.02847580425441265, 0.011255837045609951, 0.018871799111366272, 0.005529247224330902, 0.007020279765129089, 0.0017358838813379407, -0.012293712235987186, 0.03923463076353073, 0.01631365343928337, -0.0007532822201028466, 0.023988088592886925, 0.05692237243056297, -0.005269777961075306, 0.021634595468640327, 0.028519658371806145, -0.00037938199238851666, -0.0021908681374043226, 0.0031227637082338333, 0.007203004322946072, -0.01348507683724165, -0.004374427255243063, -0.005967786069959402, 0.003157481551170349, 0.0034681132528930902, -0.03347514942288399, -0.0011676102876663208, 0.0034681132528930902, -0.04163197800517082, -0.03063926473259926, 0.01602129451930523, -0.013813980855047703, -0.03376751020550728, 0.0692891776561737, -0.01094885915517807, -0.029762186110019684, -0.013221953995525837, -0.009399354457855225, 0.0002273779537063092, 0.02610769309103489, -0.0004408231470733881, 0.05037352442741394, -0.019675787538290024, 0.015348868444561958, -0.006483069621026516, 0.015407339669764042, -0.017848540097475052, -0.001891199848614633, 0.01514421682804823, 0.03201335296034813, 0.022935593500733376, 0.019573461264371872, -0.00782061368227005, -0.008039883337914944, -0.02403194271028042], "index": 100}]} \ No newline at end of file + return { + "items": [ + { + "title": "Parabolic reflector", + "text": "A parabolic (or paraboloid or paraboloidal) reflector (or dish or mirror) is a reflective surface used to collect or project energy such as light, sound, or radio waves. Its shape is part of a circular paraboloid, that is, the surface generated by a parabola revolving around its axis. The parabolic reflector transforms an incoming plane wave traveling along the axis into a spherical wave converging toward the focus.", + "vector": [ + -0.02738949842751026, + 0.03491175174713135, + -0.021398993209004402, + -0.018760139122605324, + -0.042221687734127045, + 0.019897576421499252, + -0.024750644341111183, + -0.015590478666126728, + -0.03924918174743652, + 0.0045838737860322, + -0.004727949388325214, + 0.005251170601695776, + 0.008606611751019955, + -0.040553443133831024, + 0.0018720327643677592, + 0.03312218561768532, + 0.024614151567220688, + -0.004254017025232315, + 0.026919357478618622, + -0.009835043922066689, + -0.00032867208938114345, + -0.046255797147750854, + -0.08153153210878372, + -0.021019848063588142, + -0.019017957150936127, + 0.018744973465800285, + 0.032121241092681885, + -0.039340175688266754, + -0.05620458722114563, + -0.025508934631943703, + 0.06970217823982239, + 0.011510869488120079, + 0.010593336075544357, + -0.03545772284269333, + -0.040735434740781784, + -0.01607578620314598, + -0.03160560131072998, + -0.06051168218255043, + -0.03206057474017143, + 0.0011326983803883195, + -0.015029342845082283, + 0.013573423027992249, + -0.02282458171248436, + 0.004489087499678135, + -0.02534211054444313, + 0.037732597440481186, + -0.0015601853374391794, + 0.029133569449186325, + -0.02189946547150612, + -0.038005582988262177, + 0.005296668037772179, + -0.07534386962652206, + -0.011723190546035767, + 0.05875244736671448, + -0.018183836713433266, + 0.02467481419444084, + 0.029770534485578537, + 0.0629078820347786, + 0.0020265348721295595, + -0.0036852979101240635, + 0.04458755627274513, + -0.028026463463902473, + -0.04301030933856964, + 0.0448908731341362, + 0.004272974096238613, + -0.005967756267637014, + 0.0010644521098583937, + 0.009569642134010792, + -0.023218894377350807, + -0.007052113302052021, + 0.033516496419906616, + -0.01188243180513382, + -0.0016511803260073066, + 0.026995187625288963, + 0.013080532662570477, + 0.04200936481356621, + 0.03010418266057968, + 0.037368617951869965, + 0.05380838364362717, + -0.03779326379299164, + -0.039522167295217514, + 0.011093808338046074, + 0.021747808903455734, + 0.02851177006959915, + 0.010676748119294643, + 0.03075631521642208, + 0.011738356202840805, + -0.041281405836343765, + 0.04713541641831398, + 0.011821769177913666, + -0.031120294705033302, + 0.0269496887922287, + 0.03585203364491463, + 0.06230125203728676, + 0.08232015371322632, + -0.006377233657985926, + 0.0031241620890796185, + 0.035882364958524704, + -0.04813636094331741, + 0.034638769924640656, + -0.017061565071344376, + -0.002250230871140957, + -0.006180077791213989, + 0.016864409670233727, + -0.005505198147147894, + -0.050926875323057175, + -0.013816076330840588, + -0.008667275309562683, + 0.016712751239538193, + 0.004216102417558432, + 0.016667252406477928, + -0.011283381842076778, + 0.0552036426961422, + -0.01841132342815399, + -0.02684352919459343, + -0.029012242332100868, + 0.013436930254101753, + -0.020079566165804863, + -0.04067477211356163, + 0.03136294707655907, + -0.032606545835733414, + -0.006119414698332548, + -0.013262523338198662, + 0.018350660800933838, + -0.014847353100776672, + -0.040068138390779495, + 0.01916961558163166, + -0.017835022881627083, + 0.023052070289850235, + -0.013186694122850895, + -0.003920368384569883, + -0.004951645154505968, + -0.012519396841526031, + -0.0012786694569513202, + 0.009599973447620869, + 0.03151460736989975, + -0.014938347972929478, + 0.018851133063435555, + -0.006597138475626707, + 0.021762974560260773, + 0.008849265053868294, + -0.04759038984775543, + 0.07146141678094864, + -0.006532683502882719, + 0.005910884588956833, + 0.004530793521553278, + -0.022324109449982643, + 0.03976482152938843, + -0.016909906640648842, + -0.02984636463224888, + 0.004242642316967249, + 0.0026976228691637516, + -0.04637712612748146, + -0.018183836713433266, + 0.016591424122452736, + -0.04804536700248718, + -0.006126997526735067, + 0.028572434559464455, + 0.02834494598209858, + -0.07382728904485703, + -0.008204717189073563, + 0.01777435839176178, + -0.029057741165161133, + 0.048106029629707336, + 0.012549729086458683, + 0.023598039522767067, + 0.0030976219568401575, + -0.02403784915804863, + -0.040917422622442245, + 0.0055734445340931416, + 0.0067942943423986435, + 0.010343099944293499, + 0.023689035326242447, + -0.01023693848401308, + -0.07231070101261139, + -0.018001846969127655, + -0.007802822161465883, + 0.01768336445093155, + 0.0060739172622561455, + -0.011556366458535194, + -0.031059630215168, + -0.05647757276892662, + 0.036246348172426224, + 0.0033573368564248085, + 0.02450799010694027, + 0.03788425773382187, + -0.00373079557903111, + 0.004481504205614328, + -0.05656856670975685, + -0.02470514550805092, + -0.026054905727505684, + 0.004856858868151903, + 0.06069367378950119, + -0.03336483612656593, + 0.047469064593315125, + -0.0872945487499237, + -0.022035958245396614, + -0.010790491476655006, + -0.02748049423098564, + -0.007143108639866114, + 0.0025023629423230886, + 0.025296613574028015, + -0.032879531383514404, + 0.0034672890324145555, + -0.04304064065217972, + 0.05032024160027504, + 0.054384686052799225, + -0.018547816202044487, + 0.003628426231443882, + -0.03524539992213249, + 0.025463437661528587, + -0.050835881382226944, + -8.761824574321508e-05, + 0.0007848319946788251, + 0.023158229887485504, + 0.004128898493945599, + 0.0009094761917367578, + -0.02488713525235653, + 0.008735520765185356, + -0.02629755809903145, + 0.01953359693288803, + -0.03115062601864338, + 0.022020792588591576, + 0.03345583379268646, + -0.009440732188522816, + 0.00981987826526165, + -0.041584718972444534, + -0.004617996979504824, + -0.053838714957237244, + -0.018274832516908646, + -0.0674576386809349, + 0.041281405836343765, + 0.015355408191680908, + -0.03104446455836296, + -0.02403784915804863, + -0.00958480779081583, + 0.0037497528828680515, + -0.019852079451084137, + 0.0021611314732581377, + 0.01842649094760418, + 0.006437897216528654, + -0.02001890353858471, + -0.03136294707655907, + -0.003821790451183915, + 0.028663428500294685, + -0.027374332770705223, + 0.024917468428611755, + -0.06909554451704025, + -0.05235246568918228, + -0.026585709303617477, + -0.03776292875409126, + 0.03133261576294899, + -0.05665956065058708, + 0.05399037525057793, + -0.004382926505059004, + 0.006305195856839418, + 0.00523600447922945, + 0.01982174627482891, + 0.01094973273575306, + 0.04237334430217743, + 0.03266720846295357, + -0.04492120444774628, + 0.02796580083668232, + -0.021641647443175316, + -0.02619139850139618, + 0.02112600952386856, + -0.014824604615569115, + -0.026798030361533165, + -0.011290964670479298, + 0.023719366639852524, + -0.008803767152130604, + 0.03560938313603401, + 0.02347671240568161, + -0.041008420288562775, + 0.035033080726861954, + 0.0023791403509676456, + -0.010403763502836227, + 0.014089060947299004, + 0.042525000870227814, + -0.019017957150936127, + 0.027616987004876137, + -0.056447237730026245, + 0.010835989378392696, + -0.013634085655212402, + 0.02282458171248436, + 0.013406598940491676, + 0.010001868940889835, + 0.014195222407579422, + 0.020428379997611046, + 0.00539903761819005, + -0.022506099194288254, + -0.031575269997119904, + -0.044648218899965286, + 0.07182539999485016, + 0.04564916342496872, + -0.022035958245396614, + -0.010032200254499912, + -0.028071962296962738, + -0.004060652572661638, + 0.044648218899965286, + -0.001304261852055788, + 0.023082401603460312, + -0.04021979495882988, + 0.03442644700407982, + -0.01750137470662594, + -0.028269117698073387, + -0.007939314469695091, + 0.03733828663825989, + -0.0172890517860651, + -0.034092798829078674, + 0.0561135895550251, + -0.015014177188277245, + -0.011146889068186283, + -0.016621755436062813, + 0.002627481007948518, + 0.0026312724221497774, + -0.0009071065578609705, + -0.04728707671165466, + -0.010555421933531761, + -0.010373431257903576, + -0.032970525324344635, + 0.01785018853843212, + -0.0794689804315567, + 0.00869002379477024, + 0.039704158902168274, + 0.0065933470614254475, + 0.059996046125888824, + -0.01795634999871254, + 0.008341209031641483, + 0.04674110561609268, + -0.009016089141368866, + -0.004140273202210665, + 0.04589181765913963, + -0.020549707114696503, + -0.006745005492120981, + 0.007855902425944805, + -0.007567751687020063, + 0.007215146441012621, + -0.030741147696971893, + -0.0025440689641982317, + 0.016758248209953308, + 0.02208145707845688, + -0.01374024711549282, + -0.017744027078151703, + -0.011996176093816757, + -0.06454579532146454, + -0.0107980752363801, + -0.01944260112941265, + 0.015370573848485947, + 0.000463979784399271, + 0.0006545005599036813, + -0.020792359486222267, + -0.07588984072208405, + 0.04555816948413849, + 0.039886146783828735, + -0.017653033137321472, + 5.05034186062403e-05, + -0.05526430532336235, + 0.01552223227918148, + 0.012178165838122368, + -0.026449216529726982, + -0.059723060578107834, + -0.028951579704880714, + -0.014104226604104042, + -0.03172692656517029, + -0.01374024711549282, + 0.003110891906544566, + -0.0062104095704853535, + 0.01619711145758629, + -0.012951623648405075, + 0.011632195673882961, + 0.008811349980533123, + -0.029012242332100868, + 0.01916961558163166, + 0.03767193481326103, + 0.03077148087322712, + 0.041099414229393005, + -0.031666263937950134, + -0.007745950482785702, + 0.002784826559945941, + -0.004708991851657629, + 0.01757720299065113, + -0.010540255345404148, + -0.004568708129227161, + 0.02384069375693798, + 0.037823595106601715, + -0.012375322170555592, + -0.04516385868191719, + -0.03924918174743652, + -0.026403719559311867, + 0.01098764780908823, + -0.009084335528314114, + 0.004197144880890846, + -0.01514308713376522, + 0.0060928743332624435, + -0.013436930254101753, + 0.016667252406477928, + 0.017471041530370712, + -0.01309569925069809, + 0.015431237407028675, + 0.029421720653772354, + 0.047924041748046875, + -0.002581983571872115, + -0.0024435953237116337, + 0.005319416988641024, + 0.009660637006163597, + -0.03542739152908325, + 0.036792315542697906, + -0.016667252406477928, + 0.01121513545513153, + 0.04434490203857422, + -0.028875751420855522, + 0.03500274941325188, + 0.02617623284459114, + 0.016758248209953308, + 0.03852122277021408, + -0.010631250217556953, + 0.04871266335248947, + -0.0187904704362154, + -0.01299712061882019, + -0.028178121894598007, + 0.014544036239385605, + 0.02843594178557396, + -0.019700421020388603, + -0.019017957150936127, + 0.009675802662968636, + 0.04856100678443909, + -0.0015355407958850265, + 0.017258720472455025, + -0.030437830835580826, + -0.041857704520225525, + 0.007962063886225224, + 0.013884322717785835, + -0.004458755720406771, + -0.018562981858849525, + 0.002204733435064554, + 0.0010919400956481695, + 0.024341166019439697, + 0.011753522790968418, + -0.0027753477916121483, + -0.022005626931786537, + 0.02449282445013523, + 0.017319384962320328, + -0.011298547498881817, + -0.022187616676092148, + -0.006142163183540106, + 0.0036132603418082, + -0.03982548415660858, + 0.07218937575817108, + 0.005922258831560612, + 0.0105705875903368, + 0.012739301659166813, + -0.05617425590753555, + -0.021732641384005547, + -0.010964899323880672, + -0.004083401057869196, + -0.007700453046709299, + -0.024553487077355385, + -0.014885267242789268, + 0.015529815107584, + 0.0038691838271915913, + 0.02523595094680786, + 0.01464261393994093, + -0.056447237730026245, + 0.051199860870838165, + 0.013641669414937496, + -0.011988593265414238, + -0.0021706102415919304, + -0.0033402752596884966, + -0.04379893094301224, + -0.003890036838129163, + -0.06105765327811241, + -0.011245466768741608, + 0.020155394449830055, + -0.008758270181715488, + -0.01853265054523945, + -0.048682332038879395, + -0.0014853039756417274, + 0.005239796359091997, + -0.03715629503130913, + -0.03482075780630112, + 0.031575269997119904, + 0.007764907553792, + -0.0029971483163535595, + 0.03040749952197075, + -0.0032094698399305344, + -0.00921324547380209, + 3.450820076977834e-05, + 0.006945952773094177, + -0.009895707480609417, + 0.052413128316402435, + -0.00015059200813993812, + -0.014953513629734516, + -0.017880519852042198, + -0.022566763684153557, + -0.019518429413437843, + -0.010858737863600254, + 0.03573070839047432, + 0.031180957332253456, + 0.07807371765375137, + 0.013224608264863491, + -0.004015155136585236, + -0.01627294160425663, + 0.03251555189490318, + -0.023704200983047485, + 0.06202826648950577, + 0.029694706201553345, + -0.02497813105583191, + -0.007165857125073671, + 0.016758248209953308, + 0.023491879925131798, + -0.01599995605647564, + 0.02778381109237671, + -0.02907290682196617, + 0.025326944887638092, + -0.008144053630530834, + -0.02738949842751026, + 0.006415148265659809, + -0.04552783817052841, + 0.009152581915259361, + -0.013262523338198662, + -0.014415126293897629, + 0.005838846787810326, + -0.022794250398874283, + 0.03645866736769676, + -0.01104072853922844, + 0.05638657510280609, + -0.0021933589596301317, + 0.027844473719596863, + -0.008530782535672188, + 0.00023862493981141597, + -0.03039233386516571, + 0.043738268315792084, + 0.012504231184720993, + -0.013072949834167957, + 0.000957817304879427, + -0.010790491476655006, + 0.048227354884147644, + 0.025417940691113472, + -0.02385585941374302, + -0.0370653010904789, + 0.004375343676656485, + 0.006551641039550304, + 0.006005670875310898, + 0.01145778875797987, + -0.0029061532113701105, + 0.010244522243738174, + -0.020443545654416084, + -0.0062748645432293415, + -0.016803745180368423, + 0.07728509604930878, + 0.006782920099794865, + 0.023264391347765923, + 0.07546519488096237, + 0.017653033137321472, + 0.008667275309562683, + -0.007787656504660845, + -0.008075807243585587, + 0.010441677644848824, + -0.0011507077142596245, + -0.01145778875797987, + 0.0011867266148328781, + -0.02318856306374073, + 0.02963404171168804, + -0.024811306968331337, + 0.021747808903455734, + -0.0019772457890212536, + 0.03721696138381958, + -0.0041099414229393005, + -0.0034255830105394125, + -0.005907092709094286, + 0.01663692109286785, + -0.022293778136372566, + 0.027525991201400757, + 0.005744060035794973, + -0.013626502826809883, + -0.006312779150903225, + 0.003927951212972403, + -0.015969624742865562, + 0.023734532296657562, + 0.008068224415183067, + -0.008591446094214916, + -0.009789546951651573, + 0.01374024711549282, + 0.009948788210749626, + -0.029785700142383575, + 0.027616987004876137, + 0.040280457586050034, + 0.004159230273216963, + -0.006312779150903225, + -0.027905136346817017, + 0.038763877004384995, + 0.008712772279977798, + 0.028466273099184036, + 0.0196397565305233, + 0.014779106713831425, + 0.014187638647854328, + -0.04112974554300308, + 0.021853968501091003, + 0.02086818963289261, + 0.011806602589786053, + 0.03739894926548004, + -0.0008033153717406094, + -0.04216102138161659, + -0.014104226604104042, + 0.04640745744109154, + 0.015696639195084572, + -0.044102247804403305, + -0.0302103441208601, + 0.01380091067403555, + -0.04983493685722351, + -0.0396738238632679, + -0.010926984250545502, + 0.02440182864665985, + -0.014308965764939785, + 0.0023260600864887238, + -0.012595226056873798, + -0.025645427405834198, + -0.008561113849282265, + -0.02030705288052559, + -0.00892509426921606, + -0.023886190727353096, + 0.01505209133028984, + -0.0491979718208313, + -0.019958239048719406, + -0.013831241987645626, + 0.033698488026857376, + -0.015082423575222492, + -0.03049849532544613, + 0.029421720653772354, + -0.010502341203391552, + -0.06527375429868698, + -0.028132624924182892, + -0.013891905546188354, + 0.03843022882938385, + 0.023446381092071533, + 0.0018805635627359152, + -0.01926061138510704, + 0.00963030569255352, + 0.005854012444615364, + -0.03263687714934349, + 0.012185748666524887, + 0.036337342113256454, + -0.05171550065279007, + 0.010487175546586514, + 0.021489989012479782, + -0.023067235946655273, + -0.025417940691113472, + 0.01486251875758171, + 0.021019848063588142, + -0.009175330400466919, + -0.016151614487171173, + -0.0041099414229393005, + 0.014726025983691216, + 0.024902300909161568, + -0.008856847882270813, + -0.017986681312322617, + 0.03882453963160515, + 0.007753533311188221, + -0.02347671240568161, + -0.00163127516862005, + 0.00240757642313838, + -0.044011253863573074, + 0.012678638100624084, + -0.020352551713585854, + 0.007385761942714453, + -0.02000373788177967, + 0.04385959729552269, + 0.0029914609622210264, + 0.0020208475179970264, + -0.028269117698073387, + 0.006782920099794865, + -0.03245488926768303, + -0.021671978756785393, + 0.04461788758635521, + -0.035670045763254166, + -0.009372486732900143, + 0.01739521324634552, + 0.01841132342815399, + -0.017804691568017006, + -0.013080532662570477, + 0.024750644341111183, + 0.0014435979537665844, + 0.01674308255314827, + 0.01637910306453705, + -0.005641690921038389, + 0.027450162917375565, + -0.055051982402801514, + -0.033152516931295395, + -0.019518429413437843, + -0.06497044116258621, + -0.01647009700536728, + -0.02534211054444313, + -0.00640756543725729, + -0.00279240938834846, + -0.03524539992213249, + -0.027177177369594574, + -0.014346879906952381, + -0.02720750868320465, + -0.04170604795217514, + 0.010911818593740463, + -0.009903290309011936, + -0.0028739257249981165, + -0.009516561403870583, + -0.02385585941374302, + 0.010267270728945732, + -0.014604699797928333, + -0.028390444815158844, + -0.019518429413437843, + -0.017046399414539337, + 0.014066312462091446, + -0.036246348172426224, + 0.0009497604332864285, + 0.01234498992562294, + 0.026858694851398468, + -0.013270106166601181, + -0.001313740503974259, + 0.010873904451727867, + -0.04367760568857193, + 0.02141415886580944, + 0.020807527005672455, + 0.01906345598399639, + 0.0058691781014204025, + 0.013725081458687782, + 0.04771171882748604, + 0.02675253339111805, + 0.005122261121869087, + -0.03545772284269333, + -0.03597336262464523, + 0.015742138028144836, + -0.03994680941104889, + 0.01029001921415329, + -0.008614194579422474, + -0.01127579901367426, + -0.012087170965969563, + 0.03394113853573799, + -0.04740840196609497, + 0.033061522990465164, + -0.02280941605567932, + 0.00252321595326066, + -0.00011812763841589913, + -0.01352034229785204, + 0.02963404171168804, + -0.0159847903996706, + -0.010676748119294643, + -0.014574367552995682, + 0.006779128219932318, + 0.02393168769776821, + 0.013762995600700378, + -0.007711827289313078, + -0.004674868658185005, + 0.011723190546035767, + -0.030907971784472466, + 0.011078642681241035, + -0.026858694851398468, + 0.02553926780819893, + -0.024644482880830765, + 0.009410400874912739, + -0.0015819862019270658, + 0.036155350506305695, + -0.027541156858205795, + 0.04173637926578522, + 0.0035848242696374655, + -0.0006293821497820318, + -0.04734773933887482, + -0.049622613936662674, + 0.018638812005519867, + 0.01533265970647335, + 0.011116557754576206, + -0.02132316492497921, + 0.025872915983200073, + 0.023052070289850235, + -0.0026142108254134655, + -0.017273886129260063, + -0.01572697050869465, + 0.015029342845082283, + 0.00617628637701273, + -0.05444534868001938, + 0.01589379645884037, + 0.008485284633934498, + -0.00481515284627676, + -0.019958239048719406, + -0.05638657510280609, + -0.034365784376859665, + -0.02431083470582962, + -0.025463437661528587, + 0.014142141677439213, + -0.00017452558677177876, + 0.00981987826526165, + 0.022035958245396614, + 0.03767193481326103, + 0.024068180471658707, + -0.013194276951253414, + -0.0055734445340931416, + -0.004735532216727734, + 0.021929798647761345, + 0.00847011897712946, + 0.0007753533427603543, + -0.027738312259316444, + -0.024144010618329048, + 0.05435435473918915, + -0.0019450184190645814, + -0.004443589597940445, + 0.001195257413201034, + 0.003863496473059058, + -0.04143306240439415, + 0.04768138751387596, + -0.03479042649269104, + -0.025311779230833054, + -0.003361128270626068, + -0.02552410028874874, + 0.036337342113256454, + 0.018911797553300858, + 0.02534211054444313, + -0.0191847812384367, + -0.015355408191680908, + -0.009531727991998196, + -0.034274786710739136, + -0.009137416258454323, + -0.005414203274995089, + 0.01210991945117712, + -0.049319297075271606, + -0.024917468428611755, + 0.03654966503381729, + -0.03330417349934578, + 0.012322241440415382, + 0.002917527686804533, + -0.004197144880890846, + 0.018441656604409218, + -0.010631250217556953, + 0.019093787297606468, + -0.03148427605628967, + -0.009471064433455467, + 0.010123195126652718, + -0.03439611569046974, + -0.004128898493945599, + 0.030452998355031013, + 0.02365870401263237, + 0.013254940509796143, + 0.01257247757166624, + 0.03721696138381958, + -0.02907290682196617, + -0.01935160532593727, + -0.025493768975138664, + -0.041857704520225525, + 0.027328835800290108, + 0.046346794813871384, + 0.009084335528314114, + 0.011086225509643555, + 0.0340624675154686, + 0.016758248209953308, + -0.013186694122850895, + 0.004284348338842392, + 0.032121241092681885, + 0.006202826742082834, + -0.017926016822457314, + -0.02226344682276249, + 0.011981010437011719, + 0.0005374393076635897, + 0.0018445447785779834, + 0.015878628939390182, + 0.022399939596652985, + 0.0017099479446187615, + -0.036792315542697906, + 0.0042464337311685085, + -0.004602830857038498, + 0.03178759291768074, + -0.010873904451727867, + 0.012708970345556736, + -0.0065705981105566025, + -0.009706134907901287, + 0.01927577704191208, + 0.016151614487171173, + -0.05620458722114563, + 0.03676198422908783, + 0.012314658612012863, + -0.009986702352762222, + -0.03542739152908325, + 0.026782864704728127, + 0.05656856670975685, + 0.03621601685881615, + 0.016106117516756058, + -0.024280503392219543, + 0.024841638281941414, + 0.026858694851398468, + -0.026600874960422516, + -0.07552585750818253, + -0.008060641586780548, + 0.03284920006990433, + 0.015544981695711613, + -0.021641647443175316, + -0.0021516529377549887, + -0.0005488136666826904, + -0.0039507001638412476, + -0.027268171310424805, + 0.038581885397434235, + -0.014324131421744823, + -0.020989516749978065, + -0.011010396294295788, + -0.006892872042953968, + 0.01692507229745388, + -0.0005199037841521204, + -0.02086818963289261, + -0.012481482699513435, + 0.028587600216269493, + -0.005835055373609066, + 0.041099414229393005, + 0.033152516931295395, + -0.0004222737334202975, + -0.012921291403472424, + 0.01627294160425663, + -0.03397146984934807, + 0.04759038984775543, + -0.009129832498729229, + 0.05013825371861458, + 0.007704244460910559, + 0.019154449924826622, + 0.030073851346969604, + 0.007374387700110674, + -0.039340175688266754, + 0.0401894636452198, + 0.02010989747941494, + 0.04704442247748375, + -0.004530793521553278, + 0.01005494873970747, + -0.028921248391270638, + -0.012701387517154217, + 0.006081500090658665, + 0.026070071384310722, + 0.024432161822915077, + 0.024265335872769356, + -0.00841703824698925, + 0.0474993959069252, + 0.03733828663825989, + 0.02142932638525963, + 0.017653033137321472, + -0.030255841091275215, + -0.01010802946984768, + 0.014999011531472206, + -0.010744994506239891, + 0.01897246018052101, + 0.012671055272221565, + 0.017137393355369568, + -0.013118447735905647, + 0.02356770820915699, + -0.025842582806944847, + -0.057569511234760284, + 0.011336461640894413, + -0.010365848429501057, + 0.025008462369441986, + 0.016106117516756058, + 0.0002462078700773418, + -0.03348616510629654, + -0.044466231018304825, + 0.009471064433455467, + -0.006066333968192339, + 0.007886234670877457, + -0.009046420454978943, + 0.041190408170223236, + 0.003129849210381508, + -0.02320372872054577, + 0.013831241987645626, + 0.03048332966864109, + -0.0003400464775040746, + 0.0047469064593315125, + -0.010858737863600254, + 0.003562075551599264, + -0.040341123938560486, + 0.005907092709094286, + -0.030923139303922653, + 0.0015772469341754913, + -0.02020089328289032, + -0.018669143319129944, + 0.010919401422142982, + 0.05496098846197128, + 0.012648306787014008, + 0.06685100495815277, + -0.003071081591770053, + 0.019761083647608757, + 0.027935469523072243, + 0.03943117335438728, + 0.03573070839047432, + -0.005262544844299555, + -0.01417247299104929, + -0.008917511440813541, + -0.012663472443819046, + 0.0034066257067024708, + 0.0006971544935368001, + -0.02599424123764038, + 0.001672981190495193, + -0.013368683867156506, + -0.02758665382862091, + 0.007143108639866114, + 0.01628810726106167, + 0.004356386139988899, + 0.009266325272619724, + -0.011389542371034622, + -0.013072949834167957, + -0.0053497483022511005, + -0.026161065325140953, + -0.002953546354547143, + -0.03218190371990204, + -0.00897817499935627, + 0.019033122807741165, + -0.038581885397434235, + 0.03506341204047203, + -0.009152581915259361, + 0.007726992946118116, + -0.004163021687418222, + 0.013914654031395912, + 0.010934567078948021, + 0.018214168027043343, + -0.052140142768621445, + -0.020746862515807152, + 0.039704158902168274, + 0.029998023062944412, + 0.0021383827552199364, + 0.014498538337647915, + 0.06478844583034515, + 0.043252963572740555, + -0.016970569267868996, + 0.02030705288052559, + 0.0015544980997219682, + 0.028572434559464455, + -0.027814142405986786, + 0.02385585941374302, + -0.02264259196817875, + -0.0036416961811482906, + 0.0629078820347786, + -0.011010396294295788, + 0.006062542553991079, + -0.027616987004876137, + 0.0048303185030817986, + -0.020701365545392036, + 0.0004232215869706124, + 0.024053014814853668, + -0.02729850448668003, + -0.05835813656449318, + -0.0035412225406616926, + -0.03086247481405735, + -0.02514495514333248, + 0.0017630283255130053, + -0.014263467863202095, + 0.005550695583224297, + -0.001238859142176807, + -0.019412269815802574, + -0.012898542918264866, + -0.00511846924200654, + -0.03448710963129997, + -0.007954481057822704, + -0.01628810726106167, + -0.05414203181862831, + -0.030634988099336624, + 0.029512716457247734, + -0.02394685335457325, + -0.029967691749334335, + -0.03533639758825302, + 0.013391432352364063, + 0.004663494415581226, + 0.021656813099980354, + -0.02224828116595745, + -0.009675802662968636, + 0.04052311182022095, + 0.009554476477205753, + 0.03321317955851555, + -0.0017781942151486874, + 0.04610414057970047, + -0.043434951454401016, + 0.01757720299065113, + 0.003370607038959861, + -0.021368661895394325, + 0.010426511988043785, + 0.015271996147930622, + 0.022566763684153557, + 0.037368617951869965, + 0.04728707671165466, + 0.015453985892236233, + -0.001555445953272283, + -0.015302328392863274, + -0.022672923281788826, + -0.010418929159641266, + -0.010418929159641266, + -0.017425544559955597, + -0.00032345883664675057, + -0.009266325272619724, + 0.0030369586311280727, + 0.067336305975914, + -0.018365826457738876, + -0.010744994506239891, + 0.011670110747218132, + -0.006684341933578253, + 0.04525485262274742, + 0.020428379997611046, + 0.021353496238589287, + -0.0033099434804171324, + -0.0053307912312448025, + 0.00016990475705824792, + 0.020079566165804863, + -0.004894773475825787, + 0.0003170607378706336, + -0.006020836532115936, + 0.05744818598031998, + -0.02535727620124817, + 0.024053014814853668, + 0.022415105253458023, + 0.05432402342557907, + -0.002115634037181735, + 0.00040521216578781605, + -0.022142119705677032, + -0.036337342113256454, + -0.03433545306324959, + -0.01028243638575077, + -0.02309756726026535, + -0.006540266331285238, + 0.01730421744287014, + -0.021914632990956306, + -0.01663692109286785, + -0.009880541823804379, + 0.018653977662324905, + -0.013907071202993393, + 0.032121241092681885, + -0.008667275309562683, + 0.009008506312966347, + 0.022308943793177605, + -0.03421412408351898, + 0.015939293429255486, + 0.0006625574314966798, + 0.007764907553792, + -0.02271842211484909, + 0.015226499177515507, + -0.01757720299065113, + 0.005922258831560612, + 0.05365672707557678, + 0.012708970345556736, + 0.008326043374836445, + 0.02047387696802616, + 0.030240675434470177, + -0.010835989378392696, + -0.007654955610632896, + 0.0018369618337601423, + 0.010638833977282047, + -0.021262500435113907, + -0.037641603499650955, + 0.022005626931786537, + -0.004762072116136551, + -0.004538376349955797, + 0.003402834292501211, + 0.02544827200472355, + -0.01869947463274002, + 0.03500274941325188, + 0.008401872590184212, + -0.023294722661376, + 0.010244522243738174, + 0.0024379079695791006, + 0.001664450392127037, + 0.008591446094214916, + -0.00959239061921835, + -0.020140228793025017, + 0.007518462836742401, + -0.01906345598399639, + -0.0010056844912469387, + 0.01992790773510933, + 0.03852122277021408, + 0.009835043922066689, + 0.02224828116595745, + -0.00523600447922945, + -0.03154493868350983, + -0.004447381477802992, + -0.00446633854880929, + -0.019017957150936127, + 0.014005648903548717, + 0.004917521961033344, + -0.007040739059448242, + -0.011776271276175976, + -0.011670110747218132, + -0.024007517844438553, + -0.009918455965816975, + -0.0044284239411354065, + -0.015590478666126728, + -0.007662538439035416, + 0.024811306968331337, + 0.016576258465647697, + 0.008909928612411022, + -0.03227289766073227, + 0.01323977392166853, + -0.011859683319926262, + -0.00012653993326239288, + 0.011708024889230728, + 0.01692507229745388, + -0.027616987004876137, + 0.059237752109766006, + 0.0224454365670681, + -0.03843022882938385, + 0.03906719386577606, + -0.009910873137414455, + -0.005880552809685469, + 0.011078642681241035, + 0.01258764322847128, + -0.004542167764157057, + 0.004034112207591534, + -0.01486251875758171, + 0.023628370836377144, + 0.019002791494131088, + -0.01080565806478262, + 0.016712751239538193, + 0.0159847903996706, + -0.02751082554459572, + -0.016515593975782394, + -0.011783854104578495, + 0.013110864907503128, + 0.018305163830518723, + 0.001071087084710598, + -0.021459657698869705, + -0.008674858137965202, + 0.015939293429255486, + -0.0034995165187865496, + 0.01581796631217003, + 0.014362046495079994, + 0.006566806696355343, + 0.0006113727577030659, + -0.029118403792381287, + 0.023355387151241302, + 0.0030331669840961695, + 0.0063696508295834064, + 0.05292876437306404, + -0.011905181221663952, + 0.05814581364393234, + -0.021444492042064667, + 0.014892850071191788, + 0.03788425773382187, + -0.005395245738327503, + -0.01692507229745388, + 0.007848319597542286, + 0.03095347061753273, + -0.015544981695711613, + 0.0278596393764019, + 0.0039507001638412476, + 0.011981010437011719, + -0.013452095910906792, + 0.010600918903946877, + 0.00012535510177258402, + -0.02647954784333706, + 0.04862166941165924, + 0.038854870945215225, + -0.015438820235431194, + -0.019488098099827766, + -0.011245466768741608, + 0.013254940509796143, + 0.007848319597542286, + -0.02666153945028782, + -0.006346902344375849, + -0.004921313375234604, + 0.020079566165804863, + 0.016515593975782394, + 0.023127898573875427, + 0.01304261852055788, + 0.02095918543636799, + 0.03903685882687569, + -0.0146805290132761, + -0.052898433059453964, + -0.01589379645884037, + -0.03900652751326561, + -0.0072492691688239574, + -0.003639800474047661, + -0.029876695945858955, + 0.023598039522767067, + -0.02124733477830887, + 0.0015611331909894943, + 0.011366793885827065, + 0.009463481605052948, + 0.020322220399975777, + 0.03630701079964638, + 0.014308965764939785, + 0.007825571112334728, + -0.00066066172439605, + -0.006688133347779512, + -0.013308020308613777, + -0.018259664997458458, + 0.003135536564514041, + -0.009569642134010792, + 0.026115568354725838, + -0.007901400327682495, + 0.019093787297606468, + -0.006062542553991079, + -0.0003696672501973808, + 0.020170561969280243, + 0.000715163943823427, + -0.012822713702917099, + -0.004288139753043652, + -0.0057137287221848965, + 0.024068180471658707, + 0.013368683867156506, + 0.028648262843489647, + -0.0013516551116481423, + 0.0020227432250976562, + 0.00605875113978982, + -0.011799019761383533, + 0.019215114414691925, + 0.016712751239538193, + -0.008113722316920757, + 0.03218190371990204, + -0.03239422291517258, + 0.02496296539902687, + -0.02001890353858471, + -0.015370573848485947, + -0.03958282992243767, + -0.0105705875903368, + -0.00940281804651022, + 0.030346836894750595, + 0.05062355846166611, + 0.04434490203857422, + -0.010980064980685711, + 0.02133833058178425, + 0.01804734393954277, + 0.025948744267225266, + -0.015393323265016079, + 0.04291931539773941, + -0.0056682308204472065, + -0.029800865799188614, + -0.01860848069190979, + 0.005262544844299555, + -0.016970569267868996, + -0.0027071016374975443, + -0.03233356028795242, + -0.019381938502192497, + 0.01860848069190979, + 0.0034066257067024708, + -0.012557311914861202, + 0.007893817499279976, + -0.04813636094331741, + 0.03160560131072998, + -0.005717520136386156, + -0.025190452113747597, + -0.003347858088091016, + 0.00264075119048357, + -0.007817988283932209, + 0.00940281804651022, + -0.0018625541124492884, + -0.03973449021577835, + -0.011890014633536339, + 0.011905181221663952, + -0.019321274012327194, + -0.0001368479715893045, + 0.0422823503613472, + 0.0012786694569513202, + 0.00011475087376311421, + -0.0064530628733336926, + -0.03946150466799736, + -0.02039804868400097, + 0.03882453963160515, + 0.013831241987645626, + -0.0005454961210489273, + 0.018487153574824333, + 0.018775304779410362, + 0.026691870763897896, + -0.0007421780610457063, + 0.01333076972514391, + 0.018380992114543915, + 0.03309185430407524, + 0.03579137101769447, + 0.006263489834964275, + -0.002976295305415988, + -0.037368617951869965, + -0.03518473729491234, + -0.01619711145758629, + 0.03991647809743881, + 0.012928875163197517, + -0.01417247299104929, + 0.003010418266057968, + 0.011730773374438286, + -0.0037345869932323694, + 0.016970569267868996, + 0.028572434559464455, + -1.4491963156615384e-05, + 0.013376266695559025, + 0.003347858088091016, + 0.002030326286330819, + -0.001514687784947455, + -0.01103314571082592, + -0.025599930435419083, + -0.007347847335040569, + -0.013163944706320763, + 0.03776292875409126, + -0.0031999913044273853, + -0.0008090025512501597, + -0.0013848303351551294, + 0.011586698703467846, + -0.018729805946350098, + 0.007287183776497841, + 0.019002791494131088, + 0.011518452316522598, + 0.009054004214704037, + 0.021580982953310013, + 0.021171506494283676, + 0.02635822258889675, + -0.035882364958524704, + -0.0003594776790123433, + -0.011541200801730156, + -0.020595204085111618, + -0.0013781952438876033, + -0.00217440165579319, + -0.03949183598160744, + 0.009622722864151001, + 0.020898520946502686, + 0.023294722661376, + 0.009038837626576424, + -0.039795152842998505, + 0.0452851839363575, + -0.026813197880983353, + 0.0051298439502716064, + 0.009038837626576424, + -0.013998066075146198, + -0.004223685245960951, + 0.008576279506087303, + -0.014043563976883888, + -0.022308943793177605, + -0.029315559193491936, + 0.023537376895546913, + 0.017076730728149414, + 0.01853265054523945, + 0.02161131612956524, + -0.020792359486222267, + -0.00039644440403208137, + -0.017152559012174606, + 0.0004677712277043611, + -0.041493725031614304, + -0.002483405638486147, + 0.015924127772450447, + 0.029512716457247734, + -0.014475789852440357, + 0.04243400692939758, + -0.006502351723611355, + -0.012557311914861202, + -0.016242610290646553, + 0.0025535474997013807, + -0.00869760662317276, + -0.050168585032224655, + 0.022945908829569817, + 0.023734532296657562, + -0.02470514550805092, + -0.002204733435064554, + -0.003939325921237469, + -0.024720311164855957, + -0.019017957150936127, + -0.010623667389154434, + 0.0063696508295834064, + -0.014938347972929478, + -0.01121513545513153, + 0.023340221494436264, + 0.028678594157099724, + -0.04947095364332199, + -0.004515627399086952, + -0.0409780889749527, + 0.011715607717633247, + 0.01285304594784975, + -0.019154449924826622, + 0.017471041530370712, + 0.029512716457247734, + -0.015651142224669456, + -0.020807527005672455, + 0.003992406185716391, + 0.018183836713433266, + 0.006305195856839418, + 0.005876761395484209, + -0.001638858113437891, + -0.005103303585201502, + -0.014058729633688927, + -0.015484318137168884, + 0.007730784825980663, + -0.004280556924641132, + -0.003827477805316448, + 0.0022881454788148403, + 0.014627448283135891, + 0.019230280071496964, + 0.05210981145501137, + 0.005292876623570919, + -0.03748994693160057, + 0.005842638202011585, + 0.009099501185119152, + -0.008545948192477226, + -0.029482383280992508, + 0.04701409116387367, + -0.048500340431928635, + 0.0375809408724308, + 0.007321306969970465, + -0.010608501732349396, + -0.009478647261857986, + 0.013778161257505417, + -0.00804547592997551, + 0.01721322350203991, + 0.029254896566271782, + -0.02907290682196617, + 0.01374782994389534, + -0.0038691838271915913, + -0.006926995236426592, + -0.019472932443022728, + 0.007268226705491543, + 0.015067257918417454, + -0.0006763014825992286, + 0.019503263756632805, + 0.018092840909957886, + -0.032788537442684174, + 0.03657999634742737, + -0.010009451769292355, + 0.009895707480609417, + -0.009175330400466919, + -0.043252963572740555, + 0.0017279573949053884, + 0.005804723594337702, + 0.001999994507059455, + -0.007620832417160273, + -0.008955425582826138, + -0.027798976749181747, + 0.022051123902201653, + 0.015757303684949875, + 0.018760139122605324, + 0.007734576240181923, + -0.028375277295708656, + -0.02021605893969536, + 0.02458381839096546, + -0.010176275856792927, + -0.009023671969771385, + -0.028936414048075676, + 0.011010396294295788, + -0.018911797553300858, + -0.020792359486222267, + -0.06272589415311813, + -0.038945864886045456, + 0.025023628026247025, + 0.007359221577644348, + 0.010403763502836227, + -0.023825528100132942, + 0.0035146824084222317, + -0.004894773475825787, + 0.0020530750043690205, + 0.005562070291489363, + ], + "index": 1, + }, + { + "title": "John Baird (Canadian politician)", + "text": "John Russell Baird, PC (born May 26, 1969) served from 2011 to 2015 as Canada's Minister of Foreign Affairs in the cabinet of Prime Minister Stephen Harper. He had been a member of the federal cabinet, in various positions, since 2006. Previously he was a provincial cabinet minister in Ontario during the governments of Premiers Mike Harris and Ernie Eves. Baird resigned from cabinet on February 3, 2015, and as a Member of Parliament on March 16, 2015.", + "vector": [ + -0.010904606431722641, + -0.013850467279553413, + -0.008957103826105595, + 6.772535562049598e-05, + 0.006471754051744938, + 0.02263883501291275, + 0.00030825199792161584, + -0.001327922334894538, + -0.08166854083538055, + 0.05962028354406357, + -0.013105213642120361, + -0.006485815159976482, + -0.03866881877183914, + 0.00401452649384737, + -0.026561962440609932, + 0.01598779857158661, + -0.0026312372647225857, + 0.016395578160881996, + -0.05258959159255028, + -0.032706789672374725, + 0.03509722277522087, + -0.006485815159976482, + 0.007944684475660324, + 0.046093229204416275, + 0.02016402967274189, + 0.025929199531674385, + 0.026758821681141853, + 0.009273485280573368, + 0.002865007845684886, + -0.0007228432223200798, + -0.011277233250439167, + 0.02578858658671379, + 0.046740055084228516, + 0.010932729579508305, + 0.00228321785107255, + -0.004858209751546383, + 0.015678448602557182, + 0.00958283618092537, + -0.02761656604707241, + 0.019278163090348244, + 0.00041283355676569045, + 0.0012874958338215947, + -0.011727198027074337, + -0.01353408582508564, + 0.01056713331490755, + 0.026758821681141853, + -0.06670722365379333, + 0.013154428452253342, + 0.03594090789556503, + -0.017900146543979645, + 0.016072167083621025, + -0.026055751368403435, + -0.013063029386103153, + 0.05416446551680565, + 0.011066311970353127, + 0.00045787394628860056, + 0.04285911098122597, + 0.07221928983926773, + -0.016339333727955818, + -0.006851411424577236, + 0.011213957332074642, + -0.029050827026367188, + 0.003446797840297222, + -0.043618425726890564, + 0.03262241929769516, + 0.10394178330898285, + 0.0028034893330186605, + 0.021949827671051025, + -0.12599003314971924, + 0.004144594073295593, + 0.0149472551420331, + -0.005142952781170607, + 0.038612570613622665, + 0.026632269844412804, + -0.018743829801678658, + 0.009371914900839329, + 0.020923346281051636, + -0.0051605296321213245, + -0.025057394057512283, + -0.011692044325172901, + 0.014651966281235218, + -0.03259429708123207, + 0.01653619296848774, + 0.0120717016980052, + -0.03349422663450241, + -0.048118069767951965, + 0.02183733507990837, + -0.066032275557518, + 0.01046870369464159, + 0.007860315963625908, + -0.038275096565485, + 0.020445257425308228, + 0.06856332719326019, + 0.04280286654829979, + 0.05798916518688202, + 0.0006657188641838729, + -0.012127947062253952, + -0.05188652127981186, + 0.03560343384742737, + -0.04319658502936363, + 0.04254975914955139, + 0.04007495567202568, + 0.014019204303622246, + 0.010243721306324005, + 0.03979372978210449, + -0.027799364179372787, + -0.046290088444948196, + -0.02642134763300419, + 0.012486512772738934, + 0.09111779183149338, + -0.03464725986123085, + 0.04530579224228859, + -0.039090659469366074, + 0.0580454096198082, + 0.006250286940485239, + 0.002372859278693795, + -0.017843902111053467, + 0.016128411516547203, + -0.0012751921312883496, + 0.04148109629750252, + 0.014244185760617256, + -0.03970935940742493, + 0.033184874802827835, + 0.018771953880786896, + -0.01611435040831566, + -0.024073095992207527, + 0.03425354138016701, + 0.00019015830184798688, + 0.015523772686719894, + -0.029753897339105606, + -0.05416446551680565, + 0.03895004466176033, + -0.03619401156902313, + -0.025296436622738838, + -0.004306300077587366, + -0.020895222201943398, + 0.04887738451361656, + 0.005568309687077999, + -0.025422990322113037, + -0.020346827805042267, + 0.04229665547609329, + -0.0051605296321213245, + 0.018040761351585388, + 0.02158423140645027, + 0.02571827918291092, + -0.010820237919688225, + -0.01515817642211914, + 0.0006099127349443734, + -0.017576735466718674, + 0.05756732448935509, + 0.015411281026899815, + 0.03220057860016823, + -0.0077689168974757195, + 0.0038457897026091814, + 0.045418284833431244, + -0.02386217564344406, + 0.011713135987520218, + 0.02696974202990532, + -0.01427230890840292, + 0.02741970680654049, + -0.05596432462334633, + -0.00288609997369349, + -0.00045128268538974226, + 0.039990589022636414, + 0.006313563324511051, + 0.02261071279644966, + -0.008732122369110584, + 0.026786943897604942, + -0.00821888167411089, + 0.01631120964884758, + 0.029838265851140022, + -0.014595720916986465, + 0.013667669147253036, + -0.05883284658193588, + 0.010763992555439472, + -0.01858915574848652, + 0.006854926701635122, + 0.003213027259334922, + -0.027250969782471657, + -0.01768922619521618, + 0.008352464064955711, + -0.01891256682574749, + -0.04350593313574791, + 0.028024345636367798, + -0.04716189578175545, + -0.010897575877606869, + 0.05005853995680809, + -0.007076393347233534, + -0.07266925275325775, + -0.011973272077739239, + 0.015889368951320648, + 0.026533838361501694, + -0.02106395922601223, + -0.007181853987276554, + 0.0642886683344841, + 0.0022709141485393047, + 0.038134485483169556, + 0.03011949360370636, + -0.015284729190170765, + 0.02389029785990715, + 0.0432809516787529, + 0.0055120643228292465, + 0.001624090364202857, + 0.020149968564510345, + 0.02793997898697853, + 0.01295756921172142, + 0.06636974960565567, + -0.02841806598007679, + -0.03366296365857124, + 0.013119274750351906, + 0.059001583606004715, + -0.04735875502228737, + 0.06288252770900726, + 0.02581670880317688, + -0.012535727582871914, + 0.004510190337896347, + 0.03630650416016579, + 0.06794462352991104, + 0.04980543628334999, + 0.0064014471136033535, + -0.02854461781680584, + 0.01245838962495327, + 0.00017807430413085967, + -0.0286430474370718, + 0.03821885213255882, + -0.03571592643857002, + -0.009603927843272686, + -0.014131695032119751, + -0.024073095992207527, + 0.015594079159200191, + 0.013955927453935146, + 0.06833834946155548, + -0.01085539162158966, + 0.0550362728536129, + -0.024607429280877113, + 0.08470579981803894, + 0.005983120761811733, + -0.04190293699502945, + -0.0205155648291111, + -0.008387617766857147, + -0.014806641265749931, + -0.005476910620927811, + -0.032734911888837814, + -0.0263932254165411, + -0.0036489302292466164, + 0.044265247881412506, + -0.019095364958047867, + -0.016929911449551582, + -0.048118069767951965, + 0.03619401156902313, + 0.020853038877248764, + -0.035884663462638855, + 0.013316134922206402, + -0.027236908674240112, + -0.01451135240495205, + -0.02793997898697853, + -0.03082256205379963, + 0.022877877578139305, + 0.0012707979185506701, + 0.014258247800171375, + 0.016972094774246216, + 0.034956611692905426, + 0.015551894903182983, + 0.021049898117780685, + 0.0036629915703088045, + -0.01753455027937889, + -0.022793510928750038, + 4.3145391828147694e-05, + -0.004035618156194687, + -0.03194747492671013, + 0.046543195843696594, + 0.005469880066812038, + 0.03540657460689545, + 0.034787874668836594, + -0.046290088444948196, + 0.021851396188139915, + -0.06456989049911499, + -0.017675165086984634, + -0.018701646476984024, + 0.06226382777094841, + 0.05838288366794586, + 0.013400502502918243, + 0.030710071325302124, + -0.05596432462334633, + -0.008436832576990128, + 0.02674476057291031, + 0.016747113317251205, + -0.003193692769855261, + 0.01183265820145607, + -0.01583312265574932, + -0.01683148182928562, + 0.03281927853822708, + 0.05048038437962532, + -0.031188158318400383, + -0.02176702953875065, + 0.013576270081102848, + -0.020304644480347633, + -0.03644711896777153, + -0.021204574033617973, + 0.06074519827961922, + 0.009189116768538952, + 0.03124440461397171, + -0.0032956379000097513, + -0.055148765444755554, + 0.0237637460231781, + 0.020248398184776306, + -0.034731630235910416, + 0.023004431277513504, + 0.05917032063007355, + -0.004137563519179821, + -0.017703287303447723, + -0.029107073321938515, + 0.019798435270786285, + -0.022484159097075462, + 0.003350125625729561, + 0.006928748916834593, + 0.011755320243537426, + 0.0002416801144136116, + 0.0035399545449763536, + -0.03574404865503311, + 0.01549564953893423, + 0.028685230761766434, + -0.02116238884627819, + 0.002146119251847267, + 0.028825845569372177, + -0.0450245663523674, + 0.03504097834229469, + -0.00017258156731259078, + 0.015903430059552193, + 0.02947266958653927, + 0.027785303071141243, + -0.09145526587963104, + 0.02176702953875065, + 0.012816955335438251, + 0.01037027407437563, + -0.022695079445838928, + -0.02481834962964058, + 0.006056942977011204, + -0.019517207518219948, + 0.03940000757575035, + 0.0008638965082354844, + 0.016353394836187363, + 0.01936253160238266, + -0.013337226584553719, + -0.02241385169327259, + -0.042943477630615234, + 0.039512500166893005, + 0.06023898720741272, + 0.01295756921172142, + -0.01656431518495083, + 0.0005831081653013825, + 0.013358318246901035, + 0.02386217564344406, + -0.021007712930440903, + 0.039540622383356094, + -0.024227771908044815, + -0.057876672595739365, + -0.04820244014263153, + 0.06974448263645172, + 0.016929911449551582, + 0.06310751289129257, + -0.0001834571739891544, + -0.004882817156612873, + 0.07891251146793365, + 0.024044973775744438, + 0.011706105433404446, + 0.0542769581079483, + -0.016015920788049698, + -0.039990589022636414, + -0.00020652663079090416, + -0.014876948669552803, + -0.022245116531848907, + -0.02353876270353794, + 0.010278875008225441, + -0.04370279237627983, + -0.03785325586795807, + -0.07070066034793854, + -0.00042381903040222824, + -0.019643759354948997, + -0.0071923998184502125, + -0.02966952882707119, + 0.00288609997369349, + 0.004102409817278385, + 0.029725775122642517, + 0.005276536103338003, + -0.0136325154453516, + -0.03343798220157623, + 0.008373556658625603, + 0.01460978202521801, + -0.0211342666298151, + 0.004700019024312496, + -0.0008348948904313147, + 0.049299225211143494, + -0.016690867021679878, + -0.025774523615837097, + -0.002490623388439417, + 0.02944454737007618, + -0.03380357846617699, + 0.01898287422955036, + 0.004608619958162308, + -0.03450664505362511, + -0.007269737776368856, + -0.010813207365572453, + -0.0035961999092251062, + 0.012388083152472973, + -0.040187448263168335, + -0.00951955933123827, + -0.059226565062999725, + -0.038162607699632645, + 0.07896875590085983, + 0.008675876073539257, + -0.015889368951320648, + -0.018392296507954597, + 0.04100300744175911, + -0.016367455944418907, + 0.021654536947607994, + 0.013723914511501789, + -0.020782731473445892, + -0.0260135680437088, + -0.00713615445420146, + 0.047246262431144714, + -0.02924768626689911, + -0.02844618819653988, + 0.014919132925570011, + -0.00821888167411089, + 0.04238102212548256, + 0.03760015219449997, + -0.01611435040831566, + 0.03442227840423584, + -0.02154204621911049, + 0.017843902111053467, + -0.031103789806365967, + -0.032088086009025574, + 0.03880942985415459, + -0.016142472624778748, + -0.015945613384246826, + -0.07227553427219391, + -0.006007728166878223, + 0.018518848344683647, + 0.032734911888837814, + 0.014152786694467068, + -0.04046867415308952, + -0.009906248189508915, + 0.014497291296720505, + 0.004629712086170912, + 0.011199895292520523, + -0.026547901332378387, + 0.011066311970353127, + 0.04997417330741882, + 0.060126494616270065, + -0.020768670365214348, + -0.016465885564684868, + -0.0021250273566693068, + -0.016648683696985245, + -0.01279586274176836, + -0.01678929664194584, + -0.025830769911408424, + -0.017590796574950218, + -0.018968813121318817, + -0.028080591931939125, + -0.018125129863619804, + -0.01149518508464098, + -0.02164047583937645, + -0.002720878692343831, + -0.03234119340777397, + -0.03962499275803566, + -0.013133336789906025, + -0.013625484891235828, + -0.01865946128964424, + -0.0017137316754087806, + -0.0043766070157289505, + -0.008408710360527039, + 0.0015898157143965364, + 0.04668380692601204, + 0.016817420721054077, + 0.058551620692014694, + -0.029500791803002357, + -0.004967185202986002, + 0.04572763293981552, + 0.017323629930615425, + -0.006419023498892784, + -0.035012856125831604, + 0.002306067617610097, + 0.017478305846452713, + 0.0477805957198143, + -0.01733769103884697, + -0.06738217175006866, + -0.008401679806411266, + -0.04074990376830101, + -0.02986638806760311, + 0.0022146685514599085, + 0.018771953880786896, + 0.05031164735555649, + -0.013316134922206402, + 0.0076634567230939865, + 0.0041902936063706875, + -0.041115500032901764, + 0.06513234972953796, + 0.03425354138016701, + -0.04434961825609207, + 0.03805011510848999, + 0.04311221465468407, + 0.027757180854678154, + -0.02803840860724449, + -0.007132639177143574, + -0.021331125870347023, + -0.04060928896069527, + -0.012816955335438251, + 0.007276768330484629, + -0.027433767914772034, + -0.0007628303137607872, + 0.03968123719096184, + -0.005754623096436262, + -0.01018044538795948, + 0.011122558265924454, + -0.02363719418644905, + -0.03549094498157501, + -0.007410351652652025, + -0.027785303071141243, + 0.011164742521941662, + 0.04190293699502945, + -0.003916096407920122, + -0.0012831016210839152, + -0.0003882261225953698, + 0.0597890205681324, + 0.020121846348047256, + -0.016423700377345085, + -0.025760462507605553, + -0.017731409519910812, + -0.0038563357666134834, + -0.017168954014778137, + 0.0005593795794993639, + 0.0036454149521887302, + -0.010074984282255173, + -0.01640963926911354, + 0.029950756579637527, + -0.015200360678136349, + -0.01718301698565483, + -0.024930840358138084, + 0.025099577382206917, + 0.0029370724223554134, + -0.005846022162586451, + 0.04032805934548378, + -0.053095802664756775, + -0.006102642510086298, + 0.023060675710439682, + 0.010953821241855621, + -0.014216063544154167, + -0.0013604393461719155, + 0.006257317494601011, + 0.0039653112180531025, + -0.07610023021697998, + -0.017126770690083504, + -0.0012057640124112368, + 0.030935054644942284, + -0.0029528914019465446, + -0.06586354225873947, + 0.028080591931939125, + -0.008549324236810207, + -0.03560343384742737, + -0.0015467526391148567, + -0.035209715366363525, + -0.01482070330530405, + 0.001225098385475576, + -0.012655248865485191, + 0.01030699722468853, + -0.023623131215572357, + 0.002835127292200923, + -0.02919144183397293, + 0.0010449369437992573, + 0.009561743587255478, + 0.006021789275109768, + -0.017872024327516556, + 0.014152786694467068, + -0.00010540548100834712, + -0.010454641655087471, + 0.03731892257928848, + 0.05596432462334633, + -0.011502215638756752, + 0.030906930565834045, + 0.00747362757101655, + -0.0327630341053009, + 0.01756267435848713, + 0.0023007947020232677, + -0.0007470112177543342, + 0.009210209362208843, + -0.017098648473620415, + -0.041115500032901764, + -0.0008471986511722207, + -0.017773594707250595, + -0.023257534950971603, + 0.004425821825861931, + 0.020853038877248764, + 0.01348487101495266, + -0.0025205037090927362, + -0.0001285298785660416, + -0.0450245663523674, + 0.005687831435352564, + 0.021949827671051025, + 0.05098659172654152, + 0.022202931344509125, + 0.01408248022198677, + -0.008043114095926285, + -0.01621278002858162, + -0.029978878796100616, + 0.019924987107515335, + 0.03279115632176399, + -0.009308638982474804, + 0.0009166267118416727, + -0.03740329295396805, + 0.0460369847714901, + 0.0057440767996013165, + 0.007227553520351648, + -0.01183265820145607, + 0.007600180339068174, + 0.04004683345556259, + 0.014862887561321259, + 0.01830792799592018, + 0.0003078125591855496, + 0.006021789275109768, + 0.02356688678264618, + -0.013604393228888512, + -0.01212091650813818, + 0.022484159097075462, + 0.019292224198579788, + 0.01939065381884575, + -0.029585160315036774, + -0.025521419942378998, + 0.060576461255550385, + 0.0022129109129309654, + 0.029360178858041763, + 0.02209044061601162, + -0.02831963635981083, + -0.03231307119131088, + -0.009097717702388763, + 0.025704218074679375, + 0.04668380692601204, + -0.0043379380367696285, + 0.015594079159200191, + -0.0009579320903867483, + 0.03014761582016945, + 0.007782978471368551, + 0.027827486395835876, + 0.012648218311369419, + -0.016353394836187363, + -0.007874377071857452, + 0.009315669536590576, + -0.0647948756814003, + -0.0015616929158568382, + 0.029810141772031784, + -0.010792115703225136, + 0.013210673816502094, + -0.013414564542472363, + -0.005374965723603964, + -0.01279586274176836, + -0.020149968564510345, + -0.014497291296720505, + -0.0027665779925882816, + -0.046796299517154694, + 0.0012400386622175574, + 0.04569951072335243, + -0.051492802798748016, + 0.0009043230093084276, + -0.027982162311673164, + 0.013998111709952354, + 0.02966952882707119, + -0.012156070210039616, + 0.04347781091928482, + -1.3518981177185196e-05, + 0.0010115411132574081, + -0.016353394836187363, + 0.006071004085242748, + -0.017970453947782516, + -0.024227771908044815, + 0.011895934119820595, + -0.013070059940218925, + -0.07728138566017151, + 0.024171525612473488, + 0.02116238884627819, + -0.014553536660969257, + 0.016704928129911423, + -0.04524954780936241, + -0.0312725268304348, + -0.026660392060875893, + 0.025858892127871513, + 0.004049679730087519, + -0.0022252146154642105, + -0.0352659597992897, + -0.02992263436317444, + -0.0156362634152174, + -0.012444328516721725, + -0.019503144547343254, + 0.033016137778759, + 0.02193576470017433, + -0.017520489171147346, + -0.002346494235098362, + 0.0027261516079306602, + -0.03490036353468895, + 0.005083191674202681, + 0.0023746169172227383, + -0.002863250207155943, + -0.02584483101963997, + 0.03970935940742493, + 0.021921703591942787, + -0.016198718920350075, + 0.018068883568048477, + 0.001817434444092214, + -0.04620572179555893, + -0.010960851795971394, + -0.03290364891290665, + 0.006612367928028107, + -0.029163319617509842, + -0.032284945249557495, + -0.0034626168198883533, + 0.025451112538576126, + 0.025662032887339592, + 0.013527055270969868, + -0.05340515077114105, + -0.0069182030856609344, + -0.01280992478132248, + 0.010482764802873135, + 0.035687804222106934, + -0.013224735856056213, + 0.03279115632176399, + 0.02158423140645027, + 0.014778519049286842, + 0.013611423783004284, + -0.03394418954849243, + -0.022174809128046036, + 0.01482070330530405, + -0.010236690752208233, + 0.006570183672010899, + 0.0017225199844688177, + -0.003554015886038542, + 0.04167795553803444, + 0.02681506611406803, + -0.044996440410614014, + 0.012606034055352211, + 0.0007320709992200136, + 0.042943477630615234, + 0.02369343861937523, + -0.01730956882238388, + -0.0033044260926544666, + -0.01711270958185196, + -0.016676805913448334, + 0.012627126649022102, + -0.033634841442108154, + -0.03104754537343979, + -0.009512528777122498, + 0.019629698246717453, + 0.013351287692785263, + -0.003898519789800048, + -0.0066756438463926315, + -0.0029933180194348097, + -0.01718301698565483, + 0.01903911866247654, + -0.042015425860881805, + -0.044462110847234726, + 0.020768670365214348, + 0.004119986668229103, + 0.029360178858041763, + -0.01593155227601528, + 0.0050620995461940765, + -0.010103107430040836, + 0.022681018337607384, + 0.01059525553137064, + 0.05067724362015724, + -0.004000464919954538, + 0.014398861676454544, + 0.01615653559565544, + 0.0010256024543195963, + -0.0337754525244236, + 0.0049144551157951355, + 0.027377523481845856, + 0.062151335179805756, + -0.00747362757101655, + -0.017323629930615425, + 0.014054357074201107, + -0.02273726463317871, + -0.0036454149521887302, + 0.004555889870971441, + 0.0038352436386048794, + -0.017393937334418297, + -0.002669906010851264, + -0.04010307788848877, + -0.05531750246882439, + -0.009723450057208538, + 0.027855610474944115, + -0.002471288898959756, + -0.03324112296104431, + 0.012528697028756142, + -0.02176702953875065, + -0.017295507714152336, + 0.0003060548915527761, + 0.01631120964884758, + -0.023102860897779465, + -0.06445740163326263, + -0.023749684914946556, + -0.013027875684201717, + -0.04550265148282051, + -0.023946544155478477, + 0.015537833794951439, + 0.008338402956724167, + 0.0031005360651761293, + 0.057876672595739365, + -0.03487224131822586, + 0.019320346415042877, + 0.006014758720993996, + -0.02706817165017128, + 0.003750875359401107, + 0.0010572406463325024, + -0.019179733470082283, + 0.027700934559106827, + 0.029528914019465446, + 0.007097485475242138, + 0.024410570040345192, + -0.01656431518495083, + 0.017168954014778137, + -0.03456289321184158, + -0.03537845239043236, + -0.028108714148402214, + -0.005754623096436262, + 0.02941642329096794, + -0.019320346415042877, + -0.031385019421577454, + -3.257188654970378e-05, + -0.005055068992078304, + -0.0021900611463934183, + 0.009062564931809902, + 0.032988015562295914, + -0.0075439345091581345, + -0.00928051583468914, + -0.04058116674423218, + -0.0018859836272895336, + -0.0017383390804752707, + 0.008830551989376545, + 0.017604857683181763, + -0.008907889015972614, + 0.0290227048099041, + 0.04094676300883293, + 0.03175061568617821, + -0.04229665547609329, + -0.0227653868496418, + -0.008457925170660019, + 0.009871094487607479, + 0.0034977702889591455, + -0.016803359612822533, + -0.018898505717515945, + 0.004179747775197029, + -0.01020856760442257, + -0.026983803138136864, + -0.024649612605571747, + -0.02771499566733837, + 0.03124440461397171, + 0.0031550240237265825, + 0.0029687106143683195, + 0.012964599765837193, + 0.04007495567202568, + -0.029838265851140022, + -0.016578376293182373, + -0.005568309687077999, + 0.006042881403118372, + -0.039315640926361084, + 0.039962463080883026, + -0.0002139967546099797, + 0.0078181317076087, + 0.0041902936063706875, + -0.046740055084228516, + 0.012036547996103764, + -0.011825627647340298, + 0.032931771129369736, + 0.049242980778217316, + 0.030007002875208855, + 0.013280981220304966, + -0.003691114252433181, + -0.021752966567873955, + 0.009892186149954796, + 0.012591972947120667, + 0.041284237056970596, + 0.03214433416724205, + -0.01290835440158844, + -0.011502215638756752, + -0.017492366954684258, + 0.0017989788902923465, + 0.011959210969507694, + -0.00839464832097292, + -0.013815313577651978, + 0.026182305067777634, + -0.0026154182851314545, + -0.009477376006543636, + 0.010412457399070263, + 0.020276522263884544, + -0.009449252858757973, + -0.012451359070837498, + -0.020796792581677437, + -0.018406357616186142, + -0.008563385345041752, + 0.020192153751850128, + -0.004735172260552645, + -0.024326201528310776, + 0.011228018440306187, + -0.0075861187651753426, + 0.022793510928750038, + 0.0028720383998006582, + 0.009097717702388763, + 0.003559288801625371, + 0.02841806598007679, + 0.02398872748017311, + 0.006760012358427048, + -0.0005092858918942511, + -0.024199649691581726, + -0.024298079311847687, + 0.0015783908311277628, + 0.015945613384246826, + 0.019896864891052246, + 0.005547217559069395, + -0.02148580178618431, + 0.014019204303622246, + -0.011790473945438862, + 0.030428843572735786, + -0.0017251565586775541, + 0.003191935131326318, + -0.08223100006580353, + -0.030850686132907867, + 0.0053257509134709835, + 0.006837349850684404, + -0.03335361182689667, + -0.02045932039618492, + 0.01576281525194645, + 0.037234555929899216, + -0.003877427661791444, + -0.004295754246413708, + 0.00011732470738934353, + -0.011312386952340603, + -0.015003501437604427, + -0.028361819684505463, + 0.026252610608935356, + -0.0053046587854623795, + -0.0034678897354751825, + -0.0006011243676766753, + -0.004418791271746159, + 0.004942577797919512, + -0.043337199836969376, + -0.030428843572735786, + 0.014680089429020882, + -0.013688761740922928, + -0.0156362634152174, + -0.02344033308327198, + -0.013520024716854095, + 5.500968836713582e-05, + 0.029528914019465446, + 0.0006169434054754674, + 0.016240904107689857, + -0.004109440837055445, + -0.010672593489289284, + 0.014680089429020882, + -0.04342156648635864, + -0.006974448449909687, + -0.004028587602078915, + -0.009013350121676922, + -0.00474571855738759, + -0.022034194320440292, + -0.05498002842068672, + -0.0036278381012380123, + 0.00041019704076461494, + 0.006665098015218973, + -0.030935054644942284, + -0.020220275968313217, + -0.030456965789198875, + -0.009449252858757973, + 0.015565956942737103, + -0.008739152923226357, + -0.023679377511143684, + 0.015875307843089104, + 0.009871094487607479, + 0.029557038098573685, + 0.011080374009907246, + -0.007403320632874966, + 0.024551182985305786, + 0.010264812968671322, + 0.017225200310349464, + 0.030288230627775192, + -0.0377688892185688, + -0.01319661270827055, + 0.04235289990901947, + 0.06951950490474701, + 0.005026946309953928, + 0.02799622341990471, + -0.02561984956264496, + -0.010391365736722946, + -0.05849537253379822, + -0.019728127866983414, + 0.03197559714317322, + 0.021556107327342033, + 0.017000218853354454, + -0.025999506935477257, + 0.023482518270611763, + 0.0045629204250872135, + -0.011073343455791473, + 0.02453712187707424, + -0.0005418028449639678, + 0.009892186149954796, + -0.015130053274333477, + 0.014694150537252426, + -0.0296414066106081, + 0.03686895966529846, + -0.0017515216022729874, + 0.05410822108387947, + -0.014314493164420128, + 0.009160994552075863, + 0.005719469394534826, + 0.03144126385450363, + -0.01593155227601528, + -0.006475269328802824, + -0.018406357616186142, + -0.06113891676068306, + 0.04980543628334999, + -0.005708923563361168, + 0.013836406171321869, + -0.011551430448889732, + -0.010482764802873135, + 0.010510887950658798, + 0.006127249915152788, + 0.020051538944244385, + -0.023595008999109268, + 0.014919132925570011, + 0.006907656788825989, + -0.01678929664194584, + -0.019868740811944008, + 0.0038739123847335577, + 0.011776412837207317, + 0.01353408582508564, + -0.0014122906140983105, + -0.011635798960924149, + -7.86009622970596e-05, + -0.007501750718802214, + 0.016465885564684868, + 0.030231984332203865, + -0.0003910823434125632, + 0.011966241523623466, + 0.0070482706651091576, + -0.028882091864943504, + 0.001054604072123766, + -0.006946325767785311, + -0.021471738815307617, + 0.04910236597061157, + 0.0032675149850547314, + 0.01695803366601467, + 0.02308879978954792, + -0.002710332628339529, + 0.010904606431722641, + -0.03141314163804054, + -0.031834982335567474, + 0.017014279961586, + -0.022877877578139305, + -0.04035618528723717, + -0.043393444269895554, + 0.01933440938591957, + 0.017253322526812553, + 0.033156752586364746, + 0.002133815549314022, + -0.012606034055352211, + -0.00032209366327151656, + 0.015945613384246826, + 0.013843436725437641, + 0.012247469276189804, + -0.016817420721054077, + 0.046093229204416275, + 0.03450664505362511, + 0.007593149784952402, + 0.003075928660109639, + 0.03101942129433155, + 0.010131229646503925, + -0.010827268473803997, + 0.0004600710526574403, + 0.01846260204911232, + -0.009871094487607479, + -0.00016939578927122056, + 0.004119986668229103, + 0.028375880792737007, + 0.02941642329096794, + 0.0066756438463926315, + 0.012036547996103764, + -0.05666739493608475, + 0.017520489171147346, + 0.0009535378776490688, + 0.01996717043220997, + -0.012613065540790558, + -0.010314027778804302, + -0.01539721991866827, + 0.0034098864998668432, + 0.01598779857158661, + -0.005357388872653246, + -0.00821888167411089, + -0.0062362258322536945, + -0.0027384553104639053, + 0.006907656788825989, + 0.041115500032901764, + -0.03490036353468895, + -0.02876959927380085, + 0.007403320632874966, + 0.0005659708986058831, + -0.016972094774246216, + 0.013618454337120056, + -0.026336979120969772, + -0.0010352696990594268, + -0.021626414731144905, + 0.018476663157343864, + -0.044715214520692825, + -0.02594326063990593, + -0.013815313577651978, + 9.299191151512787e-05, + -0.006222164258360863, + 0.01529879029840231, + 0.009610958397388458, + -5.599837822956033e-05, + -0.019826557487249374, + -0.016901789233088493, + 0.0022181840613484383, + -0.009976554661989212, + 0.027630627155303955, + -0.015130053274333477, + 0.01708458736538887, + -0.02947266958653927, + 0.01217013131827116, + -0.0013692276552319527, + 0.012823985889554024, + -0.0005092858918942511, + 0.013372380286455154, + 0.010581194423139095, + 0.005782745778560638, + -0.014483229257166386, + 0.012627126649022102, + 0.0007641485426574945, + 0.033634841442108154, + -0.0007166913710534573, + 0.016648683696985245, + -0.010440580546855927, + -0.004759779665619135, + -0.005884690675884485, + 0.015467527322471142, + -0.010925698094069958, + -0.0205155648291111, + 0.048146191984415054, + 0.01830792799592018, + 0.017450181767344475, + 0.013428625650703907, + -0.015031623654067516, + -0.024649612605571747, + 0.0008225911878980696, + -0.0024765620473772287, + -0.005181621294468641, + -0.015903430059552193, + 0.00671782810240984, + 0.0052062286995351315, + 0.01377312932163477, + 0.002154907677322626, + -0.0008072115597315133, + -0.03357859328389168, + 0.0043976991437375546, + -0.013098183088004589, + -0.01070774719119072, + 0.00532926619052887, + 0.004067256581038237, + -0.019053181633353233, + 0.008626661263406277, + -0.014891009777784348, + -0.011776412837207317, + -0.009793756529688835, + -0.0017321872292086482, + 0.014891009777784348, + -0.020121846348047256, + -0.026111997663974762, + -0.022554466500878334, + 0.0051394375041127205, + -0.012395113706588745, + 0.0014975378289818764, + 0.0013885620282962918, + -0.028347758576273918, + 0.008211850188672543, + 0.04741499945521355, + -0.01598779857158661, + 0.018518848344683647, + 0.001421957858838141, + -0.026449471712112427, + 0.0237637460231781, + 0.008134513162076473, + -0.03625025972723961, + -0.000981660676188767, + -0.013330196030437946, + 0.04620572179555893, + 0.0009675992769189179, + -0.017225200310349464, + -0.003740329295396805, + -0.022695079445838928, + -0.0057440767996013165, + -0.0030987784266471863, + 0.00865478441119194, + -0.006042881403118372, + -0.014110603369772434, + -0.009892186149954796, + -0.005737046245485544, + -0.014244185760617256, + -0.007860315963625908, + 0.006781104486435652, + -0.04344968870282173, + -0.013372380286455154, + -0.03968123719096184, + -0.010925698094069958, + -0.005768684670329094, + 0.00021201936760917306, + 7.9205165093299e-05, + 0.02058587223291397, + 0.03262241929769516, + 0.04454647749662399, + 0.0012751921312883496, + 0.023960605263710022, + -0.008767275139689445, + 0.013351287692785263, + 0.013224735856056213, + 0.005610493943095207, + -0.033859822899103165, + -0.002720878692343831, + -0.021021775901317596, + -0.010918667539954185, + 0.0014861129457131028, + 0.020473381504416466, + -0.045783881098032, + 0.0061377957463264465, + 0.005543702282011509, + -0.026083875447511673, + 0.00671782810240984, + 0.02176702953875065, + 0.01284507755190134, + -0.012725556269288063, + -0.022259177640080452, + -0.019151611253619194, + 0.01176938135176897, + -0.031610000878572464, + 0.012106855399906635, + 0.009983585216104984, + 0.004186778329312801, + -0.005874144844710827, + -0.0005848658620379865, + -0.029107073321938515, + 0.009899217635393143, + -0.05180215463042259, + 0.01252166647464037, + -0.006868988275527954, + 0.0038809431716799736, + -0.004861725028604269, + 0.007825162261724472, + -0.004932031966745853, + 0.013252858072519302, + 0.016620561480522156, + 0.008577446453273296, + -0.0034995279274880886, + 0.0025978414341807365, + -0.0005084070726297796, + 0.00807826779782772, + 0.024396508932113647, + -0.0034204325638711452, + 0.011410816572606564, + -0.022006072103977203, + 0.025324560701847076, + 0.0015836638631299138, + 0.020445257425308228, + -0.027630627155303955, + 0.0025310497730970383, + -0.008486047387123108, + -0.03467538207769394, + 0.015326913446187973, + 0.001086242264136672, + -0.00047545068082399666, + -0.011551430448889732, + -0.008071236312389374, + -0.024382447823882103, + -0.0015757542569190264, + -0.012184192426502705, + 0.01775953359901905, + 0.011860780417919159, + -0.005962028633803129, + -0.03917502611875534, + 0.007895469665527344, + 0.017014279961586, + -0.0016680321423336864, + 0.025760462507605553, + -0.009484406560659409, + -0.03580029308795929, + 0.0011064554564654827, + 0.0005026946309953928, + 0.012142008170485497, + -0.032931771129369736, + -0.01549564953893423, + -0.009596897289156914, + -0.00019773826352320611, + 0.012205285020172596, + -0.002448439132422209, + 0.0010959093924611807, + 0.03461913764476776, + 0.0215139240026474, + -0.02081085368990898, + 1.4088851457927376e-05, + 0.010749931447207928, + 0.020107785239815712, + 0.008043114095926285, + 0.026801005005836487, + -0.023370027542114258, + 0.01978437229990959, + -0.004067256581038237, + 0.02816496044397354, + -0.014905070886015892, + -0.039259396493434906, + -0.00011545718007255346, + -0.03616588935256004, + -0.00642253877595067, + -0.027658751234412193, + -0.037290800362825394, + 0.006686190143227577, + -0.0021355734206736088, + 0.006724858656525612, + -0.0052870819345116615, + 0.012767740525305271, + -0.03056945838034153, + -0.025212068110704422, + -0.0009043230093084276, + 0.0013015571748837829, + -0.015369096770882607, + -0.023355966433882713, + -0.00802905298769474, + -0.01576281525194645, + -0.0017567946342751384, + 0.027560319751501083, + -0.030681949108839035, + 0.006485815159976482, + -0.008950073271989822, + -0.02816496044397354, + 0.017028341069817543, + 0.03194747492671013, + 0.02924768626689911, + 0.024452753365039825, + 0.0026962710544466972, + -7.816154538886622e-05, + 0.015256606042385101, + -0.04046867415308952, + 0.004468006081879139, + 0.014455107040703297, + -0.0029511337634176016, + 0.008647753857076168, + -0.008324341848492622, + 0.051099084317684174, + -0.023552825674414635, + -0.03796574845910072, + -0.049242980778217316, + 0.015003501437604427, + 0.0068408651277422905, + 0.030935054644942284, + 0.014525413513183594, + -0.01791420765221119, + -0.014876948669552803, + 0.004608619958162308, + -0.030288230627775192, + 0.009857033379375935, + -0.04645882546901703, + -0.00642253877595067, + 0.01683148182928562, + -0.016353394836187363, + 0.022006072103977203, + -0.005582371260970831, + -0.009885155595839024, + 0.019826557487249374, + 0.042212288826704025, + -0.007347075268626213, + 0.013857497833669186, + 0.035856541246175766, + -0.018125129863619804, + 0.003063624957576394, + 0.02944454737007618, + -0.00610967306420207, + -0.044687092304229736, + 0.004886332433670759, + 0.006995540577918291, + 0.013512994162738323, + 0.021373309195041656, + 0.0038317283615469933, + -0.05416446551680565, + -0.006601821631193161, + 0.015565956942737103, + -0.01266931090503931, + 0.033381734043359756, + 0.007853285409510136, + 0.014194970950484276, + -0.005719469394534826, + -0.005399573128670454, + -0.012922415509819984, + 0.050845980644226074, + -0.04921485856175423, + 0.006141311023384333, + -0.016901789233088493, + -0.0201359074562788, + 0.010623378679156303, + -4.122293830732815e-05, + 0.011586584150791168, + 0.021078020334243774, + -0.006580729503184557, + -0.03844383358955383, + -0.0007878771284595132, + 0.02992263436317444, + 0.017604857683181763, + -7.73925639805384e-05, + -0.024930840358138084, + -0.01653619296848774, + 0.00807826779782772, + 0.009139901958405972, + 0.024002788588404655, + 0.03605340048670769, + 0.015889368951320648, + 0.026801005005836487, + 0.001059877104125917, + -0.0006683553801849484, + -0.044293373823165894, + 0.0037051758263260126, + 0.008471986278891563, + -0.015945613384246826, + 0.05320829153060913, + -0.026196366176009178, + -0.005789776332676411, + -0.026210427284240723, + 0.002522261580452323, + -5.503715146915056e-05, + 0.00899225752800703, + -0.026055751368403435, + 0.0029370724223554134, + -0.005673769861459732, + 0.04370279237627983, + 0.02588701620697975, + -0.009660173207521439, + 0.024354323744773865, + -0.05213962867856026, + -0.02254040539264679, + 0.018195435404777527, + -0.021218635141849518, + -0.002724393969401717, + 0.028432127088308334, + 0.01020856760442257, + -0.024776166304945946, + -0.0012874958338215947, + 0.01566438563168049, + 0.022399790585041046, + -0.0071045164950191975, + -0.012261530384421349, + -0.021443616598844528, + -0.011270202696323395, + 0.0019105911487713456, + 0.02424183301627636, + 0.01718301698565483, + 0.013955927453935146, + 0.0025802648160606623, + 0.002348251873627305, + 0.011488153599202633, + -0.008732122369110584, + 0.016592437401413918, + -0.02732127718627453, + -0.016690867021679878, + -0.039512500166893005, + -0.0019088333938270807, + -0.014497291296720505, + 0.015903430059552193, + 0.02093740738928318, + -0.004239508416503668, + 0.015214421786367893, + 0.020332766696810722, + -0.022343546152114868, + 0.02006560005247593, + 0.012767740525305271, + -0.001448323018848896, + -0.011087404564023018, + -0.002351767150685191, + -0.015214421786367893, + -0.0058038379065692425, + -0.006513937842100859, + 0.02584483101963997, + 0.007452535443007946, + 0.011213957332074642, + 0.018701646476984024, + 0.02691349759697914, + -0.0003888852661475539, + -0.0069006262347102165, + 0.015369096770882607, + -0.010574163869023323, + -0.0019932016730308533, + -0.014834764413535595, + 0.004932031966745853, + -0.005332781467586756, + -0.007101000752300024, + -0.0012127946829423308, + -0.023876236751675606, + -0.017590796574950218, + 0.018926627933979034, + 0.03785325586795807, + 0.00958283618092537, + -0.006120219361037016, + -0.025071455165743828, + -0.021823273971676826, + 0.011959210969507694, + 0.08296219259500504, + -0.024354323744773865, + -0.010503856465220451, + -0.024129342287778854, + -0.018392296507954597, + 0.04148109629750252, + -0.0016653956845402718, + -0.02341221086680889, + -0.011129588820040226, + 0.019700003787875175, + -0.02353876270353794, + 0.004081317689269781, + 0.0014456864446401596, + -0.013737976551055908, + -0.01881413720548153, + 0.005888206418603659, + 0.02793997898697853, + -0.006833834573626518, + -0.0056386166252195835, + -0.002733182394877076, + -0.015101931057870388, + 0.0038387589156627655, + 0.03307238593697548, + -0.0027472437359392643, + 0.02549329586327076, + -0.014581659808754921, + -0.006584244780242443, + 0.021429555490612984, + -0.006802196614444256, + 0.03312863036990166, + 0.010813207365572453, + ], + "index": 2, + }, + { + "title": "The 80s: A Look Back at the Tumultuous Decade 1980-1989", + "text": "The 80s: A Look Back at the Tumultuous Decade 1980-1989 is a humor book published in 1979.It was edited by Tony Hendra, Christopher Cerf and Peter Elbling, with art direction by Michael Gross. Contributors to the book included Henry Beard, Valerie Curtin, Amy Ephron, Jeff Greenfield, Abbie Hoffman, Sean Kelly, B.", + "vector": [ + -0.00752367964014411, + -0.0036515758838504553, + -0.04269421845674515, + -0.051015473902225494, + -0.01003402378410101, + -0.06568793952465057, + -0.009151911363005638, + 0.026492761448025703, + -0.03531388193368912, + 0.05613172426819801, + 0.01989162340760231, + 0.009004892781376839, + 0.009732634760439396, + 0.048427946865558624, + -0.021861674264073372, + -0.04534055292606354, + -0.03152079880237579, + -0.0022604118566960096, + 0.02966836467385292, + 0.01473862025886774, + 0.02199399098753929, + 0.004836913663893938, + -0.07174510508775711, + -0.018553754314780235, + -0.012084933929145336, + 0.012423076666891575, + 0.019303549081087112, + 0.026816202327609062, + -0.009887004271149635, + 0.04525234177708626, + 0.008291852660477161, + 0.00430029584094882, + 0.04181210696697235, + -0.007240668870508671, + -0.03649003058671951, + 0.015951523557305336, + -0.026875009760260582, + 0.06004241853952408, + -0.00876966305077076, + -0.04772225767374039, + 0.030491668730974197, + -0.01959758624434471, + -0.009129858575761318, + -0.01708356849849224, + -0.010945538990199566, + -0.027786526829004288, + -0.02728666178882122, + -0.02240564301609993, + 0.00441055977717042, + -0.013841806910932064, + 0.013937368988990784, + -0.021846972405910492, + 0.011798246763646603, + -0.010600045323371887, + -0.01692184805870056, + -0.016598407179117203, + 0.03290277719497681, + 0.008262448944151402, + -0.0019094047602266073, + -0.06509985774755478, + 0.005807236768305302, + -0.012974396347999573, + 0.029242010787129402, + -0.012621551752090454, + 0.05033918842673302, + 0.02434629015624523, + -0.023287754505872726, + 0.04657550901174545, + -0.0026977923698723316, + 0.02516959421336651, + 0.025845879688858986, + 0.00739503838121891, + 0.05172116309404373, + 0.03507865220308304, + 0.05889567360281944, + -0.0013718678383156657, + -0.016730723902583122, + 0.035990167409181595, + -0.07309767603874207, + -0.03402011841535568, + -0.008938734419643879, + -0.03748975694179535, + -0.009600318036973476, + -0.016098542138934135, + -0.036107782274484634, + -0.009365088306367397, + 0.027742421254515648, + -0.07192152738571167, + 0.0064541189931333065, + 0.050809647887945175, + 0.0504273995757103, + -0.011445402167737484, + 0.023537686094641685, + -0.013805052265524864, + 0.02250855602324009, + -0.02512548863887787, + 0.009695880115032196, + 0.045722801238298416, + 0.019171232357621193, + -0.040459536015987396, + 0.02480204775929451, + 0.018318524584174156, + -0.018303822726011276, + -0.014415179379284382, + 0.03431415557861328, + -0.02744838409125805, + -0.04869258031249046, + 0.020464997738599777, + 0.03940099850296974, + 0.046310875564813614, + -0.0014692676486447453, + -0.041077014058828354, + -0.015628082677721977, + 0.007747883442789316, + -0.019303549081087112, + 0.023199543356895447, + 0.028683340176939964, + 0.004006258212029934, + -0.028154073283076286, + 0.0345199815928936, + 0.0016355825355276465, + -0.019038915634155273, + 0.025346016511321068, + 0.0859765112400055, + 0.01470921654254198, + 0.01709827035665512, + -0.020641420036554337, + -0.02743368223309517, + -0.015789803117513657, + -0.009717932902276516, + -0.025934090837836266, + 0.020714929327368736, + 0.03657824173569679, + 0.04763404652476311, + 0.005255917087197304, + 0.008387414738535881, + 0.006009387783706188, + -0.030462265014648438, + 0.03210887312889099, + -0.021832270547747612, + -0.0014113790821284056, + 0.06268875300884247, + 0.06509985774755478, + -0.015936821699142456, + -0.03534328565001488, + -0.0394304022192955, + -0.005741078406572342, + 0.06198306754231453, + -0.020729631185531616, + -0.008380063809454441, + -0.025875283405184746, + -0.008402116596698761, + 0.03757796809077263, + 0.0012165793450549245, + -0.027757123112678528, + -0.003335485700517893, + -0.027727719396352768, + -0.0016962277004495263, + -0.00213177059777081, + 0.007214940618723631, + -0.03696049004793167, + 0.008203641511499882, + -0.026345742866396904, + -0.010526536032557487, + 0.025566544383764267, + -0.05769012123346329, + 0.0026996301021426916, + 0.007192887831479311, + 0.00843887124210596, + 0.0298300851136446, + 0.03963622823357582, + -0.0027676261961460114, + -0.004844264592975378, + 0.004612710326910019, + -0.00020525182480923831, + 0.04948648065328598, + 0.009784091264009476, + 0.021523531526327133, + 0.024213973432779312, + -0.015775101259350777, + -0.00216117431409657, + 0.03210887312889099, + -0.013812403194606304, + -0.03002120926976204, + -0.02469913475215435, + -0.02758070081472397, + 0.02246445044875145, + 0.02469913475215435, + 0.02733076922595501, + -0.038254253566265106, + 0.020553208887577057, + 0.0038482132367789745, + -0.000869247829541564, + 0.0450759194791317, + 0.001313060405664146, + -0.0033998063299804926, + -0.030491668730974197, + -0.00868145190179348, + -0.0657467469573021, + -0.04728119820356369, + -0.021214792504906654, + 0.00747957406565547, + 0.03443177044391632, + -0.020729631185531616, + 0.01490769162774086, + 0.051015473902225494, + -0.023552387952804565, + 0.005402935668826103, + -0.032961584627628326, + -0.003239923622459173, + 0.04413500055670738, + -0.04731060564517975, + -0.013327240943908691, + 0.01971520110964775, + -0.061042144894599915, + 0.009835547767579556, + 0.018936002627015114, + 0.012121688574552536, + 0.05971897765994072, + 0.00745384581387043, + 0.018744878470897675, + -0.007615566253662109, + -0.007211265154182911, + 0.018612561747431755, + -0.05613172426819801, + -0.010247200727462769, + -0.023611195385456085, + 0.028198178857564926, + 0.0016704994486644864, + -0.033049795776605606, + -0.0006684754625894129, + 0.023978743702173233, + -0.047869276255369186, + 0.004109171684831381, + 0.025522438809275627, + 0.06939280778169632, + -0.03469640389084816, + -0.0067224279046058655, + 0.004822211805731058, + 0.06245352700352669, + 0.060806915163993835, + -0.003012044820934534, + -0.04181210696697235, + -0.014598952606320381, + 0.06480582058429718, + -0.013731542974710464, + -0.005252241622656584, + -0.02489025890827179, + -0.036107782274484634, + -0.014135844074189663, + 0.01975930668413639, + 0.009225420653820038, + 0.03003591112792492, + 0.008343309164047241, + 0.0355491116642952, + 0.020803140476346016, + 0.018200909718871117, + 0.009784091264009476, + -0.02208220213651657, + 0.018245015293359756, + -0.0009482703171670437, + 0.013158169575035572, + -0.00215749884955585, + 0.008181587792932987, + -0.011915862560272217, + 0.012974396347999573, + -0.008431520313024521, + -0.04207674041390419, + -0.010306008160114288, + -0.08938734233379364, + -0.021846972405910492, + -0.043517522513866425, + 0.023273052647709846, + 0.016010330989956856, + 0.012540691532194614, + 0.038842327892780304, + 0.003412670688703656, + 0.03234410285949707, + -0.0038004321977496147, + 0.02218511514365673, + 0.0449289008975029, + -0.014466635882854462, + -0.028859762474894524, + -0.03257933259010315, + -0.006773884408175945, + 0.028256986290216446, + 0.00015184270159807056, + -0.053132541477680206, + -0.0299771036952734, + -0.0035486628767102957, + 0.00876231212168932, + 0.02212630771100521, + 0.01470186561346054, + 0.04207674041390419, + 0.0038114585913717747, + -0.0016686617163941264, + 0.020920755341649055, + -0.0022530609276145697, + -0.057954754680395126, + 0.018392033874988556, + 0.07121583819389343, + 0.043664541095495224, + -0.05195639282464981, + 0.014540145173668861, + -0.04469367116689682, + 0.009982566349208355, + 0.0008504110155627131, + 0.05016276612877846, + -0.028359899297356606, + -0.03763677552342415, + -0.031167956069111824, + 0.015378151088953018, + -0.028359899297356606, + -0.0501333624124527, + 0.04201793298125267, + -0.009945811703801155, + 0.0589250773191452, + -0.02446390502154827, + -0.0009932947577908635, + -0.029183203354477882, + 0.05713145062327385, + -0.030991533771157265, + -0.061277374625205994, + 0.006233591120690107, + 0.011121961288154125, + -0.019141828641295433, + 0.06001301482319832, + -0.007211265154182911, + -0.025787072256207466, + 0.015289939939975739, + -0.05283850431442261, + 0.046399086713790894, + -0.043546926230192184, + 0.04745762422680855, + 0.0009602155769243836, + 0.0037857303395867348, + -0.055631861090660095, + -0.0025029927492141724, + -0.023170139640569687, + 0.010283955372869968, + 0.024228675290942192, + 0.04654610529541969, + 0.002914644777774811, + 0.033049795776605606, + 0.015348747372627258, + -0.08774073421955109, + -0.014194651506841183, + 0.01978871040046215, + -0.007997814565896988, + -0.026081109419465065, + 0.0007677130633965135, + -0.02743368223309517, + 0.005252241622656584, + -0.017906872555613518, + 0.011408647522330284, + 0.02511078678071499, + 0.021685251966118813, + -0.050868455320596695, + 0.04869258031249046, + 0.03010942041873932, + 0.009938460774719715, + -0.046193260699510574, + 0.020582612603902817, + 0.031285569071769714, + -0.021023668348789215, + -0.0392833836376667, + -0.05771952494978905, + -0.03425534814596176, + -0.033079199492931366, + -0.016363175585865974, + 0.015319343656301498, + -0.036254800856113434, + -0.07356813549995422, + -0.019009511917829514, + 0.020670823752880096, + 0.0346670001745224, + -0.004917773883789778, + -0.0174070093780756, + 0.005391909275203943, + 0.014518092386424541, + -0.027668911963701248, + -0.003482504514977336, + 0.03269694745540619, + 0.01485623512417078, + -0.014326968230307102, + -0.01743641309440136, + -0.04145926237106323, + 0.041106417775154114, + 0.002403754973784089, + -0.019303549081087112, + 0.004671517759561539, + -0.021200090646743774, + -0.08174237608909607, + -0.021802866831421852, + -0.041106417775154114, + -0.018803685903549194, + -0.012621551752090454, + 0.06280636787414551, + 0.022979015484452248, + 0.030932726338505745, + -0.006689348723739386, + 0.033432044088840485, + 0.012136390432715416, + -0.0012689548311755061, + 0.00747222313657403, + 0.020523805171251297, + -0.00426354119554162, + -0.035813745111227036, + 0.0177745558321476, + 0.0449289008975029, + -0.014143195003271103, + -0.002001291373744607, + -0.017950978130102158, + 0.005138302221894264, + 0.009460650384426117, + 0.06221829727292061, + -0.022831996902823448, + 0.025772370398044586, + 0.048604369163513184, + 0.00742811756208539, + 0.012136390432715416, + 0.03710750862956047, + 0.026669183745980263, + -0.03413773328065872, + -0.023361263796687126, + 0.018818387761712074, + -0.010725011117756367, + -0.03707810491323471, + 0.022846698760986328, + -0.01483418233692646, + 0.002881565596908331, + -0.001524399733170867, + -0.012871483340859413, + -0.023919936269521713, + 0.011687982827425003, + -0.04201793298125267, + -0.02280259318649769, + 0.018142102286219597, + 0.03513745963573456, + 0.03531388193368912, + 0.022920208051800728, + -0.004020960070192814, + -0.04010669142007828, + 0.021464724093675613, + -0.02499317191541195, + 0.0012367944000288844, + -0.04275302588939667, + 0.001747684320434928, + 0.0201562587171793, + -0.0401654988527298, + -0.006321802269667387, + -0.02762480638921261, + -0.009372439235448837, + 0.045840416103601456, + 0.02719845063984394, + 0.02439039573073387, + 0.009857600554823875, + -0.04698716104030609, + 0.016466090455651283, + -0.009600318036973476, + -0.004542876500636339, + 0.03969503566622734, + 0.016569003462791443, + -0.04904542490839958, + -0.04672252759337425, + -0.05630814656615257, + 0.005292671732604504, + 0.023390667513012886, + -0.028551023453474045, + 0.020935457199811935, + -0.000878436490893364, + 0.012989098206162453, + -0.07386217266321182, + 0.0496923066675663, + 0.05627874284982681, + -0.050545014441013336, + 0.004495095461606979, + 0.0005517794052138925, + -0.05621993541717529, + -0.020450295880436897, + 0.02194988541305065, + -0.009997268207371235, + -0.009504755958914757, + -0.04137105122208595, + 0.010695607401430607, + -0.005979984067380428, + -0.010658852756023407, + -0.025992898270487785, + 0.000879814790096134, + 0.025360718369483948, + 0.02468443289399147, + 0.03193245083093643, + -0.03178543224930763, + -0.009960513561964035, + -0.0022457099985331297, + 0.015422256663441658, + -0.0017044974956661463, + 0.017892170697450638, + 0.031461991369724274, + -0.03431415557861328, + -0.013319890014827251, + 0.02969776839017868, + 0.001487645087763667, + 0.03816604241728783, + -0.0014012715546414256, + -0.07786107808351517, + -0.0067297788336873055, + -0.03781319782137871, + -0.005281645338982344, + 0.00846827495843172, + 0.002598554827272892, + 0.043370503932237625, + -0.010827924124896526, + 0.002442347351461649, + -0.018230313435196877, + -0.01723058708012104, + -0.0026830905117094517, + -0.018950704485177994, + 0.009276877157390118, + -0.055426035076379776, + 0.04669312387704849, + -0.007659671828150749, + 0.04869258031249046, + 0.02489025890827179, + -0.005998361390084028, + 0.012217250652611256, + 0.011166066862642765, + 0.01495914813131094, + -0.018524350598454475, + -0.0015685053076595068, + 0.015422256663441658, + 0.007828743197023869, + 0.024125762283802032, + -0.01512821950018406, + -0.0017927087610587478, + 0.00868880283087492, + 0.03193245083093643, + 0.04992753639817238, + 0.03725452721118927, + -0.06404132395982742, + -0.02458151988685131, + -0.027933545410633087, + -0.05669039487838745, + -0.03152079880237579, + -0.016304368153214455, + -0.032961584627628326, + 0.004156952723860741, + 0.011754141189157963, + -0.03000650741159916, + -0.020435594022274017, + -0.005230188835412264, + 0.007821392267942429, + -0.010467728599905968, + 0.023670004680752754, + -0.029344923794269562, + -0.013452206738293171, + 0.0010034022852778435, + 0.016260262578725815, + 0.026860307902097702, + 0.009526808746159077, + 0.029065588489174843, + 0.026904413476586342, + -0.028830358758568764, + 0.04513472691178322, + -0.03269694745540619, + -0.04266481474041939, + 0.011276330798864365, + 0.02202339470386505, + -0.04751643165946007, + 0.026213426142930984, + 0.038695309311151505, + 0.02506668120622635, + 0.009012243710458279, + -0.03487282618880272, + -0.04442903771996498, + 0.04407619312405586, + -0.008960787206888199, + -0.03796021640300751, + -0.01354776881635189, + -0.03381429240107536, + 0.010519185103476048, + -0.030815109610557556, + 0.021288301795721054, + 0.004171654582023621, + 0.005616112612187862, + 0.06592316925525665, + -0.019332952797412872, + -0.012989098206162453, + -0.011041101068258286, + 0.038930539041757584, + -0.02750719152390957, + -0.01701005920767784, + -0.014010878279805183, + -0.004024635534733534, + 0.01978871040046215, + -0.0169659536331892, + -0.018245015293359756, + -0.020553208887577057, + 0.034225944429636, + -0.005527901463210583, + -0.00040315272053703666, + -0.006505575496703386, + 0.004498770926147699, + -0.0016181240789592266, + -0.00875496119260788, + -0.008909330703318119, + 0.016025032848119736, + -0.018788984045386314, + 0.019347654655575752, + -0.02242034487426281, + -0.012790623120963573, + 0.011665930040180683, + -0.03810723498463631, + 0.016421984881162643, + -0.026360444724559784, + -0.06262994557619095, + -0.02940373122692108, + 0.02003864385187626, + 0.03178543224930763, + 0.025728264823555946, + -0.011511560529470444, + 0.026816202327609062, + 0.018318524584174156, + 0.01958288438618183, + 0.016789531335234642, + 0.005351479165256023, + -0.031256165355443954, + 0.046252068132162094, + -0.011386594735085964, + -0.02477264404296875, + -0.002390890847891569, + 0.018788984045386314, + -0.035725533962249756, + 0.01699535734951496, + 0.031050341203808784, + 0.0007782800239510834, + 0.006079221609979868, + -0.02949194237589836, + -0.023258350789546967, + -0.0003533042035996914, + -0.0004654059302993119, + -0.0005242134211584926, + -0.05989539995789528, + 0.05039799585938454, + -0.027771824970841408, + -0.038607098162174225, + 0.0438997708261013, + 0.029300818219780922, + -0.004954528529196978, + 0.021655848249793053, + -0.016657214611768723, + 0.002558124717324972, + 0.020391488447785378, + 0.009431246668100357, + 0.0014720242470502853, + -0.016583705320954323, + -0.0031020937021821737, + 0.0147680239751935, + 0.0050537665374577045, + 0.01497384998947382, + -0.014407828450202942, + -0.03254992887377739, + -0.0014527280582115054, + -0.028521619737148285, + 0.025243103504180908, + -0.009379790164530277, + -0.003679141867905855, + 0.02209690399467945, + 0.026683885604143143, + 0.02240564301609993, + -0.026272233575582504, + 0.031109148636460304, + -0.033667273819446564, + 0.002379864454269409, + -0.01004137471318245, + -0.014275511726737022, + 0.003973179031163454, + 0.03428475186228752, + -0.015745697543025017, + -0.02711023949086666, + -0.00869615375995636, + 0.02981538325548172, + -0.06198306754231453, + 0.03290277719497681, + -0.03937159478664398, + -0.0016365014016628265, + 0.009629721753299236, + -0.00746119674295187, + 0.004050363786518574, + 0.002039883751422167, + -0.03787200525403023, + -0.025287209078669548, + -0.040430132299661636, + 0.020656121894717216, + 0.02981538325548172, + -0.053838230669498444, + -0.018450841307640076, + -0.033373236656188965, + -0.02489025890827179, + 0.02002394199371338, + 0.005101547576487064, + 0.006255643907934427, + -0.014326968230307102, + 0.053808826953172684, + -0.006553356535732746, + 0.028036458417773247, + -0.009710581973195076, + -0.003973179031163454, + -0.018553754314780235, + -0.03963622823357582, + -0.007200238760560751, + 0.048486754298210144, + -0.018950704485177994, + -0.013937368988990784, + 0.04037132486701012, + 0.020479699596762657, + 0.030991533771157265, + 0.024111060425639153, + -0.04207674041390419, + 0.00441423524171114, + 0.026772096753120422, + -0.004068741109222174, + -0.03254992887377739, + -0.018950704485177994, + -0.022964313626289368, + 0.016627810895442963, + -0.02494906634092331, + 0.004759728908538818, + -0.005638165399432182, + 0.007887550629675388, + -0.007038518320769072, + 0.017848065122961998, + -0.040400728583335876, + -0.007012790068984032, + 0.0541616715490818, + -0.033549658954143524, + -0.018200909718871117, + -0.012577446177601814, + -0.022964313626289368, + -0.012761219404637814, + 0.0027327092830091715, + -0.02206750027835369, + 0.014275511726737022, + 0.014356371946632862, + -0.003250950016081333, + 0.02727195993065834, + -0.0013479773188009858, + 0.0024974793195724487, + -0.019097723066806793, + -0.026492761448025703, + 0.03416713699698448, + -0.0147312693297863, + 0.0177745558321476, + 0.01756872981786728, + 0.018333226442337036, + 0.004656815901398659, + -0.0003519259043969214, + -0.009828196838498116, + -0.0346670001745224, + 0.010541237890720367, + -0.018936002627015114, + 0.021141283214092255, + -0.019083021208643913, + -0.00747222313657403, + -0.014099089428782463, + 0.02242034487426281, + 0.0019167556893080473, + 0.000639071746263653, + -0.029065588489174843, + 0.023258350789546967, + -0.01950937509536743, + 0.03513745963573456, + -0.02977127768099308, + 0.031344376504421234, + -0.003054312663152814, + 0.033608466386795044, + 0.011408647522330284, + -0.026772096753120422, + 0.03010942041873932, + 0.016201455146074295, + -0.036137185990810394, + 0.02199399098753929, + -0.013687437400221825, + -0.0013966772239655256, + -0.02755129709839821, + 0.006281372159719467, + -0.03719571977853775, + 0.0018349766032770276, + 0.024184569716453552, + 0.018803685903549194, + -0.018568456172943115, + -0.009482703171670437, + -0.011026399210095406, + 0.030521072447299957, + -0.009276877157390118, + 0.02205279842019081, + -0.012018775567412376, + -0.03669585660099983, + -0.03687227889895439, + 0.033432044088840485, + -0.00426721666008234, + -0.02984478697180748, + -0.02214100956916809, + 0.00882847048342228, + 0.023978743702173233, + -0.02497847005724907, + 0.011599771678447723, + -0.038430675864219666, + 0.033667273819446564, + 0.014400477521121502, + 0.0067040505819022655, + 0.021008966490626335, + -0.007791989017277956, + 0.033343832939863205, + 0.011261628940701485, + -0.007148782256990671, + 0.0023375966120511293, + 0.006862096022814512, + -0.018230313435196877, + 0.011937915347516537, + 0.01721588522195816, + -0.0007755234255455434, + 0.003892319044098258, + 0.0025379096623510122, + -0.01978871040046215, + 0.04142985865473747, + 0.0033759158104658127, + -0.011665930040180683, + -0.007931656204164028, + 0.006082897074520588, + -0.028198178857564926, + 0.024213973432779312, + -0.016333771869540215, + 0.02256736345589161, + 0.0013406263897195458, + 0.033549658954143524, + -0.009210718795657158, + 0.031491395086050034, + 0.029256712645292282, + 0.016172051429748535, + 0.00219792895950377, + -0.007733181584626436, + -0.012856781482696533, + 0.012423076666891575, + -0.010519185103476048, + 0.005189758725464344, + 0.010254551656544209, + 0.023596493527293205, + -0.01476067304611206, + 0.006608488503843546, + 0.0023118683602660894, + -0.0059175011701881886, + 0.03993026539683342, + 0.00740606477484107, + 0.01728939451277256, + -0.02466973103582859, + -0.030432861298322678, + 0.05183877795934677, + 0.007622917182743549, + 0.030903320759534836, + -0.01990632526576519, + 0.013672735542058945, + 0.02762480638921261, + 0.01001932192593813, + 0.031256165355443954, + 0.016613109037280083, + -0.00847562588751316, + -0.020303277298808098, + 0.026478059589862823, + -0.036107782274484634, + -0.02972717210650444, + 0.010350113734602928, + 0.06421774625778198, + -0.0496923066675663, + -0.01775985397398472, + -0.005781508516520262, + 0.00756410975009203, + 0.030932726338505745, + 0.021891077980399132, + 0.011857055127620697, + -0.00846827495843172, + -0.012342216446995735, + 0.029344923794269562, + -0.03660764545202255, + 0.0201562587171793, + -0.01753932610154152, + -0.0058403159491717815, + -0.02225862443447113, + -0.006865771487355232, + 0.009600318036973476, + -0.02437569387257099, + -0.03287337347865105, + -0.022905506193637848, + -0.015319343656301498, + 0.01003402378410101, + -0.009666476398706436, + 0.03163841366767883, + -0.014349021017551422, + -0.004829562734812498, + -0.002034370554611087, + 0.003454938530921936, + 0.03163841366767883, + 0.018509648740291595, + -0.013092011213302612, + -0.0027198451571166515, + 0.01361392717808485, + 0.015863312408328056, + 0.01987692154943943, + -0.0017724937060847878, + -0.03981265053153038, + 0.03722512349486351, + -0.021126581355929375, + 0.01359922531992197, + -0.02234683558344841, + -0.007001763675361872, + -0.018936002627015114, + -0.026272233575582504, + -0.016201455146074295, + 0.03155020251870155, + 0.011019048281013966, + -0.001518886536359787, + 0.024228675290942192, + 0.0016943899681791663, + 0.020656121894717216, + -0.002543422859162092, + 0.005965282209217548, + -0.014084387570619583, + -0.0019112424924969673, + 0.035872552543878555, + 0.003261976409703493, + -0.02441979944705963, + 0.004090793896466494, + -0.0018836765084415674, + -0.026669183745980263, + -0.0061894855462014675, + 0.026830904185771942, + -0.02471383661031723, + -0.01007812935858965, + 0.010173691436648369, + 0.019479971379041672, + 0.04663431644439697, + 0.03269694745540619, + 0.016569003462791443, + -0.005156679544597864, + -0.02222922071814537, + -0.010217797011137009, + 0.02262617088854313, + 0.01364333089441061, + 0.0301976315677166, + -0.026139916852116585, + 0.011812948621809483, + -0.016230858862400055, + 0.011224874295294285, + 0.012173145078122616, + -0.043488118797540665, + 0.04025371000170708, + -0.003497206373140216, + 0.024228675290942192, + -0.015628082677721977, + -0.04181210696697235, + -0.006634216755628586, + 0.0004238272085785866, + 0.01996513269841671, + 0.003515583695843816, + 0.0059211766347289085, + 0.014429881237447262, + 0.0035523383412510157, + 0.010798520408570766, + 0.01750992238521576, + 0.00876966305077076, + 0.006240942049771547, + 0.022979015484452248, + 0.0011348002590239048, + 0.031491395086050034, + -0.022890804335474968, + 0.018200909718871117, + 0.025963494554162025, + -0.000641368911601603, + 0.02762480638921261, + 0.015481065027415752, + -0.007902252487838268, + 0.029344923794269562, + -0.003024908946827054, + 0.003061663592234254, + -0.00215198565274477, + -0.001068641897290945, + -0.05133891478180885, + -0.005557305179536343, + -0.03446117416024208, + 0.007020140998065472, + -0.019038915634155273, + -0.050692033022642136, + -0.021538233384490013, + -0.02487555705010891, + -0.007880199700593948, + 0.04195912554860115, + 0.028580427169799805, + -0.008078674785792828, + 0.04272362217307091, + 0.00434072595089674, + 0.02713964320719242, + -0.00879906676709652, + 0.031256165355443954, + 0.06268875300884247, + -0.004002582747489214, + 0.05136831849813461, + 0.0003239004872739315, + 0.04034192115068436, + -0.0755675882101059, + 0.020391488447785378, + -0.023846426978707314, + 0.013871210627257824, + 0.012717113830149174, + -0.02268497832119465, + -0.0053404527716338634, + 0.011577718891203403, + 0.014635707251727581, + 0.030609283596277237, + 0.006395311560481787, + 0.053455982357263565, + -0.010364815592765808, + 0.01771574839949608, + -0.016657214611768723, + 0.026522165164351463, + -0.01479007676243782, + 0.03716631606221199, + -0.00048608044744469225, + -0.050750840455293655, + -0.016524897888302803, + -0.0035266100894659758, + -0.047869276255369186, + 0.03716631606221199, + -0.02937432751059532, + -0.004101820755749941, + -0.04213554784655571, + -0.00034044007770717144, + 0.00876231212168932, + 0.028139371424913406, + 0.0044546653516590595, + 0.017833363264799118, + -0.003245436819270253, + -0.003034097608178854, + 0.005546278785914183, + 0.0002474048233125359, + 0.02741898037493229, + -0.019141828641295433, + 0.006637892220169306, + -0.00220895535312593, + 0.03769558295607567, + -0.019288847222924232, + -0.0036534136161208153, + -0.023375965654850006, + -0.021376512944698334, + 0.0008986515458673239, + 0.018583158031105995, + -0.023655302822589874, + -0.038313060998916626, + -0.019391760230064392, + -0.0062078628689050674, + 0.00214831018820405, + 0.005961606744676828, + -0.015672188252210617, + -0.025243103504180908, + -0.0014536469243466854, + -0.017921574413776398, + 0.005219162441790104, + 0.008328607305884361, + 0.005171381402760744, + 0.004079767502844334, + -0.020362084731459618, + 0.01752462424337864, + -0.03925397992134094, + -0.011313085444271564, + -0.018009785562753677, + -0.01995043084025383, + -0.009320982731878757, + -0.03249112144112587, + -0.04398798197507858, + -0.030315246433019638, + 0.011033750139176846, + 0.0047192987985908985, + -0.012915588915348053, + -0.0038224849849939346, + 0.0297565758228302, + 0.010261902585625648, + 0.009548861533403397, + 0.01743641309440136, + -0.009100454859435558, + 0.004179005511105061, + -0.025978196412324905, + -0.021802866831421852, + 0.03219708427786827, + 0.023331860080361366, + 0.001088856952264905, + 0.007828743197023869, + 0.018715474754571915, + 0.025419525802135468, + 0.05968957394361496, + -0.012217250652611256, + 0.03160900995135307, + -0.016392581164836884, + -0.012937641702592373, + -0.02018566243350506, + -0.005759455729275942, + 0.04119462892413139, + 0.04978051781654358, + -0.03796021640300751, + 0.035666726529598236, + -0.004789132624864578, + -0.016524897888302803, + -0.01999453641474247, + 0.012143741361796856, + 0.00033377829822711647, + -0.0008366280235350132, + 0.025934090837836266, + 0.015701591968536377, + -0.016260262578725815, + -0.0022567363921552896, + 0.004884694702923298, + -0.013297837227582932, + -0.003443912137299776, + -0.00854178424924612, + -0.011835002340376377, + 0.02763950824737549, + -0.006766533479094505, + -0.018921300768852234, + -0.0016907145036384463, + 0.028301091864705086, + -0.004013609141111374, + -0.0026610377244651318, + 0.0011164229363203049, + 0.00430764677003026, + -0.0009096779394894838, + 0.014488688670098782, + 0.008975489065051079, + 0.010122234933078289, + 0.011077855713665485, + 0.0002864566631615162, + -0.02696322090923786, + -0.012952343560755253, + -0.04513472691178322, + -0.03172662481665611, + 0.03234410285949707, + 0.04019490256905556, + 0.0073141781613230705, + -0.0027437356766313314, + 0.00429294491186738, + 0.005281645338982344, + 0.0003537636366672814, + -0.010842625983059406, + -0.001306628342717886, + 0.02974187396466732, + -0.010996995493769646, + 0.00865204818546772, + -0.006285047624260187, + 0.01990632526576519, + 0.010408921167254448, + 0.0053183999843895435, + 0.006693024188280106, + 0.016760127618908882, + -0.026037003844976425, + -0.038607098162174225, + 0.018068592995405197, + 0.014437232166528702, + -0.018700772896409035, + -0.016421984881162643, + 0.0008311148267239332, + -0.010798520408570766, + 0.01774515211582184, + -0.018627263605594635, + 0.005130951292812824, + 0.009504755958914757, + 0.0035486628767102957, + 0.015554574318230152, + -0.013981474563479424, + -0.05236804485321045, + 0.02203809656202793, + 0.0032325726933777332, + 0.00846092402935028, + -0.016436686739325523, + 0.012180496007204056, + -0.03413773328065872, + -0.01739230751991272, + -0.0354020930826664, + 0.010945538990199566, + 0.025654755532741547, + -0.0049912831746041775, + -0.008019867353141308, + 0.01759813353419304, + -0.009012243710458279, + -0.004127549007534981, + 0.012136390432715416, + 0.03763677552342415, + -0.0005504011060111225, + -0.03234410285949707, + 0.00858588982373476, + -0.0024974793195724487, + -0.005527901463210583, + -0.029080290347337723, + 0.0003964909410569817, + -0.009129858575761318, + 0.021641146391630173, + -0.021391214802861214, + 0.011092557571828365, + -0.02219981700181961, + 0.003306081984192133, + 0.0038114585913717747, + -0.010754414834082127, + -0.023493580520153046, + 0.020347382873296738, + -0.006516601890325546, + -0.04269421845674515, + -0.010526536032557487, + -0.0058366404846310616, + -0.006310775876045227, + 0.00219057803042233, + 0.019274145364761353, + -0.05671979859471321, + -0.0348140187561512, + -0.0033648894168436527, + 0.00218138936907053, + -0.007038518320769072, + 0.016789531335234642, + 0.00442158617079258, + 0.013709490187466145, + -0.03910696133971214, + 0.020288575440645218, + -0.01504735928028822, + 0.030374053865671158, + -0.00426354119554162, + 0.0024919661227613688, + -0.03549030423164368, + -0.0005164030590094626, + 0.02274378575384617, + 0.019450567662715912, + -0.019171232357621193, + -0.002433158690109849, + 0.008416818454861641, + -0.00851238053292036, + 0.003423697082325816, + 0.008299203589558601, + 0.001110909739509225, + 0.016436686739325523, + -0.018612561747431755, + -0.0041863564401865005, + 0.012114337645471096, + 0.047898679971694946, + -0.02256736345589161, + -0.025757668539881706, + -0.00033952121157199144, + 0.03687227889895439, + -0.0168924443423748, + -0.018862493336200714, + -0.012070232070982456, + 0.048427946865558624, + 0.0880935788154602, + -0.00440320884808898, + -0.013907965272665024, + 0.012423076666891575, + -0.006953982636332512, + 0.011423349380493164, + -0.024111060425639153, + 0.012820026837289333, + -0.00882847048342228, + 0.032961584627628326, + -0.005759455729275942, + -0.006226240191608667, + 0.00211339327506721, + 0.014554847031831741, + -0.005498497746884823, + 0.012503936886787415, + 0.031167956069111824, + -0.00860794261097908, + 0.045693397521972656, + -0.0018239502096548676, + -0.0201562587171793, + 0.019377058371901512, + -0.029065588489174843, + -0.011518911458551884, + 0.0014591601211577654, + 0.008335958234965801, + 0.002907293848693371, + -0.018509648740291595, + 0.009629721753299236, + 0.0044730426743626595, + -0.007983112707734108, + 0.002861350541934371, + -0.030344650149345398, + -0.03157960623502731, + -0.003506395034492016, + 0.009240122511982918, + 0.01476067304611206, + 0.009468001313507557, + -0.021126581355929375, + 0.0001852664863690734, + -0.0058513423427939415, + -0.006546005606651306, + -0.00858588982373476, + -0.011636526323854923, + 0.015539872460067272, + -0.01004872564226389, + 0.0011292870622128248, + -0.017818661406636238, + -0.04292944818735123, + 0.02255266159772873, + 0.008100727573037148, + 0.016319070011377335, + 0.018524350598454475, + -0.004807509947568178, + 0.038342464715242386, + -0.026051705703139305, + 0.01007077842950821, + 0.04134164750576019, + 0.003951126243919134, + 0.020612016320228577, + 0.021082475781440735, + -0.0201562587171793, + -0.005226513370871544, + -0.01750992238521576, + 0.013437504880130291, + 0.02500787377357483, + 0.0174070093780756, + 0.043194081634283066, + 0.0011412323219701648, + 0.0011421511881053448, + -0.003462289460003376, + -0.006983386352658272, + -0.011386594735085964, + -0.035901956260204315, + -0.0294625386595726, + 0.055867090821266174, + 0.05216221883893013, + 0.00037949191755615175, + 0.003050637198612094, + 0.026272233575582504, + -0.012430427595973015, + 0.03266754373908043, + 0.026375146582722664, + 0.030550476163625717, + -0.0015878014964982867, + -0.01773045025765896, + 0.00011457117943791673, + 2.4881184799596667e-05, + 0.00868145190179348, + -0.005399260204285383, + 0.010769116692245007, + 0.026713289320468903, + -0.0064430925995111465, + 0.023861128836870193, + -0.000429340434493497, + -0.04469367116689682, + -0.01959758624434471, + -0.03654883801937103, + -0.025390122085809708, + 0.0038004321977496147, + -0.0025085059460252523, + 0.010952889919281006, + -0.00865939911454916, + 0.003048799466341734, + 0.0005807236884720623, + 0.016480792313814163, + 0.016848338767886162, + -0.016627810895442963, + -0.026492761448025703, + -0.023699408397078514, + 0.008063972927629948, + -0.01971520110964775, + -0.03537268936634064, + -0.02192048169672489, + -0.001273549161851406, + -0.011467454954981804, + -0.016451388597488403, + 0.00754205696284771, + 0.027771824970841408, + 0.033402640372514725, + -0.001319492468610406, + 0.00047459459165111184, + 0.017803959548473358, + 0.016172051429748535, + -0.006858420558273792, + 0.03746035322546959, + -0.01730409637093544, + 0.030344650149345398, + -0.023728812113404274, + 0.006057168822735548, + -0.02743368223309517, + 0.007762585300952196, + -0.0005301860510371625, + -0.002892591990530491, + 0.012753868475556374, + 0.043429311364889145, + 0.05927792191505432, + 0.014312266372144222, + -0.0035982816480100155, + -0.0007713885279372334, + 0.028771551325917244, + 0.006277696695178747, + -0.015878014266490936, + -0.01706886664032936, + -0.02756599895656109, + -0.025860581547021866, + 0.026919115334749222, + -0.020641420036554337, + -0.04172389581799507, + -0.0016778503777459264, + 0.023684706538915634, + 0.017789257690310478, + -0.006546005606651306, + -0.004179005511105061, + -0.046105049550533295, + 0.011849704198539257, + -0.00869615375995636, + 0.012048179283738136, + -0.01476067304611206, + -0.002370675792917609, + 0.01717177964746952, + -0.0012276057386770844, + -0.02231743186712265, + -0.010320710018277168, + 0.031167956069111824, + -0.0038518887013196945, + -0.04260600730776787, + 0.005965282209217548, + -0.021303003653883934, + 0.007843445055186749, + -0.00443261256441474, + -0.01481948047876358, + 0.0005784265231341124, + 0.019038915634155273, + 0.015289939939975739, + -0.011687982827425003, + 0.009945811703801155, + 0.03413773328065872, + 0.016392581164836884, + 0.008416818454861641, + -0.027713017538189888, + 0.018333226442337036, + -0.001510616741143167, + 0.007997814565896988, + -0.025566544383764267, + 0.013305188156664371, + 0.01470921654254198, + 0.01501060463488102, + -0.018318524584174156, + 0.0013415452558547258, + -0.020479699596762657, + 0.0003450344083830714, + 0.0059322030283510685, + 0.005869719665497541, + 0.0070421937853097916, + -0.015422256663441658, + 0.00441791070625186, + -0.006865771487355232, + 0.036078378558158875, + -0.006406337954103947, + 0.0027235206216573715, + 0.026154618710279465, + -0.02486085519194603, + -0.028109967708587646, + 0.027771824970841408, + 0.04916303977370262, + 0.030756302177906036, + 0.010107533074915409, + -0.012540691532194614, + 0.0053110490553081036, + 0.02738957665860653, + 0.007255370728671551, + -0.05971897765994072, + 0.001076911692507565, + 0.010364815592765808, + 0.004774430766701698, + -0.004623736720532179, + 0.00442158617079258, + 0.011937915347516537, + 0.040753573179244995, + -0.0061821346171200275, + 0.015598679892718792, + -0.03257933259010315, + -0.0176275372505188, + 0.02262617088854313, + 0.02705143205821514, + 0.00434440141543746, + 0.002604068024083972, + -0.006211538333445787, + 0.009357737377285957, + 0.04754583537578583, + -0.015922119840979576, + 0.028007054701447487, + 0.020700227469205856, + 0.02444920316338539, + -0.009048998355865479, + 0.019479971379041672, + -0.05916030704975128, + 0.010607396252453327, + 0.011805597692728043, + -0.0270073264837265, + -0.008240396156907082, + -0.012989098206162453, + 0.010438324883580208, + 0.01508411392569542, + 0.0027749771252274513, + 0.0013985149562358856, + 0.030932726338505745, + -0.0018193558789789677, + -0.0005338615155778825, + 0.0014775374438613653, + -0.011151365004479885, + -0.0148415332660079, + 0.00746854767203331, + -0.0002167376660509035, + -0.006762858014553785, + 0.0005949661135673523, + 0.006127002649009228, + 0.0055977352894842625, + -0.0005003228434361517, + -0.020685525611042976, + -0.03793081268668175, + -0.010974942706525326, + -0.011349840089678764, + 0.028139371424913406, + -0.01483418233692646, + -0.002447860548272729, + 0.019127126783132553, + 0.01980341225862503, + 0.018465543165802956, + 0.006575409322977066, + -0.018774282187223434, + 0.0002199536975240335, + 0.016054436564445496, + -0.011629175394773483, + -0.045722801238298416, + -0.0543086901307106, + -0.016025032848119736, + 0.0017881144303828478, + -0.008968138135969639, + -0.038489483296871185, + ], + "index": 3, + }, + { + "title": "Shin Sang-ok", + "text": 'Shin Sang-ok (October 18, 1926 \u2013 April 11, 2006) was a prolific South Korean film producer and director with more than 100 producer and 70 director credits to his name. His best-known films were made in the 1950s and 60s when he was known as the "Prince of Korean Cinema". He received the Gold Crown Cultural Medal, the country\'s top honor for an artist.', + "vector": [ + 0.041343480348587036, + -0.008456620387732983, + -0.021819371730089188, + -0.022823551669716835, + -0.014460176229476929, + -0.002359820296987891, + -0.013549242168664932, + -0.02652466855943203, + -0.03626520186662674, + 0.011756065301597118, + 0.00045994980609975755, + -0.02861909754574299, + -0.03319528326392174, + -0.01073036901652813, + 0.01159826572984457, + 0.003980852197855711, + -0.03959333896636963, + 0.0111248679459095, + -0.023612549528479576, + -0.0214033555239439, + 0.07172705978155136, + -0.04237635061144829, + -0.005200211890041828, + -0.00976205337792635, + 0.012114700861275196, + 0.03118692710995674, + -0.02936505898833275, + 0.012494854629039764, + 0.038359634578228, + -0.011734547093510628, + 0.0002224659692728892, + -0.015736917033791542, + 0.02831784449517727, + 0.060480259358882904, + 0.035834841430187225, + -0.0009459006250835955, + 0.000751789310015738, + 0.027543192729353905, + 0.019151125103235245, + -0.012896525673568249, + -0.013642487116158009, + -0.019194161519408226, + -0.005365184508264065, + 0.011770411394536495, + -0.011727374978363514, + -0.010264142416417599, + -0.04441339895129204, + -0.07511258125305176, + -0.030871327966451645, + -0.0022773342207074165, + 0.06541508436203003, + -0.010113515891134739, + -0.01658329740166664, + -0.0387326143682003, + 0.03302314132452011, + -0.019179817289114, + 0.04854487627744675, + 0.020427867770195007, + 0.032564084976911545, + -0.04094180837273598, + -0.001970701152458787, + -0.024530654773116112, + -0.03709723800420761, + 0.02880558930337429, + 0.07884238660335541, + -0.030785255134105682, + 0.02186240814626217, + 0.024258092045783997, + -0.03029751218855381, + 0.04409779980778694, + 0.015478700399398804, + -0.03606436774134636, + -0.013420133851468563, + 0.009597080759704113, + -0.010809268802404404, + 0.009840953163802624, + 0.03322397544980049, + -0.009661635383963585, + -0.031473834067583084, + -0.024961018934845924, + 0.016870204359292984, + -0.008427930064499378, + -0.08211313933134079, + 0.014345413073897362, + -0.02672550454735756, + -0.02562090754508972, + -0.003268960863351822, + -0.06363625079393387, + -0.02329695038497448, + -0.0058063059113919735, + 0.03695378452539444, + -0.04708164557814598, + -0.0055803656578063965, + 0.004095615353435278, + 0.0179891474545002, + -0.03184681758284569, + 0.06214432790875435, + -0.05046716332435608, + 0.01976797915995121, + 0.0005944380536675453, + -0.008707665838301182, + -0.06076716631650925, + -0.003503866959363222, + 0.016167279332876205, + 0.03893344849348068, + 0.03546186164021492, + -0.05218861252069473, + -0.018892908468842506, + -0.014166095294058323, + 0.0346585176885128, + -0.017472712323069572, + 0.037039853632450104, + 0.02051394060254097, + 0.03445767983794212, + -0.05052454397082329, + 0.03867523372173309, + -0.015665190294384956, + 0.04441339895129204, + -0.0037871890235692263, + -0.022134970873594284, + -0.004579773172736168, + -0.0359782949090004, + -0.017903074622154236, + 0.003744152607396245, + 0.01688455045223236, + -0.000735650712158531, + -0.036839019507169724, + 0.07958834618330002, + 0.035777460783720016, + 0.005630574654787779, + -0.031072163954377174, + 0.015019646845757961, + 0.03933512046933174, + 0.0010068686679005623, + 0.03055572882294655, + 0.011454812251031399, + 0.011418948881328106, + 0.01236574538052082, + -0.02884862571954727, + 0.028145698830485344, + 0.004823645111173391, + -0.019093744456768036, + -0.021589845418930054, + -0.022565335035324097, + -0.004339487291872501, + -0.04097049683332443, + 0.019653216004371643, + -0.02333998680114746, + -0.06461174041032791, + 0.01704235002398491, + -0.05657830834388733, + -0.027887482196092606, + -0.051987774670124054, + 0.008090812712907791, + -0.027198903262615204, + 0.0023060250096023083, + -0.0014892331091687083, + -0.03224848583340645, + -0.02747146598994732, + -0.005892378278076649, + 0.011512193828821182, + -0.004127892665565014, + -0.025663943961262703, + 0.012121873907744884, + 0.0035773871932178736, + -0.07637497782707214, + -0.06593151390552521, + 0.005106966942548752, + 0.008241439238190651, + 0.02884862571954727, + 0.012573754414916039, + 0.011440466158092022, + 0.006329913157969713, + -0.017558785155415535, + -0.039363812655210495, + 0.001603996497578919, + 0.03526102378964424, + -0.009324518032371998, + -0.028303498402237892, + 0.002413615584373474, + 0.009998752735555172, + 0.012157737277448177, + -0.029723694548010826, + -0.0210590660572052, + -0.030584419146180153, + 0.026108650490641594, + 0.018118256703019142, + -0.03744152560830116, + 0.025592215359210968, + -0.008872637525200844, + -0.05038109049201012, + -0.030871327966451645, + -0.02006923221051693, + -0.0030627455562353134, + 0.01599513553082943, + 0.027457119897007942, + -0.022292770445346832, + -0.037527598440647125, + -0.061570510268211365, + -0.043495289981365204, + 0.028733860701322556, + 0.002739973831921816, + 0.043638743460178375, + -0.00649488577619195, + -0.04016715660691261, + 0.01734360307455063, + -0.010206760838627815, + 0.002234298037365079, + -0.0373554527759552, + -0.028676480054855347, + -1.581637843628414e-05, + -0.011748893186450005, + -0.031416453421115875, + 0.012129046022891998, + -0.021475082263350487, + -0.005591124761849642, + -0.0020442213863134384, + 0.02180502749979496, + -0.006684962194412947, + 0.028446953743696213, + 0.014689702540636063, + 0.0244445838034153, + 0.027543192729353905, + -0.031961578875780106, + 0.02186240814626217, + -0.005379529669880867, + -0.043294455856084824, + 0.015320900827646255, + -0.004583359230309725, + 0.004988617263734341, + -0.008363375440239906, + -0.028489990159869194, + 0.004694536328315735, + -0.00787563156336546, + -0.029723694548010826, + 0.08940061181783676, + 0.04977858066558838, + -0.0356626957654953, + -0.025348344817757607, + 0.01346316933631897, + -0.003606078214943409, + 0.050036799162626266, + 0.0016954484162852168, + 0.0008938985411077738, + 0.041745152324438095, + 0.024961018934845924, + -0.03244932368397713, + -0.0002978914708364755, + 0.01714276894927025, + 0.04693818837404251, + 0.02821742743253708, + -0.004127892665565014, + 0.01823301985859871, + 0.030469655990600586, + -0.029867149889469147, + -0.0009024161263369024, + 0.012229464016854763, + 0.04071228206157684, + 0.012666999362409115, + 0.035490550100803375, + 0.002078291727229953, + -0.018519926816225052, + -0.005870860069990158, + -0.02260836958885193, + -0.04220420494675636, + 0.012860662303864956, + -0.026510322466492653, + -0.03279361501336098, + 0.011834965087473392, + 0.011010103859007359, + 0.00748830521479249, + -0.029121188446879387, + 0.019997505471110344, + 0.0028672893531620502, + -0.024372855201363564, + -0.0232539139688015, + 0.010350215248763561, + 0.01261679083108902, + 0.04237635061144829, + -0.006760275922715664, + 0.013793114572763443, + -0.015234827995300293, + -0.05161479488015175, + 0.03029751218855381, + -0.010694504715502262, + -0.027744028717279434, + 0.05543067306280136, + -0.029235951602458954, + 0.052532900124788284, + 0.014546248130500317, + 0.01015655230730772, + 0.056205328553915024, + -0.014646666124463081, + 0.0019509760895743966, + 0.019983159378170967, + 0.008693319745361805, + -0.02638121321797371, + -0.017171459272503853, + 0.0312443096190691, + -0.04163038730621338, + 0.0030340547673404217, + 0.018448200076818466, + -0.011813446879386902, + 0.03632258623838425, + -0.04137216880917549, + -0.00034496234729886055, + -0.023813385516405106, + 0.043437909334897995, + 0.03870392218232155, + -0.01712842285633087, + 0.018003493547439575, + -0.034543752670288086, + 0.03663818538188934, + 0.038359634578228, + 0.018448200076818466, + -0.028274808079004288, + -0.010335870087146759, + -0.0624886192381382, + -0.0198683962225914, + 0.041888605803251266, + 0.021489428356289864, + 0.006663443986326456, + 0.022680098190903664, + -0.011483502574265003, + 0.08607247471809387, + 0.03600698709487915, + 0.003130886238068342, + -0.047311171889305115, + -0.012710035778582096, + 0.03184681758284569, + 0.010429115034639835, + -0.01589471660554409, + 0.008427930064499378, + -0.02410029247403145, + 0.019151125103235245, + -0.001277638366445899, + -0.0202126856893301, + 0.049491673707962036, + -0.0056234016083180904, + -0.0029946048744022846, + 0.0009934197878465056, + -0.01882118172943592, + 0.001090251374989748, + 0.028977733105421066, + -0.04544626548886299, + -0.02329695038497448, + 0.02989584021270275, + 0.005074689630419016, + 0.021891100332140923, + -0.020140958949923515, + 0.0005204695044085383, + -0.028877316042780876, + 0.02438720129430294, + -0.009618598967790604, + -0.0006607855902984738, + 0.00356483506038785, + 0.06145574897527695, + 0.019237197935581207, + -0.03959333896636963, + -0.008485311642289162, + 0.007624587044119835, + 0.0058457558043301105, + 0.0005505052395164967, + -0.00401312904432416, + -0.011949729174375534, + 0.023368677124381065, + 0.02975238673388958, + 0.012093182653188705, + -0.031014781445264816, + -0.015464355237782001, + 0.006957524921745062, + -0.005838582757860422, + -0.040253229439258575, + -0.0019115261966362596, + 0.009704671800136566, + -0.024702800437808037, + -0.013642487116158009, + 0.03867523372173309, + -0.0488891676068306, + -0.004777022637426853, + -0.0036347690038383007, + 0.0276723001152277, + -0.024774527177214622, + -0.014990956522524357, + -0.05316409841179848, + -0.0009530733805149794, + 0.013585105538368225, + 0.026409905403852463, + -0.026051269844174385, + 0.029465477913618088, + 0.0013215711805969477, + -0.0099341981112957, + 0.052332065999507904, + 0.006548680830746889, + -0.0136640053242445, + -0.054024823009967804, + 0.03302314132452011, + 0.017573131248354912, + 0.019796669483184814, + 0.025520488619804382, + 0.05181562900543213, + -0.01085230428725481, + 0.02618037723004818, + 0.004382523708045483, + 0.032850995659828186, + 0.04665128141641617, + 0.011770411394536495, + -0.03511757031083107, + 0.022034553810954094, + 0.026409905403852463, + 0.05950477346777916, + 0.03681032732129097, + -0.023038731887936592, + -0.03856046870350838, + 0.05032370612025261, + -0.00102749012876302, + 0.017114076763391495, + -0.011548057198524475, + 0.03899083286523819, + -0.0015995134599506855, + 0.03629389405250549, + -0.05150002986192703, + 0.0263238325715065, + -0.05807023122906685, + -0.03133038058876991, + -0.0031434386037290096, + 0.02583608776330948, + 0.06220170855522156, + -0.03824486956000328, + -0.025893470272421837, + -0.01487619336694479, + -0.0038983658887445927, + 0.028289154171943665, + -0.023899458348751068, + -0.040454063564538956, + 0.002562449313700199, + -0.06753820180892944, + -0.00404899287968874, + 0.02483190968632698, + 0.02424374781548977, + 0.007832595147192478, + -0.029522858560085297, + -0.029494168236851692, + 0.016611987724900246, + -0.019007671624422073, + -0.04320838302373886, + -0.0032259246800094843, + -0.019796669483184814, + -0.006613235455006361, + -0.03029751218855381, + -0.05875881016254425, + -0.024014221504330635, + 0.029293332248926163, + -0.024702800437808037, + 0.027729682624340057, + 0.031359072774648666, + -0.024659764021635056, + 0.025563525035977364, + -0.016411151736974716, + -0.01585168018937111, + -0.02622341364622116, + 0.062316473573446274, + 0.0266681220382452, + -0.02408594824373722, + -0.005870860069990158, + 0.028977733105421066, + -0.045073285698890686, + -0.06552984565496445, + 0.016081208363175392, + 0.03408470004796982, + 0.04191729426383972, + 0.06174265593290329, + 0.04647913575172424, + -0.03293706849217415, + 0.022335806861519814, + 0.039507266134023666, + 0.05368053540587425, + -0.006957524921745062, + 0.049147382378578186, + 0.02577870711684227, + 0.035088878124952316, + -0.002594726625829935, + -0.0366668738424778, + 0.0029802594799548388, + 0.021145138889551163, + 0.004185274243354797, + -0.027141520753502846, + -0.008406411856412888, + 0.0037513254210352898, + -0.02170460857450962, + 0.035347096621990204, + 0.03491673618555069, + 0.009977234527468681, + 0.02791617251932621, + -0.038617849349975586, + 0.020255722105503082, + -0.040310610085725784, + -0.019438033923506737, + 0.02180502749979496, + -0.011964074335992336, + 0.0059999688528478146, + 0.06375101208686829, + -0.016425497829914093, + -0.015378282405436039, + 0.021475082263350487, + 0.0034070354886353016, + 0.026094306260347366, + 0.01962452381849289, + 0.0009620392229408026, + -0.016411151736974716, + -0.0007889976841397583, + 0.04165907949209213, + -0.014947920106351376, + -0.033310048282146454, + -0.02057132124900818, + -0.003797947894781828, + 0.006093213800340891, + -0.004382523708045483, + 0.01718580350279808, + 0.002010151045396924, + 0.0030412275809794664, + 0.028002245351672173, + -0.004253414925187826, + 0.05875881016254425, + -0.015363937243819237, + -0.025965197011828423, + -0.00574892433360219, + -0.006502058357000351, + -0.01928023435175419, + 0.035777460783720016, + 0.005802719388157129, + 0.002110568806529045, + 0.030326202511787415, + -0.013986777514219284, + -0.017544439062476158, + 0.013563587330281734, + -0.0020818780176341534, + 0.017271876335144043, + 0.006398053839802742, + 0.0019222853006795049, + -0.0332813560962677, + 0.019093744456768036, + -0.001968907890841365, + -0.009697498753666878, + -0.03933512046933174, + 0.008205575868487358, + 0.033396121114492416, + -0.036035675555467606, + -0.0017725550569593906, + 0.028748206794261932, + 0.009604253806173801, + 0.03594960272312164, + 0.010787750594317913, + 0.02840391732752323, + 0.03669556602835655, + 0.03813010826706886, + -0.04102788120508194, + -0.00844227522611618, + -0.037527598440647125, + -0.0011817034101113677, + -0.02410029247403145, + -0.00976205337792635, + -0.0024512724485248327, + -0.0008365168469026685, + -0.01942368783056736, + 0.0015394421061500907, + -0.026237759739160538, + -0.011397430673241615, + -0.061914801597595215, + -0.0512705035507679, + -0.004949167370796204, + 0.016712406650185585, + 0.02519054524600506, + -0.03133038058876991, + -0.0536518432199955, + 0.025750014930963516, + -0.038876067847013474, + -0.00864311121404171, + 0.0026377628091722727, + -0.023870766162872314, + 0.049577746540308, + -0.032018959522247314, + 0.030240129679441452, + 0.016511570662260056, + -0.028690826147794724, + -0.002684385282918811, + 0.032908376306295395, + 0.022479262202978134, + -0.01658329740166664, + 0.004328728187829256, + -0.03187550604343414, + -0.0047590904869139194, + 0.0010140413651242852, + -0.021030375733971596, + -0.01202145591378212, + -0.0161385890096426, + -0.011777583509683609, + 0.029278988018631935, + -0.00328509951941669, + 0.008176885545253754, + 0.00961142685264349, + 0.027342356741428375, + -0.03336742892861366, + -0.024272438138723373, + 0.011010103859007359, + -0.019007671624422073, + 0.023827729746699333, + -0.03899083286523819, + 0.02285224199295044, + -0.03055572882294655, + -0.01224381010979414, + -0.006204390898346901, + -0.01430237665772438, + 0.006365776993334293, + 0.025563525035977364, + -0.013477515429258347, + -0.0013341234298422933, + 0.005487120244652033, + 0.02563525177538395, + 0.004906130954623222, + -0.013283852487802505, + 0.0451880507171154, + 0.031014781445264816, + -0.01517744641751051, + 0.005257593933492899, + -0.028246117755770683, + -0.016812823712825775, + 0.02210628055036068, + -0.00842075701802969, + 0.03729807212948799, + -0.006563026458024979, + 0.01562215480953455, + -0.024128984659910202, + -0.02989584021270275, + -0.06174265593290329, + 0.014639494009315968, + 0.004016715567559004, + -0.060021206736564636, + -0.018304746598005295, + -0.06633318960666656, + -0.013441652059555054, + -0.016468534246087074, + 0.0020209099166095257, + -0.04122871533036232, + -0.02315349690616131, + 0.028977733105421066, + 0.01383615005761385, + -0.020886920392513275, + -0.013126052916049957, + 0.023325640708208084, + 0.02682592160999775, + -0.004260587505996227, + -0.01996881514787674, + 0.01420913077890873, + 0.057984158396720886, + 0.005630574654787779, + 0.0438108891248703, + -0.009927025996148586, + -0.023311296477913857, + -0.028203081339597702, + 0.006968284025788307, + -0.026639431715011597, + -0.03267884999513626, + 0.016568951308727264, + -0.021618537604808807, + 0.005347252357751131, + -0.0232539139688015, + 0.0003171681019011885, + -0.02890600636601448, + -0.006634753197431564, + 0.023813385516405106, + 0.0059282416477799416, + -0.007595895789563656, + -0.00039674033178016543, + -0.006903729867190123, + -0.015306555666029453, + 0.008858292363584042, + -0.004956339951604605, + 0.04762677103281021, + -0.022221043705940247, + 0.01887856237590313, + -0.01862034574151039, + -0.005193039309233427, + 0.02285224199295044, + -0.02463107369840145, + 0.0016488258261233568, + 0.01907939836382866, + -0.029637621715664864, + -0.006401640363037586, + 0.014704047702252865, + 0.028647789731621742, + -0.03015405684709549, + -0.043839581310749054, + -0.004916890058666468, + 0.04513067007064819, + -0.0519590862095356, + -0.03233455866575241, + -0.009848126210272312, + 0.0007365472847595811, + 0.011834965087473392, + -0.015822989866137505, + 0.04372481629252434, + -0.03617912903428078, + 0.006225909106433392, + -0.005447670351713896, + -0.02890600636601448, + -0.0008499657269567251, + -0.0010642502456903458, + -0.05339362472295761, + -0.08802345395088196, + 0.02354082278907299, + 0.03506018966436386, + 0.021618537604808807, + 0.008635938167572021, + -0.0015779953682795167, + 0.004547495860606432, + 0.012968253344297409, + -0.04501590505242348, + 0.01813260093331337, + 0.01982535980641842, + 0.006247427314519882, + -0.01704235002398491, + -0.014402794651687145, + 0.010213933885097504, + 0.01050801482051611, + 0.03655211254954338, + 0.024573691189289093, + -0.040999189019203186, + -0.01258809957653284, + -0.010400423780083656, + 0.04240503907203674, + -0.004597704857587814, + 0.01966756023466587, + 0.0026915580965578556, + 0.038962140679359436, + -0.005881619174033403, + -0.010142207145690918, + 0.014445830136537552, + 0.03184681758284569, + -0.01030717883259058, + 0.011153558269143105, + -0.01090251374989748, + 0.00589955085888505, + -0.013979604467749596, + 0.03531840443611145, + -0.010938377119600773, + 0.02031310461461544, + 0.041257407516241074, + -0.012910871766507626, + -0.04429863393306732, + 0.0078039043582975864, + 0.013850496150553226, + -0.0018935945117846131, + -0.032908376306295395, + 0.0028906005900353193, + -8.383100794162601e-05, + 0.005583951715379953, + -0.027973555028438568, + 0.02861909754574299, + -0.004748331382870674, + -0.018247364088892937, + 0.026653775945305824, + 0.01708538644015789, + -0.0048702675849199295, + 0.02607996016740799, + 0.03322397544980049, + -0.012559408321976662, + -0.021087756380438805, + -0.013527723960578442, + 0.009604253806173801, + -0.00047295031254179776, + 0.0006854417733848095, + -0.010493669658899307, + -0.004127892665565014, + 0.000364239007467404, + 0.0067925527691841125, + -0.03244932368397713, + -0.03437160700559616, + 0.01318343449383974, + -0.040310610085725784, + -0.00668137613683939, + 0.017501402646303177, + -0.051729559898376465, + -0.01522048283368349, + -0.018591655418276787, + 0.002497894922271371, + 0.01758747547864914, + 0.004239069297909737, + -0.012337055057287216, + 0.01793176494538784, + -0.006172113586217165, + 0.039908938109874725, + -0.006175700109452009, + -0.05147134140133858, + 0.005099794361740351, + 0.005139244254678488, + 0.0028637030627578497, + 0.010895340703427792, + -0.008528348058462143, + -0.025147508829832077, + -0.04240503907203674, + 0.011734547093510628, + -0.02529096230864525, + -0.018864218145608902, + 0.02592216059565544, + -0.014359758235514164, + -0.03356826677918434, + 0.03170336037874222, + 0.006849934346973896, + -0.0008598282001912594, + 0.0099341981112957, + -0.051987774670124054, + 0.015320900827646255, + -0.06633318960666656, + -0.0006728895241394639, + -0.00449728686362505, + 0.007603068836033344, + -0.0010319731663912535, + -0.028920352458953857, + 0.022321462631225586, + 0.011045968160033226, + 0.00842075701802969, + 0.036437347531318665, + 0.06484126299619675, + 0.07258778810501099, + 0.04097049683332443, + 0.02136031910777092, + -0.0001409885153407231, + -0.015923408791422844, + 0.016655024141073227, + -0.03724069148302078, + 0.003347860649228096, + 0.015163101255893707, + 0.03778581693768501, + -0.017558785155415535, + -0.0380440354347229, + 0.0461922287940979, + -0.011397430673241615, + 0.03184681758284569, + 0.005297043826431036, + 0.047913677990436554, + 0.01708538644015789, + -0.0012166702654212713, + -0.02721324749290943, + 0.01271720789372921, + 0.0010481117060407996, + 0.008549866266548634, + -0.020772157236933708, + 0.036839019507169724, + 0.01092403195798397, + 0.004622809123247862, + -0.05276242643594742, + 0.01813260093331337, + 0.025147508829832077, + 0.0031882680486887693, + -0.03784319758415222, + 0.038072723895311356, + 0.003295858623459935, + 0.009102164767682552, + 0.008062121458351612, + -0.004547495860606432, + 0.0016640678513795137, + 0.024760182946920395, + -0.033510882407426834, + -0.0173292588442564, + 0.01827605627477169, + 0.012329882010817528, + 0.006487712729722261, + -0.02592216059565544, + -0.006451849360018969, + -0.012803280726075172, + 0.058443211019039154, + 0.011418948881328106, + -0.007990394718945026, + -0.060480259358882904, + -0.004099201876670122, + -0.010866650380194187, + -0.03649472817778587, + -0.019925778731703758, + 0.009209754876792431, + -0.018347783014178276, + 0.013255161233246326, + -0.0046443273313343525, + 0.005293457303196192, + 0.014101540669798851, + 0.010364560410380363, + 0.008930019102990627, + -0.024301128461956978, + 0.010651469230651855, + -0.022565335035324097, + -0.006365776993334293, + 0.0037513254210352898, + 0.00196173507720232, + 0.03606436774134636, + 0.0034680035896599293, + 0.02037048526108265, + 0.040454063564538956, + -0.007262364961206913, + -0.05150002986192703, + -0.06099669635295868, + 0.005279111675918102, + 0.009023264981806278, + 0.023024387657642365, + -0.02866213396191597, + 0.004924063105136156, + -0.022077590227127075, + 0.03084263764321804, + -0.029723694548010826, + 0.01907939836382866, + -0.019854051992297173, + 0.024616727605462074, + -0.0071619474329054356, + 0.051729559898376465, + 0.011878001503646374, + -0.03663818538188934, + -0.02787313610315323, + 0.05557413026690483, + 0.011834965087473392, + -0.02230711653828621, + 0.009381899610161781, + -0.006398053839802742, + 0.027041103690862656, + 0.004300037398934364, + -0.002904945984482765, + -0.01032869704067707, + -0.010651469230651855, + 0.004680190701037645, + 0.012437473051249981, + -0.030928710475564003, + 0.010034616105258465, + 0.02717021107673645, + -0.016253352165222168, + -0.03417077288031578, + -0.001673930324614048, + 0.049405600875616074, + -0.007746522780507803, + -0.01758747547864914, + -0.007395060267299414, + 0.02041352167725563, + 0.017888730391860008, + 0.014904883690178394, + 0.0263238325715065, + 0.001051698112860322, + -0.018290400505065918, + -0.010027443058788776, + 0.004881026688963175, + -0.016468534246087074, + -0.021919790655374527, + -0.009769226424396038, + -0.03701116517186165, + -0.03818748891353607, + -0.03394124656915665, + 0.0011404602555558085, + -0.007222915068268776, + -0.01813260093331337, + 0.008757874369621277, + 0.019251544028520584, + -0.002874462166801095, + -0.04610615596175194, + -0.015464355237782001, + -0.027758372947573662, + -0.020929956808686256, + -0.018864218145608902, + -0.003665252821519971, + 0.03724069148302078, + -0.03244932368397713, + 0.0022396775893867016, + -0.0067531028762459755, + 0.0390482135117054, + -0.009840953163802624, + -0.005150003358721733, + 0.04036799073219299, + -0.020929956808686256, + 0.018993325531482697, + -0.03239194303750992, + 0.008485311642289162, + -0.01443148497492075, + 0.03342481330037117, + 0.029666313901543617, + -0.017099732533097267, + -0.033453501760959625, + 0.023913802579045296, + 0.0013601244427263737, + -0.016167279332876205, + 0.029192915186285973, + 0.016282042488455772, + -0.021417701616883278, + -0.0058457558043301105, + -0.01922285370528698, + -0.030756564810872078, + -0.05881619080901146, + -0.013305370695888996, + 0.019954469054937363, + 0.0059282416477799416, + 0.020671740174293518, + 0.0025355517864227295, + 0.04033929854631424, + -0.034199465066194534, + 0.02369862236082554, + -0.07029252499341965, + -0.00216615735553205, + 0.022134970873594284, + -0.033453501760959625, + -0.006846348289400339, + 0.021632881835103035, + 0.04733986034989357, + 0.029666313901543617, + 0.012745899148285389, + -0.02344040386378765, + 0.00677820760756731, + -0.016009479761123657, + 0.015406972728669643, + -0.013398615643382072, + 0.005160761997103691, + 0.019452380016446114, + -0.024372855201363564, + -0.030871327966451645, + 0.04590532183647156, + 0.00440762797370553, + 0.038359634578228, + 0.04088442772626877, + -0.0325927771627903, + 0.030268820002675056, + 0.023913802579045296, + -0.0019330444047227502, + 0.020886920392513275, + 0.028002245351672173, + 0.02250795252621174, + 0.007273124065250158, + -0.01443148497492075, + -0.02285224199295044, + 0.014761429280042648, + -0.0031039887107908726, + -0.00903761014342308, + 0.010565396398305893, + -0.04693818837404251, + -0.02587912417948246, + 0.04444208741188049, + -0.004647913854569197, + 0.016611987724900246, + 0.04868832975625992, + -0.0075026508420705795, + -0.0013897118624299765, + -0.0006858900305815041, + 0.01793176494538784, + 0.027155866846442223, + 0.032564084976911545, + 0.018864218145608902, + 0.03660949319601059, + 0.006304808892309666, + -0.013520551845431328, + 0.026108650490641594, + 0.00711532449349761, + 0.013355579227209091, + 0.0032833062577992678, + -0.0033765514381229877, + -0.008148194290697575, + 0.029278988018631935, + -0.017314912751317024, + -0.014309548772871494, + -0.0014130230993032455, + 0.013821804895997047, + 0.011562402360141277, + -0.0043861097656190395, + -0.019983159378170967, + 0.024200711399316788, + 0.010816440917551517, + -0.018562963232398033, + -0.0027310079894959927, + 0.013915049843490124, + 0.0008898638770915568, + -0.016626333817839622, + 0.01906505413353443, + -0.04754069820046425, + -0.04645044729113579, + 0.03551924228668213, + 0.005795546807348728, + -0.022479262202978134, + -0.0080692945048213, + 0.01932327076792717, + -0.006376536097377539, + -0.030383583158254623, + 0.006157768424600363, + -0.005587538238614798, + -0.0014802672667428851, + -0.015005301684141159, + 0.009503835812211037, + 0.0173292588442564, + -0.003659873502328992, + 0.037470217794179916, + 0.001355641521513462, + 0.0008486208389513195, + 0.003948574885725975, + -0.02628079615533352, + 0.0001474887685617432, + 0.018304746598005295, + 0.010572569444775581, + 0.03207634389400482, + 0.013341234065592289, + -0.0036939438432455063, + 0.0077608684077858925, + -0.006839175708591938, + -0.019394997507333755, + 0.006986216176301241, + 0.043638743460178375, + 0.019509760662913322, + -0.0380440354347229, + 0.035232335329055786, + 0.0035020739305764437, + -0.018591655418276787, + -0.019610179588198662, + 0.014962265267968178, + -0.029494168236851692, + 0.006537921726703644, + -0.004673018120229244, + 0.005903137382119894, + -0.00961142685264349, + -0.01658329740166664, + 0.011325703002512455, + 0.002618037862703204, + -0.0210590660572052, + 0.0025445176288485527, + -0.012351400218904018, + -0.030182749032974243, + 0.02011226862668991, + 0.009331691078841686, + -0.01017807051539421, + -0.030756564810872078, + 0.041802532970905304, + -0.009008918888866901, + -0.02214931696653366, + -0.004178101662546396, + -0.030067984014749527, + -0.02289527840912342, + 0.002453065477311611, + 0.0014390242286026478, + -0.01797480136156082, + 0.0011144592426717281, + 0.0006164044607430696, + 0.029121188446879387, + 0.02940809540450573, + -0.0733911320567131, + -0.01847689226269722, + 0.02051394060254097, + 0.007889976724982262, + -0.007423751056194305, + 0.01738663949072361, + 0.015206137672066689, + -0.0322771780192852, + -0.004637154750525951, + -0.0013027427485212684, + -0.020284414291381836, + -0.009080646559596062, + -0.01872076280415058, + -0.00901609193533659, + -0.0035702146124094725, + -0.04366743564605713, + 0.001720552914775908, + -0.02111644670367241, + -0.0076174139976501465, + 0.005684369709342718, + 0.028647789731621742, + -0.009869643487036228, + 0.04028191789984703, + -0.006268945522606373, + -0.012301191687583923, + 0.008700492791831493, + -0.006530749145895243, + -0.05468471348285675, + -0.008262957446277142, + 0.010586914606392384, + -0.011203767731785774, + 0.020241377875208855, + -0.051040977239608765, + -0.018046529963612556, + -0.033855173736810684, + 0.014331066980957985, + -0.006362190470099449, + -0.01497661042958498, + 0.000821723195258528, + 0.009970061480998993, + -0.023368677124381065, + -0.014187613502144814, + -0.015435663983225822, + -0.00252120615914464, + 0.02319653145968914, + 0.011892346665263176, + -0.021417701616883278, + -0.014094367623329163, + -0.009719016961753368, + -0.008600074797868729, + -0.022909624502062798, + 0.01484750211238861, + -0.02006923221051693, + 0.00011313823779346421, + -0.030125366523861885, + -0.027930518612265587, + 0.023110460489988327, + -0.0011458398075774312, + -0.002601899206638336, + -0.0026198308914899826, + -0.040253229439258575, + 0.02841826155781746, + -0.007567205000668764, + -0.03265015780925751, + -0.0011969453189522028, + 0.008578556589782238, + -0.003424967173486948, + -0.006720826029777527, + -0.04114264249801636, + -0.010759059339761734, + 0.017300568521022797, + 0.0031165408436208963, + -0.02085823006927967, + 0.0034285536967217922, + -0.012552236206829548, + 0.014402794651687145, + -0.019394997507333755, + -0.0005159865831956267, + 0.030785255134105682, + -0.014051332138478756, + 0.01035738829523325, + 0.03471589833498001, + -0.009532527066767216, + -0.00023804418742656708, + 0.01922285370528698, + 0.04464292526245117, + 0.004479355178773403, + 0.041544314473867416, + -0.01783134788274765, + -0.02131728269159794, + -0.006046591326594353, + 0.007043597754091024, + 0.010515187866985798, + -0.01256658136844635, + -0.01966756023466587, + -0.03164597973227501, + 0.005566020030528307, + -0.008305993862450123, + -0.010321523994207382, + -0.002765078330412507, + -0.001945596537552774, + -0.003704702714458108, + -0.03927773982286453, + -0.018792491406202316, + 0.01742967590689659, + 0.017200149595737457, + -0.015607808716595173, + 0.002840391593053937, + -0.0021679503843188286, + -0.019653216004371643, + -0.006344258785247803, + -0.032908376306295395, + -0.028030935674905777, + 0.024745836853981018, + -0.019782323390245438, + -0.02110210247337818, + 0.03233455866575241, + 0.001128804637119174, + 0.00023199222050607204, + -0.029666313901543617, + 0.009288654662668705, + 0.006233081687241793, + 0.0179891474545002, + -0.036236513406038284, + -0.019093744456768036, + 0.0017653823597356677, + -0.07040728628635406, + 0.031072163954377174, + 0.013793114572763443, + -0.0010077651822939515, + 0.008262957446277142, + -0.004185274243354797, + -0.022335806861519814, + 0.01254506316035986, + -0.0015403387369588017, + -0.029924530535936356, + -0.013549242168664932, + 0.047454625368118286, + -0.00953969918191433, + 0.014474521391093731, + -0.002218159381300211, + 0.016066862270236015, + 0.011045968160033226, + -0.01296108029782772, + 0.025219235569238663, + 0.007703486364334822, + -0.043983034789562225, + 0.002772250911220908, + -0.0010920445201918483, + 0.029723694548010826, + 0.02200586348772049, + 0.023426059633493423, + 0.014833156950771809, + 0.024903636425733566, + 0.004472182597965002, + 0.021345974877476692, + -0.007961704395711422, + 0.004895371850579977, + 0.029178569093346596, + 0.021288592368364334, + 0.011562402360141277, + -0.01241595484316349, + -0.02529096230864525, + 0.008320339024066925, + -0.00879373773932457, + 0.003294065361842513, + -0.0485735684633255, + 0.004425559658557177, + 0.05313540995121002, + 0.018519926816225052, + -0.02975238673388958, + -0.03586352989077568, + -0.03483066335320473, + 0.008184057660400867, + 0.005863687489181757, + 0.03669556602835655, + -0.019782323390245438, + -0.0397367924451828, + -0.026998067274689674, + 0.030383583158254623, + -0.007983222603797913, + 0.0127387261018157, + -0.008922846987843513, + -0.014646666124463081, + 0.008169712498784065, + -0.006476953625679016, + -0.02896338887512684, + -0.0214033555239439, + -0.0021069825161248446, + -0.008894155733287334, + 0.012322709895670414, + 0.024114638566970825, + -0.009518180973827839, + -0.016698060557246208, + -0.016927586868405342, + 0.03511757031083107, + -0.0020047714933753014, + 0.026897648349404335, + -0.0045331502333283424, + -0.023110460489988327, + 0.0059282416477799416, + -0.00014771292626392096, + -0.015191791579127312, + -0.005576779134571552, + 0.008894155733287334, + -0.002243263879790902, + -0.02592216059565544, + -0.011605438776314259, + -0.06025073304772377, + -0.007703486364334822, + 0.013628141954541206, + 0.028992079198360443, + 0.0011933590285480022, + -0.01000592578202486, + 0.042835403233766556, + 0.01807522028684616, + -0.01966756023466587, + -0.021675918251276016, + 0.018806835636496544, + 0.013054325245320797, + 0.0488891676068306, + 0.01125397626310587, + -0.010414769873023033, + 0.004343073815107346, + 0.015148756094276905, + 0.007968876510858536, + 0.009977234527468681, + -0.0035630417987704277, + 0.007839768193662167, + -0.00030484001035802066, + 0.03830225020647049, + 0.025706980377435684, + 0.040454063564538956, + -0.031617291271686554, + -0.051873013377189636, + 0.0017375880852341652, + -0.03221979737281799, + -0.03878999501466751, + -0.009726190008223057, + 0.019509760662913322, + 0.010321523994207382, + -0.010070479474961758, + 0.01445300318300724, + -0.004450664389878511, + -0.00422113761305809, + 0.0012390849879011512, + -0.052332065999507904, + -0.025420071557164192, + 0.012824798934161663, + 0.01484750211238861, + 0.006175700109452009, + -0.017573131248354912, + -0.06851369142532349, + 0.004848749376833439, + -0.01595209911465645, + -0.0055480883456766605, + 0.019036361947655678, + -0.00896588247269392, + 0.024473274126648903, + -0.022178007289767265, + 0.011813446879386902, + 0.006975457072257996, + -0.01122528500854969, + 0.03302314132452011, + 0.02583608776330948, + -0.022579679265618324, + -0.03457244485616684, + -0.03133038058876991, + -0.0031721293926239014, + 0.012107528746128082, + -0.0015824782894924283, + 0.009747708216309547, + 0.000950383604504168, + 0.020298758521676064, + -0.01107465848326683, + 0.01609555259346962, + 0.022909624502062798, + 0.04263456538319588, + 0.03695378452539444, + -0.010773404501378536, + 0.0006719929515384138, + -0.003851743182167411, + 0.013341234065592289, + -0.008535520173609257, + -0.02860475331544876, + -0.01787438429892063, + -0.03526102378964424, + -0.008908500894904137, + 0.03411339223384857, + -0.00896588247269392, + -0.009740535169839859, + -0.028375227004289627, + 0.007681968621909618, + -0.00046981225023046136, + 0.012523544952273369, + -0.005142830312252045, + 0.0025839675217866898, + 0.008908500894904137, + -0.02428678423166275, + -0.028073972091078758, + -0.005307802464812994, + -0.0030250889249145985, + 0.021919790655374527, + 0.0016246179584413767, + -0.0007585136918351054, + -0.021718954667448997, + -0.004213965032249689, + 0.0019599420484155416, + 0.029838457703590393, + 0.002015530364587903, + 0.004694536328315735, + 0.020729120820760727, + -0.017357949167490005, + 8.119727863231674e-05, + 0.020140958949923515, + -0.00733767868950963, + -0.002897773403674364, + -0.010866650380194187, + 0.005612642504274845, + 0.02285224199295044, + -0.025391381233930588, + -0.03187550604343414, + -0.028891660273075104, + 0.0077608684077858925, + 0.02622341364622116, + -0.020499594509601593, + -0.0004438112082425505, + -0.021977171301841736, + -0.030928710475564003, + -0.048057131469249725, + -0.02686895802617073, + 0.01504833810031414, + 0.0002978914708364755, + 0.015435663983225822, + -0.035433169454336166, + 0.04891785606741905, + -0.012444645166397095, + -0.0047949543222785, + 0.0077608684077858925, + 0.03706854581832886, + 0.02319653145968914, + -0.0011530125048011541, + 0.01331254281103611, + -0.02870517037808895, + 0.009317345917224884, + -0.010436288081109524, + 9.459006832912564e-05, + 0.0011781170032918453, + 0.024358510971069336, + 0.0008947951137088239, + 0.01559346355497837, + -0.01847689226269722, + 0.023928148671984673, + -0.04028191789984703, + 0.018763799220323563, + 0.006376536097377539, + -0.02001185156404972, + 0.028346534818410873, + 0.0048379902727901936, + -0.0016075827879831195, + 0.010579741559922695, + 0.006139836739748716, + -0.019007671624422073, + 0.028475644066929817, + 0.01853427290916443, + -0.022981351241469383, + -0.012796107679605484, + 0.0043861097656190395, + 0.0424337312579155, + -0.0010615605860948563, + -0.018692072480916977, + -0.01728622242808342, + -0.014338240027427673, + -0.017501402646303177, + -0.01708538644015789, + 0.04685211926698685, + -0.010199588723480701, + 0.003543316852301359, + -0.03069918230175972, + 0.020126614719629288, + 0.012250982224941254, + -0.009776398539543152, + -0.022938314825296402, + 3.13525706587825e-05, + -0.030383583158254623, + 0.021001683548092842, + -0.034400299191474915, + -0.015779953449964523, + -0.01902201771736145, + 0.009769226424396038, + -0.0027292147278785706, + -0.022809205576777458, + 0.013699868693947792, + 0.005028067156672478, + -0.006932420656085014, + ], + "index": 4, + }, + { + "title": "G\u00e9za Anda", + "text": "G\u00e9za Anda (Hungarian pronunciation: [\u02c8\u0261e\u02d0z\u0252 \u02c8\u0252nd\u0252]; 19 November 1921 \u2013 14 June 1976) was a Swiss-Hungarian pianist. A celebrated interpreter of classical and romantic repertoire, particularly noted for his performances and recordings of Mozart, he was also a tremendous interpreter of Beethoven, Schumann, Brahms and Bart\u00f3k.In his heyday he was regarded as an amazing artist, possessed of a beautiful, natural and flawless technique that gave his concerts a unique quality.", + "vector": [ + -0.016788292676210403, + 0.008837295696139336, + -0.019498568028211594, + -0.02080874890089035, + -0.0061591328121721745, + 0.007006896659731865, + 0.016672689467668533, + -0.012228351086378098, + 0.0063453842885792255, + 0.009569455869495869, + -0.051456697285175323, + -0.008124403655529022, + -0.002411631401628256, + 0.03108467534184456, + 0.007276639807969332, + 0.031932439655065536, + -0.06689627468585968, + -0.01726355589926243, + -0.0675642117857933, + -0.030596569180488586, + 0.02561274543404579, + -0.053588952869176865, + -0.013121072202920914, + -0.03455280140042305, + 0.04631873592734337, + 0.03313986212015152, + 0.009209798648953438, + 0.037635575979948044, + -0.021450994536280632, + -0.05125118046998978, + -0.007816125638782978, + -0.017469072714447975, + -0.022953849285840988, + 0.004081469029188156, + -0.030802087858319283, + -0.0397164523601532, + 0.05261274054646492, + 0.015709321945905685, + -0.010096097365021706, + 0.009306135587394238, + 0.029851563274860382, + 0.02725689299404621, + -0.025060413405299187, + -0.002559347776696086, + -0.007739056367427111, + 0.021964790299534798, + 0.046293046325445175, + 0.01867649517953396, + -0.03352520614862442, + -0.003991554956883192, + 0.012298998422920704, + 0.009575878269970417, + 0.027436722069978714, + -0.005243933293968439, + 0.02038486674427986, + 0.009216221049427986, + -0.002684585517272353, + 0.028926730155944824, + -0.017610367387533188, + -0.004518195986747742, + -0.009974069893360138, + -0.026434818282723427, + -0.06674213707447052, + 0.0041007366962730885, + -0.014630349352955818, + -0.03501521795988083, + 0.01107230968773365, + 0.006615126971155405, + 0.005478352773934603, + 0.0020600019488483667, + -0.013538531959056854, + -0.03432159125804901, + 0.030262600630521774, + 0.026794476434588432, + 0.010764031670987606, + -0.047166500240564346, + 0.09731301665306091, + 0.03147002309560776, + -0.08035773783922195, + -0.01916460134088993, + -0.00767483189702034, + -0.03935679420828819, + 0.008336344733834267, + -0.002801795257255435, + 0.03221502527594566, + -0.04765460640192032, + -0.012196239084005356, + -0.05333205312490463, + -0.03311416879296303, + 0.0336022786796093, + 0.0127935279160738, + -0.030827777460217476, + -0.057904839515686035, + 0.05754518508911133, + 0.031855370849370956, + -0.04372406378388405, + -0.047166500240564346, + -0.012196239084005356, + -0.015054231509566307, + 0.030981915071606636, + -0.0248163603246212, + -0.04806564375758171, + 0.05027496814727783, + -0.03504090756177902, + 0.03935679420828819, + 0.051713597029447556, + -0.031521402299404144, + -0.04796288162469864, + 0.009717172011733055, + -0.0022735486272722483, + 0.05369171127676964, + 0.00378924747928977, + 0.033653657883405685, + 0.0366593636572361, + -0.03108467534184456, + 0.024610841646790504, + -0.02030779793858528, + -0.015940530225634575, + -0.019794002175331116, + 0.0011616612318903208, + 0.009312557987868786, + -0.00895289983600378, + -0.02187487669289112, + 0.017841575667262077, + 0.010738342069089413, + -0.0018239767523482442, + 0.0025143905077129602, + -0.023660318925976753, + 0.010449332185089588, + -0.02283824421465397, + 0.0336022786796093, + 0.04513700306415558, + 0.0068591805174946785, + 0.021399615332484245, + 0.03457849100232124, + -0.006066007539629936, + 0.03296003118157387, + 0.04403234273195267, + -0.005359537433832884, + 0.028438623994588852, + -0.0034777584951370955, + -0.0013695881934836507, + 0.011547571048140526, + -0.06288866698741913, + -0.051867734640836716, + -0.03298572078347206, + 0.02661464735865593, + 0.029543286189436913, + -0.01863796077668667, + -0.00969790481030941, + 0.05243290960788727, + -0.02897811122238636, + 0.0014241790631785989, + -0.06211797147989273, + -0.03483538702130318, + 0.01448905561119318, + -0.030827777460217476, + 0.008631777949631214, + -0.038817308843135834, + 0.059805888682603836, + -0.03527211397886276, + 0.015439578332006931, + 0.026974305510520935, + 0.03046811930835247, + -0.025676969438791275, + -0.006165555212646723, + 0.02825879491865635, + -0.016865363344550133, + 0.008850141428411007, + 0.06324832141399384, + 0.01912606693804264, + -0.03414176404476166, + -0.03570884093642235, + 0.022118929773569107, + -0.0347583182156086, + 0.04066697508096695, + 0.009216221049427986, + 0.008978590369224548, + -0.036864884197711945, + 0.012485249899327755, + 0.020988577976822853, + -0.03519504517316818, + 0.02485489472746849, + 0.012665078043937683, + 0.020975733175873756, + 0.000504965428262949, + 0.06329970061779022, + -0.025728348642587662, + -0.007238104939460754, + -0.01748191937804222, + -0.041643187403678894, + -0.007071121130138636, + 0.010693385265767574, + -0.02890104055404663, + 0.05811036005616188, + 0.013397238217294216, + 0.026434818282723427, + -0.014668883755803108, + -0.05137962847948074, + -0.02324928157031536, + 0.004521407186985016, + -0.04446906968951225, + 0.03635108843445778, + 0.0009834382217377424, + -0.014553279615938663, + 0.05888105556368828, + -0.015568027272820473, + 0.027744999155402184, + -0.040230248123407364, + -0.03909989818930626, + 0.0484766811132431, + -0.004672334995120764, + 0.0044250707142055035, + 0.010205279104411602, + -0.009351092390716076, + -0.018355371430516243, + -0.016929587349295616, + 0.05266411975026131, + 0.015067076310515404, + 0.029183628037571907, + -0.007886772975325584, + -0.019267359748482704, + -0.012812795117497444, + 0.006705041509121656, + 0.049504272639751434, + 0.012106324546039104, + 0.027205513790249825, + 0.014912936836481094, + 0.039921972900629044, + 0.007218837738037109, + -0.007809703703969717, + 0.03265175223350525, + -0.009453851729631424, + -0.022517122328281403, + -0.011175069026648998, + 0.018984772264957428, + -0.024983344599604607, + -0.07249665260314941, + 0.020140813663601875, + 0.006672929041087627, + -0.04508562386035919, + 0.03177829831838608, + -0.017494764178991318, + 0.007983109913766384, + -0.014155087992548943, + -0.018869169056415558, + 0.01848382130265236, + -0.020513316616415977, + -0.01420646719634533, + -0.024610841646790504, + -0.007006896659731865, + -0.04860512912273407, + -0.027282582595944405, + 0.005940769333392382, + -0.026820166036486626, + 0.00042709315312094986, + 0.031058985739946365, + 0.011887961067259312, + -0.03290865197777748, + 0.054616544395685196, + -0.016698379069566727, + 0.02715413272380829, + -0.012909132055938244, + 0.02260703593492508, + -0.04231112450361252, + -0.011971453204751015, + -0.0097364392131567, + -0.014874402433633804, + 0.008766649290919304, + 0.011457657441496849, + 0.003326830919831991, + 0.011245716363191605, + 0.009691482409834862, + -0.028361555188894272, + -0.01614604890346527, + -0.016698379069566727, + -0.005475141573697329, + 0.04061559587717056, + 0.025343000888824463, + -0.053743090480566025, + 0.03334537893533707, + 0.005253566894680262, + 0.0031052562408149242, + 0.018779253587126732, + -0.02279970981180668, + -0.02595955692231655, + 0.023930061608552933, + -0.01637725718319416, + -0.05471930280327797, + 0.012215506285429, + 0.0031871425453573465, + -0.026897234842181206, + 0.020795904099941254, + 0.026010936126112938, + -0.09274023026227951, + 0.05302377790212631, + 0.0435185469686985, + 0.03491245582699776, + 0.007366554345935583, + -0.015979064628481865, + 0.005276045762002468, + -0.024842049926519394, + 0.010905326344072819, + 0.010108942165970802, + -0.018650805577635765, + 0.003619052469730377, + -0.017314935103058815, + 0.01660846546292305, + 0.004527829587459564, + 0.024289719760417938, + -0.015092765912413597, + 0.018997617065906525, + -0.018920548260211945, + -0.016891052946448326, + -0.002019861713051796, + -0.013178874738514423, + 0.01809847354888916, + 0.040076110512018204, + 0.01695527695119381, + 0.017880110070109367, + 0.00989057868719101, + -0.021476684138178825, + -0.0219519454985857, + -0.03555470332503319, + 0.029774494469165802, + -0.0004840924229938537, + -0.012363223358988762, + -0.04074404388666153, + 0.025522829964756966, + -0.04254233092069626, + -0.0006141471094451845, + -0.04025593772530556, + 0.0347583182156086, + 0.042285434901714325, + 0.04436630755662918, + -0.02080874890089035, + -0.019074687734246254, + 0.024597996845841408, + -0.017212174832820892, + 0.026820166036486626, + -0.026242144405841827, + 0.021284010261297226, + -0.009781396947801113, + 0.012928399257361889, + -0.038971446454524994, + -0.001094225561246276, + 0.039767831563949585, + -0.015979064628481865, + 0.01889485865831375, + -0.0008493695058859885, + 0.0004684377054218203, + -0.007482158485800028, + 0.018008559942245483, + 0.06627972424030304, + -0.037173159420490265, + -0.005558633711189032, + 0.004116792697459459, + -0.0014281930634751916, + -0.03134157508611679, + 0.01683967374265194, + 0.03948524594306946, + 0.024520928040146828, + -0.0031823257450014353, + 0.03845765069127083, + 0.0412321500480175, + -0.058470018208026886, + -0.02069314569234848, + -0.044237859547138214, + -0.014270692132413387, + -0.03306278958916664, + -0.004778305534273386, + -0.02313367836177349, + -0.027616551145911217, + -0.0028740479610860348, + 0.011027352884411812, + 0.007989532314240932, + -0.05261274054646492, + 0.022427206858992577, + 0.052715498954057693, + 0.010327305644750595, + 0.0008854957995936275, + -0.026640336960554123, + -0.019832536578178406, + -0.005979304201900959, + -0.026743097230792046, + -0.00029222163720987737, + 0.0011062676785513759, + 0.024572307243943214, + 0.024906273931264877, + -0.007687676697969437, + -0.063402459025383, + 0.06155279651284218, + -0.03188106045126915, + -0.002533657941967249, + -0.036479536443948746, + -0.03886868804693222, + 0.05322929471731186, + 0.04834822937846184, + 0.023043762892484665, + 0.00473334826529026, + 0.0339876227080822, + 0.024752136319875717, + -0.01668553426861763, + -0.02795051783323288, + -0.00818862859159708, + -0.036864884197711945, + -0.03367934748530388, + 0.0038695281837135553, + 0.023660318925976753, + -0.011618218384683132, + -0.009286867454648018, + 0.01084110140800476, + -0.03445003926753998, + -0.020076589658856392, + 0.0150799211114645, + 0.01067411806434393, + -0.005654970183968544, + 0.024687912315130234, + 0.02012796886265278, + -0.025831108912825584, + -0.00521182082593441, + 0.0098327761515975, + -0.020872974768280983, + 0.06093623861670494, + -0.032703135162591934, + -0.012478827498853207, + 0.0013511236757040024, + -0.013358703814446926, + 0.0035066595301032066, + 0.030596569180488586, + 0.007295907009392977, + 0.011669598519802094, + 0.032471925020217896, + 0.005154018756002188, + 0.012196239084005356, + -0.08087153732776642, + -0.029389146715402603, + 0.011894384399056435, + -0.0008646228234283626, + -0.03447572886943817, + 0.007199570536613464, + -0.03832920268177986, + -0.03272882476449013, + 0.011194336228072643, + -0.002506362507119775, + -0.024944810196757317, + -0.021977635100483894, + 0.03188106045126915, + 0.0018496665870770812, + -0.025497140362858772, + -0.00017942729755304754, + -0.0664338618516922, + 0.009017124772071838, + 0.009068503975868225, + 0.055541377514600754, + 0.011348475702106953, + 0.0009794242214411497, + 0.021592289209365845, + -0.03696764260530472, + 0.0018239767523482442, + 0.00030466512544080615, + 0.009723594412207603, + -0.0015052625676617026, + -0.044648896902799606, + 0.05369171127676964, + 0.018470976501703262, + 0.03886868804693222, + -0.051867734640836716, + -0.013859654776751995, + 0.014000948518514633, + 0.031187433749437332, + -0.028618453070521355, + 0.03981921076774597, + -0.029851563274860382, + 0.04454613849520683, + -0.005006302613765001, + 0.0009063687757588923, + 0.010128209367394447, + 0.01939580962061882, + 0.023005228489637375, + -0.0060210502706468105, + -0.021707892417907715, + 0.043158888816833496, + -0.009318980388343334, + 0.048168402165174484, + -0.02543291635811329, + 0.04891340434551239, + -0.058367256075143814, + -0.060730721801519394, + -0.019948139786720276, + -0.014553279615938663, + 0.05456516519188881, + -0.003419956425204873, + 0.020988577976822853, + -0.023159367963671684, + 0.0058990237303078175, + -0.023647474125027657, + 0.018432442098855972, + -0.021707892417907715, + -0.015670787543058395, + 0.0052503556944429874, + -0.03311416879296303, + -0.0012893076054751873, + -0.022863933816552162, + 0.04601045697927475, + -0.05143100768327713, + 9.623645019019023e-05, + 0.016274496912956238, + -0.0032128323800861835, + -0.03825213387608528, + 0.014065173454582691, + 0.015670787543058395, + 0.002191662322729826, + 0.001377616310492158, + -0.023814458400011063, + -0.034270212054252625, + -0.035760220140218735, + -0.004004399757832289, + 0.02088581956923008, + 0.0015983880730345845, + -0.00047606436419300735, + 0.022915314882993698, + 0.0009625652455724776, + 0.05096859112381935, + 0.029029490426182747, + 0.0006819842965342104, + -0.02371169812977314, + 0.023223591968417168, + -0.00757849495857954, + -0.06931111961603165, + -0.018111318349838257, + -0.0086831571534276, + 0.004418647848069668, + -0.036068499088287354, + -0.03822644427418709, + 0.004319100175052881, + 0.022427206858992577, + -0.011354898102581501, + -0.0006703435792587698, + -0.028438623994588852, + 0.022632725536823273, + 0.021014267578721046, + -0.03468124940991402, + 0.04881064593791962, + -0.03306278958916664, + 0.002658895682543516, + 0.01745622791349888, + -0.06288866698741913, + 0.024084201082587242, + 0.006220146082341671, + 0.012498094700276852, + -0.01581208035349846, + 0.017687436193227768, + 0.008368456736207008, + -0.00409431429579854, + -0.0003409921482671052, + -0.008426259271800518, + 0.014116552658379078, + 0.01641579158604145, + -0.02409704588353634, + 0.036479536443948746, + -0.032317787408828735, + 0.04482872411608696, + -0.022324448451399803, + -0.008060179650783539, + 0.009742861613631248, + 0.005035203415900469, + 0.028387244790792465, + -0.009620835073292255, + 0.01786726526916027, + 0.0003327633603475988, + -0.03838058188557625, + -0.015837769955396652, + -0.004299832507967949, + -0.026139385998249054, + -0.014450520277023315, + 0.04577925056219101, + 0.011322785168886185, + -0.017314935103058815, + -0.00569992745295167, + 0.012485249899327755, + 0.01019243337213993, + 0.04187439754605293, + 0.023005228489637375, + 0.05137962847948074, + -0.007347286678850651, + 0.03794385492801666, + -0.023223591968417168, + 0.041900087147951126, + -0.021810652688145638, + -0.008464793674647808, + -0.00243892683647573, + 0.014078018255531788, + 0.0017886533169075847, + -0.014476209878921509, + -0.006197667680680752, + -0.010558513924479485, + 0.02065461128950119, + -0.030904846265912056, + -0.011149379424750805, + -0.010500711388885975, + -0.007347286678850651, + 0.04210560396313667, + 0.004938866943120956, + 0.030288290232419968, + -0.010320883244276047, + 0.009954802691936493, + 0.00924191065132618, + -0.04187439754605293, + -0.030211221426725388, + 0.016980966553092003, + 0.019832536578178406, + 0.014617504552006721, + -0.01741769351065159, + 0.01879209838807583, + 0.01338439341634512, + 0.06895145773887634, + 0.005719194654375315, + -0.0005732039571739733, + 0.02115556225180626, + 0.04184870794415474, + 0.007051853928714991, + 0.0177516620606184, + -0.003917696885764599, + 0.009267600253224373, + 0.035220734775066376, + 0.0019315528916195035, + 0.005712772253900766, + -0.0381750650703907, + 0.010969550348818302, + -0.02833586558699608, + -0.0026460508815944195, + -0.020641766488552094, + -0.0012877018889412284, + 0.04233681410551071, + 0.016711223870515823, + -0.02524024248123169, + -0.04061559587717056, + 0.03927972540259361, + 0.01641579158604145, + -0.009614412672817707, + 0.01452759001404047, + -0.003220860380679369, + -0.047783054411411285, + -0.011277828365564346, + 0.00786750577390194, + -0.0013575460761785507, + -0.014232156798243523, + -0.022170308977365494, + 0.021361080929636955, + 0.008959322236478329, + -0.03504090756177902, + 0.015979064628481865, + -0.012491672299802303, + 0.009351092390716076, + 0.01916460134088993, + 0.0401018001139164, + 0.004832896403968334, + 0.022889625281095505, + -0.01393672451376915, + 0.03876592963933945, + 0.0020503683481365442, + -0.012851329520344734, + -0.006322905421257019, + 0.004595265723764896, + 0.0027006417512893677, + -0.03486107662320137, + -0.043775442987680435, + 0.01515698991715908, + 0.046678394079208374, + 0.014823023229837418, + -0.020436247810721397, + 0.0021515218541026115, + -0.03707040101289749, + 0.03594005107879639, + -0.028156036511063576, + -0.0013695881934836507, + -0.0439038909971714, + 0.015336818993091583, + 0.004033301025629044, + 0.029157938435673714, + 0.02661464735865593, + 0.002360251732170582, + -0.0086831571534276, + -0.028798282146453857, + -0.006583014968782663, + -0.04053852707147598, + 0.02882397174835205, + 0.019113222137093544, + 0.005895812530070543, + -0.032780203968286514, + -0.021977635100483894, + 0.005295312963426113, + 0.06119313836097717, + -0.01610751263797283, + -0.0001550420420244336, + 0.005362748634070158, + 0.006743576377630234, + -0.030673637986183167, + -0.0032802680507302284, + -0.05322929471731186, + 0.06982491165399551, + 0.022825399413704872, + -0.018689339980483055, + 0.014347760938107967, + 0.0017051614122465253, + 0.018946237862110138, + -0.023390576243400574, + -0.010128209367394447, + -0.021592289209365845, + 0.005658181384205818, + 0.026434818282723427, + -0.05769932270050049, + -0.004659490194171667, + -0.047860123217105865, + 0.015799235552549362, + -0.024032821878790855, + -0.05166221782565117, + -0.0126008540391922, + 0.007809703703969717, + -0.022619880735874176, + 0.0032545782160013914, + -0.016158893704414368, + -0.04523976147174835, + -0.0020696355495601892, + -0.02561274543404579, + 0.021245475858449936, + 0.0355033241212368, + -0.013769740238785744, + 0.02175927348434925, + -0.03573453053832054, + 0.022131774574518204, + 0.027976207435131073, + -0.007617029827088118, + -0.013628446497023106, + -0.02676878683269024, + 0.014784487895667553, + -0.01433491613715887, + 0.035760220140218735, + 0.024122735485434532, + -0.013988103717565536, + 0.037815406918525696, + -0.012363223358988762, + -0.021784963086247444, + -0.006640817038714886, + -0.006865602917969227, + -0.008882253430783749, + 0.023737387731671333, + -0.013692670501768589, + 0.049041856080293655, + -0.0051122731529176235, + 0.029260698705911636, + 0.0038438383489847183, + 0.004823262803256512, + 0.00163692282512784, + 0.004145693965256214, + 0.013499997556209564, + -0.0336022786796093, + 0.004177805967628956, + -0.007000474259257317, + 0.004759037867188454, + 0.002316900063306093, + -0.011380587704479694, + -0.0051636528223752975, + -0.015015696175396442, + 0.04529114067554474, + 0.02638343907892704, + -0.018843479454517365, + -0.02249143272638321, + -0.00989057868719101, + -0.013255944475531578, + 0.00864462275058031, + -0.013872499577701092, + 0.04721787944436073, + 0.0442892387509346, + -0.020564695820212364, + 0.024495238438248634, + 0.0016923164948821068, + 0.004447549115866423, + 0.015722166746854782, + -0.035297803580760956, + 0.019537104293704033, + -0.021772118285298347, + 0.015452423132956028, + -0.03257468342781067, + -0.04413510113954544, + -0.004537463653832674, + -0.015221214853227139, + -0.017584677785634995, + 0.007071121130138636, + -0.060114163905382156, + -0.0074757360853254795, + -0.03139295428991318, + -0.058624155819416046, + -0.01558087207376957, + -0.02890104055404663, + 0.02470075711607933, + -0.016659844666719437, + 0.0036351087037473917, + -0.006660084240138531, + 0.011483347043395042, + -0.03994766250252724, + 0.03180399164557457, + -0.04737201705574989, + 0.02375023253262043, + -0.01254305150359869, + -0.015002851374447346, + 0.005314580164849758, + -0.043158888816833496, + 6.04613778705243e-05, + -0.011329208500683308, + -0.013358703814446926, + -0.032471925020217896, + -0.0036062076687812805, + 0.009691482409834862, + 0.018535200506448746, + -0.014823023229837418, + -0.004874642007052898, + 0.006794956047087908, + 0.009222643449902534, + -0.033088479191064835, + 0.02982587367296219, + -0.045265451073646545, + -0.012857751920819283, + 0.022632725536823273, + 0.005154018756002188, + -0.0021242264192551374, + 0.006717886310070753, + 0.01558087207376957, + 0.016094667837023735, + -0.012844907119870186, + -0.03141864389181137, + -0.03077639825642109, + 0.0056967162527143955, + -0.008387723937630653, + 0.0031213124748319387, + 0.020153658464550972, + 0.015632251277565956, + -0.0005017541698180139, + 0.045496661216020584, + 0.016248807311058044, + 0.0011191124795004725, + -0.002980018500238657, + -0.01424500159919262, + 0.006406397558748722, + 0.0012788710882887244, + -0.026640336960554123, + -0.03331968933343887, + -0.01993529498577118, + -0.025330156087875366, + -0.01622311770915985, + -0.007873928174376488, + 0.005571478512138128, + 0.030031392350792885, + -0.005500831641256809, + 0.007096811197698116, + 0.028310175985097885, + -0.019485723227262497, + -0.010340150445699692, + -0.02715413272380829, + 0.03981921076774597, + 0.02707706391811371, + -0.011798047460615635, + -0.014630349352955818, + 0.026409128680825233, + -0.004967767745256424, + 0.0023843359667807817, + -0.038200754672288895, + -0.03362796828150749, + -0.011213603429496288, + -0.04755184426903725, + 0.009550188668072224, + 0.05548999831080437, + -0.039999041706323624, + -0.01817554421722889, + 0.08010084182024002, + -0.025599900633096695, + 0.0021611556876450777, + -0.025381537154316902, + -0.012934821657836437, + 0.03439866006374359, + 0.018149854615330696, + 0.02156659960746765, + -0.015144145116209984, + 0.0223372932523489, + 0.03344813734292984, + -0.03303709998726845, + 0.01244671456515789, + -0.04575355723500252, + 0.03845765069127083, + 0.0171864852309227, + -0.0013085749233141541, + -0.037815406918525696, + -0.01600475423038006, + 0.012305420823395252, + 0.022478587925434113, + -0.028053276240825653, + -0.00023140902339946479, + -0.043775442987680435, + 0.0026894023176282644, + 0.0010637188097462058, + 0.023185057565569878, + -0.0027166977524757385, + 0.05055755376815796, + -0.05785346031188965, + -0.043313026428222656, + -0.0012395335361361504, + -0.03421883285045624, + -0.0052824681624770164, + -0.004980612546205521, + 0.021206941455602646, + 0.04025593772530556, + 0.032548993825912476, + -0.02446954883635044, + -0.015298284590244293, + -0.022311603650450706, + -0.020705990493297577, + -0.0412321500480175, + 0.04680684208869934, + -0.008484060876071453, + -0.01120718102902174, + -0.025638435035943985, + 0.015246904455125332, + -0.004575998056679964, + -0.005558633711189032, + -0.04436630755662918, + -0.02779637835919857, + 0.006884870119392872, + -0.00204715714789927, + -0.010494288988411427, + -0.016929587349295616, + -0.015940530225634575, + -0.01626165211200714, + 0.02524024248123169, + 0.018239768221974373, + 0.008946477435529232, + -0.035374872386455536, + 0.0295946653932333, + 0.010963127948343754, + -0.010590625926852226, + 0.02717982418835163, + 0.011502614244818687, + 0.051148418337106705, + 0.027308272197842598, + -0.01588914915919304, + -0.012979778461158276, + -0.05502758175134659, + 0.003222465980798006, + 0.0064641996286809444, + 0.008349189534783363, + -0.01244671456515789, + -0.028644142672419548, + 0.0022494643926620483, + -0.004017244558781385, + 0.00507694948464632, + -0.006181611679494381, + 0.0051829200237989426, + -0.02715413272380829, + 0.01653139479458332, + 0.04254233092069626, + -0.016711223870515823, + 0.03935679420828819, + -0.029312077909708023, + 0.013898189179599285, + 0.012838484719395638, + -0.02810465730726719, + -0.024649376049637794, + 0.033191241323947906, + -0.03838058188557625, + -0.0074950032867491245, + -0.03326831012964249, + 0.019729778170585632, + -0.0031164956744760275, + 0.0037282342091202736, + 0.00522145489230752, + -0.03272882476449013, + -0.039305415004491806, + 0.02287677861750126, + 0.009447429329156876, + 0.002385941566899419, + -0.006814223248511553, + 0.025574209168553352, + -0.0004106356354895979, + 0.011155801825225353, + 0.01608182303607464, + -0.054205507040023804, + -0.02897811122238636, + -0.008098714053630829, + 0.011097999289631844, + 0.01034657284617424, + -0.048964787274599075, + -0.025291621685028076, + 0.037481438368558884, + 0.0015783179551362991, + 0.021810652688145638, + 0.007411511614918709, + -0.018162699416279793, + -0.02967173606157303, + -0.0021772116888314486, + -0.006865602917969227, + -0.018047094345092773, + -0.07809703797101974, + -0.0035837290342897177, + -0.03868886083364487, + -0.01374405063688755, + 0.06170693412423134, + 0.009453851729631424, + -0.0030570877715945244, + -0.014553279615938663, + 0.026023780927062035, + 0.004026878159493208, + -0.026126541197299957, + 0.016557084396481514, + 0.024919120594859123, + 0.02913224883377552, + 0.022003326565027237, + -0.01734062470495701, + -0.0227226410061121, + 0.00836203433573246, + 0.037327300757169724, + 0.03457849100232124, + -0.018509510904550552, + -0.034989528357982635, + 0.02967173606157303, + -0.010076829232275486, + 0.03825213387608528, + 0.018843479454517365, + -0.04082111641764641, + -0.00329792988486588, + -0.032934341579675674, + 0.03257468342781067, + -0.0008176586125046015, + 0.0007193147903308272, + -0.0008557919063605368, + -0.03470693901181221, + 0.024610841646790504, + -0.010815411806106567, + -0.022118929773569107, + -0.054051369428634644, + 0.011059464886784554, + 0.020834438502788544, + -0.019023306667804718, + -0.02287677861750126, + -0.020102279260754585, + -0.010731919668614864, + -0.02684585563838482, + -0.009704327210783958, + 0.001135168713517487, + 0.0033846329897642136, + -0.020397711545228958, + -0.0012852934887632728, + -0.009607990272343159, + 0.005532943643629551, + 0.004344789776951075, + 0.0043929582461714745, + -0.00010426451626699418, + -0.017623212188482285, + -0.017494764178991318, + -0.011412699706852436, + -0.013846809975802898, + 0.0006390341441147029, + -0.04184870794415474, + 0.011059464886784554, + -0.04462320730090141, + -0.003840627148747444, + -0.012170549482107162, + 0.05094290152192116, + 0.009325402788817883, + -0.02283824421465397, + 0.015041385777294636, + -0.008586820214986801, + -0.020025210455060005, + -0.017353469505906105, + 0.006865602917969227, + -0.0038277823477983475, + -0.006615126971155405, + -0.0204234030097723, + -0.028310175985097885, + 0.0099291130900383, + -0.021810652688145638, + 0.032857272773981094, + -0.0068463352508842945, + -0.018843479454517365, + -0.026010936126112938, + -0.018920548260211945, + -0.02764224074780941, + 0.015041385777294636, + 0.03306278958916664, + 0.03054518811404705, + -0.009537343867123127, + -0.004582420457154512, + -0.00288207596167922, + 0.02375023253262043, + -0.02256850153207779, + -0.0389457568526268, + -0.01267792284488678, + -0.0009208192932419479, + -0.07383252680301666, + -0.012254041619598866, + 0.004007610958069563, + 0.025869643315672874, + -0.035066597163677216, + 0.019755467772483826, + -0.0124081801623106, + 0.0007739056600257754, + 0.011887961067259312, + -0.011579683981835842, + -0.01641579158604145, + 0.008233585394918919, + 0.03493814542889595, + -0.011175069026648998, + 0.020821593701839447, + -0.01821407862007618, + -0.01703234761953354, + 0.022504277527332306, + 0.05975450947880745, + 0.029646046459674835, + -0.02390437200665474, + -0.030493808910250664, + 0.02439247816801071, + -0.03712178021669388, + -0.003050665371119976, + 0.02179780788719654, + 0.012530206702649593, + -0.006454566027969122, + 0.0059504033997654915, + -0.013069692999124527, + 0.008766649290919304, + 0.005940769333392382, + 0.010410796850919724, + -0.0021964791230857372, + -0.02061607502400875, + 0.016749758273363113, + 0.011483347043395042, + 0.015362508594989777, + -0.019614173099398613, + -0.004913176875561476, + -0.03830351307988167, + -0.015298284590244293, + -0.0401018001139164, + -0.0015967824729159474, + 0.006666506640613079, + -0.01223477441817522, + 0.042439572513103485, + -0.03344813734292984, + 0.004126426298171282, + -0.0010259869741275907, + -0.022774020209908485, + 0.0008076235535554588, + 0.0030892002396285534, + -0.006583014968782663, + -0.02386583760380745, + 0.012247619219124317, + 0.011598951183259487, + 0.04834822937846184, + 0.001353532075881958, + 0.008773071691393852, + 0.010134631767868996, + -0.01726355589926243, + -0.031213123351335526, + -0.017392003908753395, + 0.012292576022446156, + -0.00581232039257884, + 0.003490603528916836, + -0.0043608457781374454, + -0.010436487384140491, + -0.012979778461158276, + -0.046061836183071136, + -0.008753804489970207, + 0.01978115737438202, + 0.026871545240283012, + 0.007591340225189924, + -0.008612509816884995, + -0.028310175985097885, + 0.00714819086715579, + -0.015863459557294846, + 0.010905326344072819, + -0.027847759425640106, + 0.0027118809521198273, + 0.01691674254834652, + 0.04143767058849335, + -0.016544239595532417, + -0.025458605960011482, + -0.011772356927394867, + 0.003177508944645524, + 0.013133917935192585, + 0.011521881446242332, + -0.01680113933980465, + 0.011457657441496849, + 0.03462987020611763, + -0.016171738505363464, + -0.0009906634222716093, + -0.014514745213091373, + -0.00822716299444437, + 5.6497519835829735e-05, + -0.02423834055662155, + -0.010764031670987606, + 0.009286867454648018, + 0.013031158596277237, + 0.03452711179852486, + 0.013448617421090603, + -0.004983823746442795, + 0.030725017189979553, + -0.0011014507617801428, + -0.014501900412142277, + -0.000690413755364716, + 0.009819931350648403, + -0.010969550348818302, + -0.007745478767901659, + 0.02603662572801113, + 0.002467827871441841, + 0.0036094188690185547, + -0.020025210455060005, + 0.0037764026783406734, + -0.0038952180184423923, + -0.0006314074853435159, + 0.010083251632750034, + 0.0021852399222552776, + -0.006660084240138531, + -0.028798282146453857, + -0.005481563974171877, + 0.030596569180488586, + -0.011765934526920319, + -0.024944810196757317, + -0.013846809975802898, + -0.001516501884907484, + -0.00590865733101964, + -0.014630349352955818, + 0.013371548615396023, + -0.008715269155800343, + -0.017687436193227768, + -0.0006145485094748437, + 0.016659844666719437, + 0.006647239439189434, + 0.011598951183259487, + -0.02458515204489231, + -0.00031128828413784504, + 0.0032610008493065834, + -0.0009505231282673776, + 0.02715413272380829, + -0.031136054545640945, + -0.027693619951605797, + 0.010365840047597885, + 0.04539390280842781, + -0.030802087858319283, + -0.01618458330631256, + -0.004926021676510572, + -0.008991435170173645, + 0.014553279615938663, + 0.007784013636410236, + 0.01759752258658409, + 0.004502139985561371, + -0.02454661764204502, + 0.029723115265369415, + 0.02561274543404579, + -0.00975570734590292, + 0.01889485865831375, + -0.010956705547869205, + -0.006027472671121359, + 0.024264030158519745, + -0.04978685826063156, + -0.024752136319875717, + 0.01920313574373722, + -0.006075641140341759, + -0.005285679362714291, + -0.018548045307397842, + -0.03555470332503319, + -0.006627972237765789, + 0.006634394638240337, + 0.012337532825767994, + 0.017584677785634995, + -0.014733108691871166, + 0.02577972784638405, + 0.007103233598172665, + -0.02818172611296177, + 0.01531112939119339, + 0.021219786256551743, + 0.006518790498375893, + 0.008830873295664787, + 0.005629280582070351, + 0.0015060653677210212, + 0.02279970981180668, + -0.014938627369701862, + 0.02351902425289154, + 0.03493814542889595, + 0.009196953848004341, + 0.00016357186541426927, + -0.014514745213091373, + -0.029183628037571907, + -0.012562318705022335, + -0.0374300591647625, + 0.0018496665870770812, + -0.022247379645705223, + 0.05096859112381935, + 0.03540056571364403, + -0.016390101984143257, + -0.040230248123407364, + 0.0032850850839167833, + -0.010815411806106567, + 0.005157230421900749, + -0.014155087992548943, + 0.022350138053297997, + -0.0068591805174946785, + 0.042362503707408905, + 0.009884156286716461, + 0.050300657749176025, + -0.015465267933905125, + 0.0047879391349852085, + -0.005738462321460247, + 0.04028162732720375, + 0.010070406831800938, + -0.013178874738514423, + -0.00822716299444437, + 0.006470622029155493, + -0.009055659174919128, + 0.04462320730090141, + 0.029774494469165802, + -0.026588957756757736, + -0.025394381955266, + 0.01805993914604187, + -0.0061559216119349, + -8.31908400868997e-05, + -0.038971446454524994, + 0.014103707857429981, + 0.0021338602527976036, + -0.002143493853509426, + 0.04115508124232292, + -0.051790665835142136, + -0.005911868531256914, + -0.02707706391811371, + -0.012742147780954838, + 0.022915314882993698, + 0.021707892417907715, + -0.01931874081492424, + -0.007411511614918709, + -0.00081244035391137, + 0.028618453070521355, + 0.022825399413704872, + -0.016480015590786934, + -0.0051315403543412685, + 0.01726355589926243, + 0.036941953003406525, + -0.00012614100705832243, + 0.01939580962061882, + -0.01763605698943138, + -0.008008799515664577, + 0.016582775861024857, + 0.024084201082587242, + -0.02554851956665516, + -0.026023780927062035, + -0.017404848709702492, + 0.028001897037029266, + 0.033807795494794846, + 0.001767780282534659, + 0.0005475141806527972, + -0.028644142672419548, + -0.0065541137009859085, + 0.029337767511606216, + -0.003323619719594717, + -0.0009633680456317961, + 0.012318265624344349, + 0.016929587349295616, + 0.01641579158604145, + -0.016274496912956238, + -0.010513556189835072, + 0.006647239439189434, + 0.04585631936788559, + -0.007250950206071138, + -0.017854420468211174, + -0.04249095171689987, + 0.013076115399599075, + 0.007456468418240547, + -0.04246526211500168, + 0.011380587704479694, + 0.006608704570680857, + 0.006794956047087908, + 0.0018159487517550588, + 0.016120359301567078, + -0.0011640697484835982, + 0.009871311485767365, + 0.011695288121700287, + 0.00198614364489913, + 0.014386296272277832, + -0.002657290082424879, + -0.018740719184279442, + 0.01067411806434393, + -0.0032256771810352802, + -0.00315021350979805, + -0.05292101576924324, + 0.013628446497023106, + 0.01025023590773344, + 0.007026164326816797, + 0.004216340836137533, + -0.047705985605716705, + 0.00501272501423955, + -0.008792338892817497, + 0.02489342913031578, + -0.030057081952691078, + 0.03288296237587929, + 0.011920074000954628, + -0.004126426298171282, + 0.017957180738449097, + 0.0014354183804243803, + 0.03226640820503235, + -0.035683151334524155, + -0.010924593545496464, + 0.01951141469180584, + -0.00011751082638511434, + 0.03989627957344055, + 0.038817308843135834, + -0.0005001485696993768, + 0.007899617776274681, + -0.009254755452275276, + 0.01236964575946331, + -0.017443383112549782, + 0.02890104055404663, + 0.02603662572801113, + 0.011830159462988377, + -0.020179349929094315, + 0.028772592544555664, + -0.003320408519357443, + -0.04058990627527237, + 0.007989532314240932, + 0.008708846755325794, + 0.010070406831800938, + 0.03352520614862442, + 0.028078967705368996, + 0.013063270598649979, + -0.03134157508611679, + -0.030725017189979553, + 0.014604659751057625, + -0.01637725718319416, + 0.008021644316613674, + -0.012607276439666748, + 0.028849661350250244, + -0.0019074686570093036, + -0.009254755452275276, + 0.024302564561367035, + 0.003203198779374361, + -0.009922690689563751, + 0.007751901634037495, + -0.03722454234957695, + 0.011868693865835667, + 0.007013319060206413, + -0.025420071557164192, + 0.017648901790380478, + -0.04051283746957779, + -0.024803515523672104, + 0.016017599031329155, + -0.0036543761380016804, + 0.01038510724902153, + 0.058932434767484665, + -0.01338439341634512, + -0.010038294829428196, + 0.0034039004240185022, + 0.045111313462257385, + 0.025381537154316902, + 0.04868219792842865, + 0.001229899819009006, + 0.023891527205705643, + 0.023852992802858353, + -0.017276400700211525, + 0.016197428107261658, + -0.08410844951868057, + -0.030416740104556084, + -0.029543286189436913, + -0.01342292781919241, + 0.02974880486726761, + -0.01825261302292347, + -0.017995715141296387, + -0.01649286039173603, + -0.004633800126612186, + 0.01943434402346611, + 0.007668409496545792, + 0.0246236864477396, + 0.02866983227431774, + -0.02367316372692585, + -0.019832536578178406, + -0.003962653689086437, + -0.045907698571681976, + -0.009614412672817707, + -0.007360131945461035, + 0.002952723065391183, + 0.021707892417907715, + -0.00757849495857954, + 0.02493196539580822, + -0.018997617065906525, + 0.011701710522174835, + 0.0173791591078043, + -0.0013045609230175614, + -0.0038245711475610733, + 0.03909989818930626, + -0.008837295696139336, + -0.008394146338105202, + -0.008830873295664787, + 0.0009336642106063664, + 0.0008854957995936275, + 0.006255469750612974, + -0.03645384684205055, + 0.013718361034989357, + 0.0008028066949918866, + -0.013063270598649979, + 0.01511845551431179, + -0.007572072558104992, + -0.013397238217294216, + 0.013121072202920914, + 0.027462411671876907, + -0.01630018651485443, + -0.020911509171128273, + -0.003946597687900066, + 0.021695047616958618, + -0.023583250120282173, + -0.0024726446717977524, + 0.02206755056977272, + 0.002753627020865679, + -0.0067243087105453014, + 0.027539480477571487, + 0.008272119797766209, + 0.00046201524673961103, + 0.009389626793563366, + 0.014964316971600056, + -0.007976687513291836, + 0.02321074716746807, + -0.005722406320273876, + -0.03180399164557457, + -0.01924167014658451, + -0.011708132922649384, + -0.019614173099398613, + 0.00826569739729166, + -0.01993529498577118, + 0.003029792569577694, + 0.05466792359948158, + 0.03660798445343971, + 0.044237859547138214, + -0.004967767745256424, + 0.011252138763666153, + ], + "index": 5, + }, + { + "title": "Marge vs. the Monorail", + "text": "\"Marge vs. the Monorail\" is the twelfth episode of The Simpsons\u2019 fourth season and originally aired on January 14, 1993. The plot revolves around Springfield's purchase of a monorail from a conman, and Marge's dislike of the purchase. It was written by Conan O'Brien and directed by Rich Moore. Guest stars include Leonard Nimoy as himself and Phil Hartman as Lyle Lanley.", + "vector": [ + -0.019495300948619843, + -0.020162204280495644, + -0.025202756747603416, + 0.006118453573435545, + -0.008142429403960705, + -0.013849884271621704, + -0.009445217438042164, + 0.017618665471673012, + -0.029638441279530525, + 0.0849914476275444, + -0.0018650039564818144, + 0.012267926707863808, + -0.03560955449938774, + 0.012089568190276623, + 0.035237330943346024, + 0.009476236067712307, + -0.032104432582855225, + 0.0029758638702332973, + 0.009724386967718601, + 0.01561019942164421, + 0.00892565306276083, + 0.0330970361828804, + 0.004579146858304739, + 0.05797409638762474, + 0.005121975671499968, + 0.009522764943540096, + -0.009111765772104263, + 0.007669392507523298, + -0.02442728728055954, + -0.004931985400617123, + -0.039393845945596695, + -0.004579146858304739, + 0.004334873985499144, + 0.008235485292971134, + 0.006102944258600473, + 0.013772336766123772, + 0.01592814177274704, + 0.02241106703877449, + -0.0321974903345108, + -0.002266309456899762, + 0.014989824034273624, + -0.023372648283839226, + 0.00970887765288353, + -0.03421371057629585, + -0.007502666674554348, + 0.019976092502474785, + -0.03619891405105591, + -0.008607710711658001, + 0.0004723093588836491, + -0.006250283680856228, + 0.004873825237154961, + -0.01367152575403452, + 0.0335623174905777, + 0.02138744667172432, + -0.0272965244948864, + 0.016936251893639565, + 0.002588129136711359, + 0.0301967803388834, + -0.01820802129805088, + -0.03976607322692871, + 0.02188374660909176, + -0.019650395959615707, + -0.006316198501735926, + 0.042247574776411057, + -0.031344473361968994, + 0.012291190214455128, + -0.01557142660021782, + 0.008041618391871452, + 0.042247574776411057, + -0.014446995221078396, + 0.043147120624780655, + 0.017727231606841087, + -0.00885586068034172, + 0.019247151911258698, + 0.038804490119218826, + 0.010895345360040665, + 0.002359365811571479, + -0.010228442028164864, + -0.03843226656317711, + -0.01682768575847149, + -0.010174158960580826, + -0.023729365319013596, + 0.018052928149700165, + 0.053569428622722626, + 0.05329025909304619, + 0.008786068297922611, + 0.06315422803163528, + -0.061044953763484955, + 0.029095612466335297, + -0.0037649041041731834, + 0.036881327629089355, + 0.047986049205064774, + 0.0010594851337373257, + 0.0016052217688411474, + -0.041813310235738754, + -0.02734305150806904, + 1.7372332877130248e-05, + 0.012834019027650356, + -0.00127467792481184, + 0.03989014774560928, + 0.01077902503311634, + -0.028971537947654724, + 0.02993311919271946, + 0.013299300335347652, + 0.044046662747859955, + 0.0187973789870739, + -0.018192512914538383, + -0.0003489612427074462, + -0.009879480116069317, + 0.03260073438286781, + -0.006521698087453842, + 0.0007037385366857052, + -0.0031193257309496403, + -0.036757249385118484, + 0.025264794006943703, + -0.010313743725419044, + 0.005195645149797201, + -0.004164271056652069, + -0.011399400420486927, + -0.035237330943346024, + -0.019712433218955994, + -0.05508934706449509, + -0.0545930489897728, + -0.011236552149057388, + -0.002615270670503378, + 0.017246440052986145, + -0.011725097894668579, + 0.0035012445878237486, + -0.001704094116576016, + -0.005509710405021906, + 0.015106144361197948, + 0.04578371345996857, + -0.03204239532351494, + -0.02148050256073475, + -0.008266503922641277, + -0.019619377329945564, + -0.0648912787437439, + -0.014726164750754833, + 0.055895835161209106, + 0.025357849895954132, + -0.05561666935682297, + 0.05493425577878952, + -0.012066304683685303, + 0.024768494069576263, + 0.017122365534305573, + -0.021682124584913254, + -0.036881327629089355, + 0.080524742603302, + 0.010988402180373669, + -0.008902388624846935, + 0.04054154083132744, + -0.004939740058034658, + -0.01062393095344305, + 0.03038289211690426, + 0.04125497490167618, + 0.03750170022249222, + -0.04029339179396629, + -0.029917610809206963, + -0.04721057787537575, + -0.020193224772810936, + -0.05208052694797516, + -0.045163340866565704, + 0.0009635207825340331, + -0.030165761709213257, + 0.007971826009452343, + -0.011011665686964989, + 0.05797409638762474, + 0.011864682659506798, + -0.04764484241604805, + 0.01650198921561241, + -0.03430676832795143, + 0.0012378430692479014, + -0.005982746835798025, + -0.013880902901291847, + 0.06544961780309677, + 0.002041423227638006, + -0.0007555980118922889, + -0.012919320724904537, + -0.030662061646580696, + 0.016982780769467354, + -0.010895345360040665, + -0.013066659681499004, + 0.037780869752168655, + 0.039300791919231415, + -0.0024233420845121145, + -0.014028241857886314, + -0.004365893080830574, + 0.04804808646440506, + 0.006102944258600473, + -0.05167728289961815, + 0.017959872260689735, + 0.03954894095659256, + 0.018363116309046745, + -0.09746100008487701, + 0.011089213192462921, + 0.006444151047617197, + -0.015315521508455276, + -0.01958835870027542, + -0.004272836726158857, + -0.026412488892674446, + -0.01870432309806347, + 0.008894634433090687, + 0.023682836443185806, + -0.022876348346471786, + -0.0014540051342919469, + -0.06132412329316139, + -0.0076034776866436005, + 0.03055349551141262, + 0.042743876576423645, + -0.0015305827837437391, + 0.05980420112609863, + -0.0500953234732151, + 0.029560893774032593, + 0.026427997276186943, + -0.008917898871004581, + -0.001761284889653325, + -0.06383664160966873, + 0.016036707907915115, + 0.00566868158057332, + -0.014353939332067966, + 0.0022818187717348337, + -0.013493168167769909, + 0.06681444495916367, + -0.028800934553146362, + -0.02376038394868374, + -0.009034219197928905, + -0.011089213192462921, + 0.008026108145713806, + -0.05431387946009636, + 0.0030340240336954594, + -0.047303635627031326, + -0.0018058744026347995, + -0.060145407915115356, + 0.06495331972837448, + -0.053352296352386475, + 0.051336076110601425, + 0.04503926634788513, + -0.009677858091890812, + -0.000997447525151074, + -0.030615532770752907, + -0.020860128104686737, + 0.0460939034819603, + -0.017153384163975716, + 0.027622221037745476, + 0.0018853601068258286, + -0.00035671592922881246, + 0.02264370769262314, + -0.043457306921482086, + -0.03033636324107647, + -0.06538758426904678, + -0.006800866685807705, + -0.00505606085062027, + 0.05958707258105278, + 0.0275136549025774, + 0.01022068690508604, + 0.010841062292456627, + 0.019340207800269127, + 0.012958094477653503, + -0.01236873771995306, + 0.011841418221592903, + -0.037873927503824234, + 0.020782580599188805, + -0.028149539604783058, + 0.003691234393045306, + -0.051553208380937576, + 0.04268183559179306, + -0.028552783653140068, + 0.0053352294489741325, + -0.022752273827791214, + -0.00743675185367465, + 0.04044848680496216, + -0.05124301835894585, + -0.012345473282039165, + 0.029560893774032593, + 0.028568293899297714, + 0.007587968371808529, + 0.056578248739242554, + 0.03368639200925827, + 0.010399045422673225, + -0.07674045115709305, + 0.022628197446465492, + 0.03923875465989113, + -0.01578855700790882, + -0.030879192054271698, + 0.05149117112159729, + 0.024706456810235977, + 0.01584284007549286, + 0.009297878481447697, + -0.036167893558740616, + -0.015175936743617058, + -0.0066031222231686115, + -0.013369092717766762, + 0.05288701504468918, + 0.030413910746574402, + 0.03886652737855911, + 0.013896412216126919, + 0.05108792707324028, + 0.015144918113946915, + 0.0037048051599413157, + 0.020239751785993576, + -0.016889724880456924, + 0.043426286429166794, + -0.000159819406690076, + 0.026815732941031456, + 0.02487706020474434, + -0.011507966555655003, + 0.011601022444665432, + 0.05713658779859543, + -0.04144108667969704, + -0.033034998923540115, + 0.02312449924647808, + 0.016315877437591553, + -0.0034857350401580334, + -0.008871369995176792, + -0.030088214203715324, + 0.03691234439611435, + 0.017572136595845222, + 0.01749459095299244, + 0.007328186184167862, + -0.011911210604012012, + 0.031034287065267563, + 0.028971537947654724, + -0.011283080093562603, + 0.009041973389685154, + 0.020007111132144928, + 0.013586224056780338, + 0.0033442119602113962, + -0.03135998547077179, + -0.022426575422286987, + 0.03793596476316452, + -0.005571747664362192, + 0.008421598002314568, + -0.028568293899297714, + 0.017975380644202232, + -0.0035109377931803465, + -0.10720089077949524, + -0.02307797037065029, + -0.020829109475016594, + -0.02411709912121296, + 0.0028808689676225185, + 0.00023748751846142113, + 0.015641218051314354, + 0.03604381904006004, + -0.00538951251655817, + -0.03278684616088867, + -0.03905263915657997, + 0.0009843615116551518, + 0.0025939452461898327, + 0.02523377537727356, + -0.010864326730370522, + 0.0007885554805397987, + -0.003123203059658408, + -0.008204466663300991, + -0.02492358721792698, + -0.017680702731013298, + -0.007014120928943157, + 0.015137162990868092, + 0.012035285122692585, + 0.03719151392579079, + -0.003348089288920164, + 0.03644706308841705, + -0.017680702731013298, + 0.00821222085505724, + -0.02894051931798458, + -0.004548128228634596, + -0.004377524834126234, + -0.0469934456050396, + 0.005021164659410715, + -0.03719151392579079, + -0.028242597356438637, + -0.01999160274863243, + 0.0013279913691803813, + -0.017075836658477783, + -0.07674045115709305, + 0.09094705432653427, + -0.030972249805927277, + 0.0194642823189497, + 0.03722253441810608, + -0.010654949583113194, + 0.012787491083145142, + -0.003993667662143707, + 0.010267214849591255, + -0.021713143214583397, + 0.037284571677446365, + -0.034151673316955566, + 0.015780802816152573, + -0.040014222264289856, + -0.037998002022504807, + 0.03731558844447136, + -0.011771625839173794, + -0.01223690714687109, + 0.005261559970676899, + -0.015625709667801857, + -0.003381046699360013, + 0.02957640402019024, + -0.010073347948491573, + 0.007444506511092186, + 0.019448773935437202, + 0.07190152257680893, + -0.00481954263523221, + 0.00636272644624114, + -0.0011767748510465026, + 0.010654949583113194, + -0.0019357656128704548, + -0.04097580537199974, + 0.019200623035430908, + 0.013144207186996937, + -0.0006184368976391852, + -0.0007914634770713747, + -0.03159262612462044, + 0.043550364673137665, + 0.010662704706192017, + 0.0018989307573065162, + -0.03852532058954239, + 0.039610978215932846, + -0.00739410100504756, + 0.003745517460629344, + 0.018983490765094757, + 0.018580246716737747, + 0.053166184574365616, + 0.013043396174907684, + 0.07016447186470032, + 0.06476720422506332, + 0.05909077078104019, + -0.02693980745971203, + 0.06538758426904678, + -0.0010604544077068567, + 0.012834019027650356, + -0.060052353888750076, + -0.0165485180914402, + 0.0150983901694417, + -0.014555561356246471, + -0.0357956700026989, + 0.018363116309046745, + 0.019262660294771194, + 0.055368516594171524, + -0.012647906318306923, + 0.07270801067352295, + 0.03731558844447136, + 0.01994507387280464, + 0.026071282103657722, + 0.0067659709602594376, + -0.012880546972155571, + -0.025528453290462494, + 0.014640863053500652, + 0.007774081081151962, + -0.03104979544878006, + -0.022969404235482216, + 0.002303144196048379, + 0.03700540214776993, + -0.02269023470580578, + -0.01505186129361391, + -0.041627198457717896, + 0.03319009020924568, + 0.013221753761172295, + 0.02155805006623268, + -0.008080391213297844, + -0.02196129411458969, + -0.006188245955854654, + 0.02421015501022339, + 0.034027598798274994, + -0.004811787977814674, + 0.03238360211253166, + -0.0492267981171608, + 0.0140902791172266, + -0.02501664310693741, + -0.011042684316635132, + 0.05564768612384796, + -0.005971114616841078, + -0.033128052949905396, + -0.015152672305703163, + 0.010631686076521873, + -0.05409674718976021, + 0.018037419766187668, + 0.023775892332196236, + -0.021945785731077194, + -0.020053640007972717, + -0.012663415633141994, + 0.014578824862837791, + -0.021496012806892395, + -0.031515076756477356, + 0.037998002022504807, + -0.045256394892930984, + -0.012399756349623203, + 0.06250283867120743, + 0.04925781860947609, + 0.04215451702475548, + -0.018130475655198097, + -0.05856345221400261, + -0.008491390384733677, + 0.03923875465989113, + -0.03750170022249222, + -0.009701122529804707, + -0.01678115874528885, + 0.009367670863866806, + 0.061665330082178116, + 0.02188374660909176, + -0.0019435202702879906, + -0.0015577242011204362, + -0.026148829609155655, + 0.006785357370972633, + 0.026583092287182808, + 0.07177744805812836, + -0.03588872402906418, + -0.011042684316635132, + -0.03405861556529999, + 0.022380048409104347, + -0.015897123143076897, + 0.02509419061243534, + -0.014865748584270477, + 0.06433294713497162, + 0.035051219165325165, + 0.07798120379447937, + 0.023186536505818367, + -0.02397751435637474, + -0.004222431220114231, + 0.009964781813323498, + 0.027048373594880104, + 0.018719831481575966, + -0.016005689278244972, + 0.010864326730370522, + 0.008894634433090687, + -0.0008161815931089222, + 0.04702446609735489, + -0.021170316264033318, + 0.01802190952003002, + 0.008150183595716953, + -0.002780057955533266, + 0.011771625839173794, + 0.006994734052568674, + 0.01570325531065464, + 0.04280591383576393, + -0.021263372153043747, + 0.0016653205966576934, + -0.0033694147132337093, + -0.02822708711028099, + -0.03992116451263428, + 0.04156516119837761, + 0.005800511222332716, + -0.017277458682656288, + -0.02604026347398758, + -0.00754919508472085, + -0.0019696922972798347, + 0.012353228405117989, + 0.01882839761674404, + 0.008809332735836506, + -0.014951050281524658, + -0.026288414373993874, + 0.011787135154008865, + -0.021821709349751472, + 0.023295100778341293, + 0.003322886535897851, + -0.0026870016008615494, + 0.04488417133688927, + -0.042433686554431915, + 0.0015451228246092796, + -0.014183335937559605, + -0.021061750128865242, + 0.008886879310011864, + 0.0025687424931675196, + -0.026024753227829933, + -0.00465281680226326, + -0.0015964977210387588, + -0.0012329963501542807, + -0.021945785731077194, + 0.033034998923540115, + -0.014578824862837791, + 0.03300397843122482, + -0.06017642840743065, + -0.004121620208024979, + 0.022736763581633568, + 0.043457306921482086, + 0.04196840524673462, + -0.022876348346471786, + -0.006207632832229137, + 0.02711041085422039, + 0.009623575955629349, + 0.023558761924505234, + -0.045876771211624146, + -0.007987335324287415, + 0.011127986013889313, + 0.04454296454787254, + 0.03855634108185768, + 0.007126564159989357, + -0.025171738117933273, + 0.0005224725464358926, + -0.038680415600538254, + 0.004365893080830574, + 0.011771625839173794, + 0.04311610013246536, + 0.05561666935682297, + 0.03660215809941292, + 0.03188730403780937, + -0.011213287711143494, + -0.004109987989068031, + 0.010003555566072464, + -0.006948206108063459, + -0.011275325901806355, + 0.0037610267754644156, + -0.038091059774160385, + 0.018533719703555107, + -0.032104432582855225, + -0.007355327717959881, + 0.010980647057294846, + -0.043736476451158524, + 0.0014423731481656432, + 0.015044107101857662, + -0.0042650820687413216, + 0.02473747543990612, + -0.011779380962252617, + -0.0505606085062027, + 0.018580246716737747, + -0.0051491172052919865, + 0.024799512699246407, + 0.009949272498488426, + -0.018052928149700165, + 0.0008244209457188845, + 0.008941162377595901, + 0.027947917580604553, + -0.01107370387762785, + 0.020301789045333862, + 0.027389580383896828, + 0.008762804791331291, + -0.0012436590623110533, + -0.029064593836665154, + 0.006537207402288914, + -0.015493879094719887, + 0.0635264590382576, + -0.03154609724879265, + -0.006021520122885704, + 0.00014624868344981223, + 0.039083659648895264, + 0.02376038394868374, + -0.01140715554356575, + 0.006172736641019583, + -0.002960354555398226, + -0.007653883192688227, + -0.013058905489742756, + 0.000980484182946384, + 0.01422986388206482, + -0.010903100483119488, + -0.013857638463377953, + -0.0051607489585876465, + 0.05403470993041992, + -0.015137162990868092, + 0.02219393476843834, + 0.017370514571666718, + 0.012733208015561104, + 0.0183476060628891, + 0.017866816371679306, + 0.0004909691051580012, + 0.03824615105986595, + -0.006626386195421219, + 0.013051150366663933, + 0.035144273191690445, + -0.04904068633913994, + -0.006855149753391743, + -0.04761382192373276, + -0.0034159428905695677, + 0.040417466312646866, + -0.011624286882579327, + 0.05015736445784569, + -0.012159360572695732, + 0.054065730422735214, + -0.013407866470515728, + 0.005788879469037056, + 0.03294194117188454, + 0.015858350321650505, + -0.0004599503008648753, + 0.03480306640267372, + 0.013345829211175442, + 0.044760096818208694, + -0.05664028599858284, + -0.0015674176393076777, + -0.0010061715729534626, + -0.00885586068034172, + -0.023108989000320435, + 0.04379851371049881, + -0.013609488494694233, + 0.013656016439199448, + 0.005374003201723099, + 0.00970887765288353, + -0.013624997809529305, + -0.04085173085331917, + -0.012066304683685303, + -0.0017254194244742393, + -0.005707454867660999, + -0.009499500505626202, + -0.006161104422062635, + -0.016796667128801346, + -0.006199878174811602, + -0.0008186048944480717, + -0.0002063475694740191, + 0.06973021477460861, + 0.010592912323772907, + -0.026071282103657722, + -0.023915477097034454, + 0.007483279798179865, + 0.013617243617773056, + -0.004172025714069605, + -0.027281014248728752, + 0.0033500278368592262, + -0.03149956837296486, + 0.0069210645742714405, + -0.015912633389234543, + 0.008654238656163216, + -0.009034219197928905, + -0.04308508336544037, + -0.00116611213888973, + 0.008320786990225315, + -0.005273192189633846, + 0.021356428042054176, + 0.006040906999260187, + -0.004745872691273689, + 0.016719121485948563, + -0.04866846278309822, + -0.00772755267098546, + -0.014167826622724533, + -0.018595756962895393, + -0.0057578603737056255, + 0.038587357848882675, + 0.017789268866181374, + -0.028878482058644295, + -0.02272125519812107, + -0.005362370982766151, + 0.005292579066008329, + 0.029715988785028458, + 0.000669327040668577, + 0.017742739990353584, + -0.0055833798833191395, + -0.03601279854774475, + 0.0014249250525608659, + -0.008313031867146492, + 0.018626775592565536, + 0.0234967228025198, + 0.004920353647321463, + 0.007487157359719276, + -0.008468125946819782, + 0.012624641880393028, + 0.031080814078450203, + 0.019185112789273262, + 0.026024753227829933, + 0.042030442506074905, + 0.027451617643237114, + -0.011942229233682156, + 0.019448773935437202, + 0.012787491083145142, + 0.0015674176393076777, + -0.008336296305060387, + 8.766439714236185e-05, + -0.03126692771911621, + -0.017835797742009163, + 0.04358138144016266, + -0.00925910472869873, + -0.008801577612757683, + 0.030475948005914688, + 0.03114285320043564, + 0.008142429403960705, + 0.007452261168509722, + -0.013361338526010513, + -0.01478820201009512, + -0.026645129546523094, + -0.005509710405021906, + -0.0039568329229950905, + -0.020193224772810936, + -0.01941775530576706, + 0.002126724924892187, + -0.04550454765558243, + -0.005342984572052956, + 0.041006822139024734, + 0.04109987989068031, + 0.008894634433090687, + 0.00027311063604429364, + -0.029328253120183945, + 0.04854438453912735, + -0.02331061102449894, + -0.013524186797440052, + 0.020518921315670013, + -0.018905945122241974, + 0.01682768575847149, + -0.011065948754549026, + -0.002035607350990176, + 0.046466127038002014, + 0.03213545307517052, + -0.01951081119477749, + -0.013586224056780338, + -0.03256971761584282, + 0.00153542950283736, + 0.010577403008937836, + 0.03905263915657997, + 0.0023050829768180847, + -0.021852727979421616, + -0.01614527404308319, + 0.016936251893639565, + -0.006068048067390919, + -0.01882839761674404, + 0.03632298856973648, + 0.024442795664072037, + -0.006859027314931154, + 0.01270994357764721, + -0.015160427428781986, + -0.014074769802391529, + 0.012291190214455128, + -0.01856473833322525, + 0.009654594585299492, + -0.012314454652369022, + -0.00026899095973931253, + 0.0006092281546443701, + -0.011632041074335575, + 0.012531585991382599, + 0.015300012193620205, + 0.06780704855918884, + 0.015377558767795563, + -0.0053817578591406345, + 0.04255776107311249, + 0.04311610013246536, + 0.048203181475400925, + -0.053755540400743484, + -0.04258878156542778, + -0.007859382778406143, + 0.002134479582309723, + 0.01955733820796013, + 0.018890434876084328, + 0.012446284294128418, + 0.03294194117188454, + 0.03539242595434189, + 0.04593880847096443, + 0.006638018414378166, + -0.025078682228922844, + 0.056795381009578705, + 0.004063460044562817, + 0.05986623838543892, + -0.03573363274335861, + -0.007622864563018084, + -0.017649684101343155, + 0.0023748751264065504, + -0.003439206862822175, + 0.03784290701150894, + 0.014865748584270477, + 0.0014045690186321735, + -0.05968012660741806, + -0.047179561108350754, + -0.006444151047617197, + -0.0010594851337373257, + 0.006157227326184511, + -0.00785162765532732, + -0.005436040926724672, + 0.018580246716737747, + 0.005342984572052956, + -0.004090601112693548, + 0.00618436885997653, + 0.012694434262812138, + 0.014687390998005867, + 0.012151606380939484, + -0.03078613616526127, + -0.014912277460098267, + 0.037780869752168655, + 0.009290123358368874, + -0.0010139262303709984, + 0.012120586819946766, + 0.005350739229470491, + 0.02675369568169117, + 0.031422022730112076, + -0.00821222085505724, + 0.009057482704520226, + 0.024442795664072037, + 0.015300012193620205, + 0.019216133281588554, + 0.027544673532247543, + -0.043860550969839096, + -0.00021907011978328228, + -0.005765615031123161, + 0.013485413044691086, + 0.012275680899620056, + -0.0019396429415792227, + 0.004935862962156534, + -0.00932889711111784, + -0.0150983901694417, + 0.013741318136453629, + 0.02926621586084366, + -0.0015286441193893552, + 0.022628197446465492, + -0.005563993006944656, + -0.051553208380937576, + 0.006320076063275337, + 0.01022068690508604, + -0.0165485180914402, + -0.004683835431933403, + -0.01982099935412407, + 0.009096256457269192, + -0.0028595435433089733, + 0.023202044889330864, + -0.017168892547488213, + 0.0012853406369686127, + -0.002586190588772297, + -0.00829752255231142, + -0.016672592610120773, + -0.029560893774032593, + -0.002413648646324873, + -0.011228797025978565, + 0.02501664310693741, + 0.011445928364992142, + -0.0037048051599413157, + 0.007041262462735176, + -0.04016931727528572, + -0.019836507737636566, + 0.03601279854774475, + 0.021123787388205528, + 0.008724031038582325, + -0.034461859613657, + -0.004528741352260113, + 0.027079392224550247, + 0.034865107387304306, + -0.005672558676451445, + -0.008305277675390244, + -0.03498918190598488, + 0.04801706597208977, + 0.0014898705994710326, + 0.009468481875956059, + -0.007211865857243538, + -0.043023042380809784, + -0.02053442969918251, + 0.03985912725329399, + -0.015470615588128567, + 0.0006412162911146879, + -0.014749428257346153, + 0.044046662747859955, + -0.03306601569056511, + 0.018006399273872375, + -0.008724031038582325, + -0.011686324141919613, + -0.008817087858915329, + -0.014974314719438553, + -0.018580246716737747, + -0.009584802202880383, + -0.030398402363061905, + -0.009034219197928905, + 0.01382661983370781, + -0.02371385507285595, + 0.001846586586907506, + -0.0025803744792938232, + 0.04693140834569931, + 0.00575010571628809, + 0.027839353308081627, + -0.016517499461770058, + 0.03477204963564873, + -0.011624286882579327, + 0.010026820003986359, + 0.013935185968875885, + -0.03588872402906418, + 0.04671427980065346, + 0.018192512914538383, + -0.01958835870027542, + -0.0033752305898815393, + -0.003840512363240123, + 0.01317522581666708, + 0.014989824034273624, + -0.02335713990032673, + 0.00796407088637352, + 0.013562960550189018, + -0.038494303822517395, + -0.02416362799704075, + -0.04106885939836502, + -0.007076158653944731, + -0.027312032878398895, + 0.013136452063918114, + -0.009755405597388744, + -0.017959872260689735, + 0.04584575444459915, + 0.009871725924313068, + -0.0035070604644715786, + 0.006401500198990107, + -0.0013173286570236087, + -0.028831953182816505, + -0.00573847396299243, + 0.03340722247958183, + 0.022224953398108482, + -0.0008622250752523541, + -0.012733208015561104, + 0.012229152955114841, + 0.051522187888622284, + -0.02532683126628399, + 0.043643418699502945, + 0.013229508884251118, + 0.005377880297601223, + 0.021728653460741043, + -0.04268183559179306, + -0.005331352353096008, + -7.197325612651184e-05, + -0.0020821355283260345, + 0.025668038055300713, + 0.015641218051314354, + -0.037470683455467224, + -0.0035109377931803465, + -0.004935862962156534, + 0.0420614629983902, + 0.011725097894668579, + -0.00478852353990078, + -0.04454296454787254, + 0.010143140330910683, + -0.03871143236756325, + -0.04407768324017525, + -0.029855573549866676, + -0.0029409679118543863, + -0.001110859913751483, + -0.0025648651644587517, + -0.04175127297639847, + 0.01628485880792141, + -4.52862041129265e-05, + -0.008002844639122486, + 0.0045364960096776485, + 0.010189668275415897, + -0.029002556577324867, + -0.0011787135154008865, + 0.029111122712492943, + 0.017277458682656288, + 0.035547517240047455, + -0.0010749944485723972, + -0.032414622604846954, + 0.05744677409529686, + -0.03216647356748581, + -0.015959160402417183, + 0.016408933326601982, + -0.01664157398045063, + -0.0006339462706819177, + -0.0158816147595644, + -0.04271285608410835, + -0.01977447047829628, + 0.042743876576423645, + 0.01937122642993927, + 0.010406799614429474, + -0.006467415019869804, + -0.004493845161050558, + -0.0008617403800599277, + -0.002446606056764722, + 0.015385313890874386, + -0.03294194117188454, + 0.07494136691093445, + -0.021914765238761902, + 0.012089568190276623, + 0.0062386514618992805, + -0.00910401064902544, + -0.022380048409104347, + 0.0038308189250528812, + 0.0080493725836277, + 0.012329963967204094, + -0.00261139334179461, + 0.0032259528525173664, + 0.028428709134459496, + -0.018456172198057175, + -0.01704481802880764, + 0.025714566931128502, + -0.005664804019033909, + -0.005505832843482494, + -0.0045364960096776485, + 0.024659927934408188, + 0.00018780899699777365, + 0.0054786913096904755, + 0.0022566160187125206, + -0.011872436851263046, + 0.0037125598173588514, + -0.007712043356150389, + 0.00803386326879263, + 0.011872436851263046, + 0.035454463213682175, + -0.0036989892832934856, + 0.023543251678347588, + 0.024985624477267265, + 0.014074769802391529, + -0.024768494069576263, + 0.004296100698411465, + 0.005878058262169361, + -0.011554494500160217, + -0.026691658422350883, + -0.005447672680020332, + 0.041720256209373474, + -0.031080814078450203, + 0.007006366271525621, + 0.008941162377595901, + -0.016408933326601982, + 0.007568581495434046, + -0.0074483840726315975, + -0.01659504510462284, + 0.024815021082758904, + 0.0029351518023759127, + -0.03923875465989113, + 0.0205809585750103, + 0.005199522711336613, + 0.0025319077540189028, + 0.02115480601787567, + -0.009724386967718601, + 0.018440663814544678, + 0.0424957238137722, + -0.03135998547077179, + 0.0653255432844162, + 0.03750170022249222, + 0.001533490838482976, + 0.030088214203715324, + -0.02304695174098015, + -0.06026948243379593, + 0.021325409412384033, + -0.02872338704764843, + 0.02894051931798458, + -0.03194934129714966, + 0.01147694792598486, + 0.007867136970162392, + -0.041410066187381744, + 0.0022333520464599133, + -0.004683835431933403, + 0.016207311302423477, + -0.0033965560141950846, + 0.0031891181133687496, + -0.018999001011252403, + 0.0035051219165325165, + 0.03244563937187195, + 0.01566448248922825, + 0.011601022444665432, + 0.002163559664040804, + 0.011507966555655003, + -0.00012419627455528826, + 0.017742739990353584, + -0.026179848238825798, + -0.005870303604751825, + 0.01606772653758526, + -0.015773048624396324, + -0.0036427676677703857, + 0.012469548732042313, + 0.022162916138768196, + -0.03877347335219383, + 0.004966881591826677, + -0.02362079918384552, + 0.009941518306732178, + 0.030537985265254974, + -0.009189312346279621, + 0.005963359959423542, + 0.0009436493855901062, + -0.02227148227393627, + -0.02084461785852909, + 0.020999712869524956, + 0.003660215763375163, + 0.006855149753391743, + -0.023899968713521957, + -0.007308799307793379, + -0.0021150929387658834, + -0.005796634126454592, + 0.011756116524338722, + -0.03100326843559742, + -0.014555561356246471, + 0.004745872691273689, + 0.006335585378110409, + -0.00036955965333618224, + 0.012585869058966637, + 0.007793467957526445, + 0.0005011471221223474, + -0.02934376336634159, + -0.007087790407240391, + 0.017168892547488213, + -0.04603186622262001, + -0.013880902901291847, + 0.004272836726158857, + 0.019169604405760765, + 0.004990145564079285, + 0.0007429966353811324, + 0.005664804019033909, + -0.0011961616110056639, + -0.009003199636936188, + -0.0158816147595644, + -0.02380691096186638, + 0.016889724880456924, + -0.0187973789870739, + 0.018983490765094757, + 0.03291092440485954, + -0.013291546143591404, + -0.04044848680496216, + -0.02402404323220253, + -0.014004978351294994, + -0.0047962781973183155, + -0.0290801040828228, + 0.007107177283614874, + -0.005327474791556597, + 0.007677147164940834, + 0.020115677267313004, + -0.006564348936080933, + 0.0082742590457201, + 0.01228343602269888, + -0.008483635261654854, + -0.027839353308081627, + 0.004625675268471241, + 0.019836507737636566, + 0.009220331907272339, + -0.04016931727528572, + 0.03604381904006004, + 0.010530875064432621, + 0.022829819470643997, + -0.05000226944684982, + -0.01664157398045063, + -0.021371938288211823, + -0.0433952696621418, + 0.0006921064923517406, + 0.026102300733327866, + -0.02746712788939476, + 0.010934119112789631, + 0.05077773705124855, + 0.004063460044562817, + 0.01592814177274704, + -0.021092768758535385, + 0.012717698700726032, + -0.04795502871274948, + 0.009297878481447697, + -0.005715209525078535, + 0.024706456810235977, + -0.023326121270656586, + -0.020642995834350586, + -0.03287990391254425, + -0.005191768053919077, + -0.006568226031959057, + -0.01574978418648243, + -0.004156515933573246, + -0.027079392224550247, + -0.00511034345254302, + -0.05676436051726341, + 0.02711041085422039, + -0.02501664310693741, + -0.03598178178071976, + -0.015478369779884815, + 0.00022573430032934994, + 0.015137162990868092, + -0.026908788830041885, + 0.012834019027650356, + -0.010592912323772907, + -0.013338074088096619, + -0.019123075529932976, + 0.011949984356760979, + -0.016626063734292984, + 0.009158293716609478, + 0.0017544996226206422, + -0.03703641891479492, + -0.011469192802906036, + -0.003123203059658408, + 0.002644350752234459, + 0.028956027701497078, + -0.0075647043995559216, + 0.03213545307517052, + 0.010406799614429474, + 0.042216554284095764, + 0.014423731714487076, + 0.021806200966238976, + 0.020425865426659584, + -0.020425865426659584, + -0.05229765921831131, + -0.011934474110603333, + -0.02027077041566372, + -0.036571137607097626, + -0.007165337447077036, + -0.022116387262940407, + -0.029545385390520096, + 0.03350028023123741, + 0.03033636324107647, + -0.030181270092725754, + -0.018999001011252403, + 0.023202044889330864, + 0.0063239531591534615, + 0.0055833798833191395, + 0.012818509712815285, + -0.007917542941868305, + 0.01046883687376976, + -0.016036707907915115, + -0.009476236067712307, + -0.0060176425613462925, + -0.005032796412706375, + 0.007211865857243538, + 0.016874214634299278, + -0.014284146949648857, + 0.03539242595434189, + 0.03216647356748581, + 0.02774629555642605, + -0.010282725095748901, + -0.0031076937448233366, + -0.002500888891518116, + -0.004276713822036982, + 0.00591683154925704, + -0.019541829824447632, + 0.034337785094976425, + 0.016362404450774193, + 0.007382468786090612, + -0.021728653460741043, + -0.0292972344905138, + -0.03784290701150894, + -0.012097323313355446, + -0.017339495941996574, + 0.006606999319046736, + 0.014338430017232895, + 0.02200782299041748, + -0.01277198176831007, + -0.018999001011252403, + 0.007064526434987783, + 0.0005748167168349028, + -0.026784714311361313, + 0.03502019867300987, + 0.012609132565557957, + 0.02340366691350937, + -0.05521342158317566, + -0.02501664310693741, + -0.02138744667172432, + -0.020379336550831795, + -0.04615594074130058, + -0.011259816586971283, + 0.01758764684200287, + 0.009871725924313068, + 0.006510065868496895, + 0.06008337065577507, + 0.0487615168094635, + 0.0005883874255232513, + 0.021496012806892395, + 0.012632397003471851, + -0.04035542905330658, + 0.01999160274863243, + 0.016889724880456924, + -0.002613331889733672, + -0.011670814827084541, + -0.030972249805927277, + -0.07072281092405319, + -0.012609132565557957, + 0.0013561021769419312, + -0.03663317486643791, + -0.01650198921561241, + 0.0014152317307889462, + 0.07717471569776535, + 0.0032240140717476606, + -0.028475238010287285, + 0.018177002668380737, + -0.038277171552181244, + 0.014167826622724533, + -0.002648228080943227, + -0.006750461179763079, + -0.03430676832795143, + -0.013144207186996937, + -0.0036815411876887083, + 0.03346925973892212, + 0.010647195391356945, + 0.024706456810235977, + -0.012849528342485428, + -9.432858496438712e-05, + 0.004710976965725422, + 0.01754111796617508, + -0.00874729547649622, + 0.0003128534590359777, + -0.03194934129714966, + -0.02782384306192398, + 0.035361405462026596, + -0.011259816586971283, + 0.00204723933711648, + 0.009290123358368874, + -0.019247151911258698, + 0.0002745646343100816, + 0.0234967228025198, + -0.007200233638286591, + 0.008778314106166363, + 0.013376847840845585, + 0.03855634108185768, + -0.001761284889653325, + 0.016486480832099915, + 0.029684970155358315, + -0.011523475870490074, + -0.015493879094719887, + -0.011151250451803207, + -0.012360982596874237, + -0.04392258822917938, + -0.0057578603737056255, + -0.040014222264289856, + -0.006975347641855478, + 0.013803355395793915, + 0.005230541341006756, + 0.008824842050671577, + 0.0035361405462026596, + -0.02613331936299801, + 0.004327119328081608, + -0.015106144361197948, + -0.018130475655198097, + 0.012880546972155571, + -0.03275582939386368, + -0.003951016813516617, + 0.003892856650054455, + -0.0353303886950016, + -0.010050083510577679, + -0.009437463246285915, + 0.012764226645231247, + 0.010251705534756184, + -0.01118226908147335, + 0.015300012193620205, + 0.004897089675068855, + -0.001847555860877037, + 0.0016662899870425463, + 0.003828880377113819, + -0.008305277675390244, + 0.027451617643237114, + -0.021868238225579262, + -0.012678924947977066, + -0.0021441730204969645, + 0.008382824249565601, + -0.010430064052343369, + -0.006467415019869804, + -0.00011292773706372827, + -0.04029339179396629, + 0.0025067050009965897, + -0.03557853773236275, + -0.029049085453152657, + 0.011329608038067818, + -0.0038153096102178097, + -0.02048790268599987, + 0.012136096134781837, + 0.01223690714687109, + -0.01190345548093319, + -0.03886652737855911, + 0.01937122642993927, + -0.023915477097034454, + -0.019603867083787918, + 0.025885170325636864, + 0.03830818831920624, + 0.026319433003664017, + -0.016874214634299278, + 0.0016333324601873755, + -0.02219393476843834, + -0.03247665986418724, + 0.0042650820687413216, + -0.013950695283710957, + -0.0006116515141911805, + -0.029374781996011734, + -0.010934119112789631, + -0.003377169370651245, + -0.025931697338819504, + -0.028506256639957428, + 0.021402956917881966, + 0.016812177374958992, + 0.008871369995176792, + -1.1132226973131765e-05, + -0.0056997002102434635, + 0.02165110595524311, + 0.031918320804834366, + -0.01270218938589096, + -0.006215387489646673, + 0.02309347875416279, + -0.02421015501022339, + 0.03256971761584282, + 0.01927817054092884, + 0.010274969972670078, + 0.01986752636730671, + -0.006110698916018009, + 0.0014724226202815771, + 0.01118226908147335, + -0.023140007629990578, + -0.02228699065744877, + -0.008095900528132915, + 0.014935540966689587, + -0.0058625489473342896, + 0.02680022269487381, + -0.011678569950163364, + -0.006095189601182938, + -0.01037578098475933, + -0.04144108667969704, + -0.007366959471255541, + -0.01084881741553545, + 0.0024737475905567408, + 0.00768490182235837, + 0.026427997276186943, + 0.004765259567648172, + 0.01955733820796013, + 0.02264370769262314, + 0.020906655117869377, + -0.003611748805269599, + -0.015912633389234543, + -0.008227731101214886, + 0.004811787977814674, + 0.017386024817824364, + -0.0019396429415792227, + 0.005920709110796452, + 0.030351873487234116, + 0.02402404323220253, + -0.009809688664972782, + -0.0014947173185646534, + -0.0036737865302711725, + 0.010205177590250969, + 0.004823419731110334, + 0.024086080491542816, + -0.049723099917173386, + -0.006459660362452269, + -0.011376136913895607, + -0.009003199636936188, + 0.005994378589093685, + 0.011825908906757832, + -0.0044783358462154865, + 0.02072054333984852, + -0.00998029112815857, + -0.01754111796617508, + -0.02250412292778492, + 0.028614822775125504, + 0.03439982235431671, + 0.007289412431418896, + 0.003443084191530943, + -0.012516076676547527, + 0.002725775120779872, + -0.0003870077198371291, + -0.009902744553983212, + -0.01735500618815422, + -0.02245759405195713, + 0.01246179360896349, + -0.02680022269487381, + 0.02227148227393627, + 0.00545930489897728, + -0.035671595484018326, + 0.0088325971737504, + 0.011717342771589756, + -0.019448773935437202, + -0.006459660362452269, + -0.0015703255776315928, + 0.0032530941534787416, + -0.013958449475467205, + -0.029995158314704895, + 0.02689328044652939, + 0.014408222399652004, + 0.03520631045103073, + 0.008313031867146492, + -0.03734660893678665, + -0.020022621378302574, + -0.013159716501832008, + 0.0447290763258934, + -0.044667039066553116, + -0.01963488571345806, + 0.0019163788529112935, + -0.016486480832099915, + -0.022876348346471786, + -0.02008465863764286, + 0.0150983901694417, + -0.030134741216897964, + 0.03750170022249222, + -0.023202044889330864, + ], + "index": 6, + }, + { + "title": "Quebec general election, 1989", + "text": "The Quebec general election of 1989 was held on September 25, 1989, to elect members of the National Assembly of the Province of Quebec, Canada. The incumbent Quebec Liberal Party, led by Robert Bourassa, won re-election, defeating the Parti Qu\u00e9b\u00e9cois, led by Jacques Parizeau.This election was notable for the arrival of the Equality Party, which advocated English-speaking minority rights. It won four seats, but never had any success in any subsequent election.", + "vector": [ + 0.03476601466536522, + 0.007190298289060593, + -0.01965864561498165, + 0.016584748402237892, + 0.003618977963924408, + 0.015810316428542137, + 0.037077397108078, + 0.02412651851773262, + 0.030524514615535736, + 0.0353379026055336, + -0.05061207711696625, + -0.029356909915804863, + -0.0020924543496221304, + -0.003788757137954235, + -0.026473641395568848, + 0.03128703311085701, + -0.042176730930805206, + 0.008608103729784489, + -0.00694009754806757, + -0.011610515415668488, + -0.04336816072463989, + -0.023471230641007423, + -0.017275778576731682, + 0.006153751630336046, + 0.00021538874716497958, + 0.012140702456235886, + 0.007476242259144783, + 0.02257765643298626, + 0.016465604305267334, + 0.03393201157450676, + 0.014261453412473202, + -0.006123965606093407, + 0.051803506910800934, + -0.02552049607038498, + -0.0023054229095578194, + -0.049325328320264816, + 0.032883550971746445, + -0.00614183722063899, + 0.007214127108454704, + -0.01494057010859251, + 0.013701479882001877, + 0.01340362150222063, + -0.02230362594127655, + -0.04036575183272362, + 0.03383670002222061, + -0.020468819886446, + -0.005129119381308556, + 0.020969221368432045, + -0.032049547880887985, + -0.013034277595579624, + 0.03826883062720299, + 0.040889982134103775, + -0.00129642803221941, + 0.04498851299285889, + 0.006409909576177597, + -0.028141647577285767, + 0.00757751427590847, + 0.021636424586176872, + 0.011562857776880264, + -0.045917827636003494, + -0.02985731139779091, + -0.005578885320574045, + -0.005081461742520332, + 0.007780057843774557, + 0.006159708835184574, + -0.023375915363430977, + -0.01906292885541916, + 0.031930405646562576, + 0.0037440783344209194, + -0.0059333364479243755, + 0.03397966921329498, + 0.0221487395465374, + 0.008220887742936611, + -0.0013165335403755307, + 0.02480563521385193, + 0.05432934686541557, + 0.01796681061387062, + -0.0037768427282571793, + -0.09164503216743469, + 0.04055638238787651, + 0.02835610695183277, + -0.018753156065940857, + 0.02244659885764122, + 0.03619573637843132, + -0.03531407564878464, + -0.033026523888111115, + 0.06338423490524292, + -0.056330952793359756, + 0.02399546094238758, + 0.024019289761781693, + -0.008739161305129528, + -0.003866200102493167, + 0.04741903394460678, + -0.01934887282550335, + 0.06004822626709938, + -0.0026479598600417376, + 0.013105763122439384, + -0.03588596358895302, + -0.0009203820372931659, + -0.015643516555428505, + 0.013367878273129463, + -0.010055694729089737, + 0.0252583809196949, + 0.018133610486984253, + 0.06257406622171402, + -0.043963879346847534, + -0.056855183094739914, + 0.016477519646286964, + 0.041318897157907486, + 0.05080270394682884, + -0.026449812576174736, + 0.012498132884502411, + -0.017466409131884575, + 0.01093735545873642, + -0.030953429639339447, + -0.003991300705820322, + 0.02706935815513134, + 0.010055694729089737, + -0.041581012308597565, + 0.031072573736310005, + 0.029833482578396797, + -0.04596548527479172, + 0.020528391003608704, + -0.00896553322672844, + -0.011038627475500107, + -0.023900147527456284, + 0.008250674232840538, + -0.01725194975733757, + -0.05390043184161186, + 0.014094652608036995, + -0.017025578767061234, + 0.009209777228534222, + -0.037792254239320755, + -0.014511654153466225, + 0.017216207459568977, + -0.003118576016277075, + -0.011759444139897823, + -0.034146469086408615, + -0.004718075040727854, + -0.011413928121328354, + 0.0035385561641305685, + 0.042700961232185364, + 0.08096978813409805, + 0.017573637887835503, + 0.019110586494207382, + -0.0282131340354681, + 0.044678740203380585, + 0.05528249219059944, + -0.011693915352225304, + 0.026878729462623596, + 0.02976199798285961, + -0.0207785926759243, + 0.014392510987818241, + -0.01614391803741455, + 0.013081934303045273, + 0.05413871631026268, + 0.00037902462645433843, + 0.03173977509140968, + 0.022804027423262596, + 0.0316682904958725, + -0.030476856976747513, + -0.0017082170816138387, + -0.007839629426598549, + -0.017561722546815872, + -0.0009322963305748999, + -0.014142310246825218, + 0.030619829893112183, + 0.025163065642118454, + -0.04739520698785782, + 0.009930594824254513, + 0.028975650668144226, + 0.009215734899044037, + -0.03657699376344681, + -0.01696600578725338, + -0.021255165338516235, + -0.01458314061164856, + -0.020552219823002815, + 0.028093991801142693, + -0.01003782358020544, + 0.02692638710141182, + -0.02985731139779091, + 0.043272849172353745, + -0.013629994355142117, + -1.1286035714874743e-06, + 0.03550470620393753, + -0.09788814187049866, + 0.030119426548480988, + -0.029356909915804863, + 0.008596189320087433, + -0.02747444622218609, + -0.023530801758170128, + 0.006612453144043684, + 0.05571140721440315, + 0.01739492267370224, + -0.034146469086408615, + 0.020647535100579262, + -0.01628688909113407, + 0.026759585365653038, + -0.04000832140445709, + 0.009853151626884937, + 0.03814968466758728, + -0.05223242565989494, + 0.017323436215519905, + -0.012450475245714188, + 0.020587962120771408, + 0.034027326852083206, + 0.020290104672312737, + 0.05537780746817589, + 0.015619686804711819, + -0.010204624384641647, + 0.0066481963731348515, + -0.03305035084486008, + 0.0169540923088789, + 0.011282870545983315, + -0.018598269671201706, + 0.01697792112827301, + 0.021684080362319946, + 0.028927994892001152, + 0.008715332485735416, + -0.029785826802253723, + 0.019468015059828758, + 0.002155004534870386, + 0.0019599073566496372, + -0.01557203009724617, + 0.008542574942111969, + -0.01922972872853279, + 0.02426949143409729, + 0.042176730930805206, + 0.023173373192548752, + 0.008709375746548176, + -0.01653709076344967, + 0.03383670002222061, + -0.019420359283685684, + 0.0426771305501461, + 0.002362015889957547, + 0.0647663027048111, + -0.019813532009720802, + -0.012087088078260422, + -0.03445624187588692, + -0.0009777197847142816, + 0.05008784309029579, + -0.036553166806697845, + -0.018264668062329292, + 0.047323718667030334, + 0.0006403952720575035, + 0.018681669607758522, + -0.0230184867978096, + 0.03467070311307907, + -0.03843563050031662, + 0.040937639772892, + 0.00933487806469202, + -0.02888033725321293, + -0.015941374003887177, + -0.014440168626606464, + 0.013475107960402966, + -0.01725194975733757, + -0.018622098490595818, + -0.02761741727590561, + 0.0035355775617063046, + -0.048729609698057175, + -0.001976289553567767, + 0.0025020092725753784, + -0.013260649517178535, + 0.07320164889097214, + -0.024877121672034264, + -0.014880998991429806, + 0.011676044203341007, + 0.0063384235836565495, + -0.02092156372964382, + -0.03283589333295822, + 0.009793579578399658, + -0.06500458717346191, + -0.0094718923792243, + 0.007231998723000288, + -0.009513592347502708, + 0.04587017372250557, + -0.006481395568698645, + -0.04315370321273804, + 0.00018253126472700387, + 0.041438039392232895, + 0.011908372864127159, + 0.0350281298160553, + -0.04220055788755417, + -0.06076308339834213, + 0.04377324879169464, + 0.001992671750485897, + -0.009614864364266396, + 0.0013277032412588596, + -0.017907237634062767, + -0.01725194975733757, + -0.018574440851807594, + 0.004411280620843172, + 0.006085244473069906, + -0.020027989521622658, + 0.006344380788505077, + 0.020373504608869553, + 0.0059333364479243755, + -0.01311767753213644, + 0.02216065488755703, + 0.07358290255069733, + 0.023352088406682014, + 0.02835610695183277, + 0.012158574536442757, + -0.03362223878502846, + -0.03660082444548607, + -0.01080629788339138, + 0.06514755636453629, + 0.05299494042992592, + 0.02621152624487877, + -0.029380738735198975, + -0.02540135197341442, + 0.0013708926271647215, + -0.050707388669252396, + -0.0319780632853508, + 0.04072318226099014, + -0.01809786818921566, + 0.03745865449309349, + 0.014392510987818241, + 0.026854900643229485, + 0.018836556002497673, + 0.05780833214521408, + 0.05204179510474205, + -0.00918594840914011, + 0.0256634671241045, + 0.04305839166045189, + -0.034027326852083206, + 0.0442974790930748, + 0.0012346224393695593, + -0.05204179510474205, + -0.01458314061164856, + -0.015536286868155003, + -0.0282131340354681, + -0.03419412672519684, + 0.00828641653060913, + -0.0006463524186983705, + -0.007220084313303232, + -0.0015980096068233252, + 0.023483145982027054, + -0.013999338261783123, + -0.015595858916640282, + -0.007077112328261137, + 0.022077254951000214, + -0.005495484918355942, + 0.04193844273686409, + -0.03266909345984459, + -0.06057245656847954, + -0.0004765732155647129, + -0.018205096945166588, + 0.017180465161800385, + 0.02845142036676407, + 0.00048513663932681084, + 0.040747009217739105, + 0.060667771846055984, + -0.024055033922195435, + 0.02105262130498886, + 0.0527566559612751, + -0.008709375746548176, + -0.044273652136325836, + 0.03617190569639206, + -0.07258210331201553, + 0.04553657025098801, + 0.02428140491247177, + -0.012641104869544506, + 0.06738745421171188, + 0.04336816072463989, + 0.01878889836370945, + 0.0035206845495849848, + 0.023947803303599358, + -0.010901612229645252, + 0.013070020824670792, + 0.03824499994516373, + -0.007118812296539545, + -0.03776842728257179, + 0.027951018884778023, + 0.003615999361500144, + -0.004086615517735481, + -0.03993683680891991, + 0.02623535506427288, + -0.015012056566774845, + -0.027522103860974312, + -0.03369372710585594, + 0.05690284073352814, + -0.08144636452198029, + 0.03538556024432182, + 0.015643516555428505, + -0.05223242565989494, + 0.04162866994738579, + 0.029428396373987198, + -0.005316769704222679, + -0.02258956991136074, + -0.04108061268925667, + 0.013010448776185513, + -0.08035024255514145, + 0.014559311792254448, + -0.04193844273686409, + -0.032764408737421036, + 0.01199177373200655, + 0.013856366276741028, + 0.02368568815290928, + -0.010764597915112972, + -0.008888090029358864, + 0.020468819886446, + -0.007297527510672808, + 0.003779821330681443, + 0.043820906430482864, + 0.005897593684494495, + 0.015429058112204075, + -0.059095077216625214, + -0.01052631065249443, + 0.030929600819945335, + -0.01432102546095848, + -0.00680903997272253, + -0.046513546258211136, + -7.083441596478224e-05, + 0.027402959764003754, + -0.007827715016901493, + -0.03478984534740448, + 0.036386363208293915, + -0.017204293981194496, + 0.0072022126987576485, + -0.013737223111093044, + 0.03929346054792404, + -0.01557203009724617, + -0.005540163721889257, + 0.05332854390144348, + -0.04329667612910271, + -0.021529195830225945, + -0.0032228264026343822, + 0.04672800377011299, + -0.022613398730754852, + 0.01653709076344967, + 0.00470318179577589, + -0.012295588850975037, + 0.010151009075343609, + 0.028522906824946404, + -0.0002606259658932686, + -0.023173373192548752, + -0.007321355864405632, + 0.03671996667981148, + -0.0176689513027668, + 0.003097725799307227, + 0.02723615989089012, + -0.013761051930487156, + -0.04961127042770386, + 0.0024230768904089928, + 0.04880109801888466, + -0.025020094588398933, + 0.052280083298683167, + 0.007857500575482845, + 0.03407498449087143, + -0.0024052055086940527, + -0.012807904742658138, + 0.02666427195072174, + 0.005352512933313847, + 0.030834287405014038, + 0.004709139000624418, + 0.005373362917453051, + -0.04563188552856445, + 0.012927048839628696, + -0.01046078186482191, + -0.036982081830501556, + -0.03953174874186516, + -0.04584634304046631, + -0.010162923485040665, + -0.04670417681336403, + 0.01654900424182415, + -0.001986714545637369, + -0.016763463616371155, + -0.018979528918862343, + -0.010728854686021805, + 0.04208141565322876, + -0.004333837889134884, + -0.03552853316068649, + 0.020587962120771408, + 0.02286360040307045, + 0.017466409131884575, + -0.04470256716012955, + -0.010573968291282654, + -0.05289962515234947, + 0.018848471343517303, + 0.009775708429515362, + 0.002737317467108369, + 0.011342442594468594, + 0.0011378185590729117, + -0.014845255762338638, + -0.02020670473575592, + -0.008304288610816002, + -0.062049832195043564, + 0.004977211356163025, + 0.028570564463734627, + 0.009835279546678066, + -0.012426646426320076, + 0.007690700236707926, + 0.013808708637952805, + 0.059095077216625214, + -0.0033598411828279495, + -0.002545198891311884, + 0.050993334501981735, + 0.06433738768100739, + -0.0052035837434232235, + 0.008405559696257114, + -0.007416670676320791, + 0.03126320242881775, + -0.032740578055381775, + 0.02020670473575592, + -0.005340598523616791, + -0.0017797030741348863, + 0.0239835474640131, + -0.014178053475916386, + 0.028093991801142693, + 0.07286804169416428, + -0.03042919933795929, + 0.002874332247301936, + 0.01880081370472908, + -0.028713535517454147, + -0.04260564595460892, + 0.020945392549037933, + -0.02244659885764122, + -0.004762753378599882, + -0.023602288216352463, + 0.021386222913861275, + 0.03717271238565445, + 0.023626117035746574, + 0.046894803643226624, + -0.0015726916026324034, + 0.05146990716457367, + 0.0070473263040184975, + -0.02339974418282509, + -0.0019435251597315073, + 0.022839771583676338, + -0.003633870743215084, + 0.007470285054296255, + 0.01507162768393755, + 0.0202186182141304, + 0.03152531757950783, + -0.028856508433818817, + -0.009978251531720161, + -0.01199773047119379, + -0.019718216732144356, + -0.034146469086408615, + 0.04405919462442398, + 0.0006690641166642308, + 0.010794383473694324, + -0.013939766213297844, + -0.014142310246825218, + 0.0017648101784288883, + -0.011259042657911777, + -0.002012032549828291, + 0.018002552911639214, + -0.013761051930487156, + 0.008328116498887539, + -0.03624339401721954, + 0.024591177701950073, + 0.014690369367599487, + -0.0033300553914159536, + -0.03252612054347992, + 0.007428585086017847, + -0.004152144305408001, + 0.03157297521829605, + -0.025496667250990868, + 0.007172426674515009, + -0.002035861136391759, + 0.02247042767703533, + -0.005263155326247215, + 0.014845255762338638, + 0.00479849660769105, + 0.0035921705421060324, + 0.032740578055381775, + -0.027545932680368423, + -0.012438560836017132, + 0.029070965945720673, + -0.004744882229715586, + 0.01177731528878212, + -0.04903938248753548, + 0.01866975612938404, + 0.0353379026055336, + 0.021695995703339577, + -0.010013994760811329, + -0.013415535911917686, + -0.018896127119660378, + -0.03069131448864937, + -0.00994846597313881, + 0.03662465140223503, + 0.058570846915245056, + -0.007541771046817303, + 0.026688100770115852, + -0.00890000443905592, + 0.02876119315624237, + 0.00662436755374074, + 0.022911258041858673, + -0.02256574109196663, + -0.0005960888229310513, + -0.006296723615378141, + -0.01906292885541916, + -0.03069131448864937, + 0.04034192115068436, + 0.0017469386802986264, + -0.03235932067036629, + 0.049706585705280304, + 0.06834059953689575, + 0.013808708637952805, + 0.039484091103076935, + -0.03059600107371807, + -0.009293178096413612, + -0.004727010615170002, + 0.0037738641258329153, + -0.014142310246825218, + 0.008870218880474567, + -0.004762753378599882, + -0.013355964794754982, + -0.06977032124996185, + 0.022506169974803925, + 0.0092693492770195, + -0.020814334973692894, + -0.010484610684216022, + -0.015452886931598186, + -0.005459741689264774, + -0.008149402216076851, + 0.05985759571194649, + -0.028093991801142693, + -0.005629521328955889, + -0.040889982134103775, + -0.008375774137675762, + -0.00013673555804416537, + 0.057713016867637634, + 0.04372559115290642, + -0.04641823098063469, + 0.014332939870655537, + 0.0304530281573534, + -0.005346555728465319, + -0.04780029505491257, + 0.03412264212965965, + 0.023316344246268272, + 0.04053255170583725, + -0.009543378837406635, + 0.013725308701395988, + 0.042581815272569656, + 0.009346792474389076, + -0.02511540800333023, + 0.04513148218393326, + 0.012367075309157372, + 0.02286360040307045, + 0.025877926498651505, + 0.014487825334072113, + -0.011253084987401962, + -0.017895324155688286, + 0.038078200072050095, + -0.02623535506427288, + -0.00473594618961215, + -0.026545127853751183, + -0.03633870929479599, + 0.028951823711395264, + 0.03979386389255524, + 0.0009263391839340329, + -0.014988227747380733, + 0.009078719653189182, + -0.01582222990691662, + 0.010979055427014828, + -0.007887287065386772, + -0.01753789372742176, + -0.002752210246399045, + -0.02329251542687416, + -0.021672166883945465, + 0.014952484518289566, + -0.013927851803600788, + -0.008715332485735416, + 0.05971462279558182, + 0.01038929633796215, + 0.02330443076789379, + -0.03405115753412247, + -0.027283815667033195, + 0.04305839166045189, + 0.005004018545150757, + -0.0022130869328975677, + 0.015333742834627628, + 0.040484894067049026, + 0.0031960192136466503, + -0.024174176156520844, + -0.011533072218298912, + 0.022529998794198036, + 3.316000220365822e-05, + 0.007702614646404982, + 0.005173798184841871, + 0.0022130869328975677, + -0.019968418404459953, + 0.01074076909571886, + 0.026878729462623596, + 0.005307834129780531, + -0.019420359283685684, + -0.007106897886842489, + 0.025449009612202644, + -0.035957448184490204, + -0.01382062304764986, + 0.03884071856737137, + -0.03886454552412033, + -0.05399574711918831, + 0.012795991264283657, + 0.016918350011110306, + -0.04682331904768944, + -0.013379792682826519, + -0.026330670341849327, + -0.00988293718546629, + 0.027665074914693832, + 0.02036159113049507, + -0.021695995703339577, + 0.002914543030783534, + -0.004706160631030798, + 0.055044207721948624, + -0.03269292414188385, + 0.00960294995456934, + -0.014058910310268402, + -0.004280223045498133, + -0.025139236822724342, + 0.01016888115555048, + 0.02902330830693245, + -0.008036215789616108, + 0.016751548275351524, + -0.0137491375207901, + -0.030214741826057434, + -0.002569027477875352, + 0.03550470620393753, + 0.04196227341890335, + -0.014261453412473202, + 0.029904969036579132, + -0.03741099685430527, + 0.033336296677589417, + -0.014225710183382034, + 0.008054086938500404, + -0.012772162444889545, + 0.016858777031302452, + -0.018038297072052956, + 0.03917431831359863, + 0.0013344050385057926, + 0.00393172912299633, + 0.05218476802110672, + 0.0021147937513887882, + -0.006201408803462982, + -0.010627582669258118, + -0.01975395902991295, + -0.02471032179892063, + 0.046060800552368164, + -0.04849132522940636, + 0.008757032454013824, + 0.00975187961012125, + -0.03071514330804348, + 0.014916741289198399, + 0.021255165338516235, + -0.04320136085152626, + -0.01794298179447651, + 0.02592558227479458, + -0.0015071628149598837, + 0.0004966786364093423, + 0.04353496432304382, + -0.02652129903435707, + -0.009662522003054619, + 0.02036159113049507, + 0.0061358800157904625, + -0.025973239913582802, + -0.022935086861252785, + 0.005263155326247215, + 0.008542574942111969, + 0.005832064896821976, + 0.01478568371385336, + 0.011372228153049946, + -0.023506972938776016, + 0.02227979712188244, + 0.009126377291977406, + 0.03285972401499748, + -0.002921989420428872, + 0.03042919933795929, + 0.02175556682050228, + 0.029142452403903008, + 0.02637832798063755, + 0.010681197047233582, + 0.0224585123360157, + 0.018622098490595818, + -0.02088582143187523, + -0.005668242461979389, + -0.0004929554415866733, + 0.04293924570083618, + -0.07124769687652588, + 0.04903938248753548, + 0.030262399464845657, + 0.011676044203341007, + -0.030119426548480988, + -0.02904713712632656, + 0.022637227550148964, + 0.016620490700006485, + -0.02230362594127655, + -0.04022277891635895, + -0.028141647577285767, + -0.0007759207510389388, + 0.02355463057756424, + -0.008947662077844143, + -0.004041936714202166, + 0.00043152214493602514, + 0.02049264870584011, + -0.021672166883945465, + -0.019563330337405205, + -0.017180465161800385, + 0.02930925227701664, + -0.021517280489206314, + -0.03576682135462761, + -0.01423762459307909, + 0.0035981277469545603, + -0.028522906824946404, + 0.018300412222743034, + -0.01570308767259121, + 0.035409390926361084, + -0.030905773863196373, + 0.03319332376122475, + -0.05432934686541557, + 0.004569145850837231, + -0.03517110273241997, + 0.029213938862085342, + 0.013070020824670792, + -0.019182071089744568, + -0.009281263686716557, + -0.01452356856316328, + 0.009942508302628994, + -0.02230362594127655, + -0.011014798656105995, + -0.006856697145849466, + -0.051279276609420776, + -0.04701394587755203, + 0.015655430033802986, + -0.0010358020663261414, + 0.029666682705283165, + 0.003130490193143487, + 0.058856792747974396, + 0.008971490897238255, + 0.016799205914139748, + 0.023912061005830765, + 0.021493451669812202, + 0.028570564463734627, + 0.015667345374822617, + 0.008250674232840538, + 0.0367676243185997, + 0.022255968302488327, + 0.032621435821056366, + -0.03195423260331154, + -0.020373504608869553, + -0.0056027136743068695, + 0.0006344380672089756, + -0.00286092865280807, + -0.01810978166759014, + -0.042867761105298996, + 0.0095969932153821, + -0.007833672687411308, + -0.006284809205681086, + -0.015893716365098953, + 0.004161079879850149, + -0.007696657441556454, + 0.024221833795309067, + -0.07115238159894943, + -0.002354569500312209, + 0.01276024803519249, + 0.005641435272991657, + 0.0024498840793967247, + 0.0033300553914159536, + 0.024877121672034264, + -0.005298898555338383, + 0.029118623584508896, + -0.013260649517178535, + 0.016894521191716194, + -0.0010186752770096064, + 0.0167038906365633, + -0.05342385917901993, + -0.041723985224962234, + -0.047895606607198715, + 0.009442106820642948, + 0.036386363208293915, + 0.03159680590033531, + -0.02119559422135353, + 0.020135218277573586, + 0.0010328234639018774, + -0.004619781393557787, + -0.03955557569861412, + 0.03366989642381668, + 0.019277386367321014, + -0.006535010412335396, + -0.04615611582994461, + -0.029833482578396797, + -0.04231970012187958, + 0.0013277032412588596, + 0.03834031522274017, + -0.013558507896959782, + -0.005727814510464668, + -0.025067750364542007, + 0.013558507896959782, + 0.005671221297234297, + -0.017335351556539536, + 0.01234324648976326, + -0.016465604305267334, + 0.01473802700638771, + -0.02552049607038498, + -0.011699872091412544, + -0.045226797461509705, + 0.010550139471888542, + 0.01276024803519249, + 0.010615668259561062, + 0.0033628197852522135, + 0.04801475256681442, + -0.0005011465400457382, + 0.034432414919137955, + 0.0361480787396431, + 0.030905773863196373, + 0.030119426548480988, + -0.0013291924260556698, + 0.02807016298174858, + -0.031930405646562576, + 0.0609060563147068, + -0.022267883643507957, + -0.016477519646286964, + 0.03266909345984459, + 0.005227412562817335, + 0.015035885386168957, + -0.028236962854862213, + -0.013379792682826519, + 0.01754980906844139, + 0.013677651062607765, + 0.007470285054296255, + 0.010180795565247536, + 0.011670086532831192, + -0.02818930521607399, + -0.005951208062469959, + 0.009799536317586899, + -0.016727719455957413, + 0.023328259587287903, + 0.008208973333239555, + -0.011211385019123554, + -0.0026479598600417376, + 0.0330980084836483, + 0.017704695463180542, + 0.039341118186712265, + 0.025615809485316277, + 0.055044207721948624, + -0.03319332376122475, + 0.013570422306656837, + 0.02451969124376774, + -0.008739161305129528, + 0.0073570990934967995, + 0.01291513442993164, + -0.04363027960062027, + -0.009459977969527245, + 0.04293924570083618, + -0.0066422391682863235, + 0.02678341418504715, + 0.020123304799199104, + -0.01128882821649313, + 0.01821701042354107, + -0.023733345791697502, + 0.0195037592202425, + 0.022375112399458885, + 0.007607299834489822, + 0.024638835340738297, + -0.015464800409972668, + -0.025973239913582802, + -0.07191489636898041, + -0.04072318226099014, + -0.013093848712742329, + -0.008864262141287327, + -0.02158876694738865, + 0.019742045551538467, + 0.024472035467624664, + 0.012295588850975037, + 0.016298804432153702, + -0.002147558145225048, + 0.013320221565663815, + -0.013939766213297844, + -0.0095969932153821, + 0.04401153698563576, + -0.02088582143187523, + 0.05780833214521408, + -0.011181599460542202, + 0.006463524419814348, + 0.029833482578396797, + 0.007410713471472263, + 0.011056498624384403, + 0.053948089480400085, + 0.051136307418346405, + 0.036672309041023254, + 0.0042444802820682526, + -0.029261594638228416, + 0.0011832419550046325, + 0.057855989784002304, + -0.006963925901800394, + 0.047919437289237976, + -0.002211597515270114, + -0.016382204368710518, + -0.006749468389898539, + -0.0010156966745853424, + 0.00856640376150608, + -0.010627582669258118, + 0.043582621961832047, + -0.031024916097521782, + -0.007887287065386772, + -0.007220084313303232, + 0.01017483789473772, + -0.007619214244186878, + 0.011652215383946896, + -0.009376578032970428, + -0.029690511524677277, + 0.02017096057534218, + -0.012295588850975037, + 0.043820906430482864, + -0.0692460909485817, + 0.006278852000832558, + -0.02876119315624237, + -0.0037947141099721193, + 0.011967944912612438, + -0.016858777031302452, + -0.006511181592941284, + -0.016501348465681076, + -0.031024916097521782, + -0.003806628519669175, + -0.019956503063440323, + 0.018002552911639214, + 0.01920589990913868, + -0.00042407569708302617, + -0.03459921479225159, + 0.027259988710284233, + -0.0057367500849068165, + 0.028713535517454147, + -0.02244659885764122, + 0.005843978840857744, + 0.03073897212743759, + -0.015035885386168957, + -0.020861992612481117, + -0.020016074180603027, + 0.007273698691278696, + -0.004041936714202166, + -0.00498614739626646, + 0.023066144436597824, + -0.046656519174575806, + -0.04334433376789093, + 0.0030173042323440313, + 0.06896014511585236, + -0.008691503666341305, + 0.0002150164364138618, + -0.009102548472583294, + 0.007857500575482845, + 0.008739161305129528, + -0.02176748216152191, + 0.02761741727590561, + 0.013594251126050949, + -0.0013411068357527256, + 0.004286180250346661, + 0.016322633251547813, + 0.036982081830501556, + 0.027259988710284233, + -0.010311853140592575, + -0.010907569900155067, + 0.03131086006760597, + -0.027688903734087944, + 0.0041640582494437695, + -0.005662285722792149, + -0.0020567113533616066, + -0.020123304799199104, + -0.0024364804849028587, + 0.006552881561219692, + 0.0010075055761262774, + 0.004027043469250202, + 0.023375915363430977, + -0.004619781393557787, + 0.015643516555428505, + 0.005692071281373501, + 0.036386363208293915, + -0.005373362917453051, + -0.021362394094467163, + 0.016072431579232216, + 0.016215404495596886, + 0.01906292885541916, + 0.011497328989207745, + 0.007684743031859398, + 0.025973239913582802, + -0.01922972872853279, + 0.004015129525214434, + -0.04105678200721741, + 0.003059004433453083, + 0.019456101581454277, + 0.0013656801311299205, + -0.009853151626884937, + -0.024924779310822487, + -0.011467543430626392, + -0.01570308767259121, + 0.005614628084003925, + -0.013236820697784424, + 0.022506169974803925, + -0.010002080351114273, + 0.0010253770742565393, + 0.0066481963731348515, + 0.013892109505832195, + -0.02482946403324604, + 8.149215864250436e-05, + 0.017561722546815872, + -0.01807403936982155, + 0.039007518440485, + -0.02807016298174858, + -0.005093376152217388, + -0.012676847167313099, + -0.04489319771528244, + -0.02523455210030079, + -0.03800671547651291, + -0.016370289027690887, + 0.04322519153356552, + -0.035576190799474716, + 0.010496525093913078, + -0.012075173668563366, + 0.021350480616092682, + 0.022827856242656708, + -0.01964673027396202, + 0.015166942961513996, + -0.0006981053156778216, + 0.006022694054991007, + -0.009293178096413612, + -0.01234324648976326, + -0.0017216207925230265, + 0.01696600578725338, + -0.014845255762338638, + -0.008864262141287327, + -0.02764124609529972, + 0.026711929589509964, + 0.01225984562188387, + 0.012879391200840473, + -0.019146328791975975, + -0.002701574470847845, + -0.008524703793227673, + 0.02256574109196663, + 0.004503617063164711, + 0.0013686587335541844, + -0.022923171520233154, + -0.005388255696743727, + -0.008137487806379795, + 0.024019289761781693, + 0.01683494821190834, + -0.020099475979804993, + -0.03216869384050369, + 0.02357845939695835, + -0.012784076854586601, + -0.0006359273684211075, + -0.02088582143187523, + 0.01029993873089552, + 0.03884071856737137, + 0.030238570645451546, + -0.03266909345984459, + -0.0015295022167265415, + -0.0535668283700943, + 0.028141647577285767, + 0.01045482512563467, + 0.013582336716353893, + 0.014475911855697632, + -0.016787292435765266, + 0.02145770937204361, + -0.007208169903606176, + -0.004718075040727854, + 0.010556097142398357, + -0.02188662439584732, + 0.019003357738256454, + 0.027593588456511497, + -0.0353379026055336, + 0.007077112328261137, + 0.0011750508565455675, + -0.00579036446288228, + 0.0027924212627112865, + 0.00017192006635013968, + -0.01781192421913147, + -0.03281206637620926, + 0.022387025877833366, + -0.018753156065940857, + 0.0037262067198753357, + -0.020302018150687218, + -0.024233747273683548, + -0.02273254282772541, + 0.023185286670923233, + 0.02018287591636181, + 0.0014796109171584249, + -0.01740683615207672, + 0.019384615123271942, + -0.021267078816890717, + -0.014249539002776146, + 0.023769089952111244, + 0.01410656701773405, + 0.012533875182271004, + -0.0038870503194630146, + 0.018014468252658844, + 0.03800671547651291, + 0.005745685659348965, + -0.010752683505415916, + -0.0022726585157215595, + 0.011878587305545807, + 0.01951567269861698, + 0.055759064853191376, + 0.002303933724761009, + -0.06238343566656113, + -0.00588865764439106, + 0.027117015793919563, + -0.03717271238565445, + 0.007023497950285673, + 0.03383670002222061, + 0.017871495336294174, + -0.002913053845986724, + 0.026283012703061104, + 0.019265472888946533, + -0.007214127108454704, + -0.010043780319392681, + -0.02454352006316185, + -0.0011757954489439726, + 0.017990639433264732, + 0.025901753455400467, + 0.03965089097619057, + -0.014606969431042671, + 0.02202959731221199, + 0.03300269693136215, + 0.028022505342960358, + -0.030405370518565178, + 0.012426646426320076, + 0.016036689281463623, + 0.00882851891219616, + -0.018062124028801918, + 0.03448007255792618, + -0.021505367010831833, + 0.008679589256644249, + 0.020528391003608704, + -0.021827053278684616, + 0.02243468351662159, + 0.00030530471121892333, + -0.014225710183382034, + -0.007017540745437145, + -0.011938159354031086, + -0.019003357738256454, + -0.055187176913022995, + -0.014749941416084766, + -0.023876318708062172, + -0.004167037084698677, + -0.008363859727978706, + -0.04022277891635895, + 0.00691031152382493, + -0.023733345791697502, + 0.002729870844632387, + 0.04679948836565018, + 0.011610515415668488, + -0.01544097252190113, + 0.016477519646286964, + -0.008977447636425495, + 0.0066481963731348515, + -0.013439364731311798, + -0.021088365465402603, + 0.016858777031302452, + -0.013415535911917686, + 0.01129478495568037, + -0.0301432553678751, + -0.004604888614267111, + -0.021004963666200638, + -0.016334546729922295, + 0.014690369367599487, + 0.00027198181487619877, + -0.011479456909000874, + -0.005590799730271101, + -0.006832868326455355, + 0.06076308339834213, + 0.011241170577704906, + 0.0006441184668801725, + 0.021088365465402603, + 0.040937639772892, + 0.005036782938987017, + -0.008584274910390377, + -0.0028028462547808886, + 0.010264195501804352, + 0.008846390061080456, + 0.01024036668241024, + 0.0330980084836483, + -0.0010075055761262774, + 0.036672309041023254, + 0.006368209607899189, + 0.004762753378599882, + 0.007815800607204437, + 0.0055550565011799335, + -0.02048073336482048, + 0.014475911855697632, + 0.005295919720083475, + -0.028665879741311073, + -0.021517280489206314, + 0.012390903197228909, + -0.0028892250265926123, + -0.013165335170924664, + -0.025711124762892723, + -0.014201881363987923, + 0.00010853210551431403, + 0.025329865515232086, + 0.00826258771121502, + 0.026330670341849327, + 0.01782383769750595, + -0.012015602551400661, + 0.0092693492770195, + -0.02299465797841549, + 0.0092693492770195, + -0.012617276050150394, + 0.0032406977843493223, + 0.03619573637843132, + 0.014023167081177235, + 0.004214694257825613, + -0.01905101351439953, + -0.01416613906621933, + 0.03643402084708214, + -0.0013545104302465916, + 0.0011988794431090355, + -0.014428254216909409, + -0.03426561504602432, + 0.025901753455400467, + 0.018062124028801918, + -0.015679258853197098, + -0.014880998991429806, + -0.01093735545873642, + -0.009555293247103691, + -0.01353467907756567, + -0.017776180058717728, + 0.003809607122093439, + 0.02092156372964382, + -0.03138234466314316, + 0.018455298617482185, + 0.01783575303852558, + 0.0021147937513887882, + 0.008137487806379795, + -0.005248262546956539, + -0.00988293718546629, + -0.007559642661362886, + -0.030405370518565178, + -0.03321715444326401, + -0.007321355864405632, + -0.008161316625773907, + -0.006963925901800394, + -0.004610845819115639, + -0.03464687243103981, + -0.03164445981383324, + -0.03169211745262146, + 0.014440168626606464, + 0.015786487609148026, + 0.03181126341223717, + 0.0005115715321153402, + -0.008018344640731812, + 0.035409390926361084, + -4.230518243275583e-05, + 0.014225710183382034, + 0.004655524622648954, + -0.013487022370100021, + 0.045369770377874374, + -0.02471032179892063, + -0.008208973333239555, + 0.0028311428613960743, + -0.022196397185325623, + -0.011866672895848751, + 0.0009300624369643629, + -0.010579925030469894, + 0.02412651851773262, + 0.0322878360748291, + -0.0012606850359588861, + 0.026711929589509964, + -0.013093848712742329, + 0.0079945158213377, + -0.0015190771082416177, + -0.010204624384641647, + -0.001805021078325808, + -0.007887287065386772, + 0.013653822243213654, + -0.01740683615207672, + -0.00997229479253292, + 0.0057784500531852245, + -0.030667485669255257, + 0.02357845939695835, + 0.013641907833516598, + 0.004551274236291647, + -0.01136031374335289, + 0.019468015059828758, + 0.03903134539723396, + -0.03521876037120819, + -0.009674436412751675, + 0.036100421100854874, + -0.023221030831336975, + -0.004461916629225016, + 0.009728050790727139, + -0.003291333792731166, + -0.03378904238343239, + -0.009990165941417217, + -0.006850739941000938, + -0.02540135197341442, + -0.0005309323314577341, + 0.020576048642396927, + -0.013808708637952805, + -0.005298898555338383, + -0.0009993144776672125, + 0.046918634325265884, + -0.02413843385875225, + 0.0020864971447736025, + -0.01740683615207672, + 0.016656232997775078, + 0.018741242587566376, + 0.0017365136882290244, + 0.008620018139481544, + -0.037506312131881714, + -0.016334546729922295, + 0.016656232997775078, + 0.020004160702228546, + -0.01478568371385336, + 0.01078842580318451, + 0.013582336716353893, + 0.01906292885541916, + -0.02062370628118515, + -0.005525270942598581, + -0.015631601214408875, + 0.016036689281463623, + 0.004476809408515692, + 0.01709706336259842, + 0.014618883840739727, + 0.024900950491428375, + 0.03519493341445923, + -0.011110113002359867, + 0.026878729462623596, + -0.010258238762617111, + -0.027164673432707787, + 0.0055818636901676655, + -0.004840196575969458, + 0.003273462178185582, + 0.00047024371451698244, + -0.017156636342406273, + -0.043129876255989075, + -0.01625114679336548, + 0.015107370913028717, + 0.03888837620615959, + 0.0015280129155144095, + -0.004265330266207457, + -0.0019211857579648495, + -0.026044726371765137, + -0.034003499895334244, + -0.020981136709451675, + 0.026902558282017708, + -0.018705498427152634, + -0.011652215383946896, + -0.019718216732144356, + -0.01684686355292797, + -9.559388854540884e-05, + 0.019575245678424835, + 0.019670559093356133, + 0.019527588039636612, + 0.00848300289362669, + -0.009346792474389076, + -0.017716608941555023, + 0.03545704856514931, + -0.009626778773963451, + -0.002396269701421261, + -0.016620490700006485, + -0.015238428488373756, + -0.025973239913582802, + 0.030238570645451546, + -0.028403762727975845, + 0.022768285125494003, + 0.006451610010117292, + -0.0032138905953615904, + 0.004661481827497482, + -0.02339974418282509, + -0.02005181834101677, + 0.038769230246543884, + -0.030905773863196373, + 0.014189967885613441, + -0.012378989718854427, + 0.009781665168702602, + -0.006707767955958843, + 0.02818930521607399, + 0.021004963666200638, + 0.009525506757199764, + -0.01851486973464489, + 0.02664044313132763, + 0.04965892806649208, + 0.011181599460542202, + -0.030214741826057434, + -0.0364578515291214, + 0.038078200072050095, + -0.007750271819531918, + -0.039221975952386856, + -0.010210581123828888, + 0.007786015048623085, + 0.0071545555256307125, + -0.026425985619425774, + -0.0031692117918282747, + 0.028713535517454147, + 0.03336012363433838, + 0.016501348465681076, + 0.012462389655411243, + 0.019610987976193428, + 0.018765069544315338, + -0.01115777064114809, + 0.004569145850837231, + -0.0007420394103974104, + -0.018717413768172264, + 0.01809786818921566, + -0.007547728251665831, + 0.025067750364542007, + -0.032073378562927246, + -0.005593778099864721, + 0.019110586494207382, + -0.0024498840793967247, + 0.008095787838101387, + -0.011253084987401962, + -0.01713280752301216, + -0.0005294430302456021, + 0.01628688909113407, + 0.0008347477996721864, + -0.0015786488074809313, + -0.0022369155194610357, + 0.008399602957069874, + 0.005447827745229006, + 0.004673396237194538, + 0.027665074914693832, + -0.009829322807490826, + 0.009632736444473267, + -0.06214514747262001, + 0.019873103126883507, + -0.006403952371329069, + 0.009245520457625389, + 0.008751075714826584, + -0.002400737488642335, + 0.01403508149087429, + 0.009346792474389076, + 0.012021559290587902, + -0.004819346591830254, + 9.526810026727617e-05, + -0.024066947400569916, + 0.03848328813910484, + 0.006386081222444773, + 0.018836556002497673, + -0.006666067987680435, + -0.02723615989089012, + -0.0009308070875704288, + -0.012807904742658138, + 0.00012742748367600143, + 0.015607772395014763, + ], + "index": 7, + }, + { + "title": "D. P. Todd Secondary School", + "text": "D.P. Todd Secondary School is a public high school in Prince George, British Columbia and is part of School District 57 Prince George.", + "vector": [ + 0.030391348525881767, + 0.004553459584712982, + -0.024085406213998795, + 0.015098313800990582, + 0.03978285938501358, + 0.011728154495358467, + 0.01950198784470558, + 0.003330840729176998, + -0.026077544316649437, + 0.07231613248586655, + 0.022123223170638084, + -0.030181650072336197, + -0.006545598153024912, + 0.016296593472361565, + -0.06530620157718658, + 0.005856588017195463, + -0.0421794168651104, + 0.023201674222946167, + 0.050327714532613754, + -0.044366274029016495, + 0.0013555529294535518, + -0.042329199612140656, + 0.000637053744867444, + 0.01837860234081745, + 0.014409303665161133, + 0.019531946629285812, + -0.03978285938501358, + -0.009286661632359028, + -0.0006927549839019775, + 0.0319940447807312, + -0.013218513689935207, + 0.025208791717886925, + 0.03714664652943611, + -0.042538899928331375, + 0.01996632106602192, + 0.009354064241051674, + 0.013188556768000126, + 0.0040329573675990105, + -0.035798583179712296, + -0.015652518719434738, + -0.010290219448506832, + -0.026437027379870415, + -0.03828500956296921, + 0.00985584408044815, + 0.023830771446228027, + -0.013757739216089249, + -0.01950198784470558, + -0.03133499249815941, + -0.0061187115497887135, + 0.023725921288132668, + -0.029267961159348488, + -0.04835055395960808, + -0.026287242770195007, + 0.028399208560585976, + -0.011143993586301804, + 0.020610395818948746, + 0.05272427201271057, + 0.11449554562568665, + -0.027800070121884346, + -0.01785435527563095, + -0.051975347101688385, + 0.021763740107417107, + 0.050717152655124664, + -0.021104685962200165, + 0.05700811743736267, + 0.0827411562204361, + 0.0496087446808815, + 0.006466961465775967, + -0.0017440575174987316, + -0.00650815200060606, + -0.011039144359529018, + 0.0012460227590054274, + 0.054641515016555786, + 0.02694629691541195, + 0.035139527171850204, + 0.01610187254846096, + 0.006339644081890583, + 0.03193413093686104, + -0.013226003386080265, + -0.024549739435315132, + 0.006047563627362251, + -0.002681148936972022, + 0.02522377111017704, + 0.02627226524055004, + 0.010177881456911564, + -0.018992720171809196, + 0.00450103497132659, + -0.04802102595567703, + 0.031275078654289246, + 0.027350716292858124, + 0.01673096790909767, + 0.012664309702813625, + 0.028159553185105324, + 0.013989905826747417, + -0.02705114521086216, + 0.02574801817536354, + 0.0036322828382253647, + -0.024549739435315132, + 0.03591841086745262, + -0.009421467781066895, + 0.04101109504699707, + 0.03370159491896629, + 0.002499534748494625, + 0.01610187254846096, + 0.004568438045680523, + -0.0030368880834430456, + 0.016790883615612984, + -0.008972113020718098, + 0.02519381418824196, + 0.027066124603152275, + -0.03094555251300335, + 0.06626482307910919, + 0.0041902316734194756, + 0.025388533249497414, + -0.004766903351992369, + 0.08028468489646912, + -0.023201674222946167, + 0.010604768060147762, + -0.016895731911063194, + -0.046643003821372986, + -0.0006342452834360301, + -0.037026818841695786, + -0.044995371252298355, + -0.03591841086745262, + -0.018917826935648918, + -0.07423337548971176, + -0.024325061589479446, + 0.03543909639120102, + 0.014656448736786842, + -0.012896476313471794, + 0.005085195880383253, + -0.01740500144660473, + -0.023441331461071968, + 0.03325223922729492, + 0.00502528203651309, + -0.0031436097342520952, + 0.010664681904017925, + 0.006803977303206921, + -0.003473136341199279, + 0.03232357278466225, + -0.01863323710858822, + 0.046223606914281845, + -0.008987091481685638, + -0.042538899928331375, + 0.010687150061130524, + 0.0032241190783679485, + 0.025598231703042984, + 0.08004502952098846, + 0.05673850327730179, + -0.012701756320893764, + -0.01526307687163353, + 0.04391692206263542, + -0.0020108616445213556, + 0.01683581806719303, + -0.008792371489107609, + 0.0007812216645106673, + -0.027725176885724068, + 0.03957315906882286, + -0.05077706649899483, + 0.017569763585925102, + 0.0015895918477326632, + 0.03214383125305176, + 0.029477659612894058, + -0.008268124423921108, + -0.03600827977061272, + -0.0007082015508785844, + 0.009848354384303093, + 0.008642585948109627, + 0.05272427201271057, + -0.013218513689935207, + 0.031035423278808594, + 0.02877367101609707, + 0.0367572046816349, + -0.0033008838072419167, + -0.03888414800167084, + -0.051346249878406525, + 0.00676278630271554, + -0.03507961332798004, + 0.006759041920304298, + -0.0005677782464772463, + -0.009114408865571022, + 0.009136876091361046, + 0.01410224474966526, + -0.08340021222829819, + -0.019337225705385208, + 0.001917246263474226, + 0.06147170811891556, + 0.039633072912693024, + -0.02389068529009819, + -0.028758693486452103, + 0.0014407431008294225, + 0.004377462435513735, + 0.01026026252657175, + 0.0027017444372177124, + 0.03603823855519295, + -0.013817653059959412, + -0.022302964702248573, + -0.017375044524669647, + 0.0681820660829544, + 0.02684144675731659, + -0.005317362491041422, + -0.018228817731142044, + -0.017105430364608765, + 0.004703244660049677, + 0.05554022639989853, + 0.028788650408387184, + 0.01730015128850937, + 0.035798583179712296, + -0.005856588017195463, + -0.01568247564136982, + 0.058565881103277206, + 0.009211769327521324, + 0.018183881416916847, + 0.03786561265587807, + 0.011555901728570461, + 0.04098113626241684, + 0.011533434502780437, + 0.021913524717092514, + -0.004935411270707846, + -0.016446378082036972, + 0.018198860809206963, + 0.05377276614308357, + 0.021913524717092514, + -0.001088748686015606, + -0.018543366342782974, + 0.006365856621414423, + -0.0022823468316346407, + 0.02365102991461754, + -0.018947783857584, + -0.025238748639822006, + -0.03340202197432518, + 0.007594092283397913, + 0.01312115415930748, + -0.0015736771747469902, + -0.030601046979427338, + 0.013495615683495998, + 0.007976043969392776, + 0.02431008219718933, + -0.019801558926701546, + 0.005381021182984114, + -0.011818025261163712, + -0.022707384079694748, + -0.02255759947001934, + -0.029208047315478325, + 5.447254079626873e-05, + 0.046613048762083054, + -0.007953575812280178, + 0.054851215332746506, + 0.026227328926324844, + 0.011810536496341228, + 0.0019284801091998816, + 0.001770269824191928, + 0.0170904528349638, + -0.018468473106622696, + 0.004564693663269281, + 0.028968391939997673, + -0.02263249270617962, + -0.011391138657927513, + -0.004721967503428459, + 0.007268310524523258, + -0.0025557042099535465, + -0.0027953600510954857, + -0.03978285938501358, + 0.04718223214149475, + -0.007796301972121, + 0.01061225775629282, + -0.033491894602775574, + 0.00029699530568905175, + 0.006343388929963112, + 0.017270194366574287, + -0.002954506315290928, + 0.0008359867497347295, + -0.025628188624978065, + -0.032713014632463455, + -0.001276915892958641, + -0.02995697222650051, + -0.0004701840225607157, + 0.00201273406855762, + -0.007871194742619991, + 0.020370740443468094, + 0.004950389731675386, + -0.014776276424527168, + -0.03939341753721237, + -0.026466984301805496, + 0.0030705896206200123, + -0.07189673185348511, + -0.031484778970479965, + 0.06147170811891556, + 0.08232175558805466, + -0.008178253658115864, + -0.011735644191503525, + -0.016401441767811775, + -0.015697453171014786, + -0.028923455625772476, + 0.04062165319919586, + 0.01989142969250679, + -0.00903202686458826, + -0.05823635309934616, + -0.006466961465775967, + -0.008425398729741573, + -0.0023703454062342644, + 0.007459286134690046, + 0.012372229248285294, + -0.02501407079398632, + 0.001840481418184936, + 0.002048308029770851, + -0.03034641221165657, + -0.017390022054314613, + -0.010964252054691315, + -0.041520364582538605, + 0.02402549237012863, + -0.0018442260334268212, + -0.03573866933584213, + 0.009286661632359028, + 0.008065914735198021, + -0.07501225918531418, + -0.022782277315855026, + 0.05985403060913086, + 0.020999837666749954, + -0.020355762913823128, + 0.01968173123896122, + 0.008328038267791271, + -0.0186631940305233, + -0.002608128823339939, + 0.0982588678598404, + -0.025208791717886925, + -0.01538290549069643, + -0.004665798507630825, + 0.04077143967151642, + -0.020505547523498535, + -0.0021381787955760956, + -0.023800814524292946, + -0.004841795656830072, + -0.027770113199949265, + 0.05539043992757797, + -0.01884293556213379, + -0.018333666026592255, + -0.04844042286276817, + -0.014117223210632801, + 0.028683800250291824, + 0.013465658761560917, + 0.030616024509072304, + 0.03912380710244179, + 0.012993836775422096, + -0.038404837250709534, + 0.003435690188780427, + 0.010402558371424675, + -0.021074729040265083, + -0.03379146382212639, + -0.04565442353487015, + 0.0004891412099823356, + -0.012057681567966938, + 0.039483290165662766, + 0.02493917942047119, + 0.025478404015302658, + -0.044156577438116074, + -0.016551226377487183, + -0.04155031964182854, + -0.017839375883340836, + -0.06542602926492691, + 0.027380673214793205, + 0.003694069106131792, + -0.05026780068874359, + 0.010672171600162983, + 0.02694629691541195, + -0.004736945964396, + 0.031005466356873512, + 0.06518637388944626, + 0.009174322709441185, + 0.012551971711218357, + -0.00505149457603693, + 0.02648196369409561, + 0.02582290954887867, + -0.00927917193621397, + -0.024759437888860703, + 0.013697825372219086, + 0.0033907548058778048, + -0.0029470170848071575, + 0.00426137913018465, + -0.013555529527366161, + -0.0105448542162776, + 0.00033303728559985757, + -0.02088000997900963, + -0.00927917193621397, + 0.012716734781861305, + 0.005223746877163649, + 0.05904519185423851, + -0.010028095915913582, + -0.030511176213622093, + 0.006317176390439272, + 0.008897220715880394, + -0.027904920279979706, + 0.012162530794739723, + 0.0020108616445213556, + 0.019621817395091057, + 0.035978324711322784, + -0.049908313900232315, + -0.00857518333941698, + 0.009743505157530308, + -0.06542602926492691, + -0.04140053689479828, + -0.02111966535449028, + -0.06344886869192123, + -0.07183682173490524, + 0.05014796927571297, + -0.006882614456117153, + -0.016955645754933357, + -0.0050065587274730206, + -0.0006122456397861242, + 0.07812778651714325, + -0.024504803121089935, + -0.025867845863103867, + 0.00013878503523301333, + 0.011885428801178932, + 0.03274296969175339, + -0.02073022536933422, + -0.009668612852692604, + 0.05820639804005623, + -0.016790883615612984, + 0.027605349197983742, + 0.06458722800016403, + 0.023531202226877213, + -0.045624468475580215, + -0.024864286184310913, + 0.02887852117419243, + 0.04059169813990593, + 0.025688104331493378, + 0.008065914735198021, + 0.01575736701488495, + -0.0025238748639822006, + -0.021284429356455803, + -0.026077544316649437, + -0.050747111439704895, + 0.022287987172603607, + -0.025418490171432495, + 0.008328038267791271, + -0.04343760758638382, + 0.00785621628165245, + 0.016041958704590797, + 0.04924926161766052, + -0.06704370677471161, + -0.04304816946387291, + 0.022183137014508247, + -0.015652518719434738, + 0.03055611066520214, + 0.014326921664178371, + -0.02739565074443817, + 0.006193603854626417, + -0.027455564588308334, + 0.022048331797122955, + 0.022407814860343933, + 0.00424640066921711, + -0.031005466356873512, + -0.05083698034286499, + -0.001774014439433813, + 0.00350871030241251, + -0.009421467781066895, + -0.009885801002383232, + 0.002859018510207534, + -0.004235167056322098, + 0.027455564588308334, + 0.0029788464307785034, + 0.02210824564099312, + -0.04002251476049423, + -0.04430636018514633, + 0.04349752143025398, + 0.01184049341827631, + 0.0011861089151352644, + -0.027830027043819427, + 0.013323362916707993, + -0.033132411539554596, + 0.025733038783073425, + -0.04700249060988426, + 0.05089689418673515, + 0.02273734100162983, + -0.007976043969392776, + 0.030601046979427338, + -0.03672724589705467, + 0.0039730435237288475, + 0.016566205769777298, + 0.0034600303042680025, + -0.06006372720003128, + 0.03367163613438606, + 0.021479148417711258, + -0.008680032566189766, + -0.024085406213998795, + 0.006186114624142647, + 0.007249587215483189, + 0.010956762358546257, + -0.015427840873599052, + 0.02389068529009819, + -0.0013415106805041432, + -0.025912780314683914, + -0.0496087446808815, + 0.020715245977044106, + -0.010117967613041401, + 0.04137057811021805, + -0.04283846914768219, + 0.021628933027386665, + 0.025807932019233704, + 0.010956762358546257, + 0.0021737527567893267, + 0.03202400356531143, + 0.00931661855429411, + 0.004684521351009607, + 0.0015577625017613173, + -0.03630784898996353, + 0.009384021162986755, + -0.01800413988530636, + 0.035169485956430435, + 0.027800070121884346, + 0.007676474284380674, + -0.019816536456346512, + -0.029582509770989418, + -0.0036603675689548254, + 0.015427840873599052, + 0.02483432926237583, + -0.004403674975037575, + 0.0062010930851101875, + -0.0027654028963297606, + 0.002171880565583706, + 0.050717152655124664, + -0.038854192942380905, + 0.029597489163279533, + -0.028953412547707558, + -0.018753064796328545, + -0.006399557925760746, + -0.00704363314434886, + 0.01305375061929226, + -0.01680586114525795, + -0.02869877964258194, + -0.003553645685315132, + 0.02231794409453869, + -0.029897058382630348, + -0.0031286312732845545, + 0.0035330504179000854, + -0.0157124325633049, + -0.05455164611339569, + -0.008500291034579277, + -0.016251657158136368, + -0.003085568081587553, + -0.026407070457935333, + 0.0014632107922807336, + -0.024055449292063713, + -0.01617676578462124, + -0.021374300122261047, + -0.0024452379439026117, + -0.03600827977061272, + -0.03343198075890541, + -0.008747436106204987, + 0.017180323600769043, + -0.0006281602545641363, + -0.022362880408763885, + 0.016820840537548065, + 0.005328596569597721, + -0.10790501534938812, + -0.04697253182530403, + -0.017030538991093636, + 0.03214383125305176, + -0.008635097183287144, + 0.01628161408007145, + 0.0395132452249527, + -0.04289838299155235, + -0.015877194702625275, + -0.027919897809624672, + -0.016056936234235764, + -0.02368098683655262, + 0.06710361689329147, + 0.029267961159348488, + 0.010777020826935768, + 0.016925688832998276, + -0.026856426149606705, + 0.0055045937187969685, + 0.019801558926701546, + 0.06093247979879379, + -0.009496360085904598, + -0.0036154319532215595, + -0.003452541073784232, + -0.04301821067929268, + -0.028354274109005928, + -0.026407070457935333, + 0.010222816839814186, + 0.011877939105033875, + -0.005036516115069389, + 0.01384012121707201, + 0.05557018145918846, + -0.00676278630271554, + 0.005871566478163004, + -0.007159716449677944, + 0.001088748686015606, + -0.009833375923335552, + -0.026466984301805496, + 0.0221382025629282, + 0.003040632698684931, + -0.00044701420119963586, + -0.027830027043819427, + 0.0033870101906359196, + -0.01459653489291668, + -0.043587394058704376, + -0.0011889173183590174, + 0.017075473442673683, + 0.024115363135933876, + -0.01557762548327446, + -0.004673287738114595, + -0.07423337548971176, + 0.0021063496824353933, + 0.05377276614308357, + -0.0002974633825942874, + 0.011428584344685078, + -0.03645763546228409, + -0.050357669591903687, + -0.024924200028181076, + 0.020340783521533012, + -0.009271683171391487, + 0.05640897899866104, + 0.025912780314683914, + 0.0346602164208889, + 0.052784185856580734, + 0.005070217419415712, + -0.02020597830414772, + 0.0367572046816349, + -0.03163456171751022, + 0.0027335737831890583, + -0.008133318275213242, + 0.005014047957956791, + -0.003076206659898162, + 0.020969880744814873, + -0.01715036667883396, + -0.007796301972121, + -0.03136495128273964, + 0.008125828579068184, + 0.019097570329904556, + 0.04062165319919586, + -0.013405744917690754, + -0.03220374509692192, + 0.007766345050185919, + 0.0024920455180108547, + 0.0036659843754023314, + -0.04754171520471573, + 0.00265680905431509, + 0.038225095719099045, + -0.013667868450284004, + 0.021344343200325966, + 0.006848912686109543, + -0.01712040975689888, + -0.038644492626190186, + 0.032533273100852966, + -0.023695964366197586, + 0.0432279109954834, + 0.03855462372303009, + -0.012214954942464828, + 0.008814838714897633, + -0.00425388989970088, + 0.020161041989922523, + 0.028998348861932755, + -0.0005935225053690374, + 0.040891267359256744, + -0.023441331461071968, + 0.005714292172342539, + 0.02634715661406517, + -0.0538925938308239, + 0.0047294567339122295, + -0.009384021162986755, + 0.019846493378281593, + 0.0011964065488427877, + -0.013323362916707993, + -0.018094010651111603, + -0.020011257380247116, + 0.013458169996738434, + 0.047062404453754425, + -0.04595399647951126, + -0.019846493378281593, + 0.01008801069110632, + -0.0226624496281147, + -0.013293405994772911, + -0.03235353156924248, + -0.030511176213622093, + -0.06470706313848495, + -0.03672724589705467, + 0.04367726668715477, + 0.002121328143402934, + 0.004886731039732695, + 0.01677590422332287, + 0.028159553185105324, + 0.04565442353487015, + 0.0016504419036209583, + -0.00477064773440361, + -0.0073357135988771915, + -0.022812234237790108, + 0.029178090393543243, + 0.0034076054580509663, + -0.023321501910686493, + 0.025942737236618996, + 0.007302011828869581, + -0.015225631184875965, + 0.022153180092573166, + 0.007373159751296043, + -0.025568274781107903, + -0.037895567715168, + -0.048859819769859314, + 0.02407042682170868, + -0.007069845218211412, + -0.03543909639120102, + 0.010425026528537273, + 0.040082428604364395, + -0.015173206105828285, + -0.008477822877466679, + 0.009324107319116592, + 0.01638646423816681, + -0.028848564252257347, + -0.013944970443844795, + 0.015547668561339378, + -0.006126200780272484, + 0.03567875176668167, + 0.02799479104578495, + 0.0336117222905159, + -0.02168884687125683, + -0.03615806624293327, + -0.01082195620983839, + 0.016641097143292427, + 0.03633780777454376, + 0.01897774264216423, + -0.022228073328733444, + 0.030825724825263023, + -0.01701555959880352, + 0.026332179084420204, + 0.020445633679628372, + 0.002404046943411231, + -0.029672380536794662, + 0.0025032793637365103, + -0.036217980086803436, + 0.003330840729176998, + -0.004688266199082136, + 0.0063958135433495045, + 0.031454820185899734, + 0.010425026528537273, + -0.015075846575200558, + 0.017839375883340836, + 0.03481000289320946, + 0.005912757478654385, + 0.05428203195333481, + -0.02705114521086216, + 0.01792924851179123, + 0.03861453756690025, + 0.02621234953403473, + 0.012372229248285294, + 0.02174876071512699, + 0.032083917409181595, + -0.02757539227604866, + -0.017794441431760788, + -0.0033233514986932278, + -0.01683581806719303, + 0.028084661811590195, + 0.008305570110678673, + -0.017479892820119858, + -0.006107477471232414, + -0.009091940708458424, + -0.030406326055526733, + 0.013443191535770893, + 0.030645981431007385, + -0.005766717251390219, + 0.031874217092990875, + 0.010372601449489594, + 0.050537411123514175, + -0.0066729155369102955, + -0.011436074040830135, + -0.0037240260280668736, + 0.014881125651299953, + 0.026676682755351067, + 0.006687893997877836, + 0.02386072836816311, + 0.022228073328733444, + 0.041310664266347885, + -0.0037146646063774824, + 0.036996860057115555, + 0.025103943422436714, + 0.045834168791770935, + -0.012716734781861305, + -0.024789394810795784, + -0.02606256492435932, + 0.011877939105033875, + -0.0651264563202858, + 0.012477078475058079, + 0.022752320393919945, + -0.0016822712495923042, + -0.01852838695049286, + 0.03325223922729492, + 0.04289838299155235, + -0.0011533434735611081, + -0.020535504445433617, + -0.002471450250595808, + 0.0067328293807804585, + 0.01774950511753559, + 0.0020164786837995052, + -0.00980341900140047, + -0.010267752222716808, + -0.007642772514373064, + 0.04367726668715477, + -0.003767089219763875, + -0.029582509770989418, + 0.024444889277219772, + -0.004987835884094238, + 0.04143049195408821, + -0.0056955693289637566, + 0.002171880565583706, + 0.009376532398164272, + 0.001238533528521657, + -0.00650066277012229, + -0.01887289248406887, + -0.01285903062671423, + 0.03235353156924248, + -0.05350315198302269, + -0.028009768575429916, + -0.031035423278808594, + -0.011293778195977211, + -0.053203582763671875, + 0.024190254509449005, + -0.01876804232597351, + -0.018678171560168266, + 0.008717479184269905, + 0.012791627086699009, + -0.042568858712911606, + -0.0075641353614628315, + -0.007197162602096796, + 0.014439260587096214, + 0.018079033121466637, + 0.0341809056699276, + -0.021359320729970932, + 0.0004044191155117005, + 0.06231050193309784, + 0.026856426149606705, + 0.015300523489713669, + 0.007238353136926889, + 0.0016504419036209583, + 0.024040469899773598, + 0.0448455885052681, + 0.015532690100371838, + 0.005837864708155394, + 0.0004947581328451633, + 0.00528740556910634, + -0.017030538991093636, + 0.00362292118370533, + 0.0006089690723456442, + -0.012948901392519474, + 0.03606819361448288, + -0.029732294380664825, + -0.0023104315623641014, + -0.014409303665161133, + 0.0032915223855525255, + 0.020146064460277557, + 0.018258774653077126, + 0.018573323264718056, + -0.014027352444827557, + 0.03600827977061272, + -0.018648214638233185, + 0.02634715661406517, + 0.01203521341085434, + 0.0362778939306736, + -0.021044772118330002, + -0.0162366796284914, + -0.004231422208249569, + -0.03000190667808056, + -0.014162158593535423, + -0.014469217509031296, + 0.008006000891327858, + 0.020760182291269302, + 0.05736760050058365, + 0.008650075644254684, + 0.0170455165207386, + 0.001579294097609818, + -0.033132411539554596, + 0.017315130680799484, + 0.021074729040265083, + 0.003976787906140089, + -0.012027724646031857, + -0.015337970107793808, + -0.007938597351312637, + -0.04667296260595322, + 0.035558924078941345, + 0.001041004783473909, + -0.003048121929168701, + -0.023725921288132668, + -0.008410420268774033, + 0.01531550195068121, + 0.0058640772476792336, + -0.013892545364797115, + -0.007773834280669689, + 0.017030538991093636, + 0.0023834516759961843, + -0.012424654327332973, + 0.013465658761560917, + 0.00479686027392745, + 0.010132946074008942, + 0.010582299903035164, + 0.041730061173439026, + 0.026811489835381508, + 0.002840295433998108, + 0.028923455625772476, + -0.021419234573841095, + -0.0050814514979720116, + 0.016041958704590797, + -2.5071411073440686e-05, + 0.03774578496813774, + 0.02634715661406517, + 0.06123204901814461, + 0.0010999825317412615, + 0.014356878586113453, + 0.038225095719099045, + -0.02098485827445984, + 0.021988417953252792, + 0.025628188624978065, + -0.0319940447807312, + -0.02642204985022545, + -0.012447121553122997, + -0.0011926619336009026, + -0.004744435660541058, + 0.03430073335766792, + 0.004268868360668421, + -0.004340016283094883, + 0.030256541445851326, + -0.06213076040148735, + -0.009706058539450169, + -0.026302222162485123, + 0.020325805991888046, + -0.008867263793945312, + -0.005343575030565262, + 0.03244340047240257, + 0.02216815948486328, + 0.019846493378281593, + 0.029163112863898277, + -0.011997767724096775, + 0.007474264595657587, + -0.018932806327939034, + 0.01992138661444187, + 0.020220955833792686, + 0.01436436828225851, + 0.02224305085837841, + -0.01512078195810318, + -0.010207838378846645, + -0.021808676421642303, + 0.04238911718130112, + 0.01792924851179123, + 0.01059727929532528, + -0.02007117122411728, + 0.005448424257338047, + 0.017674613744020462, + -0.017419978976249695, + 0.024819351732730865, + 0.01855834387242794, + -0.029447702690958977, + 0.031904175877571106, + -0.06416783481836319, + -0.07249587029218674, + 0.002304814523085952, + 0.02171880379319191, + 0.012836562469601631, + -0.01733010821044445, + 0.03798544034361839, + 0.009548785164952278, + -0.023021932691335678, + -0.006223560776561499, + 0.01008801069110632, + -0.027455564588308334, + -0.008874752558767796, + 0.014843679964542389, + 0.003744621528312564, + -0.02652689814567566, + -0.02336643822491169, + 0.004066659137606621, + 0.004411164205521345, + -0.022962018847465515, + -0.0085227582603693, + -0.004366228822618723, + 0.03406107798218727, + -0.005212513264268637, + 0.05940467491745949, + -0.013967438600957394, + 0.00679648807272315, + -0.023411372676491737, + -0.0054297009482979774, + 0.025762995705008507, + 0.02098485827445984, + 0.019831515848636627, + 0.002068903297185898, + 0.01691071130335331, + 0.013795185834169388, + 0.029807187616825104, + 0.03978285938501358, + -0.002639958169311285, + -0.01157836988568306, + -0.01255946047604084, + 0.021988417953252792, + -0.002812210703268647, + -0.015352948568761349, + 0.040681567043066025, + -0.040471870452165604, + -0.013413234613835812, + -0.017839375883340836, + 0.0031922897323966026, + 0.00805093627423048, + -0.015652518719434738, + -0.01800413988530636, + -0.035798583179712296, + 0.007268310524523258, + 0.0038494709879159927, + -0.006010117474943399, + 0.010162902995944023, + 0.005905268248170614, + -0.016656076535582542, + -0.011286289431154728, + -0.03933350369334221, + -0.03588845208287239, + -0.009189301170408726, + 0.0014210838126018643, + -0.007215885445475578, + -0.015098313800990582, + -0.012956390157341957, + 0.058116525411605835, + -0.0005322043434716761, + 0.03996260091662407, + -0.003299011616036296, + 0.02305188961327076, + -0.016760926693677902, + 0.04400679096579552, + -0.017989162355661392, + 0.03478004410862923, + 0.0022280497942119837, + 0.01003558561205864, + 0.014446749351918697, + 0.01300132554024458, + -0.0015165717341005802, + -0.02114962227642536, + 0.017659634351730347, + 0.0043699732050299644, + 0.012784137390553951, + -0.006174881011247635, + -0.008695011027157307, + -0.010664681904017925, + 0.015622560866177082, + 0.037625957280397415, + 0.04080139473080635, + -0.01610187254846096, + -0.023695964366197586, + -0.014229562133550644, + 0.008844795636832714, + -0.002581916516646743, + 0.020340783521533012, + 0.02224305085837841, + -0.005628166254609823, + -0.028953412547707558, + 0.0061187115497887135, + -0.005650633946061134, + 0.013997395522892475, + 0.002767275320366025, + -0.00900206994265318, + 0.0058416095562279224, + 0.0021512850653380156, + 0.053413279354572296, + -0.039063893258571625, + -0.034360647201538086, + -0.02603260800242424, + -0.009159344248473644, + 0.019097570329904556, + -0.020535504445433617, + -0.01177308987826109, + -0.0030593557748943567, + -0.046852704137563705, + 0.025073984637856483, + 0.029447702690958977, + -0.031065380200743675, + 0.028369251638650894, + -0.03382142260670662, + 0.02263249270617962, + -0.019876450300216675, + 0.03307249769568443, + -0.010290219448506832, + 0.0005794801982119679, + -0.001994010992348194, + -0.05083698034286499, + 0.005875311326235533, + -0.0007653069915249944, + 0.026916339993476868, + -0.03510957211256027, + -0.02132936380803585, + -0.021269449964165688, + 0.005718037020415068, + 0.03711668774485588, + 0.0006342452834360301, + -0.025523340329527855, + -0.01075455266982317, + -0.0069013372994959354, + -0.003995511215180159, + -0.00927917193621397, + 0.025598231703042984, + -0.011233864352107048, + -0.007215885445475578, + -0.021239493042230606, + 0.04697253182530403, + 0.016551226377487183, + -0.009930736385285854, + 0.004512269049882889, + -0.03735634312033653, + 0.006006373092532158, + -0.032263658940792084, + -0.011548412963747978, + -0.0077813235111534595, + 0.015622560866177082, + 0.010694638825953007, + -0.0367572046816349, + 0.006908826529979706, + 0.008402930572628975, + 0.019876450300216675, + -0.00011011527385562658, + -0.02922302670776844, + 0.008447865955531597, + 0.010252773761749268, + -0.025553297251462936, + 0.00824565626680851, + 0.013742760755121708, + -0.017734527587890625, + 0.02673659659922123, + 0.00984086561948061, + -0.019172461703419685, + 0.0012956390855833888, + -0.03828500956296921, + -0.016131829470396042, + -0.02129940688610077, + 0.021883567795157433, + 0.03445051610469818, + 0.010417536832392216, + -0.00454222597181797, + -0.020745202898979187, + -0.015907151624560356, + -0.017599720507860184, + 0.016146807000041008, + -0.0066991280764341354, + 0.004164019133895636, + -0.018992720171809196, + 0.010619746521115303, + -0.004036701750010252, + 0.010829444974660873, + 0.010791999287903309, + 0.019412117078900337, + 0.008417909033596516, + 0.001359297544695437, + 0.011301267892122269, + 0.021374300122261047, + 0.008163275197148323, + -0.0176146999001503, + -0.018258774653077126, + -0.05613936483860016, + 0.011952831409871578, + 0.0030368880834430456, + 0.030121736228466034, + 0.00972103700041771, + -0.003049994120374322, + 0.016566205769777298, + -0.04873999208211899, + -0.013091196306049824, + -0.023036912083625793, + 0.019217398017644882, + -0.027350716292858124, + -0.0031117803882807493, + 0.004298825282603502, + -0.004482312127947807, + -0.00031033551204018295, + 0.035169485956430435, + -0.01831868849694729, + 0.0011486626463010907, + -0.03031645528972149, + 0.008178253658115864, + 0.01100169774144888, + 0.0013340214500203729, + 0.008410420268774033, + 0.0006089690723456442, + -0.01276915892958641, + -0.010552342981100082, + 0.025688104331493378, + -0.023381415754556656, + -0.013323362916707993, + 0.023126782849431038, + -0.001614868058823049, + 0.016790883615612984, + 0.021658889949321747, + -0.03382142260670662, + -0.004519758280366659, + -0.006422026082873344, + -0.035768624395132065, + -0.017944226041436195, + -0.030301477760076523, + -0.022183137014508247, + -0.0036191765684634447, + -0.012462100014090538, + -0.013607954606413841, + -0.0049241771921515465, + -0.006350878160446882, + -0.01449168473482132, + -0.02031082659959793, + 0.011368670500814915, + -0.02634715661406517, + 0.02487926557660103, + -0.016146807000041008, + 0.019307268783450127, + 0.013345831073820591, + -0.008784881792962551, + 0.02487926557660103, + 0.025628188624978065, + -0.019531946629285812, + -0.010320177301764488, + -0.010469961911439896, + -0.025148877874016762, + -0.007096057757735252, + 0.04220937192440033, + -0.0030237818136811256, + -0.007140993140637875, + 0.001544656348414719, + -0.02543346956372261, + -0.011952831409871578, + 0.013390766456723213, + 0.038674451410770416, + 0.0683618113398552, + 0.015697453171014786, + 0.0005247151129879057, + 0.012409675866365433, + 0.017884312197566032, + 0.014926061034202576, + 0.0085227582603693, + -0.01944207400083542, + 0.022932061925530434, + -0.027440587058663368, + -0.02929791808128357, + 0.0014660193119198084, + 0.013780207373201847, + 0.020041214302182198, + -0.014371857047080994, + 3.817758624791168e-05, + 0.019636794924736023, + 0.001540911733172834, + 0.00023286865325644612, + -0.015772346407175064, + -0.0010494302259758115, + 0.004055425059050322, + -0.006103733088821173, + 0.023561159148812294, + 0.0059502036310732365, + 0.013810164295136929, + 0.021284429356455803, + 0.023126782849431038, + 0.019412117078900337, + -0.01764465682208538, + 0.030885638669133186, + 0.005448424257338047, + 0.009601209312677383, + -0.007361925672739744, + 0.005029026884585619, + 0.022287987172603607, + -0.011720665730535984, + 0.020745202898979187, + 0.009181811474263668, + 0.009631166234612465, + 0.016820840537548065, + -0.004062914289534092, + 0.0003587815444916487, + -0.011870450340211391, + 0.04853029549121857, + -0.005953948013484478, + -0.027530457824468613, + -0.004721967503428459, + 0.030151693150401115, + -0.006556832231581211, + 0.011406117118895054, + -0.005339830182492733, + 0.008440377190709114, + -0.02480437234044075, + -0.01538290549069643, + -0.0013040644116699696, + -0.021179579198360443, + -0.026511920616030693, + -0.009466403163969517, + 0.016251657158136368, + 0.024924200028181076, + -0.012147552333772182, + 0.007706431206315756, + 0.00750796590000391, + 0.003722153836861253, + 0.00829808134585619, + -0.007463030517101288, + -0.0021250727586448193, + 0.0077588558197021484, + 0.01475380826741457, + -0.04119083657860756, + -0.01954692415893078, + 0.01589217409491539, + 0.026646725833415985, + -0.016641097143292427, + -0.013750250451266766, + 0.038045354187488556, + -0.02739565074443817, + -0.015143249183893204, + -0.00677027553319931, + -0.013585486449301243, + -0.017689591273665428, + 0.02017602138221264, + -0.04769149795174599, + -0.07489243149757385, + 0.03753608465194702, + -0.04490550234913826, + 0.01154092326760292, + -0.013196046464145184, + -0.0027972322423011065, + -0.00011508860188769177, + -0.0008542417781427503, + 0.01313613262027502, + -0.04927922040224075, + -0.00034637749195098877, + -0.0014978485414758325, + -0.0022467728704214096, + 0.002098860451951623, + -0.016536248847842216, + -0.0005242470069788396, + -0.016955645754933357, + -0.0221382025629282, + -0.018498430028557777, + 0.022782277315855026, + 0.012881497852504253, + -0.011196418665349483, + -0.009945714846253395, + -0.01926233246922493, + -0.012387207709252834, + 0.0024920455180108547, + 0.020535504445433617, + -0.007901151664555073, + -0.016865774989128113, + -0.015832260251045227, + -0.00288523081690073, + -0.030571090057492256, + -0.0037577275652438402, + 0.035978324711322784, + 0.03430073335766792, + 0.04262877255678177, + 0.010440004989504814, + -0.012447121553122997, + -0.00026984678697772324, + -0.011061611585319042, + 0.009421467781066895, + 0.00826063472777605, + 0.049099478870630264, + -0.004909198731184006, + 0.01730015128850937, + -0.026182392612099648, + -0.014544109813869, + -0.01222993340343237, + -0.02252764254808426, + -0.0022411560639739037, + 0.002913315547630191, + 0.018258774653077126, + 0.01475380826741457, + 0.01308370754122734, + 0.0018395453225821257, + 0.06249024346470833, + 0.005088940728455782, + 0.03259318694472313, + -0.006302197929471731, + 0.0221382025629282, + 0.00977346207946539, + 0.0008626671624369919, + -0.015180695801973343, + -0.021883567795157433, + -0.015502733178436756, + 0.022692406550049782, + 0.014476706273853779, + -0.0031136528123170137, + -0.02459467388689518, + 0.029882078990340233, + -0.001824566861614585, + -0.0028646355494856834, + 0.012761670164763927, + -0.016326550394296646, + 0.003211013041436672, + -0.024609653279185295, + 0.05089689418673515, + -0.029133155941963196, + 0.009556273929774761, + 0.0176146999001503, + -0.018123967573046684, + -0.006912571378052235, + -0.034360647201538086, + 0.014207093976438046, + -0.015300523489713669, + 0.02216815948486328, + 0.015532690100371838, + 0.03337206691503525, + 0.03540914133191109, + -0.0271859522908926, + 0.023201674222946167, + 0.005497104488313198, + 0.008335527032613754, + -0.015352948568761349, + -0.00627224100753665, + 0.02648196369409561, + 0.02231794409453869, + 0.012529503554105759, + 0.026466984301805496, + 0.010477450676262379, + -0.013338341377675533, + 0.04065161198377609, + 0.014686405658721924, + 0.011076590046286583, + -0.010043075308203697, + -0.0261374581605196, + -0.03301258385181427, + 0.011937852948904037, + 0.03582853823900223, + 0.023441331461071968, + -0.010866891592741013, + 0.015442819334566593, + -0.0012319805100560188, + -0.005894034169614315, + 0.02459467388689518, + -0.04011238366365433, + 0.011458542197942734, + -0.00552706141024828, + 0.010694638825953007, + 0.00028412314713932574, + 0.03756604343652725, + -0.02206330932676792, + 0.0036847074516117573, + 0.0245647169649601, + 0.005931480322033167, + 0.05245465785264969, + 0.002980718621984124, + 0.001060664071701467, + -0.04196971654891968, + 0.0018348644953221083, + 0.020056191831827164, + 0.021778719499707222, + 0.03486991673707962, + 0.02182365395128727, + 0.03442056104540825, + -0.014641470275819302, + 0.0017047389410436153, + 0.026916339993476868, + 0.0030724620446562767, + 0.006624235305935144, + 0.02368098683655262, + 0.01262686401605606, + 0.015832260251045227, + -0.027874961495399475, + -9.496125858277082e-05, + 0.04250894486904144, + -0.014716362580657005, + -0.0491294339299202, + -0.03016667068004608, + -0.027515478432178497, + 0.014791254885494709, + -0.00729826744645834, + 0.015517711639404297, + -0.014521642588078976, + 0.013780207373201847, + 0.019996277987957, + -0.020056191831827164, + -0.03489987179636955, + 0.02911817654967308, + 0.025208791717886925, + -0.008013489656150341, + 0.02210824564099312, + -0.00450103497132659, + -0.012274869717657566, + 0.00033584574703127146, + 0.023381415754556656, + -0.02360609360039234, + 0.005579486023634672, + 0.05509087070822716, + -0.007006186991930008, + -0.004882986657321453, + -0.023830771446228027, + 0.018947783857584, + -0.008597650565207005, + -0.0036996861454099417, + 0.016012001782655716, + 0.012536992318928242, + 0.00015879535931162536, + -0.01753980666399002, + -0.00043858878780156374, + 0.02540351264178753, + 0.024040469899773598, + 0.009780951775610447, + 0.0029470170848071575, + 0.02697625383734703, + 0.04844042286276817, + 0.010514897294342518, + 0.007133503910154104, + 0.003935597371309996, + 0.03223370015621185, + 0.019981300458312035, + -0.01410224474966526, + 0.025987673550844193, + -0.00954129546880722, + -0.009241726249456406, + 0.0065381089225411415, + 0.011937852948904037, + -0.016581183299422264, + -0.036817118525505066, + -0.022437771782279015, + 0.0085227582603693, + 0.0012535119894891977, + 0.0034506686497479677, + -0.017060495913028717, + -0.0076989419758319855, + -0.021778719499707222, + 0.03097550943493843, + 0.01301630400121212, + 0.01536792702972889, + 0.00656806631013751, + 0.00551582733169198, + -0.04430636018514633, + 0.004497290588915348, + -0.001856396091170609, + 0.002566938055679202, + 0.013877566903829575, + -0.011158972047269344, + 0.03115525096654892, + -0.018498430028557777, + 0.04652317613363266, + 0.009076962247490883, + 0.03259318694472313, + -0.0028739969711750746, + -0.018932806327939034, + -0.019457053393125534, + -0.011713176034390926, + 0.0271859522908926, + -0.04220937192440033, + -0.01855834387242794, + -0.02571806125342846, + 0.01957688108086586, + -0.011353692039847374, + ], + "index": 8, + }, + { + "title": "Dennis Gamsy", + "text": "Dennis Gamsy (born 17 February 1940 in Glenwood, Natal) is a former South African cricketer who played in two Tests as a wicketkeeper in 1970 against Australia.He played for Natal from 1958-59 to 1972-73. In 1970 he became one of the first prominent South African cricketers to speak out in favour of mixed-race sport in South Africa. Shortly afterwards he founded the Cricket Club of South Africa, one of the country's first multi-racial teams.", + "vector": [ + 0.029236363247036934, + 0.020947067067027092, + -0.024204127490520477, + 0.004287433810532093, + -0.01691819168627262, + 0.06909290701150894, + -0.0037741768173873425, + -0.009200038388371468, + 0.0289276372641325, + 0.026226283982396126, + -0.05458277836441994, + -0.000350211194017902, + -0.013823212124407291, + 0.016285302117466927, + -0.007143150549381971, + 0.008644331246614456, + -0.023231640458106995, + 0.014780262485146523, + 0.015305097214877605, + -0.03507128730416298, + 0.030857175588607788, + -0.008698358200490475, + 0.03173704445362091, + -0.02588668465614319, + 0.02793971262872219, + 0.03152093663811684, + 0.007532916963100433, + 0.003091120161116123, + -0.0069579146802425385, + -0.04411696270108223, + 0.0028672937769442797, + 0.036584045737981796, + 0.05214384198188782, + -0.046957243233919144, + -0.04600019007921219, + -0.013792338781058788, + -0.043623000383377075, + -0.01852356642484665, + 0.010118498466908932, + -0.00019934542069677263, + -0.00794969778507948, + -0.039177343249320984, + -0.006822847295552492, + -0.008605740033090115, + -0.030857175588607788, + -0.007548353634774685, + -0.04590757191181183, + -0.011561793275177479, + -0.04167802631855011, + -0.04942705109715462, + 0.04204849526286125, + 0.02563970349729061, + 0.00597770931199193, + 0.002533483784645796, + 0.03754109516739845, + -0.02743031457066536, + -0.034947797656059265, + 0.09447018802165985, + 0.038652509450912476, + -0.014811134897172451, + -0.022444387897849083, + -0.03862163797020912, + 0.018785983324050903, + 0.023602111265063286, + 0.030579321086406708, + 0.007162445690482855, + -0.026411518454551697, + 0.01762826181948185, + 0.007393990643322468, + -0.005283075384795666, + -0.05090893432497978, + 0.00749046728014946, + -0.021070556715130806, + 0.030810866504907608, + 0.01371515728533268, + -0.023185331374406815, + 0.06458549946546555, + 0.04195587709546089, + -0.05378009006381035, + 0.014062474481761456, + -0.004005721304565668, + -0.03615182638168335, + -0.009115138091146946, + 0.030733684077858925, + 0.009879235178232193, + -0.052946530282497406, + 0.01010306179523468, + -0.06754927337169647, + 0.005908246152102947, + -0.004738945979624987, + 0.05177336931228638, + 0.02485245279967785, + -9.34620061343594e-07, + -0.04630891606211662, + -0.04603106528520584, + -0.02124035730957985, + -0.0017529854085296392, + -0.02091619372367859, + 0.004893308971077204, + 3.2078572985483333e-05, + -0.02232089824974537, + -0.03269409388303757, + 0.01847725734114647, + -0.040906209498643875, + 0.013360122218728065, + 0.024018891155719757, + -0.06257878243923187, + -0.00013760018919128925, + 0.025670576840639114, + 0.05359485372900963, + -0.01687188260257244, + -0.002363684354349971, + -0.03590484708547592, + 0.027260515838861465, + -0.05044584721326828, + -0.01134568452835083, + -0.058441855013370514, + 0.03497866913676262, + 0.007042814511805773, + 0.04383910819888115, + -0.045413609594106674, + 0.02475983463227749, + -0.04899483546614647, + 0.02029874175786972, + 0.05476801097393036, + 0.018276585265994072, + -0.04584582895040512, + 0.023694729432463646, + -0.04880959913134575, + 0.013514485210180283, + 0.008937620557844639, + 0.011384275741875172, + -0.017226917669177055, + 0.025192050263285637, + -0.0016121291555464268, + -0.0334659107029438, + -0.0018967360956594348, + 0.010990649461746216, + 0.027399443089962006, + 0.04476528614759445, + 0.011916828341782093, + 0.0017008879221975803, + 0.05967675894498825, + -0.007119996007531881, + -0.002477527130395174, + 0.014857443980872631, + -0.0052676391787827015, + -0.00543743884190917, + 0.004812268074601889, + 0.028680656105279922, + -0.05269954726099968, + 0.01767457090318203, + 0.007610098924487829, + -0.03235449641942978, + 0.025531649589538574, + 0.020221561193466187, + -0.023941710591316223, + -0.013321531936526299, + 0.004248843062669039, + 0.014610463753342628, + -0.0012638475745916367, + 0.033496782183647156, + -0.022104790434241295, + 0.004183238837867975, + -0.034145109355449677, + 0.018924910575151443, + -0.06270227581262589, + 0.015127579681575298, + 0.04204849526286125, + 0.018585311248898506, + -0.040103521198034286, + -0.03488605096936226, + 0.002718719420954585, + 0.04618542641401291, + -0.012881597504019737, + -0.008312450721859932, + -0.01795242354273796, + -0.014571872539818287, + 0.06736403703689575, + 0.012225554324686527, + -0.04640153422951698, + -0.03905385360121727, + 0.004908745177090168, + 0.005788614507764578, + -0.06489422917366028, + -0.010959777049720287, + 0.03122764639556408, + -0.043623000383377075, + -0.001797364791855216, + -0.02667393535375595, + 0.012765824794769287, + -0.007251204457134008, + -0.03374376520514488, + 0.010527560487389565, + 0.04439481347799301, + 0.023416874930262566, + 0.012063472531735897, + -0.002782394178211689, + -0.04143104329705238, + -0.03967130556702614, + 0.027739040553569794, + 0.038652509450912476, + 0.035657867789268494, + -0.023972582072019577, + -0.015366842038929462, + 0.019187327474355698, + -0.029653143137693405, + 0.026920916512608528, + -0.060973405838012695, + -0.0632271096110344, + 0.004310588352382183, + 0.015305097214877605, + 0.004179379902780056, + -0.02591755799949169, + -0.016007449477910995, + -0.0026627627667039633, + 0.017551079392433167, + 0.025577958673238754, + 0.028588037937879562, + -0.006105058826506138, + -0.027183333411812782, + -0.0036545454058796167, + -0.008466813713312149, + 0.026982663199305534, + -0.017087990418076515, + 0.0056419698521494865, + -0.009431582875549793, + -0.010959777049720287, + -0.06001635640859604, + -0.026504136621952057, + 0.01969672553241253, + 0.021302102133631706, + -0.005472170189023018, + 0.009771181270480156, + 0.011747028678655624, + 0.003606306854635477, + 0.02513030543923378, + -0.0027920417487621307, + -0.03822029381990433, + 0.02503768727183342, + -0.020885322242975235, + 0.043900854885578156, + 0.030718248337507248, + -0.017504770308732986, + 0.0031856675632297993, + 0.041554536670446396, + -0.00595455477014184, + -0.01448697317391634, + -0.010643333196640015, + -0.022567879408597946, + 0.01378462091088295, + -0.030841737985610962, + -0.040010903030633926, + -0.04603106528520584, + 0.008814130909740925, + -0.00016618147492408752, + 0.005066967569291592, + 0.006352039985358715, + -0.002126350998878479, + -0.015081270597875118, + -0.031582679599523544, + 0.01903296448290348, + 0.0217034462839365, + -0.0033033695071935654, + -0.053563982248306274, + 0.03596659377217293, + -0.0031258519738912582, + 0.015737313777208328, + 0.014633617363870144, + 0.008875875733792782, + -0.06575866043567657, + -0.02587124891579151, + -0.03609008342027664, + 0.003967130556702614, + 0.057268694043159485, + -0.03135113790631294, + -0.05097068101167679, + 0.011446020565927029, + -0.018585311248898506, + 0.02156451903283596, + 0.017504770308732986, + 0.022938350215554237, + -0.009037956595420837, + -0.05418143421411514, + -0.03609008342027664, + -0.005908246152102947, + 0.009971853345632553, + 0.04269682243466377, + 0.01392354816198349, + 0.01861618459224701, + -0.028850454837083817, + 0.011229912750422955, + 0.032323624938726425, + -0.011839646846055984, + -0.015667850151658058, + 0.02587124891579151, + -0.016532283276319504, + -0.024682652205228806, + 0.061529114842414856, + 0.007803052663803101, + 0.06254790723323822, + 0.010087626054883003, + -0.06971035897731781, + -0.002896236954256892, + -0.050754573196172714, + 0.004650187212973833, + 0.0018977008294314146, + 0.013306095264852047, + -0.024204127490520477, + -0.03553437441587448, + -0.029421597719192505, + -0.013954420574009418, + -0.04621629789471626, + 0.0015764327254146338, + -0.0070273783057928085, + 0.011638974770903587, + 0.00895305722951889, + 0.007251204457134008, + -0.04075184836983681, + -0.05316263809800148, + 0.03822029381990433, + -0.014201400801539421, + -0.01263461634516716, + -0.03173704445362091, + 0.04856261610984802, + -0.01935712806880474, + 0.02020612359046936, + 0.02391083724796772, + -0.011199039407074451, + 0.032045770436525345, + -0.037386734038591385, + -0.032941076904535294, + 0.03686189651489258, + -0.020514849573373795, + 0.0074402992613613605, + -0.004480387549847364, + -0.015320532955229282, + 0.009717154316604137, + -0.04016526788473129, + 0.033589400351047516, + 0.01068964134901762, + 0.013414149172604084, + 0.018832292407751083, + 0.013043678365647793, + -0.04853174462914467, + -0.00029111906769685447, + 0.09064199030399323, + -0.03278671205043793, + -0.016671210527420044, + -0.05856534466147423, + 0.0006748560117557645, + 0.010944340378046036, + -0.02798602171242237, + 0.015691004693508148, + 0.020036324858665466, + 0.04411696270108223, + -0.014834289439022541, + -0.07304459810256958, + -0.029498780146241188, + -0.018492694944143295, + 0.013846365734934807, + 0.015582950785756111, + 0.038282036781311035, + 0.029035691171884537, + 0.0016844868659973145, + -0.007370836101472378, + 0.02996186912059784, + -0.009238628670573235, + -0.005445156712085009, + -0.0012165738735347986, + 0.0411531925201416, + -0.021487336605787277, + -0.032848458737134933, + -0.029190054163336754, + -0.019279945641756058, + -0.0334659107029438, + -0.023077277466654778, + 0.018338331952691078, + 0.030455831438302994, + -0.020036324858665466, + 0.030069923028349876, + 0.023802783340215683, + -0.040010903030633926, + -0.026643063873052597, + -0.011361121200025082, + 0.0013921618228778243, + 0.05720694735646248, + 0.0013410290703177452, + 0.012125218287110329, + 0.0035098299849778414, + -0.01875511184334755, + 0.06051031872630119, + 0.0003357396344654262, + -0.005503043066710234, + 0.016146374866366386, + 0.001421104883775115, + 0.030177976936101913, + 0.01507355272769928, + 0.048037782311439514, + -0.013259786181151867, + -0.008899030275642872, + -0.07174795120954514, + -0.032231006771326065, + 0.019588671624660492, + -0.015436305664479733, + -0.04038137570023537, + -0.027785349637269974, + -0.052761293947696686, + 0.0019652347546070814, + 0.004958913195878267, + 0.018631620332598686, + 0.01622355729341507, + -0.005263780243694782, + 0.026550445705652237, + 0.037294115871191025, + -0.004345320165157318, + -0.006398348603397608, + 0.0686606839299202, + 0.015212479047477245, + -0.05026061087846756, + 0.03831291198730469, + 0.008026879280805588, + 0.02817125804722309, + 0.0217034462839365, + -0.016331611201167107, + 0.019094709306955338, + -0.012997369281947613, + 0.016748391091823578, + 0.019048402085900307, + -0.009740308858454227, + -0.018261149525642395, + -0.008628894574940205, + -0.02326251193881035, + 0.040998827666044235, + -0.03362027555704117, + -0.05251431092619896, + -0.028433674946427345, + -0.013383276760578156, + 0.06248616427183151, + 0.011523202061653137, + -0.01576818712055683, + -0.05779352784156799, + -0.01894034631550312, + -0.01569872349500656, + -0.08817217499017715, + -0.04572233557701111, + 0.0012127148220315576, + -0.003116204170510173, + 0.031582679599523544, + 0.012271863408386707, + -0.015389996580779552, + -0.0741560161113739, + 0.014340328052639961, + -0.003154794918373227, + 0.03269409388303757, + -0.03769546002149582, + -0.04609280824661255, + 0.021780626848340034, + -0.04186326265335083, + 0.05507673695683479, + -0.01200172770768404, + 0.02540815994143486, + -0.024312181398272514, + -0.023849092423915863, + 0.0084822503849864, + 0.04871698096394539, + 0.029082000255584717, + 0.01317488681524992, + -0.013089987449347973, + 0.023030968382954597, + -0.011430583894252777, + -0.04711160436272621, + -0.017736315727233887, + 0.02559339441359043, + 0.036738406866788864, + -0.008899030275642872, + 1.4418776117963716e-05, + 0.004052030388265848, + -0.003920821473002434, + 0.00953963678330183, + 0.012387635186314583, + 0.058164000511169434, + -0.0180913507938385, + 0.01843094825744629, + -0.009192319586873055, + -0.07841642946004868, + -0.012920187786221504, + -0.04951966926455498, + -0.00836647767573595, + -0.03868338093161583, + 0.010280579328536987, + 0.05603379011154175, + -0.013977575115859509, + 0.03216926008462906, + -0.02363298460841179, + 0.024837015196681023, + -0.005047671962529421, + 0.05804051086306572, + -0.0024003456346690655, + -0.004596159793436527, + 0.0018851588247343898, + -0.050414975732564926, + 0.025439031422138214, + -0.03726324066519737, + -0.014541000127792358, + 0.02002088911831379, + 0.04084446653723717, + 0.022058481350541115, + -0.024265872314572334, + 0.00895305722951889, + 0.03374376520514488, + 0.05828749015927315, + 0.02287660539150238, + 0.004144648090004921, + 0.0010593164479359984, + -0.017242353409528732, + -0.003909244202077389, + -0.01776718720793724, + 0.03278671205043793, + 0.013120859861373901, + -0.005796332843601704, + 0.008644331246614456, + -0.01202488224953413, + 0.048068657517433167, + 0.011986291036009789, + 0.0007081405492499471, + 0.02432761713862419, + 0.004773677326738834, + -0.04300554841756821, + 0.014726235531270504, + -0.007864797487854958, + 0.010504405945539474, + 0.05893581360578537, + 0.007718152832239866, + -0.03201489895582199, + -0.013892674818634987, + -0.055200230330228806, + 5.264021456241608e-05, + 0.035843100398778915, + -0.0012107852380722761, + 0.01204803679138422, + -0.012673206627368927, + -0.03309543803334236, + 0.021626263856887817, + 0.021348411217331886, + -0.0005036094808019698, + -0.019187327474355698, + -0.0018591100815683603, + -0.01432489138096571, + -0.03633706271648407, + -0.0357196107506752, + 0.001405668561346829, + 0.0214719008654356, + -0.015976576134562492, + 0.011700719594955444, + -0.048778727650642395, + -0.027831658720970154, + 0.020700085908174515, + 0.012526562437415123, + 0.0004558534128591418, + 0.0084822503849864, + 0.010635614395141602, + -0.02232089824974537, + 0.03226187825202942, + 0.03642968088388443, + 0.025161178782582283, + -0.017087990418076515, + 0.010705078020691872, + 0.0016082701040431857, + -0.005827205255627632, + 0.022444387897849083, + -0.03587397560477257, + -0.026457827538251877, + -0.022706804797053337, + 0.025238359346985817, + -0.033682018518447876, + -0.03550350293517113, + -0.016393356025218964, + -0.003527195891365409, + -0.05124853551387787, + -0.002228616736829281, + 0.003909244202077389, + 0.0021514350082725286, + 0.012981932610273361, + -0.009809772484004498, + 0.009570509195327759, + 0.02860347367823124, + -0.02338600344955921, + -0.0036236727610230446, + -0.03794243931770325, + 0.019480617716908455, + -0.04007264971733093, + -0.014641336165368557, + -0.03269409388303757, + 0.014641336165368557, + -0.0005750023992732167, + 0.02381821908056736, + 0.027723604813218117, + 0.05686734989285469, + -0.019048402085900307, + 0.039115600287914276, + 0.03735585883259773, + 0.010380915366113186, + -0.002477527130395174, + 0.023941710591316223, + -0.017365843057632446, + -0.048315636813640594, + 0.05884319543838501, + 0.001247446401976049, + -0.04238809645175934, + -0.023602111265063286, + -0.017057117074728012, + 0.01969672553241253, + -0.016702082008123398, + 0.0023463184479624033, + -0.001215609023347497, + -0.027739040553569794, + -0.003042881842702627, + -0.02315445803105831, + 0.04028875753283501, + -0.009354401379823685, + -0.0357196107506752, + 0.0009695929475128651, + 0.00787251628935337, + 0.017134299501776695, + -0.01974303461611271, + 0.002882729982957244, + -0.003411423647776246, + -0.003998002968728542, + 0.005796332843601704, + -0.030116232112050056, + 0.017196044325828552, + -0.008374195545911789, + 0.017381280660629272, + -0.008289296180009842, + -0.008899030275642872, + 0.008505403995513916, + -0.0053679752163589, + -0.04106057435274124, + -0.002303868532180786, + -0.014896035194396973, + 0.014317173510789871, + -0.0015957280993461609, + -0.005703715141862631, + -0.032508861273527145, + -0.04214111343026161, + 0.032601479440927505, + 0.04504314064979553, + -0.025099432095885277, + 0.044147834181785583, + 0.0016912402352318168, + -0.022475261241197586, + 0.01631617546081543, + -0.0030351635068655014, + 0.008420504629611969, + 0.04809952899813652, + 0.058071382343769073, + -0.029421597719192505, + 0.007517480757087469, + -0.026241719722747803, + 0.010751387104392052, + -0.024111509323120117, + -0.004437937866896391, + -0.007162445690482855, + 0.012433944270014763, + 0.007177882362157106, + -0.0010979071957990527, + 0.008721512742340565, + 0.024975942447781563, + 0.012217835523188114, + 0.00026314076967537403, + 0.025022251531481743, + -0.01082856860011816, + -0.040906209498643875, + 0.016069194301962852, + -0.0014992512296885252, + -0.0840969905257225, + -0.009748026728630066, + -0.028958508744835854, + -0.005865796003490686, + 0.011831928044557571, + -0.04609280824661255, + -0.0239571463316679, + 0.021394720301032066, + -0.024111509323120117, + -0.0030390226747840643, + -0.01799873262643814, + 0.04951966926455498, + 0.0007563789840787649, + 0.0019816358108073473, + -0.014070192351937294, + 0.011762465350329876, + -0.000581755768507719, + 0.0393008328974247, + 0.014857443980872631, + 0.009122856892645359, + 0.004430219531059265, + -0.048223018646240234, + -0.01721148006618023, + 0.004052030388265848, + 0.01578362286090851, + 0.010296016000211239, + 0.043345145881175995, + -0.005773178301751614, + 0.01317488681524992, + 0.01960410736501217, + -0.01495778001844883, + 0.028294747695326805, + 0.012464816682040691, + -0.033126313239336014, + -0.004476528614759445, + -0.0071122776716947556, + -0.005908246152102947, + 0.003044811310246587, + -0.047142475843429565, + 0.02729138918220997, + -0.016238993033766747, + -0.021780626848340034, + -0.026658499613404274, + 0.006707074586302042, + 0.013352404348552227, + 0.016933627426624298, + 0.03362027555704117, + -0.02066921256482601, + -0.007108418736606836, + 0.031026974320411682, + -0.036491427570581436, + -0.025145741179585457, + -0.015914831310510635, + 0.019959142431616783, + -0.027229642495512962, + -0.013800057582557201, + 0.02602561190724373, + -0.004106057342141867, + 0.03269409388303757, + -0.019496053457260132, + 0.021317537873983383, + 0.013637975789606571, + 0.03541088476777077, + -0.025346413254737854, + -0.009508764371275902, + -0.00022491179697681218, + -0.0010255496017634869, + -0.028325621038675308, + -0.018647057935595512, + -0.0077451663091778755, + 0.013437303714454174, + -0.01843094825744629, + -0.008806412108242512, + 0.004931899718940258, + -0.022259153425693512, + 0.003760670078918338, + 0.03534914180636406, + -0.0012406930327415466, + -0.022907476872205734, + -0.05152639001607895, + -0.01907927356660366, + -0.010766822844743729, + -0.04078271985054016, + 0.011337966658174992, + 0.029267234727740288, + 0.028958508744835854, + -0.014641336165368557, + -0.009925544261932373, + 0.02752293273806572, + 0.022861167788505554, + 0.01622355729341507, + -0.022521570324897766, + 0.00749046728014946, + -4.5856682845624164e-05, + 0.008829566650092602, + -0.025053124874830246, + -0.008528558537364006, + 0.025423595681786537, + 0.009531918913125992, + 0.015320532955229282, + 0.022938350215554237, + -0.028804145753383636, + -0.04522837698459625, + -0.050939809530973434, + -0.06538818776607513, + 0.010211116634309292, + -0.058071382343769073, + -0.009616818279027939, + -0.005225189495831728, + -0.006830565165728331, + -0.0017481616232544184, + 0.0056303925812244415, + -0.03056388534605503, + -0.026689372956752777, + -0.03023972362279892, + -0.004079043865203857, + 0.0010120427468791604, + -0.017890678718686104, + -0.00909198448061943, + 0.0026068061124533415, + 0.049766648560762405, + 0.0289276372641325, + -0.038189418613910675, + -0.03365114703774452, + -0.04902570694684982, + -0.020746394991874695, + 0.007386272307485342, + -0.04979752376675606, + 0.0465250238776207, + -0.024404799565672874, + -0.043345145881175995, + -0.03257060423493385, + 0.006301871966570616, + -0.002514188177883625, + 0.009964135475456715, + -0.0072859362699091434, + 0.007011941634118557, + -0.03951694071292877, + -0.01603832095861435, + -0.018724238499999046, + -0.013020523823797703, + -0.04939617961645126, + 0.004542132839560509, + 0.0030216567683964968, + -0.0015687145059928298, + -0.015081270597875118, + -0.012403071857988834, + 0.01204803679138422, + 0.011777901090681553, + 0.05198947712779045, + 0.010095343925058842, + -0.026735682040452957, + 0.03417598083615303, + -0.011098703369498253, + -0.031767915934324265, + -0.017690006643533707, + -0.02443567104637623, + 0.006510261911898851, + -0.03670753538608551, + 0.004839282017201185, + 0.004704214166849852, + 0.018816856667399406, + 0.032045770436525345, + 0.032941076904535294, + 0.016702082008123398, + -0.030548449605703354, + -0.018168531358242035, + -0.046957243233919144, + 0.023972582072019577, + -0.006900028791278601, + 0.010982931591570377, + -0.06094253435730934, + 0.006533416453748941, + 0.007486608345061541, + 0.008613458834588528, + 0.07440299540758133, + 0.0006734088528901339, + 0.017643697559833527, + -0.030579321086406708, + 0.011175884865224361, + 0.047049861401319504, + -0.005838782526552677, + 0.015644695609807968, + -0.005773178301751614, + 0.04819214716553688, + 0.00624784454703331, + 0.01071279589086771, + -0.025068560615181923, + 0.026133665814995766, + -0.012379917316138744, + 0.013645694591104984, + -0.04979752376675606, + 0.031767915934324265, + -0.038899488747119904, + -0.013537639752030373, + -0.021024247631430626, + 0.011175884865224361, + -0.010566150769591331, + -0.030733684077858925, + 0.029930995777249336, + 0.007224190980195999, + -0.017690006643533707, + -0.0314437560737133, + 0.022675933316349983, + 0.032508861273527145, + -0.002902025356888771, + -0.06878417730331421, + -0.011839646846055984, + -0.009246347472071648, + -6.572489655809477e-05, + -0.005449016112834215, + -0.018832292407751083, + -0.0038108378648757935, + -0.0013091916916891932, + 0.011600383557379246, + -0.004048170987516642, + -0.03689277172088623, + -0.009284937754273415, + 0.021672572940587997, + 0.020113505423069, + -0.03023972362279892, + 0.004017298575490713, + -0.020761830732226372, + -0.015621541067957878, + -0.009964135475456715, + -0.006984928157180548, + 0.029699452221393585, + -0.009130574762821198, + 0.015930267050862312, + 0.016254430636763573, + -0.004958913195878267, + 0.019758470356464386, + 0.0016574732726439834, + -0.026643063873052597, + -0.020375924184918404, + 0.028665220364928246, + -0.023602111265063286, + 0.029884688556194305, + 0.010087626054883003, + -0.026890045031905174, + -0.043437764048576355, + -0.013537639752030373, + -0.003083402058109641, + -0.027322260662913322, + 0.034021615982055664, + 0.01721148006618023, + 0.002058817306533456, + -0.008675203658640385, + 0.044333070516586304, + -0.03454645350575447, + -0.014996371231973171, + -0.03399074450135231, + 0.013545358553528786, + 0.028572602197527885, + -0.010465815663337708, + -0.014062474481761456, + 0.0024292885791510344, + -0.017967859283089638, + -0.004326024558395147, + 0.014996371231973171, + -0.014818853698670864, + 0.01511986181139946, + -0.007328385952860117, + 0.0013275223318487406, + -0.019820217043161392, + -0.009400710463523865, + 0.03179879114031792, + 0.0442713238298893, + 0.0180913507938385, + -0.028526293113827705, + -0.036831025034189224, + -0.021070556715130806, + -0.018276585265994072, + 8.345252717845142e-05, + 0.006016300059854984, + -0.016254430636763573, + 0.013483612798154354, + 0.0063250260427594185, + -0.0018735815538093448, + 0.009146011434495449, + -0.011129576712846756, + 0.028726965188980103, + 0.0022517710458487272, + 0.017381280660629272, + 0.00478139566257596, + -0.006479389499872923, + -0.009832927025854588, + 0.0016092348378151655, + -0.022197406738996506, + -0.010280579328536987, + 0.0262108463793993, + -0.009647690691053867, + -0.0343303419649601, + -0.00749046728014946, + 0.010234270244836807, + 0.07452648133039474, + 0.029220927506685257, + -0.0053139482624828815, + -0.02442023530602455, + -0.010002725757658482, + 0.012179245240986347, + 0.012271863408386707, + 0.03791156783699989, + 0.005082403775304556, + -0.01721148006618023, + -0.0015069693326950073, + -0.0009985360084101558, + 0.0035484207328408957, + 0.0070389555767178535, + -0.014602744951844215, + -0.0032203993760049343, + -0.0004954089527018368, + 0.011283939704298973, + -0.037016261368989944, + -0.04701898619532585, + -0.008613458834588528, + 0.00041026805411092937, + -0.040906209498643875, + -0.022444387897849083, + 0.027075279504060745, + -0.001615023473277688, + 0.007089123595505953, + -0.005811769049614668, + -0.031212210655212402, + 0.07668756693601608, + 0.015220197848975658, + 0.007548353634774685, + -0.03141288086771965, + -0.005993145518004894, + -0.0020047901198267937, + 0.02634977363049984, + 0.020406795665621758, + 0.012935624457895756, + 0.015058116056025028, + -0.0339290015399456, + -0.01569872349500656, + 0.009740308858454227, + -0.04553710296750069, + -0.0023887683637440205, + -0.065079465508461, + -0.04618542641401291, + -0.0019343621097505093, + -0.0038667945191264153, + 0.0456605926156044, + -0.009763463400304317, + 0.010396352037787437, + -0.04556797444820404, + 0.023555802181363106, + -0.01926450990140438, + 0.032323624938726425, + 0.04646328091621399, + -0.011739310808479786, + 0.01617724820971489, + 0.003967130556702614, + -0.018153095617890358, + 0.015791339799761772, + 0.01776718720793724, + 0.04683374986052513, + -0.006097340956330299, + -0.006051031872630119, + 0.008698358200490475, + 0.039547815918922424, + -0.020468540489673615, + 0.028047766536474228, + 0.0352565236389637, + 0.0016835221322253346, + -0.04056661203503609, + -0.0028672937769442797, + -0.034299470484256744, + -0.05174249783158302, + 0.010311451740562916, + 0.003253201488405466, + 0.02451285347342491, + -0.02713702619075775, + 0.026550445705652237, + -0.0007853220449760556, + 0.006626034155488014, + -0.028294747695326805, + -0.027646424248814583, + 0.014185965061187744, + -0.010697360150516033, + -0.0339290015399456, + -0.009346683509647846, + -0.013460458256304264, + 0.001144216163083911, + -0.026195410639047623, + 0.014610463753342628, + -0.02715246193110943, + -0.0028672937769442797, + 0.03315718472003937, + 0.024682652205228806, + -0.010550715029239655, + 0.007799193263053894, + -0.019063837826251984, + 0.019990015774965286, + 0.0008851756574586034, + -0.011361121200025082, + -0.001357430126518011, + 0.02611823007464409, + -0.014016165398061275, + -0.0025662858970463276, + -0.0055840834975242615, + -0.009755745530128479, + 0.022768551483750343, + 0.0316135548055172, + -0.004928040783852339, + 0.010789977386593819, + 0.01129937544465065, + -0.053656596690416336, + 0.0041870977729558945, + 0.002552779158577323, + 0.03442296013236046, + -0.01511986181139946, + -0.0001877681934274733, + -0.01739671640098095, + -0.00180508301127702, + 0.03189140930771828, + -0.03153637424111366, + 0.012889315374195576, + -0.010380915366113186, + -0.015243351459503174, + 0.05316263809800148, + 0.017983296886086464, + 0.014973216690123081, + 0.013583948835730553, + -0.040010903030633926, + -0.030039051547646523, + 0.005553211085498333, + 0.01739671640098095, + -0.041986752301454544, + -0.0442713238298893, + 0.027445752173662186, + -0.017319535836577415, + 0.023432312533259392, + -0.020036324858665466, + -0.018971219658851624, + 0.010041316971182823, + -0.015706440433859825, + 0.021456465125083923, + 0.008644331246614456, + 0.023169895634055138, + -0.0030660361517220736, + 0.003264778759330511, + -0.016810137778520584, + 0.010789977386593819, + -0.030918920412659645, + 0.028943073004484177, + 0.01617724820971489, + -0.03491692245006561, + -0.031212210655212402, + -0.017412152141332626, + 0.0012561293551698327, + -0.02232089824974537, + 0.05884319543838501, + -0.013352404348552227, + -0.036676663905382156, + -0.0014114571968093514, + 0.013236632570624352, + 0.020360486581921577, + -0.024960506707429886, + 0.0030390226747840643, + 0.014896035194396973, + 0.02296922355890274, + -0.026504136621952057, + 0.005383411422371864, + 0.019634980708360672, + 0.029745761305093765, + 0.007143150549381971, + 0.0024215704761445522, + 0.004445656202733517, + -0.003986426163464785, + -0.017643697559833527, + 0.006379053462296724, + 0.009392991662025452, + -0.01371515728533268, + -0.014309455640614033, + 0.01626986637711525, + -0.0018108716467395425, + 0.04908745363354683, + 0.020360486581921577, + 0.0010429153917357326, + 0.007042814511805773, + -0.00784936174750328, + 0.0022093213628977537, + -0.001120096887461841, + 0.019372563809156418, + 0.019249072298407555, + 0.005113276187330484, + 0.02574775740504265, + -0.028402801603078842, + -0.003940117079764605, + -0.029606834053993225, + 0.018292022868990898, + 0.0066877794452011585, + -0.0023019390646368265, + -0.02333969436585903, + -0.05995460972189903, + 0.002676269505172968, + -0.01024198904633522, + 0.017612824216485023, + -0.02499137818813324, + -0.024358490481972694, + 0.007035096175968647, + 0.020561158657073975, + 0.008173523470759392, + -0.02952965348958969, + 0.04439481347799301, + -0.016161812469363213, + -0.018014168366789818, + -0.0239571463316679, + 0.021965863183140755, + -0.03880687430500984, + -0.005522338207811117, + 0.023509493097662926, + 0.012210117653012276, + 8.254805288743228e-05, + 0.015150734223425388, + 0.020144378766417503, + 0.008798694238066673, + -0.03423772752285004, + 0.055632445961236954, + 0.03309543803334236, + -0.0065681482665240765, + 0.0041137756779789925, + 0.013653412461280823, + -0.022722242400050163, + 0.004106057342141867, + 0.004376192577183247, + 0.014054756611585617, + -0.021487336605787277, + -0.035565249621868134, + -0.006984928157180548, + 0.004306729417294264, + 0.01603832095861435, + -0.01907927356660366, + -0.01716517098248005, + -0.002739944262430072, + 0.033589400351047516, + -0.005175021477043629, + 0.022336333990097046, + -0.0051595852710306644, + -0.008675203658640385, + -0.010164807550609112, + -0.0017558797262609005, + -0.019341690465807915, + -0.01626986637711525, + -0.011376556940376759, + 0.013398713432252407, + -0.014795699156820774, + -0.016485974192619324, + -0.0011982432333752513, + -0.02414238266646862, + 0.004823845345526934, + 0.004345320165157318, + -0.034855179488658905, + -0.027785349637269974, + 0.020329615101218224, + -0.04143104329705238, + -0.004214111249893904, + -0.055817682296037674, + -0.007065969053655863, + -0.004009580239653587, + -0.02321620285511017, + -0.0009642867371439934, + 0.03010079637169838, + -0.013668849132955074, + -0.0013072621077299118, + 0.00030896731186658144, + -0.037201497703790665, + 0.02335513010621071, + -0.022938350215554237, + -0.00965540949255228, + 0.04887134209275246, + 0.025577958673238754, + -0.007660266477614641, + 0.036923643201589584, + 0.004206393379718065, + -0.000302937492961064, + -0.01608463004231453, + 0.0069463374093174934, + 0.018785983324050903, + -0.01753564365208149, + 0.006016300059854984, + -0.0021340693347156048, + -0.009848362766206264, + 0.004495824221521616, + -0.0018234136514365673, + -0.0118628004565835, + 0.03538001328706741, + 0.010450378991663456, + 0.018322894349694252, + -0.01498093456029892, + 0.006846001371741295, + 0.02574775740504265, + -0.005232907831668854, + -0.02428130805492401, + 0.0015494191320613027, + -0.00397484889253974, + 0.0009174954029731452, + -0.02404976449906826, + 0.038745127618312836, + 0.015135297551751137, + 0.026272593066096306, + -0.02320076711475849, + -0.004931899718940258, + 0.023617547005414963, + 0.004885590635240078, + -0.0032049629371613264, + -0.018631620332598686, + -0.003994144033640623, + 0.003384409938007593, + -0.01880142092704773, + -0.033126313239336014, + 0.01875511184334755, + -0.013668849132955074, + 0.010087626054883003, + -0.012186963111162186, + 0.0019102428341284394, + 0.03609008342027664, + 0.014216837473213673, + -0.0089299026876688, + 0.0035059708170592785, + -0.029328981414437294, + 0.022444387897849083, + -0.04664851725101471, + 0.010033599101006985, + -0.011654410511255264, + -0.017103426158428192, + -0.011422866024076939, + 0.0125419981777668, + -0.02625715546309948, + 0.014494691044092178, + 0.0038552172482013702, + -0.006934760138392448, + -0.0009285902488045394, + -0.005962273105978966, + -0.008644331246614456, + -0.0070158010348677635, + 0.014093346893787384, + 0.000561978027690202, + 0.0501679927110672, + -0.02400345541536808, + 0.0051827398128807545, + -0.006398348603397608, + -0.030841737985610962, + 0.0025547086261212826, + -0.0038552172482013702, + -0.005919823423027992, + -0.02807863987982273, + -0.00509783998131752, + -0.014764826744794846, + 0.010380915366113186, + -0.03939345106482506, + -0.014131938107311726, + 0.000518563378136605, + -0.023478621616959572, + 0.004507401026785374, + -0.02676655352115631, + -0.016254430636763573, + -0.04729684069752693, + 0.0035252664238214493, + -0.0016478255856782198, + 0.020190687850117683, + -0.023988019675016403, + -0.021394720301032066, + -0.03695451468229294, + -0.0001309674116782844, + -0.023277949541807175, + -0.004796831868588924, + -0.0021880962885916233, + -0.023123586550354958, + 0.0070158010348677635, + -0.017597388476133347, + -0.01861618459224701, + 0.008327886462211609, + -0.015112143009901047, + 0.010404069907963276, + 0.024960506707429886, + -0.00949332769960165, + 0.016022885218262672, + -0.019619544968008995, + 0.009933263063430786, + 0.017381280660629272, + 0.0029039550572633743, + -0.0015725736739113927, + 0.0004105092666577548, + 0.03216926008462906, + 0.014872880652546883, + 0.005885091610252857, + 0.005981568247079849, + 0.01907927356660366, + 0.006487107370048761, + -0.017875241115689278, + -0.008806412108242512, + 0.002327023074030876, + -0.03139744699001312, + -0.0003475580597296357, + 0.019187327474355698, + 0.02188868075609207, + -0.0024910338688641787, + 0.02354036644101143, + 0.013352404348552227, + -0.012912469916045666, + -0.009130574762821198, + 0.022382643073797226, + -0.03272496908903122, + -0.0002672410337254405, + -0.001504075014963746, + 0.020236996933817863, + 0.04130755364894867, + -0.020036324858665466, + 0.005248344037681818, + -0.033126313239336014, + 0.009663127362728119, + -0.010774541646242142, + 0.004692636895924807, + 0.007664125878363848, + 0.008505403995513916, + 0.0034172122832387686, + 0.008466813713312149, + -0.005248344037681818, + -0.016377920284867287, + 0.003531054826453328, + 0.00749046728014946, + 0.00600086385384202, + -0.028943073004484177, + 0.0066414703615009785, + 0.01716517098248005, + 0.0012464816682040691, + 0.009223192930221558, + 0.007556071504950523, + 0.015150734223425388, + -0.009084265679121017, + 5.788614726043306e-05, + -0.02043766900897026, + 0.007749025244265795, + -0.016146374866366386, + 0.008837285451591015, + 0.01562925986945629, + 0.006132072303444147, + -0.00836647767573595, + 0.035935718566179276, + 0.0007597556686960161, + 0.00897621177136898, + -0.0009218368795700371, + -0.008659767918288708, + 0.0029753479175269604, + 0.03534914180636406, + 0.003799260826781392, + 0.026920916512608528, + 0.015065833926200867, + 0.043345145881175995, + -0.013035960495471954, + -0.012881597504019737, + 0.004592300858348608, + 0.0006463953177444637, + 0.024543726816773415, + -0.016655772924423218, + -0.007640971336513758, + 0.014023883268237114, + 0.019943706691265106, + 0.012796697206795216, + -0.00665690703317523, + -0.002014437923207879, + 0.00832016859203577, + -0.015274224802851677, + 0.020730959251523018, + -0.004704214166849852, + 0.02198129892349243, + 0.03488605096936226, + -0.003419141750782728, + 0.019449744373559952, + 0.030548449605703354, + -0.00024119227600749582, + 0.0628257617354393, + -0.016192683950066566, + 0.0037085723597556353, + 0.008922184817492962, + -0.03500954061746597, + 0.029792070388793945, + 0.003123922273516655, + -0.016949063166975975, + 0.01572187803685665, + 0.0049511948600411415, + 0.006606739014387131, + -0.014942344278097153, + 0.019094709306955338, + -0.034114234149456024, + -0.018878601491451263, + 0.018060477450489998, + -0.019727598875761032, + -0.02724508009850979, + 0.005514620337635279, + 0.0027959009166806936, + -0.01735040731728077, + -0.026226283982396126, + 0.06995733827352524, + 0.04992101341485977, + 0.037016261368989944, + 0.017134299501776695, + -0.016192683950066566, + -0.01935712806880474, + 0.041801515966653824, + -0.017365843057632446, + -0.005090121645480394, + -0.024173254147171974, + -0.058071382343769073, + 0.011253067292273045, + 0.015019525773823261, + -0.005997004918754101, + 0.002236334839835763, + 0.047852545976638794, + -0.003967130556702614, + 0.010867158882319927, + 0.010604741983115673, + -0.012109781615436077, + 0.002905884524807334, + -0.020761830732226372, + 0.013599385507404804, + 0.0003277802898082882, + 0.012788979336619377, + -0.036645788699388504, + 0.014556435868144035, + 0.011808773502707481, + 0.022490696981549263, + 0.014294018968939781, + -0.012395353056490421, + 0.001979706110432744, + -0.005429720506072044, + -0.007166305091232061, + -0.022614188492298126, + -0.017010807991027832, + -0.014857443980872631, + 0.015312815085053444, + -0.0023540365509688854, + -0.00044210543273948133, + -0.01687188260257244, + 0.022984659299254417, + 0.04075184836983681, + 0.014286301098763943, + -0.00888359360396862, + 0.006973350886255503, + 0.009146011434495449, + -0.02071552164852619, + -0.015474896878004074, + -0.006514120846986771, + 0.016022885218262672, + -0.004457233473658562, + -0.03463907167315483, + -0.008312450721859932, + -0.012734952382743359, + -0.017967859283089638, + -0.0015310886083170772, + -0.009925544261932373, + 0.011901391670107841, + -0.007328385952860117, + 0.0010786118218675256, + -0.02480614371597767, + 0.004592300858348608, + -0.011283939704298973, + ], + "index": 9, + }, + { + "title": "Gourmet Night", + "text": '"Gourmet Night" is the fifth episode in the first series of the BBC TV sitcom Fawlty Towers.', + "vector": [ + -0.019300807267427444, + 0.03594567999243736, + -0.024250507354736328, + 0.036156948655843735, + 0.05160966515541077, + -0.00436871312558651, + -0.02621227689087391, + 0.009740946814417839, + -0.04756540060043335, + 0.04859155789017677, + 0.021549299359321594, + 0.02732897736132145, + -0.04693159833550453, + 0.014253020286560059, + -0.021519118919968605, + -0.014177567325532436, + -0.017957748845219612, + 0.0019174424232915044, + -0.01405684370547533, + -0.008548794314265251, + 0.013075958006083965, + 0.001959884539246559, + 0.03748491406440735, + 0.023420527577400208, + 0.007771630771458149, + 0.028415497392416, + 0.0061456249095499516, + 0.011008553206920624, + 0.02055332250893116, + 0.002425805199891329, + -0.04481891915202141, + -0.006643612869083881, + 0.020402418449521065, + -0.04835010692477226, + -0.08800806105136871, + -0.030226362869143486, + 0.03120724856853485, + 0.0735815018415451, + 0.03805835545063019, + 0.00016528862761333585, + -0.034496989101171494, + -0.017520124092698097, + 0.014253020286560059, + 0.02001006342470646, + -0.047987934201955795, + -0.05260564386844635, + -0.02281690575182438, + -0.016388332471251488, + -0.031327974051237106, + -0.026242459192872047, + 0.022394370287656784, + 0.039265599101781845, + 0.024310868233442307, + 0.047655943781137466, + 0.05372234061360359, + 0.02029678411781788, + 0.023541251197457314, + 0.01337776891887188, + -0.0020768363028764725, + -0.033651918172836304, + 0.0026050054002553225, + -0.02334507368505001, + -0.005225101485848427, + 0.0006224850076250732, + 0.007552817929536104, + 0.03016600012779236, + 0.008699699304997921, + 0.0591549389064312, + -0.005964538082480431, + 0.0037650910671800375, + 0.002208878519013524, + 0.018908454105257988, + -0.027721332386136055, + 0.022424550727009773, + -0.0007267040782608092, + -0.04506037011742592, + -0.0034613939933478832, + -0.014305837452411652, + -0.03733401000499725, + -0.020930586382746696, + -0.05483904108405113, + 0.010163482278585434, + 0.013777668587863445, + 0.0019712024368345737, + 0.0316297821700573, + 0.02867203578352928, + -0.022288735955953598, + -0.05127767473459244, + -0.007997988723218441, + 0.07913482189178467, + 0.025095578283071518, + 0.02476358599960804, + 0.015920525416731834, + 0.003817908000200987, + 0.015845073387026787, + -0.003561368677765131, + 0.008458251133561134, + -0.020674047991633415, + -0.006134307011961937, + 0.03793762996792793, + -0.021322941407561302, + -0.06138833984732628, + -0.030015096068382263, + -0.019270626828074455, + 0.006032445468008518, + 0.02059859409928322, + -0.011212275363504887, + -0.03099597990512848, + -0.006454980932176113, + -0.05435614660382271, + 0.03654929995536804, + 0.010495474562048912, + 8.506116137141362e-05, + 0.04472837597131729, + 0.016991954296827316, + -0.026966804638504982, + -0.03860161453485489, + -0.007677315268665552, + 0.0060928077436983585, + -0.0009478749125264585, + -0.04810865968465805, + -0.038088537752628326, + -0.025789743289351463, + 0.013513583689928055, + 0.011325454339385033, + 0.012608150951564312, + 0.012691148556768894, + 0.004330986645072699, + -0.07400403916835785, + -0.05622737482190132, + 0.0037858407013118267, + 0.030875256285071373, + 0.01000503171235323, + -0.0003657099441625178, + -0.0019655434880405664, + 0.02059859409928322, + -0.060030192136764526, + 0.03920523822307587, + -0.0027483655139803886, + -0.014139841310679913, + 0.028777670115232468, + 0.012789237312972546, + 0.005896630696952343, + -0.021609662100672722, + 0.023133806884288788, + 0.02897384762763977, + -0.020719319581985474, + 0.01014839205890894, + 0.007171781733632088, + -0.0011233024997636676, + 0.019768614321947098, + 0.0005258112214505672, + -0.005466550122946501, + 0.02084004320204258, + -0.03540242090821266, + 0.012547789141535759, + -0.0017505033174529672, + -0.003783954307436943, + -0.07545273005962372, + 0.0038707249332219362, + -0.06422536075115204, + -0.008616701699793339, + -0.03156942129135132, + 0.01601106859743595, + 0.005240192171186209, + 0.031026162207126617, + 0.008209256455302238, + -0.002697434974834323, + -0.030467811971902847, + -0.0017948318272829056, + 0.027374248951673508, + -0.03322938084602356, + 0.004259306471794844, + -0.011989438906311989, + 0.00789235532283783, + 0.0535714365541935, + 0.024582499638199806, + 0.08082496374845505, + 0.010918010026216507, + -0.0018712276360020041, + -0.020206240937113762, + 0.02930583991110325, + -0.027178073301911354, + -0.04189135506749153, + -0.06199195981025696, + -0.021458756178617477, + -0.028475860133767128, + 0.03510060906410217, + -0.02563883736729622, + 0.007054829970002174, + -0.011189639568328857, + 0.04143863916397095, + -0.005726862233132124, + -0.06899397820234299, + 0.01631288044154644, + 0.03820926323533058, + -0.0325653962790966, + -0.00703973975032568, + -0.016131794080138206, + 0.06126761436462402, + -0.010042757727205753, + -0.0013015595031902194, + -0.01197434775531292, + -0.03974849730730057, + -0.00789235532283783, + 0.028838032856583595, + -0.031388334929943085, + 0.046267613768577576, + 0.005745725240558386, + 0.016146883368492126, + 0.03836016729474068, + -0.013445676304399967, + -0.01658450998365879, + 0.05130785331130028, + 0.002569165313616395, + -0.005149648524820805, + -0.00884305965155363, + 0.06476861983537674, + 0.015950705856084824, + -0.004798793699592352, + -0.02950201742351055, + -0.029954733327031136, + -0.009891852736473083, + 0.007156691048294306, + 0.019602619111537933, + -0.03603622317314148, + -0.00337650952860713, + -0.05483904108405113, + -0.04059356823563576, + 0.05405433475971222, + -0.02082495205104351, + -0.012608150951564312, + -0.08197184652090073, + -0.021519118919968605, + -0.028626764193177223, + 0.053299807012081146, + 0.013739941641688347, + -0.05064387246966362, + 0.01572434790432453, + 0.0006951082614250481, + -0.023797789588570595, + 0.05800805613398552, + -0.01776157133281231, + -0.006300302688032389, + 0.018802819773554802, + 0.007066147867590189, + 0.03141851723194122, + -0.012909961864352226, + -0.038722340017557144, + -0.038118720054626465, + -0.010812375694513321, + -0.00753772770985961, + 0.017278674989938736, + 0.013468312099575996, + 0.024114692583680153, + -0.0018731140298768878, + 0.0024842810817062855, + 0.04638833552598953, + -0.00900905579328537, + 0.029396383091807365, + -0.06525152176618576, + 0.010389840230345726, + 0.029773646965622902, + 0.01462273858487606, + -0.0388430655002594, + -0.0032029682770371437, + -0.012140343897044659, + -0.04678069055080414, + -0.008050805889070034, + 0.010767104104161263, + 0.05272636562585831, + -0.006673793774098158, + 0.0054061878472566605, + 0.04086519777774811, + -0.01747485250234604, + -0.04735413193702698, + 0.032203223556280136, + -0.016493966802954674, + 0.034225355833768845, + -0.0049798800610005856, + 0.065432608127594, + -0.0033802823163568974, + -0.027751512825489044, + -0.03377263993024826, + -0.010155937634408474, + 0.02900402806699276, + -0.02588028647005558, + 0.022364187985658646, + 0.007439638953655958, + 0.04415493831038475, + -0.03410463407635689, + -0.00860161054879427, + 0.05514085292816162, + 0.024688132107257843, + 0.01024648081511259, + 0.058672040700912476, + 0.016207246109843254, + 0.05139840021729469, + 0.05903421342372894, + 0.01012575626373291, + 0.024537228047847748, + 0.005617455579340458, + -0.021292759105563164, + 0.003246353706344962, + -0.003949950449168682, + 0.00754150003194809, + -0.05160966515541077, + -0.011325454339385033, + -0.010072939097881317, + -0.009046781808137894, + 0.022847086191177368, + -0.021277669817209244, + -0.05173039063811302, + 0.04189135506749153, + -0.03063380718231201, + 0.03959759324789047, + -0.024537228047847748, + -0.026619723066687584, + 0.028536221012473106, + -0.03040744923055172, + 0.03175050765275955, + 0.0049987430684268475, + -0.032233405858278275, + -0.022017106413841248, + 0.06603622436523438, + -0.020326964557170868, + 0.031720325350761414, + 0.020915497094392776, + -0.0010186118306592107, + -0.02563883736729622, + 0.014456742443144321, + -0.02025151252746582, + -0.0018683981616050005, + 0.05855131521821022, + 0.022590545937418938, + -0.00780935725197196, + -0.015301813371479511, + 0.02052314206957817, + 0.010789739899337292, + -0.049979887902736664, + 0.022575456649065018, + 0.070865198969841, + 0.05761570483446121, + 0.050855137407779694, + -0.0016712779179215431, + 0.07056339085102081, + 0.04554326832294464, + 0.016720324754714966, + -0.004036720842123032, + -0.0388430655002594, + 0.0007625441066920757, + 0.01069165114313364, + -0.026649903506040573, + 0.04134809598326683, + -0.03253521770238876, + 0.015196179039776325, + -0.008993965573608875, + -0.017671028152108192, + 0.022605637088418007, + 0.06344065070152283, + -0.0055155945010483265, + -0.030603626742959023, + 0.022847086191177368, + 0.03066398948431015, + -0.01801811158657074, + 0.008065897040069103, + 0.035885319113731384, + 0.02139839343726635, + 0.012140343897044659, + -0.020402418449521065, + -0.06603622436523438, + -0.026514088734984398, + -0.02108149230480194, + -0.032173044979572296, + -0.002422032644972205, + 0.011981893330812454, + 0.018636824563145638, + -0.02420523576438427, + 0.004730885848402977, + -0.020689137279987335, + -0.012494971975684166, + -0.032173044979572296, + -0.016146883368492126, + -0.03654929995536804, + 0.002631413983181119, + 0.03398390859365463, + -0.004202716983854771, + -0.027147890999913216, + 0.014524649828672409, + 0.008677063509821892, + -0.03513079136610031, + -0.010382295586168766, + 0.007473592646420002, + 0.015543261542916298, + -0.004674296360462904, + -0.0338028222322464, + -0.01747485250234604, + 0.020749500021338463, + 0.03576459363102913, + -0.06989941000938416, + -0.004330986645072699, + 0.039839040488004684, + 0.0489235483109951, + -0.0019268740434199572, + -0.022454731166362762, + 0.004678069148212671, + 0.0247334036976099, + 0.028249502182006836, + 0.034798797219991684, + 0.01715794950723648, + -0.002959633246064186, + 0.012774147093296051, + -0.03923541679978371, + 0.013702215626835823, + 0.02281690575182438, + 0.027510065585374832, + 0.006413481663912535, + 0.016539238393306732, + 0.0001283875317312777, + -0.006873743608593941, + 0.04587525874376297, + 0.04895373061299324, + -0.0022843312472105026, + 0.028249502182006836, + -0.003410463221371174, + 0.0049421535804867744, + 0.021277669817209244, + 0.006862425711005926, + -0.036971837282180786, + -0.03232394903898239, + 0.008646883070468903, + -0.026559360325336456, + -0.02698189578950405, + 0.02471831440925598, + 0.005447687115520239, + 0.0011534836376085877, + -0.013340041972696781, + 0.0676056444644928, + 0.020432598888874054, + 0.012268614023923874, + 0.005994719453155994, + -0.02195674367249012, + 0.005028924439102411, + 0.01025402545928955, + -0.03796781226992607, + -0.0009554201969876885, + 0.026091553270816803, + 0.003336896887049079, + 0.032837025821208954, + -0.004021630622446537, + 0.019587527960538864, + -0.030829984694719315, + -0.03748491406440735, + 0.020311875268816948, + 0.0913279801607132, + -0.013340041972696781, + 0.010578472167253494, + 0.020960768684744835, + 0.036156948655843735, + -0.013838030397891998, + -0.004059356637299061, + 0.02277163416147232, + 0.041800811886787415, + -0.028611674904823303, + 0.016659962013363838, + -0.004263079259544611, + -0.0163581520318985, + 0.021443665027618408, + 0.003152037737891078, + -0.006877516396343708, + -0.00437248544767499, + 0.00214474368840456, + -0.05064387246966362, + -0.013219318352639675, + 0.0026446180418133736, + 0.009167506359517574, + -0.018787728622555733, + 0.02591046690940857, + 0.013777668587863445, + -0.04506037011742592, + -0.012849600054323673, + 0.009552315808832645, + 0.0507042333483696, + 0.02109658345580101, + 0.040895380079746246, + 0.04204225912690163, + 0.010465293191373348, + -0.041800811886787415, + -0.024009058251976967, + 0.01742958091199398, + -0.015384810976684093, + -0.04146881774067879, + 0.007930081337690353, + 0.026936624199151993, + -0.003112425096333027, + -0.0030030186753720045, + 0.032233405858278275, + 0.02817404828965664, + -0.0314788781106472, + -0.006021127570420504, + 0.010306842625141144, + -0.04071429371833801, + -0.00675301905721426, + 0.053903430700302124, + 0.013543765060603619, + -0.013445676304399967, + 0.019587527960538864, + 0.05550302565097809, + 0.01916499249637127, + 0.036730386316776276, + 0.007002013269811869, + 0.05432596430182457, + 0.002425805199891329, + 0.04104628413915634, + -0.006730383262038231, + -0.02477867528796196, + 0.0010572813916951418, + -0.03826962411403656, + 0.04916499927639961, + -0.012668512761592865, + 0.025186121463775635, + -0.04340041056275368, + -0.0224849134683609, + -0.018244469538331032, + -0.005168511997908354, + 0.07104628533124924, + -0.01579980179667473, + 0.02477867528796196, + 0.0006908640498295426, + 0.007914991118013859, + 0.012147889472544193, + -0.017052317038178444, + 0.00045719638001173735, + -0.006730383262038231, + -0.009763582609593868, + 0.02025151252746582, + -0.00640216376632452, + 0.04665996879339218, + 0.011423543095588684, + -0.010940645821392536, + 0.01394366379827261, + -0.05483904108405113, + -0.02052314206957817, + -0.015241450630128384, + 0.010752013884484768, + 0.002024019369855523, + -0.003127515548840165, + -0.010223845019936562, + 0.004338531754910946, + -0.021730385720729828, + -0.02023642137646675, + 0.017293766140937805, + 0.022077469155192375, + 0.022017106413841248, + -0.031961776316165924, + -0.06440644711256027, + -0.05987928435206413, + 0.003008677624166012, + -0.009167506359517574, + 0.00913732498884201, + 0.0338028222322464, + 0.007960262708365917, + -0.022183101624250412, + 0.007300051394850016, + -0.026634812355041504, + 0.026363182812929153, + -0.0012534584384411573, + -0.017852116376161575, + 0.003972586244344711, + -0.009627767838537693, + 0.0665191262960434, + 0.031056342646479607, + 0.01029929704964161, + 0.01027666125446558, + 5.597059862338938e-05, + 0.05151912197470665, + -0.0120950723066926, + -0.033621735870838165, + -0.014260565862059593, + -0.03516096994280815, + -0.002088154200464487, + 0.0037254784256219864, + 0.0033312379382550716, + -0.010193663649260998, + -0.0035160970874130726, + 0.012411973439157009, + -0.01631288044154644, + 0.030045276507735252, + -0.04451711103320122, + 0.011906440369784832, + 0.0377565436065197, + 0.008850605227053165, + -0.00668888445943594, + -0.00857143010944128, + -0.02986419014632702, + 0.03099597990512848, + 0.01265342254191637, + 0.052454736083745956, + 0.03190141171216965, + -0.00971831101924181, + 0.010495474562048912, + 0.009212777949869633, + 0.00019440866890363395, + 0.015279177576303482, + 0.006073944736272097, + 0.052484918385744095, + -0.029154933989048004, + 0.01282696332782507, + -0.020613685250282288, + -0.014856642112135887, + -0.0697786808013916, + -0.009974850341677666, + -0.026800809428095818, + 0.010510564781725407, + 0.028415497392416, + -0.01632796972990036, + 0.016418512910604477, + 0.006371982861310244, + 0.01800302043557167, + -0.005858904216438532, + 0.0014185112668201327, + -0.0066851116716861725, + 0.029713284224271774, + 0.01913481205701828, + 0.01572434790432453, + 0.016825959086418152, + 0.0020900405943393707, + 0.010525655932724476, + -0.02924547716975212, + -0.0157394390553236, + 0.006681338883936405, + 0.013958754949271679, + 0.014826460741460323, + 0.001825012848712504, + 0.015264087356626987, + 0.013838030397891998, + 0.0057985419407486916, + -0.004798793699592352, + 0.020040243864059448, + 0.028475860133767128, + 0.009408955462276936, + -0.019255535677075386, + -0.022288735955953598, + 0.0205835048109293, + -0.035583507269620895, + -0.01223843265324831, + 0.05182093381881714, + 0.005376006942242384, + -0.012434609234333038, + 0.016735415905714035, + -0.00857897475361824, + 0.03639839589595795, + 0.033682096749544144, + 0.020160969346761703, + 0.0019862931221723557, + -0.022092558443546295, + 0.046871233731508255, + -0.0505533292889595, + -0.01916499249637127, + 0.014532195404171944, + -0.05257546156644821, + -0.0002349645073991269, + 0.0060928077436983585, + 0.015331994742155075, + 0.02001006342470646, + 0.011076460592448711, + -0.005783451721072197, + -0.019285717979073524, + -0.012872235849499702, + -0.0078697195276618, + -0.03712274134159088, + -0.036156948655843735, + -0.020870225504040718, + 0.010231389664113522, + 0.01549798995256424, + 0.015218814834952354, + -0.014803824946284294, + 0.0411670096218586, + -0.0014826460974290967, + -0.0005739122861996293, + -0.03150906041264534, + 0.005417505744844675, + -0.02052314206957817, + 0.008005534298717976, + -0.0157394390553236, + 0.021292759105563164, + -0.03015091083943844, + 0.02170020528137684, + 0.021881291642785072, + 0.018169017508625984, + -0.0031671281903982162, + 0.011996983550488949, + 0.0003614657325670123, + 0.04391348734498024, + -0.018244469538331032, + -0.016463784500956535, + -0.004961017053574324, + 0.0018061497248709202, + 0.014675555750727654, + 0.006651157978922129, + -0.03516096994280815, + -0.00457998039200902, + -0.022620728239417076, + -0.041559360921382904, + -0.013038231059908867, + 0.034798797219991684, + -0.018108654767274857, + 0.015369720757007599, + -0.02447686530649662, + -0.009914488531649113, + -0.026861170306801796, + -0.005213783588260412, + 0.008661973290145397, + -0.0014213407412171364, + -0.04201208055019379, + 0.028309863060712814, + -0.045150913298130035, + -0.01503772847354412, + 0.010495474562048912, + -0.008669518865644932, + 0.02415996417403221, + 0.007854629307985306, + -0.04958753287792206, + -0.041529182344675064, + -0.010442657396197319, + -0.02280181460082531, + -0.027676060795783997, + 0.016841048374772072, + -0.003289738902822137, + -0.002522007329389453, + -0.034225355833768845, + -0.04137827455997467, + -0.004478119313716888, + 0.007579226512461901, + 0.0270573478192091, + 0.006119216326624155, + -0.038088537752628326, + 0.004764840006828308, + 0.0012553447159007192, + -0.01693159155547619, + 0.04439638555049896, + 0.01997988298535347, + 0.02956237830221653, + -0.0010450202971696854, + -0.013702215626835823, + -0.00390467862598598, + 0.01605634018778801, + -0.0009375001536682248, + -0.004361167550086975, + -0.017550304532051086, + 0.006364437751471996, + 0.030452720820903778, + -0.01886318251490593, + -0.012019619345664978, + -0.029683103784918785, + -0.017806842923164368, + 0.006134307011961937, + -0.007960262708365917, + -0.02417505346238613, + 0.024144873023033142, + 0.005130785517394543, + -0.03359155356884003, + -0.0017646506894379854, + -0.0427967868745327, + 0.03322938084602356, + -0.001184607855975628, + 0.015875253826379776, + -0.01095573604106903, + -0.009748492389917374, + 0.01712776906788349, + 0.017655938863754272, + -0.009529680013656616, + -0.04270624369382858, + -0.03187123313546181, + 0.02613682486116886, + 0.01994970068335533, + 0.0049232905730605125, + 0.022982900962233543, + -0.010985917411744595, + -0.01546780951321125, + -0.004527163691818714, + -0.006477616727352142, + 0.020191149786114693, + 0.012110162526369095, + -0.03657948225736618, + -0.05311872065067291, + 0.006070171948522329, + 0.004734658636152744, + -0.007032194174826145, + 0.026333002373576164, + -0.027796784415841103, + -0.02983400784432888, + -0.014200203120708466, + -0.02026660367846489, + -0.0077791763469576836, + -0.03437626361846924, + 0.02563883736729622, + 0.027404431253671646, + -0.03778672590851784, + -0.01774648204445839, + 0.010480384342372417, + 0.007715041283518076, + 0.008910967037081718, + 0.03042254038155079, + -0.0182595606893301, + -0.01095573604106903, + -0.025955738499760628, + -0.02503521554172039, + -0.03778672590851784, + -0.018968814983963966, + 0.01109909638762474, + 0.011151913553476334, + 0.022409459576010704, + -0.020613685250282288, + 0.010525655932724476, + 0.05553320795297623, + -0.013392859138548374, + -0.009771128185093403, + 0.008352616801857948, + -0.005711771547794342, + -0.05803823843598366, + 0.01634306088089943, + -0.008043261244893074, + 0.020900405943393707, + -0.015588534064590931, + 0.09519115835428238, + -0.008692154660820961, + 0.01911972090601921, + -0.00428948737680912, + 0.026272639632225037, + -0.030845075845718384, + -0.015000002458691597, + -0.024537228047847748, + -0.00874497089534998, + -0.04415493831038475, + -0.02192656323313713, + 0.006039991043508053, + 0.050251517444849014, + -0.01685613952577114, + -0.012487426400184631, + -0.004032948520034552, + 0.0031633556354790926, + -0.022877266630530357, + 0.021202215924859047, + -0.020221330225467682, + 0.012351611629128456, + 0.004357395227998495, + -0.00014430333976633847, + 0.010880283080041409, + 0.05061369016766548, + -0.020206240937113762, + 0.04415493831038475, + 0.03510060906410217, + -0.005360916256904602, + -0.0022220828104764223, + 0.027132801711559296, + -0.04644870012998581, + 0.014034206978976727, + -0.0011751762358471751, + 0.032505035400390625, + 0.0056815906427800655, + 0.026936624199151993, + 0.006511570420116186, + 0.02394869551062584, + 0.013822940178215504, + -0.04976861923933029, + -0.005568411201238632, + -0.007405685260891914, + 0.01195171196013689, + -0.054175060242414474, + -0.02898893877863884, + -0.027781695127487183, + 0.03657948225736618, + -0.01503018382936716, + -0.03431589901447296, + 0.009356138296425343, + 0.022711271420121193, + -0.04445674642920494, + -0.0002225855423603207, + 0.02396378666162491, + -0.039778679609298706, + 0.05432596430182457, + -0.010646379552781582, + -0.01862173341214657, + -0.011778171174228191, + -0.006224850192666054, + 0.008684609085321426, + -0.010201209224760532, + 0.0010101234074681997, + -0.005032696761190891, + 0.031026162207126617, + 0.01042002160102129, + -0.07376258820295334, + 0.06476861983537674, + 0.0009723970433697104, + 0.040684111416339874, + 0.0006248428835533559, + -0.007194417528808117, + 0.025548294186592102, + -0.023797789588570595, + -0.005723089445382357, + 0.030543264001607895, + 0.06875252723693848, + 0.01476609893143177, + 0.018138835206627846, + -0.002005156362429261, + 0.030905436724424362, + -1.7315811362550448e-07, + -0.03144869580864906, + -0.01549798995256424, + -0.023163987323641777, + 0.014343563467264175, + 0.031690146774053574, + 0.002273013349622488, + 0.04385312646627426, + 0.0013864438515156507, + 0.021534208208322525, + 0.012396883219480515, + 0.024054329842329025, + 0.01911972090601921, + 0.006466298829764128, + 0.03229376673698425, + 0.007307596504688263, + -0.003770750015974045, + -0.001344001735560596, + -0.06718310713768005, + 0.04421529918909073, + -0.04146881774067879, + 0.00639839144423604, + -0.013483402319252491, + -0.013415494933724403, + -0.01637324132025242, + -0.011785715818405151, + 0.0010148391593247652, + -0.023163987323641777, + 0.025789743289351463, + -0.03582495450973511, + -0.02986419014632702, + -0.02447686530649662, + 0.011929076164960861, + 0.03959759324789047, + -0.009642858989536762, + 0.01112173218280077, + -0.00010634119098540395, + 0.00971076637506485, + 0.018093563616275787, + 0.028340045362710953, + 0.004568662494421005, + -0.004715795628726482, + -0.04756540060043335, + 0.045422542840242386, + -0.01721831224858761, + -0.029668012633919716, + 0.02423541620373726, + -0.014509559608995914, + -0.028008053079247475, + 0.00944668147712946, + -0.03627767041325569, + -0.010910464450716972, + -0.004059356637299061, + -0.01423038449138403, + -0.01294014323502779, + 0.0035802319180220366, + 0.010963281616568565, + -0.01352112926542759, + -0.02417505346238613, + 0.008088532835245132, + 0.02818913944065571, + -0.005145876202732325, + -0.0052779181860387325, + 0.0026936624199151993, + -0.02844567783176899, + -0.010472838766872883, + -0.017097588628530502, + -0.010118210688233376, + 0.009989941492676735, + 0.02055332250893116, + 0.007156691048294306, + -0.027359159663319588, + 0.021624751389026642, + 0.008511067368090153, + 0.004564890172332525, + -0.019361170008778572, + -0.016146883368492126, + 0.0205835048109293, + 0.0365191213786602, + -0.03491952270269394, + 0.003152037737891078, + 0.009046781808137894, + -0.00372736481949687, + 0.004904427099972963, + -0.011672536842525005, + -0.008956238627433777, + 0.012502516619861126, + -0.007967808283865452, + 0.04337022826075554, + 0.002752138301730156, + 0.006345574278384447, + -0.047112684696912766, + -0.011846078559756279, + -0.040623750537633896, + -0.018169017508625984, + -0.022635817527770996, + -0.01656941883265972, + -0.001535463030450046, + 0.033621735870838165, + -0.03817908093333244, + -0.0052779181860387325, + 0.022997992113232613, + 0.027962781488895416, + -0.02618209645152092, + 0.04077465459704399, + -0.04777666926383972, + 0.022152921184897423, + 0.023511070758104324, + 0.007160463836044073, + 0.005606137681752443, + -0.006055081263184547, + 0.0009247675188817084, + 0.0541146956384182, + -0.022741451859474182, + -0.002488053636625409, + -0.01774648204445839, + -0.06507043540477753, + -0.016418512910604477, + 0.03654929995536804, + -0.02873239852488041, + 0.006447435822337866, + 0.032837025821208954, + -0.002263581845909357, + 0.0258953757584095, + 0.004561117384582758, + -0.005085513927042484, + 0.00818662066012621, + -0.02135312184691429, + -0.013853120617568493, + -0.02197183482348919, + 0.04672032967209816, + -0.010767104104161263, + 0.01661469042301178, + 0.004059356637299061, + -0.0039989943616092205, + 0.005542003083974123, + 0.007937626913189888, + -0.006447435822337866, + -0.009401409886777401, + -0.00983149092644453, + 0.016780687496066093, + -0.007292506285011768, + -0.010880283080041409, + -0.019798796623945236, + -0.0010808603838086128, + 0.008518612943589687, + 0.005674045067280531, + -0.005111922509968281, + 0.0267102662473917, + -0.006243713200092316, + -0.04898391291499138, + 0.006300302688032389, + -0.005907948594540358, + -0.007156691048294306, + 0.014290746301412582, + 0.04026157408952713, + -0.004097083117812872, + 0.016509056091308594, + -0.015196179039776325, + -0.03178068995475769, + -0.013196682557463646, + 0.007884809747338295, + -0.06645876169204712, + -0.030015096068382263, + -0.004304578062146902, + -0.0015533830737695098, + -0.0004847837844863534, + 0.011182093992829323, + 0.04638833552598953, + -0.005621228367090225, + 0.016509056091308594, + 0.03259557858109474, + 0.0009143927600234747, + 0.004606388974934816, + -0.02001006342470646, + -0.0043498496524989605, + -0.006319166161119938, + -0.017384309321641922, + -0.022952720522880554, + 0.015588534064590931, + -0.00319919572211802, + -0.029758555814623833, + -0.041499000042676926, + -0.013423040509223938, + 0.016524147242307663, + 0.08263582736253738, + 0.0033897138200700283, + 0.013898392207920551, + 0.010020121932029724, + -0.010880283080041409, + -0.006039991043508053, + -0.005723089445382357, + -0.020643865689635277, + -0.008880785666406155, + -0.04587525874376297, + -0.013106138445436954, + 0.014637828804552555, + 0.01970825344324112, + 0.006073944736272097, + -0.008926058188080788, + 0.013566400855779648, + -0.0028351363725960255, + 0.022394370287656784, + -0.03573441132903099, + 0.061780694872140884, + -0.03410463407635689, + -0.005251510068774223, + 0.021232398226857185, + -0.0008219631854444742, + 0.022937629371881485, + 0.00414235470816493, + 0.013694670051336288, + 0.009899398311972618, + -0.013340041972696781, + -0.03205231949687004, + 0.007952717132866383, + 0.027977870777249336, + -0.0019032950513064861, + 0.015513081103563309, + 0.004444165620952845, + 0.0019825203344225883, + -0.012872235849499702, + 0.03685111179947853, + -0.03627767041325569, + 0.02085513435304165, + 0.034738436341285706, + 0.018727367743849754, + 0.005360916256904602, + -0.036156948655843735, + 0.001176119432784617, + 0.014532195404171944, + -0.022168012335896492, + 0.0025238937232643366, + -0.025804832577705383, + 0.0020353372674435377, + 0.03413481265306473, + -0.009484407491981983, + 0.012079982087016106, + 0.03519115224480629, + -0.02838531695306301, + 0.00507419602945447, + 0.012623241171240807, + 0.005689135752618313, + -0.0024465546011924744, + -0.012472336180508137, + 0.013166501186788082, + 0.03383300453424454, + 0.0157394390553236, + -0.003766977461054921, + 0.03914487361907959, + 0.00048761325888335705, + -0.010631289333105087, + 0.05523139610886574, + -0.01862173341214657, + -0.014690645970404148, + 0.04252515733242035, + -0.011566903442144394, + 0.005945675075054169, + 0.001008237130008638, + 0.04859155789017677, + -0.03905433043837547, + -0.01447183359414339, + -0.006802063435316086, + 0.027917509898543358, + 0.016765596345067024, + -0.0399295836687088, + 0.0186066422611475, + -0.03633803501725197, + 0.01940644159913063, + -0.015286723151803017, + -0.016222337260842323, + 0.005123240407556295, + -0.006681338883936405, + -0.012555333785712719, + 0.006866198033094406, + -0.0028973848093301058, + 0.006311620585620403, + 0.010186118073761463, + 0.03144869580864906, + -0.02281690575182438, + 0.016433604061603546, + 0.05004024878144264, + 0.01607143133878708, + 0.023299802094697952, + 0.015150907449424267, + -0.02559356577694416, + 0.010171027854084969, + -0.006175805814564228, + -0.0027879783883690834, + -0.012955233454704285, + -0.019753525033593178, + -0.022620728239417076, + 0.006990695372223854, + -0.011219820939004421, + 0.01581489108502865, + 0.003702842630445957, + 0.01070674229413271, + 0.000751697807572782, + 0.0054627773351967335, + -0.006296530365943909, + -0.01854628138244152, + 3.849268250633031e-05, + -0.013453221879899502, + -0.01100100763142109, + 0.012721329927444458, + 0.028340045362710953, + -0.01886318251490593, + 0.024114692583680153, + 0.0014590671053156257, + 0.019255535677075386, + 0.0041800811886787415, + 0.004342304542660713, + 0.007764085661619902, + 0.0025106894318014383, + 0.0037782953586429358, + -0.021594570949673653, + 0.0011487677693367004, + -0.01631288044154644, + -0.012736420147120953, + -0.005492958705872297, + -0.021187126636505127, + 0.0174446702003479, + -0.0020504279527813196, + -0.06989941000938416, + -0.005553320981562138, + 0.03820926323533058, + 0.027917509898543358, + 0.014871732331812382, + 0.018169017508625984, + 0.0005380722577683628, + -0.05091550201177597, + -0.023797789588570595, + -0.049949705600738525, + 0.01967807114124298, + -0.02956237830221653, + 0.007417003158479929, + -0.008209256455302238, + -0.004840292502194643, + 0.016493966802954674, + 0.040684111416339874, + -0.020643865689635277, + 0.012668512761592865, + -0.007786721456795931, + -0.016841048374772072, + -0.019889339804649353, + -0.015369720757007599, + -0.01141599752008915, + -0.01770121045410633, + 0.0003954194544348866, + 0.004568662494421005, + 0.0038669523783028126, + 0.010563381947577, + -0.008729880675673485, + 0.01282696332782507, + -0.006703974679112434, + 0.008103623054921627, + 0.012411973439157009, + 0.020311875268816948, + -0.02340543642640114, + -0.007975352928042412, + 0.021775657311081886, + 0.006654930766671896, + -0.03374246135354042, + 0.040925558656454086, + 0.013340041972696781, + -0.009348592720925808, + 0.03494970500469208, + -0.013332497328519821, + 0.008073441684246063, + -0.012298794463276863, + -0.010261571034789085, + -0.033923547714948654, + 0.011770625598728657, + -0.004263079259544611, + -0.016237426549196243, + 0.03144869580864906, + 0.026333002373576164, + -0.01629778929054737, + -0.03745473548769951, + -0.018169017508625984, + -0.021504027768969536, + -0.021836020052433014, + 0.01658450998365879, + -0.0301207285374403, + -0.0003664173127617687, + -0.008797788061201572, + 0.009620223194360733, + 0.02987927943468094, + -0.006824699230492115, + 0.007571681402623653, + 0.007884809747338295, + 0.016237426549196243, + 0.03751509636640549, + -0.010623743757605553, + -0.04340041056275368, + -0.024657951667904854, + 0.004957244265824556, + -0.06446681171655655, + -0.02788732759654522, + -0.01853119023144245, + 0.0029181342106312513, + -0.012608150951564312, + -0.010284206829965115, + -0.0393863245844841, + -0.002584255998954177, + 0.029366202652454376, + 0.028219319880008698, + -0.01294014323502779, + -0.00124779948964715, + 0.005598592571914196, + 0.02200201526284218, + -0.002273013349622488, + 0.00828470941632986, + -0.01631288044154644, + -0.044094573706388474, + -0.013158955611288548, + 0.005670272745192051, + -0.0253521166741848, + 0.02139839343726635, + -0.024612680077552795, + -0.01853119023144245, + -0.016192154958844185, + -0.03627767041325569, + 0.00927314069122076, + -0.03006036765873432, + 0.005704226437956095, + 0.028641855344176292, + 0.018380284309387207, + -0.04533199965953827, + 0.0038273397367447615, + 0.02029678411781788, + -0.029336020350456238, + 0.005028924439102411, + 0.003359532682225108, + -0.07340041548013687, + -7.786957576172426e-05, + -0.011981893330812454, + 0.025714289397001266, + 0.03063380718231201, + -0.0013977617491036654, + 0.007628270890563726, + -0.02809859625995159, + -0.012600605376064777, + 0.013279680162668228, + 0.011363181285560131, + -0.009605132043361664, + 0.016146883368492126, + 0.00814134906977415, + 0.010171027854084969, + -0.005262827966362238, + -0.00228999019600451, + 0.013475857675075531, + -0.021036220714449883, + 0.003191650379449129, + -0.00675301905721426, + -0.019572436809539795, + -0.014690645970404148, + -0.0017212653765454888, + -0.003965040668845177, + 0.018908454105257988, + -0.022952720522880554, + 0.006971831899136305, + 0.019587527960538864, + -0.003783954307436943, + -0.01126509252935648, + 0.03350101038813591, + 0.002737047616392374, + 0.019059360027313232, + -0.006345574278384447, + -0.005511821713298559, + 0.021292759105563164, + -0.04807847738265991, + -0.02332998439669609, + 0.006100352853536606, + 0.03178068995475769, + -0.014456742443144321, + 0.004651660565286875, + 0.025487931445240974, + 0.007417003158479929, + 0.017957748845219612, + -0.011672536842525005, + 0.004395121242851019, + 0.030030185356736183, + -0.005730634555220604, + 0.007239689119160175, + 0.0039989943616092205, + 0.02698189578950405, + 0.0010233275825157762, + 0.014305837452411652, + 0.007466047536581755, + 0.0050515602342784405, + -0.004304578062146902, + -0.007990444079041481, + 0.00375754595734179, + 0.01774648204445839, + -0.0007111419690772891, + 0.033319924026727676, + 0.021307850256562233, + 0.016222337260842323, + -0.02142857387661934, + 0.030603626742959023, + -0.0051647392101585865, + 0.004210262093693018, + 0.012042255140841007, + -0.010653925128281116, + -0.0016099725617095828, + -0.0011883804108947515, + -0.026830989867448807, + -0.02557847462594509, + -0.03190141171216965, + -0.0013241954147815704, + -0.004557344596832991, + 0.005153421312570572, + -0.005504276603460312, + -0.05097586289048195, + -0.03522133454680443, + -0.007013331167399883, + 0.028521131724119186, + -0.014735917560756207, + 0.04578471556305885, + 0.006187123712152243, + 0.00041027419501915574, + -0.013687124475836754, + 0.02447686530649662, + -0.007526409812271595, + -0.022303827106952667, + 0.019270626828074455, + 0.009929578751325607, + 0.025563383474946022, + -0.026302821934223175, + 0.007567908614873886, + -0.015113181434571743, + -0.0038348848465830088, + 0.001167631009593606, + -0.0005465606809593737, + 0.0007535841432400048, + 0.005964538082480431, + 0.006353119853883982, + 0.009242959320545197, + -0.025955738499760628, + 0.031086523085832596, + -0.001592052518390119, + 0.001062940340489149, + 0.00299358693882823, + -0.018229378387331963, + -0.06165996938943863, + 0.007288733497262001, + 0.007545272819697857, + 0.031720325350761414, + 0.01629778929054737, + 0.031358152627944946, + 0.027706241235136986, + -0.02613682486116886, + -0.003184105036780238, + 0.015633804723620415, + 0.011514086276292801, + -0.011348090134561062, + -0.018123745918273926, + -0.0099823959171772, + -0.0062210774049162865, + -0.012736420147120953, + -0.017505032941699028, + -0.002650276990607381, + -0.018636824563145638, + 0.0007988557335920632, + 0.023782700300216675, + -0.01447183359414339, + -0.018727367743849754, + 0.009899398311972618, + -0.019195174798369408, + -0.01364939846098423, + 0.0008012136677280068, + -0.026529179885983467, + -0.005036469548940659, + 0.007945172488689423, + -0.03404426947236061, + 0.01853119023144245, + 0.010223845019936562, + 0.016946682706475258, + -0.007424548268318176, + 0.011544267646968365, + 0.005044014658778906, + -0.034738436341285706, + 0.031116705387830734, + 0.017037225887179375, + 0.009642858989536762, + -0.00625503109768033, + 0.00648516183719039, + -0.006405936554074287, + 0.0056815906427800655, + -0.015384810976684093, + 0.021820928901433945, + -0.03175050765275955, + 0.018968814983963966, + -0.024869218468666077, + 0.003118084045127034, + 0.007405685260891914, + 0.004791248124092817, + 0.05830986797809601, + -0.02840040624141693, + -0.005119467619806528, + -0.018063383176922798, + 0.01604125089943409, + 0.0005616512498818338, + -0.007058602757751942, + -0.01881791092455387, + 0.02108149230480194, + 0.006304075475782156, + 0.00930332113057375, + 0.0019334761891514063, + 0.04789739102125168, + 0.025186121463775635, + 0.026061372831463814, + -0.01579980179667473, + 0.005809859838336706, + -0.038692157715559006, + -0.004613934550434351, + 0.010616199113428593, + 0.02366197481751442, + -0.04071429371833801, + -0.006002264562994242, + 0.023767609149217606, + -0.0077791763469576836, + -0.020975857973098755, + 7.480430940631777e-05, + -0.0267102662473917, + -0.021217307075858116, + 0.0523340106010437, + -0.015528171323239803, + ], + "index": 10, + }, + { + "title": "817 Squadron RAN", + "text": "817 Squadron was a Royal Australian Navy Fleet Air Arm squadron. It was originally formed as part of the Royal Navy's Fleet Air Arm for service during World War II and took part in combat operations in Norway, North Africa, Sicily and off the coast of France. Following the conclusion of hostilities, the squadron was disbanded in 1945. In 1950, it was re-raised as part of the Royal Australian Navy and subsequently took part in the Korean War.", + "vector": [ + -0.03873995319008827, + 0.019384324550628662, + -0.01606990583240986, + -0.022784831002354622, + -0.0018580828327685595, + -0.025754893198609352, + 0.014262041077017784, + 0.018193429335951805, + 0.009670639410614967, + 0.015539024956524372, + 0.030360642820596695, + -0.03552597016096115, + -0.017691245302557945, + 0.06640314310789108, + 0.018021252006292343, + 0.04938626289367676, + -0.039945196360349655, + 0.030963264405727386, + 0.010402394458651543, + -0.03564075380563736, + 0.007374939043074846, + 4.141901808907278e-05, + 0.021522196009755135, + -0.03739122673869133, + -0.01402529701590538, + 0.011815684847533703, + -0.028638867661356926, + 0.02683100290596485, + -0.02021651528775692, + -0.039514750242233276, + 0.004272155929356813, + -0.02124958112835884, + 0.001189101254567504, + 0.015653809532523155, + -0.009455418214201927, + 0.009663465432822704, + 0.007335481699556112, + 0.03739122673869133, + -0.04783666506409645, + 0.005258589517325163, + 0.012009385041892529, + -0.05911429598927498, + -0.0192121472209692, + 0.048324503004550934, + 0.014721181243658066, + -0.006614488083869219, + -0.03351723402738571, + 0.006955256219953299, + -0.01782037690281868, + -0.007489724084734917, + 0.046889688819646835, + 0.0608360730111599, + -0.024822264909744263, + 0.05194023251533508, + 0.013558982871472836, + -0.008895840495824814, + 0.03285721689462662, + 0.10600398480892181, + -0.029284533113241196, + -0.027433624491095543, + -0.017203407362103462, + -0.03650164231657982, + 0.022354386746883392, + -0.024894006550312042, + 0.02218220941722393, + -0.03767818957567215, + 0.004178892821073532, + -0.009268891997635365, + -0.0485253781080246, + -0.013587679713964462, + -0.010969145223498344, + -0.01792081445455551, + 0.02129262499511242, + 0.06978930532932281, + -0.00878105591982603, + -0.009677814319729805, + 0.04046172648668289, + 0.04318787157535553, + -0.0077264681458473206, + 0.040806081146001816, + 0.010883056558668613, + 0.01365224551409483, + -0.0435035303235054, + 0.015754247084259987, + 0.007862775586545467, + 0.04927147924900055, + -0.08792534470558167, + -0.05782296508550644, + -0.02124958112835884, + -0.03664512559771538, + -0.0485253781080246, + 0.04554096609354019, + 0.05248546227812767, + -0.03624337539076805, + 0.03380419313907623, + -0.021063055843114853, + 0.005950887221843004, + -0.01947041228413582, + -0.00919715128839016, + -0.025281405076384544, + -0.02701753005385399, + 0.014764226041734219, + 0.03162327781319618, + 0.05125151947140694, + 0.0055706617422401905, + 0.04551227018237114, + -0.02340180054306984, + 0.02218220941722393, + -0.031365010887384415, + 0.033861588686704636, + 0.005775122437626123, + 0.026529692113399506, + 0.00047034965245984495, + -0.032225899398326874, + -0.03928517922759056, + 0.01657208986580372, + -0.01856647990643978, + -0.009670639410614967, + -0.015266411006450653, + 0.03681730106472969, + 0.005133043508976698, + 0.00826452299952507, + -0.003759210230782628, + -0.005567074753344059, + -0.005269350949674845, + -0.046000104397535324, + 0.04186784476041794, + 0.009706510230898857, + -0.006072846241295338, + 0.017031230032444, + 0.0011774434242397547, + -0.0369894802570343, + 0.0271610114723444, + -0.005344678647816181, + 0.010796967893838882, + 0.02060391567647457, + -0.060893464833498, + 0.008278870955109596, + 0.012052429839968681, + -0.018509088084101677, + 0.04238437861204147, + -0.017346888780593872, + 0.04318787157535553, + -0.006861993111670017, + 0.037161655724048615, + 0.025640109553933144, + 0.017834726721048355, + 0.027146661654114723, + 0.000986433937214315, + -0.005384135991334915, + 0.03199633210897446, + 0.018437348306179047, + -0.001724465866573155, + 0.007920168340206146, + -0.044852256774902344, + -0.019011272117495537, + -0.04100695624947548, + 0.004103565122932196, + 0.01842299848794937, + 0.02934192679822445, + 0.00020928092999383807, + -0.03954344615340233, + -0.05986040085554123, + 0.037764277309179306, + -0.0009433895465917885, + 0.011794162914156914, + -0.002319016493856907, + -0.02919844537973404, + 0.02457834780216217, + 0.021837854757905006, + 0.016471654176712036, + 0.03851038217544556, + 0.02157958783209324, + 0.007052105851471424, + 0.01082566473633051, + 0.0019423781195655465, + -0.012647876515984535, + 0.04881234094500542, + -0.003452518954873085, + -0.008573007769882679, + -0.034693777561187744, + 0.023129185661673546, + -0.048181019723415375, + 0.012317869812250137, + -0.06887102872133255, + -0.019240843132138252, + 0.02601316012442112, + 0.01817908138036728, + 0.005437941290438175, + -0.02826581709086895, + -0.017432978376746178, + -0.04482355713844299, + 0.014039645902812481, + 0.04069129750132561, + -0.019398672506213188, + 0.016256431117653847, + -0.031824152916669846, + 0.025496628135442734, + -0.009254544042050838, + 0.028610171750187874, + 0.000238313470617868, + -0.045167915523052216, + -0.05133761093020439, + -0.014441393315792084, + -0.012798531912267208, + -0.018451696261763573, + 0.0123250437900424, + 0.05423593148589134, + -0.017332540825009346, + 0.011349370703101158, + 0.008766707964241505, + -0.018078643828630447, + 0.007174065336585045, + 0.007009061519056559, + 0.04031824693083763, + -0.0006232468876987696, + 0.025281405076384544, + 0.018810398876667023, + 0.06582922488451004, + 0.03248416632413864, + -0.012655050493776798, + -0.047922756522893906, + 0.0071920002810657024, + 0.045024432241916656, + -0.004817384760826826, + -0.02046043425798416, + -0.025984464213252068, + -0.012281999923288822, + -0.0057966448366642, + -0.015539024956524372, + -0.05744991451501846, + -0.014075515791773796, + -0.025525324046611786, + 0.012927665375173092, + -0.02383224479854107, + -0.019456064328551292, + 0.0027117966674268246, + 0.02139306254684925, + 0.003570890985429287, + -0.032512862235307693, + -0.04143739864230156, + 0.017490370199084282, + -0.01892518438398838, + -0.04998888447880745, + 0.04436441883444786, + 0.002744079800322652, + -0.0009613247239030898, + 0.020474782213568687, + -0.024822264909744263, + -0.016902096569538116, + 0.020991314202547073, + -0.010323479771614075, + -0.05142369866371155, + -0.007131020538508892, + 0.00644948473200202, + -0.006227088626474142, + -0.04264264181256294, + 0.039486054331064224, + -0.023416148498654366, + -0.01578294299542904, + -0.026271427050232887, + 0.042843516916036606, + 0.028222771361470222, + 0.0012240748619660735, + -0.013185931369662285, + -0.023674415424466133, + -0.053547222167253494, + -0.04683229699730873, + 0.053977664560079575, + -0.022139165550470352, + -0.025955768302083015, + -0.009010626003146172, + -0.02107740379869938, + 0.02891148254275322, + 0.015352499671280384, + -0.013924860395491123, + -0.005093586165457964, + 0.0033126245252788067, + -0.012138518504798412, + 0.02872495725750923, + -0.033861588686704636, + 0.0017872389871627092, + -0.022598305717110634, + -0.031680673360824585, + -0.08867144584655762, + 0.031508494168519974, + 0.0031494146678596735, + 0.020517826080322266, + 0.0738641768693924, + 0.07053540647029877, + 0.009082366712391376, + 0.03449290618300438, + -0.023315710946917534, + 0.027821024879813194, + 0.017260801047086716, + 0.03931387513875961, + -0.016729919239878654, + 0.006399265956133604, + 0.03159458190202713, + -0.03902691602706909, + -0.00883844867348671, + -0.013171583414077759, + 0.01875300705432892, + 0.029758021235466003, + -0.05156718194484711, + 0.018379954621195793, + -0.031365010887384415, + -0.008738011121749878, + 0.027103617787361145, + -0.00937650352716446, + 0.0027656021993607283, + 0.06410744786262512, + -0.01717471145093441, + -0.017045577988028526, + 0.002744079800322652, + -0.048209719359874725, + -0.05592901259660721, + -0.017031230032444, + -0.026429256424307823, + -0.005997518543154001, + 0.016371216624975204, + 0.029815414920449257, + -0.020847832784056664, + 0.0010814903071150184, + 0.032398078590631485, + -0.019456064328551292, + 0.024563999846577644, + 0.012174388393759727, + -0.013845945708453655, + 0.009971950203180313, + 0.06158217415213585, + -0.008199956268072128, + -0.00420400220900774, + 0.014749878086149693, + -0.0004905267269350588, + 0.011198715306818485, + 0.014484437182545662, + 0.04614358767867088, + 0.02150784805417061, + -0.028437994420528412, + 0.007991908118128777, + -0.04915669560432434, + 0.012296347878873348, + 0.04163827374577522, + -0.06433701515197754, + 0.041552186012268066, + 0.005283698905259371, + -0.010761098004877567, + 0.025711849331855774, + -0.03756340593099594, + 0.00046855612890794873, + 0.020187819376587868, + 0.05478116124868393, + -0.028667563572525978, + 0.03475117310881615, + -0.06714925169944763, + -0.016127297654747963, + 0.007453853730112314, + -0.03968692943453789, + 0.009548680856823921, + 0.039055611938238144, + 0.01925519108772278, + -0.012726791203022003, + -0.03337375074625015, + -0.0009218673803843558, + 0.005319569259881973, + 0.0019477587193250656, + 0.010380872525274754, + 0.021880898624658585, + -0.018437348306179047, + 0.02869626134634018, + 0.06984669715166092, + -0.04740622267127037, + -0.022928312420845032, + 0.019226495176553726, + -0.011586114764213562, + -0.03495204448699951, + -0.04396267235279083, + 0.04436441883444786, + -0.005441528279334307, + 0.019527805969119072, + 0.0022687981836497784, + -0.04046172648668289, + -0.046574030071496964, + 0.04975931718945503, + -0.032512862235307693, + 0.009943254292011261, + 0.012411132454872131, + 0.0030400101095438004, + -0.004383353982120752, + 0.01379572693258524, + 0.04304439201951027, + -0.045024432241916656, + 0.010423916392028332, + 0.019484760239720345, + -0.028524082154035568, + 0.010947623290121555, + 0.013975079171359539, + 0.0681823119521141, + -0.00012868479825556278, + -0.03727644309401512, + -0.005255002528429031, + -0.011650681495666504, + 0.06789535284042358, + -0.011500026099383831, + -0.008824099786579609, + -0.04473746940493584, + 0.011062408797442913, + -0.03102065809071064, + 0.011327848769724369, + 0.024233991280198097, + 0.008967581205070019, + -0.014893359504640102, + 0.0008492299821227789, + -0.005165326874703169, + 0.03736253082752228, + -0.026142293587327003, + -0.006180457305163145, + 0.02407616190612316, + -0.03394767642021179, + 0.007504072040319443, + 0.01906866580247879, + -0.0027135901618748903, + 0.06336134672164917, + 0.0014939990360289812, + 0.025697501376271248, + -0.018150385469198227, + 0.0015522883040830493, + 0.04476616531610489, + -0.04740622267127037, + -0.019398672506213188, + -0.03785036876797676, + 0.032225899398326874, + -0.00710232462733984, + -0.07214239984750748, + -0.00511510856449604, + -0.052255891263484955, + 0.01238243654370308, + 0.015653809532523155, + 0.009957602247595787, + -0.050648901611566544, + -0.014247693121433258, + -0.07128150761127472, + -0.030532822012901306, + 0.017002534121274948, + -0.02193829044699669, + 0.018982576206326485, + 0.007697771769016981, + -0.010423916392028332, + 0.021880898624658585, + -0.03618598356842995, + -0.009082366712391376, + -0.010237391106784344, + -0.012009385041892529, + 0.029901502653956413, + 0.008300392888486385, + 0.04720534756779671, + 0.022957008332014084, + -0.020245211198925972, + -0.009390851482748985, + 0.0377068854868412, + 0.04975931718945503, + 0.014584874734282494, + -0.02908365987241268, + 0.007575812749564648, + -0.026601433753967285, + 0.008386482484638691, + -0.040203459560871124, + -0.021378714591264725, + -0.06416483968496323, + -0.0009048289502970874, + -0.0011657855939120054, + -0.004487377591431141, + 0.00948411412537098, + -0.04330265894532204, + 0.017834726721048355, + -0.010854360647499561, + -0.0071202595718204975, + 0.0235739778727293, + -0.00786994956433773, + 0.036042504012584686, + -0.020474782213568687, + 0.004125087521970272, + 0.011234586127102375, + 0.01581163890659809, + -0.07483984529972076, + -0.014039645902812481, + -0.0072386316023766994, + -0.06295959651470184, + 0.049644529819488525, + 0.025884026661515236, + -0.012439829297363758, + 0.00888866651803255, + -0.01261200662702322, + -0.007098737638443708, + -0.04100695624947548, + -0.02723275125026703, + -0.009398025460541248, + 0.009433895349502563, + -0.022196557372808456, + 0.01180851086974144, + 0.03015976957976818, + -0.00570696871727705, + -0.00761168310418725, + 0.012669399380683899, + 0.019484760239720345, + 0.00906801875680685, + 0.04387658089399338, + -0.006370570044964552, + 0.012533091939985752, + 0.021636979654431343, + 0.02196698822081089, + -0.022139165550470352, + -0.0019029207760468125, + -0.012296347878873348, + -0.03635816276073456, + 0.023631369695067406, + -0.015194670297205448, + 0.010201520286500454, + -0.025697501376271248, + 0.0235739778727293, + 0.012439829297363758, + -0.001899333787150681, + -0.03641555458307266, + 0.02017347142100334, + -0.048066236078739166, + 0.030360642820596695, + 0.01782037690281868, + 0.005211958196014166, + 0.010366524569690228, + 0.02321527525782585, + -0.019872160628437996, + -0.026199685409665108, + -0.0033861587289720774, + 0.00114964391104877, + 0.025023140013217926, + -0.027275795117020607, + 0.01681600883603096, + -0.0036659473553299904, + 0.00913975853472948, + -0.0037054046988487244, + 0.016342520713806152, + 0.008451048284769058, + -0.041380006819963455, + -0.061696961522102356, + 0.0034901825711131096, + 0.0018356639193370938, + 0.018767355009913445, + -0.023157881572842598, + -0.027462320402264595, + -0.036013808101415634, + 0.02168002538383007, + -0.009075192734599113, + 0.03635816276073456, + 0.022411778569221497, + -0.03231199085712433, + -0.018882138654589653, + 0.00434748362749815, + 0.022153513506054878, + -0.05882733315229416, + 0.00018787082808557898, + -0.013185931369662285, + 0.06714925169944763, + -0.00019930450071115047, + -0.03030325099825859, + 0.022713089361786842, + -0.0398591049015522, + -0.002200644463300705, + -0.03308678790926933, + -0.018953880295157433, + 0.05228458717465401, + 0.0023530933540314436, + -0.000391883309930563, + -0.005412832368165255, + -0.005599357653409243, + -0.03170936927199364, + 0.043130479753017426, + 0.014893359504640102, + 0.02153654396533966, + -0.03466508165001869, + -0.004042585846036673, + -0.023516586050391197, + 0.009957602247595787, + 0.04462268576025963, + 0.003244471037760377, + -0.0051043471321463585, + 0.002984411083161831, + -0.0014787542168051004, + -0.014692485332489014, + -0.02955714799463749, + -0.028653215616941452, + -0.013099842704832554, + 0.03664512559771538, + 0.000426184298703447, + 0.01010825764387846, + 0.046172283589839935, + -0.05736382305622101, + 0.008049300871789455, + 0.008687793277204037, + -0.03173806518316269, + -0.033287663012742996, + 0.02203872799873352, + 0.012253303080797195, + 0.023530934005975723, + -0.0369320884346962, + 0.028452342376112938, + 0.022268299013376236, + 0.0246500875800848, + 0.005240654572844505, + 0.00828604493290186, + 0.05076368525624275, + -0.02941366657614708, + 0.005936538800597191, + 0.02064695954322815, + -0.013444198295474052, + -0.05911429598927498, + 0.02618533745408058, + 0.012418306432664394, + 0.0318528488278389, + -0.01599816605448723, + 0.0492427833378315, + -0.008329089730978012, + 0.0275484099984169, + 0.006725686136633158, + 0.03159458190202713, + -0.02289961650967598, + -0.022440476343035698, + 0.001337963156402111, + 0.025984464213252068, + 0.034578993916511536, + -0.004336722195148468, + 0.03670251742005348, + -0.009491288103163242, + 0.000607105263043195, + 0.009986299090087414, + 0.005595770664513111, + 0.03810863569378853, + -0.03928517922759056, + 0.010976319201290607, + -0.031393710523843765, + 0.0077192941680550575, + -0.023387452587485313, + -0.010667834430932999, + -0.011507200077176094, + 0.008063648827373981, + -0.019413020461797714, + -0.015940772369503975, + -0.016658179461956024, + 0.00585045013576746, + -0.030791087076067924, + 0.003441757755354047, + 0.0018491152441129088, + -0.02103435806930065, + 0.012597658671438694, + 0.02747667022049427, + -0.02776363119482994, + 0.028739305213093758, + 0.026888396590948105, + 0.016084253787994385, + -0.0622708834707737, + 0.01343702431768179, + -0.0057177296839654446, + -0.03845299035310745, + -0.010423916392028332, + 0.03687469661235809, + -0.012841576710343361, + -0.0015307661378756166, + 0.01667252741754055, + 0.00544870225712657, + 0.014864662662148476, + 0.012834402732551098, + -0.00670057674869895, + 0.044852256774902344, + 0.008357785642147064, + -0.006826122757047415, + -0.019011272117495537, + -0.013960730284452438, + 0.007970386184751987, + 0.01551032904535532, + -0.006097955163568258, + 0.019126057624816895, + -0.025554019957780838, + -0.030389340594410896, + 0.0015495980624109507, + 0.011636333540081978, + -0.0010689357295632362, + 0.049328871071338654, + -0.007898645475506783, + -0.002853484358638525, + -0.018580827862024307, + -0.03578423708677292, + -0.013558982871472836, + -0.015524677000939846, + -0.010947623290121555, + -0.010617616586387157, + 0.0355546660721302, + -0.024463562294840813, + -0.012310695834457874, + -0.03027455508708954, + 0.02307179383933544, + 0.002892941702157259, + 0.025668805465102196, + 0.010718053206801414, + -0.021766113117337227, + -0.03971562534570694, + -0.019240843132138252, + -0.00121421052608639, + -0.004386940971016884, + 0.010868708603084087, + 0.046746209263801575, + -0.04172436147928238, + 0.000966705265454948, + 0.0012617387110367417, + 0.03437811881303787, + -0.005326743237674236, + 0.026744915172457695, + 0.009498462080955505, + -0.005972409155219793, + 0.003088434925302863, + -0.013924860395491123, + 0.023703111335635185, + 0.008824099786579609, + -0.0005541965365409851, + 0.005940125789493322, + 0.012411132454872131, + 0.017691245302557945, + 0.041666969656944275, + -0.046602725982666016, + -0.02640056051313877, + 0.030475428327918053, + -0.049214087426662445, + -0.01064631249755621, + -0.01573989912867546, + 0.015180321410298347, + -0.04244177043437958, + 0.010266087017953396, + 0.022196557372808456, + 0.002710003172978759, + -0.008903014473617077, + 0.0023477128706872463, + 0.011370893567800522, + -0.017877770587801933, + -0.005405657924711704, + 0.004322374239563942, + 0.014678137376904488, + -0.014627918601036072, + 0.010553049854934216, + -0.05664641782641411, + -0.018595177680253983, + -0.011643507517874241, + -0.0723719671368599, + -0.010244565084576607, + 0.013408327475190163, + -0.04318787157535553, + -0.018939532339572906, + 0.015036840923130512, + 0.012798531912267208, + -0.03366071358323097, + -0.008931711316108704, + 0.06112303584814072, + 0.019656937569379807, + 0.0752989873290062, + -0.02486531063914299, + 0.008257349021732807, + 0.04777927324175835, + -0.03825211524963379, + 0.0006958843441680074, + -0.01064631249755621, + 0.025195317342877388, + 0.016399912536144257, + -0.0012115202844142914, + 0.04292960464954376, + -0.03727644309401512, + -0.010990668088197708, + -0.01799255609512329, + 0.05851167440414429, + -0.013272020034492016, + 1.6043563846324105e-06, + -0.018839094787836075, + -0.04651663824915886, + 0.009111062623560429, + -0.009663465432822704, + -0.0006555301952175796, + -0.016830356791615486, + 0.017834726721048355, + -0.001691285870037973, + -0.014068341813981533, + -0.010696531273424625, + -0.013996601104736328, + 0.01870996132493019, + 0.02579793892800808, + 0.022340038791298866, + 0.012891795486211777, + -0.013429850339889526, + 0.025195317342877388, + 0.002304668538272381, + -0.0019172688480466604, + -0.008221478201448917, + -0.0449383445084095, + 0.02172306925058365, + 0.007740816101431847, + 0.004067694768309593, + 0.02239743061363697, + 0.020560869947075844, + 0.008393656462430954, + -0.023602673783898354, + -0.03337375074625015, + -0.0024068988859653473, + -0.03538249060511589, + 0.01971433125436306, + -0.0005564384046010673, + -0.003004139754921198, + 0.026630129665136337, + 0.026386210694909096, + -0.002297494327649474, + -0.017547763884067535, + -0.016414260491728783, + -0.015983816236257553, + -0.010746749117970467, + -0.014534655958414078, + -0.00027821920230053365, + 0.008415178395807743, + -0.023315710946917534, + 0.007048518862575293, + 0.0018688439158722758, + -0.00684405816718936, + -0.05027584731578827, + -0.008601703681051731, + 0.00701264850795269, + 0.0008227755897678435, + -0.032541558146476746, + -0.036013808101415634, + -0.030647605657577515, + -0.03664512559771538, + 0.012827228754758835, + 0.02462139166891575, + 0.029327578842639923, + -0.027247099205851555, + -0.009225848130881786, + 0.04215480759739876, + 0.0031978394836187363, + -0.01236091461032629, + 0.00088779057841748, + -0.033574625849723816, + -0.02297135628759861, + 0.024492258206009865, + 0.0006120374309830368, + -0.01343702431768179, + -0.03750601410865784, + -0.030102377757430077, + 0.03452160209417343, + 0.006144586950540543, + -0.02086218073964119, + -0.023602673783898354, + 0.046287067234516144, + -0.010122605599462986, + -0.020618263632059097, + -0.02594142034649849, + -0.02165132947266102, + -0.009347806684672832, + -0.0016697637038305402, + 0.03796515241265297, + -0.001644654432311654, + 0.016299476847052574, + 0.02124958112835884, + -0.027892764657735825, + -0.02117783948779106, + -0.0013110603904351592, + -0.0063956789672374725, + -0.006438723299652338, + 0.02701753005385399, + -0.01456335186958313, + -0.02347354032099247, + -0.006890689488500357, + -0.0347798690199852, + 0.009347806684672832, + -0.02289961650967598, + -0.012504395097494125, + -0.01073240116238594, + 0.01839430257678032, + -0.021923942491412163, + 0.01573989912867546, + -0.0007510349387302995, + 0.004422811325639486, + 0.03102065809071064, + 0.044134847819805145, + 0.0032462645322084427, + -0.034578993916511536, + 0.01856647990643978, + -0.004770753439515829, + 0.03896952047944069, + -0.017834726721048355, + -0.008522788994014263, + -0.0028570713475346565, + 0.0036246965173631907, + 0.0064207883551716805, + 0.023057445883750916, + 0.02053217403590679, + -0.01368811633437872, + 0.04089217260479927, + -0.0019674873910844326, + -0.006424375344067812, + -0.012748314067721367, + -0.02414790354669094, + 0.014749878086149693, + -0.025166619569063187, + -0.048640161752700806, + 0.008343437686562538, + -0.04826711118221283, + -0.016615135595202446, + 0.01585468463599682, + -0.008795403875410557, + -0.04955844208598137, + 0.03736253082752228, + -0.039486054331064224, + -0.039514750242233276, + -0.03162327781319618, + -0.00171101454179734, + 0.017232105135917664, + -0.018308214843273163, + 0.0063956789672374725, + 0.011564592830836773, + 0.005567074753344059, + -0.04711925983428955, + -0.022842222824692726, + -0.015452936291694641, + 0.01300658006221056, + 0.027318840846419334, + -0.018451696261763573, + -0.017662547528743744, + 0.014656615443527699, + -0.010101083666086197, + -0.039773017168045044, + -0.035296399146318436, + -0.0177773330360651, + 0.020632611587643623, + -0.008250175043940544, + 0.022354386746883392, + 0.04447920247912407, + -0.021694373339414597, + -0.020273908972740173, + 0.008960407227277756, + -0.028222771361470222, + -0.010560223832726479, + 0.03127892315387726, + -0.05248546227812767, + -0.008099519647657871, + -0.005082825198769569, + -0.000463623960968107, + 0.011830033734440804, + 0.008522788994014263, + 0.010158476419746876, + -0.044708773493766785, + -0.02651534415781498, + 0.0006949875387363136, + -0.02766319550573826, + -0.037046872079372406, + -0.052083712071180344, + -0.0005923087592236698, + 0.01599816605448723, + -0.028667563572525978, + 0.0063885049894452095, + 0.04433572292327881, + 0.010976319201290607, + 0.0035565427970141172, + -0.025137923657894135, + -0.046459246426820755, + 0.007669075392186642, + -0.02987280674278736, + 0.00801343098282814, + 0.022885268554091454, + 0.028036246076226234, + -0.006876341532915831, + 0.0010976319899782538, + -0.04204002022743225, + 0.009398025460541248, + -0.006040562875568867, + 0.05119412764906883, + 0.0037914933636784554, + 0.007862775586545467, + -0.08069388568401337, + 0.0049716271460056305, + -0.008085171692073345, + -0.019298234954476357, + 0.01218156237155199, + 0.02350223809480667, + -0.01870996132493019, + 0.04338874667882919, + -0.00585045013576746, + -0.004483790602535009, + -0.022354386746883392, + 0.03420594334602356, + -0.0017262594774365425, + 0.029528452083468437, + 0.03288591280579567, + 0.04186784476041794, + 0.004946517758071423, + -0.003061532275751233, + -0.022784831002354622, + -0.008192782290279865, + -0.012447003275156021, + 0.007306785322725773, + -0.010811315849423409, + 0.03489465266466141, + 0.008451048284769058, + 0.0028301686979830265, + 0.03380419313907623, + 0.004548357333987951, + -0.03274243324995041, + -0.023416148498654366, + -0.015596417710185051, + 0.009111062623560429, + -0.0015782943228259683, + -0.012475699186325073, + 0.014003775082528591, + -0.006836884189397097, + 0.08092345297336578, + 0.003920626360923052, + 0.037305139005184174, + 0.04445050656795502, + 0.010596094653010368, + -0.017648199573159218, + 0.018021252006292343, + -0.03452160209417343, + -0.03581293299794197, + 0.044134847819805145, + -0.008350611664354801, + 0.007762338500469923, + 0.03188154473900795, + 0.00865909643471241, + -0.049041908234357834, + -0.005975996144115925, + -0.0012464937753975391, + -0.012942013330757618, + -0.007539942394942045, + 0.028237121179699898, + -0.015352499671280384, + 0.06732142716646194, + -0.00309560913592577, + -0.0007550703594461083, + -0.02114914357662201, + 0.005907842423766851, + 0.021923942491412163, + 0.030446732416749, + 0.006417201366275549, + -0.0096060736104846, + -0.015008144080638885, + 0.046574030071496964, + 0.03323027119040489, + -0.011779814958572388, + -0.009541506879031658, + -0.006915798876434565, + 0.008494093082845211, + -0.009017799980938435, + 0.010596094653010368, + 0.021522196009755135, + -0.04975931718945503, + -0.0022939073387533426, + -0.014412696473300457, + -0.034148551523685455, + 0.008845622651278973, + 0.01105523481965065, + -0.02651534415781498, + -0.015338150784373283, + -0.03173806518316269, + -0.02562575973570347, + -0.03684599697589874, + 0.0173899345099926, + 0.009168455377221107, + -0.018021252006292343, + 0.0005900668329559267, + 0.027806676924228668, + -0.003420235589146614, + 0.005714142695069313, + 0.016873400658369064, + -0.0037627972196787596, + -0.005473811645060778, + 0.004928582813590765, + 0.0010205107973888516, + 0.008465397171676159, + 0.01842299848794937, + -0.0031745238229632378, + 0.007783860433846712, + -0.017648199573159218, + -0.009778250940144062, + 0.0011505406582728028, + -0.001546907820738852, + 0.020632611587643623, + -0.04961583390831947, + 0.008515615016222, + -0.0033467013854533434, + 0.02436312474310398, + -0.03345983847975731, + -0.006370570044964552, + -0.020661307498812675, + -0.0022957008332014084, + -0.0181073397397995, + 0.0550394281744957, + -0.017189059406518936, + -0.019585197791457176, + 0.022210905328392982, + -0.004476616624742746, + 0.023961378261446953, + 0.001879605115391314, + 0.018049947917461395, + -0.025051835924386978, + 0.017160363495349884, + 0.007489724084734917, + 0.030331946909427643, + -0.0006129341782070696, + 0.007582986727356911, + 0.0005855830386281013, + -0.023416148498654366, + 0.006237849593162537, + 0.030188465490937233, + 0.020374344661831856, + -0.019771723076701164, + -0.017016882076859474, + 0.012942013330757618, + 0.023000052198767662, + 0.002866039052605629, + -0.00292522506788373, + 0.021737417206168175, + 0.014276389963924885, + -0.015395543538033962, + -0.011966340243816376, + -0.03939996659755707, + -0.014764226041734219, + 0.022454824298620224, + 0.005082825198769569, + 0.03234068676829338, + -0.03871125727891922, + 0.004695425741374493, + -0.011980689130723476, + 0.0015854684170335531, + -0.0003806738241109997, + 0.0011370893334969878, + 0.00479586236178875, + 0.012389610521495342, + -0.009900209493935108, + -0.014735530130565166, + -0.06031953915953636, + -0.0020141187123954296, + 0.03564075380563736, + -0.01419030036777258, + 0.006180457305163145, + -0.011256108060479164, + 0.04522530734539032, + -0.022512216120958328, + 0.02165132947266102, + -0.008745185099542141, + -0.014340955764055252, + 0.010639138519763947, + 0.00828604493290186, + -0.01456335186958313, + -0.019628241658210754, + -0.028237121179699898, + 0.004426398314535618, + -0.031651973724365234, + 0.010689357295632362, + 0.008623226545751095, + 0.003283928381279111, + -0.017074275761842728, + 0.004067694768309593, + -0.015768595039844513, + -0.024965746328234673, + -0.014979448169469833, + -0.04513921961188316, + -0.009046495892107487, + 0.023947030305862427, + 0.01856647990643978, + 0.006639597471803427, + -0.01767689734697342, + -0.004677490331232548, + -0.016973838210105896, + -0.005315982270985842, + -0.029112355783581734, + 0.030963264405727386, + 0.002110968576744199, + -0.013358109630644321, + -0.021995684131979942, + 0.005215545184910297, + 0.024894006550312042, + 0.01753341592848301, + 0.007016235496848822, + -0.0048389071598649025, + -0.04740622267127037, + -0.010782619938254356, + 0.006230675615370274, + 0.02246917225420475, + -0.02579793892800808, + 0.027935810387134552, + 0.010574571788311005, + 0.010954797267913818, + -0.006632423028349876, + -0.006592965684831142, + -0.02371745929121971, + -0.0036659473553299904, + -0.004275742918252945, + 0.010237391106784344, + -0.02483661286532879, + -0.012274825014173985, + 0.01741863042116165, + -0.008623226545751095, + 0.005606532096862793, + -0.009806946851313114, + -0.0005398484063334763, + -0.006270132958889008, + -0.007848427630960941, + 0.03799384832382202, + 0.017432978376746178, + -0.026673173531889915, + 0.0031691433396190405, + 0.018164733424782753, + -0.004820971749722958, + 0.03750601410865784, + 0.029958896338939667, + 0.04519661143422127, + -0.02637186273932457, + -0.0007523800595663488, + 0.001624925760552287, + 0.01236091461032629, + 0.0063813310116529465, + -0.037620797753334045, + 0.019542153924703598, + 0.017117319628596306, + 0.06215609982609749, + 0.0012581517221406102, + -0.010452613234519958, + 0.027634499594569206, + -0.020159123465418816, + 0.021852202713489532, + 0.0033933327067643404, + 0.0035206724423915148, + 0.013142887502908707, + 0.012152866460382938, + -0.014556177891790867, + -0.009369328618049622, + 0.013171583414077759, + 0.005893494468182325, + -0.03902691602706909, + -0.01311419066041708, + -0.0034166486002504826, + -0.006022627465426922, + -0.027950158342719078, + 0.04307308793067932, + -0.0027835373766720295, + 0.0163138248026371, + 0.028882786631584167, + -0.01257613580673933, + 0.01315006148070097, + -0.020976966246962547, + -0.03348853439092636, + -0.012353739701211452, + -0.001990803051739931, + -0.014470089226961136, + 0.011069582775235176, + 0.012547439895570278, + -0.0405765138566494, + 0.01127045601606369, + -0.021923942491412163, + 0.006582204718142748, + -0.007956038229167461, + 0.003759210230782628, + -0.03162327781319618, + -0.0006604623631574214, + -0.009649117477238178, + 0.0162851270288229, + -0.014735530130565166, + 0.0030400101095438004, + 0.0637630894780159, + 0.011837207712233067, + -0.014477263204753399, + 0.018437348306179047, + -0.024176599457859993, + -0.02582663483917713, + -0.02397572621703148, + -0.02762015163898468, + 0.007109498605132103, + -0.003461486427113414, + -0.003827363718301058, + 0.03030325099825859, + -0.008379308506846428, + 0.03271373733878136, + 0.01419030036777258, + 0.042413074523210526, + 0.026127945631742477, + 0.010739575140178204, + -0.030504124239087105, + 0.03394767642021179, + 0.009885861538350582, + 0.010129779577255249, + 0.015051188878715038, + -0.03348853439092636, + 0.0010985287372022867, + -0.0202882569283247, + 0.014032470993697643, + -0.004498139023780823, + -0.013932034373283386, + 0.007453853730112314, + -0.028280165046453476, + -0.020130427554249763, + 0.011966340243816376, + 0.010653486475348473, + -0.002358473837375641, + -0.02307179383933544, + -0.03041803650557995, + 0.01635686866939068, + -0.02017347142100334, + 0.008056474849581718, + 0.023803548887372017, + 0.05130891501903534, + 0.013680942356586456, + -0.007884297519922256, + -0.009986299090087414, + 0.006922972854226828, + 0.020202167332172394, + 0.03561205789446831, + 0.004394114948809147, + 0.008343437686562538, + 0.023961378261446953, + -0.02944236248731613, + -0.007582986727356911, + -0.0036838825326412916, + -0.004110739100724459, + -0.03512422367930412, + 0.005968822166323662, + -0.007683423813432455, + -0.005527617409825325, + -0.007374939043074846, + -0.03248416632413864, + 0.005233480595052242, + -0.006560682784765959, + 0.008099519647657871, + 0.03523900732398033, + -0.022139165550470352, + -0.0003409922937862575, + 0.03277112916111946, + -0.02397572621703148, + 0.008917363360524178, + -0.009383677504956722, + -0.00971368420869112, + -0.00021241958893369883, + -0.028796697035431862, + -0.009125410579144955, + -0.003565510269254446, + -0.005208371207118034, + 0.008573007769882679, + -0.014498786069452763, + 0.006445897743105888, + -0.011543070897459984, + -0.016686875373125076, + -0.0033520818687975407, + 0.018451696261763573, + 0.031680673360824585, + -0.020474782213568687, + 0.0015558754093945026, + -0.017432978376746178, + 0.0054917470552027225, + 0.03911300376057625, + -0.0064279623329639435, + 0.001273396541364491, + 0.013659420423209667, + -0.058482978492975235, + -0.009670639410614967, + -0.019699983298778534, + 0.007396460976451635, + -0.024176599457859993, + 0.004125087521970272, + 0.024305732920765877, + 0.020029990002512932, + -0.0016410674434155226, + 0.0008635781123302877, + 0.035726845264434814, + 0.0009048289502970874, + -0.027964506298303604, + 0.012310695834457874, + 0.026988832280039787, + 0.05133761093020439, + -0.013874641619622707, + 0.003011313732713461, + -0.008501267060637474, + 9.920386946760118e-05, + 0.0021235232707113028, + 0.024320080876350403, + -0.021378714591264725, + -0.006750795058906078, + -0.016199039295315742, + -0.015008144080638885, + -0.0005434354534372687, + 0.019915204495191574, + -0.015495981089770794, + 0.005534791387617588, + -0.0235739778727293, + 0.021493498235940933, + -0.035009436309337616, + 0.002245482290163636, + 0.02021651528775692, + 0.015180321410298347, + 0.013458546251058578, + 0.042413074523210526, + 0.00040129927219823003, + -0.019628241658210754, + 0.027146661654114723, + -0.021593935787677765, + 0.027433624491095543, + 0.035870324820280075, + -0.00764037948101759, + 0.02479356899857521, + 0.007292437367141247, + 0.01868126541376114, + 0.004928582813590765, + 0.02632881887257099, + 0.007855601608753204, + -0.009534332901239395, + -0.016486002132296562, + -0.01039522048085928, + 0.028739305213093758, + -0.005007497500628233, + -0.010531527921557426, + 0.01889648847281933, + 0.0043187872506678104, + 0.00445509422570467, + 0.014003775082528591, + -0.0033054505474865437, + 0.03001628816127777, + -0.00037708680611103773, + 0.0061625218950212, + 0.006327525246888399, + 0.045282699167728424, + -0.03449290618300438, + 0.000626833934802562, + -0.015983816236257553, + 0.012447003275156021, + -0.013063972815871239, + -0.022024380043148994, + -0.001338859903626144, + 0.004182479809969664, + -0.0355546660721302, + -0.02411920763552189, + -0.04815232381224632, + -0.009584550745785236, + 0.023028749972581863, + -0.019169101491570473, + 0.0012491841334849596, + -0.0005802024970762432, + 0.018724309280514717, + 0.013680942356586456, + -0.003120718291029334, + 0.02081913687288761, + 0.010043690912425518, + -0.009111062623560429, + -0.042700037360191345, + -0.0009227641276083887, + 0.003827363718301058, + -0.015452936291694641, + -0.03308678790926933, + -0.048783641308546066, + -0.022282646968960762, + 0.05624467134475708, + 0.02246917225420475, + 0.02343049645423889, + -0.04981670901179314, + -0.020259559154510498, + 0.006352634634822607, + 0.01932693086564541, + -0.01263352856040001, + -0.05331765115261078, + 0.019183449447155, + 0.007518420461565256, + -0.03285721689462662, + 0.018293866887688637, + -0.02922714129090309, + 0.022813526913523674, + 0.025683153420686722, + -0.034722473472356796, + -0.041380006819963455, + 0.024449214339256287, + 0.015625113621354103, + 0.025539672002196312, + 0.007582986727356911, + -0.015424240380525589, + -0.01456335186958313, + -0.008271696977317333, + 0.024994442239403725, + 0.017619503661990166, + -0.01023021712899208, + -0.0003501840401440859, + -0.0376494936645031, + 0.01443421933799982, + 0.03228329122066498, + -0.00278174364939332, + -0.01203808095306158, + -0.011177193373441696, + 0.0014401936205103993, + 0.01820777729153633, + 0.018021252006292343, + -0.053547222167253494, + 0.015381195582449436, + -0.02060391567647457, + 0.013953556306660175, + 0.005785883404314518, + -0.02225394919514656, + -0.03245547041296959, + -0.002996965777128935, + -0.012525917962193489, + -0.02193829044699669, + -0.02912670373916626, + 0.021278277039527893, + -0.032972004264593124, + -0.005907842423766851, + -0.04083477705717087, + 0.00047483344678767025, + 0.010631964541971684, + 0.0056495764292776585, + -0.02057521790266037, + -0.010696531273424625, + 0.021134795621037483, + 0.028007550165057182, + -0.013085494749248028, + -0.019513458013534546, + -0.012109821662306786, + 0.01792081445455551, + 0.016557741910219193, + -0.006704163737595081, + 0.01741863042116165, + -0.016930794343352318, + 0.017088623717427254, + -0.009641943499445915, + 0.017935162410140038, + -0.005628054030239582, + -0.013680942356586456, + 0.01507988478988409, + -0.019398672506213188, + 0.011134149506688118, + 0.023660067468881607, + ], + "index": 11, + }, + { + "title": "The Standard (Philippines)", + "text": "The Standard is a majority broadsheet newspaper in the Philippines. It is owned by the Romualdez family. Romualdezes also owns Journal Publications, Inc., the proprietor of the People's Journal, a tabloid newspaper.Initially established as the Manila Standard, it merged with another newspaper of record, Today, on March 6, 2005 and became Manila Standard Today or MST and recently rebranded as The Standard.", + "vector": [ + -0.001696532592177391, + -0.02142198197543621, + -0.025242570787668228, + 0.0060270181857049465, + -0.011845489032566547, + -0.033083949238061905, + -0.023273883387446404, + -0.018168644979596138, + -0.004170946776866913, + 0.00034462448093108833, + 0.062297262251377106, + 0.02527593821287155, + -0.032766956835985184, + -0.0422433502972126, + -0.036003611981868744, + -0.019970493391156197, + -0.01796843856573105, + -0.0033075606916099787, + 0.03700463846325874, + 0.02150540240108967, + 0.003680860623717308, + -0.007849722169339657, + -0.03677106648683548, + 0.016441872343420982, + 0.010727674700319767, + 0.017534660175442696, + -0.004450400359928608, + -0.03970741480588913, + -0.01414785161614418, + -0.0008607791387476027, + -0.01277143880724907, + 0.0014327202225103974, + 0.0003678253560792655, + -0.01838553324341774, + -0.02597665600478649, + 0.021839076653122902, + 0.0398075170814991, + 0.01096124853938818, + -0.043911729007959366, + -0.012754755094647408, + 0.04588041454553604, + 0.014314689673483372, + 0.006047872826457024, + 0.021188409999012947, + -0.013405422680079937, + -0.03335088863968849, + -0.07988197356462479, + 0.00032116289366967976, + -0.04354468360543251, + 0.024291593581438065, + 0.009376288391649723, + 0.010569179430603981, + -0.011336633004248142, + 0.029580354690551758, + -0.0022231147158890963, + 0.03313400223851204, + -0.0050927260890603065, + 0.08028238266706467, + 0.022589847445487976, + -0.08195076137781143, + 0.005947770085185766, + -0.022756686434149742, + -0.0014942416455596685, + 0.0036433220375329256, + 0.0010057195322588086, + 0.03416839614510536, + 0.005597410723567009, + -0.043811626732349396, + 0.03750515356659889, + -0.027628351002931595, + -0.024875527247786522, + 0.019570082426071167, + 0.02667737565934658, + 0.029930714517831802, + -0.03607034683227539, + 0.029964081943035126, + 0.05862682685256004, + -0.026694059371948242, + -0.03241659700870514, + 0.05685834586620331, + 0.012362685985863209, + -0.011353316716849804, + 0.007311669643968344, + -0.01706751435995102, + -0.0093429209664464, + -0.011703676544129848, + -0.018652474507689476, + -0.054188940674066544, + -0.035302892327308655, + 0.03640402480959892, + 0.06112939491868019, + 0.033000532537698746, + 0.017701497301459312, + -0.06800311803817749, + 0.06920434534549713, + 0.008650543168187141, + -0.028646063059568405, + 0.007745448034256697, + -0.016316743567585945, + -0.020687896758317947, + 0.021789025515317917, + 0.008020730689167976, + 0.037238214164972305, + -0.0006788215832784772, + 0.05819305032491684, + -0.0039957668632268906, + 0.024391695857048035, + 0.013071747496724129, + 0.017918387427926064, + 0.047248486429452896, + 0.022606531158089638, + -0.0418095700442791, + 0.02424154244363308, + 0.0036349801812320948, + -0.08181729167699814, + 0.045112960040569305, + -0.003970741294324398, + -0.008817381225526333, + 0.04614735394716263, + -0.004788246937096119, + -0.05041840299963951, + -0.012179164215922356, + -0.0026840041391551495, + -0.06713555753231049, + 0.0038581257686018944, + -0.061963584274053574, + 0.014164535328745842, + 0.0015213527949526906, + 0.02193918079137802, + -0.0037455102428793907, + -0.06780291348695755, + -0.0011553522199392319, + 0.008183397352695465, + -0.016675444319844246, + -0.03191608563065529, + 0.0157494954764843, + 0.023357301950454712, + -0.015899648889899254, + -0.02527593821287155, + -0.014456501230597496, + 0.033601146191358566, + -0.02375771291553974, + -0.0019196782959625125, + 0.0127797806635499, + -0.014815202914178371, + -0.01504877582192421, + 0.039874251931905746, + 0.04294406622648239, + 0.04891686514019966, + -0.013363713398575783, + -0.03994098678231239, + -0.033083949238061905, + -0.0026840041391551495, + 0.01465670671314001, + -0.026610640808939934, + 0.03224975988268852, + -0.05088555067777634, + -0.029847295954823494, + -0.06563401967287064, + 0.017601395025849342, + -0.03910679742693901, + 0.04881676286458969, + -0.012788122519850731, + -0.006410744972527027, + 0.02706110291182995, + -0.022689949721097946, + 0.09109348058700562, + 0.011845489032566547, + 0.0013388738734647632, + 0.018819311633706093, + -0.02911320887506008, + 0.018001805990934372, + -0.06326492130756378, + -0.06279777735471725, + -0.03727158159017563, + -0.0067986431531608105, + -0.022005915641784668, + 0.03550310060381889, + 0.043911729007959366, + 0.01536576822400093, + 0.03940710425376892, + 0.0038310145027935505, + -0.004771563224494457, + -0.04174283519387245, + -0.007457653060555458, + 0.0323665477335453, + 0.05202004685997963, + 0.0505518764257431, + -0.02263989858329296, + -0.02859601192176342, + -0.010277212597429752, + 0.06213042140007019, + 0.008608833886682987, + -0.039874251931905746, + -0.047548793256282806, + 0.02627696469426155, + 1.1111663297924679e-05, + -0.016433529555797577, + -0.04070844128727913, + -0.008016559295356274, + 0.04454571008682251, + 0.046814706176519394, + 0.029463568702340126, + -0.002713200869038701, + 0.018819311633706093, + 0.0008070782059803605, + -0.014990382827818394, + 0.0090926643460989, + 0.017134249210357666, + 0.04721511900424957, + -0.026110127568244934, + -0.047115013003349304, + -0.006243907380849123, + 0.03290042653679848, + -0.017451241612434387, + 0.0013409593375399709, + 0.0231237281113863, + -0.002239798428490758, + 0.07794665545225143, + -0.021071624010801315, + 0.016650419682264328, + -0.06356523185968399, + -0.025342673063278198, + -0.011378343217074871, + 0.02495894581079483, + -0.009518100880086422, + -0.024007970467209816, + -0.004679802339524031, + 0.0015682759694755077, + 0.02515915036201477, + 0.020154014229774475, + -0.001731985597871244, + 0.02282342128455639, + 0.04264375939965248, + -0.00864220131188631, + 0.01990375854074955, + -0.01708419807255268, + -0.032283127307891846, + -0.07627827674150467, + 0.011903882026672363, + 0.0007012404385022819, + -0.012304292991757393, + -0.016341770067811012, + -0.018452268093824387, + 0.004779905080795288, + 0.025426091626286507, + -0.04327774420380592, + -0.05952775105834007, + -0.01808522455394268, + 0.022906839847564697, + -0.004150092136114836, + -0.04881676286458969, + 0.030347809195518494, + 0.03403492644429207, + -0.0013711987994611263, + 0.004888349678367376, + 0.002446260303258896, + 0.022806737571954727, + 0.010585863143205643, + -0.012504498474299908, + 0.005793445277959108, + -0.01668378710746765, + 0.02666069194674492, + -0.0036662621423602104, + 0.0018591994885355234, + 0.01718430034816265, + -0.018252063542604446, + 0.020053911954164505, + 0.023073676973581314, + 0.06279777735471725, + -0.005101067945361137, + 0.03647075966000557, + 0.02666069194674492, + -0.008496218360960484, + -0.005192828830331564, + 0.029346780851483345, + 0.05822641775012016, + 0.04297743737697601, + -0.012104087509214878, + -0.008492047898471355, + 0.03375130146741867, + -0.013789149932563305, + 0.0024817134253680706, + -0.01938655972480774, + 0.0026005853433161974, + -0.0032658514101058245, + 0.017901703715324402, + -0.05789273977279663, + 0.03243328258395195, + 0.015974726527929306, + -0.008175055496394634, + 0.014564946293830872, + 0.02727799117565155, + 0.046714603900909424, + 0.03730494901537895, + -0.03366788104176521, + -0.007666200399398804, + 0.020888101309537888, + 0.010343948379158974, + -0.0011782924411818385, + -0.006398232188075781, + 0.015599341131746769, + -0.0255595613270998, + -0.02072126418352127, + 0.04918380454182625, + 0.021572137251496315, + -0.03830597549676895, + 0.007991533726453781, + -0.023490771651268005, + -0.06660167872905731, + -0.016058145090937614, + -0.021755658090114594, + -0.03413502871990204, + -0.022372959181666374, + -0.02504236437380314, + -0.012496156617999077, + -0.0017278146697208285, + -0.04070844128727913, + 0.0021751488093286753, + -0.041575998067855835, + 0.06900414079427719, + -0.024908894672989845, + 0.01424795389175415, + -0.005793445277959108, + 0.05392200127243996, + -0.0359368771314621, + 0.04351131618022919, + 0.041976407170295715, + -0.017551343888044357, + 0.0006136505398899317, + 0.011937249451875687, + -0.023107044398784637, + 0.0098434342071414, + -0.029330097138881683, + 0.013121798634529114, + 0.000133144436404109, + 0.035202790051698685, + -0.016033118590712547, + -0.019069569185376167, + -0.0049217171035707, + -0.0015839170664548874, + 0.023373985663056374, + 0.028729481622576714, + 0.025843186303973198, + 0.017801601439714432, + -0.01041068322956562, + 0.03183266520500183, + 0.047148384153842926, + 0.031098579987883568, + 0.020270802080631256, + 0.0008951894706115127, + 0.01622498221695423, + -0.00878401380032301, + 0.047014910727739334, + 0.06336501985788345, + -0.0060562146827578545, + -0.02857932820916176, + -0.018969465047121048, + 0.036737699061632156, + -0.01414785161614418, + 0.02789529226720333, + -0.005488966125994921, + -0.01000193040817976, + 0.023173781111836433, + 0.05095228552818298, + -0.06256420165300369, + -0.008600492030382156, + 0.043778255581855774, + -0.02909652516245842, + -0.00033915010862983763, + 0.005247050896286964, + -0.0042647928930819035, + -0.000218192653846927, + -0.00040510320104658604, + 0.027711769565939903, + 0.02769508585333824, + -0.0018487721681594849, + 0.05518996715545654, + -0.021438665688037872, + -0.033484362065792084, + -0.0638655349612236, + 0.04928390681743622, + 0.007165686693042517, + 0.000961924612056464, + -0.0013472158461809158, + -0.0806160569190979, + -0.015123853459954262, + 0.01212911307811737, + 0.02525925450026989, + 0.013213559053838253, + 0.009509759023785591, + 0.011169795878231525, + 0.07434295862913132, + 0.01908625289797783, + 0.012154138647019863, + -0.033684566617012024, + -0.01606648787856102, + -0.014256295748054981, + 0.06326492130756378, + 0.006573412101715803, + -0.04988452419638634, + -0.03760525584220886, + 0.05008472874760628, + 0.04604725167155266, + 0.021889127790927887, + -0.021555453538894653, + -0.016516949981451035, + -0.015499237924814224, + 0.008658885955810547, + -0.03173256292939186, + -0.02739477902650833, + -0.030848322436213493, + -0.06303134560585022, + 0.05372179299592972, + -0.012237558141350746, + -0.02232290804386139, + -0.04921717196702957, + 0.005722539033740759, + 0.01090285461395979, + -0.01494867354631424, + 0.06453289091587067, + 0.017818285152316093, + -0.013046721927821636, + 0.05589068681001663, + 0.009860117919743061, + 0.0336511991918087, + -0.02515915036201477, + 0.0050259907729923725, + -0.006473309360444546, + 0.034602172672748566, + -0.0037538520991802216, + -0.035202790051698685, + 0.006590095814317465, + -0.020354220643639565, + -0.006548386532813311, + -0.01374744065105915, + 0.0332174189388752, + 0.02344072051346302, + 0.047448690980672836, + 0.026310332119464874, + -0.024992313235998154, + -0.038139138370752335, + 0.04361141845583916, + 0.050051361322402954, + -0.028228968381881714, + 0.021288512274622917, + -0.007591123227030039, + -0.004492109641432762, + -0.011578548699617386, + 0.018368849530816078, + -0.003778877668082714, + -0.006089582107961178, + -0.02090478502213955, + -0.005155290011316538, + -0.0023399011697620153, + 0.0005200649029575288, + -0.0013148909201845527, + 0.02253979630768299, + 0.05165300518274307, + -0.00787474773824215, + 0.018452268093824387, + 0.016358453780412674, + 0.01768481358885765, + -0.03396819159388542, + 0.002329473849385977, + -0.0077704740688204765, + 0.012245899997651577, + -0.021438665688037872, + -0.029964081943035126, + 0.017351139336824417, + -0.04331111162900925, + -0.010327264666557312, + -0.0359368771314621, + -0.03870638459920883, + 0.04871665686368942, + -0.018352165818214417, + 0.03131546825170517, + -0.020654529333114624, + 0.06059551611542702, + -0.021455349400639534, + 0.02979724295437336, + -0.02052105776965618, + -0.003718398977071047, + 0.010077007114887238, + 0.025576245039701462, + 0.003174090525135398, + -0.043678153306245804, + 0.004646434914320707, + -0.037638623267412186, + 0.034802380949258804, + 0.00217097788117826, + 0.055924054235219955, + -0.004004108719527721, + -0.003449372947216034, + -0.006398232188075781, + -0.01860242336988449, + -0.0029843123629689217, + -0.00029092354816384614, + -0.0045254770666360855, + 0.0018852679058909416, + -0.005067700520157814, + 0.02921331115067005, + 0.05091891810297966, + 0.06419920921325684, + -0.03290042653679848, + 0.013096773065626621, + 0.03246665000915527, + 0.03353441134095192, + -0.008817381225526333, + 0.02819560095667839, + 0.05078544840216637, + -0.006723565980792046, + -0.028812900185585022, + 0.07834706455469131, + 0.023056993260979652, + -0.028562642633914948, + 0.006631805561482906, + 0.03231649473309517, + 0.05445588007569313, + 0.01602477766573429, + 0.021672239527106285, + -0.012954960577189922, + -0.003222056431695819, + -0.005893548019230366, + -0.006777788512408733, + -0.0248421598225832, + -0.03426849842071533, + -0.0026840041391551495, + 0.006590095814317465, + -0.00394780095666647, + -0.001147010363638401, + -0.016291718930006027, + 0.009176082909107208, + 0.003641236573457718, + -0.0456802099943161, + 0.00402079289779067, + -0.02547614276409149, + -0.006410744972527027, + -0.008700595237314701, + 0.014690074138343334, + 0.0037455102428793907, + 0.03101515956223011, + -0.002260653069242835, + -0.04384499415755272, + 0.014164535328745842, + 0.011862172745168209, + -0.019136304035782814, + -0.01978697068989277, + -0.0008769415435381234, + 0.027444830164313316, + 0.01788502000272274, + 0.01938655972480774, + -0.02696100063621998, + 0.05625772848725319, + -0.004658947698771954, + -0.011078034527599812, + 0.03860628232359886, + -0.015641050413250923, + -0.04878339171409607, + 0.002333644777536392, + 0.02332393452525139, + 0.03381803631782532, + 0.01796843856573105, + -0.005288760643452406, + -0.041075482964515686, + 0.02090478502213955, + 0.006736079230904579, + 0.00030317570781335235, + -0.00772459339350462, + 0.004362810403108597, + -0.012003985233604908, + 0.019453296437859535, + -0.004400348756462336, + -0.014506553299725056, + 0.03840607777237892, + 0.018035173416137695, + -0.01930314116179943, + -0.011645283550024033, + 0.016258349642157555, + -0.0432443767786026, + 0.019219722598791122, + -0.010018614120781422, + 0.019770286977291107, + 0.011578548699617386, + -0.019436612725257874, + 0.04574694484472275, + -0.01066093984991312, + -0.0018644132651388645, + -0.0015818316023796797, + 0.002137610223144293, + 0.011812121607363224, + 0.020954836159944534, + 0.020237434655427933, + 0.005438914522528648, + -0.042176615446805954, + -0.004817443434149027, + -0.023373985663056374, + -0.036437392234802246, + 0.03019765391945839, + 0.019837023690342903, + 0.04164273291826248, + 0.026226913556456566, + 0.06129623204469681, + -0.027444830164313316, + -0.0255595613270998, + 0.010544153861701488, + 0.01055249571800232, + -0.0030114236287772655, + 0.03083163872361183, + 0.01608317159116268, + -0.018835995346307755, + 0.0038643821608275175, + 0.01788502000272274, + 0.03059806488454342, + -0.00823344849050045, + 0.010827777907252312, + 0.007294985931366682, + -0.042376819998025894, + -0.012412738054990768, + 0.0072699603624641895, + -0.011595232412219048, + 0.061963584274053574, + 0.02656058967113495, + 0.01920303888618946, + 0.015549289993941784, + -0.0067694466561079025, + -0.024324961006641388, + 0.022689949721097946, + 0.03194945305585861, + 0.0016370966332033277, + 0.04134242609143257, + 0.018535686656832695, + 0.019119620323181152, + 0.006727737374603748, + -0.0019697295501828194, + 0.008742304518818855, + 0.001641267561353743, + -0.030431227758526802, + -0.04110885038971901, + -0.010602546855807304, + -0.03386808931827545, + 0.02899642288684845, + 0.07327519357204437, + 0.024074705317616463, + -0.011053008958697319, + -0.0008425312698818743, + -0.00039467585156671703, + -0.01686730794608593, + 0.037438418716192245, + 0.014531578868627548, + 0.014448159374296665, + 0.01846895180642605, + -0.00035974415368400514, + -0.003015594556927681, + 0.006694369483739138, + 0.019019518047571182, + -0.03316736966371536, + 0.04204314202070236, + 0.009551468305289745, + -0.00545559823513031, + -0.02435832843184471, + -0.039540573954582214, + 0.023373985663056374, + 0.03703800588846207, + 0.020671213045716286, + -0.004064587410539389, + -0.010043639689683914, + 0.014214586466550827, + -0.018118591979146004, + 0.021488718688488007, + -0.02160550467669964, + -0.03163246065378189, + 0.01455660443753004, + -0.023307250812649727, + -0.0015557631850242615, + -0.010360632091760635, + -0.043778255581855774, + 0.022790053859353065, + -0.002005182672291994, + -0.005509820766746998, + 0.010110374540090561, + -0.0015203100629150867, + 0.030631432309746742, + 0.006723565980792046, + 0.02587655372917652, + -0.01870252564549446, + 0.008600492030382156, + -0.030364492908120155, + 0.030364492908120155, + -0.0004645391891244799, + 0.031665828078985214, + -0.038239240646362305, + -0.02203928306698799, + 0.02082136645913124, + 0.031198682263493538, + -0.03009755164384842, + 0.028929686173796654, + -0.005601581651717424, + -0.006973823066800833, + -0.03800566866993904, + 0.01383920107036829, + 0.01850231923162937, + -0.01928645744919777, + -0.003463971195742488, + -0.0007976935594342649, + 0.008496218360960484, + 0.013638995587825775, + -0.029880663380026817, + -0.003261680481955409, + -0.003783048829063773, + 0.03161577507853508, + -0.022356275469064713, + -0.014931989833712578, + 0.011528496630489826, + 0.025426091626286507, + 0.021989231929183006, + 0.002294020727276802, + -0.01978697068989277, + -0.004492109641432762, + 0.02869611419737339, + 0.05181984230875969, + 0.0226232148706913, + -0.031382203102111816, + 0.01090285461395979, + -0.019870391115546227, + 0.010477418079972267, + -0.029964081943035126, + -0.015974726527929306, + 0.07000517100095749, + 0.0038351856637746096, + 0.005572384689003229, + 0.006072898395359516, + -0.010068665258586407, + -0.019036201760172844, + 0.0329337939620018, + -0.019970493391156197, + 0.01121984701603651, + -0.01640850491821766, + -0.03760525584220886, + -0.009935195557773113, + 0.025826502591371536, + -0.04291069880127907, + -0.029363464564085007, + 0.016617052257061005, + -0.013814175501465797, + 0.013597286306321621, + -0.006235565524548292, + 0.02544277533888817, + -0.0009191724238917232, + -0.0017643105238676071, + -0.026010023429989815, + -0.027928659692406654, + -0.034602172672748566, + -0.07881420850753784, + -0.028762849047780037, + 0.013280294835567474, + 0.03290042653679848, + -0.03687116876244545, + 0.003970741294324398, + 0.057325493544340134, + -0.027111154049634933, + -0.009426339529454708, + -0.013063405640423298, + -0.011453419923782349, + 0.011378343217074871, + -0.009551468305289745, + -0.02787860855460167, + 0.013947646133601665, + -0.023273883387446404, + 0.0010067622642964125, + -0.03285037726163864, + 0.033601146191358566, + -0.016550317406654358, + -0.006581753958016634, + 0.032883744686841965, + 0.007053071167320013, + -0.029129892587661743, + -0.028562642633914948, + 0.004804930649697781, + 0.040441498160362244, + -0.04838298261165619, + 0.034602172672748566, + -0.012637969106435776, + 0.009526442736387253, + 0.01698409579694271, + -0.02636038325726986, + -0.00919276662170887, + -0.014089458622038364, + 0.03463554382324219, + -0.025242570787668228, + 0.008658885955810547, + -0.029930714517831802, + -0.026493854820728302, + 0.0077537898905575275, + 0.05919407680630684, + -0.004492109641432762, + -0.018252063542604446, + -0.013447131961584091, + -0.02152208611369133, + 0.011795437894761562, + -0.0042647928930819035, + -0.03994098678231239, + -0.0063356682658195496, + -0.04040813073515892, + 0.024124756455421448, + -0.0020010117441415787, + -0.016934044659137726, + -0.013296978548169136, + -0.019336508587002754, + 0.020220749080181122, + -0.022673266008496284, + 0.022289538756012917, + 0.02342403680086136, + -0.02686089649796486, + -0.02222280390560627, + 0.007924798876047134, + 0.03890659287571907, + -0.0248421598225832, + 0.021655555814504623, + -0.016959069296717644, + -0.04241018742322922, + 0.005943599157035351, + 0.03203286975622177, + 0.04958421364426613, + -0.027311358600854874, + 0.010068665258586407, + 0.027444830164313316, + 0.02646048553287983, + -0.002857098588719964, + 0.02545945905148983, + -0.04027466103434563, + -0.01490696333348751, + -0.03260011970996857, + -0.01398935541510582, + -0.0687372013926506, + 0.015799546614289284, + -0.01383920107036829, + 0.006439941935241222, + 0.02789529226720333, + 0.010677623562514782, + 0.019336508587002754, + 0.00325750932097435, + 0.002673576818779111, + -0.048449717462062836, + 0.00282998732291162, + -0.029163260012865067, + -0.002700688084587455, + 0.04351131618022919, + 0.05388863384723663, + -0.03401824086904526, + 0.029163260012865067, + 0.017401190474629402, + -0.011628599837422371, + 0.008371090516448021, + 0.02342403680086136, + 0.005843496415764093, + -0.056224361062049866, + -0.020220749080181122, + -0.011762069538235664, + -0.03241659700870514, + 0.005013477988541126, + 0.007069754879921675, + 0.011336633004248142, + -0.012979986146092415, + 0.02392455004155636, + -0.014231270179152489, + 0.029079841449856758, + -0.01982033997774124, + 0.0292800460010767, + -0.04074180871248245, + -0.004588041454553604, + 0.04678133875131607, + -0.006965481210500002, + 0.024007970467209816, + 0.04007445648312569, + -0.031665828078985214, + -0.0011657796567305923, + 0.008583808317780495, + -0.0012596258893609047, + 0.0015401220880448818, + 0.02284010499715805, + 0.005038503557443619, + -0.006907087750732899, + -0.03021433763206005, + 0.07534398138523102, + -0.0511191226541996, + 0.0216221883893013, + 0.02242301031947136, + 0.0010208392050117254, + -0.00803324393928051, + 0.002563046757131815, + 0.010936222039163113, + -0.0031010988168418407, + -0.02485884353518486, + -0.006227223668247461, + 0.06746923178434372, + 0.01349718403071165, + -0.00904261227697134, + -0.04774899780750275, + -0.07641174644231796, + 0.01910293661057949, + -0.0037204844411462545, + 0.02404133789241314, + -0.025709716603159904, + 0.019670184701681137, + 0.020070595666766167, + 0.02172229066491127, + -0.012404395267367363, + -0.00540971802547574, + -0.004483767785131931, + -0.005889376625418663, + -0.03747178614139557, + 0.015257323160767555, + -0.01662539318203926, + -0.035302892327308655, + 0.008592150174081326, + -0.005747564602643251, + -0.016058145090937614, + 0.021905813366174698, + 0.004135493654757738, + -0.046914808452129364, + -0.0014869425212964416, + 0.012637969106435776, + -0.03415171056985855, + -0.03787219524383545, + 0.022256171330809593, + -0.009818408638238907, + 0.04144252836704254, + -0.007916457019746304, + -0.018669158220291138, + -0.006110437214374542, + -0.03373461589217186, + -0.027962027117609978, + -0.016041461378335953, + 0.028746165335178375, + 0.03660422936081886, + -0.027761822566390038, + 0.04604725167155266, + -0.014097800478339195, + 0.03710474073886871, + 0.007766302675008774, + 0.008700595237314701, + -0.01096959039568901, + -0.05305444449186325, + -0.00822510663419962, + 0.00863385945558548, + -0.010886170901358128, + -0.0125295240432024, + 0.010927880182862282, + -0.01980365440249443, + 0.01796843856573105, + 0.008959193713963032, + -0.027011051774024963, + 0.011511812917888165, + 0.009217792190611362, + 0.003503595246002078, + -0.0026777477469295263, + -0.010702649131417274, + -0.010761043056845665, + 0.01700912043452263, + 0.0505518764257431, + 0.022906839847564697, + 0.01081943605095148, + -0.01308008935302496, + -0.0043502976186573505, + -0.02869611419737339, + 0.035102687776088715, + 0.0080540981143713, + -0.012204190716147423, + -0.004239767324179411, + 0.006085411179810762, + 0.013697389513254166, + -0.010569179430603981, + -0.005242879968136549, + -0.003935288172215223, + -0.0216221883893013, + 0.005280418787151575, + 0.004031219985336065, + 0.006181342992931604, + -0.033300839364528656, + 0.04327774420380592, + -0.006669343914836645, + 0.009401313960552216, + 0.03927363455295563, + 0.01910293661057949, + -0.0009926853235810995, + 0.0015828743344172835, + 0.004971768707036972, + 0.014206244610249996, + 0.03727158159017563, + -0.04504622519016266, + 0.01888604648411274, + -0.004275220446288586, + -0.029480252414941788, + 0.015582657419145107, + 0.004867495037615299, + 0.00659426674246788, + 0.013263611122965813, + -0.03401824086904526, + -0.03627055138349533, + -0.013121798634529114, + -0.015974726527929306, + -0.03907343000173569, + 1.4907876675351872e-06, + 0.006214710883796215, + 0.016675444319844246, + -0.01237102784216404, + 0.015857940539717674, + -0.0589938722550869, + 0.02153876982629299, + -0.02172229066491127, + -0.007491020485758781, + 0.00829184241592884, + 0.02282342128455639, + -0.007086438592523336, + -0.04140916094183922, + -0.007532729767262936, + -0.029930714517831802, + -0.0012241728836670518, + -0.0019394902046769857, + -0.03486911579966545, + 0.007833038456737995, + -0.032483331859111786, + -0.004437887575477362, + -0.018352165818214417, + -0.003111526370048523, + 0.009309553541243076, + -0.001064634183421731, + -0.003518193494528532, + -0.015582657419145107, + 0.016291718930006027, + 0.022806737571954727, + 0.010477418079972267, + 0.020537741482257843, + -0.016233325004577637, + -0.021855760365724564, + -0.025225885212421417, + 0.00363915110938251, + -0.006168830208480358, + -0.003078158712014556, + -0.013864226639270782, + 0.005580727010965347, + 0.031765930354595184, + 0.04604725167155266, + -0.02282342128455639, + -0.0402412936091423, + -0.013380397111177444, + -0.006569241173565388, + 0.010769384913146496, + -0.008750646375119686, + -0.014072773978114128, + 0.007557755336165428, + -0.014931989833712578, + -0.0027924489695578814, + 0.04898359999060631, + -0.05759243294596672, + -0.011269898153841496, + 0.027811873704195023, + -0.018635790795087814, + 0.010327264666557312, + 0.0026944316923618317, + 0.011770411394536495, + -0.021472033113241196, + -0.011645283550024033, + -0.03757188841700554, + -0.0034660566598176956, + 0.02465863712131977, + -0.0003065645869355649, + 0.01495701540261507, + -0.00714483205229044, + 0.023207148537039757, + -0.0038789804093539715, + -0.003119868226349354, + -0.0100936908274889, + -0.019019518047571182, + -0.0158245712518692, + -0.006348181050270796, + 0.023791080340743065, + -0.003299218835309148, + -0.01746792532503605, + 0.01680891588330269, + 0.020437639206647873, + 0.02070458047091961, + 0.0029572013299912214, + 0.012946618720889091, + 0.011820463463664055, + 0.025242570787668228, + 0.023474087938666344, + -0.03840607777237892, + -0.0196868684142828, + -0.020754631608724594, + 0.015624366700649261, + -0.03356777876615524, + -0.023874498903751373, + 0.027411462739109993, + 0.015123853459954262, + 0.007699567824602127, + 0.04544663429260254, + -0.01131994929164648, + -0.012804806232452393, + 0.00284250034019351, + -0.020170697942376137, + -0.03199950233101845, + -0.004967597778886557, + 0.023807764053344727, + -0.006669343914836645, + 0.014197902753949165, + 0.02052105776965618, + 0.01106969267129898, + -0.010143742896616459, + -0.003353441134095192, + 0.022556480020284653, + -0.017501292750239372, + 0.009860117919743061, + 0.017801601439714432, + 0.022756686434149742, + -0.01748460903763771, + -0.026026707142591476, + 0.013280294835567474, + -0.008141688071191311, + -0.011503471061587334, + -0.022756686434149742, + 0.00023409439017996192, + 0.0010813178960233927, + -0.04788246750831604, + 0.010827777907252312, + 0.0037079716566950083, + -0.008437825366854668, + -0.03817250579595566, + -0.0036996298003941774, + -0.018635790795087814, + -0.010877829045057297, + -0.020370904356241226, + 0.008208422921597958, + -0.02050437405705452, + -0.014364740811288357, + 0.0029446883127093315, + -0.04264375939965248, + 0.02607676014304161, + 0.015741152688860893, + 0.01343879010528326, + 0.011545180343091488, + 0.03376798331737518, + -0.010227161459624767, + 0.02545945905148983, + 0.04231008514761925, + 0.05715865641832352, + -0.001819575554691255, + -0.03241659700870514, + 0.02931341342628002, + -0.03255007043480873, + 0.007812183350324631, + 0.016475239768624306, + 0.013755782507359982, + -0.00015028442430775613, + 0.013597286306321621, + 0.018018489703536034, + 0.012721387669444084, + 0.020938152447342873, + 0.022289538756012917, + -0.003853954840451479, + 0.0323665477335453, + -0.007194883190095425, + 0.02666069194674492, + 0.0053346408531069756, + 0.015023750253021717, + 0.031782615929841995, + -0.02897973731160164, + 0.004683973267674446, + 0.01652529090642929, + 0.016275035217404366, + -0.004988452419638634, + 0.008758988231420517, + 0.010293896310031414, + 0.03091505728662014, + -0.010727674700319767, + 0.011486787348985672, + 0.034802380949258804, + -0.004829956218600273, + 0.009568152017891407, + 0.0013086345279589295, + -0.007908115163445473, + -0.01980365440249443, + 0.010769384913146496, + -0.004980110563337803, + 0.016416845843195915, + 0.014114484190940857, + -0.0025651322212070227, + -0.004917546175420284, + -0.003511937102302909, + 0.0428105965256691, + -0.025592928752303123, + -0.028662746772170067, + -0.009926853701472282, + 0.032883744686841965, + 0.003261680481955409, + -0.01479851920157671, + -0.030481278896331787, + -0.004337784834206104, + 0.0074159433133900166, + 0.017334455624222755, + 0.011136427521705627, + -0.044111933559179306, + -0.00012069677177350968, + -0.030164286494255066, + -0.013038380071520805, + -0.005113580729812384, + -0.01026052888482809, + -0.012204190716147423, + 0.003401407040655613, + 0.01202066894620657, + 0.02203928306698799, + -0.035603202879428864, + 0.024174807593226433, + 0.022956890985369682, + -0.0029446883127093315, + 0.0060145054012537, + -0.0408085435628891, + 0.0336511991918087, + -0.04000772163271904, + 0.016875650733709335, + 0.03650412708520889, + -0.015933016315102577, + 0.0018737978534772992, + 0.03019765391945839, + 0.04314427450299263, + 0.022556480020284653, + -0.043477948755025864, + 0.001558891381137073, + -0.004072929732501507, + -0.01880262792110443, + -0.011837147176265717, + -0.005893548019230366, + -0.006681856699287891, + 0.010327264666557312, + -0.014614997431635857, + 0.029680456966161728, + -0.006248078308999538, + -0.022473061457276344, + -0.001937404740601778, + 0.028512591496109962, + 0.0023461575619876385, + -0.013205217197537422, + -0.0019280201522633433, + 0.03657086193561554, + 0.03710474073886871, + 0.03426849842071533, + -0.013372055254876614, + 0.01728440262377262, + 0.018235379830002785, + -0.015499237924814224, + 0.012504498474299908, + 0.009326237253844738, + 0.0164668969810009, + -0.03371793404221535, + -0.02666069194674492, + -0.03526952490210533, + 0.02364092692732811, + -0.011261556297540665, + -0.007219908758997917, + -0.020137330517172813, + -0.02969714067876339, + -0.008884117007255554, + 0.003000996308401227, + 0.04030802845954895, + -0.028345754370093346, + 0.007591123227030039, + -0.025592928752303123, + 0.026193546131253242, + -0.005876863840967417, + 0.015515921637415886, + -0.002590158022940159, + -0.008708937093615532, + 0.009067637845873833, + -0.018852679058909416, + -0.016558658331632614, + 0.0034243473783135414, + 0.01806854084134102, + 0.01292993500828743, + -0.020737947896122932, + -0.013397080823779106, + -0.017918387427926064, + -0.008358577266335487, + 0.0156076829880476, + 0.013288636691868305, + 0.003057304071262479, + 0.016291718930006027, + -0.007987363263964653, + -0.009951879270374775, + 0.020787999033927917, + -0.006927942391484976, + -0.002857098588719964, + 0.03433523327112198, + -0.0019488749094307423, + -0.01848563551902771, + 0.010744359344244003, + -0.022956890985369682, + -0.015182246454060078, + -0.01318853348493576, + 0.015265665017068386, + 0.005393034312874079, + -0.006823668722063303, + 0.01196227502077818, + -0.037538520991802216, + -0.004925888031721115, + -0.007236592471599579, + -0.01388925313949585, + 0.00018013275985140353, + 0.016291718930006027, + 0.0007022831705398858, + -0.005051016341894865, + 0.0017465839628130198, + -0.00414592120796442, + 0.05088555067777634, + 0.0036287237890064716, + -0.02911320887506008, + 0.026510538533329964, + -0.02008727937936783, + -0.025743084028363228, + -0.010285554453730583, + -0.0003910262603312731, + -0.020587792620062828, + -0.008767330087721348, + -0.0036099543794989586, + -0.03747178614139557, + -0.00109904445707798, + 0.004256451036781073, + 0.024875527247786522, + 0.016033118590712547, + -0.03513605520129204, + -0.013313662260770798, + 0.00039415445644408464, + 0.0021626357920467854, + -0.007553584408015013, + -0.03523615747690201, + 0.0058142999187111855, + 0.00026681023882701993, + 0.03947383910417557, + 0.012337660416960716, + 0.009301211684942245, + 0.0032804496586322784, + -0.010544153861701488, + -0.00023383370717056096, + 0.005551530048251152, + -0.01055249571800232, + 0.019119620323181152, + 0.004102126229554415, + 0.02847922407090664, + 0.011294923722743988, + 0.009226134046912193, + -0.03486911579966545, + 0.016300059854984283, + -0.020871417596936226, + 0.018835995346307755, + -0.02445843257009983, + -0.0053346408531069756, + -0.013322004117071629, + -0.023557506501674652, + -0.015223955735564232, + 0.01171201840043068, + -0.02414144016802311, + 0.04307753965258598, + -0.009267843328416348, + -0.020070595666766167, + -0.0408085435628891, + 0.005309615284204483, + 0.01318853348493576, + -0.006106266286224127, + -0.020654529333114624, + -0.0004754879337269813, + 0.035402994602918625, + 0.009726648218929768, + 0.024491799995303154, + -0.018835995346307755, + 0.0021563793998211622, + -0.010118717327713966, + -0.005559871904551983, + -0.005676658358424902, + -0.0031052699778229, + -0.014197902753949165, + 0.03690453618764877, + 0.01202066894620657, + 0.016300059854984283, + 0.00692377146333456, + 0.00820425245910883, + -0.0181853286921978, + 0.0442454032599926, + -0.017801601439714432, + -0.007019703276455402, + 0.02150540240108967, + -0.017334455624222755, + 0.0009264715481549501, + -0.0018487721681594849, + -0.0010823607444763184, + 0.015173904597759247, + 0.024291593581438065, + -0.016391821205615997, + 0.008967535570263863, + -0.035202790051698685, + 0.0010531640145927668, + -0.00975167378783226, + -0.013021695427596569, + -0.021238461136817932, + 0.0019405329367145896, + 0.004120895639061928, + 0.03817250579595566, + 0.004567186813801527, + -0.014381424523890018, + 0.005134435370564461, + -0.021889127790927887, + -0.02352413907647133, + -0.014790177345275879, + -0.012946618720889091, + -0.0022210292518138885, + -0.005201170686632395, + 0.0035974415950477123, + 0.0043794941157102585, + 0.0051219225861132145, + -0.031465623527765274, + 0.006669343914836645, + -0.00045098361442796886, + -0.009785041213035583, + 0.02292352356016636, + -0.012846516445279121, + -0.022773370146751404, + 0.02465863712131977, + 0.0058142999187111855, + 0.006306471303105354, + 0.0221227016299963, + -0.06119612976908684, + -0.009643228724598885, + 0.01860242336988449, + 0.018969465047121048, + -0.01000193040817976, + 0.004433716647326946, + -0.034902483224868774, + 0.003365954151377082, + -0.027861924842000008, + -0.0026965171564370394, + -0.005789274349808693, + 0.019069569185376167, + 0.026343699544668198, + 0.0221227016299963, + 0.04020792618393898, + 0.0015484639443457127, + 0.009518100880086422, + -0.02819560095667839, + 0.018535686656832695, + 0.021288512274622917, + -0.011928907595574856, + -0.0035161080304533243, + 0.008379432372748852, + 0.009826750494539738, + 0.01746792532503605, + 0.01187051460146904, + 0.008809039369225502, + 0.012471131049096584, + 0.006902916822582483, + 0.026727426797151566, + 0.014748468063771725, + 0.0038894079625606537, + 0.0333675742149353, + -0.024408381432294846, + -0.002120926510542631, + -0.023557506501674652, + 0.0027090299408882856, + -0.042276717722415924, + 0.002571388613432646, + -0.04961758106946945, + 0.026543905958533287, + -0.021588820964097977, + 0.005509820766746998, + 0.007632832508534193, + 0.007440968882292509, + 0.001930105616338551, + -0.02334061823785305, + -0.02072126418352127, + -0.015257323160767555, + -0.008250133134424686, + -0.018435584381222725, + -0.05615762621164322, + -0.007370063103735447, + 0.004759050440043211, + 0.010736016556620598, + -0.00327002233825624, + -0.021155042573809624, + -0.016917360946536064, + -0.008137517608702183, + 0.027328044176101685, + -0.02374102920293808, + -0.030281074345111847, + 0.004387835972011089, + -0.005146948155015707, + 0.02454185113310814, + -0.005551530048251152, + -0.01608317159116268, + 0.003632894717156887, + 0.04040813073515892, + -0.012587917037308216, + 0.004383665043860674, + -0.0030531331431120634, + -0.02182239294052124, + -0.0125295240432024, + -0.007870576344430447, + -0.017017463222146034, + -0.0007439926266670227, + -0.0043502976186573505, + 0.010594204999506474, + 0.01662539318203926, + -0.028545958921313286, + 0.024308277294039726, + -0.029763875529170036, + -0.004646434914320707, + -0.017317771911621094, + 0.004243938252329826, + 0.02527593821287155, + -0.03720484673976898, + -0.018318798393011093, + 0.0064607965759932995, + -0.01682559959590435, + 0.023907866328954697, + 0.0029843123629689217, + -0.004371152259409428, + -0.029730508103966713, + -0.0015474212123081088, + -0.008308526128530502, + -0.021155042573809624, + -0.001202275394462049, + 0.03727158159017563, + -0.011595232412219048, + 0.0432443767786026, + -0.023290567100048065, + 0.0037455102428793907, + -0.013622311875224113, + -0.02414144016802311, + -0.01308843120932579, + ], + "index": 12, + }, + { + "title": "William Cochrane", + "text": "William Cochrane (after 1659 \u2013 August 1717) was a Scottish MP in the British Parliament.He represented Wigtown Burghs 1708-1713.", + "vector": [ + 0.0335075706243515, + -0.059773098677396774, + -0.01916780136525631, + -0.024586213752627373, + 0.016766905784606934, + 0.029912788420915604, + -0.04906747117638588, + -0.03432099148631096, + -0.03941141068935394, + 0.056099601089954376, + -0.06360403448343277, + 0.0534231923520565, + -0.016399554908275604, + 0.013552593067288399, + 0.041221924126148224, + 0.01248990185558796, + 0.0005944838630966842, + 0.009544541127979755, + -0.01267357636243105, + 0.006008797325193882, + 0.049172427505254745, + 0.0004247484903316945, + 0.014969514682888985, + 0.009938131086528301, + 0.03227432444691658, + 0.009026315063238144, + 0.0028158037457615137, + 0.004437719937413931, + 0.020348569378256798, + -0.013362357392907143, + 0.00047763704787939787, + 0.03930645436048508, + 0.029886549338698387, + -0.017672160640358925, + -0.01540246233344078, + -0.04169423133134842, + 0.002702646655961871, + -0.0799773558974266, + 0.048385247588157654, + 0.019351474940776825, + -0.007891465909779072, + -0.021555576473474503, + -0.03453090414404869, + -0.018734851852059364, + 0.014759600162506104, + 0.01597972773015499, + -0.05646694824099541, + -0.003447186667472124, + 0.023326728492975235, + 0.04762430861592293, + 0.06969155371189117, + -0.012339025735855103, + -0.007773389108479023, + -0.03132971003651619, + -0.03802073001861572, + 0.004283563699573278, + 0.026645997539162636, + 0.06008797138929367, + 0.005349535029381514, + 0.027262620627880096, + -0.0008011182653717697, + -0.010312040336430073, + -0.020506003871560097, + -0.0025894897989928722, + -0.002681327285245061, + -0.010863065719604492, + 0.029466722160577774, + -0.014090497978031635, + 0.006333508528769016, + -0.0013480434427037835, + -0.02285442128777504, + -0.005441372282803059, + 0.019731944426894188, + 0.024625573307275772, + -0.025858819484710693, + 0.008226017467677593, + 0.03878166899085045, + 0.021817969158291817, + 0.002983079059049487, + 0.03555423766374588, + -0.01785583607852459, + -0.008317854255437851, + -0.010561313480138779, + 0.032825350761413574, + 0.024966683238744736, + -0.048962511122226715, + 0.018000151962041855, + -0.03240552172064781, + 0.0010446517262607813, + 0.03788953274488449, + 0.0236678384244442, + 0.061662327498197556, + 0.008927918039262295, + 0.06344660371541977, + -0.008350653573870659, + -0.03996243700385094, + 0.02067655883729458, + -0.04473798722028732, + -0.012050393037497997, + -0.03579039126634598, + -0.04027730971574783, + 0.022880660369992256, + -0.01932523585855961, + 0.02449437603354454, + 0.029151849448680878, + -0.05914335697889328, + -0.031802017241716385, + 0.0025074919685721397, + -0.01592724770307541, + 0.052819687873125076, + -0.027210142463445663, + 0.020584722980856895, + -0.05145524442195892, + -0.018695494160056114, + -0.0030781966634094715, + -0.012831011787056923, + -0.03781081363558769, + 0.02650168165564537, + -0.024769889190793037, + -0.03439970687031746, + -0.019180919975042343, + -0.030253900215029716, + 0.017462246119976044, + 0.015612376853823662, + 0.011335372924804688, + -0.009085353463888168, + -0.03534432128071785, + 0.02412702515721321, + 0.005251137539744377, + -0.004752591252326965, + -0.05331823602318764, + -0.06491599977016449, + -0.056624386459589005, + -0.036315176635980606, + 0.015914129093289375, + 0.022828180342912674, + 0.020086174830794334, + -0.0050149839371442795, + 0.038729190826416016, + -0.024153266102075577, + 0.01704241894185543, + -0.023641599342226982, + 0.05279345065355301, + 0.022421471774578094, + 0.07751085609197617, + -0.00015374583017546684, + -0.020492885261774063, + -0.0021877007093280554, + -0.0287057813256979, + 0.027210142463445663, + -0.028312193229794502, + -0.014877676963806152, + 0.04911994934082031, + 0.0301489420235157, + -0.01698993891477585, + 0.005024823825806379, + -0.006005517207086086, + -0.0168718621134758, + 0.002837123116478324, + -0.030831163749098778, + -0.033612530678510666, + 0.007130526937544346, + -0.02183108776807785, + 0.019640108570456505, + -0.0002525531454011798, + -0.004896907135844231, + -0.023746555671095848, + 0.03051629289984703, + -0.042245253920555115, + 0.015061351470649242, + -0.023733437061309814, + 0.013565712608397007, + 0.0010913903824985027, + -0.025793220847845078, + 0.036026544868946075, + 0.006422066129744053, + -0.0236284788697958, + 0.030122702941298485, + -0.01064659096300602, + 0.05951070785522461, + -0.023248009383678436, + -0.015245026908814907, + 0.04235021024942398, + -0.04938234016299248, + -0.001712113618850708, + 0.008035781793296337, + 0.0253077931702137, + 0.004887067712843418, + 0.0073666805401444435, + -0.01731793023645878, + 0.01267357636243105, + -0.04804413765668869, + 0.01435289066284895, + 0.010515394620597363, + 0.028049800544977188, + 0.02833843231201172, + -0.022801941260695457, + -0.01597972773015499, + -0.04221901670098305, + 0.0014267612714320421, + 0.05292464420199394, + -0.08475290238857269, + 0.01279821339994669, + -0.0013021246995776892, + -0.025045400485396385, + -0.01372314803302288, + 0.0011922477278858423, + 0.0169112216681242, + -0.020256731659173965, + -0.025858819484710693, + 0.010744988918304443, + -0.013880583457648754, + 0.004716512281447649, + 0.02306433394551277, + -0.00950518250465393, + 0.017475366592407227, + 0.01372314803302288, + 0.010640031658113003, + 0.0074913171119987965, + 0.02671159617602825, + -0.01267357636243105, + -0.010712189599871635, + 0.0026714876294136047, + -0.03886038810014725, + 0.0008097280515357852, + 0.06176728755235672, + -0.004775550682097673, + 0.008350653573870659, + -0.0019597469363361597, + -0.0406184196472168, + -0.04578755795955658, + 0.03463586047291756, + -0.008193218149244785, + 0.06832710653543472, + -0.005388894118368626, + 0.04796541854739189, + 0.023903992027044296, + -0.010915543884038925, + 0.05893344432115555, + -0.016202760860323906, + 0.003548863809555769, + 0.026554159820079803, + 0.0007613493362441659, + -0.035081930458545685, + 0.03657756745815277, + 0.014628403820097446, + -0.04891003295779228, + -0.02637048438191414, + -0.020742157474160194, + 0.05746404081583023, + 0.0030781966634094715, + -0.0026239289436489344, + 0.025648904964327812, + -0.0016268359031528234, + -0.016373315826058388, + -0.024179505184292793, + -0.02736757881939411, + 0.04909370839595795, + 0.046627216041088104, + -0.03893910348415375, + -0.021962285041809082, + -0.02621304988861084, + -0.02781364694237709, + 0.03914901986718178, + -0.03439970687031746, + -0.04891003295779228, + -0.024022068828344345, + -0.0370236374437809, + 0.013867463916540146, + -0.016596350818872452, + 0.01887916773557663, + 0.03285158798098564, + -0.018157588317990303, + 0.0400673933327198, + 0.0074191587045788765, + -0.04940858110785484, + -0.05163891986012459, + -0.0639713853597641, + -0.07992487400770187, + 0.00896727666258812, + 0.0027862845454365015, + -0.035449277609586716, + -0.023116813972592354, + -0.019312117248773575, + -0.020833995193243027, + -0.0075831543654203415, + -0.06622796505689621, + 0.002469773171469569, + 0.06213463470339775, + 0.005060902796685696, + -0.012398064136505127, + -0.013880583457648754, + 0.00010823706543305889, + 0.026409843936562538, + -0.005074022337794304, + -0.04410824552178383, + 0.00833097379654646, + -0.009144391864538193, + -0.026344245299696922, + 0.010023408569395542, + -0.035527996718883514, + 0.022001642733812332, + -0.03403235599398613, + -0.022618267685174942, + -0.0014792399015277624, + 0.022093480452895164, + 0.009977489709854126, + -0.00896727666258812, + 0.07525428384542465, + -0.02067655883729458, + -0.0169112216681242, + -0.023562882095575333, + 0.02736757881939411, + 0.018498698249459267, + 0.010863065719604492, + 0.03857175633311272, + 0.009583900682628155, + 0.0067828563041985035, + -0.031723301857709885, + 0.0023238169960677624, + -0.005953038576990366, + 0.01901036500930786, + -0.05730660632252693, + -0.05788386985659599, + -0.01412985660135746, + -0.04429192095994949, + -0.014982634223997593, + -0.017226092517375946, + -0.036682527512311935, + 0.010167724452912807, + 0.030490053817629814, + -0.022828180342912674, + 0.05198002979159355, + 0.0052872165106236935, + 0.05352814868092537, + 0.04080209508538246, + -0.055522333830595016, + -0.003130675060674548, + -0.049172427505254745, + 0.041221924126148224, + 0.004447559360414743, + -0.019600749015808105, + 0.031146036460995674, + 0.02665911801159382, + -0.015822291374206543, + -0.0009118152665905654, + 0.004122848156839609, + -0.05536489933729172, + 0.05221618339419365, + -0.0012291467282921076, + 0.00034726058947853744, + 0.0538954995572567, + 0.024756768718361855, + 0.028574585914611816, + 0.007360120303928852, + 0.003252031747251749, + -0.03636765480041504, + -0.03009646385908127, + -0.01435289066284895, + -0.011394411325454712, + 0.007471637334674597, + -0.016307717189192772, + -0.008514649234712124, + 0.03896534442901611, + 0.027787405997514725, + 0.022762583568692207, + 0.033927399665117264, + -0.0011807680130004883, + 0.016242120414972305, + 0.025858819484710693, + -0.004352441988885403, + 0.06276437640190125, + 0.009439583867788315, + 0.01351323351264, + 0.004001491703093052, + 0.01105985976755619, + -0.021896686404943466, + -0.04602371156215668, + -0.01288349088281393, + -0.03634141385555267, + 0.03256295621395111, + 0.04287499934434891, + 0.03332389518618584, + -0.031067317351698875, + 0.0007162505644373596, + -0.04688961058855057, + -0.021844208240509033, + 0.03416355326771736, + 0.03896534442901611, + -0.010935223661363125, + -0.021489977836608887, + 0.01142721064388752, + 0.033927399665117264, + 0.014825197868049145, + -0.01822318695485592, + -0.027918603271245956, + 0.033481333404779434, + 0.06307925283908844, + -0.00770123116672039, + 0.01576981320977211, + -0.033481333404779434, + -0.03699739649891853, + 0.009282148443162441, + 0.0186298955231905, + 0.05213746801018715, + 0.0031962734647095203, + 0.0010503915837034583, + -0.03930645436048508, + 0.003906374331563711, + 0.009754455648362637, + 0.011558406986296177, + 0.030988600105047226, + -0.01675378531217575, + 0.019771303981542587, + -0.0069074928760528564, + -0.0045951553620398045, + -0.045682601630687714, + -0.033481333404779434, + -0.003794857067987323, + -0.03941141068935394, + -0.018315022811293602, + -0.06339412182569504, + -0.028968174010515213, + -1.984602386073675e-05, + 0.007123966701328754, + 0.03576415032148361, + -0.018708612769842148, + -0.032169368118047714, + 0.013959301635622978, + 0.033192701637744904, + -0.010712189599871635, + 0.030857402831315994, + 0.010272681713104248, + 0.03849303722381592, + 0.010705629363656044, + -0.04628610610961914, + -0.07913769781589508, + 0.03707611560821533, + 0.06113754212856293, + 0.00874424260109663, + 0.028653303161263466, + -0.014484087005257607, + -0.04442311450839043, + 0.008829521015286446, + -0.05657190829515457, + 0.008593367412686348, + -0.0438196137547493, + -0.006887813098728657, + 0.09094537794589996, + 0.04219277575612068, + -0.030201422050595284, + -0.017685281112790108, + 0.007019009906798601, + 0.010108686052262783, + 0.027839886024594307, + 0.0042146858759224415, + -0.020755277946591377, + 0.007399479392915964, + -0.036630045622587204, + 0.043478500097990036, + -0.008442491292953491, + -0.016740666702389717, + 0.014917035587131977, + -0.011709282174706459, + -0.047650549560785294, + 0.006356467492878437, + -0.015507419593632221, + -0.02399582974612713, + -0.03539679944515228, + 0.012050393037497997, + -0.03723355010151863, + -0.0008052181801758707, + -0.05040567368268967, + 0.033560048788785934, + -0.012378384359180927, + -0.015035112388432026, + 0.04080209508538246, + -0.017501605674624443, + 0.0703737735748291, + 0.04828029125928879, + 0.02142437919974327, + -0.03964756429195404, + -0.03502945229411125, + 0.0014849797589704394, + 0.0015210587298497558, + -0.040487222373485565, + 0.008881999179720879, + -0.004234365187585354, + -0.020571602508425713, + 0.004047410096973181, + 0.027997320517897606, + 0.03985748067498207, + 0.05087798088788986, + 0.01752784475684166, + 0.022920018061995506, + 0.03337637707591057, + 0.033192701637744904, + 0.04148431494832039, + 0.0021827807649970055, + -0.011879838071763515, + 0.025124119594693184, + 0.07173821330070496, + 0.03277287259697914, + -0.0285483468323946, + -0.03117227554321289, + 0.005051062908023596, + 0.020781517028808594, + 0.005352814681828022, + 0.0023582561407238245, + 0.04715200141072273, + 0.01130257360637188, + 0.019968098029494286, + -0.02904689311981201, + 0.004762431140989065, + -0.019194040447473526, + -0.04862140119075775, + -0.01752784475684166, + 0.000317126396112144, + 0.027997320517897606, + 0.03224808722734451, + -0.0033356696367263794, + 0.025793220847845078, + 0.009957809932529926, + 0.006044876296073198, + 0.00708460807800293, + 0.02059784159064293, + 0.04111696407198906, + 0.005064182914793491, + -0.0438983291387558, + -0.034216031432151794, + 0.023208651691675186, + -0.028023559600114822, + -0.01159120537340641, + -0.050274476408958435, + -0.02744629606604576, + -0.03195945546030998, + 0.03765337914228439, + -0.03198569267988205, + 0.0009396945242770016, + -0.003680060151964426, + 0.042612604796886444, + 0.044003285467624664, + -0.01924651861190796, + -0.03605278208851814, + -0.04767678678035736, + -0.009183751419186592, + -0.0055988081730902195, + -0.03185449540615082, + -0.014142977073788643, + 0.023208651691675186, + -0.025281554087996483, + -0.005818562116473913, + -0.017947673797607422, + -0.05541737750172615, + 0.0406184196472168, + 0.027839886024594307, + -0.0013062246143817902, + -0.0060514360666275024, + -0.011341932229697704, + 0.007373240310698748, + 0.007989863865077496, + -0.0572541281580925, + 0.002435334026813507, + -0.03825688362121582, + 0.0023434965405613184, + 0.03426850959658623, + -0.0040900493040680885, + 0.016478274017572403, + -0.02092583291232586, + -6.303578993538395e-05, + 0.011748641729354858, + -0.011263214983046055, + -0.025701383128762245, + 0.015664855018258095, + 0.011420650407671928, + -0.012148790992796421, + -0.002699366770684719, + 0.02318241074681282, + 0.01851181872189045, + 0.022631386294960976, + -0.01880045048892498, + -0.014024900272488594, + 0.002605889458209276, + -0.0020171452779322863, + -0.007425718940794468, + 0.008153858594596386, + -0.0041982862167060375, + 0.0070386892184615135, + -0.023694077506661415, + -0.02555706724524498, + -0.03584286943078041, + -0.020138654857873917, + -0.026436083018779755, + 0.013683789409697056, + 0.024113906547427177, + 0.018656134605407715, + -0.0337437242269516, + -0.003545583924278617, + -0.03416355326771736, + -0.0029453602619469166, + -0.019561389461159706, + 0.034557145088911057, + -0.03875542804598808, + -0.041012007743120193, + 0.02497980371117592, + -0.03883414715528488, + 0.006477824412286282, + 0.0047427513636648655, + 0.0108565054833889, + -0.032536718994379044, + 0.00023881852393969893, + 0.02944048121571541, + -0.02839091047644615, + 0.01876109093427658, + 0.03096236102283001, + 0.023536641150712967, + 0.0011545286979526281, + 0.030542531982064247, + -0.0037784576416015625, + -0.0015915768453851342, + 0.017790237441658974, + 0.015100711025297642, + 0.017357289791107178, + 0.010371078737080097, + 0.05237362161278725, + -0.05051063001155853, + -0.04211405664682388, + -0.022723224014043808, + 0.004385241307318211, + 0.003147074719890952, + -0.016688188537955284, + 0.006005517207086086, + -0.015376223251223564, + 0.006881253328174353, + 0.024599332362413406, + 0.0027994040865451097, + 0.02215907908976078, + 0.021962285041809082, + 0.02486172690987587, + -0.014549685642123222, + 0.01982378214597702, + 0.02563578449189663, + 0.005880880635231733, + -0.006359747610986233, + -0.013880583457648754, + -0.007930825464427471, + 0.03526560589671135, + -0.0012152070412412286, + 0.037627141922712326, + -0.008107940666377544, + -0.00016409804811701179, + -0.027866125106811523, + -0.0037554982118308544, + 0.00312247546389699, + -0.0436621755361557, + 0.0029551999177783728, + -0.020020578056573868, + 0.003258591750636697, + -0.027105186134576797, + -0.037128593772649765, + -0.001999105792492628, + -0.03746970370411873, + -0.01449720747768879, + 0.01945643313229084, + 0.011466569267213345, + 0.016268359497189522, + -0.02928304672241211, + -0.01708177663385868, + -0.006586061324924231, + 0.00821289699524641, + -0.016360197216272354, + -0.0058710407465696335, + 0.024428777396678925, + -0.06386642903089523, + 0.016766905784606934, + -0.029729114845395088, + -0.006750056985765696, + 0.002696086885407567, + -0.04767678678035736, + 0.016898101195693016, + -0.016858743503689766, + 0.0023041374515742064, + -0.04324234649538994, + -0.037574660032987595, + -0.046469781547784805, + 0.025504589080810547, + -0.032169368118047714, + 0.017186734825372696, + 0.007812748663127422, + 0.017029298469424248, + 0.014208574779331684, + 0.054157890379428864, + -0.008914798498153687, + -0.015153189189732075, + -0.023746555671095848, + 0.03607902303338051, + 0.019640108570456505, + -0.06460113078355789, + -0.005156020168215036, + 0.03146090731024742, + 0.0038079768419265747, + 0.03862423449754715, + -0.00043827813351526856, + -0.03489825502038002, + -0.008534329012036324, + 0.04602371156215668, + -0.01048259623348713, + -0.011578085832297802, + -0.010023408569395542, + 0.024887965992093086, + -0.0040670898742973804, + -0.029912788420915604, + -0.045813798904418945, + -0.021161986514925957, + 0.009656058624386787, + -0.007930825464427471, + 0.03731226921081543, + -0.023930231109261513, + -0.02441565878689289, + -0.006736937444657087, + -0.008626165799796581, + 0.04518405348062515, + 0.0535806268453598, + 0.023116813972592354, + -0.017868956550955772, + 0.03314022347331047, + 0.01416921615600586, + -0.019430194050073624, + -0.0775633379817009, + 0.0032126728910952806, + -0.04715200141072273, + 0.002135222079232335, + -0.02461245283484459, + 0.006789416074752808, + 0.012181589379906654, + 0.006208871491253376, + -0.005949758924543858, + 0.021083269268274307, + 0.00941990502178669, + 0.013152443803846836, + 0.057201649993658066, + 0.0021860606502741575, + 0.02273634448647499, + -0.03644637390971184, + -0.019141560420393944, + 0.030621249228715897, + -0.009977489709854126, + 0.0027174062561243773, + 0.013801866210997105, + -0.010941782966256142, + 0.00395229272544384, + -0.01609780453145504, + 0.028889456763863564, + -0.010987701825797558, + -0.027105186134576797, + 0.03353381156921387, + -0.02617369033396244, + 0.010954903438687325, + 0.005165860056877136, + -0.02133254148066044, + 0.03287782892584801, + 0.019810663536190987, + 0.03878166899085045, + 0.020624080672860146, + 0.031880736351013184, + -0.005113381426781416, + -0.03161834180355072, + -0.006940291728824377, + 0.03875542804598808, + 0.006162953097373247, + 0.005939919035881758, + -0.020296089351177216, + 0.008691764436662197, + 0.04109072685241699, + -0.01986314170062542, + -0.03466210141777992, + -0.01638643629848957, + 0.0473356768488884, + -0.030201422050595284, + 0.011433769948780537, + -0.039017822593450546, + 0.012240627780556679, + -0.05263601243495941, + -0.01584853045642376, + -0.052898406982421875, + 0.013565712608397007, + -0.027656210586428642, + 0.021358780562877655, + -0.022946257144212723, + -0.007248603738844395, + -0.02768244966864586, + 0.020938951522111893, + 0.0009347746381536126, + -0.012745734304189682, + -0.005270817317068577, + -0.010141485370695591, + 0.025124119594693184, + 0.01478583924472332, + 0.006894373334944248, + -0.025950657203793526, + -0.0020466644782572985, + 0.009150952100753784, + -0.022054122760891914, + -0.012634217739105225, + -0.016320837661623955, + -0.03600030392408371, + -0.01332955900579691, + -0.006723817903548479, + -0.0012947448994964361, + -0.00790458545088768, + 0.02661975845694542, + 0.03563295304775238, + 0.04256012663245201, + -0.03030637837946415, + -0.006264630239456892, + 0.014011779800057411, + -0.022434592247009277, + 0.005920239724218845, + -0.05051063001155853, + 0.006776296533644199, + 0.0017662320751696825, + -0.04111696407198906, + 0.003565263468772173, + -0.043268587440252304, + -0.008409691974520683, + 0.020414166152477264, + 0.027183903381228447, + -0.011000821366906166, + -0.005165860056877136, + -0.024953562766313553, + 0.01621588133275509, + 0.005825121887028217, + -0.05966814234852791, + 0.03153962641954422, + 0.0004011741257272661, + 0.039463888853788376, + 0.028810739517211914, + -0.01117793656885624, + 0.014602163806557655, + 0.02891569584608078, + 0.022552669048309326, + -0.02928304672241211, + 0.012188149616122246, + -0.04360969737172127, + 0.018603656440973282, + 0.018288783729076385, + 0.033560048788785934, + -0.04481670632958412, + -0.012975328601896763, + -0.017619682475924492, + -0.02040104754269123, + -0.009754455648362637, + -0.04295371472835541, + -0.004103168845176697, + -0.006379426922649145, + 0.004513157531619072, + -0.014024900272488594, + 0.0037325387820601463, + -0.02281506173312664, + -0.02134566195309162, + 0.04206157848238945, + -0.016452034935355186, + -0.025950657203793526, + -0.034058596938848495, + 0.0005686545628122985, + 0.012253748252987862, + -0.03568543121218681, + -0.011223855428397655, + -0.005592248402535915, + -0.010253001935780048, + 0.008409691974520683, + 0.008672084659337997, + -0.022093480452895164, + -0.020086174830794334, + -0.023313608020544052, + -0.00790458545088768, + -0.025819459930062294, + -0.00970853678882122, + 0.04985464736819267, + 0.0024828927125781775, + -0.01003652811050415, + -0.0201124157756567, + 0.006549982354044914, + -0.011748641729354858, + 0.04242892935872078, + -0.009328067302703857, + 0.016333958134055138, + 0.02818099595606327, + -0.0012594858417287469, + 0.030647490173578262, + -0.004985464736819267, + -0.010476035997271538, + 0.0006043236353434622, + -0.012594858184456825, + -0.025281554087996483, + 0.01022020261734724, + -0.0201124157756567, + -0.020584722980856895, + -0.01698993891477585, + 0.03736474737524986, + 0.00597927812486887, + 0.01159120537340641, + 0.0018810289911925793, + 0.04914618656039238, + 0.028285954147577286, + -0.03993619605898857, + 0.044213201850652695, + -0.020624080672860146, + -0.0043786815367639065, + -0.02665911801159382, + -0.025622665882110596, + 0.038886625319719315, + -0.00876392237842083, + 0.055102504789829254, + 0.026186810806393623, + 0.02096519246697426, + -0.01876109093427658, + 0.06192472204566002, + -0.007432278711348772, + 0.02731509879231453, + -0.0005444652633741498, + -0.033192701637744904, + -0.03628893569111824, + 0.030542531982064247, + -0.03752218186855316, + 0.002837123116478324, + 0.0029371604323387146, + -0.016976820304989815, + -0.03167081996798515, + -0.00037144991802051663, + -0.013710028491914272, + -0.012870371341705322, + 0.02555706724524498, + -0.018419981002807617, + -0.002135222079232335, + -0.012155350297689438, + 0.06685771048069, + -0.009590459987521172, + 0.0268296729773283, + -0.02244771085679531, + -0.019482672214508057, + 0.0369449183344841, + -0.01412985660135746, + -0.006687738932669163, + -0.02134566195309162, + 0.02395647019147873, + 0.028154756873846054, + 0.0033684687223285437, + -0.04754558950662613, + 0.040775854140520096, + -0.015166308730840683, + 0.006284309551119804, + -0.0010471115820109844, + 0.010823706164956093, + 0.05009080097079277, + -0.0040670898742973804, + -0.022959377616643906, + -0.03765337914228439, + 0.012234068475663662, + -0.004814909305423498, + -0.013801866210997105, + 0.01895788684487343, + -0.013080285862088203, + -0.005093702115118504, + -0.04185166582465172, + 0.010659711435437202, + 0.0038965344429016113, + -0.0021713010501116514, + -0.03484577685594559, + -0.010043087415397167, + 0.028233474120497704, + 0.030699968338012695, + -0.0016596349887549877, + -0.03841431811451912, + -0.010180843994021416, + 0.008593367412686348, + -0.019548270851373672, + -0.005575848743319511, + 0.010298920795321465, + 0.03568543121218681, + -0.014943274669349194, + -0.029388003051280975, + -0.013388597406446934, + -0.005529929883778095, + 0.03146090731024742, + 0.042166538536548615, + 0.00854088831692934, + 0.014864557422697544, + 0.03628893569111824, + -0.018616775050759315, + -0.024389419704675674, + -0.019180919975042343, + -0.00675661675632, + -0.0008863959810696542, + 0.014366010203957558, + -0.011683043092489243, + -0.0016071564750745893, + 0.02113574743270874, + 0.010312040336430073, + -0.009052555076777935, + 0.024271342903375626, + 0.022513309493660927, + 0.03621022030711174, + -0.009610139764845371, + -0.045525167137384415, + -0.002822363516315818, + -0.013427956029772758, + 0.03644637390971184, + -0.005293776281177998, + 0.01868237368762493, + -0.03146090731024742, + -0.007235483732074499, + 0.014077378436923027, + -0.03248424082994461, + 0.0026829673442989588, + -0.06155737116932869, + 0.008265376091003418, + 0.018734851852059364, + 0.011551846750080585, + 0.023812154307961464, + -0.00814729928970337, + 0.0022483791690319777, + 0.003742378670722246, + -0.002938800258561969, + -0.02040104754269123, + 0.022539548575878143, + -0.020020578056573868, + 0.023077454417943954, + 0.008206337690353394, + 0.02875826135277748, + 0.010377638973295689, + -0.022106600925326347, + -0.0030798364896327257, + -0.005103541538119316, + -0.020296089351177216, + 0.02744629606604576, + 0.0570966936647892, + 0.034425947815179825, + -0.00227789836935699, + 0.011847038753330708, + 0.014484087005257607, + -0.005920239724218845, + -0.044055767357349396, + -0.01048259623348713, + 0.005018264055252075, + -0.007123966701328754, + 0.011866718530654907, + 0.012260307557880878, + 0.02330048754811287, + 0.00044483793317340314, + 0.05192755162715912, + -0.018157588317990303, + -0.023772794753313065, + -0.012955648824572563, + -9.7013617050834e-05, + 0.018000151962041855, + -0.009977489709854126, + 0.007438838481903076, + -0.008094820193946362, + 0.024966683238744736, + 0.011446889489889145, + -0.010784347541630268, + 0.004778830334544182, + -0.029151849448680878, + 0.004001491703093052, + -0.021371901035308838, + -0.01128289382904768, + 0.01569109410047531, + 0.017960792407393456, + -0.02547834999859333, + -0.02568826451897621, + 0.018078869208693504, + 0.01191919669508934, + -0.020794635638594627, + 0.0602978840470314, + 0.026344245299696922, + 0.034872014075517654, + -0.020243611186742783, + 0.002141781849786639, + -0.025176597759127617, + 0.006412226241081953, + -0.0070386892184615135, + -0.03972628340125084, + -0.017173614352941513, + -0.015126950107514858, + 0.004926426336169243, + 0.0435047410428524, + 0.017226092517375946, + 0.0013882223283872008, + 0.023851513862609863, + -0.01563861593604088, + 0.005421692971140146, + 0.01150592789053917, + -0.01592724770307541, + 0.004936266224831343, + 0.022631386294960976, + 0.01405113935470581, + 0.026593519374728203, + -0.03739098832011223, + 0.005972717888653278, + 0.03306150436401367, + -0.0367874838411808, + -0.027498774230480194, + -0.00856056809425354, + -0.0012053673854097724, + -0.017947673797607422, + -0.01394618209451437, + -0.009019755758345127, + -0.050274476408958435, + 0.00015651325520593673, + 0.001838390133343637, + 0.01405113935470581, + -0.0029191209468990564, + 0.003273351350799203, + 0.024638691917061806, + -0.023366086184978485, + 0.0013382036704570055, + 0.005943198688328266, + 0.008593367412686348, + 0.0036243018694221973, + -0.002117182593792677, + -0.02187044732272625, + 0.02503228187561035, + -0.015153189189732075, + -0.0026714876294136047, + -0.019718825817108154, + -0.0038571753539144993, + -0.007012450136244297, + -0.02825971320271492, + 0.016005966812372208, + -0.002405814826488495, + -0.008153858594596386, + -0.019508911296725273, + -0.015546778216958046, + 0.01752784475684166, + -0.00035648533958010375, + 3.320910036563873e-05, + -0.0023992550559341908, + 0.005956318695098162, + -0.004860828164964914, + -0.013631310313940048, + 0.00734044099226594, + 0.0018154308199882507, + 0.019758185371756554, + -0.02076839655637741, + -0.0032077529467642307, + 0.001958106877282262, + 0.05302960425615311, + 0.009393665008246899, + 0.016898101195693016, + -0.046627216041088104, + 0.017094897106289864, + 0.023405445739626884, + 0.048673879355192184, + 0.011230415664613247, + -0.003302870551124215, + -0.03600030392408371, + -0.002430414082482457, + -0.011440330184996128, + -0.014798958785831928, + 0.007307642139494419, + -0.01982378214597702, + 0.00591695960611105, + 0.005497131031006575, + -0.044501833617687225, + 0.015415581874549389, + -0.003827656153589487, + -0.01932523585855961, + 0.006572941783815622, + 0.0015423782169818878, + -0.020020578056573868, + 0.011578085832297802, + -0.015310624614357948, + 0.015363103710114956, + 0.007045248989015818, + -0.02661975845694542, + -0.02068967930972576, + 0.026632878929376602, + 0.0038112567272037268, + -0.025137238204479218, + 0.0017645921325311065, + -0.02744629606604576, + -0.0201124157756567, + 0.01384122483432293, + 0.012115991674363613, + -0.017055537551641464, + -0.025425869971513748, + -0.008468730375170708, + 0.005792323034256697, + -0.0029027212876826525, + 0.011820799671113491, + -0.001119269640184939, + -0.032667916268110275, + -0.007615953683853149, + -0.04193038493394852, + -0.012942529283463955, + -0.010928663425147533, + -0.013696908950805664, + 0.01056787371635437, + 0.011617445386946201, + -0.03059501014649868, + -0.03169706091284752, + 0.03568543121218681, + -0.022880660369992256, + -0.0005563549348153174, + 0.0032257926650345325, + -0.016268359497189522, + -0.03243176266551018, + 0.02752501331269741, + 0.014641523361206055, + -0.010508835315704346, + 0.019954979419708252, + -0.01949579082429409, + 0.01306716538965702, + 0.016937460750341415, + -0.02928304672241211, + 0.007589714135974646, + -0.014877676963806152, + -0.017186734825372696, + 0.00782586820423603, + 0.004336042329668999, + -0.04439687728881836, + -0.02428446151316166, + -0.018039511516690254, + -0.009393665008246899, + -0.003384868148714304, + -0.00983317382633686, + 0.015310624614357948, + 0.027183903381228447, + 0.00506746256724, + -0.01716049574315548, + -0.043478500097990036, + -0.010725309140980244, + -0.006300709210336208, + -0.02654104121029377, + -0.07252539694309235, + -0.002996198832988739, + -0.014707121066749096, + -0.0303850956261158, + 0.011361612007021904, + 0.028023559600114822, + 0.0010840105824172497, + -0.01716049574315548, + 0.02920432761311531, + -0.0201124157756567, + 0.009780694730579853, + -0.03707611560821533, + 0.00367022049613297, + 0.0013054045848548412, + -0.02162117324769497, + 0.002661647740751505, + -0.028285954147577286, + 0.00968885701149702, + -0.0067828563041985035, + -0.007497876882553101, + 0.01588789001107216, + -0.017763998359441757, + 0.009439583867788315, + 0.014628403820097446, + 0.008206337690353394, + -0.00991189107298851, + -0.00010239472612738609, + 0.007812748663127422, + 0.013959301635622978, + -0.02314305305480957, + -0.026632878929376602, + 0.0008888558950275183, + -0.022592026740312576, + 0.017016177996993065, + -0.013775626197457314, + -0.019968098029494286, + 0.022657625377178192, + -0.028600824996829033, + 0.007373240310698748, + 0.01286381110548973, + -0.004732911940664053, + -0.02269698493182659, + -0.009373986162245274, + -0.020873354747891426, + 0.020860234275460243, + 0.025976896286010742, + 0.006776296533644199, + -0.017212973907589912, + -0.0031454346608370543, + 0.001977786421775818, + -0.0014530005864799023, + 0.006986210588365793, + 0.00591695960611105, + -0.03235304355621338, + 0.01097458228468895, + 0.018013272434473038, + -0.0017498325323686004, + 0.0006059635779820383, + -0.009341186843812466, + 0.012214388698339462, + 0.014733361080288887, + -8.461145625915378e-05, + 0.004723072052001953, + 0.0025993294548243284, + 0.0035390241537243128, + 0.01756720431149006, + 0.0025878497399389744, + 0.004119568504393101, + -0.020374808460474014, + 0.02547834999859333, + 0.00198106630705297, + -0.024717409163713455, + -0.021240703761577606, + -0.030726207420229912, + -0.0012307866709306836, + 0.01716049574315548, + 0.003975252155214548, + 0.002469773171469569, + -0.012135671451687813, + 0.026265528053045273, + 0.005903840065002441, + -0.024586213752627373, + -0.03592158481478691, + -0.01332955900579691, + 0.0017629521898925304, + 0.01719985343515873, + -0.013165563344955444, + -0.010193963535130024, + -0.0019285876769572496, + 0.010423557832837105, + -0.003850615583360195, + -0.028207235038280487, + -0.05405293405056, + -0.03867671266198158, + -0.037705857306718826, + -0.0006941111641936004, + -0.0108565054833889, + -0.0032274324912577868, + -0.02105702832341194, + -0.01489079650491476, + 0.016124043613672256, + 0.02518971636891365, + 0.01613716222345829, + 0.007753709796816111, + 0.006399106699973345, + -0.02588505856692791, + 0.012437422759830952, + 2.0115079678362235e-05, + 0.002968319458886981, + -0.03251047804951668, + 0.012909729965031147, + 0.007268283050507307, + 0.017685281112790108, + -0.007681551855057478, + -0.022749463096261024, + -0.00983317382633686, + -0.016648828983306885, + -0.024835485965013504, + -0.042166538536548615, + -0.018328143283724785, + -0.00449347821995616, + 0.006789416074752808, + -0.011879838071763515, + -0.005290496628731489, + 0.010449796915054321, + 0.005005144514143467, + -0.03300902619957924, + -0.011145138181746006, + 8.090874871413689e-06, + 0.026895271614193916, + 0.009846293367445469, + -0.016491392627358437, + 0.0058021629229187965, + 0.006576221901923418, + 0.012660456821322441, + 0.024599332362413406, + -0.02256578765809536, + 0.02129318192601204, + -0.012063512578606606, + 0.0009651138680055737, + -0.02702646702528, + 0.0014612004160881042, + -0.023969590663909912, + -0.002886321861296892, + 0.015664855018258095, + 0.032956548035144806, + 0.0203092098236084, + -0.0009208350675180554, + 0.01507447101175785, + -0.04738815501332283, + -0.006789416074752808, + -0.015861650928854942, + 0.030699968338012695, + 0.037049874663352966, + 0.009118152782320976, + 0.005165860056877136, + 0.021765489131212234, + -0.01986314170062542, + -0.010954903438687325, + 0.005493850912898779, + 0.01818382740020752, + -0.003411107463762164, + -0.018905406817793846, + 0.016307717189192772, + -0.015599257312715054, + 0.011105778627097607, + -0.010915543884038925, + 0.0335862897336483, + -0.013552593067288399, + -0.009610139764845371, + -0.008573687635362148, + 0.01109921932220459, + 0.01818382740020752, + 0.01818382740020752, + 0.010987701825797558, + 0.003712859470397234, + -0.016858743503689766, + 0.001557957730256021, + -0.029965268447995186, + -0.008613046258687973, + 0.007143646478652954, + -0.01224718801677227, + -0.004683712963014841, + -0.01654387079179287, + 0.03783705458045006, + 0.02326112985610962, + -0.018170706927776337, + -0.02486172690987587, + 0.009190310724079609, + 0.018275665119290352, + -0.01478583924472332, + -0.00991189107298851, + 0.011755201034247875, + -0.0013726428151130676, + 0.01540246233344078, + -0.01638643629848957, + 0.00680909538641572, + 0.010797467082738876, + -0.02781364694237709, + 0.040565941482782364, + -0.02825971320271492, + 0.0036472610663622618, + 0.020702797919511795, + 0.02862706407904625, + -0.008186657913029194, + 0.0005723444628529251, + -0.016780024394392967, + 0.02167365327477455, + -0.004040850326418877, + -0.04140559583902359, + -0.024914205074310303, + 0.018196946009993553, + -0.020624080672860146, + 0.03195945546030998, + 0.012581738643348217, + -0.029755353927612305, + 0.01588789001107216, + -0.014090497978031635, + 0.005736564286053181, + -0.003384868148714304, + 0.028076039627194405, + 0.0026091693434864283, + 0.013277079910039902, + -0.016635708510875702, + 0.0018039511051028967, + -0.022670745849609375, + 0.02694774977862835, + 0.012752294540405273, + -0.011932316236197948, + 0.0016383156180381775, + 0.02789236418902874, + 0.014444728381931782, + -0.006582781672477722, + -0.009373986162245274, + 0.014392250217497349, + -5.124861218064325e-06, + 0.001425941358320415, + 6.59825855109375e-06, + 0.018341263756155968, + 0.0013308238703757524, + -0.021450618281960487, + 0.04287499934434891, + -0.00962325930595398, + -0.027734927833080292, + -0.026737835258245468, + 0.021398140117526054, + 0.016491392627358437, + -0.028128517791628838, + -0.03127723187208176, + 0.013178682886064053, + 0.021148866042494774, + -0.01986314170062542, + 0.004552516620606184, + -0.008573687635362148, + -0.008914798498153687, + -0.010987701825797558, + 0.004122848156839609, + -0.0169112216681242, + -0.04132688045501709, + -0.027131425216794014, + 0.010705629363656044, + -0.01351323351264, + -0.05218994617462158, + -0.00016266308375634253, + 0.055679772049188614, + 0.007484757341444492, + -0.006169512867927551, + -0.018039511516690254, + 0.00416548689827323, + -0.00035402539651840925, + 0.020794635638594627, + -0.025124119594693184, + -0.02453373558819294, + -0.034425947815179825, + -0.027393817901611328, + -0.038073208183050156, + -0.02482236735522747, + -0.012621098197996616, + -0.01797391287982464, + 0.0040506902150809765, + -0.031880736351013184, + 0.01851181872189045, + 0.0033881482668220997, + 0.01822318695485592, + -0.027918603271245956, + -0.02215907908976078, + 0.008593367412686348, + -0.011309133842587471, + -0.007806188426911831, + -0.02068967930972576, + -0.018367502838373184, + -0.05171763896942139, + -0.009000075981020927, + -0.01731793023645878, + -0.029886549338698387, + -0.03314022347331047, + -0.03841431811451912, + 0.009203430265188217, + -0.027577493339776993, + 0.0005178159917704761, + -0.0027502053417265415, + ], + "index": 13, + }, + { + "title": "Clovis culture", + "text": 'The Clovis culture is a prehistoric Paleo-Indian culture, named after distinct stone tools found at sites near Clovis, New Mexico, in the 1920s and 1930s. The Clovis culture appears around 11,500\u201311,000 uncal RCYBP (uncalibrated radiocarbon years before present), at the end of the last glacial period, and is characterized by the manufacture of "Clovis points" and distinctive bone and ivory tools.', + "vector": [ + -0.06872909516096115, + -0.0008887971634976566, + -0.02674921229481697, + 0.011020402424037457, + -0.04705677554011345, + -0.027977492660284042, + 0.042880624532699585, + -0.032617662101984024, + -0.004844882525503635, + 0.031553152948617935, + -0.008011115714907646, + 0.019993670284748077, + -0.030270282179117203, + -0.008434190414845943, + 0.05205178260803223, + 0.04389054328203201, + -0.022013509646058083, + -0.004012381657958031, + 0.005121245980262756, + -0.008898206986486912, + -0.0004077207704540342, + -0.04329004883766174, + 0.017455225810408592, + -0.022805066779255867, + 0.028059376403689384, + 0.025957653298974037, + -0.022040804848074913, + -0.011695955879986286, + -0.04189800098538399, + -0.014097926206886768, + 0.04588308557868004, + -0.009901302866637707, + 0.036657337099313736, + 0.04375406727194786, + -0.01892916113138199, + 0.0113957105204463, + 0.026558145880699158, + 0.006462118122726679, + 0.026544498279690742, + 0.00049813580699265, + -0.02107182703912258, + 0.015749281272292137, + 0.03630250319838524, + 0.02692662924528122, + 0.00950552336871624, + -0.0002761497744359076, + 0.010958988219499588, + -0.009382694959640503, + 0.01079521793872118, + -0.03799479827284813, + 0.0318806916475296, + -0.0322355292737484, + -0.03971439227461815, + -0.02664003148674965, + 0.03597496077418327, + -0.02391052059829235, + 0.01415251661092043, + 0.04924038425087929, + -0.028605278581380844, + -0.032044462859630585, + -0.008420542813837528, + 0.01174372248351574, + 0.01281505636870861, + -0.011061345227062702, + 0.03002462536096573, + 0.04539177566766739, + 0.030461346730589867, + 0.012746818363666534, + 0.020744286477565765, + 0.009826241061091423, + 0.007860993035137653, + 0.010993107222020626, + 0.04031488299369812, + -0.00026889951550401747, + -0.0028199264779686928, + -0.007710869889706373, + -0.011518537998199463, + -0.005673971958458424, + -0.01838325895369053, + 0.015872107818722725, + 0.0057046785950660706, + 0.023391911759972572, + 0.013238130137324333, + 0.00938951876014471, + 0.023118961602449417, + 0.057701870799064636, + 0.002408793894574046, + -0.05781105160713196, + 0.04672923684120178, + -0.01619965024292469, + 0.04842153191566467, + -0.04050594940781593, + -0.035456351935863495, + -0.0006120076286606491, + -0.0003008859930559993, + -0.009280338883399963, + 0.060485973954200745, + 0.00711720110848546, + -0.04762997478246689, + 0.012972002848982811, + -0.03534717112779617, + 0.04896743595600128, + 0.03794020786881447, + -0.04356300085783005, + -0.038950126618146896, + -0.033791352063417435, + 0.04924038425087929, + 0.03239930048584938, + -0.0637613832950592, + 0.03420077636837959, + -0.03935955464839935, + -0.016295183449983597, + 0.054754000157117844, + 0.005179247818887234, + 0.025711996480822563, + -0.0037326067686080933, + -0.0010431851260364056, + 0.0098057696595788, + -0.022122690454125404, + 0.012262330390512943, + -0.045173414051532745, + 0.004387689754366875, + 0.03897742182016373, + 0.002964931773021817, + -0.05000464990735054, + 0.016349773854017258, + 0.047438908368349075, + -0.006557651329785585, + -0.0024480305146425962, + -0.011382062919437885, + -0.030979953706264496, + 0.012719523161649704, + 0.014793951995670795, + -0.009457756765186787, + 0.08728977292776108, + -0.044518329203128815, + 0.012637637555599213, + 0.004435455892235041, + -0.020689696073532104, + 0.03062511794269085, + -0.028605278581380844, + 0.05270686373114586, + -0.003527893451973796, + 0.028687164187431335, + -0.028550690039992332, + -0.03168962895870209, + 0.014016040600836277, + 0.026503555476665497, + -0.004142033401876688, + -0.015244320966303349, + -0.02273683063685894, + -0.0181785449385643, + 0.0059639825485646725, + -0.015817519277334213, + -0.026448965072631836, + -0.021153712645173073, + 0.0073833283968269825, + -0.005438551306724548, + 0.04727513715624809, + -0.047957513481378555, + -0.018847275525331497, + 0.05101456865668297, + -0.006209638435393572, + -0.012262330390512943, + 0.02528892271220684, + -0.05126022547483444, + -0.027308762073516846, + -0.032017167657613754, + 0.004281920846551657, + 0.03422807157039642, + -0.01281505636870861, + 0.04320816695690155, + 0.014712066389620304, + -0.014657475985586643, + -0.015694690868258476, + 0.008038410916924477, + -0.033791352063417435, + 0.02887823060154915, + 0.023664863780140877, + 0.025302570313215256, + -0.013784032315015793, + 0.02749982662498951, + -0.005151952616870403, + -0.017960185185074806, + 0.027936549857258797, + 0.03521069511771202, + 0.001054273801855743, + 0.049758993089199066, + 0.013224482536315918, + -0.03531987592577934, + 0.016213297843933105, + -0.02127654105424881, + 0.02388322539627552, + 0.020553220063447952, + -0.006963666062802076, + 0.014875836670398712, + 0.0028847523499280214, + 0.021003590896725655, + -0.042334720492362976, + -0.010686037130653858, + 0.0029444603715091944, + -0.05715596675872803, + 0.01797383278608322, + 0.07626254856586456, + 0.004084031563252211, + 0.022573059424757957, + -0.007444742135703564, + 0.017728175967931747, + -0.049595221877098083, + -0.0173733402043581, + 0.03534717112779617, + 0.025793882086873055, + 0.00708990590646863, + 0.011006754823029041, + 0.02093535289168358, + -0.00711720110848546, + 0.023555682972073555, + -0.014016040600836277, + -0.033108972012996674, + 0.027677245438098907, + 0.03122561052441597, + 0.030242986977100372, + -0.021699614822864532, + -0.020034613087773323, + -0.06889286637306213, + -0.0026851568836718798, + -0.053143586963415146, + 0.047384317964315414, + -0.005919627845287323, + 0.01209855917841196, + 0.01565374806523323, + 0.0250296201556921, + 0.012958355247974396, + 0.03062511794269085, + 0.02299613319337368, + 0.03935955464839935, + 0.017468873411417007, + 0.027131343260407448, + 0.013845446519553661, + 0.04814857989549637, + 0.016377069056034088, + -0.008004291914403439, + -0.03531987592577934, + -0.01248751487582922, + -0.03567471355199814, + -0.015271616168320179, + -0.03005192056298256, + -0.032726842910051346, + -0.0455828420817852, + -0.012630813755095005, + 0.02208174765110016, + 0.03444643318653107, + 0.006318818777799606, + 0.08450566977262497, + 0.0272678192704916, + 0.005281604360789061, + 0.006953430362045765, + -0.018874570727348328, + 0.008625255897641182, + 0.041161030530929565, + 0.015517272055149078, + 0.0010679212864488363, + -0.040014635771512985, + 0.008748084306716919, + -0.02187703363597393, + 0.01267175655812025, + -0.022600354626774788, + -0.02526162751019001, + -0.006762364413589239, + -0.010617799125611782, + -0.018601620569825172, + -0.004592402838170528, + 0.022955190390348434, + -0.03750348836183548, + 0.0465654656291008, + 0.017305102199316025, + 0.012794584967195988, + 0.023978756740689278, + 0.016786495223641396, + 0.017878299579024315, + 0.008843616582453251, + 0.04031488299369812, + 0.021099122241139412, + -0.018601620569825172, + -0.008761731907725334, + 0.0010977754136547446, + -0.054835882037878036, + -0.038950126618146896, + 0.053007110953330994, + -0.01708674058318138, + -0.030979953706264496, + 0.011839255690574646, + -0.028605278581380844, + 0.00018530823581386358, + -0.03354569524526596, + 0.006137988530099392, + -0.03742160275578499, + 0.005302075762301683, + -0.021153712645173073, + -0.007622160483151674, + 0.04667464643716812, + -0.01927035115659237, + 0.043972428888082504, + -0.038813650608062744, + 0.09449568390846252, + -0.005012065172195435, + 0.016336126253008842, + -0.008229476399719715, + -0.030952658504247665, + -0.047957513481378555, + -0.06032220274209976, + -0.05491776764392853, + 0.006881780456751585, + -0.0007237470126710832, + 0.024824906140565872, + 0.004636757541447878, + -0.0065201204270124435, + 0.0041863881051540375, + -0.01846514455974102, + -0.005680795758962631, + -0.03234471008181572, + -0.0006034779362380505, + -0.047466203570365906, + 0.0025384456384927034, + 0.04102455452084541, + -0.04086078703403473, + 0.00011323207581881434, + -0.024238061159849167, + -0.05721055716276169, + -0.002125607104972005, + -0.029915444552898407, + -0.013047064654529095, + 0.03676651790738106, + -0.012153149582445621, + -0.017823709174990654, + 0.01645895279943943, + -0.03196257725358009, + 0.043426524847745895, + -0.007335561793297529, + -0.007171791046857834, + 0.04080619663000107, + 0.007356033194810152, + 0.0455828420817852, + 0.04473669081926346, + 0.018628915771842003, + -0.013859094120562077, + 0.021426664665341377, + -0.04465480521321297, + 0.011593599803745747, + -0.00475276168435812, + 0.0006491119274869561, + 0.03471938520669937, + -0.038295045495033264, + -0.07740893959999084, + -0.010181077755987644, + -0.018219487741589546, + 0.05617334321141243, + -0.018328668549656868, + 0.007901935838162899, + 0.05393514409661293, + -0.03002462536096573, + 0.010604151524603367, + 0.021481255069375038, + -0.005424903705716133, + -0.0369848795235157, + 0.00544878700748086, + -0.02904200181365013, + 0.008127120323479176, + -0.00555455544963479, + 0.01019472535699606, + -0.05278874933719635, + -0.009771650657057762, + -0.049758993089199066, + -0.0133882537484169, + -0.012078087776899338, + -0.017823709174990654, + 0.020225679501891136, + 0.004807352088391781, + 0.03073429875075817, + -0.012050792574882507, + -0.010160606354475021, + 0.07642631977796555, + 0.08101189881563187, + 0.06408892571926117, + 0.04877636954188347, + -0.01065191812813282, + -0.02648990787565708, + 0.007963349111378193, + -0.0449550524353981, + -0.05437186732888222, + 0.0019464828073978424, + -0.0449550524353981, + -0.001361343776807189, + 0.027117695659399033, + -0.015994936227798462, + -0.037749141454696655, + -0.04154316335916519, + 0.0024514424148947, + -0.02434724196791649, + 0.031553152948617935, + 0.0011003342224285007, + 0.04547366127371788, + 0.02062145806849003, + 0.0272678192704916, + 0.04140668734908104, + 0.021808795630931854, + -0.005496553611010313, + 0.023187199607491493, + 0.015530919656157494, + -0.04318087175488472, + 0.008249947801232338, + 0.02614871971309185, + 0.021890681236982346, + 0.009942245669662952, + -0.02062145806849003, + -0.008468309417366982, + -0.04664735123515129, + 0.03848611190915108, + -0.023951461538672447, + 0.0816669836640358, + -0.00445251539349556, + -0.022491173818707466, + -0.024319946765899658, + 0.03783102706074715, + -0.02520703710615635, + 0.03190798684954643, + 0.002705628052353859, + -0.005022300872951746, + 0.012078087776899338, + 0.012910588644444942, + -0.042307425290346146, + 0.05639170482754707, + 0.02893282100558281, + 0.09657011181116104, + 0.02004826068878174, + -0.046347104012966156, + -0.03245389088988304, + -0.012310096062719822, + -0.02156314067542553, + -0.010153782553970814, + 0.013183539733290672, + 0.011962084099650383, + -0.024156175553798676, + -0.015257968567311764, + -0.04945874586701393, + -0.04380865767598152, + -0.00820218212902546, + 0.019980022683739662, + 0.007976996712386608, + 0.02107182703912258, + 0.012439748272299767, + 0.05112374946475029, + 0.001148100709542632, + -0.0318806916475296, + -0.013340487144887447, + 0.029860854148864746, + 0.008427366614341736, + -0.01950235851109028, + 0.055354490876197815, + 0.016104117035865784, + 0.007758636027574539, + -0.024265356361865997, + 0.01685473322868347, + -0.01765993796288967, + -0.015203378163278103, + -0.02296883799135685, + 0.031034544110298157, + 0.03630250319838524, + -0.027417941018939018, + -0.014698418788611889, + 0.020007317885756493, + -0.014684771187603474, + -0.049595221877098083, + 0.026858391240239143, + -0.000957034935709089, + -0.05448104813694954, + 0.020867114886641502, + -0.017496168613433838, + -0.0058923326432704926, + -0.013524728827178478, + -0.00911656767129898, + -0.007854169234633446, + -0.008618432097136974, + 0.07140401750802994, + 0.0027892193756997585, + 0.04588308557868004, + -0.04984087869524956, + -0.003449419979006052, + 0.01134112011641264, + 0.009007387794554234, + 0.021740557625889778, + 0.010283433832228184, + 0.022873304784297943, + 0.0024241472128778696, + -0.045692019164562225, + -0.02073063887655735, + -0.014398172497749329, + 0.007772283628582954, + -0.01682743802666664, + -0.009430461563169956, + -0.02557552233338356, + 0.011648190207779408, + 0.01877903752028942, + 0.0235966257750988, + -0.012446572072803974, + 0.01583116687834263, + 0.03794020786881447, + 0.029697084799408913, + 0.05813859403133392, + 0.017468873411417007, + -0.0602676123380661, + 0.02004826068878174, + -0.025984948500990868, + -0.0424439013004303, + 0.005902568344026804, + 0.006489413324743509, + 0.06583581119775772, + 0.015312558971345425, + -0.047957513481378555, + -0.006056103389710188, + 0.04096996784210205, + 0.009409990161657333, + -0.041734229773283005, + -0.04929497465491295, + 0.015640100464224815, + 0.014070631004869938, + 0.021453959867358208, + 0.017646290361881256, + 0.04009652137756348, + 0.011423004791140556, + -0.002163137774914503, + 0.014657475985586643, + -0.00202836818061769, + 0.008522898890078068, + 0.04596497118473053, + -0.023664863780140877, + 0.013135773129761219, + -0.00881632138043642, + -0.04148857295513153, + -0.027936549857258797, + 0.023269085213541985, + -0.006342702079564333, + 0.038376931101083755, + -0.022668592631816864, + 0.014439115300774574, + -0.005404432769864798, + -0.05748350918292999, + 0.0028028669767081738, + 0.006769188214093447, + -0.022927895188331604, + -0.007956525310873985, + 0.04877636954188347, + -0.0027704541571438313, + 0.03016110137104988, + 0.05371678248047829, + 0.021262893453240395, + 0.027199581265449524, + -0.0026766271330416203, + -0.011150053702294827, + 0.01508055068552494, + 0.0007531745359301567, + -0.030461346730589867, + 0.012132678180932999, + 0.0028676928486675024, + -0.012985650449991226, + -0.009307634085416794, + 0.011491242796182632, + 0.022013509646058083, + 0.0025179742369800806, + 0.010426733642816544, + 5.730907651013695e-05, + 0.026967572048306465, + -0.018819980323314667, + 0.00766310328617692, + 0.04135209694504738, + -0.03065241314470768, + -0.029424132779240608, + -0.019543301314115524, + -0.02494773454964161, + 0.03354569524526596, + -0.01276046596467495, + 0.0026561557315289974, + -0.021713262423872948, + -0.01711403578519821, + -0.02789560705423355, + 0.02331002801656723, + -0.04255308210849762, + 0.028277738019824028, + 0.02734970487654209, + -0.02044404111802578, + -0.011463947594165802, + 0.00851607508957386, + -0.010269786231219769, + 0.022286459803581238, + 0.01989813894033432, + 0.020976295694708824, + -0.017250511795282364, + 0.013900036923587322, + -0.031471267342567444, + -0.0028438097797334194, + 0.040560539811849594, + 0.011859727092087269, + 0.014834894798696041, + 0.025684701278805733, + 0.032644957304000854, + -0.0006930400268174708, + 0.010065073147416115, + -0.045118823647499084, + 0.012583047151565552, + -0.005414668004959822, + -0.011409357190132141, + -0.05841154232621193, + 0.010754275135695934, + -0.019857196137309074, + 0.014166164211928844, + -0.014957722276449203, + 0.0055067893117666245, + 0.0033368277363479137, + 0.033818647265434265, + -0.017537111416459084, + 0.038322340697050095, + 0.0659995824098587, + 0.0022194338962435722, + 0.03335462883114815, + 0.04326275736093521, + 0.00368142849765718, + -0.013258601538836956, + 0.0027329232543706894, + -0.01505325548350811, + 0.013354134745895863, + 0.010454028844833374, + -0.03119831532239914, + -0.015558214858174324, + 0.02414252795279026, + -0.006219874136149883, + -0.026448965072631836, + -0.02273683063685894, + -0.033764056861400604, + -0.045173414051532745, + -0.05442645773291588, + -0.04610144719481468, + -0.034937746822834015, + -0.04151586815714836, + -0.03534717112779617, + 0.00893232598900795, + 0.04031488299369812, + 0.0436994768679142, + 0.017141330987215042, + 0.003940732218325138, + -0.009191629476845264, + -0.008488780818879604, + -0.011177348904311657, + -0.016131412237882614, + 0.013340487144887447, + 0.01532620657235384, + 0.0051314812153577805, + 0.06720057129859924, + -0.018970103934407234, + -0.0004533547908067703, + 0.010133311152458191, + -0.007458389736711979, + -0.0030997013673186302, + -0.004312627948820591, + -0.024251708760857582, + -0.018396906554698944, + -0.002970049623399973, + 0.010140134952962399, + -0.0235966257750988, + 0.0029103416018188, + 0.03690299391746521, + -0.011927965097129345, + 0.01420710701495409, + -0.014875836670398712, + -0.020007317885756493, + 0.0013749913778156042, + 0.0010030954144895077, + -0.018315020948648453, + 0.012978826649487019, + 0.03862258791923523, + -0.009014211595058441, + -0.027158638462424278, + 0.010365319438278675, + 0.022927895188331604, + -0.025398103520274162, + -0.004397925455123186, + -0.01705944538116455, + 0.03935955464839935, + -0.05117833986878395, + -0.04724784195423126, + -0.005360078066587448, + 0.010740627534687519, + 0.009273515082895756, + -0.01614505983889103, + -0.011593599803745747, + -0.01529891137033701, + -0.01281505636870861, + -0.045664723962545395, + -0.02489314414560795, + 0.047384317964315414, + 0.017127683386206627, + -0.053034406155347824, + 0.02107182703912258, + 0.022777773439884186, + -0.0328633189201355, + 0.015872107818722725, + 0.010638270527124405, + -0.007185438647866249, + -0.007478861138224602, + -0.02365121617913246, + -0.02603953890502453, + 0.013272249139845371, + -0.00962152797728777, + 0.0019481887575238943, + -0.016554486006498337, + -0.02411523275077343, + -0.03815856948494911, + 0.010030954144895077, + 0.018833627924323082, + 0.0235966257750988, + 0.02471572533249855, + -0.018342316150665283, + 0.02898741140961647, + 0.048476122319698334, + 0.02015744149684906, + -0.0008333539590239525, + 0.04473669081926346, + 0.007055786903947592, + -0.027417941018939018, + -0.05494506284594536, + 0.004906296730041504, + -0.03294520080089569, + 0.00808617752045393, + 0.03559282794594765, + 0.010358495637774467, + 0.03515610843896866, + -0.012562575750052929, + 0.01366120483726263, + 0.026912981644272804, + 0.039523325860500336, + -0.029260361567139626, + 0.021754205226898193, + -0.021140065044164658, + -0.0005292693385854363, + -0.016936618834733963, + -0.012692227959632874, + -0.03750348836183548, + -0.004633345641195774, + 0.005766092799603939, + -0.030979953706264496, + -0.026448965072631836, + 0.017127683386206627, + -0.017646290361881256, + 0.01820584014058113, + 0.01752346381545067, + -0.021890681236982346, + -0.04045135900378227, + 0.012084911577403545, + -0.03242659568786621, + 0.016308831050992012, + 0.011839255690574646, + -0.02351474016904831, + -0.011327472515404224, + -0.010822512209415436, + -0.0004533547908067703, + 0.06752811372280121, + -0.033108972012996674, + 0.015667395666241646, + 0.015803871676325798, + -0.025220684707164764, + 0.03398241847753525, + 0.024265356361865997, + 0.000556137936655432, + 0.020321212708950043, + -0.006574710365384817, + -0.00041518427315168083, + 0.040041930973529816, + -0.0017605348257347941, + 0.015257968567311764, + -0.012248682789504528, + -0.061686959117650986, + -0.04353570565581322, + 0.05682842805981636, + 0.028141262009739876, + -3.009393003594596e-05, + 0.0002050332259386778, + -0.02466113492846489, + -0.03813127428293228, + 0.010842983610928059, + 0.00835912860929966, + 0.008345481008291245, + -0.011163701303303242, + 0.006724833510816097, + -0.003886141814291477, + -0.021440312266349792, + -0.00010342289169784635, + -0.00662247696891427, + 0.010160606354475021, + -0.010385790839791298, + -0.06943877041339874, + -0.005472670309245586, + 0.0034579497296363115, + -0.018683506175875664, + -0.01209855917841196, + -0.013224482536315918, + 0.023760396987199783, + -0.015339854173362255, + 0.02528892271220684, + -0.054262686520814896, + -0.043945133686065674, + -0.01147077139467001, + 0.010822512209415436, + 0.05207907781004906, + 0.023432854562997818, + -0.04806669428944588, + -0.0035722479224205017, + 0.0003546232474036515, + 0.02526162751019001, + -0.015517272055149078, + -0.019802605733275414, + 0.017182273790240288, + -0.023528387770056725, + -0.04866718873381615, + -0.001799771562218666, + -0.0013852270785719156, + 0.013285896740853786, + 0.036575451493263245, + -0.011552657000720501, + -0.00923257227987051, + -1.944510222529061e-05, + -0.0016701198183000088, + -0.023419206961989403, + 0.0003162394859828055, + -0.05065973103046417, + -0.0040499125607311726, + 0.02956060878932476, + 0.019925432279706, + -0.042307425290346146, + 0.0098057696595788, + 0.011989378370344639, + 0.016650019213557243, + 0.004885825328528881, + -0.045091528445482254, + -0.00811347272247076, + -0.009021035395562649, + -0.002529915887862444, + 0.03185339644551277, + -0.043945133686065674, + -0.025425398722290993, + -0.04986817389726639, + 0.03414618596434593, + 0.016963914036750793, + -0.0074310945346951485, + 0.04031488299369812, + -0.010181077755987644, + -0.0156264528632164, + -0.012228211387991905, + -0.017386987805366516, + -0.018192192539572716, + -0.022518469020724297, + 0.011047697626054287, + -0.030434051528573036, + 0.013135773129761219, + 0.0032105876598507166, + 0.05661006644368172, + -0.025616465136408806, + 0.029396837577223778, + -0.0029052237514406443, + 0.021126417443156242, + 0.016295183449983597, + 0.011204644106328487, + 0.010576856322586536, + -0.04318087175488472, + 0.04765726998448372, + -0.006376821082085371, + 0.007854169234633446, + 0.0032668840140104294, + -0.05284333974123001, + 0.02434724196791649, + 0.021453959867358208, + 0.014002392999827862, + 5.672265979228541e-05, + -0.003869082313030958, + -0.0013920507626608014, + 0.03534717112779617, + 0.005278192460536957, + -0.027076752856373787, + -0.03248118609189987, + 0.033764056861400604, + 0.01937953010201454, + -0.011975730769336224, + -0.01177101768553257, + 0.048639893531799316, + -0.019911784678697586, + 0.009860360063612461, + 0.009662470780313015, + 0.012528457678854465, + -0.036684632301330566, + -0.0057046785950660706, + 0.015558214858174324, + -0.005039360374212265, + -0.011716427281498909, + 0.014384524896740913, + 0.0014287285739555955, + -0.03695758432149887, + 0.033736761659383774, + -0.036111436784267426, + 0.015612805262207985, + -0.010146958753466606, + -0.013565671630203724, + 0.00863207969814539, + 0.021085474640130997, + 0.03933225944638252, + -0.01568104326725006, + -0.03458290919661522, + 0.0059469230473041534, + 0.013654381036758423, + 0.01316306833177805, + 0.019256703555583954, + 0.012999298050999641, + 0.0010090662399306893, + 0.048476122319698334, + 0.05581850931048393, + -0.0036063669249415398, + 0.004387689754366875, + 0.027909254655241966, + 0.006489413324743509, + 0.029123887419700623, + -0.028850935399532318, + 0.0015660572098568082, + 0.011211467906832695, + -0.023064371198415756, + 0.013743089511990547, + 0.020976295694708824, + -0.0005851390305906534, + -0.02294154278934002, + 0.01583116687834263, + -0.054781295359134674, + -0.044081609696149826, + 0.014985017478466034, + -0.014548296108841896, + -0.03875906020402908, + 0.019652482122182846, + -0.03504692763090134, + -0.015899403020739555, + 0.017878299579024315, + -0.0299973301589489, + 0.005366901867091656, + 0.012842350639402866, + 0.008966444991528988, + 0.024279003962874413, + 0.015421739779412746, + -0.008052058517932892, + 0.011061345227062702, + 0.002359321340918541, + 0.0173733402043581, + -0.005394197069108486, + -0.001398874563165009, + -0.01453464850783348, + -0.038840945810079575, + -0.014630180783569813, + 0.05038677901029587, + -0.02164502441883087, + 0.00478005688637495, + 0.017195921391248703, + 0.03974168747663498, + -0.02307801879942417, + -0.012521633878350258, + -0.002912047551944852, + 0.005745621398091316, + 0.036056846380233765, + 0.006301759276539087, + 0.004322863649576902, + -0.007779107429087162, + 0.03073429875075817, + 0.0526522733271122, + 0.051342111080884933, + -0.011259234510362148, + 0.0010807159123942256, + -0.008707141503691673, + 0.030515937134623528, + -0.0072127338498830795, + 0.03340921923518181, + -0.00047766449279151857, + 0.007403799798339605, + 0.0033538872376084328, + -0.00992177426815033, + 0.025398103520274162, + 0.017441578209400177, + 0.013408725149929523, + 0.04045135900378227, + -0.007335561793297529, + -0.0025589170400053263, + 0.01955694891512394, + -0.020566867664456367, + 0.0033538872376084328, + 0.025616465136408806, + 0.0016752376686781645, + 0.01820584014058113, + -0.005929863546043634, + -0.009464580565690994, + 0.000745924306102097, + 0.014111573807895184, + 0.01765993796288967, + -0.040587835013866425, + 0.004694759380072355, + 0.0035313053522258997, + 0.00019458431052044034, + -0.003544952953234315, + -0.019229408353567123, + -0.013156244531273842, + -0.0074652135372161865, + 0.005349842365831137, + 0.02247752621769905, + -0.03070700354874134, + 0.04419079050421715, + -0.029697084799408913, + -0.04200718179345131, + -0.027144990861415863, + 0.014056983403861523, + 0.012808232568204403, + -0.031089134514331818, + -0.017905594781041145, + 0.004704995080828667, + -0.06037679314613342, + -0.03073429875075817, + -0.012603518553078175, + -0.021672319620847702, + 0.025984948500990868, + 0.04577390477061272, + -0.015135141089558601, + 0.025984948500990868, + -0.0192976463586092, + -0.02640802226960659, + 0.008939149789512157, + 0.021481255069375038, + -0.014903131872415543, + 0.006107281893491745, + -0.039960045367479324, + 0.007731340825557709, + -0.0013587848516181111, + -0.03193528205156326, + 0.02130383625626564, + -0.018970103934407234, + -0.002695392584428191, + -0.009566937573254108, + -0.008017939515411854, + -0.006230109836906195, + -0.008754908107221127, + -0.03229011967778206, + -0.0009519170853309333, + -0.004022617358714342, + 0.03971439227461815, + 0.035101518034935, + 0.010112839750945568, + 0.031116429716348648, + -0.03253577649593353, + -0.0044218082912266254, + 0.02093535289168358, + 0.033163562417030334, + -0.009519170969724655, + 0.004568519536405802, + -0.007035315502434969, + -0.0033624167554080486, + -0.01502596028149128, + 0.001704238704405725, + -0.004892649129033089, + -0.015926698222756386, + -0.006424587219953537, + -0.014930427074432373, + -0.014193459413945675, + -0.020894410088658333, + 0.021781500428915024, + 0.009355400688946247, + -0.016895676031708717, + 0.002813102677464485, + -0.028032081201672554, + -0.035456351935863495, + 0.004428632091730833, + 0.022259164601564407, + -0.0013502552174031734, + 0.04588308557868004, + -0.010529090650379658, + 0.012692227959632874, + 0.00475276168435812, + 0.015517272055149078, + 0.01450735330581665, + 0.03171692416071892, + -0.0019823077600449324, + -0.00769039848819375, + -0.010576856322586536, + -0.008318185806274414, + -0.011409357190132141, + -0.018656210973858833, + 0.005711502395570278, + 0.022777773439884186, + 0.0046435813419520855, + 0.017482521012425423, + 0.043426524847745895, + -0.02474302053451538, + -0.037776436656713486, + -0.021999862045049667, + -0.012200916185975075, + 0.05912121757864952, + -0.010262962430715561, + -0.0014807599363848567, + 0.02101723849773407, + 0.00736285699531436, + -0.020744286477565765, + 0.03297249600291252, + 0.006632712669670582, + 0.029287656769156456, + 0.00420685950666666, + -0.012521633878350258, + -0.024797610938549042, + 0.010290257632732391, + -0.012064440175890923, + -0.026135072112083435, + -0.016554486006498337, + -0.009184805676341057, + 0.015162435360252857, + -0.003637074027210474, + -0.026012243703007698, + -0.008065706118941307, + 0.002855751197785139, + -0.013449667021632195, + -0.006195990834385157, + -0.0031491736881434917, + 0.02565740793943405, + -0.0019413649570196867, + -0.0010755980620160699, + -0.010842983610928059, + -0.02190432883799076, + -0.02015744149684906, + -0.005482906010001898, + -0.012780937366187572, + 0.004889237228780985, + 0.011593599803745747, + -0.01789194718003273, + 0.01196890790015459, + -0.013831798918545246, + 0.021754205226898193, + -0.007983820512890816, + -0.004834646824747324, + 0.020321212708950043, + 0.027336057275533676, + -0.02354203537106514, + -0.011661837808787823, + -0.022955190390348434, + -0.03747619315981865, + 0.024824906140565872, + -0.005725149996578693, + 0.013592966832220554, + 0.008106648921966553, + -0.014889484271407127, + 0.028168557211756706, + -0.009771650657057762, + 0.004295568447560072, + 0.017277806997299194, + -0.014630180783569813, + 0.0017690645763650537, + 0.004971122834831476, + 0.017154978588223457, + -0.012555751949548721, + -0.034309957176446915, + 0.029424132779240608, + -0.0023081430699676275, + -0.011600423604249954, + 0.03523799031972885, + -0.032726842910051346, + 0.018069365993142128, + -0.00447981059551239, + -0.0006683038081973791, + 0.002495796885341406, + -0.0060117486864328384, + 0.024524660781025887, + -0.02161773107945919, + -0.038895536214113235, + -0.04659276083111763, + 0.03073429875075817, + -0.004670876543968916, + -0.0009834771044552326, + -0.014630180783569813, + 0.012535281479358673, + -0.01423440221697092, + -0.007833697833120823, + 0.0012402217835187912, + -0.006264228839427233, + 0.011634542606770992, + -0.004687936045229435, + 0.00925986748188734, + 0.06294253468513489, + 0.007874640636146069, + 0.01708674058318138, + -0.019447768107056618, + 0.02471572533249855, + 0.028659868985414505, + 0.03575659915804863, + -0.02724052406847477, + -0.025944005697965622, + 0.0058991564437747, + -0.016035879030823708, + 0.014111573807895184, + -0.011429828591644764, + 0.06993008404970169, + -0.018055718392133713, + 0.0136339096352458, + -0.01559915766119957, + 0.011559480801224709, + -0.020539572462439537, + -0.0016760906437411904, + -0.01149806659668684, + -0.003137232270091772, + 0.002088076202198863, + 0.01723686419427395, + -0.003643897594884038, + -0.0009954186389222741, + -0.01053591351956129, + -0.016786495223641396, + 0.01508055068552494, + 0.010433557443320751, + 0.027131343260407448, + 0.036111436784267426, + 0.003718959167599678, + -0.030297575518488884, + 0.0181785449385643, + 0.03351840004324913, + -0.01838325895369053, + -0.004623109940439463, + 0.05923039838671684, + 0.0196115393191576, + 0.009212100878357887, + 0.03013380616903305, + 0.009566937573254108, + 0.010849807411432266, + 0.02067604847252369, + 0.020171089097857475, + 0.019679777324199677, + 0.02221822179853916, + 0.005018888972699642, + 0.0050666555762290955, + 0.0034408902283757925, + -6.72715259497636e-06, + 0.002782395575195551, + -0.014589237980544567, + -0.024783963337540627, + 0.005244073923677206, + 0.0023473796900361776, + -0.014848542399704456, + 0.01502596028149128, + 0.011832431890070438, + 0.00868667010217905, + 0.021986214444041252, + -0.005445375107228756, + -0.01251481007784605, + 0.025097858160734177, + 0.014111573807895184, + 0.005360078066587448, + 0.00666683167219162, + -0.021972566843032837, + 0.0003944996860809624, + -0.04872177913784981, + -0.02648990787565708, + -0.004333099350333214, + 0.020225679501891136, + 0.03597496077418327, + 0.025589169934391975, + 0.0067384811118245125, + -0.01723686419427395, + 0.007567570544779301, + 0.024470070376992226, + -0.027158638462424278, + 0.010842983610928059, + 0.012664932757616043, + 0.01104087382555008, + 0.03190798684954643, + 0.027226876467466354, + -0.023146256804466248, + 0.009812593460083008, + 0.0073492093943059444, + 0.011948436498641968, + -0.047357022762298584, + 0.000594095210544765, + 0.031471267342567444, + 0.009641999378800392, + -0.002030074130743742, + 0.014016040600836277, + 0.010570032522082329, + -0.03867717459797859, + -0.016704609617590904, + 0.0032088819425553083, + 0.021344779059290886, + -0.017618995159864426, + 0.006158459931612015, + -0.027950197458267212, + -0.015721986070275307, + 0.023159904405474663, + -0.02687203884124756, + 0.017987480387091637, + -0.01708674058318138, + -0.02492043934762478, + -0.01843784935772419, + -0.03744889795780182, + 0.0008226917707361281, + -0.033163562417030334, + -0.011293353512883186, + -0.0005710649420507252, + -0.017618995159864426, + -0.0039339084178209305, + -0.022463878616690636, + 0.029806263744831085, + 0.019488710910081863, + 0.003910025116056204, + -0.022545764222741127, + 0.039932750165462494, + 0.019966375082731247, + -0.017755471169948578, + 0.018710801377892494, + 0.0019447768572717905, + 0.029724378138780594, + -0.0363570898771286, + 0.014630180783569813, + -0.0007143642869777977, + -0.014125221408903599, + 0.016786495223641396, + -0.01935223489999771, + -0.01952965371310711, + -0.0376126654446125, + -0.028223147615790367, + -0.0014517589006572962, + -0.022641297429800034, + -0.03927766904234886, + 0.002127313055098057, + -0.027254171669483185, + 0.03594766557216644, + 0.03482856601476669, + 0.014848542399704456, + 0.020307565107941628, + 0.008106648921966553, + -0.015667395666241646, + 0.05830236151814461, + -0.017141330987215042, + -0.02887823060154915, + -7.1969538112171e-05, + -0.010065073147416115, + 0.024838553741574287, + 0.019925432279706, + -0.007581217680126429, + 0.022695887833833694, + 0.016759200021624565, + 0.013565671630203724, + -0.020321212708950043, + 0.0060629271902143955, + 0.0010576857021078467, + 0.03452831879258156, + -0.01619965024292469, + -0.0008589430944994092, + 0.029314951971173286, + -0.006813542917370796, + 0.010153782553970814, + 0.01308800745755434, + -0.0029205773025751114, + -0.009416813962161541, + -0.015435387380421162, + -0.015435387380421162, + -0.0035040101502090693, + -0.031061839312314987, + -0.03130749613046646, + 0.03289061412215233, + 0.021781500428915024, + 0.005056419875472784, + -0.04247119650244713, + 2.82280525425449e-05, + -0.00517583591863513, + 0.006731657311320305, + -0.009880831465125084, + -0.005557967349886894, + -0.009812593460083008, + -0.0016146765556186438, + -0.032672252506017685, + -0.03354569524526596, + 0.026189662516117096, + 0.047411613166332245, + -0.022272812202572823, + -0.0031150549184530973, + -0.006973901763558388, + -0.0012973708799108863, + -0.0018680093344300985, + -0.005684207659214735, + -0.004469574894756079, + 0.010030954144895077, + 0.035401761531829834, + -0.019365882501006126, + 0.03638438507914543, + -0.0035210696514695883, + -0.03234471008181572, + -0.019420472905039787, + -0.012105382978916168, + -0.025957653298974037, + -0.011382062919437885, + 0.01711403578519821, + -0.012385157868266106, + -0.014875836670398712, + -0.017427930608391762, + 0.004950651433318853, + 0.01565374806523323, + 0.04197988659143448, + 0.010529090650379658, + -0.006339290179312229, + 0.004534400999546051, + 0.012030321173369884, + 0.009143862873315811, + 0.009853536263108253, + -0.004640169441699982, + -0.0018867747858166695, + 0.021167360246181488, + 0.0016052938299253583, + -0.020771581679582596, + 0.005847977939993143, + -0.009744355455040932, + 0.0046435813419520855, + 0.022327402606606483, + -0.0008845322881825268, + 0.02635343186557293, + -0.007028491701930761, + -0.00923257227987051, + -0.0019106579711660743, + -0.0029291068203747272, + 0.009239396080374718, + 0.024442775174975395, + 0.002773866057395935, + 0.032726842910051346, + -0.01346331462264061, + 0.000919504149351269, + 0.003065582597628236, + 0.02904200181365013, + -0.0007450713310390711, + 0.0066565959714353085, + -0.0029461663216352463, + 0.011347943916916847, + -0.03807668387889862, + 0.006793071515858173, + -0.024551954120397568, + 0.006359761580824852, + -0.005472670309245586, + -0.0014423761749640107, + 0.009641999378800392, + -0.023296380415558815, + -0.020403098315000534, + -1.3107784980093129e-05, + -0.03753077983856201, + -0.03706676512956619, + 0.014275345019996166, + -0.027977492660284042, + -0.01723686419427395, + 0.025439046323299408, + 0.013695323839783669, + 0.009041506797075272, + 0.018246782943606377, + -0.01570833846926689, + 0.0047971163876354694, + 0.021890681236982346, + 0.0015097609721124172, + -0.014875836670398712, + 0.005865037441253662, + -0.006008336786180735, + 0.04713866114616394, + 0.016622724011540413, + 0.0027260994538664818, + -0.033190857619047165, + -0.015844814479351044, + 0.031007248908281326, + 0.008229476399719715, + 0.0026680973824113607, + -0.0049028848297894, + 0.0017375046154484153, + 0.008475133217871189, + -0.039523325860500336, + -0.01950235851109028, + -0.022641297429800034, + 0.008884559385478497, + 0.00865937490016222, + 0.023187199607491493, + 0.015749281272292137, + 0.011695955879986286, + -0.028577983379364014, + 0.008495604619383812, + -0.028632573783397675, + 0.006004924885928631, + -0.05183342099189758, + 0.04203447699546814, + -0.02893282100558281, + 0.0008777084876783192, + 0.00890503078699112, + 0.009744355455040932, + -0.026503555476665497, + -0.013067536056041718, + -0.011402533389627934, + -0.0178646519780159, + -0.02687203884124756, + 0.01273317076265812, + -0.0028386919293552637, + 0.017045797780156136, + 0.004298980347812176, + -0.02792290225625038, + -0.05145128816366196, + 0.011259234510362148, + 3.171990829287097e-05, + -0.00890503078699112, + -0.030379461124539375, + -0.000688775151502341, + -0.021262893453240395, + -0.022122690454125404, + 0.04648358002305031, + 0.012855998240411282, + -0.002814808627590537, + -0.04421808570623398, + -0.0023286144714802504, + 0.012726346962153912, + -0.014288991689682007, + 0.01901104673743248, + 0.006776012014597654, + 0.012282800860702991, + -0.010754275135695934, + -0.0012717817444354296, + -0.009150686673820019, + -0.019748015329241753, + -0.0577564612030983, + -0.012658108957111835, + -0.015394444577395916, + -0.019174817949533463, + -0.011307001113891602, + 0.001667560893110931, + -0.001339166541583836, + -0.008174886927008629, + 0.00938951876014471, + -0.01666366681456566, + ], + "index": 14, + }, + { + "title": "Office of Migrant Education", + "text": "The Office of Migrant Education (OME) is a program within the U.S. Department of Education's Office of Elementary and Secondary Education (OESE) that administers grant programs that provide academic and supportive services to the children of families who migrate to find work in the agricultural and fishing industries. OME also administers several contracts and special initiatives.The Office of Migrant Education was created out of a response from the public out-cry resulting from Edward R.", + "vector": [ + -0.036061640828847885, + -0.005345136392861605, + -0.020434929057955742, + 0.006410958245396614, + -0.00444359565153718, + 0.01939314976334572, + 0.01886424422264099, + -0.015258081257343292, + -0.03231123089790344, + -0.003790479153394699, + 0.015394313260912895, + -0.034971777349710464, + -0.038049038499593735, + -0.017549999058246613, + -0.03776054456830025, + -0.001331275561824441, + -0.031109174713492393, + -0.01572287455201149, + -0.0075168488547205925, + 0.013591231778264046, + -0.003015153808519244, + -0.029570546001195908, + 0.026573421433568, + -0.026733696460723877, + 0.010826505720615387, + 0.022149860858917236, + 0.014905477873980999, + 0.029666708782315254, + 0.028881367295980453, + 0.041959721595048904, + -0.013294724747538567, + 0.04513314738869667, + 0.023063423112034798, + -0.034619174897670746, + -0.012389176525175571, + -0.0016027395613491535, + -0.039203010499477386, + -0.0451972559094429, + 0.012413217686116695, + -0.03368958458304405, + -0.01590719074010849, + -0.004924417473375797, + 0.023928901180624962, + 0.02331986092031002, + 0.024185340851545334, + 0.008029725402593613, + -0.048050131648778915, + -0.05830766633152962, + -0.026653559878468513, + -0.0054292804561555386, + 0.018543697893619537, + 0.01801479235291481, + -0.024201367050409317, + 0.009167670272290707, + -0.052441637963056564, + 0.03862602263689041, + 0.10443451255559921, + 0.05580739304423332, + -0.006923834793269634, + -0.029426299035549164, + -0.0365104079246521, + -0.0003593642613850534, + 0.008959313854575157, + -0.04577424377202988, + -0.01310239639133215, + 0.01220486219972372, + -0.026060545817017555, + 0.015234040096402168, + -0.03827342018485069, + 0.02801588736474514, + -0.008750958368182182, + -0.008198012597858906, + -0.013166505843400955, + 0.050999172031879425, + -0.020499039441347122, + -0.022823011502623558, + -0.0066153076477348804, + -0.03006739541888237, + 0.01644410751760006, + -0.017758354544639587, + 0.009287876076996326, + -0.006879759486764669, + 0.07225149869918823, + 0.00131825334392488, + 0.04933232441544533, + -0.06334026902914047, + -0.01897643692791462, + -0.049556706100702286, + -0.01319054700434208, + 0.020322738215327263, + -0.031013010069727898, + 0.008718903176486492, + -0.020563147962093353, + 0.03471533954143524, + 0.02867301180958748, + -0.000364873674698174, + 0.025018764659762383, + -0.025627806782722473, + -0.013094382360577583, + -0.010241505689918995, + -0.0023600340355187654, + 0.018239175900816917, + -0.028352463617920876, + 0.015586642548441887, + 0.0025744005106389523, + 0.036959175020456314, + 0.011716026812791824, + 0.030756572261452675, + 0.027855614200234413, + 0.06478273123502731, + -0.04221615940332413, + 0.0031113182194530964, + 0.005966198164969683, + 0.027246572077274323, + 0.0356769822537899, + 0.02054712176322937, + 0.0045557874254882336, + 0.017742326483130455, + -0.0037203591782599688, + 0.03945944830775261, + 0.018896300345659256, + 0.013943834230303764, + 0.013310751877725124, + -0.038465749472379684, + -0.07270026952028275, + 0.0233839713037014, + -0.020450957119464874, + 0.06439808011054993, + -0.011315341107547283, + -0.013487054035067558, + 0.048114243894815445, + -0.001110898912884295, + -0.031173285096883774, + -0.0186238344758749, + 0.029057668522000313, + 0.0016107532428577542, + 0.023223696276545525, + 0.03115725703537464, + -0.010321643203496933, + 0.0269901342689991, + -0.018335340544581413, + 0.0428893119096756, + -0.07109753042459488, + 0.03692711889743805, + 0.0033857873640954494, + -0.03548465296626091, + 0.02856081910431385, + 0.03862602263689041, + -0.04183150455355644, + 0.027214517816901207, + -0.03349725902080536, + -0.03872218728065491, + 0.013454998843371868, + -0.03200671076774597, + 0.031365614384412766, + -0.02380068227648735, + 0.015634724870324135, + 0.009384040720760822, + -0.010714313946664333, + 0.050454240292310715, + -0.017101231962442398, + -0.010401779785752296, + 0.013422943651676178, + 0.02114013582468033, + 0.000522392918355763, + -0.010650204494595528, + -0.010345684364438057, + -0.044972874224185944, + 0.009712602011859417, + 0.03631807863712311, + -0.046190954744815826, + 0.03522821515798569, + -0.03175027295947075, + -0.040998078882694244, + -0.02801588736474514, + -0.018880272284150124, + 0.005196882877498865, + 0.04705643281340599, + -0.0643339678645134, + -0.0014204279286786914, + -0.04231232404708862, + 0.05615999549627304, + 0.06718683987855911, + 0.015290135517716408, + 0.025563696399331093, + -0.010978765785694122, + -0.01650821790099144, + 0.01403999887406826, + -0.027631230652332306, + -0.0008324228692799807, + 0.03234328329563141, + -0.016492189839482307, + 0.05237752944231033, + 0.03683095425367355, + 0.04516519978642464, + -0.017501916736364365, + -0.020050272345542908, + 0.06176958233118057, + 0.03163807839155197, + -0.058532048016786575, + -0.020803559571504593, + 0.003199468832463026, + 0.048402734100818634, + 0.026365065947175026, + 0.029602600261569023, + 0.05285835266113281, + 0.012733765877783298, + 0.0010818492155522108, + -0.04378684610128403, + -0.013727464713156223, + 0.01843150518834591, + -0.023720545694231987, + 0.016844792291522026, + 0.021893423050642014, + -0.0075048282742500305, + -0.005769862327724695, + -0.03231123089790344, + -0.02626890130341053, + 8.877674554241821e-05, + 0.003491968847811222, + 0.059493694454431534, + 0.020466985180974007, + 0.009624451398849487, + 0.01657232642173767, + -0.032679859548807144, + -0.03465123102068901, + 0.0044716433621943, + -0.038465749472379684, + -0.03037191554903984, + 0.0062506841495633125, + -0.04253670945763588, + 0.09571560472249985, + 0.013150478713214397, + -0.04625506326556206, + -0.040869858115911484, + 0.05917314440011978, + 0.03689506649971008, + -0.019793834537267685, + -0.00867883488535881, + 0.013094382360577583, + -0.04971698299050331, + -0.00587404053658247, + 0.0008624742622487247, + -0.011876299977302551, + -0.01421630010008812, + -0.003167414106428623, + -0.014657053165137768, + 0.04369068145751953, + -0.043530408293008804, + 0.03423451632261276, + 0.03522821515798569, + -0.04417150467634201, + -0.02790369652211666, + -0.011275272816419601, + 0.048723284155130386, + 0.0818038284778595, + -0.0040128594264388084, + -0.00855862908065319, + -0.022790957242250443, + -0.039074789732694626, + -0.018816161900758743, + 0.03285616263747215, + -0.04019670933485031, + 0.005549485795199871, + -0.01602739654481411, + -0.0077211977913975716, + 0.05644848942756653, + -0.0031313523650169373, + -0.022694792598485947, + 0.0007507833070121706, + -0.043049585074186325, + 0.017421780154109, + 0.0051087322644889355, + -0.013735477812588215, + 0.017870547249913216, + 0.015650752931833267, + 0.03532437980175018, + -0.003291626460850239, + 0.059076979756355286, + 0.005405239295214415, + -0.04712054505944252, + -0.030339859426021576, + -0.008113869465887547, + 0.023480134084820747, + 0.027390819042921066, + 0.058115337044000626, + 0.02735876478254795, + -0.013879724778234959, + 0.06930246204137802, + 0.01729355938732624, + -0.024297531694173813, + 0.029714791104197502, + -0.02194150537252426, + 0.015995340421795845, + 0.027919722720980644, + 0.005285033956170082, + -0.03574109449982643, + -0.006775581743568182, + 0.018062874674797058, + -0.007761266548186541, + 0.0030351881869137287, + -0.0038966606371104717, + 0.00435544503852725, + -0.021861368790268898, + 0.008398354984819889, + 0.015530546195805073, + -0.017197396606206894, + 0.01764616370201111, + -0.014144176617264748, + -0.05718574672937393, + 0.04054931178689003, + -0.06494300812482834, + -0.0024101196322590113, + -0.010538012720644474, + -0.003828544169664383, + 0.00988088920712471, + 0.02319164201617241, + -0.023351915180683136, + 0.012164792977273464, + -0.03615780547261238, + -0.012429245747625828, + 0.011988491751253605, + -0.016251780092716217, + 0.002153681358322501, + 0.006519143469631672, + -0.0325356125831604, + -0.0548136942088604, + 0.0020034245681017637, + 0.012180821038782597, + 0.030580271035432816, + -0.04157506301999092, + -0.03872218728065491, + 0.023031366989016533, + -0.01573088951408863, + 0.01578698493540287, + -0.03259972482919693, + 0.015402327291667461, + 0.034202463924884796, + 0.010738355107605457, + 0.027503011748194695, + -0.0063388352282345295, + -0.03426657244563103, + -0.019473286345601082, + 0.017806436866521835, + -0.012068629264831543, + 0.008686848916113377, + 0.052217256277799606, + 0.03788876533508301, + 0.013991916552186012, + -0.012060615234076977, + 0.0008549613994546235, + -0.01644410751760006, + 0.015009656548500061, + 0.01093869749456644, + 0.031670134514570236, + 0.014833354391157627, + -0.012228903360664845, + -0.03285616263747215, + 0.05436492711305618, + 0.06705862283706665, + -0.04115835204720497, + 0.004439588636159897, + -0.0146730812266469, + 0.003181437961757183, + -0.06401342153549194, + 0.03878629952669144, + -0.02788766846060753, + 0.028336435556411743, + 0.024249449372291565, + -0.0641416385769844, + 0.025515614077448845, + -0.017245477065443993, + 0.04070958495140076, + -0.0317021906375885, + -0.007256403565406799, + 0.035388488322496414, + -0.0013473029248416424, + 0.025050818920135498, + -0.0020294690039008856, + 0.031109174713492393, + -0.029843011870980263, + 0.008061779662966728, + 0.0019653593190014362, + 0.05234547331929207, + -0.009023424237966537, + -0.013302738778293133, + 0.029490407556295395, + -0.04157506301999092, + -0.011796163395047188, + -0.00338178058154881, + 0.036478351801633835, + -0.005569519940763712, + 0.001465504989027977, + -0.006230650003999472, + 0.018543697893619537, + 0.049556706100702286, + -0.029907120391726494, + 0.006146506406366825, + 0.013631300069391727, + 0.008398354984819889, + 0.009295889176428318, + -0.05237752944231033, + 0.020883696153759956, + 0.034555066376924515, + 0.02017849124968052, + -0.048530954867601395, + -0.01698903925716877, + 0.0087108900770545, + 0.023239724338054657, + 0.017982738092541695, + -0.0005454323254525661, + -0.0025964381638914347, + 0.018639860674738884, + 0.03394602611660957, + -0.0012190837878733873, + 0.020803559571504593, + -0.05122355744242668, + 0.04824246093630791, + -0.024233423173427582, + 0.03747205063700676, + 0.008189999498426914, + 0.007324520032852888, + 0.026797804981470108, + 0.03481150418519974, + 0.031109174713492393, + 0.07205916941165924, + 0.04561396688222885, + -0.03933122754096985, + -0.049556706100702286, + 0.0040008388459682465, + -0.012525409460067749, + -0.014793286100029945, + -0.005805924069136381, + 0.03590136766433716, + 0.015562601387500763, + -2.0895091438433155e-05, + -0.00010893620492424816, + 0.02421739511191845, + 0.029810955747961998, + 0.021797258406877518, + 0.010746369138360023, + -0.0022638696245849133, + -0.016460135579109192, + 0.012910067103803158, + -0.06253889948129654, + -0.02759917639195919, + 0.004435581620782614, + 0.012429245747625828, + 0.03176629915833473, + -0.01771027222275734, + -0.007977636530995369, + 0.013887738808989525, + -0.021829312667250633, + -0.004475650377571583, + 0.04433177784085274, + 0.016428081318736076, + 0.05090300738811493, + -0.03223109245300293, + -0.006495102308690548, + -0.00685171177610755, + -0.0007062071235850453, + -0.018768081441521645, + 0.07872656732797623, + -0.001086857751943171, + 0.017758354544639587, + -0.006226643454283476, + -0.015009656548500061, + 0.0029029620345681906, + -0.010241505689918995, + 0.008847122080624104, + 0.039074789732694626, + 0.0009240795625373721, + -0.020531093701720238, + -0.003255564719438553, + 0.007396643050014973, + -0.011860272847115993, + 0.03542054444551468, + 0.0022378251887857914, + 0.014312464743852615, + -0.006783595308661461, + 0.05019780248403549, + 0.013246642425656319, + -0.010153355076909065, + 0.02229410782456398, + 0.029730819165706635, + -0.03945944830775261, + 0.012004519812762737, + 0.013607258908450603, + -0.03926711902022362, + 0.04272903874516487, + 0.03878629952669144, + 0.028352463617920876, + -0.00012796874216292053, + -0.04035698249936104, + -0.0015676796901971102, + -0.01301424577832222, + 0.006551198195666075, + -0.027454929426312447, + 0.017822464928030968, + -0.006451027002185583, + -0.013711437582969666, + 0.00049309286987409, + 0.01608349196612835, + 0.02548355981707573, + -0.045581914484500885, + 0.04135068133473396, + 0.0029089723248034716, + 0.02307944931089878, + -0.010650204494595528, + -0.015201984904706478, + 0.054557256400585175, + 0.03320876508951187, + 0.01039376575499773, + 0.003966780379414558, + 0.007633047178387642, + 0.02283903956413269, + 0.07250794023275375, + -0.022181915119290352, + 0.01615561544895172, + 0.04083780571818352, + -0.020450957119464874, + 0.028336435556411743, + 0.014392601326107979, + 0.0025623799301683903, + -0.005954177584499121, + -0.018960408866405487, + 0.040453147143125534, + 0.025323284789919853, + 0.01639602519571781, + -0.012998217716813087, + -0.007717191241681576, + 0.006226643454283476, + 0.050037529319524765, + 0.038113147020339966, + 0.00040218746289610863, + 0.022630682215094566, + -0.022678764536976814, + -0.013078355230391026, + 0.006318800617009401, + -0.024377668276429176, + -0.03072451800107956, + -0.010802464559674263, + -0.024618079885840416, + -0.06407752633094788, + -0.05526246130466461, + -0.01280588936060667, + 0.01361527293920517, + 0.008518560789525509, + 0.007436711806803942, + -0.011347396299242973, + 0.03843369334936142, + 0.0059982528910040855, + -0.004411540925502777, + 0.02216588892042637, + -0.00564564997330308, + -0.03248753026127815, + -0.011772122234106064, + 0.0008449442684650421, + 0.005713766440749168, + -0.02325575053691864, + -0.010161369107663631, + -0.027486983686685562, + 0.019232874736189842, + -0.0037043318152427673, + -0.01825520396232605, + 0.0006741523393429816, + -0.010137327946722507, + 0.009640478529036045, + -0.010834519751369953, + -0.0365104079246521, + -0.030387941747903824, + -0.025387395173311234, + 0.01614760048687458, + -0.005974211730062962, + 0.041543010622262955, + 0.04327397048473358, + 0.0010538012720644474, + -0.01340691652148962, + 0.021300408989191055, + -0.01358321774750948, + -0.027134381234645844, + 0.011187122203409672, + 0.032567668706178665, + 0.0023359928745776415, + 0.004062945023179054, + -0.004487670958042145, + 0.02561177872121334, + -0.021540820598602295, + 0.004535752814263105, + -0.02194150537252426, + 0.021172190085053444, + 0.002171712229028344, + -0.028721094131469727, + -0.01319054700434208, + 0.01662040874361992, + 0.030083421617746353, + -0.02747095562517643, + -0.002287910785526037, + -0.00931191723793745, + 0.03602958470582962, + 0.024441778659820557, + 0.028063969686627388, + -0.009760684333741665, + -0.014953560195863247, + 7.688141340622678e-05, + 0.03404218703508377, + 0.019136710092425346, + -0.004800205118954182, + -0.020771505311131477, + -0.014400615356862545, + 0.058660268783569336, + 0.005585547536611557, + 0.035164106637239456, + -0.005565513391047716, + 0.030339859426021576, + -0.01608349196612835, + -0.015634724870324135, + 0.038593970239162445, + 0.02993917465209961, + -0.010505957528948784, + 0.016235752031207085, + 0.016412053257226944, + 0.0014604964526370168, + 0.028336435556411743, + -0.0035941435489803553, + -0.019553422927856445, + 0.014985615387558937, + 0.03721561282873154, + -0.00831020437180996, + 0.041414789855480194, + -0.018784107640385628, + 0.03785670921206474, + -0.0018080906011164188, + 0.008510546758770943, + -0.001004216494038701, + 0.020162463188171387, + 0.014985615387558937, + -0.04869122803211212, + 0.0037223626859486103, + -0.0321669839322567, + 0.023784656077623367, + -0.03078862652182579, + -0.025403423234820366, + 0.05577533692121506, + -0.013463012874126434, + -0.008686848916113377, + 0.033657532185316086, + -0.005417259875684977, + 0.020226573571562767, + 0.022213971242308617, + 0.020931778475642204, + -0.029474381357431412, + -0.007344554178416729, + -0.010345684364438057, + -0.020386846736073494, + -0.0238487645983696, + -0.052633967250585556, + -0.04554985836148262, + 0.013166505843400955, + 0.01637999899685383, + 0.01663643680512905, + -0.002179725794121623, + 0.031782325357198715, + -0.01174808107316494, + 0.0341062992811203, + -0.012020546942949295, + -0.0214446559548378, + 0.02825629897415638, + 0.002227808116003871, + 0.004663972184062004, + -0.008863150142133236, + -0.03760027140378952, + 0.032920271158218384, + -0.03500383347272873, + -0.012581505812704563, + -0.023303832858800888, + -0.00727643771097064, + -0.03436273708939552, + 0.004115033894777298, + 0.03183040767908096, + -0.010554039850831032, + -0.03175027295947075, + 0.038241367787122726, + -0.011948423460125923, + 0.03200671076774597, + 0.01602739654481411, + -0.07430300861597061, + -0.0436265729367733, + -0.020034244284033775, + -0.04420355707406998, + -0.0030231676064431667, + 0.02764725871384144, + 0.012533423490822315, + 0.03994027152657509, + -0.0030171573162078857, + -0.019553422927856445, + 0.002618475817143917, + -0.00421520508825779, + 0.021412601694464684, + -0.003101301146671176, + -0.019681641831994057, + 0.0186238344758749, + -0.023880818858742714, + 0.017982738092541695, + 0.014857395552098751, + 0.0065552047453820705, + -0.004016865976154804, + -0.009167670272290707, + 0.02548355981707573, + 0.02035479247570038, + 0.014881436713039875, + 0.0027266608085483313, + -0.0023219690192490816, + 0.0036662667989730835, + 0.015835067257285118, + -0.042023830115795135, + 0.005902088712900877, + 0.002612465526908636, + -0.004627910442650318, + -0.0039367289282381535, + 0.043466296046972275, + 0.011387464590370655, + 0.026605477556586266, + -0.008246094919741154, + -0.025739997625350952, + -0.0011990495258942246, + -0.008574657142162323, + -0.010898629203438759, + 0.045646023005247116, + 0.009920958429574966, + 0.008598698303103447, + -0.022374244406819344, + -0.012525409460067749, + 0.008202020078897476, + 0.02096383459866047, + 0.035516709089279175, + 0.03586931154131889, + 0.01825520396232605, + -0.027454929426312447, + -0.0038004962261766195, + -0.048947665840387344, + 0.012301025912165642, + 0.02205369621515274, + -0.00415510218590498, + -0.019313011318445206, + -0.00721633480861783, + 0.04670383036136627, + -0.020499039441347122, + -0.026284929364919662, + 0.008935273624956608, + -0.009864862076938152, + 0.0028829278890043497, + -0.018335340544581413, + -0.00879904069006443, + 0.04247259721159935, + 0.008967327885329723, + 0.01753397099673748, + -0.04260081797838211, + 0.034747395664453506, + 0.0036001538392156363, + -0.027855614200234413, + 0.00012934609549120069, + -0.01904054544866085, + -0.0357731468975544, + 0.010618149302899837, + 0.04349835216999054, + 0.02266273833811283, + -0.013967875391244888, + -0.0286089014261961, + 0.021588902920484543, + -0.032808080315589905, + -0.014200272969901562, + 0.012886025942862034, + -0.013519108295440674, + -0.006635341793298721, + 0.023271778598427773, + -0.013743491843342781, + -0.043722737580537796, + -0.011683971621096134, + 0.018046848475933075, + 0.016123559325933456, + 0.014633012004196644, + 0.018832189962267876, + -0.027967805042862892, + -0.006394931115210056, + -0.040998078882694244, + 0.028240270912647247, + 0.0119243822991848, + -0.030035339295864105, + 0.006451027002185583, + 0.0020064297132194042, + -0.03772848844528198, + -0.01382362935692072, + -0.03673478960990906, + 0.0001843150530476123, + 0.02139657363295555, + 0.011403491720557213, + 0.017453834414482117, + -0.004435581620782614, + -0.01764616370201111, + 0.021412601694464684, + 0.004271300975233316, + 0.010433834977447987, + 0.010321643203496933, + -0.047986023128032684, + -0.023512190207839012, + 0.010642190463840961, + -0.005849999375641346, + -0.03580520302057266, + -0.008758971467614174, + 0.011507670395076275, + 0.03141369670629501, + -0.032022736966609955, + 0.005012568086385727, + 0.026284929364919662, + 0.05349944904446602, + 0.005609588697552681, + -0.02017849124968052, + 0.012220889329910278, + 0.015434382483363152, + -0.002949040848761797, + 0.019056573510169983, + -0.01873602531850338, + -0.01910465583205223, + -0.010281573981046677, + 0.012068629264831543, + 0.02958657220005989, + -0.035035885870456696, + -0.01759808138012886, + -0.02054712176322937, + 0.023480134084820747, + -0.0452934205532074, + -0.0074767800979316235, + -0.009504245594143867, + 0.0396517775952816, + 0.04093397036194801, + 0.01928095705807209, + -0.0008128894842229784, + 0.01093869749456644, + 0.0241693127900362, + -0.05183259770274162, + -0.01964958757162094, + -0.013767533004283905, + -0.018944382667541504, + -0.039203010499477386, + 0.01963355951011181, + 0.003802499733865261, + -0.07257204502820969, + -0.000505113392136991, + 0.025387395173311234, + -0.015674792230129242, + -0.01246931403875351, + 0.010826505720615387, + 0.06337232142686844, + 4.6830045903334394e-05, + 0.005629622843116522, + -0.020531093701720238, + 0.028721094131469727, + -0.003369760001078248, + 0.0007758261053822935, + -0.03519616276025772, + 0.015626711770892143, + 0.03266383334994316, + 0.023351915180683136, + -0.006166540551930666, + 0.036414243280887604, + -0.00801770482212305, + 0.01153972465544939, + 0.001598732778802514, + 0.012012532912194729, + -0.0022498457692563534, + 0.028881367295980453, + -0.025034792721271515, + 0.025018764659762383, + -0.06680218875408173, + 0.022310135886073112, + 0.009047465398907661, + 0.03561287373304367, + 0.0769956111907959, + 0.00727643771097064, + -0.002922996412962675, + 0.03910684585571289, + 0.009768697433173656, + -0.03644629940390587, + 0.020803559571504593, + -0.006491095293313265, + 0.019313011318445206, + -0.022919176146388054, + 0.018207121640443802, + -0.07148218899965286, + -0.004583835136145353, + -0.02812808007001877, + 0.030644381418824196, + 0.04397917538881302, + 0.01178013626486063, + 0.0698794424533844, + -0.03181438148021698, + -0.0069078076630830765, + 0.0025623799301683903, + 0.0325356125831604, + 0.0020975854713469744, + -0.05077479034662247, + -0.001526609412394464, + 0.013006231747567654, + -0.01855972409248352, + -0.021781230345368385, + 0.03753616288304329, + -0.021236298605799675, + 0.001172003336250782, + -0.005116746295243502, + 0.034202463924884796, + 0.012092670425772667, + 0.019056573510169983, + 0.01433650590479374, + 0.009560341946780682, + -0.013230615295469761, + -0.0006130479159764946, + 0.002856883220374584, + -0.028528764843940735, + 0.04067752882838249, + -0.022871093824505806, + -0.043177805840969086, + 0.026573421433568, + 0.012036574073135853, + 0.032984379678964615, + 0.017758354544639587, + 0.005445307586342096, + 0.04026081785559654, + 0.06680218875408173, + 0.002101592253893614, + -0.020274655893445015, + -0.0120846563950181, + -0.04936438053846359, + -0.005345136392861605, + 0.016187669709324837, + -0.017806436866521835, + -0.002918989397585392, + 0.056416433304548264, + -0.04189561307430267, + 0.029025614261627197, + 0.008823081851005554, + 0.051351774483919144, + 0.010521985590457916, + 0.01621171087026596, + 0.011307328008115292, + 0.002012440003454685, + 0.010169382207095623, + 0.005277019925415516, + -0.003491968847811222, + -0.04538958519697189, + 0.007284451276063919, + -2.2992426238488406e-05, + 0.015931231901049614, + 0.03397807851433754, + 0.024569997563958168, + 0.051544103771448135, + -0.007805341854691505, + 0.03011547587811947, + 0.050518352538347244, + 0.012164792977273464, + 0.020018218085169792, + -0.009560341946780682, + -0.04423561319708824, + 0.014480751939117908, + -0.008438424207270145, + -0.02000219002366066, + -0.027631230652332306, + -0.020643286406993866, + 0.009384040720760822, + -0.004671985749155283, + 0.0007347559439949691, + 0.01060212217271328, + 0.002295924350619316, + 0.028817256912589073, + -0.028047943487763405, + 0.04224821552634239, + 0.03295232728123665, + 0.009624451398849487, + -0.0011018834775313735, + 0.009103560820221901, + 0.008470478467643261, + -0.04138273745775223, + 0.06712273508310318, + 0.0064470199868083, + 0.009808766655623913, + 0.013150478713214397, + 0.022085752338171005, + -0.014841368421912193, + -0.021556846797466278, + 0.011387464590370655, + -0.02904164046049118, + -0.02386479265987873, + 0.003103304421529174, + -0.021669039502739906, + -0.02229410782456398, + 0.01945725828409195, + -0.00552945164963603, + 0.013727464713156223, + -0.014264382421970367, + -0.028656983748078346, + -0.033336982131004333, + -0.03718355670571327, + -0.033048491925001144, + -0.016371984034776688, + 0.0015356248477473855, + -0.033336982131004333, + -0.00280880113132298, + 0.034010134637355804, + -0.03163807839155197, + -0.014985615387558937, + 0.02910575084388256, + 0.04458821564912796, + -0.009111574850976467, + 0.041959721595048904, + -0.01843150518834591, + -0.006162533536553383, + 0.02017849124968052, + 0.033336982131004333, + 0.00031053079874254763, + -0.03239136561751366, + -0.01268568355590105, + -0.050454240292310715, + -0.026541367173194885, + -0.014168217778205872, + -0.0022017634473741055, + 0.01764616370201111, + -0.019954107701778412, + -0.0269901342689991, + -0.02825629897415638, + -0.020386846736073494, + -0.006647362373769283, + -0.004175136797130108, + -0.02615671046078205, + 0.030227668583393097, + -0.009287876076996326, + 0.03157396987080574, + 0.00470003392547369, + -0.029073696583509445, + 0.029682736843824387, + -0.02565986104309559, + 0.033529311418533325, + 0.04487670958042145, + -0.031782325357198715, + -0.013134450651705265, + -0.034747395664453506, + 0.008871163241565228, + 0.008630752563476562, + -0.036125749349594116, + -0.034747395664453506, + -0.019024519249796867, + -0.02548355981707573, + 0.005797910504043102, + -0.004659965168684721, + -0.0017820460489019752, + -2.4682814910192974e-05, + 0.002844862872734666, + 0.018094930797815323, + -0.01045787613838911, + -0.01400794368237257, + -0.027583148330450058, + 0.027583148330450058, + -0.006523150019347668, + 0.009848834946751595, + -0.028352463617920876, + -0.012116711586713791, + 0.0002012189506785944, + -0.004627910442650318, + 0.04837068170309067, + 0.037375885993242264, + 0.03820931166410446, + -0.0013543149689212441, + -0.01382362935692072, + 0.005489382892847061, + -0.002638509962707758, + 0.005357156973332167, + 0.01928095705807209, + 0.0023399998899549246, + -0.022726846858859062, + 0.01238116342574358, + -0.0029851023573428392, + 0.056416433304548264, + -0.006823663599789143, + 0.032439447939395905, + -0.0071882870979607105, + 0.03391396999359131, + 0.005321095231920481, + -0.0257880799472332, + -0.0034398797433823347, + -0.021076025441288948, + -0.016051437705755234, + -0.0031954620499163866, + 0.0245860256254673, + 0.02150876447558403, + 0.0011489639291539788, + 0.022694792598485947, + -0.03500383347272873, + -0.0013623286504298449, + 0.03628602251410484, + 0.009760684333741665, + -0.004692020360380411, + 0.008566643111407757, + 0.003161403816193342, + 0.014576916582882404, + 0.0023159587290138006, + 0.033112600445747375, + 0.01051397155970335, + 0.0039367289282381535, + 0.015803012996912003, + -0.0074888006784021854, + 0.017998766154050827, + -0.02000219002366066, + 0.015169929713010788, + -0.02650931291282177, + 0.0016217720694839954, + 0.019970135763287544, + -0.002027465496212244, + 0.00710815005004406, + -0.015169929713010788, + 0.008230067789554596, + -0.0034759414847940207, + 0.021909449249505997, + -0.035164106637239456, + 0.0025243149138987064, + 0.00023089467140380293, + 0.013230615295469761, + -0.0060463352128863335, + -0.015041710808873177, + -0.02162095718085766, + 0.003191455267369747, + 0.01988999731838703, + 0.021252326667308807, + 0.021829312667250633, + 0.012413217686116695, + -0.025355340912938118, + -0.016780683770775795, + -0.01000109501183033, + -0.02469821646809578, + 0.001355316606350243, + -0.02035479247570038, + -0.014977601356804371, + -0.01880013570189476, + -0.011187122203409672, + 0.0035821229685097933, + 0.018832189962267876, + -0.027310682460665703, + 0.03239136561751366, + 0.01584308035671711, + -0.0014665067428722978, + -0.0010072216391563416, + 0.03628602251410484, + 0.004407533910125494, + -0.014576916582882404, + -0.0202426016330719, + -0.011531711556017399, + -0.010489930398762226, + -0.002265873132273555, + 0.01460897084325552, + -0.0023600340355187654, + 0.005417259875684977, + -0.034074243158102036, + -0.00804575253278017, + -0.007356574758887291, + -0.021284380927681923, + 0.06362876296043396, + -0.00412705447524786, + 0.0202426016330719, + 0.0018301282543689013, + -0.005773869343101978, + 0.0019142720848321915, + -0.014416642487049103, + 0.02939424477517605, + 0.026284929364919662, + -0.03542054444551468, + -0.007540889550000429, + -0.028705066069960594, + -0.009720615111291409, + -0.004784177523106337, + 0.021476710215210915, + -0.0013262670254334807, + -0.013911779969930649, + -0.008526574820280075, + 0.006699451245367527, + 0.014913491904735565, + 0.0119243822991848, + -0.014560889452695847, + -0.009432122111320496, + 0.005649656988680363, + 0.020034244284033775, + -0.011283286847174168, + -0.007032020017504692, + -0.019601505249738693, + -0.0022578593343496323, + 0.004040907137095928, + -0.010137327946722507, + 0.01246931403875351, + -0.025836162269115448, + -0.04369068145751953, + 0.015073766000568867, + 0.013038286939263344, + 0.019922053441405296, + 0.002490256680175662, + 0.012357122264802456, + -0.02554766833782196, + 0.01790260151028633, + -0.0026144690345972776, + -0.025884244590997696, + 0.01541835442185402, + 0.015746915712952614, + -0.004203184507787228, + -0.004291335120797157, + 0.009087533690035343, + -0.024137258529663086, + -0.0016748628113418818, + 0.024265477433800697, + -0.047633420675992966, + -0.01310239639133215, + -0.0333690382540226, + 0.010962738655507565, + 0.005942157004028559, + -0.004972499329596758, + 0.03522821515798569, + 0.02517903968691826, + 0.01698903925716877, + 4.513965905061923e-05, + 0.016973013058304787, + -0.02150876447558403, + -0.004736095666885376, + 0.0031954620499163866, + -0.017277533188462257, + 0.00536116398870945, + 0.017133286222815514, + 0.024025065824389458, + 0.015770956873893738, + -0.04080574959516525, + -0.0010788440704345703, + 0.018992463126778603, + -0.020755477249622345, + 0.01897643692791462, + -0.0017980734119191766, + 0.050037529319524765, + -0.0005754836602136493, + 0.011699998751282692, + -0.05330711975693703, + 0.0241693127900362, + 0.025227120146155357, + 0.025050818920135498, + 0.0006461043958552182, + -0.026076573878526688, + -0.01916876621544361, + 0.0003736386715900153, + -0.026589449495077133, + 0.028945477679371834, + -0.023576298728585243, + -0.0027446914464235306, + 0.02674972452223301, + 0.004099006298929453, + -0.029378216713666916, + -0.019248902797698975, + -0.011884314008057117, + 0.0006225641700439155, + 0.04429972171783447, + 0.07000766694545746, + 0.01509780716150999, + 0.0065912664867937565, + 0.015402327291667461, + -0.030804654583334923, + -0.0022518490441143513, + 0.0015436385292559862, + -0.016796709969639778, + -0.010946711525321007, + 0.010329656302928925, + 0.05141588672995567, + -0.04429972171783447, + 0.01670054718852043, + 0.025146983563899994, + -0.01681273803114891, + -0.02783958613872528, + -0.009119587950408459, + -0.020867669954895973, + -0.0036282017827033997, + 0.009359999559819698, + 0.013639314100146294, + -0.008702876046299934, + -0.004599862731993198, + 0.033529311418533325, + -0.0026665579061955214, + 0.010345684364438057, + -0.024505889043211937, + -0.027310682460665703, + -0.02356027252972126, + 0.00581393763422966, + 0.0017870545852929354, + 0.0066193146631121635, + -0.007821368984878063, + 0.03490766882896423, + -0.0024882531724870205, + -0.020162463188171387, + -0.0021336469799280167, + -0.015073766000568867, + 0.045517805963754654, + -0.004684006329625845, + -0.0009426111937500536, + -0.00825410895049572, + -0.005457328166812658, + -0.010978765785694122, + -0.023416025564074516, + -0.015314176678657532, + -0.01162787526845932, + 0.018896300345659256, + 0.01591520383954048, + -0.009424109011888504, + -0.02343205362558365, + 0.0427931472659111, + 0.017854519188404083, + 0.0026044517289847136, + -0.04192766919732094, + 0.01054602675139904, + 0.018543697893619537, + -0.019361093640327454, + -0.01627582125365734, + 0.011555752716958523, + -0.03500383347272873, + -0.004792191553860903, + -0.028272327035665512, + -0.012397190555930138, + 0.01472917664796114, + -0.0014434673357754946, + 0.02259862795472145, + -0.013575204648077488, + 0.02368849143385887, + -0.0011078937677666545, + -0.03705533966422081, + -0.006915821228176355, + -0.016404040157794952, + 0.03165410831570625, + -0.03929917514324188, + 0.007116163615137339, + 0.01400794368237257, + 0.054204653948545456, + 0.026108628138899803, + 0.03958766907453537, + -0.032631777226924896, + -0.0002313955337740481, + 0.0013973885215818882, + -0.03433068096637726, + 0.006815650034695864, + 0.0048322598449885845, + -0.013366848230361938, + 0.021364519372582436, + 0.04452410712838173, + -0.010473903268575668, + -0.01766218990087509, + -0.036061640828847885, + -0.013935821130871773, + 0.027006162330508232, + 0.005990239325910807, + -0.009207738563418388, + -0.00013585721899289638, + 0.00834225956350565, + 0.022855065762996674, + 0.01443266961723566, + 0.003483955282717943, + -0.02386479265987873, + -0.021460682153701782, + 0.017421780154109, + -0.005393218714743853, + -8.683592750458047e-05, + -0.01000109501183033, + -0.03251958638429642, + 0.013871710747480392, + -0.02174917608499527, + -0.008903218433260918, + -0.004159109201282263, + -0.015987327322363853, + -0.020450957119464874, + 0.020338764414191246, + 0.014256368391215801, + -0.0018030820647254586, + -0.020274655893445015, + 0.0198258887976408, + -0.005449314601719379, + -0.0137034235522151, + -0.023704517632722855, + 0.014088081195950508, + 0.014296436682343483, + 0.0041991774924099445, + 0.018816161900758743, + 0.02463410794734955, + -0.02513095736503601, + 0.02777547761797905, + -0.0024201367050409317, + -0.006082396488636732, + 0.02362438105046749, + -0.00273467437364161, + -0.021957531571388245, + -0.020018218085169792, + -0.01494554616510868, + 0.05048629641532898, + -0.005000547505915165, + -0.0017409758875146508, + -0.04615889862179756, + -0.026733696460723877, + -0.031237393617630005, + 0.035997532308101654, + -0.025387395173311234, + -0.02194150537252426, + -0.000705706246662885, + -0.000528403208591044, + -0.003772448282688856, + 0.014921505935490131, + 0.006839691195636988, + 0.02295123040676117, + 0.014480751939117908, + 0.012974176555871964, + -0.019793834537267685, + -0.017005067318677902, + 0.002508287550881505, + 0.0099129443988204, + -0.0054413010366261005, + 0.02415328472852707, + -0.012196848168969154, + -0.01674862951040268, + -0.021364519372582436, + -0.008999383077025414, + 0.02915383316576481, + -0.005757841747254133, + -0.017694244161248207, + 0.0009611428831703961, + 0.01039376575499773, + -0.02242232672870159, + 0.02065931260585785, + -0.008686848916113377, + 0.0031433729454874992, + 0.027198491618037224, + 0.039908215403556824, + -0.012549450621008873, + -0.0014244348276406527, + 0.006170547567307949, + -0.0039247083477675915, + -0.029554517939686775, + 0.029538489878177643, + -0.012012532912194729, + 0.007825376465916634, + 0.05548684298992157, + 0.013454998843371868, + -0.010217464528977871, + 0.005224931053817272, + -0.009095546789467335, + -0.031606025993824005, + 0.005849999375641346, + -0.016476163640618324, + -0.01619568280875683, + -0.013647327199578285, + -0.01145157404243946, + 0.019425204023718834, + 0.013727464713156223, + 0.0023920887615531683, + -0.015250067226588726, + -0.006050341762602329, + -0.03782465308904648, + 0.011804177425801754, + -0.02325575053691864, + -0.009359999559819698, + -0.010281573981046677, + 0.009416094981133938, + 0.04830656945705414, + -0.0071722595021128654, + -0.027807531878352165, + 0.022742874920368195, + 0.049075886607170105, + 0.019569450989365578, + -0.003261575009673834, + 0.017453834414482117, + -0.008823081851005554, + 0.020883696153759956, + -0.03240739554166794, + -0.005689725745469332, + -0.018591778352856636, + -0.018591778352856636, + 0.011371437460184097, + 0.0034338694531470537, + 0.0060583557933568954, + 0.0037263694684952497, + 0.002534331986680627, + -0.02397698350250721, + -0.012597532942891121, + 0.028464654460549355, + -0.02114013582468033, + -0.003802499733865261, + -0.016299862414598465, + 0.007729211822152138, + 0.025355340912938118, + -0.05183259770274162, + 0.02844862826168537, + -0.014536848291754723, + -0.01484938245266676, + -0.01825520396232605, + 0.008518560789525509, + 0.013903765939176083, + -0.01518595777451992, + 0.011940409429371357, + 0.010409793816506863, + 0.02692602574825287, + 0.01844753324985504, + -0.013759518973529339, + 0.006014280486851931, + -0.03157396987080574, + -0.0013623286504298449, + 0.0072363694198429585, + 0.006098424084484577, + 0.0022458387538790703, + 0.02602849155664444, + -0.020162463188171387, + -0.021220272406935692, + 0.007404657080769539, + -0.01400794368237257, + 0.02386479265987873, + -0.026797804981470108, + -0.005369177553802729, + 0.012092670425772667, + -0.005910102277994156, + 0.0022899142932146788, + -0.0022638696245849133, + 0.008101848885416985, + 0.01418424490839243, + -0.018303286284208298, + -0.05183259770274162, + -0.03301643580198288, + 0.011219177395105362, + -0.028528764843940735, + -0.006006266456097364, + 0.014921505935490131, + -0.00653517059981823, + 0.0023359928745776415, + -0.033465202897787094, + 0.007116163615137339, + ], + "index": 15, + }, + { + "title": "August Penguin", + "text": "August Penguin is an annual gathering (since 2002) of the Israeli Free Software community, organized by Hamakor. The conference is held on the first Friday in August (hence its name), usually in the Tel Aviv area. It lasts one day and includes technical talks, projects' status updates, social meetings and followed by a keysigning party.During the conference, the winner of Hamakor Prize for free software-related achievements is announced.", + "vector": [ + -0.046535201370716095, + 0.022717414423823357, + -0.021049104630947113, + -0.0025867680087685585, + -0.028041807934641838, + 0.03436008840799332, + -0.030845988541841507, + 0.042240191251039505, + 0.005089233163744211, + 0.042701639235019684, + -0.023551568388938904, + -0.08597121387720108, + 0.016434628516435623, + 0.010764149948954582, + -0.03409386798739433, + -0.009903372265398502, + -0.021066851913928986, + -0.01883060671389103, + 0.02085387520492077, + -0.01477519329637289, + 0.022628674283623695, + 0.03608164191246033, + -0.0627213567495346, + 0.015059160999953747, + 0.018076317384839058, + 0.001227938337251544, + 0.051291659474372864, + -0.0014808470150455832, + 0.0054086968302726746, + 0.028574246913194656, + 0.04078485816717148, + 0.0055107478983700275, + 0.06673240661621094, + -0.007316604722291231, + -0.01468645315617323, + -0.033579178154468536, + 0.012166240252554417, + 0.042098209261894226, + -0.021137842908501625, + -0.00961053092032671, + -0.03189311921596527, + 0.0032434433232992887, + -0.038797084242105484, + -0.0005740362103097141, + -0.05565766245126724, + -0.0002394590701442212, + -0.03331295773386955, + -0.032620787620544434, + -0.03425360098481178, + 0.010879511944949627, + 0.021049104630947113, + 0.05853283777832985, + 0.023036876693367958, + 0.04465391859412193, + -0.0034675116185098886, + 0.0005634983535856009, + 0.014180636033415794, + 0.03579767420887947, + 0.03915204480290413, + -0.04089134559035301, + -0.018040820956230164, + -0.0038868074771016836, + -0.0180496945977211, + -0.02328534983098507, + 0.03618812933564186, + 0.0015352002810686827, + -0.03602840006351471, + 0.04291461408138275, + 0.01690495014190674, + 0.04369552433490753, + 0.009752514772117138, + -0.025592586025595665, + 0.00992999505251646, + 0.049197398126125336, + 0.05597712844610214, + -0.04834549501538277, + 0.04823900759220123, + 0.0019522777292877436, + -0.03148491680622101, + 0.004805265460163355, + 0.018564386293292046, + -0.012556695379316807, + 0.006797476205974817, + -0.032691776752471924, + 0.022788405418395996, + -0.024332480505108833, + 0.00010898368782363832, + -0.08511930704116821, + 0.011598304845392704, + 0.001750394469127059, + 0.001897924579679966, + -0.03214159235358238, + -0.03979096934199333, + -0.0012124088825657964, + -0.0019445130601525307, + 0.03173338621854782, + 0.00222737155854702, + -0.028787223622202873, + 0.004854072351008654, + 0.00015002589498180896, + -0.06914612650871277, + -0.027402879670262337, + 0.001524107763543725, + -0.022096235305070877, + -0.0023737922310829163, + 0.0536343939602375, + 0.00867876224219799, + 0.002904013264924288, + -0.012219483964145184, + 0.025805562734603882, + 0.02335634082555771, + 0.010835141874849796, + 0.0023582628928124905, + 0.02907119132578373, + -0.04507986828684807, + 0.04525734856724739, + 0.013337606564164162, + -0.027864327654242516, + -0.03663183003664017, + 0.05214356258511543, + -0.01027608010917902, + -0.04011043533682823, + 0.036702822893857956, + -0.020694144070148468, + -0.014340367168188095, + -0.02994084171950817, + -0.02046342007815838, + 0.021457307040691376, + 0.04593177139759064, + -0.03331295773386955, + -0.015511734411120415, + -0.012831789441406727, + 0.027314141392707825, + -0.02392427623271942, + 0.0367383174598217, + -0.02429698407649994, + 0.010160718113183975, + 0.01867087371647358, + 0.0055329324677586555, + 0.02321435697376728, + 0.03798067569732666, + -0.020889371633529663, + -0.030508777126669884, + -0.008629955351352692, + -0.023817788809537888, + 0.002307237358763814, + -0.04681916907429695, + -2.7644558940664865e-05, + -0.03352593258023262, + 0.012556695379316807, + 0.013807928189635277, + -0.03617038205265999, + 0.04135279357433319, + -0.0035385035444051027, + 0.039187539368867874, + -0.007458588574081659, + -0.033099982887506485, + 0.0014209476066753268, + 0.0018003106815740466, + 0.026923684403300285, + -0.01090613380074501, + -0.018724119290709496, + 0.06964307278394699, + 0.044866893440485, + 0.00814188551157713, + 0.0006039859144948423, + -0.05725498124957085, + -0.10066653788089752, + 0.0033277461770921946, + 0.02539735846221447, + 0.002633356489241123, + -0.02468743920326233, + -0.00925557129085064, + -0.037093278020620346, + -0.03565569221973419, + 0.00438596960157156, + -0.015068034641444683, + 0.01802307367324829, + -0.05512522533535957, + 0.037945181131362915, + 0.005080359056591988, + 0.0370577797293663, + 0.016745219007134438, + 0.033419445157051086, + 0.00660668546333909, + 0.012290475890040398, + 0.04980083182454109, + -0.03579767420887947, + -0.025219878181815147, + -0.03256754204630852, + -0.0015562759945169091, + 0.00996549054980278, + 0.06414119899272919, + 0.005306645762175322, + 0.05619010329246521, + 0.009237823076546192, + 0.018883850425481796, + 0.03961348906159401, + -0.03256754204630852, + 0.00282414723187685, + -0.0022495563607662916, + -0.013550582341849804, + -0.030615264549851418, + 0.031076712533831596, + 0.017898837104439735, + 0.051078684628009796, + 0.05473477020859718, + 0.02383553609251976, + 0.059278253465890884, + -0.03313547745347023, + 0.00208095065318048, + -0.04689016193151474, + -0.033028990030288696, + 0.07113390415906906, + 0.019984224811196327, + -0.02610727772116661, + 0.026834946125745773, + -0.006535693537443876, + -0.0023693551775068045, + 0.025663578882813454, + -0.0012445771135389805, + -0.011225597001612186, + -0.010267206467688084, + -0.003309998195618391, + 0.02158154360949993, + -0.05359889939427376, + 0.033011242747306824, + -0.04667718708515167, + 0.015848945826292038, + 0.03267402946949005, + -0.05512522533535957, + -0.0533149316906929, + -0.005311083048582077, + -0.0243857242166996, + 0.00529333483427763, + 0.006433642469346523, + -0.021084599196910858, + 0.011358707211911678, + 0.00662443321198225, + 0.00957503542304039, + 0.018102940171957016, + -0.021049104630947113, + -0.035282984375953674, + -0.04025241732597351, + 0.011633800342679024, + 0.012308224104344845, + 0.003019375028088689, + 0.030650760978460312, + -0.0679747611284256, + 0.02328534983098507, + 0.02703017368912697, + 0.01738414540886879, + -0.03386314585804939, + 0.006997141055762768, + -0.011811280623078346, + 0.053811874240636826, + -0.008434727787971497, + 0.013665944337844849, + 0.0027043484151363373, + 0.01160717848688364, + -0.02578781358897686, + 0.047387104481458664, + -0.011181226931512356, + 0.011784658767282963, + -0.027491619810461998, + -0.026160521432757378, + -0.014091895893216133, + 0.022238219156861305, + -0.006446953397244215, + -0.0022828339133411646, + 0.015094656497240067, + 0.01738414540886879, + 0.04103332757949829, + -0.021759023889899254, + 0.015174522995948792, + 0.02624926157295704, + -0.02156379446387291, + 0.02335634082555771, + -0.013594952411949635, + -0.021049104630947113, + -0.06744232028722763, + -0.023693552240729332, + -0.04071386530995369, + -0.00738315936177969, + 0.04547032341361046, + 0.021634787321090698, + -0.03152041137218475, + -0.006668803282082081, + 0.008079768158495426, + -0.05012029409408569, + -0.015671465545892715, + 0.013816801831126213, + 0.025610335171222687, + 0.02720765210688114, + -0.016203904524445534, + -0.019824493676424026, + 0.007400907576084137, + 0.024953659623861313, + -0.015582726337015629, + 0.014287123456597328, + -5.806223634863272e-05, + 0.0360993891954422, + -0.07170183956623077, + -0.011119109578430653, + 0.04383751004934311, + -0.011642674915492535, + -0.0487714484333992, + 0.04657069966197014, + -0.011367580853402615, + -0.026763953268527985, + 0.06229540705680847, + -0.04586077854037285, + -0.0178899634629488, + -0.03954249992966652, + -0.012716427445411682, + -0.037554726004600525, + -0.0040997834876179695, + -0.01724216155707836, + 0.022220470011234283, + -0.01867087371647358, + 0.017685862258076668, + -0.00929994136095047, + -0.05377637967467308, + 0.030118321999907494, + 0.036152634769678116, + -0.017508381977677345, + 0.016975942999124527, + -0.0393650196492672, + -0.0009533992852084339, + -0.021049104630947113, + -0.04280812665820122, + -0.005763656459748745, + 0.02314336597919464, + 0.046215739101171494, + 0.06751331686973572, + -0.023640308529138565, + -0.011474069207906723, + 0.03031354956328869, + 0.01828041858971119, + 0.034271348267793655, + 0.010852889157831669, + 0.0006866249605081975, + 0.08362848311662674, + 0.011332085356116295, + -0.025823310017585754, + 0.0002441733668092638, + 0.0177923496812582, + -0.01473082322627306, + 0.02882271818816662, + -0.001486393273808062, + 0.001151400152593851, + -0.003527411026880145, + 0.07014001905918121, + 0.019593769684433937, + 0.04642871394753456, + -0.0029461646918207407, + 0.0481325201690197, + -0.056864526122808456, + 0.007214553654193878, + 0.0308814849704504, + 0.026710709556937218, + -0.03464405611157417, + 0.05913626775145531, + 0.0178899634629488, + 0.018777363002300262, + -0.011234471574425697, + 0.05246302857995033, + 0.016780715435743332, + 0.010213962756097317, + 0.020534412935376167, + -0.07709722220897675, + 0.05065273493528366, + -0.022859398275613785, + -0.050439756363630295, + 0.03345494344830513, + -0.02165253460407257, + -0.016913823783397675, + 0.0009606094099581242, + -0.009770262986421585, + -0.039436012506484985, + -0.024350227788090706, + 0.015156774781644344, + 0.007511832285672426, + 0.05015578866004944, + 0.09051469713449478, + 0.007205679547041655, + 0.02845001220703125, + 0.002571238437667489, + 0.008328239433467388, + -0.03483928367495537, + -0.037235260009765625, + 0.027757840231060982, + 0.009761388413608074, + 0.0336679182946682, + -0.02266417071223259, + -0.04042989760637283, + 0.03389864042401314, + 0.019647013396024704, + 0.011474069207906723, + -0.015769079327583313, + 0.014233879745006561, + -0.018546639010310173, + 0.006056498270481825, + 0.02665746584534645, + 0.017605995759367943, + 0.00929994136095047, + -0.03634786233305931, + -0.055302705615758896, + -0.004831887315958738, + -0.00558617664501071, + -0.015023664571344852, + -0.03469730168581009, + -0.024261487647891045, + 0.01875961385667324, + 0.0024691876024007797, + 0.02727864496409893, + -0.05963321030139923, + 0.03017156571149826, + -0.0009267773129977286, + -0.031165452674031258, + 0.03400512784719467, + -0.01899033784866333, + -0.029124435037374496, + -0.001708243042230606, + 0.0016516713658347726, + 0.0028330213390290737, + 0.042240191251039505, + 0.011349832639098167, + -0.0022761784493923187, + 0.0016494528390467167, + 0.003491915063932538, + 0.0071125030517578125, + -0.0031125519890338182, + -0.012698679231107235, + 0.027491619810461998, + -0.02461644820868969, + -0.07525143027305603, + 0.015955433249473572, + 0.02220272272825241, + -0.023196609690785408, + -0.020498916506767273, + -0.015201144851744175, + -0.01761486940085888, + -0.043802015483379364, + -0.014863932505249977, + -0.08029185980558395, + -0.06715835630893707, + -0.020818380638957024, + 0.045612309128046036, + 0.02007296495139599, + 0.02798856422305107, + -0.00854121521115303, + -0.02820153906941414, + -0.018848353996872902, + 0.04795503988862038, + -0.009504043497145176, + -0.0001365762436762452, + 0.013257740996778011, + 0.006424768827855587, + 0.01719779148697853, + 0.020747387781739235, + 0.025060147047042847, + 0.06651942431926727, + -0.04532834142446518, + 0.020339185371994972, + 0.0037514790892601013, + 0.028503255918622017, + -0.02750936895608902, + 0.010187339968979359, + 0.013373102992773056, + -0.006331591866910458, + -0.006256162654608488, + -0.015760205686092377, + 0.02681719698011875, + -0.005568428430706263, + -0.023888779804110527, + -0.006930585950613022, + -0.012796293012797832, + -0.02142181061208248, + -0.008847367949783802, + 0.008550088852643967, + -0.013160127215087414, + -0.013736936263740063, + -0.03150266408920288, + -0.010222836397588253, + -0.004084253683686256, + -0.02000197395682335, + -0.044866893440485, + -0.018653126433491707, + 0.04397949203848839, + 0.032478801906108856, + 0.0533149316906929, + 0.02734963595867157, + -0.032159339636564255, + -0.005217906087636948, + 0.012840663082897663, + -0.019203314557671547, + -0.02220272272825241, + 0.002928416710346937, + 0.003531847847625613, + -0.04632222652435303, + -0.014393611811101437, + 0.006677677389234304, + 0.020285941660404205, + 0.006375961471349001, + -0.05228554829955101, + -0.047884050756692886, + 0.014553342945873737, + 0.025113390758633614, + -0.01938079297542572, + 0.0004905652604065835, + 0.04745809733867645, + -0.032159339636564255, + -0.023267600685358047, + 0.0015784609131515026, + 0.019363045692443848, + 0.008629955351352692, + 0.02491816319525242, + 0.005612798500806093, + -0.001560712931677699, + 0.01156280841678381, + -0.012317097745835781, + -0.010489055886864662, + -0.0025557090993970633, + 0.028343522921204567, + -0.03201735392212868, + -0.04571879655122757, + 0.005351015832275152, + 0.00320351030677557, + -0.050901204347610474, + -0.026231514289975166, + -0.005674916319549084, + -0.013355354778468609, + 0.028804970905184746, + 0.010329323820769787, + 0.023658057674765587, + -0.010311576537787914, + 0.03336620330810547, + 0.02546835131943226, + -0.03783869370818138, + -0.06676790118217468, + 0.0054974365048110485, + -0.024598699063062668, + 0.06751331686973572, + -0.022397950291633606, + -0.016665352508425713, + 0.02774009294807911, + 0.02672845683991909, + 0.022380203008651733, + -0.003500788938254118, + -0.04859396815299988, + 0.025432854890823364, + -0.03620588034391403, + 0.007023762911558151, + -0.03079274483025074, + 0.02688818983733654, + -0.043269574642181396, + 0.04025241732597351, + 0.003385427175089717, + -0.036383356899023056, + 0.0412818007171154, + -0.005240091122686863, + 0.06101755425333977, + 0.0006855156971141696, + -0.03581542149186134, + -0.018812857568264008, + 0.04767107218503952, + 0.032461054623126984, + -0.012654309161007404, + -0.008785249665379524, + 0.01641688123345375, + 0.017801223322749138, + -0.0025157760828733444, + 0.019948728382587433, + 0.010702031664550304, + -0.008408105000853539, + -0.0141451396048069, + 0.01977124996483326, + 0.009894498623907566, + -0.03986196219921112, + 0.006806350313127041, + 0.020179452374577522, + -0.011136856861412525, + 0.012973773293197155, + 0.028148295357823372, + 0.001048239995725453, + 0.0019533869344741106, + -0.008381483145058155, + -0.06183396279811859, + -0.032194834202528, + 0.006216229870915413, + 0.018014200031757355, + 0.00662443321198225, + 0.029479393735527992, + -0.02493591234087944, + -0.008119700476527214, + -0.013373102992773056, + -0.0011281059123575687, + 0.01059554424136877, + -0.035442713648080826, + 0.006362650543451309, + 0.000334993121214211, + 0.0007121376693248749, + 0.00937980692833662, + -0.048274505883455276, + 0.0021364130079746246, + 0.006220666691660881, + -0.013532834127545357, + 0.004354910459369421, + -0.046464212238788605, + -0.0013433002168312669, + -0.0019145633559674025, + 0.009601657278835773, + 0.041920728981494904, + -0.02314336597919464, + -0.004201834090054035, + 0.030065078288316727, + 0.01922106184065342, + -0.026781700551509857, + -0.018937094137072563, + -0.0009173487196676433, + -0.006566752679646015, + 0.022948138415813446, + -0.011110235005617142, + 0.0168339591473341, + 0.013852298259735107, + 0.006100867874920368, + -0.011855650693178177, + 0.02337408997118473, + -0.016567738726735115, + -0.026462238281965256, + 9.532606054563075e-05, + -0.008811871521174908, + 0.0333484522998333, + 0.04465391859412193, + -0.010515677742660046, + 0.03597515448927879, + -0.018848353996872902, + -0.005067048128694296, + -0.038264643400907516, + -0.04994281381368637, + 0.016106290742754936, + -0.021386316046118736, + 0.010160718113183975, + -0.013071387074887753, + -0.028804970905184746, + 0.02220272272825241, + -0.01375468447804451, + 0.033011242747306824, + -0.015928812325000763, + -0.032709527760744095, + -0.036773812025785446, + 0.012672057375311852, + 0.004232893232256174, + 0.01050680410116911, + -0.0002823038084898144, + 0.0007126923301257193, + -0.029656874015927315, + -0.011651548556983471, + 0.041991718113422394, + -0.0396844819188118, + -0.04078485816717148, + -0.025273123756051064, + -0.005839085206389427, + -0.013373102992773056, + -0.03503451123833656, + -0.036844804883003235, + -0.030278053134679794, + -0.002702130004763603, + -0.034892529249191284, + 0.01196213811635971, + 0.009832380339503288, + -0.010639913380146027, + -0.005257838871330023, + -0.02337408997118473, + 0.0012956025311723351, + -0.04007493704557419, + -0.004368221387267113, + -0.001297821057960391, + 0.005262276157736778, + 0.059207260608673096, + -0.006926149129867554, + -0.030597517266869545, + -0.018564386293292046, + -0.05086570978164673, + -0.009051470085978508, + -0.01285841129720211, + 0.021066851913928986, + -0.01962926611304283, + -0.02711891382932663, + -0.009433051571249962, + -0.004836324602365494, + -0.04018142446875572, + 0.0050759222358465195, + 0.015609348192811012, + 0.024101756513118744, + -0.013053638860583305, + 0.025663578882813454, + -0.013781306333839893, + -0.0487714484333992, + -0.01954052597284317, + 0.0261782705783844, + -0.010063104331493378, + 0.008248373866081238, + -0.025361862033605576, + 4.634579818230122e-05, + -0.014899428933858871, + 0.008754190988838673, + -0.01157168298959732, + -0.006806350313127041, + -0.02158154360949993, + 0.01410076953470707, + -0.005657168570905924, + -0.015627095475792885, + -0.04795503988862038, + 0.015281010419130325, + 0.018351411446928978, + 0.01685170643031597, + -0.002562364563345909, + -0.006429205648601055, + 0.02335634082555771, + -0.0007337680435739458, + -0.044263459742069244, + -0.06215342506766319, + -0.017091304063796997, + 0.013053638860583305, + -0.0032146028243005276, + 0.0018424621084704995, + 0.02971011772751808, + 0.009459673427045345, + -0.045221854001283646, + 0.009424176998436451, + 0.023178860545158386, + 0.016390258446335793, + 0.0012911654775962234, + -0.0070104519836604595, + -0.033561430871486664, + 0.03702228516340256, + 0.04969434440135956, + -0.03437783569097519, + 0.017206666991114616, + -0.019948728382587433, + 0.022131729871034622, + -0.003270065179094672, + 0.004115312825888395, + -0.023817788809537888, + 0.014659831300377846, + 0.013550582341849804, + -0.009486295282840729, + 0.00881630927324295, + -0.03409386798739433, + -0.03375665843486786, + 0.020747387781739235, + -0.013355354778468609, + 0.02500690333545208, + -0.0068374089896678925, + 0.012822914868593216, + -0.017783476039767265, + -0.0011624926701188087, + 0.0029683494940400124, + -0.0355846993625164, + -0.020729640498757362, + -0.02140406332910061, + 0.02882271818816662, + -0.024740682914853096, + 0.06651942431926727, + -0.007392033468931913, + 0.002983879065141082, + -0.013683692552149296, + 0.030420036986470222, + 0.000557952094823122, + -0.03570893406867981, + 0.012618813663721085, + 0.013745809905230999, + 0.026125026866793633, + -0.006708736531436443, + -0.014704201370477676, + -0.006353776901960373, + -0.005319956690073013, + -0.009175705723464489, + -0.03386314585804939, + 0.022096235305070877, + -0.040678370743989944, + -0.009237823076546192, + -0.007325478829443455, + -0.030508777126669884, + 0.049587856978178024, + 0.01761486940085888, + -0.0034475449938327074, + 0.01535200234502554, + -0.00662443321198225, + -0.020658647641539574, + 0.046606194227933884, + -0.024421220645308495, + 0.011979886330664158, + 0.006948334164917469, + 0.041991718113422394, + 0.008390357717871666, + 0.026444489136338234, + -0.02836127206683159, + 0.01293827686458826, + -0.004432558082044125, + 0.01701143942773342, + -0.013071387074887753, + -0.022167226299643517, + -0.013807928189635277, + -0.025574838742613792, + -0.025805562734603882, + -0.018156183883547783, + 0.040358904749155045, + -0.00674423249438405, + -0.010160718113183975, + 0.031449418514966965, + 0.038016173988580704, + -0.03634786233305931, + -0.03593965992331505, + -0.023249853402376175, + -0.016390258446335793, + -0.03109445981681347, + -0.013692566193640232, + -0.021688031032681465, + 0.0014009810984134674, + -0.0037736641243100166, + -0.010027608834207058, + 0.05807138979434967, + 0.03688030317425728, + 0.019505029544234276, + 0.03308223560452461, + -0.026373498141765594, + 0.027260897681117058, + -0.02626701071858406, + -0.04767107218503952, + -0.04082035273313522, + 0.002411506837233901, + -0.005368764046579599, + 0.030136069282889366, + 0.016727471724152565, + 0.016940446570515633, + -0.0002433414338156581, + 0.05246302857995033, + -0.008212877437472343, + 0.0002978332922793925, + 0.05807138979434967, + -0.03819365054368973, + -0.0159376859664917, + -0.002606734400615096, + -0.03281601518392563, + -0.048097025603055954, + 0.007081443909555674, + 0.0093443114310503, + 0.04046539217233658, + -0.005626109428703785, + 0.002344951732084155, + -0.019238809123635292, + -0.02578781358897686, + -0.0282902792096138, + -0.005142476875334978, + -0.0037514790892601013, + -0.014837310649454594, + -0.003755916142836213, + 0.003394301049411297, + -0.021865511313080788, + -0.03281601518392563, + -0.026000790297985077, + -0.004297229461371899, + -0.014704201370477676, + 0.010391442105174065, + -0.04603825882077217, + 0.001153618679381907, + -0.03134293109178543, + 0.006926149129867554, + 0.042169198393821716, + 0.041210807859897614, + 0.02736738510429859, + 0.010560047812759876, + -0.007174620870500803, + 0.0073387897573411465, + 0.0018003106815740466, + 0.016869455575942993, + -0.007023762911558151, + -0.020445672795176506, + 0.002342733321711421, + 0.008878426626324654, + -0.02241569757461548, + 0.03595740720629692, + -0.029035694897174835, + 0.015263262204825878, + 0.01946953311562538, + -0.0396844819188118, + 0.010205088183283806, + 0.008536778390407562, + 0.00595888402312994, + -0.06666141003370285, + 0.0022894893772900105, + 0.000965046405326575, + 0.027012424543499947, + -0.026373498141765594, + -0.010142970830202103, + -0.06350227445363998, + -0.019327549263834953, + 0.003245661733672023, + 0.023303097113966942, + 0.05917176604270935, + -0.00640702061355114, + -0.020445672795176506, + -0.0021020262502133846, + 0.0064513906836509705, + -0.021120095625519753, + -0.0017370835412293673, + -0.015564978122711182, + -0.0093443114310503, + 0.022255966439843178, + -0.03444882854819298, + -0.02397751994431019, + -0.012450207956135273, + -0.009663774631917477, + -0.01125221885740757, + -0.018617630004882812, + -0.008088641799986362, + -0.016337014734745026, + 0.006446953397244215, + 0.028432263061404228, + 0.006118616089224815, + 0.01625715009868145, + -0.0020632026717066765, + -0.031005719676613808, + 0.010293828323483467, + 0.03925853222608566, + 0.02507789433002472, + 0.021315323188900948, + 0.01531650684773922, + 0.04507986828684807, + 0.04018142446875572, + 0.03313547745347023, + -0.03688030317425728, + 0.033951885998249054, + 0.004226237535476685, + 0.007893414236605167, + 0.005444192793220282, + 0.005577302537858486, + -0.0007143561961129308, + 0.013319858349859715, + 0.002083169063553214, + -0.01071090530604124, + 0.014020903967320919, + -0.02976336143910885, + -0.01582232303917408, + -0.013701439835131168, + -0.006966081913560629, + -0.005750345531851053, + 0.011598304845392704, + -0.023001382127404213, + 0.0064203315414488316, + 0.01019621454179287, + 0.0006771963671781123, + 0.02001972123980522, + -0.0370577797293663, + -0.012308224104344845, + 0.02734963595867157, + 0.03306448459625244, + -0.010835141874849796, + 0.020179452374577522, + -0.009291067719459534, + 0.007835732772946358, + -0.01657661236822605, + -0.017330901697278023, + -0.024261487647891045, + 0.007906724698841572, + -0.03790968284010887, + 0.008887301199138165, + 0.010302701964974403, + -0.004110876005142927, + 0.024509960785508156, + 0.006047624163329601, + 0.036702822893857956, + -0.03420035541057587, + -0.01579570211470127, + 0.007006015162914991, + -0.005697101354598999, + -0.0016616545617580414, + -0.009903372265398502, + -0.023267600685358047, + -0.01090613380074501, + -0.0001421224878868088, + -0.0299230944365263, + -0.013665944337844849, + -0.005994379986077547, + 0.018102940171957016, + 0.002793088322505355, + 0.03288700804114342, + 0.005750345531851053, + 0.004787517711520195, + 0.033170975744724274, + -0.015298758633434772, + 0.036383356899023056, + 0.04649970680475235, + -0.007130250800400972, + 0.006859594024717808, + 0.01191776804625988, + -0.013035890646278858, + 0.0063493396155536175, + -0.0007814657292328775, + 0.043731022626161575, + 0.01187339797616005, + 0.03540721908211708, + 0.06268586218357086, + -0.0016904950607568026, + 0.033330705016851425, + 0.00312586291693151, + 0.005195721052587032, + 0.02798856422305107, + 0.03063301369547844, + 0.019167818129062653, + -0.03320647031068802, + 0.05682903155684471, + 0.009149083867669106, + 0.01391441561281681, + -0.02103135548532009, + -0.008749754168093204, + 0.003840218996629119, + -0.025805562734603882, + 0.011491816490888596, + -0.015254388563334942, + -0.021528299897909164, + -0.01641688123345375, + 0.022397950291633606, + 0.01930980198085308, + 0.009362059645354748, + 0.02876947447657585, + -0.007139124907553196, + -0.006495760753750801, + 0.014872807078063488, + 0.024563204497098923, + 0.011127983219921589, + -0.014304871670901775, + -0.0016095199389383197, + -0.006690988317131996, + 0.008274995721876621, + 0.007037073839455843, + 0.014721949584782124, + -0.00527558708563447, + -0.009184579364955425, + -0.012095248326659203, + 0.015005916357040405, + -0.032798267900943756, + -0.016097417101264, + -0.0009129117242991924, + -0.007179057691246271, + 0.00594113627448678, + 0.011083613149821758, + -0.03393413871526718, + -0.03579767420887947, + 0.0064868866465985775, + -0.005705975461751223, + -0.04330506920814514, + 0.004578978754580021, + -0.014642083086073399, + -0.015990929678082466, + 0.017801223322749138, + 0.006464701611548662, + 0.0007121376693248749, + -0.0052001578733325005, + 0.00646913843229413, + 0.0011458538938313723, + -0.015210018493235111, + -0.01747288554906845, + -0.009628279134631157, + 0.02836127206683159, + -0.008785249665379524, + 0.009308815002441406, + -0.014003155753016472, + -0.02758035995066166, + 0.01410964410752058, + 0.007161309942603111, + 0.018883850425481796, + -0.016478998586535454, + -0.03492802381515503, + -0.025450602173805237, + -0.0017293187556788325, + 0.0005304982187226415, + -0.012796293012797832, + 0.013497338630259037, + 0.00437931390479207, + 0.018617630004882812, + 0.005612798500806093, + -0.004632222466170788, + -0.021084599196910858, + 0.004618911538273096, + 0.024953659623861313, + -0.03214159235358238, + -0.01687832921743393, + 0.017055807635188103, + -0.0010881730122491717, + 0.019238809123635292, + -0.03203510493040085, + 0.01227272767573595, + -0.036702822893857956, + 0.012618813663721085, + -0.028591996058821678, + 0.021350819617509842, + -0.0352652370929718, + -0.01117235329002142, + -0.013319858349859715, + 0.005018241237848997, + -0.012902781367301941, + 0.007494084537029266, + -0.004991619382053614, + 0.045363835990428925, + 0.0013543927343562245, + 0.0049383752048015594, + 0.0057370346039533615, + 0.028964702039957047, + -0.015156774781644344, + -0.0027553739491850138, + -4.204746073810384e-05, + 0.0007920035859569907, + 0.026604222133755684, + -0.010329323820769787, + 0.03127194195985794, + 0.005102544091641903, + -0.008243936114013195, + -0.0053377049043774605, + 0.016567738726735115, + 0.023782292380928993, + 0.0006483558681793511, + 0.035904161632061005, + -0.023959772661328316, + -0.021368566900491714, + 0.005262276157736778, + -0.008115263655781746, + 0.012485703453421593, + -0.006398146506398916, + -0.010994873009622097, + -0.04259515181183815, + 0.00881630927324295, + -0.007613883353769779, + -0.022167226299643517, + -0.007702623028308153, + -0.006473575718700886, + -0.0390455536544323, + -0.051291659474372864, + 0.014278249815106392, + -0.014828437007963657, + 0.0026688524521887302, + 0.00304821552708745, + -0.015298758633434772, + -0.005559554789215326, + 0.029798857867717743, + 0.0030326859559863806, + 0.006850719917565584, + 0.007165746763348579, + 0.01120784878730774, + 0.03432459384202957, + 0.022380203008651733, + 0.021279826760292053, + -0.015769079327583313, + -0.004261733498424292, + -0.03625912219285965, + 0.016177283599972725, + 0.025699075311422348, + -0.022948138415813446, + -0.017135674133896828, + 0.02062315307557583, + -0.019238809123635292, + -0.022096235305070877, + 0.0001421224878868088, + 0.02314336597919464, + -0.023817788809537888, + 0.036152634769678116, + 0.03773220628499985, + -0.00020368579134810716, + -0.031538158655166626, + 0.0055329324677586555, + -0.027385132387280464, + 0.0026577599346637726, + 0.006859594024717808, + -0.017641492187976837, + 0.0269769299775362, + 0.019913233816623688, + 0.01970025710761547, + 0.021865511313080788, + 0.03178663179278374, + -0.014863932505249977, + -0.023871032521128654, + -0.009362059645354748, + -0.015147900208830833, + -0.0014165106695145369, + -0.024669691920280457, + 0.017508381977677345, + 0.018724119290709496, + -0.010737528093159199, + 0.008252810686826706, + 0.007125813979655504, + 0.036454349756240845, + -0.016958193853497505, + -0.009646027348935604, + -0.023161113262176514, + 0.028698483482003212, + 0.024651944637298584, + 0.027935320511460304, + -0.01852888986468315, + 0.019363045692443848, + 0.019274305552244186, + 0.007396470755338669, + -0.02477617934346199, + -0.030295800417661667, + -0.013417473062872887, + 0.05164662003517151, + 0.006983830127865076, + 0.00023127836175262928, + -0.009867876768112183, + 3.334679058752954e-05, + 0.0013477371539920568, + 0.021794518455863, + 0.005106981378048658, + -0.025184383615851402, + -0.0022207158617675304, + -0.007179057691246271, + -0.03652534261345863, + -0.005106981378048658, + -0.002759810769930482, + 0.026692962273955345, + -0.009521790780127048, + -0.02273516170680523, + -0.037483733147382736, + -0.006753106135874987, + 0.055764153599739075, + 0.007525143213570118, + 0.038477618247270584, + -0.015174522995948792, + -0.02484717220067978, + -0.02782883122563362, + 0.010852889157831669, + 0.0018502268940210342, + 0.004996056202799082, + -0.005053737200796604, + -0.012121870182454586, + 0.0010105256224051118, + -0.03581542149186134, + -0.010107474401593208, + 0.020889371633529663, + -0.000744305900298059, + 0.019274305552244186, + 0.02023269608616829, + 0.0089449817314744, + 0.01731315441429615, + 0.012618813663721085, + -0.025752319023013115, + -0.01641688123345375, + -0.0003416486142668873, + 0.02087162435054779, + 0.013009268790483475, + -0.029639126732945442, + -0.016097417101264, + -0.03940051421523094, + 0.023249853402376175, + 0.03070400469005108, + 0.000706591468770057, + 0.0300828255712986, + 0.012672057375311852, + -0.016700848937034607, + 0.009850128553807735, + -0.0036982353776693344, + 0.01543186791241169, + 0.0364188551902771, + 0.0008901720866560936, + -0.03444882854819298, + 0.013541708700358868, + 0.015653718262910843, + -0.014473477378487587, + 0.0013277707621455193, + 0.035282984375953674, + 0.01899033784866333, + 0.012769671157002449, + -0.008598895743489265, + 0.018724119290709496, + -0.0007276671822182834, + -0.029337409883737564, + 0.0168339591473341, + -0.02305462583899498, + 0.035602446645498276, + 0.006682114209979773, + -0.019345298409461975, + 0.008856241591274738, + 0.009202327579259872, + -0.022326959297060966, + 0.025113390758633614, + 0.02663971669971943, + -0.019718006253242493, + -0.008257247507572174, + -0.026373498141765594, + 0.025894302874803543, + -0.005195721052587032, + -0.011864524334669113, + 0.01793433353304863, + -0.010391442105174065, + -0.003097022417932749, + -0.001344409422017634, + -0.03922303393483162, + 0.02195425145328045, + -0.004867383278906345, + 0.021705778315663338, + -0.020108461380004883, + -0.003966673277318478, + -0.004911753349006176, + 0.010222836397588253, + -0.008297180756926537, + -0.004836324602365494, + 0.029053442180156708, + 0.02431473135948181, + -0.009752514772117138, + -0.021208835765719414, + -0.023888779804110527, + 0.008514593355357647, + -0.019558273255825043, + 0.026000790297985077, + 0.04195622354745865, + -0.06424768269062042, + -0.014828437007963657, + -0.019114574417471886, + -0.005129165947437286, + -0.007019326090812683, + -0.010027608834207058, + 0.018191678449511528, + 0.01690495014190674, + 0.004195178858935833, + -0.01749950833618641, + -0.0263380017131567, + 0.008199566975235939, + 0.0035850917920470238, + 0.01071090530604124, + 0.008785249665379524, + 0.01669197529554367, + 0.012281602248549461, + -0.04593177139759064, + -0.02601853758096695, + 0.01836915872991085, + 0.008887301199138165, + -0.015689214691519737, + -0.03063301369547844, + -0.006806350313127041, + -0.039577994495630264, + -0.000306984584312886, + 0.06584500521421432, + 0.018848353996872902, + -0.0032611913047730923, + 0.02431473135948181, + -0.015848945826292038, + 0.0030948040075600147, + -0.02062315307557583, + -0.019664760679006577, + 0.014970420859754086, + 0.01962926611304283, + -0.018493395298719406, + 0.006810787133872509, + 0.05704200640320778, + 0.025184383615851402, + 0.030544273555278778, + 0.023267600685358047, + 0.05047525465488434, + 0.026852693408727646, + -0.04742260277271271, + 0.01579570211470127, + -0.02158154360949993, + 0.019647013396024704, + 0.00018358066154178232, + 0.027633603662252426, + -0.0367383174598217, + 0.004703214392066002, + -0.004836324602365494, + -0.0006361541454680264, + 0.01586669310927391, + -0.0008835166227072477, + 0.018866103142499924, + 0.003498570527881384, + -0.012707553803920746, + 0.001226829132065177, + 0.023107869550585747, + 0.042701639235019684, + 0.006997141055762768, + 0.018777363002300262, + 0.0017404112732037902, + 0.005395385902374983, + 0.011048117652535439, + 0.017561625689268112, + 0.012254980392754078, + 0.014198383316397667, + 0.007059258874505758, + -0.0015363094862550497, + 0.004916190169751644, + -0.005053737200796604, + -0.01899033784866333, + -0.014127391390502453, + -0.008146322332322598, + 0.014313745312392712, + 0.005506310611963272, + 0.01586669310927391, + 0.041459280997514725, + -0.01383455004543066, + 0.015050286427140236, + 0.003380990121513605, + -0.024722935631871223, + 0.024563204497098923, + 0.005319956690073013, + 0.021279826760292053, + 0.01222835760563612, + -0.018156183883547783, + -0.004654407501220703, + -0.012654309161007404, + 0.005719286389648914, + 0.01701143942773342, + 0.014402485452592373, + 0.0005928934551775455, + 0.013266614638268948, + -0.022770658135414124, + 0.026941433548927307, + -0.038477618247270584, + 0.03666732460260391, + -0.018724119290709496, + 0.016434628516435623, + -0.022788405418395996, + -0.031076712533831596, + -0.01907907798886299, + 0.002611171454191208, + 0.02955038659274578, + 0.03033129684627056, + 0.0011403076350688934, + 0.017872216179966927, + -0.011456320993602276, + 0.014020903967320919, + -0.020303688943386078, + -0.0014753007562831044, + 0.053563401103019714, + -0.029053442180156708, + -0.017366398125886917, + -0.02110234834253788, + -0.04635772109031677, + 0.0015784609131515026, + -0.02158154360949993, + -0.04344705492258072, + 0.009450798854231834, + -0.018848353996872902, + -0.016514495015144348, + 0.012130743823945522, + 0.0060964310541749, + 0.0005851287278346717, + -0.04429895803332329, + -0.01812068745493889, + 0.029426150023937225, + 0.0007842388586141169, + -0.0034453265834599733, + -0.005466377828270197, + 0.006265036761760712, + -0.01598205603659153, + 0.010852889157831669, + 0.01786334067583084, + -0.03281601518392563, + -0.014739696867763996, + 0.005688227713108063, + 0.02914218232035637, + -0.00527558708563447, + -0.012867284938693047, + 0.04082035273313522, + -0.011048117652535439, + 0.020356932654976845, + 0.014198383316397667, + 0.033011242747306824, + 0.0017947644228115678, + 0.011926642619073391, + 0.01277854572981596, + -0.017481759190559387, + -0.002935072174295783, + 0.03267402946949005, + 0.017650365829467773, + 0.0009916683193296194, + -0.002462532138451934, + -0.015218892134726048, + -0.01148294284939766, + -0.025503845885396004, + -0.01117235329002142, + -0.04167225584387779, + -0.004035446792840958, + -0.01253894716501236, + 0.009264444932341576, + 0.008448038250207901, + -0.008612207137048244, + 0.003416486084461212, + -0.0010010970290750265, + -0.0064868866465985775, + 0.022220470011234283, + 0.027544863522052765, + 0.0403234101831913, + 0.002779777394607663, + -0.01589331589639187, + -0.02931966260075569, + -0.01812068745493889, + -0.0006461373995989561, + -0.030029581859707832, + 0.025361862033605576, + -0.0007714824751019478, + 0.004419247154146433, + -0.043340567499399185, + 0.0044835833832621574, + 0.005164661910384893, + 0.010533425956964493, + 0.008390357717871666, + 0.0640702098608017, + 0.0004816912696696818, + -0.000611750700045377, + 0.015289884060621262, + -0.0002527700562495738, + -0.016798462718725204, + -0.002717659343034029, + -0.021244332194328308, + 0.021759023889899254, + 0.019487282261252403, + -0.009246697649359703, + 0.027935320511460304, + 0.051291659474372864, + 0.006930585950613022, + 0.017996450886130333, + -0.015698088333010674, + -0.018386906012892723, + 0.033738911151885986, + -0.030526524409651756, + -0.01813843473792076, + 0.0054086968302726746, + 0.021705778315663338, + 0.0003799176774919033, + 0.017712483182549477, + -0.03751922771334648, + -0.035211991518735886, + -0.02820153906941414, + 0.014251627959311008, + -0.023888779804110527, + -0.014926050789654255, + ], + "index": 16, + }, + { + "title": "Preston Sturges", + "text": "Preston Sturges (/\u02c8st\u025crd\u0292\u026as/; born Edmund Preston Biden; August 29, 1898 \u2013 August 6, 1959) was an American playwright, screenwriter, and film director.", + "vector": [ + 0.00044372514821588993, + 0.04317275434732437, + -0.030205989256501198, + 0.006393750198185444, + -0.035494279116392136, + 0.01280990894883871, + -0.04580195993185043, + -0.008888508193194866, + -0.057304736226797104, + 0.041738640516996384, + 0.020152265205979347, + 0.08658452332019806, + -0.03274556249380112, + 0.006434831768274307, + 0.013325292617082596, + 0.005710306111723185, + -0.03991612419486046, + 0.013063866645097733, + -0.0015060045989230275, + -0.030594393610954285, + 0.1147887334227562, + -0.035285137593746185, + -0.07003247737884521, + 0.0316699780523777, + 0.08377605676651001, + 0.0423959419131279, + -0.0023677791468799114, + 0.043202631175518036, + 0.019943123683333397, + 0.016776125878095627, + -0.033701635897159576, + 0.006457239855080843, + 0.011973343789577484, + -0.02278147079050541, + 0.019987938925623894, + 0.039348453283309937, + -0.03140108287334442, + 0.05058233439922333, + -0.010449599474668503, + 0.041141096502542496, + -0.014057287946343422, + -0.005056739319115877, + 0.0034713733475655317, + -0.0019009456736966968, + -0.0039923591539263725, + 0.03310409188270569, + -0.014804220758378506, + -0.043889809399843216, + -0.03352237492799759, + 0.04858055338263512, + 0.002586257178336382, + -0.009695196524262428, + 0.010927636176347733, + 0.03588268160820007, + -0.00542273698374629, + -0.016193516552448273, + 0.003036284586414695, + 0.026321934536099434, + -0.021989721804857254, + 0.023871993646025658, + 0.006154731847345829, + 0.004171623382717371, + -0.007312478497624397, + -0.0035367298405617476, + 0.06232412904500961, + 0.03773507848381996, + 0.0569760836660862, + 0.0029541219118982553, + 0.04123072698712349, + 0.05443651229143143, + 0.03447844833135605, + -0.04006551206111908, + -0.005198657047003508, + 0.03134132921695709, + 0.009276913478970528, + -0.0393783301115036, + -0.03178948909044266, + -0.009814705699682236, + 0.003430292010307312, + -0.012847255915403366, + 0.04143986850976944, + -0.01782183162868023, + -0.06590940803289413, + -0.01245884969830513, + 0.02209429256618023, + -0.017119714990258217, + 0.026187486946582794, + -0.0662679374217987, + 0.08969177305698395, + 0.018972110003232956, + 0.06453505158424377, + 0.0006082839099690318, + 0.0039176661521196365, + -0.06399726122617722, + 0.001890675281174481, + 0.02325950749218464, + 0.05279325693845749, + 0.008918385952711105, + -0.0040894607082009315, + -0.034657713025808334, + -0.019330637529492378, + 0.011248817667365074, + -0.010001438669860363, + 0.017657507210969925, + 0.022408002987504005, + -0.00665891170501709, + -0.05554197356104851, + -0.018434317782521248, + 0.016895635053515434, + 0.02575426548719406, + 0.02581402100622654, + -0.007129479665309191, + 0.016641678288578987, + 0.024559171870350838, + -0.024738436564803123, + 0.011293633840978146, + -0.004784108605235815, + 0.0342693068087101, + 0.05126951262354851, + 0.017657507210969925, + -0.015924621373414993, + -0.018284931778907776, + 0.0016665952280163765, + -0.004208969883620739, + 0.03546440228819847, + 0.006218221038579941, + -0.0020671384409070015, + 0.04562269523739815, + 0.031281571835279465, + -0.00953087117522955, + -0.027770986780524254, + -0.003456434467807412, + -0.008335777558386326, + -0.0156258475035429, + 0.025649694725871086, + 0.0568864531815052, + -0.008656959049403667, + 0.00493723014369607, + 0.035554032772779465, + 0.0053667169995605946, + -0.004735558293759823, + -0.020839443430304527, + 0.023229630663990974, + -0.039199069142341614, + -0.0235433429479599, + -0.04923785477876663, + 0.06262290477752686, + 0.027442336082458496, + -0.02092907577753067, + -0.01602919213473797, + -0.0037290651816874743, + 0.033014457672834396, + -0.030116356909275055, + -0.001271654269658029, + 0.019255945459008217, + -0.006976358592510223, + -0.049058590084314346, + -0.01322072185575962, + -0.011965873651206493, + -0.002845816547051072, + -0.02615761011838913, + 0.06393750756978989, + -0.03247666731476784, + -0.006629034411162138, + 0.005101555492728949, + -0.009486055001616478, + -0.007835332304239273, + -0.02167600952088833, + -0.005123963579535484, + 0.0039512780494987965, + 0.003594617359340191, + 0.05013417452573776, + -0.0055310423485934734, + -0.06698499619960785, + -0.030265742912888527, + 0.002679623896256089, + 0.01705995947122574, + 0.031132185831665993, + -0.022602206096053123, + 0.05452614277601242, + 0.05422737076878548, + 0.011136777698993683, + 0.0036375659983605146, + -0.013004111126065254, + -0.022661961615085602, + 0.026829849928617477, + 0.03077365830540657, + 0.03077365830540657, + 0.04179839789867401, + -0.05431700125336647, + -0.010950044728815556, + 0.02278147079050541, + 0.0214071124792099, + -0.026874665170907974, + 0.038930170238018036, + -0.03271568566560745, + -0.022348249331116676, + 0.015536216087639332, + -0.050492700189352036, + 0.016910573467612267, + 0.03447844833135605, + -0.022124169394373894, + 0.06304118037223816, + 0.015237442217767239, + -0.0010466405656188726, + -0.009426300413906574, + 0.0020615363027900457, + 0.06017296016216278, + -0.043262384831905365, + 0.04117097333073616, + 0.020137326791882515, + -0.03152059018611908, + 0.01679106429219246, + -0.004186562262475491, + -0.06262290477752686, + 0.0008524378063157201, + -0.053928595036268234, + 0.024813128635287285, + 0.03973685950040817, + -0.020197080448269844, + -0.014236551709473133, + 0.003910196479409933, + -0.04054354876279831, + -0.053719453513622284, + 0.02360309660434723, + 0.03331323340535164, + -0.01637278124690056, + 0.030191050842404366, + 0.0668654814362526, + 0.03131145238876343, + 0.008970670402050018, + -0.017030082643032074, + -0.05500417947769165, + 0.04657876864075661, + -0.022258616983890533, + 0.010173234157264233, + 0.004130541812628508, + 0.020047694444656372, + -0.0633399561047554, + -0.028936201706528664, + -0.019644349813461304, + 0.0074207838624715805, + -0.009814705699682236, + 0.04170876368880272, + -0.009971561841666698, + 0.010068663395941257, + 0.02024189755320549, + -0.028951140120625496, + 0.021511683240532875, + 0.008126636035740376, + 0.0004448922409210354, + -0.019509902223944664, + 0.014580140821635723, + -0.00956821721047163, + 0.02497745491564274, + -0.010038785636425018, + -0.015297196805477142, + -0.0028402144089341164, + -0.009329198859632015, + -0.028308779001235962, + -0.046250119805336, + -0.017164530232548714, + 0.05031343922019005, + -0.0037850853987038136, + -0.0629216730594635, + -0.030071541666984558, + 0.0038205645978450775, + -0.06722401082515717, + 0.014415815472602844, + -0.03274556249380112, + 0.024125950410962105, + -0.029683135449886322, + 0.020958952605724335, + 0.04084232077002525, + -0.04445748031139374, + -0.00977735873311758, + -0.0018066453048959374, + -0.04018501937389374, + -0.0004637989914044738, + 0.015229973010718822, + -0.02939930185675621, + -0.045533064752817154, + 0.008410470560193062, + 0.009859521873295307, + -0.014415815472602844, + 0.007558966521173716, + 0.003854176728054881, + -0.028966080397367477, + 0.022079352289438248, + -0.007006235886365175, + -0.0033798739314079285, + 0.019644349813461304, + 0.040095388889312744, + 0.04568244889378548, + -0.022183923050761223, + 0.02284122444689274, + -0.01749318093061447, + -0.0004642658168449998, + 0.021586377173662186, + -0.014363530091941357, + 0.03193887323141098, + 0.06447529792785645, + -0.0035628725308924913, + 0.009762420319020748, + -0.02836853265762329, + 0.02539573796093464, + -0.04810251295566559, + -0.02064524032175541, + -0.0011213338002562523, + -0.043053243309259415, + -0.006856848951429129, + 0.008044472895562649, + 0.020570548251271248, + 0.02045103721320629, + -0.003129651304334402, + 0.020869320258498192, + 0.08162488788366318, + -0.014251490123569965, + -0.01892729476094246, + 0.0010569108417257667, + 0.02493263967335224, + -0.018329747021198273, + -0.03779483214020729, + -0.03235715627670288, + 0.07319948077201843, + -0.042784348130226135, + -0.011181593872606754, + 0.035912562161684036, + -0.04096183180809021, + -0.0030717637855559587, + -0.018299870193004608, + -0.069375179708004, + 0.000432754575740546, + -0.056139517575502396, + 0.06877763569355011, + -0.0028159392531961203, + -0.043949563056230545, + 0.03456807881593704, + 0.01414691936224699, + -0.015805112197995186, + 0.05168779566884041, + -0.01318337582051754, + -0.020958952605724335, + 0.05602001026272774, + -0.002429401036351919, + -0.016193516552448273, + 0.0754104033112526, + 0.016686493530869484, + 0.008403001353144646, + 0.0008459021337330341, + 0.0006666381377726793, + -0.013235661201179028, + -0.03205838426947594, + -0.0027860617265105247, + 0.04451723396778107, + -0.014535324648022652, + 0.04287398234009743, + 0.00925450585782528, + 0.0067186662927269936, + 0.005512368865311146, + 0.031699854880571365, + 0.0022295964881777763, + 0.02835359424352646, + -0.028263961896300316, + -0.011457959190011024, + 0.0018309206934645772, + 0.035822927951812744, + -0.024529295042157173, + 0.02340889535844326, + -0.0254704300314188, + -0.01170444767922163, + -0.01394524797797203, + -0.0005083815776742995, + -0.033552251756191254, + 0.006042691878974438, + 0.03860152140259743, + -0.007768108043819666, + 0.0666862204670906, + -0.013213252648711205, + 0.013071335852146149, + -0.03809360787272453, + 0.02201959863305092, + -0.03627108782529831, + 0.010068663395941257, + 0.01714959181845188, + -0.014019940979778767, + 0.007656068075448275, + -0.0148714454844594, + 0.0023304324131458998, + -0.05258411541581154, + -0.04992503300309181, + 0.014654834754765034, + -0.0227067768573761, + -0.0009392688516527414, + 0.0008533714571967721, + -0.02249763533473015, + 0.008925855159759521, + 0.0028364798054099083, + 0.008559857495129108, + 0.05252436175942421, + 0.004171623382717371, + -0.00829843059182167, + 0.021168094128370285, + -0.0449952706694603, + 0.0021119543816894293, + 0.004365826025605202, + -0.016148701310157776, + 0.00774569995701313, + 0.006393750198185444, + 0.0018551959656178951, + 0.0018309206934645772, + -0.043471526354551315, + -0.03821311518549919, + 0.06345946341753006, + 0.05897786468267441, + 0.02600822225213051, + 0.02024189755320549, + 0.005217330064624548, + 0.010367436334490776, + -0.012884601950645447, + 0.004679538309574127, + 0.005773795768618584, + -0.01033008936792612, + -0.035613786429166794, + 0.02306530438363552, + 0.02325950749218464, + 0.00994168408215046, + 0.003646902507171035, + -0.04108133912086487, + 0.031012676656246185, + -0.009545809589326382, + -0.04819214716553688, + -0.04042403772473335, + 0.035344891250133514, + -0.020600425079464912, + -0.03337298706173897, + -0.03244679048657417, + -0.03313396871089935, + 0.08019077777862549, + 0.028413347899913788, + 0.004518947564065456, + -0.007043582387268543, + -0.006927807815372944, + -0.021929966285824776, + -0.026277119293808937, + 0.038930170238018036, + -0.06423627585172653, + -0.007917494513094425, + 0.012107791379094124, + -0.025096964091062546, + -0.007204173132777214, + 0.005587062332779169, + 0.009022955782711506, + 0.002410727785900235, + 0.017254162579774857, + -0.07774083316326141, + -0.015476461499929428, + 0.006289179902523756, + 0.009105118922889233, + 0.02512684091925621, + 0.002599328523501754, + 0.015192626975476742, + 0.032387033104896545, + -0.012966765090823174, + -0.04451723396778107, + -0.007614986505359411, + 0.024066196754574776, + 0.01638771966099739, + -0.020271774381399155, + 0.0009803501889109612, + -0.04132035747170448, + 0.03274556249380112, + 0.004619783256202936, + 0.009866991080343723, + 0.04075269028544426, + 0.04813239350914955, + 0.009837113320827484, + -0.02284122444689274, + -0.0131534980610013, + 0.030803535133600235, + 0.01632796600461006, + -0.01623833365738392, + 0.025216473266482353, + -0.02926485240459442, + 0.00043415508116595447, + 0.02451435662806034, + -0.017403550446033478, + -0.014184266328811646, + -0.018090728670358658, + 0.014378469437360764, + -0.04152949899435043, + 0.0020708730444312096, + 0.002184780314564705, + 0.003045621095225215, + 0.028876448050141335, + 0.025978345423936844, + -0.016850817948579788, + 0.03543452173471451, + 0.004040909931063652, + -0.0012137668672949076, + -0.0010793188121169806, + 0.01671637035906315, + -0.0032640991266816854, + 0.034179676324129105, + -0.005979202222079039, + -0.029683135449886322, + 0.03429918363690376, + 0.012802439741790295, + -0.004664599429816008, + 0.014363530091941357, + -0.011017268523573875, + 0.05542246252298355, + -0.01290701050311327, + -0.004048379138112068, + 0.014557733200490475, + -0.013033988885581493, + 0.02836853265762329, + 0.05927664041519165, + -0.006871787831187248, + 0.03241691365838051, + 0.02842828817665577, + 0.003742136526852846, + 0.00925450585782528, + -0.027024053037166595, + 0.014946138486266136, + -0.02190008945763111, + 0.0035124546848237514, + 0.014751935377717018, + -0.010875350795686245, + -0.025799082592129707, + -0.019450146704912186, + -0.0029447851702570915, + 0.016357842832803726, + -0.01934557594358921, + 0.02478325180709362, + 0.02533598244190216, + -0.04878969490528107, + 0.02919016033411026, + 0.015267319977283478, + -0.009919276461005211, + -0.020600425079464912, + 0.0011129308259114623, + 0.026127733290195465, + -0.009142465889453888, + 0.06118878722190857, + -0.013683821074664593, + -0.022527514025568962, + -0.011502775363624096, + -0.019465085119009018, + 0.006535667926073074, + 0.011913588270545006, + 0.033492498099803925, + -0.04899883642792702, + 0.01472952775657177, + 0.017702322453260422, + 0.0024163296911865473, + -0.08162488788366318, + 0.006875522434711456, + 0.005049270112067461, + -0.023901870474219322, + -0.00683444133028388, + -0.00669252360239625, + 0.008380593731999397, + -0.001865466358140111, + -0.02884656935930252, + 0.023423833772540092, + 0.009381484240293503, + -0.0019438943127170205, + -0.026590831577777863, + 0.013541903346776962, + 0.009799767285585403, + 0.02733776532113552, + 0.012817378155887127, + -0.01235427986830473, + -0.04469649866223335, + 0.04018501937389374, + 0.026904543861746788, + 0.023797299712896347, + -0.017254162579774857, + 0.015610909089446068, + 0.01871815323829651, + 0.004242582246661186, + -0.019375454634428024, + -0.0034116185270249844, + -0.008940793573856354, + -0.016417598351836205, + -0.02913040481507778, + -0.007051052059978247, + 0.0013239395339041948, + 0.0156258475035429, + 0.023662852123379707, + -0.014348591677844524, + 0.025216473266482353, + 0.028607551008462906, + -0.027038991451263428, + 0.022333310917019844, + -0.020256835967302322, + -0.052703626453876495, + 0.02167600952088833, + 0.030519701540470123, + 0.03205838426947594, + 0.031132185831665993, + 0.012451380491256714, + 0.007947372272610664, + -0.029623381793498993, + -0.027382580563426018, + 0.03155047073960304, + -0.044636745005846024, + 0.012802439741790295, + -0.07469334453344345, + -0.03904968127608299, + -0.008193859830498695, + 0.004291132558137178, + -0.014931200072169304, + 0.0024051256477832794, + -0.04589159041643143, + -0.018479133024811745, + 0.010464537888765335, + -0.004406907595694065, + 0.01631302759051323, + 0.043949563056230545, + -0.012062975205481052, + -0.007346090395003557, + 0.03214801475405693, + 0.010270334780216217, + 0.017403550446033478, + 0.004750496707856655, + 0.011913588270545006, + -0.021735763177275658, + -0.03525526076555252, + -0.030952922999858856, + -0.026725279167294502, + 0.0021959843579679728, + -0.029160281643271446, + -0.004018501844257116, + 0.0016749983187764883, + 0.009859521873295307, + -0.032387033104896545, + 0.0280249435454607, + 0.021586377173662186, + -0.010531761683523655, + 0.00514637166634202, + 0.012645583599805832, + -0.005878366529941559, + -0.015506338328123093, + -0.05557185038924217, + 0.02600822225213051, + -0.009859521873295307, + 0.02491769939661026, + -0.0071145412512123585, + 0.024589048698544502, + -0.007024909369647503, + 0.02505214884877205, + 0.031490713357925415, + 0.00901548657566309, + -0.034807100892066956, + 0.00024111945822369307, + 0.02781580202281475, + 0.025828959420323372, + -0.06232412904500961, + -0.023513466119766235, + -0.021974781528115273, + -0.007618721108883619, + 0.01873309165239334, + -0.0006437632837332785, + 0.0432325080037117, + -0.020152265205979347, + 0.008993078954517841, + -0.017806893214583397, + 0.012010689824819565, + 0.00547128776088357, + -0.017463304102420807, + -0.0002611932868603617, + 0.012742685154080391, + 0.02960844151675701, + -0.02747221291065216, + -0.024529295042157173, + -0.0029615911189466715, + 0.0005037132650613785, + 0.006838175933808088, + -0.010688617825508118, + 0.007969779893755913, + 0.03585280478000641, + -0.0065095252357423306, + -0.014326184056699276, + 0.01576029509305954, + 0.029653258621692657, + -0.013370108790695667, + 0.0065095252357423306, + 0.006640238221734762, + -0.03241691365838051, + -0.037137530744075775, + -0.005038066301494837, + 0.04508490487933159, + 0.025903651490807533, + -0.05288288742303848, + 0.020869320258498192, + -0.03253642097115517, + -0.029234975576400757, + 0.05309202894568443, + -0.015013362281024456, + 0.02092907577753067, + -0.007009970489889383, + -0.06381799280643463, + 0.03794422000646591, + 0.005900774151086807, + 0.00488867936655879, + 0.030205989256501198, + -0.03441869467496872, + -0.02201959863305092, + 0.00994168408215046, + 0.04356116056442261, + -0.03964722901582718, + 0.026874665170907974, + 0.023304324597120285, + 0.06363873183727264, + 0.05590049922466278, + -0.020212018862366676, + -0.03779483214020729, + -0.0054003288969397545, + 0.014759405516088009, + 0.013571781106293201, + -0.0034284244757145643, + 0.03229740262031555, + 0.011062084697186947, + 0.0015172086423262954, + -0.009022955782711506, + 0.00030904370942153037, + 0.02911546640098095, + 0.007917494513094425, + 0.0033929452765733004, + -0.03839237987995148, + 0.02216898463666439, + 0.018299870193004608, + 0.021377235651016235, + -0.034807100892066956, + -0.027427395805716515, + 0.012541012838482857, + 0.007327417377382517, + -0.004481600597500801, + 0.02478325180709362, + -0.02836853265762329, + 0.021705886349081993, + -0.004690742120146751, + 0.009583156555891037, + -0.019659288227558136, + -0.00633399561047554, + 0.028189267963171005, + -0.013302884995937347, + -0.008500102907419205, + 0.01749318093061447, + 0.03791434317827225, + -0.01438593864440918, + 0.03588268160820007, + -0.03531501442193985, + -0.023767422884702682, + 0.024887822568416595, + -0.0075178854167461395, + 0.024618927389383316, + -0.022258616983890533, + 0.03022092767059803, + -0.009232097305357456, + 0.017045021057128906, + 0.02485794574022293, + 0.007476803846657276, + -0.010277803987264633, + -0.027248132973909378, + 0.02175070159137249, + 0.004709415603429079, + 0.016746249049901962, + -0.012862194329500198, + 0.0021773111075162888, + 0.012585829012095928, + -0.0029261119198054075, + 0.03674912452697754, + -0.029145343229174614, + 0.0028271430637687445, + 0.008171452209353447, + 0.0031856712885200977, + -0.002293085679411888, + -0.0027841944247484207, + -0.004134276881814003, + -0.011973343789577484, + -0.016820941120386124, + -0.016566984355449677, + -0.034687589854002, + 0.014154389500617981, + 0.021093400195240974, + -0.0020988830365240574, + 0.005829815752804279, + -0.037286918610334396, + 0.006789625156670809, + -0.013601657934486866, + 0.012518605217337608, + -0.023095183074474335, + -0.009329198859632015, + -0.01410957332700491, + -0.000579807092435658, + 0.007312478497624397, + -0.022736653685569763, + 0.008403001353144646, + 0.009374015033245087, + -0.03890029340982437, + -0.05046282336115837, + 0.01707489974796772, + -0.037406425923109055, + 0.02451435662806034, + 0.0038242992013692856, + 0.02842828817665577, + -0.0014770609559491277, + 0.010852943174540997, + 0.0312516950070858, + -0.004007298033684492, + -0.012443911284208298, + -0.03244679048657417, + 0.014393407851457596, + 0.005587062332779169, + 0.005542246159166098, + -0.025649694725871086, + 0.015655726194381714, + -0.022408002987504005, + 0.019719043746590614, + -0.007095867767930031, + 0.04633975028991699, + 0.005258411634713411, + 0.010711025446653366, + 0.01077825017273426, + -0.005508634261786938, + -0.002905571134760976, + -0.0034078839235007763, + -0.05918700620532036, + 0.048490919172763824, + -0.010091071017086506, + -0.008589734323322773, + -0.0436507910490036, + 0.008350715972483158, + -0.0367790050804615, + -0.007715822663158178, + -0.0022725451271981, + -0.014669773168861866, + 0.017866648733615875, + 0.006879257038235664, + 0.021377235651016235, + -0.05796203762292862, + 0.010457068681716919, + 0.033074215054512024, + -0.02953374944627285, + -0.007902556098997593, + -0.0415593758225441, + -0.013243130408227444, + 0.03435893729329109, + -0.019450146704912186, + 0.011106900870800018, + 0.012428972870111465, + -0.0013771585654467344, + -0.011577468365430832, + -0.011330980807542801, + 0.017791954800486565, + -0.016283148899674416, + -0.0025040945038199425, + 0.0177620779722929, + 0.009321729652583599, + 0.027980126440525055, + 0.02966819703578949, + 0.01590968295931816, + -0.010367436334490776, + 0.05129938945174217, + 0.01671637035906315, + -0.0003176801255904138, + -0.03701802343130112, + -0.010815596207976341, + 0.03119194135069847, + -0.033283356577157974, + -0.03289495036005974, + -0.027756046503782272, + 0.004078256897628307, + -0.0316699780523777, + -0.005273350048810244, + -0.015879806131124496, + -0.005351778119802475, + -0.02911546640098095, + 0.012690399773418903, + -0.01366141252219677, + -0.024245459586381912, + 0.04200753942131996, + 0.006599157117307186, + 0.011181593872606754, + -0.016402658075094223, + 0.021661071106791496, + 0.003984889946877956, + -0.023125059902668, + -0.0359424389898777, + -0.02575426548719406, + -0.002154903020709753, + -0.017194408923387527, + -0.012331871315836906, + 0.02333420142531395, + -0.012503665871918201, + -0.01680600270628929, + -0.012055505998432636, + 0.005452614277601242, + 0.0218253955245018, + -0.020152265205979347, + 0.005796203855425119, + 0.03815336152911186, + 0.0072863358072936535, + 0.047116562724113464, + -0.007656068075448275, + 0.02409607358276844, + 0.02560487948358059, + 0.029145343229174614, + 0.04012526571750641, + -0.00487000634893775, + -0.018075790256261826, + 0.03842225670814514, + 0.031042555347085, + 0.0214071124792099, + -0.004063318017870188, + 0.010143356397747993, + -0.013444802723824978, + 0.021735763177275658, + 0.012294524349272251, + 0.010382374748587608, + 0.022079352289438248, + -0.03001178614795208, + 0.02245282009243965, + -0.014789282344281673, + 0.0017889055889099836, + -0.0017646303167566657, + 0.03361200541257858, + 0.007947372272610664, + 0.0196891650557518, + 0.011764202266931534, + -0.045055028051137924, + -0.0065095252357423306, + 0.01077078003436327, + -0.0023547078017145395, + -0.011569999158382416, + 0.027935311198234558, + 0.01466230396181345, + -0.008261083625257015, + 0.0043508876115083694, + -0.030474884435534477, + -0.02795024961233139, + -0.05354018881917, + 0.002875693840906024, + -0.02113821730017662, + -0.010486945509910583, + -0.03680888190865517, + -0.02506708726286888, + -0.035404644906520844, + -0.02003275603055954, + -0.003981155343353748, + 0.0022202597465366125, + -0.02705392986536026, + 0.009299321100115776, + -0.01294435653835535, + -0.027830740436911583, + -0.003307047998532653, + -0.021705886349081993, + -0.01680600270628929, + -0.028741998597979546, + -0.00784280151128769, + 0.012817378155887127, + 0.017537998035550117, + -0.017851710319519043, + -0.011159186251461506, + 0.018284931778907776, + 0.009179811924695969, + 0.013048927299678326, + -0.007398375775665045, + 0.01225717831403017, + -0.002771123079583049, + -0.030803535133600235, + -0.021108340471982956, + 0.013698759488761425, + -0.002608665032312274, + 0.008701775223016739, + 0.0035329952370375395, + -0.009306791238486767, + 0.02106352336704731, + 0.03134132921695709, + -0.012428972870111465, + -0.0041230726055800915, + 0.03785458952188492, + -0.0038168299943208694, + 0.003910196479409933, + -0.006789625156670809, + -0.037077777087688446, + 0.023632975295186043, + -0.05838032066822052, + 0.0196891650557518, + 0.017881587147712708, + 0.0037085246294736862, + 0.054077982902526855, + 0.012428972870111465, + 0.01610388606786728, + 0.009037895128130913, + 0.00430233683437109, + -0.03952771797776222, + 0.007092133164405823, + 0.03731679543852806, + -0.003732800018042326, + -0.04699705168604851, + 0.006819502450525761, + 0.03827286884188652, + 0.030161172151565552, + 0.061158910393714905, + -0.020734872668981552, + -0.0007679409463889897, + 0.00805194303393364, + -0.0641765221953392, + 0.04170876368880272, + -0.0320882610976696, + 0.01816542260348797, + -0.02106352336704731, + -0.006629034411162138, + 0.00019256878294982016, + 0.016417598351836205, + 0.054824914783239365, + 0.004810251295566559, + -0.013235661201179028, + 0.05061221122741699, + -0.02291591838002205, + -0.019330637529492378, + 0.02249763533473015, + -0.01414691936224699, + 0.01056910865008831, + 0.016223395243287086, + -2.5384066248079762e-05, + -0.015551154501736164, + -0.0026926950085908175, + -0.03884053975343704, + 0.010628863237798214, + 0.01844925619661808, + 0.007700883783400059, + -0.04681779071688652, + 0.03881066292524338, + 0.008559857495129108, + -0.016432536765933037, + 0.016133762896060944, + -0.003628229256719351, + -0.04535380005836487, + 0.00888103898614645, + -0.031132185831665993, + -0.03456807881593704, + -0.013519495725631714, + -0.001299664261750877, + 0.019480025395751, + -0.021048584952950478, + 0.0013696892419829965, + 0.017463304102420807, + 0.013937778770923615, + 0.009605564177036285, + 0.00795484147965908, + -0.0005405931151472032, + 0.002575053134933114, + -0.028547797352075577, + -0.0066813197918236256, + 0.04066305607557297, + -0.0039176661521196365, + -0.06190584599971771, + -0.02768135443329811, + 0.007368498481810093, + 0.01919618993997574, + 0.000285935471765697, + 0.0005363915697671473, + -0.0023528404999524355, + -0.010905228555202484, + -0.02615761011838913, + -0.00714441854506731, + -0.0008776467875577509, + 0.0402148962020874, + 0.011734324507415295, + -0.015730418264865875, + 0.01686575822532177, + 0.00964291114360094, + -0.014878914691507816, + -0.04577208310365677, + -0.01214513834565878, + 0.00478784367442131, + 0.0056318785063922405, + 0.004601110238581896, + -0.009814705699682236, + -0.010882820934057236, + 0.008335777558386326, + 0.0177620779722929, + -0.016701431944966316, + 0.015446583740413189, + -0.0010522424709051847, + -0.002886897884309292, + 0.02781580202281475, + 0.02077968791127205, + -0.033283356577157974, + 0.009635441936552525, + 0.02210923098027706, + 0.008059412240982056, + 0.026411566883325577, + -0.015954498201608658, + 0.004380764905363321, + -0.0035199238918721676, + -0.03158034756779671, + 0.00607256917282939, + 0.020690057426691055, + 0.0109126977622509, + 0.03806372731924057, + -0.01686575822532177, + 0.010748372413218021, + -0.026456383988261223, + -0.021855272352695465, + -0.01521503459662199, + 0.00044162440462969244, + -0.04275447130203247, + 0.005105290096253157, + 0.0010466405656188726, + 0.01976385898888111, + -0.012473789043724537, + -0.02789049595594406, + 0.010135887190699577, + 0.017732201144099236, + -0.03537476807832718, + -0.0022538716439157724, + -0.02167600952088833, + 0.022945795208215714, + 0.0070771947503089905, + 0.021810457110404968, + 0.004713150206953287, + 0.007204173132777214, + 0.013780922628939152, + -0.0022800143342465162, + 0.0032267526257783175, + -0.006345199886709452, + -0.03683875873684883, + 0.020899198949337006, + 0.030474884435534477, + 0.028263961896300316, + -0.004952169023454189, + -0.012817378155887127, + 0.0015246779657900333, + 0.012623175047338009, + 0.026456383988261223, + -0.07140684127807617, + 0.035135749727487564, + -0.014811690896749496, + -0.00901548657566309, + 0.013915370218455791, + 0.015140341594815254, + 0.006939011625945568, + -0.03564366325736046, + -0.04872993752360344, + -0.04027465358376503, + -0.03758569061756134, + -0.009852052666246891, + -0.00721164233982563, + -0.004653395619243383, + 0.003958747256547213, + 0.03196875378489494, + -0.04311300069093704, + -0.02169094793498516, + 0.034687589854002, + -6.004644819768146e-05, + 0.0004593640915118158, + -0.00726019311696291, + 0.007241520099341869, + -0.0024984923657029867, + 0.04466662183403969, + 0.009299321100115776, + -0.015043240040540695, + -0.013571781106293201, + 0.00014775276940781623, + 0.017448365688323975, + -0.020704995840787888, + -0.02249763533473015, + -0.04744521155953407, + -0.01962941139936447, + -0.040304530411958694, + 0.021929966285824776, + 0.011181593872606754, + 0.018837662413716316, + -0.007431988138705492, + 0.020944014191627502, + -0.0016199119854718447, + -0.011293633840978146, + -0.0008823151583783329, + -0.04087219759821892, + 0.026874665170907974, + -0.004048379138112068, + -0.015924621373414993, + 0.036510106176137924, + 0.014191735535860062, + 0.010793188586831093, + 0.00850757211446762, + 0.005560919642448425, + 0.0037888200022280216, + -0.017523059621453285, + 0.006655177101492882, + -0.030131295323371887, + 0.01287713274359703, + -0.0050978208892047405, + -0.007443191949278116, + 0.01858370378613472, + -0.008612142875790596, + -0.009441238828003407, + 0.002050332259386778, + -0.0014723925851285458, + -0.0449056401848793, + 0.010001438669860363, + -0.01339251734316349, + -0.027711231261491776, + -0.02148180641233921, + -0.002050332259386778, + -0.030161172151565552, + -0.011726855300366879, + -0.021496744826436043, + 0.008007126860320568, + -0.013683821074664593, + 0.04311300069093704, + -0.008940793573856354, + 0.022557390853762627, + 0.05195669084787369, + 0.004537620581686497, + 0.0016217792872339487, + 0.02472349815070629, + -0.028204208239912987, + 0.007984718307852745, + 0.04798300564289093, + 0.023842116817831993, + -0.035404644906520844, + -0.008171452209353447, + -0.01211526058614254, + -0.016850817948579788, + 0.00545634888112545, + -0.0036487700417637825, + -0.007443191949278116, + 0.006263037212193012, + 0.02699417434632778, + 0.0013724901946261525, + -0.0066775851882994175, + -0.011233879253268242, + -0.0014509182656183839, + -0.023169875144958496, + -0.03077365830540657, + 0.008126636035740376, + 0.01955471746623516, + 0.006042691878974438, + 0.0017030083108693361, + -0.01625327207148075, + 0.002393921837210655, + -0.009695196524262428, + 0.0014163726009428501, + -0.012369218282401562, + 0.017388610169291496, + -0.006744808983057737, + 0.023662852123379707, + 0.0248430073261261, + 0.029653258621692657, + 0.0075552319176495075, + -0.026142671704292297, + 0.041828274726867676, + -0.011764202266931534, + 0.02305036596953869, + 0.007820392958819866, + 0.017732201144099236, + 0.003056825138628483, + -0.038930170238018036, + -0.010994860902428627, + 0.020197080448269844, + 0.010188172571361065, + -0.011853833682835102, + -0.04069293662905693, + -0.042156923562288284, + 0.0155212776735425, + -0.027502089738845825, + -0.020824505016207695, + 0.003303313162177801, + 0.007969779893755913, + 0.007999657653272152, + 0.01149530615657568, + 0.018464194610714912, + -0.01015082560479641, + 0.013631535694003105, + -0.0042239087633788586, + -0.0023901870008558035, + 0.028532858937978745, + -0.0018337216461077332, + -0.005751387681812048, + -0.013676351867616177, + -0.010046254843473434, + 0.007465600036084652, + -0.022348249331116676, + 0.01726910099387169, + 0.0007361962925642729, + 0.01107702311128378, + 0.020958952605724335, + 0.0035217911936342716, + -0.0022183924447745085, + -0.005654286127537489, + -0.025440553203225136, + -0.02079462818801403, + -0.010076132602989674, + 0.040513671934604645, + 0.015058178454637527, + 0.01707489974796772, + -0.009784827940165997, + -0.024335091933608055, + -0.016163639724254608, + 0.009321729652583599, + -0.031012676656246185, + 0.0014901323011144996, + 0.0039512780494987965, + 0.017104776576161385, + -0.0019102822989225388, + -0.01907668076455593, + -0.026187486946582794, + -0.03567354381084442, + -0.0016432536067441106, + 0.006614095997065306, + 0.00860467366874218, + 0.005859693046659231, + -0.02697923593223095, + 0.026889605447649956, + -0.011891180649399757, + -0.02058548666536808, + -0.010628863237798214, + 0.018987048417329788, + 0.019450146704912186, + -0.022213801741600037, + -0.003129651304334402, + -0.009336668066680431, + -0.021705886349081993, + 0.0027785925194621086, + -0.009351606480777264, + 0.022482696920633316, + -0.015670664608478546, + -0.007700883783400059, + 0.005796203855425119, + 0.052076201885938644, + 0.015461522154510021, + 0.059575412422418594, + 0.04132035747170448, + -0.009769889526069164, + 0.02003275603055954, + -0.00019186853023711592, + 0.052076201885938644, + -0.01576029509305954, + 0.006640238221734762, + 0.019838552922010422, + -0.013302884995937347, + -0.005250942427664995, + -0.032387033104896545, + -0.0011119971750304103, + 0.019943123683333397, + 0.0181803610175848, + 0.013698759488761425, + -0.03158034756779671, + 0.008208799175918102, + -0.045951347798109055, + -0.013758514076471329, + -0.01665661670267582, + -0.01865839771926403, + 0.0026590831112116575, + -0.01063633244484663, + -0.03860152140259743, + -0.0029317138250917196, + 0.0018878743285313249, + -0.010225518606603146, + 0.018703212961554527, + -0.010203110985457897, + 0.01417679712176323, + -0.011525182984769344, + -0.012481258250772953, + 0.013116151094436646, + -0.0038653805386275053, + -0.029279790818691254, + 0.019943123683333397, + -0.018284931778907776, + -0.002604930428788066, + -0.026127733290195465, + 0.0031277837697416544, + -0.024006441235542297, + 0.046250119805336, + -0.02678503468632698, + -0.008500102907419205, + -0.027920372784137726, + -0.01596943661570549, + 0.00609124219045043, + 0.00915740430355072, + 0.022661961615085602, + 0.030026724562048912, + 0.0025507777463644743, + 0.02575426548719406, + -0.0026385425589978695, + 0.003041886491701007, + -0.04645926132798195, + -0.012077913619577885, + 0.07935421168804169, + -0.029444117099046707, + 0.016283148899674416, + 0.014460631646215916, + 0.014370999298989773, + 0.004171623382717371, + 0.017194408923387527, + 0.0027935311663895845, + -0.04657876864075661, + 0.036599740386009216, + -0.004186562262475491, + -0.0036674432922154665, + -0.01246631983667612, + 0.0138033302500844, + -0.026814911514520645, + -0.028039881959557533, + -0.008500102907419205, + 0.017164530232548714, + -0.0010811862302944064, + 0.011039676144719124, + 0.0016236465889960527, + 0.02016720362007618, + 0.0025115637108683586, + -0.0218253955245018, + 0.009919276461005211, + 0.0012128332164138556, + -0.01066621020436287, + -0.02058548666536808, + -0.00873912125825882, + 0.01531213615089655, + -0.040364284068346024, + -0.015088056214153767, + -0.02553018555045128, + -0.014490509405732155, + -0.008276022970676422, + 0.004679538309574127, + 0.011480366811156273, + 0.0059343865141272545, + -0.0056654904037714005, + -0.0004892414435744286, + 0.04185815155506134, + -0.008627081289887428, + 0.027158500626683235, + 0.016059068962931633, + -0.024260398000478745, + -0.011599876917898655, + -0.0016609933227300644, + 0.013048927299678326, + -0.01768738403916359, + -0.012653052806854248, + -0.004511477891355753, + 0.006154731847345829, + 0.021631192415952682, + 0.007148153148591518, + 0.010158294811844826, + -0.03737654909491539, + -0.021212909370660782, + -0.007424518465995789, + 0.02913040481507778, + 0.030549578368663788, + 0.03943808749318123, + 0.030923044309020042, + 0.006830706261098385, + 0.019644349813461304, + -0.014348591677844524, + -0.0006306919385679066, + -0.011667100712656975, + -0.04418858513236046, + -0.03411991894245148, + -0.025291167199611664, + -0.004373295232653618, + 0.019659288227558136, + -0.011831426061689854, + 0.007558966521173716, + 0.00767847616225481, + -0.03943808749318123, + 0.04418858513236046, + 0.004231377970427275, + 0.009926745668053627, + -0.027442336082458496, + -0.006423627957701683, + -0.013564311899244785, + -0.014714589342474937, + -0.017254162579774857, + -0.0036431679036468267, + 0.008313369005918503, + -0.02201959863305092, + 0.008358185179531574, + 0.008096758276224136, + 0.008895977400243282, + 0.035613786429166794, + -0.00497084204107523, + -0.0002469548780936748, + 0.004421846009790897, + 0.02512684091925621, + -0.003898992668837309, + 0.016133762896060944, + -0.017702322453260422, + -0.012929418124258518, + -0.040722813457250595, + -0.004414376802742481, + 0.005075412802398205, + -0.00036973206442780793, + 0.012645583599805832, + 0.000986885861493647, + -0.005725244991481304, + -0.02871212176978588, + 0.0015050709480419755, + 0.014811690896749496, + -0.026829849928617477, + 0.06525211036205292, + -0.003603953868150711, + -0.023125059902668, + -0.02079462818801403, + -0.003021345939487219, + 0.002164239762350917, + -0.04433796927332878, + -0.004724354017525911, + -0.016492290422320366, + -0.019569655880331993, + -0.0035161892883479595, + 0.009314260445535183, + 0.0201074481010437, + -0.023662852123379707, + -0.0006148195825517178, + -0.001586299971677363, + 0.004063318017870188, + 0.01632796600461006, + -0.017313918098807335, + 0.008918385952711105, + -0.006341465283185244, + 0.04353128373622894, + 0.00485506746917963, + -0.026142671704292297, + 0.029279790818691254, + -0.032805316150188446, + 0.016088945791125298, + 0.005482491571456194, + 0.0011950935004279017, + -0.012593298219144344, + -0.013713697902858257, + ], + "index": 17, + }, + { + "title": "1997 Denver Broncos season", + "text": "The 1997 Denver Broncos season was the team's 38th, and 28th in the National Football League (NFL). The Broncos finished the season with a record of 12\u20134, finishing second in the AFC West, and winning Super Bowl XXXII.", + "vector": [ + 0.03407149761915207, + -0.031749021261930466, + -0.013922098092734814, + -0.015478922985494137, + -0.0009554693824611604, + -0.02710406668484211, + -0.03210632503032684, + 0.019498594105243683, + -0.01330957654863596, + 0.07406403124332428, + 0.012193001806735992, + -0.006262391805648804, + -0.019256137311458588, + -0.006559081841260195, + -0.024679502472281456, + 0.04295305535197258, + -0.062375083565711975, + -0.02157861366868019, + 0.02032805047929287, + -0.0276910662651062, + 0.003009967738762498, + -0.010419242084026337, + 0.044994793832302094, + 0.027946284040808678, + -0.050915829837322235, + -0.005021398421376944, + -0.02184659242630005, + 0.013564794324338436, + 0.012301469221711159, + -0.023633113130927086, + 0.0362408421933651, + -0.024015938863158226, + -0.010246970690786839, + 0.019587919116020203, + -0.044152576476335526, + 0.05982290953397751, + -0.02452637255191803, + 0.0024357291404157877, + -0.00935371033847332, + 0.007477863691747189, + -0.035653840750455856, + -0.04244261980056763, + 0.03190214931964874, + 0.002282598754391074, + 0.02748689241707325, + 0.025164416059851646, + -0.018005574122071266, + 0.0038123067934066057, + 0.008938982151448727, + 0.0019141290104016662, + -0.027359284460544586, + -0.011771893128752708, + 0.007394918240606785, + -0.007356635760515928, + -0.016576357185840607, + 0.015185423195362091, + 0.007235407363623381, + 0.0624261274933815, + -0.04933348298072815, + 0.002499533351510763, + -0.05869995430111885, + 0.0030370845925062895, + -0.02567484974861145, + 0.006878103595227003, + -0.027333762496709824, + 0.02549619786441326, + -0.013756207190454006, + 0.02138720080256462, + 0.0037102201022207737, + -0.009041069075465202, + -0.01718887872993946, + -0.009947090409696102, + -0.0016158438520506024, + 0.016818813979625702, + -0.0018614904256537557, + 0.03749140724539757, + -0.045301053673028946, + -0.008084004744887352, + -0.039941489696502686, + 0.001612653722986579, + 0.02604491449892521, + -0.03065158613026142, + -0.02604491449892521, + 0.004881029017269611, + 0.039762839674949646, + -0.013207489624619484, + 0.03772110119462013, + -0.04992048442363739, + -0.017112312838435173, + -0.02968176081776619, + -0.0033305843826383352, + 0.015963835641741753, + 0.03445432335138321, + -0.0419832281768322, + 0.01670396514236927, + -0.010093839839100838, + -0.011114709079265594, + 0.009417514316737652, + -0.024309437721967697, + 0.0034454320557415485, + 0.0033592963591217995, + -3.980291512561962e-05, + 0.00807124376296997, + -0.014317684806883335, + 0.007937255315482616, + 0.0004043597436975688, + 0.028175977990031242, + -0.0011524651199579239, + -0.08723323792219162, + -0.05594360828399658, + -0.004188752267509699, + 0.012626870535314083, + -0.0618136040866375, + 0.008849656209349632, + -0.016844335943460464, + 0.05420813336968422, + 0.03054949827492237, + -0.03128962963819504, + -0.031544845551252365, + 0.04208531603217125, + -0.019830375909805298, + -0.04063057899475098, + 0.01025335118174553, + -0.02568761073052883, + -0.03062606416642666, + -0.004077094607055187, + -0.000522796472068876, + -0.025343067944049835, + -0.026670197024941444, + -0.02692541480064392, + -0.009998133406043053, + -0.020825723186135292, + -0.04647505283355713, + 0.024743307381868362, + -0.002242721151560545, + 0.054361261427402496, + -0.044101532548666, + -0.005975272506475449, + 0.03800183907151222, + 0.025623805820941925, + 0.010808448307216167, + 0.004641762934625149, + 0.030090108513832092, + -0.022165613248944283, + 0.046347443014383316, + -0.001244183862581849, + 0.010093839839100838, + 0.00560520775616169, + -0.015338554047048092, + -0.010240590199828148, + 0.047853223979473114, + 0.028609847649931908, + -0.006319815758615732, + -0.01402418501675129, + 0.015185423195362091, + 0.020838484168052673, + 0.02347998134791851, + -0.016844335943460464, + -0.0023160960990935564, + -0.021425483748316765, + 0.03971179574728012, + -0.008077624253928661, + -0.03601114824414253, + -0.05915934592485428, + -0.014126271940767765, + 0.0030673916917294264, + 0.028711935505270958, + 0.006412331946194172, + -0.017916247248649597, + 0.0029365927912294865, + 0.014662227593362331, + 0.011727230623364449, + 0.039456579834222794, + 0.040502969175577164, + -0.001087863347493112, + -0.007095037959516048, + 0.023824525997042656, + 0.018056616187095642, + 0.029554150998592377, + -0.024283915758132935, + 0.0029668998904526234, + 0.010904154740273952, + 0.016640162095427513, + -0.016627401113510132, + -0.0039941491559147835, + 0.020544985309243202, + -0.020098354667425156, + 0.04999705031514168, + -0.016818813979625702, + -0.01909024640917778, + 0.014636706560850143, + 0.0039750076830387115, + 0.04798083379864693, + 0.011606002226471901, + -0.019026441499590874, + 0.03026876039803028, + 0.03396940976381302, + 0.0385633185505867, + -0.010591513477265835, + 0.0015161496121436357, + -0.01088501326739788, + -0.026466023176908493, + -0.019638963043689728, + -0.04496927186846733, + 0.06763255596160889, + 0.0007261727005243301, + -0.01727820374071598, + 0.03690440580248833, + 0.011357164941728115, + 0.02568761073052883, + 0.0656418651342392, + -0.005426555871963501, + -0.018630854785442352, + -0.027257196605205536, + 0.013207489624619484, + 0.020659832283854485, + 0.0092133404687047, + 0.03167245537042618, + -0.02243359200656414, + -0.03728723153471947, + -0.00037146065733395517, + -0.07018472999334335, + -0.04489270597696304, + 0.006616505794227123, + -0.006211348343640566, + 0.0015504445182159543, + 0.0022953597363084555, + 0.055024828761816025, + -0.0015336958458647132, + -0.03560280054807663, + -0.047853223979473114, + 0.02633841522037983, + -0.026363937184214592, + 0.028941629454493523, + 0.013871055096387863, + 0.0031758591067045927, + -0.004357833880931139, + 0.03912479802966118, + 0.008607200346887112, + 0.00270689744502306, + 0.0032731606625020504, + 0.004463110584765673, + 0.005640299990773201, + -0.010151264257729053, + -0.01422835886478424, + 0.009915187954902649, + 0.0007485041860491037, + -0.003834638511762023, + 0.02110646292567253, + 0.02146376669406891, + 0.01532579306513071, + -0.016206292435526848, + -0.03789975494146347, + 0.028711935505270958, + 0.06661169230937958, + -6.186026439536363e-05, + -0.03723618760704994, + 0.010617035441100597, + -0.006466565653681755, + 0.019064724445343018, + -0.022752612829208374, + 0.035730406641960144, + -0.00496078422293067, + 0.029094761237502098, + -0.008032961748540401, + 0.05208982899785042, + -0.014853640459477901, + 0.043769750744104385, + 0.03601114824414253, + -0.007452342193573713, + 0.022459113970398903, + -0.006083739921450615, + -0.04246814176440239, + 0.03340793028473854, + 0.025611046701669693, + 0.005490359850227833, + 0.06615229696035385, + -0.041549358516931534, + 0.03218288719654083, + 0.026848848909139633, + -0.023071635514497757, + 0.0020529034081846476, + 0.045964617282152176, + -0.05252369865775108, + 0.018745703622698784, + 0.0063134352676570415, + -0.008275417611002922, + -0.022408070042729378, + -0.0005216001300141215, + 0.018758464604616165, + 0.0064187124371528625, + 0.029171325266361237, + -0.02243359200656414, + 0.0013741850852966309, + 0.03248915076255798, + 0.027614500373601913, + 0.02473054639995098, + 0.009245242923498154, + 0.016844335943460464, + 0.005563735030591488, + 0.05186013504862785, + 0.007911733351647854, + 0.014879162423312664, + -0.026363937184214592, + -0.019919702783226967, + 0.04953765869140625, + 0.044050488620996475, + 0.008728427812457085, + -0.02231874316930771, + 0.002228365046903491, + -0.06962325423955917, + 0.004450350068509579, + -0.026363937184214592, + -0.0068717231042683125, + 0.03254019096493721, + -0.018388399854302406, + 0.0310088898986578, + 0.025930067524313927, + -0.01235251221805811, + -0.008479591459035873, + 0.017405813559889793, + 0.03169797733426094, + 0.02377348206937313, + 0.023339612409472466, + -0.019243376329541206, + -0.07758602499961853, + 0.007203505374491215, + -0.012869327329099178, + 0.03692992776632309, + 0.01965172402560711, + -0.0038314482662826777, + 0.0068525816313922405, + 0.04525000974535942, + -0.02404146082699299, + -0.004351453389972448, + -0.04216188192367554, + 0.04272335767745972, + -0.026414979249238968, + 0.04188114032149315, + -0.02815045602619648, + -0.02756345644593239, + -0.02032805047929287, + -0.015683095902204514, + -0.015593770891427994, + -0.018630854785442352, + -0.013284055516123772, + -0.012620490044355392, + -0.03863988444209099, + -0.00801382027566433, + 0.026363937184214592, + 0.0003971817495767027, + 0.026363937184214592, + 0.027742110192775726, + 0.04486718401312828, + -0.011931403540074825, + 0.039482101798057556, + -0.03358658403158188, + -0.04706205055117607, + 0.014777075499296188, + 0.014113510958850384, + 0.016384944319725037, + -8.090186020126566e-05, + -0.00691638607531786, + -0.020940570160746574, + -0.026797804981470108, + -0.013973142020404339, + -0.010425622574985027, + 0.019702767953276634, + 0.005751957651227713, + -0.035934582352638245, + 0.010617035441100597, + 0.05604569613933563, + -0.01173361111432314, + -0.00782240740954876, + 0.09366471320390701, + -0.015606531873345375, + -0.039277926087379456, + -0.009621688164770603, + -0.06166047602891922, + -0.011714469641447067, + -0.02156585268676281, + 0.06023125723004341, + -0.0479297898709774, + 0.006240060552954674, + -0.0006364478613249958, + -0.012046251446008682, + -0.0013040003832429647, + 0.05640299990773201, + -0.033254802227020264, + -0.041549358516931534, + 0.024679502472281456, + 0.048618875443935394, + -0.04211083799600601, + -0.007522527128458023, + 0.010597893968224525, + 0.008147808723151684, + 0.0022411260288208723, + 0.036036666482686996, + 0.06380429863929749, + 0.025253741070628166, + -0.046806834638118744, + 0.03299958258867264, + 0.033280324190855026, + -0.05109448358416557, + -0.02022596262395382, + 0.009577025659382343, + 0.03218288719654083, + 0.0026367127429693937, + 0.009060210548341274, + -0.02586626261472702, + 0.02804837003350258, + 0.014509097672998905, + -0.010540470480918884, + 0.034326713532209396, + 0.05466752499341965, + 0.005018208175897598, + -0.005541403312236071, + 0.02968176081776619, + -0.042315009981393814, + -0.017201639711856842, + -0.029043717309832573, + 0.0884072408080101, + 0.025942828506231308, + -0.005219191778451204, + 0.009774819016456604, + 0.01494296733289957, + -0.06446786224842072, + 0.005375512409955263, + 0.04759800806641579, + 0.005388272926211357, + -0.010514948517084122, + 0.011739990673959255, + -0.0257769376039505, + 0.036700233817100525, + 0.02988593466579914, + -0.03731275349855423, + -0.0003188221016898751, + 0.04075818508863449, + 0.010655318386852741, + 0.06349804252386093, + 0.020455658435821533, + 0.04277440160512924, + -0.02442428655922413, + -7.49202081351541e-05, + 0.034709539264440536, + -0.0022443162743002176, + -0.00646337540820241, + -0.011995208449661732, + -0.023620352149009705, + 0.030753672122955322, + -0.054157089442014694, + -0.039762839674949646, + -0.011759132146835327, + 0.0136924022808671, + -0.01717611774802208, + 0.00968549307435751, + -0.022484635934233665, + -0.029247891157865524, + 0.07360464334487915, + -0.03274436667561531, + 0.004683235660195351, + -0.009947090409696102, + 0.017724834382534027, + 0.025062328204512596, + -0.041574880480766296, + 0.03700649365782738, + -0.018873311579227448, + -0.030370846390724182, + -0.0385633185505867, + -0.035551756620407104, + 0.038716450333595276, + -0.007126940414309502, + -0.06702003628015518, + -0.036419495940208435, + -0.02022596262395382, + -0.03989044949412346, + 0.03807840496301651, + -0.004625811707228422, + 0.04124309867620468, + 0.020672593265771866, + 0.004115377087146044, + 0.025827979668974876, + 0.03744036331772804, + 0.022203896194696426, + 0.03654710203409195, + -0.005863615311682224, + -0.0017530231270939112, + -0.029809368774294853, + 0.026874370872974396, + 0.02069811522960663, + 0.03894614428281784, + -0.010661698877811432, + -0.010757405310869217, + -0.029273413121700287, + 0.0513496994972229, + 0.05099239572882652, + -0.024360481649637222, + 0.007088657468557358, + 0.06400847434997559, + -0.042621273547410965, + -0.00028851506067439914, + 0.019409267231822014, + 0.02043013647198677, + 0.005550974048674107, + 0.03481162711977959, + 0.01652531325817108, + -0.01670396514236927, + 0.04479061812162399, + -0.012224903330206871, + 0.045301053673028946, + 0.05584152415394783, + 0.029477586969733238, + -0.011376306414604187, + 0.024360481649637222, + -0.03187662735581398, + -0.05767908692359924, + -0.017712073400616646, + 0.023160960525274277, + 0.052370570600032806, + 0.004708757158368826, + 0.027129588648676872, + -0.028992673382163048, + -0.006878103595227003, + 0.05431022122502327, + 0.03925240412354469, + 0.00915591698139906, + 0.01274171844124794, + 0.012110056355595589, + -0.0009235672187060118, + 0.027155110612511635, + 0.03310167044401169, + 0.03761901333928108, + -0.005308517720550299, + -0.01984313689172268, + -0.017609987407922745, + 0.02148928865790367, + -0.013373381458222866, + -0.025075089186429977, + 0.0024564655032008886, + -0.03399493172764778, + 0.034045975655317307, + 0.018388399854302406, + -0.026695718988776207, + 0.005940180271863937, + -0.053697697818279266, + -0.02214009128510952, + -0.023607591167092323, + 0.019128529354929924, + -0.025560002774000168, + -0.0108722522854805, + -0.009634449146687984, + 0.007656516041606665, + 0.02310991659760475, + 0.014866401441395283, + -0.018554290756583214, + -0.015402358025312424, + 0.026976458728313446, + 0.006980190519243479, + -0.0066292667761445045, + 0.004491822794079781, + -0.0037389318458735943, + 0.012614109553396702, + -0.013488229364156723, + 0.012269566766917706, + -0.017507899552583694, + 0.004855507053434849, + 0.011861219070851803, + 0.00807124376296997, + -0.013016076758503914, + -0.05191117897629738, + -0.0035762309562414885, + 0.02559828571975231, + 0.010674458928406239, + 0.007414059713482857, + 0.026848848909139633, + 0.022867461666464806, + 0.051222093403339386, + 0.022752612829208374, + 0.02393937297165394, + 0.030753672122955322, + 0.0033433453645557165, + 0.0062368703074753284, + 0.02863536961376667, + -0.01383277215063572, + -0.011535817757248878, + 0.024258393794298172, + -0.0017865203553810716, + 0.023046113550662994, + -0.014572901651263237, + 0.00493845297023654, + -0.011331643909215927, + -0.02807389199733734, + 0.01198244746774435, + 0.002604810521006584, + 0.014802597463130951, + 0.023058874532580376, + 0.033356886357069016, + 0.013009696267545223, + 0.03396940976381302, + -0.0058125718496739864, + 0.020009027794003487, + 0.002957329386845231, + 0.045964617282152176, + -0.008747569285333157, + 0.06191569194197655, + -0.0011628333013504744, + 0.013411663472652435, + 0.011682567186653614, + 0.00825627613812685, + 0.040502969175577164, + -0.05089030787348747, + -0.010802067816257477, + -0.0027244435623288155, + -0.006667549256235361, + 0.011510295793414116, + -0.03312719240784645, + 0.0022570770233869553, + -0.019536877050995827, + 0.03052397631108761, + -0.06650960445404053, + 0.025827979668974876, + 0.007905352860689163, + -0.013730685226619244, + -0.017201639711856842, + 0.017163356766104698, + -0.018388399854302406, + 0.02319924347102642, + -0.03874197229743004, + -0.019728289917111397, + -0.011580480262637138, + -0.06023125723004341, + -0.024411525577306747, + -0.027818674221634865, + 0.016461508348584175, + -0.01822250708937645, + -0.008371124044060707, + 0.025317545980215073, + -0.06671377271413803, + -0.014547380618751049, + 0.028788499534130096, + -0.02489643730223179, + -0.01388381514698267, + 0.009219720959663391, + 0.04609222710132599, + -0.025611046701669693, + -0.012154718860983849, + -0.003461383283138275, + 0.02156585268676281, + -0.018094899132847786, + -0.015236467123031616, + 0.017112312838435173, + -0.0009658375638537109, + 0.006125212647020817, + 0.008345602080225945, + -0.00934732984751463, + -0.04925692081451416, + 0.026593631133437157, + 0.03981388360261917, + 0.023633113130927086, + 0.01140820886939764, + -0.02136167883872986, + 0.0138455331325531, + 0.02434772066771984, + 0.017354769632220268, + 0.039277926087379456, + -0.011657045222818851, + 0.08830515295267105, + 0.03305062651634216, + -0.0034103398211300373, + 0.028865065425634384, + 0.0370575375854969, + -0.008849656209349632, + 0.049384526908397675, + -0.05066061392426491, + -0.024411525577306747, + -0.003140766639262438, + 0.0034550027921795845, + 0.052829958498477936, + 0.00429402943700552, + -0.01145925186574459, + -0.01440701074898243, + 0.059976041316986084, + -0.014904684387147427, + -0.002464441116899252, + -0.009009166620671749, + 0.0011987233301624656, + -0.03437775745987892, + 0.014394249767065048, + -0.01833735592663288, + -0.001512161921709776, + 0.007126940414309502, + -0.006307054776698351, + -0.0027292289305478334, + 0.039099276065826416, + -0.030319802463054657, + -0.049001701176166534, + -0.01689537800848484, + -0.046143271028995514, + 0.009889665991067886, + -0.031264107674360275, + -0.03754245117306709, + -0.01564481481909752, + -0.05191117897629738, + 0.0016716726822778583, + 0.0077203200198709965, + -0.02031528949737549, + -0.014241119846701622, + 0.004306790418922901, + 0.04101340472698212, + -0.047751136124134064, + -0.03034532442688942, + 0.004105806816369295, + -0.014445293694734573, + -0.009915187954902649, + -0.0037772145587950945, + 0.01670396514236927, + -0.0165125522762537, + -0.02194867841899395, + -0.019524116069078445, + -0.021999722346663475, + -0.008696526288986206, + 0.0033497256226837635, + 0.016665682196617126, + 0.02557276375591755, + 0.027333762496709824, + -0.024845393374562263, + -0.02451361157000065, + -0.020736398175358772, + 0.021897636353969574, + 0.016257336363196373, + -0.04274887964129448, + -0.006667549256235361, + -0.0007983513060025871, + 0.0014244309859350324, + -0.008543395437300205, + -0.006910005584359169, + 0.05487169697880745, + 0.00897088460624218, + 0.008332841098308563, + -0.009659971110522747, + -0.03248915076255798, + -0.006329386495053768, + 0.044433314353227615, + 0.011184893548488617, + -0.010853111743927002, + 0.01956239901483059, + 0.06553977727890015, + 0.026772284880280495, + -0.012677914462983608, + -0.005270235240459442, + 0.003215736709535122, + -0.015900030732154846, + 0.0063134352676570415, + -0.009200580418109894, + -0.04392287880182266, + -0.0035411387216299772, + 0.035373102873563766, + -0.05058404803276062, + -0.009117634035646915, + 0.015581009909510612, + 0.0029764706268906593, + 0.03922688215970993, + -0.0041089970618486404, + 0.012805523350834846, + 0.014713271521031857, + -0.0051681483164429665, + -0.017137834802269936, + 0.031544845551252365, + -0.023709677159786224, + 0.030217716470360756, + 0.033254802227020264, + 0.0443057045340538, + -0.03797632083296776, + 0.018924355506896973, + 0.014585662633180618, + 0.0015568248927593231, + 0.011714469641447067, + 0.03437775745987892, + -0.040783707052469254, + -0.008996406570076942, + -0.03435223549604416, + 0.022459113970398903, + 0.00711417943239212, + 0.0044056870974600315, + -0.004881029017269611, + -0.03958418592810631, + 0.00691638607531786, + 0.03310167044401169, + 0.030141150578856468, + 0.03973731771111488, + -0.03560280054807663, + 0.013373381458222866, + 0.013156446628272533, + 0.01766102947294712, + 0.0092133404687047, + -0.0029413781594485044, + 0.0015448615886271, + 0.00033636827720329165, + 0.03228497505187988, + -0.008804993703961372, + 0.013590315356850624, + -0.0027962233871221542, + -0.017622748389840126, + 0.007458722684532404, + 0.013590315356850624, + -0.011829317547380924, + -0.015287510119378567, + -0.011491154320538044, + 7.058350456645712e-05, + 0.033280324190855026, + 0.012346131727099419, + 0.014394249767065048, + 0.030855759978294373, + -0.006571842823177576, + -0.02922236919403076, + 0.022408070042729378, + -0.029911454766988754, + -0.014751554466784, + 0.0013199514942243695, + -0.02165517956018448, + -0.06120108440518379, + 0.03677679970860481, + 0.02748689241707325, + -0.021884875372052193, + -0.016372183337807655, + 0.005573305767029524, + -0.018477724865078926, + -0.031238585710525513, + -0.009889665991067886, + 0.027844196185469627, + 0.008728427812457085, + 0.011637904681265354, + 0.027793152257800102, + -0.015198184177279472, + 0.012473740614950657, + 0.037185147404670715, + 0.03062606416642666, + 0.004884219262748957, + 0.012728957459330559, + 0.023339612409472466, + 0.01173361111432314, + 0.03557727858424187, + -0.0018726561684161425, + -0.027257196605205536, + 0.01698470488190651, + -0.0032077610958367586, + -0.05219191685318947, + -0.011082806624472141, + -0.018860550597310066, + 0.01602764055132866, + -0.006801538169384003, + 0.0334334522485733, + -0.0438973568379879, + -0.022165613248944283, + -0.047853223979473114, + 0.011376306414604187, + 0.023314090445637703, + -0.015810705721378326, + 0.005854044575244188, + -0.008326461538672447, + 0.04045192524790764, + 0.02224217914044857, + 0.0654376894235611, + 0.013411663472652435, + 0.005854044575244188, + -0.007535287644714117, + 0.004351453389972448, + -0.043948400765657425, + 0.01006831880658865, + -0.06656064838171005, + -0.01795453019440174, + 0.011280599981546402, + 0.005984843242913485, + -0.029834890738129616, + -0.049486614763736725, + 0.004118567332625389, + 0.008186091668903828, + 0.011133850552141666, + 0.03652158007025719, + 0.01159324124455452, + -0.0037421220913529396, + 0.0021023517474532127, + -0.04619431123137474, + 0.020570505410432816, + 0.028278065845370293, + -0.0313151516020298, + -0.018949877470731735, + -0.03596010431647301, + -0.017010226845741272, + -0.04264679551124573, + 0.00124179117847234, + -0.03789975494146347, + -0.014011424034833908, + 0.004711947403848171, + -0.046143271028995514, + -0.0010846731020137668, + 0.02224217914044857, + -0.05487169697880745, + -0.0017865203553810716, + 0.0010639367392286658, + 0.005968892015516758, + -0.001010500593110919, + 0.0026797805912792683, + 0.012448218651115894, + 0.025343067944049835, + 0.007452342193573713, + -0.013181968592107296, + 0.0011030167806893587, + -0.020468419417738914, + -0.00412494782358408, + 0.027410326525568962, + -0.02758897840976715, + -0.03243810683488846, + 0.034607451409101486, + 0.012709815986454487, + 0.006705831736326218, + -0.037567973136901855, + -0.02081296220421791, + 0.019524116069078445, + 0.01804385520517826, + 0.018822267651557922, + -0.029145803302526474, + 0.0551779568195343, + 0.0038027362897992134, + 0.019613441079854965, + -0.04167696833610535, + 0.009570645168423653, + 0.006007174961268902, + 0.0017865203553810716, + 0.010738263837993145, + 0.008415787480771542, + 0.0009211745928041637, + -0.0061092618852853775, + 0.0003796355740632862, + -0.020481180399656296, + -0.009009166620671749, + 0.007816026918590069, + 0.019064724445343018, + -0.019409267231822014, + -0.021042658016085625, + 0.007343874778598547, + -0.0038824917282909155, + -0.004412067122757435, + 0.023926611989736557, + -0.01795453019440174, + -0.021412722766399384, + 0.013794489204883575, + -0.01764826849102974, + -0.011612382717430592, + -0.025432392954826355, + 0.04468853026628494, + 0.014534619636833668, + -0.011369925923645496, + -0.03904823213815689, + -0.02539411187171936, + -0.01604040153324604, + -0.0038473992608487606, + 0.013985902070999146, + 0.03700649365782738, + 0.020251484587788582, + -0.0002775487082544714, + -0.023033352568745613, + -0.030575020238757133, + 0.002730824053287506, + -0.002277813386172056, + -0.0017115502851083875, + 0.013220250606536865, + -0.006479326635599136, + -0.021336156874895096, + 0.01567033678293228, + -0.010846731252968311, + 0.013960381038486958, + 0.004549246747046709, + -0.01235251221805811, + -0.015210945159196854, + 0.045479703694581985, + 0.01140820886939764, + -0.005700914189219475, + -0.013335098512470722, + 0.002288979245349765, + 0.014713271521031857, + 0.017035748809576035, + 0.025075089186429977, + 0.023263048380613327, + 0.023339612409472466, + 0.02626184932887554, + -0.002646283246576786, + 0.048899613320827484, + 0.004153660032898188, + 0.025891784578561783, + -0.02252291701734066, + -0.0027132779359817505, + -0.026312893256545067, + -0.015274749137461185, + -0.01746961660683155, + 0.037950798869132996, + -0.002606405643746257, + -0.039456579834222794, + -0.0008589653880335391, + -0.006718592718243599, + -0.01421559788286686, + 0.045479703694581985, + -0.0024229681584984064, + 0.008039341308176517, + -0.026874370872974396, + -0.03044741228222847, + -0.007458722684532404, + 0.04236605390906334, + -0.050150178372859955, + 0.03330584615468979, + -0.019358225166797638, + -0.006833440624177456, + -0.009583406150341034, + -0.0036049429327249527, + 0.02473054639995098, + 0.03884405642747879, + 0.020570505410432816, + 0.04782770201563835, + 0.00477575184777379, + 0.02177002653479576, + 0.009443036280572414, + -0.03618979826569557, + 0.014470814727246761, + 0.012103675864636898, + -0.0067441146820783615, + 0.022854700684547424, + -0.010361818596720695, + -0.028482239693403244, + -0.004603479988873005, + 0.004794893320649862, + 0.010100220330059528, + -0.004077094607055187, + -0.020111115649342537, + 0.01926889829337597, + 0.011963305994868279, + 0.03519445285201073, + -0.022101810202002525, + 0.10285253077745438, + -0.010999861173331738, + 0.001925294753164053, + 0.019932463765144348, + 0.023454461246728897, + 0.0383591465651989, + -0.0009969421662390232, + -0.0016158438520506024, + -0.018094899132847786, + 0.010655318386852741, + -0.016742248088121414, + -0.005445696879178286, + -0.011197654530405998, + -0.03636845201253891, + -0.004635382443666458, + 0.008084004744887352, + 0.060741692781448364, + 0.010221448726952076, + -0.009896046482026577, + -0.0033433453645557165, + -0.014292162843048573, + -0.025815218687057495, + 0.031136497855186462, + -0.021234070882201195, + -0.002600025152787566, + -0.05142626538872719, + 0.01350098941475153, + 0.018273551017045975, + 0.0010615440551191568, + 0.012913989834487438, + -0.02470502443611622, + -0.030217716470360756, + -0.031085453927516937, + -0.03902271017432213, + -0.03738931939005852, + 0.003512426745146513, + -0.026414979249238968, + -0.00949408020824194, + 0.01513438019901514, + 0.0007341481978073716, + 0.0006380429840646684, + -0.03299958258867264, + -0.03447984158992767, + -0.007101418450474739, + -0.01754618249833584, + -0.0015456591499969363, + 0.036649189889431, + -0.02996249869465828, + 0.03715962544083595, + 0.0048204148188233376, + 0.011752751655876637, + 0.0400690995156765, + -0.015261988155543804, + 0.000445832556579262, + -0.0031327910255640745, + 0.009002787061035633, + -0.015083336271345615, + 0.03728723153471947, + -0.013934859074652195, + -0.02483263425529003, + -0.006827060133218765, + 0.0005403426475822926, + 0.026466023176908493, + -0.016869856044650078, + -0.021055418998003006, + -0.001647746074013412, + -0.013437185436487198, + 0.034403279423713684, + -0.007503385655581951, + 0.005617968738079071, + -0.021629657596349716, + 0.01125507801771164, + 0.011293360963463783, + -0.024118024855852127, + 0.018758464604616165, + 0.010859491303563118, + -0.01605316251516342, + 0.021502049639821053, + -0.0036496059037745, + -0.017112312838435173, + 0.012448218651115894, + -0.009130395017564297, + -0.016065923497080803, + 0.010030035860836506, + -0.023250287398695946, + 0.01421559788286686, + -0.00439292611554265, + -0.008122287690639496, + 0.022484635934233665, + -0.008517874404788017, + 0.025240980088710785, + -0.02080020122230053, + 0.0010766976047307253, + -0.015695856884121895, + -0.014534619636833668, + -0.03647053614258766, + -0.000130699118017219, + 0.028405673801898956, + 0.011491154320538044, + -0.007101418450474739, + -0.011044524610042572, + -0.016091443598270416, + -0.009028308093547821, + 0.024066980928182602, + -0.03159588947892189, + 0.013909337110817432, + -0.018248029053211212, + -0.004077094607055187, + -0.008568917401134968, + -0.02212733030319214, + 0.000807523145340383, + 0.007975537329912186, + 0.00486826803535223, + 0.04849126935005188, + 0.011944164521992207, + 0.017775878310203552, + -0.015236467123031616, + 0.016474269330501556, + 0.01879674568772316, + 0.03006458654999733, + -0.019358225166797638, + -0.009519601240754128, + -0.01517266221344471, + 0.010336296632885933, + 0.029094761237502098, + 0.007299211807549, + -0.005637109745293856, + -0.01344994641840458, + -0.02231874316930771, + 0.010712741874158382, + 0.005461648106575012, + 0.012065392918884754, + -0.02912028320133686, + 0.0125120235607028, + 0.02557276375591755, + -0.036980971693992615, + 0.05686239153146744, + 0.0038729209918528795, + 0.047955311834812164, + 0.00047015794552862644, + 0.03521997481584549, + 0.017329247668385506, + -0.019817614927887917, + -0.00413132831454277, + 0.019447550177574158, + 0.013245772570371628, + 0.02291850373148918, + -0.015823466703295708, + -0.02566208876669407, + 0.04019670933485031, + -0.013539272360503674, + -0.04272335767745972, + -0.0033784375991672277, + -0.01456014160066843, + 0.01049580704420805, + 0.012473740614950657, + 0.04139623045921326, + -0.008907080627977848, + -0.011248698458075523, + -0.011822937056422234, + 0.024590177461504936, + 0.010470285080373287, + -0.008460449986159801, + 0.017775878310203552, + -0.0022395309060811996, + 0.057985346764326096, + 0.025049567222595215, + 0.0029700901359319687, + 0.0014643087051808834, + -0.01498124934732914, + -0.018184226006269455, + -0.014432532712817192, + 0.023901090025901794, + 0.005554164294153452, + -0.008734808303415775, + -0.004332311917096376, + -0.003968627657741308, + 0.00189020240213722, + -0.024105263873934746, + -0.023403417319059372, + -0.036036666482686996, + -0.019690006971359253, + 0.009283525869250298, + -0.01313092466443777, + -0.0005303732468746603, + 0.0008047317387536168, + 0.0027738919015973806, + -0.005372322164475918, + 0.009430275298655033, + -0.023033352568745613, + -0.03491371124982834, + 0.01217386033385992, + 0.007356635760515928, + -0.011956925503909588, + -0.022561199963092804, + 0.011727230623364449, + -0.008607200346887112, + 0.016742248088121414, + -0.011089187115430832, + 0.006386810448020697, + -0.018937116488814354, + 0.007522527128458023, + 0.022012483328580856, + 0.04226396977901459, + -0.05956769362092018, + -0.025521719828248024, + 0.02243359200656414, + 0.0037261710967868567, + 0.023352373391389847, + 0.03667471185326576, + -0.014126271940767765, + 0.0032619948033243418, + -0.007241787854582071, + -0.020825723186135292, + -0.03315271437168121, + -0.011350784450769424, + -0.006648407783359289, + -0.02080020122230053, + -0.01178465411067009, + 0.03141723573207855, + 0.020940570160746574, + -0.024373242631554604, + -0.00877947174012661, + 0.012224903330206871, + -0.036215320229530334, + -0.007324733771383762, + 0.04897617921233177, + -0.03662366792559624, + -0.0165125522762537, + -0.030141150578856468, + -0.0004681640421040356, + 0.0034709537867456675, + -0.015249227173626423, + 0.0005758337792940438, + 0.01813318207859993, + -0.044611964374780655, + 0.0030721770599484444, + 0.014241119846701622, + 0.008887939155101776, + -0.018196986988186836, + -0.000594975077547133, + 0.0172654427587986, + 0.008983645588159561, + 0.01947307214140892, + -0.013207489624619484, + -0.011625143699347973, + -0.0082052331417799, + 0.041268620640039444, + 0.010438383556902409, + -0.04849126935005188, + -0.010438383556902409, + -0.028865065425634384, + 0.02863536961376667, + 0.013047979213297367, + 0.022561199963092804, + 0.030370846390724182, + -0.052625786513090134, + 0.013717924244701862, + 0.0007018473115749657, + 0.019715528935194016, + -0.0332292802631855, + 0.004472681321203709, + 0.00710779894143343, + 6.860208486614283e-06, + -0.034505363553762436, + 0.01612972654402256, + 0.023722438141703606, + -0.020749157294631004, + -0.031187541782855988, + -0.016844335943460464, + -0.030039064586162567, + 0.0020640690345317125, + 0.04818500578403473, + -0.01011298131197691, + -0.03256571292877197, + 0.02756345644593239, + 0.0175717044621706, + 0.013679642230272293, + -0.009296286851167679, + -0.008926221169531345, + -0.018005574122071266, + -0.028482239693403244, + 0.006737734191119671, + 0.019702767953276634, + -0.015453401021659374, + -0.020098354667425156, + -0.02128511480987072, + -0.042136359959840775, + 0.002968495013192296, + -0.010189546272158623, + 0.03146827965974808, + -0.02242083102464676, + -0.006032696459442377, + 0.019524116069078445, + -0.007439581211656332, + -0.013603076338768005, + -8.130063361022621e-05, + 0.00182480295188725, + -0.01928165927529335, + -0.003923964221030474, + -0.027078544721007347, + 0.021923156455159187, + -0.013398902490735054, + -0.018082138150930405, + -0.03159588947892189, + -0.00020028567814733833, + -0.014828119426965714, + -0.011663425713777542, + -0.017290964722633362, + 0.04660265892744064, + 0.004603479988873005, + -0.03136619180440903, + -0.012027110904455185, + -0.0006264784606173635, + -0.01967724598944187, + -0.023735199123620987, + 0.017316486686468124, + -0.013194729574024677, + 0.005598827265202999, + -0.02922236919403076, + -0.03960970789194107, + -0.010699980892241001, + 0.026032153517007828, + -0.015797944739460945, + 0.00902192760258913, + -0.004632192198187113, + -0.02797180414199829, + 0.048338137567043304, + -0.01083397027105093, + 0.012537544593214989, + 0.014917445369064808, + 0.012658772990107536, + -0.0022060335613787174, + -0.0020736397709697485, + 0.007152461912482977, + 0.002877573948353529, + 0.0005826129927299917, + -0.002545791445299983, + 0.010604274459183216, + 0.00048132368829101324, + -0.02566208876669407, + -0.02626184932887554, + 0.033458974212408066, + 0.0016764579340815544, + -0.007745841983705759, + 0.011663425713777542, + -0.010093839839100838, + 0.007229027338325977, + 0.005094773136079311, + 0.01307988166809082, + -0.010400100611150265, + -0.008530634455382824, + 0.012460979633033276, + 0.03481162711977959, + -0.01669120416045189, + -0.020060071721673012, + -0.04361661896109581, + 0.012486501596868038, + 0.014751554466784, + -0.0005730423727072775, + -0.01813318207859993, + -0.0003124416689388454, + 0.011082806624472141, + 0.015198184177279472, + 0.03710858151316643, + -0.022076288238167763, + -0.021693462505936623, + -0.020277006551623344, + 0.01031077466905117, + 0.015708617866039276, + 0.01493020635098219, + 0.03305062651634216, + -0.01584898866713047, + -0.047674573957920074, + 0.019051963463425636, + 0.0022650526370853186, + 0.027078544721007347, + 0.022931264713406563, + -0.011759132146835327, + 0.023684155195951462, + 0.014623945578932762, + -0.016665682196617126, + 0.015427879989147186, + 0.008549775928258896, + -0.01698470488190651, + 0.004086665343493223, + 0.00802020076662302, + -0.023135438561439514, + -0.005828522611409426, + 0.008135047741234303, + -0.009098493494093418, + -0.01937098614871502, + -0.017980052158236504, + -0.019128529354929924, + 0.016180770471692085, + -0.005972082260996103, + 0.0016206292202696204, + 0.010023655369877815, + 0.013577555306255817, + 0.015619292855262756, + 0.01216109935194254, + 0.00749062467366457, + -0.008900700137019157, + -0.01965172402560711, + 0.020264245569705963, + 0.04277440160512924, + 0.011204035021364689, + 0.025036806240677834, + -0.003017943352460861, + -0.011503915302455425, + 0.008913460187613964, + 0.015593770891427994, + -0.02319924347102642, + 0.008862417191267014, + -0.023645874112844467, + -0.041268620640039444, + -0.023645874112844467, + 0.021782787516713142, + -0.011382686905562878, + 0.027844196185469627, + -0.02661915309727192, + -0.014139032922685146, + -0.01888607256114483, + -0.03083023801445961, + 0.02155309170484543, + -0.00974291656166315, + 0.0004314765683375299, + 0.04236605390906334, + 0.012409936636686325, + 0.007905352860689163, + -0.013552033342421055, + 0.011114709079265594, + -0.006182636599987745, + -0.018375638872385025, + 0.012224903330206871, + -0.015568248927593231, + 0.046245355159044266, + 0.010342677123844624, + -0.032131846994161606, + 0.04468853026628494, + -0.03414805978536606, + 0.015797944739460945, + 0.03968627378344536, + -0.025164416059851646, + -0.001960386987775564, + -0.016627401113510132, + 0.013666881248354912, + 0.00012691074516624212, + 0.029988020658493042, + 0.029145803302526474, + 0.012384414672851562, + 0.012148338370025158, + 0.007675657048821449, + 0.027231674641370773, + 0.011918643489480019, + -0.011944164521992207, + 0.026312893256545067, + -4.9498179578222334e-05, + 0.021642418578267097, + 0.04205979406833649, + 0.011676186695694923, + -0.03185110539197922, + -0.0313151516020298, + -0.0005953738582320511, + 0.012913989834487438, + 0.0553821325302124, + -0.02689989283680916, + -0.002170941326767206, + 0.02873745560646057, + -0.03407149761915207, + 0.007056755479425192, + 0.0028807641938328743, + -0.03894614428281784, + 0.0013351049274206161, + 0.0007333506946451962, + -0.0272827185690403, + 0.010527709499001503, + -0.020213201642036438, + 0.010891393758356571, + -0.0010192736517637968, + 0.0031758591067045927, + -0.02527926303446293, + -0.030702628195285797, + 0.027461370453238487, + -0.03846123069524765, + -0.022765373811125755, + -0.058853086084127426, + 0.023786243051290512, + 0.0074012987315654755, + -0.00206247391179204, + 0.029477586969733238, + -0.01614248752593994, + 0.007637374568730593, + -0.003758073318749666, + -0.027895240113139153, + 0.0013079881900921464, + 0.005458457861095667, + 0.006737734191119671, + 0.015057814307510853, + ], + "index": 18, + }, + { + "title": "Foreign Economic Administration", + "text": "In the administration of Franklin Delano Roosevelt, the Foreign Economic Administration was formed to relieve friction between US agencies operating abroad. As described by the biographer of the FEA's chief, Leo Crowley, the agency was designed and run by \"The Nation's #1 Pinch-hitter\".S. L.", + "vector": [ + -0.005764643661677837, + 0.010161272250115871, + -0.010556652210652828, + -0.024418683722615242, + -0.006618665065616369, + -0.008374153636395931, + -0.03770345821976662, + 0.011015293188393116, + -0.07793734967708588, + 0.03077639639377594, + 0.010865048505365849, + 0.030048897489905357, + -0.06439953297376633, + -0.049375083297491074, + 0.0011129953199997544, + 0.0183772724121809, + -0.041593998670578, + 0.00693101529031992, + -0.0027399850077927113, + -0.030586615204811096, + -0.011719070374965668, + -0.03982269763946533, + 0.012051189318299294, + -0.02067047916352749, + 0.010888771153986454, + 0.029827484861016273, + -0.013181976974010468, + 0.01298428699374199, + 0.024434497579932213, + 0.025051292032003403, + 0.019183848053216934, + 0.01951596885919571, + 0.018092598766088486, + -0.030681505799293518, + 0.01719113253057003, + -0.01060409750789404, + 0.01654270850121975, + -0.012936840765178204, + -0.007456871215254068, + -0.004250337369740009, + -0.0004571583995129913, + 0.000445791200036183, + -0.044662151485681534, + 0.06443116068840027, + 0.041119541972875595, + 0.047635409981012344, + -0.061932358890771866, + 0.019642489030957222, + 0.011149722151458263, + 0.015206323936581612, + 0.002866506576538086, + -0.03669128566980362, + -0.022631565108895302, + 0.02906835451722145, + 0.02785058319568634, + -0.0072196428664028645, + 0.059496816247701645, + 0.03022286482155323, + -0.0486159548163414, + -0.0050371442921459675, + 0.02378607541322708, + -0.049786277115345, + -0.040044110268354416, + -0.018551239743828773, + -0.004388720728456974, + 0.02894183248281479, + 0.018108414486050606, + 0.03131411597132683, + 0.017950262874364853, + -0.01418624259531498, + -0.0148267587646842, + 0.009259805083274841, + -0.029368843883275986, + 0.0377667210996151, + -0.04273269698023796, + -0.05019747465848923, + 2.990062967000995e-05, + -0.043586716055870056, + -0.0005050982581451535, + 0.010208717547357082, + -0.007247319445014, + -0.0001155869395006448, + 0.01660596951842308, + 0.014352302066981792, + 0.007472686469554901, + -0.004143584985285997, + -0.03482509031891823, + -0.05807344987988472, + 0.0009172821301035583, + -0.002866506576538086, + -0.011916760355234146, + 0.030317755416035652, + -0.04456726089119911, + 0.00831880047917366, + 0.05336051434278488, + 0.010248255915939808, + -0.0711684376001358, + 0.007638745941221714, + -0.0011723024072125554, + -0.01330059114843607, + -0.05272790789604187, + 0.01668504625558853, + -0.07363561540842056, + -0.005871396511793137, + -0.013189884833991528, + 0.037608567625284195, + -0.038715630769729614, + 0.02082863077521324, + -0.022346891462802887, + 0.13208863139152527, + -0.04902714863419533, + -0.029874930158257484, + 0.03555259108543396, + 0.014107166789472103, + 0.029890745878219604, + 0.0534554086625576, + 0.024497758597135544, + 0.028103627264499664, + -0.0002970293862745166, + 0.028309224173426628, + 0.02136634849011898, + -0.017412545159459114, + 0.02957444079220295, + 0.038241174072027206, + 0.008014357648789883, + 0.029305582866072655, + 0.01181396096944809, + 0.05275953933596611, + 0.01959504373371601, + -0.038146283477544785, + -0.05921214446425438, + -0.002524502808228135, + 0.0437764972448349, + -0.009615647606551647, + 0.009860782884061337, + -0.012573091313242912, + -0.005487877409905195, + -0.009829152375459671, + 0.01831401139497757, + 0.04583247750997543, + 0.026316508650779724, + 0.03922171890735626, + -0.03311704844236374, + 0.0017189155332744122, + 0.0018968366784974933, + -0.055353231728076935, + 0.04804660379886627, + -0.026743518188595772, + -0.021571945399045944, + 0.004792008548974991, + -0.023928411304950714, + 0.025114553049206734, + 0.017001349478960037, + -0.0005243730265647173, + -0.007437102030962706, + -0.061299752444028854, + 0.012059097178280354, + 0.005187388509511948, + -0.006685879547148943, + 0.035331178456544876, + -0.01715950109064579, + 0.01271542813628912, + -0.02378607541322708, + 0.012620536610484123, + -0.009354696609079838, + 0.008903962559998035, + 0.019310370087623596, + -0.000600977975409478, + -0.05864279717206955, + 0.025288520380854607, + 0.04330204427242279, + 0.00914119090884924, + 0.0039063566364347935, + -0.009157005697488785, + -0.00028862757608294487, + -0.031677864491939545, + 0.009299343451857567, + 0.025826236233115196, + 0.004183122888207436, + -0.01149765681475401, + 0.007448963355273008, + 0.027391942217946053, + -0.011212983168661594, + 0.05687149241566658, + 0.003200602950528264, + 0.0007250285125337541, + -0.005183434579521418, + -0.004958068020641804, + -0.00280917645432055, + -0.017618143931031227, + 0.017317654564976692, + 0.03419248387217522, + 0.024766618385910988, + 0.037608567625284195, + 0.038778893649578094, + 0.0012088750954717398, + -0.01334803644567728, + 0.043555084615945816, + 0.007848297245800495, + -0.008279262110590935, + 0.01668504625558853, + 0.022837162017822266, + 0.04731910675764084, + 0.01831401139497757, + 0.010627820156514645, + 0.028688790276646614, + 0.028894387185573578, + -0.061932358890771866, + -0.03202579915523529, + 0.035805635154247284, + 0.03205743059515953, + -0.08382061123847961, + 0.02125564031302929, + -0.02131890133023262, + -0.050102584064006805, + 0.010453852824866772, + -0.009560293518006802, + 0.013949014246463776, + -0.0022081986535340548, + 0.012628444470465183, + -0.03030194155871868, + 0.019231295213103294, + -0.024134010076522827, + 0.007520131766796112, + -0.0055432310327887535, + -0.028862757608294487, + 0.01451836246997118, + -0.0034417849965393543, + -0.00394391780719161, + 0.008176462724804878, + -0.03688106685876846, + 0.060635510832071304, + 0.0037897194270044565, + 0.03656476363539696, + -0.04576921463012695, + 0.022362705320119858, + 0.002350535476580262, + -0.033433351665735245, + -0.047603778541088104, + 0.037608567625284195, + -0.012501922436058521, + 0.026838410645723343, + -0.026411399245262146, + -0.01779210940003395, + 0.02611090987920761, + 0.024703357368707657, + -0.022789716720581055, + -0.010248255915939808, + -0.01589428447186947, + 0.028672974556684494, + 0.02082863077521324, + -0.03371802717447281, + 0.0064842356368899345, + 0.005661844741553068, + 0.02258411794900894, + 0.06775235384702682, + 0.008437413722276688, + -0.030412647873163223, + -0.004744562786072493, + 0.015506812371313572, + 0.010311516001820564, + -0.007504316978156567, + 0.005321817938238382, + 0.03318030759692192, + -0.0392533503472805, + -0.02788221463561058, + 0.01245447713881731, + -0.03257933259010315, + 0.039316609501838684, + -0.026743518188595772, + -0.009497033432126045, + -0.02305857464671135, + 0.043555084615945816, + 0.05500529706478119, + -0.017602328211069107, + 0.013253144919872284, + 0.003406200557947159, + 0.044029541313648224, + 0.0604773610830307, + 0.048805736005306244, + -0.012541460804641247, + 0.024039117619395256, + 0.037576936185359955, + -0.014795128256082535, + -0.07306626439094543, + 0.014716052450239658, + -0.027107268571853638, + -0.038747262209653854, + 0.00921235978603363, + 0.007195920217782259, + -0.016305480152368546, + 0.001842471887357533, + 0.03722900152206421, + 0.028720419853925705, + 0.023912595584988594, + 0.04580084607005119, + 0.003981478977948427, + -0.011070646345615387, + -0.0008619289146736264, + 0.01066735852509737, + 0.04453562945127487, + 0.034065961837768555, + 0.048173125833272934, + 0.006175839342176914, + -0.02598438784480095, + 0.015997083857655525, + -0.03732389211654663, + -0.01391738373786211, + 0.009884505532681942, + -0.030934549868106842, + 0.03129829838871956, + -0.01097575481981039, + -0.030428461730480194, + -0.03158297389745712, + -1.3954141650174279e-05, + -0.013490373268723488, + 0.016843197867274284, + -0.05323399230837822, + 0.044693782925605774, + -0.07110518217086792, + -0.0027360310778021812, + 0.03416085243225098, + -0.030396832153201103, + 0.012794503942131996, + 0.009671000763773918, + -0.07838017493486404, + -0.011133907362818718, + -0.04678138718008995, + -0.010643635876476765, + 0.01769721880555153, + -0.005084589589387178, + -0.07009300589561462, + -0.009006761945784092, + 0.025272704660892487, + -0.07091540098190308, + -0.013759232126176357, + -0.044092804193496704, + 0.011315782554447651, + -0.0022338982671499252, + 0.007136613130569458, + 0.0190415121614933, + 0.0038035577163100243, + -0.023232541978359222, + 0.0022655287757515907, + -0.02482987754046917, + 0.00215284526348114, + -0.011616270989179611, + -0.010216625407338142, + 0.0019383515464141965, + -0.04153073951601982, + 0.0008930650656111538, + -0.01589428447186947, + 0.025272704660892487, + 0.000450239225756377, + 0.03264259174466133, + -0.011711162514984608, + -0.012952656485140324, + -0.011157630011439323, + 0.01041431538760662, + 0.05513181909918785, + 0.03387617692351341, + 0.029226506128907204, + 0.02184080332517624, + 0.037576936185359955, + -0.05209529772400856, + 0.013427112251520157, + -0.027471018955111504, + -0.021144933998584747, + -0.012509830296039581, + -0.005175527185201645, + -0.02495639957487583, + 0.0018345642602071166, + 0.04096139222383499, + -0.028071995824575424, + 0.024466129019856453, + -0.01711205579340458, + -0.03447715565562248, + -0.002089584479108453, + 0.012240971438586712, + 0.0007996564963832498, + -0.039885956794023514, + -0.02120819501578808, + -0.016321295872330666, + 0.038905415683984756, + 0.015158877708017826, + -0.04674975946545601, + -0.0248140636831522, + 0.03270585089921951, + 0.013015917502343655, + 0.009868690744042397, + -0.04798334464430809, + -0.0065514505840837955, + -0.05402475595474243, + -0.0296535175293684, + -0.05506855994462967, + -0.06724626570940018, + 0.027123084291815758, + 0.028103627264499664, + 0.012604721821844578, + 0.005748828407377005, + -0.0133638521656394, + 0.00856393575668335, + 0.002660908969119191, + -0.01774466410279274, + -0.012976379133760929, + -0.049343451857566833, + -0.024545203894376755, + 0.016938088461756706, + -0.008951408788561821, + 0.05339214578270912, + -0.02258411794900894, + -0.04197356477379799, + 0.016795752570033073, + -0.024640096351504326, + 0.03545770049095154, + 0.02664862759411335, + -0.04425095394253731, + -0.008160647936165333, + -0.021635206416249275, + -0.014391840435564518, + -3.496644058031961e-05, + 0.04697117209434509, + 0.004657579120248556, + 0.013158254325389862, + 0.05057704076170921, + 0.015103524550795555, + -0.0032045566476881504, + -0.03612193837761879, + 0.006049317307770252, + -0.01097575481981039, + 0.023817704990506172, + -0.01891499012708664, + -0.017017165198922157, + 0.019231295213103294, + 0.017649773508310318, + -0.014605345204472542, + 0.03023868054151535, + 0.017396729439496994, + 0.002854645252227783, + 0.0023900733795017004, + -0.006480282172560692, + -0.007310580462217331, + 0.0097737992182374, + -0.0472874753177166, + -0.057630620896816254, + 0.0002799786161631346, + 0.009038392454385757, + 0.05386660248041153, + 0.044092804193496704, + 0.008975131437182426, + -0.05408801510930061, + -0.02544667199254036, + -0.023343248292803764, + -0.003350847400724888, + -0.00855602789670229, + 0.03390780836343765, + 0.012644260190427303, + -0.037545304745435715, + -0.012628444470465183, + 0.003532722359523177, + -0.011924667283892632, + 0.035299547016620636, + 0.061236489564180374, + -0.023343248292803764, + -0.013632710091769695, + -0.009931951761245728, + -0.006120485719293356, + -0.01603662222623825, + -0.01298428699374199, + -0.029732592403888702, + -0.030554983764886856, + 0.010793880559504032, + 0.016432002186775208, + 0.025241073220968246, + 0.0015528558287769556, + 0.048268020153045654, + 0.021050043404102325, + -0.06110996752977371, + 0.03327520191669464, + 0.0007151439785957336, + -0.03189927712082863, + -0.005072728265076876, + 0.06231192499399185, + -0.004701070953160524, + 0.0037007590290158987, + -0.048900626599788666, + -0.022062215954065323, + 0.028767865151166916, + -0.03564748167991638, + 0.0031689724419265985, + 0.05260138586163521, + -0.012114450335502625, + -0.0059900106862187386, + -0.00952075608074665, + -0.015459367074072361, + -0.003779835067689419, + -0.026490475982427597, + 0.03716574236750603, + 0.0007620953838340938, + -0.008093433454632759, + -0.013775046914815903, + 0.004507334437221289, + 0.028119441121816635, + -0.06392507255077362, + -0.022014770656824112, + 0.013197791762650013, + 0.044693782925605774, + 0.0019205594435334206, + -0.0025541563518345356, + -0.013585264794528484, + 0.016384556889533997, + 0.0377667210996151, + -0.004479657858610153, + -0.0008149775094352663, + -0.002188429469242692, + 0.003083965741097927, + 0.03215232118964195, + 0.0159575454890728, + 0.0017762456554919481, + 0.02720215916633606, + -0.004179168958216906, + 0.05870605632662773, + 0.01708042621612549, + -0.02008531615138054, + 0.08723669499158859, + -0.0033034018706530333, + 0.007302672602236271, + 0.0182981975376606, + -0.01719113253057003, + -0.040581826120615005, + 0.024371236562728882, + -0.010572466999292374, + 0.02728123590350151, + 0.02781895361840725, + 0.0009874621173366904, + 0.02369118295609951, + -0.00021894180099479854, + 0.004111954476684332, + -0.011639993637800217, + -0.04599062725901604, + -0.0032757252920418978, + -0.019800642505288124, + 0.030507538467645645, + -0.033401720225811005, + -0.0272337906062603, + 0.006764955818653107, + 0.04456726089119911, + -0.000455675704870373, + 0.012865672819316387, + -0.0011624179314821959, + 0.030539168044924736, + -0.016859013587236404, + -0.0342557430267334, + 0.07534365355968475, + 0.06762583553791046, + -0.004677348304539919, + 0.0028783681336790323, + 0.013197791762650013, + 0.004606179893016815, + -0.003467484610155225, + 0.02952699549496174, + -0.018171675503253937, + 0.003030589548870921, + -0.0016724583692848682, + -0.04633856192231178, + 0.019231295213103294, + -0.03139318898320198, + 0.0004675371164921671, + -0.0546257309615612, + 0.007583392783999443, + 0.009560293518006802, + 0.02362792193889618, + 0.0005960356793366373, + -0.008943500928580761, + -0.031235037371516228, + -0.014573715627193451, + 0.007583392783999443, + 0.005748828407377005, + -0.0035030688159167767, + 0.008334615267813206, + 0.022900423035025597, + -0.0427643246948719, + 0.014043905772268772, + 0.011268336325883865, + -0.011442303657531738, + 0.026443028822541237, + 0.013332221657037735, + 0.010319423861801624, + 5.136854088050313e-05, + -0.015198416076600552, + -0.014621160924434662, + 0.02663281187415123, + -0.006879616063088179, + 0.0115688256919384, + 0.035805635154247284, + 0.018503794446587563, + -0.04067671671509743, + 0.0027241697534918785, + -0.020923521369695663, + -0.010517113842070103, + 0.012193526141345501, + -0.01514306291937828, + 0.027534279972314835, + 0.039885956794023514, + -0.02312183566391468, + 0.03779834881424904, + -0.04077161103487015, + -0.05642866715788841, + 0.0029554672073572874, + -0.021508684381842613, + 0.0738253965973854, + -0.011861407198011875, + 0.004270106554031372, + 0.004404535982757807, + 0.03447715565562248, + 0.012517738156020641, + -0.004708978347480297, + -0.004432212561368942, + -0.006278638262301683, + -0.019832272082567215, + 0.03751367703080177, + -0.03359150514006615, + -0.009410049766302109, + 0.025731345638632774, + 0.013205699622631073, + -0.018804283812642097, + 0.00856393575668335, + -0.0079787727445364, + -0.0011327643878757954, + -0.0020144623704254627, + -0.028056181967258453, + 0.050070952624082565, + -0.00976589135825634, + -0.0011584641179069877, + 0.013688063248991966, + 0.04210008680820465, + 0.014684421941637993, + -0.022979499772191048, + 0.009378419257700443, + -0.02435542270541191, + 0.04108791425824165, + -0.020860260352492332, + -0.007860158570110798, + 0.011584640480577946, + 0.0017604305176064372, + -0.032864004373550415, + 0.003995317034423351, + -0.02068629302084446, + 0.009576109237968922, + -0.011125999502837658, + -0.01298428699374199, + -0.040455304086208344, + -0.0018553216941654682, + 0.0031096655875444412, + 0.012343770824372768, + -0.017491621896624565, + 0.02133471705019474, + -0.018124230206012726, + 0.029400473460555077, + -0.002504733856767416, + -0.03151971101760864, + 0.03025449439883232, + 0.018108414486050606, + -0.02607928030192852, + 0.005816043354570866, + -0.02073373831808567, + -0.024118194356560707, + 0.008722088299691677, + 0.05617562308907509, + -0.0005204192129895091, + 0.035141393542289734, + 0.009868690744042397, + 0.01883591338992119, + 0.010319423861801624, + -0.00430569052696228, + 0.006776817142963409, + 0.015751948580145836, + 0.020037870854139328, + 0.02734449692070484, + 0.014621160924434662, + -0.034666936844587326, + -0.009718446061015129, + 0.024070749059319496, + -0.05136780068278313, + -0.0034971381537616253, + -0.00530204875394702, + -0.022663194686174393, + -0.02968514710664749, + -0.012944748625159264, + -0.028688790276646614, + -0.024023301899433136, + -0.0008149775094352663, + 0.008437413722276688, + -0.014225780963897705, + -0.019990423694252968, + -0.03330682963132858, + 0.02302694506943226, + 0.0033587550278753042, + -0.047129321843385696, + 0.0731927901506424, + -0.028862757608294487, + -0.0006919153966009617, + -0.025794606655836105, + -0.030064713209867477, + 0.02957444079220295, + -0.018045153468847275, + -0.013150346465408802, + -0.031662046909332275, + -0.013387574814260006, + -0.02541504055261612, + -0.0059267496690154076, + -0.03077639639377594, + -0.02255248837172985, + 0.0017683380283415318, + 0.0023011129815131426, + 0.0004326942435000092, + 0.009259805083274841, + -0.019895533099770546, + -0.06787887960672379, + -0.0004766802885569632, + 0.004368951544165611, + 0.014320671558380127, + 0.02244178205728531, + -0.006266776472330093, + -0.0365963950753212, + -0.021192381158471107, + -0.005740921013057232, + -0.016171051189303398, + -0.01655852422118187, + -0.0071721975691616535, + 0.002908021677285433, + 0.021192381158471107, + -0.007017998956143856, + 0.022773901000618935, + 9.384102304466069e-05, + 0.03903193771839142, + 0.012059097178280354, + 0.04545291140675545, + -0.021192381158471107, + 0.04304900020360947, + 0.01953178271651268, + 0.019373631104826927, + 0.012501922436058521, + -0.01214608084410429, + -0.024750802665948868, + 0.00945749506354332, + 0.033401720225811005, + 0.025715529918670654, + -0.008548120968043804, + -0.007856205105781555, + 0.002635209122672677, + -0.044219326227903366, + -0.013719693757593632, + 0.008231816813349724, + 0.006535635329782963, + -0.0031887416262179613, + -0.0020658615976572037, + -0.07173778861761093, + 0.022805532440543175, + 0.03684943914413452, + -0.02664862759411335, + -0.024466129019856453, + 0.013126623816788197, + -0.027044007554650307, + 0.05105149373412132, + -0.019800642505288124, + 0.03199416771531105, + -0.03153552860021591, + -0.009275619871914387, + 0.02131890133023262, + 0.005816043354570866, + -0.010153364390134811, + -0.05130453780293465, + -0.048331279307603836, + -0.006741232704371214, + -0.004902714863419533, + -0.01780792511999607, + -0.024007488042116165, + 0.028736235573887825, + -0.02841993048787117, + -0.022093847393989563, + 0.011165537871420383, + -0.009805429726839066, + -0.03131411597132683, + -0.028198517858982086, + -0.07939235121011734, + -0.04383976012468338, + -0.02895764820277691, + 0.004123815800994635, + -0.0017604305176064372, + -0.006824262905865908, + 0.037608567625284195, + -0.021571945399045944, + -0.01092040166258812, + 0.005867442581802607, + -0.03716574236750603, + 0.005602537654340267, + -0.024418683722615242, + -0.045927368104457855, + 0.014486731961369514, + -0.013174069114029408, + 0.006883569993078709, + -0.006286545656621456, + -0.004325459711253643, + -0.013189884833991528, + 0.005258556921035051, + 0.028846941888332367, + -0.012240971438586712, + -0.06307105720043182, + 0.034097589552402496, + -0.01652689278125763, + 0.02906835451722145, + 0.015530535019934177, + 0.028704604133963585, + -0.0013798769796267152, + 0.03966454416513443, + 0.025146182626485825, + -0.028040366247296333, + -0.024149823933839798, + 0.011450211517512798, + -0.04665486887097359, + 0.04311225935816765, + -0.04320714995265007, + 0.02721797488629818, + 0.01831401139497757, + 0.022647378966212273, + 0.02432379126548767, + -0.01244656927883625, + 0.02018020674586296, + -0.0202118381857872, + -0.004515242297202349, + 0.009046299383044243, + -0.03254770115017891, + -0.011545103043317795, + -0.016416186466813087, + 0.02081281505525112, + 0.04197356477379799, + -0.013087085448205471, + -0.03387617692351341, + 0.043649978935718536, + -0.014842573553323746, + 0.012248879298567772, + -0.012501922436058521, + 0.008216001093387604, + -0.01834564283490181, + 0.01181396096944809, + 0.035900525748729706, + -0.057630620896816254, + -0.01067526638507843, + -0.04096139222383499, + -0.0001254096714546904, + -0.029906559735536575, + 0.018029337748885155, + -0.02375444397330284, + 0.0284831915050745, + -0.008690457791090012, + -0.03299052640795708, + -0.016859013587236404, + 0.0005362344090826809, + 0.023295802995562553, + -0.021461239084601402, + 0.044788673520088196, + 0.01329268328845501, + 0.028894387185573578, + 0.0007047652616165578, + 0.00215679919347167, + -0.009014668874442577, + -0.024149823933839798, + 0.0012484131148084998, + -0.036438241600990295, + -0.03963291272521019, + -0.010319423861801624, + 0.0036434289067983627, + 0.002293205354362726, + -0.0008896054932847619, + -0.006373529322445393, + 0.03019123338162899, + -0.013276868499815464, + 0.041119541972875595, + 0.031061070039868355, + -0.03305378556251526, + 0.011371135711669922, + -0.03605867549777031, + -0.014059720560908318, + 0.0133638521656394, + 0.0027676615864038467, + -0.001203932799398899, + -0.023975856602191925, + -0.014684421941637993, + -0.03858910873532295, + 0.035331178456544876, + 0.018661946058273315, + 0.01329268328845501, + -0.016210589557886124, + -0.008587658405303955, + -0.007990634068846703, + 0.0017268231604248285, + 0.0049224840477108955, + -0.029827484861016273, + 0.02892601676285267, + -0.0011475911596789956, + 0.01004265807569027, + -0.0003281655954197049, + -0.014146704226732254, + 0.022141292691230774, + 0.0027617309242486954, + 0.027123084291815758, + -0.004788054618984461, + -0.013909476809203625, + 0.018725207075476646, + 0.0354260690510273, + -0.008271354250609875, + 0.019199663773179054, + -0.010208717547357082, + 0.002097492106258869, + -0.0031867646612226963, + -0.0034220158122479916, + 0.03193090856075287, + -0.013569449074566364, + 0.013885753229260445, + -0.00025254912907257676, + 0.02309020608663559, + -0.021113304421305656, + -0.03612193837761879, + 0.03631171956658363, + -0.0015459366841241717, + -0.011703254655003548, + -0.007947142235934734, + 0.019784826785326004, + -0.013585264794528484, + -0.02955862507224083, + -0.017887001857161522, + -0.0066542490385472775, + -0.03158297389745712, + -0.023406509310007095, + 0.009338880889117718, + -0.061204858124256134, + -0.011062738485634327, + -0.018598686903715134, + 0.0182981975376606, + 0.010129641741514206, + -0.011276244185864925, + 0.012905210256576538, + -0.03365476429462433, + 0.026269063353538513, + -0.03137737512588501, + 0.021682651713490486, + -0.01187722198665142, + 0.012565183453261852, + -0.011323689483106136, + 0.004254291299730539, + 0.006298406980931759, + 0.013806677423417568, + -0.03745041415095329, + 0.010801787488162518, + -0.004384766798466444, + -0.025003844872117043, + -0.0412776954472065, + 0.03979106619954109, + -0.022283630445599556, + -0.022631565108895302, + -0.03922171890735626, + 0.004649671725928783, + -0.002775569213554263, + -0.003044427838176489, + -0.002271459437906742, + -0.04674975946545601, + -0.053075842559337616, + -0.031187592074275017, + 0.0019442823249846697, + -0.01714368723332882, + 0.014795128256082535, + 0.003684943774715066, + 0.019879717379808426, + -0.0026470706798136234, + 0.01391738373786211, + -0.01419415045529604, + 0.01215398870408535, + -0.05582768842577934, + 0.01717531681060791, + -0.03615356981754303, + 0.010762250050902367, + 0.01246238499879837, + 0.012565183453261852, + -0.018234936520457268, + 0.019721565768122673, + -0.023390693590044975, + -0.03672291710972786, + -0.03219976648688316, + 0.0016981580993160605, + -0.03798813372850418, + 0.010651543736457825, + 0.014486731961369514, + -0.013435020111501217, + 0.001800956903025508, + -0.028008734807372093, + 0.01663760095834732, + -0.012422846630215645, + 0.03205743059515953, + 0.007872020825743675, + -0.02715471386909485, + -0.011260428465902805, + -0.04368160665035248, + -0.042289867997169495, + -0.023248357698321342, + -0.008896054700016975, + 0.005792320240288973, + 0.0003464519395492971, + -0.030665690079331398, + 0.010018935427069664, + -0.018219120800495148, + 0.032927267253398895, + 0.02065466344356537, + 0.0075517622753977776, + -0.053645189851522446, + -0.006369575392454863, + 0.05965496972203255, + 0.005313910078257322, + -0.016076160594820976, + -0.013094993308186531, + 0.03735552355647087, + -0.022093847393989563, + -0.017048794776201248, + -0.013427112251520157, + -0.018551239743828773, + 0.00952866394072771, + -0.011948390863835812, + -0.003101757960394025, + 0.025051292032003403, + -0.024655910208821297, + -0.003951825201511383, + 0.03504650294780731, + -0.047603778541088104, + 0.002158776158466935, + -0.02663281187415123, + -0.003795650089159608, + -0.005191342439502478, + 0.02851482294499874, + 0.002949536545202136, + -0.014099258929491043, + 0.01361689530313015, + 0.0012375401565805078, + -0.025177812203764915, + 0.009924043901264668, + -0.02141379378736019, + -0.020227652043104172, + -0.0159575454890728, + -0.0021014458034187555, + 0.006942876614630222, + -0.02726542018353939, + -0.005262510851025581, + 0.01591010019183159, + 0.020433250814676285, + -0.023564660921692848, + 0.011695346795022488, + 0.009093745611608028, + -0.035331178456544876, + 0.010588282719254494, + 0.008136925287544727, + 0.03555259108543396, + 0.01780792511999607, + -0.028245963156223297, + -0.0016665277071297169, + -0.01512724719941616, + -0.004788054618984461, + 0.0007082248339429498, + 0.0027241697534918785, + -0.025905312970280647, + 0.03602704778313637, + -0.004191030282527208, + -0.007528039626777172, + 0.0012424823362380266, + -0.02970096282660961, + -0.006855892948806286, + -0.01391738373786211, + 0.017317654564976692, + -0.03393943980336189, + -0.021587761119008064, + 0.017618143931031227, + -0.011402766220271587, + 0.016400372609496117, + 0.011734885163605213, + 0.005381125025451183, + -0.04928019270300865, + 0.014581622555851936, + -0.018725207075476646, + -0.010841325856745243, + 0.00823972374200821, + -0.018535425886511803, + -0.003062219824641943, + -0.006867754738777876, + 0.00196998193860054, + 0.0039043796714395285, + -0.00273405434563756, + -0.024592651054263115, + -0.01953178271651268, + -0.047097694128751755, + 0.07287648320198059, + 0.0011159606510773301, + -0.020575586706399918, + 0.0018750907620415092, + -0.01276287343353033, + 0.018219120800495148, + -0.009497033432126045, + 0.02195150963962078, + 0.037007588893175125, + 0.009172821417450905, + -0.0008634115802124143, + 0.016171051189303398, + -0.03501487150788307, + 0.004301737062633038, + 0.012233064509928226, + 0.0044757043942809105, + 0.0019027673406526446, + 0.005760689731687307, + 0.002467172686010599, + -0.010698989033699036, + -0.0027992920950055122, + 0.035868894308805466, + 0.004451981279999018, + -0.03072895109653473, + -0.0236437376588583, + -0.00740547152236104, + -0.0050331903621554375, + 0.0065988958813250065, + 0.01951596885919571, + -0.020227652043104172, + 0.009077929891645908, + 0.00370668969117105, + 0.015751948580145836, + -0.0021231917198747396, + -0.007460825145244598, + 0.025889497250318527, + 0.020480696111917496, + 0.010627820156514645, + 0.029400473460555077, + 0.024418683722615242, + 0.001921547926031053, + -0.007919466122984886, + -0.040455304086208344, + -0.010865048505365849, + -0.03555259108543396, + 0.016171051189303398, + 0.007777129299938679, + 0.03248443827033043, + -0.022299444302916527, + 0.028309224173426628, + 0.012928933836519718, + 0.007650607265532017, + 0.019689936190843582, + 0.0076150232926011086, + 0.006958691868931055, + -0.00784039031714201, + -0.033464983105659485, + -0.021603574976325035, + -0.021445423364639282, + -0.0018395065562799573, + -0.004337321035563946, + -0.00855602789670229, + -0.02361210808157921, + -0.014115073718130589, + -0.008026218973100185, + -0.03381291776895523, + 0.009243989363312721, + 0.0023722813930362463, + 0.014423470944166183, + 0.01602080650627613, + -0.022331075742840767, + -0.007804805878549814, + 0.04637019336223602, + 0.01451836246997118, + 0.011355319991707802, + -0.007520131766796112, + -0.004823638591915369, + -0.03839932754635811, + -0.008690457791090012, + 0.014652791433036327, + 0.04754051938652992, + 0.0002881333348341286, + 0.007484547793865204, + 0.012051189318299294, + 0.04102465137839317, + -0.016906458884477615, + -0.005436478182673454, + -0.012897303327918053, + 0.05206367000937462, + 0.005582768935710192, + 0.014779312536120415, + 0.015467274934053421, + 0.013577356934547424, + 0.048236388713121414, + 0.017966076731681824, + -0.03212068974971771, + 0.016226405277848244, + -0.016700860112905502, + -0.012588906101882458, + -0.03849421814084053, + -0.018741022795438766, + -0.0036888974718749523, + 0.007524085696786642, + -0.0026470706798136234, + -0.0273128654807806, + 0.010872956365346909, + 0.007496409118175507, + -0.0007754394900985062, + 0.04181541129946709, + -0.01885172910988331, + -0.008022264577448368, + -0.013110808096826077, + -0.007800851948559284, + 0.04848943278193474, + -0.032895635813474655, + 0.014360209926962852, + -0.014581622555851936, + -0.049343451857566833, + 0.0038035577163100243, + 0.014795128256082535, + -0.0037323893047869205, + 0.04621203988790512, + -0.009686815552413464, + -0.01665341481566429, + 0.018487978726625443, + 0.03963291272521019, + -0.03327520191669464, + 0.016874827444553375, + 0.012905210256576538, + -0.0010724688181653619, + 0.025114553049206734, + 0.015261677093803883, + 0.04504171386361122, + 0.0015311099123209715, + 0.014494638890028, + 0.035267915576696396, + -0.003797627054154873, + -0.025842051953077316, + 0.007943188771605492, + -0.005076682195067406, + -0.00489085353910923, + -0.020385805517435074, + 0.013419205322861671, + -0.00012985769717488438, + -0.020986782386898994, + -0.022900423035025597, + -0.03548932820558548, + -0.017665589228272438, + 0.027059823274612427, + 0.018661946058273315, + 0.0449468232691288, + -0.028562268242239952, + 0.044124431908130646, + -0.013174069114029408, + 0.0022358752321451902, + -0.032247211784124374, + -0.000688950065523386, + 0.022852977737784386, + -0.02843574620783329, + 0.01387784630060196, + -0.013174069114029408, + -0.009323066100478172, + -0.013387574814260006, + 0.022947868332266808, + 0.0045271036215126514, + 0.04561106488108635, + 0.018582871183753014, + -0.0006583080976270139, + 0.02497221529483795, + -0.02019602246582508, + -0.025161998346447945, + 0.015095616690814495, + 0.003779835067689419, + 0.003764019813388586, + 0.03387617692351341, + 0.0034595769830048084, + 0.02541504055261612, + -0.01946852169930935, + 0.0056578912772238255, + 0.011015293188393116, + -0.002109353430569172, + -0.01886754482984543, + 0.004254291299730539, + 0.05585931986570358, + 0.00799458846449852, + -0.01847216486930847, + 0.0377667210996151, + 0.030365200713276863, + 0.026221616193652153, + 0.0026470706798136234, + -0.03072895109653473, + -0.028530636802315712, + 0.007622930686920881, + -0.014937465079128742, + 0.01099947839975357, + -0.03012797422707081, + -0.003449692390859127, + -0.007694099098443985, + 0.01777629554271698, + -0.012573091313242912, + 0.01826656609773636, + -0.012818226590752602, + 0.019310370087623596, + 0.047097694128751755, + 0.0001424604415660724, + 0.008793256245553493, + 0.005313910078257322, + 0.011608363129198551, + -0.02421308495104313, + -0.006409113295376301, + 0.005262510851025581, + -0.025826236233115196, + 0.014486731961369514, + 0.02062303200364113, + -0.017032980918884277, + 0.03182020038366318, + -0.012573091313242912, + -0.018203305080533028, + 0.020385805517435074, + -0.010952032171189785, + -0.02309020608663559, + -0.014692328870296478, + 0.010058472864329815, + -0.006243053823709488, + -0.02539922669529915, + 0.006788678467273712, + 0.0026253247633576393, + -0.03087128885090351, + -0.002981166820973158, + -0.006883569993078709, + 0.009125376120209694, + 0.001210851944051683, + -0.016716675832867622, + 0.045263130217790604, + -0.02301112934947014, + -0.03729226440191269, + -0.022821346297860146, + 0.025589007884263992, + -0.011102276854217052, + 0.006847985554486513, + -7.598714000778273e-05, + -0.00185136788059026, + 0.017649773508310318, + -0.009805429726839066, + 0.024497758597135544, + -0.00017792110156733543, + 0.011726977303624153, + -0.024023301899433136, + -0.04023389145731926, + -0.00041070120641961694, + 0.03767182677984238, + 0.01652689278125763, + 0.031108517199754715, + -0.010169179178774357, + 0.009750076569616795, + -0.008595566265285015, + -0.015111432410776615, + 0.011007385328412056, + -0.014708144590258598, + -0.02422890067100525, + -0.008342523127794266, + 0.006796586327254772, + 0.03903193771839142, + 0.012992193922400475, + -0.0032638637349009514, + -0.008144833147525787, + 0.012414938770234585, + 0.012509830296039581, + -0.005661844741553068, + 0.0012148057576268911, + -0.018804283812642097, + -0.03767182677984238, + -0.006685879547148943, + 0.016273850575089455, + -0.001252366928383708, + -0.014075536280870438, + -0.01714368723332882, + -0.03390780836343765, + -0.017507435753941536, + -0.0018770676106214523, + 0.01592591591179371, + 0.020322544500231743, + 0.008484859950840473, + -0.010485483333468437, + 0.024750802665948868, + -0.00952866394072771, + -0.006919153966009617, + 0.023580476641654968, + 0.0024375191424041986, + 0.00783248245716095, + -0.012090727686882019, + 0.029985636472702026, + 0.03912682831287384, + -0.019879717379808426, + 0.010256162844598293, + 0.026205802336335182, + 0.0124070318415761, + -0.005796274170279503, + -0.013822493143379688, + 0.006171885412186384, + -0.011845591478049755, + -0.036501504480838776, + -0.018614500761032104, + -0.017301838845014572, + -0.031567156314849854, + -0.019879717379808426, + 0.017507435753941536, + -0.009568201377987862, + 0.03270585089921951, + 0.01575985550880432, + -0.023279987275600433, + -0.01665341481566429, + 0.006405159831047058, + 0.00023401567887049168, + -0.010445945896208286, + 0.0015923938481137156, + -0.04899551719427109, + 0.022331075742840767, + 0.009497033432126045, + -0.007812713272869587, + 0.0017643842147663236, + -0.03564748167991638, + -0.02139797806739807, + 0.019848087802529335, + -0.01660596951842308, + -0.0037916963919997215, + -0.016969719901680946, + -0.016012899577617645, + -0.04387139156460762, + -0.009046299383044243, + -0.030602429062128067, + 0.002908021677285433, + -0.009259805083274841, + -0.0033449167385697365, + -0.007006137631833553, + 0.012620536610484123, + -0.01782374083995819, + 0.031630419194698334, + -0.006108624394983053, + -0.025067105889320374, + 0.023343248292803764, + -0.026743518188595772, + -0.022726455703377724, + -0.026221616193652153, + -0.03669128566980362, + 0.003898449009284377, + 0.008057849481701851, + -0.00317885703407228, + -0.029906559735536575, + -0.0031966492533683777, + 0.01419415045529604, + -0.018788468092679977, + -0.0231376513838768, + 0.020543957129120827, + -0.02547830156981945, + -0.02242596633732319, + -0.004372905474156141, + 0.0021409839391708374, + 0.017665589228272438, + -0.03280074521899223, + 0.0014095305232331157, + -0.04858432337641716, + -0.02307439036667347, + 0.002913952339440584, + -0.015886377543210983, + -0.013110808096826077, + -0.01709624193608761, + -0.007267088629305363, + 0.009987304918467999, + -0.00825553946197033, + 0.015562165528535843, + 0.00042725776438601315, + 0.0023703044280409813, + 0.002467172686010599, + 0.0499444305896759, + -0.03488835319876671, + -0.01900988072156906, + -0.00017977444804273546, + -0.006460512988269329, + -0.01182977668941021, + 0.022805532440543175, + -0.03830443695187569, + -0.028103627264499664, + 0.05225345119833946, + 0.0024394961073994637, + -0.03621682897210121, + 0.004578502848744392, + -0.00030345431878231466, + 0.029463734477758408, + 0.015886377543210983, + 0.019120587036013603, + 0.02611090987920761, + 0.026854224503040314, + -0.016985533758997917, + 0.027676615864038467, + -0.03390780836343765, + -0.021682651713490486, + -0.03077639639377594, + 0.010849233716726303, + -0.01188512984663248, + -0.02775569260120392, + 0.04203682765364647, + -0.002904067747294903, + 0.01961085945367813, + 0.0277398768812418, + 0.05497366562485695, + -0.03868400305509567, + -0.0010181041434407234, + 0.03801976144313812, + -0.0195475984364748, + 0.028752049431204796, + -0.013893661089241505, + 0.011766515672206879, + 0.013442927971482277, + -0.02078118547797203, + -0.010319423861801624, + 0.0029613978695124388, + -0.00887233205139637, + -0.04383976012468338, + 0.02718634530901909, + 0.03196253627538681, + 0.008729995228350163, + 0.038209546357393265, + -0.009615647606551647, + -0.0006795597728341818, + -0.015609611757099628, + -0.0012869626516476274, + -0.009536570869386196, + -0.01004265807569027, + -0.02729705162346363, + -0.011655809357762337, + -0.006417021155357361, + -0.010888771153986454, + 0.00013714752276428044, + -0.001360108028165996, + 0.029179060831665993, + -0.007911558263003826, + -0.0065435427241027355, + 0.017554882913827896, + ], + "index": 19, + }, + { + "title": "Wenceslaus III of Bohemia", + "text": "Wenceslaus III (Czech: V\u00e1clav III., Hungarian: Vencel, Polish: Wac\u0142aw, Slovak: V\u00e1clav; 6 October 1289 \u2013 4 August 1306) was King of Hungary between 1301 and 1305, and King of Bohemia and Poland from 1305. He was the son of Wenceslaus II, King of Bohemia, who was later also crowned king of Poland, and Judith of Habsburg. Still a child, Wenceslaus was betrothed to Elizabeth, the sole daughter of Andrew III of Hungary.", + "vector": [ + 0.0009226285619661212, + -0.005976993124932051, + -0.01476205699145794, + 0.03747594356536865, + 0.04673995450139046, + 0.0049010030925273895, + 0.0018583789933472872, + -0.05267101898789406, + 0.01840992644429207, + -0.01265600323677063, + -0.0056587886065244675, + 0.04482416808605194, + -0.045244064182043076, + 0.018974164500832558, + 0.013948503881692886, + 0.0277657900005579, + -0.03545518219470978, + 0.037370968610048294, + -0.054481834173202515, + 0.003365749027580023, + -0.06015046313405037, + 0.005055184476077557, + -0.058470867574214935, + 0.004914124961942434, + 0.053327109664678574, + -0.022307109087705612, + 0.011101067066192627, + 0.0201288852840662, + -0.07731381058692932, + 0.04532279446721077, + 0.0002995467511937022, + -0.0006741339457221329, + 0.014276549220085144, + -0.020325712859630585, + -0.0012383725261315703, + -0.07789117097854614, + 0.047920916229486465, + -0.03821076452732086, + 0.0103793665766716, + -0.005609581712633371, + -0.008266751654446125, + -0.016389163210988045, + 0.0006847954355180264, + -0.02275324985384941, + 0.009060622192919254, + -0.05358954891562462, + 0.0009701952221803367, + 0.01659911312162876, + -0.010412170551717281, + 0.004632005468010902, + 0.008233947679400444, + 0.012813465669751167, + -0.01944654993712902, + 0.03369685634970665, + -0.011967107653617859, + -0.05537411570549011, + -0.01177684124559164, + 0.02616492658853531, + 0.0033624686766415834, + 0.00317056174390018, + -0.018685484305024147, + -0.008457018062472343, + -0.01419781893491745, + 0.002995057264342904, + 0.010392487980425358, + -0.03157112002372742, + -0.04736980050802231, + -0.0032853777520358562, + -0.010215343907475471, + 0.007722196169197559, + 0.048550765961408615, + -0.01046465802937746, + 0.0516737625002861, + 0.027293402701616287, + 0.0005150317447260022, + 0.04177990183234215, + -0.028080713003873825, + 0.027293402701616287, + -0.05631888657808304, + -0.013305534608662128, + 0.030468886718153954, + -0.023251879960298538, + -0.03346066176891327, + -0.021401703357696533, + -0.0063575259409844875, + -0.08959584683179855, + -0.005511167924851179, + -0.04248848184943199, + -0.010668046772480011, + 0.0009669147548265755, + -0.027634570375084877, + -0.010143173858523369, + -0.005370108410716057, + -0.032358430325984955, + -0.003598661394789815, + -0.03535020723938942, + 0.03553391247987747, + -0.0005207725916989148, + -0.05542660504579544, + 0.023356854915618896, + 0.012236105278134346, + -0.0004592640034388751, + 0.011822767555713654, + 0.05537411570549011, + 0.07841604948043823, + 0.0026801335625350475, + -0.06156761944293976, + -0.028815535828471184, + 0.033040765672922134, + 0.009244328364729881, + 0.02628302201628685, + 0.014053478837013245, + 0.01796378381550312, + -0.015772437676787376, + -0.009664226323366165, + -0.017071498557925224, + 0.022989444434642792, + 0.03500903770327568, + -0.005937627516686916, + -0.010228465311229229, + -0.0017156790709123015, + 0.01977459527552128, + 0.036347463726997375, + -0.06193502992391586, + 0.013686067424714565, + -0.022084036841988564, + -0.0031541595235466957, + 0.040179040282964706, + -0.023081297054886818, + 0.003314901841804385, + -0.0026653714012354612, + -0.03681985288858414, + -0.03619000315666199, + 0.014460255391895771, + -0.0068955207243561745, + 0.029156703501939774, + -0.03398553654551506, + -0.005881859455257654, + -0.003065587254241109, + -0.009657666087150574, + -0.01439464557915926, + 0.040913861244916916, + -0.023068174719810486, + 0.0352189876139164, + 0.03356563672423363, + 0.021008048206567764, + -0.014210940338671207, + 0.019013529643416405, + -0.01624482311308384, + -0.010366244241595268, + 0.020968681201338768, + -0.02434099279344082, + 0.008247069083154202, + 0.02382924035191536, + -0.018632996827363968, + -0.008194581605494022, + 0.013804163783788681, + -0.019249722361564636, + 0.01784568652510643, + -0.013390826061367989, + -0.009670787490904331, + -0.0017944100545719266, + 0.017071498557925224, + 0.020680001005530357, + 0.007000495679676533, + -0.01825246401131153, + -0.019971422851085663, + 0.023094417527318, + -0.028894266113638878, + 0.01687467098236084, + 0.0022848383523523808, + -0.022031549364328384, + -0.014000991359353065, + -0.04010030999779701, + -0.04736980050802231, + 0.049574267119169235, + -0.017084620893001556, + 0.0011210961965844035, + -0.014447133056819439, + 0.033670611679553986, + 0.009939785115420818, + -0.03380183130502701, + -0.0013130030129104853, + 0.018265584483742714, + -0.01049090176820755, + -0.038630664348602295, + 0.0067971074022352695, + 0.011560331098735332, + -0.05726366117596626, + -0.0072694928385317326, + 0.011796523816883564, + 0.015772437676787376, + 0.034589141607284546, + -0.007157957646995783, + -0.017937539145350456, + -0.005324182100594044, + 0.04293462261557579, + 0.03957543522119522, + -0.005589899141341448, + 0.04080888628959656, + -0.04298711195588112, + -0.03482533246278763, + 0.017819443717598915, + 0.038919344544410706, + 0.006993934512138367, + 0.0699131041765213, + -0.015549367293715477, + 0.008443896658718586, + -0.04408934339880943, + -0.025115180760622025, + 0.033775586634874344, + 0.0032624145969748497, + -0.014460255391895771, + 0.03443167731165886, + -0.0014499620301648974, + -0.015037615783512592, + 0.0394442155957222, + 0.05610894039273262, + -0.015090103261172771, + 0.06067533418536186, + 0.07531929761171341, + -0.03506152704358101, + -0.006223027128726244, + -0.014919519424438477, + -0.03878812491893768, + 0.024262260645627975, + 0.06665889173746109, + 0.00869321171194315, + -0.004297398962080479, + 0.06062284857034683, + -0.0009004854946397245, + 0.03592756763100624, + -0.002678493270650506, + 0.01659911312162876, + -0.05335335433483124, + 0.003966072574257851, + -0.0103793665766716, + -0.02703096717596054, + 0.017701346427202225, + -0.027267159894108772, + -0.0004760763549711555, + 0.001955152489244938, + -0.02617804892361164, + -0.024603428319096565, + 0.005760482978075743, + 0.01624482311308384, + 0.007138274610042572, + -0.030888784676790237, + 0.0012006473261862993, + -0.04865574091672897, + 0.06356213986873627, + 0.03894558548927307, + -0.0334344208240509, + -0.015929900109767914, + -0.0199058149009943, + 0.016454773023724556, + -0.030915027484297752, + -0.008457018062472343, + 0.015116347000002861, + 0.019197234883904457, + -0.0749518871307373, + -0.04338076710700989, + -0.03889309987425804, + 0.006147576496005058, + -0.021126143634319305, + -0.020207615569233894, + -0.04768472537398338, + -0.019066017121076584, + -0.0005170820513740182, + -0.015759315341711044, + 0.057788532227277756, + 0.005734239239245653, + -0.024196652695536613, + -0.04988919198513031, + -0.02029946818947792, + 0.0018764215055853128, + 0.017071498557925224, + 0.04351198300719261, + -0.058575842529535294, + 0.020338835194706917, + -0.021401703357696533, + -0.02605995163321495, + -0.040913861244916916, + 0.034799087792634964, + 0.011934302747249603, + -0.013804163783788681, + -0.01859363168478012, + 0.03582259267568588, + 0.05075523257255554, + -0.007000495679676533, + 0.016690965741872787, + -0.030180206522345543, + 0.004635286051779985, + -0.0271359421312809, + -0.026479849591851234, + 0.017071498557925224, + 0.011658744886517525, + 0.008135533891618252, + -0.04710736498236656, + -0.013266168534755707, + 0.042672187089920044, + -0.01619233563542366, + 0.03844695910811424, + 0.014958884567022324, + -0.025863124057650566, + -0.0073351021856069565, + -0.037029799073934555, + -0.0004568036529235542, + 0.035376448184251785, + 0.01072053425014019, + -0.009651104919612408, + 0.030311424285173416, + 0.03933924064040184, + -0.001276917988434434, + 0.0072301276959478855, + -0.02256954461336136, + -0.02029946818947792, + 0.028815535828471184, + -0.06277482956647873, + 0.00843733549118042, + -0.01502449344843626, + 0.01842304691672325, + 0.005065025761723518, + -0.04185863211750984, + 0.013896016404032707, + -0.010280952788889408, + -0.01989269256591797, + -0.052198633551597595, + -0.03598005324602127, + 0.0009488722425885499, + 0.020850585773587227, + -0.03277832642197609, + 0.013148072175681591, + 0.03359188139438629, + 0.068653404712677, + -0.02445908822119236, + 0.035665128380060196, + 0.01578556001186371, + 0.01320055965334177, + -0.03582259267568588, + -0.0026276460848748684, + 0.07012305408716202, + 0.01613985002040863, + 0.015129468403756618, + -0.005855616182088852, + 0.015510001219809055, + 0.01613985002040863, + 0.045244064182043076, + 0.04317081719636917, + -0.005612862296402454, + 0.00039262970676645637, + 0.043538227677345276, + 0.04849827662110329, + 0.014302792958915234, + 0.0010218623792752624, + 0.032069750130176544, + 0.0004588539304677397, + 0.0184624120593071, + 0.01733393594622612, + -0.013167754746973515, + 0.032069750130176544, + 0.005383230280131102, + 2.2642843759967946e-05, + 0.0010948525741696358, + 0.002158540766686201, + -0.022254621610045433, + 0.019354697316884995, + 0.013449874706566334, + 0.010989531874656677, + 0.001784568652510643, + 0.01245917659252882, + 0.05096518248319626, + 0.021913453936576843, + 0.002429178450256586, + -0.00510111078619957, + -0.0013466277159750462, + -0.008995013311505318, + 0.028474368155002594, + -0.040179040282964706, + -0.006167259532958269, + -0.054376859217882156, + 0.022438326850533485, + -0.05810345709323883, + 0.0068955207243561745, + -0.01283314824104309, + -0.02188720926642418, + -0.03193853050470352, + -0.0173864234238863, + 0.014184696599841118, + -0.07232751697301865, + -0.03283081576228142, + 0.05999299883842468, + 0.01859363168478012, + 0.04784218594431877, + -0.04776345565915108, + -0.08261503279209137, + 0.02234647423028946, + 0.03739721328020096, + 0.04513908922672272, + 0.012196740135550499, + -0.03842071443796158, + -0.04406309872865677, + 0.00011358582560205832, + 0.022989444434642792, + 0.028185687959194183, + 0.005753921810537577, + -0.006134455092251301, + -0.03445792198181152, + -0.028815535828471184, + -0.023619292303919792, + -0.019302209839224815, + -0.006967690773308277, + -0.06555665284395218, + -0.0038545371498912573, + -0.0064231352880597115, + 0.007394150365144014, + -0.0017288009403273463, + -0.003510089125484228, + 0.03096751496195793, + -0.03130868449807167, + -0.033670611679553986, + -0.055794015526771545, + 0.06503178179264069, + 0.04083513095974922, + -0.03238467127084732, + 0.03524523228406906, + -0.05946812778711319, + 0.019761472940444946, + 0.0355863980948925, + 0.061830054968595505, + 0.013804163783788681, + -0.0026817736215889454, + 0.0021060535218566656, + 0.03267335146665573, + -0.044509243220090866, + 0.0029753746930509806, + -0.048839446157217026, + -0.021677261218428612, + 0.020430687814950943, + -0.008863795548677444, + 0.026925992220640182, + -0.048104625195264816, + 0.04180614650249481, + 0.04429929330945015, + -0.07810112088918686, + 0.01705837808549404, + -0.06823351234197617, + -0.02548259124159813, + 0.01451274286955595, + 0.0307313222438097, + -0.023763632401823997, + -0.01915786974132061, + -0.01733393594622612, + -0.02314690500497818, + 0.02348807267844677, + -0.04545401409268379, + -0.053510818630456924, + -0.0069020818918943405, + -0.038683149963617325, + 0.01470956951379776, + -0.03529771789908409, + 0.010392487980425358, + -0.005872018169611692, + -0.03078380972146988, + -0.021847844123840332, + -0.026768529787659645, + 0.01502449344843626, + -0.028815535828471184, + -0.007289175875484943, + -0.009224645793437958, + 0.004960051272064447, + 0.024498453363776207, + -0.03472035750746727, + -0.007741878740489483, + -0.026296144351363182, + 0.013148072175681591, + -0.010608998127281666, + -0.04634629935026169, + 0.024157285690307617, + -0.014027235098183155, + 0.02766081504523754, + 0.018619874492287636, + -0.011068262159824371, + 0.0216116514056921, + 0.02981279417872429, + -0.009585496038198471, + 0.027188429608941078, + -0.046556249260902405, + -0.03141365945339203, + 0.07820609956979752, + -0.0436694473028183, + 0.005133915226906538, + 0.011927742511034012, + -0.03424797207117081, + 0.020916195586323738, + 0.017806321382522583, + -0.0032214089296758175, + -0.01117323711514473, + -0.005576777271926403, + 0.006882399320602417, + 0.014119087718427181, + -0.020430687814950943, + -0.0033788708969950676, + -0.04020528122782707, + 0.02565317414700985, + -0.03821076452732086, + 0.016782818362116814, + -0.015982387587428093, + 0.01011693011969328, + -0.00467465166002512, + 0.0064657810144126415, + -0.022320229560136795, + -0.024485332891345024, + -0.04012655094265938, + 0.04639878496527672, + -0.01795066148042679, + -0.019407184794545174, + 0.02515454590320587, + 0.007459759712219238, + 0.01977459527552128, + 0.031282439827919006, + 0.0022979602217674255, + -0.017005890607833862, + 0.020784975960850716, + 0.02651921473443508, + 0.008896599523723125, + 0.03626873344182968, + 0.014434011653065681, + -0.0013015213189646602, + -0.017740711569786072, + -0.006777424365282059, + -0.028028225526213646, + -0.011809646151959896, + 0.006547792349010706, + -0.028264418244361877, + -0.021992184221744537, + -0.003592100692912936, + -0.008174899034202099, + -0.002320923376828432, + -0.01419781893491745, + -0.005839213728904724, + -0.01383040752261877, + 0.008575115352869034, + 0.02525952085852623, + -0.046503759920597076, + -0.00262928637675941, + -0.033723101019859314, + 0.0038250130601227283, + -0.020207615569233894, + -0.04083513095974922, + -0.032017260789871216, + -0.05999299883842468, + 0.008279873989522457, + 0.030547617003321648, + 0.013213681057095528, + 0.026807894930243492, + 0.00016781588783487678, + -0.00021856045350432396, + 0.012846270576119423, + -0.04031025618314743, + 0.050151627510786057, + -0.0012834788067266345, + 0.010333440266549587, + -0.00011850651208078489, + -0.007525368593633175, + 0.02970781922340393, + -0.0010620480170473456, + 0.06078030914068222, + -0.010687729343771935, + -0.019748352468013763, + 0.009893858805298805, + -0.004435177892446518, + -0.03511401265859604, + -0.002270076423883438, + -0.03721350431442261, + 0.0003768425085581839, + 0.059888023883104324, + 0.001974835293367505, + 0.03713477402925491, + 0.028658073395490646, + -0.003414955921471119, + -0.010189100168645382, + 0.030600104480981827, + 0.04340700805187225, + -0.041543710976839066, + 0.031203707680106163, + -0.05099142715334892, + -0.03786959871649742, + -0.01159969624131918, + 0.026427362114191055, + -0.001626286655664444, + 0.0322534553706646, + -0.00041907839477062225, + 0.03807954490184784, + 0.07159269601106644, + 0.007249810267239809, + 0.010576194152235985, + -0.01619233563542366, + -0.014565229415893555, + 0.04873447120189667, + -0.04293462261557579, + 0.0066855717450380325, + 0.003972633741796017, + 0.0054357172921299934, + -0.004287557676434517, + -0.03311949595808983, + -0.00929681584239006, + 0.0034247972071170807, + -0.0088047469034791, + -0.004205545876175165, + -0.02314690500497818, + -0.005954029504209757, + -0.015549367293715477, + 0.00801087636500597, + 0.02205779403448105, + 0.0022487533278763294, + 0.027188429608941078, + -0.004494226071983576, + 0.035376448184251785, + -0.031229952350258827, + -0.02981279417872429, + 0.015641219913959503, + -0.0017041974933817983, + 0.008109290152788162, + 0.037265993654727936, + -0.014932640828192234, + -0.027345890179276466, + -0.013220242224633694, + 0.011251968331634998, + -0.005783446133136749, + -0.054376859217882156, + -0.035087767988443375, + 0.02737213484942913, + -0.006518268492072821, + -0.004258033353835344, + -0.012072082608938217, + 0.0018715007463470101, + -0.01562809757888317, + 0.01978771761059761, + -0.027057209983468056, + -0.015562488697469234, + 0.02674228698015213, + -0.019538402557373047, + -0.021362336352467537, + -0.015614976175129414, + 0.016887793317437172, + 0.0066396454349160194, + 0.018856067210435867, + -0.0054422784596681595, + 0.00591466436162591, + 0.010097247548401356, + 0.029917769134044647, + -0.004185863304883242, + -0.002591561060398817, + -0.004923966247588396, + -0.005507887341082096, + 0.010071003809571266, + 0.012446054257452488, + -0.009224645793437958, + -0.017478276044130325, + 0.000869321171194315, + -0.020955560728907585, + 0.005035501904785633, + -0.005078147631138563, + -0.01711086370050907, + -0.008371726609766483, + -0.005311060231178999, + -0.03660990297794342, + 0.019302209839224815, + -0.018908554688096046, + 0.02205779403448105, + 0.002150339772924781, + 0.01476205699145794, + -0.02834315039217472, + 0.03821076452732086, + 0.0061377352103590965, + -0.02640111930668354, + 0.012524785473942757, + -0.03141365945339203, + 0.002025682246312499, + 0.019144747406244278, + 0.0019731950014829636, + -0.00047812663251534104, + 0.06099025905132294, + 0.0192759670317173, + 0.006065565161406994, + 0.026479849591851234, + 0.014643960632383823, + -0.00022635154891759157, + -0.006560914218425751, + -0.009172158315777779, + -0.007964950054883957, + 0.014604595489799976, + -0.0005461961263790727, + 0.0029261677991598845, + 0.01772759109735489, + 0.01659911312162876, + -0.00695456936955452, + -0.045532744377851486, + 0.02897299826145172, + -0.01328585110604763, + 0.019170992076396942, + -0.011763718910515308, + 0.013922260142862797, + -0.008253630250692368, + 0.004923966247588396, + 0.00018042513693217188, + -0.01194086391478777, + -0.0058785793371498585, + 0.013351460918784142, + -0.02662418968975544, + -0.015444392338395119, + -0.025443226099014282, + -0.02297632209956646, + 0.002294679870828986, + 0.00634112348780036, + 0.024669038131833076, + -0.022451449185609818, + -0.013633579947054386, + -0.013751676306128502, + 0.0321747250854969, + 0.01012349035590887, + 0.02965533174574375, + -0.023343732580542564, + -0.010031637735664845, + -0.03582259267568588, + 0.029576601460576057, + 0.046844929456710815, + -0.0016148050781339407, + 0.016271067783236504, + -0.05070274695754051, + 0.046949904412031174, + 0.016520382836461067, + 0.006869277451187372, + 0.021021168678998947, + -0.028763048350811005, + 0.007643464952707291, + 0.004399092867970467, + 0.055059194564819336, + 0.006948008202016354, + -0.019813960418105125, + 0.006285355892032385, + 0.013010293245315552, + 0.019407184794545174, + -0.032017260789871216, + -0.015523123554885387, + 0.01277410052716732, + -0.022267743945121765, + 0.010635241866111755, + 0.033381931483745575, + 0.01135038211941719, + -0.01921035721898079, + -0.03039015457034111, + -0.06193502992391586, + 0.013646701350808144, + -0.0015910216607153416, + 0.001946951262652874, + 0.003414955921471119, + 0.015929900109767914, + -0.007131713908165693, + -0.04671370983123779, + 0.007295736577361822, + 0.012491980567574501, + -0.0103793665766716, + 0.05763107165694237, + -0.036058783531188965, + -0.003706916468217969, + -0.008286435157060623, + -0.016690965741872787, + 0.01331209484487772, + 0.002005999442189932, + -0.006675730459392071, + 0.027109697461128235, + 0.018777336925268173, + 0.03923426568508148, + -0.06345716118812561, + -0.005498046055436134, + -0.007105470169335604, + 0.04516533389687538, + -0.049915436655282974, + -0.06655391305685043, + -0.041071321815252304, + -0.004730419255793095, + -0.041832391172647476, + -0.04288213700056076, + 0.027162184938788414, + 0.030626347288489342, + -0.029839038848876953, + 0.005386510863900185, + 0.034641627222299576, + -0.05726366117596626, + -0.005465241614729166, + -0.031177464872598648, + -0.016835305839776993, + 0.03296203166246414, + 0.003969353158026934, + 0.012728173285722733, + -0.0018452571239322424, + 0.018659239634871483, + -0.024721525609493256, + 0.027582082897424698, + -0.043249547481536865, + -0.01417157519608736, + -0.03786959871649742, + 0.026387996971607208, + -0.006301758345216513, + -0.009342742152512074, + -0.03616375848650932, + 0.01847553439438343, + -0.012505102902650833, + -0.020391320809721947, + 0.03723974898457527, + 0.0033952731173485518, + -0.024262260645627975, + -0.024905230849981308, + 0.022084036841988564, + -0.024826500564813614, + 0.004973173141479492, + -0.001381072448566556, + 0.003444480011239648, + 5.2282284741522744e-05, + 0.038341984152793884, + -0.003214847994968295, + 0.025075813755393028, + -0.01989269256591797, + -0.015260687097907066, + 0.015457513742148876, + 0.017255203798413277, + 0.01596926525235176, + 0.006459220312535763, + 0.011553769931197166, + 0.022438326850533485, + -0.023356854915618896, + 0.005970431957393885, + -0.032988276332616806, + -0.0063115996308624744, + 0.033040765672922134, + -0.027582082897424698, + 0.014972005970776081, + 0.017714468762278557, + -0.047527264803647995, + -0.004120253957808018, + -0.027529597282409668, + -0.00029995679506100714, + -0.00940835103392601, + -0.003601941978558898, + -0.048314571380615234, + -0.03044264204800129, + -0.0013909138506278396, + -0.033329445868730545, + 0.0028425161726772785, + -0.006157418247312307, + -0.0004559835360851139, + 0.03317198157310486, + -0.017937539145350456, + 0.038971830159425735, + 0.03301452100276947, + -0.016047995537519455, + -0.015523123554885387, + -0.05689624696969986, + -0.019512159749865532, + 0.029287921264767647, + -0.007604099810123444, + -0.02394733764231205, + -0.00618366152048111, + -0.002998337848111987, + 0.03403802216053009, + 0.025272641330957413, + 0.030993759632110596, + 0.0038840612396597862, + 0.015457513742148876, + 0.027949495241045952, + -0.00491740508005023, + -0.01259695552289486, + -0.023304367437958717, + -0.011429112404584885, + -0.013961625285446644, + 0.03716101869940758, + -0.008345482870936394, + 0.02907797135412693, + 0.0022782774176448584, + -0.015562488697469234, + 0.023107539862394333, + 0.013403947465121746, + 0.028553098440170288, + -0.02502332627773285, + 0.02178223617374897, + 0.034641627222299576, + 0.034064266830682755, + 0.012426371686160564, + 0.05012538656592369, + 0.00674461992457509, + 0.008174899034202099, + -0.031282439827919006, + 0.04679244011640549, + -0.015116347000002861, + -0.049626756459474564, + -0.0020863707177340984, + -0.019341574981808662, + 0.0031016722787171602, + 0.005908103194087744, + 0.006288636475801468, + 0.00021630513947457075, + -0.006475622300058603, + -0.0035560154356062412, + -0.028421880677342415, + 0.042619697749614716, + 0.016809063032269478, + 0.03238467127084732, + -0.002274997066706419, + -0.024026067927479744, + 0.004658249206840992, + -9.856748511083424e-05, + -0.04946929216384888, + -0.003785647451877594, + 0.008174899034202099, + -0.026269901543855667, + -0.007151396479457617, + -0.037554673850536346, + -0.0011924462160095572, + 0.00525857275351882, + -0.018095001578330994, + 0.015286929905414581, + -0.0036150638479739428, + -0.003979194443672895, + 0.00433348398655653, + -0.012649443000555038, + -0.05348457396030426, + 0.025850001722574234, + -0.024774013087153435, + 0.06660640239715576, + -0.003011459717527032, + 0.009769201278686523, + -0.021060535684227943, + 0.061147719621658325, + 0.002388172782957554, + -0.05862833186984062, + 0.002201186725869775, + -0.023304367437958717, + 0.016848428174853325, + -0.008699771948158741, + -0.02554820105433464, + 0.02646672911942005, + 7.258011464728042e-05, + 0.01687467098236084, + -0.01728144846856594, + -0.04167492687702179, + 0.002457062480971217, + 0.016113605350255966, + 0.00708578759804368, + 0.04666122421622276, + -0.005343864671885967, + -0.003680672962218523, + -0.014315915293991566, + -0.01830495148897171, + 0.023501195013523102, + -0.009664226323366165, + -0.04083513095974922, + -0.0070136175490915775, + 0.02565317414700985, + 0.02918294630944729, + -0.004126815125346184, + 0.010766460560262203, + -0.00564238615334034, + -0.04647751525044441, + -0.013751676306128502, + 0.021965941414237022, + -0.03624248877167702, + 0.03849944472312927, + 0.01932845264673233, + -1.4326371456263587e-05, + 0.05474426969885826, + 0.03096751496195793, + 0.02960284613072872, + -0.0055472529493272305, + 0.003165641101077199, + -0.03162360563874245, + 0.030285179615020752, + 0.035271476954221725, + 0.021191753447055817, + -0.017491398379206657, + 0.0016992768505588174, + -0.04214731231331825, + 0.016389163210988045, + 0.07133025676012039, + 0.00812241155654192, + -0.003759403945878148, + 0.007492564152926207, + 0.005619422998279333, + 0.0034576018806546926, + 0.04639878496527672, + -0.021427946165204048, + 0.009559252299368382, + -0.030862540006637573, + -0.020680001005530357, + 0.011330698616802692, + -0.02810695767402649, + -2.2873500711284578e-05, + 0.0033444261644035578, + -0.02634863182902336, + -0.0028129920829087496, + -0.01541814859956503, + -0.006875838153064251, + -0.019066017121076584, + 0.060465388000011444, + 0.02121799625456333, + -0.010792704299092293, + 0.015588732436299324, + -0.010589315555989742, + -0.01939406245946884, + -0.020509418100118637, + -0.026545459404587746, + -0.0016008630627766252, + 0.01439464557915926, + 0.0008545590681023896, + -0.029576601460576057, + -0.03710853308439255, + -0.023120662197470665, + 0.014538985677063465, + 0.059153202921152115, + -0.011055140756070614, + -0.01743891090154648, + -0.005209365859627724, + 0.06135766953229904, + -0.0186461191624403, + 0.03626873344182968, + 0.005452119745314121, + 5.9560799854807556e-05, + 0.020509418100118637, + -0.013298973441123962, + 0.04254096746444702, + -0.023802997544407845, + -0.00843733549118042, + 0.0037134774029254913, + -0.030075231567025185, + -0.0051175132393836975, + -0.0003430127981118858, + 0.03130868449807167, + -0.007413832936435938, + 0.0222414992749691, + 0.03482533246278763, + -0.019000407308340073, + -0.04282964766025543, + -0.026899749413132668, + 0.015483757480978966, + -0.031439900398254395, + -0.0037954889703541994, + 0.011704671196639538, + -0.0008479981916025281, + -0.035612642765045166, + 0.02029946818947792, + 0.0013154633343219757, + -0.017176473513245583, + -0.020627515390515327, + -0.013062780722975731, + -0.011724353767931461, + -0.0028966437093913555, + -0.024564063176512718, + -0.02844812348484993, + -0.02931416593492031, + 0.007000495679676533, + -0.004773064982146025, + 0.010018516331911087, + -0.04156995192170143, + 0.02120487578213215, + 0.011547208763659, + 0.0091196708381176, + 0.019932057708501816, + -0.019695864990353584, + -0.00209621200338006, + -0.017766956239938736, + 0.004707456100732088, + -0.00803712010383606, + 0.03813203424215317, + 0.0015959424199536443, + -0.011370064690709114, + -0.013069340959191322, + 0.007715635001659393, + 0.01687467098236084, + -0.005206085275858641, + 0.019485915079712868, + -0.02868431806564331, + 0.025850001722574234, + -0.03369685634970665, + -0.0035789788234978914, + 0.014525864273309708, + 0.0070070563815534115, + 0.019984545186161995, + 0.015496879816055298, + 0.016782818362116814, + -0.001963353715837002, + -0.0194990374147892, + -0.0017730870749801397, + 0.03130868449807167, + -0.021231118589639664, + -0.021979063749313354, + -0.047920916229486465, + 0.0009480520966462791, + -0.008424214087426662, + -0.015995509922504425, + 0.0022684361319988966, + 0.02302880957722664, + -0.016218580305576324, + -0.0326208658516407, + 0.02258266694843769, + 0.007328541483730078, + 0.013699188828468323, + 0.010799264535307884, + 0.0008635803242214024, + 0.0194990374147892, + 0.003998877480626106, + 0.01671721041202545, + 0.005868738051503897, + 0.0072301276959478855, + -0.04595264419913292, + 0.0029884965624660254, + 0.027345890179276466, + 2.8370828658808023e-05, + 0.005448839161545038, + 0.001776367542333901, + -0.020037032663822174, + 0.006783985532820225, + 0.03876188024878502, + -0.012951244600117207, + 0.008863795548677444, + 0.010707411915063858, + -0.016166092827916145, + -0.004438458476215601, + 0.0016164452536031604, + -0.024367235600948334, + 0.01114699337631464, + -0.00015079851436894387, + -0.0072301276959478855, + 0.002532512880861759, + 0.004395812749862671, + 0.02913045883178711, + -0.007866536267101765, + -0.020732488483190536, + -0.02548259124159813, + -0.003552735084667802, + -0.014289671555161476, + 0.013364582322537899, + 0.010530267842113972, + -0.010425292886793613, + 0.00986105389893055, + -0.02333061210811138, + 0.0031557998154312372, + -0.009099988266825676, + -0.03660990297794342, + 0.008069925010204315, + -0.043984368443489075, + -0.002258594846352935, + 0.05343208461999893, + -0.021309848874807358, + 0.007820609956979752, + 0.016507260501384735, + 0.002294679870828986, + -0.0035461741499602795, + 0.005885140039026737, + -0.010713973082602024, + -0.01470956951379776, + 0.027949495241045952, + 0.0011694829445332289, + -0.029392896220088005, + -0.0184624120593071, + 0.01961713284254074, + -0.020312590524554253, + 0.005603021010756493, + 0.011606257408857346, + 0.0013367863139137626, + -0.009073744527995586, + 0.01985332742333412, + -0.024209773167967796, + -0.04010030999779701, + 0.011678427457809448, + 0.023343732580542564, + -0.015129468403756618, + 0.02241208404302597, + 0.03716101869940758, + 0.04133376106619835, + -0.014538985677063465, + 0.01043185405433178, + 0.005786726251244545, + 0.011304454877972603, + 0.02897299826145172, + 0.00021958560682833195, + 0.00288680219091475, + -0.04676619544625282, + 0.005750641226768494, + 0.041753657162189484, + -0.010189100168645382, + 0.023763632401823997, + -0.03923426568508148, + -0.01020222157239914, + 0.0005388151039369404, + -0.008043681271374226, + -0.01955152489244938, + -0.0012514943955466151, + 0.01842304691672325, + -0.006816789973527193, + 0.015063859522342682, + -0.01268224697560072, + -0.010300635360181332, + 0.0009414912201464176, + -0.005652227438986301, + -0.0034838453866541386, + -0.014604595489799976, + 0.018396804109215736, + 0.011245407164096832, + 0.01268224697560072, + -0.006039321422576904, + -0.01938094012439251, + -0.03301452100276947, + -0.02633550949394703, + 0.0470811203122139, + -0.00419242400676012, + -0.008030558936297894, + -0.008627601899206638, + 0.013298973441123962, + -0.011921181343495846, + -0.000769267207942903, + 0.010504024103283882, + -0.019512159749865532, + -0.00909342709928751, + -0.008653845638036728, + -0.013377704657614231, + -0.02566629648208618, + 0.03650492802262306, + -0.0047861868515610695, + 0.03277832642197609, + -0.01248542033135891, + -0.018514899536967278, + 0.013672945089638233, + 0.01789817400276661, + -0.008922843262553215, + 0.016953403130173683, + -0.023816118016839027, + -0.015943022444844246, + 0.0182393416762352, + -0.01812124438583851, + 0.009054061956703663, + 0.053117163479328156, + -0.010976409539580345, + -0.020732488483190536, + -0.01757012866437435, + -0.00604588259011507, + -0.010025077499449253, + -0.02047005295753479, + -0.012669125571846962, + -0.016900915652513504, + 0.02195281907916069, + -0.014040356501936913, + -0.038237009197473526, + 0.030757566913962364, + -0.006961130071431398, + -0.014158452861011028, + 0.010654924437403679, + 0.01757012866437435, + 0.014355280436575413, + -0.026729164645075798, + -0.03325071185827255, + -0.03004898689687252, + 0.017543883994221687, + 0.008207703940570354, + -0.017202718183398247, + -0.04503411427140236, + -0.04647751525044441, + 0.015313173644244671, + -0.015103224664926529, + 0.010340000502765179, + 0.0008996653486974537, + -0.017360178753733635, + -0.028264418244361877, + -0.03067883476614952, + -0.001376971835270524, + 0.012984049506485462, + -0.03290954604744911, + 0.0004691053763963282, + -0.013371143490076065, + -0.017294570803642273, + -0.015405027195811272, + -0.030652591958642006, + 0.008581675589084625, + 0.01704525575041771, + -0.020653758198022842, + -0.006508427206426859, + -0.011055140756070614, + -0.006551072932779789, + -0.0006950468523427844, + 0.007348224055022001, + -0.015378783456981182, + 0.013777920044958591, + 0.03461538255214691, + 0.03162360563874245, + 0.00995290745049715, + 0.0031000319868326187, + 0.012190178968012333, + -0.010399049147963524, + 0.023448707535862923, + -0.010825508274137974, + 0.04010030999779701, + 0.021874088793992996, + -0.040861375629901886, + 0.04054645076394081, + -0.009821688756346703, + -0.010143173858523369, + 0.01881670206785202, + 0.0062033445574343204, + -0.022372717037796974, + 0.019485915079712868, + 0.0006499405717477202, + -0.04482416808605194, + 0.004999416880309582, + -0.014315915293991566, + -0.0036117832642048597, + 0.027293402701616287, + -0.04886569082736969, + -0.027739545330405235, + -0.004317081533372402, + -0.01225578784942627, + 0.009014695882797241, + -0.02326500229537487, + -0.031676094979047775, + 0.059730563312768936, + -0.003182043321430683, + 0.007886218838393688, + -0.002324203960597515, + 0.019708987325429916, + -0.009828249923884869, + 0.001984676579013467, + 0.03330320119857788, + 0.011658744886517525, + 0.006518268492072821, + 0.0018403364811092615, + -0.016677843406796455, + 0.0005425055860541761, + -0.0033378652296960354, + -0.013049658387899399, + 0.01451274286955595, + 0.0051207938231527805, + -0.0338805615901947, + 0.024498453363776207, + -6.381513958331198e-05, + 0.0036085029132664204, + -0.024026067927479744, + -0.0016033233841881156, + -0.015588732436299324, + 0.0027194989379495382, + 0.0014729253016412258, + 0.00044450192945078015, + -0.022333351895213127, + 0.0037823671009391546, + 0.007761561777442694, + -0.0024505015462636948, + 0.008201142773032188, + -0.019604012370109558, + -0.033828072249889374, + 0.02121799625456333, + -0.013423630967736244, + 0.0032214089296758175, + 0.0057637630961835384, + -0.004153058864176273, + -0.005671910475939512, + 0.019945180043578148, + 0.001884622615762055, + 0.02536449395120144, + 0.013935381546616554, + 0.002919606864452362, + -0.016323555260896683, + 0.031229952350258827, + -0.013462996110320091, + 0.04590015485882759, + 0.018265584483742714, + -0.003444480011239648, + -0.01767510361969471, + -0.012308275327086449, + 0.012085204012691975, + -0.022595789283514023, + -0.015090103261172771, + -0.02863183058798313, + -0.0190922599285841, + 0.010497462935745716, + -0.01003819890320301, + -0.027897007763385773, + -0.05731614679098129, + -0.005625984165817499, + -0.015811802819371223, + 0.012610076926648617, + 0.04973173141479492, + 0.03393304720520973, + -0.017937539145350456, + 0.02468216046690941, + -0.021454188972711563, + -0.00604588259011507, + -0.021073656156659126, + 0.017084620893001556, + 0.006508427206426859, + 0.0011826048139482737, + -0.0019108662381768227, + 0.010910800658166409, + -0.008916282095015049, + -0.00553085096180439, + 0.01562809757888317, + 0.00692832563072443, + -0.03083629719913006, + -0.006101650185883045, + 0.001933829509653151, + -0.042803406715393066, + 0.01869860664010048, + 0.028264418244361877, + 0.023684900254011154, + 0.007577856071293354, + 0.057053711265325546, + 0.01539190486073494, + 0.02531200647354126, + -0.020653758198022842, + -0.002324203960597515, + -0.02474776841700077, + -0.02212340384721756, + 0.021742869168519974, + -0.0025390738155692816, + 0.03325071185827255, + 0.006908642593771219, + 0.0073351021856069565, + -0.007951827719807625, + -0.007407272234559059, + -0.00020431097073014826, + 0.012925000861287117, + -0.002995057264342904, + 0.002133937319740653, + -0.023789875209331512, + -0.013659823685884476, + -0.05324837937951088, + -0.00934930332005024, + 0.010759899392724037, + 0.006757741793990135, + -0.004225228913128376, + 0.008870355784893036, + 0.019971422851085663, + -0.012177056632936, + -0.005370108410716057, + -0.012150812894105911, + -0.011566892266273499, + 0.021060535684227943, + 0.016349798068404198, + -0.01536566112190485, + 0.03403802216053009, + -0.022149646654725075, + 0.0029163265135139227, + 0.04080888628959656, + -0.022307109087705612, + 0.02365865744650364, + -0.012341080233454704, + 0.001597582595422864, + -0.013016854412853718, + 0.00048345737741328776, + -0.0043105208314955235, + 0.018291829153895378, + -0.026834139600396156, + 6.07909714744892e-05, + 0.011612818576395512, + 0.03716101869940758, + -0.009998833760619164, + -0.036688633263111115, + -0.009178719483315945, + -0.03889309987425804, + -0.017425788566470146, + -0.010891118086874485, + 0.00012404228618834168, + -0.02703096717596054, + -0.006718376185745001, + -0.054481834173202515, + 0.0282119307667017, + 0.009533008560538292, + -0.014552108012139797, + 0.015286929905414581, + 0.01607424020767212, + 0.004005438182502985, + 0.024760890752077103, + -0.002599762286990881, + 0.04668746516108513, + -0.013672945089638233, + 0.029917769134044647, + 0.006282075308263302, + 0.044666703790426254, + 0.02577127143740654, + -0.004579517990350723, + 0.01325304713100195, + 0.011074823327362537, + 0.02514142356812954, + -0.013843528926372528, + -0.02149355597794056, + 0.020509418100118637, + 0.009224645793437958, + -0.01921035721898079, + -0.006088528316468, + -0.030573859810829163, + 0.000898025173228234, + 0.009578934870660305, + 0.02057502791285515, + 0.0013490880373865366, + -0.023724265396595, + -0.0012088484363630414, + -0.012905318289995193, + -0.001976475352421403, + -0.00738102849572897, + 0.010713973082602024, + 0.002762144897133112, + 0.02159852907061577, + -0.014434011653065681, + -0.007184201385825872, + 0.0015295131597667933, + 0.021336093544960022, + -0.013095584698021412, + 0.027634570375084877, + -0.046897415071725845, + 0.04805213585495949, + 0.031781069934368134, + -0.024616550654172897, + -0.020955560728907585, + -0.012124569155275822, + 0.03524523228406906, + -0.0017025573179125786, + -0.017005890607833862, + -0.02520703338086605, + 0.018842946738004684, + 0.04041523113846779, + 0.00449094595387578, + -0.03154487535357475, + 0.0024800256360322237, + -0.031151220202445984, + -0.008358605206012726, + -0.011317577213048935, + -0.0027441023848950863, + -0.042331017553806305, + 0.04311832785606384, + ], + "index": 20, + }, + { + "title": "Melissa Gilbert", + "text": "Melissa Ellen Gilbert (born May 8, 1964) is an American actress, television director, and 2016 Democratic candidate for Michigan's 8th congressional district.Gilbert began her career as a child actress in the late 1960s appearing in numerous commercials and guest starring roles on television. From 1974 to 1984, she starred as Laura Ingalls Wilder on the NBC series Little House on the Prairie.", + "vector": [ + 0.023501215502619743, + -0.0014370293356478214, + -0.02314792014658451, + -0.002298187231644988, + -0.03679925948381424, + -0.00917155109345913, + -0.03532954677939415, + -0.011128807440400124, + 0.05986238643527031, + 0.07670751214027405, + -0.046521950513124466, + -0.036120928823947906, + -0.02525356039404869, + 0.0547749325633049, + -0.032842349261045456, + -0.0002612178504932672, + -0.028857175260782242, + -0.001039571943692863, + 0.045956674963235855, + 0.001017490983940661, + 0.03066604770720005, + 0.015643924474716187, + 0.00459990743547678, + 0.035668712109327316, + 0.05002664029598236, + 0.03490559384226799, + -0.003165527479723096, + 0.0022928877733647823, + -0.0010510541032999754, + -0.030920421704649925, + -0.0055184755474328995, + 0.013771457597613335, + -0.001714366371743381, + -0.014640565030276775, + -0.034679483622312546, + -0.018258310854434967, + -0.05324869602918625, + 0.0050450596027076244, + 0.004183018580079079, + 0.014280203729867935, + -0.003245019121095538, + 0.01459816936403513, + -0.028645198792219162, + -0.019770415499806404, + 0.015686320140957832, + 0.017749564722180367, + 0.04397822171449661, + 0.00664548808708787, + 0.03914513811469078, + 0.024872001260519028, + -0.0068115368485450745, + -0.009454187005758286, + 0.01632225140929222, + 0.011665817350149155, + 0.016378778964281082, + -0.040332213044166565, + -0.008648673072457314, + 0.056838177144527435, + -0.013983434997498989, + -0.03496212139725685, + -0.03922992944717407, + -0.008775860071182251, + -0.005532607436180115, + -0.0012153364950791001, + 0.02727441117167473, + -0.02285115234553814, + 0.03394462913274765, + 0.0547749325633049, + 0.014979728497564793, + 0.03996478393673897, + 0.04946136847138405, + -0.053503070026636124, + -0.007037646137177944, + 0.025140507146716118, + 0.02077377401292324, + -0.015898296609520912, + -0.003925113007426262, + -0.01626572385430336, + -0.017933279275894165, + -0.042169347405433655, + 0.007942082360386848, + -0.05093107745051384, + 0.009044364094734192, + 0.04714374989271164, + 0.0018230046844109893, + -0.022893548011779785, + 0.02648302912712097, + -0.07461600750684738, + 0.04999837651848793, + 0.024123014882206917, + 0.029026757925748825, + 0.053022585809230804, + 0.04776554927229881, + -0.01429433561861515, + 0.03157048299908638, + -0.07834680378437042, + -0.007864357903599739, + -0.02549380250275135, + 0.03869292140007019, + -0.0061932699754834175, + -0.02384037896990776, + -0.00802687369287014, + -0.018258310854434967, + -0.03024209290742874, + 0.029139811173081398, + 0.029055019840598106, + -0.043158575892448425, + 0.037873275578022, + 0.015855900943279266, + -0.004122958518564701, + 0.03196617588400841, + -0.018145255744457245, + -0.039399512112140656, + 0.023246843367815018, + 0.005101586692035198, + 0.023006601259112358, + -0.006511235609650612, + 0.030072512105107307, + 0.02167821116745472, + 0.013941040262579918, + -0.024660024791955948, + -0.0038297229912132025, + 0.019657360389828682, + -0.0011217131977900863, + -0.007843160070478916, + 0.01695818267762661, + -0.05180725082755089, + 0.03174006566405296, + 0.034679483622312546, + 0.039003822952508926, + -0.019742151722311974, + 0.035216495394706726, + -0.0420280322432518, + 0.02504158392548561, + 0.02519703470170498, + -0.03453816846013069, + -0.0025578592903912067, + 0.01632225140929222, + 0.06331054866313934, + 0.023275107145309448, + 0.01683099754154682, + -0.008344839327037334, + 0.026256920769810677, + 0.004995597992092371, + -0.0340859480202198, + -0.057827405631542206, + 0.023911038413643837, + 0.004331402480602264, + 0.015177574008703232, + -0.04355426877737045, + -0.05135503038764, + 0.00910795759409666, + 0.01773543283343315, + 0.019162748008966446, + 0.06636302173137665, + 0.048811305314302444, + -0.01401169877499342, + 0.031316112726926804, + -0.02540901117026806, + -0.056809913367033005, + 0.03855160251259804, + 0.014301401562988758, + -0.006384049542248249, + 0.038919031620025635, + 0.015446078963577747, + 0.031853120774030685, + -0.026553688570857048, + 0.029422447085380554, + -0.012513726018369198, + 0.026977643370628357, + -0.04476960375905037, + -0.022497856989502907, + 0.023430556058883667, + -0.01512104645371437, + -0.029422447085380554, + -0.015615660697221756, + 0.02317618392407894, + -0.010888567194342613, + -0.045532722026109695, + -0.06698482483625412, + 0.02335989661514759, + -0.012824625708162785, + -0.0019731551874428988, + -0.013192052952945232, + -0.022413065657019615, + -0.016633151099085808, + -0.031429167836904526, + -0.03289887681603432, + -0.0027027104515582323, + -0.08473438769578934, + -0.01295887865126133, + 0.0020155508536845446, + -0.00718603003770113, + -0.03448164090514183, + 0.007730105426162481, + 0.003684871830046177, + -0.018512682989239693, + -0.03224881365895271, + -0.037505850195884705, + -0.014979728497564793, + 0.022285878658294678, + -0.00019696223898790777, + 0.002347648609429598, + -0.03719494864344597, + 0.03549912944436073, + -0.011722343973815441, + 0.03643183037638664, + 0.0017797260079532862, + -0.06087987869977951, + 0.01938885636627674, + 0.03315324708819389, + 0.006359318736940622, + 0.06359318643808365, + -0.022144561633467674, + -0.002935885451734066, + 0.007334414403885603, + 0.010987489484250546, + 0.00802687369287014, + -0.0009203347144648433, + -0.017424533143639565, + 0.03346414864063263, + 0.022653305903077126, + 0.014350862242281437, + -0.008789991959929466, + -0.048783041536808014, + 0.027797289192676544, + -0.044486965984106064, + 0.00036588162765838206, + 0.0072319586761295795, + -0.02213042974472046, + -0.035555656999349594, + 0.01738213747739792, + -0.002284055342897773, + 0.0871085375547409, + -0.044995713979005814, + -0.011644619517028332, + 0.024674156680703163, + 0.008549750782549381, + -0.02696351148188114, + 0.036997102200984955, + 0.024165410548448563, + -0.016548359766602516, + -0.02128252014517784, + -0.008726398460566998, + 0.010189041495323181, + -0.038042858242988586, + -0.009185682982206345, + 0.02074551023542881, + 0.004274875391274691, + 0.004423259291797876, + 0.06834147870540619, + 0.01743866503238678, + -0.0023794451262801886, + -0.002911154879257083, + -0.006306324619799852, + 0.006454708520323038, + 0.02928113006055355, + -0.019176878035068512, + 0.002391810528934002, + 0.03340762108564377, + -0.020674852654337883, + -0.06749357283115387, + -0.03990825638175011, + -0.03493385761976242, + -0.001354004954919219, + -0.03125958517193794, + -0.01509278267621994, + -2.8401644158293493e-05, + -0.02114120125770569, + -0.024603497236967087, + -0.04917873069643974, + -0.015615660697221756, + 0.0023829780984669924, + 0.05220293998718262, + 0.014909069053828716, + -0.006977585610002279, + -0.04021915793418884, + 0.022172825410962105, + 0.004656434524804354, + -0.0007207227754406631, + 0.03157048299908638, + 0.021551024168729782, + -0.03315324708819389, + -0.009885207749903202, + -0.018738793209195137, + 0.05844920501112938, + -0.015417815186083317, + 0.005497277714312077, + 0.014103556051850319, + 0.04298899322748184, + -0.03527302294969559, + 0.06025807932019234, + -0.023472951725125313, + 0.008768794126808643, + 0.027048302814364433, + 0.014485115185379982, + 0.02047700621187687, + -0.021098805591464043, + 0.014428587630391121, + -0.03623398393392563, + 0.04561751335859299, + -0.029507238417863846, + 0.01205444149672985, + -0.008634542115032673, + 0.0005136033287271857, + -0.02597428485751152, + -0.02733093872666359, + 0.037477586418390274, + 0.023204447701573372, + -0.03066604770720005, + -0.025211166590452194, + -0.017240820452570915, + 0.058675315231084824, + 0.03597961366176605, + -0.005755183286964893, + 0.006864531431347132, + 0.014216610230505466, + -0.012379474006593227, + -0.018894242122769356, + -0.0199965238571167, + 0.03880597651004791, + 0.011807135306298733, + -0.0066490210592746735, + 0.009652032516896725, + -0.008987837471067905, + -0.003230887232348323, + 0.009659098461270332, + -0.03736453130841255, + 0.00927753932774067, + -0.004391463007777929, + -0.03990825638175011, + 0.051694195717573166, + 0.005744584370404482, + 0.009623768739402294, + 0.09072627872228622, + -0.043073784559965134, + -0.02485787123441696, + 0.04383690282702446, + 0.004232479725033045, + 0.042169347405433655, + -0.038890767842531204, + -0.03917340189218521, + 0.00393924443051219, + -0.0044797868467867374, + -0.006009556353092194, + 0.046013202518224716, + -0.007242557592689991, + 0.015262365341186523, + 0.010711919516324997, + -0.028334297239780426, + 0.0006840683636255562, + -0.055029306560754776, + 0.023345764726400375, + 0.03603614121675491, + 0.012308814562857151, + 0.03332282975316048, + 0.011248928494751453, + -0.04468481242656708, + 0.001960790017619729, + 0.010775512084364891, + 0.045589249581098557, + 0.01656249165534973, + -0.01930406503379345, + 0.020095447078347206, + -0.0006169422413222492, + -0.01752345636487007, + -0.03809938579797745, + -0.06958507746458054, + -0.02309139259159565, + -0.04564577713608742, + 0.06285833567380905, + 0.013566547073423862, + 0.01770716905593872, + -0.03060952015221119, + 0.05599026754498482, + -0.0133475037291646, + -0.015686320140957832, + -0.024617629125714302, + -0.010980423539876938, + 0.004585775546729565, + -0.04567404091358185, + 0.061049461364746094, + -0.053983550518751144, + 0.0018548013176769018, + -0.021240124478936195, + -0.018597474321722984, + -0.0012100370367988944, + -0.013142592273652554, + 0.009143287315964699, + -0.0035753503907471895, + -0.005299432203173637, + 0.04530661180615425, + 0.02386864274740219, + 0.0009989429963752627, + 0.018597474321722984, + -0.017594115808606148, + 0.018272442743182182, + -0.004313738085329533, + 0.07964693754911423, + -0.02357187494635582, + 0.007503996137529612, + -0.029535502195358276, + 0.018018070608377457, + -0.0344533771276474, + 0.004073496907949448, + -0.011135873384773731, + -0.02020850218832493, + -0.04154754802584648, + 0.05974933132529259, + 0.011467971839010715, + -0.027853816747665405, + -0.030920421704649925, + 0.013432294130325317, + -0.006970520131289959, + 0.00805513747036457, + -0.006115545053035021, + 0.020307425409555435, + -0.025140507146716118, + 0.027429861947894096, + 0.035131704062223434, + 0.02477307990193367, + -0.022017374634742737, + 0.038919031620025635, + 0.014202478341758251, + 0.014711223542690277, + 0.018272442743182182, + 0.014322599396109581, + 0.0020579462870955467, + -0.0348208025097847, + 0.03109000250697136, + -0.021720606833696365, + -0.027401598170399666, + -0.017777828499674797, + 0.019077956676483154, + 0.0040558320470154285, + -0.010464612394571304, + -0.024094752967357635, + -0.021579287946224213, + 0.0007927067345008254, + -0.007383875548839569, + -0.03428379446268082, + 0.01632225140929222, + -0.014569905586540699, + 0.012019112706184387, + -0.08309509605169296, + 0.013524151407182217, + -0.03965388610959053, + -0.04875477775931358, + 0.018018070608377457, + -0.01465469691902399, + -0.03117479383945465, + 0.023614270612597466, + 0.006670218892395496, + -0.02706243470311165, + 0.011354916729032993, + 0.018060464411973953, + 0.031231321394443512, + 0.03914513811469078, + -0.04400648549199104, + 0.022356538102030754, + 0.00035704925539903343, + 0.01698644645512104, + 0.02296420745551586, + 0.03872118517756462, + -0.03857986629009247, + -0.10497115552425385, + 0.0004047441470902413, + 0.05152461305260658, + -0.014336730353534222, + 0.03244665637612343, + 0.050252750515937805, + 0.02754291519522667, + -0.022893548011779785, + 0.0061014131642878056, + 0.016788601875305176, + -0.045532722026109695, + 0.013672535307705402, + 0.003942777402698994, + 0.04669152945280075, + -0.00793501641601324, + 0.028998494148254395, + -0.014061160385608673, + 0.002596721751615405, + 0.03954083099961281, + 0.0025578592903912067, + -9.759787644725293e-05, + 0.07732931524515152, + 0.00816112570464611, + 0.0015403683064505458, + -0.0420280322432518, + -0.03222054988145828, + -0.0016640217509120703, + -0.018173519521951675, + -0.010824973694980145, + 0.017693037167191505, + 0.030920421704649925, + 0.003822657046839595, + -0.006751476787030697, + -0.0038297229912132025, + 0.0022663904819637537, + 0.000992760295048356, + 0.06268875300884247, + 0.004144155886024237, + -0.0036248117685317993, + 0.01169408019632101, + -0.006023688241839409, + 0.010443414561450481, + 0.043130312114953995, + 0.06738051772117615, + -0.011100544594228268, + 0.010196107439696789, + -0.0006708197761327028, + -0.012082705274224281, + -0.01885184645652771, + 0.014386191964149475, + 0.01259851735085249, + 0.0042784083634614944, + 0.016915787011384964, + 0.013891578651964664, + -0.002552559832111001, + -0.023713193833827972, + 0.029648557305336, + 0.01767890527844429, + 0.059692803770303726, + 0.01767890527844429, + -0.011241862550377846, + 0.0301573034375906, + 0.017608247697353363, + -0.02140970714390278, + 0.005133383441716433, + -0.009150353260338306, + 0.03120305761694908, + 0.04751117527484894, + 0.02170647494494915, + 0.01390571054071188, + -0.004585775546729565, + -0.0036318774800747633, + 0.013192052952945232, + 0.03385983780026436, + -0.030355148017406464, + -0.008881848305463791, + -0.04058658704161644, + 0.03165527433156967, + -0.02077377401292324, + 0.017565852031111717, + -0.021127069368958473, + -0.012824625708162785, + -0.021423839032649994, + 0.006419378798455, + -0.043610796332359314, + 0.009319934993982315, + -0.03589482232928276, + 0.026539556682109833, + -0.024900265038013458, + -0.01531889196485281, + -0.011849530972540379, + -0.01459816936403513, + 0.0744464248418808, + 0.04474133998155594, + -0.010372755117714405, + 0.0817384421825409, + -0.043215103447437286, + -0.04327163100242615, + -0.0016790367662906647, + -0.003776728641241789, + -0.012690373696386814, + -0.006129676476120949, + 0.028645198792219162, + -0.04279115051031113, + 0.02197497896850109, + -0.010422216728329659, + -0.03764716535806656, + 0.02140970714390278, + -0.06851106137037277, + -0.022356538102030754, + 0.02146623283624649, + -0.009263407438993454, + 0.022978337481617928, + 0.00846495945006609, + 0.002686812076717615, + 0.0696416050195694, + -0.009510714560747147, + 0.03196617588400841, + 0.011178269051015377, + -0.053107377141714096, + 0.02375558763742447, + 0.018724661320447922, + -0.012322946451604366, + 0.020575929433107376, + 0.023826247081160545, + -0.02786794863641262, + -0.0181028600782156, + 0.028899570927023888, + -0.007398007437586784, + 0.020547665655612946, + 0.00434553436934948, + 0.00393924443051219, + 0.01534715574234724, + -0.009736823849380016, + -0.02044874243438244, + 0.05324869602918625, + 0.02095748856663704, + 0.011418510228395462, + 0.007864357903599739, + -0.027316806837916374, + -0.04776554927229881, + -0.03428379446268082, + 0.011644619517028332, + 0.025931889191269875, + -0.021452100947499275, + -0.010450480505824089, + -0.00846495945006609, + -0.01273276936262846, + 0.02799513377249241, + -0.006935190409421921, + -0.030439939349889755, + 0.019459515810012817, + -0.018512682989239693, + -0.03125958517193794, + -0.01743866503238678, + -0.01169408019632101, + -0.006624290253967047, + -0.0053170970641076565, + -0.0019731551874428988, + -0.005129850469529629, + -0.038438547402620316, + -0.02104227989912033, + -0.015219969674944878, + -0.03018556535243988, + 0.03501864895224571, + 0.03069431148469448, + 0.0010510541032999754, + -0.02482960745692253, + -0.01142557617276907, + -0.030920421704649925, + -0.013262712396681309, + -0.03956909477710724, + -0.04476960375905037, + 0.02309139259159565, + 0.014449785463511944, + -0.0541248694062233, + 0.037534113973379135, + -0.029394185170531273, + 0.014025830663740635, + -0.00986400991678238, + -0.02610146999359131, + 0.00849322322756052, + 0.008761728182435036, + 0.014725355431437492, + 0.018837714567780495, + -0.0060837483033537865, + -0.023684930056333542, + -0.027260279282927513, + -0.006917525548487902, + -0.005101586692035198, + -0.011121741496026516, + -0.009977064095437527, + -0.03162701055407524, + -0.0006385815795511007, + 0.012181628495454788, + -0.021551024168729782, + -0.011658751405775547, + -0.007468666415661573, + 0.011178269051015377, + 0.004338468424975872, + -0.03674273192882538, + 0.012125100940465927, + -0.010351557284593582, + 0.01815938763320446, + -0.0005295015871524811, + 0.004469187930226326, + -0.013623073697090149, + 0.004380864091217518, + -0.004716494586318731, + 0.030439939349889755, + -0.012209892272949219, + -0.06461067497730255, + -0.035103440284729004, + -0.013531217351555824, + 0.0011826566187664866, + 0.01656249165534973, + -0.04578709602355957, + -0.024617629125714302, + 0.01879531890153885, + -0.00858508050441742, + 0.014463917352259159, + 0.008903046138584614, + -0.005129850469529629, + -0.02131078392267227, + -0.0028139986097812653, + 0.017240820452570915, + -0.013354569673538208, + -0.018498551100492477, + 0.03809938579797745, + -0.012817559763789177, + 0.0005277351592667401, + -0.015333023853600025, + -0.03730800375342369, + -0.026497161015868187, + -0.026921115815639496, + -0.0027433393988758326, + 0.029337657615542412, + -0.008797057904303074, + -0.022568516433238983, + 0.0021127068903297186, + 0.0093058031052351, + -0.010245569050312042, + -0.03682751953601837, + 0.00554673932492733, + -0.02522529847919941, + 0.01201204676181078, + 0.03431205824017525, + -0.0018247711705043912, + -0.01746692880988121, + -0.0007538442150689662, + -0.036629676818847656, + -0.01869639754295349, + -0.019770415499806404, + 0.02727441117167473, + -0.01512104645371437, + 0.05240078642964363, + 0.015728715807199478, + 0.025606857612729073, + -0.018470287322998047, + -0.0472002774477005, + -0.010740182362496853, + 0.018936637789011, + -0.03575350344181061, + 0.01587003283202648, + 0.013460557907819748, + -0.02861693501472473, + 0.013036603108048439, + 0.01978454738855362, + 0.004924939014017582, + 0.0437803752720356, + 0.00012299099762458354, + -0.00780076440423727, + 0.020392214879393578, + 0.01234414428472519, + 0.023769719526171684, + 0.022413065657019615, + -0.0172266885638237, + 0.03581003099679947, + -0.014287269674241543, + 0.002006718423217535, + -0.007189563009887934, + -0.0021091741509735584, + 0.007362677715718746, + -0.0172266885638237, + -0.04493918642401695, + 0.059636276215314865, + 0.011475037783384323, + 0.0005264102946966887, + 0.009009035304188728, + -0.0191203523427248, + 0.015064519830048084, + 0.05336175113916397, + -0.00411235960200429, + 0.030976947396993637, + -0.0218901876360178, + 0.017452796921133995, + -0.0327010303735733, + -0.01981281116604805, + 0.00849322322756052, + 0.0006721446407027543, + 0.06280180811882019, + -0.014004632830619812, + -0.00493200495839119, + -0.023925170302391052, + -0.018993165343999863, + 0.008012741804122925, + -0.014301401562988758, + 0.0003466712078079581, + -0.033746786415576935, + 0.02140970714390278, + -0.0011614589020609856, + -0.008344839327037334, + -0.018922505900263786, + -0.010881501249969006, + 0.028758252039551735, + -0.02597428485751152, + 0.0045893085189163685, + -0.002388277556747198, + 0.004610505886375904, + -0.029111547395586967, + -0.05946669727563858, + 0.0434129498898983, + 0.015488473698496819, + -0.03024209290742874, + -0.060597240924835205, + -0.027288543060421944, + -0.010669523850083351, + -0.025211166590452194, + -0.01807459630072117, + -0.03688404709100723, + 0.011708212085068226, + 0.0008130212081596255, + -0.010443414561450481, + 0.021565156057476997, + -0.0057198540307581425, + 0.031344376504421234, + 0.02122599259018898, + -0.015446078963577747, + -0.006956388242542744, + -0.024066489189863205, + -0.030750839039683342, + -0.011595157906413078, + 0.006670218892395496, + -0.04349774122238159, + 0.03971041366457939, + 0.03431205824017525, + 0.022116297855973244, + 0.003289181040599942, + -0.06619343906641006, + -0.024546969681978226, + -0.005582068581134081, + -0.004020502790808678, + 0.02591775730252266, + -0.009086759760975838, + -0.03298366814851761, + -0.0031443298794329166, + 0.03261623904109001, + -0.0031761263962835073, + -0.012859955430030823, + 0.024193674325942993, + 0.00933406688272953, + 0.018173519521951675, + -0.028306033462285995, + 0.0019007297232747078, + 0.007744236849248409, + -0.024123014882206917, + 0.0444304384291172, + -0.038353756070137024, + -0.004688231274485588, + -0.0527399517595768, + -0.00046811651554889977, + -0.021989110857248306, + -0.012457198463380337, + 0.026285184547305107, + 0.007405073381960392, + -0.00040805627941153944, + -0.01914861612021923, + -0.001015724497847259, + -0.051185451447963715, + 0.008994903415441513, + -0.009397659450769424, + 0.0021074076648801565, + -0.07795111835002899, + -0.01423780806362629, + -0.01855507865548134, + 0.01855507865548134, + 0.009899339638650417, + -0.01086736936122179, + -0.014937332831323147, + -0.008175257593393326, + 0.0022027974482625723, + -0.0038509208243340254, + -0.009750955738127232, + -0.03258797526359558, + 0.004829549230635166, + -0.004271342419087887, + -0.01741040125489235, + 0.04527834802865982, + -0.027797289192676544, + 0.017099501565098763, + 0.006020155269652605, + -0.01978454738855362, + 0.011460905894637108, + 0.007327348459511995, + 0.00033253937726840377, + 0.0067585427314043045, + -0.010323294438421726, + 0.002324684290215373, + -0.035555656999349594, + -0.05556631460785866, + 0.029648557305336, + -0.024038225412368774, + -0.00024465713067911565, + -0.017099501565098763, + 0.010499942116439342, + 0.027514653280377388, + 0.032870613038539886, + -0.027458125725388527, + -0.006903393659740686, + -0.002324684290215373, + 0.0014334964798763394, + 0.009475384838879108, + -0.0172266885638237, + -0.0068115368485450745, + -0.007638248614966869, + -0.030468203127384186, + -0.018654001876711845, + 0.031231321394443512, + -0.023289239034056664, + 0.03171180188655853, + 0.010803775861859322, + 0.04355426877737045, + -0.03691231086850166, + 0.017057105898857117, + 0.021551024168729782, + 0.015361287631094456, + 0.025055715814232826, + 0.0036212787963449955, + 0.06087987869977951, + -0.008139927871525288, + 0.019205141812562943, + -0.013114328496158123, + 0.013637205585837364, + -0.005578535608947277, + -0.01022437121719122, + -0.028970230370759964, + -0.011072280816733837, + 0.01975628361105919, + 0.006218000315129757, + 0.012690373696386814, + 0.0020632457453757524, + -0.01914861612021923, + 0.026271052658557892, + 0.016972314566373825, + -0.014923200942575932, + -0.024193674325942993, + 0.0109450938180089, + 0.009962933138012886, + 0.04329989477992058, + -0.009828680194914341, + -0.054407503455877304, + -0.004009903874248266, + -0.0058293757028877735, + 0.0030189098324626684, + 0.026172129437327385, + -0.008373103104531765, + 0.022045638412237167, + 0.02140970714390278, + -0.04163233935832977, + 0.009765087626874447, + -0.02762770652770996, + -0.018442023545503616, + 0.0018530348315835, + 0.018738793209195137, + -0.0019925865344703197, + -0.00529236625880003, + 0.01668967865407467, + 0.00614027539268136, + 0.036997102200984955, + -0.04493918642401695, + 5.895618232898414e-05, + -0.005603266414254904, + -0.017184292897582054, + 0.004886076785624027, + -0.01962909661233425, + 0.011411444284021854, + -0.019614964723587036, + -0.0035594520159065723, + -0.0006588960532099009, + 0.030750839039683342, + 0.039823468774557114, + -0.012132166884839535, + -0.0015421347925439477, + -0.003153162309899926, + 0.02546553872525692, + -0.015954824164509773, + 0.008408432826399803, + -0.02311965636909008, + -0.0038933162577450275, + -0.025154639035463333, + 0.03866465762257576, + 0.0004985882551409304, + 0.008966639637947083, + 0.03857986629009247, + 0.0017002344829961658, + 0.026313448324799538, + -0.016166800633072853, + 0.009221011772751808, + 0.013750260695815086, + -0.022073902189731598, + 0.02245546132326126, + -0.0509876050055027, + 0.029959456995129585, + -0.02471655234694481, + -0.011800069361925125, + 0.006041352637112141, + -0.0077795665711164474, + 0.01701471023261547, + 0.03928645700216293, + 0.016619019210338593, + 0.004080562852323055, + -0.02005305141210556, + 0.021367311477661133, + -0.011835399083793163, + -0.030383411794900894, + -0.05861878767609596, + -0.007256689481437206, + -0.013078998774290085, + -0.03990825638175011, + 0.014640565030276775, + -0.012266418896615505, + -0.011800069361925125, + -0.012033244594931602, + -0.01560152880847454, + 0.03202270343899727, + -0.030468203127384186, + 0.04751117527484894, + 0.001874232548289001, + -0.011934321373701096, + -0.031400904059410095, + 0.03439684957265854, + 0.009178617037832737, + -0.006684350781142712, + -0.007518128026276827, + -0.0006160589982755482, + 0.014160082675516605, + 0.014202478341758251, + 0.022540252655744553, + -0.014711223542690277, + 0.02333163470029831, + -0.01749519258737564, + -0.033690258860588074, + 0.02540901117026806, + -0.015898296609520912, + 0.010139580816030502, + -0.002100341720506549, + -0.03450990468263626, + 0.01562979258596897, + 0.01789088360965252, + -0.017608247697353363, + 0.010323294438421726, + 0.024787211790680885, + -0.00994880124926567, + 0.018682265654206276, + 0.0032503183465451, + 0.019318196922540665, + 0.008323641493916512, + -0.003903915174305439, + 0.048330821096897125, + -0.03255971148610115, + 0.006755009759217501, + 0.028009265661239624, + 0.040388740599155426, + 0.01158809196203947, + 0.011135873384773731, + -0.010245569050312042, + 0.022229351103305817, + -0.030298620462417603, + 0.01927580125629902, + 0.0076877097599208355, + -0.004179485607892275, + -0.006210934836417437, + -0.030100775882601738, + -0.008337773382663727, + 0.015587396919727325, + 0.02612973377108574, + -0.0013504719827324152, + 0.028306033462285995, + 0.017537588253617287, + 0.0049532027915120125, + 0.011121741496026516, + 0.005175778642296791, + 0.024900265038013458, + 0.007398007437586784, + 0.01834310218691826, + 0.030948683619499207, + 0.009093825705349445, + -0.033294565975666046, + 0.020378082990646362, + 0.011503300629556179, + 0.01698644645512104, + 0.025960152968764305, + -0.012471330352127552, + 0.009037298150360584, + -0.028433220461010933, + -0.013078998774290085, + -0.018201783299446106, + 0.005246438086032867, + 0.00021186689264141023, + 0.0008929543546400964, + -0.013820919208228588, + -0.018710529431700706, + -0.013594809919595718, + -0.011828333139419556, + 0.009581374004483223, + 0.05531194061040878, + 0.005765782203525305, + 0.0005741051863878965, + -0.00787848886102438, + 0.01070485357195139, + -0.00012630312994588166, + 0.0021127068903297186, + -0.007751302793622017, + -0.008062203414738178, + 0.0004725327016785741, + -0.017452796921133995, + -0.016407042741775513, + -0.010075987316668034, + -0.017028842121362686, + -0.014428587630391121, + -0.04847213998436928, + -0.020660720765590668, + 0.029026757925748825, + 0.01960083283483982, + -0.003001245204359293, + 0.03196617588400841, + -0.03012903966009617, + -0.031824856996536255, + 0.03151395544409752, + -0.0027910342905670404, + 0.01531889196485281, + -0.031429167836904526, + 0.041745394468307495, + -0.04349774122238159, + 0.0036159793380647898, + -0.04098227620124817, + 0.04434565082192421, + 0.014781882986426353, + -0.030044248327612877, + 0.013601875863969326, + -0.019191009923815727, + -0.013368701562285423, + -0.04208455979824066, + 0.023684930056333542, + -0.005221707280725241, + 0.013870380818843842, + 0.005076856352388859, + 0.015954824164509773, + -0.018032200634479523, + 0.026285184547305107, + -0.008726398460566998, + -0.004631703719496727, + 0.007942082360386848, + 0.0037590640131384134, + 0.016067879274487495, + 0.011164137162268162, + 0.013220316730439663, + 0.03219228610396385, + -0.06274528056383133, + 0.023218579590320587, + 0.0010907998075708747, + -0.020038919523358345, + -0.0022434263955801725, + 0.04366732016205788, + -0.03487733006477356, + -0.0015659822383895516, + -0.0012594984145835042, + -0.02266743779182434, + 0.05952322483062744, + 0.013997566886246204, + -0.032418392598629, + -0.021932583302259445, + -0.00874759629368782, + -0.029931193217635155, + -0.038042858242988586, + 0.03626224771142006, + 0.030835630372166634, + -0.01954430714249611, + 0.0008708733948878944, + 0.03450990468263626, + -0.03640356659889221, + -0.012188694439828396, + -0.019982391968369484, + -0.02338816039264202, + -0.013163790106773376, + 0.01717016100883484, + 0.016972314566373825, + 0.005705722142010927, + 0.006514768581837416, + 0.006023688241839409, + -0.017933279275894165, + -0.015333023853600025, + -0.03298366814851761, + -0.012591451406478882, + 0.007398007437586784, + 0.0025189968291670084, + -0.00019022753986064345, + 0.001309843035414815, + 0.015474341809749603, + -0.038466811180114746, + -0.011029885150492191, + -0.012895285151898861, + 0.04041700437664986, + -0.0076170507818460464, + 0.007016448304057121, + -0.013156724162399769, + 0.007249623537063599, + -0.029507238417863846, + 0.014061160385608673, + -0.006613691337406635, + 0.002077377401292324, + -0.005306498147547245, + 0.008373103104531765, + 0.0020703114569187164, + 0.0056279972195625305, + -0.04197150468826294, + 0.01050700806081295, + -0.002446571132168174, + -0.0029606162570416927, + -0.0014140651328489184, + 3.425310205784626e-05, + 0.015912428498268127, + 0.03959735855460167, + 0.013566547073423862, + 0.007956214249134064, + -0.00608728127554059, + -0.022780492901802063, + 0.0012383006978780031, + 0.004575176630169153, + 0.013997566886246204, + -0.009835746139287949, + 0.005603266414254904, + -0.0064653074368834496, + -0.0028069326654076576, + 0.03603614121675491, + -0.008309509605169296, + -0.02482960745692253, + -0.007609984837472439, + -0.007405073381960392, + -0.007652380038052797, + -0.0021604017820209265, + -0.0027433393988758326, + 0.008648673072457314, + 0.00841549877077341, + 0.04010610282421112, + -0.006221533287316561, + -0.009595504961907864, + 0.0004698830016423017, + -0.029422447085380554, + -0.008881848305463791, + 0.008429630659520626, + -0.005804644897580147, + -0.016223328188061714, + 0.014322599396109581, + -0.020999884232878685, + 0.005437217652797699, + -0.028546275570988655, + 0.023289239034056664, + -0.0028828911017626524, + 0.03109000250697136, + 0.013658403418958187, + -0.025479670614004135, + -0.013255646452307701, + -0.0059530287981033325, + 0.01602548360824585, + 0.006232132203876972, + 0.0034834935795515776, + -0.01250666007399559, + 0.031372640281915665, + -0.04106706753373146, + 0.008203521370887756, + -0.00790675263851881, + -0.028376692906022072, + -0.02314792014658451, + 0.016308119520545006, + -0.011460905894637108, + -0.003766129957512021, + -0.009150353260338306, + 0.015205837786197662, + 0.021536892279982567, + 0.013750260695815086, + 0.03109000250697136, + -0.0009627302060835063, + -0.03222054988145828, + -0.0031266650184988976, + 0.022709833458065987, + -0.026030810549855232, + -0.007164832670241594, + 0.006804470904171467, + 0.05596200376749039, + -0.006281593814492226, + -0.024575233459472656, + 0.00933406688272953, + 0.0020226165652275085, + 0.03883424028754234, + -0.044091276824474335, + 0.00933406688272953, + -0.023642534390091896, + -0.0007759252330288291, + -0.035159967839717865, + -0.004536313936114311, + 0.016604887321591377, + 0.015728715807199478, + -0.02386864274740219, + 0.03544260188937187, + -0.005786980036646128, + 0.008924243971705437, + 0.0011835398618131876, + 0.03210749477148056, + -0.0260025467723608, + 0.039879992604255676, + -0.013856248930096626, + -0.016887525096535683, + -0.01914861612021923, + 0.0055361404083669186, + -0.015855900943279266, + -0.012266418896615505, + 0.0018883643206208944, + -0.027769025415182114, + -0.011354916729032993, + 0.01996826007962227, + -0.005783447064459324, + -0.0451652966439724, + 0.017848487943410873, + 0.010189041495323181, + -0.004260743502527475, + -0.01623746007680893, + -0.032842349261045456, + -0.0005016796058043838, + -0.001985520590096712, + 0.001194138778373599, + -0.01437206007540226, + 0.024886133149266243, + -0.002056179801002145, + 0.019798679277300835, + 0.03292714059352875, + -0.015728715807199478, + 0.024278465658426285, + -0.01978454738855362, + 0.01989760249853134, + -0.014979728497564793, + 0.01650596596300602, + -0.0017496958607807755, + -0.06630649417638779, + -0.0111994668841362, + 0.005143982358276844, + 0.014209544286131859, + -0.008818255737423897, + 0.020392214879393578, + 0.00024841088452376425, + -0.005613865330815315, + 0.004522182047367096, + 0.0063027916476130486, + 0.008797057904303074, + -0.055424995720386505, + 0.039399512112140656, + 0.004059365019202232, + -0.04445870220661163, + -0.013644271530210972, + -0.03154221922159195, + -0.04352600499987602, + -0.012845823541283607, + -0.012061507441103458, + 0.029111547395586967, + -0.020858565345406532, + -0.008839452639222145, + 0.016887525096535683, + -3.4536012663011206e-06, + -0.03569697588682175, + 0.007652380038052797, + 0.01109347864985466, + -0.014244874007999897, + 0.023105524480342865, + 0.006023688241839409, + 0.0344533771276474, + -0.013580678030848503, + 0.0028334297239780426, + -0.018145255744457245, + -0.016152668744325638, + -0.007419205270707607, + 0.03535781055688858, + -0.023345764726400375, + 0.06427151709794998, + 0.004564577713608742, + 0.0042960732243955135, + -0.024702420458197594, + 0.001714366371743381, + 0.005009729880839586, + -0.0022416599094867706, + -0.024970924481749535, + 0.0170429740101099, + 0.02143797092139721, + -0.055877212435007095, + -0.018442023545503616, + 0.00221339613199234, + 0.022992469370365143, + 0.008076334372162819, + -0.013997566886246204, + -0.004267809446901083, + -0.00043124129297211766, + -0.009503648616373539, + 0.009404725395143032, + -0.04284767806529999, + -0.009319934993982315, + -0.012753967195749283, + 0.014640565030276775, + -0.020434610545635223, + -0.025182902812957764, + 0.0067903390154242516, + 0.03391636535525322, + -0.014965596608817577, + -0.010203173384070396, + 0.0008077218080870807, + -0.009009035304188728, + -0.00025260625989176333, + -0.012019112706184387, + 0.04717201367020607, + 0.01855507865548134, + -0.0013133760076016188, + 0.0022699234541505575, + 0.018922505900263786, + -0.01270450558513403, + 0.01512104645371437, + -0.027203751727938652, + -0.011354916729032993, + -0.01786261983215809, + 0.016520095989108086, + -0.002052646828815341, + 0.01058473251760006, + -0.05712081491947174, + -0.011347850784659386, + 0.008019807748496532, + 0.00672674598172307, + 0.01599721983075142, + 0.017664773389697075, + -0.02213042974472046, + 0.032842349261045456, + 0.014909069053828716, + -0.008450827561318874, + -0.011255994439125061, + -0.002935885451734066, + 0.0005272935377433896, + 0.03496212139725685, + 0.045023977756500244, + 0.051637668162584305, + -0.014463917352259159, + 0.009065561927855015, + -0.02648302912712097, + 0.0018336036009714007, + -0.010485810227692127, + -0.011255994439125061, + 0.004465654958039522, + -0.023430556058883667, + 0.021452100947499275, + 0.0003932620456907898, + 0.017127765342593193, + -0.008888914249837399, + 0.012845823541283607, + -0.015587396919727325, + 0.009955867193639278, + 0.0015686319675296545, + -0.020420478656888008, + 0.024758948013186455, + 0.007723039481788874, + -0.0327010303735733, + 0.03473601117730141, + -0.03527302294969559, + -0.018272442743182182, + -0.005889435764402151, + 0.006956388242542744, + -0.03634703904390335, + -0.027670102193951607, + -0.02143797092139721, + -0.03253144770860672, + 0.014781882986426353, + -0.001649889862164855, + 0.0034658287186175585, + -0.01960083283483982, + -0.0077795665711164474, + 0.018950769677758217, + 0.008069268427789211, + -0.007062376942485571, + 0.006730278953909874, + 0.03289887681603432, + -0.007553457282483578, + -0.023911038413643837, + -0.008662804961204529, + 0.002866992959752679, + -0.004264276474714279, + -0.03496212139725685, + -0.0036212787963449955, + 0.01717016100883484, + 0.032729294151067734, + 0.010047723539173603, + -0.012513726018369198, + 0.022752229124307632, + 0.04041700437664986, + -0.0413779653608799, + 0.018781188875436783, + 0.014386191964149475, + -0.019925866276025772, + -0.01319911889731884, + 0.02685045637190342, + -0.038862504065036774, + -0.005493744742125273, + 0.002146270126104355, + 0.01070485357195139, + 0.007920884527266026, + -0.0009062029421329498, + 0.026271052658557892, + 0.053983550518751144, + -0.004515116102993488, + 0.0024289065040647984, + 0.05358785763382912, + 0.012520791962742805, + -0.011736475862562656, + -0.002354714320972562, + -0.007482798304408789, + -0.003027742262929678, + -0.01365133747458458, + -0.012775165028870106, + 0.03301193192601204, + -0.0070517780259251595, + 0.018526814877986908, + 0.004638769663870335, + 0.003744932124391198, + -0.005755183286964893, + 0.00042925402522087097, + -0.01683099754154682, + -0.024250201880931854, + 0.050281014293432236, + -0.023953434079885483, + -0.009383528493344784, + -0.0056279972195625305, + -0.01417421456426382, + 0.016859261319041252, + -0.003720201551914215, + -0.013375767506659031, + 0.00012056208652211353, + -0.004818950314074755, + -3.679241126519628e-05, + -0.0186116062104702, + -0.04279115051031113, + 0.005560870748013258, + 0.010796709917485714, + -0.006242731120437384, + 0.0061932699754834175, + 0.0033580735325813293, + -0.05567936971783638, + -0.014584037475287914, + -0.037901539355516434, + -0.02642650157213211, + 0.01429433561861515, + -0.0012745134299620986, + -0.007899686694145203, + 0.03012903966009617, + -0.037958066910505295, + -0.013156724162399769, + -0.001667554723098874, + 0.035668712109327316, + 0.03411421179771423, + ], + "index": 21, + }, + { + "title": "Jacob K. Javits Federal Building", + "text": "The Jacob K. Javits Federal Office Building at 26 Federal Plaza on Foley Square in the Civic Center district of Manhattan, New York City houses many Federal government agencies, and, at over 41 stories, is the tallest federal building in the United States. It was built in 1963-69 and was designed by Alfred Easton Poor and Kahn & Jacobs, with Eggers & Higgins as associate architects.", + "vector": [ + 0.02560940943658352, + -0.013634005561470985, + -0.015596937388181686, + 0.0291244275867939, + -0.015049141831696033, + 0.01211235299706459, + 0.02559419348835945, + 0.023113900795578957, + -0.06902215629816055, + 0.05900967866182327, + -0.010438535362482071, + -0.019674966111779213, + 0.016814259812235832, + -0.01946193352341652, + -0.00637191953137517, + 0.017453353852033615, + -0.041084613651037216, + -0.006200733594596386, + -0.009167955256998539, + 0.0019952666480094194, + -0.034358911216259, + -0.006832219194620848, + 0.0005582562298513949, + -0.007760427426546812, + 0.013086210936307907, + -0.004294863902032375, + 0.04385402053594589, + -0.017468569800257683, + -0.021166184917092323, + 0.02859184890985489, + 0.020024945959448814, + 0.04668429493904114, + 0.033932849764823914, + -0.007478921674191952, + 0.035302337259054184, + 0.03694571927189827, + 0.04391488805413246, + -0.02512248046696186, + 0.05015366151928902, + -0.04485831409692764, + -5.462494300445542e-05, + 0.011404784396290779, + -0.014531780034303665, + 0.004306276328861713, + 0.031224306672811508, + -0.026233287528157234, + 0.006539301015436649, + 0.0015815674560144544, + -0.050092797726392746, + 0.0834474191069603, + 0.006227362435311079, + -0.029611356556415558, + 0.016692526638507843, + 0.010773299261927605, + 0.0013828015653416514, + -0.008566902950406075, + 0.008795150555670261, + 0.09823787957429886, + -0.005976289976388216, + 0.07023947685956955, + 0.021044453606009483, + -0.021440083160996437, + -0.028394034132361412, + 0.00021909417409915477, + 0.023600827902555466, + 0.10529834777116776, + -0.0015092890243977308, + 0.027602775022387505, + -0.027785371989011765, + 0.003670986508950591, + 0.03155907243490219, + 0.03114822506904602, + -0.005839340854436159, + 0.008224531076848507, + 0.029017910361289978, + -0.028926612809300423, + 0.05949660763144493, + 0.005143185146152973, + 0.01658601127564907, + 0.00607139291241765, + 0.07096986472606659, + -0.030935192480683327, + -0.030691727995872498, + 0.0067827655002474785, + -0.018457643687725067, + -0.002575396792963147, + -0.08229096233844757, + -0.04930153861641884, + 0.039836861193180084, + -0.00431008031591773, + 0.010248328559100628, + 0.03636749088764191, + -0.0139307277277112, + -0.027252795174717903, + 0.01952280104160309, + 0.015338256023824215, + 0.020542306825518608, + -0.011511300690472126, + -0.000816937128547579, + 0.0009595920564606786, + -0.004926349502056837, + 0.03527190163731575, + -0.027587557211518288, + -0.01390029489994049, + 0.003303887788206339, + -0.0001974581682588905, + -0.033263321965932846, + 0.0007375258719548583, + 0.027404960244894028, + 0.022703053429722786, + -0.016844691708683968, + -0.030235232785344124, + -0.01605343259871006, + -0.016570795327425003, + -0.02017711102962494, + 0.041571542620658875, + 0.023250848054885864, + 0.007726190146058798, + 0.018305478617548943, + 0.008848409168422222, + 0.009000574238598347, + -0.023585611954331398, + 0.03612402826547623, + 0.00017926967120729387, + -0.028835313394665718, + 0.003925863187760115, + 0.04074985161423683, + 0.06034873425960541, + 0.00411606952548027, + 0.0006428981432691216, + -0.06211385130882263, + 0.01789463311433792, + 0.031224306672811508, + -0.07297845184803009, + -0.0003792243078351021, + -0.016327330842614174, + 0.022063959389925003, + 0.009624451398849487, + -0.0375848151743412, + 0.036489225924015045, + -0.011092846281826496, + 0.007022425998002291, + -0.03706745430827141, + 0.00040252460166811943, + 0.05191877856850624, + -0.054505590349435806, + 0.002908258233219385, + 0.02344866283237934, + -0.005550227127969265, + -0.007452292833477259, + -0.0024859996046870947, + 0.014699161984026432, + 0.020557524636387825, + -0.022368289530277252, + 0.074987031519413, + -0.0030375986825674772, + 0.02124226838350296, + 0.006227362435311079, + -0.01701207458972931, + 0.03301985561847687, + -0.028181001543998718, + -0.026583267375826836, + 0.04196717217564583, + -0.019203253090381622, + 0.0017508512828499079, + -0.011184144765138626, + 0.01381660345941782, + 0.004743751138448715, + 0.023707345128059387, + 0.0023014992475509644, + 0.012896004132926464, + -0.010438535362482071, + -0.007642499171197414, + -0.0316503681242466, + -0.011541733518242836, + -0.03807174414396286, + 0.02238350734114647, + 0.020983586087822914, + 0.014858935959637165, + -0.022474806755781174, + 0.036610957235097885, + 0.02649196796119213, + 0.011944971047341824, + 0.04321492835879326, + -0.03241119533777237, + 0.0009548368980176747, + 0.0037965227384120226, + -0.010484185069799423, + 0.03253292664885521, + -0.04516264423727989, + -0.03855867311358452, + 0.026339802891016006, + 0.031832966953516006, + 0.014744811691343784, + 0.02005537785589695, + -0.07523049414157867, + 0.05061015859246254, + -0.005177422426640987, + -0.05657503753900528, + -0.022657403722405434, + 0.026400668546557426, + 0.030813461169600487, + -0.05143184959888458, + 0.00431008031591773, + 0.03090476058423519, + 0.03466324135661125, + 0.05322740226984024, + -0.044188786298036575, + -0.006136063486337662, + -0.005633918102830648, + -0.05873578414320946, + 0.012089528143405914, + 0.0036139243748039007, + -0.018122879788279533, + -0.012454724870622158, + 0.01515565812587738, + -0.0204053595662117, + -0.004275843035429716, + 0.007330560591071844, + 0.0007513158489018679, + 0.013945944607257843, + 0.017514219507575035, + -0.021820494905114174, + -0.002116998890414834, + 0.024863800033926964, + -0.017803333699703217, + 0.04190630838274956, + 0.011922146193683147, + -0.022155258804559708, + 0.024452954530715942, + -0.015581720508635044, + -0.026841947808861732, + -0.010735257528722286, + 0.046927761286497116, + 0.030478697270154953, + 0.008795150555670261, + 0.011397176422178745, + -0.04370185732841492, + -0.011374351568520069, + 0.008467995561659336, + 0.061444323509931564, + 0.00732675613835454, + -0.07523049414157867, + 0.013892685994505882, + -0.029109209775924683, + 0.015718668699264526, + -0.03676312044262886, + 0.009951606392860413, + -0.02112053520977497, + -0.016920775175094604, + 0.03831520676612854, + 0.015855617821216583, + 0.05216224491596222, + 0.02710063010454178, + 0.07845639437437057, + 0.01576431840658188, + -0.04501047730445862, + -0.028683148324489594, + -0.002482195384800434, + -0.0446452796459198, + -0.04309319704771042, + 0.05420126020908356, + 0.00031550510902889073, + -0.018640242516994476, + -0.0006752332556061447, + -0.022596538066864014, + -0.004675277043133974, + -0.009609234519302845, + 0.0074028391391038895, + 0.020024945959448814, + -0.005850753281265497, + 0.011792805977165699, + 0.02853098325431347, + 0.04838854447007179, + -0.024681201204657555, + 0.028744013980031013, + -0.01880762353539467, + 0.04893634095788002, + 0.002788427984341979, + -0.003100366797298193, + -0.005550227127969265, + -0.0030547170899808407, + 0.030600430443882942, + 0.012340600602328777, + -0.009350554086267948, + 0.019614098593592644, + 0.052010077983140945, + 0.008247355930507183, + 0.03782827779650688, + -0.03734134882688522, + -0.006383331958204508, + 0.0119677959010005, + 0.04318449646234512, + 0.00735338544473052, + -0.011267836205661297, + -0.01345140766352415, + 0.013763345777988434, + -0.020085811614990234, + 0.012097136117517948, + -0.01390029489994049, + -0.010453752242028713, + 0.020131461322307587, + -0.009236429817974567, + -0.014470914378762245, + 0.005858361721038818, + -0.012211260385811329, + -0.02249002270400524, + 0.0510970875620842, + 0.03624575957655907, + -0.044675715267658234, + 0.04354969039559364, + -0.0004179788811597973, + -0.00693493103608489, + -0.002025699708610773, + 0.0271614957600832, + 0.016327330842614174, + 0.05657503753900528, + -0.003585393540561199, + 0.026826731860637665, + -0.05295350402593613, + -0.017407704144716263, + 0.02411819063127041, + -0.022368289530277252, + 0.03055478073656559, + 0.023676911368966103, + -0.05931400880217552, + 0.03298942372202873, + -0.02148573100566864, + -0.03658052533864975, + 0.003884017700329423, + 0.018427209928631783, + -0.027526691555976868, + 0.009632059372961521, + 0.002073251409456134, + 0.01456221379339695, + -0.021287916228175163, + -0.022094393149018288, + 0.026461536064743996, + -0.025974607095122337, + 0.02869836427271366, + 0.03508930280804634, + 0.02387472614645958, + 0.013535098172724247, + -0.01628168113529682, + -0.03155907243490219, + 0.01473720371723175, + 0.038832567632198334, + 0.017149021849036217, + 0.03533276915550232, + -0.030585212633013725, + 0.0007028132095001638, + -0.0031536247115582228, + -0.04601476714015007, + -0.008369088172912598, + 0.0074294679798185825, + 0.002288184827193618, + 0.00023335966398008168, + -0.055662043392658234, + 0.04382358863949776, + 0.04230193793773651, + 0.06750050187110901, + 0.033263321965932846, + -0.012728622183203697, + 0.04625823348760605, + -0.03445021063089371, + 0.019081521779298782, + -0.01053744275122881, + -0.011815630830824375, + -0.012317775748670101, + 0.05106665566563606, + -0.05267960578203201, + -0.02142486535012722, + 0.01641863025724888, + 0.04662343114614487, + -0.015977350994944572, + -0.01874675787985325, + -0.006676250137388706, + -0.004614410921931267, + -0.020755339413881302, + -0.009708141908049583, + -0.04510177671909332, + -0.06634404510259628, + 0.04351925849914551, + 0.04814508184790611, + 0.03861953690648079, + -0.04245410114526749, + 0.014935018494725227, + -0.01148847583681345, + -0.019127171486616135, + -0.035119738429784775, + -0.026339802891016006, + 0.004888308234512806, + 0.013055777177214622, + 0.0008240698953159153, + 0.0065164766274392605, + -0.021227050572633743, + 0.0041122655384242535, + -0.003866899060085416, + 0.02089228667318821, + 0.006079001352190971, + -0.010948289185762405, + 0.053683895617723465, + -0.018335910513997078, + 0.029580922797322273, + 0.007030033972114325, + -0.06780482828617096, + -0.0054551237262785435, + 0.010575484484434128, + 0.006527888588607311, + 0.028074486181139946, + -0.03049391321837902, + -0.06701356917619705, + -0.0005159352440387011, + -0.010491793043911457, + 0.03359808400273323, + -0.018701108172535896, + 0.02489423379302025, + -0.012972086668014526, + 0.02667456679046154, + 0.025442028418183327, + 0.047353822737932205, + 0.004340513609349728, + -0.03256336227059364, + 0.00025511454441584647, + -0.003319104202091694, + 0.03682398796081543, + 0.03222859650850296, + 0.008194098249077797, + -0.02350953035056591, + 0.003788914531469345, + 0.009594018571078777, + 0.0524057075381279, + -0.01580996811389923, + 0.018335910513997078, + 0.038589105010032654, + 0.01772725023329258, + 0.03621532768011093, + 0.009015790186822414, + 0.022231342270970345, + -0.002145529957488179, + 0.048540711402893066, + 0.035576231777668, + 0.002219710499048233, + 0.015596937388181686, + -0.04625823348760605, + 0.02471163496375084, + -0.03581969812512398, + -0.0093962037935853, + 0.011526516638696194, + 0.0014902682742103934, + 0.024848584085702896, + -0.02452903613448143, + -0.06756136566400528, + -0.03962382674217224, + 0.0705438032746315, + 0.05018409714102745, + 0.016205597668886185, + -0.013109035789966583, + -0.046927761286497116, + -0.02507683075964451, + -0.02780058979988098, + -0.030569996684789658, + -0.00014515136717818677, + -0.10669826716184616, + 0.010628742165863514, + -0.0027751135639846325, + 0.02452903613448143, + -0.001273432862944901, + 0.0016795238479971886, + -0.029991768300533295, + -0.006463218480348587, + 0.040202055126428604, + -0.059161845594644547, + 0.01507196668535471, + -0.016570795327425003, + -0.029611356556415558, + -0.0009006279869936407, + -0.05526641383767128, + 0.024513820186257362, + -0.0007204072899185121, + -0.0017204182222485542, + 0.02291608601808548, + -0.006866456475108862, + -0.03210686519742012, + 0.01873154193162918, + 0.011747156269848347, + -0.055175114423036575, + -0.01964453235268593, + -0.039958592504262924, + 0.050762325525283813, + 0.0866733193397522, + 0.03770654648542404, + 0.015855617821216583, + -0.035484932363033295, + 0.02548767812550068, + 0.0004324821347836405, + -0.01952280104160309, + -0.015718668699264526, + -0.04802335053682327, + -0.006067588925361633, + -0.016814259812235832, + 0.010605917312204838, + 0.01660122722387314, + -0.01964453235268593, + -0.0204053595662117, + -0.008665810339152813, + 0.02565505914390087, + 0.00264196889474988, + -0.037919577211141586, + -0.025761574506759644, + 0.023707345128059387, + -0.02936789207160473, + -0.022185692563652992, + -0.03734134882688522, + -0.06774396449327469, + -0.046106066554784775, + -0.0065735382959246635, + -0.004686689469963312, + 0.0021512361709028482, + -0.032624226063489914, + 0.015094791539013386, + 0.021927010267972946, + -0.006622991990298033, + -0.023783426731824875, + 0.03639792650938034, + -0.014417656697332859, + -0.009472286328673363, + -0.011868888512253761, + 0.022292207926511765, + -0.015657803043723106, + -0.01903587207198143, + -0.024011675268411636, + 0.00862016063183546, + -0.019553232938051224, + 0.01719467155635357, + 0.015163266099989414, + 0.009867915883660316, + -0.03752394765615463, + -0.007052858825773001, + -0.04720165580511093, + 0.036915287375450134, + -0.017468569800257683, + 0.006733311805874109, + -0.0317416675388813, + -0.020694471895694733, + -0.02411819063127041, + 0.041754141449928284, + 0.009023399092257023, + -0.013101426884531975, + -0.0016852300614118576, + 0.04035422205924988, + 0.005489361006766558, + -0.003642455441877246, + 0.009061439894139767, + 0.041449811309576035, + 0.007935416884720325, + 0.04339752718806267, + -0.0021569423843175173, + 0.038467373698949814, + 0.010126596316695213, + 0.017757683992385864, + 0.018275044858455658, + -0.04701906070113182, + 0.018518509343266487, + -0.0033495372626930475, + -0.001213517738506198, + 0.0076843444257974625, + 0.02728322707116604, + -0.07334364205598831, + 0.018640242516994476, + 0.018275044858455658, + -0.004043791443109512, + 0.01121457852423191, + 0.04038465395569801, + 0.018761973828077316, + 0.013634005561470985, + -0.02309868298470974, + -0.038102176040410995, + -0.012584065087139606, + -0.00640235235914588, + 0.02734409272670746, + 0.019020654261112213, + -0.009145131334662437, + 0.02524421364068985, + 0.017316404730081558, + 0.02058795653283596, + -0.012485157698392868, + -0.041449811309576035, + 0.0033894807565957308, + 0.007779447827488184, + 0.02643110230565071, + 0.022124825045466423, + 0.0226269718259573, + -0.03527190163731575, + -0.00791259203106165, + 0.012393859215080738, + -0.028972262516617775, + -0.03633705899119377, + -0.0017223203321918845, + 0.002584906993433833, + 0.014037243090569973, + 0.009358162060379982, + -0.009601626545190811, + -0.005892599001526833, + -0.01605343259871006, + 0.01987278088927269, + 0.0401107557117939, + -0.03247206285595894, + -0.010042905807495117, + -0.01088742259889841, + 0.03718918561935425, + 0.013808995485305786, + 0.020633606240153313, + -0.035424068570137024, + -0.038406506180763245, + -0.023798642680048943, + -0.01062113419175148, + -0.005884990561753511, + -0.03283726051449776, + -0.02953527309000492, + -0.02017711102962494, + -0.015627369284629822, + 0.015231740660965443, + 0.019857563078403473, + 0.017225105315446854, + 0.014881760813295841, + 0.03274596109986305, + 0.027907105162739754, + 0.014197017066180706, + -0.0027865259908139706, + -0.020724905654788017, + 0.0034085013903677464, + -0.0037147339899092913, + -0.0342676118016243, + -0.028683148324489594, + 0.003594903741031885, + 0.01860980875790119, + -0.021257484331727028, + 0.01628168113529682, + -0.003621532814577222, + -0.010126596316695213, + 0.047049492597579956, + -0.01766638457775116, + 0.03770654648542404, + -0.018929356709122658, + -0.020085811614990234, + 0.002347148722037673, + 0.004720926750451326, + 0.028667930513620377, + 0.04345839098095894, + 0.019842347130179405, + 0.004089440684765577, + 0.0005829830770380795, + -0.0051888348534703255, + -0.0003571127890609205, + 0.007262086030095816, + -0.016083866357803345, + -0.0004346219648141414, + -0.00928207952529192, + 0.014387223869562149, + -0.006493651773780584, + 0.01964453235268593, + -0.03037218190729618, + -0.010210287757217884, + -0.016753392294049263, + -0.032502494752407074, + 0.002434643916785717, + 0.02475728467106819, + -0.01689034141600132, + -0.007345777004957199, + -0.00020589858468156308, + -0.00598389795050025, + 0.017027290537953377, + 0.024559469893574715, + -0.005569247994571924, + 0.008156056515872478, + 0.00607139291241765, + -0.03402414917945862, + 0.0005687176017090678, + 0.01689034141600132, + -0.0036500636488199234, + -0.00817127339541912, + 0.010187462903559208, + -0.008673418313264847, + -0.022033527493476868, + -0.021577030420303345, + 0.007178395055234432, + -0.011785198003053665, + 0.007756622973829508, + 0.01856415905058384, + 0.00023847146076150239, + 0.03323289006948471, + -0.014372006990015507, + -0.010605917312204838, + -0.0029367890674620867, + 0.01406006794422865, + 0.08904709666967392, + 0.008049541153013706, + -0.03228946402668953, + 0.0038992343470454216, + -0.0032867691479623318, + 0.01127544417977333, + -0.0013314458774402738, + 0.0004465098900254816, + -0.015163266099989414, + 0.01832069456577301, + -0.006170300301164389, + 0.008156056515872478, + 0.008376696147024632, + 0.0020123852882534266, + 0.03588056191802025, + -0.014158975332975388, + 0.01629689708352089, + -0.02507683075964451, + -0.02242915704846382, + -0.003728048410266638, + 0.014197017066180706, + -0.03998902440071106, + 0.029915686696767807, + -0.02250523865222931, + 0.06293554604053497, + -0.019355418160557747, + -0.04939283803105354, + -0.02804405428469181, + 0.01795549876987934, + 0.0076653240248560905, + -0.012926436960697174, + -0.0226269718259573, + -0.01825982891023159, + 0.026537617668509483, + 0.029733087867498398, + 0.04558870568871498, + -0.007380014285445213, + 0.022124825045466423, + -0.007764231413602829, + 0.04062812030315399, + 0.0008877890650182962, + -0.01707294024527073, + 0.027481041848659515, + -0.05319696664810181, + 0.05258830636739731, + -0.03038739785552025, + -0.0725523829460144, + -0.011716723442077637, + 0.025578977540135384, + 0.02255088835954666, + 0.03922819718718529, + 0.02124226838350296, + -0.02195744402706623, + 0.02553332783281803, + -0.0011583579471334815, + 0.029885252937674522, + 0.036550089716911316, + -0.007049054838716984, + 0.018838057294487953, + 0.033385053277015686, + 0.012135177850723267, + -0.06890042126178741, + 0.012972086668014526, + 0.02553332783281803, + -0.04969716817140579, + 0.019538016989827156, + -0.019248902797698975, + 0.03938036412000656, + -0.022961733862757683, + -0.03402414917945862, + 0.03712831810116768, + -0.025944173336029053, + -0.007064271252602339, + 0.006292032543569803, + 0.01956845074892044, + -0.0065583218820393085, + 0.021211834624409676, + -0.004561153240501881, + -0.02959613874554634, + 9.040754957823083e-05, + -0.005957269109785557, + 0.01364161353558302, + 0.023905159905552864, + 0.008338655345141888, + 0.006257795728743076, + -0.04105418175458908, + -0.005458928178995848, + -0.002487901598215103, + 0.004663864616304636, + 0.0043329051695764065, + 0.021409649401903152, + -0.012378642335534096, + 0.010788515210151672, + 0.056483738124370575, + 0.014630687423050404, + 0.011655857786536217, + 0.0021189008839428425, + -0.008612552657723427, + 0.00771477771922946, + -0.0395020954310894, + 0.04488874599337578, + 0.011085237376391888, + 0.03292855620384216, + -0.035119738429784775, + 0.005968681536614895, + 0.01074286550283432, + 0.05210137739777565, + 0.007943025790154934, + -0.03639792650938034, + -0.003212588606402278, + 0.006702878978103399, + 0.035180602222681046, + -0.03575883060693741, + 0.009031007066369057, + -0.008711460046470165, + -0.0330502912402153, + 0.03928906470537186, + 0.03359808400273323, + -0.011328701861202717, + 0.017164239659905434, + -0.0038193475920706987, + -0.02189657837152481, + 0.0037223421968519688, + 0.002208298072218895, + -0.010271153412759304, + 0.058279287070035934, + 0.05663590133190155, + 0.02334214746952057, + 0.007524570915848017, + 0.014455697499215603, + 0.005211659241467714, + -0.009943998418748379, + 0.0035093107726424932, + -0.005044277757406235, + -0.03317202255129814, + -0.01927933655679226, + -0.023981241509318352, + -0.01952280104160309, + -0.009685317985713482, + -0.017407704144716263, + 0.013497056439518929, + 0.05992267280817032, + 0.007376209832727909, + 0.020101027563214302, + -0.023920375853776932, + 0.02757234126329422, + 0.003986729308962822, + 0.007243065629154444, + 0.0023870922159403563, + -0.0027199536561965942, + 0.019142387434840202, + -0.053501296788454056, + -0.031954701989889145, + 0.027191927656531334, + 0.023479096591472626, + 0.00841473788022995, + 0.013732912950217724, + 0.003326712641865015, + 0.012119960971176624, + 0.005158401560038328, + -0.052497006952762604, + 0.0032163928262889385, + 0.011206969618797302, + 0.008604944683611393, + 0.013291633687913418, + 0.0027960361912846565, + 0.02734409272670746, + 0.02673543244600296, + -0.0005844096303917468, + 0.012294951826334, + 0.025700708851218224, + -0.028744013980031013, + 0.015977350994944572, + 0.021455299109220505, + 0.041145481169223785, + -0.0017955498769879341, + 0.049331970512866974, + -0.05806625634431839, + -0.008148448541760445, + 0.02279435284435749, + -0.02130313403904438, + 0.027907105162739754, + 0.0056757633574306965, + -0.005592072382569313, + -0.006098022218793631, + 0.03308072313666344, + 0.007866943255066872, + -0.012759055010974407, + -0.015148049220442772, + 0.009350554086267948, + 0.002037112135440111, + 0.021105319261550903, + -0.0033894807565957308, + -0.022033527493476868, + -0.009335337206721306, + 0.0408107191324234, + -0.007756622973829508, + -0.015498029999434948, + -0.013314458541572094, + 0.014052459970116615, + -0.01909673772752285, + -0.0006253040046431124, + 0.019659748300909996, + 0.020618390291929245, + 0.00852886214852333, + -0.0013656830415129662, + 0.01754465140402317, + -0.002021895721554756, + -0.017635950818657875, + -0.002390896435827017, + 0.0329589918255806, + -0.012119960971176624, + 0.01428831648081541, + 0.024985533207654953, + 0.032015565782785416, + -0.009548368863761425, + 0.01623603142797947, + -0.019248902797698975, + -0.044919177889823914, + 0.0162208154797554, + 0.004907329101115465, + -0.02338779717683792, + 0.01772725023329258, + 0.020101027563214302, + 0.00195532338693738, + 0.004507895093411207, + 0.01193736307322979, + 0.006303444970399141, + 0.0054551237262785435, + -0.02757234126329422, + -0.021942228078842163, + 0.0607747957110405, + 0.006166496314108372, + 0.028439683839678764, + -0.028317950665950775, + -0.04123678058385849, + 0.008216923102736473, + -0.06323987245559692, + -0.016799042001366615, + 0.03222859650850296, + -0.03728048503398895, + -0.01399159338325262, + 0.046166934072971344, + 0.0197510477155447, + 0.023479096591472626, + 0.05003193020820618, + 0.008506037294864655, + -0.039532531052827835, + 0.0011631130473688245, + 0.02338779717683792, + 0.010590700432658195, + 0.018366344273090363, + -0.00413509039208293, + 0.025152914226055145, + 0.026050688698887825, + 0.0038478784263134003, + 0.012431900016963482, + 0.017514219507575035, + -0.01628168113529682, + 0.03091997653245926, + -0.005763258319348097, + 0.04452354833483696, + -0.02793753892183304, + -0.04348882660269737, + 0.0003395186795387417, + -0.035424068570137024, + 0.022824786603450775, + 0.006432785652577877, + 0.010735257528722286, + 0.014744811691343784, + 0.016205597668886185, + -0.027131062000989914, + -0.0008854115149006248, + 0.022520454600453377, + 0.001154553727246821, + -0.023357363417744637, + 0.03761524707078934, + -0.004903524648398161, + -0.02107488550245762, + -0.05204051360487938, + 0.04637996479868889, + 0.0045953900553286076, + -0.011769981123507023, + -0.019659748300909996, + 0.004720926750451326, + 0.01850329339504242, + -0.0034237178042531013, + 0.011587383225560188, + -0.011731940321624279, + 0.007874551229178905, + 0.028211435303092003, + -0.025228997692465782, + -0.0362761914730072, + 0.04047595337033272, + 0.009274471551179886, + -0.0162208154797554, + 0.047353822737932205, + -0.03323289006948471, + -0.014151367358863354, + -0.05167531594634056, + -0.004408987704664469, + -0.013808995485305786, + 0.002411819063127041, + -0.043367091566324234, + 0.033567652106285095, + -0.03998902440071106, + -0.073769710958004, + -0.02249002270400524, + 0.030935192480683327, + -0.008985357359051704, + -0.03776741400361061, + 0.04671472683548927, + -0.007943025790154934, + -0.025807224214076996, + -0.027435392141342163, + 0.011450434103608131, + 0.019674966111779213, + -0.010286370292305946, + -0.031254738569259644, + 3.0091270673437975e-05, + 0.025883307680487633, + 0.03014393337070942, + 0.016981640830636024, + -0.013055777177214622, + 0.010963505133986473, + 0.006851240061223507, + 0.0047475555911660194, + -0.007585437037050724, + -0.011754765175282955, + 0.011815630830824375, + -0.025381162762641907, + 0.03317202255129814, + -0.0016833279514685273, + -0.013938335701823235, + 0.05115795508027077, + -0.014760028570890427, + 0.0011507496237754822, + -0.009479894302785397, + -0.06211385130882263, + 0.004899720661342144, + -0.008536470122635365, + 0.06050090119242668, + -0.012013445608317852, + 0.013679655268788338, + 0.004291059914976358, + 0.013976377435028553, + -0.019111953675746918, + -0.011556950397789478, + -0.010917856357991695, + 0.015977350994944572, + 0.004614410921931267, + 0.022398723289370537, + -0.010362452827394009, + -0.0033000835683196783, + -0.0018098152941092849, + 0.01313186064362526, + 0.0329589918255806, + 0.04817551374435425, + -0.0210140198469162, + 0.021927010267972946, + -0.03676312044262886, + 0.01897500455379486, + 0.041449811309576035, + 0.024574685841798782, + 0.020740121603012085, + -0.02124226838350296, + 0.011944971047341824, + -5.655672794091515e-05, + -0.014927409589290619, + -0.011944971047341824, + -0.026005038991570473, + 0.021394433453679085, + 0.020314060151576996, + 0.029017910361289978, + -0.01095589715987444, + 0.019309768453240395, + 0.014067676849663258, + -0.01670774258673191, + 0.010332019999623299, + -0.00534099992364645, + -0.014607863500714302, + -0.01065156701952219, + -0.035058870911598206, + -0.043062761425971985, + 0.017285970970988274, + 0.02416384033858776, + 0.0009386693127453327, + 0.011435218155384064, + 0.017514219507575035, + -0.00645941449329257, + -0.016981640830636024, + 0.052070945501327515, + -0.031041709706187248, + -0.010773299261927605, + -0.013649222441017628, + 0.030767811462283134, + -0.0011364840902388096, + 0.0484798438847065, + -0.018229395151138306, + -0.039836861193180084, + -0.02256610430777073, + 0.05073188990354538, + -0.03956296294927597, + 0.023646477609872818, + 0.03055478073656559, + -0.038102176040410995, + -0.015886051580309868, + 0.0388021357357502, + 0.0194010678678751, + 0.00495297834277153, + -0.027770156040787697, + 0.010210287757217884, + 0.03222859650850296, + 0.006836023181676865, + -0.045862603932619095, + 0.032502494752407074, + 0.002991948975250125, + 0.03676312044262886, + 0.005458928178995848, + -0.0034750737249851227, + -0.003123191650956869, + -0.020572740584611893, + 0.029398323968052864, + -0.023768210783600807, + -0.019964080303907394, + -0.033932849764823914, + -0.04397575557231903, + 0.002815056825056672, + 0.006874064914882183, + 0.023722561076283455, + -0.015315431170165539, + -0.005226876121014357, + 0.036884855479002, + 0.030889544636011124, + 0.0014465207932516932, + -0.001219223951920867, + 0.001510240021161735, + 0.006059980485588312, + 0.0011726233642548323, + -0.010750474408268929, + 0.0018079133005812764, + -0.00984509103000164, + 0.0069653638638556, + 0.005131772719323635, + -0.011610208079218864, + 0.00788215920329094, + -0.01658601127564907, + -0.020664039999246597, + 0.04519307613372803, + -0.028378818184137344, + 0.02326606586575508, + 0.017742466181516647, + -0.026705000549554825, + 0.005508381873369217, + -0.00948750227689743, + 0.014402439817786217, + 0.025411594659090042, + 0.03158950433135033, + -0.04589303582906723, + -0.003359047695994377, + 0.011960187926888466, + -0.01462307944893837, + -0.005299154669046402, + 0.04415835440158844, + -0.02792232111096382, + -0.018062014132738113, + -0.004119873978197575, + 0.0197510477155447, + 0.027237577363848686, + 0.006299640983343124, + 0.011914538219571114, + -0.016692526638507843, + 0.007889768108725548, + 0.039471663534641266, + 0.011625424027442932, + -0.012599281966686249, + -0.022870436310768127, + -0.011678681708872318, + -0.04653213173151016, + -0.02238350734114647, + -0.03922819718718529, + -0.006999601144343615, + 0.038710836321115494, + -0.002664793748408556, + -0.007109920959919691, + -0.022703053429722786, + -0.009160347282886505, + 0.010818948969244957, + -0.0009129914687946439, + -0.00087067048298195, + -0.016129516065120697, + 0.009350554086267948, + -0.005668155383318663, + 0.0015539875021204352, + 0.020877070724964142, + -0.0035112129990011454, + -0.012378642335534096, + 0.013770954683423042, + -0.019172819331288338, + -0.017757683992385864, + -0.008003891445696354, + -0.005858361721038818, + 0.01711858995258808, + 0.032502494752407074, + 0.003771795891225338, + -0.010697216726839542, + -0.012850354425609112, + 0.04762772098183632, + 0.0011536027304828167, + -0.033871982246637344, + -0.0039030383341014385, + -0.0013000618200749159, + -0.024589903652668, + -0.006455610506236553, + -0.005626309663057327, + 0.017985930666327477, + -0.02953527309000492, + -0.01860980875790119, + -0.025563759729266167, + 0.004945370368659496, + 0.00799628347158432, + 0.002567788353189826, + 0.023311715573072433, + 0.00862016063183546, + 0.00015192748105619103, + 0.002316715894266963, + 0.015612153336405754, + 0.015117616392672062, + -0.038528237491846085, + 0.0037756001111119986, + 0.004907329101115465, + -0.02524421364068985, + 0.006759940646588802, + 0.001090834615752101, + 0.00102140917442739, + -0.06463979184627533, + 0.03721961751580238, + -0.02501596510410309, + -0.02948962338268757, + -0.012485157698392868, + -0.004287255462259054, + 0.007486529648303986, + 0.008148448541760445, + -0.010636350139975548, + 0.03740221634507179, + 0.0291244275867939, + -0.0005102290888316929, + 0.014006810262799263, + 0.005964877549558878, + 0.016722960397601128, + 0.01927933655679226, + 0.053501296788454056, + 0.009525544010102749, + 0.010902639478445053, + -0.006417568773031235, + -0.007688148878514767, + -0.00827018078416586, + 0.00897774938493967, + 0.03585013002157211, + 0.0003668608842417598, + -0.03332418575882912, + 0.0063528986647725105, + -0.019294552505016327, + -0.007166982628405094, + 0.0204053595662117, + 0.007341973017901182, + 0.01611429825425148, + -0.015946917235851288, + -0.0021360195241868496, + -0.02799840457737446, + -0.018244612962007523, + -0.019948862493038177, + 0.0026571855414658785, + -0.02112053520977497, + -0.03280682489275932, + 0.0027066392358392477, + -0.00047789394739083946, + 0.01868589222431183, + -0.018761973828077316, + 0.016555577516555786, + -0.01297969464212656, + -0.005557835567742586, + -0.001552085392177105, + -0.009274471551179886, + 0.021196618676185608, + -1.876803617051337e-05, + -0.02189657837152481, + -0.0014379614731296897, + -0.0022063960786908865, + 0.005078515037894249, + 0.0063262698240578175, + -0.015612153336405754, + 0.03472410887479782, + 0.003925863187760115, + 0.017803333699703217, + 0.019203253090381622, + -0.014927409589290619, + -0.030661296099424362, + 0.00833104643970728, + -0.01915760338306427, + 0.017316404730081558, + -0.01868589222431183, + -0.010933072306215763, + 0.018214179202914238, + 0.018883707001805305, + -0.019735831767320633, + -0.05992267280817032, + -0.022748703137040138, + -0.025457244366407394, + -0.0204053595662117, + -0.0090690478682518, + 0.004157915245741606, + -0.0242855716496706, + -0.016570795327425003, + -0.036610957235097885, + 0.019538016989827156, + 0.006505064200609922, + -0.005961073096841574, + 0.008483212441205978, + -0.042819298803806305, + -0.0007798468577675521, + -0.0158251840621233, + -0.017164239659905434, + -0.017270755022764206, + -0.005755650345236063, + -0.006550713442265987, + -0.016966424882411957, + -0.0004431812558323145, + -0.018716324120759964, + -0.019127171486616135, + -0.008894057944417, + 0.03992816060781479, + 0.009449461475014687, + 0.013504665344953537, + 0.010286370292305946, + 0.02734409272670746, + -0.0004251116479281336, + -0.0015073869144544005, + -0.018122879788279533, + -0.010773299261927605, + 0.01587083376944065, + 0.01803158037364483, + -0.012614498846232891, + -0.024559469893574715, + -0.008521253243088722, + -0.017529435455799103, + -0.00016060566122177988, + 0.05742716044187546, + -0.0001818850141717121, + 0.0038497806526720524, + 0.00699579669162631, + 0.0016899851616472006, + 0.01576431840658188, + -0.00963966827839613, + -0.007836509495973587, + 0.0014018223155289888, + 0.0033780683297663927, + -0.02083142101764679, + 0.00043390868813730776, + -0.006817002780735493, + 0.004294863902032375, + 0.027526691555976868, + 0.019598882645368576, + 0.0005525500164367259, + 0.023083467036485672, + -0.014508955180644989, + 0.015855617821216583, + -0.017590301111340523, + 0.003277258947491646, + -0.03158950433135033, + 0.014478522352874279, + -0.03198513388633728, + -0.0029253766406327486, + 0.01157977432012558, + 0.05271003767848015, + -0.001397067098878324, + -0.023798642680048943, + 0.005786083173006773, + -0.02489423379302025, + 0.016099082306027412, + 0.0071974159218370914, + -0.006702878978103399, + 0.00820170622318983, + 0.017316404730081558, + -0.02046622522175312, + 0.013740520924329758, + -0.007094704546034336, + -0.009708141908049583, + 0.05161444842815399, + -0.004066615831106901, + 0.04172370955348015, + 0.008703852072358131, + 0.017392486333847046, + 0.0033057897817343473, + -0.025518110021948814, + -0.030448265373706818, + -0.010126596316695213, + -0.022231342270970345, + 0.003456053091213107, + -0.0028892375994473696, + -0.025822442024946213, + 0.011146103963255882, + -0.023205198347568512, + 0.007128941360861063, + 0.019918430596590042, + -0.0223226398229599, + 0.007768035400658846, + -0.010339627973735332, + 0.014820894226431847, + 0.04190630838274956, + 0.011328701861202717, + -0.004736143164336681, + 0.015452380292117596, + -0.0065469094552099705, + -0.02107488550245762, + 0.0051888348534703255, + -0.007284910883754492, + -0.01381660345941782, + -0.01623603142797947, + -0.018168529495596886, + -0.0011098552495241165, + 0.017575085163116455, + -0.021379215642809868, + 0.003313397988677025, + 0.003212588606402278, + -0.000359965895768255, + -0.0002815056941471994, + -0.008741892874240875, + 0.005017648916691542, + 0.005401866044849157, + -0.0317416675388813, + -0.03268509358167648, + 0.01742292009294033, + -0.015733886510133743, + -0.010309195145964622, + 0.0045839776284992695, + -0.00677135307341814, + -0.021516164764761925, + -0.027648424729704857, + -0.026157204061746597, + 0.006661033257842064, + 0.016555577516555786, + -0.008726676926016808, + -0.025944173336029053, + 0.018275044858455658, + -0.002101782476529479, + 0.009122306481003761, + 0.02501596510410309, + -0.028561415150761604, + 0.003406599396839738, + 0.017681600525975227, + 0.010735257528722286, + 0.031193874776363373, + -0.015170874074101448, + 0.02005537785589695, + 0.021287916228175163, + -0.02977873757481575, + -0.011587383225560188, + 0.027465825900435448, + 0.044736579060554504, + 0.006170300301164389, + 0.014356790110468864, + 0.0249398835003376, + 0.0029215726535767317, + 0.009228821843862534, + -0.0020295039284974337, + -0.0038022289518266916, + 0.00205232878215611, + -0.01605343259871006, + 0.021531380712985992, + -0.0453452430665493, + 0.007646303158253431, + 0.021866144612431526, + -0.020390141755342484, + -0.005105143878608942, + 0.02769407443702221, + 0.01666209287941456, + -0.03773697838187218, + 0.028865745291113853, + -0.02113575115799904, + -0.01854894310235977, + -0.017864199355244637, + -0.02017711102962494, + -0.00408563669770956, + -0.0028245672583580017, + 0.005637722089886665, + -0.030220016837120056, + 0.01605343259871006, + 0.026111554354429245, + -0.004154111258685589, + 0.0043291011825203896, + -0.008597335778176785, + -0.012287342920899391, + 0.0275114756077528, + -0.036489225924015045, + -0.007516962941735983, + -0.005432298872619867, + 0.003547352273017168, + 0.014600254595279694, + -0.00862016063183546, + -0.0050252568908035755, + -0.021196618676185608, + 0.011450434103608131, + 0.015300215221941471, + 0.005382845178246498, + 0.02565505914390087, + 0.015733886510133743, + 0.032198164612054825, + 0.0008302516071125865, + 0.009989648126065731, + -0.012462332844734192, + 0.012812313623726368, + -0.018716324120759964, + -0.009502719156444073, + -0.0021531381644308567, + 0.010225503705441952, + -0.025928957387804985, + -0.020572740584611893, + 0.017681600525975227, + 0.0226269718259573, + -0.026887597516179085, + -0.023083467036485672, + -0.01574910245835781, + 0.003963904455304146, + -0.023418230935931206, + -0.002649577334523201, + -0.028744013980031013, + -0.006193125154823065, + 6.99009106028825e-05, + -0.049210239201784134, + 0.013862253166735172, + 0.016859909519553185, + -7.48343882150948e-05, + 0.028896179050207138, + 0.009898348711431026, + 0.020846636965870857, + -0.010027688927948475, + 0.012462332844734192, + -0.0004039511550217867, + 0.0012553632259368896, + ], + "index": 22, + }, + { + "title": "Iron-sulfur protein", + "text": "Iron-sulfur proteins are proteins characterized by the presence of iron-sulfur clusters containing sulfide-linked di-, tri-, and tetrairon centers in variable oxidation states. Iron-sulfur clusters are found in a variety of metalloproteins, such as the ferredoxins, as well as NADH dehydrogenase, hydrogenases, Coenzyme Q - cytochrome c reductase, Succinate - coenzyme Q reductase and nitrogenase.", + "vector": [ + 0.0017397718038409948, + 0.024693535640835762, + -0.027004428207874298, + 0.030134037137031555, + -0.0013097807532176375, + -0.006054538302123547, + 0.012346767820417881, + -0.06491626799106598, + 0.02242225967347622, + 0.030398139730095863, + -0.033567361533641815, + 0.008332417346537113, + 0.04101504012942314, + 0.018632395192980766, + 0.03142813593149185, + 0.025102894753217697, + -0.003322733100503683, + 0.008325815200805664, + -0.018183421343564987, + 0.00779761141166091, + 0.03924555703997612, + -0.002695490838959813, + -0.05551423877477646, + 0.02038867399096489, + 0.0066850814037024975, + -0.012696702964603901, + -0.005047649145126343, + 0.028417373076081276, + -0.10770078748464584, + 0.053639113903045654, + 0.04109426960349083, + -0.010821579024195671, + 0.008517289534211159, + 0.007791008800268173, + -0.01397099532186985, + -0.029869934543967247, + 0.013066445477306843, + -0.005965403746813536, + 0.021511107683181763, + -0.008636134676635265, + -0.027281735092401505, + -0.0438409298658371, + 0.008048508316278458, + 0.01898893341422081, + -0.005737615749239922, + 0.04072452709078789, + -0.019530342891812325, + -0.0038723954930901527, + 0.02565750852227211, + -0.009415236301720142, + 0.005394283216446638, + 0.004935405682772398, + -0.06370139867067337, + 0.021735593676567078, + 0.01867200993001461, + 0.005691397935152054, + -0.01898893341422081, + 0.0768536776304245, + 0.014050225727260113, + -0.01873803697526455, + -0.024733150377869606, + 0.02412571758031845, + -0.028998399153351784, + -0.029896344989538193, + 0.03774017468094826, + -0.0039285169914364815, + -0.032035570591688156, + -0.027730708941817284, + 0.007691970560699701, + -0.007025112863630056, + -0.017509961500763893, + 0.010181131772696972, + 0.0104782460257411, + -0.04106786102056503, + -0.01995290443301201, + 0.05186963081359863, + 0.0007498020422644913, + 0.03253736346960068, + 0.014538814313709736, + -0.05614808201789856, + -0.0106367077678442, + -0.0037535494193434715, + -0.0051499889232218266, + 0.004318067338317633, + -0.009454851038753986, + -0.017179833725094795, + -0.011726127937436104, + -0.03715914860367775, + 0.04584810510277748, + 0.04259965196251869, + 0.006886459421366453, + 0.003697427920997143, + 0.0002812273451127112, + 0.019200215116143227, + 0.04426349326968193, + -0.031401727348566055, + 0.09555210173130035, + 0.03961529955267906, + 0.052107322961091995, + 0.018632395192980766, + -0.03887581452727318, + -0.0311112143099308, + -0.0022234085481613874, + -0.025881994515657425, + 0.0628562718629837, + -0.01152805145829916, + -0.03187711164355278, + 0.020850852131843567, + -0.014657660387456417, + 0.08678391575813293, + -0.001743073109537363, + -0.05519731715321541, + -0.006411075592041016, + 0.002711997367441654, + 0.013944584876298904, + -0.030134037137031555, + -0.003558774245902896, + -0.01397099532186985, + -0.018275856971740723, + 0.06121883913874626, + 0.040803756564855576, + -0.0014979534316807985, + 0.041569653898477554, + 0.03594427928328514, + -0.061324480921030045, + 0.06882497668266296, + 0.026264943182468414, + -0.008616327308118343, + 0.007546714507043362, + 0.006269121076911688, + -0.03222044184803963, + -0.009956644847989082, + 0.052688345313072205, + -0.02623853273689747, + -0.019147394225001335, + 0.005004732869565487, + -0.013125868514180183, + 0.02115456946194172, + 0.016545990481972694, + -0.0039087096229195595, + -0.06391268223524094, + -0.019781239330768585, + -0.020401878282427788, + 0.0451086200773716, + 0.08266392350196838, + 0.005183001514524221, + -0.03779299557209015, + 0.0381099171936512, + 0.01390497013926506, + -0.06697626411914825, + -0.006100756116211414, + 0.023782383650541306, + 0.04629707708954811, + -0.06518036872148514, + 0.030820701271295547, + 0.055725518614053726, + -0.010458438657224178, + -0.004859476815909147, + 0.0168232973664999, + -0.015925349667668343, + 0.003187380963936448, + 0.026278147473931313, + -0.009606709703803062, + 0.008999275043606758, + -0.018711626529693604, + -0.011072475463151932, + -0.009435043670237064, + -0.05300527065992355, + -0.00695248506963253, + -0.0064341844990849495, + 0.009771773591637611, + -0.031586598604917526, + 0.002969496650621295, + -0.030398139730095863, + 0.014723685570061207, + 0.018381498754024506, + 0.0004803354968316853, + 0.0024132318794727325, + 0.05609526112675667, + 0.04310144484043121, + 0.0013956140028312802, + 0.03924555703997612, + -0.020098160952329636, + -0.010418823920190334, + 0.0438409298658371, + 0.04711579531431198, + 0.004651496186852455, + 0.024350203573703766, + 0.008530493825674057, + -0.017193039879202843, + 0.014393558725714684, + -0.011732731014490128, + 0.03853248059749603, + 0.024310588836669922, + -0.010240554809570312, + 0.008715366013348103, + -0.008986069820821285, + 0.027836348861455917, + -0.006123865023255348, + -0.08525212109088898, + -0.013508817180991173, + -0.04241478070616722, + 0.010722540318965912, + 0.00905209593474865, + 0.04101504012942314, + 0.036419663578271866, + 0.010603695176541805, + -0.0015631536953151226, + 0.01772124320268631, + 0.03163941949605942, + 0.00689306203275919, + -0.03462377190589905, + -0.04624425992369652, + 0.010537669062614441, + -0.02147149108350277, + 0.0012602616334334016, + 0.00030474894447252154, + 0.021563926711678505, + -0.009745363146066666, + 0.020969698205590248, + 0.003433325793594122, + 0.04278452321887016, + 0.052239373326301575, + 0.014684070833027363, + 0.021748797968029976, + 0.008167354390025139, + -0.014406763948500156, + 0.008754980750381947, + -0.029817113652825356, + -0.004866078961640596, + 0.019015343859791756, + 0.017259065061807632, + 0.028945578262209892, + -0.00681383116170764, + -0.0546162910759449, + 0.00047579623060300946, + 0.0021012614015489817, + -0.03074147179722786, + -0.0495455339550972, + -0.00790325179696083, + 0.033118389546871185, + 0.05931730568408966, + -0.019226625561714172, + -0.0019477522000670433, + -0.04777605086565018, + 0.03200916200876236, + -0.012293947860598564, + -0.03142813593149185, + -0.02089046686887741, + 0.03377864509820938, + -0.04009068012237549, + -0.00757312448695302, + 0.013224907219409943, + 0.011343180201947689, + 0.018064575269818306, + 0.04090939834713936, + 0.013106061145663261, + -0.0222373865544796, + -0.007348638027906418, + 0.03671017661690712, + -0.0042652469128370285, + -0.007850431837141514, + 0.047591179609298706, + -0.0336465947329998, + 0.015093429014086723, + 0.006731299217790365, + 0.024878406897187233, + -0.046455539762973785, + -0.014155866578221321, + -0.003634703578427434, + 0.04352400824427605, + -0.006965689826756716, + -0.03219403326511383, + 0.0051499889232218266, + 0.001403867150656879, + -0.0020946587901562452, + -0.0013815835118293762, + 0.023174948990345, + 0.008840814232826233, + 0.023465462028980255, + 0.0024908119812607765, + 0.020335853099822998, + 0.0041695102117955685, + -0.021313030272722244, + 0.025802765041589737, + -0.008787993341684341, + -0.004096881952136755, + 0.006123865023255348, + -0.033884286880493164, + -0.04154324159026146, + -0.019068162888288498, + -0.0323789045214653, + 0.02685917168855667, + -0.023584308102726936, + 0.01168651320040226, + 0.004625086206942797, + -0.0009293088805861771, + 0.028470193967223167, + 0.02305610291659832, + 0.09127365052700043, + 0.005229219328612089, + 0.0011554461671039462, + -0.016942143440246582, + 0.011138501577079296, + 0.035284027457237244, + 0.0026030552107840776, + -0.0412791408598423, + 0.023095719516277313, + 0.01346259843558073, + -0.06972292810678482, + -0.02802122011780739, + 0.02413892187178135, + -0.025300970301032066, + 0.0022613732144236565, + 0.015397146344184875, + -0.051790401339530945, + 0.03692145645618439, + -0.029737884178757668, + 0.0014319280162453651, + -0.026634685695171356, + 0.026264943182468414, + 0.007632547523826361, + -0.07199420034885406, + 0.008074918761849403, + 0.026212122291326523, + -0.018143806606531143, + -0.020164186134934425, + 0.0565178245306015, + 0.0023901229724287987, + -0.051156554371118546, + 0.016545990481972694, + 0.007276009768247604, + -0.020718801766633987, + 0.02660827524960041, + 0.008840814232826233, + -0.044554006308317184, + -0.06586703658103943, + 0.00646389601752162, + -0.040750935673713684, + -0.019966110587120056, + 0.0037667546421289444, + -0.02744019590318203, + 0.00017465806740801781, + -0.019279444590210915, + 0.05609526112675667, + -0.008206969127058983, + 0.019860468804836273, + 0.02343905158340931, + -0.01860598474740982, + -0.07627265155315399, + 0.0006350827752612531, + 0.028549425303936005, + -0.028285322710871696, + -0.06945881992578506, + 0.009269979782402515, + 0.012406190857291222, + 0.02050752006471157, + -0.029817113652825356, + 0.0050080339424312115, + -0.04576887562870979, + -0.02293725684285164, + -0.009435043670237064, + 0.02470674179494381, + 0.01988687925040722, + 0.004390695597976446, + 0.018592780455946922, + -0.012756126001477242, + 0.028945578262209892, + -0.011098885908722878, + -0.04450118541717529, + -0.04178093373775482, + 0.021933671087026596, + 0.03253736346960068, + 0.06956446170806885, + -0.0276250671595335, + -0.031005574390292168, + -0.0038294787518680096, + -0.008345622569322586, + -0.03396351635456085, + 0.0244558434933424, + 0.04872681573033333, + 0.019319061189889908, + -0.0857275053858757, + -0.017008168622851372, + 0.06702908128499985, + -0.012379780411720276, + 0.013297535479068756, + -0.038638122379779816, + -0.02450866438448429, + -0.005539539270102978, + -0.07204702496528625, + -0.010095298290252686, + 0.015648042783141136, + 0.002632766729220748, + 0.04679887369275093, + -0.040988627821207047, + -0.041252732276916504, + 0.037634532898664474, + -0.015898939222097397, + 0.003433325793594122, + -0.026080071926116943, + 0.047591179609298706, + -0.0704624131321907, + 0.00385919027030468, + -0.010247156955301762, + -0.05873628333210945, + -0.011257347650825977, + -0.026330968365073204, + 0.015331120230257511, + 0.020296238362789154, + -0.004199221730232239, + -0.04428990185260773, + 0.010035875253379345, + 0.0020831043366342783, + 0.013601252809166908, + -0.016876116394996643, + -0.013422983698546886, + 0.035099152475595474, + 0.008721968159079552, + -0.008385238237679005, + 0.03317121043801308, + 0.0026047059800475836, + -0.02388802543282509, + -0.01917380467057228, + 0.0476175881922245, + 0.028866346925497055, + 0.01663842611014843, + -0.009375620633363724, + 0.025129303336143494, + 0.004248740617185831, + -0.046006567776203156, + 0.011303565464913845, + -0.045504771173000336, + -0.010616900399327278, + -0.00835222564637661, + 0.024733150377869606, + 0.013720097951591015, + -0.0052490271627902985, + 0.0012833706568926573, + 0.015304709784686565, + -0.02293725684285164, + 0.054140906780958176, + -0.023346615955233574, + -0.0038955044001340866, + -0.0374760739505291, + 0.018051370978355408, + 0.03079429268836975, + -0.007348638027906418, + 0.006361556705087423, + 0.02883993647992611, + 0.003377204295247793, + -0.06787420809268951, + -0.010082093067467213, + 0.010425426065921783, + 0.019398290663957596, + -0.007130753714591265, + -0.002617910970002413, + -0.01374650839716196, + 0.04178093373775482, + 0.03264300525188446, + -0.020428288727998734, + -0.00147732044570148, + -0.03531043604016304, + 0.00010811675019795075, + 0.05313732102513313, + 0.014802916906774044, + 0.011349783279001713, + 0.02185443975031376, + -0.015780093148350716, + 0.03884940221905708, + 0.004598675761371851, + -0.01834188401699066, + -0.02501045912504196, + 0.002370315371081233, + 0.010108503513038158, + -0.02217136137187481, + -0.001405517803505063, + 0.007982482202351093, + 0.011501641944050789, + 0.016149837523698807, + 0.024878406897187233, + 0.028364554047584534, + -0.04545195400714874, + -0.012525036931037903, + 0.016981758177280426, + 0.04186016693711281, + 0.023518282920122147, + 0.05429936945438385, + 0.011442218907177448, + 0.04737989604473114, + 0.022633539512753487, + -0.016981758177280426, + -0.03142813593149185, + -0.029130449518561363, + 0.030134037137031555, + -0.015515991486608982, + 0.0013972645392641425, + 0.010663118213415146, + -0.004661399871110916, + 0.016030991449952126, + 0.016215862706303596, + 0.00907850544899702, + 0.005622071214020252, + 0.04928142949938774, + -0.038268379867076874, + 0.0076787653379142284, + 0.01720624417066574, + -0.019081369042396545, + -0.007586329709738493, + 0.020850852131843567, + 0.007817419245839119, + -0.06370139867067337, + -0.023650333285331726, + -0.005087264347821474, + -0.019517136737704277, + 0.009910427033901215, + 0.038902223110198975, + -0.01041222084313631, + -0.0324053131043911, + 0.04394657164812088, + 0.02388802543282509, + 0.02965865284204483, + 0.006671876646578312, + -0.025433020666241646, + 0.01690252684056759, + -0.02120739035308361, + -0.014116250909864902, + -0.039536066353321075, + -0.018368292599916458, + 0.04146401211619377, + 0.033435311168432236, + 0.020877262577414513, + -0.011263949796557426, + -0.002116117160767317, + -0.026687506586313248, + 0.010709336027503014, + 0.030503779649734497, + 0.034201208502054214, + 0.0022663252893835306, + 0.02947378158569336, + 0.010458438657224178, + 0.02172238938510418, + -0.031533777713775635, + -0.011158308945596218, + -0.02287123166024685, + -0.01140260323882103, + -0.027836348861455917, + -0.015608427114784718, + 0.002943086437880993, + -0.04769681766629219, + 0.011495038866996765, + 0.016215862706303596, + -0.01968880370259285, + 0.011613884940743446, + 0.002142527373507619, + -0.029579423367977142, + 0.038955044001340866, + -0.02273918129503727, + 0.00511367479339242, + -0.030635830014944077, + 0.0009169291006401181, + -0.009263377636671066, + 0.02052072435617447, + -0.029764294624328613, + 0.028047630563378334, + 0.05131501704454422, + -0.00579373724758625, + -0.013297535479068756, + 0.005381077993661165, + -0.040671706199645996, + 0.012868368998169899, + -0.011996832676231861, + 0.018566370010375977, + 0.0046911113895475864, + -0.0055857570841908455, + 0.06761010736227036, + -0.002456148387864232, + -0.017813678830862045, + 0.017919320613145828, + -0.014433173462748528, + -0.01766842231154442, + -0.04465964809060097, + -0.016598809510469437, + 0.006655369885265827, + -0.000272974168183282, + 0.0033706016838550568, + -0.007058125454932451, + -0.013759713619947433, + -0.023003283888101578, + -0.007665560115128756, + 0.012848561629652977, + -0.0015466472832486033, + -0.02013777755200863, + 0.033303260803222656, + 0.003324383869767189, + 0.0048330663703382015, + 0.007526906672865152, + -0.027915580198168755, + -0.009441645815968513, + 0.015317915007472038, + 0.030635830014944077, + 0.025895200669765472, + 0.020415084436535835, + -0.04611220583319664, + 0.019464315846562386, + 0.047802459448575974, + 0.01784008927643299, + -0.012293947860598564, + 0.009164338931441307, + 0.010709336027503014, + 0.013198496773838997, + -0.01181856356561184, + 0.03969452902674675, + 0.014287917874753475, + 0.0317450575530529, + 0.019979314878582954, + -0.0012239476200193167, + 0.01315227895975113, + 0.008266392163932323, + -0.027413787320256233, + 0.024059690535068512, + 0.02502366341650486, + 0.04267888143658638, + 0.006080948282033205, + -0.011389398016035557, + 0.00689306203275919, + -0.01677047647535801, + -0.02210533618927002, + -0.005975307431071997, + 0.01076215598732233, + -0.003167573129758239, + -0.03105839341878891, + -0.03660453483462334, + 0.014169071801006794, + -0.020745210349559784, + 0.0012817200040444732, + 0.010280169546604156, + 0.012234524823725224, + 0.004308163654059172, + 0.0035158577375113964, + -0.004288355819880962, + -0.0016778729623183608, + 0.041120678186416626, + -0.05348065122961998, + -0.00581354508176446, + 0.026330968365073204, + 0.014129456132650375, + -0.014934967271983624, + 0.0010349496733397245, + 0.006807228550314903, + 0.011131898500025272, + 0.0034795436076819897, + 0.007025112863630056, + -0.0035554729402065277, + 0.022329824045300484, + -0.00853709690272808, + -0.025116099044680595, + -0.0203226488083601, + 0.041886575520038605, + -0.01140260323882103, + 0.01339657325297594, + -0.00779761141166091, + -0.012492024339735508, + -0.02279200218617916, + -0.007005305029451847, + 0.03232608363032341, + -0.005232520867139101, + 0.014987788163125515, + -0.029447371140122414, + 0.02217136137187481, + -0.04653476923704147, + -0.04428990185260773, + -0.03142813593149185, + 0.014063430950045586, + -0.012379780411720276, + -0.006011621560901403, + 0.013865354470908642, + 0.034835051745176315, + 0.0016465107910335064, + -0.03087352216243744, + -0.03224685415625572, + 0.005430597346276045, + 0.021933671087026596, + 0.018394703045487404, + -0.018011756241321564, + -0.012676895596086979, + 0.02560468763113022, + -0.03866453096270561, + -0.015846120193600655, + 0.01098664291203022, + -0.0020913577172905207, + -0.01346259843558073, + -0.003383806673809886, + -0.022395849227905273, + 0.003710632910951972, + -0.0077778035774827, + 0.019530342891812325, + -0.015199069865047932, + -0.056623466312885284, + -0.013825738802552223, + 0.024931227788329124, + 0.018896497786045074, + 0.016308298334479332, + 0.042150676250457764, + 0.017311885952949524, + -0.013667277991771698, + -0.0016085461247712374, + -0.03259018436074257, + 6.762455450370908e-05, + -0.004935405682772398, + 0.015489581972360611, + -0.00779761141166091, + 0.003400313202291727, + -0.00315931998193264, + 0.0010745649924501777, + 0.06755729019641876, + -0.03232608363032341, + 0.015991374850273132, + 0.0016729210037738085, + 0.0044402144849300385, + 0.03332966938614845, + 0.028153272345662117, + -0.010247156955301762, + 0.014023815281689167, + 0.00848427601158619, + 0.01045183651149273, + -0.011693115346133709, + -0.01187798660248518, + 9.527272777631879e-05, + 0.01720624417066574, + 0.005833352450281382, + 0.04542554169893265, + -0.026766736060380936, + 0.020547134801745415, + -0.023650333285331726, + 0.04159606248140335, + -0.0009664482204243541, + 0.027598658576607704, + 0.013891764916479588, + -0.01000286266207695, + 0.01327772717922926, + -0.0016035942826420069, + -0.018817266449332237, + 0.04872681573033333, + -0.029447371140122414, + -0.00940203107893467, + -0.014697276055812836, + 0.04751194640994072, + -0.012624074704945087, + 0.020877262577414513, + 0.052107322961091995, + -0.02419174276292324, + -0.014499199576675892, + -0.022976873442530632, + -0.050839632749557495, + -0.01123753935098648, + 0.013865354470908642, + -0.013548431918025017, + 0.012518433853983879, + 0.06454652547836304, + -0.003045425983145833, + -0.011891191825270653, + -0.004126593470573425, + 0.042203497141599655, + 0.01438035350292921, + -0.0005112849175930023, + -0.006384665612131357, + -0.034254029393196106, + -0.009976452216506004, + -0.006794023793190718, + -0.007322227582335472, + 0.047987330704927444, + 0.0038922030944377184, + 0.018830472603440285, + -0.039351195096969604, + 0.016413938254117966, + -0.01537073589861393, + 0.007982482202351093, + 0.023954050615429878, + 0.01362766232341528, + -0.022897642105817795, + 0.026212122291326523, + -0.04386734217405319, + 0.001316383364610374, + 0.030715061351656914, + -0.0355481281876564, + 0.028734296560287476, + -0.01860598474740982, + -0.01537073589861393, + -0.009065301157534122, + 0.018526755273342133, + -0.013449394144117832, + 0.035785820335149765, + 0.038136325776576996, + 0.05746859312057495, + 0.01612342707812786, + -0.03362018242478371, + -0.004067170433700085, + -0.010689527727663517, + 0.00157965999096632, + 0.018909702077507973, + 0.0029513398185372353, + -0.01873803697526455, + 0.02692519687116146, + 0.029896344989538193, + -0.0032913710456341505, + -0.03156018629670143, + -0.05086604133248329, + -0.001427801325917244, + -0.011970422230660915, + -0.006378063000738621, + -0.03760812431573868, + 0.02192046493291855, + 0.08139622956514359, + -0.007599534932523966, + -0.013079650700092316, + -0.0002368664718233049, + -0.0034201208036392927, + 0.022752385586500168, + 0.00975196622312069, + 0.008200366981327534, + 0.0035554729402065277, + -0.014552019536495209, + 0.0279419906437397, + 0.032167620956897736, + -0.01397099532186985, + 0.03929837420582771, + 0.006860048975795507, + 0.03377864509820938, + -0.012392985634505749, + -0.0021969983354210854, + -0.02083764784038067, + 0.014406763948500156, + 0.007236394565552473, + -0.01327112503349781, + 0.028417373076081276, + 0.01695534773170948, + 0.013165484182536602, + 0.0022102035582065582, + -0.019992521032691002, + 0.05488039180636406, + -0.027783529832959175, + -0.01988687925040722, + -0.03163941949605942, + 0.0035389666445553303, + 0.031533777713775635, + -0.024178536608815193, + 0.022659949958324432, + 0.03626120463013649, + 0.034967102110385895, + 9.599488112144172e-05, + -0.020362263545393944, + 0.04212426766753197, + -0.0362083837389946, + -0.035970691591501236, + 0.011904397048056126, + -0.013535226695239544, + -0.035151973366737366, + 0.04603297635912895, + -0.018460728228092194, + 0.023531487211585045, + 0.004380791913717985, + 0.004215728025883436, + 0.05593680217862129, + -0.001165349967777729, + 0.018619190901517868, + 0.004116689786314964, + -0.020415084436535835, + 0.005430597346276045, + -0.01162709016352892, + -0.005219315644353628, + -0.0025898502208292484, + 0.014842531643807888, + -0.0004035808378830552, + -0.031348906457424164, + -0.004885886795818806, + -0.001365077099762857, + 0.00946145411580801, + -0.027070453390479088, + 0.040301963686943054, + 0.007784406188875437, + -0.03486146405339241, + 0.03182429075241089, + 0.004186016507446766, + -0.005602263379842043, + 0.02305610291659832, + 0.025815969333052635, + -0.009857607074081898, + -0.011263949796557426, + -0.024680331349372864, + -0.02248828485608101, + -0.03169224038720131, + 0.02617250755429268, + 0.04331272467970848, + 0.012723113410174847, + 1.4804154488956556e-05, + 0.052556294947862625, + 0.018645599484443665, + -0.0238220002502203, + -0.012115678749978542, + -0.0008315086015500128, + 0.017457140609622, + -0.031797878444194794, + -0.057891156524419785, + 0.013706893660128117, + -0.02947378158569336, + 0.013409778475761414, + -0.02235623262822628, + 0.004905694629997015, + 0.0009796533267945051, + 0.007962674833834171, + 0.014829326421022415, + 0.0016572399763390422, + -0.0380835086107254, + -0.009613312780857086, + 0.0037766583263874054, + -0.0041596065275371075, + 0.01257125474512577, + 0.025551866739988327, + 0.01637432351708412, + 0.01175253838300705, + -0.03898145258426666, + 0.01595176011323929, + 0.02812686190009117, + -0.014974582940340042, + -0.035099152475595474, + -0.0007894173613749444, + 0.011158308945596218, + -0.005219315644353628, + -0.041754525154829025, + -0.03156018629670143, + -0.034069158136844635, + 0.040169913321733475, + -0.00549332145601511, + -0.021418672055006027, + -0.02820609323680401, + 0.019596368074417114, + 0.03541607782244682, + -0.01123753935098648, + 0.0032946723513305187, + 0.003585184458643198, + 0.04241478070616722, + -0.002895218087360263, + 0.006767613347619772, + 0.017509961500763893, + 0.06803267449140549, + -0.004915598314255476, + 0.007599534932523966, + -0.012181703932583332, + 0.02412571758031845, + -0.012029845267534256, + -0.017628807574510574, + -0.054774753749370575, + -0.012208114378154278, + 0.01467086561024189, + 0.007982482202351093, + -0.010029273107647896, + -0.01644034869968891, + -0.01817021705210209, + -0.011184719391167164, + -0.028364554047584534, + 0.03398992493748665, + -0.005242424551397562, + 0.004975021351128817, + -0.003997843712568283, + -0.0042652469128370285, + -0.006384665612131357, + -0.04843630641698837, + -0.026951607316732407, + -0.007559919264167547, + 0.005466911010444164, + -0.023544691503047943, + 0.04275811091065407, + 0.040354784578084946, + 0.03269582614302635, + -0.010649912990629673, + 0.038638122379779816, + -0.01088760420680046, + 0.015423555858433247, + 0.014974582940340042, + -0.024931227788329124, + 0.0023373025469481945, + -0.0168232973664999, + 0.015476376749575138, + 0.03060941956937313, + -0.0008038604282774031, + 0.009131326340138912, + 0.03277505561709404, + -0.005440501030534506, + 0.03676299750804901, + 0.01438035350292921, + 0.013944584876298904, + 0.052239373326301575, + -0.014472789131104946, + 0.028734296560287476, + 0.019081369042396545, + 0.005298546049743891, + -0.01925303414463997, + -0.010630104690790176, + -0.006529921665787697, + -0.021616747602820396, + -0.00924356933683157, + -0.012333562597632408, + 0.0146048404276371, + 0.013416380621492863, + 0.024231357499957085, + -0.016149837523698807, + 0.001392312697134912, + -0.01696855202317238, + 0.018658805638551712, + -0.014565224759280682, + -0.019913289695978165, + 0.023703154176473618, + 0.010399015620350838, + -0.022277003154158592, + -0.023161744698882103, + 0.020177392289042473, + 0.00010667244350770488, + 0.0016399082960560918, + 0.04819861426949501, + -0.026449814438819885, + 0.013931379653513432, + -0.021180979907512665, + 0.05498603358864784, + -0.0168232973664999, + 0.0022762289736419916, + -0.007936264388263226, + 0.035284027457237244, + -0.002294386038556695, + -0.004687810316681862, + -0.013838944025337696, + 0.03235249221324921, + -0.020098160952329636, + -0.027096863836050034, + -0.027545837685465813, + 0.0008987720939330757, + -0.040988627821207047, + -0.07627265155315399, + -0.0025238245725631714, + 0.0292096808552742, + 0.015278300270438194, + 0.0038294787518680096, + 0.0122279217466712, + -0.004846271593123674, + 0.03599710017442703, + -0.012056255713105202, + -0.008992672897875309, + -0.03222044184803963, + 0.007975880056619644, + -0.005552744492888451, + -0.021484697237610817, + 0.032299675047397614, + -0.007956072688102722, + -0.011594077572226524, + -0.004701015539467335, + -0.010847989469766617, + 0.031084803864359856, + -0.005097168497741222, + 0.03119044564664364, + -0.000940038007684052, + -0.01508022379130125, + -0.007216586731374264, + -0.007071330677717924, + 0.04141119122505188, + 0.02502366341650486, + -0.004790149629116058, + -0.007731585763394833, + 0.02102251909673214, + 0.0001611434854567051, + -0.014710480347275734, + -0.002944737207144499, + 0.043207086622714996, + 0.016796886920928955, + -0.011653500609099865, + 0.012729715555906296, + 0.016308298334479332, + 0.0035554729402065277, + 0.01760239712893963, + 0.017259065061807632, + -0.02450866438448429, + -0.03586504980921745, + -0.014142661355435848, + -0.019715214148163795, + 0.0298435240983963, + 0.006140371318906546, + 0.06174704432487488, + 0.012690100818872452, + -0.01251183170825243, + 0.00288201286457479, + 0.008550302125513554, + 0.000940038007684052, + -0.012459011748433113, + 0.017298679798841476, + -0.0056715901009738445, + 0.040618885308504105, + 0.020745210349559784, + -0.01374650839716196, + 0.04056606441736221, + -0.0025650905445218086, + 0.019741622731089592, + -0.007282612379640341, + -0.01438035350292921, + -0.005955500062555075, + 0.019530342891812325, + -0.008556904271245003, + 0.004483131226152182, + -0.03354095295071602, + 0.0034432297106832266, + 0.01438035350292921, + 0.024469049647450447, + -0.01968880370259285, + 0.021946875378489494, + 0.02293725684285164, + 0.017193039879202843, + -0.04413144290447235, + -0.0038459852803498507, + 0.008041905239224434, + -0.019543547183275223, + -0.01688932254910469, + 0.012412793934345245, + -0.003319431794807315, + 0.010029273107647896, + 0.03472940996289253, + -0.03222044184803963, + 0.01187138445675373, + 0.026185711845755577, + -0.00040750112384557724, + -0.024165332317352295, + -0.004770342260599136, + -0.00819376390427351, + 0.02952660247683525, + -0.03372582420706749, + 0.015700863674283028, + -0.035917870700359344, + 0.006774215959012508, + 0.04241478070616722, + 0.02654225006699562, + -0.033567361533641815, + 0.002981051104143262, + 0.019002137705683708, + 0.01432753261178732, + -0.0036644150968641043, + 0.015766888856887817, + 0.010095298290252686, + 0.02939455211162567, + -0.011897794902324677, + 0.006846844218671322, + 0.039034273475408554, + -0.026146097108721733, + -0.015159454196691513, + 0.008173956535756588, + 0.003000858938321471, + -0.013733303174376488, + -0.014816121198236942, + 0.0012016640976071358, + -0.014485994353890419, + 0.002434690250083804, + 0.0077645983546972275, + 0.004875983111560345, + -0.006526620592921972, + 0.025802765041589737, + -0.004743931815028191, + -0.02279200218617916, + -0.004242138005793095, + 0.0029034712351858616, + -0.0022498187609016895, + 0.02262033522129059, + -0.014816121198236942, + -0.023359820246696472, + 0.004859476815909147, + 0.0212866198271513, + -0.04524067044258118, + -0.026766736060380936, + 0.03227326273918152, + -0.013614457100629807, + 0.020494313910603523, + -0.007810816168785095, + -0.0022135048639029264, + 0.0005612167296931148, + -0.034518130123615265, + -0.010682925581932068, + 0.018394703045487404, + 0.010649912990629673, + 0.003964831121265888, + 0.006734600756317377, + 0.002674032701179385, + 0.009983055293560028, + -0.024733150377869606, + -0.021484697237610817, + 0.022369438782334328, + 0.07067368924617767, + 0.002723551820963621, + -0.02965865284204483, + 0.016744066029787064, + 0.005044348072260618, + 0.013191894628107548, + -0.009164338931441307, + 0.04069811478257179, + -0.039034273475408554, + 0.028813527897000313, + -0.02020380273461342, + 0.051843222230672836, + -0.003961530048400164, + -0.01817021705210209, + -0.011600679717957973, + 0.019358675926923752, + -0.002119418466463685, + 0.000877313781529665, + 0.006622357293963432, + 0.005859762895852327, + -0.016928937286138535, + -0.024086100980639458, + 0.004701015539467335, + 0.029605833813548088, + -0.0008814404136501253, + -0.019451111555099487, + -0.0063483514823019505, + 0.0002898931852541864, + 0.0010869447141885757, + -0.012300550006330013, + 0.00018982330220751464, + -0.021577132865786552, + 0.026819556951522827, + 0.016215862706303596, + 0.031216854229569435, + -0.026383789256215096, + 0.022646745666861534, + -0.01638752780854702, + 0.016057400032877922, + 0.005879570730030537, + -0.002730154199525714, + -0.004859476815909147, + 0.017430732026696205, + 0.037185560911893845, + 0.015093429014086723, + -0.010068888776004314, + 0.01574047841131687, + 0.030318908393383026, + -0.010649912990629673, + -0.0008929948671720922, + -0.0212866198271513, + 0.017298679798841476, + 0.008754980750381947, + -0.014552019536495209, + -0.003387107979506254, + 0.022897642105817795, + 0.010960232466459274, + -0.009256774559617043, + 0.040935806930065155, + -0.025749944150447845, + -0.00192959513515234, + 0.06153576448559761, + -0.0615885853767395, + -0.014908556826412678, + 0.005849859211593866, + 0.004489733837544918, + 0.011858179233968258, + 0.008325815200805664, + 0.025300970301032066, + -0.005209411960095167, + 0.023716358467936516, + 0.02965865284204483, + -0.011013053357601166, + -0.03766094520688057, + -0.062328070402145386, + 0.02217136137187481, + -0.011679910123348236, + 0.020626366138458252, + -0.016849707812070847, + -0.0177872683852911, + 0.012234524823725224, + 0.008325815200805664, + 0.021682772785425186, + 0.01943790726363659, + 0.021048927679657936, + 0.03148095682263374, + 0.013224907219409943, + -0.010557477362453938, + -0.02394084446132183, + 0.031586598604917526, + 0.04452759400010109, + -0.006483703851699829, + -0.013680483214557171, + -0.0017826884286478162, + 0.014367148280143738, + 0.023227769881486893, + -0.00385919027030468, + -0.031586598604917526, + -0.012029845267534256, + 0.011204526759684086, + 0.022184567525982857, + 0.05556705966591835, + 0.005816846154630184, + -0.026766736060380936, + 0.005301847588270903, + -0.004047363065183163, + 0.0451086200773716, + -0.029896344989538193, + -0.021748797968029976, + 0.022686360403895378, + 0.0070119076408445835, + 0.023016488179564476, + 0.021511107683181763, + 0.014578429982066154, + -0.004053965676575899, + -0.015859324485063553, + -0.022699566558003426, + -0.036419663578271866, + -0.011217731982469559, + 0.0027895772363990545, + -0.007104343269020319, + 0.03148095682263374, + -0.04793450981378555, + 0.0006004193564876914, + -0.003558774245902896, + -0.009045492857694626, + 0.012234524823725224, + 0.02725532464683056, + 0.024152126163244247, + -0.006308736279606819, + 0.01514624897390604, + 0.04428990185260773, + -0.04598015546798706, + -0.021260209381580353, + 0.03396351635456085, + 0.01257125474512577, + -0.012782536447048187, + -0.03156018629670143, + 0.002332350704818964, + 0.00771838054060936, + 0.0065992483869194984, + 0.011673307977616787, + -0.03148095682263374, + -0.024680331349372864, + 0.001429451978765428, + -0.008735173381865025, + 0.0010877700988203287, + -0.022118542343378067, + -0.006054538302123547, + 0.036049921065568924, + -0.035151973366737366, + -0.02693840302526951, + -0.0001091484009521082, + 0.04183375462889671, + -0.0009037239942699671, + -0.005278738681226969, + 0.014182277023792267, + 0.020784826949238777, + -0.006539825350046158, + -0.04167529568076134, + -0.01521227415651083, + -0.007414663210511208, + -0.02928891032934189, + -0.008787993341684341, + 0.03544248640537262, + 0.02780994027853012, + 0.03520479425787926, + -0.00806831568479538, + 0.020375467836856842, + 0.03568017855286598, + -0.005262231919914484, + -0.009672734886407852, + 0.008642737753689289, + -0.013073048554360867, + -0.013614457100629807, + -0.011283757165074348, + 0.009619914926588535, + -0.024020075798034668, + 0.01432753261178732, + 0.03346172347664833, + 0.02515571378171444, + -0.026370583102107048, + -0.021960079669952393, + 0.007909854874014854, + 0.004126593470573425, + 0.007309022359549999, + 0.01304663810878992, + 0.014565224759280682, + 0.0012082665925845504, + 0.031850699335336685, + 0.016361117362976074, + 0.019596368074417114, + -0.0043642851524055, + 0.01638752780854702, + 0.00981138925999403, + 0.01362766232341528, + 0.022818412631750107, + 0.01702137291431427, + 0.02272597700357437, + -0.03742325305938721, + 8.865727977536153e-06, + 0.013522021472454071, + -0.01261087041348219, + 0.00031774770468473434, + 0.008345622569322586, + 0.013772918842732906, + 0.004796752240508795, + -0.03993222117424011, + -0.017496757209300995, + 0.04732707515358925, + 0.013165484182536602, + 0.0292096808552742, + 0.015119838528335094, + -0.03163941949605942, + 0.03322403132915497, + 0.028734296560287476, + -0.007989085279405117, + 0.011495038866996765, + -0.0012107425136491656, + -0.010900809429585934, + 0.014948172494769096, + -0.005189604125916958, + 0.006972292438149452, + -0.018777651712298393, + -0.00040502517367713153, + 0.00636815931648016, + 0.0026657795533537865, + 0.021035723388195038, + -0.018896497786045074, + 0.015278300270438194, + 0.054827574640512466, + -0.004172811284661293, + -0.00048735071322880685, + 0.009672734886407852, + -0.009375620633363724, + -0.0257235337048769, + -0.0247727669775486, + -0.015582017600536346, + 0.023993665352463722, + 0.026014046743512154, + 0.023003283888101578, + 0.026132890954613686, + -0.012432601302862167, + 0.001819002442061901, + -0.009534081444144249, + -0.006179986521601677, + -0.00930299237370491, + 0.04230913892388344, + -0.024297382682561874, + -0.02140546590089798, + 0.02217136137187481, + -0.005896077025681734, + 0.03222044184803963, + 0.0033260344062000513, + 0.020798031240701675, + -0.01496137771755457, + -0.036102741956710815, + -0.0190549585968256, + -0.020177392289042473, + 0.02584237977862358, + -0.007639150135219097, + -0.057943977415561676, + -0.018262652680277824, + 0.011283757165074348, + 0.04458041489124298, + -0.012148691341280937, + 0.02470674179494381, + 0.009210556745529175, + -0.019345469772815704, + -0.03726479038596153, + -0.057257309556007385, + 0.04344477877020836, + -0.03145454823970795, + 0.025116099044680595, + -0.026146097108721733, + 0.025736737996339798, + -0.052107322961091995, + 0.001555725815705955, + 0.0010968485148623586, + 0.010326387360692024, + -0.02876070700585842, + 0.014565224759280682, + 0.02692519687116146, + -0.0007828148081898689, + 0.00601822417229414, + 0.005483417771756649, + -0.02979070506989956, + -0.004050664138048887, + -0.007183574140071869, + 0.008649339899420738, + 0.028892757371068, + -0.020850852131843567, + -0.009045492857694626, + 0.030847111716866493, + -0.009989657439291477, + 0.002282831585034728, + 0.0022118540946394205, + 0.03702709823846817, + 0.008550302125513554, + 0.010498054325580597, + -0.04053965583443642, + 4.330344017944299e-05, + -0.026317764073610306, + 0.018962522968649864, + -0.025670712813735008, + -0.020626366138458252, + 0.009613312780857086, + -0.008200366981327534, + 0.007348638027906418, + 0.012267537415027618, + 0.010471643880009651, + -0.007434471044689417, + -0.017549576237797737, + 0.03393710404634476, + 0.018962522968649864, + -0.009190749377012253, + -0.008147546090185642, + 0.006807228550314903, + 0.007995687425136566, + -0.020599955692887306, + 0.014274712651968002, + -0.018830472603440285, + -0.03449172154068947, + 0.001580485375598073, + 0.005367872770875692, + -0.039852991700172424, + 0.005367872770875692, + 0.020296238362789154, + 0.01644034869968891, + 0.006794023793190718, + 0.023174948990345, + -0.0008224301273003221, + 0.008306007832288742, + -0.0019378483993932605, + 0.030081216245889664, + -0.010042478330433369, + 0.029104039072990417, + 0.010775361210107803, + -0.016427144408226013, + 0.00135352264624089, + 0.0330127477645874, + -0.02680635266005993, + 0.01575368270277977, + -0.009553889743983746, + -0.01209587138146162, + -0.016347913071513176, + ], + "index": 23, + }, + { + "title": "Thomas W. Osborn", + "text": "Thomas Ward Osborn (March 9, 1833 \u2013 December 18, 1898) was a Union Army officer and United States Senator representing Florida.", + "vector": [ + 0.019104544073343277, + -0.03285294026136398, + -0.018417123705148697, + 0.004163902718573809, + 0.011328106746077538, + 0.0011752373538911343, + 0.03989899531006813, + -0.016741538420319557, + -0.02066555991768837, + 0.061524078249931335, + -0.03763623908162117, + 0.020722845569252968, + -0.01825959049165249, + 0.019763320684432983, + -0.0496947281062603, + 0.050954997539520264, + -0.03434235230088234, + 0.011951080523431301, + 0.013046656735241413, + 0.012130096554756165, + 0.04708826169371605, + 0.028842991217970848, + 0.010117961093783379, + 0.024331798776984215, + 0.029315592721104622, + 0.051928844302892685, + 0.017443278804421425, + 0.01634054258465767, + 0.03302479535341263, + 0.013576542027294636, + -0.014643475413322449, + 0.023114493116736412, + 0.025420213118195534, + 0.03457149118185043, + 0.0011868734145537019, + -0.012144417501986027, + -0.00537404790520668, + 0.030045976862311363, + -0.002015715464949608, + 0.03789402171969414, + 0.027983717620372772, + -0.035115696489810944, + 0.018660584464669228, + 0.015395340509712696, + 0.02248435840010643, + -0.034514207392930984, + -0.06559131294488907, + -0.019176149740815163, + -0.012316272594034672, + 0.032108236104249954, + -0.01532373484224081, + 0.011900956742465496, + -0.020350491628050804, + -0.005893193185329437, + 0.05018164962530136, + 0.005356146488338709, + 0.03428506478667259, + 0.07441320270299911, + 0.0036913014482706785, + 0.02824150025844574, + -0.030532898381352425, + -0.0312776044011116, + -0.011213536374270916, + -0.017744025215506554, + -0.01222318410873413, + -0.0013936363393440843, + 0.03600361570715904, + 0.03391271457076073, + -0.052673548460006714, + -0.020135672762989998, + -0.0011430145241320133, + -0.021324336528778076, + 0.0061402348801493645, + 0.08334966003894806, + 0.0004222530114930123, + 0.03941207379102707, + 0.03680560365319252, + -0.008678675629198551, + -0.012309111654758453, + 0.0037306849844753742, + 0.039039719849824905, + -0.04903595149517059, + -0.00776211591437459, + 0.03319665044546127, + -0.031420815736055374, + -0.023687342181801796, + -0.006834815256297588, + -0.0480334646999836, + -0.00034505254006944597, + -0.008914976380765438, + 0.05599607527256012, + 0.06272706389427185, + 0.01947689615190029, + 0.028313105925917625, + 0.012258987873792648, + -0.005739239975810051, + 0.0006681756931357086, + 0.005452814977616072, + -0.005939737427979708, + -0.01864626444876194, + -0.012989371083676815, + -0.0179158803075552, + -0.029086453840136528, + 0.013791360892355442, + 0.053561463952064514, + 0.0030880188569426537, + -0.0015833928482607007, + 0.005635411012917757, + 0.055967435240745544, + 0.0695439800620079, + 0.013275796547532082, + 0.003981306683272123, + -0.043364737182855606, + -0.016813144087791443, + 0.016984999179840088, + -0.01589658483862877, + 0.01470792107284069, + 0.04597120359539986, + -0.054048385471105576, + 0.03666239231824875, + -0.029931407421827316, + 0.029201023280620575, + 0.008406572043895721, + -0.0222408976405859, + 0.0034353092778474092, + -0.029845479875802994, + -0.01161453127861023, + 0.049121879041194916, + 0.002615417819470167, + 0.032050952315330505, + 0.030217831954360008, + 0.03669103607535362, + -0.0009344613645225763, + -0.04628627002239227, + -0.013397526927292347, + 0.03987035155296326, + 0.051928844302892685, + 0.030819324776530266, + 0.0038703170139342546, + 0.05462123826146126, + 0.007769276853650808, + 0.043765731155872345, + -0.009559432975947857, + -0.000540179549716413, + -0.014034822583198547, + -0.014228159561753273, + 0.00809150468558073, + -0.018875403329730034, + 0.031306248158216476, + 0.01939096860587597, + -0.011793547309935093, + -0.033282577991485596, + 0.011034521274268627, + -0.0029555473010987043, + 0.004077975172549486, + -0.03606089949607849, + -0.0191904716193676, + -0.020722845569252968, + 0.025663675740361214, + 0.047116901725530624, + -0.007948292419314384, + -0.009745609015226364, + -0.018560336902737617, + 0.025377249345183372, + 0.01016092486679554, + -0.022813746705651283, + 0.028513602912425995, + 0.01407062541693449, + 0.03248059004545212, + 0.009695484302937984, + -0.025964422151446342, + 0.005237996112555265, + 0.0038953793700784445, + 0.003762907814234495, + -0.040070850402116776, + -0.010347100906074047, + -0.009101152420043945, + 0.010082158260047436, + -0.027926431968808174, + -0.01288912259042263, + -0.010017712600529194, + 0.005528001580387354, + 0.014894097112119198, + -0.006387276109308004, + -0.040815554559230804, + -0.03385542705655098, + -0.009931785054504871, + 0.050496719777584076, + 0.0038130320608615875, + -0.0214102640748024, + 0.030074618756771088, + -0.02975955232977867, + 0.003521236591041088, + 0.008836209774017334, + 0.04505464434623718, + -0.00505540007725358, + -0.022856710478663445, + 0.026680484414100647, + -0.008585588075220585, + -0.02818421460688114, + 0.028742743656039238, + -0.0054814573377370834, + 0.05264490470290184, + 0.023429561406373978, + -0.02779754064977169, + 0.028613852337002754, + 0.01593954861164093, + -0.010225370526313782, + -0.02785482630133629, + -0.03036104515194893, + -0.04052912816405296, + -0.048978663980960846, + 0.003694881685078144, + 0.016111403703689575, + 0.00569627620279789, + 0.0366051085293293, + -0.02056531049311161, + 0.011421194300055504, + -0.021367300301790237, + 0.056654855608940125, + 0.007669027894735336, + 0.025892814621329308, + 0.004511192906647921, + -0.00716062355786562, + 0.0021249151322990656, + 0.011729101650416851, + 0.01252393051981926, + 0.01662696897983551, + 0.025821208953857422, + 0.03497248515486717, + -0.041502974927425385, + 0.04113062098622322, + 0.01573905162513256, + 0.02824150025844574, + -0.052673548460006714, + 0.03016054630279541, + 0.0784231498837471, + -0.014478781260550022, + -0.011328106746077538, + -0.03491520136594772, + -0.009752769023180008, + 0.051098208874464035, + -0.014657796360552311, + -0.04058641567826271, + 0.0023630058858543634, + 0.036920174956321716, + -0.0374930240213871, + 0.011192054487764835, + -0.010153763927519321, + 0.05705584958195686, + 0.014865454286336899, + -0.02864249423146248, + 0.011807868257164955, + -0.013590863905847073, + -0.011328106746077538, + -0.06530489027500153, + -0.01192959863692522, + -0.0008606174378655851, + 0.007790758740156889, + -0.03460013493895531, + -0.0014920949470251799, + -0.013698273338377476, + -0.009810054674744606, + -0.02411697991192341, + -0.03775080665946007, + -0.023973768576979637, + -0.019247757270932198, + 0.009659681469202042, + 0.007633224595338106, + 0.019863570109009743, + 0.00374500616453588, + -0.008148789405822754, + -0.002636899705976248, + 0.020107030868530273, + 0.05728498846292496, + 0.0014509214088320732, + -0.011285142973065376, + -0.023429561406373978, + -0.05258762091398239, + 0.04052912816405296, + 0.004754654131829739, + -0.0017498773522675037, + -0.002731777960434556, + -0.025806887075304985, + 0.040471844375133514, + 0.020006783306598663, + 0.04325016587972641, + 0.06003466993570328, + 0.023300670087337494, + -0.022713497281074524, + -0.02996004931628704, + 0.025019219145178795, + 0.012352075427770615, + -0.014127910137176514, + 0.029014846310019493, + -0.030933894217014313, + 0.051986128091812134, + -0.07034596800804138, + -0.027640007436275482, + -0.03213687986135483, + 0.03288158401846886, + 0.07532975822687149, + -0.002110593719407916, + -0.0486922413110733, + 0.008456696756184101, + -0.017786988988518715, + -0.011721940711140633, + -0.02941584214568138, + 0.05831611901521683, + 0.013555060140788555, + -0.017744025215506554, + 0.0186892282217741, + 0.0575714148581028, + -0.034857917577028275, + 0.02312881499528885, + 4.076800451002782e-06, + -0.0011242178734391928, + 0.007106918841600418, + -0.02927262894809246, + -0.008334966376423836, + -0.033969998359680176, + -0.008191753178834915, + 0.01505163125693798, + -0.024217229336500168, + -0.04173211380839348, + -0.019749000668525696, + 0.0006972657283768058, + 0.0072572920471429825, + -0.07223637402057648, + 0.039784424006938934, + 0.036089543253183365, + -0.011113287881016731, + 0.04511192813515663, + -0.044854145497083664, + 0.06879927217960358, + -0.04768975451588631, + -0.01084834523499012, + 0.005775042809545994, + -0.050153009593486786, + 0.0008118356927298009, + 0.008485338650643826, + 0.014750884845852852, + 0.010919950902462006, + -0.006258385255932808, + -0.00719642685726285, + 0.014722242020070553, + 0.05533729866147041, + 0.04854902997612953, + -0.05066857114434242, + 0.011900956742465496, + 0.0004891601274721324, + -0.005839488469064236, + 0.040471844375133514, + -0.011056003160774708, + 0.04642948508262634, + 0.009036706760525703, + -0.033282577991485596, + 0.0217396542429924, + 0.05029622092843056, + -0.013691112399101257, + -0.006133073940873146, + -0.007590261287987232, + -0.02244139462709427, + 0.04872088506817818, + -0.029644981026649475, + -0.004926509223878384, + 0.05029622092843056, + 0.02715308405458927, + 0.004579219035804272, + 0.03620411455631256, + -0.016455113887786865, + 0.0339413546025753, + 0.02804100140929222, + -0.05797240883111954, + 0.01399901881814003, + -0.009974748827517033, + 0.0015986092621460557, + -0.027482474222779274, + -0.016555361449718475, + -0.0031596252229064703, + 0.028599530458450317, + -0.036633752286434174, + 0.03551669418811798, + -0.008900655433535576, + -0.0004994535120204091, + -0.08518277853727341, + -0.01682746596634388, + 0.058029692620038986, + -0.02244139462709427, + 0.012967889197170734, + -0.02139594405889511, + 0.003079068148508668, + 0.03457149118185043, + -0.00187250308226794, + -0.015223485417664051, + -0.04009949415922165, + 0.003642967203631997, + 0.010540437884628773, + 0.017185496166348457, + 0.0056533124297857285, + -0.01751488633453846, + -0.04806210473179817, + -0.0050339181907474995, + 0.012638500891625881, + -0.0008418208453804255, + 0.014586190693080425, + -0.04196125268936157, + 0.0007209852919913828, + 0.013476293534040451, + 0.02017863653600216, + 0.00839225109666586, + -0.019462574273347855, + 0.010590562596917152, + 0.05304589867591858, + -0.005452814977616072, + -0.04640084132552147, + 0.008012738078832626, + -0.021968793123960495, + 0.02135298028588295, + 0.0029215344693511724, + -0.018818119540810585, + -0.014600511640310287, + 0.00687777902930975, + 0.04456772282719612, + 0.05338960886001587, + 0.0050625610165297985, + 0.033483076840639114, + 0.04135976359248161, + -0.02563503198325634, + -0.019706036895513535, + 0.017486242577433586, + -0.009681163355708122, + -0.011743422597646713, + 0.053561463952064514, + -0.01638350635766983, + 0.04456772282719612, + -0.041932612657547, + -0.017085248604416847, + -0.016211651265621185, + 0.011507121846079826, + -0.029086453840136528, + -0.013390365988016129, + -0.039097003638744354, + -0.019548501819372177, + -0.07825129479169846, + 0.018388481810688972, + -0.055824220180511475, + -0.006530488841235638, + 0.03680560365319252, + 0.03351171687245369, + -0.038151804357767105, + -0.010590562596917152, + 0.05605336278676987, + 0.038209088146686554, + 0.006258385255932808, + -0.038295015692710876, + 0.0006959231104701757, + 0.00600060261785984, + -0.06410190463066101, + 0.01528077106922865, + -0.028112608939409256, + -0.01707092672586441, + 0.043422020971775055, + -0.003066536970436573, + -0.005649731960147619, + -0.006147395353764296, + -0.0209090206772089, + -0.030876608565449715, + -0.05023893713951111, + -0.008306323550641537, + -0.008062861859798431, + 0.05081178620457649, + 0.011499961838126183, + 0.06793999671936035, + 0.004507612437009811, + 0.06450289487838745, + 0.011227858252823353, + 0.0410446934401989, + 0.055222731083631516, + 0.006433820351958275, + 0.00687419855967164, + -0.01923343539237976, + 0.039240218698978424, + -0.00925152562558651, + -0.04402351379394531, + -0.04857767000794411, + -0.002482946263626218, + 0.003816612297669053, + -0.03646189719438553, + 0.02647998556494713, + 0.012309111654758453, + 0.010733774863183498, + -0.013927413150668144, + 0.001028444617986679, + -0.0032222806476056576, + -0.006491105537861586, + -0.05333232507109642, + 0.02499057725071907, + -0.002148187020793557, + 0.0028105448000133038, + 0.029788194224238396, + 0.07424134761095047, + 0.014292605221271515, + -0.0505826435983181, + -0.008836209774017334, + -0.00149478018283844, + 0.04276324436068535, + 0.0209090206772089, + -0.01805909350514412, + 0.020379135385155678, + 0.040271345525979996, + -0.05485037714242935, + 0.0022287440951913595, + 0.0037235242780297995, + 0.0008185487822629511, + 0.004811939317733049, + 0.006505426485091448, + 0.02716740593314171, + 0.01983492821455002, + 0.03302479535341263, + 0.016311900690197945, + -0.002473995555192232, + -0.06163864955306053, + 0.0038130320608615875, + 0.043221525847911835, + 0.01598251238465309, + 0.025520462542772293, + 0.0005415221676230431, + -0.005535162054002285, + -0.011943920515477657, + -0.009366095997393131, + -0.004486130550503731, + 0.00868583656847477, + -0.013082459568977356, + 0.0026028866413980722, + 0.03371221572160721, + -0.008943619206547737, + 0.03064746968448162, + 0.023973768576979637, + 0.016541041433811188, + 0.02587849460542202, + -0.005531581584364176, + 0.024045374244451523, + -0.053905174136161804, + -0.009631038643419743, + -0.0011421195231378078, + 0.035402122884988785, + -0.03276701271533966, + -0.007933970540761948, + 0.0026923944242298603, + 0.0008619600557722151, + 0.025792567059397697, + -0.0002503980649635196, + 0.029730908572673798, + 0.01682746596634388, + -0.025062182918190956, + -0.09646791964769363, + 0.03531619533896446, + -0.0005643466720357537, + -0.01894701085984707, + 0.018875403329730034, + -0.009280168451368809, + -0.012975050136446953, + -0.04224767908453941, + -0.0063228304497897625, + -0.0005124321323819458, + -0.0331680104136467, + -0.04035727307200432, + 0.004367980640381575, + -0.021023590117692947, + 0.014371371828019619, + -0.0012307321885600686, + 0.013390365988016129, + 0.03299615532159805, + -0.04771839454770088, + 0.037865377962589264, + 0.008334966376423836, + -0.003388765035197139, + 0.020450741052627563, + 0.0120083661749959, + 0.028055323287844658, + -0.029143737629055977, + 0.00597912073135376, + 0.026938267052173615, + -0.012151578441262245, + 0.030246473848819733, + -0.011356748640537262, + -0.010404386557638645, + 0.024904649704694748, + 0.020336171612143517, + 0.00799841620028019, + -0.0005621089367195964, + 0.025305643677711487, + 0.03242330253124237, + 0.03852415457367897, + 0.048634957522153854, + -0.009695484302937984, + -0.004897866398096085, + 0.037521667778491974, + 0.031019821763038635, + 0.010604883544147015, + -0.0019942335784435272, + -0.0024972674436867237, + -0.0022717078682035208, + -0.003379814326763153, + -0.044052157551050186, + -0.0014186985790729523, + 0.005538742523640394, + 0.023014243692159653, + 0.041302476078271866, + 0.07034596800804138, + -0.0235154889523983, + -0.013562221080064774, + 0.02519107423722744, + 0.005925416015088558, + 0.0036125346086919308, + 0.007063955068588257, + 0.04545563831925392, + 0.024145623669028282, + 0.01825959049165249, + -0.004661566112190485, + -0.03196502476930618, + -0.017772667109966278, + 0.013075298629701138, + 0.0038201927673071623, + -0.03523026779294014, + -0.006222581956535578, + 0.004117358475923538, + -0.024976255372166634, + -0.01707092672586441, + -0.046916406601667404, + 0.034313708543777466, + -0.020493704825639725, + -0.0186892282217741, + -0.014836812391877174, + 0.021854223683476448, + 0.04127383604645729, + -0.05333232507109642, + 0.024532295763492584, + -0.004994534887373447, + 0.019319362938404083, + 0.04201854020357132, + 0.019691715016961098, + -0.024088338017463684, + -0.027582721784710884, + -0.009129795245826244, + 0.04428129643201828, + -0.037865377962589264, + 0.008098665624856949, + 0.00390970055013895, + -0.01957714557647705, + -0.0541343130171299, + -0.03617547079920769, + -0.01170761976391077, + 0.013290117494761944, + -0.013376045040786266, + -0.016598325222730637, + 0.02027888596057892, + -0.028599530458450317, + 0.014507423155009747, + -0.02662319876253605, + -0.0444817952811718, + -0.010733774863183498, + 0.03952664136886597, + -0.009466344490647316, + -0.018517373129725456, + 0.026981228962540627, + -0.006376535166054964, + -0.0031130812130868435, + 0.012287629768252373, + -0.001385580631904304, + 0.01205132994800806, + 0.006480364594608545, + -0.013956055045127869, + -0.038896508514881134, + -0.011134769767522812, + -0.03543076664209366, + -0.035745833069086075, + -0.015409662388265133, + -0.0023826975375413895, + 0.011356748640537262, + -0.012194542214274406, + -0.01573905162513256, + 0.03806587681174278, + 0.0019727519247680902, + 0.009946106001734734, + 0.006347892805933952, + -0.017443278804421425, + 0.013297278434038162, + 0.006326410919427872, + -0.01168613787740469, + 0.027339261025190353, + 0.016813144087791443, + 0.010275495238602161, + 0.012674303725361824, + 0.025520462542772293, + 0.0009098467417061329, + -0.015295092016458511, + -0.019376646727323532, + 0.012760231271386147, + 0.0070138308219611645, + 0.046028487384319305, + -0.026207882910966873, + 0.00048334209714084864, + 0.005334664601832628, + -0.015423983335494995, + 0.013562221080064774, + -0.03689153119921684, + 0.03757895156741142, + -0.018918367102742195, + -0.013146905228495598, + -0.009387577883899212, + -0.01498002465814352, + -0.05101228132843971, + 0.00027904054149985313, + -0.03502977266907692, + 0.04090148210525513, + -0.0011376440525054932, + -0.055766936391592026, + 0.006995929405093193, + 0.01470792107284069, + 0.0356026217341423, + -0.0045040324330329895, + 0.02779754064977169, + 0.01532373484224081, + 0.013576542027294636, + -0.04284917190670967, + 0.019849248230457306, + -0.0004963207175023854, + 0.0156388022005558, + 0.01634054258465767, + -0.02204039879143238, + -0.004726011771708727, + -0.018431445583701134, + -0.010805381461977959, + 0.023085851222276688, + -0.015767693519592285, + -0.023257706314325333, + -0.012044169008731842, + -0.0023737468291074038, + 0.024618223309516907, + 0.038209088146686554, + -0.007669027894735336, + -0.03843822702765465, + 0.0038595760706812143, + 0.012309111654758453, + 0.028800027444958687, + 0.0020497285295277834, + 0.00374500616453588, + -0.010103640146553516, + 0.019376646727323532, + -0.004085135646164417, + -0.02480440028011799, + -0.009086831472814083, + -0.015438304282724857, + -0.015552874654531479, + -0.011199215427041054, + -0.005961219314485788, + 0.06719528883695602, + 0.018574656918644905, + -0.009230043739080429, + 0.016197331249713898, + -0.025076504796743393, + 0.014428656548261642, + -0.01632622256875038, + 0.006419498939067125, + 0.05072585865855217, + 0.005510099697858095, + 0.007368281949311495, + 0.03133488819003105, + -0.005606768187135458, + -0.005728499032557011, + -0.00343709927983582, + -0.0035176563542336226, + -0.006147395353764296, + 0.02858521044254303, + -0.01815934106707573, + 0.012860479764640331, + -0.024217229336500168, + 0.010518955998122692, + -0.020823093131184578, + 0.025606390088796616, + -0.023257706314325333, + 0.004060073755681515, + -0.025692317634820938, + -0.02975955232977867, + -0.010361422784626484, + 0.0417034737765789, + -0.00839225109666586, + 0.004751073662191629, + -0.022026078775525093, + -0.025319965556263924, + -0.002534860745072365, + -0.031649958342313766, + 0.022641891613602638, + 0.009008064866065979, + 0.0038595760706812143, + 0.02262757159769535, + 0.028671137988567352, + -0.028456319123506546, + 0.000274341378826648, + 0.02095198445022106, + -0.029387200251221657, + 0.03236601874232292, + -0.00691358232870698, + -0.0179158803075552, + -0.04688776284456253, + -0.0002058679237961769, + -0.042677316814661026, + -0.010332779958844185, + 0.017844274640083313, + 0.029243987053632736, + 0.003635806730017066, + -0.030676111578941345, + -0.007339639123529196, + 0.05539458617568016, + 0.023630058392882347, + -0.013941734097898006, + -0.0031327728647738695, + -0.03331122174859047, + -0.001010542968288064, + 0.015495589934289455, + 0.02371598593890667, + -0.04207582399249077, + 0.020107030868530273, + 0.0037808092311024666, + 0.001917256973683834, + -0.0037987108808010817, + -0.024732794612646103, + 0.006372955162078142, + -0.01977764256298542, + 0.007020991295576096, + -0.01114193070679903, + -0.026136275380849838, + -0.004557737149298191, + 0.05848797410726547, + -0.02711012028157711, + 0.02499057725071907, + 0.05605336278676987, + 0.06393004953861237, + 0.010261173360049725, + -0.02636541612446308, + -0.0032312313560396433, + -0.046228986233472824, + 0.03806587681174278, + 0.024489331990480423, + -0.0029018428176641464, + -0.03654782474040985, + -0.008843369781970978, + -0.03543076664209366, + 0.01874651201069355, + 0.04310695454478264, + -0.061180368065834045, + 0.003791550174355507, + 0.01192959863692522, + -0.0004513430467341095, + 0.0010794639820232987, + 0.019963819533586502, + -0.007962613366544247, + -0.009903142228722572, + 0.020994948223233223, + -0.007568779401481152, + 0.006491105537861586, + -0.01943393237888813, + -0.010819702409207821, + 0.0008239192538894713, + 0.03448556363582611, + -0.03236601874232292, + -0.01099871750921011, + -0.02027888596057892, + 0.03577447682619095, + 0.021138161420822144, + -0.035803116858005524, + -0.01293924730271101, + -0.01168613787740469, + 0.03617547079920769, + -0.029358556494116783, + 0.025506140664219856, + 0.05387653410434723, + 0.028313105925917625, + -0.040815554559230804, + 0.003884638426825404, + -0.028570888563990593, + -0.02519107423722744, + 0.026651840656995773, + 0.024861685931682587, + 0.019118865951895714, + 0.03356900438666344, + 0.0011519653489813209, + 0.04539835453033447, + 0.0024005991872400045, + -0.01878947578370571, + 0.025420213118195534, + -0.017343031242489815, + -0.009136956185102463, + 0.02480440028011799, + 0.018073413521051407, + -0.024317478761076927, + 0.005155649036169052, + -0.018861083313822746, + 0.005628250073641539, + 0.004955151583999395, + -0.015266449190676212, + 0.0244034044444561, + -0.012266147881746292, + -0.032108236104249954, + -0.0007800604216754436, + -0.01021104957908392, + -0.009287328459322453, + -8.318630716530606e-05, + 0.014879776164889336, + -0.0049909548833966255, + -0.005699856206774712, + 0.039927639067173004, + -0.000208553159609437, + 0.030962536111474037, + -0.0037378454580903053, + 0.01593954861164093, + -0.010805381461977959, + -0.0053382450714707375, + -0.010168085806071758, + -0.027124442160129547, + -0.003392345504835248, + 0.04121654853224754, + 0.014600511640310287, + -0.00445390772074461, + 0.00749001232907176, + -0.0065949345007538795, + -0.037120673805475235, + 0.0018563916673883796, + -0.004937250167131424, + 0.02052234672009945, + -0.025549104437232018, + 0.0019190470920875669, + -0.006756048183888197, + 0.017686739563941956, + 0.03159267082810402, + 0.017944522202014923, + -0.014937060885131359, + -0.02066555991768837, + -0.0005433123442344368, + -0.021281372755765915, + -0.037865377962589264, + 0.03311072289943695, + -0.02420290745794773, + -0.002975239185616374, + -0.010955753736197948, + -0.008270520716905594, + -0.005907514598220587, + 0.0331680104136467, + 0.023400917649269104, + 0.02967362478375435, + 0.006709504406899214, + 0.015037309378385544, + -0.0008476388175040483, + 0.001616510795429349, + -0.006448141764849424, + 0.04419536888599396, + -0.032050952315330505, + -0.006226162426173687, + -0.026508629322052002, + -0.018861083313822746, + -0.011872313916683197, + -0.021295694634318352, + 0.012538252398371696, + -0.004486130550503731, + -0.00838509015738964, + -0.01692771352827549, + 0.012402200140058994, + 0.02400241047143936, + -0.02597874216735363, + 0.044854145497083664, + -0.0039848871529102325, + 0.0037485864013433456, + -0.006906421389430761, + -0.009351774118840694, + -0.00016044272342696786, + 0.050697214901447296, + 0.029286950826644897, + 0.01987789198756218, + 0.011542925611138344, + 0.014278283342719078, + -0.04304967075586319, + 0.0011609160574153066, + 0.0055494834668934345, + 0.07916785776615143, + -0.029014846310019493, + 0.029845479875802994, + 0.0020300368778407574, + -0.011807868257164955, + -0.031764525920152664, + -0.009509308263659477, + 0.040271345525979996, + -0.017385995015501976, + 0.046515412628650665, + 0.005084042903035879, + -0.002354054944589734, + -0.014478781260550022, + 0.016798822209239006, + 0.016297578811645508, + 0.008306323550641537, + 0.023100171238183975, + -0.025806887075304985, + -0.005087622907012701, + -0.04213310778141022, + -0.020679881796240807, + 0.014937060885131359, + 0.045885276049375534, + -0.012258987873792648, + -0.01632622256875038, + -0.025420213118195534, + -0.0012853319058194757, + 0.034027282148599625, + -0.012781713157892227, + -0.010862666182219982, + -0.026694804430007935, + 0.015466947108507156, + 0.03336850553750992, + 0.00300030130892992, + 0.029186701402068138, + -0.0013291907962411642, + -0.011843671090900898, + -0.0239594466984272, + 0.024675508961081505, + -0.03757895156741142, + 0.02106655389070511, + -0.019863570109009743, + -0.016598325222730637, + -0.0005325714009813964, + 0.006154555827379227, + 0.03720660135149956, + 0.008406572043895721, + -0.008528302423655987, + -0.01161453127861023, + 0.017199818044900894, + 0.012638500891625881, + 0.0017794149462133646, + 0.03497248515486717, + -0.02670912630856037, + 0.031907737255096436, + -0.010690811090171337, + -0.03462877497076988, + -0.013784200884401798, + -0.0023630058858543634, + -0.011449837125837803, + -0.008263359777629375, + -0.0063228304497897625, + 0.007447048556059599, + 0.023930804803967476, + 0.0011367490515112877, + 0.03414185345172882, + 0.029115095734596252, + -0.018961330875754356, + 0.01188663486391306, + -0.017944522202014923, + -0.02814125083386898, + -0.00749001232907176, + -0.0009854808449745178, + 0.0010508215054869652, + 0.0067381467670202255, + 0.008786085061728954, + -0.04038591682910919, + 0.006963706575334072, + -0.021195445209741592, + 0.03531619533896446, + 0.0014312296407297254, + 0.018588978797197342, + -0.004844161681830883, + -0.01350493635982275, + -0.01800180785357952, + 0.015667444095015526, + 0.007389763370156288, + -0.015681765973567963, + 0.008062861859798431, + -0.018417123705148697, + 0.02085173688828945, + 0.0011734472354874015, + 0.010891309008002281, + -0.02434612065553665, + -0.02145322784781456, + 0.01751488633453846, + 0.01259553711861372, + -0.005216514226049185, + 0.013168387115001678, + 0.0034209878649562597, + 0.034514207392930984, + -0.0012593746650964022, + -0.007697670254856348, + -0.02411697991192341, + -0.04133111983537674, + -0.010769577696919441, + 0.0001040528150042519, + -0.029788194224238396, + 0.010719453915953636, + 0.0005580810829997063, + -0.01397753693163395, + -0.03236601874232292, + 0.0067381467670202255, + -0.023100171238183975, + -0.019548501819372177, + 0.02046506293118, + -0.031134391203522682, + -0.013390365988016129, + -0.01662696897983551, + 0.021882865577936172, + -0.02076580934226513, + -0.015782015398144722, + 0.02961633913218975, + -0.05132735148072243, + -0.00446464866399765, + 0.012824676930904388, + 0.009043867699801922, + -0.03852415457367897, + 0.0060077630914747715, + -0.0366051085293293, + -0.00799841620028019, + -0.03322529420256615, + 0.004425265360623598, + -0.0018125328933820128, + 0.011034521274268627, + 0.019706036895513535, + 0.023100171238183975, + 0.00930165033787489, + 0.03895379230380058, + -0.0028624592814594507, + -0.004879964981228113, + -0.005008856300264597, + -0.0038774777203798294, + -0.0044718096032738686, + -0.0018062673043459654, + -0.01559583842754364, + -0.011521443724632263, + -0.03119167685508728, + -0.026107633486390114, + 0.024389084428548813, + -0.002778321970254183, + -0.017042284831404686, + -0.023114493116736412, + 0.011514282785356045, + 0.002806964563205838, + -0.008506820537149906, + -0.012144417501986027, + -0.036719679832458496, + 0.0032079594675451517, + -0.0031846873462200165, + -0.026336774230003357, + 0.04038591682910919, + 0.031363531947135925, + -0.010117961093783379, + -0.009230043739080429, + 0.012688624672591686, + -0.03425642475485802, + -0.043364737182855606, + 0.011256500147283077, + 0.014851133339107037, + 0.014643475413322449, + 0.03428506478667259, + -0.0226848553866148, + -0.012502448633313179, + -0.003617905080318451, + -0.0160827599465847, + -0.003927601967006922, + -0.02941584214568138, + 0.0444817952811718, + 0.011872313916683197, + 0.03557397797703743, + 0.01771538332104683, + -0.03162131458520889, + 0.02199743501842022, + 0.014922739937901497, + 0.009187079966068268, + -0.029444484040141106, + 0.024661187082529068, + -0.054535310715436935, + 0.0120083661749959, + 0.03734981268644333, + 0.010891309008002281, + 0.009101152420043945, + 0.008886333554983139, + -0.008936458267271519, + -0.05969095975160599, + -0.004582799039781094, + 0.009115474298596382, + 0.01884676143527031, + 0.0034478402230888605, + 0.027725934982299805, + 0.00446464866399765, + 0.013905931264162064, + -0.01490841805934906, + -0.012258987873792648, + -0.011442676186561584, + -0.018316876143217087, + -0.01662696897983551, + 0.0026225782930850983, + -0.020107030868530273, + -0.01498002465814352, + 0.006344312336295843, + 0.003258083714172244, + -0.009537951089441776, + 0.04571342095732689, + 0.012788874097168446, + -0.008886333554983139, + 0.03182180970907211, + 0.0024865265004336834, + -0.007805079687386751, + -0.03703474625945091, + 0.00993894599378109, + -0.03577447682619095, + -0.015237807296216488, + -0.01825959049165249, + -0.012509609572589397, + -0.026293810456991196, + -0.03030375950038433, + 0.03952664136886597, + 0.020722845569252968, + -0.06461746990680695, + -0.003284936072304845, + 0.022398430854082108, + -0.01687042973935604, + 0.028513602912425995, + 0.015567195601761341, + 0.0019584305118769407, + -0.0035069154109805822, + -0.031420815736055374, + -0.004901446867734194, + -0.0006422184524126351, + -0.020579632371664047, + -0.02947312779724598, + -0.009043867699801922, + -0.004357239697128534, + -0.020393455401062965, + -0.022298181429505348, + 0.028757063671946526, + -0.007948292419314384, + -0.02509082481265068, + -0.045541565865278244, + -0.01840280182659626, + 0.014822490513324738, + 0.00314888427965343, + 0.027539758011698723, + 0.005803685635328293, + 0.020751487463712692, + 0.010074997320771217, + 0.011127608828246593, + -0.025864172726869583, + 0.02066555991768837, + 0.001144804758951068, + 0.007554457988590002, + -0.017643775790929794, + -0.02460390329360962, + 0.011399712413549423, + 0.012423682026565075, + -0.004425265360623598, + -0.008893494494259357, + 0.0174719225615263, + -0.008850530721247196, + 0.017629455775022507, + 0.033139366656541824, + -0.01727142371237278, + 0.014199516735970974, + -0.021381622180342674, + -0.004883545450866222, + 0.02086605690419674, + 0.03414185345172882, + 0.015495589934289455, + 0.03408456966280937, + 0.015767693519592285, + 0.019548501819372177, + -0.038638725876808167, + 0.0011797127081081271, + -0.03523026779294014, + -0.004256990738213062, + -0.04937966167926788, + 0.05101228132843971, + -0.01898997463285923, + -0.0019208373269066215, + -0.0486922413110733, + -0.027382224798202515, + 0.024876005947589874, + 0.024589581415057182, + -0.008528302423655987, + 0.021668046712875366, + 0.012165899388492107, + -0.005914675071835518, + 0.003673400031402707, + 0.016598325222730637, + 0.030246473848819733, + -0.01079822052270174, + -0.0013802101602777839, + -0.01666993275284767, + -0.0015234226593747735, + -0.0001288912317249924, + 0.02209768444299698, + -0.018388481810688972, + 0.027625685557723045, + 0.008349287323653698, + -0.007676188368350267, + 0.006233322899788618, + 0.009287328459322453, + 0.006061467807739973, + 0.03268108516931534, + 0.003558829892426729, + 0.01666993275284767, + 0.003315368667244911, + -0.014879776164889336, + -0.008864851668477058, + 0.019161829724907875, + -0.021539155393838882, + -0.0006695183110423386, + 0.012137257494032383, + -0.040128134191036224, + 0.01281751599162817, + 0.0287857074290514, + -0.005402690730988979, + -0.009810054674744606, + -0.0013130793813616037, + -0.0033243196085095406, + -0.023544130846858025, + -0.02365870028734207, + -0.007439888082444668, + 0.022842388600111008, + -0.027983717620372772, + 0.0004708110063802451, + -0.0011537554673850536, + 0.011277982033789158, + 0.004274892155081034, + -0.031105749309062958, + 0.033683571964502335, + -0.02331499010324478, + -0.019605787470936775, + 0.009516469202935696, + -0.02961633913218975, + -0.04680183529853821, + -0.03620411455631256, + 0.02135298028588295, + -0.04385165870189667, + -0.026437021791934967, + -0.00023204895842354745, + 0.005531581584364176, + -0.007035312708467245, + -0.054019745439291, + -0.02120976708829403, + -0.0001372825790895149, + 0.013189869001507759, + -0.015481268055737019, + -0.0005800105282105505, + 0.006691602990031242, + -0.027239011600613594, + 0.021037911996245384, + -0.015882262960076332, + -0.029143737629055977, + -0.009702645242214203, + -0.01532373484224081, + 0.021625082939863205, + -0.02519107423722744, + 0.018245268613100052, + -0.007439888082444668, + 0.031163034960627556, + -0.01045451033860445, + 0.0226848553866148, + -0.010962914675474167, + 0.008564106188714504, + -0.015509910881519318, + -0.029845479875802994, + -0.005828747525811195, + -0.002047938294708729, + 0.010612044483423233, + -0.010017712600529194, + 0.009767090901732445, + 0.0584593303501606, + -0.009702645242214203, + -0.0339413546025753, + -0.015867941081523895, + 0.015538553707301617, + 0.007404084783047438, + -0.04296374320983887, + 0.002923324704170227, + -0.02347252517938614, + -0.0504680760204792, + 0.017887238413095474, + -0.054879020899534225, + -0.015080273151397705, + 0.0063120899721980095, + -0.018660584464669228, + 0.008571266196668148, + -0.04565613716840744, + -0.0011483849957585335, + -0.0022931897547096014, + 0.015366698615252972, + -0.020135672762989998, + -0.022154970094561577, + -0.028370391577482224, + -0.011320945806801319, + -0.01230195164680481, + -0.004436006303876638, + 0.006326410919427872, + -0.010282655246555805, + 0.016412150114774704, + -0.012495288625359535, + -0.013640987686812878, + -0.018130699172616005, + -0.06862741708755493, + 0.04345066472887993, + 0.01992085576057434, + 0.0036071641370654106, + -0.02357277274131775, + 0.019620109349489212, + -0.02553478442132473, + -0.01109180599451065, + 0.009580914862453938, + 0.023186098784208298, + -0.018288232386112213, + 0.017772667109966278, + 0.0305042564868927, + 0.006204680539667606, + 0.00346216163598001, + 0.028470639139413834, + 0.004385882057249546, + -0.02716740593314171, + 0.03336850553750992, + 0.0009353564819321036, + -0.04743197187781334, + -0.004901446867734194, + -0.022154970094561577, + -0.00570701714605093, + -0.00952362921088934, + -0.003284936072304845, + -0.06032109260559082, + 0.007235810160636902, + 0.017944522202014923, + -0.019405290484428406, + 0.003977726213634014, + -0.020049747079610825, + -0.019147507846355438, + -0.019720356911420822, + -0.02882867120206356, + 0.02327202633023262, + 0.010970075614750385, + -0.01834551803767681, + -0.015710407868027687, + 0.02484736405313015, + -0.022513000294566154, + 0.013590863905847073, + 0.00044821028131991625, + 0.014385692775249481, + 0.005664053373038769, + -0.03491520136594772, + 0.0027675810270011425, + 0.00804137997329235, + 0.04654405266046524, + 0.011793547309935093, + -0.02489032782614231, + -0.044395867735147476, + 0.0035409284755587578, + 0.021668046712875366, + 0.027439510449767113, + 0.0005701646441593766, + -0.003974146209657192, + 0.011836511082947254, + -0.02848496101796627, + -0.0018331196624785662, + -0.014543226920068264, + -0.0059361569583415985, + 0.008241877891123295, + 0.019004294648766518, + 0.012473806738853455, + 0.005248737055808306, + -0.015366698615252972, + 0.016942035406827927, + 0.014679278247058392, + -0.0008136258693411946, + 0.018775155767798424, + 0.01223034504801035, + 0.05098364129662514, + -0.02434612065553665, + -0.012495288625359535, + 0.018875403329730034, + -0.021467549726366997, + -0.055079516023397446, + -0.011593049392104149, + 0.020307527855038643, + 0.0209663063287735, + 0.006437400821596384, + 0.006075789220631123, + -0.018374159932136536, + 0.037865377962589264, + -0.015194843523204327, + 0.013125423341989517, + 0.04044320061802864, + -0.021925829350948334, + 0.004382301587611437, + -0.018617620691657066, + 0.004138840362429619, + 0.011729101650416851, + -0.004188964609056711, + 0.0021070134826004505, + 0.02559206821024418, + -0.003487223759293556, + 0.004937250167131424, + 0.0037700682878494263, + 0.0008118356927298009, + 0.004117358475923538, + -0.005538742523640394, + 0.03723524138331413, + -0.03202230855822563, + 0.022355467081069946, + -0.03411320969462395, + 0.019706036895513535, + 0.013512096367776394, + -0.03288158401846886, + 0.010117961093783379, + 0.016311900690197945, + 0.005116265732795, + -0.02503354102373123, + 0.032108236104249954, + -0.023945124819874763, + 0.007984095253050327, + -0.03365493193268776, + 0.029000526294112206, + -0.006204680539667606, + -0.0036913014482706785, + 0.010332779958844185, + 0.009709805250167847, + -0.008671515621244907, + 0.0014518164098262787, + -0.02468983083963394, + 0.007028152234852314, + 0.009623878635466099, + -0.021238408982753754, + 0.014550386928021908, + -0.04213310778141022, + -0.026694804430007935, + 0.015581517480313778, + 0.007071116007864475, + -0.02002110332250595, + -0.02656591311097145, + ], + "index": 24, + }, + { + "title": "Baron Birdwood", + "text": "Baron Birdwood, of Anzac and of Totnes in the County of Devon, was a title in the Peerage of the United Kingdom. It was created on 25 January 1938 for Sir William Birdwood, 1st Baronet. He is chiefly remembered as the commander of the Australian and New Zealand Army Corps (ANZAC) during the Gallipoli Campaign of 1915. Birdwood had already been created a Baronet, of Anzac and Totnes, on 6 October 1919.", + "vector": [ + 0.015234222635626793, + 0.005028111394494772, + -0.028315488249063492, + 0.002980757039040327, + 0.0014648291980847716, + 0.04186004772782326, + -0.0008469608146697283, + -0.022238150238990784, + -0.004067455884069204, + 0.06001030281186104, + 0.0016087570693343878, + 0.04537563771009445, + -0.059356238692998886, + 0.008305240422487259, + 0.028015708550810814, + 0.026489561423659325, + -0.04867320507764816, + 0.003798336023464799, + -0.0495452918112278, + -0.01648784428834915, + 0.05197077617049217, + 0.005290417931973934, + 0.004360421560704708, + -0.02861526608467102, + 0.009919959120452404, + 0.022578807547688484, + 0.029214825481176376, + 0.005716240033507347, + 0.048209913074970245, + -0.0008635678677819669, + -0.03752687945961952, + -0.039134785532951355, + 0.028588013723492622, + -0.02790669910609722, + 0.0329756885766983, + -0.02559022419154644, + -0.03401128947734833, + 0.01561576034873724, + 0.013381043449044228, + -0.0021972437389194965, + -0.04938177391886711, + -0.05066264793276787, + -0.019349370151758194, + -0.013312912546098232, + 0.014893565326929092, + -0.046274974942207336, + -0.04104246944189072, + 0.030631961300969124, + -0.014144117943942547, + 0.0013745548203587532, + 0.04733782634139061, + -0.02742977812886238, + 0.00439108069986105, + 0.0659513771533966, + 0.01849091239273548, + 0.008584580384194851, + 0.03938005864620209, + 0.035700950771570206, + -0.034447330981492996, + -0.003185151843354106, + -0.013721701689064503, + -0.03788116201758385, + -0.0509079210460186, + 0.009061501361429691, + -0.002514055697247386, + -0.024922534823417664, + 0.06840411573648453, + 0.0591382198035717, + -0.04605695232748985, + -0.0509079210460186, + 0.015206970274448395, + -0.012243246659636497, + 0.014089612290263176, + 0.05058089271187782, + 0.0419418066740036, + -0.0005987063050270081, + 0.027375271543860435, + 0.013108517974615097, + -0.06518830358982086, + 0.03125877305865288, + 0.02069837599992752, + 0.005389208439737558, + -0.01507070753723383, + 0.04581167921423912, + 0.020984528586268425, + 0.029950646683573723, + -0.036954574286937714, + -0.03551018238067627, + 0.0007490216521546245, + -0.059628766030073166, + 0.022047381848096848, + 0.008141724392771721, + 0.049736060202121735, + -0.023369135335087776, + -0.00658491812646389, + -0.018368275836110115, + 0.03551018238067627, + -0.013871591538190842, + 0.0419963113963604, + -0.04387674108147621, + -0.014675543643534184, + -0.019076844677329063, + -0.028369992971420288, + -0.013019946403801441, + 0.011316657066345215, + 0.001078182365745306, + 0.0021410351619124413, + -0.02620340883731842, + 0.012399949133396149, + 0.025440335273742676, + 0.032103605568408966, + 0.015329607762396336, + 0.01692388579249382, + -0.0018276298651471734, + -0.026966482400894165, + 0.03142228722572327, + 0.04139675199985504, + -0.019049592316150665, + -0.06082788109779358, + 0.002634989097714424, + -0.03730885684490204, + -0.007024366874247789, + -0.02103903517127037, + -0.05423274263739586, + 0.04085170105099678, + -0.049027491360902786, + -0.010526330210268497, + 0.0838836133480072, + -0.017755091190338135, + 0.03878049924969673, + -0.01056720968335867, + -0.025494839996099472, + 0.017727838829159737, + -0.0247453935444355, + 0.03191283717751503, + 0.03065921552479267, + -0.01770058646798134, + -0.0071333772502839565, + 0.016528723761439323, + -0.0021069692447781563, + 0.02103903517127037, + 0.008543700911104679, + 0.0014920817920938134, + 0.002718450268730521, + 0.03202184662222862, + 0.0008925237925723195, + 0.05186176300048828, + 0.02392781339585781, + 0.026244288310408592, + -0.015888286754488945, + 0.0012289235601201653, + 0.04221433028578758, + 0.030359435826539993, + 0.020643871277570724, + 0.0020473541226238012, + -0.06764104217290878, + -0.06431622058153152, + -0.03041394054889679, + -0.0036143807228654623, + 0.06633291393518448, + -0.0398978590965271, + 0.005075803492218256, + -0.03905302658677101, + -0.0019247173331677914, + 0.03812643513083458, + 0.040797196328639984, + -0.023873308673501015, + -0.012434015050530434, + -0.008605019189417362, + 0.005927448160946369, + -0.03425656259059906, + -0.023260124027729034, + 0.0647522583603859, + 0.019390249624848366, + -0.04014313220977783, + 0.061863481998443604, + -0.012590717524290085, + 0.03139503672719002, + -0.021297933533787727, + 0.008128098212182522, + -0.021488703787326813, + -0.063335120677948, + -0.045348383486270905, + 0.0003906920610461384, + -0.011153141036629677, + 0.001892354805022478, + 0.05327890068292618, + 0.04624772071838379, + -0.06262655556201935, + 0.048237163573503494, + 0.005576570518314838, + -0.013210714794695377, + 0.03055020421743393, + -0.025562971830368042, + 0.03000515140593052, + 0.031722068786621094, + 0.0019264206057414412, + 0.024186713621020317, + -0.01104413066059351, + 0.03139503672719002, + 0.0116913802921772, + -0.0591927245259285, + 0.03068646788597107, + -0.0004556299827527255, + -0.0158065278083086, + 0.02670758217573166, + -0.04594794288277626, + 0.0398978590965271, + -0.009299961850047112, + 0.007998648099601269, + -0.026516813784837723, + -0.0016377130523324013, + -0.020957276225090027, + 0.005344923119992018, + -0.039025772362947464, + 0.015343233942985535, + -0.016610480844974518, + -0.026625825092196465, + 0.000436893809819594, + -0.0032192175276577473, + -0.03346623480319977, + 0.0021393317729234695, + 0.01879069209098816, + 0.012910936027765274, + -0.0104990778490901, + -0.012917748652398586, + -0.014075986109673977, + -0.002551527926698327, + -0.0051882206462323666, + 0.004036796744912863, + -0.03409304842352867, + -0.008005461655557156, + -0.01701926998794079, + 0.02738889865577221, + 0.005157561041414738, + 0.04324993118643761, + -0.008870732970535755, + -0.04186004772782326, + 0.025331323966383934, + -0.03177657350897789, + -0.031994592398405075, + 0.06360764801502228, + 0.00948391668498516, + -0.04186004772782326, + 0.011711820028722286, + -0.010730724781751633, + 0.03346623480319977, + -0.024990666657686234, + -0.06426171213388443, + 0.013374230824410915, + 0.08039527386426926, + 0.01562938652932644, + -0.010097101330757141, + -0.012583903968334198, + 0.019594645127654076, + -0.013054012320935726, + 0.008496008813381195, + 0.02984163537621498, + 0.06415270268917084, + 0.03782665729522705, + 0.0027133405674248934, + 0.041178733110427856, + 0.014171370305120945, + 0.04166927933692932, + -0.03311195224523544, + -0.046711016446352005, + -0.04210532084107399, + -0.005988766439259052, + -0.011820830404758453, + -0.04921825975179672, + -0.00179697060957551, + -0.0011463139671832323, + 0.021257055923342705, + -0.055513616651296616, + -0.02943284623324871, + 0.008557327091693878, + 0.026762086898088455, + 0.009347653947770596, + -0.02467726171016693, + 0.03382052108645439, + 0.020275959745049477, + -0.047937385737895966, + -0.007235574536025524, + -0.03463809937238693, + -0.049163755029439926, + 0.01838190294802189, + 0.0134082967415452, + 0.006295358762145042, + 0.019144976511597633, + -0.010090287774801254, + -0.021079912781715393, + 0.06682346016168594, + -0.00023547980526927859, + -0.01644696481525898, + -0.007991835474967957, + -0.004537563771009445, + -0.01763245463371277, + -0.04499410092830658, + -0.002507242374122143, + -0.03188558295369148, + 0.020984528586268425, + -0.02392781339585781, + -0.036273255944252014, + 0.01060127466917038, + 0.05366043746471405, + 0.0025958134792745113, + -0.021897492930293083, + 0.009047875180840492, + -0.009736004285514355, + 0.038044679909944534, + -0.039134785532951355, + -0.005603823345154524, + 0.007896451279520988, + -0.019144976511597633, + -0.03850797191262245, + -0.004302509594708681, + -0.00044030038407072425, + 8.53241654112935e-05, + -0.03946181759238243, + 0.044258277863264084, + -0.03354799374938011, + -0.04033390060067177, + -0.04791013151407242, + -0.06393468379974365, + 0.023846056312322617, + -0.013163022696971893, + 0.07309156656265259, + -0.008475570008158684, + -0.04295015335083008, + -0.024241218343377113, + -0.018668055534362793, + -0.06110040843486786, + 0.04224158450961113, + 0.008707216940820217, + 0.02093002386391163, + 0.05526834353804588, + 0.002313067438080907, + 0.025917256250977516, + 0.001451202784664929, + -0.008673151023685932, + -0.01594279147684574, + 0.0502266064286232, + 0.011957094073295593, + 0.02406407706439495, + -0.014089612290263176, + 0.0769614428281784, + -0.009994903579354286, + 0.03586446866393089, + 0.001808893634006381, + -0.0271572507917881, + 0.0005450526950880885, + 0.023137487471103668, + 0.050689902156591415, + 0.02426847256720066, + -0.01043094601482153, + 0.010199299082159996, + -0.0020558706019073725, + -0.027879446744918823, + -0.03605523705482483, + 0.06153644993901253, + -0.017986739054322243, + 0.020275959745049477, + -0.005344923119992018, + 0.04275938495993614, + -0.05352417379617691, + -0.021434197202324867, + 0.028942298144102097, + -0.0018906515324488282, + -0.025276819244027138, + -0.03820819407701492, + -0.0025327918119728565, + 0.01090786699205637, + -0.03442007675766945, + -0.03027767688035965, + -0.016937512904405594, + -0.011636875569820404, + -0.031667560338974, + -0.009572488255798817, + -0.011159953661262989, + -0.003920972812920809, + 0.015111586079001427, + -0.03188558295369148, + 0.010233364067971706, + -0.036954574286937714, + 0.013469615019857883, + -0.01066940650343895, + 0.01090786699205637, + 0.04771936312317848, + 0.001016863971017301, + 0.011493799276649952, + -0.041478510946035385, + 0.052624840289354324, + -0.009477104060351849, + -0.0058593167923390865, + -0.032675910741090775, + -0.018123002722859383, + 0.014634665101766586, + 0.003123833332210779, + 0.03621875122189522, + 0.009613366797566414, + 0.020330466330051422, + 0.018368275836110115, + 0.056358449161052704, + 0.024213965982198715, + 0.044094763696193695, + -0.007923703640699387, + 0.015220596455037594, + 0.0032072945032268763, + -0.042868394404649734, + -0.009122819639742374, + -0.005750305950641632, + -0.016269823536276817, + 0.01903596520423889, + 0.020671123638749123, + -0.007569419220089912, + 0.00064767588628456, + -0.041314996778964996, + 0.02368254028260708, + 0.011800390668213367, + -0.039679836481809616, + 0.03463809937238693, + -0.019267613068223, + -0.05349692329764366, + 0.05581339821219444, + -0.013776207342743874, + -0.006090964190661907, + 0.003208997892215848, + 0.03630051016807556, + -0.04543014243245125, + -0.028424497693777084, + -0.004670420195907354, + -0.04815540462732315, + 0.014334886334836483, + 0.05581339821219444, + -0.018545418977737427, + -0.0481826588511467, + -0.031694814562797546, + -0.000923182989936322, + 0.006721181329339743, + 0.021829361096024513, + -0.02538583055138588, + 0.03283942490816116, + -0.04071543738245964, + 0.00781469326466322, + -0.08415614068508148, + -0.002946691121906042, + 0.020752882584929466, + -0.03248514235019684, + 0.016188064590096474, + -0.010015343315899372, + -0.02484077773988247, + -0.014621038921177387, + -0.015043454244732857, + 0.026053519919514656, + -0.027811314910650253, + -0.03499238193035126, + 0.03725435212254524, + 0.0209981556981802, + -0.028996804729104042, + -0.003621193813160062, + -0.04251411184668541, + 0.04123323783278465, + 0.016664985567331314, + 0.001810596906580031, + 0.04791013151407242, + -0.016596855595707893, + -0.022442545741796494, + -0.007964582182466984, + -0.007535353768616915, + 0.011800390668213367, + -0.002369276015087962, + -0.016869381070137024, + -0.003968664910644293, + 0.07663440704345703, + -0.023369135335087776, + 0.009558862075209618, + 0.0007102718227542937, + -0.013013133779168129, + 0.06251754611730576, + 0.08448316901922226, + 0.0019213107880204916, + -0.03739061579108238, + 0.018817944452166557, + -0.015424991957843304, + -0.010015343315899372, + -0.061972491443157196, + -0.0398978590965271, + 0.025140555575489998, + -0.0038971267640590668, + 0.0398978590965271, + -0.00980413518846035, + 0.04049741476774216, + -0.04652024805545807, + -0.00827798806130886, + -0.027743183076381683, + 0.029787130653858185, + -0.047256071120500565, + 0.037227097898721695, + 0.0030028996989130974, + 0.017278170213103294, + -0.017659706994891167, + -0.010785230435431004, + 0.03499238193035126, + 0.00548118632286787, + 0.019703654572367668, + 0.0037540504708886147, + -0.02627154067158699, + 0.08039527386426926, + 0.02127068117260933, + 0.038889508694410324, + -0.003972071688622236, + 0.053878460079431534, + 0.004864595364779234, + 0.012359069660305977, + 0.013088078238070011, + -0.03373876214027405, + 0.005470966454595327, + 0.0010730725480243564, + -0.026448681950569153, + 0.00469767302274704, + 0.01947200857102871, + -0.0020405410323292017, + -0.037772152572870255, + 0.023369135335087776, + 0.029814383015036583, + 0.00915688555687666, + -0.0025344949681311846, + 0.020684750750660896, + 0.025835497304797173, + -0.02429572492837906, + -0.00639755604788661, + 0.02110716514289379, + -0.010948746465146542, + -0.03455634042620659, + -0.029351087287068367, + 0.033902280032634735, + 0.01746893860399723, + 0.011555117554962635, + -0.031449541449546814, + 0.00773974834010005, + -0.010451385751366615, + -0.051507480442523956, + -0.00402657687664032, + -0.0029892735183238983, + -0.020548487082123756, + 0.017305422574281693, + 0.04333169013261795, + 0.041751038283109665, + -0.011739072389900684, + -0.003651853185147047, + -0.009136445820331573, + 0.006901729851961136, + -0.013680823147296906, + 0.008707216940820217, + -0.0014205436455085874, + 0.00270652724429965, + -0.04488509148359299, + 0.01883157156407833, + -0.029759878292679787, + 0.006131842732429504, + 0.03741787001490593, + -3.071244282182306e-05, + 0.021093539893627167, + -0.005736679770052433, + 0.028179224580526352, + 0.0042003123089671135, + 0.029405593872070312, + 0.005593603476881981, + 0.028315488249063492, + 0.01726454496383667, + 0.0196082703769207, + 0.00015414772497024387, + 0.04224158450961113, + 0.015261475928127766, + -0.01498894952237606, + -0.019499260932207108, + 0.004632947966456413, + 0.0154794966802001, + 0.0077329352498054504, + 0.035700950771570206, + 0.0035905346740037203, + -0.011957094073295593, + 0.03264865651726723, + -0.004016357008367777, + 0.009647432714700699, + 0.008203043602406979, + -0.01562938652932644, + 0.024186713621020317, + 0.03646402433514595, + -0.033766016364097595, + 0.03621875122189522, + -0.005702613852918148, + -0.026257913559675217, + -0.013721701689064503, + 0.036273255944252014, + 0.041314996778964996, + -0.04594794288277626, + 0.059901293367147446, + -0.012883683666586876, + 0.005474373232573271, + 0.013517307117581367, + -0.007535353768616915, + 0.015424991957843304, + 0.003645039862021804, + 0.0035632820799946785, + -0.0031936680898070335, + 0.019581018015742302, + -0.007365024648606777, + 0.0034678978845477104, + 0.026039892807602882, + 0.0028819660656154156, + -0.026802966371178627, + -0.01849091239273548, + 0.03403853997588158, + -0.003099987283349037, + -0.018341023474931717, + 0.01967640221118927, + 0.0371180884540081, + 0.03000515140593052, + -0.009613366797566414, + 0.039162036031484604, + -0.02623066119849682, + 0.029242077842354774, + -0.012767859734594822, + 0.024881655350327492, + -0.02627154067158699, + 0.00167603709269315, + -0.010328749194741249, + 0.002060980536043644, + 0.012631596066057682, + -0.019049592316150665, + 0.008427876979112625, + -0.013265220448374748, + 0.007446782663464546, + -0.014403018169105053, + -0.0042684441432356834, + -0.006107996683567762, + -0.042023561894893646, + -0.04624772071838379, + -0.003226030617952347, + -0.010267429985105991, + -0.0005965772434137762, + -0.03842621669173241, + -0.017087401822209358, + -0.009933585301041603, + -0.006053491495549679, + 0.02083463966846466, + -0.04731057584285736, + -0.007160630077123642, + -0.003931192681193352, + -0.013776207342743874, + 0.031449541449546814, + -0.027811314910650253, + 0.0048952545039355755, + 0.011173580773174763, + -0.021624965593218803, + -0.0014929333701729774, + -0.016133559867739677, + 0.015261475928127766, + 0.019076844677329063, + 0.03551018238067627, + -0.07363662123680115, + -0.005736679770052433, + 0.012856430374085903, + 0.011050943285226822, + 0.004425146616995335, + -0.01631070300936699, + 0.028233729302883148, + 0.029214825481176376, + -0.008802601136267185, + 0.0659513771533966, + -0.002537901746109128, + 0.0056821745820343494, + -0.025208687409758568, + -0.036382269114255905, + -0.015356860123574734, + -0.025372203439474106, + 0.017278170213103294, + 0.03191283717751503, + -0.017387181520462036, + 0.0008678261074237525, + -0.011173580773174763, + -0.01610630750656128, + -0.02283770777285099, + 0.022456170991063118, + -0.011888962239027023, + 0.0021291121374815702, + 0.03491062670946121, + 0.04033390060067177, + 0.03700907900929451, + 0.017864102497696877, + -0.02144782431423664, + -0.025917256250977516, + -0.03880775347352028, + -0.01992167718708515, + 0.012025224976241589, + 0.008414250798523426, + 0.029242077842354774, + 0.016365207731723785, + 0.015016201883554459, + -0.039816100150346756, + 0.04000686854124069, + 0.003173228818923235, + -0.00256174779497087, + 0.007760188076645136, + -0.023028476163744926, + -0.0007447634125128388, + 0.03134053200483322, + 0.01648784428834915, + -0.007637551054358482, + -0.017577949911355972, + 0.04041565954685211, + -0.01573839597404003, + -0.0010126057313755155, + 0.03237612918019295, + -0.007555793039500713, + 0.030795477330684662, + 0.03801742568612099, + 0.008659524843096733, + -0.03869874030351639, + -0.027988456189632416, + -0.0009529906092211604, + 0.02127068117260933, + 0.024759018793702126, + 0.0029228450730443, + 0.008264361880719662, + -0.01060127466917038, + 0.00820985622704029, + -0.021624965593218803, + -6.806505552958697e-06, + -0.04183279350399971, + -0.023082982748746872, + 0.004799870308488607, + 0.01783685013651848, + 0.015138838440179825, + -0.0042105321772396564, + -0.04071543738245964, + -0.008380184881389141, + 0.022129138931632042, + 0.024486493319272995, + -0.007317332550883293, + 0.022646939381957054, + 0.03436557203531265, + -0.024554625153541565, + 0.030359435826539993, + 0.03177657350897789, + -0.02779768779873848, + -0.023573528975248337, + -0.01601092331111431, + -0.008645898662507534, + 0.00047990187886171043, + 0.0027933951932936907, + 0.015111586079001427, + -0.008066779933869839, + -0.015683891251683235, + -0.009252269752323627, + 0.024309350177645683, + -0.022101886570453644, + 0.012583903968334198, + 0.009170511737465858, + 0.008468756452202797, + 0.029378341510891914, + -0.03278492018580437, + 0.008298427797853947, + 0.019117724150419235, + -0.006683708634227514, + 0.020875519141554832, + 0.025344951078295708, + 0.026053519919514656, + -0.0010832922998815775, + -0.0018361463444307446, + -0.01507070753723383, + -0.030495699495077133, + 0.02454099804162979, + 0.04572992026805878, + -0.029514603316783905, + 0.02877878211438656, + 0.00827798806130886, + -0.0069460151717066765, + -0.007828319445252419, + -0.004053829703480005, + 0.04196905717253685, + -0.034065794199705124, + -0.006871070712804794, + -0.004435366485267878, + -0.013299286365509033, + -0.043277185410261154, + -0.012352257035672665, + -0.03452908992767334, + 0.024786271154880524, + 0.00803952757269144, + 0.01126896496862173, + -0.00010214415669906884, + 0.009388532489538193, + 0.03150404617190361, + -0.028806036338210106, + 0.038998521864414215, + 0.017523445188999176, + 0.03237612918019295, + -0.019649149850010872, + -0.004881628323346376, + 0.011568743735551834, + -0.00045307507389225066, + 0.016610480844974518, + 0.003052295185625553, + -0.04989957436919212, + -0.02501791901886463, + -0.0035155899822711945, + -0.03619150072336197, + 0.02351902425289154, + 0.044912341982126236, + 0.007126564159989357, + 0.017823223024606705, + 0.011316657066345215, + -0.0077465614303946495, + 0.009170511737465858, + -0.06366215646266937, + -0.040797196328639984, + 0.02409132942557335, + -0.018368275836110115, + -0.06404369324445724, + 0.0018020805437117815, + -0.0087685352191329, + -0.012604343704879284, + -0.013415109366178513, + 0.012434015050530434, + 0.02018057554960251, + -0.002093343064188957, + -0.010751164518296719, + 0.019935302436351776, + 0.01767333410680294, + -0.018886076286435127, + -0.039298299700021744, + 9.868434426607564e-05, + -0.042977407574653625, + 0.08350207656621933, + -0.01917222887277603, + -0.0337115079164505, + -0.008080406114459038, + 0.016542349010705948, + 0.008073593489825726, + 0.013769393786787987, + -0.004765804391354322, + -0.009736004285514355, + -0.011486985720694065, + 0.029242077842354774, + 0.015929164364933968, + -0.010015343315899372, + -0.0419418066740036, + 0.020916396751999855, + 0.022415293380618095, + 0.059356238692998886, + -0.026598572731018066, + 0.01838190294802189, + 0.0002623066247906536, + -0.01910409703850746, + -0.004230971448123455, + 0.005770745687186718, + -0.02490890771150589, + -0.031177014112472534, + 0.018327396363019943, + 0.004360421560704708, + -0.02722538262605667, + -0.02090277150273323, + 0.013605877757072449, + 0.0008908205199986696, + 0.017346302047371864, + -0.036109741777181625, + 0.006196567788720131, + 0.005116682033985853, + -0.020889144390821457, + -0.012604343704879284, + 0.021597713232040405, + -0.012747419998049736, + -0.010846548713743687, + -0.005160967819392681, + -0.031994592398405075, + -0.016024550423026085, + -0.016051802784204483, + 0.010144793428480625, + -0.039816100150346756, + 0.03496513143181801, + 0.009681498631834984, + 0.004012950696051121, + -0.001773124560713768, + 0.01184127014130354, + 0.01842278055846691, + 0.04153301566839218, + 0.006608764175325632, + 0.017755091190338135, + 0.002776362234726548, + 0.009347653947770596, + 0.01451202854514122, + -0.04142400622367859, + 0.04098796471953392, + -0.009068313986063004, + 0.024527370929718018, + -0.04145125672221184, + -0.008829853497445583, + -0.005678767804056406, + 0.005896789021790028, + 0.016773996874690056, + -0.009708750993013382, + -0.0006255331682041287, + -0.0016036472516134381, + -0.026802966371178627, + 0.02484077773988247, + -0.011439293622970581, + -0.01498894952237606, + -0.0058525032363832, + 0.014103238470852375, + 0.021638592705130577, + -0.018749812617897987, + 0.06938520818948746, + 0.023777924478054047, + 0.012284125201404095, + -0.022197270765900612, + -0.03799017518758774, + -0.013244780711829662, + -0.03221261501312256, + 0.005396021995693445, + 0.02440473437309265, + -0.055758893489837646, + -0.02905130945146084, + -0.007508100941777229, + 0.00016639010573271662, + 0.013060825876891613, + 0.04480333253741264, + 0.02256518229842186, + 0.003256689989939332, + 0.010764790698885918, + -0.02395506575703621, + 0.0010398583253845572, + -0.03924379497766495, + -0.00451031094416976, + 0.019621897488832474, + -0.03106800466775894, + -0.034447330981492996, + 0.01175951212644577, + -0.02905130945146084, + 0.014770927838981152, + -0.00234542996622622, + 0.003306085243821144, + -0.0087821613997221, + -0.007147003430873156, + -0.05739405006170273, + -0.02035771869122982, + 0.018668055534362793, + -0.021079912781715393, + 0.028860541060566902, + 0.03657303750514984, + 0.0032396570313721895, + 0.0011539787519723177, + 0.00938171986490488, + -0.028424497693777084, + 0.020602991804480553, + -0.0005829508882015944, + -0.018640803173184395, + -0.006302171852439642, + 0.01994892954826355, + -0.025535719469189644, + -0.026857471093535423, + -0.03327546641230583, + -0.02242891862988472, + -0.010049409233033657, + -0.004636354744434357, + -0.016256196424365044, + 0.021079912781715393, + -0.034856121987104416, + 0.01430763304233551, + 3.494405245874077e-05, + 0.039434563368558884, + -0.01770058646798134, + -0.010648966766893864, + 0.02875152975320816, + 0.008114472031593323, + -0.031449541449546814, + 0.047801122069358826, + -5.264229912427254e-05, + 0.009204577654600143, + -0.013851151801645756, + 0.027102746069431305, + 0.005075803492218256, + 0.03553743660449982, + 0.006509973201900721, + 0.022578807547688484, + -0.04357696324586868, + 0.05554087087512016, + -0.005086022894829512, + 0.017523445188999176, + -0.0743451863527298, + -0.034747108817100525, + 0.006128436420112848, + 0.00773974834010005, + 0.047664858400821686, + -0.028560761362314224, + -0.009919959120452404, + 0.06273556500673294, + -0.011888962239027023, + 0.015561254695057869, + -0.026121651753783226, + -0.005453933496028185, + 0.015329607762396336, + -0.01498894952237606, + -0.03799017518758774, + 0.017278170213103294, + 0.01610630750656128, + 0.019594645127654076, + 0.010403693653643131, + -0.011752698570489883, + -0.005494812503457069, + -0.0024340010713785887, + -0.004643167834728956, + 0.01685575395822525, + 0.022742323577404022, + -0.017319049686193466, + -0.020480355247855186, + 0.006087557412683964, + 0.0055663506500422955, + 0.033929530531167984, + -0.013544559478759766, + -0.028588013723492622, + -0.0014707907103002071, + 0.015397738665342331, + -0.019117724150419235, + 0.02984163537621498, + 0.02022145502269268, + -0.014294006861746311, + -0.011861709877848625, + -0.002875152975320816, + 0.031722068786621094, + 0.020344091579318047, + 0.01444389671087265, + -0.03139503672719002, + -0.03332997113466263, + 0.034883372485637665, + 0.0247726459056139, + 0.04551190137863159, + -0.011153141036629677, + -0.000347471097484231, + -0.03150404617190361, + -0.018599923700094223, + -0.00968831218779087, + 0.008972929790616035, + -0.005941074341535568, + 0.04289564862847328, + -0.014907191507518291, + -0.005896789021790028, + 0.021216176450252533, + -0.022115513682365417, + -0.009320401586592197, + -0.019553765654563904, + -0.011595996096730232, + 0.006775686517357826, + -0.019417501986026764, + -0.0024510337971150875, + -0.025671983137726784, + -0.028560761362314224, + -0.0015184828080236912, + 0.0072151352651417255, + 0.0036143807228654623, + -0.024827150627970695, + 0.0071333772502839565, + -0.03698182478547096, + 0.011132701300084591, + -0.0027610326651483774, + -0.007841945625841618, + -0.00031085035880096257, + -0.002992680063471198, + 0.00810765940696001, + -0.011623249389231205, + 0.04245960712432861, + 0.01862717606127262, + 0.002408451633527875, + 0.016501471400260925, + 0.014294006861746311, + 0.005740086082369089, + 0.0009964244673028588, + 0.0031425694469362497, + 0.027647798880934715, + 0.006615577265620232, + 0.0071333772502839565, + -0.04523937404155731, + 0.0016726304311305285, + -0.028560761362314224, + 0.04030664637684822, + -0.014416644349694252, + 0.026244288310408592, + 0.005917228292673826, + -0.007439969573169947, + -0.00014233114779926836, + 0.041778288781642914, + -0.009763256646692753, + -0.05044462904334068, + 0.013135770335793495, + -0.031177014112472534, + -0.01553400233387947, + 0.025372203439474106, + -0.04687453433871269, + -0.0005846542189829051, + -0.0350741408765316, + -0.019458381459116936, + -0.025971760973334312, + -0.01692388579249382, + 0.04333169013261795, + 2.688004133233335e-05, + -0.006959641817957163, + 0.040224891155958176, + -0.00925908237695694, + -0.00749447476118803, + -0.013687635771930218, + 0.03136778250336647, + -0.007637551054358482, + -0.005392615217715502, + 0.004609101917594671, + 0.01359225157648325, + 0.0010253804503008723, + -0.02052123472094536, + 0.010301495902240276, + 0.026462309062480927, + 0.0038664676249027252, + -0.03551018238067627, + 0.007126564159989357, + 0.010941932909190655, + -0.007310519460588694, + 0.012202367186546326, + -0.011343909427523613, + -0.017577949911355972, + -0.03327546641230583, + 0.03248514235019684, + 0.002396528609097004, + -0.0010943636298179626, + -0.02932383492588997, + 0.035428427159786224, + 0.003055701730772853, + -0.012508959509432316, + -0.0037199847865849733, + 0.018163882195949554, + -0.02745703049004078, + 0.010342375375330448, + -0.016460591927170753, + -0.0018071903614327312, + -0.0030744378454983234, + 0.0057060206308960915, + -0.006128436420112848, + -0.013926096260547638, + -0.032566897571086884, + 0.01493444386869669, + -0.028233729302883148, + 0.010063035413622856, + -0.03553743660449982, + -0.004377454519271851, + 0.024350229650735855, + 0.028642520308494568, + 0.020466728135943413, + 0.005419868044555187, + 0.02752516232430935, + 0.015220596455037594, + -0.01917222887277603, + 0.03725435212254524, + -0.010771604254841805, + -0.010519517585635185, + 0.010546769946813583, + 0.0024765832349658012, + 0.0049429466016590595, + 0.037199847400188446, + 0.0077806273475289345, + -0.056358449161052704, + -0.040797196328639984, + 0.014907191507518291, + -0.005201846826821566, + 0.022878587245941162, + 0.004285477101802826, + -0.005525471642613411, + -0.004639761056751013, + -0.014839059673249722, + -0.030877236276865005, + 0.010137979872524738, + 0.018068498000502586, + -0.024827150627970695, + 0.022524302825331688, + 0.007767001166939735, + -0.004711299203336239, + 0.0009708751458674669, + 0.031122509390115738, + 0.02365528792142868, + -0.009770069271326065, + 0.0026860879734158516, + 0.03425656259059906, + 0.012910936027765274, + 0.0013515603495761752, + -0.008734469301998615, + 0.014430270530283451, + -0.008877545595169067, + -0.004081082064658403, + 0.01780959777534008, + -0.010465011931955814, + -0.014130491763353348, + 0.004012950696051121, + -0.0006847224431112409, + 0.021297933533787727, + 0.0026639450807124376, + 0.04622047021985054, + 0.006864257622510195, + -0.001592575921677053, + -0.004057236015796661, + -0.011814017780125141, + -0.010376441292464733, + 0.00469085993245244, + 0.004721519071608782, + 0.017550697550177574, + -0.02606714516878128, + 0.002813834697008133, + 0.02946009859442711, + 0.011800390668213367, + -0.005007671657949686, + 0.009742816910147667, + 0.0009998310124501586, + -0.025372203439474106, + 0.02372341975569725, + 0.020466728135943413, + -0.04755584895610809, + 0.014198622666299343, + -0.03837171196937561, + -0.02704824134707451, + -0.04240509867668152, + -0.00012199812772450969, + -0.011180393397808075, + 0.033220961689949036, + 0.007801066618412733, + -0.008945677429437637, + 0.005447120405733585, + 0.03864423558115959, + 0.0047896504402160645, + 0.0024152647238224745, + -0.006731400731950998, + 0.004489871673285961, + -0.04856419563293457, + -0.015465870499610901, + -0.0006898323190398514, + -0.009831388480961323, + 0.008809414692223072, + 0.010683032684028149, + 0.00500426534563303, + -0.020207829773426056, + -0.03932555392384529, + 0.011262151412665844, + 0.010137979872524738, + -0.003968664910644293, + -0.02807021513581276, + -0.0005105611053295434, + 0.0027508127968758345, + 0.0035428425762802362, + -0.02736164629459381, + 0.00718788243830204, + 0.0024237812031060457, + 0.02959636226296425, + 0.030713720247149467, + -0.026557693257927895, + -0.007221948355436325, + -0.007385463919490576, + 0.0543145015835762, + -0.005855910014361143, + 0.019362997263669968, + 0.019553765654563904, + 0.01655597612261772, + -0.04758309945464134, + -0.012243246659636497, + -0.019867170602083206, + 0.00445239944383502, + -0.011507425457239151, + 0.0031050972174853086, + -0.0364367738366127, + 0.0070379930548369884, + -0.02554934471845627, + -0.015997296199202538, + -0.02845175191760063, + 0.010301495902240276, + 0.019349370151758194, + -0.04483058676123619, + -0.020207829773426056, + 0.01845003478229046, + -0.0004345517954789102, + 0.013040386140346527, + 0.0055663506500422955, + 0.006932388991117477, + 0.031204266473650932, + -0.008434690535068512, + -0.02103903517127037, + 0.02529044635593891, + -0.005644701886922121, + 0.028124719858169556, + -0.004241191316395998, + -0.038862258195877075, + 0.01794585958123207, + -0.010424133390188217, + -0.03025042451918125, + -0.004588662646710873, + 0.021938370540738106, + 0.02079376019537449, + 0.04145125672221184, + -0.015424991957843304, + -0.005157561041414738, + -0.0009189248085021973, + -0.02725263498723507, + 0.02324649877846241, + -0.014825433492660522, + -0.019894422963261604, + 0.029541855677962303, + 0.02786581963300705, + 0.003651853185147047, + 0.020889144390821457, + 0.0063668969087302685, + 0.05308813229203224, + 0.0104990778490901, + 0.038317203521728516, + -0.038562480360269547, + -0.025712860748171806, + -0.054123733192682266, + -0.015016201883554459, + 0.00028061697958037257, + -0.021624965593218803, + 0.0010330452350899577, + 0.004466025624424219, + 0.04344069957733154, + -0.016160812228918076, + -0.04632947966456413, + -0.012529399245977402, + -0.027688676491379738, + -0.01885882392525673, + 0.0005552724469453096, + -0.03741787001490593, + -0.008639085106551647, + 0.002660538535565138, + 0.016201691702008247, + 0.02640780434012413, + -0.00788282509893179, + 0.0158065278083086, + -0.03700907900929451, + -0.0009325511055067182, + -0.028588013723492622, + -0.01808212324976921, + -7.281563739525154e-05, + -0.0037574570160359144, + 0.010083475150167942, + 0.008434690535068512, + -0.009647432714700699, + -0.012904122471809387, + -0.0023164739832282066, + -0.01974453404545784, + 0.031449541449546814, + 0.009109193459153175, + 0.02559022419154644, + 0.02406407706439495, + 0.01004259567707777, + 0.0027695491444319487, + 0.0018668054835870862, + -0.01089424081146717, + -0.004380861297249794, + 0.022946719080209732, + 0.00797139573842287, + 0.04254136234521866, + 0.015097959898412228, + -0.02263331413269043, + -0.0012680991785600781, + -0.006421402096748352, + -0.00749447476118803, + 0.0057196468114852905, + -0.015125212259590626, + -0.006373709999024868, + -0.004970199428498745, + -0.02172034978866577, + 0.01357862539589405, + -0.02024870738387108, + 0.015329607762396336, + 0.000634475436527282, + 0.005143934860825539, + -0.0012706541456282139, + 0.021842986345291138, + 0.00675524678081274, + -0.009150072000920773, + 0.0013277143007144332, + -0.006097777280956507, + -0.001305571524426341, + 0.017686959356069565, + -0.031449541449546814, + 0.007385463919490576, + -0.028969550505280495, + -0.015193344093859196, + -0.015125212259590626, + -0.006452061235904694, + -0.006881290581077337, + 0.009892706759274006, + -0.024145834147930145, + 0.018191134557127953, + 0.003447458380833268, + -0.02613527700304985, + 0.002405045088380575, + 0.001712657744064927, + -0.014294006861746311, + 0.044367291033267975, + -0.033766016364097595, + 0.013040386140346527, + 0.04859144985675812, + -0.01190940197557211, + -0.011739072389900684, + 0.02286496013402939, + 0.04305916279554367, + -0.0019093877635896206, + -0.004374047741293907, + -0.008352932520210743, + 0.012938188388943672, + 0.03188558295369148, + 0.020957276225090027, + -0.018095750361680984, + -0.02290583960711956, + -0.0037540504708886147, + -0.015125212259590626, + -0.012740607373416424, + 0.015343233942985535, + -0.04030664637684822, + -0.01658322848379612, + -0.021297933533787727, + -0.0007192140910774469, + 0.01933574490249157, + -0.00529382424429059, + -0.011568743735551834, + 0.0012757639633491635, + 0.0005305747617967427, + 0.0013719998532906175, + -0.00615909555926919, + 0.029269330203533173, + 0.0007677578250877559, + 0.026285165920853615, + 0.02093002386391163, + 0.010717098601162434, + -0.020207829773426056, + -0.0029279550071805716, + 0.008734469301998615, + -0.008877545595169067, + 0.006090964190661907, + 0.0020030688028782606, + 0.010860174894332886, + -0.000491399085149169, + -0.027279887348413467, + 0.0014213952235877514, + -0.008502822369337082, + 0.026516813784837723, + 0.01262478344142437, + 0.003365700365975499, + 0.0030352622270584106, + 0.01395334955304861, + -0.06202699616551399, + -0.006441841833293438, + 0.03932555392384529, + 0.0171964131295681, + -0.014225875958800316, + -0.033220961689949036, + 0.04158752039074898, + 0.016283448785543442, + -0.020344091579318047, + -0.02001706138253212, + -0.00026422282098792493, + 0.015561254695057869, + 0.007324145641177893, + -0.002779768779873848, + 0.01910409703850746, + -0.007712495978921652, + -0.0009478807332925498, + -0.013026759959757328, + -0.012052478268742561, + -0.009967651218175888, + -0.00659173121675849, + 0.011132701300084591, + 0.019935302436351776, + 0.029650866985321045, + 0.029923394322395325, + -0.01665136031806469, + 0.008087219670414925, + 0.008352932520210743, + -0.003934598993510008, + 0.026285165920853615, + -0.001005792524665594, + -0.007848759181797504, + 0.009054687805473804, + -0.007521727122366428, + -0.012570277787744999, + 0.00029275292763486505, + 0.0015789495082572103, + 0.007365024648606777, + 0.04166927933692932, + -0.017686959356069565, + -0.0034185023978352547, + 0.007712495978921652, + -0.005985360126942396, + -0.02629879303276539, + -0.01678762398660183, + -0.031585805118083954, + 0.014130491763353348, + -0.00020907880389131606, + 0.00810765940696001, + 0.019349370151758194, + -0.010710285976529121, + -0.018027618527412415, + -0.010233364067971706, + -0.0023318035528063774, + 0.010049409233033657, + -0.0015593616990372539, + 0.021161671727895737, + -0.011391601525247097, + -0.004227565135806799, + -0.00866633839905262, + 0.005103055853396654, + -0.024254845455288887, + 0.016092680394649506, + -0.0026980109978467226, + 0.015888286754488945, + -0.01145291980355978, + 0.042977407574653625, + 0.02470451407134533, + -0.006431621965020895, + -0.05464153364300728, + 0.017455313354730606, + 0.0029228450730443, + -0.03657303750514984, + -0.016542349010705948, + -0.014961697161197662, + 0.01146654598414898, + -0.022578807547688484, + 0.03305744752287865, + -0.021093539893627167, + -0.019485633820295334, + 0.013919283635914326, + 0.009497543796896935, + 0.005334703251719475, + -0.010015343315899372, + ], + "index": 25, + }, + { + "title": "Bill Johnson (center)", + "text": 'William Levi Johnson, Sr. (September 14, 1926 \u2013 January 7, 2011), known as Bill "Tiger" Johnson, was a professional football player and coach. He was born in Tyler, Texas, where he was raised by his single mother and five older siblings. Among his siblings was older brother Gilbert Johnson, who played quarterback at Southern Methodist University with the iconic running back Doak Walker.', + "vector": [ + 0.07187927514314651, + -0.03665780648589134, + -0.014136985875666142, + -0.007833498530089855, + -0.03672025352716446, + 0.04143518581986427, + 0.0021954872645437717, + -0.0465872623026371, + 0.01088961586356163, + 0.0881161242723465, + -0.06207471713423729, + 0.0063581308349967, + -0.022060254588723183, + 0.044776227325201035, + -0.02248178794980049, + 0.054799359291791916, + -0.04302764683961868, + 0.04274662211537361, + 0.04440153390169144, + -0.028773566707968712, + 0.04768012464046478, + -0.007404158357530832, + 0.02081126719713211, + -0.004839829634875059, + 0.05973286181688309, + 0.011826357804238796, + 0.018375739455223083, + -0.003979198634624481, + -0.013028508983552456, + -0.07394010573625565, + 0.003674757666885853, + 0.012880191206932068, + 0.03703249990940094, + -0.000524477509316057, + 0.02499537728726864, + 0.003684515366330743, + -0.04646236449480057, + -0.019890137016773224, + 0.017189200967550278, + 0.030287964269518852, + 0.013824738562107086, + -0.024136697873473167, + -0.04958483204245567, + -0.04883544147014618, + 0.04627501592040062, + 0.024761192500591278, + -0.07194172590970993, + 0.009632822126150131, + 0.0005493596545420587, + -0.013504685834050179, + 0.015760671347379684, + -0.015401585958898067, + 0.012591362930834293, + 0.05873367190361023, + 0.014246271923184395, + -0.004718833602964878, + 0.003508876310661435, + 0.09092634171247482, + -0.008883428759872913, + 0.0008235516143031418, + -0.04743032902479172, + -0.003065875731408596, + 0.02216954156756401, + -0.00829015951603651, + 0.06594657897949219, + -0.001378765911795199, + 0.001493907067924738, + 0.0473678782582283, + -0.011061351746320724, + 0.05536140501499176, + -0.002232566475868225, + 0.002765337936580181, + 0.03943680226802826, + 0.0330045148730278, + -0.023231182247400284, + -0.014222853817045689, + 0.014418007805943489, + 0.01840696483850479, + -0.014371170662343502, + -0.020873716101050377, + 0.017267262563109398, + -0.03987395018339157, + -0.007833498530089855, + 0.028867240995168686, + -0.010468082502484322, + 0.00832919031381607, + 0.03387880697846413, + -0.07906095683574677, + -0.04583786800503731, + -0.011787327006459236, + 0.06235573813319206, + 0.0018959251465275884, + -0.0018090814119204879, + 0.014823929406702518, + 0.08068463951349258, + -0.016392970457673073, + -0.007732017897069454, + -0.028242746368050575, + 0.019359318539500237, + -0.01531571801751852, + 0.02702498249709606, + -0.0075563788414001465, + -0.02295015938580036, + -0.008485313504934311, + 0.028430094942450523, + -0.025135887786746025, + -0.034222278743982315, + 0.03734475001692772, + 0.009383024647831917, + 0.03653290495276451, + 0.0013924267841503024, + 0.01812594197690487, + -0.02457384392619133, + 0.0007293896051123738, + -0.022700361907482147, + 0.0054174866527318954, + 0.003555713454261422, + -0.013934025540947914, + -0.023434141650795937, + 0.006350324489176273, + -0.03241124376654625, + -0.06191859394311905, + -0.019437380135059357, + 0.012427433393895626, + 0.010905228555202484, + -0.04671216011047363, + -0.004098242614418268, + 0.014293109066784382, + 0.011069158092141151, + -0.008055973798036575, + -0.024292821064591408, + -0.01723603717982769, + -0.01444142684340477, + 0.0174702238291502, + 0.005444807931780815, + -0.03384758159518242, + 0.025526197627186775, + -0.045431949198246, + 0.049709733575582504, + 0.047149308025836945, + 0.0017944448627531528, + 0.009999711997807026, + -0.00452367914840579, + 0.05080259591341019, + 0.0714421272277832, + -0.04677461087703705, + 0.0295073464512825, + 0.011701459065079689, + 0.018547475337982178, + -0.03734475001692772, + -0.016908178105950356, + 0.026915697380900383, + -0.009172257035970688, + 0.00434804055839777, + 0.015385974198579788, + 0.018297677859663963, + -0.046680934727191925, + -0.005183301400393248, + -0.008758530020713806, + 0.005440905224531889, + -0.02752457931637764, + -0.002650196896865964, + -0.018001042306423187, + 0.011123801581561565, + -0.014222853817045689, + 0.005273072049021721, + 0.01932809315621853, + -0.011147219687700272, + -0.005034984089434147, + 0.01449606940150261, + -0.013020702637732029, + -0.030881233513355255, + -0.006982624996453524, + -0.009906037710607052, + -0.04849196970462799, + 0.009398636408150196, + 0.015659190714359283, + -0.014699030667543411, + 0.010647624731063843, + 0.035970862954854965, + -0.013668615370988846, + 0.020452182739973068, + -0.005554094444960356, + -0.010608593933284283, + -0.0003359095426276326, + -0.0043831681832671165, + 0.028367646038532257, + 0.015838732942938805, + 0.01634613424539566, + -0.011342374607920647, + 0.02686885930597782, + -0.01995258778333664, + 0.02718110755085945, + -0.015448423102498055, + 0.030647048726677895, + 0.006955303251743317, + 0.0014177968259900808, + -0.02185729518532753, + -0.0061161392368376255, + 0.00318882311694324, + 0.07150457799434662, + -0.007298775017261505, + -0.013637389987707138, + 0.020717592909932137, + -0.0026326330844312906, + -0.0008552641957066953, + -0.01309876423329115, + -0.01121747586876154, + -0.030116228386759758, + 0.02081126719713211, + 0.023387305438518524, + 0.01195906288921833, + -0.013075346127152443, + 0.005792182870209217, + 7.915950845927e-05, + 0.008009137585759163, + 0.030506538227200508, + 0.04006129875779152, + 0.017595121636986732, + 0.049366261810064316, + 0.009312768466770649, + 0.04137273505330086, + -0.011201863177120686, + 0.01867237500846386, + 0.009000521153211594, + -0.039655376225709915, + -0.01793859340250492, + -0.004332427866756916, + -0.018453801050782204, + -0.029241938143968582, + -0.04218457639217377, + 0.0481484979391098, + -0.012841160409152508, + 0.046837057918310165, + -0.02721233107149601, + 0.013012896291911602, + 0.042715396732091904, + -0.030225515365600586, + -0.03887476027011871, + -0.06607148051261902, + 0.006955303251743317, + 0.004320718813687563, + 0.006479126401245594, + -0.04596276581287384, + 0.0021642623469233513, + 0.014691224321722984, + -0.07350295782089233, + -0.04611889272928238, + -0.044276632368564606, + 0.010959872044622898, + -0.018625536933541298, + -0.04749277979135513, + -0.009625015780329704, + -0.0562981441617012, + 0.01611194759607315, + -0.013379786163568497, + -0.016486644744873047, + 0.024776805192232132, + 0.043308667838573456, + -0.055298954248428345, + -0.02279403619468212, + 0.030287964269518852, + -0.01914074458181858, + 0.005901469383388758, + -0.009250319562852383, + -0.03490922227501869, + -0.03465942293405533, + 0.0613253228366375, + 0.05739101022481918, + -0.014058924280107021, + -0.03768822178244591, + 0.0033195766154676676, + -0.009273737668991089, + 0.005093530286103487, + 0.0014763431390747428, + -0.017673183232545853, + -0.05907714366912842, + -0.037438422441482544, + -0.005573609843850136, + 0.05536140501499176, + 0.01556551642715931, + 0.04633746296167374, + 0.04040477052330971, + -0.035346366465091705, + 0.04405806213617325, + 0.008040362037718296, + -0.03618943318724632, + 0.03987395018339157, + 0.03784434497356415, + -0.03987395018339157, + -0.01207615528255701, + 0.041091714054346085, + 0.011201863177120686, + -0.014277497306466103, + 0.029101425781846046, + 0.0043831681832671165, + -0.018812885507941246, + -0.05158321559429169, + 0.012700648978352547, + 0.0005108166951686144, + 0.04243437573313713, + 0.021029839292168617, + -0.03141205385327339, + -0.0512397438287735, + -0.020311672240495682, + -0.01316121406853199, + 0.0029643955640494823, + -0.014347752556204796, + -0.007899850606918335, + 0.00044836726738139987, + -0.06644617766141891, + -0.012646006420254707, + 0.055298954248428345, + 0.03381635621190071, + 0.024167923256754875, + -0.0014236514689400792, + 0.03005377948284149, + 0.035034120082855225, + 0.0054174866527318954, + -0.02690008468925953, + 0.0046563842333853245, + 0.024511395022273064, + -0.015073726885020733, + -0.030568987131118774, + 0.04789869859814644, + -0.03746964782476425, + -0.007653956301510334, + -0.0007362200412899256, + 0.002462848788127303, + 0.012286921963095665, + -0.017407773062586784, + 0.0013621777761727571, + -0.040592119097709656, + -0.003442523768171668, + 0.011982480995357037, + -0.012357177212834358, + -0.07462704926729202, + 0.006100527010858059, + -0.0686943531036377, + -0.011701459065079689, + -0.023824451491236687, + 0.0018832400674000382, + 0.013457848690450191, + 0.02352781593799591, + -0.001623684773221612, + -0.02491731569170952, + 0.03634555637836456, + 0.041872330009937286, + -0.016908178105950356, + -0.002453091088682413, + 0.0008206242928281426, + 0.028789179399609566, + -0.005261362995952368, + -0.008860010653734207, + 0.04511969909071922, + -0.017907369881868362, + -0.05773448199033737, + -0.01778247021138668, + 0.022684749215841293, + 0.0017105283914133906, + -0.009023940190672874, + 0.0102885402739048, + 0.0011192106176167727, + 0.07550133764743805, + -0.04290274530649185, + 0.017907369881868362, + 0.062324512749910355, + -0.016627155244350433, + -0.01597924344241619, + 0.024292821064591408, + -0.012060542590916157, + 0.02744651585817337, + 0.05058402568101883, + 0.019515441730618477, + 0.025292012840509415, + 0.002745822537690401, + 0.007251937873661518, + -0.017282875254750252, + 0.02170117013156414, + 0.007763242349028587, + -0.021576272323727608, + -0.00908638909459114, + 0.02368393912911415, + -0.012927028350532055, + -0.01590118184685707, + -0.026697123423218727, + -0.014027698896825314, + -0.025245174765586853, + -0.06419799476861954, + 0.012895803898572922, + 0.08055974543094635, + 0.04752400144934654, + 0.006689893081784248, + -0.03266104310750961, + 0.025338849052786827, + -0.001320219598710537, + 0.0003932361432816833, + 0.026681510731577873, + 0.022653523832559586, + 0.02449578233063221, + 0.019421767443418503, + -0.067570261657238, + -0.015526484698057175, + -0.06582167744636536, + -0.027430905029177666, + -0.020951777696609497, + 0.015425004996359348, + 0.027071820572018623, + 0.015924600884318352, + -0.0017319953767582774, + 0.03186481446027756, + 0.01181855145841837, + -0.04646236449480057, + -0.014800510369241238, + 0.0034073961433023214, + -0.03188042342662811, + -0.037407197058200836, + -0.007993524894118309, + 0.0174702238291502, + 0.00011721462215064093, + -0.012482075951993465, + -0.010046549141407013, + 0.016517870128154755, + -0.020358508452773094, + 0.01723603717982769, + 0.024823641404509544, + 0.03831271454691887, + -0.00157489615958184, + -0.01614317297935486, + -0.021404536440968513, + -0.045244600623846054, + 0.00881317351013422, + -0.01987452618777752, + 0.0756886899471283, + -0.0162992961704731, + -0.02379322610795498, + 0.021482598036527634, + 0.016205621883273125, + 0.031084194779396057, + 0.006451805122196674, + -0.007665665354579687, + 0.0384376123547554, + -0.0043909745290875435, + 0.014121373184025288, + -0.037906792014837265, + -0.05564242601394653, + -0.02981959469616413, + -0.00039030882180668414, + 0.03968660160899162, + 0.0068225981667637825, + -0.03834393993020058, + -0.001300704199820757, + -0.00035249764914624393, + -0.01720481365919113, + -0.01389499381184578, + -0.013543716631829739, + 0.03712617605924606, + -0.01658031903207302, + -0.0531756728887558, + 0.03531514108181, + 0.015893375501036644, + -0.013348561711609364, + 0.03856251388788223, + -0.011350180953741074, + -0.061013076454401016, + 0.0026423907838761806, + 0.010007518343627453, + 0.013481266796588898, + -0.03993640094995499, + -0.02112351357936859, + 0.035471267998218536, + -0.01253671944141388, + 0.003944070544093847, + 0.013301724568009377, + -0.032161448150873184, + -0.007146554533392191, + 0.023746389895677567, + 0.04040477052330971, + 0.036314334720373154, + 0.03253614529967308, + 0.06226206570863724, + 0.00021088874200358987, + 0.005663380958139896, + -0.01455851923674345, + 0.04199723154306412, + -0.0349404476583004, + 0.014566325582563877, + -0.013223662972450256, + 0.011194056831300259, + 0.0011640960583463311, + 0.03737597167491913, + 0.04608766734600067, + -0.021763620898127556, + -0.024636292830109596, + -0.012286921963095665, + 0.07593848556280136, + -0.017688795924186707, + 0.009398636408150196, + -0.0011045739520341158, + 0.009164451621472836, + 0.01789175719022751, + 0.02227882854640484, + 0.035502489656209946, + 0.0019017797894775867, + -0.016096336767077446, + -0.009258124977350235, + 0.046025216579437256, + 0.052270159125328064, + 0.016205621883273125, + -0.012880191206932068, + 0.00046934635611250997, + 0.002310628304257989, + -0.024043023586273193, + -0.020358508452773094, + -0.01199809368699789, + -0.024121085181832314, + 0.019156357273459435, + -0.018703598529100418, + 0.037594545632600784, + 0.05567365139722824, + -0.024292821064591408, + 0.019093908369541168, + 0.0322238951921463, + 0.045712970197200775, + 0.0663837268948555, + -0.003606453537940979, + -0.005304296966642141, + 0.0021135222632437944, + 0.0008318456821143627, + -0.002417963230982423, + 0.0007869601831771433, + 0.0018149360548704863, + 0.03063143603503704, + -0.000141243013786152, + -0.044745005667209625, + 0.0333792120218277, + -0.00622932892292738, + -0.0205770805478096, + -0.005963918752968311, + -0.017485834658145905, + 0.04989708214998245, + -0.04886666685342789, + 0.010413439944386482, + 7.37927621230483e-05, + -0.011225282214581966, + -0.0034932640846818686, + -0.048273395746946335, + -0.01681450381875038, + 0.02384006232023239, + -0.025682320818305016, + 0.03250491991639137, + -0.01637735776603222, + 0.011576559394598007, + -0.0019310528878122568, + 0.017985431477427483, + -0.00690846610814333, + -0.058171626180410385, + -0.006362034007906914, + -0.00818867888301611, + -0.0023477075155824423, + -0.0007854964933358133, + -0.04583786800503731, + -0.03906210884451866, + 0.008883428759872913, + -0.001251915586180985, + 0.0075485724955797195, + -0.036439232528209686, + 0.019359318539500237, + -0.03403493016958237, + 0.020904941484332085, + -0.007048977538943291, + -0.017766857519745827, + 0.019047070294618607, + -0.005948306526988745, + 0.042715396732091904, + -0.014324333518743515, + 0.008618018589913845, + 0.02643171325325966, + 0.014987858943641186, + 0.007048977538943291, + -0.000664012914057821, + -0.008243322372436523, + 0.015838732942938805, + 0.01801665499806404, + -0.0349404476583004, + 0.004000665619969368, + -0.00754076661542058, + -0.019109521061182022, + 0.044432755559682846, + -0.047024406492710114, + 0.02329363115131855, + -0.03419105336070061, + 0.030459700152277946, + 0.03269226849079132, + 0.06500983983278275, + -0.012294728308916092, + 0.02783682569861412, + 0.056391820311546326, + -0.0012636248720809817, + -0.013208050280809402, + 0.04240315034985542, + 0.021763620898127556, + 0.032005324959754944, + 0.008711692877113819, + 0.004519776441156864, + -0.03593963757157326, + 0.006022465415298939, + -0.02869550511240959, + 0.006443998776376247, + -0.009039552882313728, + -0.02647855132818222, + -0.01253671944141388, + 0.04911646246910095, + 0.0192188061773777, + 0.013411011546850204, + 0.0016031934646889567, + -0.010226091369986534, + -0.0211547389626503, + 0.01906268298625946, + -0.0007220713305287063, + 0.008883428759872913, + 0.018219616264104843, + 0.0022189056035131216, + -0.015222044661641121, + -0.0005161834415048361, + 0.02391812577843666, + 0.008664855733513832, + -0.030600212514400482, + -0.01201370544731617, + 0.03478432446718216, + -0.003729400923475623, + 0.00013172923354431987, + -0.047929923981428146, + -0.001975938444957137, + -0.007357321213930845, + 0.0004947164561599493, + 0.038031693547964096, + -0.032785940915346146, + 0.052238933742046356, + 0.01572163961827755, + 0.05632936954498291, + 0.024058636277914047, + 0.028789179399609566, + 0.00037567224353551865, + -0.015737252309918404, + -0.027618251740932465, + 0.02452700585126877, + -0.008899041451513767, + 0.0003481066960375756, + 0.020015036687254906, + 0.002802417380735278, + -0.020936165004968643, + 0.053050775080919266, + -0.01715797558426857, + -0.03425350412726402, + -0.0039694407023489475, + -0.030256740748882294, + 0.017376549541950226, + 0.013543716631829739, + 0.004063114989548922, + 0.016236847266554832, + -0.013504685834050179, + 0.002398447832092643, + -0.011943450197577477, + 0.016986239701509476, + -0.011834163218736649, + 0.029835207387804985, + 0.025245174765586853, + -0.004781282972544432, + -0.03133399412035942, + -0.004492454696446657, + 0.011841969564557076, + -0.01668960601091385, + -0.001271430985070765, + 0.012138604186475277, + 0.0089302659034729, + -0.05726611241698265, + -0.01825084164738655, + 0.0051442701369524, + 0.005058402195572853, + -0.013699839822947979, + 0.004273881670087576, + -0.02480802871286869, + -0.015292299911379814, + 0.027227943763136864, + -0.010101192630827427, + -0.0018783612176775932, + -0.0174702238291502, + -0.010725686326622963, + 0.04102926328778267, + -0.01259916927665472, + 0.05732855945825577, + 0.028367646038532257, + 0.01668960601091385, + -0.01859431341290474, + 0.036283109337091446, + 0.02243495173752308, + -0.04574419558048248, + -0.03016306646168232, + -0.04102926328778267, + -0.007993524894118309, + 0.03447207435965538, + 0.01804788038134575, + 0.014925409108400345, + -0.01133456826210022, + -0.0030814881902188063, + -0.020436570048332214, + -0.0640731006860733, + 0.04639991372823715, + -0.029991330578923225, + -0.015682607889175415, + 0.008524345234036446, + -0.02418353408575058, + 0.0021291347220540047, + -0.038843534886837006, + -0.020826879888772964, + 0.003981150221079588, + -0.015456229448318481, + -0.03303574025630951, + -0.012146410532295704, + -0.006213716696947813, + 0.04318377003073692, + 0.03703249990940094, + 0.0027789988089352846, + 0.01692379079759121, + 0.022466175258159637, + -0.014784898608922958, + 0.03250491991639137, + 0.01073349267244339, + -0.012778710573911667, + 0.004508066922426224, + 0.007029462140053511, + 0.03856251388788223, + -0.006049786694347858, + 0.06632127612829208, + -0.0013709597988054156, + -0.02298138290643692, + 0.01339539885520935, + 0.006010755896568298, + -0.014160403981804848, + 0.009804558008909225, + -0.023621490225195885, + 0.012583556585013866, + -0.021576272323727608, + -0.03800046816468239, + 0.017876144498586655, + -0.002146698534488678, + 0.012333759106695652, + 0.004816411063075066, + -0.06357350200414658, + 0.031974099576473236, + 0.00014356046449393034, + -0.026416100561618805, + -0.026915697380900383, + 0.030147453770041466, + -0.0004154349444434047, + -0.015393780544400215, + -0.033785130828619, + 0.0029936686623841524, + -0.02953857183456421, + -0.02279403619468212, + 0.0063073905184865, + -0.009109808132052422, + -0.002080345991998911, + 0.006986528169363737, + -0.006682087201625109, + -0.005530675873160362, + -0.015908988192677498, + 0.0137779014185071, + -0.0102885402739048, + -0.0016851583495736122, + 0.006428386550396681, + -0.00968746468424797, + -0.0020530244801193476, + -0.019749626517295837, + -0.004035793244838715, + 0.021732395514845848, + 0.026837635785341263, + -0.03712617605924606, + 0.014839541167020798, + -0.046056441962718964, + -0.008860010653734207, + -0.01279432326555252, + -0.007404158357530832, + -0.020483408123254776, + -0.01836012676358223, + 0.03228634595870972, + 0.03105296939611435, + -0.0075212512165308, + 0.012029318138957024, + 0.021904131397604942, + 0.02627559006214142, + 0.0044104899279773235, + 0.027774376794695854, + 0.014371170662343502, + 0.01395744364708662, + -0.0034581362269818783, + -0.024214759469032288, + -0.004691512323915958, + -0.029913268983364105, + 0.004992050118744373, + -0.002359416801482439, + 0.005585319362580776, + -0.040435995906591415, + 0.012208860367536545, + -0.008610213175415993, + -0.01720481365919113, + -0.00900832749903202, + 0.00252334657125175, + 0.0017388258129358292, + 0.004176304675638676, + -0.004059211816638708, + 0.034846771508455276, + -0.012107379734516144, + 0.004160691983997822, + 0.03465942293405533, + 0.0014070633333176374, + 0.01147507969290018, + -0.03447207435965538, + -0.001024560653604567, + -0.04643113911151886, + 0.03544004261493683, + 0.001523180166259408, + -0.01141262985765934, + 0.014293109066784382, + 0.0019749626517295837, + -0.018656762316823006, + 0.008594600483775139, + -0.00033322616945952177, + -0.010304152965545654, + -0.004094339441508055, + 0.008024749346077442, + -0.014300915412604809, + -0.03447207435965538, + -0.0152376564219594, + 0.020483408123254776, + -0.0024804126005619764, + -0.0043909745290875435, + 0.017142362892627716, + 0.01661154441535473, + 0.03634555637836456, + -0.015620158985257149, + -0.017595121636986732, + 0.014628774486482143, + 0.007103620562702417, + 0.016392970457673073, + 0.02379322610795498, + -0.028398869559168816, + 0.008500926196575165, + -0.014628774486482143, + -0.020389733836054802, + 0.031115420162677765, + 0.00036249932600185275, + 0.014012087136507034, + -0.021810457110404968, + 0.01925003156065941, + 0.010405633598566055, + 0.042340703308582306, + -0.04177865758538246, + 0.024464556947350502, + 0.012232278473675251, + 0.02457384392619133, + 0.023777613416314125, + 0.009437667205929756, + 0.027571415528655052, + -0.035190243273973465, + -0.0003381050191819668, + -0.015417198650538921, + 0.033285535871982574, + -0.038406386971473694, + 0.009788945317268372, + 0.01139701809734106, + 0.017407773062586784, + 0.014527294784784317, + -0.031146643683314323, + 0.06819476187229156, + -0.03447207435965538, + -0.027149882167577744, + 0.027274779975414276, + -0.01189661305397749, + -0.0050466931425035, + -0.032473694533109665, + -0.03178675100207329, + -0.005534579046070576, + -0.007439286448061466, + 0.02752457931637764, + -0.017954206094145775, + -0.019203193485736847, + -0.0018081056186929345, + -0.007271453272551298, + -0.012474270537495613, + -0.022575462237000465, + 0.007314387243241072, + -0.020202385261654854, + -0.020436570048332214, + 0.017829306423664093, + -0.026181915774941444, + -0.0360957607626915, + -0.022185154259204865, + 0.012778710573911667, + 0.011240893974900246, + 0.016830116510391235, + -0.016002662479877472, + -0.016018275171518326, + 0.06301146000623703, + -0.002890236908569932, + -0.014371170662343502, + 0.005924887955188751, + 0.02713426947593689, + -0.008376027457416058, + 0.02530762366950512, + 0.024433333426713943, + 0.026837635785341263, + 0.0031458891462534666, + 0.009367411956191063, + 0.05717243626713753, + -0.047805026173591614, + 0.026369264349341393, + -0.0009006375912576914, + 0.03089684620499611, + 0.0061902981251478195, + 0.028929689899086952, + -0.008009137585759163, + 0.04905401170253754, + 0.005917081609368324, + 0.006826501339673996, + -0.0025311526842415333, + -0.0007986694108694792, + -0.0005093530053272843, + 0.03637678176164627, + -0.02977275662124157, + 0.0026326330844312906, + -0.004832023289054632, + 0.002958540804684162, + 0.0137779014185071, + -0.02060830593109131, + 0.03384758159518242, + 0.03475309908390045, + -0.005222332198172808, + -0.008922459557652473, + 0.023652715608477592, + 0.021763620898127556, + -0.02650977484881878, + 0.02512027695775032, + -0.02465190552175045, + 0.02833642065525055, + 0.011428242549300194, + -0.008899041451513767, + -0.04749277979135513, + 0.03141205385327339, + 0.0500844269990921, + 0.006611831486225128, + 0.012927028350532055, + -0.02752457931637764, + 0.01642419584095478, + 0.03005377948284149, + -0.003846493549644947, + 0.01249768864363432, + 0.016002662479877472, + -0.023621490225195885, + -0.015830926597118378, + 0.017173588275909424, + -0.03668902814388275, + 0.013723257929086685, + -0.037750668823719025, + 0.020155547186732292, + -0.006112236063927412, + -0.043808262795209885, + 0.011069158092141151, + -0.04021742194890976, + -0.01867237500846386, + 0.03606453537940979, + -0.044620104134082794, + 0.014613162726163864, + 0.012544525787234306, + 0.04096681624650955, + -0.011389211751520634, + -0.02838325873017311, + -0.008938072249293327, + 0.032785940915346146, + 0.016314908862113953, + 0.023121895268559456, + -0.015729445964097977, + -0.004297300241887569, + 0.03890598565340042, + 0.025885282084345818, + -0.04196600615978241, + 0.07718747109174728, + 0.021342087537050247, + 0.0007503686938434839, + -0.06001388654112816, + 0.008282353170216084, + 0.00439487723633647, + -0.07462704926729202, + 0.018469413742423058, + -0.0004617841332219541, + -0.006369839888066053, + 0.012146410532295704, + -0.012544525787234306, + 0.00881317351013422, + -0.011881000362336636, + 0.028679892420768738, + -0.023043833673000336, + 0.012450851500034332, + -0.04358968883752823, + 0.021404536440968513, + -0.009913844056427479, + 0.0030814881902188063, + 0.00817306712269783, + -0.009422055445611477, + 0.0062371352687478065, + -0.02794611267745495, + -0.014901991002261639, + -0.04624379053711891, + -0.0023516106884926558, + -0.07206661999225616, + 0.01203712448477745, + 0.02686885930597782, + 0.03515901789069176, + 0.034877996891736984, + 0.03109980747103691, + 0.005479936022311449, + -0.008266741409897804, + 0.002792659681290388, + -0.00881317351013422, + 0.006725021172314882, + -0.011553141288459301, + -0.01611194759607315, + 0.030756335705518723, + -0.007525154389441013, + -0.029413674026727676, + 0.005557997617870569, + 0.0029117038939148188, + 0.02635365165770054, + -0.02274719811975956, + -0.011365792714059353, + 0.02616630308330059, + 0.03618943318724632, + 0.0178605318069458, + 0.04871053993701935, + 0.04327744245529175, + -0.0010460276389494538, + -0.011756101623177528, + -0.019499829038977623, + -0.04243437573313713, + 0.0047305431216955185, + 0.0012099574087187648, + 0.023512203246355057, + -0.01968717761337757, + 0.01279432326555252, + 0.015807507559657097, + 0.0005225259228609502, + 0.00767737440764904, + 0.036002084612846375, + -0.030912458896636963, + -0.004746155347675085, + -0.01385596301406622, + -0.001081155496649444, + 0.0030678273178637028, + 0.00968746468424797, + 0.04608766734600067, + -0.03350410982966423, + -6.720630335621536e-05, + -0.00929715670645237, + 0.013535910286009312, + -0.025729157030582428, + -0.0007957421476021409, + 0.0376569963991642, + -0.034690648317337036, + 0.000722559227142483, + -0.025135887786746025, + 0.002486267127096653, + 0.01193564385175705, + -0.027977336198091507, + -0.009406442753970623, + 0.011881000362336636, + -0.00441439263522625, + 0.009781138971447945, + -0.01075691170990467, + -0.0016090481076389551, + 0.001232400070875883, + 0.002041315194219351, + 0.008984909392893314, + 0.03381635621190071, + -0.02224760316312313, + 0.010819360613822937, + -0.009000521153211594, + -0.0022501302883028984, + 0.041747432202100754, + -0.021107900887727737, + 0.0021545046474784613, + -0.006276166066527367, + 0.003731352277100086, + -0.007084105163812637, + -0.006092720665037632, + -0.027493353933095932, + -0.0004856905434280634, + 0.04905401170253754, + -0.01778247021138668, + -0.005952209699898958, + 0.006221522577106953, + -0.03800046816468239, + 0.0038055111654102802, + -0.004059211816638708, + 0.030022554099559784, + -0.028117848560214043, + -0.02888285368680954, + 0.01137359905987978, + 0.016314908862113953, + -0.014472651295363903, + -0.026384877040982246, + 0.05005320534110069, + -0.013504685834050179, + 0.01812594197690487, + -0.028601830825209618, + 0.007228519301861525, + -0.028742341324687004, + 0.004679802805185318, + -0.007119232788681984, + 0.003908942919224501, + 0.038031693547964096, + -0.0211547389626503, + 0.024745579808950424, + -0.01750144734978676, + 0.019968200474977493, + 0.027649477124214172, + -0.02081126719713211, + 0.01645541936159134, + 0.03350410982966423, + 0.015440616756677628, + -0.037906792014837265, + -0.007271453272551298, + -0.04558807238936424, + 0.007665665354579687, + 0.004262172617018223, + 0.003596695838496089, + -0.008524345234036446, + 0.013653002679347992, + 0.002940976992249489, + -0.007571991067379713, + -0.008235516026616096, + 0.014238465577363968, + -0.020467795431613922, + 0.015815313905477524, + 0.038031693547964096, + -0.029679082334041595, + -0.01840696483850479, + -0.006584509741514921, + 0.00025272497441619635, + -0.006205910351127386, + -0.020904941484332085, + -0.040123745799064636, + -0.012981671839952469, + 0.037094950675964355, + -0.017532672733068466, + 0.03800046816468239, + -0.007829595357179642, + 0.022887710481882095, + -0.01948421634733677, + -0.04127906262874603, + 0.0037957532331347466, + -0.0020374120213091373, + -0.014917603693902493, + 0.011576559394598007, + -0.0015358652453869581, + 0.02177923172712326, + -0.01956227794289589, + -0.04721175506711006, + 0.006030271295458078, + 0.007490026298910379, + -0.0013826689682900906, + 0.015948018059134483, + 0.01968717761337757, + 0.010834973305463791, + 0.0035693743266165257, + -0.017282875254750252, + -0.022778423503041267, + 0.015807507559657097, + -0.018500639125704765, + -0.021638721227645874, + -0.04049844294786453, + -0.03659535571932793, + 0.020873716101050377, + 0.010452470742166042, + -0.0007767145871184766, + -0.007154360879212618, + 0.00013002162449993193, + -0.017033077776432037, + -0.007564185187220573, + -0.033722683787345886, + -0.02825835905969143, + 0.00031200313242152333, + -0.007985718548297882, + 0.015284493565559387, + -0.007415867876261473, + -0.0011240894673392177, + 0.0019476410234346986, + 0.024698741734027863, + 0.0071699731051921844, + -0.015651384368538857, + 0.011482886038720608, + 0.006982624996453524, + 0.018157167360186577, + 0.0035635195672512054, + 0.004301203414797783, + -0.044620104134082794, + 0.009484504349529743, + -0.005292587913572788, + -0.007755436468869448, + -0.0008172091329470277, + 0.019031457602977753, + -0.010717879980802536, + -0.025292012840509415, + 0.04199723154306412, + -0.01976523920893669, + -0.019671564921736717, + 0.025338849052786827, + -0.016439808532595634, + -0.008087199181318283, + 0.04661848768591881, + -0.019421767443418503, + -0.028586218133568764, + 0.001630515092983842, + 0.0004425126244314015, + 0.0004778843722306192, + 0.005920984782278538, + -0.022138316184282303, + -0.0493038110435009, + -0.002646293956786394, + -0.02778998762369156, + 0.004102145787328482, + -0.01987452618777752, + -0.008454089052975178, + -0.0043909745290875435, + 0.005335521884262562, + -0.021482598036527634, + -0.006459611002355814, + 0.008508732542395592, + -0.006276166066527367, + 0.007240228820592165, + 0.04374581202864647, + 0.01579970121383667, + 0.0020354604348540306, + -0.004742252174764872, + -0.004613450262695551, + 0.025010989978909492, + 0.0295073464512825, + -0.0009879692224785686, + 0.007970105856657028, + -0.017673183232545853, + 0.00817306712269783, + 0.023356080055236816, + -0.01832890324294567, + -0.0225130133330822, + 0.007771048694849014, + 0.021794844418764114, + 9.16615899768658e-05, + 0.047305431216955185, + -0.00945327989757061, + -0.021529434248805046, + -0.03412860259413719, + 0.004418295808136463, + -0.004203625954687595, + 0.0030307481065392494, + 0.02344975434243679, + -0.0034347176551818848, + 0.006756245624274015, + -0.0001247768523171544, + -0.02274719811975956, + -0.022606687620282173, + -0.009445473551750183, + -0.000857215782161802, + -0.0019915509037673473, + -0.023434141650795937, + 0.004320718813687563, + -0.012232278473675251, + -0.012739679776132107, + -0.001518301316536963, + -0.016627155244350433, + 0.04643113911151886, + -0.01193564385175705, + -0.0098982322961092, + -0.03721984848380089, + 0.012286921963095665, + 0.030490925535559654, + -0.0089302659034729, + 0.005058402195572853, + -0.02551058493554592, + -0.0015602594939991832, + -0.00637764623388648, + -0.006514254491776228, + -0.012325952760875225, + -0.03194287419319153, + -0.014410201460123062, + -0.013738870620727539, + 0.014847347512841225, + -0.004882763605564833, + -0.005472129676491022, + 0.04355846345424652, + 0.004660287406295538, + -0.002224760362878442, + 0.035845961421728134, + -0.0014168210327625275, + -0.015651384368538857, + 0.008493119850754738, + -0.06582167744636536, + 0.0038074625190347433, + -0.009500117041170597, + -0.002453091088682413, + 0.005597028415650129, + -0.002289161318913102, + -0.005319909192621708, + -0.019312480464577675, + 0.0021427953615784645, + 0.05183301120996475, + 0.03993640094995499, + 0.001383644761517644, + -0.010788136161863804, + -0.020124323666095734, + 0.013629584573209286, + -0.009141032584011555, + 0.021420149132609367, + -0.024433333426713943, + -0.0058507295325398445, + -0.047180529683828354, + 0.01723603717982769, + -0.011162832379341125, + -1.1419582733651623e-05, + -0.02216954156756401, + 0.0036591452080756426, + 0.0037352554500102997, + 0.018766049295663834, + -0.02337169274687767, + -0.01875043660402298, + -0.040154971182346344, + -0.027868051081895828, + 0.010858391411602497, + 0.003987004514783621, + 0.047929923981428146, + -0.013988668099045753, + 0.013738870620727539, + 0.001706625334918499, + 2.4394300908170408e-06, + 0.019125131890177727, + -0.038062915205955505, + -0.010343183763325214, + 0.004789089318364859, + -0.002870721509680152, + 0.004098242614418268, + -0.0024882187135517597, + 0.007517348043620586, + -0.01971840113401413, + 0.0026814215816557407, + -0.021529434248805046, + -0.007048977538943291, + -0.009367411956191063, + -0.02922632545232773, + 0.022840872406959534, + -0.008633631281554699, + 0.006381549406796694, + 0.01117844507098198, + 0.009788945317268372, + -0.00564776873216033, + -0.035471267998218536, + 0.019093908369541168, + 0.027321618050336838, + 0.014667805284261703, + -0.02065514400601387, + -0.010116804391145706, + 0.039155781269073486, + 0.01500347163528204, + -0.023480979725718498, + 0.013153407722711563, + 0.01723603717982769, + 0.026369264349341393, + -0.014222853817045689, + -0.0057297335006296635, + 0.015112757682800293, + -0.008454089052975178, + 0.038031693547964096, + 0.041091714054346085, + 0.01587776280939579, + 0.020015036687254906, + -0.029257548972964287, + 0.004886666312813759, + -0.021997805684804916, + 0.004746155347675085, + -0.0021291347220540047, + 0.005901469383388758, + -0.002068636706098914, + -0.034565750509500504, + -0.01856308802962303, + -0.008141841739416122, + -0.031006133183836937, + 0.013411011546850204, + 0.02729039266705513, + -0.016798891127109528, + 0.020249221473932266, + -0.013504685834050179, + -0.03109980747103691, + -0.009172257035970688, + 0.04118538647890091, + 0.025213949382305145, + 0.004496357869356871, + -0.05198913440108299, + 0.02324679307639599, + 0.014792704954743385, + 0.061512671411037445, + 0.00688895070925355, + 0.013442235998809338, + -0.0018227421678602695, + 0.010842779651284218, + -0.011631202884018421, + -0.0027789988089352846, + 0.027399679645895958, + 0.009031746536493301, + 0.020561469718813896, + 0.03063143603503704, + -0.009906037710607052, + 0.04983463138341904, + -0.030928071588277817, + 0.0019076344324275851, + -0.016236847266554832, + -0.007205100730061531, + 0.00018137163715437055, + -0.020483408123254776, + 0.006412773858755827, + -0.017563898116350174, + -0.02279403619468212, + -0.009859200567007065, + 0.007993524894118309, + 0.01339539885520935, + -0.0026931308675557375, + 0.010358796454966068, + 0.024089861661195755, + 0.01622123457491398, + -0.006678184028714895, + -0.014589743688702583, + 0.022107092663645744, + -0.0022950158454477787, + 0.0011211620876565576, + -0.023199956864118576, + 0.04671216011047363, + 0.04321499168872833, + -0.0229033213108778, + -0.0015300106024369597, + 0.007177779451012611, + -0.005928791128098965, + 0.0025370074436068535, + 0.008500926196575165, + 0.027758764103055, + -0.002222808776423335, + 0.02127963677048683, + 0.01707991398870945, + 0.035346366465091705, + 0.015393780544400215, + 0.025963343679904938, + 0.00016478350153192878, + 0.03175552561879158, + -7.922049553599209e-05, + -0.06938129663467407, + -0.030803171917796135, + -0.0007967178826220334, + -0.0009030770743265748, + -0.02010871097445488, + 0.015503066591918468, + 0.0025389590300619602, + -0.0019320286810398102, + 0.02674396149814129, + 0.026541000232100487, + -0.03105296939611435, + -0.01177952066063881, + -0.007232422474771738, + 0.03409738093614578, + 0.001816887641325593, + 0.0087351119145751, + 0.019936975091695786, + -0.020061872899532318, + 0.013715452514588833, + 0.0022208571899682283, + 0.026619061827659607, + 0.04664970934391022, + 0.01914074458181858, + 0.012778710573911667, + -0.017360936850309372, + 0.01968717761337757, + 0.006709408946335316, + 0.023824451491236687, + 0.03768822178244591, + -0.02733723074197769, + 0.008571181446313858, + 0.01351249124854803, + -0.02760264091193676, + -0.0014607307966798544, + -0.019858913496136665, + 0.008547763340175152, + 0.010077773593366146, + -0.018969008699059486, + -0.00028907248633913696, + -0.001503664767369628, + 0.006151267327368259, + 0.02721233107149601, + -0.0017934690695255995, + -0.017064301297068596, + 0.008984909392893314, + -0.009679659269750118, + -0.04180988296866417, + -0.010764717124402523, + -0.01329391822218895, + -0.03186481446027756, + 0.012646006420254707, + 0.010608593933284283, + -0.018001042306423187, + -0.03384758159518242, + -0.012083961628377438, + 0.0007230471237562597, + 0.012872384861111641, + -0.0165022574365139, + 0.0022462273482233286, + 0.007895947434008121, + 0.01259916927665472, + -0.0068967570550739765, + 0.029054589569568634, + -0.01878166012465954, + 0.01463658083230257, + -0.028430094942450523, + 0.038843534886837006, + 0.010483695194125175, + -0.042996421456336975, + -0.010952065698802471, + 0.002675567055121064, + -0.03105296939611435, + 0.007275356445461512, + -0.02073320560157299, + -0.019905749708414078, + 0.009070777334272861, + ], + "index": 26, + }, + { + "title": "Eumetcast", + "text": "EUMETCast is a scheme for dissemination of various (mainly satellite based) meteorological data operated by EUMETSAT, the European Organisation for the Exploitation of Meteorological Satellites. The main purpose is the dissemination of EUMETSAT's own data, but various data from other providers are broadcast as well.EUMETCast is a contribution to GEONETCast and IGDDS (WMO's Integrated Global Data Dissemination Service) and provides data for GEOSS and GMES.", + "vector": [ + -0.05129781365394592, + 0.025064459070563316, + -0.029005305841565132, + -0.0011000141967087984, + -0.024079246446490288, + -0.009493101388216019, + -0.060916151851415634, + 0.02346140146255493, + -0.04485218971967697, + -0.020505767315626144, + 0.02048906870186329, + -0.05527205765247345, + -0.029756739735603333, + -0.023745276033878326, + 0.020205194130539894, + -0.03523384779691696, + 0.0059154462069272995, + -0.013283662497997284, + 0.019303474575281143, + 0.060648977756500244, + 0.023711880668997765, + -0.04271478205919266, + 0.03967565298080444, + 0.004817519336938858, + 0.00010325678158551455, + 0.002686372259631753, + 0.02139078825712204, + -0.006583386566489935, + -0.0032562087289988995, + 0.021490978077054024, + 0.013074930757284164, + 0.001496603712439537, + -0.019103091210126877, + -0.03720427304506302, + -0.048692844808101654, + -0.028086887672543526, + 0.03977584466338158, + 0.018418453633785248, + -0.018952805548906326, + -0.0679963231086731, + -0.010929172858595848, + 0.014444208703935146, + 0.012164861895143986, + 0.04368329420685768, + -0.0413455031812191, + 0.03149338439106941, + -0.04652203992009163, + -0.0632205456495285, + 0.044418029487133026, + -0.020288685336709023, + 0.00888360571116209, + -0.04595429077744484, + -0.021223802119493484, + -0.00997735746204853, + -0.05039609223604202, + 0.04298195615410805, + 0.07173678278923035, + 0.04508597031235695, + -0.030023915693163872, + -0.03947526961565018, + 0.03513365983963013, + -0.01833496056497097, + 0.007042595185339451, + 0.006236892193555832, + -0.04184645786881447, + 0.002087313449010253, + -0.01620590128004551, + -0.01213146559894085, + -0.012649118900299072, + -0.004220547620207071, + 0.0314599871635437, + -0.01249048300087452, + 0.0074851056560873985, + -0.019036298617720604, + 0.0146028446033597, + 0.004817519336938858, + 0.010611901059746742, + -0.0024797283113002777, + 0.035100262612104416, + -0.01893610693514347, + -0.013884808868169785, + -0.009952310472726822, + 0.03747145086526871, + 0.04471860080957413, + 0.0022856080904603004, + -0.013509091921150684, + -0.0640888661146164, + -0.05239991471171379, + 0.0031831529922783375, + -0.00708434171974659, + -0.009376212023198605, + 0.03259548544883728, + -0.007589471526443958, + -0.018017688766121864, + -0.03267897665500641, + 0.04021000489592552, + 0.012715913355350494, + 0.0002249080134788528, + -0.05143140256404877, + 0.05914610996842384, + -0.013417250476777554, + -0.03483308479189873, + 0.023294417187571526, + -0.06555833667516708, + -0.00888360571116209, + 0.032127927988767624, + 0.025632208213210106, + 0.008102950640022755, + 0.02255968190729618, + 0.06295336782932281, + 0.003005731152370572, + 0.03950866684317589, + 0.008036156184971333, + -0.0062535908073186874, + -0.016155805438756943, + -0.020722847431898117, + 0.006767069920897484, + -0.019403664395213127, + 0.02112361043691635, + 0.017984291538596153, + -0.03177725896239281, + -0.011096158064901829, + -0.0317605584859848, + 0.05907931923866272, + -0.006061558146029711, + 0.037972405552864075, + -0.038840726017951965, + 0.015279133804142475, + 0.04421764612197876, + -0.03874053433537483, + -0.0380392000079155, + 0.002730205887928605, + -0.013801315799355507, + -0.017366446554660797, + 0.00039737229235470295, + 0.03166037052869797, + -0.04331592842936516, + 0.06986655294895172, + 0.029172291979193687, + -0.06676062941551208, + 0.00268845958635211, + -0.00641222670674324, + 0.019754333421587944, + 0.02252628654241562, + -0.03807259723544121, + -0.05199915170669556, + 0.05754305422306061, + 0.021106911823153496, + -0.0317605584859848, + -0.05179876834154129, + 0.02561550959944725, + -0.0019537252373993397, + 0.0029326751828193665, + -0.03274577111005783, + 0.02354489453136921, + -0.01442751009017229, + 0.015312531031668186, + -0.004537819419056177, + -0.04107832536101341, + 0.05463751405477524, + 0.0011699391761794686, + -0.02705158106982708, + -0.014293922111392021, + -0.012615721672773361, + 0.016189202666282654, + -0.044050659984350204, + 0.030207598581910133, + -0.014218778349459171, + 0.0024985140189528465, + 0.014978560619056225, + -0.005577301140874624, + -0.021490978077054024, + 0.0009267671266570687, + 0.013951602391898632, + -0.025832589715719223, + 0.03787221387028694, + 0.015112148597836494, + 0.018501944839954376, + -0.040844548493623734, + 0.05390277877449989, + -0.058377981185913086, + -0.005105568561702967, + 0.02708497829735279, + 0.01776721142232418, + -0.008967097848653793, + 0.04919379949569702, + 0.04238080978393555, + 0.0040326896123588085, + 0.014761480502784252, + -0.0587119497358799, + -0.011021014302968979, + 0.022008631378412247, + 0.025832589715719223, + -0.0025924432557076216, + -0.006671053357422352, + 0.0008798025664873421, + -0.008825160562992096, + -0.009868817403912544, + 0.004788296762853861, + -0.04415085166692734, + -0.0050512985326349735, + -0.0307085532695055, + 0.0428483672440052, + -0.024530107155442238, + 0.007585296873003244, + 0.05737606808543205, + 0.04431783780455589, + 0.006783768534660339, + 0.006103304214775562, + 8.70148724061437e-05, + -0.00030396500369533896, + -0.028470953926444054, + 0.06372150033712387, + 0.028504351153969765, + 0.01920328289270401, + -0.01256562676280737, + 0.0012523879995569587, + -0.013976650312542915, + -0.015496214851737022, + 0.019453760236501694, + 0.03199433907866478, + -0.028688034042716026, + 0.018201371654868126, + -0.01069539412856102, + -0.0012784794671460986, + -0.03157687559723854, + 0.03526724502444267, + -0.06455642729997635, + -0.04167947173118591, + -0.02120710350573063, + -0.04648864269256592, + 0.054570719599723816, + 0.021257199347019196, + -0.04244760423898697, + -0.032161325216293335, + -0.054570719599723816, + 0.002794912550598383, + -0.011739050038158894, + -0.03152678161859512, + 0.02346140146255493, + -0.05036269500851631, + -0.012699214741587639, + -0.02780301310122013, + -0.01556300837546587, + -0.021557772532105446, + 0.02528153918683529, + -0.008107124827802181, + 0.02504776045680046, + -0.055672820657491684, + -0.06696101278066635, + -0.03044137731194496, + 0.021323993802070618, + 0.011346635408699512, + 0.024730488657951355, + -0.01731635257601738, + 0.007138611748814583, + 0.0057609849609434605, + -0.008203141391277313, + -0.017516734078526497, + -0.032127927988767624, + 0.0035588692408055067, + -0.002734380541369319, + -0.033563997596502304, + 0.012323497794568539, + 0.02297714538872242, + -0.04271478205919266, + 0.02516465075314045, + -0.0491270087659359, + -0.05757645145058632, + 0.0037237671203911304, + -0.03643614053726196, + 0.00885020848363638, + 0.011396731249988079, + -0.07687992602586746, + -0.01780060864984989, + 0.03351390361785889, + 0.03252869099378586, + 0.0034085826482623816, + 0.013442298397421837, + -0.004562866874039173, + 0.05236651748418808, + -0.045553527772426605, + -0.003112184116616845, + 0.0033710110001266003, + -0.027151772752404213, + 0.014811575412750244, + -0.025181347504258156, + 0.010987617075443268, + 0.011864288710057735, + 0.018268166109919548, + -0.0014903417322784662, + -0.013609282672405243, + 0.015137196518480778, + 0.07026731967926025, + 0.050195712596178055, + 0.01576339080929756, + -0.05824439227581024, + -0.023227622732520103, + 0.039976224303245544, + -0.0038218707777559757, + 0.010770536959171295, + 0.01405179314315319, + 0.005477110389620066, + -0.03406495228409767, + -0.048692844808101654, + -0.004070261027663946, + -0.015362625941634178, + -0.005105568561702967, + -0.015045355074107647, + -0.01309162937104702, + 0.029606452211737633, + 0.009827070869505405, + -0.010778886266052723, + -0.024964267387986183, + 0.03500007092952728, + -0.0254652239382267, + -0.01244873646646738, + 0.006775419227778912, + 0.004038951359689236, + 0.020054906606674194, + 0.03753824532032013, + -0.00019268511096015573, + -0.07988565415143967, + 0.0036194014828652143, + 0.029639849439263344, + 0.0039700698107481, + -0.004596264101564884, + 0.0023816246539354324, + 0.0021770677994936705, + 0.009593292139470577, + -0.03870714083313942, + -0.004445977509021759, + 0.08683223277330399, + 0.027853108942508698, + -0.003473289543762803, + 0.00751850288361311, + 0.006074082106351852, + -0.01947045885026455, + -0.010194438509643078, + 0.04458501189947128, + 0.003602702869102359, + 0.011288190260529518, + -0.029439467936754227, + 0.014218778349459171, + -0.02369518205523491, + 0.06428924947977066, + 0.0039366730488836765, + 0.04017660766839981, + -0.007334819063544273, + -0.026968088001012802, + 0.000786395336035639, + 0.011630509980022907, + -0.03052487038075924, + 0.06632646918296814, + 0.04077775403857231, + -0.007030071225017309, + 0.015479516237974167, + -0.03316323459148407, + 0.02180824987590313, + 0.04575390741229057, + 0.012874549254775047, + 0.007293072994798422, + 0.021006722003221512, + -0.022392697632312775, + -0.0395420640707016, + 0.015112148597836494, + -0.010945871472358704, + -0.04121191427111626, + 0.021140309050679207, + 0.013559187762439251, + 0.04271478205919266, + -0.029940422624349594, + 0.004408405628055334, + 0.027435647323727608, + 0.004437628202140331, + 0.01469468604773283, + -0.01132158748805523, + 0.024947568774223328, + -0.017984291538596153, + 0.021457580849528313, + -0.008215665817260742, + -0.035901788622140884, + -0.03747145086526871, + 0.022693270817399025, + 0.02671761065721512, + 0.03513365983963013, + 0.0425477959215641, + 0.011830892413854599, + 0.04782452434301376, + -0.002454680623486638, + -0.048692844808101654, + 0.03079204633831978, + -0.016648411750793457, + -0.014644590206444263, + 0.0323450081050396, + -0.014227127656340599, + -0.004316564183682203, + 0.02648383192718029, + 0.0185687392950058, + 0.03184405341744423, + -0.01734974794089794, + 0.03546762838959694, + -0.017299653962254524, + 0.05146479979157448, + -0.035367436707019806, + 9.392909851158038e-05, + -0.013250265270471573, + -0.033447109162807465, + -0.02459689974784851, + -0.006800467148423195, + 0.0028763178270310163, + -0.04829208180308342, + 0.010595202445983887, + -0.026199957355856895, + 0.0247137900441885, + 0.026467133313417435, + -0.022125521674752235, + 0.044351235032081604, + -0.00450859684497118, + -0.014736432582139969, + -0.02384546771645546, + -0.031593576073646545, + 0.021323993802070618, + 0.024630296975374222, + 0.055439043790102005, + 0.016823746263980865, + 0.00952649861574173, + -0.021040119230747223, + -0.04067756235599518, + -0.022392697632312775, + 0.06295336782932281, + -0.033747684210538864, + -0.0069924998097121716, + 0.003110097022727132, + -0.0011125380406156182, + 0.009058940224349499, + -0.023711880668997765, + 0.013108327984809875, + -0.014160334132611752, + -0.004408405628055334, + -0.024580202996730804, + -0.014928464777767658, + 0.012164861895143986, + 0.008537111803889275, + -0.01041151862591505, + -0.007864996790885925, + 0.01412693690508604, + -0.02803679369390011, + 0.00537691917270422, + -0.03496667370200157, + -0.008395174518227577, + 0.008783414959907532, + -0.029339276254177094, + -0.008169744163751602, + 0.009142432361841202, + 0.0025423476472496986, + 0.002886754460632801, + -0.00901719368994236, + -0.004145404323935509, + 0.028771527111530304, + -0.020990023389458656, + 0.02690129540860653, + 0.02274336665868759, + -0.02381207048892975, + 0.03312983736395836, + 0.016940634697675705, + -0.032161325216293335, + -0.017383145168423653, + 0.005773508921265602, + 0.024313025176525116, + -0.021975234150886536, + -0.046154674142599106, + 0.006704450584948063, + 0.012073020450770855, + -0.0011334111914038658, + 0.012315148487687111, + -0.008800113573670387, + 0.009726880118250847, + 0.012766008265316486, + -0.010895775631070137, + 0.012398641556501389, + 0.01446925662457943, + 0.020455671474337578, + 0.055739615112543106, + -0.01078723557293415, + 0.013567537069320679, + 0.003974244464188814, + 0.022993844002485275, + -0.06933219730854034, + -0.0247137900441885, + 0.0383397713303566, + -0.01866893097758293, + 0.02252628654241562, + -0.014477605931460857, + -0.001374495797790587, + 0.03022429719567299, + -0.007409962359815836, + 0.053034458309412, + -0.006220194045454264, + 0.009785325266420841, + 0.001418329426087439, + -0.01273261196911335, + -0.0037634260952472687, + 0.019336871802806854, + 0.020873133093118668, + 0.02882162295281887, + 0.04528634995222092, + 0.06425585597753525, + -0.015320880338549614, + -0.007318120449781418, + 0.02599957585334778, + 0.0524333119392395, + 0.030023915693163872, + 0.0254652239382267, + 0.02187504433095455, + 0.007681312970817089, + 0.03610217198729515, + 0.005902922246605158, + -0.012064671143889427, + 0.02564890682697296, + -0.0077147101983428, + 0.0008265760843642056, + 0.03297955170273781, + -0.017550131306052208, + 0.0013577973004430532, + 0.005911271553486586, + 0.0009841682622209191, + 0.038206182420253754, + -0.003320915624499321, + -0.024212835356593132, + -0.00309757306240499, + 0.006291162688285112, + 0.026166560128331184, + -0.016548220068216324, + -0.01596377231180668, + 0.014794876798987389, + -0.0030286917462944984, + -0.009601641446352005, + 0.016155805438756943, + -0.015045355074107647, + -0.059212904423475266, + 0.01039482094347477, + -0.009735229425132275, + 0.004185063298791647, + 0.0191698856651783, + 0.014218778349459171, + -0.020021509379148483, + 0.007217929698526859, + -0.018201371654868126, + -0.015721643343567848, + 0.017834005877375603, + -0.015212339349091053, + 0.007126087788492441, + 0.013550838455557823, + -0.02264317497611046, + -0.025331635028123856, + -0.004020165652036667, + -0.03281256556510925, + -0.046989597380161285, + 0.002427545376121998, + 0.05006212368607521, + 0.015738341957330704, + 0.01309162937104702, + 0.0023774500004947186, + -0.024379819631576538, + 0.03603537753224373, + 0.05797721445560455, + -0.020121701061725616, + -0.04458501189947128, + -0.028320668265223503, + 0.022175617516040802, + -0.007685487624257803, + -0.0024296327028423548, + 0.005435363855212927, + 0.004775772802531719, + 0.005631571635603905, + 0.005222457926720381, + 0.023979056626558304, + -0.006863086484372616, + 0.008950399234890938, + 0.05056307837367058, + -0.03660312667489052, + 0.010311327874660492, + 0.01572999358177185, + 0.018886011093854904, + 0.003055826760828495, + 0.025064459070563316, + -0.022776763886213303, + -0.03553442284464836, + 0.020856434479355812, + -0.014711384661495686, + -0.02501436322927475, + -0.04124531149864197, + -0.0416460745036602, + 0.02972334250807762, + -0.01908639259636402, + -0.011872638016939163, + 0.024396518245339394, + 0.013116677291691303, + -0.004913535434752703, + 0.025749098509550095, + 0.06893143802881241, + -0.04137890040874481, + -0.029873628169298172, + 0.004625486209988594, + 0.04688940569758415, + -0.009910563938319683, + -0.00480917003005743, + -0.0061909714713692665, + -0.018268166109919548, + -0.017900798469781876, + -0.02513125352561474, + 0.027335455641150475, + 0.06225203350186348, + -0.0016124495305120945, + -0.012306799180805683, + 0.01947045885026455, + 0.007226279005408287, + 0.006833863910287619, + -0.004496072884649038, + 0.0326455794274807, + -0.003007818479090929, + -0.016698507592082024, + -0.004917710088193417, + 0.003226986387744546, + -0.015830185264348984, + 0.008215665817260742, + -0.024830680340528488, + -0.00622436823323369, + 0.015629801899194717, + -0.027135074138641357, + 0.02950626239180565, + -0.006270289421081543, + 0.008031981997191906, + 0.06519097089767456, + 0.010611901059746742, + -0.0007002936326898634, + -0.05814420059323311, + 0.031192811205983162, + -0.006967451889067888, + -0.03670331835746765, + 0.014344017021358013, + -0.042013444006443024, + 0.02705158106982708, + -0.0013317059492692351, + 0.04187985509634018, + 0.005694190971553326, + 0.021524375304579735, + -0.021908441558480263, + 0.03830637410283089, + -0.038272976875305176, + -0.010937522165477276, + 0.0025903559289872646, + 0.013049882836639881, + -0.0044668507762253284, + -0.037404656410217285, + 0.007247151806950569, + 0.010110946372151375, + 0.0016364536713808775, + -0.020722847431898117, + -0.061283521354198456, + -0.02468039281666279, + 0.03920809552073479, + -0.014410811476409435, + 0.009000495076179504, + -0.0521327368915081, + -0.04445142671465874, + -0.04949437454342842, + -0.024313025176525116, + -0.013575886376202106, + -0.028120284900069237, + -0.02018849551677704, + 0.01611405983567238, + 0.015546309761703014, + 0.024813981726765633, + -0.0010196525836363435, + -0.03693709895014763, + 0.01938696578145027, + 0.014452558010816574, + -0.04976155236363411, + 0.0010760100558400154, + 0.0031267954036593437, + 0.0009314636117778718, + -0.026283450424671173, + -0.006608434021472931, + -0.014327319338917732, + -0.017600227147340775, + -0.015487865544855595, + 0.007480931002646685, + -0.057142291218042374, + -0.022876953706145287, + 0.01908639259636402, + 0.009276020340621471, + 0.009760277345776558, + 0.014911767095327377, + 0.009952310472726822, + -0.038206182420253754, + -0.005477110389620066, + 0.018017688766121864, + -0.00472567742690444, + -0.026867898181080818, + 0.005556428339332342, + -0.0022292507346719503, + -0.0063704801723361015, + -0.03553442284464836, + 0.03583499416708946, + -0.013550838455557823, + -0.03252869099378586, + -0.058077406138181686, + -0.02825387381017208, + -0.007460057735443115, + -0.03169376775622368, + -0.03543423116207123, + 0.04572051018476486, + 0.027251962572336197, + -0.031626973301172256, + 0.0027573409024626017, + 0.0032499469816684723, + -0.012932993471622467, + -0.00781907606869936, + 0.000293267541565001, + 0.03904110938310623, + 0.016005519777536392, + -0.0028804924804717302, + 0.014586145989596844, + 0.009267671033740044, + 0.029756739735603333, + -0.02573239989578724, + 0.03636934980750084, + 0.0012503006728366017, + 0.006708625238388777, + -0.015003608539700508, + -0.0014026745921000838, + 0.01503700576722622, + 0.00619514612480998, + 0.01105441153049469, + -0.026550626382231712, + 0.01920328289270401, + 0.0037613387685269117, + 0.008061204105615616, + 0.03663652390241623, + -0.013016486540436745, + -0.00761034432798624, + -0.05073006451129913, + 0.00945135485380888, + -0.006879784632474184, + -0.006437274627387524, + 0.009593292139470577, + -0.06405547261238098, + -0.008532936684787273, + 0.0015560920583084226, + -0.011939432471990585, + -3.900666706613265e-05, + -0.039742447435855865, + -0.03456591069698334, + 0.014836623333394527, + -0.016431331634521484, + -0.015003608539700508, + 0.0033021296840161085, + 0.0431489422917366, + 0.024813981726765633, + 0.04041038826107979, + -0.03753824532032013, + 0.046989597380161285, + -0.013667727820575237, + 0.03037458471953869, + -0.01369277574121952, + 0.04431783780455589, + 0.009735229425132275, + 0.01821807026863098, + -0.02768612466752529, + 0.0063704801723361015, + -0.0005891441833227873, + 0.0007436053710989654, + 0.0011751573765650392, + 0.0308588407933712, + 0.012081369757652283, + -0.02504776045680046, + -0.021140309050679207, + -0.03089223802089691, + 0.014502652920782566, + -0.013342106714844704, + -0.02999051846563816, + -0.007831599563360214, + -0.033931367099285126, + -0.009476402774453163, + 0.025699002668261528, + 0.003577655181288719, + -0.07093525677919388, + 0.004020165652036667, + -0.02855444699525833, + -0.0036360998637974262, + 0.02731875702738762, + 0.03055826760828495, + 0.014569447375833988, + 0.08375971019268036, + 0.015980470925569534, + 0.017550131306052208, + -0.0431489422917366, + 0.0033981462474912405, + 0.037972405552864075, + 0.016255997121334076, + 0.008303332142531872, + -0.004692280665040016, + 0.008470317348837852, + -0.026834500953555107, + -0.029522961005568504, + -0.03643614053726196, + 0.01758352853357792, + -0.004587914794683456, + 0.00537691917270422, + 0.029940422624349594, + 0.005756810307502747, + 0.01901960000395775, + -0.027435647323727608, + 0.01162216067314148, + -0.011597112752497196, + -0.018835915252566338, + -0.0007070773863233626, + 0.0032395103480666876, + -0.004320738837122917, + 0.0011156690306961536, + -0.010803934186697006, + 0.025147952139377594, + -0.028120284900069237, + 0.018769122660160065, + 0.028604542836546898, + 0.0015039092395454645, + 0.03613556921482086, + -0.04064416512846947, + -0.00834507867693901, + -0.030057312920689583, + -0.03349720314145088, + -0.02558211237192154, + -0.013751220889389515, + -0.007551899645477533, + 0.01886931248009205, + -0.021641265600919724, + -0.005381093826144934, + 0.0037258544471114874, + 0.0004876485909335315, + -0.004997028037905693, + -0.0011845503468066454, + -0.008036156184971333, + -0.017683718353509903, + 0.00027030709316022694, + -0.03192754462361336, + -0.03540083393454552, + -0.026951389387249947, + 0.01492011547088623, + -0.0019641618710011244, + 0.009384561330080032, + 0.03361409530043602, + -0.010194438509643078, + -0.041145119816064835, + 0.03870714083313942, + -0.010277930647134781, + -0.011229746043682098, + 0.023344513028860092, + -0.03194424510002136, + 0.00041146166040562093, + -0.017249558120965958, + 0.009309417568147182, + -0.011329936794936657, + 0.009651737287640572, + 0.045186158269643784, + 0.012849501334130764, + -0.01866893097758293, + -0.027068279683589935, + 0.0019224155694246292, + -0.051097430288791656, + -0.013308710418641567, + -0.011371683329343796, + 0.01995471492409706, + -0.018318261951208115, + -0.022810161113739014, + -0.028303969651460648, + 0.01456109806895256, + 0.022693270817399025, + 0.01088742632418871, + 0.05036269500851631, + 0.021824948489665985, + 0.005410316400229931, + 0.03543423116207123, + 0.03950866684317589, + -0.010728790424764156, + 0.003965895157307386, + 0.014193730428814888, + 0.009952310472726822, + -0.014110238291323185, + -0.010044151917099953, + -0.00312262075021863, + 0.005719238426536322, + -0.017533432692289352, + -0.021624566987156868, + 0.019821127876639366, + -0.015187292359769344, + 0.024930870160460472, + 0.031560178846120834, + 0.02255968190729618, + -0.015613104216754436, + -0.03237840533256531, + -0.02309403568506241, + 0.031560178846120834, + 0.014744781889021397, + -0.045553527772426605, + -0.003548432607203722, + -0.018117880448698997, + 0.021741455420851707, + 0.00323116104118526, + 0.013843062333762646, + -0.022776763886213303, + -0.0011845503468066454, + 0.017266256734728813, + -0.019103091210126877, + -0.042614590376615524, + 0.015713294968008995, + -0.009676785208284855, + 0.002907627495005727, + -0.037638433277606964, + 0.01866893097758293, + 0.006003112997859716, + 0.02120710350573063, + -0.03990942984819412, + -0.011663907207548618, + -0.033296823501586914, + -0.02962315082550049, + 0.010244534350931644, + 0.026417037472128868, + -0.021891742944717407, + 0.014151984825730324, + -0.020539162680506706, + -0.0017888275906443596, + -0.013233566656708717, + -0.0013233566423878074, + -0.034766290336847305, + -0.00667940266430378, + -0.012323497794568539, + -0.006107478868216276, + 0.030324488878250122, + -0.0010306109907105565, + 0.04982834309339523, + 0.006662704050540924, + 0.018117880448698997, + -0.01773381419479847, + -0.0017335137818008661, + -0.040844548493623734, + -0.05493808910250664, + 0.01486167125403881, + -0.04632165655493736, + -0.023795371875166893, + -0.029706643894314766, + -0.021624566987156868, + -0.02478058449923992, + -0.017040826380252838, + 0.011004315689206123, + -0.002882579807192087, + -0.034465719014406204, + 0.027101676911115646, + 0.007376565597951412, + 0.015145545825362206, + 0.026851199567317963, + -0.015178943052887917, + 0.01890270970761776, + 0.024363121017813683, + -0.03007401153445244, + 0.008140522055327892, + -0.036536332219839096, + -0.024429915472865105, + 0.009743578732013702, + -0.019403664395213127, + -0.00619514612480998, + -0.02867133542895317, + 0.012983089312911034, + -0.021908441558480263, + 0.017416542395949364, + -0.015320880338549614, + 0.003861529752612114, + 0.03154347836971283, + -0.012548928149044514, + 0.0016980294603854418, + -0.013934903778135777, + 0.05420335382223129, + -0.006988325156271458, + -0.0007723059388808906, + -0.005715063773095608, + 0.009401259012520313, + -0.021190404891967773, + -0.00849119108170271, + 0.03640274330973625, + 0.008724969811737537, + 0.0018326611025258899, + -0.0058820489794015884, + -0.027986697852611542, + -0.0036319252103567123, + 0.050229109823703766, + 0.008031981997191906, + -0.002091488102450967, + -0.013049882836639881, + -0.04749055206775665, + -0.026417037472128868, + -0.014360715635120869, + 0.004959456622600555, + 0.03513365983963013, + -0.02746904455125332, + 0.006178447511047125, + 0.0029389371629804373, + 0.029756739735603333, + -0.02109021507203579, + 0.017533432692289352, + 0.01578843779861927, + -0.04385028034448624, + 0.020572559908032417, + -0.0017950894543901086, + 0.007890044711530209, + 0.023377910256385803, + -0.048158492892980576, + 0.011480223387479782, + 0.07614519447088242, + 0.024045849218964577, + -0.026099765673279762, + 0.003876140806823969, + -0.02025528810918331, + -0.009326116181910038, + 0.00219794106669724, + 0.04678921774029732, + 0.0026154036168009043, + -0.0031393193639814854, + 0.026767706498503685, + -0.01973763480782509, + 6.278247019508854e-05, + -0.029940422624349594, + -0.02327771857380867, + 0.03904110938310623, + 0.004913535434752703, + 0.04304875060915947, + 0.008875256404280663, + -0.06108313798904419, + 0.012615721672773361, + 0.020990023389458656, + -0.024830680340528488, + 0.00044851144775748253, + -0.011572064831852913, + -0.013467345386743546, + -0.02942276932299137, + -0.012582325376570225, + -0.008608080446720123, + 0.015521261841058731, + 0.017566829919815063, + 0.02025528810918331, + -0.035367436707019806, + -0.014736432582139969, + 0.047290172427892685, + 0.02614986151456833, + -0.03967565298080444, + 0.01734974794089794, + -0.02474718727171421, + -0.02052246406674385, + 0.019437061622738838, + 0.003995117731392384, + 0.0005787076079286635, + -0.03132639825344086, + 0.05290086939930916, + -0.011830892413854599, + 0.00865817628800869, + 0.011521969921886921, + 0.049026817083358765, + -0.005343522410839796, + 0.03990942984819412, + -0.003375185653567314, + 0.03381447494029999, + -0.007080167066305876, + -0.04304875060915947, + 0.007627042941749096, + 0.013342106714844704, + 0.009518149308860302, + 0.002073745708912611, + -0.01201457530260086, + 0.04308214783668518, + -0.026667514815926552, + 0.021474279463291168, + -0.015579706989228725, + 0.01947045885026455, + -0.058912333101034164, + -0.008591381832957268, + -0.015863580629229546, + 0.0068046413362026215, + 0.012139814905822277, + 0.000818748667370528, + 0.0009158087195828557, + -0.01848524622619152, + 0.04241420701146126, + 0.02776961773633957, + 0.006729498505592346, + -0.0020319996401667595, + -0.009125733748078346, + -0.01195613108575344, + 0.032729074358940125, + -0.04007641598582268, + -0.015955423936247826, + -0.007230453658849001, + 0.009234274737536907, + 0.007668789476156235, + 0.008249062113463879, + 0.05433694273233414, + 0.017249558120965958, + 0.016130758449435234, + 0.01770041696727276, + 0.014911767095327377, + 0.02478058449923992, + 0.00838682521134615, + 0.009301068261265755, + 0.0010410475078970194, + -0.00010221312550129369, + 0.024346422404050827, + -0.05096384137868881, + -0.014318970032036304, + -0.01082898210734129, + 0.02606636844575405, + -0.03466609865427017, + -0.047891318798065186, + -0.004817519336938858, + -0.016406282782554626, + 0.016882190480828285, + 0.01041151862591505, + -0.02765272743999958, + -0.0021645440720021725, + 0.02274336665868759, + 0.006733672693371773, + 0.02984023094177246, + 0.004604613408446312, + -0.003439892316237092, + 0.010403170250356197, + 0.00027135072741657495, + 0.005606523714959621, + 0.016464726999402046, + -0.015070402063429356, + -0.01780060864984989, + -0.03516705706715584, + -0.038640346378088, + -0.014569447375833988, + -0.021190404891967773, + 0.022426094859838486, + 0.020923228934407234, + -0.030324488878250122, + 0.013492393307387829, + -0.028170380741357803, + -0.012682516127824783, + -0.02018849551677704, + 0.03780541941523552, + -0.008065379224717617, + -0.005372744519263506, + 0.03321332857012749, + -0.012974740006029606, + -0.00015654849994461983, + 0.022325903177261353, + 0.0026028796564787626, + -0.008432745933532715, + 0.015095449984073639, + 0.010728790424764156, + 0.0302576944231987, + 0.003659060224890709, + -0.008261586539447308, + 0.010578503832221031, + 0.009893865324556828, + -0.005189061164855957, + 0.022209014743566513, + -0.004888487979769707, + -0.03753824532032013, + 0.011338286101818085, + 0.025899384170770645, + -0.0022876954171806574, + 0.02214222028851509, + 0.020171796903014183, + -0.019720936194062233, + -0.0005693146958947182, + -0.036202363669872284, + 0.014410811476409435, + -0.011730700731277466, + 0.00931776687502861, + 0.017065873369574547, + 0.0126574682071805, + -0.016097361221909523, + -0.015596405602991581, + 0.03304634615778923, + -0.002584093948826194, + 0.022476190701127052, + -0.013634330593049526, + -0.0023273543920367956, + -0.009793674573302269, + 0.000807790260296315, + 0.020322082564234734, + 0.008094601333141327, + 0.04308214783668518, + 0.029673246666789055, + 0.016665110364556313, + -0.010378122329711914, + 0.02681780233979225, + -0.006654355209320784, + 0.01656491868197918, + 0.013843062333762646, + -0.00535604590550065, + -0.024763885885477066, + -0.013984999619424343, + -0.02897190861403942, + -0.0050512985326349735, + -0.009200877510011196, + -0.003700806526467204, + -0.014060142450034618, + 0.0009930393425747752, + 0.009125733748078346, + 0.0025089506525546312, + -0.043482910841703415, + 0.019370267167687416, + 0.02327771857380867, + -0.016013868153095245, + 0.003577655181288719, + 0.016130758449435234, + -0.018518643453717232, + 0.015838533639907837, + -0.028604542836546898, + 0.017249558120965958, + -0.0003172716242261231, + 0.034081652760505676, + 0.01815127767622471, + -0.0062535908073186874, + -0.0029869454447180033, + 0.013651029206812382, + -0.004445977509021759, + 0.00019020642503164709, + 0.004997028037905693, + 0.012298449873924255, + 0.015078751370310783, + 0.009651737287640572, + -0.020772943273186684, + 0.00011741137859644368, + -0.031059222295880318, + -0.003554694587364793, + 0.016080662608146667, + -0.04795811325311661, + -0.015646500512957573, + 0.007009198423475027, + -0.023144129663705826, + 0.0059404936619102955, + 0.006487370003014803, + -0.0008004846749827266, + -0.01476982980966568, + 0.03247859701514244, + -0.014118587598204613, + -0.025448525324463844, + -0.0030182551126927137, + 0.023945659399032593, + -0.0197710320353508, + -0.0023774500004947186, + -0.02316082827746868, + -0.014536050148308277, + 0.008061204105615616, + -0.0019756420515477657, + -0.003646536497399211, + 0.008399348706007004, + 0.019069693982601166, + 0.02399575524032116, + 0.016798697412014008, + -0.03850675746798515, + -0.0160222165286541, + -0.034799687564373016, + -0.012056321837008, + 0.0002370405272813514, + 0.03877393156290054, + -0.005932144355028868, + 0.05246670916676521, + 0.04071095958352089, + 0.022876953706145287, + -0.019453760236501694, + -0.027552535757422447, + -0.0005129572818987072, + 0.02584928832948208, + -0.005456237122416496, + -0.002577831968665123, + -0.010344725102186203, + 0.03636934980750084, + 0.017449939623475075, + 0.03636934980750084, + -0.0018587525701150298, + -0.02274336665868759, + -0.01626434549689293, + -0.030491473153233528, + -0.026834500953555107, + -0.01082898210734129, + -0.024997664615511894, + 0.007902568206191063, + 0.005147314630448818, + 0.030207598581910133, + -0.0062869880348443985, + 0.02852104976773262, + 0.002314830431714654, + 0.002245949115604162, + -0.0005922751734033227, + -0.006082430947571993, + 0.020806340500712395, + 0.018802518025040627, + -0.006065732799470425, + -0.03411504998803139, + -0.009518149308860302, + 0.005581475794315338, + 0.03723767027258873, + -0.022275807335972786, + 0.009668435901403427, + 0.017533432692289352, + -0.01256562676280737, + 0.005276727955788374, + -0.010403170250356197, + 0.014536050148308277, + 0.04425104334950447, + -0.024847378954291344, + 0.00023338772007264197, + 0.02558211237192154, + -0.014060142450034618, + -0.007752281613647938, + 0.04161268100142479, + 0.008132172748446465, + -0.003554694587364793, + -0.031176112592220306, + 0.0029097148217260838, + 0.015646500512957573, + -0.027368852868676186, + 0.018719026818871498, + -0.007794028148055077, + -0.007802377454936504, + -0.03723767027258873, + 0.011304888874292374, + -0.05206594616174698, + 0.012674166820943356, + 0.010261232033371925, + -0.005360220558941364, + -0.04658883437514305, + 0.020472370088100433, + -0.060949549078941345, + -0.00211966666392982, + 0.006140876095741987, + -0.026350243017077446, + -0.03312983736395836, + -0.0003524950298015028, + 0.02187504433095455, + 0.022175617516040802, + 0.021474279463291168, + 0.01818467490375042, + 0.02139078825712204, + 0.027752919122576714, + 0.02863794006407261, + 0.006270289421081543, + 0.0026759356260299683, + -0.004671407397836447, + -0.022325903177261353, + 0.0075226775370538235, + 0.007242977153509855, + -0.03787221387028694, + 0.018201371654868126, + 0.023628387600183487, + 0.01122139673680067, + -0.013116677291691303, + 0.0012649118434637785, + -0.03760503605008125, + -0.0658923089504242, + 0.0017314264550805092, + -0.009935611858963966, + 0.003650711150839925, + 0.005013726651668549, + -0.03309644013643265, + 0.02052246406674385, + -0.0012200346682220697, + -0.0029785961378365755, + 0.03403155878186226, + -0.008165569975972176, + 0.01731635257601738, + 0.0148282740265131, + 0.019754333421587944, + 0.014686336740851402, + 0.04124531149864197, + 0.031075920909643173, + 0.013809665106236935, + -0.00546041177585721, + 0.0007138611981645226, + 0.02882162295281887, + 0.03007401153445244, + 0.0076019954867661, + -0.01213146559894085, + -0.02776961773633957, + -0.024279629811644554, + 0.03640274330973625, + 0.018652232363820076, + -0.015688247978687286, + 0.029890326783061028, + 0.034081652760505676, + -0.002559046261012554, + -0.006712799891829491, + 0.01644802838563919, + 0.020021509379148483, + -0.011830892413854599, + 0.005305950529873371, + -0.005335173103958368, + -0.049627963453531265, + 0.0004226809542160481, + 0.04121191427111626, + 0.03500007092952728, + 0.022092124447226524, + -0.004268555901944637, + -0.007105214521288872, + -0.03331352025270462, + -0.020438972860574722, + 0.04501917585730553, + 0.06305356323719025, + 0.008474492467939854, + 0.012098068371415138, + 0.015487865544855595, + -0.0008484928985126317, + 0.011513620615005493, + -0.012123116292059422, + 0.015120497904717922, + -0.0009079813025891781, + -0.0031789783388376236, + -0.0008672787225805223, + -0.030641760677099228, + 0.005986414849758148, + 0.021190404891967773, + 0.00997735746204853, + 0.03550102561712265, + -0.009643387980759144, + -0.0027051582001149654, + 0.018101181834936142, + 0.026116464287042618, + -0.0055689518339931965, + 0.052500106394290924, + -0.0077355834655463696, + 0.020455671474337578, + 0.006458147428929806, + -0.02003820799291134, + 0.003752989461645484, + 0.003101747715845704, + -0.053401824086904526, + 0.018084483221173286, + -0.01244873646646738, + -0.0107120918110013, + 0.011004315689206123, + 0.028871718794107437, + -0.025699002668261528, + 0.047891318798065186, + -0.0033480506390333176, + 0.019036298617720604, + 0.023411307483911514, + -0.05056307837367058, + -0.022092124447226524, + -0.012123116292059422, + -0.001472599571570754, + 0.0012690864969044924, + -0.0007279505371116102, + 0.022726668044924736, + -0.015888629481196404, + -0.008649826981127262, + -0.019370267167687416, + 0.002730205887928605, + -0.022760065272450447, + -0.01292464416474104, + -0.0092843696475029, + -0.03067515790462494, + 0.008825160562992096, + -0.012348545715212822, + -0.003254121635109186, + 0.012649118900299072, + -0.0008944137953221798, + -0.01279105618596077, + -0.013158423826098442, + 0.04161268100142479, + 0.020388877019286156, + 0.009943961165845394, + -0.005318474490195513, + -0.01576339080929756, + -0.001572790672071278, + 0.0017481249524280429, + 0.0032374230213463306, + 0.004030602052807808, + -0.019403664395213127, + -0.020589258521795273, + -0.001281610457226634, + 0.000629846821539104, + 0.014778178185224533, + -0.008733319118618965, + 0.014661288820207119, + -0.031743861734867096, + 0.016940634697675705, + 0.005986414849758148, + -0.01286619994789362, + -0.011964480392634869, + 0.009008844383060932, + -0.010837331414222717, + -0.01701577939093113, + -0.019670840352773666, + -0.004078610334545374, + -0.034048255532979965, + -0.021340692415833473, + 0.01848524622619152, + -0.040310196578502655, + 0.016514822840690613, + -0.016781998798251152, + -0.023795371875166893, + -0.0014298096066340804, + -0.0028283095452934504, + -0.0401432104408741, + 0.006508243270218372, + -0.0019359831931069493, + -0.027552535757422447, + 0.004596264101564884, + 0.027485743165016174, + 0.018819216638803482, + -0.024379819631576538, + -0.013475694693624973, + -0.04602108523249626, + -0.00728054903447628, + 0.03967565298080444, + -0.0040911342948675156, + -0.045553527772426605, + 0.05323484167456627, + -0.009685133583843708, + -0.03262888267636299, + -0.060949549078941345, + -0.016155805438756943, + -0.025532016530632973, + -0.019286775961518288, + -0.03067515790462494, + 0.02671761065721512, + 0.02165796421468258, + -0.008407698012888432, + -0.02474718727171421, + 0.03456591069698334, + 0.004867614712566137, + 0.019971413537859917, + ], + "index": 27, + }, + { + "title": "Lake Miccosukee", + "text": "Lake Miccosukee is a large swampy prairie lake in northern Jefferson County, Florida, located east of the settlement of Miccosukee. A small portion of the lake, its northwest corner, is located in Leon County.", + "vector": [ + 0.02749829925596714, + -0.033846087753772736, + -0.01946479268372059, + -0.011892224662005901, + -0.02899964340031147, + 0.05244167894124985, + 0.012827271595597267, + -0.0391666404902935, + -0.02174314670264721, + -0.0047542559914290905, + -0.02645789459347725, + -0.010166996158659458, + 0.015592905692756176, + 0.04846443608403206, + -0.0005560075514949858, + -0.039693426340818405, + -0.017476169392466545, + -0.0014527806779369712, + -0.019306756556034088, + 0.05794660747051239, + 0.006621058564633131, + -0.009152930229902267, + 0.012642895802855492, + 0.01656746119260788, + 0.035031359642744064, + 0.02267819456756115, + -0.0034735039807856083, + 0.020808100700378418, + 0.004211006220430136, + 0.008171788416802883, + 0.027682675048708916, + 0.03086973913013935, + 0.014341785572469234, + -0.004869490396231413, + -0.005639916751533747, + -0.02475900575518608, + -0.015922147780656815, + -0.002941778162494302, + 0.042801473289728165, + -0.012096354737877846, + -0.015592905692756176, + -0.03574252128601074, + 0.033793408423662186, + 0.04309120401740074, + 0.015079287812113762, + 0.012260975316166878, + -0.014829063788056374, + -0.04519835487008095, + -0.0051756855100393295, + -0.039693426340818405, + -0.017989788204431534, + -0.02154560200870037, + -0.02345520630478859, + -0.028341159224510193, + -0.0010955530451610684, + -0.011971242725849152, + 0.041036732494831085, + 0.08686723560094833, + -0.08212614804506302, + -0.007276250049471855, + -0.0374809205532074, + -0.009495342150330544, + 0.008533954620361328, + 0.019912561401724815, + -0.004352580290287733, + 0.013722809962928295, + 0.004105648957192898, + 0.017002061009407043, + 0.04079968109726906, + 0.03184429556131363, + 7.652306521777064e-06, + 0.04770059511065483, + -0.0041319881565868855, + 0.002006730530411005, + 0.0031277998350560665, + 0.0025960737839341164, + 0.006275354418903589, + -0.03945637121796608, + -0.0024281605146825314, + 0.021190021187067032, + 0.015974825248122215, + -0.020584214478731155, + 0.012840441428124905, + 0.013176267966628075, + 0.017858091741800308, + 0.043986741453409195, + 0.0027162472251802683, + -0.039693426340818405, + -0.006262184586375952, + 0.009337306022644043, + 0.01216878741979599, + 0.03561082482337952, + -0.0036447099409997463, + 0.01232682354748249, + 0.011951487511396408, + -0.041089411824941635, + 0.07143236696720123, + 0.014117901213467121, + -0.01610652357339859, + 0.014368124306201935, + -0.006999686826020479, + -0.016119692474603653, + -0.0039377352222800255, + -0.014644687995314598, + 0.005188855342566967, + -0.026392046362161636, + -0.008915876038372517, + 0.010687198489904404, + 0.006815311033278704, + -0.030948756262660027, + 0.04946533218026161, + -0.001521921600215137, + 0.0011046072468161583, + -0.04022021219134331, + -0.029947860166430473, + 0.005774906370788813, + 0.017779072746634483, + 0.02620767056941986, + -0.016593800857663155, + -0.01455250009894371, + -0.01693621277809143, + 0.0011531703639775515, + 0.04469790682196617, + 0.006647397764027119, + 0.019741356372833252, + 0.04090503603219986, + -0.03329296037554741, + -0.03242376074194908, + 0.025193603709340096, + 0.07201182842254639, + 0.05757785588502884, + -0.003098167944699526, + -0.0004922169027850032, + -0.0036973885726183653, + -0.046673357486724854, + 0.06358323246240616, + 0.026760796085000038, + 0.015553396195173264, + 0.04029923304915428, + 0.001327668665908277, + 0.010213089175522327, + 0.011293003335595131, + 0.027103208005428314, + -0.031975992023944855, + 0.03142286464571953, + -0.030105896294116974, + -0.02770901471376419, + -0.00913976039737463, + 0.03376706689596176, + -0.05462784692645073, + 0.01162224542349577, + -0.03745457902550697, + 0.07037878781557083, + 0.0374809205532074, + 0.05863143131136894, + 0.043828707188367844, + -0.018819477409124374, + 0.012280729599297047, + 0.0004930400173179805, + -0.008599803782999516, + 0.026326198130846024, + -0.009034402668476105, + 0.047252826392650604, + -0.038244761526584625, + -0.013327719643712044, + -0.0036677569150924683, + -0.010397464968264103, + -0.05133542791008949, + -0.018160993233323097, + 0.03276617452502251, + 0.012254390865564346, + 0.02770901471376419, + -0.02842017635703087, + -0.03345099464058876, + 0.03700681030750275, + -0.051967572420835495, + -0.00991677213460207, + -0.0523889996111393, + -0.034873321652412415, + -0.006940423045307398, + -0.014117901213467121, + -0.029631787911057472, + 0.044355493038892746, + -0.0053468914702534676, + -0.005659671500325203, + -0.029236696660518646, + -0.002042947104200721, + 0.022862570360302925, + 0.045277372002601624, + -0.05215194821357727, + 0.018503405153751373, + -0.0390612818300724, + 0.028709910809993744, + -0.010456728748977184, + 0.02921035885810852, + 0.012847025878727436, + -0.05789392814040184, + 0.04240638017654419, + 0.01708108000457287, + 0.015803620219230652, + 0.023902975022792816, + 0.008428597822785378, + -0.04804300516843796, + 0.023428866639733315, + -0.004941923543810844, + 0.016751836985349655, + -0.003865302074700594, + -0.046620678156614304, + -0.009093666449189186, + 0.002678384305909276, + -0.02050519734621048, + -0.033530015498399734, + -0.042748793959617615, + -0.025193603709340096, + 0.008533954620361328, + 0.01584312878549099, + -0.014908081851899624, + -0.017370812594890594, + -0.008527370169758797, + -0.005231656599789858, + 0.08049310743808746, + -0.0036677569150924683, + -0.0009918417781591415, + 0.012445351108908653, + -0.04172155633568764, + 0.016396256163716316, + 0.02428489737212658, + 0.06495288014411926, + 0.02030765265226364, + -0.02439025416970253, + 0.05531267076730728, + -0.05436445400118828, + 0.028393838554620743, + 0.027629995718598366, + -0.007052365690469742, + -0.021111002191901207, + 0.025865258648991585, + 0.00731575908139348, + 0.02475900575518608, + -0.014078391715884209, + -0.02112417295575142, + 0.046673357486724854, + -0.03511037677526474, + 0.023336678743362427, + -0.017897600308060646, + -0.022401630878448486, + 0.00731575908139348, + 0.009515096433460712, + -0.0382184199988842, + -0.005172393284738064, + -0.034451890736818314, + 0.01159590668976307, + 0.039640747010707855, + -0.03993048146367073, + 0.012313653714954853, + 0.03345099464058876, + 0.041616201400756836, + -0.04143182560801506, + -0.013472585938870907, + -0.01880630850791931, + -0.008211297914385796, + -0.02506190724670887, + 0.033740729093551636, + -0.04975506290793419, + -0.010265768505632877, + 0.03308224678039551, + 0.05075595900416374, + -0.0014091561315581203, + -0.04364433139562607, + -0.04533005133271217, + -0.011325927451252937, + 0.00738160777837038, + -0.007724019233137369, + 0.015922147780656815, + 0.05425909534096718, + 0.02453511953353882, + -0.023955654352903366, + -0.02184850536286831, + -0.010726707056164742, + 0.01791076920926571, + 0.07190646976232529, + -0.017568357288837433, + 0.008138864301145077, + -0.02693200297653675, + 0.04008851572871208, + -0.0029845794197171926, + 0.03708582744002342, + 0.024377083405852318, + -0.016738668084144592, + -0.03092241659760475, + 0.01431544590741396, + -0.06974664330482483, + 0.028446516022086143, + 0.023850297555327415, + -0.0301849152892828, + -0.005304090213030577, + 0.01744983159005642, + 0.020083768293261528, + -0.04635728523135185, + -0.006709953770041466, + 0.04438183456659317, + 0.051388103514909744, + 0.033108584582805634, + -0.03226572647690773, + 0.05441713333129883, + -0.019715016707777977, + 0.006420220714062452, + 0.011325927451252937, + -0.023784449324011803, + -0.011767112649977207, + 0.0021005645394325256, + 0.010048468597233295, + -0.022493818774819374, + -0.03563716262578964, + 0.03558448329567909, + -0.04432915523648262, + 0.028130443766713142, + 0.0184770654886961, + -0.02500922977924347, + -0.011154722422361374, + 0.04143182560801506, + -0.0008276323205791414, + -0.00306195137090981, + -0.001674195984378457, + 0.027629995718598366, + -0.03147554397583008, + -0.0033154678530991077, + -0.0037599445786327124, + -0.02697151154279709, + 0.039430033415555954, + -0.03226572647690773, + 0.02868357114493847, + -0.050782300531864166, + -0.03877154737710953, + 0.053626950830221176, + 0.030421968549489975, + 0.044618889689445496, + 0.020413009449839592, + -0.015434869565069675, + 0.04488228261470795, + 0.013340889476239681, + -0.04964970797300339, + 0.029816163703799248, + 0.01806880533695221, + 0.007407946977764368, + 0.017107419669628143, + 0.005234949290752411, + 0.013485755771398544, + 0.02329717017710209, + 0.009067326784133911, + 0.0005193793913349509, + -0.018766799941658974, + 0.03887690603733063, + -0.0019738064147531986, + 0.02899964340031147, + 0.021427074447274208, + 0.012162202969193459, + 0.007585737854242325, + 0.03755993768572807, + -0.019912561401724815, + -0.015026608482003212, + -0.014433973468840122, + 0.01662014052271843, + 0.007276250049471855, + 0.05763053521513939, + 0.04975506290793419, + -0.04345995560288429, + 0.029289375990629196, + 0.02776169218122959, + 0.005402862560003996, + 0.01064110454171896, + -0.010357956402003765, + -0.03500501811504364, + 0.0005123830051161349, + 0.02589159831404686, + -0.028499195352196693, + 0.026023294776678085, + -0.012491445057094097, + -0.03597957640886307, + 0.01584312878549099, + 0.007737189065665007, + 0.03400412201881409, + 0.055944815278053284, + 0.02050519734621048, + -0.004230760969221592, + -0.052072927355766296, + 0.01159590668976307, + -0.04008851572871208, + -0.03703315183520317, + 0.008250806480646133, + -0.016909873113036156, + 0.0008156972471624613, + -0.03558448329567909, + -0.021045153960585594, + -0.03210768848657608, + 0.01791076920926571, + -0.05252069979906082, + 0.005452249199151993, + 0.010140656493604183, + -0.01646210439503193, + -0.0024281605146825314, + 0.05257337540388107, + -0.04411844164133072, + 0.020650064572691917, + -0.045488085597753525, + 0.021940693259239197, + -0.007816207595169544, + 0.03558448329567909, + -0.05436445400118828, + -0.012333408929407597, + -0.005294212605804205, + -0.006762632634490728, + 0.009890432469546795, + 0.007677925284951925, + 0.011246909387409687, + -0.028393838554620743, + 0.015316342003643513, + -0.009403154253959656, + -0.009488756768405437, + -0.003509720554575324, + -0.02444293349981308, + -0.010377710685133934, + -0.00039982335874810815, + 0.040984056890010834, + -0.04095771536231041, + -0.0016445642104372382, + -0.0012593510327860713, + 0.04822738096117973, + -0.011003270745277405, + -0.0770689845085144, + -0.007131383754312992, + -0.0009877262637019157, + -0.03410948067903519, + -0.03152822330594063, + -0.017568357288837433, + 0.005791368428617716, + 2.5824925614870153e-05, + -0.006614473648369312, + 0.0010766215855255723, + 0.022902078926563263, + 0.046067554503679276, + 0.03437287360429764, + 0.006614473648369312, + -0.002614182187244296, + -0.009890432469546795, + 0.012366333045065403, + -0.012991893105208874, + -0.003960782196372747, + 0.0760154128074646, + -0.01178028155118227, + -0.0001105018745874986, + 0.04604121297597885, + -0.019688677042722702, + 0.020162785425782204, + -0.008316654711961746, + -0.029737144708633423, + 0.01776590384542942, + -0.004800349473953247, + -0.03700681030750275, + 0.06384662538766861, + 0.0186351016163826, + -0.023323509842157364, + 0.021967032924294472, + -0.04685773327946663, + -0.0027047237381339073, + -0.06869307160377502, + -0.003802746068686247, + 0.029710806906223297, + -0.03126483038067818, + -0.020031088963150978, + -0.05504927784204483, + 0.026536911725997925, + -0.027524638921022415, + -0.024614138528704643, + -0.024877531453967094, + -0.038613513112068176, + 0.046673357486724854, + -0.029789824038743973, + 0.017423491925001144, + 0.03553180769085884, + 0.030474647879600525, + 0.05425909534096718, + -0.04127378761768341, + 0.04633094742894173, + -0.03263447433710098, + 0.007361853029578924, + -0.0001594766363268718, + 0.025601865723729134, + 0.02174314670264721, + -0.03755993768572807, + 0.059158217161893845, + 0.03576885908842087, + 0.02776169218122959, + -0.00820471253246069, + -0.006515700835734606, + 0.035136714577674866, + -0.012438765726983547, + 0.01870094984769821, + 0.0052020251750946045, + 0.025667713955044746, + 0.029025983065366745, + 0.06611181050539017, + 0.02899964340031147, + 0.05254703760147095, + 0.032186705619096756, + -0.016027504578232765, + -0.0033171139657497406, + 0.0233630184084177, + 0.007710849866271019, + -0.04633094742894173, + 0.0038488400168716908, + -0.04583049938082695, + -0.014921251684427261, + 0.031817954033613205, + -0.022915249690413475, + 0.025193603709340096, + 0.024732666090130806, + -0.009416324086487293, + 0.010555501095950603, + 0.00851420033723116, + -0.04612023010849953, + 0.02018912509083748, + 0.030474647879600525, + -0.028446516022086143, + -0.006081101484596729, + 0.03576885908842087, + 0.011707848869264126, + 0.02226993441581726, + 0.05441713333129883, + -0.017160097137093544, + -0.05868411064147949, + 0.013156513683497906, + 0.04345995560288429, + -0.024245386943221092, + 0.07259129732847214, + -0.02414003014564514, + -0.011576151475310326, + 0.0012461813166737556, + 0.020373500883579254, + 0.01573777198791504, + -0.017844920977950096, + -0.01750250905752182, + -0.018858985975384712, + -0.0059263575822114944, + -0.02718222700059414, + 0.005379815585911274, + 0.011747357435524464, + -0.008744670078158379, + -0.0062654768116772175, + 0.032292064279317856, + 0.025746731087565422, + -0.002126903971657157, + 0.052889447659254074, + 0.0011136613320559263, + 0.02537797950208187, + -0.011246909387409687, + -0.0021861675195395947, + 0.0025730268098413944, + 0.010140656493604183, + -0.009666548110544682, + 0.0116024911403656, + 0.002016607904806733, + 0.016330407932400703, + 0.02947375178337097, + 0.012030505575239658, + 0.0192145686596632, + -0.01787126064300537, + 0.012840441428124905, + 0.03987780213356018, + -0.006035007536411285, + 0.0268266461789608, + 0.0022898786701261997, + 0.02936839498579502, + -0.04182691499590874, + 0.04261709749698639, + -0.004227468278259039, + -0.03869253024458885, + 0.019715016707777977, + 0.03408314287662506, + -0.00020248389046173543, + 0.019754525274038315, + 0.012175372801721096, + -0.004115526098757982, + 0.048490773886442184, + 0.04638362675905228, + 0.0005004479899071157, + -0.010041884146630764, + 0.05017649382352829, + -0.046936750411987305, + 0.05710374936461449, + 0.009620454162359238, + -0.03597957640886307, + 0.018187332898378372, + 0.0004230760969221592, + 0.031975992023944855, + 0.01120740082114935, + -0.021255869418382645, + -0.019635997712612152, + -0.027682675048708916, + 0.010469898581504822, + 0.06063322350382805, + 0.0225728377699852, + -0.018964344635605812, + -0.04701577126979828, + -0.004951801151037216, + -0.006347787566483021, + 0.002844651695340872, + 0.020439349114894867, + 0.009725810959935188, + 0.005040696356445551, + 0.0035294753033667803, + -0.04361799359321594, + 0.04327557981014252, + 0.013077495619654655, + 0.033108584582805634, + -0.029631787911057472, + 0.0038521324750036, + 0.012484859675168991, + 0.022151406854391098, + 0.022770382463932037, + 0.02408735081553459, + -0.010061638429760933, + -0.007974243722856045, + -0.01677817665040493, + 0.017423491925001144, + -0.025233114138245583, + 0.0028989766724407673, + -0.01978086493909359, + -0.030632684007287025, + 0.004457938019186258, + 0.023494714871048927, + -0.06558502465486526, + -0.0032874823082238436, + -0.0012363040586933494, + -0.011372021399438381, + -0.014052052050828934, + 0.016541123390197754, + -0.008191543631255627, + -0.026918834075331688, + 0.027471959590911865, + 0.011273249052464962, + 0.04622558876872063, + 0.0012363040586933494, + -0.04812202230095863, + 0.013169683516025543, + -0.020834438502788544, + 0.0016124631511047482, + 0.004171497188508511, + 0.014894912019371986, + 0.07285469025373459, + -0.0027952652890235186, + -0.026813475415110588, + 0.03645368292927742, + 0.004500739276409149, + -0.0019738064147531986, + -0.0009111774852499366, + 0.004234053194522858, + 0.016857195645570755, + 0.015579735860228539, + -0.019596489146351814, + -0.05349525436758995, + 0.020057428628206253, + -0.026852983981370926, + 0.021427074447274208, + -0.009021232835948467, + -0.0001911661820486188, + -0.011635415256023407, + 0.0384291373193264, + -0.002620767103508115, + -0.0006909968215040863, + 0.004757548216730356, + 0.019965240731835365, + -0.02097930572926998, + -0.013288211077451706, + 0.01423642784357071, + -0.04648898169398308, + -0.010219674557447433, + -0.031817954033613205, + -0.04469790682196617, + 0.028815267607569695, + -0.021519262343645096, + -0.0018141239415854216, + 0.008461521938443184, + 0.01864827238023281, + -0.03416216000914574, + 0.006222675554454327, + 0.014934421516954899, + -0.0043887970969080925, + -0.017844920977950096, + -0.029078660532832146, + 0.01796344853937626, + -0.013321135193109512, + -0.0047542559914290905, + 0.008929045870900154, + -0.03424117714166641, + 0.0004420074983499944, + -0.03489966318011284, + -0.01827952079474926, + 0.0021087955683469772, + -0.016014335677027702, + 0.022902078926563263, + 0.03924565762281418, + -0.02096613682806492, + 0.017476169392466545, + -0.002671799622476101, + 0.007500134874135256, + 0.003168955212458968, + 0.013775489293038845, + 0.013459417037665844, + 0.019807204604148865, + 0.01702840067446232, + 0.006021837703883648, + -0.009284626692533493, + -0.004122111015021801, + -0.007197231985628605, + -0.03848181664943695, + -0.04143182560801506, + -0.005551021546125412, + -0.016699159517884254, + 0.011325927451252937, + 0.0024907162878662348, + 0.05173051729798317, + 0.0004066139808855951, + -0.006304985843598843, + -0.024719495326280594, + 0.04335459694266319, + 0.006594718899577856, + -0.039271995425224304, + -0.02195386216044426, + 0.007177477702498436, + -0.0015120443422347307, + 0.011569567024707794, + -0.07965024560689926, + 0.003875179449096322, + 0.02454829029738903, + 0.02770901471376419, + -0.015711432322859764, + -0.016712328419089317, + 0.023573733866214752, + -0.00026421676739118993, + 0.060001078993082047, + -0.02392931468784809, + -0.022638686001300812, + -0.009501926600933075, + -0.019556980580091476, + 0.006947007961571217, + -0.02030765265226364, + -0.010614764876663685, + 0.0021812289487570524, + 0.006647397764027119, + 0.011536642909049988, + 0.006061346735805273, + -0.039904139935970306, + -0.023033777251839638, + -0.02066323347389698, + 0.001507928711362183, + 0.028262140229344368, + -0.013169683516025543, + 0.05768321454524994, + -0.0017104126745834947, + 0.017634205520153046, + -0.009758735075592995, + 0.04064164310693741, + 0.0188984964042902, + -0.039851460605859756, + 0.022981097921729088, + 0.014868572354316711, + -0.03189697489142418, + -0.007763528265058994, + -0.01175394281744957, + -0.023942485451698303, + 0.030685363337397575, + -0.005824292544275522, + 0.015513887628912926, + -0.01136543694883585, + -0.0379023477435112, + -0.005103252362459898, + -0.03397778421640396, + -0.03086973913013935, + 0.007664755918085575, + 0.006400466430932283, + 0.02267819456756115, + -0.004382212180644274, + -0.0012791055487468839, + -0.04754255712032318, + 0.008112524636089802, + -0.004839858505874872, + 0.007348683197051287, + -0.03645368292927742, + 0.03447823226451874, + -0.03252911940217018, + 0.007111629005521536, + 0.02899964340031147, + -0.04988676309585571, + 0.020794929936528206, + 0.0011581090511754155, + 0.04359165206551552, + -0.02039984054863453, + 0.012234635651111603, + -0.011773697100579739, + 0.023376189172267914, + 0.02242797054350376, + 0.006235845386981964, + 0.022098729386925697, + 0.029394732788205147, + -0.04195861145853996, + -0.014868572354316711, + 0.02253332920372486, + -0.009284626692533493, + 0.05101935565471649, + 0.00890270620584488, + 0.031817954033613205, + 0.01942528411746025, + -0.04040458798408508, + 0.020228633657097816, + 0.025496507063508034, + 0.03279251232743263, + -0.043064866214990616, + 0.032239384949207306, + 0.0026421677321195602, + 0.008915876038372517, + -0.003348391968756914, + 0.01651478372514248, + -0.05125640705227852, + -0.03194965049624443, + 0.005751859396696091, + 0.02558869495987892, + -0.0012033798266202211, + -0.00623913761228323, + -0.021861674264073372, + -0.023784449324011803, + -0.05070328339934349, + -0.015553396195173264, + -0.03640100359916687, + -0.012847025878727436, + 0.027261244133114815, + 0.02997419983148575, + 0.008580048568546772, + -0.007012856658548117, + 0.021980201825499535, + 0.0116024911403656, + -0.045962195843458176, + 0.024350745603442192, + -0.019754525274038315, + 0.005939527414739132, + 0.03158090263605118, + -0.019701845943927765, + -0.03226572647690773, + 0.028446516022086143, + -0.033319298177957535, + 0.048596132546663284, + 0.014275937341153622, + 0.008092770352959633, + 0.00604488467797637, + 0.0046423133462667465, + -0.02149292267858982, + 0.027103208005428314, + -0.008310070261359215, + 0.006077808793634176, + -0.00525470357388258, + -0.010002374649047852, + 0.02583891898393631, + 0.020268142223358154, + 0.02552284672856331, + 0.007677925284951925, + -0.03387242555618286, + 0.02419270947575569, + 0.022348953410983086, + 0.040062177926301956, + 0.019148720428347588, + 0.005386400502175093, + -0.05244167894124985, + -0.009594114497303963, + 0.014065221883356571, + -0.03687511384487152, + 0.014671027660369873, + -0.016949383541941643, + 0.0038488400168716908, + 0.017844920977950096, + 0.010246014222502708, + -0.0004154623602516949, + 0.01766054518520832, + 0.032134026288986206, + -0.018450725823640823, + -0.01278776302933693, + 0.013538435101509094, + 0.0033269913401454687, + 0.007822792045772076, + 0.023178642615675926, + -0.020386669784784317, + -0.059526968747377396, + 0.006769217550754547, + -0.024996059015393257, + 0.017700055614113808, + -0.017318133264780045, + 0.012741669081151485, + 0.012985307723283768, + -0.045909516513347626, + 0.0193726047873497, + -0.004905707202851772, + -0.0026964927092194557, + 0.021045153960585594, + -0.04359165206551552, + 0.009666548110544682, + -0.024153199046850204, + 0.05710374936461449, + -0.0054555414244532585, + -0.02382395789027214, + -0.017107419669628143, + 0.07037878781557083, + 0.01263631135225296, + -0.019346265122294426, + -0.044092100113630295, + -0.037876009941101074, + -0.012438765726983547, + 0.01983354426920414, + -0.017265455797314644, + 0.021980201825499535, + -0.01870094984769821, + 0.07132700830698013, + 0.029868843033909798, + -0.0013935171300545335, + 0.01568509265780449, + 0.047147467732429504, + 0.0011416469933465123, + 0.014829063788056374, + 0.045962195843458176, + -0.03447823226451874, + 0.01771322451531887, + -0.008033506572246552, + -0.004079309292137623, + 0.0041122338734567165, + 0.005244826432317495, + 0.02407418191432953, + 0.010996685363352299, + -0.032028671354055405, + 0.04008851572871208, + 0.0009424554882571101, + -0.019715016707777977, + 0.021427074447274208, + -0.004935339093208313, + 0.03466260805726051, + -0.020518366247415543, + 0.056313566863536835, + -0.053047485649585724, + 0.001944174524396658, + 0.012465105392038822, + -0.02454829029738903, + -0.02200654149055481, + -0.0013400153256952763, + -0.06742878258228302, + 0.019741356372833252, + 0.015566566027700901, + 0.008158618584275246, + 0.026813475415110588, + -0.019082872197031975, + -0.009231948293745518, + 0.02707687020301819, + 0.02366592176258564, + -0.025812579318881035, + -0.045119334012269974, + -0.017647376284003258, + 0.00428673205897212, + 0.007269665133208036, + -0.010232844389975071, + 0.012366333045065403, + -0.045962195843458176, + -0.04485594108700752, + 0.019715016707777977, + 0.0005366646219044924, + -0.010226259008049965, + 0.03774431347846985, + -0.011747357435524464, + 0.03977244347333908, + 0.039271995425224304, + -0.03924565762281418, + 0.017212776467204094, + -0.0005420147790573537, + 0.012847025878727436, + 0.04174789786338806, + 0.03766529634594917, + -0.011826375499367714, + -0.008553709834814072, + 0.06885110586881638, + -0.012926043942570686, + 0.050044797360897064, + 0.01121398527175188, + -0.005919772665947676, + 0.013696471229195595, + 0.034504570066928864, + 0.009179269894957542, + -0.05568142235279083, + -0.008138864301145077, + 0.007210401818156242, + -0.017700055614113808, + 0.002270124154165387, + -0.04772693291306496, + -0.009080496616661549, + -0.06616449356079102, + -0.004721331410109997, + 0.007375022862106562, + 0.03297688812017441, + -0.004484277218580246, + 0.005185563117265701, + -0.04361799359321594, + -0.02739294245839119, + -0.019333096221089363, + -0.01771322451531887, + 0.009343890473246574, + 0.020900288596749306, + 0.044197458773851395, + 0.018727289512753487, + 0.025970615446567535, + -0.006166704464703798, + 0.011642000637948513, + -0.004211006220430136, + -0.015908977016806602, + 0.0192145686596632, + 0.042327363044023514, + 0.035031359642744064, + -0.01667281985282898, + 0.005659671500325203, + -0.01255729328840971, + -0.010825480334460735, + -0.021822165697813034, + 0.007618661969900131, + -0.0004292493686079979, + 0.002701431280001998, + 0.025496507063508034, + -0.020268142223358154, + 0.02180899679660797, + 0.0059889135882258415, + -0.021413905546069145, + 0.011655169539153576, + 0.00422088336199522, + 0.0004113468457944691, + 0.016949383541941643, + 0.02884160727262497, + 0.00406284723430872, + -0.0064366827718913555, + -0.005080205388367176, + 0.01573777198791504, + -0.02776169218122959, + -0.0134133230894804, + 0.0010864988435059786, + -0.01838487759232521, + 0.013084081001579762, + -0.03416216000914574, + -0.04027289152145386, + 0.01750250905752182, + -0.020900288596749306, + 0.017067909240722656, + -0.004810227081179619, + 0.04166887700557709, + -0.013643791899085045, + -0.011016440577805042, + -0.008718330413103104, + 0.0032710202503949404, + -0.013097249902784824, + 0.005972451530396938, + -0.005109837278723717, + -0.02407418191432953, + -0.01286678109318018, + 0.011642000637948513, + 0.013801828026771545, + -0.011016440577805042, + 0.04438183456659317, + 0.025904767215251923, + 0.017160097137093544, + -0.003542644903063774, + -0.005475295707583427, + -0.0023244491312652826, + 0.003015857422724366, + 0.01367013156414032, + -0.02087394893169403, + -0.04540906846523285, + 0.03713850677013397, + -0.016383087262511253, + 0.004237345885485411, + -0.03421483933925629, + -0.033530015498399734, + -0.009133175946772099, + -0.01548754796385765, + 0.013564773835241795, + 0.01305115595459938, + 0.0007309174397960305, + -0.018305860459804535, + 0.03360903263092041, + 0.008448352105915546, + 0.013393567875027657, + -0.006028422620147467, + 0.06384662538766861, + -0.0189511738717556, + 0.006854820065200329, + -0.03708582744002342, + 0.03397778421640396, + -0.003954197280108929, + 0.041616201400756836, + -0.07327611744403839, + -0.0005053866188973188, + 0.024416593834757805, + -0.01025259867310524, + -0.009166100062429905, + 0.010232844389975071, + 0.0014066868461668491, + 0.032239384949207306, + -0.0035591069608926773, + -0.008665652014315128, + -0.00841542799025774, + -0.012287314981222153, + 0.0002477546804584563, + 0.0013095603790134192, + -0.029895180836319923, + 0.00715772295370698, + -0.009745566174387932, + -0.022744042798876762, + 0.012886535376310349, + 0.0037928689271211624, + 0.05001845955848694, + 6.51282025501132e-05, + -0.030527327209711075, + 0.013044571503996849, + -0.005373230669647455, + -0.009817998856306076, + -0.007151138037443161, + -0.02020229399204254, + 0.003858717391267419, + 0.028104104101657867, + -0.006341202650219202, + -0.003430702490732074, + -0.010377710685133934, + -0.030158575624227524, + 0.03516305610537529, + 0.01589580811560154, + -0.018450725823640823, + 0.03687511384487152, + -0.0030175037682056427, + -0.04930729418992996, + 0.01294579915702343, + -0.010608180426061153, + 0.0014791201101616025, + 0.0042801471427083015, + -0.0022273226641118526, + 0.008020337671041489, + 0.024521950632333755, + -0.0019063117215409875, + 0.0007646647281944752, + 0.01802929677069187, + 0.012386087328195572, + -0.03537376970052719, + 0.00230469461530447, + 0.008948800154030323, + -0.0374809205532074, + -0.03126483038067818, + -0.00888295192271471, + -0.017423491925001144, + 0.00507691316306591, + -0.013163099065423012, + 0.005824292544275522, + -0.028657231479883194, + 0.027893390506505966, + -0.02138756588101387, + 0.006874574813991785, + 0.025338470935821533, + -0.0009177623433060944, + 0.02475900575518608, + 0.02936839498579502, + -0.0011811560252681375, + -0.012781177647411823, + -0.01535585056990385, + 0.0022503696382045746, + -0.011951487511396408, + 0.02133488655090332, + -0.0029170848429203033, + 0.004793765023350716, + 0.0007420293404720724, + -0.012129278853535652, + 0.02718222700059414, + -0.021242698654532433, + -0.006867989897727966, + -0.03287152945995331, + 0.008705160580575466, + -0.01730496436357498, + -0.02066323347389698, + 0.008560294285416603, + -0.010871573351323605, + 0.010272352956235409, + -0.00488266022875905, + -0.017423491925001144, + -0.005679426249116659, + 0.002426514169201255, + 0.015382190234959126, + -0.02341569773852825, + 0.01935943402349949, + 0.0028545288369059563, + 0.02776169218122959, + 0.04799032583832741, + 5.797747508040629e-05, + 0.021269038319587708, + 0.006104148458689451, + -0.0002553683880250901, + -0.03439921513199806, + 0.001487351139076054, + 0.01978086493909359, + -0.021716808900237083, + -0.023442037403583527, + -0.016225049272179604, + -0.04485594108700752, + 0.02557552605867386, + -0.014499821700155735, + 0.00507691316306591, + -0.01719960756599903, + -0.008547124452888966, + 0.03432019427418709, + -0.011273249052464962, + -0.028657231479883194, + -0.0028183122631162405, + -0.00044900388456881046, + -0.011839545331895351, + 0.008869782090187073, + -0.007862301543354988, + 0.0373755618929863, + -0.023178642615675926, + 0.018319029361009598, + -0.018240012228488922, + -0.008066431619226933, + -0.024574629962444305, + -0.015922147780656815, + -0.0029961029067635536, + -0.04533005133271217, + 0.022019710391759872, + 0.010904498398303986, + -0.02283623069524765, + -0.004948508460074663, + -0.019082872197031975, + -0.04111575335264206, + 0.007803037296980619, + 0.0017960155382752419, + -0.0017005354166030884, + 0.021348057314753532, + 0.003073474857956171, + -0.007269665133208036, + 0.007533058989793062, + 0.044302813708782196, + 0.0134133230894804, + 0.012741669081151485, + -0.005501635372638702, + 0.006038299761712551, + -0.0016289252089336514, + -0.017542017623782158, + 0.011688094586133957, + 0.02765633538365364, + -0.01136543694883585, + 0.00512629933655262, + 0.038666192442178726, + 0.0006292639300227165, + 0.007210401818156242, + 0.01884581707417965, + -0.022717704996466637, + 0.007572568021714687, + 0.006788971833884716, + -0.019240908324718475, + -0.02537797950208187, + -0.0268266461789608, + 0.006028422620147467, + 0.01822684146463871, + 0.012445351108908653, + 0.026010125875473022, + 0.05360061302781105, + 0.0005712350248359144, + 0.013973033986985683, + -0.020175954326987267, + -0.039798785001039505, + 0.021993370726704597, + 0.023231321945786476, + 0.04799032583832741, + -0.0022503696382045746, + -0.018938004970550537, + 0.03634832799434662, + 0.019096041098237038, + -0.0050275265239179134, + 0.002452853601425886, + 0.010884743183851242, + -0.023007437586784363, + -0.0017515679355710745, + -0.011312758550047874, + -0.0025219942908734083, + -0.006953592877835035, + -0.009804829023778439, + 0.011839545331895351, + -0.01162224542349577, + 0.0032183413859456778, + -0.015553396195173264, + -1.1150503269163892e-05, + 0.008152034133672714, + 0.019227737560868263, + 0.007803037296980619, + 0.023442037403583527, + -0.01642259582877159, + -0.014091561548411846, + -0.002925315871834755, + 0.013735979795455933, + 0.0008650835952721536, + 0.003073474857956171, + 0.0057123503647744656, + -0.00999579019844532, + -0.039430033415555954, + -0.004115526098757982, + 0.007677925284951925, + 0.027577318251132965, + -0.0017647376516833901, + -0.000396119401557371, + -0.015777280554175377, + -0.011661754921078682, + 0.04359165206551552, + -0.0093175508081913, + 0.028051426634192467, + 0.004951801151037216, + -0.0018338784575462341, + -0.010107732377946377, + 0.02190118283033371, + 0.021255869418382645, + -0.03126483038067818, + 0.0037928689271211624, + 0.01796344853937626, + 0.017489340156316757, + -0.012952383607625961, + 0.023705430328845978, + -0.008784178644418716, + -0.009225362911820412, + -0.005096667446196079, + -0.013959864154458046, + -0.01351209543645382, + -0.02475900575518608, + 0.0069733476266264915, + 0.01452616136521101, + -0.04185325279831886, + -0.001875033718533814, + 0.017726393416523933, + -0.022849401459097862, + 0.0034438723232597113, + 0.0038949339650571346, + -7.52626801840961e-05, + 0.00493204640224576, + -0.005781491287052631, + 0.0032002332154661417, + 0.015987996011972427, + 0.027629995718598366, + -0.010687198489904404, + 0.011339097283780575, + -0.04293316975235939, + 0.013294795528054237, + -0.023916145786643028, + 0.009976034983992577, + -0.008112524636089802, + 0.020689573138952255, + -0.024153199046850204, + 0.002120319055393338, + 0.038192082196474075, + -0.02324449084699154, + 0.008000582456588745, + -0.005653086584061384, + -0.0004080544167663902, + -0.00722357165068388, + 0.010397464968264103, + 0.020808100700378418, + 0.005600407719612122, + -0.0307117011398077, + -0.020492028445005417, + 0.032239384949207306, + 0.016290899366140366, + -0.028051426634192467, + -0.004382212180644274, + -0.0187931377440691, + -0.03410948067903519, + 0.004082601983100176, + 0.006574964616447687, + -0.00784913171082735, + -0.048754166811704636, + 0.00033356339554302394, + -0.01730496436357498, + -0.010595010593533516, + -0.013117005117237568, + 0.015184645541012287, + 0.021005645394325256, + 0.0071643078699707985, + 0.012629726901650429, + 0.030790720134973526, + 0.027050530537962914, + 0.006410343572497368, + 0.010107732377946377, + -0.005244826432317495, + 0.01951747015118599, + 0.024521950632333755, + -0.0006683614337816834, + 0.010924252681434155, + -0.031765278428792953, + 0.0059889135882258415, + -0.050624262541532516, + 0.022098729386925697, + -0.041616201400756836, + -0.03287152945995331, + 0.0154085299000144, + -0.010206504724919796, + 0.03276617452502251, + -0.0013515388127416372, + 0.007519889157265425, + -0.01222146674990654, + -0.015803620219230652, + -0.009093666449189186, + -0.011497133411467075, + 0.003470211522653699, + 0.0009473941172473133, + 0.01476321555674076, + 0.0152504937723279, + -0.012688989751040936, + 0.002385359024628997, + 0.033108584582805634, + -0.022967929020524025, + 0.028262140229344368, + 0.00041443348163738847, + 0.0027425866574048996, + 0.00332040642388165, + -0.010107732377946377, + -0.010608180426061153, + -0.025825750082731247, + -0.008237636648118496, + 0.0031903558410704136, + 0.018134653568267822, + -0.03761261701583862, + 0.006169996690005064, + 0.033688049763441086, + -0.010456728748977184, + 0.000609509414061904, + 0.047463539987802505, + -0.005040696356445551, + -0.0007070474093779922, + 0.04027289152145386, + -0.011846130713820457, + -0.01007480826228857, + 0.0006342025590129197, + -0.006347787566483021, + 0.024930210784077644, + -0.014671027660369873, + 0.009956280700862408, + 0.0042175911366939545, + 0.014973930083215237, + -0.0015383836580440402, + -0.025206774473190308, + 0.01941211335361004, + -0.022862570360302925, + -0.032028671354055405, + 0.018556084483861923, + 0.03226572647690773, + 0.032186705619096756, + 0.004421721212565899, + -0.012656065635383129, + -0.01667281985282898, + -0.008152034133672714, + -0.0052876281552016735, + -0.023389358073472977, + 0.01463151816278696, + 0.011635415256023407, + -0.01642259582877159, + -0.009008063934743404, + -0.02236212231218815, + -0.013018231838941574, + 0.03434653580188751, + -0.04775327071547508, + 0.02087394893169403, + -0.009008063934743404, + 0.023679090663790703, + 0.023165473714470863, + 0.018108315765857697, + -0.009653378278017044, + -0.006960177794098854, + 0.0027656336314976215, + 0.022019710391759872, + -0.009429492987692356, + -0.010766216553747654, + 0.055944815278053284, + 0.03806038573384285, + -0.02169046923518181, + 0.0003759532992262393, + -0.0013112066080793738, + 0.028209462761878967, + 0.019148720428347588, + 0.029394732788205147, + -0.019715016707777977, + -0.014460312202572823, + 0.014842233620584011, + -0.0077042649500072, + 0.003136030863970518, + 0.01812148466706276, + -0.00825739186257124, + 0.017897600308060646, + 0.02403467334806919, + -0.005304090213030577, + -0.013999373652040958, + 0.017581528052687645, + 0.0047509633004665375, + 0.008073016069829464, + -0.009014648385345936, + 0.03753359988331795, + -0.027788031846284866, + -0.029631787911057472, + -0.008869782090187073, + -0.03484698385000229, + -0.009495342150330544, + -0.017173267900943756, + -0.045224692672491074, + 0.0379023477435112, + 0.02412685938179493, + -0.0025713806971907616, + 0.021005645394325256, + -0.018503405153751373, + -0.006347787566483021, + 0.009106836281716824, + 0.0152768325060606, + 0.0011671632528305054, + -0.0019803910981863737, + 0.00393444299697876, + 0.000322039908496663, + 0.005557606462389231, + -0.036585379391908646, + -0.014289106242358685, + -0.008566878736019135, + -0.007645001169294119, + 0.010812310501933098, + -0.02158511057496071, + -0.01931992545723915, + -0.006874574813991785, + -0.011984411627054214, + 0.015606074593961239, + -0.0016560876974835992, + 0.0010889682453125715, + ], + "index": 28, + }, + { + "title": "Floro Dery", + "text": "Floro Dery is a Filipino illustrator best known for his works in the 1980s The Transformers TV series and was the visual creator of The Transformers: The Movie. He interpreted some of the toys' box art and created the models that would become the visual guidelines both for the comics book and the animated cartoon appearances of those characters.", + "vector": [ + -0.0020521909464150667, + 0.015754757449030876, + -0.024402707815170288, + -0.036891527473926544, + 0.026351090520620346, + 0.019276222214102745, + 0.014796536415815353, + -0.03168519213795662, + -0.05292576551437378, + 0.10061325877904892, + -0.012967931106686592, + 0.03944678604602814, + -0.023188959807157516, + -0.020761465653777122, + -0.005006707273423672, + 0.003830889705568552, + -0.019435925409197807, + 0.010149162262678146, + -0.05334099754691124, + -0.02561645396053791, + 0.048262421041727066, + -0.03564583882689476, + 0.007881371304392815, + 0.020330265164375305, + 0.034144625067710876, + 0.023412544280290604, + 0.023700011894106865, + -0.03759422153234482, + -0.04973169416189194, + -0.0076098754070699215, + 0.03210042044520378, + 0.0030024272855371237, + 0.026910053566098213, + 0.022055065259337425, + -0.0056734695099294186, + 0.017599334940314293, + 0.007769579067826271, + 0.03580554202198982, + 0.01436533685773611, + 0.006811357568949461, + 0.017551423981785774, + -0.017599334940314293, + 0.0275169275701046, + 0.0035254566464573145, + 0.000530016259290278, + 0.02414718084037304, + -0.033346109092235565, + 0.03016800619661808, + -0.019499806687235832, + 0.039255138486623764, + -0.0027488977648317814, + -0.02338060364127159, + -0.012113516218960285, + 0.026191387325525284, + -0.013718537986278534, + -0.020122651010751724, + 0.08266257494688034, + 0.0673949122428894, + 0.01141880638897419, + -0.03202056884765625, + 0.028938287869095802, + -0.0630190297961235, + 0.03989395499229431, + -0.024402707815170288, + 0.061326175928115845, + 0.03016800619661808, + -0.010963650420308113, + 0.02599974349141121, + 0.002724942285567522, + 0.024674203246831894, + 0.04212980344891548, + -0.06452024728059769, + -0.052095308899879456, + 0.015395425260066986, + 0.030663087964057922, + 0.029018141329288483, + 0.016657084226608276, + -0.05084962025284767, + -0.005162418354302645, + -0.05043439194560051, + -0.021384309977293015, + 0.011314998380839825, + -0.023188959807157516, + 0.07193049043416977, + -0.021687746047973633, + -0.01807844452559948, + -0.02093713916838169, + -0.05557684600353241, + 0.019691450521349907, + -0.007637823931872845, + -0.01807844452559948, + -0.03144563362002373, + -0.011834035627543926, + -0.03775392472743988, + 0.007821482606232166, + 0.005086558870971203, + 0.037147052586078644, + 0.01177813857793808, + -0.004180241376161575, + -0.008967355825006962, + 0.009781843982636929, + -0.00861600786447525, + -0.011035517789423466, + -0.001972339116036892, + 0.010540436021983624, + 0.011235146783292294, + -0.02473808452486992, + 0.018254119902849197, + 0.0326593816280365, + 0.045483577996492386, + 0.008855563588440418, + -0.04161875322461128, + -0.02140028029680252, + 0.039925895631313324, + 0.004176248796284199, + 0.026175417006015778, + -0.06253992021083832, + -0.034112684428691864, + 0.008320556953549385, + -0.058547332882881165, + 0.004463715013116598, + -0.09218090772628784, + -0.024051358923316002, + 0.008560111746191978, + 0.017583364620804787, + -0.057365525513887405, + 0.008839593268930912, + -0.00042745660175569355, + 0.04267279803752899, + -0.0005499792168848217, + -0.04909288138151169, + -0.00616056565195322, + 0.06733103096485138, + 0.0020072744227945805, + 0.04382266104221344, + 0.0126644941046834, + -0.0380733348429203, + -0.006128625012934208, + -0.010947680100798607, + 0.05608789622783661, + 0.042864441871643066, + 0.008176823146641254, + 0.021464161574840546, + -0.003952663391828537, + -0.05171201750636101, + -0.026989905163645744, + -0.026303179562091827, + 0.07729653269052505, + 0.04928452521562576, + -0.0218634195625782, + -0.044685062021017075, + -0.01913248933851719, + 0.031158167868852615, + -0.014716684818267822, + 0.06474383175373077, + -0.012361057102680206, + -0.072505421936512, + -0.056726712733507156, + -0.012696434743702412, + 0.01656126044690609, + -0.009047207422554493, + 0.042161744087934494, + -0.03612494841217995, + -0.0038907784037292004, + -0.0483582429587841, + -0.04193815961480141, + 0.05726970359683037, + 0.030599206686019897, + -0.019020697101950645, + 0.037945572286844254, + 0.03130190074443817, + 0.06081512197852135, + 0.0545228011906147, + 0.02772454172372818, + -0.03998977690935135, + 0.02435479685664177, + -0.06579787284135818, + 0.0010710121132433414, + -0.03539031371474266, + -0.020889228209853172, + -0.02173565700650215, + 0.03388909995555878, + 0.012935989536345005, + -0.028363356366753578, + -0.0008309576660394669, + 0.037434518337249756, + 0.056439246982336044, + 0.05289382487535477, + 0.010636258870363235, + -0.01748754270374775, + -0.0018815078074112535, + 0.014229589141905308, + -0.027820363640785217, + -0.022023124620318413, + 0.03131787106394768, + -0.03408074378967285, + -0.07327200472354889, + -0.014572951942682266, + -0.06084706261754036, + -0.04142710939049721, + 0.031621307134628296, + 0.050083041191101074, + 0.0666283369064331, + -0.0010410677641630173, + -0.009342659264802933, + -0.037434518337249756, + -0.023188959807157516, + 0.027660660445690155, + -0.0036771749146282673, + -0.030231887474656105, + 0.0352306105196476, + 0.006252394989132881, + 0.008759741671383381, + 0.009087134152650833, + 0.0037450490053743124, + -0.005401973612606525, + -0.015874536707997322, + -0.017040371894836426, + 0.029976362362504005, + -0.015754757449030876, + 0.017072312533855438, + 0.03733869642019272, + -0.01573878712952137, + 0.0018116375431418419, + 0.027708571404218674, + -0.018813081085681915, + -0.04516417160630226, + -0.011171265505254269, + -0.011307013221085072, + 0.012592627666890621, + -0.024003447964787483, + 0.004443752113729715, + 0.029848599806427956, + -0.02077743597328663, + -0.05110514536499977, + -0.0021919317077845335, + 0.031126227229833603, + -0.027373192831873894, + -0.029864570125937462, + 0.01782291941344738, + -0.01895681582391262, + -0.004463715013116598, + -0.020154591649770737, + -0.012249264866113663, + 0.08911459892988205, + 0.007953238673508167, + -0.026319149881601334, + -0.06110259145498276, + -0.032084450125694275, + 0.003010412445291877, + 0.007050913292914629, + 0.02397150732576847, + 0.07550784945487976, + 0.041267406195402145, + -0.01527564786374569, + 0.029050081968307495, + 0.003226012224331498, + 0.04848600551486015, + -0.00021971718524582684, + 0.03896767273545265, + -0.05953749641776085, + 0.004200204275548458, + 0.017727097496390343, + -0.026191387325525284, + -0.013175545260310173, + 0.027916185557842255, + 0.00273891631513834, + 0.01550721749663353, + 0.031078316271305084, + -0.013638685457408428, + 0.010676184669137001, + -0.03951066732406616, + 0.009941548109054565, + -0.010117221623659134, + 0.01284815277904272, + 0.041395168751478195, + -0.026015713810920715, + 0.07001405209302902, + 0.06471189111471176, + 0.04315190762281418, + 0.030327709391713142, + -0.04264085739850998, + -0.013622715137898922, + 0.01523572113364935, + -0.01975533366203308, + 0.0339529812335968, + 0.019052637740969658, + -0.01651334948837757, + -0.001149865798652172, + -0.02805991843342781, + -0.028874406591057777, + -0.006356202531605959, + -0.005917017813771963, + -0.029896510764956474, + 0.034144625067710876, + 0.0061685508117079735, + 0.03989395499229431, + -0.016625143587589264, + 0.008033090271055698, + 0.006919157691299915, + -0.0018535596318542957, + -0.03210042044520378, + -0.0044158040545880795, + -0.04382266104221344, + 0.016297750174999237, + -0.005382010713219643, + -0.012169413268566132, + 0.03922319784760475, + 0.009749903343617916, + -0.03050338290631771, + -0.048677653074264526, + -0.012273220345377922, + -0.022534174844622612, + -0.04133128747344017, + -0.01874919980764389, + -0.02764469012618065, + 0.012840167619287968, + -0.006499935872852802, + -0.03356969356536865, + -0.0014173692325130105, + 0.027453046292066574, + 0.0137584637850523, + -0.05164813622832298, + 0.006128625012934208, + 0.03016800619661808, + 0.039670370519161224, + 0.07499679923057556, + -0.009781843982636929, + 0.03539031371474266, + 0.0009776853257790208, + -0.027836333960294724, + -0.0020442057866603136, + 0.043119966983795166, + 0.004779129754751921, + -0.020250413566827774, + 0.004443752113729715, + -0.043375492095947266, + 0.024578381329774857, + -0.02708572708070278, + -0.05496997386217117, + 0.0043519227765500546, + 0.03289893642067909, + -0.03224415332078934, + -0.0008614012040197849, + -0.03130190074443817, + -0.08010731637477875, + 0.021480131894350052, + 0.022486263886094093, + -0.00891145970672369, + -0.022310590371489525, + 0.0007810503011569381, + -0.043503254652023315, + -0.03251564875245094, + -0.028842465952038765, + -0.007661779411137104, + -0.0058211954310536385, + 0.009542289189994335, + -0.015171839855611324, + 0.0012347083538770676, + 0.02603168413043022, + 0.007354349829256535, + 0.023013286292552948, + 0.03733869642019272, + 0.012904048897325993, + 0.04149099066853523, + 0.002155998256057501, + -0.01628177985548973, + -0.025856008753180504, + -0.01921234093606472, + 0.06611727923154831, + -0.0006228439742699265, + 0.005609588231891394, + -0.06343426555395126, + -0.012760316021740437, + 0.027884244918823242, + -0.009598185308277607, + 0.030199946835637093, + 0.015467291697859764, + -0.0627635046839714, + 0.013502937741577625, + -0.022693878039717674, + 0.004395841155201197, + -0.009694007225334644, + -0.006268365308642387, + -0.0045435670763254166, + 0.0034655677154660225, + -0.04289638251066208, + -0.04302414506673813, + -0.016401557251811028, + -0.01284815277904272, + 0.012033664621412754, + -0.01306375302374363, + 0.033186402171850204, + -0.006755461450666189, + -0.002106091007590294, + 0.05199948698282242, + 0.0390954352915287, + 0.03555001690983772, + 0.031030405312776566, + -0.017806949093937874, + -0.0302159171551466, + 0.0013874248834326863, + -0.00931071862578392, + -0.02898620069026947, + 0.021591924130916595, + -0.01612207666039467, + -0.0017417671624571085, + 0.009622140787541866, + 0.017535453662276268, + 0.0486137680709362, + -0.02684617228806019, + 0.05608789622783661, + 0.05011498183012009, + 0.0052542476914823055, + 0.012856137938797474, + -0.05212724953889847, + 0.01694454997777939, + -0.0006373170763254166, + -0.009198926389217377, + -0.003727082395926118, + 0.06880030035972595, + 0.07084450870752335, + -0.013111663982272148, + 0.037690043449401855, + 0.04097994044423103, + 0.045483577996492386, + 0.023652100935578346, + 0.009302733466029167, + 0.0056654843501746655, + -0.0023536314256489277, + -0.024322854354977608, + 0.027708571404218674, + -0.007737638428807259, + -0.02183147892355919, + -0.0018515633419156075, + -0.005952951032668352, + -0.013055767863988876, + 0.010141177102923393, + -0.003263941965997219, + 0.0799795538187027, + 0.003645234275609255, + -0.005701418034732342, + -0.027532897889614105, + -0.014421232976019382, + -0.051552314311265945, + -0.001959363231435418, + 0.010229013860225677, + -0.06381755322217941, + -0.03641241788864136, + 0.026766320690512657, + 0.006076721008867025, + -0.024961668998003006, + -0.011562539264559746, + -0.05043439194560051, + 0.02528107725083828, + -0.0028606904670596123, + 0.010772006586194038, + 0.0029884532559663057, + -0.02245432324707508, + 0.010835887864232063, + -0.01428548526018858, + 0.08112941682338715, + 0.00301839760504663, + -0.02347642555832863, + 0.026957964524626732, + -0.019531747326254845, + 0.005382010713219643, + -0.022310590371489525, + -0.03205250948667526, + -0.016209913417696953, + -0.007250542752444744, + 0.03864826634526253, + 0.030519355088472366, + -0.0003520964819472283, + 0.05152037367224693, + 0.01656126044690609, + 0.04260891675949097, + -0.01354286354035139, + 0.017040371894836426, + -0.018637407571077347, + 0.07550784945487976, + -0.02767663076519966, + 0.011482687667012215, + -0.00918295606970787, + 0.010939694941043854, + 0.0136945815756917, + 0.014572951942682266, + 0.01921234093606472, + 0.0023656091652810574, + 0.07774370163679123, + 0.03749839961528778, + -0.013151589781045914, + -0.017966652289032936, + 0.015219750814139843, + -0.03602912649512291, + -0.043119966983795166, + -0.07026957720518112, + -0.0021480130963027477, + -0.0007356345886364579, + -0.03631659597158432, + -0.022725818678736687, + 0.03264341130852699, + 0.029273666441440582, + 0.029688894748687744, + -0.01609812118113041, + -0.002601172076538205, + -0.011003576219081879, + 0.05778075382113457, + 0.02895425818860531, + 0.01236904226243496, + 0.02936948835849762, + 0.037147052586078644, + 0.039255138486623764, + 0.01333524938672781, + 0.003910741303116083, + -0.00451961113139987, + 0.023061197251081467, + 0.007426216267049313, + -0.016058195382356644, + -0.006923150271177292, + 0.03526255115866661, + -0.011722242459654808, + 0.027245430275797844, + 0.017327837646007538, + -0.007613867986947298, + 0.013431071303784847, + 0.0017367764376103878, + 0.03205250948667526, + -0.005677462089806795, + 0.028714703395962715, + 0.022518204525113106, + 0.006887217052280903, + 0.007214609067887068, + 0.0176153052598238, + 0.002571227727457881, + -0.007370320148766041, + 0.009598185308277607, + 0.0060966843739151955, + -0.019739363342523575, + -0.03325028717517853, + -0.019643539562821388, + -0.018860992044210434, + -0.020969079807400703, + -0.05206336826086044, + -0.006280343513935804, + -0.008719815872609615, + 0.049891397356987, + -0.029018141329288483, + 0.0009068169165402651, + -0.021815508604049683, + 0.005988884251564741, + 0.029609043151140213, + -0.017599334940314293, + 0.056567009538412094, + 0.0068153501488268375, + 0.0028606904670596123, + -0.07154720276594162, + 0.030311739072203636, + -0.004627411253750324, + -0.024450618773698807, + 0.023013286292552948, + 0.008560111746191978, + 0.0018226171378046274, + 0.04369489848613739, + 0.01882905140519142, + -0.021416250616312027, + -0.027532897889614105, + -0.01913248933851719, + -0.03855244442820549, + -0.020250413566827774, + 0.011985753662884235, + -0.019787274301052094, + -0.018429793417453766, + 0.03516672924160957, + -0.025600483641028404, + 0.042576976120471954, + 0.026047654449939728, + -0.0003603312070481479, + -0.032803114503622055, + -0.01803053356707096, + 0.010340807028114796, + -0.015251691453158855, + 0.004647374153137207, + 0.03877602890133858, + 0.01561102457344532, + -0.000684729078784585, + -0.025808097794651985, + 0.021927300840616226, + 0.01833397150039673, + 0.008520185947418213, + -0.021815508604049683, + 0.0032539605163037777, + 0.03551807627081871, + 0.004994729533791542, + 0.0067794169299304485, + -0.0020382169168442488, + 0.0065877726301550865, + 0.011586494743824005, + 0.01184202078729868, + -0.026047654449939728, + 0.013710551895201206, + 0.024003447964787483, + 0.010077295824885368, + -0.020202502608299255, + 0.0008698854362592101, + -0.030199946835637093, + 0.015619009733200073, + -0.031062345951795578, + 0.03740257769823074, + -0.008831608109176159, + 0.011179250665009022, + -0.020202502608299255, + 0.01638558693230152, + 0.04979557543992996, + 0.01367062609642744, + 0.007789541967213154, + -0.032675351947546005, + 0.012313146144151688, + -0.0359971858561039, + -0.042289506644010544, + -0.010396703146398067, + -0.018126355484128, + 0.020761465653777122, + 0.03791363164782524, + -0.03289893642067909, + -0.011203206144273281, + 0.020889228209853172, + -0.02401941828429699, + -0.033729396760463715, + -0.0029345531947910786, + 0.0028766607865691185, + 0.010883798822760582, + -0.018845021724700928, + -0.0486137680709362, + 0.022358501330018044, + -0.028411267325282097, + 0.006871246732771397, + 0.005725373513996601, + 0.026399001479148865, + -0.02203909493982792, + -0.010524465702474117, + -0.024035388603806496, + 0.010636258870363235, + -0.02144819125533104, + 0.007917304523289204, + -0.0099016223102808, + -0.0035074898041784763, + -0.0318928062915802, + 0.01175418309867382, + 0.012201353907585144, + -0.018525615334510803, + 0.007014979608356953, + -0.03753034025430679, + 0.008759741671383381, + 0.015427365899085999, + -0.031126227229833603, + 0.01615401729941368, + 0.005070588551461697, + -0.014820491895079613, + 0.01327136717736721, + -0.001716813538223505, + 0.02708572708070278, + -0.008655933663249016, + 0.0013664637226611376, + 0.007593905087560415, + 0.012337101623415947, + 0.023460455238819122, + 0.01681678742170334, + -0.004966781474649906, + 0.0011578509584069252, + 0.019499806687235832, + 0.056854475289583206, + -0.048677653074264526, + -0.008344512432813644, + 0.019978918135166168, + -0.0035015009343624115, + 0.018573526293039322, + 0.025057490915060043, + -0.02831544540822506, + 0.019867125898599625, + -0.02540883980691433, + 0.0063322470523417, + -0.007649801671504974, + 0.03125398978590965, + 0.019403984770178795, + 0.005401973612606525, + 0.012297175824642181, + -0.030870702117681503, + 0.012696434743702412, + 0.0434713140130043, + 0.0017397708725184202, + -0.03826497867703438, + -0.04724032059311867, + 0.006791394669562578, + -0.0005025672144256532, + 0.0004464214143808931, + -0.008456304669380188, + -0.03970231115818024, + 0.012456879019737244, + 0.005641528870910406, + -0.006891209632158279, + 0.009166985750198364, + -0.04407818987965584, + 0.012959945946931839, + -0.009765873663127422, + 0.03243579715490341, + -0.003497508354485035, + -0.008735786192119122, + -0.002251820405945182, + -0.02358821965754032, + 0.012233294546604156, + 0.0059409732930362225, + 0.01828606054186821, + -0.017631275579333305, + 0.016673054546117783, + -0.01684872806072235, + 0.004339944571256638, + 0.00044667095062322915, + -0.033729396760463715, + -0.0074182311072945595, + 0.026494823396205902, + 0.04452535882592201, + 0.007629838772118092, + -0.005278203170746565, + 0.0016918597975745797, + 0.0059130252338945866, + 0.00036706868559122086, + -0.037945572286844254, + 0.00377100077457726, + 0.001421361812390387, + 0.015052062459290028, + 0.0016100116772577167, + -0.01841382309794426, + -0.0019603613764047623, + 0.034272387623786926, + 0.010340807028114796, + -0.007478120271116495, + 0.005661491770297289, + -0.005186373833566904, + 0.0067434837110340595, + 0.0030742939561605453, + 0.020074740052223206, + -0.02371598221361637, + 0.020378176122903824, + -0.013510922901332378, + -0.013239426538348198, + -0.03034367971122265, + 0.021847449243068695, + 0.031541455537080765, + -0.02199118211865425, + 0.08477065712213516, + -0.01112335454672575, + 0.020202502608299255, + 0.026957964524626732, + -0.023141048848628998, + 0.0007725660689175129, + 0.01862143725156784, + -0.01926025189459324, + 0.02312507852911949, + 0.00466733705252409, + -0.024849876761436462, + -0.0030962531454861164, + -0.01777500845491886, + 0.05771687254309654, + 0.04845406487584114, + 0.010316851548850536, + 0.00819279346615076, + -0.04056470841169357, + 0.0011728231329470873, + 0.05861121416091919, + 0.0050266701728105545, + -0.00618452113121748, + -0.018254119902849197, + -0.04014948010444641, + 0.00103008805308491, + 0.003283904865384102, + -0.010907754302024841, + -0.02397150732576847, + -0.0026391015853732824, + -0.013367190025746822, + -0.04740002378821373, + 0.016233868896961212, + -0.034911204129457474, + -0.021975211799144745, + -0.025776157155632973, + 0.033729396760463715, + 0.022358501330018044, + 0.01684872806072235, + 0.010548421181738377, + 0.04292832314968109, + 0.017679186537861824, + 0.034783441573381424, + -0.02435479685664177, + -0.009965503588318825, + 0.01756739430129528, + -0.02384374476969242, + -0.016042225062847137, + 0.034911204129457474, + -0.021208634600043297, + -0.02569630555808544, + -0.027437075972557068, + -0.0023157019168138504, + 0.01731186732649803, + -0.0077296532690525055, + 0.010963650420308113, + 0.025776157155632973, + 0.0041123670525848866, + -0.03186086565256119, + -0.004371885675936937, + -0.024322854354977608, + 0.0295771025121212, + 0.00743819447234273, + 0.027660660445690155, + -0.03542225435376167, + 0.012416953220963478, + -0.007462149951606989, + -0.013982048258185387, + -0.023204930126667023, + -0.04040500521659851, + -0.02651079371571541, + -0.020330265164375305, + 0.007258527912199497, + -0.018781140446662903, + 0.006635683588683605, + -0.014253544621169567, + 0.009382585063576698, + 0.011698286980390549, + -0.016233868896961212, + 0.0293215773999691, + -0.01095566526055336, + -0.03312252089381218, + -0.010213043540716171, + 0.010077295824885368, + -0.01080394722521305, + 0.01592244766652584, + 0.015251691453158855, + -0.008344512432813644, + -0.014932285062968731, + 0.0024774018675088882, + -0.0018146319780498743, + -0.0037510378751903772, + 0.014796536415815353, + -0.014469143934547901, + -0.022310590371489525, + -0.012377027422189713, + -0.007721668109297752, + -0.0169764906167984, + -0.0046793147921562195, + -0.0016469431575387716, + -0.033857159316539764, + 0.017663216218352318, + 0.0003735566569957882, + -0.019483836367726326, + 0.018318001180887222, + -0.016114091500639915, + -0.013718537986278534, + -0.0008169836364686489, + 0.03753034025430679, + 0.0068153501488268375, + 0.006563817150890827, + -0.027836333960294724, + 0.012712405063211918, + 0.020537881180644035, + -0.03144563362002373, + 0.02641497179865837, + -0.025392869487404823, + 0.011873961426317692, + 0.024754054844379425, + -0.001185799133963883, + -0.047847192734479904, + -0.00683531304821372, + -0.010692154988646507, + 0.008735786192119122, + 0.011434776708483696, + -0.02536092884838581, + -0.0015111950924620032, + -0.0126644941046834, + -0.01175418309867382, + 0.013798389583826065, + 0.0028147755656391382, + 0.021352369338274002, + 0.0011848009889945388, + -0.012385012581944466, + -0.0011598472483456135, + 0.010572376661002636, + -0.016784846782684326, + -0.005605595652014017, + 0.010093266144394875, + -0.008464289829134941, + -0.019372044131159782, + -0.05778075382113457, + 0.02528107725083828, + -0.02312507852911949, + -0.06860865652561188, + 0.015020121820271015, + -0.014429218135774136, + -0.010165132582187653, + -0.015595054253935814, + -0.02507346123456955, + -0.017168134450912476, + 0.010748051106929779, + -0.018349941819906235, + 0.038616325706243515, + -0.005928995553404093, + 0.040181420743465424, + 0.04899705946445465, + 0.013814359903335571, + 0.007038935087621212, + 0.024450618773698807, + -0.022518204525113106, + 0.006388143170624971, + -0.02072952501475811, + 0.04343937337398529, + 0.038488563150167465, + -0.01537945494055748, + -0.0031481569167226553, + 0.018557555973529816, + -0.003269930835813284, + 0.028842465952038765, + -0.0035015009343624115, + -0.03513478860259056, + -0.0203142948448658, + 0.0025452757254242897, + -0.002443464705720544, + -0.01988309621810913, + -0.029848599806427956, + -0.01287210825830698, + -0.031749073415994644, + -0.025392869487404823, + 0.03906349465250969, + -0.01900472678244114, + -0.0013095693429931998, + -0.053788166493177414, + -0.024450618773698807, + 0.027948126196861267, + 0.034112684428691864, + -0.041011881083250046, + 0.035965245217084885, + 0.017503513023257256, + -0.023955537006258965, + 0.03179698437452316, + 0.018845021724700928, + -0.008172830566763878, + -0.008272645063698292, + -0.03356969356536865, + -0.03590136393904686, + -0.02178356796503067, + 0.01141880638897419, + 0.017184104770421982, + -0.007210616488009691, + 0.03008815459907055, + -0.034112684428691864, + -0.03871214762330055, + 0.017535453662276268, + -0.01638558693230152, + 0.02451450005173683, + -0.00136945815756917, + -0.02607959508895874, + 0.03257953003048897, + 0.016864698380231857, + -0.0015151876723393798, + 0.025392869487404823, + -0.0342085063457489, + -0.019451895728707314, + -0.023604189977049828, + -0.05532132089138031, + -0.02072952501475811, + 0.012656508944928646, + -0.0077655864879488945, + -0.015674905851483345, + -0.004787114914506674, + 0.008735786192119122, + 0.009861696511507034, + -0.006503928452730179, + 0.007709690369665623, + 0.06483965367078781, + 0.007621853146702051, + 0.0047990926541388035, + -0.018557555973529816, + 0.009262807667255402, + -0.054714445024728775, + 0.015443336218595505, + -0.029209785163402557, + 0.05861121416091919, + 0.019946977496147156, + 0.027564838528633118, + -0.021623864769935608, + -0.011291042901575565, + -0.020026829093694687, + 0.007286475971341133, + -0.042033981531858444, + 0.017295897006988525, + -0.009973488748073578, + -0.03356969356536865, + 0.02839529700577259, + -0.0030084161553531885, + -0.0352306105196476, + -0.0031261974945664406, + 0.03160533681511879, + -0.011442761868238449, + 0.0026311164256185293, + -0.01866934821009636, + -0.039287079125642776, + 0.014077870175242424, + -0.0028367347549647093, + 0.04315190762281418, + 0.042289506644010544, + -0.005765299312770367, + 0.009063177742064, + 0.01327136717736721, + 0.0021400279365479946, + -0.010628273710608482, + -0.025249136611819267, + -0.016752906143665314, + -0.010101251304149628, + -0.006268365308642387, + 0.029768748208880424, + 0.0196754802018404, + -0.00878369715064764, + 0.05944167077541351, + -0.003313849214464426, + -0.0031102271750569344, + -0.02679826132953167, + 0.03016800619661808, + 0.005537721794098616, + 0.027245430275797844, + 0.02409926988184452, + 0.020378176122903824, + -0.005621565971523523, + -0.0028307458851486444, + 0.015419380739331245, + 0.006064743269234896, + -0.015778712928295135, + 0.010540436021983624, + -0.004511625971645117, + -0.007581927347928286, + -0.0008089984767138958, + -0.016209913417696953, + 0.006627698428928852, + 0.004032515455037355, + 0.015746772289276123, + 0.02726140059530735, + -0.005058610811829567, + 0.025297047570347786, + -0.025057490915060043, + -0.03366551548242569, + -0.03353775292634964, + 0.002092116978019476, + 0.01882905140519142, + 0.006667624693363905, + 0.007490098010748625, + 0.0010126205161213875, + 0.011802094988524914, + -0.03131787106394768, + -0.008009134791791439, + 0.012480834499001503, + 0.006503928452730179, + -0.003962645307183266, + -0.005086558870971203, + 0.0031641272362321615, + 0.029513221234083176, + -0.018270090222358704, + -0.01854158565402031, + 0.02823559381067753, + 0.009869681671261787, + -0.01215344201773405, + -0.0024274943862110376, + 0.013031812384724617, + -0.0071627055294811726, + -0.025600483641028404, + -0.0067434837110340595, + -0.026367060840129852, + -0.0017946689622476697, + -0.03328222781419754, + -0.0040405006147921085, + 0.026271238923072815, + 0.006619713269174099, + -0.030934583395719528, + -0.05279800295829773, + 0.042033981531858444, + 0.02136833965778351, + 0.009981473907828331, + 0.0069351280108094215, + -0.005781269632279873, + 0.0004207191232126206, + 0.03516672924160957, + 0.022645967081189156, + 0.001318552647717297, + -0.011738212779164314, + -0.03235594555735588, + -0.004212182015180588, + -0.00022533176525030285, + -0.016465438529849052, + -0.014964225701987743, + 0.0253289882093668, + 0.00743819447234273, + 0.013470997102558613, + 0.032419826835393906, + 0.015986328944563866, + -0.017854860052466393, + -0.009741918183863163, + -0.024386737495660782, + -0.004850996192544699, + -0.03555001690983772, + 0.02317298948764801, + -0.0033158455044031143, + 0.01518781017512083, + 0.009342659264802933, + 0.014509070664644241, + 0.008184808306396008, + -0.014612877741456032, + -0.02481793612241745, + -0.03350581228733063, + 0.0019114522729068995, + -0.0048350258730351925, + -0.008879519067704678, + -0.02389165572822094, + -0.0268781129270792, + 0.004942825995385647, + 0.004375878255814314, + 0.036891527473926544, + -0.01756739430129528, + 0.015155869536101818, + 0.003778985934332013, + -0.04420595243573189, + 0.02001085877418518, + -0.0034935157746076584, + 0.04580298811197281, + -0.003986600786447525, + -0.00901526678353548, + -0.0010720102582126856, + -0.008847578428685665, + 0.0025093425065279007, + 0.011267087422311306, + 0.02355627715587616, + -0.014013988897204399, + 0.02085728757083416, + 0.006164558231830597, + 0.005154433194547892, + 0.0004132330068387091, + 0.003367749275639653, + -0.02582406811416149, + -0.0033178417943418026, + 0.01985115557909012, + -0.021559983491897583, + 0.048901237547397614, + -0.019244281575083733, + -0.019052637740969658, + -0.017407691106200218, + 0.012113516218960285, + 0.007577934768050909, + -0.018813081085681915, + 0.021639835089445114, + 0.011698286980390549, + -0.012560687027871609, + -0.015810653567314148, + 0.022007152438163757, + 0.0006987031665630639, + 0.008879519067704678, + 0.0191644299775362, + 0.009662066586315632, + 0.0029505237471312284, + -0.02409926988184452, + -0.00356538244523108, + 0.008655933663249016, + -0.01550721749663353, + 0.0006303300615400076, + -0.02018653228878975, + 0.011514628306031227, + -0.018637407571077347, + 0.004719240590929985, + -0.013606744818389416, + 0.019739363342523575, + -0.02312507852911949, + -0.02633512020111084, + -0.012329116463661194, + 0.04676120728254318, + -0.012959945946931839, + 0.0028008015360683203, + -0.019244281575083733, + 0.03198862820863724, + 0.00740625336766243, + 0.016992460936307907, + -0.03606106713414192, + 0.00356538244523108, + -0.008156860247254372, + -0.04490864649415016, + 0.014820491895079613, + -0.005553692113608122, + 0.014381307177245617, + -0.005829180590808392, + 0.01731186732649803, + 0.027612749487161636, + -0.0101571474224329, + -0.01632969081401825, + 0.003475549165159464, + 0.0031341826543211937, + -0.02136833965778351, + -0.0109317097812891, + 0.020697584375739098, + -0.03896767273545265, + -0.006827327888458967, + 0.005230292212218046, + -0.003146160626783967, + 0.012065605260431767, + 0.024386737495660782, + 0.01097962073981762, + -0.014596907421946526, + -0.021001020446419716, + 0.006408106070011854, + -0.025041520595550537, + -0.008903474546968937, + -0.007038935087621212, + 0.01651334948837757, + -0.02052191086113453, + 0.010516480542719364, + 0.010189088061451912, + -0.00824070442467928, + -0.004008559975773096, + 0.0003802941646426916, + -0.026941994205117226, + -0.026686469092965126, + 0.029257696121931076, + -0.0026530756149441004, + -0.0021919317077845335, + -0.0031122234649956226, + -0.025584513321518898, + -0.021512072533369064, + 0.0014942266279831529, + 0.03762616217136383, + -0.020889228209853172, + -0.037274815142154694, + 0.014293470419943333, + 0.027580808848142624, + 0.012672479264438152, + -0.04660150408744812, + 0.020713554695248604, + 0.015459306538105011, + -0.02700587548315525, + 0.013646670617163181, + -0.03309058025479317, + -0.03181295469403267, + -0.007478120271116495, + -0.04123546555638313, + 0.004284048452973366, + 0.005825188010931015, + 0.03906349465250969, + -0.005972913932055235, + 0.011179250665009022, + -0.0336974561214447, + -0.02039414644241333, + 0.015563113614916801, + -0.005813210271298885, + 0.039670370519161224, + 0.036380477249622345, + 0.015595054253935814, + -0.0027269385755062103, + 0.00011428787547629327, + 0.003249967936426401, + 0.035581957548856735, + -0.012712405063211918, + -0.00013412605039775372, + 0.0021220613270998, + -0.03868020698428154, + 0.023332692682743073, + 0.0271336380392313, + -0.030008303001523018, + -0.00245943502523005, + -0.000846928043756634, + 0.03535837307572365, + -0.01946786604821682, + -0.0049068923108279705, + -0.02347642555832863, + 0.0196754802018404, + -0.008839593268930912, + 0.0147885512560606, + 0.003078286536037922, + -0.01643349789083004, + 0.030327709391713142, + 0.009885651990771294, + 0.018046503886580467, + -0.0244346484541893, + -0.0068632615730166435, + 0.037147052586078644, + -3.290767199359834e-05, + -0.013247411698102951, + -0.01070014014840126, + -0.04200204089283943, + -0.020745495334267616, + 0.03896767273545265, + -0.01828606054186821, + 0.014884374104440212, + 0.00035783584462478757, + 0.015068032778799534, + -0.012560687027871609, + 0.019403984770178795, + -0.016992460936307907, + 0.002217883476987481, + 0.011235146783292294, + 0.0018505651969462633, + 0.0061685508117079735, + -0.01244889385998249, + -0.0005100533016957343, + -0.015730801969766617, + 0.006268365308642387, + 0.018477704375982285, + -0.015850581228733063, + -0.016960520297288895, + 0.005585632752627134, + 0.04053276777267456, + 0.01972339302301407, + 0.030439501628279686, + -0.0008374456665478647, + -0.01314360462129116, + 0.004236137494444847, + 0.009821769781410694, + 0.03227609395980835, + -0.030854731798171997, + -0.0393509604036808, + -0.011322983540594578, + 0.004759166855365038, + -0.005928995553404093, + 0.022981345653533936, + 0.007797527126967907, + -0.0403730645775795, + -0.0033158455044031143, + -0.02574421651661396, + -0.022390441969037056, + -0.03194071725010872, + -0.014604892581701279, + 0.004659351892769337, + -0.006639676168560982, + -0.032132361084222794, + 0.00451961113139987, + 0.022278649732470512, + -0.03868020698428154, + 0.018940845504403114, + 0.018733229488134384, + 0.0010999584337696433, + 0.03647629916667938, + -0.005517758894711733, + -0.019020697101950645, + -0.0003131687408313155, + -0.008053053170442581, + -0.031956687569618225, + -0.014141752384603024, + -0.0025073462165892124, + 0.01795068196952343, + 0.011770153418183327, + -0.010684169828891754, + 0.008671903982758522, + -0.004515618551522493, + -0.008871533907949924, + 0.021384309977293015, + -0.023364633321762085, + 0.011171265505254269, + 0.00819279346615076, + 0.015850581228733063, + -0.012488819658756256, + 0.03535837307572365, + -0.010795962065458298, + -0.008041075430810452, + -0.01137887965887785, + -0.01535549946129322, + 0.010205058380961418, + 0.02111281268298626, + 0.028012007474899292, + -0.012089560739696026, + -0.022997315973043442, + -0.017806949093937874, + -0.037690043449401855, + -0.011283057741820812, + -0.009342659264802933, + 0.018110385164618492, + 0.011314998380839825, + -0.029976362362504005, + 0.011171265505254269, + -0.01934010349214077, + -0.0159464031457901, + 0.008927430026233196, + 0.011434776708483696, + 0.005142455454915762, + 0.016401557251811028, + 0.0026331127155572176, + -0.00781749002635479, + -0.01346301194280386, + -0.012161427177488804, + -0.0008604030590504408, + -0.007865400984883308, + 0.01165037602186203, + 0.02026638388633728, + 0.0054099587723612785, + 0.02651079371571541, + -0.03947872668504715, + 0.019563687965273857, + 0.02195924147963524, + 0.020026829093694687, + -0.0347195565700531, + -0.0069351280108094215, + 0.02090519852936268, + -0.0008564104209654033, + -0.007893349044024944, + -0.013399130664765835, + -0.03205250948667526, + 0.02191133052110672, + -0.006639676168560982, + 0.009190941229462624, + 0.014588922262191772, + 0.0070828539319336414, + -0.02127251774072647, + 0.007086846511811018, + 0.024578381329774857, + -0.02103296108543873, + 0.017407691106200218, + -0.0020741501357406378, + -0.01030088122934103, + -0.022997315973043442, + 0.004052478354424238, + 0.041395168751478195, + 0.034368209540843964, + -0.0321483314037323, + -0.005641528870910406, + 0.01735977828502655, + 0.018892932683229446, + -0.008831608109176159, + -0.019707422703504562, + -0.010069310665130615, + -0.06432860344648361, + 0.04883735626935959, + -0.004998722113668919, + -0.007893349044024944, + 0.024003447964787483, + -0.0029804680962115526, + 0.010684169828891754, + 0.01558706909418106, + -0.005194358993321657, + -0.020026829093694687, + 0.008232719264924526, + 0.004032515455037355, + -0.02144819125533104, + 0.03331416845321655, + 0.01428548526018858, + 0.017184104770421982, + 0.026175417006015778, + -0.03016800619661808, + 0.025632424280047417, + 0.010173117741942406, + -0.01196978334337473, + -0.0073822978883981705, + -0.022182827815413475, + 0.030535325407981873, + 0.005960936192423105, + 0.011115369386970997, + -0.006927142851054668, + 0.0003196566831320524, + 0.009869681671261787, + 0.0017427653074264526, + -0.002068161265924573, + -0.0023436499759554863, + 0.009813784621655941, + 0.0031800975557416677, + -0.022725818678736687, + -0.0046074483543634415, + -0.01836591213941574, + -0.013175545260310173, + 0.04516417160630226, + -0.026399001479148865, + -0.015547143295407295, + 0.03299475833773613, + -0.01055640634149313, + 0.029337547719478607, + 0.022741788998246193, + -0.015579083934426308, + 0.01815829798579216, + 0.037562280893325806, + 0.003607304533943534, + 0.024594351649284363, + -0.02620735764503479, + -0.028203653171658516, + -0.011834035627543926, + 0.0067195282317698, + 0.018302030861377716, + 0.0061326175928115845, + 0.002930560614913702, + -0.007234571967273951, + 0.0432157889008522, + -0.020841317251324654, + 0.003381723305210471, + 0.014996166341006756, + -0.0005195357371121645, + 0.009622140787541866, + 0.003593330504372716, + -0.044940587133169174, + 0.023141048848628998, + -0.02363613061606884, + 0.03150951489806175, + 0.01101954746991396, + -0.037019290030002594, + 0.020042799413204193, + 0.013662640936672688, + 0.011003576219081879, + 0.006340232212096453, + 0.01681678742170334, + 0.019611598923802376, + -0.013255396857857704, + 0.010708125308156013, + 0.022773729637265205, + -0.013638685457408428, + -0.006679602432996035, + -0.015459306538105011, + 0.0012646527029573917, + -0.0019633558113127947, + -0.018349941819906235, + -0.021144753322005272, + -0.030774880200624466, + 0.01777500845491886, + -0.029129933565855026, + 0.006176535971462727, + -0.0200587697327137, + 0.02350836619734764, + -0.007861408405005932, + 0.00506659597158432, + -0.0034495973959565163, + 0.02350836619734764, + 0.0014523044228553772, + 0.005334099754691124, + -0.044046249240636826, + -0.004898907151073217, + 0.03868020698428154, + -0.01887696236371994, + -0.020330265164375305, + -0.0380733348429203, + -0.01694454997777939, + -0.004827040713280439, + 0.0007076864712871611, + 0.0023576240055263042, + ], + "index": 29, + }, + { + "title": "MP4 (disambiguation)", + "text": "MP4 is MPEG-4 Part 14, a file format.MP4 may also refer to: M\u00f8ller\u2013Plesset perturbation theory of the fourth order in computational chemistry Mario Party 4, a video game for Nintendo GameCube MP4 (band), a band made up of UK Members of Parliament Mammal Paleogene zone 4, a division of the Paleogene period McLaren MP4/1, the McLaren team's Formula One car MP4: Days Since a Lost Time Accident, the fourth album by Michael Penn", + "vector": [ + -0.02004411444067955, + 0.057410698384046555, + -0.030754586681723595, + 0.03198733180761337, + -0.028945494443178177, + -0.00789677258580923, + -0.07326027750968933, + 0.009349650703370571, + 0.018571224063634872, + 0.036502059549093246, + 0.04831720143556595, + 0.008765297941863537, + 0.043674394488334656, + 0.0197239201515913, + -0.029137609526515007, + -0.030226267874240875, + -0.06864949315786362, + 0.023214029148221016, + 0.0016279838746413589, + 0.03169915825128555, + -0.026271877810359, + -0.023053932934999466, + -0.03458090126514435, + 0.0016089724376797676, + -0.012423508800566196, + 0.009429698809981346, + 0.043482281267642975, + 0.004546748008579016, + -0.02667211927473545, + 0.02596769481897354, + 0.001192720839753747, + -0.003071856452152133, + 0.04101679101586342, + 0.007212358992546797, + -0.012599614448845387, + -0.001095662242732942, + 0.057955026626586914, + -0.008901380002498627, + 0.02745659463107586, + 0.018010884523391724, + 0.00537124602124095, + 0.0030478420667350292, + -0.030130209401249886, + 0.011414898559451103, + 0.014208586886525154, + 0.016345879063010216, + 0.0036021771375089884, + 0.0006163725047372282, + 0.0003141898778267205, + -0.014480751939117908, + 0.006980218458920717, + 0.02713640034198761, + -0.05808310583233833, + 0.011975237168371677, + 0.012495552189648151, + -0.011422903276979923, + 0.03566955775022507, + 0.057058483362197876, + -0.0003084363997913897, + -0.06704851984977722, + -0.009141525253653526, + -0.015073109418153763, + 0.017962856218218803, + -0.00692418497055769, + 0.0026776182930916548, + 0.0019801966845989227, + 0.05395260825753212, + -0.017962856218218803, + 0.005855538882315159, + 0.012263411656022072, + 0.035861674696207047, + 0.03281983733177185, + -0.005535345524549484, + 0.024590862914919853, + -0.014688877388834953, + -0.03621388599276543, + 0.02649601362645626, + 0.04620392620563507, + 0.009685853496193886, + 0.06730467826128006, + 0.008565176278352737, + -0.011478937231004238, + -0.02121281996369362, + 0.03573359549045563, + -0.010806531645357609, + 0.007800714578479528, + 0.0025635494384914637, + -0.08491531759500504, + 0.00788876786828041, + 0.018475165590643883, + 0.022845806553959846, + 0.0383271649479866, + 0.031170839443802834, + 0.06147715449333191, + 0.08690051734447479, + -0.051134902983903885, + 0.024190619587898254, + 0.014929022639989853, + 0.02760068140923977, + -0.029633909463882446, + 0.00693619204685092, + 0.008260992355644703, + 0.043354202061891556, + 0.04149708151817322, + 0.03947985917329788, + -0.010678453370928764, + 0.030978722497820854, + 0.012543581426143646, + 0.012743702158331871, + 0.028497222810983658, + -0.0011216779239475727, + 0.018667282536625862, + -0.015361283905804157, + 0.015057099983096123, + -0.01998007483780384, + 0.04156111925840378, + -0.049726054072380066, + -0.04079265519976616, + -0.05241568014025688, + 0.017354488372802734, + -0.005895562935620546, + -0.03477301448583603, + -0.0022253450006246567, + 0.0038443233352154493, + -0.04133698344230652, + 0.03906361013650894, + 0.0017090329201892018, + 0.018283050507307053, + -0.0023654296528548002, + 0.0016169772716239095, + -0.0416891947388649, + 0.050270382314920425, + 0.024478795006871223, + -0.01630585454404354, + 0.016457946971058846, + 0.057698871940374374, + -0.03454887866973877, + -0.012551586143672466, + 0.03842322155833244, + 0.03230752423405647, + -0.0211647916585207, + 0.006868151016533375, + 0.02588764578104019, + 0.009357655420899391, + -0.016650062054395676, + -0.03477301448583603, + 0.0043866513296961784, + 0.06272590905427933, + 0.011550981551408768, + 0.04703642800450325, + -0.023934464901685715, + -0.06003628298640251, + -0.007028247695416212, + -0.0396079383790493, + 0.02598370425403118, + 0.03422868624329567, + -0.0026916267815977335, + 0.016537996008992195, + -0.04956595599651337, + -0.03781485557556152, + 0.03387647494673729, + -0.015137148089706898, + 0.0128557700663805, + 0.018715310841798782, + 0.05228760093450546, + -0.01348014734685421, + 0.0279528945684433, + -0.029281696304678917, + 0.014040485955774784, + 0.021420946344733238, + 0.009565780870616436, + -0.021917246282100677, + 0.09804325550794601, + -0.031330935657024384, + -0.016858188435435295, + -0.06154119223356247, + -0.0028116994071751833, + 0.07089084386825562, + -0.024847017601132393, + 0.006059662438929081, + -0.0017690692329779267, + -0.018186992034316063, + 0.022445565089583397, + -0.018651273101568222, + -0.018379107117652893, + -0.02082858793437481, + 0.013207982294261456, + 0.018555214628577232, + 0.03778283670544624, + -0.0073964702896773815, + 0.005739468615502119, + -0.006503930781036615, + 0.0836985856294632, + -0.018363097682595253, + 0.08779706060886383, + 0.0006193743320181966, + -0.04629998281598091, + -0.007756688166409731, + 0.004214547108858824, + 0.01967589184641838, + 0.0018801363185048103, + -0.037270523607730865, + 0.022285468876361847, + 0.03317204862833023, + 0.044314783066511154, + 0.028785396367311478, + -0.011310836300253868, + 0.031426992267370224, + 0.0402483232319355, + 0.006227763835340738, + 0.029842035844922066, + -0.02135690674185753, + 0.03349224105477333, + 0.01592162251472473, + 0.06182936951518059, + -0.010286216624081135, + -0.03861533850431442, + 0.024222640320658684, + 0.04620392620563507, + -0.02625586837530136, + 0.06826525926589966, + 0.022109363228082657, + -0.022429555654525757, + 0.0017630655784159899, + -0.02734452672302723, + 0.008397075347602367, + -0.05949195474386215, + 0.0383271649479866, + -0.02113277278840542, + 0.0019111550645902753, + -0.02636793628334999, + 0.02689625509083271, + -0.0060956841334700584, + -0.011198768392205238, + -0.02638394571840763, + 0.06832929700613022, + 0.01007809117436409, + 0.007180339656770229, + 0.023117972537875175, + 0.03381243720650673, + -0.024366727098822594, + -0.036502059549093246, + -0.015561404637992382, + 0.01901949569582939, + 0.01372829731553793, + 0.0551053024828434, + 0.002021221676841378, + 2.8063835998182185e-05, + -0.04498719051480293, + -0.006543954834342003, + 0.007300412282347679, + 0.018379107117652893, + -0.02588764578104019, + 0.021885227411985397, + 0.008581186644732952, + 0.004084468353539705, + 0.0421694852411747, + 0.02604774199426174, + -0.0007969816797412932, + -0.037174466997385025, + -0.04678027331829071, + -0.015697486698627472, + -0.05923580005764961, + -0.03403656929731369, + 0.01905151456594467, + -0.036598119884729385, + 0.007520545274019241, + 9.424446034245193e-05, + -0.03198733180761337, + 0.014977051876485348, + 0.022141382098197937, + -0.00499501870945096, + 0.04780489206314087, + -0.03254767134785652, + -0.012815745547413826, + 0.0037102424539625645, + -0.031218867748975754, + 0.024927064776420593, + 0.038199085742235184, + 0.011382879689335823, + -0.008717268705368042, + 0.08728475123643875, + -0.028545251116156578, + -0.021949265152215958, + -0.012047281488776207, + 0.010702468454837799, + -0.007292407564818859, + 0.004254571162164211, + -0.015505370683968067, + 0.04012024775147438, + 0.024558842182159424, + -0.012023266404867172, + 0.01632186397910118, + 0.017290450632572174, + -0.02134089730679989, + 0.016698092222213745, + -0.024734949693083763, + 0.08062472939491272, + 0.05609790235757828, + 0.04678027331829071, + -0.04028034582734108, + 0.03557350113987923, + -0.0038863488007336855, + -0.02721644937992096, + 0.03557350113987923, + 0.07332431524991989, + 0.005559360142797232, + -0.005543350242078304, + -0.009237582795321941, + -0.05315212532877922, + 0.018763341009616852, + -0.029890064150094986, + -0.025407355278730392, + 0.05321616306900978, + -0.021949265152215958, + -0.04044044017791748, + -0.036502059549093246, + -0.04082467406988144, + -0.07543759047985077, + 1.098320080927806e-05, + -0.02598370425403118, + 0.02756866253912449, + -0.024430764839053154, + 0.01577753573656082, + 0.0316191092133522, + -0.05356837436556816, + -0.029393764212727547, + -0.0050150309689342976, + -0.0400882288813591, + 0.03867937624454498, + -0.06432687491178513, + -0.02689625509083271, + 0.037718795239925385, + 0.029313717037439346, + 0.03205136954784393, + -0.016858188435435295, + 0.006247776094824076, + 0.006455902010202408, + 0.024398745968937874, + -0.010182153433561325, + 0.008485128171741962, + 0.03134694695472717, + 0.07562971115112305, + 0.02590365521609783, + 0.014929022639989853, + 0.00472285458818078, + 0.009221573360264301, + -0.016938237473368645, + -0.017658673226833344, + -0.02122882939875126, + 0.0008920390973798931, + -0.01957983337342739, + 0.023742349818348885, + 0.023982495069503784, + 0.0006203749217092991, + -0.003972400911152363, + -0.030946703627705574, + -0.03378041461110115, + 0.024430764839053154, + 0.02030026912689209, + -0.0010756500996649265, + -0.017994875088334084, + 0.014240606687963009, + -0.04546748101711273, + 0.007576579228043556, + 0.009565780870616436, + -0.018859397619962692, + 0.023166000843048096, + 0.011895189061760902, + -0.009117510169744492, + -0.0018651272403076291, + -0.02620784007012844, + -0.02006012387573719, + 0.022189410403370857, + -0.0410488098859787, + 0.02002810500562191, + 0.023262059316039085, + 0.005899565760046244, + -0.022269459441304207, + 0.013215987011790276, + -0.03397253155708313, + 0.04690834879875183, + 0.042489681392908096, + -0.037622738629579544, + -0.009309626184403896, + 0.003950387705117464, + -0.01397644728422165, + -0.008693253621459007, + -0.010158139280974865, + 0.0030558467842638493, + 0.00667603500187397, + 0.0420093908905983, + -0.007180339656770229, + -0.04543545842170715, + -0.025919664651155472, + 0.023518214002251625, + -0.009077486582100391, + -0.001904150820337236, + -0.029297707602381706, + -0.037014368921518326, + 0.03259570151567459, + -0.0194037277251482, + -0.0018881411524489522, + 0.024126581847667694, + -0.003570157801732421, + 0.015881597995758057, + -0.018138961866497993, + -0.06221359968185425, + -0.011182758957147598, + -0.013288031332194805, + 0.03807101026177406, + 0.0032719774171710014, + 0.04562757536768913, + -0.03410061076283455, + 0.0002574055688455701, + -0.03310801088809967, + -0.02721644937992096, + 0.014336665160953999, + -0.00789677258580923, + 0.008677244186401367, + 0.04213746637105942, + 0.029409773647785187, + 0.024158600717782974, + -0.001530925277620554, + 0.03384445607662201, + 0.07332431524991989, + 0.030658530071377754, + 0.0004455192538443953, + 0.0029117597732692957, + 0.015689482912421227, + 0.0021933256648480892, + -0.023646291345357895, + 0.009101500734686852, + 0.012015261687338352, + 0.04242563992738724, + -0.01031023170799017, + -0.015801550820469856, + -0.013584209606051445, + -0.03155507147312164, + -0.0013978448696434498, + -0.03592571243643761, + 0.050814710557460785, + -0.005255176220089197, + 0.037558700889348984, + -0.00509908189997077, + -0.01336007472127676, + 0.015681477263569832, + -0.04902162775397301, + 0.0018100939923897386, + 0.006119698751717806, + 0.025423364713788033, + -0.011198768392205238, + -0.04172121360898018, + 0.008341041393578053, + 0.0277927964925766, + 0.03925572335720062, + 0.029601890593767166, + -0.013664258643984795, + -0.0005378250498324633, + -0.025151200592517853, + 0.006595986429601908, + 0.02007613331079483, + 0.07434893399477005, + -0.029970113188028336, + 0.02744058519601822, + -0.09477727860212326, + -0.0808168426156044, + 0.02662409096956253, + -0.0027496619150042534, + -0.003742261789739132, + -0.04117688536643982, + -0.05372847244143486, + 0.010550376027822495, + 0.005391258280724287, + -0.010134125128388405, + -0.049437880516052246, + -0.002731650834903121, + -0.011262807063758373, + 0.003009818959981203, + -0.007984825409948826, + 0.04066457599401474, + 0.022013304755091667, + -0.02792087383568287, + -0.006115696392953396, + -0.017050305381417274, + 0.006503930781036615, + 0.024334706366062164, + -0.037558700889348984, + 0.017306460067629814, + -0.006315817125141621, + 0.043994590640068054, + -0.0656396746635437, + 0.03310801088809967, + -0.00960580538958311, + -0.006003628484904766, + 0.04018428549170494, + -3.223823296139017e-05, + -0.013424113392829895, + 0.03352425992488861, + 0.018667282536625862, + -0.005547352600842714, + -0.02737654559314251, + -0.00670004915446043, + 0.04681229218840599, + 0.010270207189023495, + -0.0277127493172884, + 0.001817098236642778, + -0.04754873737692833, + -0.012439518235623837, + 0.036117829382419586, + -0.015177172608673573, + 0.022877827286720276, + -0.018843388184905052, + 0.03909562900662422, + -0.0038803452625870705, + -0.011807136237621307, + 0.030402373522520065, + 0.02095666527748108, + -0.02811299078166485, + 0.016714101657271385, + 0.0018000879790633917, + 0.04594777151942253, + -0.009389675222337246, + 0.021420946344733238, + -0.04149708151817322, + -0.02006012387573719, + -0.02734452672302723, + -0.0383271649479866, + 0.015217197127640247, + 0.006291802506893873, + -0.0019131562439724803, + 0.015441332012414932, + 0.023774368688464165, + 0.01398445200175047, + -0.03297993168234825, + -0.00011175504187121987, + -0.005987618584185839, + 0.03368435800075531, + 0.0028036944568157196, + 0.001049634418450296, + -0.03221146762371063, + 0.017050305381417274, + 0.013344064354896545, + 0.022829797118902206, + -0.02625586837530136, + 0.0020752542186528444, + 0.009205563925206661, + -0.02081257849931717, + -0.0008995436364784837, + 0.011166748590767384, + 0.02017219178378582, + 0.015177172608673573, + 0.021949265152215958, + 0.017194392159581184, + 0.02630389668047428, + 0.01921161077916622, + 0.013047886081039906, + 0.01359221525490284, + 0.03560552000999451, + 0.011238791979849339, + 0.024911055341362953, + -0.01314394362270832, + -0.018186992034316063, + 0.039768036454916, + -0.01937170699238777, + 0.025647500529885292, + -0.06246975436806679, + -0.0070482599548995495, + -0.022589651867747307, + -0.036566101014614105, + 0.014168563298881054, + -0.011855164542794228, + 0.037494659423828125, + 0.002775677479803562, + 0.03323608636856079, + 0.00031243881676346064, + 0.004306602757424116, + 0.016810160130262375, + -0.02105272375047207, + -0.0060996864922344685, + 0.007152322679758072, + -0.01060640998184681, + 0.007860750891268253, + 0.029345735907554626, + -0.007180339656770229, + 0.007016240619122982, + -0.008493132889270782, + 0.004934982396662235, + -0.07037853449583054, + 0.0015709494473412633, + 0.00694819912314415, + -0.00046453074901364744, + -0.021901236847043037, + -0.002939776750281453, + -0.0009830942144617438, + -0.0022853813134133816, + 0.017370497807860374, + -0.02752063237130642, + 0.03346022218465805, + 0.023838406428694725, + -0.01359221525490284, + 0.025071151554584503, + -0.042745836079120636, + 0.012847764417529106, + -0.005607388913631439, + 0.022957874462008476, + 0.01951579563319683, + -0.011647039093077183, + -0.01914757303893566, + 0.050334420055150986, + 0.014985056594014168, + -0.030674539506435394, + 0.03842322155833244, + 0.025743559002876282, + -0.012407498434185982, + 0.007836736738681793, + -0.022909846156835556, + -0.015185177326202393, + 0.017722710967063904, + -0.04930980131030083, + 0.023230040445923805, + -0.0025195227935910225, + 0.07556567341089249, + 0.010638429783284664, + -0.017098333686590195, + 0.00248950463719666, + 0.011502952314913273, + 0.013832359574735165, + 0.03192329406738281, + -0.02676817774772644, + -0.010942613705992699, + -0.011871174909174442, + 0.008749287575483322, + -0.02006012387573719, + 0.04127294570207596, + -0.016682082787156105, + 0.014953036792576313, + -0.043642375618219376, + -0.02129286900162697, + 0.016057705506682396, + -0.013183968141674995, + -0.031058771535754204, + -0.015353279188275337, + 0.02697630412876606, + -0.012079300358891487, + 0.023198019713163376, + 0.00042700808262452483, + -0.016650062054395676, + -0.0004630298353731632, + -0.04293794929981232, + -0.050334420055150986, + -0.030482422560453415, + -0.007832733914256096, + 0.018491175025701523, + -0.006203749217092991, + -0.007848743349313736, + 0.003071856452152133, + -0.001076650689356029, + 0.010782516561448574, + -0.009797921404242516, + -0.018170982599258423, + 0.005895562935620546, + -0.02066849172115326, + 0.02785683609545231, + -0.029649918898940086, + -0.0005263180937618017, + -0.01999608427286148, + -0.024462785571813583, + -0.0312989167869091, + 0.04847729951143265, + 0.013952432200312614, + 0.004646808374673128, + 0.03627792373299599, + 0.002255363157019019, + 0.005455296952277422, + -0.03627792373299599, + -0.04149708151817322, + 0.0011336851166561246, + 0.0009270603186450899, + 0.022189410403370857, + 0.02012416161596775, + -0.007456506602466106, + -0.036117829382419586, + 0.02635192684829235, + -0.014616833999752998, + 0.018395118415355682, + -0.012247402220964432, + 0.015273231081664562, + -0.017770739272236824, + -0.028929485008120537, + 0.008525152690708637, + -0.009901984594762325, + 0.009125514887273312, + 0.01921161077916622, + -0.01949978433549404, + -0.018603242933750153, + -0.0008915388025343418, + -0.023166000843048096, + 0.0032459618523716927, + -0.014816954731941223, + 0.008373060263693333, + -0.02739255502820015, + -0.016409918665885925, + -0.006155720446258783, + -0.01314394362270832, + -0.013207982294261456, + -0.0050870743580162525, + -0.015377293340861797, + 0.044666994363069534, + -0.029105590656399727, + 0.01020616851747036, + 0.043290164321660995, + -0.01324000209569931, + 0.03217944875359535, + -0.014072504825890064, + 0.01980396918952465, + -0.002669613342732191, + -0.0399281308054924, + -0.0019912035204470158, + 0.002091263886541128, + 0.037750814110040665, + 0.017994875088334084, + -0.02002810500562191, + 0.05910772457718849, + -0.0023053933400660753, + 0.028769386932253838, + -0.013175963424146175, + -0.024350717663764954, + -0.0053512342274188995, + 0.0038783440832048655, + -0.0637185126543045, + 0.024174610152840614, + -0.025071151554584503, + 0.0038863488007336855, + 0.02159705199301243, + 0.06202148273587227, + -0.03163512051105499, + 0.006199746858328581, + -0.017354488372802734, + 0.014464742504060268, + 0.02694428525865078, + -0.023886436596512794, + 0.04588373005390167, + 0.011222782544791698, + -0.0019942051731050014, + -0.01047833263874054, + 0.07486124336719513, + -0.0022253450006246567, + -0.009189553558826447, + 0.006483918521553278, + 0.015161163173615932, + -0.028353136032819748, + 0.042809873819351196, + -0.03238757327198982, + -0.00200020894408226, + 0.0014228599611669779, + 0.016906218603253365, + 0.015393303707242012, + -0.0074645113199949265, + -0.0005688437959179282, + -0.0038643355946987867, + -0.030482422560453415, + -0.025711540132761, + -0.018875407055020332, + -0.04774085432291031, + -0.036438021808862686, + 0.01008609589189291, + -0.007648622617125511, + -0.003067854093387723, + 0.03515724837779999, + 0.012815745547413826, + -0.01373630203306675, + -0.010870570316910744, + -0.0008530155173502862, + -0.00341006089001894, + -0.00014971548807807267, + -0.03166713938117027, + -0.006772093009203672, + 0.0064478968270123005, + 0.008277002722024918, + -0.036950331181287766, + -0.006499928422272205, + -0.022605663165450096, + -0.00048154103569686413, + 0.008180944249033928, + -0.02752063237130642, + 0.008637219667434692, + -0.008076881058514118, + -0.023550232872366905, + 0.02122882939875126, + 0.029009532183408737, + 0.03413262963294983, + -0.040888711810112, + -0.02017219178378582, + 0.01073448732495308, + -0.0019962063524872065, + -0.006836131680756807, + 0.007668634876608849, + -0.008901380002498627, + 0.022541623562574387, + -0.004590774420648813, + 0.03925572335720062, + 0.035861674696207047, + -0.02121281996369362, + -0.018379107117652893, + -0.01008609589189291, + 0.023502204567193985, + -0.03890351206064224, + -0.015753520652651787, + -0.037206485867500305, + -0.014432722702622414, + 0.03371637687087059, + 0.02001209557056427, + -0.044442858546972275, + 0.003576161339879036, + -0.015881597995758057, + 0.0007329429499804974, + 0.00982994120568037, + 0.025519423186779022, + 0.018475165590643883, + 0.023646291345357895, + -0.010150134563446045, + 0.0033800427336245775, + 0.014416713267564774, + 0.04044044017791748, + -0.013560195453464985, + 0.036630138754844666, + 0.011855164542794228, + 0.018154973164200783, + 0.0019241629634052515, + 0.011462927795946598, + -0.02135690674185753, + -0.02798491343855858, + -0.015681477263569832, + -0.0013598218793049455, + 0.014640848152339458, + -0.003634196473285556, + -0.0033280113711953163, + -0.006271790713071823, + 0.02678418718278408, + -0.017786750569939613, + 0.024654900655150414, + -0.024078551679849625, + -0.024286678060889244, + -0.007300412282347679, + -0.02002810500562191, + 0.011566990986466408, + 0.014905008487403393, + 0.02046036534011364, + 0.028945494443178177, + 0.015977656468749046, + -0.022157391533255577, + 0.01359221525490284, + 0.002327406546100974, + 0.008757292293012142, + -0.028961503878235817, + 0.011703073047101498, + -0.024526823312044144, + -0.0023694320116192102, + 0.005875551141798496, + 0.0197239201515913, + -0.0015909615904092789, + -0.007108296267688274, + 0.010790521278977394, + -0.01938771829009056, + 0.010270207189023495, + 0.03291589394211769, + -0.04197736829519272, + -0.009309626184403896, + -0.021500995382666588, + 0.022413546219468117, + 0.02031627856194973, + -0.003974401857703924, + 0.04658815637230873, + -0.050622593611478806, + 0.005307207349687815, + -0.030066171661019325, + 0.03174718841910362, + 0.05561761558055878, + 0.04191333055496216, + 0.044506900012493134, + -0.001674011698924005, + 0.03265973925590515, + -0.022845806553959846, + 0.0420093908905983, + -0.00995001383125782, + 0.02604774199426174, + -0.012847764417529106, + -0.03624590486288071, + 0.03269175812602043, + -0.005883555859327316, + 0.006664027459919453, + 0.01922762021422386, + -0.022461574524641037, + 0.035829655826091766, + 0.009629820473492146, + 0.02734452672302723, + -0.021613063290715218, + -0.05267183482646942, + -0.04921374469995499, + 0.017082324251532555, + -0.02792087383568287, + 0.02057243324816227, + 0.018122952431440353, + 0.004630798939615488, + 0.014048490673303604, + 0.009877970442175865, + -0.010382275097072124, + 0.012151343747973442, + -0.02025224082171917, + -0.015073109418153763, + 0.0026415965985506773, + -0.021629072725772858, + -0.014416713267564774, + 0.01326401624828577, + -0.0029257682617753744, + -0.0018371102632954717, + 0.011142734438180923, + 0.008156930096447468, + 0.04863739386200905, + -0.015737511217594147, + -0.025103172287344933, + 0.018859397619962692, + 0.03839120268821716, + 0.01019816379994154, + -0.044218726456165314, + 0.021693110466003418, + 0.014953036792576313, + 0.03317204862833023, + -0.005487316288053989, + -0.01980396918952465, + 0.007032250054180622, + 0.0097018638625741, + -0.02058844268321991, + 0.04626796394586563, + 0.01033424586057663, + 0.004782890435308218, + -0.007160327397286892, + 0.015217197127640247, + -0.02635192684829235, + 0.009765902534127235, + 0.03176319599151611, + 0.024638891220092773, + 0.04018428549170494, + 0.012487547472119331, + 0.03342820331454277, + -0.016730111092329025, + 0.018122952431440353, + -0.024126581847667694, + -0.017130352556705475, + 0.028177030384540558, + -0.02644798532128334, + 0.008821330964565277, + -0.036438021808862686, + -0.016169773414731026, + 0.04850931838154793, + -0.009029457345604897, + -0.023198019713163376, + -0.011727087199687958, + 0.016457946971058846, + 0.002014217432588339, + -0.010430303402245045, + 0.02691226452589035, + 0.005539347883313894, + 0.042745836079120636, + 0.016714101657271385, + -0.029906073585152626, + 0.006952201947569847, + -0.017258429899811745, + -0.015081115067005157, + 0.02041233703494072, + -0.05475309118628502, + 0.02752063237130642, + 0.04796499013900757, + 0.051871348172426224, + 0.037334565073251724, + 0.011815140955150127, + -0.00657597417011857, + -6.582103196706157e-06, + 0.0035341358743608, + 0.044859111309051514, + -0.04015226662158966, + 0.05978012830018997, + -0.02814500965178013, + -0.017418527975678444, + 0.036758214235305786, + 0.018491175025701523, + 0.008429094217717648, + 0.05260779336094856, + 0.02644798532128334, + -0.014184572733938694, + -0.028945494443178177, + 0.00957378651946783, + -0.043578337877988815, + 0.04678027331829071, + 0.015217197127640247, + -0.005915575195103884, + -0.00667603500187397, + 0.00485093193128705, + 0.022637682035565376, + -0.03320406749844551, + -0.00035796634620055556, + -0.006335829384624958, + 0.010534366592764854, + 0.012423508800566196, + 0.028321117162704468, + 0.0267521683126688, + 0.0001440870837541297, + -0.04127294570207596, + 0.02583961747586727, + -0.016121743246912956, + -0.0020272252149879932, + 0.005719456821680069, + 0.024158600717782974, + 0.04226554557681084, + 0.002701632911339402, + -0.026271877810359, + 0.018379107117652893, + 0.043130066245794296, + 0.04034438356757164, + -0.03426070511341095, + -0.0018331079045310616, + 0.012623629532754421, + -0.012895793654024601, + 0.01323199737817049, + 0.023230040445923805, + 0.005627401173114777, + -0.015265226364135742, + 0.01021417323499918, + 0.008701259270310402, + -0.014152553863823414, + -0.011639034375548363, + 0.012503556907176971, + 0.021533014252781868, + -0.012879784218966961, + 0.023117972537875175, + -0.002995810704305768, + -0.018827378749847412, + 0.003682225476950407, + -0.044346801936626434, + -0.00046102862688712776, + -0.008421089500188828, + -0.04988614842295647, + 0.02729649655520916, + 0.017434537410736084, + -0.022349506616592407, + -0.00679610762745142, + -0.007252383045852184, + 0.016634052619338036, + -0.016730111092329025, + 0.0017800758359953761, + 0.015337269753217697, + 0.014752916060388088, + -0.022109363228082657, + -0.0020112155470997095, + 0.004806905053555965, + 0.023166000843048096, + -0.006607993505895138, + 0.036726195365190506, + 0.029521841555833817, + 0.004690835252404213, + -0.008901380002498627, + 0.0056954422034323215, + 0.0029657925479114056, + 0.018875407055020332, + -0.016073714941740036, + 0.024654900655150414, + 0.02764870971441269, + -0.005323217250406742, + -0.010022057220339775, + -0.009797921404242516, + -0.01633787341415882, + -0.004334619734436274, + -0.0004267579352017492, + 0.007556566968560219, + 0.0022893836721777916, + -0.009653834626078606, + -0.01398445200175047, + 0.025615481659770012, + -0.0039043596480041742, + -0.03201935067772865, + -0.002945780288428068, + -0.0024014513473957777, + 0.003516125027090311, + -0.009037462063133717, + -0.009141525253653526, + 0.012015261687338352, + -0.014961042441427708, + -0.002041233703494072, + 0.012655648402869701, + -0.0019591841846704483, + 0.016890207305550575, + 0.008421089500188828, + -0.00341006089001894, + -0.02639995515346527, + 0.03245161473751068, + 0.013824354857206345, + 0.0517432726919651, + 0.04207342863082886, + -0.013696277514100075, + 0.010918598622083664, + -0.05212750285863876, + -0.00014871488383505493, + 0.001863126060925424, + 0.03349224105477333, + -0.0016670074546709657, + 0.024254659190773964, + 0.02638394571840763, + -0.013920413330197334, + 0.015913616865873337, + 0.008893375284969807, + 0.04197736829519272, + 0.01962786167860031, + 0.008733278140425682, + 0.022989895194768906, + -0.015457342378795147, + 0.004630798939615488, + -0.002887745387852192, + 0.016778139397501945, + 0.011574995703995228, + 0.0038223101291805506, + 0.003618186805397272, + -0.013207982294261456, + -0.04245765879750252, + 0.008565176278352737, + -0.012823750264942646, + 0.0039603933691978455, + -0.003231953363865614, + 0.0012917807325720787, + 0.0202042106539011, + 0.018283050507307053, + -0.024350717663764954, + -0.0022373523097485304, + -0.011038671247661114, + 0.004374643787741661, + 0.003632195293903351, + 0.00667603500187397, + -0.022253450006246567, + 0.015489361248910427, + -0.017386507242918015, + -0.015089119784533978, + 0.007096288725733757, + -0.05225558206439018, + 0.02681620791554451, + -0.012047281488776207, + 0.006383858155459166, + -0.03877543658018112, + 0.022285468876361847, + 0.0038643355946987867, + 0.009525757282972336, + 0.04207342863082886, + 0.006059662438929081, + 0.012519566342234612, + -0.009157534688711166, + 0.037398602813482285, + -0.022381527349352837, + -0.029761986806988716, + -0.01400846615433693, + 0.003978404216468334, + 0.01609772816300392, + 0.02646399475634098, + -0.008317026309669018, + -0.0009490735828876495, + -0.0077486829832196236, + -0.018186992034316063, + -0.038167066872119904, + 0.030002132058143616, + -0.016265830025076866, + 0.012527571059763432, + 0.018795359879732132, + -0.009269602596759796, + 0.023774368688464165, + -0.009909989312291145, + -0.03378041461110115, + 0.022397536784410477, + -0.012735697440803051, + -0.0405685193836689, + -0.0202042106539011, + -0.006299807224422693, + -0.011342855170369148, + 0.0015679476782679558, + -0.008204959332942963, + -0.023262059316039085, + 0.029073571786284447, + 0.02121281996369362, + -0.012295431457459927, + -0.011903193779289722, + -0.017146361991763115, + -0.01340009830892086, + 0.014480751939117908, + 0.030946703627705574, + 0.005599384196102619, + -0.024766968563199043, + 0.006836131680756807, + -0.029121600091457367, + 0.02681620791554451, + -0.021869217976927757, + 0.014360679313540459, + 0.0008019846864044666, + 0.006455902010202408, + 0.036117829382419586, + -0.00200020894408226, + -0.006732068490236998, + 0.02680019661784172, + -0.010150134563446045, + 0.021773159503936768, + 0.013960436917841434, + -0.01010210532695055, + 0.004578767344355583, + -0.010974632576107979, + -0.02681620791554451, + 0.01959584280848503, + -0.024158600717782974, + -0.012335455045104027, + 0.008252987638115883, + -0.022029314190149307, + -0.03531734645366669, + 0.0001409601973136887, + -0.012119324877858162, + 0.003578162519261241, + -0.015185177326202393, + 0.009093496017158031, + -0.0070602670311927795, + -0.02649601362645626, + -0.015569409355521202, + 0.003237956902012229, + 0.04159313812851906, + -0.023566242307424545, + 0.03525330498814583, + -0.029569871723651886, + -0.036309946328401566, + -0.002339413855224848, + -0.008429094217717648, + 0.015993665903806686, + 0.01362423412501812, + 0.017194392159581184, + 0.016345879063010216, + -0.00027066358597949147, + 0.016025684773921967, + 0.010774511843919754, + 0.014993061311542988, + 0.0002819203946273774, + -0.0024794985074549913, + 0.0019361701561138034, + -0.01617777720093727, + 0.008925394155085087, + 0.011863170191645622, + 0.011342855170369148, + 0.011198768392205238, + -0.009045466780662537, + -0.009021452628076077, + 0.0030738578643649817, + -0.017082324251532555, + -0.012495552189648151, + -0.023950474336743355, + 0.00655996473506093, + 0.015313254669308662, + 0.0016630050959065557, + 0.03595773130655289, + 0.03342820331454277, + 0.015721501782536507, + -0.037558700889348984, + -0.015457342378795147, + -0.03336416557431221, + -0.012287425808608532, + 0.014280631206929684, + -0.0021352905314415693, + -0.029425784945487976, + 0.006527945399284363, + 0.022957874462008476, + -0.009437703527510166, + 0.02796890400350094, + -0.004122491460293531, + 0.0038883499801158905, + -0.02667211927473545, + -0.006423882208764553, + 0.017738720402121544, + -0.024078551679849625, + 0.015513376332819462, + 0.014560800045728683, + 0.002277376363053918, + -0.010678453370928764, + 0.0023694320116192102, + 0.010406289249658585, + -0.007688646670430899, + 0.017786750569939613, + -0.010382275097072124, + 0.016489965841174126, + -0.0023314091376960278, + 0.005059057381004095, + -0.0003099373134318739, + 0.0036021771375089884, + -0.013464136980473995, + 0.01031023170799017, + -0.030642518773674965, + 0.0007099290378391743, + -0.000910550297703594, + -0.0196438729763031, + 0.017626652494072914, + 0.014993061311542988, + -0.03352425992488861, + -0.024606872349977493, + -0.03173117712140083, + 0.03925572335720062, + -0.002451481530442834, + -0.02628788724541664, + -0.02606375142931938, + 0.0009260596707463264, + 0.00799283105880022, + 0.03166713938117027, + -0.0038263124879449606, + -0.005587376654148102, + -0.024366727098822594, + 0.01946776546537876, + 0.003536137053743005, + -0.0077326735481619835, + 0.03365233913064003, + -0.03842322155833244, + -0.025199228897690773, + -0.00961381010711193, + -0.0035521467216312885, + -0.04271381348371506, + -0.05472107231616974, + -0.00999003741890192, + -0.011302831582725048, + -0.006844136398285627, + -0.008389069698750973, + 0.018539205193519592, + -0.018058914691209793, + 0.014921017922461033, + -0.03160310164093971, + -0.03909562900662422, + 0.044699013233184814, + -0.0037582714576274157, + -0.010702468454837799, + 0.0024194621946662664, + -0.02121281996369362, + 0.0011216779239475727, + -0.00242746714502573, + -0.0032219472341239452, + -0.00537124602124095, + -0.0008710264228284359, + -0.00017935839423444122, + 0.003952388651669025, + 0.014712892472743988, + 0.010542371310293674, + 0.01384836994111538, + -0.014264620840549469, + 0.016682082787156105, + -0.04255371913313866, + -0.014256616123020649, + -0.0033140028826892376, + -0.006235768552869558, + 0.012207377701997757, + 0.017866797745227814, + 0.017962856218218803, + 0.0005783495143987238, + 0.01399245671927929, + 0.0069281873293221, + 0.03576561436057091, + -0.012823750264942646, + 0.010982637293636799, + -0.0027056352701038122, + -0.0013968441635370255, + 0.008333036676049232, + -0.006539952475577593, + -0.010990642011165619, + -0.08139318972826004, + -0.010702468454837799, + 0.02094065584242344, + -0.04149708151817322, + 0.04879749193787575, + -0.03251565247774124, + 0.012767716310918331, + -0.0029918081127107143, + 0.0016109736170619726, + 0.008164934813976288, + -0.005747473798692226, + 0.015273231081664562, + -0.008164934813976288, + -0.012735697440803051, + -0.008309021592140198, + 0.04767681285738945, + 0.0006784099969081581, + -0.0012327450094744563, + 0.028449194505810738, + 0.008717268705368042, + 0.04838123917579651, + 0.0005158117273822427, + -0.0011526966700330377, + 0.004782890435308218, + -0.0010526361875236034, + 0.03163512051105499, + -0.011286821216344833, + 0.02082858793437481, + -0.031122809275984764, + -0.017802760004997253, + 0.012191368266940117, + -0.02572754956781864, + 0.036662157624959946, + -0.0006749078747816384, + -0.0013518170453608036, + 0.005303204990923405, + -0.00800884049385786, + -0.004610786680132151, + 0.0019121556542813778, + -0.008453109301626682, + 0.0022433558478951454, + -0.00510708661749959, + 0.0023754355497658253, + -0.036726195365190506, + 0.021244840696454048, + 0.011911198496818542, + -0.015017076395452023, + -0.04178525507450104, + 0.02004411444067955, + -0.023470185697078705, + 0.050270382314920425, + 0.004238561727106571, + -0.006992226000875235, + -0.028577271848917007, + -0.03294791281223297, + 0.023214029148221016, + -0.036758214235305786, + 0.03477301448583603, + 0.010390279814600945, + 0.03310801088809967, + 0.013536181300878525, + -0.0025235251523554325, + 0.02667211927473545, + -0.001426862319931388, + 0.0028577272314578295, + 0.005879553500562906, + -0.010918598622083664, + 0.0627579316496849, + -0.02046036534011364, + -0.023198019713163376, + 0.017818769440054893, + 0.006139710545539856, + -0.0426497757434845, + 0.005583374295383692, + 0.003003815421834588, + 0.03307599201798439, + -0.017866797745227814, + -0.016858188435435295, + 0.006996228359639645, + -0.009389675222337246, + -0.05971609055995941, + -0.03589369356632233, + 0.0032199460547417402, + -0.018411127850413322, + -0.030930694192647934, + -0.0031899278983473778, + -0.009781911969184875, + -0.012295431457459927, + -0.0009280609083361924, + -0.0020552421920001507, + 1.7573120203451253e-05, + -0.009629820473492146, + 0.0158095546066761, + -0.010518357157707214, + -0.0128557700663805, + 0.01302387099713087, + -0.023342106491327286, + -0.018523195758461952, + 0.017370497807860374, + -0.007640617899596691, + 0.01325601153075695, + 0.016778139397501945, + -0.0018311067251488566, + 0.011350859887897968, + 0.04898960888385773, + -0.012143339030444622, + -0.006063664797693491, + 0.018987474963068962, + -0.028177030384540558, + -0.03214742988348007, + -0.009461718611419201, + -0.03855130076408386, + -0.00657197181135416, + -0.01035025529563427, + -0.0037322556599974632, + -0.04098476842045784, + 0.012399493716657162, + 0.05404866486787796, + 0.02073252946138382, + -0.015769530087709427, + 0.02111676335334778, + 0.021773159503936768, + 0.00472685694694519, + 0.04060053825378418, + -0.000482291477965191, + -0.01376832090318203, + 0.011799131520092487, + -0.010286216624081135, + -0.004682830069214106, + 0.02622384950518608, + 0.0033960524015128613, + 0.022669700905680656, + 0.001381835201755166, + 0.006499928422272205, + -0.03877543658018112, + -0.012551586143672466, + 0.0019531804136931896, + -0.031074780970811844, + 0.025391345843672752, + -0.021549023687839508, + -0.01624181680381298, + 0.0009976029396057129, + 0.005567364860326052, + -0.008685248903930187, + 0.03221146762371063, + -0.037878893315792084, + -0.006351838819682598, + 0.007812721654772758, + -0.051871348172426224, + -0.005143108312040567, + -0.017882807180285454, + 0.03589369356632233, + -0.00024314694746863097, + 0.016281839460134506, + 0.023534223437309265, + -0.001387838739901781, + -0.0035301335155963898, + -0.019243629649281502, + 0.014416713267564774, + -0.007756688166409731, + -0.00011000398080796003, + 0.014376688748598099, + -0.0017370497807860374, + 0.009149529971182346, + -0.015641452744603157, + -0.01620979607105255, + 0.007144317962229252, + 0.006343834102153778, + 0.010782516561448574, + ], + "index": 30, + }, + { + "title": "Cadore", + "text": "Cadore (Ladin: Cad\u00f2r; Venetian: Cad\u00f2r or, rarely, Cad\u00f2ria; German: Cadober or Kadober; Sappada German: Kadour; Friulian: Cjadovri) is an historical region in the Italian region of Veneto, in the northernmost part of the province of Belluno bordering on Austria, the Trentino-Alto Adige/S\u00fcdtirol and Friuli-Venezia Giulia. It is watered by the Piave River poured forth from the Carnic Alps.", + "vector": [ + -0.015382952056825161, + 0.029189366847276688, + -0.017014123499393463, + 0.018606269732117653, + 0.023975864052772522, + -0.020760351791977882, + -0.0171233881264925, + -0.033934589475393295, + -0.049637533724308014, + 0.015297100879251957, + -0.019199423491954803, + 0.00024084642063826323, + -0.058909449726343155, + -0.05531931295990944, + -0.03624476492404938, + -0.03096882440149784, + -0.05747339501976967, + -0.03352874889969826, + -0.0036408661399036646, + -0.04145826771855354, + 0.025365091860294342, + 0.00854608416557312, + 0.010044575668871403, + -0.037712037563323975, + 0.06462244689464569, + 0.027566000819206238, + 0.015921473503112793, + 0.01765410415828228, + -0.007258318364620209, + 0.015749771147966385, + 0.006083719432353973, + -0.022742731496691704, + -0.009108019061386585, + -0.013939092867076397, + 0.011519653722643852, + 0.04907559975981712, + -0.060501594096422195, + -0.006454440299421549, + 0.011761597357690334, + 0.0259738527238369, + -0.015617091208696365, + -0.0178570244461298, + 0.0363072007894516, + 0.05044921487569809, + -0.035058457404375076, + -0.006411514710634947, + 0.01629609614610672, + 0.022805167362093925, + -0.014149818569421768, + -0.012378164567053318, + -0.0287835244089365, + -0.04732735827565193, + -0.04024074226617813, + 0.01865309849381447, + -0.01304936408996582, + 0.053914476186037064, + 0.036681823432445526, + 0.07061641663312912, + -0.038867123425006866, + -0.013174237683415413, + 0.021556425839662552, + -0.06237471103668213, + -0.02795623242855072, + -0.008210484869778156, + 0.0124718202278018, + 0.02570849470794201, + -0.027581609785556793, + 0.0383676253259182, + -0.0051939901895821095, + 0.012776201590895653, + -0.003601843025535345, + -0.018106773495674133, + 0.012385969050228596, + 0.04408062621951103, + 0.01937112584710121, + 0.03524576872587204, + 0.00887387990951538, + -0.009771413169801235, + -0.0640605166554451, + -0.020651087164878845, + -0.012744982726871967, + 0.0174199640750885, + -0.006731505040079355, + -0.04595373943448067, + 0.0015287345740944147, + -0.08816125243902206, + 0.002472120802849531, + -0.048638537526130676, + -0.004370600450783968, + 0.021572034806013107, + -0.010528463870286942, + 0.04383087903261185, + -0.014664924703538418, + -0.07492457330226898, + -0.0652468204498291, + -0.023897817358374596, + -0.022805167362093925, + -0.004027196206152439, + 0.011246491223573685, + 0.017341917380690575, + -0.024631455540657043, + 0.037680819630622864, + 0.014742971397936344, + 0.018309693783521652, + 0.015468803234398365, + 0.006485658697783947, + -0.021478379145264626, + -0.040958769619464874, + -0.019652092829346657, + 0.02381977252662182, + 0.020994490012526512, + -0.018840409815311432, + 0.044798653572797775, + -0.014040553942322731, + -0.012893270701169968, + -0.043706003576517105, + 0.025052905082702637, + -0.006766625680029392, + -0.049699969589710236, + -0.026161164045333862, + -0.013783000409603119, + -0.04704638943076134, + -0.019402343779802322, + -0.0191838126629591, + 0.023757334798574448, + -0.025614839047193527, + 0.008881684392690659, + 0.038180314004421234, + -0.03060981072485447, + 0.06824380159378052, + -0.010903086513280869, + -0.055132001638412476, + -0.03007909655570984, + -0.018465787172317505, + -0.01126210018992424, + -0.00664955610409379, + 0.001985306153073907, + 0.05497590824961662, + 0.022040313109755516, + 0.04342503473162651, + -0.003547210479155183, + -0.015094180591404438, + -0.028112325817346573, + -0.018934065476059914, + -0.040490489453077316, + -0.043674785643815994, + -0.009006558917462826, + 0.0481078214943409, + 0.02378855273127556, + 0.013509837910532951, + 0.04617227241396904, + 0.0078124478459358215, + 0.0174199640750885, + -0.012300117872655392, + 0.0310000441968441, + -0.04767076298594475, + -0.003738424275070429, + 0.002306272042915225, + 0.04180166870355606, + -0.025115342810750008, + -0.018403349444270134, + 0.03843006491661072, + 0.03621354699134827, + -0.002197007182985544, + -0.01927747018635273, + -0.03199903666973114, + -0.0014897113433107734, + -0.011301123537123203, + -0.04186410829424858, + 0.017872633412480354, + -0.01533612422645092, + 0.03465261682868004, + 0.015780989080667496, + -0.010239692404866219, + -0.025333872064948082, + -0.014298106543719769, + 0.016108784824609756, + -0.004214507527649403, + -0.017903851345181465, + -0.030531765893101692, + 0.013517642393708229, + -0.02928302250802517, + 0.008577303029596806, + -0.040552929043769836, + 0.004569618962705135, + 0.02043255604803562, + 0.06462244689464569, + 0.023804161697626114, + 0.06662043929100037, + 0.0030145435594022274, + -0.031452711671590805, + -0.024303659796714783, + 0.0037637893110513687, + -0.005186185706406832, + -0.03702522814273834, + -0.006302249617874622, + -0.009014363400638103, + -0.005353985354304314, + 0.057317301630973816, + 0.0717402845621109, + -0.058316294103860855, + 0.030750295147299767, + 0.028377683833241463, + 0.010044575668871403, + -0.02692602016031742, + 0.021603252738714218, + -0.013697149232029915, + -0.014618096873164177, + 0.0211037565022707, + -0.007367583457380533, + 0.061094749718904495, + -0.026613833382725716, + 0.03821153566241264, + 0.03090638853609562, + -0.005982259288430214, + 0.0017706784419715405, + -0.029126929119229317, + -1.3749586287303828e-05, + -0.018262865021824837, + 0.03537064418196678, + -0.0070124720223248005, + -0.017076559364795685, + -0.031031262129545212, + -0.03199903666973114, + -0.00016645841242279857, + -0.02033890038728714, + -0.0287835244089365, + 0.04348747432231903, + 0.011878667399287224, + 0.033903371542692184, + -0.0036291591823101044, + -0.03521455079317093, + -0.02742551639676094, + -0.01300253625959158, + 0.023897817358374596, + -0.02666066214442253, + 0.008616326376795769, + -0.04763954505324364, + -0.01699851267039776, + 0.002083839848637581, + -0.03096882440149784, + 0.051885269582271576, + -0.015757575631141663, + -0.051885269582271576, + -0.00021853001089766622, + 0.01735752634704113, + -0.0026906507555395365, + 0.0024916324764490128, + 0.02010476216673851, + -0.004206702578812838, + 0.04954387620091438, + 0.009365571662783623, + 0.03271706402301788, + -0.011371365748345852, + -0.06549657136201859, + -0.03430921211838722, + -0.0035764777567237616, + 0.023866599425673485, + 0.024303659796714783, + 0.02222762443125248, + -0.03908565267920494, + 0.025599230080842972, + -0.022212015464901924, + -0.019199423491954803, + -0.020292073488235474, + -0.02683236449956894, + -0.04885706678032875, + -0.02010476216673851, + -0.024069519713521004, + -0.039928555488586426, + -0.010856258682906628, + -0.022477373480796814, + 0.02090083435177803, + 0.01907454803586006, + 0.026426522061228752, + 0.05247842147946358, + 0.03733741492033005, + 0.03037567250430584, + 0.03070346638560295, + -0.0023004186805337667, + 0.031452711671590805, + -0.05606855824589729, + -0.03331021964550018, + -0.04757710546255112, + -0.010856258682906628, + -0.02146277017891407, + -0.03252975270152092, + 0.01835652068257332, + 0.08341602981090546, + -0.05478859692811966, + -0.030188361182808876, + 0.04454890638589859, + 0.026676271110773087, + -0.0460473969578743, + 0.028705477714538574, + -0.0369003526866436, + -0.00173458200879395, + -0.02553679421544075, + -0.009451422840356827, + -0.008944121189415455, + -0.01904333010315895, + -0.043144069612026215, + -0.0009550932445563376, + -0.005404715426266193, + 0.03324778005480766, + -0.014649315737187862, + 0.013205456547439098, + 0.0052720364183187485, + 0.007172467187047005, + -0.01053626835346222, + -0.027737703174352646, + 0.001163867418654263, + -0.009279721416532993, + -0.00597055209800601, + 0.006860281806439161, + 0.008553889580070972, + -0.03196781873703003, + 0.015624895691871643, + -0.007652452681213617, + 0.003779398510232568, + -0.01251864805817604, + -0.012666936032474041, + -0.060595251619815826, + -0.04439281299710274, + 0.05759826675057411, + -0.01382982823997736, + 0.03515211492776871, + -0.00764464819803834, + 0.03952271491289139, + 0.034996021538972855, + -0.01567172445356846, + 0.03430921211838722, + 0.003002836601808667, + 0.007535383105278015, + -0.006083719432353973, + 0.0053227669559419155, + 0.004276944790035486, + -0.008007564581930637, + -0.0030086899641901255, + -0.034371647983789444, + -0.016311705112457275, + 0.027706483379006386, + 0.06031428277492523, + 0.03179611638188362, + -0.01653023436665535, + 0.013408377766609192, + 0.029204975813627243, + 0.01361129805445671, + 0.010208473540842533, + 0.008241703733801842, + 0.0006404685555025935, + 0.005962747614830732, + -0.07804643362760544, + 0.042613353580236435, + 0.04823269695043564, + 0.018965283408761024, + -0.05716120824217796, + 0.00139508000575006, + -0.032873157411813736, + 0.026223601773381233, + -0.012229876592755318, + 0.011777207255363464, + -0.05987722426652908, + -0.02653578855097294, + 0.0158668402582407, + -0.026676271110773087, + -0.01101235207170248, + -0.0259738527238369, + 0.00023413929739035666, + 0.060564033687114716, + -0.024584626778960228, + -0.025552403181791306, + -0.032873157411813736, + 0.028408901765942574, + 0.0010965523542836308, + -0.011995736509561539, + -0.005014483351260424, + -0.0046008373610675335, + 0.0023179790005087852, + 0.016982903704047203, + 0.02175934612751007, + -0.05812898278236389, + -0.06893061101436615, + 0.0025423625484108925, + 0.0007443678914569318, + -0.015125398524105549, + 0.02149398811161518, + 0.023211009800434113, + -0.018528223037719727, + -0.020916445180773735, + -0.04835757240653038, + 0.04813903942704201, + 0.046359583735466, + 0.00849925633519888, + 0.00955288391560316, + 0.019995495676994324, + -0.032841939479112625, + 0.032311223447322845, + 0.02411634847521782, + 0.0001282888260902837, + -0.01055187825113535, + -0.029267413541674614, + 0.020526211708784103, + -0.000830218952614814, + 0.05266573280096054, + -0.0043901121243834496, + 0.05972113087773323, + -0.014063967391848564, + -0.015952691435813904, + 0.005275939125567675, + -0.05260329693555832, + -0.030859559774398804, + 0.01304936408996582, + 0.007547090295702219, + 0.02219640649855137, + -0.0389607809484005, + 0.06911791861057281, + 0.008101220242679119, + -0.08541401475667953, + -0.0018975039711222053, + 0.013018145225942135, + 0.0324673168361187, + 0.016186829656362534, + -0.01340057235211134, + -0.01179281622171402, + 0.011777207255363464, + -0.008530475199222565, + 0.023632461205124855, + 0.02851816639304161, + -0.01818481832742691, + -0.005494468845427036, + 0.0369003526866436, + 0.07030422985553741, + 0.06006453558802605, + -0.017778977751731873, + -0.016951685771346092, + 0.03262341022491455, + 0.014961501583456993, + 0.04273822903633118, + 0.047483451664447784, + 0.013143019750714302, + 0.0035237965639680624, + 0.054070569574832916, + 0.03043811023235321, + -0.01629609614610672, + -0.008257312700152397, + 0.02040133811533451, + -0.03618232533335686, + 0.0327795036137104, + -0.021868610754609108, + -0.03312290832400322, + -0.03889834135770798, + -0.02225884236395359, + -0.03677548095583916, + 0.00960751622915268, + -0.0219934843480587, + 0.01841895841062069, + 0.03380971401929855, + 0.03462139889597893, + -0.004799855872988701, + -0.05038677901029587, + 0.027300642803311348, + 0.019761357456445694, + -0.03961636871099472, + 0.0009287525899708271, + 0.008304140530526638, + -0.00949044618755579, + -0.009958725422620773, + 0.01167574618011713, + -0.008187071420252323, + 0.0042964559979736805, + 0.005592027213424444, + -0.11045131087303162, + 0.010754798538982868, + -0.0071763694286346436, + 0.013025949709117413, + 0.028908399865031242, + -0.042020201683044434, + -0.01603073813021183, + 0.010341152548789978, + 0.013072777539491653, + -0.016811201348900795, + -0.025052905082702637, + 0.00414816802367568, + 0.010762603022158146, + 0.012549866922199726, + 0.037743255496025085, + -0.022805167362093925, + -0.04623470827937126, + 0.035589173436164856, + -0.018590660765767097, + -0.0252402164041996, + 0.02269590273499489, + 0.008304140530526638, + -0.039866119623184204, + 0.015265882946550846, + -0.0025794345419853926, + -0.02311735413968563, + -0.014649315737187862, + 0.05332132428884506, + -0.010684557259082794, + 0.011168444529175758, + 0.05444519221782684, + 0.01626487635076046, + 0.02666066214442253, + 0.027675265446305275, + -0.0022887117229402065, + 0.010044575668871403, + -0.021853001788258553, + 0.04255091771483421, + -0.005065213423222303, + 0.03746228665113449, + -0.015304905362427235, + -0.014173232018947601, + 0.012362555600702763, + 0.006696383934468031, + 0.03199903666973114, + 0.012136220932006836, + -0.05141698941588402, + -0.010622119531035423, + 0.028596213087439537, + -0.013939092867076397, + -0.047951728105545044, + -0.006126645021140575, + 0.049731187522411346, + 0.02948594279587269, + 0.009092409163713455, + 0.03126540035009384, + 0.039304185658693314, + -0.06040794029831886, + 0.002556020626798272, + 0.03983490169048309, + 0.012417187914252281, + -0.02911132015287876, + 0.024787547066807747, + 0.010528463870286942, + -0.009006558917462826, + -0.0191838126629591, + -0.02193104848265648, + 0.0010809431551024318, + -0.022883214056491852, + 0.019230641424655914, + 0.006072012707591057, + 0.02527143619954586, + -0.014961501583456993, + 0.042113855481147766, + -0.015476607717573643, + -0.010497245006263256, + -0.020198417827486992, + -0.03843006491661072, + 0.007574406452476978, + 0.030453719198703766, + -0.06843111664056778, + 0.02453779987990856, + 0.044798653572797775, + 0.002784306649118662, + -0.05478859692811966, + 0.002540411427617073, + -0.017435573041439056, + 0.004998873919248581, + 0.05154186487197876, + 0.029626427218317986, + 0.029923003166913986, + 0.024803156033158302, + -0.050730183720588684, + 0.014383957721292973, + 0.0037403753958642483, + 0.001253620837815106, + 0.00740270409733057, + -0.03977246209979057, + -0.007199783343821764, + 0.01570294238626957, + 0.008475842885673046, + 0.004799855872988701, + 0.05547540634870529, + 0.015585873275995255, + 0.014766385778784752, + 0.011472825892269611, + -0.003043810836970806, + -0.005213501863181591, + -0.005041799508035183, + -0.006583216600120068, + -0.02772209420800209, + 0.019948668777942657, + 0.015031742863357067, + -0.018668707460165024, + -0.003385264193639159, + -0.022898823022842407, + -0.02987617440521717, + -0.016936076804995537, + -0.0006146156811155379, + 0.04788929224014282, + 0.05703633278608322, + 0.021306676790118217, + -0.007418313529342413, + -0.0005853482289239764, + -0.0035784291103482246, + 0.04354991018772125, + -0.022243233397603035, + -0.017825806513428688, + 0.01877797208726406, + -0.0072739277966320515, + 0.0034496523439884186, + -0.0053149620071053505, + -0.0017462889663875103, + 0.006481756456196308, + 0.05154186487197876, + -0.014852236025035381, + -0.022368108853697777, + 0.00521740410476923, + -0.03736863285303116, + -0.03843006491661072, + -0.019199423491954803, + 0.008749005384743214, + 0.03971002623438835, + -0.026988457888364792, + -0.0008141218568198383, + 0.012300117872655392, + -0.013244479894638062, + -0.02030768245458603, + 0.03324778005480766, + 0.018106773495674133, + 0.007874885573983192, + 0.025786541402339935, + -0.001108259311877191, + 0.020791569724678993, + 0.02928302250802517, + -0.009443618357181549, + -0.0034672128967940807, + -0.027285033836960793, + -0.0028935715090483427, + -0.020682305097579956, + -0.004909120500087738, + -0.009779218584299088, + -0.007000765297561884, + 0.010138232260942459, + -0.012151829898357391, + -0.012666936032474041, + -0.010364566929638386, + -0.022352498024702072, + 0.006454440299421549, + -0.008429015055298805, + -0.01768532209098339, + -0.07879567891359329, + -0.00010274081432726234, + 0.011199663393199444, + -0.020260853692889214, + -0.004003782290965319, + 0.007707085460424423, + 0.01944917067885399, + -0.019261859357357025, + -0.0030769805889576674, + -0.03515211492776871, + -0.0038691519293934107, + -0.023632461205124855, + -0.01933990605175495, + 0.016811201348900795, + -0.0034555059392005205, + 0.022212015464901924, + 0.013634712435305119, + -0.021150583401322365, + -0.04501718282699585, + 0.004998873919248581, + -0.033278997987508774, + 0.0171233881264925, + -0.004905218258500099, + 0.011347951367497444, + -0.009053386747837067, + 0.008077805861830711, + 0.05634952709078789, + 0.0033540455624461174, + -0.0073090484365820885, + 0.010903086513280869, + -0.0024623649660497904, + -6.73760223435238e-05, + -0.011386974714696407, + 0.021119365468621254, + -0.02338271215558052, + 0.0061617661267519, + 0.014446395449340343, + 0.025224607437849045, + 0.0028564995154738426, + -0.01477419026196003, + 0.008218289352953434, + -0.0259738527238369, + -0.0020214025862514973, + -0.027441127225756645, + -0.01455566007643938, + 0.01765410415828228, + 0.0006843696464784443, + -0.0011199663858860731, + -0.017451182007789612, + 0.010489440523087978, + 0.007110030390322208, + -0.005900310352444649, + 0.008842661045491695, + -0.023242227733135223, + -0.004834976512938738, + -0.052946701645851135, + -0.008920707739889622, + -0.005467152688652277, + -0.02948594279587269, + -0.02246176451444626, + 0.003071127226576209, + -0.02072913385927677, + -0.008936316706240177, + 0.006653458345681429, + 0.05466372147202492, + -0.0069695464335381985, + -0.019901840016245842, + 0.007355876266956329, + 0.030859559774398804, + -0.01983940415084362, + 0.009677757509052753, + -0.035589173436164856, + 0.003631110303103924, + 0.0637795478105545, + -0.006602728273719549, + -0.03221756964921951, + 0.0006316883373074234, + -0.002031158423051238, + -0.004924729932099581, + -0.01346301008015871, + 0.0030633225105702877, + 0.019901840016245842, + 0.02232128009200096, + 0.007484653033316135, + 0.02057304047048092, + 0.02358563244342804, + 0.0025813858956098557, + -0.0383676253259182, + 0.016093173995614052, + -0.012237681075930595, + -0.010403589345514774, + 0.02179056406021118, + -0.03374727815389633, + 0.004027196206152439, + -0.014688339084386826, + 0.03633841872215271, + 0.025755323469638824, + 0.003562819678336382, + -0.03249853476881981, + 0.034465305507183075, + 0.008725591003894806, + 0.023632461205124855, + 0.0004936436889693141, + 0.05279060825705528, + 0.009662148542702198, + -0.015741966664791107, + 0.020947663113474846, + 0.0090768001973629, + 0.0001813360140658915, + 0.0068641840480268, + -0.01606195606291294, + 0.010036771185696125, + 0.014165427535772324, + 0.027768921107053757, + -0.0028233297634869814, + 0.009396790526807308, + 0.035464297980070114, + 0.04105242341756821, + -0.01759166643023491, + -0.04245726019144058, + -0.003139417851343751, + 0.03949149698019028, + -0.018887236714363098, + 0.0005814459291286767, + -0.014438590034842491, + 0.010692361742258072, + 0.0178570244461298, + -0.002991129644215107, + 0.01137917023152113, + -0.03752472624182701, + 0.005471054930239916, + 0.01593708246946335, + 0.000879973522387445, + 0.04682786017656326, + -0.02964203618466854, + -0.021837392821907997, + -0.012456211261451244, + 0.036057453602552414, + 0.014173232018947601, + -0.010840649716556072, + -0.04895072430372238, + 0.03527698665857315, + -0.04136461019515991, + -0.012183048762381077, + 0.01632731407880783, + -0.017872633412480354, + 0.02381977252662182, + 0.025489965453743935, + 0.014547855593264103, + -0.0014789799461141229, + -0.032810721546411514, + 0.01732630841434002, + -0.023367103189229965, + 0.005759826861321926, + -0.022446153685450554, + -0.009264111518859863, + -0.0357140488922596, + 0.040989987552165985, + -0.014688339084386826, + -0.003744277637451887, + -0.005154966842383146, + 0.0602206289768219, + -0.0010087501723319292, + 0.026738708838820457, + -0.0010906988754868507, + -0.00412475410848856, + 0.006157863885164261, + 0.014914673753082752, + 0.01059870608150959, + -0.002883815672248602, + 0.003923784475773573, + -0.021322285756468773, + 0.014641511254012585, + -0.02461584471166134, + -0.0587533563375473, + -0.0059588453732430935, + -0.01086406409740448, + 0.0024584627244621515, + 0.03309168666601181, + -0.00391012616455555, + -0.00017584837041795254, + -0.04177045077085495, + 0.04945022240281105, + 0.00453840009868145, + -0.0003377947141416371, + 0.020089151337742805, + 0.0043823071755468845, + 0.03468383476138115, + 0.029033273458480835, + -0.026176774874329567, + -0.03296681493520737, + 0.006415416952222586, + 0.014118599705398083, + -0.0137283680960536, + 0.006473951507359743, + 0.011550872586667538, + 0.04092755168676376, + -0.013486423529684544, + 0.0030886875465512276, + -0.008639739826321602, + 0.018059944733977318, + 0.03858615830540657, + -0.0001271912915399298, + -0.002655529882758856, + -0.060532815754413605, + -0.03780569136142731, + -0.015890253707766533, + 0.04436159506440163, + -0.010856258682906628, + -0.01901211217045784, + 0.007878787815570831, + -0.008889488875865936, + 0.005428129341453314, + 0.029595207422971725, + -0.020588649436831474, + -0.0006682726088911295, + -0.01235475018620491, + 0.023772943764925003, + 0.031109308823943138, + -0.02305491641163826, + -0.015031742863357067, + 0.02229006215929985, + 0.011254295706748962, + 0.009053386747837067, + 0.005307157523930073, + 0.004909120500087738, + 0.014368348754942417, + -0.0019209178863093257, + -0.007461239118129015, + -0.04873219504952431, + -0.049731187522411346, + 0.008507061749696732, + -0.0038028124254196882, + -0.03861737623810768, + -0.002179446630179882, + -0.021088145673274994, + 0.0007243684958666563, + 0.024194395169615746, + 0.025162169709801674, + 0.021181803196668625, + 0.00348282209597528, + 0.034902364015579224, + -0.047951728105545044, + 0.026207992807030678, + 0.028892790898680687, + 0.01729509048163891, + -0.008218289352953434, + 0.009849459864199162, + -0.02149398811161518, + 0.033903371542692184, + 0.0028038180898875, + 0.021525206044316292, + -0.05057409033179283, + 0.002952106297016144, + 0.031842947006225586, + -0.04120851680636406, + -0.014750775881111622, + 0.009162651374936104, + 0.0037462287582457066, + -0.014305911026895046, + -0.002146276878193021, + -0.01508637610822916, + 0.006817356217652559, + 0.03730619698762894, + 0.001015579211525619, + 0.0056115384213626385, + -0.0039218333549797535, + -0.03014153242111206, + -0.04667176678776741, + -0.013884460553526878, + 0.038273971527814865, + 0.018668707460165024, + -0.04017830267548561, + 0.01791946217417717, + 0.0015638554468750954, + 0.050168249756097794, + -0.025692885741591454, + 0.0032603899016976357, + 0.016717545688152313, + 0.011597700417041779, + -0.03176489844918251, + -0.00965434405952692, + -0.029532771557569504, + 0.0037852521054446697, + 0.028705477714538574, + 0.01548441220074892, + -0.024319268763065338, + 0.02163447067141533, + -0.011683551594614983, + -0.006224202923476696, + -0.031031262129545212, + 0.00031121016945689917, + 0.012947903014719486, + -0.03892956301569939, + -0.032841939479112625, + 0.013915679417550564, + -0.013338135555386543, + -0.0053578875958919525, + -0.016124393790960312, + 0.02653578855097294, + -0.004518888425081968, + 0.018465787172317505, + -0.06562144309282303, + 0.028237199410796165, + -0.032186347991228104, + -0.001951160840690136, + 0.0021774955093860626, + -0.02858060412108898, + -0.01980818435549736, + -0.040989987552165985, + 0.007574406452476978, + 0.048513662070035934, + 0.00209944904781878, + -0.03430921211838722, + 0.015351733192801476, + -0.009474837221205235, + 0.028408901765942574, + 0.01162891834974289, + -0.009474837221205235, + 0.02414756640791893, + 0.010200669057667255, + 0.00030755173065699637, + -0.04114608094096184, + 0.027831358835101128, + -0.020526211708784103, + 0.004772539250552654, + 0.02719137817621231, + -0.01278400607407093, + 0.005693487357348204, + -0.05357107147574425, + 0.024490971118211746, + 0.013010340742766857, + -0.007952931337058544, + 0.007492457516491413, + 0.011465021409094334, + 0.07717231661081314, + 0.0011628918582573533, + -0.0027491855435073376, + 0.02957959845662117, + -0.009615320712327957, + 0.018934065476059914, + 0.02488120272755623, + 0.04511084035038948, + -0.012393773533403873, + 0.01053626835346222, + 0.02530265413224697, + 0.03137466683983803, + 0.01924625039100647, + 0.0026438229251652956, + 0.036057453602552414, + 0.030812732875347137, + 0.03465261682868004, + 0.026941629126667976, + -0.005353985354304314, + 0.002460413845255971, + -0.003133564256131649, + -0.0009297281503677368, + -0.004070121329277754, + 0.04648445546627045, + 0.009747999720275402, + -0.01096552424132824, + -0.028627432882785797, + 0.026879191398620605, + 0.024849984794855118, + 0.02934546023607254, + -0.03271706402301788, + -0.021291067823767662, + -0.02072913385927677, + -0.029985440894961357, + 0.0007146126590669155, + -0.021056927740573883, + -0.03983490169048309, + 0.039803680032491684, + -0.021010100841522217, + -0.01344740018248558, + -0.0027218693867325783, + 0.03037567250430584, + 0.0413333922624588, + -0.023866599425673485, + -0.01096552424132824, + -0.022945651784539223, + -0.010739189572632313, + 0.06118840351700783, + 0.029954221099615097, + -0.013533251360058784, + 0.029267413541674614, + -0.037680819630622864, + 0.04826391488313675, + -0.010013357736170292, + -0.00136386149097234, + -0.01027091033756733, + -0.0009365571895614266, + -0.008772418834269047, + -0.03465261682868004, + 0.026207992807030678, + -0.007769522722810507, + 0.03427799418568611, + -0.03268584609031677, + 0.009747999720275402, + 0.0036467197351157665, + -0.02205592207610607, + -0.0017160460120067, + 0.053383760154247284, + -0.005080822855234146, + -0.0062359101139009, + -0.0032311223912984133, + -0.043737221509218216, + -0.005439836531877518, + 0.02216518670320511, + -0.032935597002506256, + 0.026816755533218384, + 0.00443693995475769, + -0.024662673473358154, + 0.005732510704547167, + -0.006052501033991575, + -0.02748795412480831, + 0.02385099045932293, + -0.006903206929564476, + 0.0006121767219156027, + 0.02686358243227005, + 0.0045579117722809315, + -0.012362555600702763, + 0.024693891406059265, + 0.018231647089123726, + -0.010957719758152962, + 0.011340146884322166, + -0.02630164846777916, + 0.049106817692518234, + 0.025115342810750008, + -0.014251278713345528, + 0.025365091860294342, + 0.0060017709620296955, + -0.011293319053947926, + 0.0147585803642869, + -0.03493358567357063, + -0.01179281622171402, + 0.008538279682397842, + -0.007172467187047005, + 0.020619867369532585, + -0.013166433200240135, + -0.010466027073562145, + -0.012549866922199726, + 0.013088387437164783, + 0.011948908679187298, + -0.02182178385555744, + 0.00824950821697712, + -0.00991970207542181, + -0.012401578016579151, + 0.01480540819466114, + -0.0008614375256001949, + 0.013837632723152637, + 0.009170455858111382, + -0.025193389505147934, + -0.01791946217417717, + -0.025927025824785233, + 0.01824725605547428, + -0.01623365841805935, + -0.018637487664818764, + 0.00048632684047333896, + 0.016015129163861275, + -0.0014370299177244306, + -0.010247496888041496, + -0.0017355575691908598, + 0.039366621524095535, + 0.008733396418392658, + 0.0023901720996946096, + -0.035526737570762634, + 0.0206666961312294, + -0.03262341022491455, + 0.013619102537631989, + 0.027768921107053757, + 0.030828341841697693, + 0.008749005384743214, + 0.030328843742609024, + -0.01841895841062069, + 0.004331577103585005, + -0.0059159197844564915, + -0.0076992809772491455, + -0.008631935343146324, + -0.005638855043798685, + -0.007874885573983192, + -0.014586878940463066, + 0.02080717869102955, + -0.025521183386445045, + 0.01436054427176714, + -0.027441127225756645, + 0.015531240031123161, + -0.030750295147299767, + -0.01868431642651558, + -0.007988052442669868, + -0.007765620015561581, + -0.004651567433029413, + 0.03182733431458473, + 0.040896330028772354, + -0.04292554035782814, + -0.028564995154738426, + 0.0023570023477077484, + 0.003990123979747295, + -0.0216969083994627, + 0.00027730874717235565, + 0.021244239062070847, + 0.03574526682496071, + -0.015624895691871643, + -0.0035725755151361227, + 0.0061617661267519, + -0.019948668777942657, + 0.009373377077281475, + 0.0004114510375075042, + -0.027316251769661903, + 0.028143543750047684, + 0.014618096873164177, + 0.03252975270152092, + 0.006407612469047308, + 0.02355441451072693, + -0.00032267323695123196, + -0.013704953715205193, + -0.037087664008140564, + -0.00516667403280735, + 0.015148812904953957, + -0.018918456509709358, + 0.004070121329277754, + 0.0005429105367511511, + -0.0024369999300688505, + 0.01580440253019333, + -0.006669067777693272, + -0.00068193074548617, + -0.00814804807305336, + 0.012019150890409946, + 0.012830833904445171, + -0.0076056248508393764, + -0.03799300268292427, + 0.03805544227361679, + -0.04439281299710274, + 0.02093205414712429, + -0.004237921442836523, + 0.0037950079422444105, + 0.0029462529346346855, + 0.04011586681008339, + 0.03736863285303116, + 0.04083389416337013, + -0.04401819035410881, + 0.014181037433445454, + -0.015531240031123161, + -0.016748765483498573, + -0.002019451465457678, + 0.011753792874515057, + -0.04657811298966408, + -0.05716120824217796, + 0.008210484869778156, + -0.008772418834269047, + 0.00209944904781878, + 0.027815749868750572, + 0.015882449224591255, + 0.005088627338409424, + -0.00938898604363203, + 0.013658125884830952, + -0.00803097803145647, + -0.0017111680936068296, + -0.018824800848960876, + 0.01673315465450287, + 0.04898194223642349, + -0.020323291420936584, + -0.015492217615246773, + 0.009349962696433067, + -0.007855373434722424, + 0.019901840016245842, + -0.012378164567053318, + 0.03162441402673721, + -0.03162441402673721, + -0.0137283680960536, + 0.010466027073562145, + 0.018340911716222763, + -0.0053149620071053505, + -0.03958515077829361, + 0.0010946012334898114, + 0.017451182007789612, + 0.019620873034000397, + 0.0023257837165147066, + -0.02984495647251606, + -0.00069754000287503, + 0.039803680032491684, + 0.010801626369357109, + -0.0006180302007123828, + 0.004374502692371607, + 0.0029969830065965652, + 0.010575291700661182, + 0.0066807749681174755, + 0.001954087521880865, + -0.02733186073601246, + -0.006548095960170031, + 0.03905443474650383, + 0.001558977528475225, + -0.021306676790118217, + -0.027503563091158867, + 0.01272156834602356, + -0.0003809641639236361, + -0.02004232443869114, + -0.017935071140527725, + -0.001567757804878056, + -0.016186829656362534, + 0.009630929678678513, + -0.014165427535772324, + 0.015258077532052994, + 0.03412190079689026, + 0.008741200901567936, + -0.005791045259684324, + -0.06918036192655563, + 0.025130951777100563, + -0.0008077805978246033, + 0.04292554035782814, + 0.018934065476059914, + 0.006489560939371586, + 0.033278997987508774, + 0.027909405529499054, + 0.005791045259684324, + -0.0016340971924364567, + 0.011824035085737705, + -0.019948668777942657, + -0.01656145416200161, + 0.011332342401146889, + -0.003244780469685793, + 0.021837392821907997, + 0.05968991294503212, + -0.027644047513604164, + 0.03123418241739273, + 0.02040133811533451, + 0.02948594279587269, + 0.025365091860294342, + 0.029002055525779724, + -0.022087140008807182, + -0.019168203696608543, + -0.008944121189415455, + 0.0203701201826334, + -0.011995736509561539, + -0.008382187224924564, + -0.0037130590062588453, + -0.03020397014915943, + 0.017529228702187538, + 0.03256097063422203, + 0.014711752533912659, + 0.012807419523596764, + -0.01579659804701805, + -0.021088145673274994, + -0.021884219720959663, + -0.011441607028245926, + 0.011176249012351036, + 0.013478619046509266, + 0.011800620704889297, + -0.006302249617874622, + 0.0007619283278472722, + 0.02517778053879738, + 0.0034008733928203583, + 0.01656145416200161, + 0.03852371871471405, + 0.007188076619058847, + -0.014781994745135307, + -0.022071531042456627, + -0.018137991428375244, + 0.004725711420178413, + -0.008062196895480156, + -0.0054008131846785545, + -0.014477613382041454, + 0.012440601363778114, + -0.018824800848960876, + -0.0012897172709926963, + -0.013057168573141098, + 0.011558677069842815, + 0.013111800886690617, + -0.012698154896497726, + -0.009037776850163937, + 0.007410509046167135, + -0.00650126812979579, + -0.016483407467603683, + 0.001725801732391119, + -0.015343928709626198, + 0.004448646679520607, + -0.02328905649483204, + -0.009584101848304272, + -0.005623245611786842, + -0.015242468565702438, + -0.007890494540333748, + 0.014430785551667213, + -0.010778212919831276, + -0.012760591693222523, + -0.0017667762003839016, + 0.004394014365971088, + -0.013158628717064857, + 0.0033657525200396776, + -0.017201434820890427, + -0.01455566007643938, + -0.006189082283526659, + 0.011441607028245926, + 0.005428129341453314, + 0.020026715472340584, + 0.004577423445880413, + 4.149265441810712e-05, + 0.03405946493148804, + -0.0028135739266872406, + -0.00881144218146801, + -0.00022779802384320647, + -0.0184501763433218, + 0.010200669057667255, + 0.003240878228098154, + 0.008413405157625675, + 0.013025949709117413, + 0.005658366717398167, + -0.006786137353628874, + -0.00751977413892746, + -0.003086736425757408, + 0.006075914949178696, + 0.011066984385251999, + 0.006438830867409706, + -0.016140002757310867, + -0.015882449224591255, + 0.0013404474593698978, + -0.027144549414515495, + 0.003990123979747295, + 0.00725441612303257, + 0.00913923792541027, + -0.0027706483379006386, + -0.051822833716869354, + 0.006868086289614439, + -0.001762873842380941, + 0.024241222068667412, + -0.024896811693906784, + -0.00990409217774868, + 0.012495233677327633, + -0.010590901598334312, + -0.014305911026895046, + 0.00959190633147955, + -0.01023188792169094, + -0.017794586718082428, + -0.03046932816505432, + 0.02054182067513466, + -0.023367103189229965, + -0.02252420037984848, + -0.0693676695227623, + 0.011558677069842815, + 0.015780989080667496, + -0.0021657885517925024, + 0.020557431504130363, + 0.015773184597492218, + -0.02033890038728714, + -0.04020952433347702, + -0.03643207624554634, + 0.020323291420936584, + 0.004483767785131931, + 0.04070901870727539, + -0.04626592621207237, + -0.026723099872469902, + -0.042051419615745544, + -0.0010253350483253598, + 0.01606195606291294, + -0.019964277744293213, + -0.03377849608659744, + 0.003361850045621395, + 0.034902364015579224, + 0.007074909284710884, + -0.04067780077457428, + 0.0191838126629591, + -0.022414935752749443, + 0.006142254453152418, + -0.01251864805817604, + 0.029751300811767578, + -0.007707085460424423, + -0.00919387023895979, + 0.013892265036702156, + -0.02030768245458603, + -0.016639498993754387, + 0.005459348205476999, + 0.047514669597148895, + 0.008819246664643288, + -0.036057453602552414, + -0.024693891406059265, + 0.0009960676543414593, + -0.01765410415828228, + 0.02193104848265648, + -0.0317336805164814, + 0.018200429156422615, + -0.017201434820890427, + -0.03415311872959137, + 0.021384723484516144, + 0.002926741261035204, + 0.024272441864013672, + -0.0034184337127953768, + -0.009630929678678513, + -0.005256427451968193, + 0.001586293801665306, + 0.01070016622543335, + 0.004202800337225199, + 0.026051899418234825, + 0.04167679697275162, + 0.04292554035782814, + -0.023273447528481483, + -0.027472345158457756, + -0.0022399327717721462, + -0.03677548095583916, + -0.02143155038356781, + -0.03185855597257614, + -0.016405360773205757, + 0.012659131549298763, + 0.005826166365295649, + -0.011987932026386261, + -0.009568492881953716, + 0.021150583401322365, + 0.01566391997039318, + -0.007761717773973942, + -0.023601241409778595, + -0.02477193810045719, + -0.007863177917897701, + -0.009279721416532993, + -0.024366097524762154, + -0.00018170184921473265, + -0.02709772251546383, + 0.026723099872469902, + 0.012042565271258354, + 0.010512854903936386, + 0.014852236025035381, + 0.011886471882462502, + 0.0031784409657120705, + -0.0057403151877224445, + 0.05684902146458626, + -0.03967880830168724, + 0.02659822441637516, + -0.002706260187551379, + -0.015874644741415977, + 0.023538803681731224, + -0.004542302340269089, + 0.004932534880936146, + -0.0163897518068552, + 0.0008243654738180339, + -0.02769087441265583, + 0.01507076621055603, + 0.0035881847143173218, + -0.02520899847149849, + -0.010107013396918774, + 0.003342338604852557, + -0.029766909778118134, + -0.019792575389146805, + -2.7301008231006563e-05, + -0.008764614351093769, + -0.011465021409094334, + 0.005435934290289879, + 0.03377849608659744, + 0.009451422840356827, + -0.00854608416557312, + 0.009154846891760826, + 0.05597490444779396, + -0.004081828519701958, + 0.005775436293333769, + 0.01567172445356846, + -0.000799488159827888, + -0.017373137176036835, + -0.00985726434737444, + -0.008912903256714344, + 0.022368108853697777, + 0.043706003576517105, + 0.0022574930917471647, + -0.037836913019418716, + 0.014001530595123768, + -0.02957959845662117, + 0.0010507000843062997, + -0.008452428504824638, + 0.008538279682397842, + 0.03596379607915878, + -0.004585227929055691, + 0.0050261905416846275, + 0.0026360182091593742, + 0.022508591413497925, + -0.013439595699310303, + 0.001441907836124301, + 0.017966289073228836, + -0.015180031768977642, + 0.0056622689589858055, + -0.0245065800845623, + -0.02573971450328827, + -0.00759391812607646, + 0.00342038506641984, + -0.003049664432182908, + -0.036681823432445526, + 0.0504804328083992, + -0.03702522814273834, + -0.018325302749872208, + -0.004866195376962423, + -0.03530820831656456, + -0.03156197816133499, + 0.003207708476111293, + -0.011917690746486187, + -0.03259219229221344, + -0.0019365272019058466, + 0.012300117872655392, + 0.00764464819803834, + 0.014618096873164177, + ], + "index": 31, + }, + { + "title": "Heart rot", + "text": "In trees, heart rot is a fungal disease that causes the decay of wood at the center of the trunk and branches. Fungi enter the tree through wounds in the bark and decay the heartwood. The diseased heartwood softens resulting in trees being structurally weaker and prone to breakage. Heart rot is a major factor in the economics of logging and the natural growth dynamic of many older forests.", + "vector": [ + -0.015310668386518955, + 0.005258948542177677, + -0.01632007770240307, + -0.00492376321926713, + -0.024703575298190117, + -0.024272071197628975, + -0.020943330600857735, + -0.06756111979484558, + 0.012582950294017792, + -0.008707123808562756, + -0.026198426261544228, + 0.06552688777446747, + -0.0003390384663362056, + 0.006179746240377426, + -0.018832044675946236, + -0.002571683842688799, + -0.014794405549764633, + 0.002344373846426606, + 0.03892777860164642, + -0.008036752231419086, + 0.019217316061258316, + -0.0011683342745527625, + -0.03516753390431404, + 0.006961846258491278, + 0.011049571447074413, + 0.010379199869930744, + 0.013191677629947662, + -0.01753753423690796, + -0.05624956265091896, + 0.05436943843960762, + 0.05310574918985367, + 0.014470777474343777, + 0.03102201782166958, + 0.031253181397914886, + -0.005551754496991634, + -0.003559903707355261, + -0.02240736037492752, + 0.08284866809844971, + -0.008969108574092388, + -0.03310248255729675, + -0.016058094799518585, + -0.0016990449512377381, + -0.013769584707915783, + 0.006187452003359795, + 0.03368809446692467, + 0.07409531623125076, + 0.02712307684123516, + -0.008344968780875206, + -0.019987858831882477, + 0.0442599281668663, + -0.0078055900521576405, + 0.05803721770644188, + -0.016936512663960457, + 0.019386835396289825, + 0.03310248255729675, + 0.009130922146141529, + 0.05702010542154312, + 0.05720503255724907, + -0.032763443887233734, + 0.029003199189901352, + -0.007062016986310482, + 0.0331641249358654, + -0.0111266253516078, + 0.004846708849072456, + 0.051071520894765854, + -0.02169846184551716, + 0.008568426594138145, + -0.003956732805818319, + -0.0694720596075058, + -0.03458192199468613, + -0.02390221133828163, + 0.025998085737228394, + -0.004850561730563641, + 0.03633875772356987, + 0.059115976095199585, + -0.039020244032144547, + 0.03424288332462311, + -0.03633875772356987, + -0.015857752412557602, + 0.011172858066856861, + -0.01134237740188837, + 0.015688233077526093, + -0.051287271082401276, + 0.02618301473557949, + -0.004916057456284761, + -0.019617997109889984, + -0.04197912663221359, + -0.03729423135519028, + -0.013669414445757866, + 0.025042613968253136, + -0.02513507753610611, + 0.025936441496014595, + 0.02861792780458927, + 0.03966749832034111, + 0.04009900242090225, + -0.013908281922340393, + -0.01417797151952982, + 0.0111266253516078, + -0.010941695421934128, + -0.027708688750863075, + 0.001927318051457405, + 0.008992224000394344, + -0.015295257791876793, + -0.011758469976484776, + -0.02740047127008438, + -0.04626333713531494, + -0.027508346363902092, + 0.05455436930060387, + 0.023671047762036324, + 0.05797557532787323, + 0.025813154876232147, + -0.0027546873316168785, + 0.03522917628288269, + -0.01642795465886593, + -0.0050701661966741085, + 0.007146776653826237, + 0.058561187237501144, + -0.020989563316106796, + -0.021945035085082054, + 0.030806267634034157, + -0.05584888160228729, + -0.04059214890003204, + -0.02031148597598076, + 0.02246900275349617, + 0.003656221553683281, + -0.01930978149175644, + -0.05782146751880646, + -0.020665934309363365, + -0.014624886214733124, + 0.029974080622196198, + -0.02223784103989601, + 0.0021247693803161383, + 0.05840707942843437, + 0.025427883490920067, + 0.0019234652863815427, + 0.0008760098717175424, + -0.002265393268316984, + 0.052335210144519806, + 0.006792327389121056, + -0.03217783197760582, + -0.021313190460205078, + -0.041362691670656204, + -0.05902351438999176, + 0.055016692727804184, + 0.006364676635712385, + -0.03334905579686165, + -0.052119456231594086, + 0.011165152303874493, + -0.008005931042134762, + -0.03421206399798393, + 0.0208662748336792, + 0.01253671757876873, + 0.047064702957868576, + 0.044074997305870056, + 0.021482709795236588, + -0.03905106708407402, + -0.012143741361796856, + 0.0036774114705622196, + -0.060780350118875504, + -0.020650524646043777, + -0.046848949044942856, + 0.037756554782390594, + -0.05513998121023178, + -0.028772035613656044, + 0.002806698903441429, + -0.0375099815428257, + -0.02351693995296955, + -0.08167744427919388, + -0.01726013980805874, + 0.008776472881436348, + -0.04231816157698631, + 0.021282369270920753, + 0.00432659313082695, + 0.021004972979426384, + -0.054061222821474075, + -0.03723258525133133, + -0.016597473993897438, + 0.00926961936056614, + -0.007335559464991093, + 0.0010777955176308751, + -0.010340672917664051, + -0.05677352845668793, + 0.033040840178728104, + 0.009446844458580017, + 0.03578396886587143, + 0.005497816950082779, + -0.05948583781719208, + 0.05671188607811928, + -0.011411726474761963, + -0.04077707976102829, + -0.029434701427817345, + -0.0045076701790094376, + -0.013299553655087948, + -0.04250309243798256, + 0.008206271566450596, + -0.023177901282906532, + -0.016998155042529106, + -0.04937632754445076, + 0.04894482344388962, + -0.040191467851400375, + 0.034027133136987686, + -0.012814112938940525, + 0.018939921632409096, + 0.05362971872091293, + 0.044753074645996094, + -0.006287622265517712, + 0.057729002088308334, + -0.06688304245471954, + 0.015326078981161118, + 0.020958740264177322, + 0.02080463245511055, + -0.015295257791876793, + -0.009539308957755566, + 0.01741424761712551, + -0.01852382905781269, + 0.0003814182709902525, + -0.005890793167054653, + 0.03787984326481819, + 0.008005931042134762, + 0.031099073588848114, + 0.03301001712679863, + -0.000785952783189714, + -0.018955331295728683, + -0.002159443683922291, + -0.05159548670053482, + -0.012598360888659954, + -0.031314823776483536, + -0.01131926104426384, + -0.02142106555402279, + 0.0008986445609480143, + -0.027492936700582504, + 0.040807902812957764, + -0.0020631260704249144, + -0.016011862084269524, + -0.066574826836586, + -0.0012049349024891853, + -0.009670301340520382, + -0.024718984961509705, + 0.04037639871239662, + -0.06466387957334518, + -0.007389497011899948, + 0.061766643077135086, + -0.031222360208630562, + 0.003365342039614916, + -0.004896793980151415, + -0.00948537141084671, + -0.03399631008505821, + 0.009832114912569523, + -0.030713802203536034, + -0.01813855767250061, + 0.007998225279152393, + -0.033811379224061966, + 0.05279753357172012, + 0.0016788182547315955, + -0.05609545484185219, + -0.036646973341703415, + 0.04111611843109131, + 0.011373198591172695, + 0.002436838811263442, + 0.047958530485630035, + -0.012051275931298733, + 0.06521867215633392, + -0.02174469269812107, + -0.036801084876060486, + -0.01370023563504219, + -0.054122865200042725, + -0.014748172834515572, + 0.019063208252191544, + -0.002452249638736248, + 0.03821888193488121, + 0.04481472074985504, + 0.0152567308396101, + -0.015079505741596222, + -0.02091250754892826, + 0.009416022337973118, + -0.0008639701409265399, + 0.03556821495294571, + 0.03945174813270569, + -0.019818339496850967, + 0.03396548703312874, + 0.0093466741964221, + -0.017845751717686653, + 0.0034385432954877615, + 0.0471571683883667, + 0.018123146146535873, + 0.016119737178087234, + 0.020558059215545654, + -0.000841335509903729, + 0.010240502655506134, + 0.04154762253165245, + 0.02052723802626133, + -0.0011269175447523594, + 0.0458318330347538, + -0.07366380840539932, + 0.0401606447994709, + -0.03612300753593445, + 0.009616363793611526, + -0.011404020711779594, + -0.03535246476531029, + 0.010363789275288582, + -0.011796996928751469, + -0.000660739722661674, + -0.009076983667910099, + 0.007466551382094622, + -0.010633478872478008, + 0.04897564649581909, + -0.03223947435617447, + 0.012082098051905632, + -0.007065869402140379, + 0.013523011468350887, + -0.010725943371653557, + -0.02485768310725689, + -0.013623181730508804, + 0.008491371758282185, + 0.015611180104315281, + -0.021713871508836746, + -6.772341293981299e-05, + -0.0006631476571783423, + 0.006310738623142242, + 0.0320853665471077, + 0.0031091368291527033, + -0.023285778239369392, + -0.037417516112327576, + -0.007115954998880625, + 0.024040909484028816, + -0.011242207139730453, + 0.0060641649179160595, + -0.014933102764189243, + 0.007123660296201706, + -0.032979194074869156, + 0.007008078973740339, + -0.0018859014380723238, + 0.04376678168773651, + 0.04364349693059921, + -0.03624629229307175, + -0.015287552028894424, + 0.004580871667712927, + -0.033811379224061966, + 0.009909169748425484, + -0.01642795465886593, + -0.0020900950767099857, + -0.03190043568611145, + -0.0270151998847723, + -0.008136922493577003, + -0.0208662748336792, + -0.033194947987794876, + -0.01753753423690796, + -0.006179746240377426, + -0.026999790221452713, + 0.010309850797057152, + 0.0006867455085739493, + 0.009909169748425484, + -0.006268358789384365, + 0.03624629229307175, + 0.0029376910533756018, + 0.005767506547272205, + -0.02545870654284954, + -0.009277325123548508, + -0.007801737170666456, + -0.0008504856959916651, + 0.06207485869526863, + -0.032424405217170715, + 0.012251616455614567, + -0.01489457581192255, + -0.013515305705368519, + 0.024950148537755013, + 0.028155602514743805, + 0.027261773124337196, + 0.0035965044517070055, + 0.012698531150817871, + 0.001541083911433816, + 0.03427370637655258, + 0.06990356743335724, + 0.02724636346101761, + 0.028479229658842087, + -0.05131809413433075, + -0.0018338898662477732, + -0.02152894251048565, + -0.01151189673691988, + 0.0005345634999684989, + 0.03227029740810394, + -0.034366171807050705, + -0.010309850797057152, + 0.0034770704805850983, + 0.006364676635712385, + -0.020773811265826225, + -0.016951922327280045, + -0.013338080607354641, + 0.025551170110702515, + 0.03439699113368988, + -0.016782402992248535, + 0.040314752608537674, + 0.009331262670457363, + 0.020789220929145813, + 0.03985242918133736, + -0.0610269233584404, + -0.05430779606103897, + -0.0035213767550885677, + 0.0013542274245992303, + -0.05436943843960762, + 0.006676746066659689, + -0.007385644596070051, + 0.047249630093574524, + 0.011827819049358368, + 0.008468256331980228, + -0.013931398279964924, + -0.0003664890246000141, + -0.0058060334995388985, + -0.002097800374031067, + 0.07372545450925827, + -0.0033306675031781197, + 0.06602003425359726, + 0.016551241278648376, + -0.012282438576221466, + -0.013422840274870396, + 0.00790575984865427, + -0.004511523060500622, + -0.016844047233462334, + 0.038804493844509125, + 0.024842271581292152, + -0.08537604659795761, + -0.002097800374031067, + -0.03562986105680466, + 0.012120625004172325, + -0.030436405912041664, + 0.024503232911229134, + -0.006776916328817606, + -0.0017655042465776205, + 0.024826861917972565, + 0.008329558186233044, + 0.005883087869733572, + -0.017599178478121758, + 0.04755784943699837, + 0.031715504825115204, + 0.0264141783118248, + -0.02114367112517357, + 0.013422840274870396, + -0.015603474341332912, + 0.003199675353243947, + 0.0857459083199501, + 0.01841595210134983, + 0.008853526785969734, + -0.016165969893336296, + -0.024873094633221626, + -0.0016961554065346718, + -0.018493006005883217, + 0.005139514803886414, + 0.00012966776557732373, + -0.0030860204715281725, + -0.013076096773147583, + -0.011866346001625061, + -0.0016470333794131875, + -0.0037621711380779743, + 0.03621547296643257, + 0.013253320939838886, + -0.006692156661301851, + -0.02402549795806408, + -0.050732482224702835, + 0.008637774735689163, + 0.03180797025561333, + 0.00995540153235197, + 0.010371494106948376, + -0.018123146146535873, + -0.004195600748062134, + 0.015071799978613853, + -0.019710462540388107, + 0.02046559378504753, + 0.037972308695316315, + -0.014355196617543697, + -0.0075859855860471725, + 0.01608891598880291, + -0.044753074645996094, + -0.08660891652107239, + 0.025751512497663498, + 0.03205454349517822, + 0.001989924581721425, + 0.0010094098979607224, + 0.0010383052285760641, + 0.02075839973986149, + -0.05803721770644188, + 0.011088098399341106, + 0.01779951900243759, + -0.004006817936897278, + -0.00428806571289897, + 0.005289770197123289, + -0.043859247118234634, + 0.03205454349517822, + -0.012814112938940525, + 0.020450182259082794, + -0.00932355783879757, + 0.007119807414710522, + 0.03199290111660957, + -0.027893617749214172, + -0.05199617147445679, + -0.007797884289175272, + -0.017460480332374573, + -0.03985242918133736, + -0.007343264762312174, + -0.010394610464572906, + 0.030420996248722076, + 0.056557778269052505, + -0.02313166856765747, + -0.007289326749742031, + -0.007844116538763046, + -0.009531604126095772, + 0.009886053390800953, + 0.01980292797088623, + 0.04062297195196152, + 0.005983258131891489, + 0.01198192685842514, + 0.011866346001625061, + -0.043581850826740265, + -0.022700166329741478, + -0.01698274351656437, + -0.006383940111845732, + 0.0152567308396101, + 0.012875756248831749, + -0.00879188347607851, + 0.03661615401506424, + 0.03096037544310093, + 0.011172858066856861, + -0.002633327152580023, + -0.02057347074151039, + 0.005574870854616165, + -0.06004062667489052, + 0.0375099815428257, + -0.05131809413433075, + 0.00021647413086611778, + 0.013569243252277374, + 0.001305105397477746, + 0.03707847744226456, + 0.033287413418293, + 0.01350759994238615, + 0.025397062301635742, + 0.021344011649489403, + -0.010656595230102539, + -0.017121441662311554, + 0.036307934671640396, + -0.008776472881436348, + -0.007859528064727783, + 0.02579774335026741, + 0.021004972979426384, + -0.024950148537755013, + -0.0200186800211668, + -0.0320853665471077, + 0.00848366692662239, + 0.007474256679415703, + 0.0018021049909293652, + -0.06349265575408936, + -0.0010768324136734009, + 0.02447241172194481, + -0.030328530818223953, + 0.030867910012602806, + 0.022592289373278618, + 0.005833002272993326, + -0.007289326749742031, + -0.010340672917664051, + 0.005366824567317963, + -0.004550050012767315, + 0.00635311845690012, + 0.010479370132088661, + 0.0034462488256394863, + 0.006341560278087854, + 0.004623251501470804, + -0.031592220067977905, + 0.010140332393348217, + 0.021513530984520912, + -0.03347234055399895, + -0.01472505647689104, + 0.004342003725469112, + 0.05421533063054085, + -0.0166437067091465, + -0.010733649134635925, + -0.012159151956439018, + 0.015249025076627731, + 0.019571764394640923, + -0.01067971158772707, + -0.03202372416853905, + -0.025320008397102356, + -0.0173063725233078, + -0.015156559646129608, + -0.011719943024218082, + -0.03766408935189247, + 0.016674527898430824, + -0.00610269233584404, + -0.017845751717686653, + -0.02424125000834465, + 0.0156497061252594, + -0.018955331295728683, + -0.0027392765041440725, + 0.009770471602678299, + 0.026984378695487976, + -0.021513530984520912, + 0.03538328409194946, + 0.03411959856748581, + 0.023455297574400902, + -0.0072700632736086845, + -0.012267027981579304, + -0.0011384757235646248, + 0.030929554253816605, + 0.004769654478877783, + 0.0005177078419364989, + 0.02763163484632969, + 0.020604291930794716, + 0.031083662062883377, + -0.02552034892141819, + 0.04200994595885277, + -0.025397062301635742, + -0.012251616455614567, + 0.029557988047599792, + 0.06213650107383728, + 0.010479370132088661, + 0.00643402524292469, + 0.0009882199810817838, + 0.02219160832464695, + -0.009408317506313324, + -0.04117776080965996, + -0.004083872307091951, + 0.040191467851400375, + -0.08778014034032822, + -3.121296686003916e-05, + -0.003261318663135171, + -0.017075208947062492, + 0.03649286553263664, + -0.03985242918133736, + 0.013245616108179092, + -0.022006677463650703, + 0.018770402297377586, + -0.00703119533136487, + -0.030467228963971138, + 0.02740047127008438, + 0.048790715634822845, + -0.014124033972620964, + -0.03140728920698166, + -0.030590515583753586, + 0.011951105669140816, + -0.02723095193505287, + -0.0033306675031781197, + -0.0016807445790618658, + -0.011612066999077797, + 0.020450182259082794, + 0.021066617220640182, + 0.027385059744119644, + -0.06361594051122665, + -0.011727648787200451, + -0.013453662395477295, + 0.027878208085894585, + 0.011311555281281471, + 0.042749665677547455, + -0.00027113445685245097, + -0.030374763533473015, + -0.012444252148270607, + -0.013091507367789745, + 0.012159151956439018, + 0.006029490847140551, + 0.01222850102931261, + 0.010024750605225563, + -0.06145842373371124, + -0.022006677463650703, + -0.01980292797088623, + 0.010047866962850094, + 0.006846264936029911, + -0.013515305705368519, + 0.01836971938610077, + 0.0012993263080716133, + -0.00421486422419548, + 0.006464846897870302, + -0.024549465626478195, + -0.003569535445421934, + -0.0026391062419861555, + -0.02724636346101761, + -0.024888504296541214, + 0.011003338731825352, + 0.01048707589507103, + 0.0018377425149083138, + -0.01670534908771515, + 0.012197678908705711, + -0.0013783068861812353, + 0.002563978312537074, + -0.0037640973459929228, + 0.023393653333187103, + -0.03223947435617447, + 0.026722393929958344, + 0.001243462087586522, + -0.03239358216524124, + -0.008899759501218796, + 0.00481203431263566, + 0.004137810319662094, + -0.02917271852493286, + -0.04382842406630516, + 0.02118990384042263, + -0.018554650247097015, + 0.0029588809702545404, + -0.020111145451664925, + -0.03072921186685562, + 0.0017529829638078809, + -0.0040222289972007275, + -0.03988325223326683, + 0.00048471902846358716, + -0.008945992216467857, + 0.008868937380611897, + 0.010672005824744701, + -0.0375099815428257, + -0.02102038450539112, + -0.017891984432935715, + 9.902668352879118e-06, + -0.01101104449480772, + -0.006888644769787788, + 0.02330118790268898, + -0.029665865004062653, + -0.022792629897594452, + 0.016828635707497597, + -0.05261260271072388, + -0.008260210044682026, + 0.026383355259895325, + -0.0064802574925124645, + 0.00599096342921257, + 0.014540126547217369, + -0.05742078647017479, + 0.0034423961769789457, + -0.011396314948797226, + 0.04176337271928787, + 0.011496486142277718, + 0.0015613106079399586, + -0.00859924778342247, + -0.020665934309363365, + -0.002718086587265134, + -0.007998225279152393, + -0.03430452570319176, + 0.013268732465803623, + 0.017891984432935715, + -0.003018598072230816, + -0.027107665315270424, + 0.007770915515720844, + -0.025058023631572723, + 0.02380974590778351, + 0.03174632787704468, + 0.003005113685503602, + 0.006626660469919443, + 0.012721647508442402, + 0.005440026056021452, + -0.008198565803468227, + -0.0008861232199706137, + -0.008499077521264553, + -0.013738762587308884, + 0.022391948848962784, + -0.05036262050271034, + -0.005397646222263575, + 0.03874284774065018, + 0.047126345336437225, + 0.008622364141047001, + 0.04090036451816559, + -0.018292665481567383, + 0.008861232548952103, + 0.024888504296541214, + 0.023455297574400902, + -0.020003268495202065, + -0.05144137889146805, + 0.038712028414011, + 0.026321712881326675, + -0.012082098051905632, + 0.02763163484632969, + 0.0011760396882891655, + 0.0165820624679327, + 0.04453732445836067, + 0.019448477774858475, + -0.02601349540054798, + 0.006310738623142242, + 0.003623473457992077, + -0.008468256331980228, + -0.00751663651317358, + -0.005443878937512636, + -0.016397131606936455, + -0.025705279782414436, + -0.044568147510290146, + -0.008406613022089005, + 0.02142106555402279, + -0.00898451916873455, + 0.025998085737228394, + -0.03754080459475517, + -0.06303033232688904, + 0.008737945929169655, + -0.012914283201098442, + -0.008614659309387207, + 0.025890208780765533, + -0.02852546237409115, + -0.0010585320414975286, + -0.0018849382176995277, + -0.03405795246362686, + 0.020897097885608673, + -0.036523688584566116, + -0.022653933614492416, + 0.0038970159366726875, + -0.017876572906970978, + 0.013877460733056068, + 0.0031033577397465706, + -0.02174469269812107, + -0.017784107476472855, + -0.010001634247601032, + 0.016551241278648376, + 0.027508346363902092, + 0.011927989311516285, + -0.029326826333999634, + 0.013523011468350887, + 0.002423354424536228, + -0.00575594836845994, + -0.0104331374168396, + -0.041301049292087555, + -0.0043073296546936035, + -0.004368972964584827, + -0.020265253260731697, + 0.0442599281668663, + -0.0050123753026127815, + 0.001502556842751801, + 0.006210567895323038, + 0.012713941745460033, + 0.014686529524624348, + 0.010217386297881603, + 0.0304518174380064, + 0.008375790901482105, + -0.04943796992301941, + -0.025212131440639496, + -0.013607771135866642, + 0.019664229825139046, + 0.04493800550699234, + 0.04487636312842369, + 0.0249655582010746, + 0.013523011468350887, + -0.002411796245723963, + 0.014154855161905289, + 0.025042613968253136, + 0.02545870654284954, + 0.03784902021288872, + -0.03430452570319176, + 0.023332009091973305, + -0.016520420089364052, + 0.004395941738039255, + 0.029557988047599792, + -0.022823452949523926, + 0.026105960831046104, + -0.02795526199042797, + -0.06429401785135269, + -0.006645924411714077, + 0.001257909694686532, + -0.005474700592458248, + 0.0016046535456553102, + -0.024564877152442932, + 0.002702675759792328, + -0.05646531283855438, + -0.03017442300915718, + 0.033533986657857895, + -0.030374763533473015, + -0.010371494106948376, + 0.03538328409194946, + 0.02690732479095459, + 0.009716534055769444, + -0.003295993199571967, + 0.013546126894652843, + 0.0093158520758152, + 0.006341560278087854, + -0.02041936106979847, + -0.01880122348666191, + -0.01272935327142477, + 0.019648820161819458, + 0.002610210794955492, + 0.01992621459066868, + -0.005366824567317963, + 0.026676161214709282, + 0.012359492480754852, + -0.009023046121001244, + -0.03559903800487518, + 0.00776706263422966, + 0.012783290818333626, + 0.0006424393504858017, + -0.052951641380786896, + -0.03313330188393593, + 0.011134331114590168, + 0.030251476913690567, + 0.02968127466738224, + 0.03926681727170944, + 0.048297569155693054, + 0.024934737011790276, + -0.011927989311516285, + 0.009855231270194054, + -0.009439138695597649, + -0.04521540179848671, + 0.01779951900243759, + -0.022715575993061066, + -0.033533986657857895, + -0.028540873900055885, + -0.016720760613679886, + 0.03661615401506424, + -0.015125738456845284, + 0.002038083504885435, + 0.010086393915116787, + 0.05541737750172615, + 0.06108856573700905, + -0.004141662735491991, + -0.013584654778242111, + 0.01134237740188837, + 0.01162747759371996, + -0.016458775848150253, + -0.03452027961611748, + -0.016628295183181763, + 0.04127022624015808, + 0.03285590931773186, + 0.026814859360456467, + -0.0051703364588320255, + -0.002500408561900258, + -0.04543115198612213, + -0.04586265608668327, + -0.02408714033663273, + 0.003868120489642024, + 0.0078248530626297, + 0.021621406078338623, + -0.01284493412822485, + 0.0020708313677459955, + 0.016227614134550095, + 0.0036061361897736788, + 0.010764471255242825, + -0.022099142894148827, + 0.019833749160170555, + -0.0264141783118248, + 0.021821748465299606, + -0.019232727587223053, + -0.0038796786684542894, + 0.007497373037040234, + -0.004195600748062134, + 0.02323954552412033, + -0.0008644517511129379, + 0.03926681727170944, + -0.038588739931583405, + -0.022607700899243355, + 0.048513319343328476, + 0.016181381419301033, + 0.014293553307652473, + 0.03627711534500122, + 0.013623181730508804, + -0.024272071197628975, + -0.03174632787704468, + -0.02046559378504753, + 0.05665024369955063, + 0.0019032385898754, + 0.012906577438116074, + -0.0045962827280163765, + 0.0035521984100341797, + -0.0015266361879184842, + -0.033040840178728104, + -0.003511744784191251, + -0.017075208947062492, + 0.0047272746451199055, + -0.00809839554131031, + -0.058992691338062286, + -0.023994676768779755, + 0.0005066313315182924, + 0.029927849769592285, + -0.0001914315071189776, + 0.01836971938610077, + -0.047064702957868576, + -0.036153826862573624, + -0.03988325223326683, + 0.0019677714444696903, + -0.04949961602687836, + -0.01553412526845932, + 0.003717864863574505, + -0.025058023631572723, + 0.003469365183264017, + -0.04808181896805763, + -0.003852709662169218, + 0.012644593603909016, + 0.004422910511493683, + 0.005752095486968756, + -0.05131809413433075, + -0.010356083512306213, + 0.007443435024470091, + 0.029496345669031143, + 0.018616292625665665, + 0.008368085138499737, + 0.009801293723285198, + 0.03695519268512726, + 0.013923692516982555, + 0.02380974590778351, + 0.01758376695215702, + -0.00033711211290210485, + -0.008167744614183903, + 0.01303756982088089, + 0.017075208947062492, + 0.03282508626580238, + -0.001972587313503027, + 0.028263477608561516, + -0.014077801257371902, + 0.02780115231871605, + -0.027986083179712296, + 0.0019225021824240685, + -0.004839003551751375, + -0.031160715967416763, + -0.04093118757009506, + 0.010964811779558659, + -1.0948618182737846e-05, + 0.005197305232286453, + 0.018385130912065506, + -0.013915987685322762, + -0.0010922432411462069, + -0.04250309243798256, + -0.024318303912878036, + 0.011997338384389877, + 0.018231023102998734, + 0.006133513990789652, + 0.024780629202723503, + -0.02462651953101158, + -0.008190860971808434, + 0.010055572725832462, + -0.028710393235087395, + -0.0036523689050227404, + -0.0069811102002859116, + 0.05008522793650627, + 0.02307002618908882, + -0.017876572906970978, + -0.06145842373371124, + 0.0360613614320755, + 8.871767022355925e-06, + 0.0064378781244158745, + -0.016289256513118744, + 0.040253110229969025, + -0.020511826500296593, + 0.019556354731321335, + -0.002113211201503873, + 0.015464777126908302, + -0.029111074283719063, + -0.011635183356702328, + 0.01835430972278118, + 0.010078688152134418, + -0.008622364141047001, + -0.04577019065618515, + -0.04111611843109131, + 0.029265182092785835, + -0.01470194011926651, + -0.01702897623181343, + 0.03538328409194946, + 0.017321782186627388, + -0.025212131440639496, + 0.011118920519948006, + 0.01852382905781269, + 0.015272141434252262, + 0.007104396820068359, + -0.005790622904896736, + 0.02080463245511055, + -0.041362691670656204, + 0.03267097845673561, + -0.05908515676856041, + -0.01403927430510521, + -0.025643635541200638, + 0.002949249232187867, + -0.03538328409194946, + -0.025258364155888557, + 0.033811379224061966, + -0.013029864057898521, + -0.0045962827280163765, + 0.012413430958986282, + 0.011689120903611183, + -0.017568355426192284, + -0.006769211031496525, + 0.001219382626004517, + -0.008714829571545124, + -0.04999276250600815, + 0.015210498124361038, + -0.006846264936029911, + -0.01095710601657629, + 0.006749947555363178, + 0.014046979136765003, + 0.01741424761712551, + 0.005185747053474188, + 0.0057058632373809814, + -0.053568076342344284, + -0.006973404437303543, + 0.012914283201098442, + -0.012128329835832119, + -0.017398837953805923, + -0.021960444748401642, + -0.01903238520026207, + 0.017999859526753426, + 0.0003970699035562575, + -0.012112919241189957, + -0.016273844987154007, + -0.016381721943616867, + -0.00022116961190477014, + -0.010232796892523766, + -0.02518131025135517, + 0.01232096552848816, + -0.00984752643853426, + 0.007119807414710522, + -0.014486188068985939, + -0.036153826862573624, + 0.02263852208852768, + 0.003419279819354415, + 0.007038900628685951, + 0.016674527898430824, + 0.012274732813239098, + -0.03926681727170944, + -0.007967404089868069, + 0.0047272746451199055, + 0.03834216669201851, + -0.0020091880578547716, + -0.036585330963134766, + -0.002766245510429144, + 0.011858640238642693, + -0.0010296367108821869, + 0.045122936367988586, + -0.013707941398024559, + -0.04167090728878975, + -0.013214793987572193, + -0.016104325652122498, + 0.0024195017758756876, + 0.004873677622526884, + 0.019001564010977745, + 0.037972308695316315, + -0.0015747951110824943, + 0.052181098610162735, + -0.00649181567132473, + -0.028864501044154167, + 0.0020265253260731697, + 0.007154481951147318, + 0.00471571646630764, + -0.028432996943593025, + -0.03211618959903717, + 0.0027238656766712666, + -0.017121441662311554, + 0.02929600514471531, + 0.010070983320474625, + -0.030081957578659058, + 0.008491371758282185, + -0.0005331187276169658, + 0.06768440455198288, + 0.0015613106079399586, + -0.017244728282094002, + 0.03455109894275665, + 0.05248931795358658, + 0.006152777466922998, + -0.01506409514695406, + 0.004842855967581272, + 0.005455437116324902, + -0.017352605238556862, + 0.018785811960697174, + -0.005817591678351164, + -0.014848343096673489, + -0.01284493412822485, + 0.0026660750154405832, + 0.018123146146535873, + -0.00140046002343297, + 0.028602516278624535, + -0.019617997109889984, + 0.034088775515556335, + 0.0304518174380064, + -0.0032362760975956917, + 0.009285029955208302, + 0.017660820856690407, + -0.016720760613679886, + -0.02075839973986149, + -0.006114250514656305, + 0.009446844458580017, + -0.03926681727170944, + 0.03083708882331848, + -0.012814112938940525, + 9.944807243300602e-05, + 0.01963340863585472, + -0.0389586016535759, + -0.0030609779059886932, + -0.03979078680276871, + 0.007928876206278801, + 0.0044691432267427444, + 0.01541854441165924, + -0.01350759994238615, + 0.009593247435986996, + 0.03211618959903717, + 0.008036752231419086, + 0.00998622365295887, + 0.016766993328928947, + 0.017845751717686653, + 0.030251476913690567, + -0.04043804109096527, + 0.014601769857108593, + 0.03479767590761185, + 0.020511826500296593, + 0.014085507020354271, + 0.0048813833855092525, + 0.03362645208835602, + 0.03787984326481819, + 0.0320853665471077, + 0.01536460593342781, + 0.017337193712592125, + 0.007828705944120884, + 0.0029357648454606533, + -0.004557755775749683, + -0.008352674543857574, + -0.02307002618908882, + 0.013885165564715862, + -0.016890279948711395, + -0.011719943024218082, + -0.007670745253562927, + 0.002382901031523943, + -0.0033075513783842325, + 0.0100093400105834, + -0.00317655922845006, + 0.014948513358831406, + 0.004546197596937418, + 0.016381721943616867, + -0.011296144686639309, + -0.054400261491537094, + 0.008553015999495983, + 0.03126859292387962, + 0.007493520155549049, + -0.022314894944429398, + 0.011396314948797226, + -0.005205010995268822, + -0.01439372356981039, + -0.00016759286518208683, + -0.0005384162068367004, + 0.019510122016072273, + -0.00525509612634778, + 0.011165152303874493, + 0.02473439648747444, + 0.00033542653545737267, + -0.015796110033988953, + 0.003914352972060442, + -0.0010845378274098039, + 0.014108623377978802, + 0.012636887840926647, + -0.022037498652935028, + -0.019602587446570396, + -0.017044387757778168, + -0.01830807700753212, + 0.008499077521264553, + 0.02639876678586006, + 0.013769584707915783, + -0.01598103903234005, + -0.01472505647689104, + -0.034859318286180496, + -0.006965699139982462, + -0.006387792527675629, + 0.029712097719311714, + 0.021559763699769974, + 0.00984752643853426, + 0.008915170095860958, + 0.00658813351765275, + -0.006079575978219509, + 0.024179605767130852, + 0.008506783284246922, + 0.006526490207761526, + -0.017660820856690407, + 0.012860344722867012, + -0.039698321372270584, + -0.007801737170666456, + -0.0010489001870155334, + 0.015387722291052341, + 0.019772106781601906, + -0.00859924778342247, + 0.03000490367412567, + 0.012945104390382767, + -0.004688747692853212, + 0.01079529244452715, + -0.021390244364738464, + -0.033657271414995193, + 0.008568426594138145, + 0.019849160686135292, + -0.009939990937709808, + 0.016335489228367805, + -0.08223223686218262, + -0.0017106031300500035, + -0.007882644422352314, + -0.0008938286337070167, + 0.017830340191721916, + -0.008907465264201164, + -0.009107805788516998, + 0.047249630093574524, + -0.028371354565024376, + 0.020450182259082794, + -0.039297640323638916, + -0.02102038450539112, + 0.026367945596575737, + 0.008838116191327572, + -0.003035935340449214, + -0.041424334049224854, + -0.004646367859095335, + 0.005378382746130228, + -0.018015271052718163, + -0.004650220740586519, + 0.002036157064139843, + -0.040962010622024536, + -0.015526420436799526, + 0.010764471255242825, + -0.034643564373254776, + -0.0034462488256394863, + 0.005621103569865227, + -0.0334106981754303, + -0.045801013708114624, + 0.011088098399341106, + 0.014948513358831406, + -0.0006655555916950107, + 0.004623251501470804, + -0.0006775953224860132, + 0.0001058893176377751, + -0.00583685515448451, + 0.005297475960105658, + -0.029604220762848854, + -0.03812641650438309, + 0.032979194074869156, + -0.02624465897679329, + 0.020003268495202065, + 0.013962220400571823, + -0.01370023563504219, + -0.018446773290634155, + -0.003956732805818319, + -0.029527166858315468, + -0.0035676092375069857, + 0.013322670012712479, + 0.030220655724406242, + 0.062383074313402176, + -0.032486047595739365, + 0.005597987212240696, + 0.0022596141789108515, + -0.013777289539575577, + 0.021390244364738464, + -0.008637774735689163, + -0.015888575464487076, + 0.006068017799407244, + -0.005370677448809147, + -0.036369580775499344, + 0.0039027950260788202, + -0.014786699786782265, + -0.023732692003250122, + 0.012251616455614567, + -0.017938217148184776, + -0.06842412799596786, + 0.022838862612843513, + 0.012243911623954773, + -0.014532420784235, + 0.014925397001206875, + -0.03396548703312874, + -0.023054614663124084, + 0.033256590366363525, + -0.004446026869118214, + -0.005020080599933863, + -0.00023284814960788935, + 0.01370023563504219, + -0.016674527898430824, + 0.01389287132769823, + 0.03301001712679863, + -0.0039644381031394005, + 0.01986457034945488, + -0.021266957744956017, + -0.019879981875419617, + 0.0026641488075256348, + 0.006511079613119364, + -0.02989702671766281, + -0.004711864050477743, + 0.020003268495202065, + -0.004719569347798824, + 0.0414859764277935, + -0.004322740249335766, + 0.07575968652963638, + -0.0022056763991713524, + 0.01813855767250061, + 0.015672823414206505, + 0.01753753423690796, + -0.028694981709122658, + 0.023147080093622208, + 0.00122708803974092, + 0.0022904358338564634, + 0.011596656404435635, + 0.048235926777124405, + 0.015657411888241768, + -0.029912438243627548, + 0.03707847744226456, + -0.005509374663233757, + -0.009724238887429237, + -0.04336610063910484, + 0.0071429237723350525, + -0.015025568194687366, + -0.02863333933055401, + 0.024225838482379913, + -0.03145352378487587, + 0.010463959537446499, + -0.026706984266638756, + -0.003569535445421934, + 0.0034462488256394863, + 0.011519601568579674, + -0.016674527898430824, + -0.04111611843109131, + 0.06207485869526863, + -0.017999859526753426, + 0.0015921322628855705, + -0.022653933614492416, + -0.0004433024150785059, + 0.0019513975130394101, + 0.002845226088538766, + -0.0007088985876180232, + -0.0025890208780765533, + -0.006422467064112425, + 0.0029357648454606533, + -0.003215086180716753, + -0.006811590865254402, + 0.0017558723920956254, + 0.042133234441280365, + 0.007828705944120884, + 0.008707123808562756, + 0.018061503767967224, + 0.005405351519584656, + 0.02169846184551716, + -0.005185747053474188, + 0.024980969727039337, + 0.014470777474343777, + -0.01636631041765213, + 0.026337124407291412, + 0.01924813725054264, + 0.044629789888858795, + -0.005817591678351164, + 0.025504937395453453, + -0.023100847378373146, + -0.037355873733758926, + 0.0243028923869133, + -0.009970813058316708, + 0.016797814518213272, + -0.013885165564715862, + -0.00021996564464643598, + -0.022730987519025803, + 0.012529011815786362, + -0.001958139706403017, + 0.002956954762339592, + 0.008044457994401455, + -0.02530459687113762, + 0.02385597862303257, + 0.022207017987966537, + 0.02712307684123516, + 0.01270623691380024, + 0.001509299036115408, + -0.005278212483972311, + -0.029218951240181923, + 0.020619701594114304, + 0.011095804162323475, + -0.021713871508836746, + -0.010201975703239441, + 0.01433978509157896, + 0.017183085903525352, + 0.008005931042134762, + 0.016844047233462334, + 0.008136922493577003, + -0.01067971158772707, + 0.010764471255242825, + 0.013445956632494926, + 0.020881686359643936, + 0.01769164204597473, + -0.024564877152442932, + -0.02336283214390278, + -0.029696686193346977, + -0.01489457581192255, + 0.016165969893336296, + -0.03134564682841301, + 0.004711864050477743, + -0.007663039490580559, + 0.009701123461127281, + 0.014940808527171612, + 0.009947696700692177, + -0.021236136555671692, + -0.005220421589910984, + 0.04765031486749649, + -0.004442174453288317, + 0.0037698764353990555, + 0.025104256346821785, + 0.009231092408299446, + -0.0528283566236496, + -0.019617997109889984, + 0.01564200222492218, + 0.023224133998155594, + -0.0018724169349297881, + 0.01636631041765213, + -0.01719849556684494, + 0.010078688152134418, + -0.029943259432911873, + 0.0028336679097265005, + 0.01300674770027399, + 0.027600811794400215, + -0.03957503288984299, + 0.028879912570118904, + -0.006152777466922998, + 0.008637774735689163, + 0.0016614811029285192, + -0.034705210477113724, + 0.005979405250400305, + 0.019849160686135292, + 0.008838116191327572, + 0.05893104895949364, + -0.010017044842243195, + 0.0020014827605336905, + -0.011935695074498653, + -0.01647418737411499, + -0.02157517522573471, + 0.017599178478121758, + 0.030328530818223953, + 0.015541831031441689, + 0.018508417531847954, + 0.01681322604417801, + -0.007990519516170025, + -0.013669414445757866, + 0.003153442870825529, + -0.009708828292787075, + 0.009238798171281815, + -0.02114367112517357, + -0.010040161199867725, + -0.032147008925676346, + -0.002798993606120348, + 0.00716989254578948, + -0.00863006990402937, + -0.005574870854616165, + 0.016458775848150253, + 0.002053494332358241, + -0.02208373136818409, + -0.017460480332374573, + 0.016936512663960457, + 0.023439886048436165, + 0.035753145813941956, + -0.03439699113368988, + -0.005401499103754759, + 0.003112989477813244, + -0.0020939477253705263, + -0.00467333709821105, + -0.02163681760430336, + -0.020989563316106796, + -0.07273916155099869, + -0.0200186800211668, + 0.008522193878889084, + -0.0373866967856884, + -0.013661708682775497, + 0.008568426594138145, + -0.003852709662169218, + 0.0006612212746404111, + -0.0010546792764216661, + ], + "index": 32, + }, + { + "title": "Ray Collins (actor)", + "text": "Ray Bidwell Collins (December 10, 1889 \u2013 July 11, 1965) was an American character actor in stock and Broadway theatre, radio, films and television. With 900 stage roles to his credit, he became one of the most successful actors in the developing field of radio drama. A friend and associate of Orson Welles for many years, Collins went to Hollywood with the Mercury Theatre company and made his feature film debut in Citizen Kane, as Kane's ruthless political rival.", + "vector": [ + 0.007792048156261444, + 0.013407074846327305, + -0.028745872899889946, + -0.006002138368785381, + -0.041455380618572235, + -0.028623223304748535, + -0.017324179410934448, + 8.85582539922325e-06, + -0.028362594544887543, + 0.04121008515357971, + -0.060312673449516296, + 0.05053141340613365, + -0.01983848586678505, + -0.023594612255692482, + -0.0034763342700898647, + -0.018336033448576927, + -0.029497098177671432, + 0.036733392626047134, + -0.04577876254916191, + 0.019240571185946465, + 0.0677022784948349, + -0.046116046607494354, + -0.013529724441468716, + 0.054272208362817764, + 0.020651035010814667, + 0.002437649993225932, + -0.032042067497968674, + -0.052279163151979446, + -0.01755414716899395, + -0.00985025241971016, + 0.0560506209731102, + 0.019424544647336006, + 0.04436829686164856, + 0.014464923180639744, + -0.015001513063907623, + -0.07898599654436111, + 0.007972189225256443, + -0.0006362419808283448, + -0.0011431275634095073, + 0.01451091654598713, + 0.005312237422913313, + 0.024959083646535873, + -0.059055522084236145, + -0.008899722248315811, + -0.004649166017770767, + 0.01770745776593685, + 0.002269007498398423, + 0.01055548433214426, + 0.014671893790364265, + -0.009512967430055141, + -0.0027826004661619663, + -0.061355192214250565, + 0.004526516888290644, + -0.010877438820898533, + -0.0010530571453273296, + 0.01410464197397232, + 0.026108918711543083, + 0.062459032982587814, + 0.008140831254422665, + -0.019547194242477417, + -0.025020407512784004, + -0.05252445861697197, + -0.03940100967884064, + -0.015653086826205254, + 0.06202976033091545, + 0.014119972474873066, + 0.020758353173732758, + 0.0029646577313542366, + -0.003552990034222603, + -0.03658008202910423, + 0.010724127292633057, + -0.027304746210575104, + -0.017891431227326393, + 0.06310293823480606, + -0.0421912781894207, + 0.011590336449444294, + -0.008600764907896519, + 0.009290666319429874, + -0.0031677952501922846, + -0.039002399891614914, + -0.015085834078490734, + 0.009022371843457222, + -0.032011404633522034, + 0.09621818363666534, + 0.00016792380483821034, + -0.05479346588253975, + -0.009160351939499378, + -0.06304161995649338, + -0.02000712789595127, + 0.018428022041916847, + 0.039370346814394, + 0.05408823490142822, + 0.027228090912103653, + -0.035752199590206146, + -0.0006324092391878366, + -0.0396769717335701, + -0.015806397423148155, + -0.012563862837851048, + -0.007795881014317274, + 0.012295568361878395, + -0.013131114654242992, + -0.054210882633924484, + 0.002907166024670005, + -0.017032887786626816, + 0.06003671512007713, + 0.022720737382769585, + -0.0037733749486505985, + -0.026292892172932625, + 0.01743149757385254, + 0.05460949242115021, + 0.03161279484629631, + -0.04228326305747032, + -0.022996699437499046, + -0.039125051349401474, + 0.007918530143797398, + 0.016051694750785828, + -0.03403511270880699, + 0.03707067668437958, + -0.0005255703581497073, + -0.01221891213208437, + -0.035874851047992706, + -0.04538015276193619, + 0.022782063111662865, + 0.024146532639861107, + 0.006082626990973949, + 0.007148140575736761, + 0.02925180085003376, + -0.03363650292158127, + -0.008025847375392914, + 0.01513182744383812, + -0.013637042604386806, + -0.019577855244278908, + -0.01048649474978447, + -0.022598089650273323, + 0.03749994933605194, + 0.0069641671143472195, + 0.003508912865072489, + 0.01758480817079544, + -0.023701930418610573, + 0.05969943106174469, + -0.008646758273243904, + -0.06776360422372818, + -0.0006678624777123332, + 0.04338710382580757, + 0.01284748874604702, + -0.026323555037379265, + 0.006017469335347414, + -0.05859558656811714, + -0.029650410637259483, + -0.03943167254328728, + -0.015323466621339321, + -0.030815575271844864, + 0.03026365488767624, + -0.04994883015751839, + -0.01454157941043377, + -0.027228090912103653, + 0.012824492529034615, + -0.04301915690302849, + 0.009053033776581287, + -0.022674744948744774, + -0.024974415078759193, + 0.012916479259729385, + -0.0467599555850029, + 0.004304215312004089, + -0.015837060287594795, + -0.03520027920603752, + 0.025955606251955032, + -0.014756214804947376, + -0.03501630574464798, + 0.017017556354403496, + 0.013721363618969917, + 0.01400498952716589, + 0.01047882903367281, + -0.015024510212242603, + -0.020099114626646042, + -0.010294855572283268, + -0.03234868869185448, + -0.030202331021428108, + -0.013338085263967514, + 0.013890005648136139, + 0.0017851187149062753, + -0.05743042379617691, + 0.004710490349680185, + 0.01750815287232399, + 0.015308136120438576, + -0.007374274544417858, + 0.029895707964897156, + 0.0030259822960942984, + 0.0006918173748999834, + -0.0004000467306468636, + 0.02098832093179226, + 0.031091537326574326, + 0.012985468842089176, + 0.002370576374232769, + 0.02324199676513672, + 0.012732505798339844, + -0.01057081576436758, + -0.050930023193359375, + -0.04918227344751358, + -0.010195203125476837, + -0.03406577557325363, + 0.007159638684242964, + 0.006032800767570734, + -0.026093587279319763, + -0.00021643246873281896, + -0.019102590158581734, + 0.03268597275018692, + -0.02213815599679947, + -0.023609943687915802, + 0.032256703823804855, + -0.008754076436161995, + -0.046361345797777176, + 0.02233745902776718, + 0.06892877072095871, + -0.006967999506741762, + 0.02696746215224266, + 0.0006755280192010105, + 0.0116133326664567, + 0.02351795695722103, + -0.011743647046387196, + -0.012126925401389599, + 0.006201443262398243, + 0.02578696422278881, + 0.005335234105587006, + 0.04176200553774834, + 0.002742356387898326, + -0.04078081250190735, + 0.027826005592942238, + 0.01411230769008398, + -0.02681414969265461, + -0.031198853626847267, + 0.007673231884837151, + 0.008347801864147186, + 0.01986914686858654, + -0.01169765368103981, + 0.00015666500257793814, + 0.026154911145567894, + -0.04430697113275528, + -0.03049362264573574, + -0.005611194297671318, + -0.05365896224975586, + 0.043816376477479935, + -0.024207858368754387, + -0.043877702206373215, + 0.07659433782100677, + -0.034525711089372635, + 0.006281931418925524, + -0.1023506373167038, + -0.043816376477479935, + 0.015407787635922432, + 0.016833582893013954, + -0.020666366443037987, + 0.05752240866422653, + -0.05286174267530441, + -0.0058948202058672905, + 0.01641964353621006, + 0.012011942453682423, + -0.005070772022008896, + -0.042743198573589325, + 0.02590961381793022, + -0.04461359605193138, + 0.004963454324752092, + -0.0008096754318103194, + -0.001240863581188023, + -0.04350975528359413, + -0.041394058614969254, + -0.04430697113275528, + -0.06512665003538132, + -0.0013443486532196403, + 0.006860681809484959, + -0.012410551309585571, + -0.04884498938918114, + -0.006661376915872097, + 0.021831532940268517, + -0.016833582893013954, + -0.03602816164493561, + 0.03038630448281765, + -0.04642266780138016, + 0.013322753831744194, + -0.08174559473991394, + 0.014196628704667091, + -0.03428041189908981, + 0.03605882450938225, + -0.06733433157205582, + -0.03654941916465759, + -0.014748549088835716, + 0.019654512405395508, + 0.015407787635922432, + 0.0443989597260952, + 0.0046223364770412445, + -0.019071929156780243, + 0.002537302440032363, + 0.00441536633297801, + 0.021708883345127106, + 0.006477403454482555, + -0.04326445609331131, + 0.03820518031716347, + -0.04320313036441803, + 0.02814795821905136, + -0.019071929156780243, + 0.033329881727695465, + 0.004963454324752092, + -0.020329082384705544, + -0.03400444984436035, + 0.0012303233379498124, + 0.001423878944478929, + -0.003317273687571287, + 0.01339941006153822, + 0.03759193792939186, + -0.06892877072095871, + -0.0658012181520462, + -0.008002851158380508, + 0.01634298637509346, + 0.0034265080466866493, + 0.014786876738071442, + -0.0014832870801910758, + 0.03854246810078621, + -0.03544557839632034, + -0.029987694695591927, + -0.013437737710773945, + 0.026430871337652206, + 0.021816201508045197, + -0.06641446799039841, + -0.017308847978711128, + -0.018090736120939255, + 0.033329881727695465, + 0.017354842275381088, + 0.009604954160749912, + -0.013054459355771542, + 0.07782083004713058, + -0.04105677083134651, + -0.011023084633052349, + 0.05365896224975586, + -0.015300470404326916, + -0.03639610856771469, + -0.03838915377855301, + -0.03483233228325844, + 0.03354451805353165, + 0.013284426182508469, + -0.009137354791164398, + 0.004246723838150501, + 0.030800245702266693, + -0.039033062756061554, + 0.02693679928779602, + -0.013246098533272743, + -0.056510552763938904, + -0.0069411699660122395, + -0.02548034116625786, + 0.03032498061656952, + -0.0038500307127833366, + 0.0006860681460238993, + 0.010601477697491646, + -0.026139581575989723, + 0.02446848712861538, + 0.010179871693253517, + 0.025219712406396866, + -0.04111809656023979, + 0.01109207421541214, + 0.010992421768605709, + 0.0329006090760231, + 0.015990370884537697, + -0.0023437468335032463, + 0.004273553378880024, + 0.02209216170012951, + -0.00757357943803072, + -0.016143683344125748, + 0.01996113359928131, + 0.044000349938869476, + -0.04191531613469124, + 0.02112630009651184, + -0.020589711144566536, + 0.01988447830080986, + -0.007684729993343353, + 0.021708883345127106, + 0.02932845614850521, + -0.004534182604402304, + -0.02449914999306202, + -0.012057935819029808, + -0.03501630574464798, + -0.018213385716080666, + -0.028623223304748535, + 0.007834208197891712, + 0.011299044825136662, + 0.021555572748184204, + -0.015959708020091057, + -0.029803721234202385, + -0.06911274790763855, + -0.010846775956451893, + -0.023134678602218628, + -0.01108440849930048, + -0.00781504437327385, + 0.018520008772611618, + 0.00784570723772049, + 0.011536677367985249, + 0.036886703222990036, + -0.015898384153842926, + 0.03308458253741264, + 0.04200730100274086, + 0.07978321611881256, + 0.002610125346109271, + -0.0513286329805851, + -0.02822461538016796, + 0.03979961946606636, + 0.017906762659549713, + -0.0007713476079516113, + -0.03133683279156685, + 0.004028255119919777, + -0.0014190879883244634, + 0.0324406772851944, + 0.009911577217280865, + 0.015032174997031689, + -0.008378463797271252, + -0.012004276737570763, + 0.007646402344107628, + -0.011467686854302883, + -0.03780657425522804, + -0.025449680164456367, + 0.028408588841557503, + 0.018106067553162575, + 0.015990370884537697, + -0.0058986530639231205, + -0.004813975654542446, + 0.04222193732857704, + -0.014188962988555431, + 0.09364255517721176, + 0.043785713613033295, + 0.015438450500369072, + -0.0008503987337462604, + 0.006672875490039587, + -0.019347889348864555, + -0.052095189690589905, + 0.022000174969434738, + 0.028653886169195175, + -0.013591049239039421, + 0.02908315882086754, + -0.017952756956219673, + -0.07064586132764816, + 0.0019144751131534576, + -0.0043693725019693375, + -0.022690076380968094, + 0.007243960164487362, + 0.010946428403258324, + -0.08800069987773895, + -0.042589884251356125, + -0.03869577869772911, + -0.010670468211174011, + -0.006086459383368492, + -0.029665742069482803, + -0.047250550240278244, + 0.05994472652673721, + -0.02548034116625786, + -7.090648432495072e-05, + 0.010034225881099701, + 0.04436829686164856, + -0.0008992667426355183, + 0.03734663873910904, + 0.03354451805353165, + 0.006094125099480152, + -0.048477042466402054, + 0.03759193792939186, + 0.009237007237970829, + -0.028807198628783226, + 0.005477047059684992, + 0.04682127758860588, + -0.0030298151541501284, + 0.003936268389225006, + -0.008876726031303406, + -0.0258942823857069, + -0.0030202330090105534, + -0.013966661877930164, + -0.05712379887700081, + -0.017170868813991547, + -0.0146029032766819, + -0.0269981250166893, + 0.007910864427685738, + -0.034525711089372635, + 0.013422406278550625, + -0.011069077998399734, + 0.0023073353804647923, + -0.004790978971868753, + -0.011896958574652672, + -0.020559048280119896, + -0.028531236574053764, + -0.007926195859909058, + -0.003690970130264759, + -0.015101165510714054, + -0.03152080997824669, + -0.027412064373493195, + -0.05096068233251572, + -0.06187644973397255, + 0.025173719972372055, + 0.023855242878198624, + 0.018075404688715935, + -0.02114163152873516, + -0.021340936422348022, + -0.003549157176166773, + 0.01119939237833023, + -0.021800870075821877, + -0.005365896504372358, + 0.0002970406785607338, + 0.020191101357340813, + 0.0673956573009491, + 0.03642677143216133, + 0.005860325414687395, + -0.02324199676513672, + -0.009045368060469627, + 0.0683155283331871, + 0.0029550758190453053, + 0.01526214275509119, + -0.004641500301659107, + 0.001572399283759296, + 0.05359764024615288, + 0.04792511835694313, + 0.041271407157182693, + 0.010616809129714966, + -0.05372028797864914, + 0.018933948129415512, + -0.021678220480680466, + -0.010394508019089699, + 0.0020160439889878035, + -0.00044843563227914274, + -0.011130401864647865, + 0.023793917149305344, + 0.039217036217451096, + 0.029957031831145287, + -0.012211247347295284, + 0.021938851103186607, + 0.010356180369853973, + -0.01285515446215868, + -0.015039840713143349, + 0.018075404688715935, + -0.011858630925416946, + 0.013054459355771542, + -0.002922497224062681, + -0.012701842933893204, + 0.037959884852170944, + -0.006669042631983757, + 0.01296247262507677, + 0.015729742124676704, + -0.018244046717882156, + 0.018290041014552116, + 0.08297208696603775, + 0.015806397423148155, + 0.005369728896766901, + 0.031168192625045776, + 0.027841337025165558, + -0.020160438492894173, + -0.0004596944199874997, + 0.004584008362144232, + 0.01773812063038349, + 0.03182743117213249, + -0.0012926061172038317, + 0.02682948112487793, + 0.011835633777081966, + 0.010892769321799278, + -0.004748818464577198, + -0.026599515229463577, + -0.03170478343963623, + -0.014242622070014477, + -0.003922853618860245, + 0.011797306127846241, + -0.015576430596411228, + 0.005369728896766901, + 0.011544343084096909, + -0.054548170417547226, + -0.00871574878692627, + 0.032195378094911575, + -0.03492432087659836, + -0.05828896537423134, + -0.05712379887700081, + -0.015277473255991936, + 0.00880006980150938, + -0.01746216043829918, + -0.012870485894382, + -0.020635703578591347, + 0.01879596896469593, + 0.010064888745546341, + 0.033176571130752563, + -0.006508065853267908, + -0.002136776689440012, + 0.010279524140059948, + -0.03308458253741264, + 0.028914514929056168, + -0.03826650604605675, + -0.030631601810455322, + -0.020620372146368027, + 0.00016995998157653958, + 0.029543092474341393, + 0.03351385518908501, + -0.007067651953548193, + -0.023686598986387253, + -0.010110882110893726, + 0.02319600246846676, + 0.035537563264369965, + 0.020083783194422722, + 0.020421069115400314, + -0.007470094133168459, + 0.006251269020140171, + 0.04994883015751839, + 0.003508912865072489, + -0.00033632671693339944, + 0.03633478283882141, + 0.030984219163656235, + -0.024023884907364845, + 0.0006146825617179275, + -0.012456544674932957, + 0.025204380974173546, + 0.0018291957676410675, + -0.016864245757460594, + 0.008140831254422665, + -0.006082626990973949, + -0.021356267854571342, + -0.024897759780287743, + 0.042773857712745667, + -0.015576430596411228, + -0.03633478283882141, + 0.0032578655518591404, + -0.0234566330909729, + 0.016910238191485405, + 0.019194576889276505, + -0.016833582893013954, + 0.029635079205036163, + -0.016833582893013954, + -0.023180672898888588, + 0.035537563264369965, + -0.008685086853802204, + -0.016051694750785828, + -0.021678220480680466, + -0.0067801931872963905, + 0.05099134519696236, + 0.0021386928856372833, + -0.02356395125389099, + -0.021356267854571342, + -0.009773597121238708, + 0.01118406094610691, + -0.04084213823080063, + -0.00871574878692627, + -0.020789016038179398, + 0.018198054283857346, + -0.033176571130752563, + -0.02696746215224266, + -0.017937425523996353, + 0.03544557839632034, + 0.013913002796471119, + -0.01752348430454731, + 0.023042691871523857, + 0.007447097450494766, + 0.01966984197497368, + -0.045226842164993286, + -0.0046261693350970745, + 0.01890328712761402, + -0.021877525374293327, + -0.013905337080359459, + -0.01293180976063013, + 0.00942098069936037, + -0.01635831780731678, + -0.028316602110862732, + -0.011498349718749523, + -0.012655849568545818, + 0.0012169086840003729, + 0.009888580068945885, + 0.016051694750785828, + 0.004101078025996685, + 0.07254692167043686, + -0.016894908621907234, + -0.0023839911445975304, + -0.019577855244278908, + 0.036702729761600494, + -0.004254389088600874, + 0.007719225250184536, + 0.02233745902776718, + 0.0223527904599905, + 6.881043373141438e-05, + -0.040167566388845444, + -0.00020457479695323855, + -0.007140474859625101, + -0.014050982892513275, + -0.031980741769075394, + -0.0036679734475910664, + -0.008784739300608635, + -0.03961564600467682, + 0.0009088487131521106, + -0.02673749439418316, + -0.01985381729900837, + 0.019685173407197, + 0.008577768690884113, + -0.01408164482563734, + -0.024989746510982513, + -0.0005476088845171034, + 0.011490684002637863, + -0.014480254612863064, + 0.005733843427151442, + -0.00731295021250844, + 0.0009601121419109404, + -0.003144798567518592, + 0.011498349718749523, + -0.01278616487979889, + -0.028178621083498, + -0.009543630294501781, + 0.021754877641797066, + 0.004591674078255892, + -0.013445403426885605, + 0.010724127292633057, + 0.0001922380324685946, + -0.025373024865984917, + -0.03308458253741264, + -0.025235043838620186, + -0.034740347415208817, + -0.014940188266336918, + -0.02449914999306202, + -0.013031462207436562, + 0.036794718354940414, + 0.010946428403258324, + 0.021846864372491837, + 0.023640606552362442, + -0.00810250360518694, + 0.043724387884140015, + -0.009030036628246307, + -0.027504051104187965, + 0.018060073256492615, + 0.019654512405395508, + 0.006393082439899445, + 0.01471788715571165, + -0.014495586045086384, + -0.01117639522999525, + 0.008570102974772453, + 0.007895532995462418, + -0.042651209980249405, + -0.026568852365016937, + 0.004764149431139231, + -0.03878776356577873, + -0.006124787498265505, + 0.012870485894382, + -0.005484712775796652, + 0.0020850340370088816, + 0.02100365050137043, + -0.04872233793139458, + -0.006910508032888174, + 0.034556373953819275, + 0.00555753568187356, + -0.03176610544323921, + -0.02124894969165325, + 0.026538189500570297, + -0.033176571130752563, + 0.020237095654010773, + 0.04804776981472969, + 0.006619216408580542, + 0.015300470404326916, + 0.009827256202697754, + -0.025265706703066826, + 0.011398697271943092, + 0.013629376888275146, + -0.011521345935761929, + 0.011153399012982845, + -0.014871198683977127, + 0.029757728800177574, + 0.03857313096523285, + -0.062489695847034454, + 0.0006501358584500849, + 0.008240483701229095, + 0.011237720027565956, + 0.00817915890365839, + -0.01744682900607586, + -0.031214185059070587, + 0.01297013834118843, + -0.008777073584496975, + -0.001267693005502224, + 0.015039840713143349, + 0.024054545909166336, + 0.00022505623928736895, + -0.014909526333212852, + -0.026584183797240257, + -0.02940511144697666, + 0.0010089802090078592, + 0.003353685140609741, + 0.04084213823080063, + -0.005933148320764303, + 0.003286611521616578, + 0.00041729427175596356, + -0.022475440055131912, + -0.034648358821868896, + 0.05948479473590851, + -0.014311611652374268, + -0.013506727293133736, + -0.016925569623708725, + 0.003106470685452223, + 0.010118547827005386, + -0.0023207501508295536, + -0.0037005520425736904, + -0.015622423961758614, + -0.026400210335850716, + -0.04482823237776756, + -0.014848201535642147, + -0.02468312345445156, + -0.043877702206373215, + -0.0448588952422142, + -0.005948479287326336, + 0.005572866648435593, + -0.048599690198898315, + 0.03946233540773392, + 0.01980782300233841, + 0.025265706703066826, + 0.022521434351801872, + -0.05166591703891754, + 0.016956232488155365, + 0.004652998875826597, + 0.010708795860409737, + -0.019209908321499825, + 0.008784739300608635, + 0.015461446717381477, + 0.009007040411233902, + 0.0039707631804049015, + 0.016848914325237274, + 0.005603529047220945, + 0.02452981099486351, + -0.006481236312538385, + 0.01973116770386696, + -0.011452356353402138, + 0.0006755280192010105, + -0.036702729761600494, + -0.013575717806816101, + 0.015553433448076248, + 0.001031976891681552, + 0.009359655901789665, + 0.010662802495062351, + -0.0020524554420262575, + 0.016956232488155365, + -0.052156511694192886, + 0.013529724441468716, + -0.008585434406995773, + -0.025173719972372055, + 0.06874480098485947, + -0.02567964605987072, + 0.03403511270880699, + -0.036978691816329956, + -0.013606379739940166, + 0.029711734503507614, + 0.042743198573589325, + 0.04065816476941109, + 0.041332732886075974, + 0.004066582769155502, + -0.03360584378242493, + -0.02790266089141369, + -0.00011282755440333858, + -0.0043923696503043175, + 0.020083783194422722, + 0.02106497623026371, + -0.028822528198361397, + -0.0033958458807319403, + -0.006803189869970083, + -0.03593617305159569, + -0.01764613389968872, + -0.021448254585266113, + 0.025235043838620186, + 0.03504696860909462, + -0.03047829121351242, + 0.0022153486497700214, + -0.028730541467666626, + 0.0005250913091003895, + 0.0013759691501036286, + 0.04436829686164856, + -0.00011821740190498531, + -0.013131114654242992, + 0.020804347470402718, + 0.0052624111995100975, + 0.02903716452419758, + 0.023793917149305344, + -0.03848114237189293, + 0.02931312471628189, + -0.053107041865587234, + 0.00996523629873991, + 0.010432835668325424, + 0.01651163026690483, + -0.03296193480491638, + -0.044031012803316116, + 0.04093412309885025, + -0.014142969623208046, + 0.03841981664299965, + 0.02111096866428852, + 0.013276760466396809, + 0.005580532364547253, + -0.002914831507951021, + 0.003581735771149397, + 0.0024242352228611708, + 0.014817539602518082, + -0.034495048224925995, + -0.04461359605193138, + 0.003380514681339264, + -0.00643141008913517, + -0.0013261429267004132, + -0.0035376588348299265, + 0.04185399040579796, + -0.0032923605758696795, + -0.0013865092769265175, + -0.018290041014552116, + 0.019424544647336006, + -0.030938224866986275, + -0.016634277999401093, + -0.04590141028165817, + 0.023579280823469162, + -0.0054387194104492664, + 0.00378678971901536, + -0.017906762659549713, + 0.018182722851634026, + 0.005377394612878561, + 0.007972189225256443, + -0.010294855572283268, + 0.003658391535282135, + 0.018136730417609215, + -0.06227505952119827, + 0.05286174267530441, + 0.02085033990442753, + 0.06227505952119827, + -0.022812724113464355, + 0.005852659698575735, + 0.011023084633052349, + -0.009566626511514187, + -0.013752025552093983, + 0.018320703878998756, + 0.00942864641547203, + 0.042620547115802765, + 0.030202331021428108, + 0.014165966771543026, + 0.002056288067251444, + 0.020053120329976082, + -0.007025491446256638, + 0.0061401184648275375, + -0.02564898505806923, + 0.024928420782089233, + -0.05945413187146187, + 0.01472555287182331, + -0.007109812460839748, + -0.047158561646938324, + -0.02112630009651184, + 0.02787199802696705, + 0.018198054283857346, + -0.020114446058869362, + -0.03360584378242493, + -0.022858718410134315, + -0.04651465639472008, + -0.0354149155318737, + -0.0020428732968866825, + -0.029681071639060974, + -0.016879577189683914, + 0.020651035010814667, + 0.039094388484954834, + -0.012402886524796486, + 0.010440501384437084, + -0.04338710382580757, + 0.013215435668826103, + -5.038013568992028e-06, + 0.029543092474341393, + -0.02439183183014393, + -0.0023169172927737236, + 0.012648183852434158, + 0.010287189856171608, + -0.003909438848495483, + -0.03035564161837101, + 0.013085121288895607, + -0.009037702344357967, + -0.018489345908164978, + 0.00757357943803072, + -0.038082532584667206, + -0.015407787635922432, + -0.014832871034741402, + -0.0013318920973688364, + 0.004035920836031437, + -0.046116046607494354, + -0.008915053680539131, + -0.0032233705278486013, + 0.03253266215324402, + 0.02121828682720661, + -0.005998305510729551, + -0.01057848148047924, + -0.004591674078255892, + 0.005607361905276775, + -0.033237896859645844, + 0.02088100276887417, + -0.008370798081159592, + 0.01045583188533783, + 0.01874997466802597, + 0.031030211597681046, + -0.04553346335887909, + -0.001405673217959702, + 0.03550690412521362, + 0.036764055490493774, + -0.030861569568514824, + 0.0021118635777384043, + 0.011460021138191223, + -0.0048676347360014915, + -0.03400444984436035, + 0.028607893735170364, + -0.024913089349865913, + -0.021632228046655655, + 0.00932132825255394, + 0.007213297765702009, + 0.026170242577791214, + 0.001082761213183403, + -0.007734556216746569, + -0.04651465639472008, + -0.03872644156217575, + 0.0002824281982611865, + 0.008746410720050335, + -0.015361794270575047, + -0.06856082379817963, + 0.010195203125476837, + 0.007151973433792591, + -0.0007459553889930248, + -0.03615080937743187, + 0.02794865518808365, + 0.0034054277930408716, + -0.018060073256492615, + 0.027228090912103653, + 0.00035668836790136993, + 0.04642266780138016, + 0.0008911220938898623, + -0.013146446086466312, + -0.02443782426416874, + 0.04467491805553436, + 0.018949279561638832, + 0.0012945225462317467, + 0.00643141008913517, + 0.028331933543086052, + 0.0013941748766228557, + -0.010026560164988041, + 0.011069077998399734, + -0.007466261275112629, + -0.015599426813423634, + 0.004089579451829195, + 0.03618147224187851, + 0.03354451805353165, + -0.01971583627164364, + -0.0076004089787602425, + -0.030646933242678642, + 0.009053033776581287, + 0.010080219246447086, + -0.021417591720819473, + 0.02584828995168209, + 0.011820303276181221, + 0.025955606251955032, + -0.026660839095711708, + -0.0009744851267896593, + -0.005055441055446863, + 0.026538189500570297, + -0.01398199237883091, + 0.013844012282788754, + -0.015438450500369072, + -0.018397359177470207, + -0.005622692871838808, + -0.034740347415208817, + -0.005158925894647837, + -0.01980782300233841, + -0.004242890980094671, + 0.016710935160517693, + 0.01649629883468151, + -0.010655136778950691, + -0.028991172090172768, + -0.013767356984317303, + 0.006488901562988758, + 0.02327265962958336, + -0.007213297765702009, + -0.015009178780019283, + 0.008754076436161995, + -0.00811783503741026, + 0.01980782300233841, + -0.008876726031303406, + 0.03299259766936302, + -0.014564575627446175, + -0.006772527936846018, + -0.011322041042149067, + -0.01512416172772646, + 0.03593617305159569, + -0.06052730977535248, + -0.0269214678555727, + 0.0007296660915017128, + 0.02114163152873516, + -0.01471022143959999, + -0.041608694940805435, + -0.010233530774712563, + -0.005572866648435593, + 0.016848914325237274, + 0.0012897314736619592, + 0.028730541467666626, + -0.029558423906564713, + -0.015047506429255009, + -0.035629551857709885, + 0.030049020424485207, + 0.03768392279744148, + 0.005423387978225946, + 0.026093587279319763, + -0.013284426182508469, + 0.01523914560675621, + -0.04596273601055145, + -0.012410551309585571, + 0.030922893434762955, + -0.026262229308485985, + -0.02344130165874958, + 0.05917816981673241, + 0.01163632981479168, + -0.005101434420794249, + 0.012525535188615322, + 0.034648358821868896, + -0.005576699506491423, + 0.0018474014941602945, + 0.023747924715280533, + 0.017922094091773033, + -0.014188962988555431, + 0.018228717148303986, + -0.028607893735170364, + -0.014564575627446175, + -0.019087260589003563, + 0.0013146445853635669, + -0.006048131734132767, + -0.010287189856171608, + 0.009689276106655598, + -0.012494873255491257, + -0.013759691268205643, + -0.0036468931939452887, + 0.012188250198960304, + -0.00880006980150938, + 0.00010528176062507555, + -0.004262054804712534, + -0.023947229608893394, + -0.01867331936955452, + -0.03418842703104019, + -0.016848914325237274, + -0.020666366443037987, + 0.0469132661819458, + -0.013782688416540623, + -0.01755414716899395, + -0.03161279484629631, + -0.014802208170294762, + 0.0423445887863636, + 0.006745698396116495, + 0.004698992241173983, + -0.007174970116466284, + -6.550166631313914e-07, + 0.007117478176951408, + -0.005730010569095612, + -0.02569497749209404, + 0.016756927594542503, + -0.014786876738071442, + -0.012609856203198433, + -0.012195915915071964, + -0.026185574010014534, + -0.0041470713913440704, + 0.014303946867585182, + 0.029880376532673836, + -0.04099544882774353, + 0.01629699394106865, + 0.017891431227326393, + -0.017983417958021164, + 0.01159800123423338, + -0.005864158272743225, + -0.019301895052194595, + -0.010241196490824223, + 0.01469489000737667, + 0.01743149757385254, + -0.02577163279056549, + -0.029849715530872345, + 0.026630176231265068, + -0.0025238876696676016, + -0.007726890500634909, + -0.03277796134352684, + 0.021816201508045197, + -0.0036488096229732037, + -0.03286994621157646, + 0.0004903567023575306, + -0.03860379010438919, + 0.015055172145366669, + -0.008892056532204151, + -0.02088100276887417, + -0.0017419998766854405, + -0.022598089650273323, + -0.011030749417841434, + -0.023916566744446754, + -0.0016145599074661732, + -0.00872341450303793, + -0.018290041014552116, + -0.04225260019302368, + 0.032195378094911575, + 0.007872536778450012, + -0.0025296369567513466, + -0.0001810990070225671, + -0.03624279797077179, + 0.008531775325536728, + 0.012134591117501259, + 0.008623762056231499, + 0.02226080372929573, + -0.009788927622139454, + 0.016664940863847733, + -0.0018138645682483912, + 0.03771458566188812, + -0.006837685126811266, + -0.0031352166552096605, + -0.006803189869970083, + 0.00246639596298337, + -0.02695213072001934, + -0.0009505302296020091, + 0.025020407512784004, + -0.03375915437936783, + -0.02564898505806923, + 0.02945110574364662, + 0.011467686854302883, + -0.001661511487327516, + 0.016710935160517693, + -0.004607005510479212, + -0.011590336449444294, + -0.0018905202159658074, + 0.021862193942070007, + 0.01047882903367281, + 0.038971737027168274, + -0.009627951309084892, + 0.0008599807042628527, + 0.027611369267106056, + 0.014135303907096386, + 0.0421912781894207, + -0.022506102919578552, + 0.0029857379850000143, + 0.01121472381055355, + 0.0014133388176560402, + -0.02088100276887417, + 0.02328798919916153, + -0.02127961255609989, + -0.006385416723787785, + 0.0007593701593577862, + -0.021478915587067604, + -0.02581762708723545, + 0.022736068814992905, + 0.027136104181408882, + -0.023579280823469162, + -8.773479930823669e-05, + 0.035537563264369965, + -0.00414323853328824, + -0.01770745776593685, + -0.04654531925916672, + -0.008968712761998177, + 0.019516531378030777, + -0.0074355993419885635, + -0.020344411954283714, + -0.011927621439099312, + -0.030141007155179977, + -0.027534713968634605, + 0.009497636929154396, + -0.048538364470005035, + 0.005400391295552254, + 0.007443264592438936, + -0.013690701685845852, + 0.02088100276887417, + -0.004476690664887428, + -0.028761204332113266, + -0.004227559547871351, + -0.008048844523727894, + 0.0290524959564209, + 0.016664940863847733, + -0.028408588841557503, + 0.00871574878692627, + 0.020283088088035583, + -0.003144798567518592, + -0.01225724071264267, + -0.03887975215911865, + -0.055560022592544556, + -0.041486043483018875, + -0.015469112433493137, + 0.01408164482563734, + 0.024269182235002518, + 0.01172831654548645, + -0.02210749313235283, + 0.02810196578502655, + 0.018366696313023567, + -0.027764679864048958, + -0.00883073266595602, + 0.009267669171094894, + 0.00810250360518694, + -0.018520008772611618, + -0.02344130165874958, + -0.04476690664887428, + -0.018489345908164978, + -0.022705407813191414, + 0.0032578655518591404, + -0.02791799232363701, + 0.015599426813423634, + 0.008125499822199345, + -0.017278186976909637, + 0.012916479259729385, + -0.015116496942937374, + 0.010233530774712563, + -0.011575005017220974, + -0.013644707389175892, + 0.007021658588200808, + 0.02218414843082428, + -0.01048649474978447, + 0.004764149431139231, + -0.0008820192306302488, + -0.012073266319930553, + 0.00010438344907015562, + -0.019117921590805054, + -0.016618948429822922, + 0.028439249843358994, + -0.001186246401630342, + 0.012640519067645073, + -0.00944397784769535, + 0.036764055490493774, + -0.007512255106121302, + -0.026660839095711708, + 0.013798018917441368, + 0.005841161590069532, + -0.007021658588200808, + 0.009397984482347965, + -0.016036365181207657, + 0.042620547115802765, + -0.018044743686914444, + -0.014043317176401615, + -0.034587033092975616, + -0.016940901055932045, + -0.03038630448281765, + -0.0037043849006295204, + -0.009198679588735104, + 0.026584183797240257, + 0.01172831654548645, + 0.0004877216415479779, + -0.052187174558639526, + -0.013131114654242992, + 0.04433763399720192, + -0.00995757058262825, + -0.00818682461977005, + -0.0516352541744709, + -0.0025143057573586702, + -0.03949299827218056, + -0.05040876194834709, + -0.004277385771274567, + -0.0036258127074688673, + -0.0420379638671875, + -0.021540241315960884, + 0.04899829998612404, + -0.000905974127817899, + 0.01119939237833023, + -0.006527229677885771, + -0.016603616997599602, + 0.015867721289396286, + 0.00827881135046482, + 0.00011785807873820886, + -0.00011480382818263024, + 0.008838397450745106, + 0.009466974064707756, + 0.006485069170594215, + -3.419561107875779e-05, + 0.014234956353902817, + -0.01640431210398674, + -0.03627346083521843, + -0.006331757642328739, + -0.004189231898635626, + -0.0010511407162994146, + -0.012119260616600513, + -0.02594027668237686, + 0.021938851103186607, + 0.011030749417841434, + -0.02452981099486351, + -0.03058560937643051, + 0.028362594544887543, + -0.0395236611366272, + 0.0042122285813093185, + 0.003689053701236844, + -0.010379176586866379, + -0.006270433310419321, + 0.00528924074023962, + -0.01634298637509346, + -0.0014554993249475956, + 0.006009804084897041, + -0.027718687430024147, + 0.030033688992261887, + 0.028868522495031357, + 0.006186111830174923, + 0.005070772022008896, + -0.003357517998665571, + -0.006013636477291584, + 0.001019520335830748, + -0.012571528553962708, + 0.010225865058600903, + -0.023165341466665268, + -0.02224547229707241, + -0.017201529815793037, + 0.017891431227326393, + -0.030646933242678642, + -0.0006779234972782433, + -0.02554166689515114, + 0.026492197066545486, + -0.01859666407108307, + -0.00528924074023962, + 0.0023188337218016386, + -0.01887262426316738, + -0.031198853626847267, + -0.021739546209573746, + -0.018274709582328796, + 0.019071929156780243, + 0.01283982302993536, + 0.001421962515451014, + 0.014756214804947376, + -0.02807130292057991, + 0.0026580351404845715, + 0.0034092606510967016, + -0.010287189856171608, + -0.00491746049374342, + 0.01225724071264267, + -0.0034035113640129566, + 0.013913002796471119, + 0.028745872899889946, + 0.014771546237170696, + 0.022000174969434738, + -0.026078255847096443, + 0.006910508032888174, + -0.015852391719818115, + 0.016971563920378685, + -0.02900650165975094, + 0.019041266292333603, + -0.015285138972103596, + -0.009781262837350368, + 0.005519207566976547, + 0.002261342015117407, + 0.03740796446800232, + -0.013867009431123734, + 0.017830107361078262, + 0.029589084908366203, + 0.010110882110893726, + -0.001017603906802833, + -0.007692395709455013, + -0.020727690309286118, + -0.028684549033641815, + -0.0027270251885056496, + -0.0031256345100700855, + 0.0013865092769265175, + -0.04117942228913307, + 0.017216861248016357, + 0.0022536765318363905, + 0.00935199111700058, + 0.03529226779937744, + -0.001944179181009531, + 0.023134678602218628, + -0.022966036573052406, + -0.011582670733332634, + -0.01625099964439869, + 0.008455119095742702, + -0.009022371843457222, + 0.00668437359854579, + -0.014119972474873066, + -0.03314590826630592, + 0.04191531613469124, + -0.012479541823267937, + 0.020237095654010773, + 0.03182743117213249, + -0.017155537381768227, + 0.0023437468335032463, + -0.034587033092975616, + -0.004522684030234814, + 0.006485069170594215, + 0.04525750130414963, + 0.024897759780287743, + 0.006220607087016106, + -0.012433548457920551, + -0.010087884962558746, + 0.01287815161049366, + 0.005867991130799055, + 0.00943631213158369, + -0.007328281179070473, + -0.004787146113812923, + -0.006086459383368492, + 0.0018186555244028568, + 0.02452981099486351, + -0.0033306884579360485, + 0.007910864427685738, + 0.04252856224775314, + -0.012402886524796486, + -0.01618967577815056, + 0.03884908929467201, + 0.022843386977910995, + 0.01057081576436758, + 0.020697029307484627, + -0.04004491865634918, + -0.007627238519489765, + 0.018964610993862152, + 0.0006597177707590163, + 0.022030837833881378, + 0.029635079205036163, + 0.0032061231322586536, + 0.02103431336581707, + 0.007404936943203211, + -0.037837233394384384, + -0.01753881573677063, + 0.01107674278318882, + 0.007792048156261444, + 0.006400747690349817, + 0.02791799232363701, + -0.01882662996649742, + 0.005745342001318932, + -0.004691326525062323, + -0.036825381219387054, + -0.011896958574652672, + -0.005986807402223349, + -0.0015321550890803337, + 0.031214185059070587, + 0.001655762316659093, + -0.020743021741509438, + 0.015975039452314377, + -0.014066314324736595, + -0.010908100754022598, + 0.01859666407108307, + 0.0009136396693065763, + 0.01626633107662201, + 0.011222388595342636, + 0.012924144975841045, + -0.01775345206260681, + -0.04688260331749916, + 0.018933948129415512, + 0.0031869590748101473, + -0.020543716847896576, + 0.011306710541248322, + 0.02232212945818901, + -0.005749174859374762, + -0.014403599314391613, + 0.003008734667673707, + 0.0042083957232534885, + -0.0017649965593591332, + 0.002849674317985773, + -0.015116496942937374, + -0.051911212503910065, + -0.0013165610143914819, + -0.05126730725169182, + 0.0008087172172963619, + -0.015714410692453384, + -0.013445403426885605, + 0.029681071639060974, + -0.00038423651130869985, + 0.019056597724556923, + -0.0211722943931818, + 0.02796398475766182, + -0.022828055545687675, + ], + "index": 33, + }, + { + "title": "Azhdarcho", + "text": "Azhdarcho /\u0251\u02d0\u0292\u02c8d\u0251rxo\u028a/ is a genus of pterodactyloid pterosaur from the late Cretaceous Period of the Bissekty Formation (middle Turonian stage, about 92 million years ago) of Uzbekistan. It is known from fragmentary remains including the distinctive, elongated neck vertebrae that characterizes members of the family Azhdarchidae, which also includes such giant pterosaurs as Quetzalcoatlus.", + "vector": [ + 0.0036942523438483477, + 0.0021034819073975086, + -0.028384335339069366, + -0.009568016044795513, + 0.02500004880130291, + -0.02737060934305191, + 0.005770441610366106, + -0.02774490788578987, + -0.019089244306087494, + 0.041640754789114, + -0.0025596588384360075, + -0.005770441610366106, + -0.023877151310443878, + 0.0166563019156456, + 0.04532136023044586, + 0.027838481590151787, + -0.06618852913379669, + -0.01304587721824646, + 0.016157235950231552, + -0.056425563991069794, + 0.03462265059351921, + 0.02155338041484356, + 0.03683725371956825, + -0.02389274723827839, + 0.0197442676872015, + 0.021116698160767555, + -0.013427973724901676, + 7.980657392181456e-05, + -0.0616033636033535, + -0.025421135127544403, + -0.021444208920001984, + -0.01476141344755888, + 0.04613234102725983, + 0.039488535374403, + 0.019806651398539543, + 0.06674997508525848, + 0.011572075076401234, + -0.012078938074409962, + 0.016765473410487175, + -0.02935127355158329, + -0.02718345820903778, + 0.02825956791639328, + -0.012281683273613453, + 0.030879661440849304, + 0.022910213097929955, + -0.013903644867241383, + 0.022910213097929955, + 0.056987009942531586, + -0.010012496262788773, + -0.001261309371329844, + 0.00633968785405159, + 0.039488535374403, + -0.07841562479734421, + -0.017623240128159523, + 0.03170623630285263, + 0.03967568650841713, + 0.0361822284758091, + 0.09532146155834198, + -0.0005619357689283788, + 0.040486667305231094, + 0.011587671004235744, + -0.000763706280849874, + 0.0004885867820121348, + 0.031768620014190674, + 0.04416727274656296, + 0.025842221453785896, + 0.017981944605708122, + -0.02010297030210495, + -0.06506562978029251, + 0.004604656714946032, + -0.01863696798682213, + 0.04363701492547989, + 0.01668749377131462, + -0.02718345820903778, + 0.017248941585421562, + 0.0038989470340311527, + -0.009536824189126492, + 0.0050257425755262375, + 0.0018792925402522087, + -0.006316294427961111, + -9.381841664435342e-05, + 0.010106070898473263, + -0.03955091908574104, + 0.021319443359971046, + 0.07585791498422623, + 0.014519679360091686, + -0.017794795334339142, + -0.04151598736643791, + -0.025311963632702827, + -0.008086415939033031, + 0.006636008154600859, + -0.021990060806274414, + -0.028384335339069366, + -0.006133043672889471, + 0.010620731860399246, + -0.014971956610679626, + -0.008710247464478016, + 0.0168746430426836, + -0.035246480256319046, + -0.03209613263607025, + -0.04759834706783295, + -0.04675617441534996, + 0.007450887933373451, + -0.0124922264367342, + -0.010698710568249226, + -0.006441060453653336, + -0.0051739029586315155, + 0.03824087232351303, + 0.004222559742629528, + 0.030723702162504196, + -0.023409279063344002, + -0.03148789703845978, + 0.02662201039493084, + -0.00018398156680632383, + -0.0351841002702713, + 0.010230837389826775, + 0.012234896421432495, + -0.035215288400650024, + -0.058453015983104706, + -0.017825985327363014, + 0.016032470390200615, + -0.01756085827946663, + 0.046818558126688004, + 0.00924050435423851, + -0.0073378183878958225, + -0.02013416215777397, + 0.02407989650964737, + 0.014815999194979668, + 0.025608284398913383, + 0.04475991427898407, + -0.03873993828892708, + -0.026497244834899902, + 0.05670628696680069, + 0.011205573566257954, + 0.00239785248413682, + 0.021319443359971046, + 0.005864016246050596, + -0.025951391085982323, + -0.005446828901767731, + 0.03986283391714096, + 0.025311963632702827, + 0.015252681449055672, + 0.025592688471078873, + -0.0062149218283593655, + -0.022879021242260933, + 0.013014685362577438, + -0.012936706654727459, + -0.0065034436993300915, + 0.07199016213417053, + -0.02063322812318802, + 0.042826034128665924, + 0.03621342033147812, + 0.01958831027150154, + 0.011774820275604725, + -0.03189338743686676, + 0.020368099212646484, + -0.03315664455294609, + -0.037741806358098984, + 0.030536552891135216, + 0.0071935574524104595, + 0.011408318765461445, + 0.07011866569519043, + -0.007860277779400349, + -0.010862466879189014, + 0.001418241998180747, + -0.0062500122003257275, + 0.049563415348529816, + -0.0340300090610981, + -0.021475400775671005, + 0.019697479903697968, + 0.044323232024908066, + 0.03356213495135307, + -0.005228488240391016, + 0.042295776307582855, + -0.04298199340701103, + 0.03281353786587715, + 0.01176702231168747, + 0.03640057146549225, + -0.033063072711229324, + 0.03098883107304573, + -0.0050257425755262375, + 0.007131174206733704, + 0.02317534200847149, + -0.00895978044718504, + 0.04001879319548607, + 0.05539624020457268, + 0.08970697224140167, + -0.009224908426404, + -0.03212732449173927, + -0.0043122353963553905, + -0.061353832483291626, + -0.060449276119470596, + 0.02864946238696575, + -0.01991582103073597, + -0.005747048184275627, + 0.039207812398672104, + 0.011478500440716743, + -0.008024033159017563, + -0.04831575229763985, + 0.014862786047160625, + 0.004499385133385658, + -0.04622591659426689, + 0.041048113256692886, + 0.05000009760260582, + 0.02339368313550949, + 0.02682475559413433, + -0.012593599036335945, + 0.028025630861520767, + 0.03499694913625717, + 0.029865935444831848, + 0.01994701288640499, + -0.06718665361404419, + -0.008203384466469288, + 0.02878982573747635, + -0.02172493375837803, + 0.002629839815199375, + -0.00842172559350729, + -0.027277033776044846, + 0.0069752163253724575, + 0.008990972302854061, + 0.03696201741695404, + -0.03133193776011467, + 0.01632879115641117, + 0.03643176332116127, + -0.016235215589404106, + 0.01901126652956009, + -0.006456656381487846, + -0.005501414183527231, + 0.009022163227200508, + 0.012850929982960224, + 0.020757993683218956, + -0.08521538972854614, + 0.036868441849946976, + -0.002249692566692829, + 0.01664070598781109, + 0.0325951986014843, + 0.022551510483026505, + -0.01306147314608097, + 0.0361822284758091, + 0.003965229261666536, + -0.00788367073982954, + -0.0012856777757406235, + -0.0033063071314245462, + -0.02445419691503048, + 0.018153497949242592, + 0.006889439653605223, + 0.03655652701854706, + -0.019853439182043076, + -0.02336249127984047, + -0.01991582103073597, + 0.02900816686451435, + -0.011470702476799488, + 0.009029961191117764, + 0.002471932442858815, + 0.04541493579745293, + -0.03983164206147194, + 0.04260769486427307, + -0.033780477941036224, + -0.01058174204081297, + 0.0024972755927592516, + -0.007825186476111412, + -0.03212732449173927, + 0.029631998389959335, + 0.006643805652856827, + -0.038303256034851074, + -0.009552420116961002, + 0.014433901757001877, + 0.01868375390768051, + -0.008835013955831528, + -0.0547100268304348, + 0.023877151310443878, + 0.052651382982730865, + 0.023066170513629913, + -0.010909253731369972, + 0.050124865025281906, + 0.023877151310443878, + 0.01737370900809765, + 0.00498285423964262, + 0.024578962475061417, + 0.028743037953972816, + -0.025686264038085938, + -0.016188427805900574, + 0.023268915712833405, + 0.029943913221359253, + 0.047535963356494904, + 0.014956360682845116, + -0.02225518971681595, + -0.031082406640052795, + 0.005641776602715254, + 0.001133618876338005, + -0.014597658067941666, + -0.03477860987186432, + -0.012344066053628922, + -0.033593326807022095, + -0.0337492860853672, + 0.015268276445567608, + -0.020617632195353508, + 0.029413657262921333, + -0.031815409660339355, + -0.04042428359389305, + -0.033593326807022095, + 0.04095454141497612, + -0.028353143483400345, + 0.037242744117975235, + 0.02099193073809147, + 0.006281203590333462, + 0.007680925540626049, + 0.017124176025390625, + -0.012648184783756733, + 0.04472872242331505, + -0.030739298090338707, + 0.03384286165237427, + -0.030474171042442322, + 0.0045305765233933926, + -0.013100462034344673, + -0.02662201039493084, + 0.00548191973939538, + -0.017124176025390625, + -0.032158516347408295, + 0.0070492965169250965, + -0.0061057512648403645, + -0.04750477150082588, + -0.019120436161756516, + -0.015369649045169353, + 0.042295776307582855, + -0.014550870284438133, + -0.0042030648328363895, + 0.003674757666885853, + 0.0033667408861219883, + -0.03799134120345116, + -0.02916412428021431, + 0.023112958297133446, + 0.009279494173824787, + -0.009638196788728237, + -0.023440469056367874, + 0.04148479551076889, + 0.056082453578710556, + -0.04563327506184578, + 0.0005473147029988468, + -0.025608284398913383, + -0.03655652701854706, + 0.053368788212537766, + 0.030536552891135216, + 0.0007539588841609657, + 0.0061057512648403645, + -0.010441380552947521, + 0.04859647527337074, + -0.03593269735574722, + 0.018340647220611572, + 0.004475991241633892, + 0.0006062862812541425, + 0.009903325699269772, + -0.07498455047607422, + 0.023190937936306, + -0.021147888153791428, + -0.037398699671030045, + 0.033437371253967285, + -0.013505952432751656, + 0.002709768246859312, + 0.01286652497947216, + -0.011907384730875492, + 0.011681245639920235, + 0.013474761508405209, + -0.015798533335328102, + 0.0019416756695136428, + -0.03041178733110428, + 0.024890877306461334, + 0.03986283391714096, + -0.013155047781765461, + 0.031971365213394165, + -0.036151036620140076, + -0.00702590262517333, + -0.0011219220468774438, + 0.02465694211423397, + -0.002581103006377816, + 9.716907516121864e-05, + 0.04366820678114891, + -0.002540163928642869, + 0.017857177183032036, + 0.0019738420378416777, + 0.010534955188632011, + 0.08134762942790985, + 0.011073010042309761, + 0.021475400775671005, + 0.06388034671545029, + 0.01684345118701458, + 0.023097362369298935, + 0.04291960969567299, + -0.002364711370319128, + 0.026855947449803352, + -0.03714916855096817, + 0.05146609991788864, + 0.009045557118952274, + 0.018699349835515022, + 0.010885859839618206, + -0.06487847864627838, + -0.013981624506413937, + 0.030318211764097214, + -0.02428264170885086, + 0.004210862796753645, + 0.059731870889663696, + 0.09095463901758194, + 0.0496881827712059, + 0.004713826812803745, + -0.017467282712459564, + 0.017124176025390625, + -0.02284782938659191, + -0.027089884504675865, + -0.02303497865796089, + -0.00987213384360075, + -0.050655119121074677, + 0.007330020423978567, + -0.018169093877077103, + -0.050093673169612885, + -0.013357792980968952, + -0.007115578278899193, + 0.03824087232351303, + 0.035090524703264236, + -0.03855278715491295, + -0.03951972723007202, + 0.013638516888022423, + -0.02573304995894432, + -0.009466643445193768, + -0.007793995086103678, + -0.06288222223520279, + 0.039239004254341125, + -0.011330340057611465, + 0.026668798178434372, + -0.026746777817606926, + -0.03424835205078125, + 0.05364951118826866, + -0.018231475725769997, + 0.011111998930573463, + 0.03945734351873398, + 0.0066126142628490925, + -0.03080168180167675, + 0.01161106489598751, + -0.030131062492728233, + 0.005801633466035128, + -0.021459804847836494, + -0.01868375390768051, + 0.0680600181221962, + -0.02298819273710251, + -0.021335039287805557, + 0.016359981149435043, + -0.018418626859784126, + -0.019494734704494476, + 0.045758042484521866, + 0.03627580404281616, + 0.0035402439534664154, + 0.006004378665238619, + -0.011182180605828762, + -0.0221148282289505, + -0.017264537513256073, + -0.010215241461992264, + -0.021475400775671005, + -0.002585001988336444, + -0.004148479551076889, + 0.010324412025511265, + 0.0054975152015686035, + -0.001987488241866231, + 0.034529075026512146, + -0.01935437321662903, + -0.06469132751226425, + 0.020024992525577545, + 0.04001879319548607, + 0.011470702476799488, + 0.008858407847583294, + 0.025436731055378914, + -0.00494386488571763, + 0.010285422205924988, + -0.025795433670282364, + -0.06110429763793945, + -0.029429253190755844, + 0.01701500453054905, + 0.026497244834899902, + -0.04416727274656296, + -0.027588950470089912, + -0.0023140250705182552, + -0.012250491417944431, + 0.032501623034477234, + -0.004569565877318382, + 0.029086144641041756, + -1.8657070540939458e-05, + -0.035059332847595215, + -0.012889918871223927, + 0.02122586779296398, + -0.007961650379002094, + -0.029990701004862785, + 0.01954152248799801, + 0.004959460813552141, + -0.028119206428527832, + -0.026044966652989388, + 0.012000959366559982, + -0.02701190486550331, + -0.015549001283943653, + -0.011267957277595997, + -0.024750515818595886, + -0.05892089009284973, + -0.0068660457618534565, + -0.011938575655221939, + -0.01403620932251215, + 0.0040938942693173885, + -0.058577779680490494, + 0.03156587481498718, + 0.013778879307210445, + -0.04585161805152893, + 0.041204072535037994, + -0.003930138889700174, + -0.06955721974372864, + 0.04691212996840477, + 0.0019445999059826136, + 0.00697131734341383, + 0.014566466212272644, + 0.02719905413687229, + -0.004561767913401127, + 0.006148639600723982, + 0.01718655787408352, + 0.0003533420676831156, + -0.013880251906812191, + -0.012375257909297943, + -0.00693232798948884, + -0.016079258173704147, + 0.009568016044795513, + 0.031253959983587265, + 0.01650034449994564, + -0.03126955404877663, + -0.004553970415145159, + 0.008811620064079762, + -0.023767981678247452, + -0.012461034581065178, + 0.009154727682471275, + -0.002286732429638505, + 0.011104200966656208, + -0.025078028440475464, + 0.03271996229887009, + -0.03225209191441536, + -0.0050257425755262375, + 0.005255780648440123, + 0.0010653872741386294, + -0.021600166335701942, + 0.010722104460000992, + -0.022192806005477905, + 0.040642622858285904, + -0.022021252661943436, + -0.025421135127544403, + 0.018730541691184044, + -0.028524696826934814, + 0.036681294441223145, + 0.017326921224594116, + 0.024766111746430397, + -0.008647864684462547, + -0.006316294427961111, + -0.018059922382235527, + 0.0035421934444457293, + -0.001118997810408473, + -0.0008036704966798425, + -0.0124922264367342, + 0.007135073188692331, + -0.008312555029988289, + -0.015720555558800697, + -0.015198095701634884, + -0.00018239761993754655, + 0.020212141796946526, + 0.00037576103932224214, + 0.001164810499176383, + -0.003859957680106163, + 0.010542753152549267, + 0.025811029598116875, + 0.020726801827549934, + 0.022223997861146927, + -0.007630239240825176, + 0.0344666913151741, + 0.0010634377831593156, + 0.025608284398913383, + -0.03080168180167675, + -0.0001477944606449455, + -0.02772931195795536, + 0.016812259331345558, + -0.02535875141620636, + 0.0249844528734684, + -0.008195586502552032, + -0.039394959807395935, + 0.030708108097314835, + -0.0010917051695287228, + -0.018169093877077103, + 0.020945142954587936, + 0.016344387084245682, + -0.021054314449429512, + 0.006690593436360359, + -0.03808491677045822, + -0.012874322943389416, + 0.02534315548837185, + -0.005380547139793634, + 0.002019654493778944, + 0.03209613263607025, + -0.007817388512194157, + 0.024329429492354393, + 0.011236765421926975, + -0.015798533335328102, + 0.0291485283523798, + 0.011728032492101192, + 0.022379957139492035, + -0.039769262075424194, + -0.020617632195353508, + -0.013576134108006954, + 0.010807881131768227, + -0.03749227523803711, + -0.025311963632702827, + -0.00760294683277607, + -0.0021853598300367594, + -0.012078938074409962, + 0.03045857511460781, + 0.019603906199336052, + 0.06762333959341049, + -0.013810070231556892, + -0.002298429375514388, + -0.032501623034477234, + -0.011634457856416702, + -0.016344387084245682, + -0.0036864543799310923, + 0.025467922911047935, + 0.010098272934556007, + -0.017436090856790543, + -0.01631319522857666, + -0.022598296403884888, + -0.018247071653604507, + -0.022146020084619522, + -0.011790416203439236, + 0.01503434032201767, + -0.008211182430386543, + 0.018184689804911613, + 0.005014046095311642, + -0.014722424559295177, + 0.008562088012695312, + -0.017280133441090584, + -0.011891788803040981, + -0.009661590680480003, + 0.019666289910674095, + -0.03711797669529915, + -0.050124865025281906, + 0.0031971365679055452, + 0.011774820275604725, + -0.1061137467622757, + -0.024875283241271973, + -0.04834694415330887, + 0.05268257483839989, + 0.002160016680136323, + 0.0009099167655222118, + -0.002680526115000248, + -0.01403620932251215, + 0.011540883220732212, + 0.00924050435423851, + -0.004674837458878756, + -0.012827536091208458, + -0.01614164002239704, + 0.010706508532166481, + 0.009521229192614555, + 0.028337547555565834, + -0.005548201501369476, + 0.017451686784625053, + -0.0344666913151741, + -0.018215881660580635, + 0.006027772091329098, + 0.0058874101378023624, + -0.023830365389585495, + -0.030692512169480324, + -0.01403620932251215, + 0.0104101886972785, + -0.013973826542496681, + 0.0347474180161953, + 0.008024033159017563, + -0.03767942637205124, + 0.01632879115641117, + 0.016890238970518112, + -0.03247043117880821, + 0.013474761508405209, + 0.0022282481659203768, + -0.03192457929253578, + 0.0033024081494659185, + 0.06762333959341049, + 0.02320653386414051, + 0.00511151971295476, + -0.013334399089217186, + -0.08727402985095978, + -0.011759224347770214, + 0.05527147278189659, + -0.0061408416368067265, + 0.012305077165365219, + 0.0031425512861460447, + -0.021069910377264023, + -0.025124814361333847, + -0.05817228928208351, + -0.031425513327121735, + -0.005727553274482489, + -0.014028411358594894, + 0.0027370608877390623, + -0.00924050435423851, + -0.0022594397887587547, + -0.03189338743686676, + -0.008983174338936806, + 0.015213691629469395, + 0.010511561296880245, + -0.017108580097556114, + 0.024688132107257843, + -0.01358393207192421, + 0.005275275558233261, + 0.013194036670029163, + -0.030754894018173218, + -0.014714626595377922, + -0.004604656714946032, + 0.008655662648379803, + -0.040829773992300034, + -0.0042030648328363895, + 0.013240824453532696, + 0.0011765073286369443, + -0.02085156925022602, + 0.04335629194974899, + 0.019151628017425537, + 0.013716495595872402, + -0.026762373745441437, + 0.05835944041609764, + 0.00905335508286953, + -0.025608284398913383, + -0.004413607995957136, + 0.018668157979846, + 0.009318483993411064, + 0.057517267763614655, + -0.03247043117880821, + 0.004659241996705532, + -0.03480979800224304, + 0.015322862192988396, + -0.022411147132515907, + 0.01611045002937317, + -0.03183100372552872, + 0.03137872740626335, + 0.000874826277140528, + -0.01176702231168747, + 0.00788367073982954, + -0.022052444517612457, + 0.013006887398660183, + 0.0011121747083961964, + -0.0042186607606709, + -0.008679056540131569, + -0.015198095701634884, + 0.0013617072254419327, + -0.0035051533486694098, + -0.016437960788607597, + 0.024173472076654434, + -0.0037546860985457897, + -0.0006467378698289394, + -0.009739569388329983, + 0.007969447411596775, + -0.004803502932190895, + -0.020383695140480995, + -0.0024660839699208736, + 0.0013285662280395627, + -0.045009445399045944, + -0.007283233106136322, + 0.015330660156905651, + 0.011267957277595997, + 0.05134133622050285, + -0.02952282689511776, + 0.03621342033147812, + -0.033780477941036224, + -0.009170323610305786, + -0.006764673162251711, + -0.004199165850877762, + -0.016079258173704147, + 0.03136312961578369, + 0.045945193618535995, + -0.006963519379496574, + 0.007045397534966469, + -0.007852479815483093, + -0.008257970213890076, + -0.021069910377264023, + 0.022395551204681396, + -0.005856218747794628, + 0.02573304995894432, + -0.0007661430863663554, + -0.018403030931949615, + -0.02624771185219288, + -0.006312395446002483, + -0.004557868931442499, + -0.01650034449994564, + -0.02049286663532257, + 0.009045557118952274, + -0.016703089699149132, + 0.03789776563644409, + 0.02389274723827839, + -0.05127895250916481, + 0.007871974259614944, + 0.0427948422729969, + -0.04532136023044586, + -0.027230245992541313, + 0.04238935187458992, + 0.045570895075798035, + 0.004234256688505411, + -0.0063006985001266, + -0.05240184813737869, + -0.011291351169347763, + -0.020742397755384445, + 0.012078938074409962, + 0.015876512974500656, + 0.060449276119470596, + -0.023050574585795403, + 0.029928317293524742, + 0.012796344235539436, + 0.01957271434366703, + 0.01611045002937317, + 0.009801953099668026, + 0.019245203584432602, + 0.01593889482319355, + 0.05131014436483383, + -0.014176571741700172, + 0.02503124065697193, + -0.04769192263484001, + -0.035402439534664154, + -0.002002109307795763, + -0.02715226821601391, + -0.016968218609690666, + -0.024516578763723373, + 0.01699940860271454, + 0.03767942637205124, + -0.020212141796946526, + -0.018215881660580635, + 0.019635098055005074, + 0.012804142199456692, + -0.002598648192360997, + -0.002093734685331583, + -0.02194327488541603, + -0.011618861928582191, + -0.008226778358221054, + -0.005988782737404108, + -0.004051005933433771, + -0.003918441943824291, + -0.015307266265153885, + -0.019151628017425537, + 0.0021834103390574455, + 0.0718030110001564, + 0.016593918204307556, + -0.018356243148446083, + 0.0023861555382609367, + -0.02195887081325054, + -0.05330640450119972, + -0.024391813203692436, + -0.011696841567754745, + 0.0021834103390574455, + -0.003688403870910406, + 0.023674406111240387, + 0.039956409484148026, + -0.03767942637205124, + -0.002427094615995884, + 0.021990060806274414, + 0.04713047295808792, + -0.0221148282289505, + -0.01832505129277706, + 0.014784807339310646, + 0.0010926799150183797, + -0.02153778448700905, + 0.0024797304067760706, + 0.006678896490484476, + -0.05361831933259964, + 0.02846231311559677, + 0.02916412428021431, + 0.02029012143611908, + 0.015057733282446861, + -0.047036897391080856, + 0.014433901757001877, + 0.02500004880130291, + 0.010230837389826775, + 0.011899586766958237, + 0.032158516347408295, + -0.005517010111361742, + 0.015868714079260826, + -0.026731181889772415, + -0.043574631214141846, + -0.015276074409484863, + -0.00687774270772934, + 0.004959460813552141, + -0.013544942252337933, + -0.0030372797045856714, + 0.04675617441534996, + 0.027074288576841354, + 0.04660021513700485, + -0.04669379070401192, + 0.05361831933259964, + 0.02646605297923088, + 0.018449816852808, + -0.043761782348155975, + -0.050623927265405655, + 0.02484409138560295, + -0.03764823451638222, + 0.001152138807810843, + 0.030567744746804237, + 0.021693741902709007, + 0.000977660994976759, + 0.04603876546025276, + -0.028898995369672775, + -0.04978175461292267, + 0.005478020757436752, + -0.026528436690568924, + 0.01846541278064251, + -0.02228638157248497, + 0.00296514923684299, + -0.0315190888941288, + 0.026200924068689346, + -0.025655072182416916, + 0.0006369904731400311, + 0.0031912880949676037, + 0.03265758231282234, + 0.028337547555565834, + 0.03714916855096817, + 0.036306995898485184, + -0.02665320225059986, + 0.03746108338236809, + 0.02083597332239151, + 0.012258289381861687, + -0.013038079254329205, + 0.007454786915332079, + 0.027027500793337822, + 0.010527157224714756, + -0.0037936754524707794, + -0.017280133441090584, + 0.0025889009702950716, + -0.010020294226706028, + 0.02370559796690941, + 0.05430453643202782, + -0.008741439320147038, + 0.014254550449550152, + 0.005454626865684986, + 0.03515290841460228, + 0.03356213495135307, + -0.040330708026885986, + 0.019837843254208565, + -0.017857177183032036, + -0.03222090005874634, + 0.006417667027562857, + 0.05611364543437958, + -0.021038718521595, + 0.005154408048838377, + -0.0670618936419487, + 0.025623880326747894, + 0.02066441997885704, + -0.006238315254449844, + -0.03356213495135307, + 0.0030489766504615545, + -0.01203215029090643, + 0.022801043465733528, + 0.022223997861146927, + -0.006834854371845722, + 0.016172831878066063, + -0.01977545954287052, + 0.02354964055120945, + 0.00941985659301281, + 0.01813790202140808, + 0.004682635422796011, + -0.0045188795775175095, + -0.020602036267518997, + -0.010550551116466522, + 0.010722104460000992, + 0.05311925336718559, + -0.012944504618644714, + 0.0016278104158118367, + -0.0064683533273637295, + -0.017061792314052582, + 0.0012700819643214345, + 0.006039469037204981, + -0.06843432039022446, + 0.01331100519746542, + 0.007189658470451832, + 0.003140601795166731, + 0.01203215029090643, + -0.014082997106015682, + 0.025124814361333847, + -0.012266087345778942, + -0.007045397534966469, + 0.0016346335178241134, + 0.047348812222480774, + 0.01476141344755888, + -0.02935127355158329, + 0.018028730526566505, + 0.0052440837025642395, + 0.017326921224594116, + 0.008078617975115776, + 0.02774490788578987, + 0.005832824856042862, + 0.03917662054300308, + 0.026232115924358368, + 0.02482849545776844, + -0.0601685531437397, + 0.03222090005874634, + 0.013303207233548164, + 0.00988772977143526, + 0.02573304995894432, + 0.03808491677045822, + -0.002852079691365361, + 0.026044966652989388, + -0.018777329474687576, + 0.008546492084860802, + 0.015330660156905651, + -0.010807881131768227, + -0.005279174540191889, + 0.014660040847957134, + -0.013981624506413937, + 0.02590460516512394, + 0.012484428472816944, + 0.021069910377264023, + -0.008686854504048824, + 0.0028891197871416807, + 0.00040037313010543585, + 0.013022483326494694, + 0.000405734172090888, + -0.01394263468682766, + 0.03368690237402916, + -0.03200255706906319, + 0.020009396597743034, + -0.03955091908574104, + 0.009630399756133556, + 0.06650044023990631, + -0.037741806358098984, + 0.004655343014746904, + 0.013240824453532696, + -0.006363081745803356, + -0.024033110588788986, + 0.02935127355158329, + -0.011314744129776955, + -0.021147888153791428, + -0.017607644200325012, + -0.028914591297507286, + 0.028945783153176308, + 0.017077388241887093, + 0.0166563019156456, + -0.03593269735574722, + -0.019978204742074013, + -0.004343427252024412, + -0.013186238706111908, + 0.0025148207787424326, + 0.011119796894490719, + 0.016437960788607597, + -0.01832505129277706, + 0.006125245708972216, + -0.008024033159017563, + -0.006916732061654329, + -0.011213371530175209, + 0.005649574100971222, + 0.011283553205430508, + 0.017311325296759605, + 0.011275755241513252, + -0.0168746430426836, + 0.0177324116230011, + 0.023518448695540428, + 0.03041178733110428, + 0.018714945763349533, + -0.0027526565827429295, + -0.030848469585180283, + -0.008218980394303799, + -0.013841262087225914, + -0.010846870951354504, + 0.01579073630273342, + 0.01955711841583252, + -0.02370559796690941, + -0.0024875281378626823, + -0.0003506615466903895, + -0.0293668694794178, + 0.0337492860853672, + -0.007669229060411453, + -0.00661651324480772, + -0.002048896625638008, + 0.006316294427961111, + 0.014893977902829647, + 0.004101692233234644, + -0.007981144823133945, + 0.018886499106884003, + 0.007595148868858814, + 0.0016726483590900898, + -0.005973186809569597, + 0.0005955641390755773, + 0.0006623336230404675, + 0.004382416605949402, + 0.026138540357351303, + 0.009529026225209236, + -0.008905194699764252, + -0.009630399756133556, + 0.0009065052145160735, + 0.07517170161008835, + 0.004078298807144165, + 0.005364951211959124, + -0.00968498457223177, + -0.01241424772888422, + 0.0018802672857418656, + 0.0025284672155976295, + 0.005322062876075506, + 0.013014685362577438, + -0.0273550134152174, + -0.0179507527500391, + 0.0034271744079887867, + -0.0029437050689011812, + -0.015478819608688354, + 0.03696201741695404, + -0.001530336681753397, + -0.06462894380092621, + -0.017638836055994034, + -0.004861987195909023, + 0.027074288576841354, + 0.015361851081252098, + 0.017295729368925095, + 0.021631358191370964, + 0.005864016246050596, + 0.027417395263910294, + -0.0050257425755262375, + 0.01595449075102806, + 0.023596428334712982, + 0.007177961524575949, + 0.003263418795540929, + -0.0019104840466752648, + 0.0011297198943793774, + -0.016983812674880028, + 0.014847190119326115, + -0.0034232756588608027, + -0.04890839383006096, + 0.022177211940288544, + 0.0030801682732999325, + 0.037772998213768005, + -0.033967625349760056, + -0.014901775866746902, + -0.002690273569896817, + -0.004904875531792641, + 0.04915792495012283, + 0.01441830676048994, + -0.020960738882422447, + -0.047910261899232864, + -0.029663190245628357, + 0.004437001887708902, + 0.01342017576098442, + 0.027760503813624382, + 0.020180949941277504, + -0.008320352993905544, + 0.021475400775671005, + -0.028181590139865875, + -0.012468832544982433, + -0.0016463304636999965, + 0.009256100282073021, + 0.0006028746720403433, + -0.01449628546833992, + -2.499285983503796e-05, + -0.032501623034477234, + -0.016968218609690666, + -0.013318803161382675, + 0.001906585181131959, + -0.012094534002244473, + 0.006027772091329098, + 0.02085156925022602, + -0.00057655677665025, + 0.006370879709720612, + -0.025280773639678955, + -0.008226778358221054, + -0.02153778448700905, + -0.01186059694737196, + -0.006218820810317993, + 0.014652242884039879, + -0.011002828367054462, + -0.029117336496710777, + 0.023487256839871407, + 0.004826896358281374, + 0.00018337235087528825, + -0.013966028578579426, + -0.02571745589375496, + -0.012188108637928963, + -0.013646314851939678, + 0.003702050307765603, + 0.023284511640667915, + 0.00747428135946393, + 0.013669708743691444, + 0.021085506305098534, + -0.02534315548837185, + 0.007201355416327715, + 0.005540404003113508, + 0.029663190245628357, + 0.005364951211959124, + -0.039207812398672104, + -0.0146834347397089, + 0.024890877306461334, + -0.0572989247739315, + 0.017981944605708122, + 0.036525335162878036, + -0.007037599571049213, + -0.01575174555182457, + 0.012461034581065178, + 0.026731181889772415, + 0.004491587169468403, + -0.00435122475028038, + -0.0020274524576961994, + -0.03880232200026512, + 0.01321743056178093, + 0.0020469471346586943, + -0.01941675692796707, + 0.01514351088553667, + -0.01830945536494255, + 0.02610735036432743, + -0.010215241461992264, + 0.0325951986014843, + 0.011299148201942444, + -0.005727553274482489, + -0.023596428334712982, + 0.006912833079695702, + -0.028555888682603836, + -0.027604544535279274, + -0.019884631037712097, + -0.0002941268321592361, + 0.0043122353963553905, + -0.012655981816351414, + -0.016016874462366104, + -0.00246413447894156, + 0.035433631390333176, + -0.0492515005171299, + 0.05854658782482147, + -0.03752346709370613, + -0.03334379568696022, + 0.01133813802152872, + -0.006678896490484476, + -0.03393643721938133, + -0.0002990005013998598, + 0.011439510621130466, + 0.0315190888941288, + -0.0030002398416399956, + 0.008507502265274525, + -0.01550221350044012, + -0.020726801827549934, + 0.010028092190623283, + 0.009716176427900791, + 0.027245841920375824, + 0.02030571736395359, + 0.026871543377637863, + 0.05449168384075165, + -0.035995081067085266, + 0.016734281554818153, + -0.03718036040663719, + -0.014745817519724369, + 0.028680654242634773, + -0.0018890398787334561, + -0.018808521330356598, + -0.018449816852808, + -0.01529946830123663, + 0.002746808109804988, + 0.02375238575041294, + 0.016406768932938576, + -0.023190937936306, + 0.00018982998153660446, + -0.03368690237402916, + 0.00715456809848547, + 0.027479778975248337, + 0.009529026225209236, + 0.009552420116961002, + -0.010074879042804241, + 0.005953692365437746, + -0.002612294629216194, + -0.0002709768305066973, + -0.0052440837025642395, + 0.04036189988255501, + -0.054429300129413605, + 0.001353909377939999, + 0.007661431096494198, + 0.02950723096728325, + 0.012055544182658195, + 0.04132883995771408, + -0.032314471900463104, + 0.021849699318408966, + -0.008086415939033031, + 0.02684035152196884, + 0.03530886396765709, + 0.015595788136124611, + 0.010456976480782032, + -0.008468513377010822, + 0.006558028981089592, + 0.02592020109295845, + 0.020742397755384445, + -0.003953532315790653, + 0.003072370309382677, + -0.05611364543437958, + -0.009521229192614555, + 0.031020022928714752, + -0.015798533335328102, + 0.02863386832177639, + -0.01204774621874094, + 0.01899567060172558, + -0.01865256205201149, + -0.02538994327187538, + 0.026372477412223816, + 0.03243923932313919, + 0.020336907356977463, + 0.02935127355158329, + -0.007758904714137316, + 0.00665550259873271, + -0.03353094682097435, + 0.0025674565695226192, + 0.002142471494153142, + -0.01412978395819664, + 0.003436921862885356, + 0.03041178733110428, + -0.022567106410861015, + 0.0034759112168103456, + 0.008429523557424545, + -0.014301338233053684, + -0.005364951211959124, + -0.010932647623121738, + -0.03421716019511223, + 0.02953842282295227, + -0.040330708026885986, + 0.013170643709599972, + -0.07267637550830841, + -0.015814129263162613, + -0.010402390733361244, + -0.020399291068315506, + -0.015712756663560867, + 0.003703999798744917, + -0.00013012735871598125, + 0.010995030403137207, + 0.015346256084740162, + -0.015346256084740162, + 0.020695611834526062, + -0.022567106410861015, + -0.010191847570240498, + 0.012523418292403221, + -0.007427494041621685, + -0.03140991926193237, + 0.014644444920122623, + -0.03206494078040123, + 0.012188108637928963, + 0.01904245838522911, + -0.023268915712833405, + 0.01813790202140808, + -0.022567106410861015, + 0.027292629703879356, + 0.0058133299462497234, + -0.03024023398756981, + 0.0134981544688344, + 0.02426704578101635, + -0.005021844059228897, + 0.017514070495963097, + 0.005988782737404108, + -0.010394592769443989, + -0.0002485578879714012, + -0.013131653890013695, + 0.012086736038327217, + -0.033250220119953156, + 0.002836483996361494, + -0.021880891174077988, + 0.0009172272984869778, + -0.03337498754262924, + -0.016219619661569595, + -0.0028910692781209946, + 0.001152138807810843, + 0.018200285732746124, + 0.01358393207192421, + -0.008484109304845333, + 0.004655343014746904, + 0.008912992663681507, + -0.013342197053134441, + 0.023596428334712982, + 0.00034676259383559227, + 0.025265177711844444, + 0.009357472881674767, + -0.02426704578101635, + -0.0024524377658963203, + -0.004635848104953766, + 0.009232706390321255, + -0.013459165580570698, + -0.022036848589777946, + 0.005450727883726358, + -0.038116104900836945, + 0.009287292137742043, + -0.012102331966161728, + 0.007415797561407089, + 0.003327751299366355, + 0.016437960788607597, + 0.011353733949363232, + 0.006791966035962105, + -0.019136032089591026, + 0.014738019555807114, + 0.06063642352819443, + -0.023799173533916473, + -0.029429253190755844, + 0.03247043117880821, + 0.013264218345284462, + 0.018590180203318596, + 0.008897397667169571, + -0.018980074673891068, + 0.00687774270772934, + -0.06066761538386345, + 0.010215241461992264, + -0.02428264170885086, + 0.008616672828793526, + -0.023112958297133446, + 0.01941675692796707, + -0.03337498754262924, + -0.0018383535789325833, + 0.0022438440937548876, + 0.01990022510290146, + 0.02878982573747635, + -0.022161616012454033, + 0.02116348408162594, + 0.005041338503360748, + -0.002095684176310897, + 0.005754845682531595, + 0.016625110059976578, + -0.006955721415579319, + 0.005489717703312635, + 0.037960149347782135, + 0.013880251906812191, + -0.008710247464478016, + 0.019089244306087494, + -0.029304485768079758, + 0.027448587119579315, + -0.007177961524575949, + 0.017514070495963097, + 0.0003794162767007947, + 0.020243333652615547, + -0.026029370725154877, + 0.036899633705616, + 0.015291670337319374, + -0.03148789703845978, + 0.07417356967926025, + 0.012125725857913494, + 0.02808801457285881, + -0.03237685561180115, + -0.035433631390333176, + -0.00022223997802939266, + 0.016375577077269554, + 0.005131014157086611, + 0.05839063227176666, + -0.004390214569866657, + 0.01955711841583252, + 0.027479778975248337, + 0.014566466212272644, + -0.0004946789122186601, + 0.023315703496336937, + -0.0027507070917636156, + -0.020383695140480995, + -0.03980045020580292, + 0.0024348923470824957, + 0.0062500122003257275, + -0.004932167939841747, + -0.011743628419935703, + -0.0020469471346586943, + -0.00013938735355623066, + -0.03674367815256119, + -0.0039008965250104666, + -0.01611045002937317, + 0.029429253190755844, + 0.01958831027150154, + -0.007704319432377815, + -0.005255780648440123, + -0.0016960420180112123, + 0.03602627292275429, + 0.010566147044301033, + 0.015330660156905651, + 0.028119206428527832, + 0.0022613892797380686, + -0.011455106548964977, + 0.05995021015405655, + -0.0033667408861219883, + -0.012344066053628922, + 0.01830945536494255, + -0.01612604595720768, + 0.024235855787992477, + -0.01990022510290146, + -0.04254531115293503, + 0.000646250497084111, + -0.029850339516997337, + -0.04578923434019089, + -0.008749237284064293, + -0.008920790627598763, + -0.006951822433620691, + 0.03349975496530533, + 0.004136783070862293, + 0.007224748842418194, + -0.014558668248355389, + -0.02227078564465046, + -0.0014270145911723375, + -0.006842652335762978, + 0.00457346485927701, + 0.041422415524721146, + -0.0017291830154135823, + -0.0060082776471972466, + 0.007782298605889082, + -0.013342197053134441, + 0.016204023733735085, + -0.03117598034441471, + 0.01651594042778015, + -0.04441680386662483, + -0.008429523557424545, + 0.009380866773426533, + 0.037617042660713196, + 0.02046167477965355, + -0.018917690962553024, + 0.025655072182416916, + 0.006269507110118866, + -0.018730541691184044, + 0.009731772355735302, + 0.007053195498883724, + -0.009107940830290318, + -0.008616672828793526, + -0.006292900536209345, + 0.007903166115283966, + 0.03042738325893879, + 0.0001505968248238787, + 0.018527796491980553, + 0.015042138285934925, + -0.013381186872720718, + -0.018247071653604507, + -0.03346856310963631, + 0.024048706516623497, + -0.0066477046348154545, + -0.010043688118457794, + 0.0018978124717250466, + 0.01975986361503601, + -0.018184689804911613, + 0.002298429375514388, + 0.0252027940005064, + -0.0004084146930836141, + -0.039239004254341125, + 0.016952622681856155, + 0.02808801457285881, + -0.012445438653230667, + -0.0017759704496711493, + 0.015065531246364117, + -0.008951982483267784, + -0.04778549447655678, + -0.001624886179342866, + -0.003988622687757015, + 0.021631358191370964, + -0.010901455767452717, + 0.007505473215132952, + -0.007704319432377815, + -0.010480369441211224, + ], + "index": 34, + }, + { + "title": "Heather McKay", + "text": "Heather Pamela McKay (n\u00e9e Blundell) AM MBE (born 31 July 1941) is a retired Australian squash player, who is considered by many to be the greatest female player in the history of the game, and possibly also Australia's greatest-ever sportswoman. She dominated the women's squash game in the 1960s and 1970s, winning 16 consecutive British Open titles between 1962 and 1977, and capturing the inaugural women's World Open title in 1979, whilst remaining undefeated during that period.", + "vector": [ + 0.0002245446521556005, + 0.015260408632457256, + -0.020244965329766273, + 0.042084988206624985, + -0.028726378455758095, + -0.008067311719059944, + 0.016702095046639442, + -0.04285184293985367, + 0.021211201325058937, + 0.03659430891275406, + -0.05475342646241188, + 0.037023745477199554, + -0.014378526248037815, + 0.007208434399217367, + -0.005705398973077536, + 0.006798167247325182, + 0.000541111861821264, + 0.03288273140788078, + -0.03996846824884415, + -0.045183081179857254, + 0.03177845850586891, + 0.0047391620464622974, + -0.002509532030671835, + -0.07214569300413132, + 0.034385766834020615, + 0.03269868344068527, + 0.004585791379213333, + -0.010651611723005772, + 0.00537948589771986, + -0.03613419458270073, + -0.025474913418293, + 0.038864195346832275, + -0.0382813885807991, + 0.009493661113083363, + -0.006675470154732466, + 0.0014541482087224722, + -0.05487612262368202, + 0.003623388474807143, + 0.022530192509293556, + -0.02849632129073143, + 0.034447114914655685, + 0.012292681261897087, + -0.0063342200592160225, + 0.013995098881423473, + 0.007035891991108656, + -0.009094896726310253, + -0.010966022498905659, + 0.017422938719391823, + 0.008466076105833054, + -0.031210986897349358, + 0.05760612711310387, + 0.023312384262681007, + -0.041900940239429474, + 0.031026942655444145, + -0.021870696917176247, + -0.0606735460460186, + 0.01769900694489479, + 0.07668547332286835, + 0.03447778895497322, + -0.009094896726310253, + -0.02401788905262947, + -0.06680838018655777, + 0.002170198829844594, + 0.025290869176387787, + 0.027530085295438766, + -0.08171603828668594, + -0.01789838820695877, + 0.015214397571980953, + -0.039845772087574005, + 0.003550537396222353, + -0.012591754086315632, + -0.004420917481184006, + 0.00569389620795846, + -0.019401423633098602, + 0.01717754639685154, + -0.017070185393095016, + 0.0224381685256958, + 0.014117795042693615, + -0.04515240713953972, + 0.022744910791516304, + -0.0049883900210261345, + -0.04036723077297211, + -0.0341096967458725, + 0.03361891210079193, + 0.0121086360886693, + -0.028480984270572662, + 0.016763444989919662, + -0.06686972826719284, + -0.004815847612917423, + 0.023665135726332664, + -0.03549003601074219, + 0.06042814999818802, + 0.05506017059087753, + 0.04073532298207283, + -0.006510596722364426, + -0.009961443021893501, + -0.017745018005371094, + -0.00493470998480916, + 0.005072744097560644, + -0.01593524031341076, + -0.03506059944629669, + -0.01250740047544241, + 0.03745318576693535, + 0.012093299068510532, + 0.0024347638245671988, + 0.009102565236389637, + -0.029186490923166275, + 0.006591116078197956, + -5.056448208051734e-05, + -3.447850758675486e-05, + 0.03631823882460594, + -0.0038266051560640335, + -0.02717733196914196, + -0.020505694672465324, + -0.054600056260824203, + -0.0035965486895292997, + -0.02329704724252224, + 0.05996803939342499, + -0.002547874813899398, + -0.02191670797765255, + -0.011395460925996304, + -0.006418574135750532, + 0.01453956589102745, + 0.008872509002685547, + 0.02999935671687126, + -0.01723889447748661, + -0.024600699543952942, + 0.021701987832784653, + -0.0011799976928159595, + -0.0073618050664663315, + 0.01730024255812168, + 0.03969240188598633, + 0.003968473058193922, + 0.013251249678432941, + -0.02671721763908863, + 0.008542761206626892, + 0.03377228230237961, + 0.007265948224812746, + 0.0463486984372139, + 0.04321993142366409, + 0.025474913418293, + -0.005789753049612045, + 0.03177845850586891, + -0.002463520737364888, + -0.0367170050740242, + -0.008473744615912437, + 0.0211805272847414, + -0.002992650493979454, + -0.021686650812625885, + -0.008466076105833054, + 0.028266264125704765, + 0.03180913254618645, + 0.05027499422430992, + -0.06852613389492035, + 0.026502499356865883, + 0.01901799626648426, + -0.0459192618727684, + -0.0021011820062994957, + 0.014332514256238937, + 0.0535571351647377, + -0.04579656198620796, + -0.004340397659689188, + -0.004696985241025686, + -0.023450417444109917, + -0.035305991768836975, + 0.02033698745071888, + -0.0321158766746521, + 0.005187772214412689, + -0.018389176577329636, + 0.018711255863308907, + -0.04481498897075653, + 0.01490765530616045, + 0.022882943972945213, + 0.029631266370415688, + -0.029385872185230255, + 0.0056593879126012325, + 0.024524014443159103, + -0.01869591884315014, + 0.012530406005680561, + 0.0017484287964180112, + -0.03395632654428482, + 0.0058971126563847065, + -0.02323569729924202, + -0.015590156428515911, + -0.026962611824274063, + 0.005329640116542578, + 0.03015272691845894, + -0.010122482664883137, + -0.027806151658296585, + 0.0021050162613391876, + 0.014225155115127563, + -0.051900725811719894, + -0.021011820062994957, + -0.0011723291827365756, + 0.008910851553082466, + -0.03133368492126465, + 0.00769922137260437, + 0.022668225690722466, + -0.015137712471187115, + -0.006253700237721205, + -0.0028565337415784597, + -0.051839377731084824, + -0.009930768981575966, + -0.010237510316073895, + 0.027422724291682243, + 0.015781870111823082, + 0.038986895233392715, + -0.0209197960793972, + -0.003552454523742199, + 0.030459469184279442, + -0.022223450243473053, + 0.013995098881423473, + 0.008757480420172215, + -0.03226924687623978, + -0.021287886425852776, + 0.011395460925996304, + -0.017392264679074287, + -0.002465437864884734, + -0.009156245738267899, + -0.011441471986472607, + -0.008243688382208347, + -0.015229734592139721, + -0.0473916232585907, + 0.020168278366327286, + 0.029984019696712494, + 0.07251378148794174, + -0.04552049562335014, + 0.017929064109921455, + -0.002869953867048025, + 0.00039109590579755604, + -0.013151558116078377, + 0.01960080675780773, + 0.031686436384916306, + 0.03389497846364975, + 0.023450417444109917, + -0.002657151548191905, + 0.008596441708505154, + 0.0028546166140586138, + 0.03969240188598633, + -0.00374416820704937, + 0.03079688549041748, + -0.021149853244423866, + 0.015781870111823082, + -0.020766425877809525, + -0.012169984169304371, + 0.00015984127821866423, + 0.005279794801026583, + -0.04576588794589043, + -0.03533666580915451, + -0.04539779946208, + 0.04275982081890106, + -0.003038661787286401, + 0.026287779211997986, + 0.04404813423752785, + 0.010582595132291317, + 0.007081903517246246, + 0.05521354079246521, + -0.06410905718803406, + 0.028189579024910927, + 0.014401531778275967, + -0.017131533473730087, + -0.012898496352136135, + -0.010513578541576862, + 0.032146550714969635, + -0.00314218713901937, + -0.028649691492319107, + -0.02059771679341793, + 0.01463925652205944, + -0.037085093557834625, + -0.011433803476393223, + -0.022606877610087395, + -0.01849653571844101, + -0.030750874429941177, + 0.04125678539276123, + 0.00917925126850605, + 0.00681350426748395, + -0.06417040526866913, + -0.023113001137971878, + -0.004443923011422157, + -0.013542653992772102, + -0.021287886425852776, + -0.02271423675119877, + 0.010897005908191204, + 0.005091915372759104, + -0.025183508172631264, + 0.023527102544903755, + 0.039232287555933, + 0.00409500440582633, + 0.010383212938904762, + -0.021548617631196976, + 0.01756097376346588, + 0.01408712100237608, + 0.039324309676885605, + 0.0020321649499237537, + 0.051563311368227005, + 0.029370535165071487, + -0.03196250647306442, + -0.020122267305850983, + 0.04429353028535843, + 0.01043689250946045, + 0.03585812821984291, + 0.05567365139722824, + -0.04693150892853737, + 0.020613055676221848, + -0.06453849375247955, + -0.020505694672465324, + -0.04009116441011429, + 0.036164868623018265, + 0.0032303754705935717, + -0.024339968338608742, + 0.005153263919055462, + 0.0027089142240583897, + -0.02771412953734398, + 0.023772496730089188, + -0.00016259716358035803, + 0.048127803951501846, + 0.01651805080473423, + 0.057422082871198654, + -0.03239194303750992, + -0.046164654195308685, + 0.029339861124753952, + 0.02263755165040493, + 0.010076470673084259, + 0.007572690490633249, + 0.004624133929610252, + -0.04693150892853737, + 0.03190115466713905, + -0.007139417342841625, + -0.00224688439629972, + 0.023404406383633614, + 0.0036387257277965546, + -0.03245329111814499, + 0.017131533473730087, + -0.04067397490143776, + 0.05944657698273659, + -0.004773670807480812, + -0.028066882863640785, + 0.0489560067653656, + -0.04036723077297211, + 0.038465432822704315, + -0.048403870314359665, + -0.008197677321732044, + 0.007354136556386948, + 0.05226881802082062, + -0.013619340024888515, + 0.005636382382363081, + 0.01618063449859619, + -0.038404084742069244, + 0.01723889447748661, + 0.02383384481072426, + 0.0007194055942818522, + 0.01250740047544241, + 0.022070078179240227, + 0.03573542833328247, + -0.006690807640552521, + 0.023941203951835632, + 0.021088505163788795, + -0.022806258872151375, + 0.0027875169180333614, + -0.043066561222076416, + 0.06009073555469513, + -0.02593502588570118, + 0.02276024781167507, + -0.009608689695596695, + 0.043066561222076416, + -0.005724570248275995, + 0.0025612947065383196, + -0.029232501983642578, + 0.009332621470093727, + -0.04275982081890106, + -0.0009000957361422479, + -0.03521396964788437, + -0.011602511629462242, + -0.011556500568985939, + -0.0054063256829977036, + -0.024861430749297142, + -0.06061219796538353, + -0.03493789955973625, + -0.01776035502552986, + 0.004286718089133501, + -0.06269804388284683, + 0.0703052431344986, + -0.01671743206679821, + -0.02861901745200157, + -0.0067023104056715965, + -0.0112190842628479, + 0.06441579759120941, + -0.026088397949934006, + 0.03665565699338913, + -0.017192883417010307, + 0.0021491104271262884, + 0.03960037603974342, + 0.031747784465551376, + -0.008596441708505154, + 0.008136328309774399, + -0.010935348458588123, + 0.038465432822704315, + 0.030551491305232048, + -0.01250740047544241, + -0.018588557839393616, + -0.011403129436075687, + -0.014125463552772999, + -0.023971877992153168, + -0.029600592330098152, + -0.006234528962522745, + -0.0272540170699358, + 0.0489560067653656, + -0.02059771679341793, + -0.011686866171658039, + -0.0031920326873660088, + 0.03598082438111305, + 0.05429331585764885, + -0.03407902270555496, + -0.028526995331048965, + -0.03361891210079193, + 0.0054753427393734455, + -4.978564538760111e-05, + 0.018741929903626442, + -0.008696132339537144, + -0.011663860641419888, + -0.01193992793560028, + -0.006717647425830364, + 0.049661509692668915, + -0.01355799101293087, + 0.0008694215212017298, + 0.04125678539276123, + -0.03276003524661064, + 0.017468949779868126, + 0.030030030757188797, + 0.07472232729196548, + -0.028189579024910927, + -0.048005104064941406, + -0.010490572080016136, + 0.016732769086956978, + 0.018910637125372887, + -0.07257512956857681, + -0.02863435447216034, + 0.0072429426945745945, + 0.0381893664598465, + 0.021149853244423866, + -0.014593245461583138, + 0.01237703487277031, + -0.035704754292964935, + -0.011525826528668404, + -0.021809348836541176, + 0.024401316419243813, + 0.007227605674415827, + 0.008949194103479385, + -0.009439981542527676, + 0.012400040403008461, + -0.020521031692624092, + 0.022913619875907898, + 0.030612841248512268, + 0.032483965158462524, + 0.02993800863623619, + -0.013903075829148293, + 0.036103520542383194, + 0.061900511384010315, + -0.05447736009955406, + -0.012215995229780674, + -0.039232287555933, + 0.04291319102048874, + 0.037085093557834625, + -0.019922886043787003, + 0.010950685478746891, + -0.02633379027247429, + 0.016625409945845604, + 0.002549791941419244, + -0.03407902270555496, + -0.028726378455758095, + 0.0912250354886055, + 0.01771434396505356, + -0.07294321805238724, + -0.0005166683695279062, + 0.026609858497977257, + 0.036103520542383194, + 0.05720736086368561, + -0.02935519814491272, + 0.0677899569272995, + 0.016088612377643585, + 0.02841963618993759, + 0.008619447238743305, + -0.022622214630246162, + 0.05033634230494499, + 0.04180891811847687, + -0.05082713067531586, + -0.017330916598439217, + -0.03288273140788078, + -0.014133132062852383, + -0.003690488403663039, + 0.008527424186468124, + 0.029907334595918655, + 0.03139503300189972, + 0.025520924478769302, + 0.02137991040945053, + 0.010521247051656246, + 0.0033185638021677732, + -0.03447778895497322, + -0.001231760368682444, + -0.00040619337232783437, + 0.02225412428379059, + -0.005460005719214678, + -0.006361059844493866, + 0.028051545843482018, + 0.04463094472885132, + -0.015283414162695408, + -0.012630097568035126, + 0.01085866242647171, + -0.04321993142366409, + 0.011334112845361233, + 0.060918938368558884, + 0.08926188945770264, + -0.024600699543952942, + -0.008665458299219608, + 0.009662369266152382, + -0.01815911941230297, + 0.020689740777015686, + 0.02329704724252224, + 0.02587367780506611, + -0.024462666362524033, + -0.011042707599699497, + 0.02665586955845356, + 0.03349621221423149, + 0.04456959664821625, + 0.023726485669612885, + -0.009654700756072998, + -0.016027264297008514, + 0.014792627654969692, + 0.007936946116387844, + 0.013044198974967003, + 0.03141037002205849, + 0.014018104411661625, + -0.0021050162613391876, + 0.001081265159882605, + 0.02567429654300213, + 0.01711619645357132, + -0.015352431684732437, + -0.010605600662529469, + 0.014110126532614231, + -0.0058434330858290195, + 0.030106715857982635, + 0.005260623525828123, + -0.02631845325231552, + -0.07963019609451294, + 0.016027264297008514, + 0.00041026726830750704, + -0.0011704120552167296, + 0.0015816378872841597, + 0.019508784636855125, + 0.001944935298524797, + -0.01372669916599989, + -0.03190115466713905, + -0.03475385531783104, + 0.006456916686147451, + 0.02389519289135933, + -0.019984234124422073, + -0.01372669916599989, + -4.6730208850931376e-05, + 0.02157929167151451, + -0.011755882762372494, + -0.014209818094968796, + -0.02841963618993759, + 0.043588023632764816, + 0.010574926622211933, + 0.0015624664956703782, + 0.011081051081418991, + -0.0031939498148858547, + 0.01395675539970398, + -0.019570132717490196, + 0.006410905625671148, + -0.010751303285360336, + -0.01463925652205944, + 0.06478388607501984, + -0.0034949404653161764, + -0.0016247734893113375, + 0.007752901408821344, + -0.03757588192820549, + -0.013074873015284538, + -0.008903183043003082, + 0.0029696449637413025, + 0.028526995331048965, + 0.017208220437169075, + 0.02067440375685692, + 0.01328959222882986, + 0.02435530535876751, + -0.018082434311509132, + 0.03947767987847328, + 0.008696132339537144, + -0.0041985297575592995, + -0.024125250056385994, + -0.006598785053938627, + -0.03607284650206566, + -0.01543678529560566, + -0.029462559148669243, + -0.009439981542527676, + -0.00044956858619116247, + -0.02263755165040493, + 0.0017436358612030745, + -0.019861537963151932, + 0.015505802817642689, + 0.016962826251983643, + 0.026609858497977257, + -0.011418466456234455, + -0.0133662773296237, + -0.02401788905262947, + -0.00432506063953042, + -0.015306420624256134, + 0.03591947630047798, + 0.005433165468275547, + -0.0300760418176651, + 0.01408712100237608, + -0.04410948231816292, + -0.0047391620464622974, + -0.023711148649454117, + 0.03171711042523384, + -0.020628392696380615, + 0.0006556607550010085, + -0.016748106107115746, + 0.028910422697663307, + -0.038465432822704315, + 0.02757609635591507, + -0.020290976390242577, + -0.013212907128036022, + -0.020827773958444595, + 0.010935348458588123, + -0.005682393442839384, + -0.04861858859658241, + -0.010751303285360336, + -0.016763444989919662, + 0.019462773576378822, + -0.009992117062211037, + -0.0020992648787796497, + 0.039232287555933, + -0.0356740802526474, + -0.002682074438780546, + -0.00822835136204958, + 0.02387985587120056, + -0.020950470119714737, + -0.010206836275756359, + 0.01638001762330532, + 0.04343464970588684, + 0.02837362512946129, + 0.01227734424173832, + -0.05174735561013222, + -0.010897005908191204, + -0.018925974145531654, + -0.0032821381464600563, + -0.011341781355440617, + 0.0208737850189209, + -0.01079731434583664, + -0.025981036946177483, + -0.011832567863166332, + 0.016487376764416695, + 0.0020896790083497763, + -0.022683562710881233, + -0.0054063256829977036, + 0.012806474231183529, + -0.07355670630931854, + 0.017453612759709358, + -0.02743806131184101, + 0.01889530010521412, + -0.014194481074810028, + 0.004815847612917423, + 0.03383363038301468, + 0.0438334159553051, + 0.03196250647306442, + -0.02961592935025692, + 0.019784850999712944, + 0.05088847875595093, + -0.0004030780110042542, + 0.016870804131031036, + -0.035367339849472046, + -0.016794119030237198, + 0.0040106503292918205, + -0.0015078281285241246, + -0.03177845850586891, + -0.03837341070175171, + 0.011272764764726162, + 0.011058044619858265, + -0.0180977713316679, + 0.01591990329325199, + -0.049906905740499496, + -0.013320266269147396, + 0.017085522413253784, + 0.019861537963151932, + -0.0300760418176651, + -0.02751474641263485, + 0.04683948680758476, + 0.0014100541593506932, + 0.005751410499215126, + 0.02731536515057087, + -0.0030942587181925774, + -0.010206836275756359, + 0.03739183768630028, + 0.0043135578744113445, + 0.044845663011074066, + -0.015950577333569527, + -0.019830863922834396, + -0.003859196323901415, + -0.035888802260160446, + -0.007959951646625996, + 0.04325060546398163, + 0.06226860359311104, + 0.025551598519086838, + -0.01861923187971115, + 0.018527209758758545, + 0.0027606768999248743, + -0.007219937164336443, + -0.005130257923156023, + -0.008995206095278263, + 0.044385552406311035, + 0.019232716411352158, + -0.04613398015499115, + -0.0015135795110836625, + -0.011870911344885826, + -0.058986466377973557, + -0.020904459059238434, + -0.016686758026480675, + 0.015950577333569527, + 0.023373732343316078, + 0.007557353470474482, + -0.021165190264582634, + 0.01098902802914381, + -0.006640961859375238, + 0.02771412953734398, + 0.04677813872694969, + -0.015222066082060337, + -0.01056725811213255, + 0.04223835840821266, + 0.010605600662529469, + -0.01743827573955059, + -0.006058152299374342, + -0.006157843396067619, + 0.006966874934732914, + 0.012031950987875462, + 0.030306098982691765, + 0.04159419983625412, + -0.006537436507642269, + 0.02461603656411171, + 0.04555116966366768, + -0.026640532538294792, + -0.013642345555126667, + -0.0033166466746479273, + -0.03371093422174454, + 0.003481520339846611, + 0.026425814256072044, + 0.06205388531088829, + -0.05515219271183014, + 0.01351964846253395, + -0.04229970648884773, + 0.01191692240536213, + -0.007093406282365322, + 0.05033634230494499, + -0.02237682044506073, + -0.013389283791184425, + -0.012614760547876358, + -0.0012518903240561485, + -0.04355734959244728, + 0.00168228754773736, + -0.03987644612789154, + -0.01638001762330532, + 0.020290976390242577, + -0.002668654313310981, + 0.0029102135449647903, + 0.02019895240664482, + -0.0127374567091465, + -0.018281815573573112, + -0.024002552032470703, + 0.0136270085349679, + -0.01929406449198723, + -0.01644136570394039, + -0.016625409945845604, + 0.003356906585395336, + 0.0028622851241379976, + 0.03665565699338913, + -0.028941096737980843, + -0.013903075829148293, + -0.008182340301573277, + 0.01651805080473423, + -0.0017225474584847689, + -0.05855702608823776, + -0.01003812812268734, + -0.03171711042523384, + 0.005536691285669804, + 0.010912342928349972, + 0.023542439565062523, + 0.018711255863308907, + -0.004474597051739693, + -0.0372384637594223, + -0.008143996819853783, + 0.011702203191816807, + 0.032729361206293106, + 0.00506507558748126, + 0.017867714166641235, + -0.022744910791516304, + -0.0011761634377762675, + -0.012653103098273277, + -0.031180312857031822, + 0.03843475878238678, + -0.0007275533862411976, + -0.04723824933171272, + 0.038342736661434174, + -0.017791029065847397, + 0.019125357270240784, + 0.0017263817135244608, + -0.08748278766870499, + 0.04364937171339989, + 0.0004124240658711642, + -0.04914005100727081, + 0.016103949397802353, + 0.02975396253168583, + -0.010068802163004875, + 0.01749962382018566, + -0.008335710503160954, + -0.02915581688284874, + -0.015482796356081963, + -0.01802108623087406, + -0.049661509692668915, + -0.005375651642680168, + -0.006188517436385155, + 0.015551813878118992, + 0.018910637125372887, + -0.02783682569861412, + 0.0011454892810434103, + 0.01180956233292818, + -0.021686650812625885, + 0.012315686792135239, + -0.0331587977707386, + -0.011019702069461346, + -0.013404620811343193, + -0.007208434399217367, + -0.048005104064941406, + -0.0024462665896862745, + -0.011188410222530365, + -0.01723889447748661, + 0.015229734592139721, + -0.01802108623087406, + 0.002398338168859482, + -0.010897005908191204, + 0.02363446168601513, + -0.016548724845051765, + -0.024370642378926277, + -0.047023531049489975, + -0.02685525268316269, + 0.0025191176682710648, + -0.0024501008447259665, + 0.02559760957956314, + -0.05177802965044975, + -0.009232930839061737, + -0.02357311360538006, + 0.046624768525362015, + -0.0027491741348057985, + -0.0016525719547644258, + -0.011510489508509636, + 0.005095749627798796, + -0.017929064109921455, + 0.0229596309363842, + -0.014554902911186218, + 0.015022683888673782, + 0.04303588718175888, + -0.014915323816239834, + -0.005839598830789328, + 0.015505802817642689, + -0.009171582758426666, + 0.008734474889934063, + -0.004930875729769468, + -0.01633400470018387, + -0.04180891811847687, + 0.017867714166641235, + -0.05598039552569389, + 0.019769513979554176, + 0.007350302301347256, + 0.033802956342697144, + -0.0065681105479598045, + -0.038986895233392715, + 0.04877195879817009, + -0.01843518763780594, + 0.029002444818615913, + 0.03711576759815216, + 0.06294343620538712, + -0.031287673860788345, + 0.018143782392144203, + -0.02883373759686947, + 0.052422188222408295, + 0.01849653571844101, + 0.027208006009459496, + 0.009923100471496582, + -0.012392371892929077, + -0.007772072684019804, + 0.036747679114341736, + -0.00963936373591423, + 0.037943970412015915, + 0.004355734679847956, + -0.020091593265533447, + -0.002386835403740406, + -0.005736073479056358, + -0.007396313827484846, + 0.0060313125140964985, + 0.010084139183163643, + -0.01056725811213255, + 0.012814142741262913, + 0.0005679517635144293, + -0.004305889364331961, + -0.01889530010521412, + -0.004236872307956219, + -0.04690083488821983, + 0.03322014585137367, + -0.040428582578897476, + -0.0017167959595099092, + -0.013304929248988628, + -0.01743827573955059, + 0.025766318663954735, + -0.007580359000712633, + 0.028051545843482018, + 0.0007534347823821008, + 0.025582272559404373, + 0.02593502588570118, + -0.03555138409137726, + -0.0030750874429941177, + -0.014961335808038712, + 0.0010573009494692087, + 0.015045689418911934, + -0.020613055676221848, + -0.00858877319842577, + -0.021962719038128853, + -0.021794011816382408, + -0.057882193475961685, + -0.019708165898919106, + 0.06125635653734207, + -0.011533495038747787, + -0.012706782668828964, + 0.036164868623018265, + 0.048526566475629807, + -0.012599422596395016, + 0.012821811251342297, + 0.007078069262206554, + -0.039232287555933, + -0.0033530723303556442, + -0.021149853244423866, + -0.025244858115911484, + 0.04285184293985367, + -0.02039833553135395, + 0.010720629245042801, + 0.013811053708195686, + -0.0315944142639637, + -0.02659452147781849, + 0.03199318051338196, + 0.01563616842031479, + 0.010444561019539833, + -0.035766102373600006, + 0.05699264258146286, + -0.026824578642845154, + 0.033925652503967285, + -0.017208220437169075, + 0.04187026619911194, + 0.00769922137260437, + 0.005774416029453278, + 0.028143567964434624, + -0.012515068985521793, + -0.00763403857126832, + -0.017683669924736023, + -0.022146765142679214, + -0.06186983734369278, + 0.019846200942993164, + -0.057544779032468796, + 0.020382998511195183, + -0.009117902256548405, + 0.0027165827341377735, + -0.02513749711215496, + -0.02723868004977703, + 0.0504283644258976, + 0.0038649477064609528, + -0.007806580979377031, + -0.0020359992049634457, + -0.013281923718750477, + 0.013834059238433838, + 0.028465647250413895, + -0.017024174332618713, + 0.04969218745827675, + 0.02579699270427227, + -0.018327828496694565, + 0.01556715089827776, + 0.006855681072920561, + -0.006587281823158264, + -0.01125742681324482, + -0.023803170770406723, + -0.0443548783659935, + 0.053802527487277985, + -0.0032418782357126474, + 0.009884756989777088, + -0.03039812110364437, + -0.012990518473088741, + 0.0038266051560640335, + -0.03868015110492706, + -0.0165793988853693, + 0.026073060929775238, + 0.008680795319378376, + -0.017622321844100952, + 0.00044549466110765934, + -0.024385979399085045, + 0.028588343411684036, + 0.02343508042395115, + -0.0044362545013427734, + -0.02961592935025692, + -0.01062860619276762, + 0.035582058131694794, + 0.0030808388255536556, + 0.056164439767599106, + 0.026548510417342186, + 0.005851101595908403, + -0.005134092178195715, + 0.03233059495687485, + 0.017024174332618713, + 0.011870911344885826, + 0.045183081179857254, + -0.04073532298207283, + -0.011932259425520897, + -0.010283521376550198, + -0.008665458299219608, + 0.03141037002205849, + 0.012354029342532158, + 0.008481413125991821, + 0.009524335153400898, + 0.024968789890408516, + -0.007591861765831709, + 0.014324845746159554, + 0.015022683888673782, + -0.011817230843007565, + 0.023465754464268684, + -0.004842687398195267, + 0.015199060551822186, + -0.019002659246325493, + 0.0025996374897658825, + 0.0007817125297151506, + -0.06809669733047485, + -0.008282030932605267, + 0.013312597759068012, + 0.03785194829106331, + -0.009309615939855576, + -2.3028107989375712e-06, + -0.008788155391812325, + -0.004386409185826778, + -0.013343271799385548, + -0.010245178826153278, + 0.02387985587120056, + -0.016073275357484818, + 0.011012033559381962, + -0.003320480929687619, + 0.005690061952918768, + -0.01776035502552986, + -0.0012518903240561485, + 0.016763444989919662, + 0.007120246067643166, + 0.02973862551152706, + -0.02453935146331787, + -0.015199060551822186, + -0.021671313792467117, + 0.02368047460913658, + 0.004907870199531317, + 0.0067061446607112885, + 0.01651805080473423, + -0.04877195879817009, + -0.013887738808989525, + -0.009930768981575966, + -0.010935348458588123, + -0.0027760141529142857, + -0.011464478448033333, + -0.0029217165429145098, + 0.010137819685041904, + 0.01697816327214241, + 0.014853975735604763, + 0.013128552585840225, + 0.003937799017876387, + -0.025428902357816696, + 0.00842006504535675, + 0.01318990159779787, + 0.015360100194811821, + 0.0027089142240583897, + 0.0034125035163015127, + -0.00733879953622818, + -0.0017762272618710995, + 0.000559803971555084, + -0.01644136570394039, + -0.006767492741346359, + -0.04533645138144493, + -0.00054302898934111, + 0.01822046749293804, + 0.04561251774430275, + 0.024953452870249748, + 0.036287564784288406, + -0.0129981879144907, + 0.004378740210086107, + 0.002321652602404356, + -0.030566828325390816, + -0.0034240062814205885, + 0.007737563923001289, + -0.006943869404494762, + 0.0448763370513916, + -0.018588557839393616, + 0.04825050011277199, + -0.01960080675780773, + -0.037023745477199554, + -0.03171711042523384, + 0.009976780042052269, + 0.019907549023628235, + 0.006249865982681513, + -0.021441258490085602, + 0.024339968338608742, + -0.001868249848484993, + -0.0011857490753754973, + -0.012116304598748684, + -0.023404406383633614, + -0.023128338158130646, + 0.01907934620976448, + 0.05260623246431351, + -0.016226645559072495, + 0.03113430179655552, + -0.005157098174095154, + -0.001941101043485105, + -0.037146441638469696, + -0.010153156705200672, + -0.03941633179783821, + 0.018465861678123474, + -0.021947382017970085, + 0.01187857985496521, + -0.0071930973790585995, + -0.05174735561013222, + -0.026103734970092773, + -0.023051653057336807, + 0.0036042171996086836, + 0.015291082672774792, + -0.047422297298908234, + -0.019064009189605713, + 0.027392050251364708, + 0.019846200942993164, + -0.009079559706151485, + 0.00011688543600030243, + -0.008826497942209244, + 0.016686758026480675, + -0.05987601727247238, + -0.030229413881897926, + -0.021993393078446388, + 0.00641473988071084, + 0.009232930839061737, + -0.00641473988071084, + 0.04993757978081703, + 0.0026015546172857285, + 0.03987644612789154, + 0.010145488195121288, + 0.03693172335624695, + -0.01703951135277748, + -0.0024098409339785576, + -0.007875598035752773, + 0.01929406449198723, + 0.03447778895497322, + -0.006134837865829468, + -0.0022526357788592577, + 0.018005749210715294, + -0.005552028305828571, + -0.03111896477639675, + -0.024247946217656136, + 0.01685546711087227, + 0.00881882943212986, + 0.01960080675780773, + -0.028051545843482018, + -0.020168278366327286, + 0.014079452492296696, + -0.03190115466713905, + -0.017883051186800003, + -0.007239108439534903, + 0.0011320692719891667, + -0.00182990706525743, + -0.011886248365044594, + 0.006115666590631008, + -0.009823408909142017, + -0.0008718179306015372, + -0.04002981632947922, + -0.009976780042052269, + -0.0032418782357126474, + -0.03297475352883339, + -0.014761953614652157, + -0.020582379773259163, + 0.01191692240536213, + -0.006545105017721653, + 0.01069762371480465, + -0.014478216879069805, + -0.008995206095278263, + -0.040121838450431824, + -0.004512940067797899, + 0.032944079488515854, + 0.005985300987958908, + -0.015260408632457256, + -0.010973691008985043, + 0.030950255692005157, + 0.0003319043025840074, + -0.02975396253168583, + 0.012384703382849693, + -0.004785173572599888, + -0.012231333181262016, + 0.01355799101293087, + -0.007599530275911093, + -0.017269568517804146, + -0.010920011438429356, + 0.00021064540487714112, + -0.0032629668712615967, + -0.013120884075760841, + -0.012706782668828964, + -0.003477686084806919, + 0.03226924687623978, + 0.03177845850586891, + -0.007530513219535351, + -0.008282030932605267, + 0.01881861500442028, + -0.0070090522058308125, + -0.03966172784566879, + -0.01703951135277748, + 0.009332621470093727, + -0.010950685478746891, + -0.04177824407815933, + 0.02429395727813244, + -0.017867714166641235, + 0.021947382017970085, + -0.03349621221423149, + 0.006203854456543922, + -0.018711255863308907, + -0.03085823357105255, + 0.023603787645697594, + 0.005091915372759104, + -0.010390881448984146, + -0.008711469359695911, + 0.012001276016235352, + -0.007641707081347704, + 0.023189686238765717, + -0.0290791317820549, + 0.00809798575937748, + -0.024692721664905548, + 0.009846414439380169, + -0.009186919778585434, + -0.004792842082679272, + -0.006970709189772606, + -0.004217701032757759, + -0.021563954651355743, + 0.023941203951835632, + -0.021563954651355743, + 0.012599422596395016, + 0.036563631147146225, + -0.03196250647306442, + -0.017269568517804146, + 0.008642452768981457, + -0.01907934620976448, + -0.02493811585009098, + 0.0073119597509503365, + -0.024125250056385994, + -0.015482796356081963, + 0.013964424841105938, + 0.019968897104263306, + 0.032146550714969635, + -0.008726806379854679, + -0.013834059238433838, + -0.018787940964102745, + 0.00778357544913888, + -0.014754285104572773, + -0.010245178826153278, + 0.03276003524661064, + 0.021287886425852776, + 0.0069400351494550705, + 0.017545636743307114, + -0.019002659246325493, + 0.0025862175971269608, + 0.014731279574334621, + -0.0016381933819502592, + -0.0037959308829158545, + 0.004056661389768124, + -0.009624026715755463, + 0.01079731434583664, + -0.03460048511624336, + -0.009785066358745098, + 0.001602726406417787, + -0.00904888566583395, + 0.021287886425852776, + -0.04048993065953255, + 0.0014915324281901121, + -0.02613440901041031, + 0.019171368330717087, + -0.006123335100710392, + 0.0269932858645916, + 0.008282030932605267, + -0.03920161351561546, + -0.04539779946208, + 0.006249865982681513, + -0.04389476403594017, + 0.02947789616882801, + -0.04607263207435608, + -0.0027127484790980816, + -0.006778995506465435, + -0.009002874605357647, + 0.0002892480115406215, + 0.013028861954808235, + 0.016625409945845604, + 0.01756097376346588, + -0.026103734970092773, + 0.004355734679847956, + 0.03910959139466286, + 0.012062625028192997, + 0.018803277984261513, + 0.007975288666784763, + -0.021533280611038208, + 0.026027049869298935, + 0.03763723000884056, + 0.023803170770406723, + -0.006840344052761793, + 0.0036214713472872972, + -0.024201935157179832, + 0.00026312703266739845, + 0.019202042371034622, + 0.007657044567167759, + 0.00828969944268465, + -0.03647160902619362, + -0.022070078179240227, + -0.011012033559381962, + -0.032606661319732666, + -0.008657789789140224, + -0.026947274804115295, + 0.03349621221423149, + 0.02171732485294342, + -0.003845776431262493, + 0.0012614759616553783, + 0.007595696020871401, + -0.00028014162671752274, + -0.03690104931592941, + 0.025766318663954735, + 0.005456171464174986, + -0.03456981107592583, + -0.04953881353139877, + 0.03917093947529793, + 0.010107145644724369, + -0.02335839532315731, + -0.00404899287968874, + 0.017422938719391823, + -0.03797464445233345, + 0.015705185011029243, + -0.013320266269147396, + -0.00015205291856545955, + -0.010682285763323307, + 0.0074308221228420734, + 0.003979975823312998, + 0.0012442218139767647, + -0.005655553657561541, + -0.04239172860980034, + 0.005068909842520952, + -0.02067440375685692, + 0.0013582913670688868, + -0.014056446962058544, + -0.027407387271523476, + -0.005552028305828571, + 0.02539822831749916, + 0.010252847336232662, + -0.03144104406237602, + 0.010996696539223194, + 0.006548939272761345, + -0.011832567863166332, + -0.023481091484427452, + -0.010222173295915127, + -0.013703693635761738, + -0.012346360832452774, + 0.012653103098273277, + -0.017806366086006165, + -0.012921501882374287, + -0.014738948084414005, + 0.013435294851660728, + 0.02685525268316269, + 0.01980018801987171, + 0.01326658669859171, + -0.010674617253243923, + 0.004884864669293165, + 0.004233038052916527, + 0.00858877319842577, + 0.02769879251718521, + -0.019846200942993164, + -0.010850993916392326, + -0.0163186676800251, + -0.013090210035443306, + 0.030459469184279442, + 0.04665544256567955, + 0.0165793988853693, + -0.00851975567638874, + -0.03815869241952896, + 0.002193204592913389, + -0.022346146404743195, + -0.018864626064896584, + -0.004693150985985994, + 0.012308018282055855, + -0.0060274782590568066, + -0.0016707846662029624, + 0.025490250438451767, + 0.003696239786222577, + -0.00291213090531528, + -0.004961550235748291, + -0.00018021085998043418, + 0.004635636694729328, + 0.026226431131362915, + 0.02935519814491272, + -0.04058195278048515, + 0.002578549087047577, + -0.011372455395758152, + 0.003742251079529524, + 0.010950685478746891, + 0.06048950180411339, + 0.03625689074397087, + 0.005095749627798796, + -0.003182447049766779, + 0.013281923718750477, + 0.022162102162837982, + -0.04180891811847687, + 0.04233038052916527, + -0.016272656619548798, + 0.016533387824892998, + 0.016349341720342636, + -0.015107037499547005, + 0.05401724576950073, + -0.0331587977707386, + -0.01723889447748661, + 0.005160932429134846, + 0.025950362905859947, + -0.013511979952454567, + 0.021962719038128853, + 0.021533280611038208, + 0.027131319046020508, + -0.006552773527801037, + 0.007814249955117702, + -0.024247946217656136, + 0.014631588011980057, + -0.008005963638424873, + 0.001500159502029419, + 0.0017187130870297551, + -0.007101074792444706, + -0.006928532384335995, + 0.012875490821897984, + 0.02269889973104, + -0.018327828496694565, + 0.008143996819853783, + 0.015904566273093224, + 0.016671421006321907, + 0.033342842012643814, + -0.00022466447262559086, + 0.006391733884811401, + -0.01450889091938734, + 0.015007346868515015, + -0.033864304423332214, + -0.024048563092947006, + 0.003479603212326765, + 3.1003695767140016e-05, + -0.015314089134335518, + 0.009877088479697704, + -0.0071279145777225494, + -0.0032342097256332636, + -0.02455468848347664, + -0.0015154966386035085, + 0.015413779765367508, + 0.0073119597509503365, + 0.002214292995631695, + -0.019432097673416138, + 0.028787726536393166, + -0.006736818701028824, + -0.05021364614367485, + 0.044722966849803925, + 0.0048695276491343975, + 0.026824578642845154, + 0.0010975608602166176, + 0.023588450625538826, + 0.020965807139873505, + -0.01408712100237608, + -0.0018078599823638797, + -0.0037556709721684456, + 0.015620830468833447, + 0.017484286800026894, + -0.002576631959527731, + -0.03165576234459877, + -0.012185321189463139, + 0.011073382571339607, + 0.03604217246174812, + -0.003341569332405925, + -0.0053603146225214005, + -0.010068802163004875, + 0.043403975665569305, + -0.021686650812625885, + -0.024370642378926277, + 0.004187026526778936, + 0.008450739085674286, + 0.038802847266197205, + -0.004524442832916975, + -0.012223663739860058, + -0.03309744969010353, + 0.0267325546592474, + 0.007538181729614735, + 0.019309401512145996, + 0.010122482664883137, + -0.007875598035752773, + 0.01599659025669098, + 0.018864626064896584, + 0.006660133134573698, + 0.015689847990870476, + -0.01062860619276762, + -0.010958353988826275, + 0.007139417342841625, + 0.0037920966278761625, + -0.044784314930438995, + 0.006525933742523193, + -0.012116304598748684, + 0.041226111352443695, + 0.047422297298908234, + 0.02527553215622902, + -0.007074234541505575, + 0.019968897104263306, + 0.021410584449768066, + -0.040121838450431824, + 0.0026322288904339075, + -2.911651426984463e-05, + -0.04251442477107048, + -0.012262007221579552, + 0.002958141965791583, + 0.004608796909451485, + -0.0026015546172857285, + -0.0012288846774026752, + -0.010651611723005772, + 0.02427862025797367, + 0.0051072523929178715, + -0.004528277087956667, + 0.004585791379213333, + 0.0015461707953363657, + -0.013274255208671093, + -0.00805964320898056, + 0.028266264125704765, + 0.01075897179543972, + 0.010275852866470814, + -0.02969261445105076, + ], + "index": 35, + }, + { + "title": "Hong Kong Economic Times", + "text": "Hong Kong Economic Times (26 January 1988), the leading financial daily in Hong Kong, was founded by Mr. Fung Siu Por, Lawrence (Chairman), Mr. Perry Mak (Managing Director), Mr. Arthur Shek (Executive Director) and other founders with HK$20 million of foundation fund in 1988.", + "vector": [ + -0.028982525691390038, + -0.040694091469049454, + -0.010437874123454094, + -0.06462991237640381, + 0.012240270152688026, + -0.033836979418992996, + -0.010213576257228851, + 0.010886470787227154, + -0.024833008646965027, + 0.03582361713051796, + 0.07677405327558517, + 0.01986640691757202, + -0.0032423099037259817, + -0.024833008646965027, + 0.009957235306501389, + -0.026899756863713264, + 0.0062563163228333, + -0.023839689791202545, + -0.006460587959736586, + 0.0311293788254261, + -0.02555396780371666, + -0.009588745422661304, + -0.03109733574092388, + 0.026210840791463852, + -0.002931897295638919, + -0.010221587494015694, + -0.01614946685731411, + 0.014795667491853237, + 0.014010624028742313, + 0.03165808320045471, + 0.02193315513432026, + 0.034702129662036896, + 0.004055390600115061, + -0.034605998545885086, + -0.013241601176559925, + 0.03668876737356186, + 0.03627221658825874, + -0.01136710960417986, + -0.010093417018651962, + -0.013818368315696716, + 0.04787163436412811, + 0.002887838752940297, + -0.030055951327085495, + 0.0033164082560688257, + -0.029062630608677864, + 0.019545981660485268, + -0.021949175745248795, + -0.019401790574193, + -0.011150822043418884, + 0.04037366807460785, + 0.03399718925356865, + 0.029911760240793228, + -0.02707599103450775, + 0.050627294927835464, + -0.009644820354878902, + 0.031193463131785393, + 0.037137363106012344, + 0.06581548601388931, + -0.003917207010090351, + -0.04104655981063843, + -0.016566019505262375, + -0.033740848302841187, + 0.01757536269724369, + 0.03611200302839279, + 0.01328966487199068, + 0.022638091817498207, + -0.025185476988554, + 0.015604742802679539, + 0.027524586766958237, + -0.0018023957964032888, + -0.03652855381369591, + -0.016373764723539352, + 0.062451012432575226, + 0.022814325988292694, + 0.010389810428023338, + -0.08138818293809891, + 0.012520642951130867, + -0.013033324852585793, + -0.03515072539448738, + 0.03351655229926109, + -0.022285623475909233, + 0.013353750109672546, + 0.008198898285627365, + -0.003364472184330225, + 0.028998546302318573, + -0.018921151757240295, + -0.02326292172074318, + -0.06703310459852219, + -0.01847255416214466, + 0.044378992170095444, + 0.022445837035775185, + 0.01574893482029438, + -0.04425081983208656, + -0.05838160216808319, + 0.005066734738647938, + 0.050691381096839905, + -0.02725222520530224, + -0.0072055780328810215, + -0.013505952432751656, + -0.03572748973965645, + 0.021772941574454308, + 0.010582066141068935, + 0.038098644465208054, + -0.04498780146241188, + 0.020218875259160995, + -0.022173473611474037, + -0.01824825629591942, + 0.01754331961274147, + -0.0032643391750752926, + 0.019097385928034782, + 0.029783589765429497, + 0.015909146517515182, + 0.00827499944716692, + 0.04037366807460785, + -0.0355672761797905, + 0.06309186667203903, + -0.011775652877986431, + -0.010125459171831608, + 0.05578615516424179, + 0.046974439173936844, + -0.015492593869566917, + -0.00126067572273314, + 0.03063271939754486, + -0.019786300137639046, + 0.016598062589764595, + -0.03649651259183884, + -0.04152720049023628, + 0.017831703647971153, + 0.007786349859088659, + -0.008190887980163097, + -0.11419980227947235, + 0.02299056015908718, + 0.012833057902753353, + -0.012929186224937439, + -0.01106270495802164, + 0.02323088049888611, + 0.027428459376096725, + -0.009869118221104145, + -0.0055113257840275764, + 0.008611447177827358, + 0.055209387093782425, + 0.014691528864204884, + 0.024640753865242004, + -0.032715488225221634, + -0.04409060627222061, + -0.03425353020429611, + 0.022413793951272964, + -0.003138171508908272, + 0.036368343979120255, + 0.034541916102170944, + -0.010077395476400852, + 0.01039782166481018, + 0.019465874880552292, + 0.02233368717133999, + -0.01828029938042164, + -0.04421877861022949, + 0.04953784868121147, + 0.011415173299610615, + -0.0402134545147419, + 0.012416504323482513, + -0.016325701028108597, + -0.003432562807574868, + -0.023246901109814644, + -0.034541916102170944, + -0.0009898156858980656, + -0.04159128665924072, + 0.034605998545885086, + -0.009628798812627792, + -0.02366345375776291, + 0.011303024366497993, + -0.002737639006227255, + 0.023134751245379448, + -0.061489734798669815, + -0.014162826351821423, + -0.056138623505830765, + 0.036400385200977325, + 0.02452860400080681, + 0.01387444231659174, + -0.0003795044613070786, + -0.0017413146561011672, + 0.028229523450136185, + 0.04210396483540535, + 0.015909146517515182, + 0.03784230351448059, + -0.01807202212512493, + -0.0023751570843160152, + 0.06040028855204582, + -0.006100108381360769, + 0.030520569533109665, + 0.015708880499005318, + -0.011407162994146347, + 0.0379384309053421, + -0.019321683794260025, + -0.023599369451403618, + -0.00220893626101315, + -0.013562027364969254, + 0.00965283066034317, + -0.030023910105228424, + 0.002080765785649419, + 0.0066488380543887615, + 0.0021528617944568396, + -0.008419191464781761, + 0.020555322989821434, + 0.032539252191782, + -0.014891794882714748, + -0.029655419290065765, + 0.018120085820555687, + 0.03229893371462822, + -0.008931872434914112, + 0.03100120835006237, + 0.043385669589042664, + -0.05222942680120468, + 0.037233494222164154, + 0.02146853692829609, + -0.018648788332939148, + 0.017126765102148056, + 0.071134552359581, + 0.028934461995959282, + 0.045148011296987534, + -0.00660477951169014, + -0.008443223312497139, + -0.026835670694708824, + 0.04848044365644455, + -0.014082719571888447, + -0.0541519820690155, + -0.008050701580941677, + -0.04524414241313934, + -0.021580686792731285, + 0.0032783576752990484, + -0.01279300544410944, + 0.0260506272315979, + -0.012961228378117085, + -0.006128145847469568, + 0.01305735670030117, + -0.0007675202214159071, + -0.011086736805737019, + -0.030680783092975616, + -0.04466737434267998, + -0.007421865593641996, + -0.008218925446271896, + 0.03409332036972046, + 0.026130734011530876, + -0.015676839277148247, + -0.02545784041285515, + -0.0362081304192543, + -0.04783958941698074, + -0.032779570668935776, + 0.01554866787046194, + -0.027156097814440727, + 0.021821005269885063, + 0.06286756694316864, + -0.04393039271235466, + 0.04393039271235466, + -0.03399718925356865, + 0.06600774079561234, + 0.05094772204756737, + 0.03342042490839958, + 0.0089719258248806, + -0.034509871155023575, + 0.00742587074637413, + -0.004185563884675503, + 0.03803455829620361, + 0.006592763587832451, + 0.049922358244657516, + -0.054119937121868134, + -0.004109462723135948, + 0.0004368306545075029, + 0.009188213385641575, + -0.009380469098687172, + 0.021885091438889503, + 0.04393039271235466, + -0.020811663940548897, + 0.06373271346092224, + 0.015188189223408699, + -0.0017873758915811777, + 0.003014006419107318, + -0.051492445170879364, + 0.05562594160437584, + -0.042744819074869156, + 0.04248847812414169, + -0.015500604175031185, + 0.01389046385884285, + 0.021212195977568626, + -0.02007468417286873, + 0.008419191464781761, + -0.03591974452137947, + 0.03889970853924751, + -0.036464471369981766, + 0.04037366807460785, + -0.022654112428426743, + 0.011190875433385372, + -0.0015260284999385476, + 0.02110004797577858, + 0.04255256429314613, + 0.0003424551978241652, + 0.016189519315958023, + -0.03386902064085007, + -0.028389737010002136, + -0.0066328165121376514, + -0.04591703414916992, + -0.02116413228213787, + 0.013778314925730228, + -0.0025974526070058346, + -0.019321683794260025, + -0.0062402947805821896, + 0.007602104917168617, + 0.0043898350559175014, + -0.00855537224560976, + -0.01096657756716013, + -0.055305514484643936, + 0.014403145760297775, + -0.01741514913737774, + -0.003354458836838603, + 0.006748971063643694, + -0.012488600797951221, + -0.06129748001694679, + 0.043609969317913055, + -0.031321633607149124, + 0.008234946057200432, + -0.04575682058930397, + 0.05911858379840851, + -0.00020815168682020158, + -0.04213600978255272, + 0.005022676195949316, + -0.012921175919473171, + -0.004654186777770519, + 0.011391141451895237, + 0.04780754819512367, + -0.007281679194420576, + -0.00347662135027349, + 0.0075860838405787945, + -0.01917749084532261, + -0.010261639952659607, + 0.039348304271698, + 0.008070727810263634, + 0.027140075340867043, + 0.014707550406455994, + 0.02428828552365303, + -0.0160533394664526, + 0.026627395302057266, + 0.012672845274209976, + 0.018857065588235855, + 0.01980232261121273, + 0.035471148788928986, + 0.007461918983608484, + -0.017655467614531517, + 0.02681965008378029, + 0.012448547407984734, + 0.034702129662036896, + 0.0040914383716881275, + 0.0005597440176643431, + -0.025105372071266174, + 0.011639472097158432, + 0.008827733807265759, + 0.0037589967250823975, + -0.05492100492119789, + 0.01608538068830967, + -0.021917132660746574, + 0.016870424151420593, + 0.009372458793222904, + 0.0026755565777420998, + 0.009588745422661304, + 0.012945207767188549, + 0.03393310680985451, + 0.002991977147758007, + -0.006460587959736586, + -0.014915826730430126, + 0.022541964426636696, + 0.004814399406313896, + -0.028357693925499916, + 0.005867799744009972, + -0.031225506216287613, + 0.00813881866633892, + 0.01377030462026596, + 0.02478494495153427, + 0.03611200302839279, + -0.09189815819263458, + 0.029911760240793228, + -0.024400433525443077, + -0.03954055905342102, + -0.027973182499408722, + 0.0003832594375126064, + 0.03575953468680382, + 0.03303591161966324, + -0.007353775203227997, + -0.07645362615585327, + -0.024144094437360764, + -0.062290798872709274, + 0.0049425698816776276, + 0.06405314058065414, + -0.0014409152790904045, + -0.0004521009686868638, + 0.0017343052895739675, + 0.010389810428023338, + 0.012881122529506683, + -0.00490251649171114, + 0.042712774127721786, + 0.021772941574454308, + 0.038995835930109024, + -0.011823716573417187, + -0.0474550798535347, + 0.00925229862332344, + 0.05841364711523056, + -0.011543343774974346, + -0.013994602486491203, + -0.0019305661553516984, + 0.005883821286261082, + -4.0272283513331786e-05, + 0.018392447382211685, + -0.02744447998702526, + 0.042648691684007645, + 0.023439155891537666, + -0.06696902215480804, + -0.0642133578658104, + 0.014026644639670849, + 0.005331086460500956, + -0.05844568833708763, + -0.03056863322854042, + 0.03316408395767212, + -0.027957161888480186, + 0.03854724019765854, + 0.00375499133951962, + -0.0007670195773243904, + 0.013970570638775826, + 0.06174607574939728, + -0.010846417397260666, + 0.0185366403311491, + 0.024608710780739784, + -0.0024232210125774145, + 0.044475119560956955, + 0.02462473325431347, + -0.05408789590001106, + 0.03175421059131622, + 0.010854428634047508, + -0.00020502253028098494, + -0.01530033815652132, + 0.004469941835850477, + 0.05104384943842888, + 0.02744447998702526, + 0.01674225553870201, + -0.01887308619916439, + -0.08010648190975189, + 0.011110768653452396, + 0.008979936130344868, + -0.015556679107248783, + -0.017927831038832664, + -0.05174878612160683, + 0.017222894355654716, + 0.009372458793222904, + -0.03303591161966324, + -0.021340366452932358, + 0.0056755440309643745, + -0.009396490640938282, + 0.04652584344148636, + -0.009500628337264061, + 0.027732864022254944, + -0.0022670135367661715, + -0.013417835347354412, + 0.02462473325431347, + 0.00340652815066278, + 0.005751645192503929, + 0.07139089703559875, + 0.004826415330171585, + -0.0051588574424386024, + -0.03326021134853363, + 0.026531266048550606, + -0.010606097988784313, + 0.0025453835260123014, + 0.01204801443964243, + 0.03524685278534889, + 0.0017272960394620895, + -0.01884104497730732, + 0.017126765102148056, + 0.028197482228279114, + 0.04848044365644455, + 0.0024532610550522804, + 0.01977027952671051, + -0.02787705510854721, + 0.015196199528872967, + 0.002819748129695654, + 0.015148135833442211, + -0.015981243923306465, + 0.010918513871729374, + 0.04857657104730606, + -0.0004981621750630438, + -0.021372409537434578, + -0.0115113016217947, + -0.030985187739133835, + 0.008507308550179005, + 0.06004782021045685, + -0.013634122908115387, + 0.05187695845961571, + 0.03867540881037712, + 0.0062402947805821896, + -0.011623450554907322, + -0.022477878257632256, + 0.024833008646965027, + -0.010710236616432667, + -0.009436543099582195, + -0.049089252948760986, + -0.0017743585631251335, + 0.04389835149049759, + -0.015364423394203186, + -0.027300288900732994, + 0.01317751593887806, + 0.01757536269724369, + 0.0036488501355051994, + -0.007017327938228846, + -0.05130019038915634, + 0.003917207010090351, + 0.020715536549687386, + 0.002058736514300108, + -7.359783194260672e-05, + 0.017431169748306274, + -0.014675507321953773, + 0.009829064831137657, + 0.012128121219575405, + 0.03704123571515083, + 0.01840846985578537, + 0.003957260400056839, + 0.026435138657689095, + -0.04607724770903587, + 0.008811713196337223, + 0.015172167681157589, + -0.008234946057200432, + -0.00813881866633892, + -0.007710248697549105, + 0.001800393220037222, + 0.04130290076136589, + -0.04646176099777222, + 0.019481895491480827, + 0.0011084733996540308, + -0.013049345463514328, + 0.04921742156147957, + -0.00652066757902503, + 0.005715597420930862, + -0.05267802253365517, + 0.03579157590866089, + 0.0029038600623607635, + -0.03790638595819473, + 0.006568731274455786, + 0.030328314751386642, + 0.005911858286708593, + -0.007025338243693113, + -0.018600724637508392, + 0.021612728014588356, + -0.014515294693410397, + 0.0012666836846619844, + 0.006528678350150585, + 0.0037049248348921537, + 0.011086736805737019, + -0.0011004627449437976, + -0.017030637711286545, + 0.0350225530564785, + -0.008194892667233944, + -0.01320955902338028, + 0.0062683322466909885, + -0.06876340508460999, + -0.039348304271698, + -0.018600724637508392, + -0.012424515560269356, + -0.029863696545362473, + 0.027124054729938507, + -0.014371102675795555, + -0.01461943332105875, + 0.02654728852212429, + 0.032539252191782, + 0.0162135511636734, + -0.016469892114400864, + 0.038995835930109024, + 0.02738039568066597, + 0.0009702897514216602, + -0.01747923344373703, + -0.043481796979904175, + 0.011030662804841995, + 0.01927362009882927, + -0.00276567623950541, + -0.017559340223670006, + 0.007994626648724079, + -0.014050676487386227, + 0.033708807080984116, + 0.03861132264137268, + 0.03688102588057518, + 0.01877695880830288, + -0.014379112981259823, + -0.016165487468242645, + 0.015228241682052612, + -0.0358877032995224, + -0.019594045355916023, + 0.0035947782453149557, + -0.0546967051923275, + 0.036240171641111374, + 0.023807646706700325, + -0.006276343017816544, + 0.07741490006446838, + -0.011583397164940834, + -0.02774888463318348, + 0.05046708509325981, + 0.03889970853924751, + 0.0451800562441349, + -0.008182876743376255, + 0.0068170614540576935, + -0.0032363019417971373, + -0.02026693895459175, + -0.039027877151966095, + 0.022509921342134476, + -0.008875798434019089, + -0.045372311025857925, + -0.02438441291451454, + -0.02286238968372345, + 0.0064165289513766766, + -0.03193044289946556, + -0.03931625932455063, + 0.03165808320045471, + 0.04332158342003822, + 0.016109412536025047, + 0.02375958301126957, + 0.013970570638775826, + -0.01784772425889969, + -0.021051982417702675, + -0.030744867399334908, + 0.010437874123454094, + 0.01840846985578537, + 0.04841635748744011, + 0.01036577858030796, + -0.01747923344373703, + -0.03335633873939514, + 0.020443174988031387, + 0.014010624028742313, + -0.026659436523914337, + -0.015540657564997673, + 0.015708880499005318, + 0.0032282911706715822, + 0.037137363106012344, + 0.025794286280870438, + 0.0066408272832632065, + 0.027796948328614235, + -0.014635453931987286, + -0.012857090681791306, + -0.01249661110341549, + 0.002090779133141041, + 0.020587366074323654, + -0.012969239614903927, + 0.0460452064871788, + -0.009620788507163525, + -0.025858372449874878, + 0.009789012372493744, + 0.05271006375551224, + 0.051652658730745316, + -0.0007580075762234628, + 0.014859752729535103, + 0.013730251230299473, + 0.015164157375693321, + 0.0033104002941399813, + -0.010902492329478264, + -0.021644771099090576, + -0.026803629472851753, + -0.014299007132649422, + -0.006712923292070627, + -0.04322545602917671, + -0.010509970597922802, + -0.037169408053159714, + 0.0047663357108831406, + -0.0134578887373209, + -0.011527322232723236, + -0.021180152893066406, + -0.006372470408678055, + -0.014034655876457691, + 0.00519891083240509, + -0.01943383179605007, + 0.009756969287991524, + 0.011591407470405102, + 0.020843707025051117, + -0.030744867399334908, + 6.59626821288839e-05, + -0.03380493447184563, + 0.026707500219345093, + 0.04072613641619682, + 0.013650144450366497, + -0.01917749084532261, + 0.034413743764162064, + -0.02657932974398136, + -0.00330238975584507, + -0.008947893977165222, + -0.01486776303499937, + 0.003454592078924179, + -0.008507308550179005, + 0.012809026055037975, + 0.04018140956759453, + -0.002355130622163415, + 0.01754331961274147, + -0.001629165606573224, + 0.004079422447830439, + 0.013554017059504986, + 0.023471198976039886, + 0.003899182891473174, + 0.0012456558179110289, + -0.0179438516497612, + -0.027396416291594505, + 0.0008346093818545341, + 0.040982477366924286, + 0.03681693971157074, + 0.021612728014588356, + 0.011639472097158432, + 0.0011945879086852074, + -0.0015360417310148478, + 0.0015330377500504255, + -0.023551305755972862, + -0.03422148898243904, + 0.005094772204756737, + 0.02295851707458496, + -0.02212540991604328, + 0.022509921342134476, + -0.02007468417286873, + 0.005122809670865536, + 0.002571417950093746, + 0.01611742377281189, + 0.04380222409963608, + -0.013882453553378582, + 0.02459269016981125, + 0.020923813804984093, + 0.026403095573186874, + -0.0022269601467996836, + 0.000335195567458868, + -0.010598087683320045, + 0.03438170254230499, + 0.03861132264137268, + -0.021917132660746574, + -0.003610799554735422, + 0.01236043032258749, + -0.005591432563960552, + 0.020923813804984093, + 0.012817037291824818, + 0.02568213827908039, + -0.011847748421132565, + -0.029991867020726204, + 0.01317751593887806, + -0.006468598265200853, + -0.028726184740662575, + -0.02515343576669693, + 0.05633087828755379, + 0.018857065588235855, + -0.05444036424160004, + -0.04851248487830162, + -0.03399718925356865, + 0.007461918983608484, + -0.005186894908547401, + 0.021837027743458748, + -0.01556468941271305, + -0.009484607726335526, + -0.032715488225221634, + -0.04046979546546936, + 0.002489308826625347, + -0.046397674828767776, + -0.015492593869566917, + 0.03338837996125221, + -0.006424539722502232, + -0.005347107537090778, + 0.011575386859476566, + -0.01701461710035801, + -0.01813610829412937, + -0.008811713196337223, + -0.06424539536237717, + -0.007546030450612307, + 0.025890415534377098, + 0.027620714157819748, + 0.004698245320469141, + -0.020058663561940193, + -0.01107872650027275, + 0.027796948328614235, + 0.0011054694186896086, + -0.02239777147769928, + -0.02335904911160469, + 0.0071975672617554665, + 0.03854724019765854, + -0.008042690344154835, + -0.00912412814795971, + -0.021772941574454308, + 0.022509921342134476, + -0.0013517969055101275, + -0.025842351838946342, + 0.004313733894377947, + -0.02057134360074997, + -0.009764980524778366, + 0.0015520630404353142, + 0.019658129662275314, + 0.0028037268202751875, + -0.047134652733802795, + -0.0011425187112763524, + 0.015885114669799805, + -0.008603435941040516, + 0.022638091817498207, + -0.013842400163412094, + 0.04947376251220703, + 0.022189496085047722, + 0.01633371226489544, + -0.03704123571515083, + -0.00385912973433733, + -0.0036168077494949102, + 0.03479825705289841, + -0.035471148788928986, + 0.038162726908922195, + 0.029783589765429497, + 0.004946575034409761, + 0.017767617478966713, + 0.013866432011127472, + -0.02505730651319027, + -0.016918489709496498, + 0.0009492618264630437, + -0.008491287007927895, + -0.05187695845961571, + 0.023999901488423347, + 0.004618138540536165, + -0.015885114669799805, + 0.03109733574092388, + 0.026531266048550606, + -0.01584506221115589, + -0.0697246789932251, + -0.017190851271152496, + -0.020987898111343384, + 0.00714549794793129, + -0.027925118803977966, + -0.011471248231828213, + 0.09426930546760559, + -0.007850435562431812, + 0.05770871043205261, + 0.025537947192788124, + -0.029126716777682304, + -0.0500505305826664, + -0.018056001514196396, + -0.033548593521118164, + -0.02608267031610012, + 0.018792981281876564, + -0.05219738185405731, + -0.06273939460515976, + 0.005254985298961401, + 0.031241528689861298, + 0.025009242817759514, + 0.02468881756067276, + 0.008459244854748249, + -0.0013247609604150057, + -0.008763649500906467, + -0.04652584344148636, + -0.011311035603284836, + -0.04732690751552582, + -0.01930566132068634, + -0.00681305630132556, + -0.0016531975707039237, + -0.004538032226264477, + -0.03591974452137947, + 0.03790638595819473, + 0.013938527554273605, + -0.02193315513432026, + 0.019481895491480827, + 0.027732864022254944, + 0.01671021245419979, + -0.015236252918839455, + 0.005623475182801485, + 0.029655419290065765, + -0.0292388666421175, + -0.01964210905134678, + -0.031017228960990906, + -0.032715488225221634, + 0.02146853692829609, + 0.028005225583910942, + -0.01079835370182991, + 0.0535111278295517, + 0.0030120036099106073, + 0.017831703647971153, + 0.011391141451895237, + -0.036368343979120255, + 0.0010734267998486757, + 0.008038685657083988, + -0.02276626229286194, + 0.0015190191334113479, + -0.03688102588057518, + 0.008875798434019089, + 0.008499297313392162, + 0.038995835930109024, + 0.004550048150122166, + 0.05274210870265961, + -0.023743560537695885, + -0.05546572804450989, + 0.0009392484789714217, + 0.014939858578145504, + -0.014515294693410397, + 0.0023931812029331923, + 0.012985260225832462, + -0.004445909522473812, + -0.0358877032995224, + 0.03960464522242546, + 0.030552612617611885, + 0.022974539548158646, + -0.03656059876084328, + 0.027828991413116455, + 0.02914273738861084, + -0.018600724637508392, + -0.013898474164307117, + 0.02654728852212429, + -0.025858372449874878, + 0.001161544001661241, + 0.0031201473902910948, + 0.013714229688048363, + 0.021244239062070847, + 0.037361662834882736, + -0.0353429801762104, + 0.0015090059023350477, + -0.04014936834573746, + 0.014875773340463638, + -0.02524956315755844, + 0.004165537189692259, + -0.00980503298342228, + 0.005347107537090778, + -0.004862463567405939, + -0.02963939867913723, + 0.005383155774325132, + 0.010421853512525558, + -0.013970570638775826, + -0.012664834968745708, + -0.024400433525443077, + -0.0037189433351159096, + 0.014731582254171371, + 0.001091450802050531, + -0.015388455241918564, + 0.0028738200198858976, + -0.019882429391145706, + -0.010806364007294178, + 0.0405338779091835, + 0.002343114698305726, + -0.025233542546629906, + 0.008907840587198734, + 0.00686913076788187, + 0.02369549684226513, + 0.020122747868299484, + -0.02110004797577858, + 0.02824554592370987, + -0.05405585467815399, + -0.022574005648493767, + -0.016630105674266815, + 0.01051798090338707, + 0.028934461995959282, + 0.0005767666734755039, + 0.0062523107044398785, + 0.009116117842495441, + -0.007081413175910711, + 0.005242969375103712, + 0.027492543682456017, + -0.030889058485627174, + 0.008210914209485054, + -0.059727393090724945, + -0.01784772425889969, + 0.010021320544183254, + 0.04642971605062485, + -0.018088042736053467, + -0.0030680783092975616, + -0.010165512561798096, + -0.017735574394464493, + -0.00965283066034317, + -0.017895787954330444, + 0.014907816424965858, + -0.0350225530564785, + 0.01834438368678093, + 0.016966553404927254, + 0.0005011661560274661, + 0.05668334662914276, + 0.021420473232865334, + 0.005230953451246023, + -0.03867540881037712, + -0.00900396890938282, + -0.015596731565892696, + -0.003919209819287062, + 0.032411083579063416, + -0.06100909784436226, + 0.02927090786397457, + -0.02861403487622738, + 0.020379088819026947, + -0.014643465168774128, + 0.051652658730745316, + -0.021708857268095016, + -0.006140161771327257, + -0.022237559780478477, + 0.039893027395009995, + -0.018216213211417198, + -0.022077346220612526, + 0.01717482879757881, + -0.00730170588940382, + -0.03255527466535568, + 0.0034225494600832462, + -0.04293707385659218, + -0.00033619688474573195, + -0.0055193365551531315, + -0.012993271462619305, + 0.021212195977568626, + -0.036176085472106934, + -0.002222954761236906, + 0.030392399057745934, + -0.03128959238529205, + 0.014699539169669151, + 0.0029078652150928974, + -0.02193315513432026, + -0.023439155891537666, + 0.02818145975470543, + -0.01319353748112917, + -0.002959934528917074, + -0.014971901662647724, + 0.0033344323746860027, + 0.01837642677128315, + 0.03438170254230499, + -0.03700919449329376, + -0.02259002812206745, + 0.00044834596337750554, + -0.005579416640102863, + 0.0016281642019748688, + -0.0016912480350583792, + -0.015853073447942734, + -0.020058663561940193, + 0.014979911968111992, + -0.011303024366497993, + -0.00801465380936861, + 0.0068330829963088036, + -0.007449902594089508, + -0.0002998986456077546, + -0.010285671800374985, + -0.0215646643191576, + -0.011527322232723236, + 0.03944443166255951, + -0.019914470613002777, + 0.016998594626784325, + -0.010125459171831608, + -0.011791674420237541, + -0.02561805211007595, + 0.022702176123857498, + 0.0028658094815909863, + -0.01757536269724369, + -0.021292302757501602, + -0.004237632732838392, + -0.002033703261986375, + 0.01389046385884285, + 0.009028000757098198, + 0.026306968182325363, + 0.007622131612151861, + -0.002377159893512726, + 0.017270958051085472, + 0.021051982417702675, + -0.006925205234438181, + -0.00980503298342228, + 0.00029664431349374354, + 0.004742303863167763, + 0.029286930337548256, + -0.037233494222164154, + 0.01473959255963564, + -0.0009117118897847831, + 0.01441916637122631, + -0.0003759998071473092, + 0.019674152135849, + 0.023711519315838814, + -0.02654728852212429, + -0.020475216209888458, + -0.008387148380279541, + -0.010293683037161827, + 0.021724877879023552, + 0.05552981421351433, + -0.04242439195513725, + -0.020555322989821434, + -0.03518276661634445, + 0.02342313528060913, + 0.001486976514570415, + 0.0031241527758538723, + 0.017751596868038177, + -0.007582078687846661, + -0.003432562807574868, + -0.016189519315958023, + -0.03492642566561699, + 0.01441916637122631, + -0.006564726121723652, + 0.011903823353350163, + -0.025377733632922173, + -0.02754060924053192, + -0.015508614480495453, + -0.004698245320469141, + 0.010173522867262363, + 0.015620764344930649, + 0.05312661826610565, + -0.018023958429694176, + 0.015796998515725136, + -0.030232185497879982, + -0.016261614859104156, + 0.03152991086244583, + -0.006003980990499258, + -0.007517993450164795, + -0.01787976734340191, + -0.0025373727548867464, + -0.0009117118897847831, + -0.00413749972358346, + -0.028037268668413162, + 0.002335103927180171, + 0.01348993182182312, + 0.025441817939281464, + -0.019594045355916023, + -0.013746271841228008, + -0.005975943524390459, + 0.000650364498142153, + -0.03393310680985451, + -0.04130290076136589, + 0.008763649500906467, + 0.011238939128816128, + 0.003861132310703397, + 0.0004448413092177361, + 0.03508663922548294, + -0.05213329941034317, + 0.03177022933959961, + -0.006148172542452812, + 0.01364213414490223, + -0.00686913076788187, + 0.00829102098941803, + -0.02947918511927128, + 0.0038711456581950188, + -0.003384498879313469, + 0.010301693342626095, + -0.02119617536664009, + -0.017719553783535957, + -0.008242957293987274, + -0.026403095573186874, + 0.020587366074323654, + -0.046205420047044754, + -0.0232949648052454, + -0.023679476231336594, + -0.016317689791321754, + -0.026627395302057266, + 0.0024833008646965027, + -0.009604766964912415, + -0.0008015654748305678, + -0.01980232261121273, + -0.011639472097158432, + -0.014427177608013153, + 0.0022670135367661715, + 0.014691528864204884, + -0.0024712849408388138, + -0.017335042357444763, + 0.012288333848118782, + -0.01596522144973278, + -0.032443124800920486, + 0.022686155512928963, + 0.022141432389616966, + 0.02601858600974083, + 0.00039903042488731444, + 0.02651524543762207, + 0.049794189631938934, + -0.035663407295942307, + 0.017495255917310715, + -0.0055473740212619305, + -0.007469929289072752, + 0.029895739629864693, + -0.015524636022746563, + -0.02638707496225834, + -0.00608809245750308, + 0.021292302757501602, + 0.0039352308958768845, + 0.00015032482042443007, + 0.02010672725737095, + 0.03611200302839279, + 0.005583421792834997, + -0.011206896975636482, + 0.020587366074323654, + -0.02366345375776291, + -0.009596756659448147, + 0.0176714900881052, + -0.006160188466310501, + 0.00013993600441608578, + 0.01980232261121273, + 0.010686204768717289, + 0.017335042357444763, + 0.016437850892543793, + 0.04505188390612602, + 0.03739370405673981, + -0.04562865197658539, + -0.0032463150564581156, + 0.04409060627222061, + 0.018760938197374344, + -0.004722277168184519, + 0.015700871124863625, + -0.018392447382211685, + 0.008234946057200432, + -0.01373826153576374, + 0.020923813804984093, + 0.02295851707458496, + 0.02029898203909397, + 0.007802371401339769, + 0.008435212075710297, + -0.0048063891008496284, + -0.013369771651923656, + 0.02901456691324711, + 0.0026575324591249228, + 0.0018194185104221106, + -0.018792981281876564, + -0.04684627056121826, + -0.030584653839468956, + -0.01701461710035801, + -0.0010634135687723756, + 0.004638165235519409, + -0.011575386859476566, + -0.007970594801008701, + -0.022445837035775185, + 0.031978506594896317, + -0.03348451107740402, + -0.0030320303048938513, + 0.006180215161293745, + -0.03492642566561699, + -0.007538020145148039, + -0.018696852028369904, + -0.03678489476442337, + 0.0023611385840922594, + 0.020987898111343384, + -0.0012837063986808062, + -0.009011979214847088, + -0.014274975284934044, + 0.009468586184084415, + -0.018264276906847954, + 0.010766311548650265, + -0.019225556403398514, + -0.014018634334206581, + 0.0474550798535347, + 0.008002637885510921, + -0.014451209455728531, + -0.001399860717356205, + 0.01961006596684456, + -0.006556715350598097, + -0.016774296760559082, + 0.017863744869828224, + -0.007926536723971367, + -0.04245643690228462, + -0.039059922099113464, + 0.02917478047311306, + 0.02292647585272789, + -0.010109437629580498, + -0.030264228582382202, + -0.01553264632821083, + -0.002415210474282503, + 0.009644820354878902, + -0.0024232210125774145, + 0.03591974452137947, + 0.015332380309700966, + -0.02249390073120594, + 0.0038210791535675526, + 0.015612753108143806, + 0.038194771856069565, + -0.011327056214213371, + 0.003200253937393427, + 0.014066698029637337, + 0.002589442068710923, + 0.007914520800113678, + 0.03438170254230499, + -0.03393310680985451, + -0.00763414753600955, + 0.006921200081706047, + -0.04953784868121147, + -0.0089719258248806, + -0.002080765785649419, + 0.013257622718811035, + 0.005659522954374552, + 0.0008851766469888389, + -0.016598062589764595, + 0.00043107301462441683, + 0.022814325988292694, + 0.050691381096839905, + -0.015492593869566917, + -0.007530009374022484, + -0.023134751245379448, + 0.025569988414645195, + -0.00365085294470191, + 0.012592738494277, + 0.030857017263770103, + -0.015572699718177319, + -0.004493973683565855, + -0.020411131903529167, + -0.007890488021075726, + 0.022221537306904793, + -0.00392922293394804, + -0.017335042357444763, + -0.046301547437906265, + -0.042808905243873596, + -0.01877695880830288, + -0.017719553783535957, + 0.01813610829412937, + 0.014955880120396614, + 0.014995933510363102, + -0.008731606416404247, + -0.022686155512928963, + -0.012200216762721539, + -0.008667521178722382, + -0.05319070443511009, + 0.021692834794521332, + 0.026066649705171585, + -0.01606134884059429, + -0.0058998423628509045, + -0.04203988239169121, + 0.0006533684791065753, + 0.003138171508908272, + 0.004497978836297989, + 0.02379162423312664, + 0.0007590089226141572, + 0.03229893371462822, + -0.005875810515135527, + -0.014723571017384529, + -0.009476596489548683, + -0.003939236048609018, + -0.014347070828080177, + 0.00923627708107233, + 0.004509994760155678, + -0.006528678350150585, + 0.03473417088389397, + -0.022205516695976257, + -0.015676839277148247, + 0.012961228378117085, + -0.017895787954330444, + 0.007013322319835424, + 0.026435138657689095, + -0.01648591458797455, + -0.019962534308433533, + 0.02339109219610691, + 0.0005692566628567874, + -0.03390106186270714, + 0.02678760699927807, + -0.005811725277453661, + 0.0070934290997684, + 0.006404513027518988, + 0.016870424151420593, + -0.014875773340463638, + 0.00026810637791641057, + -0.05860590189695358, + 0.018360406160354614, + -0.016077371314167976, + 0.024833008646965027, + -0.016469892114400864, + -0.023951837792992592, + -0.009716915898025036, + 0.023743560537695885, + -0.02558601088821888, + -0.022718198597431183, + -0.00490251649171114, + 0.006036023609340191, + 0.03483029827475548, + -0.00034871354000642896, + 0.01596522144973278, + -0.005999975372105837, + -0.002311072079464793, + 0.0024953167885541916, + 0.05040299892425537, + 0.00568355480208993, + -0.012584728188812733, + 0.006356449332088232, + -0.013345739804208279, + -0.021612728014588356, + -0.011487269774079323, + 0.01651795580983162, + -0.015252274461090565, + -0.040021199733018875, + 0.005775677505880594, + -0.00994922500103712, + 0.0431293286383152, + 0.014699539169669151, + 0.05094772204756737, + 0.020907791331410408, + 0.008763649500906467, + -0.00252135144546628, + -0.03060067631304264, + 0.007550036069005728, + 0.0031221501994878054, + -0.015644796192646027, + -0.020619409158825874, + 0.03950851783156395, + -0.019946513697504997, + 0.02781297080218792, + -0.011687535792589188, + 0.047262825071811676, + -0.005299043841660023, + 0.01093453448265791, + 0.027700820937752724, + 0.013666165992617607, + 0.0027496549300849438, + 0.017335042357444763, + -0.004381824750453234, + 0.020010599866509438, + 0.00040829271893016994, + -0.024448499083518982, + -0.006941226776689291, + 0.013409825041890144, + 0.004205590113997459, + -0.008170860819518566, + -0.002459269016981125, + -0.0143230389803648, + -0.019978556782007217, + 0.01302531361579895, + 0.00829102098941803, + 0.049025166779756546, + 0.017270958051085472, + 0.0025473861023783684, + 0.00815484020859003, + -0.023487219586968422, + -0.026627395302057266, + -0.02289443276822567, + -0.014939858578145504, + 0.03358063846826553, + -0.030392399057745934, + 0.002881830558180809, + 0.03479825705289841, + 0.02119617536664009, + 0.006897168233990669, + 0.007782344706356525, + -0.0593428798019886, + 0.013842400163412094, + -0.01081437524408102, + 0.040918391197919846, + -0.03973281383514404, + 0.0021969203371554613, + 0.007946562953293324, + 0.015628773719072342, + 0.02648320235311985, + -0.007766323164105415, + 0.011671514250338078, + -0.04870473966002464, + -0.010357768274843693, + -0.02103596180677414, + -0.008523330092430115, + 0.007694227620959282, + 0.009428532794117928, + 0.02883833274245262, + -0.004285696893930435, + 0.012945207767188549, + -0.017831703647971153, + -0.025890415534377098, + 0.016806339845061302, + -0.0051588574424386024, + -0.019562002271413803, + -0.045500483363866806, + 0.0011395147303119302, + 0.015043997205793858, + 0.0043978458270430565, + 0.002739641582593322, + -0.02063542976975441, + -0.00880370195955038, + 0.02499322220683098, + -0.04383426532149315, + 0.051556531339883804, + -0.0017503265989944339, + -0.006789024453610182, + 0.0018294317414984107, + 0.007846429944038391, + 0.01933770440518856, + -0.01747923344373703, + -0.007477940060198307, + -0.002979961223900318, + -0.009316383861005306, + -0.006284353323280811, + -0.011343077756464481, + 0.017190851271152496, + -0.019449854269623756, + -0.019529961049556732, + -0.01236043032258749, + 0.01986640691757202, + 0.0021148112136870623, + 0.015700871124863625, + 0.011767642572522163, + 0.021837027743458748, + -0.013786325231194496, + 0.03386902064085007, + 0.02930295094847679, + 0.021148111671209335, + -0.043385669589042664, + -0.0062883589416742325, + -0.018857065588235855, + -0.009628798812627792, + 0.02283034659922123, + 0.004301717970520258, + -0.009893150068819523, + 0.001577096409164369, + 0.04412265121936798, + -0.01219220645725727, + -0.00010075893078465015, + 0.021837027743458748, + -0.02704394795000553, + 0.0014689526287838817, + 0.0016642122063785791, + 0.026226861402392387, + 0.015620764344930649, + 0.006600773893296719, + -0.01488378457725048, + 0.01590113714337349, + -0.016566019505262375, + 0.0003912700922228396, + -0.0021308325231075287, + 0.01189581211656332, + -0.05716398358345032, + 0.015180177986621857, + -0.03611200302839279, + -0.019225556403398514, + 0.022445837035775185, + -0.023615390062332153, + 0.03569544851779938, + -0.005895837210118771, + 0.0068450989201664925, + 0.011695546098053455, + -0.018424490466713905, + -0.020587366074323654, + -0.008074733428657055, + 0.005891831591725349, + -0.008939883671700954, + -0.006184220314025879, + 0.017302999272942543, + 0.009781001135706902, + -0.006156183313578367, + -0.00408342806622386, + -0.0070293438620865345, + -0.003931225743144751, + 0.021404452621936798, + 0.01977027952671051, + -0.027396416291594505, + 0.013570037670433521, + 0.010854428634047508, + 0.011038673110306263, + -0.0031862352043390274, + -0.013570037670433521, + -0.0012917170533910394, + -0.037201449275016785, + -0.025537947192788124, + -0.045308224856853485, + -0.028085332363843918, + 0.017831703647971153, + -0.02598654292523861, + 0.01587710529565811, + -0.01377030462026596, + -0.019065342843532562, + 0.03161001577973366, + 0.009052032604813576, + -0.03396514803171158, + -0.006408518645912409, + ], + "index": 36, + }, + { + "title": "Dale Reid", + "text": "Dale Reid OBE (born 20 March 1959) is a Scottish professional golfer from Ladybank, Fife. She is one of the most successful players in the history of the Ladies European Tour, with 21 tournament victories. She topped the Order of Merit in 1984 and 1987 and was made a life member of the tour after collecting her 20th title at the 1991 Ford Classic. She played for Europe in the first four Solheim Cups (1990, 1992, 1994 and 1996) and was Europe's non-playing captain in 2000 and 2002.", + "vector": [ + 0.05349265784025192, + -0.01442507840692997, + -0.02503391169011593, + 0.022082030773162842, + -0.033432912081480026, + 0.02674632892012596, + 0.030317943543195724, + -0.014147830195724964, + 0.007758881896734238, + 0.03020378202199936, + -0.047654129564762115, + 0.01658598706126213, + 0.012606654316186905, + -0.0024646578822284937, + -0.01751558482646942, + -0.0060953907668590546, + -0.03103552758693695, + 0.009899403899908066, + -0.05251413583755493, + -0.050589703023433685, + 0.03193250671029091, + 0.013095916248857975, + 0.03477022796869278, + 0.0027887942269444466, + 0.01999451220035553, + 0.032552238553762436, + 0.006637656129896641, + -0.002529892837628722, + -0.004484903067350388, + 0.030790897086262703, + 0.05029614642262459, + 0.02762700244784355, + 0.02041853964328766, + -0.0036633501295000315, + -0.02963297627866268, + 0.015860246494412422, + -0.03538995981216431, + -0.01761343702673912, + 0.011041015386581421, + 0.05531923845410347, + 0.0009168568649329245, + 0.021038271486759186, + -0.031948816031217575, + 0.004203577060252428, + 0.009711853228509426, + -0.010910545475780964, + -0.0024483492597937584, + 0.019228002056479454, + -0.0023953458294272423, + 0.04990473762154579, + -0.021462298929691315, + 0.02474035508930683, + -0.01756451092660427, + 0.058091722428798676, + -0.029714519158005714, + 0.011057323776185513, + 0.033530764281749725, + 0.06308219581842422, + -0.03379170596599579, + 0.02637122943997383, + 0.012549573555588722, + -0.013381319120526314, + -0.02867075987160206, + 0.002778601134195924, + 0.04833909869194031, + -0.02739867940545082, + -0.00852946937084198, + 0.015762394294142723, + -0.02987760677933693, + 0.010323431342840195, + -0.02152753435075283, + -0.04100016504526138, + -0.029665593057870865, + 0.053949303925037384, + 0.011693364940583706, + 0.022946393117308617, + -0.002660362748429179, + 0.022538674995303154, + -0.008578396402299404, + -0.0394345261156559, + 0.00607092771679163, + -0.0038712865207344294, + -0.016064107418060303, + 0.011783063411712646, + 0.04768674820661545, + -0.07143227010965347, + 0.04948071017861366, + -0.08128274977207184, + 0.03503116965293884, + -0.002195563865825534, + -0.016186421737074852, + 0.0040078721940517426, + 0.05988568440079689, + 0.04948071017861366, + 0.015419911593198776, + -0.04628419876098633, + -0.029649285599589348, + -0.015819475054740906, + 0.0051127891056239605, + 0.011530277319252491, + -0.037020836025476456, + 0.01999451220035553, + 0.03066042624413967, + 0.023272568359971046, + 0.008814872242510319, + 0.020255452021956444, + -0.03555304929614067, + -0.02240820601582527, + 0.0040690298192203045, + 0.04621896147727966, + 0.005532739218324423, + -0.010241887532174587, + -0.10528921335935593, + -0.04618634656071663, + -0.05336219072341919, + -0.0022179882507771254, + -0.030513647943735123, + 0.0260450541973114, + -0.0029029552824795246, + -0.0024993140250444412, + -0.036368485540151596, + -0.045468758791685104, + 0.0390431173145771, + 0.0015676773618906736, + 0.04325077310204506, + 0.005055708810687065, + 0.001452496973797679, + 0.009271517395973206, + 0.03274794667959213, + -0.009214436635375023, + -0.013291621580719948, + 0.009328598156571388, + -0.018852900713682175, + 0.007921969518065453, + 5.5870168580440804e-05, + 0.06973616033792496, + 0.004117956385016441, + -0.016015179455280304, + 0.03309042751789093, + 0.04687131196260452, + 0.053623128682374954, + 0.012060311622917652, + 0.030676735565066338, + 0.015901019796729088, + -0.023827064782381058, + -0.05140513926744461, + 0.015501455403864384, + 0.03535734489560127, + 0.03799935802817345, + 0.0056346687488257885, + 0.017042631283402443, + 0.052220579236745834, + 0.03927144035696983, + -0.0179885383695364, + 0.012468029744923115, + 0.0028703378047794104, + -0.03356338292360306, + 0.02250605821609497, + -0.05639561638236046, + -0.004525674507021904, + -0.01137534435838461, + 0.07854288071393967, + -0.008586550131440163, + 0.022342970594763756, + -0.029893916100263596, + 0.040380433201789856, + -0.061125148087739944, + 0.05313386768102646, + -0.033856939524412155, + 0.03382432088255882, + -0.03057888336479664, + 0.008586550131440163, + 0.015411756932735443, + -0.033253517001867294, + 0.04445761814713478, + 0.030285324901342392, + 0.04540352523326874, + -0.006890441756695509, + 0.035585664212703705, + -0.039304058998823166, + -0.006234014872461557, + -0.015615615993738174, + -0.02213095687329769, + -0.04563184827566147, + -0.0195704847574234, + 0.012989909388124943, + 0.05633037909865379, + -0.022440822795033455, + 0.0019723379518836737, + -0.010608834214508533, + 0.060929443687200546, + 0.02275068871676922, + 0.0197661891579628, + 0.008945342153310776, + -0.030741970986127853, + 0.029665593057870865, + -0.03224237263202667, + -0.001264946418814361, + -0.02097303606569767, + -0.014221219345927238, + 0.030187472701072693, + -0.013666721992194653, + -0.0008088114554993808, + 0.008064670488238335, + 0.017124174162745476, + -0.004030296579003334, + 0.003932444378733635, + 0.003039540955796838, + 0.015460683032870293, + -0.044718559831380844, + 0.017743906006217003, + 0.011937996372580528, + 0.057113200426101685, + 0.015175280161201954, + -0.03131277486681938, + 0.03552043065428734, + -0.025751497596502304, + 0.03519425541162491, + 0.014408770017325878, + -0.04948071017861366, + -0.03770580142736435, + -0.03503116965293884, + -0.02955143339931965, + -0.019211692735552788, + 0.01723833568394184, + 0.07208462059497833, + -0.044620707631111145, + -0.05036138370633125, + -0.024381563067436218, + -0.041554663330316544, + 0.005275876726955175, + 0.01500403881072998, + 0.04067399352788925, + 0.020565317943692207, + -0.0390431173145771, + 0.03692298382520676, + 0.019309544935822487, + -0.032976265996694565, + 0.053753599524497986, + -0.02955143339931965, + -0.009467221796512604, + 0.0042158085852861404, + 0.02870337851345539, + -0.004961933474987745, + 0.00687413290143013, + 0.007844503037631512, + 0.023990152403712273, + -0.015615615993738174, + -0.01418860163539648, + 0.00025291283964179456, + 0.001114090671762824, + -0.015379139222204685, + 0.015379139222204685, + -0.008297069929540157, + 0.023973844945430756, + -0.03574875369668007, + -0.013365010730922222, + 0.005822219420224428, + 0.06269078701734543, + -0.015998871996998787, + 0.01433537993580103, + -0.018102698028087616, + -0.048404332250356674, + 0.04321815446019173, + 0.01097578089684248, + -0.017368806526064873, + -0.06784434616565704, + -0.013226386159658432, + 0.053851451724767685, + -0.03998902440071106, + -0.007367472164332867, + -0.0325685478746891, + -0.009214436635375023, + 0.030725661665201187, + 0.0230279378592968, + 0.00050557084614411, + -0.002847913419827819, + -0.007860811427235603, + -0.016137495636940002, + -0.0007889351691119373, + 0.030970292165875435, + -0.013291621580719948, + -6.569681772816693e-06, + -0.05029614642262459, + -0.054732125252485275, + -0.036009691655635834, + -0.007253311108797789, + 0.004117956385016441, + 0.047980304807424545, + 0.007881197147071362, + -0.029665593057870865, + 0.07188891619443893, + 0.010527290403842926, + 0.0012323289411142468, + 0.030122239142656326, + 0.033155664801597595, + -0.01989666000008583, + -0.02200048789381981, + 0.0010223540011793375, + -0.00904319528490305, + -0.047980304807424545, + 0.007587640080600977, + -0.03137801215052605, + -0.020304378122091293, + -0.05120943486690521, + -0.021217668429017067, + -0.021266594529151917, + 0.0016736842226237059, + -0.026909416541457176, + -0.01288390252739191, + -0.04514258727431297, + 0.008961651474237442, + 0.04031519964337349, + -0.022815924137830734, + 0.022587601095438004, + 0.017222026363015175, + 0.012027693912386894, + -0.0038447848055511713, + 0.004109801724553108, + -0.04100016504526138, + 0.061581794172525406, + 0.032829489558935165, + 0.017841758206486702, + 0.023451965302228928, + 0.05770031362771988, + -0.034737613052129745, + 0.030872439965605736, + 0.009638464078307152, + 0.0061565483920276165, + -0.016618603840470314, + -0.021967869251966476, + -0.016064107418060303, + -0.001248637679964304, + 0.009010577574372292, + 0.015232360921800137, + 0.005532739218324423, + -0.06520233303308487, + 0.02694203518331051, + -0.035259488970041275, + -0.023337803781032562, + -0.01171782799065113, + 0.008782255463302135, + 0.01803746446967125, + 0.019537867978215218, + -0.01882028393447399, + -0.03346553072333336, + 0.017042631283402443, + -0.02069578878581524, + -0.021331828087568283, + -0.011571049690246582, + 0.0008393903262913227, + -0.01678169146180153, + 0.011334572918713093, + 0.025082837790250778, + 0.001830655848607421, + 0.00812990590929985, + 0.019162766635417938, + -8.893358608474955e-05, + 0.017075248062610626, + 0.011407962068915367, + 0.05140513926744461, + -0.020989345386624336, + -0.059526894241571426, + 0.02917633205652237, + -0.0030069234780967236, + -0.002379037206992507, + 0.03535734489560127, + 0.02343565598130226, + -0.013014372438192368, + 0.005846682470291853, + -0.007909737527370453, + -0.02343565598130226, + -0.012916520237922668, + -0.0358792245388031, + -0.021967869251966476, + -0.017319878563284874, + -0.03542257845401764, + -0.03173680230975151, + -0.0009413199732080102, + -0.0018816206138581038, + -0.008505006320774555, + 0.07756435871124268, + -0.07012756913900375, + 0.01924430951476097, + 0.024772971868515015, + -0.03336767852306366, + 0.0427941270172596, + -0.007273696828633547, + 0.0036021925043314695, + -0.029910225421190262, + 0.0030232323333621025, + 0.01102470699697733, + -0.022848540917038918, + -0.0061116996221244335, + 0.01113886758685112, + 0.02004343830049038, + 0.04295721650123596, + 0.04034781828522682, + 0.00871702004224062, + 0.0031088530085980892, + -0.04400097578763962, + -0.0523836649954319, + -0.016545213758945465, + -0.05094849690794945, + -0.003485992783680558, + -0.05290554463863373, + 0.026273377239704132, + -0.022799614816904068, + 0.038423385471105576, + 0.05003520846366882, + 0.011587358079850674, + -0.02144598960876465, + 0.00578960170969367, + -0.029584050178527832, + 0.017319878563284874, + -0.006853747181594372, + 0.03992379084229469, + -0.003720430890098214, + -0.0228322334587574, + -0.01263111736625433, + 0.005536816548556089, + 0.007016834337264299, + -0.01691216044127941, + 0.007974972948431969, + -0.008158446289598942, + 0.05985306575894356, + 0.010486518032848835, + 0.0162353478372097, + 0.009100276045501232, + 0.009304135106503963, + -0.0587114542722702, + -0.036140162497758865, + -0.022473439574241638, + 0.044392384588718414, + -0.024169549345970154, + -0.03454190492630005, + -0.03649895638227463, + -0.010486518032848835, + 0.020190216600894928, + 0.08245697617530823, + 0.015509609133005142, + 0.013780883513391018, + -0.018852900713682175, + -0.001851041684858501, + 0.0005799795035272837, + 0.03812982887029648, + 0.008309301920235157, + 0.02955143339931965, + 0.023696595802903175, + 0.028034720569849014, + -0.030774587765336037, + 0.014449541456997395, + 0.012826821766793728, + 0.004362587351351976, + 0.029763447120785713, + 0.013674876652657986, + -0.03992379084229469, + 0.041228488087654114, + -0.026648476719856262, + 0.012614808976650238, + -0.02353350818157196, + 0.01984773389995098, + 0.03235653415322304, + 0.0039365217089653015, + -0.022245118394494057, + 0.026827873662114143, + 0.0024646578822284937, + -0.017499275505542755, + -0.02162538655102253, + -0.02995915152132511, + 0.02717035636305809, + 0.015582999214529991, + -0.05280769243836403, + -0.0009316366631537676, + 0.005915994755923748, + 0.012272325344383717, + 0.04749104380607605, + -0.03173680230975151, + -0.0006599941989406943, + 0.03878217935562134, + 0.007811885327100754, + -0.00787712074816227, + -0.02619183249771595, + 0.043544329702854156, + 0.038521237671375275, + -0.04778460040688515, + 0.026305994018912315, + -0.002062035957351327, + -0.03388955816626549, + 0.006454182788729668, + -0.015264978632330894, + 0.025947201997041702, + -0.03326982632279396, + -0.0044604395516216755, + -0.016749072819948196, + 0.004908930044621229, + -0.029143713414669037, + -0.022147266194224358, + 0.010086954571306705, + 0.009051349014043808, + 0.04501211643218994, + 0.047327958047389984, + 0.022082030773162842, + 0.029763447120785713, + 0.010616987943649292, + -0.023615052923560143, + 0.01906491443514824, + 0.022212501615285873, + -0.034607142210006714, + 0.04390312358736992, + 0.05496044456958771, + 0.018167933449149132, + -0.05104634910821915, + 0.003125161863863468, + -0.008154368959367275, + -0.014734944328665733, + -0.034737613052129745, + 0.006515340879559517, + -0.007775190751999617, + -0.02245713211596012, + -0.017124174162745476, + 0.008839336223900318, + -0.010674068704247475, + 0.025784114375710487, + 0.015118199400603771, + -0.01683061756193638, + 0.012321251444518566, + 0.017140483483672142, + -0.022196192294359207, + -0.008700711652636528, + 0.025833040475845337, + 0.014359843917191029, + 0.03659680858254433, + 0.005903763230890036, + -0.02619183249771595, + 0.030366869643330574, + 0.019423706457018852, + 0.0007874062284827232, + 0.031165998429059982, + -0.047230105847120285, + 0.0007165651768445969, + -0.004016026854515076, + -0.015216052532196045, + -0.06321267038583755, + 0.002254683058708906, + 0.0021629463881254196, + -0.0015238476917147636, + -0.004052721429616213, + -0.008880107663571835, + 0.011962459422647953, + -0.02358243428170681, + -0.02731713466346264, + -0.06030971184372902, + -0.014098904095590115, + 0.030040694400668144, + -0.004749919753521681, + 0.013519943691790104, + -0.008496852591633797, + 0.003198551246896386, + -0.05766769498586655, + 0.04207654297351837, + -0.05933118611574173, + 0.019423706457018852, + -0.013095916248857975, + -0.02571887895464897, + 0.01020926982164383, + -0.008456080220639706, + 0.050263527780771255, + -0.03773842006921768, + -0.011081786826252937, + -0.03509640321135521, + -0.03402002528309822, + 0.01979880779981613, + -0.04073922708630562, + -0.006556112319231033, + -0.0032637862022966146, + -0.007175844628363848, + -0.019162766635417938, + 0.011660747230052948, + 0.008472389541566372, + -0.004733610898256302, + -0.036564189940690994, + -0.004839617758989334, + -0.004016026854515076, + -0.040804460644721985, + 0.01007064525038004, + 0.028344586491584778, + 0.016373973339796066, + -0.02195156179368496, + -0.00929598044604063, + -0.04967641457915306, + -0.018755048513412476, + 0.012215244583785534, + -0.01723833568394184, + 0.02968190237879753, + 0.008064670488238335, + 0.011986922472715378, + 0.015949945896863937, + 0.007453093305230141, + -0.0032352458219975233, + 0.011758599430322647, + 0.01710786670446396, + 0.01011141762137413, + -0.011978767812252045, + 0.00885564461350441, + -0.008578396402299404, + 6.513939297292382e-05, + 0.025702569633722305, + -0.0008439771481789649, + -0.02385968342423439, + 0.007110609672963619, + -0.004855926614254713, + -0.008337842300534248, + 0.015256823971867561, + 0.00706168357282877, + -0.04719748720526695, + -0.013740111142396927, + 0.028556600213050842, + -0.016422899439930916, + -0.009459068067371845, + -0.002915186807513237, + -0.0020589781925082207, + -0.0013424130156636238, + -0.013927661813795567, + 0.02553948387503624, + 0.021788474172353745, + 0.006849669851362705, + -0.03565090149641037, + 0.017678672447800636, + 0.0012221360811963677, + 0.026273377239704132, + -0.017499275505542755, + -0.017254645004868507, + -0.023403039202094078, + -0.04325077310204506, + 0.008880107663571835, + 0.020483775064349174, + -0.04263104125857353, + -0.00029024455579929054, + -0.016520751640200615, + 0.025702569633722305, + 0.008272606879472733, + 0.023174716159701347, + -0.0017593051306903362, + -0.020728405565023422, + -0.013813501223921776, + 0.04736057296395302, + 0.009214436635375023, + 0.003223014296963811, + 0.0001818169403122738, + 0.0059119174256920815, + -0.014555548317730427, + -0.007714033126831055, + -0.00033152606920339167, + -0.009548765607178211, + -0.05988568440079689, + 0.0044604395516216755, + -0.03737962618470192, + 0.03402002528309822, + 0.01864088699221611, + -0.0025319315027445555, + 0.017140483483672142, + 0.003329021157696843, + -0.006356330588459969, + 0.014408770017325878, + -0.005491967312991619, + -0.020010821521282196, + 0.011220411397516727, + 0.048176009207963943, + 0.0051984102465212345, + 0.011122559197247028, + -0.00915735587477684, + 0.004103686194866896, + -0.02940465323626995, + 0.02739867940545082, + 0.010820847004652023, + -0.017646053805947304, + 0.035161636769771576, + 0.0077384961768984795, + 0.007995358668267727, + -0.008170677348971367, + 0.0063033271580934525, + -0.01102470699697733, + 0.007974972948431969, + 0.024381563067436218, + 0.0016482018399983644, + -0.03015485592186451, + 0.03155740723013878, + -0.03936929255723953, + 0.03415049612522125, + -0.011636284179985523, + -0.018167933449149132, + 0.01137534435838461, + 0.04899144917726517, + 0.02242451347410679, + 0.023451965302228928, + -0.027692236006259918, + -0.050491850823163986, + -0.017368806526064873, + -0.026485389098525047, + -0.013870581053197384, + -0.0003751009644474834, + 0.059070248156785965, + -0.002014129189774394, + -0.006588730029761791, + -0.02054900862276554, + -0.002780639799311757, + -0.025833040475845337, + -0.002627745270729065, + -0.03751009702682495, + 0.024479415267705917, + 0.022294044494628906, + -0.03366123512387276, + -0.021282901987433434, + 0.0004092473827768117, + -0.006075004581362009, + -0.0007114686886779964, + -0.011310109868645668, + -0.03878217935562134, + 0.004411513451486826, + -0.004586832597851753, + -0.025555791333317757, + 0.02200048789381981, + 0.00687413290143013, + 0.036466337740421295, + 0.029747137799859047, + -0.009817860089242458, + -0.01225601602345705, + 0.00036796589847654104, + 0.013006218709051609, + -0.04814339429140091, + 0.019586794078350067, + 0.015689006075263023, + 0.0081666000187397, + 0.006527572404593229, + -0.011986922472715378, + 0.003302519442513585, + -0.0020763061475008726, + 0.030676735565066338, + 0.0197661891579628, + 0.010845310986042023, + -0.026257067918777466, + 0.05750460922718048, + 0.01878766529262066, + -0.028442438691854477, + -0.013601487502455711, + 0.027708545327186584, + -0.01999451220035553, + 0.020581627264618874, + -0.07632489502429962, + 0.0005239181919023395, + 0.021054580807685852, + 0.05942903831601143, + 0.0179885383695364, + -0.04879574477672577, + -0.0359770767390728, + 0.01710786670446396, + 0.020353304222226143, + -0.005010859575122595, + -0.044164061546325684, + 0.010396820493042469, + 0.026159215718507767, + -0.024772971868515015, + -0.04964379593729973, + 0.07104086130857468, + 0.007958663627505302, + 0.01095131691545248, + 0.02483820728957653, + 0.024430489167571068, + 0.04589278623461723, + 0.03165525943040848, + 0.007322623394429684, + -0.03976070135831833, + 0.02516438253223896, + 0.0010947240516543388, + -0.012647425755858421, + 0.03206297755241394, + -0.010527290403842926, + 0.008231835439801216, + 0.015362830832600594, + 0.001993743237107992, + -0.0018479838036000729, + -0.03057888336479664, + -0.008627322502434254, + 0.013528097420930862, + -0.03649895638227463, + 0.036042310297489166, + 0.024544650688767433, + -0.08258745074272156, + -0.0492197684943676, + -0.021233975887298584, + -0.010714841075241566, + -0.041261106729507446, + -0.024854516610503197, + -0.0246588122099638, + -0.007807807996869087, + -0.031345393508672714, + -0.033530764281749725, + 0.023272568359971046, + -0.0075917174108326435, + 0.004705070983618498, + 0.03145955502986908, + -0.009450913406908512, + 0.0006921020685695112, + -0.04295721650123596, + -0.00920628197491169, + -0.012166318483650684, + -0.02405538782477379, + -0.03878217935562134, + 0.012843131087720394, + 0.06719199568033218, + 0.03966284915804863, + -0.013234540820121765, + -0.032177139073610306, + -0.01761343702673912, + -0.005169869866222143, + -0.0037673183251172304, + -0.03806459531188011, + -0.004709147848188877, + -0.003930405713617802, + -0.010967626236379147, + -0.0005417558713816106, + -0.025131763890385628, + -0.027366062626242638, + -0.060374945402145386, + 0.00337387016043067, + -0.0034717225935310125, + -0.03229130059480667, + 0.0212013591080904, + -0.0063726394437253475, + 0.002774524036794901, + 0.006584652699530125, + -0.018934443593025208, + -0.03075827844440937, + -0.026012437418103218, + -0.012508802115917206, + -0.02646908164024353, + 0.01481648813933134, + 0.028915392234921455, + 0.03170418739318848, + 0.022799614816904068, + -0.02762700244784355, + -0.018167933449149132, + -0.010005410760641098, + -0.02050008252263069, + -0.04843695089221001, + -0.02503391169011593, + -0.078477643430233, + 0.0038203217554837465, + -0.006817052140831947, + -0.0007298160344362259, + -0.013862427324056625, + -0.012671888805925846, + -0.01263111736625433, + 0.024870824068784714, + -0.02731713466346264, + 0.0457623191177845, + -0.005116866435855627, + 0.0020436886698007584, + 0.034509290009737015, + -0.005092403385788202, + -0.008142136968672276, + -0.0005004743579775095, + -0.043413858860731125, + 0.0361727811396122, + 0.004005833528935909, + 0.008586550131440163, + 0.036140162497758865, + 0.0011303994106128812, + -0.024707738310098648, + 0.02358243428170681, + 0.012745278887450695, + 0.01723833568394184, + 0.02260391041636467, + 0.01580316759645939, + 0.004101647529751062, + 0.021609077230095863, + -0.02167431265115738, + 0.01668383926153183, + -0.006670273840427399, + 0.01971726305782795, + -0.019684646278619766, + -0.03335136920213699, + 0.010992089286446571, + -0.014147830195724964, + -0.033253517001867294, + -0.04067399352788925, + -0.017923302948474884, + 0.02405538782477379, + -0.006315558683127165, + -0.023924918845295906, + -0.029143713414669037, + -0.014058131724596024, + 0.01901598833501339, + -0.030269017443060875, + 0.0011997114634141326, + -0.0060953907668590546, + 0.04703439772129059, + 0.0012894095852971077, + 0.0019560293294489384, + 0.019929276779294014, + 0.015044810250401497, + 0.01500403881072998, + 0.03398741036653519, + 0.01268004346638918, + -0.03437881916761398, + 0.025409013032913208, + -0.002008013427257538, + -0.03666204214096069, + -0.010829001665115356, + -0.011489505879580975, + 0.025082837790250778, + -0.003834591945633292, + -0.005907840095460415, + 0.014686018228530884, + 0.002181293675675988, + -0.02963297627866268, + -0.012035848572850227, + 0.003096621483564377, + -0.02857290767133236, + 0.00517394719645381, + 0.0007991281454451382, + -0.054275479167699814, + -0.03649895638227463, + -0.02111981436610222, + -0.024821897968649864, + -0.036466337740421295, + 0.009826014749705791, + -0.013250849209725857, + 0.016243502497673035, + -0.001736880512908101, + 0.04328338801860809, + 0.02694203518331051, + 0.00019124543177895248, + 0.009475376456975937, + 0.038195062428712845, + 0.013601487502455711, + 0.021217668429017067, + -0.014539239928126335, + -0.03048103116452694, + -0.030415795743465424, + -0.01821685954928398, + -0.02343565598130226, + -0.014115212485194206, + 0.0066784280352294445, + 0.03519425541162491, + 0.024772971868515015, + 0.016602294519543648, + 0.0016940701752901077, + -0.011261183768510818, + 0.02591458335518837, + -0.030513647943735123, + -0.0009927944047376513, + 0.01640659011900425, + 0.06086421012878418, + 0.02227773517370224, + -0.013854272663593292, + 0.022245118394494057, + 0.03137801215052605, + 0.024772971868515015, + -0.03490069881081581, + -0.03369385376572609, + -0.05088325962424278, + 0.0004915555473417044, + -0.012313096784055233, + 0.018950752913951874, + 0.010886082425713539, + 0.004211731720715761, + -0.041782986372709274, + -0.028882773593068123, + 0.026827873662114143, + 0.014628937467932701, + 0.0035226873587816954, + -0.004855926614254713, + -0.03946714475750923, + 0.018885517492890358, + 0.004513442981988192, + 0.0041709598153829575, + 0.03561828285455704, + 0.006543880794197321, + -0.04621896147727966, + 0.028116263449192047, + -0.010796383954584599, + -0.007962740957736969, + 0.004786614328622818, + -0.010388665832579136, + -0.04165251553058624, + -0.0013913392322137952, + 0.048860978335142136, + -0.03398741036653519, + -0.021315520629286766, + -0.03359599784016609, + -0.03366123512387276, + 0.007126918528228998, + 0.009263362735509872, + 0.028491364791989326, + -0.02368028648197651, + -0.035161636769771576, + 0.0059649208560585976, + 0.02885015681385994, + -0.022766998037695885, + 0.010135880671441555, + 0.03731439262628555, + -0.007151381578296423, + -0.03532472625374794, + -0.0015034617390483618, + 0.0070535289123654366, + -0.008313379250466824, + 0.044392384588718414, + -0.006951599381864071, + -0.01020926982164383, + 0.029111096635460854, + 0.013536252081394196, + 0.02754545770585537, + 0.00539411511272192, + -0.012655580416321754, + 0.003114969003945589, + 0.028931699693202972, + -0.0075754085555672646, + 0.019325854256749153, + 0.009165510535240173, + 0.00871702004224062, + 0.02200048789381981, + 0.034411437809467316, + -0.026778947561979294, + 0.023549817502498627, + -0.011016552336513996, + -0.014302763156592846, + -0.003895749803632498, + 0.0006915924022905529, + -0.013870581053197384, + -0.009002422913908958, + -0.024756664410233498, + -0.021168742328882217, + -0.031850963830947876, + -0.02232666127383709, + 0.00426473468542099, + 0.026778947561979294, + -0.013332393020391464, + 0.02144598960876465, + 0.014408770017325878, + 0.02363136038184166, + -0.03132908418774605, + 0.010282658971846104, + -0.023093173280358315, + 0.01593363657593727, + -0.020907802507281303, + 0.016814308241009712, + -0.0005519488477148116, + -0.06464783847332001, + 0.012190781533718109, + -0.007302237208932638, + -0.0036633501295000315, + 0.003987486474215984, + 0.0074449386447668076, + 0.04915453493595123, + 0.01006249152123928, + -0.003155740676447749, + -0.011742291040718555, + 0.00251562288030982, + -0.011318263597786427, + -0.006136162672191858, + 0.00871702004224062, + 0.014270145446062088, + -0.002503391122445464, + -0.0003954868880100548, + -0.001559523050673306, + 0.014506622217595577, + 0.019684646278619766, + -0.00629109563305974, + -0.01055175345391035, + 0.04302245005965233, + -0.01952155865728855, + -0.015648234635591507, + -0.010225578211247921, + 0.017792832106351852, + 0.0155422268435359, + -0.004435976501554251, + 0.0024993140250444412, + -0.0016940701752901077, + 0.011114404536783695, + -0.005369652062654495, + 0.012166318483650684, + -0.03927144035696983, + -0.007171767298132181, + -0.011685210280120373, + 0.017499275505542755, + 0.024675119668245316, + -0.004774382803589106, + -0.0026889031287282705, + -0.0279694851487875, + -0.015990717336535454, + 0.010250041261315346, + -0.034085262566804886, + -0.022294044494628906, + -0.01181568019092083, + -0.010657760314643383, + 0.03057888336479664, + -0.005581665318459272, + 0.02666478604078293, + 0.000430907413829118, + -0.0066091157495975494, + -0.012655580416321754, + -0.004501211456954479, + -0.01577870361506939, + -0.025196999311447144, + -0.019407397136092186, + 0.013829809613525867, + 0.006711045745760202, + -0.006959753576666117, + -0.026012437418103218, + -0.002904993947595358, + -0.011693364940583706, + -0.014588166028261185, + 0.018755048513412476, + -0.016202731058001518, + -0.00836638268083334, + -0.004374818876385689, + -0.006123931147158146, + -0.038651708513498306, + 0.013136688619852066, + -0.0324217714369297, + 0.03214452043175697, + 0.0037061606999486685, + 0.00624624639749527, + -0.007718109991401434, + -0.01321007777005434, + 0.011709673330187798, + 0.028931699693202972, + -0.011391653679311275, + -0.009915712289512157, + -0.04621896147727966, + 0.0024646578822284937, + 0.010771920904517174, + 0.03113337978720665, + -0.0033045578747987747, + 0.017678672447800636, + -0.00440335925668478, + 0.007049452047795057, + -0.010013564489781857, + 0.00027164240600541234, + -0.030725661665201187, + 0.007620257791131735, + 0.003718392224982381, + -0.010086954571306705, + -0.004917084239423275, + 0.009573228657245636, + 0.0009632348082959652, + -0.022799614816904068, + 0.01055990718305111, + 0.002144599100574851, + -0.01924430951476097, + 0.039401911199092865, + 0.006250323727726936, + 0.01748296618461609, + -0.0028132572770118713, + 0.0011089941253885627, + 0.018722431734204292, + -0.03225868195295334, + -0.005092403385788202, + -0.02885015681385994, + 0.004647990223020315, + -0.018396256491541862, + -0.016251657158136368, + -0.01542806625366211, + -0.005292185582220554, + 0.012908365577459335, + -0.020728405565023422, + -0.00570805836468935, + -0.010755612514913082, + -0.023044247180223465, + -0.0026848260313272476, + -0.025474248453974724, + 0.0522858127951622, + -0.02032068744301796, + 0.019097531214356422, + 0.022342970594763756, + -0.00278471689671278, + -0.04400097578763962, + -0.009051349014043808, + 0.04758889600634575, + 0.02521330863237381, + 0.0425984226167202, + -0.00972000788897276, + -0.04801292344927788, + -0.01984773389995098, + 0.025506865233182907, + -0.045044735074043274, + -0.016047798097133636, + -0.0005448137526400387, + -0.028719687834382057, + -0.015664542093873024, + 0.012549573555588722, + 0.044066209346055984, + 0.00539411511272192, + -0.0006227898993529379, + 0.004468594212085009, + -0.013144842348992825, + -0.0068252068012952805, + 0.02245713211596012, + 0.012410948984324932, + -0.006963830906897783, + 0.022913776338100433, + -0.021185049787163734, + -0.0006013846723362803, + 0.009499839507043362, + 0.005002705380320549, + -0.015305750072002411, + 0.017923302948474884, + 0.050491850823163986, + 0.027659619227051735, + -0.021511225029826164, + 0.0073470864444971085, + 0.022489748895168304, + -0.005659131798893213, + -0.007098378147929907, + 0.005846682470291853, + 0.007241079583764076, + -0.014824642799794674, + 0.008472389541566372, + -0.0006752836634404957, + -0.012060311622917652, + 0.006050541531294584, + -0.02549055777490139, + -0.011032860726118088, + -0.015990717336535454, + -0.011725982651114464, + 0.00794235523790121, + -0.009948330000042915, + 0.014783870428800583, + -0.019929276779294014, + -0.00047804988571442664, + 0.002462619449943304, + -0.006205474492162466, + 0.03757533058524132, + -0.05675440654158592, + 0.004802923183888197, + -0.003139432054013014, + -0.021690621972084045, + -0.012965446338057518, + 0.029192639514803886, + -0.03304150328040123, + 0.005410423502326012, + -0.012614808976650238, + 0.010706686414778233, + 0.022587601095438004, + 0.0013760497095063329, + 0.01780914142727852, + -0.012859439477324486, + -0.03969546779990196, + 0.016602294519543648, + -0.017972229048609734, + -0.021315520629286766, + -0.016194576397538185, + 0.003952830098569393, + 0.07136703282594681, + 0.01002171915024519, + 0.005418578162789345, + -0.0010580293601378798, + 0.014261990785598755, + -0.011195948347449303, + -0.003243400249630213, + 0.011122559197247028, + -0.006405256688594818, + 0.05815695971250534, + -0.005667286459356546, + 0.0013801269233226776, + -0.019130149856209755, + -0.025833040475845337, + 0.015028501860797405, + -0.004990473855286837, + -0.0006125969812273979, + -0.009279672056436539, + -0.02596350945532322, + -0.003223014296963811, + -0.012296788394451141, + -0.022489748895168304, + 0.023223642259836197, + -0.019211692735552788, + 0.025278544053435326, + -0.01090239081531763, + 0.002071209717541933, + 0.004949701949954033, + -0.02712143026292324, + -0.0014351689023897052, + -0.017580818384885788, + -0.046479903161525726, + -0.024870824068784714, + -0.03382432088255882, + 0.020059747621417046, + -0.0002894800854846835, + 0.026599550619721413, + 0.016072260215878487, + 0.02880123071372509, + -0.025979818776249886, + 0.023598743602633476, + 0.003777511417865753, + 0.022571293637156487, + 0.023696595802903175, + 0.0023912687320262194, + -0.015811320394277573, + 0.0032821334898471832, + 0.04148942977190018, + -0.030317943543195724, + 0.023924918845295906, + -0.03346553072333336, + -0.02679525688290596, + 0.008203295059502125, + 0.00972000788897276, + -0.01585209369659424, + 0.025784114375710487, + -0.025099147111177444, + -0.0059567661955952644, + 0.004026219714432955, + -0.01214185543358326, + -0.009141047485172749, + -0.011554740369319916, + -0.0032617475371807814, + -0.01118779368698597, + 0.015525918453931808, + -0.007881197147071362, + -0.014743098989129066, + 0.009777088649570942, + 0.0014932687627151608, + 0.01339762844145298, + 0.010339739732444286, + 0.004030296579003334, + -0.0424027182161808, + -0.04054352268576622, + -0.03910835459828377, + -0.0008959612459875643, + -0.03956499695777893, + -0.02880123071372509, + -0.007159535773098469, + -0.01761343702673912, + 0.006812975276261568, + 0.008048362098634243, + 0.021168742328882217, + 0.02142968215048313, + -0.04641466587781906, + 0.027366062626242638, + 0.014694172888994217, + -0.0002487082383595407, + 0.00830522459000349, + -0.00517394719645381, + -0.04990473762154579, + 0.061255618929862976, + 0.034280966967344284, + -0.03992379084229469, + 0.020565317943692207, + 0.024218475446105003, + 0.006572421174496412, + -0.04073922708630562, + -0.04954594373703003, + -0.00372858508490026, + 0.05323171988129616, + 0.004374818876385689, + 0.006751817185431719, + -0.020891493186354637, + -0.018559344112873077, + 0.01171782799065113, + -0.0014698249287903309, + 0.008594704791903496, + -0.0065031093545258045, + -0.0016176229109987617, + 0.019032297655940056, + -0.000649291614536196, + -0.006486800499260426, + -0.04954594373703003, + 0.0261429063975811, + 0.04302245005965233, + 0.011986922472715378, + 0.0029437271878123283, + -0.0018500224687159061, + -0.0023973844945430756, + -0.0155422268435359, + -0.0029824604280292988, + 0.0075224051252007484, + -0.01214185543358326, + -0.010486518032848835, + 0.02544162981212139, + 0.01325900387018919, + -0.012215244583785534, + 0.029339419677853584, + -0.01496326643973589, + 0.006344099063426256, + -0.05182916671037674, + -0.004586832597851753, + 0.004974165000021458, + -0.010258195921778679, + 0.022098340094089508, + 0.029013244435191154, + -0.025148073211312294, + -0.006344099063426256, + 0.021266594529151917, + 0.02032068744301796, + -0.003598115174099803, + -0.015607462264597416, + 0.020353304222226143, + -0.005332957021892071, + 0.023696595802903175, + -0.003076235530897975, + -0.0030110005754977465, + -0.00634002173319459, + -0.008093210868537426, + 0.002748022321611643, + 0.013087761588394642, + 0.03168787807226181, + 0.0357813686132431, + 0.011937996372580528, + -0.01263111736625433, + 0.023174716159701347, + 0.00997279305011034, + -0.0028499518521130085, + 0.011611821129918098, + 0.006421565543860197, + -0.02977975457906723, + 0.048763126134872437, + 0.002884607994928956, + 0.03584660589694977, + -0.0013475094456225634, + -0.006034233141690493, + 0.00953245721757412, + 0.026354920119047165, + 0.011212256737053394, + -0.014539239928126335, + 0.014946958050131798, + -0.0025584332179278135, + -0.02922525815665722, + -0.012419103644788265, + -0.013046990148723125, + 0.015379139222204685, + -0.003875363850966096, + 0.0106985317543149, + 0.031850963830947876, + 0.0326174758374691, + 0.009964638389647007, + 0.020809948444366455, + 0.029567740857601166, + -0.02036961354315281, + 0.02217988297343254, + -0.017972229048609734, + 0.016096724197268486, + 0.015110045671463013, + 0.01146504282951355, + -0.006649887654930353, + -0.018119007349014282, + -0.0036307326517999172, + -0.025196999311447144, + 0.013438399881124496, + 0.04152204468846321, + -0.03506378456950188, + -0.011432425118982792, + 0.00534926587715745, + 0.005777370184659958, + 0.022114647552371025, + 0.01668383926153183, + -0.0138379642739892, + -0.00800351332873106, + -0.02358243428170681, + 0.032731637358665466, + 0.012198936194181442, + 0.02368028648197651, + -0.018167933449149132, + -0.02456095814704895, + -0.011546586640179157, + -0.03976070135831833, + 0.020842567086219788, + 0.013250849209725857, + 0.045273054391145706, + 0.010421283543109894, + 0.008741483092308044, + -0.02217988297343254, + 0.01603148877620697, + -0.0026379383634775877, + -0.031997743993997574, + 0.015697160735726357, + -0.01398474257439375, + 0.0016145650297403336, + -0.006311481352895498, + -0.03705345094203949, + -0.011114404536783695, + -0.04915453493595123, + 0.009059503674507141, + -0.013813501223921776, + 0.061581794172525406, + -0.00852946937084198, + 0.017548201605677605, + 0.011057323776185513, + 0.01481648813933134, + -0.02087518386542797, + -0.014367997646331787, + 0.004688762128353119, + 0.010315276682376862, + -0.010315276682376862, + -0.002171100815758109, + -0.005072017200291157, + -0.020157599821686745, + 0.0359770767390728, + 0.03415049612522125, + 0.01505296491086483, + -0.025833040475845337, + 0.014107057824730873, + -0.008961651474237442, + -0.004411513451486826, + 0.028996935114264488, + -0.05336219072341919, + -0.004652067553251982, + -0.038097210228443146, + 0.014686018228530884, + 0.024870824068784714, + -0.020793640986084938, + -0.042109161615371704, + -0.0023953458294272423, + 0.03159002587199211, + -0.022212501615285873, + -0.026811564341187477, + 0.029747137799859047, + 0.006543880794197321, + 0.021331828087568283, + 0.014278300106525421, + -0.01244356669485569, + -0.014017360284924507, + -0.0035553048364818096, + -0.013063298538327217, + 0.01298175472766161, + 0.013275312259793282, + -0.028034720569849014, + -0.036694660782814026, + 0.0003042598837055266, + 0.0011956343660131097, + -0.03910835459828377, + 0.004407436121255159, + -0.025457939133048058, + -0.013772728852927685, + 0.007379703689366579, + ], + "index": 37, + }, + { + "title": "List of African countries by population", + "text": "This is a list of African countries and dependent territories sorted by population, which is sorted by the 2015 the mid-year normalized demographic projections.", + "vector": [ + 0.0324319452047348, + 0.07498246431350708, + -0.018316054716706276, + -0.02339920774102211, + -0.017242148518562317, + -0.014461927115917206, + 0.009885896928608418, + -0.015750613063573837, + 0.015130135230720043, + -0.011675738729536533, + 0.009116264060139656, + -0.051117900758981705, + -0.04214482381939888, + 0.033314935863018036, + 0.02149004116654396, + -0.023661717772483826, + 0.04627339541912079, + -0.00022540829377248883, + 0.09722424298524857, + 0.008185545913875103, + -0.025320304557681084, + -0.00628234725445509, + -0.0023670666851103306, + 0.018101273104548454, + 0.02009396441280842, + 0.034699078649282455, + 0.02818405255675316, + -0.005232306197285652, + -0.009897829033434391, + 0.02794540673494339, + 0.04104705527424812, + -0.02052352763712406, + 0.032026246190071106, + -0.022408828139305115, + 0.024437315762043, + 0.01496308296918869, + -0.06543663889169693, + 0.011156684719026089, + 0.037896931171417236, + 0.03887537866830826, + 0.05064060911536217, + -0.01690804585814476, + -0.018041612580418587, + 0.04410171881318092, + 0.009050636552274227, + -0.07154597342014313, + -0.03885151445865631, + -0.00714147137477994, + 0.014139755629003048, + -0.020845698192715645, + -0.008113952353596687, + 0.035605933517217636, + -0.07646206766366959, + -0.007213065400719643, + -0.055843085050582886, + 0.011723468080163002, + -0.04414944723248482, + 0.047824591398239136, + -0.0003389514167793095, + 0.019222907721996307, + 0.024771420285105705, + 0.01707509718835354, + 0.03441270440816879, + 4.842829002882354e-05, + 0.00518159382045269, + 0.006079498212784529, + -0.0370139442384243, + 0.012874933890998363, + 0.053408898413181305, + 0.04620179906487465, + 0.053647544234991074, + 0.002472965745255351, + 0.009056602604687214, + -0.009653217159211636, + -0.011061226949095726, + 0.019043924286961555, + 0.02909090556204319, + -0.005548511631786823, + 0.05250204727053642, + 0.03505704924464226, + 0.03446043282747269, + 0.0015071965754032135, + 0.038517411798238754, + 0.04982921481132507, + 0.02971138432621956, + 0.0015176372835412621, + 0.0020120812114328146, + -0.04319486394524574, + -0.00866283755749464, + -0.017027368769049644, + -0.010607799515128136, + 0.02854202128946781, + 0.04443582147359848, + 0.015106270089745522, + 0.026346480473876, + 0.028732938691973686, + 0.031047800555825233, + -0.01051830779761076, + 0.06997090578079224, + 0.0011932282941415906, + -0.0217644851654768, + -0.043099407106637955, + 0.013960771262645721, + 0.00497277919203043, + 0.013972703367471695, + 0.011419194750487804, + 0.03429338335990906, + -0.07536429911851883, + -0.003898873459547758, + 0.03367290273308754, + 0.004722201265394688, + 0.03446043282747269, + 0.005369527265429497, + 0.0037765675224363804, + 0.008215377107262611, + 0.0027354760095477104, + -0.006598552688956261, + -0.029902301728725433, + 0.006306211464107037, + 0.04085613787174225, + 0.03488999605178833, + 0.018101273104548454, + 0.04856439307332039, + 0.07345513254404068, + -0.02194346860051155, + 0.06405249238014221, + -0.006932656746357679, + 0.008012528531253338, + 0.006336042191833258, + -0.011711535975337029, + -0.023661717772483826, + 0.049447380006313324, + -0.00047691844520159066, + 0.014211349189281464, + -0.0005593257956206799, + -0.0005365798715502024, + 0.05140427500009537, + -0.04911327734589577, + -0.019485417753458023, + 0.06052054092288017, + 3.500447201076895e-05, + -0.043099407106637955, + 0.017552388831973076, + 0.010381086729466915, + -0.015082405880093575, + -0.011216346174478531, + 0.002010589698329568, + 0.022647473961114883, + -0.006813333835452795, + -0.020845698192715645, + -0.009253486059606075, + -0.015750613063573837, + 0.05173838138580322, + 0.01477216649800539, + 0.00723692961037159, + 0.02909090556204319, + 0.023232154548168182, + 0.009032738395035267, + 0.00961741991341114, + 0.025224845856428146, + 0.011317770928144455, + 0.0496382974088192, + -0.031787604093551636, + -0.025391899049282074, + 0.012839136645197868, + -0.027348792180418968, + 0.005196509417146444, + 0.0042836894281208515, + -0.029067041352391243, + -0.016919977962970734, + 0.02534416876733303, + -0.030737562105059624, + -0.00527705205604434, + 0.005253187846392393, + -0.02565440908074379, + 0.006264448631554842, + 0.03236035257577896, + -0.016657467931509018, + -0.005002609919756651, + -0.0018032663501799107, + 0.010124541819095612, + -0.025988513603806496, + 0.022516218945384026, + -0.020869562402367592, + -0.025153253227472305, + -0.01641882210969925, + 0.0007524795946665108, + 0.020129762589931488, + -0.003523006569594145, + -0.021573567762970924, + -0.032408080995082855, + -0.014509656466543674, + -0.04445968568325043, + -0.012994256801903248, + 0.06443432718515396, + -0.018005814403295517, + -0.024210602045059204, + -0.020953088998794556, + -0.026585126295685768, + 0.05235885828733444, + -0.020368406549096107, + -0.00028917143936268985, + 0.021919604390859604, + 0.02117980271577835, + -0.0019643520936369896, + -0.004716234747320414, + 0.01996270939707756, + -0.06815720349550247, + -0.03228875994682312, + 0.00930121447890997, + -0.04687000811100006, + -0.016717128455638885, + -0.0374196395277977, + 0.03173987194895744, + 0.03016481176018715, + 0.01603698916733265, + 0.002898053266108036, + -0.003534938907250762, + 0.04441195726394653, + 0.006052650511264801, + 0.06758445501327515, + 0.002270116936415434, + -0.02458050288259983, + -0.033171746879816055, + -0.040736813098192215, + -0.05407710745930672, + 0.03718099370598793, + 0.01847117394208908, + -0.0012775000650435686, + 0.015858003869652748, + -0.000102356614661403, + -0.03016481176018715, + 0.04033111780881882, + -0.019950777292251587, + -0.01409202627837658, + 0.023172494024038315, + 0.0169796384871006, + -0.023864567279815674, + 0.0060198367573320866, + 0.07083003222942352, + -0.018423445522785187, + -0.03918561711907387, + -0.0129823237657547, + -0.006094413809478283, + -0.022420760244131088, + 0.05932731181383133, + -0.010202102363109589, + -0.03916175290942192, + 0.06896859407424927, + 0.06419568508863449, + -0.03376835957169533, + -0.01404429692775011, + -0.024771420285105705, + -0.014784098602831364, + -0.00440897885710001, + 0.03763442113995552, + 0.06433887034654617, + -0.02968752011656761, + -0.01256469450891018, + -0.023494666442275047, + -0.010017151944339275, + -0.018733683973550797, + -0.014354536309838295, + -0.006944588851183653, + 0.006461331155151129, + -0.029806843027472496, + 0.04987694323062897, + -0.028804531320929527, + 0.037610556930303574, + -0.016514280810952187, + -0.013781786896288395, + 0.010756953619420528, + -0.022611675783991814, + -0.018351851031184196, + 0.03715712949633598, + 0.05655902251601219, + 0.0461779348552227, + -0.041643667966127396, + 0.00812588445842266, + 0.03030799888074398, + -0.003955551888793707, + -0.008239241316914558, + 0.014318739995360374, + -0.005142814014106989, + -0.043934665620326996, + 0.03338652849197388, + -0.03911402449011803, + -0.05708404257893562, + -0.013101646676659584, + -0.015571629628539085, + -0.011801027692854404, + 0.045629050582647324, + 0.029520468786358833, + 0.01985531859099865, + 0.0008814973989501595, + -0.013698261231184006, + 0.004483555443584919, + 0.021931536495685577, + 0.02103661559522152, + 0.07006637006998062, + -0.0055872914381325245, + 0.015213660895824432, + 0.009933625347912312, + 0.0033649038523435593, + -0.03267059102654457, + -0.024365723133087158, + -0.024914607405662537, + -0.05479304492473602, + -0.008084122091531754, + 0.0370139442384243, + -0.007797746919095516, + 0.01968826726078987, + -0.0034722944255918264, + -0.017194420099258423, + 0.030833018943667412, + -0.004167350009083748, + 0.046297259628772736, + -0.007511372212320566, + 0.043481238186359406, + 0.009766574017703533, + 0.007839510217308998, + -0.032026246190071106, + -0.07975538074970245, + 0.00911029800772667, + -0.013495412655174732, + -0.011341635137796402, + -0.007576999720185995, + -0.026227157562971115, + 0.011622044257819653, + -0.032193299382925034, + 0.004769930150359869, + -0.037753742188215256, + -0.009987320750951767, + -0.052788421511650085, + 0.03916175290942192, + 0.03648892045021057, + 0.026083970442414284, + -0.027826083824038506, + -0.02370944619178772, + -0.001560145989060402, + -0.0056380038149654865, + 0.0008650905219838023, + 0.02009396441280842, + 0.021752553060650826, + 0.032718319445848465, + 0.0022537100594490767, + -0.05488850176334381, + 0.012182861566543579, + 0.015177864581346512, + -0.018208663910627365, + 0.00038630765629932284, + -0.03801625594496727, + 0.019604740664362907, + 0.033410392701625824, + 0.027659032493829727, + -0.014796030707657337, + 0.0067954352125525475, + 0.009677081368863583, + -0.003487209789454937, + -0.04727570712566376, + -0.010637630708515644, + 0.02023715153336525, + -0.03107166476547718, + 0.00282496795989573, + -0.050354234874248505, + -0.026227157562971115, + 0.02166902646422386, + -0.004653590265661478, + 0.034007005393505096, + 0.0316682793200016, + 0.009444402530789375, + 0.019664403051137924, + -0.004907151684165001, + 0.010148406960070133, + -0.055699896067380905, + 0.028494292870163918, + -0.016478482633829117, + 0.01829219050705433, + 0.004325452726334333, + -0.03918561711907387, + -0.00630024541169405, + 0.05827727168798447, + 0.03231262415647507, + 0.03455589339137077, + -0.033100154250860214, + -0.038445815443992615, + 0.05312252417206764, + -0.01256469450891018, + -0.030427321791648865, + 0.018936533480882645, + 0.05250204727053642, + -0.03932880610227585, + 0.02818405255675316, + 0.0015392645727843046, + 0.039137888699769974, + -0.03429338335990906, + 0.036918483674526215, + 0.006485195830464363, + -0.04713251814246178, + -0.04092773050069809, + -0.04436422884464264, + -0.029353417456150055, + -0.0012633304577320814, + 0.0033499884884804487, + -0.003994331695139408, + 0.024079347029328346, + -0.0005775970639660954, + -0.011150718666613102, + 0.029496604576706886, + 0.03333880007266998, + -0.00649116188287735, + 0.0504019632935524, + -0.05006786063313484, + 0.005837869364768267, + -0.022611675783991814, + -0.004382131155580282, + 0.006580654066056013, + 0.023065103217959404, + 0.029950030148029327, + 0.017791034653782845, + 0.010804682038724422, + -0.022086655721068382, + -0.015165931545197964, + 0.010404950939118862, + -0.06395703554153442, + 0.037515100091695786, + -0.01579834334552288, + 0.012057572603225708, + -0.05947050079703331, + -0.0015101796016097069, + 0.041786856949329376, + 0.01447385922074318, + -0.0534566268324852, + -0.012445371598005295, + 0.0014430604642257094, + 0.004295621998608112, + -0.05231112986803055, + -0.04696546494960785, + -0.0006476992275565863, + 0.0008516667294315994, + -0.065675288438797, + -0.022921916097402573, + -0.0005701393820345402, + 0.021275261417031288, + -0.020153626799583435, + -0.030498916283249855, + -0.03823103383183479, + 0.005107017233967781, + -0.0036721602082252502, + -0.014628979377448559, + 0.03632187098264694, + 0.004483555443584919, + -0.03541501611471176, + 0.01745693013072014, + -0.04130956530570984, + -0.01683645136654377, + 0.035391151905059814, + -0.01927063800394535, + -0.0004112908791285008, + 0.025248711928725243, + -0.005202475469559431, + 0.01090014073997736, + 0.012695949524641037, + -0.03715712949633598, + 0.04185844957828522, + -0.014080094173550606, + -0.022194046527147293, + -0.011908418498933315, + -0.04147661477327347, + 0.045843832194805145, + -0.05359981581568718, + -0.009605487808585167, + -0.03579685091972351, + 0.01553583238273859, + -0.021704822778701782, + -0.010685359127819538, + 0.009104331955313683, + 0.06228651851415634, + -0.027444250881671906, + -0.018626293167471886, + -0.0028264594729989767, + 0.030570508912205696, + -0.03846967965364456, + 0.01791035756468773, + -0.036608245223760605, + -0.023065103217959404, + -0.023232154548168182, + 0.022420760244131088, + -0.03457975760102272, + 0.01351927686482668, + 0.026847636327147484, + 0.03794465959072113, + 0.010577969253063202, + 0.005417256616055965, + -0.01645461842417717, + -0.017158623784780502, + 0.00885375402867794, + -0.021120140329003334, + 0.008203445002436638, + 0.04076068103313446, + -0.025224845856428146, + 0.02816018834710121, + 0.027444250881671906, + 0.006001938600093126, + -0.0027563574258238077, + -0.003391751553863287, + -0.024461179971694946, + -0.04865984991192818, + -0.03551047295331955, + -0.019986573606729507, + 0.028661344200372696, + 0.03586844354867935, + -0.0026981874834746122, + -0.01836378313601017, + 0.055222608149051666, + 0.030809154734015465, + 0.07918263226747513, + 0.024747556075453758, + -0.006139159668236971, + -0.0040689087472856045, + -0.03632187098264694, + 0.03343425691127777, + -0.007099708542227745, + 0.0008539039990864694, + -0.029759114608168602, + 0.04925646632909775, + -0.005852784961462021, + -0.007481541484594345, + 0.00318890274502337, + -0.014187484979629517, + -0.013936907052993774, + -0.0021776417270302773, + 0.009253486059606075, + -0.05030650645494461, + -0.0030934445094317198, + -0.061188749969005585, + 0.0580386258661747, + -0.06190468370914459, + -0.008412259630858898, + 0.02038034051656723, + 0.024389587342739105, + 0.02205085940659046, + -0.013984635472297668, + -0.03403087332844734, + -0.045461997389793396, + 0.000855395570397377, + -0.00328436098061502, + 0.00798269733786583, + -0.02551122196018696, + -0.04434036463499069, + -0.00029644265305250883, + -0.0028294427320361137, + -0.014796030707657337, + -0.011812960729002953, + -0.02166902646422386, + 0.010649562813341618, + 0.03333880007266998, + -0.009140129201114178, + -0.003171004354953766, + -0.03610708937048912, + 0.016323363408446312, + -0.021919604390859604, + 0.019210975617170334, + -0.001032888307236135, + -0.017158623784780502, + 0.014748302288353443, + -0.039209481328725815, + 0.042335741221904755, + -0.02370944619178772, + 0.0017257065046578646, + 0.035391151905059814, + 0.0014937727246433496, + -0.004104705527424812, + 0.04992467164993286, + 0.01863822713494301, + 0.021704822778701782, + 0.00949213095009327, + -0.009414571337401867, + 0.006383771542459726, + -0.02534416876733303, + -0.013578938320279121, + 0.02450891025364399, + -0.018721751868724823, + -0.0062763807363808155, + 0.03023640625178814, + -0.008430157788097858, + 0.0079170698300004, + 0.021394584327936172, + 0.011598179116845131, + -0.012779475189745426, + 0.049590568989515305, + -0.0027578489389270544, + 0.02892385423183441, + -0.05107017233967781, + -0.0024848980829119682, + -0.02839883416891098, + -0.03885151445865631, + 0.022969644516706467, + -0.008633007295429707, + -0.0033082254230976105, + 0.04529494792222977, + 0.03562979772686958, + 0.010106643661856651, + -0.03978223353624344, + -0.02399582229554653, + 0.02280259318649769, + 0.03696621209383011, + -0.032408080995082855, + -0.004137519281357527, + 0.006052650511264801, + -0.03498545289039612, + -0.015189796686172485, + 0.003946602810174227, + -0.009969422593712807, + -0.04787231981754303, + 0.04324259236454964, + -0.027826083824038506, + 0.006413602270185947, + 0.0229099839925766, + 0.02787381410598755, + 0.02923409454524517, + -0.00564993591979146, + -0.012469235807657242, + -0.007117606699466705, + 0.013614735566079617, + 0.00817361380904913, + -0.0022000146564096212, + -0.04071294888854027, + 0.019425757229328156, + -0.026370346546173096, + -0.0008658362785354257, + -0.005599224008619785, + -0.014843760058283806, + -0.012158996425569057, + -0.023792972788214684, + -0.006222685799002647, + -0.029806843027472496, + -0.008925347588956356, + -0.001980758970603347, + 0.020988885313272476, + 0.03770601376891136, + 0.04505630210042, + -0.053027067333459854, + 0.012033707462251186, + -0.008841821923851967, + -0.006497128400951624, + -0.044006261974573135, + -0.02656126208603382, + -0.017337607219815254, + 0.024699825793504715, + -0.009993286803364754, + -0.0004828845849260688, + -0.005903496872633696, + -0.009605487808585167, + 0.0036095157265663147, + -0.006007904652506113, + 0.0023282866459339857, + -0.011783129535615444, + 0.02211051993072033, + 0.028446562588214874, + -0.041882313787937164, + 0.013638599775731564, + 0.017122825607657433, + 0.0024714742321521044, + 0.02263554185628891, + -0.004319486673921347, + 0.03522409871220589, + -0.06467297673225403, + 0.035009317100048065, + -0.00028786633629351854, + -0.021478109061717987, + -0.02732492797076702, + -0.014056229963898659, + 0.004749048501253128, + 0.032789915800094604, + 0.014819895848631859, + -0.0679662823677063, + 0.03205011412501335, + 0.004892236087471247, + -0.015702884644269943, + -0.02123946323990822, + -0.00015325525600928813, + -0.022504286840558052, + 0.016919977962970734, + -0.0015750613529235125, + -0.004206129815429449, + 0.013924974016845226, + 0.04749048873782158, + 0.011639942415058613, + 0.006306211464107037, + -0.005629054736346006, + -0.01767171174287796, + 0.03006935305893421, + -0.011383398436009884, + 0.007099708542227745, + -0.04596315324306488, + -0.0011708552483469248, + 0.01530911959707737, + 0.053170252591371536, + -0.014068162068724632, + -0.043409645557403564, + 0.05016331747174263, + -0.02061898447573185, + -0.052883878350257874, + -0.024317992851138115, + 0.010041016153991222, + 0.0003652397426776588, + -0.016478482633829117, + -0.04968602582812309, + -0.021788349375128746, + -0.0038571106269955635, + -0.014867625199258327, + -0.032479673624038696, + 0.022337233647704124, + -0.0618569552898407, + -0.01770750805735588, + -0.016717128455638885, + -0.00666418019682169, + 0.0028652395121753216, + 0.02038034051656723, + -0.032479673624038696, + 0.007266760338097811, + -0.011610111221671104, + 0.027229471132159233, + -0.0065388912335038185, + -0.01978372596204281, + -0.02270713448524475, + -0.005336713511496782, + 0.015034676529467106, + 0.02440151944756508, + -0.0023730327375233173, + 0.04443582147359848, + 0.031238717958331108, + 0.015368781052529812, + -0.014175552874803543, + -0.006843164563179016, + 0.016752924770116806, + 0.01885300688445568, + -0.015595493838191032, + -0.013889177702367306, + -0.003794466145336628, + -0.01707509718835354, + -0.0021761502139270306, + -0.04901782050728798, + 0.0028294427320361137, + 0.0370139442384243, + -0.050879254937171936, + -0.02385263331234455, + 0.019557012245059013, + 0.009080467745661736, + -0.015989258885383606, + 0.015822207555174828, + 0.008829889819025993, + -0.02503393031656742, + -0.022337233647704124, + -0.021263329312205315, + -0.01808934099972248, + -0.009289282374083996, + -0.005169661715626717, + -0.002868222538381815, + -0.008227309212088585, + 0.03281378000974655, + -0.015189796686172485, + 0.018447309732437134, + -0.049590568989515305, + -0.05016331747174263, + -0.014223281294107437, + 0.005614139139652252, + -0.02149004116654396, + -0.01652621291577816, + 0.015404577367007732, + -0.02932955138385296, + 0.0071832346729934216, + 0.012445371598005295, + 0.007386083249002695, + 0.04457901045680046, + -0.012349912896752357, + 0.005548511631786823, + 0.0009478707215748727, + -0.04099932312965393, + -0.006694010924547911, + 0.04114251211285591, + -0.038660597056150436, + 0.02527257613837719, + 0.0008039375534281135, + -0.03906629607081413, + -0.005211424548178911, + -0.017647847533226013, + 0.024258332327008247, + -0.01256469450891018, + 0.004349317401647568, + -0.033195611089468, + 0.0036840925458818674, + -0.04076068103313446, + 0.010148406960070133, + 0.007559101562947035, + 0.03281378000974655, + 0.0047371163964271545, + -0.019879184663295746, + 0.01783876307308674, + -0.02794540673494339, + 0.011067193001508713, + -0.036059360951185226, + 0.027826083824038506, + -0.01896039769053459, + 0.01878141425549984, + -0.05612945929169655, + -0.02128719352185726, + -0.0032545302528887987, + 0.02125139720737934, + -0.0035200235433876514, + -0.07001863420009613, + -0.018077408894896507, + -0.015571629628539085, + -0.02663285657763481, + -0.057227231562137604, + 0.04739502817392349, + -0.035295695066452026, + 0.001953911269083619, + -0.04030725359916687, + 0.015774479135870934, + -0.020750241354107857, + 0.002695204457268119, + 0.01936609484255314, + 0.023804904893040657, + -0.020129762589931488, + 0.0124095743522048, + -0.025773731991648674, + 0.02092922478914261, + 0.010488476604223251, + -0.015142067335546017, + -0.022432692348957062, + 0.020607052370905876, + -0.013030053116381168, + -0.003612498752772808, + 0.005488850176334381, + 0.039806097745895386, + 0.028613615781068802, + -0.01419941708445549, + -0.006902826018631458, + 0.017898425459861755, + -0.038135576993227005, + -0.01313744392246008, + -0.005784174427390099, + 0.032026246190071106, + -0.03412633016705513, + 0.004593928810209036, + -0.04756208136677742, + 0.05274069309234619, + 0.01294652745127678, + -0.049972403794527054, + 0.037061672657728195, + 0.005837869364768267, + 0.012719813734292984, + 0.028756802901625633, + 0.006413602270185947, + -0.01645461842417717, + 0.03486613184213638, + 0.03648892045021057, + 0.008931313641369343, + -0.03434111177921295, + 0.02332761324942112, + 0.025821460410952568, + -0.003341039177030325, + -0.01515399944037199, + 0.029806843027472496, + -0.006944588851183653, + -0.01745693013072014, + -0.018805278465151787, + 0.007111640647053719, + -0.02930568717420101, + 0.012481167912483215, + -0.028732938691973686, + -0.05436348170042038, + 0.007600864395499229, + 0.005059287883341312, + 0.0035677526611834764, + 0.007654559798538685, + 0.03221716359257698, + 0.011574314907193184, + -0.005080169532448053, + 0.013197105377912521, + -0.023244088515639305, + 0.05402937904000282, + 0.004397046286612749, + -0.02069057896733284, + 0.013674396090209484, + -0.0030352745670825243, + 0.05178610980510712, + 0.011824892833828926, + 0.02496233582496643, + -0.03746736794710159, + -0.011097023263573647, + -0.026608992367982864, + 0.007350286468863487, + 0.037061672657728195, + 0.05985233187675476, + -0.0038869413547217846, + 0.02003430388867855, + 0.03245580941438675, + 0.013555074110627174, + -0.0519292950630188, + 0.023077035322785378, + 0.002881646389141679, + 0.04052203521132469, + 0.033171746879816055, + 0.003851144341751933, + 0.01400850061327219, + 0.027826083824038506, + 0.0023849650751799345, + -0.05923185497522354, + -0.04574837535619736, + -0.015822207555174828, + 0.03185919672250748, + -0.008579311892390251, + -0.031883060932159424, + -0.0024416435044258833, + 0.047227974981069565, + -0.012445371598005295, + 0.018793346360325813, + 0.018447309732437134, + -0.02007010020315647, + 0.007654559798538685, + -0.01847117394208908, + 0.027348792180418968, + 0.03147736191749573, + -0.038660597056150436, + 0.0034543960355222225, + 0.01220075972378254, + -0.0018882837612181902, + -0.019568944349884987, + 0.004191214684396982, + -0.03412633016705513, + -0.028231782838702202, + 0.05369527265429497, + 0.0030337830539792776, + -0.017373403534293175, + 0.008167647756636143, + -0.009820269420742989, + -0.005324781406670809, + 0.010756953619420528, + 0.011055259965360165, + 0.016502346843481064, + 0.017886493355035782, + 0.009885896928608418, + -0.0008762770448811352, + 0.0060854642651975155, + -0.006437466945499182, + 0.04765753820538521, + 0.007314489688724279, + -0.016848383471369743, + -0.01553583238273859, + 0.035916171967983246, + -0.03687075525522232, + 0.001680960413068533, + -0.005008575972169638, + -0.017552388831973076, + 0.030665967613458633, + -0.048134829849004745, + -0.01936609484255314, + -0.012719813734292984, + 0.04298008233308792, + -0.0022074724547564983, + 0.00461779348552227, + 0.05665447935461998, + 0.0030606305226683617, + -0.05359981581568718, + -0.012695949524641037, + 0.0003096800355706364, + -0.01166380662471056, + -0.06968453526496887, + 0.024986201897263527, + 0.05293160676956177, + 0.01943768933415413, + 0.0035409049596637487, + 0.04333805292844772, + -0.01592959836125374, + 0.0007897680043242872, + 0.02301737479865551, + -0.002219404559582472, + -0.01347154751420021, + -0.014628979377448559, + -0.005569393280893564, + -0.018005814403295517, + 0.013638599775731564, + 0.028804531320929527, + 0.007445744704455137, + -0.02218211442232132, + -0.012528897263109684, + 0.04068908467888832, + 0.0014907895820215344, + -0.0014743827050551772, + 0.019604740664362907, + -0.026990825310349464, + -0.012254455126821995, + -0.030140947550535202, + -0.0025788648054003716, + 0.006198821123689413, + 0.014175552874803543, + 0.04176299273967743, + 0.0031053766142576933, + 0.06047281250357628, + -0.01669326424598694, + 0.0351286418735981, + -0.029043177142739296, + 0.041118647903203964, + 0.010589901357889175, + -0.00014356027531903237, + -0.024150941520929337, + 0.07927808910608292, + -0.004701319616287947, + 0.013590870425105095, + 0.004561115056276321, + 0.03302856162190437, + 0.024795284494757652, + -0.005444104317575693, + -0.0015750613529235125, + 0.024938471615314484, + 0.006843164563179016, + -0.02565440908074379, + 0.03388768434524536, + 0.003773584496229887, + -0.007451710756868124, + 0.021716754883527756, + 0.00164218049030751, + 0.020463865250349045, + -0.006455365102738142, + -0.014617047272622585, + -0.014903421513736248, + 0.009175925515592098, + 0.012636288069188595, + -0.03562979772686958, + 0.005629054736346006, + 0.003898873459547758, + -0.05068833753466606, + -0.008597210049629211, + -0.02399582229554653, + -0.015249458141624928, + 0.03305242583155632, + -0.015165931545197964, + 0.0023238121066242456, + 0.0019718098919838667, + 0.019282570108771324, + 0.017647847533226013, + -0.013972703367471695, + -0.029878437519073486, + -0.02641807496547699, + -0.0022537100594490767, + -0.028756802901625633, + 0.010148406960070133, + 0.0013610260793939233, + 0.048874631524086, + 0.009724810719490051, + -0.003257513279095292, + -0.014366469345986843, + 0.039281077682971954, + 0.019330298528075218, + -0.00789917167276144, + -0.024795284494757652, + 0.00038668056367896497, + 0.02356625907123089, + -0.01270788162946701, + -0.0037676184438169003, + -0.03300469368696213, + -0.00628234725445509, + -0.006813333835452795, + -0.008811990730464458, + -0.016084717586636543, + -0.028804531320929527, + -0.039281077682971954, + -0.008752329275012016, + -0.034174058586359024, + 0.009366841986775398, + 0.0124095743522048, + 0.010303526185452938, + 0.03231262415647507, + -0.019497349858283997, + -0.0066045187413692474, + 0.008979042991995811, + -0.02009396441280842, + 0.027826083824038506, + -0.024294128641486168, + 0.02283838950097561, + -0.01934223063290119, + -0.03982996195554733, + -0.00912819616496563, + 0.008615108206868172, + -0.019914980977773666, + -0.03947199136018753, + 0.03405473753809929, + 0.0034156159963458776, + -0.03257513418793678, + 0.016824519261717796, + 0.013447683304548264, + 0.0015929598594084382, + -0.010792749933898449, + -0.04519948735833168, + 0.01473637018352747, + 0.005157729610800743, + -0.012433439493179321, + -0.021322989836335182, + 0.01061973161995411, + 0.002018047496676445, + -0.025606678798794746, + 0.00798269733786583, + -0.0026966959703713655, + -0.036823026835918427, + 0.003976433537900448, + -0.028494292870163918, + 0.02141844853758812, + -0.004229994490742683, + 0.007469609379768372, + -0.030475052073597908, + 0.004698336590081453, + 0.03288537263870239, + 0.026083970442414284, + -0.041261836886405945, + 0.025558950379490852, + 0.013352224603295326, + -0.010166305117309093, + -0.009480198845267296, + -0.007051979191601276, + -0.006479229778051376, + -0.01656200923025608, + 0.01466477569192648, + -0.003552837297320366, + -0.007654559798538685, + 0.013495412655174732, + 0.03994928300380707, + 0.006145125720649958, + -0.022194046527147293, + 0.029568197205662727, + -0.004367215558886528, + -0.03839808702468872, + 0.003925721161067486, + -0.006652248091995716, + 0.01934223063290119, + -0.003305242396891117, + 0.014998880214989185, + -0.015237526036798954, + -0.015786411240696907, + -0.006234617903828621, + 0.01194421574473381, + 0.003660227870568633, + -0.0029741215985268354, + 0.0017883509863168001, + 0.00583190331235528, + -0.01220075972378254, + -0.012994256801903248, + 0.00845402292907238, + -0.015702884644269943, + 0.03006935305893421, + 0.018137071281671524, + -0.002459541894495487, + 0.004364232532680035, + 0.0040480270981788635, + 0.004659556783735752, + -0.021275261417031288, + -0.011568348854780197, + 0.00014104331785347313, + 0.014831827953457832, + 0.014032364822924137, + 0.002802595030516386, + -0.0032604963053017855, + -0.021549703553318977, + -0.003687075572088361, + 0.002611678559333086, + -0.00817361380904913, + -0.002750391373410821, + 0.013423818163573742, + -0.026752179488539696, + -0.02648966945707798, + 0.007815645076334476, + 0.008591243997216225, + 0.019640538841485977, + -0.0048982021398842335, + -0.002361100632697344, + -0.024150941520929337, + 0.011777163483202457, + -0.008322767913341522, + -0.01718248799443245, + -0.006067566107958555, + -0.02187187597155571, + 0.030785290524363518, + -0.006163024343550205, + 0.02069057896733284, + -0.0036751432344317436, + 0.0217644851654768, + -0.013757922686636448, + -0.004280706401914358, + 0.015464238822460175, + -0.03830263018608093, + 0.014688640832901001, + 0.007415913976728916, + 0.01579834334552288, + 0.020404204726219177, + 0.008048324845731258, + 0.039424262940883636, + -0.007582965772598982, + 0.0040987394750118256, + 0.037443503737449646, + -0.006652248091995716, + -0.008185545913875103, + -0.016084717586636543, + 0.007654559798538685, + 0.022898051887750626, + -0.013161308132112026, + 0.011616077274084091, + -0.003707956988364458, + 0.02780221961438656, + 0.025535086169838905, + -0.0006570213590748608, + -0.008096054196357727, + 0.04441195726394653, + 0.018172867596149445, + -0.004367215558886528, + -0.016466550529003143, + 0.008245207369327545, + 0.01017227116972208, + 0.004602878354489803, + -0.004015213344246149, + -0.017301810905337334, + -0.014426130801439285, + -0.01026176381856203, + -0.04641658067703247, + -0.03982996195554733, + 0.010804682038724422, + -0.0007860391633585095, + -0.006228651851415634, + -0.009515996091067791, + 0.018864938989281654, + 0.022229842841625214, + -0.037992388010025024, + 0.0362502746284008, + -0.03290923684835434, + 0.0025893053971230984, + -0.00836453028023243, + 0.026513533666729927, + -0.005599224008619785, + -0.01714669167995453, + 0.02205085940659046, + 0.02663285657763481, + -0.007380117196589708, + -0.011890520341694355, + -0.00014784844825044274, + 0.02777835540473461, + 0.01781489886343479, + -0.030665967613458633, + -0.0061570582911372185, + 0.02009396441280842, + -0.000147568789543584, + 0.008292936719954014, + -0.0013528226409107447, + -0.03238421678543091, + 0.033171746879816055, + 0.011622044257819653, + 0.0127914072945714, + -0.0066343494690954685, + -0.009510030038654804, + 0.03159668669104576, + -0.018733683973550797, + -0.01371019333600998, + 0.01652621291577816, + -0.003496158868074417, + -0.04784845560789108, + 0.007541202940046787, + 0.007129539269953966, + 0.022862253710627556, + -0.014318739995360374, + -0.006028786301612854, + 0.01850697211921215, + 0.01305391825735569, + 0.007541202940046787, + -0.05183383822441101, + 0.038517411798238754, + 0.03398314118385315, + 0.02825564704835415, + -0.003824296873062849, + 0.006365872919559479, + -0.006216719746589661, + 0.01308971457183361, + -0.01466477569192648, + 0.011186515912413597, + -0.028422698378562927, + 0.0033201577607542276, + 0.028279511258006096, + 0.02749198116362095, + -0.03307629004120827, + -0.016740992665290833, + 0.009396673180162907, + -0.0004433589056134224, + -0.019210975617170334, + -0.021657094359397888, + -0.010142440907657146, + 0.010375120677053928, + 0.0060407184064388275, + 0.007433812599629164, + 0.00675963843241334, + -0.007302557118237019, + 0.019557012245059013, + -0.006425534375011921, + 0.0013662463752552867, + -0.014497724361717701, + 0.020105896517634392, + -0.006010887678712606, + -0.023721378296613693, + 0.018697887659072876, + -0.03486613184213638, + -0.005664851516485214, + 0.02641807496547699, + -0.037133265286684036, + -0.001321500400081277, + 0.01251696515828371, + 0.02854202128946781, + -0.0030636137817054987, + 0.028207916766405106, + -0.004644641187041998, + 0.01251696515828371, + 0.0162159726023674, + -0.004441792611032724, + -0.011890520341694355, + -0.0328376442193985, + -0.008668803609907627, + -0.024389587342739105, + 0.01062569860368967, + -0.009050636552274227, + -0.01381758414208889, + 0.02245655655860901, + 0.00047057942720130086, + -0.0015586544759571552, + 0.026704449206590652, + 0.031119395047426224, + -0.010023117996752262, + -0.00032925643608905375, + 0.011431126855313778, + -0.031954653561115265, + 0.03574911877512932, + 0.023721378296613693, + 0.016025057062506676, + 0.002481914823874831, + -0.023518530651926994, + 0.003913789056241512, + -3.505108179524541e-05, + 0.007857408374547958, + 0.01711089350283146, + -0.005948243197053671, + 0.009092399850487709, + 0.019974641501903534, + -0.014163619838654995, + -0.00394958583638072, + 0.009671115316450596, + -0.023649785667657852, + 0.03596390038728714, + 0.02149004116654396, + -0.006097396835684776, + -0.02083376608788967, + 0.01694384217262268, + 0.016919977962970734, + 0.029735250398516655, + 0.0012998731108382344, + 0.02610783651471138, + -0.01343575119972229, + 0.01023789867758751, + -0.006938622798770666, + -0.03543888032436371, + 0.030212540179491043, + 0.005781191401183605, + 0.003132224315777421, + 0.030140947550535202, + -0.009032738395035267, + 0.04252665862441063, + 0.0022000146564096212, + -0.01705123297870159, + 0.03228875994682312, + -0.017480794340372086, + 0.009742708876729012, + -0.01572674885392189, + -0.027611304074525833, + -0.01649041473865509, + 0.012176894582808018, + 0.028303375467658043, + 0.009056602604687214, + -0.013077782467007637, + 0.007099708542227745, + 0.043552834540605545, + -0.0005567155894823372, + 0.025535086169838905, + -0.0006820045528002083, + -0.027372658252716064, + -0.010398984886705875, + 0.021096276119351387, + 0.02163323014974594, + -0.0028055780567228794, + 0.008102020248770714, + -0.006222685799002647, + -0.006956520956009626, + -0.021167870610952377, + 0.00036374820047058165, + 0.014784098602831364, + 0.013590870425105095, + -0.012970391660928726, + 0.0022954728920012712, + 0.00415840046480298, + -0.034007005393505096, + -0.0070818099193274975, + -0.009515996091067791, + -0.009086433798074722, + -0.00668207835406065, + 0.03505704924464226, + 0.014748302288353443, + 0.0006417331169359386, + -0.011801027692854404, + 0.031572822481393814, + -0.02999776042997837, + -0.02572600170969963, + 0.0114549919962883, + 0.0081079863011837, + 0.034532029181718826, + 0.0267283134162426, + -0.014951150864362717, + 0.010804682038724422, + -0.012212691828608513, + -0.02978297881782055, + 0.024079347029328346, + -0.0236736498773098, + -0.018351851031184196, + 0.003209784161299467, + -0.013686329126358032, + 0.010858377441763878, + -0.011842790991067886, + 0.0035319558810442686, + 0.010023117996752262, + 0.043552834540605545, + -0.0058289202861487865, + 0.021716754883527756, + -0.006837198045104742, + 0.02440151944756508, + 0.008931313641369343, + 0.013423818163573742, + -0.035916171967983246, + 0.014127823524177074, + -0.02992616593837738, + 0.017003502696752548, + -0.024079347029328346, + 0.03663210943341255, + -0.012528897263109684, + -0.024365723133087158, + 0.0074397786520421505, + -0.009211722761392593, + 0.020559323951601982, + -0.015595493838191032, + -0.0038153475616127253, + 0.0027712727896869183, + 0.031119395047426224, + 0.01829219050705433, + 0.029973896220326424, + -0.028207916766405106, + 0.010297560133039951, + -0.005333730485290289, + 0.00254306779243052, + -0.01565515622496605, + 0.003191885771229863, + 0.027468115091323853, + -0.00902677234262228, + -0.03329107165336609, + 0.03200238198041916, + 0.00014244162593968213, + -0.001680960413068533, + -0.0052054584957659245, + 0.00742784608155489, + -0.03651278465986252, + 0.026131700724363327, + 0.012493100948631763, + 0.027062417939305305, + -0.01705123297870159, + 0.02128719352185726, + -0.026227157562971115, + -0.024628233164548874, + 0.01690804585814476, + -0.0126004908233881, + -0.006956520956009626, + 0.0030531729571521282, + 0.00206577661447227, + -0.003618464805185795, + -0.02052352763712406, + 0.04488924890756607, + 0.02503393031656742, + 0.041572075337171555, + 0.014724437147378922, + -0.0033977176062762737, + -0.016335295513272285, + 0.0018957414431497455, + -0.003976433537900448, + -0.011168616823852062, + -0.007648593746125698, + 0.01109105721116066, + 0.002695204457268119, + -0.02287418767809868, + 0.019246771931648254, + -0.016538145020604134, + -0.0012118725571781397, + -0.02780221961438656, + 7.061487849568948e-05, + -0.013411886058747768, + -0.01385338045656681, + -0.027086282148957253, + -0.011067193001508713, + -0.00499962642788887, + 0.024103211238980293, + -0.025773731991648674, + 0.015953462570905685, + 0.01909165270626545, + -0.016812587156891823, + -0.0018987245857715607, + 0.012552761472761631, + 0.010118575766682625, + 0.014438062906265259, + 0.04212095960974693, + 0.01485569216310978, + -0.0009515995625406504, + 0.016371091827750206, + 0.03620254620909691, + -0.010148406960070133, + 0.0010492951842024922, + -0.03345812112092972, + -0.0033291070722043514, + -0.03193078935146332, + -0.015237526036798954, + 0.009163993410766125, + 0.03634573519229889, + -0.0229099839925766, + -0.0070818099193274975, + 0.001475874218158424, + 0.008567378856241703, + 0.014986948110163212, + -0.013125511817634106, + ], + "index": 38, + }, + { + "title": "Statistical hypothesis testing", + "text": "A statistical hypothesis is a hypothesis that is testable on the basis of observing a process that is modeled via a set of random variables. A statistical hypothesis test is a method of statistical inference. Commonly, two statistical data sets are compared, or a data set obtained by sampling is compared against a synthetic data set from an idealized model.", + "vector": [ + -0.020572399720549583, + -0.01049450971186161, + -0.02618958242237568, + 0.0066335927695035934, + 0.027870427817106247, + -0.019078314304351807, + -0.05321240425109863, + 0.01196704525500536, + 0.007542255334556103, + -0.04335719347000122, + 0.03485240042209625, + -0.0026020780205726624, + -0.02070169523358345, + 0.011263101361691952, + 0.06924508512020111, + -0.012024509720504284, + 0.00013917256728745997, + 0.013504228554666042, + 0.06441804021596909, + 0.015673523768782616, + 0.003950705286115408, + 0.006306761875748634, + -0.03468000888824463, + 0.0008740935008972883, + 0.03827155753970146, + -0.010350847616791725, + -0.04916113615036011, + -0.01640620082616806, + -0.05324113741517067, + -0.002673909068107605, + 0.05852790176868439, + 0.05401691421866417, + 0.016750989481806755, + -0.02726704813539982, + 0.004011761397123337, + -0.025471273809671402, + 0.00393633870407939, + -0.008770565502345562, + -0.02814338542521, + 0.024178314954042435, + -0.029149020090699196, + 0.0033652824349701405, + 0.027080288156867027, + -0.005013803951442242, + -0.01547239813953638, + -0.008662818931043148, + 0.03177803382277489, + 0.0019466201774775982, + -0.021175779402256012, + -0.021233243867754936, + 0.0007883452344685793, + -0.022540567442774773, + 0.061487335711717606, + 0.022339440882205963, + -0.017340004444122314, + -0.020270708948373795, + 0.014251270331442356, + -0.01847493276000023, + -0.04054141789674759, + -0.022339440882205963, + -0.006295987404882908, + 0.054074376821517944, + 0.032381415367126465, + 0.015544228255748749, + -0.00824619922786951, + -0.007269297260791063, + 0.08930030465126038, + 0.03513972461223602, + 0.04071381315588951, + -0.0026918668299913406, + -0.00617746589705348, + 0.064820297062397, + 0.029450710862874985, + 0.05654536560177803, + -0.011457044631242752, + 0.004622324835509062, + 0.04051268473267555, + 0.006087677553296089, + -0.0498507134616375, + -0.011363664641976357, + 0.01363352406769991, + 0.02216704748570919, + 0.00023838914057705551, + -0.015889016911387444, + 0.03973691165447235, + 0.0035215148236602545, + -0.01288648135960102, + -0.045167334377765656, + -0.012750002555549145, + -0.004737254697829485, + -0.0007232484058476985, + 0.00644324067980051, + -0.003904014825820923, + -0.02713775262236595, + -0.045655783265829086, + 0.049074940383434296, + 0.005768029484897852, + 0.010049156844615936, + 0.002664930187165737, + 0.04887381196022034, + 0.022497469559311867, + 0.019193243235349655, + 0.0024799653328955173, + -0.0026236274279654026, + 0.006838311441242695, + -0.06401579082012177, + 0.004485846031457186, + 0.01623380556702614, + 0.037467051297426224, + 0.09010481089353561, + -0.004144648555666208, + -0.024537470191717148, + 0.041575782001018524, + -0.03936338797211647, + -0.01758422888815403, + -0.0203138068318367, + -0.043127331882715225, + -0.04384564235806465, + 0.007456058170646429, + -0.015458031557500362, + 0.04286874085664749, + 0.03350197896361351, + -0.020285075530409813, + 0.02305775135755539, + -0.004309860058128834, + 0.0019107046537101269, + -0.031002260744571686, + -0.015544228255748749, + 0.0058937338180840015, + -0.06085522472858429, + 0.032668739557266235, + 0.0070861284621059895, + -0.005186198279261589, + -0.020658595487475395, + -0.014495495706796646, + -0.01836000382900238, + -0.015544228255748749, + -0.03338705003261566, + 0.017239440232515335, + 0.0025446133222430944, + -0.10975777357816696, + -0.0053514097817242146, + 0.014703805558383465, + -0.015975214540958405, + 0.0021872539073228836, + -0.043788179755210876, + -0.031002260744571686, + 0.0009652290609665215, + -0.005078451707959175, + 0.004062043037265539, + 0.005760846193879843, + -0.024293243885040283, + 0.022626765072345734, + -0.019178876653313637, + -0.05008057504892349, + -0.022511836141347885, + 0.024106483906507492, + -0.004496620502322912, + -0.009316480718553066, + -0.02529887855052948, + 0.0012013735249638557, + -0.0007043927325867116, + 0.0014572713989764452, + 0.030140288174152374, + 0.01649239845573902, + -0.005161057226359844, + 0.011413945816457272, + 0.0031946836970746517, + 0.0057249306701123714, + -0.003868099534884095, + -0.021420003846287727, + -0.008763382211327553, + -0.09154143184423447, + -0.00820310041308403, + -0.03195042908191681, + -0.02629014663398266, + -0.015213806182146072, + 0.06631437689065933, + 0.01827380619943142, + 0.00923028402030468, + -0.04358705133199692, + -0.017454933375120163, + 0.030312683433294296, + 0.012857749126851559, + 0.025327611714601517, + 0.013317467644810677, + 0.03358817473053932, + 0.012074790894985199, + -0.0026272188406437635, + 0.03134704753756523, + 0.010573523119091988, + -0.006378592923283577, + -0.0045181699097156525, + 0.03126085177063942, + 0.019020849838852882, + 0.0076284524984657764, + -0.05579832196235657, + -0.03548451513051987, + 0.03143324702978134, + -0.013698171824216843, + 0.027410710230469704, + -0.05508001148700714, + -0.029651837423443794, + 0.008368311449885368, + -0.042437754571437836, + -0.01660732738673687, + 0.06867043673992157, + 0.0028121836949139833, + 0.028272682800889015, + -0.017138876020908356, + -0.014438031241297722, + -0.05872902646660805, + 0.012383664958178997, + 0.015070144087076187, + 0.0008525442099198699, + -0.019394369795918465, + 0.027496907860040665, + 0.010824931785464287, + -0.027281414717435837, + -0.025758597999811172, + 0.027381977066397667, + -0.019767891615629196, + 0.04013916477560997, + -0.02979549951851368, + 0.008763382211327553, + 0.02558620274066925, + 0.02021324448287487, + -0.05088508129119873, + -0.006026620976626873, + -0.004740845877677202, + 0.015371833927929401, + -0.010925495065748692, + 0.011823383159935474, + -0.00825338251888752, + -0.022985920310020447, + 0.04108733311295509, + 0.0006006867624819279, + 0.0007506339461542666, + 4.1807888919720426e-05, + -0.004909649025648832, + 0.02538507618010044, + -0.017124511301517487, + 0.0054950714111328125, + -0.04916113615036011, + 0.008052255026996136, + 0.012864932417869568, + 0.021348172798752785, + -0.031030992045998573, + 0.03105972521007061, + 0.014768454246222973, + -0.015027045272290707, + -0.016966482624411583, + -0.016865918412804604, + -0.00446788826957345, + 0.013640707358717918, + -0.00864126905798912, + 0.022195778787136078, + -0.03818536177277565, + 0.005732113961130381, + -0.02423577941954136, + -0.009388311766088009, + 0.03781183809041977, + -0.04519606754183769, + -0.025270145386457443, + -0.017268173396587372, + -0.005545353516936302, + 0.07045184820890427, + -0.03223775327205658, + -0.0013746657641604543, + 0.022698596119880676, + 0.010767467319965363, + 0.014710988849401474, + -0.001881972188130021, + 0.009991692379117012, + -0.0009329051245003939, + 0.007125635165721178, + 0.018230708315968513, + 0.003117465414106846, + -0.047322262078523636, + 0.01660732738673687, + -0.0431847982108593, + -0.007491973228752613, + -0.077692411839962, + 0.014193805865943432, + 0.009244649671018124, + -0.010221551172435284, + -0.0334157831966877, + -0.059246208518743515, + -0.018604230135679245, + 0.030513809993863106, + 0.004363733343780041, + -0.01216817181557417, + -0.009725917130708694, + -0.03749578446149826, + -0.04304113611578941, + 0.036576345562934875, + -0.047609586268663406, + 0.036375220865011215, + 0.024005921557545662, + 0.001735616591759026, + 0.00536936754360795, + 0.017124511301517487, + -0.024393808096647263, + 0.04680508002638817, + 0.023704230785369873, + -0.013540144078433514, + 0.01846056804060936, + 0.017110144719481468, + 0.016161974519491196, + -0.07752002030611038, + -0.023905357345938683, + -0.04746592417359352, + -0.06257916986942291, + -0.02519831620156765, + -0.004248803947120905, + -0.03367437422275543, + 0.008957325480878353, + -0.05654536560177803, + 0.04344338923692703, + -0.005563311278820038, + -0.031002260744571686, + -0.01583155244588852, + -0.07711776345968246, + 0.04327099397778511, + 0.03821409121155739, + 0.005254437681287527, + -0.04105859994888306, + 0.07223325222730637, + -0.03913353011012077, + -0.005243663210421801, + -0.0015452643856406212, + -0.06947494298219681, + -0.028085920959711075, + -0.011615073308348656, + 0.006439649499952793, + 0.0032198247499763966, + 0.015687890350818634, + -0.05088508129119873, + -0.01494084857404232, + 0.057665929198265076, + 0.04778198152780533, + -0.004823451861739159, + -0.03513972461223602, + -0.010415495373308659, + 0.04102986678481102, + -0.014538594521582127, + -0.014193805865943432, + -0.020342539995908737, + 0.03910479694604874, + 0.05398818105459213, + 0.0004888997646048665, + 0.035024795681238174, + -0.01846056804060936, + 0.006482747849076986, + 0.03410536050796509, + -0.03065747208893299, + 0.03465127572417259, + -0.050454095005989075, + 0.026792963966727257, + 0.0012965495698153973, + 0.011995777487754822, + -0.03200789541006088, + 0.0005755458842031658, + -0.042552683502435684, + -0.0066874660551548, + 0.03447888046503067, + -0.010710001923143864, + -0.013403665274381638, + 0.028387611731886864, + -0.03769690915942192, + -0.037064798176288605, + 0.02245437167584896, + 0.053097475320100784, + -0.021348172798752785, + -0.016363102942705154, + -0.001617993344552815, + -0.06183212623000145, + 0.000757817062549293, + 0.014042960479855537, + 0.009093805216252804, + 0.029378879815340042, + 0.00943141058087349, + 0.0058470433577895164, + 0.04054141789674759, + -0.01445239782333374, + -0.06142987310886383, + 0.02294282242655754, + 0.018216341733932495, + 0.011004509404301643, + 0.017814088612794876, + 0.020356906577944756, + -0.0116294389590621, + -0.02344563975930214, + -0.045655783265829086, + 0.05663156136870384, + 0.05206311121582985, + -0.010530425235629082, + -0.027367612347006798, + -0.0035233106464147568, + -0.0357431061565876, + -0.03545578196644783, + -0.02394845522940159, + -0.03786930441856384, + 0.006949649192392826, + 0.0058470433577895164, + 0.028962260112166405, + -0.006647959351539612, + 0.02159239910542965, + -0.01435901690274477, + 0.019767891615629196, + 0.006073310971260071, + 0.0015793840866535902, + -0.014258453622460365, + -0.0272526815533638, + -0.0014734334545210004, + 0.0084904246032238, + -0.05413184314966202, + -0.014840285293757915, + 0.009776199236512184, + -0.037840571254491806, + 0.01049450971186161, + -0.000860176223795861, + 0.04220789670944214, + -0.036403950303792953, + -0.0002374912437517196, + 0.029350146651268005, + -0.019308174028992653, + 0.007007114123553038, + -0.015788454562425613, + -0.020256342366337776, + 0.004414014983922243, + 0.0025104933883994818, + -0.03542704880237579, + 0.02443690598011017, + -0.02323014661669731, + -0.01962422952055931, + 0.008777748793363571, + -0.004568451549857855, + -0.03456507623195648, + -0.030054090544581413, + 0.03370310738682747, + -0.005484296940267086, + 0.00017104757716879249, + 0.02248310297727585, + -0.028746766969561577, + -0.044793810695409775, + -0.041173528879880905, + -0.02901972457766533, + -0.05674649029970169, + 0.011765917763113976, + -0.01294394675642252, + 0.04433409497141838, + -0.017354369163513184, + -0.00205257092602551, + -0.02912028878927231, + -0.0008251586114056408, + 0.028387611731886864, + -0.04344338923692703, + 0.016248172149062157, + -0.0031102823559194803, + -0.02940761111676693, + -0.0021980286110192537, + 0.006741339340806007, + -0.06033804267644882, + 0.05292508006095886, + -0.04200676828622818, + 0.015529862605035305, + 0.013360566459596157, + -0.02492535673081875, + 0.0048845079727470875, + -0.09274818748235703, + -0.06740621477365494, + -0.047523390501737595, + 0.009797748178243637, + -0.0005319983465597034, + 0.023574935272336006, + 0.031030992045998573, + 0.005380142014473677, + -0.02470986358821392, + -0.05168958753347397, + -0.012232819572091103, + 0.05258029326796532, + -0.006023029331117868, + -0.0077649313025176525, + 0.029077189043164253, + -0.016822820529341698, + 0.05390198528766632, + 0.02157803252339363, + 0.028344513848423958, + 0.044104233384132385, + -0.024594934657216072, + 0.014782819896936417, + 0.07246311753988266, + -0.016822820529341698, + -0.01167972106486559, + 0.03557071089744568, + -0.02228197641670704, + -0.0383002907037735, + -0.031232118606567383, + 0.022310709580779076, + 0.022885357961058617, + -0.03146198019385338, + 0.01089676283299923, + 0.005566902458667755, + -0.02374732866883278, + 0.014430847950279713, + 0.001617993344552815, + 0.019969018176198006, + -0.0021675005555152893, + 0.02315831556916237, + 0.0037567613180726767, + -0.010041973553597927, + 0.009991692379117012, + -0.01117690373212099, + 0.029766766354441643, + 0.0007052906439639628, + -0.0030869373586028814, + -0.025643667206168175, + 0.005965564865618944, + 0.0511724054813385, + 0.020558033138513565, + 0.008016339503228664, + 0.0028516908641904593, + -0.006181057542562485, + -0.00839704368263483, + 0.019092680886387825, + 0.00821028370410204, + 0.01461042556911707, + -0.07418705523014069, + -0.0617171972990036, + -0.007014297414571047, + 0.019006483256816864, + -0.005085634998977184, + 0.040857475250959396, + 0.026994090527296066, + -0.02831578068435192, + -0.004295493941754103, + 0.020428737625479698, + 0.016750989481806755, + 0.012419580481946468, + 0.02208084985613823, + -0.005886550527065992, + 0.002966620260849595, + 0.02629014663398266, + 0.024839160963892937, + -0.01583155244588852, + 0.012563242577016354, + 0.04709240421652794, + -0.007039438001811504, + -0.05691888555884361, + 0.030887329950928688, + 0.010523241944611073, + 0.05976339429616928, + 0.018733525648713112, + 0.004482254385948181, + -0.0036005289293825626, + -0.03445014730095863, + -0.001715863007120788, + 0.010516058653593063, + -0.012369298376142979, + 0.00605894485488534, + 0.034335218369960785, + 0.028401978313922882, + 0.001226514345034957, + -0.0026918668299913406, + 0.04114479944109917, + 0.014639157801866531, + 0.01293676346540451, + -0.030513809993863106, + 0.05105747655034065, + -0.03858761489391327, + 0.026821695268154144, + -0.02373296208679676, + -0.023201413452625275, + -0.0023829934652894735, + -0.0016871306579560041, + -0.008842396549880505, + -0.023804793134331703, + -0.04102986678481102, + -0.029623104259371758, + 0.011270283721387386, + 0.020787891000509262, + 0.01640620082616806, + -0.0183743704110384, + 0.0331859216094017, + 0.02100338414311409, + 0.018733525648713112, + -0.007060987409204245, + 0.00943141058087349, + 0.0013073242735117674, + -0.001216637552715838, + 0.024767329916357994, + 0.015228171832859516, + 0.03577183932065964, + -0.007599719800055027, + -0.0072764805518090725, + -0.014739721082150936, + -0.035886768251657486, + 0.02754000574350357, + 0.039593249559402466, + 0.017943384125828743, + -0.037754375487565994, + 0.00031089354888536036, + 0.027769865468144417, + 0.0026128527242690325, + 0.03654761239886284, + 0.0020417962223291397, + -0.03450761362910271, + -0.023905357345938683, + 0.05352846160531044, + -0.025629300624132156, + -0.00034029936068691313, + 0.04887381196022034, + 0.016865918412804604, + 0.00037127648829482496, + -0.026936626061797142, + 0.03445014730095863, + 0.016679158434271812, + -0.004263170063495636, + 0.02920648455619812, + 0.03195042908191681, + -0.016133243218064308, + -0.029967892915010452, + 0.033157188445329666, + -0.01260634046047926, + -0.017541131004691124, + -0.03146198019385338, + 0.0052508460357785225, + 0.005322677083313465, + 0.0019484158838167787, + -0.045081134885549545, + 0.012670988216996193, + -0.015170707367360592, + 0.01611887663602829, + 0.0026900710072368383, + 0.004959930665791035, + -0.005401691421866417, + 0.012290284037590027, + 0.05352846160531044, + -0.03827155753970146, + 0.06418818235397339, + 0.011449861340224743, + 0.018316905945539474, + 0.01923634298145771, + -0.01933690533041954, + 0.021807892248034477, + 0.010135354474186897, + 0.04169071465730667, + 0.034220289438962936, + 0.035197190940380096, + 0.014983946457505226, + 0.023474371060729027, + 0.004230846185237169, + -0.0010074297897517681, + -0.03717972710728645, + -0.024781694635748863, + 0.014926481992006302, + -0.010810566134750843, + -0.01244831271469593, + -0.055827055126428604, + -0.024480005726218224, + -0.013245636597275734, + 0.0159321166574955, + 0.022626765072345734, + 0.03723718971014023, + 0.010120987892150879, + -0.018331270664930344, + -0.029421977698802948, + -0.017253806814551353, + 0.029738035053014755, + -0.0029791907873004675, + -0.02393409051001072, + -0.004252395126968622, + 0.011643805541098118, + 0.0400816984474659, + -0.016262538731098175, + -0.028071556240320206, + 0.0017706342041492462, + 0.010638170875608921, + -0.034823670983314514, + -0.024738596752285957, + -0.0027098245918750763, + 0.020773526281118393, + 0.030427612364292145, + -0.01963859610259533, + 0.00420211348682642, + 0.01547239813953638, + 0.024853525683283806, + 0.015946483239531517, + -0.032582543790340424, + -0.04970705136656761, + 0.010480143129825592, + -0.020385637879371643, + 0.009323664009571075, + 0.021822258830070496, + 0.026045920327305794, + 0.014998313039541245, + -0.02558620274066925, + -0.034335218369960785, + 0.022195778787136078, + 0.010587889701128006, + 0.026634935289621353, + -0.030398879200220108, + -0.04950592666864395, + 0.03378930315375328, + -0.005627959035336971, + -0.01396394707262516, + -0.05022423714399338, + -0.05959099903702736, + -0.02863183803856373, + 0.022641131654381752, + -0.01649239845573902, + -0.03137578070163727, + -0.041374657303094864, + -0.0008543399744667113, + 0.023416906595230103, + -0.015170707367360592, + -0.0012103524059057236, + -0.046632684767246246, + 0.03761071339249611, + 0.014280003495514393, + 0.009151269681751728, + -0.015414932742714882, + 0.04160451516509056, + 0.0013064263621345162, + -0.01690901815891266, + 0.009208734147250652, + 0.00304024713113904, + -0.014430847950279713, + 0.00034478880115784705, + 0.027611836791038513, + 0.0017778172623366117, + 0.04993691295385361, + 0.008720283396542072, + 0.030226485803723335, + -0.0010639966931194067, + -0.01866169460117817, + -0.004054860211908817, + -0.057694658637046814, + -0.042236629873514175, + 0.015644792467355728, + -0.0027457401156425476, + -0.04979325085878372, + -0.020083947107195854, + -0.00820310041308403, + 0.015127608552575111, + -0.025729864835739136, + 0.002907359739765525, + -0.0076284524984657764, + 0.0050604939460754395, + 0.0018155286088585854, + 0.013030143454670906, + 0.04005296528339386, + -0.039794374257326126, + -0.02695099264383316, + -0.016075778752565384, + 0.0007982220267876983, + 0.017598595470190048, + -0.00671619875356555, + 0.043213531374931335, + -0.015529862605035305, + 0.04510986804962158, + 0.025844793766736984, + 0.039794374257326126, + 0.02354620210826397, + -0.0017562679713591933, + -0.02999662607908249, + -0.00473366305232048, + 0.028057189658284187, + -0.0007043927325867116, + 0.04901747405529022, + 0.07361240684986115, + 0.002435070928186178, + -0.011507326737046242, + 0.020945919677615166, + -0.0015219193883240223, + 0.03660507872700691, + 0.003437113482505083, + 0.003965071402490139, + 0.025456907227635384, + -0.002444049809128046, + -0.04582817852497101, + -0.02626141346991062, + -0.03367437422275543, + -0.020687328651547432, + -0.020141413435339928, + 0.01514197513461113, + 0.0012453700182959437, + 0.021664230152964592, + -0.018230708315968513, + 0.0046007754281163216, + 0.02705155499279499, + 0.057694658637046814, + -0.02088845521211624, + -0.02088845521211624, + 0.0009571480914019048, + -0.0134323975071311, + -0.009725917130708694, + -0.01652112975716591, + -0.027295781299471855, + 0.03789803758263588, + 0.011794649995863438, + -0.009014790877699852, + -0.004065634682774544, + -0.01290084794163704, + 0.03812789544463158, + 0.0022554935421794653, + -0.01769915781915188, + 0.01649239845573902, + 0.0012866727774962783, + -0.0015425707679241896, + 0.001539877150207758, + 0.002242923015728593, + -0.001192394644021988, + 0.004015353042632341, + 0.03407662734389305, + 0.014955214224755764, + 0.04427662864327431, + 0.02394845522940159, + -0.019796624779701233, + -0.0012633277801796794, + -0.06798086315393448, + -0.012635072693228722, + 0.007851128466427326, + 0.012821833603084087, + 0.021463103592395782, + -0.015400567092001438, + -0.022712962701916695, + 0.01245549600571394, + -0.018230708315968513, + -0.005735705606639385, + 0.0194231029599905, + 0.004428381100296974, + -0.025270145386457443, + -0.04916113615036011, + 0.02228197641670704, + -0.05180451646447182, + -0.010559157468378544, + 0.037064798176288605, + -0.02256930060684681, + 0.015558594837784767, + -0.05918874591588974, + 0.017138876020908356, + 0.0077649313025176525, + -0.009079438634216785, + -0.005811127834022045, + -0.03200789541006088, + 0.03976564109325409, + 0.010975777171552181, + 0.025054654106497765, + 0.026721132919192314, + 0.02851690724492073, + 0.009273381903767586, + 0.0617171972990036, + -0.0470636710524559, + -0.018977750092744827, + -0.03332958370447159, + -0.006536621134728193, + 0.024968456476926804, + -0.022052116692066193, + 0.014754087664186954, + -0.034220289438962936, + 0.019078314304351807, + 0.02363239973783493, + 0.03028395026922226, + 0.027396343648433685, + 0.026907892897725105, + 0.026017189025878906, + -0.013849017210304737, + -0.0437307134270668, + -0.01962422952055931, + -0.017354369163513184, + -0.00620619859546423, + -0.014588876627385616, + 0.02647690661251545, + 0.028373245149850845, + 0.01192394644021988, + -0.015946483239531517, + -0.02528451196849346, + -0.011083523742854595, + 0.011248734779655933, + 0.011026058346033096, + -0.0017679404700174928, + 0.013037326745688915, + 0.037467051297426224, + 0.023890990763902664, + -0.006852677557617426, + -0.02804282307624817, + 0.042351558804512024, + 0.04393184185028076, + -0.01371972169727087, + -0.012635072693228722, + 0.012484228238463402, + 0.008167184889316559, + 0.010214368812739849, + 0.018690425902605057, + 0.014825918711721897, + 0.0359729640185833, + 0.014969580806791782, + -0.039305925369262695, + 0.010853664018213749, + -0.03344451263546944, + 0.015989581122994423, + 0.006033804267644882, + 0.02784169651567936, + -0.00632471963763237, + -0.026520006358623505, + 0.040282826870679855, + -0.004611550364643335, + 0.03344451263546944, + -0.06263663619756699, + 0.025629300624132156, + -0.05243663117289543, + -0.02988169714808464, + 0.005290353205054998, + -0.00787267740815878, + 0.003304226091131568, + -0.038041699677705765, + 0.0005387325072661042, + 0.019983384758234024, + -0.007937326095998287, + 0.05976339429616928, + 0.02040000446140766, + 0.020241975784301758, + 0.03720846027135849, + -0.014481130056083202, + -0.0023470779415220022, + 0.04620169848203659, + -0.0027367612347006798, + 0.0038429584819823503, + 0.0028570780996233225, + -0.020917188376188278, + 0.01935127191245556, + 0.01719634234905243, + 0.001270510838367045, + -0.021563665941357613, + 0.0183743704110384, + 0.022626765072345734, + -0.031634371727705, + -0.005872184410691261, + -0.008547889068722725, + 0.006432466208934784, + 0.02450873702764511, + 0.03887493908405304, + -0.03717972710728645, + 0.01913577876985073, + 0.011119439266622066, + 0.0054950714111328125, + 0.007987607270479202, + 0.005193381570279598, + -0.006845494266599417, + 0.013346199877560139, + -0.030140288174152374, + 0.007578170858323574, + -0.02489662542939186, + -0.0158171858638525, + 0.011945495381951332, + 0.037150993943214417, + 0.006216973066329956, + 0.009086621925234795, + -0.003625669749453664, + -0.005035353358834982, + 0.0663718432188034, + 0.01440929900854826, + 0.023761695250868797, + -0.021534934639930725, + -0.006795212626457214, + -0.04051268473267555, + -0.012864932417869568, + -0.00790859293192625, + -0.0002583671303000301, + 0.0036400360986590385, + -0.03416282311081886, + 0.0488450825214386, + -0.00026263209292665124, + 0.0018442609580233693, + -0.006989156361669302, + -0.005265212617814541, + -0.01000605896115303, + 0.031203387305140495, + 0.002928909147158265, + -0.009575072675943375, + 0.013037326745688915, + 0.0028319372795522213, + 0.0046546487137675285, + -0.009294931776821613, + 0.03028395026922226, + -0.0021082398016005754, + -0.020960286259651184, + -0.028775498270988464, + -0.00349098676815629, + 0.003860916243866086, + -0.013576059602200985, + 0.019265074282884598, + -0.049563389271497726, + 0.015889016911387444, + 0.012433946132659912, + 0.011076340451836586, + -0.025356343016028404, + -0.03850141540169716, + 0.009991692379117012, + -0.02443690598011017, + -0.0051287333481013775, + -0.0036202825140208006, + -8.176387927960604e-05, + 0.021218877285718918, + -0.007007114123553038, + 0.004805494099855423, + 0.004385282751172781, + 0.014667890034615993, + 0.01846056804060936, + -0.0372946560382843, + -0.005028170067816973, + -0.04904620721936226, + -0.02343127317726612, + -0.0009786974405869842, + -0.030513809993863106, + -0.03097352758049965, + 0.05148846283555031, + -0.01313070673495531, + -0.04519606754183769, + 0.0033563035540282726, + -0.03304225951433182, + -0.003857324831187725, + -0.014912116341292858, + -0.005940423812717199, + -0.0074129593558609486, + -0.007229790091514587, + -0.0046869730576872826, + 0.024192681536078453, + -0.00011492960038594902, + -0.04442029073834419, + 0.015027045272290707, + 0.024365074932575226, + 0.021563665941357613, + -0.02101775072515011, + -0.017253806814551353, + -0.05648789927363396, + 0.018819723278284073, + 0.03126085177063942, + -0.006838311441242695, + -0.028502540662884712, + 0.0003459111612755805, + 0.018187610432505608, + 0.032668739557266235, + -0.00771464966237545, + -0.008950143121182919, + 0.0012390847550705075, + 0.030600005760788918, + 0.017167609184980392, + 0.008425776846706867, + -0.005193381570279598, + 0.0011654580011963844, + -0.026045920327305794, + -0.0017966729355975986, + -0.004525353200733662, + -0.012678171508014202, + -0.0021423595026135445, + -0.010824931785464287, + 0.0015784862916916609, + 0.011334932409226894, + -0.02999662607908249, + 0.027611836791038513, + -0.028200851753354073, + -0.03146198019385338, + 0.03048507682979107, + -0.0018406694289296865, + -0.004119507968425751, + 0.018115779384970665, + 0.03939212113618851, + 0.016664791852235794, + 0.006396550685167313, + -0.007294438313692808, + -0.005089226644486189, + -0.014926481992006302, + 0.009934227913618088, + 0.004018944688141346, + 0.0042344373650848866, + -0.01963859610259533, + -0.01795775070786476, + -0.0010927291586995125, + -0.010322114452719688, + -0.012247186154127121, + -0.019308174028992653, + 0.007064579054713249, + -0.030255217105150223, + -0.009251832962036133, + -0.014215354807674885, + 0.003119261236861348, + 0.0030617965385317802, + -0.012369298376142979, + 0.014883383177220821, + 0.03672000765800476, + 0.05275268852710724, + -0.010674086399376392, + -0.0017751236446201801, + 0.009100987575948238, + -0.00048665504436939955, + -0.00532626872882247, + -0.013497045263648033, + 0.02324451133608818, + -0.02950817532837391, + -0.030456343665719032, + 0.008950143121182919, + 0.0059152827598154545, + 0.025844793766736984, + 0.0062457057647407055, + 0.0015650179702788591, + 0.020428737625479698, + -0.014926481992006302, + 0.041661981493234634, + 0.0114354956895113, + 0.04505240544676781, + 0.022138314321637154, + 0.012146621942520142, + 0.023618033155798912, + -0.011521692387759686, + -0.0030079232528805733, + 0.009804931469261646, + -0.013999862596392632, + -0.029335780069231987, + -0.0011968840844929218, + 0.011564791202545166, + 0.013245636597275734, + -0.01122718583792448, + -0.036978598684072495, + 0.013899298384785652, + -0.008282114751636982, + -0.016348736360669136, + -0.010243101045489311, + -0.01788591966032982, + -0.014983946457505226, + 0.0437307134270668, + 0.011370847932994366, + -0.02450873702764511, + -0.01044422760605812, + 0.04407550394535065, + -0.012196904048323631, + -0.013410847634077072, + -0.02452310360968113, + 0.020874088630080223, + -0.019609862938523293, + 0.0034101768396794796, + 0.03445014730095863, + -0.029824232682585716, + -0.005699790082871914, + 0.025025920942425728, + 0.021721694618463516, + -0.007815212942659855, + -0.010343664325773716, + -0.001407887670211494, + 0.003381444374099374, + -0.007901410572230816, + -0.006622818298637867, + 0.032668739557266235, + -0.03174930438399315, + 0.014811552129685879, + 0.021132681518793106, + 0.01392084825783968, + 0.038357753306627274, + -0.026792963966727257, + 0.0023776062298566103, + -0.012283101677894592, + 0.036174092441797256, + -0.0036526063922792673, + -0.04594310745596886, + -0.0004660036356654018, + 0.011765917763113976, + 0.016190707683563232, + 0.01797211728990078, + 0.01925070770084858, + 0.014229721389710903, + -0.02266986481845379, + -0.01060225535184145, + -0.00889267772436142, + -0.003789085429161787, + -0.009575072675943375, + 0.011981410905718803, + 0.03973691165447235, + 0.036174092441797256, + -0.031088456511497498, + -0.04197803884744644, + -0.033070992678403854, + 0.011291833594441414, + 0.003117465414106846, + 0.032956063747406006, + 0.0024171131663024426, + -0.03192169591784477, + 0.01817324385046959, + -0.029738035053014755, + 0.0113780302926898, + 0.019983384758234024, + -0.01640620082616806, + 0.029852963984012604, + 0.0032719022128731012, + 0.01583155244588852, + -0.0063354941084980965, + 0.012010143138468266, + -0.00840422697365284, + -0.027410710230469704, + 0.01746929995715618, + 0.004525353200733662, + -0.029565639793872833, + 0.0004177421797066927, + -0.013655073009431362, + -0.04111606627702713, + -0.020069582387804985, + -0.029824232682585716, + -0.03028395026922226, + -0.01758422888815403, + -0.00836112815886736, + 0.005926057696342468, + -0.027094652876257896, + 0.01749803125858307, + 0.054763954132795334, + 0.018115779384970665, + -0.007251339498907328, + 0.009488875046372414, + 0.014739721082150936, + 0.002508697798475623, + 0.014768454246222973, + -0.005064085591584444, + 0.026318879798054695, + 0.015371833927929401, + -0.015127608552575111, + -0.015759721398353577, + 0.030829865485429764, + -0.002718803472816944, + 0.00348021206445992, + -0.003525106469169259, + -0.009294931776821613, + 0.030312683433294296, + 0.005322677083313465, + -0.026247048750519753, + 0.013949580490589142, + -0.029738035053014755, + -0.019466200843453407, + 0.0032629233319312334, + -0.017454933375120163, + -0.014869017526507378, + 0.03275493532419205, + -0.013288735412061214, + 0.0003515229618642479, + -0.00583626888692379, + 0.004069226328283548, + -0.01746929995715618, + 0.0006267254939302802, + -0.010595072992146015, + -0.015486763790249825, + 0.00644324067980051, + 0.00407640915364027, + 0.047322262078523636, + -0.021319441497325897, + 0.031117189675569534, + -0.006529437843710184, + -0.0063678184524178505, + -0.013547326438128948, + -0.018992116674780846, + 0.04404677078127861, + 0.019107045605778694, + 0.015673523768782616, + 0.007258522789925337, + 0.014330284669995308, + 0.010559157468378544, + 0.02706592157483101, + 0.026821695268154144, + 0.021333808079361916, + 0.0005041638505645096, + -0.009575072675943375, + -0.024350710213184357, + 0.005807536654174328, + 0.00021392169583123177, + -0.004949156194925308, + 0.01915014535188675, + 0.022727329283952713, + -0.0007780195446684957, + 0.015213806182146072, + -0.017627328634262085, + 0.011112255975604057, + -0.002605669666081667, + 0.02108958177268505, + -0.021951554343104362, + 0.02080225758254528, + 0.00235605682246387, + -0.021549301221966743, + 0.02041437104344368, + 0.012678171508014202, + -0.011061973869800568, + -0.02001211792230606, + 0.006522255018353462, + 0.0045864093117415905, + -0.012987044639885426, + 0.038329023867845535, + 0.0012193312868475914, + -0.010027607902884483, + -0.008217466995120049, + 0.017138876020908356, + -0.028832964599132538, + -0.03016902133822441, + 0.028789864853024483, + -0.0013369545340538025, + 0.05901635065674782, + -0.012024509720504284, + -0.004931198433041573, + -0.012663805857300758, + -0.021563665941357613, + -0.01670789159834385, + -0.019178876653313637, + -0.03798423334956169, + -0.02001211792230606, + -0.004834226332604885, + -0.03407662734389305, + -0.031289584934711456, + -0.03459380939602852, + -0.01420817244797945, + 0.0014698418090119958, + 0.024551836773753166, + 0.01363352406769991, + -0.0174836665391922, + 0.035886768251657486, + 0.04358705133199692, + 0.04778198152780533, + -0.016276905313134193, + -0.028876062482595444, + -0.018834087997674942, + 0.0015829757321625948, + -0.01642056740820408, + -0.007994790561497211, + -0.009287748485803604, + -0.019667327404022217, + -0.007614085916429758, + -0.01591775007545948, + -0.00888549443334341, + 0.02256930060684681, + -0.010063523426651955, + -0.014581693336367607, + 0.011485776863992214, + -0.03818536177277565, + 0.010128171183168888, + -0.050856348127126694, + -0.01709577813744545, + 0.013245636597275734, + -0.00019652512855827808, + 0.012283101677894592, + -0.020543666556477547, + 0.036001697182655334, + -0.007556621450930834, + -0.014236904680728912, + -0.027367612347006798, + -0.019667327404022217, + -0.015572961419820786, + 0.018532399088144302, + -0.0036777472123503685, + 0.04620169848203659, + -0.019121412187814713, + -0.022928455844521523, + -0.0004565757990349084, + 0.012793101370334625, + 0.007987607270479202, + 0.008066621609032154, + -0.0008857660577632487, + 0.02393409051001072, + -0.007405776064842939, + 0.01591775007545948, + -0.03505352884531021, + -0.015271270647644997, + 0.03126085177063942, + 0.04114479944109917, + -0.01244831271469593, + 0.012319017201662064, + 0.0154292993247509, + -0.013683806173503399, + -0.025428174063563347, + 0.0004987764987163246, + 0.022928455844521523, + 0.016133243218064308, + -0.007980423979461193, + 0.01955239847302437, + 0.01746929995715618, + -0.00967563595622778, + 0.002918134443461895, + -0.02940761111676693, + -0.014667890034615993, + 0.004715705290436745, + -0.018302539363503456, + 0.02169296331703663, + -0.010422678664326668, + 0.008066621609032154, + 0.011787467636168003, + -0.011090707033872604, + 0.0488450825214386, + -0.017253806814551353, + -0.029321415349841118, + -0.001095422776415944, + 0.00461514201015234, + -0.012189720757305622, + 0.003986620809882879, + 0.0011897009098902345, + -0.029910428449511528, + -0.0016224827850237489, + -0.004209296777844429, + 0.009790565818548203, + -0.015616059303283691, + 0.0004255986714269966, + 0.032668739557266235, + -0.01972479373216629, + -0.01652112975716591, + 0.0027978175785392523, + 0.008598171174526215, + 0.011780284345149994, + 0.031892966479063034, + -0.027812963351607323, + 0.005890142172574997, + -0.009438593871891499, + 0.00026622365112416446, + 0.014926481992006302, + -0.001657500397413969, + -0.022210145369172096, + -0.05479268729686737, + -0.007922959513962269, + 0.04134592413902283, + 0.04577071592211723, + 0.007251339498907328, + -0.0047085219994187355, + -0.011090707033872604, + 0.005656691268086433, + -0.005387325305491686, + 0.003063592128455639, + 0.014466763474047184, + -0.032783668488264084, + 0.02909155562520027, + 0.02101775072515011, + 0.0158171858638525, + 0.029824232682585716, + 0.021333808079361916, + -0.006507888901978731, + -0.017052680253982544, + 0.013087608851492405, + -0.019767891615629196, + -0.0025194722693413496, + -0.022052116692066193, + -0.010630988515913486, + 0.0036921135615557432, + 0.000571954355109483, + -0.01049450971186161, + -0.0027116204146295786, + -0.03195042908191681, + 0.0043421839363873005, + 0.038731276988983154, + 0.012979862280189991, + -0.023761695250868797, + -0.015213806182146072, + -0.012965495698153973, + -0.01983972266316414, + -0.0016799475997686386, + -0.012857749126851559, + 0.019221976399421692, + 0.0055920435115695, + 0.006867043673992157, + 0.0021710919681936502, + 0.01538620050996542, + 0.012965495698153973, + -0.006288804113864899, + -0.014495495706796646, + -0.03562817722558975, + -0.026132117956876755, + 0.004888099618256092, + -0.009129720740020275, + -0.0024997189175337553, + -0.026318879798054695, + -0.030054090544581413, + -0.009100987575948238, + 0.009086621925234795, + 0.03269747272133827, + -0.012527327053248882, + -0.016779722645878792, + -0.027180850505828857, + -0.005398099776357412, + 0.04192057251930237, + -0.01815887726843357, + 0.0248104277998209, + 0.002697254065424204, + -0.027310146018862724, + 0.005067677237093449, + -0.011299016885459423, + 0.0017490849131718278, + -0.017325637862086296, + 0.024752963334321976, + 0.002097465330734849, + 0.014215354807674885, + 0.026692399755120277, + -0.005692606791853905, + 0.009251832962036133, + 0.005293944850564003, + 0.01591775007545948, + 0.012829016894102097, + -0.0003043838660232723, + 0.01040831208229065, + 0.021606765687465668, + -0.03815662860870361, + 0.014416482299566269, + -0.020974652841687202, + -0.024968456476926804, + -0.006295987404882908, + -0.0194231029599905, + -0.007843945175409317, + -0.0380704291164875, + -0.029479442164301872, + 0.03858761489391327, + 0.020744793117046356, + -0.020385637879371643, + -0.03967944532632828, + -0.01190957985818386, + 0.020385637879371643, + 0.015256904996931553, + -0.018834087997674942, + -0.010472959838807583, + -0.001930458121933043, + 0.0008291990961879492, + 0.0009248241549357772, + -0.013798735104501247, + -0.0006155018927529454, + -0.002532042795792222, + -0.005940423812717199, + -0.045454658567905426, + 0.009531973861157894, + -0.02070169523358345, + 0.017555497586727142, + -0.02305775135755539, + 0.02412085048854351, + -0.000772183237131685, + -0.021132681518793106, + -0.012218452990055084, + -0.003857324831187725, + -0.02656310424208641, + 0.0004996744100935757, + ], + "index": 39, + }, + { + "title": "Horace Farquhar, 1st Earl Farquhar", + "text": "Horace Brand Farquhar, 1st Earl Farquhar GCB GCVO PC (19 May 1844 \u2013 30 August 1923), was a British financier, courtier and Conservative politician.", + "vector": [ + 0.0055586532689630985, + -0.002701384946703911, + -0.01830918900668621, + -0.00044727849308401346, + -0.02689693681895733, + -0.019882192835211754, + -0.04296707734465599, + -0.01609848253428936, + -0.08196622133255005, + 0.008899513632059097, + -0.01786988228559494, + 0.08508387953042984, + -0.04461093619465828, + 0.010281205177307129, + -0.017969081178307533, + 0.0502510741353035, + -0.02333996631205082, + 0.0017200293950736523, + -0.08797480911016464, + -0.0019928249530494213, + 0.04461093619465828, + 0.012449398636817932, + -0.015333238057792187, + -0.02922101318836212, + 0.009657672606408596, + 0.04018952324986458, + 0.025196392089128494, + 0.004520612768828869, + 0.04356226697564125, + -0.005509053822606802, + -0.01108187809586525, + 0.03795047104358673, + 0.021823646500706673, + 0.035371314734220505, + 0.017473088577389717, + -0.0021115087438374758, + 0.019287003204226494, + 0.018337532877922058, + 0.0020530526526272297, + -0.004595011472702026, + 0.011861294507980347, + -0.005292943213135004, + -0.041890066117048264, + 0.03469109535217285, + 0.022546378895640373, + 0.0003195162571500987, + 0.012272259220480919, + 0.0428253635764122, + -0.0002382532984483987, + 0.015304895117878914, + 0.051923274993896484, + -0.027803894132375717, + -0.017218006774783134, + 0.041294876486063004, + 0.043193817138671875, + 0.005696822423487902, + 0.024331949651241302, + 0.03367077186703682, + -0.009856069460511208, + 0.011847122572362423, + -0.025168050080537796, + -0.04030289128422737, + -0.028257371857762337, + -0.030042942613363266, + -0.0258482675999403, + 0.015446607954800129, + 0.004407242871820927, + 0.016509447246789932, + -0.044979386031627655, + -0.03829058259725571, + 0.020009733736515045, + -0.04251359775662422, + 0.008127182722091675, + 0.027081161737442017, + 0.02526724897325039, + 0.006582522299140692, + 0.049400802701711655, + -0.016282707452774048, + 0.0015349180903285742, + 0.014752218499779701, + 0.01130861695855856, + -0.029929572716355324, + -0.020874176174402237, + 0.04257028177380562, + 0.0031991482246667147, + -0.06116289645433426, + -0.002109737368300557, + -0.04588634520769119, + -0.012669051997363567, + 0.05107300356030464, + -0.011960492469370365, + 0.0236233901232481, + -0.008148440159857273, + -0.000751073588617146, + 0.01461050659418106, + 0.04001946747303009, + 0.03707185760140419, + -0.012746994383633137, + -0.009530131705105305, + -0.02051989734172821, + 0.01026703417301178, + 0.024785427376627922, + -0.021015889942646027, + 0.03653335198760033, + 0.03055310621857643, + 0.015276553109288216, + -0.019386200234293938, + -0.015559976920485497, + 0.03659003600478172, + 0.03897079825401306, + 0.006323897745460272, + -0.03882908821105957, + 0.014057829976081848, + 0.02406269684433937, + -0.0034223448019474745, + 0.01314378809183836, + 0.007209597621113062, + 0.007879187352955341, + -0.0065789795480668545, + -0.03766704723238945, + 0.042315203696489334, + -0.06870197504758835, + 0.003443601541221142, + -0.024700401350855827, + 0.06399713456630707, + -0.04840881749987602, + -0.0071918838657438755, + 0.039934441447257996, + -0.00208848062902689, + -0.025508159771561623, + -0.02316991053521633, + -0.019442886114120483, + 0.032735470682382584, + -0.050307758152484894, + 0.014072000980377197, + 0.0031725773587822914, + 0.01232185773551464, + -0.023155739530920982, + -0.011549527756869793, + 0.02333996631205082, + 0.03296221047639847, + 0.02363756112754345, + 0.02112925797700882, + 0.002611043630167842, + 0.04257028177380562, + 0.024700401350855827, + 0.03304723650217056, + 0.014823074452579021, + 0.007145827170461416, + 0.03738362342119217, + -0.03327397629618645, + 0.013986974023282528, + 0.025649871677160263, + -0.0014622906455770135, + -0.01906026341021061, + -0.06473404169082642, + 0.004967005457729101, + -0.03114829584956169, + -0.033330660313367844, + -0.006352240219712257, + -0.021653592586517334, + 0.03647666797041893, + -0.06309018284082413, + -0.012187231332063675, + 0.024303607642650604, + 0.04619811102747917, + -0.0003987864183727652, + 0.013405954465270042, + -0.006784461904317141, + 0.00199459632858634, + -0.008502719923853874, + 0.01232185773551464, + 0.0023099055979400873, + -0.01799742318689823, + 0.0006341611733660102, + 0.01758645847439766, + -0.004155704285949469, + -0.015701688826084137, + 0.0176998283714056, + -0.03738362342119217, + -0.008984540589153767, + -0.005544481799006462, + -0.0169912688434124, + 0.01948539912700653, + -0.00967892911285162, + 0.02747795544564724, + 0.04353392496705055, + 0.02553650178015232, + 0.005771221127361059, + -0.013568923808634281, + -0.013767320662736893, + 0.025281419977545738, + -0.03970770165324211, + -0.020732464268803596, + -0.023680074140429497, + 0.04367563873529434, + 0.016495276242494583, + 0.007248568814247847, + -0.013490982353687286, + 0.00870820228010416, + 0.04900400713086128, + 0.019272832199931145, + 0.004251359961926937, + 0.00671360595151782, + -0.01728886365890503, + 0.0059448182582855225, + 0.027704695239663124, + 0.00804924126714468, + -0.010451260022819042, + 0.04784196987748146, + 0.015078156255185604, + -0.04710506647825241, + 0.0030025229789316654, + 0.011159819550812244, + 0.011549527756869793, + 0.01920197531580925, + -0.010699255391955376, + 0.04050128906965256, + 0.025153879076242447, + -0.03619324415922165, + -0.021738620474934578, + -0.02039235644042492, + 0.028144001960754395, + -0.0026553284842520952, + -0.012846192345023155, + 0.014199541881680489, + -0.01202426292002201, + -0.031204981729388237, + -0.014780561439692974, + 0.0059129330329597, + -8.502719720127061e-05, + 0.025323932990431786, + -0.04206012189388275, + 0.08332665264606476, + -0.03888577222824097, + 0.01846507377922535, + -0.03327397629618645, + -0.040557973086833954, + 0.023524191230535507, + -0.03466275334358215, + 0.01743057556450367, + 0.04931577295064926, + 0.0354846827685833, + -0.03480446711182594, + -0.004931577481329441, + 0.053397081792354584, + -0.034039221704006195, + -0.0026677283458411694, + -0.031516749411821365, + 0.02404852584004402, + -0.009246707893908024, + -0.08304323256015778, + 0.008956198580563068, + 0.024105209857225418, + -0.016452763229608536, + -0.00017437218048144132, + -0.016424421221017838, + 0.05178156495094299, + 0.06292012333869934, + 0.020123103633522987, + -0.04271199554204941, + -0.0066037788055837154, + 0.05067620798945427, + 0.04203177988529205, + -0.0679083913564682, + 0.00620698556303978, + -0.0635436624288559, + -0.05433237925171852, + 0.008878256194293499, + 0.0032629186753183603, + 0.019272832199931145, + 0.01684955693781376, + -0.010720512829720974, + 0.02188033238053322, + -0.05274520441889763, + -0.01965545304119587, + -0.03746865317225456, + -0.03335900232195854, + -0.0034152590669691563, + 0.04523446783423424, + 0.02197953127324581, + -0.015460778959095478, + -0.016778700053691864, + -0.036249928176403046, + -0.026485972106456757, + -0.013391783460974693, + 0.01612682454288006, + 0.005576367024332285, + 0.026117520406842232, + -0.03925422206521034, + -0.023850128054618835, + 0.016240194439888, + 0.021214285865426064, + 0.011131477542221546, + -0.036845117807388306, + 0.0007794160046614707, + -0.013682292774319649, + -0.022121243178844452, + -0.01995304971933365, + 0.010982680134475231, + 0.018521757796406746, + 0.025451473891735077, + 0.021611079573631287, + -0.019244488328695297, + -0.018436729907989502, + -0.002164650708436966, + -0.0016961154760792851, + 0.02924935519695282, + 0.060482680797576904, + 0.016197681427001953, + 0.023269109427928925, + -0.008899513632059097, + 0.021200114861130714, + -8.308972610393539e-05, + -0.04529115557670593, + -0.0486922413110733, + -0.03590982034802437, + -0.01904609240591526, + -0.07760149240493774, + 0.0060688164085149765, + 0.02424692176282406, + 0.009799384512007236, + -0.06286343932151794, + -0.04563126340508461, + 0.017983252182602882, + -0.046169769018888474, + 0.02494131214916706, + 0.014504223130643368, + -0.034492701292037964, + -0.014794732443988323, + 0.029135987162590027, + -0.035683080554008484, + 0.05387889966368675, + -0.010869310237467289, + 0.00487489253282547, + 0.002154022455215454, + -0.023566704243421555, + 0.010302461683750153, + 0.016594475135207176, + 0.005909390281885862, + 0.01597094163298607, + 0.05379387363791466, + 0.07204637676477432, + 0.021214285865426064, + 0.007694961503148079, + 0.02570655569434166, + 0.049089036881923676, + 0.007060800213366747, + 0.020335670560598373, + 0.01653778925538063, + 0.00042823594412766397, + 0.04418579861521721, + 0.02832822874188423, + -0.005824362859129906, + 0.03157343342900276, + 0.008736544288694859, + -0.024020183831453323, + 0.01225100178271532, + 0.033302318304777145, + 0.01978299394249916, + 0.03588147833943367, + -0.03072316013276577, + 0.014964786358177662, + 0.04619811102747917, + -0.022107072174549103, + -0.01670784503221512, + 0.02054823935031891, + -0.02083166316151619, + 0.022999856621026993, + -0.020590752363204956, + -0.012165974825620651, + 0.008290152065455914, + -0.030184654518961906, + -0.033585742115974426, + 0.01432708278298378, + 0.004697752650827169, + -0.05801689252257347, + 0.02479959838092327, + -0.01803993619978428, + -0.006770290434360504, + 0.025451473891735077, + -0.0010991536546498537, + 0.0664912685751915, + -0.023382479324936867, + 0.04611308500170708, + -0.05217835679650307, + 0.002614586381241679, + -0.0025596730411052704, + -0.003904165467247367, + -0.0034365158062428236, + -0.015744201838970184, + 0.020732464268803596, + 0.03738362342119217, + 0.03279215469956398, + -0.01801159419119358, + -0.0009149280958808959, + 0.014334168285131454, + 0.006224699318408966, + 0.0605960488319397, + -0.042456913739442825, + -0.04744517803192139, + 0.025890782475471497, + 0.018932722508907318, + 0.021625250577926636, + -0.015574147924780846, + -0.0136681217700243, + 0.000315309182042256, + -0.013519324362277985, + 0.01653778925538063, + 0.04047294706106186, + 0.004548955243080854, + 0.007758731953799725, + -0.03956598788499832, + 0.0075319926254451275, + -0.008630260825157166, + -0.0250830240547657, + -0.002102651633322239, + -0.03865903243422508, + -0.004293873440474272, + -0.056061264127492905, + 0.02183781936764717, + 0.030241340398788452, + 0.03012797050178051, + 0.027846407145261765, + 0.03293386846780777, + 0.018209991976618767, + 0.011322788894176483, + 0.012328943237662315, + 0.02377927303314209, + -0.02053406834602356, + 0.016509447246789932, + -0.01830918900668621, + 0.06377039849758148, + 0.04461093619465828, + -0.014525479637086391, + -0.02169610746204853, + -0.0031460062600672245, + 0.04818207770586014, + -0.0004058720078319311, + 0.01829501800239086, + -0.007694961503148079, + -0.03973604366183281, + -0.05084626376628876, + 0.004811122082173824, + 0.0010663827415555716, + 0.045262809842824936, + -0.03296221047639847, + -0.016920411959290504, + 0.0634869709610939, + 0.01018200721591711, + -0.01917363330721855, + -0.014752218499779701, + -0.01092599518597126, + -0.0012594653526321054, + 0.013335098512470722, + -0.053680505603551865, + 0.03341569006443024, + 0.007850844413042068, + -0.01262653898447752, + 0.042598627507686615, + -0.0019733395893126726, + 0.011216504499316216, + 0.007631191052496433, + -0.02984454669058323, + 0.002293962985277176, + 0.008878256194293499, + -0.016722016036510468, + 0.008609003387391567, + -0.010989765636622906, + 0.025352276861667633, + -0.008984540589153767, + 0.007475307676941156, + 0.03072316013276577, + 0.009615158662199974, + 0.018365874886512756, + 0.020789150148630142, + -0.00901996809989214, + -0.023424992337822914, + 0.0840635597705841, + 0.020165616646409035, + 0.009430933743715286, + -0.04118150472640991, + 0.056486401706933975, + 0.06694474816322327, + -0.03928256407380104, + -0.0546441450715065, + 0.014936444349586964, + -0.026386773213744164, + -0.012527340091764927, + 0.064960777759552, + 0.020321499556303024, + 0.0143979387357831, + 0.009218364953994751, + -0.01047960203140974, + 0.0019981390796601772, + 0.050449471920728683, + -0.01049377303570509, + 0.08519725501537323, + 0.020562410354614258, + -0.03613656014204025, + 0.0413799025118351, + 0.050449471920728683, + 0.05821528658270836, + -0.019116947427392006, + -0.0012373228091746569, + 0.02586243860423565, + -0.0590655617415905, + -0.009267964400351048, + -0.007999641820788383, + -0.010826796293258667, + 0.04418579861521721, + 0.011096049100160599, + -0.04013283550739288, + 0.029419410973787308, + 0.015078156255185604, + -0.061219580471515656, + 0.018932722508907318, + 0.027364585548639297, + -0.009671843610703945, + 0.018380045890808105, + -0.015885915607213974, + 0.015460778959095478, + 0.02970283478498459, + 0.008233467116951942, + 0.07215974479913712, + 0.03721357136964798, + -0.014086171984672546, + -0.00835392251610756, + 0.017033781856298447, + -0.019556256011128426, + 0.0634302869439125, + 0.006890745833516121, + -0.028739193454384804, + -0.011514099314808846, + -0.04067134112119675, + 0.036873459815979004, + 0.014064915478229523, + 0.006182185839861631, + 0.006182185839861631, + -0.0191878043115139, + -0.0020512810442596674, + -0.006692348979413509, + 0.0169912688434124, + -0.01669367402791977, + -0.030071286484599113, + 0.022206269204616547, + 0.017685657367110252, + -0.022206269204616547, + -0.03041139431297779, + 0.03724191337823868, + 0.0077020470052957535, + -0.021611079573631287, + 0.0012266944395378232, + -0.009253793396055698, + 0.04067134112119675, + -0.03185685724020004, + -0.04050128906965256, + 0.017501430585980415, + 0.008630260825157166, + -0.018380045890808105, + 0.023878471925854683, + -0.007206054870039225, + -0.02407686784863472, + 0.013384697958827019, + 0.018833523616194725, + 0.046424850821495056, + 0.0057747638784348965, + 0.018209991976618767, + -0.0012160660699009895, + -0.01639607734978199, + 0.029589464887976646, + 0.03146006166934967, + -0.028852561488747597, + 0.02379344403743744, + -0.05637303367257118, + 0.008198038674890995, + 0.014709705486893654, + 0.03931090608239174, + 0.04741683229804039, + 0.06161637604236603, + -0.018380045890808105, + 0.00996943935751915, + 0.013405954465270042, + -0.006912002805620432, + -0.012661966495215893, + 0.005317742470651865, + -0.013278414495289326, + 0.03114829584956169, + -0.005696822423487902, + -0.042740337550640106, + -0.010536286979913712, + -0.008304323069751263, + -0.0003669012221507728, + 0.018535928800702095, + 0.02376510202884674, + 0.07663784921169281, + 0.013271328061819077, + -0.023580875247716904, + -0.007928785867989063, + 0.01040874607861042, + -0.03318895027041435, + 0.010096979327499866, + -0.049570854753255844, + -0.027548812329769135, + 0.006791547406464815, + -0.030071286484599113, + 0.02821485884487629, + 0.0027616124134510756, + 0.005399227142333984, + 0.008382264524698257, + 0.012300601229071617, + 0.008438949473202229, + -0.01978299394249916, + 0.027137847617268562, + 0.00886408518999815, + 0.023722589015960693, + 0.010840967297554016, + -0.01388068962842226, + 0.007011201232671738, + 0.00031420207233168185, + -0.00029338811873458326, + -0.02719453163444996, + 0.013554752804338932, + 0.036108218133449554, + -0.011691239662468433, + -0.028285713866353035, + -0.035371314734220505, + 0.00501660443842411, + -0.01462467759847641, + -0.00011979092232650146, + -0.02112925797700882, + 0.020718293264508247, + -0.015276553109288216, + -0.022036215290427208, + -0.00945219025015831, + -0.00026283145416527987, + 0.028866734355688095, + -0.009934010915458202, + 0.0056861937046051025, + 0.013576009310781956, + -0.04529115557670593, + -0.01101102214306593, + -0.019542085006833076, + -0.0025242448318749666, + -0.009027054533362389, + -0.01785571128129959, + 0.04965588450431824, + 0.005395684391260147, + -0.026259232312440872, + -0.04682164266705513, + -0.045829661190509796, + 0.012725736945867538, + 0.035342972725629807, + 0.010217434726655483, + 0.002437446266412735, + -0.006639207247644663, + -0.008389350026845932, + -0.0169912688434124, + -0.05580618232488632, + 0.014794732443988323, + -0.03412424772977829, + -0.06138963624835014, + -0.012265173718333244, + -0.013278414495289326, + 0.010663827881217003, + 0.056939881294965744, + 0.011025193147361279, + -0.051186371594667435, + 0.007829587906599045, + 0.023595048114657402, + -0.028129830956459045, + -0.02260306291282177, + -0.02995791658759117, + -0.027832236140966415, + -0.018380045890808105, + -0.006214071065187454, + 0.015432436019182205, + 0.03613656014204025, + 0.02156856656074524, + 0.003904165467247367, + -0.014461709186434746, + -0.007411537226289511, + -0.038318924605846405, + -0.01743057556450367, + -0.037610363215208054, + 0.012746994383633137, + -0.02037818543612957, + 0.022064557299017906, + 0.0709126815199852, + -0.008743629790842533, + 0.003626055782660842, + -3.6341378290671855e-05, + -0.01592842862010002, + -0.003101721405982971, + 0.013335098512470722, + 0.023283280432224274, + 0.015347409062087536, + -0.047190096229314804, + -0.025281419977545738, + 0.024912968277931213, + 0.03126166760921478, + 0.021625250577926636, + 0.006185728590935469, + 5.984010567772202e-05, + 0.039622675627470016, + 0.00671360595151782, + 0.00011912664922419935, + -0.018380045890808105, + -0.008701116777956486, + -0.047785285860300064, + 0.03880074620246887, + -0.03233867883682251, + -0.026981964707374573, + 0.012378542684018612, + -0.031375035643577576, + 0.0048217508010566235, + 0.027237046509981155, + -0.02261723391711712, + -0.02360921911895275, + -0.006702977232635021, + 0.038177210837602615, + 0.016041798517107964, + -0.00634869746863842, + 0.01684955693781376, + 0.05379387363791466, + 0.014022402465343475, + 0.02553650178015232, + 0.03177183121442795, + -0.0051618595607578754, + 0.007050171960145235, + 0.004308044910430908, + 0.0016668873140588403, + -0.013561838306486607, + -0.013221729546785355, + -0.007283996790647507, + 0.016041798517107964, + 0.00029515952337533236, + -0.0015189754776656628, + 0.007928785867989063, + 0.006451438646763563, + -0.0019963677041232586, + 0.007588677573949099, + 0.000950356072280556, + -0.04707672446966171, + -0.008871170692145824, + 0.00660732202231884, + -0.012931219302117825, + -0.0038616519887000322, + 0.024912968277931213, + 0.01755811646580696, + 0.021951187402009964, + -0.02111508697271347, + -0.007071428466588259, + -0.0009822412393987179, + -0.029759518802165985, + 0.020633267238736153, + -0.016736187040805817, + -0.004067134112119675, + -0.015120670199394226, + -0.025734897702932358, + -0.003039722330868244, + 0.01564500480890274, + -0.01123776100575924, + 0.020590752363204956, + 0.028144001960754395, + -0.0023719044402241707, + -0.007099770940840244, + 0.011457415297627449, + 0.024997996166348457, + 0.009650587104260921, + -0.01115273404866457, + -0.015446607954800129, + -0.025309761986136436, + -0.0053106569685041904, + 0.0031991482246667147, + 0.003326689125970006, + -0.001783799729309976, + 0.060766104608774185, + -0.0025065308436751366, + -0.007560335099697113, + -0.031686801463365555, + 0.004013992380350828, + 0.032707128673791885, + 0.03945261985063553, + -0.025749070569872856, + -0.013009161688387394, + -0.023368308320641518, + -0.0038474807515740395, + -0.028158172965049744, + -0.0014295197324827313, + 0.01625436544418335, + 0.03202690929174423, + -0.017232179641723633, + 0.026344260200858116, + 0.03806384280323982, + -0.050591181963682175, + 0.010571714490652084, + 0.007801245432347059, + -0.027279559522867203, + -0.0369301475584507, + 0.0038085097912698984, + 0.004793408326804638, + 0.018124964088201523, + 0.0169629268348217, + 0.008318494074046612, + -0.008991626091301441, + 0.008892428129911423, + 0.004885521251708269, + -0.022078728303313255, + -0.021355997771024704, + 0.0057747638784348965, + 0.04120984673500061, + 0.04078471288084984, + 0.0034896580036729574, + -0.012180145829916, + 0.010904737748205662, + 0.008942026644945145, + -0.012357286177575588, + 0.011039364151656628, + -0.01726052165031433, + -0.049712568521499634, + 0.010819710791110992, + -0.0036561693996191025, + -0.02658517099916935, + 0.005353170447051525, + 0.0017935424111783504, + 0.036419983953237534, + -0.031233323737978935, + -0.012095118872821331, + -0.017019610852003098, + -0.025763241574168205, + -0.026103349402546883, + -0.0353996567428112, + -0.022050386294722557, + -0.03355740010738373, + 0.0023010484874248505, + 0.019230317324399948, + 0.022971514612436295, + 0.00929630734026432, + 0.04472430422902107, + 0.023835957050323486, + -0.014525479637086391, + 0.0009786984883248806, + -0.05336873605847359, + -0.04220183193683624, + 0.015035643242299557, + 0.015134841203689575, + -0.014291654340922832, + -0.020888349041342735, + -0.041436586529016495, + -0.00900579709559679, + 0.034747783094644547, + -0.006235328037291765, + 0.019570427015423775, + -0.01803993619978428, + -0.004757980350404978, + 0.00601921696215868, + -0.00835392251610756, + -0.0005819048965349793, + -0.041124820709228516, + 0.04194675013422966, + 0.01189672201871872, + -0.02404852584004402, + 0.017543945461511612, + 0.03225364908576012, + -0.007177712395787239, + 0.030921557918190956, + -0.02054823935031891, + 0.008736544288694859, + -0.01934368722140789, + -0.022489693015813828, + -0.02423275075852871, + -0.003946679178625345, + -0.03942427784204483, + -0.031119953840970993, + -0.00509808911010623, + -0.0015056899283081293, + -0.022532207891345024, + 0.04390237480401993, + 0.026344260200858116, + 0.01948539912700653, + 0.009466361254453659, + -0.014220798388123512, + -0.031119953840970993, + 0.010763025842607021, + 0.008609003387391567, + 0.04401574656367302, + 0.04240022972226143, + -0.008956198580563068, + 0.0015003758016973734, + -0.012739908881485462, + 0.011471586301922798, + -0.04004780948162079, + -0.031119953840970993, + -0.019527912139892578, + 0.0022408210206776857, + -0.004789865575730801, + -0.008899513632059097, + 0.002115051494911313, + 0.0012488369829952717, + 0.023424992337822914, + 0.012690309435129166, + -0.007138741668313742, + 0.043789006769657135, + -0.00044041432556696236, + -0.033444032073020935, + 0.05195161700248718, + -0.008474376983940601, + 0.00952304620295763, + -0.014723876491189003, + 0.015375752002000809, + 0.031828515231609344, + -0.004410786088556051, + 0.0546724870800972, + 0.03503120690584183, + -0.002074309391900897, + -0.0038651947397738695, + 0.032140281051397324, + -0.044384196400642395, + -0.03369911387562752, + -0.007673704531043768, + 0.0007298167911358178, + -0.03721357136964798, + 0.0042903306894004345, + -0.00464815367013216, + 0.011577869765460491, + -0.011620383709669113, + 0.060936156660318375, + -0.002208935795351863, + -0.015375752002000809, + 0.010330804623663425, + 0.00879322923719883, + -1.4627888958784752e-05, + -0.009218364953994751, + -0.04741683229804039, + 0.03865903243422508, + -0.022234613075852394, + -0.049400802701711655, + -0.015404094010591507, + -0.0023541904520243406, + 0.0026978421956300735, + 0.013186301104724407, + -0.040841396898031235, + -0.005126431584358215, + 0.004226560238748789, + -0.006153843365609646, + 0.0027562982868403196, + -0.021370168775320053, + -0.044979386031627655, + -0.023254938423633575, + -0.020449040457606316, + 0.01181169506162405, + 0.0064549813978374004, + 0.008701116777956486, + 0.004524155519902706, + 0.043335527181625366, + -0.003379831090569496, + -0.03721357136964798, + -0.05699656531214714, + -0.002414418151602149, + -0.019556256011128426, + -0.01755811646580696, + 9.465918265050277e-05, + -0.01359726581722498, + -0.009643501602113247, + -0.01432708278298378, + 0.0033869165927171707, + 0.009012882597744465, + -0.03012797050178051, + 0.007283996790647507, + 0.022829802706837654, + 0.04755854606628418, + 0.030071286484599113, + -0.013972803018987179, + -0.015049814246594906, + 0.023099055513739586, + 0.026372602209448814, + 0.029164329171180725, + 0.011485757306218147, + 0.020590752363204956, + -0.040104493498802185, + 0.013320927508175373, + -0.004155704285949469, + -0.003420573193579912, + 0.008694031275808811, + 0.0693821907043457, + -0.026783566921949387, + 0.004173418506979942, + -0.011053536087274551, + 0.0007865015650168061, + -0.07374691963195801, + 0.010600057430565357, + -0.0008378721540793777, + -0.0383472666144371, + 0.053822215646505356, + 0.0057960208505392075, + 0.03231033682823181, + 0.012279344722628593, + 0.011195247992873192, + -0.011414901353418827, + -0.026202548295259476, + 0.040217865258455276, + 0.01292413379997015, + -0.06116289645433426, + -0.053538791835308075, + 0.009728528559207916, + -0.024360291659832, + 0.05390724167227745, + 0.010571714490652084, + -0.00018710411677602679, + -0.030808188021183014, + -0.021044231951236725, + 0.045829661190509796, + 0.005693279672414064, + 0.009976524859666824, + -0.06558430939912796, + 0.003932507708668709, + 0.008183867670595646, + -0.007957128807902336, + 0.0383756086230278, + -0.040246207267045975, + 0.005069746635854244, + -0.008757801726460457, + 0.028455769643187523, + -0.017317205667495728, + 0.025508159771561623, + -0.016013454645872116, + -0.010642570443451405, + 0.00214162259362638, + 5.8566911320667714e-05, + -0.006596693303436041, + 0.002455160254612565, + -0.024459490552544594, + -0.03661837801337242, + -0.008559404872357845, + 0.022206269204616547, + 0.03942427784204483, + 0.029334383085370064, + -0.02849828265607357, + 0.02572072669863701, + -0.045858003199100494, + -0.006430181674659252, + -0.006316812243312597, + 0.010585886426270008, + 0.003943136427551508, + 0.0007032458088360727, + -0.008892428129911423, + -0.0005664051277562976, + 0.017543945461511612, + -0.048805613070726395, + 0.02995791658759117, + -0.0062388707883656025, + -0.012810764834284782, + -0.0035746851935982704, + -0.009806470014154911, + -0.011124392040073872, + -0.04648153483867645, + -0.007461136672645807, + 0.010961422696709633, + 0.020420698449015617, + 0.003904165467247367, + -0.01710463874042034, + -0.018224162980914116, + -0.024615373462438583, + 0.04146492853760719, + 0.025479817762970924, + -0.06666132062673569, + 0.03131835162639618, + 0.03514457494020462, + -0.003094635671004653, + 0.005810191854834557, + 0.005300028715282679, + 0.033444032073020935, + -0.0008892428013496101, + 0.00431867316365242, + 0.02791726402938366, + -0.0020264815539121628, + 0.003872280241921544, + -0.004407242871820927, + 0.001957396976649761, + 0.007857929915189743, + -0.013207557611167431, + 0.007772902958095074, + -0.004385986365377903, + -0.022064557299017906, + 0.028583308681845665, + 0.008339750580489635, + 0.013767320662736893, + 0.003147777635604143, + -0.003889994230121374, + -0.007872100919485092, + 0.039792727679014206, + 0.016622817143797874, + 0.0050272331573069096, + 0.01874849759042263, + 0.009395505301654339, + -0.003587084822356701, + 0.04160664230585098, + -0.032707128673791885, + 0.016296880319714546, + -0.0008334436570294201, + -0.019003579393029213, + -0.0369584895670414, + 0.0013267785543575883, + 0.015885915607213974, + 0.012059690430760384, + -0.03613656014204025, + 0.012300601229071617, + -0.0047544375993311405, + 0.020760808140039444, + 0.012917048297822475, + -0.00827598012983799, + -0.003872280241921544, + -0.006741948425769806, + -0.013824005611240864, + -0.0075107356533408165, + 0.041861724108457565, + -0.012527340091764927, + 0.016367735341191292, + -0.0036561693996191025, + -0.021667763590812683, + -0.01818164996802807, + -0.0059129330329597, + 0.023212425410747528, + -0.005395684391260147, + -0.015772545710206032, + -0.026627684012055397, + 0.008091755211353302, + -0.028441596776247025, + 0.04818207770586014, + -0.016013454645872116, + 0.018422558903694153, + -0.011988834477961063, + 0.013802748173475266, + 0.031091611832380295, + 0.03678843379020691, + 0.03885743021965027, + -0.0002271820412715897, + -0.01815330609679222, + 0.016892069950699806, + -0.01019617822021246, + -0.007935871370136738, + -0.01202426292002201, + 0.006855317857116461, + -0.009303392842411995, + 0.012881620787084103, + -0.0649040937423706, + 0.012378542684018612, + -0.004347015637904406, + 0.017926568165421486, + -0.0020158530678600073, + -0.026188377290964127, + 0.029787860810756683, + 0.004003363661468029, + -0.01622602343559265, + 0.03029802441596985, + 0.01611265353858471, + 0.011287360452115536, + -0.014723876491189003, + 0.018124964088201523, + 0.0057251644320786, + -0.005207915790379047, + -0.017784856259822845, + 0.024303607642650604, + -0.025338103994727135, + -0.007298167794942856, + 0.00806341227144003, + -0.04650987684726715, + 0.002745670033618808, + 0.008183867670595646, + -0.00929630734026432, + -0.040387917309999466, + -0.004031706135720015, + 0.002414418151602149, + 0.03191354125738144, + -0.020576581358909607, + -0.007772902958095074, + -0.0029653236269950867, + -0.02705281972885132, + -0.024105209857225418, + 0.009445104748010635, + -0.002906867302954197, + 0.009289220906794071, + -0.01322881504893303, + 0.006260127294808626, + 0.051753219217061996, + -0.00015156541485339403, + 0.009771042503416538, + 0.015276553109288216, + 0.013221729546785355, + 0.03605153039097786, + 0.011677068658173084, + -0.0027793266344815493, + -0.013108359649777412, + -0.027520470321178436, + -0.012669051997363567, + -0.010238692164421082, + -0.01174083910882473, + -0.007517821621149778, + -0.00431867316365242, + -0.019003579393029213, + -0.015446607954800129, + 0.0442708283662796, + 0.03573976457118988, + -0.006784461904317141, + 0.00842477846890688, + -0.015262382104992867, + -0.01567334681749344, + 0.006260127294808626, + 0.015361580066382885, + -0.019244488328695297, + -0.022702261805534363, + -0.010330804623663425, + -0.016041798517107964, + 0.004896149504929781, + -0.017983252182602882, + 0.044695962220430374, + -0.0038297667633742094, + -0.009707272052764893, + -0.014064915478229523, + -0.011315702460706234, + -0.02924935519695282, + 0.017473088577389717, + -0.025295590981841087, + -0.037015173584222794, + -0.014908102340996265, + -0.01667950116097927, + 0.006040473934262991, + 0.03854566439986229, + -0.020406527444720268, + -0.062409963458776474, + -0.02655682899057865, + 0.017345547676086426, + 0.02054823935031891, + -0.007638276554644108, + -0.023878471925854683, + -0.01641024835407734, + -0.03208359703421593, + -0.01159912720322609, + 0.016466934233903885, + -0.0273079015314579, + 0.009728528559207916, + -0.03384082391858101, + -0.033585742115974426, + -0.045432865619659424, + 0.0061148726381361485, + -0.0048819780349731445, + 0.014362511225044727, + 0.02793143503367901, + -0.00893494114279747, + -0.03381248190999031, + 0.008835743181407452, + 0.027251217514276505, + 0.028285713866353035, + 0.025026338174939156, + -0.007659533526748419, + 0.020463211461901665, + 0.026670197024941444, + 0.018422558903694153, + -0.031686801463365555, + -0.0017386290710419416, + 0.005831448826938868, + -0.003904165467247367, + -0.0037093115970492363, + 0.04563126340508461, + -0.01292413379997015, + -0.03647666797041893, + -0.012796592898666859, + 0.008488548919558525, + -0.018507586792111397, + -0.006051102187484503, + 0.018705982714891434, + 0.0028909246902912855, + -0.015021471306681633, + -0.002104423241689801, + -0.00982064101845026, + 0.0103378901258111, + -0.02231963910162449, + 0.005764135625213385, + 0.008750715292990208, + 0.005505511071532965, + -0.05155482515692711, + -0.01271156594157219, + 0.032565414905548096, + -0.007152913138270378, + -0.043930720537900925, + 0.024487832561135292, + -0.01697709783911705, + -0.022262955084443092, + 0.005307114217430353, + -0.029306041076779366, + 0.006890745833516121, + 0.012364371679723263, + -0.0229006577283144, + -0.018124964088201523, + -0.014525479637086391, + -0.004297416191548109, + 0.028739193454384804, + -0.010274119675159454, + 0.0075532495975494385, + 0.017912397161126137, + 0.001681058551184833, + 0.0005017490475438535, + 0.007857929915189743, + -0.009317563846707344, + -0.020434869453310966, + 0.004091933835297823, + -0.0016739729326218367, + 0.03854566439986229, + 0.011988834477961063, + -0.009027054533362389, + 0.023708416149020195, + -0.018535928800702095, + -0.0003848366322927177, + -0.016452763229608536, + 0.012343115173280239, + -0.011641640216112137, + 0.009012882597744465, + -0.006575436796993017, + -0.000711659959051758, + 0.006476238369941711, + -0.050704553723335266, + -0.00634869746863842, + -0.010316633619368076, + 0.018535928800702095, + 0.01932951621711254, + -0.013186301104724407, + -0.01728886365890503, + -0.05288691818714142, + -0.012669051997363567, + 0.007461136672645807, + -0.02686859481036663, + 0.002231963910162449, + -0.0004258002736605704, + 0.0013037503231316805, + -0.010840967297554016, + 0.013639779761433601, + 0.020165616646409035, + -0.024856284260749817, + 0.0114503288641572, + -0.04313713312149048, + 0.02261723391711712, + -5.9452610003063455e-05, + 0.02613169141113758, + -0.006550637073814869, + -0.002217792673036456, + 0.015503291971981525, + -0.005718078929930925, + -0.0017120580887421966, + -0.002244363771751523, + -0.0025649871677160263, + -0.019414544105529785, + -0.021171772852540016, + -0.038772400468587875, + -0.002789954887703061, + 0.005363799165934324, + -0.009756870567798615, + -0.009225451387465, + 0.013051674701273441, + -0.011110220104455948, + 0.03607987239956856, + 0.02420440874993801, + -0.012343115173280239, + -0.026060836389660835, + -0.010890566743910313, + -0.0310349278151989, + -0.009423847310245037, + -0.005888133309781551, + 0.008084669709205627, + -0.007652447558939457, + 0.025493988767266273, + -0.006734862457960844, + 0.015418265014886856, + -0.041408244520425797, + 0.004198217764496803, + -0.02939106710255146, + 0.013916118070483208, + -0.014121600426733494, + -0.014582164585590363, + 0.012619453482329845, + 0.019386200234293938, + -0.020860005170106888, + 0.00730525329709053, + 0.0034453729167580605, + 0.01130861695855856, + -0.005997960455715656, + 0.0035339428577572107, + 0.014036573469638824, + 0.011804609559476376, + -0.012222659774124622, + 0.015276553109288216, + 0.004782780073583126, + -0.007879187352955341, + 0.003719939850270748, + 0.0035923991817981005, + 0.046623244881629944, + -0.0007289311033673584, + 0.00019728967163246125, + -0.009707272052764893, + -0.02083166316151619, + 0.012208488769829273, + -0.015602490864694118, + 0.02716618962585926, + 0.019697967916727066, + 0.03681677579879761, + -0.0052433437667787075, + -0.018436729907989502, + -0.0029848089907318354, + 0.034464359283447266, + -0.0015561748296022415, + 0.007779988460242748, + -0.01210928987711668, + 0.008198038674890995, + -0.0022691632620990276, + -0.0427970215678215, + 0.016481105238199234, + 0.006249499041587114, + 0.004984719678759575, + 0.0036012560594826937, + 0.02275894582271576, + -0.014107429422438145, + -0.016665330156683922, + 0.01667950116097927, + 0.017954910174012184, + 0.013363441452383995, + -0.0013560067163780332, + 0.011712496168911457, + -0.016211852431297302, + 0.007865015417337418, + -0.005994417238980532, + -0.018252504989504814, + 0.00019230760517530143, + 0.0048819780349731445, + -0.021171772852540016, + -0.0016916869208216667, + 0.01388068962842226, + -0.004113190807402134, + 0.006586065050214529, + -0.004272616468369961, + -0.021667763590812683, + -0.03188519924879074, + 0.003787253051996231, + 0.003223947947844863, + 0.007602848578244448, + -0.038318924605846405, + 0.01462467759847641, + 0.0018883123993873596, + 0.03520125895738602, + -0.002182364696636796, + -0.002476417226716876, + 0.009600987657904625, + -0.00936716329306364, + -0.05402061343193054, + 0.006802175659686327, + -0.036986831575632095, + 0.008538147434592247, + -0.05492756888270378, + 0.04500773176550865, + 0.015871742740273476, + 0.0008113011717796326, + -0.023212425410747528, + 0.016722016036510468, + 0.012265173718333244, + -0.01789822429418564, + -0.006132586859166622, + -0.0032877183984965086, + 0.011471586301922798, + -0.006674635224044323, + -0.042740337550640106, + -0.0006983744096942246, + -0.047926995903253555, + 0.015758374705910683, + 0.007581591606140137, + -0.010174921713769436, + -0.010486687533557415, + 0.006472695618867874, + 0.023127397522330284, + -0.01859261468052864, + -0.02967449277639389, + -0.009027054533362389, + 0.04220183193683624, + 0.03999112546443939, + 0.02922101318836212, + 8.870838428265415e-06, + 0.011684154160320759, + 0.014723876491189003, + 0.0033160606399178505, + -0.017090465873479843, + 0.020477384328842163, + -0.02572072669863701, + 0.02260306291282177, + 0.013122530654072762, + -0.027577154338359833, + -0.02394932694733143, + -0.007900443859398365, + 0.0042442744597792625, + 0.010734683834016323, + -0.031970225274562836, + 0.018932722508907318, + 0.017388062551617622, + -0.0018280846998095512, + -0.012761165387928486, + -0.0009494703845120966, + 0.0018989407690241933, + 0.008155525662004948, + 0.05934898555278778, + -0.030609790235757828, + -0.03341569006443024, + -0.02110091596841812, + -0.009848983958363533, + -0.03131835162639618, + -0.0214268546551466, + 0.010628399439156055, + -0.014879759401082993, + 0.03959432989358902, + -0.01210928987711668, + -0.03041139431297779, + 0.00471900962293148, + 0.013845262117683887, + 0.00332137499935925, + -0.0055161393247544765, + -0.0043576438911259174, + -0.017458917573094368, + -0.006323897745460272, + -0.007074971217662096, + -0.033160608261823654, + -0.027562983334064484, + 0.0011514099314808846, + 0.011563698761165142, + 0.014582164585590363, + -0.03381248190999031, + -0.022631404921412468, + 0.024416977539658546, + 0.03585313633084297, + 0.000994641100987792, + 0.006309726741164923, + ], + "index": 40, + }, + { + "title": "Shaun Young", + "text": "Shaun Young (born 13 June 1970, Burnie, Tasmania) is a former Australian cricketer.He played in one Test at The Oval in London in 1997. He was called into the test team as a replacement as he happened to be in England at the time. He played in 138 first-class cricket matches for Tasmania and Gloucestershire taking 274 wickets with his best bowling 7/64. He was dropped from the Tasmanian team in 2002.", + "vector": [ + 0.012097458355128765, + 0.030350737273693085, + -0.014826327562332153, + -0.0204189233481884, + -0.0037938421592116356, + 0.03649069368839264, + -0.02919255569577217, + -0.02049824967980385, + -0.022513171657919884, + 0.05054754391312599, + -0.036332037299871445, + 0.013715741224586964, + 0.024401167407631874, + 0.021529508754611015, + 0.01913381554186344, + 0.015619602985680103, + -0.05410141870379448, + -0.007916893810033798, + -0.054513923823833466, + -0.004831050522625446, + 0.04204362630844116, + -0.007254508323967457, + -0.041980162262916565, + -0.021640567108988762, + 0.011478702537715435, + 0.03303201124072075, + -0.04597827419638634, + -0.0298747718334198, + -0.02290980890393257, + -0.026003586128354073, + 0.007750305812805891, + 0.026987247169017792, + 0.030921896919608116, + -0.011843609623610973, + -0.035031065344810486, + 0.0014407874550670385, + -0.018784774467349052, + 0.01055850274860859, + -0.039187829941511154, + 0.008186607621610165, + -0.007234676741063595, + -0.007663045544177294, + -0.023972798138856888, + 0.02079969458281994, + -0.008055717684328556, + -0.008087447844445705, + -0.004172631539404392, + -0.03168344125151634, + -0.02414732053875923, + -0.01761072687804699, + 0.023830009624361992, + 0.027510810643434525, + -0.030001696199178696, + 0.03604646027088165, + -0.0011016619391739368, + -0.043185941874980927, + 0.013953723944723606, + 0.06695248931646347, + 0.03544357046484947, + -0.08929114043712616, + 0.014421756379306316, + -0.011669089086353779, + 0.012200583703815937, + 0.0022687693126499653, + 0.02414732053875923, + -0.015215032733976841, + 0.02897043712437153, + 0.01762659102678299, + -0.01664292998611927, + 0.0033853051718324423, + 0.007817734032869339, + -0.006782509386539459, + 0.0009762251866050065, + 0.026780996471643448, + -0.011050334200263023, + 0.04502634331583977, + 0.0018582489574328065, + 0.04029841721057892, + -0.06790442019701004, + 0.04052053391933441, + 0.04956388100981712, + -0.036300309002399445, + -0.05188024789094925, + 0.023433370515704155, + -0.013144582509994507, + -0.002478987444192171, + -0.0032464817631989717, + -0.06447746604681015, + -0.009384454227983952, + -0.03683973476290703, + 0.053974494338035583, + 0.027241095900535583, + 0.07291792333126068, + 0.02792331390082836, + -0.036934927105903625, + 0.0014546697493642569, + 0.057084135711193085, + -0.019578050822019577, + -0.055465854704380035, + 0.0030322973616421223, + -0.026193970814347267, + -0.046327315270900726, + 0.026257432997226715, + -0.008234204724431038, + 0.006909433286637068, + -0.018816504627466202, + -0.07577371597290039, + -0.006171687040477991, + 0.04052053391933441, + 0.009804890491068363, + 0.02167229913175106, + -0.014421756379306316, + -0.04264651611447334, + -0.00236197910271585, + -0.012137121520936489, + 0.010027008131146431, + -0.017658323049545288, + 0.008718102239072323, + -0.004144866950809956, + 0.008622909896075726, + 0.016801584511995316, + -1.3053417205810547e-05, + 0.019324202090501785, + -0.0033912546932697296, + 0.04283690080046654, + -0.025591082870960236, + -0.025242039933800697, + 0.0076233819127082825, + 0.030350737273693085, + 0.014810461550951004, + -0.012240247800946236, + -0.008614976890385151, + -0.008369061164557934, + 0.018689582124352455, + -0.052927371114492416, + 0.0006048728828318417, + 0.017531398683786392, + 0.007377466186881065, + 0.03331758826971054, + 0.03899744525551796, + 0.01069336012005806, + -0.02739975042641163, + 0.0818026140332222, + 0.0020922652911394835, + -0.017658323049545288, + -0.04835810139775276, + 0.0056877885945141315, + -0.016849180683493614, + -0.03899744525551796, + 0.007492491509765387, + 0.002488903235644102, + 0.006453299894928932, + 0.0015885350294411182, + -0.028145430609583855, + -0.00035127249429933727, + 0.004957974888384342, + 0.016420811414718628, + 0.03595126420259476, + 0.03871186450123787, + 0.037537816911935806, + -0.01556407380849123, + 0.020339595153927803, + -0.04873887449502945, + 0.004019925836473703, + -0.016404947265982628, + -0.05619566887617111, + -0.0535302609205246, + -0.02484540268778801, + 0.015151570551097393, + 0.03433298319578171, + -0.011780147440731525, + -0.02359202690422535, + 0.03680800274014473, + 0.027732927352190018, + 0.0029767679516226053, + 0.006536593660712242, + -0.034777216613292694, + -0.0282564889639616, + 0.033412784337997437, + 0.0009856453398242593, + -0.04991292208433151, + -0.019086219370365143, + 0.0298271756619215, + -0.03617338463664055, + -0.04185323789715767, + -0.018404001370072365, + 0.053593721240758896, + 0.01665879413485527, + -0.023988664150238037, + 0.01193086989223957, + 0.030572855845093727, + -0.027145903557538986, + 0.0032306162174791098, + -0.0025880627799779177, + 0.012977994047105312, + 0.06999866664409637, + 0.03168344125151634, + 0.029462268576025963, + -0.04934176430106163, + 0.013144582509994507, + 0.005168192554265261, + -0.061145711690187454, + 0.03044593147933483, + -0.025575216859579086, + -0.003831522772088647, + 0.016769854351878166, + 0.011312115006148815, + 0.009130606427788734, + -0.021275660023093224, + -0.01759486086666584, + 0.054545655846595764, + 0.06974481791257858, + 0.011772215366363525, + 0.032270465046167374, + -0.0376012809574604, + 0.002015912439674139, + 0.04128208011388779, + -0.0001701824803603813, + 0.010963073931634426, + 0.016404947265982628, + -0.008218338713049889, + 0.014199639670550823, + -0.009257529862225056, + -0.03274643048644066, + -0.008852959610521793, + 0.03683973476290703, + -0.005259419325739145, + 0.03737916424870491, + -0.010891678743064404, + -0.034079134464263916, + -0.012486163526773453, + 0.06746018677949905, + 0.02517857775092125, + -0.02016507461667061, + -0.05219755694270134, + 0.045121535658836365, + 0.02327471598982811, + -0.0470888614654541, + 0.07050636410713196, + -0.03921956196427345, + 0.026543013751506805, + 0.036014728248119354, + 0.007532155141234398, + -0.009392387233674526, + 0.028716588392853737, + 0.009654168039560318, + 0.028526203706860542, + -0.05188024789094925, + -0.005398242734372616, + 0.01886410266160965, + -0.013461892493069172, + -0.0409964993596077, + 0.004438378848135471, + -0.011089997366070747, + -0.015659267082810402, + 0.00052951171528548, + -0.02049824967980385, + -0.013557085767388344, + 0.051118701696395874, + -0.014231370761990547, + -0.017452070489525795, + 0.026654072105884552, + 0.02232278510928154, + 0.03642722964286804, + 0.004608933348208666, + 0.0003492893010843545, + -0.02895457111299038, + 0.03244498744606972, + -0.011732551269233227, + -0.023020867258310318, + 0.02708244137465954, + 0.0004940622020512819, + -0.043852295726537704, + 0.02925601601600647, + -0.003904900746420026, + -0.05241967365145683, + -0.052007172256708145, + -0.023179523646831512, + -0.023496832698583603, + 0.03357143700122833, + 0.01734101213514805, + 0.02860553003847599, + 0.028129564598202705, + -0.06412842869758606, + 0.012851070612668991, + -0.008805363439023495, + 0.0314137265086174, + 0.0658101737499237, + -0.012882801704108715, + -0.022703558206558228, + -0.012708280235528946, + -0.027891581878066063, + 0.018150154501199722, + 0.00801208708435297, + 0.024115588515996933, + 0.036268576979637146, + -0.035665687173604965, + -0.03487240895628929, + 0.007111718878149986, + -0.04673982039093971, + 0.020974215120077133, + 0.020625174045562744, + -0.03234979137778282, + -0.019942957907915115, + -0.03296854719519615, + -0.02133912220597267, + 0.01243063434958458, + 0.014786663465201855, + 0.0042122951708734035, + -0.0407426543533802, + -0.016420811414718628, + 0.01694437488913536, + -0.0022985171526670456, + -0.02581319957971573, + 0.025860795751214027, + 0.024734344333410263, + 0.0042757573537528515, + -0.013192178681492805, + -0.017832843586802483, + 0.015802057459950447, + -0.022084802389144897, + 0.006393804214894772, + -0.018134288489818573, + -0.018086692318320274, + 0.028827648609876633, + -0.021942012012004852, + 0.006881668698042631, + -0.005584662780165672, + -0.018641984090209007, + -0.0019395597046241164, + -0.028081968426704407, + -0.027145903557538986, + 0.023512698709964752, + -0.007555953226983547, + 0.004656529985368252, + 0.026844458654522896, + 0.0439474880695343, + 0.004049673676490784, + -0.04182150959968567, + 0.04566096514463425, + -0.015413351356983185, + 0.03814070671796799, + -0.0026554912328720093, + 0.018356405198574066, + -0.03706185147166252, + 0.02294154092669487, + 0.027828119695186615, + -0.026574743911623955, + -0.013691943138837814, + 0.03306373953819275, + 0.0007313012611120939, + -0.00271498691290617, + 0.023116061463952065, + 0.008702237159013748, + -0.03166757524013519, + 0.022481439635157585, + 0.007520256098359823, + -0.013787135481834412, + 0.02416318468749523, + -0.025686275213956833, + 0.03414259850978851, + 0.019911225885152817, + 0.00960657186806202, + 0.03363490104675293, + 0.002594012301415205, + 0.009344791062176228, + 0.01921314373612404, + -0.03623684495687485, + 0.012145054526627064, + 0.014889789745211601, + 0.012502028606832027, + 0.009209933690726757, + 0.0024988192599266768, + -0.0033178767189383507, + -0.01757899485528469, + -0.034713756293058395, + -0.046041734516620636, + 0.012851070612668991, + 0.02614637464284897, + -0.0039088670164346695, + 0.011708753183484077, + 0.02008574642241001, + -0.02706657536327839, + -0.0017253751866519451, + -0.025606947019696236, + -0.011431106366217136, + -0.009757294319570065, + -0.027463212609291077, + -0.001186939189210534, + -0.001381291775032878, + 0.023814143612980843, + 0.02324298582971096, + -0.0078692976385355, + -0.00977315939962864, + 0.0024670881684869528, + 0.005303049925714731, + 0.06422361731529236, + 0.06777749955654144, + 0.054260075092315674, + -0.04550230875611305, + -0.000594461162108928, + -0.04159938916563988, + -0.033507976680994034, + -0.026558877900242805, + 0.029160823673009872, + 0.005683822091668844, + 0.009693832136690617, + -0.02330644801259041, + 0.01980016753077507, + -0.026257432997226715, + 0.0755198672413826, + 0.02387760579586029, + -0.019324202090501785, + -0.007563886232674122, + 0.0014705352950841188, + 0.016611197963356972, + -0.007421096321195364, + 0.00013237792882137, + 0.032556045800447464, + -0.007916893810033798, + -0.005541032645851374, + 0.015627536922693253, + -0.025987720116972923, + -0.03022381290793419, + -0.00809538085013628, + 0.061463020741939545, + 0.019990554079413414, + 0.034396443516016006, + 0.006976861972361803, + -0.018150154501199722, + -0.004093303810805082, + -0.05118216574192047, + -0.011772215366363525, + 0.04531192034482956, + 0.02736802026629448, + -0.033476244658231735, + -0.05194370821118355, + -0.015453015454113483, + 0.021862685680389404, + 0.02708244137465954, + -0.018689582124352455, + 0.014048917219042778, + -0.032254599034786224, + -0.026558877900242805, + 0.00811124686151743, + -0.03353970870375633, + -0.0004184530698694289, + 0.0012563507771119475, + 0.04220227897167206, + 0.05321295186877251, + -0.022227592766284943, + -6.804820441175252e-05, + 0.006251014303416014, + 0.01662706397473812, + -0.00464463047683239, + -0.024639150127768517, + -0.03050939366221428, + 0.022751154378056526, + -0.028526203706860542, + 0.03420605883002281, + 0.01019359566271305, + 0.0722833052277565, + 0.018324675038456917, + -0.08408725261688232, + 0.003486447734758258, + 0.022560767829418182, + 0.014842192642390728, + -0.04845329374074936, + -0.0007198979146778584, + -0.0057829818688333035, + -0.00464463047683239, + 0.00897988397628069, + -0.07659872621297836, + 0.006362073123455048, + -0.005989233497530222, + 0.01702370122075081, + 0.0470571294426918, + -0.01792803592979908, + -0.023798277601599693, + -0.003831522772088647, + -0.020577577874064445, + 0.016246290877461433, + -0.014390025287866592, + 0.02922428585588932, + 0.025019923225045204, + -0.029969966039061546, + -0.036014728248119354, + -0.004827084019780159, + -0.030049292370676994, + -0.0061002918519079685, + -0.017134759575128555, + 0.04759655520319939, + 0.026812726631760597, + 0.004311454948037863, + -0.052610062062740326, + -0.05806779861450195, + -0.010201528668403625, + -0.020847292616963387, + -0.03108055144548416, + -0.019324202090501785, + 0.0016926525859162211, + -0.006738879252225161, + 0.04055226594209671, + -0.012295776978135109, + -0.014850125648081303, + 0.04734271019697189, + -0.0019246857846155763, + 0.05781394988298416, + -0.05229274928569794, + -0.01980016753077507, + 0.02573387138545513, + 0.06371592730283737, + 0.022497305646538734, + 0.009313059970736504, + 0.019022757187485695, + -0.00698479451239109, + 0.0021160636097192764, + 0.011058266274631023, + 0.05562451109290123, + 0.05096004530787468, + -0.017515532672405243, + 0.018388137221336365, + 0.004081404767930508, + 0.006568324752151966, + 0.029160823673009872, + -0.013691943138837814, + 0.001003989833407104, + -0.026717534288764, + -0.007274340372532606, + 0.027748793363571167, + -0.022846346721053123, + 0.004565303213894367, + -0.01458834484219551, + 0.00819454062730074, + -0.016016241163015366, + -0.03649069368839264, + -0.032556045800447464, + -0.03493587300181389, + -0.00910680741071701, + -0.005164226517081261, + 0.009923881851136684, + -0.011224854737520218, + 0.0020605341996997595, + -0.00815487653017044, + 0.005164226517081261, + 0.015881383791565895, + 0.026590609923005104, + -0.025844929739832878, + -0.006798374932259321, + -0.008234204724431038, + -0.021640567108988762, + 0.008186607621610165, + -0.00790499523282051, + -0.003821606980636716, + 0.025416560471057892, + -0.013065255247056484, + -0.07736027240753174, + 0.034428175538778305, + 0.02481367066502571, + -0.0036589852534234524, + 0.020180940628051758, + -0.029097361490130424, + -0.006611954886466265, + 0.013557085767388344, + 0.015151570551097393, + 0.013858530670404434, + 0.0011363677913323045, + 0.012795541435480118, + -0.046676356345415115, + -0.005453771911561489, + -0.017182357609272003, + 0.004351118579506874, + -0.005275284871459007, + 0.013914059847593307, + -0.013731606304645538, + -0.030953627079725266, + 0.009995277039706707, + 0.05099177733063698, + 0.013025591149926186, + 0.02448049560189247, + 0.004918310791254044, + -0.05321295186877251, + 0.011653224006295204, + -0.006286711897701025, + -0.035062797367572784, + -0.01919727772474289, + 0.002562281209975481, + -0.040679190307855606, + -0.014326563104987144, + -0.01197053398936987, + -0.03168344125151634, + -0.031937289983034134, + -0.04902445524930954, + 0.0117880804464221, + 0.030572855845093727, + -0.006366039626300335, + -0.032270465046167374, + 0.012097458355128765, + 0.02294154092669487, + 0.012081592343747616, + 0.05489469692111015, + 0.027574270963668823, + 0.01734101213514805, + -0.016833314672112465, + -0.0008537632529623806, + -0.04924657195806503, + -0.009384454227983952, + 0.02895457111299038, + -0.036300309002399445, + -0.021291526034474373, + 0.029097361490130424, + -0.008789497427642345, + -0.01132004801183939, + -0.0025008025113493204, + 0.00730607146397233, + -0.005001605022698641, + 0.027558406814932823, + -0.010891678743064404, + 0.013795068487524986, + 0.01539748627692461, + 0.031318534165620804, + 0.011097930371761322, + 0.048929259181022644, + 0.0008041834807954729, + 0.001228586072102189, + -0.033761825412511826, + -0.050166770815849304, + 0.009241664782166481, + 0.021497778594493866, + 0.054228343069553375, + -0.0203713271766901, + -0.021196333691477776, + -0.029033899307250977, + 0.03645896166563034, + 0.020625174045562744, + 0.005683822091668844, + 0.021212199702858925, + 0.0004167177830822766, + 0.010280855931341648, + -0.041313812136650085, + 0.016404947265982628, + 0.03306373953819275, + 0.0440744124352932, + 0.020577577874064445, + -0.03636376932263374, + 0.00768684409558773, + -0.0038414387963712215, + 0.004898478742688894, + -0.009027480147778988, + 0.013779203407466412, + -0.046422507613897324, + 0.035316646099090576, + 0.020593443885445595, + -0.00865464098751545, + -0.008305598981678486, + -0.009844554588198662, + 0.014390025287866592, + -0.01694437488913536, + -0.009789025411009789, + -0.02614637464284897, + 0.021466046571731567, + 0.007476625964045525, + -0.004831050522625446, + 0.017721785232424736, + -0.006270846351981163, + 0.0030084990430623293, + -0.012851070612668991, + -0.03176276758313179, + 0.03804551437497139, + -0.011954668909311295, + 0.01305732224136591, + -0.029462268576025963, + -0.012684482149779797, + -0.0024532058741897345, + 0.026558877900242805, + -0.014183773659169674, + -0.030906030908226967, + 0.012240247800946236, + 0.03417432680726051, + 0.01303352415561676, + 0.029097361490130424, + -0.04848502576351166, + -0.041662853211164474, + -0.0015151570551097393, + 0.010653696022927761, + -0.03353970870375633, + 0.0032365659717470407, + 0.021846819669008255, + -0.006532627623528242, + 0.00833733007311821, + 0.0053109824657440186, + 0.0036808003205806017, + 0.031207475811243057, + 0.0022687693126499653, + -0.019419394433498383, + -0.019578050822019577, + -0.01055850274860859, + -0.05413315072655678, + 0.011891206726431847, + -0.020958350971341133, + 0.0075757852755486965, + 0.025353098288178444, + 0.025844929739832878, + -0.011058266274631023, + -0.02173576131463051, + -0.018340539187192917, + -0.013327036052942276, + -0.012993860058486462, + 0.013945790939033031, + -0.031889691948890686, + -0.011232787743210793, + 0.004815184976905584, + 0.013810934498906136, + -0.009519311599433422, + 0.00882122851908207, + -0.008027952164411545, + 0.01789630576968193, + 0.014104446396231651, + -0.05368891730904579, + 0.05432353541254997, + -0.018768908455967903, + 0.009900083765387535, + -0.009789025411009789, + 0.018943428993225098, + -0.0020684669725596905, + 0.03960033506155014, + -0.031572382897138596, + -0.014017186127603054, + 0.008503918536007404, + 0.005886107683181763, + -0.017531398683786392, + 0.021180467680096626, + 0.032587774097919464, + 0.011367644183337688, + 0.021767491474747658, + 0.054577384144067764, + 0.008852959610521793, + -0.018102556467056274, + 0.05410141870379448, + 0.0008656623540446162, + 0.015960711985826492, + -0.010820283554494381, + -0.007155349012464285, + -0.07666219025850296, + 0.001380300149321556, + 0.007429029326885939, + 0.008860892616212368, + -0.011518366634845734, + 0.0057869479060173035, + -0.028208892792463303, + -0.0015121822943910956, + -0.021751627326011658, + 0.05527546629309654, + -0.01239097025245428, + -0.056100476533174515, + 0.009900083765387535, + 0.007920860312879086, + -0.009154404513537884, + -0.027288692072033882, + -0.018816504627466202, + 0.02917668968439102, + 0.03956860303878784, + -0.006588156800717115, + -0.02133912220597267, + 0.0014199638972058892, + 0.03239738941192627, + 0.01851505972445011, + -0.0057353852316737175, + 0.03518972173333168, + -0.005707620643079281, + -0.009090942330658436, + -1.9072709619649686e-05, + -0.04677154868841171, + 0.03810897469520569, + 0.04121861979365349, + 0.0029113227501511574, + 0.020276132971048355, + -0.02674926444888115, + -0.021767491474747658, + -0.03373009338974953, + -0.0018166019581258297, + -0.01826121285557747, + -0.030652182176709175, + 8.973934018285945e-05, + -0.030430065467953682, + 0.013477758504450321, + 0.01859438791871071, + 0.0016073753358796239, + -0.030731510370969772, + -0.02392520196735859, + 0.018118422478437424, + 0.023703085258603096, + 0.013929925858974457, + -0.019276605919003487, + -0.016182828694581985, + 0.01951458863914013, + -0.007294172421097755, + 0.020815560594201088, + 0.011145527474582195, + -0.03829936310648918, + -0.021307392045855522, + 0.022179994732141495, + -0.012145054526627064, + -0.036332037299871445, + 0.02701897919178009, + -0.02072036825120449, + -0.03173103928565979, + -0.025876661762595177, + -0.021926147863268852, + 0.04524846002459526, + 0.03373009338974953, + -0.006798374932259321, + 0.021005947142839432, + 0.014977050013840199, + -0.03636376932263374, + 0.015175368636846542, + -0.007270373869687319, + -0.02831995114684105, + -0.011248652823269367, + -0.05949569493532181, + -0.011915004812180996, + 0.00972556322813034, + 0.006659551523625851, + -0.04277344048023224, + -0.012002265080809593, + 0.04280516877770424, + -0.013485691510140896, + -0.016611197963356972, + 0.016111435368657112, + -0.0018047027988359332, + -0.025416560471057892, + -0.0721563771367073, + -0.013128716498613358, + -0.021862685680389404, + -0.012922464869916439, + 0.01303352415561676, + -0.011915004812180996, + 0.006564358249306679, + 0.05698894336819649, + 0.004680328071117401, + 0.006373972166329622, + -0.019387664273381233, + -0.03082670271396637, + -0.01981603354215622, + 0.00448200898244977, + -0.036966659128665924, + 0.013263573870062828, + -0.0014278966700658202, + -0.025210309773683548, + -0.03480894863605499, + 0.0038275565020740032, + 0.0003862262237817049, + 0.008408725261688232, + 0.018292943015694618, + -0.023417506366968155, + -0.009083009324967861, + 0.051055241376161575, + 0.018689582124352455, + 0.010098402388393879, + -0.0047239582054317, + 0.004303521942347288, + 0.007286239415407181, + -0.002560298191383481, + -0.01696023903787136, + 0.01949872262775898, + -0.02636849321424961, + 0.018356405198574066, + -0.020609309896826744, + 0.005648124497383833, + -0.04274170845746994, + -0.020260266959667206, + 0.028240622952580452, + 0.027272827923297882, + -0.016166964545845985, + 0.012026063166558743, + -0.004894512705504894, + -0.03385701775550842, + 0.002419491531327367, + 0.03353970870375633, + -0.012835204601287842, + -0.052070632576942444, + -0.07399678230285645, + -0.0724736899137497, + -0.016246290877461433, + -0.002217206172645092, + 0.01697610504925251, + -0.013446027413010597, + 0.003371422877535224, + 0.0299065038561821, + 0.006568324752151966, + -0.035665687173604965, + -0.018959295004606247, + -0.030017562210559845, + 0.007206912152469158, + 0.012351306155323982, + 0.02013334259390831, + -0.0251151155680418, + -0.05146774277091026, + -0.010257057845592499, + -0.009273395873606205, + 0.025955988094210625, + 0.02008574642241001, + -0.0011780147906392813, + -0.011502501554787159, + 0.02708244137465954, + -0.029081495478749275, + 0.02801850624382496, + 0.03890225291252136, + -0.008392859250307083, + 0.021577104926109314, + -0.03871186450123787, + 0.039441678673028946, + 0.0029926334973424673, + 0.020276132971048355, + 0.009527243673801422, + 0.016151098534464836, + -0.0029767679516226053, + 0.02106940932571888, + -0.011756349354982376, + -0.019086219370365143, + -0.0037065818905830383, + 0.021783357486128807, + -0.02895457111299038, + 0.011589761823415756, + -0.027590136975049973, + -0.01887996681034565, + 0.0009147463133558631, + -0.02765359915792942, + -0.013311170041561127, + 0.03142959251999855, + 0.019022757187485695, + 0.01385059766471386, + 0.028716588392853737, + -0.02732042409479618, + -0.014318631030619144, + 0.003716497914865613, + -0.024766074493527412, + -0.013993388041853905, + -0.03082670271396637, + -0.01590518280863762, + 0.012073660269379616, + -0.015698930248618126, + 0.012779675424098969, + -0.014001320116221905, + -0.03423779085278511, + -0.007377466186881065, + -0.01919727772474289, + 0.013580883853137493, + -0.03969552740454674, + -0.012692415155470371, + 0.04461383819580078, + -0.0061478884890675545, + -0.0038097077049314976, + -0.013049389235675335, + 0.008559447713196278, + 0.03331758826971054, + -0.011407308280467987, + 0.00877363234758377, + 0.014231370761990547, + 0.037886857986450195, + -0.03801378235220909, + 0.010772687382996082, + -0.040710922330617905, + 0.010106335394084454, + 0.015897249802947044, + 0.028716588392853737, + -0.03541183844208717, + 0.018705446273088455, + -0.04458210989832878, + -0.027843985706567764, + 0.014643874019384384, + 0.011089997366070747, + -0.015984511002898216, + -0.028351683169603348, + 0.01274001132696867, + 0.025416560471057892, + -0.0064295013435184956, + -0.001107611577026546, + 0.06784095615148544, + -0.00894021987915039, + -0.02638435736298561, + -0.02006988227367401, + -0.021926147863268852, + -0.017515532672405243, + 0.012200583703815937, + -0.004251959268003702, + -0.04534365236759186, + 0.01116139255464077, + 0.033222395926713943, + -0.0376647412776947, + -0.021307392045855522, + -0.021577104926109314, + -0.01827707700431347, + -0.038775328546762466, + -0.038489747792482376, + 0.025575216859579086, + -0.009217866696417332, + -0.007405230775475502, + 0.006707148160785437, + -0.00502540310844779, + 0.011193123646080494, + 0.017182357609272003, + -0.04534365236759186, + -0.013263573870062828, + -0.022830482572317123, + 0.03528491407632828, + 0.007984322495758533, + 0.01978430151939392, + 0.0075599197298288345, + 0.0094479164108634, + -0.038521479815244675, + -0.003815657226368785, + 0.022893942892551422, + -0.030319007113575935, + 0.015960711985826492, + -0.046359047293663025, + 0.03969552740454674, + -0.02322711981832981, + 0.03871186450123787, + 0.038204170763492584, + 0.013096985407173634, + -0.01113759446889162, + 0.03741089254617691, + -0.02487713284790516, + -0.017103029415011406, + 0.022735288366675377, + 0.0014596277615055442, + -0.02478194050490856, + -0.005445839371532202, + 0.014136177487671375, + 0.0002177790302084759, + -0.021957878023386, + 0.0032722633332014084, + -0.0377282053232193, + -0.02010161243379116, + -0.008043818175792694, + 0.005473603960126638, + 0.05806779861450195, + -0.011518366634845734, + 0.010296721942722797, + 0.007964490912854671, + -0.0011819811770692468, + -0.036300309002399445, + 0.013461892493069172, + -0.035380106419324875, + 0.009622436948120594, + 0.036903198808431625, + 0.008678439073264599, + 0.0016162997344508767, + 0.04439172148704529, + 0.008575312793254852, + 0.03874359652400017, + 0.005354612600058317, + -0.007270373869687319, + -0.017198221758008003, + -0.011375577189028263, + -0.018721312284469604, + 0.022893942892551422, + 0.06822173297405243, + -0.0001202308849315159, + -0.005207856651395559, + -0.03212767466902733, + 0.018292943015694618, + -0.01981603354215622, + 0.04055226594209671, + -0.014088580384850502, + 0.01334290113300085, + 0.010328453034162521, + 0.014580411836504936, + 0.0008800405194051564, + 0.011899138800799847, + -0.02076796442270279, + -0.012652751058340073, + -0.017674187198281288, + -0.033127203583717346, + 0.03956860303878784, + 0.009685899131000042, + -0.0008225279743783176, + -0.02855793386697769, + 0.0034190192818641663, + 0.00928132887929678, + 0.0017065348802134395, + -0.015532342717051506, + 0.012779675424098969, + -0.00849598553031683, + 0.025543484836816788, + 0.01634148508310318, + 0.030350737273693085, + -0.02354443073272705, + 0.007008593063801527, + -0.01035225111991167, + -0.0188482366502285, + -0.0376647412776947, + -0.017753515392541885, + 0.019609780982136726, + 0.012152987532317638, + -0.03528491407632828, + 0.08979883790016174, + 0.006826139520853758, + 0.009178202599287033, + -0.005517234094440937, + -0.033222395926713943, + -0.043820563703775406, + 0.0011700820177793503, + 0.01983189955353737, + -0.016000375151634216, + 0.005469637457281351, + 0.004172631539404392, + -0.015960711985826492, + 0.011510433629155159, + -0.03296854719519615, + -0.0011066199513152242, + -0.04426479712128639, + -0.02573387138545513, + 0.011454904451966286, + -0.019609780982136726, + -0.031651709228754044, + -0.03338105231523514, + -0.0029271882958710194, + -0.005291150417178869, + 0.026336761191487312, + -0.032207004725933075, + 0.003972329199314117, + -0.022386247292160988, + -0.023734815418720245, + -0.01726168394088745, + -0.016611197963356972, + -0.0266858022660017, + -0.009979411028325558, + 0.0102173937484622, + 0.0010163848055526614, + -0.03484068065881729, + 0.018372271209955215, + 0.012311642989516258, + 0.016016241163015366, + 0.013723674230277538, + 0.0036788173019886017, + 0.008146943524479866, + -0.005608460865914822, + 0.012970061972737312, + -0.0031988853588700294, + -0.015334024094045162, + 0.011859475634992123, + 0.018816504627466202, + 0.0470888614654541, + -0.0005533099756576121, + 0.009915949776768684, + -0.010971006006002426, + -0.01567513309419155, + 0.02544829249382019, + -0.0023342145141214132, + 0.004628764931112528, + -0.013453960418701172, + 0.01699197106063366, + 0.02259249798953533, + -0.004898478742688894, + -0.0007015534210950136, + 0.015897249802947044, + -0.020054016262292862, + -0.01622249372303486, + 0.008242136798799038, + 0.030715644359588623, + -0.0015994426794350147, + -0.011954668909311295, + -0.018991027027368546, + -0.03334932029247284, + 0.015016713179647923, + -0.006635753437876701, + -0.03490414097905159, + 0.03674454241991043, + -0.012422701343894005, + -0.0042757573537528515, + -0.037855129688978195, + -0.020990081131458282, + 0.030556989833712578, + 0.020038150250911713, + -0.03176276758313179, + 0.0018929546931758523, + -0.000867149792611599, + -0.02638435736298561, + 0.006366039626300335, + -0.01948285661637783, + 0.025400696322321892, + -0.040679190307855606, + -0.002659457502886653, + 0.00030937761766836047, + -0.01853092573583126, + -0.04045707359910011, + 0.007258474826812744, + -0.020006420090794563, + -0.013231842778623104, + 0.006639719475060701, + -0.011677022092044353, + 0.01665879413485527, + -0.0012662666849792004, + -0.035697419196367264, + 0.028066102415323257, + 0.014509016647934914, + -0.028351683169603348, + 0.021275660023093224, + 0.015000848099589348, + -0.024369437247514725, + 0.02073623239994049, + 0.011883273720741272, + -0.005850410088896751, + 0.02479780651628971, + -0.017769381403923035, + -0.03737916424870491, + 0.0060844263061881065, + -0.03161998093128204, + -0.012351306155323982, + -0.011756349354982376, + 0.058924537152051926, + 0.0071672480553388596, + 0.025083385407924652, + 0.01762659102678299, + -0.02078383043408394, + -0.05219755694270134, + 0.009654168039560318, + -0.004505807533860207, + -0.015445082448422909, + -0.0034725654404610395, + -0.03499933332204819, + 0.009543109685182571, + -0.006909433286637068, + 0.018927564844489098, + 0.030731510370969772, + -0.03079497255384922, + -0.021862685680389404, + 0.024988193064928055, + -0.02298913709819317, + -0.012827271595597267, + 0.012137121520936489, + -0.03741089254617691, + 0.002451222622767091, + -0.0628274530172348, + 0.00030912971124053, + -0.0102094616740942, + -0.004125034902244806, + -0.0203713271766901, + 0.02140258438885212, + -0.01019359566271305, + -0.02544829249382019, + -0.01788043975830078, + -0.013921992853283882, + 0.00777013786137104, + -0.014659739099442959, + 0.027272827923297882, + -0.023116061463952065, + -0.01396165695041418, + -0.02233865112066269, + 0.0220530703663826, + -0.02608291245996952, + -0.017721785232424736, + -0.0022370382212102413, + -0.02298913709819317, + -0.02800264023244381, + -0.014334496110677719, + 0.010899611748754978, + 0.018816504627466202, + -0.022402113303542137, + -0.030858434736728668, + -0.0022390212398022413, + -0.013089053332805634, + -0.0032801961060613394, + 0.013858530670404434, + -0.020863156765699387, + -0.011423173360526562, + -0.005334780551493168, + -0.021291526034474373, + 0.0001317581773037091, + 0.004144866950809956, + 0.014786663465201855, + 0.008599110879004002, + 0.024956461042165756, + -0.013327036052942276, + -0.016151098534464836, + 0.0036094055976718664, + 0.008408725261688232, + 0.01945112645626068, + 0.0029807344544678926, + 0.024067992344498634, + 0.009757294319570065, + -0.0440109483897686, + -0.04109169542789459, + 0.024321841076016426, + -0.014096513390541077, + -0.009336858056485653, + -0.04486768692731857, + 0.0050650667399168015, + -0.007524222135543823, + 0.01083614956587553, + 0.012906599789857864, + -0.007714608684182167, + 0.012763810344040394, + -0.013699875213205814, + 0.008376994170248508, + -0.014255168847739697, + 0.03585607185959816, + 0.010653696022927761, + -0.055148541927337646, + 0.03044593147933483, + 0.014294832944869995, + 0.0006385871092788875, + -0.016166964545845985, + -0.005386343691498041, + -0.02229105494916439, + -0.0022132399026304483, + -0.013977522030472755, + 0.037252239882946014, + 0.017705919221043587, + -0.022497305646538734, + -0.018657850101590157, + -0.029144957661628723, + -0.00866257306188345, + -0.011169325560331345, + 0.0266858022660017, + -0.04210708662867546, + -0.023655489087104797, + -0.007714608684182167, + -0.015492679551243782, + -0.013945790939033031, + -0.0026931718457490206, + 0.03300027921795845, + -0.0282564889639616, + 0.03187382593750954, + 0.005806779954582453, + 0.0049817729741334915, + -0.03966379910707474, + -2.478987335052807e-05, + -0.004204362630844116, + 0.0035201620776206255, + -0.011280383914709091, + -0.03306373953819275, + -0.0204665195196867, + -0.021846819669008255, + -0.005124562419950962, + -0.04651769995689392, + -0.01005080621689558, + -0.027780523523688316, + -0.022449709475040436, + 0.012502028606832027, + -0.00023587564646732062, + -0.04220227897167206, + 0.00989215075969696, + 0.0033773723989725113, + -0.008020020090043545, + 0.009463782422244549, + -0.01384266559034586, + -0.04658116400241852, + 0.004505807533860207, + -0.011558030731976032, + -0.027875715866684914, + 0.018324675038456917, + 0.014683538116514683, + 0.0050135040655732155, + -0.02137085422873497, + 0.0173251461237669, + 0.034079134464263916, + 0.02138672024011612, + -0.02887524478137493, + 0.002586079528555274, + -0.006960996426641941, + -0.0172775499522686, + -0.014929452911019325, + -0.009471714496612549, + -0.02549588866531849, + -0.016769854351878166, + 0.009257529862225056, + -0.005763149820268154, + 0.012977994047105312, + 0.00494210934266448, + -0.006322409491986036, + 0.017864573746919632, + 0.01891169883310795, + -0.0019008874660357833, + 0.008670506067574024, + -0.019609780982136726, + -0.00023587564646732062, + 0.0061796195805072784, + -0.02703484334051609, + -0.0003049154474865645, + 0.019419394433498383, + -0.013358767144382, + 0.06193898618221283, + 0.029081495478749275, + 0.010328453034162521, + 0.014175841584801674, + -0.020545847713947296, + -0.03645896166563034, + 0.004505807533860207, + -0.024972327053546906, + 0.00478345388546586, + -0.014318631030619144, + 0.021164601668715477, + 0.002080366248264909, + -0.00247105467133224, + -0.029636789113283157, + -0.037886857986450195, + -0.009868352673947811, + 0.01853092573583126, + -0.031286802142858505, + 0.009551042690873146, + 0.012145054526627064, + -0.009693832136690617, + -0.03246085345745087, + 0.03052525781095028, + -0.02801850624382496, + -0.01672225631773472, + 0.010447444394230843, + -0.04591481015086174, + -0.014810461550951004, + 0.02771706134080887, + -0.007797902449965477, + 0.025305502116680145, + 0.016452543437480927, + 0.014231370761990547, + 0.023417506366968155, + -0.006826139520853758, + 0.044772494584321976, + -0.03146132454276085, + -0.015460948459804058, + -0.0005116629763506353, + 0.047660019248723984, + -0.010526771657168865, + 0.013715741224586964, + -0.02105354331433773, + 0.0034150530118495226, + -0.019927091896533966, + -0.005985266994684935, + 0.008765699341893196, + 0.012152987532317638, + 0.020529981702566147, + 0.03271469846367836, + 0.01854679174721241, + -0.004037774633616209, + -0.02611464448273182, + 0.012462365441024303, + -0.0051047308370471, + 0.004608933348208666, + -0.002135895425453782, + -0.04315420985221863, + -0.011383510194718838, + 0.02917668968439102, + -0.031508918851614, + -0.01180394645780325, + -0.05153120681643486, + 0.023671355098485947, + 0.006968928966671228, + 0.012827271595597267, + 0.00831353198736906, + -0.011954668909311295, + -0.02014920860528946, + -0.009170269593596458, + -0.010328453034162521, + -0.001276182709261775, + 0.013882328756153584, + 0.005901973228901625, + 0.002104164334014058, + -0.013358767144382, + 0.011446971446275711, + 0.021942012012004852, + 0.02008574642241001, + -0.017103029415011406, + -0.027558406814932823, + 0.015968644991517067, + 0.025543484836816788, + 0.008948152884840965, + -0.013446027413010597, + -0.003976295702159405, + 0.01856265775859356, + 0.0033912546932697296, + -0.03247671574354172, + 0.051404282450675964, + 0.032524313777685165, + 0.001677778665907681, + -0.0038116909563541412, + -0.06758710741996765, + 0.02735215425491333, + 0.0007089903810992837, + 0.030271410942077637, + -0.031064685434103012, + -0.0012751910835504532, + 0.0061280569061636925, + 0.011423173360526562, + 0.014334496110677719, + -0.0188006404787302, + 0.017436204478144646, + 0.017372742295265198, + 0.008741901256144047, + 0.03344451263546944, + -0.008567379787564278, + -0.0034309185575693846, + 0.01756312884390354, + -0.03426951915025711, + 0.027447348460555077, + 0.008718102239072323, + -0.00865464098751545, + -0.010756821371614933, + -0.006373972166329622, + 0.00023265296476893127, + 0.015595804899930954, + -0.04255132004618645, + -0.006251014303416014, + -0.0012940313899889588, + 0.02197374403476715, + -0.020561711862683296, + -0.03268297016620636, + -0.02643195539712906, + 0.021640567108988762, + -0.007663045544177294, + 0.004085371270775795, + -0.03238152340054512, + 0.010019075125455856, + 0.02387760579586029, + 0.003060061950236559, + 0.019070353358983994, + -0.005584662780165672, + 0.007155349012464285, + -0.055148541927337646, + 0.0004541504895314574, + -0.03363490104675293, + 0.008543581701815128, + 0.01694437488913536, + -0.0266699381172657, + 0.008305598981678486, + 0.010027008131146431, + 0.0377282053232193, + -0.02641608938574791, + -0.006695249117910862, + -0.029398806393146515, + 0.009320992045104504, + 0.021878549829125404, + 0.008876757696270943, + 0.01734101213514805, + -0.019244873896241188, + ], + "index": 41, + }, + { + "title": "Fichtelberg", + "text": "The Fichtelberg (German pronunciation: [\u02c8f\u026a\u00e7t\u0259lb\u025b\u0250\u032fk]) is a mountain with two main peaks in the middle of the Ore Mountains in the east German state of Saxony, near the Czech border. At 1,214.6 m (3,985 ft) above sea level, the Fichtelberg is the highest mountain in Saxony, the second highest in the Ore Mountains and used to be the highest mountain in East Germany. Its subpeak is 1,206 m (3,957 ft) high.", + "vector": [ + 0.02628307417035103, + 0.04610802233219147, + -0.007010071538388729, + -0.0029493365436792374, + -0.0032196766696870327, + -0.00965715292841196, + -0.03682634234428406, + -0.0024630995467305183, + -0.012818630784749985, + 0.03442331776022911, + -0.046017907559871674, + 0.03223055973649025, + 0.0032440824434161186, + 0.024105334654450417, + -0.033402033150196075, + 0.023819975554943085, + 0.016460714861750603, + 0.012886215932667255, + -0.02485627867281437, + -0.05046350136399269, + 0.0010372428223490715, + -0.04703919589519501, + -0.0456274189054966, + 0.009784813039004803, + -0.01281112153083086, + 0.013659689575433731, + -0.00562457786872983, + -0.019885024055838585, + -0.035594791173934937, + -0.027094095945358276, + 0.045807644724845886, + 0.03190014138817787, + 0.017737319692969322, + -0.0005181520245969296, + -0.00928167998790741, + -0.0037265645805746317, + 0.03901910036802292, + -0.03430316597223282, + 0.014027652330696583, + -0.02372986078262329, + 0.0030150441452860832, + 0.012623385526239872, + -0.014395615085959435, + 0.022843746468424797, + -0.0314796157181263, + -0.024240504950284958, + 0.013329273089766502, + 0.009078924544155598, + -0.011872440576553345, + -0.04517684876918793, + 0.015664711594581604, + 0.001669913879595697, + 0.017061470076441765, + 0.037787552922964096, + -0.016415657475590706, + 0.00476099131628871, + 0.02942202426493168, + 0.1589600294828415, + 0.0012775451177731156, + -0.009116471745073795, + 0.006555749569088221, + -0.02419544756412506, + -0.059835296124219894, + -0.028175456449389458, + -0.018758606165647507, + -0.032470859587192535, + -0.0376974381506443, + 0.012135270982980728, + -0.0219876691699028, + 0.0002649427915457636, + -0.015033918432891369, + 0.01508648507297039, + 0.023023974150419235, + 0.05268630012869835, + 0.03223055973649025, + 0.007393053267151117, + -0.020681025460362434, + -0.053827736526727676, + 0.009229114279150963, + -0.04547723010182381, + 0.012465686537325382, + 0.028490852564573288, + -0.07251124829053879, + -0.017722301185131073, + 0.022843746468424797, + -0.03361229598522186, + -0.029151683673262596, + -0.036225587129592896, + -0.027634775266051292, + 0.05911438912153244, + -0.011692213825881481, + 0.03574497997760773, + -0.049322064965963364, + -0.02200268767774105, + 0.010415607132017612, + 0.0014981352724134922, + 0.04923195391893387, + -0.010333003476262093, + -0.01620539277791977, + 0.027860058471560478, + 0.029271835461258888, + -0.05295664072036743, + 0.009897454641759396, + 0.039529744535684586, + 0.011189080774784088, + 0.028325645253062248, + -0.017857471480965614, + 0.031659841537475586, + 0.012255421839654446, + -0.01510150358080864, + 0.02137189358472824, + 0.028040286153554916, + 0.004250348545610905, + 0.009476926177740097, + 0.040641143918037415, + 0.033101655542850494, + 0.03018798865377903, + 0.03724687173962593, + -0.012871197424829006, + -0.01994509808719158, + -0.022137857973575592, + 0.01806773617863655, + 0.005951239261776209, + -0.00793748814612627, + 0.008928735740482807, + 0.0031201764941215515, + 0.05169505253434181, + -0.008065149188041687, + 0.016716035082936287, + 0.022738615050911903, + -0.009371793828904629, + -0.038117967545986176, + 0.02862602286040783, + -0.01572478748857975, + 0.016475733369588852, + 0.0008588933269493282, + 0.06548240035772324, + 0.04589775949716568, + 0.0314796157181263, + 0.006919958163052797, + -0.02153710275888443, + 0.046768855303525925, + -0.031059084460139275, + 0.05647106468677521, + -0.01587497629225254, + -0.028851306065917015, + -0.005196539219468832, + -0.008605829440057278, + -0.01092624943703413, + -0.0408514067530632, + 0.018338076770305634, + 0.0019655984360724688, + -0.007070146966725588, + -0.0180827546864748, + -0.0220177061855793, + -0.014215388335287571, + 0.010731004178524017, + -0.0023072785697877407, + 0.035114187747240067, + 0.032170481979846954, + -0.016430675983428955, + -0.020635968074202538, + 0.030533423647284508, + -0.019734833389520645, + 0.03649592772126198, + -0.007967526093125343, + 0.019374379888176918, + 0.03787766396999359, + 0.009078924544155598, + 0.010956287384033203, + 0.027905115857720375, + -0.0016502016223967075, + -0.015454447828233242, + -0.015634674578905106, + -0.02641824446618557, + -0.015769844874739647, + 0.04061110317707062, + -0.016085240989923477, + 0.038117967545986176, + 0.018202906474471092, + 0.007002561818808317, + -0.00809518713504076, + 0.026613490656018257, + -0.02014034427702427, + -0.043915264308452606, + 0.03376248851418495, + 0.008906207978725433, + 0.03526437655091286, + -0.02012532576918602, + -0.054608721286058426, + 7.397981244139373e-05, + 0.02249831147491932, + 0.028220511972904205, + -0.031659841537475586, + 0.04935210570693016, + -0.03550468012690544, + -0.011970062740147114, + 0.055449776351451874, + 0.01743694208562374, + 0.01899890787899494, + -0.0581531785428524, + 0.01085866428911686, + 0.02122170478105545, + 0.002502524061128497, + 0.041602350771427155, + 0.010948778130114079, + 0.03421305492520332, + -0.003976253792643547, + -0.011662175878882408, + 0.036736227571964264, + 0.03478377312421799, + -0.020410684868693352, + -0.007535732816904783, + 0.03595524653792381, + 0.04658862575888634, + 0.01227044127881527, + 0.026298092678189278, + -0.004813557490706444, + 0.003927442245185375, + 0.053527358919382095, + 0.09984564781188965, + -0.03283131495118141, + -0.015769844874739647, + 0.005992541089653969, + -0.028701117262244225, + 0.013960067182779312, + -0.03271116316318512, + -0.0180827546864748, + -0.0267486609518528, + -0.03238074854016304, + -0.04211299493908882, + 0.004832331091165543, + -0.049922823905944824, + -0.0036495926324278116, + -0.041091710329055786, + -0.009957530535757542, + -0.014613389037549496, + -0.004449348896741867, + 0.02955719456076622, + -0.0306836124509573, + 0.03817804157733917, + 0.0010945022804662585, + 0.0049449726939201355, + -0.011271684430539608, + -0.01313402783125639, + 0.000625161686912179, + -0.00936428364366293, + -0.043795112520456314, + 0.009619605727493763, + 0.01557459868490696, + 0.029902629554271698, + -0.031990256160497665, + 0.024646013975143433, + -0.004937463440001011, + 0.017872489988803864, + -0.04511677473783493, + -0.011504476889967918, + 0.008665905334055424, + -0.018833700567483902, + -0.0259226206690073, + -0.042863938957452774, + 0.009957530535757542, + 0.03916928917169571, + 0.011279193684458733, + 0.008861150592565536, + 0.01359210442751646, + 0.005827333312481642, + 0.027799982577562332, + -0.040010347962379456, + -0.025261789560317993, + 0.008665905334055424, + 0.01760215125977993, + 0.0005622700555250049, + -0.050703804939985275, + 0.0012212243163958192, + 0.030728669837117195, + 0.0313895009458065, + 0.05836344510316849, + -0.0029042798560112715, + -0.0010184691054746509, + 0.013058933429419994, + -0.007501940242946148, + -0.0023016463965177536, + 0.07515457272529602, + -0.02532186545431614, + 0.07124966382980347, + -0.009694700129330158, + -0.011391835287213326, + 0.06037597730755806, + -0.06818580627441406, + 0.002123296959325671, + -0.003035695059224963, + 0.006897429935634136, + -0.01697135716676712, + -0.004096405114978552, + 0.010400587692856789, + -0.008793565444648266, + 0.01695633865892887, + 0.044245678931474686, + -0.002868609968572855, + -0.022828727960586548, + 0.06728467345237732, + -0.011174061335623264, + 0.011219117790460587, + -0.0016783620230853558, + 0.009319227188825607, + -0.056531138718128204, + 0.03409290313720703, + -0.059805259108543396, + -0.01775234006345272, + 0.015071465633809566, + -0.030938932672142982, + 0.011279193684458733, + 0.05112433433532715, + -0.014177841134369373, + -0.0029080344829708338, + 0.012525762431323528, + -0.01712154597043991, + -0.011256664991378784, + -0.02796519175171852, + 0.031990256160497665, + -0.004317933693528175, + -0.01484618242830038, + 0.02261846326291561, + 0.07407321035861969, + -0.004595783539116383, + 0.0016117156483232975, + -0.01965973898768425, + 0.026643527671694756, + 0.012300479225814342, + -0.024255523458123207, + 0.03478377312421799, + 0.023144124075770378, + -0.021777404472231865, + -0.03535449132323265, + -0.04968252032995224, + -0.04325443133711815, + 0.006713448092341423, + -0.03032315894961357, + 0.01790252886712551, + 0.023639747872948647, + 0.009289189241826534, + 0.02105649746954441, + 0.05295664072036743, + -0.02656843326985836, + -0.03208037093281746, + 0.04908176511526108, + -0.007516959216445684, + -0.009769794531166553, + 0.004310424439609051, + 0.0006237537018023431, + 0.03694649413228035, + -0.07425343990325928, + 0.038298193365335464, + 0.021011440083384514, + 0.014102746732532978, + -0.08050130307674408, + -0.04830078035593033, + 0.0676451250910759, + 0.005523200612515211, + 0.0017881877720355988, + -0.0235946923494339, + 0.05959499254822731, + 0.020350608974695206, + -0.026132885366678238, + 0.011594590730965137, + 0.008508206345140934, + 0.004734707996249199, + 0.0014042671537026763, + 0.019299285486340523, + -0.013719764538109303, + -0.024495825171470642, + 0.020380647853016853, + 0.028565946966409683, + -0.059685107320547104, + -0.024630995467305183, + 0.012300479225814342, + -0.0029230534564703703, + -0.031209273263812065, + 0.009184056892991066, + -0.05139467492699623, + -0.0008753202273510396, + 0.02251332998275757, + 0.011519496329128742, + -0.011151532642543316, + -0.0005632087122648954, + -0.029166704043745995, + -0.03631569817662239, + -0.046468477696180344, + 0.02688383124768734, + -0.04103163257241249, + 0.021356875076889992, + 0.00660080648958683, + -0.02027551457285881, + -0.0009246010449714959, + -0.04421564191579819, + -0.01352451927959919, + 0.046017907559871674, + -0.02922677807509899, + -0.03526437655091286, + 0.005440596491098404, + 0.015124032273888588, + 0.02326427586376667, + 0.045987870544195175, + 0.04106167331337929, + 0.021101554855704308, + 0.021131591871380806, + 0.012307988479733467, + -0.01979490928351879, + 0.019254229962825775, + -0.015920033678412437, + -0.03283131495118141, + 0.059685107320547104, + -0.017211658880114555, + 0.04538711532950401, + -0.012555800378322601, + -0.0062966737896203995, + -0.010242889635264874, + -0.004355480894446373, + 0.031659841537475586, + -0.025877565145492554, + -0.015424409881234169, + -0.009889945387840271, + -0.009942512027919292, + -0.020801175385713577, + 0.03424309194087982, + 0.006240352988243103, + 0.024270541965961456, + -0.010948778130114079, + -0.00012144188804086298, + -0.05866382271051407, + -0.0065632592886686325, + 0.025877565145492554, + 0.029016515240073204, + 0.02233310416340828, + 0.04965248331427574, + 0.005699672270566225, + 0.036375775933265686, + 0.05280645191669464, + 0.04697911813855171, + 0.06506187468767166, + 0.003418677020817995, + 0.06470142304897308, + 0.011061419732868671, + -0.0067697688937187195, + 0.019569626078009605, + -0.04463617131114006, + -0.002797270193696022, + 0.0017177866538986564, + -0.048481009900569916, + 0.026132885366678238, + -0.02185249887406826, + 0.036736227571964264, + -0.01077606063336134, + 0.020380647853016853, + -0.013111499138176441, + 0.062839075922966, + 0.018593396991491318, + 0.020966384559869766, + -0.04962244629859924, + -0.03319177031517029, + -0.016250450164079666, + 0.011264175176620483, + -0.0503433533012867, + 0.04031072556972504, + 0.05569007992744446, + 0.025426996871829033, + 0.04214303195476532, + 0.02294887974858284, + 0.009627114981412888, + -0.0019900042098015547, + -0.02623801864683628, + -0.10050647705793381, + 0.014786106534302235, + 0.024105334654450417, + 0.026222998276352882, + 0.012150289490818977, + -0.051484789699316025, + 0.04067118093371391, + 0.017887510359287262, + 0.07022837549448013, + 0.002954968484118581, + -0.013486972078680992, + -0.005729710217565298, + -0.028881344944238663, + 0.010460663586854935, + -0.01839815266430378, + -0.039559781551361084, + -0.013501990586519241, + 0.03913925215601921, + -0.0040025366470217705, + -0.04649851471185684, + 0.025667300447821617, + 0.0033360731322318316, + -0.0009353958303108811, + 0.052445996552705765, + -0.0050163124687969685, + 0.001950579578988254, + -0.03018798865377903, + -0.00456574559211731, + -0.01335180178284645, + 0.0165207888931036, + 0.0034862621687352657, + 0.0259226206690073, + -0.01650577038526535, + 0.05121444910764694, + 0.01745196059346199, + 0.06151741370558739, + -0.03892898932099342, + -0.005444351118057966, + 0.05457868054509163, + 0.02419544756412506, + 0.03598528355360031, + -0.04508673772215843, + -0.029196741059422493, + -0.003326686332002282, + -0.0005932465428486466, + -0.004993784241378307, + -0.016130298376083374, + 0.00895877368748188, + -0.0024499581195414066, + 0.004573254846036434, + 0.003223431296646595, + 0.0330115407705307, + 0.06301930546760559, + 0.016851205378770828, + -0.015244183130562305, + 0.001301012234762311, + 0.00895877368748188, + -0.014275464229285717, + -0.08140243589878082, + -1.3640211363963317e-05, + -0.0487813875079155, + 0.041602350771427155, + 0.020996421575546265, + 0.025832507759332657, + 0.0004322627210058272, + -0.05250607430934906, + -0.006334220990538597, + -0.010700966231524944, + -0.026688585057854652, + -0.03352218493819237, + -0.031419537961483, + -0.0034055355936288834, + -0.04319435730576515, + -0.03995027393102646, + 0.008861150592565536, + -0.000696501461789012, + 0.007809828035533428, + -0.02278367057442665, + -0.007997564040124416, + -0.013930029235780239, + -0.02451084367930889, + 0.02388005144894123, + -0.015326786786317825, + 0.0157097689807415, + -0.03313169255852699, + -0.01650577038526535, + -0.005087652243673801, + -0.018368113785982132, + 0.028190474957227707, + -0.003465611021965742, + -0.04385518655180931, + 0.040490955114364624, + -0.014951314777135849, + -0.015379353426396847, + -0.0027390718460083008, + 0.024285560473799706, + -0.030908895656466484, + -0.005132709164172411, + 0.007265392690896988, + -0.019584644585847855, + 0.015679731965065002, + 0.01778237707912922, + -0.01085866428911686, + 0.011887459084391594, + 0.012082705274224281, + -0.061697639524936676, + 0.018608417361974716, + -0.029211759567260742, + 0.020485779270529747, + -0.02374488115310669, + 0.0015751071041449904, + -0.02077113837003708, + -0.017346829175949097, + 0.001974985236302018, + -0.02954217605292797, + -0.08002069592475891, + -0.006300428416579962, + 0.0019186644349247217, + -0.01622041128575802, + 0.06500180065631866, + 0.0047159343957901, + -0.003321054158732295, + -0.002519420348107815, + -0.024330617859959602, + 0.0057146912440657616, + 0.03241078555583954, + -0.07407321035861969, + -0.0005937158712185919, + -0.0165207888931036, + -0.015619656071066856, + 0.018202906474471092, + -0.055720116943120956, + -0.034333206713199615, + 0.011144023388624191, + 0.018923813477158546, + -0.05905431509017944, + -0.022708576172590256, + -0.0028479588218033314, + -0.008410584181547165, + 0.0004890529089607298, + 0.040160536766052246, + 0.012540780939161777, + 0.009033868089318275, + -0.01384742558002472, + 0.0057146912440657616, + -0.0018454473465681076, + 0.019554607570171356, + -0.01140685472637415, + 0.022137857973575592, + -0.038148004561662674, + -0.024886317551136017, + 0.020380647853016853, + -0.03190014138817787, + 0.023159142583608627, + 0.04172250255942345, + -0.0044005378149449825, + -0.011572062037885189, + 0.00024171041150111705, + -0.022753633558750153, + 0.0015093993861228228, + 0.03385259956121445, + -1.6324253010679968e-05, + -0.00895877368748188, + 0.010250398889183998, + 0.024180429056286812, + -0.005673389416188002, + 0.026628509163856506, + 0.007952507585287094, + 0.03493396192789078, + 0.005598295014351606, + -0.004937463440001011, + -0.06392043828964233, + -0.005256615113466978, + -0.020681025460362434, + 0.006593296770006418, + 0.016100261360406876, + 0.021927593275904655, + -0.024615976959466934, + -0.014005123637616634, + 0.01359210442751646, + 0.010408097878098488, + 0.006886165589094162, + -0.004359235521405935, + -0.0032159218098968267, + 0.007682167459279299, + -0.026538396254181862, + -0.0005941851995885372, + 0.005628332495689392, + 0.02344450168311596, + -0.019584644585847855, + -0.01525920256972313, + -0.010220360942184925, + -0.020035212859511375, + -0.009769794531166553, + -0.004896161146461964, + -0.01604018546640873, + 0.0074756573885679245, + -0.010025115683674812, + -0.01179734617471695, + -0.0102128516882658, + 0.00778729934245348, + 0.025216732174158096, + 0.012202856130897999, + 0.002433061832562089, + 0.00841809343546629, + -0.0227986890822649, + 0.016896262764930725, + 0.008463149890303612, + 0.00785488449037075, + -0.031239312142133713, + 0.01328421663492918, + -0.02939198724925518, + -0.06319952756166458, + -0.008065149188041687, + -0.017497017979621887, + 0.020996421575546265, + 0.01107643824070692, + 0.019584644585847855, + 0.008290432393550873, + 0.019089020788669586, + -0.057612501084804535, + 0.009544510394334793, + -0.006157748866826296, + 0.012766065075993538, + 0.009086434729397297, + -0.0005768196424469352, + -0.02057589218020439, + -0.0251416377723217, + 0.013584595173597336, + 0.02625303715467453, + -0.006439353339374065, + 0.011572062037885189, + -0.021326838061213493, + 0.008680923841893673, + -0.020215438678860664, + -0.006567013915628195, + -0.016100261360406876, + -0.04067118093371391, + 0.007982545532286167, + -0.04589775949716568, + -0.03129938617348671, + -0.010393078438937664, + 0.01605520397424698, + -0.01794758439064026, + 0.023369407281279564, + -0.01281112153083086, + 0.0026564679574221373, + 0.015033918432891369, + 0.02107151597738266, + 0.02123672515153885, + 0.01321663148701191, + -0.028070323169231415, + -0.009093943983316422, + -0.00036866706795990467, + 0.030278101563453674, + -0.000830732868053019, + 0.02248329296708107, + 0.027875078842043877, + -0.00816277228295803, + 0.004629575647413731, + -0.0009931247914209962, + -0.014440672472119331, + -0.010070172138512135, + -0.010588324628770351, + -0.0012690969742834568, + -0.010956287384033203, + 0.03051840513944626, + -0.00495623704046011, + -0.010715984739363194, + -0.027454549446702003, + -0.0023204199969768524, + 0.008388055488467216, + -0.015754826366901398, + 0.009664662182331085, + 0.007595808710902929, + -0.013494481332600117, + -0.029196741059422493, + 0.0534672848880291, + 0.01622041128575802, + 0.003131440607830882, + 0.01791754737496376, + -0.021507063880562782, + -0.013689727522432804, + 0.021612197160720825, + -0.024270541965961456, + -0.03974000737071037, + 0.04184265434741974, + -0.019779890775680542, + -0.021792422980070114, + 0.029151683673262596, + -0.039709970355033875, + 0.0012512620305642486, + 0.01934434287250042, + -0.001478422898799181, + -0.031659841537475586, + 0.0019900042098015547, + 0.020816195756196976, + -0.0029943932313472033, + 0.027574699372053146, + 0.016385620459914207, + 0.010378059931099415, + -0.007430600468069315, + -0.016746073961257935, + -0.05079391971230507, + 0.028656059876084328, + 0.024150390177965164, + 0.030848819762468338, + 0.007051373366266489, + -0.01540939137339592, + 0.0023448257707059383, + 0.018308037891983986, + 0.014418143779039383, + -0.03724687173962593, + 0.0017403149977326393, + -0.0037453381810337305, + 0.01123413722962141, + -0.05295664072036743, + 0.05563000589609146, + -0.015664711594581604, + 0.00746439304202795, + -0.006506938487291336, + 0.0004118463839404285, + 0.001384554780088365, + -0.003938706591725349, + 0.018668493255972862, + -0.01235304493457079, + 0.036075398325920105, + -0.003664611605927348, + -0.003242204897105694, + 0.007922469638288021, + 0.024585938081145287, + 0.001262526260688901, + 0.053827736526727676, + -0.04968252032995224, + 0.016625922173261642, + 0.009852398186922073, + -0.02562224306166172, + 0.022993935272097588, + 0.030908895656466484, + 0.02485627867281437, + 0.006735976319760084, + 0.013254178687930107, + -0.04181261733174324, + 0.02799522876739502, + -0.02234812267124653, + -0.02263348177075386, + 0.02392510697245598, + 0.022303065285086632, + -0.017481999471783638, + -0.012480705976486206, + 0.014260445721447468, + -0.003227186156436801, + 0.022047745063900948, + 0.06578277796506882, + -0.012135270982980728, + -0.033582258969545364, + 0.013899991288781166, + -0.047159343957901, + 0.003242204897105694, + 0.028100362047553062, + -0.0022059008479118347, + -0.04067118093371391, + -0.06590293347835541, + 0.018788643181324005, + -0.007565770763903856, + -0.007284166291356087, + -0.026943905279040337, + -0.012863687239587307, + -0.0298575721681118, + 0.028325645253062248, + -0.00793748814612627, + 0.0180977750569582, + -0.03664611652493477, + -0.00855326373130083, + 0.004498160444200039, + -0.07689676433801651, + 0.007952507585287094, + 0.020681025460362434, + 0.03974000737071037, + 0.0020331835839897394, + 0.03550468012690544, + -0.013704746030271053, + -0.02356465347111225, + 0.021507063880562782, + -0.024736128747463226, + -0.042353298515081406, + -0.005575766321271658, + 0.014200369827449322, + -0.026598472148180008, + 0.008988811634480953, + -0.002068853471428156, + -0.0019824947230517864, + 0.006262881215661764, + 0.004141461569815874, + 0.03241078555583954, + -0.008117714896798134, + 0.035444602370262146, + -0.008290432393550873, + -0.028250550851225853, + -0.01534180622547865, + 0.010528248734772205, + -0.0314796157181263, + -0.002384250285103917, + 0.006859882269054651, + -0.0228137094527483, + -0.010783569887280464, + -0.012608366087079048, + 0.037186793982982635, + 0.0061952960677444935, + 0.018022678792476654, + 0.014583352021872997, + -0.02894141897559166, + -0.00235796719789505, + 0.005677144043147564, + 0.007899940945208073, + 0.045807644724845886, + 0.03568490594625473, + -0.01637060008943081, + 0.030938932672142982, + 0.025877565145492554, + 0.013291725888848305, + -0.0016520789358764887, + 0.027139151468873024, + 0.030713649466633797, + -0.013096480630338192, + 0.0071076941676437855, + -0.035144224762916565, + 0.012796103022992611, + 0.015469466336071491, + -0.026928886771202087, + -0.01617535576224327, + -0.009379303082823753, + -0.01203013863414526, + 0.01476357877254486, + 0.014252935536205769, + -0.0172717347741127, + -0.0019196030916646123, + 0.02811538055539131, + -0.005568257067352533, + 0.048841461539268494, + 0.0066871652379632, + -0.015499504283070564, + 0.0005679021705873311, + 0.005249105393886566, + -0.029677346348762512, + -0.029962705448269844, + -0.009807341732084751, + 0.027709869667887688, + -0.006758505012840033, + -0.007085165940225124, + 0.022528350353240967, + 0.021326838061213493, + -0.014057690277695656, + -0.012901234440505505, + 0.034333206713199615, + 0.018518302589654922, + 0.008125225082039833, + -0.004791028797626495, + 0.022242991253733635, + -0.007734733168035746, + 0.01172225084155798, + -0.027784964069724083, + -0.019854985177516937, + -0.03129938617348671, + -0.012202856130897999, + -0.029992742463946342, + -0.0013226018054410815, + -0.014012633822858334, + 0.01947951316833496, + -0.01791754737496376, + 0.05472886934876442, + -0.01634056307375431, + -0.022918840870261192, + 0.006172767840325832, + 0.01697135716676712, + 0.005196539219468832, + 0.007749752141535282, + 0.002887383569031954, + -0.02419544756412506, + -0.011061419732868671, + 0.016145316883921623, + -0.005012557841837406, + 0.043795112520456314, + 0.02311408706009388, + -0.004302914720028639, + 0.03346210718154907, + -0.03000776097178459, + -0.03250090032815933, + 0.0007514143362641335, + -0.0012690969742834568, + -0.017557093873620033, + 0.011729761026799679, + -0.006668391637504101, + -0.010678437538444996, + 0.0018867492908611894, + -0.018608417361974716, + -0.039709970355033875, + -0.03790770471096039, + 0.009882436133921146, + 0.044125527143478394, + 0.00040527561213821173, + 0.020876269787549973, + -0.0027353172190487385, + 0.017181621864438057, + 0.0306385550647974, + 0.01841317117214203, + 0.06410066783428192, + -0.013321763835847378, + -0.020696043968200684, + 0.03553471714258194, + 0.011091457679867744, + 0.018142830580472946, + 0.007021335419267416, + -0.0043404619209468365, + -0.02957221306860447, + -0.008117714896798134, + -0.009214094839990139, + 0.037667401134967804, + 0.05553989112377167, + -0.005530709866434336, + 0.024165410548448563, + 0.008470659144222736, + -0.0009433746454305947, + 0.02029053308069706, + -0.05923454090952873, + -0.007682167459279299, + 0.012788592837750912, + -0.029136665165424347, + -0.010633381083607674, + -0.014966333284974098, + -0.01758713088929653, + -0.03574497997760773, + -0.024015219882130623, + 0.023714842274785042, + -0.046288248151540756, + -0.0290765892714262, + 0.004727198742330074, + 0.0106033431366086, + 0.03220052272081375, + 0.042683713138103485, + 0.010182813741266727, + 0.0014896871289238334, + 0.009874926880002022, + -0.023369407281279564, + 0.0027803739067167044, + -0.0010034502483904362, + -0.006657127290964127, + 0.03980008512735367, + 0.02329431287944317, + -0.023008953779935837, + -0.008733490481972694, + 8.864670962793753e-05, + -0.008312961086630821, + 0.05445852875709534, + -0.04806048050522804, + -0.008433111943304539, + 0.0025475809816271067, + -0.013990105129778385, + 0.0345735065639019, + 0.00975477509200573, + -0.03241078555583954, + 0.02970738336443901, + -0.030608518049120903, + 0.0055795214138925076, + -0.020545855164527893, + 0.023324351757764816, + 0.00432919804006815, + -0.01572478748857975, + -0.028175456449389458, + -0.02673364244401455, + -0.030398253351449966, + -0.030398253351449966, + -0.01715158298611641, + -0.04019057750701904, + -0.01932932436466217, + 0.0009903087047860026, + -0.0034074129071086645, + -0.004265367519110441, + -0.0019862495828419924, + 0.029752440750598907, + 0.0061652581207454205, + -0.007212826516479254, + -0.03421305492520332, + 0.023474540561437607, + -0.02969236485660076, + -0.02565228007733822, + -0.02246827445924282, + -0.0013423141790553927, + 0.0012475074036046863, + -0.0034505922812968493, + 0.01163964718580246, + 0.0015798005042597651, + 0.01170723233371973, + -0.006135220639407635, + 0.006199050694704056, + 0.021161628887057304, + -0.010573305189609528, + -0.02278367057442665, + 0.0034036580473184586, + 0.0030413272324949503, + 0.039860159158706665, + -0.022573405876755714, + 0.02655341476202011, + 0.028821269050240517, + -0.021431969478726387, + -0.00973975658416748, + 0.01695633865892887, + -0.053377170115709305, + 0.010723493993282318, + 0.06022578850388527, + 0.004017555620521307, + 0.016400638967752457, + -0.005035086069256067, + 0.011594590730965137, + -0.0008875231142155826, + 0.0330415777862072, + 0.016911281272768974, + -0.022393180057406425, + -0.017647206783294678, + 0.023369407281279564, + 0.029962705448269844, + 0.03346210718154907, + -0.010558286681771278, + -0.05097414553165436, + -0.012052667327225208, + -0.029151683673262596, + -0.03096897155046463, + -0.0003484853950794786, + -0.03493396192789078, + -0.033101655542850494, + 0.025892583653330803, + -0.0038316966965794563, + 0.030908895656466484, + 0.028100362047553062, + -0.024946391582489014, + 0.016746073961257935, + 0.00011979919509030879, + -0.025967678055167198, + -0.03871872276067734, + 0.007629601284861565, + 0.0077422428876161575, + -0.008050130680203438, + 0.02562224306166172, + -0.02297891676425934, + 0.011804855428636074, + 0.009649642743170261, + 0.017481999471783638, + -0.023189181461930275, + -0.001913971034809947, + -0.00936428364366293, + 0.009574548341333866, + 0.0014671587850898504, + 0.022062763571739197, + 0.0007485983078368008, + 0.015935052186250687, + -0.03036821447312832, + 0.05451860651373863, + 0.005279143340885639, + -0.029947686940431595, + -0.01101636327803135, + 0.0029925156850367785, + -0.007287920918315649, + -0.008748508989810944, + 0.035144224762916565, + 0.007520713843405247, + -0.010911230929195881, + -0.027094095945358276, + -0.008125225082039833, + -0.02327929437160492, + 0.014072708785533905, + 0.005834842566400766, + 0.029932666569948196, + 0.015995128080248833, + 0.00255321292206645, + -0.03721683472394943, + 0.03223055973649025, + -0.011534514836966991, + -0.01793256588280201, + 0.0007063576485961676, + 0.029632288962602615, + 0.0054781436920166016, + -0.005376765970140696, + -0.07371275871992111, + 0.008733490481972694, + -0.02545703575015068, + -0.018473247066140175, + 0.011864930391311646, + -0.010235380381345749, + -0.006127710919827223, + 0.002384250285103917, + 0.015244183130562305, + 0.022122839465737343, + -0.04328446835279465, + -0.003152091521769762, + 0.02874617464840412, + -0.02297891676425934, + -0.034994035959243774, + 0.01092624943703413, + -0.005992541089653969, + 0.03391267731785774, + -0.0071677700616419315, + 0.007408072240650654, + -0.01218032743781805, + 0.015439429320394993, + -0.028430776670575142, + -0.021507063880562782, + 0.017872489988803864, + -0.009844888933002949, + -0.014328029938042164, + -0.010160285979509354, + 0.004118933342397213, + -0.012232894077897072, + 0.023774918168783188, + -0.003968744073063135, + 0.008433111943304539, + -0.014162822626531124, + 0.022288046777248383, + -0.011549534276127815, + -0.017962604761123657, + -0.023789936676621437, + -6.928640505066141e-05, + 0.0036045359447598457, + 0.019719814881682396, + -0.012796103022992611, + -0.03505411371588707, + -0.024435749277472496, + 0.013930029235780239, + -0.0051101804710924625, + -0.023054011166095734, + 0.02970738336443901, + -0.0015976354479789734, + -0.011857421137392521, + 0.012255421839654446, + 0.004126442596316338, + 0.006653372664004564, + 0.00012402325228322297, + 0.002575741382315755, + -0.0071377321146428585, + 0.0149287860840559, + -0.030308140441775322, + -0.03817804157733917, + -0.002384250285103917, + 0.017091507092118263, + 0.003225308610126376, + 0.0032159218098968267, + -0.00809518713504076, + 0.014838673174381256, + -0.0059887864626944065, + 0.015664711594581604, + 0.003874876070767641, + -0.014523276127874851, + 0.013532028533518314, + -0.03550468012690544, + -0.0036176773719489574, + 0.001048506936058402, + 0.007794809062033892, + -0.0025100335478782654, + 0.009018849581480026, + -0.019374379888176918, + -0.043164316564798355, + -0.005196539219468832, + -0.01637060008943081, + 0.0066984291188418865, + -0.02403024025261402, + 0.028686098754405975, + 0.016580864787101746, + 0.02044072188436985, + 0.011496967636048794, + 0.03187010437250137, + 0.03096897155046463, + -0.0027540908195078373, + -0.008275413885712624, + 0.014418143779039383, + 0.018938831984996796, + 0.018202906474471092, + -0.0008828297141008079, + -0.019764872267842293, + 0.010731004178524017, + -0.022663520649075508, + 0.007456883788108826, + -0.016295505687594414, + 0.011301722377538681, + 0.013179084286093712, + -0.01946449466049671, + 0.01854834146797657, + 0.02864104136824608, + 0.013013876974582672, + -0.03334195911884308, + -0.03111916035413742, + 0.015003880485892296, + 0.03328188136219978, + 0.017737319692969322, + -0.0038823855575174093, + -0.02249831147491932, + -0.038268156349658966, + 0.011511987075209618, + 0.01841317117214203, + 0.013577084988355637, + -0.012886215932667255, + 0.02814541757106781, + -0.03505411371588707, + 0.0007608011364936829, + 0.014252935536205769, + 0.04019057750701904, + -0.013772331178188324, + 0.002770987106487155, + 0.03565486893057823, + 0.00675475038588047, + 0.028025267645716667, + -0.02859598584473133, + -0.011294212192296982, + 0.025997715070843697, + -0.005440596491098404, + -0.02090630866587162, + -0.019915061071515083, + -0.04136205092072487, + -0.008020092733204365, + 0.011384326033294201, + -0.002502524061128497, + 0.0003498934383969754, + 0.0330115407705307, + 0.015754826366901398, + 0.004821066744625568, + -0.017181621864438057, + 0.024135371670126915, + 0.018278000876307487, + 0.028971457853913307, + 0.02089129015803337, + 0.022843746468424797, + 0.02529182657599449, + -0.02781500294804573, + 0.0346035435795784, + 0.05127452313899994, + -0.01248821523040533, + 0.009296698495745659, + 0.021582158282399178, + 0.007847375236451626, + 0.021356875076889992, + -0.010175304487347603, + -0.019569626078009605, + -0.0008274475112557411, + -0.0037453381810337305, + 0.007562016136944294, + 0.006735976319760084, + -0.006848618388175964, + -0.03892898932099342, + -0.022573405876755714, + -0.0006016946863383055, + -0.01013024803251028, + -0.025021487846970558, + -0.0149287860840559, + -0.01637060008943081, + 0.033552221953868866, + 0.0049149347469210625, + 0.0002675241557881236, + -0.02216789685189724, + -0.01622041128575802, + -0.019614683464169502, + 0.03346210718154907, + 0.018187887966632843, + 0.029346929863095284, + 0.014741050079464912, + 0.005763502791523933, + -0.0011695967987179756, + -0.009597077034413815, + -0.013426896184682846, + 0.03445335477590561, + -0.022047745063900948, + 0.002571986522525549, + 0.0014737294986844063, + -0.0002891138137783855, + 0.017497017979621887, + -0.007997564040124416, + -0.009259151294827461, + 0.02297891676425934, + -0.006762259639799595, + 0.0024199201725423336, + -0.03397275134921074, + -0.0007528223213739693, + 0.006285409443080425, + -0.0314796157181263, + -0.026132885366678238, + -0.007175279315561056, + 0.009942512027919292, + 0.01588999666273594, + 0.033251844346523285, + 0.007471902761608362, + 0.0056921630166471004, + 0.03274120017886162, + -0.008185300044715405, + -0.03274120017886162, + -0.003182129468768835, + 0.0006040413863956928, + -0.013179084286093712, + 0.013990105129778385, + -0.009454397484660149, + 0.005530709866434336, + 0.029437042772769928, + 0.016610903665423393, + 0.004982519894838333, + -0.0023898824583739042, + 0.003660856746137142, + 0.016595885157585144, + 0.000717621820513159, + 0.01209772378206253, + -0.007727223914116621, + 0.013622142374515533, + -0.006394296418875456, + -0.00726914731785655, + 0.014245426282286644, + -0.0036739984061568975, + 0.011113985441625118, + 0.051484789699316025, + 0.04199284315109253, + -0.0011968185426667333, + -0.0251416377723217, + -0.008590810932219028, + -0.016070222482085228, + 0.015664711594581604, + 0.01996011845767498, + 0.0028779967688024044, + -0.042203109711408615, + 0.003056346205994487, + 0.015364334918558598, + 0.028265569359064102, + 0.012473195791244507, + 0.014726031571626663, + 0.005369256716221571, + -0.016595885157585144, + -0.013937539421021938, + 0.010378059931099415, + -0.04103163257241249, + -0.0033079127315431833, + 0.005951239261776209, + 0.00031375419348478317, + 0.005669634789228439, + -0.004366745240986347, + -0.019224191084504128, + 0.03910921514034271, + -0.016550827771425247, + 0.031029047444462776, + -0.010137757286429405, + 0.008170281536877155, + -0.004490651190280914, + -0.0010287946788594127, + 0.015063956379890442, + -0.00910896249115467, + -0.0172717347741127, + -0.007719714660197496, + -0.014605879783630371, + -0.002265976509079337, + 0.0439753383398056, + -0.0036007813178002834, + -0.016746073961257935, + 0.012593347579240799, + -0.013329273089766502, + -0.0005937158712185919, + 0.03862861171364784, + -0.023038992658257484, + 0.04181261733174324, + -0.003750970121473074, + 0.010475683026015759, + -0.006135220639407635, + 0.01602516695857048, + -0.00404759356752038, + -0.01399761438369751, + -0.004302914720028639, + -0.01196255348622799, + 0.04466620832681656, + 0.017256716266274452, + -0.007535732816904783, + 0.028701117262244225, + 0.0036946493200957775, + -0.01917913556098938, + -0.005947484169155359, + -0.015484485775232315, + -0.007182789035141468, + 0.027709869667887688, + -0.017331810668110847, + -0.0007598624797537923, + -0.008065149188041687, + -0.026928886771202087, + 0.023654766380786896, + 0.00424283929169178, + -0.00048060479457490146, + -0.010430625639855862, + -0.01092624943703413, + 0.010348021984100342, + 0.03980008512735367, + 0.004926199093461037, + 0.014665955677628517, + 0.007817337289452553, + -0.03961985930800438, + 0.02736443467438221, + 0.013329273089766502, + 0.03958981856703758, + 0.004310424439609051, + 0.018668493255972862, + -0.04760991409420967, + 0.007982545532286167, + 0.015146560035645962, + 0.005703427363187075, + -0.005237841513007879, + -0.005695917643606663, + -0.005853616166859865, + -0.013877463527023792, + -0.015664711594581604, + -0.02075611986219883, + 0.007430600468069315, + -0.0037678664084523916, + 0.023234238848090172, + 0.042833901941776276, + -0.007246619090437889, + 0.008448131382465363, + 0.024600958451628685, + -0.010746022686362267, + -0.02406027726829052, + 0.02861100435256958, + 0.011309231631457806, + -0.013644670136272907, + 0.025201713666319847, + 0.02392510697245598, + 0.001421163440681994, + -0.0037941494956612587, + 0.025742394849658012, + -0.005380521062761545, + 0.04415556415915489, + 0.02796519175171852, + 0.011159042827785015, + -0.0313895009458065, + 0.025066543370485306, + 0.019254229962825775, + 0.011977572925388813, + 0.027514623478055, + -0.007092675194144249, + 0.0005725955707021058, + -0.014906258322298527, + 0.016926299780607224, + -0.004096405114978552, + 0.008147752843797207, + 0.02578745037317276, + -0.010355531238019466, + 0.01382489688694477, + 0.0086508858948946, + -0.02811538055539131, + -0.04785021394491196, + -0.024150390177965164, + 0.04451601952314377, + -0.029046552255749702, + -0.021822461858391762, + -0.01131674088537693, + 0.03943962976336479, + -0.010423116385936737, + -0.04950229451060295, + -0.023369407281279564, + -0.005237841513007879, + -0.035775020718574524, + -0.022573405876755714, + -0.013577084988355637, + -0.01525920256972313, + 0.011782326735556126, + -0.0137648219242692, + -0.016145316883921623, + -0.005797295365482569, + ], + "index": 42, + }, + { + "title": "Steve Booth", + "text": "Steve Booth is a British political activist and journalist, and was one of the defendants in the GANDALF trial.After involvement in the 1990 anti-Poll Tax movement, and having written a number of articles for 'Freedom' magazine, he first became involved with the UK Green Anarchist magazine in 1990, and published a novel, City-Death, explaining his idea of green anarchism.", + "vector": [ + -0.0031693733762949705, + 0.006851681508123875, + -0.035086631774902344, + -0.04351947084069252, + -0.014541000127792358, + 0.03900187835097313, + -0.026653794571757317, + -0.001064104726538062, + -0.03945364058017731, + 0.04973116144537926, + -0.024677347391843796, + 0.005999927408993244, + 0.011971619911491871, + 0.02872435748577118, + 0.020385634154081345, + 0.02861141785979271, + 0.018315071240067482, + -0.029910225421190262, + -0.015896277502179146, + -0.03224431350827217, + 0.03058786503970623, + -0.031754907220602036, + -0.031510207802057266, + -0.01833389513194561, + -0.01518099196255207, + 0.00797637365758419, + 0.04231477901339531, + 3.306945291114971e-05, + -0.0006446980405598879, + 0.035274866968393326, + -0.04841352999210358, + 0.0015917454147711396, + -0.014992759563028812, + -0.003527016146108508, + -0.009162241593003273, + -0.006842270027846098, + -0.020950334146618843, + 0.002163503086194396, + -0.0331290103495121, + -0.022380905225872993, + -0.028649063780903816, + 0.01647038757801056, + -0.025354987010359764, + 0.017053911462426186, + -0.027463195845484734, + -0.0035317218862473965, + -0.058051060885190964, + -0.031867846846580505, + -0.0126398466527462, + 0.03907717391848564, + 0.04517592117190361, + -0.0006464627222158015, + 0.042917124927043915, + 0.01810801587998867, + -0.0022917368914932013, + -0.004757589194923639, + 0.013063371181488037, + 0.030399631708860397, + -0.023604419082403183, + -0.038474828004837036, + 0.014710409566760063, + -0.03378782421350479, + 0.0034728990867733955, + -0.00400465726852417, + -0.02509145997464657, + 0.04630532115697861, + 0.03201843425631523, + 0.018032722175121307, + -0.019237414002418518, + -0.0071952068246901035, + 0.008823422715067863, + 0.010258698835968971, + 0.02175973542034626, + 0.05398522689938545, + 0.018588010221719742, + -0.035839565098285675, + 0.007651671767234802, + -0.05466286465525627, + -0.043143004179000854, + 0.028140835464000702, + 0.021044449880719185, + -0.042804185301065445, + -0.030983153730630875, + -0.022606784477829933, + 0.008879892528057098, + -0.03713837265968323, + 0.0020729161333292723, + -0.09803175181150436, + 0.0029787872917950153, + -0.008682247251272202, + 0.07845551520586014, + 0.0055387564934790134, + -0.011576330289244652, + 0.0028729063924402, + -0.03002316504716873, + -0.003559956792742014, + -0.020686807110905647, + -0.023830298334360123, + -0.002411735476925969, + -0.02351030334830284, + 0.03907717391848564, + -0.017976252362132072, + -0.029533758759498596, + -0.0005841105594299734, + 0.0313972644507885, + -0.00037499546306207776, + 0.011143393814563751, + 0.0038470120634883642, + 0.0381171852350235, + 0.11745739728212357, + 0.03167961537837982, + -0.024376174435019493, + -0.017025675624608994, + 0.034823108464479446, + -0.0068140351213514805, + 0.047660596668720245, + -0.002590556861832738, + 0.024112649261951447, + -0.0011682211188599467, + -0.0011758680921047926, + -0.018070368096232414, + -0.05059703439474106, + -0.02386794611811638, + -0.034634873270988464, + 0.002550557255744934, + -0.01153868343681097, + -0.0568087212741375, + -0.010493990033864975, + 0.03469134494662285, + -0.02505381405353546, + -0.08131665736436844, + 0.0007576378411613405, + 0.011077512986958027, + -0.037834834307432175, + -0.020837394520640373, + 0.0019705642480403185, + 0.003032904351130128, + 0.03721366450190544, + 0.004399946425110102, + 0.04980645328760147, + 0.011971619911491871, + -0.01060693059116602, + -0.04186302050948143, + 0.021797383204102516, + -0.04374535009264946, + -0.036385439336299896, + -0.02627732791006565, + -0.013722186908125877, + -0.058803994208574295, + -0.005294053349643946, + -0.0034705461002886295, + -0.0019270353950560093, + -0.00888459850102663, + 0.012178676202893257, + -0.02031034231185913, + -0.0033529005013406277, + -0.06411216408014297, + -0.04276654124259949, + -0.023246776312589645, + 0.021383270621299744, + -0.062003955245018005, + -0.01308219414204359, + 0.008719894103705883, + 0.0399806909263134, + 0.02927023358643055, + -0.01055045984685421, + 0.018578598275780678, + 0.04619238153100014, + -0.039905399084091187, + 0.04295477271080017, + 0.013430424965918064, + -0.022230317816138268, + 0.08048843592405319, + 0.012122205458581448, + -0.021383270621299744, + -0.01597157120704651, + -0.006056397221982479, + -0.004738766234368086, + -0.004042304120957851, + -0.0058634583838284016, + -0.046117085963487625, + 0.018277425318956375, + 0.006988150533288717, + 0.024922050535678864, + 0.0012246910482645035, + 0.0585404671728611, + 0.002063504420220852, + 0.0232844240963459, + -0.0011270451359450817, + -0.028423184528946877, + 0.006009338889271021, + -0.031623147428035736, + 0.005152878817170858, + -0.03444664180278778, + 0.016912735998630524, + 0.07958491891622543, + -0.0359901525080204, + -0.0205550454556942, + -0.036856021732091904, + -0.04649355262517929, + 0.04961822181940079, + 0.0419759601354599, + 0.030983153730630875, + -0.03083256632089615, + 0.02597615495324135, + 0.038587767630815506, + -0.00692697474732995, + -0.005896399263292551, + -0.022587960585951805, + -0.005011703819036484, + 0.06392393261194229, + 0.0009229299612343311, + 0.0016046863747760653, + 0.05887928605079651, + -0.024809110909700394, + -0.01987740583717823, + -0.008569307625293732, + 0.027990248054265976, + 0.009646941907703876, + 0.011849268339574337, + -0.037288960069417953, + -0.0249785203486681, + 0.000455288594821468, + -0.015378637239336967, + -0.001759978593327105, + -0.010051642544567585, + -0.02452676184475422, + -0.01567981019616127, + 0.01341160200536251, + 0.0208562184125185, + -0.039943043142557144, + 0.042013607919216156, + -0.043030064553022385, + 0.002331736497581005, + -0.02949611283838749, + 0.014089240692555904, + 0.01042810920625925, + -0.01462570484727621, + -0.00582581153139472, + -0.006348158232867718, + -0.026992613449692726, + 0.03369370847940445, + -0.031867846846580505, + -0.01619745045900345, + -0.028216129168868065, + 0.03734542801976204, + 0.00833872240036726, + -0.00858813151717186, + -0.041486553847789764, + -0.018748007714748383, + -0.0009146947995759547, + 0.025656159967184067, + -0.003687014104798436, + 0.0010576342465355992, + -0.011293980292975903, + 0.009496355429291725, + -0.0061363959684967995, + -0.0014199827564880252, + 0.03369370847940445, + -0.010202229022979736, + 0.011773974634706974, + 0.007581084500998259, + -0.012922195717692375, + 0.11790915578603745, + -0.042352426797151566, + 0.03823012486100197, + -0.01953858695924282, + -0.00039411286707036197, + -0.03587721288204193, + 0.02607027254998684, + 0.031416088342666626, + -0.028969060629606247, + -0.03216902166604996, + 0.03796659782528877, + -0.023943239822983742, + 0.006503450684249401, + -0.02407500147819519, + 0.05722283571958542, + 0.0061458079144358635, + 0.014550412073731422, + 0.02870553359389305, + -0.07476615160703659, + 0.002022328320890665, + 0.004823470953851938, + -0.04156184941530228, + 0.018202131614089012, + -0.02119503729045391, + -0.0319996103644371, + 0.0277078989893198, + 0.011021043173968792, + -0.05278053507208824, + 0.05876634642481804, + 0.021910322830080986, + 0.059933390468358994, + 0.003957598935812712, + 0.013609246350824833, + -0.014484530314803123, + 0.002262325491756201, + -0.001699979417026043, + -0.007166971918195486, + -0.0025576159823685884, + 0.0465688481926918, + -0.04528886079788208, + 0.008912833407521248, + 0.002809377619996667, + 0.010381050407886505, + -0.00896459724754095, + 0.005938751623034477, + 0.004536415450274944, + -0.08711423724889755, + 0.008606954477727413, + -0.004734060261398554, + -0.004207007586956024, + -0.024564407765865326, + 0.014221004210412502, + -0.001638803631067276, + 0.031096093356609344, + -0.023717358708381653, + -8.477838127873838e-05, + -0.05933104455471039, + -0.018136249855160713, + 0.017533905804157257, + -0.06012162193655968, + 0.011501036584377289, + 0.05929339677095413, + -0.01308219414204359, + 0.05500168725848198, + 0.027463195845484734, + -0.05522756651043892, + -0.008282252587378025, + 0.02507263608276844, + -0.054512280970811844, + 0.03813600912690163, + 0.002785848453640938, + -0.01160456519573927, + -0.036498378962278366, + -0.015557458624243736, + 0.04491239786148071, + 0.0001414688740624115, + 0.013571600429713726, + 0.023227954283356667, + -0.019933875650167465, + -0.006235218606889248, + -0.02550557255744934, + -0.021609149873256683, + -0.013929243199527264, + 0.0647898018360138, + 0.008470485918223858, + -0.009002244099974632, + -0.02913847006857395, + 0.0010441049234941602, + 0.005783459171652794, + 0.03167961537837982, + -0.031303148716688156, + 0.016959793865680695, + 0.040055982768535614, + 0.011228099465370178, + -0.0788319855928421, + -0.003117609303444624, + -0.006950503680855036, + 0.04031950980424881, + -0.05918045714497566, + -0.01237632054835558, + 0.007957550697028637, + 0.01606568694114685, + -0.015783337876200676, + 0.01396688912063837, + -0.00013705715537071228, + 0.021496210247278214, + 0.04272889345884323, + -0.05631931498646736, + 0.003604662138968706, + -0.008630483411252499, + 0.011341039091348648, + -0.01359042339026928, + -0.0102116409689188, + -0.02010328508913517, + 0.004522297997027636, + -0.014221004210412502, + 0.011698681861162186, + 0.001211749971844256, + -0.019707996398210526, + 0.010493990033864975, + -0.0017305671935901046, + -0.02439499832689762, + -0.02143974043428898, + -0.0021799735259264708, + 0.04261595383286476, + 0.020159754902124405, + -0.013684540055692196, + -0.056055791676044464, + 0.020404458045959473, + -0.027331432327628136, + 0.00853166077286005, + -0.009543413296341896, + -0.018089191988110542, + 0.0302678681910038, + 0.04329359158873558, + -0.018936241045594215, + -0.0008564601885154843, + 0.0008076372323557734, + -0.016573917120695114, + -0.028329068794846535, + 0.02529851719737053, + 0.013421013951301575, + -0.05198995769023895, + -0.007049326319247484, + -0.050634678453207016, + 0.010795162990689278, + -0.028027895838022232, + 0.004369358532130718, + -0.006508156191557646, + -0.017580963671207428, + 0.03548192232847214, + -0.006955209653824568, + 0.027105553075671196, + 0.008541072718799114, + 0.006446980405598879, + 0.03570780158042908, + -0.05398522689938545, + -0.009966937825083733, + -0.011002219282090664, + -0.0036728966515511274, + -0.012056324630975723, + -0.016809208318591118, + 0.009623412974178791, + 0.023547949269413948, + -0.014879819937050343, + -0.0016258626710623503, + 0.0008799892966635525, + 0.010691635310649872, + -0.01870094984769821, + -0.031736087054014206, + 0.055491089820861816, + -0.03574544936418533, + -0.0282725989818573, + 0.012461025267839432, + 0.015397460199892521, + 0.01557628158479929, + 0.056281670928001404, + 0.003724660724401474, + 0.0076469662599265575, + 0.05835223197937012, + -0.05402287468314171, + -0.04973116144537926, + 0.010061054490506649, + -0.04329359158873558, + -0.003482310799881816, + 0.0358583889901638, + 0.03047492355108261, + -0.06061102822422981, + -0.07092619687318802, + -0.07062502205371857, + 0.02475264109671116, + 0.04973116144537926, + -0.04163714125752449, + -0.025147929787635803, + 0.005223466083407402, + -0.001778801903128624, + 0.029514936730265617, + 0.015369225293397903, + 0.04935469478368759, + 0.04894058406352997, + -0.03809836134314537, + -0.028122011572122574, + -0.07502967864274979, + -0.0048070005141198635, + -0.005279935896396637, + 0.013402190059423447, + 0.0056328726932406425, + -0.026126742362976074, + 0.0024376173969358206, + -0.03337371349334717, + 0.07740141451358795, + 0.013910419307649136, + -0.005101114511489868, + 0.015444518066942692, + -0.03877599909901619, + 0.028460830450057983, + 0.027237316593527794, + -0.03237607702612877, + -0.036498378962278366, + -0.03646073490381241, + 0.020592691376805305, + 0.037063080817461014, + -0.03975481167435646, + -0.008046961389482021, + -0.054625220596790314, + 0.0031270207837224007, + 0.007868140004575253, + 0.0090634198859334, + 0.03397605940699577, + -0.05424875393509865, + 0.0224185511469841, + 0.02409382537007332, + -0.0006799917318858206, + -0.0351242795586586, + -0.01042810920625925, + -0.018550362437963486, + 0.003607015125453472, + -0.036592498421669006, + -0.011293980292975903, + 0.04585356265306473, + 0.008409310132265091, + 0.007430498022586107, + -0.0032611368224024773, + 0.04630532115697861, + 0.022155025973916054, + 0.004247007425874472, + -0.010776340030133724, + 0.03324194997549057, + 0.03224431350827217, + -0.0031458442099392414, + 0.012809256091713905, + -0.0554157979786396, + -0.002611733041703701, + -0.0516887828707695, + 0.012470437213778496, + 0.04799941927194595, + -0.009759881533682346, + 0.03610309213399887, + -0.001979975961148739, + -0.012470437213778496, + 0.02044210582971573, + 0.04547709599137306, + 0.010239875875413418, + 0.012564553879201412, + -0.010023407638072968, + -0.07386263459920883, + -0.035293690860271454, + 0.0030681979842483997, + 0.013533953577280045, + 0.015642162412405014, + 0.03397605940699577, + -0.010032819584012032, + 0.006192866247147322, + -0.01175515167415142, + 0.007844611071050167, + 0.006404628045856953, + -0.03004198893904686, + 0.0012317497748881578, + 0.009261064231395721, + 0.0061411019414663315, + 0.034070175141096115, + 0.008094019256532192, + -0.005096408538520336, + 0.006705801002681255, + 0.005656402092427015, + -0.011435155756771564, + -0.03303489461541176, + -0.018390364944934845, + -0.002494087442755699, + -0.008051667362451553, + -0.008621071465313435, + 0.023773828521370888, + -0.02386794611811638, + -0.03821130096912384, + 0.01131280418485403, + -0.008461073972284794, + 0.016432741656899452, + 0.03467252105474472, + -0.0379854217171669, + -0.04348182678222656, + 0.04664414003491402, + -0.011698681861162186, + -0.018663302063941956, + 0.03137844428420067, + 0.03888893872499466, + -0.041486553847789764, + -0.005072879604995251, + 0.05710989609360695, + -0.0038823059294372797, + -0.002271737204864621, + -0.011124570854008198, + -0.033957235515117645, + 0.007054032292217016, + 0.031510207802057266, + -0.0039740693755447865, + -0.01865389198064804, + -0.03476663678884506, + 0.052517011761665344, + -0.02904435433447361, + -0.015331578440964222, + -0.00014830702275503427, + -0.03365606069564819, + 0.029006706550717354, + -0.017251554876565933, + -0.011661035008728504, + -0.023378539830446243, + 0.03565133363008499, + -0.009374003857374191, + 0.019256237894296646, + 0.0015129228122532368, + 0.0007864610524848104, + 0.02861141785979271, + -0.016028041020035744, + -0.00966576486825943, + 0.013468071818351746, + -0.006856387481093407, + -0.012611611746251583, + 0.058051060885190964, + 0.018729183822870255, + 0.03866305947303772, + -0.04664414003491402, + -0.029420819133520126, + -0.05214054509997368, + 0.012291615828871727, + -0.007232853211462498, + 0.017420964315533638, + -0.01447511836886406, + 0.02130797691643238, + 0.047434717416763306, + -0.039717163890600204, + -0.027745544910430908, + 0.015651574358344078, + -0.01860683225095272, + 0.0023752653505653143, + 0.024922050535678864, + 0.00409642094746232, + -0.03271489590406418, + -0.002004681620746851, + -0.021289153024554253, + 0.03137844428420067, + 0.02473381720483303, + 0.02351030334830284, + 0.031058447435498238, + -0.009901056066155434, + -0.00042999477591365576, + 0.023002073168754578, + 0.03610309213399887, + -0.00554816797375679, + -0.011905738152563572, + -0.005830517504364252, + 0.0034681931138038635, + -0.004247007425874472, + -0.0011182216694578528, + 0.034936048090457916, + 0.016875090077519417, + 0.005199936684221029, + -0.03751483932137489, + 0.0023787945974618196, + 0.021383270621299744, + -0.004395240917801857, + 0.003861129516735673, + -0.01833389513194561, + 0.02053622156381607, + 0.016639798879623413, + -0.004258771892637014, + -0.0051858192309737206, + -0.012291615828871727, + -0.025449102744460106, + -0.002245855052024126, + -0.00882812775671482, + 0.006823446601629257, + 0.015171580947935581, + -0.009185770526528358, + -0.0027223199140280485, + 0.0343901701271534, + 0.028780827298760414, + 0.03919011354446411, + -0.02164679579436779, + -0.02586321532726288, + -0.00889400951564312, + 0.003903482109308243, + -0.0016929206904023886, + 0.009331651031970978, + -0.0181268397718668, + 0.01087045669555664, + 0.022042086347937584, + 0.001072928193025291, + 0.04634296894073486, + 0.042352426797151566, + -0.01704449951648712, + 0.01418335735797882, + 0.01407982874661684, + -0.005891693290323019, + -0.04250301420688629, + -0.005510521586984396, + -0.006785800214856863, + -0.04807471111416817, + 0.022173848003149033, + -0.00789637491106987, + 0.010315168648958206, + -0.01485158409923315, + 0.03657367452979088, + -0.0022093849256634712, + -0.051199380308389664, + 0.0035528980661183596, + 0.006997562013566494, + 0.015275108627974987, + -0.04517592117190361, + -0.0010376344434916973, + 0.01976446621119976, + 0.00866813026368618, + 0.009068124927580357, + -0.023115012794733047, + -0.01883271336555481, + -0.02981610968708992, + -0.02586321532726288, + -0.00045911208144389093, + -0.03322312608361244, + 0.022907957434654236, + -0.024658523499965668, + -0.0046446495689451694, + -0.03060668706893921, + 0.00963282398879528, + 0.0039175995625555515, + -0.024658523499965668, + 0.012319850735366344, + -0.03397605940699577, + -0.00930341612547636, + 0.0003829365305136889, + -0.025769099593162537, + -0.0051858192309737206, + 0.04630532115697861, + -0.006437568925321102, + 0.028762003406882286, + -0.001977622974663973, + -0.02251266874372959, + 0.02893141284584999, + -0.0034917222801595926, + -0.0038964233826845884, + -0.016300978139042854, + -0.042126547545194626, + -0.020460927858948708, + -0.0036281913053244352, + -0.020818570628762245, + -0.01039046235382557, + 0.0026799675542861223, + 0.003079962683841586, + -0.02759495936334133, + -0.042578306049108505, + 0.007595201954245567, + 0.00626815902069211, + 0.00591051671653986, + -0.019952699542045593, + -0.03211254999041557, + 0.0055387564934790134, + 0.03036198392510414, + 0.014465706422924995, + 0.06750036031007767, + 0.013129252940416336, + 0.017091557383537292, + 0.012206911109387875, + 0.005948163103312254, + -0.0015870395582169294, + 0.025787921622395515, + 0.014164534397423267, + -0.006211689207702875, + 0.01815507374703884, + 0.007294028997421265, + 0.02418794110417366, + 0.026145564392209053, + 0.013562188483774662, + -0.0016717443941161036, + -0.003785836510360241, + 0.004075244534760714, + -0.023830298334360123, + -0.011745739728212357, + 0.0015635103918612003, + -0.00728932349011302, + 0.007359910756349564, + 0.00047970007290132344, + -0.00015352755144704133, + -0.01826801337301731, + 0.035180751234292984, + 8.205782796721905e-05, + -0.0278396625071764, + 0.008823422715067863, + 0.00886106863617897, + 0.013675128109753132, + -0.03597132861614227, + -0.02221149578690529, + -0.0038587767630815506, + -0.006009338889271021, + -0.016169216483831406, + -0.0009811645140871406, + -0.011792798526585102, + 0.007279911544173956, + -0.031321972608566284, + -0.03691249340772629, + 0.05929339677095413, + -0.03367488458752632, + 0.004898764193058014, + 0.0005711695412173867, + -0.008715188130736351, + 0.024018531665205956, + -0.001499981852248311, + 0.005096408538520336, + -0.011613977141678333, + 0.00040999503107741475, + -0.0018576245056465268, + 0.015472753904759884, + 0.01326101552695036, + 0.017750373110175133, + -0.01649862341582775, + -0.008969303220510483, + 0.04227713495492935, + 0.01153868343681097, + -0.026107918471097946, + 0.007712847553193569, + -0.008065784350037575, + -0.031961966305971146, + -0.014098652638494968, + 0.07446497678756714, + -0.0528181828558445, + -0.02851730026304722, + -0.05044644698500633, + 0.031058447435498238, + -0.018795065581798553, + 0.009750469587743282, + 0.05865340679883957, + 0.006992856506258249, + 0.02917611598968506, + 0.002303501358255744, + 0.027971426025032997, + -0.02859259396791458, + -0.03873835504055023, + -0.0009611648274585605, + 0.010851632803678513, + 0.001697626430541277, + 0.00626815902069211, + 0.024225588887929916, + 0.004287006799131632, + -0.0006305805873125792, + 0.06418745964765549, + 0.020893864333629608, + -0.04227713495492935, + -0.04408417269587517, + -0.005228172056376934, + 0.01892682909965515, + -0.0252796933054924, + -0.05692166090011597, + -0.013402190059423447, + -0.009430473670363426, + 0.026427915319800377, + -0.018249189481139183, + 0.01308219414204359, + 0.025580866262316704, + 0.0468323715031147, + -0.027670253068208694, + -0.019406823441386223, + 0.006470509804785252, + -0.033543121069669724, + 0.018465658649802208, + -0.034973692148923874, + -0.013957478106021881, + -0.010117524303495884, + 0.021402092650532722, + -0.03593368083238602, + -0.0001368365774396807, + 0.03922775760293007, + -0.004310535732656717, + 0.02927023358643055, + -0.03260195627808571, + -0.011265745386481285, + 0.006512862164527178, + 0.03533133491873741, + -0.02573145180940628, + 0.02239972911775112, + 0.011021043173968792, + -0.03427723050117493, + 0.028122011572122574, + -0.024112649261951447, + 0.01579274982213974, + 0.011021043173968792, + 0.0009982232004404068, + -0.03604662045836449, + 0.03542545437812805, + -0.014531588181853294, + -0.006912857294082642, + -0.02913847006857395, + 0.02928905561566353, + -0.005830517504364252, + 0.013891596347093582, + 0.003642308758571744, + -0.0519523099064827, + -0.015397460199892521, + 0.03768424689769745, + -0.0005182290333323181, + -0.011341039091348648, + 0.001334101427346468, + -0.0488276444375515, + -0.0016458623576909304, + 0.005618755239993334, + -0.04916646331548691, + -0.023340893909335136, + 0.010635165497660637, + -0.004009363241493702, + 0.004759942181408405, + -0.02915729396045208, + 0.022832663729786873, + -0.05037115514278412, + -0.028630241751670837, + 0.010286933742463589, + 0.008941068314015865, + 0.007971667684614658, + -0.076234370470047, + -0.025260869413614273, + -0.027256140485405922, + 0.01551039982587099, + 0.024131471291184425, + -0.009637529961764812, + 0.004795236047357321, + 0.057147540152072906, + 0.029759639874100685, + 0.004025833681225777, + 0.0208562184125185, + 0.03678072988986969, + 0.02682320401072502, + -0.022060908377170563, + 0.014484530314803123, + -0.022155025973916054, + 0.0011535154189914465, + 0.019952699542045593, + 0.007966961711645126, + 0.0038093654438853264, + -0.026013802736997604, + 0.04265360161662102, + 0.05022056773304939, + 0.019133886322379112, + 0.02704908326268196, + -0.02759495936334133, + 0.03757130727171898, + -0.036479558795690536, + -0.05846517160534859, + -0.010173994116485119, + 0.023547949269413948, + 0.0028258480597287416, + 0.025430278852581978, + 0.017524493858218193, + -0.009703411720693111, + 0.031660791486501694, + -0.006550508551299572, + 0.008286958560347557, + 0.041900668293237686, + -0.0026164387818425894, + 0.0011770445853471756, + -0.03574544936418533, + -0.013750421814620495, + 0.027086731046438217, + 0.02859259396791458, + 0.022889133542776108, + 0.026352621614933014, + -0.013458659872412682, + 0.002004681620746851, + -0.03002316504716873, + -0.031434912234544754, + -0.014286885038018227, + -0.007581084500998259, + 0.029025530442595482, + -0.0024046767503023148, + -0.014964524656534195, + -0.0045881797559559345, + 0.010164582170546055, + 0.028442008420825005, + -0.020573867484927177, + -0.014202180318534374, + 0.011736327782273293, + -0.0010682223364710808, + -0.0017140968702733517, + 0.015228050760924816, + -0.006056397221982479, + -0.008724600076675415, + 0.032846659421920776, + 0.0015129228122532368, + 0.012959842570126057, + -0.031660791486501694, + -0.038248948752880096, + -0.025110283866524696, + 3.0900358979124576e-05, + 0.007218735758215189, + -0.013646893203258514, + -0.01491746585816145, + -0.04525121673941612, + -0.0014611587394028902, + -0.01160456519573927, + 0.039039526134729385, + 0.010079877451062202, + -0.020235048606991768, + 0.014108064584434032, + -0.0278396625071764, + -0.0574110671877861, + -0.012103382498025894, + 0.028084365651011467, + 0.012348085641860962, + 0.003661131951957941, + -0.003383488394320011, + 0.02439499832689762, + 0.026653794571757317, + 0.005755224265158176, + -0.0008858715882524848, + -0.011877503246068954, + -0.027689075097441673, + 0.01231043878942728, + 0.029571406543254852, + -0.0009823410073295236, + -0.022155025973916054, + 0.004522297997027636, + -0.030870214104652405, + 0.005614049732685089, + -0.038154833018779755, + -0.010522224940359592, + 0.009232829324901104, + 0.008771657943725586, + 0.01352454163134098, + -0.05089820548892021, + -0.002269384218379855, + 0.023943239822983742, + 0.03975481167435646, + -0.0059152222238481045, + 0.023020897060632706, + 0.005491698160767555, + 0.020743276923894882, + -0.002447029110044241, + 0.015124522149562836, + 0.00728932349011302, + -0.007430498022586107, + -0.01164221204817295, + 0.055716972798109055, + 0.004661120008677244, + -0.001054104883223772, + 0.015275108627974987, + 0.005929339677095413, + -0.005406993441283703, + 0.017957428470253944, + 0.0009623412624932826, + 0.019387999549508095, + 0.013204545713961124, + -0.005157584324479103, + 0.015388048253953457, + 0.029778461903333664, + 0.004708178341388702, + -0.0257126297801733, + -0.040357157588005066, + -0.04747236520051956, + -0.006842270027846098, + 0.02386794611811638, + -0.01436217874288559, + -0.03137844428420067, + 0.027011437341570854, + 0.007458732929080725, + -0.050822913646698, + 0.025994978845119476, + -0.02373618260025978, + -0.029458466917276382, + -0.019689172506332397, + 0.006277570966631174, + -0.0033929001074284315, + -0.03390076383948326, + 0.02166561968624592, + 0.009082242846488953, + 0.009609295055270195, + -0.006625801790505648, + -0.010446932166814804, + 0.027463195845484734, + -0.012912784703075886, + -0.013825714588165283, + -0.032752543687820435, + -0.01601862907409668, + 0.011924561113119125, + -0.019228002056479454, + -0.007326969876885414, + -0.01599980518221855, + 0.007995197549462318, + -0.036178383976221085, + 0.048639409244060516, + -0.0004517592315096408, + 0.005228172056376934, + -0.03250784054398537, + 0.001392924226820469, + -0.009195182472467422, + 0.014823349192738533, + -0.024432644248008728, + 0.012319850735366344, + 0.012103382498025894, + -0.00433406513184309, + -0.013279838487505913, + -0.03791012987494469, + 0.008296369574964046, + -0.030211398378014565, + -0.013006901368498802, + -0.03702543303370476, + 0.01944446936249733, + -0.018748007714748383, + 0.018428010866045952, + 0.005646990146487951, + -0.023058542981743813, + -0.022173848003149033, + -0.016235096380114555, + -0.019199766218662262, + 0.03333606570959091, + 0.028554948046803474, + 0.015378637239336967, + 0.007101090159267187, + 0.027783192694187164, + -0.0023764418438076973, + 0.0437077060341835, + -0.029514936730265617, + 0.035086631774902344, + 0.004284653812646866, + -0.02253149077296257, + -0.04325594753026962, + -0.029082000255584717, + 0.01546334195882082, + 0.006846975535154343, + 0.013185722753405571, + 0.002750554820522666, + -0.004992880392819643, + -0.020272694528102875, + -0.029966695234179497, + 0.03501133993268013, + -0.01917153224349022, + 0.014042182825505733, + -0.009604589082300663, + -0.007176383398473263, + -0.01867271400988102, + -0.035161927342414856, + 0.006169336847960949, + -0.05613108351826668, + -0.0041387733072042465, + -0.040018338710069656, + -0.02162797376513481, + 0.012828079983592033, + -0.008865774609148502, + -0.03235725313425064, + -0.013166898861527443, + 0.001983505440875888, + 0.009872821159660816, + 0.029966695234179497, + 0.004508180543780327, + -0.019519763067364693, + 0.002795260166749358, + -0.0029246704652905464, + -0.01579274982213974, + 0.010126936249434948, + 0.025336163118481636, + -0.018465658649802208, + -0.019482117146253586, + -0.007449321448802948, + 0.009355180896818638, + -0.021816205233335495, + 0.01440923660993576, + 0.02861141785979271, + 0.03941599279642105, + -0.01076692808419466, + -0.01447511836886406, + 0.014051593840122223, + -0.02672908827662468, + 0.00186350685544312, + -0.0151339340955019, + -0.008301075547933578, + 0.030776096507906914, + 0.02407500147819519, + 0.019933875650167465, + -0.013421013951301575, + 0.02938317321240902, + -0.010136347264051437, + 0.028103187680244446, + -0.0151339340955019, + 0.010371638461947441, + 0.03636661916971207, + -0.020611515268683434, + -0.029759639874100685, + -0.00773167097941041, + -0.012225734069943428, + 0.01286572590470314, + -0.022380905225872993, + -0.005086997058242559, + 0.0031223150435835123, + 0.005242289509624243, + -0.010013995692133904, + -0.03956658020615578, + 0.003967010881751776, + 0.01696920581161976, + 0.005938751623034477, + 0.012479848228394985, + 0.047886479645967484, + 0.0014423354296013713, + -0.03124667890369892, + 0.02917611598968506, + -0.011736327782273293, + 0.018823301419615746, + -0.014013947919011116, + -0.0012505730846896768, + 0.01039046235382557, + -0.011661035008728504, + -0.02748201973736286, + -0.006541097071021795, + 0.032526664435863495, + 0.007891668938100338, + -0.01645156554877758, + 0.006846975535154343, + -0.006009338889271021, + 0.0024658525362610817, + -0.014126887544989586, + -0.018757419660687447, + 0.005872869864106178, + -0.013458659872412682, + 0.0037528956308960915, + -0.018183309584856033, + -0.002127032959833741, + -0.0003605838574003428, + 0.011058689095079899, + 0.028234951198101044, + 0.0063575697131454945, + -0.03821130096912384, + -0.018588010221719742, + -0.02836671471595764, + 0.022117378190159798, + -0.002529381075873971, + -0.0278396625071764, + 0.00411759689450264, + -0.014371590688824654, + 0.005298759322613478, + -0.016573917120695114, + 0.017891546711325645, + -0.012733963318169117, + 0.03260195627808571, + -0.017251554876565933, + 0.012564553879201412, + -0.019482117146253586, + -0.0013893948635086417, + 0.01473864447325468, + -0.034728989005088806, + -0.006771682761609554, + -0.00043440648005343974, + -0.04559003561735153, + 0.007759905885905027, + -0.022475020959973335, + -0.03382547199726105, + -0.03403252735733986, + 0.04811235889792442, + -0.012169264256954193, + 0.029100824147462845, + -0.030211398378014565, + 0.024903226643800735, + 0.011623388156294823, + 0.013402190059423447, + 0.01054104883223772, + -0.027651429176330566, + 0.01490805484354496, + 0.0052517009899020195, + -0.032093729823827744, + -0.00888459850102663, + -0.0017952723428606987, + 0.030757274478673935, + 0.01226338092237711, + -0.0030070224311202765, + -0.009218711405992508, + 0.018917417153716087, + 0.020159754902124405, + -0.005204642657190561, + 0.0017164497403427958, + -0.0003152902936562896, + 0.020950334146618843, + -0.014192769303917885, + -0.004595238249748945, + -0.01933152973651886, + 0.004091714974492788, + -0.0088140107691288, + -0.022060908377170563, + -0.005957574583590031, + 0.006644625216722488, + 0.05620637536048889, + 0.009985760785639286, + -0.016592739149928093, + -0.006286982446908951, + -0.007910491898655891, + -0.02142091654241085, + -0.02836671471595764, + 0.04016892611980438, + 0.006992856506258249, + 0.018870359286665916, + 0.014700998552143574, + 0.00620698370039463, + -0.022682078182697296, + -0.01076692808419466, + 0.01599980518221855, + -0.016329213976860046, + 0.042578306049108505, + 0.03359959274530411, + -0.015011582523584366, + -0.025204399600625038, + 0.03713837265968323, + 0.01440923660993576, + 0.020291518419981003, + -0.030870214104652405, + -0.009162241593003273, + 0.02375500649213791, + 0.004183478653430939, + 0.016489211469888687, + 0.012451613321900368, + 0.022663254290819168, + -0.0076940241269767284, + -0.010268110781908035, + -0.026013802736997604, + -0.015218638814985752, + 0.00679521169513464, + 0.001737625920213759, + 0.0009029302163980901, + -0.0018552716355770826, + -0.016460977494716644, + -0.020611515268683434, + -0.006239924114197493, + 0.041486553847789764, + -0.006602272856980562, + -0.013063371181488037, + -0.009844586253166199, + 0.025411456823349, + -0.00021690913126803935, + -0.02949611283838749, + 0.006828152574598789, + -0.017100969329476357, + -0.0005129349301569164, + -0.009675176814198494, + 0.012978666462004185, + 0.00178115488961339, + 0.019613878801465034, + -0.022343257442116737, + -0.003357606241479516, + -0.008992832154035568, + 0.004482298623770475, + 0.014343355782330036, + 0.024037355557084084, + 0.015783337876200676, + 0.03548192232847214, + -0.04016892611980438, + 0.0005161702283658087, + -0.01892682909965515, + 0.027124376967549324, + -0.005562285427004099, + 0.002487028716132045, + -0.016319802030920982, + -0.01608451083302498, + -0.02936434932053089, + 0.014371590688824654, + 0.007444615475833416, + -0.0024187942035496235, + -0.01485158409923315, + 0.0012176323216408491, + -0.019115062430500984, + -0.00027073200908489525, + 0.009844586253166199, + 0.0041928901337087154, + 0.025223223492503166, + 0.004769354127347469, + -0.02230561152100563, + 0.003999951295554638, + -0.02573145180940628, + 0.007435203995555639, + -0.02430088073015213, + 0.004475239664316177, + -0.00618816027417779, + -0.007223441731184721, + -0.006955209653824568, + -0.0150680523365736, + 0.006602272856980562, + 0.05146290361881256, + 0.023227954283356667, + 0.019745642319321632, + -0.04427240416407585, + -0.001821154379285872, + -0.02262560836970806, + -0.00094175327103585, + 0.012997489422559738, + 0.0023976180236786604, + 0.01120927557349205, + -0.030399631708860397, + -0.0025576159823685884, + -0.0224185511469841, + 0.0027787897270172834, + -0.0171950850635767, + -0.001622333307750523, + 0.027783192694187164, + 0.014381001703441143, + 0.0063622756861150265, + 0.008602248504757881, + 0.0229832511395216, + -0.02430088073015213, + -0.022682078182697296, + -0.0208562184125185, + 0.04363241046667099, + 0.02913847006857395, + 0.013778656721115112, + -0.02561851218342781, + 0.01917153224349022, + -0.00994811486452818, + -0.04122303053736687, + -0.004661120008677244, + -0.0009458708809688687, + -0.019162120297551155, + 0.011256334371864796, + -0.03294077515602112, + -0.00955282524228096, + 0.017373906448483467, + 0.018164485692977905, + -0.026578500866889954, + 0.0020987980533391237, + -0.02618321217596531, + -0.0024187942035496235, + -0.0038752472028136253, + 0.01878565363585949, + -0.005623461212962866, + -0.008061078377068043, + -0.0010835162829607725, + 0.02684202790260315, + -0.022907957434654236, + 0.0005523462314158678, + 0.006164630874991417, + -0.03580191731452942, + -0.0071999127976596355, + -0.02748201973736286, + -0.01060693059116602, + -0.006879916414618492, + 0.0027576135471463203, + 0.006437568925321102, + 0.02913847006857395, + -0.043670058250427246, + 0.0034517229069024324, + -0.03907717391848564, + 0.005392875522375107, + -0.011962207965552807, + -0.022663254290819168, + 0.010296345688402653, + -0.015284520573914051, + -0.035613685846328735, + -0.007166971918195486, + 0.031510207802057266, + 0.008752834983170033, + -0.015849219635128975, + 0.010183406062424183, + -0.002245855052024126, + 0.0065316855907440186, + 0.02759495936334133, + -0.010861044749617577, + -0.017091557383537292, + -0.02253149077296257, + 0.006738741882145405, + -0.024244410917162895, + 0.04705825075507164, + -0.005110526457428932, + -0.002109386259689927, + 0.0114257438108325, + -0.014315120875835419, + 0.015764513984322548, + -0.017543315887451172, + -0.0023129130713641644, + 0.04649355262517929, + -0.04924175515770912, + 0.017100969329476357, + 0.004124655853956938, + -0.022776193916797638, + -0.012912784703075886, + 0.006399922538548708, + 0.03632897138595581, + -0.0003720543172676116, + 0.020027991384267807, + 0.01989622972905636, + -0.020686807110905647, + 0.00038352474803104997, + -0.0036752496380358934, + -0.01182103343307972, + -0.0017070381436496973, + 0.0025811451487243176, + -0.006404628045856953, + 0.04250301420688629, + -0.004369358532130718, + 0.02462087757885456, + -0.005505815614014864, + 0.01329866237938404, + -0.04107244312763214, + -0.01198103092610836, + 0.020385634154081345, + -0.0004488180857151747, + -0.008404604159295559, + -0.003929364029318094, + -0.021458562463521957, + 0.0034681931138038635, + -0.011529271490871906, + 0.02230561152100563, + 0.0005902869743295014, + -0.024357352405786514, + 0.00035705449408851564, + -0.01164221204817295, + -0.00101410539355129, + 0.01638568378984928, + 0.02586321532726288, + 0.027877308428287506, + -0.0039811283349990845, + 0.010569283738732338, + 0.006089338101446629, + 0.026107918471097946, + -0.006842270027846098, + 0.022926781326532364, + 0.004917587619274855, + 0.0006394039955921471, + -0.012545729987323284, + -0.0102116409689188, + -0.013223368674516678, + 0.004324653185904026, + -0.030757274478673935, + -0.007915197871625423, + 0.034521933645009995, + 0.032639604061841965, + -0.006258747540414333, + -0.009985760785639286, + 0.012018677778542042, + 0.004515239503234625, + -0.02751966565847397, + 0.06121337413787842, + -0.015849219635128975, + -0.014653939753770828, + -0.04419711232185364, + 0.01640450768172741, + -0.006108161062002182, + 0.02087504044175148, + 0.018842123448848724, + 0.01153868343681097, + -0.025336163118481636, + 0.005402287468314171, + -0.014286885038018227, + -0.03608426824212074, + -0.040470097213983536, + -0.02076210081577301, + 0.02586321532726288, + -0.017119793221354485, + -0.022343257442116737, + 0.029420819133520126, + -0.021063273772597313, + -0.013901007361710072, + -0.00789637491106987, + -0.015369225293397903, + -0.020159754902124405, + 0.013665716163814068, + -0.04464887082576752, + ], + "index": 43, + }, + { + "title": "Menora Mivtachim Arena", + "text": "Menora Mivtachim Arena (Hebrew: \u05d4\u05d9\u05db\u05dc \u05de\u05e0\u05d5\u05e8\u05d4 \u05de\u05d1\u05d8\u05d7\u05d9\u05dd\u200e) is a large multi-purpose sports arena in southern Tel Aviv, Israel. It is one of the major sporting facilities in the Greater Tel Aviv Area.The arena is home to the Maccabi Tel Aviv basketball club, a member of the Maccabi Tel Aviv sports club. It hosted the Israeli Super League final four, the State Cup final four and most of the Israeli national basketball team home games.", + "vector": [ + 0.05847686529159546, + 0.007657866925001144, + -0.021507851779460907, + 0.013256796635687351, + -0.0230539683252573, + 0.04788367450237274, + -0.020283205434679985, + 0.0104936882853508, + -0.00013119503273628652, + 0.015859169885516167, + -0.043444328010082245, + -0.030294690281152725, + -0.02092614397406578, + 0.0645388662815094, + 0.019288180395960808, + -0.01665518991649151, + 0.0025985464453697205, + -0.033340997993946075, + -0.01246077660471201, + -0.04234214872121811, + -0.003113280748948455, + 0.002495216904208064, + -0.007332569919526577, + 0.013203218579292297, + -0.014006893150508404, + -0.00342900981195271, + -0.03765787556767464, + -0.0007362229516729712, + -0.007347878068685532, + 0.02962113358080387, + -0.006345198955386877, + 0.016349028795957565, + 0.036494459956884384, + -0.042495228350162506, + -0.012996559962630272, + 0.05027173459529877, + -0.02141600288450718, + 0.019089175388216972, + -0.05272102728486061, + 0.055200934410095215, + 0.0023574442602694035, + -0.0472407341003418, + -0.01349407248198986, + -0.01705319993197918, + 0.012116344645619392, + -0.004293916281312704, + -0.01070800144225359, + 0.001680061686784029, + -0.00852659996598959, + -0.05057789385318756, + 0.003809798276051879, + -0.03891313821077347, + -0.00019924422667827457, + 0.004986607003957033, + 0.022594725713133812, + 0.0029774215072393417, + 0.008771529421210289, + 0.08401074260473251, + 0.024615392088890076, + 0.03346346318721771, + -0.018216615542769432, + 0.03171833977103233, + -0.0031228482257574797, + 0.01246077660471201, + 0.018446234986186028, + 0.04623040184378624, + 0.00037935335421934724, + 0.008748567663133144, + 0.006046691443771124, + 0.007860698737204075, + 0.0011098358081653714, + 0.015093766152858734, + -0.07549944519996643, + -0.04782244190573692, + -0.015185615047812462, + -0.027217766270041466, + 0.04313816875219345, + 0.05281287431716919, + -0.034198250621557236, + 0.016027558594942093, + 0.02309989184141159, + -0.007271337788552046, + -0.01665518991649151, + 0.025610417127609253, + 0.024952169507741928, + -0.0071565271355211735, + -0.009123614989221096, + -0.061660945415496826, + -0.03882129117846489, + 0.021538468077778816, + 0.013784925453364849, + -0.044332198798656464, + -0.08835823833942413, + 0.08584771305322647, + 0.011121319606900215, + 0.025855345651507378, + -0.024079609662294388, + -0.00913126952946186, + 0.001233257120475173, + 0.06313052028417587, + -0.03713740035891533, + 0.015522392466664314, + -0.015859169885516167, + 0.018048224970698357, + 0.05486415699124336, + 0.02577880583703518, + -0.0236203670501709, + 0.01751244254410267, + -0.009284350089728832, + -0.024753164499998093, + 0.017145048826932907, + -0.02877919003367424, + 0.0505472794175148, + 0.008687335066497326, + -0.007749715354293585, + 0.00565633550286293, + -0.048618461936712265, + -0.025120558217167854, + -0.056425582617521286, + 0.03487180545926094, + -0.04828168451786041, + -0.04812860116362572, + -0.05011865124106407, + -0.011182552203536034, + -0.014450826682150364, + -0.012652128003537655, + 0.008626102469861507, + 0.01482587493956089, + 0.06637583673000336, + 0.029054734855890274, + 0.024722548201680183, + -0.011167244054377079, + 0.018078841269016266, + -0.06466133147478104, + 0.011021817103028297, + 0.01181783713400364, + -0.016869504004716873, + -0.020359745249152184, + -0.0031037130393087864, + -0.014129357412457466, + 0.02143131196498871, + -0.0023765794467180967, + -0.046934571117162704, + 0.02743207849562168, + -0.014940685592591763, + 0.010975892655551434, + -0.046016085892915726, + -0.003612706670537591, + -0.03986223787069321, + 0.015024879947304726, + 0.03652507811784744, + 0.0032127832528203726, + 0.020665908232331276, + 0.024293921887874603, + 0.010363569483160973, + 0.009115961380302906, + -0.0274167712777853, + 0.021890554577112198, + -0.015407581813633442, + 0.04047456383705139, + -0.016854194924235344, + -0.03977039083838463, + 0.0011012250324711204, + -0.010095678269863129, + -0.0027363193221390247, + -0.02928435616195202, + -0.040290866047143936, + 0.030355921015143394, + 0.004179105628281832, + 0.028075017035007477, + -0.018874861299991608, + 0.031259097158908844, + -0.030218148604035378, + -0.034228865057229996, + -0.0452812984585762, + 0.001076349290087819, + -0.0026789139956235886, + -0.016318412497639656, + 0.0003556736628524959, + 0.013509380631148815, + 0.003231918206438422, + -0.06919252127408981, + -0.018476851284503937, + 0.025151174515485764, + -0.023222357034683228, + -0.009758900851011276, + 0.002456946764141321, + -0.10850366950035095, + -0.010348262265324593, + -0.01266743615269661, + 0.03444317728281021, + 0.010156910866498947, + 0.08094912767410278, + -0.005269806366413832, + 0.03848451375961304, + -0.01875239796936512, + 0.05008803680539131, + 0.01371603924781084, + 0.037688493728637695, + -0.062181420624256134, + 0.015996942296624184, + 0.046505946666002274, + -0.019992351531982422, + 0.025885961949825287, + 0.009337928146123886, + 0.03278990462422371, + -0.04053579643368721, + -0.012613857164978981, + -0.01350172609090805, + 0.01700727641582489, + 0.021967094391584396, + -0.004071949049830437, + 0.000710868916939944, + 0.004642175044864416, + 0.027187149971723557, + 0.03364715725183487, + -0.031182557344436646, + -0.026850370690226555, + -0.03526981547474861, + 0.016058174893260002, + -0.01618064008653164, + 0.011366249062120914, + -0.029054734855890274, + 0.0035495609045028687, + -0.030294690281152725, + -0.008549562655389309, + 0.005082282237708569, + 0.03364715725183487, + -0.0214006956666708, + 0.020160740241408348, + -0.061722178012132645, + -0.010363569483160973, + -0.021951785311102867, + -0.007057024631649256, + 0.03879067301750183, + -0.004117873497307301, + 0.03456564247608185, + -0.024646008387207985, + 0.0030309997964650393, + 0.020696524530649185, + -0.03885190561413765, + 0.04782244190573692, + -0.056027572602033615, + -0.019869888201355934, + 0.010562574490904808, + -0.014741680584847927, + -0.00731726223602891, + 0.0373823307454586, + -0.027278997004032135, + -0.02573288232088089, + -0.0037523929495364428, + -0.027814781293272972, + 0.00919250212609768, + 0.03845389559864998, + 0.00955989584326744, + 0.03909683600068092, + 0.030294690281152725, + -0.022334488108754158, + -0.017956377938389778, + 0.061262935400009155, + -0.00699961930513382, + 0.0024320711381733418, + -0.015874478965997696, + 0.022839654237031937, + -0.01608879119157791, + 0.051251448690891266, + -0.05896672233939171, + 0.01792576164007187, + -0.02833525463938713, + -0.011764259077608585, + -0.020329128950834274, + -0.03233066573739052, + 0.02790662832558155, + 0.006004594266414642, + 0.03214696794748306, + 0.031595874577760696, + -0.039954088628292084, + 0.05676236003637314, + 0.013517034240067005, + -0.06539611518383026, + 0.046077318489551544, + -0.01200153399258852, + 0.06239573284983635, + -0.03713740035891533, + -0.020145433023571968, + 0.056884825229644775, + 0.046475328505039215, + 0.001914466731250286, + -0.0056946054100990295, + -0.07905092090368271, + -0.01396096870303154, + -0.0028645244892686605, + 0.022120175883173943, + -0.008105628192424774, + 0.032085735350847244, + -0.010317645967006683, + 0.0017575589008629322, + -0.00676617119461298, + -0.010608498938381672, + 0.006926905829459429, + -0.037749722599983215, + 0.006528895813971758, + -0.02394183725118637, + -0.05244548246264458, + 0.02406430058181286, + -0.0025507088284939528, + -0.007696136832237244, + 0.08578647673130035, + -0.021140458062291145, + 0.016058174893260002, + 0.004554153885692358, + -0.04494452103972435, + -0.030355921015143394, + -0.015767322853207588, + -0.039127450436353683, + 0.008985842578113079, + -0.028473028913140297, + -0.03802527114748955, + -0.0009883278980851173, + 0.0055874488316476345, + 0.05021050199866295, + 0.031151941046118736, + 0.018094150349497795, + -0.004668964073061943, + 0.0017537318635731936, + -0.04111750051379204, + -0.0010983546962961555, + -0.049077704548835754, + 0.03321853280067444, + 0.009911981411278248, + -0.025105250999331474, + 0.00916188582777977, + -0.02570226602256298, + 0.02011481672525406, + 0.009651743806898594, + -0.0232070479542017, + 0.014565637335181236, + -0.025181790813803673, + -0.06839650124311447, + 0.038178350776433945, + -7.138289220165461e-06, + -0.024998094886541367, + 0.00392269529402256, + 0.02262534201145172, + -0.03499427065253258, + -0.036402612924575806, + -0.03967854380607605, + 0.008863378316164017, + -0.0038346739020198584, + 0.0003949006204493344, + 0.0007218716200441122, + -0.0046230400912463665, + -0.006069653667509556, + 0.051220834255218506, + 0.04010716825723648, + -0.03833143040537834, + -0.030738623812794685, + -0.040780723094940186, + -0.00229238485917449, + -0.005618065129965544, + 0.014573291875422001, + -0.02045159414410591, + -0.013685422949492931, + 0.021461928263306618, + -0.007810947485268116, + -0.006096442695707083, + -0.022058943286538124, + 0.031106017529964447, + -0.019992351531982422, + -0.019395336508750916, + 0.010830466635525227, + -0.004527364391833544, + 0.005051666405051947, + 0.10317645967006683, + 0.037780340760946274, + -0.05924226716160774, + -0.013111370615661144, + -0.013333337381482124, + 0.031243789941072464, + -0.0018302722601220012, + -0.02747800201177597, + 0.03530042991042137, + 0.0007917147595435381, + 0.01616533286869526, + 0.020711831748485565, + -0.007275164593011141, + 0.06163032725453377, + -0.012185231782495975, + -0.033402230590581894, + 0.009337928146123886, + 0.00097732525318861, + -0.0231305081397295, + 0.004221202805638313, + 0.01046307198703289, + 0.012590895406901836, + 0.0037504795473068953, + -0.00775354215875268, + -0.003277842653915286, + 0.007619596552103758, + -0.0434749461710453, + 0.003893992630764842, + -0.02141600288450718, + 0.011121319606900215, + -0.011044779792428017, + 0.016364337876439095, + -0.02175278030335903, + -0.015981635078787804, + -0.027324922382831573, + -0.019839271903038025, + -0.06417147070169449, + -0.006008421070873737, + -0.03263682499527931, + -0.03698432072997093, + -0.01353234238922596, + -0.02917720004916191, + -0.0007496175239793956, + 0.043015703558921814, + 0.0006946041248738766, + -0.01792576164007187, + -0.006636052392423153, + 0.007990817539393902, + 0.007730580400675535, + -0.003926522564142942, + 0.007677001878619194, + 0.00033366828574799, + 0.037535410374403, + -0.05140453204512596, + 0.013647153042256832, + 0.008419443853199482, + 0.024936862289905548, + 0.04828168451786041, + -0.05017988383769989, + -0.015782630071043968, + -0.043872956186532974, + 0.04812860116362572, + -0.012047458440065384, + -0.0011930734617635608, + 0.0287332646548748, + 0.001491580973379314, + 0.02054344303905964, + 0.03533104807138443, + -0.00031309807673096657, + -0.011419827118515968, + 0.03487180545926094, + -0.01198622677475214, + -0.049536947160959244, + 0.013739001005887985, + -0.003295064205303788, + 0.02130884677171707, + -0.004852661397308111, + 0.0235438272356987, + -0.022502876818180084, + -0.035912755876779556, + 0.014297746121883392, + -0.011932647787034512, + 0.016471493989229202, + 0.01783391274511814, + 0.014986610040068626, + 0.0083122868090868, + 0.03386147320270538, + -0.03977039083838463, + -0.005480292718857527, + -0.003888252191245556, + -0.01616533286869526, + -0.011335632763803005, + 0.008687335066497326, + -0.007458861917257309, + 0.007776504382491112, + -0.002303865971043706, + -0.022793730720877647, + 0.020803680643439293, + 0.016379645094275475, + -0.02490624599158764, + 0.022854963317513466, + -0.01927287131547928, + -0.022380411624908447, + -0.010478380136191845, + -0.06150786206126213, + 0.02230387181043625, + 0.009322620928287506, + 0.004760812968015671, + -0.021951785311102867, + -0.002747800201177597, + 0.012315349653363228, + 0.05716037005186081, + 0.023268280550837517, + -0.023804062977433205, + -0.03698432072997093, + -0.04794490709900856, + 0.00985074881464243, + 0.07053963094949722, + 0.0232070479542017, + -0.04313816875219345, + 0.020206665620207787, + -0.027171840891242027, + -0.030340613797307014, + -0.016027558594942093, + -0.0452812984585762, + -0.0191810242831707, + 0.013983930461108685, + -0.013394569978117943, + 0.009536933153867722, + 0.032055117189884186, + 0.018048224970698357, + -0.021982401609420776, + -0.012736322358250618, + -0.036004602909088135, + 0.049904339015483856, + -0.030723316594958305, + 0.021125148981809616, + 0.027156533673405647, + 0.035514745861291885, + -0.005078455433249474, + -0.017986994236707687, + 0.015905095264315605, + 0.012016842141747475, + -0.00046378697152249515, + -0.014068124815821648, + 0.026697291061282158, + -0.010646769776940346, + 0.01751244254410267, + 0.006371987983584404, + -0.02574818953871727, + 0.0076349047012627125, + 0.05030234903097153, + -0.0401684008538723, + -0.03707616776227951, + 0.008725604973733425, + 0.039525460451841354, + -0.07268276065587997, + 0.03612706810235977, + 0.021538468077778816, + -0.030692700296640396, + -0.013830849900841713, + 0.008021433837711811, + 0.015951018780469894, + -0.0083122868090868, + -0.03272867575287819, + 0.013853811658918858, + -0.009682360105216503, + -0.019854579120874405, + -0.03147341310977936, + 0.0021546122152358294, + 0.006528895813971758, + 0.015162653289735317, + 0.006276312749832869, + 0.01621125638484955, + -0.009246080182492733, + 0.038208965212106705, + 0.027340229600667953, + 0.011381557211279869, + 0.011412173509597778, + -0.017160357907414436, + 0.0054726386442780495, + -0.002556449268013239, + 0.00490241264924407, + 0.001691542798653245, + -0.034749340265989304, + -0.01569078117609024, + -0.008029087446630001, + 0.04665902629494667, + -0.030340613797307014, + 0.024584775790572166, + 0.05881364271044731, + 0.012843478471040726, + 0.002508611651137471, + -0.002990816021338105, + 0.04727134853601456, + -0.00740911066532135, + 0.006203599274158478, + -0.027263689786195755, + 0.017527751624584198, + 0.01066973153501749, + 0.032912369817495346, + -0.0009065253543667495, + -0.042127836495637894, + 0.004959817975759506, + -0.004883277229964733, + -0.038117118179798126, + 0.009253733791410923, + 0.011833145283162594, + -0.02228856459259987, + 0.042464613914489746, + 0.042954470962285995, + 0.03799465298652649, + -0.015147345140576363, + 0.02704937569797039, + -0.041239965707063675, + -0.03401455283164978, + -0.01697666011750698, + -0.017803296446800232, + -0.016762347891926765, + 0.023329513147473335, + -0.005373136140406132, + -0.028243407607078552, + 0.0073708402924239635, + -0.001554726855829358, + -0.004772293847054243, + 0.020788371562957764, + -0.01575201377272606, + 0.003930349368602037, + -0.001601607771590352, + -0.023237664252519608, + -0.01610410027205944, + -0.013585920445621014, + 0.00829697959125042, + -0.027202457189559937, + 0.05541524663567543, + -0.03845389559864998, + -0.009506317786872387, + 0.0022598551586270332, + 0.01622656360268593, + 0.00980482529848814, + 0.0076310778968036175, + -0.011917339637875557, + 0.012284734286367893, + 0.005319557618349791, + -0.003128588665276766, + 0.010149256326258183, + -0.06429393589496613, + 0.00870264321565628, + 0.011504021473228931, + 0.008672026917338371, + -0.03432071581482887, + 0.020359745249152184, + 0.007030235603451729, + 0.037351712584495544, + -0.045189451426267624, + -0.0017556453822180629, + 0.01875239796936512, + 0.020574059337377548, + -0.020665908232331276, + -0.015905095264315605, + -0.011703026480972767, + 0.01353234238922596, + -0.021461928263306618, + 0.024309230968356133, + -0.042464613914489746, + 0.04757751151919365, + -0.005629546474665403, + 0.01878301426768303, + 0.009399160742759705, + 0.0023478767834603786, + -0.01569078117609024, + 0.012897057458758354, + 0.008717951364815235, + -0.028228098526597023, + 0.01572139747440815, + -0.015874478965997696, + -0.005438195075839758, + 0.007217759732156992, + -0.03187142312526703, + 0.001343284035101533, + -0.0007118256762623787, + 0.041178733110427856, + 0.003277842653915286, + 0.00610409677028656, + 0.03921930119395256, + 0.011396865360438824, + -0.019563725218176842, + -0.0279831700026989, + 0.022594725713133812, + -0.044240351766347885, + -0.005464984569698572, + 0.012698052451014519, + -0.016915427520871162, + -0.02962113358080387, + 0.026865679770708084, + 0.006946041248738766, + -0.028932269662618637, + 0.011764259077608585, + 0.013631844893097878, + -0.014504405669867992, + 0.0012724840780720115, + 0.029391512274742126, + -0.004048986826092005, + -0.03181019052863121, + 0.06380407512187958, + -0.05024111643433571, + -0.028580185025930405, + 0.035086117684841156, + -0.013807888142764568, + -0.03787218779325485, + 0.005763492081314325, + -0.02698814496397972, + -0.0232070479542017, + 0.007588980253785849, + 0.03181019052863121, + -0.02089552953839302, + -0.016440877690911293, + 0.03141218051314354, + -0.045158833265304565, + -0.023804062977433205, + 0.01550708431750536, + -0.018461544066667557, + 0.005568313878029585, + 0.019334103912115097, + 0.00049033691175282, + 0.018936093896627426, + -0.07500959187746048, + -0.0031955617014318705, + 0.02833525463938713, + 0.006391123402863741, + 0.05670112743973732, + -0.04319940134882927, + 0.024783780798316002, + 0.00808266643434763, + -0.029513977468013763, + 0.005637200083583593, + 0.010945277288556099, + -0.006184464320540428, + -0.045189451426267624, + 0.035086117684841156, + 0.010531959123909473, + -0.037780340760946274, + -0.03762726113200188, + -0.013777271844446659, + 0.05094528943300247, + -0.018063534051179886, + 0.023819372057914734, + 0.03523920103907585, + 0.009659398347139359, + -0.004091084469109774, + -0.040352098643779755, + -0.036831241101026535, + 0.008365865796804428, + 0.023819372057914734, + 0.01613471657037735, + -0.0063031017780303955, + -0.0021278229542076588, + -0.03548412770032883, + 0.01178722083568573, + 0.012476084753870964, + 0.007830082438886166, + -0.017650214955210686, + 0.022594725713133812, + -0.03958669304847717, + 0.052996572107076645, + 0.011924994178116322, + -0.005047839134931564, + -0.003417528700083494, + 0.029850754886865616, + 0.00011899640230694786, + -0.037719108164310455, + 0.02094145305454731, + 0.014879452995955944, + 0.01375430915504694, + -0.01663988269865513, + -0.014519713819026947, + -0.0365556925535202, + -0.012499047443270683, + -0.013394569978117943, + 0.017956377938389778, + -0.016915427520871162, + 0.022334488108754158, + 0.024324538186192513, + 0.01706850901246071, + 0.05149637907743454, + -0.005591276101768017, + -0.008610794320702553, + 0.001024684519506991, + 0.024646008387207985, + 0.0010973979951813817, + -0.0309529360383749, + -0.025365488603711128, + -0.054251834750175476, + 0.0358821377158165, + -0.03621891513466835, + -0.007122084032744169, + -0.01835438795387745, + 0.010983547195792198, + 0.02000766061246395, + -0.027141224592924118, + 0.013218526728451252, + 0.0029104487039148808, + 0.013723693788051605, + -0.004236510954797268, + 0.013210873119533062, + -0.023758139461278915, + -0.003915041219443083, + -0.0314427949488163, + 0.01525450125336647, + -0.0169613528996706, + 0.03827019780874252, + -0.05048604682087898, + -0.020574059337377548, + 0.056058187037706375, + -0.015055496245622635, + 0.0014313054271042347, + 0.03970915824174881, + 0.03352469578385353, + 0.03450440987944603, + 0.0030156916473060846, + -0.04218906909227371, + -0.011151935905218124, + -0.02789132110774517, + 0.04880215600132942, + -0.0104936882853508, + 0.018109457567334175, + 0.010907006449997425, + -0.026942219585180283, + -0.006517414934933186, + 0.014940685592591763, + 0.03520858287811279, + -0.015338695608079433, + 0.03138156235218048, + 0.013830849900841713, + -0.038606975227594376, + -0.013126677833497524, + 0.02135477028787136, + -0.023865295574069023, + -0.010126294568181038, + 0.002146958140656352, + -0.0027573679108172655, + 0.01421355176717043, + 0.02046690322458744, + 0.01781860552728176, + -0.04013778641819954, + 0.028212791308760643, + -0.018461544066667557, + 0.0146115617826581, + 0.014466134831309319, + -0.005017223302274942, + 0.013915044255554676, + 0.00980482529848814, + -0.015231539495289326, + 0.009651743806898594, + -0.001801569596864283, + -0.006582474336028099, + -0.003580177202820778, + -0.028595492243766785, + -0.05991582199931145, + -0.03876005858182907, + 0.05795639008283615, + -0.012491392903029919, + 0.0007233067881315947, + -0.014588600024580956, + 0.043811723589897156, + 0.01913509890437126, + 0.04944509640336037, + 0.022839654237031937, + -0.028197482228279114, + 0.010501342825591564, + 0.006750863045454025, + 0.03061615861952305, + -0.007298126816749573, + 0.05244548246264458, + -0.03496365249156952, + 0.022441644221544266, + -0.03404516726732254, + 0.03168772533535957, + 0.029988527297973633, + 0.014381940476596355, + 0.03133564069867134, + 0.0033065450843423605, + -0.024799088016152382, + 0.010968239046633244, + 0.002303865971043706, + 0.058293167501688004, + -0.014091087505221367, + -0.008541908115148544, + -0.0016819752054288983, + -0.02352851815521717, + -0.035514745861291885, + -0.00144470005761832, + -0.008649065159261227, + 0.035943370312452316, + -0.025840038433670998, + -0.004883277229964733, + -0.011419827118515968, + -0.0008926523732952774, + 0.008932264521718025, + 0.008120936341583729, + 0.004910066723823547, + -0.0257634986191988, + 0.0006458096322603524, + 0.0209873765707016, + 0.0014954080106690526, + 0.025564493611454964, + -0.005893610417842865, + 0.026712598279118538, + 0.00044082486419938505, + -0.030417153611779213, + 0.032575592398643494, + -0.028243407607078552, + -0.010577882640063763, + -0.046536561101675034, + -0.0182778462767601, + -0.013172602280974388, + -0.0073976293206214905, + 0.013585920445621014, + -0.005258325487375259, + 0.006371987983584404, + 0.007141218986362219, + 0.006712592672556639, + 0.029850754886865616, + -0.05229239910840988, + 0.031565260142087936, + 0.008878686465322971, + -0.01174129731953144, + 0.01092231459915638, + -0.0061691561713814735, + -0.04313816875219345, + 0.01836969517171383, + 0.014573291875422001, + 0.009919635951519012, + -0.011902031488716602, + 0.004221202805638313, + 0.00699961930513382, + -0.000147220678627491, + 0.010348262265324593, + 0.0525067113339901, + 0.037780340760946274, + -0.008809800259768963, + 0.00621508015319705, + -0.015361658297479153, + 0.015859169885516167, + 0.05008803680539131, + -0.001447570277377963, + 0.006712592672556639, + -0.015086112543940544, + 0.0015068891225382686, + -0.018936093896627426, + 0.015216231346130371, + -0.013356299139559269, + -0.01835438795387745, + -0.022885579615831375, + 0.03964792564511299, + 0.0020436285994946957, + 0.006854192819446325, + -0.004022197797894478, + 0.0044890944845974445, + 0.010325299575924873, + 0.0020474556367844343, + -0.024615392088890076, + 0.036433231085538864, + -0.010003830306231976, + 0.025870654731988907, + -0.014971301890909672, + -0.06594720482826233, + 0.054282449185848236, + -0.031197866424918175, + 0.07194797694683075, + -0.0013672028435394168, + 0.030631467700004578, + -0.0045197103172540665, + -0.015223884955048561, + -0.0619058720767498, + -0.007619596552103758, + 0.016838887706398964, + 0.01569078117609024, + -0.019869888201355934, + 0.003980100620537996, + 0.017956377938389778, + -0.00024636441958136857, + 0.013815541751682758, + -0.005763492081314325, + -0.013830849900841713, + 0.03141218051314354, + -0.007018754258751869, + 0.0014026027638465166, + 0.02129353955388069, + -0.031259097158908844, + -0.010287029668688774, + -0.0029295836575329304, + 0.029590517282485962, + 0.04185228794813156, + 0.0005668773083016276, + -0.022778421640396118, + -0.009889019653201103, + -0.0004668964247684926, + 0.007585153449326754, + 0.043015703558921814, + 0.02143131196498871, + 0.0011758519103750587, + -0.0226406492292881, + 0.016440877690911293, + -0.007730580400675535, + 0.014626869931817055, + 0.0505472794175148, + 0.0231305081397295, + 0.01200153399258852, + 0.019104482606053352, + 0.011381557211279869, + -0.03481057286262512, + -0.0006209340062923729, + 0.007906623184680939, + -0.024324538186192513, + -0.015024879947304726, + 0.02262534201145172, + -0.03569843992590904, + -0.03563721105456352, + 0.039035603404045105, + 0.00805970374494791, + -0.023451978340744972, + 0.04068887606263161, + -0.011657102964818478, + 0.03450440987944603, + -0.05008803680539131, + -0.04794490709900856, + -0.03986223787069321, + -0.015300425700843334, + -0.00655185803771019, + 0.043321866542100906, + 0.02045159414410591, + 0.017803296446800232, + -0.03266744315624237, + 0.05627249926328659, + -0.003090318525210023, + -0.04589362442493439, + -0.0083122868090868, + 0.04809798672795296, + -0.008342903107404709, + -0.004263299982994795, + 0.025166483595967293, + 0.027324922382831573, + 0.046536561101675034, + -0.007462688721716404, + 0.014879452995955944, + 0.014902415685355663, + 0.007164181210100651, + 0.016410261392593384, + -0.037351712584495544, + 0.007271337788552046, + -0.000757271540351212, + 0.0073976293206214905, + 0.017236897721886635, + 0.02790662832558155, + 0.013034829869866371, + -0.027753548696637154, + 0.010945277288556099, + -0.020359745249152184, + -0.010003830306231976, + 0.005200920160859823, + 0.03658631071448326, + -0.02187524549663067, + -0.0182778462767601, + 0.0401684008538723, + -0.03398393839597702, + 0.0070264083333313465, + -0.015376965515315533, + -0.012223501689732075, + -0.02484501339495182, + -0.015001918189227581, + -0.007477996870875359, + -0.014473789371550083, + -0.013379261828958988, + 0.004435515962541103, + -0.026926912367343903, + 0.0015327214496210217, + -0.013555304147303104, + -0.012613857164978981, + 0.028151558712124825, + 0.017757372930645943, + -5.7554792874725536e-05, + -0.05060851201415062, + -0.0019862232729792595, + 0.0007587067084386945, + 0.03940299525856972, + 0.00446230499073863, + -0.013761963695287704, + -0.018415620550513268, + 0.021278230473399162, + 0.015438198111951351, + -0.03575967252254486, + -0.0292231235653162, + 0.022839654237031937, + -0.026835063472390175, + -0.001421737833879888, + -0.00020546313317026943, + -0.021216997876763344, + -0.02406430058181286, + -0.0021220825146883726, + 0.00010518325143493712, + 0.016471493989229202, + 0.00267508695833385, + -0.02357444167137146, + -0.009001150727272034, + 0.015797937288880348, + 0.026452360674738884, + -0.0017690398963168263, + 0.012927672825753689, + 0.014060471206903458, + 0.03014160878956318, + 0.03548412770032883, + -0.02046690322458744, + -0.03612706810235977, + 0.0033295073080807924, + 0.0029295836575329304, + -0.02701876126229763, + -8.359646744793281e-05, + 0.014665139839053154, + 0.006058172322809696, + 0.021553775295615196, + -0.01700727641582489, + 0.01153463777154684, + -0.0026597788091748953, + -0.005595102906227112, + -0.02005358412861824, + 0.006050518248230219, + -0.012476084753870964, + -0.01833907887339592, + -0.021630316972732544, + -0.023773446679115295, + 0.005709913559257984, + 0.0452812984585762, + 0.0021239961497485638, + -0.007309608161449432, + 0.02662075124680996, + -0.02920781634747982, + -0.004427861887961626, + 0.022365104407072067, + 0.003930349368602037, + 0.04745504632592201, + 0.024523543193936348, + -0.00016240915283560753, + 0.025105250999331474, + 0.007011100649833679, + 0.027631083503365517, + -0.0357290580868721, + -0.018201306462287903, + 0.006245696451514959, + -0.01463452447205782, + 0.0028032921254634857, + -0.022058943286538124, + 0.020619982853531837, + -0.03321853280067444, + -0.01044776476919651, + 0.002692308509722352, + 0.005836205556988716, + 0.003528512315824628, + -0.007076159585267305, + 0.003249139990657568, + 0.010631461627781391, + 0.0028071191627532244, + 0.007003446575254202, + -0.0033562963362783194, + -0.03006506897509098, + -0.006230388302356005, + -0.007382321171462536, + -0.011856107972562313, + -0.010088024660944939, + -0.04313816875219345, + -0.02577880583703518, + -5.271122063277289e-05, + -0.0018465371103957295, + 0.027722932398319244, + 0.03364715725183487, + -0.008549562655389309, + 0.04629163444042206, + -0.017665524035692215, + -0.0010572142200544477, + -0.016349028795957565, + 0.01836969517171383, + 0.013210873119533062, + -0.00522770918905735, + 0.01881363056600094, + 0.00783773697912693, + 0.005568313878029585, + -0.01882893778383732, + -1.9987210180261172e-05, + 0.0248603206127882, + -0.011764259077608585, + -0.014022201299667358, + -0.02704937569797039, + -0.01742059364914894, + -0.02187524549663067, + -0.025595109909772873, + -0.01529277116060257, + 0.04754689335823059, + 0.006406431086361408, + -0.010807503946125507, + -0.01650211028754711, + -0.020420977845788002, + -0.005308076739311218, + -0.0104936882853508, + -0.003101799637079239, + -0.0309529360383749, + 0.0007620553369633853, + -0.04567930847406387, + -0.005438195075839758, + 0.035055503249168396, + 0.027615776285529137, + -0.04243399575352669, + 0.003293150570243597, + -0.023222357034683228, + 0.024186765775084496, + -0.03456564247608185, + -0.0022579417563974857, + -0.0444546639919281, + 0.00753922900184989, + 0.011481059715151787, + -0.03872944042086601, + 0.029942603781819344, + -0.0024301577359437943, + -0.023849988356232643, + -0.0023670117370784283, + -0.029468053951859474, + -0.022150790318846703, + 0.02744738757610321, + -0.007148873060941696, + 0.013777271844446659, + 0.017328746616840363, + -0.0018675856990739703, + -0.0013997325440868735, + -0.026804447174072266, + -0.034290097653865814, + -0.02101799286901951, + 0.0373823307454586, + -0.00019553679157979786, + -0.025197099894285202, + -0.04062764346599579, + -0.00895522627979517, + 0.0025641033425927162, + -0.029927294701337814, + 0.004944509826600552, + -0.015200923196971416, + -0.009246080182492733, + 0.012942980974912643, + 0.0021316499914973974, + -0.023819372057914734, + -0.016456184908747673, + 0.008970534428954124, + 0.0006247609853744507, + -0.03217758238315582, + -0.03168772533535957, + 0.027600467205047607, + -0.0102487588301301, + 0.009889019653201103, + 0.003769614500924945, + -0.001711634686216712, + 0.005407579243183136, + -0.013509380631148815, + 0.03168772533535957, + -0.026804447174072266, + -0.012506701052188873, + 0.011159590445458889, + 0.009873711504042149, + -0.008756221272051334, + 0.0007558364304713905, + -0.014933031983673573, + -0.016792964190244675, + -0.004527364391833544, + 0.033830855041742325, + -0.004064294975250959, + -0.005097590386867523, + 0.018048224970698357, + -0.02219671569764614, + -0.03450440987944603, + 0.0025220061652362347, + 0.009184847585856915, + 0.012093382887542248, + -0.001508802641183138, + -0.015935711562633514, + -0.017588984221220016, + -5.3929588830214925e-06, + 0.03101416863501072, + 0.003574436530470848, + -0.05244548246264458, + 0.028672033920884132, + -0.013670114800333977, + -0.012177577242255211, + 0.0010409493697807193, + -0.007581326644867659, + 0.040290866047143936, + 0.036371998488903046, + -0.005572141148149967, + 0.0035648690536618233, + 0.007221586536616087, + 0.012904711067676544, + 0.009674706496298313, + -0.013685422949492931, + 0.03456564247608185, + 0.02571757324039936, + 0.019502492621541023, + -0.03104478493332863, + -0.033739008009433746, + -0.007198624312877655, + 0.0006051475065760314, + -0.007960201241075993, + 0.01178722083568573, + -0.02141600288450718, + -0.03958669304847717, + -0.003199388738721609, + 0.03147341310977936, + -0.011220822110772133, + 0.031182557344436646, + -0.02444700337946415, + -0.022074250504374504, + -0.025564493611454964, + 0.010126294568181038, + 0.008595487102866173, + -0.007190970238298178, + -0.006593955215066671, + -0.015514738857746124, + 0.011305016465485096, + -0.01829315535724163, + 0.011879069730639458, + 0.009743592701852322, + 0.01504018809646368, + -0.0037275173235684633, + -0.0012198626063764095, + 0.007179489359259605, + -0.036861855536699295, + 0.03539228066802025, + 0.022441644221544266, + -0.02094145305454731, + -0.014121703803539276, + 0.006111750844866037, + 0.033769622445106506, + -0.018415620550513268, + 0.0037351713981479406, + 0.005771146155893803, + 0.022533493116497993, + -0.03680062294006348, + -0.009950251318514347, + 0.03842328116297722, + -0.03061615861952305, + 0.034228865057229996, + 0.011580562219023705, + -0.005204746965318918, + -0.02182932198047638, + -0.0013298894045874476, + -0.03269805759191513, + -0.008388827554881573, + 0.007830082438886166, + 0.005510908551514149, + 0.0019479531329125166, + -0.011389210820198059, + 0.05140453204512596, + -0.003861463163048029, + -0.002916189143434167, + -0.04368925839662552, + 0.009529279544949532, + 0.021660933271050453, + 0.009314966388046741, + 0.02443169429898262, + -0.015828553587198257, + 0.015323387458920479, + 0.014565637335181236, + -0.02611558325588703, + 0.0034921555779874325, + -0.0001872847933555022, + -0.012146960943937302, + -0.010577882640063763, + -0.0084806764498353, + -0.005897437687963247, + 0.0037141228094697, + -0.009659398347139359, + 0.010225797072052956, + -0.030187532305717468, + 0.007898968644440174, + -0.024967478588223457, + 0.009881365112960339, + -0.015996942296624184, + 0.018645241856575012, + -0.02662075124680996, + 0.0196708831936121, + 0.00043819379061460495, + 0.018216615542769432, + 0.006130885798484087, + -0.014075779356062412, + 0.04087257385253906, + -0.010547267273068428, + -0.016379645094275475, + 0.00600076699629426, + -0.006563338916748762, + -0.017129741609096527, + -0.03484118729829788, + 0.020267898216843605, + -0.005166477058082819, + 0.0013394569978117943, + -0.010577882640063763, + 0.0032912371680140495, + -0.005939534865319729, + 0.0040375059470534325, + 0.006938387174159288, + 0.015277463011443615, + 0.004910066723823547, + 0.009667051956057549, + 0.001143322209827602, + -0.017359362915158272, + 0.013509380631148815, + 0.03444317728281021, + 0.006861846894025803, + -0.034198250621557236, + -0.010409493930637836, + -0.011542292311787605, + -0.014787605032324791, + 0.04809798672795296, + -0.013440493494272232, + -0.025533877313137054, + -0.03306545317173004, + 0.003585917642340064, + 0.01651741750538349, + -0.0003078359004575759, + 0.01882893778383732, + 0.01546116080135107, + 0.008641410619020462, + 0.029988527297973633, + -0.01181783713400364, + -0.04546499624848366, + 0.005859167315065861, + 0.01911979168653488, + 0.00895522627979517, + 0.032024502754211426, + -0.025059325620532036, + 0.031259097158908844, + -0.004458478186279535, + 0.02089552953839302, + 0.014665139839053154, + 0.012537317350506783, + 0.00349980965256691, + -0.033769622445106506, + 0.0011414086911827326, + -0.005774972960352898, + 0.01442786492407322, + 0.007814774289727211, + -0.008427097462117672, + 0.0029793349094688892, + -0.031595874577760696, + -0.006593955215066671, + 0.012774592265486717, + 0.006900116801261902, + 0.025044018402695656, + 0.01328741293400526, + -0.03520858287811279, + -0.007148873060941696, + -0.025977810844779015, + -0.04895523935556412, + -0.033432845026254654, + 0.033830855041742325, + 0.024186765775084496, + -0.021676240488886833, + 0.02703406848013401, + -0.04375049099326134, + 0.017634907737374306, + -0.006035210564732552, + 0.008373519405722618, + -0.0035782635677605867, + -0.018170690163969994, + -0.025962503626942635, + -0.04408726841211319, + -0.025442028418183327, + 0.015009571798145771, + -0.004297743551433086, + -0.03830081596970558, + -0.00468809949234128, + 0.0169613528996706, + -0.0006836014217697084, + -0.01663988269865513, + -0.018568700179457664, + 0.0003516074502840638, + -0.014955993741750717, + -0.0053693088702857494, + 0.010072716511785984, + -0.0012418680125847459, + 0.037259865552186966, + 0.010968239046633244, + 0.0011873329058289528, + 0.028626108542084694, + -0.00047431126586161554, + -0.005985459312796593, + -0.0016628401353955269, + -0.021691549569368362, + 0.01657865010201931, + -0.017986994236707687, + -0.002654038369655609, + 0.013869119808077812, + 0.019380029290914536, + 0.01738997921347618, + -0.020267898216843605, + -0.021722164005041122, + 0.014542675577104092, + 0.032055117189884186, + -0.03940299525856972, + -0.008251055143773556, + 0.00047765992349013686, + 0.02440107800066471, + -0.005813243333250284, + -0.04846537858247757, + 0.03346346318721771, + -0.02666667476296425, + -0.004048986826092005, + -0.007646385580301285, + 0.020650599151849747, + -0.013761963695287704, + -0.01414466556161642, + 0.006245696451514959, + 0.021538468077778816, + 0.01700727641582489, + -0.009483355097472668, + -0.01174895092844963, + 0.011174897663295269, + -0.012782246805727482, + 0.04396480321884155, + 0.04026024788618088, + 0.005817070137709379, + -0.01693073660135269, + 0.026880986988544464, + 0.010838120244443417, + -0.04965940862894058, + 0.026819756254553795, + -0.007386148441582918, + 0.012812862172722816, + 0.012070421129465103, + -0.0030558754224330187, + -0.006490625906735659, + 0.010738617740571499, + -0.01575201377272606, + 0.03716801851987839, + 0.035055503249168396, + -0.02835056371986866, + 0.003777268575504422, + -0.022074250504374504, + 0.018078841269016266, + -0.001343284035101533, + -0.01659395918250084, + -0.01399158500134945, + 0.01697666011750698, + 0.010011483915150166, + 0.014971301890909672, + -0.0059586698189377785, + -0.015568316914141178, + 0.007688482757657766, + 0.030386537313461304, + -0.023314205929636955, + -0.01708381623029709, + 0.015522392466664314, + 0.015614241361618042, + -0.010593190789222717, + -0.03355531021952629, + -0.014504405669867992, + -0.0013758136192336679, + 0.03181019052863121, + -0.00114906276576221, + ], + "index": 44, + }, + { + "title": "The Monkey's Uncle", + "text": 'The Monkey\'s Uncle is a 1965 Walt Disney production starring Tommy Kirk as genius college student Merlin Jones and Annette Funicello as his girlfriend, Jennifer. The title plays on the idiom "monkey\'s uncle" and refers to a chimpanzee named Stanley, Merlin\'s legal "nephew" (a legal arrangement resulting from an experiment to raise Stanley as a human); Stanley otherwise has little relevance to the plot. Jones invents a man-powered airplane and a sleep-learning system.', + "vector": [ + -0.006288918666541576, + -0.010909094475209713, + -0.027995027601718903, + 0.0008603157475590706, + -0.02231632173061371, + 0.009315071627497673, + -0.04423413798213005, + -0.01894562691450119, + -0.006317976396530867, + 0.023312585428357124, + 0.029389798641204834, + -0.01228726003319025, + -0.08468246459960938, + -0.007260276470333338, + -0.011033627204596996, + 0.012445001862943172, + -0.044134508818387985, + 0.03420507535338402, + -0.04516398161649704, + 0.027181411162018776, + 0.007546702399849892, + 0.008024078793823719, + -0.003127854783087969, + -0.010103780776262283, + 0.0308343805372715, + 0.02055625431239605, + -0.023777509108185768, + 0.0160896684974432, + -0.0028310511261224747, + -0.01891241781413555, + -0.019227901473641396, + 0.006180990021675825, + 0.010585308074951172, + 0.030668336898088455, + -0.0003821607679128647, + 0.008509757928550243, + -0.01470320113003254, + -0.04831882193684578, + -0.055392295122146606, + -0.026218356564641, + -0.006849317345768213, + -0.00362391141243279, + 0.0023889588192105293, + 0.04519719257950783, + 0.012735579162836075, + -0.011108347214758396, + -0.0988958403468132, + 0.01568286120891571, + -0.04317145422101021, + 0.015076800249516964, + 0.0387214720249176, + 0.04167705774307251, + 0.005026983562856913, + 0.01243670005351305, + 0.010352847166359425, + 0.03267747163772583, + -0.021286847069859505, + 0.010925699025392532, + -0.005292654037475586, + -0.017833132296800613, + 0.03354090079665184, + 0.0030116240959614515, + -0.023229563608765602, + 0.011033627204596996, + 0.03237859159708023, + -0.03012039139866829, + 0.041710264980793, + 0.006911583710461855, + 0.0658530741930008, + 0.005890412721782923, + 0.032694075256586075, + 0.023196354508399963, + -0.011432133615016937, + -0.006666668690741062, + 0.02817767672240734, + 0.004777917638421059, + -0.008459944278001785, + 0.010029060766100883, + -0.0081942742690444, + 0.0329265370965004, + -0.020506441593170166, + -0.040116243064403534, + 0.0028767131734639406, + 0.026168543845415115, + 0.017949363216757774, + 0.014221672900021076, + 0.06645083427429199, + -0.05552513152360916, + -0.015732673928141594, + 0.04579494893550873, + 0.027712753042578697, + 0.022864267230033875, + 0.029439611360430717, + 0.02078871615231037, + -0.009248653426766396, + -0.02520548738539219, + 0.0196596160531044, + 0.003816937794908881, + -0.012860111892223358, + 0.034570373594760895, + 0.042108774185180664, + 0.005217934492975473, + -0.01163138635456562, + -0.013424661941826344, + -0.04164385050535202, + 0.03755916655063629, + -0.0024491497315466404, + 0.030336249619722366, + 0.04131175950169563, + 0.009066005237400532, + -0.01151515543460846, + -0.009331676177680492, + 0.0245745200663805, + -0.030286435037851334, + 0.005628893617540598, + 0.05635535344481468, + -0.07126610726118088, + 0.0163138285279274, + -0.025902872905135155, + -0.040979672223329544, + 0.029240358620882034, + -0.026351191103458405, + -0.0810294970870018, + -0.03868826478719711, + 0.005475302692502737, + -0.005641346797347069, + -0.043569959700107574, + 0.0577833317220211, + 0.04376921430230141, + -0.01416355837136507, + -0.06429225951433182, + -0.0013158991932868958, + -0.02415941096842289, + -0.007521795574575663, + -0.06558740139007568, + 0.00999585259705782, + -0.029024500399827957, + -0.019858868792653084, + -0.001070984173566103, + 0.04742218181490898, + -0.036596108227968216, + 0.02528850920498371, + -0.023644672706723213, + -0.015026986598968506, + 0.005392280872911215, + -0.05625572428107262, + -0.0007544626714661717, + 0.055458713322877884, + 0.03825655207037926, + -0.015998344868421555, + -0.00581569317728281, + 0.004296389874070883, + -0.03148195147514343, + 0.0420091450214386, + -0.01579909212887287, + 0.05266917496919632, + -0.012063100934028625, + -0.04370279610157013, + -0.04536323621869087, + 0.03855542838573456, + -0.02400997094810009, + 0.041212134063243866, + -0.0007684726733714342, + -0.018580330535769463, + -0.0006200707866810262, + -0.03184724971652031, + 0.05529266968369484, + 0.009522626176476479, + -0.0034890007227659225, + 0.025271905586123466, + -0.005944377277046442, + -0.04798673093318939, + -0.011249484494328499, + -0.01209630910307169, + -0.005911168176680803, + 0.015184728428721428, + -0.022216694429516792, + 0.029871325939893723, + 0.015840603038668633, + -0.02528850920498371, + -0.033026162534952164, + 0.015591536648571491, + 0.01924450695514679, + 0.04001661762595177, + 0.030369456857442856, + -0.04486510530114174, + 0.0211540125310421, + 0.030136996880173683, + -0.010153594426810741, + -0.024973025545477867, + 0.020473232492804527, + -0.023960156366229057, + -0.01811540685594082, + -0.022814452648162842, + 0.04503114894032478, + 0.00896637886762619, + -0.035168129950761795, + 0.04157743230462074, + -0.037459537386894226, + 0.0018389378674328327, + 0.023644672706723213, + -0.06050645560026169, + 0.05499378964304924, + -0.012768788263201714, + -0.007870487868785858, + 0.01149855088442564, + -0.03387298807501793, + 0.0003341636620461941, + 0.018845999613404274, + 0.02588626742362976, + 0.02210046350955963, + -0.025554180145263672, + -0.023063519969582558, + -0.02892487496137619, + -0.020772110670804977, + -0.004503944888710976, + -0.009090911597013474, + 0.009821506217122078, + -0.008248238824307919, + -0.008825241588056087, + -0.026849323883652687, + -0.004873393103480339, + 0.024823585525155067, + 0.04981321841478348, + -0.04449980705976486, + -0.017716901376843452, + -0.02615193836390972, + 0.0682108998298645, + 0.019975099712610245, + 0.0131838982924819, + -0.04622666537761688, + 0.032212547957897186, + -0.01999170519411564, + 0.03297634795308113, + -0.018430890515446663, + -0.005790786352008581, + -0.003190121380612254, + -0.031232886016368866, + -0.03709424287080765, + 0.037525955587625504, + 0.0211540125310421, + 0.033291831612586975, + 0.030784567818045616, + -0.0025238697417080402, + 0.034902460873126984, + -0.00655458914116025, + -0.025836454704403877, + -0.08674141764640808, + -0.0530344694852829, + -0.01236198004335165, + 0.03666252642869949, + -0.005944377277046442, + 0.026251565665006638, + 0.0060813636519014835, + -0.05353260412812233, + 0.025188883766531944, + -0.008675801567733288, + -0.0020641351584345102, + -0.017168955877423286, + -0.0052843522280454636, + -0.0423080250620842, + -0.02228311263024807, + -0.005035285837948322, + -0.01725197769701481, + -0.03626402094960213, + 0.021917816251516342, + -0.0065794955007731915, + -0.08873394131660461, + -0.013200502842664719, + -0.041511014103889465, + -0.021220430731773376, + -0.006662517786026001, + 0.025089256465435028, + 0.015242843888700008, + -0.025537576526403427, + -0.04157743230462074, + 0.04745539277791977, + 0.020323792472481728, + 0.027480291202664375, + -0.0015846829628571868, + 0.051971789449453354, + 0.02967207320034504, + -0.07936906069517136, + -0.004483189433813095, + 0.03304276615381241, + 0.021502705290913582, + 0.0032295568380504847, + -0.028526369482278824, + -0.01158987544476986, + 0.03915318846702576, + -0.024292245507240295, + 0.009348280727863312, + -0.008493153378367424, + 0.05170612037181854, + -0.011158160865306854, + 0.003161063650622964, + -0.0029618109110742807, + 0.018613537773489952, + 0.00582399545237422, + -0.0098298080265522, + 0.05751766264438629, + 0.0035367384552955627, + -0.031863853335380554, + 0.01057700626552105, + 0.052868425846099854, + 0.03586551547050476, + -0.006616855505853891, + -0.003418432082980871, + -0.046492334455251694, + -0.002239519264549017, + 0.024890003725886345, + 0.044964730739593506, + -0.054827746003866196, + 0.029954347759485245, + -0.03279370069503784, + -0.027779171243309975, + 0.05884601175785065, + -0.04234123229980469, + -0.0148194320499897, + -0.006014945916831493, + -0.015774184837937355, + 0.028742225840687752, + -0.02997095137834549, + -0.01826484687626362, + 0.07724369317293167, + 0.007094232365489006, + -0.002685762709006667, + 0.002080739475786686, + -0.03769199922680855, + -0.018962230533361435, + -0.05067664757370949, + -0.023877134546637535, + -0.008185971528291702, + 0.010701538994908333, + 0.04948112741112709, + -0.03712745010852814, + 0.004396016243845224, + 0.04639270901679993, + 0.023312585428357124, + -0.014205069281160831, + 0.011747617274522781, + 0.0390203520655632, + 0.04273974150419235, + 0.07571608573198318, + 0.014811129309237003, + -0.017799923196434975, + 0.0601743645966053, + 0.01879618689417839, + 0.03169780969619751, + 0.017567461356520653, + 0.0009147989912889898, + -0.059443771839141846, + 0.018580330535769463, + -0.05001246929168701, + -0.0020973440259695053, + 0.02580324560403824, + -0.019476966932415962, + -0.022183485329151154, + -0.02925696223974228, + 0.06718142330646515, + -0.03286011889576912, + -0.004196763504296541, + 0.02701536752283573, + -0.003063512733206153, + 0.0032150279730558395, + -0.029605654999613762, + 0.04177668318152428, + -0.0043295989744365215, + 0.014503948390483856, + 0.002926526591181755, + -0.0022768790367990732, + -0.017119141295552254, + -0.015309262089431286, + -0.04592778533697128, + 0.035168129950761795, + 0.062366146594285965, + 0.01751764863729477, + 0.0717974528670311, + 0.006185140926390886, + -0.0021336660720407963, + -0.0023287679068744183, + -0.031050238758325577, + 0.0242756400257349, + 0.007430471479892731, + -0.010145291686058044, + 0.027745962142944336, + -0.046691589057445526, + -0.03666252642869949, + 0.005620591342449188, + 0.019144879654049873, + -0.036330439150333405, + 0.015965135768055916, + -0.015774184837937355, + 0.0003881279844790697, + 0.008144460618495941, + -0.02532171830534935, + -0.046193454414606094, + 0.009373187087476254, + 0.008559570647776127, + -0.005334165412932634, + -0.026915742084383965, + 0.01163138635456562, + -0.02757991850376129, + -0.07963472604751587, + -0.021735167130827904, + 0.015226240269839764, + 0.029921138659119606, + -0.015350772999227047, + -0.006841015070676804, + 0.008181820623576641, + 0.016081366688013077, + -0.03259444981813431, + -0.05625572428107262, + 0.013217106461524963, + 0.029090918600559235, + -0.002953508635982871, + 0.00322540570050478, + 0.01042756624519825, + 0.02070569433271885, + -0.021519308909773827, + 0.021768376231193542, + 0.0198090560734272, + 0.027447082102298737, + 0.03041927143931389, + -0.021054387092590332, + 0.054794538766145706, + -0.03466999903321266, + -0.059144891798496246, + -0.027031973004341125, + -0.02836032398045063, + -0.007932755164802074, + -0.013590705581009388, + 0.06419263035058975, + 0.02180158533155918, + -0.024823585525155067, + -0.051374029368162155, + 0.01138231996446848, + -0.007887092418968678, + -0.04552927985787392, + -0.01766708679497242, + 0.004391865339130163, + -0.01084267720580101, + -0.09192199259996414, + -0.03819013386964798, + -0.013399755582213402, + -0.061834804713726044, + 0.01834786869585514, + -0.041710264980793, + -0.008866752497851849, + -0.00999585259705782, + -0.042075563222169876, + -0.01148194633424282, + -8.464355050818995e-05, + -0.0017932758200913668, + 0.0017071404727175832, + 0.011066836304962635, + -0.0021855549421161413, + -0.0024927363265305758, + -0.014396019279956818, + 0.012038193643093109, + 0.05871317908167839, + 0.044732268899679184, + 0.009439604356884956, + -0.04536323621869087, + -0.02374430000782013, + -0.05157328397035599, + -0.029954347759485245, + 0.0063553364016115665, + -0.01063512172549963, + 0.010369451716542244, + -0.0494479201734066, + 0.009838109835982323, + -0.06186801567673683, + -0.0063304295763373375, + 0.040315497666597366, + -0.04951433837413788, + 0.02671648934483528, + -0.028161071240901947, + 0.04307182878255844, + 0.022482365369796753, + 0.016039855778217316, + 0.018298054113984108, + 0.009813203476369381, + 0.026284774765372276, + -0.021369870752096176, + -0.03249482065439224, + -0.047023676335811615, + 0.00036892914795316756, + -0.034836042672395706, + -0.04366958513855934, + 0.03609797731041908, + 0.014753014780580997, + 0.00905770342797041, + -0.0018026158213615417, + -0.007077627815306187, + 0.026251565665006638, + 0.027696147561073303, + -0.007870487868785858, + -0.003347863210365176, + 0.013673728331923485, + -0.014852641150355339, + -0.0317310206592083, + 0.01710253767669201, + 0.03593193367123604, + -0.04449980705976486, + 0.029024500399827957, + 0.006255709566175938, + 0.005657951347529888, + 0.03493566811084747, + 0.02937319315969944, + -0.009572439827024937, + 0.06920716166496277, + 0.012909925542771816, + 0.013831470161676407, + 0.016795355826616287, + 0.011921962723135948, + 0.046193454414606094, + 0.022648409008979797, + 0.04901620373129845, + 0.016371943056583405, + 0.016413453966379166, + 0.0259194765239954, + 0.016081366688013077, + 0.024707354605197906, + 0.008567873388528824, + 0.006782899610698223, + 0.011888754554092884, + 0.0064093004912137985, + -0.019078461453318596, + -0.021369870752096176, + 0.004690744448453188, + 0.011988380923867226, + 0.003167290473356843, + 0.002748029073700309, + -0.008625988848507404, + -0.0043835630640387535, + -0.002777086803689599, + 0.04014945402741432, + 0.02303031086921692, + -0.046459127217531204, + -0.008700708858668804, + 0.01230386458337307, + 0.025089256465435028, + 0.02303031086921692, + -0.018995439633727074, + -0.048783741891384125, + 0.054860956966876984, + -0.031050238758325577, + -0.011797429993748665, + -0.04984642565250397, + 0.015774184837937355, + 0.046127039939165115, + 0.017866339534521103, + 0.030601918697357178, + -0.00021897059923503548, + -0.000691158405970782, + -0.05296805500984192, + -0.05871317908167839, + 0.034304700791835785, + -0.006400998216122389, + 0.031116655096411705, + -0.026550443843007088, + -0.0034433386754244566, + 0.007608968764543533, + -0.022748036310076714, + 0.02243255265057087, + -0.005068494938313961, + 0.010311336256563663, + -0.005255294498056173, + 0.003212952520698309, + 0.049281876534223557, + -0.005155668128281832, + 0.01740141771733761, + -0.02213367260992527, + -0.03372354805469513, + 0.009165631607174873, + -0.04028228670358658, + -0.028974687680602074, + 0.009165631607174873, + -0.012735579162836075, + -0.012785391882061958, + 0.0010050854180008173, + 0.014802827499806881, + 0.02502283826470375, + -0.00415525259450078, + 0.01662101037800312, + 0.01142383087426424, + 0.021618936210870743, + -0.005803239531815052, + -0.0033810720779001713, + -0.01483603660017252, + 0.017268581315875053, + -0.03646327555179596, + 0.01382316742092371, + 0.03023662231862545, + 0.02347862906754017, + 0.03510171175003052, + 0.022814452648162842, + -0.019676219671964645, + -0.03712745010852814, + 0.0160149484872818, + -0.05877959728240967, + 0.009539230726659298, + 0.01315068919211626, + 0.033075977116823196, + 0.0018877133261412382, + 0.009489418007433414, + -0.04250727966427803, + 0.026384400203824043, + -0.002411789959296584, + -0.04689083993434906, + 0.019908681511878967, + 0.039518486708402634, + 0.018879208713769913, + 0.021286847069859505, + 0.003686178009957075, + -0.00662100687623024, + -0.012934831902384758, + 0.014122046530246735, + 0.025753432884812355, + -0.04632629081606865, + 0.0064881714060902596, + 0.0078082215040922165, + -0.0035388139076530933, + -0.037227075546979904, + 0.006803655065596104, + -0.015375679358839989, + 0.056521397083997726, + 0.006313825026154518, + -0.0032025747932493687, + 0.004470736254006624, + 0.028194280341267586, + -0.04861769825220108, + 0.01369033195078373, + 0.004860939923673868, + 0.00038579298416152596, + -0.020091330632567406, + -0.002758406801149249, + 0.020174352452158928, + 0.03623081371188164, + -0.029306774958968163, + -0.005006228107959032, + 0.00890826340764761, + 0.006629308685660362, + 0.014728107489645481, + -0.03666252642869949, + 0.03732670471072197, + -0.02317975088953972, + 0.012146122753620148, + 0.0012826903257519007, + 0.002318390179425478, + -0.001099004060961306, + 0.0008468246669508517, + 0.00581569317728281, + 0.013532590121030807, + -0.014885849319398403, + 0.03443753719329834, + -0.005159819032996893, + 0.0010445208754390478, + 0.021403077989816666, + -0.003702782327309251, + 0.00988792348653078, + -0.014337903819978237, + 0.00825238972902298, + -0.0024138654116541147, + 0.009223747067153454, + 0.04572853446006775, + -0.03279370069503784, + 0.002731424756348133, + 0.013515986502170563, + 0.026168543845415115, + 0.003787880064919591, + 0.005363223142921925, + 0.02975509501993656, + 0.004283936694264412, + 0.012536326423287392, + -0.017982570454478264, + -0.006990454625338316, + -0.0164632685482502, + -0.025687014684081078, + -0.016903284937143326, + -0.004690744448453188, + -0.023810718208551407, + 0.02347862906754017, + 0.02570362016558647, + 0.007824826054275036, + -0.026533840224146843, + -0.0031776682008057833, + 0.009896225295960903, + -0.04197593778371811, + -0.023843925446271896, + -0.02412620186805725, + 0.014454134739935398, + 0.004333749879151583, + 0.013673728331923485, + -0.037193868309259415, + 0.021934419870376587, + -0.0048692417331039906, + 0.025388136506080627, + 0.02490660920739174, + -0.001882524462416768, + 0.009663764387369156, + -0.051971789449453354, + 0.013416360132396221, + -0.010660028085112572, + -0.0001076691914931871, + -0.005080948118120432, + 0.025338323786854744, + -0.009746786206960678, + -0.0390203520655632, + 0.02836032398045063, + 0.03144874423742294, + -0.02817767672240734, + 0.03453716263175011, + -0.0315815806388855, + 0.03229556977748871, + 0.008625988848507404, + -0.01957659423351288, + -0.007467831484973431, + -0.0023993365466594696, + 0.03530096635222435, + 0.005981737282127142, + 0.01555002573877573, + 0.015076800249516964, + 0.018447494134306908, + -0.001191366114653647, + 0.014404322020709515, + 0.03256123885512352, + 0.020805319771170616, + 0.0011986305471509695, + -0.024292245507240295, + -0.023362398147583008, + 0.04689083993434906, + 0.013582403771579266, + 0.0024325454141944647, + 0.021585727110505104, + 0.018364472314715385, + 0.0017631803639233112, + -0.03755916655063629, + 0.014711502939462662, + 0.009074307978153229, + 0.05721878260374069, + 0.02239934355020523, + 0.03433791175484657, + 0.021917816251516342, + -0.0333748534321785, + -0.02314654178917408, + 0.030369456857442856, + -0.033590711653232574, + 0.03676215559244156, + -0.005110005848109722, + 0.01065172627568245, + -0.014786222949624062, + -0.01155666634440422, + 0.0297883041203022, + -0.008455793373286724, + 0.027031973004341125, + -0.015350772999227047, + -0.0019997931085526943, + 0.03646327555179596, + -0.01838107779622078, + -0.03375675529241562, + 0.0007669159676879644, + 0.00017253015539608896, + 0.009506022557616234, + -0.009838109835982323, + -0.044134508818387985, + -0.007530097849667072, + -0.016272317618131638, + -0.002243670402094722, + -0.02543794922530651, + -0.042972203344106674, + -0.016828564926981926, + -0.022449156269431114, + 0.014885849319398403, + -0.02434205822646618, + 0.020024912431836128, + -0.013316732831299305, + -0.038920726627111435, + -0.01403072290122509, + -0.026948949322104454, + 0.015740975737571716, + 0.021021177992224693, + 0.024956421926617622, + 0.0006387507310137153, + -0.011465341784060001, + -0.028526369482278824, + -0.011664594523608685, + -0.0005105854943394661, + 0.036330439150333405, + -0.027895402163267136, + 0.018580330535769463, + -0.006400998216122389, + 0.007019512355327606, + 0.03523454815149307, + -0.01894562691450119, + 0.026201751083135605, + 0.008899961598217487, + -0.04144459590315819, + -0.032278966158628464, + -0.010352847166359425, + 0.00409921258687973, + 0.016073064878582954, + -0.023129936307668686, + 0.00080894585698843, + 0.017351603135466576, + -0.007077627815306187, + 0.018762977793812752, + 0.011199671775102615, + 0.04775426909327507, + -0.009555835276842117, + 0.01942715421319008, + 0.011780825443565845, + 0.012038193643093109, + 0.0488501600921154, + 0.020323792472481728, + 0.03410544991493225, + 0.030336249619722366, + -0.006097967736423016, + -0.01632213033735752, + 0.015151520259678364, + 0.007405564654618502, + 0.033408064395189285, + 0.005491907242685556, + 0.004215443506836891, + 0.04048154130578041, + 0.025089256465435028, + 0.00370900915004313, + -0.027281038463115692, + 0.021851398050785065, + -0.01215442456305027, + -0.009597346186637878, + -0.0009682443924248219, + -0.010012456215918064, + -0.02010793425142765, + 0.007999172434210777, + -0.008526362478733063, + -0.0420091450214386, + -0.01572437211871147, + 0.02127024345099926, + -0.013408057391643524, + 0.040049824863672256, + -0.0007845581858418882, + -0.00664176233112812, + 0.016679124906659126, + 0.041710264980793, + -2.372289600316435e-05, + -0.005114156752824783, + 0.02141968347132206, + -0.005450396332889795, + 0.008941472508013248, + -0.014694899320602417, + 0.037160661071538925, + 0.019792450591921806, + -0.004520549438893795, + -0.03437111899256706, + -0.02633458748459816, + -0.015674559399485588, + 0.023096727207303047, + 0.006986303720623255, + 0.0390203520655632, + 0.04167705774307251, + 0.0033022011630237103, + -0.020174352452158928, + 0.025902872905135155, + -0.011955171823501587, + 0.03447074443101883, + -0.012179331853985786, + -0.004665838088840246, + -0.01725197769701481, + -0.03453716263175011, + 0.026417609304189682, + -0.0018254468450322747, + 0.024557916447520256, + -0.0196596160531044, + 0.033408064395189285, + -0.013698634691536427, + -0.04330429062247276, + 0.03068494237959385, + -0.0057824840769171715, + -0.04114571586251259, + -0.020091330632567406, + -0.003495227312669158, + -0.0294894240796566, + -0.013756750151515007, + -0.01069323718547821, + 0.016239108517766, + -0.03915318846702576, + -0.00565379997715354, + -0.018729768693447113, + -0.01643005944788456, + -0.02123703435063362, + -0.027281038463115692, + -0.022565387189388275, + 0.010834374465048313, + 0.0184640996158123, + -0.006886677350848913, + -0.015749279409646988, + -0.0131091782823205, + -0.01763387955725193, + 0.020423417910933495, + 0.0002755293680820614, + -0.005732670892030001, + -0.0032108768355101347, + -0.04244086146354675, + 0.034902460873126984, + 0.07080118358135223, + 0.012818600982427597, + 0.003134081605821848, + 0.03332504257559776, + -0.006434207316488028, + 0.04951433837413788, + -0.018430890515446663, + -0.02895808406174183, + 0.025637201964855194, + -0.023379003629088402, + -0.03390619531273842, + -0.005907017271965742, + -0.013698634691536427, + -0.005965132731944323, + 0.005890412721782923, + 0.017866339534521103, + 0.004391865339130163, + -0.023096727207303047, + 0.003922790754586458, + -0.0013989211292937398, + 0.02198423258960247, + -0.021934419870376587, + 0.0023287679068744183, + -0.010344544425606728, + -0.03276049345731735, + 0.017052724957466125, + -0.009273560717701912, + 0.007413866929709911, + 0.016870075836777687, + -0.07378997653722763, + -0.03375675529241562, + 0.04337070882320404, + 0.01057700626552105, + 0.02764633484184742, + -0.004487340804189444, + -0.034869249910116196, + -0.020655879750847816, + 0.012071402743458748, + -0.03312578797340393, + -0.010153594426810741, + -0.02389374002814293, + 0.02543794922530651, + -0.026218356564641, + -0.0315815806388855, + 0.019759243354201317, + 0.0005863430560566485, + 0.042972203344106674, + -0.01808219775557518, + -0.027065180242061615, + 0.021519308909773827, + 0.018630143254995346, + -0.0065255314111709595, + 0.002685762709006667, + 0.026550443843007088, + -0.030850986018776894, + -0.009398093447089195, + -0.03395600989460945, + -0.021934419870376587, + -0.016064763069152832, + 0.03729349374771118, + -0.013731843791902065, + 0.008767126128077507, + 0.04433376342058182, + 0.0006397885154001415, + -0.031017029657959938, + 0.030253227800130844, + 0.06200085207819939, + 0.017451230436563492, + 0.009738483466207981, + 0.05300126224756241, + 0.024242432788014412, + -0.0021160240285098553, + -0.012561232782900333, + -0.025670411065220833, + 0.02088834159076214, + -0.028974687680602074, + 0.01462848111987114, + 0.004782069008797407, + -0.04858449101448059, + -0.0018420512787997723, + 0.00658364687114954, + -0.02513906918466091, + 0.02513906918466091, + 0.018430890515446663, + -0.01909506693482399, + 0.0006626195390708745, + -0.018580330535769463, + -0.051639702171087265, + 0.04433376342058182, + 0.023063519969582558, + -0.014578668400645256, + -0.02535492740571499, + -0.01382316742092371, + -0.017999175935983658, + -0.015234542079269886, + -0.008119554258883, + -0.033889591693878174, + -0.01237858459353447, + 0.0208551324903965, + 0.0163138285279274, + 0.03795767202973366, + -0.014180161990225315, + -0.004823579918593168, + 0.028675807639956474, + -0.029655467718839645, + 0.0060190968215465546, + -0.012129518203437328, + 0.01942715421319008, + 0.027928609400987625, + -0.02809465490281582, + -0.013773354701697826, + -0.018729768693447113, + 0.016264015808701515, + 0.08023248612880707, + -0.0021398926619440317, + -0.020539648830890656, + -0.014246580190956593, + -0.019144879654049873, + -0.0184640996158123, + 0.010643423534929752, + 0.00834786519408226, + -0.012611046433448792, + 0.027031973004341125, + -0.0016064762603491545, + -0.014180161990225315, + -0.008040683344006538, + 0.01613117940723896, + 0.003069739555940032, + 0.01867995597422123, + 0.014288091100752354, + -0.02445828914642334, + 0.01632213033735752, + 0.031183073297142982, + 0.018696561455726624, + 0.014288091100752354, + 0.0011975927045568824, + -0.048451654613018036, + 0.019609803333878517, + -0.02183479256927967, + -0.015342471189796925, + 0.03968453034758568, + 0.014180161990225315, + -0.029605654999613762, + -0.0032938988879323006, + -0.03493566811084747, + 0.011149858124554157, + 0.027148203924298286, + 0.0017133670626208186, + -0.007243671920150518, + 0.01665421947836876, + 0.024890003725886345, + 0.005342467688024044, + 0.04835202917456627, + -0.013798261061310768, + -0.013740145601332188, + -0.0003471358504611999, + 0.003156912513077259, + 0.025238696485757828, + 0.004404318518936634, + 0.004474887158721685, + 0.0028393534012138844, + 0.01294313371181488, + 0.012627650052309036, + -0.00902449432760477, + -0.008709010668098927, + 0.020273979753255844, + 0.031166469678282738, + 0.01170610636472702, + -0.009215445257723331, + -0.019161483272910118, + 0.004640931263566017, + 0.014188464730978012, + 0.004219594411551952, + -0.005085099022835493, + -0.023129936307668686, + -0.02269822172820568, + 0.02738066390156746, + 0.027629731222987175, + 0.002712744753807783, + 0.0015784562565386295, + -0.0036882536951452494, + 0.02063927613198757, + -0.026052312925457954, + -0.02314654178917408, + -0.010967209935188293, + 0.031050238758325577, + -0.02985472045838833, + -0.012204238213598728, + 0.03503529727458954, + 0.001516189775429666, + 0.024557916447520256, + 0.029090918600559235, + -0.036894988268613815, + 0.013515986502170563, + 0.022266507148742676, + -0.03450395539402962, + 0.02213367260992527, + -0.01395600289106369, + -0.005657951347529888, + -0.013706936500966549, + -0.0017445003613829613, + -0.014769618399441242, + 0.023843925446271896, + -0.00810294970870018, + -0.022150276228785515, + 0.033441271632909775, + -0.01811540685594082, + -0.017285186797380447, + -0.003916563931852579, + 0.02666667476296425, + -0.027114994823932648, + -0.008526362478733063, + 0.014254882000386715, + -0.00033027201425284147, + 0.010593610815703869, + -0.02445828914642334, + -0.01838107779622078, + 0.006836864165961742, + -2.6949728635372594e-05, + 0.014968871138989925, + 0.0017403492238372564, + 0.03789125382900238, + 0.0022914079017937183, + 0.03315899893641472, + -0.025637201964855194, + 0.01217102911323309, + 0.011390621773898602, + 0.01942715421319008, + 0.010585308074951172, + -0.004449980799108744, + -0.014354508370161057, + -0.01564965210855007, + -0.003322956617921591, + -0.006849317345768213, + -0.0027895402163267136, + -0.0022229147143661976, + -0.0033914498053491116, + -0.0029327531810849905, + 0.015674559399485588, + 0.010676632635295391, + -0.05170612037181854, + 0.022714827209711075, + 0.02806144580245018, + 0.03523454815149307, + -0.05001246929168701, + -0.007787466049194336, + -0.027397269383072853, + -0.015392283909022808, + -0.006006643641740084, + -0.031083447858691216, + 0.04190951958298683, + -0.007393111474812031, + 0.0046326289884746075, + -0.004296389874070883, + -0.02967207320034504, + -0.019892077893018723, + 0.02314654178917408, + 0.006924036890268326, + 0.010925699025392532, + 0.026650071144104004, + 0.0008260691538453102, + -0.027696147561073303, + 0.025936082005500793, + -0.028841853141784668, + -0.006176838651299477, + -0.010610215365886688, + 0.006733086425811052, + -0.006264011841267347, + -0.02224990352988243, + -0.04048154130578041, + -0.0028642599936574697, + 0.007841430604457855, + 0.002721047028899193, + 0.014919058419764042, + -0.03231217339634895, + 0.008899961598217487, + -0.019078461453318596, + 0.018015779554843903, + 0.007061023265123367, + 0.011041929945349693, + 0.01335824467241764, + -0.00567455543205142, + 0.016969703137874603, + 0.028260698541998863, + 0.019294319674372673, + 0.021037781611084938, + -0.004138648044317961, + -0.014371112920343876, + 0.011797429993748665, + -0.002488585188984871, + -0.0048401840031147, + 0.029804907739162445, + 0.01984226517379284, + 0.013366546481847763, + 0.019892077893018723, + -0.008642593398690224, + -0.015201332978904247, + 0.04370279610157013, + 0.0065794955007731915, + -0.007567457854747772, + 0.00481942854821682, + 0.0015193030703812838, + -0.028974687680602074, + 0.003022001823410392, + -0.02749689482152462, + -0.007936906069517136, + -0.03360731527209282, + 0.005936075001955032, + 0.013142387382686138, + -0.03437111899256706, + -0.027729356661438942, + -0.012071402743458748, + 0.003588627092540264, + 0.00923204980790615, + -0.022565387189388275, + 0.03050229325890541, + 0.03765879198908806, + -0.03819013386964798, + 0.02678290568292141, + -0.0211540125310421, + -0.019892077893018723, + 0.0019997931085526943, + 0.03732670471072197, + -0.038920726627111435, + -0.0213034525513649, + 0.03347448259592056, + 0.022532178089022636, + -0.03828975930809975, + 0.027131598442792892, + 0.0022602747194468975, + 0.016222504898905754, + -0.011324204504489899, + -0.027662940323352814, + 0.01849730685353279, + -0.006201745476573706, + 0.002781237941235304, + 0.009032797068357468, + -0.02386053092777729, + -0.015018684789538383, + 0.0007404527277685702, + 0.008592779748141766, + -0.05150686576962471, + 0.014678294770419598, + -0.031199678778648376, + -0.007546702399849892, + -0.019344132393598557, + -0.03387298807501793, + -0.025687014684081078, + -0.042706530541181564, + -0.013989211991429329, + 0.026948949322104454, + 0.011581572704017162, + -0.01688668131828308, + 0.013308431021869183, + -0.0476546436548233, + -0.008011626079678535, + 0.039784155786037445, + -0.019045252352952957, + 0.04536323621869087, + -0.009464510716497898, + -0.019792450591921806, + -0.008298051543533802, + -0.005753426346927881, + -0.002833126811310649, + -0.017434624955058098, + 0.02183479256927967, + -0.011789128184318542, + 0.03739312291145325, + 0.0065794955007731915, + 0.006334580946713686, + -0.006185140926390886, + -0.005620591342449188, + 0.01221254002302885, + -0.01455376110970974, + 0.0007155460771173239, + 0.01755085587501526, + 0.010195105336606503, + 0.02311333268880844, + 0.030585315078496933, + -0.05207141488790512, + 0.018065594136714935, + -0.004682442173361778, + -0.01628061942756176, + 0.005201329942792654, + 0.013391452841460705, + 0.01864674687385559, + 0.023163145408034325, + -0.0036550448276102543, + -0.024524707347154617, + 0.009605648927390575, + 0.0010284354211762547, + 0.012611046433448792, + 0.011490249074995518, + -0.006791201885789633, + 0.01330012921243906, + 0.027480291202664375, + 0.0033997520804405212, + 0.0057036131620407104, + -0.023345794528722763, + 0.01491075661033392, + 0.0027750113513320684, + -0.013233711011707783, + 0.004321296699345112, + 0.023545047268271446, + 0.018065594136714935, + 0.030884195119142532, + -0.025222092866897583, + -0.005707764532417059, + 0.025554180145263672, + 0.004223745781928301, + 0.03076796419918537, + -0.011124951764941216, + 0.0044375271536409855, + -0.024690750986337662, + -0.018148615956306458, + 0.02836032398045063, + -0.0044997939839959145, + -0.009406396187841892, + -0.01864674687385559, + 0.014562063850462437, + -0.026234960183501244, + 0.019012045115232468, + 0.022648409008979797, + -0.03334164619445801, + -0.0020246997009962797, + -0.02787879668176174, + 0.033408064395189285, + 0.040614377707242966, + -0.025537576526403427, + -0.013200502842664719, + -0.04131175950169563, + 0.0130344582721591, + 0.020539648830890656, + 0.01628061942756176, + -0.015599839389324188, + -0.028792038559913635, + -0.0002047011803369969, + 0.026998763903975487, + -0.005931924097239971, + -0.0017683692276477814, + -0.002351599046960473, + -0.019875474274158478, + -0.012112913653254509, + 0.02344541996717453, + -0.009373187087476254, + 0.012021590024232864, + 0.02791200578212738, + 0.002592362929135561, + 0.0008411169401369989, + -0.030884195119142532, + 0.027629731222987175, + 0.004161478951573372, + 0.009647159837186337, + 0.014354508370161057, + 0.0057036131620407104, + -0.0193607360124588, + 0.016720635816454887, + -0.026019103825092316, + -0.01330012921243906, + -0.01228726003319025, + 0.00017914596537593752, + 0.00745537830516696, + 0.005761728622019291, + 0.0019219599198549986, + -0.028144467622041702, + 0.009256956167519093, + -0.0034329609479755163, + 0.008356167003512383, + -0.012353677302598953, + -0.015143217518925667, + 0.0037152357399463654, + -0.018165219575166702, + -0.033706944435834885, + 0.05230387672781944, + 0.010792863555252552, + -0.016064763069152832, + -0.019028648734092712, + -0.029605654999613762, + 0.03065173327922821, + 0.033889591693878174, + -0.018962230533361435, + 0.021403077989816666, + -0.005491907242685556, + -0.02037360519170761, + 0.044134508818387985, + -0.013466172851622105, + 0.028293907642364502, + -0.02955584228038788, + -0.014279788359999657, + -0.005159819032996893, + -0.03563305363059044, + -0.011000419035553932, + -0.027845587581396103, + 0.0323287770152092, + 0.0011674972483888268, + 0.005163969937711954, + 0.017085934057831764, + 0.007721048779785633, + -0.006982152350246906, + 0.03559984639286995, + 0.030402665957808495, + 0.01841428503394127, + -0.012536326423287392, + 0.011747617274522781, + 0.011747617274522781, + 0.03672894462943077, + -0.009647159837186337, + -0.004740557633340359, + -0.012029891833662987, + 0.015043591149151325, + -0.006982152350246906, + 0.015965135768055916, + -0.00412619486451149, + 0.01669573038816452, + -0.01687837764620781, + 0.019559990614652634, + 0.04373600333929062, + 0.0008027192088775337, + -0.003885430982336402, + -0.0041531771421432495, + -0.01912827603518963, + -0.052204251289367676, + 0.009290165267884731, + -0.015035289339721203, + -0.0026359492912888527, + -0.021286847069859505, + 0.03735991194844246, + 0.022797849029302597, + 0.007783315144479275, + -0.0017268582014366984, + -0.004420923069119453, + 0.006903281435370445, + 0.010311336256563663, + -0.03124949149787426, + -0.0018576178699731827, + -0.02153591439127922, + 0.030934007838368416, + 0.009954340755939484, + -0.002683687023818493, + -0.01170610636472702, + 0.003659195965155959, + 0.0011332506546750665, + 0.015657953917980194, + 0.0031403081957250834, + -0.03556663542985916, + -0.03146534785628319, + -0.007251974195241928, + -0.008875054307281971, + -0.0009454133687540889, + 0.022498968988656998, + -0.029688676819205284, + 0.018364472314715385, + -0.016338735818862915, + -0.00121938600204885, + 0.02716480754315853, + -0.02562059834599495, + -0.029506029561161995, + 0.0078082215040922165, + -0.0026546292938292027, + 0.03496887907385826, + -0.023910343647003174, + -0.03231217339634895, + -0.01369033195078373, + -0.0016500628553330898, + 0.010161896236240864, + 0.01677045039832592, + -0.018746374174952507, + 0.012677463702857494, + -0.008659197948873043, + -0.006168536841869354, + -0.03423828259110451, + 0.007941056974232197, + 0.0074802846647799015, + -0.01076795719563961, + 0.02580324560403824, + 0.0058447509072721004, + -0.036894988268613815, + 0.009514324367046356, + -0.010593610815703869, + 0.0247239600867033, + 0.031564973294734955, + 0.0097550880163908, + -0.030967216938734055, + -0.004769615363329649, + 0.004404318518936634, + -0.0080074742436409, + -0.013657123781740665, + 0.010992116294801235, + 0.015018684789538383, + -0.019227901473641396, + -0.015184728428721428, + 0.022382738068699837, + 0.03995019942522049, + -0.02382732182741165, + -0.0018814867362380028, + -0.0294894240796566, + -0.014919058419764042, + 0.01909506693482399, + -0.03443753719329834, + -0.008858450688421726, + 0.004616024903953075, + -0.002949357498437166, + 0.017351603135466576, + 0.0016801583115011454, + -0.011897056363523006, + -0.044400181621313095, + -0.021037781611084938, + 0.004777917638421059, + 0.030220018699765205, + -0.015051893889904022, + 0.033590711653232574, + -0.0006377129466272891, + 0.009630555287003517, + -0.016853472217917442, + 0.008742219768464565, + -0.010975511744618416, + -0.026683280244469643, + -0.003802408929914236, + -0.020357001572847366, + 0.009182236157357693, + -0.021170616149902344, + 0.008472397923469543, + 0.03619760274887085, + -0.016554592177271843, + 0.00013225150178186595, + -0.01969282515347004, + -0.010917396284639835, + -0.018779583275318146, + 0.0015597763704136014, + -0.03407223895192146, + ], + "index": 45, + }, + { + "title": "Northern Light Group", + "text": "Northern Light Group, LLC is a company specializing in strategic research portals, enterprise search technology, and text analytics solutions. The company provides custom, hosted, turnkey solutions for its clients using the software as a service (SaaS) delivery model. Northern Light markets its strategic research portals under the tradename SinglePoint.", + "vector": [ + 0.014532499946653843, + -0.01595800556242466, + -0.024147484451532364, + -0.034728750586509705, + 0.01582406461238861, + -0.022119248285889626, + 0.009681954979896545, + 0.02110513113439083, + -0.029715565964579582, + 0.04048817604780197, + 0.014551633968949318, + 0.018923820927739143, + -0.034422602504491806, + -0.013690590858459473, + -0.006343020126223564, + 0.005783341825008392, + -0.06394682824611664, + -0.00963411945849657, + -0.020856386050581932, + -0.0009387765312567353, + 0.016895584762096405, + -0.06356413662433624, + 0.013604486361145973, + 0.04951956495642662, + 0.015230901539325714, + 0.006744840182363987, + 0.007247115485370159, + -0.0026213990058749914, + -0.0705672949552536, + 0.006175594870001078, + 0.025199871510267258, + 0.008825695142149925, + 0.049022071063518524, + 0.0353601835668087, + -0.029084132984280586, + -0.07714949548244476, + 0.02301856130361557, + -0.03007911704480648, + -0.009629336185753345, + -0.00965803675353527, + -0.014580335468053818, + -0.0022291457280516624, + -0.02508506551384926, + 0.023937007412314415, + 0.014790812507271767, + -0.0353601835668087, + 0.005419790279120207, + -0.038306865841150284, + 0.0016718592960387468, + -0.022463666275143623, + 0.014790812507271767, + -0.00440806383267045, + -0.030385266989469528, + -0.020091013982892036, + 0.04641980677843094, + 0.00011615116818575189, + 0.00877785962074995, + 0.10026372224092484, + 0.008041189052164555, + 0.015393543057143688, + -0.01236075721681118, + -0.0025974810123443604, + 0.023649992421269417, + -0.028892790898680687, + 0.026137452572584152, + 0.03400164842605591, + -0.013681023381650448, + -0.026213988661766052, + 0.020473700016736984, + -0.004123441409319639, + -0.01578579656779766, + -0.008155995048582554, + 0.013059158809483051, + 0.01947871595621109, + 0.02313336730003357, + -0.012178980745375156, + -0.013862798921763897, + -0.006357370875775814, + 0.004807492718100548, + -0.03359982743859291, + 0.08595126867294312, + -0.007419324479997158, + 0.007223197724670172, + -0.013834097422659397, + 0.027285510674118996, + -0.02110513113439083, + -0.04978744313120842, + -0.09582456946372986, + -0.016426796093583107, + 0.010179447010159492, + 0.019115164875984192, + 0.012265085242688656, + -0.026003511622548103, + 0.003073446685448289, + 0.04106220602989197, + 0.03834513574838638, + 0.04978744313120842, + 0.005587215069681406, + -0.016388526186347008, + 0.01314526330679655, + -0.005845528095960617, + 0.003161942819133401, + -0.005276282783597708, + -0.03679525479674339, + -0.00883047841489315, + 0.021717429161071777, + 0.04833323881030083, + 0.022291457280516624, + -0.006873996928334236, + 0.059507668018341064, + 0.023764798417687416, + -0.014637738466262817, + 0.00803162157535553, + -0.010830013081431389, + 0.023764798417687416, + 0.034346066415309906, + -0.01242772676050663, + -0.011662354692816734, + -0.0004708831256721169, + -0.009485828690230846, + 0.004195195157080889, + 0.008983553387224674, + -0.027055898681282997, + -0.02294202335178852, + -0.020588506013154984, + -0.018177583813667297, + 0.008261233568191528, + 0.008313852362334728, + 0.014628170989453793, + 0.04431503638625145, + -0.018837716430425644, + 0.018799448385834694, + 0.024338828399777412, + -0.025180736556649208, + -0.016551168635487556, + 0.031035833060741425, + 0.0008072282071225345, + -0.006792676169425249, + 1.5200929738057312e-05, + -0.009988103993237019, + -0.005529812071472406, + -0.007213630713522434, + -0.05005532503128052, + -0.057670775800943375, + -0.05131818726658821, + -0.04293736442923546, + -0.018349792808294296, + 0.04289909824728966, + -0.05082069709897041, + -0.045463092625141144, + -0.018244553357362747, + 0.04898380488157272, + 0.0013154830085113645, + 0.027113301679491997, + 0.0006667107227258384, + -0.008672621101140976, + -0.009586283937096596, + -0.003415472339838743, + -0.024128351360559464, + 0.006089490372687578, + 0.0088735306635499, + 0.015383975580334663, + -0.0072518992237746716, + -0.006773541681468487, + 0.01622588559985161, + 0.025659093633294106, + -0.007275816984474659, + -0.018330657854676247, + -0.06004342809319496, + 0.03903396800160408, + 0.019019491970539093, + 0.04465945437550545, + -0.014733409509062767, + -0.030825354158878326, + -0.031074101105332375, + -0.012121577747166157, + -0.002189681399613619, + 0.00984459649771452, + 0.022616740316152573, + -0.016331123188138008, + -6.974489224376157e-06, + 0.016579870134592056, + -0.01413067989051342, + -0.026960225775837898, + -0.03884262591600418, + -0.021832235157489777, + 0.11289235949516296, + 0.06440605223178864, + 0.03180120512843132, + 0.029218073934316635, + -0.03863214701414108, + -0.028835387900471687, + 0.03696746379137039, + -0.006830944679677486, + -0.003944057505577803, + 0.02835703082382679, + 0.0067544071935117245, + -0.020550236105918884, + 0.0029012379236519337, + -0.04270775616168976, + 0.04232506826519966, + 0.014685573987662792, + -0.0032719650771468878, + 0.03243263438344002, + -0.02663494274020195, + -0.0064626093953847885, + -0.017086928710341454, + -0.002750555519014597, + -0.039646267890930176, + 0.00048613076796755195, + 0.021602623164653778, + -0.03384857252240181, + -0.029658162966370583, + 0.024281425401568413, + -0.010284685529768467, + 0.0002152608649339527, + -0.03249003738164902, + -0.038134656846523285, + 0.01151884812861681, + 0.021832235157489777, + -0.0264627356082201, + 0.03941665589809418, + 0.06918962299823761, + -0.002242300659418106, + -0.012494697235524654, + 0.0016192400362342596, + -0.030806221067905426, + 0.027610793709754944, + 0.027668194845318794, + -0.00705098919570446, + -0.029122402891516685, + -0.020837251096963882, + 0.03757976368069649, + 0.023401247337460518, + -0.03861301392316818, + 0.0006553497514687479, + 0.033140603452920914, + -0.050629355013370514, + -0.00974892545491457, + -0.020856386050581932, + -0.027132434770464897, + -0.03358069434762001, + -0.024281425401568413, + 0.03172466531395912, + 0.020550236105918884, + -0.10370789468288422, + 0.019880536943674088, + -0.017306972295045853, + -0.004362619947642088, + 0.03763716667890549, + -0.018665507435798645, + 0.00895006861537695, + 0.026481868699193, + -0.02498939447104931, + 0.01059083454310894, + -0.001238945871591568, + 0.03867041692137718, + 0.027151569724082947, + 0.015470080077648163, + 0.0009100750903598964, + -0.002025843830779195, + 0.005032320506870747, + 0.04469772055745125, + 0.047108642756938934, + -0.09942181408405304, + -0.02135387808084488, + -0.013948903419077396, + -0.009997670538723469, + 0.022291457280516624, + 0.012351189740002155, + -0.0029179805424064398, + -0.06295184046030045, + 0.008691755123436451, + 0.04289909824728966, + -0.0351114384829998, + 0.040067221969366074, + 0.027955209836363792, + -0.02150695212185383, + 0.0036259496118873358, + 0.010801311582326889, + 0.011853697709739208, + -0.046725958585739136, + 0.03960799798369408, + -0.052466247230768204, + 0.006347803398966789, + 0.018875986337661743, + -0.025142468512058258, + -0.03872781991958618, + 0.007419324479997158, + -0.0013142871903255582, + -0.03132284805178642, + 0.04569270461797714, + 0.025582557544112206, + 0.005472409538924694, + 0.016417227685451508, + -0.01497258897870779, + 0.04087086021900177, + 0.015575318597257137, + -0.01770879328250885, + 0.031361114233732224, + 0.0351114384829998, + 0.0057546403259038925, + -0.09130886942148209, + -0.004553962964564562, + 0.012753009796142578, + 0.050629355013370514, + -0.0019493066938593984, + 0.07691988348960876, + -0.04194238409399986, + -0.0178618673235178, + -0.0026596675161272287, + -0.023956142365932465, + -0.00286057754419744, + -0.04446810856461525, + -0.010552565567195415, + 0.01952655240893364, + 0.03930184990167618, + 0.019823133945465088, + 0.03859388083219528, + -0.0076202345080673695, + 0.05663752555847168, + 0.0007749390788376331, + -0.04906034097075462, + 0.055642541497945786, + 0.0006912265089340508, + -0.01410197839140892, + 0.004946216009557247, + 0.0529254712164402, + 0.01923953741788864, + -0.043243516236543655, + -0.015441378578543663, + -0.01584319956600666, + -0.005902931094169617, + -0.008423875086009502, + -0.012475562281906605, + 0.0014147422043606639, + -0.004759656731039286, + 0.0019337600097060204, + 0.021966174244880676, + 0.003613990731537342, + 0.025754766538739204, + -0.04106220602989197, + -0.0001599507813807577, + -0.010284685529768467, + 0.018742045387625694, + -0.04431503638625145, + -0.013700157403945923, + 0.03352329134941101, + 0.0527723953127861, + 0.012781711295247078, + 0.0011259338352829218, + -0.0078020100481808186, + 0.024090081453323364, + 0.004106699023395777, + 0.015144797042012215, + 0.006534363143146038, + -0.0087348073720932, + -0.03742668777704239, + 0.033140603452920914, + 0.09130886942148209, + -0.010973520576953888, + -0.001518784905783832, + -0.04198065027594566, + -0.004329135175794363, + -0.07244245707988739, + 0.045156944543123245, + 0.032738786190748215, + 0.06697004288434982, + 0.036240361630916595, + 0.025314677506685257, + -0.01151884812861681, + 0.010782177560031414, + -0.0696488469839096, + 0.023496918380260468, + 0.007596316747367382, + 0.0357237346470356, + 0.05196875333786011, + 0.012006772682070732, + -0.028777984902262688, + 0.000656545627862215, + 0.025716496631503105, + 0.05135645717382431, + 0.0022602390963584185, + 0.00786419678479433, + 0.038211192935705185, + 0.010141178034245968, + 0.037943314760923386, + -0.00405168766155839, + 0.048448044806718826, + -0.018273254856467247, + -0.015489215031266212, + -0.006433907896280289, + 0.02655840665102005, + -0.014752544462680817, + -0.00703663844615221, + 0.010217715054750443, + -0.03685265779495239, + 0.020244088023900986, + -0.0035350616089999676, + -0.00786419678479433, + 0.020244088023900986, + -0.031303711235523224, + -0.0009017038391903043, + -0.022425398230552673, + -0.06953404098749161, + 0.0088496133685112, + 0.0178714357316494, + -0.020492833107709885, + 0.003951232880353928, + 0.014762111008167267, + -0.023401247337460518, + -0.06226300820708275, + -0.028835387900471687, + 0.006237781140953302, + 0.03375290334224701, + -0.03323627635836601, + -0.004149750806391239, + 0.014178515411913395, + 0.03740755468606949, + 0.002609439892694354, + 0.029103267937898636, + 0.003688136115670204, + -0.018206285312771797, + -0.020358894020318985, + -0.05449448153376579, + -0.0004499549977481365, + 0.05901017785072327, + -0.0348818264901638, + 0.0714092031121254, + -0.04768267273902893, + 0.0066396016627550125, + -0.00188712019007653, + -0.01603454165160656, + -0.02148781716823578, + 0.025563422590494156, + -0.010055073536932468, + 0.03396337851881981, + 0.06008169800043106, + -0.034403469413518906, + 0.002424076432362199, + -0.055642541497945786, + 0.050208400934934616, + -0.03164812922477722, + 0.019899670034646988, + -0.03884262591600418, + -0.0005629669176414609, + -0.01932564191520214, + -0.02097119204699993, + 0.03784764185547829, + -0.02454930543899536, + -0.004455899819731712, + -0.005816826596856117, + 0.00790724903345108, + -0.016292855143547058, + 0.003267181571573019, + 0.012112011201679707, + 0.014618604443967342, + -0.009452343918383121, + 0.03321714326739311, + 0.011317937634885311, + -0.013614053837954998, + 0.022195786237716675, + 0.03335108235478401, + -0.04768267273902893, + -0.059431131929159164, + -0.018818583339452744, + -0.05828307196497917, + -0.017096495255827904, + 0.012733875773847103, + 0.015470080077648163, + -0.034422602504491806, + -0.0002616017300169915, + 0.04297563433647156, + 0.023439515382051468, + -0.006797459442168474, + -0.020244088023900986, + 0.025793034583330154, + -0.01595800556242466, + 0.00969152245670557, + -0.003472875105217099, + -0.013489680364727974, + 0.027457717806100845, + -0.02489372156560421, + 0.04064125195145607, + 0.022731546312570572, + 0.012829546816647053, + -0.01589103415608406, + -0.012743443250656128, + 0.04944302886724472, + -0.006716138683259487, + -0.00523801427334547, + -0.009189247153699398, + -0.0359342135488987, + -0.0262905266135931, + -0.02663494274020195, + 0.029581625014543533, + -0.04316697642207146, + -0.012025906704366207, + -0.020588506013154984, + -0.012848681770265102, + 0.02655840665102005, + 0.04416196048259735, + 0.05713501572608948, + 0.020760713145136833, + -0.03715880960226059, + 0.04802709072828293, + -0.019134297966957092, + 0.032738786190748215, + -0.01416894793510437, + 0.012733875773847103, + 0.043587930500507355, + -0.008658270351588726, + -0.05801519379019737, + -0.0018345009302720428, + 0.02301856130361557, + 0.01968919299542904, + -0.032509174197912216, + -0.034518275409936905, + 0.003582897363230586, + -0.005376738030463457, + 0.008509979583323002, + -0.009567148983478546, + -0.016465064138174057, + 0.016340691596269608, + 0.04289909824728966, + 0.020378027111291885, + 0.004714212846010923, + 0.01147101167589426, + 0.03241350129246712, + 0.017086928710341454, + -0.00751977926120162, + 0.07443241775035858, + 0.026941092684864998, + 0.018866417929530144, + -0.03023219108581543, + 0.04251641035079956, + 0.009949835017323494, + -0.012619069777429104, + 0.005228447262197733, + -0.020033610984683037, + -0.02320990338921547, + -0.008026838302612305, + -0.00016712614160496742, + 0.026271391659975052, + -0.032949261367321014, + 0.04377927631139755, + 0.0527723953127861, + -0.007242332212626934, + 0.014771678484976292, + 0.01413067989051342, + -0.016761645674705505, + 0.018522001802921295, + 0.020531103014945984, + -0.018215851858258247, + 0.02328644134104252, + -0.007256682496517897, + 0.01953611895442009, + 0.005615916568785906, + -0.013508814387023449, + 0.02137301117181778, + 0.0264053326100111, + 0.01497258897870779, + -0.006902698427438736, + -0.005912498105317354, + -0.026137452572584152, + 0.0007157423533499241, + 0.009614985436201096, + 0.04309044033288956, + -0.039531461894512177, + -0.00010964849934680387, + 0.03126544505357742, + 0.010858714580535889, + -0.020052744075655937, + -0.01059083454310894, + -0.038000717759132385, + 0.005041887518018484, + -0.004757265094667673, + -0.013040024787187576, + -0.030978430062532425, + -0.008897448889911175, + -0.008251666091382504, + -0.032585710287094116, + 0.009968969970941544, + 0.05820653587579727, + -0.047032106667757034, + -0.012150279246270657, + -0.0010589638259261847, + 0.014676007442176342, + 0.0016706634778529406, + -0.024511035531759262, + 0.0131835313513875, + 0.0061086248606443405, + 0.04389408230781555, + -0.0037048785015940666, + 0.003075838554650545, + 0.05548946559429169, + 0.011136162094771862, + 0.04018202796578407, + -0.004592231474816799, + -0.013384441845119, + -0.005563297308981419, + 0.00153433158993721, + 0.020741580054163933, + 0.006213863380253315, + 0.003260006196796894, + 0.011136162094771862, + 0.01965092495083809, + 0.00286057754419744, + 0.01933520846068859, + -0.0024826752487570047, + -0.028012612834572792, + -0.02477891743183136, + 0.030557474121451378, + -0.00264053326100111, + 0.004190411418676376, + 0.01411154493689537, + 0.01065780408680439, + 0.040220294147729874, + -0.03233696520328522, + -0.010428193025290966, + -0.004745305981487036, + -0.04485079646110535, + 0.005290633533149958, + -0.002566387876868248, + 0.026080049574375153, + 0.009461910463869572, + 0.022655010223388672, + 0.018435897305607796, + 0.0017196950502693653, + 0.0022064237855374813, + 0.013403575867414474, + -0.012676472775638103, + -0.03403991833329201, + 0.03369550034403801, + 0.008122509345412254, + -0.020052744075655937, + 0.013097427785396576, + 0.02110513113439083, + 0.014388992451131344, + 0.04423849657177925, + -0.006586982402950525, + 0.007438458502292633, + -0.006218647118657827, + 0.04198065027594566, + -0.005917281843721867, + -0.05200702324509621, + 0.013547083362936974, + -0.008993119932711124, + 0.059507668018341064, + -0.013097427785396576, + -0.022176651284098625, + 0.04488906264305115, + 0.04205719009041786, + -0.0004224494332447648, + 0.0053193350322544575, + -0.016407661139965057, + -0.016426796093583107, + -0.0001765438064467162, + 0.005434140563011169, + 0.03403991833329201, + 0.020569371059536934, + 0.009380590170621872, + -0.02655840665102005, + -0.003341326955705881, + 0.016455497592687607, + -0.0009919938165694475, + -0.012599935755133629, + 0.03203081712126732, + -0.02148781716823578, + 0.0024826752487570047, + -0.021985309198498726, + 0.003169118193909526, + 0.008476493880152702, + -0.00619472935795784, + -0.009040956385433674, + -0.025295542553067207, + 0.04263121634721756, + -0.006845295429229736, + -0.03417385742068291, + 0.04259295016527176, + -0.025639960542321205, + -0.011872832663357258, + 0.026271391659975052, + -0.018694208934903145, + -0.037905044853687286, + 0.00526671577244997, + 0.01143274363130331, + -0.017115630209445953, + -0.01503955852240324, + -0.01607281155884266, + 0.005132775753736496, + -0.007567615248262882, + 0.02131560817360878, + -0.011337071657180786, + 0.009710656479001045, + -0.05013186112046242, + -0.008395173586905003, + 0.01929694041609764, + -0.019009925425052643, + -0.027821270748972893, + -0.021947041153907776, + -0.007161011453717947, + 0.014991723001003265, + -0.006170811131596565, + -0.03671871870756149, + 0.017316540703177452, + -0.004790749866515398, + 0.0007976610795594752, + 0.010418625548481941, + 0.031208040192723274, + -0.013700157403945923, + 0.0013011322589591146, + 0.012006772682070732, + 0.016283288598060608, + -0.004310000687837601, + -0.014149813912808895, + 0.034613944590091705, + 0.010801311582326889, + -0.004046903923153877, + 0.00266923476010561, + 0.021564355120062828, + 0.04890726879239082, + -0.023726530373096466, + -0.04588404670357704, + -0.03206908330321312, + -0.023898739367723465, + 0.0019528943812474608, + 0.01149014662951231, + 0.0027601225301623344, + 0.001563032972626388, + 0.000700195727404207, + -0.027763867750763893, + 0.032719649374485016, + 0.009423642419278622, + 0.014063709415495396, + -0.001039829570800066, + -0.016426796093583107, + 0.022329727187752724, + 0.041368354111909866, + -0.04381754249334335, + 0.029696431010961533, + 0.02475978247821331, + 0.03025132603943348, + -0.05457102134823799, + -0.0046113659627735615, + -0.002729029394686222, + -0.0018560269381850958, + 0.018483731895685196, + 0.036240361630916595, + -0.010552565567195415, + -0.02146868221461773, + -0.023401247337460518, + -0.011145728640258312, + -0.052274905145168304, + -0.020511968061327934, + -0.0030949728097766638, + 0.010026372037827969, + 0.004429589956998825, + 0.010122044011950493, + 0.01600584015250206, + -0.01612064614892006, + 0.011346639133989811, + -0.030653147026896477, + -0.0035278862342238426, + 0.034767020493745804, + -0.023382112383842468, + -0.05529812350869179, + -0.027323778718709946, + -0.011183997616171837, + 0.015393543057143688, + 0.045042138546705246, + -0.03141851723194122, + 0.012064175680279732, + -0.053078543394804, + -0.0043937130831182, + 0.00010479018237674609, + 0.00667787017300725, + 0.013097427785396576, + -0.018234986811876297, + -0.004886421374976635, + -0.04921341687440872, + 0.028012612834572792, + 0.039722803980112076, + -0.005979468114674091, + 0.004343485925346613, + -0.01415938138961792, + 0.04749133065342903, + 0.005419790279120207, + 0.02807001583278179, + -0.010705639608204365, + 0.009337537921965122, + 0.01576666161417961, + -0.024051813408732414, + 0.03419299051165581, + 0.005147126503288746, + 0.0026046563871204853, + 0.06727619469165802, + -0.013814963400363922, + -0.015651855617761612, + 0.0037933746352791786, + 0.08266016840934753, + -0.010102909989655018, + -0.009696305729448795, + -0.010303819552063942, + -0.002227949909865856, + -0.04978744313120842, + -0.029371147975325584, + -0.039990682154893875, + -0.027304643765091896, + 0.01957438699901104, + 0.029505088925361633, + 0.0030327863059937954, + 0.013059158809483051, + -0.005945983342826366, + 0.032681383192539215, + -0.0032791404519230127, + -0.026156585663557053, + 0.004329135175794363, + -0.023898739367723465, + -0.016847750172019005, + -0.03327454626560211, + 0.016560735180974007, + 0.020014476031064987, + 0.006170811131596565, + -0.0360681526362896, + 0.03206908330321312, + -0.007711122278124094, + -0.03719707578420639, + -0.025563422590494156, + -0.036412570625543594, + -0.010887416079640388, + 0.013547083362936974, + -0.01140404213219881, + -0.024070948362350464, + -0.0359150767326355, + -0.007754174526780844, + -0.002705111401155591, + 0.046725958585739136, + 0.013929769396781921, + 0.007586749270558357, + -0.018110614269971848, + 0.02841443382203579, + 0.06176551431417465, + -0.014149813912808895, + -0.01231292076408863, + 0.012934786267578602, + -0.008581733331084251, + -0.01059083454310894, + -0.0069170487113296986, + 0.029313744977116585, + 0.005381521303206682, + 0.027591658756136894, + 0.001157625112682581, + 0.018579404801130295, + 0.005348036531358957, + -0.03415472432971001, + -0.015345707535743713, + 0.04289909824728966, + -0.029485953971743584, + 0.0009339929674752057, + 0.005415006540715694, + 0.00895006861537695, + 0.023956142365932465, + 0.004819451365619898, + 0.010189013555645943, + -0.0043674036860466, + -0.0036474757362157106, + -0.0358385406434536, + 0.06241608038544655, + 0.04251641035079956, + 0.0012652555014938116, + -0.029313744977116585, + 0.034843556582927704, + 0.010361222550272942, + -0.01624501869082451, + -0.027591658756136894, + -0.0019995342008769512, + -0.01435072347521782, + 0.041674502193927765, + 0.00806032307446003, + -0.02150695212185383, + -0.0018105830531567335, + -0.016551168635487556, + -0.0044224145822227, + -0.016828615218400955, + -0.013011323288083076, + -0.013106994330883026, + 0.0032002113293856382, + 0.016599003225564957, + -0.03886175900697708, + -0.00406603841111064, + -0.01154754962772131, + 0.017287839204072952, + -0.006132542621344328, + 0.0009202401852235198, + 0.05801519379019737, + -0.03363809734582901, + -0.027783000841736794, + 0.007998136803507805, + -0.01575709506869316, + 7.418277527904138e-05, + -0.0089070163667202, + 0.027668194845318794, + -0.01604411005973816, + 0.047146912664175034, + -0.029792102053761482, + -0.009270567446947098, + 0.007342786993831396, + -0.013508814387023449, + 0.02290375530719757, + -0.03683352470397949, + 0.03182033821940422, + 0.010523864068090916, + -0.0016359825385734439, + 0.016474630683660507, + 0.008710889145731926, + -0.006333452649414539, + 0.05828307196497917, + -0.00987329799681902, + 0.02477891743183136, + 0.027476852759718895, + 0.0014637738931924105, + -0.03214562311768532, + -0.02091378904879093, + -0.06371721625328064, + 0.010849147103726864, + 0.040143758058547974, + -0.006271266378462315, + -0.005539379548281431, + 0.02454930543899536, + 0.009461910463869572, + 0.0035948562435805798, + -0.007845062762498856, + 0.012465995736420155, + 0.024013545364141464, + -0.010734341107308865, + 0.031131504103541374, + 0.003353285836055875, + -0.052313171327114105, + -0.010160312987864017, + 0.012198115698993206, + 0.024262290447950363, + 0.006864429451525211, + -0.012800845317542553, + 0.01799580827355385, + 0.00813207682222128, + -0.004702253732830286, + -0.027266375720500946, + 0.03400164842605591, + 0.01326006930321455, + 0.004245422314852476, + 0.024032678455114365, + 0.009409291669726372, + -0.0032815320882946253, + -0.033083200454711914, + -0.043396588414907455, + -0.019029060378670692, + -0.018713343888521194, + 0.011633653193712234, + 0.004790749866515398, + 0.013747993856668472, + 0.007706338539719582, + 0.006783108692616224, + 0.0003710260207299143, + -0.02462584152817726, + 0.02120080217719078, + -0.0018536351853981614, + 0.005711588077247143, + 0.04622846469283104, + 0.014360290952026844, + 0.01626415364444256, + 0.022406263276934624, + -0.0071083917282521725, + 0.027744732797145844, + 0.048448044806718826, + 6.65963307255879e-05, + -0.0014613820239901543, + 0.020186685025691986, + 0.009514530189335346, + 0.016484199091792107, + 0.04787401482462883, + -0.0010350459488108754, + -0.02129647508263588, + -0.016886018216609955, + 0.019899670034646988, + 0.004556355066597462, + -0.03369550034403801, + 0.03876608982682228, + -0.013671455904841423, + 0.013747993856668472, + -0.0035135354846715927, + 0.020894654095172882, + 0.020511968061327934, + -0.02324817329645157, + -0.007969435304403305, + 0.0699549987912178, + 0.013394009321928024, + -0.040067221969366074, + 0.020033610984683037, + -0.022616740316152573, + 0.0020019260700792074, + -0.03417385742068291, + 0.0011887182481586933, + 0.04431503638625145, + -0.05185394734144211, + -0.05614003166556358, + -0.011346639133989811, + 0.026711480692029, + -0.004941432736814022, + 0.04289909824728966, + -0.008576949127018452, + 0.04974917694926262, + 0.02311423234641552, + 0.009337537921965122, + -0.023477783426642418, + -0.011107460595667362, + 0.009155761450529099, + 0.009710656479001045, + 0.01576666161417961, + -0.015460513532161713, + 0.01967005804181099, + -0.007027070969343185, + 0.003613990731537342, + -0.008266016840934753, + 0.004077997524291277, + 0.01788100227713585, + -0.022195786237716675, + 0.0032552224583923817, + 0.06811810284852982, + -0.016790347173810005, + 0.0018667900003492832, + 0.001274822629056871, + 0.009538447484374046, + 0.010810879059135914, + 0.020492833107709885, + 0.002676409902051091, + 0.02472151443362236, + -0.04752959683537483, + -0.04044990614056587, + 0.0349774993956089, + 0.012714741751551628, + 0.03145678713917732, + 0.04397061839699745, + 0.06142110005021095, + -0.028988461941480637, + 0.008093807846307755, + -0.03386770933866501, + 0.0019026667578145862, + -0.005888580344617367, + -0.004790749866515398, + -0.008940501138567924, + 0.0021789183374494314, + 0.015460513532161713, + 0.038134656846523285, + -0.0025926975067704916, + -0.018081912770867348, + 0.00036534550599753857, + 0.00977762695401907, + -0.012982621788978577, + 0.013097427785396576, + 0.0016622921684756875, + 0.005285849794745445, + 0.0021406495943665504, + 0.003405905095860362, + 0.007481510750949383, + 0.008730024099349976, + -0.04982571303844452, + -0.007218413986265659, + -0.01414024643599987, + -0.023669127374887466, + -0.018474165350198746, + 0.012035474181175232, + 0.016799913719296455, + 0.01231292076408863, + -0.005108857527375221, + 0.03212648630142212, + -0.009423642419278622, + -0.00035278862924315035, + -0.016350258141756058, + 0.0179766733199358, + -0.009256216697394848, + -0.01924910396337509, + -0.006520012393593788, + 0.005348036531358957, + 0.027342911809682846, + -0.005611132830381393, + 0.01576666161417961, + -0.00978719349950552, + 0.002485067117959261, + 0.0004831410478800535, + -0.025104200467467308, + 0.030614877119660378, + 0.004463075194507837, + -0.03344675526022911, + 0.014025440439581871, + 0.008993119932711124, + -0.011509280651807785, + 0.07404973357915878, + -0.00717536173760891, + -0.0016359825385734439, + 0.009375805966556072, + -0.01411154493689537, + -0.005123208276927471, + 0.03700573369860649, + -0.002999301301315427, + -0.008500412106513977, + -0.01613021455705166, + -0.0037503226194530725, + -0.009433208964765072, + -0.025754766538739204, + -0.009514530189335346, + 0.014666439965367317, + 0.010083775036036968, + -0.02307596430182457, + 0.023975275456905365, + -0.00027640091138891876, + 0.00874915812164545, + -0.027266375720500946, + 0.020894654095172882, + 0.012112011201679707, + 0.015537050552666187, + 0.01506826002150774, + 0.021621758118271828, + 0.0024587572552263737, + -0.026960225775837898, + 0.017240002751350403, + -0.0005656576831825078, + 0.0013465762604027987, + 0.01254253275692463, + 0.01972746104001999, + -0.013709724880754948, + 0.006266482640057802, + -0.003391554346308112, + -0.053652573376894, + -0.00201986450701952, + -0.020091013982892036, + -0.007467160001397133, + -0.02498939447104931, + 0.017278270795941353, + 0.031016698107123375, + 0.008591299876570702, + -0.04236333817243576, + -0.0033006665762513876, + -0.012733875773847103, + 0.02288462035357952, + -0.0348818264901638, + -0.00580725958570838, + -0.01326006930321455, + -0.018885552883148193, + -0.005013186018913984, + -0.056101761758327484, + 0.0009082812466658652, + 0.033064067363739014, + 0.011920668184757233, + -0.004659201484173536, + -0.026309659704566002, + 0.01411154493689537, + -0.0043961051851511, + -0.014695141464471817, + -0.03409732133150101, + -0.009337537921965122, + 0.01323136780411005, + 0.02127734012901783, + -0.004391321446746588, + -0.03170553222298622, + -0.0030471370555460453, + -0.013795829378068447, + -0.007749390788376331, + 0.008868747390806675, + 0.023898739367723465, + 0.023630859330296516, + -0.010112476535141468, + -0.011758026666939259, + -0.010877848602831364, + 0.016981689259409904, + 0.03382943943142891, + 0.016378959640860558, + 0.00670657167211175, + 0.025180736556649208, + -0.021908771246671677, + -0.007146660704165697, + -0.0029610327910631895, + 0.0012293786276131868, + -0.03176293522119522, + -0.0011624086182564497, + -0.018464598804712296, + 0.01605367660522461, + -0.02125820517539978, + 0.02271241322159767, + -0.02674974873661995, + 0.019899670034646988, + 0.016857316717505455, + 0.0008753941510803998, + 0.030595744028687477, + 0.027936076745390892, + -0.02114339917898178, + -0.020626774057745934, + 0.016321556642651558, + -0.008576949127018452, + 0.000435006309999153, + -0.017010390758514404, + -0.0018380885012447834, + 0.024300558492541313, + 0.03182033821940422, + -0.02807001583278179, + 0.011222265660762787, + -0.018148882314562798, + -0.01414024643599987, + -0.03195427730679512, + 0.033025797456502914, + 0.02456843852996826, + 0.004668768960982561, + 0.0021430414635688066, + 0.03159072622656822, + 0.02665407769382, + 0.005061022005975246, + -0.006845295429229736, + -0.004960566759109497, + 0.0349966324865818, + -0.0353410504758358, + 0.0019098421325907111, + -0.0013908243272453547, + -0.0065630641765892506, + 0.010466461069881916, + -0.0008664249326102436, + 0.001171377836726606, + 0.018292389810085297, + -0.02829962782561779, + 0.034422602504491806, + -0.030882757157087326, + -0.010313387028872967, + -0.018416762351989746, + 0.003618774237111211, + 0.0029179805424064398, + -0.00706533994525671, + 0.011710191145539284, + 0.05101203918457031, + -0.000342922518029809, + 0.011040490120649338, + 0.02143041417002678, + 0.002453973749652505, + -0.020091013982892036, + -0.002779256785288453, + 0.017144331708550453, + -0.004233463667333126, + 6.226121331565082e-05, + 0.0003548814565874636, + 0.003929706756025553, + -0.02479805052280426, + 0.0177279282361269, + -0.023362979292869568, + 0.006429124157875776, + -0.029352014884352684, + -0.006271266378462315, + -0.02506593056023121, + 0.031361114233732224, + 0.0028725366573780775, + 0.02843356691300869, + 0.002683585276827216, + 0.004379362799227238, + -0.02474064752459526, + 0.0008389194263145328, + -0.014235918410122395, + -0.020282356068491936, + -0.00664916867390275, + 0.0021777222864329815, + -0.004058863036334515, + -0.010102909989655018, + 0.02114339917898178, + -0.03771370276808739, + 0.004166493657976389, + -0.0015977139119058847, + 0.019823133945465088, + 0.005386305041611195, + 0.027629926800727844, + -0.006763974670320749, + 0.009418858215212822, + -0.04209545627236366, + 0.004946216009557247, + 0.036221228539943695, + -0.004565922077745199, + 0.012293786741793156, + -0.007687204517424107, + 0.029677297919988632, + -0.004185627680271864, + 0.01047602854669094, + 0.016799913719296455, + -0.029218073934316635, + -0.003348502330482006, + 0.010992654599249363, + -0.045118674635887146, + -0.022731546312570572, + 0.02282721735537052, + -0.07619277387857437, + -0.005199745763093233, + 0.015508349053561687, + -0.03025132603943348, + -0.0017747061792761087, + -0.02665407769382, + 0.0029084132984280586, + -0.016579870134592056, + 0.0017687267391011119, + -0.014723842963576317, + -0.03214562311768532, + 0.02870144695043564, + 0.020741580054163933, + -0.007027070969343185, + 0.009519313462078571, + -0.027610793709754944, + 0.039531461894512177, + -0.018273254856467247, + 0.013881933875381947, + -0.011738891713321209, + 0.05652271956205368, + -0.014838648959994316, + 0.003429823089390993, + 0.029390282928943634, + 0.004226288292557001, + -0.013499247841536999, + -0.0022889403626322746, + 0.003164334688335657, + 0.0008951264317147434, + 0.00990199949592352, + -0.022387130185961723, + -0.010370790027081966, + 0.004173669032752514, + -0.02102859504520893, + 0.012676472775638103, + -0.02481718547642231, + 0.023516053333878517, + 0.022769814357161522, + -0.054150063544511795, + -0.018990790471434593, + -0.02298029325902462, + -0.01320266630500555, + -0.02135387808084488, + 0.025314677506685257, + 0.011002222076058388, + -0.010284685529768467, + -0.020014476031064987, + 0.01603454165160656, + -0.01596757210791111, + -0.0003997274616267532, + -0.020722445100545883, + -0.016943421214818954, + 0.02154522016644478, + -0.006921832449734211, + 0.009323187172412872, + 0.03394424542784691, + -0.014704708009958267, + 0.0180053748190403, + -0.023477783426642418, + -0.00265488401055336, + -0.023362979292869568, + -0.003252830822020769, + 0.006520012393593788, + -0.026041779667139053, + -0.0264627356082201, + 0.032662246376276016, + 0.023898739367723465, + -0.0011438722722232342, + -0.0029682081658393145, + -0.007161011453717947, + -0.03304493427276611, + 0.013891500420868397, + 0.015106528997421265, + 0.004661593586206436, + 0.0035494123585522175, + -0.004171276930719614, + -0.018301956355571747, + -0.029026729986071587, + 0.03337021544575691, + 0.032738786190748215, + 0.040143758058547974, + 0.0008568578050471842, + 0.002094009891152382, + 0.009366239421069622, + -0.010456894524395466, + -0.002235125284641981, + 0.01054299809038639, + 0.004774007480591536, + -0.026003511622548103, + 0.01804364286363125, + -0.015613587573170662, + 0.03912964090704918, + -0.011576250195503235, + 0.01328877080231905, + -0.025735631585121155, + -0.023420382291078568, + -0.005434140563011169, + 0.01320266630500555, + -0.014035007916390896, + -0.016369393095374107, + -0.00011271297989878803, + -0.019009925425052643, + -0.00045772831072099507, + 0.014494230970740318, + 0.018502866849303246, + -0.0005758227780461311, + 0.029658162966370583, + -0.023707395419478416, + -0.007902465760707855, + -0.010275118052959442, + 0.019765730947256088, + 0.03382943943142891, + 0.020091013982892036, + 0.00011353515583323315, + -0.011030923575162888, + 0.008548247627913952, + 0.03702486678957939, + 0.013374874368309975, + 0.005902931094169617, + 0.0027242456562817097, + 0.006103841122239828, + -0.01608237810432911, + 0.03145678713917732, + 0.006950533948838711, + -0.007811577524989843, + 0.01603454165160656, + -0.04439157247543335, + 0.01792883686721325, + -0.041444890201091766, + -0.01970832794904709, + -0.018675075843930244, + 0.005606349557638168, + -0.03736928477883339, + -0.010724774561822414, + -0.029428550973534584, + 0.04634327068924904, + 0.01518306601792574, + -0.001533135655336082, + 0.03342761844396591, + 0.022501934319734573, + 0.008414307609200478, + -0.00972979050129652, + -0.016522467136383057, + -0.012322488240897655, + -0.008275584317743778, + -0.013757560402154922, + -0.04240160435438156, + -0.017000824213027954, + -0.015163931995630264, + 0.006371721625328064, + -0.03717794269323349, + 0.01613978110253811, + -0.006338236387819052, + -0.024090081453323364, + -0.00797900278121233, + 0.0016599004156887531, + -0.025372080504894257, + -0.06677870452404022, + -0.043626200407743454, + -0.03185860812664032, + -0.010935251601040363, + -0.005056238267570734, + 0.006697004660964012, + 0.025888705626130104, + -0.014465529471635818, + 0.018388060852885246, + -0.0178044643253088, + -0.03229869529604912, + 0.041865844279527664, + 0.000154718742123805, + -0.0006427928456105292, + -0.008356904610991478, + -0.013212232850492, + -0.009251433424651623, + -0.005816826596856117, + 0.020511968061327934, + 0.030461803078651428, + 0.02851010486483574, + 0.026424465700984, + 0.027553390711545944, + 0.019038626924157143, + -0.015374409034848213, + -0.043320052325725555, + 0.011604951694607735, + -0.005596782546490431, + -0.05885710194706917, + -0.01970832794904709, + 0.006328669376671314, + 0.04442984238266945, + -0.00490794749930501, + -0.011719757691025734, + 0.007696771528571844, + -0.022138383239507675, + 0.020033610984683037, + 0.034900959581136703, + 0.0013214624486863613, + -0.01796710677444935, + -0.005926848854869604, + -0.002992125926539302, + -0.0017340457998216152, + -0.008285150863230228, + -0.009428425692021847, + -0.02114339917898178, + 0.011738891713321209, + 0.016254587098956108, + 0.007778092287480831, + -0.00378859112970531, + 0.010447327047586441, + -0.015383975580334663, + 0.039799340069293976, + -0.03669958561658859, + 0.002463540993630886, + -0.0019923588261008263, + -0.008151210844516754, + 0.006094274111092091, + 0.020741580054163933, + -0.019067328423261642, + -0.016924286261200905, + -0.027649061754345894, + 0.01060040108859539, + -0.008940501138567924, + 0.0008981161518022418, + 0.0021262988448143005, + -0.009170112200081348, + 0.0011988834012299776, + 0.01064823754131794, + 0.013470546342432499, + 0.02133474312722683, + -0.0071083917282521725, + -0.04427676647901535, + -0.017144331708550453, + -0.011758026666939259, + -0.032987531274557114, + -0.00980632845312357, + -0.0063669378869235516, + 0.005123208276927471, + 0.016532033681869507, + -0.009342321194708347, + -0.01575709506869316, + -0.010830013081431389, + -0.009681954979896545, + 0.009519313462078571, + -0.027036763727664948, + ], + "index": 46, + }, + { + "title": "Vitelline membrane", + "text": "The vitelline membrane is a structure directly adjacent to the outer surface of the plasma membrane of an ovum. It is composed mostly of protein fibers, with protein receptors needed for sperm binding which, in turn, are bound to sperm plasma membrane receptors.", + "vector": [ + -0.056395791471004486, + 0.0002140840661013499, + -0.0029928055591881275, + 0.029788170009851456, + -0.019245248287916183, + 0.021085841581225395, + 0.02456088364124298, + -0.025665240362286568, + -0.025356018915772438, + -0.03645848110318184, + 0.030863076448440552, + 0.06461220234632492, + 0.0029375876765698195, + -0.03371967747807503, + -0.014827823266386986, + 0.052479010075330734, + -0.006519383285194635, + 0.005823638755828142, + -0.03115757182240486, + -0.014032687060534954, + -0.007137822452932596, + -0.0053414031863212585, + -0.0068470085971057415, + -0.0015497799031436443, + 0.027461659163236618, + 0.0004465740639716387, + 0.008142787031829357, + 0.00024387867597397417, + -0.009298679418861866, + 0.037842608988285065, + 0.013797091320157051, + 0.012670647352933884, + 0.03198215737938881, + 0.03731251507997513, + -0.03133426979184151, + -0.02248469367623329, + -0.0656723827123642, + 0.0013169448357075453, + 0.02635730244219303, + -0.0650244951248169, + 0.05377478897571564, + 0.028006475418806076, + -0.00337012717500329, + 0.015932179987430573, + -0.0058310008607804775, + 0.04037526622414589, + 0.015770208090543747, + 0.024619782343506813, + -0.023265104740858078, + -0.021777905523777008, + 0.07391824573278427, + 0.005094763357192278, + 0.011153997853398323, + 0.020290706306695938, + -0.025915559381246567, + 0.0031915896106511354, + -0.006283787079155445, + 0.07656870037317276, + -0.0004104523977730423, + -0.05230231210589409, + -0.02186625450849533, + -0.0055806804448366165, + -0.0005876095383428037, + 0.003151096636429429, + 0.009747784584760666, + 0.04299626871943474, + -0.0053229969926178455, + -0.024737579748034477, + -0.004767138045281172, + 0.023559600114822388, + 0.03280674293637276, + -0.015475712716579437, + -0.0020412185695022345, + 0.0013381117023527622, + -0.03801930323243141, + 0.045646727085113525, + -0.0008328686817549169, + 0.04013966768980026, + 0.026460375636816025, + -0.02210184931755066, + -0.016845114529132843, + 0.01830286532640457, + -0.0018378328531980515, + 0.049210116267204285, + 0.03863774612545967, + 0.014238833449780941, + 0.02905193157494068, + -0.030627479776740074, + -0.02961147204041481, + -0.011750350706279278, + 0.009983380325138569, + 0.04611791670322418, + 0.019907861948013306, + 0.032129403203725815, + 0.01046929694712162, + 0.0058346823789179325, + 0.05866340547800064, + 0.0005728848045691848, + -0.02064410038292408, + 0.004829718265682459, + 0.0007877741591073573, + -0.008113337680697441, + -0.006486252415925264, + 0.015254841186106205, + -0.01348050870001316, + 0.021763181313872337, + 0.022352170199155807, + -0.03536884859204292, + 0.017124883830547333, + 0.007318201009184122, + -0.007299794815480709, + -0.03645848110318184, + 0.03268894553184509, + -0.03048023208975792, + 0.002087233355268836, + -0.020526301115751266, + -0.06101936474442482, + 0.04025746509432793, + -0.04332021623849869, + -0.0057868268340826035, + 0.04479268938302994, + -0.019215798005461693, + -0.009283955208957195, + 0.018391212448477745, + -0.021071117371320724, + 0.005418708082288504, + -0.03607563674449921, + 0.014805736020207405, + 0.022249097004532814, + 0.015284290537238121, + -0.02693156711757183, + -0.007502260152250528, + 0.04314351826906204, + 0.009276592172682285, + 0.0262984037399292, + -0.0001463272055843845, + 0.001481677987612784, + 0.02696101740002632, + -0.012236267328262329, + 0.060901567339897156, + -0.011492667719721794, + 0.01584383100271225, + -0.025841936469078064, + 0.07768778502941132, + 0.005297228693962097, + -0.05186057090759277, + -0.02300005964934826, + 0.00709732947871089, + 0.02628367953002453, + -0.031039772555232048, + 0.040581412613391876, + -0.051330480724573135, + 0.01509286928921938, + 0.013215463608503342, + -0.007020024582743645, + -0.048945069313049316, + 0.011603103019297123, + -0.010690168477594852, + 0.0904688611626625, + 0.009909756481647491, + 0.0017881368985399604, + -0.05716148018836975, + -0.06802834570407867, + 0.0016730997012928128, + 0.030067939311265945, + -0.017772773280739784, + -0.001262647332623601, + -0.005808914080262184, + -0.03698857128620148, + -0.005661666393280029, + -0.003533940063789487, + -0.009063083678483963, + -0.0018599199829623103, + -0.021777905523777008, + -0.015726033598184586, + -0.010395674034953117, + -0.016506444662809372, + 0.020747173577547073, + -0.015056056901812553, + -0.04464544355869293, + -0.007980814203619957, + -0.0395212285220623, + 0.01541681308299303, + 0.015637684613466263, + -0.006302193272858858, + 0.016977636143565178, + 0.0009156953892670572, + 0.02336817793548107, + -0.012022758834064007, + -0.0191127248108387, + 0.027667805552482605, + -0.0066408622078597546, + 0.07621530443429947, + 0.031245918944478035, + 0.024958452209830284, + -0.032747846096754074, + 0.02039377950131893, + 0.010866865515708923, + -0.0017356799216941, + -0.05085928738117218, + -0.009040996432304382, + -0.01640337146818638, + -0.00303145800717175, + 0.02962619811296463, + -0.05227286368608475, + 0.04223058372735977, + -0.018641533330082893, + -0.05981193482875824, + -0.025208773091435432, + -0.03790150582790375, + -0.004340120125561953, + -0.0205851998180151, + -0.013789728283882141, + 0.0395212285220623, + -0.03321903571486473, + -0.01939249597489834, + -0.05780936777591705, + -0.0911167562007904, + 0.03286564350128174, + 0.020806072279810905, + -0.02179262973368168, + 0.021174190565943718, + 0.010108540765941143, + 0.027137715369462967, + -0.019893137738108635, + -0.02065882459282875, + -0.012405602261424065, + -0.03410252183675766, + -0.029493674635887146, + -0.006033466197550297, + 0.01178716216236353, + 0.0025621065869927406, + 0.05557120591402054, + -0.03472096100449562, + -0.05651359260082245, + -0.04334966465830803, + 0.0347798615694046, + -0.014312457293272018, + 0.02487010322511196, + -0.03919728472828865, + 0.053156349807977676, + -0.027711980044841766, + -0.005779464263468981, + 0.0006865414907224476, + -0.004086118191480637, + 0.023471251130104065, + -0.041759390383958817, + 0.003533940063789487, + -0.01647699624300003, + -0.026740146800875664, + 0.07268136739730835, + -0.012089019641280174, + 0.04214223474264145, + 0.03221775218844414, + 0.02484065294265747, + 0.053068000823259354, + -0.0061034089885652065, + -0.038137104362249374, + -0.05474662035703659, + 0.010270513594150543, + -0.010999388061463833, + 0.0023320321924984455, + -0.004995371680706739, + 0.009099895134568214, + 0.010955214500427246, + -0.0188624057918787, + 0.03698857128620148, + -0.009629986248910427, + 0.016638968139886856, + 0.00433275755494833, + 0.006489933468401432, + -0.021984051913022995, + 0.042024437338113785, + -0.023485977202653885, + 0.019878413528203964, + 0.04847387596964836, + 0.004251771606504917, + -0.013509958051145077, + 0.01646227017045021, + -0.01046929694712162, + -0.005028502084314823, + -0.016580069437623024, + -0.05203726515173912, + -0.0009626305545680225, + 0.018700432032346725, + 0.05719092860817909, + 0.006802834570407867, + -0.027711980044841766, + -0.026563448831439018, + -0.02036432921886444, + -0.0013555972836911678, + 0.03445591405034065, + -0.016020528972148895, + -0.01734575629234314, + 0.021925153210759163, + 0.017154334113001823, + -0.02933170273900032, + 0.0032136766240000725, + -0.029537849128246307, + -0.0329834409058094, + -0.0008775030728429556, + -0.005632217042148113, + -0.028845785185694695, + 0.023500701412558556, + -0.023132583126425743, + -0.01858263462781906, + -0.023839371278882027, + 0.03374912589788437, + 0.05336249619722366, + -0.020761897787451744, + 0.056101299822330475, + 0.01121289748698473, + 0.022337445989251137, + -0.05295019969344139, + -0.005205199122428894, + -0.040522512048482895, + -0.008194323629140854, + -0.006044509820640087, + 0.036664627492427826, + 0.010115903802216053, + -0.013892801478505135, + 0.014680575579404831, + -0.006353729870170355, + 0.012339340522885323, + 0.05810386314988136, + 0.015549336560070515, + 0.009791959077119827, + -0.03704747185111046, + 0.019053826108574867, + 0.013863352127373219, + -0.05716148018836975, + 0.0048002684488892555, + -0.03533940017223358, + 0.011242346838116646, + 0.003018573857843876, + 0.02782977744936943, + 0.026475099846720695, + 0.009313404560089111, + -0.008474093861877918, + -0.00956372544169426, + 0.02005510963499546, + -0.003924145828932524, + 0.019834239035844803, + -0.011838698759675026, + -0.037842608988285065, + -0.03949178010225296, + 0.011603103019297123, + -0.012000671587884426, + -0.0032891409937292337, + -0.018774056807160378, + 0.0007049473933875561, + -0.015313739888370037, + -0.02725551277399063, + -0.011021475307643414, + 0.03112812153995037, + 0.003983044996857643, + 0.0073439693078398705, + -0.022617215290665627, + 0.040522512048482895, + 0.02927280403673649, + -0.018788781017065048, + 0.013951701112091541, + 0.03209995478391647, + 0.047413695603609085, + -0.053656987845897675, + -0.01272218395024538, + -0.027682529762387276, + 0.006519383285194635, + 0.05589514970779419, + -0.02008455991744995, + 0.0034308668691664934, + -0.04544058069586754, + 0.022823363542556763, + 0.06425880640745163, + -0.033366285264492035, + -0.02419276535511017, + 0.006132858339697123, + -0.030362434685230255, + 0.06985421478748322, + 0.026254229247570038, + 0.010793241672217846, + -0.05289130285382271, + -0.03207050636410713, + -0.011131911538541317, + 0.028286244720220566, + -0.025046799331903458, + -0.0001016928072203882, + -0.04570562392473221, + -0.03448536619544029, + 0.03048023208975792, + -0.015446262434124947, + 0.0073550124652683735, + 0.0400218702852726, + -0.003931508399546146, + 0.06714486330747604, + -0.005046908278018236, + -0.0022896986920386553, + 0.037842608988285065, + -0.026372026652097702, + 0.020261256024241447, + 0.0066445437259972095, + 0.01033677440136671, + 0.011448493227362633, + -0.035987287759780884, + 0.10012830048799515, + -0.014636402018368244, + 0.022366896271705627, + -0.006950082257390022, + 0.020864970982074738, + -0.02008455991744995, + 0.033955272287130356, + -0.04667745903134346, + -0.006037147715687752, + -0.03660573065280914, + -0.01822924055159092, + 0.01540208887308836, + 0.005297228693962097, + -0.01332589890807867, + 0.03796040639281273, + -0.022852811962366104, + -0.0036278103943914175, + -0.0509476363658905, + -0.019922586157917976, + 0.035427749156951904, + 0.009526913054287434, + 0.018950752913951874, + -0.040551960468292236, + -0.005753695964813232, + -0.026165880262851715, + 0.05792716518044472, + -0.031540416181087494, + -0.008731776848435402, + 0.016594793647527695, + -0.011315970681607723, + 0.021380336955189705, + -0.05047644302248955, + 0.04667745903134346, + -0.030745279043912888, + 0.016815664246678352, + -0.025032075121998787, + 0.005337722133845091, + 0.01374555379152298, + -0.056660838425159454, + 0.03698857128620148, + -0.046795256435871124, + -0.04064030945301056, + 0.020717723295092583, + -0.038991138339042664, + 0.04974020645022392, + 0.0043106707744300365, + 0.04600011929869652, + 0.006033466197550297, + -0.02749110758304596, + 0.0013132636668160558, + 0.023530149832367897, + 0.012339340522885323, + 0.03919728472828865, + -0.012206817977130413, + -0.00022340206487569958, + 0.013465783558785915, + -0.04602956771850586, + 0.0019013333367183805, + 0.07597970962524414, + -0.03533940017223358, + 0.009107258170843124, + -0.0027608906384557486, + 0.028183171525597572, + 0.029449500143527985, + 0.016992362216114998, + -0.02157175913453102, + 0.04794378578662872, + 0.008790675550699234, + -0.07327035814523697, + 0.016992362216114998, + 0.04255452752113342, + -0.04464544355869293, + 0.013981150463223457, + 0.04128820076584816, + -0.010822691023349762, + 0.023559600114822388, + 0.05713203176856041, + 0.047354795038700104, + -0.016094151884317398, + 0.05692588537931442, + -0.026224780827760696, + 0.020747173577547073, + 0.05065314099192619, + 0.010461934842169285, + 0.03295399248600006, + -0.020850246772170067, + 0.05047644302248955, + 0.0026688610669225454, + 0.0550411157310009, + -0.015549336560070515, + -0.03433811664581299, + 0.007391824387013912, + 0.013414246961474419, + 0.02628367953002453, + -0.0014632720267400146, + 0.04782598838210106, + -0.013495233841240406, + 0.05981193482875824, + 0.013414246961474419, + 0.06478890031576157, + 0.02002565935254097, + 0.036340683698654175, + -0.016624242067337036, + -0.013694017194211483, + 0.034249767661094666, + 0.009350216016173363, + -0.01789057068526745, + 0.009644711390137672, + 0.026165880262851715, + 0.056395791471004486, + 0.032718393951654434, + -0.011396956630051136, + 0.04187718778848648, + 0.0024498302955180407, + -0.04791433736681938, + -0.004472642671316862, + -0.005300910212099552, + -0.009512188844382763, + -0.03224720433354378, + 0.01680094003677368, + 0.012655923143029213, + 0.00641999114304781, + 0.017728598788380623, + -0.003335156012326479, + 0.07868906110525131, + 0.008503543213009834, + -0.031187020242214203, + -0.001177979982458055, + 0.04985800385475159, + 0.023559600114822388, + -0.021174190565943718, + 0.006162308156490326, + 0.0028878916054964066, + -0.014606951735913754, + -0.01612360216677189, + -0.019657541066408157, + 0.02305895835161209, + -0.015063419006764889, + 0.015784932300448418, + -0.03731251507997513, + -0.0021958283614367247, + -0.002928384579718113, + 0.006305874325335026, + 0.026843219995498657, + -0.009158794768154621, + -0.05153662711381912, + 0.06437660753726959, + -0.04962240904569626, + -0.03525105118751526, + 0.035751692950725555, + 0.005989292170852423, + -0.004748731851577759, + 0.016874562948942184, + 0.020437953993678093, + -0.03050968237221241, + -0.011919685639441013, + 0.0009460651781409979, + 0.008871661499142647, + 0.02750583365559578, + 0.013134476728737354, + 0.015284290537238121, + 0.049504611641168594, + -0.01769915036857128, + -0.026475099846720695, + -0.029964866116642952, + -0.028197895735502243, + -0.019495569169521332, + -0.014135760255157948, + 0.003743767738342285, + 0.0413176491856575, + 0.006114452611654997, + 0.035162702202796936, + -0.026813769713044167, + 0.0012212339788675308, + 0.002582353074103594, + 0.013082940131425858, + 0.030274085700511932, + -0.02626895345747471, + 0.02668124809861183, + 0.018420662730932236, + -0.013789728283882141, + -0.0179641954600811, + -0.008974735625088215, + -0.009342853911221027, + -0.0257241390645504, + -0.015593510121107101, + 0.034897658973932266, + -0.022852811962366104, + -0.01348050870001316, + -0.015284290537238121, + 0.0016169616719707847, + -0.000775350141339004, + 0.005271460395306349, + 0.027005191892385483, + 0.02330927923321724, + 0.030715828761458397, + 0.012641198001801968, + 0.02336817793548107, + 0.010962576605379581, + 0.01317128911614418, + 0.05616019666194916, + 0.022263823077082634, + -0.008238498121500015, + -0.009144069626927376, + 0.0014918012311682105, + -0.033366285264492035, + -0.061431657522916794, + -0.05318579822778702, + -0.0027811371255666018, + 0.045970670878887177, + 0.0006754979258403182, + 0.0020633055828511715, + -0.013193376362323761, + -0.03351353108882904, + 0.058781202882528305, + 0.02246996946632862, + -0.01227307878434658, + 0.009048358537256718, + 0.035751692950725555, + 0.0030701104551553726, + -0.020158182829618454, + -0.01909800060093403, + -0.04125874862074852, + -0.024074966087937355, + -0.01287679374217987, + -0.014422892592847347, + 0.03310123831033707, + -0.010844778269529343, + -0.031216470524668694, + -0.01703653670847416, + 0.03504490479826927, + -0.05350974202156067, + -0.009799321182072163, + -0.07268136739730835, + 0.01510759349912405, + -0.008120699785649776, + -0.0012506834464147687, + -0.030274085700511932, + 0.013347986154258251, + -0.05627799406647682, + -0.009335491806268692, + 0.0004463439981918782, + 0.027137715369462967, + 0.0006538709276355803, + 0.003309387480840087, + 0.016226675361394882, + 0.030892524868249893, + 0.00820168573409319, + -0.03854939714074135, + -0.01641809567809105, + 0.004921747837215662, + 0.008783313445746899, + 0.04108205437660217, + -0.023220930248498917, + 0.011153997853398323, + -0.02305895835161209, + 0.004192872438579798, + 0.04105260223150253, + -0.007513303775340319, + 0.004067711997777224, + -0.0019455075962468982, + -0.025208773091435432, + 0.014444979839026928, + -0.012030120939016342, + 0.011647277511656284, + 0.008105974644422531, + -0.001233197865076363, + -0.024678681045770645, + 0.023162031546235085, + -0.026828493922948837, + 0.028757436200976372, + 0.0032007924746721983, + -0.023456526920199394, + 0.010248426347970963, + -0.004572034813463688, + 0.007461767178028822, + -0.009364941157400608, + 0.01731630600988865, + 0.02634257823228836, + -0.004159742034971714, + 0.008429919369518757, + -0.005282504018396139, + 0.017816947773098946, + -0.012648560106754303, + -0.0050542703829705715, + 0.013362710364162922, + 0.012361427769064903, + 0.0011586537584662437, + 0.008753864094614983, + 0.02095331996679306, + 0.011934409849345684, + 0.007855653762817383, + 0.0042296843603253365, + -0.008150149136781693, + 0.020835520699620247, + -0.03380802646279335, + -0.0119638592004776, + 0.03251224756240845, + -0.0006934436969459057, + 0.03145206719636917, + -0.033660780638456345, + 0.024929001927375793, + 0.00042793803731910884, + -0.013046128675341606, + 0.030656930059194565, + -0.01880350522696972, + 0.011632552370429039, + 0.03165821358561516, + 0.02360377460718155, + -0.007049473933875561, + -0.016992362216114998, + 0.007973452098667622, + -0.011146635748445988, + 0.031039772555232048, + -0.016697866842150688, + -0.008047075942158699, + 0.005385577213019133, + 0.04812048375606537, + -0.0047855437733232975, + -0.0055144187062978745, + -0.002236321335658431, + 0.017169058322906494, + 0.023397628217935562, + 0.005735290236771107, + -0.01406213641166687, + -0.006316917948424816, + -0.06131386011838913, + -0.002595237223431468, + 0.006939038634300232, + -0.007634783163666725, + -0.0008894669590517879, + 0.011713538318872452, + -0.03769535943865776, + 0.04308461770415306, + -0.01392961386591196, + -0.00472296355292201, + -0.020172907039523125, + 0.03080417774617672, + 0.0024498302955180407, + -0.011168722994625568, + -0.018450111150741577, + -0.07391824573278427, + 0.013959063217043877, + 0.02336817793548107, + -0.034897658973932266, + -0.0328361913561821, + 0.03133426979184151, + 0.01733103021979332, + -0.015490436926484108, + -0.02691684290766716, + 0.04514608532190323, + -0.03595783933997154, + 0.055217813700437546, + -0.0032670539803802967, + -0.0017734121065586805, + -0.014415530487895012, + -0.00254001934081316, + 0.016830390319228172, + 0.010012829676270485, + 0.005757377482950687, + -0.016226675361394882, + -0.029979592189192772, + 0.04600011929869652, + -0.0016335269901901484, + -0.0005236489232629538, + -0.03539830073714256, + 0.0068985456600785255, + 0.00884221214801073, + 0.03704747185111046, + -0.04585287347435951, + -0.02451670914888382, + -0.022941160947084427, + -0.0031271688640117645, + -0.003003848949447274, + 0.006824921816587448, + -0.020717723295092583, + 0.0008126221364364028, + -0.04482213780283928, + -0.00619543856009841, + -0.039315082132816315, + -0.0008618580177426338, + -0.029979592189192772, + 0.03133426979184151, + 0.00030001677805557847, + -0.031216470524668694, + 0.04340856522321701, + 0.012486588209867477, + 0.008047075942158699, + -0.007170953322201967, + -0.002418540185317397, + 0.018700432032346725, + -0.014687938615679741, + -0.018729882314801216, + -0.028197895735502243, + 0.00017439626390114427, + -0.03645848110318184, + 0.03819600120186806, + -0.00746544823050499, + 0.012972504831850529, + 0.0472075492143631, + 0.013414246961474419, + -0.0037492895498871803, + -0.0063279615715146065, + -0.01793474517762661, + -0.0334840826690197, + -0.01285470649600029, + -0.020114008337259293, + -0.0347798615694046, + -0.02270556427538395, + 0.0006124575738795102, + -0.03672352805733681, + 0.0334840826690197, + 0.0071046920493245125, + -0.028610190376639366, + 0.00026412520674057305, + 0.044998835772275925, + 0.020526301115751266, + 0.00014023024414200336, + 0.0023890906013548374, + 0.01849428564310074, + -0.05118323117494583, + -0.04223058372735977, + 0.04782598838210106, + -0.0009543478954583406, + 0.027005191892385483, + -0.042583975940942764, + 0.031893808394670486, + -0.007958727888762951, + -0.0013132636668160558, + 0.03077472746372223, + -0.011735625565052032, + 0.03589894250035286, + -0.010086453519761562, + -0.031893808394670486, + 0.0170659851282835, + -0.005197837017476559, + -0.04046361520886421, + -0.0014402646338567138, + -0.009976018220186234, + -0.020246531814336777, + 0.005348765291273594, + 0.01647699624300003, + 0.0278445016592741, + -0.0037989856209605932, + 0.035192154347896576, + -0.01029996294528246, + -0.0006267221760936081, + -0.035722244530916214, + 0.015770208090543747, + 0.034838758409023285, + -0.024251664057374, + -0.007782030384987593, + 0.017743322998285294, + -0.0028253113850951195, + 0.026872668415308, + -0.0070862858556210995, + -0.02606280706822872, + 0.028197895735502243, + 0.013112390413880348, + 0.030332984402775764, + -0.001707150717265904, + -0.0006805595476180315, + -0.01150002982467413, + 0.04985800385475159, + 0.040581412613391876, + 0.005775783210992813, + 0.0023117857053875923, + -0.021674832329154015, + -0.02065882459282875, + 0.02426638826727867, + -0.012979866936802864, + -0.024457810446619987, + -0.014231471344828606, + 0.02600390836596489, + 0.01105828769505024, + 0.0024314243346452713, + -0.011742988601326942, + -0.010719617828726768, + -0.03109867312014103, + 0.022514142096042633, + 0.025326570495963097, + -0.012376152910292149, + 0.046500761061906815, + -0.006666630506515503, + 0.006394222844392061, + -0.040228016674518585, + -0.0296409223228693, + -0.006033466197550297, + 0.027270236983895302, + 0.029743995517492294, + -0.01822924055159092, + -0.01540208887308836, + 0.05495276674628258, + 0.028212621808052063, + -0.0006115372525528073, + 0.027991749346256256, + -8.409212750848383e-05, + -0.00016576847701799124, + -0.00017485641001258045, + -0.0296409223228693, + -0.029964866116642952, + -0.01703653670847416, + 0.041435446590185165, + -0.018788781017065048, + -0.03436756506562233, + -0.021409787237644196, + 0.009931843727827072, + 0.03710636869072914, + -0.011838698759675026, + -0.022352170199155807, + 0.012030120939016342, + 0.01435663178563118, + -0.007443360984325409, + 0.01198594644665718, + 0.019672265276312828, + 0.019539743661880493, + 0.021660108119249344, + 0.016992362216114998, + 0.033631328493356705, + -0.0025289759505540133, + 0.004122930113226175, + -0.05828056111931801, + -0.02214602380990982, + 0.022867536172270775, + 0.01613832637667656, + -0.036900222301483154, + -0.03106922283768654, + -0.02241106890141964, + 0.007296113763004541, + 0.002221596660092473, + -0.011036200448870659, + -0.05981193482875824, + 0.01448915433138609, + 0.00942383985966444, + 0.010034916922450066, + -0.028816336765885353, + 0.014849910512566566, + 0.01672731526196003, + 0.06255073845386505, + 0.0028032243717461824, + -0.0031860677991062403, + 0.0017089913599193096, + -0.025311846286058426, + 0.025061525404453278, + -0.02478175424039364, + 0.004086118191480637, + 0.003780579660087824, + 0.016948187723755836, + -0.014106310904026031, + -0.0068948641419410706, + 0.024678681045770645, + 0.03563389554619789, + 0.011396956630051136, + -0.012788445688784122, + -0.0010472978465259075, + 0.024457810446619987, + 0.004093480762094259, + -0.02005510963499546, + 0.02635730244219303, + 0.026372026652097702, + -0.01825869083404541, + 0.015770208090543747, + -0.04190663993358612, + -0.014187296852469444, + 0.03946233168244362, + 0.0037345646414905787, + 0.015225391834974289, + 1.6450307157356292e-05, + -0.01435663178563118, + 0.039315082132816315, + 0.021925153210759163, + 0.04061086103320122, + 0.026754871010780334, + -0.004137654788792133, + 0.043261315673589706, + 0.042878471314907074, + 0.02569468878209591, + -0.023854095488786697, + 0.04249563068151474, + 0.04155324399471283, + -0.026872668415308, + -0.014908809214830399, + -0.0014338225591927767, + 0.007863016799092293, + -0.0043106707744300365, + 0.030951425433158875, + 0.00568375363945961, + 0.02933170273900032, + 0.002954153111204505, + -0.005956161301583052, + -0.00754643464460969, + -0.008628703653812408, + -0.002333872951567173, + 0.03533940017223358, + -0.018067268654704094, + -0.019289422780275345, + -0.00471191992983222, + -0.006375816650688648, + 0.024693405255675316, + 0.000359605997800827, + -0.02126253955066204, + 0.042053885757923126, + -0.008326846174895763, + 0.010999388061463833, + -0.016565343365073204, + 0.007001618854701519, + 0.002059624530375004, + -0.036635179072618484, + -0.016079427674412727, + 0.021424511447548866, + 0.045057736337184906, + -0.014474429190158844, + -0.010579733178019524, + 0.01588800549507141, + 0.04211278632283211, + 0.05336249619722366, + 0.033071789890527725, + 0.04458654299378395, + -0.02273501455783844, + 0.003195270663127303, + -0.01256757415831089, + 0.017404654994606972, + -0.025061525404453278, + -0.021615933626890182, + -0.01390752661973238, + 0.00011561229621293023, + 0.021350888535380363, + -0.024001343175768852, + 0.0066408622078597546, + 0.012383515015244484, + 0.006202801130712032, + 0.05433432757854462, + -0.010668081231415272, + -0.0725046694278717, + 0.01939249597489834, + -0.03165821358561516, + 0.012685372494161129, + 0.003843159880489111, + -0.023117857053875923, + 0.02273501455783844, + 0.025827212259173393, + 0.02755000814795494, + 0.007528028450906277, + -0.010859503410756588, + -0.006994256284087896, + -0.014584865421056747, + 0.02542964369058609, + -0.020864970982074738, + 0.02182208001613617, + 0.021939877420663834, + 0.007973452098667622, + 0.014363993890583515, + 0.002983602462336421, + 0.022499417886137962, + 0.005680072586983442, + -0.02872798778116703, + 0.007995539344847202, + -0.019804788753390312, + 0.015181217342615128, + -0.026445651426911354, + -0.01909800060093403, + 0.00956372544169426, + 0.024251664057374, + 0.04226003214716911, + 0.033395733684301376, + 0.007285070139914751, + -0.002545541152358055, + -0.010874227620661259, + -0.017713874578475952, + 0.017463553696870804, + 0.011529479175806046, + 0.039904072880744934, + 0.011242346838116646, + 0.008429919369518757, + -0.020114008337259293, + 0.002722238190472126, + 0.0021258858032524586, + 0.005367171484977007, + 0.017537176609039307, + -0.036929674446582794, + 0.011249708943068981, + 0.018435386940836906, + -0.0008549558115191758, + 0.03878499194979668, + 0.0029228630010038614, + -0.0008954488439485431, + -0.02121836505830288, + 0.022823363542556763, + 0.03050968237221241, + 0.011176085099577904, + 0.011846061795949936, + -0.005974567495286465, + -0.020202357321977615, + -0.023736298084259033, + 0.0057684206403791904, + 0.014386081136763096, + -0.002186625497415662, + -0.005396620836108923, + -0.0001776173012331128, + -0.0037916230503469706, + -0.006677674129605293, + 0.03018573857843876, + 0.019893137738108635, + 0.006935357116162777, + 0.01792002096772194, + -0.013105027377605438, + 0.026843219995498657, + -0.0065819635055959225, + 0.00044956503552384675, + 0.003463997505605221, + 0.05000524967908859, + -0.013900164514780045, + 0.005411345511674881, + 0.004086118191480637, + 0.00018946612544823438, + 0.01375291682779789, + 0.007156228646636009, + -0.006673993077129126, + -0.008488818071782589, + -0.002335713477805257, + -0.0070862858556210995, + 0.004480005241930485, + -0.0025068887043744326, + 0.01880350522696972, + -0.019569192081689835, + -0.01677148975431919, + 0.01435663178563118, + -0.015004520304501057, + -0.010137990117073059, + 0.045882321894168854, + 0.01850901171565056, + -0.0012580457841977477, + 0.007561159320175648, + -0.02361849881708622, + -0.03687077388167381, + -0.03083362616598606, + 0.012442413717508316, + 0.034249767661094666, + -0.017772773280739784, + 0.08245860040187836, + -0.003541302401572466, + 0.01792002096772194, + 0.005392939783632755, + 0.024398911744356155, + -0.0035836361348628998, + 0.034131970256567, + -0.021100567653775215, + 0.037253618240356445, + 0.005871494300663471, + -0.0365762785077095, + 0.037872057408094406, + 0.019554467871785164, + 0.01675676554441452, + 0.007156228646636009, + 0.02062937431037426, + 0.015902729704976082, + 0.007137822452932596, + 0.032482799142599106, + 0.01582910679280758, + 0.025945009663701057, + 0.018347037956118584, + -0.01678621582686901, + 0.005772102158516645, + 0.016565343365073204, + -0.03584004193544388, + 0.02364794909954071, + 0.025179322808980942, + 0.0013666409067809582, + -0.009865582920610905, + 0.019009651616215706, + 0.021984051913022995, + 0.010329412296414375, + -0.0044836862944066525, + -0.039020586758852005, + -0.0038689281791448593, + -0.01883295550942421, + -0.005624854471534491, + 0.0037695360369980335, + -0.026975741609930992, + -0.012184730730950832, + -0.048886168748140335, + 0.01344369724392891, + 0.002674382645636797, + -0.02248469367623329, + -0.015770208090543747, + -0.005300910212099552, + 0.051271580159664154, + -0.0033333152532577515, + 0.011735625565052032, + -0.022867536172270775, + 0.02059992589056492, + -0.007759943138808012, + -0.0052935476414859295, + 0.003068269696086645, + 0.005646941717714071, + -0.009799321182072163, + 0.026121707633137703, + -0.00018302403623238206, + -0.01733103021979332, + 0.005363490432500839, + 0.0015120478346943855, + 0.0006667550769634545, + -0.002701991703361273, + 0.003349880687892437, + -0.00792927760630846, + 0.0032744163181632757, + -0.03704747185111046, + -0.014945621602237225, + 0.024649232625961304, + 0.019907861948013306, + -0.023220930248498917, + -0.00650465814396739, + -0.003463997505605221, + -0.0004518657806329429, + 0.0023927718866616488, + -0.028624914586544037, + -7.040271157165989e-05, + 0.02780032902956009, + 0.04582342132925987, + -0.006795471999794245, + 0.004686151631176472, + -0.017478277906775475, + -0.004156060516834259, + 0.011978584341704845, + -0.02872798778116703, + 0.005569636821746826, + 0.014724750071763992, + 0.02934642694890499, + 0.000606475630775094, + -0.011588378809392452, + -0.019201073795557022, + -0.002136929426342249, + -0.0290666576474905, + -0.025488542392849922, + -0.004995371680706739, + -0.0009110938990488648, + 0.009217693470418453, + -0.02607753314077854, + 0.015946904197335243, + 0.017124883830547333, + 0.03257114812731743, + -0.0008798038470558822, + -0.009828770533204079, + 0.018405938521027565, + -0.016933463513851166, + -0.012501312419772148, + -0.01610887609422207, + 0.027947574853897095, + -0.01769915036857128, + -0.02358905039727688, + -0.018435386940836906, + 0.006210163235664368, + 0.009902394376695156, + -0.0017089913599193096, + -0.011131911538541317, + -0.00017474137712270021, + 0.0011402477975934744, + 0.001169697381556034, + 0.015652408823370934, + 0.012398239225149155, + -0.05377478897571564, + -0.008304758928716183, + 0.012361427769064903, + 0.015387363731861115, + -0.003336996538564563, + -0.009526913054287434, + -0.02545909211039543, + -0.005893581081181765, + -0.006648224778473377, + 0.042053885757923126, + 0.008893748745322227, + 0.0011761394562199712, + 0.007575883995741606, + 0.016874562948942184, + 0.0015645046951249242, + -0.001269089407287538, + 0.016211949288845062, + 0.03109867312014103, + 0.013583581894636154, + 0.01089631486684084, + -0.0028860510792583227, + -0.010712255723774433, + -0.026121707633137703, + -0.0359283909201622, + -0.019215798005461693, + -0.006688717752695084, + 0.0030848351307213306, + -0.00024065763864200562, + 0.014864635653793812, + -0.01392961386591196, + 0.016697866842150688, + -0.0054702446796, + -0.015740757808089256, + 0.03507435321807861, + -0.03316013887524605, + 0.013738191686570644, + -0.007483854424208403, + 0.02722606249153614, + 0.02006983384490013, + -0.02514987252652645, + -0.03896168991923332, + 0.01526956632733345, + -0.04037526622414589, + 0.02453143335878849, + 0.0025050481781363487, + -0.008967372588813305, + -0.0016767808701843023, + 0.0025731499772518873, + -0.028536565601825714, + 0.04108205437660217, + 0.01509286928921938, + 0.01945139467716217, + -0.014157847501337528, + -0.018347037956118584, + -0.014341906644403934, + -0.01553461141884327, + 0.01979006454348564, + 0.008768588304519653, + -0.013605669140815735, + -0.004969603382050991, + 0.01120553445070982, + 0.05003470182418823, + -0.0377248115837574, + 0.041729941964149475, + 0.017272131517529488, + 0.02360377460718155, + -0.012913606129586697, + -0.01374555379152298, + -0.009652073495090008, + 0.016064701601862907, + -0.004641977604478598, + 0.009784596040844917, + -0.01643282175064087, + -0.01856791041791439, + 0.01789057068526745, + 0.007966089993715286, + -0.007450723554939032, + -0.03115757182240486, + -0.00024502904852852225, + -0.007380781229585409, + -0.004439512267708778, + 0.014283007942140102, + 0.038873340934515, + 0.004840761423110962, + -0.0032983440905809402, + -0.007042111828923225, + 0.017787497490644455, + -0.0014844388933852315, + -0.01672731526196003, + -0.03849049657583237, + 0.010115903802216053, + 0.014113673008978367, + 0.005967204924672842, + 0.010653357021510601, + -0.026092257350683212, + 0.036635179072618484, + -0.01887713000178337, + -0.018950752913951874, + -0.011014113202691078, + 0.007818842306733131, + 0.009549000300467014, + 0.015961628407239914, + 0.027432208880782127, + -0.024693405255675316, + 0.018435386940836906, + 0.004494729917496443, + 0.015195942483842373, + -0.005013777408748865, + 0.0018001006683334708, + 0.009880307130515575, + -0.037577562034130096, + 0.042878471314907074, + 0.011183448135852814, + -0.01300931628793478, + -0.015932179987430573, + 0.025945009663701057, + 0.000494199397508055, + -0.0135983070358634, + -0.0014283007476478815, + 0.017493003979325294, + 0.004612527787685394, + 0.0011384072713553905, + -0.005790507886558771, + -0.010373586788773537, + 0.024973176419734955, + -0.01510759349912405, + -0.018008369952440262, + -0.01134542003273964, + -0.03737141564488411, + -0.014246195554733276, + 0.02039377950131893, + -0.03878499194979668, + -0.0127000967040658, + 0.0248259287327528, + -0.019672265276312828, + -0.010358861647546291, + -0.0395212285220623, + -0.0164917204529047, + -0.04046361520886421, + 0.011190810240805149, + -0.00925450585782528, + -0.0033977359998971224, + -0.016830390319228172, + -0.006725529674440622, + 0.006177032832056284, + 0.013811815530061722, + 0.01940722018480301, + -0.004958559758961201, + 0.020246531814336777, + -0.0323355495929718, + -0.02308840863406658, + -0.015210666693747044, + 0.0007707486511208117, + 0.011713538318872452, + 0.010189526714384556, + 0.048267729580402374, + -0.011301245540380478, + 0.016904013231396675, + 0.0008029590244404972, + 0.0038983775302767754, + -0.022381620481610298, + -0.015991078689694405, + -0.005484969355165958, + 0.02419276535511017, + 0.014054774306714535, + 0.03257114812731743, + -0.007145185023546219, + 0.03595783933997154, + -0.01448915433138609, + 0.0334840826690197, + 0.019377771764993668, + -0.016992362216114998, + -0.0038063479587435722, + -0.005381896160542965, + -0.0022620896343141794, + -0.021925153210759163, + 0.004730326123535633, + -0.022646665573120117, + 0.04567617550492287, + 0.01152211707085371, + -0.0035247369669377804, + -0.01178716216236353, + -0.01408422365784645, + 0.007303475867956877, + -0.04658911004662514, + 0.011028837412595749, + 0.0028161085210740566, + 0.0043106707744300365, + -0.019583918154239655, + -0.021321438252925873, + 0.04193608835339546, + 3.6840636312263086e-05, + 0.018729882314801216, + 0.011426405981183052, + -0.010726980865001678, + -0.020747173577547073, + -0.040551960468292236, + 0.020541027188301086, + -0.008290034718811512, + -0.025827212259173393, + 0.012972504831850529, + 0.017875846475362778, + 0.013635118491947651, + -0.006604050286114216, + 0.012059570290148258, + -0.010130628012120724, + -0.004148698411881924, + 0.02039377950131893, + 0.019613366574048996, + 0.04108205437660217, + 0.006335323676466942, + 0.01587328128516674, + -0.0188624057918787, + 0.0008526550373062491, + 0.012295166030526161, + 0.005168387200683355, + 0.006129177287220955, + 0.008636065758764744, + -0.004491048865020275, + 0.0209091454744339, + 0.001388728036545217, + -0.023132583126425743, + 0.030362434685230255, + 0.026121707633137703, + -0.07503733038902283, + 0.027432208880782127, + 0.0128620695322752, + -0.0173899307847023, + -0.023265104740858078, + 0.010373586788773537, + -0.019893137738108635, + -0.02002565935254097, + -0.021733731031417847, + 0.0454111285507679, + 0.008937923237681389, + -0.024045517668128014, + 0.008319484069943428, + -0.0009966815123334527, + -0.030067939311265945, + 0.02059992589056492, + -0.0277708787471056, + -0.01912745088338852, + 0.01678621582686901, + 0.010049642063677311, + 0.009806683287024498, + 0.020099284127354622, + 0.022366896271705627, + -0.0023817282635718584, + -0.04667745903134346, + -0.01730158179998398, + 0.018744606524705887, + -0.031245918944478035, + 0.007811479736119509, + -0.0278445016592741, + 0.035162702202796936, + 0.0024001342244446278, + -0.021645382046699524, + -0.008915835991501808, + -0.0017954992363229394, + 0.01762552559375763, + -0.00552914384752512, + -0.0038468409329652786, + -0.014231471344828606, + -0.023780470713973045, + -0.01557878591120243, + -0.037548113614320755, + 0.03896168991923332, + -0.026843219995498657, + 0.018641533330082893, + 0.023456526920199394, + 0.0005604607868008316, + -0.027873951941728592, + ], + "index": 47, + }, + { + "title": "Andy Sutcliffe", + "text": "Andy Sutcliffe (born 9 May 1947 in Mildenhall, Suffolk \u2013 died 13 July 2015 in Pluckley, Kent) was a British former racing driver from England. After a promising start in Formula 3, his single attempt at Formula One was at the 1977 British Grand Prix with the RAM team, in a March 761. He failed to pre-qualify.", + "vector": [ + 0.023267796263098717, + 0.0511021688580513, + -0.024106554687023163, + -0.03892463073134422, + -0.01671304926276207, + 0.06703858822584152, + 0.014018148183822632, + -0.018312904983758926, + -0.024261880666017532, + -0.030537040904164314, + -0.052966076880693436, + 0.008566214703023434, + 0.017489679157733917, + 0.04137877747416496, + 0.014654983766376972, + 0.05076045170426369, + -0.020456399768590927, + 0.02565981261432171, + -0.06747350096702576, + -0.05697348341345787, + 0.05231371149420738, + -0.013629834167659283, + -0.04016723856329918, + 0.030987486243247986, + -0.011129089631140232, + 0.008340992033481598, + 0.0024910366628319025, + 0.010204900987446308, + -0.008931229822337627, + -0.06958593428134918, + -0.03373675048351288, + 0.012620216235518456, + 0.042994167655706406, + -0.003504537045955658, + -0.018576959148049355, + 0.007020723540335894, + 0.041782625019550323, + -0.02499191276729107, + -0.040136173367500305, + 0.06865397840738297, + -0.02825375273823738, + -0.019664239138364792, + -0.026902418583631516, + 0.005032554268836975, + -0.03280479833483696, + 0.006143133156001568, + -0.002473562490195036, + -0.009785521775484085, + -0.04460955411195755, + 0.012480423785746098, + 0.006698422599583864, + -0.001643540570512414, + 0.005921794101595879, + -0.0035627842880785465, + 0.0036035573575645685, + 0.007304192986339331, + -0.051381755620241165, + 0.07741434872150421, + -0.020829182118177414, + -0.0063722385093569756, + 0.003071566578000784, + -0.009645728394389153, + 0.002329886192455888, + 0.01289980299770832, + -0.0047063701786100864, + -0.017101364210247993, + 0.02851780690252781, + 0.0015416080132126808, + -0.0705178901553154, + -0.025488954037427902, + 0.015322884544730186, + -0.031966038048267365, + 0.0014930687611922622, + 0.037029657512903214, + 0.0002824986877385527, + -0.016992636024951935, + 0.013963784091174603, + 0.027570320293307304, + -0.08673389256000519, + -0.006158665753901005, + 0.003015260910615325, + -0.08375164121389389, + -0.0876658484339714, + 0.0338299460709095, + 0.013070661574602127, + -0.04777820035815239, + 0.03463764116168022, + -0.07586109638214111, + 0.07026936858892441, + -0.003555017989128828, + -0.013886121101677418, + -0.03516574949026108, + 0.02666942961513996, + -0.0028405196499079466, + 0.019990423694252968, + -0.04215540736913681, + 0.0381169356405735, + -0.01530735194683075, + -0.014748179353773594, + -0.02555108442902565, + -0.029574021697044373, + -0.014530722983181477, + 0.0345444455742836, + -0.034109532833099365, + 0.01890314370393753, + -0.012938634492456913, + -0.028331415727734566, + -0.004531628452241421, + 0.07213327288627625, + 0.03898676112294197, + 0.022832883521914482, + -0.020363204181194305, + -0.040384694933891296, + -0.01926039159297943, + -0.021528147161006927, + 0.010616514831781387, + 0.00956029910594225, + 0.01515202596783638, + 0.007506116759032011, + -0.03184177726507187, + 0.008263329975306988, + 0.02544235624372959, + -0.0425281897187233, + 0.015392781235277653, + 0.030583638697862625, + -0.031546659767627716, + 0.032929059118032455, + -0.0004684042069129646, + -0.002426964696496725, + -0.013396845199167728, + -0.041782625019550323, + -0.017412016168236732, + 0.00011776846076827496, + 0.008706008084118366, + 0.007785703055560589, + -0.004764616955071688, + -0.016837310045957565, + 0.01789352484047413, + 0.037992678582668304, + 0.03504148870706558, + -0.014678282663226128, + -0.0016814011614769697, + 0.0035783168859779835, + 0.029698282480239868, + 0.005187879782170057, + -0.02508510835468769, + 0.0009431184735149145, + 0.019710836932063103, + 0.002438614144921303, + -0.02360951341688633, + -0.02381143718957901, + -0.03479296714067459, + -0.021900929510593414, + -0.04224860295653343, + -0.0007771141245029867, + 0.00824779737740755, + -0.062409885227680206, + 0.02477445639669895, + 0.016992636024951935, + -0.006360589060932398, + -0.020207880064845085, + 0.0475296787917614, + -0.033861011266708374, + -0.009785521775484085, + -0.01747414655983448, + -0.0070828539319336414, + -0.06946167349815369, + -0.02350078523159027, + -0.02238244004547596, + 0.019710836932063103, + -0.034264858812093735, + -0.0013445384101942182, + 0.04277671128511429, + 0.028300350531935692, + 0.005308257415890694, + 0.03243201598525047, + -0.02881292626261711, + 0.031236007809638977, + 0.03190390765666962, + 0.0038015975151211023, + -0.0226930920034647, + -0.006593578029423952, + -0.008527383208274841, + 0.009933081455528736, + -0.012915335595607758, + -0.025721943005919456, + 0.03923528268933296, + -0.015136493369936943, + -0.0026774276047945023, + -0.027912035584449768, + -0.010103940032422543, + 0.023081405088305473, + 0.024960847571492195, + 0.049331456422805786, + 0.011160154826939106, + 0.04557257145643234, + -0.031096214428544044, + -0.010080641135573387, + -0.06790841370820999, + -0.008504084311425686, + -0.008651643991470337, + -0.029605086892843246, + -0.007117802277207375, + 0.005844131112098694, + -0.013319182209670544, + 0.0008227410726249218, + 0.027119874954223633, + 0.07095280289649963, + 0.023267796263098717, + -0.03111174702644348, + 0.028750795871019363, + -0.00436853663995862, + -0.0066867731511592865, + 0.057874370366334915, + 0.00034584247623570263, + 0.041565168648958206, + 0.02534916065633297, + 0.030956421047449112, + 0.03296012431383133, + 0.009599130600690842, + 0.0073663233779370785, + -0.009140919893980026, + -0.009265180677175522, + -0.011641664430499077, + 0.07157409936189651, + 0.0027240251656621695, + -0.037837352603673935, + -0.025846203789114952, + 0.006147016305476427, + -0.04367759823799133, + -0.02545788884162903, + 0.02478998899459839, + -0.009979679249227047, + 0.02780330739915371, + -0.011859120801091194, + 0.003654038067907095, + 7.141343667171896e-05, + -0.005343205761164427, + -0.0011989205377176404, + -0.0030230272095650434, + 0.0018619673792272806, + 0.009769989177584648, + 0.014258903451263905, + -0.04547937586903572, + -0.020611725747585297, + 0.00453551160171628, + 0.024044424295425415, + -0.049393586814403534, + -0.05663176625967026, + -0.019990423694252968, + 0.06359036266803741, + -0.01556363981217146, + -0.019446782767772675, + -0.027523722499608994, + -0.03463764116168022, + -0.028269285336136818, + -0.005801416467875242, + -0.0028152791783213615, + 0.004830630496144295, + -0.004578226245939732, + -0.031204942613840103, + 0.0011620307341217995, + 0.014903505332767963, + 0.04405038058757782, + -0.029247837141156197, + -0.02611025795340538, + -0.039017826318740845, + -0.021170899271965027, + -0.017909057438373566, + -0.044329967349767685, + 0.0431184247136116, + 0.004558810498565435, + -0.03662580996751785, + -0.0331154502928257, + 0.01380069274455309, + -0.07058002054691315, + -0.03755776584148407, + -0.009265180677175522, + -0.053028207272291183, + -0.03224562481045723, + -0.028937185183167458, + 0.009078789502382278, + -0.010189368389546871, + -0.05604152753949165, + -0.04019830375909805, + 0.0016940213972702622, + 0.04175155982375145, + 0.002520160283893347, + 0.014592853374779224, + 0.016744114458560944, + -0.0359734408557415, + 0.00603052182123065, + -0.011734860017895699, + 0.020021488890051842, + 0.01849929615855217, + 0.037992678582668304, + -0.050667256116867065, + 0.011447506956756115, + -0.008612812496721745, + -0.01039905846118927, + 0.037682026624679565, + -0.00911762099713087, + 0.005677156150341034, + -0.0037472336553037167, + -0.012356163002550602, + 0.002791980281472206, + -0.032121364027261734, + -0.025100640952587128, + -0.04190688580274582, + -0.03243201598525047, + -0.0418136902153492, + 0.047902461141347885, + -0.020829182118177414, + 0.0172722227871418, + 0.05796756595373154, + -0.008170134387910366, + 0.056600701063871384, + -0.01295416709035635, + -0.0067023057490587234, + -0.025923866778612137, + 0.01865462213754654, + 0.0030366182327270508, + -0.033239707350730896, + -0.0034132832661271095, + 0.08747945725917816, + -0.044733814895153046, + 0.03789948299527168, + 0.04302522912621498, + -0.0284712091088295, + 0.007242062594741583, + -0.023112470284104347, + -0.015524808317422867, + -0.007098386529833078, + 0.030940888449549675, + 0.0034928875975310802, + -0.04619387537240982, + -0.028704198077321053, + 0.06014212965965271, + -0.013194922357797623, + 0.012231902219355106, + 0.05069832131266594, + -0.0032288338989019394, + -0.02693348377943039, + 0.029294434934854507, + -0.03469977155327797, + 0.03417166322469711, + 0.08281968533992767, + -0.01686837524175644, + -0.012457124888896942, + -0.022087320685386658, + 0.0007096445187926292, + 0.006329523865133524, + 0.006853748578578234, + 0.009777755476534367, + -0.009086555801331997, + 0.030071064829826355, + -0.022258179262280464, + -0.053028207272291183, + -0.0007373119005933404, + -0.001959045883268118, + 0.05663176625967026, + -0.030443845316767693, + 0.005265542771667242, + 0.03606663644313812, + 0.009544766508042812, + 0.044485293328762054, + 0.0063722385093569756, + -0.01588982343673706, + 0.018763350322842598, + 0.01736541837453842, + -0.012441592290997505, + 0.03662580996751785, + -0.019508913159370422, + 0.01967977173626423, + -0.03839652240276337, + -0.009055490605533123, + -0.016060682013630867, + 0.026187920942902565, + -0.017846927046775818, + -0.02601706236600876, + -0.0028424609918147326, + -0.023221198469400406, + -0.06865397840738297, + 0.013653133064508438, + -0.030474910512566566, + 0.012480423785746098, + -0.023283328860998154, + -0.012301798909902573, + -0.015229688957333565, + 0.043615467846393585, + 0.01380069274455309, + 0.031966038048267365, + -0.0010688352631404996, + -0.022149451076984406, + 0.01584322564303875, + -0.017039233818650246, + 0.032276690006256104, + 0.07200901210308075, + 0.03122047521173954, + -0.06865397840738297, + -0.017536276951432228, + -0.058278217911720276, + 0.010189368389546871, + -0.04103706032037735, + 0.02927890233695507, + -0.05128856003284454, + -0.026296649128198624, + -0.01310949306935072, + 0.025566617026925087, + -0.012394994497299194, + 0.005692688282579184, + -0.006084885913878679, + -0.0012018328998237848, + -0.007552714087069035, + 0.02003702148795128, + 0.00799927581101656, + -0.00837982352823019, + -0.027414994314312935, + -0.047591809183359146, + -0.012736710719764233, + -0.045292988419532776, + 0.017101364210247993, + -0.016573257744312286, + 0.032929059118032455, + 0.015680134296417236, + 0.028378013521432877, + 0.0013222104171290994, + 0.019291456788778305, + 0.026048127561807632, + -0.006376121658831835, + -0.03086322546005249, + 0.0022036840673536062, + 0.00799927581101656, + 0.01579662784934044, + -0.005580077413469553, + -0.005525713320821524, + -0.0230503398925066, + 0.038303326815366745, + 0.05100897327065468, + 0.06877823919057846, + -0.03709178790450096, + 0.008108003996312618, + -0.06697645783424377, + -0.004123898688703775, + 0.00868270918726921, + -0.058122891932725906, + 0.012565853074193, + -0.008496318012475967, + 0.0017241158057004213, + 0.018281839787960052, + -0.006756669841706753, + -0.013575470075011253, + -0.01660432107746601, + 0.04985956475138664, + 0.03286692872643471, + -0.015276286751031876, + -0.00015204933879431337, + 0.02457253262400627, + -0.031034084036946297, + -0.006247978191822767, + 0.037029657512903214, + 0.026700494810938835, + 0.03317758068442345, + -0.014740413054823875, + -0.015656834468245506, + 0.01034469436854124, + 0.006570279132574797, + -0.01675964705646038, + -0.0198350977152586, + -0.01279884111136198, + 0.0007285748142749071, + -0.028129491955041885, + -0.0648019015789032, + 0.02918570674955845, + -0.0048112147487699986, + 0.04985956475138664, + 0.015369482338428497, + -0.00623244559392333, + 0.05507851019501686, + -0.00039365366683341563, + 0.024401674047112465, + 0.021900929510593414, + 0.005420868285000324, + 0.010546618141233921, + 0.05063619092106819, + -0.015082129277288914, + -0.02753925509750843, + -0.005925677251070738, + -0.04007404297590256, + 0.007657559122890234, + 0.028533339500427246, + 0.029729347676038742, + 0.0025026861112564802, + 0.0016969337593764067, + -0.03572491928935051, + -0.011874653398990631, + 0.01988169550895691, + 0.027679046615958214, + 0.018421633169054985, + 0.014289968647062778, + 0.008993360213935375, + 0.041068125516176224, + -0.008853567764163017, + -0.023376524448394775, + -0.03970126062631607, + 0.0020464167464524508, + 0.03333290293812752, + 0.016946038231253624, + -0.01722562499344349, + -0.045044466853141785, + 0.09120727330446243, + 0.053835902363061905, + 0.015043298713862896, + -0.0015755854547023773, + 0.027150940150022507, + -0.035538531839847565, + -0.028735263273119926, + -0.012829906307160854, + 0.022444570437073708, + -0.02222711406648159, + 0.007238179445266724, + 0.026032594963908195, + 0.0030074946116656065, + 0.008830268867313862, + -0.011028127744793892, + -0.027818839997053146, + 0.005102450493723154, + -0.006275160238146782, + 0.010181602090597153, + -0.002246398478746414, + 0.021233029663562775, + 0.013303649611771107, + -0.0011057251831516623, + 0.01640239916741848, + -0.04389505460858345, + 0.02131069265305996, + 0.017412016168236732, + 0.005521830171346664, + 0.023423122242093086, + -0.018126513808965683, + -0.0073003098368644714, + -0.00853514950722456, + -0.009195283986628056, + 0.018266307190060616, + 0.03622196242213249, + -0.018219709396362305, + 0.015882058069109917, + -0.005894612055271864, + -0.00750999990850687, + -0.016588790342211723, + -0.0037064605858176947, + 0.008760372176766396, + -0.01977296732366085, + 0.0489586740732193, + -0.010034043341875076, + 0.01952444575726986, + 0.01947784796357155, + 0.0065663959830999374, + -0.011144622229039669, + 0.035383205860853195, + -0.013101726770401001, + -0.03734030947089195, + -0.02892165258526802, + 0.025923866778612137, + 0.028067361563444138, + 0.03111174702644348, + -0.011874653398990631, + 0.026436440646648407, + -0.0618196465075016, + -0.01305512897670269, + 0.04523085802793503, + -0.008271096274256706, + -0.014903505332767963, + 0.00650426559150219, + -0.006313991267234087, + -0.010764073580503464, + 0.009971912950277328, + 0.03317758068442345, + -0.0029337150044739246, + -0.0194157175719738, + 0.017101364210247993, + 0.009358376264572144, + -0.0036501549184322357, + 0.05458146706223488, + -7.911905413493514e-05, + 0.009870951063930988, + -0.00901665911078453, + -0.009956380352377892, + -0.0201302170753479, + -0.028191622346639633, + -0.02059619314968586, + -0.03215242922306061, + -0.02626558393239975, + 0.022164983674883842, + -0.025271497666835785, + 0.010305862873792648, + 0.014173474162817001, + 0.014740413054823875, + -0.02472785860300064, + -0.005428634583950043, + 0.013963784091174603, + 0.02249116823077202, + -0.029558489099144936, + -0.011012595146894455, + -0.028222687542438507, + -0.040446825325489044, + -0.0010639813262969255, + -0.012022212147712708, + -0.013956017792224884, + -0.012938634492456913, + -0.025022977963089943, + -0.02350078523159027, + 0.018732285127043724, + -0.025333628058433533, + 0.02064279094338417, + -0.015377248637378216, + 0.03404740244150162, + 0.006341173313558102, + 0.030801095068454742, + -0.002395899500697851, + 0.007610961329191923, + 0.009086555801331997, + 0.03258734196424484, + 0.026079192757606506, + 0.03050597570836544, + 0.010865035466849804, + -0.025209367275238037, + 0.019229326397180557, + -0.0104534225538373, + 0.042900972068309784, + 0.04902080446481705, + -0.010927165858447552, + 0.02115536667406559, + -0.01305512897670269, + -0.025411291047930717, + -0.0014746238011866808, + -0.005149048287421465, + 0.011657197028398514, + 0.017800331115722656, + -0.0003443862951826304, + -0.008488551713526249, + 0.011610599234700203, + -0.024339543655514717, + 0.028688665479421616, + -0.020363204181194305, + -0.03320864215493202, + -0.009203050285577774, + 0.02371824160218239, + 0.012589151971042156, + 0.047094766050577164, + -0.017334353178739548, + -0.03730924427509308, + 0.03473083674907684, + -0.017443081364035606, + -0.03504148870706558, + -0.05830928310751915, + -0.005836364813148975, + 0.03420272842049599, + 0.00113387790042907, + -0.022366907447576523, + 0.018934208899736404, + 0.004131664987653494, + -0.025473421439528465, + 0.03351929411292076, + -0.03224562481045723, + 0.023625046014785767, + -0.011377610266208649, + 0.006698422599583864, + 0.0002854110498446971, + -0.0034928875975310802, + 0.00948263704776764, + 0.01814204640686512, + -0.027787774801254272, + 0.021077703684568405, + 0.02918570674955845, + -0.007401271723210812, + -0.0374024398624897, + 0.023873567581176758, + 0.022196048870682716, + -0.01109025813639164, + 0.039421673864126205, + -0.04001191258430481, + -0.013668665662407875, + -0.012612449936568737, + -0.018437165766954422, + -0.001196008175611496, + -0.0659823790192604, + 0.032618407160043716, + 0.01001851074397564, + -0.017101364210247993, + -0.0107796061784029, + -0.010865035466849804, + -0.021341757848858833, + 0.0042442758567631245, + -0.029729347676038742, + -0.00873707327991724, + -0.045510441064834595, + -0.03202816843986511, + -0.026809222996234894, + -0.008706008084118366, + -0.0005116041866131127, + 0.0032754316926002502, + 0.02595493197441101, + -0.04249712452292442, + -0.02171453833580017, + 0.007370206527411938, + -0.017054766416549683, + 0.0030230272095650434, + -0.021497083827853203, + -0.022801818326115608, + 0.0020425335969775915, + -0.013280350714921951, + -0.06163325533270836, + 0.010026277042925358, + 0.028393546119332314, + 0.022149451076984406, + 0.028843991458415985, + 0.002762856660410762, + -0.003426874289289117, + -0.007704156916588545, + -0.030925355851650238, + -0.04265245050191879, + -0.005642207805067301, + -0.015858758240938187, + -0.003688986413180828, + 0.0011630015214905143, + -0.013101726770401001, + -0.015967486426234245, + -0.01762947253882885, + 0.0091719850897789, + -0.030490443110466003, + -0.012387228198349476, + 0.054239749908447266, + 0.012053277343511581, + -0.008473019115626812, + -0.014491891488432884, + 0.02084471471607685, + -0.04255925491452217, + 0.01809544861316681, + 0.012992998585104942, + 0.0215592123568058, + 0.00848078541457653, + -0.007424570620059967, + 0.014585087075829506, + -0.00017061561811715364, + -0.009505935944616795, + -0.04103706032037735, + -0.04081960394978523, + -0.028191622346639633, + 0.01860802434384823, + -0.0005732490681111813, + 0.0222737118601799, + -0.00026284027262590826, + -0.013474508188664913, + -0.05321459844708443, + -0.02407548949122429, + -0.020891312509775162, + 0.012635748833417892, + -0.027880970388650894, + -0.026389844715595245, + -0.023842502385377884, + 0.011385376565158367, + -0.0048927608877420425, + -0.00485392939299345, + 0.05315246805548668, + 0.01379292644560337, + -0.007168283220380545, + -0.0025279265828430653, + 0.011517403647303581, + 0.009140919893980026, + 0.020922377705574036, + -0.013031830079853535, + 0.013047362677752972, + 0.01870121993124485, + 0.007708040066063404, + 0.04743648320436478, + 0.021792201325297356, + 0.02611025795340538, + 3.3370764867868274e-05, + -0.0010086465626955032, + -0.014755945652723312, + 0.03761989623308182, + -0.05100897327065468, + 0.03907995671033859, + -0.011098024435341358, + 0.02084471471607685, + -0.015439379028975964, + -0.016107279807329178, + -0.017505211755633354, + 0.021838799118995667, + 0.023190133273601532, + 0.02146601863205433, + -0.01568789966404438, + -0.012045511044561863, + 0.019788499921560287, + -0.04880334809422493, + 0.018048850819468498, + 0.007443986367434263, + 0.012550320476293564, + -0.016728581860661507, + -0.01823524199426174, + -0.015804395079612732, + -0.0018163403728976846, + -0.007704156916588545, + 0.02458806522190571, + -0.019508913159370422, + 0.023795904591679573, + -0.01716349460184574, + -0.02749265730381012, + 0.023174600675702095, + 0.03317758068442345, + -0.012837672606110573, + -0.007020723540335894, + -0.007506116759032011, + -0.01738095097243786, + -0.0018483763560652733, + -0.01767607033252716, + 0.006733370944857597, + -0.04436103254556656, + 0.02693348377943039, + -0.0072847772389650345, + 0.018079916015267372, + 0.012356163002550602, + -0.01200667954981327, + 0.021450486034154892, + -0.0026055893395096064, + 0.01860802434384823, + -0.04007404297590256, + 0.048927608877420425, + -0.01584322564303875, + -0.028082894161343575, + 0.0007853658171370625, + -0.044640619307756424, + -0.03650154918432236, + -0.007044022437185049, + 0.01615387760102749, + 0.01477147825062275, + -0.005576194263994694, + 0.0006130512920208275, + 0.031298138201236725, + 0.027197537943720818, + -0.051226429641246796, + -0.02708880975842476, + -0.026545168831944466, + -0.019244858995079994, + -0.010733009316027164, + 0.032276690006256104, + -0.012076576240360737, + 0.029372097924351692, + -0.019089533016085625, + 0.0162004753947258, + -0.023128002882003784, + -0.024261880666017532, + 0.009948614053428173, + -0.0396701954305172, + 0.03209029883146286, + 0.027834372594952583, + -0.012457124888896942, + -0.018716752529144287, + -0.013280350714921951, + 0.035134684294462204, + 0.01644899696111679, + -0.009886483661830425, + -0.00539368623867631, + 0.019943825900554657, + 0.0008703095372766256, + 7.226287561934441e-05, + 0.017971187829971313, + -0.06147792935371399, + -0.03417166322469711, + 0.01487244013696909, + 0.010585449635982513, + -0.011696028523147106, + -0.051630277186632156, + -0.05048086494207382, + 0.020223412662744522, + -0.0015056888805702329, + 0.0023900747764855623, + -0.012961933389306068, + -0.006123717408627272, + -0.006018872372806072, + -0.021077703684568405, + -0.05905484780669212, + -0.0034249327145516872, + 0.008185666985809803, + -0.0183439701795578, + 0.01387058850377798, + 0.014445293694734573, + -0.03581811487674713, + -0.034979358315467834, + -0.011866887100040913, + 0.013948251493275166, + -0.03693646192550659, + -0.03504148870706558, + 0.0008877837099134922, + 0.00468695443123579, + -0.01809544861316681, + -0.010290330275893211, + -0.020363204181194305, + 0.023190133273601532, + 0.00858174730092287, + 0.01392495259642601, + -0.01428220234811306, + -0.006046054419130087, + -0.002747324062511325, + -0.008014808408915997, + 0.012076576240360737, + 0.0010931049473583698, + -0.004201561212539673, + 0.004492796957492828, + -0.046939440071582794, + 0.08201199024915695, + -0.05231371149420738, + 0.003281256416812539, + 0.04762287437915802, + 0.04501340165734291, + -0.0649261623620987, + 0.007544947788119316, + 0.03336396813392639, + 0.019291456788778305, + -0.009537000209093094, + 0.032276690006256104, + -0.055327028036117554, + -0.004422900732606649, + -0.015470444224774837, + -0.04721902683377266, + 0.018825480714440346, + -0.04460955411195755, + -0.009700092487037182, + 0.03327077254652977, + -0.026250051334500313, + 0.013637600466609001, + -0.00468695443123579, + 0.000857689359690994, + 0.019229326397180557, + 0.014934570528566837, + -0.027011146768927574, + -0.015175324864685535, + -0.00512186624109745, + -0.003102631773799658, + -0.008317693136632442, + -0.007525532506406307, + 0.02392016537487507, + 0.025628747418522835, + -0.0532456636428833, + 0.001654219115152955, + -0.032214559614658356, + 0.032214559614658356, + -0.04563470184803009, + -0.014554021880030632, + 0.013684198260307312, + -0.024805521592497826, + -0.0010241791605949402, + -0.00517623033374548, + 0.04498233646154404, + -0.008278862573206425, + -0.01446082629263401, + -0.0050053722225129604, + 0.007847833447158337, + 0.021590277552604675, + -0.03721604868769646, + 0.004104482941329479, + -0.03345716372132301, + 0.009078789502382278, + -0.02350078523159027, + 0.004178262315690517, + 0.005549012217670679, + -0.01644899696111679, + -0.047343287616968155, + -0.03246308118104935, + -0.02524043247103691, + -0.007055671885609627, + 0.024292945861816406, + -0.008729306980967522, + -0.018778882920742035, + 0.003399692242965102, + 0.005618908908218145, + 0.022444570437073708, + 0.0269800815731287, + 0.026995614171028137, + -0.02892165258526802, + -0.027011146768927574, + 0.011820289306342602, + -0.0063062249682843685, + 0.006574162282049656, + -0.007634260226041079, + -0.061198342591524124, + 0.01078737247735262, + 0.02039426937699318, + -0.018157579004764557, + -0.03519681468605995, + 0.00042253456194885075, + -0.019804032519459724, + -0.0037588831037282944, + -0.018079916015267372, + 0.009645728394389153, + -0.003405516967177391, + -0.007913846522569656, + -0.008938996121287346, + -0.006853748578578234, + -0.03184177726507187, + 0.025022977963089943, + -0.016309203580021858, + -0.015245221555233002, + -0.03821013122797012, + 0.04286990687251091, + -0.03305331990122795, + -0.008123536594212055, + -0.018017785623669624, + 0.007948795333504677, + -0.012426059693098068, + -0.03050597570836544, + -0.01599855162203312, + -0.02070492133498192, + -0.014911271631717682, + -0.029869141057133675, + -0.019943825900554657, + 0.0030133193358778954, + -0.0004089435678906739, + 0.04016723856329918, + -0.0013115317560732365, + 0.00666735740378499, + 0.013886121101677418, + -0.041720494627952576, + -0.004760734271258116, + 0.03404740244150162, + -0.017815863713622093, + 0.003498712321743369, + 0.013575470075011253, + -0.004236509557813406, + -0.00021150997781660408, + -0.012138706631958485, + 0.029962336644530296, + -0.01055438444018364, + -0.04125451669096947, + -0.03519681468605995, + 0.031158344820141792, + 0.061136212199926376, + 0.011975615285336971, + 0.04973530396819115, + 0.01443752832710743, + 0.008317693136632442, + -0.004488913808017969, + 0.04405038058757782, + -0.007824534550309181, + -0.009350609965622425, + -0.021838799118995667, + -0.007975976914167404, + -0.029263369739055634, + -0.02213391847908497, + 4.213817373965867e-05, + 0.009894249960780144, + -0.00024148299416992813, + -0.029698282480239868, + -0.0017037292709574103, + -0.005362621508538723, + 0.006888696923851967, + -0.029294434934854507, + 0.049486782401800156, + 0.00661687646061182, + 0.0003523952909745276, + -0.022087320685386658, + -0.011385376565158367, + 0.013761861249804497, + -0.0043918355368077755, + 0.008511850610375404, + 0.02263096161186695, + 0.01216200552880764, + -0.015905356034636497, + 0.013031830079853535, + 0.005894612055271864, + 0.0033220292534679174, + 0.0020425335969775915, + -0.004519979003816843, + 0.002442497294396162, + 0.020456399768590927, + -0.021217497065663338, + 0.009777755476534367, + -0.009265180677175522, + 0.0011717386078089476, + 0.05448827147483826, + -0.00671783834695816, + 0.0012134823482483625, + -0.011509637348353863, + -0.012348396703600883, + -0.017334353178739548, + 0.003479296574369073, + 0.030599171295762062, + 0.015579172410070896, + -0.03836545720696449, + -0.00047325811465270817, + -0.0069857751950621605, + 0.004881111439317465, + -0.0007581837708130479, + -0.014678282663226128, + -0.015058830380439758, + -0.0033977506682276726, + 0.04150303825736046, + -0.03162432089447975, + 0.016697516664862633, + -0.004298639949411154, + -0.05405335873365402, + -0.009537000209093094, + -0.00044753230758942664, + 0.012154239229857922, + -0.005362621508538723, + 0.01275224331766367, + -0.009443805553019047, + -0.019400184974074364, + -0.002623063512146473, + -0.0021473783999681473, + 0.048213109374046326, + -0.03777522221207619, + -0.046318136155605316, + -0.0037161684595048428, + -0.05318353325128555, + -0.04193795099854469, + -0.013707497157156467, + -0.01014277059584856, + -0.007156633771955967, + -0.011859120801091194, + -0.031810712069272995, + 0.014476358890533447, + 0.02300374209880829, + 0.010880568064749241, + -0.01696157082915306, + -0.01738095097243786, + 0.012845438905060291, + 0.0008096354431472719, + 0.00021102458413224667, + -0.017132429406046867, + -0.02186986431479454, + 0.01905846782028675, + 0.0026560702826827765, + -0.016573257744312286, + 0.016790712252259254, + 0.04672198370099068, + -0.008845801465213299, + -0.017877992242574692, + -0.005098567344248295, + 0.02075151912868023, + -0.03976339101791382, + 0.0070673213340342045, + -0.007968210615217686, + 0.012177538126707077, + -0.0073507907800376415, + 0.0008795320172794163, + 0.011556235142052174, + -0.03039724752306938, + -0.02309693768620491, + -0.024510402232408524, + 0.03392314165830612, + 0.019788499921560287, + -0.02514723874628544, + 0.03699859231710434, + -0.008069172501564026, + -0.011602832935750484, + 0.028424611315131187, + -0.03780628740787506, + -0.003339503426104784, + 0.01035246066749096, + 0.01338907890021801, + -0.005941209848970175, + 0.018514828756451607, + -0.009032191708683968, + -0.012969699688255787, + 0.0036676290910691023, + -0.04088173434138298, + -0.00020253020920790732, + 0.007785703055560589, + -0.014484125189483166, + -0.0016814011614769697, + -0.009039958007633686, + 0.04358440265059471, + -0.011268883012235165, + 0.024463804438710213, + -0.012783308513462543, + -0.00869047548621893, + -0.02626558393239975, + 0.002232807455584407, + 0.018639089539647102, + -0.01952444575726986, + 0.005017021670937538, + 0.005094684194773436, + 0.006690656300634146, + 0.011478572152554989, + 0.007696390617638826, + -0.007700273767113686, + 0.006383887957781553, + 0.00879143737256527, + 0.014095811173319817, + -0.001004763413220644, + 0.007902197539806366, + -0.023842502385377884, + -0.030086597427725792, + -0.007117802277207375, + 0.013070661574602127, + 0.011998913250863552, + -0.012829906307160854, + 0.0241220872849226, + -0.03215242922306061, + -0.02079811692237854, + 0.021761136129498482, + 0.006011106073856354, + 0.009669027291238308, + 0.04159623384475708, + -0.02100004069507122, + -0.00581306591629982, + -0.00367927853949368, + -0.01814204640686512, + -0.041005995124578476, + 0.046535592526197433, + 0.011579534038901329, + 0.0324009507894516, + 0.02162134274840355, + 0.0019075942691415548, + 0.027787774801254272, + -0.015136493369936943, + 0.019027404487133026, + 0.006779968738555908, + -0.03010213002562523, + -0.02575300820171833, + -0.021062171086668968, + -0.006294575985521078, + -0.011851354502141476, + -0.007292543537914753, + 0.0059373266994953156, + 0.009459338150918484, + -0.0011513520730659366, + -0.03137579932808876, + -0.05417761951684952, + -0.020192347466945648, + -0.005028671119362116, + 0.021481551229953766, + 0.012728944420814514, + -0.0720711424946785, + 0.0410991907119751, + 0.013637600466609001, + -0.009630195796489716, + 0.02207178808748722, + 0.0068343328312039375, + 0.0011552352225407958, + 0.004279224202036858, + -0.018219709396362305, + 0.04296310245990753, + 0.0057237534783780575, + 0.0006989658577367663, + -0.012977465987205505, + -0.01359100267291069, + 0.02253776602447033, + -0.008845801465213299, + -0.002359009813517332, + -0.021481551229953766, + -0.01188241969794035, + 0.02390463277697563, + -0.008845801465213299, + -0.011688262224197388, + 0.029977869242429733, + -0.02646750584244728, + 0.009777755476534367, + -0.024712326005101204, + -0.032214559614658356, + 0.002492978237569332, + -0.01579662784934044, + -0.02140388824045658, + 0.0029045913834124804, + -0.020471932366490364, + -0.031453464180231094, + 0.006150899454951286, + 0.026591766625642776, + -0.014064745977520943, + 0.0031569956336170435, + -0.026172388345003128, + 0.027275200933218002, + 0.013901653699576855, + 0.03907995671033859, + -0.020627258345484734, + 0.02054959535598755, + -0.032773733139038086, + 0.04743648320436478, + -0.009366142563521862, + 0.032618407160043716, + -0.007564363535493612, + -0.010135005228221416, + 0.003980222158133984, + 0.02390463277697563, + 0.0010426240041851997, + -0.003984105307608843, + -0.015633536502718925, + -0.025287030264735222, + -0.004997605923563242, + 0.032680537551641464, + 0.005358738359063864, + 0.018934208899736404, + -0.02718200534582138, + -0.0027143172919750214, + 0.012356163002550602, + -0.009047724306583405, + 0.03041278012096882, + 0.026840288192033768, + -0.01803331822156906, + 0.03603557124733925, + 0.03157772496342659, + -0.0022638726513832808, + 0.006112067960202694, + 0.014491891488432884, + -0.03055257350206375, + 0.0027803308330476284, + -0.015027766115963459, + 0.014856907539069653, + -0.006578045431524515, + -0.036967527121305466, + 0.01310949306935072, + -0.0662309005856514, + -0.01870121993124485, + 0.02314353547990322, + 0.03358142450451851, + 0.006061587017029524, + 0.017645005136728287, + -0.011082491837441921, + 0.027119874954223633, + -0.007168283220380545, + -0.031204942613840103, + 0.012379461899399757, + -0.01742754876613617, + 0.01295416709035635, + -0.0007931320578791201, + -0.05784330517053604, + -0.03404740244150162, + 0.003339503426104784, + 0.007774053607136011, + -0.014647217467427254, + 0.015478210523724556, + -0.0066207596100866795, + -0.0226930920034647, + -0.017645005136728287, + 0.009839885868132114, + 0.03485509753227234, + -0.023314394056797028, + -0.036315158009529114, + 0.004659772384911776, + 0.007005190942436457, + -0.00016005832003429532, + -0.008519616909325123, + 0.016014084219932556, + -0.009459338150918484, + 0.016014084219932556, + -0.021683473140001297, + -0.009513702243566513, + -0.01595195382833481, + -0.0024444388691335917, + -0.0042947567999362946, + -0.014484125189483166, + 0.0012484306935220957, + -0.002273580525070429, + -0.017753733322024345, + -0.0021473783999681473, + -0.05277968943119049, + -0.005036437418311834, + 0.007758521009236574, + -0.022366907447576523, + 0.005999456625431776, + -0.006915878504514694, + -0.008030341006815434, + -0.02247563563287258, + -0.002617238787934184, + -0.009785521775484085, + -0.03789948299527168, + 0.009086555801331997, + -0.03463764116168022, + 0.046380266547203064, + 0.03839652240276337, + 0.011564001441001892, + 0.03336396813392639, + 0.040136173367500305, + -0.0022755220998078585, + -0.003252132795751095, + -0.0018619673792272806, + 0.016138345003128052, + 0.009443805553019047, + 0.030133193358778954, + -0.014538489282131195, + 0.007428453769534826, + -0.016309203580021858, + 0.028129491955041885, + 0.004395718686282635, + -0.003859844757243991, + 0.017505211755633354, + -0.011750392615795135, + -0.028129491955041885, + 0.017256690189242363, + 0.012029978446662426, + -0.0104534225538373, + 0.006430485751479864, + 0.015835460275411606, + 0.02146601863205433, + -0.015229688957333565, + -0.009249648079276085, + -0.03510361909866333, + -0.016790712252259254, + 0.03003999963402748, + 0.04532405361533165, + -0.016946038231253624, + -0.018918676301836967, + -0.03994978219270706, + -0.02488318458199501, + -0.003209418151527643, + 0.009948614053428173, + 0.02028554119169712, + 0.025877268984913826, + -0.007840067148208618, + -0.0042287432588636875, + -0.012837672606110573, + -0.008348758332431316, + -0.019912760704755783, + -0.007587662432342768, + -0.03342609852552414, + -0.011074725538492203, + 0.002941481303423643, + 0.01481807604432106, + 0.014755945652723312, + -0.013093960471451283, + 0.009568065404891968, + 0.0018998279701918364, + 0.024960847571492195, + -0.025333628058433533, + 0.02503851056098938, + -0.00490441033616662, + -0.016014084219932556, + 0.003155054058879614, + 0.0010241791605949402, + -0.03041278012096882, + -0.0008688533562235534, + -0.010391292162239552, + 0.026343246921896935, + -0.00709062023088336, + 0.017707135528326035, + -0.016681984066963196, + 0.012767775915563107, + -0.015920888632535934, + 0.028331415727734566, + 0.00027279084315523505, + 0.02222711406648159, + 0.008053639903664589, + -0.03101855143904686, + 4.659772457671352e-05, + -0.007630377076566219, + -0.03296012431383133, + 0.04451635852456093, + 0.01874781772494316, + 0.012394994497299194, + -0.010958231054246426, + -0.027275200933218002, + -0.030474910512566566, + -0.028067361563444138, + 0.02753925509750843, + 0.022506700828671455, + 0.0035064786206930876, + 0.010841736570000648, + -0.02253776602447033, + 0.04355333745479584, + -0.025939399376511574, + -0.03342609852552414, + -0.0453861840069294, + -0.016340268775820732, + -0.003838487435132265, + -0.03317758068442345, + 0.023019274696707726, + 0.018048850819468498, + -0.012426059693098068, + -0.007723572663962841, + -0.030335117131471634, + 0.0023900747764855623, + -0.007078970782458782, + 0.014856907539069653, + 0.028036296367645264, + 0.012472657486796379, + -0.007059555035084486, + 0.00327737326733768, + -0.043460141867399216, + -0.02677815780043602, + -0.017101364210247993, + 1.473622614867054e-05, + -0.002339594066143036, + 0.00019015268480870873, + 0.010430123656988144, + 0.018514828756451607, + 0.02298820950090885, + 0.011835821904242039, + -0.008286628872156143, + 0.01001851074397564, + -0.016883907839655876, + -0.008154601790010929, + -0.003380276495590806, + 0.011532936245203018, + 0.0060227555222809315, + -0.010034043341875076, + -0.003292905865237117, + 0.008768138475716114, + 0.02253776602447033, + 0.00787889864295721, + -0.01997489109635353, + -0.038769304752349854, + -0.01655772514641285, + -0.027414994314312935, + 0.003714226884767413, + -0.0030424429569393396, + -0.032773733139038086, + -0.012014445848762989, + 0.0295429565012455, + 0.03106514923274517, + -0.03693646192550659, + -0.0034967707470059395, + -0.01408027857542038, + 0.03566278889775276, + -0.007657559122890234, + -0.007762404158711433, + 0.014002615585923195, + -0.010282563976943493, + -0.0070828539319336414, + 0.0016066506505012512, + -0.03050597570836544, + 0.005145165137946606, + 0.016216007992625237, + -0.017349885776638985, + -0.015835460275411606, + -0.01818864420056343, + -0.00907102320343256, + -0.04370866343379021, + -0.036253027617931366, + -0.008309926837682724, + 0.018359502777457237, + 0.016169410198926926, + -0.026545168831944466, + -0.010088407434523106, + -0.004807331599295139, + ], + "index": 48, + }, + { + "title": "Perry Greeley Holden", + "text": "Perry Greeley Holden (October 13, 1865 \u2013 October 8, 1959) was the first professor of agronomy in the United States.", + "vector": [ + -0.042185183614492416, + -0.013899726793169975, + -0.01151136215776205, + 0.005064860451966524, + -0.02779945358633995, + -0.026771901175379753, + -0.0301878172904253, + -0.01803770661354065, + 0.024897312745451927, + 0.042935021221637726, + -0.05340494215488434, + 0.0007897571776993573, + -0.009067454375326633, + 0.00041939577204175293, + 0.01438573095947504, + 0.026466412469744682, + -0.01741284504532814, + 0.030215589329600334, + -0.03271504119038582, + -0.003122578375041485, + 0.06187530606985092, + -0.06559671461582184, + -0.007234523072838783, + 0.04335159435868263, + 0.06726301461458206, + 0.002051633084192872, + -0.00758166890591383, + 0.003648504614830017, + 0.05215521901845932, + 0.03235400840640068, + 0.017607245594263077, + 0.014607904478907585, + 0.0387137234210968, + 0.016413064673542976, + -0.006477744784206152, + -0.04346268251538277, + -0.04274061694741249, + -0.01745450124144554, + 0.008616164326667786, + 0.022522833198308945, + -0.008956367149949074, + 0.0156493429094553, + -0.013024918735027313, + 0.041963011026382446, + 0.00763721251860261, + 0.034492429345846176, + -0.011053129099309444, + -0.014031642116606236, + -0.029382439330220222, + 0.0384637787938118, + -0.015107794664800167, + 0.018884742632508278, + 0.0007146868738345802, + -0.030076730996370316, + -0.005648065824061632, + 1.2102649407097488e-06, + 0.009324342012405396, + 0.10842064768075943, + -0.011858507990837097, + -0.024105818942189217, + -0.05626542866230011, + 0.010004748590290546, + -0.04662865400314331, + -0.005960497073829174, + 0.04271284490823746, + 0.0024734153412282467, + -0.012670829892158508, + 0.01569100096821785, + -0.013892783783376217, + 0.028715919703245163, + 0.03477014601230621, + -0.03474237397313118, + 0.013837240636348724, + 0.04865598678588867, + 0.023841988295316696, + -0.023744788020849228, + 0.041574206203222275, + -0.009664544835686684, + 0.005172475706785917, + -0.0055959937162697315, + -0.06926257163286209, + -0.035075634717941284, + 0.018093250691890717, + 0.0241752490401268, + -0.012622229754924774, + -0.027507850900292397, + 0.021273108199238777, + -0.042851705104112625, + 0.015191109851002693, + 0.014677333645522594, + -0.0012037288397550583, + 0.07120659202337265, + 0.01182379387319088, + 0.011615505442023277, + -0.019342975690960884, + 0.03699187934398651, + -0.02935466729104519, + -0.009129940532147884, + 0.057487379759550095, + 0.0019231889164075255, + -0.03510340675711632, + -0.006328471936285496, + -0.006224328186362982, + -0.01509390864521265, + -0.03282612934708595, + 0.03235400840640068, + -0.05684863403439522, + 0.01967623643577099, + 0.046212077140808105, + 0.05887596681714058, + 0.025661034509539604, + -0.030687708407640457, + 0.0001145581845776178, + 0.023355985060334206, + 0.00043349858606234193, + 0.01913468912243843, + -0.026494184508919716, + 0.0004873062134720385, + -0.013233206234872341, + 0.010074177756905556, + -0.02585543505847454, + -0.022564491257071495, + -0.0038255490362644196, + 0.02182854153215885, + 0.014038585126399994, + -0.04318496584892273, + -0.022203460335731506, + 0.0026764958165585995, + 0.022522833198308945, + -0.04857267066836357, + -0.026799673214554787, + 0.01896805875003338, + 0.01240005623549223, + -0.006467330269515514, + -0.013670610263943672, + 0.03668639063835144, + 0.08925818651914597, + 0.044795721769332886, + 0.0408521443605423, + 0.046434253454208374, + -0.021509166806936264, + 0.024466851726174355, + -0.05176641419529915, + 0.00439833989366889, + -0.018357081338763237, + -0.041963011026382446, + -0.06598551571369171, + 0.02196739986538887, + -0.021286994218826294, + 0.026410868391394615, + -0.012879117392003536, + -0.002905612112954259, + 0.0632638931274414, + -0.03054885007441044, + -0.013510922901332378, + -0.052488479763269424, + 0.027785567566752434, + -0.021314766258001328, + -0.06742963939905167, + -0.02577212080359459, + -0.020217783749103546, + 0.02461959607899189, + -0.012122338637709618, + 0.03815829008817673, + -0.012233425863087177, + -0.022383974865078926, + -0.0204677302390337, + 0.014649561606347561, + 0.00027099085855297744, + -0.002839654451236129, + 0.014843964017927647, + -0.04062997177243233, + 0.02854928933084011, + -0.0314653143286705, + -0.05993128940463066, + 0.004929473623633385, + 0.037908345460891724, + 0.00917159765958786, + -0.02439742162823677, + 0.0060438122600317, + -0.03185411915183067, + 0.013663667254149914, + 0.024244677275419235, + 0.014059414155781269, + -0.001092642080038786, + 0.009886718355119228, + 0.026813559234142303, + 0.08120439946651459, + -0.015746543183922768, + 0.0014875206397846341, + -0.03390922397375107, + 0.00655411696061492, + -0.056820861995220184, + 0.022731121629476547, + 0.023175468668341637, + -0.005044031888246536, + -0.04940582066774368, + -0.013726153410971165, + -0.06065335124731064, + -0.008671707473695278, + -0.020120583474636078, + -0.033881451934576035, + -0.011129501275718212, + 0.008518963120877743, + -0.02502228505909443, + -0.007036649622023106, + 0.0050544459372758865, + 0.07148430496454239, + 0.0011082636192440987, + 0.010442152619361877, + 0.027646709233522415, + -0.04446246102452278, + 0.008824451826512814, + 0.0407688282430172, + -0.007533068768680096, + 0.025133371353149414, + 0.005672365892678499, + -0.008879994973540306, + -0.017621131613850594, + 3.1527908959105844e-06, + 0.005585579667240381, + -0.003301358548924327, + -0.012990203686058521, + 0.005925782490521669, + 0.002213055966421962, + -0.03999122232198715, + -0.01971789449453354, + 0.011053129099309444, + -0.010011691600084305, + -0.029910100623965263, + -0.03107651136815548, + -0.014982822351157665, + -0.030882110819220543, + 0.05732075124979019, + -0.03746400028467178, + 0.03915807232260704, + -0.03488123044371605, + 0.0276328232139349, + 0.0042212954722344875, + -0.03093765303492546, + 0.010449095629155636, + 0.013254035264253616, + -0.04704522714018822, + -0.023106038570404053, + -0.014274644665420055, + 0.03788057342171669, + -0.03743622824549675, + -0.06926257163286209, + -0.01380946859717369, + 0.02130088023841381, + 0.028799233958125114, + -0.04610099270939827, + 0.014087185263633728, + -0.029632383957505226, + 0.016565807163715363, + -0.007421982008963823, + 0.034020308405160904, + -0.009935319423675537, + 0.02227288857102394, + 0.005040560383349657, + -0.03252064064145088, + 0.032242923974990845, + 0.00693944888189435, + -0.005335634108632803, + -0.025605490431189537, + -0.02152305282652378, + 0.0033308661077171564, + 0.026577498763799667, + 0.01702404022216797, + -0.018662570044398308, + -0.010678211227059364, + -0.013122119940817356, + 0.013184606097638607, + 0.05184973031282425, + 0.03210406377911568, + 0.00037860614247620106, + -0.028938092291355133, + 0.012483370490372181, + -0.007130379322916269, + 0.01233062706887722, + -0.020259441807866096, + -0.04462909325957298, + 0.017954392358660698, + -0.04462909325957298, + -0.006519402377307415, + -0.003013227367773652, + -0.020453844219446182, + -0.02466125413775444, + 0.024230793118476868, + -0.04865598678588867, + -0.023925304412841797, + -0.009553458541631699, + -0.0039053927175700665, + 0.0410187728703022, + -0.0006226931582204998, + -0.0008335844031535089, + 0.000454327353509143, + -0.02480011247098446, + 0.006595774553716183, + -0.04201855510473251, + 0.08703645318746567, + 0.011178101412951946, + 0.029465753585100174, + 0.00489475904032588, + 0.003940107300877571, + -0.04918364807963371, + -0.021995171904563904, + -0.03563106805086136, + 0.018843086436390877, + -0.040602199733257294, + 0.0006300700479187071, + 0.0037838916759938, + 0.04857267066836357, + 0.0230227243155241, + 0.002466472564265132, + 0.009254912845790386, + 0.03565884009003639, + 0.09120219945907593, + -0.006613131612539291, + -0.02907695062458515, + -0.05015565827488899, + -0.007352552842348814, + -0.009567344561219215, + -0.0528772808611393, + 0.010317179374396801, + 0.006463858764618635, + -0.011761306785047054, + 0.008414819836616516, + 0.01363589521497488, + 0.0132401492446661, + -0.049211420118808746, + -0.051072120666503906, + 0.017246214672923088, + -0.02073156088590622, + 0.04190746694803238, + -0.06965138018131256, + -0.010393551550805569, + 0.034325797110795975, + -0.028521517291665077, + -0.0014319773763418198, + -0.0217868834733963, + -0.011094787158071995, + -0.011525248177349567, + 0.030965425074100494, + 0.040907688438892365, + -0.022745007649064064, + 0.08986916393041611, + 0.02913249470293522, + 0.00431849667802453, + 0.0012627436080947518, + 0.0005858088843524456, + -0.0013989984290674329, + -0.0011881073005497456, + -0.0013304371386766434, + 0.0065923030488193035, + 0.02231454662978649, + -0.028146598488092422, + -0.009296569973230362, + 0.02793831191956997, + 0.010247750207781792, + 0.005995211657136679, + -0.03682525083422661, + 0.04848935455083847, + 0.03646421805024147, + -0.008317618630826473, + 0.03077102266252041, + -0.0032024220563471317, + 0.012587514705955982, + 0.01816267892718315, + -0.010608782060444355, + -0.027507850900292397, + 0.03210406377911568, + 0.010532409884035587, + -0.0004651756607927382, + -0.01120587345212698, + -0.032603953033685684, + 0.007505296729505062, + 0.01674632355570793, + -0.022661691531538963, + -0.02103704959154129, + 0.02678578719496727, + 0.029465753585100174, + 0.011122558265924454, + -0.00138424476608634, + -0.04504566639661789, + -0.06709638237953186, + 0.008435647934675217, + 0.00738032441586256, + 0.007880214601755142, + -0.05698749050498009, + -0.024786226451396942, + 0.004703828599303961, + 0.0133442934602499, + 0.009699259884655476, + 0.027466192841529846, + 0.007845500484108925, + 0.02761893719434738, + -0.012858288362622261, + 0.05604325234889984, + -0.006061169318854809, + 0.020134469494223595, + -0.06193085014820099, + -0.00915076956152916, + 0.019523492082953453, + 0.013552580960094929, + -0.004495541099458933, + 0.003060092218220234, + 0.054654669016599655, + 0.021273108199238777, + 0.020176127552986145, + -0.005818167235702276, + 0.01025469321757555, + -0.038519322872161865, + 0.01873200014233589, + 0.009935319423675537, + -0.0026851745788007975, + 0.01603814586997032, + 0.02064824476838112, + 0.023175468668341637, + 0.033353790640830994, + 0.028438201174139977, + 0.029271353036165237, + -0.026147037744522095, + -0.016829639673233032, + 0.010067234747111797, + -0.019995611160993576, + 0.026758015155792236, + 0.011421103961765766, + 0.0006795383524149656, + 0.0436570830643177, + -0.013969155959784985, + 0.020745446905493736, + 0.03310384601354599, + 0.015607684850692749, + 0.01553825568407774, + 0.0026712885592132807, + 0.023439299315214157, + 0.0276328232139349, + 0.045878816395998, + 0.06081998348236084, + -0.008630050346255302, + -0.034186940640211105, + -0.04049111157655716, + 0.014649561606347561, + -0.07220637053251266, + -0.038213834166526794, + -0.03263172507286072, + -0.0059674400836229324, + 0.0005163797177374363, + 0.029854558408260345, + -0.019148575142025948, + 0.025036171078681946, + 0.012518085539340973, + 0.016996270045638084, + -0.0074080959893763065, + -0.029160264879465103, + -0.011143387295305729, + -0.00028118828777223825, + 0.003874149639159441, + 0.014594018459320068, + 0.008039901964366436, + 0.0005476228543557227, + 0.025702690705657005, + -0.021578596904873848, + -0.05282173678278923, + 0.012094567529857159, + 0.008720307610929012, + 0.0003041866875719279, + -0.015524369664490223, + -0.0016012110281735659, + 0.011629391461610794, + 0.01980120874941349, + -0.0035999042447656393, + 0.03849155083298683, + -0.00040312332566827536, + 0.005391177721321583, + -0.0015656285686418414, + 0.05246070772409439, + 0.014871735125780106, + 0.039185844361782074, + 0.0018815314397215843, + -0.0230227243155241, + -0.026674700900912285, + 0.0031937432941049337, + 0.04279616102576256, + -0.016871295869350433, + 0.03907475620508194, + 0.001379905384965241, + 0.010400494560599327, + 0.05632096901535988, + -0.03288166970014572, + 0.04462909325957298, + -0.01080318447202444, + 0.012761088088154793, + 0.040907688438892365, + 0.034631285816431046, + 0.019551264122128487, + 0.038436006754636765, + -0.017871076241135597, + 0.03263172507286072, + 0.013045747764408588, + 0.015885401517152786, + 0.027605051174759865, + -0.019079145044088364, + -0.028632603585720062, + 0.011344731785356998, + 0.03849155083298683, + -0.023966960608959198, + 0.0432405099272728, + 0.01573265716433525, + 0.001191578689031303, + 0.051905274391174316, + 0.00833150465041399, + 0.03965796157717705, + 0.04640648141503334, + 0.00046127027599141, + -0.011323902755975723, + -0.0008791473228484392, + 0.019467948004603386, + 0.041352033615112305, + -0.008435647934675217, + 0.0012297647772356868, + -0.02431410737335682, + 0.0020776689052581787, + 0.007185922469943762, + 0.04482349380850792, + -0.02271723560988903, + -0.033603735268116, + 0.026049837470054626, + -0.008921653032302856, + 0.010726812295615673, + -0.01688518188893795, + -0.026049837470054626, + 0.008761965669691563, + 0.024494623765349388, + 0.023633701726794243, + -0.011233645491302013, + 0.06015346199274063, + 0.03435356914997101, + -0.012545857578516006, + -0.02966015599668026, + 0.013254035264253616, + 0.037325140088796616, + -0.041046544909477234, + 0.0435737669467926, + 0.028368772938847542, + -0.022800549864768982, + 0.018620911985635757, + 0.012198710814118385, + 0.011546076275408268, + 0.0384637787938118, + -0.0029594197403639555, + -0.023133810609579086, + 0.012122338637709618, + 0.06881822645664215, + 0.019690122455358505, + -0.050766635686159134, + -0.007741356268525124, + 0.00961594469845295, + -0.009317399002611637, + -0.017315642908215523, + -0.014746762812137604, + -0.04582327604293823, + 0.0063423579558730125, + -0.07559451460838318, + 0.002933383919298649, + 0.015927059575915337, + 0.024675138294696808, + 0.0484338141977787, + -0.00693944888189435, + -0.01626032032072544, + -0.02255060523748398, + -0.0035894899629056454, + 0.03982459008693695, + -0.020620472729206085, + 0.004662171006202698, + -0.022689463570713997, + -0.04099100083112717, + -0.05804281309247017, + -0.021731341257691383, + 0.004183109384030104, + 0.0035651896614581347, + 0.001058795372955501, + -0.0278411116451025, + -0.03235400840640068, + -0.005248847883194685, + -0.004276839084923267, + 0.02816048450767994, + -0.02714681811630726, + -0.04507343843579292, + -0.04054665565490723, + -0.021717455238103867, + 0.0005853750044479966, + 0.0022564490791410208, + 0.014968936331570148, + -0.03690856322646141, + -0.008456476964056492, + -0.025536060333251953, + -0.039046984165906906, + 0.042990561574697495, + -0.00414492329582572, + 0.026313668116927147, + -0.04229627177119255, + -0.02338375523686409, + -0.007345609832555056, + -0.0386304073035717, + -0.003915807232260704, + -0.01056712493300438, + 0.026882987469434738, + -0.00270253187045455, + 0.008150988258421421, + -0.006658260710537434, + 0.010511581785976887, + -0.0048045008443295956, + -0.008081559091806412, + 0.008109331130981445, + -0.012059852480888367, + 0.01856536976993084, + 0.03735291212797165, + 0.012858288362622261, + 0.0770941898226738, + -0.0007307423511520028, + -0.044045887887477875, + 0.0008327165269292891, + 0.02143973857164383, + 0.0064881592988967896, + -0.02431410737335682, + -0.02741065062582493, + -0.006606188602745533, + -0.01605203188955784, + -0.009456257335841656, + -0.025966523215174675, + -0.0361587293446064, + -0.028743689879775047, + -0.005686251912266016, + -0.03482569009065628, + -0.012358398176729679, + 0.047850608825683594, + 0.0034853459801524878, + 0.024564052000641823, + 0.009824232198297977, + -0.004578855820000172, + -0.031132055446505547, + -0.01741284504532814, + -0.032159607857465744, + 0.018856972455978394, + 0.026105381548404694, + 0.0042803105898201466, + 0.0015100851887837052, + -0.004019950982183218, + 0.02709127590060234, + -0.05482130125164986, + 0.02125922217965126, + -0.005873710848391056, + 0.03346487507224083, + -0.03699187934398651, + -0.02259226329624653, + -0.051738642156124115, + 0.026188695803284645, + 0.00432196818292141, + -0.0027459249831736088, + 0.017968278378248215, + -0.010525466874241829, + 0.011872394010424614, + 0.024994513019919395, + 0.0040685515850782394, + -0.017496159300208092, + 0.019148575142025948, + 0.040018994361162186, + 0.01127530261874199, + -0.011615505442023277, + -0.005068331956863403, + 0.016496378928422928, + -0.005398120731115341, + 0.002650459762662649, + -0.026452526450157166, + -0.04201855510473251, + 0.013823354616761208, + -0.03629758954048157, + 0.008435647934675217, + -0.008560621179640293, + 0.013844183646142483, + -0.012066795490682125, + -0.005276619456708431, + -0.02081487514078617, + 0.005731381010264158, + -0.010747640393674374, + 0.04840604215860367, + -0.0019891466945409775, + 0.04343491047620773, + -0.008067673072218895, + 0.01215705368667841, + -4.5942604629090056e-05, + 0.02346707135438919, + 0.009567344561219215, + -0.009622887708246708, + 0.021273108199238777, + -0.029243580996990204, + -0.03899144008755684, + -0.005953554064035416, + -0.023106038570404053, + 0.04723963141441345, + -0.0048045008443295956, + -0.002999341581016779, + 0.01882920041680336, + -0.01191405113786459, + -0.012205653823912144, + -0.04057442769408226, + -0.023855874314904213, + -0.001143846195191145, + 0.01714901253581047, + 0.012844402343034744, + 0.003497496247291565, + 0.0067832330241799355, + 0.020481614395976067, + -0.057487379759550095, + 0.020009497180581093, + 0.014982822351157665, + -0.005398120731115341, + -0.01821822300553322, + 0.0033447518944740295, + 0.040463339537382126, + -0.0009902339661493897, + -0.004679528530687094, + 0.0008292450802400708, + 0.011997366324067116, + -0.018593139946460724, + 0.03576992452144623, + -0.024564052000641823, + 0.02020389772951603, + -0.002787582576274872, + 0.014031642116606236, + 0.026452526450157166, + -0.003860263852402568, + 0.02081487514078617, + -0.03576992452144623, + -0.031937435269355774, + -0.005769566632807255, + 0.005443249829113483, + -0.01087261363863945, + 0.037019651383161545, + 0.02656361274421215, + 0.05770955607295036, + -0.021536938846111298, + 0.0007841160986572504, + 0.01188628003001213, + 0.017565589398145676, + 0.025563832372426987, + 0.0033673164434731007, + -0.01476064883172512, + 0.04371262714266777, + 0.009025796316564083, + -0.03196520730853081, + 0.0060507552698254585, + 0.012247311882674694, + -0.023550385609269142, + 0.0034002952743321657, + -0.044656865298748016, + 0.0023605928290635347, + -0.002936855424195528, + 0.005484906956553459, + -0.0003634184831753373, + 0.01133778877556324, + 0.024952856823801994, + 0.050322286784648895, + 0.028299342840909958, + -0.03807497397065163, + -0.041213177144527435, + 0.004061608575284481, + 0.031409770250320435, + 0.011893223039805889, + -0.010518524795770645, + -0.038602638989686966, + 0.007907986640930176, + 0.02334209904074669, + 0.0335204191505909, + 0.006859605200588703, + 0.047933921217918396, + -0.00883833784610033, + -0.04646202176809311, + -0.0003686256823129952, + -0.012879117392003536, + -0.02832711488008499, + 0.0228144358843565, + 0.0076996986754238605, + -0.004190052393823862, + 0.0043427967466413975, + 0.0030757137574255466, + -0.038436006754636765, + -0.008768908679485321, + 0.0012445184402167797, + 0.04476794973015785, + 0.005422420799732208, + -0.004991959780454636, + 0.013899726793169975, + 0.017621131613850594, + -0.021009277552366257, + -0.0037491770926862955, + 0.0012445184402167797, + -0.021231450140476227, + 0.019259661436080933, + -0.019370747730135918, + 0.0036311473231762648, + 0.05634874105453491, + -0.008720307610929012, + -0.03979681804776192, + 0.006304171867668629, + -0.024258563295006752, + -0.00819958932697773, + 0.00027836771914735436, + 0.013101290911436081, + 0.03152085840702057, + 0.030909880995750427, + -0.014128843322396278, + 0.028007740154862404, + -0.005234961863607168, + 0.007574726361781359, + -0.015552141703665257, + -0.0530439130961895, + 0.02461959607899189, + -0.030965425074100494, + -0.025397202000021935, + -0.011150330305099487, + -0.01900971680879593, + 0.03535335138440132, + 0.026994073763489723, + -0.0013200227404013276, + -0.031576402485370636, + -0.009595115669071674, + -0.0037075194995850325, + 0.019787322729825974, + 0.012163996696472168, + -0.01816267892718315, + -0.012858288362622261, + -0.006977634970098734, + 0.009178540669381618, + -0.022036829963326454, + 0.0228977520018816, + 0.03699187934398651, + -0.014691219665110111, + 0.030132275074720383, + -0.016343634575605392, + -0.008553678169846535, + -0.010303294286131859, + -0.01476064883172512, + 0.05254402011632919, + -0.015329968184232712, + -0.05132206901907921, + -0.011747421696782112, + -0.035158947110176086, + 0.011796021834015846, + -0.011497476138174534, + -0.021411966532468796, + 0.0700957253575325, + 0.02263392135500908, + -0.014746762812137604, + 0.009963090531527996, + -0.0138788977637887, + 0.03746400028467178, + 0.011462762020528316, + 0.03504786267876625, + 0.027868881821632385, + 0.011816850863397121, + 0.0031468786764889956, + 0.02696630358695984, + 0.005783452652394772, + 0.019509606063365936, + -0.027327334508299828, + 0.003148614428937435, + 0.002204377204179764, + -9.063765901373699e-05, + 0.006189613603055477, + 0.009817289188504219, + -0.04065774008631706, + -0.009942262433469296, + 0.01107395812869072, + -0.0005376423941925168, + 0.018370967358350754, + 0.01639917865395546, + 0.010393551550805569, + -0.02311992458999157, + -0.014246872626245022, + -0.044573549181222916, + 0.015107794664800167, + -0.013080461882054806, + 0.011254473589360714, + 0.008102388121187687, + 0.034714601933956146, + -0.011296131648123264, + 0.020051153376698494, + -0.010983699932694435, + -0.03177080303430557, + 0.0050718034617602825, + -0.0020672546233981848, + 0.003967878874391317, + 0.032159607857465744, + 0.020439958199858665, + 0.010483809746801853, + -0.04115763306617737, + 0.010969813913106918, + -0.0026730243116617203, + 0.03579769656062126, + 0.04535115510225296, + 0.06448584794998169, + 0.04049111157655716, + -0.02563326247036457, + 0.03371481969952583, + -0.028216028586030006, + 0.02255060523748398, + 0.018468167632818222, + 0.0012531970860436559, + 0.013184606097638607, + 0.04521229863166809, + -0.0019926181994378567, + 0.016787981614470482, + 0.03324270248413086, + 0.03160417452454567, + 0.021995171904563904, + -0.0002414834452793002, + -0.004846158437430859, + 0.0036554476246237755, + -0.02135642245411873, + -0.019565150141716003, + -0.020190011709928513, + -0.005495321471244097, + 0.00022152255405671895, + 0.016815753653645515, + -0.0055543361231684685, + 0.005050974432379007, + 0.03704742342233658, + -0.008859166875481606, + 0.019329089671373367, + -0.022772779688239098, + -0.007866328582167625, + 0.009692316874861717, + 0.03654753416776657, + -0.020259441807866096, + -0.02368924394249916, + -0.05504347383975983, + -0.029910100623965263, + 0.00270253187045455, + 0.001233236282132566, + -0.018509825691580772, + 0.0030566207133233547, + -0.02324489690363407, + -0.005453663878142834, + 0.052127446979284286, + 0.062930628657341, + -0.021453624591231346, + 0.0033065658062696457, + 0.03910252824425697, + 0.005894539412111044, + -0.012559742666780949, + 0.02316158264875412, + 0.002416136208921671, + 0.05154424160718918, + 0.021148135885596275, + 0.013406779617071152, + 0.011789078824222088, + 0.002122798003256321, + -0.027521736919879913, + -0.04199078306555748, + -0.011830735951662064, + -0.016274206340312958, + -0.002461265306919813, + -0.0026278954464942217, + -0.00819958932697773, + 0.022953294217586517, + -0.015357740223407745, + -0.03124314174056053, + -0.0216202549636364, + 0.028938092291355133, + 0.015413283370435238, + -0.019245775416493416, + 0.015010593459010124, + 0.0228144358843565, + 0.005186361726373434, + 0.030743252485990524, + 0.01980120874941349, + 0.04782283678650856, + 0.005745266564190388, + 0.027743909507989883, + -0.004304610658437014, + 0.0182043369859457, + 0.022161802276968956, + 0.0010492488509044051, + -0.022328432649374008, + -0.015399397350847721, + -0.03840823471546173, + 0.009296569973230362, + -0.04296279326081276, + -0.046961914747953415, + 0.057487379759550095, + -0.004450412001460791, + 0.030076730996370316, + 0.00699499249458313, + 0.011080901138484478, + -0.00394357880577445, + 0.03257618099451065, + -0.0013955270405858755, + -0.04146312177181244, + -0.010754583403468132, + 0.04410143196582794, + -0.04904479160904884, + -0.005960497073829174, + 0.0030722422525286674, + 0.02245340496301651, + 0.04782283678650856, + 0.012684715911746025, + -0.0010154021438211203, + -0.006734632886946201, + -0.024647368118166924, + -0.006151427514851093, + -0.024508509784936905, + 0.021717455238103867, + -0.011809907853603363, + -0.019870638847351074, + 0.05507124587893486, + -0.018662570044398308, + -0.015621570870280266, + 0.008095445111393929, + -0.01131696067750454, + 0.03460351377725601, + 0.029299123212695122, + -0.013663667254149914, + 0.0033343376126140356, + 0.00016033806605264544, + -0.0192318893969059, + -0.011566905304789543, + -0.011455819010734558, + -0.023897532373666763, + -0.014094128273427486, + 0.00826207548379898, + -0.037686172872781754, + -0.06459692865610123, + 0.03718627989292145, + 0.014732876792550087, + -0.045878816395998, + 0.015385511331260204, + -0.013358178548514843, + 0.02267557755112648, + 0.01405247114598751, + -0.025161143392324448, + 0.022383974865078926, + -0.01773221790790558, + 0.00598826864734292, + -0.015677114948630333, + -0.011358617804944515, + -0.008345390670001507, + -0.010011691600084305, + 0.005391177721321583, + -0.022397860884666443, + 0.06193085014820099, + -0.0026626100298017263, + -0.016121461987495422, + 0.008109331130981445, + -0.028035512194037437, + -0.012858288362622261, + -0.02413359098136425, + -0.030743252485990524, + 0.03488123044371605, + -0.0433238223195076, + 0.008963310159742832, + -0.021162021905183792, + 0.032992757856845856, + 0.006529816426336765, + -0.005186361726373434, + 0.020190011709928513, + 0.00387762114405632, + -0.005880653392523527, + 0.026896873489022255, + -0.023578157648444176, + 0.03282612934708595, + -0.0015456676483154297, + -0.05223853141069412, + -0.0012549328384920955, + -0.01971789449453354, + -0.007310895249247551, + -0.009428486227989197, + 0.004363625310361385, + 0.03190966323018074, + -0.007078307215124369, + -0.0253277737647295, + 0.01582985930144787, + -0.03454797342419624, + 0.0060333977453410625, + 0.03115982748568058, + -0.0020117112435400486, + -0.000454327353509143, + -0.003592961234971881, + -0.019953953102231026, + -0.01255279965698719, + 0.0156493429094553, + -0.006047283764928579, + 0.02107870578765869, + 0.024244677275419235, + -0.02346707135438919, + 0.023314327001571655, + -0.014219100587069988, + -0.024022504687309265, + 0.050655547529459, + -0.014621790498495102, + -0.02457793802022934, + 0.06170867756009102, + -0.009956147521734238, + -0.011504419147968292, + -0.02356427162885666, + 0.03235400840640068, + -0.06143096089363098, + 0.007234523072838783, + 0.015524369664490223, + -0.00426642457023263, + 0.0011264887871220708, + -0.02081487514078617, + 0.012136224657297134, + 0.024105818942189217, + 0.01728787273168564, + -0.012226482853293419, + -0.01737118698656559, + -0.011698820628225803, + 0.011573848314583302, + 0.0074705821461975574, + -0.027827225625514984, + 6.607300747418776e-06, + -0.009400714188814163, + -0.004044251050800085, + -0.0005819034995511174, + -0.021800769492983818, + -0.03243732452392578, + 0.02664692886173725, + -0.004915587604045868, + -0.018662570044398308, + -0.021064819768071175, + -0.0013365121558308601, + 0.01605203188955784, + -0.02877146191895008, + 0.02081487514078617, + -0.013052690774202347, + 0.0011733535211533308, + -0.00795658677816391, + 0.009157711640000343, + 0.024938970804214478, + -0.0004903437802568078, + -0.0015517426654696465, + -0.003700576489791274, + -0.005998683162033558, + 0.011330845765769482, + 0.023480957373976707, + -0.024425193667411804, + 0.0059674400836229324, + -2.59681496572739e-06, + -0.04510121047496796, + 0.0006235610344447196, + 0.003013227367773652, + 0.0016958082560449839, + 0.01789884828031063, + -0.004683000035583973, + 0.017315642908215523, + 0.008234303444623947, + -0.03265949711203575, + -0.0018086307682096958, + 0.034853462129831314, + -0.018190450966358185, + 0.015704885125160217, + -0.008428704924881458, + 0.009685373865067959, + 0.01367755327373743, + -0.003294415771961212, + -0.01873200014233589, + 0.02010669745504856, + 0.010011691600084305, + 0.02077321708202362, + 0.0002636139979586005, + 0.019787322729825974, + -0.006863076705485582, + -0.02328655496239662, + -0.00324928667396307, + -0.029326895251870155, + 0.008428704924881458, + -0.022869979962706566, + 0.0025393732357770205, + -0.01799605041742325, + 0.003679747926071286, + 0.017037926241755486, + 0.003375994972884655, + -0.0029403266962617636, + -0.03849155083298683, + 0.006106298416852951, + -0.019370747730135918, + 0.027591165155172348, + -0.029826786369085312, + 0.02160636894404888, + -0.01188628003001213, + 0.006331943441182375, + -0.009650659747421741, + -0.0120876245200634, + -0.0266052708029747, + 0.031215369701385498, + -0.019245775416493416, + 0.004582327324897051, + 0.0010423059575259686, + 0.010379666462540627, + -0.019926181063055992, + 0.035603296011686325, + 0.016413064673542976, + 0.010782355442643166, + -0.015218881890177727, + -0.005342577118426561, + -0.015107794664800167, + 0.031409770250320435, + 0.01737118698656559, + 0.013837240636348724, + 0.007241466082632542, + -0.0002677363809198141, + -0.009407657198607922, + -0.011129501275718212, + 0.025036171078681946, + -0.012039024382829666, + 0.011900165118277073, + 0.004558027256280184, + 0.004540669731795788, + 0.010726812295615673, + -0.027646709233522415, + -0.009157711640000343, + -0.02502228505909443, + 0.005127346608787775, + 0.012198710814118385, + 0.00992143340408802, + 0.03660307824611664, + -0.010025576688349247, + 0.0002349744609091431, + -0.03932470083236694, + 0.0216619111597538, + 0.0028066756203770638, + -0.006352772004902363, + -0.004262953065335751, + 0.04635093733668327, + -0.008380104787647724, + 0.012684715911746025, + 0.027771681547164917, + 0.003084392286837101, + -0.037102967500686646, + -0.023925304412841797, + -0.015385511331260204, + 0.007692755665630102, + 0.0037769486662000418, + 0.036714162677526474, + 0.01657969318330288, + 0.008650878444314003, + -0.003634618828073144, + -0.04490680992603302, + 0.03063216432929039, + -0.04918364807963371, + 0.007914929650723934, + 0.012309798039495945, + 0.0037491770926862955, + -0.011171159334480762, + -0.003417652565985918, + 0.02625812590122223, + -0.008761965669691563, + -0.033131614327430725, + 0.002678231569007039, + 0.03935247287154198, + 0.04854489862918854, + 0.008810565806925297, + 0.03338156268000603, + -0.0316319465637207, + 0.03588101267814636, + -0.0019856751896440983, + 0.012455599382519722, + -0.01945406384766102, + 0.02607760950922966, + 0.01551048457622528, + -0.004412225913256407, + -0.010143606923520565, + 0.01737118698656559, + -0.04171306639909744, + -0.0042004669085145, + -0.016940725967288017, + 0.018245995044708252, + 0.012920774519443512, + 0.004662171006202698, + -0.0387137234210968, + 0.010886499658226967, + 0.01971789449453354, + 0.0031815932597965, + 0.011434989981353283, + -0.014691219665110111, + -0.023050496354699135, + 0.024813996627926826, + -0.02130088023841381, + 0.014732876792550087, + -0.010469923727214336, + 0.012802745215594769, + -0.02125922217965126, + -0.012011252343654633, + 5.576033072429709e-05, + 0.0015743072144687176, + -0.014635676518082619, + -0.0009381620911881328, + 0.0060090976767241955, + -0.011053129099309444, + 0.03415916860103607, + 0.005172475706785917, + -0.026938531547784805, + -0.003474931698292494, + -0.009539572522044182, + -0.011705763638019562, + 0.012754145078361034, + 0.027827225625514984, + 0.009636773727834225, + -0.002466472564265132, + 0.00337078794836998, + -0.008137103170156479, + -0.009588172659277916, + 0.0021818126551806927, + -0.00490517308935523, + 0.017801648005843163, + -0.016954611986875534, + 0.014371844939887524, + 0.021953513845801353, + -0.018190450966358185, + -0.04057442769408226, + -0.015010593459010124, + -0.0064048441126942635, + 0.004801029339432716, + -0.009796461090445518, + 0.003919278737157583, + -0.0359921008348465, + 0.005422420799732208, + 0.006710332352668047, + 8.793914275884163e-06, + -0.04260176047682762, + -0.01931520365178585, + 0.010851784609258175, + 0.00870642252266407, + 0.010067234747111797, + 0.03040999174118042, + 0.015302196145057678, + 0.012059852480888367, + -0.016065917909145355, + -0.006519402377307415, + -0.0001710779033601284, + -0.01900971680879593, + 0.01631586253643036, + 0.008928596042096615, + 0.020564930513501167, + -0.0008257735753431916, + -0.00431849667802453, + -0.03946356102824211, + -0.011802964843809605, + -0.019259661436080933, + -0.016899067908525467, + -0.004023422487080097, + -0.0060333977453410625, + -0.006349300500005484, + -0.00897025316953659, + -0.003327394602820277, + 0.03229846432805061, + 0.019856752827763557, + -0.005130818113684654, + 0.0036103185266256332, + -0.008616164326667786, + 0.0006331075564958155, + -0.006755461450666189, + 0.009782575070858002, + 0.010574067942798138, + 0.006908205803483725, + 0.004047722555696964, + -0.03374259173870087, + 4.637654001271585e-06, + 0.0027337749488651752, + 0.007560840342193842, + -0.017176784574985504, + 0.00763721251860261, + -0.013871954753994942, + -0.000440224539488554, + 0.008213474415242672, + -0.009553458541631699, + 0.007852442562580109, + 0.01741284504532814, + -0.03857486695051193, + 0.0182043369859457, + -0.027341220527887344, + 0.03218737989664078, + -0.012039024382829666, + -0.022786663845181465, + -0.007852442562580109, + 0.02391141839325428, + 0.017579473555088043, + -0.0006725954008288682, + 0.008234303444623947, + 0.009838118217885494, + 0.0027476607356220484, + 0.016107575967907906, + 0.030382219702005386, + 0.05007234215736389, + 0.021731341257691383, + -0.01527442503720522, + 0.02785499580204487, + -0.022022943943738937, + 0.004891287535429001, + 0.01919023133814335, + 0.03257618099451065, + -0.05448804050683975, + 0.0022234702482819557, + 0.025563832372426987, + -0.015107794664800167, + 0.04646202176809311, + -0.026008179411292076, + 0.006390958093106747, + 0.012747202068567276, + 0.014024699106812477, + -0.005266204942017794, + -0.02091207541525364, + 0.0021575125865638256, + 0.008380104787647724, + 0.009511801414191723, + -0.014510703273117542, + 0.031354229897260666, + -0.05148869752883911, + -0.04782283678650856, + -0.013594238087534904, + 0.04735071584582329, + 0.013094347901642323, + -0.04040779545903206, + -0.030687708407640457, + -0.022397860884666443, + -0.00948402937501669, + -0.021453624591231346, + -0.007442810572683811, + -0.019690122455358505, + -0.0070921932347118855, + 0.00870642252266407, + -0.006422201171517372, + -0.002344971289858222, + 0.009386828169226646, + -0.03540889546275139, + 0.02824380062520504, + -0.018134908750653267, + 0.019551264122128487, + 0.02860483154654503, + 0.01702404022216797, + -0.0028500687330961227, + -0.024966740980744362, + -0.006727689877152443, + -0.0003569094988051802, + 0.01727398671209812, + -0.008102388121187687, + -0.030882110819220543, + 0.0205927025526762, + 0.02130088023841381, + 0.008296789601445198, + 0.010379666462540627, + -0.004669114015996456, + 0.03913030028343201, + -0.007421982008963823, + 0.01834319531917572, + 0.014677333645522594, + 0.022439518943428993, + -0.012934660539031029, + -0.0240919329226017, + 0.039491333067417145, + 0.0432405099272728, + -0.02988232858479023, + 0.024647368118166924, + 0.019565150141716003, + 0.02091207541525364, + -0.009407657198607922, + -0.005918839480727911, + -0.017565589398145676, + -0.007064421661198139, + -0.0066790892742574215, + 0.019856752827763557, + 0.01882920041680336, + 0.04007453843951225, + 0.052793968468904495, + -0.03354819118976593, + 0.0034992319997400045, + 0.006557588465511799, + 0.02475845441222191, + 0.03696410730481148, + 0.05396037921309471, + -0.014302415773272514, + 0.009081339463591576, + 0.02771613746881485, + -0.033131614327430725, + -0.002641781233251095, + 0.05926476791501045, + -0.002051633084192872, + 0.015302196145057678, + -0.00035365502117201686, + -0.02028721384704113, + 0.005675837397575378, + -0.024786226451396942, + -0.02877146191895008, + -0.00038164365105330944, + -0.04190746694803238, + -0.03465905785560608, + -0.0035756039433181286, + 0.0014354487648233771, + -0.01794050633907318, + -0.004436525981873274, + 0.024203021079301834, + -0.03263172507286072, + 0.013323464430868626, + -0.035075634717941284, + -0.0029524769634008408, + -0.017162898555397987, + -0.0065332879312336445, + -0.010115834884345531, + -0.01012277789413929, + -0.044656865298748016, + 0.025161143392324448, + 0.04454577714204788, + 0.01887085847556591, + 0.013594238087534904, + -0.009511801414191723, + 0.00934517104178667, + -0.007796899415552616, + 0.029549069702625275, + -0.06537453830242157, + -0.008484249003231525, + 0.023578157648444176, + -0.038824811577796936, + -0.03324270248413086, + -0.025050057098269463, + 0.04310164973139763, + -0.011657163500785828, + -0.034631285816431046, + 0.008060730993747711, + -0.023439299315214157, + 0.0009338227682746947, + -0.011143387295305729, + -0.0010579274967312813, + -0.012233425863087177, + ], + "index": 49, + }, + { + "title": "Pralamba", + "text": "Pralamba was an asura killed by Balarama. According to the pertinent legend, the asura had attempted to join Krishna and Balarama in a game of jumping, whose conditions dictated that the loser carry the victor on his back. Pralamba promptly lost, and was forced to carry Balarama on his back.", + "vector": [ + -0.00600378168746829, + -0.025160886347293854, + -0.010686120018362999, + 0.020333418622612953, + -0.01752248778939247, + 0.027895433828234673, + -0.012939448468387127, + -0.04873298481106758, + -0.017965514212846756, + 0.026352476328611374, + -0.019462641328573227, + 0.05964061990380287, + -0.017782192677259445, + -0.03495331481099129, + 0.027360746636986732, + 0.004193481057882309, + -0.028812041506171227, + 0.013481774367392063, + -0.06342926621437073, + 0.009952833876013756, + 0.01930987276136875, + -0.001443657441996038, + -0.004338610917329788, + -0.026077494025230408, + -0.013542881235480309, + 0.017537765204906464, + -0.009104971773922443, + -0.010342392139136791, + -0.010479883290827274, + -0.009547999128699303, + 0.014963624067604542, + -0.01698780059814453, + 0.021066704764962196, + 0.0260927714407444, + -0.024824798107147217, + -0.01740027405321598, + 0.015437204390764236, + -0.01435255166143179, + -0.044883232563734055, + -0.03712261840701103, + -0.009479253552854061, + 0.013443582691252232, + -0.01769053190946579, + 0.003091642167419195, + -0.03153131157159805, + -0.025894172489643097, + -0.023847082629799843, + 0.032142382115125656, + 0.0053468793630599976, + -0.04195008799433708, + 0.053346578031778336, + 0.014497681520879269, + 0.017125291749835014, + -0.009731320664286613, + 0.047877486795186996, + -0.025221994146704674, + 0.010984017513692379, + 0.016361450776457787, + 0.004151470027863979, + 0.014375466853380203, + 0.007741517387330532, + -0.031714633107185364, + -0.0011791778961196542, + 0.0018379897810518742, + 0.03192850947380066, + -0.01996677555143833, + 0.07693395763635635, + -0.06404034048318863, + 0.005797544959932566, + -0.005369794555008411, + 0.040544621646404266, + 0.03687819093465805, + -0.010197263211011887, + -0.01174021977931261, + -0.017965514212846756, + 0.008318216539919376, + -0.015796208754181862, + 0.01960013248026371, + -0.03501442074775696, + 0.0055378396064043045, + -0.042866695672273636, + -0.022609662264585495, + 0.023098519071936607, + 0.038283657282590866, + 0.01930987276136875, + -0.007401608861982822, + 0.012733211740851402, + -0.05676858127117157, + 0.0004399240424390882, + -0.01976817660033703, + 0.05252163112163544, + 0.02699410170316696, + -0.0011228446383029222, + -0.0006125041400082409, + 0.002365994034335017, + 0.04176676645874977, + -0.016773924231529236, + 0.030400829389691353, + -0.01075486559420824, + 0.018668247386813164, + -0.037183728069067, + 0.01840854249894619, + -0.0027192700654268265, + -0.036419887095689774, + 0.034586671739816666, + 0.03645044192671776, + -0.07901160418987274, + 0.02305268868803978, + -0.00881471298635006, + 0.06709569692611694, + -0.02584834210574627, + -0.05802128091454506, + 0.027314916253089905, + -0.005702064838260412, + -0.044822126626968384, + -0.024687305092811584, + 0.02227357216179371, + -0.03363950923085213, + -0.055668652057647705, + 0.021219473332166672, + 0.018683524802327156, + 0.011915902607142925, + -0.06006837263703346, + -0.004220215603709221, + -0.020806999877095222, + -0.05734910070896149, + 0.0064544472843408585, + 0.039475247263908386, + 0.04222507029771805, + 0.03583936765789986, + -0.007966849952936172, + -0.01804189942777157, + -0.014367829076945782, + -0.03406726196408272, + -0.03669486939907074, + 0.0013548610731959343, + -0.03229515254497528, + 0.007737698499113321, + -0.009357038885354996, + 0.044822126626968384, + -0.013351921923458576, + -0.03593102842569351, + 0.025710850954055786, + 0.038864172995090485, + -0.008165448904037476, + 0.01608646847307682, + -0.05881567299365997, + 0.0006282583344727755, + 0.03312009945511818, + -0.02477896772325039, + 0.02163194678723812, + -0.03751981630921364, + 0.025390038266777992, + 0.022899920120835304, + 0.02853705920279026, + 0.06886781007051468, + -0.02728436142206192, + -0.028735658153891563, + 0.024030404165387154, + 0.020394526422023773, + -0.03733649477362633, + 0.005999962333589792, + -0.00741688534617424, + 0.0017587414477020502, + -0.00789046660065651, + 0.03455611690878868, + 0.0008387917187064886, + -0.05099395290017128, + 0.04234728589653969, + 0.0349227599799633, + 0.04897741600871086, + 0.00607634661719203, + 0.06113774701952934, + -0.004239311441779137, + -0.011396491900086403, + 0.00866958312690258, + -0.01256516668945551, + 0.004384441301226616, + -0.030843855813145638, + 0.02383180521428585, + -0.012343652546405792, + -0.07369527220726013, + -0.007867551408708096, + -0.008134895004332066, + 0.0016747190384194255, + -0.011900626122951508, + 0.023694314062595367, + -0.006527012214064598, + -0.03038555197417736, + -0.02829262986779213, + 0.01263391226530075, + -0.014039377681910992, + -0.018622417002916336, + -0.0001397588348481804, + 0.008432792499661446, + 0.04292780160903931, + 0.03217293694615364, + 0.0343116894364357, + 0.04366108775138855, + -0.020180650055408478, + 0.038039226084947586, + -0.035656046122312546, + 0.007153360638767481, + 0.025038672611117363, + -0.041980642825365067, + 0.03180629387497902, + -0.01978345401585102, + -0.043997179716825485, + 0.020776445046067238, + -0.02144862525165081, + 0.014658087864518166, + -0.03608379885554314, + -0.006026696879416704, + 0.04133901745080948, + -0.0065766614861786366, + -0.0003609143604990095, + -0.021250026300549507, + 0.009311208501458168, + -0.002276242943480611, + 0.011213170364499092, + -0.07369527220726013, + 0.005988504737615585, + 0.0042775035835802555, + 0.02447343058884144, + 0.014123399741947651, + 0.03055359609425068, + -0.03782535344362259, + 0.015238606370985508, + -0.059487853199243546, + -0.00555693544447422, + -0.0017730634426698089, + 0.05368266999721527, + 0.05682969093322754, + -0.011595089919865131, + -0.015444843098521233, + 0.05517979711294174, + -0.027207978069782257, + -0.0012994826538488269, + -0.018148835748434067, + -0.028980085626244545, + -0.018423818051815033, + 0.0326617956161499, + -0.04097237437963486, + -0.02823152393102646, + -0.021051427349448204, + -0.0018255773466080427, + 0.02985086292028427, + -0.06709569692611694, + -0.05744076147675514, + -0.05536311864852905, + 0.010647928342223167, + 0.02120419591665268, + -0.03535051271319389, + 0.06837894767522812, + 0.008837628178298473, + -0.014245614409446716, + 0.004846564028412104, + -0.01758359558880329, + 0.03531995788216591, + 0.016407281160354614, + -0.004953501746058464, + -0.05557699128985405, + -0.015070561319589615, + -0.06000726297497749, + -0.010617374442517757, + -0.04344721511006355, + -0.01408520806580782, + 0.023862358182668686, + 0.007493269629776478, + -0.013657458126544952, + 0.05380488187074661, + -0.0028682188130915165, + -0.07607845216989517, + 6.46876942482777e-05, + -0.027452407404780388, + 0.005175015423446894, + 0.009471614845097065, + 0.020287588238716125, + 0.03336452692747116, + 0.03733649477362633, + 0.0045906780287623405, + 0.01381786447018385, + 0.026703843846917152, + 0.01259572058916092, + 0.050199560821056366, + 0.006324594374746084, + 0.026138601824641228, + 0.0011409858707338572, + 0.028903702273964882, + 0.0386197455227375, + -0.014795579016208649, + -0.02574140578508377, + -0.0022094070445746183, + 0.0010159070370718837, + 0.014512958005070686, + 0.028689827769994736, + -0.014153953641653061, + 0.045494306832551956, + -0.03525885194540024, + 0.009326484985649586, + 0.07778945565223694, + 0.01834743469953537, + -0.028643997386097908, + -0.0410945862531662, + -0.01918765902519226, + -0.03663376346230507, + -0.07063991576433182, + -0.007435981649905443, + -0.024565091356635094, + 0.04265281930565834, + 0.015887869521975517, + -0.060801658779382706, + -0.02894953265786171, + -0.0194168109446764, + 0.009547999128699303, + 0.027498237788677216, + 0.012549890205264091, + -0.00134435819927603, + -0.0536215603351593, + 0.00875360518693924, + -0.01197700947523117, + 0.023847082629799843, + 0.0010369126684963703, + -0.02335822395980358, + 0.052154988050460815, + -0.0028605805709958076, + -0.026367753744125366, + -0.016468388959765434, + -0.003047721227630973, + -0.05062730982899666, + -0.041613999754190445, + -0.0018914586398750544, + 0.024565091356635094, + -0.029636988416314125, + -0.005495828110724688, + 0.01573510281741619, + -0.025695575401186943, + -0.014306721277534962, + -0.01152634434401989, + -0.02580251172184944, + -0.04778582602739334, + -0.0056829690001904964, + 0.002574140438809991, + 0.0019363341853022575, + 0.04384440928697586, + 0.015215691179037094, + 0.032906223088502884, + -0.03562549501657486, + 0.003933775704354048, + 0.017721086740493774, + 0.000799644913058728, + 0.04466935992240906, + 0.03253958001732826, + -0.005312506575137377, + 0.039353031665086746, + -0.06452919542789459, + 0.029392559081315994, + -0.010938187129795551, + -0.042530607432127, + 0.050199560821056366, + 0.01367273461073637, + 0.004269865341484547, + -0.022976305335760117, + 0.00629786029458046, + -0.0051826536655426025, + -0.0408807136118412, + 0.05844902992248535, + -0.038864172995090485, + -0.05181889981031418, + -0.0010416866280138493, + -0.03913915902376175, + 0.004938225261867046, + 0.036969851702451706, + 0.000933794304728508, + -0.0029923429246991873, + -0.03562549501657486, + -0.003712262026965618, + 0.0102201784029603, + -0.037733692675828934, + 0.009242462925612926, + -0.007485631387680769, + 0.011167339980602264, + -0.02276242896914482, + -0.008822350762784481, + 0.03257013484835625, + -0.0065881190821528435, + -0.0014742109924554825, + -0.032784007489681244, + 0.04332499951124191, + -0.006110719405114651, + 0.029499497264623642, + 0.03260068595409393, + -0.0020127182360738516, + 0.06465140730142593, + -0.0067523447796702385, + -0.017262782901525497, + 0.003551855683326721, + 0.012672103941440582, + 0.01853075623512268, + 0.01798079162836075, + -0.02800237201154232, + 0.05414097383618355, + -0.008470985107123852, + -0.009723681956529617, + -0.03257013484835625, + 0.022747153416275978, + 0.01781274750828743, + -0.0006311227334663272, + 0.06642352044582367, + -0.03865030035376549, + -0.006771440617740154, + 0.021479178220033646, + -0.07400081306695938, + 0.003861210774630308, + 0.018362712115049362, + 0.0252678245306015, + 0.009670212864875793, + 0.03782535344362259, + -0.04390551894903183, + 0.01063265185803175, + -0.05893788859248161, + 0.012473505921661854, + -0.00012686903937719762, + 0.009761874563992023, + -0.05184945464134216, + 0.014589342288672924, + -0.01781274750828743, + -0.008234194479882717, + -0.007905743084847927, + 0.0012689291033893824, + 0.03715317323803902, + 0.011747857555747032, + 0.0484885573387146, + 0.05087173730134964, + -0.03782535344362259, + -0.022655492648482323, + 0.03415892273187637, + 0.04271392896771431, + -0.0024309204891324043, + 0.013061662204563618, + 0.014902516268193722, + 0.0004898123443126678, + -0.016712816432118416, + -0.007531461771577597, + 0.022197188809514046, + -0.047755271196365356, + -0.009219547733664513, + 0.005579850636422634, + 0.00956327561289072, + 0.06232933700084686, + -0.0026447956915944815, + -0.02406095713376999, + -0.019615409895777702, + -0.021876374259591103, + 0.010342392139136791, + 0.014742109924554825, + -0.03284511715173721, + -0.0013061662903055549, + -0.045494306832551956, + 0.01033475436270237, + -0.03510608151555061, + -0.03742815554141998, + 0.04121680185198784, + -0.009143163450062275, + -0.011388853192329407, + -0.012939448468387127, + -0.008012680336833, + -0.032386813312768936, + -0.0015124030178412795, + -0.0038879450876265764, + -0.022609662264585495, + 0.0011963642900809646, + -0.05615751072764397, + -0.019875114783644676, + -0.004655604250729084, + 0.004120916128158569, + -0.01326026115566492, + 0.0031164668034762144, + -0.08353353291749954, + -0.020165374502539635, + 0.009387592785060406, + 0.008493900299072266, + -0.0125346127897501, + -0.023312393575906754, + 0.023785974830389023, + -0.00626730639487505, + 0.002660072408616543, + -0.013298452831804752, + -0.05432429537177086, + 0.012160331010818481, + -0.0023106157314032316, + -0.042377837002277374, + -0.03403670713305473, + -0.014245614409446716, + -0.0008020318928174675, + -0.008883458562195301, + -0.0402696393430233, + 0.009471614845097065, + -0.02645941451191902, + -0.036664314568042755, + -0.006897474639117718, + -0.03608379885554314, + 0.0431416779756546, + 0.020944491028785706, + 0.052032776176929474, + 0.033272866159677505, + 0.021188918501138687, + -0.004846564028412104, + 0.02013481967151165, + -0.053652115166187286, + 0.03461722657084465, + 0.01721695251762867, + 0.022029142826795578, + 0.01929459534585476, + 0.010113240219652653, + 0.006064889021217823, + -0.03241736441850662, + 0.011213170364499092, + 0.0009376134839840233, + -0.01752248778939247, + -0.024641474708914757, + 0.01620868220925331, + -0.017247505486011505, + -0.014612257480621338, + 0.005270495545119047, + -0.005675330758094788, + 0.01182424183934927, + 0.033028438687324524, + -0.03367006406188011, + -0.05762408301234245, + 0.016880862414836884, + 0.019432086497545242, + 0.01995149813592434, + 0.03736704960465431, + -0.006966220214962959, + 0.0029904332477599382, + -0.021311134099960327, + 0.018194666132330894, + -0.01953902468085289, + 0.015437204390764236, + 0.01680447719991207, + 0.01924876496195793, + -0.020654231309890747, + 0.00989172700792551, + -0.005071897059679031, + -0.024213725700974464, + 0.023510992527008057, + -0.04573873430490494, + -0.011274277232587337, + -0.01863769441843033, + 0.005988504737615585, + -0.020684784278273582, + 0.013848417438566685, + 0.04442492872476578, + -0.0009514581179246306, + 0.006973858457058668, + 0.035717155784368515, + 0.0388336218893528, + -0.0032157660461962223, + 0.05337713286280632, + -0.0033838108647614717, + -0.01223671529442072, + 0.01906544342637062, + 0.021219473332166672, + -0.004605954512953758, + 0.01637672819197178, + 0.019615409895777702, + -0.003162297187373042, + 0.012106862850487232, + -0.017614148557186127, + 0.008677221834659576, + 0.010678482241928577, + -0.030309168621897697, + -0.014512958005070686, + -0.04039185494184494, + -0.02079172246158123, + 0.004254588391631842, + 0.02853705920279026, + -9.823996151681058e-06, + -0.026581628248095512, + -0.022747153416275978, + -0.011961732991039753, + -0.01573510281741619, + 0.00570588419213891, + 0.0028834957629442215, + -0.026596905663609505, + 0.020868105813860893, + 0.013038747012615204, + 0.03993355110287666, + 0.03473943844437599, + 0.016392003744840622, + 0.014184507541358471, + 0.022533277049660683, + 0.004166746512055397, + -0.016666986048221588, + 0.0008383142994716763, + 0.013718564994633198, + 0.01900433748960495, + 0.008860543370246887, + -0.020806999877095222, + -0.00155632384121418, + -0.0024576550349593163, + 0.004403537139296532, + 0.04433326795697212, + 0.04072794318199158, + -0.01144232228398323, + -0.024626199156045914, + 0.014612257480621338, + 0.06825673580169678, + -0.01200756337493658, + 0.017736362293362617, + 0.04900796711444855, + -0.021876374259591103, + -0.010013941675424576, + -0.006786717567592859, + -0.03229515254497528, + 0.014176868833601475, + -0.04867187887430191, + 0.024503983557224274, + 0.004647966008633375, + -0.021295856684446335, + 0.01174021977931261, + -0.0019401534227654338, + 0.037794798612594604, + -0.013993547298014164, + -0.012435314245522022, + -0.021066704764962196, + -0.028017647564411163, + -0.02108198218047619, + 0.023755421862006187, + 0.04106403514742851, + 0.05557699128985405, + 0.016880862414836884, + -0.03531995788216591, + 0.01301583182066679, + 0.018194666132330894, + 0.0023125254083424807, + -0.04842745140194893, + -0.0204403568059206, + 0.014153953641653061, + 0.012580443173646927, + 0.011633281596004963, + 0.02818569354712963, + -0.09404397010803223, + -0.010907634161412716, + -0.005029886029660702, + 0.02293047495186329, + 0.02872038073837757, + -0.02566502057015896, + 0.02746768295764923, + 0.003173754783347249, + -0.019493194296956062, + 0.0135581586509943, + -0.018072452396154404, + -0.007233563810586929, + 0.00370844267308712, + 0.00989172700792551, + -0.006847824901342392, + -0.019523749127984047, + 0.01793496124446392, + -0.025817789137363434, + 0.00392995635047555, + -0.016178129240870476, + -0.03305898979306221, + 0.006569023244082928, + 0.01203811727464199, + -0.021540286019444466, + 0.01822522096335888, + 0.01114442478865385, + -0.0006373289506882429, + 0.006263487506657839, + 0.0013854146236553788, + -0.011121509596705437, + 0.0007371054962277412, + 0.001899096998386085, + -0.008027957752346992, + 0.013023470528423786, + 0.008096703328192234, + -0.011281915940344334, + 0.02948421984910965, + 0.0006807722966186702, + -0.0011934998910874128, + 0.01930987276136875, + -0.026123324409127235, + -0.031897954642772675, + -0.015513588674366474, + -0.005041343625634909, + -0.030354999005794525, + -0.008845265954732895, + -0.007630760781466961, + -0.009738958440721035, + 0.028995363041758537, + 0.02085283026099205, + -0.012702657841145992, + 0.0587545670568943, + 0.02186109870672226, + 0.03165352717041969, + -0.024580368772149086, + -0.020409801974892616, + 0.0382225476205349, + 0.029682818800210953, + -0.023251287639141083, + -0.0019210573518648744, + 0.008654306642711163, + 0.016422558575868607, + -0.008906373754143715, + 0.007481812033802271, + -0.0098611731082201, + -0.03250902518630028, + 0.046074822545051575, + -0.03263124078512192, + 0.004109458532184362, + -0.00296369893476367, + 0.015933699905872345, + -0.0033952684607356787, + 0.0005303913494572043, + -0.0014541601995006204, + -0.009853535331785679, + -0.0019382437458261847, + 0.026046941056847572, + 0.008539730682969093, + 0.027849603444337845, + 0.019340425729751587, + -0.010365307331085205, + -0.021051427349448204, + 0.01698780059814453, + -0.020532017573714256, + -0.0490996278822422, + 0.0011543530272319913, + -0.015215691179037094, + -0.03556438535451889, + -0.012809595093131065, + -0.01740027405321598, + 0.021906929090619087, + 0.016193406656384468, + 0.03516719117760658, + -0.03984189033508301, + 0.004369164351373911, + -0.021784713491797447, + -0.0016393914120271802, + 0.00899803452193737, + 0.03703095763921738, + -0.001200183411128819, + 0.011327746324241161, + -0.0222888495773077, + -0.05854069069027901, + 0.0027593716513365507, + 0.0021081981249153614, + -0.03131743520498276, + -0.003477381309494376, + 0.004170565865933895, + 0.005541658494621515, + 0.03840586915612221, + -0.01680447719991207, + -0.014604618772864342, + 0.021280579268932343, + 0.032081276178359985, + -0.0008464300772175193, + -0.021662499755620956, + 0.024397047236561775, + -0.02013481967151165, + 0.0030840036924928427, + -0.005782268010079861, + 0.012397121638059616, + -0.002423282014206052, + -0.003998701926320791, + 0.003719900269061327, + -0.04968014732003212, + 0.0039490521885454655, + -0.006805813405662775, + -0.0015534594422206283, + 0.023266563192009926, + -0.005255218595266342, + -0.017644701525568962, + 0.0011801326181739569, + -0.038039226084947586, + -0.003135562874376774, + 0.0026314284186810255, + -0.03651154786348343, + 0.04986346885561943, + -0.025710850954055786, + 0.024091510102152824, + -0.018561309203505516, + 0.029270345345139503, + -0.027987094596028328, + -0.004919128958135843, + 0.00600378168746829, + -0.007588749751448631, + 0.0002613764663692564, + 0.00577844912186265, + 0.05499647557735443, + 0.02401512674987316, + -0.019936222583055496, + -0.0008297211024910212, + 0.013267898932099342, + -0.030186953023076057, + 0.0005938855465501547, + 0.02995780110359192, + -0.029621711000800133, + -0.053591009229421616, + 0.010059772059321404, + 0.018316881731152534, + -0.04723586142063141, + 0.01361162681132555, + 0.03299788385629654, + -0.02001260593533516, + 0.025237271562218666, + 0.008142533712089062, + 0.007115168962627649, + 0.022059695795178413, + 0.005255218595266342, + -0.022854089736938477, + 0.01286306418478489, + 0.000221871625399217, + 0.03342563286423683, + -0.013474135659635067, + 0.006244391202926636, + -0.047266412526369095, + -0.008111979812383652, + 0.029499497264623642, + 0.009097333066165447, + 0.004762541968375444, + 0.04735807329416275, + 0.008791797794401646, + 0.010854165069758892, + 0.006393339950591326, + 0.03556438535451889, + 0.022655492648482323, + -0.04476102069020271, + 0.013886610046029091, + 0.0037046235520392656, + 0.021586116403341293, + 0.030523043125867844, + -0.0001682834845269099, + 0.006160368677228689, + 0.00896748062223196, + 0.03391449153423309, + -0.023266563192009926, + 0.01918765902519226, + 0.08017263561487198, + -0.03412836790084839, + -0.05194111540913582, + 0.0051979306153953075, + -0.029514774680137634, + 0.0073901512660086155, + 0.0058166407980024815, + -0.02132640965282917, + 0.01179368793964386, + 0.012389483861625195, + 0.015108753927052021, + 0.0033398899249732494, + 0.012244354002177715, + 0.002751733176410198, + 0.044058285653591156, + -0.0326617956161499, + -0.002027994953095913, + -0.006313136778771877, + 0.024137340486049652, + 0.007676591165363789, + 0.013688011094927788, + 0.004250769037753344, + -0.014467127621173859, + -0.03137854486703873, + -0.032906223088502884, + 0.010372946038842201, + -0.01912655122578144, + 0.017018353566527367, + -0.020394526422023773, + 0.051207829266786575, + -0.014367829076945782, + -0.012710296548902988, + -0.012870702892541885, + 0.024091510102152824, + 0.005453817080706358, + 0.0003258254728280008, + 0.009372315369546413, + -0.005094812251627445, + -0.018912676721811295, + -0.0098611731082201, + 0.011663835495710373, + -0.004716711584478617, + 0.03611434996128082, + -0.005744076333940029, + 0.03272290155291557, + 0.017950238659977913, + 0.001432199846021831, + 0.006240572314709425, + 0.00697003910318017, + 0.02406095713376999, + -0.013390113599598408, + -0.01758359558880329, + -0.03062998130917549, + -0.0010903815273195505, + -0.04604427143931389, + 0.05866290628910065, + -0.032081276178359985, + 0.0010808334918692708, + 0.045310985296964645, + -0.04903852194547653, + -0.009929918684065342, + -0.010991656221449375, + 0.017369719222187996, + -0.021433347836136818, + 0.014199784025549889, + -0.0029446028638631105, + -0.017705809324979782, + 0.05163557827472687, + 0.024213725700974464, + -0.013519966043531895, + -0.009968111291527748, + -0.018698800355196, + 0.05890733376145363, + -0.0257872361689806, + 0.0031470204703509808, + 0.033578403294086456, + 0.015750378370285034, + -0.004903852473944426, + 0.008990395814180374, + 0.012015202082693577, + -0.016392003744840622, + -0.008791797794401646, + -0.026306645944714546, + -0.015796208754181862, + -0.01057154405862093, + 0.012947086244821548, + 0.039047498255968094, + -0.028980085626244545, + 0.031959060579538345, + -0.02626081556081772, + 0.01853075623512268, + 0.007187733426690102, + -0.006950943265110254, + 5.042536940891296e-05, + -0.023159626871347427, + -0.014497681520879269, + -0.040300194174051285, + -0.04628869891166687, + 0.026673289015889168, + -0.030156400054693222, + -0.0587545670568943, + 0.013688011094927788, + -0.006801994517445564, + 0.04803025349974632, + -0.020043158903717995, + 0.03400615230202675, + -0.007455077487975359, + -0.012824872508645058, + 0.0006201425567269325, + -0.006863101851195097, + -0.01307693962007761, + 0.04106403514742851, + 0.003609143663197756, + -0.022731876000761986, + -0.012313099578022957, + 0.025237271562218666, + 0.029942525550723076, + 0.005499647464603186, + -0.03586992248892784, + -0.011106232181191444, + 0.001885729841887951, + 0.022349955514073372, + -0.013023470528423786, + 0.03379227593541145, + -0.016880862414836884, + -0.027452407404780388, + 0.00021077207929920405, + -0.015024730935692787, + -0.025634467601776123, + -0.017843300476670265, + 0.013122770003974438, + 0.008257109671831131, + 0.06135162338614464, + 0.024641474708914757, + -0.02656635269522667, + -0.014627533964812756, + 0.008730689994990826, + -0.014207422733306885, + -0.005396529100835323, + 0.0035671324003487825, + 0.054354846477508545, + 0.05368266999721527, + -0.00019012452685274184, + -0.011243723332881927, + 0.020272310823202133, + -0.03079802542924881, + 0.026764949783682823, + -0.00726793659850955, + 0.021066704764962196, + 0.011663835495710373, + 0.03038555197417736, + -0.049405165016651154, + 0.011694389395415783, + -0.009349400177598, + -0.04295835644006729, + 0.008982757106423378, + 0.016728093847632408, + -0.018087729811668396, + 0.04204174876213074, + -0.002341169398277998, + -0.029942525550723076, + 0.017782192677259445, + -0.03730593994259834, + -0.01846964843571186, + -0.004059809260070324, + 0.018927952274680138, + 0.01746137998998165, + -0.0007075067260302603, + 0.013206792064011097, + 0.0012822962598875165, + 0.04833579063415527, + 0.01775163970887661, + 0.0065766614861786366, + 0.0022819717414677143, + -0.05618806555867195, + -0.00023917737416923046, + -0.0257872361689806, + 0.012175608426332474, + -0.01400118600577116, + -0.028689827769994736, + 0.0770561695098877, + -0.016407281160354614, + -0.015108753927052021, + -0.010403499938547611, + 0.03730593994259834, + -0.02091393619775772, + 0.012878340668976307, + 0.03131743520498276, + -0.003110738005489111, + 0.0011152062797918916, + -0.004701434634625912, + 0.012175608426332474, + -0.0037141714710742235, + 0.014467127621173859, + 0.00025588637799955904, + -0.01182424183934927, + -0.0111978929489851, + 0.0234193317592144, + 0.02853705920279026, + -0.05774629861116409, + 0.0017826113617047668, + 0.020700061693787575, + 0.012672103941440582, + 0.012557527981698513, + -0.00152958941180259, + -0.028399568051099777, + -0.008005042560398579, + -0.008302940055727959, + -0.008631391450762749, + 0.019432086497545242, + -0.015238606370985508, + 0.021601391956210136, + -0.0008488171151839197, + 0.00029264617478474975, + -0.045005448162555695, + 0.011167339980602264, + -0.010915271937847137, + -0.00311264768242836, + 0.025710850954055786, + 0.020654231309890747, + -0.005006970837712288, + 0.00035757257137447596, + -0.031836848706007004, + -0.009227186441421509, + 0.020287588238716125, + 0.01637672819197178, + -0.0019878933671861887, + 0.029652265831828117, + -0.009945196099579334, + -0.004338610917329788, + 0.0194168109446764, + 0.03531995788216591, + 0.010884718969464302, + -0.0012775223003700376, + 0.011587451212108135, + 0.008761243894696236, + 0.012840148992836475, + 0.009769512340426445, + 0.00630167918279767, + -0.0035575844813138247, + -0.01758359558880329, + -0.005186473019421101, + -0.03865030035376549, + -0.017125291749835014, + -0.03102717734873295, + -0.01810300536453724, + -0.010197263211011887, + 0.01703363098204136, + 0.010166709311306477, + 0.026841334998607635, + -0.02150973118841648, + 0.004800733644515276, + 0.030599426478147507, + -0.014658087864518166, + 0.0004921993240714073, + 0.021540286019444466, + 0.013474135659635067, + 0.02056257054209709, + -0.016101745888590813, + -0.007791167125105858, + -0.021188918501138687, + 0.07180095463991165, + -0.030339721590280533, + -0.030950793996453285, + 0.02685661055147648, + -0.023251287639141083, + 0.0269177183508873, + 0.0035251211374998093, + 0.04366108775138855, + -0.007600207347422838, + 0.03379227593541145, + 0.006866920739412308, + -0.0021731245797127485, + -0.017018353566527367, + 0.033211760222911835, + 0.014810855500400066, + 0.017079461365938187, + 0.001594515866599977, + 0.005010789725929499, + -0.0008827124838717282, + -0.00470525398850441, + -0.014375466853380203, + -0.026108048856258392, + 0.05719633400440216, + -0.011908263899385929, + 0.00039313884917646646, + 0.0439666248857975, + -0.0047205304726958275, + 0.02751351334154606, + -0.043630536645650864, + 0.05212443694472313, + -0.02091393619775772, + 0.05041343346238136, + 0.027895433828234673, + 0.018301604315638542, + 0.016941970214247704, + 0.020409801974892616, + 0.03913915902376175, + 0.00682109035551548, + 0.010052133351564407, + -0.006080165505409241, + -0.005931216757744551, + 0.013962993398308754, + 0.009227186441421509, + 0.029148131608963013, + -0.034586671739816666, + 0.026963548734784126, + 0.015399012714624405, + -0.002438558964058757, + 0.023908188566565514, + 0.05789906531572342, + -0.030339721590280533, + -0.00463268905878067, + -0.005843375343829393, + -0.036603208631277084, + 0.02574140578508377, + -0.007023508194833994, + 0.021127812564373016, + -0.01584203913807869, + -0.023006858304142952, + -0.01138121448457241, + -0.0006301679532043636, + 0.02537476271390915, + -0.0029350549448281527, + -0.014283806085586548, + -0.0009285428677685559, + -0.01182424183934927, + -0.027437129989266396, + -0.052399419248104095, + 0.033456187695264816, + 0.029835587367415428, + 0.029209237545728683, + 0.0075352806597948074, + -0.02960643544793129, + -0.029056470841169357, + -0.02703993208706379, + 0.0343116894364357, + -0.04115569591522217, + -0.04793859273195267, + -0.005514923948794603, + -0.010365307331085205, + -0.04216396436095238, + -0.0050757164135575294, + 0.011243723332881927, + -0.02514561079442501, + 0.022181911394000053, + 0.05496592074632645, + -0.0030286251567304134, + -0.04072794318199158, + 0.024259556084871292, + -0.02222774177789688, + 0.04320278391242027, + 0.00046618105261586607, + -0.0008005996933206916, + 0.008325855247676373, + -0.025771958753466606, + -0.010441691614687443, + -0.022655492648482323, + 0.008577922359108925, + -0.029056470841169357, + -0.0075543769635260105, + 0.006836367305368185, + -0.02615387924015522, + -0.0013653638307005167, + 0.04555541276931763, + -0.0038573916535824537, + -0.0400557667016983, + -0.009097333066165447, + 0.003284511622041464, + 0.003712262026965618, + -0.010991656221449375, + 0.059182316064834595, + -0.00034516016603447497, + -0.021586116403341293, + -0.01697252318263054, + 0.01799606904387474, + 0.018087729811668396, + 0.02471785992383957, + 0.023510992527008057, + 0.014176868833601475, + -0.0337006151676178, + -0.03788645938038826, + -0.011404129676520824, + -0.03269234672188759, + 0.028246799483895302, + -0.003660702845081687, + -0.020226480439305305, + 0.026764949783682823, + 0.012924171052873135, + -0.01976817660033703, + -0.007435981649905443, + -6.367321475408971e-05, + 0.015406651422381401, + -0.029866140335798264, + 0.011770772747695446, + 0.018087729811668396, + -0.01966124027967453, + -0.007661314215511084, + -0.05010790005326271, + -0.005824279505759478, + 0.003437279723584652, + 0.020333418622612953, + -0.0027861061971634626, + 0.005488189868628979, + 0.005178834777325392, + -0.020470909774303436, + 0.02477896772325039, + 0.009693128056824207, + 0.002602784428745508, + -0.00778734777122736, + -0.015299713239073753, + -0.007309948094189167, + -0.01152634434401989, + -0.03156186640262604, + -0.0587545670568943, + 0.0017787922406569123, + 0.005545477848500013, + 0.027559343725442886, + 0.009066780097782612, + -0.020929213613271713, + -0.029835587367415428, + 0.006771440617740154, + -0.022533277049660683, + -0.021998589858412743, + 0.0007089389255270362, + -0.037397600710392, + -0.02293047495186329, + -0.0020757350139319897, + -0.018546033650636673, + 0.01804189942777157, + 0.003626330057159066, + 0.013519966043531895, + 0.0037428156938403845, + 0.003284511622041464, + -0.0005361201474443078, + -0.002877766964957118, + -0.011472875252366066, + 0.00851681549102068, + -0.027177423238754272, + 0.03001890890300274, + 0.006798175163567066, + 0.00031532265711575747, + -0.009723681956529617, + -0.01441365946084261, + 0.032020170241594315, + 0.01248114462941885, + 0.028094032779335976, + 0.00937995407730341, + -0.031195221468806267, + -0.01504000835120678, + -0.015528865158557892, + 0.020776445046067238, + -0.01680447719991207, + 0.019325150176882744, + -0.013390113599598408, + -0.005136823281645775, + 0.04653312638401985, + -0.040361300110816956, + 0.0269177183508873, + 0.002453835681080818, + -0.02245689369738102, + 0.012137415818870068, + -0.017430827021598816, + 0.017476657405495644, + -0.050535649061203, + -0.031714633107185364, + -0.010342392139136791, + 0.003462104359641671, + 0.011037486605346203, + 0.049771808087825775, + -0.011068040505051613, + 0.01033475436270237, + -0.0072144679725170135, + -0.002215135842561722, + -0.030477212741971016, + 0.0314396508038044, + -0.045005448162555695, + 0.012542251497507095, + 0.0025932365097105503, + -0.027803773060441017, + 0.013588711619377136, + -0.0063093178905546665, + 0.010670843534171581, + -0.024503983557224274, + 0.011457598768174648, + 0.01799606904387474, + 0.02293047495186329, + 0.010052133351564407, + 0.023251287639141083, + -0.024290109053254128, + -0.011480513960123062, + 0.020868105813860893, + 0.0030973709654062986, + -0.02966754138469696, + 0.0035881379153579473, + -0.004663242492824793, + 0.005885386373847723, + -0.012847787700593472, + 0.015528865158557892, + -0.014619896188378334, + -0.012855425477027893, + -0.011098594404757023, + -0.01917238160967827, + -0.00022461666958406568, + 0.013810225762426853, + 0.02150973118841648, + -0.004518113099038601, + -0.0175683181732893, + -0.001233601476997137, + 0.020302865654230118, + 0.01167911197990179, + -0.026046941056847572, + 0.023083241656422615, + 0.005018428433686495, + -0.017721086740493774, + 8.002416871022433e-05, + 0.013451220467686653, + -0.0157198254019022, + 0.023633206263184547, + -0.008791797794401646, + 0.03318120539188385, + 0.007183914538472891, + 0.007905743084847927, + 0.011480513960123062, + 0.01027364656329155, + 0.007875189185142517, + 0.019034890457987785, + -0.0020757350139319897, + -0.02389291301369667, + 0.006133634597063065, + 0.007646037731319666, + 0.01822522096335888, + -0.010823611170053482, + -0.013917163014411926, + -0.0008726870873942971, + -0.02699410170316696, + 0.0004129509616177529, + -0.0001438167382730171, + -0.014398382045328617, + -0.014551150612533092, + 0.056738030165433884, + 0.01758359558880329, + 0.0004458915500435978, + -0.03993355110287666, + 0.015376097522675991, + 0.0004022094653919339, + 0.004361526109278202, + -0.00440735649317503, + -0.021876374259591103, + 0.017125291749835014, + -0.01865296997129917, + 0.01822522096335888, + -0.029087023809552193, + 0.04158344492316246, + 0.006263487506657839, + 0.017430827021598816, + 0.005098631605505943, + 0.019523749127984047, + -0.004178204108029604, + -0.012083947658538818, + 0.006836367305368185, + -0.03211183100938797, + -0.015979530289769173, + -0.011717304587364197, + -0.00831057783216238, + 0.005702064838260412, + 0.0538354367017746, + -0.0031699356622993946, + -0.013978270813822746, + -0.0065881190821528435, + 0.0501384511590004, + 0.03192850947380066, + 0.010831249877810478, + -0.009250101633369923, + 0.03102717734873295, + -0.011625643819570541, + -0.024977564811706543, + -0.005297229625284672, + -0.005797544959932566, + 0.03253958001732826, + 0.04760250449180603, + 0.04133901745080948, + -0.0045906780287623405, + -0.027452407404780388, + -0.0770561695098877, + -0.004327153321355581, + -0.014520596712827682, + -0.0069280280731618404, + 0.03975022956728935, + 0.013565796427428722, + -0.036908745765686035, + 0.025985833257436752, + -0.01290125586092472, + 0.02251800149679184, + 0.010357669554650784, + 0.02525254711508751, + 0.008027957752346992, + -0.02520671673119068, + 0.016392003744840622, + 0.01441365946084261, + -0.004025436472147703, + 0.03742815554141998, + -0.0380086749792099, + -0.0029235973488539457, + 0.0005819505313411355, + 0.01319151557981968, + -0.0035174828954041004, + 0.011892987415194511, + -0.0447915717959404, + -0.011969371698796749, + -0.015826763585209846, + -0.008761243894696236, + -0.03956690803170204, + -0.03776424378156662, + -0.03755037114024162, + 0.024137340486049652, + 0.03134799003601074, + 0.003998701926320791, + 0.024870628491044044, + 0.020165374502539635, + 0.011579813435673714, + 0.007294671144336462, + 0.007791167125105858, + -0.010854165069758892, + -0.008692498318850994, + 0.007936296984553337, + 0.017782192677259445, + 0.024580368772149086, + -0.019386256113648415, + 0.0006034335237927735, + 0.004403537139296532, + -0.016300342977046967, + -0.013863694854080677, + -0.02459564432501793, + 0.005877748131752014, + -0.010097963735461235, + -0.0012593810679391026, + 0.038925282657146454, + -0.03217293694615364, + -0.0026829876005649567, + -0.0018217582255601883, + 0.004785457160323858, + 0.022961027920246124, + 0.004819829948246479, + 0.022838814184069633, + 0.00905150268226862, + -0.01697252318263054, + -0.0032062181271612644, + 0.025008119642734528, + -0.008134895004332066, + 0.022365232929587364, + 0.01649894192814827, + -0.02286936715245247, + 0.0013290814822539687, + -0.011060401797294617, + 0.019554302096366882, + 0.005702064838260412, + 0.009601467289030552, + 0.006973858457058668, + -0.002352626994252205, + -0.03330342099070549, + 0.003200489329174161, + -0.012076308950781822, + -0.026077494025230408, + -0.01266446616500616, + -0.03269234672188759, + 0.02264021523296833, + -0.008623752743005753, + -0.011343022808432579, + 0.008577922359108925, + 0.00019275023078080267, + 0.014925431460142136, + -0.006691237445920706, + 0.014703918248414993, + 0.019264042377471924, + -0.029514774680137634, + -0.008348770439624786, + -0.001730097457766533, + -0.0012412398355081677, + 0.023266563192009926, + -0.01930987276136875, + 0.03038555197417736, + 0.010831249877810478, + -0.0028815860860049725, + -0.0047510843724012375, + -0.004877117928117514, + 0.017308613285422325, + -0.025344207882881165, + -0.013688011094927788, + 0.004907671362161636, + -0.011396491900086403, + 0.020333418622612953, + 0.00818836409598589, + -0.03831420838832855, + -0.030782748013734818, + -0.036603208631277084, + -0.027895433828234673, + ], + "index": 50, + }, + { + "title": "Jefferson Township, Berks County, Pennsylvania", + "text": "Jefferson Township is a township in Berks County, Pennsylvania, United States. The population was 1,977 at the 2010 census.", + "vector": [ + 0.03500353544950485, + 0.02087990939617157, + -0.02843172661960125, + 0.02222885936498642, + 0.01690223440527916, + -0.00976547971367836, + -0.04893116280436516, + -0.03915415331721306, + -0.05137541517615318, + 0.04763985797762871, + 0.012613263912498951, + -0.03387364745140076, + -0.017974477261304855, + 0.014942221343517303, + 0.021041322499513626, + -0.07194402813911438, + -0.017882240936160088, + 0.0006200704956427217, + 0.00891229696571827, + -0.02043025940656662, + 0.020084373652935028, + 0.002811754820868373, + 0.03161386400461197, + 0.024211931973695755, + 0.01813589036464691, + 0.009736655279994011, + 0.024742288514971733, + 0.0013078766642138362, + 0.02271309867501259, + -0.027670780196785927, + 0.03230563551187515, + -0.0047069150023162365, + 0.029446320608258247, + -0.05695568770170212, + -0.010624426417052746, + 0.01600293442606926, + 0.055387675762176514, + -0.012590204365551472, + 0.036156486719846725, + -0.022136623039841652, + -0.013235855847597122, + 0.005450567230582237, + -0.04581819847226143, + 0.040583811700344086, + 0.022528626024723053, + -0.005070094019174576, + 0.01685611717402935, + -0.029999736696481705, + 0.026909833773970604, + -0.0074134632013738155, + -0.010566779412329197, + 0.014411864802241325, + -0.01819353736937046, + -0.018850719556212425, + -0.02836254984140396, + 0.018504833802580833, + 0.03608730807900429, + 0.11520268023014069, + -0.05635615438222885, + 0.01734035462141037, + -0.0008394910837523639, + 0.0033349054865539074, + -0.014527159743010998, + -0.008422293700277805, + 0.0020003668032586575, + -0.05280506983399391, + -0.005410213954746723, + -0.006485338788479567, + 0.0067332228645682335, + -0.008572177030146122, + -0.01773235760629177, + 0.06410397589206696, + 0.0036029662005603313, + 0.02571076527237892, + 0.036640722304582596, + -0.0018245420651510358, + 0.02621806412935257, + -0.022517096251249313, + 0.02531876415014267, + 0.036133427172899246, + 0.002960196929052472, + -0.0038277911953628063, + 0.002922726096585393, + -0.00023689502268098295, + -0.001317244372330606, + -0.00633545545861125, + -0.04750150442123413, + -0.06608704477548599, + -0.04985352233052254, + 0.02757854387164116, + -0.013281974010169506, + 0.028685374185442924, + -0.018942954018712044, + -0.028062783181667328, + 0.04650996997952461, + -0.013454916886985302, + 0.02490370161831379, + -0.02355475164949894, + 0.022932158783078194, + 0.030899036675691605, + 0.009523360058665276, + -0.018793070688843727, + 0.001856248127296567, + 0.025088174268603325, + 0.01111442968249321, + 0.019000602886080742, + 0.015691637992858887, + 0.008064879104495049, + 0.03454235568642616, + -0.018389539793133736, + 0.03876215219497681, + 0.048193275928497314, + -0.03684825450181961, + -0.01724812015891075, + -0.002141603035852313, + -0.023278042674064636, + 0.05054529011249542, + 0.004369677510112524, + -0.008825825527310371, + 0.02084532007575035, + -0.018908366560935974, + 0.004035321995615959, + 0.0015363047132268548, + -0.010341953486204147, + 0.011189371347427368, + -0.028616197407245636, + 0.043812066316604614, + -0.023324161767959595, + -0.0013936272589489818, + -0.043304771184921265, + -0.017017530277371407, + -0.021859915927052498, + -0.010318894870579243, + 0.007718994747847319, + -0.02843172661960125, + 0.013477975502610207, + 0.03643319383263588, + 0.028547020629048347, + 0.012002200819551945, + 0.002529282122850418, + -0.0248345248401165, + 0.030507033690810204, + 0.010180541314184666, + -0.045057252049446106, + -0.00578780472278595, + -0.02262086234986782, + -0.018320361152291298, + -0.0068196943029761314, + 0.015887638553977013, + -0.023635458201169968, + 0.02266697958111763, + 0.009044886566698551, + 0.038024261593818665, + 0.00884888507425785, + 0.025526294484734535, + 0.0009367711609229445, + -0.011483373120427132, + 0.043373946100473404, + 0.007119460962712765, + -0.01740953139960766, + -0.022390272468328476, + 0.012059847824275494, + 0.045172546058893204, + 0.03154468908905983, + -0.013016795739531517, + 0.03412729501724243, + 0.031729161739349365, + -0.03541859984397888, + -0.006248984485864639, + -0.022102035582065582, + -0.033066581934690475, + -0.052574481815099716, + -0.049161750823259354, + 0.008289704099297523, + -0.016314230859279633, + -0.018931424245238304, + 0.007713229861110449, + -0.014065979979932308, + -0.04971516877412796, + 0.03161386400461197, + 0.02217121236026287, + 0.03274375572800636, + 0.03495742008090019, + -0.053589075803756714, + 0.02748630754649639, + -0.02716348133981228, + -0.03504965454339981, + -0.009379241615533829, + 0.07235909253358841, + -0.027255717664957047, + -0.03950003907084465, + 0.057555221021175385, + 0.054419200867414474, + 0.03456541523337364, + 0.05317401513457298, + 0.019842255860567093, + -0.010388071648776531, + -0.021594736725091934, + -0.0027368131559342146, + 0.030022796243429184, + 0.04717867821455002, + 0.009079474955797195, + -0.006381573621183634, + 0.025918297469615936, + 0.05340460315346718, + 0.01736341416835785, + 0.018354950472712517, + -0.0017236589919775724, + 0.0015435107052326202, + 0.062397606670856476, + 0.0013114797184243798, + -0.030760683119297028, + -0.030045855790376663, + -0.03474988788366318, + -0.04088357836008072, + 0.061936426907777786, + -0.020268846303224564, + 0.009131357073783875, + 0.02361239865422249, + 0.11713963747024536, + 0.03860073909163475, + -0.005580273922532797, + 0.018481774255633354, + 0.010901134461164474, + 0.013823860324919224, + 0.04254382476210594, + -0.008024525828659534, + 0.02753242664039135, + 0.006375808734446764, + 0.02124885283410549, + 0.035718366503715515, + 0.011033723130822182, + -0.01106254756450653, + 0.01737494394183159, + -0.023416398093104362, + 0.005874276161193848, + -0.04302806407213211, + 0.03380446881055832, + 0.05377354845404625, + -0.014942221343517303, + -0.031775277107954025, + -0.0008834472973830998, + 0.0015103634214028716, + -0.0065314569510519505, + 0.06654822826385498, + 0.0008812855230644345, + -0.05377354845404625, + -0.015507166273891926, + -0.018758483231067657, + 0.0604606531560421, + -0.043258652091026306, + 0.00455703167244792, + 0.014411864802241325, + 0.00754028744995594, + 0.011183606460690498, + -0.06119854003190994, + -0.046809736639261246, + 0.0016559232026338577, + 0.04254382476210594, + -0.02981526590883732, + 1.5864310626056977e-05, + 0.02614888735115528, + 0.004634855780750513, + -0.03368917480111122, + 0.018873777240514755, + -0.016233524307608604, + 0.014838455244898796, + 0.03682519495487213, + -0.02801666408777237, + -0.007557581644505262, + 0.014204333536326885, + -0.022470979019999504, + 0.020972145721316338, + 0.023289572447538376, + 0.05252836272120476, + 0.0540502555668354, + -0.009534889832139015, + -0.001010992331430316, + -0.05026858299970627, + -0.03186751529574394, + 0.014515629969537258, + -0.01086654607206583, + -0.010353483259677887, + -0.0383240282535553, + 0.01736341416835785, + 0.012267379090189934, + -0.010947252623736858, + -0.010768544860184193, + 0.021145086735486984, + -0.02349710464477539, + -0.02797054685652256, + -0.02308204211294651, + 0.05160600319504738, + -0.008099467493593693, + 0.015322694554924965, + -0.013858448714017868, + 0.004343735985457897, + -0.03694049268960953, + -0.049115635454654694, + 0.0036317899357527494, + -0.007782406639307737, + -0.02972302958369255, + -0.011339254677295685, + -0.04782433062791824, + -0.01086654607206583, + 0.017939887940883636, + 0.007955349050462246, + 0.01740953139960766, + -0.00975394994020462, + -0.06161360442638397, + -0.01151796244084835, + -0.006808164529502392, + 0.006808164529502392, + -0.007742053363472223, + -0.006214396096765995, + -0.022032858803868294, + 0.012774677015841007, + 0.03161386400461197, + 0.024211931973695755, + -0.061567485332489014, + 0.019876843318343163, + 0.051283176988363266, + 0.014792338013648987, + 0.00049973139539361, + -0.002829049015417695, + -0.031775277107954025, + 0.011045252904295921, + 0.03165998309850693, + 0.06645599007606506, + -0.0016905117081478238, + 0.009448418393731117, + 0.004384089261293411, + -0.016245054081082344, + -0.016798468306660652, + 0.038485441356897354, + 0.020510965958237648, + -0.009148651733994484, + -0.01464245468378067, + 0.014999868348240852, + 0.0024903700686991215, + -0.009333123452961445, + 0.006375808734446764, + 0.029653852805495262, + 0.039684511721134186, + 0.011558315716683865, + -0.01867777667939663, + -0.030068913474678993, + 0.038923561573028564, + -0.01380080170929432, + 0.009223593398928642, + 0.0002325714594917372, + 0.059768885374069214, + -0.025849120691418648, + 0.04127557948231697, + 0.035257186740636826, + 0.04116028547286987, + -0.058431461453437805, + -0.038831327110528946, + 0.004237087909132242, + -0.02311663143336773, + 0.029676910489797592, + 0.06862353533506393, + 0.004358147736638784, + 0.0532662495970726, + -0.011788904666900635, + -0.01086654607206583, + -0.004199617076665163, + 0.020534023642539978, + 0.008877708576619625, + -0.00432932423427701, + -0.017155883833765984, + 0.03585672006011009, + -0.009777008555829525, + 0.010365013033151627, + -0.021975211799144745, + -0.02269003912806511, + -0.004631973337382078, + 0.01508057489991188, + -0.04049157351255417, + -0.01731729693710804, + 0.0398920401930809, + -0.04521866515278816, + 0.05460367351770401, + -0.02083379030227661, + -0.030483976006507874, + -0.04722479730844498, + -0.008283939212560654, + 0.023681575432419777, + -0.06913083046674728, + 0.003683672519400716, + -0.04706338420510292, + 0.006502633448690176, + -0.004280323628336191, + -0.05026858299970627, + 0.0005227903602644801, + 0.021052852272987366, + -0.012705499306321144, + 0.028201136738061905, + -0.021064380183815956, + 0.046348556876182556, + -0.03064538910984993, + 0.011195136234164238, + -0.038900505751371384, + -0.006958048325031996, + 0.0005382831441238523, + 0.0040872045792639256, + 0.0030639623291790485, + -0.041114166378974915, + -3.906966230715625e-05, + 0.07009930908679962, + -0.03511882945895195, + -0.028293373063206673, + -0.004265911877155304, + 0.016567878425121307, + -0.03567224740982056, + -0.01240573264658451, + -0.05418860912322998, + 0.05737074837088585, + -0.01645258441567421, + -0.0018692187732085586, + -0.013673976995050907, + 0.014861514791846275, + -0.02926184982061386, + -0.026886774227023125, + -0.02757854387164116, + -0.00018933587125502527, + -0.03242092952132225, + 0.015841521322727203, + -0.03239786997437477, + -0.0082032335922122, + -0.030852919444441795, + -0.0051565649919211864, + -0.0743882805109024, + 0.04436548426747322, + 0.017905300483107567, + -0.02626418136060238, + -0.009390770457684994, + -0.013466445729136467, + 0.0240505188703537, + 0.008278175257146358, + 0.034058116376399994, + 0.0033118464052677155, + -0.03954615443944931, + -0.022551685571670532, + 0.05649450793862343, + 0.03332022950053215, + -0.04231323301792145, + -0.02360086888074875, + 0.006410397123545408, + 0.030899036675691605, + -0.01782459393143654, + -0.03165998309850693, + -0.02094908617436886, + -0.013051384128630161, + 0.0009893744718283415, + 0.002706548199057579, + 0.0050153289921581745, + -0.0031100802589207888, + -0.014792338013648987, + -0.0470864437520504, + -0.003484788816422224, + -0.01065901480615139, + -0.006312396842986345, + -0.015403401106595993, + -0.0628126710653305, + 0.014031391590833664, + 0.05916935205459595, + 0.05188271030783653, + -0.02803972363471985, + -0.008969943970441818, + -0.017628593370318413, + 0.05192882940173149, + -0.008110997267067432, + 0.04261299967765808, + -0.028270313516259193, + -0.024327227845788002, + 0.015806932002305984, + 0.023635458201169968, + -0.013812330551445484, + -0.042405471205711365, + -0.028547020629048347, + -0.003502083010971546, + -0.04275135323405266, + -0.0057301572524011135, + -0.03587977588176727, + -0.01287844218313694, + 0.023681575432419777, + -0.007107931654900312, + -0.009696302004158497, + -0.007857348769903183, + -0.026033591479063034, + 0.04484972357749939, + -0.053958021104335785, + 0.021686973050236702, + 0.04028404504060745, + 0.04925398901104927, + -0.031775277107954025, + -0.000438480987213552, + -0.014653983525931835, + -0.02398134209215641, + 0.026287240907549858, + -0.009079474955797195, + 0.04717867821455002, + -0.015022927895188332, + 0.05160600319504738, + 0.006975342519581318, + -0.026540890336036682, + 0.02621806412935257, + -0.039799805730581284, + -0.003721143351867795, + 0.01158137433230877, + -0.016314230859279633, + -0.01019207015633583, + -0.011027958244085312, + -0.04805492237210274, + 0.01728270761668682, + 0.029953619465231895, + -0.049484577029943466, + 0.010324659757316113, + -0.0005815187469124794, + -0.012325026094913483, + 0.016314230859279633, + 0.001591069856658578, + -0.03599507361650467, + 0.013501035049557686, + 0.039384741336107254, + 0.008497235365211964, + 0.011039488017559052, + -0.03770143911242485, + -0.023254984989762306, + -0.007015695795416832, + 0.017986007034778595, + -0.019657783210277557, + 0.024165814742445946, + 0.04851610213518143, + -0.027716897428035736, + -0.0071482849307358265, + 0.01064748503267765, + 0.008935355581343174, + -0.025157351046800613, + -0.05252836272120476, + -0.015161281451582909, + -0.010088304989039898, + 0.013454916886985302, + -0.018020594492554665, + -0.021156616508960724, + 0.017490237951278687, + -0.01333962194621563, + -0.002327516209334135, + -0.005142153240740299, + 0.04593349248170853, + -0.017928360030055046, + -0.016706233844161034, + -0.004162146244198084, + 0.0178130641579628, + 0.0038594973739236593, + -0.012002200819551945, + 0.03066844679415226, + -0.017501767724752426, + -0.029515499249100685, + 0.02884678728878498, + 0.026886774227023125, + -0.00936194695532322, + -0.04879280924797058, + -0.041044991463422775, + 0.02750936709344387, + 0.009044886566698551, + 0.03320493549108505, + 0.03553389385342598, + 0.0006845635361969471, + 0.018389539793133736, + -0.050453055649995804, + -0.005222859792411327, + -0.0279244277626276, + -0.005588921252638102, + 0.0020709848031401634, + -0.011817729100584984, + -0.008503000251948833, + -0.013916096650063992, + -0.04980740323662758, + 0.002193485852330923, + -0.003983439411967993, + -0.007044519297778606, + -0.004499384202063084, + 0.005897334776818752, + 0.006197101902216673, + -0.03163692355155945, + 0.013501035049557686, + -0.014573276974260807, + -0.01603752188384533, + -0.0027670778799802065, + -0.006514162756502628, + 0.011500667780637741, + -0.006254749372601509, + 0.03772449493408203, + -0.023635458201169968, + -0.0346115343272686, + -0.0008243586635217071, + 0.055387675762176514, + 0.011368079110980034, + 0.02228650636970997, + 0.02937714383006096, + -0.007130990736186504, + -0.029538556933403015, + 0.03244398906826973, + 0.0036548487842082977, + 0.033158816397190094, + -0.015818461775779724, + 0.02714042365550995, + 0.047363150864839554, + -0.025549354031682014, + -0.05049917474389076, + 0.05072976276278496, + -0.0029184024315327406, + -0.011506432667374611, + -0.03694049268960953, + -0.024073578417301178, + 0.038393206894397736, + -0.0016688938485458493, + 0.023347219452261925, + 0.0025307233445346355, + -0.019784606993198395, + -0.017190471291542053, + -0.01734035462141037, + 0.03415035456418991, + -0.019219662994146347, + 0.03408117592334747, + -0.02748630754649639, + -0.003251316724345088, + -0.009863479994237423, + -0.018308833241462708, + -0.002056573051959276, + 0.006139454431831837, + 0.0016170111484825611, + 0.019231192767620087, + 0.01553022488951683, + 0.022782275453209877, + -0.0030380210373550653, + 0.04014568775892258, + 0.018827660009264946, + 0.04441159963607788, + -0.007228991016745567, + -0.017882240936160088, + -0.00016672725905664265, + -0.021663915365934372, + -0.02933102659881115, + -0.037078846246004105, + 0.004758797585964203, + -0.013143620453774929, + -0.009419594891369343, + 0.049530696123838425, + -0.030760683119297028, + 0.013823860324919224, + 0.001364082912914455, + -0.07208237797021866, + -0.024650052189826965, + -0.015668578445911407, + 0.0018000418785959482, + 0.015126693062484264, + -0.04452689737081528, + 0.02316274866461754, + -0.002081073122099042, + 0.013431857340037823, + -0.026471711695194244, + 0.013281974010169506, + -0.008503000251948833, + -0.008802766911685467, + 0.012394203804433346, + 0.025987474247813225, + -0.01817047782242298, + 0.013766213320195675, + 0.05386578291654587, + 0.005459214095026255, + 0.021421795710921288, + 0.022839922457933426, + 0.00709063746035099, + -0.005496684927493334, + -0.03020726703107357, + -0.02670230157673359, + 0.028500903397798538, + -0.01288997195661068, + -0.0055687446147203445, + -0.004265911877155304, + -0.013016795739531517, + -0.008341587148606777, + -0.02085684984922409, + 0.010964546352624893, + -0.014919161796569824, + 0.020061315968632698, + -0.006473809480667114, + -0.01019207015633583, + 0.019000602886080742, + 0.0362948402762413, + -0.013881508260965347, + -0.017893770709633827, + -0.023301102221012115, + -0.013743153773248196, + 0.007027225103229284, + -0.018308833241462708, + -0.05580274015665054, + -0.06493409723043442, + 0.03168304264545441, + 0.02173309214413166, + 0.008404999040067196, + 0.044596072286367416, + 0.012463380582630634, + 0.0032974346540868282, + -0.025664648041129112, + 0.015126693062484264, + -0.0039286743849515915, + 0.011425726115703583, + -0.012659382075071335, + -0.0036144955083727837, + 0.01950789988040924, + -0.002794460626319051, + 0.007228991016745567, + 0.004718444310128689, + -0.006214396096765995, + -0.02349710464477539, + -0.011713963001966476, + 0.03295128792524338, + 0.053542960435152054, + 0.01818200759589672, + -0.03431176766753197, + -0.022309565916657448, + 0.010284306481480598, + -0.031198803335428238, + -0.009967245161533356, + 0.005914628971368074, + 0.027878310531377792, + 0.016994470730423927, + 0.03341246768832207, + -0.017098236829042435, + 0.0010700809070840478, + 0.026471711695194244, + 0.03770143911242485, + -0.03998427838087082, + -0.05298954248428345, + -0.028155017644166946, + 0.015714697539806366, + 0.008531823754310608, + -0.05640227347612381, + -0.03189057484269142, + 0.007966878823935986, + 0.002934255637228489, + 0.019300369545817375, + -0.038854386657476425, + 0.004185205325484276, + -0.0010441396152600646, + -0.017075177282094955, + -0.038001205772161484, + -0.027832193300127983, + -0.044204071164131165, + -0.04833162948489189, + -0.03468070924282074, + 0.028985140845179558, + 0.006767811719328165, + 0.017432590946555138, + 0.04252076521515846, + 0.014400335028767586, + -0.002719518728554249, + -0.004430206958204508, + 0.01597987487912178, + 0.03585672006011009, + -0.01823965646326542, + -0.029054319486021996, + -0.0041736760176718235, + 0.029446320608258247, + 0.011235489509999752, + -0.0011875376803800464, + -0.011466079391539097, + -0.04086051881313324, + 0.0217446219176054, + -0.0034127295948565006, + 0.0365254282951355, + 0.028062783181667328, + 0.03541859984397888, + -0.020741555839776993, + -0.04229017347097397, + -0.0041102636605501175, + 0.018424127250909805, + 0.00744805159047246, + -0.02838560752570629, + -0.03435788303613663, + -0.001203390653245151, + -0.004271676763892174, + -0.019346486777067184, + -0.02714042365550995, + 0.003277258016169071, + -0.0006769973551854491, + -0.010088304989039898, + -0.014849985018372536, + 0.031221862882375717, + 0.0013568770373240113, + 0.010491837747395039, + 0.023773811757564545, + 0.007494169287383556, + 0.03297434747219086, + 0.030829859897494316, + 0.018896836787462234, + -0.012186672538518906, + 0.02886984683573246, + -0.006779341027140617, + 0.0008956973906606436, + 0.006272043567150831, + -0.05718627944588661, + -0.021859915927052498, + 0.02536488138139248, + 0.01085501629859209, + 0.033573880791664124, + -0.03375834971666336, + -0.004228441044688225, + 0.008497235365211964, + 0.0009230799041688442, + -0.041460052132606506, + 0.014342687092721462, + 0.00743652181699872, + -0.0008827266865409911, + -0.0006193498848006129, + -0.029584676027297974, + 0.0007450933917425573, + 0.010099834762513638, + -0.018793070688843727, + -0.06262819468975067, + -0.05464978888630867, + 0.030760683119297028, + -0.011909964494407177, + -0.00957524310797453, + -0.023681575432419777, + 0.003810497000813484, + 0.024258051067590714, + 0.03020726703107357, + -0.04694809019565582, + -0.0373094342648983, + 0.009875009767711163, + -0.003202316351234913, + 0.02762466110289097, + -0.002052249386906624, + -0.022943688556551933, + 0.013720095157623291, + -0.0009569477988407016, + 0.019750019535422325, + 0.011091371066868305, + 0.0027022245340049267, + -0.007378874812275171, + 0.05298954248428345, + 0.014042920432984829, + 0.0006553795537911355, + 0.03205198794603348, + -0.03477294743061066, + 0.024719228968024254, + 0.005309330765157938, + -0.021594736725091934, + -0.01995754987001419, + 0.0024687524419277906, + -0.02441946230828762, + -0.017582474276423454, + 0.01814742013812065, + -0.03631789982318878, + -0.001996043138206005, + 0.009039121679961681, + 0.011252784170210361, + 0.021652385592460632, + 0.016982940956950188, + -0.012117495760321617, + 0.013893037103116512, + 0.034334827214479446, + -0.009846185334026814, + 0.011886905878782272, + -0.026494771242141724, + 0.020591672509908676, + 0.038001205772161484, + 0.020061315968632698, + -0.06548751145601273, + -0.013950685039162636, + -0.0005127020995132625, + -0.029169613495469093, + -0.02036108262836933, + 0.008975708857178688, + 0.0082032335922122, + -0.034842122346162796, + 0.010935722850263119, + 0.039776746183633804, + 0.013673976995050907, + 0.007880407385528088, + 0.018354950472712517, + -0.03594895452260971, + 0.004949034191668034, + 0.04261299967765808, + -0.004185205325484276, + 0.022447919473052025, + 0.0014274951536208391, + -0.01242879219353199, + 0.006652516778558493, + 0.0069811069406569, + 0.012636322528123856, + 0.051698241382837296, + 0.01397374365478754, + 0.006006865296512842, + 0.02137567661702633, + 0.015564813278615475, + 0.029123496264219284, + -0.027647720649838448, + -0.04044545814394951, + 0.062397606670856476, + 0.041529227048158646, + -0.011731257662177086, + -0.01001912821084261, + 0.008099467493593693, + 0.02797054685652256, + 0.03332022950053215, + 0.01596834510564804, + -0.027186540886759758, + -0.0068600475788116455, + -0.006623692810535431, + 0.002186279743909836, + -0.040560752153396606, + -0.019715430215001106, + -0.008964180015027523, + 0.06119854003190994, + -0.03509577363729477, + -0.008410763926804066, + 0.03770143911242485, + -0.004410030320286751, + -0.0020825143437832594, + 0.003159080632030964, + 0.020626259967684746, + -0.010947252623736858, + -0.00039524538442492485, + 0.034519296139478683, + -0.02707124687731266, + -0.006842753384262323, + 0.012647852301597595, + -0.018343420699238777, + -0.016694704070687294, + -0.015726227313280106, + 0.021168146282434464, + -0.01468857191503048, + 0.0028881377074867487, + -0.01176008116453886, + 0.019761549308896065, + -0.01220973115414381, + -0.028178077191114426, + 0.005859863944351673, + -0.04118334501981735, + 0.01774388737976551, + 0.005450567230582237, + 0.005294919013977051, + 0.016141287982463837, + 0.01996907964348793, + -0.00911982823163271, + -0.003749967087060213, + -0.013616329059004784, + 0.0049115633592009544, + -0.014400335028767586, + -0.01909283734858036, + -0.0022035741712898016, + 0.011829257942736149, + 0.028754552826285362, + 0.0235432218760252, + -0.023750752210617065, + -0.002511987928301096, + -0.03018420934677124, + -0.003150433534756303, + -0.0041506169363856316, + 0.011212430894374847, + -0.003974792081862688, + -0.024742288514971733, + -0.04411183297634125, + 0.01553022488951683, + -0.08227445185184479, + 0.022874511778354645, + 0.026794537901878357, + -0.006364279426634312, + -0.018770013004541397, + 0.01694835163652897, + 0.030922096222639084, + -0.012947618961334229, + 0.024211931973695755, + 0.01683305762708187, + 0.017928360030055046, + 0.01240573264658451, + -0.03435788303613663, + 0.026563948020339012, + 0.03138327598571777, + -0.014296569861471653, + -0.02571076527237892, + 0.001890836632810533, + 0.028662316501140594, + 0.006375808734446764, + -0.019657783210277557, + -0.018989073112607002, + 0.006560280453413725, + -0.017132824286818504, + 0.05059140920639038, + -0.020245786756277084, + -0.03590283542871475, + 0.01600293442606926, + -0.02309357188642025, + 0.03866991400718689, + -0.016982940956950188, + 0.00754028744995594, + -0.003288787556812167, + 0.017075177282094955, + -0.022136623039841652, + -0.02661006711423397, + 0.00455703167244792, + -0.017109764739871025, + -0.017536357045173645, + 0.03375834971666336, + 0.010065246373414993, + 0.005211330018937588, + 0.021514032036066055, + -0.02353169210255146, + -0.010572543367743492, + -0.01592222787439823, + -0.016072111204266548, + -0.00566386291757226, + 0.03765532001852989, + 0.007932290434837341, + -0.017570944502949715, + 0.029146553948521614, + 0.06290490925312042, + 0.04053769260644913, + -0.03498047590255737, + -0.0061798072420060635, + -0.02794748730957508, + 0.01047454308718443, + 0.0028751669451594353, + -0.015057516284286976, + -0.02803972363471985, + 0.026471711695194244, + 0.018308833241462708, + 0.01353562343865633, + -0.037493906915187836, + -0.030829859897494316, + 0.007966878823935986, + 0.01731729693710804, + 0.04037627950310707, + 0.016325760632753372, + 0.01156407967209816, + -0.02134108915925026, + -0.033158816397190094, + 0.0035482009407132864, + -0.012555615976452827, + -0.014042920432984829, + -0.01814742013812065, + -0.02358933910727501, + -0.01131619606167078, + -0.029676910489797592, + -0.017859183251857758, + 0.02707124687731266, + -0.043835125863552094, + 0.026356417685747147, + -0.040676046162843704, + -0.0014505541184917092, + 0.0011284489883109927, + -0.009719361551105976, + -0.005675392225384712, + 0.011454549618065357, + -0.0169137641787529, + -0.011143253184854984, + -0.02672536112368107, + -0.01954248733818531, + 0.017859183251857758, + -0.05072976276278496, + 0.018112830817699432, + 0.024626994505524635, + 0.010693603195250034, + 0.006560280453413725, + 0.010353483259677887, + -0.018550951033830643, + -0.034450121223926544, + -0.018919896334409714, + 0.012993737123906612, + -0.006554516032338142, + -0.0027656368911266327, + 0.004118910990655422, + 0.03419647365808487, + -0.01378927193582058, + -0.015207399614155293, + 0.04143699258565903, + -0.005623509641736746, + -0.03147551044821739, + 0.0006276366766542196, + -0.004614679142832756, + 0.01443492341786623, + -0.006525692064315081, + -0.01868930645287037, + -0.00025022600311785936, + 0.0051767416298389435, + 0.0217446219176054, + -0.01736341416835785, + 0.054373081773519516, + -0.05252836272120476, + -0.01594528742134571, + 0.00709063746035099, + -0.002447134582325816, + -0.003715378697961569, + 0.041921231895685196, + 0.00015186502423603088, + -0.02271309867501259, + 0.004412912763655186, + 0.023347219452261925, + 0.0008257998269982636, + 0.004179440904408693, + 0.021179676055908203, + -0.04805492237210274, + -0.014757749624550343, + -0.029515499249100685, + 0.0055053322575986385, + 0.01443492341786623, + -0.02437334507703781, + -0.014861514791846275, + 0.019726959988474846, + 0.0006546589429490268, + -0.014665513299405575, + 0.04316641762852669, + 0.03325105458498001, + -0.029953619465231895, + 0.00911406334489584, + 0.021571679040789604, + -0.010641721077263355, + 0.0025105467066168785, + -0.0024846054147928953, + 0.013201267458498478, + 0.011177842505276203, + -0.010347718372941017, + -0.00349055347032845, + 0.0033003168646246195, + -0.035764481872320175, + -0.00689463596791029, + -0.0011824935209006071, + 0.0478704497218132, + 0.018977543339133263, + -0.017962947487831116, + 0.0023909283336251974, + -0.05400414019823074, + 0.017006000503897667, + -0.04118334501981735, + 0.010699368081986904, + 0.0032743755728006363, + -0.026771480217576027, + 0.032674580812454224, + 0.03908497467637062, + -0.02094908617436886, + 0.029607733711600304, + -0.013950685039162636, + -0.012982207350432873, + -0.02524958737194538, + 0.019842255860567093, + -0.010053716599941254, + -0.016129758208990097, + -0.016291171312332153, + 0.01913895644247532, + -0.01736341416835785, + 0.01651023142039776, + -0.010301601141691208, + -0.047270916402339935, + -0.011644786223769188, + 0.0028477844316512346, + -0.011051017791032791, + 0.014377276413142681, + 0.03348164260387421, + -0.01313209068030119, + 0.0230359248816967, + -0.0045800902880728245, + -0.0024658699985593557, + 0.020084373652935028, + 0.013097502291202545, + -0.003435788443312049, + 0.03774755448102951, + 0.022966746240854263, + -0.014607865363359451, + -0.0014671278186142445, + -0.0030581976752728224, + 0.0008092261850833893, + 0.05003799498081207, + 0.0033262583892792463, + 0.027371013537049294, + -0.038900505751371384, + 0.01351256389170885, + -0.010353483259677887, + 0.003954615443944931, + -0.0029011082369834185, + -0.0034098471514880657, + -0.0017438356298953295, + -0.013443387113511562, + -0.03016114979982376, + 0.004657914396375418, + -0.04053769260644913, + -0.007822760380804539, + 0.013823860324919224, + -0.015645520761609077, + -0.01867777667939663, + -0.004920210689306259, + 0.0014274951536208391, + 0.03242092952132225, + 0.0023433691821992397, + 0.02089143916964531, + 0.001462804269976914, + 0.012970677576959133, + 0.01307444367557764, + -0.0068600475788116455, + 0.02836254984140396, + 0.02212509512901306, + 0.0051969182677567005, + -0.015564813278615475, + 0.012036789208650589, + 0.004167911130934954, + -0.001614128821529448, + 0.010889604687690735, + 0.029607733711600304, + -0.012117495760321617, + -0.01553022488951683, + -0.029953619465231895, + 0.03059927001595497, + -0.051283176988363266, + 0.008024525828659534, + 0.03694049268960953, + 0.0009288446744903922, + -0.011829257942736149, + -0.05543379485607147, + 0.03846238553524017, + 0.0036750254221260548, + -0.017605533823370934, + -0.01954248733818531, + -0.013281974010169506, + 0.021525559946894646, + 0.004026675131171942, + -0.004401383455842733, + 0.004755915142595768, + -0.0445038378238678, + 0.010255482979118824, + -0.008047585375607014, + -0.02446558140218258, + 0.006675575394183397, + 0.02181379869580269, + 0.013697035610675812, + 0.02451169863343239, + 0.031221862882375717, + 0.024603934958577156, + 0.018574010580778122, + 0.01242879219353199, + 0.014019861817359924, + 0.03594895452260971, + 0.019830726087093353, + 0.0013727301266044378, + -0.003692319616675377, + 0.015195869840681553, + 0.03500353544950485, + -0.0035885542165488005, + -0.004214029293507338, + -0.005747451446950436, + 0.01826271414756775, + 0.011852317489683628, + 0.013443387113511562, + 0.01091266330331564, + 0.008520293980836868, + -0.027232658118009567, + -0.008860413916409016, + -0.019657783210277557, + 0.003680790076032281, + -0.02762466110289097, + -0.028339490294456482, + 0.01694835163652897, + 0.011662080883979797, + 0.03521106764674187, + 0.015853051096200943, + -0.0012423027073964477, + -0.008670177310705185, + 0.005537038203328848, + 0.0059953355230391026, + 0.029238790273666382, + -0.019242720678448677, + 0.029561616480350494, + 0.005908864550292492, + -0.008831590414047241, + -0.014492570422589779, + -0.016314230859279633, + 0.011235489509999752, + -0.021214263513684273, + -0.024142755195498466, + 0.014411864802241325, + 0.05497261509299278, + -0.004764562472701073, + 0.0020608967170119286, + 0.01444645319133997, + -0.005764745641499758, + 0.026932891458272934, + 0.006318161264061928, + -0.01686764694750309, + -0.02626418136060238, + -0.0017712181434035301, + 0.008866178803145885, + -0.023301102221012115, + 0.02836254984140396, + 0.01815894991159439, + 0.0005408052238635719, + 0.017974477261304855, + 0.008935355581343174, + 0.0016977175837382674, + 0.002027749316766858, + 0.012763147242367268, + 0.01110866479575634, + 0.024142755195498466, + -0.0478704497218132, + 0.025872178375720978, + -0.020545553416013718, + 0.03509577363729477, + 0.03299740329384804, + -0.02711736410856247, + -0.0029212848749011755, + -0.005747451446950436, + 0.011235489509999752, + 0.024211931973695755, + 0.008330057375133038, + -0.003920027054846287, + -0.03251316770911217, + -0.010526426136493683, + -0.00028103135991841555, + -0.016613997519016266, + 0.03283599019050598, + 0.0026474595069885254, + 0.027278777211904526, + 0.009973010048270226, + -8.1911184679484e-06, + 0.030945155769586563, + -0.004055498633533716, + -0.012832324020564556, + 0.012371144257485867, + -0.010145952925086021, + -0.007488404866307974, + -0.05520320683717728, + -0.0075345225632190704, + -0.008946885354816914, + -0.02891596406698227, + 0.012820794247090816, + 0.00421979371458292, + -0.022874511778354645, + 0.02451169863343239, + 0.04307417944073677, + 2.72192824013473e-06, + -0.0030264914967119694, + -0.00422555860131979, + 0.0022741921711713076, + 0.005317978095263243, + 0.0017351885326206684, + 0.0030726094264537096, + -0.0029443439561873674, + -0.02259780280292034, + 0.013109032064676285, + -0.013939155265688896, + 0.010140188038349152, + -0.02446558140218258, + -0.019865313544869423, + 0.002030631760135293, + -0.010509131476283073, + 0.012717029079794884, + 0.010238188318908215, + -0.01047454308718443, + 0.02976914681494236, + 0.0008121085702441633, + -0.049161750823259354, + -0.01202525943517685, + 0.008070643991231918, + 0.049161750823259354, + -0.021064380183815956, + 0.03544165566563606, + 0.02976914681494236, + 0.005211330018937588, + 0.0018548069056123495, + -0.0013410239480435848, + 0.010555249638855457, + -0.016233524307608604, + -0.03332022950053215, + 0.017478710040450096, + 0.004000733606517315, + 0.011725492775440216, + 0.03447318077087402, + -0.007759348023682833, + 0.022805335000157356, + 0.035326361656188965, + 0.0009958598529919982, + 0.04833162948489189, + -0.02568770758807659, + -0.0021992505062371492, + 0.041114166378974915, + -0.006462280172854662, + 0.04222099855542183, + -0.0030985509511083364, + 0.03500353544950485, + -0.00743652181699872, + 0.005194035824388266, + 0.026932891458272934, + 0.010624426417052746, + -0.010071011260151863, + -0.010030657984316349, + -0.0019917197059839964, + -0.004366795066744089, + 0.05677121505141258, + -0.04833162948489189, + 0.005222859792411327, + 0.00825511571019888, + -0.009160180576145649, + 0.0015824227593839169, + 0.02880067005753517, + 0.019196603447198868, + 0.009938421659171581, + -0.011229724623262882, + -0.04272829741239548, + 0.016740821301937103, + 0.01352409366518259, + -0.018124360591173172, + 0.017455650493502617, + 0.00015519776206929237, + 0.019334957003593445, + 0.008820060640573502, + -0.009062180295586586, + 0.00818593893200159, + 0.03410423547029495, + -0.020291905850172043, + 0.007177108433097601, + -0.021894505247473717, + 0.012613263912498951, + -0.009419594891369343, + 0.03101433254778385, + -0.010803133249282837, + 0.006542986258864403, + 0.026494771242141724, + 0.003461729735136032, + 0.018424127250909805, + -0.011529491282999516, + -0.013097502291202545, + 0.01641799509525299, + -0.011471844278275967, + -0.02312815934419632, + 0.013178208842873573, + 0.010687838308513165, + 0.001733747310936451, + 0.020142022520303726, + -0.007223226595669985, + 0.01912742666900158, + -0.00216177967377007, + -0.02402746118605137, + 0.0018144537461921573, + -0.010976076126098633, + -0.03783979266881943, + -0.011143253184854984, + 0.008699001744389534, + -0.011275842785835266, + -0.018089773133397102, + 0.0032801402267068624, + -0.0006593427970074117, + 0.04007651284337044, + -0.009206298738718033, + 0.010053716599941254, + -0.00754605233669281, + 0.058016400784254074, + 0.045564550906419754, + 0.011074076406657696, + -0.008260880596935749, + -0.002916961442679167, + -0.00172510021366179, + 0.0076613472774624825, + 0.018770013004541397, + -0.034842122346162796, + 0.007586405612528324, + 0.004571443423628807, + 0.015069045126438141, + -0.04049157351255417, + 0.03631789982318878, + 0.028085840865969658, + -0.026471711695194244, + -0.030437856912612915, + 0.01333962194621563, + 0.00014907271543052047, + 0.016187405213713646, + 0.00018312074826098979, + -0.014723160304129124, + 0.013570211827754974, + -0.0007494169403798878, + 0.002646018285304308, + 0.01782459393143654, + -0.03689437359571457, + 0.04664832353591919, + -0.004830856807529926, + -0.03154468908905983, + -0.010267011821269989, + 0.023370278999209404, + -0.03560306876897812, + 0.01112595945596695, + -0.024995937943458557, + -0.005162329878658056, + 0.0021228676196187735, + -0.03735555335879326, + 0.0169137641787529, + 0.012809265404939651, + 0.020188139751553535, + -0.0029356968589127064, + 0.007079107686877251, + 0.03691743314266205, + -0.010382306762039661, + 0.0073096975684165955, + -0.019300369545817375, + 0.009436888620257378, + 0.04009957239031792, + -0.026356417685747147, + -0.007119460962712765, + -0.024304168298840523, + -0.014481041580438614, + 0.02700207009911537, + 0.03412729501724243, + -0.010347718372941017, + -0.017190471291542053, + -0.0028074311558157206, + 0.012301967479288578, + 0.017663180828094482, + 0.003784555708989501, + 0.017997536808252335, + -0.004121793434023857, + 0.031314097344875336, + -0.02439640462398529, + -0.01738647371530533, + 0.004208264406770468, + 0.006496868561953306, + 0.04514949023723602, + 0.06539527326822281, + -0.006496868561953306, + 0.0066352225840091705, + -0.015680108219385147, + 0.028131959959864616, + -0.009396535344421864, + 0.014953750185668468, + -0.004902916494756937, + 0.026886774227023125, + ], + "index": 51, + }, + { + "title": "Epsom Downs", + "text": "Epsom Downs is an area of chalk upland near Epsom, Surrey; in the North Downs. Part of the area is taken up by the racecourse, the gallops are part of the land purchased by Stanly Wootton in 1925 in order that racehorses can be trained without interference. It is open to users such as ramblers, model aircraft flyers, golfers and cyclists. But all users are subject to the controls laid down by the purchase order; see 'The Wootton Family - Australia to Epsom' by Bill Eacott page 66/67.", + "vector": [ + -0.018810689449310303, + 0.03345569223165512, + -0.017085833474993706, + -0.017264828085899353, + -0.01608509197831154, + 0.04077818989753723, + 0.024196796119213104, + -0.02167460136115551, + 0.019982289522886276, + 0.0006885184557177126, + -0.021804779767990112, + -0.019331401214003563, + -0.003205627901479602, + -0.020047379657626152, + 0.04761252552270889, + 0.0410710908472538, + -0.056822601705789566, + 0.008294765837490559, + 0.0036510799545794725, + 0.027890590950846672, + 0.04207997024059296, + -0.0038707549683749676, + -0.0302500631660223, + -0.02063317969441414, + -0.020372822880744934, + 0.04728708043694496, + -0.017199739813804626, + 0.018729329109191895, + -0.019754478707909584, + -0.007538107223808765, + 0.0016831581015139818, + -0.017883174121379852, + -0.015312162227928638, + 0.025303306058049202, + -0.030900951474905014, + 0.04279594495892525, + 0.008225608617067337, + -0.03228409215807915, + -0.06040249392390251, + 0.027174612507224083, + 0.02292756177484989, + -0.05513029173016548, + 0.010861708782613277, + 0.03784919157624245, + -0.036905400454998016, + -0.0404527448117733, + -0.002503888215869665, + -0.0008603938040323555, + -0.014669409021735191, + -0.016475625336170197, + -0.022862473502755165, + 0.005585440434515476, + 0.0257914736866951, + 0.004417908377945423, + -0.05067170411348343, + -0.025319579988718033, + 0.009616883471608162, + 0.0935327410697937, + -0.0011146472534164786, + 0.023659812286496162, + 0.0139778396114707, + -0.020193828269839287, + 0.009755197912454605, + 0.014075472950935364, + 0.01558879017829895, + -0.0029900209046900272, + 0.025221945717930794, + 0.004450452979654074, + 0.020356550812721252, + -0.015255209058523178, + -0.0008298833854496479, + 0.02806958556175232, + 0.009625019505620003, + 0.048686493188142776, + -0.030933495610952377, + 0.00394601421430707, + 0.0038809252437204123, + 0.0567900575697422, + -0.004147382918745279, + 0.020828446373343468, + -0.023480817675590515, + -0.03449711203575134, + -0.08897651731967926, + 0.007302159909158945, + 0.05298236012458801, + 0.002654406474903226, + 0.007566583808511496, + -0.055065203458070755, + 0.06069539114832878, + -0.017004473134875298, + 0.03125894069671631, + -0.03252817317843437, + -0.008087295107543468, + 0.009031083434820175, + -0.008803272619843483, + 0.020177556201815605, + 0.030900951474905014, + 0.004816578235477209, + 0.01993347331881523, + 0.020161284133791924, + -0.004015170969069004, + 0.0113498754799366, + -0.015141303651034832, + -0.03941132500767708, + -0.0012865226017311215, + 0.013684939593076706, + -0.01207398995757103, + -0.004580630920827389, + 0.05519538000226021, + -0.02849266305565834, + 0.06118356063961983, + -0.03420421481132507, + 0.03563616797327995, + -0.005024048965424299, + -0.04552967846393585, + 0.005890544969588518, + -0.00392160564661026, + -0.019689390435814857, + 0.025514846667647362, + 0.0022801451850682497, + 0.0002285738883074373, + 0.007582855876535177, + -0.001893679960630834, + 0.018127257004380226, + 0.02045418508350849, + -0.0030632459092885256, + 0.010821028612554073, + -0.023676084354519844, + 0.010096914134919643, + 0.005585440434515476, + 4.980189987691119e-05, + 0.002227260498329997, + 0.003378520254045725, + -0.010113186202943325, + 0.005931225139647722, + -0.007928640581667423, + -0.01941276155412197, + 0.01817607320845127, + 0.052591826766729355, + -0.008062887005507946, + -0.011463780887424946, + 0.016377992928028107, + 0.011382419615983963, + 0.014970445074141026, + -0.014295147731900215, + 0.05194093659520149, + -0.0013119479408487678, + 0.025221945717930794, + 0.021430518478155136, + 0.011048839427530766, + -0.013481536880135536, + -0.012423842214047909, + 0.005174566991627216, + 0.029859529808163643, + 0.00011333348811604083, + 0.008640550076961517, + -0.11397065222263336, + -0.012814375571906567, + -0.01889205165207386, + 0.049272291362285614, + 0.0057074823416769505, + -0.03262580558657646, + 0.0010882049100473523, + 0.011838042177259922, + 0.004731148947030306, + -0.013180500827729702, + 0.007184186484664679, + 0.011211561970412731, + 0.03475746884942055, + -0.0003434964455664158, + -0.010642034001648426, + -0.012122806161642075, + -0.04569240286946297, + -0.005019980948418379, + 0.022130222991108894, + 0.023448273539543152, + -0.021300340071320534, + 0.05366579070687294, + 0.04797051474452019, + 0.06697647273540497, + -0.02942018024623394, + -0.02509176731109619, + 0.026377273723483086, + -0.016874294728040695, + -0.003610399551689625, + -0.029176095500588417, + -0.030526690185070038, + 0.03407403454184532, + 0.04982554540038109, + -0.06609777361154556, + -0.014311419799923897, + 0.00435688765719533, + 0.0744616910815239, + 0.004971164278686047, + 0.008892769925296307, + 0.012033308856189251, + -0.029127279296517372, + 0.06326640397310257, + 0.050932057201862335, + 0.0004706231993623078, + 0.0077618504874408245, + -0.053503070026636124, + 0.006972647737711668, + -0.029859529808163643, + -0.017476366832852364, + -0.005874272435903549, + 0.03125894069671631, + 0.0271583404392004, + 0.01991720125079155, + 0.033911313861608505, + 0.0007220798870548606, + 0.020079923793673515, + -0.03810954466462135, + 0.03270716965198517, + -0.07381080090999603, + 0.02250448428094387, + 0.01889205165207386, + 0.011886859312653542, + 0.02776041254401207, + -0.015645742416381836, + 0.02227667346596718, + -0.0491095706820488, + -0.00851850863546133, + -0.0025282965507358313, + 0.007879824377596378, + 0.0524616464972496, + -0.008298833854496479, + 0.04767761379480362, + -0.022878745570778847, + -0.054121412336826324, + 0.00392160564661026, + -0.03187728673219681, + 0.01796453446149826, + 0.00678551709279418, + -0.053600702434778214, + 0.01244011428207159, + -0.03579889237880707, + 0.008738183416426182, + 0.0016129841096699238, + -0.015873553231358528, + -0.012554019689559937, + 0.03697049245238304, + -0.0020970827899873257, + -0.06215989217162132, + -0.03361841291189194, + -0.011301059275865555, + -0.01284691970795393, + 0.030803319066762924, + 0.02837875671684742, + -0.011862450279295444, + 0.018403884023427963, + 0.006187513004988432, + 0.03853262588381767, + -0.0066878837533295155, + 0.02878556214272976, + -0.03810954466462135, + -0.053405437618494034, + 0.008868361823260784, + -0.04364210367202759, + -0.018940867856144905, + -0.035766348242759705, + -0.005406446289271116, + 0.030917223542928696, + -0.015645742416381836, + -0.02889946848154068, + -0.022130222991108894, + -0.010609489865601063, + -0.001730957766994834, + 0.0003854482783935964, + -0.02352963387966156, + -0.02457105740904808, + 0.012358753010630608, + -0.03654741123318672, + -0.022113950923085213, + 0.02540094032883644, + -0.014173106290400028, + 0.05347052589058876, + -0.007940844632685184, + -0.011325467377901077, + -0.0530799925327301, + 0.02011246792972088, + -0.005569168366491795, + -0.005504079628735781, + -0.034236758947372437, + -0.006427528336644173, + 0.018745601177215576, + 0.018208617344498634, + 0.012342480942606926, + 0.029680535197257996, + -0.017915718257427216, + -0.00917753390967846, + -0.029468996450304985, + 0.01993347331881523, + 0.06782262772321701, + 0.007253343239426613, + 0.003588025225326419, + -0.07986406981945038, + -0.026247095316648483, + -0.03374858945608139, + -0.03269089758396149, + -0.04139653593301773, + 0.0392160564661026, + -0.023301823064684868, + 0.04683145880699158, + 0.013701211661100388, + 0.0118787232786417, + -0.014889083802700043, + -0.009738925844430923, + -0.02147933468222618, + -0.025205673649907112, + 0.0861126035451889, + -0.005479671061038971, + 0.007489290554076433, + -0.010145731270313263, + -0.016361720860004425, + -0.048133235424757004, + -0.010959342122077942, + -0.017720451578497887, + -0.0183713398873806, + 0.01295269001275301, + -0.016142046079039574, + -0.028639113530516624, + -0.059295982122421265, + -0.012578428722918034, + 0.057213135063648224, + -0.008079159073531628, + 0.019363945350050926, + 0.03077077306807041, + -0.021593239158391953, + 0.0026849168352782726, + -0.035863980650901794, + -0.03495273366570473, + -0.005715618375688791, + 0.005516283679753542, + 0.059816692024469376, + 0.008176792412996292, + 0.02694680169224739, + -0.026084372773766518, + -0.005711550358682871, + 0.029599172994494438, + 0.0291923675686121, + 0.03086840733885765, + 0.009348392486572266, + -0.002491684164851904, + 0.01652444340288639, + -0.0011949914041906595, + 0.03850007802248001, + -0.017476366832852364, + -0.05389360338449478, + -0.02673526294529438, + 0.0008690383983775973, + 0.04497642442584038, + -0.02003110572695732, + 0.04471606761217117, + 0.007013328373432159, + -0.019217494875192642, + -0.005459330976009369, + -0.046896547079086304, + -0.029045918956398964, + -0.0057644350454211235, + 0.009006675332784653, + -0.0014797552721574903, + -0.008746320381760597, + 0.017671633511781693, + -0.061866991221904755, + 0.033488236367702484, + 0.022976379841566086, + 0.008404603227972984, + 0.005837659817188978, + 0.030298879370093346, + 0.010186411440372467, + -0.010072506032884121, + -0.015523700974881649, + 0.006041062995791435, + -0.023659812286496162, + -0.0311775803565979, + -0.021495606750249863, + 0.02714206837117672, + -0.02260211855173111, + -0.00014212769747246057, + 0.019884657114744186, + 0.07146760076284409, + 0.0032341042533516884, + 0.03654741123318672, + 0.0055488282814621925, + -0.03177965059876442, + 0.02157696709036827, + -0.004853190388530493, + -0.009991144761443138, + 0.009934192523360252, + -0.03413912281394005, + 0.052884723991155624, + 0.02557993493974209, + 0.0029615445528179407, + 0.055390648543834686, + -0.015222664922475815, + 0.01547488383948803, + 0.017313646152615547, + 0.02034027874469757, + 0.0108861168846488, + 0.0006163104553706944, + -0.03898824751377106, + -0.00031679985113441944, + 0.025254489853978157, + 0.006098015699535608, + -0.024424606934189796, + -0.008127975277602673, + 0.02043791301548481, + 0.012586564756929874, + -0.023985257372260094, + 0.011170880869030952, + 0.05490247905254364, + 0.03094976767897606, + 0.03778410330414772, + 0.036189425736665726, + 0.005142022389918566, + -0.06743209064006805, + 0.045464590191841125, + 0.002538466826081276, + -0.07478713989257812, + -0.011268514208495617, + -0.040615469217300415, + -0.041233811527490616, + -0.023903895169496536, + -0.008534780703485012, + 0.05844982713460922, + -0.005646461620926857, + 0.022065134719014168, + 0.020177556201815605, + -0.016874294728040695, + 0.019754478707909584, + -0.0037344752345234156, + 0.01785062812268734, + -0.001143123721703887, + -0.016036275774240494, + 0.009088036604225636, + 0.03207255154848099, + 0.00228217919357121, + 0.06814806908369064, + 0.036059245467185974, + -0.017378734424710274, + -0.028964556753635406, + -0.029062191024422646, + -0.026084372773766518, + 0.010284044779837132, + 0.008502236567437649, + -0.006606522481888533, + 0.025205673649907112, + -0.020616905763745308, + 0.005430854391306639, + 0.029436452314257622, + 0.003647011937573552, + 0.02312282845377922, + 0.007241139188408852, + 0.02610064670443535, + -0.031242668628692627, + 0.026149462908506393, + -0.0007047906401567161, + 0.013448992744088173, + 0.000703265133779496, + 0.05324271321296692, + 0.048361048102378845, + 0.023350639268755913, + -0.05275454744696617, + -0.009291439317166805, + 0.039801858365535736, + 0.011284786276519299, + 0.02889946848154068, + -0.008412739261984825, + 0.03207255154848099, + -0.011065111495554447, + -0.05047643557190895, + -0.06479599326848984, + 0.05386105924844742, + -0.03501782566308975, + 0.02857402339577675, + -0.0004629956092685461, + -0.033081430941820145, + 0.018957139924168587, + 0.028248580172657967, + 0.003496493911370635, + -0.031633201986551285, + 0.039053335785865784, + 0.03488764539361, + -0.03778410330414772, + -0.004328411538153887, + 0.02229294553399086, + -0.01734619028866291, + -0.032153911888599396, + 0.01981956698000431, + -0.009494842030107975, + 0.0026361001655459404, + 0.003323601558804512, + 0.003644977929070592, + -0.018745601177215576, + -0.0009519250597804785, + -0.010357270017266273, + 0.009022947400808334, + 0.017102107405662537, + 0.06964511424303055, + -0.024294428527355194, + 0.03417166694998741, + -0.0012397399405017495, + -0.013912750408053398, + 0.05366579070687294, + 0.017720451578497887, + -0.016345448791980743, + 0.02588910609483719, + -0.005589508451521397, + 0.007468950469046831, + 0.059719059616327286, + 0.013302542269229889, + -0.00095751864137128, + -0.00239811884239316, + 0.012098398059606552, + -0.020828446373343468, + 0.0007978474604897201, + 0.03249562904238701, + 0.003911435604095459, + 0.0305592343211174, + -0.020812172442674637, + 0.013229317031800747, + -0.003242240520194173, + 0.012204167433083057, + -0.0239364393055439, + -0.007749646436423063, + 0.004926415625959635, + 0.027386151254177094, + 0.003728373209014535, + 0.007289955858141184, + -0.00339275854639709, + -0.011528870090842247, + 0.02640981785953045, + 0.013880206272006035, + -0.032267820090055466, + -0.025661295279860497, + -0.06499125808477402, + -0.031112490221858025, + 0.015596926212310791, + 0.01289573684334755, + -0.03664504736661911, + 0.018940867856144905, + -0.04022493585944176, + 0.04282849282026291, + 0.010031825862824917, + 0.009909783490002155, + -0.04012730345129967, + -0.0009280252270400524, + -0.001328220241703093, + 0.05298236012458801, + 0.008477828465402126, + 0.01120342593640089, + -0.04718944802880287, + 0.00023798126494511962, + -0.046180568635463715, + -0.03387876972556114, + 0.015873553231358528, + 0.01222857553511858, + 0.0030449398327618837, + 0.02227667346596718, + 0.02042163908481598, + 0.032235272228717804, + -0.009551795199513435, + -0.03671013563871384, + -0.005971905775368214, + 0.01580032892525196, + -0.0004146874416619539, + -0.01485653966665268, + -0.06489362567663193, + -0.022764839231967926, + 0.01284691970795393, + 0.023285550996661186, + 0.024912772700190544, + 0.009478569962084293, + 0.038955703377723694, + 0.015181983821094036, + -0.029761895537376404, + -0.012627244926989079, + 0.02847639098763466, + -0.020405367016792297, + 0.025726385414600372, + 0.01653257943689823, + 0.012334344908595085, + 0.028834380209445953, + 0.011447508819401264, + -0.017460094764828682, + -0.029778167605400085, + -0.017671633511781693, + -0.03374858945608139, + -0.025986740365624428, + -0.008429011330008507, + 0.006191581021994352, + -0.005597644951194525, + -0.026914257556200027, + -0.024343246594071388, + 0.020096195861697197, + 0.018615422770380974, + -0.004454520996659994, + -0.015580653212964535, + -0.0205355454236269, + 0.011829906143248081, + 0.02951781265437603, + -0.024099161848425865, + 0.008640550076961517, + -0.021202705800533295, + -0.039574045687913895, + 0.01993347331881523, + 0.042893581092357635, + -0.04357701167464256, + 0.013383903540670872, + -0.016548851504921913, + -0.01817607320845127, + 0.007013328373432159, + 0.04155925661325455, + -0.009079900570213795, + -0.040713101625442505, + 0.009226350113749504, + 0.04767761379480362, + 0.004230778198689222, + 0.01755772903561592, + -0.035343267023563385, + -0.04100600257515907, + -0.004613175056874752, + 0.02086099050939083, + 0.03872789070010185, + -0.008746320381760597, + 0.008534780703485012, + -0.035766348242759705, + 0.01641053706407547, + 0.011227834038436413, + -0.010511856526136398, + 0.018029622733592987, + -0.026051828637719154, + -0.02217903919517994, + 0.03449711203575134, + 0.039899490773677826, + -0.0009671802399680018, + 0.022748567163944244, + -0.010821028612554073, + -0.0028883195482194424, + -0.02601928450167179, + 0.017980806529521942, + -0.005308812949806452, + -0.010023689828813076, + -0.011626503430306911, + 0.01589796133339405, + 0.051452770829200745, + 0.03137284517288208, + 0.05626934766769409, + -0.04930483549833298, + 0.01177295297384262, + 0.021918684244155884, + 0.03976931422948837, + -0.0005893595516681671, + -0.010568808764219284, + -0.026295913383364677, + -0.027060706168413162, + -0.03531072288751602, + -0.014897219836711884, + -0.024847684428095818, + -0.03495273366570473, + 0.0156782865524292, + -0.012537747621536255, + 0.0041860295459628105, + -0.003207661909982562, + -0.026149462908506393, + -0.03107994608581066, + 0.01692311279475689, + -0.01222857553511858, + -0.022048862650990486, + -0.003724304959177971, + -0.0583847351372242, + 1.9990680812043138e-05, + 0.03827226907014847, + 0.0016221372643485665, + -0.01005623396486044, + -0.012204167433083057, + -0.006565841846168041, + -0.0012956757564097643, + 0.03449711203575134, + 0.03233290836215019, + -0.05005335807800293, + -0.010658306069672108, + -0.0355059914290905, + -0.07485222816467285, + 0.017574001103639603, + 0.019673118367791176, + -0.002131661167368293, + 0.0135791702196002, + -0.020991167053580284, + 0.03352078050374985, + -0.005312880966812372, + -0.012114670127630234, + -0.0029290001839399338, + -0.015971187502145767, + 0.037816647440195084, + -0.0010780347511172295, + -0.03446456789970398, + 0.003622603602707386, + -0.008876497857272625, + 0.02911100722849369, + 0.016068819910287857, + 0.026605084538459778, + -0.018452700227499008, + 0.021121345460414886, + -0.00635023508220911, + -0.016695300117135048, + -0.03278852999210358, + -0.016744118183851242, + 0.010910525918006897, + 0.008900905959308147, + 0.019982289522886276, + -0.0038809252437204123, + 0.057766392827034, + 0.04224269092082977, + -0.013082867488265038, + 0.06905931234359741, + -0.014823995530605316, + -0.010560672730207443, + 0.015548109076917171, + 0.03160065785050392, + 0.0118136340752244, + 0.0051664309576153755, + -0.00327478488907218, + 0.008640550076961517, + 0.03579889237880707, + -0.019900929182767868, + -0.0270281620323658, + 0.032560717314481735, + 0.008534780703485012, + -0.007672353181988001, + -0.01331881433725357, + -0.009063628502190113, + -0.0017970636254176497, + -0.015434203669428825, + -0.018420156091451645, + -0.00570341432467103, + -0.036059245467185974, + -0.021951228380203247, + -0.027402423322200775, + 0.04207997024059296, + -0.013603578321635723, + 0.03908587992191315, + 0.020405367016792297, + 0.0055122156627476215, + -0.004312139004468918, + 0.0183713398873806, + -0.020177556201815605, + -0.0590030811727047, + 0.011235970072448254, + 0.004983368329703808, + -0.022781113162636757, + 0.018110984936356544, + -0.045171692967414856, + 0.003311397507786751, + 0.027744140475988388, + 0.027744140475988388, + 0.06372202932834625, + -0.0030876542441546917, + 0.0036795565392822027, + 0.0008085260633379221, + 0.04409772530198097, + -0.0460178479552269, + 0.00804254598915577, + 0.01962430030107498, + 0.08415994048118591, + -0.03306515887379646, + -0.004523678217083216, + 0.00239811884239316, + 0.013530353084206581, + -0.015385386534035206, + 0.006858741864562035, + -0.028671657666563988, + 0.015580653212964535, + 0.0367426797747612, + 0.03540835902094841, + 0.03456220030784607, + -0.0028801835142076015, + -0.004967096261680126, + -0.005760367028415203, + 0.03127521276473999, + -0.019152406603097916, + -0.03156811371445656, + 0.008420875295996666, + -0.0355059914290905, + -0.017704179510474205, + 0.011724136769771576, + -0.013929023407399654, + -0.07700015604496002, + -0.0014136494137346745, + 0.031031129881739616, + 0.02889946848154068, + 0.027695324271917343, + 0.05148531496524811, + 0.00059952971059829, + 0.06479599326848984, + 0.025661295279860497, + 0.03879297897219658, + -0.017362462356686592, + -0.021088801324367523, + -0.009665700607001781, + 0.02126779593527317, + 0.032674625515937805, + 0.012139078229665756, + 0.03508291393518448, + -0.03335805609822273, + 0.0036958286073058844, + -0.008795136585831642, + 0.023985257372260094, + 0.031242668628692627, + 0.018908323720097542, + 0.009974872693419456, + 0.004198233596980572, + -0.006586182396858931, + 0.03384622558951378, + -0.0015997629379853606, + -0.0245547853410244, + 0.006093947682529688, + 0.017085833474993706, + 0.059588879346847534, + -0.009568067267537117, + -0.015954915434122086, + -0.021446790546178818, + 0.005178635008633137, + 0.0059068170376122, + 0.001152276759967208, + 0.0013211010955274105, + -0.0032117299269884825, + 0.006716359872370958, + 0.00763574056327343, + 0.0087219113484025, + 0.007045872509479523, + 0.0029574765358120203, + 0.015133167617022991, + -0.004373160190880299, + 0.016491897404193878, + -0.032251548022031784, + 0.005544759798794985, + 0.013025914318859577, + -0.003488357877358794, + 0.013009642250835896, + -0.01692311279475689, + -0.04172198101878166, + -0.018957139924168587, + 0.01570269465446472, + 0.025661295279860497, + -0.0038849932607263327, + 0.03148675337433815, + -0.04435807839035988, + -0.036905400454998016, + 0.025514846667647362, + 0.018908323720097542, + 0.027727868407964706, + 0.009120580740272999, + -0.010365406051278114, + -0.019347673282027245, + 0.028329940512776375, + 0.01991720125079155, + -0.04139653593301773, + -0.014775178395211697, + 0.031324028968811035, + -0.007908300496637821, + -0.007363181095570326, + -0.032446812838315964, + 0.024229340255260468, + -0.010430495254695415, + -0.011309195309877396, + 0.0017960466211661696, + -0.04735216870903969, + -0.033683501183986664, + -0.008754456415772438, + -0.002052334137260914, + -0.03531072288751602, + -0.012977098114788532, + -0.005459330976009369, + -0.016044411808252335, + -0.023985257372260094, + -0.02094235084950924, + 0.009079900570213795, + -0.049369923770427704, + 0.007106893230229616, + 0.015409795567393303, + -0.0279556792229414, + 0.009869103319942951, + -0.0060166544280946255, + 0.010463039390742779, + -0.018127257004380226, + 0.014742634259164333, + 0.022439396008849144, + -0.016858022660017014, + -0.01222857553511858, + -0.04904447868466377, + 5.418777436716482e-05, + 0.022585846483707428, + 0.03404149040579796, + 0.00655363779515028, + -0.028313668444752693, + -0.017915718257427216, + 0.0171346515417099, + -0.01119528990238905, + 0.0087219113484025, + -0.02302519604563713, + -0.0404527448117733, + 0.008437147364020348, + -0.027125796303153038, + 0.0076886252500116825, + 0.019445305690169334, + 0.01610136404633522, + -0.0043650236912071705, + 0.012464523315429688, + -0.0453995019197464, + -0.00805475004017353, + -0.05076933652162552, + -0.005630189087241888, + 0.058059293776750565, + -0.05210365727543831, + -0.010145731270313263, + 0.019949745386838913, + 0.041429080069065094, + -0.02424561232328415, + -0.026670172810554504, + 0.0056342571042478085, + 3.775664299610071e-05, + 0.024294428527355194, + -0.017915718257427216, + -0.01512503158301115, + 0.03544090315699577, + 0.05799420177936554, + -0.002804924501106143, + -0.006329894997179508, + 0.00500370841473341, + -0.0011126132449135184, + 0.044130269438028336, + 0.017574001103639603, + 0.004312139004468918, + -0.0037019308656454086, + 0.04269831255078316, + -0.01939648948609829, + -0.045659858733415604, + 0.030201246961951256, + 0.027532601729035378, + 0.002918829908594489, + -0.027386151254177094, + -0.010576944798231125, + -0.030217519029974937, + 0.0011461747344583273, + -0.018599150702357292, + 0.02165832929313183, + -0.0484912246465683, + -0.007001123856753111, + -0.008990403264760971, + -0.0011227834038436413, + 0.002215056447312236, + 0.013017778284847736, + 0.01315609272569418, + 0.003488357877358794, + -0.003533106530085206, + 0.013660531491041183, + -0.019949745386838913, + -0.010365406051278114, + 0.05438176915049553, + -0.015865417197346687, + -0.0205355454236269, + 0.02291128970682621, + 0.04533441364765167, + -0.05171312391757965, + 0.023920167237520218, + -0.027402423322200775, + -0.05633443593978882, + 0.0226997509598732, + 0.02230921760201454, + -0.015662014484405518, + -0.023985257372260094, + -0.012456386350095272, + -0.013473400846123695, + 0.00025832155370153487, + 0.05818947032094002, + 0.022764839231967926, + 0.03950895741581917, + -0.024017801508307457, + 0.00068038230529055, + -0.028818106278777122, + -0.010951206088066101, + -0.008420875295996666, + -0.00032137639936991036, + 0.01383139006793499, + -0.014474142342805862, + -0.002455071546137333, + 0.013587306253612041, + 0.010764075443148613, + -0.00394601421430707, + 0.02230921760201454, + -0.018957139924168587, + -0.006732632406055927, + -0.015613198280334473, + 0.038434989750385284, + 0.003915503621101379, + 0.0020930147729814053, + -0.017622817307710648, + -0.03345569223165512, + -0.001235671923495829, + 0.021235251799225807, + 0.00295544252730906, + -0.0423077791929245, + -0.0009488739888183773, + 0.014539231546223164, + -0.00459283497184515, + 0.02457105740904808, + 0.03615688160061836, + -0.02878556214272976, + -0.003998898901045322, + -0.012936417013406754, + -0.033276695758104324, + -0.02147933468222618, + 0.028248580172657967, + 0.0019689390901476145, + 0.019754478707909584, + -0.0355059914290905, + -0.020291462540626526, + 0.03335805609822273, + -0.0183713398873806, + -0.021137617528438568, + -0.0012377059319987893, + -0.0734853595495224, + -0.01949412375688553, + 0.02518940158188343, + -0.022455668076872826, + -0.01817607320845127, + 0.027581417933106422, + 0.007330636493861675, + 0.018208617344498634, + -0.0028089925181120634, + 0.007106893230229616, + -0.021902412176132202, + -0.025238217785954475, + 0.012326208874583244, + -0.00591088505461812, + -0.0008105601300485432, + -0.01383139006793499, + 0.01569455862045288, + -0.023594724014401436, + -0.01846897229552269, + -0.0325932614505291, + 0.022146495059132576, + -0.025140585377812386, + -0.02963171899318695, + 0.021544422954320908, + 0.017899446189403534, + -0.00763980858027935, + -0.048458680510520935, + -0.003620569594204426, + -0.006301418412476778, + -0.0012834715889766812, + 0.008762592449784279, + -0.004853190388530493, + 0.01135801151394844, + 0.011984492652118206, + -0.01724855601787567, + 0.002158103510737419, + 0.006008518394082785, + -0.010576944798231125, + -0.013294406235218048, + -0.00042994265095330775, + -0.0017167195910587907, + 0.00015878130216151476, + 0.01310727559030056, + 0.02302519604563713, + -0.014230059459805489, + 0.02889946848154068, + -0.03116130642592907, + 0.031633201986551285, + -0.0002227260556537658, + -0.030217519029974937, + -0.02343200147151947, + 0.011471916921436787, + 0.011919403448700905, + 0.03986694663763046, + 0.02022637240588665, + 0.011244106106460094, + -0.009006675332784653, + 0.03181219473481178, + 0.005068797618150711, + -0.008278493769466877, + -0.024294428527355194, + 0.009112444706261158, + 0.007188254501670599, + 0.03446456789970398, + -0.001998432446271181, + -0.0069970558397471905, + -0.009413480758666992, + -0.0034130988642573357, + -0.0010210820473730564, + 0.024001529440283775, + 0.0003335805668029934, + 0.00719639053568244, + -0.04234032332897186, + -0.018452700227499008, + 0.08318360149860382, + 0.015360978431999683, + 0.02878556214272976, + -0.010788483545184135, + -0.024701233953237534, + -0.02416425198316574, + -0.055488280951976776, + 0.011447508819401264, + 0.007180118467658758, + -0.014343964867293835, + 0.05298236012458801, + -0.021528150886297226, + -0.013066595420241356, + -0.0283950287848711, + 0.014417190104722977, + -0.013457128778100014, + 0.00435688765719533, + 0.0398344025015831, + 0.001339407404884696, + 0.0029920549131929874, + -0.03151929751038551, + -0.006797721143811941, + -0.04357701167464256, + 0.003887027269229293, + -0.023659812286496162, + 0.03361841291189194, + 0.029241185635328293, + -0.012765559367835522, + -0.03651486709713936, + -0.02509176731109619, + -0.007696761749684811, + -0.01599559560418129, + 0.022455668076872826, + 0.006586182396858931, + -0.019656846299767494, + -0.013603578321635723, + 0.024082889780402184, + 0.0042714583687484264, + 0.022016318514943123, + 0.024310700595378876, + -0.006866878364235163, + -0.008909041993319988, + 0.010227092541754246, + 0.0021723418030887842, + -0.05373087897896767, + 0.022439396008849144, + -0.018289979547262192, + -0.008591733872890472, + 0.000796321895904839, + 0.008909041993319988, + 0.01817607320845127, + -0.02631218545138836, + 0.02588910609483719, + -0.011056975461542606, + 0.013920886442065239, + 0.03430184721946716, + -0.013920886442065239, + -0.0056342571042478085, + 0.009551795199513435, + 0.003748713294044137, + 0.007131301797926426, + 0.01991720125079155, + -0.01527148112654686, + 0.005133886355906725, + -0.029696807265281677, + 0.01222857553511858, + 0.012090262025594711, + -0.012863192707300186, + -0.020307734608650208, + 0.043511923402547836, + -0.028118401765823364, + 0.006301418412476778, + 0.016638347879052162, + 0.014897219836711884, + -0.01785062812268734, + -0.012008900754153728, + 0.04982554540038109, + -0.00766014913097024, + -0.013546626083552837, + -0.022943833842873573, + 0.005406446289271116, + 0.009462297894060612, + -0.023903895169496536, + 0.020909806713461876, + 0.03954150155186653, + 0.015605062246322632, + 0.00048613265971653163, + 0.0171346515417099, + 0.026263367384672165, + 0.012041444890201092, + 0.026979345828294754, + 0.015409795567393303, + -0.02940390631556511, + -0.04159180074930191, + -0.02891574054956436, + 0.005605780985206366, + -0.009348392486572266, + 0.015011126175522804, + 0.019217494875192642, + -0.0015306059503927827, + 0.00047469124547205865, + 0.005386105738580227, + 0.025221945717930794, + 0.0301198847591877, + -0.04468352347612381, + 0.010642034001648426, + 0.010755939409136772, + -0.004763693083077669, + -0.024017801508307457, + 0.0131154116243124, + -0.0023126897867769003, + -0.0010678645921871066, + 0.008608005940914154, + 0.014425326138734818, + -0.016028139740228653, + -0.047221992164850235, + 0.004426044877618551, + -0.005178635008633137, + -0.024798868224024773, + 0.023269278928637505, + 0.0236272681504488, + -0.01663021184504032, + -0.0007892028079368174, + -0.0007098757196217775, + -0.010698986239731312, + -0.00938907265663147, + 0.019526667892932892, + -0.018631694838404655, + 0.006228193175047636, + 0.014042928814888, + -0.04048529267311096, + 0.013627986423671246, + -0.03220272809267044, + -0.029680535197257996, + 0.004771829582750797, + -0.013196772895753384, + 0.007517767138779163, + 0.0008441215613856912, + -0.029355090111494064, + 0.004133144859224558, + 0.01827370561659336, + -0.036059245467185974, + -0.01588982529938221, + -0.0028313668444752693, + 0.014880947768688202, + -0.02590538002550602, + 0.004405704326927662, + 0.035245634615421295, + -0.004885734990239143, + 0.004975232295691967, + -0.011040703393518925, + 0.0118136340752244, + -0.03459474816918373, + -0.02437579073011875, + 0.010438631288707256, + 0.005341357085853815, + 0.034627292305231094, + 0.00959247536957264, + 0.010511856526136398, + 0.002898489823564887, + 0.006541433744132519, + -0.00980401411652565, + -0.0245547853410244, + -0.019250039011240005, + -0.0248639564961195, + -0.00790016446262598, + -0.001995381433516741, + 0.0016556987538933754, + 0.002733733505010605, + -0.009543659165501595, + -0.0012153316056355834, + 0.012033308856189251, + -0.038662802428007126, + 0.015499292872846127, + 0.07036109268665314, + -0.017508912831544876, + -0.0009676887420937419, + 0.013058459386229515, + -0.011504461988806725, + 0.019022228196263313, + 0.006911626551300287, + -0.013538490049540997, + -0.012505203485488892, + -0.006150900386273861, + 0.01807844080030918, + -0.025417212396860123, + -0.020926078781485558, + 0.024815140292048454, + 0.0257914736866951, + 0.008445283398032188, + -0.0077618504874408245, + -0.02291128970682621, + 0.00722893513739109, + -0.021316612139344215, + 0.04396754503250122, + 0.028346212580800056, + -0.0040294090285897255, + -0.015596926212310791, + 0.01680920645594597, + 0.03397640213370323, + -0.006423459853976965, + 0.023171646520495415, + 0.02920863963663578, + -0.00020060599490534514, + -0.007871688343584538, + 0.024017801508307457, + -0.01491349283605814, + 0.003323601558804512, + 0.010609489865601063, + -0.026605084538459778, + 0.016361720860004425, + 0.012366889975965023, + -0.006329894997179508, + -0.009511114098131657, + -0.029159823432564735, + 0.01026777271181345, + 0.019429033622145653, + -0.014929764904081821, + -0.013326950371265411, + 0.03221900016069412, + -0.024326972663402557, + 0.019884657114744186, + 0.03810954466462135, + 0.020991167053580284, + -0.02652372419834137, + -0.02032400667667389, + 0.01558879017829895, + 0.025108039379119873, + 0.049369923770427704, + -0.01641053706407547, + 0.00251405849121511, + -0.030477873980998993, + 0.01962430030107498, + 0.002328961854800582, + -0.033781133592128754, + -0.004857258405536413, + 0.0012478760909289122, + -0.009071764536201954, + -0.011569550260901451, + 0.04025747999548912, + -0.0046538556925952435, + 0.01931512914597988, + 8.784457895671949e-05, + 0.00851850863546133, + 0.005914953071624041, + -0.00013043203216511756, + 0.026653900742530823, + -0.039801858365535736, + -0.015653878450393677, + -0.00012598260946106166, + -0.03589652478694916, + -0.021332884207367897, + -0.01182177010923624, + -0.01972193457186222, + -0.008388331159949303, + 0.012358753010630608, + 0.0007073332089930773, + -0.0010454903822392225, + 0.013937159441411495, + -0.031210124492645264, + -0.02291128970682621, + 0.04002966731786728, + -0.0033663162030279636, + -0.019380217418074608, + 0.0416894368827343, + 0.02312282845377922, + -0.013937159441411495, + 0.01619899831712246, + 0.00456842640414834, + -0.016020003706216812, + -0.007753714453428984, + 0.04204742610454559, + -0.013180500827729702, + 0.012318072840571404, + -0.02074708417057991, + 0.017069561406970024, + 0.012139078229665756, + 0.035961613059043884, + 0.0063624391332268715, + 0.0171346515417099, + 0.017167195677757263, + -0.0018438462866470218, + 0.013147956691682339, + 0.01047117542475462, + -0.015173847787082195, + -0.013400175608694553, + -0.014327692799270153, + 0.011862450279295444, + 0.014295147731900215, + -0.013766300864517689, + -0.03311397507786751, + 0.01609322801232338, + 0.000692077970597893, + 0.025661295279860497, + -0.022976379841566086, + 0.04943501204252243, + 0.033585868775844574, + -0.01732991822063923, + -0.005402378272265196, + -0.03384622558951378, + -0.017997078597545624, + 0.040713101625442505, + -0.02590538002550602, + 0.02509176731109619, + 0.0152796171605587, + -0.01295269001275301, + -0.0035473445896059275, + -0.0015407761093229055, + 0.027272246778011322, + 0.003567684907466173, + 0.012684198096394539, + 0.01270047016441822, + -0.0279556792229414, + 0.04263322427868843, + -0.009267031215131283, + -0.01619086228311062, + -0.024082889780402184, + -0.015963051468133926, + -0.002505922457203269, + -0.02571011334657669, + -0.011048839427530766, + -0.003929741680622101, + 0.04790542647242546, + 0.027402423322200775, + -0.012358753010630608, + 0.001383138936944306, + -0.00024853277136571705, + 0.026035556569695473, + 0.00924262311309576, + 0.015743376687169075, + 0.005304744932800531, + -0.0013668667525053024, + -0.020258918404579163, + -0.026897985488176346, + 0.023253006860613823, + -0.011325467377901077, + 0.012879464775323868, + 0.01577592082321644, + -0.004682332277297974, + 0.04614802449941635, + 0.009690108709037304, + 0.04653855785727501, + -0.017199739813804626, + -0.004426044877618551, + 0.018322523683309555, + -0.020405367016792297, + -0.022846201434731483, + -0.018094712868332863, + -0.008648687042295933, + -0.01619086228311062, + 0.021804779767990112, + 0.012554019689559937, + 0.016760390251874924, + 0.003937878180295229, + -0.013196772895753384, + -0.022520756348967552, + 0.008331377990543842, + -0.009559931233525276, + 0.015100623480975628, + -0.0019292754586786032, + 0.0014329726109281182, + -0.027809228748083115, + -0.03291870653629303, + -0.017362462356686592, + -0.008144247345626354, + 0.017118379473686218, + -0.025368396192789078, + -0.0010770177468657494, + -0.021023713052272797, + 0.046603646129369736, + -0.017411278560757637, + -0.009462297894060612, + 0.0005944446311332285, + -0.004332479555159807, + -0.023594724014401436, + 0.041526712477207184, + -0.016792934387922287, + 0.009421616792678833, + -0.016223406419157982, + 0.03853262588381767, + 0.007505563087761402, + 0.031193852424621582, + -0.034529656171798706, + -0.03264208137989044, + -0.018713057041168213, + -0.019445305690169334, + 0.008290697820484638, + -0.007212663069367409, + 0.022878745570778847, + -0.006940103136003017, + 0.015181983821094036, + -0.03589652478694916, + 0.026361001655459404, + 0.02271602302789688, + -0.007505563087761402, + -0.001532639958895743, + 0.026165734976530075, + -0.011992628686130047, + -0.008245948702096939, + 0.030787046998739243, + 0.004340615589171648, + 0.00025921143242157996, + 0.011642775498330593, + 0.01621527038514614, + -0.01755772903561592, + 0.018322523683309555, + -0.005353561602532864, + -0.02663762867450714, + 0.02073081210255623, + 0.002802890492603183, + -0.00722486712038517, + 0.023301823064684868, + 0.008648687042295933, + -0.014701953157782555, + 0.010764075443148613, + 0.0016445115907117724, + 0.025108039379119873, + 0.03046160191297531, + -0.017704179510474205, + -0.023187918588519096, + -0.023187918588519096, + 0.050834424793720245, + 0.0038219382986426353, + -0.028443846851587296, + 0.004047715570777655, + -0.005272200331091881, + 0.010048097930848598, + -0.04510660097002983, + 0.004507405683398247, + 0.01672784611582756, + 0.0017919786041602492, + -0.022667206823825836, + -0.0001021463394863531, + -0.027125796303153038, + -0.029176095500588417, + -0.01910359039902687, + -0.01175668090581894, + 0.014335828833281994, + -0.020372822880744934, + ], + "index": 52, + }, + { + "title": "Vichitravirya", + "text": "In the epic Mahabharata, Vichitravirya (Sanskrit: \u0935\u093f\u091a\u093f\u0924\u094d\u0930\u0935\u0940\u0930\u094d\u092f, vicitrav\u012brya) is the younger son of queen Satyavat\u012b and king \u015aa\u1e45tanu and grandfather of the Pandavas and Kaurava. His elder brother, Chitr\u0101ngada, had initially succeeded their father to the throne of Hastinapura, but when he died childless, Vichitravirya succeeded him.Vichitravirya was still a child when he was crowned king, hence Bhishma ruled as his regent.", + "vector": [ + 0.024954576045274734, + 0.006638835649937391, + -0.016168976202607155, + 0.04166955128312111, + 0.028987513855099678, + 0.0384928360581398, + -0.022299041971564293, + -0.06968916207551956, + -0.02660497836768627, + -0.00312552647665143, + 0.02460712380707264, + 0.014853619039058685, + -0.056088853627443314, + -0.02274576760828495, + 0.04789888858795166, + 0.04554117098450661, + -0.02485530450940132, + 0.02573634497821331, + -0.04896606504917145, + -0.017856605350971222, + -0.04616162180900574, + 0.018278513103723526, + -0.029831327497959137, + -0.030278053134679794, + -0.01458062045276165, + -0.02026395872235298, + -0.042488548904657364, + -0.021827498450875282, + -0.015151435509324074, + 0.004439333453774452, + 0.021666180342435837, + 0.03583730384707451, + 0.005785713903605938, + -0.01870042085647583, + -0.01290540024638176, + -0.045069627463817596, + -0.05653557926416397, + -0.0038374951109290123, + -0.029409421607851982, + -0.053607046604156494, + -0.01946978084743023, + -0.006086633540689945, + 0.014766755513846874, + -0.0003139098989777267, + 0.018067559227347374, + 0.0192464180290699, + -0.017335426062345505, + 0.0012789064785465598, + -0.009617004543542862, + -0.035266488790512085, + 0.05020697042346001, + -0.007004902232438326, + 0.03414967283606529, + 0.0699373409152031, + -0.007433013990521431, + -0.014791573397815228, + 0.006725698709487915, + 0.0010950976284220815, + 0.03181677311658859, + 0.005608885549008846, + -0.010057525709271431, + -0.01585875079035759, + 0.012179471552371979, + 0.02387499064207077, + -0.002492665546014905, + -0.011496974155306816, + -0.02133113704621792, + 0.00226930296048522, + -0.003403178881853819, + -0.0027641132473945618, + 0.03988264873623848, + -0.0025655687786638737, + -0.010932362638413906, + 0.0019559746142476797, + -0.0006530256359837949, + -0.002917675068601966, + 0.015548525378108025, + 0.060655377805233, + -0.020003369078040123, + 0.06025829166173935, + 0.007830102927982807, + 0.014295211993157864, + -0.018985828384757042, + 0.091727614402771, + 0.03943592309951782, + -0.041247643530368805, + 0.00946189183741808, + -0.04174400493502617, + -0.01383607741445303, + 0.023093219846487045, + 0.050877057015895844, + -0.04067682847380638, + 0.007979012094438076, + -0.010926158167421818, + -0.0029409420676529408, + 0.03139486536383629, + 0.038443200290203094, + 0.006818766705691814, + -0.042637456208467484, + 0.0054413634352386, + 0.031196322292089462, + -0.04626089334487915, + -0.007439218461513519, + 0.0032914974726736546, + -1.229997451446252e-06, + -0.026009343564510345, + -0.030575869604945183, + 0.0018706625560298562, + 0.03583730384707451, + 0.03864174708724022, + -0.026183070614933968, + -0.02248517796397209, + 0.014382075518369675, + 0.035961393266916275, + -0.003921255934983492, + -0.00030596036231145263, + 0.014977709390223026, + -0.005038069561123848, + -0.030054690316319466, + -0.052068326622247696, + 0.014816392213106155, + -0.0010997509816661477, + -0.020971274003386497, + -0.04005637764930725, + 0.0027051703073084354, + -0.01775733381509781, + -0.027423974126577377, + 0.019817234948277473, + 0.02274576760828495, + 0.054847948253154755, + -0.045764531940221786, + -0.045144081115722656, + -0.032933589071035385, + 0.05514576658606529, + 0.003958483226597309, + 0.015809115022420883, + 0.0042687091045081615, + -0.021753044798970222, + 0.00907721184194088, + 0.008276828564703465, + 0.009858980774879456, + 0.0466579832136631, + -0.019420145079493523, + 0.012365606613457203, + 0.01775733381509781, + -0.020499730482697487, + -0.015287934802472591, + 0.011292224749922752, + 0.04516889899969101, + -0.007681194692850113, + -0.02453266829252243, + 0.011726541444659233, + -0.006719494238495827, + 0.05186977982521057, + 0.0025407506618648767, + 0.00771842198446393, + 0.03017878159880638, + -0.0416199155151844, + 0.04216591268777847, + -0.00585086178034544, + -0.016243431717157364, + 0.031196322292089462, + -0.06581754237413406, + -0.013612715527415276, + 0.061151739209890366, + -0.026530524715781212, + -0.01625584065914154, + -0.008810416795313358, + -0.03477012366056442, + 0.010373956523835659, + -0.004845729563385248, + -0.023068401962518692, + 0.024693986400961876, + 0.04569007828831673, + -0.01190026756376028, + 0.017658062279224396, + -0.04276154562830925, + -0.021492455154657364, + -0.010981999337673187, + -0.003521064529195428, + -0.034323401749134064, + -0.06517226994037628, + -0.0707811564207077, + 0.03434821963310242, + 0.05737939476966858, + 0.05504649505019188, + 0.0567341223359108, + -0.009120643138885498, + -0.097137950360775, + 0.022410722449421883, + -0.01975518837571144, + 0.014543392695486546, + 0.01129842922091484, + 0.008531213738024235, + -0.01190026756376028, + -0.02479325793683529, + 0.04487108439207077, + -0.0041291075758636, + 0.05996047332882881, + -0.009288164786994457, + 0.014444120228290558, + -0.04159509763121605, + -0.01990409754216671, + 0.01935810036957264, + -8.61361768329516e-05, + 0.035489849746227264, + -0.020760321989655495, + -0.03305767849087715, + 0.011602451093494892, + 0.009827958419919014, + -0.028441516682505608, + 0.030749596655368805, + 0.013550669886171818, + -0.001997855259105563, + -0.006793948356062174, + -0.0018489466747269034, + -0.004501378629356623, + -0.028168516233563423, + -0.05410340800881386, + 0.00016936397878453135, + -0.005432056728750467, + 0.018613558262586594, + 0.02023914083838463, + 0.0041229031048715115, + -0.022038452327251434, + -0.01909751072525978, + -0.05802466347813606, + -0.02551298215985298, + -0.05693266913294792, + 0.025860436260700226, + 0.03000505454838276, + 0.06358391046524048, + 0.03970892354846001, + -0.02675388753414154, + -0.025785982608795166, + -0.0016472998540848494, + 0.02248517796397209, + -0.05047996714711189, + 0.014890845865011215, + -0.019854461774230003, + 0.03194086626172066, + 0.005357602145522833, + -0.0165164303034544, + 0.003257372649386525, + 0.03506794199347496, + 0.015238299034535885, + -0.009064802899956703, + -0.04804779589176178, + 0.0009205955429933965, + -0.02729988470673561, + 0.05271359533071518, + 0.021715817973017693, + 0.004147720988839865, + 0.01698797382414341, + -0.027721792459487915, + 0.06105246767401695, + -0.01659088395535946, + 0.020512141287326813, + 0.02792033553123474, + 0.016466794535517693, + -0.016057295724749565, + -0.06110210344195366, + -0.00674431212246418, + 0.03764902055263519, + 0.0037940635811537504, + -0.022770585492253304, + 0.007761853281408548, + 0.013637533411383629, + -0.012204289436340332, + 0.011447337456047535, + 0.03792202100157738, + -0.013972577638924122, + -0.023701263591647148, + -0.04578934982419014, + 0.007606740575283766, + -0.048320796340703964, + -0.013550669886171818, + 0.061151739209890366, + 0.007811489515006542, + 0.02876415103673935, + 0.06899425387382507, + 0.020313596352934837, + -0.023031175136566162, + -0.022336268797516823, + -0.0074950591661036015, + 0.03551466763019562, + 0.04035419225692749, + 0.04129727929830551, + 0.02259685844182968, + -0.0334547683596611, + 0.03864174708724022, + -0.035713210701942444, + 0.015771888196468353, + -0.03663147985935211, + -0.016566066071391106, + -0.005965644959360361, + -0.022373495623469353, + -0.009536346420645714, + -0.03079923242330551, + -0.07375932484865189, + 0.05370631814002991, + 0.0014254882698878646, + -0.00915166549384594, + 0.006471313536167145, + -0.08135365694761276, + -0.01851428486406803, + 0.008841440081596375, + 0.045292988419532776, + -0.006477518007159233, + -0.009058598428964615, + -0.0322386808693409, + -0.015908386558294296, + 0.015734661370515823, + 0.04104910045862198, + 0.06700880825519562, + 0.021715817973017693, + 0.006207621656358242, + 0.0076005361042916775, + -0.03742565959692001, + 0.056088853627443314, + -0.01862596720457077, + -0.026257524266839027, + 0.036284029483795166, + -0.008264419622719288, + 0.03888992592692375, + 0.007110379170626402, + -0.01325285341590643, + 0.02485530450940132, + -0.004302834160625935, + -0.027696972712874413, + 0.01208640355616808, + 0.006589199416339397, + -0.019879279658198357, + -0.001563538797199726, + 0.04169436916708946, + 0.00017837992345448583, + 0.036432936787605286, + 0.012508310377597809, + -0.02161654457449913, + -0.017744924873113632, + -0.019953733310103416, + 0.039311833679676056, + 0.03794683888554573, + 0.017074836418032646, + 0.033876676112413406, + 0.021641362458467484, + -0.01290540024638176, + 0.011881654150784016, + -0.006936652585864067, + -0.02146763727068901, + 0.0004719312419183552, + 0.029111603274941444, + 0.006148678716272116, + -0.024309305474162102, + -0.01208640355616808, + 0.021480046212673187, + 0.013513443060219288, + -0.008829031139612198, + 0.03640811890363693, + -0.015846341848373413, + -0.011317042633891106, + 0.005515817552804947, + -0.0583224818110466, + 0.02321731112897396, + 0.0161441583186388, + -0.05792539194226265, + -0.0020862696692347527, + -0.030898505821824074, + 0.023937035351991653, + 0.018563920632004738, + 0.009703868068754673, + 0.007867330685257912, + 0.028168516233563423, + 0.026034163311123848, + 0.019668325781822205, + 0.011720336973667145, + 0.03412485495209694, + 0.004585139453411102, + 0.025761162862181664, + 0.001969934906810522, + 0.0007759527070447803, + -0.025202756747603416, + -0.013662351295351982, + 0.03365331143140793, + -0.009598391130566597, + -0.031990502029657364, + 0.026803523302078247, + 0.004141516517847776, + 0.003150344593450427, + -0.017434699460864067, + 0.00954875536262989, + 0.014456530101597309, + 0.02033841423690319, + -0.032064955681562424, + 0.017372652888298035, + -0.00834507867693901, + 0.03779793158173561, + -0.036507390439510345, + 0.04834561422467232, + -0.027101339772343636, + 0.0029083683621138334, + 0.029111603274941444, + -0.0007018862525001168, + -0.021492455154657364, + -0.011838222853839397, + 0.04308418184518814, + -0.04611198604106903, + 0.020685866475105286, + 0.024706395342946053, + -0.011720336973667145, + 0.0015930102672427893, + 0.0361599363386631, + 0.022472769021987915, + -0.00503186509013176, + 0.014121485874056816, + -0.005401033908128738, + 0.032610952854156494, + 0.05479831248521805, + 0.02285744808614254, + -0.014506165869534016, + -0.0040360395796597, + 0.010342933237552643, + 0.021169818937778473, + 0.028788968920707703, + -0.04564044252038002, + 0.00043896972783841193, + -0.01345139741897583, + 0.02729988470673561, + 0.040776100009679794, + -0.030923323705792427, + 0.003303906414657831, + -0.024073533713817596, + 0.025934889912605286, + 0.028714515268802643, + -0.02063623070716858, + -0.06834898144006729, + -0.00794798880815506, + 0.020499730482697487, + 0.016566066071391106, + -0.015809115022420883, + 0.02953351102769375, + 0.0057577937841415405, + -0.006638835649937391, + -0.06214446574449539, + -0.026183070614933968, + 0.011273611336946487, + 0.027275066822767258, + -0.019221600145101547, + 0.02365162782371044, + 0.020152278244495392, + 0.005798123311251402, + -0.028242971748113632, + -0.04472217336297035, + -0.028242971748113632, + -0.03290877118706703, + 0.04636016860604286, + 0.009772117249667645, + -0.0033163155894726515, + -0.016206204891204834, + 0.013128762133419514, + 0.012167061679065228, + -0.0005715913139283657, + -0.031767137348651886, + -0.025438528507947922, + 0.0014076502993702888, + 0.005469283554702997, + 0.03576285019516945, + -0.018539102748036385, + -0.008084488101303577, + 0.013699578121304512, + 0.015647796913981438, + 0.021628953516483307, + -0.04112355411052704, + 0.0069986977614462376, + 0.02690279483795166, + -0.031072232872247696, + 0.014890845865011215, + 0.0007767282659187913, + 0.023539945483207703, + -0.004557219333946705, + -0.0015829280018806458, + -0.007743239868432283, + -0.06586717814207077, + 0.0392870157957077, + -0.011658291332423687, + -0.0023778819013386965, + -0.07480168342590332, + 0.00550340861082077, + -0.028391879051923752, + 0.034869398921728134, + -0.012291152030229568, + -0.01753397099673748, + 0.060456834733486176, + -0.045367445796728134, + -0.0404534637928009, + 0.018712829798460007, + -0.06820007413625717, + 0.007420605048537254, + 0.014419302344322205, + -0.022696131840348244, + 0.04305936396121979, + -0.011397701688110828, + 0.011037839576601982, + -0.027821063995361328, + -0.009430869482457638, + 0.013004671782255173, + -0.02485530450940132, + 0.020735502243041992, + -0.014779164455831051, + -0.04283599928021431, + 0.020077824592590332, + 0.033628493547439575, + 0.011745154857635498, + -0.011676904745399952, + 0.028863422572612762, + -0.02059900388121605, + 0.05097632855176926, + -0.004597548861056566, + -0.003449712647125125, + -0.009492914192378521, + -0.015647796913981438, + 0.023142855614423752, + -0.014630256220698357, + -0.011348065920174122, + -0.015325162559747696, + 0.03263577073812485, + -0.012551742605865002, + 0.001286662183701992, + -0.03623439371585846, + 0.0036203369963914156, + 0.015027345158159733, + -0.007743239868432283, + -0.03397594764828682, + -0.013302489183843136, + 0.006496131420135498, + 0.01100681722164154, + 0.04509444534778595, + -0.02208808809518814, + 0.018675602972507477, + 0.0021777863148599863, + 0.002779624657705426, + -0.018824510276317596, + 0.004523094277828932, + 0.0188493300229311, + -0.006012178957462311, + -0.027275066822767258, + -0.04655871167778969, + 0.02566189132630825, + -0.014419302344322205, + -0.03834392875432968, + 0.025934889912605286, + -0.03385185822844505, + 0.005680237431079149, + 0.026083799079060555, + -0.006309995893388987, + 0.03824465721845627, + 0.014568210579454899, + -0.00498533109202981, + 0.04658352956175804, + -0.01195610873401165, + -0.019184373319149017, + -0.007687399163842201, + 0.026853159070014954, + 0.031370047479867935, + -0.013426579535007477, + 0.0431586354970932, + 0.01644197665154934, + -0.006688471883535385, + 0.0326605886220932, + 0.02660497836768627, + 0.0357876680791378, + 0.025128303095698357, + -0.001009009894914925, + -0.05172087252140045, + 0.015523706562817097, + 0.003297701943665743, + -0.0022088089026510715, + -0.0020862696692347527, + 0.0052055916748940945, + 0.028416696935892105, + 0.07048333436250687, + -0.0019637304358184338, + 0.02784588187932968, + 0.009108234196901321, + -0.016069704666733742, + -0.03481976315379143, + -0.014853619039058685, + 0.04519371688365936, + 0.006949061527848244, + -0.02041286788880825, + -0.01764565333724022, + -0.002069207141175866, + 0.018563920632004738, + 0.009858980774879456, + 0.0400315560400486, + -0.020934047177433968, + -0.009567368775606155, + 0.059662654995918274, + -0.005897395312786102, + -0.028342243283987045, + -0.01325285341590643, + 0.04725361987948418, + -0.002115741139277816, + 0.018898965790867805, + 6.858901906525716e-05, + -0.008438145741820335, + -0.031767137348651886, + -0.052614323794841766, + 0.028193335980176926, + -0.002546955132856965, + -0.04229000210762024, + -0.018650785088539124, + -0.03047659806907177, + 0.03576285019516945, + 0.04554117098450661, + 0.045764531940221786, + 0.002669494366273284, + -0.007011106703430414, + 0.0020040597300976515, + 0.008090692572295666, + 0.002069207141175866, + 0.006967674940824509, + -0.0025857333093881607, + 0.012793718837201595, + -0.018563920632004738, + -0.02628234401345253, + -0.03970892354846001, + 0.011931289918720722, + -0.021417999640107155, + 0.02729988470673561, + 0.0004889936535619199, + 0.04472217336297035, + 0.011192952282726765, + 0.01796828769147396, + 0.007544695399701595, + -0.05762757360935211, + -0.005338988732546568, + -0.007172424346208572, + 0.01862596720457077, + -0.00021328034927137196, + -0.0031643048860132694, + -0.014456530101597309, + -0.0006173496367409825, + -0.03747529536485672, + -0.0384928360581398, + -0.026331979781389236, + 0.01764565333724022, + -0.007612945046275854, + -0.022174950689077377, + 0.01851428486406803, + -0.03164304792881012, + 0.005553044844418764, + -0.01113711204379797, + -0.03251168131828308, + 0.02063623070716858, + -0.0003474530822131783, + -0.025364074856042862, + 0.01862596720457077, + -0.02103332057595253, + 0.0014324684161692858, + 0.019296053797006607, + -0.026853159070014954, + -0.009300574660301208, + 0.02358958125114441, + -0.004085675813257694, + -0.017918651923537254, + 0.011019226163625717, + -0.001861355733126402, + 0.0016721179708838463, + 0.014828801155090332, + 0.026803523302078247, + -0.004234584514051676, + -0.01593320444226265, + -0.02595970779657364, + 0.014084258116781712, + 0.0012750286841765046, + -0.01956905424594879, + 0.004591344390064478, + -0.05549322068691254, + 0.02125668339431286, + 0.037673842161893845, + 0.021628953516483307, + 0.006812562234699726, + 0.00136034085880965, + 0.05062887817621231, + -0.016714975237846375, + 0.044672537595033646, + 0.0010508904233574867, + 0.016863882541656494, + 0.003204634180292487, + 0.015995251014828682, + 0.05186977982521057, + 0.014903254806995392, + -0.009071007370948792, + 0.01734783500432968, + 0.03710302338004112, + 0.014928072690963745, + 0.029483875259757042, + 0.008537418209016323, + 0.016938338056206703, + 0.0221625417470932, + -0.007737035397440195, + 0.014568210579454899, + 0.022249406203627586, + -0.012483492493629456, + -0.023639218881726265, + -0.013352124951779842, + 0.0024290692526847124, + -0.002545404015108943, + -0.010038912296295166, + 0.012278743088245392, + -0.0025655687786638737, + 0.022286633029580116, + -0.024904940277338028, + -0.03437303751707077, + -0.008010034449398518, + -0.005543737672269344, + -0.02595970779657364, + 0.029210876673460007, + 0.01920919120311737, + 0.032536499202251434, + 0.04159509763121605, + -0.012880581431090832, + 0.03132041171193123, + 0.02628234401345253, + -0.012868172489106655, + 0.002596591366454959, + -0.015846341848373413, + 4.5734093873761594e-05, + 0.002345308195799589, + -0.008456760086119175, + -0.0074950591661036015, + 0.022336268797516823, + 0.01388571411371231, + 0.020896820351481438, + -0.016901109367609024, + -0.015871159732341766, + -0.007662581279873848, + 0.03263577073812485, + -0.018898965790867805, + -0.011751359328627586, + -0.009319188073277473, + 0.015064572915434837, + -0.004771275445818901, + -0.021566908806562424, + 0.0031829182989895344, + 0.015374798327684402, + 0.0059160091914236546, + -0.015833932906389236, + 0.04603753238916397, + 0.042811181396245956, + -0.021492455154657364, + 0.01570984348654747, + -0.06586717814207077, + 0.027002068236470222, + -0.008773189969360828, + -0.02067345753312111, + -0.024545077234506607, + -0.005131137557327747, + 0.013165989890694618, + -0.014779164455831051, + 0.06035756319761276, + 0.021306319162249565, + -0.0031301798298954964, + 0.03948555886745453, + -0.04896606504917145, + 0.008065874688327312, + -0.008953121490776539, + -0.0023282459005713463, + -0.005484794732183218, + -0.025289619341492653, + 0.003353542648255825, + 0.048395249992609024, + -0.018787283450365067, + 0.021008502691984177, + -0.01721133664250374, + 0.0104049788787961, + -0.003750631818547845, + -0.017695289105176926, + -0.012669628486037254, + -0.007985216565430164, + -0.027026886120438576, + -0.0036451551131904125, + -0.0020878207869827747, + -0.035489849746227264, + -0.028118880465626717, + 0.023974262177944183, + 0.033876676112413406, + 0.021641362458467484, + 0.020003369078040123, + 0.026108616963028908, + 0.05549322068691254, + 0.014208348467946053, + 0.009182688780128956, + 0.06358391046524048, + 0.02744879201054573, + 0.019085101783275604, + 0.027399156242609024, + 0.002588835544884205, + -0.007364764343947172, + 0.015734661370515823, + -0.0017962083220481873, + 0.00851260032504797, + 0.03109705075621605, + -0.022075679153203964, + -0.06120137870311737, + 0.027275066822767258, + 0.01935810036957264, + 0.03680520877242088, + -0.023167675361037254, + 0.021318728104233742, + -0.00387782440520823, + -0.01290540024638176, + -0.02464435063302517, + -0.03414967283606529, + -0.02806924469769001, + -0.02242313139140606, + -0.02504143863916397, + 0.02960796467959881, + 0.015176254324615002, + -0.017223745584487915, + 0.03062550723552704, + 0.038219839334487915, + -0.04229000210762024, + -0.019159555435180664, + -0.035961393266916275, + 0.04911497235298157, + -0.0038126769941300154, + 0.024433396756649017, + -0.0017946572043001652, + -0.007904557511210442, + -0.0011276713339611888, + 0.0032790882978588343, + -0.0021715816110372543, + -0.03678039088845253, + 0.044275447726249695, + -0.02252240478992462, + -0.03007950820028782, + -0.00756330881267786, + 0.02752324752509594, + -0.028019608929753304, + -0.007135197054594755, + -0.01870042085647583, + -8.759035699767992e-05, + -0.046856530010700226, + -0.06472554057836533, + -0.02893787808716297, + 0.018427422270178795, + 0.028317425400018692, + -0.007426809519529343, + 0.03102259524166584, + 0.013860896229743958, + 0.03583730384707451, + -0.0008794905734248459, + -0.01975518837571144, + 0.022373495623469353, + 0.05842175334692001, + -0.013476215302944183, + -0.002596591366454959, + -0.02620788849890232, + 0.02023914083838463, + 0.0031798160634934902, + -0.014257985167205334, + 0.02963278442621231, + 0.014382075518369675, + -0.01500252727419138, + 0.05767720937728882, + -0.0011610205983743072, + 0.045144081115722656, + 0.01567261479794979, + -0.00997066218405962, + 0.007885944098234177, + 0.05926556885242462, + 0.01621861383318901, + 0.02259685844182968, + -0.016069704666733742, + 0.013898123055696487, + 0.032685406506061554, + -0.01742229051887989, + 0.01297985389828682, + -0.00756330881267786, + -0.037202298641204834, + -0.03233795240521431, + 0.022038452327251434, + 0.017943469807505608, + -0.009337801486253738, + -0.0008182209567166865, + 0.009573573246598244, + 0.0018799692625179887, + -0.0544012226164341, + -0.0053513976745307446, + 0.04564044252038002, + -0.022398313507437706, + -0.045590806752443314, + 0.02643125131726265, + -0.013674760237336159, + -0.02658016048371792, + 0.01255794707685709, + -0.03817020356655121, + -0.002466296311467886, + 0.007197242230176926, + 0.020177096128463745, + -0.019916506484150887, + -0.020474912598729134, + 0.00030731759034097195, + -0.009952048771083355, + 0.04884197562932968, + 0.011292224749922752, + -0.003069685772061348, + 0.011118498630821705, + -0.04794852435588837, + 0.029583146795630455, + -0.005360704381018877, + -0.012384220026433468, + 0.041942548006772995, + 0.026257524266839027, + -0.0431586354970932, + -0.014977709390223026, + -0.008990348316729069, + -0.010653159581124783, + -0.009809345006942749, + 0.040230102837085724, + -0.010504251345992088, + 0.0015573343262076378, + 0.057429030537605286, + -0.026530524715781212, + 0.027572883293032646, + -0.026654614135622978, + -0.006868402939289808, + -0.022137723863124847, + -0.02660497836768627, + -0.028168516233563423, + 0.007284105289727449, + -0.02581080049276352, + 0.04951206222176552, + -0.05390486121177673, + -0.05216759815812111, + -0.02496698498725891, + 0.011583837680518627, + -0.05040551349520683, + 0.011503178626298904, + -0.010324319824576378, + 0.011875449679791927, + -0.014630256220698357, + -0.031121868640184402, + -0.02438376098871231, + 0.014133894816040993, + -0.0009717828361317515, + -0.06388173252344131, + 0.02846633456647396, + -0.008711145259439945, + 0.026331979781389236, + -0.011925085447728634, + -0.002115741139277816, + -0.010764840990304947, + -0.004945001564919949, + 0.013848486356437206, + -0.05405377224087715, + -0.02201363444328308, + 6.199671770446002e-05, + -0.0025578129570931196, + -0.029111603274941444, + 0.034397855401039124, + -0.006483722478151321, + -0.038145385682582855, + 0.0025795288383960724, + -0.01691352017223835, + 0.002367024077102542, + 0.015412026084959507, + -0.009703868068754673, + -0.0014704710338264704, + 0.03263577073812485, + 0.03864174708724022, + 0.012533129192888737, + -0.01531275361776352, + 0.028863422572612762, + -0.03521684929728508, + 0.010795863345265388, + 0.042190730571746826, + 0.015188663266599178, + 0.025438528507947922, + 0.0035644962918013334, + -0.009027575142681599, + -0.01018782053142786, + -0.005438261199742556, + 0.032387591898441315, + -0.011565223336219788, + -0.007333741523325443, + -0.022584449499845505, + 0.010727613233029842, + -0.02321731112897396, + 0.029409421607851982, + -0.03561393916606903, + -0.026406433433294296, + 0.01954423449933529, + -0.014890845865011215, + 0.02252240478992462, + 0.044746991246938705, + -0.02180268056690693, + -0.02150486409664154, + -0.03613511845469475, + -0.024197624996304512, + -0.0244954414665699, + -0.016640519723296165, + 0.022956721484661102, + -0.0001691700890660286, + -0.03896437957882881, + 0.04323308914899826, + 0.03156859427690506, + 0.031370047479867935, + 0.014853619039058685, + -0.01028088852763176, + -0.014555801637470722, + -0.01836537756025791, + 0.019159555435180664, + -0.018539102748036385, + -0.03278467804193497, + 0.020189505070447922, + 0.002467847429215908, + 0.05787575617432594, + -0.003477632999420166, + -0.007178628817200661, + -0.03181677311658859, + 0.013848486356437206, + -0.015548525378108025, + 0.007606740575283766, + -0.015598161146044731, + 0.002804442774504423, + 0.06815043836832047, + -0.012334584258496761, + 0.010194025002419949, + -0.013736805878579617, + 0.03896437957882881, + 0.006508540827780962, + 0.015374798327684402, + -0.013215625658631325, + 0.01800551451742649, + -0.03980819508433342, + -0.007774262689054012, + 0.01275649107992649, + 0.019221600145101547, + -0.024619532749056816, + -0.015560934320092201, + -0.011075066402554512, + 0.030600689351558685, + -0.005416545085608959, + -0.011583837680518627, + 0.023750899359583855, + 0.003072788007557392, + 0.0010943220695480704, + 0.035018306225538254, + 0.010367751121520996, + 0.00920130219310522, + 0.022063270211219788, + -0.03675557300448418, + -0.04531780630350113, + -0.01618138514459133, + 0.016317885369062424, + 0.014530983753502369, + -0.015225890092551708, + 0.02125668339431286, + -0.036830026656389236, + -0.004547912627458572, + -0.035489849746227264, + -0.0028944083023816347, + 0.017037609592080116, + 0.00838230550289154, + -0.0016736690886318684, + 0.016851473599672318, + -0.012992262840270996, + -0.0024725007824599743, + -0.011800995096564293, + 0.016714975237846375, + 0.014096667990088463, + -0.020909229293465614, + 0.008667713031172752, + 0.010522864758968353, + 0.0213931817561388, + 0.011794790625572205, + 0.0074640363454818726, + 0.0186631940305233, + -0.01148456521332264, + 0.010045116767287254, + -0.035489849746227264, + 0.012588969431817532, + 0.04067682847380638, + -0.017149291932582855, + -0.010237456299364567, + 0.0061641898937523365, + 0.018712829798460007, + 0.0023902910761535168, + -0.011894063092768192, + -0.0022243200801312923, + 0.005242818500846624, + 0.004305936396121979, + 0.02729988470673561, + -0.023428265005350113, + -0.030228417366743088, + -0.020115051418542862, + 0.01534998044371605, + 0.0002497319073881954, + -0.0001959270884981379, + -0.017509153112769127, + -0.026629796251654625, + 0.01396016776561737, + 0.030749596655368805, + 0.00958598218858242, + 0.03839356452226639, + -0.012806127779185772, + 0.0028432209510356188, + 0.0005390176083892584, + 0.007575717754662037, + -0.04752661660313606, + 0.024073533713817596, + -0.00800382997840643, + -0.024818075820803642, + -0.03154377639293671, + 0.009002757258713245, + -0.003421792294830084, + 0.03342995047569275, + -0.009399846196174622, + -0.034646034240722656, + -0.0012409038608893752, + 0.018898965790867805, + -0.009492914192378521, + -0.00756330881267786, + -0.003704098053276539, + 0.00664504012092948, + 0.007097969762980938, + 0.026480887085199356, + -0.005115625914186239, + -0.0005397931672632694, + -0.005320375319570303, + 0.008754576556384563, + -0.0002497319073881954, + 0.03164304792881012, + 0.016243431717157364, + 0.0047991955652832985, + -0.041322097182273865, + -0.0024554384872317314, + 0.0081651471555233, + 0.0014223860343918204, + 0.0003175938327331096, + -0.008264419622719288, + 0.010895135812461376, + -0.00025089524569921196, + -0.027101339772343636, + 0.02643125131726265, + -0.04057755693793297, + 0.013017081655561924, + -0.01760842464864254, + 0.030972959473729134, + -0.0014223860343918204, + 0.00550340861082077, + 0.007457831874489784, + 0.01982964389026165, + 0.042960092425346375, + -0.005869475193321705, + 0.002846323186531663, + 0.035961393266916275, + 0.019780006259679794, + 0.01461784727871418, + 0.03007950820028782, + -0.00266639213077724, + 0.009890003129839897, + 0.01534998044371605, + -0.03951037675142288, + -0.011546609923243523, + -0.03630884736776352, + -0.023713672533631325, + 0.021492455154657364, + -0.003874722169712186, + 0.013004671782255173, + 0.010256070643663406, + 0.0024600918404757977, + -0.011751359328627586, + -0.04757625237107277, + -0.026108616963028908, + 0.009325392544269562, + 0.006018383428454399, + -0.010082343593239784, + -0.0080720791593194, + -0.00035307591315358877, + -0.008661508560180664, + 0.010814476758241653, + 0.013649942353367805, + 0.020288778468966484, + -0.026232706382870674, + 0.04859379306435585, + -0.0034838374704122543, + 0.0050287628546357155, + 0.0038126769941300154, + -0.002038184553384781, + -0.028317425400018692, + -0.03511757776141167, + 0.013674760237336159, + -0.028044426813721657, + -0.023018766194581985, + -0.030650325119495392, + -0.010498046875, + -0.002092474140226841, + -0.012167061679065228, + 0.021343545988202095, + 0.015014936216175556, + -0.0008127919863909483, + -0.0035365759395062923, + -0.006986288819462061, + -0.012080199085175991, + 0.034397855401039124, + -0.03630884736776352, + -0.011050248518586159, + -0.019817234948277473, + -0.01702520065009594, + -0.01836537756025791, + 0.01035534217953682, + -0.015871159732341766, + 0.020983682945370674, + -0.03335549682378769, + 0.054550133645534515, + 0.01702520065009594, + -0.019444962963461876, + -0.04129727929830551, + 0.011813404969871044, + 0.029732055962085724, + 0.018874147906899452, + -0.04348127171397209, + -0.0431586354970932, + 0.02165377140045166, + 0.015697432681918144, + -0.011335656978189945, + -0.0021855419036000967, + -0.003375258529558778, + -0.023266946896910667, + 0.023664036765694618, + -0.021591726690530777, + -0.02398667111992836, + -0.0007701359572820365, + -0.043803904205560684, + 0.008376101031899452, + 0.01975518837571144, + 0.018750056624412537, + 0.00851260032504797, + -0.01954423449933529, + -0.049660973250865936, + 0.046062350273132324, + 0.020077824592590332, + -0.00664504012092948, + 0.010981999337673187, + 0.014903254806995392, + -0.021591726690530777, + 0.026530524715781212, + -0.03132041171193123, + -0.003100708359852433, + 0.000883368426002562, + 0.025761162862181664, + -0.006061815191060305, + -0.01337694376707077, + 0.006638835649937391, + -0.0015712945023551583, + -0.00794798880815506, + -0.010833090171217918, + -0.0451192632317543, + -0.010677977465093136, + -0.00574228260666132, + 0.0068932208232581615, + -0.014543392695486546, + -0.029260512441396713, + 0.010851703584194183, + 0.008115511387586594, + -0.026952430605888367, + 0.006818766705691814, + -0.03236277028918266, + -0.04129727929830551, + -0.0069986977614462376, + 0.01126120239496231, + 0.03841838240623474, + 0.03740084171295166, + -0.013649942353367805, + 0.0020211220253258944, + 0.0011966966558247805, + -0.012440061196684837, + -0.020326005294919014, + -4.1080704249907285e-05, + -0.01815442368388176, + -0.016814246773719788, + -0.028193335980176926, + 0.004979126621037722, + -0.01811719685792923, + 0.002542301779612899, + 0.025835618376731873, + -0.03127077594399452, + 0.014568210579454899, + 0.017658062279224396, + 0.02931014820933342, + 0.00012777431402355433, + 0.01500252727419138, + -0.0008058119565248489, + 0.004504480864852667, + -0.008177556097507477, + -0.009281960316002369, + 0.0022848141379654408, + 0.03998192027211189, + 0.00028540787752717733, + 0.0030371120665222406, + -0.05216759815812111, + -0.03757456690073013, + -0.010504251345992088, + 0.02227422408759594, + 0.019345691427588463, + 0.017583606764674187, + -0.025388892740011215, + -0.028242971748113632, + 0.004532401449978352, + 0.008779394440352917, + 0.008655304089188576, + 0.03459639847278595, + 0.022584449499845505, + 0.005807430017739534, + -0.004501378629356623, + -0.04730325564742088, + -0.025066258385777473, + -0.03913810849189758, + 0.007060742937028408, + 0.034199308604002, + -0.020388050004839897, + 0.04400245100259781, + -0.029558328911662102, + 0.001083464128896594, + 0.0073895822279155254, + -0.007135197054594755, + 0.006477518007159233, + -0.006055610720068216, + -0.007712217513471842, + -0.019457371905446053, + -0.034571580588817596, + -0.009592186659574509, + -0.008394714444875717, + -0.0018287820275872946, + 0.00929437018930912, + -0.015337571501731873, + -0.01234078872948885, + 0.022348677739501, + 1.4372187251865398e-05, + 0.012446265667676926, + 0.014741937629878521, + 0.0011013020994141698, + 0.018985828384757042, + -0.041024282574653625, + -0.002574875485152006, + -0.0009663538658060133, + -0.0056119877845048904, + 0.007172424346208572, + -0.004808502271771431, + 0.017360243946313858, + 0.021058138459920883, + -0.02541371062397957, + 0.023750899359583855, + 0.007203446701169014, + -0.019234009087085724, + 0.008742167614400387, + 0.003066583536565304, + 0.002748602069914341, + -0.01135427039116621, + 0.018129605799913406, + -0.032610952854156494, + -0.008965530432760715, + -0.005211796145886183, + -0.018563920632004738, + 0.006458904594182968, + -0.003220145357772708, + -0.00017973716603592038, + 0.020747913047671318, + 0.0066946763545274734, + -0.013004671782255173, + -0.02868969738483429, + -0.034025583416223526, + 0.006887016352266073, + -0.018601149320602417, + -0.013116353191435337, + -0.008276828564703465, + -0.012992262840270996, + -0.03236277028918266, + -0.04298491030931473, + -0.008183760568499565, + 0.005943929310888052, + -0.029583146795630455, + -0.010876522399485111, + -0.02133113704621792, + 0.02581080049276352, + 0.007557104341685772, + -0.011664495803415775, + 0.022944312542676926, + 0.0031084641814231873, + -0.00046805341844446957, + -0.026480887085199356, + -0.010944771580398083, + -0.000793015118688345, + 0.0030603790655732155, + -0.024408578872680664, + -0.019482189789414406, + -0.04812224954366684, + -0.005767100490629673, + 0.004197357222437859, + -0.009530141018331051, + -0.015213481150567532, + 0.015449252910912037, + 0.007240673992782831, + -0.008431941270828247, + 0.011348065920174122, + 0.01702520065009594, + 0.022696131840348244, + -0.012129834853112698, + 0.03318176791071892, + 0.020040597766637802, + 0.010380160994827747, + 0.0061828033067286015, + -0.006607812829315662, + 0.013749214820563793, + 0.012570356018841267, + 0.07083079218864441, + 0.017707698047161102, + 0.005304863676428795, + -0.0010400324827060103, + 0.0004951981827616692, + -0.0357876680791378, + -0.026877976953983307, + 0.0161441583186388, + 0.007315128110349178, + -0.027548065409064293, + 0.013054308481514454, + 0.023539945483207703, + -0.055642127990722656, + -0.0039864033460617065, + 0.005236614029854536, + -0.014332439750432968, + 0.01640474796295166, + 0.025364074856042862, + -0.0042283800430595875, + 0.015498888678848743, + -0.020934047177433968, + -0.03958483412861824, + -0.0061828033067286015, + 0.003626541467383504, + 0.020313596352934837, + 0.0080720791593194, + -0.0039864033460617065, + 0.05559249222278595, + 0.001687629264779389, + -0.005801225546747446, + -0.0322386808693409, + -0.002287916373461485, + 0.012167061679065228, + -0.02690279483795166, + -0.015064572915434837, + -0.03072477877140045, + 0.0020536959636956453, + 0.018216468393802643, + 0.010932362638413906, + 0.009008961729705334, + -0.010119570419192314, + 0.03819502145051956, + -0.000743378943298012, + -0.00898414384573698, + 0.009399846196174622, + -0.00595013378188014, + 0.018104786053299904, + 0.030972959473729134, + -0.00794798880815506, + -0.03668111562728882, + 0.02658016048371792, + 0.013165989890694618, + -0.04943760856986046, + -0.02697724848985672, + 0.014047031290829182, + 0.023130446672439575, + -0.012073994614183903, + 0.013600305654108524, + -0.03983301296830177, + 0.03613511845469475, + 0.02402389794588089, + -0.009071007370948792, + 0.0010159900411963463, + 0.0388651080429554, + 0.013314898125827312, + -0.01644197665154934, + -0.04695580154657364, + 0.0025516084861010313, + 0.03685484454035759, + -0.02161654457449913, + -0.005109421443194151, + 0.023204902186989784, + -0.006095940247178078, + 0.03072477877140045, + -0.0027346417773514986, + 0.008642895147204399, + 0.003027805360034108, + -0.038691382855176926, + 0.02970723807811737, + 0.04859379306435585, + -0.003378360765054822, + -0.004094982519745827, + -0.02705170400440693, + -0.0373263880610466, + -0.012892991304397583, + -0.01091995369642973, + 0.02092163823544979, + 0.015263116918504238, + 0.020040597766637802, + -0.005813634488731623, + -0.000541732064448297, + -0.013550669886171818, + -0.021939178928732872, + 0.049189429730176926, + -0.042885635048151016, + 0.012446265667676926, + -0.014940482564270496, + 0.020760321989655495, + -0.00059136823983863, + -0.0020738604944199324, + -0.027945155277848244, + 0.035638757050037384, + 0.014481347985565662, + 0.026034163311123848, + 0.0023747796658426523, + -0.03568839281797409, + -0.013786441646516323, + -0.0006072673131711781, + 0.017372652888298035, + 0.011019226163625717, + -0.03648257255554199, + 0.003933665342628956, + 0.004119800869375467, + -0.00987759418785572, + -0.007575717754662037, + 0.024942167103290558, + 0.020251549780368805, + ], + "index": 53, + }, + { + "title": "Fletcher, Ohio", + "text": "Fletcher is a village in Miami County, Ohio, United States. The population was 473 at the 2010 census. It is part of the Dayton Metropolitan Statistical Area.", + "vector": [ + -0.013839196413755417, + 0.03106866590678692, + -0.011130952276289463, + 0.0069328416138887405, + -0.0027645283844321966, + 0.023427309468388557, + 0.00399946141988039, + -0.012918790802359581, + -0.0694476068019867, + -0.005926354322582483, + -0.027082446962594986, + 0.02484433725476265, + -0.03151893615722656, + 0.014024602249264717, + -0.027572447434067726, + 0.0046980432234704494, + -0.06748760491609573, + 0.00636669248342514, + -0.05188705399632454, + -0.01826244220137596, + -0.02399677038192749, + 0.0037809479981660843, + 0.00016916182357817888, + -0.04216650873422623, + 0.02728109620511532, + -0.001883852295577526, + 0.018169740214943886, + -0.009396086446940899, + -0.018606767058372498, + -0.019560281187295914, + 0.007932706736028194, + 0.024288121610879898, + 0.01258108764886856, + -0.01873919926583767, + 0.05331732705235481, + 0.02638055384159088, + -0.013316088356077671, + -0.011223654262721539, + 0.052469756454229355, + 0.02436758019030094, + -0.033611368387937546, + -0.030989205464720726, + -0.0013830919051542878, + 0.030803799629211426, + 0.022434065118432045, + -0.009031896479427814, + 0.020434334874153137, + -0.012044736184179783, + -0.03567731752991676, + -0.03414110094308853, + -0.02802271768450737, + -0.005853516515344381, + -0.01997082121670246, + 0.0038968264125287533, + 0.011746763251721859, + -1.9295828678878024e-05, + 0.06076003238558769, + 0.08968329429626465, + -0.06038922071456909, + -0.021480552852153778, + -0.06219030171632767, + -0.005078786518424749, + 0.01899082027375698, + -0.011336222290992737, + 0.026777852326631546, + 0.03673677518963814, + 0.007840003818273544, + 0.013441898860037327, + -0.019136495888233185, + -0.0016852036351338029, + -0.017295684665441513, + 0.029082177206873894, + -0.017547305673360825, + 0.012389061041176319, + 0.0031965894158929586, + 0.019878119230270386, + -0.0071248686872422695, + -0.03845839947462082, + 0.016209738329052925, + -0.05376759544014931, + 0.01114419475197792, + -0.017851902171969414, + -0.028314068913459778, + -0.014302710071206093, + 0.026645420119166374, + -0.04047137126326561, + -0.03456488251686096, + -0.05196651443839073, + -0.04182218387722969, + 0.011150816455483437, + -0.03218109905719757, + 0.05758165195584297, + -0.012673790566623211, + -0.013309466652572155, + 0.010693924501538277, + -0.008442572318017483, + 0.04632489010691643, + 0.0015875346725806594, + 0.0036286506801843643, + -0.012203655205667019, + -0.020977308973670006, + -0.012150682508945465, + -0.04547732323408127, + 0.038988128304481506, + 0.015295954421162605, + 0.004400069825351238, + -0.018302172422409058, + 0.01613027974963188, + 0.07336760312318802, + -0.027254609391093254, + 0.007462571375072002, + 0.004926489200443029, + -0.0011811323929578066, + 0.03136001527309418, + 0.01783865876495838, + -0.020315146073698997, + -0.029638394713401794, + -0.05090705305337906, + 0.051993001252412796, + -0.007502301130443811, + 8.923674613470212e-05, + -0.006237570662051439, + 0.025546230375766754, + 0.02283136360347271, + 0.006237570662051439, + -0.03437947854399681, + 0.0023440553341060877, + 0.013839196413755417, + 0.002549325581640005, + 0.01624946855008602, + -0.03247245028614998, + 0.002991319168359041, + 0.009674194268882275, + 0.02344055287539959, + 0.0002632096002344042, + 0.018222711980342865, + 0.05684002861380577, + -0.02868488058447838, + 0.006277300417423248, + 0.008627977222204208, + -0.03792866691946983, + 0.043014075607061386, + 0.0028224678244441748, + 0.026327582076191902, + 0.004327232018113136, + 0.012018249370157719, + -0.012925412505865097, + -0.019004063680768013, + 0.027055960148572922, + -0.01586541347205639, + -0.04939732328057289, + -0.0029234474059194326, + 0.028949744999408722, + -0.029956232756376266, + -0.030247583985328674, + -0.03546542301774025, + 0.020791903138160706, + 0.02308298461139202, + 0.021507037803530693, + -0.011402438394725323, + 0.010581357404589653, + 0.017322171479463577, + 0.05779354274272919, + -0.01504433248192072, + -0.02521514892578125, + -0.006406422238796949, + -0.027519473806023598, + -0.0014037844957783818, + -0.010958789847791195, + 0.015507846139371395, + 0.04407353699207306, + -0.05194002762436867, + -0.013031357899308205, + 0.01960000954568386, + -0.02887028641998768, + 0.0015420109266415238, + 0.06250814348459244, + -0.022261904552578926, + 0.03469731658697128, + 0.005625070538371801, + -0.0003838473348878324, + 0.0074758147820830345, + 0.03430001810193062, + -0.029585421085357666, + -0.011031627655029297, + 0.014726494438946247, + -0.0035591234918683767, + -0.011720276437699795, + 0.046245429664850235, + -0.03607461228966713, + 0.017626766115427017, + 0.0061845979653298855, + 0.027545960620045662, + 0.014660278335213661, + 0.0067639900371432304, + -0.01513703539967537, + -0.0443384014070034, + -0.011720276437699795, + 0.03493569418787956, + 0.07983031123876572, + -0.02081838995218277, + 0.0065421657636761665, + -0.029082177206873894, + 0.02533433772623539, + 0.008588247932493687, + -0.013574331067502499, + 0.00415175873786211, + -0.02063298411667347, + 0.02093757875263691, + 0.05880003049969673, + 0.03308163955807686, + -0.06436219811439514, + 0.0030922989826649427, + 0.05315840616822243, + 0.0333465039730072, + 0.02533433772623539, + 0.01047541107982397, + -0.011322978883981705, + 0.004866894334554672, + 0.05019192025065422, + -0.016752712428569794, + -0.016196494922041893, + -0.0807308554649353, + -0.0022198997903615236, + 0.0050920299254357815, + 0.00651898980140686, + 0.02736055478453636, + -0.014752981252968311, + -0.0016703049186617136, + 0.03864380344748497, + -0.016103792935609818, + 0.010177438147366047, + -0.018725955858826637, + 0.01093230303376913, + -0.036101099103689194, + 0.029294069856405258, + 0.02900271862745285, + 0.0030906435567885637, + -0.012918790802359581, + 0.036789748817682266, + -0.0032810152042657137, + -0.0008649497758597136, + 0.004688110668212175, + -0.024764878675341606, + 0.014766223728656769, + 0.025122445076704025, + -0.03406164050102234, + 0.016408387571573257, + -0.048867594450712204, + -0.02357298508286476, + 0.03747839853167534, + -0.013878926634788513, + 0.04854975640773773, + -0.0018722645472735167, + 0.03027407079935074, + 0.02095082215964794, + -0.023467039689421654, + 0.00263375137001276, + -0.00048296479508280754, + -0.0405508317053318, + 0.0038935155607759953, + -0.04592759162187576, + 0.03957083076238632, + 0.016871901229023933, + 0.003065812401473522, + -0.01598460227251053, + -0.01303797960281372, + -0.011918925680220127, + -0.006273990031331778, + -0.05848219245672226, + 0.012885682284832, + -0.013157169334590435, + 0.017481090500950813, + -0.004714597016572952, + 0.039464887231588364, + -0.022500282153487206, + 0.024248391389846802, + -0.02704271674156189, + 0.03631299361586571, + -0.05472110956907272, + 0.018156496807932854, + 0.023030012845993042, + -0.01562703587114811, + -0.01434244029223919, + -0.018328659236431122, + -0.017414873465895653, + 0.018116766586899757, + -0.021295147016644478, + 0.02325514703989029, + 0.01628919690847397, + -0.03644542396068573, + -0.02783731184899807, + 0.026645420119166374, + -0.023308120667934418, + -0.0005255914875306189, + -0.006088584195822477, + 0.02411595918238163, + 0.01691163145005703, + 0.008806761354207993, + -0.01569325104355812, + -0.024592716246843338, + -0.02137460559606552, + -0.024089472368359566, + -0.03779623657464981, + -0.010753518901765347, + -0.042828671634197235, + -0.010965411551296711, + -0.050271376967430115, + -0.02759893424808979, + -0.027731366455554962, + -0.019758928567171097, + 0.021904336288571358, + -0.03257839381694794, + -0.0017431428423151374, + 0.038855697959661484, + -0.03101569227874279, + 0.05514489486813545, + 0.0021106430795043707, + 0.048814620822668076, + -0.05774057283997536, + -0.01831541582942009, + 0.024764878675341606, + -0.011561357416212559, + -0.032022178173065186, + 0.04349083453416824, + -0.015110548585653305, + 0.015613792464137077, + 0.023056497797369957, + -0.0417427234351635, + -0.01468676421791315, + -0.01997082121670246, + 0.022354606539011, + 0.02058001048862934, + -0.03284326195716858, + 0.04645732045173645, + 0.019705956801772118, + -0.02448676899075508, + 0.02362595871090889, + 0.026089202612638474, + 0.023970283567905426, + -0.007641355507075787, + 0.02167920023202896, + 0.018288929015398026, + 0.038008127361536026, + 0.022632714360952377, + -0.007138112094253302, + 0.05832327529788017, + -0.010859465226531029, + 0.03008866496384144, + -0.014262980781495571, + 0.0004966218839399517, + 0.033611368387937546, + 0.012124195694923401, + -0.006717638578265905, + 0.020169470459222794, + -0.012534736655652523, + -0.02863190695643425, + 0.016752712428569794, + 0.04187515750527382, + -0.02453974261879921, + -0.013653790578246117, + 0.0019550349097698927, + 0.029294069856405258, + 0.01770622469484806, + 0.008680950850248337, + 0.022924065589904785, + 0.013296223245561123, + -0.022818120196461678, + 0.02924109622836113, + 0.004366961773484945, + -0.0020742241758853197, + 0.014554332010447979, + -0.012746628373861313, + -0.004694732371717691, + -0.03816704824566841, + 0.00441331323236227, + -0.02638055384159088, + -0.0293735284358263, + 0.014752981252968311, + -0.006313719786703587, + 0.044417861849069595, + 0.030115151777863503, + 0.046987053006887436, + -0.06457408517599106, + -0.03247245028614998, + 0.03864380344748497, + -0.00888622086495161, + -0.02455298602581024, + -0.06536868214607239, + 0.0021354740019887686, + -0.014210007153451443, + 0.00879351794719696, + 0.04168975353240967, + 0.02881731279194355, + -0.006704395636916161, + -0.021891092881560326, + -0.06838814169168472, + 0.00572439469397068, + -0.01508406177163124, + -0.0027032785583287477, + 0.0061481790617108345, + -0.010859465226531029, + -0.03284326195716858, + -0.021771904081106186, + 0.038431912660598755, + 0.011680547147989273, + -0.024208661168813705, + -0.03456488251686096, + -0.01697784662246704, + 0.03920001909136772, + -0.0504302978515625, + -0.008190950378775597, + 0.015574062243103981, + 0.009614599868655205, + 0.015799198299646378, + -0.02265920117497444, + 0.004916556645184755, + -0.002562568988651037, + -0.08888869732618332, + -0.019560281187295914, + -0.010740276426076889, + -0.026711635291576385, + -0.02692352794110775, + 0.026751365512609482, + 0.021771904081106186, + 0.044603265821933746, + -0.02136136218905449, + 0.04388813301920891, + -0.0356508307158947, + -0.009475545957684517, + -0.012839331291615963, + 0.015958117321133614, + -0.02722812257707119, + 0.02374514751136303, + 0.02497676946222782, + 0.041981104761362076, + -0.016103792935609818, + -0.00448946189135313, + -0.006588517222553492, + 0.022619470953941345, + -0.00018499165889807045, + -0.04815245792269707, + -0.03591569513082504, + -0.014951629564166069, + -0.009541762061417103, + -0.0070851389318704605, + -0.025042986497282982, + -0.016898388043045998, + 0.0383259654045105, + -0.0033521978184580803, + -0.0024946972262114286, + 0.03286974877119064, + -0.062243275344371796, + 0.04277569800615311, + -0.02185136266052723, + 0.0187524426728487, + 0.06076003238558769, + 0.009084870107471943, + -0.006684530526399612, + -0.03729299455881119, + 0.008760410360991955, + -0.03308163955807686, + 0.015216494910418987, + -0.020301902666687965, + -0.012885682284832, + -0.03157190978527069, + 0.03994164243340492, + -0.017679739743471146, + -0.027440015226602554, + -0.014766223728656769, + -0.05379408225417137, + 0.013011493720114231, + -0.05604543536901474, + 0.026486501097679138, + 0.024314606562256813, + 0.019573524594306946, + 0.023493526503443718, + 0.007919463329017162, + 0.03226055949926376, + 0.014951629564166069, + 0.017255954444408417, + -0.020897848531603813, + 0.1069524884223938, + -0.007654598448425531, + 0.02002379484474659, + -0.01428946666419506, + -0.03636596351861954, + 0.03027407079935074, + 0.021202443167567253, + -0.019255686551332474, + 0.02826109528541565, + -0.03533299267292023, + -0.0075552742928266525, + 0.021957308053970337, + -0.018169740214943886, + 0.04926488921046257, + -0.03045947477221489, + -0.0015055920230224729, + 0.03292271867394447, + -0.022579742595553398, + 0.015547575429081917, + 0.017136765643954277, + 0.03856434300541878, + -0.027002986520528793, + -0.014143791049718857, + 0.05037732422351837, + -0.04494759067893028, + -0.02337433584034443, + -0.022261904552578926, + -0.06266705691814423, + 0.004989394452422857, + 0.00014070954057388008, + -0.006161422003060579, + -0.008224057964980602, + 0.028605420142412186, + -0.021149471402168274, + 0.04717245697975159, + -0.013825953006744385, + 0.0059594628401100636, + 0.0017100346740335226, + -0.006164732854813337, + 0.01862001046538353, + 0.04462975263595581, + 0.0070454091764986515, + 0.004876826889812946, + -0.0017630077200010419, + 0.0067010847851634026, + 0.0051152054220438, + -0.015852170065045357, + -0.011104465462267399, + -0.015560818836092949, + -0.010707167908549309, + 0.03655137121677399, + 0.034882720559835434, + 0.032631367444992065, + 0.03864380344748497, + -0.013508114963769913, + 0.0027661838103085756, + 0.015905143693089485, + 0.0054959487169981, + 0.0026618933770805597, + -0.06881193071603775, + -0.0010139363585039973, + 0.004611962009221315, + -0.0004771708627231419, + 0.0016222981503233314, + 0.013309466652572155, + -0.06128976121544838, + 0.04410002380609512, + -0.010660816915333271, + 0.07077193260192871, + 0.024460284039378166, + -0.05477408319711685, + -0.021904336288571358, + -0.0037147316616028547, + 0.004751015920192003, + -0.03228704258799553, + 0.009290140122175217, + -0.022195687517523766, + 0.0010139363585039973, + -0.016395144164562225, + -0.011256762780249119, + -0.002051048446446657, + -0.013441898860037327, + -0.008707436732947826, + 0.021586498245596886, + -0.03644542396068573, + -0.013759736903011799, + -0.0013028047978878021, + 0.03591569513082504, + 0.04492110386490822, + -0.050085972994565964, + 0.01757379248738289, + -0.014157034456729889, + 0.022871093824505806, + 0.006406422238796949, + -0.002003041561692953, + -0.016011089086532593, + -0.016951359808444977, + 0.004515948239713907, + -0.013508114963769913, + 0.02863190695643425, + -0.0012779736425727606, + 0.00925040990114212, + 0.0069328416138887405, + 0.04653678089380264, + -0.03255191072821617, + 0.014183521270751953, + -0.003956420812755823, + 0.010488654486835003, + -0.02130839042365551, + 0.0013268081238493323, + -0.025811094790697098, + 0.00619784090667963, + -0.008111490868031979, + 0.018792172893881798, + -0.035571370273828506, + 0.07050706446170807, + -0.006244192365556955, + -0.0072374362498521805, + 0.002635406795889139, + 0.035200558602809906, + -0.022182444110512733, + 0.004628515802323818, + 0.0500594861805439, + -0.001296183094382286, + -0.011197168380022049, + 0.01403784565627575, + -0.013031357899308205, + 0.03252542391419411, + 0.012554600834846497, + -0.026844067499041557, + 0.06711678951978683, + 0.021811632439494133, + 0.021838119253516197, + 0.0022645958233624697, + -0.0333465039730072, + 0.04749029502272606, + 0.026301095262169838, + -0.026910284534096718, + 0.012753250077366829, + -0.03088326007127762, + -0.017732711508870125, + 0.06653408706188202, + 0.004217975307255983, + 0.04934434965252876, + 0.044179484248161316, + -0.0070917606353759766, + -0.022818120196461678, + -0.010587978176772594, + -0.0059495302848517895, + 0.04939732328057289, + -0.018024062737822533, + -0.008310139179229736, + -0.014541088603436947, + -0.02044757828116417, + 0.03694866970181465, + 0.00016129865252878517, + 0.00842932891100645, + -0.019931090995669365, + 0.030432989820837975, + 0.00036874174838885665, + 0.0024119268637150526, + -0.01753406412899494, + -0.002272872719913721, + 0.0014675176935270429, + 0.010462167672812939, + 0.0005342823569662869, + 0.025599202141165733, + 0.058588139712810516, + -0.006866625044494867, + -0.04195461794734001, + 0.02289757877588272, + 0.01654081977903843, + 0.01880541630089283, + -0.020235685631632805, + -0.028367042541503906, + -0.018765686079859734, + -0.004456353839486837, + -0.017732711508870125, + -0.03199569135904312, + -0.018527306616306305, + 0.025930283591151237, + -0.0016032609855756164, + -0.022871093824505806, + -0.0047377729788422585, + -0.037319477647542953, + 0.00036067163455300033, + 0.033002179116010666, + 0.0019169604638591409, + -0.026605689898133278, + 0.02863190695643425, + -0.0027214880101382732, + -0.02924109622836113, + 0.00983311329036951, + 0.013210142031311989, + 2.8141907023382373e-05, + -0.012985006906092167, + -0.02966487966477871, + 0.031095150858163834, + 0.03271082788705826, + 0.004178245551884174, + -0.019984064623713493, + -0.021321633830666542, + 0.03133352845907211, + -0.01777244172990322, + 0.0073632472194731236, + 0.015507846139371395, + 0.012673790566623211, + 0.011111087165772915, + -0.03567731752991676, + -0.0027827380690723658, + 0.038617316633462906, + -0.049238406121730804, + -0.07008328288793564, + 0.051675163209438324, + 0.018037306144833565, + -0.028843799605965614, + -0.0020278727170079947, + 0.013150547631084919, + 0.00596939492970705, + 0.034458938986063004, + -0.0018242577789351344, + 0.0049761515110731125, + -0.0061084493063390255, + -0.014726494438946247, + 0.0057939221151173115, + -0.007945950143039227, + -0.03596866875886917, + -0.040497858077287674, + -0.003645204706117511, + 0.03811407461762428, + 0.000960963370744139, + -0.04518596827983856, + -0.002130507957190275, + -0.017692983150482178, + 0.010733654722571373, + 0.01508406177163124, + -0.02088460512459278, + -0.015494602732360363, + 0.013276358135044575, + 0.011779870837926865, + 0.0022596295457333326, + -0.024089472368359566, + -0.017692983150482178, + 0.011428925208747387, + -0.037637315690517426, + -0.009482166729867458, + -0.005850205663591623, + 0.02430136501789093, + 0.0217983890324831, + -0.015269467607140541, + -0.04372921213507652, + -0.021891092881560326, + -0.036418937146663666, + -0.0005860138335265219, + 0.0017944604624062777, + -0.0039001372642815113, + 0.028287582099437714, + 0.013653790578246117, + 0.010799870826303959, + -0.022619470953941345, + 0.023215416818857193, + -0.004986083600670099, + -0.015269467607140541, + 0.005085408221930265, + -0.03377028927206993, + -0.01818298175930977, + 0.013614061288535595, + 0.035995155572891235, + -0.023414066061377525, + -0.012912169098854065, + -0.06113084405660629, + -0.04725191742181778, + -0.013031357899308205, + 0.012329465709626675, + 0.001921926741488278, + 0.018037306144833565, + 0.047092996537685394, + 0.04155731946229935, + 0.013018115423619747, + 0.003966353368014097, + 0.03776974976062775, + 0.004072299227118492, + 0.007462571375072002, + -0.04457677900791168, + -0.01606406271457672, + -0.006015746388584375, + -0.008753788657486439, + -0.0023506770376116037, + -0.018540550023317337, + -0.01826244220137596, + 0.02624812163412571, + -0.017414873465895653, + 0.03241947665810585, + 0.00014888310397509485, + 0.004257705062627792, + -0.006624936126172543, + -0.00949541013687849, + -0.019864875823259354, + -0.037266507744789124, + -0.005029124207794666, + -0.01746784709393978, + -0.004568921402096748, + -0.036604344844818115, + 0.0045027052983641624, + 0.011859330348670483, + 0.022023525089025497, + -0.0280756913125515, + 0.05201948806643486, + -0.014368926174938679, + 0.009932437911629677, + -0.04494759067893028, + -0.03718704730272293, + 0.04076272249221802, + -0.028525961562991142, + 0.0010503552621230483, + 0.0022232106421142817, + 0.03896164149045944, + -0.0065785846672952175, + 0.04854975640773773, + -0.0037081099580973387, + 0.00934311281889677, + 0.031174611300230026, + -0.004830475430935621, + -0.04280218482017517, + -0.005135070066899061, + -0.006283922120928764, + -0.006085273344069719, + 0.056310299783945084, + 0.013720007613301277, + -0.01770622469484806, + 0.04976813495159149, + 0.007654598448425531, + -0.022301632910966873, + -0.010018519125878811, + 0.01594487391412258, + -0.01636865735054016, + 0.008382976986467838, + -0.018937848508358, + 0.006681219674646854, + 0.015110548585653305, + 0.051251377910375595, + -0.012044736184179783, + -0.029161637648940086, + -0.015852170065045357, + -0.014210007153451443, + -0.056257326155900955, + -0.04621894285082817, + -0.04529191553592682, + 0.019017307087779045, + 0.0037345965392887592, + -0.027916772291064262, + -0.06118381768465042, + 0.0022679066751152277, + -0.00684013869613409, + -0.03882921114563942, + 0.004469596780836582, + -0.019864875823259354, + 0.024036498740315437, + 0.03294920548796654, + 0.024645688012242317, + 0.004188178107142448, + 0.02857893332839012, + -0.006800408940762281, + 0.010025140829384327, + 0.033664342015981674, + -0.030327042564749718, + -0.003146927338093519, + -0.027572447434067726, + 0.03472380340099335, + 0.02631433866918087, + 0.051251377910375595, + -0.014130547642707825, + 0.003883583238348365, + -0.021096497774124146, + 0.0006787165766581893, + 0.004529191646724939, + -0.03986218199133873, + 0.025056229904294014, + -0.02589055337011814, + 0.015295954421162605, + 0.001083463430404663, + 0.024645688012242317, + 0.01434244029223919, + -0.025374067947268486, + 0.017692983150482178, + 0.012130817398428917, + -0.011435546912252903, + -0.018792172893881798, + -0.0008930916665121913, + -0.04632489010691643, + -0.012190411798655987, + 0.0052045974880456924, + -0.021705687046051025, + 0.015031089074909687, + -0.004112028982490301, + 0.035015154629945755, + 0.008965680375695229, + 0.030327042564749718, + -0.013547845184803009, + -0.025983257219195366, + -0.0057111517526209354, + -0.016699738800525665, + 0.036233533173799515, + 0.0010735309915617108, + 0.02076541632413864, + -0.019454333931207657, + -0.017865143716335297, + -0.03893515467643738, + -0.014792710542678833, + 0.035995155572891235, + -0.0068467603996396065, + 0.028181636705994606, + 0.03194272145628929, + 0.048125971108675, + 0.006128313951194286, + 0.025506500154733658, + 0.00432061031460762, + 0.008224057964980602, + 0.014647034928202629, + -0.013667033985257149, + 0.014223250560462475, + -0.02557271532714367, + 0.045212455093860626, + 0.05673408508300781, + 0.008747166953980923, + 0.007945950143039227, + -0.043305426836013794, + 0.043305426836013794, + 0.019944334402680397, + -0.000431233347626403, + 0.050695162266492844, + -0.02125541679561138, + -0.03355839475989342, + 0.027625419199466705, + 0.0035061505623161793, + -0.0056416247971355915, + -0.013289601542055607, + -0.03236650303006172, + 0.0028489541728049517, + 0.010064870119094849, + -0.01818298175930977, + -0.014170277863740921, + 0.0065421657636761665, + 0.001080152578651905, + 0.01586541347205639, + 0.001532906200736761, + 0.0026883797254413366, + -0.0016239535761997104, + -0.002006352413445711, + -0.015560818836092949, + -0.005552232731133699, + 0.007018922828137875, + 0.01880541630089283, + -0.018421361222863197, + 0.008038653060793877, + -0.03814056143164635, + -0.02460595965385437, + -0.0064196656458079815, + 0.009396086446940899, + 0.0005102789727970958, + 0.018394874408841133, + -0.029029205441474915, + -0.039041101932525635, + 0.0074758147820830345, + 0.0070785172283649445, + -0.03882921114563942, + 0.0181962251663208, + 0.009515275247395039, + -0.0455302931368351, + -0.020368119701743126, + -0.0340881273150444, + 0.0038935155607759953, + 0.020606497302651405, + -0.014488115906715393, + -0.02643352746963501, + 0.013461763970553875, + 0.04298758879303932, + -0.0033654409926384687, + 0.015375413931906223, + 0.013746493496000767, + 0.0036750019062310457, + 0.0032528734300285578, + -0.03766380250453949, + 0.007210949901491404, + -0.018540550023317337, + -0.05519786849617958, + -0.00882662646472454, + -0.014461629092693329, + -0.06727571040391922, + -0.04354380816221237, + 0.058270301669836044, + 0.011415681801736355, + -0.036604344844818115, + 0.0011488519376143813, + 0.03808758780360222, + 0.0005839445511810482, + 0.009303383529186249, + 0.030856773257255554, + -0.013388926163315773, + 0.010256897658109665, + -0.0047013540752232075, + 0.05331732705235481, + 0.01995757780969143, + 0.02156001143157482, + -0.01513703539967537, + -0.011700411327183247, + 0.0068931118585169315, + 0.012958520092070103, + -0.0053270976059138775, + 0.0006327790324576199, + -0.0050920299254357815, + -0.016156764701008797, + 0.0071645984426140785, + -0.01007811352610588, + -0.0401800200343132, + -0.03424704447388649, + 0.03212812542915344, + 0.008687572553753853, + -0.016818927600979805, + 0.02839352935552597, + -0.07029516994953156, + -0.04579515755176544, + 0.0027645283844321966, + 0.02117595635354519, + -0.007773787714540958, + -0.015031089074909687, + 0.00278604868799448, + 0.027572447434067726, + 0.0017398319905623794, + 0.0007387250661849976, + -0.00020040762319695204, + 0.008389598689973354, + -0.0037511505652219057, + 0.012859196402132511, + -0.016156764701008797, + -0.013084331527352333, + 0.009720545262098312, + 0.012865817174315453, + 0.012706899084150791, + 0.024407310411334038, + -0.023705417290329933, + 0.006873246748000383, + -0.02044757828116417, + -0.0002859714441001415, + -0.02075217291712761, + 0.0029764205683022738, + 0.013501493260264397, + 0.0004411657864693552, + -0.019268929958343506, + 0.0007234125514514744, + 0.023003526031970978, + 0.006280611269176006, + -0.0055588544346392155, + 0.030432989820837975, + 0.02655271627008915, + 0.007230814546346664, + 0.015958117321133614, + -0.01850081980228424, + -0.0022215552162379026, + 0.005744259804487228, + -0.013667033985257149, + -0.013137304224073887, + -0.011051492765545845, + -0.03437947854399681, + 0.008157841861248016, + 0.006826895289123058, + 0.007892977446317673, + -0.002395372837781906, + 0.002560913562774658, + 0.03332001715898514, + -0.03509461134672165, + 0.014845683239400387, + -0.03859082981944084, + -0.01983838900923729, + 0.011137573048472404, + 0.030194610357284546, + 0.015825683251023293, + 0.0068533821031451225, + -0.0027314203325659037, + 0.00870081502944231, + -0.03755785897374153, + -0.007257301360368729, + 0.0046980432234704494, + -0.0062607466243207455, + -0.014315953478217125, + 0.04057731851935387, + 0.025480013340711594, + -0.03339947760105133, + -0.022791633382439613, + -0.002784393262118101, + -0.0070387874729931355, + 0.016222981736063957, + -0.0068931118585169315, + -0.0013433621497824788, + -0.021321633830666542, + -0.014607304707169533, + 0.004370272625237703, + -0.02465893141925335, + -0.011925546452403069, + 0.01924244314432144, + 0.0011654060799628496, + -0.011005140841007233, + 0.00487020518630743, + 0.02069919928908348, + -0.02325514703989029, + 0.024208661168813705, + 0.014832439832389355, + 0.013998115435242653, + -0.0021536836866289377, + -0.009382843039929867, + -0.0035525017883628607, + 0.06197841092944145, + -0.06383246928453445, + -0.011773249134421349, + -0.0060720304027199745, + 0.03316110000014305, + 0.003105542156845331, + -0.02313595823943615, + 0.019891362637281418, + -0.018898118287324905, + -0.0016115379985421896, + 0.015838926658034325, + 0.016514332965016365, + 0.0045821648091077805, + 0.017666496336460114, + -0.01389216911047697, + -0.03302866593003273, + -0.042087048292160034, + 0.02472514845430851, + 0.0200900100171566, + -0.038061100989580154, + -0.008343247696757317, + 0.028367042541503906, + -0.03249893710017204, + -0.021573254838585854, + -0.005545611027628183, + -0.002597332466393709, + -0.0009692403837107122, + -0.025241635739803314, + -0.033982180058956146, + -0.04566272720694542, + -0.027492986992001534, + -0.0057111517526209354, + 0.010263519361615181, + -0.005025813356041908, + 0.06086597964167595, + 0.037266507744789124, + 0.009753653779625893, + -0.053582191467285156, + -0.012144060805439949, + 0.029585421085357666, + 0.024089472368359566, + -0.0037180425133556128, + 0.0008955748053267598, + 0.0322340726852417, + -0.04815245792269707, + 0.013733250088989735, + -0.026592446491122246, + 0.0032015556935220957, + 0.013402169570326805, + -0.0012730074813589454, + 0.022129470482468605, + 0.044788673520088196, + -0.0024897309485822916, + -0.023718660697340965, + 0.011998385190963745, + 0.017600279301404953, + 0.038246504962444305, + 0.0371340736746788, + -0.011309735476970673, + -0.017971090972423553, + -0.032631367444992065, + 0.006512368097901344, + -0.003021116368472576, + -0.009998654015362263, + 0.007343382108956575, + -0.043994076550006866, + -0.04073623940348625, + -0.0075950040481984615, + -0.0046218945644795895, + 0.01114419475197792, + 0.03649839758872986, + -0.006793787237256765, + -0.027307581156492233, + 0.018024062737822533, + 0.0003168033726979047, + 0.002789359539747238, + 0.022434065118432045, + 0.020778659731149673, + -0.017110278829932213, + 0.019335145130753517, + -0.0065752738155424595, + 0.004784123972058296, + 0.015958117321133614, + 0.004323921166360378, + 0.015653522685170174, + -0.011130952276289463, + 0.015163521282374859, + -0.031174611300230026, + -0.0013657101662829518, + -0.02697650156915188, + 0.0006629902054555714, + 0.021838119253516197, + -0.011587844230234623, + 0.0015395277878269553, + 0.033664342015981674, + -0.016832171007990837, + -0.054058946669101715, + 0.036180559545755386, + -0.009237167425453663, + 0.028923258185386658, + -0.006525611504912376, + -0.007535409182310104, + 0.013759736903011799, + -0.026658663526177406, + -0.020301902666687965, + -0.026897041127085686, + 0.006866625044494867, + -0.03535947948694229, + -0.05996543541550636, + 0.003532636910676956, + 0.015772711485624313, + 0.025016499683260918, + 0.0068864901550114155, + -0.0011703722411766648, + -0.006760679185390472, + -0.033902719616889954, + -0.019573524594306946, + -0.006800408940762281, + -0.004363650921732187, + 0.022725418210029602, + -0.007919463329017162, + -0.0060687195509672165, + -0.015706494450569153, + -0.013117439113557339, + 0.01239568181335926, + 0.060707058757543564, + 0.027307581156492233, + 0.023771634325385094, + 0.018725955858826637, + -0.0018606766825541854, + 0.009859600104391575, + -0.012561222538352013, + -0.009720545262098312, + -0.03215461224317551, + -0.01154149230569601, + -0.00699243601411581, + -0.024288121610879898, + -0.01978541538119316, + 0.011111087165772915, + -0.021758660674095154, + 0.029505962505936623, + 0.030936231836676598, + -0.0013284635497257113, + 0.022566499188542366, + 0.01831541582942009, + 0.03999461606144905, + 0.04410002380609512, + -0.010429059155285358, + 0.030936231836676598, + -0.0008682605694048107, + 0.008316760882735252, + 0.03350542485713959, + 0.01593163050711155, + 0.009548383764922619, + -0.01844784803688526, + -0.025188662111759186, + 0.02607595920562744, + -0.0031634813640266657, + 0.017017576843500137, + 0.004585475195199251, + 0.023175688460469246, + 0.012038114480674267, + 0.043305426836013794, + 0.010111221112310886, + 0.04420597106218338, + -0.009720545262098312, + 0.012746628373861313, + -0.0051714894361793995, + 0.028367042541503906, + 0.03279028832912445, + -0.0027396974619477987, + 0.014143791049718857, + 0.01916298270225525, + -0.029876772314310074, + 0.00769432820379734, + 0.024526499211788177, + 0.007177841849625111, + 0.0027678392361849546, + 0.041848670691251755, + -0.021599741652607918, + -0.00894581526517868, + 0.009766897186636925, + 0.022751903161406517, + 0.026605689898133278, + -0.017732711508870125, + 0.015918387100100517, + 0.020169470459222794, + -0.005896557122468948, + -0.004006083123385906, + 0.01715000905096531, + 0.031704340130090714, + 0.03663083165884018, + -0.006677908822894096, + -0.00873392354696989, + -0.014196764677762985, + 0.020791903138160706, + 0.0240629855543375, + 0.0001375021820422262, + 0.015454873442649841, + 0.014673521742224693, + 0.002244730945676565, + 0.0021917580161243677, + -0.008382976986467838, + 0.0383259654045105, + 0.016222981736063957, + -0.019268929958343506, + 0.005373448599129915, + 0.005929665174335241, + -0.02026217244565487, + 0.01758703589439392, + -0.024288121610879898, + 0.01605081930756569, + 0.015097305178642273, + -0.029347043484449387, + 0.009660950861871243, + -0.012726763263344765, + 0.03933245316147804, + -0.024579472839832306, + -0.010952168144285679, + 0.0017580414423719049, + -0.009581491351127625, + -0.022937308996915817, + 0.012667168863117695, + 0.0012117574224248528, + -0.007932706736028194, + -0.004479529336094856, + -0.0031287178862839937, + 0.0061117601580917835, + -6.414699601009488e-05, + -0.029876772314310074, + -0.0033108126372098923, + -0.023533254861831665, + -0.012700277380645275, + 0.010256897658109665, + 0.014885413460433483, + -0.0085220318287611, + 0.026168663054704666, + -0.00907162670046091, + -0.014249737374484539, + -0.02876433916389942, + 0.001275490503758192, + -0.002163616009056568, + 0.02271217480301857, + -0.004648380912840366, + 0.0058667599223554134, + 0.019917847588658333, + -0.004145137500017881, + -0.01880541630089283, + -0.009078248403966427, + -9.384084114572033e-05, + -0.03374380245804787, + -0.004459664691239595, + -0.007985680364072323, + 0.006760679185390472, + -0.045768674463033676, + 0.012144060805439949, + 0.010508518666028976, + -0.030538935214281082, + -0.006356759928166866, + -0.024804607033729553, + 0.05268165096640587, + -0.018103523179888725, + 0.0007896287715993822, + -0.015613792464137077, + -0.02118919976055622, + -0.00827703159302473, + 0.030141636729240417, + 0.0024864203296601772, + -0.012018249370157719, + -0.02612893283367157, + 0.005568786524236202, + -0.013825953006744385, + 0.009442437440156937, + -0.008508788421750069, + -0.014157034456729889, + 0.011223654262721539, + 0.042219482362270355, + -0.03167785331606865, + 0.007760544773191214, + -0.016077306121587753, + -0.0022695621009916067, + -0.0076612201519310474, + 0.0007573483744636178, + 0.002550981007516384, + -0.019984064623713493, + -0.010945546440780163, + -0.02386433631181717, + 0.0045490562915802, + 0.014474872499704361, + 0.004247772507369518, + 0.0072043281979858875, + 0.033055152744054794, + 0.0034266910515725613, + 0.02167920023202896, + 0.016620278358459473, + 0.02015622705221176, + -0.03271082788705826, + -0.02521514892578125, + -0.005135070066899061, + -0.007760544773191214, + 0.027625419199466705, + -0.02998271770775318, + -0.002749629784375429, + 0.009402708150446415, + -0.01504433248192072, + 0.0037047993391752243, + -0.02857893332839012, + -0.015415143221616745, + -0.015653522685170174, + -0.07696977257728577, + -0.03162488341331482, + -0.027757853269577026, + 0.010852843523025513, + -0.008859734050929546, + 0.012892303988337517, + -0.004482840187847614, + 0.027122177183628082, + -0.017613522708415985, + -0.013302844949066639, + 0.007230814546346664, + 0.008157841861248016, + -0.013382304459810257, + 0.014541088603436947, + -0.014713251031935215, + 0.014872170053422451, + -0.020050281658768654, + 0.008859734050929546, + 0.01148189790546894, + -0.01740163005888462, + 0.038802724331617355, + 0.007502301130443811, + 0.03774326294660568, + -0.048125971108675, + 0.029691366478800774, + 0.004595407750457525, + -0.012137439101934433, + -0.010011897422373295, + 0.0293735284358263, + 0.021043524146080017, + 0.020315146073698997, + -0.030300555750727654, + 0.03130704537034035, + 0.006522300653159618, + -0.0014584129676222801, + 0.0004552367317955941, + -0.055091921240091324, + -0.010190680623054504, + 0.03591569513082504, + -0.023096228018403053, + 0.0046583134680986404, + 0.0014410311123356223, + -0.006717638578265905, + 0.0033902721479535103, + 0.004979461897164583, + 0.012064601294696331, + -0.04598056524991989, + -0.02887028641998768, + 0.020169470459222794, + -0.013799467124044895, + -0.02868488058447838, + 0.008462436497211456, + -0.0008972302312031388, + 0.029876772314310074, + -0.03430001810193062, + 0.029347043484449387, + 0.04592759162187576, + 0.0217983890324831, + 0.010031762532889843, + -0.03790218383073807, + -0.019441090524196625, + -0.009521896950900555, + -0.008296896703541279, + 0.054058946669101715, + -0.01434244029223919, + 0.027757853269577026, + -0.008528653532266617, + 0.05477408319711685, + -0.024764878675341606, + 0.05779354274272919, + 0.009217302314937115, + -0.01868622563779354, + -0.0029664880130439997, + 0.03212812542915344, + -0.021043524146080017, + -0.031836774200201035, + -0.010508518666028976, + -0.003648515557870269, + -0.006002502981573343, + -0.007250679656863213, + -0.007177841849625111, + 0.0007490713614970446, + 0.0019964200910180807, + 0.0390675887465477, + 0.06897084414958954, + 0.04036542773246765, + 0.008051896467804909, + 0.0018557104049250484, + -0.01948082074522972, + 0.06197841092944145, + 0.017918117344379425, + 0.014872170053422451, + 0.008833248168230057, + -0.033002179116010666, + 0.04635137692093849, + 0.02355974167585373, + 0.021215686574578285, + 0.02844650112092495, + 0.011064735241234303, + 0.011521628126502037, + -0.018831901252269745, + -0.01684541441500187, + 0.007833382114768028, + 0.005307232495397329, + -0.015375413931906223, + 0.0470135398209095, + -0.01782541535794735, + 0.01775919832289219, + 0.047702185809612274, + 0.03260488063097, + -0.018593523651361465, + -0.028552448377013206, + 0.010515140369534492, + 0.01574622467160225, + 0.017732711508870125, + 0.020129740238189697, + 0.01129649206995964, + 0.017176495864987373, + 0.013256493955850601, + -0.025930283591151237, + -0.030856773257255554, + 0.006720949430018663, + 0.011832844465970993, + -0.03734596446156502, + -0.00456561055034399, + 0.011018384248018265, + -0.0314924493432045, + -0.029823798686265945, + -0.003065812401473522, + 0.006939463317394257, + 0.01348825078457594, + 0.016765953972935677, + -0.002079190220683813, + 0.022434065118432045, + ], + "index": 54, + }, + { + "title": "David E. Davis", + "text": "David Evan Davis, Jr.", + "vector": [ + 0.04507243260741234, + -0.020444175228476524, + -0.03391487896442413, + -0.018947429955005646, + -0.008971964940428734, + 0.07619792222976685, + 0.00044195432565174997, + 0.009091024287045002, + -0.029917890205979347, + 0.06718343496322632, + 0.006930949632078409, + 0.004634806886315346, + 0.016055990010499954, + 0.013139039278030396, + 0.017110515385866165, + 0.02246818132698536, + -0.06044808402657509, + 0.049562666565179825, + -0.007526245899498463, + -0.003237986471503973, + 0.014142538420855999, + -0.04044612869620323, + -0.031414635479450226, + 0.03619401156902313, + 0.00019812204118352383, + 0.037656739354133606, + 0.00628888001665473, + -0.005221598781645298, + 0.04901839420199394, + 0.005965718999505043, + -0.0052003380842506886, + 0.04908642917871475, + 0.05949560925364494, + 0.020716309547424316, + -0.011727336794137955, + 0.02840413711965084, + -0.02039314992725849, + 0.009184570983052254, + 0.03507145494222641, + 0.014380657114088535, + 0.02367578260600567, + -0.0467732772231102, + -0.056570153683423996, + -0.0034505922812968493, + 0.006845907308161259, + 0.019525717943906784, + -0.043609704822301865, + 0.013666301034390926, + -0.004826151765882969, + 0.06555062532424927, + -0.012007975950837135, + -0.008784872479736805, + -0.028608238324522972, + 0.01699995994567871, + 0.02068229392170906, + 0.028183026239275932, + -0.025053469464182854, + 0.08660710602998734, + -0.017535727471113205, + -0.016557740047574043, + 0.06595882773399353, + -0.047657717019319534, + 0.032486166805028915, + 0.014091513119637966, + 0.004383931867778301, + 0.039017416536808014, + -0.0021154277492314577, + 0.024356121197342873, + -0.01307100523263216, + 0.010426188819110394, + 0.026737306267023087, + 0.0065567633137106895, + -0.009813884273171425, + 0.1040237694978714, + 0.02154972404241562, + -0.009252605028450489, + -0.013589763082563877, + 0.050685226917266846, + 0.005234355106949806, + -0.0009423752781003714, + 0.016838381066918373, + -0.052250005304813385, + -0.002574656391516328, + 0.01423608511686325, + 0.005795634351670742, + -0.030649254098534584, + 0.017467692494392395, + -0.07708236575126648, + 0.018301108852028847, + 0.008329895325005054, + 0.022842368111014366, + 0.007709086872637272, + 0.045310549437999725, + -0.04398389160633087, + 0.03677229955792427, + -0.0012947693467140198, + 0.015214071609079838, + -0.005731852725148201, + -0.0007042567594908178, + -0.08497428894042969, + 0.010017985478043556, + 0.022706300020217896, + -0.015562745742499828, + 0.010604777373373508, + 0.00818532332777977, + -0.03200992941856384, + -0.026618247851729393, + 0.021838868036866188, + -0.0076453047804534435, + 0.045242518186569214, + 0.0009264298132620752, + 0.017875896766781807, + -0.002194091910496354, + 0.04401790723204613, + -0.021583741530776024, + 0.03138061612844467, + -0.008852905593812466, + -0.015248089097440243, + 0.038575198501348495, + -0.023233562707901, + -0.02005298063158989, + -0.03782682493329048, + 0.0320439487695694, + 0.018760336562991142, + 0.013300619088113308, + -0.01530761830508709, + -0.014338135719299316, + -0.00030934144160710275, + 0.022519206628203392, + -0.0022025962825864553, + -0.031567711383104324, + 0.023131512105464935, + 0.005812642630189657, + 0.022502198815345764, + -0.020580243319272995, + 0.027247561141848564, + 0.018182048574090004, + 0.031278565526008606, + 0.00423510791733861, + 0.06589079648256302, + -0.022008953616023064, + 0.014516724273562431, + 0.0233866386115551, + 0.013955445028841496, + 0.01643868163228035, + 0.011029989458620548, + 0.0627952516078949, + 0.007717590779066086, + 0.034187015146017075, + 0.03374479338526726, + -0.014338135719299316, + 0.020733319222927094, + -0.02564876526594162, + -0.005361918359994888, + 0.007683573756366968, + 0.017025472596287727, + 0.0025533956941217184, + -0.027162518352270126, + -0.052181970328092575, + -0.02918652631342411, + -0.003977854736149311, + -0.009388672187924385, + -0.012101522646844387, + 0.03840511292219162, + -0.003688710741698742, + -0.05602588132023811, + 0.00818532332777977, + 0.01104699820280075, + -0.025342613458633423, + -0.001504186075180769, + 0.034459151327610016, + -0.0114466967061162, + 0.0274856798350811, + -0.053882814943790436, + -0.030768312513828278, + 0.0033974407706409693, + -0.0008047129958868027, + -0.02041015774011612, + -0.03296240419149399, + 0.001574345980770886, + -0.018794354051351547, + 0.014142538420855999, + 0.029441652819514275, + 0.04371175542473793, + 0.008478719741106033, + 0.0012022858718410134, + 0.007122294511646032, + 0.025206545367836952, + 0.007496480830013752, + -0.04207894206047058, + -0.013479208573698997, + 0.003386810654774308, + -0.012620280496776104, + -0.021481690928339958, + 0.053746748715639114, + -0.004983480088412762, + 0.04415397346019745, + -0.02542765438556671, + -0.03343864157795906, + 0.01819905824959278, + 0.01679585874080658, + -0.004932454787194729, + 0.03345565125346184, + -0.00828737486153841, + 0.04078629985451698, + 0.06626497954130173, + -0.0038269045762717724, + 0.0046305544674396515, + -0.048508141189813614, + -0.019746826961636543, + -0.007190328557044268, + -0.01427860651165247, + -0.007500732783228159, + 0.007398682180792093, + 0.0060465093702077866, + 0.029305584728717804, + -0.02423706278204918, + 0.013156047090888023, + 0.03731657192111015, + 0.029458660632371902, + 0.0005862605175934732, + 0.0032528690062463284, + 0.013419678434729576, + -0.015316122211515903, + -0.018828369677066803, + -0.043609704822301865, + -0.023624757304787636, + 0.0029403383377939463, + -0.005672323051840067, + 0.00458803353831172, + 0.01211853139102459, + -0.011259603314101696, + 0.011115031316876411, + 0.02889738231897354, + -0.035887859761714935, + -0.0340169295668602, + -0.03155070170760155, + -0.025597739964723587, + 0.0039395857602357864, + 0.022978436201810837, + -0.020631268620491028, + -0.0037886356003582478, + -0.018760336562991142, + -0.0399358756840229, + 0.040071941912174225, + 0.04292936623096466, + -0.0010523988166823983, + -0.00995845627039671, + -0.025750815868377686, + -0.0004276034305803478, + 0.020665284246206284, + -0.03309847414493561, + 0.02034212462604046, + -0.030138999223709106, + -0.012815877795219421, + -0.011029989458620548, + 0.0026596987154334784, + 0.023488689213991165, + -0.02712850086390972, + -0.001083758077584207, + -0.018045980483293533, + 0.00175399798899889, + -0.0032953901682049036, + 0.02876131422817707, + -0.02459423989057541, + 0.029016440734267235, + -0.04207894206047058, + 0.019219566136598587, + 0.02381185069680214, + -0.031142499297857285, + -0.010188070125877857, + -0.011846396140754223, + -0.014134034514427185, + -0.01339416578412056, + 0.025053469464182854, + -0.02367578260600567, + -0.03126155957579613, + 0.027162518352270126, + -0.022978436201810837, + 0.015775350853800774, + 0.062387049198150635, + 0.011769857257604599, + 0.037078455090522766, + -0.04082031548023224, + -0.04391585662961006, + -0.008619039319455624, + 0.011973959393799305, + 0.02535962127149105, + 0.06936051696538925, + -0.011769857257604599, + 0.009159058332443237, + 0.011531739495694637, + 0.015537232160568237, + 0.0009354655630886555, + 0.004256368149071932, + -0.018658285960555077, + 0.004507243167608976, + -0.0902809277176857, + -0.013028483837842941, + -0.060686200857162476, + 0.03359171748161316, + 0.018182048574090004, + 0.0274856798350811, + 0.013334636576473713, + 0.020359132438898087, + -0.024917401373386383, + -0.023896893486380577, + 0.027655763551592827, + 0.004932454787194729, + -0.028676271438598633, + -0.015043986961245537, + 0.002804270712658763, + 0.051127444952726364, + 0.022417156025767326, + 0.00582965137436986, + -0.008776367641985416, + 0.04337158426642418, + 0.04514046385884285, + 0.02508748508989811, + -0.008253357373178005, + 0.003979980945587158, + 0.013751343823969364, + -0.03939160332083702, + 0.009677816182374954, + 0.004143687430769205, + -0.006118795368820429, + -0.04653516039252281, + 0.027689781039953232, + -0.026618247851729393, + 0.03537760674953461, + -0.022519206628203392, + -0.014567750506103039, + -0.009312134236097336, + 0.014720826409757137, + 0.0660608783364296, + 0.013198568485677242, + -0.013683309778571129, + 0.01303698867559433, + 0.018045980483293533, + 0.0010784430196508765, + -0.009558756835758686, + 0.008389425463974476, + -0.007011739537119865, + 0.0009620413184165955, + -0.0029956158250570297, + -0.03054720349609852, + 0.010052002966403961, + 0.034050945192575455, + 0.017892904579639435, + -0.07300033420324326, + 0.0007685699965804815, + 0.04813395440578461, + 0.01630261354148388, + 0.003644063603132963, + 0.024135012179613113, + -0.049494631588459015, + -0.017093507573008537, + -0.01253523863852024, + 0.0070755211636424065, + -0.04194287583231926, + 0.0018528596265241504, + -0.02076733484864235, + -0.021736817434430122, + 0.03160172700881958, + -0.03075130470097065, + -0.04993685334920883, + -0.010273112915456295, + -0.00529388478025794, + -0.05116146057844162, + 0.06344157457351685, + -0.007539002224802971, + 0.04663721099495888, + -0.008580770343542099, + 0.002530009252950549, + 0.045956872403621674, + -0.030768312513828278, + 0.01920255646109581, + -0.036228030920028687, + -0.022417156025767326, + 0.018454184755682945, + -0.003142313798889518, + -0.006935201585292816, + 0.015928426757454872, + 0.00688842823728919, + 0.018947429955005646, + -0.042487144470214844, + -0.03871126472949982, + 0.04003792628645897, + 0.020869385451078415, + 0.0053746746852993965, + -0.0615026094019413, + -0.007058512885123491, + -0.010740845464169979, + 0.011208578012883663, + 0.031278565526008606, + -0.023556724190711975, + 0.027587730437517166, + -0.0004977633361704648, + 0.08497428894042969, + -0.02161775901913643, + -0.0362960621714592, + 0.014873902313411236, + 0.0013255971716716886, + -0.04656917601823807, + 0.027876874431967735, + -0.048644211143255234, + -0.007232849486172199, + 0.013062501326203346, + 0.03095540590584278, + 0.004753865767270327, + 0.008147054351866245, + -0.014304119162261486, + -0.024781333282589912, + 0.006314392667263746, + 0.005247111432254314, + -0.03684033453464508, + 0.031193524599075317, + 0.035105470567941666, + 0.05816895142197609, + -0.01891341246664524, + 0.037792809307575226, + -0.010154053568840027, + -0.002014440018683672, + -0.010315634310245514, + 0.049052413552999496, + 0.053100425750017166, + 0.03854118287563324, + -0.019287599250674248, + 0.0012724457774311304, + 0.011064006015658379, + -0.002438588533550501, + 0.0004656067176256329, + -0.03452718257904053, + 0.0690203532576561, + -0.045446619391441345, + -0.04299739748239517, + -0.023403648287057877, + -0.016098512336611748, + -0.03973177447915077, + 0.03789485991001129, + 0.007794129196554422, + -0.04411995783448219, + 0.05143359676003456, + -0.026056967675685883, + -0.06663916260004044, + -0.0045242514461278915, + -0.04139860346913338, + 0.0014616649132221937, + -0.0006564204231835902, + -0.026193035766482353, + -0.011922934092581272, + -0.019814861938357353, + -0.037452638149261475, + -0.03314949944615364, + 0.00921008363366127, + -0.03905143588781357, + -0.06810189038515091, + 0.005013245157897472, + -0.026465171948075294, + -0.02457723207771778, + 0.0031359356362372637, + 0.02627807855606079, + -0.009550252929329872, + -0.02641414664685726, + -0.03126155957579613, + 0.021651776507496834, + 0.002885060850530863, + -0.014227581210434437, + -0.009057007730007172, + 0.05259017273783684, + -0.03269026800990105, + -0.0341700054705143, + 0.04592285677790642, + 0.02649918757379055, + -0.008627544157207012, + 0.008147054351866245, + 0.011965454556047916, + -0.06170671060681343, + 0.013385661877691746, + 0.09980566799640656, + 0.017110515385866165, + -0.006233602296561003, + 0.05037907138466835, + -0.03132959082722664, + -0.023403648287057877, + -0.0008451081230305135, + 0.03721452131867409, + -0.023981936275959015, + -0.019712811335921288, + 0.011191570200026035, + 0.003314524656161666, + 0.07150358706712723, + -0.02039314992725849, + -0.03345565125346184, + -0.01579236052930355, + 0.012356650084257126, + -0.013581259176135063, + 0.02445817179977894, + 0.026397136971354485, + 0.001953847473487258, + 0.006148559972643852, + 0.0653805360198021, + -0.016897909343242645, + -0.04058219864964485, + -0.025614747777581215, + -0.03670426830649376, + -0.00767081743106246, + 0.0013819377636536956, + 0.008861410431563854, + 0.01721256598830223, + 0.011497722007334232, + 0.008653056807816029, + -0.055651698261499405, + 0.0037567445542663336, + -0.011140544898808002, + -0.044528160244226456, + 0.02325057052075863, + 0.04755566641688347, + -0.015171550214290619, + 0.03554769232869148, + 0.0072413538582623005, + 0.010604777373373508, + 0.01420206855982542, + 0.007849406450986862, + 0.049494631588459015, + -0.030513186007738113, + 0.019457682967185974, + -0.013292115181684494, + 0.008079021237790585, + -0.022366130724549294, + 0.0010513357119634748, + -0.005327901802957058, + 0.002340789884328842, + -0.0217538271099329, + -0.044460125267505646, + 0.027689781039953232, + 0.021634766831994057, + -0.013615275733172894, + 0.010477214120328426, + 0.006671570241451263, + -0.00699473125860095, + -0.03871126472949982, + 0.0074156904593110085, + -0.017306113615632057, + 0.02018904685974121, + -0.033761803060770035, + -0.06721745431423187, + 0.004349914845079184, + 0.021090496331453323, + 0.001069938763976097, + 0.05507341027259827, + -0.04010596126317978, + -0.018539227545261383, + 0.003121053334325552, + 0.023471681401133537, + -0.023131512105464935, + -0.02345467358827591, + 0.03350667655467987, + -0.010077515617012978, + -0.031839847564697266, + 0.0018539226148277521, + -0.01720406301319599, + -0.01989990472793579, + -0.0036759544163942337, + -0.05677425488829613, + -0.0013883159263059497, + -0.04357568547129631, + 0.03144865110516548, + -0.037010420113801956, + -0.006186828948557377, + -0.014057496562600136, + -0.01629410870373249, + -0.008988973684608936, + -0.001060371519997716, + -0.025274578481912613, + -0.002156886039301753, + 0.02933960221707821, + -0.01402347907423973, + 0.04633105918765068, + 0.014610270969569683, + 0.03840511292219162, + 0.017246583476662636, + 0.00949922762811184, + 0.01573283039033413, + 0.0027553713880479336, + -0.006208089645951986, + -0.01857324317097664, + 0.021736817434430122, + 0.03311548009514809, + 0.007122294511646032, + -0.019661786034703255, + -0.022485191002488136, + 0.04044612869620323, + 0.011285115964710712, + 0.04235107824206352, + 0.059767745435237885, + -0.013002971187233925, + 0.002657572738826275, + -0.003824778599664569, + -0.023607749491930008, + -0.005149312783032656, + 0.006658813916146755, + 0.06065218523144722, + -0.0003888028732035309, + -0.01743367686867714, + -0.010715332813560963, + -0.007258362136781216, + -0.01989990472793579, + -0.02501945197582245, + -0.043745771050453186, + 0.006484477315098047, + -0.00949922762811184, + 0.008852905593812466, + 0.032707277685403824, + -0.003975728526711464, + 0.03704443573951721, + 0.012705323286354542, + 0.047929853200912476, + -0.026873374357819557, + 0.021073488518595695, + -0.0024322103708982468, + -0.024032961577177048, + 0.0033230287954211235, + 0.017025472596287727, + 0.047725751996040344, + -0.025835858657956123, + 0.03677229955792427, + -0.035887859761714935, + -0.009150554426014423, + -0.002336537931114435, + -0.013980957679450512, + 0.031125491484999657, + 0.023352622985839844, + -0.02500244416296482, + -0.002500244416296482, + -0.015707317739725113, + 0.022281089797616005, + -0.03138061612844467, + 0.005026001483201981, + -0.02090340293943882, + -0.0435076542198658, + 0.013793865218758583, + 0.023777833208441734, + 0.03738460689783096, + -0.047283533960580826, + 0.009014486335217953, + 0.026890382170677185, + 0.03626204654574394, + 0.007534749805927277, + -0.0062165940180420876, + 0.015316122211515903, + -0.022842368111014366, + -0.002680959179997444, + 0.00793870072811842, + 0.0038928124122321606, + -0.02586987428367138, + -0.01998494565486908, + -0.016523724421858788, + 0.03871126472949982, + -0.0026214297395199537, + -0.005366170778870583, + -0.04071826487779617, + -0.019712811335921288, + -0.003167826682329178, + -0.02614201046526432, + -0.02282536029815674, + 0.0228933934122324, + 0.005549011752009392, + 0.029611736536026, + 0.014814373105764389, + 0.028523195534944534, + -0.00602099671959877, + 0.0011480713728815317, + -0.015129029750823975, + -0.0028723045252263546, + 0.0074752201326191425, + -0.0027085980400443077, + 0.00043398162233643234, + -0.0487462617456913, + 0.013164551928639412, + 0.031227542087435722, + -0.0017380524659529328, + -0.005621297750622034, + 0.0073051354847848415, + 0.015358643606305122, + 0.0051408084109425545, + 0.02287638559937477, + -0.016957439482212067, + 0.015622274950146675, + 0.026159018278121948, + 0.0013649292523041368, + 0.028438152745366096, + -0.00035638047847896814, + 0.003682332579046488, + 0.01310502178966999, + -0.010188070125877857, + 0.026941407471895218, + -0.025529704988002777, + -0.04224902763962746, + 0.008704082109034061, + 0.053100425750017166, + -0.02245117351412773, + 0.029441652819514275, + 0.029220541939139366, + 0.012985962443053722, + -0.02166878432035446, + 0.010358154773712158, + -0.052045904099941254, + -0.010936442762613297, + -0.008478719741106033, + 0.036534182727336884, + 0.02345467358827591, + 0.024032961577177048, + 0.013802369125187397, + 0.03966373950242996, + -0.046875327825546265, + 0.0015966696664690971, + -0.005047261714935303, + -0.04769173637032509, + 0.0017486828146502376, + 0.013657797127962112, + 0.00291482568718493, + -0.04585482180118561, + 0.002277008257806301, + 0.031227542087435722, + 0.03180582821369171, + 0.023964926600456238, + -0.030275067314505577, + 0.03338761627674103, + -0.0010412369156256318, + -0.019508708268404007, + 0.05476725846529007, + -0.0036738284397870302, + 0.01257776003330946, + -0.020086996257305145, + -0.019814861938357353, + 0.029662761837244034, + 0.007487976457923651, + 0.052454106509685516, + -0.01807999797165394, + 0.04840609058737755, + -0.025529704988002777, + 0.019389649853110313, + -0.016549237072467804, + -0.021940920501947403, + 0.023335613310337067, + 0.03292838856577873, + 0.0233866386115551, + 0.020512208342552185, + -0.03854118287563324, + 0.0037588707637041807, + -0.042623214423656464, + 0.04486833140254021, + 0.01996793784201145, + -0.03479931876063347, + 0.002106923609972, + 0.013793865218758583, + -0.03537760674953461, + 0.031856853514909744, + 0.017391154542565346, + 0.0036568199284374714, + 0.017960939556360245, + -0.00917606707662344, + 0.002311025047674775, + 0.03132959082722664, + 0.0011342519428581, + 0.033693768084049225, + -0.012620280496776104, + -0.016268596053123474, + 0.010808879509568214, + -0.015103517100214958, + 0.006365417968481779, + -0.024066977202892303, + -0.014014975167810917, + -0.03462923318147659, + 0.01328361127525568, + -0.03046216070652008, + -0.06170671060681343, + -0.007768616080284119, + -0.006526998244225979, + -0.014457195065915585, + -0.004284007009118795, + -0.03216300532221794, + -0.020291099324822426, + -0.022944418713450432, + -0.014584758318960667, + 0.025971924886107445, + 0.04292936623096466, + -0.012560751289129257, + -0.022723309695720673, + -0.03229907527565956, + -0.014788860455155373, + 0.001293706358410418, + -0.012297119945287704, + 0.008219340816140175, + -0.014440186321735382, + -0.004656067118048668, + -0.009847900830209255, + -0.007266866508871317, + 0.01339416578412056, + -0.013011476024985313, + -0.004341410472989082, + -0.016557740047574043, + -0.0063271489925682545, + -0.005272624082863331, + -0.03471427783370018, + 0.0389493852853775, + 0.012756348587572575, + 0.018675293773412704, + -0.008006734773516655, + 0.023488689213991165, + -0.002014440018683672, + 0.01763777807354927, + 0.0017943930579349399, + 0.026822349056601524, + 0.011004476808011532, + 0.0012416179524734616, + 0.004838908091187477, + -0.002644816180691123, + 0.026737306267023087, + -0.026261068880558014, + 0.011531739495694637, + -0.0043924362398684025, + 0.0004733136738650501, + 0.023624757304787636, + -0.0477597676217556, + 0.025631755590438843, + -0.053236495703458786, + 0.007951457053422928, + -0.009754354134202003, + 0.02996891550719738, + -0.009201579727232456, + -0.011242595501244068, + -0.009142049588263035, + -0.010494222864508629, + -0.0033931888174265623, + 0.00391619885340333, + 0.00864030048251152, + 0.04490234702825546, + 0.032707277685403824, + 0.07442904263734818, + -0.02663525566458702, + -0.033064454793930054, + -0.02195792831480503, + -0.015571249648928642, + -0.01282438263297081, + 0.00811729021370411, + -0.035173505544662476, + -0.004707092419266701, + -0.01438916102051735, + 0.01527360174804926, + 0.014491211622953415, + -0.0706871822476387, + -0.03032609261572361, + -0.009295126423239708, + -0.05554964765906334, + 0.010715332813560963, + 0.03165275231003761, + -0.021515708416700363, + -0.011021485552191734, + 0.04718147963285446, + -0.004122426733374596, + -0.0090740155428648, + -0.03871126472949982, + 0.07340853661298752, + -0.028319094330072403, + 0.03564974293112755, + -0.023760825395584106, + 0.06143457442522049, + -0.022723309695720673, + -0.003843913087621331, + 0.0474536158144474, + 0.007105286233127117, + -0.0007356160786002874, + -0.012024984695017338, + 0.007870666682720184, + 0.01069832406938076, + 0.024985434487462044, + 0.03479931876063347, + 0.016387656331062317, + -0.004617798142135143, + 0.018250083550810814, + -0.010392172262072563, + -0.03229907527565956, + 0.03813297674059868, + 0.0067353518679738045, + 0.0006819331320002675, + 0.02076733484864235, + -0.005157817155122757, + 0.02882934734225273, + 0.021413657814264297, + 0.011761353351175785, + 0.031142499297857285, + -0.007547506131231785, + -0.0003545201907400042, + 0.0024300843942910433, + -0.022655274718999863, + 0.002457723254337907, + -0.00786216277629137, + -0.001574345980770886, + 0.0040076193399727345, + 0.03554769232869148, + 0.03442513197660446, + 0.06010791286826134, + -0.009949952363967896, + -0.019576743245124817, + 0.05449512228369713, + -0.0032932639587670565, + 0.056434087455272675, + -0.01490791980177164, + -0.030632244423031807, + 0.004190460313111544, + 0.01565629243850708, + 0.025903891772031784, + 0.00391407310962677, + 0.05150163173675537, + -0.02558073028922081, + 0.0072456058114767075, + 0.04473226144909859, + -0.038439132273197174, + 0.009116536937654018, + 0.006106039043515921, + 0.016243083402514458, + 0.03684033453464508, + 0.021906903013586998, + -0.01506099570542574, + -0.03996989130973816, + 0.07293229550123215, + -0.037724774330854416, + 0.025342613458633423, + 0.0412285178899765, + 0.018454184755682945, + -0.014125529676675797, + -0.004277628846466541, + 0.013445191085338593, + -0.011956950649619102, + -0.04435807466506958, + 0.008465963415801525, + 0.004332906566560268, + -0.014610270969569683, + 0.04116048663854599, + 0.034391116350889206, + -0.020954428240656853, + -0.0023152772337198257, + 0.00483465613797307, + -2.617709105834365e-05, + -0.03362573683261871, + 0.014372153207659721, + -0.021141521632671356, + -0.01864127814769745, + 0.002217478584498167, + 0.030632244423031807, + 0.023709800094366074, + 0.01947469264268875, + 0.015282105654478073, + -0.02076733484864235, + 0.007917440496385098, + -0.04003792628645897, + 0.024815350770950317, + -0.04146663844585419, + -0.027876874431967735, + -0.0012192942667752504, + 0.016404664143919945, + -0.005527751054614782, + 0.00963529571890831, + 0.02025708183646202, + 0.02437313087284565, + -0.019253581762313843, + -0.02379484288394451, + 0.01672782562673092, + -0.012620280496776104, + 0.031856853514909744, + -0.012220581993460655, + -0.006144308019429445, + -0.005553263705223799, + 0.027094485238194466, + -0.0005628739017993212, + -0.0025895386934280396, + -0.030768312513828278, + 0.0006548258825205266, + -0.027672771364450455, + 0.004383931867778301, + -0.004366923123598099, + 0.009235596284270287, + 0.029713787138462067, + 0.03979980945587158, + -0.0045667728409171104, + 0.018947429955005646, + 0.03462923318147659, + -0.03081933781504631, + -0.034050945192575455, + -0.005855164024978876, + 0.011514730751514435, + -0.028387127444148064, + 0.028217043727636337, + -0.003607920603826642, + 0.0005596848204731941, + -0.0024215802550315857, + -0.02806396782398224, + 0.013810873031616211, + -0.05949560925364494, + 0.02663525566458702, + 0.022213054820895195, + -0.008236349560320377, + -0.02444116398692131, + -0.029934898018836975, + 0.01233113743364811, + -0.009261108934879303, + -0.027519695460796356, + -0.01708500273525715, + -0.01869230344891548, + 0.009414184838533401, + 0.033268555998802185, + 0.014508220367133617, + -0.011166057549417019, + 0.0033336591441184282, + 0.017484702169895172, + -0.03650016710162163, + 0.022162029519677162, + 0.032843343913555145, + 0.0222470723092556, + -0.017535727471113205, + -0.007947205565869808, + -0.04605892300605774, + -0.004507243167608976, + 0.012220581993460655, + -0.006926697213202715, + 0.01864127814769745, + 0.04003792628645897, + -0.006131551694124937, + -0.011812378652393818, + 0.00921008363366127, + 0.011489218100905418, + -0.02515552006661892, + -0.05418897047638893, + 0.015248089097440243, + 0.020069988444447517, + 0.02558073028922081, + -0.016829876229166985, + 0.04912044480443001, + -0.02757072076201439, + 0.008861410431563854, + 0.014074504375457764, + 0.022417156025767326, + -0.0034272056072950363, + -0.006586527917534113, + 0.02969677932560444, + 0.036670248955488205, + 0.011429687961935997, + -0.027893882244825363, + 0.01857324317097664, + -0.03413598984479904, + -0.01091093011200428, + 0.007143555209040642, + -0.0008998541161417961, + 0.00591469369828701, + -0.0074071865528821945, + -0.01920255646109581, + -0.01891341246664524, + -0.006067769601941109, + 0.01664278283715248, + -0.030002931132912636, + 0.0016859640600159764, + -0.006709839217364788, + 0.011029989458620548, + -0.005889181047677994, + -0.007492228876799345, + -0.005782878026366234, + 0.02471330016851425, + -0.016413168981671333, + 0.00047171913320198655, + 0.0008217214490287006, + -0.018607260659337044, + 0.013836385682225227, + -0.0017529348842799664, + -0.01364078838378191, + -0.025699790567159653, + -0.013156047090888023, + 0.010468710213899612, + -0.005676575005054474, + 0.02835310995578766, + 0.029373617842793465, + -0.017408164218068123, + -0.03711247071623802, + -0.008661560714244843, + 0.024883383885025978, + -0.0027893881779164076, + 0.0016381277237087488, + 0.0004209594917483628, + 0.007794129196554422, + -0.03207796439528465, + 0.024900391697883606, + -0.007704834453761578, + 0.01991691254079342, + -0.006841654889285564, + 0.005910441745072603, + -0.006811890285462141, + 0.057080406695604324, + 0.0014680430758744478, + 0.013674805872142315, + 0.009312134236097336, + -0.060618169605731964, + -0.028659263625741005, + -0.0024662273935973644, + -0.019933920353651047, + -0.010120037011802197, + -0.007483724504709244, + 0.020920412614941597, + -0.023692792281508446, + 0.012050497345626354, + -0.011531739495694637, + -0.0015658418415114284, + -0.0024024457670748234, + -0.0092441001906991, + 0.010307129472494125, + 0.0017784476513043046, + 0.030292075127363205, + -0.036228030920028687, + -0.010034994222223759, + -0.03224804997444153, + -0.014822877012193203, + 0.01293493714183569, + -0.006799133960157633, + -0.011149048805236816, + -0.020359132438898087, + -0.017960939556360245, + -0.008572266437113285, + 0.006254862993955612, + 0.009813884273171425, + -0.0015265097608789802, + -0.0220939964056015, + -0.044596195220947266, + -0.017391154542565346, + -0.021311607211828232, + 0.030853355303406715, + -0.00499623641371727, + 0.003191213123500347, + -0.012135539203882217, + 0.011378662660717964, + -0.011506226845085621, + 0.03871126472949982, + -0.025121502578258514, + 0.0032337342854589224, + -0.011531739495694637, + 1.98155266843969e-05, + -0.01665979065001011, + 0.02537662908434868, + 0.012526734732091427, + -0.04146663844585419, + -0.025393638759851456, + -0.022128012031316757, + -0.031924888491630554, + 0.041840825229883194, + 0.008878418244421482, + 0.002423706231638789, + -0.008776367641985416, + -0.004028880037367344, + -0.001800771220587194, + -0.03005395643413067, + -0.009082520380616188, + -0.0008929444011300802, + -0.04139860346913338, + 0.002204722259193659, + -0.014992961660027504, + 0.01385339442640543, + -0.0039459639228880405, + -0.009677816182374954, + -0.041126467287540436, + -0.014261597767472267, + -0.017960939556360245, + -0.0038396609015762806, + 0.031771812587976456, + 0.024203045293688774, + 0.02954370342195034, + 0.04000391066074371, + -0.02954370342195034, + -0.012790365144610405, + 0.037010420113801956, + -0.016472699120640755, + 0.04337158426642418, + -0.009133545681834221, + -0.012509725987911224, + -0.010477214120328426, + -0.003958720248192549, + 0.010783366858959198, + -0.008988973684608936, + 0.008300131186842918, + 0.005595785100013018, + -0.05973372980952263, + 0.01607299968600273, + -0.020580243319272995, + 0.035615723580121994, + -0.031431641429662704, + 0.006008240394294262, + -0.00010005760850617662, + 0.004468974191695452, + 0.0022089744452387094, + -0.0010646235896274447, + 0.03427205607295036, + -0.011472209356725216, + -0.02103947103023529, + -0.03250317648053169, + 0.0034931134432554245, + 0.00945670623332262, + 0.004753865767270327, + -0.017484702169895172, + 0.009541749022901058, + -0.028659263625741005, + -0.004443461541086435, + 0.00645046029239893, + -0.0027851362247020006, + -0.002838287502527237, + 0.009371664375066757, + 0.024781333282589912, + -0.021566733717918396, + -0.04323551803827286, + -0.003867299761623144, + 0.005621297750622034, + 0.0036802066024392843, + -0.012390666641294956, + -0.021158529445528984, + 0.040071941912174225, + -0.005689331330358982, + 0.002131373155862093, + -0.009779867716133595, + 0.00483465613797307, + 7.632216693309601e-06, + -0.004473226144909859, + 0.018369141966104507, + -0.010893921367824078, + 0.0037907615769654512, + -0.03311548009514809, + 0.011531739495694637, + -0.009448202326893806, + 0.0008908183663152158, + -0.01261177659034729, + 0.007334900554269552, + -0.01420206855982542, + 0.002984985476359725, + 0.046365074813365936, + 0.034033939242362976, + 0.005259867757558823, + -0.02394791878759861, + -0.019525717943906784, + -0.00042707190732471645, + -0.018454184755682945, + 0.0016466319793835282, + 0.03435710072517395, + -0.018369141966104507, + 0.027621746063232422, + 0.03799691051244736, + 0.017187053337693214, + 0.014440186321735382, + -0.007985474541783333, + 0.03267326205968857, + 0.01120007410645485, + -0.026805341243743896, + 0.023913901299238205, + 0.020648276433348656, + 0.015026978217065334, + 0.019032472744584084, + -0.04704541340470314, + 0.038643233478069305, + 0.0063866786658763885, + 0.06738753616809845, + 0.01857324317097664, + -0.010392172262072563, + -0.01743367686867714, + 0.009108033031225204, + -0.007504985202103853, + -0.02537662908434868, + 0.02551269717514515, + -0.028080975636839867, + -0.052386071532964706, + 0.011744344606995583, + -0.02336963079869747, + -0.009728841483592987, + 0.005004740785807371, + -0.02260424941778183, + 0.014882407151162624, + -0.013045492582023144, + 0.01983186975121498, + -0.017841879278421402, + 0.0369764007627964, + -0.012144044041633606, + -0.021804852411150932, + -0.003174204844981432, + 0.010749349370598793, + 0.02105647884309292, + -0.021209554746747017, + -0.019950930029153824, + 0.007096781861037016, + 0.016098512336611748, + 0.01331762783229351, + 0.006191081367433071, + -0.014729330316185951, + 0.004105417989194393, + -0.0072413538582623005, + 0.019712811335921288, + 0.02933960221707821, + 0.011293620802462101, + 0.01677885092794895, + -0.01785888895392418, + 0.021702801808714867, + -0.019236573949456215, + 0.030904380604624748, + -0.021277589723467827, + 0.025308595970273018, + -0.011608277447521687, + 0.017943929880857468, + -0.008206584490835667, + -0.036874350160360336, + 0.006539754569530487, + -0.014678305014967918, + -0.01807999797165394, + -0.029611736536026, + 0.025563722476363182, + 0.0008174693211913109, + 0.012594767846167088, + 0.017467692494392395, + 0.025529704988002777, + -0.01713602803647518, + 0.03408496454358101, + -0.03854118287563324, + -0.02663525566458702, + 0.02833610214293003, + 0.009805380366742611, + -0.05177376791834831, + -0.02627807855606079, + -0.007058512885123491, + 0.009924438782036304, + 0.007143555209040642, + -0.00963529571890831, + -0.017340129241347313, + -0.02041015774011612, + -0.0284721702337265, + 0.027604738250374794, + 0.02296142838895321, + 0.004088409710675478, + 0.012297119945287704, + -0.023403648287057877, + 0.024560222402215004, + -0.00019971658184658736, + 0.06973470747470856, + -0.007326396182179451, + -0.014669801108539104, + 0.02876131422817707, + 0.010281616821885109, + 0.01374283991754055, + 0.006539754569530487, + -0.05235205590724945, + -0.010120037011802197, + -0.013734335079789162, + -0.00953324418514967, + 0.003237986471503973, + 0.013632284477353096, + 0.011599772609770298, + -0.012807373888790607, + 0.009363159537315369, + 0.01650671474635601, + -0.011633790098130703, + 0.021362632513046265, + -0.02869327925145626, + -0.029730796813964844, + 0.001143819303251803, + 0.016540732234716415, + -0.012883911840617657, + -0.03626204654574394, + -0.01041768491268158, + 0.021073488518595695, + 0.02804695814847946, + -0.0029701031744480133, + 0.004507243167608976, + -0.011081014759838581, + -0.012016480788588524, + -0.008725342340767384, + -0.005549011752009392, + -0.0016094259917736053, + 0.01215254794806242, + -0.01580086350440979, + 0.02282536029815674, + -0.030292075127363205, + 0.03789485991001129, + -0.011531739495694637, + -0.02105647884309292, + -0.010655803605914116, + 0.01637915149331093, + 0.031839847564697266, + -0.03541162237524986, + 0.00458803353831172, + -0.007296631578356028, + 0.0018401033012196422, + -0.006986226886510849, + -0.017467692494392395, + 0.04150065407156944, + 0.021651776507496834, + -0.016472699120640755, + 0.002181335585191846, + -0.00036966835614293814, + -0.011072510853409767, + 0.012628785334527493, + 0.002016566228121519, + -0.016549237072467804, + -0.024032961577177048, + -0.03663623332977295, + 0.02331860549747944, + -0.006692830938845873, + -0.005017497111111879, + 0.03799691051244736, + 0.008895426988601685, + -0.009405680932104588, + 0.00380777008831501, + -0.003852417226880789, + 0.024220053106546402, + 0.0026724550407379866, + 0.012909424491226673, + -0.015834880992770195, + 0.028948407620191574, + 0.024407146498560905, + 0.0040033673867583275, + -0.041058432310819626, + -0.009252605028450489, + -0.004033132456243038, + 0.027434654533863068, + 0.03200992941856384, + -0.03476530313491821, + 0.009201579727232456, + -0.01806299015879631, + -0.0009338710224255919, + -0.017391154542565346, + 0.011132040061056614, + -0.004413696471601725, + 0.029662761837244034, + 0.0011661428725346923, + 0.022349122911691666, + 0.003965098410844803, + 0.026618247851729393, + -0.004439209122210741, + 0.0065610152669250965, + -0.019661786034703255, + -0.029662761837244034, + 0.03639811649918556, + 0.00892944447696209, + 0.02246818132698536, + -0.03434009104967117, + -0.0032060956582427025, + -0.04656917601823807, + 0.007390177808701992, + 0.03238411620259285, + 0.0004911193973384798, + -0.007628296501934528, + -0.012526734732091427, + -0.02296142838895321, + -0.008334147743880749, + -0.01257776003330946, + 0.009839396923780441, + -0.02549568936228752, + -0.04061621427536011, + -0.016532227396965027, + -0.00807476881891489, + -0.013793865218758583, + 0.0026001690421253443, + 0.003897064598277211, + -0.025104494765400887, + 0.018947429955005646, + -0.009014486335217953, + 0.003960846457630396, + -0.024815350770950317, + -0.00970332883298397, + 0.02501945197582245, + 0.01544368639588356, + -0.035241540521383286, + -0.00664180563762784, + 0.04500439763069153, + 0.017807861790060997, + -0.0042372336611151695, + -0.025682782754302025, + -0.012968954630196095, + 0.009031495079398155, + -0.015316122211515903, + 0.016804363578557968, + -0.016948934644460678, + -0.015571249648928642, + -0.009320639073848724, + 2.097821379720699e-05, + 0.015043986961245537, + -0.018828369677066803, + -0.0017848258139565587, + -0.0010816321009770036, + 0.017807861790060997, + -0.0033655499573796988, + 0.02692439965903759, + -0.01708500273525715, + -0.011259603314101696, + -0.023284588009119034, + 0.006101786624640226, + 0.00811729021370411, + -0.018930422142148018, + -0.0111235361546278, + 0.029424645006656647, + 0.00172742223367095, + -0.008266113698482513, + 0.012007975950837135, + -0.028097983449697495, + -0.005965718999505043, + 0.019440675154328346, + -0.020512208342552185, + -0.012841391377151012, + 0.006242106668651104, + 0.033489666879177094, + -0.011999472044408321, + -0.008725342340767384, + -0.006203837692737579, + 0.024645265191793442, + -0.03012199141085148, + 0.0076453047804534435, + -0.024611247703433037, + -0.01434663962572813, + 0.02231510542333126, + -0.009142049588263035, + 0.043031416833400726, + 0.023114504292607307, + -0.017050985246896744, + -0.01694043166935444, + -0.04867822676897049, + -0.007772868499159813, + 0.002103734528645873, + 0.03012199141085148, + -0.007819641381502151, + -0.026397136971354485, + 0.015035483054816723, + -0.012637289240956306, + 0.007942953146994114, + 0.009439698420464993, + -0.003760996740311384, + 0.005638306029140949, + ], + "index": 55, + }, + { + "title": "Newport Tower (Jersey City)", + "text": "The Newport Tower (also known as Newport Office Center II and 525 Washington Boulevard) in Newport, Jersey City, New Jersey is the fourth tallest building in Jersey City. It has 37 floors, it is 531 ft (162 m) tall and is connected to a mall (called the Newport Centre Mall) within the complex. The mall is one of the few enclosed, regional shopping facilities in Hudson County. The building was developed by Melvin Simon & Associates in 1990.", + "vector": [ + -0.018348103389143944, + -0.03591682016849518, + -0.01979321986436844, + 0.005041669122874737, + -0.029860321432352066, + -0.03724827244877815, + 0.00991284754127264, + 0.025557447224855423, + -0.034098245203495026, + 0.08540798723697662, + -0.01596122607588768, + -0.025963379070162773, + 0.00849208701401949, + -0.03796271234750748, + 0.027960561215877533, + -0.016708141192793846, + -0.03374102711677551, + 0.010781540535390377, + -0.0007687327452003956, + 0.018185731023550034, + -0.008289121091365814, + 0.0010325881885364652, + -0.03627403825521469, + 0.03893695026636124, + 0.030672183260321617, + 0.007822300307452679, + -0.006669454276561737, + -0.005565320607274771, + -0.06410469859838486, + -0.047575172036886215, + -0.03877457603812218, + 0.017568714916706085, + 0.0516994372010231, + -0.01795841008424759, + -0.006563912145793438, + 0.05098499730229378, + 0.017032885923981667, + -0.008240409195423126, + -0.035721972584724426, + -0.011244302615523338, + 0.03089950606226921, + -0.007948138751089573, + -0.00720528420060873, + -0.01416700892150402, + 0.0566030889749527, + -0.06615059822797775, + -0.005650566425174475, + -0.02674276754260063, + -0.009799186140298843, + 0.048062290996313095, + 0.0018490179209038615, + -0.035527125000953674, + 0.01823444291949272, + 0.022131385281682014, + -0.004757517017424107, + -0.016480818390846252, + 0.008410900831222534, + 0.15340963006019592, + 0.001280713826417923, + 0.04936126992106438, + 0.061214469373226166, + 0.03403329849243164, + -0.0201504398137331, + 0.013249604031443596, + 0.02438836358487606, + 0.06647533923387527, + -0.0030465158633887768, + 0.03835240751504898, + -0.0019697826355695724, + -0.018624136224389076, + -0.03232838585972786, + 0.04945869371294975, + -0.019403524696826935, + -0.02055637165904045, + 0.026125751435756683, + -0.005723634269088507, + 0.03640393540263176, + 0.03322143480181694, + 0.014329382218420506, + 0.003152057994157076, + 0.05683040991425514, + 0.04796486720442772, + -0.04280141741037369, + -0.013411976397037506, + -0.039196744561195374, + 0.00449772085994482, + -0.05082262307405472, + -0.05361543223261833, + 0.021709216758608818, + 0.05631081759929657, + 0.010270066559314728, + 0.030509810894727707, + -0.06858618557453156, + -0.038904473185539246, + -0.029486864805221558, + 0.02455073781311512, + 0.015092533081769943, + 0.021351996809244156, + 0.007599037606269121, + 0.0630979910492897, + 0.05533658340573311, + 0.043385960161685944, + 0.019289864227175713, + 0.025232702493667603, + -0.004392178729176521, + 0.009027916938066483, + 0.05725257843732834, + 0.01828315481543541, + 0.03138662502169609, + -0.01782851107418537, + 0.07176868617534637, + -0.027018800377845764, + 0.0039801583625376225, + -0.04367822781205177, + -0.014905804768204689, + 0.01795841008424759, + -0.0041892132721841335, + -0.011974979192018509, + -0.0040674335323274136, + -0.017974646762013435, + -0.011577166616916656, + -0.0574149526655674, + 0.024290941655635834, + -0.0439704991877079, + -0.003192651318386197, + -0.017763562500476837, + -0.01995559222996235, + 0.026190700009465218, + 0.0031277022790163755, + -0.0032149774488061666, + -0.024404602125287056, + 0.02039399929344654, + 0.03546217456459999, + -0.030038930475711823, + -0.026158224791288376, + 0.046633411198854446, + 0.016870513558387756, + 0.01950094848871231, + -0.014532347209751606, + 0.01925739087164402, + -0.015847565606236458, + -0.05679793655872345, + -0.00069617253029719, + -0.07196353375911713, + 0.033042822033166885, + -0.06413717567920685, + -0.003219036851078272, + 0.011942504905164242, + -0.006109268870204687, + -0.022017724812030792, + 0.03130543604493141, + 0.08034196496009827, + 0.0061904555186629295, + -0.001422789879143238, + 0.027343545109033585, + -0.029632998630404472, + -0.08923997730016708, + 0.008151104673743248, + -0.0270837489515543, + 0.04296378791332245, + -0.013858500868082047, + -0.08326467126607895, + -0.016838038340210915, + -0.073262520134449, + -0.03883952647447586, + -0.022813349962234497, + 0.03314024582505226, + 0.04224935173988342, + 0.03676115721464157, + -0.007412309292703867, + 0.021465657278895378, + 0.002900380641222, + -0.02068626880645752, + -0.01766613870859146, + -0.0060686757788062096, + -0.07741925865411758, + 0.05001075938344002, + -0.007327063474804163, + 0.04445761814713478, + -0.04617876559495926, + 0.05520668253302574, + -0.0067384629510343075, + 0.0037325401790440083, + -0.040495727211236954, + -0.02584971860051155, + -0.0053664143197238445, + -0.00962869543582201, + 0.013736722059547901, + 0.008808713406324387, + -0.029454389587044716, + -0.05683040991425514, + 0.03614414110779762, + 0.015912514179944992, + 0.0307371336966753, + -0.018559187650680542, + -0.04150243476033211, + 0.05819433927536011, + -0.011041336692869663, + -0.020621320232748985, + -0.00039527579792775214, + 0.0455942265689373, + -0.007217462174594402, + -0.03325390815734863, + -0.022537317126989365, + 0.06400727480649948, + -0.00663697998970747, + -0.002405144041404128, + 0.02174169011414051, + 0.0117070646956563, + 0.06754700094461441, + -0.02630436047911644, + -0.03516990318894386, + 0.00494830496609211, + -0.017406342551112175, + 0.028918560594320297, + 0.011828843504190445, + -0.03403329849243164, + -0.004542373586446047, + -0.013801670633256435, + -0.003324578981846571, + 0.03721579909324646, + -0.010497388429939747, + -0.0054638381116092205, + -0.0053420583717525005, + -0.0769646093249321, + 0.0018662700895220041, + -0.006170158740133047, + 0.058324236422777176, + 0.006446192041039467, + 0.04738032445311546, + 0.004160797689110041, + -0.02373887412250042, + -0.03029872663319111, + 0.034585364162921906, + 0.02088111639022827, + 0.0015719697112217546, + 0.021205861121416092, + -0.02854510210454464, + 0.024940431118011475, + 0.03357865288853645, + 0.0060118455439805984, + 0.03783281520009041, + -0.03219848498702049, + -0.01203180942684412, + -0.01188567467033863, + -0.05121231824159622, + -0.023917483165860176, + -0.013566230423748493, + -0.007059148512780666, + -0.0003762477426789701, + -0.024372126907110214, + 0.007278351578861475, + 0.03789776563644409, + 0.04458751529455185, + 0.02976289764046669, + -0.035527125000953674, + -0.03130543604493141, + 0.007716757711023092, + 0.04942622035741806, + -0.05306336656212807, + -0.06111704558134079, + 0.03167889267206192, + 0.010594812221825123, + 0.018559187650680542, + 0.0026771181728690863, + -0.010481150820851326, + -0.025346362963318825, + 0.030639709904789925, + -0.04429524391889572, + -0.0038198153488337994, + 0.042281825095415115, + -0.00850832462310791, + 0.060240235179662704, + 0.06819649040699005, + 0.03484515845775604, + 0.02243989333510399, + 0.019533423706889153, + -0.030363675206899643, + -0.002167674247175455, + 0.031013166531920433, + 0.018965119495987892, + -0.00018837758398149163, + -0.024664398282766342, + -0.005423245020210743, + -0.01164211519062519, + 0.057512372732162476, + 0.0223911814391613, + 0.05423244833946228, + 0.01523054949939251, + -0.05202418193221092, + -0.03284797817468643, + 0.021936537697911263, + 0.006417776923626661, + 0.01570954918861389, + -0.02055637165904045, + -0.03851478174328804, + 0.00090725690824911, + -0.02227752096951008, + 0.026612868532538414, + 0.013769196346402168, + -0.02549249865114689, + 0.042606569826602936, + -0.05182933434844017, + 0.004940186161547899, + 0.015693312510848045, + 0.018705323338508606, + -0.014102060347795486, + 0.00494830496609211, + -0.014491754584014416, + -0.05186180770397186, + 0.04604886844754219, + 0.006157980766147375, + 0.007789825554937124, + 0.019403524696826935, + -0.011609640903770924, + -0.030526049435138702, + 0.08560283482074738, + -0.018575426191091537, + 0.017925934866070747, + 0.0012218537740409374, + -0.00283949077129364, + 0.032182250171899796, + 0.007209343370050192, + 0.009336424060165882, + -0.00455861072987318, + -0.039066847413778305, + 0.028902322053909302, + 0.01758495159447193, + -0.008073977194726467, + -0.04299626499414444, + -0.010635404847562313, + -0.0023198984563350677, + -0.00938513595610857, + -0.06819649040699005, + 0.026320599019527435, + -0.03292916342616081, + 0.028431441634893417, + -0.004075552336871624, + -0.05306336656212807, + 0.024161042645573616, + 0.05377780646085739, + -0.011966860853135586, + 0.02052389644086361, + 0.03575444594025612, + 0.0011528454488143325, + -0.056538138538599014, + 0.025508735328912735, + -0.007972494699060917, + 0.04078799858689308, + 0.02724612131714821, + 0.0007915664464235306, + -0.01645646244287491, + -0.018055833876132965, + 0.01807207055389881, + 0.0598505400121212, + 0.03089950606226921, + -0.04056067392230034, + -0.06589080393314362, + 0.03526732698082924, + 0.008216053247451782, + 0.05234892666339874, + 0.008743764832615852, + -0.010456795804202557, + 0.03588434308767319, + -0.039553966373205185, + 0.003456506645306945, + 0.008151104673743248, + -0.010984506458044052, + -0.0193385761231184, + 0.051894281059503555, + -0.039846234023571014, + -0.02633683569729328, + -0.00623916694894433, + 0.012332199141383171, + -0.009815423749387264, + -0.0338059738278389, + -0.0025066270027309656, + 0.010797778144478798, + 0.0346178375184536, + 0.002610139548778534, + 0.005983430426567793, + -0.04923137277364731, + -0.009677407331764698, + -0.004534254781901836, + 0.03221472352743149, + 0.014913923107087612, + 0.02606080286204815, + -0.009125339798629284, + -0.0307371336966753, + 0.021725453436374664, + -0.013070994056761265, + -0.00686024222522974, + 0.02377134934067726, + 0.02287829853594303, + -0.006194514688104391, + 0.011577166616916656, + -0.03078584559261799, + 0.022894537076354027, + 0.034098245203495026, + 0.014816499315202236, + -0.028106696903705597, + 0.024615686386823654, + 0.026564156636595726, + 0.008451493456959724, + -0.005784523673355579, + -0.016261614859104156, + 0.017373867332935333, + -0.004992957226932049, + -0.017763562500476837, + -0.015141244977712631, + 0.0012046017218381166, + -0.05247882381081581, + -0.03676115721464157, + -0.024972906336188316, + 0.020166676491498947, + -0.03555959835648537, + 0.0270837489515543, + -0.018331866711378098, + 0.006742522120475769, + -0.013070994056761265, + 0.004420593846589327, + 0.019695796072483063, + -0.039229221642017365, + -0.0021027252078056335, + -0.038254983723163605, + 0.02271592617034912, + 0.0003133283753413707, + 0.06865113228559494, + 0.0047128647565841675, + 0.003777192672714591, + -0.0162859708070755, + -0.006295997649431229, + 0.029048457741737366, + 0.028236594051122665, + -0.009547509253025055, + -0.034715261310338974, + 0.03802766278386116, + 0.019159967079758644, + -0.03562454879283905, + 0.010042745620012283, + 0.016756853088736534, + 0.02752215601503849, + -0.03974881395697594, + 0.006052438635379076, + -0.0040796115063130856, + 0.019598372280597687, + -0.029568050056695938, + -0.014102060347795486, + -0.03702095150947571, + 0.036014243960380554, + -0.016188548877835274, + -0.006446192041039467, + -0.024891719222068787, + -0.006121446844190359, + 0.028837373480200768, + 0.0037386291660368443, + -0.0014989021001383662, + 0.006827767938375473, + -0.030201302841305733, + 0.010602930560708046, + -0.02149813249707222, + -0.02308938279747963, + -0.03864467889070511, + -0.05218655243515968, + -0.026499208062887192, + 0.01616419292986393, + -0.034422989934682846, + -0.01674061454832554, + -0.005281168967485428, + -0.02732730843126774, + -0.008155163377523422, + 0.07417180389165878, + -0.03643641248345375, + 0.042444195598363876, + -0.02805798500776291, + -0.03487763553857803, + 0.032961636781692505, + -0.048679303377866745, + 0.0022285638842731714, + -0.02511904016137123, + -0.008069918490946293, + 0.03737817332148552, + 0.03848230466246605, + 0.01966332085430622, + -0.033448755741119385, + -0.009937203489243984, + -0.03695600479841232, + -0.021969012916088104, + -0.029210830107331276, + 0.05923352390527725, + 0.06748205423355103, + -0.01701664924621582, + -0.012210419401526451, + -0.028837373480200768, + -0.01860789954662323, + -0.02271592617034912, + 0.01739010587334633, + -0.029015982523560524, + -0.005066025070846081, + 0.003901001764461398, + 0.026109514757990837, + -0.06209128350019455, + 0.03164641931653023, + 0.011983097530901432, + -0.007895367220044136, + 0.02092982828617096, + 0.019046306610107422, + 0.0346178375184536, + -0.007692401763051748, + 0.0005500371917150915, + 0.012527045793831348, + -0.033773500472307205, + -0.02997398190200329, + 0.011163116432726383, + -0.024079855531454086, + -0.03494258224964142, + -0.0033814094495028257, + 0.0025999911595135927, + 0.013257722370326519, + -0.005796701647341251, + 0.010351252742111683, + -0.01995559222996235, + -0.0354297012090683, + -0.02973042242228985, + 0.016562005504965782, + 0.014735313132405281, + -0.021514369174838066, + 0.015587769448757172, + 0.009920965880155563, + 0.004980779252946377, + -0.011715183034539223, + 0.014199484139680862, + 0.0046641528606414795, + -0.03266936540603638, + -0.0009224793175235391, + -0.008410900831222534, + -0.01258387602865696, + 0.010010270401835442, + -0.03159770742058754, + -0.022667214274406433, + 0.026856428012251854, + -0.010659760795533657, + 0.005029491148889065, + -0.05452471971511841, + -0.01990688033401966, + -0.025914667174220085, + 0.03659878298640251, + -0.01147974282503128, + -0.007046971004456282, + -0.01107381097972393, + 0.06053250655531883, + 0.0019647085573524237, + -0.019809456542134285, + -0.0003014041285496205, + 0.022829586640000343, + -0.034747734665870667, + 0.03526732698082924, + -0.02757086791098118, + 0.00488741509616375, + 0.01227536890655756, + -0.00444900942966342, + 0.04413287341594696, + -0.031256724148988724, + 0.013931568711996078, + -0.0333838053047657, + 0.02198524959385395, + 0.009815423749387264, + 0.019208678975701332, + -0.019208678975701332, + -0.004863059148192406, + 0.01726020686328411, + -0.013184655457735062, + -0.007992791011929512, + 0.03484515845775604, + 0.024453314021229744, + 0.003188591916114092, + -0.013549993745982647, + -0.02825283259153366, + -0.004432771820574999, + -0.0073189446702599525, + 0.005163448862731457, + -0.007550325710326433, + 0.0009229867137037218, + 0.019565898925065994, + -0.015327973291277885, + -0.0002912558557000011, + -0.015417277812957764, + -0.006961725186556578, + 0.06641039252281189, + 0.0018378548556938767, + 0.015823209658265114, + 0.02849639020860195, + 0.0226022657006979, + 0.0003770088660530746, + 0.001973841805011034, + 0.07436665147542953, + -0.019192440435290337, + 0.002717711264267564, + 0.005106618162244558, + -0.021157149225473404, + -0.02263474091887474, + 0.000616508477833122, + -0.011146878823637962, + -0.013817908242344856, + 0.013688010163605213, + -0.0035701675806194544, + 0.03757302090525627, + -0.02279711328446865, + -0.0015049909707158804, + -0.010716591961681843, + -0.030201302841305733, + 0.04465246573090553, + -0.019354814663529396, + 0.007124097552150488, + -0.00523245707154274, + -0.022618502378463745, + -0.004964542109519243, + 0.0338059738278389, + 0.0007661957060918212, + -0.020377760753035545, + -0.009052271954715252, + 0.0007377804722636938, + 0.04432772099971771, + 0.028642525896430016, + 0.00635282788425684, + 0.0086544593796134, + 0.007294589187949896, + 0.008881781250238419, + 0.022342469543218613, + 0.01852671429514885, + -0.022894537076354027, + 0.0041100564412772655, + 0.0018672848818823695, + -0.006945488043129444, + -0.016318446025252342, + 0.012794961221516132, + 0.0020803988445550203, + -0.013363264501094818, + 0.01022135466337204, + 0.015401041135191917, + -0.018542950972914696, + 0.004339407663792372, + -0.011211828328669071, + -0.0073920125141739845, + 0.0026060801465064287, + -0.04893910139799118, + -0.025476260110735893, + 0.03005516715347767, + 0.019452236592769623, + 0.027505917474627495, + 0.028398968279361725, + -0.003182502929121256, + 0.003976099193096161, + -0.009929084219038486, + -0.0173089187592268, + -0.0403008796274662, + 0.007176869083195925, + 0.01844552718102932, + 0.023430366069078445, + -0.040203455835580826, + -0.01378543395549059, + -0.0028618171345442533, + -0.0025878131855279207, + -0.00979106780141592, + 0.04377565160393715, + 0.0026811775751411915, + 0.007111920043826103, + 0.03607919067144394, + 0.009864135645329952, + -0.0038116967771202326, + -0.017032885923981667, + 0.0047737546265125275, + -0.00989660993218422, + 0.020783692598342896, + 0.003432150697335601, + -0.031825028359889984, + -0.00663697998970747, + 0.0039679803885519505, + 0.000361025333404541, + 0.029503101482987404, + 0.010960150510072708, + 0.016886750236153603, + 0.022115148603916168, + 0.03659878298640251, + 0.006434014067053795, + -0.0017607278423383832, + -0.008727527223527431, + -0.013655535876750946, + 0.03387092426419258, + -0.014028992503881454, + -0.01898135617375374, + -0.019111255183815956, + -0.0061052097007632256, + -0.01950094848871231, + 0.010611048899590969, + -0.01624537818133831, + 0.06793669611215591, + -0.01406958606094122, + 0.02658039517700672, + -0.015579651109874249, + -0.0018246620893478394, + 0.026515444740653038, + -0.00036787541466765106, + 0.018916407600045204, + -0.002691325731575489, + 0.017292682081460953, + 0.006393420975655317, + 0.02325175702571869, + 0.014978872612118721, + 0.018494239076972008, + 0.039196744561195374, + -0.015806972980499268, + -0.0033692314755171537, + -0.004282577428966761, + -0.015620243735611439, + -0.02406361885368824, + 0.020783692598342896, + 0.016838038340210915, + -0.03301034867763519, + -0.0019302042201161385, + 0.042281825095415115, + 0.023917483165860176, + -0.027148699387907982, + -0.006515200715512037, + 0.019679559394717216, + 0.020215388387441635, + -0.017779799178242683, + -0.018169494345784187, + -0.024940431118011475, + 0.014719076454639435, + -0.010481150820851326, + -0.006275700870901346, + 0.0007261099526658654, + 0.008727527223527431, + -0.011820725165307522, + 0.05488193780183792, + -0.02190406434237957, + -0.018948882818222046, + 0.0513097420334816, + -0.0822254866361618, + -0.0008428152650594711, + -0.015043821185827255, + -0.0046763308346271515, + -0.014995109289884567, + 0.004032929427921772, + 0.012567639350891113, + 0.016886750236153603, + -0.03387092426419258, + -0.004233865533024073, + -0.04491226002573967, + 0.0024031144566833973, + -0.004465246573090553, + -0.02703503705561161, + -0.05153706297278404, + 0.05267367139458656, + 0.013030401431024075, + 0.030477337539196014, + -0.017568714916706085, + -0.010838370770215988, + -0.00867069698870182, + -0.011000743135809898, + 0.0268726646900177, + 0.0026527622248977423, + 0.05546648055315018, + -0.011617759242653847, + -0.034585364162921906, + 0.009498797357082367, + -0.015392922796308994, + 0.0006231048610061407, + 0.008751883171498775, + -0.0013791522942483425, + 0.00877623911947012, + 0.048679303377866745, + -4.265451934770681e-05, + -0.014597296714782715, + -0.019695796072483063, + 0.015319854952394962, + 0.028155408799648285, + -0.0006185381207615137, + -0.010497388429939747, + -0.022293757647275925, + -0.03029872663319111, + -0.0020184942986816168, + 0.02011796459555626, + 0.020085491240024567, + -0.005841354373842478, + -0.007359538227319717, + 0.013387620449066162, + -0.006555793806910515, + 0.03877457603812218, + 0.025963379070162773, + -0.03594929352402687, + 0.001935278414748609, + -0.02222880907356739, + -0.021075963973999023, + 0.024161042645573616, + -0.01311158761382103, + 0.026190700009465218, + -0.0015770439058542252, + 0.03594929352402687, + 0.03465031087398529, + 0.05377780646085739, + 0.022699689492583275, + 0.02617446333169937, + -0.019565898925065994, + -0.0005173089448362589, + 0.002900380641222, + 0.016074886545538902, + 0.0073798345401883125, + 0.003939565271139145, + -0.012941095978021622, + -0.0040430775843560696, + 0.013728602789342403, + 0.0201504398137331, + 0.016464581713080406, + 0.028106696903705597, + 0.014175128191709518, + 0.0037020952440798283, + 0.04634113982319832, + -0.006348768714815378, + -0.01553093921393156, + 0.02914588153362274, + 0.038125086575746536, + 0.021887825801968575, + -0.03721579909324646, + 0.05410255119204521, + 0.03981376066803932, + -0.013939687982201576, + -0.000497266068123281, + -0.007209343370050192, + -0.015336091630160809, + -0.04702310636639595, + -0.005800761282444, + -0.03916427120566368, + 0.02068626880645752, + 0.0017414460889995098, + -0.0067019290290772915, + 0.05394017696380615, + -0.033773500472307205, + -0.007241818122565746, + -0.00426633981987834, + 0.022894537076354027, + 0.028480153530836105, + -0.02133576013147831, + 0.019371051341295242, + -0.003432150697335601, + 0.002200148766860366, + 5.0741437007673085e-05, + 0.01648893766105175, + -0.01455670315772295, + 0.003846200881525874, + -0.001796246855519712, + 0.03559207543730736, + 0.056245867162942886, + 0.015279261395335197, + -0.01799088343977928, + -0.03728074952960014, + 0.005618092138320208, + 0.027635816484689713, + 0.01416700892150402, + 0.0333838053047657, + 0.025378836318850517, + 0.04185965657234192, + 0.009360780008137226, + 0.003194680903106928, + 0.027587104588747025, + 0.011341726407408714, + 0.026158224791288376, + 0.0011812606826424599, + -0.014426805078983307, + 0.018429290503263474, + -0.013379502110183239, + 0.012957333587110043, + -0.024161042645573616, + -0.033611126244068146, + -0.0047615766525268555, + -0.020978540182113647, + 0.012015572749078274, + 0.015449753031134605, + -0.0011203709291294217, + 0.02308938279747963, + -0.009157815016806126, + 0.02443707548081875, + 0.013135943561792374, + 0.0038238747511059046, + -0.005386711098253727, + -0.030314963310956955, + -0.0020519837271422148, + 0.03236085921525955, + -0.04572412371635437, + -0.013403858058154583, + 0.038742102682590485, + -0.03575444594025612, + -0.00500919483602047, + -0.004323170520365238, + 0.011390437372028828, + -0.0054394821636378765, + -0.007708638906478882, + 0.04091789573431015, + 0.024566974490880966, + 0.01971203275024891, + -0.021189624443650246, + -0.056862883269786835, + -0.03370855003595352, + 0.04461998865008354, + -0.017682375386357307, + 0.022342469543218613, + -0.0014867241261526942, + 0.02841520495712757, + 0.02500537969172001, + 0.025183990597724915, + 0.002853698330000043, + -0.007509732618927956, + -0.00523245707154274, + -0.04185965657234192, + -0.0066897510550916195, + 0.0039618914015591145, + 0.029162118211388588, + -0.012462097220122814, + -0.020426472648978233, + -0.031240487471222878, + -0.005289287306368351, + -0.0034341805148869753, + 0.00623916694894433, + -0.026759004220366478, + 0.000495743821375072, + -0.026239411905407906, + 0.013517518527805805, + 0.02044270932674408, + 0.025346362963318825, + -0.03057475946843624, + -0.011276776902377605, + -0.013980280607938766, + -0.04552927613258362, + -0.012486453168094158, + 0.04075552150607109, + -0.014857092872262001, + -0.004704745952039957, + 0.024047382175922394, + -0.0015689252177253366, + -0.0024213814176619053, + -0.027538392692804337, + -0.013509400188922882, + 0.021611792966723442, + -0.021205861121416092, + 0.05884382873773575, + 0.02549249865114689, + 0.02219633385539055, + 0.02104348875582218, + 0.020670032128691673, + 0.05650566518306732, + 0.006730344146490097, + -0.02732730843126774, + 0.021806640550494194, + 0.006320353597402573, + 0.019533423706889153, + 0.004045107401907444, + 0.028447680175304413, + -0.028074221685528755, + -0.009904728271067142, + 0.04458751529455185, + 0.009482559747993946, + 0.0035762565676122904, + -0.01034313440322876, + -0.005358295980840921, + 0.028967272490262985, + 0.04198955371975899, + -0.0333838053047657, + 0.03754054382443428, + 0.0028293426148593426, + -0.020458947867155075, + 0.010952032171189785, + 0.06517636030912399, + -0.008630103431642056, + 0.037443120032548904, + -0.004822466056793928, + 0.0566030889749527, + -0.011228065006434917, + 0.006949547212570906, + 0.030590998008847237, + 0.024615686386823654, + 0.011146878823637962, + 0.0005173089448362589, + 0.029210830107331276, + 0.017211494967341423, + -0.00995344016700983, + 0.015871921554207802, + -0.010732828639447689, + -0.053030889481306076, + 0.03284797817468643, + -0.014637889340519905, + -0.008962967433035374, + 0.03247452154755592, + -0.010724710300564766, + -0.00573175260797143, + -0.007948138751089573, + -1.9345172404428013e-05, + 0.031208014115691185, + -0.00853267963975668, + -0.03822251036763191, + -0.004660093691200018, + -0.04828961193561554, + -0.002167674247175455, + 0.0061539215967059135, + -0.023203045129776, + -0.008946729823946953, + -0.004582966677844524, + 0.014215720817446709, + -0.04108026623725891, + -0.00949067808687687, + -0.03000645712018013, + 0.02349531464278698, + -0.03367607668042183, + -0.0051756263710558414, + -0.022098910063505173, + 0.0238200593739748, + 0.016724377870559692, + 0.01726020686328411, + 0.0029450329020619392, + 0.03627403825521469, + -0.010976388119161129, + -0.030428625643253326, + -0.0016724377637729049, + -0.009588101878762245, + -0.015060058794915676, + 0.021644268184900284, + 0.012591995298862457, + 0.025021618232131004, + -0.01750376634299755, + 0.003424032125622034, + -0.0023016314953565598, + -0.01982569508254528, + 0.008037443272769451, + -0.03291292488574982, + -0.023560263216495514, + -0.027587104588747025, + -0.0008220112649723887, + 0.05549895390868187, + -0.010351252742111683, + -0.007639630697667599, + 0.000985398655757308, + -0.019549660384655, + -0.022780874744057655, + 0.014337500557303429, + -0.0006225974066182971, + 0.007412309292703867, + 0.00427445862442255, + 0.02068626880645752, + -0.01852671429514885, + 0.017000410705804825, + -0.0034585364628583193, + 0.021351996809244156, + -0.0015557324513792992, + -0.004286636598408222, + -0.005727693438529968, + -0.01062728650867939, + 0.006555793806910515, + -0.010554218664765358, + 0.04575659707188606, + 0.015206193551421165, + 0.005033550783991814, + -0.010083338245749474, + -0.014702838845551014, + -0.001283758319914341, + 0.005585617385804653, + -0.028967272490262985, + -0.02333294227719307, + -0.0022346528712660074, + -0.004493661690503359, + -0.004936126992106438, + 0.016277853399515152, + 0.032880451530218124, + 0.016294090077280998, + -0.006458370015025139, + 0.02011796459555626, + -0.020572608336806297, + 5.051944390288554e-05, + 0.0019159966614097357, + -0.02703503705561161, + 0.008849306963384151, + -0.007810121867805719, + 0.03831993415951729, + -0.009019797667860985, + 0.010732828639447689, + -0.010870845057070255, + 0.024128567427396774, + -0.03008764237165451, + 0.06598822772502899, + -0.0001220965787069872, + 0.00719716539606452, + -0.016359038650989532, + 0.029080932959914207, + 0.007298648357391357, + -0.0010138138895854354, + -0.01739010587334633, + -0.029990218579769135, + -0.034098245203495026, + 0.07527593523263931, + -0.022001486271619797, + 0.029746660962700844, + 0.00906039122492075, + 0.001151830656453967, + -0.012835553847253323, + 0.007351419422775507, + -0.008743764832615852, + 0.0034524474758654833, + 0.004286636598408222, + -0.012981689535081387, + 0.029941506683826447, + -0.0105866938829422, + -0.05163448676466942, + 0.012056165374815464, + -0.007217462174594402, + 0.012486453168094158, + 0.0023077204823493958, + 0.0028049866668879986, + 0.005873828660696745, + 0.03854725509881973, + -0.0032027994748204947, + -0.01799088343977928, + 0.009092865511775017, + 0.0040471372194588184, + -0.031208014115691185, + -0.02141694538295269, + -0.023755110800266266, + -0.005524727515876293, + -0.020329048857092857, + -0.010952032171189785, + 0.008500205352902412, + 0.020426472648978233, + -0.03357865288853645, + -0.014321262948215008, + -0.007209343370050192, + 0.0054881940595805645, + -0.0033387865405529737, + 0.023722637444734573, + -0.01329019758850336, + -0.013931568711996078, + 0.013079112395644188, + 0.03000645712018013, + -0.0012492542155086994, + -0.027018800377845764, + -0.006170158740133047, + 0.009579983539879322, + 0.0307371336966753, + -0.009937203489243984, + 0.009003560990095139, + 0.0030404268763959408, + -0.018055833876132965, + 0.03156523406505585, + 0.0028922618366777897, + 0.010773422196507454, + -0.002691325731575489, + 0.03111059032380581, + 0.017114071175456047, + 0.016756853088736534, + 0.009044153615832329, + -0.024615686386823654, + 0.005195923149585724, + -0.009214645251631737, + 0.03935911878943443, + -0.027798188850283623, + -0.03159770742058754, + 0.03757302090525627, + -0.00405931519344449, + -0.0031297318637371063, + -0.010692236013710499, + 0.015904396772384644, + 0.03367607668042183, + 0.007245877292007208, + 0.027099987491965294, + 0.009068509563803673, + -0.03187374025583267, + -0.01685427501797676, + -0.0032596299424767494, + -0.02344660274684429, + 0.009441966190934181, + -0.0027562747709453106, + 0.005776405334472656, + -0.014710957184433937, + -0.015547175891697407, + 0.014767787419259548, + -0.027229884639382362, + 2.8700625989586115e-05, + -0.03815755993127823, + -0.0008336817845702171, + 0.02455073781311512, + -0.001389300567097962, + 0.01158528495579958, + 0.02101101353764534, + -0.0012380910338833928, + -0.009279593825340271, + 0.00922276359051466, + 0.029259542003273964, + 0.0032900748774409294, + -0.011333607137203217, + 0.003596553113311529, + 0.022991960868239403, + 0.0066166832111775875, + 0.009839779697358608, + -0.007400131318718195, + 0.03227967396378517, + 0.017779799178242683, + 0.0692356750369072, + 0.014256314374506474, + -0.011877555400133133, + -0.019890643656253815, + -0.045301955193281174, + 0.004453068599104881, + 0.026515444740653038, + 0.0013223218265920877, + -0.01828315481543541, + -0.013509400188922882, + 0.012129233218729496, + -0.023949958384037018, + -0.0014715016586706042, + -0.010562337934970856, + -0.004412475507706404, + 0.030769607052206993, + 0.018997594714164734, + -0.0015506583731621504, + -0.023625213652849197, + -0.004582966677844524, + 0.014702838845551014, + 0.013574349693953991, + 0.001796246855519712, + -0.014743432402610779, + -0.009888491593301296, + -0.012023691087961197, + 0.012324079871177673, + -0.007274292409420013, + -0.041599858552217484, + 0.0047128647565841675, + -0.009027916938066483, + -0.0012563579948619008, + -0.030152590945363045, + 0.021595556288957596, + 0.006174217909574509, + 0.01823444291949272, + -0.015774497762322426, + 0.021465657278895378, + -0.004384060390293598, + 0.007684283424168825, + 0.03141909837722778, + 0.0012188092805445194, + 0.02039399929344654, + 0.029210830107331276, + 0.03526732698082924, + 0.014443042688071728, + -0.03370855003595352, + -0.013160299509763718, + 0.02039399929344654, + -0.003923328127712011, + 0.02927577868103981, + 0.017568714916706085, + 0.04286636784672737, + 0.008435256779193878, + 0.01494639739394188, + -0.0016683784779161215, + -0.022813349962234497, + -0.005816998425871134, + -0.01971203275024891, + -0.019371051341295242, + -0.01604241319000721, + 0.015149363316595554, + -0.0007154542836360633, + -0.021709216758608818, + 0.032068587839603424, + 0.009937203489243984, + -0.015254905447363853, + -0.007753291632980108, + 0.029649237170815468, + -0.008362188935279846, + -0.002742067212238908, + 0.004997016862034798, + 0.004879296757280827, + 0.010383727960288525, + -0.014215720817446709, + 0.027213647961616516, + -0.0014704868663102388, + 0.008354070596396923, + -0.0015181838534772396, + -0.024290941655635834, + -0.019841931760311127, + 0.013866620138287544, + -0.016724377870559692, + 0.017779799178242683, + -0.026726529002189636, + 0.016196666285395622, + 0.02333294227719307, + 0.010968268848955631, + 0.005752049386501312, + 0.01693546213209629, + -0.009441966190934181, + -0.006868361029773951, + -0.011731420643627644, + 0.00837030727416277, + 0.004765635821968317, + -0.005256813019514084, + 0.03903437405824661, + 0.01914372853934765, + -0.02938944101333618, + -0.0443926677107811, + -0.028610052540898323, + -0.016350921243429184, + 0.013549993745982647, + -0.011146878823637962, + -0.02443707548081875, + -0.013200892135500908, + 0.014443042688071728, + -0.01074906624853611, + 0.0018794628558680415, + 0.004599203821271658, + 0.01247833389788866, + 0.03005516715347767, + -0.010554218664765358, + 0.01739010587334633, + -0.0008428152650594711, + -0.01742257922887802, + 0.009247119538486004, + 0.025216463953256607, + -0.02630436047911644, + -0.030477337539196014, + -0.018883932381868362, + 0.015806972980499268, + -0.006827767938375473, + 0.025135278701782227, + 0.029210830107331276, + 0.009677407331764698, + 0.013209010474383831, + 0.03314024582505226, + 0.013095350004732609, + -0.009198407642543316, + -0.048711780458688736, + 0.004142530728131533, + 0.00922276359051466, + 0.00048305848031304777, + -0.016537649556994438, + 0.021709216758608818, + -0.029097169637680054, + 0.007030733395367861, + 0.012104877270758152, + -0.00022579939104616642, + 0.02039399929344654, + 0.015449753031134605, + -0.007525969762355089, + 0.001497887191362679, + 0.01836434006690979, + -0.02011796459555626, + -0.04893910139799118, + -0.01652953028678894, + 0.01958213560283184, + 0.0018693145830184221, + -0.026499208062887192, + 0.0033083416055887938, + -0.0022569792345166206, + -0.021969012916088104, + 0.03757302090525627, + -0.025589922443032265, + -0.0073311226442456245, + 0.0014238046715036035, + 0.015847565606236458, + -0.013931568711996078, + -0.03403329849243164, + 0.009685525670647621, + -0.038092613220214844, + 0.011406674981117249, + -0.007128157187253237, + 0.03273431584239006, + 0.05419997498393059, + 0.008313477039337158, + 0.010692236013710499, + -0.02633683569729328, + 0.03968386352062225, + 0.011650233529508114, + 0.017130309715867043, + 0.0008179519791156054, + -0.019858168438076973, + -0.02141694538295269, + 0.027944324538111687, + -0.00962869543582201, + 0.011999335139989853, + -0.0014187305932864547, + 0.02128704823553562, + 0.02235870622098446, + -0.013330790214240551, + 0.018575426191091537, + -0.007996850647032261, + -0.0002412755275145173, + 0.014897685497999191, + 0.03594929352402687, + -0.014629771001636982, + 0.006109268870204687, + -0.035072483122348785, + 0.012843672186136246, + -0.009994033724069595, + -0.03154899552464485, + 0.006949547212570906, + -0.0008808713755570352, + -0.00020499540551099926, + 0.0037264511920511723, + -0.04825713485479355, + 0.02312185801565647, + -0.024826770648360252, + -0.01877027191221714, + 0.026807716116309166, + 0.04205450415611267, + -0.0009651021100580692, + 0.0032332444097846746, + 0.012161707505583763, + -0.018104543909430504, + 6.66377763991477e-06, + 0.001398434047587216, + -0.005532846320420504, + -0.017698613926768303, + -0.02830154448747635, + -0.00023924587003421038, + 0.01742257922887802, + -0.0023503433912992477, + -0.0019931236747652292, + 0.008017146959900856, + 0.022829586640000343, + 0.0025330125354230404, + -0.022569790482521057, + 0.004883355926722288, + -0.007911604829132557, + -0.02536259964108467, + -0.020799929276108742, + 0.019890643656253815, + -0.02557368390262127, + -0.008792475797235966, + 0.005260872188955545, + -0.0072377584874629974, + 0.0009356720838695765, + -0.022098910063505173, + -0.024242229759693146, + -0.0006951576797291636, + 0.04088541865348816, + 0.019841931760311127, + -0.0006291938479989767, + -0.0382874570786953, + 0.0012685359688475728, + 0.016708141192793846, + -0.012145470827817917, + -0.018575426191091537, + 0.008451493456959724, + 0.020377760753035545, + -0.005800761282444, + 0.032555706799030304, + -0.016472700983285904, + -0.0025066270027309656, + 0.004294755402952433, + 0.0015496434643864632, + -0.006742522120475769, + 0.024907955899834633, + 0.020085491240024567, + -0.01130113285034895, + 0.02101101353764534, + 0.018137019127607346, + 0.009961558505892754, + 0.0029612702783197165, + -0.0162859708070755, + -0.037767864763736725, + 0.008589510805904865, + 0.0006799352704547346, + 0.03429309278726578, + -0.018088307231664658, + -0.01117935311049223, + 0.018299391493201256, + 0.0038421417120844126, + -0.04841950908303261, + 0.027944324538111687, + 0.02092982828617096, + -0.016310326755046844, + -0.004574847873300314, + 0.0014390271389856935, + -0.01231596153229475, + 0.00849208701401949, + -0.0039375354535877705, + 0.01011581253260374, + -0.0018195878947153687, + -0.004509898833930492, + -0.019371051341295242, + 0.02287829853594303, + 0.02922706864774227, + -0.0036006122827529907, + -0.007103801239281893, + 0.015441633760929108, + 0.021839113906025887, + 0.012161707505583763, + -0.0012492542155086994, + -0.014102060347795486, + 0.025135278701782227, + -0.0012076462153345346, + -0.014581059105694294, + -0.02422599121928215, + -0.022163860499858856, + 0.011349844746291637, + 0.018737798556685448, + 0.012900503352284431, + 0.002559398068115115, + -0.00906039122492075, + 0.01722773350775242, + 0.01682180166244507, + 0.004154708702117205, + 0.010335016064345837, + 0.004201390780508518, + -0.0048346440307796, + -0.04923137277364731, + -0.015003228560090065, + -0.00877623911947012, + 0.013712366111576557, + 0.014889567159116268, + -0.009076627902686596, + 0.037767864763736725, + 0.046438563615083694, + -0.0031540878117084503, + -0.008914255537092686, + 0.004118175245821476, + 0.005585617385804653, + -0.03721579909324646, + 0.013614942319691181, + -0.021595556288957596, + -0.011203709058463573, + 0.013801670633256435, + -0.025151515379548073, + -0.0038807052187621593, + 0.010489270091056824, + 0.024989143013954163, + 0.006405598949640989, + -0.006251344922930002, + 0.009092865511775017, + -0.023625213652849197, + -0.007830418646335602, + 0.010481150820851326, + 0.03037991374731064, + ], + "index": 56, + }, + { + "title": "Thomas P. Hughes", + "text": "Thomas Parke Hughes (September 13, 1923 - February 3, 2014) was an American historian of technology. He was an emeritus professor of history at the University of Pennsylvania and a visiting professor at MIT and Stanford.He received his Ph.D. from the University of Virginia in 1953.He, along with John B. Rae, Carl W.", + "vector": [ + -0.0011566150933504105, + 0.02045382373034954, + -0.032816026359796524, + 0.03800065815448761, + 0.04102752357721329, + 0.0012109337840229273, + -0.013973033986985683, + 0.005210855044424534, + 0.004982341546565294, + 0.052116043865680695, + -0.013133902102708817, + -0.006492028944194317, + 0.015688756480813026, + 0.03257627412676811, + 0.003187949536368251, + 0.008166545070707798, + -0.07078671455383301, + 0.0034164628013968468, + -0.06113670393824577, + 0.01801135204732418, + 0.05613188445568085, + -0.018071290105581284, + -0.07528205960988998, + 0.007567165419459343, + 0.031197700649499893, + 0.03095794841647148, + 0.022536667063832283, + 0.004802527837455273, + 0.021472768858075142, + 0.018311042338609695, + -0.014849626459181309, + 0.061196643859148026, + 0.03016377054154873, + -0.047380946576595306, + 0.013508514501154423, + -0.030133802443742752, + -0.02745157852768898, + -0.00461896788328886, + -0.021292954683303833, + 0.03566307574510574, + 0.016273152083158493, + -0.014752226881682873, + -0.02067859098315239, + 0.026597462594509125, + -0.006877879146486521, + 0.006896609906107187, + -0.03067324310541153, + -0.018535809591412544, + 0.01612330786883831, + 0.013298731297254562, + -0.007619611453264952, + -0.046272095292806625, + -0.026357712224125862, + 0.013366161845624447, + -0.032905932515859604, + -0.016333090141415596, + 0.0715659037232399, + 0.06982770562171936, + -0.010017129592597485, + 0.010211927816271782, + -0.007649580482393503, + 0.031197700649499893, + -0.013043995015323162, + 0.006769241765141487, + 0.04741091653704643, + 0.0039933654479682446, + 0.00921545922756195, + 0.023016171529889107, + -0.014579905197024345, + -0.004390454385429621, + 0.04192659258842468, + -0.03725143149495125, + 0.013276254758238792, + 0.027511516585946083, + 0.04417426511645317, + -0.02096329629421234, + 0.014572412706911564, + 0.010122020728886127, + -0.0023038648068904877, + -0.001865568570792675, + -0.007331159897148609, + -0.03269615024328232, + -0.021772459149360657, + 0.00305683515034616, + 0.0005694105057045817, + -0.0015583866043016315, + 0.028725260868668556, + -0.05652148276567459, + 0.02578830160200596, + 0.05568234995007515, + 0.010002144612371922, + 0.03707161918282509, + 0.03749118372797966, + -0.042675815522670746, + -0.054843220859766006, + 0.016887515783309937, + 0.014917056076228619, + -0.006394629366695881, + 0.03635236248373985, + -0.02906990423798561, + 0.003877235809341073, + 0.011987589299678802, + 0.03722146525979042, + 0.014744734391570091, + 0.04956867918372154, + -0.08019696921110153, + -0.03725143149495125, + 0.028545446693897247, + 0.06233546510338783, + 0.06020766496658325, + 0.002470567123964429, + 0.03647223860025406, + -0.012144926004111767, + 0.0019386179046705365, + -0.06287490576505661, + -0.008099114522337914, + -0.012796751223504543, + 0.03854009881615639, + -0.03602270409464836, + 0.012407154776155949, + -0.0009739916422404349, + 0.017471911385655403, + 0.020393885672092438, + 0.01897035911679268, + -0.0035232272930443287, + 0.011118489317595959, + -0.03016377054154873, + -0.0024761862587183714, + -0.009859791956841946, + -0.03626245632767677, + -0.015014455653727055, + 0.05930859595537186, + 0.03374506160616875, + -0.030778134241700172, + -0.047560758888721466, + -0.004693890456110239, + 0.046541813760995865, + 0.0071738227270543575, + 0.0024537097197026014, + 0.02478433959186077, + -0.012070003896951675, + 0.054093994200229645, + -0.04075780138373375, + -0.08337368071079254, + -0.055532507598400116, + -0.03964895009994507, + -0.025158952921628952, + -0.002210211707279086, + 0.01603339985013008, + 0.06695068627595901, + -0.017292097210884094, + -0.012032542377710342, + -0.03353527933359146, + -0.014534952118992805, + -0.013785727322101593, + -0.01598844677209854, + -0.02054373174905777, + -0.002099701203405857, + -0.02016911841928959, + 0.01583860255777836, + -0.01420529279857874, + -0.012174895033240318, + -0.037101589143276215, + 0.013673343695700169, + -0.025158952921628952, + -0.05831962078809738, + 0.03623248636722565, + -0.007342398166656494, + -0.0010788830695673823, + 0.016707701608538628, + -0.020199088379740715, + -0.008990691974759102, + 0.051336850970983505, + -0.0026597464457154274, + -0.008511188440024853, + 0.0010217546951025724, + -0.019749553874135017, + 0.03593279793858528, + -0.014287707395851612, + 0.016692718490958214, + -0.017891475930809975, + -0.015553897246718407, + 0.0072562373243272305, + 0.021532706916332245, + 0.019779521971940994, + 0.014804672449827194, + 0.025084029883146286, + 0.07875846326351166, + -0.049538712948560715, + -0.04702131822705269, + -0.030643275007605553, + -0.003806059481576085, + 0.0016379916341975331, + 0.008248959667980671, + 0.0015040677972137928, + -0.02629777416586876, + 0.03173714131116867, + -0.0011360113276168704, + -0.03722146525979042, + 0.013201332651078701, + -0.012871673330664635, + -0.005169647745788097, + 0.022416790947318077, + 0.030043894425034523, + -0.05115703493356705, + -0.012287278659641743, + 0.03140748292207718, + 0.018490856513381004, + -0.033924877643585205, + 0.005031041335314512, + -0.035303451120853424, + -0.027526501566171646, + 0.020274009555578232, + 0.010968644171953201, + -0.04072783514857292, + 0.013868141919374466, + -0.014017987065017223, + 0.03955904394388199, + 0.032726116478443146, + -0.021337907761335373, + 0.020513761788606644, + 0.011305795051157475, + 0.024724403396248817, + -0.01754683442413807, + -0.016917485743761063, + -0.006937817204743624, + -0.016363058239221573, + 0.011380717158317566, + 0.0072824605740606785, + 0.0358428917825222, + 0.0019386179046705365, + 0.01718720607459545, + -0.0012596333399415016, + 0.055562473833560944, + -0.0003273173642810434, + 0.0007613992202095687, + 0.014175323769450188, + -0.026792261749505997, + -0.02339078299701214, + -0.03173714131116867, + -0.02381034940481186, + 0.016752656549215317, + 0.011568023823201656, + -0.0032403951045125723, + 0.01068393886089325, + -0.004926149733364582, + -0.015074393711984158, + -0.05861930921673775, + -0.011350748129189014, + 0.04941883683204651, + 0.01621321402490139, + -0.018775561824440956, + 0.01515680830925703, + -0.004547791555523872, + -0.021337907761335373, + 0.04030826687812805, + -0.03994864225387573, + -0.026058021932840347, + -0.0348239466547966, + -0.017696678638458252, + -0.012489569373428822, + 0.012871673330664635, + -0.01072889193892479, + 0.036682020872831345, + -0.05643157660961151, + 0.03164723515510559, + 0.021502738818526268, + 0.017771601676940918, + 0.01723215915262699, + -0.0468115359544754, + -0.017247144132852554, + -0.04956867918372154, + 0.0068329256027936935, + -0.02698705904185772, + -0.016617795452475548, + -0.03311571478843689, + -0.052985142916440964, + -0.034614164382219315, + -0.027301734313368797, + 0.054603468626737595, + -0.0466916598379612, + -0.03500375896692276, + -0.017696678638458252, + -0.011867713183164597, + 0.01952478662133217, + -0.026447618380188942, + 0.019869428128004074, + 0.01658782549202442, + 0.03215670958161354, + -0.08403299748897552, + -0.01598844677209854, + -0.04564274474978447, + 0.012631922028958797, + 0.0026560002006590366, + -0.01865568570792675, + -0.03458419442176819, + 0.004004604183137417, + -0.02012416534125805, + -0.0537043996155262, + -0.03578295186161995, + 0.08199510723352432, + 0.030778134241700172, + -0.0233458299189806, + -0.0003952158149331808, + -0.04822007566690445, + -0.05043778195977211, + 0.00872846320271492, + 0.02463449537754059, + 0.03653217852115631, + -0.03919941559433937, + -0.0030081355944275856, + 0.016363058239221573, + 0.011935143731534481, + -0.0208584051579237, + 0.05355455353856087, + -0.0010704542510211468, + 0.026702355593442917, + 0.05112706869840622, + -0.02109815739095211, + -0.004626460373401642, + 0.0037760904524475336, + -0.0031542344950139523, + -0.05790005624294281, + 0.014842133969068527, + 0.04120733588933945, + -0.04968855530023575, + 0.007226268760859966, + 0.012212356552481651, + -0.0099496990442276, + 0.012519538402557373, + -0.03925935551524162, + -0.024035116657614708, + 0.015733711421489716, + -0.021248001605272293, + 0.11124482750892639, + -0.058049898594617844, + -0.0028020988684147596, + 0.05592210218310356, + -0.08181529492139816, + 0.019554754719138145, + 0.01841593347489834, + 0.042316190898418427, + -0.03961898013949394, + -0.0030868041794747114, + 0.00893824640661478, + -0.04150702804327011, + 0.030298631638288498, + 0.06092692166566849, + -0.019584722816944122, + 0.019779521971940994, + 0.0006906911730766296, + -0.07887833565473557, + 0.03353527933359146, + 0.028455540537834167, + -0.02174248918890953, + -0.038809821009635925, + 0.07576156407594681, + -0.0014375741593539715, + 0.052895236760377884, + -0.04630206152796745, + 0.061376456171274185, + 0.008915768936276436, + 0.02509901486337185, + 0.04699134826660156, + -0.0025286320596933365, + 0.027811206877231598, + -0.02225196175277233, + -0.018221136182546616, + -0.04486355185508728, + -0.0018824260914698243, + -0.024949170649051666, + 0.03071819618344307, + 0.0022570383735001087, + -0.0308081042021513, + 0.011553038842976093, + 0.0030680736526846886, + -0.0006658731144852936, + 0.0039933654479682446, + -0.022761434316635132, + -0.0010301833972334862, + -0.04546293243765831, + 0.007746979594230652, + 0.04063792526721954, + 0.03542332723736763, + -0.019359955564141273, + -0.020184103399515152, + -0.025413688272237778, + -0.005394414998590946, + 0.020528746768832207, + -0.014145354740321636, + 0.013598421588540077, + -0.02915981039404869, + -0.0052295858040452, + -0.01810126006603241, + 0.02915981039404869, + -0.030373554676771164, + 0.005866426508873701, + 0.021218033507466316, + 0.014130370691418648, + -0.0018777434015646577, + 0.013628390617668629, + 0.021218033507466316, + -0.02694210596382618, + -0.04504336789250374, + 0.017786584794521332, + -0.004308039788156748, + -0.03215670958161354, + 0.011732853017747402, + -0.04408435896039009, + 0.002376914257183671, + -0.0006335627986118197, + 0.009155521169304848, + 0.017217174172401428, + -0.030987918376922607, + -0.011013597249984741, + -0.0005324175581336021, + -0.014759719371795654, + 0.017861507833003998, + 0.026417650282382965, + -0.025323782116174698, + 0.07594137638807297, + 0.033325497061014175, + 0.03713155537843704, + 0.005664135795086622, + 0.04213637486100197, + 0.04144708812236786, + -0.023825332522392273, + -0.00596382562071085, + -0.002099701203405857, + 0.021352892741560936, + -0.017022376880049706, + -0.01994435116648674, + 0.003577546216547489, + 0.05996791273355484, + -0.0198993980884552, + -0.023375798016786575, + -0.014594890177249908, + 0.04513327404856682, + 0.026222851127386093, + 0.045343056321144104, + -0.004780051298439503, + -0.009620040655136108, + -0.0551728792488575, + 0.012362201698124409, + -0.10411220788955688, + 0.03329552710056305, + -0.0795975923538208, + -0.053914181888103485, + 0.00016564881661906838, + 0.03266618028283119, + -0.010571555234491825, + -0.023600565269589424, + -0.0323365218937397, + -0.019359955564141273, + -0.016108322888612747, + -0.03910950943827629, + 0.0038472667802125216, + -0.00020720735483337194, + -0.005570482928305864, + 0.016452966257929802, + 0.016887515783309937, + 0.05361449345946312, + 0.009792361408472061, + -0.032036833465099335, + -0.05061759427189827, + -0.010174466297030449, + 0.009073106572031975, + -0.012579476460814476, + -0.007327413652092218, + 0.030613305047154427, + 0.042406097054481506, + 0.039079539477825165, + 0.05115703493356705, + 0.04657178372144699, + -0.0019002201734110713, + 0.03329552710056305, + -0.0012128069065511227, + 0.013928079977631569, + 0.0005562990554608405, + -0.02016911841928959, + 0.009987160563468933, + 0.031197700649499893, + 0.028575414791703224, + -0.005956333130598068, + -0.021667568013072014, + -0.005926364567130804, + -0.007372367195785046, + -0.009080599062144756, + -0.013276254758238792, + 0.009807346388697624, + 5.581135701504536e-05, + 0.014707273803651333, + -0.0023319607134908438, + 0.014602381736040115, + -0.017202191054821014, + 0.018685653805732727, + -0.03266618028283119, + 0.03473404049873352, + -0.018730608746409416, + -0.011395702138543129, + 0.02827572636306286, + 0.08019696921110153, + 0.014062940143048763, + -0.049808431416749954, + -0.004843735136091709, + 0.014602381736040115, + 0.03824041038751602, + 0.04495345801115036, + -0.024065084755420685, + 0.010601524263620377, + 0.010653969831764698, + -0.011485609225928783, + 0.017696678638458252, + 0.02496415376663208, + 0.021292954683303833, + -0.002871402306482196, + -0.0317671112716198, + 0.02607300691306591, + 0.01805630698800087, + 0.025713378563523293, + 0.03125763684511185, + 0.03860003873705864, + -0.011478116735816002, + 0.016602810472249985, + -0.01570374146103859, + -0.0021914811804890633, + -0.04555283859372139, + -0.013201332651078701, + 0.016917485743761063, + -0.02478433959186077, + -0.024065084755420685, + 9.406277240486816e-05, + -0.0169025007635355, + 0.004285563249140978, + -0.014864610508084297, + 0.04270578548312187, + 0.020199088379740715, + 0.02842557057738304, + 0.025998083874583244, + -0.03997860848903656, + 0.011125980876386166, + 0.013133902102708817, + 0.05628173053264618, + 0.0015714979963377118, + -0.026447618380188942, + 0.011096011847257614, + 0.007368620950728655, + 0.007053947076201439, + -0.004888688679784536, + 0.016183245927095413, + -0.02072354406118393, + -0.004180671647191048, + 0.014549936167895794, + 0.004169433377683163, + 0.0327860563993454, + -0.006203577388077974, + -0.027481548488140106, + -0.004221878945827484, + -0.025578517466783524, + 0.003884728066623211, + 0.006645619869232178, + 0.0009332525660283864, + -0.010009637102484703, + -0.042675815522670746, + -0.04123730584979057, + -0.00710639264434576, + -0.00953762512654066, + 0.031167732551693916, + -0.01783153787255287, + -0.003575673094019294, + -0.013043995015323162, + -0.005810234695672989, + -0.03857006877660751, + 0.025908177718520164, + -0.017157236114144325, + 0.030088849365711212, + -0.011845236644148827, + -0.019359955564141273, + -0.051936231553554535, + 0.019929366186261177, + -0.012639414519071579, + 0.012886658310890198, + 0.020333947613835335, + 0.036322396248579025, + -0.02874024398624897, + 0.00218211580067873, + -0.011830251663923264, + -0.035723015666007996, + -0.003408970544114709, + -0.02565344050526619, + -0.02445468120276928, + -0.015673773363232613, + -0.00682917982339859, + 0.02496415376663208, + 0.05352458357810974, + 0.033085744827985764, + 0.00022230891045182943, + -0.032306551933288574, + 0.010489140637218952, + 0.03311571478843689, + 0.008503695949912071, + 0.04390454664826393, + 0.0144150760024786, + 0.012826720252633095, + -0.019030297175049782, + -0.004131972324103117, + 0.009635024704039097, + -0.07797926664352417, + -0.0023300875909626484, + -0.007308683358132839, + 0.000565196096431464, + -0.043365102261304855, + 0.008001715876162052, + -0.018161198124289513, + 0.04935889691114426, + 0.011687899008393288, + 0.01241464726626873, + 0.01759178750216961, + 0.019180143252015114, + 0.009118059650063515, + 0.01980949006974697, + 0.02118806354701519, + 0.032905932515859604, + -0.028245756402611732, + 0.030643275007605553, + -0.0144150760024786, + -0.013336192816495895, + 0.004941134247928858, + -0.025413688272237778, + 0.007278714329004288, + -0.009125552140176296, + 0.013530991040170193, + 0.009275397285819054, + 0.004929895978420973, + -0.004420423414558172, + -0.007226268760859966, + -0.00598630215972662, + 0.011178426444530487, + 0.035033728927373886, + -0.020528746768832207, + -0.00012502681056503206, + -0.009859791956841946, + -0.032396458089351654, + 0.02285134233534336, + -0.00948517955839634, + 0.001955475425347686, + 0.008930753916501999, + -0.0035344657953828573, + -0.010204435326159, + 0.007136361673474312, + 0.016932468861341476, + -0.019015314057469368, + -0.025173937901854515, + 0.019000329077243805, + 0.014092909172177315, + -0.01515680830925703, + 0.0012680621584877372, + 0.015074393711984158, + 0.01050412468612194, + -0.01907525025308132, + -0.028979996219277382, + -0.03569304570555687, + 0.02160762995481491, + 0.05661138892173767, + 0.00992722250521183, + -0.007125123403966427, + -0.025353750213980675, + -0.003236649092286825, + -0.03215670958161354, + 0.027106935158371925, + -0.005750296637415886, + 0.004776305053383112, + -0.016647763550281525, + 0.009305366314947605, + -0.024154992774128914, + -0.03377503156661987, + -0.03476400673389435, + 0.0258931927382946, + 0.013126409612596035, + -0.0056491512805223465, + 0.02671733871102333, + 0.008893292397260666, + -0.019359955564141273, + -0.025683410465717316, + -0.02800600416958332, + 0.013800712302327156, + -0.028994981199502945, + 0.028725260868668556, + -0.03260624408721924, + 0.0007108265999704599, + -0.039678920060396194, + 0.010833784006536007, + 0.0003577546158339828, + 0.0179214458912611, + 0.013029010966420174, + -0.0011715994914993644, + 0.011118489317595959, + -0.0482800155878067, + -0.004412931390106678, + -0.025113999843597412, + -0.02671733871102333, + 0.02892005816102028, + -0.004555284045636654, + 0.006484536454081535, + 0.011538054794073105, + 0.016243183985352516, + 0.01169539149850607, + -0.048160139471292496, + -0.04090764746069908, + -0.017666708678007126, + 0.026732323691248894, + 0.008720970712602139, + -0.01374826580286026, + 0.009934714064002037, + 0.018116243183612823, + 0.021248001605272293, + -0.004251847974956036, + 0.009013168513774872, + -0.04887939617037773, + 0.014115385711193085, + -0.0010601524263620377, + 0.021937288343906403, + -0.004461630713194609, + 0.01490207202732563, + -0.0012989676324650645, + -0.042346157133579254, + -0.02611795999109745, + 0.04141712188720703, + -0.050048183649778366, + -0.002416248433291912, + 0.0051359329372644424, + -0.003176711034029722, + 0.05292520672082901, + 0.005622928496450186, + 0.02698705904185772, + 0.024904215708374977, + 0.013590929098427296, + -0.02569839358329773, + -0.013388638384640217, + 0.02307610958814621, + 0.04836992174386978, + -0.014100401662290096, + 0.014295199885964394, + 0.003963396418839693, + -0.043544918298721313, + -0.006480790209025145, + 0.016198229044675827, + 0.011223380453884602, + -0.0009360621334053576, + -0.009410257451236248, + -0.0004570268210954964, + -0.015523928217589855, + -0.0547233447432518, + -0.03671199083328247, + 0.01068393886089325, + -0.03200686350464821, + 0.04363482445478439, + -0.019644660875201225, + 0.011260841973125935, + -0.018685653805732727, + -0.04357488453388214, + 0.024859262630343437, + -0.015508943237364292, + 0.015598850324749947, + -0.024574557319283485, + -0.004289309028536081, + -0.007342398166656494, + -0.006222308147698641, + 0.017531849443912506, + 0.011230872943997383, + 0.01093867514282465, + 0.0033565249759703875, + 0.030927980318665504, + 0.004761320538818836, + 0.0308081042021513, + -0.01574869453907013, + 0.014280215837061405, + -0.00819651409983635, + -0.013103933073580265, + -0.008653541095554829, + -0.026657400652766228, + -0.02165258303284645, + -0.06898857653141022, + 0.002747780177742243, + -0.013418607413768768, + 0.010376757010817528, + -0.019060267135500908, + 0.008885800838470459, + -0.007593388669192791, + -0.00829391274601221, + -0.04423420503735542, + 0.0072562373243272305, + 0.01861073262989521, + -0.002253292128443718, + 0.02169753611087799, + 0.012624429538846016, + 0.007289952598512173, + 0.011987589299678802, + 0.0233458299189806, + 0.01038424950093031, + 0.0008105670567601919, + 0.006136147305369377, + -0.0024387252051383257, + -0.00624103844165802, + 0.016138290986418724, + -0.022821372374892235, + 0.03248636797070503, + -0.04570268467068672, + -0.00644707540050149, + -0.02915981039404869, + 0.014939532615244389, + 0.015164299868047237, + 0.02805095911026001, + 0.02458954229950905, + 0.00712886918336153, + 0.024529604241251945, + 0.0238553024828434, + -0.004678905941545963, + -0.0342545360326767, + 0.005053517874330282, + -0.02336081489920616, + 0.0022589112631976604, + -0.01574869453907013, + 0.013823188841342926, + 0.014295199885964394, + 0.018685653805732727, + 0.031946923583745956, + -0.01439259946346283, + 0.015553897246718407, + -0.0008377264603041112, + -0.01796639896929264, + 0.04417426511645317, + -0.022791404277086258, + -0.053494617342948914, + -0.018251104280352592, + 0.02836563251912594, + -0.015958478674292564, + 0.03422456607222557, + 0.02533876709640026, + 0.02270149625837803, + 0.026972075924277306, + -0.00558546744287014, + -0.018400948494672775, + -0.018850483000278473, + 0.003575673094019294, + -0.007361128926277161, + -0.007421066984534264, + -0.04830998554825783, + -0.0007033343426883221, + -0.0238553024828434, + 0.02256663702428341, + -0.03266618028283119, + -0.029968973249197006, + 0.0047201132401824, + 0.04111742973327637, + 0.017801569774746895, + -0.0029875319451093674, + 0.020259026437997818, + -0.013883126899600029, + -0.012534522451460361, + 0.03434444218873978, + -0.026687370613217354, + -0.0010114528704434633, + -0.021712521091103554, + 0.010931182652711868, + 0.005300762131810188, + 0.0317671112716198, + 0.002629777416586876, + 0.04947877302765846, + -0.018341010436415672, + 0.003925935365259647, + 0.03895966336131096, + -0.0055779749527573586, + -0.0646730437874794, + 0.009177997708320618, + -8.563399751437828e-05, + -0.019794506952166557, + -0.015643803402781487, + 0.03662208467721939, + 0.02270149625837803, + -0.014130370691418648, + -0.013793219812214375, + -0.014010494574904442, + 0.0002183286560466513, + 0.012084987945854664, + -0.004499092232435942, + -0.0025473625864833593, + 0.006585681810975075, + 0.0019779521971940994, + 0.05067753419280052, + -0.002612919779494405, + -0.0005085360025987029, + -0.002685969229787588, + -0.03007386438548565, + 0.006608158349990845, + 0.00013111425505485386, + 0.0009510466479696333, + 0.012092480435967445, + -0.019374940544366837, + -0.020094195380806923, + 0.007394844200462103, + 0.010878737084567547, + -0.014250246807932854, + -0.013156378641724586, + -0.007604626938700676, + -0.06107676774263382, + 0.041986532509326935, + 0.013186347670853138, + 0.010054590180516243, + -0.01142567116767168, + -0.0045140767470002174, + 0.047830481082201004, + -0.03224661573767662, + -0.044563863426446915, + -0.002749653300270438, + 0.025818269699811935, + 0.0026822229847311974, + -0.02791609801352024, + -0.024199945852160454, + -0.04441401734948158, + -0.010668953880667686, + -0.0006611904827877879, + 0.0149245485663414, + 0.01658782549202442, + 0.014025479555130005, + -0.004637698642909527, + -0.0012605699012055993, + -0.031077824532985687, + 0.010122020728886127, + -0.01301402598619461, + -0.032036833465099335, + 0.016363058239221573, + 0.0027983528561890125, + -0.02045382373034954, + 0.01847587153315544, + 0.005169647745788097, + -0.011657929979264736, + -0.023840317502617836, + -0.011822760105133057, + 0.01340362336486578, + -0.00997217558324337, + -0.006799210794270039, + -0.007934285327792168, + 0.01612330786883831, + -0.029744205996394157, + -0.0045140767470002174, + -0.04039817675948143, + 0.04015842452645302, + 0.003500750521197915, + 0.02312106266617775, + 0.0003898307913914323, + 0.03623248636722565, + 0.024394743144512177, + 0.03536338731646538, + -0.02243177592754364, + -0.025593502447009087, + 0.00446912320330739, + -0.025593502447009087, + -0.001136947888880968, + 0.01068393886089325, + -0.020004289224743843, + -0.008091622963547707, + -0.017217174172401428, + -0.010796322487294674, + -0.02141283079981804, + -0.0061998311430215836, + -0.0007155092316679657, + -0.03416462987661362, + 0.0020603667944669724, + 0.022087132558226585, + -0.04675159603357315, + 0.06191589683294296, + 0.0009037518175318837, + -0.008765924721956253, + -0.026462603360414505, + -0.017022376880049706, + -0.0027384147979319096, + 0.0422862209379673, + 0.003770471317693591, + 0.023106077685952187, + 0.012287278659641743, + 0.026702355593442917, + 0.011545546352863312, + -0.031197700649499893, + 0.029444515705108643, + 0.04914911463856697, + -0.047980327159166336, + 0.03946913778781891, + -0.01717222109436989, + -0.045582808554172516, + -0.03467410057783127, + -0.008698494173586369, + 0.03317565098404884, + -0.05199616774916649, + 0.025248859077692032, + -0.0014853371540084481, + 0.02247672900557518, + -0.028620369732379913, + 0.002554854843765497, + -0.0072562373243272305, + -0.0002458392409607768, + 0.040607959032058716, + 0.009290381334722042, + -0.024244898930191994, + -0.009957191534340382, + 0.005008564796298742, + 0.013868141919374466, + 0.03782084211707115, + -0.014834641478955746, + 0.04195656254887581, + -0.014047956094145775, + -0.011500593274831772, + 0.03946913778781891, + -0.024904215708374977, + -0.022551652044057846, + -0.027466563507914543, + -0.02036391757428646, + 0.0213678777217865, + 0.005746550392359495, + 0.014055448584258556, + -0.02911485731601715, + 0.014744734391570091, + 0.006162370089441538, + -0.014632350765168667, + -0.010174466297030449, + 0.02496415376663208, + 0.008488711901009083, + 0.0040645417757332325, + 0.004555284045636654, + -0.020783482119441032, + 0.0037255180068314075, + 0.014107894152402878, + 0.03173714131116867, + -0.01616826094686985, + -0.024469666182994843, + 0.024110037833452225, + -0.010092051699757576, + -0.020978281274437904, + 0.011867713183164597, + 0.022551652044057846, + -0.0208584051579237, + -0.009050630033016205, + -0.026837214827537537, + 0.015823617577552795, + 0.0333554670214653, + -5.256276926957071e-05, + -0.014819657430052757, + 0.010863753035664558, + 0.02667238563299179, + -0.040697865188121796, + -0.015808632597327232, + 0.0032816024031490088, + 0.01579364947974682, + -0.02611795999109745, + -0.016647763550281525, + 0.014115385711193085, + -0.0422862209379673, + -0.002822702517732978, + 0.01374826580286026, + -0.0075034815818071365, + -0.012129941955208778, + -0.044054388999938965, + -0.006919086445122957, + -0.010871244594454765, + 0.01169539149850607, + 0.015718726441264153, + 0.02141283079981804, + -0.011036073789000511, + 0.00026644289027899504, + 0.02234186977148056, + 0.004446646198630333, + -0.013208825141191483, + -0.002316976198926568, + 0.013665851205587387, + -0.007458528038114309, + 0.03155732899904251, + 0.006638127379119396, + -0.016557857394218445, + -0.01787649281322956, + 0.005120948422700167, + 0.011163442395627499, + -0.020648622885346413, + 0.0005108773475512862, + 0.011081027798354626, + -0.027436595410108566, + 0.022716481238603592, + 0.042256250977516174, + -0.016228199005126953, + -0.03128760680556297, + -0.020348932594060898, + -0.007301190868020058, + -0.0021409085020422935, + 0.0002910268085543066, + 0.014827148988842964, + -0.020438838750123978, + 0.009620040655136108, + -0.018505841493606567, + 0.03542332723736763, + -0.029639314860105515, + -0.0038397745229303837, + -0.022686513140797615, + 0.002431232947856188, + -0.03071819618344307, + -0.004233117215335369, + 0.04063792526721954, + -0.011066042818129063, + -0.00423686346039176, + 0.00048699582112021744, + -0.02265654318034649, + -0.026147928088903427, + 0.03185701742768288, + 0.037431247532367706, + -0.03746121749281883, + -0.02929467149078846, + 0.01648293435573578, + 0.004180671647191048, + 0.0029968973249197006, + -0.02467944845557213, + -0.004633952397853136, + 0.012219849042594433, + 0.008578618057072163, + 0.019494816660881042, + 0.02354062721133232, + 0.012564491480588913, + -0.042406097054481506, + -0.008099114522337914, + 0.008533664979040623, + 0.004248101729899645, + -0.02800600416958332, + -0.001126646064221859, + -0.028290709480643272, + -0.014834641478955746, + -0.01293910387903452, + 0.01038424950093031, + 0.00020170523202978075, + -0.03446431830525398, + 0.010976136662065983, + -0.019359955564141273, + 0.003407097654417157, + -0.0218773502856493, + -0.017307082191109657, + -0.015044424682855606, + -0.016452966257929802, + -0.018535809591412544, + 0.011800282634794712, + 0.009305366314947605, + 0.013261270709335804, + 0.06605161726474762, + -0.0014553682412952185, + -0.013328700326383114, + -0.011560531333088875, + -0.035123635083436966, + -0.013231301680207253, + 0.04753078892827034, + 0.007368620950728655, + 0.02270149625837803, + 0.0038397745229303837, + 0.024080069735646248, + -0.023510659113526344, + -0.015111854299902916, + 0.010781337507069111, + 0.006668096408247948, + -0.009590071626007557, + -0.019060267135500908, + -0.014504983089864254, + 0.019704598933458328, + 0.005488068331032991, + -0.009964683093130589, + -0.00285641779191792, + 0.0017466292483732104, + -0.010668953880667686, + -0.024529604241251945, + 0.007177568972110748, + 0.01814621314406395, + -0.004510330501943827, + -0.02216205559670925, + 0.021128125488758087, + 0.03395484760403633, + 0.01874559186398983, + 0.024289852008223534, + 0.017486896365880966, + -0.017262129113078117, + -0.010301833972334862, + -0.002341326093301177, + 0.01708231493830681, + -0.007499735336750746, + 0.014489998109638691, + -0.015958478674292564, + 0.025953130796551704, + 0.02951943874359131, + -0.03665205463767052, + 0.014497490599751472, + 0.00842877384275198, + 0.008578618057072163, + -0.02343573607504368, + -0.021262986585497856, + -0.029789159074425697, + -0.006668096408247948, + -0.006188592873513699, + 0.020393885672092438, + -0.033325497061014175, + -0.004330516792833805, + -0.016288137063384056, + 0.0012409028131514788, + 0.006480790209025145, + -0.017217174172401428, + -0.044054388999938965, + -0.032036833465099335, + -0.004506584256887436, + -0.03179708123207092, + 0.009942206554114819, + 0.008848339319229126, + -0.0009721185779199004, + -0.019270049408078194, + -0.01592850871384144, + -0.012032542377710342, + -0.006499520968645811, + -0.0263427272439003, + -0.012287278659641743, + 0.044653769582509995, + -0.009575086645781994, + 0.02960934489965439, + 0.0005113455699756742, + -0.04321525990962982, + -0.0007735741091892123, + 0.037521153688430786, + -0.041656870394945145, + 0.0031542344950139523, + 0.026792261749505997, + -0.033235590904951096, + 0.0013710805214941502, + -0.033805001527071, + 0.04108746349811554, + -0.014032971113920212, + -0.040607959032058716, + -0.019794506952166557, + -0.010609016753733158, + -0.007308683358132839, + -0.00065042037749663, + -0.00048137662815861404, + -0.015763679519295692, + 0.019419893622398376, + 0.005664135795086622, + -0.012729321606457233, + -0.018086275085806847, + -0.022326884791254997, + 0.02718185819685459, + 0.0011612976668402553, + 0.017561817541718483, + -0.017426958307623863, + 0.018311042338609695, + 0.0397987961769104, + -0.02294124849140644, + 0.03209676966071129, + 0.0059675718657672405, + 0.03994864225387573, + -0.01499197818338871, + 0.01718720607459545, + 0.00010202328121522442, + -0.022746451199054718, + -0.0526854544878006, + -0.007417320739477873, + -0.004304293543100357, + 0.027721300721168518, + 0.006986516993492842, + 0.029789159074425697, + -0.003279729513451457, + -0.019000329077243805, + -0.01370331272482872, + 0.028305694460868835, + -0.035393357276916504, + 0.005300762131810188, + -0.025323782116174698, + 0.03164723515510559, + 0.0050048185512423515, + -0.012661891058087349, + 0.015538912266492844, + -0.0393492616713047, + -0.026777276769280434, + 0.0030324854888021946, + -0.03964895009994507, + 0.014729750342667103, + -0.020154133439064026, + 0.022716481238603592, + 0.00670181168243289, + 0.007911808788776398, + 0.012362201698124409, + -0.009380288422107697, + 0.0008499013492837548, + -0.018895437940955162, + -0.043095383793115616, + 0.03368512541055679, + -0.014872102998197079, + -0.021083172410726547, + 0.004461630713194609, + -0.00796425435692072, + -0.017576802521944046, + 0.010099544189870358, + 0.02556353434920311, + 0.03260624408721924, + 0.05343467742204666, + 0.023225953802466393, + 0.03925935551524162, + -0.00018695488688535988, + -0.06431341916322708, + -0.0010957405902445316, + 0.005724073853343725, + -0.01522423792630434, + -0.002206465695053339, + 0.015164299868047237, + -0.0023151030763983727, + -0.016288137063384056, + 0.00967248622328043, + -0.023420752957463264, + -0.004798781592398882, + -0.022746451199054718, + 0.031707171350717545, + 0.002444344339892268, + 0.005806488450616598, + -0.0075634196400642395, + 0.038300346583127975, + 0.012684367597103119, + -0.007979239337146282, + 0.02256663702428341, + -0.0074622742831707, + 0.010309326462447643, + -0.012429631315171719, + 0.004188164137303829, + -0.006229800172150135, + -0.05070750042796135, + 0.007761964108794928, + 0.00011554444063222036, + -0.03904957324266434, + -0.02662743255496025, + -0.02933962456882, + -0.00040317632374353707, + 0.0002669111709110439, + 0.011530562303960323, + -0.008346359245479107, + 0.011920158751308918, + 0.030373554676771164, + 0.021817412227392197, + -6.227927224244922e-05, + -0.0039034585934132338, + -0.058799125254154205, + 0.002107193460687995, + 0.006031255703419447, + -0.055472567677497864, + 0.027751268818974495, + -0.024080069735646248, + -0.040787771344184875, + -0.023061124607920647, + -0.06389384716749191, + -0.006124909035861492, + 0.0014366375980898738, + 0.002305737929418683, + 0.014452537521719933, + 0.026357712224125862, + -0.005555498413741589, + 0.00687413290143013, + -0.03296586871147156, + -0.03149738907814026, + -0.011478116735816002, + -0.007724502589553595, + -0.034194596111774445, + -0.0033677632454782724, + -0.004120733588933945, + -0.03626245632767677, + 0.014624858275055885, + -0.002264530397951603, + 0.006548220757395029, + -0.0063309455290436745, + 0.02087339013814926, + 0.012129941955208778, + 0.036921773105859756, + -0.0017953288042917848, + 0.011373225599527359, + -0.01667773351073265, + 0.006866640876978636, + -0.045253150165081024, + -0.00584020372480154, + -0.0412672758102417, + -0.0036730722058564425, + -0.045253150165081024, + -0.024199945852160454, + -0.025353750213980675, + 0.007259983569383621, + 0.0313175767660141, + 0.024349790066480637, + 0.019914383068680763, + -0.027481548488140106, + 0.014587397687137127, + -0.0027552724350243807, + 0.02031896263360977, + 0.026132944971323013, + 0.040458112955093384, + -0.01293910387903452, + 0.03746121749281883, + -0.01961469277739525, + 0.0368618369102478, + 0.0129465963691473, + -0.00682917982339859, + -0.005652897525578737, + 0.023780379444360733, + 0.015553897246718407, + -0.011268333531916142, + 0.0016576588386669755, + -0.001560259610414505, + 0.01096115168184042, + 0.00794177781790495, + -0.005083486903458834, + -0.019015314057469368, + 0.025069044902920723, + 0.0017147872131317854, + 0.02556353434920311, + 0.027331702411174774, + -0.005386922974139452, + 0.005150916986167431, + -0.028994981199502945, + 0.04033823683857918, + -0.0024761862587183714, + -0.03191695734858513, + 0.009050630033016205, + 0.004832496866583824, + 0.02054373174905777, + -0.0040420652367174625, + 0.015299160964787006, + -0.011965112760663033, + -0.0031036618165671825, + 0.01703736186027527, + -0.007132615428417921, + 0.01292411983013153, + -0.012099972926080227, + -0.018985344097018242, + -0.01772664673626423, + -0.004023334477096796, + 0.015066901221871376, + -0.015051916241645813, + 0.0020510016474872828, + -0.014152847230434418, + 0.032726116478443146, + 0.028935043141245842, + -0.003156107384711504, + 0.020468808710575104, + 0.014340153895318508, + -0.019195126369595528, + -0.04441401734948158, + -0.014115385711193085, + 0.021442800760269165, + 0.017816554754972458, + -0.03791075199842453, + -0.03515360504388809, + 0.0029369592666625977, + 0.007623357232660055, + 0.01634807512164116, + 0.011043566279113293, + -0.00611367030069232, + -0.02372044138610363, + 0.007540942635387182, + -0.013898110948503017, + 0.0038322824984788895, + -0.031197700649499893, + -0.004420423414558172, + 0.026687370613217354, + -0.022311899811029434, + 0.02054373174905777, + 0.017606770619750023, + 0.0033059522975236177, + -0.01841593347489834, + 0.001879616524092853, + -0.005383176729083061, + -0.0014553682412952185, + 0.007376113440841436, + 0.022132085636258125, + 0.021997226402163506, + -0.011103504337370396, + 0.014220277778804302, + -5.08945740875788e-05, + -0.009387780912220478, + -0.00183372653555125, + -0.003970888908952475, + 0.019240081310272217, + 0.006787972524762154, + -0.0001171833646367304, + -0.003405224531888962, + 0.02607300691306591, + -0.03206679970026016, + 0.01123836450278759, + 0.034434348344802856, + 0.007259983569383621, + 0.0018590128747746348, + 0.0016857547452673316, + -0.02265654318034649, + 0.028845136985182762, + -0.03524351119995117, + -0.011852729134261608, + 0.020019274204969406, + 0.006398375611752272, + 0.02758643962442875, + -0.0022589112631976604, + -0.006087447516620159, + -0.006184846628457308, + -0.030478445813059807, + 0.016228199005126953, + -0.030133802443742752, + -0.006739272736012936, + -0.022461745887994766, + -0.015568881295621395, + -0.0021221779752522707, + -0.007117630913853645, + -0.030613305047154427, + 0.0075858961790800095, + -0.0018262342782691121, + -0.015493959188461304, + 0.029834112152457237, + -0.008833354339003563, + 0.0021933543030172586, + -0.0268521998077631, + -0.031437452882528305, + 0.00021704091341234744, + -0.0154340211302042, + -0.002270149765536189, + 0.0050759948790073395, + 0.024559572339057922, + -0.01801135204732418, + 0.00700150104239583, + -0.017651725560426712, + -0.0012427758192643523, + -0.00794177781790495, + 0.008233975619077682, + -0.022446760907769203, + -0.0024218675680458546, + -0.01630312204360962, + -0.03374506160616875, + -0.02196725644171238, + -0.007911808788776398, + ], + "index": 57, + }, + { + "title": "Kjelvatnet (Fauske)", + "text": "Kjelvatnet (Lule Sami: Giebbnej\u00e1vrre) is a lake in the municipality of Fauske in Nordland county, Norway. The 3.85-square-kilometre (1.49 sq mi) lake lies about 7 kilometres (4.3 mi) south of the village of Sulitjelma near the border with Junkerdal National Park. Water flows into the lake from the large lake Balvatnet (in Saltdal) and it flows out of the lake to the north to the lake Langvatnet.", + "vector": [ + -0.005133721977472305, + -0.0011205541668459773, + 0.00229629036039114, + 0.049728039652109146, + -0.002314091194421053, + 0.0010653719073161483, + -0.04172484204173088, + -0.032041262835264206, + -0.05878503620624542, + 0.016903545707464218, + 0.017060192301869392, + 0.007383730728179216, + -0.018996907398104668, + -0.006767826620489359, + -0.061690110713243484, + 0.06402555853128433, + 0.0158782247453928, + 0.00165902532171458, + -0.002232207916676998, + -0.021303879097104073, + -0.043348267674446106, + -0.03981660678982735, + 0.06863950192928314, + 0.036940015852451324, + 0.006486575584858656, + 0.015123475342988968, + -0.005899152252823114, + 0.03443367779254913, + -0.010630578733980656, + -0.04175332561135292, + 0.045057132840156555, + -0.019965266808867455, + -0.011833906173706055, + 0.016034871339797974, + 0.0285808052867651, + 0.02368205226957798, + -0.016846584156155586, + 0.003556580049917102, + 0.03292417526245117, + -0.01043121051043272, + -0.0008032566402107477, + -0.006796307861804962, + 0.015522211790084839, + -0.003830710891634226, + -0.02057761140167713, + -0.02895106002688408, + -0.03355076164007187, + 0.020079191774129868, + -0.021460525691509247, + -0.05049702897667885, + 0.035487476736307144, + -0.038648881018161774, + -0.029164668172597885, + 0.03426279127597809, + 0.03286721557378769, + -0.029136188328266144, + 0.011748462915420532, + 0.14422839879989624, + -0.011613177135586739, + 0.03506026044487953, + -0.01271682046353817, + -0.01434024516493082, + 0.001845932682044804, + -0.009484213776886463, + 0.009064117446541786, + 0.0043184501118958, + -0.007519016042351723, + 0.00194561667740345, + -0.04272168129682541, + 0.07137369364500046, + 0.03921850398182869, + 0.08629780262708664, + 0.026387758553028107, + 0.06265846639871597, + 0.011627417989075184, + 0.027128268033266068, + 0.006105640437453985, + 0.0240095853805542, + 0.009939911775290966, + 0.00833784881979227, + 0.008017435669898987, + 0.013236600905656815, + 0.0051978048868477345, + -0.0278830174356699, + -0.022528566420078278, + 0.029848216101527214, + -0.0011339046759530902, + -0.029791252687573433, + -0.02188774198293686, + -0.0025472803972661495, + 0.022357679903507233, + -0.008693862706422806, + 0.006144802086055279, + -0.019979506731033325, + 0.04551283270120621, + 0.00767566217109561, + 0.03229759261012077, + -0.011705741286277771, + -0.006561338435858488, + 0.05867110937833786, + 0.016875064000487328, + 0.03044631890952587, + 0.007120280526578426, + -0.03574380651116371, + -0.01728804036974907, + 0.02546212263405323, + -0.0043647317215800285, + 0.0054434542544186115, + -0.003499617800116539, + 0.009491333737969398, + 0.028438400477170944, + -0.01535132434219122, + -0.023140911012887955, + -0.07046229392290115, + 0.005229846108704805, + -0.008672501891851425, + 0.036968495696783066, + -0.04030078649520874, + 0.0019100152421742678, + 0.031614046543836594, + 0.0015077193966135383, + -0.014881386421620846, + 0.015607655048370361, + -0.0687534287571907, + 0.02647320181131363, + -0.028167828917503357, + 0.03602861985564232, + 0.0036402433179318905, + 0.009947031736373901, + 0.10241811722517014, + -0.02754124440252781, + -0.054228056222200394, + 0.007590218912810087, + -0.008252404630184174, + -0.05878503620624542, + -0.01629120111465454, + 0.0318988561630249, + 0.0061483620665967464, + -0.011257163248956203, + -0.0012077775318175554, + 0.004702945239841938, + 0.010317286476492882, + -0.04206661507487297, + -0.013386127538979053, + 0.0035583600401878357, + -0.02964884787797928, + -0.03916154429316521, + -0.016504809260368347, + 0.0023977544624358416, + -0.052547670900821686, + 0.031927336007356644, + -0.013735020533204079, + 0.02754124440252781, + 0.04357611760497093, + 0.03688305243849754, + 0.006511496379971504, + -0.0268719382584095, + 0.033038102090358734, + 0.011776943691074848, + -0.007839429192245007, + -0.0481615774333477, + -0.004635302349925041, + 0.021446283906698227, + -0.0446014367043972, + 0.0028089506085962057, + 0.015750059857964516, + 0.021047549322247505, + -0.0072092837654054165, + 0.024280156940221786, + 0.017957346513867378, + 0.014105275273323059, + 0.027299154549837112, + 0.0026451842859387398, + -0.021389322355389595, + 0.012040394358336926, + -0.09860164672136307, + 0.002901514293625951, + 0.03349379822611809, + -0.02939251810312271, + -0.003344751661643386, + -0.0031970059499144554, + -0.019196275621652603, + 0.004802629351615906, + -0.0050233579240739346, + -0.02087666280567646, + -0.002020379528403282, + 0.0127025805413723, + 0.01290906872600317, + 0.027014344930648804, + -0.023511165753006935, + -0.014838664792478085, + -0.010922510176897049, + -0.0057282657362520695, + 0.03993053361773491, + -0.02721371129155159, + 0.017957346513867378, + -0.004037199076265097, + 0.04032927006483078, + 0.03423430770635605, + 0.0332944318652153, + 0.04237990826368332, + 0.02335451915860176, + -0.04687992483377457, + 0.03150011971592903, + -0.01399135123938322, + 0.022841859608888626, + -0.0278830174356699, + 0.011007953435182571, + -0.026245353743433952, + 0.024636169895529747, + -0.032696329057216644, + -0.0017079772660508752, + -0.016106074675917625, + -0.02680073492228985, + 0.052547670900821686, + -0.004656663630157709, + -0.008045916445553303, + 0.0010084097739309072, + 0.02084818109869957, + -0.0086369002237916, + -0.04952866956591606, + -0.021389322355389595, + -0.01693202741444111, + 0.027470041066408157, + -0.014995310455560684, + -0.028039664030075073, + 0.015493730083107948, + -0.022186793386936188, + -0.009420131333172321, + 0.04975651949644089, + 0.03995901346206665, + -0.01875481940805912, + -0.031215310096740723, + -0.03420582786202431, + -0.058215413242578506, + -0.028110867366194725, + 0.025946302339434624, + -0.03044631890952587, + -0.00831648800522089, + -0.03967420384287834, + 0.0211472325026989, + -0.0024903181474655867, + 0.00012660748325288296, + -0.021360840648412704, + -0.009363168850541115, + 0.006561338435858488, + -0.008231043815612793, + 0.05482615903019905, + -0.0006003286689519882, + -0.021716855466365814, + 0.01043121051043272, + -0.017515890300273895, + 0.010060956701636314, + -0.010025355033576488, + -0.02869473025202751, + 0.007266246248036623, + -0.0480191707611084, + -0.002533039776608348, + -0.004706505220383406, + -0.012624257244169712, + -0.025234274566173553, + 0.03115834668278694, + 0.038364071398973465, + 0.019566530361771584, + -0.01948108710348606, + -0.021716855466365814, + -0.010324406437575817, + -0.02823903225362301, + -0.00988294929265976, + -0.026017505675554276, + 0.010082317516207695, + 0.03642735630273819, + 0.0027039265260100365, + -0.028139349073171616, + 0.029278593137860298, + 0.034405194222927094, + -0.02089090272784233, + 0.0064153727144002914, + -0.028865616768598557, + 0.008743704296648502, + 0.006906671915203333, + -0.02338300086557865, + -0.010901149362325668, + 0.003713226178660989, + 0.020677294582128525, + 0.02126115746796131, + -0.011833906173706055, + 0.024265915155410767, + 0.012424889020621777, + 0.016362404450774193, + -0.03150011971592903, + 0.02680073492228985, + 6.224682874744758e-05, + 0.03360772505402565, + -0.020292799919843674, + -0.013649577274918556, + -0.02936403639614582, + 0.0010618118103593588, + -0.010886908508837223, + -0.018470007926225662, + -0.013656698167324066, + -0.028068145737051964, + -0.01975165866315365, + 0.0034479957539588213, + 0.026402000337839127, + -0.0012780902907252312, + -4.633744902093895e-05, + -0.007405091542750597, + -0.03326595202088356, + -0.01398423034697771, + 0.004336250945925713, + -0.010182000696659088, + 0.005806588567793369, + -0.03488937392830849, + 0.008074398152530193, + -0.010210482403635979, + -0.028367197141051292, + 0.016348164528608322, + -0.025689972564578056, + -0.019879823550581932, + 0.015365565195679665, + -0.004183164797723293, + -0.01149213220924139, + 0.00170263706240803, + 0.022514326497912407, + -0.0494147464632988, + 0.04172484204173088, + 0.045370426028966904, + 0.00830936711281538, + -0.029962139204144478, + -0.005681983660906553, + 0.06687367707490921, + -0.051436904817819595, + 0.018954185768961906, + -0.015109235420823097, + 0.01913931407034397, + -0.04984196275472641, + 0.01204751431941986, + -0.011214441619813442, + -0.003029679413884878, + -0.008458892814815044, + -0.0432058610022068, + 0.06767114251852036, + -0.02620263211429119, + 0.024265915155410767, + 0.037680525332689285, + -0.02052064798772335, + -0.008622659370303154, + 0.02081969939172268, + 0.045370426028966904, + 0.0006265846895985305, + 0.02332603931427002, + -0.017743738368153572, + -0.03562988340854645, + 0.031699489802122116, + -0.007252005860209465, + -0.01950956881046295, + 0.033009618520736694, + 0.01061633788049221, + 0.028110867366194725, + 0.028025424107909203, + -0.0311298668384552, + -0.020250078290700912, + -0.013286443427205086, + -0.04067104309797287, + 0.022727934643626213, + 0.016134556382894516, + 0.02047792635858059, + 0.010125039145350456, + -0.02222951501607895, + 0.030189989134669304, + 0.03258240222930908, + -0.014653537422418594, + 0.057788196951150894, + 0.05719009414315224, + -0.03543051704764366, + 0.006219564937055111, + -0.0008878099615685642, + -0.013557014055550098, + 0.009569657035171986, + 0.029933659359812737, + -0.03537355363368988, + 0.04534194618463516, + -0.0070526376366615295, + 0.029221631586551666, + 0.0025561805814504623, + -0.0003043919859919697, + 0.0007591999019496143, + -0.02156020887196064, + 0.02506338804960251, + -0.006244485732167959, + 0.03890521079301834, + -0.002137864241376519, + -0.016732659190893173, + 0.006280087400227785, + 0.0009754784405231476, + -0.01975165866315365, + 0.05764579027891159, + -0.005614341236650944, + -0.04286408796906471, + -0.016447847709059715, + 0.06949393451213837, + -0.016063353046774864, + -0.011007953435182571, + 0.009712062776088715, + 0.005959674715995789, + 0.03141467645764351, + 0.026587126776576042, + 0.022841859608888626, + -0.01594942808151245, + -0.010174880735576153, + -0.03431975096464157, + 0.004667344037443399, + -0.06698759645223618, + 0.03967420384287834, + 0.01832760125398636, + 0.007091799285262823, + -0.017031710594892502, + 0.004336250945925713, + 0.02332603931427002, + 0.0021200634073466063, + -0.02724219299852848, + 0.0285808052867651, + 0.0022037269081920385, + -0.058158449828624725, + 0.01798582822084427, + -0.018598172813653946, + 0.03075961209833622, + -9.184049122268334e-05, + -0.010958111844956875, + -0.018541209399700165, + 0.05308881029486656, + -0.014304643496870995, + 0.014468410052359104, + 0.0027733491733670235, + -0.013706539757549763, + -0.00600239634513855, + -0.0727977454662323, + 0.00990431010723114, + 0.024849778041243553, + 0.010523774661123753, + 0.0458546057343483, + 0.008572817780077457, + 0.012289604172110558, + 0.007689903024584055, + -0.017216838896274567, + 0.040870409458875656, + -0.03275328874588013, + -0.009448612108826637, + -0.03332291170954704, + 0.036940015852451324, + -0.019595012068748474, + -0.03326595202088356, + -0.006123441271483898, + 0.0020880221854895353, + -0.007038397248834372, + 0.039417874068021774, + 0.04884512349963188, + -0.040784966200590134, + -0.011997672729194164, + 0.04001597687602043, + -0.023254835978150368, + 0.026416240260004997, + -0.016519051045179367, + -0.01659025251865387, + -0.0790066346526146, + -0.00013951299479231238, + 0.013172518461942673, + 0.001622533891350031, + -0.0194383654743433, + 0.013720780611038208, + 0.009804625995457172, + -0.07678510248661041, + -0.00405499991029501, + 1.1890311952811317e-06, + 0.001234478666447103, + -0.011257163248956203, + -0.030503282323479652, + -0.005347330588847399, + -0.0494147464632988, + 0.08555728942155838, + 0.008736584335565567, + -0.006141242105513811, + 0.028196310624480247, + -0.005820829421281815, + 0.02868049032986164, + -0.0038912333548069, + 0.0005424763658083975, + -0.005375811830163002, + -0.014276162721216679, + 0.02295578457415104, + 0.01733076199889183, + -0.0001606513251317665, + -0.03793685510754585, + -0.011563335545361042, + 0.01982286013662815, + -0.0158782247453928, + 0.04069952294230461, + -0.06015212833881378, + -0.004044319503009319, + 0.026088707149028778, + 0.03349379822611809, + 0.03967420384287834, + 0.052205897867679596, + -0.01764405518770218, + 0.032696329057216644, + 0.026416240260004997, + 0.07268382608890533, + 0.011093396693468094, + -0.006386891473084688, + 0.021403562277555466, + -0.02016463503241539, + -0.03933243080973625, + -0.019680455327033997, + -0.012389288283884525, + 0.015251641161739826, + 0.04773436114192009, + -0.07627244293689728, + -0.025319717824459076, + 0.010338647291064262, + -0.030303914099931717, + -6.970087270019576e-05, + -0.007291167043149471, + -0.044686879962682724, + 0.01694626733660698, + 0.04386092722415924, + 0.01429040264338255, + 0.010424090549349785, + -0.010210482403635979, + 0.0007075778557918966, + 0.014810183085501194, + 0.042978011071681976, + -0.009989753365516663, + 0.020007988438010216, + 0.014119516126811504, + -0.010744502767920494, + -0.009113959036767483, + -0.01519467867910862, + -0.018811780959367752, + 0.019267478957772255, + -0.03226911276578903, + -0.041582439094781876, + 0.04309193789958954, + -0.02862352691590786, + -0.017102913931012154, + 0.005190684460103512, + -0.012809384614229202, + 0.0014641076559200883, + -0.02504914626479149, + -0.03708241879940033, + 0.030902016907930374, + 0.01656177267432213, + 0.013720780611038208, + 0.031955819576978683, + 0.06174707040190697, + 0.019580772146582603, + 0.010844186879694462, + 0.025319717824459076, + 0.002814290812239051, + -0.017544370144605637, + 0.01906811073422432, + 0.01553645171225071, + -0.029278593137860298, + -0.01293042954057455, + -0.0005571619258262217, + 0.031329233199357986, + 0.028395678848028183, + 0.007504775654524565, + -0.06539265811443329, + 0.019908303394913673, + 0.026729533448815346, + -0.0038698725402355194, + 0.020064949989318848, + -0.044373586773872375, + 0.0033322912640869617, + 0.00075163459405303, + -0.013471570797264576, + -0.0004049659473821521, + 0.014397206716239452, + -0.03494633734226227, + -0.014753221534192562, + 0.028367197141051292, + -0.0311298668384552, + 0.021161474287509918, + 0.019879823550581932, + 0.045057132840156555, + -0.03394949808716774, + 0.010053835809230804, + -0.06003820523619652, + 0.010538015514612198, + -0.0020559809636324644, + 0.018113993108272552, + 0.016034871339797974, + -0.006892431527376175, + 0.017174117267131805, + -0.029079224914312363, + 0.011057795956730843, + 0.015151957049965858, + -0.00635129027068615, + -0.031357716768980026, + -0.013421728275716305, + -0.004670904017984867, + -0.019324440509080887, + -0.01837032288312912, + 0.023254835978150368, + 0.060949601233005524, + 0.01832760125398636, + 0.0010386708891019225, + 0.00884338840842247, + -0.0012567294761538506, + -0.06282935291528702, + -0.06841165572404861, + 0.030531762167811394, + 0.03506026044487953, + -0.002744868164882064, + -0.007704143412411213, + -0.0158782247453928, + 0.018640894442796707, + 5.482059714267962e-05, + 0.027299154549837112, + -0.027726372703909874, + -0.030133027583360672, + 0.020606091246008873, + -0.009498453699052334, + -0.00935604888945818, + 0.031699489802122116, + 0.046481192111968994, + -0.022813377901911736, + -0.034091901034116745, + -0.026729533448815346, + 0.03597165644168854, + -0.012161439284682274, + -0.020762737840414047, + -0.032012779265642166, + 0.007138081360608339, + 0.008231043815612793, + -0.02053488790988922, + -0.0044893366284668446, + 0.003919714596122503, + 0.0059739151038229465, + 0.0033839133102446795, + 0.02504914626479149, + 0.01728804036974907, + -0.060949601233005524, + 0.013450209982693195, + -0.029079224914312363, + -0.009121078997850418, + 0.018954185768961906, + -0.013827584683895111, + 0.05901288613677025, + 0.02265673317015171, + 0.034405194222927094, + 0.009840227663516998, + 0.0035156384110450745, + -0.017473168671131134, + 0.013001631945371628, + 0.0021556648425757885, + -0.007768225856125355, + 0.014326004311442375, + -0.028552325442433357, + -0.03562988340854645, + 0.01024608314037323, + -0.02685769833624363, + -0.01765829510986805, + 0.004179604817181826, + 0.0024048746563494205, + 0.013222360983490944, + 0.034120384603738785, + -0.0037523878272622824, + 0.029620366171002388, + -0.03349379822611809, + -0.014454169198870659, + -0.017786459997296333, + 0.016333922743797302, + 0.017117153853178024, + 0.011185960844159126, + 0.03956027701497078, + -0.001828131964430213, + 0.016761140897870064, + -0.005617901217192411, + -0.026601368561387062, + -0.017131395637989044, + 0.02195894531905651, + -0.03400645777583122, + 0.001696406863629818, + 0.008053037337958813, + 0.025576047599315643, + 0.02680073492228985, + -0.00882202759385109, + -0.017088674008846283, + 0.03309506177902222, + 0.04736410453915596, + 0.032326072454452515, + -0.008836268447339535, + -0.014439928345382214, + 0.02012191340327263, + -0.042636238038539886, + -0.010901149362325668, + 0.0003293129848316312, + -0.010680420324206352, + 0.03488937392830849, + 0.027099788188934326, + -0.026729533448815346, + 0.0108014652505517, + 0.026273835450410843, + -0.008238164708018303, + -0.0066823833622038364, + 0.017829181626439095, + 0.03562988340854645, + -0.01434024516493082, + -0.0046637835912406445, + -0.058215413242578506, + 0.023895660415291786, + 0.007739745080471039, + -0.035886213183403015, + -0.0024529367219656706, + -0.012951790355145931, + -0.02298426441848278, + -0.050753358751535416, + -0.005884911864995956, + 0.007654301356524229, + -0.00260780262760818, + -0.0016180836828425527, + 0.0009345368016511202, + 0.04317738115787506, + 0.0033892535138875246, + 0.050753358751535416, + 0.040841929614543915, + -0.04106977581977844, + 0.013329165056347847, + 0.023169392719864845, + -0.013927268795669079, + -0.00654709804803133, + 0.01112899836152792, + 0.017174117267131805, + -0.006490135565400124, + 0.0005131051875650883, + 0.012432009913027287, + 0.020634572952985764, + -0.034832410514354706, + 0.02936403639614582, + -0.06687367707490921, + -0.012752422131597996, + 0.044031813740730286, + -0.015422527678310871, + -0.020079191774129868, + 0.024194713681936264, + 0.011541974730789661, + 0.015166196972131729, + 0.023909902200102806, + -0.019538048654794693, + 0.024137750267982483, + 0.0020114791113883257, + -0.05377235636115074, + -0.041553955525159836, + 0.01871209777891636, + -0.018868742510676384, + -0.047164738178253174, + 0.047392588108778, + 0.011549094691872597, + 0.011050675064325333, + 0.013158278539776802, + -0.05192108452320099, + -0.02473585493862629, + 0.026686811819672585, + 0.002689685905352235, + -0.03004758432507515, + -0.011185960844159126, + -0.012232641689479351, + -0.05135146155953407, + 0.030332393944263458, + 0.021375082433223724, + 0.025319717824459076, + -0.023952623829245567, + 0.004863151349127293, + 0.01129276491701603, + -0.0073196482844650745, + -0.0013208120362833142, + -0.005464815068989992, + 0.008615539409220219, + 0.00067375652724877, + 0.01838456466794014, + 0.05277551710605621, + -0.018626654520630836, + -0.006586259230971336, + -0.007106039673089981, + -0.01006807666271925, + 0.012410649098455906, + 0.0007489644922316074, + 0.0275697261095047, + -0.037310268729925156, + -0.022813377901911736, + 0.024137750267982483, + -0.03115834668278694, + 0.011250043287873268, + 0.014895626343786716, + -0.006696623750030994, + 0.02154596894979477, + -0.003469356568530202, + 0.00398023659363389, + 0.002353252610191703, + -0.0010929630370810628, + 0.004425254184752703, + -0.001703527057543397, + 0.008850508369505405, + 0.021759577095508575, + 0.03075961209833622, + -0.004727866034954786, + 0.015821263194084167, + -0.019167795777320862, + -0.024237435311079025, + 0.0004668233741540462, + 0.010096557438373566, + 0.03036087565124035, + -0.006408252287656069, + -0.029962139204144478, + -0.0026345038786530495, + -0.04528498277068138, + 0.02332603931427002, + 0.04912993684411049, + 0.006764266639947891, + 0.021802298724651337, + 0.0035280990414321423, + -0.010132159106433392, + -0.03787989169359207, + 0.018256399780511856, + -0.008458892814815044, + 0.023140911012887955, + -0.013158278539776802, + -0.0062409257516264915, + -0.011962071061134338, + 0.014354485087096691, + -0.03947483375668526, + -0.008409051224589348, + 0.013186759315431118, + -0.051436904817819595, + 0.05115209519863129, + -0.02789725922048092, + -0.008579937741160393, + 0.019224757328629494, + 0.020962106063961983, + -0.014276162721216679, + 0.03568684682250023, + 0.030474800616502762, + 0.0036384633276611567, + 0.006668142508715391, + -0.034519121050834656, + -0.053629953414201736, + -0.018199436366558075, + 0.011356847360730171, + 0.008807786740362644, + -0.03178493306040764, + 0.01980862021446228, + -0.012994511984288692, + -0.008878990076482296, + 0.001758709317073226, + -0.011648778803646564, + -0.015721580013632774, + -0.021118752658367157, + 0.007917751558125019, + 0.003280669217929244, + 0.00902139488607645, + -0.01269545964896679, + 0.030275432392954826, + 0.01590670645236969, + -0.0503261424601078, + 0.011997672729194164, + -0.01838456466794014, + 0.022913062945008278, + -0.03246847912669182, + 0.004745666868984699, + -0.060664787888526917, + 0.02084818109869957, + 0.029506443068385124, + -0.007454933598637581, + 0.01624847948551178, + -0.052519187331199646, + -0.018569691106677055, + 0.01343596912920475, + 0.011926469393074512, + -0.0068212286569178104, + 0.036284949630498886, + 0.00265586469322443, + -0.02188774198293686, + -0.012182800099253654, + 0.023881420493125916, + -0.0208339411765337, + 0.019623493775725365, + 0.06761418282985687, + -0.040158383548259735, + -0.0282675139605999, + -0.011541974730789661, + -0.03261088579893112, + -0.011776943691074848, + 0.04163939878344536, + -0.03477545082569122, + 0.02933555468916893, + -0.024280156940221786, + -0.0046175019815564156, + 0.020079191774129868, + 0.012937549501657486, + 0.02758396603167057, + -0.03431975096464157, + -0.011449410580098629, + 0.005607220809906721, + -0.003766628447920084, + 0.005546698346734047, + -0.022201035171747208, + -0.04411725699901581, + 0.04736410453915596, + -0.010851307772099972, + 0.014810183085501194, + -0.04693688824772835, + -0.02719947136938572, + 0.011356847360730171, + -0.022443123161792755, + 0.0011632757959887385, + 0.018897224217653275, + 0.012510333210229874, + 0.0792914405465126, + -0.02510610967874527, + 0.04608245566487312, + 0.014219200238585472, + 0.0194383654743433, + -0.017587093636393547, + -0.012175679206848145, + 0.005560939200222492, + 0.021446283906698227, + -0.006942273583263159, + -0.006159042473882437, + 0.027099788188934326, + -0.007768225856125355, + 0.04252231493592262, + -0.018299121409654617, + -0.029150428250432014, + -0.008223923854529858, + 0.03218366578221321, + -0.01661873422563076, + 0.012524573132395744, + -0.02581813745200634, + 0.023696294054389, + -0.030873535200953484, + 0.010538015514612198, + -0.025561807677149773, + 0.01835608296096325, + 0.002445816295221448, + 0.026045985519886017, + -0.03990205004811287, + -0.018626654520630836, + 0.04779132083058357, + 0.004984196275472641, + 0.016576012596488, + -0.010288805700838566, + -0.006447413936257362, + 0.04699385166168213, + 0.0014187159249559045, + -0.020036468282341957, + 0.013735020533204079, + 0.010936751030385494, + -0.008736584335565567, + 0.023083949461579323, + 0.009455732069909573, + 0.03150011971592903, + 0.010829946957528591, + -0.045370426028966904, + 0.028125107288360596, + 0.010837066918611526, + -0.0014649976510554552, + -0.01362109649926424, + 0.0039766766130924225, + 0.0004192065098322928, + 0.0025490603875368834, + 0.005058959126472473, + 0.023126671090722084, + 0.053572990000247955, + -0.01362109649926424, + 0.014610815793275833, + -0.0155649334192276, + 0.018968427553772926, + -0.01080858614295721, + 0.0058493101969361305, + 0.00956253707408905, + -0.017971588298678398, + 0.0209051426500082, + -0.004816869739443064, + 0.030218470841646194, + 0.006935153156518936, + 0.03323746845126152, + 0.0290365032851696, + 0.037652041763067245, + 0.012289604172110558, + 0.007291167043149471, + -0.009932790882885456, + 0.015750059857964516, + 0.05553818866610527, + 0.014105275273323059, + 0.004197405185550451, + -0.035857733339071274, + -0.006411812733858824, + -0.022428883239626884, + 0.035515960305929184, + 0.015436767600476742, + 0.04565523937344551, + -0.00681054824963212, + -0.02264249138534069, + 0.006301448214799166, + -0.007287607062608004, + -0.04138306900858879, + 0.02897954173386097, + 0.031044423580169678, + 0.006141242105513811, + -0.00617684330791235, + 0.0018112213583663106, + -0.022870341315865517, + -0.024123510345816612, + 0.03725330904126167, + -0.0017400184879079461, + 0.001173066208139062, + 0.04770587757229805, + 0.059582505375146866, + 0.01631968282163143, + -0.05058247223496437, + 0.004019398242235184, + 0.016390886157751083, + 0.0029602565336972475, + 0.005251206923276186, + -0.0017409085994586349, + 0.017245318740606308, + -0.008743704296648502, + -0.04556979611515999, + 0.007981834001839161, + 0.024522246792912483, + 0.005361570976674557, + 0.016718419268727303, + 0.026017505675554276, + -0.0388767309486866, + 0.05727553740143776, + 0.0038769927341490984, + -0.02758396603167057, + 0.03523114696145058, + -0.0019669774919748306, + 0.004621061962097883, + 0.029278593137860298, + 0.03243999928236008, + -0.016433607786893845, + -0.003031459404155612, + -0.03648431599140167, + 0.008522975258529186, + -0.036284949630498886, + 0.0015851524658501148, + -0.010146399959921837, + -0.013193879276514053, + -0.0034711367916315794, + 0.008871869184076786, + -0.030588725581765175, + 0.00039673311403021216, + 0.004759907256811857, + 0.029136188328266144, + -0.020591851323843002, + 0.004852470941841602, + 0.00867962185293436, + -0.004770588129758835, + 0.04021534323692322, + -0.0002282939967699349, + 0.00331805064342916, + -0.023553887382149696, + 0.021460525691509247, + 0.015123475342988968, + -0.003926834557205439, + -0.00810287892818451, + 0.04981348291039467, + 0.04198117181658745, + 0.04283560812473297, + 0.049357783049345016, + -0.013891667127609253, + 0.014781702309846878, + -0.0012211280409246683, + 0.011057795956730843, + 0.015265881083905697, + -0.009911430068314075, + -0.0020809019915759563, + 0.03312354534864426, + -0.019367162138223648, + -0.0424368716776371, + -0.0023906342685222626, + 0.008807786740362644, + -0.024935221299529076, + -0.022713694721460342, + 0.03491785377264023, + -0.004136882722377777, + -0.005674863699823618, + 0.014226320199668407, + -0.00956253707408905, + -0.019210517406463623, + -0.018968427553772926, + -0.003373232902958989, + 0.013471570797264576, + -0.01663297601044178, + -0.016860824078321457, + 0.018868742510676384, + 0.011435170657932758, + -0.03286721557378769, + 0.011264283210039139, + 0.027455801144242287, + 0.011791184544563293, + 0.030531762167811394, + -0.010509533807635307, + -0.017131395637989044, + -0.0035512398462742567, + -0.025034906342625618, + -0.03913306072354317, + -0.020420964807271957, + 0.004343370907008648, + 0.03711090236902237, + 0.023781737312674522, + -0.028780173510313034, + 0.02372477389872074, + 0.021731095388531685, + 0.014909867197275162, + 0.0043682921677827835, + -0.02435135841369629, + -0.004606821574270725, + 0.020591851323843002, + 0.007511896081268787, + 0.00326820882037282, + 0.01906811073422432, + -0.008359209634363651, + 0.02477857656776905, + 0.023753255605697632, + 0.0034853771794587374, + -0.03708241879940033, + -0.02543364092707634, + 0.040784966200590134, + 0.04064255952835083, + -0.0034479957539588213, + 0.013379006646573544, + 0.018227918073534966, + -0.008159841410815716, + -0.031671006232500076, + 0.015451008453965187, + 0.02476433478295803, + 0.02620263211429119, + 0.023881420493125916, + 0.030133027583360672, + 0.038762807846069336, + 0.02019311487674713, + -0.019381403923034668, + -0.015337084420025349, + -0.00867962185293436, + -0.0018957746215164661, + 0.0030510402284562588, + 0.019623493775725365, + 0.032326072454452515, + 0.02443680167198181, + 0.009605258703231812, + 0.0076187001541256905, + 0.012553054839372635, + 0.02372477389872074, + -0.002127183834090829, + 0.02862352691590786, + 0.040072936564683914, + 0.014326004311442375, + -0.010117918252944946, + -0.011962071061134338, + -0.0068069882690906525, + -0.01147077139467001, + -0.018840262666344643, + 0.028381437063217163, + -0.010182000696659088, + 0.019908303394913673, + 0.002376393647864461, + 0.00810999982059002, + 0.013371886685490608, + -0.011613177135586739, + 0.0014009152073413134, + 0.0162627212703228, + -0.020022228360176086, + 0.010360008105635643, + -0.029506443068385124, + 0.02654440514743328, + -0.013222360983490944, + 0.026088707149028778, + -0.015522211790084839, + 0.024963703006505966, + 0.0127025805413723, + 0.04727866128087044, + 0.015465249307453632, + 0.02326907590031624, + 0.00644029350951314, + -0.04762043431401253, + -0.03958876058459282, + 0.02440832182765007, + -0.03243999928236008, + 0.03580076992511749, + 0.008053037337958813, + 0.018954185768961906, + -0.019196275621652603, + -0.029477961361408234, + 0.023525407537817955, + -0.02046368643641472, + -0.023468444123864174, + 0.003987357020378113, + -0.0030848614405840635, + 0.013371886685490608, + 0.0075830984860658646, + 0.01627696119248867, + -0.011719981208443642, + -0.018897224217653275, + 0.0018939946312457323, + -0.03508874028921127, + 0.007668542210012674, + 0.024864019826054573, + -0.013407488353550434, + 0.023254835978150368, + 0.028837135061621666, + 0.012268243357539177, + 0.03403494134545326, + 0.0026968063320964575, + 0.022528566420078278, + -0.011157479137182236, + 0.0070526376366615295, + -0.011000833474099636, + -0.008522975258529186, + 0.022742176428437233, + 0.03921850398182869, + 0.003380353096872568, + 0.007924872450530529, + -0.024522246792912483, + 0.023226354271173477, + -0.03224062919616699, + 0.01800006814301014, + 0.014995310455560684, + -0.011990551836788654, + 0.011000833474099636, + -0.012674098834395409, + 0.001965197501704097, + -0.016775380820035934, + -0.006515056826174259, + 0.015778541564941406, + -0.014995310455560684, + 0.029905177652835846, + -0.009291966445744038, + 0.020335521548986435, + 0.01590670645236969, + 0.005375811830163002, + 0.03634191304445267, + 0.016006389632821083, + -0.003766628447920084, + 0.005692664068192244, + -0.03141467645764351, + 0.029591886326670647, + 0.0015744720585644245, + -0.012389288283884525, + 0.029449479654431343, + 0.06482303142547607, + -0.015094994567334652, + 0.029819734394550323, + 0.045484352856874466, + 0.0026772255077958107, + 0.02933555468916893, + 0.0010360007872805, + -0.0009514474659226835, + -0.007568858098238707, + -0.04767739772796631, + -0.028523843735456467, + -0.019523808732628822, + 0.0011748463148251176, + 0.003223706968128681, + 0.014062553644180298, + 0.01656177267432213, + 0.006333489436656237, + -0.04853183031082153, + 0.028552325442433357, + -0.000882469757925719, + -0.0011134338565170765, + 0.05382931977510452, + 0.03853495791554451, + -0.007066878490149975, + 0.006949393544346094, + 0.00531172938644886, + 0.00988294929265976, + -0.00644029350951314, + 0.04556979611515999, + 0.006137681659311056, + -0.012795143760740757, + -3.362663846928626e-05, + 0.01449689082801342, + -0.006586259230971336, + -0.008010315708816051, + -0.010516653768718243, + 0.0021467646583914757, + -0.025248514488339424, + -0.008387690410017967, + 0.006703744176775217, + 0.024992184713482857, + -0.005518217571079731, + -0.018142474815249443, + 0.026259593665599823, + 0.026088707149028778, + 0.004343370907008648, + 0.002052420750260353, + 0.018284879624843597, + -0.000296381680527702, + -0.015507970936596394, + 0.014119516126811504, + -0.016390886157751083, + -0.02120419591665268, + -0.0006933372933417559, + -0.01876905933022499, + -0.0015878225676715374, + -0.01663297601044178, + -0.01396999042481184, + -0.041924212127923965, + -0.002157445065677166, + 0.02338300086557865, + 0.0104525713250041, + 0.0311298668384552, + 0.019495327025651932, + 0.024579208344221115, + 0.013813343830406666, + -0.008195443078875542, + -0.0037310270126909018, + -0.03568684682250023, + -0.007419332396239042, + 0.03278177231550217, + 0.04340523108839989, + 0.005984595511108637, + 0.01184102613478899, + -0.01980862021446228, + -0.017800701782107353, + -0.013592615723609924, + 0.0008023665868677199, + -0.04531346634030342, + -0.011385328136384487, + -0.009242123924195766, + -0.0017106473678722978, + -0.006369090639054775, + 0.0008757945033721626, + -0.04707929491996765, + -0.006942273583263159, + 0.016875064000487328, + -0.03896217420697212, + -0.0001814558927435428, + 0.004247247241437435, + 0.0005424763658083975, + 0.010295925661921501, + -0.00026612047804519534, + 0.02010767161846161, + 0.0332944318652153, + 0.004279288463294506, + 0.00255796080455184, + 0.0029887377750128508, + -0.0057425061240792274, + 0.007903511635959148, + 0.026957381516695023, + 0.006052238401025534, + -0.02047792635858059, + 0.011734222061932087, + 0.021004827693104744, + -0.022827619686722755, + 0.023397240787744522, + -0.01800006814301014, + 0.011591816321015358, + -0.031329233199357986, + -0.0023550328332930803, + -4.007939060102217e-05, + 0.05009829252958298, + 0.001084952731616795, + -0.006728664971888065, + 0.0031792051158845425, + 0.01982286013662815, + -0.01946684718132019, + 0.006201764103025198, + 0.006714424584060907, + -0.06345593929290771, + -0.024493765085935593, + 0.006575578823685646, + -0.030560243874788284, + -0.05089576542377472, + 0.010609217919409275, + 0.0145182516425848, + 0.02118995413184166, + -0.0007405091891996562, + 0.011990551836788654, + 0.01834184303879738, + 0.01731652207672596, + 0.018811780959367752, + -0.03947483375668526, + 0.009327567182481289, + -0.01872633770108223, + 0.01869785599410534, + 0.012310964986681938, + 0.03206974267959595, + -0.015422527678310871, + -0.013813343830406666, + -0.005550258792936802, + 0.00974054355174303, + -0.010011114180088043, + 0.006436733528971672, + 0.01631968282163143, + -0.022172553464770317, + -0.01905387081205845, + -0.031272273510694504, + -0.0008869199082255363, + -0.02657288685441017, + 0.03933243080973625, + 0.013058594428002834, + -0.008323607966303825, + -0.036569759249687195, + 0.011983431875705719, + 0.007561737671494484, + 0.024821298196911812, + -0.028851376846432686, + 0.027996942400932312, + -0.03827862814068794, + -0.020435204729437828, + 0.008466013707220554, + 0.02549060434103012, + 0.00015753621119074523, + 0.003624222707003355, + -0.01693202741444111, + 0.0023318917956203222, + -0.035943176597356796, + -0.004596141166985035, + -0.022129831835627556, + -0.021403562277555466, + 0.009256364777684212, + 0.01905387081205845, + -0.011577576398849487, + 0.008245284669101238, + -0.007383730728179216, + 0.012417769059538841, + -0.0070704384706914425, + 0.014710498973727226, + 0.031955819576978683, + 0.0339210145175457, + -0.01798582822084427, + -0.005212045274674892, + 0.01985134184360504, + -0.004759907256811857, + -0.025946302339434624, + 0.00407636072486639, + 0.010466812178492546, + -4.166476719547063e-05, + -0.00194561667740345, + 0.026373518630862236, + 0.025889338925480843, + -0.029449479654431343, + 0.008458892814815044, + 0.03255392238497734, + 0.0029780573677271605, + 0.016490569338202477, + -0.0027395279612392187, + -0.015963668003678322, + 0.012481851503252983, + -0.006767826620489359, + -0.012973151169717312, + -0.034091901034116745, + 0.008466013707220554, + 0.005368691403418779, + 0.04833246394991875, + -0.011114757508039474, + -0.022443123161792755, + -0.026088707149028778, + -0.00165902532171458, + 0.014546733349561691, + 0.0035423394292593002, + -0.010908269323408604, + -0.04451599344611168, + 0.010794345289468765, + -0.0388767309486866, + 0.017045950517058372, + 0.03397797793149948, + 0.031215310096740723, + -0.006895991507917643, + 0.03429127112030983, + -0.002625603461638093, + -0.0008935952209867537, + -0.017117153853178024, + -0.0021467646583914757, + 0.013920147903263569, + -0.0022482285276055336, + -0.01341460831463337, + 0.039104580879211426, + -0.016020631417632103, + 0.024977942928671837, + -0.02190198190510273, + -0.019609251990914345, + -0.028523843735456467, + -0.014418567530810833, + 0.04500017315149307, + -0.028751691803336143, + 0.0018121113535016775, + -0.018826020881533623, + 0.011698620393872261, + -0.005521777551621199, + -0.009014274924993515, + 0.009263484738767147, + 0.02264249138534069, + 0.01982286013662815, + 0.007191483397036791, + -0.02614567056298256, + 0.038734324276447296, + 0.01253881398588419, + -0.0177294984459877, + -0.00318098533898592, + -0.026715291664004326, + -0.013841825537383556, + -0.017786459997296333, + 0.04975651949644089, + -0.03181341290473938, + -0.03668368607759476, + -0.00741221196949482, + -0.034832410514354706, + -0.0155649334192276, + -0.00990431010723114, + 0.0002983842568937689, + -0.012588655576109886, + 0.01839880459010601, + -0.016106074675917625, + -0.00018635108426678926, + -0.014881386421620846, + 0.018470007926225662, + -0.016163036227226257, + -0.010096557438373566, + -0.007931992411613464, + -0.017231078818440437, + -0.03141467645764351, + 0.007654301356524229, + 0.037965334951877594, + 0.02015039324760437, + 0.022784898057579994, + 0.005083880387246609, + 0.019552290439605713, + -0.03318050503730774, + 0.033465318381786346, + ], + "index": 58, + }, + { + "title": "Alexis Arg\u00fcello", + "text": 'Alexis Arg\u00fcello (April 19, 1952 \u2013 July 1, 2009), also known by the ring name El Flaco Explosivo (lit. "The Explosive Thin Man"), was a Nicaraguan professional boxer and politician. As a boxer he was a three-time world champion, and has regularly been cited as one of the greatest fighters of his era, having never lost any of his world titles in the ring, instead relinquishing them each time in pursuit of titles in higher weight classes. His trainer was Daniel Lozano.', + "vector": [ + 0.05211864411830902, + 0.020026104524731636, + -0.011991768144071102, + -0.012148572131991386, + -0.023879000917077065, + 0.01432142686098814, + 0.007007643114775419, + -0.012297909706830978, + -0.023834198713302612, + -0.004621983040124178, + -0.07520616054534912, + 0.03527342155575752, + -0.02779163233935833, + -0.012596583925187588, + 0.018562600016593933, + 0.03760308027267456, + -0.047847602516412735, + 0.00825087446719408, + -0.05531445890665054, + -0.07867077738046646, + 0.00013743678573518991, + 0.00100242521148175, + -0.005189463961869478, + 0.008400211110711098, + 0.04512966796755791, + 0.02590998448431492, + -0.005827879998832941, + 0.007877531461417675, + -0.019413821399211884, + 0.017576975747942924, + -0.02556650899350643, + 0.019249550998210907, + 0.026223592460155487, + 0.03864843770861626, + 0.0020701854955404997, + -0.03145039081573486, + 0.0540301576256752, + 0.025581443682312965, + 0.00835540983825922, + 0.005663609132170677, + 0.02422247640788555, + -0.05501578375697136, + -0.041694916784763336, + -0.04435311630368233, + -0.012081370688974857, + -0.020563717931509018, + -0.023072579875588417, + 0.008698885329067707, + -0.007653526030480862, + -0.02856818586587906, + 0.033511243760585785, + -0.020578650757670403, + -0.016158273443579674, + -0.020294910296797752, + 0.0528951957821846, + -0.027059881016612053, + 0.0013785680057480931, + -0.0034515534061938524, + 0.0038024955429136753, + 0.04832548275589943, + 0.048773493617773056, + -0.02523796819150448, + 0.019727429375052452, + -0.009191697463393211, + -0.019921567291021347, + 0.009072228334844112, + 0.013828614726662636, + -0.0037296938244253397, + -0.06839638948440552, + 0.012387511320412159, + -0.002960607875138521, + 0.0023203250020742416, + -0.0315101258456707, + -0.041127435863018036, + -0.004371843300759792, + -0.0030744774267077446, + 0.009049827232956886, + -0.00561134098097682, + -0.038887377828359604, + 0.024371812120079994, + 0.012066436931490898, + -0.046891845762729645, + 0.0337800495326519, + 0.055463794618844986, + -0.01288779079914093, + -0.04874362424015999, + 0.007623658515512943, + -0.07472828030586243, + -0.02138507179915905, + 0.02637293003499508, + 0.008669017814099789, + -0.02882205881178379, + -0.056061144918203354, + 0.031420525163412094, + 0.045756883919239044, + 0.0003367084718775004, + 0.038499101996421814, + 0.0033059497363865376, + 0.011342152021825314, + -0.03826016187667847, + -0.019846899434924126, + 0.030643969774246216, + -0.027209216728806496, + 0.020130639895796776, + -0.009572507813572884, + 0.013081928715109825, + -0.041336506605148315, + 0.006544698029756546, + 0.015269717201590538, + 0.07843183726072311, + 0.03130105510354042, + -0.023206982761621475, + -0.0016352410893887281, + 0.03602010756731033, + -0.007877531461417675, + 0.027492957189679146, + -0.017830848693847656, + 0.04832548275589943, + 0.01455289963632822, + 0.00853461492806673, + 0.019622894003987312, + -0.03903671354055405, + 0.0033638179302215576, + 0.04662303999066353, + 0.05313413590192795, + -0.041903987526893616, + 0.011782696470618248, + 0.016292676329612732, + -0.01438862830400467, + 0.012895257212221622, + 0.0003502421313896775, + 0.012529381550848484, + 0.06905347108840942, + 0.03189840167760849, + -0.03787188604474068, + 0.02740335650742054, + -0.06439415365457535, + -0.012118704617023468, + -0.026895610615611076, + 0.0360499732196331, + 0.020294910296797752, + 0.017621776089072227, + -0.012708586640655994, + 0.0021373871713876724, + -0.015665460377931595, + -0.05161089822649956, + 0.04139624163508415, + -0.012006701901555061, + -0.010513330809772015, + -0.001219897298142314, + -0.030076488852500916, + -0.011566157452762127, + 0.006369227077811956, + -0.013208865188062191, + 0.021519474685192108, + 0.0026918009389191866, + -0.064155213534832, + 0.011924566701054573, + 0.0177412461489439, + 0.009923449717462063, + -0.01455289963632822, + 0.05193943902850151, + -0.011536289937794209, + 0.007810329552739859, + -0.001084560644812882, + -0.01709909737110138, + 0.05423923209309578, + 0.012200839817523956, + 0.008893023245036602, + 0.0511927530169487, + 0.018637267872691154, + -0.023416055366396904, + -0.0008689551614224911, + 0.057584382593631744, + 0.0006407494656741619, + 0.006813504733145237, + 0.028702588751912117, + -0.012872857041656971, + -0.005917482078075409, + -0.005357468035072088, + -0.004065702203661203, + -0.024162741377949715, + -0.013694210909307003, + 0.007929799146950245, + -0.0060630859807133675, + 0.025267835706472397, + 0.011200281791388988, + -0.060272447764873505, + 0.02252003364264965, + -0.05152129754424095, + 0.009632241912186146, + -0.007944732904434204, + -0.05229784920811653, + -0.009512772783637047, + 0.006238556932657957, + 0.04987858608365059, + 0.0286727212369442, + -0.0371849350631237, + -0.042083192616701126, + 0.023057647049427032, + 0.04850468784570694, + -0.03957432880997658, + -0.020683186128735542, + 0.01026692520827055, + -0.024580884724855423, + -0.011289884336292744, + 0.020011169835925102, + 0.041336506605148315, + -0.048415083438158035, + 0.010826938785612583, + 0.016232941299676895, + 0.04223252832889557, + -0.006048152223229408, + -0.017621776089072227, + -0.005189463961869478, + -0.002452861750498414, + 0.0075751240365207195, + -0.022012287750840187, + -0.0018639134941622615, + -0.019040478393435478, + 0.0224752314388752, + 0.03566169738769531, + -0.047100916504859924, + -0.00475265271961689, + 0.02322191745042801, + -0.017532173544168472, + 0.004536114167422056, + -0.015545991249382496, + 0.017502306029200554, + -0.025163300335407257, + -0.007646059151738882, + -0.01606867089867592, + 0.03009142354130745, + 0.04073915630578995, + 0.05364188179373741, + 0.03817056119441986, + 0.009923449717462063, + -0.053373076021671295, + -0.006496163550764322, + 0.03375018388032913, + -0.027104681357741356, + 0.04563741385936737, + -0.02832924574613571, + -0.01766657829284668, + 0.027343621477484703, + 3.473837205092423e-05, + -0.024625686928629875, + -0.017412705346941948, + -0.04393497109413147, + 0.042680539190769196, + -0.0043494426645338535, + -0.024909427389502525, + 0.05868947505950928, + 0.015710262581706047, + -0.029971953481435776, + -0.028866859152913094, + 0.0455179437994957, + -0.04984872043132782, + 0.025656111538410187, + 0.004009700845927, + -0.03437739610671997, + -0.04369603097438812, + 0.06839638948440552, + 0.06391627341508865, + -0.06397601217031479, + -0.02446141466498375, + 0.035811033099889755, + 0.01639721170067787, + -0.007212981581687927, + -0.07944732904434204, + -0.0027104681357741356, + 0.00647749612107873, + 0.04199358820915222, + 0.0068844398483633995, + 0.005361201707273722, + 0.018786605447530746, + -0.020160507410764694, + 0.04411417618393898, + 0.00727644981816411, + 0.027537759393453598, + 0.010222123935818672, + -0.02647746540606022, + 0.05173036828637123, + -0.07251808792352676, + 0.04429338127374649, + 0.007354851812124252, + -0.03948472812771797, + -0.011080811731517315, + 0.022325895726680756, + 0.0002353225863771513, + -0.02729881927371025, + -0.002740335650742054, + -0.018741805106401443, + 0.015575858764350414, + 0.0154713224619627, + 0.016471881419420242, + -0.02616385743021965, + -2.660066820681095e-05, + 0.03500461205840111, + -0.00036144242039881647, + 0.02938953973352909, + 0.06278131157159805, + -0.046324364840984344, + -0.039454858750104904, + 0.014493164606392384, + -0.004801187198609114, + 0.0135075394064188, + 0.07526589184999466, + -0.025163300335407257, + 0.008930358104407787, + -0.07669953256845474, + 0.030285561457276344, + 0.010505864396691322, + -0.004446511622518301, + 0.019249550998210907, + 0.015165181830525398, + 0.050685007125139236, + -0.01639721170067787, + -0.0023819266352802515, + -0.0007527522393502295, + 0.013559808023273945, + 0.03009142354130745, + 0.03148026019334793, + -0.005898815114051104, + -0.016800422221422195, + -0.03739400580525398, + 0.01455289963632822, + 0.008795954287052155, + -0.011782696470618248, + 0.006107886787503958, + -0.045368608087301254, + -0.010580533184111118, + -0.04943057522177696, + -0.007201781030744314, + -0.029658345505595207, + 0.005237998440861702, + -0.060989268124103546, + 0.03742387518286705, + 0.012805655598640442, + -0.0036064907908439636, + 0.012133638374507427, + 0.045159537345170975, + 0.03270482271909714, + 0.032167207449674606, + -0.04085862636566162, + -0.010961342602968216, + -0.017472438514232635, + -0.0038752974942326546, + 0.03566169738769531, + 0.021519474685192108, + 0.0007289516506716609, + 0.014187023043632507, + 0.03091277740895748, + 0.035064347088336945, + -0.0010154922492802143, + 0.031629595905542374, + 0.03500461205840111, + 0.003705426584929228, + 0.03852896764874458, + -0.0033078165724873543, + 0.02461075223982334, + 0.07562430202960968, + -0.011200281791388988, + 0.05543392896652222, + 0.034676071256399155, + 0.02187788300216198, + 0.03342163935303688, + -0.009146897122263908, + -0.031629595905542374, + -0.006003350950777531, + -0.012200839817523956, + 0.010625333525240421, + -0.03631877899169922, + -0.015060645528137684, + 0.0239387359470129, + -0.013537406921386719, + 0.0337800495326519, + -0.03357097879052162, + -0.028598053380846977, + -0.008497280068695545, + -0.03700572997331619, + 0.04450245201587677, + -0.0094157038256526, + -0.001339367008768022, + -0.0037763617001473904, + -0.026746273040771484, + -0.023923801258206367, + -0.044203776866197586, + 0.03363071382045746, + -0.042650673538446426, + 0.030046623200178146, + 0.018189257010817528, + 0.009281300008296967, + -0.0018107121577486396, + -0.029285002499818802, + -0.028986329212784767, + 0.014799305237829685, + 0.019846899434924126, + 0.03357097879052162, + -0.03443713113665581, + -0.022968044504523277, + -0.015269717201590538, + -0.04262080416083336, + -0.019817031919956207, + 0.0275825597345829, + 0.0039648995734751225, + 0.00430090818554163, + 0.018144456669688225, + -0.0074332538060843945, + -0.04719052091240883, + 0.01435876078903675, + 0.07640085369348526, + -0.06493176519870758, + -0.04017167538404465, + -0.0021205865778028965, + -0.06827691942453384, + 0.007989534176886082, + -0.011319750919938087, + 0.03721480444073677, + -0.01851779967546463, + -0.009161830879747868, + 0.034825410693883896, + 0.026567067950963974, + -0.03091277740895748, + 0.04542834311723709, + 0.008915424346923828, + 0.04847481846809387, + 0.029464207589626312, + 0.045547813177108765, + -0.05408989265561104, + -0.032585352659225464, + 0.0005189463845454156, + 0.003393685445189476, + 0.03055436909198761, + -0.03413845971226692, + -0.10053373128175735, + 0.005607607774436474, + 0.01848793216049671, + -7.262682629516348e-05, + -0.006014551036059856, + -0.003602757351472974, + 0.01777111366391182, + -0.0077057937160134315, + -0.03437739610671997, + -0.016277743503451347, + -0.007515389006584883, + -0.014702236279845238, + 0.045965954661369324, + -0.007582590915262699, + -0.020399445667862892, + 0.016979627311229706, + -0.020279977470636368, + 0.020384512841701508, + -0.019309286028146744, + 0.015590792521834373, + -0.009355968795716763, + -0.040231410413980484, + -0.004248640034347773, + -0.016277743503451347, + -0.006283358205109835, + 0.01738283783197403, + 0.03646811842918396, + 0.023983536288142204, + -0.031032247468829155, + -0.00916929729282856, + 0.034676071256399155, + -0.005122262053191662, + -0.018756737932562828, + -0.015068111941218376, + -0.0026171323843300343, + 0.025297703221440315, + -0.0005922148702666163, + 0.044801127165555954, + -0.08589869737625122, + 0.03213734179735184, + -0.003335817251354456, + 0.01140188705176115, + -0.014343827031552792, + 0.017218565568327904, + -0.013798747211694717, + 0.028762323781847954, + -0.026865743100643158, + 0.04999805614352226, + -0.020683186128735542, + 0.07658006250858307, + -0.03342163935303688, + -0.018219124525785446, + -0.029942085966467857, + 0.02290830947458744, + -0.004838521592319012, + 0.06397601217031479, + 0.014724637381732464, + -0.03073357231914997, + 0.06379680335521698, + -0.02789616771042347, + -0.03171919658780098, + -0.025163300335407257, + 0.019428756088018417, + 0.011327218264341354, + 0.01002051867544651, + 0.06385654211044312, + 0.011760295368731022, + 0.014791838824748993, + 0.054298967123031616, + 0.0477878674864769, + 0.0028318045660853386, + 0.02585024945437908, + 0.0360499732196331, + 0.010819472372531891, + -0.055493663996458054, + 0.0315101258456707, + 0.030853042379021645, + -0.005630008410662413, + -0.020160507410764694, + 0.030001820996403694, + -0.0247451551258564, + -0.010057852603495121, + -0.02414780668914318, + 0.06761983036994934, + 0.028598053380846977, + -0.0005394802428781986, + -0.005249198526144028, + 0.0019731163047254086, + 0.014702236279845238, + 0.031808800995349884, + 0.006645500659942627, + -0.02991221845149994, + -0.00017838782514445484, + -0.0135075394064188, + 0.001358034205622971, + 0.004241173155605793, + 0.005264132283627987, + -0.026133989915251732, + 0.0038416965398937464, + -0.03861857205629349, + 0.02647746540606022, + 0.016188140958547592, + 0.016277743503451347, + -0.007660992443561554, + -0.003908898215740919, + -0.016949759796261787, + 0.029792748391628265, + 0.026417730376124382, + 0.004689184483140707, + -0.047996941953897476, + 0.011946966871619225, + 0.025924919173121452, + -0.0456075482070446, + -0.002413660753518343, + 0.03533315658569336, + -0.018174324184656143, + 0.0066156331449747086, + 0.036945994943380356, + 0.023356320336461067, + -0.013821147382259369, + -0.004931857343763113, + 0.00343848648481071, + -0.00911702960729599, + -0.004603315610438585, + 0.030853042379021645, + 0.022923242300748825, + -0.08536107838153839, + 0.006828438490629196, + 0.01862233504652977, + -0.02719428390264511, + -0.003845429979264736, + 0.04641396552324295, + 0.005626274738460779, + -0.031420525163412094, + 0.004513713531196117, + 0.011932033114135265, + 0.01341793779283762, + 0.0455179437994957, + -0.0069852424785494804, + 0.016023870557546616, + 0.019802097231149673, + 0.02846364863216877, + -0.06911320239305496, + 0.03843936696648598, + -0.0013431004481390119, + 0.03440726548433304, + -0.02208695560693741, + 0.027522824704647064, + 0.04468165710568428, + -0.003761427942663431, + -0.007855131290853024, + 0.004364376422017813, + 0.011760295368731022, + -0.026567067950963974, + -0.010289325378835201, + -0.01288779079914093, + -0.05035646632313728, + -0.01008772011846304, + 0.013768879696726799, + -0.042680539190769196, + 0.025118498131632805, + 0.03148026019334793, + -0.023923801258206367, + 0.02552170865237713, + -0.001074293628334999, + 0.01989169977605343, + 0.013813680969178677, + 0.021997353062033653, + -0.004831054713577032, + -0.0035878235939890146, + -0.0239387359470129, + -0.010438662953674793, + -0.01261898409575224, + -0.02205708809196949, + -0.04181438311934471, + 0.013350735418498516, + -0.04061968997120857, + -0.01663615182042122, + -0.016830289736390114, + 0.021922685205936432, + -0.014381161890923977, + -0.0012964325724169612, + -0.020011169835925102, + 0.020384512841701508, + 0.018502864986658096, + 0.022490166127681732, + -0.03566169738769531, + -0.0048347883857786655, + -0.02050398290157318, + 0.013268600217998028, + -0.008579416200518608, + 0.029180467128753662, + 0.01523984968662262, + -0.02148960717022419, + 0.061168473213911057, + -0.04817614331841469, + -0.014642501249909401, + -0.014007818885147572, + 0.0005530139314942062, + -0.030569301918148994, + -0.010617867112159729, + 0.05609101057052612, + 0.032167207449674606, + 0.009796513244509697, + -0.0365278534591198, + -0.005693476647138596, + 0.019145015627145767, + -0.015799863263964653, + -0.0686950609087944, + -0.010894140228629112, + -0.028583118692040443, + -0.03443713113665581, + 0.007847663946449757, + 0.004442778415977955, + 0.017427638173103333, + 0.0016361745074391365, + -0.01699456013739109, + 0.0012357643572613597, + -0.00949037168174982, + 0.0270150788128376, + -0.021758414804935455, + 0.0456075482070446, + 0.009923449717462063, + 0.0085868826135993, + -0.01290272455662489, + -0.07186100631952286, + 0.0048347883857786655, + -0.005532938987016678, + -0.020414380356669426, + -0.01663615182042122, + 0.033690448850393295, + -0.026298262178897858, + -0.012081370688974857, + 0.0048347883857786655, + -0.03476567566394806, + -0.03395925462245941, + -0.016680952161550522, + -0.013126729987561703, + 0.012148572131991386, + 0.012342710047960281, + -0.008482346311211586, + -0.008459946140646935, + 0.04118717089295387, + -0.045010197907686234, + -0.027836432680487633, + 0.01671081967651844, + 0.014291559346020222, + -0.03721480444073677, + -0.022460298612713814, + -0.01805485412478447, + 0.0018657802138477564, + 0.004778787028044462, + 0.022878441959619522, + -0.001563372672535479, + 0.004005967639386654, + 0.03261522203683853, + -0.023879000917077065, + -0.006656700745224953, + -0.0007345518097281456, + 0.003662492148578167, + 0.012409912422299385, + -0.0010098920902237296, + -0.019025545567274094, + 0.0012133638374507427, + -0.0033078165724873543, + 0.014231824316084385, + 0.03610970824956894, + 0.025372371077537537, + -0.06791850924491882, + 0.004241173155605793, + -0.017800981178879738, + -0.005742011126130819, + -0.02177334763109684, + -0.01735297031700611, + -0.01730816811323166, + 0.00040951030678115785, + -0.02422247640788555, + 0.03306323289871216, + 0.026582002639770508, + -0.010968809016048908, + -0.025969719514250755, + -0.028866859152913094, + 0.01854766719043255, + 0.0003073077241424471, + -0.0239387359470129, + -0.02138507179915905, + 0.04318828508257866, + -0.004509980324655771, + -0.01929435133934021, + -2.1408872271422297e-05, + -0.02205708809196949, + 0.005868947599083185, + 0.04130663722753525, + -0.008990093134343624, + 0.0056150746531784534, + -0.0008381544030271471, + 0.004297174513339996, + 0.019339153543114662, + -0.007407119497656822, + 0.042083192616701126, + -0.0427701435983181, + 0.014806772582232952, + -0.010505864396691322, + 0.01025199145078659, + -0.013440337963402271, + -0.010737337172031403, + 0.009184231050312519, + -0.02216162346303463, + -0.0027702029328793287, + -0.02517823316156864, + 0.009923449717462063, + 0.008698885329067707, + 0.04474139213562012, + -0.0405002199113369, + 0.005622541531920433, + 0.033690448850393295, + 0.005764411762356758, + 0.004924390465021133, + -0.03422806039452553, + -0.01007278636097908, + 0.005980950314551592, + 0.03512408211827278, + 0.01283552311360836, + -0.04996819049119949, + -0.0016240408876910806, + 0.01084933988749981, + 0.02283364161849022, + -0.004580915439873934, + 0.010475996881723404, + 0.007758061867207289, + 0.01347020547837019, + -0.0044502452947199345, + 0.04082876071333885, + -0.023595260456204414, + 0.04987858608365059, + 0.0013010994298383594, + -0.03148026019334793, + 0.00670150201767683, + 0.007653526030480862, + -0.011439220979809761, + -0.010909073986113071, + -0.027836432680487633, + 0.011745361611247063, + -0.0077057937160134315, + -0.01513531431555748, + -0.051849838346242905, + 0.016845224425196648, + -0.023998470976948738, + 0.0029344737995415926, + -0.005469470750540495, + -0.0019152481108903885, + 0.040410615503787994, + 0.011058411560952663, + 0.014784371480345726, + -0.004905723500996828, + 0.0016921758651733398, + 0.025641178712248802, + 1.8127539078705013e-05, + -0.02489449270069599, + -0.03691612929105759, + -0.013641943223774433, + 0.016979627311229706, + -0.023953668773174286, + 0.02213175594806671, + -0.020668253302574158, + -0.008982625789940357, + -0.010752269998192787, + -0.01621800847351551, + 0.019712496548891068, + 0.0012805655132979155, + -0.027268951758742332, + 0.004599582403898239, + 0.024760089814662933, + -0.00772819435223937, + -0.012424846179783344, + 0.014642501249909401, + -0.010446129366755486, + 0.032376281917095184, + 0.01585959829390049, + 0.01745750568807125, + 0.030031688511371613, + 0.033899519592523575, + 0.012006701901555061, + -0.025252901017665863, + -0.0029102065600454807, + -0.006555898115038872, + 0.009199164807796478, + 0.005809212569147348, + -0.001922714989632368, + 0.008377810940146446, + -0.005402269307523966, + 0.04259093850851059, + 0.005107328295707703, + 0.0009688243735581636, + -0.013029661029577255, + -0.03891724720597267, + -0.012783254496753216, + 0.005432136822491884, + 0.014351294375956059, + 0.02358032576739788, + -0.022355761379003525, + 0.020369578152894974, + -0.019055413082242012, + 0.024416614323854446, + 0.06439415365457535, + 0.0024211276322603226, + 0.014769437722861767, + -0.024117939174175262, + -0.017427638173103333, + -0.023983536288142204, + -0.011439220979809761, + -0.02598465420305729, + 0.021862950176000595, + 0.022400563582777977, + -0.058898549526929855, + -0.02425234392285347, + 0.02903112955391407, + 0.005099861416965723, + -0.020862391218543053, + -0.007235381752252579, + -0.021131198853254318, + 0.01432142686098814, + 0.026328129693865776, + -0.0010546932462602854, + 0.01730816811323166, + -0.008781020529568195, + 0.01989169977605343, + 0.029718080535531044, + -0.025581443682312965, + 0.017412705346941948, + -0.04029114544391632, + 0.023744598031044006, + -0.01593426801264286, + -0.03802122175693512, + -0.029434340074658394, + -0.02035464532673359, + 0.030210893601179123, + 0.006234823260456324, + -0.0393652580678463, + -8.87272326508537e-05, + 0.0024080604780465364, + 0.008452478796243668, + 0.0018480464350432158, + 0.013656876981258392, + 0.027836432680487633, + 0.0008050202741287649, + -0.023625127971172333, + -0.018428197130560875, + 0.006428961642086506, + 0.03843936696648598, + 0.011640826240181923, + 0.01730816811323166, + -0.02443154715001583, + -0.03291389346122742, + -0.02580544911324978, + 0.014306493103504181, + 0.006343092769384384, + 0.005992150865495205, + -0.001960049383342266, + 0.005454536993056536, + 0.029822615906596184, + -0.03566169738769531, + 0.0023016578052192926, + 0.030882909893989563, + -0.021638944745063782, + 0.009064760990440845, + 0.0224752314388752, + 0.03395925462245941, + 0.001768711139447987, + -3.3717515179887414e-05, + 0.015560925006866455, + -0.02241549640893936, + 0.021862950176000595, + -0.009542640298604965, + 0.0009268232970498502, + 0.012499514035880566, + -0.011155480518937111, + 0.03282429277896881, + -0.003277949057519436, + 0.015015844255685806, + 0.031241318210959435, + -0.001004291931167245, + -0.0011480288812890649, + 0.008459946140646935, + 0.02074292115867138, + 0.026955343782901764, + -0.026133989915251732, + -0.02156427502632141, + -0.005462003871798515, + -0.013477671891450882, + -0.003296616254374385, + -0.01568039506673813, + 0.004498779773712158, + -0.016949759796261787, + 0.007015109993517399, + 0.017248433083295822, + -0.008116470649838448, + 0.0015708395512774587, + 0.009057294577360153, + 0.011036010459065437, + 0.004431578330695629, + 0.053402941673994064, + 0.01432142686098814, + -0.015426521189510822, + -0.015307052060961723, + 0.0021000527776777744, + 0.048982564359903336, + -0.0060257515870034695, + 0.020832523703575134, + 0.011693093925714493, + -0.014015286229550838, + -0.02931487001478672, + 0.021370137110352516, + 0.029374605044722557, + 0.004756386391818523, + 0.005465737544000149, + -0.004987858701497316, + -0.003397418884560466, + 0.01617320626974106, + 0.003257415257394314, + -0.007855131290853024, + 0.01438862830400467, + -0.03996260464191437, + 0.006264690775424242, + -0.038857512176036835, + -0.011484022252261639, + 0.018189257010817528, + 0.02541717328131199, + 0.004028367809951305, + -0.02378939837217331, + -0.03279442340135574, + 0.046712640672922134, + -0.03148026019334793, + -0.03386965021491051, + 0.008191139437258244, + -0.020668253302574158, + 0.011834964156150818, + -0.00756019027903676, + 0.03855883702635765, + 0.00515212956815958, + 0.03763294592499733, + -0.03682652488350868, + -0.026208659633994102, + 0.023774463683366776, + 0.01545638870447874, + -0.02988235093653202, + -0.010647734627127647, + 0.00835540983825922, + -0.040410615503787994, + -0.006735102739185095, + -0.0058204131200909615, + 0.008347943425178528, + 0.03864843770861626, + -0.04748919606208801, + 0.03876790776848793, + -0.03688625991344452, + 0.013089396059513092, + 0.022564833983778954, + -0.029733015224337578, + 0.035422757267951965, + -0.006354293320327997, + -0.05364188179373741, + -0.017517240718007088, + 0.009184231050312519, + -0.04566728323698044, + 0.007922332733869553, + 0.025551576167345047, + -0.021325336769223213, + 0.014829172752797604, + -0.003029676154255867, + 0.028612986207008362, + 0.01929435133934021, + 0.004215039312839508, + -0.03476567566394806, + 0.005428403150290251, + 0.0014793705195188522, + 0.04396484047174454, + -0.02906099706888199, + 0.013410470448434353, + -0.010461063124239445, + -0.022012287750840187, + 0.03969379886984825, + 0.008855689316987991, + -0.0154713224619627, + 0.05331334099173546, + 0.008452478796243668, + -0.02722415141761303, + -0.006343092769384384, + 0.0483553484082222, + -2.528813638491556e-05, + 0.001624974189326167, + 0.024088071659207344, + -0.006850839126855135, + 0.01978716440498829, + -0.01037146057933569, + 0.00028630721499212086, + -0.01936902105808258, + -0.001267498591914773, + -0.006723902653902769, + -0.030972512438893318, + 0.0029008728452026844, + 0.00350008811801672, + 0.0264475978910923, + -0.022534966468811035, + -0.011730428785085678, + 0.025342503562569618, + 0.003229414578527212, + -0.014508098363876343, + 0.0021971219684928656, + -0.006779904011636972, + -0.022296028211712837, + -0.0478774718940258, + -0.011991768144071102, + -0.025790514424443245, + 0.0270150788128376, + -0.016845224425196648, + -0.003920098766684532, + 0.00629455829039216, + -0.01820419169962406, + -0.019637826830148697, + -0.015799863263964653, + -0.014717170037329197, + 0.004879589192569256, + -0.025730781257152557, + 0.007944732904434204, + 0.016830289736390114, + -0.025372371077537537, + -0.0041702380403876305, + -0.01699456013739109, + 0.003296616254374385, + 0.022594701498746872, + 0.011028544045984745, + 0.0003110411635134369, + -0.029971953481435776, + -0.0216688122600317, + 0.037543345242738724, + -0.030419964343309402, + -0.0011788296978920698, + 0.00041604379657655954, + -0.030390096828341484, + -0.00772819435223937, + -0.04148584231734276, + 0.015874532982707024, + -0.010490930639207363, + -0.006828438490629196, + 0.044412851333618164, + 0.008982625789940357, + -0.0069217742420732975, + -0.02014557272195816, + -0.025999587029218674, + -0.0005777478800155222, + 0.0027384688146412373, + 0.029538875445723534, + 0.0399327389895916, + -0.05417949706315994, + -0.010819472372531891, + 0.007459387648850679, + -0.01083440613001585, + -0.02779163233935833, + -0.015545991249382496, + 0.005428403150290251, + 0.021967485547065735, + 0.006682834587991238, + 0.023416055366396904, + 0.021444806829094887, + -0.01087174005806446, + -0.034825410693883896, + -0.0055777402594685555, + -0.023072579875588417, + 0.021190933883190155, + -0.0023613928351551294, + 0.007410853169858456, + -0.006903106812387705, + 0.009348501451313496, + 0.05868947505950928, + 0.01568039506673813, + 0.019996237009763718, + 0.03688625991344452, + 0.01720363274216652, + -0.024879559874534607, + 0.008123937994241714, + -0.024670487269759178, + -0.007455653976649046, + -0.009064760990440845, + 0.007758061867207289, + -0.00047647865721955895, + -0.0073212506249547005, + 0.007291383575648069, + 0.0023987269960343838, + 0.015874532982707024, + -0.005827879998832941, + -0.008019401691854, + 0.047668397426605225, + 0.022594701498746872, + 0.02800070494413376, + -0.008728752844035625, + -0.027851367369294167, + -0.015889465808868408, + 0.0017715112771838903, + 0.00366435875184834, + -0.0019171148305758834, + -0.008385277353227139, + -0.036199308931827545, + -0.011693093925714493, + -0.03784201666712761, + 0.01869700290262699, + 0.0030315429903566837, + -0.013873415999114513, + 0.005364934913814068, + -0.010946408845484257, + -0.00996825098991394, + -0.006832171697169542, + 0.002703001257032156, + 0.016680952161550522, + 0.001390701625496149, + 0.011103212833404541, + -0.0140750203281641, + 0.021131198853254318, + -0.007112178951501846, + 0.02499902807176113, + -0.015545991249382496, + -0.007772995624691248, + 0.018368462100625038, + -0.0050289263017475605, + -0.02241549640893936, + 0.0023053912445902824, + 0.02275897189974785, + 0.014194490388035774, + -0.016845224425196648, + 0.0011797629995271564, + -0.01720363274216652, + -0.005350001156330109, + -0.002585398266091943, + -0.02562624402344227, + -0.010707469657063484, + 0.003765161382034421, + 0.015844665467739105, + 3.3425840229028836e-05, + 0.0002009050513152033, + 0.00826580822467804, + -0.007825263775885105, + -0.024386746808886528, + 0.04713078588247299, + -0.008810888044536114, + -0.027239084243774414, + -0.010349060408771038, + -0.007459387648850679, + -0.020518915727734566, + -0.005547872744500637, + 0.006974041927605867, + 3.823846054729074e-05, + -0.02995702065527439, + 0.00532760052010417, + 0.00012600317131727934, + 0.0022419230081140995, + 0.005656142253428698, + 0.007205514702945948, + 0.0076385922729969025, + -0.05767398327589035, + -0.00854954868555069, + 0.0149038415402174, + -0.021161066368222237, + 0.004047035239636898, + -0.009856248274445534, + -0.009863714687526226, + 0.053014665842056274, + -0.05229784920811653, + 0.01932421885430813, + 0.057614248245954514, + -0.00021513874526135623, + -0.020548783242702484, + -0.027522824704647064, + 0.0023221918381750584, + 0.007489255163818598, + 0.020369578152894974, + -0.0031230119056999683, + -0.0005805479595437646, + -0.023416055366396904, + 0.03882764279842377, + 0.034676071256399155, + -0.01745750568807125, + -0.019130080938339233, + -0.013813680969178677, + -0.00015902066661510617, + -0.029613545164465904, + 0.026104122400283813, + -0.025790514424443245, + -0.010767203755676746, + -0.043248020112514496, + 0.013813680969178677, + 0.029270069673657417, + -0.0065782987512648106, + -0.013627009466290474, + 0.05173036828637123, + 0.00973677821457386, + -0.031062114983797073, + -0.03479554131627083, + 0.000432377535616979, + 0.0043121082708239555, + 0.021638944745063782, + -0.02141493931412697, + 0.006507363636046648, + -0.015889465808868408, + -0.008138871751725674, + 0.011812563985586166, + 0.007063644472509623, + -0.04205332323908806, + -0.02290830947458744, + -0.02265443652868271, + 0.008736219257116318, + -0.004946791101247072, + 0.015949200838804245, + -0.02616385743021965, + -0.02378939837217331, + 0.016964692622423172, + -0.027746831998229027, + 0.029255134984850883, + -0.0031248785089701414, + 0.003399285487830639, + 0.010147455148398876, + 0.008706352673470974, + 0.026955343782901764, + -0.028836991637945175, + 0.011610958725214005, + 0.026044389232993126, + -0.01848793216049671, + -0.01898074336349964, + -0.017039362341165543, + 0.04091836139559746, + 0.015045711770653725, + -0.010214656591415405, + -0.030016755685210228, + -0.026253459975123405, + -0.002208322286605835, + -0.006481229793280363, + -0.020668253302574158, + 0.02807537280023098, + -0.002581664826720953, + -0.008482346311211586, + 0.0034067523665726185, + -0.01706922985613346, + -0.009841314516961575, + 0.00010383594781160355, + 0.0309426449239254, + 0.0286727212369442, + -0.002663800260052085, + -0.03814069181680679, + -0.017084162682294846, + 0.010864273644983768, + 0.015904400497674942, + 0.015157714486122131, + 0.010707469657063484, + -0.0500577911734581, + -0.01311926357448101, + 0.02634306252002716, + -0.013231266289949417, + 0.03891724720597267, + 0.0026918009389191866, + -0.012738454155623913, + -0.00805673561990261, + 0.03682652488350868, + 0.0012310976162552834, + -0.0025480641052126884, + -0.004319575149565935, + -0.03174906596541405, + 0.022176558151841164, + 0.01380621362477541, + -0.019100213423371315, + 0.036169443279504776, + 0.03930552303791046, + 0.004741452634334564, + 0.023729663342237473, + -0.00716818030923605, + 0.0008731553098186851, + 0.03091277740895748, + -0.03497474640607834, + -0.05540405958890915, + -0.022101888433098793, + 0.017621776089072227, + 0.021549342200160027, + -0.0015167047968134284, + 0.03590063750743866, + -0.013276067562401295, + -0.0036736924666911364, + -0.0023427256383001804, + 0.0143363606184721, + -0.009094628505408764, + 0.0022120557259768248, + 0.014747037552297115, + -0.011342152021825314, + 0.0433376245200634, + -0.004890789743512869, + -0.04829561337828636, + -0.00996825098991394, + -0.0013300334103405476, + -0.006496163550764322, + 0.006350559648126364, + -0.02665667049586773, + -0.009841314516961575, + -0.002473395550623536, + -0.008176205679774284, + -0.03509421646595001, + -0.00920663122087717, + 0.033720314502716064, + -0.02311738207936287, + 0.025148365646600723, + -0.02765722945332527, + -0.00018772139446809888, + 0.0025499307084828615, + -0.011498956009745598, + -0.019025545567274094, + 0.008848222903907299, + -0.031032247468829155, + 0.014597700908780098, + -0.020294910296797752, + -0.002374459756538272, + -0.011954434216022491, + -0.009647175669670105, + 7.927699334686622e-05, + 0.002335258759558201, + 0.020907191559672356, + 0.010894140228629112, + 0.00658576563000679, + -0.04053008556365967, + -0.018039921298623085, + 0.027358554303646088, + -0.014597700908780098, + -0.01456783339381218, + -0.03897697851061821, + 0.022400563582777977, + -0.020100772380828857, + -0.03153999149799347, + -0.02882205881178379, + -0.024341944605112076, + -0.0016352410893887281, + 0.010147455148398876, + 0.027955902740359306, + -0.0013552340678870678, + 0.023445922881364822, + -0.016621217131614685, + 0.006066819187253714, + -0.0005427469732239842, + 0.016277743503451347, + -0.02708974853157997, + -0.00943810399621725, + 0.02967328019440174, + -0.06965082138776779, + -0.008542081341147423, + 0.01865220256149769, + 0.001838712953031063, + 0.014993444085121155, + 0.03300349786877632, + 0.003957432694733143, + 0.02131040208041668, + 0.007855131290853024, + -0.005215597804635763, + 0.015083045698702335, + -0.05543392896652222, + -0.010797071270644665, + 0.024984095245599747, + 0.0026357995811849833, + -0.009998118504881859, + 0.02365499548614025, + 0.01898074336349964, + -0.03858870267868042, + -0.050117526203393936, + -0.0039761001244187355, + 0.025581443682312965, + -0.021922685205936432, + -0.0041067698039114475, + 0.017711378633975983, + -0.0009538906742818654, + -0.011476554907858372, + 0.03724467009305954, + -0.0085868826135993, + -0.006962841842323542, + -0.010095187462866306, + -0.02934473752975464, + -0.009005026891827583, + 0.024491282179951668, + 0.0224752314388752, + 0.006313225254416466, + 0.03455660119652748, + -0.01578493043780327, + 0.0236101932823658, + -0.00025690646725706756, + -0.0043867770582437515, + 0.025939851999282837, + 0.018099654465913773, + 0.008430078625679016, + -0.0066156331449747086, + -0.025536641478538513, + -0.0188314076513052, + -0.028941527009010315, + -0.00601828470826149, + -0.0018760472303256392, + 0.011879765428602695, + 0.005051326937973499, + -0.0365278534591198, + 0.009184231050312519, + -0.027537759393453598, + 0.03148026019334793, + -0.013671810738742352, + -0.038319896906614304, + -0.007489255163818598, + -3.721760367625393e-05, + -0.0011928300373256207, + 0.048773493617773056, + 0.022325895726680756, + -0.02074292115867138, + 0.012663785368204117, + -0.00773566123098135, + -0.008101536892354488, + 0.009184231050312519, + -0.0051297289319336414, + -0.010475996881723404, + -0.019443688914179802, + -0.004495046567171812, + -0.00892289076000452, + 0.0024024604354053736, + 0.023714730516076088, + -0.040559954941272736, + 0.006081752944737673, + 0.017039362341165543, + 0.006440162193030119, + -0.027672162279486656, + 0.005547872744500637, + 0.011872299015522003, + -0.009975717402994633, + -0.017800981178879738, + 0.02941940724849701, + -0.02970314770936966, + 0.018846340477466583, + 0.0337800495326519, + -0.005898815114051104, + 0.002475262153893709, + -0.017158832401037216, + -0.010998676531016827, + -0.0236101932823658, + 0.009886114858090878, + -0.006727635860443115, + -0.004928124137222767, + 0.0016025736695155501, + -0.02131040208041668, + -0.006089219823479652, + 0.019145015627145767, + 0.015919333323836327, + -0.0002452394983265549, + -0.004457712173461914, + 0.015000910498201847, + -0.011431754566729069, + -0.02740335650742054, + 0.032376281917095184, + 0.016949759796261787, + -0.003767027985304594, + 0.007302583660930395, + 0.014425963163375854, + -0.018010053783655167, + -0.014769437722861767, + -0.02499902807176113, + -0.004173971712589264, + 0.020951993763446808, + 0.00973677821457386, + 0.014351294375956059, + -0.01064026728272438, + 0.001246964675374329, + -0.015426521189510822, + 0.009818913415074348, + -0.007660992443561554, + 0.015336918644607067, + 0.01083440613001585, + -0.0037128934636712074, + -0.028583118692040443, + -0.018786605447530746, + 0.0019787163473665714, + -0.0022456564474850893, + -0.021056529134511948, + 0.044203776866197586, + -0.01117041427642107, + -0.030509566888213158, + -0.010475996881723404, + 0.037931621074676514, + -0.02662680298089981, + 0.011633358895778656, + -0.01408995408564806, + 0.016188140958547592, + -0.011043477803468704, + -0.0016651084879413247, + -0.024655552580952644, + 0.002676867414265871, + -0.03736414015293121, + 0.030584236606955528, + 0.010752269998192787, + 0.013089396059513092, + 0.0182639267295599, + -0.01083440613001585, + -0.005376134999096394, + 0.032167207449674606, + -0.0016959093045443296, + 0.013477671891450882, + 0.024401679635047913, + ], + "index": 59, + }, + { + "title": "Ogron", + "text": "Ogrons are a fictional extraterrestrial race from the British science fiction television series Doctor Who. Ogrons are low-intelligence, ape-like hominids who live in scattered communities on an unnamed planet on the outer fringes of the Milky Way, far from the central spaceways. The dominant lifeform on their home planet is a giant slug-like lizard named the Eater, which preys on and is prayed to by the Ogrons. Ogrons are hired mercenaries.", + "vector": [ + -0.020616374909877777, + -0.020223993808031082, + -0.02184256725013256, + -0.03233877196907997, + -0.01177961751818657, + 0.003856373718008399, + 0.01400311291217804, + -0.055652767419815063, + -0.029771940782666206, + 0.0008685526554472744, + -0.037701316177845, + 0.056993402540683746, + -0.02800622582435608, + 0.01667621172964573, + 0.024327648803591728, + 0.015204780735075474, + -0.01393771544098854, + 0.03691655397415161, + -0.02651844546198845, + -0.010136520490050316, + 0.03449686989188194, + -0.00145610305480659, + -0.01051255315542221, + -0.04303116351366043, + 0.055521972477436066, + 0.023232251405715942, + 0.037308935075998306, + 0.00985858403146267, + 0.019897008314728737, + -0.012400888837873936, + 0.01728113181889057, + 0.008195050060749054, + 0.006748143117874861, + 0.04659529775381088, + -0.022839870303869247, + -0.04993053898215294, + -0.002352244919165969, + -0.014117557555437088, + 0.0265511441975832, + -0.017133990302681923, + 0.03318893164396286, + -0.015899622812867165, + 0.005530125927180052, + 0.03268210589885712, + -0.02341209165751934, + 0.03197908774018288, + 0.007586040999740362, + 0.003940163645893335, + 0.036720361560583115, + 0.012163824401795864, + -0.0012987416703253984, + -0.012572554871439934, + -0.004663616884499788, + 0.02025669254362583, + -0.012245570309460163, + 0.02025669254362583, + 0.04705307260155678, + 0.01621025800704956, + 0.007160961162298918, + 0.0034721670672297478, + -0.03104718215763569, + -0.01018556859344244, + -0.04332545027136803, + 0.01659446582198143, + 0.04682418331503868, + 0.01798414997756481, + 0.019995104521512985, + 0.05346197262406349, + 0.002429903717711568, + -0.011722395196557045, + 0.002499388065189123, + 0.010733267292380333, + 0.012449936009943485, + -0.02422955445945263, + -0.04770704358816147, + 0.011959459632635117, + 0.013806921429932117, + -0.02941225841641426, + -0.010332711040973663, + -0.08540835976600647, + 0.008607868105173111, + 0.031276069581508636, + 0.020142247900366783, + 0.04986514151096344, + 0.052513714879751205, + 0.010651521384716034, + 0.016283830627799034, + -0.053298477083444595, + -0.018556371331214905, + -0.005252189002931118, + -0.0030981784220784903, + 0.054704513400793076, + -0.0065315160900354385, + 0.027662891894578934, + 0.0006110523245297372, + -0.036524172872304916, + -0.011624299921095371, + -0.016790656372904778, + -0.017624465748667717, + 0.011673348024487495, + -0.01059429906308651, + -0.011125648394227028, + -0.028447654098272324, + -0.006658222526311874, + 0.038191791623830795, + 0.049538157880306244, + 0.052382923662662506, + 0.0602632500231266, + -0.03864957019686699, + 0.050944190472364426, + 0.007095564156770706, + -0.016406448557972908, + -0.004083219449967146, + -0.013847795315086842, + 0.007091477047652006, + 0.005145919043570757, + -0.01819668896496296, + 0.005697705317288637, + -0.08671630173921585, + -0.016054941341280937, + 0.0031533571891486645, + -0.008526121266186237, + -0.02200605906546116, + 0.010030250996351242, + -0.0014673430705443025, + -0.012310967780649662, + -0.04989783838391304, + 0.05496609956026077, + 0.016807004809379578, + 0.03904195502400398, + -0.006715444847941399, + -0.019864309579133987, + 0.004855720326304436, + -0.017771609127521515, + 0.06742420792579651, + 0.0265511441975832, + 0.025194158777594566, + 0.006948421243578196, + 0.017640816047787666, + 0.04911307618021965, + -0.05064990371465683, + 0.02025669254362583, + 0.012654301710426807, + 0.0377667136490345, + -0.012229221872985363, + 0.0378648079931736, + -0.0057058800011873245, + 0.011043902486562729, + 0.018654467537999153, + -0.023281298577785492, + 0.0529060959815979, + -0.02727051079273224, + 0.008836757391691208, + -0.0018341788090765476, + 0.005068260245025158, + -0.008109216578304768, + -0.005329847801476717, + -0.027515748515725136, + -0.02030573971569538, + 0.02192431315779686, + -0.04924387112259865, + 0.03331972286105156, + -0.06510262191295624, + 0.008231835439801216, + 0.01808224432170391, + -0.039009254425764084, + 0.08880899846553802, + 0.035935599356889725, + -0.01548271719366312, + 0.006482468452304602, + -0.01881795935332775, + -0.000675427436362952, + 0.031390514224767685, + 0.027744637802243233, + -0.02949400432407856, + 0.06912452727556229, + 0.012776920571923256, + 0.0059347692877054214, + -0.005812149960547686, + 0.023755425587296486, + -0.01016104407608509, + 0.01365160383284092, + 0.010937632992863655, + -0.013586207292973995, + 0.02576638199388981, + 0.018000498414039612, + -0.00024932570522651076, + 0.02867654338479042, + 0.01971716806292534, + -0.0006641873042099178, + 0.0037174054887145758, + -0.03094908595085144, + -0.018670815974473953, + -0.011722395196557045, + 0.01736287958920002, + 0.03016432374715805, + -0.0379956029355526, + -0.027744637802243233, + -0.05656832456588745, + -0.02506336383521557, + 0.009171916171908379, + -0.03191369026899338, + 0.043488942086696625, + 0.008227747865021229, + -0.012997634708881378, + -0.023820823058485985, + 0.0051336572505533695, + -0.009458027780056, + -0.007418461609631777, + 0.01286684162914753, + 0.04898228123784065, + -0.005611871834844351, + 0.0007275405805557966, + 0.05375625565648079, + -0.06703183054924011, + -0.01577700302004814, + 0.005476990714669228, + 0.0052113160490989685, + 0.002407423686236143, + 0.011853189207613468, + -0.02653479389846325, + -0.02043653279542923, + 0.021744471043348312, + 0.0010851799743250012, + 0.0022704987786710262, + -0.029919084161520004, + -0.03466036170721054, + 0.02566828578710556, + -0.017003195360302925, + -0.020600026473402977, + -0.07455247640609741, + 0.020027803257107735, + 0.005260363686829805, + -0.0113708870485425, + -0.08174613118171692, + 0.050976887345314026, + 0.038911160081624985, + 0.011616125702857971, + -0.010169219225645065, + -0.01880161091685295, + 0.02723781205713749, + 0.018409229815006256, + -0.002517780987545848, + 0.011746919713914394, + 0.07245977222919464, + 0.011166521348059177, + -0.013112079352140427, + -0.05990356579422951, + 0.008150089532136917, + 0.029216067865490913, + -0.009907631203532219, + -0.0023256775457412004, + -0.022447487339377403, + 0.012785094790160656, + -0.004169052932411432, + -0.03691655397415161, + 0.04842640832066536, + 0.007471596356481314, + -0.014321922324597836, + 0.0020038019865751266, + -0.044077515602111816, + 0.0010243812575936317, + -0.057091500610113144, + 0.013324619270861149, + -0.03181559592485428, + -0.07984962314367294, + 0.020125897601246834, + -0.045810531824827194, + -0.01814764179289341, + -0.025553841143846512, + -0.023869870230555534, + -0.022202249616384506, + -0.04594132676720619, + -0.00795389898121357, + -0.003222841303795576, + -0.0008981856517493725, + 0.021008756011724472, + -0.011346363462507725, + 0.08096136897802353, + 0.009000249207019806, + -0.010708743706345558, + -0.059249598532915115, + -0.04002290591597557, + -0.0013743569143116474, + 0.039761319756507874, + 0.07030167430639267, + -0.01736287958920002, + -0.04394672065973282, + 0.015531765297055244, + 0.03103083185851574, + -0.014403668232262135, + 0.028218764811754227, + 0.021662725135684013, + 0.047314662486314774, + 0.0053911576978862286, + 0.016888750717043877, + 0.061571188271045685, + 0.007316278759390116, + -0.0041281795129179955, + -0.00227254256606102, + 0.0011710133403539658, + -0.008317668922245502, + -0.02875828929245472, + -0.02859479747712612, + 0.001105616451241076, + 0.0038911160081624985, + -0.07396390289068222, + -0.030573053285479546, + 0.02408241108059883, + 0.010823188349604607, + 0.0044592516496777534, + -0.003468079725280404, + -0.006343499757349491, + -0.010144694708287716, + -0.033679407089948654, + -0.017035894095897675, + 0.013545334339141846, + 0.01661081425845623, + -0.01166517287492752, + 0.00018916565750259906, + 0.008591518737375736, + -0.035118140280246735, + -0.06425245851278305, + -0.011943110264837742, + 0.0454508513212204, + 0.032829247415065765, + -0.03250226378440857, + 0.006380285602062941, + -0.03166845068335533, + 0.018556371331214905, + -0.03345051780343056, + -0.00030884711304679513, + 0.02182621695101261, + -0.022872567176818848, + 0.019030500203371048, + 0.013005809858441353, + -0.03622988611459732, + 0.005121395457535982, + 0.017755260691046715, + -0.0011955371592193842, + 0.0033454603981226683, + -0.01584240049123764, + 0.0603613443672657, + -0.016414623707532883, + -0.0376359187066555, + 0.003811413422226906, + 0.03258400782942772, + 0.01614486053586006, + -0.04607212170958519, + 0.029837338253855705, + 0.0007295842515304685, + 0.025390349328517914, + -0.0683397650718689, + 0.03423528000712395, + -0.011681522242724895, + -0.01356985792517662, + 0.0023215902037918568, + -0.0017084941500797868, + 0.03694925084710121, + 0.030017180368304253, + -0.02957575023174286, + -0.01434644591063261, + 0.0001129118463722989, + -0.0018597245216369629, + -0.08069977909326553, + -0.024703681468963623, + 0.03871496766805649, + 0.03619718924164772, + -0.008975725620985031, + 0.006184095051139593, + 0.006813540123403072, + 0.01976621523499489, + 0.013422715477645397, + -0.026060666888952255, + -0.04326005280017853, + 0.02882368676364422, + 0.055391181260347366, + 0.017591767013072968, + 0.0015286527341231704, + 0.015262003056704998, + 0.0031697063241153955, + 0.03181559592485428, + -0.05055180937051773, + 0.05382165312767029, + 0.014534462243318558, + 0.016921449452638626, + -0.04218100383877754, + -0.024327648803591728, + 0.0094662019982934, + 0.03878036513924599, + 0.0151066854596138, + 0.019831612706184387, + 0.05002863332629204, + 0.02112320065498352, + 0.027466701343655586, + 0.018490975722670555, + -0.008992074988782406, + 0.014150255359709263, + -0.047151170670986176, + 0.04600672423839569, + -0.005848935805261135, + 0.023068759590387344, + 0.025455746799707413, + -0.015703432261943817, + 0.044993072748184204, + -0.041984815150499344, + -0.016022242605686188, + 0.02354288659989834, + -0.022807171568274498, + 0.01960272341966629, + -0.032845597714185715, + 0.023248599842190742, + -0.04303116351366043, + 0.027417652308940887, + 0.0018086332129314542, + 0.001165904221124947, + 0.013013984076678753, + 0.020796217024326324, + -0.04034988954663277, + -0.0031983174849301577, + -0.0377994105219841, + 0.020567327737808228, + 0.006846238858997822, + 0.0226600281894207, + -0.04162513092160225, + 0.05150006338953972, + 0.0014090989716351032, + 0.0059388563968241215, + -0.026077017188072205, + -0.05807245150208473, + 0.04361973702907562, + -0.018916055560112, + 0.024720029905438423, + 0.032240673899650574, + -0.015041288919746876, + 0.030017180368304253, + -0.0071037388406693935, + 2.2560016077477485e-05, + 0.036654967814683914, + 0.05130387470126152, + 0.022414790466427803, + 0.040415287017822266, + -0.06549499928951263, + -0.01889970526099205, + -0.049472760409116745, + -0.026240509003400803, + 0.019962405785918236, + 0.013095730915665627, + 0.003206492168828845, + 0.031439561396837234, + 0.009237312711775303, + -0.05833404138684273, + -0.03196273744106293, + -0.012482634745538235, + 0.03462766110897064, + 0.0024748642463237047, + 0.0832502618432045, + -0.01169787161052227, + 0.019079547375440598, + 0.026894478127360344, + 0.023951616138219833, + 0.003572306130081415, + -0.0003913596156053245, + -0.007087389938533306, + 0.005734491162002087, + 0.027450351044535637, + -0.06202896684408188, + 0.0019404488848522305, + -0.0016052896389737725, + -0.026649238541722298, + -0.028267811983823776, + 0.005603697616606951, + -0.04672608897089958, + 0.010324536822736263, + 0.012572554871439934, + 0.007598303258419037, + -0.028087971732020378, + 0.05074799805879593, + -0.03152130916714668, + 0.016733434051275253, + 0.04129814729094505, + 0.0046431804075837135, + -0.00773318437859416, + 0.01250715833157301, + 0.006462031975388527, + 0.015392797067761421, + 0.03160305693745613, + 0.03317258134484291, + -0.00865691527724266, + -0.010479854419827461, + 0.010569775477051735, + -0.048034027218818665, + 0.03420258313417435, + 0.01819668896496296, + -0.00046212109737098217, + -0.02723781205713749, + 0.01283414289355278, + -0.030834641307592392, + -0.004344807006418705, + -0.02115589939057827, + -0.018409229815006256, + -0.03907465189695358, + -0.01952097751200199, + 0.0038420683704316616, + 0.012482634745538235, + 0.0027405391447246075, + 0.032207977026700974, + 0.04917847365140915, + -0.003931988961994648, + -0.012482634745538235, + 0.023722728714346886, + -0.01726478338241577, + 0.001856659073382616, + -0.0024503404274582863, + 0.03956512734293938, + 0.020681772381067276, + 0.012997634708881378, + 0.009449852630496025, + 0.05820324644446373, + -0.008877630345523357, + -0.045810531824827194, + -0.006224968004971743, + -0.02642035111784935, + 0.022169550880789757, + 0.015351924113929272, + 0.036033693701028824, + 0.009547947905957699, + 0.022398440167307854, + 0.00264040008187294, + 0.00950707495212555, + 0.007128262892365456, + -0.009703266434371471, + -0.03564131259918213, + -0.004806672688573599, + 0.003903377801179886, + -0.017117640003561974, + 0.02709066867828369, + 0.012245570309460163, + 0.0002909651375375688, + -0.023150505498051643, + -0.029951782897114754, + 0.024638283997774124, + -0.03485655039548874, + 0.02429495006799698, + 0.04921117052435875, + 0.005767189897596836, + 0.006486555561423302, + -0.01674160733819008, + -0.034333374351263046, + -0.001074961619451642, + -0.007467509247362614, + 0.01958637312054634, + -0.024556538090109825, + -0.02486717328429222, + 0.011199220083653927, + -0.04100386053323746, + -0.02262732945382595, + 0.008141915313899517, + -0.06314071267843246, + 0.008542470633983612, + 0.029265115037560463, + 0.023706378415226936, + -0.05519498884677887, + -0.019798913970589638, + 0.01630835421383381, + 0.016807004809379578, + -0.047151170670986176, + 0.039009254425764084, + -0.002337939338758588, + -0.0019097940530627966, + 0.01246628537774086, + -0.013455413281917572, + -0.014616208150982857, + 0.003621353767812252, + 0.01363525539636612, + -0.0020508060697466135, + 0.009678741917014122, + -0.0376359187066555, + -0.004851633217185736, + 0.016618989408016205, + 0.005554649978876114, + 0.022807171568274498, + -0.030622102320194244, + 0.01827843487262726, + -0.04767434671521187, + -0.04738005995750427, + 0.011885887943208218, + -0.0009395696106366813, + -0.009335407987236977, + -0.02936321124434471, + -0.008084692992269993, + 0.02051827870309353, + -0.016512718051671982, + 0.03698195144534111, + 0.0024891698267310858, + -0.005620046518743038, + -0.010716917924582958, + 0.02190796285867691, + -0.023575585335493088, + -0.02418050542473793, + 0.025897175073623657, + -0.005456554237753153, + -0.005170443095266819, + -0.018916055560112, + -0.03103083185851574, + 0.017918752506375313, + 0.06104801222681999, + -0.006224968004971743, + 0.0014489502646028996, + 0.00901659857481718, + -0.02483447454869747, + 0.022480186074972153, + 0.01477152667939663, + -0.0008849019068293273, + 0.02795717678964138, + 0.010692394338548183, + -0.014853272587060928, + -0.03577210754156113, + 0.003623397322371602, + -0.03343416750431061, + -0.016381924971938133, + 0.0018382661510258913, + 0.04152703657746315, + 0.036033693701028824, + 0.00469222804531455, + -0.008566995151340961, + 0.013905017636716366, + 0.002104962943121791, + -0.0021744470577687025, + 0.035739410668611526, + 0.025848127901554108, + 0.03495464473962784, + 0.012531681917607784, + -0.002317502861842513, + -0.0011321839410811663, + 0.024654634296894073, + -0.02429495006799698, + -0.011092950589954853, + 0.029771940782666206, + 0.023248599842190742, + 0.003010301385074854, + 0.04283497482538223, + 0.009008423425257206, + -0.05826864391565323, + 0.0038461554795503616, + -0.009752313606441021, + 0.03714544326066971, + 0.007884414866566658, + -0.00150208524428308, + -0.029167020693421364, + 0.014926844276487827, + 0.014477239921689034, + -0.02870924212038517, + -0.026616541668772697, + -0.005693618208169937, + -0.04208290949463844, + -0.01213930081576109, + -0.035902902483940125, + -0.027630193158984184, + 0.02200605906546116, + 0.017787959426641464, + -0.029346860945224762, + 0.010144694708287716, + -0.030033528804779053, + -0.002288891701027751, + -0.043488942086696625, + 0.02127034403383732, + -0.00218262174166739, + 0.0021151811815798283, + 0.039009254425764084, + -0.010790489614009857, + -0.02032208815217018, + 0.01674160733819008, + -0.05496609956026077, + -0.005035561975091696, + -0.02025669254362583, + -0.019275737926363945, + -0.033581312745809555, + -0.01955367438495159, + -0.02112320065498352, + -0.021580979228019714, + -0.019357483834028244, + 0.05718959495425224, + -0.03248591348528862, + -0.037276238203048706, + -0.007430723402649164, + -0.03835528716444969, + 0.003989211283624172, + -0.015376447699964046, + 0.007013818249106407, + -0.015351924113929272, + 0.03026241809129715, + 0.002421729266643524, + 0.07056326419115067, + -0.013896842487156391, + 0.012409063056111336, + -0.049374666064977646, + -0.02563558705151081, + 0.00550151476636529, + -0.014199303463101387, + -0.014845097437500954, + 0.02859479747712612, + 0.011346363462507725, + 0.009605170227587223, + -0.02563558705151081, + -0.028365908190608025, + -0.015016764402389526, + 0.017133990302681923, + -0.004863895010203123, + 0.03619718924164772, + -0.002100875601172447, + -0.004778061527758837, + -0.03413718566298485, + 0.01507398672401905, + 0.0076718744821846485, + -0.005636395886540413, + 0.018638119101524353, + 0.02032208815217018, + 0.028251463547348976, + 0.017117640003561974, + 0.03858417645096779, + 0.0377340167760849, + 0.02254558354616165, + -0.0010172284673899412, + 0.014027636498212814, + -0.02725416049361229, + 0.041069258004426956, + -0.011869538575410843, + 0.039695922285318375, + 0.009981202892959118, + -0.03479115292429924, + -0.0379956029355526, + -0.010316361673176289, + 0.0187689121812582, + 0.004773973952978849, + 0.02949400432407856, + -0.0013590294402092695, + -0.00864874105900526, + 0.012351840734481812, + 0.055391181260347366, + -0.0093844560906291, + 0.012327317148447037, + 0.02032208815217018, + -0.038943856954574585, + -0.014608033932745457, + -0.012155650183558464, + 0.014068509452044964, + -0.030687497928738594, + -0.017738910391926765, + 0.012637952342629433, + 0.021711772307753563, + -0.022120503708720207, + -0.0012496940325945616, + -0.003652008483186364, + -0.009572472423315048, + 0.01635740138590336, + 0.018425578251481056, + 0.017787959426641464, + 0.01803319714963436, + -0.007712747436016798, + 0.018556371331214905, + 0.024376697838306427, + -0.02560288831591606, + 0.0076718744821846485, + 0.04237719625234604, + 0.019864309579133987, + -0.04823021963238716, + -0.04296576604247093, + -0.005342109594494104, + 0.003220797749236226, + 0.016463670879602432, + 0.003760322229936719, + 0.008195050060749054, + -0.04754355177283287, + 0.020828913897275925, + 0.027008922770619392, + -0.011550728231668472, + 0.02575003169476986, + -0.016602639108896255, + -0.018441928550601006, + -0.025161460041999817, + 0.01286684162914753, + -0.012033030390739441, + 0.0005098914843983948, + 0.003907465375959873, + -0.002961253747344017, + 0.049505457282066345, + 0.013071206398308277, + 0.015294701792299747, + 0.03109622932970524, + -0.029232416301965714, + 0.022480186074972153, + 0.030573053285479546, + 0.017052242532372475, + -0.03184829279780388, + 0.010471679270267487, + -0.001992562087252736, + 0.026060666888952255, + -0.016283830627799034, + -0.01055342610925436, + 0.029134321957826614, + 0.01625930517911911, + -0.0024891698267310858, + 0.03307448700070381, + 0.004786236211657524, + 0.0010688307229429483, + -0.03166845068335533, + 0.014608033932745457, + -0.03632798045873642, + -0.021744471043348312, + 0.021368438377976418, + 0.05604514852166176, + -0.007442985195666552, + 0.025864476338028908, + -0.0006892220699228346, + 0.024343999102711678, + 0.0025566103868186474, + 0.0024626022204756737, + 0.004246711730957031, + -0.04309656098484993, + -0.012171999551355839, + 0.003427206538617611, + -0.0053707207553088665, + 0.016757957637310028, + 0.03708004578948021, + 0.0985531359910965, + 0.008804058656096458, + -0.0015644165687263012, + -0.029085274785757065, + -0.01055342610925436, + -0.02037113718688488, + 0.02109050191938877, + 0.04404481500387192, + -0.013545334339141846, + 0.0020600026473402977, + 0.020927010104060173, + 0.0527426041662693, + -0.03304178640246391, + 0.05218673124909401, + 0.026698287576436996, + -0.000561493739951402, + -0.033712103962898254, + 0.05068260431289673, + -0.01742827519774437, + 0.0032637142576277256, + -0.0044633387587964535, + -0.018687166273593903, + -0.05843213573098183, + 0.007720922119915485, + 0.06284642964601517, + 0.03397369384765625, + -0.04751085117459297, + -0.003040956100448966, + 0.032861944288015366, + -0.013504461385309696, + -0.04286767169833183, + -0.0020354788284748793, + 0.0015603293431922793, + -0.04080766811966896, + 0.01957002468407154, + 0.02637130208313465, + 0.008117390796542168, + 0.02790812961757183, + 0.006547865457832813, + -0.02506336383521557, + -0.016618989408016205, + 0.04005560651421547, + -0.01971716806292534, + -0.02416415698826313, + -0.02413145825266838, + -0.016569940373301506, + 0.016022242605686188, + -0.0009712462197057903, + -0.0012834143126383424, + -0.04751085117459297, + -0.021531932055950165, + -0.02404971234500408, + -0.036687664687633514, + -0.006392547395080328, + 0.01597319357097149, + -0.020992407575249672, + 0.006850325968116522, + 0.016602639108896255, + 0.004340719897300005, + 0.04172322526574135, + -0.008877630345523357, + 0.04934196546673775, + 0.005636395886540413, + 0.025243205949664116, + 0.0038645484019070864, + -0.046529900282621384, + 0.002883594948798418, + 0.020044151693582535, + 0.023232251405715942, + -0.010610648430883884, + 0.0302133709192276, + -0.0017871748423203826, + 0.028856385499238968, + -0.01726478338241577, + 0.0004585447022691369, + 0.015049463137984276, + -0.008526121266186237, + 0.00864874105900526, + -0.01818034052848816, + 0.06418706476688385, + 0.020207643508911133, + 0.023722728714346886, + -0.006502904929220676, + -0.0015613511204719543, + -0.024442093446850777, + -0.010610648430883884, + 0.021433835849165916, + 0.009122868068516254, + 0.008403502404689789, + 0.03858417645096779, + -0.03194638714194298, + 0.0682743713259697, + -0.013496286235749722, + -0.0016175516648218036, + 0.008787709288299084, + 0.014673430472612381, + -0.002948991721495986, + 0.035183534026145935, + -0.009204614907503128, + -0.036000996828079224, + -0.059282295405864716, + -0.0018556371796876192, + -0.006208618637174368, + -0.02422955445945263, + 0.005632308777421713, + 0.0009738008375279605, + -0.0007219205144792795, + -0.0018668773118406534, + -0.018523674458265305, + 0.007610565051436424, + -0.01055342610925436, + 0.05388705059885979, + 0.015899622812867165, + 0.003764409339055419, + -0.009646044112741947, + 0.02879098802804947, + 0.003488516202196479, + 0.030622102320194244, + 0.04218100383877754, + 0.006940246559679508, + 0.002102919388562441, + 0.007377588655799627, + -0.007806755602359772, + -0.017935100942850113, + -0.017003195360302925, + 0.03157035633921623, + -0.0018862920114770532, + -0.007095564156770706, + -0.0004840903857257217, + -0.02429495006799698, + 0.01968446932733059, + 0.009923980571329594, + 0.04211560636758804, + -0.050290219485759735, + -0.0035253020469099283, + -0.01096215657889843, + 0.07455247640609741, + -0.003995342180132866, + 0.0022664114367216825, + -0.0017841093940660357, + -0.01213930081576109, + -0.03225702419877052, + 0.04133084416389465, + -0.01473882794380188, + 0.008534296415746212, + -0.024066060781478882, + 0.010537076741456985, + 0.0379956029355526, + -0.023052409291267395, + 0.02957575023174286, + 0.02565193735063076, + -0.001505150692537427, + 0.010774140246212482, + 0.02125399373471737, + -0.00906564574688673, + 0.014084858819842339, + -0.05735308676958084, + -0.028349559754133224, + -0.006846238858997822, + -0.012482634745538235, + 0.03315623104572296, + -0.04411021247506142, + 0.010537076741456985, + 0.00136618223041296, + -0.013537159189581871, + -0.030442260205745697, + 0.050224825739860535, + 0.00019567980780266225, + -0.030573053285479546, + 0.03835528716444969, + 0.030000830069184303, + -0.006445682607591152, + 0.014035810716450214, + -0.01729748211801052, + -0.01746097393333912, + 0.002989864908158779, + -0.016406448557972908, + -0.008235923014581203, + 0.020861612632870674, + -0.0007040385971777141, + 0.0375378243625164, + 0.011632475070655346, + -0.043390847742557526, + -0.023085108026862144, + -0.00011731847189366817, + -0.0015409146435558796, + -0.05006133019924164, + 0.002254149643704295, + -0.013855969533324242, + 0.0046431804075837135, + 0.018687166273593903, + 0.008334018290042877, + -0.028856385499238968, + 0.008951202034950256, + 0.07049786299467087, + 0.0030164322815835476, + -0.00451238639652729, + 0.007892589084804058, + -0.0018556371796876192, + -0.015049463137984276, + 0.037276238203048706, + -0.04963625222444534, + 0.0011291184928268194, + -0.0043856799602508545, + 0.0008450506720691919, + -0.005489252973347902, + -0.004291671793907881, + -0.017084941267967224, + -0.006711357738822699, + -0.009220964275300503, + -0.006850325968116522, + -0.032093532383441925, + -0.0030368687584996223, + 0.023918919265270233, + -0.02504701539874077, + 0.024589236825704575, + 0.01283414289355278, + -0.003192186588421464, + -0.008125565946102142, + 0.0006953530246391892, + -0.047837838530540466, + -0.019161293283104897, + -0.01729748211801052, + -0.00031676626531407237, + -0.028987178578972816, + -0.01016104407608509, + 0.02789178118109703, + -0.01164882443845272, + -0.01594049669802189, + 0.011853189207613468, + 0.0048761568032205105, + 0.017591767013072968, + -0.022496536374092102, + 0.02413145825266838, + 0.008158263750374317, + 0.013847795315086842, + -0.027760986238718033, + 0.02127034403383732, + -0.0036663140635937452, + 0.028218764811754227, + 0.008918503299355507, + 0.006282190326601267, + 0.026044318452477455, + 0.004442902281880379, + -0.03153765946626663, + -0.007729096803814173, + -0.008219573646783829, + 0.0032882383093237877, + 0.008387153036892414, + 0.02424590289592743, + 0.03488925099372864, + 0.01809859462082386, + 0.002840678207576275, + 0.018360180780291557, + -0.013496286235749722, + 0.024589236825704575, + -0.0021397050004452467, + 0.007712747436016798, + -0.012049379758536816, + -0.022431138902902603, + 0.029935434460639954, + 0.008673264645040035, + 0.015343748964369297, + -0.013226523995399475, + -0.016136687248945236, + -0.0038298063445836306, + -0.0016849922249093652, + 0.0049497284926474094, + -0.011125648394227028, + -0.011714220978319645, + -0.02252923510968685, + 0.006466119084507227, + -0.012588904239237309, + 0.0011086818994954228, + 0.017657164484262466, + 0.0150985112413764, + -0.042606085538864136, + 0.017166687175631523, + 0.016954148188233376, + 0.041886717081069946, + 0.003934032749384642, + -0.00368470698595047, + 0.014542637392878532, + 0.026845430955290794, + 0.001260934048332274, + -0.0377667136490345, + -0.015850575640797615, + -0.02730320766568184, + -0.03691655397415161, + 0.020828913897275925, + 0.0068666753359138966, + -0.018638119101524353, + -0.02493257075548172, + 0.01734652929008007, + 0.006032864563167095, + 0.033646710216999054, + -0.016586290672421455, + 0.009850408881902695, + -0.013896842487156391, + 0.006024689879268408, + 0.0011005073320120573, + -0.029265115037560463, + -0.01401128713041544, + -0.019292088225483894, + 0.041134655475616455, + 0.02339574322104454, + 0.00150208524428308, + 0.008182788267731667, + 0.01052890159189701, + 0.03255131095647812, + 0.007034254726022482, + 0.0017074723728001118, + -0.019422881305217743, + 0.023117806762456894, + 0.0132755720987916, + 0.007765882648527622, + 0.015588987618684769, + -0.026240509003400803, + 0.012319141998887062, + -0.010749616660177708, + 0.023771775886416435, + -0.017902404069900513, + 0.0014530374901369214, + -0.02336304448544979, + 0.017657164484262466, + 0.005603697616606951, + -0.005342109594494104, + 0.040480684489011765, + 0.023624632507562637, + -0.0002595439727883786, + -0.002487126039341092, + 0.04705307260155678, + 0.018719865009188652, + -0.030425909906625748, + -0.012760571204125881, + -0.02480177767574787, + -0.03914004936814308, + -0.04205021262168884, + -0.01821303926408291, + -0.023052409291267395, + -0.017199385911226273, + 0.00623314268887043, + -0.03616448864340782, + -0.02045288309454918, + -0.00942532904446125, + 0.0006156505551189184, + 0.053985144942998886, + 0.001537849078886211, + 0.029117973521351814, + 0.01806589588522911, + 0.024605585262179375, + 0.008517947047948837, + 0.005595522932708263, + 0.01059429906308651, + -0.01579335331916809, + -0.01625930517911911, + -0.015662558376789093, + 0.0013723132433369756, + -0.013185651041567326, + 0.001566460239700973, + 0.009180090390145779, + -0.022987011820077896, + -0.0026363127399235964, + 0.032845597714185715, + 0.022447487339377403, + -0.0033597659785300493, + -0.0112973153591156, + 0.012327317148447037, + -0.0188343096524477, + 0.02117224782705307, + -0.019373834133148193, + -0.022905265912413597, + 0.005407506600022316, + 0.012597079388797283, + 0.00047591576003469527, + 0.01441184338182211, + 0.013095730915665627, + 0.010986680164933205, + -0.008436201140284538, + -0.01022644154727459, + -0.029068924486637115, + 0.009147392585873604, + -0.00795389898121357, + -0.03175019845366478, + 0.038943856954574585, + 0.02198971062898636, + 0.00408935034647584, + -0.013815096579492092, + 0.02946130558848381, + 0.007451159879565239, + 0.04002290591597557, + 0.02050193026661873, + -0.011125648394227028, + -0.0035048655699938536, + 0.01213112659752369, + -0.0033842897973954678, + -0.023134155198931694, + -0.013218349777162075, + -0.008485248312354088, + 0.03009892627596855, + -0.00810512900352478, + -0.004124092403799295, + -0.03502004221081734, + 0.04136354476213455, + -0.01611216366291046, + -0.005219490732997656, + 0.002666967688128352, + 0.03111257776618004, + 0.026060666888952255, + 0.0190141499042511, + -0.0526772066950798, + 0.002006867667660117, + -0.01279326993972063, + -0.00777405733242631, + 0.011379062198102474, + 0.0189978014677763, + -0.026681937277317047, + 0.007492033299058676, + -0.005591435357928276, + 0.008485248312354088, + 0.013283746317029, + 0.015801528468728065, + -0.0010494160233065486, + -0.010406282730400562, + -0.02570098452270031, + -0.032894644886255264, + -0.004316195845603943, + -0.01133818831294775, + -0.016014067456126213, + -0.026829080656170845, + 0.016790656372904778, + -0.002268455224111676, + 0.0008573125815019011, + -0.032861944288015366, + 0.022480186074972153, + 0.004704489838331938, + -0.0066091748885810375, + 0.05535848066210747, + -0.03099813312292099, + -0.03616448864340782, + 0.02798987552523613, + 0.001875051879324019, + 0.0263222549110651, + -0.009327233768999577, + -0.013087555766105652, + 0.006870762445032597, + 0.029902735725045204, + 0.00828088354319334, + -0.013806921429932117, + 0.017640816047787666, + 0.002838634420186281, + 0.013954064808785915, + -0.0009247531415894628, + -0.037701316177845, + -0.009000249207019806, + 0.025864476338028908, + 0.026943525299429893, + 0.02947765588760376, + 0.033712103962898254, + -0.0013600513339042664, + -0.013831445947289467, + -0.019030500203371048, + -0.003974905703216791, + -0.01585874892771244, + 0.007696398533880711, + -0.022856218740344048, + 0.013586207292973995, + 0.0048761568032205105, + 0.004402029328048229, + 0.006069650407880545, + 0.02857844904065132, + 0.026109714061021805, + -0.0377667136490345, + 0.014624383300542831, + 0.0034905599895864725, + -0.03315623104572296, + -0.011092950589954853, + 0.025553841143846512, + 0.013422715477645397, + -0.005354371853172779, + -0.0019363615429028869, + -0.01554811466485262, + 0.00718957232311368, + -0.061603885143995285, + 0.010782315395772457, + -0.015008590184152126, + -0.0009084038902074099, + 0.012997634708881378, + -0.0049497284926474094, + -0.03397369384765625, + 0.019046848639845848, + -0.002581134205684066, + 0.029820989817380905, + -0.04250798746943474, + 0.006024689879268408, + -0.04741275683045387, + 0.004169052932411432, + -0.038813065737485886, + -0.002887682057917118, + -0.0068421512842178345, + 0.00715278647840023, + 0.031145276501774788, + 0.027826383709907532, + -0.011820490472018719, + -0.0005098914843983948, + -0.017706211656332016, + -0.02576638199388981, + -0.010945807211101055, + 0.02575003169476986, + -0.0011117474641650915, + -0.012711524032056332, + 0.02944495715200901, + -0.0009313949849456549, + -0.011387236416339874, + 0.014158430509269238, + -0.01242541242390871, + 0.009891281835734844, + -0.00037552131107077, + -0.014076683670282364, + -0.005039649084210396, + 0.005387070123106241, + -0.0019711037166416645, + -0.02182621695101261, + 0.04077497124671936, + -0.036000996828079224, + -0.018490975722670555, + 0.0008792818407528102, + -0.006674571894109249, + -0.01824573613703251, + 0.04394672065973282, + -0.006617349572479725, + -0.007974334992468357, + 0.013267396949231625, + -0.0018239605706185102, + 0.005599610041826963, + -0.008575169369578362, + -0.029003528878092766, + -0.03721084073185921, + -0.037701316177845, + 0.017215736210346222, + -0.05107498541474342, + 0.020616374909877777, + 0.0014622339513152838, + 0.003073654603213072, + -0.017755260691046715, + -0.0010667870519682765, + -0.025128761306405067, + -0.022496536374092102, + -0.010610648430883884, + 0.0030613925773650408, + -0.012449936009943485, + 0.019995104521512985, + -0.024327648803591728, + -0.023624632507562637, + 0.05974007397890091, + 0.026616541668772697, + -0.01441184338182211, + -0.029902735725045204, + 0.037570521235466, + 0.02480177767574787, + 0.02733590640127659, + -0.00909834448248148, + -0.038093697279691696, + -0.022283995524048805, + -0.0038277627900242805, + 0.013349143788218498, + -0.03310718387365341, + 0.047281961888074875, + 0.0003839513810817152, + -0.007377588655799627, + -0.013103905133903027, + -0.014460890553891659, + -0.010741441510617733, + -0.011681522242724895, + -0.01060247328132391, + 0.016447322443127632, + 0.010733267292380333, + 0.0064293332397937775, + 0.013676128350198269, + 0.014207477681338787, + -0.004532822873443365, + 0.014084858819842339, + -7.963861571624875e-05, + 0.04303116351366043, + 0.027401303872466087, + 0.029052576050162315, + 0.0013774223625659943, + -0.008395328186452389, + 0.001005988335236907, + 0.01477970089763403, + -0.035837505012750626, + -0.017673514783382416, + 0.03320527821779251, + 0.005575086455792189, + 0.0264693982899189, + -0.013479937799274921, + -0.008231835439801216, + -0.027597494423389435, + 0.014321922324597836, + 0.00218262174166739, + 0.0028611146844923496, + -0.006789016537368298, + -0.015286526642739773, + 0.018572721630334854, + -0.003163575427606702, + 0.013087555766105652, + -0.004990601446479559, + 0.035052742809057236, + 0.01547454297542572, + -0.0226763766258955, + -0.009956679306924343, + -0.021401137113571167, + -0.013112079352140427, + -0.00532167311757803, + -0.023918919265270233, + 0.02795717678964138, + -0.03920544683933258, + 0.003942207433283329, + 0.04885149002075195, + -0.015302876010537148, + -0.0036050044000148773, + -0.00792120024561882, + 0.0024523839820176363, + 0.01177144329994917, + 0.026861779391765594, + 0.016471846029162407, + -0.03498734533786774, + -0.029085274785757065, + -0.029886385425925255, + 0.011158347129821777, + 0.0027425826992839575, + 0.051728952676057816, + 0.0451238639652729, + -0.002885638503357768, + -0.008452550508081913, + 0.001874030102044344, + 0.014730652794241905, + 0.028921781107783318, + -0.010479854419827461, + -0.007712747436016798, + 0.04074227437376976, + -0.01323469914495945, + -0.028153367340564728, + 0.011248268187046051, + 0.033679407089948654, + -0.05964197963476181, + 0.002098832046613097, + 0.0047944108955562115, + -0.01952097751200199, + -0.045647040009498596, + 0.015368273481726646, + -0.001491866889409721, + -0.040317192673683167, + 0.00047438303590752184, + 0.004357068799436092, + 0.027646541595458984, + 0.009923980571329594, + 0.026567492634058, + 0.006175920367240906, + -0.031341467052698135, + 0.016921449452638626, + -0.0009329277672804892, + 0.01736287958920002, + -0.013537159189581871, + 0.0008849019068293273, + 0.02565193735063076, + -0.012360014952719212, + -0.017559070140123367, + -0.017003195360302925, + -0.020828913897275925, + 0.005808062851428986, + 0.007892589084804058, + -0.025913523510098457, + -0.018392879515886307, + -0.018490975722670555, + -0.0003926368954125792, + 0.013340968638658524, + 0.003329111263155937, + -0.0047167520970106125, + -0.023003362119197845, + 0.02499796822667122, + -0.02341209165751934, + 0.018523674458265305, + 0.006650047842413187, + -0.011861364357173443, + 0.03407178819179535, + -0.01622660830616951, + -0.019161293283104897, + 0.0009579624747857451, + -0.0045655216090381145, + -0.029870036989450455, + 0.013766048476099968, + 0.006331237964332104, + 0.012294618412852287, + 0.006776754278689623, + -0.0020252603571861982, + 0.011035728268325329, + -0.02123764529824257, + -0.012703348882496357, + 0.009220964275300503, + 0.005174530204385519, + 0.014714304357767105, + 0.0017166688339784741, + 0.0031083966605365276, + -0.0032146666198968887, + 0.02189161442220211, + 0.0013569857692345977, + -0.02882368676364422, + 0.0022030582185834646, + 0.030393213033676147, + -0.03413718566298485, + ], + "index": 60, + }, + { + "title": "United States Assistant Attorney General", + "text": "Many of the divisions and offices of the United States Department of Justice are headed by an Assistant Attorney General.The President of the United States appoints individuals to the position of Assistant Attorney General with the advice and consent of the Senate.", + "vector": [ + -0.002060866681858897, + -0.008987119421362877, + -0.024587998166680336, + -0.04351158067584038, + 0.05110633000731468, + 0.016993248835206032, + 0.02444559708237648, + -0.005585304461419582, + 0.004248312208801508, + 0.05914410203695297, + -0.02156592160463333, + 0.005094810388982296, + -0.002418848220258951, + 0.0010729560162872076, + 0.00013819870946463197, + -0.013528145849704742, + -0.047055795788764954, + 0.010419045574963093, + -0.021186184138059616, + -0.018480554223060608, + -0.007582881487905979, + 0.002555316314101219, + 0.013219608925282955, + 0.0001451210118830204, + -0.0009073153487406671, + 0.01122598722577095, + -0.017024895176291466, + -0.014287620782852173, + -0.004331380128860474, + 0.03645479306578636, + -0.01037948951125145, + 0.02082226797938347, + 0.04553684592247009, + -0.013330365531146526, + -0.011067763902246952, + 0.001163934706710279, + -0.03588518500328064, + -0.04022052139043808, + 0.01859131082892418, + 0.005858240649104118, + -0.0034097256138920784, + -0.025284184142947197, + -0.050156984478235245, + 0.011716481298208237, + 0.03335360437631607, + -0.03439788147807121, + -0.00556948222219944, + -0.015355631709098816, + 0.01436673291027546, + 0.02567974291741848, + -0.01974634639918804, + 0.010276644490659237, + 0.01251551229506731, + 0.03253084048628807, + -0.018433086574077606, + -0.015529678203165531, + 0.03857499361038208, + 0.00931938923895359, + -0.018654601648449898, + 0.036264922469854355, + -0.0012153575662523508, + -0.015458477661013603, + -0.07202353328466415, + 0.014050284400582314, + 0.009327300824224949, + -0.025252537801861763, + 0.027182871475815773, + 0.04496724158525467, + -0.06325792521238327, + 0.016676802188158035, + 0.07765630632638931, + 0.014255975373089314, + -0.005288634914904833, + 0.007428613491356373, + -0.010862072929739952, + 0.013520234264433384, + 0.018385620787739754, + -0.040536969900131226, + 0.019857103005051613, + 0.021012136712670326, + 0.011914261616766453, + -0.05499863624572754, + -0.0009720882517285645, + 0.023781055584549904, + -0.040188878774642944, + -0.014445844106376171, + -0.03395485505461693, + -0.039650917053222656, + 0.017752723768353462, + 0.02115453965961933, + 0.019271673634648323, + 0.0548720583319664, + -0.00888427346944809, + 0.0143350875005126, + 0.03898637369275093, + -0.014208508655428886, + 0.003089322242885828, + -0.00460431631654501, + 0.03259412944316864, + -0.019556477665901184, + 0.02169249951839447, + 0.04560013487935066, + -0.04778362438082695, + -0.007124032359570265, + -0.04401789605617523, + -0.025537341833114624, + 0.02234121784567833, + -0.02151845395565033, + 0.015023361891508102, + 0.054555609822273254, + -0.03357511758804321, + 0.002009443938732147, + 0.009912729263305664, + 0.02086973562836647, + 0.0034670818131417036, + -0.009857350960373878, + -0.04743553325533867, + -0.013986995443701744, + -0.021834902465343475, + -0.018860291689634323, + -0.002545427531003952, + -0.03012583591043949, + 0.03639150410890579, + -0.008203910663723946, + -0.008385867811739445, + 0.029809387400746346, + -0.008251377381384373, + 0.056422650814056396, + 0.025521518662571907, + -0.02368612214922905, + -0.009382679127156734, + 0.05509357154369354, + -0.025015203282237053, + -0.008773516863584518, + -0.04072684049606323, + 0.012879427522420883, + 0.006570248398929834, + -0.001401270623318851, + 0.02890751138329506, + 0.05281514674425125, + -0.00406239926815033, + -0.028448661789298058, + -0.015608790330588818, + 0.0072783008217811584, + 0.03598012030124664, + 0.0018996760481968522, + -0.024018391966819763, + 0.05357462167739868, + -0.05211896076798439, + 0.021091248840093613, + -0.004040643572807312, + -0.01568790152668953, + 0.013915793970227242, + -0.046929217875003815, + -0.006989541929215193, + -0.01753121055662632, + 0.01653440110385418, + -0.020711511373519897, + 0.03001507930457592, + 0.013219608925282955, + -0.015339809469878674, + -0.021202005445957184, + 0.013520234264433384, + 0.048511456698179245, + -0.009382679127156734, + -0.02433484047651291, + 0.003641128074377775, + 0.0220405925065279, + -0.012214886955916882, + 0.018860291689634323, + 0.05341639742255211, + 0.030869487673044205, + 0.03477761894464493, + -0.011850971728563309, + -0.004829785320907831, + -0.020252661779522896, + 0.010181710124015808, + 0.021597566083073616, + -0.040473680943250656, + 0.005577393341809511, + 0.020252661779522896, + -0.001069000456482172, + 0.008401690050959587, + 0.0002155801048502326, + 0.011447501368820667, + -0.001519938581623137, + 0.004224578849971294, + -0.03395485505461693, + 0.009794061072170734, + 0.014627802185714245, + -0.048163361847400665, + 0.004149422515183687, + 0.05088481307029724, + -0.012072485871613026, + 0.029524585232138634, + 0.00241093710064888, + 0.011289277113974094, + -0.01729387603700161, + -0.02180325798690319, + -0.05936561897397041, + 0.06389082223176956, + -0.001774085802026093, + 0.00027194738504476845, + 0.05876436457037926, + 0.04825829714536667, + 0.044872306287288666, + -0.016281241551041603, + -0.03756235912442207, + -0.022372862324118614, + -9.294110896007624e-06, + -0.03452445939183235, + -0.03259412944316864, + 0.014596156775951385, + 0.014493311755359173, + -0.03053721785545349, + 0.005355880130082369, + -0.01070384867489338, + 0.00041978785884566605, + 0.038068678230047226, + -0.04113822057843208, + -0.00879725068807602, + 0.002723429352045059, + -0.039650917053222656, + 0.023844346404075623, + 0.006993497721850872, + -0.029271425679326057, + -0.021328585222363472, + -0.012032929807901382, + -0.03382827714085579, + -0.0021716232877224684, + -0.08195999264717102, + 0.027167048305273056, + -0.01753121055662632, + 0.006198422517627478, + -0.02041088603436947, + 0.05721377208828926, + 0.028701819479465485, + -0.00879725068807602, + 0.0036529949866235256, + -0.025648098438978195, + -0.06790971010923386, + 0.018338153138756752, + -0.05113797262310982, + -0.0031051444821059704, + 0.02140769734978676, + 0.01846473291516304, + -0.027293628081679344, + -0.0136942807585001, + -0.016692623496055603, + 0.07683353871107101, + 0.01445375569164753, + -0.002717495895922184, + -0.007784617133438587, + -0.02737274020910263, + 0.03898637369275093, + -0.0016989294672384858, + 0.03560038283467293, + -0.04297361895442009, + -0.0050156982615590096, + -0.04003065451979637, + -0.01870206743478775, + 0.04167618229985237, + -0.041296444833278656, + 0.002863853005692363, + 0.01070384867489338, + -0.06487181037664413, + 0.06018838286399841, + -0.022784246131777763, + -0.025663921609520912, + 0.03147073835134506, + -0.021075427532196045, + 0.00855991430580616, + 0.0014873049221932888, + 0.05316323786973953, + 0.004248312208801508, + 0.059776999056339264, + 0.007986352778971195, + 0.017626145854592323, + 0.04594822973012924, + 0.0025276271626353264, + -0.003728151321411133, + -0.008010086603462696, + 0.07506143301725388, + -0.013425299897789955, + -0.020679866895079613, + -0.003660906106233597, + 0.01090953964740038, + 0.014161041006445885, + 0.007982397451996803, + 0.036201633512973785, + -0.02379687875509262, + 0.005589260254055262, + 0.03134416043758392, + -0.07385893166065216, + 0.005814729258418083, + 0.025584809482097626, + 0.011890527792274952, + -0.0481950081884861, + 0.006135132629424334, + -0.040948353707790375, + 0.0014655491104349494, + -0.021439341828227043, + 0.0020905337296426296, + -0.039840783923864365, + 0.024951912462711334, + 0.020743155851960182, + -0.03911295533180237, + -0.025363296270370483, + 0.028274616226553917, + -0.020315952599048615, + 0.020315952599048615, + 0.0033503917511552572, + -0.010537713766098022, + 0.0011500901309773326, + -0.021945659071207047, + 0.003202056745067239, + -0.002250735415145755, + 0.007847907021641731, + 0.069871686398983, + -0.02373358979821205, + -0.04313184320926666, + 0.020363420248031616, + -0.010047219693660736, + 0.013037651777267456, + 0.01740463264286518, + 0.02175579033792019, + -0.011423767544329166, + 0.019904570654034615, + -0.02221463993191719, + 0.01939825341105461, + -0.015498033724725246, + -0.00920072104781866, + -0.022784246131777763, + 0.007705505006015301, + -0.004450047854334116, + 0.03518900275230408, + 0.023005759343504906, + 0.03721426799893379, + 0.02884422242641449, + 0.0034927930682897568, + -0.016391998156905174, + 0.02977774292230606, + -0.014342999085783958, + 0.03272070735692978, + -0.02609112486243248, + 0.021233651787042618, + -0.019952036440372467, + 0.054840411990880966, + 0.021249473094940186, + 0.04123315587639809, + 0.0006991519476287067, + -0.0207589790225029, + 0.015292342752218246, + 0.01573536917567253, + 0.000526588992215693, + -0.021360229700803757, + -0.0323726162314415, + -0.00044624091242440045, + 0.05041014403104782, + -0.003967464901506901, + 0.013607257977128029, + 0.03272070735692978, + -0.061992134898900986, + 0.023844346404075623, + -0.050505075603723526, + -0.022483620792627335, + -0.019097628071904182, + 0.028163859620690346, + -0.04629632085561752, + -0.010458601638674736, + -0.0034255480859428644, + 0.03439788147807121, + 0.06708694249391556, + -0.012143686413764954, + -0.002903409069404006, + -0.007262478116899729, + -0.05287843570113182, + -0.03480926528573036, + -0.03930282220244408, + -0.008805161342024803, + 0.042119208723306656, + 0.018132461234927177, + -0.008014041930437088, + 0.029160669073462486, + 0.032214391976594925, + -0.039081308990716934, + 0.026470862329006195, + 0.0035956387873739004, + 0.004422358702868223, + -0.00032040345831774175, + -0.022024771198630333, + -0.016724269837141037, + -0.03632821515202522, + -0.023701943457126617, + 0.016898315399885178, + 0.0015654279850423336, + -0.005427080672234297, + -0.014240153133869171, + -0.024319017305970192, + -0.034619394689798355, + 0.017214763909578323, + -0.0465494804084301, + 0.0012034907704219222, + 0.015600878745317459, + 0.00812479853630066, + -0.05946055054664612, + -0.057593509554862976, + 0.04477737098932266, + -0.00358377187512815, + 0.011392123065888882, + -0.04113822057843208, + -0.024872800335288048, + -0.061232659965753555, + 0.04139138013124466, + 0.014857226982712746, + -0.025948723778128624, + -0.008947563357651234, + 0.027056291699409485, + 0.03417636826634407, + 0.02613859251141548, + 0.053036659955978394, + 0.04034710302948952, + -0.006321046035736799, + 0.012824049219489098, + 0.04556849226355553, + 0.0295404065400362, + 0.055947981774806976, + -0.01198546215891838, + -0.01234146673232317, + -0.03961927071213722, + 0.04515710845589638, + 0.015039184130728245, + -0.016439465805888176, + 0.00987317319959402, + -0.009928551502525806, + -0.036613017320632935, + -0.030094191431999207, + 0.002052955562248826, + 0.016898315399885178, + 0.02719869278371334, + 0.0019283541478216648, + -0.011914261616766453, + -0.03196123242378235, + 0.018543845042586327, + -0.049397509545087814, + -0.03518900275230408, + -0.03724591061472893, + 0.04357486963272095, + 0.008741872385144234, + 0.027515141293406487, + -0.04667605832219124, + -0.02942964993417263, + 0.008915917947888374, + 0.02585379034280777, + 0.046454545110464096, + 0.01647111028432846, + 0.0033088577911257744, + -0.04385967180132866, + -0.05420751869678497, + -0.011937995441257954, + 0.00526094576343894, + -0.017309697344899178, + 0.01811663992702961, + -0.028765110298991203, + 0.010426957160234451, + -0.03363840654492378, + 0.0012519467854872346, + -0.047277309000492096, + -0.009343123063445091, + -0.01666097901761532, + 0.021787434816360474, + -0.0002556305262260139, + -0.04272045940160751, + 0.021660855039954185, + 0.01670844666659832, + -0.035378869622945786, + -0.015490122139453888, + -0.022942468523979187, + -0.016961604356765747, + 0.011297188699245453, + 0.01601226069033146, + 0.07423866540193558, + 0.029983434826135635, + -0.005616949405521154, + 0.011083586141467094, + -0.022436153143644333, + -0.0034492816776037216, + -0.010775049217045307, + -0.04215085506439209, + -0.03639150410890579, + -0.02175579033792019, + 0.07120076566934586, + -0.022024771198630333, + -0.007772750221192837, + 0.030568862333893776, + -0.00814853236079216, + 0.007408835459500551, + -0.015102474018931389, + 0.00203713309019804, + 0.08094736188650131, + -0.01670844666659832, + 0.017958415672183037, + 0.019366608932614326, + -0.06338450312614441, + -0.02450888603925705, + -0.017214763909578323, + -0.03014165721833706, + 0.01900269277393818, + -0.01457242388278246, + -0.0006492125685326755, + -0.008963385596871376, + -0.020189372822642326, + -0.002537516178563237, + -0.004038665909320116, + 0.019065983593463898, + -0.008251377381384373, + -0.020062793046236038, + -0.00040124598308466375, + 0.008322578854858875, + 0.01624959707260132, + -0.04167618229985237, + -0.02403421513736248, + -0.07468169182538986, + -0.005154144484549761, + 0.048638034611940384, + -0.018654601648449898, + 0.02223046123981476, + 0.0269771795719862, + 0.00514623336493969, + 0.02984103187918663, + -0.04537862166762352, + -0.024762043729424477, + -0.02795816771686077, + 0.004806051962077618, + -0.012420577928423882, + 0.027214515954256058, + -0.04351158067584038, + -0.02509431540966034, + -0.018021704629063606, + 0.044935595244169235, + 0.00897129625082016, + 0.00987317319959402, + 0.007305989973247051, + -0.018733713775873184, + -0.01612301729619503, + 0.007476080674678087, + 0.04718237370252609, + -0.04389131814241409, + 0.004541026894003153, + -0.005462680943310261, + 0.029176492244005203, + -0.012238620780408382, + -0.028480306267738342, + 0.0017256296705454588, + 0.03522064536809921, + -0.016455288976430893, + -0.0423407219350338, + -0.014793937094509602, + 0.006459491793066263, + -0.026597442105412483, + 0.022119704633951187, + -0.0010976784396916628, + -0.009145342744886875, + -0.006696827709674835, + -0.03370169550180435, + 0.014999628067016602, + 0.0018057305132970214, + 0.05515686050057411, + 0.031565673649311066, + 0.017246408388018608, + 0.016803380101919174, + -0.018797002732753754, + 0.07094760984182358, + 0.021265296265482903, + 0.028053103014826775, + -0.00545476982370019, + 0.010869983583688736, + -0.021534277126193047, + 0.010189620777964592, + -0.027103759348392487, + 0.019160917028784752, + -0.02058493345975876, + 0.02819550409913063, + 0.002020321786403656, + 0.027182871475815773, + -0.0016544288955628872, + 0.0035620161797851324, + 0.011518701910972595, + -0.018385620787739754, + -0.02931889332830906, + 0.012325643561780453, + 0.012903161346912384, + 0.01208039652556181, + -0.017736902460455894, + -0.02110707201063633, + 0.0009389601182192564, + -0.004374891519546509, + 0.012555068358778954, + -0.009192810393869877, + -0.017610322684049606, + 0.0054903700947761536, + 0.005696061532944441, + 0.05610620602965355, + 0.004715072922408581, + -0.04670770466327667, + 0.03601176664233208, + 0.04037874564528465, + -0.002573116682469845, + -0.0022388685029000044, + -0.030220769345760345, + 0.039777494966983795, + -0.010925361886620522, + -0.013322454877197742, + -0.05275185778737068, + -0.011447501368820667, + -0.01509456243366003, + -0.011154786683619022, + 0.05389107018709183, + -0.03229350224137306, + 0.00791910756379366, + 0.025822144001722336, + -0.06430220603942871, + 0.0014447822468355298, + 0.06075798720121384, + -0.019920391961932182, + -0.024002568796277046, + 0.005229300819337368, + 0.005075032357126474, + 0.02613859251141548, + 0.015664169564843178, + -0.03781551867723465, + 0.004208756610751152, + -0.04385967180132866, + 0.015260697342455387, + -0.013646814040839672, + 0.00144379329867661, + -2.6406707547721453e-05, + -0.08202328532934189, + 0.0208064466714859, + 0.004537071101367474, + -0.016613511368632317, + 0.013195875100791454, + 0.06028331443667412, + 0.07101089507341385, + -0.024429773911833763, + -0.01939825341105461, + 0.035790253430604935, + -0.017246408388018608, + -0.006186555605381727, + 0.00630522333085537, + 0.035442158579826355, + -0.011914261616766453, + -0.03563202917575836, + -0.02450888603925705, + -0.04711908474564552, + 0.00011131300561828539, + -0.022784246131777763, + -0.02169249951839447, + 0.06917550414800644, + 0.002020321786403656, + -0.02232539653778076, + -0.028132213279604912, + -0.0007307967753149569, + -0.001155034638941288, + 0.01265791431069374, + -0.031280871480703354, + -0.020442530512809753, + 0.025252537801861763, + 0.009121608920395374, + 0.019857103005051613, + -0.015893593430519104, + -0.06243516132235527, + 0.020442530512809753, + -0.003943731542676687, + 0.04509381949901581, + -0.026518329977989197, + 0.005700016859918833, + -0.03534722700715065, + -0.04629632085561752, + -0.013259164988994598, + 0.029160669073462486, + 0.012673736549913883, + -0.00783604010939598, + -0.031502384692430496, + 0.0066454047337174416, + 0.017388809472322464, + -0.004248312208801508, + 0.024018391966819763, + 0.01716729626059532, + -0.08601052314043045, + -0.0273885615170002, + 0.0807574912905693, + 0.018480554223060608, + -0.020790623500943184, + 0.020379241555929184, + 0.01007886417210102, + -0.013298721052706242, + -0.018480554223060608, + -0.03229350224137306, + -0.023591186851263046, + 0.002988454420119524, + 0.028860043734312057, + -0.011518701910972595, + -0.011969639919698238, + -0.029825210571289062, + 0.004529159981757402, + 0.012238620780408382, + 0.030458105728030205, + 0.013583524152636528, + -0.005316324066370726, + 0.0008410590817220509, + 0.007962618954479694, + -0.020062793046236038, + 0.023543721064925194, + -0.038258545100688934, + -0.01007886417210102, + 0.014279709197580814, + -0.04813171923160553, + -0.044239409267902374, + -0.0278474111109972, + 0.017436277121305466, + 0.049808893352746964, + -0.017341341823339462, + -0.04677099362015724, + -0.009857350960373878, + -0.007547281216830015, + -0.008631114847958088, + -0.003421592526137829, + -0.0024069815408438444, + -0.011249721050262451, + -0.0017503522103652358, + 0.008053597994148731, + -0.010798783041536808, + -0.00268189562484622, + 0.009651659056544304, + 0.02327474020421505, + -0.05398600548505783, + -0.00804173108190298, + 0.00030878387042321265, + -0.03192958980798721, + -0.007151721511036158, + -0.03294222056865692, + -0.01939825341105461, + -0.010719670914113522, + 0.01359934639185667, + 0.036201633512973785, + -0.01770525798201561, + 0.039018020033836365, + -0.006162821780890226, + -0.004113822244107723, + 0.011748126707971096, + -0.02561645396053791, + 0.01705653965473175, + 0.031059356406331062, + 0.06809958070516586, + -0.0008934707148000598, + -0.0015525722410529852, + -0.01500753965228796, + -0.009121608920395374, + 0.06300476938486099, + -0.011597814038395882, + 0.041359733790159225, + -0.016502754762768745, + 0.017847659066319466, + -0.00337808090262115, + 0.0025414717383682728, + 0.03395485505461693, + -0.0006502014584839344, + -0.01136838924139738, + 0.05639100819826126, + 0.0070409649051725864, + -0.00858364813029766, + 0.023069048300385475, + -0.0315973199903965, + 0.06256174296140671, + -0.005446858704090118, + 0.007357412483543158, + -0.0208064466714859, + -0.014501222409307957, + -0.004659694619476795, + -0.0195248331874609, + 0.017452098429203033, + -0.04436598718166351, + -0.036613017320632935, + 0.04474572464823723, + -0.04518875479698181, + -0.005968997720628977, + 0.004034710116684437, + -0.03800538554787636, + 0.022309573367238045, + -0.0014823604142293334, + 0.01037948951125145, + -0.02561645396053791, + -0.008362134918570518, + 0.0024940045550465584, + 0.006127221509814262, + 0.03490419685840607, + 0.001596083864569664, + 0.0006091620889492333, + -0.041359733790159225, + 0.007009319961071014, + -0.034619394689798355, + -0.008741872385144234, + 0.020062793046236038, + 0.020679866895079613, + -0.02017355151474476, + -0.01017379853874445, + 0.014833493158221245, + -0.007713416591286659, + 0.013108852319419384, + -0.029888499528169632, + 0.01005513034760952, + 0.01783183589577675, + 0.0018650644924491644, + -0.008726049214601517, + 0.03094859980046749, + 0.006040198262780905, + -0.012555068358778954, + 0.0020331775303930044, + -0.022420329973101616, + -0.026597442105412483, + 0.01700907200574875, + -0.03370169550180435, + -0.00632895715534687, + 0.0037400180008262396, + -0.01887611486017704, + -0.002586961258202791, + -0.013156319037079811, + -0.013979083858430386, + 0.015110384672880173, + -0.001979776890948415, + -0.045695070177316666, + -0.007804395165294409, + 0.012570890597999096, + 0.00130831403657794, + -0.01794259250164032, + 0.011637370102107525, + 0.01518949680030346, + 0.006716605741530657, + 0.016130929812788963, + -0.025173427537083626, + 0.012966451235115528, + -0.047055795788764954, + -0.021486809477210045, + 0.03515735641121864, + -0.02613859251141548, + 0.033923208713531494, + -0.017278052866458893, + -0.027182871475815773, + -0.021739967167377472, + -0.009398501366376877, + -0.02555316500365734, + -0.002096466952934861, + 0.03294222056865692, + 0.02561645396053791, + 0.02093302458524704, + -0.04604316130280495, + -0.000704590929672122, + -0.00042918240069411695, + -0.020664045587182045, + -0.02808474749326706, + 0.010688026435673237, + 0.0532265305519104, + -0.000568617251701653, + 0.018955226987600327, + 0.009881083853542805, + 0.030442282557487488, + -0.0348409079015255, + -0.003352369414642453, + 0.020727334544062614, + 0.023179804906249046, + 0.05211896076798439, + 0.006087665446102619, + 0.03153402730822563, + -0.03322702273726463, + 0.02485697902739048, + 0.05389107018709183, + -0.001053177984431386, + 0.04686592519283295, + 0.036138344556093216, + -0.016581866890192032, + -0.003827041247859597, + -0.023765234276652336, + -0.068226158618927, + 0.018844470381736755, + 0.01881282404065132, + 0.040125586092472076, + -0.023955103009939194, + -0.019255852326750755, + -0.012388933449983597, + 0.018338153138756752, + 0.007669904734939337, + 0.024587998166680336, + -0.009398501366376877, + 0.009564636275172234, + 0.0439862497150898, + 0.005268856883049011, + -0.002292269142344594, + 0.015015450306236744, + 0.02503102459013462, + 0.011289277113974094, + -0.004169200547039509, + 0.051327843219041824, + 0.007982397451996803, + 0.02550569735467434, + 0.02427154965698719, + 0.022720955312252045, + -0.024904446676373482, + 0.003362258430570364, + -0.004240401089191437, + 0.022182993590831757, + 0.011708570644259453, + -0.03480926528573036, + -0.010751315392553806, + -0.033733341842889786, + -0.036676306277513504, + 0.024350661784410477, + 0.00491285277530551, + -0.04392296075820923, + 0.05680238828063011, + -0.0012578802416101098, + 0.004639916587620974, + -0.010308288969099522, + -0.010822516866028309, + -0.002444559708237648, + -0.020648222416639328, + -0.031565673649311066, + 0.057245418429374695, + 0.04724566265940666, + 0.05715048313140869, + -0.033733341842889786, + -0.012650002725422382, + -0.02392345853149891, + -0.02297411486506462, + 0.04028381034731865, + -0.016162574291229248, + 0.014746470376849174, + 0.02632846124470234, + -0.06373259425163269, + 0.016328709200024605, + 0.004034710116684437, + -0.0070409649051725864, + -0.022436153143644333, + 0.028891688212752342, + 0.032973866909742355, + 0.022705134004354477, + 0.015039184130728245, + -0.021945659071207047, + 0.01781601458787918, + -0.001562461256980896, + 0.03632821515202522, + 0.014374643564224243, + -0.029524585232138634, + -0.007966574281454086, + -0.0038428637199103832, + 0.022942468523979187, + -0.0060560209676623344, + 0.04392296075820923, + 0.06385917961597443, + 0.03616999089717865, + -0.04420776665210724, + 0.0037657294888049364, + -0.01175603736191988, + 0.0019313207594677806, + 0.010063041932880878, + 0.06784641742706299, + -0.0036193723790347576, + 0.01816410757601261, + 0.0006516848225146532, + 0.01963558979332447, + -0.04126479849219322, + -0.04389131814241409, + -0.013979083858430386, + 0.02011026069521904, + -0.007923062890768051, + 0.022135527804493904, + -0.007741105742752552, + 0.00878933910280466, + -0.03446117043495178, + -0.01445375569164753, + 0.032562483102083206, + -0.002343691885471344, + -0.01640782132744789, + -0.04427105560898781, + 0.009018763899803162, + -0.007044920232146978, + 0.03223021328449249, + -0.004517293069511652, + -0.017452098429203033, + 0.024587998166680336, + -0.016004350036382675, + 0.024429773911833763, + 0.004319513216614723, + 0.005585304461419582, + -0.016629334539175034, + -0.028464484959840775, + 0.01870206743478775, + 0.04344829171895981, + 0.010458601638674736, + 0.005652549676597118, + -0.0291290245950222, + -0.010775049217045307, + -0.01922420784831047, + 0.024065859615802765, + 0.003777596168220043, + 0.03118593618273735, + -0.0008806150290183723, + 0.038195256143808365, + -0.007001408841460943, + -0.0033602805342525244, + 0.036264922469854355, + -0.012673736549913883, + -0.014161041006445885, + 0.051264550536870956, + -0.04661276936531067, + 0.038131967186927795, + 0.007507725153118372, + 0.006566293071955442, + 0.0008895151549950242, + -0.04990382492542267, + 0.0010002718772739172, + -0.0018284752732142806, + 0.03404979035258293, + 0.013543968088924885, + -0.008599470369517803, + 0.023591186851263046, + 0.018069172278046608, + 0.007416746579110622, + -0.02931889332830906, + 0.003419614629819989, + -0.015877770259976387, + 0.0291290245950222, + -0.032325148582458496, + 0.01178768277168274, + -0.011360477656126022, + 0.005688149947673082, + -0.04028381034731865, + 0.03477761894464493, + -0.004402580671012402, + -0.00030927834450267255, + 0.00847289152443409, + 0.02526836097240448, + -0.006036242935806513, + -0.006677049677819014, + -0.03541051596403122, + 0.012539246119558811, + 0.02373358979821205, + 0.01155034638941288, + 0.010972829535603523, + 4.7343564801849425e-05, + -0.0033484138548374176, + -0.00032213403028436005, + -0.021898191422224045, + 0.021122893318533897, + -0.012048752047121525, + -0.022673489525914192, + 0.007096343208104372, + 0.02338549681007862, + -0.018496377393603325, + 0.021771611645817757, + 0.001935276435688138, + -0.007851862348616123, + 0.019271673634648323, + 0.0003938292502425611, + 0.011202254332602024, + -0.0015476277330890298, + 0.03980914130806923, + 0.02802145667374134, + 0.002070755697786808, + 0.0006220178329385817, + -8.065711881499738e-05, + -0.03243590518832207, + -0.013504412025213242, + -0.02351207472383976, + 0.020917203277349472, + -0.02082226797938347, + -0.052213896065950394, + -0.007456302642822266, + -0.013377833180129528, + 0.010854161344468594, + 0.006878785323351622, + -0.01647111028432846, + -0.01134465541690588, + -0.020648222416639328, + 0.0025493830908089876, + -0.01158199179917574, + 0.004537071101367474, + -0.02439812943339348, + 0.0037143067456781864, + 0.004750673193484545, + -0.017388809472322464, + 0.018907759338617325, + 0.01753121055662632, + -0.0044381809420883656, + -0.044587504118680954, + -0.015719547867774963, + -0.002751118503510952, + 0.0415179580450058, + 0.00427995715290308, + 0.021265296265482903, + 0.000577022903598845, + -0.03487255424261093, + -0.0365813709795475, + -0.009176988154649734, + -0.008781427517533302, + 0.008639026433229446, + -0.021059604361653328, + -0.026660731062293053, + -0.016423644497990608, + 0.029635341838002205, + -0.02099631540477276, + 0.019382430240511894, + 0.029461294412612915, + -0.021613389253616333, + -0.0026027834974229336, + 0.04278374835848808, + -0.013559790328145027, + -0.010672204196453094, + 0.02931889332830906, + -0.03993571922183037, + -0.029651163145899773, + 0.006427846848964691, + -0.0005646616336889565, + -0.028100568801164627, + -0.022531086578965187, + -0.01265791431069374, + -0.006210288964211941, + -0.010806694626808167, + -0.0005799895734526217, + 0.013868327252566814, + -0.010434867814183235, + -0.006162821780890226, + 0.01019753236323595, + -0.019271673634648323, + 0.009382679127156734, + -0.01477811485528946, + 0.00449751503765583, + -0.0005053276545368135, + 0.01917674019932747, + -0.01046651229262352, + -0.021613389253616333, + 0.00402482133358717, + -0.06752996891736984, + -0.005703972652554512, + -0.010031396523118019, + 0.04272045940160751, + 0.02298993617296219, + -0.005652549676597118, + -0.026122769340872765, + -0.003609483363106847, + -0.010205443017184734, + 0.014469577930867672, + 0.007519592065364122, + -0.0277999434620142, + 0.0137180145829916, + -0.02761007472872734, + 0.022958291694521904, + -0.010561446659266949, + -0.01040322333574295, + -0.010949095711112022, + -0.010411133989691734, + 0.011890527792274952, + 0.02632846124470234, + -0.005968997720628977, + -0.00219140131957829, + 0.010901628993451595, + -0.006724516861140728, + -0.01677173562347889, + 0.011542435735464096, + 0.016328709200024605, + 0.009097876027226448, + 0.011740215122699738, + -0.004248312208801508, + -0.02004697173833847, + -0.030632151290774345, + 0.005585304461419582, + 0.008002175018191338, + 0.04262552410364151, + -0.02238868549466133, + 0.007017231080681086, + -0.01070384867489338, + -0.004220623057335615, + 0.016281241551041603, + -0.014279709197580814, + -0.006530692335218191, + 0.00955672562122345, + 0.011566168628633022, + -0.037499070167541504, + 0.01541892159730196, + -0.008298845030367374, + -0.010482335463166237, + 0.006617715582251549, + -0.0012786471052095294, + 0.021914014592766762, + 0.003720239968970418, + -0.0075631034560501575, + -0.022610198706388474, + 0.01653440110385418, + 0.007163588423281908, + 0.025489874184131622, + 0.04360651597380638, + -0.010798783041536808, + 0.016550222411751747, + 0.001774085802026093, + -0.004588494077324867, + -0.038606636226177216, + -0.012151597999036312, + -0.004192933905869722, + -0.027578430250287056, + 0.03351182863116264, + 0.004576627165079117, + -0.008931741118431091, + 0.007127987686544657, + -0.009540902450680733, + -0.01675591431558132, + 0.0006783850840292871, + -0.003253479488193989, + 0.044935595244169235, + 0.002853963989764452, + -0.015482211485505104, + -0.018148284405469894, + -0.010893717408180237, + -0.002199312672019005, + -0.022467797622084618, + -0.018781179562211037, + -0.012650002725422382, + 0.02058493345975876, + -0.016866670921444893, + 0.03126504644751549, + -0.007266433909535408, + 0.00035278990981169045, + 0.00023869563301559538, + 0.015608790330588818, + -0.016629334539175034, + 0.022879179567098618, + -0.01757867820560932, + -0.018385620787739754, + 0.02433484047651291, + 0.02156592160463333, + 0.013338277116417885, + 0.009904817678034306, + 0.016676802188158035, + 0.018084995448589325, + 0.032625772058963776, + 0.04082177206873894, + -0.015893593430519104, + 0.006396202370524406, + 0.008314667269587517, + 0.010181710124015808, + 0.006412024609744549, + 0.00750376982614398, + -0.00012954583507962525, + -0.03705604374408722, + 0.010506068356335163, + 0.04132809117436409, + 0.0033820364624261856, + -0.0038507748395204544, + -0.015474299900233746, + 0.017895126715302467, + 0.023227272555232048, + -0.023322205990552902, + 0.017325520515441895, + 0.017515389248728752, + 0.037720583379268646, + 0.01007886417210102, + 0.003830996807664633, + -0.033733341842889786, + 0.011202254332602024, + -0.011170608922839165, + -0.02672402188181877, + -0.03512571007013321, + 0.049682311713695526, + 0.02098049223423004, + -0.002157778711989522, + -0.015933148562908173, + 0.03077455423772335, + -0.01539518777281046, + -0.006764072924852371, + -0.004339291248470545, + 0.013536056503653526, + 0.036075055599212646, + -0.0036351946182549, + -0.00545476982370019, + 0.015047095715999603, + 0.01590941660106182, + 0.033100444823503494, + -0.001963954418897629, + -0.01477811485528946, + 0.010363667272031307, + -0.0011184454197064042, + 0.030853666365146637, + -0.030758731067180634, + -0.01857548952102661, + 0.0145407784730196, + 0.005735617130994797, + 0.004517293069511652, + 0.01008677575737238, + -0.009050408378243446, + 0.0017958416137844324, + 0.009952285327017307, + 0.008836806751787663, + -0.006704738829284906, + -0.01060891430824995, + -0.004588494077324867, + -0.00416524475440383, + -0.017214763909578323, + -0.014184774830937386, + -0.03354347124695778, + -0.011700659058988094, + 0.020774802193045616, + 0.009675392881035805, + -0.005288634914904833, + 0.004509381949901581, + -0.02262602187693119, + -0.015316075645387173, + 0.028068924322724342, + 0.031692251563072205, + -0.0216292105615139, + -0.016835026443004608, + -0.009176988154649734, + 0.011083586141467094, + -0.03683453053236008, + 0.00855991430580616, + -0.004544982220977545, + -0.029208136722445488, + 0.00707656517624855, + 0.01716729626059532, + 0.04446092247962952, + 0.005949219688773155, + 0.004050532355904579, + 0.00955672562122345, + 0.024461418390274048, + -0.04566342383623123, + 0.018211573362350464, + -0.017388809472322464, + 0.003560038283467293, + -0.007373235188424587, + -8.943360444391146e-05, + 0.03167643025517464, + -0.039714206010103226, + 0.005122499540448189, + 0.03341689333319664, + -0.00028307249885983765, + 0.0032752351835370064, + 0.021249473094940186, + 0.0007476080791093409, + -0.015450566075742245, + -0.039081308990716934, + 0.005114588420838118, + -0.015086651779711246, + -0.016518577933311462, + -0.01924002915620804, + 0.006597937550395727, + 0.010165886953473091, + 0.018749535083770752, + -0.0138999717310071, + -0.0139474393799901, + -0.0019471432315185666, + -0.014216420240700245, + 0.039081308990716934, + -0.012523423880338669, + 0.03408143296837807, + 0.008662760257720947, + 0.015545500442385674, + 0.010339933447539806, + -0.010553536005318165, + 0.0026522285770624876, + -0.0283062607049942, + -0.030331525951623917, + -0.027309449389576912, + 0.0315973199903965, + 0.009398501366376877, + -0.00016020172915887088, + 0.032340969890356064, + -0.030220769345760345, + -0.024983558803796768, + 0.005059210117906332, + -0.010411133989691734, + -0.0506632998585701, + -0.023369673639535904, + 0.012911072000861168, + -0.02392345853149891, + -0.023353852331638336, + -0.03692946583032608, + 0.03079037554562092, + -0.043828029185533524, + 0.03582189604640007, + 0.020838091149926186, + -0.00920072104781866, + -0.010181710124015808, + -0.03417636826634407, + -0.015118296258151531, + 0.00876560527831316, + -0.018148284405469894, + 0.027467673644423485, + -0.028179680928587914, + -0.02713540382683277, + -0.026660731062293053, + -0.012064574286341667, + -0.028005635365843773, + -0.033796630799770355, + 0.014944249764084816, + -0.00017688939988147467, + -0.0009869217174127698, + -0.024524709209799767, + 0.027103759348392487, + 0.019303318113088608, + -0.01787930354475975, + 0.033859919756650925, + 0.030458105728030205, + -0.02832208201289177, + -0.01605972833931446, + 0.0058186850510537624, + -0.014216420240700245, + -0.005632771644741297, + 0.003593660891056061, + -0.001162945874966681, + 0.004537071101367474, + 0.0010897673200815916, + 0.045631781220436096, + -0.018195752054452896, + -0.03107517957687378, + 0.012903161346912384, + -0.004117777571082115, + -0.00952508021146059, + -0.006139088422060013, + -0.02977774292230606, + -0.015292342752218246, + 0.015387277118861675, + -0.025632275268435478, + -0.01917674019932747, + 0.016202129423618317, + -0.004204800818115473, + 0.0051383222453296185, + 0.04221414402127266, + 0.016850847750902176, + 0.001247991225682199, + -0.00461618322879076, + -0.024667110294103622, + -0.010656381025910378, + 0.009240277111530304, + -0.03623327985405922, + -0.008298845030367374, + 0.05632771924138069, + 0.005264901090413332, + -0.03178718686103821, + -0.01980963535606861, + 0.0011926128063350916, + 0.0038092411123216152, + -0.005945263896137476, + 0.00943805743008852, + -0.016724269837141037, + -0.018686246126890182, + 0.016075551509857178, + 0.014746470376849174, + 0.015316075645387173, + -0.004339291248470545, + 0.020205195993185043, + -0.022119704633951187, + 0.033923208713531494, + -0.023432962596416473, + 0.02286335825920105, + -0.01306929625570774, + -0.009010852314531803, + -0.012293999083340168, + 0.009588370099663734, + 0.02996761165559292, + 0.001503127277828753, + 0.01445375569164753, + -0.016835026443004608, + 0.0076303486712276936, + 0.001138223335146904, + -0.027293628081679344, + -0.008496624417603016, + 0.006281489972025156, + -0.04917599633336067, + -0.05528343841433525, + -0.0025157604832202196, + 0.0034275257494300604, + -0.02596454694867134, + -0.01935078576207161, + -0.026344284415245056, + 0.023179804906249046, + -0.00964374840259552, + -0.02732527256011963, + 0.019129272550344467, + 0.02485697902739048, + 0.005201611667871475, + -0.01711982861161232, + 0.01583821512758732, + 0.029176492244005203, + 0.012808226980268955, + -0.007377190515398979, + -0.0020351551938802004, + 0.013449033722281456, + 0.021328585222363472, + -0.011075674556195736, + -0.007147765718400478, + -0.012262354604899883, + -0.010632648132741451, + 0.005431036464869976, + 0.02086973562836647, + -0.004001087509095669, + -0.0199362151324749, + -0.003522460116073489, + 0.013551879674196243, + 1.3404223864199594e-05, + 0.005379613488912582, + 0.0017622190061956644, + -0.025584809482097626, + -0.0003547677188180387, + 0.038606636226177216, + 0.0008054586942307651, + 0.0025592721067368984, + -0.01974634639918804, + -0.01541892159730196, + 0.0033583028707653284, + -0.03439788147807121, + 0.01688249222934246, + 0.007507725153118372, + -0.015956882387399673, + 0.011210164986550808, + -0.032388437539339066, + -0.025758855044841766, + -0.0012529357336461544, + -0.01922420784831047, + 0.01735716499388218, + 0.02098049223423004, + 0.001587183796800673, + 0.0014457710785791278, + -0.0012915028491988778, + -0.022531086578965187, + -0.011067763902246952, + -0.010070952586829662, + -0.002846052870154381, + 0.008097109384834766, + ], + "index": 61, + }, + { + "title": "Shining Tears", + "text": "Shining Tears (\u30b7\u30e3\u30a4\u30cb\u30f3\u30b0\u30fb\u30c6\u30a3\u30a2\u30fc\u30ba, Shainingu Ti\u0101zu) is an action role-playing game co-developed by Nextech and Amusement Vision and published by Sega in 2004 for the PlayStation 2 as a part of the Shining Force video game series. It tells the story of a mysterious boy named Xion.An anime adaptation for the game was announced by Sega, entitled Shining Tears X Wind. It is produced by Studio Deen and began airing in early April 2007.", + "vector": [ + -0.017639024183154106, + 0.018688242882490158, + -0.022535374388098717, + 0.020056787878274918, + 0.007146846037358046, + -0.040873877704143524, + 0.023827889934182167, + -0.0217902772128582, + 0.004938166588544846, + 0.05346449092030525, + -0.027340488508343697, + -0.03054896555840969, + 0.020452145487070084, + -0.021927133202552795, + 0.0217902772128582, + 0.009503784589469433, + -0.037194013595581055, + 0.017182843759655952, + -0.028252851217985153, + -0.0009584567160345614, + -0.022261666133999825, + 0.031111590564250946, + 0.036342471837997437, + -0.01329009234905243, + 0.0220335740596056, + -0.005135845392942429, + -0.020452145487070084, + -0.031202826648950577, + -0.05997268483042717, + 0.05136605724692345, + -0.020391320809721947, + -0.027735846117138863, + 0.02375185862183571, + 0.02084750309586525, + -0.019250866025686264, + 0.010887536220252514, + -0.008036400191485882, + 0.026808276772499084, + 0.005284104496240616, + -0.005181463435292244, + 0.009017190895974636, + 0.013442153111100197, + -0.04707795009016991, + 0.014430547133088112, + 2.0952875274815597e-05, + 0.024557780474424362, + -0.045253220945596695, + -0.02658018469810486, + -0.0022714044898748398, + -0.012499378062784672, + -0.026230446994304657, + 0.038988325744867325, + 0.01420245599001646, + -0.009602623991668224, + -0.014103616587817669, + 0.0015082505997270346, + 0.07718593627214432, + 0.042181599885225296, + 0.016954751685261726, + -0.05501550808548927, + 0.00862943660467863, + -0.031963128596544266, + -0.01466624066233635, + 0.022793877869844437, + 0.04957174137234688, + -0.03266260772943497, + 0.0293324813246727, + 0.07225918024778366, + -0.0013048696564510465, + 0.0025032968260347843, + -0.007983178831636906, + 0.003714079037308693, + -0.033088378608226776, + 0.026914719492197037, + -0.004436366725713015, + -0.025971943512558937, + 0.01896195113658905, + 0.0012364423600956798, + -0.043458908796310425, + -0.01999596320092678, + 0.009245282039046288, + 0.043793439865112305, + -0.04017439857125282, + 0.012423347681760788, + 0.02635209448635578, + -0.011784693226218224, + -0.03397032991051674, + -0.06544686108827591, + -0.0038186206948012114, + 0.0025108999107033014, + -0.013404138386249542, + -0.001398006803356111, + 0.018490564078092575, + -0.046804238110780716, + 0.006990984082221985, + -0.018505770713090897, + 0.03251054883003235, + -0.01252218708395958, + -0.0071164341643452644, + 0.02033049613237381, + 0.03184147924184799, + -0.00585433142259717, + -0.03106597252190113, + -0.07025197893381119, + -0.042941901832818985, + 0.02727966383099556, + -0.03363579511642456, + 0.040448106825351715, + 0.0032674011308699846, + -0.011404542252421379, + -0.020862707868218422, + 0.0348522812128067, + -0.0029708831571042538, + -0.01509961299598217, + -0.016331303864717484, + 0.0008634188561700284, + -0.0016337005654349923, + 0.024922724813222885, + -0.045070748776197433, + -0.014476165175437927, + -0.01329009234905243, + -0.03199354186654091, + 0.005865735933184624, + -0.00510543305426836, + -0.0030336081981658936, + 0.005527401342988014, + 0.014004777185618877, + 0.016924340277910233, + -0.015038789249956608, + 0.025971943512558937, + -0.010454162955284119, + 0.03588629141449928, + 0.07426637411117554, + 0.03515639901161194, + 0.002609739312902093, + 0.0005165307084098458, + -0.02136450819671154, + 0.004561816807836294, + -0.013624626211822033, + 0.0030526157934218645, + 0.022580992430448532, + -0.017106812447309494, + -0.02881547622382641, + 0.022854702547192574, + 0.009496182203292847, + -0.02093873918056488, + -0.03904915228486061, + -0.004660656210035086, + -0.006949167232960463, + -0.025105198845267296, + 0.0010045500239357352, + 0.05519798398017883, + -0.026656216010451317, + -0.01544174924492836, + -0.0025204038247466087, + 0.05516757071018219, + -0.009214869700372219, + 0.001707830117084086, + 0.02855697274208069, + -0.01059101801365614, + 0.002056618919596076, + -0.04056975618004799, + -0.02513561025261879, + 0.010408544912934303, + 0.0046720607206225395, + -0.04917638376355171, + -0.0009636837639845908, + 0.028192026540637016, + -0.04196871444582939, + 0.0073141129687428474, + 0.021394919604063034, + -0.01316844392567873, + -0.007998385466635227, + 0.023615004494786263, + -0.030670614913105965, + 0.0346393957734108, + 0.010986375622451305, + -0.057448480278253555, + -0.02325005829334259, + 0.020543381571769714, + -0.04178624227643013, + -0.024071186780929565, + -0.025850294157862663, + 0.02504437416791916, + 0.0037558956537395716, + -0.0009940959280356765, + 0.008933558128774166, + 0.0037178806960582733, + -0.06757570803165436, + -0.05851290374994278, + -0.04263778030872345, + 0.00038632884388789535, + 0.05912114307284355, + -0.01879468560218811, + 0.005557813216000795, + 0.033848680555820465, + -0.000638179131783545, + -0.02855697274208069, + -0.0038376282900571823, + 0.0036228427197784185, + -0.011054802685976028, + -0.015647031366825104, + 0.05741806700825691, + 0.015890328213572502, + 0.031871892511844635, + 0.024344895035028458, + -0.02239852026104927, + -0.08126116544008255, + 0.02221604809165001, + 0.02186630852520466, + 0.05097069963812828, + 0.025698233395814896, + 0.023873507976531982, + 0.005078822840005159, + 0.0027656012680381536, + -0.013115223497152328, + 0.005037005990743637, + 0.025683028623461723, + -0.002929066540673375, + 0.019068393856287003, + -0.005208074115216732, + 0.01877947896718979, + -0.014293692074716091, + 0.03045772947371006, + 0.0023227250203490257, + -0.012248477898538113, + -0.03302755206823349, + -0.005056013353168964, + -0.021775072440505028, + 0.01364743523299694, + -0.04394550248980522, + 0.014027586206793785, + 0.037711016833782196, + -0.021166829392313957, + -0.014871522784233093, + -0.00875868834555149, + 0.0009370732004754245, + -0.04367179051041603, + -0.003742590546607971, + 0.0062192766927182674, + 0.006356131285429001, + -0.004592228680849075, + 0.00688454182818532, + 0.024998756125569344, + 0.05878661200404167, + -0.010309705510735512, + -0.0053867450915277, + -0.0015738267684355378, + 0.028511354699730873, + -0.05045369267463684, + 0.015069201588630676, + 0.014392531476914883, + -0.006648847833275795, + 0.04093470051884651, + 0.010720268823206425, + 0.05535004287958145, + 0.0067742979153990746, + 0.049024324864149094, + 0.021212447434663773, + 0.014993171207606792, + -0.04573981463909149, + -0.009024794213473797, + 0.03929244726896286, + 0.0202544666826725, + 0.013624626211822033, + 0.02651936188340187, + -0.005930361803621054, + -0.0386233814060688, + -0.014096013270318508, + -0.032054364681243896, + -0.01333571132272482, + -0.06824477761983871, + 0.02805517241358757, + -0.03871461749076843, + -0.0025013962294906378, + -0.007268494460731745, + -0.001957779750227928, + 0.027492549270391464, + 0.028085585683584213, + -0.005189066287130117, + -0.007021396420896053, + 0.0005127291660755873, + -0.0011252481490373611, + 0.00956460926681757, + 0.009891538880765438, + -0.004957173950970173, + 0.010020790621638298, + -0.023462943732738495, + -0.04038728401064873, + -0.028420118615031242, + 0.028252851217985153, + -0.04443209618330002, + 0.047230008989572525, + 0.02977345697581768, + 0.04738206788897514, + 0.008310109376907349, + -0.026823481544852257, + -0.021410126239061356, + 0.06176699697971344, + -0.031354885548353195, + -0.007519394624978304, + 0.020284878090023994, + -0.0252116397023201, + -0.007496585603803396, + -0.004774701315909624, + 0.02110600471496582, + 0.016833104193210602, + 0.04650011658668518, + -0.025105198845267296, + -0.001403709058649838, + 0.028526561334729195, + -0.025667821988463402, + -0.036068763583898544, + 0.02102997526526451, + -0.011389335617423058, + -0.030077578499913216, + 0.005033204331994057, + -0.011450160294771194, + -0.03631206229329109, + 0.027933524921536446, + 0.05979021266102791, + -0.01012723334133625, + -0.008226475678384304, + -0.01557100098580122, + 0.036768242716789246, + 0.007492783945053816, + 0.0029499747324734926, + -0.01766943745315075, + 0.017365315929055214, + 0.004759495612233877, + -0.014863919466733932, + 0.06532521545886993, + -0.05197430029511452, + 0.011632632464170456, + 0.016270479187369347, + 0.018977157771587372, + 0.013404138386249542, + -0.029636602848768234, + 0.01826247200369835, + 0.025409318506717682, + -0.07980138063430786, + 0.03378785401582718, + -0.04494909942150116, + -0.018049588426947594, + -0.083390012383461, + 0.014635828323662281, + -0.026215240359306335, + 0.0023208241909742355, + -0.014118822291493416, + -0.005972178187221289, + 0.0007465222734026611, + -0.052460893988609314, + 0.04129964858293533, + -0.029651809483766556, + 0.027507754042744637, + -0.0015728763537481427, + -0.029727838933467865, + -0.004653052892535925, + -0.003073523985221982, + 0.03816720098257065, + 0.005561614874750376, + 0.026625802740454674, + 0.0007978427456691861, + 0.06246647611260414, + -0.0029746845830231905, + -0.047047536820173264, + 0.003265500534325838, + 0.005398149602115154, + -0.03831925988197327, + 0.0015443650772795081, + -0.03369661793112755, + 0.005649049766361713, + -0.027310075238347054, + 0.07457049936056137, + 0.03987027704715729, + -0.005052212160080671, + 0.032054364681243896, + 0.03643370792269707, + -0.03001675382256508, + 0.02214001677930355, + -0.024755459278821945, + -0.00999037828296423, + -0.024329688400030136, + 0.04348931834101677, + -0.001715433201752603, + 0.013753877021372318, + 0.01766943745315075, + 0.010978772304952145, + -0.00943535752594471, + -0.03062499687075615, + 0.017015576362609863, + 0.04348931834101677, + -0.013062002137303352, + 0.05136605724692345, + 0.007268494460731745, + 0.009731875732541084, + 0.06854890286922455, + 0.030609790235757828, + 0.06115875765681267, + 0.013556198216974735, + 0.012856720015406609, + 0.02060420624911785, + 0.03351414576172829, + 0.019509369507431984, + 0.009116030298173428, + 0.03165900707244873, + -0.018460150808095932, + 0.007705668918788433, + -0.017380522564053535, + 0.014255677349865437, + 0.034548159688711166, + 0.007371135521680117, + -0.014696653001010418, + -0.054255206137895584, + 0.0060063921846449375, + -0.00918445736169815, + 0.0701911523938179, + 0.0360383503139019, + 0.06003350764513016, + -0.041573356837034225, + -0.02951495349407196, + -0.01441534049808979, + 0.01488672848790884, + -0.006116636097431183, + -0.015890328213572502, + -0.0015861816937103868, + 0.014567401260137558, + 0.016833104193210602, + 0.040508933365345, + 0.008887939155101776, + 0.020102405920624733, + -0.05799589678645134, + -0.049450092017650604, + -0.032997142523527145, + 0.03220642730593681, + -0.03549093380570412, + 0.013875525444746017, + 0.005052212160080671, + 0.029286863282322884, + -0.010651841759681702, + 0.009511387906968594, + 0.046865064650774, + -0.028039967641234398, + 0.00613184180110693, + 0.05604952201247215, + -0.02334129624068737, + 0.022444138303399086, + -0.018825097009539604, + 0.0525217168033123, + 0.010492178611457348, + -0.0043413289822638035, + -0.036768242716789246, + 0.0016479563200846314, + 0.029834281653165817, + 0.02539411373436451, + 0.030214432626962662, + -0.03549093380570412, + -0.02077147178351879, + 0.03716360032558441, + 0.0056756604462862015, + -0.0012155340518802404, + 0.027127603068947792, + 0.03664659336209297, + -0.029925517737865448, + -0.010940756648778915, + -0.04650011658668518, + -0.017988763749599457, + -0.03853214532136917, + -0.01888592168688774, + -0.008165651932358742, + -0.020619411021471024, + 0.017973557114601135, + -0.022200841456651688, + -0.015647031366825104, + -0.02033049613237381, + -0.006067216396331787, + -0.0025755257811397314, + -0.02299155667424202, + -0.010074011981487274, + -0.010583414696156979, + -0.024588191881775856, + 0.006454970687627792, + -0.02290032058954239, + 0.04236407205462456, + 0.0038015139289200306, + 0.0059797815047204494, + 0.010484575293958187, + -0.008348125033080578, + -0.011077611707150936, + 0.0523088313639164, + 0.07554368674755096, + -0.014270883053541183, + 0.010279294103384018, + -0.04893308877944946, + -0.030336081981658936, + -0.03193271532654762, + -0.05233924463391304, + -0.027416517958045006, + 0.008903145790100098, + 0.03354455903172493, + -0.009283296763896942, + 0.02223125286400318, + 0.0028302271384745836, + -0.005595828406512737, + 0.046713002026081085, + 0.038471322506666183, + -0.040022339671850204, + 0.011298099532723427, + 0.03088349848985672, + 0.008340521715581417, + 0.021911926567554474, + -0.02762940339744091, + -0.034091975539922714, + -0.004508595447987318, + -0.04385426640510559, + -0.014613019302487373, + 0.01363983191549778, + 0.05656652897596359, + 0.004428763873875141, + 0.01964622363448143, + -0.007758889812976122, + 0.006356131285429001, + -0.0068807401694357395, + 0.04838566854596138, + 0.026641009375452995, + -0.03707236424088478, + -0.0009807905880734324, + -0.011389335617423058, + -0.01648336462676525, + -0.00999798160046339, + -0.03631206229329109, + 0.030396904796361923, + 0.03515639901161194, + 0.03716360032558441, + -0.05757012590765953, + 0.031963128596544266, + 0.022839495912194252, + 0.007260891608893871, + -0.03406156599521637, + -0.004656854551285505, + -0.03619041293859482, + 0.011488175019621849, + 0.028800269588828087, + 0.0014502775156870484, + -0.05869537591934204, + -0.012149638496339321, + 0.009214869700372219, + -0.014164441265165806, + 0.02831367589533329, + 0.030305668711662292, + 0.038136787712574005, + -0.006865534000098705, + 0.014156837947666645, + 0.04376302659511566, + 0.031020354479551315, + -0.03996151313185692, + -0.025804676115512848, + 0.009404945187270641, + -0.0013105719117447734, + 0.011404542252421379, + 0.00952659361064434, + 0.028161615133285522, + 0.021410126239061356, + -0.016255274415016174, + -0.027675021439790726, + -0.01991993375122547, + 0.027568578720092773, + 0.010233675129711628, + -0.056231994181871414, + -0.0020604205783456564, + -0.02092353254556656, + -0.008599024266004562, + 0.0075155929662287235, + 0.04443209618330002, + -0.031871892511844635, + 0.02084750309586525, + -0.013822305016219616, + 0.019281279295682907, + 0.018338503316044807, + 0.009382136166095734, + -7.12783876224421e-05, + -0.03466980531811714, + 0.02772063948214054, + 0.015038789249956608, + -0.027142809703946114, + -0.02616962231695652, + 0.021486157551407814, + -0.0010834314161911607, + -0.031172413378953934, + -0.026975542306900024, + -0.017213255167007446, + 0.023037174716591835, + 0.052977897226810455, + 0.01067465078085661, + 0.027766257524490356, + -0.0032864087261259556, + 0.0023075188510119915, + 0.02299155667424202, + 0.04677382856607437, + -0.049115560948848724, + 0.03232807293534279, + 0.02898274175822735, + -0.03241930902004242, + 0.004649251699447632, + 0.009214869700372219, + -0.003187569323927164, + 0.014050395227968693, + 0.057174768298864365, + -0.017654230818152428, + 0.023888712748885155, + 0.04382385313510895, + -0.004786105826497078, + 0.021334096789360046, + 0.005493187811225653, + -0.000562148867174983, + -0.01896195113658905, + -0.007831119000911713, + 0.032632194459438324, + -0.0006277249776758254, + -0.010400942526757717, + 0.00392696401104331, + 0.0007916652830317616, + 0.06003350764513016, + 0.017045987769961357, + 0.010058806277811527, + 0.03831925988197327, + -0.01487912517040968, + 0.0010359125444665551, + 0.013115223497152328, + -0.00647397805005312, + 0.03682906553149223, + 0.0002295164013048634, + -0.046013522893190384, + 0.0006619386258535087, + 0.03403115272521973, + 0.0022371909581124783, + 0.04452333226799965, + 0.004668259061872959, + 0.06222318112850189, + -0.0555933378636837, + 0.024162422865629196, + -0.007321715820580721, + 0.032723430544137955, + 0.04333725944161415, + -0.026139209046959877, + -0.0011271488619968295, + -0.007329318672418594, + -0.018764272332191467, + -0.023143617436289787, + 0.005287905689328909, + -0.016939546912908554, + 0.03369661793112755, + -0.004721480421721935, + -0.003567720763385296, + 0.04282025247812271, + -0.027234045788645744, + 0.017076401039958, + 0.05145729333162308, + 0.009123633615672588, + -0.031780656427145004, + -0.043975912034511566, + -0.010165248066186905, + -0.011518587358295918, + 0.02068023569881916, + 0.031963128596544266, + -0.015996770933270454, + 0.011510984040796757, + 0.00019922308274544775, + -0.018733860924839973, + -0.0506361648440361, + 0.023554179817438126, + 0.01033251453191042, + 0.005272699985653162, + -0.008211269974708557, + 0.053738199174404144, + -0.022672228515148163, + -0.0017230361700057983, + -0.015403734520077705, + 0.017076401039958, + 0.018475357443094254, + -0.017122019082307816, + 0.03012319654226303, + 0.032388899475336075, + -0.014263280667364597, + 0.012871925719082355, + -0.010841918177902699, + -0.006599428132176399, + -0.027340488508343697, + 0.009959966875612736, + 0.024329688400030136, + 0.0016726661706343293, + 0.019843902438879013, + 0.009823111817240715, + -0.025029167532920837, + 0.016528982669115067, + -0.005801110062748194, + -0.01887071505188942, + 0.045009925961494446, + -0.040204811841249466, + -0.00669446587562561, + -0.04966297745704651, + 0.006686863023787737, + -0.058391254395246506, + 0.031446121633052826, + -0.0334533229470253, + -0.04531404748558998, + -0.011693457141518593, + -0.013693053275346756, + 0.01827767863869667, + -0.018384121358394623, + -0.027158016338944435, + 0.012560201808810234, + 0.027675021439790726, + 0.0029575778171420097, + 0.06091545894742012, + -0.004998990800231695, + -0.03184147924184799, + 0.0009698612266220152, + 0.013883128762245178, + 0.012005181051790714, + 0.01535811647772789, + 0.03214560076594353, + 0.029043566435575485, + 0.02204878069460392, + -0.01033251453191042, + -0.006607030984014273, + 0.014149234630167484, + 0.0027541967574507, + 0.016498571261763573, + -0.011488175019621849, + -0.015175643377006054, + 0.04266819357872009, + -0.055806223303079605, + 0.014483768492937088, + 0.051335643976926804, + 0.023478150367736816, + 0.010438957251608372, + 0.021090799942612648, + -0.017715055495500565, + -0.018642624840140343, + -0.005303111858665943, + 0.02589591220021248, + 0.0059151556342840195, + 0.015426543541252613, + 0.028587384149432182, + 0.002623044652864337, + 0.012119226157665253, + 0.003900353331118822, + 0.014438149519264698, + -0.007823515683412552, + -0.005584423895925283, + -0.013404138386249542, + 0.01800397038459778, + -0.018247267231345177, + -0.03047293610870838, + 0.012408141046762466, + 0.011853120289742947, + -0.014529386535286903, + 0.007112632505595684, + -0.04145170748233795, + -0.04917638376355171, + 0.008051606826484203, + -0.011070008389651775, + -0.0202544666826725, + -0.015723060816526413, + -0.0018066695192828774, + -0.0012364423600956798, + -0.009465769864618778, + -0.020406527444720268, + -0.03695071488618851, + 0.038136787712574005, + -0.020208848640322685, + -0.015464558266103268, + -0.030731437727808952, + 0.0015263078967109323, + -0.013753877021372318, + 0.016772279515862465, + -0.05039286985993385, + 0.00874348171055317, + -0.020558588206768036, + -0.0042500924319028854, + 0.007523196283727884, + -0.013586610555648804, + -0.05705312266945839, + 0.020953943952918053, + 0.0005341126816347241, + 0.04394550248980522, + -0.005101631861180067, + 0.010887536220252514, + 0.02359979785978794, + 0.021942337974905968, + 0.011396938934922218, + -0.040873877704143524, + -0.004812716506421566, + -0.029621396213769913, + 0.031020354479551315, + -0.004786105826497078, + -0.012978368438780308, + 0.008218873292207718, + 0.01248417142778635, + -0.000134953748784028, + 0.017380522564053535, + -0.0010216569062322378, + 0.014734667725861073, + 0.054772213101387024, + 0.006272498052567244, + -0.025683028623461723, + 0.0018560892203822732, + -0.015373322181403637, + 0.03494351729750633, + 0.004740487784147263, + 0.01585991680622101, + -0.032723430544137955, + 0.016361715272068977, + -0.01674186810851097, + 0.00035164004657417536, + -0.04339808225631714, + -0.009853524155914783, + -0.004345130641013384, + -0.024223247542977333, + 0.0003849032800644636, + 0.0066792601719498634, + 6.498213042505085e-05, + 0.02598715014755726, + -0.026884306222200394, + 0.014985567890107632, + 0.020315291360020638, + 0.011974768713116646, + 0.05516757071018219, + -0.041147585958242416, + 0.006063414737582207, + -0.04811196029186249, + -0.007435761392116547, + 0.01296316273510456, + -0.015844710171222687, + 0.010157645680010319, + -0.015723060816526413, + 0.003792010247707367, + -6.337836384773254e-05, + 0.03251054883003235, + 0.009762288071215153, + 0.03284507989883423, + -0.020741060376167297, + 0.006420757155865431, + 0.001955878920853138, + -0.007758889812976122, + 0.033240437507629395, + 0.003816720098257065, + 0.024329688400030136, + 0.00862183328717947, + -0.011077611707150936, + 0.009678654372692108, + 0.011746678501367569, + 0.016148831695318222, + 0.009876333177089691, + -0.0346393957734108, + -0.010385735891759396, + 0.022809084504842758, + 0.025424525141716003, + -0.028344087302684784, + 0.017213255167007446, + -0.0021060386206954718, + 0.010256484150886536, + -0.002142153214663267, + -0.017882321029901505, + 0.028176821768283844, + 0.0050408076494932175, + -0.04452333226799965, + 0.01988952048122883, + 0.02162301167845726, + -0.004451572895050049, + 0.00944296084344387, + 0.030138403177261353, + -0.03688989207148552, + -0.019676636904478073, + 0.040265634655952454, + -0.03567340597510338, + -0.04075222834944725, + 0.03664659336209297, + -0.014377325773239136, + -0.0129555594176054, + -0.04467539116740227, + 0.011548999696969986, + 0.011351320892572403, + -0.017106812447309494, + -0.021075593307614326, + -0.0020984357688575983, + -0.012461362406611443, + 0.008507788181304932, + 0.017000369727611542, + 0.04932844638824463, + -0.037376485764980316, + 0.012157241813838482, + 0.03679865598678589, + 0.005732682999223471, + 0.0044059548527002335, + 0.030670614913105965, + -0.04306355118751526, + -0.02332608960568905, + -0.024679427966475487, + 0.0020110008772462606, + -0.03999192640185356, + -0.014392531476914883, + -0.0009527544025331736, + -0.016452951356768608, + -0.03360538184642792, + 0.013069604523479939, + 0.01522126141935587, + 0.0010207064915448427, + -0.031020354479551315, + 0.01316844392567873, + 0.012248477898538113, + 0.02642812393605709, + 0.0028549369890242815, + -0.0430939607322216, + -0.04123882204294205, + -0.004029604606330395, + 0.051943887025117874, + -0.011488175019621849, + 0.0097774937748909, + -0.025591792538762093, + 0.024937931448221207, + -0.04306355118751526, + -0.0007384440978057683, + -0.005690866149961948, + -0.0025622204411774874, + 0.002387350657954812, + -0.01544935256242752, + -0.005470378324389458, + -0.011632632464170456, + -0.0051738605834543705, + -0.016848308965563774, + 0.010796299204230309, + -0.023827889934182167, + 0.02762940339744091, + -0.02058899961411953, + -0.059151556342840195, + 0.056171171367168427, + -0.003968780394643545, + -0.04941968247294426, + 0.03129406273365021, + -0.003594331443309784, + 0.01205840241163969, + -0.011085215024650097, + -0.01411121990531683, + -0.017076401039958, + 0.02445133775472641, + -0.02445133775472641, + 0.01716763712465763, + -0.010948359966278076, + 0.02557658590376377, + -0.03819761052727699, + 0.005223280284553766, + -0.0058505297638475895, + -0.03834967315196991, + -0.008416552096605301, + -0.007321715820580721, + -0.029651809483766556, + -0.004599831998348236, + 0.015061598271131516, + -0.028115997090935707, + 0.034548159688711166, + -0.049450092017650604, + 0.040204811841249466, + 0.0026002356316894293, + -0.011906341649591923, + -0.03947491943836212, + 0.0005189066287130117, + -0.04339808225631714, + -0.001315323868766427, + 0.012879529036581516, + -0.010271690785884857, + 0.025683028623461723, + 0.027234045788645744, + 0.003734987461939454, + -0.01922045461833477, + -0.014711858704686165, + 0.0013058200711384416, + 0.015456955879926682, + 0.01320645958185196, + -0.018916333094239235, + 0.010986375622451305, + 0.03199354186654091, + -0.0011594617972150445, + -0.011434953659772873, + -0.03001675382256508, + -0.051609352231025696, + 0.01750217005610466, + -0.024496955797076225, + 0.01286432333290577, + -0.028800269588828087, + 0.002012901706621051, + 0.035308461636304855, + -0.023386914283037186, + 0.0009864928433671594, + 0.007983178831636906, + -0.06435202807188034, + 0.0024139613378793, + -0.012088814750313759, + -0.017045987769961357, + 0.03064020164310932, + -0.12189174443483353, + -0.023189235478639603, + 0.027735846117138863, + -0.007694264408200979, + 0.027234045788645744, + 0.024846695363521576, + 0.007462372072041035, + -0.03053376078605652, + 0.002026206813752651, + -0.0015576703008264303, + 0.05601910874247551, + -0.032723430544137955, + 0.014438149519264698, + 0.011054802685976028, + 0.006569016259163618, + 0.015426543541252613, + 0.0001869869593065232, + 0.046986714005470276, + 0.08363330364227295, + -0.02051296830177307, + 0.004782304633408785, + 0.007739882450550795, + -0.02788790687918663, + 0.00033120688749477267, + 0.03801513835787773, + 0.010226072743535042, + 0.018338503316044807, + 0.008865130133926868, + -0.02238331362605095, + -0.0034004542976617813, + 0.03962698206305504, + 0.01556339766830206, + -0.018475357443094254, + 0.01081150583922863, + -0.008895542472600937, + -0.013761480338871479, + 0.033757444471120834, + -0.019159629940986633, + -0.014118822291493416, + -0.005246089305728674, + 0.03223683685064316, + -0.0028568378183990717, + 0.02934768795967102, + 0.008082018233835697, + -0.016589807346463203, + 0.009671051055192947, + 0.015061598271131516, + 0.006652649492025375, + 0.016544189304113388, + 0.006363734137266874, + -0.021136417984962463, + -0.0015025483444333076, + -0.003885147161781788, + 0.014346913434565067, + -0.015586206689476967, + -0.006698267534375191, + 0.02385830134153366, + 0.013016384094953537, + 0.00281882262788713, + -0.0005231833783909678, + 0.0402960479259491, + -0.021653423085808754, + 0.05276501178741455, + 0.0036988731008023024, + -0.03637288510799408, + 0.023736653849482536, + -0.011450160294771194, + -0.0173196978867054, + -0.013008780777454376, + 0.011138435453176498, + 0.041147585958242416, + 0.018855508416891098, + -0.011898738332092762, + 0.0020851304288953543, + 0.031780656427145004, + -0.004493389278650284, + -0.022185634821653366, + 0.01329009234905243, + 0.04905473440885544, + -0.031963128596544266, + -0.03588629141449928, + 0.002590731717646122, + 0.03807596489787102, + 0.020482556894421577, + 0.023143617436289787, + 0.025166021659970284, + -0.01320645958185196, + 0.009967569261789322, + -0.012833910994231701, + 0.00750418845564127, + -0.021258065477013588, + -0.04443209618330002, + 0.027081985026597977, + 0.014491370879113674, + 0.03433527424931526, + -0.022961143404245377, + 0.026488948613405228, + 0.018414532765746117, + 0.04272901639342308, + -0.05054492875933647, + -0.02428407035768032, + -0.016711454838514328, + -0.024147216230630875, + 0.003531606402248144, + 0.03327085077762604, + -0.003404255723580718, + 0.017045987769961357, + 0.004379344172775745, + 0.021318890154361725, + 0.0215469803661108, + -0.0035924306139349937, + -0.001784810796380043, + 0.021212447434663773, + 0.0027522961609065533, + -0.017198048532009125, + -0.013252077624201775, + -0.010659445077180862, + 0.000983641715720296, + 0.017380522564053535, + 0.03877544030547142, + -0.020391320809721947, + -0.020208848640322685, + -0.04768618941307068, + -0.003949773032218218, + 0.0204977635294199, + -0.015092010609805584, + 0.006435962859541178, + -0.007207670249044895, + 0.0037996130995452404, + 0.0009461017907597125, + 0.005424760282039642, + 0.001378048793412745, + -0.023310882970690727, + 0.013122825883328915, + 0.03363579511642456, + 0.015084407292306423, + -0.006785702425986528, + 0.00772467628121376, + -0.003683666931465268, + -0.0010710766073316336, + -0.030336081981658936, + 0.010286896489560604, + 0.02513561025261879, + -0.012111623771488667, + 0.007519394624978304, + 0.01569264940917492, + -0.009518991224467754, + -0.012575408443808556, + 0.030594583600759506, + -0.019509369507431984, + -0.005337325390428305, + -0.002064222004264593, + 0.006648847833275795, + 0.02942371740937233, + 0.010621430352330208, + -0.022687435150146484, + -0.029226038604974747, + 0.009602623991668224, + -0.024177629500627518, + 0.006534802261739969, + 0.05595828592777252, + -0.029195627197623253, + 0.017198048532009125, + -0.011206863448023796, + -0.041816651821136475, + 0.022778671234846115, + 0.021060386672616005, + 0.0006172708235681057, + 0.006895946338772774, + 0.013153238222002983, + -0.007914751768112183, + 0.013708258979022503, + -0.03044252283871174, + 0.0022029774263501167, + -0.009686257690191269, + 0.0107734901830554, + -0.03527804836630821, + -0.014263280667364597, + -0.005132043734192848, + 0.008690261282026768, + 0.0012088813818991184, + -0.02042173221707344, + -0.05644487962126732, + 0.01922045461833477, + 0.00545137096196413, + 0.04123882204294205, + -0.02101476863026619, + -0.0018342304974794388, + -0.009404945187270641, + -0.00015099138545338064, + 0.008804306387901306, + 0.03853214532136917, + -0.011845516972243786, + 0.019372515380382538, + -0.01576867885887623, + -0.058391254395246506, + 0.015373322181403637, + -0.021927133202552795, + 0.0004376492870505899, + -0.018916333094239235, + 0.012332111597061157, + 0.025242052972316742, + -0.013693053275346756, + -0.008340521715581417, + 0.028602590784430504, + -0.02306758612394333, + 0.013023986481130123, + 0.006230681203305721, + -0.008332918398082256, + 0.031628597527742386, + -0.027081985026597977, + -0.020300084725022316, + 0.005690866149961948, + -0.04075222834944725, + -0.017973557114601135, + -0.016011977568268776, + -0.003455576254054904, + 0.016285685822367668, + 0.02633688785135746, + -0.0266105979681015, + -0.0008182758465409279, + -0.015365718863904476, + -0.013883128762245178, + 0.039931103587150574, + 0.027735846117138863, + 0.02093873918056488, + -0.024557780474424362, + 0.006234482862055302, + 0.029058773070573807, + 0.033240437507629395, + -0.011412144638597965, + 0.013282489962875843, + -0.011503380723297596, + 0.010887536220252514, + 0.023402119055390358, + -0.004930563736706972, + 5.345878889784217e-06, + 0.016346510499715805, + 0.011260083876550198, + 0.024937931448221207, + -0.032632194459438324, + 0.019144423305988312, + -0.01964622363448143, + -0.027218839153647423, + 0.030822675675153732, + 0.00025755257229320705, + -0.023356501013040543, + -0.0193116907030344, + -0.008112430572509766, + 0.00884232111275196, + 0.05766136199235916, + -0.010347721166908741, + -0.03184147924184799, + 0.0015320101520046592, + -0.0010976871708407998, + 0.03430486097931862, + -0.012362523004412651, + -0.013472565449774265, + 0.01741093397140503, + -0.012248477898538113, + 0.01750217005610466, + -0.003879444906488061, + -0.008158048614859581, + 0.03202395513653755, + 0.033666208386421204, + -0.009017190895974636, + 0.014643431641161442, + 0.0006134692812338471, + -0.02463380992412567, + 0.012514583766460419, + -0.0006909251678735018, + 0.029575778171420097, + 0.036768242716789246, + -0.004881144035607576, + -0.02469463460147381, + -0.019798284396529198, + -0.0161336250603199, + 0.038988325744867325, + -0.01273507159203291, + -0.0047138771042227745, + 0.035125989466905594, + -0.01698516495525837, + -0.013799495995044708, + 0.012005181051790714, + 0.012438553385436535, + -0.009389739483594894, + -0.0322672501206398, + 0.01046176627278328, + 0.01826247200369835, + -0.021258065477013588, + 0.0009950462263077497, + 0.013807098381221294, + -0.0014512279303744435, + 0.0009285197593271732, + 0.008363330736756325, + 0.012506980448961258, + 0.006918755359947681, + -0.0031856687273830175, + 0.01896195113658905, + 0.04008316248655319, + 0.009914347901940346, + -0.019159629940986633, + -0.018901126459240913, + -0.05136605724692345, + 0.02461860328912735, + -0.018581800162792206, + 0.008173255249857903, + -0.007701867260038853, + 0.023265264928340912, + -0.02633688785135746, + 0.006283902563154697, + -0.01274267490953207, + -0.004554213490337133, + 0.02410159818828106, + -0.012020386755466461, + 0.017076401039958, + -0.051183585077524185, + -0.04093470051884651, + -0.03746772184967995, + -0.0454661063849926, + -0.025181228294968605, + -0.01674186810851097, + -0.03451774641871452, + -0.004193069878965616, + -0.01680269092321396, + 0.004660656210035086, + -0.013054398819804192, + 0.010826711542904377, + 0.02907397784292698, + -0.013715862296521664, + 0.0022504962980747223, + -0.01320645958185196, + -0.006394146475940943, + -0.001822825986891985, + -0.0322672501206398, + 0.01294795610010624, + -0.029302069917321205, + -0.014856316149234772, + 0.034608982503414154, + 0.01768464222550392, + 0.017730260267853737, + -0.00027062027947977185, + -0.003257897449657321, + -0.025409318506717682, + -0.01544174924492836, + -0.013563801534473896, + -0.013761480338871479, + -0.01888592168688774, + -0.0043413289822638035, + 0.03576464205980301, + 0.013442153111100197, + 0.009769890457391739, + 0.011412144638597965, + 0.03354455903172493, + 0.022778671234846115, + 0.02589591220021248, + -0.0027389908209443092, + -0.014164441265165806, + 0.012491774745285511, + -0.020117612555623055, + -0.014065601862967014, + 0.00019601556414272636, + 0.01655939407646656, + -0.007952767424285412, + 0.011191656813025475, + 0.046865064650774, + 0.004687266889959574, + 0.010188057087361813, + 0.0046074348501861095, + -0.030853087082505226, + 0.0048431288450956345, + 0.02101476863026619, + 0.021683836355805397, + -0.01157941110432148, + -0.02831367589533329, + 0.013480168767273426, + 0.003461278509348631, + 0.026124004274606705, + 0.0036589570809155703, + 0.019098805263638496, + 0.001574777183122933, + 0.038897089660167694, + -0.003792010247707367, + 0.021410126239061356, + -0.025698233395814896, + -0.010750681161880493, + -0.0054399664513766766, + -0.0026971742045134306, + -0.008583818562328815, + -0.006101429928094149, + -0.007371135521680117, + 0.010857123881578445, + 0.005116837564855814, + -0.0012554499553516507, + -0.024512162432074547, + -0.000815899926237762, + -0.023280471563339233, + 0.002145954640582204, + 0.031963128596544266, + -0.0036532548256218433, + -0.007614432368427515, + 0.013571404851973057, + 0.002573624951764941, + -0.0027979142032563686, + -0.012529789470136166, + -0.013708258979022503, + 0.012126829475164413, + -0.022246459499001503, + 0.03208477795124054, + -0.020969150587916374, + -0.013814701698720455, + 0.014719462022185326, + 0.0040372079238295555, + -0.024055980145931244, + 0.008925954811275005, + 0.027142809703946114, + 0.0014065601862967014, + 0.008644642308354378, + 0.04373261705040932, + -0.01205840241163969, + -0.0023360303603112698, + -0.024223247542977333, + 0.010887536220252514, + -0.04056975618004799, + -0.000803545000962913, + -0.01972225494682789, + -0.021577393636107445, + 0.007428158074617386, + 0.02607838623225689, + -0.03688989207148552, + -0.025089992210268974, + 0.010028393939137459, + -0.0012107822112739086, + 0.004356535151600838, + -0.012316904962062836, + -0.016544189304113388, + 0.014521783217787743, + -0.03509557619690895, + -0.034365687519311905, + -0.044918689876794815, + -0.004995189141482115, + -0.03433527424931526, + 0.04151253029704094, + 0.057357240468263626, + -0.013449756428599358, + 0.012803498655557632, + 0.010545399971306324, + 0.0010634735226631165, + 0.013198856264352798, + -0.005219478625804186, + -0.05097069963812828, + 0.002921463456004858, + 0.0036342472303658724, + -0.0009038099087774754, + -0.04564857855439186, + -0.013723465614020824, + 0.026747452095150948, + -0.04060016945004463, + -0.038745030760765076, + 0.0032978132367134094, + -0.0004167409788351506, + -0.005265096668154001, + -0.02265702374279499, + 0.011100420728325844, + 0.01742614060640335, + 0.05732683092355728, + -0.027842288836836815, + -0.008074415847659111, + 0.017562994733452797, + 0.013198856264352798, + 0.005500790663063526, + 0.002026206813752651, + 0.03439609706401825, + 0.03287549316883087, + -0.038288846611976624, + 0.025865500792860985, + -0.024922724813222885, + 0.0021820690017193556, + 0.03831925988197327, + 0.009549402631819248, + 0.02761419676244259, + 0.001403709058649838, + -0.0020052986219525337, + 0.002436770359054208, + 0.004679663572460413, + -0.0430939607322216, + 0.01792793907225132, + -0.0071164341643452644, + -0.007454768754541874, + -0.01090274192392826, + 0.01433170773088932, + -0.028769858181476593, + 0.008005988784134388, + -0.03731565922498703, + 0.022839495912194252, + 0.019342102110385895, + 0.004535206127911806, + 0.01433170773088932, + 0.026397712528705597, + 0.015152834355831146, + -0.023386914283037186, + -0.0023341295309364796, + -0.01689392700791359, + -0.03801513835787773, + -0.016589807346463203, + -0.0033377292566001415, + -0.03637288510799408, + -0.01500837691128254, + -0.01570785604417324, + 0.061554115265607834, + -0.0300319604575634, + 0.0034327670000493526, + -0.010302103124558926, + -0.009762288071215153, + -0.00020979605324100703, + 0.040448106825351715, + 0.0008211270323954523, + 0.0027199832256883383, + 0.025865500792860985, + -0.011951959691941738, + -0.01741093397140503, + -0.015434146858751774, + -0.008675054647028446, + 0.026534566655755043, + 0.02452736720442772, + -0.012590614147484303, + 0.0013580908998847008, + -0.007359731011092663, + -0.0021801681723445654, + 0.015517779625952244, + 0.012073608115315437, + -0.0227330531924963, + 0.0013286290923133492, + -0.004337527323514223, + 0.006511993240565062, + ], + "index": 62, + }, + { + "title": "Falling Star (The Outer Limits)", + "text": '"Falling Star" is an episode of The Outer Limits television series. It first aired on 30 June 1996, during the second season.', + "vector": [ + -0.030039062723517418, + -0.015257558785378933, + -0.01758229359984398, + -0.03421247750520706, + 0.011464987881481647, + -0.0279126837849617, + -0.029674086719751358, + 0.004835924133658409, + -0.08384913206100464, + 0.047192905098199844, + 0.010020955465734005, + 0.05369899049401283, + -0.00850551389157772, + -0.016519103199243546, + 0.025103960186243057, + -0.02286650240421295, + -0.027928553521633148, + 0.03535500913858414, + 0.01066362950950861, + 0.0053357817232608795, + 0.0062878914177417755, + 0.01939130201935768, + -0.013686577789485455, + 0.016550840809941292, + 0.0315941758453846, + -0.002523090923205018, + 0.006656833924353123, + 0.01731252856552601, + 0.007652582135051489, + 0.029912114143371582, + 0.003415693761780858, + -0.008394434116780758, + 0.03710054233670235, + 0.05896732956171036, + -0.034910690039396286, + 0.008941897191107273, + 0.008957765996456146, + 0.0013875016011297703, + -0.024786589667201042, + 0.029229769483208656, + 0.0061966474168002605, + -0.032816048711538315, + -0.06613989174365997, + -0.0014638687716796994, + -0.013147048652172089, + 0.018835904076695442, + -0.02572283148765564, + -0.02580217458307743, + -0.005926883313804865, + -0.009862270206212997, + -0.026579730212688446, + -0.0187724307179451, + -0.029816903173923492, + 0.006339463870972395, + 0.007755727507174015, + 0.00956870336085558, + 0.027976159006357193, + 0.050557028502225876, + -0.015543191693723202, + -0.02854742482304573, + 0.0146466214209795, + -0.002989227883517742, + -0.014154698699712753, + 0.011314237490296364, + -0.016043048352003098, + -0.01010823156684637, + 0.03909997269511223, + 0.006145074963569641, + -0.030880093574523926, + -0.01637628674507141, + 0.02745249681174755, + 0.018010742962360382, + -0.018899379298090935, + -0.00860072486102581, + -0.013170851394534111, + 0.0009481426095589995, + -0.011925174854695797, + -0.004288461059331894, + -0.05896732956171036, + -0.03992513567209244, + 0.016265207901597023, + 0.021025756374001503, + 0.022104814648628235, + 0.017963137477636337, + -0.016884079203009605, + -0.013226390816271305, + -0.03332383930683136, + -0.060268547385931015, + -0.005470663774758577, + 0.0251674335449934, + 0.026706678792834282, + 0.06753631681203842, + -0.02965821884572506, + -0.03421247750520706, + 0.03200675547122955, + 0.01940716989338398, + 0.03313341736793518, + 0.01317878533154726, + -0.052397772669792175, + 0.024120112881064415, + -0.017883794382214546, + -0.014083290472626686, + -0.027801604941487312, + -0.028595030307769775, + 0.02362819015979767, + -0.01966106705367565, + -0.001365682459436357, + -0.005173129495233297, + 0.035481955856084824, + 0.027389023452997208, + -0.014035684987902641, + 0.023564716801047325, + -0.0032391566783189774, + -0.009243398904800415, + 0.054587624967098236, + 0.017804453149437904, + 0.00016389180382248014, + 0.04373357445001602, + -0.03824307397007942, + -0.012996298260986805, + 0.02526264451444149, + -0.0047684828750789165, + -0.0393538698554039, + 0.018423324450850487, + 0.00019476098532322794, + -0.007200330030173063, + 0.03805265203118324, + 0.00752563402056694, + 0.0042924280278384686, + -0.042337145656347275, + -0.03837002441287041, + 0.0411946140229702, + -0.008259551599621773, + 0.016963422298431396, + -0.0034890854731202126, + -0.021644627675414085, + -0.04170240834355354, + -0.05274688079953194, + 0.0067956834100186825, + 0.0024973044637590647, + -0.005359584465622902, + 0.02518330328166485, + -0.03732270374894142, + 0.026135412976145744, + 0.0012724549742415547, + -0.015043334104120731, + -0.004578060936182737, + -0.03011840581893921, + 0.02691296860575676, + -0.02984864078462124, + 0.0430036224424839, + 0.040052082389593124, + -0.03275257349014282, + 0.019788013771176338, + 0.04751027747988701, + 0.0061768121086061, + 0.042241934686899185, + -0.008497579954564571, + 0.0029535237699747086, + -0.027055785059928894, + -0.032260652631521225, + -0.0007577206706628203, + -0.031721122562885284, + -0.01492432039231062, + -0.041035931557416916, + -0.03678317368030548, + 0.03694185987114906, + 0.05290556326508522, + -0.03919518366456032, + 0.0025845812633633614, + 0.04144851118326187, + -0.012742402032017708, + -0.04309883341193199, + -0.03332383930683136, + 0.013607234694063663, + 0.0066727022640407085, + 0.062204502522945404, + 0.08594377338886261, + -0.005438927095383406, + -0.013035968877375126, + -0.02570696361362934, + 0.013694511726498604, + -0.007263803854584694, + -0.02938845381140709, + -0.02810310572385788, + 0.0005201891181059182, + -0.029610613361001015, + 0.0041139074601233006, + -0.033355578780174255, + -0.03906823694705963, + -0.03868739306926727, + 0.02005777880549431, + 0.033260367810726166, + -0.047192905098199844, + -0.02261260710656643, + 0.047097694128751755, + -0.012559914030134678, + 0.005629349034279585, + -0.06258534640073776, + 0.01629694551229477, + -0.008680067025125027, + -0.06893274933099747, + -0.03430768847465515, + -0.03157830610871315, + 0.031229199841618538, + 0.008886357769370079, + 0.0357041172683239, + 0.008049294352531433, + 0.018613746389746666, + 0.039576027542352676, + -0.036656226962804794, + -0.03411726653575897, + 0.017693372443318367, + 0.01969280280172825, + -0.0061966474168002605, + 0.014257843606173992, + -0.009267201647162437, + 0.06734589487314224, + -0.03259389102458954, + -0.03795744106173515, + 0.04281320050358772, + -0.021993735805153847, + 0.001343863201327622, + -0.020279938355088234, + 0.028944136574864388, + 0.010330391116440296, + -0.007965984754264355, + -0.005030313041061163, + -0.03376815840601921, + -0.05471457168459892, + 0.005438927095383406, + -0.021200310438871384, + -0.02719860151410103, + -0.004066301975399256, + -0.02564348839223385, + 0.04601863771677017, + -0.014075355604290962, + -0.001435107085853815, + 0.033260367810726166, + -0.036370594054460526, + 0.013948407955467701, + 0.01056841854006052, + 0.023659927770495415, + 0.03516458719968796, + 0.03424421325325966, + -0.003931419923901558, + 0.004693107679486275, + -0.025056354701519012, + -0.008568988181650639, + 0.004609798081219196, + 0.023866217583417892, + -0.019169142469763756, + 0.011718884110450745, + 0.02096228301525116, + 0.020660782232880592, + -0.029785167425870895, + -0.02800789475440979, + 0.009362412616610527, + -0.025770436972379684, + -0.005760264117270708, + -0.02023233287036419, + 0.022374579682946205, + 0.06728242337703705, + 0.014186435379087925, + -0.023358425125479698, + -0.007485962938517332, + 0.008767344057559967, + -0.00022748977062292397, + -0.022374579682946205, + -0.025881515815854073, + 0.03532327339053154, + -0.012409163638949394, + -0.04646295681595802, + 0.015678074210882187, + 0.03998861089348793, + -0.002602433320134878, + 0.04449526220560074, + 0.037290964275598526, + 0.005748362746089697, + -0.036751437932252884, + 0.01157606765627861, + -0.003118159482255578, + -0.028420476242899895, + -0.0421149879693985, + -0.008465842343866825, + -0.0027452497743070126, + 0.01975627802312374, + 0.004554258193820715, + 0.0021105099003762007, + 0.01674126274883747, + -0.024754853919148445, + -0.014503804966807365, + -0.020184727385640144, + 0.05300077423453331, + 0.020454490557312965, + 0.04284493997693062, + -0.02497701160609722, + 0.04868454486131668, + 0.04062334820628166, + -0.013742117211222649, + -0.03789396956562996, + 0.025960858911275864, + -0.006863124202936888, + -0.02069251798093319, + -0.024405745789408684, + -0.014670424163341522, + 0.0759148821234703, + 0.00047977405483834445, + -0.022025471553206444, + -0.031435489654541016, + -0.004494751337915659, + -0.045891690999269485, + -0.008065163157880306, + -0.023136267438530922, + 0.017804453149437904, + 0.009084713645279408, + 0.012988363392651081, + -0.02286650240421295, + 0.002374323783442378, + -0.03576758876442909, + 0.023453636094927788, + -0.025103960186243057, + -0.018804168328642845, + 0.02124791592359543, + 0.03046751208603382, + -0.016249340027570724, + 0.04884323105216026, + 0.0013081590877845883, + -0.05525410175323486, + 0.01977214589715004, + -0.006367234047502279, + 0.004907332360744476, + -0.004447145853191614, + 0.010822313837707043, + -0.021073361858725548, + 0.007771595846861601, + -0.024120112881064415, + -0.019058063626289368, + 0.04274972900748253, + -0.032070230692625046, + -0.04221019893884659, + 0.029499534517526627, + 0.030277090147137642, + -0.011131749488413334, + -0.03678317368030548, + 0.015098873525857925, + 0.05611100047826767, + 0.018169427290558815, + 0.00035406582173891366, + 0.04674858972430229, + 0.0008633453398942947, + -0.0005722576170228422, + -0.0016354467952623963, + 0.009370346553623676, + 0.06153802573680878, + -0.06518778204917908, + 0.027611183002591133, + -0.006605261471122503, + 0.038750868290662766, + 0.0750897228717804, + 0.010020955465734005, + 0.005236603785306215, + 0.034085530787706375, + 0.04128982499241829, + -0.004522521514445543, + -0.006486247759312391, + 0.08162754029035568, + 0.03306994587182999, + -0.02845221385359764, + -0.019565856084227562, + 0.022184157744050026, + 0.0028602962847799063, + -0.05814217031002045, + -0.010171705856919289, + 0.01831224374473095, + -0.03948081657290459, + 0.016177931800484657, + 0.00910058245062828, + -0.07750173658132553, + 0.005625381600111723, + -0.03805265203118324, + 0.032022625207901, + 0.06395003944635391, + 0.01912153698503971, + 0.033799897879362106, + 0.024881800636649132, + -0.0585547499358654, + 0.014971925877034664, + -0.004673271905630827, + -0.024643773213028908, + -0.0558253675699234, + -0.003147912910208106, + 0.00988607294857502, + -0.007648615166544914, + -0.0009278111392632127, + -0.041956301778554916, + -0.026198886334896088, + 0.015384506434202194, + 0.027944421395659447, + -0.003514871932566166, + 0.04021076858043671, + 0.02710339054465294, + -0.005438927095383406, + -0.01570187695324421, + -0.0043241651728749275, + 0.030895961448550224, + -0.012155267409980297, + 0.0011742686619982123, + -0.011401514522731304, + 0.057983484119176865, + 0.02297758124768734, + 0.037671808153390884, + -0.009965415112674236, + -0.01039386447519064, + 0.017979005351662636, + 0.04284493997693062, + 0.043892260640859604, + 0.01533690094947815, + -0.00860072486102581, + 0.012432966381311417, + 0.014083290472626686, + 0.06550514698028564, + 0.002866246970370412, + 0.014368923380970955, + -0.028134843334555626, + -0.00034960280754603446, + -0.0016681755660101771, + -0.048018068075180054, + -0.026976441964507103, + -0.08949831873178482, + 0.043416205793619156, + -0.06791716068983078, + -0.04382878541946411, + 0.0035902471281588078, + -0.02635757066309452, + 0.026484519243240356, + -0.018820036202669144, + -0.02591325342655182, + -0.04157545790076256, + 0.04157545790076256, + 0.002501271665096283, + 0.06740937381982803, + -0.03541848435997963, + 0.013972210697829723, + 0.016979290172457695, + -0.02881718799471855, + -0.011599870398640633, + -0.007799365557730198, + 0.03268910199403763, + -0.03909997269511223, + -0.026770152151584625, + 0.024374010041356087, + 0.024310534819960594, + -0.005359584465622902, + 0.022311104461550713, + 0.05246124789118767, + 0.010965130291879177, + 1.0901842870225664e-05, + 0.01244883518666029, + 0.0025052388664335012, + 0.035101111978292465, + 0.04344794154167175, + 0.056967899203300476, + -0.03586279973387718, + 0.032070230692625046, + 0.01377385389059782, + -0.042686253786087036, + -0.029769297689199448, + -0.01685234345495701, + -0.008894291706383228, + 0.02123204804956913, + -0.012472637929022312, + -0.08943483978509903, + 0.010028889402747154, + 0.06268055737018585, + 0.03909997269511223, + -0.008354762569069862, + -0.02580217458307743, + -0.05649184435606003, + -0.0329747349023819, + -0.018375718966126442, + 0.05090613290667534, + 5.299829808791401e-06, + -0.008949832059442997, + 0.04294015094637871, + 0.02683362551033497, + -0.016773000359535217, + 0.009052976965904236, + -0.03233999386429787, + -0.0046812063083052635, + 0.06613989174365997, + -0.04884323105216026, + -0.003772734897211194, + -0.030594460666179657, + -0.021739838644862175, + 0.02343776822090149, + -0.06874232739210129, + 0.004363836254924536, + -0.026944706216454506, + -0.013059771619737148, + 0.02965821884572506, + 0.007581173907965422, + 0.043416205793619156, + 0.06848842650651932, + -0.05077918618917465, + 0.05188998207449913, + 0.0006749069434590638, + -0.007513732649385929, + -0.009536965750157833, + -0.029721692204475403, + 0.031102251261472702, + -0.015924034640192986, + 0.0265479926019907, + 0.02699231170117855, + -0.02407250739634037, + -0.0050065102986991405, + 0.03513285145163536, + 0.03011840581893921, + 0.013067706488072872, + -0.004939069505780935, + -0.011996583081781864, + 0.007589108310639858, + -0.006918664090335369, + 0.04357488825917244, + -0.016773000359535217, + 0.029420191422104836, + 0.0173918716609478, + -0.003286762163043022, + 0.01070330012589693, + -0.04725638031959534, + 0.02048622816801071, + 0.025230908766388893, + 0.0010969097493216395, + 0.031165726482868195, + -0.02680188976228237, + 0.024231193587183952, + -0.026071937754750252, + 0.043162308633327484, + 0.005415124353021383, + -0.027960289269685745, + -0.023929690942168236, + -0.03430768847465515, + 0.0029753430280834436, + 0.03224478289484978, + -0.01977214589715004, + 0.015321033075451851, + 0.03092769905924797, + 0.014503804966807365, + 0.00553810503333807, + -0.022755423560738564, + 0.009894006885588169, + -0.007839037105441093, + 0.04125808924436569, + 0.015455914661288261, + 0.026341702789068222, + -0.04106766730546951, + 0.02094641514122486, + 0.018883509561419487, + -0.0004973781760782003, + 0.06429914385080338, + 0.020343411713838577, + -0.01831224374473095, + -0.011377711780369282, + -0.014170566573739052, + -0.013012166135013103, + -0.010092363692820072, + -0.0494144968688488, + -0.014670424163341522, + -0.031260937452316284, + -0.029436059296131134, + 0.006188713479787111, + -0.0033819731324911118, + 0.021739838644862175, + 0.001988520845770836, + 0.014995728619396687, + 0.01656670868396759, + -0.011211092583835125, + -0.01931195892393589, + 0.00019550482102204114, + -0.007878707721829414, + -0.0192167479544878, + 0.013059771619737148, + 0.015987509861588478, + -0.004268625285476446, + -0.053318146616220474, + 0.0073907519690692425, + -0.016130326315760612, + 0.025468936190009117, + 0.03145135939121246, + -0.004538389854133129, + -0.024548562243580818, + -0.0003798521065618843, + -0.02683362551033497, + -0.011457053944468498, + -0.012909021228551865, + 0.020470360293984413, + 0.045161738991737366, + -0.009394149295985699, + -0.004931135103106499, + -0.010124100372195244, + 0.0338633693754673, + -0.01286141574382782, + -0.029071085155010223, + -0.027801604941487312, + 0.008529316633939743, + 0.01616206206381321, + -0.03351426497101784, + 0.012718599289655685, + 0.016344550997018814, + 0.01157606765627861, + 0.004685173276811838, + -0.00597448879852891, + 0.004332099575549364, + 0.01666191965341568, + 0.0054944665171206, + -0.04513000324368477, + -0.016614314168691635, + 0.00629185838624835, + -0.011203157715499401, + -0.03535500913858414, + -0.02756357751786709, + 0.010187574662268162, + 0.0031022909097373486, + 0.029499534517526627, + -0.048652809113264084, + 0.011544330976903439, + -0.009267201647162437, + 0.0057245600037276745, + -0.010735037736594677, + 0.023755138739943504, + 0.030419906601309776, + 0.020248200744390488, + 0.007378850597888231, + -0.008009622804820538, + -0.05109655484557152, + 0.013186720199882984, + 0.037925705313682556, + -0.009925744496285915, + 0.030880093574523926, + -0.05198519304394722, + 0.003794554155319929, + 0.01029865350574255, + 0.02204134128987789, + 0.03694185987114906, + -0.01020344253629446, + 0.011972780339419842, + 0.024294666945934296, + -0.022549131885170937, + -0.018518535420298576, + 0.04335273057222366, + -0.005756296683102846, + 0.02534198760986328, + -0.019169142469763756, + 0.017629899084568024, + 0.01702689565718174, + -0.019438907504081726, + 0.05392114818096161, + 0.00024298633798025548, + -0.018740693107247353, + -0.036116696894168854, + -0.010147903114557266, + 0.014035684987902641, + -0.025738699361681938, + -0.01491638645529747, + -0.016788868233561516, + 0.007128921803086996, + 0.05665053054690361, + 0.013353339396417141, + -0.038401760160923004, + -0.04532042518258095, + -0.030166011303663254, + 0.03038816899061203, + 0.009648045524954796, + -0.034910690039396286, + 0.009560768492519855, + -0.015059202909469604, + -0.009655979461967945, + 0.04265451803803444, + 0.006521951872855425, + 0.001494613941758871, + -0.029959719628095627, + -0.011496725492179394, + 0.03487895429134369, + 0.008124670013785362, + -0.016503235325217247, + -0.010052692145109177, + 0.026849495247006416, + -0.009536965750157833, + 0.014186435379087925, + -0.025500671938061714, + -0.026944706216454506, + 0.0042963954620063305, + 0.022771291434764862, + 0.032530415803194046, + -0.008616593666374683, + -0.009663914330303669, + -0.01712210662662983, + 0.0054547954350709915, + -0.014408593997359276, + 0.017550555989146233, + -0.008077064529061317, + -0.014535542577505112, + -0.0439557321369648, + -0.02764291875064373, + -0.0007562329992651939, + -0.032816048711538315, + -0.018724825233221054, + -0.0329747349023819, + 0.008204012177884579, + -0.0178361888974905, + 0.008124670013785362, + 0.006398970726877451, + -0.021105099469423294, + -0.003623967757448554, + 0.024104245007038116, + -0.028071369975805283, + -0.03306994587182999, + 0.057253532111644745, + -0.0035664443857967854, + -0.032355863600969315, + 0.026611467823386192, + 0.013575498014688492, + -0.007283639628440142, + -0.015138545073568821, + -0.020010173320770264, + -0.027579445391893387, + -0.04173414409160614, + 0.02096228301525116, + 0.025929121300578117, + 0.009663914330303669, + 0.007577206939458847, + 0.0047724503092467785, + 0.010060626082122326, + -0.026595598086714745, + 0.02683362551033497, + 0.03313341736793518, + 0.011591936461627483, + 0.0137341832742095, + -0.005589677486568689, + 0.025595882907509804, + 0.002243408700451255, + 0.020978150889277458, + 0.012226675637066364, + 0.020264068618416786, + 0.007446291856467724, + 0.004066301975399256, + 0.013876999728381634, + 0.011615739203989506, + -0.01587642915546894, + 0.019248485565185547, + -0.006212516222149134, + -0.028864793479442596, + 0.009743256494402885, + -0.015765350311994553, + -0.0215176809579134, + 0.0016007345402613282, + -0.012512308545410633, + -0.008291289210319519, + -0.03367294743657112, + 0.00997334998100996, + 0.017994875088334084, + -0.0018109921365976334, + 0.027484234422445297, + -0.029086953029036522, + -0.006529885809868574, + 0.02370753325521946, + -0.026103675365447998, + 0.015384506434202194, + -0.012163202278316021, + 0.01542417798191309, + 0.009068845771253109, + -0.007109086029231548, + -0.03313341736793518, + -0.10352606326341629, + 0.04271798953413963, + 0.008362697437405586, + 0.004375737626105547, + -0.01016377191990614, + -0.0059308502823114395, + -0.03259389102458954, + -0.008164340630173683, + 0.029991457238793373, + 0.005018411669880152, + -0.010219311341643333, + -0.0028126908000558615, + -0.016868211328983307, + 0.0064981491304934025, + 0.036180172115564346, + 0.016439761966466904, + -0.0006154000875540078, + -0.042337145656347275, + -0.023929690942168236, + 0.010362127795815468, + -0.028420476242899895, + -0.0069424668326973915, + 0.016709525138139725, + -0.004482849966734648, + -0.0002610863302834332, + -0.0030705539975315332, + -0.00046663294779136777, + 0.04989055171608925, + -0.006121272221207619, + -0.02535785548388958, + -0.004153578542172909, + 0.005161228124052286, + -0.009949547238647938, + -0.02948366478085518, + -0.0173918716609478, + -0.02270781807601452, + 0.01236155815422535, + 0.015622533857822418, + 0.004788318648934364, + 0.023485373705625534, + 0.014503804966807365, + -0.005887211766093969, + 0.0494462326169014, + 0.00027893841615878046, + 0.010973065160214901, + -0.0201371219009161, + -0.041226353496313095, + 0.004423343110829592, + 0.0132660623639822, + 0.017915531992912292, + 0.03443463519215584, + 0.0012665042886510491, + 0.046367745846509933, + -0.02699231170117855, + 0.012115596793591976, + 0.042337145656347275, + -0.024120112881064415, + -0.015352769754827023, + 0.01712210662662983, + 0.04284493997693062, + -0.014487937092781067, + -0.03551369532942772, + -0.023041056469082832, + -0.016503235325217247, + -0.0067361765541136265, + -0.0031538635957986116, + 0.0187724307179451, + 0.005022379104048014, + 0.0077477931044995785, + 0.027150996029376984, + 0.002969392342492938, + 0.022850634530186653, + 0.01950238086283207, + 0.014289580285549164, + -0.010005086660385132, + 0.007053546607494354, + 0.0022672114428132772, + 0.0025330085773020983, + 0.0051572611555457115, + 0.011139684356749058, + 0.034371163696050644, + -0.012710665352642536, + 0.0003813397779595107, + 0.016725394874811172, + -0.00430432939901948, + 0.028801320120692253, + -0.023310819640755653, + 0.00979086197912693, + 0.028420476242899895, + 0.024278799071907997, + -0.01848679780960083, + 0.021105099469423294, + 0.0057245600037276745, + 0.0057523297145962715, + 0.010338325053453445, + -0.015043334104120731, + -0.04922407492995262, + -0.012837613001465797, + -0.022644342854619026, + 0.00027769868029281497, + -0.009306873194873333, + -0.03405379131436348, + 0.022263498976826668, + -0.02415185049176216, + -0.007489929907023907, + 0.029626481235027313, + 0.02554827742278576, + 0.00686709163710475, + 0.017550555989146233, + 0.010147903114557266, + -0.012385360896587372, + 0.00464550219476223, + -0.0002623260661493987, + -0.016709525138139725, + 0.013115311972796917, + -0.04751027747988701, + -0.020470360293984413, + 0.026849495247006416, + -0.022580869495868683, + -0.016582578420639038, + 0.06823453307151794, + -0.014360988512635231, + 0.07851731777191162, + 0.011861700564622879, + -0.03608496114611626, + -0.035831063985824585, + 0.0015918085118755698, + 0.010401799343526363, + -0.03367294743657112, + 0.016899948939681053, + -0.006922631058841944, + 0.0077200233936309814, + 0.0009258275385946035, + 0.027753999456763268, + 0.021168572828173637, + 0.009354478679597378, + 0.0032808114774525166, + 0.01728079281747341, + 0.020454490557312965, + 0.014614884741604328, + -0.009552834555506706, + 0.008449974469840527, + 0.00028811238007619977, + 0.02837287075817585, + 0.038116127252578735, + 0.006212516222149134, + 0.009663914330303669, + -0.005831672344356775, + -0.022914107888936996, + 0.008957765996456146, + 0.0027631018310785294, + -0.03468853235244751, + -0.0448761060833931, + 0.0018556222785264254, + -0.014027750119566917, + -0.010623957961797714, + -0.023183872923254967, + 0.059824228286743164, + -0.013480287045240402, + 0.011917239986360073, + 0.004248789977282286, + -0.0038857979234308004, + -0.032530415803194046, + -0.02946779690682888, + 0.03186393901705742, + 0.015035400167107582, + 0.005327847320586443, + 0.008941897191107273, + -0.009259267710149288, + 0.023406030610203743, + -0.031625911593437195, + 0.023215608671307564, + 0.012829679064452648, + 0.013900802470743656, + -0.03449811041355133, + 0.04265451803803444, + -0.019518250599503517, + 0.055698420852422714, + -0.019423039630055428, + -0.0017782633658498526, + -0.025056354701519012, + 0.0060776337049901485, + 0.029721692204475403, + 0.0031221264507621527, + -0.007105119060724974, + -0.027420761063694954, + -0.019565856084227562, + -0.022279368713498116, + 0.009076779708266258, + 0.017629899084568024, + 0.001988520845770836, + -0.025960858911275864, + 0.002304899040609598, + -0.02994385175406933, + -0.04582821577787399, + 0.009536965750157833, + -0.010258982889354229, + -0.012623388320207596, + -0.00969565100967884, + -0.00046564117656089365, + -0.01867721974849701, + 0.024088377133011818, + 0.016693657264113426, + 0.03459332138299942, + 0.012004517018795013, + -0.011187289841473103, + -0.010235180146992207, + 0.020613176748156548, + 0.020010173320770264, + 0.01683647371828556, + 0.018962852656841278, + 0.019819751381874084, + 0.003445447189733386, + -0.02370753325521946, + 0.017169712111353874, + 0.009306873194873333, + 0.011750620789825916, + 0.011536396108567715, + 0.030911829322576523, + 0.012782073579728603, + -0.023739269003272057, + 0.0247231163084507, + 0.03176872804760933, + -0.05703137442469597, + -0.03348252549767494, + -0.05112829431891441, + 0.02407250739634037, + 0.012599585577845573, + -0.019264353439211845, + -0.022374579682946205, + -0.009425886906683445, + 0.007232067175209522, + -0.003631901927292347, + -0.0260878074914217, + -0.010044758208096027, + -0.03141961991786957, + 0.00041580418474040926, + 0.01821703277528286, + 0.029785167425870895, + -0.032086096704006195, + -0.0009654987952671945, + 0.016582578420639038, + -0.02005777880549431, + -0.015939904376864433, + -0.012020385824143887, + -0.011695081368088722, + 0.06747284531593323, + 0.006129206623882055, + -0.023406030610203743, + -0.002531025093048811, + -0.03827481344342232, + -0.014178501442074776, + 0.029610613361001015, + -0.03779875859618187, + -0.0013775838306173682, + -0.0012526194332167506, + 0.004463014658540487, + 0.012337755411863327, + -0.007370916195213795, + 0.003939353860914707, + -0.005228669382631779, + -0.014472068287432194, + 0.013670708984136581, + -0.025024617090821266, + 0.042971886694431305, + 0.01605098322033882, + 0.031070515513420105, + -0.0035029705613851547, + 0.00480418698862195, + -0.002124394988641143, + 0.05300077423453331, + 0.018248770385980606, + -0.027611183002591133, + -0.01395634189248085, + 0.003760833526030183, + 0.003324449760839343, + 0.00969565100967884, + -0.004585995338857174, + -0.006105403881520033, + 0.028404608368873596, + -0.028944136574864388, + 0.022311104461550713, + 0.006625096779316664, + -0.032816048711538315, + 0.00897363480180502, + 0.035481955856084824, + -0.020819466561079025, + 0.002610367489978671, + -0.0021779511589556932, + -0.023675795644521713, + -0.0020192661322653294, + 0.016598446294665337, + 0.0302136167883873, + -0.02689710073173046, + -0.021120967343449593, + 0.006720307748764753, + -0.0054944665171206, + -0.002463584067299962, + -0.00716462591663003, + -0.013377142138779163, + 0.03440289944410324, + -0.009211662225425243, + 0.05154087394475937, + -0.007283639628440142, + -0.052302561700344086, + -0.010211377404630184, + 0.004609798081219196, + 0.024643773213028908, + -0.03161004185676575, + 0.025119828060269356, + -0.015090939588844776, + 0.01712210662662983, + -0.031165726482868195, + -0.002084723673760891, + 0.0031875839922577143, + -0.010909590870141983, + 0.0009580604382790625, + -0.011504659429192543, + 0.0045304554514586926, + 0.026690809056162834, + 0.012012450955808163, + 0.042876675724983215, + -0.00979086197912693, + 0.009243398904800415, + 0.06341050565242767, + 0.006871058605611324, + -0.011917239986360073, + -0.022469790652394295, + -0.0021997701842337847, + -0.003735047299414873, + 0.018264638260006905, + -0.003147912910208106, + 0.04532042518258095, + -0.015939904376864433, + 0.00028662470867857337, + 0.009965415112674236, + 0.03697359561920166, + -0.00498667499050498, + 0.033165156841278076, + -0.003842159640043974, + -0.02964235097169876, + 0.015789153054356575, + -0.004879562649875879, + 0.002283079782500863, + -0.028864793479442596, + -0.031625911593437195, + -0.01748708263039589, + 0.025326119735836983, + 0.012202872894704342, + 0.012060056440532207, + 0.010100297629833221, + 0.025786304846405983, + 0.025008749216794968, + 0.0021779511589556932, + 0.015709809958934784, + -0.011655409820377827, + -0.016995159909129143, + -0.03503764048218727, + 0.012655124999582767, + 0.0494462326169014, + 0.017423609271645546, + -0.005982422735542059, + 0.02910282090306282, + 0.023961428552865982, + -0.0025052388664335012, + -0.015503520146012306, + 0.01098099909722805, + -0.02480245940387249, + -0.030959434807300568, + -0.005470663774758577, + 0.0016523071099072695, + 0.013567564077675343, + 0.01176648959517479, + -0.015805020928382874, + 0.02680188976228237, + -0.027658788487315178, + 0.0017584277084097266, + -0.015249624848365784, + 0.002776986686512828, + 0.00553810503333807, + -0.013694511726498604, + -0.01710623875260353, + -0.033101681619882584, + 0.014480002224445343, + -0.026786020025610924, + 0.00686709163710475, + -0.008656264282763004, + -0.004990641959011555, + -0.02700817957520485, + -0.015344835817813873, + 0.03798918053507805, + 0.030308827757835388, + -0.017820321023464203, + -0.004048449918627739, + -0.008251617662608624, + 0.021263783797621727, + 0.0096083739772439, + 0.006010192912071943, + 0.022184157744050026, + -0.009267201647162437, + 0.05388941243290901, + 0.004558225627988577, + -0.013028034940361977, + 0.028769582509994507, + 0.01966106705367565, + -0.01267099380493164, + -0.017740977928042412, + 0.030895961448550224, + 0.008259551599621773, + -0.008061195723712444, + -0.003326433477923274, + 0.026294097304344177, + 0.0365927517414093, + 0.022374579682946205, + 0.0040246471762657166, + 0.03200675547122955, + 0.01847092993557453, + -0.005728526972234249, + 0.021105099469423294, + -0.018137691542506218, + 0.002084723673760891, + 0.036370594054460526, + -0.010822313837707043, + -0.03703707084059715, + 0.019724540412425995, + -0.002739299088716507, + 0.02140660025179386, + 0.002015298930928111, + -0.00951316300779581, + 0.004359869286417961, + -0.015924034640192986, + 0.013202588073909283, + -0.0043519348837435246, + 0.01363897230476141, + -0.010124100372195244, + -0.01904219575226307, + -0.022088946774601936, + -0.0008345837122760713, + 0.0041734143160283566, + -0.01404361892491579, + 0.015733612701296806, + 0.02497701160609722, + -0.03468853235244751, + 0.015559060499072075, + -0.028721977025270462, + -0.0019081865902990103, + -0.02992798388004303, + 0.019327828660607338, + 0.002255310071632266, + -0.03954429179430008, + -0.036370594054460526, + 0.015749482437968254, + 0.00928307045251131, + 0.014963991940021515, + -0.029150426387786865, + -0.005855475086718798, + -0.021470075473189354, + 0.007081316318362951, + -0.021263783797621727, + 0.02005777880549431, + 0.005220734979957342, + -0.030229484662413597, + -0.016788868233561516, + 0.0029336882289499044, + 0.0029793099965900183, + 0.033641211688518524, + 0.015947837382555008, + -0.02518330328166485, + -0.026135412976145744, + 0.003842159640043974, + -0.01977214589715004, + -0.003982992377132177, + 0.049097124487161636, + 0.008132603950798512, + -0.02096228301525116, + -0.0018476879922673106, + 0.01248850580304861, + -0.03681490942835808, + -0.009822598658502102, + -0.03275257349014282, + 0.025691093876957893, + -0.023723401129245758, + 0.011790292337536812, + 0.0014727948000654578, + 0.04646295681595802, + 0.0018923181341961026, + -0.004673271905630827, + 0.021105099469423294, + -0.05242950841784477, + 0.0023485373239964247, + -0.043511416763067245, + -0.0014509755419567227, + -0.012417097575962543, + 0.008283354341983795, + 0.027230339124798775, + -0.0019438907038420439, + -0.03827481344342232, + -0.028420476242899895, + -0.014710095711052418, + 0.03817960247397423, + 0.0018179345643147826, + -0.00019662057457026094, + 0.010711234994232655, + -0.0034394965041428804, + -0.004625666420906782, + -0.03770354762673378, + 0.006327562499791384, + 0.007406620308756828, + 0.02094641514122486, + 0.026659073308110237, + 0.015400375239551067, + 0.0009188851108774543, + 7.122227543732151e-05, + 0.015217887237668037, + -0.04189283028244972, + -0.021184442564845085, + -0.005795968230813742, + -0.028261791914701462, + 0.02664320357143879, + 0.019835619255900383, + -0.017058633267879486, + 0.015987509861588478, + -0.0042646583169698715, + 0.06153802573680878, + 0.007172560319304466, + 0.017788583412766457, + 0.005998291540890932, + -0.020613176748156548, + -0.03259389102458954, + -0.037925705313682556, + -0.009648045524954796, + -0.058713436126708984, + 0.011282500810921192, + -0.0007656548987142742, + 0.04138503596186638, + -0.023406030610203743, + -0.004478882998228073, + -0.05366725102066994, + -0.010520813055336475, + 0.0013775838306173682, + -0.009822598658502102, + 0.030991172417998314, + -0.0338633693754673, + -0.014963991940021515, + 0.03200675547122955, + -0.0205973070114851, + 0.009227530099451542, + 0.013440615497529507, + -0.019899094477295876, + -0.015963707119226456, + -0.01354376133531332, + -0.049287546426057816, + -0.0034811513032764196, + -0.033450789749622345, + 0.018708957359194756, + 0.018835904076695442, + 0.005256439093500376, + -0.014075355604290962, + -0.020343411713838577, + 0.0061966474168002605, + -0.0042051514610648155, + -0.020930545404553413, + -0.027595313265919685, + 0.003177666338160634, + 0.010639826767146587, + 0.03313341736793518, + 0.0025171402376145124, + -0.022390447556972504, + -0.04071855917572975, + -0.00016091646102722734, + 0.007958050817251205, + -0.03268910199403763, + -0.008616593666374683, + -0.02902347967028618, + 0.027976159006357193, + -0.015765350311994553, + 0.008029459044337273, + -0.009687717072665691, + 0.006926598493009806, + 0.027611183002591133, + -0.018534403294324875, + 0.009346543811261654, + 0.013797656632959843, + -0.0029832771979272366, + -0.023659927770495415, + 0.02508809231221676, + -0.02353297919034958, + 0.01628107577562332, + -0.008156406693160534, + 0.020438622683286667, + -0.04798633232712746, + 0.015487652271986008, + -0.02115270495414734, + -0.00448681740090251, + 0.0160271804779768, + -0.03484721854329109, + -0.038306549191474915, + -0.0033918910194188356, + 0.012329821474850178, + 0.03430768847465515, + 0.027753999456763268, + 0.0022771290969103575, + -0.01589229889214039, + 0.006355332676321268, + -0.013305733911693096, + 0.0066131954081356525, + 0.02269194833934307, + 0.019518250599503517, + 0.017264923080801964, + -0.006954368203878403, + -0.01294869277626276, + 0.04747853800654411, + 0.018343981355428696, + 0.0146466214209795, + -0.03275257349014282, + 0.0011812112061306834, + 0.029229769483208656, + 0.008926029317080975, + 0.012321886606514454, + -0.008997437544167042, + -0.02497701160609722, + 0.01189343724399805, + 0.023025186732411385, + -0.00028116992325522006, + -0.011591936461627483, + 0.004098039120435715, + -0.015765350311994553, + -0.015209953300654888, + -0.00860865879803896, + 0.03722749277949333, + -0.0019171126186847687, + 0.060617655515670776, + 0.007973918691277504, + -0.017534688115119934, + -0.006986105348914862, + -0.03357773646712303, + -0.01748708263039589, + -0.013210522942245007, + 0.0067917159758508205, + -0.014757701195776463, + -0.009751190431416035, + -0.02050209604203701, + -0.015075070783495903, + -0.010806445963680744, + 0.005716625601053238, + 0.010639826767146587, + -0.037386175245046616, + -0.008592790924012661, + 0.026849495247006416, + -0.016328681260347366, + 0.03194328024983406, + 0.023041056469082832, + -0.001127655035816133, + 0.006153009366244078, + -0.034466374665498734, + 0.04246409609913826, + 0.00524057075381279, + -0.026468651369214058, + -0.01637628674507141, + 0.015368638560175896, + -0.0035029705613851547, + 0.021628759801387787, + -0.0014489920577034354, + -0.006279957015067339, + 0.013353339396417141, + -0.009045043028891087, + -0.046272534877061844, + -0.02353297919034958, + -0.049573179334402084, + 0.009497295133769512, + -0.0036814911291003227, + -0.00044679734855890274, + -0.025421330705285072, + -0.0020311675034463406, + -0.006779814604669809, + 0.0066766696982085705, + -0.01542417798191309, + -0.020343411713838577, + -0.024183588102459908, + -0.038116127252578735, + -0.017185581848025322, + 0.024865932762622833, + -0.0037707514129579067, + 0.010973065160214901, + 0.03862391784787178, + -0.014416528865695, + -0.04100419208407402, + -0.004105973057448864, + 0.008965699933469296, + -0.00028216169448569417, + 0.023723401129245758, + -0.020724255591630936, + 0.0676632672548294, + -0.020010173320770264, + 0.005617447663098574, + -0.014345120638608932, + -0.021533548831939697, + 0.029626481235027313, + 0.05023965612053871, + -0.02508809231221676, + 0.005716625601053238, + -0.016185864806175232, + -0.013845262117683887, + -0.014813240617513657, + -0.0022017539013177156, + -0.028975874185562134, + 0.004665337968617678, + 0.027706393972039223, + -0.019327828660607338, + -0.0009674823377281427, + -0.006839321460574865, + -0.02591325342655182, + -0.0012040220899507403, + 0.014115027152001858, + 0.006351365242153406, + -0.004201184492558241, + -0.018074216321110725, + -0.02370753325521946, + 0.04097245633602142, + -0.02535785548388958, + -0.007997721433639526, + -0.014202304184436798, + -0.00716462591663003, + 0.011829963885247707, + 0.0539846234023571, + 0.02042275480926037, + -0.008156406693160534, + 0.006160943303257227, + -0.025976726785302162, + -0.010235180146992207, + 0.016773000359535217, + -0.029324980452656746, + 0.022469790652394295, + -0.0023802744690328836, + 0.011544330976903439, + 0.008616593666374683, + 0.009624242782592773, + 0.010076494887471199, + -0.025024617090821266, + -0.011377711780369282, + -0.03256215155124664, + -0.021946130320429802, + -0.03319689258933067, + 0.009624242782592773, + -3.514624040690251e-05, + 0.0023882086388766766, + -0.02242218516767025, + -0.015305164270102978, + -0.021374864503741264, + -0.030895961448550224, + -0.0393538698554039, + 0.013615169562399387, + 0.0016195783391594887, + -0.024913538247346878, + -0.03038816899061203, + -0.03643406555056572, + 0.016709525138139725, + 0.04217846319079399, + -0.020629044622182846, + 0.00021534044935833663, + -0.027262074872851372, + -0.014083290472626686, + -0.01176648959517479, + ], + "index": 63, + }, + { + "title": "Athletics at the 2004 Summer Olympics \u2013 Women's heptathlon", + "text": "The women's heptathlon competition at the 2004 Summer Olympics in Athens was held at the Olympic Stadium on 20\u201321 August.", + "vector": [ + -0.009629865176975727, + -0.027945220470428467, + -0.013117847964167595, + 0.03463166952133179, + -0.06854644417762756, + -0.0287034772336483, + 0.010126179084181786, + 0.008196069858968258, + 0.05266440287232399, + -0.002536714542657137, + -0.042958710342645645, + -0.04946593567728996, + -0.028731049969792366, + -0.002669409615918994, + -0.01298687607049942, + 0.004625368397682905, + -0.017233114689588547, + 0.019466526806354523, + -0.030109699815511703, + -0.01341425720602274, + 0.00825121533125639, + 0.0427105538547039, + -0.014255233108997345, + 0.014310379512608051, + -0.01493077166378498, + -0.017508845776319504, + 0.005349159240722656, + -0.024057429283857346, + 0.023974711075425148, + 0.008168497122824192, + 0.01832224801182747, + 0.015109995380043983, + 0.01909429207444191, + -0.014475816860795021, + -0.03645148500800133, + 0.01275939866900444, + 0.008416653610765934, + 0.017260689288377762, + -0.02837260067462921, + -0.0011210141237825155, + -0.0033294379245489836, + 0.06810527294874191, + -0.007582570891827345, + 0.07207578420639038, + -0.003787838853895664, + -0.015675241127610207, + 0.003377690678462386, + -0.003022688440978527, + -0.033280592411756516, + -0.011663372628390789, + -0.02630462683737278, + 0.013889891095459461, + -0.005518043413758278, + -0.018225742504000664, + 0.013117847964167595, + -0.05150633677840233, + 0.043096575886011124, + 0.07505366206169128, + 0.02287179045379162, + -0.0021610327530652285, + -0.014475816860795021, + 0.022940723225474358, + -0.018666910007596016, + -0.0016397309955209494, + -0.010188218206167221, + -0.03286699950695038, + 0.02434694580733776, + 0.1148139089345932, + 0.017715642228722572, + 0.044061630964279175, + 0.003932597115635872, + -0.007775581907480955, + -0.0301924180239439, + -0.018735842779278755, + -0.017191756516695023, + -0.058013562113046646, + 0.014434457756578922, + -0.027628131210803986, + -0.046984367072582245, + 0.01675058901309967, + -0.013586588203907013, + -0.06314213573932648, + -0.022099748253822327, + 0.026538997888565063, + 0.022499555721879005, + 0.008520052768290043, + 0.005452557932585478, + -0.0714140310883522, + -0.04524726793169975, + 0.00589372543618083, + -0.010863755829632282, + 0.01314542070031166, + -0.02052808739244938, + 0.0017233116086572409, + -0.03650663048028946, + 0.02285800501704216, + -0.0024643356446176767, + 0.02077624388039112, + -0.016585150733590126, + -0.030826596543192863, + -0.019177010282874107, + -0.009188697673380375, + 0.007996165193617344, + -0.015385725535452366, + 0.04326201230287552, + 0.04910748451948166, + 0.03669964149594307, + 0.026842301711440086, + -0.005904065445065498, + -0.017329620197415352, + -0.010188218206167221, + -0.005804113112390041, + 0.004339298699051142, + -0.019190797582268715, + -0.03402506187558174, + 0.002650453243404627, + -0.05928191915154457, + -0.026332201436161995, + -0.020624592900276184, + 0.03929150477051735, + 0.0118563836440444, + -0.0006074673146940768, + 0.02709045819938183, + 0.022899363189935684, + 0.023657621815800667, + 0.00893364753574133, + 0.0015690751606598496, + 0.03576216101646423, + -0.018556619063019753, + -0.01442067138850689, + 0.001850836561061442, + 0.020541874691843987, + -0.0015130675164982677, + 0.010567346587777138, + 0.0009056002018041909, + 0.0012020098511129618, + -0.030936889350414276, + -0.026925019919872284, + 0.022223826497793198, + -0.008416653610765934, + -0.0067381481640040874, + 0.009002579376101494, + -0.019714685156941414, + -0.014186300337314606, + -0.05462208390235901, + -0.008106458000838757, + 0.025105202570557594, + -0.01302134245634079, + -0.012283764779567719, + -0.027366187423467636, + -0.013786492869257927, + -0.018542831763625145, + -0.031653787940740585, + -0.016157768666744232, + -0.009636757895350456, + 0.038547031581401825, + 0.01668165624141693, + -0.030026979744434357, + -0.005797219928354025, + 0.03813343867659569, + -0.016061263158917427, + -0.02487083151936531, + -0.01818438433110714, + 0.0013777875574305654, + 0.001295930240303278, + -0.0001702847221167758, + -0.0039808498695492744, + 0.028400175273418427, + -0.007754901889711618, + -0.0015845849411562085, + -0.016585150733590126, + -0.04974166303873062, + -0.003267398802563548, + 0.0062900870107114315, + -0.053739748895168304, + 0.04149734228849411, + 0.027504052966833115, + 0.054070621728897095, + 0.01158754713833332, + -0.015468444675207138, + -0.006062610074877739, + 0.019563032314181328, + 0.0014406885020434856, + -0.00423590000718832, + -0.051919929683208466, + 0.025408506393432617, + 0.0014915261417627335, + -0.020693525671958923, + -0.002505694981664419, + 0.037830136716365814, + 0.038216158747673035, + -0.0032846317626535892, + 0.07279267907142639, + 0.03948451578617096, + -0.054401498287916183, + -0.027697063982486725, + 0.004197986796498299, + -0.03170893341302872, + 0.0016819520387798548, + 0.010787930339574814, + -0.005628335755318403, + -0.026856087148189545, + -0.041993655264377594, + 0.00909219216555357, + -0.03170893341302872, + -0.004263472743332386, + 0.044392507523298264, + -0.03427322208881378, + 0.018404968082904816, + 0.015578736551105976, + 0.023588689044117928, + 0.05327100679278374, + 0.0027538519352674484, + -0.007996165193617344, + -0.004411677364259958, + 0.04781155660748482, + 0.043537743389606476, + 0.023133734241127968, + -0.039070919156074524, + 0.009850448928773403, + -0.03129533678293228, + -0.008719956502318382, + -0.016461072489619255, + 0.06496195495128632, + 0.007623930461704731, + 0.012166579253971577, + -0.003818858414888382, + -0.015275433659553528, + 0.002186882309615612, + 0.0257255956530571, + -0.011105019599199295, + -0.04058743268251419, + -0.01778457500040531, + 0.003763712476938963, + 0.05280226469039917, + 0.05156148225069046, + 0.01622670143842697, + 0.004194540437310934, + 0.05277469381690025, + -0.011442788876593113, + -0.04927292466163635, + 0.003960169851779938, + -0.022513343021273613, + -0.05528383329510689, + -0.05194750428199768, + 0.0035534685011953115, + 0.009050832130014896, + 0.020610805600881577, + -0.021658578887581825, + 0.03576216101646423, + 0.029889116063714027, + 0.002171372529119253, + -0.022678779438138008, + 0.02936522848904133, + 0.06021939963102341, + 0.004942457657307386, + 0.04604688659310341, + -0.0523335263133049, + -0.028951633721590042, + -0.003908470738679171, + -0.03876761719584465, + 0.03416292741894722, + 0.024953551590442657, + -0.006510671228170395, + 0.0038981307297945023, + 0.05305042117834091, + -0.01792244054377079, + 0.012656000442802906, + -0.029833970591425896, + -0.03209495544433594, + -0.03612060844898224, + 0.0030261350329965353, + 0.006090183276683092, + 0.0024419324472546577, + 0.046791356056928635, + 0.021920522674918175, + 0.02525685355067253, + -0.018074091523885727, + -0.011208418756723404, + -0.018818562850356102, + -0.035817306488752365, + -0.0017388213891535997, + 0.035955172032117844, + -0.03377690538764, + 0.024636462330818176, + -0.002540161134675145, + 0.01695738546550274, + -0.00843733362853527, + 0.03551400452852249, + 0.02507762983441353, + 0.02442966401576996, + -0.0012347527081146836, + -0.05136847123503685, + 0.023037228733301163, + 0.00925073679536581, + 0.030440574511885643, + -0.038161009550094604, + 0.01143589522689581, + 0.014806692488491535, + -0.05878560245037079, + -0.02837260067462921, + 0.05015525966882706, + -0.016847094520926476, + -0.010450161062180996, + -0.056276462972164154, + -0.050954874604940414, + 0.012738718651235104, + -0.021796444430947304, + -0.04623989388346672, + 0.020569447427988052, + 0.015082422643899918, + 0.020624592900276184, + 0.008003058843314648, + 0.02077624388039112, + 0.016612723469734192, + 0.005090662278234959, + 0.002112779999151826, + 0.04188336431980133, + -0.019121864810585976, + 0.0036086144391447306, + -0.009085298515856266, + 0.04896962270140648, + -0.009912488050758839, + 0.050872158259153366, + -0.007203442510217428, + -0.012421629391610622, + 0.001780180842615664, + -0.05346401780843735, + 0.0025746275205165148, + -0.023023443296551704, + -0.010470841079950333, + -0.04855602607131004, + -0.04221424087882042, + 0.017384767532348633, + -0.0011735751759260893, + -0.05572500079870224, + -0.03181922435760498, + -0.024112574756145477, + 0.04422706738114357, + 0.0010787930805236101, + -0.021865377202630043, + 0.018349820747971535, + 0.010787930339574814, + 0.05817899852991104, + 0.016268061473965645, + 0.033032435923814774, + 0.03686508163809776, + 0.011111913248896599, + 0.020169638097286224, + 0.07428161799907684, + 0.00045280010090209544, + 0.0560007318854332, + 0.03190194442868233, + 0.055366553366184235, + 0.010953368619084358, + 0.013131634332239628, + -0.04400648549199104, + -0.05657976493239403, + 0.039705097675323486, + -0.06876702606678009, + 0.04210394620895386, + 0.009140444919466972, + -0.004949350841343403, + -0.026414919644594193, + -0.044833675026893616, + -0.012325123883783817, + 0.03642391413450241, + 0.009691904298961163, + -0.020376436412334442, + 0.00025052641285583377, + -0.01760535128414631, + 0.010043459944427013, + -0.018101664260029793, + -0.02098304219543934, + -0.020224783569574356, + -0.009126657620072365, + -0.016847094520926476, + -0.0348246805369854, + -0.0039808498695492744, + -0.0090577257797122, + 0.004590902011841536, + 0.04817000404000282, + -0.012483668513596058, + 0.06556855887174606, + 0.010905115865170956, + 0.05707607790827751, + 0.09518194198608398, + -0.05271954834461212, + -0.020555660128593445, + -0.017508845776319504, + 0.002026614500209689, + 0.003729246323928237, + -0.052443817257881165, + -0.0045288628898561, + -0.02033507637679577, + -0.024774327874183655, + 0.036782361567020416, + 0.057517245411872864, + -0.013703773729503155, + -0.011849489994347095, + -0.009933168068528175, + -0.036341194063425064, + -0.03460409492254257, + -0.05065157264471054, + 0.00577998673543334, + 0.010553560219705105, + -0.002169649349525571, + 0.04345502331852913, + -0.02117605321109295, + 0.033418457955121994, + -0.039319075644016266, + 0.05467722937464714, + -0.034962546080350876, + -0.03752683103084564, + -0.010484627448022366, + 0.0025125881657004356, + 0.01895642653107643, + 0.017246901988983154, + -0.009367921389639378, + -0.033804479986429214, + -0.03294971585273743, + 0.04086316376924515, + -0.031929515302181244, + -0.016309421509504318, + -0.00010011363337980583, + 0.007651503197848797, + -0.08906073868274689, + -0.02369897998869419, + -0.03416292741894722, + 0.02442966401576996, + -0.04298628494143486, + -0.05271954834461212, + 0.013814065605401993, + 0.008292575366795063, + 0.03259126842021942, + -0.00767907639965415, + -0.0327291339635849, + 0.019204584881663322, + 0.011615119874477386, + 0.011987355537712574, + -0.04058743268251419, + 0.01155997347086668, + -0.01497213076800108, + 0.010532880201935768, + -0.018280889838933945, + 0.0031174705363810062, + 0.011725411750376225, + 0.0062349410727620125, + 0.009202484041452408, + 0.02163100615143776, + -0.030468149110674858, + 0.0351831279695034, + -0.008561411872506142, + 0.024691607803106308, + 0.020817603915929794, + 0.020210998132824898, + 0.006303873844444752, + -0.002186882309615612, + -0.038409169763326645, + -0.0307163055986166, + 0.029310083016753197, + 0.014186300337314606, + 0.024788113310933113, + -0.03135048225522041, + 0.004011869430541992, + -0.009974527172744274, + -0.01136006973683834, + -0.0030898975674062967, + -0.003045091638341546, + -0.0003642649680841714, + -0.03311515599489212, + -0.012201045639812946, + -0.07025596499443054, + -0.025560157373547554, + -0.03545885905623436, + 0.050237979739904404, + -0.003262228798121214, + -0.01883234828710556, + 0.010208897292613983, + 0.0033242679201066494, + 0.021672366186976433, + 0.053215861320495605, + 0.04615717753767967, + -0.01988012157380581, + 0.009326562285423279, + -0.01669544167816639, + 0.0175915639847517, + -0.062314946204423904, + -0.029199790209531784, + 0.004266919568181038, + 0.005414644721895456, + -0.005966104567050934, + 0.08597256988286972, + 0.00883024837821722, + 0.010215790942311287, + 0.047701265662908554, + 0.0029003333766013384, + -0.017315834760665894, + -0.00414284085854888, + 0.013758919201791286, + 0.03838159516453743, + 0.011718519032001495, + -0.008009952493011951, + 0.06485166400671005, + 0.03228796645998955, + -0.00042738128104247153, + 0.03253612294793129, + 0.04761854559183121, + 0.06430020183324814, + 0.014958344399929047, + 0.09716720134019852, + 0.03374933451414108, + -0.038271304219961166, + 0.0053284792229533195, + 0.024264227598905563, + -0.003560361685231328, + 0.0025797972921282053, + 0.001759501057676971, + 0.012394056655466557, + 0.008713062852621078, + 0.02143799513578415, + -0.03487982600927353, + -0.04111132025718689, + 0.03432836756110191, + -0.004566775634884834, + 0.019177010282874107, + -0.03838159516453743, + -0.007582570891827345, + 0.00090904685202986, + 0.010436374694108963, + 0.05021040514111519, + 0.0066140699200332165, + -0.018735842779278755, + -0.024112574756145477, + -0.006658875849097967, + -0.023023443296551704, + -0.018473898991942406, + 0.010856863111257553, + -0.01042258832603693, + 0.02376791276037693, + -0.023919563740491867, + 0.02298208326101303, + -0.022499555721879005, + 0.009940060786902905, + -0.014269019477069378, + -0.005997124128043652, + 0.006503778044134378, + 0.003667206969112158, + -0.01442067138850689, + 0.015440871939063072, + 0.006538243964314461, + -0.002416082890704274, + -0.03408021107316017, + 0.032122526317834854, + -0.016116410493850708, + -0.013648627325892448, + 0.016268061473965645, + 0.01617155596613884, + 0.007947913371026516, + -0.004439250566065311, + 0.014641255140304565, + 0.003712013131007552, + 0.02163100615143776, + -0.02357490174472332, + 0.0035362353082746267, + -0.029640959575772285, + 0.013524549081921577, + 0.07896903157234192, + -0.015964757651090622, + 0.01851525902748108, + 0.01104298047721386, + 0.007637716829776764, + 0.023671407252550125, + -0.010767250321805477, + -0.024691607803106308, + -0.018363608047366142, + -0.011470361612737179, + -0.02831745520234108, + -0.013972610235214233, + 0.01275939866900444, + 0.035955172032117844, + -0.0003345378499943763, + 0.025546370074152946, + -0.021341489627957344, + 0.012649106793105602, + 0.01818438433110714, + 0.008878501132130623, + -0.0015285772969946265, + -0.06430020183324814, + 0.008009952493011951, + -0.011759878136217594, + -0.029172217473387718, + 0.016212916001677513, + -0.013827851973474026, + 0.019824976101517677, + 0.01837739534676075, + -0.043289586901664734, + -0.0013484912924468517, + -0.027834927663207054, + 0.034466229379177094, + 0.030964462086558342, + 0.05663491040468216, + -0.023395678028464317, + -0.010077926330268383, + 0.0059557645581662655, + 0.01493077166378498, + -0.021065760403871536, + 0.020693525671958923, + -0.031846798956394196, + 0.03283942490816116, + 0.028758622705936432, + -0.005204400978982449, + 0.008740636520087719, + -0.0034793659579008818, + -0.009374815039336681, + 0.0593370646238327, + 0.0005208709044381976, + 0.018597979098558426, + 0.05098244920372963, + -0.00745159899815917, + 0.02143799513578415, + 0.01988012157380581, + -0.004129054490476847, + 0.0018594531575217843, + 0.04486124590039253, + 0.026842301711440086, + -0.01832224801182747, + -0.013042021542787552, + 0.003205359447747469, + -0.004590902011841536, + 0.004011869430541992, + -0.012028714641928673, + -0.02936522848904133, + 0.0008883671252988279, + -0.001980084925889969, + 0.028675904497504234, + 0.031267765909433365, + -0.03281185030937195, + 0.03372175991535187, + 0.01035365555435419, + -0.008127137087285519, + 0.0068346536718308926, + -0.00843733362853527, + 0.024250440299510956, + -0.007610143627971411, + -0.03333573788404465, + 0.0002776685869321227, + 0.044116776436567307, + -0.01657136343419552, + -0.024126362055540085, + 0.0011718518799170852, + -0.01528922002762556, + 0.03998082876205444, + 0.010146858170628548, + 0.022251399233937263, + -0.004587455186992884, + -0.03306001052260399, + -0.01688845269382, + -0.011939102783799171, + -0.013552121818065643, + -0.05103759467601776, + -0.0030554314143955708, + 0.012028714641928673, + 0.03314272686839104, + 0.015178928151726723, + -0.0002248921518912539, + 0.004094588104635477, + -0.028400175273418427, + 0.007065577432513237, + -0.0038326450157910585, + 0.014269019477069378, + -0.04395133629441261, + 0.0009099085000343621, + 0.015744173899292946, + -0.02980639599263668, + -0.014848052524030209, + 0.0023816165048629045, + 0.0112015251070261, + -0.02565666288137436, + -0.002946862718090415, + -0.003594827838242054, + -0.030936889350414276, + -0.032508548349142075, + -0.016847094520926476, + -0.032508548349142075, + 0.00782383419573307, + 0.018804775550961494, + 0.011373856104910374, + 0.018225742504000664, + -0.0343007929623127, + 0.029199790209531784, + 0.03394234552979469, + 0.026318414136767387, + 0.018225742504000664, + -0.05994366854429245, + 0.015440871939063072, + 0.011242884211242199, + -0.009905594401061535, + -0.018349820747971535, + -0.05236109718680382, + -0.013531442731618881, + 0.037251103669404984, + 0.006348679773509502, + -0.0006940637249499559, + 0.042765699326992035, + 5.923883509240113e-05, + -0.006486544851213694, + -0.04138705134391785, + -0.019397594034671783, + 0.031185045838356018, + -0.019852548837661743, + -0.012428523041307926, + 0.01220793928951025, + -0.010980941355228424, + 0.05489781126379967, + -0.025146562606096268, + 0.020100705325603485, + 0.01954924687743187, + 0.027765996754169464, + 0.008754422888159752, + 0.02611161582171917, + -0.007065577432513237, + -0.03890548273921013, + 0.013662413693964481, + -0.03292214497923851, + -0.030688732862472534, + -0.040808018296957016, + -0.0181154515594244, + 0.003894684137776494, + 0.0032398258335888386, + 1.929301106429193e-05, + 0.004518522880971432, + 0.014034649357199669, + -0.0011623736936599016, + 0.029503094032406807, + 0.0009805642766878009, + -0.016405925154685974, + 0.03259126842021942, + -0.00886471476405859, + 0.014765333384275436, + 0.008733742870390415, + -0.06727807968854904, + 0.0004937287885695696, + 0.007754901889711618, + 0.013876104727387428, + -0.01376581285148859, + 0.02369897998869419, + 0.036975372582674026, + -0.009629865176975727, + -0.07516396045684814, + 0.007596357259899378, + -0.03995325416326523, + 0.034962546080350876, + -0.018915068358182907, + 0.011677158996462822, + -0.004680514335632324, + 0.025753168389201164, + -0.013510762713849545, + -0.033859625458717346, + -0.004756339825689793, + -0.010112391784787178, + 0.00925762951374054, + -0.016667868942022324, + -0.019245943054556847, + 0.01746748574078083, + -0.009423067793250084, + -0.0010262320283800364, + -0.003763712476938963, + 0.014055329374969006, + 0.011815023608505726, + -0.00825121533125639, + -0.01954924687743187, + 0.013331538066267967, + 0.009002579376101494, + -0.011828810907900333, + -0.0027762548997998238, + -0.011925316415727139, + -0.019893908873200417, + -0.020555660128593445, + 0.018018946051597595, + 0.0005910958861932158, + -0.024760540574789047, + -0.014985917136073112, + -0.029392801225185394, + -0.05999881401658058, + -0.03181922435760498, + 0.006231494713574648, + -0.017481273040175438, + -0.03612060844898224, + 0.001985254930332303, + 0.007430919446051121, + -0.008451119996607304, + 0.017095251008868217, + 0.01786729507148266, + -0.04014626517891884, + -0.016998745501041412, + 0.048142433166503906, + 0.015675241127610207, + 0.060109108686447144, + 0.010608705691993237, + 0.018349820747971535, + 0.023326745256781578, + 0.0161026231944561, + -0.017743214964866638, + 0.0034948757383972406, + -0.016350779682397842, + -0.045357558876276016, + -0.056910641491413116, + -0.02649763785302639, + 0.014448244124650955, + -0.00903015211224556, + -0.030550867319107056, + 0.006962178740650415, + 0.014096688479185104, + -0.007203442510217428, + 0.031157473102211952, + -0.023202667012810707, + -0.038023147732019424, + 0.017246901988983154, + -0.008402867242693901, + 0.01093958131968975, + -0.011801237240433693, + -0.0036741001531481743, + 0.017122823745012283, + -0.01552359014749527, + 0.042434822767972946, + 0.012869690544903278, + -0.009168017655611038, + -0.02955823950469494, + -0.010560452938079834, + 0.01428280584514141, + -0.0070138778537511826, + -0.010450161062180996, + -0.033087581396102905, + 0.03234311193227768, + 0.029916688799858093, + -0.038740042597055435, + -0.015316792763769627, + 0.00948510691523552, + 0.017329620197415352, + 0.007368880324065685, + 0.021065760403871536, + -0.01000209990888834, + 0.011994248256087303, + 0.0174123402684927, + -0.003076111199334264, + -0.009850448928773403, + -0.021217411383986473, + -0.013648627325892448, + 0.03940179571509361, + 0.09038424491882324, + 0.018556619063019753, + 0.018983999267220497, + -0.011883956380188465, + -0.006962178740650415, + 0.011939102783799171, + -0.03294971585273743, + -0.010215790942311287, + -0.011456575244665146, + 0.010787930339574814, + -0.023326745256781578, + -0.010519093833863735, + 0.0307163055986166, + -0.02942037582397461, + 0.02864833176136017, + 0.005452557932585478, + 0.03245340287685394, + -0.012669786810874939, + 0.0026022004894912243, + -0.012021820992231369, + -0.015109995380043983, + 0.02287179045379162, + 0.018611764535307884, + -0.01778457500040531, + -0.007989272475242615, + 0.003953276667743921, + -0.014269019477069378, + 0.005738627631217241, + 0.017688069492578506, + 0.0039222571067512035, + -0.004011869430541992, + 0.026318414136767387, + -0.057241518050432205, + 0.03636876866221428, + 0.003041644813492894, + 0.02999940700829029, + -0.008147817105054855, + 0.0016095730243250728, + -0.0509273037314415, + 0.031984660774469376, + 0.007692862767726183, + -0.006159115582704544, + 0.04703951254487038, + 0.012835224159061909, + -0.013683093711733818, + 0.0009564378997310996, + -0.011690945364534855, + 0.023547329008579254, + 0.017632924020290375, + -0.010967154987156391, + 0.021837804466485977, + -0.010856863111257553, + -0.010870649479329586, + -0.022265184670686722, + 0.021644793450832367, + -0.03909849375486374, + -0.00730684120208025, + 0.035238273441791534, + -0.050237979739904404, + 0.0126008540391922, + -0.022954510524868965, + -0.03862975165247917, + 0.006545137148350477, + -0.016350779682397842, + 0.03187436982989311, + -0.00600746413692832, + 0.02142420969903469, + -0.003877450944855809, + -0.01825331524014473, + 0.027628131210803986, + -0.027131816372275352, + -0.010057246312499046, + -0.012476775795221329, + -0.02376791276037693, + -0.03424564749002457, + -0.054125770926475525, + -0.03253612294793129, + -0.01007103268057108, + -0.009533359669148922, + 0.012704253196716309, + 0.0007280991412699223, + 0.034659240394830704, + 0.056138597428798676, + -0.008781995624303818, + 0.026925019919872284, + -0.0027211089618504047, + -0.04615717753767967, + 0.05241624265909195, + -0.020927894860506058, + 0.04072529822587967, + 0.03771984204649925, + -0.029144644737243652, + 0.02266499400138855, + -0.0054284315556287766, + -0.022223826497793198, + -0.006017804145812988, + -0.021672366186976433, + -0.0018146471120417118, + 0.029723677784204483, + -0.01617155596613884, + 0.07279267907142639, + 0.018156809732317924, + -0.01139453612267971, + -0.013827851973474026, + 0.05288498476147652, + -0.02363004721701145, + -0.0027693617157638073, + -0.004018762614578009, + -0.0070586842484772205, + -0.010208897292613983, + -0.007775581907480955, + 0.006982858292758465, + -0.01282833144068718, + 0.015826893970370293, + -0.04825272411108017, + 0.02604268491268158, + 0.025298213586211205, + -0.023464610800147057, + -0.015895826742053032, + -0.006827760487794876, + 0.004925224464386702, + -0.05131332576274872, + 0.045109402388334274, + 0.015882039442658424, + -0.022430622950196266, + 0.013627948239445686, + 0.018294675275683403, + 0.012028714641928673, + 0.007134509738534689, + 0.006048823706805706, + -0.0035465750843286514, + 0.03052329458296299, + 0.038409169763326645, + -0.013627948239445686, + -0.026538997888565063, + -0.009926274418830872, + -0.05117546021938324, + 0.014269019477069378, + 0.010098605416715145, + 0.0035672548692673445, + 0.021520715206861496, + -0.03890548273921013, + 0.019204584881663322, + -0.009312775917351246, + -0.02947552129626274, + -0.029117072001099586, + 0.01967332512140274, + -0.014875625260174274, + 0.015151355415582657, + -0.0034965991508215666, + -0.003093344159424305, + 0.012290658429265022, + 0.0026607930194586515, + 0.025298213586211205, + -0.04067015275359154, + 0.05696578696370125, + -0.020569447427988052, + 0.04604688659310341, + 0.0264287069439888, + 0.01337979082018137, + 0.007361987140029669, + 0.003701673122122884, + 0.0009883191669359803, + 0.03920878469944, + 0.03871247172355652, + 0.03176407888531685, + -0.029172217473387718, + 0.017757002264261246, + 0.007727329153567553, + 0.005752413999289274, + -0.017881080508232117, + 0.014393097721040249, + 0.020183425396680832, + 0.006241834256798029, + -0.014020862989127636, + 0.016971172764897346, + 0.011615119874477386, + 0.00023329330724664032, + 0.030082127079367638, + -0.015027277171611786, + 0.005111342296004295, + -0.0020386776886880398, + 0.019852548837661743, + -0.04885932803153992, + -0.024512384086847305, + 0.023933351039886475, + -0.0024695054162293673, + 0.05713122338056564, + -0.02117605321109295, + 0.03962237760424614, + -0.010932688601315022, + -0.010167538188397884, + -0.004487503319978714, + -0.024002283811569214, + -0.004956244025379419, + -0.033804479986429214, + 0.0008383910753764212, + -0.0058316863141953945, + -0.023685194551944733, + 0.03612060844898224, + -0.017053890973329544, + -0.010794823989272118, + -0.01298687607049942, + -0.006307320203632116, + 0.004222113173455, + 0.009953847154974937, + 0.011987355537712574, + -0.019563032314181328, + -0.011346283368766308, + 0.04695679247379303, + 0.0013062701327726245, + -0.01337979082018137, + -0.024043641984462738, + -0.015234074555337429, + -0.012876584194600582, + -0.01509620901197195, + 0.006827760487794876, + -0.01026404369622469, + -0.020803816616535187, + 0.012731825932860374, + 0.003320821328088641, + -0.006286640651524067, + 0.01555116381496191, + 0.004907991271466017, + -0.0029347995296120644, + 0.03625847399234772, + -0.0076859695836901665, + 0.03038542903959751, + -0.0023626601323485374, + -0.037499260157346725, + 0.0024574422277510166, + -0.009298989549279213, + -0.030357856303453445, + 0.04993467405438423, + -0.01016064453870058, + 0.016474857926368713, + 0.025863459333777428, + -0.03410778194665909, + 0.031074754893779755, + 0.01528922002762556, + -0.011911529116332531, + -0.028786195442080498, + 0.0264287069439888, + 0.018983999267220497, + -0.006658875849097967, + -0.004556435626000166, + -0.030799023807048798, + -0.00867170374840498, + 0.011808130890130997, + 0.04709465801715851, + 0.006383146159350872, + -0.0413043312728405, + -0.00987112894654274, + 0.01007103268057108, + 0.03499011695384979, + -0.023023443296551704, + 0.0030261350329965353, + 0.016971172764897346, + -0.0015837233513593674, + -0.01909429207444191, + 0.030440574511885643, + 0.03176407888531685, + -0.010408801957964897, + 0.032232820987701416, + 0.0166265107691288, + -0.008299468085169792, + -0.03876761719584465, + 0.016998745501041412, + 0.0017302047926932573, + -0.05611102283000946, + -0.016585150733590126, + -0.016392139717936516, + -0.013166100718080997, + -0.004918331280350685, + 0.0341353565454483, + 0.007334413938224316, + -0.044392507523298264, + 0.022320332005620003, + 3.7697441257478204e-06, + -0.011573760770261288, + -0.0025349913630634546, + -0.017495058476924896, + -0.016902239993214607, + 0.0030313050374388695, + -0.015440871939063072, + 0.008947433903813362, + 0.00568003486841917, + 0.004876971710473299, + 0.00021336751524358988, + -0.03085416927933693, + 0.02994426153600216, + 0.022775284945964813, + -0.012780078686773777, + -0.01182191725820303, + 0.03818858414888382, + -0.022058388218283653, + 0.043675608932971954, + 0.0231888797134161, + 0.00883024837821722, + 0.025284426286816597, + 0.0006359019898809493, + -0.008582091890275478, + -0.012421629391610622, + -0.03157106786966324, + 0.0196871105581522, + 0.0014915261417627335, + 0.016833307221531868, + 0.005628335755318403, + 0.015537377446889877, + -0.018294675275683403, + 0.009202484041452408, + 0.013683093711733818, + 0.00987112894654274, + 0.00812024436891079, + -0.020665952935814857, + -0.015054849907755852, + 0.021479355171322823, + -0.03918121010065079, + 0.007175869308412075, + 0.04193850979208946, + 0.006800187285989523, + -0.010291616432368755, + 0.017246901988983154, + 0.006648535840213299, + -0.006024697329849005, + 0.022030815482139587, + -0.016667868942022324, + 0.021768871694803238, + -0.0011055043432861567, + 0.002965819090604782, + -0.007048344239592552, + 0.00016996159683912992, + -0.0019042593194171786, + 0.022499555721879005, + 0.03774741664528847, + 0.03493497148156166, + 0.022265184670686722, + -0.009519573301076889, + 0.004442697390913963, + 0.011291136965155602, + -0.001296791946515441, + 0.0042600263841450214, + -0.02558773010969162, + -0.009505786933004856, + 0.0397326722741127, + -0.035624295473098755, + -0.024443451315164566, + 0.008306361734867096, + 0.00843733362853527, + 0.012731825932860374, + 0.04265540838241577, + 0.004525416065007448, + 0.01694360002875328, + -0.009884915314614773, + 0.005101002287119627, + -0.022747712209820747, + -0.003176063299179077, + 0.04905233904719353, + -0.01022268459200859, + -0.015316792763769627, + 0.003045091638341546, + -0.01974225789308548, + 0.0031588301062583923, + 0.010656958445906639, + 0.00957471877336502, + -0.005890279076993465, + 0.008685490116477013, + -0.021065760403871536, + 0.024195294827222824, + 0.006248727906495333, + -0.024181507527828217, + -0.031019607558846474, + -0.0023213005624711514, + -0.01806030422449112, + -0.011415216140449047, + 0.003956723492592573, + 0.0216172207146883, + 0.01322124619036913, + -0.015109995380043983, + 0.013110954314470291, + 0.018363608047366142, + 0.014627468772232533, + -0.03410778194665909, + -0.012924836948513985, + 0.021217411383986473, + 0.0015820000553503633, + -0.004577115643769503, + 0.01093958131968975, + 0.007065577432513237, + 0.0032191460486501455, + -0.013793385587632656, + -0.006269407458603382, + -0.01035365555435419, + 0.027765996754169464, + 0.007334413938224316, + -0.010560452938079834, + 0.02363004721701145, + -0.022251399233937263, + -0.03805071860551834, + -0.011746091768145561, + 0.019507886841893196, + -0.002674579620361328, + -0.04215909540653229, + -0.019438954070210457, + -0.0025091415736824274, + 0.0026642396114766598, + 0.0011425556149333715, + -0.00801684521138668, + -0.012649106793105602, + 0.014007076621055603, + -0.01213900651782751, + -0.0062246015295386314, + 0.008520052768290043, + 0.0539051853120327, + -0.023133734241127968, + -0.013428043574094772, + -0.023271599784493446, + -0.026594143360853195, + -0.017426125705242157, + -0.011029194109141827, + -0.01528922002762556, + 0.017095251008868217, + -0.011897742748260498, + 0.002460888819769025, + -0.0064589716494083405, + 0.003691333346068859, + -0.01146346889436245, + 0.00046787908650003374, + -0.025573942810297012, + -0.01380027923732996, + -0.01629563421010971, + -0.017839720472693443, + 0.0033621808979660273, + -0.02656657062470913, + -0.0013657243689522147, + 0.027421332895755768, + 0.021865377202630043, + -0.018790990114212036, + -0.021768871694803238, + 0.003131257137283683, + 0.010787930339574814, + 0.02415393479168415, + 0.027311041951179504, + -0.014406885020434856, + -0.005697268061339855, + -0.008347720839083195, + 0.03181922435760498, + -0.01127045787870884, + -0.025022484362125397, + 0.02252712845802307, + -0.04290356487035751, + -0.006507224403321743, + 0.009443746879696846, + -0.007148296572268009, + 0.010712104849517345, + -0.017370980232954025, + -0.0036947799380868673, + 0.023340532556176186, + -0.013621054589748383, + 0.017302047461271286, + -0.05657976493239403, + -0.02474675327539444, + -0.009464426897466183, + 0.016805734485387802, + -0.018267102539539337, + 0.04122161120176315, + -0.014875625260174274, + -0.012897263281047344, + -0.044254641979932785, + -0.009733263403177261, + 0.017439913004636765, + -0.03645148500800133, + -0.03752683103084564, + 0.004353085067123175, + 0.0022334118839353323, + -0.004632261581718922, + -0.0002496647648513317, + 0.018722057342529297, + -0.003095067571848631, + -0.011497934348881245, + 0.04759097099304199, + 0.02130013145506382, + -0.0034380066208541393, + 0.018983999267220497, + -0.018391180783510208, + -0.012683573178946972, + -0.005042409524321556, + -0.031846798956394196, + 0.00840975996106863, + -0.022044600918889046, + -0.04105617478489876, + -0.0066071767359972, + -0.00014572753570973873, + 0.013069595210254192, + 0.012745612300932407, + 0.0015432254876941442, + 0.004677067510783672, + -0.012276871129870415, + -0.05456693843007088, + 0.022913150489330292, + -0.03206738084554672, + 0.019507886841893196, + 0.0064451852813363075, + 0.017095251008868217, + -0.01629563421010971, + 0.009161124005913734, + -0.014792906120419502, + -0.0006996644660830498, + 0.005645568482577801, + 0.03824372962117195, + -0.017881080508232117, + -0.01253192126750946, + -0.006448631640523672, + -0.033087581396102905, + -0.008630344644188881, + 0.04135947674512863, + 0.02287179045379162, + -0.021079547703266144, + -0.01000209990888834, + 0.030440574511885643, + -0.0011658202856779099, + 0.0020645272452384233, + 0.011918422766029835, + 0.007968592457473278, + -0.008299468085169792, + -0.006831206846982241, + 0.0012494008988142014, + 0.04193850979208946, + 0.029199790209531784, + 0.04011869430541992, + 0.02662171609699726, + -0.009636757895350456, + -0.014985917136073112, + 0.017646709457039833, + 0.006431398913264275, + -0.009774623438715935, + -0.013297071680426598, + 0.012573281303048134, + 0.0218791626393795, + 0.006469311658293009, + -0.03774741664528847, + -0.018942641094326973, + -0.026980165392160416, + -0.013524549081921577, + -0.00237127672880888, + -0.004239346366375685, + -0.0026090936735272408, + -0.01851525902748108, + 0.04248996824026108, + 0.01000209990888834, + 0.019066719338297844, + 0.019728470593690872, + 0.008775102905929089, + 0.02163100615143776, + 0.010905115865170956, + -0.014792906120419502, + 0.0378025621175766, + -0.006693342234939337, + 0.022968295961618423, + -0.0043806578032672405, + -0.02487083151936531, + 0.011139485985040665, + 0.009788409806787968, + 0.002228241879492998, + -0.0036947799380868673, + 0.018101664260029793, + 0.001983531517907977, + 0.007623930461704731, + -0.011525508016347885, + 0.04574358090758324, + -0.0018284335965290666, + 0.003856771159917116, + 0.015413298271596432, + -0.022292757406830788, + -0.006045376881957054, + 0.02655278518795967, + 0.01668165624141693, + 0.03661692515015602, + -0.02864833176136017, + -0.010705211199820042, + -0.021148478612303734, + 0.03209495544433594, + -0.0003541405312716961, + 0.012221725657582283, + 0.006355572957545519, + -0.021961882710456848, + -0.011684052646160126, + 0.003722352907061577, + -0.00348281254991889, + -0.0343007929623127, + 0.033611468970775604, + 0.010098605416715145, + -0.011029194109141827, + 0.04378589987754822, + 0.01688845269382, + -0.012132113799452782, + -0.03372175991535187, + -0.017260689288377762, + -0.03940179571509361, + -0.03592760115861893, + -0.006703681778162718, + -0.012318231165409088, + 0.018749630078673363, + -0.04648805409669876, + -0.01104298047721386, + -0.009230056777596474, + 0.0036258476320654154, + 0.002521204762160778, + 0.013469402678310871, + 0.013083381578326225, + -0.029640959575772285, + -0.037251103669404984, + 0.00493556447327137, + -0.021217411383986473, + -0.01078103668987751, + 0.04317929595708847, + -0.04124918580055237, + -0.006138435564935207, + 0.038877908140420914, + 0.023216452449560165, + -0.005728287622332573, + -0.0008694106945767999, + -0.01986633613705635, + -0.00745159899815917, + 0.03369418904185295, + -0.03157106786966324, + -0.0034810893703252077, + -0.0042600263841450214, + 0.02423665300011635, + 0.004646047949790955, + -0.020031774416565895, + -0.02936522848904133, + -0.020431581884622574, + -0.006565817166119814, + 0.006769167724996805, + -0.0006811388884671032, + -0.016309421509504318, + -0.012538814917206764, + -0.012917943298816681, + 0.049190204590559006, + 0.011794344522058964, + -0.026208121329545975, + 0.0003905454941559583, + 0.03545885905623436, + -0.026208121329545975, + 0.014751547016203403, + 0.014269019477069378, + 0.02558773010969162, + 0.026401132345199585, + 0.008947433903813362, + 0.00392915029078722, + -0.05357430875301361, + 0.009112871252000332, + 0.01299376878887415, + -0.011118805967271328, + 0.011711625382304192, + 0.007610143627971411, + -0.008526945486664772, + 0.0022540914360433817, + -0.0018112004036083817, + 0.0504034161567688, + 0.012304444797337055, + -0.019563032314181328, + 0.03507283702492714, + 0.05735180899500847, + 0.010636279359459877, + -0.0029606493189930916, + 0.020238570868968964, + -0.005369838792830706, + 0.02422286756336689, + 0.014103582128882408, + -0.030964462086558342, + 0.01974225789308548, + -0.02135527692735195, + 0.02884134277701378, + -0.01078103668987751, + -0.008699276484549046, + 0.01766049675643444, + -0.004484056495130062, + -0.0051630414091050625, + -0.03013727255165577, + -0.018294675275683403, + -0.02709045819938183, + -0.006338339764624834, + -0.023740340024232864, + -0.004318618681281805, + ], + "index": 64, + }, + { + "title": "Governor General's Award for French-language poetry", + "text": "This is a list of recipients of the Governor General's Award for French-language poetry. The award was created in 1981 when the Governor General's Award for French language poetry or drama was divided.", + "vector": [ + 0.011040100827813148, + -0.0014217814896255732, + -0.018122799694538116, + 0.014702661894261837, + -0.006384912878274918, + -0.0030761584639549255, + -0.0032432342413812876, + 0.006794412154704332, + 0.006807515863329172, + 0.026050705462694168, + -0.022460216656327248, + -0.016642050817608833, + -0.0016920510679483414, + -0.014178503304719925, + 0.015410277061164379, + -0.013018800877034664, + 0.013536408543586731, + -0.006800964009016752, + -0.03168541565537453, + 0.004730535671114922, + -0.012494642287492752, + -0.001723172958008945, + 0.03121367283165455, + -0.00821619387716055, + 0.04714810848236084, + 0.006715788040310144, + -0.02601139433681965, + -0.01805727928876877, + 0.019249742850661278, + 0.023495430126786232, + 0.024124421179294586, + -0.0025388954672962427, + -0.02040289156138897, + -0.015619940124452114, + -0.01520061306655407, + -0.04439627379179001, + 0.004478284157812595, + 0.07804728299379349, + -0.011590467765927315, + -0.08517584949731827, + 0.002679763361811638, + -0.021700184792280197, + 0.034384835511446, + -0.015711668878793716, + 0.013058112934231758, + -0.016458595171570778, + -0.0034561739303171635, + -0.0012506108032539487, + 0.010325933806598186, + 0.023390598595142365, + 0.030086731538176537, + 0.011498739942908287, + -0.022853335365653038, + 0.020180124789476395, + 0.02395406924188137, + 0.00837344117462635, + 0.047331564128398895, + 0.05317593738436699, + 0.034620705991983414, + -0.03684838116168976, + -0.07783762365579605, + -0.016694465652108192, + -0.013156392611563206, + -0.02396717295050621, + 0.009467623196542263, + 0.004904163535684347, + -0.017467601224780083, + 0.05220624431967735, + -0.011446324177086353, + 0.024268565699458122, + 0.0024357016663998365, + -0.03181645646691322, + -0.03037501871585846, + -0.04743639752268791, + -0.010679741390049458, + 0.017716577276587486, + 0.016668258234858513, + -0.036507681012153625, + 0.002131034154444933, + -0.003226854372769594, + -0.01141356397420168, + 0.03593110293149948, + -0.027282480150461197, + -0.0031793524976819754, + -0.00777065847069025, + -0.04421281814575195, + 0.01800486445426941, + -0.03228819742798805, + 0.006715788040310144, + 0.008681384846568108, + -0.005687125958502293, + 0.020953258499503136, + 0.04837988317012787, + 0.019315261393785477, + 0.029693610966205597, + -0.018502814695239067, + 0.0576050840318203, + -0.02551344223320484, + 0.001306302729062736, + -0.04405556991696358, + -0.04670257493853569, + -0.06662061810493469, + -0.02162156254053116, + 0.0044356961734592915, + 0.027465935796499252, + 0.01841108687222004, + -0.022551944479346275, + -0.07862386107444763, + 0.029850859194993973, + 0.028671501204371452, + -0.018948350101709366, + 0.03365101292729378, + -0.018515920266509056, + -0.008832080289721489, + 0.03042743355035782, + 0.028592877089977264, + -0.007927905768156052, + 0.014270231127738953, + -0.023652678355574608, + -0.04667636379599571, + -0.025303779169917107, + -0.036533888429403305, + -0.024281669408082962, + 0.012435673736035824, + -0.014348854310810566, + -0.0005507765454240143, + 0.017323456704616547, + 0.031790249049663544, + -0.002063876250758767, + 0.009008984081447124, + -0.03794911876320839, + 0.003931193146854639, + -0.03716287761926651, + 0.02202778495848179, + -0.021778808906674385, + -0.01340536866337061, + -0.02242090366780758, + -0.03524969890713692, + -0.028619086369872093, + -0.01959044486284256, + 0.0066928560845553875, + -0.0030892626382410526, + 0.07175737619400024, + -0.07317260652780533, + -0.022067097947001457, + 0.0024127697106450796, + 0.0040556807070970535, + 0.015121988952159882, + 0.02356095053255558, + 0.018935246393084526, + 0.011918067000806332, + -0.008419305086135864, + 0.025461027398705482, + -0.009900054894387722, + 0.01961665414273739, + 0.0494806170463562, + 0.058076824992895126, + 0.01919732615351677, + 0.028645293787121773, + 0.025487234815955162, + -0.061326611787080765, + -0.020560139790177345, + 0.007875490002334118, + 0.03042743355035782, + -0.03504003584384918, + -0.030139146372675896, + 0.014466790482401848, + 0.0033677220344543457, + -0.012527401559054852, + 0.009126920253038406, + 0.026548657566308975, + 0.011007340624928474, + 0.05207520350813866, + -0.05755266547203064, + -0.034148965030908585, + -0.009657630696892738, + -0.02073049172759056, + 0.032524071633815765, + -0.01679929904639721, + 0.07002764940261841, + 0.018227631226181984, + -0.0016191601753234863, + 0.023809926584362984, + -0.04746260493993759, + -0.04743639752268791, + 0.003813257208094001, + 0.04434385895729065, + 0.026863152161240578, + -0.02403269335627556, + 0.014846805483102798, + -0.010456973686814308, + -0.049690280109643936, + 0.020953258499503136, + -0.054302878677845, + 0.056504350155591965, + 0.017651056870818138, + 0.0041113728657364845, + -0.019026974216103554, + -0.024137524887919426, + -0.024884451180696487, + 0.06253217905759811, + -0.02675832062959671, + -0.04140856862068176, + -0.02833079732954502, + 0.04594254121184349, + 0.025251364335417747, + 0.008248953148722649, + 0.01497784536331892, + -0.050922054797410965, + 0.008111361414194107, + -0.005922997370362282, + -0.036507681012153625, + -0.016576530411839485, + -0.007305467035621405, + 0.022984376177191734, + 0.007914802059531212, + -0.019367678090929985, + 0.02080911584198475, + -0.004173616413027048, + -0.03147575259208679, + 0.026234161108732224, + 0.021333273500204086, + -0.01461093407124281, + -0.00430465629324317, + 0.016864817589521408, + -0.08480893820524216, + -0.03587868809700012, + 0.0606452040374279, + -0.01592133194208145, + -0.03509245067834854, + -0.04022920876741409, + -0.01995735615491867, + 0.0025601894594728947, + 7.713942613918334e-05, + -0.013241568580269814, + -0.025290675461292267, + -0.04620462283492088, + -0.017402080819010735, + 0.05419804900884628, + -0.009290719404816628, + -0.05828648805618286, + 0.01961665414273739, + -0.017441393807530403, + 0.025644483044743538, + 0.0051072752103209496, + 0.00036424960126169026, + -0.021031882613897324, + 0.013811592012643814, + -0.012658441439270973, + 0.02354784682393074, + 0.006650268100202084, + -0.015711668878793716, + -0.0219491608440876, + -0.02083532325923443, + -0.04400315508246422, + -0.010699396952986717, + 0.053280770778656006, + 0.018437296152114868, + 0.041382357478141785, + 0.019302157685160637, + 0.014768182300031185, + 0.006859932094812393, + -0.020284956321120262, + 0.02911703661084175, + -0.06289909034967422, + -0.009388999082148075, + 0.03435862809419632, + -0.021673977375030518, + -0.003551177680492401, + -0.03721529617905617, + -0.07443059235811234, + -0.008904152549803257, + -0.0034758299589157104, + -0.020193228498101234, + -0.0012735427590087056, + 0.06494330614805222, + -0.004533975850790739, + -0.012304633855819702, + 0.06531021744012833, + 0.0033366000279784203, + 0.0023472497705370188, + -0.06321358680725098, + -0.007076147478073835, + -0.017008962109684944, + 0.02192295342683792, + -0.004651912022382021, + 0.01869937591254711, + 0.04439627379179001, + -0.034201379865407944, + -0.05440771207213402, + 0.03962642699480057, + 0.04830125719308853, + 0.020127708092331886, + -0.059754133224487305, + -0.01801796816289425, + 0.06326600164175034, + -0.00399343715980649, + 0.006610956508666277, + -0.03422758728265762, + 0.029483947902917862, + 0.02395406924188137, + 0.048170220106840134, + -0.02561827562749386, + -0.04025541618466377, + -0.001466007437556982, + -0.04245688393712044, + -0.007764106150716543, + 0.03042743355035782, + 0.030112938955426216, + 0.029012205079197884, + -0.027649391442537308, + 0.002614243421703577, + 0.02956257201731205, + -0.02922186814248562, + -0.015436484478414059, + -0.006918899714946747, + 0.004281724337488413, + 0.005238314624875784, + 0.034987617284059525, + -0.0060376571491360664, + 0.06468123197555542, + -0.009323479607701302, + -0.0026453654281795025, + -0.006722340360283852, + 0.02875012531876564, + 0.0038230852223932743, + -0.01475507766008377, + -0.021857433021068573, + -0.028881164267659187, + -0.009736254811286926, + -0.01956423744559288, + -0.038499485701322556, + 0.005798509810119867, + -0.04646670073270798, + 0.05270419642329216, + 0.005221934989094734, + -0.007547890767455101, + 0.002404579659923911, + 0.025277571752667427, + -0.031737830489873886, + 0.0017886928981170058, + 0.009388999082148075, + 0.04992615059018135, + 0.03611455857753754, + -0.004678119905292988, + -0.03766082972288132, + -0.04206376522779465, + -0.025867249816656113, + 0.010135926306247711, + 0.0022276761010289192, + 0.00044676370453089476, + 0.04903507977724075, + 0.019498717039823532, + 0.028068717569112778, + -0.04560184106230736, + -0.011223556473851204, + 0.04562804847955704, + -0.006807515863329172, + -0.0015896762488409877, + -0.01997045986354351, + 0.0018149007810279727, + 0.03988850489258766, + -0.03351997211575508, + 0.06436673551797867, + 0.014820598065853119, + -0.058129239827394485, + -0.025788625702261925, + -0.011492188088595867, + -0.007593754678964615, + -0.03582627326250076, + -0.00778376217931509, + 0.07338227331638336, + -0.00838654488325119, + -0.026967983692884445, + 0.000793200102634728, + -0.0359048955142498, + -0.032183367758989334, + 0.011046652682125568, + -0.02358715794980526, + -0.02597208134829998, + -0.001294017769396305, + 0.021857433021068573, + -0.00748892268165946, + 0.04392452910542488, + 0.0021998300217092037, + -0.0038787771482020617, + 0.019459405913949013, + -0.020664971321821213, + 0.04908749833703041, + -0.06358049809932709, + -0.03160679340362549, + -0.002106464235112071, + 0.005346422549337149, + -0.04505147412419319, + -0.02277471125125885, + 6.96660645189695e-05, + 0.01714000105857849, + -0.00777065847069025, + 0.028199758380651474, + 0.005598674062639475, + 0.005136759020388126, + 0.00429810443893075, + -0.05393596738576889, + 0.03116125613451004, + -0.013510200195014477, + 0.003865673206746578, + 0.030453642830252647, + -0.01340536866337061, + -0.008072049356997013, + 0.015606836415827274, + -0.012226010672748089, + 0.04203755781054497, + -0.0024357016663998365, + 0.04633566364645958, + 0.04077957570552826, + -0.00489105936139822, + 0.03202611953020096, + 0.03522349148988724, + -0.015672355890274048, + 0.006646992173045874, + 0.01679929904639721, + 0.04646670073270798, + -0.030925385653972626, + 0.04075336828827858, + 0.04167064651846886, + 0.011708403006196022, + 0.028854956850409508, + 0.030191563069820404, + 0.031082633882761, + -0.010784572921693325, + 0.012710857205092907, + 0.007397194858640432, + 0.028540462255477905, + 0.07705138623714447, + -0.009487279690802097, + 0.007082699332386255, + -0.052966274321079254, + 0.00689269183203578, + 0.03247165307402611, + 0.0028222689870744944, + -0.02002287656068802, + -0.010515941306948662, + -0.0624273456633091, + -0.01517440564930439, + -0.00836033746600151, + -0.03624559938907623, + -0.02872391790151596, + -0.016458595171570778, + 0.02204088866710663, + -0.018070384860038757, + 0.04308587685227394, + 0.0022014682181179523, + 0.016537219285964966, + -0.044920433312654495, + 0.001063060131855309, + 0.043374162167310715, + -0.026863152161240578, + -0.007148219272494316, + -0.039731256663799286, + 0.02838321402668953, + -0.028121134266257286, + 0.021411897614598274, + -0.043714866042137146, + 0.02192295342683792, + 0.03593110293149948, + 0.051341380923986435, + -0.05550844594836235, + -0.0044356961734592915, + -0.011066308245062828, + -0.013392264023423195, + -0.009297271259129047, + 0.0006728073349222541, + -0.02838321402668953, + 0.00017915593343786895, + 0.04153960570693016, + 0.01238325797021389, + 0.013654343783855438, + 0.04405556991696358, + -0.009028639644384384, + 0.06641095131635666, + 0.03475174680352211, + -0.03344134986400604, + 0.021044986322522163, + 0.010686293244361877, + -0.0017198969144374132, + -0.07516441494226456, + -0.0050908951088786125, + -0.04321691393852234, + -0.010738709010183811, + 0.05388355255126953, + 0.005005719140172005, + 0.027361104264855385, + 0.00344306998886168, + -0.04222101345658302, + -0.002615881385281682, + 0.02555275522172451, + -0.012992593459784985, + -0.0019492165884003043, + -0.0031416784040629864, + -0.02202778495848179, + 0.021293962374329567, + -0.004127752501517534, + 0.018175216391682625, + 0.0018558506853878498, + 0.022302968427538872, + -0.006021277513355017, + -0.018961453810334206, + 0.021503625437617302, + -0.007659274619072676, + 0.01239636167883873, + -0.011230108328163624, + 0.028645293787121773, + -0.044134195894002914, + 0.01140046026557684, + 0.016209619119763374, + 0.04431765154004097, + 0.015488900244235992, + -0.00047092416207306087, + -0.02641761675477028, + -0.0015831241616979241, + 0.029274284839630127, + 0.009913158603012562, + -0.0176379531621933, + 0.013005697168409824, + -0.015056469477713108, + 0.028592877089977264, + -0.026168642565608025, + 0.0375559963285923, + -0.007292363326996565, + -0.006971315480768681, + -0.003885329235345125, + -0.026915568858385086, + 0.000904993386939168, + 0.011066308245062828, + 0.007862386293709278, + 0.013241568580269814, + -0.012815689668059349, + -0.046912238001823425, + 0.00896312016993761, + 0.018568335101008415, + 0.011374251917004585, + -0.025880353525280952, + -0.032550279051065445, + -0.02111050672829151, + 0.0006597033352591097, + 0.003941020928323269, + 0.020284956321120262, + -0.0005810794536955655, + 0.0033054782543331385, + -0.009945918805897236, + -0.02751835063099861, + -0.03239303082227707, + 0.015030261129140854, + 0.03446345776319504, + -0.0024389775935560465, + -0.03401792421936989, + -0.061379026621580124, + 0.025434819981455803, + 0.03168541565537453, + -0.046519119292497635, + -0.021490521728992462, + 0.01672067493200302, + 0.01961665414273739, + -0.005002443213015795, + -5.2467094064923e-05, + 0.022997479885816574, + 0.022853335365653038, + -0.015777187421917915, + 0.010529045015573502, + -0.03876156359910965, + 0.0067092361859977245, + 0.045261137187480927, + 0.021857433021068573, + -0.042509302496910095, + -0.0020524102728813887, + -0.02070428431034088, + 0.0008746904786676168, + 0.03556419163942337, + -0.05676642805337906, + -0.02316783182322979, + -0.007135115563869476, + -0.028068717569112778, + 0.011623227037489414, + 0.01871247962117195, + 0.014440582133829594, + 0.009513487108051777, + -0.013385712169110775, + 0.0367959663271904, + 0.027754222974181175, + -0.005520050413906574, + -0.03910226747393608, + -0.017349665984511375, + 0.015659252181649208, + -0.050109606236219406, + -0.0023554398212581873, + -0.03158058598637581, + 0.008504481054842472, + -0.009952470660209656, + -0.019341470673680305, + 0.024989284574985504, + -0.010312830097973347, + 0.04235205426812172, + -0.01712689734995365, + -0.028592877089977264, + 0.031318504363298416, + 0.02509411610662937, + 0.0239802785217762, + -0.00027948326896876097, + 0.007606858387589455, + -0.03129229694604874, + -0.014270231127738953, + 0.021883642300963402, + 0.0188435185700655, + 0.00857655331492424, + 0.000104934188129846, + -0.0021572422701865435, + -0.011125276796519756, + 0.02515963651239872, + 0.04471077024936676, + -0.02872391790151596, + 0.004461904056370258, + -0.03118746541440487, + -0.011374251917004585, + -0.03244544565677643, + 0.06515297293663025, + 0.03404413163661957, + -0.006345600821077824, + -0.04075336828827858, + -0.012049106881022453, + 0.00037714882637374103, + -0.037005629390478134, + 0.005932825617492199, + -0.03745116665959358, + -0.014781286008656025, + 0.004239136353135109, + 0.005988517310470343, + 0.018987663090229034, + 0.0029483947437256575, + -0.01563304476439953, + 0.03483036905527115, + -0.004016369115561247, + -0.0004635531804524362, + -0.01910559833049774, + 0.014990950003266335, + -0.02403269335627556, + -0.00517607107758522, + -0.0001544835977256298, + 0.025683794170618057, + 0.00719408318400383, + 0.04140856862068176, + -0.02709902450442314, + -0.027334894984960556, + 0.004314484540373087, + 0.027072817087173462, + 0.015135093592107296, + -0.017795201390981674, + 0.021687081083655357, + -0.051367588341236115, + 0.04064853489398956, + -0.003721529385074973, + -0.007646170444786549, + -0.017022065818309784, + -0.019000766798853874, + -0.02720385603606701, + -0.014768182300031185, + 0.004173616413027048, + -0.018083488568663597, + -0.015108885243535042, + -0.003341514151543379, + 0.00040274253115057945, + 0.002701057121157646, + 0.03226199001073837, + 0.006977867800742388, + -0.03155437484383583, + -0.021713290363550186, + 0.007980321533977985, + -0.04544459283351898, + -0.029431531205773354, + -0.039311930537223816, + -0.0030728825367987156, + -0.015108885243535042, + -0.04308587685227394, + -0.015017157420516014, + 0.01235705055296421, + 0.014060567133128643, + 0.010063854046165943, + 0.0047895037569105625, + -0.023390598595142365, + 0.010666636750102043, + -0.019393885508179665, + -0.03189507871866226, + -0.009677287191152573, + -0.019315261393785477, + 0.04607358202338219, + -0.011708403006196022, + 0.009847638197243214, + -0.01757243275642395, + 0.04188030958175659, + -0.04560184106230736, + -0.008465168997645378, + -0.020101500675082207, + -0.005644537974148989, + -0.013045009225606918, + 0.04583771154284477, + -0.025054803118109703, + -0.015292340889573097, + -0.009369343519210815, + 0.030610889196395874, + -0.018463503569364548, + -0.015043365769088268, + 0.0033103921450674534, + 0.027675598859786987, + 0.0028468389064073563, + 0.03543315455317497, + 0.00017270632088184357, + 0.00837344117462635, + 0.024871347472071648, + -0.03121367283165455, + -0.021778808906674385, + -0.005441426299512386, + -0.012343945913016796, + 0.03915468230843544, + -0.045759085565805435, + -0.018895935267210007, + -0.004278448410332203, + 0.016052370890975, + -0.009814878925681114, + -0.011655987240374088, + -0.0026699353475123644, + 0.00777721032500267, + 0.014191607013344765, + 0.0036494575906544924, + -0.00660440418869257, + 0.015790292993187904, + 0.02111050672829151, + -0.010470077395439148, + -0.023010583594441414, + -0.009690390899777412, + 0.036193184554576874, + -0.03304823115468025, + 0.0645763948559761, + -0.033782053738832474, + -0.02555275522172451, + 0.0071089076809585094, + 0.010804228484630585, + -0.004779675509780645, + 0.044501107186079025, + 0.0022882819175720215, + -0.008635520935058594, + 0.007849282585084438, + -0.026994192972779274, + 0.009487279690802097, + 0.04125132039189339, + -0.011217004619538784, + 0.03247165307402611, + -0.013274328783154488, + 0.017441393807530403, + -0.04007196053862572, + 0.00548073835670948, + 0.004226032644510269, + -0.015803396701812744, + 0.01297293696552515, + 0.028566669672727585, + 0.0013054837472736835, + 0.02679763361811638, + 0.016655154526233673, + 0.031056424602866173, + -0.011439771391451359, + -0.01915801502764225, + 0.058915480971336365, + -0.004612599965184927, + -0.008792768232524395, + 0.004170340485870838, + 0.020651867613196373, + 0.027701806277036667, + -0.030977800488471985, + -0.014309543184936047, + -0.01016213372349739, + 0.0014750163536518812, + 0.02590656280517578, + -0.06284667551517487, + 0.040176793932914734, + -0.022696087136864662, + 0.007580650504678488, + 0.013680552132427692, + -0.0038263611495494843, + 0.01458472665399313, + 0.028592877089977264, + -0.025264468044042587, + -0.028645293787121773, + 0.059282392263412476, + 0.018175216391682625, + -0.004674843978136778, + 0.00917933601886034, + 0.029326699674129486, + 0.015017157420516014, + 0.03367722034454346, + 0.03357238695025444, + 0.012108074501156807, + -0.034122757613658905, + -0.017651056870818138, + 0.003970505204051733, + 0.012664993293583393, + -0.0006666647968813777, + -0.04434385895729065, + -0.004517596215009689, + -0.04646670073270798, + -0.0009393913205713034, + 0.004665015731006861, + 0.008281713351607323, + 0.015082677826285362, + -0.026994192972779274, + -0.004140856675803661, + -0.05802441015839577, + -0.005608502309769392, + 0.04041266441345215, + 0.007593754678964615, + -0.051288966089487076, + 0.008170329965651035, + -0.009087608195841312, + -0.036193184554576874, + -0.0115773631259799, + -0.006781307980418205, + -0.01759864017367363, + -0.048091594129800797, + 0.014663349837064743, + -0.030191563069820404, + 0.019354574382305145, + 0.03519728034734726, + 0.024661684408783913, + -0.017323456704616547, + -0.034384835511446, + 0.059754133224487305, + -0.007449611090123653, + 0.013221913017332554, + 0.03787049278616905, + 0.07222911715507507, + 0.008419305086135864, + 0.007737898267805576, + -0.005746094044297934, + -0.02231607213616371, + -0.003249786328524351, + -0.02282712794840336, + 0.0017280869651585817, + -0.017349665984511375, + 0.0011302180355414748, + -0.03640284761786461, + -0.033755842596292496, + -0.025683794170618057, + -0.015253028832376003, + -0.03234061598777771, + 0.014702661894261837, + 0.00660768011584878, + 0.04667636379599571, + -0.017008962109684944, + 0.013864007778465748, + 0.016995858401060104, + -0.015672355890274048, + -0.010679741390049458, + -0.01497784536331892, + 0.00748892268165946, + 0.03186887130141258, + 0.025631379336118698, + -0.04077957570552826, + 0.015069573186337948, + 0.03865673020482063, + -0.005644537974148989, + -0.0576050840318203, + 0.003931193146854639, + 0.0031433163676410913, + -0.015056469477713108, + 0.03821119666099548, + -0.0019393885741010308, + -0.040176793932914734, + 0.03475174680352211, + 0.0031940944027155638, + 0.055718109011650085, + -0.01517440564930439, + -0.0016093321610242128, + 0.016130995005369186, + -0.01910559833049774, + 0.006807515863329172, + -0.039311930537223816, + -0.018450399860739708, + -0.027046607807278633, + 0.006794412154704332, + -0.02352163940668106, + 0.032524071633815765, + -0.021071195602416992, + -0.027465935796499252, + -0.024176837876439095, + -0.03317926824092865, + -0.03504003584384918, + 0.0017968828324228525, + -0.006705960258841515, + 0.0375559963285923, + 0.03726771101355553, + -0.0020737042650580406, + -0.03564281761646271, + 0.03223578259348869, + 0.014230919070541859, + 0.0033464280422776937, + 0.04083199054002762, + 0.039285723119974136, + -0.006814068183302879, + -0.030872968956828117, + 0.03433242067694664, + -0.011151484213769436, + 0.04282379522919655, + 0.03994091972708702, + -0.02754455991089344, + 0.021411897614598274, + 0.024124421179294586, + -0.0275969747453928, + -0.0057362657971680164, + -0.023508533835411072, + 0.05259936302900314, + 0.03150196000933647, + 0.019367678090929985, + 0.01875179074704647, + -0.0031121945939958096, + -0.013824695721268654, + -0.015266133472323418, + 0.0026044154074043036, + -0.03598352149128914, + 0.0034168618731200695, + -0.004019645042717457, + 0.01837177574634552, + 0.051682084798812866, + -0.014427478425204754, + -0.002273540012538433, + -0.01378538366407156, + -0.012455330230295658, + 0.009965574368834496, + 0.02040289156138897, + 0.011911515146493912, + 0.022145720198750496, + -0.030951593071222305, + -0.024452021345496178, + 0.0033939299173653126, + 0.011144932359457016, + -0.012468433938920498, + 0.009238303638994694, + -0.018542127683758736, + 0.01717931404709816, + 0.026561761274933815, + -0.0034070340916514397, + -0.022565048187971115, + 0.008563448674976826, + -0.01564614847302437, + 0.05886306241154671, + 0.04395074024796486, + 0.008491377346217632, + 0.005208830814808607, + -0.01677308976650238, + -0.005664194002747536, + -0.0034168618731200695, + -0.044501107186079025, + -0.010057302191853523, + 0.01753312163054943, + 0.002953308867290616, + 0.016589634120464325, + 0.009696942754089832, + 0.007338227238506079, + 0.03446345776319504, + 0.015672355890274048, + -0.011623227037489414, + -0.01915801502764225, + 0.003063054522499442, + -0.02709902450442314, + 0.00917278416454792, + -0.014453686773777008, + -0.02561827562749386, + 0.040963031351566315, + -0.014283334836363792, + 0.002209658036008477, + -0.009631423279643059, + -0.0021392242051661015, + -0.04007196053862572, + 0.03226199001073837, + -0.043374162167310715, + 0.06882208585739136, + -0.0073316749185323715, + -0.0022882819175720215, + -0.010836988687515259, + 0.011859099380671978, + -0.016130995005369186, + 0.019302157685160637, + 0.00399998901411891, + 0.024517539888620377, + 0.010686293244361877, + -0.013890215195715427, + -0.014126087538897991, + -0.028173550963401794, + 0.04950682446360588, + -0.014663349837064743, + 0.03991471230983734, + 5.9377394791226834e-05, + 0.006142489146441221, + -0.031737830489873886, + 0.023403702303767204, + -0.022905752062797546, + -0.013811592012643814, + -0.0318426638841629, + -0.034515876322984695, + -0.007619962561875582, + -0.027780430391430855, + 0.06819309294223785, + 0.03483036905527115, + 0.016196515411138535, + 0.006820620037615299, + 0.0002364858373766765, + 0.007063043769448996, + 0.004671567585319281, + 0.005323490593582392, + -0.03994091972708702, + -0.02358715794980526, + 0.013968839310109615, + -0.05026685446500778, + 0.011112172156572342, + 0.006800964009016752, + 0.002760025206953287, + -0.010928716510534286, + 0.05346422642469406, + -0.018581438809633255, + 0.013071216642856598, + 0.014270231127738953, + 0.0024357016663998365, + 0.019800109788775444, + 0.009860742837190628, + 0.01758553646504879, + -4.1589770262362435e-05, + 0.0026535552460700274, + -0.00037223484832793474, + -0.05917755886912346, + 0.004638807848095894, + 0.018987663090229034, + 0.0021850881166756153, + -0.021005675196647644, + 0.021805018186569214, + -0.01994425244629383, + 0.010398006066679955, + 0.010398006066679955, + 0.014492998830974102, + -0.011452876031398773, + 0.013628136366605759, + 0.034620705991983414, + 0.029667403548955917, + 0.002419321797788143, + -0.023390598595142365, + 0.03674355149269104, + -0.01259947381913662, + -0.015777187421917915, + 0.035302113741636276, + -0.044894225895404816, + 0.01377227995544672, + -0.020075293257832527, + 0.02637830562889576, + -0.04848471283912659, + 0.0002371000882703811, + 0.004127752501517534, + 0.015790292993187904, + 0.023652678355574608, + 0.00917278416454792, + -0.006522504612803459, + -0.013811592012643814, + 0.00748237082734704, + 0.048904042690992355, + 0.009434862993657589, + -0.017035169526934624, + -0.02113671414554119, + -0.018437296152114868, + 0.02031116373836994, + 0.007600306533277035, + 0.0007723156595602632, + -0.013483991846442223, + -0.00489105936139822, + 0.004163788631558418, + -0.024242356419563293, + -0.015528212301433086, + -0.01058146171271801, + 0.005366078577935696, + -0.003721529385074973, + -0.01520061306655407, + -0.019393885508179665, + -0.018450399860739708, + -0.010057302191853523, + -0.021031882613897324, + -0.004943475127220154, + -0.00012213316222187132, + -0.001977062551304698, + 0.026155536994338036, + 0.029483947902917862, + 0.0041310288943350315, + -0.0023505259305238724, + -0.04680740460753441, + -0.017022065818309784, + 0.02513342723250389, + 0.013732967898249626, + -0.024150628596544266, + -0.0383160300552845, + -5.9223832067800686e-05, + -0.003924641292542219, + 0.016904130578041077, + 0.0014094965299591422, + 0.025814834982156754, + -0.022669879719614983, + 0.0022375041153281927, + -0.016262035816907883, + 0.0010548700811341405, + -0.015292340889573097, + 0.013942630961537361, + 0.03787049278616905, + -0.0018787826411426067, + 0.0005163786117918789, + 0.015095781534910202, + 0.02201468124985695, + -0.032183367758989334, + 0.021673977375030518, + 0.02117602713406086, + 0.008052393794059753, + 0.0211891308426857, + -0.002101550344377756, + -0.023744406178593636, + -0.003171162446960807, + 0.010922164656221867, + -0.005831269547343254, + -0.008563448674976826, + -0.005864029750227928, + 0.015868915244936943, + -0.009343135170638561, + 0.02111050672829151, + -0.0416182316839695, + 0.019026974216103554, + 0.05039789527654648, + -0.01678619347512722, + -0.012999145314097404, + -0.02033737301826477, + 0.04544459283351898, + -0.02709902450442314, + -0.006168697029352188, + -0.004648635629564524, + -0.05270419642329216, + 0.02388855069875717, + -0.0057297139428555965, + -0.023062998428940773, + 0.01879110373556614, + -0.032183367758989334, + -0.013293984346091747, + 0.05351664125919342, + 0.0038525692652910948, + -0.004864851478487253, + 0.002398027805611491, + 0.039338137954473495, + 0.0454183854162693, + 0.005012270994484425, + 0.005637986119836569, + -0.014348854310810566, + -0.008687936700880527, + 0.012501194141805172, + -0.0032645282335579395, + -0.020573243498802185, + 0.02670590579509735, + 0.024674788117408752, + -0.012828793376684189, + 0.01590822823345661, + 0.014637142419815063, + -0.04190651699900627, + -0.0010049112606793642, + -0.01991804502904415, + -0.0013390625827014446, + -0.0063554286025464535, + -0.026116225868463516, + 0.0013243206776678562, + -0.018253840506076813, + -0.029300492256879807, + -0.009520038962364197, + -0.0020327544771134853, + -0.02311541512608528, + -0.014060567133128643, + 0.043767284601926804, + -0.01831935904920101, + -0.028933580964803696, + 0.0030352086760103703, + -0.022866439074277878, + 0.024609267711639404, + -0.03868294134736061, + -0.020193228498101234, + -0.013346400111913681, + 0.03724150359630585, + 0.006345600821077824, + -0.021477418020367622, + -0.00214413832873106, + -0.013510200195014477, + -0.009022087790071964, + -0.017480704933404922, + -0.0023865618277341127, + -0.01461093407124281, + 0.010280069895088673, + 0.023456119000911713, + -0.011636331677436829, + -0.030453642830252647, + 0.025356195867061615, + 0.005742817651480436, + -0.007731346413493156, + 0.022630568593740463, + 0.007148219272494316, + 0.023691989481449127, + -0.025801731273531914, + 0.008098257705569267, + 0.0014750163536518812, + 0.009061399847269058, + 0.009133472107350826, + 0.06358049809932709, + -0.01685171388089657, + 0.009900054894387722, + 0.0036560094449669123, + 0.0033939299173653126, + -0.029641196131706238, + 0.009644526988267899, + -0.016550322994589806, + -0.05123655125498772, + 0.00039107180782593787, + -0.00172153499443084, + -0.025329986587166786, + -0.03865673020482063, + 0.023377494886517525, + -0.03278614953160286, + 0.05702850595116615, + -0.0026732112746685743, + 0.004877955187112093, + -0.036586303263902664, + 0.048537131398916245, + 0.030139146372675896, + -0.04633566364645958, + 0.005929549690335989, + -0.022604359313845634, + -0.01632755436003208, + -0.011839442886412144, + -0.008799320086836815, + 0.04020300135016441, + -0.021857433021068573, + -0.010456973686814308, + 0.015069573186337948, + 0.026994192972779274, + 0.0034561739303171635, + 0.021778808906674385, + -0.013824695721268654, + 0.007377538830041885, + 0.0033742741215974092, + 0.02522515505552292, + -0.017061378806829453, + 0.002812440972775221, + 0.005280902609229088, + 0.019800109788775444, + -0.011066308245062828, + 0.012324290350079536, + -0.029850859194993973, + -0.012284978292882442, + -0.01759864017367363, + 0.010293173603713512, + 0.016956545412540436, + 0.011026996187865734, + 0.010253861546516418, + -0.03228819742798805, + -0.0407271608710289, + -0.007600306533277035, + -0.006244045216590166, + 0.025447923690080643, + 0.038945019245147705, + 0.005520050413906574, + 0.01997045986354351, + -0.027649391442537308, + -0.029379116371273994, + -0.02201468124985695, + -0.008242401294410229, + -0.01803107187151909, + -0.022591255605220795, + 0.014624037779867649, + -0.0013177687069401145, + 0.03821119666099548, + -0.016484802588820457, + 0.002466823672875762, + 0.030820554122328758, + 0.0030057246331125498, + -0.003934469074010849, + 0.003960676956921816, + -0.010987685061991215, + -0.031764041632413864, + -0.002812440972775221, + 0.015095781534910202, + 0.004855023231357336, + -0.01399504765868187, + -0.011524947360157967, + -0.022119512781500816, + -0.013110528700053692, + -0.0008714144350960851, + -0.015475796535611153, + -0.030217770487070084, + 0.0016543770907446742, + -0.004763295408338308, + 0.004674843978136778, + -0.018909038975834846, + -0.01237015426158905, + -0.010555253364145756, + 0.01235705055296421, + -0.018070384860038757, + -0.0037477375008165836, + -0.043741073459386826, + 0.032602693885564804, + 0.04185410216450691, + -0.00798687431961298, + -0.02675832062959671, + 0.008091705851256847, + -0.02120223455131054, + -0.01521371677517891, + -0.006214560940861702, + -0.029824651777744293, + -0.016982754692435265, + 0.008471720851957798, + -0.010640429332852364, + 0.010771469213068485, + 0.011393907479941845, + -0.013149840757250786, + -0.003957401029765606, + -0.013313640840351582, + -0.04384590685367584, + 0.023691989481449127, + -0.027728015556931496, + -0.029248075559735298, + 0.017061378806829453, + -0.005723162088543177, + 0.014741973951458931, + -0.0015806672163307667, + -0.015030261129140854, + -0.027701806277036667, + -0.004239136353135109, + 0.04361003637313843, + 0.035013824701309204, + -0.03113504871726036, + -0.031239880248904228, + 0.013143288902938366, + -7.447768439305946e-05, + -0.0015143282944336534, + 0.0012522487668320537, + 0.008550344966351986, + 0.011898411437869072, + -0.029405323788523674, + 0.019013870507478714, + -0.0009688753052614629, + 0.02641761675477028, + -0.014126087538897991, + 0.011079412885010242, + -0.02476651594042778, + 0.001339881680905819, + 0.0028648569714277983, + 0.04442248120903969, + 0.027649391442537308, + 0.03561661019921303, + -0.02801630273461342, + 0.006286632735282183, + -0.019878732040524483, + 0.006568368524312973, + -0.0013390625827014446, + -0.011249763891100883, + 0.004609324038028717, + -0.015305444598197937, + 0.027072817087173462, + 0.03194749727845192, + -0.019328365102410316, + 0.018673166632652283, + 0.017755888402462006, + -0.003963952884078026, + 0.01877799816429615, + 0.004196548368781805, + -0.004950027447193861, + 0.004933647345751524, + 0.007338227238506079, + -0.05561327934265137, + -0.006676476448774338, + 0.02159535326063633, + -0.02872391790151596, + -0.026496240869164467, + -0.01438816636800766, + 0.024229252710938454, + -0.029483947902917862, + -0.02553965151309967, + -0.009081056341528893, + -0.006578196305781603, + -0.0050581349059939384, + -0.00400326494127512, + 0.02796388603746891, + 0.03325789421796799, + -0.02318093553185463, + -0.03307443857192993, + 0.011590467765927315, + 0.007587202824652195, + 0.0029418428894132376, + -0.0032890981528908014, + 0.016877921298146248, + -0.005870581604540348, + -0.014938533306121826, + 0.0098017742857337, + 0.03645526245236397, + -0.018293151631951332, + 0.009159679524600506, + -0.024674788117408752, + -0.011944275349378586, + -0.017074482515454292, + -0.022971270605921745, + 0.009015535935759544, + -0.010135926306247711, + -0.012402914464473724, + -0.016864817589521408, + -0.028461838141083717, + 0.012881209142506123, + -0.005533154122531414, + 0.024858243763446808, + 0.008556896820664406, + 0.028514252975583076, + -0.018083488568663597, + 0.012429121881723404, + 0.0023881997913122177, + -0.001139226951636374, + -0.014296438544988632, + -0.01475507766008377, + 0.016943441703915596, + 0.011151484213769436, + -0.019053181633353233, + 0.008838632144033909, + 0.00011066717706853524, + 0.005169518757611513, + -0.0006527418736368418, + -0.01558062806725502, + 0.05660917982459068, + 0.028592877089977264, + -0.004144132602959871, + -0.008661728352308273, + 0.006846827920526266, + -0.020953258499503136, + 0.04945440962910652, + -0.009539695456624031, + -0.03210474178195, + 0.007914802059531212, + -0.005097446963191032, + -0.030899178236722946, + -0.016170307993888855, + 0.0155413169413805, + -0.023770613595843315, + 0.010273518040776253, + -0.003678941400721669, + -0.003228492336347699, + -0.028252175077795982, + 0.03142333775758743, + 0.025447923690080643, + 0.0010909060947597027, + 0.001520880265161395, + -0.024242356419563293, + -0.015698565170168877, + 0.003231768263503909, + -0.01997045986354351, + 0.01872558332979679, + 0.039731256663799286, + -0.0005315300659276545, + -0.01755932904779911, + 0.017651056870818138, + 0.013680552132427692, + 0.0037772213108837605, + 0.033310309052467346, + -0.009362791664898396, + -0.015148197300732136, + -0.004687947686761618, + 0.00977556686848402, + 0.0137984873726964, + 0.01596064306795597, + -0.0027780430391430855, + 0.011754266917705536, + -0.03283856436610222, + -0.021071195602416992, + -0.0031957323662936687, + 0.013084321282804012, + 0.02399338223040104, + 0.005811613518744707, + 0.023823030292987823, + -0.012311186641454697, + 0.02476651594042778, + -0.007534786593168974, + 0.012409466318786144, + -0.0005921359406784177, + 0.009821430779993534, + 0.02112361043691635, + 0.04269275814294815, + 0.006568368524312973, + -0.019760796800255775, + 0.03595731407403946, + -0.008930359967052937, + -0.044579729437828064, + -0.03624559938907623, + 0.02751835063099861, + 0.03118746541440487, + 0.00458966800943017, + 0.030165355652570724, + -0.0019852526020258665, + -0.04117269441485405, + 0.005303834564983845, + 0.00837344117462635, + -0.014781286008656025, + -0.021071195602416992, + -0.004579839762300253, + -0.013339848257601261, + -0.013890215195715427, + 0.024609267711639404, + -0.017454497516155243, + 0.009166231378912926, + -0.016275139525532722, + -0.034568291157484055, + 0.019787004217505455, + -0.007154771592468023, + 0.007364435121417046, + -0.02121533825993538, + 0.02640451304614544, + 0.02840942144393921, + 0.013307088986039162, + -0.007226843386888504, + -0.0003099909517914057, + -0.0068992436863482, + -0.0040982686914503574, + 0.023665782064199448, + 0.01176737155765295, + 0.043374162167310715, + -0.0207435954362154, + 0.00028705899603664875, + -0.026221057400107384, + 0.013955735601484776, + 0.017061378806829453, + -0.019354574382305145, + ], + "index": 65, + }, + { + "title": "Black Arrow", + "text": "Black Arrow, officially capitalised BLACK ARROW, was a British satellite carrier rocket. Developed during the 1960s, it was used for four launches between 1969 and 1971. Its final flight was the first and only successful orbital launch to be conducted by the United Kingdom, and placed the Prospero satellite into low Earth orbit.Black Arrow originated from studies by the Royal Aircraft Establishment for carrier rockets based on the Black Knight rocket, with the project being authorised in 1964.", + "vector": [ + -0.014135890640318394, + 0.03546791151165962, + -0.020262327045202255, + -0.057675138115882874, + -0.02767062932252884, + 0.001184621243737638, + -0.028501631692051888, + 0.021641438826918602, + -0.07178451120853424, + 0.007664675824344158, + 0.02689266949892044, + -0.011519115418195724, + -0.024258213117718697, + -0.021234776824712753, + -0.0010912438156083226, + 0.07192595303058624, + -0.030004510655999184, + 0.03173723816871643, + 0.020280007272958755, + -0.020527539774775505, + 0.019519727677106857, + -0.03336388245224953, + -0.030216680839657784, + -0.01761903055012226, + -0.006926497910171747, + 0.023480253294110298, + -0.006011510733515024, + 0.01863568276166916, + -0.03702383115887642, + -0.005945207085460424, + 0.0015393445501103997, + -0.0228260587900877, + 0.028201056644320488, + 0.06807151436805725, + 0.029456401243805885, + -0.0008133220253512263, + 0.010829559527337551, + -0.000709999178070575, + -0.05870063230395317, + -0.04490951821208, + -0.013057354837656021, + -0.039216265082359314, + -0.02316199615597725, + 0.05123928561806679, + 0.004862251225858927, + 0.0013415393186733127, + 0.016275281086564064, + 0.011395348235964775, + -0.004902033135294914, + 0.013145758770406246, + -0.006683385465294123, + 0.03140130266547203, + -0.042823173105716705, + 0.025425152853131294, + 0.01392371952533722, + 0.0445912629365921, + 0.019201472401618958, + 0.05944323167204857, + -0.02696339227259159, + -0.04918830096721649, + 0.009583055041730404, + 0.002559312153607607, + 0.03592761605978012, + 0.01879481039941311, + -0.010467100888490677, + -0.03995886445045471, + 0.03237375244498253, + -0.02247244119644165, + -0.020580582320690155, + 0.0038610694464296103, + 0.015550362877547741, + -0.056791093200445175, + 0.04225738346576691, + -0.015930503606796265, + 0.009918992407619953, + -0.004422438330948353, + 0.05463402345776558, + 0.02698107436299324, + -0.011527955532073975, + 0.044838797301054, + 0.03145434334874153, + -0.012058382853865623, + -0.056260667741298676, + -0.002676448319107294, + -0.028943656012415886, + 0.0445912629365921, + 0.010369855910539627, + -0.061741750687360764, + -0.014065166935324669, + -0.01744222082197666, + -0.01865336298942566, + 0.038791924715042114, + 0.016089631244540215, + -0.030446533113718033, + 0.0047296443954110146, + 0.003967154771089554, + 0.014374583028256893, + -0.006966279819607735, + -0.0011802009539678693, + 0.05969076231122017, + -0.013561260886490345, + -0.029385678470134735, + -0.014339220710098743, + 0.014807765372097492, + -0.056755732744932175, + 0.026114709675312042, + -0.038155410438776016, + -0.0017316244775429368, + 0.023851552978157997, + 0.052724484354257584, + -0.020421454682946205, + 0.002237740671262145, + 0.0012266134144738317, + -0.00907030887901783, + -0.024558788165450096, + -0.010414058342576027, + 0.02188897132873535, + -0.009335522539913654, + -0.05343171954154968, + -0.016407888382673264, + -0.010193046182394028, + -0.03808468580245972, + -0.02194201387465, + -0.025920219719409943, + 0.016699623316526413, + -0.02756454423069954, + 0.012579970061779022, + 0.015338192693889141, + 0.030570298433303833, + -0.016832228749990463, + -0.07730095088481903, + -0.029226548969745636, + -0.01141302939504385, + 0.021517671644687653, + 0.002121709519997239, + 0.016752665862441063, + -0.023621700704097748, + -0.0465715266764164, + 0.011775488033890724, + 0.04034784436225891, + -0.008588504046201706, + -0.07256247103214264, + 0.028784526512026787, + -0.00551644479855895, + -0.0057020946405828, + -0.028943656012415886, + 0.011138975620269775, + 0.03131289780139923, + -0.024399660527706146, + -0.05039060488343239, + 0.038756560534238815, + 0.019325237721204758, + -0.014851966872811317, + 0.009512331336736679, + -0.014975734055042267, + -0.015656448900699615, + -0.033416926860809326, + -0.005405939184129238, + -0.01394139975309372, + 0.07418911159038544, + 0.005180507432669401, + 0.007540909573435783, + -0.0015305040869861841, + 0.003240027464926243, + -0.010334493592381477, + -0.0013547999551519752, + 0.004040088504552841, + 0.006599401123821735, + -0.043424323201179504, + 0.014984574168920517, + 0.05873599275946617, + -0.03925162926316261, + 0.03290418162941933, + 0.003469879273325205, + -0.03557399660348892, + 0.03582153096795082, + -0.004437909461557865, + -0.010325653478503227, + -0.005030219908803701, + -0.015629926696419716, + -0.06517184525728226, + 0.04204521328210831, + -0.019077705219388008, + 0.05523517355322838, + -0.004773846827447414, + -0.023639380931854248, + 0.02264925092458725, + 0.01815829798579216, + -0.05809948220849037, + 0.008442636579275131, + 0.0031560431234538555, + -0.009574214927852154, + 0.0016763715539127588, + 0.021517671644687653, + 0.02788279950618744, + 0.07132480293512344, + -0.04950655624270439, + -0.043813303112983704, + -0.05304273962974548, + -0.04239882901310921, + 0.029155826196074486, + -0.014595594257116318, + -0.020173922181129456, + -0.0038124469574540854, + -0.02715788222849369, + 0.00927363894879818, + 0.06043336167931557, + -0.0007260225247591734, + 0.03217926248908043, + 0.017053240910172462, + -0.005105363670736551, + -0.014560231938958168, + 0.029279593378305435, + 0.007112147286534309, + -0.015382394194602966, + 0.005569487810134888, + -0.030075233429670334, + 0.010069279931485653, + -0.05438648909330368, + -0.014869648031890392, + 0.0112539017572999, + 0.020403774455189705, + 0.03741281107068062, + -0.012694896198809147, + -0.024647193029522896, + -0.007143089082092047, + -0.030446533113718033, + 0.05085030570626259, + 0.014940371736884117, + -0.0440608374774456, + -0.06411099433898926, + 0.03583921119570732, + -0.006886715535074472, + 0.02268461138010025, + -0.043919388204813004, + 0.019678857177495956, + 0.014772403053939342, + -0.012120266444981098, + -0.01893625780940056, + 0.056260667741298676, + -0.03691774606704712, + -0.0037925560027360916, + -0.010458259843289852, + -0.020934201776981354, + 0.06259043514728546, + -0.034283291548490524, + 0.01141302939504385, + -0.002906300127506256, + -0.05329027399420738, + -0.011863892897963524, + 0.007638154551386833, + 0.05435112863779068, + -0.03744817525148392, + 0.007872426882386208, + -0.024240532889962196, + -0.034919802099466324, + -0.009291320107877254, + 0.011855052784085274, + 0.05300737917423248, + 0.030428851023316383, + 0.0054678223095834255, + -0.005379417911171913, + 0.030075233429670334, + 0.05778122320771217, + -0.002501849317923188, + -0.01363198459148407, + -0.03463691100478172, + -0.025778772309422493, + -0.06354520469903946, + -0.025301387533545494, + 0.019979432225227356, + 0.014215454459190369, + 0.043424323201179504, + 0.02721092477440834, + -0.03766034543514252, + 0.016876431182026863, + -0.005565067287534475, + 0.02249012142419815, + -0.056791093200445175, + 0.01884785294532776, + 0.013110397383570671, + -0.025425152853131294, + -0.001014442415907979, + -0.05817020684480667, + -0.014409944415092468, + 0.0037417232524603605, + -0.048551786690950394, + -0.009653778746724129, + 0.043035343289375305, + 0.03193172812461853, + -0.042434193193912506, + 0.021429266780614853, + 0.025690367445349693, + -0.003918532282114029, + 0.06619734317064285, + -0.03157811239361763, + -0.017353815957903862, + -0.047703105956315994, + 0.019961751997470856, + 0.03295722231268883, + -0.051805075258016586, + 0.01558572519570589, + -0.002422285033389926, + -0.012792141176760197, + -0.013066194951534271, + 0.003169303759932518, + -0.038615114986896515, + -0.0032643387094140053, + -0.00875647272914648, + 0.0010415163123980165, + -0.043530408293008804, + -0.034424737095832825, + 0.013092716224491596, + -0.01807873323559761, + 0.0469958670437336, + -0.000743150885682553, + 0.013419813476502895, + 0.006422591861337423, + -0.056649647653102875, + -1.1283668754913379e-05, + -0.015046456828713417, + -0.003978205379098654, + -0.12213975191116333, + -0.005618110299110413, + 0.056083858013153076, + -0.0022134294267743826, + 0.04137333855032921, + -0.013322568498551846, + -0.015718331560492516, + -0.025566600263118744, + 0.004314142744988203, + -0.013331408612430096, + 0.03232070803642273, + -0.019060024991631508, + 0.030888555571436882, + -0.03247983753681183, + -0.030057553201913834, + -0.030199000611901283, + 0.011846211738884449, + 0.016522813588380814, + 0.034725312143564224, + -0.04038320481777191, + 0.009848268702626228, + -0.0002217020810348913, + -0.021146371960639954, + -0.020138559862971306, + -0.027988886460661888, + -0.01898930035531521, + 0.03106536529958248, + -0.019519727677106857, + 0.0009315631468780339, + 0.01852959766983986, + 0.03988813981413841, + -0.03702383115887642, + 0.011713605374097824, + -0.047773826867341995, + 0.004448959603905678, + -0.0466422513127327, + -0.0032223465386778116, + 0.016955995932221413, + 0.04087827354669571, + -0.021676799282431602, + 0.0007696722750551999, + 0.033717501908540726, + 0.010643909685313702, + -0.021022606641054153, + 0.08232232928276062, + 0.014047485776245594, + -0.019784942269325256, + -0.01754830591380596, + -0.0005511472118087113, + 0.025920219719409943, + -0.02305591106414795, + -0.039074819535017014, + -0.011289263144135475, + -0.04215129837393761, + -0.020898839458823204, + -0.006259043235331774, + -0.008080177009105682, + 0.0011144500458613038, + -0.03124217316508293, + 0.014409944415092468, + -0.06520720571279526, + 0.007315477821975946, + 0.04211593419313431, + -0.02240171656012535, + -0.003158253151923418, + -0.024046042934060097, + 0.025159940123558044, + -0.00940624624490738, + -0.016425568610429764, + -0.020757392048835754, + 0.0230028685182333, + 0.014745881780982018, + -0.02240171656012535, + -0.08366607874631882, + 0.03278041258454323, + 0.02211882174015045, + 0.004212477710098028, + 0.003613536711782217, + 0.029509443789720535, + 0.04002958908677101, + -0.02236635610461235, + 0.01774279586970806, + -0.023957638069987297, + 0.019024662673473358, + 0.0009199600317515433, + -0.046960506588220596, + -0.016823388636112213, + -0.0456521175801754, + 0.003509661415591836, + -0.042787808924913406, + -0.02332112565636635, + -0.017026718705892563, + 0.011519115418195724, + 0.0037262525875121355, + -0.019979432225227356, + -0.025601962581276894, + -0.015028776600956917, + -0.029686253517866135, + -0.03590993583202362, + 0.030181318521499634, + -0.005065581761300564, + -0.003832337912172079, + 0.013623143546283245, + -0.02680426463484764, + 0.007244754116982222, + 0.0005566725158132613, + -0.03608674556016922, + -0.056932542473077774, + 0.004353925120085478, + -0.039180904626846313, + 0.042787808924913406, + 0.02296750620007515, + -0.04947119578719139, + 0.01849423535168171, + 0.012120266444981098, + 0.03709455579519272, + -0.013269525952637196, + 0.028590036556124687, + -0.017035560682415962, + 0.029173506423830986, + -0.05031988024711609, + -0.012641852721571922, + -0.0013404341880232096, + 0.0222425889223814, + 0.03152506798505783, + 0.02782975696027279, + 0.06340375542640686, + -0.022896783426404, + -0.03971133008599281, + 0.025301387533545494, + 0.024983130395412445, + 0.004460010211914778, + -0.01824670284986496, + -0.025389792397618294, + 0.05024915561079979, + 0.0076956176199018955, + -0.015992386266589165, + -0.0031427822541445494, + -0.029721615836024284, + 0.043070703744888306, + 0.025442834943532944, + -0.03751889988780022, + -0.007302217185497284, + -0.0003259918303228915, + -0.0218359287828207, + 0.014127049595117569, + -0.004462220706045628, + 0.021057967096567154, + -0.005224709864705801, + -0.009954353794455528, + -0.019466685131192207, + 0.043176788836717606, + 0.0231089536100626, + 0.029756978154182434, + 0.05877135694026947, + -0.0056578922085464, + 0.012951268814504147, + -0.03992350399494171, + -0.008323290385305882, + -0.03301026672124863, + -0.015921661630272865, + 0.00896864291280508, + 0.024417340755462646, + -0.002784743905067444, + -0.012129106558859348, + -0.029102783650159836, + 0.02247244119644165, + -0.0077221388928592205, + 0.07213812321424484, + -0.02307359129190445, + -0.024505745619535446, + -0.02236635610461235, + -0.0115544768050313, + 0.009874789975583553, + 0.003989255987107754, + 0.02673354186117649, + 0.024611830711364746, + -0.013101557269692421, + 0.01761019043624401, + 0.04162086918950081, + -0.0061485376209020615, + 0.042823173105716705, + 0.08069568872451782, + 0.05046132579445839, + -0.037731070071458817, + 0.09774009138345718, + 0.01879481039941311, + 0.01150143425911665, + -0.000745913537684828, + 0.00886255782097578, + -0.00686461478471756, + 0.0228260587900877, + -0.005476662889122963, + -0.0447680726647377, + 0.02708715945482254, + 0.01879481039941311, + 0.025690367445349693, + -0.03318707272410393, + -0.004990437999367714, + 0.0009475864353589714, + 0.002822315786033869, + 0.00913219153881073, + 0.03720064088702202, + 0.021765204146504402, + 0.0008973063668236136, + 0.008486838079988956, + -0.0038389682304114103, + -0.03737745061516762, + -0.014321539551019669, + 0.020598264411091805, + 0.002725070808082819, + -0.013570101000368595, + -0.03306330740451813, + 0.043530408293008804, + -0.024717917665839195, + 0.024841682985424995, + -0.0014940372202545404, + 0.023674743250012398, + -0.042434193193912506, + 0.030764788389205933, + 0.023798508569598198, + 0.05466938391327858, + 0.028943656012415886, + -0.012818662449717522, + 0.05940786749124527, + -0.011200858280062675, + 0.004902033135294914, + -0.02227795124053955, + -0.0220304187387228, + 0.012155627831816673, + 0.009432767517864704, + -0.008102278225123882, + 0.03978205472230911, + 0.000334279757225886, + 0.016814548522233963, + 0.001534924260340631, + -0.03681166097521782, + 0.04176231846213341, + 0.024841682985424995, + -0.025460515171289444, + -0.014038645662367344, + 0.009680300019681454, + -0.043495047837495804, + -0.025442834943532944, + -0.02194201387465, + 0.03780179098248482, + -0.04130261391401291, + -0.015143702737987041, + 0.01758366823196411, + -0.0031825643964111805, + -0.009830587543547153, + -0.008013874292373657, + -0.017344975844025612, + -0.0231089536100626, + -0.006714326795190573, + -0.03971133008599281, + -0.010033918544650078, + 0.012208670377731323, + 0.02756454423069954, + -0.019572770223021507, + 0.007691197097301483, + -0.0009652673616074026, + 0.009865949861705303, + 0.04087827354669571, + 0.006334186997264624, + 0.0443083681166172, + 0.0063562882132828236, + -0.0040555596351623535, + -0.031047683209180832, + -0.017062081024050713, + 0.034265611320734024, + 0.01345517486333847, + 0.004101972095668316, + 0.039039455354213715, + 0.0033306421246379614, + 0.012986631132662296, + -0.004320773296058178, + -0.030764788389205933, + -0.007872426882386208, + -0.010582027025520802, + -0.028943656012415886, + 0.010617388412356377, + -0.003293070010840893, + -0.004371605813503265, + -0.0026676077395677567, + 0.010449419729411602, + 0.026486007496714592, + 0.01879481039941311, + -0.02344489097595215, + 0.001612278283573687, + 0.005401519127190113, + 0.001518348464742303, + 0.02740541659295559, + 0.01812293566763401, + -0.04869323596358299, + 0.019413642585277557, + -0.00461471825838089, + -0.019219152629375458, + 0.006749688647687435, + -0.016955995932221413, + 0.009689140133559704, + -0.012721417471766472, + -0.02791816182434559, + -0.013464015908539295, + 0.004570516292005777, + -0.008464736863970757, + -0.011828531511127949, + 0.008685749024152756, + -0.02694571204483509, + -0.0011133450316265225, + -0.020209284499287605, + -0.010803038254380226, + -0.02777671441435814, + -0.03148970752954483, + 0.06831905245780945, + 0.0056623127311468124, + -0.03233839198946953, + -0.03297490254044533, + 0.021906651556491852, + 0.03301026672124863, + -0.024010680615901947, + -0.0012487145140767097, + -0.006144117563962936, + -0.016089631244540215, + -0.030163638293743134, + -0.01372922956943512, + 0.012703736312687397, + -0.0014299438335001469, + -0.061883196234703064, + 0.047809191048145294, + 0.02211882174015045, + 0.01822902262210846, + 0.012358958832919598, + -0.04982481524348259, + 0.00912335142493248, + 0.011961137875914574, + -0.004325193352997303, + 0.02217186614871025, + -0.015293990261852741, + 0.033664457499980927, + -0.009494650177657604, + 0.0035494433250278234, + 0.04010030999779701, + 0.01145723182708025, + -0.020545221865177155, + -0.04052465409040451, + 0.006206000689417124, + -0.03656413033604622, + -0.020474497228860855, + 0.007536489516496658, + -0.024841682985424995, + -0.0224370788782835, + 0.01780468039214611, + 0.0006188319530338049, + -0.005768397822976112, + 0.03663485124707222, + -0.0058744833804667, + 0.00229188846424222, + 0.03769570589065552, + -0.03628123551607132, + -0.002006783615797758, + -0.008000613190233707, + -0.008822775445878506, + -0.00014945896691642702, + 0.0029151407070457935, + -0.012854023836553097, + -0.03217926248908043, + -0.07928121834993362, + -0.03265664726495743, + -0.06814224272966385, + -0.008062496781349182, + -0.01904234290122986, + 0.0027648527175188065, + 0.043212153017520905, + -0.006908816751092672, + -0.021482309326529503, + -0.014922690577805042, + 0.002943872008472681, + -0.00016520603094249964, + -1.2371458979032468e-05, + -0.019961751997470856, + -0.019891027361154556, + -0.04013567417860031, + -0.021623756736516953, + -0.007452505175024271, + -0.024116765707731247, + 0.016876431182026863, + 0.03138362243771553, + 0.010944485664367676, + -0.0232857633382082, + -0.048021361231803894, + 0.03304562717676163, + 0.02236635610461235, + -0.03603370115160942, + 0.004219107795506716, + 0.039180904626846313, + 0.0052114492282271385, + -0.021411586552858353, + 0.0111654968932271, + 0.030305085703730583, + 0.003934003412723541, + -0.0007967461715452373, + -0.01364966481924057, + 0.004990437999367714, + 0.03246215730905533, + -0.010414058342576027, + -0.0006464584148488939, + -0.0043229833245277405, + -0.0230028685182333, + -0.03486676141619682, + 0.012977790087461472, + 0.01874176785349846, + 0.008062496781349182, + 0.03336388245224953, + -0.028307141736149788, + -0.020969564095139503, + 0.01165172178298235, + 0.0021471260115504265, + 0.0115544768050313, + 0.008416114374995232, + 0.0006309875752776861, + -0.047031231224536896, + 0.019961751997470856, + -0.007576271425932646, + -0.047667741775512695, + -0.0050125387497246265, + 0.012482725083827972, + -0.008782994002103806, + 0.016275281086564064, + -0.04066609963774681, + 0.0031781441066414118, + -0.03269200772047043, + -0.009609576314687729, + -0.007337579037994146, + 0.013207642361521721, + 0.004256679676473141, + 0.0067850505001842976, + -0.001633274368941784, + 0.02811265178024769, + 0.019077705219388008, + -0.01766323298215866, + -0.004769426304847002, + 0.024293575435876846, + -0.034247927367687225, + 0.012633012607693672, + 0.002992494497448206, + 0.004765006247907877, + -0.01796380802989006, + -0.01350821740925312, + 0.008234885521233082, + -0.04098435863852501, + -0.021623756736516953, + 0.011766647920012474, + 0.03631659597158432, + 0.03173723816871643, + -0.003876540344208479, + -0.021234776824712753, + -0.0232857633382082, + -0.0072403340600430965, + 0.02287910133600235, + -0.008119959384202957, + -0.012818662449717522, + -0.004170485306531191, + -0.0016741615254431963, + -0.003255498129874468, + -0.02286142110824585, + -0.007624893914908171, + -0.010475941002368927, + -0.002318409737199545, + 0.06046872213482857, + -0.003629007376730442, + 0.04080754891037941, + 0.03232070803642273, + -0.009017265401780605, + 0.012712576426565647, + -0.002099608536809683, + -0.030269723385572433, + 0.01766323298215866, + 0.01898930035531521, + -0.016231078654527664, + -0.0443083681166172, + -0.0025946740061044693, + -0.01106825191527605, + -0.03677630051970482, + -0.01158983912318945, + 0.0020089938770979643, + -0.0223486740142107, + 0.03734209015965462, + 0.01737149804830551, + -0.006082233972847462, + -0.005162826739251614, + -0.0006149642867967486, + 0.015232106670737267, + 0.01815829798579216, + 0.0010183100821450353, + 0.005481082946062088, + -0.011757807806134224, + 0.008535460568964481, + -0.0224370788782835, + -0.020969564095139503, + 0.033399246633052826, + 0.020845796912908554, + -0.016284121200442314, + 0.020969564095139503, + 0.019395962357521057, + -0.024558788165450096, + -0.003480929881334305, + -0.03148970752954483, + -0.009945513680577278, + -0.029067421332001686, + 0.011890414170920849, + -0.02729932963848114, + -0.02653905190527439, + 0.004932974930852652, + 0.024099085479974747, + 0.005087682977318764, + -0.042823173105716705, + -0.003125101327896118, + 0.015992386266589165, + 0.015833258628845215, + 0.0056932540610432625, + -0.001940480200573802, + -0.0019603711552917957, + 0.006382809951901436, + 0.007045844104140997, + -0.004048929084092379, + -0.011634040623903275, + 0.014533710666000843, + 0.006829252932220697, + 0.033841267228126526, + 0.020651306957006454, + 0.013048513792455196, + 0.025301387533545494, + -0.029633210971951485, + -0.014365741983056068, + 0.03741281107068062, + -0.007461345288902521, + -0.03709455579519272, + -0.001617803587578237, + 0.010086961090564728, + -0.012323596514761448, + -0.038756560534238815, + -0.008650386705994606, + 0.043282877653837204, + -0.006568459328263998, + 0.02657441236078739, + 0.013472856022417545, + 0.002439965959638357, + -0.01325184479355812, + 0.012314756400883198, + -0.010166524909436703, + -0.029597848653793335, + -0.02326808124780655, + -0.009892471134662628, + -0.003091949736699462, + -0.005905425176024437, + 0.04101971909403801, + 0.03157811239361763, + 0.03124217316508293, + -0.03695311024785042, + 0.006594980601221323, + 0.006130856927484274, + -0.016788028180599213, + 0.0029239810537546873, + -0.025283705443143845, + 0.00890676025301218, + 0.001501772552728653, + -0.02673354186117649, + -0.004024617839604616, + 0.021818246692419052, + -0.01754830591380596, + 0.03242679685354233, + 0.005361736752092838, + -0.0007779601728543639, + 0.04087827354669571, + 0.0016056479653343558, + -0.03509661182761192, + -0.0009746603318490088, + 0.02790048159658909, + 0.037731070071458817, + -0.0452985018491745, + -0.04158550873398781, + 0.014984574168920517, + -0.012199830263853073, + -0.024099085479974747, + 0.038226135075092316, + 0.019873347133398056, + 0.006320926360785961, + 0.005321954842656851, + -0.017159326002001762, + 0.002100713551044464, + 0.0457582026720047, + 0.015364713966846466, + -0.013075035065412521, + -0.025584282353520393, + -0.003982625901699066, + -0.01557688508182764, + 0.006320926360785961, + 0.00579933961853385, + 0.03200245276093483, + -0.04027711972594261, + -0.011377668008208275, + 0.00676736980676651, + -0.008181842975318432, + -0.03260360285639763, + 0.025761090219020844, + 0.002565942471846938, + 0.0038964312989264727, + 0.020173922181129456, + 0.011784329079091549, + 0.011855052784085274, + 0.0227022934705019, + -0.028289461508393288, + -0.004910873714834452, + 0.0014398894272744656, + -0.005052321124821901, + -0.00468102190643549, + -0.016849910840392113, + 0.008137640543282032, + 0.012800981290638447, + -0.0035339726600795984, + -0.02715788222849369, + 0.0038013963494449854, + -0.06464141607284546, + -0.03949915990233421, + -0.004126283340156078, + 0.0049815974198281765, + -0.0115102743729949, + 0.024046042934060097, + -0.004163855221122503, + -0.011775488033890724, + -0.028077291324734688, + -0.024470383301377296, + 0.04862251132726669, + 0.016443248838186264, + -0.04126725345849991, + -0.038367580622434616, + -0.034672271460294724, + -0.024824002757668495, + 0.001052014296874404, + -0.009830587543547153, + -0.006802731193602085, + -0.00907030887901783, + -0.015055297873914242, + -0.028254099190235138, + -0.0453692227602005, + -0.009388565085828304, + 0.03318707272410393, + -0.026026304811239243, + 0.033911991864442825, + 0.00699280109256506, + -0.015019935555756092, + 0.04229274392127991, + 0.008380752988159657, + 0.0038455985486507416, + 0.030853193253278732, + 0.010953325778245926, + -0.013030833564698696, + 0.008703429251909256, + -0.01870640553534031, + -0.01838815025985241, + -0.003251077840104699, + 0.00917639397084713, + 0.023780828341841698, + -0.027988886460661888, + 0.023922275751829147, + 0.01804337278008461, + 0.03555631637573242, + -0.043919388204813004, + -0.0008823880925774574, + 0.0010763256577774882, + -0.024770960211753845, + 0.013481696136295795, + 0.042929258197546005, + 0.03196709230542183, + -0.004769426304847002, + -0.008133220486342907, + 0.012703736312687397, + 0.012129106558859348, + -0.007434824015945196, + -0.011863892897963524, + 0.00012998233432881534, + 0.0004166065191384405, + 0.02696339227259159, + 0.004216897767037153, + 0.0231973584741354, + 0.025071535259485245, + 0.0024863784201443195, + 0.010502462275326252, + 0.031047683209180832, + 0.0024753278121352196, + -0.03113608807325363, + 0.0036820501554757357, + -0.001617803587578237, + 0.0112539017572999, + -0.06591444462537766, + 0.020173922181129456, + 0.04894076660275459, + 0.006303245667368174, + -0.028766846284270287, + 0.013799953274428844, + -0.010714633390307426, + -0.029350316151976585, + 0.034495461732149124, + 0.019696537405252457, + -0.0233034435659647, + 0.029403358697891235, + 0.007540909573435783, + -0.029138145968317986, + -0.0030278563499450684, + -0.0030123856849968433, + -0.008508939296007156, + -0.008800674229860306, + -0.0018819122342392802, + 0.009397405199706554, + 0.05017843097448349, + 0.011395348235964775, + -0.004937394987791777, + 0.010025077499449253, + -0.034495461732149124, + -0.0222249086946249, + 0.038650475442409515, + 0.005542966537177563, + -0.038261495530605316, + 0.007178450934588909, + -0.003750563831999898, + -0.033823587000370026, + 0.010979847051203251, + -0.010016237385571003, + 0.006590560544282198, + 0.03194941207766533, + -0.003575964830815792, + 0.02668049745261669, + -0.008442636579275131, + -0.019307557493448257, + 0.014533710666000843, + 0.06322694569826126, + 0.03720064088702202, + -0.0114041892811656, + 0.025884857401251793, + -0.01890089549124241, + -0.005578328389674425, + 0.011961137875914574, + -0.009812907315790653, + -0.0110328895971179, + -0.04947119578719139, + 0.0030344866681843996, + 0.021871289238333702, + 0.03741281107068062, + 0.034619227051734924, + -0.001386846648529172, + -0.0034787196200340986, + -0.01803453080356121, + 0.03111840784549713, + -0.012783300131559372, + 0.023993000388145447, + 0.0223133135586977, + 0.016346003860235214, + 0.0010050494456663728, + 0.0021018185652792454, + 0.021429266780614853, + -0.015099500305950642, + 0.0010083646047860384, + -0.0011255006538704038, + 0.005675573367625475, + 0.05891280248761177, + -0.026079347357153893, + 0.013852995820343494, + -0.009954353794455528, + 0.02335648611187935, + -0.0222425889223814, + -0.01879481039941311, + -0.017044400796294212, + -0.01872408762574196, + 0.002780323615297675, + 0.08409042656421661, + -0.013207642361521721, + 0.043742578476667404, + -0.0036312176380306482, + -0.024152128025889397, + -0.01738033816218376, + 0.02781207673251629, + -0.006365128792822361, + 0.021871289238333702, + -0.03134825825691223, + -0.010758835822343826, + -0.005909845232963562, + 0.017000198364257812, + -0.002811265178024769, + 0.0443437322974205, + -0.052017245441675186, + 0.025513557717204094, + -0.00224768603220582, + -0.0007492286968044937, + 0.0011636251583695412, + 0.0021846978925168514, + -0.004972756840288639, + 0.028837569057941437, + -0.015842098742723465, + 0.007280115969479084, + 0.012641852721571922, + 0.0065507786348462105, + 0.05134537070989609, + 0.0002225308708148077, + -0.001065827556885779, + -0.010679272003471851, + 0.0075188083574175835, + 0.0220480989664793, + -0.0033593736588954926, + -0.028536994010210037, + 0.01844119280576706, + -0.052865929901599884, + 0.013110397383570671, + 0.03755426034331322, + 0.047703105956315994, + -0.013578941114246845, + -0.024399660527706146, + -0.0039207423105835915, + 0.0013636404182761908, + -0.025036172941327095, + -0.008738791570067406, + 0.007739820051938295, + 0.0017647761851549149, + -0.020545221865177155, + -0.052936654537916183, + -0.024399660527706146, + -0.009105670265853405, + -0.0008260301547124982, + -0.01759250834584236, + 0.0012929168296977878, + 0.03233839198946953, + -0.0006155167939141393, + 0.0005539098638109863, + 0.00451747328042984, + 0.02797120437026024, + -0.021553033962845802, + -0.029314953833818436, + -0.012182149104773998, + 0.0018056632252410054, + 0.003449988318607211, + -0.01150143425911665, + -0.015196745283901691, + -0.0452631376683712, + -0.006515416782349348, + -0.023621700704097748, + -0.020792754366993904, + -0.014082847163081169, + 0.034194886684417725, + 0.008005033247172832, + 0.01754830591380596, + -0.01805221289396286, + 0.03324011713266373, + -0.025053855031728745, + 0.015240947715938091, + 0.007448084652423859, + 0.043070703744888306, + -0.01826438307762146, + -0.010131163522601128, + 0.016867591068148613, + 0.01757482811808586, + -0.016328323632478714, + -0.020792754366993904, + 0.025796452537178993, + 0.00436718575656414, + 0.014321539551019669, + 0.000265351845882833, + 0.017115123569965363, + 0.008685749024152756, + 0.019926389679312706, + 0.011138975620269775, + -0.004619138780981302, + -0.016540493816137314, + 0.012977790087461472, + -0.006789470557123423, + -0.00465892069041729, + -0.004212477710098028, + -0.01858264021575451, + 0.01325184479355812, + 0.0026167752221226692, + -0.004057769663631916, + -0.00942392647266388, + 0.02208346128463745, + 0.02323272079229355, + -0.008491259068250656, + -0.03727136552333832, + -0.023975318297743797, + 0.01771627552807331, + -0.01790192537009716, + 0.023745466023683548, + 0.005078842397779226, + -0.006382809951901436, + 0.04094899445772171, + 0.05431576445698738, + -0.005450141616165638, + -0.016063109040260315, + 0.008752051740884781, + 0.0027095999103039503, + -0.025018492713570595, + -0.012836342677474022, + -0.0462179072201252, + 0.019837984815239906, + 0.015055297873914242, + -0.016505133360624313, + -0.02676890231668949, + 0.03499052673578262, + -0.011969977989792824, + -0.006281144451349974, + 0.009874789975583553, + -0.016496291384100914, + 0.012465043924748898, + 0.021111011505126953, + 0.004373815841972828, + -0.003158253151923418, + -0.02728164941072464, + 0.008588504046201706, + -0.01777815818786621, + 0.004994858056306839, + 0.04869323596358299, + 0.006427011918276548, + -0.00217254227027297, + -0.004875511862337589, + -0.025266025215387344, + -0.034460101276636124, + 0.011943456716835499, + 0.04066609963774681, + 0.000514127837959677, + -0.0031759340781718493, + -0.029951468110084534, + 0.005145145580172539, + 0.020315369591116905, + -0.017132805660367012, + 0.008181842975318432, + -0.020651306957006454, + -0.005962888244539499, + 0.02249012142419815, + 0.0012597651220858097, + -0.020032474771142006, + -0.037731070071458817, + -0.025053855031728745, + 0.003213505959138274, + -0.014896169304847717, + -0.002073087031021714, + 0.014012123458087444, + -0.0013360140146687627, + -0.014038645662367344, + -0.0023007288109511137, + -0.010661590844392776, + -0.007023742888122797, + 0.0450156070291996, + 0.0442730076611042, + 0.023639380931854248, + 0.034141842275857925, + -0.01777815818786621, + -0.004941815510392189, + -0.019590452313423157, + -0.0020432504825294018, + -0.0442022830247879, + 0.01810525543987751, + 0.024753278121352196, + 0.01842351257801056, + -0.025796452537178993, + -0.019643494859337807, + -0.008566402830183506, + 0.042575638741254807, + 0.0232150387018919, + -0.0225431639701128, + -0.010113482363522053, + 0.011421870440244675, + -0.020704349502921104, + 0.039322350174188614, + 0.005224709864705801, + -0.0029969147872179747, + -0.0045108431950211525, + 0.014427625574171543, + -0.02749381959438324, + 0.025460515171289444, + 0.025725729763507843, + -0.013075035065412521, + -0.01856495812535286, + 0.0006757423980161548, + 0.028696121647953987, + -0.013517058454453945, + -0.015930503606796265, + 0.010811878368258476, + -0.022419398650527, + -0.02668049745261669, + 0.001820028992369771, + -0.002336090663447976, + -0.026061667129397392, + 0.008429375477135181, + 0.0229144636541605, + -0.01814061775803566, + 0.004479901399463415, + 0.019130747765302658, + 0.019767262041568756, + 0.0035715445410460234, + -0.039004094898700714, + -0.007129828445613384, + -0.014259656891226768, + -0.026379922404885292, + -0.0032532881014049053, + 0.008318869397044182, + -0.0014774613082408905, + -0.029244231060147285, + -0.015214425511658192, + -0.015329351648688316, + -0.019891027361154556, + -0.0006818202091380954, + 0.009804066270589828, + -0.015196745283901691, + 0.016257598996162415, + 0.038438305258750916, + 0.0013603252591565251, + -0.038650475442409515, + -0.014330380596220493, + -0.006665704306215048, + -0.010573185980319977, + 0.002225585049018264, + 0.0115986792370677, + 0.009768704883754253, + -0.0003409101045690477, + -0.017123963683843613, + 0.01384415477514267, + -0.024134445935487747, + 0.013269525952637196, + -0.03202013298869133, + 0.00774424010887742, + 0.020474497228860855, + -0.007708878256380558, + -0.00941508635878563, + -0.012217511422932148, + 0.019289877265691757, + 0.0458996519446373, + 0.0014332589926198125, + -0.01840583048760891, + 0.012111425399780273, + 0.03571544587612152, + 0.0047296443954110146, + -0.0006983960629440844, + -0.025195302441716194, + -0.002559312153607607, + -0.03511429578065872, + 0.015267468988895416, + 0.009963194839656353, + 0.002983654150739312, + -0.01354357972741127, + -0.023533295840024948, + -0.020474497228860855, + 0.021199414506554604, + 0.0227376539260149, + 0.006714326795190573, + 0.008999585174024105, + -0.004278780892491341, + -0.033204756677150726, + 0.011430710554122925, + 0.04034784436225891, + 0.02678658440709114, + 0.02344489097595215, + 0.01354357972741127, + -0.016478611156344414, + -0.00024642772041261196, + -0.024541107937693596, + 0.0462886318564415, + -0.026379922404885292, + 0.015152542851865292, + -0.05866527184844017, + -0.021022606641054153, + 0.0232857633382082, + 0.0061750588938593864, + -0.012394320219755173, + 0.0036002760753035545, + 0.05371461436152458, + 0.008111119270324707, + 0.01890089549124241, + -0.01817597821354866, + -0.00027750746812671423, + 0.029615530744194984, + -0.010467100888490677, + 0.0030742688104510307, + -0.020474497228860855, + -0.0001359220186714083, + 0.0023338806349784136, + 0.004906453657895327, + 0.021270139142870903, + -0.00041329136001877487, + 0.02305591106414795, + 0.015691811218857765, + 0.03223230689764023, + -0.008354231715202332, + -0.005741876550018787, + 0.008358651772141457, + 0.03260360285639763, + -0.02802424691617489, + -0.0013890567934140563, + -0.008199523203074932, + 0.043848663568496704, + -0.005498764105141163, + 0.0234979335218668, + -0.026079347357153893, + 0.029244231060147285, + -0.0020653516985476017, + 0.01749526336789131, + 0.007700037676841021, + -0.006250202655792236, + -0.01861800253391266, + -0.029898423701524734, + 0.020686669275164604, + -0.02660977467894554, + 0.01364082470536232, + 0.011085933074355125, + 0.02774135395884514, + -0.025778772309422493, + 0.009052627719938755, + 0.008274667896330357, + -0.045793566852808, + -0.03223230689764023, + -0.03117145039141178, + -0.023886913433670998, + -0.009485810063779354, + -0.03191404789686203, + -0.014180092141032219, + 0.019555089995265007, + -0.015665289014577866, + -0.016841070726513863, + 0.02259620651602745, + -0.03576848655939102, + 0.025690367445349693, + -0.0454753078520298, + -0.003843388520181179, + -0.022419398650527, + -0.024435022845864296, + -0.0052335504442453384, + -0.0472080372273922, + 0.005445721093565226, + -0.014118209481239319, + 0.03709455579519272, + -0.025301387533545494, + -0.01865336298942566, + -0.0012962319888174534, + 0.007540909573435783, + 0.007947570644319057, + 0.025106897577643394, + -0.02724628709256649, + 0.03223230689764023, + 0.001447624759748578, + 0.0014553602086380124, + 0.01828206516802311, + 0.017230050638318062, + 0.009450447745621204, + -0.0460764616727829, + 0.003438937710598111, + -0.01856495812535286, + -0.012429682537913322, + 0.007311057765036821, + -1.911403342091944e-05, + 0.0016730563947930932, + 0.0036931007634848356, + -0.0028046348597854376, + 0.023427210748195648, + -0.011713605374097824, + -0.009202915243804455, + -0.005503184162080288, + -0.008252566680312157, + 0.010290291160345078, + 0.029898423701524734, + 0.05527053400874138, + -0.0013990022707730532, + 0.014825445599853992, + 0.01776931807398796, + -0.023869233205914497, + -0.014648636803030968, + -0.01883017271757126, + -0.0008741001365706325, + 0.016319483518600464, + -0.01741570048034191, + -0.01904234290122986, + -0.024346617981791496, + 0.005326375365257263, + 0.0024686974938958883, + -0.02669817954301834, + -0.00946812890470028, + -0.013039673678576946, + -0.0012951268581673503, + -0.011846211738884449, + -0.02784743905067444, + -0.019979432225227356, + 0.006303245667368174, + -0.042575638741254807, + 0.017088603228330612, + -0.008102278225123882, + -0.00448432145640254, + -0.0018609161488711834, + -0.019891027361154556, + 0.006373969372361898, + 0.043070703744888306, + -0.016160354018211365, + 0.007107727229595184, + 0.01833510771393776, + 0.020386092364788055, + 0.0017194688552990556, + -0.04147942364215851, + -0.01763671077787876, + -0.008897919207811356, + -0.038721200078725815, + -0.01865336298942566, + 0.02694571204483509, + 0.04063073918223381, + 0.038190774619579315, + -0.021358544006943703, + -0.03177260234951973, + -0.008314449340105057, + -0.016743825748562813, + 0.056755732744932175, + -0.009105670265853405, + ], + "index": 66, + }, + { + "title": "Carol Bruneau", + "text": "Carol Bruneau (born 1956) is a Canadian writer. She lives in Halifax, Nova Scotia, where she is currently a part-time faculty member of the Nova Scotia College of Art and Design University, where she teaches writing in the foundation program. She has a Master's degree from Dalhousie University.Her book Purple for Sky (2000) won the Thomas Head Raddall Award and the fiction category of the Dartmouth Book Awards in 2001.", + "vector": [ + -0.04255025461316109, + -0.04091265797615051, + -0.0324244424700737, + -0.019460123032331467, + -0.005799826234579086, + -0.002688390202820301, + -0.040776193141937256, + -0.03392557427287102, + -0.013189488090574741, + 0.052512310445308685, + -0.002818033332005143, + -0.03245173394680023, + 0.004772915970534086, + -0.021206894889473915, + 0.010849087499082088, + -0.027593526989221573, + -0.026706494390964508, + 0.03258820250630379, + 0.00674485694617033, + 0.020715614780783653, + 0.00634910399094224, + -0.029831577092409134, + 0.019596589729189873, + 0.013817233964800835, + 0.019896816462278366, + 0.059171877801418304, + 0.024604910984635353, + -0.009354778565466404, + 0.024563970044255257, + -0.026624614372849464, + 0.01645786128938198, + -0.0003518277080729604, + 0.023349419236183167, + -0.022271333262324333, + -0.046098385006189346, + 8.415878255618736e-06, + -0.031223535537719727, + 0.02673378773033619, + -0.03954799473285675, + -0.01347606722265482, + 0.06086406111717224, + -0.040994539856910706, + -0.029422178864479065, + 0.0031489646062254906, + 0.028958192095160484, + -0.07167220860719681, + -0.03436226770281792, + 0.015188721939921379, + -0.016976432874798775, + 0.029422178864479065, + 0.012909730896353722, + 0.0021510531660169363, + 0.0079969372600317, + 0.0014687207294628024, + -0.003759652143344283, + 0.014451802708208561, + -0.009259252808988094, + 0.08209824562072754, + -0.018682263791561127, + 0.0003714447666425258, + -0.015925640240311623, + -0.0032496086787432432, + -0.031223535537719727, + -0.006250165868550539, + 0.012766441330313683, + 0.01705831289291382, + 0.007539774291217327, + 0.004445396363735199, + -0.024031750857830048, + -0.0028316800016909838, + 0.03392557427287102, + -0.05114764720201492, + -0.02610604278743267, + 0.05726134404540062, + 0.0018849435728043318, + -0.017413126304745674, + 0.005045848898589611, + 0.015093195252120495, + 0.0083244564011693, + -0.02420915849506855, + -0.007915057241916656, + -0.02800292707979679, + -0.009743708185851574, + -0.0026986252050846815, + -0.02128877490758896, + -0.03018639050424099, + 0.04729929193854332, + -0.06714151799678802, + -0.003225727006793022, + 0.017508652061223984, + -0.012473038397729397, + -0.032751962542533875, + 0.05698841065168381, + 0.013237250968813896, + 0.016294101253151894, + 0.0017049784073606133, + 0.017467712983489037, + -0.01674444042146206, + -0.03400745242834091, + -0.019924109801650047, + 0.031687524169683456, + 0.042331911623477936, + 0.0626654177904129, + -0.027115894481539726, + 0.01521601527929306, + 0.034962717443704605, + 0.0026815668679773808, + -0.02253061905503273, + 0.0022261098492890596, + 0.027702700346708298, + 0.03597256913781166, + -0.004960557445883751, + -0.024168217554688454, + -0.007717180997133255, + -0.02554653026163578, + 0.025437356904149055, + 0.0170856062322855, + 0.02816668711602688, + -0.0048377374187111855, + -0.006949556525796652, + -0.0194464772939682, + -0.018709557130932808, + -0.029394885525107384, + -0.00681650172919035, + 7.830831600585952e-05, + -0.026269802823662758, + -0.05412261560559273, + 0.0021510531660169363, + 0.04702635854482651, + -0.0010149696609005332, + 0.013141724281013012, + -0.012507155537605286, + -0.03212421387434006, + -0.02953135222196579, + -0.028084807097911835, + -0.02364964596927166, + -0.005605361890047789, + -0.01789075881242752, + 0.011517773382365704, + 0.005380191840231419, + 0.03302489593625069, + 0.007580714300274849, + 0.07745838910341263, + -0.006055701058357954, + -0.06523098796606064, + -0.06594061851501465, + -0.022025693207979202, + 0.024714084342122078, + -0.0006550392135977745, + -0.057861797511577606, + 0.016157634556293488, + 0.004366928245872259, + 0.02955864556133747, + 0.017781585454940796, + 0.0073623680509626865, + 0.03392557427287102, + -0.02772999368607998, + -0.02486419677734375, + -0.0026099218521267176, + 0.03171481564640999, + -0.031660228967666626, + 0.006506040692329407, + -0.03313406556844711, + -0.00493326410651207, + 0.017440419644117355, + -0.039165887981653214, + -0.039848219603300095, + 0.04396950826048851, + 0.019501063972711563, + 0.017904404550790787, + -0.015543535351753235, + -0.007034848444163799, + 0.04467913508415222, + -0.007553420960903168, + -0.04462454840540886, + -0.003626597346737981, + 0.025587469339370728, + -0.010507920756936073, + -0.018054518848657608, + 0.010364631190896034, + -0.0016196868382394314, + 0.00016248042811639607, + 0.011340366676449776, + -0.03398016095161438, + 0.005885118152946234, + 0.008965848945081234, + 0.009375249035656452, + 0.010787677019834518, + -0.022298626601696014, + -0.05666089430451393, + -0.020251629874110222, + -0.05136599391698837, + 0.017754292115569115, + -0.0415131114423275, + 0.04945546016097069, + 0.0006149521796032786, + -0.05344028398394585, + -0.00014499566168524325, + -0.045825451612472534, + -0.021015841513872147, + -0.001722036744467914, + -0.0201015155762434, + -0.008112933486700058, + -0.0019378244178369641, + 0.01291655469685793, + 0.06550392508506775, + 0.014615562744438648, + 0.04596192017197609, + 0.016826320439577103, + -0.015407068654894829, + 0.04334176331758499, + -0.005110670812427998, + 0.017972638830542564, + -0.01754959300160408, + -0.024263745173811913, + -0.0012734030606225133, + -0.04459725320339203, + -0.005509835202246904, + -0.024441150948405266, + 0.004680801182985306, + 0.04593462496995926, + 0.0380195677280426, + 0.011538242921233177, + 0.0010055875172838569, + -0.013414657674729824, + 0.022639792412519455, + -0.027347886934876442, + 0.08952202647924423, + -0.014001463539898396, + -0.03378910571336746, + -0.01718113385140896, + 0.031414590775966644, + -0.028357740491628647, + 0.068342424929142, + 0.005670183338224888, + 0.020865729078650475, + -0.038756486028432846, + -0.001960000256076455, + 0.020838435739278793, + -0.0009143255883827806, + -0.02566934935748577, + -0.0009927938226610422, + -0.00801058392971754, + -0.03711888939142227, + 0.01978764310479164, + -0.06326587498188019, + 0.020306216552853584, + -0.021643588319420815, + -0.02676108106970787, + 0.0183547455817461, + -0.021206894889473915, + 0.001458485727198422, + 0.009388895705342293, + -0.011265309527516365, + 0.006622036918997765, + 0.03359805420041084, + -0.03392557427287102, + 0.0036811840254813433, + 0.028466911986470222, + 0.061409927904605865, + 0.0008064317516982555, + 0.012377511709928513, + 0.009040906094014645, + 0.050519898533821106, + -0.022735320031642914, + -0.06479429453611374, + -0.032779254019260406, + -0.04923711344599724, + -0.000881061889231205, + -0.008147050626575947, + 0.023008253425359726, + -0.06577685475349426, + 0.0657222718000412, + 0.04421514645218849, + -0.053140055388212204, + 0.0038142388220876455, + 0.0030824372079223394, + -0.07374650239944458, + -0.03258820250630379, + 0.005748651456087828, + -0.003633420681580901, + -0.020715614780783653, + 0.002077702432870865, + -0.031414590775966644, + -0.02427739091217518, + -0.010746737010776997, + 0.012131872586905956, + 0.007321428041905165, + 0.07232724875211716, + -0.04023032635450363, + 0.00872703269124031, + 0.005195962265133858, + -0.008651976473629475, + -0.028494205325841904, + 0.027184126898646355, + -0.021029489114880562, + 0.030814137309789658, + -0.05390426889061928, + 0.035890690982341766, + 0.013380540534853935, + 0.034526024013757706, + -0.03367993235588074, + -0.013987816870212555, + -0.027279654517769814, + -0.007123551331460476, + 0.004097406752407551, + -0.011742942966520786, + 0.008235753513872623, + 0.04156769812107086, + -0.003565187333151698, + -0.039165887981653214, + 0.007573890965431929, + 0.015052255243062973, + -0.047626812011003494, + 0.04478830844163895, + 0.003411662532016635, + -0.017849819734692574, + 0.032997600734233856, + -0.0016700088744983077, + -0.01611669361591339, + 0.020742908120155334, + -0.013612533919513226, + -0.007689887657761574, + -0.032724667340517044, + 0.039411526173353195, + -0.0055575985461473465, + -0.00429528346285224, + -0.02467314340174198, + 0.010030288249254227, + 0.025355476886034012, + -0.04530688002705574, + -0.02072926238179207, + 0.03971175104379654, + 0.038510847836732864, + 0.04525229334831238, + 0.009184195660054684, + -0.011415422894060612, + 0.019269069656729698, + 0.009914292022585869, + 0.022926373407244682, + -0.020865729078650475, + -0.0021544648334383965, + 0.02974969893693924, + 1.384655297442805e-05, + -0.015093195252120495, + -0.03215150907635689, + 0.027593526989221573, + 0.040312204509973526, + 0.0021834641229361296, + 0.0036914190277457237, + 0.0007079200004227459, + 0.07571161538362503, + 0.0032803136855363846, + -0.012739147990942001, + 0.012036345899105072, + -0.022134866565465927, + 0.0363546758890152, + -0.05502329394221306, + -0.00657427404075861, + 0.004749034531414509, + 0.028685258701443672, + 0.02629709616303444, + 0.007150844670832157, + 0.012015875428915024, + 0.050274260342121124, + -0.024850551038980484, + 0.02231227420270443, + 0.018504858016967773, + 0.026706494390964508, + 0.027470707893371582, + -0.022571559995412827, + 0.058735184371471405, + -0.017699705436825752, + -0.07915057241916656, + -0.018900610506534576, + -0.03105977736413479, + -0.058516837656497955, + 0.012902908027172089, + -0.026037808507680893, + -0.008078817278146744, + -0.01353747770190239, + 0.05202103033661842, + -0.02763446792960167, + 0.004994674120098352, + -0.016007520258426666, + 0.044488079845905304, + -0.012206928804516792, + 0.0319877490401268, + 0.04991944879293442, + -0.02190287411212921, + -0.03485354408621788, + -0.06943415850400925, + 0.040093857795000076, + -0.04255025461316109, + 0.011176606640219688, + -0.0015633944422006607, + -0.01839568465948105, + 0.031632937490940094, + 0.0639754980802536, + 0.019801290705800056, + -0.05709758400917053, + 0.009409365244209766, + -0.03818332776427269, + -0.004093995317816734, + 0.04121288284659386, + 0.005185727030038834, + 0.024918783456087112, + -0.028030220419168472, + 0.008897616527974606, + 0.004261166788637638, + -0.004984438885003328, + 0.00463644927367568, + 0.011354013346135616, + 0.05698841065168381, + -0.01293020136654377, + 0.031223535537719727, + 0.04268672317266464, + 0.03258820250630379, + -0.048281848430633545, + 0.03550858423113823, + 0.026256155222654343, + -0.0023557529784739017, + -0.04241378977894783, + 0.002323342254385352, + 0.005840766243636608, + 0.01667620614171028, + -0.038074154406785965, + -0.00871338602155447, + 0.014233455993235111, + 0.031141655519604683, + 0.00932066235691309, + -0.06086406111717224, + 0.03493542596697807, + 0.02000598981976509, + 0.019214482977986336, + 0.051857270300388336, + -0.04620755836367607, + -0.025232655927538872, + 0.02934029884636402, + 0.026365328580141068, + -0.025914989411830902, + -0.019924109801650047, + -0.03550858423113823, + -0.023144720122218132, + -0.010903674177825451, + 0.026269802823662758, + -0.023349419236183167, + -0.015952933579683304, + -0.004527276381850243, + -0.020278923213481903, + -0.05035613849759102, + 0.028112100437283516, + 0.008883969858288765, + -0.049619220197200775, + 0.026215216144919395, + 0.017808878794312477, + -0.04241378977894783, + 0.034553319215774536, + -0.07434695214033127, + 0.019842229783535004, + -0.03436226770281792, + 0.023267539218068123, + -0.05567833408713341, + -0.014915788546204567, + 0.000462706753751263, + -0.002430809661746025, + -0.003957528620958328, + -0.0450066514313221, + -0.03247902914881706, + 0.0018798260716721416, + 0.05281253904104233, + -0.00415540486574173, + -0.042113564908504486, + -0.012670914642512798, + 0.056933823972940445, + -0.018996138125658035, + 0.05477765575051308, + -0.0005833943141624331, + -0.012466215528547764, + 0.023704232648015022, + 0.023008253425359726, + -0.013066668063402176, + 0.00721225468441844, + 0.03736452758312225, + -0.001951470971107483, + 0.0067789736203849316, + -0.03987551108002663, + -0.03065037727355957, + -0.007260018028318882, + -0.0038824721705168486, + -0.0003995909937657416, + 0.05245772376656532, + 0.046316731721162796, + -0.05797097086906433, + -0.005073142237961292, + 0.010214517824351788, + -0.002338694641366601, + -0.056060440838336945, + -0.001481514540500939, + 0.0028487383387982845, + 0.02972240559756756, + 0.03913859277963638, + 0.04637131839990616, + -0.03578151762485504, + -0.008706563152372837, + 0.005642889998853207, + 0.004059878643602133, + -0.030131803825497627, + 0.02112501487135887, + -0.008235753513872623, + -0.015639061108231544, + 0.060918647795915604, + 0.024727730080485344, + 0.0037630638107657433, + 0.006369573995471001, + -0.010412394069135189, + 0.013598887249827385, + -0.013469244353473186, + -0.03179669380187988, + 0.009054552763700485, + 0.05024696886539459, + -0.012084108777344227, + 0.016143986955285072, + -0.03728264942765236, + 0.0075943609699606895, + -0.025341829285025597, + 0.058080144226551056, + 0.013735353946685791, + 0.022203100845217705, + -0.023690585047006607, + 0.017686059698462486, + 0.030350150540471077, + 0.01783617213368416, + -0.013360070995986462, + 0.03769204765558243, + -0.016375981271266937, + 0.04571627825498581, + -0.025287242606282234, + -0.02663826197385788, + -0.001462750369682908, + -0.03307948261499405, + 0.0008213577675633132, + -0.007928703911602497, + -0.06850618869066238, + 0.018805084750056267, + -0.017699705436825752, + 0.01689455285668373, + 0.004360104911029339, + -0.019610237330198288, + 0.004564804490655661, + -0.044761013239622116, + 0.04855478182435036, + -0.01120389997959137, + 0.03690054267644882, + 0.028494205325841904, + -0.0019292952492833138, + -0.019487416371703148, + -0.02128877490758896, + 0.0315510556101799, + 0.008467746898531914, + -0.0049366760067641735, + -0.004899147432297468, + 0.06801490485668182, + -0.025464650243520737, + -0.0026713318657130003, + -0.007915057241916656, + -0.007403308060020208, + -0.00390635384246707, + -0.014697442762553692, + -0.035808809101581573, + -0.011026493273675442, + 0.006594744045287371, + 0.04959192872047424, + -0.046289440244436264, + -0.01898249052464962, + 0.0060898177325725555, + -0.009655005298554897, + -0.022762613371014595, + -0.01995140314102173, + 0.03769204765558243, + -0.009825588203966618, + -0.02685660868883133, + -3.1651165954826865e-06, + 0.007580714300274849, + -0.016853613778948784, + 0.002002645982429385, + -0.03799227625131607, + -0.008617859333753586, + 0.004175874870270491, + 0.007348721381276846, + 0.0025229244492948055, + -0.012022699229419231, + 0.039657168090343475, + -0.034962717443704605, + -0.007710357662290335, + 0.03108707070350647, + 0.014547329396009445, + 0.030077217146754265, + -0.02863067202270031, + -0.04620755836367607, + 0.0052369022741913795, + 0.002659390913322568, + -0.040967244654893875, + -0.006850618403404951, + -0.007880941033363342, + 0.0015096607385203242, + 0.025027956813573837, + 0.008242577314376831, + 0.038483552634716034, + -0.02433197759091854, + -0.0415131114423275, + -0.008604212664067745, + -0.0034304268192499876, + 0.038292501121759415, + 0.013844527304172516, + -0.027457060292363167, + -0.0209749024361372, + 0.009996171109378338, + -0.01194764208048582, + 0.007130374666303396, + 0.00352083588950336, + -0.01978764310479164, + 0.012984788045287132, + 0.02505525015294552, + 0.017413126304745674, + -0.06708693504333496, + 0.015584474429488182, + -0.00986652821302414, + 0.022298626601696014, + -0.008051523938775063, + 0.011142490431666374, + -0.006120522506535053, + 0.006082994397729635, + -0.005472306627780199, + -0.009771001525223255, + 0.04145852476358414, + 0.026965782046318054, + 0.0367913693189621, + -0.015925640240311623, + 0.03599986433982849, + -0.005601949989795685, + 0.04421514645218849, + -0.028466911986470222, + 0.015693647786974907, + -0.03086872398853302, + -0.039848219603300095, + 0.0052266670390963554, + -0.013196310959756374, + 0.05079283192753792, + 0.005540539976209402, + -0.003971175290644169, + 0.04724470525979996, + 0.02396351844072342, + 0.014465449377894402, + 0.02034715563058853, + 0.013612533919513226, + -0.00871338602155447, + -0.014588269405066967, + -0.024468444287776947, + -0.009388895705342293, + -0.04170416295528412, + -0.034526024013757706, + -0.0205382090061903, + 0.0024768670555204153, + -0.011831645853817463, + 0.03395286574959755, + 0.0024376329965889454, + 0.0007057876791805029, + 0.004875265993177891, + 0.0007224195869639516, + 0.0022073457948863506, + 0.027034014463424683, + 0.016225866973400116, + 0.0013373717665672302, + 0.004926440771669149, + -0.015761882066726685, + 0.00634910399094224, + 0.001500278594903648, + 0.00852915644645691, + 0.016594326123595238, + -0.023158365860581398, + 0.014206163585186005, + -0.007321428041905165, + -0.021275127306580544, + 0.0016947434050962329, + -0.005677006673067808, + 0.015175075270235538, + 0.021616294980049133, + -0.0024359270464628935, + 0.006239931099116802, + -0.0004678242257796228, + -0.003288842737674713, + 0.009757354855537415, + -0.004670565947890282, + -0.003943881951272488, + -0.00588852958753705, + -0.005922646261751652, + -0.02579217031598091, + 0.011094726622104645, + 0.025601116940379143, + -0.015516242012381554, + -0.023376712575554848, + -0.04216815158724785, + 0.045634400099515915, + 0.012800558470189571, + -0.012295631691813469, + -0.008522333577275276, + 0.03065037727355957, + 0.006611802149564028, + -0.054996002465486526, + -0.0027805049903690815, + 0.06130075454711914, + -0.0051686689257621765, + -0.04017573967576027, + 0.02268073335289955, + -0.009156902320683002, + 0.0631021112203598, + 0.006915440317243338, + -0.010992377065122128, + 0.02717048116028309, + -0.00930701568722725, + 0.002365987980738282, + 0.004288460128009319, + 0.002077702432870865, + 0.03447143733501434, + 0.017031019553542137, + 0.0035788340028375387, + -0.062064968049526215, + 0.018245572224259377, + 0.00760118430480361, + -0.01976034976541996, + 0.015611767768859863, + 0.041867922991514206, + 0.005861236248165369, + 0.012616327963769436, + 0.022516973316669464, + 0.007901410572230816, + 0.01269820798188448, + 0.01686725951731205, + -0.0006264665280468762, + 0.0037664754781872034, + -0.007464717607945204, + 0.028985485434532166, + -0.015911994501948357, + -0.006956379860639572, + -0.0015557181322947145, + -0.0036914190277457237, + -0.03040473721921444, + 0.02309013344347477, + -0.005465483292937279, + -0.020156102254986763, + 0.0027634466532617807, + -0.005830531474202871, + -0.0009791471529752016, + -0.04023032635450363, + 0.011729296296834946, + 0.014001463539898396, + -0.034307681024074554, + -0.05354945734143257, + 0.016662560403347015, + 0.0024205746594816446, + -0.004626214504241943, + 0.006819913629442453, + -0.01711289957165718, + 0.006403690669685602, + -0.012841498479247093, + -0.0010448216926306486, + -0.025437356904149055, + 0.014956728555262089, + -0.04978298023343086, + -0.02955864556133747, + 0.007867294363677502, + 0.005202785599976778, + -0.024727730080485344, + 0.01888696476817131, + -0.009184195660054684, + -0.024700436741113663, + -0.01277326513081789, + -0.016266807913780212, + -0.0019088252447545528, + -0.026378976181149483, + 0.02934029884636402, + -0.01779523305594921, + -0.005076554138213396, + -0.007191784679889679, + -0.016321394592523575, + -0.008256223984062672, + -0.008065170608460903, + -0.0250825434923172, + -0.025751229375600815, + 0.011169783771038055, + -0.023226598277688026, + 0.003162611275911331, + -0.021698174998164177, + 0.002925500739365816, + -0.0034338384866714478, + -0.02187558077275753, + 0.0033383117988705635, + 0.07811342924833298, + -0.030568497255444527, + -0.014247102662920952, + 0.008078817278146744, + -0.01562541536986828, + -0.007321428041905165, + 0.024782316759228706, + 0.01465650275349617, + -0.06299293786287308, + -0.02345859259366989, + -0.020592795684933662, + 0.009416189044713974, + 0.03796498104929924, + -0.002367693930864334, + 0.006939321756362915, + -0.01255491841584444, + -0.020824788138270378, + 0.03157835081219673, + -0.027907399460673332, + 0.021520767360925674, + -0.007184961345046759, + -0.006611802149564028, + -0.0032291386742144823, + 0.0004211271007079631, + 0.05556916072964668, + -0.047381170094013214, + -0.015243308618664742, + 0.07036212831735611, + -0.01764511875808239, + -0.019282717257738113, + 0.020388096570968628, + -0.002899913117289543, + -0.004407868254929781, + 0.03534482419490814, + 0.006154639180749655, + -0.013360070995986462, + 0.013837703503668308, + 0.01162012293934822, + 0.00852915644645691, + 0.01851850561797619, + 0.0029272064566612244, + -0.008522333577275276, + 0.0012571976985782385, + -0.011865762993693352, + 0.00877479650080204, + -0.0075261276215314865, + 0.03660031780600548, + 0.036081742495298386, + 0.005458660423755646, + -0.014888495206832886, + -0.042386494576931, + -0.05011050030589104, + 0.0026764492504298687, + 0.026187922805547714, + 0.0015795998042449355, + 0.031114362180233, + 0.00011023935076082125, + -0.00525054894387722, + 0.009873352013528347, + -0.01275961846113205, + -0.038292501121759415, + -0.0419498048722744, + -0.0008051524055190384, + 0.007819530554115772, + 0.01954200305044651, + 0.011340366676449776, + 0.0035413058940321207, + 0.0186140313744545, + -0.006908616982400417, + 0.004882089328020811, + 0.0367913693189621, + -0.026406269520521164, + -0.012090932577848434, + 0.0166489128023386, + 0.023949870839715004, + 0.032315269112586975, + -0.03335241228342056, + -0.027811873704195023, + -0.04301424324512482, + 0.012732325121760368, + 0.03176940232515335, + 0.013687590137124062, + -0.037200767546892166, + 0.03559046611189842, + -0.014165223576128483, + 0.026119688525795937, + -0.022612499073147774, + -0.03709159418940544, + -0.025819461792707443, + -0.008733856491744518, + 0.025901341810822487, + -0.01348971389234066, + -0.007635300979018211, + 0.015911994501948357, + -0.00036611405084840953, + -0.018832378089427948, + 0.004049643408507109, + -0.032779254019260406, + -0.004755857866257429, + 0.003503777552396059, + -0.026938488706946373, + 0.0052266670390963554, + 0.02349953167140484, + 0.004223638214170933, + -0.03643655776977539, + -0.01988316886126995, + 0.00587488291785121, + -0.027238713577389717, + 0.017931697890162468, + 0.010801323689520359, + -0.010173577815294266, + 0.004080348648130894, + -0.06151910126209259, + -0.0024649263359606266, + -0.001286196755245328, + -0.01050109788775444, + 0.014219810254871845, + 0.0350445993244648, + 0.00494008744135499, + 0.05122952535748482, + -0.007184961345046759, + -0.006086406297981739, + -0.0016248043393716216, + -0.02371787838637829, + -0.04847290366888046, + 0.03346158564090729, + -0.04817267507314682, + 0.01954200305044651, + 0.014629209414124489, + -0.0027651526033878326, + -0.003977998625487089, + 0.00031238034716807306, + -0.03157835081219673, + 0.010303220711648464, + 0.008419983088970184, + 0.029886163771152496, + -0.00031195388874039054, + 0.048936888575553894, + -0.02255791239440441, + -0.03490813076496124, + -0.018095457926392555, + -0.02564205601811409, + 0.0017484771087765694, + 0.0046159797348082066, + 0.006639095488935709, + -0.029476765543222427, + -0.014151576906442642, + 0.02931300550699234, + -0.03127812221646309, + -0.026774728670716286, + -0.009948408231139183, + 0.014206163585186005, + 0.06796032190322876, + -0.007908234372735023, + 0.01542071532458067, + 0.042495667934417725, + 0.024563970044255257, + 0.029231125488877296, + -0.014847556129097939, + -0.06823325157165527, + -0.01699008047580719, + -0.01275961846113205, + -0.0017049784073606133, + -0.00018327025463804603, + -0.011913525871932507, + -0.020033283159136772, + -7.425696821883321e-05, + 0.040066566318273544, + 0.00782635435461998, + 0.01888696476817131, + 0.004257754888385534, + 0.0010303221642971039, + 0.016485154628753662, + 0.01978764310479164, + 0.004250931553542614, + 0.046944476664066315, + 0.030814137309789658, + 0.014451802708208561, + 0.011852116324007511, + 0.012445745058357716, + -0.021711820736527443, + 0.006004526279866695, + -0.015243308618664742, + 0.02240779995918274, + 0.0136330034583807, + -0.01795899122953415, + 0.007928703911602497, + 0.0011667886283248663, + 0.030786843970417976, + 0.034089334309101105, + 0.01745406538248062, + 0.005107258912175894, + -0.02156170830130577, + 0.012500331737101078, + -0.04825455695390701, + 0.010153108276426792, + 0.04721741005778313, + 0.03179669380187988, + 0.05666089430451393, + -0.02498701773583889, + 0.009702768176794052, + -0.010248634964227676, + -0.020169749855995178, + -0.019473770633339882, + 0.022858139127492905, + 0.025532882660627365, + 0.010030288249254227, + 0.0367094911634922, + -0.02542370930314064, + 0.07451070845127106, + -0.012520802207291126, + 0.02766176126897335, + 0.011190253309905529, + -0.019214482977986336, + 0.012513978406786919, + 0.022789906710386276, + 0.020183395594358444, + -0.0003586510429158807, + -0.04506123811006546, + 0.06326587498188019, + -0.005533716641366482, + 0.018341097980737686, + 0.04481559991836548, + -0.008549626916646957, + 0.0008081375854089856, + 0.014247102662920952, + -0.015802821144461632, + -0.0079969372600317, + 0.012984788045287132, + 0.015120488591492176, + -0.013517007231712341, + -0.0065367454662919044, + 0.035181064158678055, + 0.014397216029465199, + -0.0029135597869753838, + 0.005462071858346462, + -0.02797563374042511, + 0.01851850561797619, + 0.052512310445308685, + 0.02433197759091854, + -0.03226068243384361, + 0.03482625260949135, + 0.018709557130932808, + 0.03911130130290985, + 0.00486161932349205, + 0.012984788045287132, + 0.005182315595448017, + 0.02816668711602688, + 0.002234638901427388, + -0.006987085100263357, + 0.019965048879384995, + -0.016471507027745247, + 0.009470775723457336, + 0.011504126712679863, + 0.0087611498311162, + 0.016157634556293488, + -0.02433197759091854, + -0.027770934626460075, + -0.03597256913781166, + -0.014451802708208561, + 0.005035614129155874, + 0.010091697797179222, + -0.0008179461001418531, + -0.011169783771038055, + -0.013046197593212128, + -0.002986910520121455, + -0.013387364335358143, + 0.006311575882136822, + -0.02632438950240612, + -0.01854579709470272, + 0.011169783771038055, + 0.01370806060731411, + 0.010494274087250233, + -0.00010949304851237684, + 0.008303986862301826, + 0.03395286574959755, + 0.029394885525107384, + -0.0012606093659996986, + -0.010043934918940067, + -0.0010388512164354324, + -0.024632204324007034, + -0.024850551038980484, + 0.02228498086333275, + -0.024495737627148628, + -0.0032956660725176334, + -0.02561476267874241, + 0.0004750740190502256, + -0.0266109686344862, + -0.010248634964227676, + -0.0367094911634922, + 0.010562507435679436, + -0.01544800866395235, + -0.005424543749541044, + 0.018873317167162895, + 0.02041538991034031, + -0.02274896577000618, + 0.02299460582435131, + -0.017003726214170456, + -0.029831577092409134, + 0.02296731248497963, + -0.031441882252693176, + -0.021916519850492477, + 0.00814022682607174, + -0.005260783713310957, + -0.028521498665213585, + 0.008283516392111778, + -0.03348888084292412, + 0.03960258141160011, + -0.004701271187514067, + 0.03463519737124443, + 0.019364597275853157, + 0.017495006322860718, + -0.01813639886677265, + -0.011224370449781418, + 0.023049192503094673, + -0.022544266656041145, + 0.06359338760375977, + 0.0019378244178369641, + -0.0008836206397973001, + -0.030295563861727715, + -0.005219843704253435, + -0.03291572257876396, + 0.038510847836732864, + -0.0038858838379383087, + 0.041594989597797394, + 0.011558713391423225, + 0.009129608981311321, + 0.05379509553313255, + 0.011729296296834946, + 0.014151576906442642, + -0.015052255243062973, + -0.015024961903691292, + -0.005049260798841715, + 0.013209957629442215, + -0.010357807390391827, + 0.01956929638981819, + 0.015843762084841728, + 0.016880907118320465, + -0.033188652247190475, + 0.0029988514725118876, + 0.011476833373308182, + 0.005922646261751652, + -0.056060440838336945, + -0.02134336158633232, + 0.030268270522356033, + 0.02822127379477024, + 0.005680418107658625, + 0.024700436741113663, + -0.01589834690093994, + 0.002679860917851329, + -0.010978730395436287, + 0.035399410873651505, + -0.048309143632650375, + 0.00463644927367568, + 0.00010848021338460967, + 0.02931300550699234, + 0.03269737586379051, + 0.006250165868550539, + 0.028385033831000328, + 0.018504858016967773, + 0.003933647181838751, + 0.0023284596391022205, + -0.0006780679686926305, + 0.0035174242220818996, + 0.011408600024878979, + -0.015502595342695713, + -0.026815667748451233, + 0.04656236991286278, + -0.016580680385231972, + -0.024468444287776947, + 0.0021834641229361296, + 0.01608940027654171, + -0.012268338352441788, + -0.014533682726323605, + -0.0367913693189621, + 0.006775562185794115, + -0.02168452739715576, + -0.016253160312771797, + -0.02819398045539856, + -0.001092584920115769, + 0.013196310959756374, + -0.025601116940379143, + 0.03395286574959755, + 0.02107042819261551, + -0.002104995772242546, + -0.009545831941068172, + -0.01159282959997654, + -0.019460123032331467, + 0.009996171109378338, + -0.011510949581861496, + -0.007805883884429932, + -0.017495006322860718, + 0.027429766952991486, + -0.022325919941067696, + 0.014479096047580242, + 0.011429069563746452, + 0.022080279886722565, + -0.00391317717730999, + 0.009600418619811535, + 0.004220226779580116, + -0.006314987316727638, + 0.05082012712955475, + 0.0025246303994208574, + 0.024482090026140213, + 0.00760800763964653, + 0.026338035240769386, + 0.008802089840173721, + 0.03354346752166748, + 0.012145519256591797, + -0.026474501937627792, + 0.01733124628663063, + 0.0055951266549527645, + -0.0009612359572201967, + -0.02887631207704544, + 0.001180435298010707, + 0.018654970452189445, + -0.031660228967666626, + -0.007150844670832157, + -0.004663742613047361, + 0.004073525313287973, + -0.028794432058930397, + -0.0019292952492833138, + -0.001096849562600255, + 0.0011335249291732907, + -0.049400873482227325, + -0.006884735077619553, + 0.006881323643028736, + 0.010337337851524353, + 0.00020064841373823583, + -0.01655338704586029, + 0.03796498104929924, + 0.01596658118069172, + 0.004994674120098352, + -0.0034543084912002087, + 0.004639861173927784, + 0.0402030311524868, + -0.018122751265764236, + 0.009136432781815529, + 0.0067994436249136925, + -0.01565270870923996, + -0.01655338704586029, + -0.016444213688373566, + 0.01089002750813961, + -0.03771934285759926, + 0.0367094911634922, + 0.015038608573377132, + -0.018190985545516014, + 0.020210688933730125, + 0.017153840512037277, + 0.036982424557209015, + -0.06386632472276688, + -0.0019889993127435446, + -0.013967346400022507, + -0.0012094343546777964, + 0.003974586725234985, + -0.03269737586379051, + -0.006622036918997765, + 0.03436226770281792, + -0.04290506988763809, + 0.013482891023159027, + -0.04380574822425842, + -0.025505589321255684, + 0.01143589336425066, + 0.0190097838640213, + 0.018927903845906258, + 0.007567067630589008, + 0.024850551038980484, + -0.03935693949460983, + -0.007955997250974178, + -0.022448740899562836, + 0.02128877490758896, + -0.012473038397729397, + -0.014042403548955917, + 0.026406269520521164, + 0.003411662532016635, + -0.02999533712863922, + -0.017726998776197433, + -0.01895519718527794, + -0.02707495540380478, + -0.018504858016967773, + -0.019241776317358017, + -0.016321394592523575, + 0.01973305642604828, + 0.015161428600549698, + -0.007785413879901171, + -0.002577511128038168, + 0.008065170608460903, + -0.02822127379477024, + 0.032943014055490494, + 0.0023779289331287146, + -0.017604179680347443, + -0.016157634556293488, + -0.013592063449323177, + 0.009225135669112206, + 0.02240779995918274, + -0.020674675703048706, + 0.021820994094014168, + 0.010548860765993595, + 0.0064412192441523075, + -0.006079582963138819, + 0.023513179272413254, + 0.013885467313230038, + 0.009764178656041622, + -0.0019275894155725837, + 0.02228498086333275, + -0.029258418828248978, + -0.01910531148314476, + -0.009716414846479893, + -0.012036345899105072, + -0.002043585991486907, + 0.01089002750813961, + 0.016362333670258522, + 0.03425309434533119, + -0.045607104897499084, + -0.010200871154665947, + -0.029149245470762253, + 0.011108373291790485, + -0.023663291707634926, + 0.03280654922127724, + -1.7498097804491408e-05, + 0.02190287411212921, + 0.008979495614767075, + 0.013571593910455704, + -0.00549277663230896, + -0.0008844735566526651, + 0.004274813458323479, + 0.016512447968125343, + -0.015229661948978901, + -0.056933823972940445, + -0.05043802037835121, + -0.045634400099515915, + -0.04721741005778313, + 0.002662802580744028, + -0.012568565085530281, + -0.014247102662920952, + 0.015830114483833313, + -0.002168111503124237, + 0.016485154628753662, + 0.008672446012496948, + -0.02175276167690754, + -0.018846023827791214, + -0.02479596436023712, + 0.0012358748354017735, + 0.0083244564011693, + 3.912750617018901e-05, + 0.009798294864594936, + 0.02586040273308754, + -0.00029596174135804176, + 0.006871088407933712, + -0.027702700346708298, + 0.01973305642604828, + -0.025805816054344177, + 0.011551889590919018, + -0.006352515891194344, + -0.015270601958036423, + -0.03062308393418789, + 0.001891766907647252, + 0.02863067202270031, + 0.020237982273101807, + 0.006734622176736593, + -0.025314535945653915, + 0.013291837647557259, + 0.0027805049903690815, + -0.013298660516738892, + -0.0069632031954824924, + 0.028903605416417122, + -0.00415540486574173, + 0.026051456108689308, + -0.012343395501375198, + 0.031196242198348045, + 0.016375981271266937, + -0.0009561184560880065, + 0.02860337868332863, + 0.02333577163517475, + 0.0031677286606281996, + 0.02294001914560795, + -0.023608705028891563, + -0.019773997366428375, + -0.0026099218521267176, + -0.046535078436136246, + -0.008911263197660446, + 0.0021954048424959183, + 0.04350552335381508, + 0.018627677112817764, + -0.02586040273308754, + 0.02934029884636402, + 0.012739147990942001, + -0.013373717665672302, + 0.011135666631162167, + -0.01795899122953415, + 0.008031053468585014, + -0.024468444287776947, + 0.014042403548955917, + -0.004264578223228455, + 0.007082611788064241, + -0.012268338352441788, + 0.00822893064469099, + 0.031878575682640076, + -0.008767972700297832, + 0.03987551108002663, + -0.007799060549587011, + 0.02156170830130577, + 0.0060727596282958984, + -0.010514744557440281, + -0.013783116824924946, + 0.013783116824924946, + -0.003270078683272004, + -0.017276659607887268, + 0.0100507577881217, + -0.010780854150652885, + 0.005926058162003756, + -0.006826736964285374, + -0.001264873892068863, + 0.03657302260398865, + 0.03621821105480194, + 0.01845027133822441, + 0.0183547455817461, + -0.011831645853817463, + -0.01176341250538826, + 0.006601567380130291, + 0.0033417234662920237, + 0.015038608573377132, + 0.0016418626764789224, + 0.03649114444851875, + 0.017222072929143906, + -0.019091663882136345, + -0.007669417653232813, + 0.0003049173392355442, + 0.01442450936883688, + 0.0010832028929144144, + -0.027457060292363167, + 0.013209957629442215, + 0.011108373291790485, + 0.027689054608345032, + 0.011347189545631409, + -0.0075943609699606895, + 0.03463519737124443, + 0.01486120279878378, + 0.018996138125658035, + 0.009614065289497375, + 0.05032884702086449, + -0.019623883068561554, + -0.021179601550102234, + -0.013018904253840446, + 0.03624550253152847, + -0.005680418107658625, + 0.006601567380130291, + -0.004042820073664188, + 0.019269069656729698, + -0.012084108777344227, + -0.025505589321255684, + -0.02194381318986416, + 0.016853613778948784, + -0.008263046853244305, + -0.035890690982341766, + -0.007915057241916656, + 0.010432864539325237, + -0.019364597275853157, + 0.01602116785943508, + 0.040039271116256714, + 0.002475161338225007, + -0.00399164529517293, + -0.027088601142168045, + -0.0005680418107658625, + -0.003111436264589429, + 0.009211488999426365, + -0.0038961186073720455, + 0.037146180868148804, + -0.012043168768286705, + 0.0032496086787432432, + -0.024045398458838463, + -0.033215947449207306, + -0.019610237330198288, + 0.008570096455514431, + -0.04549793154001236, + 0.026215216144919395, + 0.015789175406098366, + -0.0014533682260662317, + 0.021247833967208862, + -0.017999932169914246, + 0.0047797393053770065, + -0.004926440771669149, + 0.006492394022643566, + -0.00416905153542757, + -0.005383603740483522, + 0.0071576680056750774, + 0.026338035240769386, + 0.023936225101351738, + 0.016935493797063828, + 0.0350445993244648, + 0.028248567134141922, + 0.01786346547305584, + 0.015407068654894829, + -0.01316219475120306, + -0.005601949989795685, + -0.019801290705800056, + 0.01633504033088684, + -0.013325953856110573, + -0.02253061905503273, + -0.02865796536207199, + 0.006724386941641569, + 0.02950405888259411, + 0.0038927069399505854, + 0.014697442762553692, + 0.00658109737560153, + -0.009095492772758007, + 0.02788010612130165, + 0.02066102810204029, + -0.019037077203392982, + 0.006584508810192347, + -0.0484183169901371, + -0.01543436199426651, + 0.011831645853817463, + 0.002297754865139723, + 0.006386632565408945, + -0.013592063449323177, + -0.060481954365968704, + -0.014465449377894402, + -0.011476833373308182, + -0.020265275612473488, + -0.020579148083925247, + -0.022380506619811058, + 0.016785379499197006, + 0.009614065289497375, + -0.009811941534280777, + -0.002775387605652213, + -0.011545066721737385, + -0.025723936036229134, + 0.005298311822116375, + 0.018777791410684586, + -0.007239548023790121, + 0.044051386415958405, + -0.03239714726805687, + -0.05709758400917053, + -0.0388929545879364, + 0.013189488090574741, + 0.01043968740850687, + -0.013414657674729824, + ], + "index": 67, + }, + { + "title": "Prince Edward\u2014Hastings", + "text": "Prince Edward\u2014Hastings is a federal electoral district in Ontario, Canada, that has been represented in the House of Commons since 1968. Its population in 2006 was 113,227.", + "vector": [ + 0.010339894331991673, + 0.07722382992506027, + -0.02827201969921589, + -0.016543831676244736, + 0.029038473963737488, + -0.0029139702674001455, + 0.013224942609667778, + -0.016890903934836388, + -0.02940000779926777, + -0.0149675402790308, + 0.009906052611768246, + -0.02358652837574482, + -0.026232963427901268, + -0.0027458565309643745, + -0.016601676121354103, + 0.03138121962547302, + -0.02921201102435589, + -0.025394203141331673, + 0.015545995905995369, + 0.016717368736863136, + 0.00785253569483757, + -0.05692003667354584, + -0.07369524985551834, + -0.021561933681368828, + 0.01326832640916109, + 0.02902401238679886, + -0.02394806407392025, + 0.014504775404930115, + 0.014808464795351028, + 0.0177875105291605, + -0.05087517574429512, + 0.012133107520639896, + 0.0362691693007946, + 0.020679788663983345, + -0.002641011495143175, + 0.03569071367383003, + 0.03184398263692856, + -0.042024802416563034, + 0.027751410380005836, + -0.038091305643320084, + 0.02415052242577076, + -0.025914812460541725, + -0.011084656231105328, + 0.012270490638911724, + 0.022935766726732254, + -0.022357311099767685, + -0.043355248868465424, + 0.007306617684662342, + -0.010643583722412586, + 0.010723121464252472, + 0.02789602428674698, + 0.009515595622360706, + -0.06814207136631012, + 0.032277826219797134, + -0.003864806843921542, + 0.022588692605495453, + 0.025495432317256927, + 0.08167793601751328, + -0.007375309709459543, + 0.007411463186144829, + -0.05801910161972046, + 0.007447616662830114, + -0.01833704486489296, + 0.03349258005619049, + 0.00045892319758422673, + 0.06536548584699631, + -0.00850329827517271, + 0.029877234250307083, + 0.011301577091217041, + -0.01852504163980484, + 0.006540164351463318, + 0.012841715477406979, + 0.05859755724668503, + 0.06172121688723564, + -0.014468621462583542, + 0.03719469904899597, + 0.011923417448997498, + 0.006084630265831947, + -0.03774423152208328, + 0.00033328987774439156, + -0.004389032255858183, + -0.024005908519029617, + 0.007910381071269512, + 0.023311762139201164, + -0.036934394389390945, + -0.0025379741564393044, + 0.013470785692334175, + -0.06270459294319153, + -0.027187414467334747, + 0.05804802477359772, + -0.024179445579648018, + 0.01982656680047512, + 0.04112819582223892, + -0.036384861916303635, + 0.016775213181972504, + 0.013167096301913261, + 0.0217210091650486, + -0.003253812901675701, + 0.0265944991260767, + 0.02040502242743969, + 0.01631244830787182, + 0.03279843553900719, + 0.023976987227797508, + 0.042198337614536285, + 0.05558958649635315, + -0.027071723714470863, + -0.05686219036579132, + -0.03138121962547302, + 0.055300358682870865, + 0.02598712034523487, + -0.010889427736401558, + 0.03424457460641861, + 0.015184461139142513, + 0.010065128095448017, + 0.004128727130591869, + -0.026334192603826523, + 0.01587860658764839, + 0.05590773746371269, + 0.020260408520698547, + 0.028966166079044342, + -0.014425237663090229, + 0.023470837622880936, + 0.03759961575269699, + -0.024439750239253044, + 0.016124451532959938, + -0.0030477382242679596, + 0.016326909884810448, + 0.02791048400104046, + -0.01650044694542885, + -0.021966852247714996, + -0.020954554900527, + 0.026623420417308807, + 0.012581409886479378, + -0.0790170431137085, + 0.027635717764496803, + 0.03612455353140831, + 0.02148962765932083, + 0.027635717764496803, + 0.009031138382852077, + 0.03195967525243759, + -0.044772468507289886, + 0.0113305002450943, + 0.03048461303114891, + -0.01008682046085596, + 0.03386857733130455, + 0.021185938268899918, + 0.037339311093091965, + 0.020867787301540375, + -0.012769408524036407, + -0.007736844476312399, + -0.052841924130916595, + -0.0022415155544877052, + 0.006146091036498547, + -0.018756425008177757, + 0.0006222917581908405, + -0.02491697669029236, + 0.02321053296327591, + 0.052870847284793854, + -0.02188008464872837, + 0.05232131481170654, + -0.03945067524909973, + -0.00701015954837203, + 0.004768643528223038, + 0.02360098995268345, + -0.014013088308274746, + 0.02921201102435589, + -0.006626932416111231, + 0.020144717767834663, + -0.027057262137532234, + -0.001793212490156293, + 0.024844670668244362, + -0.017353668808937073, + 0.016688445582985878, + -0.023904679343104362, + -0.036963317543268204, + -0.010151896625757217, + -0.012306643649935722, + -0.020694250240921974, + 0.031207682564854622, + -0.008373145014047623, + -0.037888843566179276, + -0.04063650965690613, + 0.0415620394051075, + -0.007035466842353344, + -0.0211280919611454, + -0.01198126282542944, + 0.040173742920160294, + 0.0021041324362158775, + -0.02190900780260563, + -0.045379843562841415, + -0.052870847284793854, + 0.0453220009803772, + 0.029081856831908226, + 0.03138121962547302, + 0.03167044743895531, + -0.002360822167247534, + 0.020650867372751236, + 0.023673297837376595, + -0.022530848160386086, + 0.021677624434232712, + 0.020694250240921974, + 0.010267587378621101, + 0.006435318849980831, + -0.026840342208743095, + 0.021561933681368828, + 0.04228510707616806, + 0.04451216012239456, + 0.03681870177388191, + 0.010874966159462929, + 0.050817329436540604, + 0.021851161494851112, + -0.03129445016384125, + 0.0029826618265360594, + 0.02264653891324997, + -0.04075219854712486, + 0.058076947927474976, + 0.008640681393444538, + 0.021894546225667, + 0.0052567156963050365, + -0.004374570678919554, + 0.07126573473215103, + 0.011670342646539211, + -0.001473254174925387, + -0.06860484182834625, + -0.013644322752952576, + 0.056399423629045486, + 0.00318150594830513, + 0.02096901647746563, + -0.010303741320967674, + 0.013926319777965546, + -0.02056409791111946, + -0.0144107760861516, + 0.03664516657590866, + 0.04676814004778862, + -0.04231403023004532, + 0.01263202540576458, + 0.025668969377875328, + -0.03496764227747917, + -0.015603841282427311, + 0.02452651970088482, + -0.01759951375424862, + 0.02653665281832218, + 0.0038503454998135567, + -0.030918454751372337, + 0.03242243826389313, + 0.07265403121709824, + 0.039016831666231155, + 0.055097900331020355, + 0.02824309654533863, + 0.036008864641189575, + 0.047433361411094666, + -0.05316007509827614, + 0.01777304895222187, + 0.03372396528720856, + 0.018756425008177757, + -0.010527892969548702, + -0.028286481276154518, + -0.0073355408385396, + 0.008568374440073967, + 0.008900986053049564, + -0.02410713955760002, + -0.019349342212080956, + 0.016760751605033875, + 0.012031877413392067, + -0.023976987227797508, + -0.04419401288032532, + 0.03785992041230202, + -0.004150419030338526, + -0.035285793244838715, + -0.0314679853618145, + 0.021431781351566315, + -0.018944421783089638, + -0.006572702433913946, + 0.03204644098877907, + -0.019595185294747353, + 0.011359422467648983, + -0.020274870097637177, + -0.050209950655698776, + -0.04621860757470131, + 0.036355938762426376, + -0.022371772676706314, + -0.0013729282654821873, + -0.06831561028957367, + -0.014381853863596916, + -0.0254809707403183, + -0.028763707727193832, + 0.018235813826322556, + 0.04989179968833923, + 0.049862876534461975, + -0.0545772910118103, + -0.010267587378621101, + -0.008553912863135338, + 0.05414344742894173, + 0.01495307870209217, + 0.0012454873649403453, + -0.057729873806238174, + -0.041619881987571716, + -0.03343473747372627, + -0.03467841446399689, + -0.031091991811990738, + -0.033781807869672775, + 0.009060061536729336, + 0.020621944218873978, + -0.0044541084207594395, + -0.0004519184585660696, + -0.021619779989123344, + -0.0460161454975605, + 0.024627748876810074, + 0.012848946265876293, + -0.05504005402326584, + -0.003839499317109585, + 0.04130173474550247, + 0.05281300097703934, + 0.009378212504088879, + -0.025394203141331673, + -0.04361555725336075, + 0.0006109937676228583, + 0.013658784329891205, + -0.013767244294285774, + -0.05281300097703934, + -0.025770198553800583, + -0.030455689877271652, + -0.03288520500063896, + -0.006120783742517233, + 0.019595185294747353, + -0.042718950659036636, + 0.029645852744579315, + 0.015256768092513084, + -0.016934288665652275, + -0.001983018359169364, + -0.04844566062092781, + -0.03719469904899597, + -0.006532933562994003, + -0.03028215281665325, + 0.06756361573934555, + 0.02098347805440426, + 0.012834484688937664, + -0.010520662181079388, + 0.017888741567730904, + 0.053593914955854416, + -0.016052143648266792, + 0.08023180067539215, + 0.005075948312878609, + -0.01814904622733593, + -0.004880719352513552, + 0.03195967525243759, + 0.02076655812561512, + 0.029472315683960915, + -0.012689870782196522, + -0.05781664326786995, + 0.0005558597040362656, + 0.006612471304833889, + 0.05501113086938858, + -0.021590856835246086, + 0.02280561439692974, + 0.009255290031433105, + -0.05365176126360893, + -0.011930647306144238, + 0.061258453875780106, + -0.07566200196743011, + 0.002494589891284704, + -0.001463312073610723, + -0.020318254828453064, + 0.053217917680740356, + 0.031178759410977364, + 0.015126614831387997, + 0.007107773795723915, + 0.05307330563664436, + -0.006467857398092747, + -0.015415842644870281, + -0.000620935985352844, + 0.0171945933252573, + -0.039392828941345215, + 0.016008760780096054, + 0.025119436904788017, + 0.04410724341869354, + -0.038640838116407394, + -0.00664139399304986, + -0.017454899847507477, + -0.029645852744579315, + -0.014765080064535141, + 0.01774412766098976, + -0.00955897942185402, + 0.0407232791185379, + -0.021388396620750427, + -0.008734679780900478, + 0.023167148232460022, + -0.018091199919581413, + -0.03624024614691734, + -0.006102707237005234, + 0.009370981715619564, + 0.01628352701663971, + 0.04832996800541878, + -0.003969651646912098, + 0.007386155426502228, + 0.002449398161843419, + -0.0006751662003807724, + 0.0018673271406441927, + 0.05258161947131157, + -0.053767453879117966, + -0.027968330308794975, + -0.005741172470152378, + -0.016196757555007935, + 0.0005667057703249156, + 0.04373124614357948, + -0.0059327855706214905, + 0.003908190876245499, + -0.027447720989584923, + -0.016326909884810448, + 0.022689921781420708, + 0.00954451784491539, + -0.02433852106332779, + 0.0018781732069328427, + -0.012660947628319263, + 0.022892381995916367, + 0.008177916519343853, + -0.037339311093091965, + 0.013940781354904175, + 0.02169208601117134, + -0.016688445582985878, + -0.004725259728729725, + -0.014757849276065826, + -0.01188003271818161, + -0.0183081217110157, + -0.0407232791185379, + 0.0177875105291605, + -0.02133055217564106, + -0.00879975687712431, + 0.047057367861270905, + -0.003595463465899229, + -0.021417319774627686, + -0.01814904622733593, + -0.01036881748586893, + 0.016919827088713646, + -0.07566200196743011, + 0.037339311093091965, + -0.04870596528053284, + -0.03143906593322754, + 0.0516560897231102, + 0.026637881994247437, + -0.043846938759088516, + -0.04364447668194771, + 0.019305957481265068, + -0.021446242928504944, + -0.0006656759069301188, + 0.022487463429570198, + -0.02244407869875431, + -0.04185126721858978, + 0.0250615905970335, + 0.013644322752952576, + 0.0016476947348564863, + 0.027158493176102638, + -0.016341371461749077, + -0.01814904622733593, + 0.013716629706323147, + -0.0011523921275511384, + -0.05851078778505325, + -0.009009446948766708, + -0.028864936903119087, + -0.016052143648266792, + -0.03372396528720856, + 0.0400291308760643, + 0.01757059060037136, + -0.010065128095448017, + -0.02117147669196129, + 0.020433945581316948, + -0.022675462067127228, + 0.007924842648208141, + -0.01384678203612566, + 0.03288520500063896, + -0.03407103568315506, + -0.0030947376508265734, + -0.02809848263859749, + 0.023485299199819565, + -0.0222416203469038, + 0.008676834404468536, + 0.016804136335849762, + -0.02115701511502266, + 0.005636326968669891, + 0.03349258005619049, + 0.010057897306978703, + -0.01929149590432644, + 0.03305874019861221, + -0.012588640674948692, + -0.02490251511335373, + -0.01346355490386486, + -0.05631265789270401, + -0.025741275399923325, + 0.009269751608371735, + 0.032682742923498154, + 0.001627810299396515, + 0.014548159204423428, + 0.028879398480057716, + -0.01477954164147377, + 0.03213321045041084, + -0.006453395821154118, + -0.020477330312132835, + -0.026146195828914642, + 0.05107763409614563, + 0.026073887944221497, + 0.009074523113667965, + 0.029125241562724113, + 0.03739715740084648, + -0.03291412442922592, + 0.00041124579729512334, + -0.007209003437310457, + 0.005629096645861864, + 0.011988493613898754, + -0.06889406591653824, + -0.003293581772595644, + 0.02957354485988617, + 0.03178613632917404, + 0.008626219816505909, + -0.00018980575259774923, + 0.025032667443156242, + -0.011713726446032524, + 0.036355938762426376, + 0.015835223719477654, + -0.06415072828531265, + 0.02733202837407589, + 0.022212697193026543, + 0.01644260250031948, + -0.014251700602471828, + -0.0015835223020985723, + 0.01888657733798027, + 0.025567740201950073, + 0.025683430954813957, + 0.0033640810288488865, + 0.012805561535060406, + -0.017498282715678215, + -0.03514118120074272, + -0.038640838116407394, + 0.0043962630443274975, + 0.004280571825802326, + 0.016688445582985878, + -0.008365915156900883, + -0.02264653891324997, + 0.00021014208323322237, + 0.0215474721044302, + 0.014381853863596916, + -0.04234295338392258, + 0.024280676618218422, + 0.021229322999715805, + -0.015256768092513084, + -0.031525831669569016, + -0.010484508238732815, + 0.0027567027136683464, + 0.01869857870042324, + -0.029240932315587997, + 0.018944421783089638, + 0.03242243826389313, + 0.007924842648208141, + -0.0005906574660912156, + 0.022877920418977737, + 0.01570507138967514, + -0.017859818413853645, + -0.011916186660528183, + 0.010180819779634476, + 0.009313136339187622, + -0.04804074019193649, + 0.02526405081152916, + -0.007715152110904455, + 0.012660947628319263, + -0.02990615740418434, + -0.0426032580435276, + 0.013535861857235432, + 0.01684752106666565, + 0.02955908328294754, + -0.026695728302001953, + 0.016052143648266792, + 0.027418797835707664, + -0.02002902701497078, + 0.004135957919061184, + -0.02561112307012081, + 0.026912648230791092, + 0.02653665281832218, + 0.02711510844528675, + -0.007259618490934372, + 0.034302420914173126, + 0.011995724402368069, + -0.01929149590432644, + -0.011265424080193043, + 0.019190266728401184, + 0.015126614831387997, + -0.011308807879686356, + -0.010390509851276875, + -0.014837387017905712, + -0.051164403557777405, + -0.026883726939558983, + 0.0075199236162006855, + 0.02242961712181568, + 0.03123660571873188, + 0.006417242344468832, + 0.00599063141271472, + 0.0051735625602304935, + 0.03178613632917404, + -0.020159179344773293, + -0.014063702896237373, + 0.031901828944683075, + 0.055676355957984924, + 0.02806955948472023, + 0.05443267524242401, + -0.009920514188706875, + -0.01667398400604725, + -0.02546650916337967, + -0.015126614831387997, + 0.010723121464252472, + -0.019031191244721413, + 0.014273392967879772, + 0.0013901012716814876, + -0.04167772829532623, + -0.03389750048518181, + 0.008105609565973282, + 0.020274870097637177, + -0.017816433683037758, + 0.021070247516036034, + 0.04419401288032532, + 0.03719469904899597, + 0.032104287296533585, + -0.019320419058203697, + 0.051742859184741974, + -0.027635717764496803, + 0.03505441173911095, + 0.04847458377480507, + 0.0189010389149189, + -0.019985642284154892, + -0.025104975327849388, + -0.011959570460021496, + 0.003781653707846999, + -0.0008143570739775896, + -0.01590752974152565, + 0.0031724676955491304, + -0.0051988703198730946, + 0.0018266544211655855, + 0.013810628093779087, + 0.018481658771634102, + 0.019219188019633293, + 0.026334192603826523, + 0.0057050189934670925, + 0.02018810249865055, + 0.03444703295826912, + 0.02357206679880619, + 0.013441863469779491, + -0.03158367797732353, + 0.008445451967418194, + -0.022950228303670883, + -0.008387606590986252, + -0.03612455353140831, + 0.044425394386053085, + -0.006717316340655088, + -0.0011677573202177882, + 0.05093301832675934, + -0.013239403255283833, + -0.0015437535475939512, + -0.043875861912965775, + -0.011207577772438526, + -0.03540148586034775, + -0.009305905550718307, + 0.022675462067127228, + -0.034504879266023636, + -0.016138913109898567, + -0.030455689877271652, + -0.046131838113069534, + 0.002201746916398406, + -0.0009689131984487176, + 0.019493956118822098, + -0.02524958923459053, + 0.009313136339187622, + -0.008778064511716366, + -0.004808412399142981, + -0.013868474401533604, + 0.0037780385464429855, + 0.017816433683037758, + 0.04092573747038841, + -0.004801182076334953, + -0.009869899600744247, + -0.051366861909627914, + 0.006475087720900774, + 0.003085699398070574, + 0.01574845425784588, + 0.014757849276065826, + -0.02096901647746563, + -0.005596558563411236, + 0.023615451529622078, + 0.012111415155231953, + 0.011930647306144238, + 0.0055097900331020355, + 0.02018810249865055, + 9.614565351512283e-05, + 0.006026784889400005, + 0.018279198557138443, + -0.017266901209950447, + 0.02861909382045269, + 0.007903150282800198, + -0.02153301052749157, + 0.006207552272826433, + 0.018105661496520042, + 0.036992236971855164, + -0.025365279987454414, + 0.004844565875828266, + -0.005777325946837664, + 0.01963857002556324, + 0.0006281666574068367, + 0.005357945337891579, + 0.02322499454021454, + -0.04205372557044029, + 0.009804823435842991, + 0.018814269453287125, + -0.03343473747372627, + 0.04381801560521126, + 0.0023481682874262333, + 0.02601604349911213, + -0.00971805490553379, + 0.013825089670717716, + 0.023152686655521393, + -0.00523502379655838, + 0.028734784573316574, + -0.006999313365668058, + 0.01836596615612507, + -0.023702220991253853, + 0.06970390677452087, + 0.009161291643977165, + 0.008365915156900883, + 0.038264840841293335, + -0.009313136339187622, + 0.015184461139142513, + 0.011070194654166698, + -0.006084630265831947, + 0.01644260250031948, + 0.024598825722932816, + -0.03803345933556557, + 0.04882165789604187, + 0.010043435730040073, + 0.014013088308274746, + 0.04118604212999344, + 0.023167148232460022, + -0.0036099248100072145, + -0.006062938366085291, + 0.00859729666262865, + 0.030831685289740562, + 0.041648805141448975, + -0.016211219131946564, + 0.02581358328461647, + -0.021937930956482887, + 0.009566210210323334, + 0.02114255353808403, + 0.021475166082382202, + -0.03086060844361782, + -0.06137414276599884, + 0.03609563410282135, + -0.0006435319082811475, + -0.0007971841841936111, + 0.017874279990792274, + -0.04081004485487938, + -0.01310925092548132, + 0.003358658170327544, + -0.0009553556446917355, + -0.003810576628893614, + 0.03164152428507805, + 0.02825755812227726, + -0.030744917690753937, + 0.009248059242963791, + 0.017932124435901642, + 0.05625481158494949, + 0.012791100889444351, + 0.027794793248176575, + 0.017483821138739586, + -0.002387937158346176, + 0.012747716158628464, + 0.019927797839045525, + 0.023138225078582764, + 0.03352150321006775, + -0.008344222791492939, + -0.00504341023042798, + 0.023051457479596138, + 0.016558293253183365, + -0.044454317539930344, + -0.007386155426502228, + 0.027968330308794975, + 0.0030603918712586164, + 0.014620466157793999, + -0.04095466062426567, + -0.04419401288032532, + 0.0006394646479748189, + -0.03942175209522247, + -0.04656567797064781, + -0.014822926372289658, + -0.009920514188706875, + -0.04994964599609375, + 0.00908175390213728, + -0.0071294656954705715, + 0.0009119714959524572, + 0.0027639332693070173, + 0.018496118485927582, + -0.0060159387066960335, + 0.02809848263859749, + 0.028676938265562057, + 0.006757085211575031, + 0.01947949454188347, + -0.0005418502259999514, + 0.004211880266666412, + 0.012610333040356636, + -0.007143927272409201, + 0.0072704642079770565, + 0.019016729667782784, + 0.01798997074365616, + 0.022906843572854996, + 0.014280623756349087, + 0.02153301052749157, + -0.01188003271818161, + 0.038409456610679626, + 0.004219111055135727, + -0.009934975765645504, + -0.05428806319832802, + 0.02617511712014675, + -0.01010128203779459, + 0.009963898919522762, + -0.013203250244259834, + -0.024598825722932816, + 0.03991343826055527, + -0.003083891700953245, + 0.00917575228959322, + -0.004034728277474642, + -0.03164152428507805, + 0.015054307878017426, + -0.012603102251887321, + 0.0189010389149189, + -0.02938554622232914, + -0.03537256270647049, + 0.012125876732170582, + -0.0047903358936309814, + -0.04352878779172897, + 0.0211280919611454, + -0.020347177982330322, + 0.041793420910835266, + 0.03517010435461998, + 0.02041948400437832, + 0.02355760708451271, + 0.048734888434410095, + -0.004783105105161667, + 0.02433852106332779, + 0.0031164297834038734, + -0.025365279987454414, + -0.018582887947559357, + -0.05738279968500137, + -0.010202511213719845, + -0.0189010389149189, + -0.021894546225667, + -0.03783100098371506, + -0.018611811101436615, + 0.05350714549422264, + 0.017715204507112503, + 0.01346355490386486, + 0.012538026086986065, + -0.0106508145108819, + 0.012856177054345608, + 0.0189010389149189, + 0.01495307870209217, + -0.026840342208743095, + -0.046478912234306335, + 0.03311658650636673, + -0.011417267844080925, + -0.013637091964483261, + 0.007169234566390514, + 0.005549558904021978, + 0.001905288314446807, + 0.038438376039266586, + 0.03421565145254135, + -0.0032574282959103584, + -0.0384962223470211, + -0.021099168807268143, + 0.025350818410515785, + -0.012538026086986065, + -0.06796853989362717, + -0.04020266607403755, + -0.013456324115395546, + -0.02078101970255375, + 0.006861930247396231, + 0.02542312629520893, + -0.0030766609124839306, + -0.022718844935297966, + -0.05214777588844299, + 0.008510529063642025, + 0.009761438705027103, + 0.05093301832675934, + 0.0030314691830426455, + 0.001921557355672121, + 0.05000749230384827, + 0.007838074117898941, + -0.004276956431567669, + 0.032653819769620895, + -0.008582836017012596, + 0.009638517163693905, + -0.0010141050443053246, + 0.02770802564918995, + 0.005929170176386833, + -0.03945067524909973, + 0.035083334892988205, + 0.0005129274795763195, + 0.03476518392562866, + 0.024237291887402534, + -0.02601604349911213, + 0.022487463429570198, + 0.0036731932777911425, + 0.014822926372289658, + -0.01741151511669159, + -0.015126614831387997, + -0.032856281846761703, + 0.009689131751656532, + 0.034302420914173126, + -0.0012825445737689734, + 0.008351453579962254, + -0.001025854959152639, + -0.01945057138800621, + 0.01570507138967514, + 0.005715864710509777, + 0.005520636215806007, + -0.0013702168362215161, + 0.00439264765009284, + -0.021836699917912483, + -0.015112154185771942, + 0.04728874936699867, + -0.034880876541137695, + -0.025206204503774643, + -0.007230695337057114, + 0.005383252631872892, + 0.007866996340453625, + 0.0014850040897727013, + 0.00532540725544095, + 0.01911795884370804, + -0.0008731064735911787, + 0.012986329384148121, + 0.034909799695014954, + 0.011438960209488869, + 0.030397843569517136, + 0.009855438023805618, + 0.005394098814576864, + -0.05145363137125969, + -0.04390478506684303, + 0.05596558377146721, + -0.0040058051235973835, + 0.022530848160386086, + -0.031554754823446274, + -0.00668839318677783, + 0.024222830310463905, + 0.01281279232352972, + 0.0016205796273425221, + 0.02319607138633728, + 0.004269725643098354, + -0.012494642287492752, + -0.02770802564918995, + 0.01302248239517212, + -0.008488836698234081, + 0.026681266725063324, + 0.027982791885733604, + 0.0025831658858805895, + -0.030947377905249596, + -0.0025361664593219757, + 0.0010611045872792602, + 0.015300151892006397, + 0.024251753464341164, + -0.020665327087044716, + 0.014526467770338058, + -0.012682639993727207, + 0.03349258005619049, + -0.02692710980772972, + 0.0028922781348228455, + -0.04135957732796669, + -0.022227158769965172, + -0.024280676618218422, + 0.011207577772438526, + 0.033232275396585464, + 0.023441914469003677, + 0.07496785372495651, + -0.007744074799120426, + 0.023456376045942307, + -0.0018637117464095354, + 0.02658003754913807, + 0.028127405792474747, + 0.008727449923753738, + -0.0007113196770660579, + 0.02318160980939865, + 0.019493956118822098, + -0.026710189878940582, + 0.02564004622399807, + 0.04338417202234268, + 0.04196695610880852, + 0.01741151511669159, + -0.026796957477927208, + 0.02039056085050106, + 0.007274079602211714, + -0.023716680705547333, + 0.027057262137532234, + -0.03308766335248947, + 0.043789092451334, + -0.001374735962599516, + -0.018828731030225754, + -0.01665952242910862, + -0.012306643649935722, + 0.03221997991204262, + 0.021012401208281517, + 0.002337322337552905, + -0.02117147669196129, + 0.00034684743150137365, + -0.030831685289740562, + 0.025018205866217613, + -0.009797592647373676, + 0.05327576398849487, + -0.02245854027569294, + 0.002033633179962635, + -0.01908903568983078, + 0.020332716405391693, + 0.013384017162024975, + 0.001044835546053946, + -0.033752888441085815, + -0.0171945933252573, + -0.009472210891544819, + -0.011077425442636013, + 0.021243782714009285, + 0.010216972790658474, + -0.01741151511669159, + -0.004793951287865639, + -0.0111208101734519, + 0.02169208601117134, + -0.03276951238512993, + 0.044627852737903595, + -0.012241567485034466, + -0.013622630387544632, + 0.01664506085216999, + 0.009573440998792648, + -0.0056797112338244915, + 0.012993560172617435, + -0.006637778598815203, + -0.008517758920788765, + -0.04054974019527435, + 0.008300838060677052, + -0.04133065417408943, + 0.03560394421219826, + -0.021026862785220146, + 0.0028398556169122458, + 0.00696677528321743, + -0.02733202837407589, + 0.004924103617668152, + -0.0035810018889606, + 0.02900955080986023, + 0.013340633362531662, + -0.016572754830121994, + 0.03149690851569176, + 0.012689870782196522, + -0.031352296471595764, + 0.03942175209522247, + -0.008112840354442596, + 0.01758505217730999, + 0.011489574797451496, + -0.01402031909674406, + 0.04627645015716553, + -0.0037744231522083282, + -0.003270082175731659, + -0.013087558560073376, + -0.026811419054865837, + 0.004309494514018297, + -0.010202511213719845, + 0.03878545016050339, + -0.04115711897611618, + -0.02824309654533863, + 0.03820699453353882, + -0.039971284568309784, + 0.0012780254473909736, + 0.03759961575269699, + 0.008720219135284424, + 0.025943735614418983, + -0.003271889640018344, + 0.011742649599909782, + 0.006395550444722176, + 0.019739799201488495, + 0.005632712040096521, + -0.0021222091745585203, + 0.006428088527172804, + -0.0282286349684, + -0.01907457411289215, + 0.009992821142077446, + 0.03534363955259323, + 0.011279884725809097, + 0.014056472107768059, + 0.013781705871224403, + 0.021749932318925858, + 0.019320419058203697, + -0.0010918349726125598, + 0.00859729666262865, + 0.027765870094299316, + -0.005350714549422264, + 0.012046338990330696, + 0.0037888844963163137, + 0.02770802564918995, + -0.0035105026327073574, + 0.009580671787261963, + -0.027028340846300125, + 0.04827212542295456, + -0.01495307870209217, + 0.011344960890710354, + -0.03942175209522247, + -0.01667398400604725, + -0.034157805144786835, + -0.03702116012573242, + 0.019884413108229637, + 0.010925580747425556, + -0.03615347668528557, + 0.004135957919061184, + -0.030542457476258278, + 0.01780197210609913, + 0.025133898481726646, + -0.008257454261183739, + 0.030918454751372337, + -0.011590804904699326, + -0.006084630265831947, + -0.021836699917912483, + 0.02075209654867649, + -0.02229946479201317, + 0.015169999562203884, + -0.006927006412297487, + -0.016399217769503593, + 0.004092573653906584, + -0.0007641941192559898, + 0.017613975331187248, + 0.021648703143000603, + -0.026666805148124695, + -0.004530030768364668, + 0.007917611859738827, + 0.01346355490386486, + -0.0002883239940274507, + 0.02023148536682129, + 0.013731091283261776, + -0.023485299199819565, + -0.010708659887313843, + 0.00683662248775363, + 0.021764393895864487, + 0.005748402792960405, + -0.04769366979598999, + 0.04211157187819481, + -0.018293660134077072, + -0.020795481279492378, + -0.003058584174141288, + -0.0113305002450943, + -0.016731830313801765, + -0.008517758920788765, + -0.022039160132408142, + 0.005676095839589834, + 0.024193907156586647, + -0.012697101570665836, + 0.013543092645704746, + 0.013167096301913261, + 0.007266848813742399, + -0.008185147307813168, + -0.0012744100531563163, + -0.010310972109436989, + 0.02487359195947647, + -0.022212697193026543, + -0.03366611897945404, + -0.013615399599075317, + 0.010766505263745785, + 0.007219849620014429, + -0.005661634728312492, + -0.004812027793377638, + 0.05145363137125969, + -0.043673399835824966, + 0.005021717865020037, + 0.02020256407558918, + -0.016775213181972504, + -0.04092573747038841, + 0.01610998995602131, + 0.0010276626562699676, + 0.02057855948805809, + 0.004443262238055468, + 0.029877234250307083, + -0.008076687343418598, + -0.0434420183300972, + -0.024410828948020935, + 0.04176449775695801, + -0.0003461695450823754, + -0.0012780254473909736, + 0.028315404430031776, + 0.0034924258943647146, + 0.010390509851276875, + -0.007780228275805712, + 0.01927703432738781, + 0.02658003754913807, + -0.0038864989764988422, + 0.024078216403722763, + 0.010455586016178131, + 0.012118645943701267, + -0.019204728305339813, + 0.0282286349684, + 0.01610998995602131, + -0.006149706430733204, + -0.02825755812227726, + 0.010151896625757217, + 0.01644260250031948, + -0.008365915156900883, + -0.007939303293824196, + 0.03010861575603485, + -0.0220680832862854, + 0.006026784889400005, + 0.008821448311209679, + 0.036008864641189575, + -0.0045083388686180115, + 0.0008645200286991894, + 0.0008102898136712611, + -0.036037787795066833, + 0.013904627412557602, + -0.019595185294747353, + 0.013326171785593033, + -0.007910381071269512, + 0.0009372789063490927, + -0.008546682074666023, + -0.002302976557984948, + -0.030831685289740562, + -0.013666014187037945, + 0.0025759353302419186, + 0.014837387017905712, + 0.014446930028498173, + 0.041070349514484406, + -0.030397843569517136, + 0.01699213497340679, + -0.012219875119626522, + -0.0076066916808485985, + 0.017107825726270676, + -0.01702105812728405, + -0.0012536218855530024, + 0.009898821823298931, + -0.01686198264360428, + -0.009667440317571163, + -0.03193075209856033, + 0.011619728058576584, + -0.0017010211013257504, + 0.0016296179965138435, + 0.01189449429512024, + -0.026912648230791092, + 0.023976987227797508, + -0.03392642363905907, + 0.04026051238179207, + 0.0046493373811244965, + 0.03462057188153267, + -0.04323955997824669, + -0.02695603296160698, + 0.024251753464341164, + 0.011431729421019554, + -0.04491708055138588, + -0.013311710208654404, + 0.008011610247194767, + -0.0033243123907595873, + -0.008705757558345795, + 0.013600938022136688, + 0.027765870094299316, + 0.020318254828453064, + -0.006739008240401745, + -0.02020256407558918, + -0.04081004485487938, + 0.023427452892065048, + -0.002415052382275462, + -0.00017726501391734928, + 0.04054974019527435, + -0.021099168807268143, + -0.004750567022711039, + 0.005672480445355177, + -0.002489167032763362, + 0.022342849522829056, + -0.029790466651320457, + -0.007230695337057114, + 0.0028398556169122458, + 0.03447595611214638, + -0.004363724961876869, + 0.009204675443470478, + -0.00815622415393591, + -0.008792526088654995, + -0.014034779742360115, + 0.005177177954465151, + 0.013897396624088287, + -0.007035466842353344, + -0.01610998995602131, + -0.01451200619339943, + -0.024439750239253044, + -0.0299350805580616, + -0.0509619414806366, + 0.02148962765932083, + 0.0006073784315958619, + -0.0020715943537652493, + -0.004721644334495068, + -0.014468621462583542, + -0.020520713180303574, + -0.010419432073831558, + 0.003080276306718588, + 0.024960361421108246, + 0.016413679346442223, + -0.005195254925638437, + -0.007118619978427887, + -0.033810731023550034, + 0.05897355452179909, + -0.021619779989123344, + 0.023282838985323906, + 0.021359475329518318, + 0.01816350780427456, + -0.008445451967418194, + -0.04697059839963913, + 0.029313240200281143, + -0.017845356836915016, + -0.02036163955926895, + -0.05125116929411888, + 0.007339156232774258, + 0.0052024852484464645, + -0.0006656759069301188, + 0.0006516664288938046, + -0.02491697669029236, + 0.0053687915205955505, + -0.018582887947559357, + -0.031525831669569016, + 0.013600938022136688, + 0.026073887944221497, + 0.0381491482257843, + -0.02021702565252781, + -0.023094842210412025, + -0.007975457236170769, + -0.010759275406599045, + -0.005578481592237949, + -0.030571380630135536, + 0.04861919581890106, + -0.0038503454998135567, + -0.0037888844963163137, + 0.019016729667782784, + -0.020057950168848038, + -0.011200346983969212, + 0.02153301052749157, + -0.04676814004778862, + -0.005423021502792835, + -0.009638517163693905, + -0.002984469523653388, + -0.04153311625123024, + -0.0029880849178880453, + -0.04095466062426567, + 0.018799807876348495, + -0.005809864029288292, + 0.0022234388161450624, + 0.044280778616666794, + -0.00014145048044156283, + -0.004573415033519268, + 0.014822926372289658, + 0.007664537522941828, + 0.012002954259514809, + -0.030600303784012794, + 0.015039847232401371, + 0.015473688952624798, + 0.002977238968014717, + -0.01644260250031948, + 0.015300151892006397, + 0.005632712040096521, + 0.007389770820736885, + 0.019146881997585297, + -0.007151158060878515, + 0.01029651053249836, + 0.026464344933629036, + 0.00402388209477067, + 0.01780197210609913, + -0.0016531178262084723, + 0.010918349958956242, + -0.0023734758142381907, + -0.0001516186457592994, + 0.01289956085383892, + -0.00824299268424511, + 0.008445451967418194, + 0.01739705353975296, + 0.011207577772438526, + 0.05498220771551132, + 0.0026446268893778324, + 0.0062979357317090034, + 0.0056507885456085205, + 0.04549553617835045, + 0.019392725080251694, + -0.010260356590151787, + -0.0027621258050203323, + 0.0299350805580616, + 0.012856177054345608, + 0.0403762049973011, + -0.027809254825115204, + -0.002415052382275462, + -0.006467857398092747, + 0.03389750048518181, + -0.009284213185310364, + 0.005929170176386833, + 0.020824402570724487, + 0.024063754826784134, + -0.001542849699035287, + 0.03297197073698044, + 0.07282756268978119, + 0.011077425442636013, + -0.023817911744117737, + -0.004052804782986641, + 0.05101978778839111, + -0.025379741564393044, + 0.010267587378621101, + 0.00871298834681511, + -0.009689131751656532, + 0.023340685293078423, + -0.02302253432571888, + 0.0016314256936311722, + 0.0007565115229226649, + 0.00692339101806283, + -0.05521359294652939, + 0.015647225081920624, + -0.03817807137966156, + 0.006088245660066605, + -0.0014904271811246872, + -0.010535123758018017, + 0.010867735370993614, + 0.03817807137966156, + 0.0039190370589494705, + -0.03644270449876785, + 0.013615399599075317, + 0.0077729979529976845, + 0.03294304758310318, + -0.012046338990330696, + -0.02036163955926895, + -0.005090409889817238, + 0.006048476789146662, + 0.002331899246200919, + 0.012292182072997093, + -0.00787422712892294, + 0.004801182076334953, + 0.003973267041146755, + -0.005444713868200779, + -0.02092563360929489, + 0.023817911744117737, + -0.005086794495582581, + 0.005618250463157892, + -0.04402047395706177, + -0.016919827088713646, + -0.008886524476110935, + 0.006319628097116947, + -0.03178613632917404, + 0.028026176616549492, + -0.007371694315224886, + -0.022979149594902992, + -0.030397843569517136, + -0.00229213060811162, + 0.01924811117351055, + 0.022371772676706314, + -0.01812012307345867, + -0.014150471426546574, + -0.016240142285823822, + -0.026146195828914642, + -0.0009083561017177999, + 0.027245260775089264, + -0.025871429592370987, + -0.04925549775362015, + -0.0509619414806366, + 0.0025668968446552753, + -0.010838812217116356, + 0.002584973582997918, + 0.0018402120331302285, + -0.02338407002389431, + -0.013384017162024975, + -0.01486631017178297, + -0.010896658524870872, + 0.020867787301540375, + 0.027245260775089264, + 0.030397843569517136, + -0.02491697669029236, + 0.018018893897533417, + -0.0005847825086675584, + 0.023311762139201164, + 0.007968226447701454, + 0.0018456350080668926, + 0.005853248294442892, + 0.021778855472803116, + 0.029616929590702057, + 0.0060990918427705765, + -0.02190900780260563, + -0.01887211576104164, + 0.02448313497006893, + 0.03221997991204262, + -0.038091305643320084, + 0.012892330065369606, + 0.013138174079358578, + -0.0009463172755204141, + -0.01981210522353649, + 0.009501134045422077, + 0.025582201778888702, + 0.03028215281665325, + -0.0028814321849495173, + -0.009956668131053448, + 0.028156328946352005, + 0.011525728739798069, + 0.028141867369413376, + -0.006616086233407259, + 0.01177157275378704, + 0.017686281353235245, + -0.012935714796185493, + 0.005047025624662638, + 0.012169260531663895, + 0.0027223569341003895, + 0.024063754826784134, + 0.050788406282663345, + -0.0005454656202346087, + 0.0020426714327186346, + -0.005357945337891579, + -0.030368922278285027, + -0.02376006543636322, + 0.009566210210323334, + 0.0046493373811244965, + -0.02733202837407589, + -0.015126614831387997, + -0.022313926368951797, + -0.04228510707616806, + 0.013976934365928173, + -0.001876365509815514, + 0.016746290028095245, + 0.0013241211418062449, + -0.03890114277601242, + 0.02919754944741726, + -0.030166462063789368, + 0.002651857677847147, + 0.011974032036960125, + -0.013600938022136688, + 0.027722487226128578, + -0.006525702774524689, + 0.030021848157048225, + -0.034736260771751404, + -0.024454211816191673, + -0.007830843329429626, + 0.0006019553984515369, + -0.0019089035922661424, + 0.015010924078524113, + -0.012010185047984123, + -0.020838864147663116, + 0.0021294397301971912, + 0.011626958847045898, + -0.007400617003440857, + 0.008763602934777737, + ], + "index": 68, + }, + { + "title": "Les Insomniaques s'amusent", + "text": "Les Insomniaques s'amusent is the first album by Qu\u00e9b\u00e9cois singer and musician Daniel B\u00e9langer.", + "vector": [ + 0.008316775783896446, + -0.019163016229867935, + -0.015719765797257423, + -0.037081167101860046, + -0.011726918630301952, + -0.02495032735168934, + -0.03212818130850792, + -0.00637663621455431, + 0.02661897987127304, + 0.02170572616159916, + -0.013574355281889439, + -0.013786247931420803, + -0.036710355430841446, + 0.030989259481430054, + -0.003886900842189789, + 0.013408814556896687, + 0.035041701048612595, + -0.011270025745034218, + -0.02691033110022545, + -0.018235987052321434, + 0.009773535653948784, + 0.004582172725349665, + -0.022341402247548103, + 0.018262473866343498, + 0.025771411135792732, + -0.008872993290424347, + 0.009462319314479828, + 0.04979470744729042, + 0.003285987302660942, + -0.0022116266191005707, + 0.0032677778508514166, + -0.053635258227586746, + -0.014170303009450436, + 0.000426681712269783, + -0.00035260216100141406, + -0.03959738835692406, + -0.00029900827212259173, + 0.03501521423459053, + -0.022367889061570168, + -0.05572769418358803, + -0.029029255732893944, + 0.00367169757373631, + -0.020593291148543358, + 0.0076347473077476025, + -0.027122223749756813, + 0.030803853645920753, + -0.06976556777954102, + 0.003135344944894314, + -0.000633193994872272, + 0.015746252611279488, + 0.03978279232978821, + 0.01630247011780739, + -0.007184476125985384, + -0.00806515384465456, + 0.02476492151618004, + 0.014448411762714386, + 0.036577921360731125, + -0.011554756201803684, + 0.040021173655986786, + -0.023745190352201462, + -0.013289624825119972, + -0.002188450889661908, + -0.013733274303376675, + -0.0019864910282194614, + 0.004585483577102423, + 0.02655276283621788, + 0.018050581216812134, + 0.012402325868606567, + 0.034432511776685715, + 0.058482296764850616, + -0.016514362767338753, + 0.0338498055934906, + -0.04137198626995087, + 0.01938815228641033, + -0.008137991651892662, + -0.02961196005344391, + 0.014302735216915607, + -0.011567999608814716, + -0.028128713369369507, + -0.04269631579518318, + -0.0233081616461277, + -0.048046596348285675, + -0.0067640021443367004, + 0.021361399441957474, + 0.007932720705866814, + 0.011793134734034538, + 0.013958410359919071, + -0.04812605679035187, + -0.020950859412550926, + 0.03440602496266365, + 0.030062230303883553, + -0.011183944530785084, + 0.010309888049960136, + 0.014090843498706818, + 0.05763472616672516, + -0.028976282104849815, + 0.0159978736191988, + -0.01668652519583702, + -0.04738443344831467, + -0.03501521423459053, + -0.006432920228689909, + -0.05461525917053223, + -0.0022910863626748323, + -0.06833529472351074, + 0.015865441411733627, + 0.034670889377593994, + 0.05334390699863434, + -0.0015908482018858194, + -0.01918950304389, + -0.010687321424484253, + -0.04582172632217407, + -0.006310419645160437, + -0.007078529801219702, + -0.019414639100432396, + 0.08126072585582733, + 0.021043561398983, + -0.03337305039167404, + -0.050854168832302094, + 0.011660702526569366, + 0.01846112310886383, + 0.0003250809677410871, + -0.027148710563778877, + -0.031916290521621704, + 0.06891799718141556, + -0.0021752077154815197, + 0.0016612031031399965, + 0.04600713402032852, + -0.03631305694580078, + -0.0578995905816555, + 0.039888739585876465, + -0.02244734950363636, + 0.0008666067151352763, + 0.0012109318049624562, + -0.0068136644549667835, + 0.007886369712650776, + -0.0458746999502182, + -0.026102492585778236, + -0.040074147284030914, + 0.009740428067743778, + -0.0019186192657798529, + -0.021798428148031235, + 0.0009833130752667785, + 0.033876292407512665, + 0.015931658446788788, + -0.039703335613012314, + -0.01888490840792656, + -0.039464954286813736, + 0.0017249364173039794, + -0.03864387050271034, + -0.03702819347381592, + 0.029691418632864952, + 0.01679247058928013, + -0.018222743645310402, + -0.011356106959283352, + 0.0013458476169034839, + 0.041186582297086716, + -0.02300356701016426, + -0.03795522078871727, + -0.002582438290119171, + -0.007502314634621143, + -0.027307629585266113, + 0.055409856140613556, + 0.014858952723443508, + -0.025943573564291, + -0.007826774381101131, + -0.0117467837408185, + -0.01594490185379982, + -0.009852995164692402, + 0.06038932874798775, + 0.011799756437540054, + 0.013097597286105156, + -0.013667058199644089, + -0.01667328178882599, + -0.004820551723241806, + 0.019295450299978256, + -0.03538602590560913, + 0.0060621085576713085, + -0.021785184741020203, + 0.01589192822575569, + 0.03141304478049278, + 0.011567999608814716, + 0.03996820002794266, + 0.027916820719838142, + -0.02055356092751026, + 0.0529995821416378, + -0.04274928569793701, + 0.016938146203756332, + -0.029479527845978737, + -0.02212950959801674, + -0.04224604368209839, + -0.02839357778429985, + -0.03448548540472984, + 0.006277311593294144, + -0.023904109373688698, + -0.006793799344450235, + 0.05482715368270874, + -0.02894979529082775, + 0.008654478937387466, + 0.03096277266740799, + -0.05360877141356468, + -0.0008624682086519897, + 0.0077936663292348385, + -0.006413055118173361, + -0.029161687940359116, + 0.017097067087888718, + 0.01889815181493759, + -0.01097205188125372, + 0.06536880135536194, + -0.02177194133400917, + -0.007098394446074963, + 0.02502978779375553, + 0.015441657043993473, + -0.04317307099699974, + 0.0391206294298172, + -0.007290421985089779, + -0.019242476671934128, + -0.027148710563778877, + 0.005529066547751427, + 0.05199309065937996, + -0.015838954597711563, + 0.02655276283621788, + 0.019957613199949265, + 0.010097996331751347, + -0.031624935567379, + 0.02722817100584507, + 0.02152032032608986, + -0.015534359961748123, + 0.046271998435258865, + -0.020262207835912704, + -0.02310951240360737, + 0.013653814792633057, + 0.0839623510837555, + 0.002698316937312484, + 0.059012025594711304, + 0.005886635277420282, + 0.008243937976658344, + -0.010899214074015617, + 0.008111504837870598, + 0.037557922303676605, + -0.011978540569543839, + -0.006624947767704725, + 0.045159563422203064, + -0.012495028786361217, + 0.020924372598528862, + 0.014342465437948704, + -0.0005297309253364801, + 0.0006224338430911303, + 0.043755777180194855, + -0.016461389139294624, + 9.849685011431575e-05, + 0.026460060849785805, + -0.016818957403302193, + 0.00318004097789526, + -0.0013549524592235684, + 0.0007569358567707241, + 0.03967684879899025, + -0.006648123264312744, + 0.029241148382425308, + 0.024685461074113846, + -0.04518605023622513, + -0.04121306911110878, + -0.003966360352933407, + -0.012289757840335369, + 0.017136795446276665, + -0.0391206294298172, + 0.006588528398424387, + 0.01238246075809002, + -0.052152011543512344, + -0.05236390233039856, + -0.01569327898323536, + 0.0030525745823979378, + 0.023824648931622505, + 0.017030850052833557, + -0.013600842095911503, + -0.038299545645713806, + 0.02759898267686367, + -0.004449740052223206, + 0.0115613779053092, + 0.047914162278175354, + -0.05758175253868103, + 0.015772739425301552, + -0.0037941979244351387, + -0.021546805277466774, + -0.041054148226976395, + -0.015521116554737091, + 0.023387620225548744, + 0.030274122953414917, + -0.010389348492026329, + 0.005029133055359125, + -0.01487219613045454, + -0.022487077862024307, + -0.02551978826522827, + -0.01413057278841734, + 0.032234128564596176, + 0.018845178186893463, + 0.01736193150281906, + 0.04658983647823334, + -0.044735778123140335, + 0.0045987265184521675, + 0.004787443205714226, + 0.018474366515874863, + 0.059276893734931946, + -0.009031912311911583, + -0.020407885313034058, + -0.018130041658878326, + 0.03782279044389725, + -0.025480058044195175, + 0.015918415039777756, + -0.03411467373371124, + 0.015017872676253319, + -0.05035092681646347, + 0.007780423387885094, + -0.024301407858729362, + -0.002065950771793723, + -0.026049518957734108, + -0.024870866909623146, + 0.050244979560375214, + -0.028049252927303314, + 0.012653947807848454, + 0.017679769545793533, + 0.051860660314559937, + -0.039517927914857864, + 0.013998140580952168, + -0.009614616632461548, + 0.055833641439676285, + 0.013878950849175453, + 0.04341145232319832, + 0.013693545013666153, + 0.05321147292852402, + -0.03292277827858925, + -0.036524947732686996, + 0.022301672026515007, + -0.02047410048544407, + 0.027519522234797478, + -0.012965165078639984, + 0.012673812918365002, + -0.004578861873596907, + -0.01180637814104557, + -0.0026784520596265793, + 0.02570519410073757, + 0.006462717428803444, + 0.014633817598223686, + 0.01852734014391899, + 0.008475694805383682, + 0.045768752694129944, + 0.04820551723241806, + 0.025347625836730003, + -0.02060653455555439, + -0.028605470433831215, + -0.01864652894437313, + 0.00043330335756763816, + 0.010203942656517029, + 0.0060587977059185505, + -0.030009258538484573, + 0.00431068567559123, + -0.013256517238914967, + 0.0027148709632456303, + -0.03451197221875191, + 0.027916820719838142, + 0.03594224527478218, + -0.02183815836906433, + -0.028658444061875343, + 0.04462983086705208, + 0.03281683102250099, + 0.04831146076321602, + -0.017812203615903854, + 0.016660038381814957, + -0.034856297075748444, + 0.04889416694641113, + -0.0051516336388885975, + 0.013733274303376675, + 0.03898819908499718, + -0.08835911750793457, + -0.021983833983540535, + 0.01247516367584467, + 0.010548267513513565, + 0.041477933526039124, + 0.026155464351177216, + 0.0044464292004704475, + -0.0011877560755237937, + -0.03506818786263466, + -0.020341668277978897, + -0.028790876269340515, + 0.026539519429206848, + -0.0023424040991812944, + -0.0005524927983060479, + 0.017706256359815598, + -0.0045623076148331165, + 0.016103820875287056, + -0.008992183022201061, + 0.06616339832544327, + -0.05064227804541588, + -0.03128061071038246, + -0.04028603807091713, + -0.028711417689919472, + 0.018937882035970688, + -0.020315181463956833, + 0.01797112263739109, + 0.008475694805383682, + -0.023996811360120773, + 0.0036915624514222145, + -0.01582571119070053, + -0.05043038725852966, + -0.041848745197057724, + -0.007091773208230734, + -0.010309888049960136, + 0.04298766702413559, + 0.021189237013459206, + 0.016355443745851517, + -0.000538421852979809, + 0.02778438851237297, + -0.004025955218821764, + -0.04004766047000885, + 0.0360746756196022, + 0.014951655641198158, + 0.02341410703957081, + 0.016765983775258064, + 0.0261289793998003, + -0.0029880136717110872, + 0.03202223405241966, + 0.01685868762433529, + 0.0051450119353830814, + 0.009694076143205166, + -0.002794330706819892, + -0.015348954126238823, + 0.014739763922989368, + 0.019335178658366203, + -0.04505361616611481, + 0.07924775034189224, + -0.037981707602739334, + 0.06060121953487396, + 0.027307629585266113, + -0.03660440817475319, + 0.00403257692232728, + 0.011660702526569366, + -0.014196788892149925, + 0.006264068186283112, + 0.04606010392308235, + -0.03361142799258232, + 0.028287632390856743, + 0.0639914944767952, + -0.008323397487401962, + -0.0229373499751091, + -0.03255196660757065, + 0.02269897051155567, + -0.02097734622657299, + 0.000684925529640168, + 0.04121306911110878, + 0.0023341269697993994, + -0.016090577468276024, + -0.0257581677287817, + -0.09815914183855057, + -0.03286980465054512, + 0.010640970431268215, + -0.004754335153847933, + 0.046987134963274, + 0.005545620806515217, + -0.0006067074718885124, + -0.030062230303883553, + 0.03276385739445686, + -0.025003300979733467, + 0.025466814637184143, + -0.015229764394462109, + -0.005790621507912874, + 0.01699111983180046, + 0.02379816211760044, + 0.0044795372523367405, + -0.009124615229666233, + -0.013190300203859806, + -0.023639243096113205, + -0.03432656452059746, + 0.03475034981966019, + -0.013051246292889118, + -0.018474366515874863, + -0.000686580955516547, + -0.06822934746742249, + -0.055092018097639084, + 0.005449607037007809, + 0.0035988595336675644, + -0.014382194727659225, + 0.020937616005539894, + -0.044232532382011414, + 0.004022644367069006, + -0.030750881880521774, + 0.007177854422479868, + 0.012561244890093803, + 0.04420604556798935, + -0.03602170571684837, + 0.00868096575140953, + 0.0030889934860169888, + 0.014753006398677826, + -0.024804651737213135, + -0.005380080081522465, + 0.027493035420775414, + -0.019467612728476524, + -0.04794064909219742, + 0.014991385862231255, + 0.013455165550112724, + -0.044974155724048615, + 0.01699111983180046, + 0.03837900608778, + 0.023692216724157333, + 0.039147116243839264, + 0.05609850585460663, + 0.010707186535000801, + -0.005813797004520893, + -0.0178519319742918, + -0.014474897645413876, + 0.03030060976743698, + 0.008296910673379898, + -0.01143556647002697, + 0.010991916991770267, + 0.02023572288453579, + 0.003456494305282831, + -0.0023705458734184504, + 0.03072439506649971, + -0.01336908433586359, + -0.048470381647348404, + -0.016328956931829453, + 0.024076271802186966, + 0.049450382590293884, + 0.0011554756201803684, + 0.007191097363829613, + 0.0391206294298172, + -0.023467080667614937, + 0.011971918866038322, + 0.043941181153059006, + 0.02109653502702713, + 0.07485098391771317, + -0.00548602594062686, + 0.05260228365659714, + -0.020897885784506798, + -0.02570519410073757, + 0.01183948665857315, + -0.028896823525428772, + 0.05768769979476929, + -0.004204739350825548, + 0.020129775628447533, + -0.0184478797018528, + 0.0440206415951252, + 0.01009137462824583, + -0.009475561790168285, + -0.049450382590293884, + 0.0015958144795149565, + -0.0009435832616873085, + -0.043808747082948685, + 0.036577921360731125, + 0.00901866890490055, + 0.014925169758498669, + 0.00022534257732331753, + 0.014713277108967304, + 0.008098261430859566, + -0.023281674832105637, + -0.004651699680835009, + -0.048602815717458725, + -0.04351739585399628, + -0.03218115493655205, + -0.03390277922153473, + 0.007588395848870277, + 0.013488274067640305, + -0.029161687940359116, + -0.017626797780394554, + 0.01515030488371849, + -0.015004629269242287, + 0.052761200815439224, + -0.039756305515766144, + 0.01643490232527256, + 0.00446298299357295, + 0.009607994928956032, + 0.0005061413394287229, + 0.037743330001831055, + 0.018540583550930023, + 0.00029962905682623386, + -0.044311992824077606, + 0.013786247931420803, + 0.016726255416870117, + -0.017308957874774933, + -0.008661100640892982, + 0.05911797285079956, + -0.0398622527718544, + -0.004691429436206818, + -0.028711417689919472, + 0.028420064598321915, + 0.01704409345984459, + 0.004688119050115347, + 0.025043031200766563, + -0.039279550313949585, + -0.012965165078639984, + -0.003684940980747342, + 0.021268697455525398, + 0.00029900827212259173, + -0.029691418632864952, + 0.032843317836523056, + -0.02894979529082775, + -0.008793533779680729, + -0.021387886255979538, + 0.05231092870235443, + 0.03297575190663338, + 0.006187919527292252, + 0.00990596879273653, + -0.005055619869381189, + 0.03294926509261131, + -0.010501915588974953, + 0.020315181463956833, + 0.0025294653605669737, + 0.04386172071099281, + -0.0002406551066087559, + 0.006353460717946291, + 0.0022877755109220743, + -0.0250165443867445, + -0.04918551817536354, + 0.003625346114858985, + 0.04055090248584747, + -0.006608393508940935, + 0.018010852858424187, + -0.01232286635786295, + 0.0022546672262251377, + -0.001963315298780799, + 0.036154136061668396, + 0.029214661568403244, + 0.008224072866141796, + 0.009144480340182781, + 0.04280225932598114, + -0.029506012797355652, + -0.00199973420239985, + 0.02709573693573475, + -0.040921714156866074, + -0.007687720470130444, + -0.006651434116065502, + -0.00044323582551442087, + 0.0034366294275969267, + -0.006979205179959536, + 0.010594618506729603, + 0.013150570914149284, + 0.053555797785520554, + 0.04563632234930992, + 0.00762150390073657, + -0.010601240210235119, + 0.03535953909158707, + -0.013640571385622025, + -0.06197851896286011, + 0.009859616868197918, + 0.033478993922472, + 0.02900276891887188, + -0.03016817755997181, + -0.020738966763019562, + 0.03392926603555679, + -0.021056804805994034, + -0.016170037910342216, + 0.036948733031749725, + 0.038352519273757935, + 0.03647197410464287, + 0.029717905446887016, + 0.03724008426070213, + -0.016845444217324257, + 0.006260757800191641, + 0.04020657762885094, + -0.018739232793450356, + -0.00797245092689991, + 0.01846112310886383, + 0.021387886255979538, + -0.02648654766380787, + -0.015454900451004505, + -0.045477401465177536, + 0.006121703423559666, + 0.030830340459942818, + 0.037743330001831055, + 0.013415436260402203, + -0.012289757840335369, + -0.022553294897079468, + -0.031042233109474182, + -0.0238643791526556, + -0.0004072306619491428, + -0.02992979809641838, + 0.03967684879899025, + -0.004284198861569166, + -0.02447357028722763, + -0.020275451242923737, + -0.032843317836523056, + -2.1649648260790855e-05, + -0.015600576065480709, + -0.0010155935306102037, + 0.0013458476169034839, + 0.04802010953426361, + 0.04285523295402527, + 0.005684675183147192, + 0.0052675120532512665, + -0.015772739425301552, + -0.02373194694519043, + 0.004350415430963039, + -0.015070845372974873, + 0.029532499611377716, + -0.009303399361670017, + 0.0564163438975811, + 0.017825447022914886, + -0.011336241848766804, + -0.006899745669215918, + 0.02746654860675335, + -0.02476492151618004, + 0.02582438290119171, + 0.017772473394870758, + -0.017216255888342857, + 0.023096268996596336, + -0.00038343414780683815, + 0.027810875326395035, + -0.0030476083047688007, + -0.002009666757658124, + -0.004340482875704765, + -0.010064887814223766, + -0.02942655421793461, + 0.010766780935227871, + 0.030035745352506638, + -0.008071775548160076, + 0.016765983775258064, + 0.000638160272501409, + 0.027731414884328842, + 0.015666792169213295, + -0.013786247931420803, + 0.00507548451423645, + -0.0013210165780037642, + 0.04494766891002655, + 0.05615147948265076, + -0.00962786003947258, + -0.01962653174996376, + 0.06822934746742249, + 0.01115745771676302, + -0.04256388172507286, + -0.004251090809702873, + 0.013667058199644089, + -0.0051450119353830814, + -0.0861872211098671, + 0.004499402362853289, + 0.0025112556759268045, + 0.017322201281785965, + 0.01741490513086319, + -0.029161687940359116, + -0.0059826490469276905, + 0.034432511776685715, + 0.006317041348665953, + 0.005591972265392542, + -0.004744402598589659, + 0.013799491338431835, + -0.02175869792699814, + 0.03239304572343826, + 0.003333994187414646, + 0.009800022467970848, + -0.003724670736119151, + 0.02116275206208229, + -0.029876824468374252, + -0.01802409440279007, + -0.0197457205504179, + 0.017931392416357994, + 0.0005015889764763415, + 0.005913121625781059, + -0.014951655641198158, + 0.04312009736895561, + 0.055462829768657684, + -0.02709573693573475, + -0.018977610394358635, + -0.043384965509176254, + 0.009886103682219982, + -0.06229635700583458, + 0.052761200815439224, + -0.008581641130149364, + -0.021374642848968506, + -0.047251999378204346, + -0.03234007582068443, + -0.016156794503331184, + -0.06965962052345276, + -0.003979603759944439, + 0.022301672026515007, + -0.024076271802186966, + -0.030274122953414917, + -0.04163685068488121, + 0.007787044625729322, + 0.0019335179822519422, + 0.025903843343257904, + 0.005207917187362909, + 0.018977610394358635, + 0.0003991605481132865, + -0.001792808179743588, + 0.03022114932537079, + 0.024566272273659706, + 0.035783324390649796, + 0.041610363870859146, + 0.03249899297952652, + 0.007780423387885094, + -0.029506012797355652, + 0.019242476671934128, + -0.013263138011097908, + -0.005204606335610151, + 0.042219556868076324, + 0.002847303869202733, + -0.0008955763769336045, + -0.040259551256895065, + 0.003281021025031805, + 0.0436498299241066, + 0.0376373827457428, + -0.059329867362976074, + 0.0022364577744156122, + 0.0045623076148331165, + -8.090812480077147e-05, + 0.01515030488371849, + 0.0089259659871459, + 0.0372665710747242, + 0.01575949601829052, + -0.024367623031139374, + -0.021877888590097427, + -0.008839884772896767, + -0.007767179980874062, + 0.011402458883821964, + 0.020129775628447533, + -0.010376105085015297, + -0.021560048684477806, + -0.025917086750268936, + -0.012852597050368786, + -0.04388820752501488, + 0.025678707286715508, + -0.002357302699238062, + -0.013825977221131325, + -0.013574355281889439, + -0.007257313933223486, + 0.017918149009346962, + -0.030274122953414917, + 0.03631305694580078, + 0.0034796700347214937, + 0.03435305133461952, + 0.013196921907365322, + 0.01717652566730976, + 0.021175993606448174, + -0.015799226239323616, + -0.01018407754600048, + 0.03379683569073677, + -0.003060851711779833, + 0.011832864955067635, + -0.007290421985089779, + 0.021308427676558495, + 0.025307895615696907, + 0.04452388733625412, + 0.011336241848766804, + 0.025599248707294464, + -0.012985029257833958, + -0.03361142799258232, + -0.0331081822514534, + -0.011985162273049355, + 0.04889416694641113, + -0.015733009204268456, + 0.037504952400922775, + 0.02844655141234398, + 0.002880411921069026, + -0.027056008577346802, + -0.00715798931196332, + 0.021930860355496407, + -0.021308427676558495, + 0.005863459315150976, + -0.00021013349760323763, + -0.05615147948265076, + -0.017388418316841125, + 0.010733673349022865, + 0.001575949601829052, + 0.07882396131753922, + -0.013547868467867374, + 0.0163686852902174, + -0.037504952400922775, + 0.026208437979221344, + -0.0233081616461277, + 0.019586801528930664, + -0.0030277434270828962, + 0.011793134734034538, + -0.038167115300893784, + -0.04523902386426926, + 0.01422327570617199, + 0.02545357123017311, + 0.010415834374725819, + 0.0038571034092456102, + 0.01864652894437313, + 0.04033901169896126, + -0.020871398970484734, + -0.040259551256895065, + -0.020500587299466133, + -0.03390277922153473, + -0.022050051018595695, + 0.008330019190907478, + 0.008204207755625248, + -0.008283667266368866, + 0.037743330001831055, + -0.01834193430840969, + 0.027254657819867134, + -0.018249230459332466, + 0.02263275533914566, + 0.02410275861620903, + -0.023043295368552208, + -0.04711956903338432, + 0.0024284853134304285, + 0.015190035104751587, + -0.011905702762305737, + 0.036207109689712524, + 0.01368030160665512, + -0.02146734669804573, + -0.022791674360632896, + -0.008018801920115948, + -0.011574621312320232, + 0.05880013480782509, + 0.027916820719838142, + -0.036392517387866974, + 0.0012399015249684453, + 0.015282738022506237, + 0.0076744770631194115, + 0.015097332186996937, + -0.022778430953621864, + -0.027493035420775414, + 0.020010586827993393, + 0.03864387050271034, + -0.010693943127989769, + 0.0008583296439610422, + -0.025241678580641747, + 0.006939475424587727, + 0.022765187546610832, + -0.005919743329286575, + 0.03538602590560913, + 0.005462850444018841, + 0.00024934601970016956, + 0.0268706027418375, + 0.023096268996596336, + -0.011389215476810932, + -0.026566006243228912, + 0.02428816445171833, + -0.006787177640944719, + 0.036339543759822845, + 0.0036419001407921314, + 0.0220103207975626, + 0.003492913441732526, + 0.014951655641198158, + 0.023771675303578377, + 0.02214275300502777, + 0.010594618506729603, + -0.020381398499011993, + -0.030936287716031075, + -0.014938412234187126, + 0.014421924948692322, + -0.0069725834764540195, + 0.027201684191823006, + 0.02244734950363636, + -0.0061779869720339775, + 0.020500587299466133, + 0.015733009204268456, + -0.06489203870296478, + -0.014607330784201622, + -0.025718437507748604, + 0.005370147526264191, + -0.0011587864719331264, + -0.014236519113183022, + -0.03647197410464287, + 0.052522823214530945, + 0.00840285699814558, + -0.025744924321770668, + 0.01355449017137289, + -0.032896291464567184, + -0.006194541230797768, + -0.019083557650446892, + -0.004506023600697517, + -0.024817895144224167, + 0.03782279044389725, + 0.009621238335967064, + 0.021056804805994034, + 0.017017606645822525, + 0.002393721602857113, + -0.015680035576224327, + 0.007932720705866814, + 0.005045687314122915, + 0.013759761117398739, + -0.0018226054962724447, + 0.001295357709750533, + 0.023202214390039444, + 0.010038401000201702, + 0.004506023600697517, + 0.01869950257241726, + -0.011925567872822285, + -0.004817240871489048, + 0.04256388172507286, + 0.0250165443867445, + 0.022712213918566704, + -0.0020344979129731655, + -0.014276249334216118, + -0.04055090248584747, + 0.024553028866648674, + -0.0014459999511018395, + -0.0006791315972805023, + 0.0078135309740901, + 0.024248434230685234, + -0.006939475424587727, + -0.05673418566584587, + 0.0015825711889192462, + -0.016779227182269096, + 0.04251090809702873, + 0.010925700888037682, + -0.0085551543161273, + -0.028049252927303314, + 0.00021996250143274665, + 0.026327628642320633, + 0.0004900011117570102, + -0.04468280449509621, + 0.014276249334216118, + -0.018792204558849335, + 0.025413842871785164, + 0.045106589794158936, + -0.007045421749353409, + 0.010925700888037682, + -0.009852995164692402, + 0.002410275861620903, + 0.037743330001831055, + 0.026380600407719612, + 0.023043295368552208, + -0.0059760273434221745, + -0.0053535932675004005, + -0.0027628778479993343, + -0.025930330157279968, + 0.00858826283365488, + -0.006608393508940935, + 0.052655257284641266, + -0.017308957874774933, + -0.0002971459471154958, + -0.010237050242722034, + -0.013143949210643768, + -0.00843596551567316, + -0.0021321671083569527, + 0.022169239819049835, + -0.014647061005234718, + 0.004760956857353449, + -0.022103022783994675, + -0.003539264900609851, + 0.06028338149189949, + -0.02065950632095337, + 0.007694341707974672, + -0.026764655485749245, + -0.007820152677595615, + -0.04073631018400192, + 0.04224604368209839, + -0.030141690745949745, + 0.013773004524409771, + 0.024513298645615578, + 0.002699972363188863, + -0.013825977221131325, + -0.013667058199644089, + 0.0044464292004704475, + 0.001953382743522525, + -0.008098261430859566, + -0.004241158254444599, + -0.012898948043584824, + -0.03604818880558014, + -0.03573035076260567, + -0.012402325868606567, + -0.01487219613045454, + 0.017335444688796997, + 0.04015360400080681, + 0.0024831139016896486, + 0.0165540911257267, + -0.017494363710284233, + -0.024447083473205566, + -0.05673418566584587, + -0.017679769545793533, + 0.01575949601829052, + -0.009290155954658985, + -0.0007912855944596231, + -0.007952585816383362, + 0.002401998732239008, + 0.008568397723138332, + 0.004840416368097067, + -0.026592493057250977, + 0.00013595048221759498, + -0.015322467312216759, + 0.01932193525135517, + 0.023493567481637, + -0.015799226239323616, + 0.03506818786263466, + 0.005767445545643568, + -0.026076005771756172, + 0.01986491121351719, + -0.033770348876714706, + -0.018792204558849335, + 0.005125146824866533, + -0.059276893734931946, + -0.010501915588974953, + 0.014077600091695786, + -0.0077142068184912205, + -0.0094093456864357, + 0.020500587299466133, + -0.0011049855966120958, + -0.016646794974803925, + -0.041054148226976395, + -0.012687056325376034, + -0.023904109373688698, + 0.03128061071038246, + -0.010316509753465652, + -0.0038372385315597057, + -0.0002058915124507621, + 0.034432511776685715, + -0.022473834455013275, + -0.02114950865507126, + -0.03231358900666237, + -0.0006654745084233582, + -0.016911661252379417, + 0.011203809641301632, + -0.017745986580848694, + -0.04420604556798935, + 0.02648654766380787, + 0.020646262913942337, + 0.006310419645160437, + 0.005015889648348093, + -0.0011827899143099785, + -0.03766386955976486, + -0.00999867171049118, + 0.0004891733988188207, + 0.0017232809914276004, + -0.01564030535519123, + -0.012673812918365002, + 0.03610116243362427, + -0.00258409371599555, + 0.0018192947609350085, + 0.017706256359815598, + 0.04113360866904259, + 0.0029019322246313095, + 0.0099655631929636, + 0.014607330784201622, + -0.013759761117398739, + 0.007495692931115627, + -0.005515823606401682, + 0.015137061476707458, + 0.004648388829082251, + -0.02348032407462597, + 0.019533827900886536, + 0.02913520112633705, + 0.013408814556896687, + 0.0233081616461277, + -0.0013458476169034839, + 0.010170834138989449, + 0.006866637151688337, + 0.004333861172199249, + -0.007522179279476404, + -0.0017597000114619732, + -0.020752210170030594, + -0.018871665000915527, + -0.014210032299160957, + 0.0745331421494484, + 0.0036485218442976475, + 0.0060290005058050156, + 0.012713542208075523, + -0.02569195069372654, + 0.011660702526569366, + 0.0038736574351787567, + -0.014461655169725418, + 0.018606798723340034, + -0.024725191295146942, + 0.051224980503320694, + -0.03896171227097511, + -0.018673015758395195, + -0.0001552980684209615, + -0.019096801057457924, + 0.011852730065584183, + 0.023718703538179398, + -0.036207109689712524, + 0.004880146123468876, + -0.0003064576303586364, + 0.002550985664129257, + -0.0009377893293276429, + -0.009747049771249294, + 0.013971653766930103, + -0.032287102192640305, + -0.017626797780394554, + -0.002065950771793723, + -0.001374817336909473, + 0.004946362692862749, + -0.014170303009450436, + 0.0024351070169359446, + -0.04741092026233673, + 0.012150703929364681, + 0.016170037910342216, + 0.0009195798193104565, + 0.016461389139294624, + 0.011236917227506638, + 0.0009113027481362224, + 0.011170701123774052, + 0.004287509713321924, + 0.0018623353680595756, + -5.845663690706715e-05, + 0.029479527845978737, + 0.007138124667108059, + -0.0011968608014285564, + -0.02023572288453579, + -0.004456361755728722, + 0.036577921360731125, + 0.021679239347577095, + 0.02379816211760044, + 0.004787443205714226, + -0.02759898267686367, + -0.004724537953734398, + -0.0014344120863825083, + -0.015031115151941776, + -0.005406566429883242, + 0.04942389577627182, + 0.004019333515316248, + -0.010203942656517029, + -0.0031270680483430624, + -0.03234007582068443, + 0.007171232718974352, + -0.03573035076260567, + 0.02072572335600853, + -0.007581774145364761, + -0.011879215948283672, + 0.009680832736194134, + 0.03165142238140106, + -0.010448942892253399, + 0.024500055238604546, + 0.0165540911257267, + 0.0035260214935988188, + 0.013561111874878407, + 0.01505760196596384, + -0.01072705164551735, + -0.01717652566730976, + -0.011051511391997337, + -0.015362197533249855, + -0.0171103086322546, + -0.009415967389941216, + 0.007018934935331345, + 0.01662030816078186, + -0.013971653766930103, + 0.027916820719838142, + -0.02692357450723648, + 0.016262739896774292, + -0.029161687940359116, + -0.014739763922989368, + -0.04727848619222641, + -0.016461389139294624, + 0.030989259481430054, + 0.017507607117295265, + -0.006009135395288467, + -0.024976814165711403, + -0.021493833512067795, + -0.0033902779687196016, + 0.006432920228689909, + 0.01199178397655487, + 0.014819223433732986, + 0.011091241613030434, + 0.04719902575016022, + 0.00868096575140953, + -0.002537742257118225, + 0.016540849581360817, + -0.011203809641301632, + 0.012528136372566223, + 0.01422327570617199, + 0.004022644367069006, + -0.006701096426695585, + 0.01687193103134632, + -0.011415701359510422, + -0.028976282104849815, + -0.05445634201169014, + -0.0053867013193666935, + 0.020076802000403404, + -0.012283136136829853, + -0.015123818069696426, + -0.003057540860027075, + -0.028420064598321915, + -0.014911926351487637, + 0.008694209158420563, + 0.01262746099382639, + -0.009025290608406067, + -0.004502713214606047, + 0.0021636197343468666, + -0.0033935888204723597, + -0.007694341707974672, + 0.004423253238201141, + -0.002401998732239008, + -0.007184476125985384, + -0.017428148537874222, + -0.006436231080442667, + -0.056628238409757614, + -0.001052840263582766, + 0.007091773208230734, + 0.032896291464567184, + 0.0034035213757306337, + 0.02582438290119171, + -0.0004982781829312444, + -0.030750881880521774, + 0.019600044935941696, + 0.0214541032910347, + -0.021533561870455742, + -0.030141690745949745, + -0.03403521329164505, + -0.06409744173288345, + 0.0077142068184912205, + 0.007588395848870277, + 0.008707452565431595, + 0.023347891867160797, + -0.021718967705965042, + -0.0009651035652495921, + 0.007323530502617359, + -0.007469206117093563, + -0.00367169757373631, + 0.00809163972735405, + 0.024923840537667274, + -0.03358494117856026, + 0.0161832794547081, + -0.012422190979123116, + 0.014236519113183022, + 0.021123021841049194, + 0.026261411607265472, + -0.021917616948485374, + -0.02447357028722763, + -0.03469737619161606, + 0.03035358339548111, + -0.01753409393131733, + 0.03535953909158707, + -0.04849686846137047, + -0.023586269468069077, + -0.03790224716067314, + -0.031360071152448654, + 0.02226194366812706, + -0.0032677778508514166, + -0.024208704009652138, + 0.0036882515996694565, + -0.029876824468374252, + 0.004131901543587446, + 0.021440859884023666, + 0.01667328178882599, + -0.007356638554483652, + 0.01042907778173685, + 0.006032310891896486, + -0.034803323447704315, + -0.012581110000610352, + -0.013349220156669617, + 0.0033886225428432226, + -0.026234924793243408, + 0.008144613355398178, + -0.003285987302660942, + -0.020513830706477165, + -0.042775772511959076, + -0.01734868809580803, + 0.03353196755051613, + 0.012773137539625168, + 0.010177455842494965, + 0.003684940980747342, + -0.00013295005192048848, + -4.855004954151809e-05, + 0.03766386955976486, + -0.008508803322911263, + -0.010323131456971169, + -0.004969538189470768, + 0.02194410376250744, + 0.013600842095911503, + -0.008806777186691761, + 0.0077936663292348385, + -0.0044464292004704475, + -0.0029565608128905296, + -0.01613030768930912, + -0.001402131631039083, + -0.012071243487298489, + 0.015733009204268456, + 0.009065020829439163, + 0.0208581555634737, + -0.01589192822575569, + 0.03557143360376358, + -0.032525479793548584, + -0.0060190679505467415, + -0.002701627789065242, + -0.02036815509200096, + 0.017375174909830093, + -0.01697787642478943, + 0.009654346853494644, + -0.040444958955049515, + -0.024116002023220062, + -0.012865840457379818, + 0.007859882898628712, + 0.005774067249149084, + 0.010621105320751667, + -0.024566272273659706, + -0.0005177292041480541, + -0.004181563854217529, + 0.001748112146742642, + -0.010422456078231335, + 0.04738443344831467, + 0.03724008426070213, + -0.0021172682754695415, + -0.009680832736194134, + 0.023215457797050476, + -0.023043295368552208, + 0.018924638628959656, + 0.026566006243228912, + 0.008356506004929543, + -0.053741205483675, + -0.028473038226366043, + 0.009826509281992912, + 0.017772473394870758, + 0.003315784502774477, + -0.0052244714461266994, + -0.0017166592879220843, + 0.03766386955976486, + -0.00012332799087744206, + 0.005654877983033657, + 0.009753670543432236, + 0.06081311032176018, + -0.004876835271716118, + 0.011971918866038322, + -0.006687853019684553, + 0.019083557650446892, + -0.021109778434038162, + 0.04640442878007889, + 0.017388418316841125, + -0.0029201419092714787, + 0.016448145732283592, + -0.00016512707225047052, + -0.021414373070001602, + 0.0376373827457428, + 0.013706788420677185, + 0.0242749210447073, + -0.03220764175057411, + 0.010601240210235119, + 0.024063028395175934, + 0.03742549195885658, + -0.019891396164894104, + 0.022778430953621864, + -0.015282738022506237, + -0.0092239398509264, + 0.021056804805994034, + -0.03109520673751831, + 0.004155077040195465, + -0.03686927258968353, + 0.009376238100230694, + 0.04280225932598114, + -0.014514627866446972, + 0.025943573564291, + 0.02955898642539978, + -0.0022232146002352238, + 0.010131103917956352, + -0.0008037011721171439, + -0.012898948043584824, + -0.00018240540521219373, + 0.0018292271997779608, + -0.01802409440279007, + -0.008627993054687977, + -0.033399537205696106, + -0.031677909195423126, + -0.02114950865507126, + 0.02900276891887188, + 0.0016777572454884648, + 0.004780821967869997, + 0.010998538695275784, + 0.013117462396621704, + 0.020315181463956833, + 0.005366836674511433, + 0.017587067559361458, + 0.0012208642438054085, + -0.017613554373383522, + -0.003330683335661888, + 0.0022414240520447493, + -0.01299827266484499, + 0.040683336555957794, + 0.023957081139087677, + -0.008389613591134548, + -0.007416233420372009, + 0.009184210561215878, + -0.006595150101929903, + -0.015746252611279488, + 0.011455431580543518, + 0.003231358714401722, + -0.024063028395175934, + 0.003231358714401722, + -0.006350149866193533, + -0.01177989225834608, + 0.0172957144677639, + -0.02937358058989048, + 0.0023010186851024628, + -0.00171003770083189, + -0.007992316037416458, + 0.025744924321770668, + -0.010501915588974953, + -0.019454369321465492, + 0.033505480736494064, + -0.015269494615495205, + 0.02336113527417183, + -0.029347093775868416, + 0.0017795648891478777, + -0.02337437868118286, + 0.035412512719631195, + 0.0003134931030217558, + 0.01343530137091875, + -0.010587996803224087, + -0.017891662195324898, + -0.05726391449570656, + 0.026261411607265472, + 0.01724274270236492, + 0.014567600563168526, + 0.039888739585876465, + -0.03342602401971817, + 0.04574226588010788, + 0.022712213918566704, + 0.014342465437948704, + 0.006724271923303604, + 0.0037081167101860046, + -0.022434106096625328, + -0.022963836789131165, + 0.007661233656108379, + -0.03673684224486351, + 0.03332007676362991, + -0.04052441567182541, + -0.018474366515874863, + -0.013865707442164421, + 0.03440602496266365, + -0.017269229516386986, + -0.024142486974596977, + 0.04052441567182541, + -0.012110973708331585, + -0.002353991847485304, + 0.03297575190663338, + 0.02447357028722763, + -0.035174135118722916, + 0.0025195328053086996, + -0.003714738180860877, + 0.020447613671422005, + 0.0013673680368810892, + 0.03514764830470085, + 0.04709308221936226, + 0.0022960526403039694, + 0.03263142704963684, + 0.02765195444226265, + -0.010594618506729603, + 0.004744402598589659, + -0.03241953253746033, + -0.018302204087376595, + 0.013329355046153069, + 0.014805980026721954, + 0.05162227898836136, + -0.023467080667614937, + -0.011918946169316769, + -0.022301672026515007, + 0.023533297702670097, + -0.011799756437540054, + ], + "index": 69, + }, + { + "title": "Jeff Stover", + "text": "Jeff Stover is a retired defensive lineman for the San Francisco 49ers American football team during the 1980s.", + "vector": [ + -0.014568816870450974, + 0.03197459504008293, + -0.038306817412376404, + -0.00041192761273123324, + -0.03335389122366905, + -0.007797725964337587, + -0.020046817138791084, + 0.003487425157800317, + -0.0462377704679966, + 0.07109645009040833, + -0.06551656872034073, + 0.01963929831981659, + -0.010101777501404285, + 0.01536034420132637, + 0.012829022482037544, + -0.06244450435042381, + -0.04460769519209862, + 0.020031142979860306, + 0.012131537310779095, + -0.04956062138080597, + 0.03557957336306572, + 0.024529529735445976, + -0.015250627882778645, + 0.032758284360170364, + 0.03445105999708176, + 0.005348691251128912, + 0.01788382977247238, + -0.009858833625912666, + 0.013032781891524792, + 0.025344569236040115, + -0.00014400323561858386, + 0.017350919544696808, + 0.005642575677484274, + -0.005513266660273075, + -0.018228653818368912, + 0.06476423144340515, + -0.0294667836278677, + 0.002981944475322962, + 0.0234480369836092, + 0.01999979466199875, + 0.016128361225128174, + -0.06545387953519821, + 0.029889976605772972, + 0.012962250038981438, + 0.041410233825445175, + 0.036896172910928726, + -0.00019408598018344492, + -0.015430876985192299, + -0.0006034420803189278, + 0.02542293816804886, + 0.025266198441386223, + -0.035266097635030746, + 0.015187932178378105, + -0.05517185106873512, + -0.006614352576434612, + -0.006978768855333328, + -0.018103262409567833, + 0.09040659666061401, + -0.020987246185541153, + 0.010376069694757462, + -0.03191189840435982, + -0.04228796809911728, + 0.0076684169471263885, + -0.017491983249783516, + 0.007546945009380579, + 0.009600215591490269, + 0.028244225308299065, + 0.05742888152599335, + 0.02899656817317009, + 0.003900822252035141, + -0.010360395535826683, + 0.019780362024903297, + 0.05407468229532242, + 0.039215900003910065, + -0.016363469883799553, + -0.008816524408757687, + -0.004192747175693512, + -0.0003257216012571007, + -0.05112800374627113, + 0.008040670305490494, + 0.004823618568480015, + -0.024654921144247055, + -0.009553194046020508, + 0.01722552999854088, + 0.02484300546348095, + -0.022131435573101044, + 0.04385535046458244, + -0.0658300444483757, + -0.002805613912642002, + 0.017241202294826508, + -0.0024745045229792595, + 0.0018064078176394105, + 0.013330584391951561, + -0.01722552999854088, + 0.04263279214501381, + 0.03313445672392845, + -0.009561031125485897, + 0.012507708743214607, + 0.007104159332811832, + -0.02275838889181614, + 0.007574373856186867, + -0.006583004724234343, + 0.019827382639050484, + -0.017742766067385674, + 0.0348585769534111, + 0.006324386689811945, + -0.013009271584451199, + 0.02830692008137703, + 0.018510783091187477, + 0.023259950801730156, + 0.04470173642039299, + 0.013416790403425694, + -0.007433309685438871, + 0.04830671474337578, + -0.00785258412361145, + 0.014560979790985584, + 0.00895758904516697, + 0.02148880809545517, + 0.024404138326644897, + -0.03039153851568699, + 0.011347846128046513, + 0.000153799366671592, + -0.015548430383205414, + 0.012680120766162872, + 0.0432283990085125, + -0.011449726298451424, + 0.011935614980757236, + -0.006661374121904373, + 0.021520156413316727, + 0.02346370927989483, + -0.0671466514468193, + 0.0024784228298813105, + -0.02159852534532547, + 0.009412129409611225, + -0.04999949038028717, + 0.008173897862434387, + 0.040030937641859055, + 0.03460779786109924, + -0.010744404047727585, + 0.013573529198765755, + 0.023824207484722137, + -0.0014752984279766679, + 0.016222404316067696, + 0.024231726303696632, + -0.009788300842046738, + -0.03583035618066788, + 0.061033859848976135, + 0.08451323956251144, + -0.007805563043802977, + -0.0787452757358551, + 0.01962362416088581, + 0.030328843742609024, + 0.0012813349021598697, + -0.019263125956058502, + 0.052162475883960724, + -0.03347928076982498, + -0.042789530009031296, + 0.018181633204221725, + -0.029889976605772972, + -0.019607950001955032, + -0.04573620855808258, + 0.016551554203033447, + -0.04507790878415108, + 0.04736628755927086, + -0.04727224260568619, + -0.020266249775886536, + 0.05761696398258209, + -0.019263125956058502, + 0.005771884694695473, + -0.00040507031371816993, + -1.3806432434648741e-05, + 0.005987399723380804, + 0.006477206479758024, + 0.012891717255115509, + -0.003411015262827277, + -0.04858884587883949, + -0.01206100545823574, + -0.011488910764455795, + 0.04573620855808258, + -0.002268785610795021, + -0.03039153851568699, + 0.00924755446612835, + -0.025234851986169815, + -0.015046868473291397, + -0.024325769394636154, + -0.004470957443118095, + 0.005058725830167532, + 0.012805511243641376, + 0.060469601303339005, + -0.08702105283737183, + -0.015376018360257149, + -0.005744455382227898, + 0.011097065173089504, + -0.0024470752105116844, + 0.03730369359254837, + 0.0600307323038578, + 0.023024842143058777, + 0.0171001385897398, + -0.019451212137937546, + -0.03717830404639244, + 0.04883962497115135, + 0.040469806641340256, + 0.02112830989062786, + -0.016473185271024704, + 0.030219126492738724, + -0.013816473074257374, + 0.0006734844646416605, + 0.030563950538635254, + -0.04482712969183922, + 0.006504635792225599, + 0.009905855171382427, + -0.016896378248929977, + 0.012680120766162872, + -0.037585821002721786, + -0.010352558456361294, + 0.021629873663187027, + 0.015454387292265892, + -0.017147159203886986, + 0.04275818169116974, + 0.02819720469415188, + 0.027397839352488518, + 0.004659043159335852, + -0.03611248359084129, + -0.011927777901291847, + 0.04357322305440903, + -0.002482341369614005, + -0.03793064504861832, + -0.025673719123005867, + 0.03727234527468681, + 0.01547789853066206, + -0.06291471421718597, + 0.0020532705821096897, + -0.008706807158887386, + 0.04009363427758217, + -0.006974850315600634, + -0.042664140462875366, + -0.01547006145119667, + -0.016426164656877518, + -0.008581416681408882, + -0.008761665783822536, + -0.005333017557859421, + 0.02576776221394539, + 0.009341597557067871, + 0.031206578016281128, + 0.030234800651669502, + 0.07209957391023636, + -0.026300672441720963, + -0.027695640921592712, + -0.044889822602272034, + -0.0011432092869654298, + -0.05633171275258064, + -0.013299237005412579, + -0.018228653818368912, + -0.011841571889817715, + 0.021394765004515648, + -0.0066927215084433556, + -0.007354940287768841, + 0.013213030993938446, + 0.024169031530618668, + -0.0017025688430294394, + -0.01835404522716999, + -0.014913640916347504, + 0.0408773235976696, + -0.02250760607421398, + 0.0005128278280608356, + 0.01265661045908928, + -0.014263177290558815, + 0.018432414159178734, + 0.039560724049806595, + -0.015517082996666431, + 0.012100189924240112, + -0.011018696241080761, + -0.010399580001831055, + 0.032052963972091675, + 0.02816585637629032, + -0.01777411252260208, + -0.03142601251602173, + -0.012578241527080536, + 0.03278963267803192, + 0.029294371604919434, + 0.022585976868867874, + -0.026410387828946114, + 0.012452851049602032, + 0.00508615467697382, + 0.013260052539408207, + 0.023620449006557465, + -0.00826010387390852, + 0.013071966357529163, + 0.03479588404297829, + -0.0011363520752638578, + -0.03454510122537613, + -0.03325984627008438, + 0.050751831382513046, + 0.02112830989062786, + 0.06677047908306122, + 0.012915228493511677, + 0.0205483790487051, + 0.045924294739961624, + 0.03175516054034233, + 0.013620550744235516, + 0.025595350190997124, + 0.009396455250680447, + -0.006626107729971409, + -0.06426266580820084, + -0.046613942831754684, + -0.031943246722221375, + -0.003916495945304632, + 0.02114398404955864, + 0.006050094962120056, + -0.03257019817829132, + -0.00795054528862238, + -0.041849102824926376, + -0.0265671256929636, + 0.006516390945762396, + 0.04250740259885788, + 0.023604774847626686, + 0.004831455182284117, + 0.0025058521423488855, + -0.04062654450535774, + -0.015234953723847866, + 0.016253752633929253, + 0.0016917930915951729, + 0.008126876316964626, + 0.015736516565084457, + -0.011089228093624115, + -0.00861276499927044, + 0.01730389893054962, + 0.034137580543756485, + -0.025908825919032097, + 0.00756261870265007, + 0.011567279696464539, + 0.004020335152745247, + -0.007284408435225487, + 0.008636275306344032, + -0.0027879809495061636, + 0.016457511112093925, + -0.027695640921592712, + 0.0007538128411397338, + -0.016598576679825783, + -0.00158795400056988, + -0.0169904213398695, + -0.03595574572682381, + -0.037711214274168015, + -0.014239666052162647, + -0.009866670705378056, + -0.02967054210603237, + 0.07297731190919876, + 0.03514070808887482, + -0.028557701036334038, + -0.023620449006557465, + 0.0007498943596147001, + -0.019106388092041016, + 0.015618962235748768, + 0.013510833494365215, + -0.022962147369980812, + 0.01398104801774025, + -0.004228013101965189, + -0.030924448743462563, + 0.00013298257545102388, + -0.001412603072822094, + 0.06285202503204346, + 0.008965425193309784, + 0.04125349596142769, + 0.013440301641821861, + 0.025548327714204788, + 0.002940800739452243, + 0.03514070808887482, + -0.013260052539408207, + -0.007437228225171566, + -0.01068170927464962, + 0.033761411905288696, + -0.04413747787475586, + 0.0029505968559533358, + 0.08401168137788773, + 0.028009118512272835, + -0.050062183290719986, + 0.005450571421533823, + -0.009945039637386799, + -0.04006228595972061, + -0.007300082128494978, + -0.0010550441220402718, + 0.018448086455464363, + 0.0233383197337389, + 0.007660579867660999, + -0.0013792961835861206, + 0.012578241527080536, + 0.028573375195264816, + 0.04448230564594269, + -0.04125349596142769, + 0.006865133531391621, + -0.00669664004817605, + 0.01061901357024908, + -0.046707987785339355, + -0.055391281843185425, + 0.05993669107556343, + -0.02990565076470375, + 0.003810697700828314, + 0.04056384786963463, + -0.02032894641160965, + -0.004992112051695585, + -0.013620550744235516, + 0.005199790000915527, + -0.04031306877732277, + -0.05347907543182373, + -0.012852532789111137, + -0.018338371068239212, + -0.03542283549904823, + 0.002513688988983631, + 0.023134559392929077, + 0.018683195114135742, + -0.020062491297721863, + 0.03316580504179001, + -0.02885550446808338, + 0.0020415151957422495, + 0.06169215962290764, + -0.0015713005559518933, + 0.04849480092525482, + 0.0247332900762558, + -0.01368324551731348, + 0.018165959045290947, + 0.014365056529641151, + 0.07310269773006439, + -0.007966219447553158, + -0.038996465504169464, + 0.014216155745089054, + -0.006289120763540268, + -0.03313445672392845, + -0.02562669664621353, + 0.002159068826586008, + -0.014169134199619293, + -0.030172105878591537, + -0.008377657271921635, + -0.03595574572682381, + 0.04589294642210007, + -0.008314961567521095, + -0.08093961328268051, + -0.013416790403425694, + -0.01293873880058527, + 0.03557957336306572, + 0.0265671256929636, + -0.023526405915617943, + 0.01507037878036499, + -0.038745686411857605, + 0.02031327225267887, + 0.008189571090042591, + -0.03488992527127266, + -0.03974881023168564, + -0.023698817938566208, + 0.01137919444590807, + 0.03108118660748005, + 0.013111150823533535, + -0.03815007954835892, + -0.015234953723847866, + -0.023416688665747643, + -0.022585976868867874, + 0.0016016685403883457, + 0.023714490234851837, + -0.016582902520895004, + -0.05084587633609772, + 0.021316396072506905, + 0.010070430114865303, + -0.03294637054204941, + 0.0054348972626030445, + -0.004882395267486572, + 0.016708293929696083, + 0.0021335987839847803, + -0.059654563665390015, + -0.028918199241161346, + -0.030799057334661484, + -0.009568867273628712, + 0.03579900786280632, + -0.020234903320670128, + 0.007456820458173752, + 0.053290992975234985, + 0.03554822504520416, + -0.002196294255554676, + 0.011340009048581123, + -0.029388414695858955, + -0.0010187983280047774, + -0.005587717052549124, + 0.01270363200455904, + 0.020532704889774323, + -0.05128474161028862, + -0.05084587633609772, + 0.029607847332954407, + -0.01398104801774025, + -0.0205483790487051, + -0.01398104801774025, + 0.007527352310717106, + 0.0006470349035225809, + 0.005238974466919899, + 0.020125186070799828, + -0.0247332900762558, + -0.016002971678972244, + 0.013158172369003296, + 0.0034325667656958103, + -0.01057199202477932, + -0.0068847257643938065, + 0.018056241795420647, + -0.004525815602391958, + 0.04655124992132187, + -0.027444859966635704, + 0.02158285118639469, + 0.04285222664475441, + 0.011818060651421547, + -0.023479383438825607, + 0.053886596113443375, + 0.021535830572247505, + -0.03104984015226364, + 0.021896326914429665, + 0.004835373722016811, + 0.029592173174023628, + -0.053667161613702774, + 0.0011559443082660437, + -0.03777390718460083, + -0.011340009048581123, + -0.011332172900438309, + -0.006649618502706289, + 0.02413768507540226, + 0.03347928076982498, + -0.012468524277210236, + 0.0065477387979626656, + 0.03868298977613449, + -0.003965476527810097, + 0.0380873866379261, + 0.010117451660335064, + 0.017617374658584595, + -0.05633171275258064, + -0.02816585637629032, + 0.012664447538554668, + 0.048338063061237335, + 0.0030642319470643997, + 0.01962362416088581, + 0.051002614200115204, + -0.022366542369127274, + -0.005297751631587744, + -0.050657790154218674, + 0.01310331467539072, + 0.038745686411857605, + -0.03108118660748005, + 0.024874353781342506, + -0.05316559970378876, + -0.009890181012451649, + -0.014294524677097797, + -0.009553194046020508, + -0.01824432797729969, + -0.015336833894252777, + -0.02620662935078144, + -0.01791517809033394, + 0.0026077318470925093, + 0.03843221068382263, + 0.028683092445135117, + 0.03664539381861687, + -0.02449818141758442, + 0.0204386617988348, + -0.06291471421718597, + -0.019796036183834076, + 0.09147241711616516, + 0.006347897462546825, + -0.040469806641340256, + 0.003493302734568715, + 0.0018289389554411173, + -0.031002817675471306, + 0.02446683496236801, + -0.02020355500280857, + 0.00385380070656538, + -0.008722481317818165, + 0.03871433809399605, + -0.03652000427246094, + 0.009145674295723438, + -0.013267889618873596, + -0.014827434904873371, + -0.005811069160699844, + -0.04288357496261597, + 0.01229611225426197, + -0.010164473205804825, + -0.001126555842347443, + 0.003373790066689253, + -0.00013053354632575065, + -0.033980842679739, + 0.011144086718559265, + -0.03291502222418785, + -0.05162956565618515, + 0.010211494751274586, + -0.005301669705659151, + 0.009380782023072243, + -0.015376018360257149, + 0.016582902520895004, + -0.01121461857110262, + -0.021065615117549896, + 0.013730267062783241, + -0.024968396872282028, + -0.020501358434557915, + 0.010007734410464764, + 0.0346391424536705, + -0.0003433546517044306, + -0.009012446738779545, + 0.004870639648288488, + 0.032413460314273834, + 0.003336564637720585, + 0.03927859663963318, + 0.027115710079669952, + 0.02045433595776558, + -0.06056364253163338, + 0.021912001073360443, + 0.009059468284249306, + 0.015626799315214157, + 0.0022766224574297667, + 0.008589253760874271, + -0.024325769394636154, + 0.014952825382351875, + -0.030987143516540527, + 0.07717789709568024, + -0.005705270916223526, + -0.014114275574684143, + -0.003810697700828314, + -0.07109645009040833, + 0.01673964038491249, + 0.019607950001955032, + 0.0017495902720838785, + -0.013957537710666656, + 0.03561092168092728, + 0.014012396335601807, + -0.017491983249783516, + 0.012256927788257599, + 0.007981893606483936, + 0.0005588696803897619, + -0.0019533499144017696, + -0.02101859450340271, + 0.0102193308994174, + 0.017617374658584595, + -0.0623818077147007, + 0.02609691210091114, + 0.008636275306344032, + -0.024043641984462738, + 0.008738155476748943, + 0.00025494449073448777, + -0.05028161779046059, + 6.76545751048252e-05, + -0.018542129546403885, + 0.008565743453800678, + 0.007840828970074654, + 0.023761512711644173, + 0.021676894277334213, + -0.032726939767599106, + -0.010956000536680222, + -0.010783588513731956, + -0.04159832000732422, + 0.038056038320064545, + 0.04438826069235802, + 0.0007327511557377875, + -0.046143729239702225, + 0.02611258625984192, + 0.0023647877387702465, + 0.015783537179231644, + 0.020250577479600906, + -0.007746785879135132, + 0.016896378248929977, + 0.005673923064023256, + -0.03739773854613304, + -0.015877580270171165, + 0.0021453541703522205, + -0.0014978295657783747, + 0.030344517901539803, + -0.00476484140381217, + 0.006116708740592003, + -0.015517082996666431, + 0.024090662598609924, + -0.022241152822971344, + 0.04862019419670105, + -0.005419223569333553, + 0.04934118688106537, + -0.0006764233112335205, + -0.00952968280762434, + 0.008879219181835651, + 0.005321262404322624, + -0.027100035920739174, + -0.011488910764455795, + -0.0352974459528923, + -0.00999206118285656, + -0.04351052641868591, + 0.06050094962120056, + 0.007272652816027403, + 0.029404088854789734, + 0.01894965022802353, + -0.0019259207183495164, + -0.008040670305490494, + 0.023730164393782616, + 0.0029917405918240547, + 0.007746785879135132, + -0.007586129475384951, + 0.029654869809746742, + 0.03981150686740875, + 0.03974881023168564, + 0.006097116507589817, + -0.024654921144247055, + -0.0024940967559814453, + -0.03570496290922165, + -0.04554812237620354, + -0.013698919676244259, + -0.027444859966635704, + 0.031927574425935745, + 0.028557701036334038, + 0.006269528530538082, + 0.021441787481307983, + 0.009466988034546375, + -0.009004609659314156, + -0.0475543737411499, + 0.03288367763161659, + -0.010407417081296444, + 0.0030897019896656275, + -0.021943349391222, + 0.013644061051309109, + 0.013064130209386349, + -0.055610716342926025, + 0.027303796261548996, + 0.0007557720527984202, + -0.030642319470643997, + -0.010760078206658363, + 0.006857296451926231, + 0.003248399356380105, + 0.011355683207511902, + -0.04633181542158127, + -0.0032150924671441317, + -0.0009869609493762255, + -0.01022716797888279, + -0.04896501824259758, + -0.0034325667656958103, + -0.010391742922365665, + 0.005756210535764694, + 0.02623797580599785, + -0.032852329313755035, + -0.017946524545550346, + 0.00025298527907580137, + 0.013032781891524792, + -0.0005466244765557349, + -0.01952958106994629, + -0.003593223402276635, + 0.007288326509296894, + 0.006626107729971409, + 0.03858894854784012, + -0.04554812237620354, + 0.0032111741602420807, + 0.003738206345587969, + -0.021457461640238762, + -0.001973921898752451, + -0.04282087832689285, + 0.037836603820323944, + -0.01766439527273178, + -0.02540726400911808, + 0.016912052407860756, + 0.01730389893054962, + -0.015195769257843494, + -0.0019033895805478096, + 0.010830610059201717, + 0.0004146215505897999, + 0.005732700228691101, + -0.0054348972626030445, + -0.026363367214798927, + -0.02471761591732502, + 0.03235076740384102, + 0.03617518022656441, + 0.02056405320763588, + 0.03789930045604706, + -0.005274240858852863, + -0.019592275843024254, + -0.010705219581723213, + 0.016896378248929977, + -0.012625263072550297, + -0.006869052071124315, + 0.00861276499927044, + 0.012162884697318077, + -0.025031091645359993, + -0.0021335987839847803, + 0.002691978821530938, + 0.012319623492658138, + -0.013361932709813118, + -0.008847871795296669, + -0.035266097635030746, + -0.056770578026771545, + -0.04379265382885933, + 0.011175434105098248, + -0.0432283990085125, + -0.03247615694999695, + -0.03028182126581669, + -0.01576002687215805, + -0.0031523972284048796, + 0.011308661662042141, + 0.013651898130774498, + -0.02658279985189438, + -0.007347103673964739, + 0.038651641458272934, + -0.006195077672600746, + 0.008988936431705952, + 0.0018622458446770906, + -0.006751498207449913, + -0.041755057871341705, + 0.006394919008016586, + 0.02531322091817856, + 0.002693937858566642, + 0.03325984627008438, + 0.0031328049954026937, + -0.01662992313504219, + -0.02830692008137703, + 0.026394713670015335, + -0.040250372141599655, + 0.04238201305270195, + -0.030908774584531784, + -0.009670747444033623, + -0.0059834811836481094, + -0.00501954136416316, + 0.01438073068857193, + 0.030219126492738724, + -0.0063008759170770645, + 0.006379245314747095, + -0.013463811948895454, + 0.00029119019745849073, + 0.0003078436420764774, + -0.019592275843024254, + -0.006293039303272963, + -0.01766439527273178, + 0.00020020856754854321, + -0.021457461640238762, + -0.0012431299546733499, + -0.020187880843877792, + 0.025830456987023354, + 0.012256927788257599, + -0.0023804616648703814, + 0.025093786418437958, + -0.007108077872544527, + -0.03003104031085968, + 0.002360869199037552, + -0.03915320336818695, + 0.007985811680555344, + -0.04351052641868591, + 0.03890242427587509, + 0.01753900572657585, + -0.012719305232167244, + 0.016708293929696083, + 0.008722481317818165, + 0.02377718687057495, + -0.012852532789111137, + -0.015297649428248405, + 0.010509297251701355, + 0.051096655428409576, + -0.02703734114766121, + -0.022664345800876617, + -0.00918485876172781, + -0.027350816875696182, + -0.012876044027507305, + 0.009098652750253677, + -0.01195912528783083, + -0.006347897462546825, + 0.010736566968262196, + 0.013502996414899826, + 0.02910628542304039, + 0.003940006718039513, + 0.001029574079439044, + -0.030532604083418846, + -0.0037871869280934334, + 0.035736311227083206, + 0.006124545354396105, + 0.030469907447695732, + -0.02805613912642002, + 0.01826000213623047, + -0.015438714064657688, + 0.02277406118810177, + -0.02760159783065319, + 0.03291502222418785, + -0.05125339329242706, + 0.01904369331896305, + -0.0220530666410923, + 0.019780362024903297, + -0.0049607641994953156, + -0.017821134999394417, + -0.007586129475384951, + 0.002180620329454541, + 0.003906699828803539, + 0.0052154636941850185, + 0.032068636268377304, + 0.0029172899667173624, + 0.03601843863725662, + -0.030516929924488068, + -0.008244429714977741, + 0.012421502731740475, + -0.01056415494531393, + -0.05325964465737343, + -0.028824156150221825, + -0.04727224260568619, + -0.02007816545665264, + -0.04310300573706627, + -0.013024944812059402, + -0.022711366415023804, + -0.008244429714977741, + -0.022476259618997574, + -2.4276054318761453e-05, + 0.015187932178378105, + -0.01826000213623047, + -0.013471649028360844, + 0.0267865601927042, + 0.009490498341619968, + 0.003749961731955409, + 0.0023275623098015785, + -0.009576704353094101, + 0.020705116912722588, + 0.04617507755756378, + 0.0036480817943811417, + -0.008479537442326546, + 0.029968345537781715, + -0.013126824982464314, + 0.06310280412435532, + 0.02032894641160965, + -0.02863606996834278, + 0.045579470694065094, + 0.043604571372270584, + 0.038745686411857605, + 0.005999154876917601, + -0.003458036808297038, + 0.03912185877561569, + 0.01766439527273178, + 0.0033620346803218126, + 0.0021316397469490767, + -0.009145674295723438, + 0.030234800651669502, + -0.011347846128046513, + -0.0032092148903757334, + 0.01131649874150753, + 0.020250577479600906, + 0.01871454156935215, + 0.07448199391365051, + -0.01264877337962389, + -0.0205483790487051, + 0.0038283306639641523, + -0.03592439740896225, + -0.005442734342068434, + 0.04078328236937523, + 0.012829022482037544, + 0.03335389122366905, + 0.040124982595443726, + 0.004396506585180759, + 0.040720585733652115, + 0.013565692119300365, + 0.0032601547427475452, + 0.038526251912117004, + -0.006269528530538082, + -0.016880705952644348, + 0.016097014769911766, + -0.05178630352020264, + -0.04285222664475441, + -0.0013019067700952291, + 0.047742459923028946, + -0.026943298056721687, + -0.02830692008137703, + -0.03083040565252304, + -0.006104953121393919, + -0.004847129341214895, + 0.0103290481492877, + -0.003961558453738689, + 0.016661271452903748, + -0.005419223569333553, + 0.0021923757158219814, + -0.010235005058348179, + 0.018338371068239212, + 0.02899656817317009, + 0.029529478400945663, + 0.00016077912005130202, + -0.0006656475597992539, + -0.009498335421085358, + -0.03322850167751312, + -0.03567361459136009, + -0.028228551149368286, + -0.019216105341911316, + -0.00629695737734437, + 0.013526507653295994, + 0.002488219179213047, + 0.010877631604671478, + 0.06266393512487411, + -0.007182528264820576, + -0.00501954136416316, + 0.0019944936502724886, + -0.007472494151443243, + 0.008753828704357147, + -0.026426061987876892, + 0.029372740536928177, + 0.04272683709859848, + 0.0035364057403057814, + -0.002582262037321925, + 0.029639195650815964, + -0.009686421602964401, + -0.022272499278187752, + -0.045454081147909164, + 0.004521897528320551, + -0.027883727103471756, + -0.03257019817829132, + 0.01201398391276598, + 0.015783537179231644, + -0.01604999229311943, + -0.033980842679739, + -0.03294637054204941, + -0.005818906240165234, + 0.00025445467326790094, + 0.02703734114766121, + -0.008847871795296669, + 0.01379296276718378, + -0.010877631604671478, + -0.014858782291412354, + -0.0031994187738746405, + 0.03473318740725517, + -0.07554781436920166, + 0.004894150421023369, + -0.02589315176010132, + 0.008918403647840023, + 0.035046663135290146, + -0.005842416547238827, + -0.01791517809033394, + 0.01811893656849861, + -0.0013009271351620555, + 0.024106336757540703, + -0.01996844820678234, + 0.05777370557188988, + -0.020281923934817314, + 0.0063008759170770645, + 0.0022922963835299015, + 0.0004525815893430263, + -0.01432587206363678, + 0.009012446738779545, + -0.025093786418437958, + 0.03949802741408348, + 0.03473318740725517, + 0.0014645226765424013, + -0.06865133345127106, + 0.021049940958619118, + -0.01604999229311943, + -0.055736105889081955, + -0.002472545253112912, + -0.029263023287057877, + -0.008432515896856785, + 0.04943523183465004, + -0.020626747980713844, + -0.006359652616083622, + 0.013095477595925331, + 0.04034441336989403, + -0.017021769657731056, + 0.029576500877738, + -0.05141013115644455, + -0.06294606626033783, + 0.0027468372136354446, + -0.02112830989062786, + -0.022554628551006317, + -0.004631614312529564, + -0.025109460577368736, + 0.03479588404297829, + 0.007629232481122017, + 0.01777411252260208, + 0.017507657408714294, + -0.004839292261749506, + 0.0231188852339983, + -0.022256825119256973, + 0.010407417081296444, + -0.004114377778023481, + 0.013260052539408207, + -0.038056038320064545, + 0.00546232657507062, + 0.023385340347886086, + -0.0014596246182918549, + -0.02184930630028248, + 0.019263125956058502, + 0.005489755887538195, + -0.01951390691101551, + -0.010250679217278957, + 0.03871433809399605, + -0.04896501824259758, + 0.011802387423813343, + 0.002974107628688216, + 0.014466936700046062, + -0.023181581869721413, + -0.02794642187654972, + -0.022006044164299965, + -0.03300906717777252, + -0.0205483790487051, + 0.03692752122879028, + 0.016927726566791534, + -0.011551606468856335, + -0.005423142109066248, + 0.009913691319525242, + 0.051096655428409576, + -0.012217743322253227, + 0.003054435830563307, + 0.023855555802583694, + 0.00546232657507062, + -0.007727193646132946, + 0.014992009848356247, + 0.03004671446979046, + -0.0376485176384449, + -0.023949598893523216, + 0.031958919018507004, + -0.007723275106400251, + 0.03652000427246094, + -0.011175434105098248, + 0.021081289276480675, + -0.01126947719603777, + -0.03351062908768654, + -0.03952937573194504, + 0.05316559970378876, + 0.02611258625984192, + 0.017507657408714294, + -0.0066417814232409, + 0.019921425729990005, + 0.001835796283558011, + 0.017413614317774773, + -0.013887004926800728, + 0.01329139992594719, + -0.017727091908454895, + -0.01027418952435255, + -0.0036461225245147943, + 0.009898018091917038, + 0.0056464942172169685, + -0.0005941357812844217, + 0.01062685064971447, + -0.021441787481307983, + 0.011183271184563637, + -0.0184951089322567, + 0.01235880795866251, + 0.02412201091647148, + -0.02448250912129879, + 0.004988193511962891, + -0.005924704484641552, + 0.025156483054161072, + -0.022789735347032547, + 0.012789838016033173, + -0.03780525550246239, + -0.0038165755104273558, + 0.022147109732031822, + 0.05369850993156433, + 0.002966270549222827, + 0.0171001385897398, + -0.005920785944908857, + 0.00158207630738616, + 0.02219413034617901, + 0.0036324081011116505, + 0.03811873123049736, + -0.037491779774427414, + -4.022539360448718e-05, + 0.030799057334661484, + 0.0701560229063034, + 0.00029192492365837097, + 0.009365107864141464, + 0.002096373587846756, + -0.012907391414046288, + 0.008675459772348404, + 0.002613609656691551, + -0.007213876117020845, + -0.02412201091647148, + 0.014811760745942593, + 0.029294371604919434, + 0.0009374904329888523, + 0.021316396072506905, + -0.004208420868963003, + -0.026363367214798927, + -0.007178610190749168, + 0.024858679622411728, + -0.0072021204978227615, + -0.002705693244934082, + -0.008448189124464989, + 0.0012137414887547493, + -0.018620498478412628, + -0.008573579601943493, + -0.005082236602902412, + 0.012155048549175262, + -0.000502052076626569, + 0.0234480369836092, + -0.01896532252430916, + -0.03150438144803047, + 0.01780546084046364, + -0.004549326375126839, + 0.0038400860503315926, + 0.04357322305440903, + 0.03949802741408348, + -0.011488910764455795, + 0.025203503668308258, + 0.012162884697318077, + -0.018040567636489868, + -0.0011216577840968966, + 0.0059834811836481094, + -0.05695866420865059, + 0.0016104851383715868, + -0.021426113322377205, + 0.0048157814890146255, + -0.026723865419626236, + -0.01811893656849861, + -0.020140860229730606, + 0.01443558931350708, + -0.025564001873135567, + -0.029278697445988655, + -0.004408262204378843, + -0.02758592553436756, + 0.006579086184501648, + 0.01601080782711506, + -0.025611022487282753, + -0.010054755955934525, + -0.003489384427666664, + 0.01927880011498928, + -0.016833683475852013, + 0.0009144694777205586, + -0.02034461870789528, + -0.0013185602147132158, + 0.005677841603755951, + -0.011825897730886936, + -0.051566869020462036, + 0.032852329313755035, + 0.009796137921512127, + 0.009435640648007393, + 0.02714705839753151, + 0.022272499278187752, + -0.01952958106994629, + -0.04576755687594414, + 0.047178201377391815, + -0.022006044164299965, + 0.00716293603181839, + 0.007703682873398066, + -0.018087590113282204, + 0.021175332367420197, + 0.0410967580974102, + 0.005387875717133284, + 0.024890027940273285, + 0.030689341947436333, + 0.003379667643457651, + -0.02956082671880722, + 0.02633201889693737, + -0.015893254429101944, + 0.0010491664288565516, + -0.026958972215652466, + 0.004984274972230196, + -0.002523485105484724, + -0.001905348850414157, + -0.010187983512878418, + 0.01507037878036499, + 0.020877528935670853, + 0.03357332572340965, + 0.025219177827239037, + -0.013040618970990181, + -0.01195912528783083, + 0.00018037139670923352, + -0.023933924734592438, + -0.009490498341619968, + -0.011300824582576752, + 0.03222537413239479, + -0.01590109057724476, + -0.013651898130774498, + 0.023542078211903572, + 0.0032915023621171713, + 0.012891717255115509, + -0.029654869809746742, + -0.0029897813219577074, + 0.008518721908330917, + 0.02413768507540226, + 0.00045870416215620935, + 0.005231137853115797, + -0.0018730215961113572, + 0.01096383761614561, + 0.005474081728607416, + -0.0029643112793564796, + -0.018651846796274185, + 0.014396404847502708, + -0.012789838016033173, + 0.03730369359254837, + 0.01547006145119667, + 0.017382267862558365, + -0.020626747980713844, + -0.011966962367296219, + -0.01896532252430916, + 0.028479332104325294, + 0.003577549709007144, + 0.02368314377963543, + -0.00011161474685650319, + 0.004557163454592228, + 0.03664539381861687, + 0.002319725463166833, + 0.002206090372055769, + 0.011410541832447052, + 0.03429431840777397, + -0.008087691850960255, + 0.023824207484722137, + -0.023730164393782616, + 0.03705291450023651, + -0.0009962671902030706, + -0.008761665783822536, + -0.027977770194411278, + -0.04583025351166725, + 0.006927828770130873, + -0.02703734114766121, + 0.02288377843797207, + 0.0007082608062773943, + -0.005720944609493017, + -0.0007229549810290337, + 0.00615197466686368, + -0.007629232481122017, + -0.0006916073616594076, + -0.01547789853066206, + 0.0059717255644500256, + -0.019796036183834076, + 0.017852481454610825, + -0.018573477864265442, + -0.014161297120153904, + 0.008628438226878643, + -0.03197459504008293, + 0.004882395267486572, + -0.0006264630355872214, + -0.04103406146168709, + 0.05755427107214928, + 0.015485734678804874, + -0.036206524819135666, + -0.02056405320763588, + -0.025109460577368736, + 0.013510833494365215, + -0.0010805140482261777, + 0.03003104031085968, + -0.0012872125953435898, + 0.014459099620580673, + 0.0062656099908053875, + 0.014263177290558815, + -0.0011774958111345768, + 0.023244276642799377, + 0.026018543168902397, + -0.01791517809033394, + 0.0008576518739573658, + -0.012844696640968323, + -0.009427803568542004, + -0.012421502731740475, + -0.007789888884872198, + 0.0073118372820317745, + 0.023495057597756386, + -0.019701993092894554, + 0.0005701352492906153, + -0.025031091645359993, + -0.04561081901192665, + -0.009999897330999374, + 0.02321292832493782, + -0.006363571155816317, + -0.007111996412277222, + -0.01478041335940361, + 0.011441889218986034, + -0.00019053489086218178, + 0.03473318740725517, + 0.002758592367172241, + -0.011222455650568008, + 0.01905936561524868, + -0.013087640516459942, + -0.011097065173089504, + -0.02379286102950573, + -0.03510935977101326, + -0.01061901357024908, + -0.02470194175839424, + 0.007096322253346443, + 0.0031680711545050144, + -0.018416740000247955, + 0.009372944943606853, + 0.006453695707023144, + -0.016457511112093925, + 0.020375967025756836, + -0.016692619770765305, + 0.010164473205804825, + -0.0020571888890117407, + -0.036081135272979736, + -0.005446652881801128, + 0.0169904213398695, + 0.012311786413192749, + 0.009153511375188828, + 0.00748424930498004, + 0.023056190460920334, + -0.0031621933449059725, + -0.02874578721821308, + -0.005963888950645924, + 0.03197459504008293, + 0.02308753877878189, + -0.02727244794368744, + -0.0068494598381221294, + 0.01502335723489523, + -0.009631562978029251, + 0.011159760877490044, + 0.007832991890609264, + -0.029043590649962425, + 0.026958972215652466, + -0.0067044771276414394, + 0.018683195114135742, + -0.014145622961223125, + 0.023134559392929077, + 0.02909061126410961, + -0.055704761296510696, + -0.009905855171382427, + 0.00894191488623619, + -0.017868155613541603, + -0.03730369359254837, + -0.007660579867660999, + 0.005920785944908857, + 0.0436672642827034, + 0.010360395535826683, + 0.0009291637106798589, + -0.006943502463400364, + -0.009341597557067871, + -0.0017789786215871572, + 0.028479332104325294, + -0.024670593440532684, + -0.01431803498417139, + -0.013087640516459942, + 0.0007445064838975668, + -0.0015713005559518933, + 0.007977974601089954, + 0.015305486507713795, + 0.004036008846014738, + -0.0348585769534111, + 0.032382115721702576, + -0.003963517490774393, + 0.021786611527204514, + 0.03266424313187599, + 0.015407365746796131, + 0.03235076740384102, + 0.014553142711520195, + -0.011535932309925556, + 0.007300082128494978, + -0.029529478400945663, + -0.029278697445988655, + -0.020485684275627136, + 0.0014743187930434942, + -0.005274240858852863, + -0.0046433694660663605, + 0.01695907488465309, + 0.005626901518553495, + -0.011465400457382202, + -0.010791425593197346, + -0.003389463759958744, + -0.056770578026771545, + -0.010109614580869675, + 0.008510884828865528, + -0.001361663220450282, + -0.009890181012451649, + -0.05025026947259903, + 0.006355734542012215, + 0.02206873893737793, + -0.001770162140019238, + -0.00230992934666574, + 0.030093736946582794, + 0.02288377843797207, + 0.024686267599463463, + 0.010493623092770576, + -0.028150182217359543, + -0.012672284618020058, + 0.00894975196570158, + 0.0040595196187496185, + 0.01195128820836544, + 0.023479383438825607, + -0.015908928588032722, + -0.013839984312653542, + -0.011144086718559265, + 0.048776932060718536, + -0.011778876185417175, + 0.029294371604919434, + -0.025564001873135567, + 0.025830456987023354, + -0.0006093197735026479, + -0.013487323187291622, + -0.0030309250578284264, + -0.02401229366660118, + -0.016426164656877518, + -0.032632894814014435, + 0.010611176490783691, + -0.02669251710176468, + -0.012170721776783466, + 0.010689545422792435, + 0.0207678135484457, + 0.012225580401718616, + 0.009286738932132721, + -0.023385340347886086, + 0.04031306877732277, + -0.02264867164194584, + -0.020611073821783066, + -0.003530528163537383, + -0.008534395135939121, + -0.005125339608639479, + -0.00040066204383037984, + -0.008354146964848042, + 0.0063008759170770645, + 0.0017525290604680777, + -0.0035697126295417547, + 0.022209804505109787, + 0.0247332900762558, + -0.03561092168092728, + 0.03567361459136009, + 0.03244480863213539, + 0.014835271053016186, + 0.015454387292265892, + 0.02970189042389393, + 0.008573579601943493, + 0.019247451797127724, + -0.014741228893399239, + 0.011010859161615372, + 0.04943523183465004, + 0.01566598378121853, + -0.008424678817391396, + 0.005670004524290562, + 0.0008708766545169055, + -0.006434103474020958, + 0.006179403979331255, + -0.020046817138791084, + -0.00035413040313869715, + 0.063698410987854, + -0.04031306877732277, + 0.023730164393782616, + -0.038651641458272934, + -0.02565804496407509, + 0.04658259451389313, + 0.005474081728607416, + -0.017821134999394417, + -0.04159832000732422, + 0.037617169320583344, + 0.024090662598609924, + 0.004682553932070732, + -0.01896532252430916, + -0.029419761151075363, + -0.011097065173089504, + 0.009521846659481525, + -0.018918301910161972, + -0.01896532252430916, + -0.0402190238237381, + 0.0034952620044350624, + 0.013079803436994553, + 0.03153572604060173, + -0.011465400457382202, + -0.010407417081296444, + -0.014600164256989956, + -0.029576500877738, + 0.022225478664040565, + 0.05266403779387474, + 0.0015115441055968404, + 0.000897326273843646, + -0.022664345800876617, + ], + "index": 70, + }, + { + "title": "Tablets of Bah\u00e1\u2019u\u2019ll\u00e1h Revealed After the Kit\u00e1b-i-Aqdas", + "text": "The Tablets of Bah\u00e1\u2019u\u2019ll\u00e1h Revealed After the Kit\u00e1b-i-Aqdas are selected tablets written by Bah\u00e1'u'll\u00e1h, the founder of the Bah\u00e1'\u00ed Faith, and published together as of 1978.As his mission drew to a close after his writing of the Kit\u00e1b-i-Aqdas in 1873, he continued to write unnumbered tablets and letters, doing so until the last days of his life in 1892.Six of the tablets in this volume were translated into English and published in 1917.", + "vector": [ + 0.03467293083667755, + -0.0244834516197443, + -0.007326378487050533, + 0.036854337900877, + 0.01987665891647339, + -0.039408884942531586, + -0.016231408342719078, + -0.009436030872166157, + -0.023134421557188034, + 0.059873949736356735, + 0.0033653981518000364, + -0.006041930057108402, + 0.009371450170874596, + -0.0044919815845787525, + -0.023823287338018417, + -0.0006215940811671317, + 0.022215932607650757, + 0.0018019949784502387, + -0.030912868678569794, + -0.029621245339512825, + -0.05083258077502251, + 0.008661056868731976, + 0.020393308252096176, + 0.0008077134843915701, + 0.019101684913039207, + 0.0018145523499697447, + -0.04735954850912094, + -0.04049959033727646, + 0.030912868678569794, + 0.07462716847658157, + 0.014853676781058311, + 0.00028074884903617203, + -0.011380642652511597, + 0.010089019313454628, + -0.030941572040319443, + 0.0011615647235885262, + 0.014071526005864143, + 0.030884165316820145, + -0.021369202062487602, + -0.049225226044654846, + -0.0005188920185901225, + 0.03504606708884239, + -7.977348286658525e-05, + 0.018082736060023308, + -0.046326249837875366, + -0.05137793347239494, + 0.006903012748807669, + -0.02848748490214348, + -0.011201250366866589, + 0.021742338314652443, + -0.0656144991517067, + -0.08237691223621368, + -0.024282531812787056, + 0.03478774055838585, + 0.026478292420506477, + -0.0010359900770708919, + 0.015700407326221466, + 0.05037333816289902, + 0.011847062967717648, + -0.010454978793859482, + 0.010490857064723969, + -0.05255474895238876, + 0.04380040615797043, + 0.00907724630087614, + -0.035304389894008636, + 0.0010700746206566691, + -0.009285341948270798, + 0.02370847761631012, + 0.018355412408709526, + -0.04222175478935242, + 0.02494269609451294, + 0.015226812101900578, + -0.0025294304359704256, + 0.06377752125263214, + -0.005353064276278019, + 0.04724473878741264, + -0.009995735250413418, + 0.05241123214364052, + 0.02432558685541153, + -0.0025312243960797787, + -0.027210213243961334, + 0.015757814049720764, + 0.024583911523222923, + -0.020852552726864815, + -0.041131049394607544, + -0.013497470878064632, + -0.05238252878189087, + -0.030080487951636314, + 0.0034245976712554693, + -0.020235443487763405, + 0.0014109198236837983, + 0.051664963364601135, + -0.061022061854600906, + -0.0025832480750977993, + 0.018541980534791946, + 0.030912868678569794, + 0.008417082950472832, + 0.005044509656727314, + 0.051664963364601135, + -0.05427691340446472, + 0.009414504282176495, + -0.010318640619516373, + -0.002328511094674468, + -0.036222878843545914, + 0.04133196920156479, + 0.003953804727643728, + 0.048880793154239655, + -0.029678650200366974, + -0.031745247542858124, + -0.008000893518328667, + -0.0015696820337325335, + 0.013511822558939457, + -0.011882941238582134, + 0.010160775855183601, + -0.012112563475966454, + -0.028630999848246574, + -0.011351940222084522, + -0.0346442274749279, + -0.03438590094447136, + -0.012399590574204922, + 0.0025688966270536184, + -0.017264708876609802, + 0.07169948518276215, + -0.030740652233362198, + -0.004194190260022879, + -0.01917344145476818, + -0.009967031888663769, + -0.020608579739928246, + 0.03154432773590088, + -0.01611659862101078, + -0.05528150871396065, + -0.025114912539720535, + 0.0038210544735193253, + -0.00021841004490852356, + -0.02167058177292347, + 0.004517096094787121, + -0.02512926422059536, + 0.0076851630583405495, + 0.029004136100411415, + 0.0044561028480529785, + -0.02212982438504696, + -0.02568896673619747, + 0.02268952876329422, + 0.0057836053892970085, + 0.0028864210471510887, + 0.03145822137594223, + 0.007064465899020433, + 0.010067491792142391, + 0.040298670530319214, + 0.0028056944720447063, + 0.01938871294260025, + 0.031257301568984985, + -0.025732021778821945, + 0.029032837599515915, + -0.041073646396398544, + 0.06636077165603638, + 0.008087001740932465, + 0.005683145951479673, + -0.0007929136627353728, + 0.0035107058938592672, + -0.02234509587287903, + -0.0014997189864516258, + 0.020938660949468613, + -0.009270990267395973, + 0.03550530970096588, + 0.054104696959257126, + 0.03318038582801819, + 0.017092490568757057, + -0.023636719211935997, + 0.036567311733961105, + 0.05398988351225853, + -0.004997867625206709, + 0.0012064126785844564, + 0.01328937616199255, + 0.0388922356069088, + 0.011940347030758858, + 0.03186006098985672, + -0.0009615423623472452, + -0.036997854709625244, + 0.004430987872183323, + -0.018599385395646095, + -0.00484000239521265, + 0.03142951801419258, + -0.005948646459728479, + 0.02274693362414837, + 0.010376046411693096, + 0.018685493618249893, + 0.0408727265894413, + -0.026004698127508163, + 0.016044840216636658, + -0.04646976292133331, + 0.01692027412354946, + 0.034529417753219604, + 0.030912868678569794, + 0.026808375492691994, + 0.01858503557741642, + -0.025832481682300568, + -0.032950762659311295, + -0.056659240275621414, + -0.010519560426473618, + 0.0449485182762146, + -0.014042823575437069, + 0.0019338482525199652, + 0.013210443779826164, + -0.006493998691439629, + 0.0698051005601883, + 0.038576506078243256, + -0.03386925160884857, + -0.00716133788228035, + 0.043599486351013184, + -0.0010889108525589108, + -0.014767568558454514, + 0.002502521499991417, + 0.004395109601318836, + 0.02799953892827034, + 0.013411362655460835, + -0.04911041632294655, + -0.036165472120046616, + 0.03760061040520668, + -0.04374299943447113, + 0.013777323067188263, + -0.0654996931552887, + -0.02590423822402954, + -0.014315499924123287, + 0.04377170279622078, + 0.01740822196006775, + 0.0286740530282259, + 0.011516980826854706, + -0.001519452198408544, + 0.02944902889430523, + 0.040269967168569565, + -0.036997854709625244, + 0.00551092904061079, + 0.038260772824287415, + -0.003304404905065894, + 0.000582127773668617, + 0.01638927310705185, + 0.016001787036657333, + 0.033323898911476135, + -0.003388719167560339, + -0.013963891193270683, + 0.027525942772626877, + -0.02488528937101364, + 0.039782021194696426, + 0.015183757990598679, + 0.05964432656764984, + -0.011581562459468842, + -0.013490295968949795, + 0.019345657899975777, + -0.02642088755965233, + 0.06498304009437561, + 0.010555438697338104, + 0.02185714989900589, + 0.015829570591449738, + -0.016690652817487717, + 0.061596114188432693, + -0.01657584123313427, + 0.03708396106958389, + 0.005184435285627842, + -0.016432328149676323, + 0.009694356471300125, + 0.03719877079129219, + 0.009845045395195484, + -0.051693663001060486, + -0.07307721674442291, + 0.057434216141700745, + -0.014982839114964008, + -0.08008068799972534, + 0.024928344413638115, + -0.004377170465886593, + 0.04222175478935242, + -0.024153370410203934, + -0.03932277485728264, + 0.0022477845195680857, + -0.06727926433086395, + 0.034529417753219604, + -0.012119739316403866, + 0.0698051005601883, + -0.014258094131946564, + 0.03630898520350456, + -0.03886353224515915, + -0.09328395873308182, + -0.043570782989263535, + -0.01917344145476818, + 0.00721515528857708, + -0.01617400348186493, + -0.029678650200366974, + 0.015628650784492493, + -0.02349320612847805, + -0.038232073187828064, + -0.021139580756425858, + -0.030166596174240112, + -0.0028092823922634125, + -0.0011965461308136582, + -0.011330412700772285, + -0.043599486351013184, + 0.012356536462903023, + 0.0052526043727993965, + -0.0025294304359704256, + -0.02268952876329422, + 0.005159320309758186, + 0.028530539944767952, + -0.0510047972202301, + -0.014114580117166042, + -0.0009714089101180434, + -0.03992553427815437, + 0.035390499979257584, + 0.04420224577188492, + -0.015155055560171604, + -0.03223319724202156, + -0.040183860808610916, + 0.01895816996693611, + -0.041016239672899246, + -0.05367415398359299, + 0.04457538202404976, + -0.011538508348166943, + 0.0009391183266416192, + -0.04931133612990379, + 0.006881485693156719, + 0.004305413458496332, + 0.035734932869672775, + -0.025660265237092972, + -0.018628088757395744, + 0.026994941756129265, + 0.029118945822119713, + -0.007527297828346491, + 0.05846751481294632, + -0.024339936673641205, + -0.0017840557266026735, + -0.03645250201225281, + -0.007412486709654331, + -0.028889324516057968, + 0.010261235758662224, + 0.04959836229681969, + 0.00474671833217144, + -0.032089680433273315, + -0.007168513257056475, + 0.012421118095517159, + -0.00015887424524407834, + -0.03556271642446518, + -0.032922063022851944, + -0.009407328441739082, + 0.0011911643669009209, + -0.03398406505584717, + -0.030338814482092857, + -0.03341000899672508, + 0.005489401984959841, + -0.025660265237092972, + 0.02642088755965233, + 0.011804008856415749, + 0.0006722723483107984, + -0.024655668064951897, + -0.030166596174240112, + 0.008330974727869034, + 0.0612516812980175, + 0.016647599637508392, + 0.015341623686254025, + -0.0408727265894413, + 0.0550231859087944, + -0.029592541977763176, + 0.029965678229928017, + -0.01371991727501154, + -0.02281869202852249, + 0.013145862147212029, + 0.01328937616199255, + -0.04750306159257889, + 0.05177977308630943, + 0.01043345220386982, + -0.047675278037786484, + 0.017465626820921898, + -0.03231930360198021, + 0.07703819870948792, + -0.0014180955477058887, + -0.010031613521277905, + 0.08111398667097092, + -0.0012082066386938095, + -0.022990908473730087, + -0.032864656299352646, + 0.014781919308006763, + -0.007943487726151943, + -0.007329966407269239, + 0.04529295116662979, + -0.0029240932781249285, + 0.05958692356944084, + 0.02571767009794712, + -0.0193600095808506, + -0.04971317574381828, + -0.03803115338087082, + 0.006246437318623066, + -0.032864656299352646, + -0.009184882044792175, + 0.013224795460700989, + 0.03467293083667755, + 0.0153272720053792, + -0.025760723277926445, + 0.014695811085402966, + 0.03312298282980919, + 0.008955259807407856, + -0.0038067030254751444, + -0.009708707220852375, + 0.06165352091193199, + 0.027698159217834473, + 0.0030460800044238567, + 0.041102346032857895, + -0.00021134647249709815, + 0.007505770772695541, + -0.024497803300619125, + 0.03590714931488037, + 0.006745147984474897, + -0.028013890609145164, + 0.005536044016480446, + 0.026349131017923355, + -0.003582462901249528, + 0.018054034560918808, + -0.010533911176025867, + -0.034988660365343094, + 0.04058569669723511, + 0.04578089714050293, + -0.01186858955770731, + -0.03429979458451271, + -0.014049999415874481, + 0.03105638176202774, + -0.026564400643110275, + -0.02985086664557457, + -0.0024504978209733963, + -0.0347590371966362, + 0.037457097321748734, + -0.035821039229631424, + -0.03969591110944748, + -0.006196207366883755, + 0.02901848591864109, + 0.0471012219786644, + 0.00042964439489878714, + -0.004369994625449181, + 0.027468537911772728, + -0.06285903602838516, + -0.08473053574562073, + -0.0061280382797122, + 0.030137894675135612, + 0.024454748257994652, + 0.02312006987631321, + -0.022086771205067635, + -0.03407017141580582, + 0.014444662258028984, + 0.01063437107950449, + 0.018010979518294334, + -0.03800245001912117, + 0.005780017469078302, + 0.019647037610411644, + -0.018757252022624016, + -0.012327834032475948, + -0.04626884311437607, + -0.011136669665575027, + 0.005263368133455515, + 0.0899544358253479, + -0.04173380881547928, + -0.031687844544649124, + -0.04690030589699745, + -0.009687180630862713, + 0.0007704896270297468, + 0.0035107058938592672, + -0.0020540410187095404, + 0.0022208758164197206, + -0.03309427946805954, + 0.026133859530091286, + -0.04655586928129196, + 0.031659141182899475, + -0.042307864874601364, + -0.0023482441902160645, + 0.009902451187372208, + -0.029004136100411415, + -0.0043233525939285755, + -0.0430254302918911, + -0.005302834324538708, + 0.022086771205067635, + 0.0011310679838061333, + -0.04417354241013527, + -0.02630607597529888, + -0.03708396106958389, + 0.007943487726151943, + 0.036108069121837616, + 0.023421449586749077, + -0.025488046929240227, + 0.007764095440506935, + -0.03805985674262047, + -0.010376046411693096, + -0.027669457718729973, + -0.03226189687848091, + -0.011882941238582134, + 0.04543646425008774, + -0.006052693817764521, + 0.007656460162252188, + 0.016676301136612892, + 0.01938871294260025, + 0.029133297502994537, + -3.0748949939152226e-05, + -0.004646258894354105, + -0.05387507379055023, + -0.04250878095626831, + -0.032032277435064316, + -0.008589300327003002, + 0.024870937690138817, + -0.0020970951300114393, + 0.01976184733211994, + 0.01670500449836254, + 0.033266495913267136, + -0.04646976292133331, + -0.027583349496126175, + -0.005751315038651228, + 0.020264146849513054, + 0.045924410223960876, + -0.027640754356980324, + -0.07525862753391266, + 0.025430642068386078, + 0.010239708237349987, + -0.03280724957585335, + 0.010167951695621014, + 0.004097318276762962, + 0.005815896205604076, + -0.05588426813483238, + -0.018283655866980553, + -0.004926110617816448, + -0.021096525713801384, + -0.00016291056817863137, + 0.015025893226265907, + 0.00510191498324275, + 0.004111669957637787, + 0.022244635969400406, + -0.0015983846969902515, + 0.04239397123456001, + 0.013231970369815826, + -0.012169968336820602, + -0.018972521647810936, + -0.016044840216636658, + -0.004814887419342995, + 0.008409908041357994, + 0.036165472120046616, + -0.027124105021357536, + 0.016590192914009094, + 0.03765801712870598, + 0.01938871294260025, + -0.028085647150874138, + 0.00628231605514884, + 0.005726200062781572, + -0.003306198865175247, + 0.014114580117166042, + 0.027296321466565132, + 0.018082736060023308, + -0.026593104004859924, + -0.049741875380277634, + 0.051693663001060486, + 0.03401276469230652, + -0.029334217309951782, + 0.013856255449354649, + -0.020709039643406868, + -0.010268411599099636, + 0.031171193346381187, + 0.0017876435304060578, + -0.03461552411317825, + -0.00489381980150938, + 0.0018109645461663604, + 0.02293350175023079, + 0.08013809472322464, + 0.06836996227502823, + -0.013691214844584465, + -0.03194616734981537, + 0.004466866608709097, + 0.028473135083913803, + -0.014114580117166042, + 0.001538288313895464, + 0.0008767794934101403, + 0.0010772503446787596, + -0.012736848555505276, + 0.02111087739467621, + -0.020335903391242027, + -0.006511937826871872, + -0.018111439421772957, + -0.02620561607182026, + -0.009744585491716862, + -0.013109983876347542, + 0.026492644101381302, + 0.005399705842137337, + 0.03909315541386604, + -0.011976225301623344, + 0.021168282255530357, + 0.020407659932971, + 0.02019238844513893, + 0.0010180509416386485, + -0.03341000899672508, + 0.008998313918709755, + -0.011459575966000557, + 0.03025270625948906, + 0.005991700571030378, + -0.0016234996728599072, + -0.018326710909605026, + -0.012019279412925243, + -0.003482003230601549, + -0.01305975392460823, + 0.007634933106601238, + 0.011036209762096405, + -0.038232073187828064, + -0.03269243985414505, + 0.02426818013191223, + -0.017149897292256355, + 0.00201816251501441, + 0.005876889452338219, + 0.030539732426404953, + -0.02429688349366188, + 0.024067262187600136, + -0.004517096094787121, + 0.009421680122613907, + 0.014595352113246918, + -0.01105056144297123, + -0.028013890609145164, + 8.08386248536408e-05, + 0.00730843935161829, + 0.03717007115483284, + -0.017365166917443275, + -0.007505770772695541, + 0.014265269972383976, + -0.02376588247716427, + -0.05022982507944107, + -0.0234645027667284, + -0.03444330766797066, + 0.020694687962532043, + 0.00962977483868599, + 0.0122560765594244, + -0.004452514927834272, + 0.003996858838945627, + 0.008618002757430077, + -0.009192057885229588, + -0.03671082481741905, + 0.014839325100183487, + 0.013389836065471172, + 0.013267849572002888, + -0.03544790297746658, + 0.015384677797555923, + 0.006465295795351267, + -0.020307200029492378, + -0.03613676875829697, + -0.01162461657077074, + 0.0327785462141037, + 0.0019266725284978747, + 0.03992553427815437, + -0.024426044896245003, + -0.008897854946553707, + 0.051636260002851486, + 0.014602527022361755, + -0.0031931817065924406, + -0.01593003049492836, + -0.0065370528027415276, + -0.0012324246345087886, + 0.04690030589699745, + 0.014057175256311893, + -0.015384677797555923, + -0.0009624392841942608, + -0.024024207144975662, + -0.010828115046024323, + 0.00912030041217804, + -0.00024285222752951086, + -0.03966720774769783, + -0.014286797493696213, + -0.02861664816737175, + 0.00014541982091031969, + 0.004621143918484449, + -0.029592541977763176, + -0.021598823368549347, + -0.015355974435806274, + 0.009522139094769955, + -0.029535137116909027, + -0.01082093920558691, + -0.02172798663377762, + -0.0017526621231809258, + 0.023938098922371864, + -0.01134476438164711, + -0.02432558685541153, + -0.005374591331928968, + -0.04532165080308914, + -0.04730214178562164, + -0.017881818115711212, + 0.02413901872932911, + -0.08042512089014053, + 0.011394994333386421, + -0.0027608464006334543, + -0.00321470876224339, + 0.01338266022503376, + 8.542153409507591e-06, + -0.013734268955886364, + 0.0046247318387031555, + -0.0038138788659125566, + 0.029965678229928017, + 0.015542542561888695, + -0.026435239240527153, + -0.0014369317796081305, + 0.002829015487805009, + 0.052152909338474274, + 0.013669687323272228, + 0.016059191897511482, + -0.03148692473769188, + 0.01673370786011219, + 0.018714196979999542, + 0.0076851630583405495, + -0.02411031536757946, + 0.03028140775859356, + -0.010318640619516373, + -0.014473364688456059, + 0.016130948439240456, + 0.01214844174683094, + -0.008036771789193153, + 0.0021473250817507505, + -0.034529417753219604, + -0.014681460335850716, + -0.016217056661844254, + 0.028659703209996223, + 0.006705681327730417, + -0.030798057094216347, + -0.021196985617280006, + 0.015786515548825264, + -0.03421368449926376, + -0.00797936599701643, + 0.017680898308753967, + 0.014695811085402966, + -0.07548824697732925, + -0.012772726826369762, + 0.021168282255530357, + 0.015068947337567806, + -0.01598743535578251, + 0.021943258121609688, + 0.02089560590684414, + 0.010103370063006878, + 0.015255515463650227, + 0.03071194887161255, + -0.01781005971133709, + -0.0007669017650187016, + -0.04078661650419235, + 0.021527066826820374, + -0.021785391494631767, + 0.001253951690159738, + -0.036538608372211456, + -0.06601633876562119, + 0.011581562459468842, + 0.03274984657764435, + -0.01796792633831501, + 0.013461592607200146, + 0.02716715820133686, + 0.02386634238064289, + 0.03194616734981537, + 0.002961765741929412, + 0.041418079286813736, + 0.029965678229928017, + -0.0010646928567439318, + -0.015542542561888695, + 0.023636719211935997, + -0.01799662783741951, + 0.0137988505885005, + 0.004438163712620735, + -0.01874290034174919, + 0.027267618104815483, + -0.03851909935474396, + 0.012937767431139946, + -0.026219967752695084, + 0.073593869805336, + -0.005266955588012934, + -0.005496577825397253, + -0.0367395281791687, + -0.014997189864516258, + -0.014136107638478279, + 0.03180265426635742, + -0.029965678229928017, + -0.007534473668783903, + -0.015298569574952126, + -0.001488955458626151, + -0.009651301428675652, + 0.01381320133805275, + 0.038949642330408096, + -0.01555689424276352, + 0.0035412025172263384, + -0.028415728360414505, + -0.03429979458451271, + 0.010103370063006878, + 0.05364545062184334, + 0.005256192293018103, + -0.01157438661903143, + 0.04004034399986267, + -0.028358323499560356, + -0.0193600095808506, + -0.0026765321381390095, + -0.022388150915503502, + 0.006942479405552149, + 0.009758937172591686, + -0.013081281445920467, + 0.0008175800903700292, + 0.012227374128997326, + -0.011710724793374538, + 0.0326637364923954, + -0.04374299943447113, + 0.006996296811848879, + 0.013892133720219135, + 0.004682137165218592, + -0.01781005971133709, + -0.004194190260022879, + -0.02787037566304207, + 0.04813452437520027, + 0.0046319072134792805, + -0.029994379729032516, + -0.026047751307487488, + -0.03869131579995155, + -0.026506995782256126, + 0.01673370786011219, + 0.033323898911476135, + -0.019934063777327538, + 0.02416772022843361, + 0.008079825900495052, + 0.017637843266129494, + 0.011136669665575027, + 0.018541980534791946, + 0.011273007839918137, + 0.004513508640229702, + 0.015413380227982998, + -0.013734268955886364, + -0.026047751307487488, + -0.0018154493300244212, + -0.002769815968349576, + 0.011172547936439514, + -0.07169948518276215, + -0.010842466726899147, + -0.006702093873172998, + -0.011925995349884033, + -0.0051557328552007675, + 0.011208426207304, + 0.006214146967977285, + -0.0017060200916603208, + 0.012155617587268353, + -0.02454085648059845, + -0.003304404905065894, + 0.010899871587753296, + 0.027238916605710983, + -0.0035429964773356915, + 0.06343308836221695, + 0.0327785462141037, + 0.024842236191034317, + 0.00019026787776965648, + -0.022416852414608, + -0.016748057678341866, + -0.02188585139811039, + -0.013619458302855492, + -0.0040506767109036446, + -0.007362257223576307, + -0.017236005514860153, + 0.0004964679828844965, + -0.006084984168410301, + -0.004710840061306953, + 0.012794253416359425, + 0.03137211129069328, + 0.007498594932258129, + 0.032520223408937454, + -0.003482003230601549, + 0.02797083556652069, + 0.010627195239067078, + -0.012607686221599579, + -0.008201812393963337, + -0.02673661708831787, + 0.003004819853231311, + -0.009601072408258915, + 0.024626964703202248, + 0.014071526005864143, + 0.019804902374744415, + -0.03142951801419258, + -0.02024979516863823, + 0.0039681559428572655, + -0.0037492974661290646, + 0.009751761332154274, + 0.050057608634233475, + -0.02848748490214348, + 0.031228598207235336, + 0.004398697521537542, + -0.006734384223818779, + 0.03748580068349838, + 0.03613676875829697, + -0.030482327565550804, + -0.035333093255758286, + -0.028300918638706207, + 0.059012867510318756, + 0.007972190156579018, + 0.06463860720396042, + 0.024454748257994652, + -0.009457558393478394, + -0.013167389668524265, + 0.007390959654003382, + 0.0041475482285022736, + 0.0025868359953165054, + 0.02633477933704853, + -0.006038342602550983, + 0.027310673147439957, + 0.022402500733733177, + -0.006239261478185654, + 0.02537323720753193, + -0.010849641636013985, + -0.019403062760829926, + -0.01941741444170475, + -0.004872292745858431, + 0.011674846522510052, + 0.04127456247806549, + -0.02663615718483925, + 0.0022190818563103676, + -0.034529417753219604, + 0.017279058694839478, + 0.008811745792627335, + 0.005966585595160723, + 0.0224742591381073, + -0.0012279398506507277, + 0.022675177082419395, + 0.004240832291543484, + -0.06245719641447067, + -0.01555689424276352, + -0.032864656299352646, + 0.010117721743881702, + -0.04816322401165962, + 0.02062293142080307, + 0.007032175548374653, + -0.009615423157811165, + 0.03636639192700386, + -0.012198671698570251, + -0.02475612796843052, + -0.019116036593914032, + 0.02537323720753193, + 0.010770709253847599, + -0.0008296890300698578, + 0.034529417753219604, + -0.01898687332868576, + -0.021900203078985214, + -0.028229160234332085, + -0.006246437318623066, + 0.0005368312704376876, + -0.02735372632741928, + -0.029649946838617325, + -0.026133859530091286, + -0.025861183181405067, + -0.030740652233362198, + -0.03401276469230652, + -2.086836138914805e-05, + 0.030884165316820145, + 0.01115819625556469, + -0.016618896275758743, + -0.012973645702004433, + 0.01461687870323658, + -0.026478292420506477, + 0.01512635312974453, + -0.029319865629076958, + 0.0234645027667284, + -0.014487716369330883, + 0.02475612796843052, + -0.013597930781543255, + -0.01938871294260025, + 0.007103932090103626, + -0.01960398256778717, + -0.004552974831312895, + -0.00048032269114628434, + -0.04159029573202133, + -0.04044218361377716, + -0.05430561676621437, + -0.022560367360711098, + 0.03312298282980919, + 0.007520121987909079, + -0.02510056085884571, + 0.004208541475236416, + -0.006849195342510939, + -0.006569343619048595, + -0.03757190704345703, + 0.005259780213236809, + -0.01969009079039097, + -0.03648120164871216, + -0.028272215276956558, + 0.00917053036391735, + -0.01638927310705185, + -0.005482226610183716, + -0.033754441887140274, + 0.016776761040091515, + 0.0012907270574942231, + 0.0076636360026896, + 0.022330744192004204, + 0.025043154135346413, + -0.02392374724149704, + 0.012464172206819057, + 0.02488528937101364, + 0.07256057113409042, + -0.03524698317050934, + -0.0027769915759563446, + -0.026994941756129265, + 0.0194461178034544, + 0.019058629870414734, + -0.01750868186354637, + 0.03223319724202156, + 0.038605205714702606, + 0.007613406050950289, + 0.046354953199625015, + 0.03541920334100723, + -0.02207241952419281, + -0.042709700763225555, + 0.008739989250898361, + -0.0007866349187679589, + 0.011882941238582134, + -0.010096194222569466, + 0.011387818492949009, + -0.016719356179237366, + -0.02059422805905342, + -0.035792335867881775, + 0.07020694017410278, + -0.024009855464100838, + -0.006723620928823948, + 0.02333534136414528, + 0.005091151222586632, + 0.003803115338087082, + 0.0023213354870676994, + 0.03711266443133354, + -0.001791231450624764, + 0.022086771205067635, + 0.01925954967737198, + -0.055798158049583435, + 0.01793922297656536, + -0.007728217169642448, + 0.016346219927072525, + 0.04916782304644585, + -0.0029743232298642397, + -0.014437486417591572, + 0.017982276156544685, + 0.0002026010915869847, + -0.04911041632294655, + 0.016805464401841164, + -0.0245695598423481, + 0.015198109671473503, + 0.003306198865175247, + -0.0022011427208781242, + -0.005736963357776403, + -0.05752032250165939, + -0.015757814049720764, + 0.0049332864582538605, + -0.020048875361680984, + -0.010490857064723969, + 0.0173508170992136, + -0.03309427946805954, + -0.003198563354089856, + -0.020981714129447937, + 0.04305413365364075, + -0.007007060572504997, + 0.002269311575219035, + -0.01228477992117405, + 0.03145822137594223, + 0.006648276001214981, + -0.027124105021357536, + -0.010282762348651886, + 0.005360239651054144, + 0.019704442471265793, + 0.022402500733733177, + 0.024827884510159492, + -0.011904467828571796, + -0.032979466021060944, + 0.004549386911094189, + -0.016661949455738068, + 0.024368640035390854, + -0.0030030258931219578, + -0.01651843637228012, + 0.02365107089281082, + -0.03645250201225281, + 0.022431204095482826, + -0.0024989338126033545, + 0.03886353224515915, + -0.03352481871843338, + 0.02373717911541462, + -0.022058067843317986, + -0.008625178597867489, + 0.012105387635529041, + -0.020938660949468613, + -0.012629212811589241, + 0.028257863596081734, + 0.013971067033708096, + -0.007591878995299339, + -0.011890117079019547, + 0.014250918291509151, + -0.015269866213202477, + 0.015355974435806274, + -0.007060877978801727, + 0.013131511397659779, + -0.00536382757127285, + -0.027267618104815483, + 0.009737410582602024, + 0.018298007547855377, + -0.01237806398421526, + -0.013188916258513927, + -0.02550239861011505, + 0.0008758825715631247, + 0.0052956584841012955, + 0.011222777888178825, + -0.0057405512779951096, + -0.009758937172591686, + -0.015915678814053535, + -0.018441520631313324, + 0.025975994765758514, + -0.003404864575713873, + -0.004617555998265743, + -0.020909957587718964, + -0.0015212460421025753, + 0.002507903380319476, + 0.0015230400022119284, + -0.018785953521728516, + 0.013562052510678768, + -0.022029366344213486, + -0.0052884831093251705, + -0.03484514728188515, + 0.043197646737098694, + 0.026492644101381302, + 0.004875880666077137, + 0.017853114753961563, + 0.006397126708179712, + -0.011646143160760403, + -0.013691214844584465, + -0.02121133729815483, + -0.026937536895275116, + 0.026033399626612663, + -0.01219149585813284, + 0.011567210778594017, + 0.008316623978316784, + -0.0024235891178250313, + -0.012248901650309563, + -0.012069509364664555, + 0.03728488087654114, + -0.01086399331688881, + -0.0003946629003621638, + 0.023722827434539795, + -0.0012333216145634651, + -0.024454748257994652, + 0.029592541977763176, + 0.009845045395195484, + 0.01703508570790291, + 0.015786515548825264, + 0.028889324516057968, + -0.012435468845069408, + 0.008539070375263691, + 0.007857379503548145, + -0.013267849572002888, + -0.027066700160503387, + 0.0022639299277216196, + 0.0030604314524680376, + 0.017020734027028084, + 0.022302042692899704, + -0.0086754085496068, + 0.008646705187857151, + -0.013210443779826164, + 0.011165372096002102, + -0.009019841440021992, + -0.004334116354584694, + 0.00020417077757883817, + -0.007426838390529156, + 0.015499488450586796, + 0.005327949300408363, + -0.028329620137810707, + 0.034931253641843796, + -0.0013230176409706473, + 0.024598263204097748, + 0.016633247956633568, + 0.014609702862799168, + 0.022488608956336975, + -0.010519560426473618, + -0.004075791221112013, + -0.01143804844468832, + 0.02663615718483925, + 0.026033399626612663, + -0.023206178098917007, + 0.011122317984700203, + 0.005058860871940851, + 0.0031931817065924406, + 0.004779009148478508, + -0.01509764976799488, + -0.015671705827116966, + 0.0023231294471770525, + 0.007150574121624231, + 0.01670500449836254, + 0.022158527746796608, + -0.02220158278942108, + -0.03200357407331467, + -0.011488278396427631, + -0.0020953011699020863, + 0.01361228246241808, + -0.028358323499560356, + -0.013145862147212029, + 0.03257763013243675, + 0.0409875363111496, + -0.04572349041700363, + 0.0153272720053792, + 0.03105638176202774, + 0.02898978441953659, + -0.029736055061221123, + 0.004061440005898476, + 0.019474821165204048, + -0.019647037610411644, + -0.010555438697338104, + 0.0027339374646544456, + -0.01700638234615326, + 0.006203383207321167, + 0.0366247184574604, + 0.017264708876609802, + 0.02703799679875374, + -0.00424442021176219, + -0.017881818115711212, + -0.0204937681555748, + -0.025201020762324333, + -0.0010637958766892552, + 0.039035748690366745, + -0.004936873912811279, + -0.04787619784474373, + 0.01864244043827057, + 0.009751761332154274, + -0.00878304336220026, + -0.013038227334618568, + 0.003702655667439103, + -0.002579660154879093, + 0.004732367116957903, + -0.014049999415874481, + 0.00917053036391735, + 0.05594167113304138, + 0.025143614038825035, + -0.021340498700737953, + -0.022416852414608, + -0.0055611589923501015, + -0.017637843266129494, + 0.014638406224548817, + 0.04041348025202751, + -0.03398406505584717, + 0.0030263469088822603, + 0.006698505952954292, + 0.015729110687971115, + -0.007986541837453842, + 0.019991470500826836, + 0.019532226026058197, + 0.010691776871681213, + 0.002857718151062727, + -0.01713554561138153, + -0.011610264889895916, + -0.015112001448869705, + -0.004728779196739197, + 0.0069353035651147366, + 0.004352055490016937, + 0.013684039004147053, + -0.0450633279979229, + -0.002059422666206956, + 0.022560367360711098, + 0.03461552411317825, + -0.0008642220636829734, + 0.010835290886461735, + 0.011136669665575027, + -0.005442760419100523, + -0.024626964703202248, + 0.050459444522857666, + 0.014659932814538479, + 0.0032487933058291674, + 0.029133297502994537, + -0.021814094856381416, + -0.011014683172106743, + 0.016030490398406982, + -0.0022154939360916615, + -0.027468537911772728, + -0.014136107638478279, + -0.023349693045020103, + 0.03794504329562187, + -0.04621143639087677, + -0.004140372853726149, + -0.009809167124330997, + 0.04448927193880081, + -0.005019394680857658, + 0.0008117498364299536, + 0.04288191720843315, + 0.019962767139077187, + 0.02821481041610241, + 0.02373717911541462, + 0.010067491792142391, + -0.022976556792855263, + -0.036567311733961105, + 0.0020091929472982883, + -0.028788864612579346, + -0.05450653284788132, + 0.02534453384578228, + 0.004179839044809341, + 0.01551384013146162, + -0.007577527780085802, + 0.0011149226920679212, + -0.017666546627879143, + 0.0018405643058940768, + -0.006633924786001444, + -0.013217619620263577, + 0.019804902374744415, + -0.006684154272079468, + -0.0007799076847732067, + 0.0034604761749505997, + 0.00754882488399744, + 0.00291691767051816, + -0.004309001378715038, + -0.035763636231422424, + 0.023478854447603226, + 0.04181991517543793, + 0.005170084070414305, + 0.00044960176455788314, + 0.03731358423829079, + 0.012930591590702534, + -0.002567102899774909, + -0.03145822137594223, + -0.013468768447637558, + -0.0014450043672695756, + 0.02990827150642872, + -0.008847624994814396, + 0.03639509528875351, + -0.03361092880368233, + 0.015442082658410072, + 0.01966138742864132, + -0.008574948646128178, + 0.004779009148478508, + 0.015413380227982998, + 0.0327211432158947, + -0.04032737389206886, + -0.0346442274749279, + -0.02151271514594555, + 0.011516980826854706, + 0.028788864612579346, + 0.013734268955886364, + 0.0015051007503643632, + -9.490970114711672e-05, + 0.006723620928823948, + 0.023019609972834587, + 0.024038558825850487, + -0.013605106621980667, + -0.005345888435840607, + -0.005134205799549818, + -0.00527054350823164, + -0.011359116062521935, + -0.009235111996531487, + -0.027482889592647552, + 0.004481217823922634, + 0.0005072315107099712, + 0.02692318521440029, + 0.034529417753219604, + -0.015671705827116966, + -0.024210775271058083, + 0.008180285803973675, + -0.00022625844576396048, + 0.00910594966262579, + -0.026191264390945435, + -0.017580438405275345, + 0.03226189687848091, + 0.02947773039340973, + -0.032462816685438156, + -0.03191746398806572, + -0.016719356179237366, + 0.014236567541956902, + -0.026478292420506477, + -0.015872623771429062, + 0.02716715820133686, + 0.018498927354812622, + 0.016202706843614578, + -0.006673390977084637, + -0.023105718195438385, + -0.0013902897480875254, + 0.024411695078015327, + -0.0011337589239701629, + -0.016030490398406982, + -0.02376588247716427, + -0.0037241827230900526, + 0.012370888143777847, + -0.010792236775159836, + -0.04316894710063934, + -0.020536823198199272, + 0.006540640722960234, + -0.00850319117307663, + 0.0510047972202301, + 0.014057175256311893, + -0.00921358447521925, + -0.02695188857614994, + 0.006605221889913082, + 0.019316954538226128, + 0.005281307268887758, + 0.05878324434161186, + -0.01877160184085369, + 0.010670249350368977, + 0.012880361638963223, + 0.029649946838617325, + 0.007340730167925358, + -0.022833043709397316, + -0.03814596310257912, + 0.007441189605742693, + -0.03714136779308319, + -0.0045816777274012566, + -0.018714196979999542, + 0.012779902666807175, + -0.016504084691405296, + 0.01228477992117405, + -0.0183410607278347, + 0.016690652817487717, + -0.011122317984700203, + 0.02824351191520691, + -0.0214553102850914, + -0.013684039004147053, + 0.008618002757430077, + -0.01182553544640541, + 0.005797956604510546, + -0.015083298087120056, + -0.04609662666916847, + 0.0038856356404721737, + 0.027425484731793404, + 0.0009758936939761043, + 0.0026765321381390095, + 0.05884065106511116, + 0.007182864937931299, + 0.003986095078289509, + -0.024827884510159492, + 0.008000893518328667, + 0.012248901650309563, + -0.014064351096749306, + 0.022459907457232475, + 0.008790219202637672, + 0.031659141182899475, + -0.028573594987392426, + 0.03843298926949501, + -0.024985749274492264, + 0.01697768084704876, + 0.02080949768424034, + 0.0015876211691647768, + -0.026248671114444733, + 0.02574637345969677, + -0.008266394026577473, + -0.01571475900709629, + -0.028114350512623787, + -0.0014019502559676766, + 0.028143052011728287, + 0.006619573105126619, + 0.023450152948498726, + -0.009809167124330997, + 0.00495481351390481, + 0.015671705827116966, + 0.0031070734839886427, + -0.021598823368549347, + 0.009134652093052864, + 0.004441751632839441, + 0.0049440497532486916, + 0.020579876378178596, + 0.010232532396912575, + -0.016504084691405296, + 0.006813316605985165, + -0.0173795185983181, + 0.023421449586749077, + -0.00014990463387221098, + -0.015872623771429062, + 0.03935147821903229, + 0.009220760315656662, + 1.8948303477372974e-05, + -0.025416290387511253, + 0.01590132713317871, + 0.03676823154091835, + 0.010663074441254139, + 0.017867466434836388, + 0.020953012630343437, + -0.02673661708831787, + -0.0019087332766503096, + 0.036969151347875595, + 0.022804340347647667, + 0.015815218910574913, + -0.005640091840177774, + 0.04738825187087059, + 0.02432558685541153, + 0.016877220943570137, + -0.016475381329655647, + -0.022990908473730087, + 0.0005058860988356173, + 0.0367395281791687, + 0.019331306219100952, + 0.013877782970666885, + 0.016016138717532158, + 0.01874290034174919, + -0.002136561321094632, + -0.02599034644663334, + -0.001754455966874957, + 0.044833704829216, + 0.00272855581715703, + -0.014724514447152615, + -0.0025724845472723246, + -0.026004698127508163, + 0.0003960083413403481, + 0.034931253641843796, + 0.034184981137514114, + -0.011136669665575027, + 0.014767568558454514, + -0.036854337900877, + 0.02182844653725624, + -0.0020414835307747126, + -0.006346897222101688, + -0.014781919308006763, + -0.026076454669237137, + -0.00394304096698761, + 0.0173795185983181, + -0.01772395148873329, + -0.004857941530644894, + 0.0007686957251280546, + 0.025488046929240227, + 0.004029149655252695, + -0.02580377832055092, + 0.0007328172796405852, + 0.012083860114216805, + -0.01304540317505598, + -0.0036918921396136284, + 0.0025384000036865473, + -0.01461687870323658, + 0.02333534136414528, + -0.018628088757395744, + -0.01697768084704876, + 0.01874290034174919, + -0.005012218840420246, + -0.004072203766554594, + -0.030023083090782166, + 0.0407579131424427, + 0.0044561028480529785, + 0.012478522956371307, + 0.022086771205067635, + 0.006727208383381367, + 0.00377441244199872, + 0.0028935966547578573, + -0.04115975275635719, + -0.015886975452303886, + 0.002873863559216261, + 0.012098211795091629, + -0.008015245199203491, + 0.008008069358766079, + -0.00341921579092741, + 0.019460469484329224, + -0.006565755698829889, + -0.021498365327715874, + -0.025975994765758514, + -0.0031770362984389067, + -0.004204954020678997, + 0.01593003049492836, + ], + "index": 71, + }, + { + "title": "Alum Rock, Birmingham", + "text": 'Alum Rock (also known as "The Rock") is an inner-city suburb of Birmingham, England, located roughly 2 miles east of Birmingham city centre. The area is officially a division of Saltley.', + "vector": [ + 0.01738770864903927, + 0.03056560643017292, + -0.019092386588454247, + -0.007378288544714451, + -0.04642651975154877, + 0.012058739550411701, + -0.02967621013522148, + -0.04260211065411568, + -0.025496045127511024, + -0.004610040690749884, + -0.011154519394040108, + 0.048205312341451645, + -0.026429910212755203, + -0.00123403815086931, + 0.01450458075851202, + 0.005903372075408697, + -0.00489538861438632, + 0.018514279276132584, + 0.05958959087729454, + 0.010242887772619724, + 0.03931134194135666, + -0.06190202385187149, + -0.032551925629377365, + -0.010005715303122997, + -0.013429893180727959, + 0.005440144333988428, + 0.006433304399251938, + -0.010035362094640732, + -0.0296613872051239, + 0.01649831235408783, + -0.018366046249866486, + -0.02970585599541664, + 0.031069599092006683, + 0.008004572242498398, + -0.008849498815834522, + 0.06522244215011597, + -0.002525516552850604, + -0.0025570159777998924, + -0.023065026849508286, + 0.007893397472798824, + 0.03433072194457054, + -0.015141982585191727, + -0.016913363710045815, + 0.0001308617793256417, + -0.01643901877105236, + -0.04150518774986267, + -0.00292759807780385, + 0.022323861718177795, + -0.018484631553292274, + 0.03596128150820732, + 0.06836497783660889, + 0.0625542476773262, + 0.013548479415476322, + -0.016943011432886124, + -0.019285090267658234, + -0.0070558818988502026, + -0.015401389449834824, + 0.1032293364405632, + -0.05268194153904915, + 0.02198292687535286, + 0.043491508811712265, + -0.004050461575388908, + -0.006233189720660448, + 0.015831265598535538, + 0.08057935535907745, + -0.0031925642397254705, + 0.017506295815110207, + -0.03833300620317459, + -0.013103781268000603, + 0.039667099714279175, + -0.016735484823584557, + 0.04319504275918007, + 0.004391397349536419, + 0.04328398406505585, + -0.03261122107505798, + 0.01133239921182394, + -0.015386566519737244, + -0.03376743569970131, + -0.036465272307395935, + 0.00864197313785553, + 0.047404855489730835, + 0.029320450499653816, + -0.03925205022096634, + -0.018232636153697968, + -0.010613469406962395, + 0.008441858924925327, + 0.020900826901197433, + -0.058344434946775436, + -0.028001178056001663, + -0.024132302030920982, + 0.00030318243079818785, + 0.025629453361034393, + 0.018306752666831017, + -0.03068419359624386, + 0.030951011925935745, + -0.019329559057950974, + -0.009583251550793648, + -0.017832407727837563, + -0.0034204721450805664, + 0.04100119695067406, + 0.02656332030892372, + -0.05383815988898277, + -0.030358079820871353, + 0.005784785840660334, + 0.04455878585577011, + 0.03264086693525314, + -0.009598074480891228, + 0.005610612221062183, + 0.012103209272027016, + -0.0010265122400596738, + 0.0015212392900139093, + 0.01968531869351864, + 0.03317450359463692, + -0.0455964133143425, + 0.004417337942868471, + 0.013504009693861008, + 0.012888843193650246, + 0.004902800545096397, + -0.034805066883563995, + 0.007611755281686783, + -0.03584269434213638, + -0.0551426075398922, + -0.0001767213107086718, + -0.016691014170646667, + 0.020826710388064384, + -0.027749182656407356, + -0.005406791809946299, + 0.04230564460158348, + 0.025570161640644073, + 0.10311074554920197, + -0.05861125513911247, + -0.011665922589600086, + -0.008419623598456383, + -0.007937867194414139, + 0.001564782694913447, + 0.008501151576638222, + 0.02422124147415161, + 0.01654278300702572, + 0.03065454587340355, + 0.009813012555241585, + 0.019018270075321198, + 0.0013294630916789174, + -0.017817584797739983, + -0.0265781432390213, + 0.0016342668095603585, + 0.020055899396538734, + -0.018573570996522903, + -0.030980657786130905, + 0.03341167792677879, + 0.020722948014736176, + 0.0001595818903297186, + 0.035694461315870285, + -0.012088386341929436, + 0.005021386779844761, + -0.01722465269267559, + 0.007974925450980663, + -0.03931134194135666, + 0.04289857670664787, + -0.020055899396538734, + 0.03237404674291611, + 0.03130676969885826, + -0.03447895124554634, + 0.03628739342093468, + -0.007341230288147926, + -0.0033130033407360315, + 0.014519404619932175, + -0.004802743438631296, + 0.01528280321508646, + 0.013741182163357735, + 0.005925606936216354, + 0.017862053588032722, + -0.023079849779605865, + 0.0312771238386631, + -0.028445877134799957, + -0.012095797806978226, + 0.01869215816259384, + -0.006170190870761871, + -0.025318164378404617, + -0.001934438245370984, + -0.011732627637684345, + -0.006826121360063553, + -0.03768078237771988, + 0.04298751801252365, + -0.027793653309345245, + -0.05736609920859337, + -0.025510868057608604, + -0.06338435411453247, + -0.016142552718520164, + 0.028030825778841972, + -0.010072419419884682, + 0.012874020263552666, + -0.001195127028040588, + 0.01869215816259384, + -0.003294474445283413, + 0.0643923357129097, + 0.009390548802912235, + -0.0024810468312352896, + 0.015890557318925858, + -0.0014082117704674602, + 0.004736038390547037, + 0.04716768115758896, + 0.007400523405522108, + -0.03539799526333809, + -0.024784527719020844, + 0.05309699475765228, + 0.013140839524567127, + 0.00611089775338769, + -0.0076784598641097546, + -0.03364884853363037, + 0.026059329509735107, + 0.012614612467586994, + -0.01712089031934738, + -0.05413462594151497, + 0.03062490001320839, + -0.03987462818622589, + 0.040437910705804825, + 0.009531370364129543, + 0.03536834940314293, + 0.023687604814767838, + 0.006781651172786951, + 0.04793849214911461, + 0.027719536796212196, + 0.01876627467572689, + 0.01974461041390896, + -0.031010305508971214, + -0.009598074480891228, + -0.03593163564801216, + 0.0012868461199104786, + -0.006981765851378441, + -0.03456789255142212, + -0.021508581936359406, + 0.006185014266520739, + -0.013807887211441994, + 0.026948725804686546, + -0.007626578211784363, + 0.030891718342900276, + 0.0008643826004117727, + -0.024028539657592773, + 0.05321558192372322, + 0.09593627601861954, + -1.8847571482183412e-05, + 0.027615774422883987, + 0.025614630430936813, + -0.050606682896614075, + 0.027008019387722015, + -0.014719518832862377, + -0.009153376333415508, + 0.0021641990169882774, + -0.0218050479888916, + 0.007737752981483936, + -0.005384556949138641, + -0.013733770698308945, + -0.00272563099861145, + 0.01457128580659628, + 0.024013716727495193, + -0.014889986254274845, + 0.004810154903680086, + 0.005051033105701208, + 0.028016002848744392, + -0.024917935952544212, + -0.010339238680899143, + -0.03290768340229988, + 0.027704713866114616, + -0.025481220334768295, + 0.004576688166707754, + 0.028757166117429733, + -0.025629453361034393, + -0.010027949698269367, + -0.023717250674962997, + -0.0227240901440382, + -0.006885414477437735, + -0.03160323575139046, + 0.042691051959991455, + -0.011480631306767464, + -0.01790652424097061, + -0.024843819439411163, + 0.026859786361455917, + -0.02278338372707367, + -0.03350061550736427, + -0.01405247114598751, + 0.037295375019311905, + -0.006029369775205851, + 0.07939349859952927, + -0.03347096964716911, + -0.011576983146369457, + 0.04340256750583649, + -0.03791795298457146, + -0.014593521133065224, + 0.006952119059860706, + 0.003703967435285449, + -0.021419642493128777, + -0.00413569575175643, + 0.03439001366496086, + 0.033263444900512695, + 0.010687585920095444, + -0.018543925136327744, + -0.04645616561174393, + -0.024087833240628242, + 0.013022253289818764, + 0.01803993433713913, + 0.01133239921182394, + 0.01639454998075962, + -0.03341167792677879, + 0.004943564534187317, + 0.008968085050582886, + 0.035635169595479965, + -0.005595788825303316, + -0.0212565865367651, + -0.023346668109297752, + -0.04856107011437416, + -0.0577811524271965, + 0.0033741495572030544, + -0.0010589382145553827, + -0.03702855855226517, + -0.019107209518551826, + 0.0018390134209766984, + -0.03314485773444176, + -0.0197149645537138, + -0.005729198455810547, + -0.006614889483898878, + -0.024754879996180534, + -0.020174486562609673, + -0.048946477472782135, + 0.015490328893065453, + 0.06021216884255409, + -0.006336953025311232, + 0.04289857670664787, + 0.0409715510904789, + 0.016023967415094376, + -0.021716106683015823, + -0.036524564027786255, + 0.034152839332818985, + -0.03533870354294777, + -0.02828282117843628, + 0.02048577554523945, + -0.023761719465255737, + 0.022412801161408424, + 0.004157930612564087, + 0.004054167307913303, + -0.007111469283699989, + -0.012414498254656792, + 0.000600342929828912, + 0.026252031326293945, + -0.000999645097181201, + -0.011940153315663338, + 0.019122032448649406, + 0.05872984230518341, + -0.048234958201646805, + 0.016928186640143394, + -0.01881074346601963, + 0.0007712738588452339, + -0.03201828896999359, + 0.029290804639458656, + 0.005573553964495659, + 0.024073008447885513, + -0.05715857446193695, + -0.0036057631950825453, + -0.08793170750141144, + 0.011562159284949303, + 0.011858625337481499, + -0.006885414477437735, + -0.005195560399442911, + 0.01368930097669363, + 0.0008731839479878545, + -0.014393405988812447, + 0.014304466545581818, + 0.04325433447957039, + 0.05185183882713318, + 0.03839229792356491, + 0.0015694149769842625, + -0.030254317447543144, + 0.02445841394364834, + -0.011376868933439255, + -0.04787920042872429, + 0.00830103736370802, + 0.03427142649888992, + 0.01738770864903927, + -0.026385441422462463, + -0.002749718725681305, + 0.0015888705383986235, + 0.001314639812335372, + -0.015401389449834824, + -0.013496598228812218, + -0.014237761497497559, + -0.020841533318161964, + -0.000312446994939819, + 0.007826692424714565, + 0.03299662470817566, + 0.03367849439382553, + 0.024488061666488647, + 0.002675602212548256, + 0.008686442859470844, + 0.03385637328028679, + -0.00624430738389492, + 6.577830936294049e-05, + 0.000772663566749543, + -0.07091458141803741, + 0.0625542476773262, + 0.013748593628406525, + -0.00492874113842845, + -0.01792134717106819, + -0.012607201002538204, + -0.031039951369166374, + 0.0596192367374897, + -0.014252585358917713, + -0.008886557072401047, + 0.00467303954064846, + -0.043580446392297745, + -0.03925205022096634, + -0.01885521411895752, + 0.02029307186603546, + -0.008367742411792278, + 0.012807315215468407, + -0.06036040186882019, + -0.005736609920859337, + -0.02574804052710533, + -0.01099146343767643, + 0.021478934213519096, + 0.007152233272790909, + 0.01142875012010336, + -0.028460700064897537, + -0.06124980002641678, + -0.05357133969664574, + 0.006974353920668364, + -0.0314253568649292, + 0.030076438561081886, + -0.017002303153276443, + -0.02201257273554802, + -0.055350132286548615, + -0.00935349054634571, + 0.04378797486424446, + -0.026252031326293945, + 0.003868876490741968, + 0.04799778759479523, + -0.05858160927891731, + 0.023880306631326675, + 0.011962388642132282, + -0.028016002848744392, + -0.014889986254274845, + 0.0122069725766778, + 0.003972639329731464, + 0.004065284971147776, + 0.028460700064897537, + -0.012103209272027016, + -0.02359866350889206, + -0.015460683032870293, + 0.022531388327479362, + -0.023020556196570396, + 0.016216669231653214, + -0.014600932598114014, + -0.006859473418444395, + -0.011458396911621094, + -0.01456387434154749, + 0.0024754879996180534, + 0.006689005997031927, + -0.059085600078105927, + 0.006933589931577444, + 0.05164431408047676, + 0.05543907359242439, + 0.030209848657250404, + 0.006700123194605112, + 0.005695845931768417, + -0.016854071989655495, + -0.04106048867106438, + -0.01814369671046734, + -0.045922525227069855, + 0.004695274401456118, + 0.04307645559310913, + -0.02353937178850174, + 0.01869215816259384, + -0.053749218583106995, + -0.028519993647933006, + -0.09516546875238419, + 0.025496045127511024, + -0.04186094552278519, + -0.03519047051668167, + -0.006481479853391647, + -0.012384851463139057, + -0.015490328893065453, + 0.03462718427181244, + -0.012436733581125736, + -0.022145982831716537, + -0.0030721251387149096, + 0.006588948890566826, + 0.04150518774986267, + 0.020619183778762817, + 0.026059329509735107, + 0.004691568668931723, + 0.024636294692754745, + 0.01457128580659628, + 0.029542800039052963, + -0.011265694163739681, + -0.04316539689898491, + -0.00011818092752946541, + -0.019181326031684875, + 0.015386566519737244, + 0.0314253568649292, + -0.04414373263716698, + -0.044262319803237915, + 0.05111067369580269, + -0.03690997138619423, + 0.005725492723286152, + 0.004406220279633999, + -0.00907184835523367, + 0.006518538109958172, + -0.003281503915786743, + -0.014593521133065224, + 0.04598182067275047, + -0.008686442859470844, + -0.03815512731671333, + 0.031217830255627632, + -0.03400460630655289, + 0.00010654233483364806, + 0.03059525229036808, + -0.027912238612771034, + -0.02660779096186161, + 0.01093216985464096, + -0.02352454699575901, + 0.00043242290848866105, + -0.01337059959769249, + -0.008693854324519634, + 0.00821209792047739, + -0.010835818946361542, + 0.0072893486358225346, + 0.0005558730335906148, + 0.02039683610200882, + -0.017461825162172318, + 0.004421043675392866, + -0.011169342324137688, + -0.016023967415094376, + -0.030239494517445564, + -0.03364884853363037, + 0.012169914320111275, + -0.01065793912857771, + 0.013578126206994057, + 0.04005250707268715, + -0.03456789255142212, + 0.014867751859128475, + 0.022323861718177795, + -0.006677888333797455, + -0.02193845622241497, + 0.0011840095976367593, + 0.01955190859735012, + -0.005647670477628708, + 0.007819280959665775, + 0.006944707594811916, + -0.001925173681229353, + -0.004172753542661667, + -0.008108334615826607, + 0.02969103306531906, + -0.009094083681702614, + 0.01728394627571106, + 0.031692177057266235, + -0.02814941108226776, + -0.018262282013893127, + 0.02678566984832287, + 0.02976514957845211, + -0.060063935816287994, + -0.024577001109719276, + 0.1050674170255661, + 0.05620988458395004, + -0.012362617067992687, + -0.0312771238386631, + 0.011510278098285198, + 0.01799546368420124, + -0.0026996901724487543, + -0.005240030121058226, + -0.0029498329386115074, + -0.020678477361798286, + -0.02122693881392479, + 0.031662531197071075, + -0.02435465157032013, + 0.0202634260058403, + 0.020159663632512093, + -0.009939010255038738, + 0.010613469406962395, + -0.03370814397931099, + -0.058433376252651215, + 0.005121443886309862, + -0.007671048399060965, + 0.01534209679812193, + -0.02582215704023838, + 0.0012257001362740993, + 0.007945278659462929, + 0.022323861718177795, + -0.024562178179621696, + -0.023109495639801025, + -0.015075277537107468, + -0.005955253262072802, + 0.032581571489572525, + -0.0033445029985159636, + -0.015519975684583187, + 0.01709124445915222, + 0.007167056668549776, + -0.0005285426159389317, + 0.013607772067189217, + 0.009598074480891228, + -0.031039951369166374, + -0.038006894290447235, + 0.0035372055135667324, + 0.027289660647511482, + -0.017002303153276443, + -0.010783937759697437, + 0.01799546368420124, + 0.01580161787569523, + 0.03833300620317459, + 0.06510385125875473, + -0.02973550371825695, + -0.009316432289779186, + 0.0034260309766978025, + -0.033293090760707855, + -0.013548479415476322, + 0.03433072194457054, + 0.02116764523088932, + -0.008093511685729027, + -0.05045844987034798, + 0.013741182163357735, + 0.013155662454664707, + 0.025688746944069862, + -0.04298751801252365, + 0.021464111283421516, + -0.0736420601606369, + -0.0125553198158741, + 0.023835835978388786, + 0.007341230288147926, + -0.027838122099637985, + 0.016898540779948235, + -0.00702994130551815, + 0.004658216144889593, + 0.0024273123126477003, + 0.009642545133829117, + -0.02982444316148758, + -0.021760577335953712, + 0.030283965170383453, + -0.017432179301977158, + -0.037977248430252075, + 0.008968085050582886, + 0.09326808899641037, + 0.0360502190887928, + -0.030773133039474487, + 0.03424178063869476, + -0.0017287652008235455, + 0.017624881118535995, + -0.023183612152934074, + 0.002343931468203664, + -0.00979077722877264, + 0.014230350032448769, + -0.0073671708814799786, + 0.034894004464149475, + -0.01944814622402191, + -0.0343603678047657, + 0.03453824669122696, + 0.0005123296868987381, + 0.0003731297911144793, + 0.029616916552186012, + 0.0022327566985040903, + -0.015564445406198502, + -0.02270926721394062, + -0.02502170018851757, + -0.002710807602852583, + -0.021360348910093307, + 0.0036632034461945295, + 0.00331670930609107, + -0.05274123698472977, + -0.0028812752570956945, + -0.0036965557374060154, + -0.02208668924868107, + 0.007767399773001671, + 0.02890539914369583, + 0.00784151628613472, + -0.028757166117429733, + 0.006288777105510235, + -0.031810760498046875, + -0.011317575350403786, + 0.013318718411028385, + -0.010694997385144234, + 0.029468683525919914, + -0.016809601336717606, + -0.005862608086317778, + 0.006903943605720997, + -0.019433321431279182, + -0.06267283111810684, + -0.005099209025502205, + 0.0029794794972985983, + -0.04524065554141998, + -0.006351775955408812, + 0.0010367032373324037, + 0.010502294637262821, + -0.010843230411410332, + -0.029646562412381172, + -0.04168306663632393, + -0.02969103306531906, + -0.016720661893486977, + -0.0003048037178814411, + -0.019892843440175056, + 0.01483069360256195, + 0.017017127946019173, + -0.018425339832901955, + -0.03732502460479736, + -0.0016157376812770963, + -0.0032666807528585196, + -0.019314736127853394, + -0.015164216980338097, + -0.006348070222884417, + -0.023005733266472816, + 0.04331362992525101, + 0.0007504286477342248, + 0.012288500554859638, + 0.04162377491593361, + -0.04417337849736214, + 0.014726930297911167, + 0.01799546368420124, + -0.05709927901625633, + -0.0028423641342669725, + 0.02187916450202465, + 0.00865679606795311, + -0.008256567642092705, + -0.03750290349125862, + 0.029957851395010948, + 0.0033741495572030544, + -0.038866642862558365, + 0.00764140160754323, + 0.023228082805871964, + -0.02598521299660206, + -0.014875163324177265, + 0.007997160777449608, + 0.024013716727495193, + 0.013296484015882015, + -0.0015953556867316365, + -0.013459539972245693, + -0.014608344063162804, + 0.0032092405017465353, + -0.039548516273498535, + -0.00471380352973938, + 0.030165378004312515, + -0.0027126604691147804, + 0.008945850655436516, + 0.005117738153785467, + 0.03631703928112984, + -0.002090082736685872, + -0.02352454699575901, + 0.03201828896999359, + 0.032581571489572525, + -0.02262032777070999, + 0.0018788509769365191, + 0.005366027820855379, + -0.04023038595914841, + -0.047493793070316315, + 0.005188148468732834, + 0.001522165723145008, + -0.0018686599796637893, + 0.022931616753339767, + -0.011132284067571163, + -0.02419159561395645, + -0.05045844987034798, + 0.0015638562617823482, + 0.05158501863479614, + -0.003794759977608919, + -0.022546211257576942, + 0.011302752420306206, + -0.010428179055452347, + 0.04212776571512222, + -0.04058614373207092, + -0.01798064075410366, + 0.007960102520883083, + -0.01370412390679121, + -0.021627167239785194, + 0.01578679494559765, + -0.004461807664483786, + -0.017521118745207787, + 0.016068438068032265, + -0.009916774928569794, + 0.012629436329007149, + -0.01484551653265953, + 0.05357133969664574, + 0.05407533049583435, + 0.05116996914148331, + 0.01959637738764286, + 0.006626006681472063, + -0.013896826654672623, + 0.024591824039816856, + 0.022561034187674522, + -0.018306752666831017, + -0.017491472885012627, + -0.015890557318925858, + -0.0157126784324646, + -0.044321611523628235, + -0.046604398638010025, + -0.023880306631326675, + 0.011651099659502506, + -0.03510152921080589, + 0.02262032777070999, + 0.04304680973291397, + 0.04687121510505676, + -0.013919061049818993, + -0.001607399550266564, + 0.015208686701953411, + -0.03308556601405144, + -0.02103423699736595, + 0.005851490423083305, + 0.02745271660387516, + -0.01058382261544466, + -0.002254991792142391, + -0.01562373898923397, + -0.02980961836874485, + 0.02279820665717125, + -0.001337801106274128, + -0.016187023371458054, + 0.011243458837270737, + 0.045092422515153885, + -0.012777668423950672, + 0.024651117622852325, + 0.0026107504963874817, + -0.0019622319377958775, + -0.03996356576681137, + 0.021360348910093307, + 0.03044702112674713, + -0.003109183395281434, + 0.03596128150820732, + -0.012599789537489414, + -0.011903095059096813, + -0.03554622828960419, + 0.010606057941913605, + 0.01299260649830103, + 0.02361348830163479, + 0.04930223524570465, + 0.033263444900512695, + -0.04230564460158348, + 0.021775400266051292, + -0.003116594860330224, + 0.028416231274604797, + -0.015023396350443363, + 0.009894540533423424, + 0.004906506277620792, + -0.012429321184754372, + 0.03842194750905037, + -0.04639687016606331, + 0.00624430738389492, + 0.006444421596825123, + 0.02276856079697609, + 0.013229778967797756, + -0.029957851395010948, + 0.05784044414758682, + -0.01889968477189541, + -0.0026830139104276896, + -0.010613469406962395, + 0.017698997631669044, + -0.03658385947346687, + -0.01092475838959217, + -0.01337059959769249, + 0.013185309246182442, + -0.00649259751662612, + -0.006325835362076759, + 0.004194988869130611, + -0.03391566872596741, + 0.020871181041002274, + 0.008100923150777817, + -0.007997160777449608, + 0.03477541729807854, + 0.0033519144635647535, + 0.020752593874931335, + -0.06124980002641678, + -0.002690425608307123, + -0.026192737743258476, + -0.0034204721450805664, + 0.009738896042108536, + -0.004561864770948887, + 0.015075277537107468, + 0.030120907351374626, + 0.0020178190898150206, + -0.004561864770948887, + -0.016231494024395943, + -0.04876859486103058, + -0.012347793206572533, + 0.003600204596295953, + -0.0016379726585000753, + -0.005002857651561499, + 0.057662565261125565, + -0.005740315653383732, + -0.024591824039816856, + 0.0019566731061786413, + 0.018529102206230164, + 0.004469219595193863, + -0.022294215857982635, + -0.009753718972206116, + 0.02897951565682888, + -0.01895897649228573, + 0.04135695472359657, + -0.01065052766352892, + -0.02104905992746353, + -0.028534816578030586, + 0.004758273251354694, + 0.0003244908875785768, + 0.04755308851599693, + 0.0015203128568828106, + 0.024784527719020844, + 0.01451199222356081, + -0.05576518550515175, + -0.03524976223707199, + 0.004487748723477125, + 0.007044764701277018, + 0.02503652311861515, + -0.02497722953557968, + 0.002581103937700391, + 0.006677888333797455, + 0.0289646927267313, + 0.024754879996180534, + 0.019299913197755814, + 0.04939117282629013, + 0.017743468284606934, + -0.02045612782239914, + -0.019359204918146133, + -0.015060453675687313, + -0.009990891441702843, + 0.031217830255627632, + -0.013911649584770203, + -0.05125890672206879, + 0.0037892013788223267, + -0.01728394627571106, + -0.00018274327157996595, + 0.02494758367538452, + 0.04942082241177559, + -0.04497383534908295, + -0.011384280398488045, + -0.03551658242940903, + 0.01958155445754528, + 0.03430107235908508, + -0.00172413291875273, + 0.020886003971099854, + -0.024636294692754745, + -0.003655791748315096, + -0.014371171593666077, + 0.018618041649460793, + 0.00607013376429677, + 0.03133641555905342, + 0.027245191857218742, + -0.0037669665180146694, + -0.04847213253378868, + 0.0004314964753575623, + 0.003320415038615465, + -0.004698980133980513, + 0.030773133039474487, + -0.00863456167280674, + -0.020085547119379044, + 0.0025199579540640116, + 0.007782222703099251, + -0.038777705281972885, + -0.038748059421777725, + -0.04091225564479828, + 0.016631722450256348, + -0.04844248294830322, + -0.027185898274183273, + 0.0037280553951859474, + 0.006036781240254641, + 0.019122032448649406, + 0.02107870578765869, + -0.003729908261448145, + 0.0006851135403849185, + -0.021641992032527924, + -0.029261158779263496, + -0.03919275477528572, + -0.02740824781358242, + -0.007393111474812031, + -0.017639705911278725, + -0.06302859634160995, + -0.008160216733813286, + 0.004710097797214985, + -0.02909810096025467, + 0.00786375068128109, + 0.0331152118742466, + 0.008100923150777817, + 0.03418248891830444, + -0.027956709265708923, + 0.023732073605060577, + -0.0010691292118281126, + -0.04402514547109604, + 0.019062740728259087, + 0.005251147318631411, + 0.06492597609758377, + 0.022160805761814117, + -0.027141429483890533, + -0.0020196721889078617, + 0.006118309684097767, + 0.02829764410853386, + -0.00489538861438632, + 0.020144838839769363, + 0.01955190859735012, + 0.015356919728219509, + 0.03865911811590195, + -0.001109893200919032, + -0.02903880923986435, + -0.012866608798503876, + -0.03696926310658455, + -0.000766178360208869, + -0.011651099659502506, + -0.01645384170114994, + 0.01869215816259384, + -0.01407470554113388, + -0.04094190523028374, + -0.0030183906201273203, + 0.006718652322888374, + 0.024117479100823402, + 0.013933884911239147, + -0.0643923357129097, + 0.017002303153276443, + 0.014637990854680538, + -0.010450413450598717, + -0.01012430153787136, + -0.03545729070901871, + -0.016883717849850655, + 0.01630561053752899, + 0.02445841394364834, + -0.0008263979689218104, + 0.007393111474812031, + 0.04767167195677757, + 0.00900514330714941, + -0.0315735898911953, + -0.003980051260441542, + 0.005117738153785467, + 0.0439065583050251, + -0.010806172154843807, + -0.004395103082060814, + -0.02820870466530323, + -0.02429535798728466, + -0.01637972705066204, + 0.03302627056837082, + -0.02115282230079174, + -0.031128890812397003, + 0.031692177057266235, + -0.003194417105987668, + 0.011310163885354996, + 0.03278909996151924, + -0.04257246479392052, + 0.03382672742009163, + -0.004939858801662922, + 0.024665940552949905, + -0.019952137023210526, + 0.04532959684729576, + 0.019166503101587296, + 0.02362831123173237, + 0.020189309492707253, + -0.027764005586504936, + -0.02814941108226776, + -0.026830140501260757, + -0.010783937759697437, + -0.03397496044635773, + -0.015935027971863747, + -0.005614317953586578, + -0.005436438601464033, + -0.048264604061841965, + -0.011132284067571163, + 0.01493445597589016, + 0.03812548145651817, + -0.004999151919037104, + -0.006903943605720997, + -0.049806226044893265, + 0.018543925136327744, + 0.020811887457966805, + 0.027008019387722015, + -0.00036039104452356696, + -0.011176754720509052, + -0.019848374649882317, + -0.019863197579979897, + -0.030980657786130905, + -0.011628864333033562, + 0.005191854201257229, + -0.008382565341889858, + 0.011110049672424793, + 0.008931026794016361, + -0.01064311619848013, + 0.031158538535237312, + 0.011843802407383919, + 0.006318423897027969, + 0.019181326031684875, + -0.009249728173017502, + 0.03302627056837082, + 0.005429026670753956, + 0.015112335793673992, + 0.016172200441360474, + -0.03468647971749306, + -0.015171628445386887, + -0.015008572489023209, + -0.003868876490741968, + 0.003950404468923807, + 0.005121443886309862, + 0.01575714908540249, + 0.0035946457646787167, + 0.013177897781133652, + 0.004617452155798674, + 0.003064713440835476, + -0.003470500698313117, + 0.005473496858030558, + 0.03513117879629135, + 0.02112317644059658, + 0.02181987091898918, + 0.019374029710888863, + 0.00818986352533102, + 0.02101941406726837, + 0.028564464300870895, + 0.02038201130926609, + 0.0027701007202267647, + -0.03824406489729881, + -0.01575714908540249, + -0.0017065303400158882, + -0.022145982831716537, + -0.033233799040317535, + -0.024799350649118423, + 0.012029092758893967, + -0.031781114637851715, + -0.03047666698694229, + -0.005073267966508865, + 0.008782794699072838, + -0.01637972705066204, + -0.010302180424332619, + -0.007363465148955584, + -0.0021160233300179243, + -0.02345043234527111, + 0.019922491163015366, + 0.01884039118885994, + -0.026504026725888252, + -0.0031240065582096577, + 0.011169342324137688, + 0.04254281893372536, + -0.019344381988048553, + 0.031069599092006683, + -0.017432179301977158, + 0.002332814037799835, + -0.006448127329349518, + 0.04879824444651604, + 0.024754879996180534, + 0.014867751859128475, + -0.01250343769788742, + -0.006881708279252052, + -0.02276856079697609, + -0.01658725179731846, + 0.03851088508963585, + 0.0016351932426914573, + -0.007900808937847614, + -0.003983756992965937, + 0.03287803754210472, + -0.01946296915411949, + -0.021478934213519096, + 0.023065026849508286, + -0.004910212010145187, + 0.004821272566914558, + -0.028371760621666908, + -0.0468415692448616, + 0.03610951453447342, + -0.009027378633618355, + -0.007411640603095293, + -0.007908220402896404, + 0.050517745316028595, + -0.02346525527536869, + 0.0072893486358225346, + 0.009212669916450977, + 0.0010765407932922244, + 0.023361491039395332, + 0.007626578211784363, + -0.013096368871629238, + 0.013592949137091637, + 0.020945297554135323, + 0.025614630430936813, + 0.00453221844509244, + 0.02894986979663372, + -0.00856785662472248, + -0.04085296392440796, + 0.003466794965788722, + -0.04165342077612877, + 0.003457530401647091, + -0.015964673832058907, + 0.009546193294227123, + 0.03978568688035011, + -0.015964673832058907, + 0.015097511932253838, + 0.029439037665724754, + 0.010524529963731766, + -0.006166485138237476, + 0.007307877764105797, + 0.007708106655627489, + 0.005769962444901466, + 0.007626578211784363, + -0.005662493407726288, + 0.020782241597771645, + -0.007348641753196716, + 0.027126604691147804, + 0.010724644176661968, + 0.007708106655627489, + -0.030091261491179466, + 0.02831246703863144, + 0.006299894768744707, + 0.0034742066636681557, + 0.003902228781953454, + 0.00568102253600955, + -0.0022679620888084173, + 0.03056560643017292, + 0.011643687263131142, + -0.026474380865693092, + 0.02591109648346901, + 0.022264568135142326, + 0.05440144240856171, + -0.01012430153787136, + -0.023895129561424255, + -0.013904238119721413, + 0.005076974164694548, + 0.008805029094219208, + -0.005228912457823753, + -0.010457824915647507, + -0.044262319803237915, + -0.002477340865880251, + 0.013563302345573902, + 0.008389977738261223, + 0.008501151576638222, + 0.003639115719124675, + -0.002755277557298541, + 0.04168306663632393, + -0.02436947450041771, + -0.015104924328625202, + 0.030165378004312515, + 0.02985408902168274, + 0.016957834362983704, + 0.019092386588454247, + -0.01892933063209057, + -0.0406750850379467, + 0.039518870413303375, + 0.03771042823791504, + -0.04079367220401764, + 0.03160323575139046, + -0.004328398033976555, + -0.008908792398869991, + -0.02183469384908676, + -0.003791054245084524, + -0.005781079642474651, + -0.03711749613285065, + -0.006563007831573486, + -0.01946296915411949, + -0.0064518335275352, + -0.01731359213590622, + -0.005818137899041176, + -0.030862072482705116, + 0.042216707020998, + 0.006325835362076759, + 0.002371725160628557, + -0.008130569942295551, + -0.02967621013522148, + -0.0015786795411258936, + 0.0019566731061786413, + 0.0019714965019375086, + 0.0014276673318818212, + -0.020915649831295013, + -0.01572750136256218, + -0.013830121606588364, + 0.041149429976940155, + 0.02207186631858349, + -0.026252031326293945, + 0.031128890812397003, + 0.015890557318925858, + 0.02193845622241497, + 0.003894817316904664, + 0.001785279018804431, + 0.0029072160832583904, + -0.008968085050582886, + -0.0018353075720369816, + -0.006789063103497028, + 0.007170762401074171, + 0.004954681731760502, + 0.031781114637851715, + -0.011295340955257416, + 0.00034325162414461374, + 0.005225206725299358, + 0.020960120484232903, + 0.0008824484539218247, + 0.03347096964716911, + 0.00900514330714941, + -0.01372635830193758, + 0.007307877764105797, + 0.01884039118885994, + -0.05953029915690422, + -0.011488042771816254, + -0.005332675762474537, + 0.014163645915687084, + 0.015594092197716236, + 0.015356919728219509, + -0.010524529963731766, + -0.05585412681102753, + 0.01632043346762657, + 0.0035297938156872988, + 0.05558730661869049, + -0.021375171840190887, + -0.010094654746353626, + -0.02656332030892372, + -0.004743450321257114, + 0.045122068375349045, + 0.009205257520079613, + -0.00985007081180811, + -0.03341167792677879, + 0.013822710141539574, + 0.017417356371879578, + 0.033352382481098175, + -0.005832961294800043, + 0.01660207472741604, + 0.015949850901961327, + -0.0027423070278018713, + -0.020915649831295013, + -0.007333818357437849, + -0.03498294577002525, + 0.013303895480930805, + 0.003548322943970561, + -0.000733752443920821, + -0.012659082189202309, + -0.01723947562277317, + -0.010813583619892597, + -0.006618595216423273, + -0.011569571681320667, + -0.006214660592377186, + 0.02419159561395645, + 0.015149394050240517, + 0.018632864579558372, + -0.018573570996522903, + -0.023168789222836494, + 0.0022142278030514717, + 0.00432469230145216, + 0.0014063587877899408, + -0.01577197201550007, + -0.009635132737457752, + 0.006748299114406109, + -0.016098083928227425, + -0.03148464858531952, + -0.002075259340927005, + -0.014230350032448769, + -0.018217813223600388, + -0.007945278659462929, + -0.007967513985931873, + -0.009160787798464298, + -0.01718018390238285, + -0.008004572242498398, + 0.03148464858531952, + 0.010724644176661968, + 0.0031536531168967485, + 0.00864938460290432, + 0.031217830255627632, + 0.022457271814346313, + 0.00908667128533125, + -8.917130617192015e-05, + 0.02121211588382721, + -0.003700261702761054, + 0.008945850655436516, + 0.03433072194457054, + -0.017447002232074738, + -0.008782794699072838, + -0.02343560755252838, + -0.021419642493128777, + -0.023302199319005013, + -0.019329559057950974, + -0.01491963304579258, + -0.03361920267343521, + 0.008923615328967571, + 0.02659296803176403, + 0.010443001985549927, + -0.018543925136327744, + 0.02574804052710533, + 0.022531388327479362, + 0.00827880296856165, + 0.023984069004654884, + -0.010843230411410332, + 0.006318423897027969, + 0.0003330605977680534, + -0.005043621640652418, + 0.004250575788319111, + -0.030713839456439018, + -0.03868876397609711, + 0.037206437438726425, + 0.002240168396383524, + -0.005251147318631411, + -0.0197149645537138, + -0.005073267966508865, + 0.007619166746735573, + -0.005073267966508865, + 0.010257710702717304, + -0.045833587646484375, + 0.005769962444901466, + 0.038836997002363205, + 0.06124980002641678, + 0.019270265474915504, + 0.003185152541846037, + 0.012258853763341904, + 0.009649956598877907, + -0.00303136114962399, + -0.014378583058714867, + 0.018558748066425323, + -0.014519404619932175, + -0.011028521694242954, + 0.026059329509735107, + 0.020634008571505547, + -0.004250575788319111, + 0.011206400580704212, + -0.04470701888203621, + -0.018618041649460793, + 0.008478917181491852, + 0.020722948014736176, + -0.02184951677918434, + -0.015053042210638523, + 0.01529762614518404, + -0.010168771259486675, + -0.002658926183357835, + -0.010109477676451206, + 0.011525101028382778, + 0.028831282630562782, + 0.006970648188143969, + 0.017002303153276443, + 0.030862072482705116, + 0.013748593628406525, + 0.002041907049715519, + 0.011028521694242954, + -0.01955190859735012, + -0.0011108196340501308, + -0.013681888580322266, + 0.022397978231310844, + 0.028594110161066055, + -0.027082135900855064, + 0.02577768638730049, + -0.024680763483047485, + -0.01580161787569523, + -0.018973801285028458, + 0.03690997138619423, + 0.01369671244174242, + 0.005158502142876387, + -0.023865483701229095, + -0.021716106683015823, + 0.008738324046134949, + -0.03871840983629227, + 0.011888272128999233, + 0.03610951453447342, + 0.028860928490757942, + 0.008456681855022907, + -0.0005957106477580965, + -0.008352919481694698, + 0.006918766535818577, + -0.008108334615826607, + -0.021419642493128777, + -0.0055068489164114, + 0.006248013116419315, + -0.029290804639458656, + 0.02109353058040142, + 0.006444421596825123, + 0.011873448267579079, + -0.0102058295160532, + 0.05973782390356064, + -0.008738324046134949, + 0.009909363463521004, + -0.016127729788422585, + 0.014889986254274845, + -0.018262282013893127, + -0.010346650145947933, + 0.04500348120927811, + 0.010383708402514458, + -0.0029257452115416527, + 0.0033148564398288727, + 0.03204793483018875, + 0.016231494024395943, + -0.023153966292738914, + 0.013244601897895336, + 0.010472648777067661, + 0.0024903113953769207, + -0.026118621230125427, + 0.010969228111207485, + -0.013296484015882015, + 0.0082046864554286, + -0.01257014274597168, + 0.001746367895975709, + -0.02977997250854969, + -0.023168789222836494, + -0.01057641115039587, + -0.020159663632512093, + -0.0165576059371233, + 0.017521118745207787, + -0.012525673024356365, + 0.031781114637851715, + -0.012525673024356365, + 0.01179192028939724, + 0.013466951437294483, + 0.0012062445748597383, + -0.0012636847095564008, + 0.017076419666409492, + -0.00246807630173862, + -0.019981782883405685, + 0.056061651557683945, + 0.05425320938229561, + 0.050517745316028595, + -0.005799608770757914, + 0.027897415682673454, + -0.01808440312743187, + -0.04912435635924339, + -0.028445877134799957, + 0.008427035994827747, + 0.010694997385144234, + 0.011888272128999233, + 0.008041630499064922, + 0.024665940552949905, + -0.003980051260441542, + -0.01328166015446186, + 0.01814369671046734, + -0.029394567012786865, + 0.01796581782400608, + -0.031010305508971214, + -0.02600003592669964, + 0.015460683032870293, + 0.013985766097903252, + -0.0031147419940680265, + -0.00470639206469059, + -0.0028053061105310917, + 0.0009176537860184908, + 0.049094706773757935, + -0.028564464300870895, + -0.0637994036078453, + -0.04642651975154877, + 0.0028386584017425776, + -0.01660207472741604, + 0.019255442544817924, + -0.01568303257226944, + 0.00571437506005168, + -0.011584394611418247, + 0.005436438601464033, + -0.02359866350889206, + 0.012325558811426163, + 0.004632275551557541, + 0.021389994770288467, + 0.034923650324344635, + -0.01491963304579258, + 0.003652086015790701, + 0.015935027971863747, + -0.03602057322859764, + -0.08692372590303421, + -0.003729908261448145, + 0.010835818946361542, + 0.018603218719363213, + 0.016676191240549088, + ], + "index": 72, + }, + { + "title": "173 Hours in Captivity", + "text": "173 Hours In Captivity: The Hijacking of IC 814 is a 2000 book (ISBN 81-7223-394-9) written by Neelesh Misra, a New Delhi-based correspondent of the Associated Press. The book is about the hijacking of Indian Airlines Flight 814 on its journey from Kathmandu to New Delhi on Christmas Eve, December 24, 1999.", + "vector": [ + -0.006944699212908745, + -0.001118911779485643, + -0.013426940888166428, + -0.042452022433280945, + -0.04637115076184273, + 0.02707335352897644, + -0.03354775533080101, + 0.03241904824972153, + -0.01223552506417036, + 0.020645979791879654, + 0.011091139167547226, + 0.004393345210701227, + 0.006885912269353867, + -0.030600570142269135, + -0.06126384809613228, + -0.04677874222397804, + -0.007748120930045843, + 0.0044325366616249084, + -0.022480132058262825, + -0.008622086606919765, + 0.0149632403627038, + 0.0014735930599272251, + -0.013278014026582241, + -0.006976052187383175, + 0.04677874222397804, + 0.012486349791288376, + 0.0073522888123989105, + 0.022401750087738037, + 0.05170116946101189, + -0.02486296370625496, + -0.06051137298345566, + -0.02390669658780098, + -0.005541650578379631, + -0.020128654316067696, + -0.021414129063487053, + -0.004115086980164051, + -0.03489593788981438, + 0.039410777390003204, + -0.011898480355739594, + 0.00919428002089262, + 0.010001621209084988, + 0.004220903385430574, + -0.03683982789516449, + 0.024831609800457954, + -0.02523919939994812, + -0.046057622879743576, + -0.01780852861702442, + -0.029064271599054337, + -0.029189683496952057, + 0.014626194722950459, + 0.007524730637669563, + 0.0007069131825119257, + -0.03683982789516449, + -0.009860532358288765, + 0.012745012529194355, + 0.04329855367541313, + 0.061984967440366745, + 0.06590409576892853, + 0.0161154642701149, + -0.04922427982091904, + -0.010448401793837547, + -0.07838261127471924, + 0.02194713056087494, + 0.010613005608320236, + -0.012987998314201832, + -0.013897236436605453, + 0.023828312754631042, + -0.016977673396468163, + -0.01502594631165266, + 0.031603869050741196, + -0.009978106245398521, + 0.009695928543806076, + 0.024768903851509094, + -0.003525257809087634, + -0.014594841748476028, + -0.03652629628777504, + 0.02599167264997959, + 0.02346775308251381, + 0.01763608679175377, + 0.027810148894786835, + -0.02199416048824787, + -0.0004955250769853592, + 0.011294933967292309, + -0.0013491606805473566, + -0.0149632403627038, + -0.043079081922769547, + -0.020254066213965416, + -0.09694360941648483, + -0.027292825281620026, + -0.02059894986450672, + 0.038971833884716034, + 0.02290339767932892, + -0.010080003179609776, + -0.022480132058262825, + -0.03019298054277897, + -0.007324854843318462, + 0.04439590871334076, + -0.02865668199956417, + 0.0011355680180713534, + -0.06063678488135338, + 0.00228289351798594, + -0.020112978294491768, + -0.005557327065616846, + -0.020818421617150307, + 0.046841446310281754, + -0.002435739617794752, + 0.00970376655459404, + 0.020693009719252586, + -0.002284853020682931, + 0.015394343994557858, + -0.050196222960948944, + 0.030647600069642067, + 0.012274716980755329, + 0.01369344163686037, + -0.02592896670103073, + -0.002420063130557537, + 0.021226011216640472, + -0.0066076540388166904, + 0.006384263746440411, + -0.042765550315380096, + -0.004593221005052328, + 0.00020648918871302158, + 0.011914156377315521, + 0.05029028281569481, + 0.02428293228149414, + 0.043267201632261276, + -0.01914103329181671, + 0.00016570572915952653, + -0.02776312083005905, + -0.004009270574897528, + 0.023749930784106255, + 0.004514838103204966, + 0.00038358490564860404, + 0.044615380465984344, + -0.0036134382244199514, + 0.013677765615284443, + 0.004056300036609173, + -0.05226552486419678, + 0.019360505044460297, + 0.03621276468038559, + 0.03524082154035568, + 0.010213254019618034, + -0.02675982192158699, + 0.027089029550552368, + -0.003491945331916213, + 0.013881560415029526, + -0.014242120087146759, + -0.045054323971271515, + -0.03671441227197647, + 0.03799989074468613, + -0.004561868030577898, + 0.021476835012435913, + -0.024894315749406815, + -0.003450794378295541, + -0.006772257387638092, + 0.042138490825891495, + 0.0011404670076444745, + 0.00041493793833069503, + -0.02296610362827778, + -0.026164114475250244, + 0.007438509725034237, + -0.05872425064444542, + 0.00550245912745595, + -0.0137953395023942, + 0.01084815338253975, + -0.01578625664114952, + -0.025286229327321053, + -0.0001309234503423795, + 0.01863938383758068, + 0.049098867923021317, + -0.01026812195777893, + 0.03276393190026283, + 0.012995836324989796, + -0.004134682472795248, + -0.01661711372435093, + -0.013497484847903252, + 0.047468509525060654, + 0.06123249605298042, + -0.05170116946101189, + 0.03238769248127937, + -0.014782960526645184, + 0.019548622891306877, + -0.02205686643719673, + -0.0406021922826767, + -0.030600570142269135, + 0.010362180881202221, + 0.03354775533080101, + 0.010534622706472874, + 0.006756580900400877, + -0.013740471564233303, + -0.048346392810344696, + 0.004365911241620779, + -0.01928212121129036, + 0.019313475117087364, + -0.04097842797636986, + -0.017228497192263603, + -0.004138601943850517, + 0.025035405531525612, + 0.01667981967329979, + -0.037122003734111786, + 0.0010326908668503165, + -0.018059352412819862, + -0.02238607406616211, + -0.003940685652196407, + -0.0029628626070916653, + 0.024345638230443, + -0.014281311072409153, + 0.012188496068120003, + 0.03342234343290329, + 0.03988107293844223, + -0.009758634492754936, + -0.012760688550770283, + 0.0251137875020504, + 0.024768903851509094, + 0.03367316722869873, + -0.0039014944341033697, + -0.030867071822285652, + -0.06026054918766022, + 0.053174760192632675, + -0.0026081812102347612, + -0.00012498351861722767, + 0.013928589411079884, + 0.04966321960091591, + -0.024706197902560234, + -0.048471804708242416, + 0.03615006059408188, + -0.019579974934458733, + 0.06628033518791199, + -0.019689710810780525, + -0.012917454354465008, + 0.0023730334360152483, + 0.034268878400325775, + -0.0018664859235286713, + 0.033516403287649155, + -0.02890750579535961, + 0.0161154642701149, + -0.0018811826594173908, + 0.044489968568086624, + -0.008308556862175465, + -0.05079193040728569, + -0.024329962208867073, + 0.058567486703395844, + -0.008912102319300175, + 0.0058904532343149185, + -0.03067895397543907, + 0.007634466048330069, + -0.0017038419609889388, + 0.05452294275164604, + -0.026822529733181, + 0.007418913766741753, + 0.008426130749285221, + -0.004311043303459883, + 0.07248823344707489, + 0.004146439954638481, + 0.052547700703144073, + 0.033829934895038605, + -0.017197145149111748, + 0.024549433961510658, + -0.015653006732463837, + 0.06301961839199066, + 0.042953670024871826, + -0.010134871117770672, + 0.00916292704641819, + -0.002514122286811471, + -0.024894315749406815, + 0.012925292365252972, + 0.008347747847437859, + -0.06916481256484985, + -0.0005545569583773613, + 0.005051759071648121, + -0.010918697342276573, + -0.007273905910551548, + 0.03859559819102287, + -0.029691332951188087, + -0.011961186304688454, + 0.015143520198762417, + 0.006396020762622356, + 0.0216963067650795, + 0.00465984595939517, + 0.004440374672412872, + 0.030098922550678253, + -0.03342234343290329, + 0.016773877665400505, + -0.010393533855676651, + -0.008418291807174683, + 0.015841124579310417, + 0.0032038891222327948, + 0.01782420463860035, + -0.004577544517815113, + -0.05072922632098198, + -0.018059352412819862, + 0.017024703323841095, + -0.04358072951436043, + 0.025270553305745125, + -0.0173695869743824, + 0.02226066030561924, + 0.05402129516005516, + -0.01997188851237297, + 0.004836206790059805, + -0.042201194912195206, + -0.012807718478143215, + 0.06929022818803787, + -0.059257254004478455, + -0.0028786014299839735, + -0.0068702357821166515, + -0.001865506055764854, + -0.015880316495895386, + 0.009884047321975231, + -0.03226228058338165, + -0.010957888327538967, + -0.03019298054277897, + -0.005416238214820623, + 0.013035028241574764, + -0.007175927981734276, + 0.06985457986593246, + -0.03868965432047844, + -0.011639817617833614, + -0.04091572016477585, + -0.01655440777540207, + -0.02053624391555786, + 0.030459482222795486, + 0.01920373924076557, + 0.016044920310378075, + 0.008833720348775387, + 0.014438076876103878, + -0.018733443692326546, + 0.044301848858594894, + -0.0013452415587380528, + -0.015903830528259277, + -0.03771771118044853, + -0.0334850512444973, + 0.001404028502292931, + -0.03862695023417473, + -0.024329962208867073, + -0.02351478300988674, + 0.009978106245398521, + -0.03056921809911728, + -0.0017204983159899712, + 0.005980593152344227, + -0.0021241686772555113, + -0.0173695869743824, + 0.007446347735822201, + -0.006846720818430185, + 0.0173695869743824, + 0.011710361577570438, + 0.023953724652528763, + 0.05631006509065628, + -0.004169954918324947, + -0.0014422399690374732, + -0.045054323971271515, + 0.0007005445659160614, + 0.002806097501888871, + 0.028625328093767166, + -0.002874682191759348, + -0.009045353159308434, + -0.03270122408866882, + 0.008919941261410713, + -0.008480998687446117, + 0.018655061721801758, + -0.027496619150042534, + 0.06345856189727783, + -0.02517649345099926, + 0.02442402020096779, + -0.00030250789131969213, + 0.017259851098060608, + -0.02840585820376873, + 0.001964464085176587, + -0.009852694347500801, + -0.011812259443104267, + -0.01901562139391899, + 0.029503213241696358, + 0.031431425362825394, + -0.036933884024620056, + 0.014532135799527168, + 0.0029942155815660954, + -0.017416615039110184, + -0.04019460082054138, + -0.047280389815568924, + 0.0034409966319799423, + 0.01211011316627264, + 0.008951294235885143, + -0.000986641040071845, + -0.01635061204433441, + -0.033265579491853714, + 0.0011404670076444745, + -0.004459970630705357, + -0.0502275750041008, + -0.02351478300988674, + 0.016044920310378075, + -0.00018456655379850417, + -0.018341530114412308, + -0.021602246910333633, + -0.03511540964245796, + -0.058881014585494995, + -0.04006918892264366, + -0.026477646082639694, + -0.006850639823824167, + 0.013097734190523624, + 0.06311367452144623, + 0.0016156615456566215, + 0.016585759818553925, + 0.05104275420308113, + -0.010707064531743526, + 0.06690739840269089, + -0.012627438642084599, + 0.00890426430851221, + 0.02409481443464756, + -0.0390658937394619, + -0.0508546382188797, + 0.0007554123876616359, + 0.014351855963468552, + 0.06985457986593246, + -0.012125789187848568, + 0.03190172091126442, + -0.033140167593955994, + -0.040351368486881256, + -0.026023026555776596, + 0.053801823407411575, + -0.0381566546857357, + -0.006164791993796825, + -0.02617979235947132, + 0.03759229928255081, + -0.03140007331967354, + -0.002782582538202405, + -0.037247415632009506, + -0.007434590253978968, + 0.0056788199581205845, + 0.005298664327710867, + 0.038971833884716034, + 0.0013374033151194453, + -0.04351802542805672, + -0.0215552169829607, + -0.01674252562224865, + 0.038846421986818314, + -0.03235634043812752, + -0.026822529733181, + -0.021210333332419395, + 0.0209281574934721, + 0.009782149456441402, + 0.029942156746983528, + -0.008598572574555874, + -0.019768094643950462, + -0.054366178810596466, + 0.010103518143296242, + 0.029283743351697922, + -0.004412940703332424, + -0.006940780207514763, + 0.008159630000591278, + 0.06471268087625504, + -0.061420612037181854, + -0.07831989973783493, + -0.008951294235885143, + 0.033328283578157425, + -0.030475158244371414, + 0.04812692105770111, + 0.01265095267444849, + -0.028060974553227425, + -0.048691276460886, + -0.014038325287401676, + 0.07606248557567596, + -0.005377046763896942, + 0.031729280948638916, + -0.0024729713331907988, + -0.014955401420593262, + 0.03821935877203941, + -0.03169792890548706, + 0.005259472876787186, + 0.01755770482122898, + -0.0032391613349318504, + -0.003433158388361335, + -0.0011179319117218256, + 0.044176436960697174, + -0.02174333669245243, + -0.013238823041319847, + 0.013301528990268707, + -0.00970376655459404, + -0.03840747848153114, + 0.01243148185312748, + -0.053049348294734955, + -0.04364343732595444, + 0.06734633445739746, + 0.05743877589702606, + 0.02586626075208187, + 0.0005927684833295643, + 0.005988431163132191, + 0.011208713054656982, + -0.03944212943315506, + -0.017589056864380836, + -0.05420941114425659, + 0.0286723580211401, + 3.6986792110837996e-05, + 0.04075895622372627, + 0.03379858285188675, + 0.006678198464214802, + -0.0313216894865036, + 0.04066489636898041, + -0.04812692105770111, + -0.05442888289690018, + 0.055463533848524094, + -0.007944077253341675, + 3.058758738916367e-05, + 0.014140223152935505, + 0.04304772987961769, + -0.006521433126181364, + 0.05201470106840134, + -0.0036095192190259695, + 0.05656089261174202, + 0.03229363635182381, + 0.051450345665216446, + 0.0036722251679748297, + -0.012666629627346992, + 0.05891237035393715, + -0.0024455373641103506, + 0.02517649345099926, + -0.03546029329299927, + 0.02619546838104725, + -0.007708929479122162, + 0.009735120460391045, + 0.03210551664233208, + -0.003936766646802425, + 0.01693064346909523, + 0.02955024316906929, + -0.012729335576295853, + 0.0038113542832434177, + 0.03887777402997017, + -0.02251148596405983, + 0.04210713878273964, + -0.017667440697550774, + -0.04304772987961769, + 0.020724361762404442, + 0.036494944244623184, + -0.013975619338452816, + -0.014155899174511433, + -0.017150115221738815, + 0.011835774406790733, + 0.015010269358754158, + 0.0039642006158828735, + 0.000687317515257746, + -0.011498728767037392, + 0.022229308262467384, + -0.007501215673983097, + -0.011146007105708122, + -0.021727658808231354, + -0.003866222221404314, + -0.04881668835878372, + 0.004942023660987616, + -0.03583652898669243, + 0.017651762813329697, + -0.05442888289690018, + -0.022527161985635757, + -0.018153412267565727, + 0.010244606994092464, + 0.009891885332763195, + 0.01870208978652954, + -0.017197145149111748, + 0.018858855590224266, + 0.017871234565973282, + 0.007164170499891043, + 0.006027622614055872, + 0.01622520014643669, + 0.0001946093252627179, + 0.02226066030561924, + 0.00045804836554452777, + 0.0275906790047884, + 0.017353909090161324, + 0.03342234343290329, + -0.02447105012834072, + 0.007132817525416613, + 0.00374081009067595, + -0.02296610362827778, + 0.021837394684553146, + 0.012345260940492153, + -0.027496619150042534, + -0.024345638230443, + -0.0032685548067092896, + -0.0009939894080162048, + -0.0066076540388166904, + -0.03771771118044853, + 0.03771771118044853, + -0.008559380657970905, + -0.02694794163107872, + -0.03273257613182068, + 0.018231794238090515, + -0.02447105012834072, + 0.03301475569605827, + -0.003572287503629923, + -0.019768094643950462, + -0.052923936396837234, + -0.03602464869618416, + 0.03759229928255081, + -0.009750796481966972, + 0.02892318367958069, + -0.010871668346226215, + 0.00643913121894002, + -0.019485916942358017, + -0.008935617282986641, + 0.005941401701420546, + 0.011044109240174294, + 0.0004367381043266505, + -0.03017730452120304, + -0.025458671152591705, + 0.04053948447108269, + -0.019564298912882805, + 0.028766417875885963, + -0.009076706133782864, + -0.004122925456613302, + 0.013042866252362728, + -0.014391046948730946, + 0.022370396181941032, + 0.042953670024871826, + -0.02890750579535961, + 0.0009533285046927631, + -0.013129087164998055, + -0.007399318274110556, + -0.02555273100733757, + -0.01347397081553936, + 0.004738228861242533, + 0.010895182378590107, + -0.0012168900575488806, + -0.07537271827459335, + 0.03430023044347763, + 0.017071731388568878, + 0.04630844667553902, + 0.045555971562862396, + 0.006533190608024597, + -0.010032974183559418, + -0.0011561434948816895, + 0.04229525476694107, + -0.029832420870661736, + 0.012862586416304111, + 0.019517268985509872, + 0.0071406555362045765, + -0.006066814064979553, + 0.017542028799653053, + 0.04571273922920227, + -0.004667684435844421, + 0.005294745322316885, + -0.04583815112709999, + -0.010244606994092464, + 0.019313475117087364, + -0.024580786004662514, + 0.022354720160365105, + -0.02447105012834072, + 0.032826635986566544, + -0.005757202859967947, + -0.039285365492105484, + 0.07054434716701508, + -0.0378117710351944, + 0.022119572386145592, + -0.011639817617833614, + 0.0027159573510289192, + 0.025474347174167633, + 0.04301637411117554, + 0.024267256259918213, + 0.01505729928612709, + 0.00025253897183574736, + -0.006827125325798988, + 0.00805773213505745, + -0.00024666026001796126, + 0.019815122708678246, + -0.0038093947805464268, + -0.032826635986566544, + -0.021774688735604286, + -0.004773500841110945, + -0.00514973746612668, + -0.023248281329870224, + -0.015276770107448101, + 0.001614681794308126, + 0.0026199386920779943, + -0.017212821170687675, + -0.01017406303435564, + 0.025333259254693985, + -0.000777947367168963, + -0.008065570145845413, + -0.04862857237458229, + -0.021853070706129074, + -0.02630520425736904, + 0.022417426109313965, + -0.01782420463860035, + -0.03809394687414169, + -0.008410453796386719, + -0.0353662334382534, + -0.009633222594857216, + 0.02505108155310154, + -0.01116168312728405, + -0.020818421617150307, + 0.05743877589702606, + 0.01080896146595478, + 0.018529647961258888, + -0.03088274784386158, + 0.024486728012561798, + 0.008300717920064926, + -0.022856369614601135, + 0.005882614757865667, + -0.015402182936668396, + -0.02632088027894497, + 0.030396776273846626, + 0.027183089405298233, + -0.007708929479122162, + 0.04938104376196861, + 0.008198820985853672, + 0.036181412637233734, + -0.0181377362459898, + 0.01857667788863182, + -0.01356802973896265, + 0.002130047418177128, + -0.006290204357355833, + 0.02467484585940838, + 0.007806907873600721, + -0.015613815747201443, + 0.004742147866636515, + 0.02066165581345558, + 0.0032117273658514023, + -0.0011718199821189046, + 0.04916157200932503, + 0.038971833884716034, + 0.030287040397524834, + -0.00670563243329525, + -0.00257486873306334, + -0.03988107293844223, + 0.022433102130889893, + 0.0020888964645564556, + 0.016726849600672722, + -0.062423910945653915, + 0.018231794238090515, + 0.008896426297724247, + -0.04110383987426758, + 0.0019291919888928533, + -0.02675982192158699, + 0.011702523566782475, + -0.016209524124860764, + -0.0011355680180713534, + 0.004593221005052328, + 0.004111167974770069, + 0.07907237857580185, + -0.041824959218502045, + 0.007771635893732309, + -0.008473159745335579, + -0.0021222091745585203, + 0.028703711926937103, + 0.03288934379816055, + -0.023044487461447716, + -0.023938048630952835, + -0.003572287503629923, + 0.018717767670750618, + 0.003954402636736631, + -0.0019389898516237736, + 0.018592355772852898, + 0.00273555307649076, + 0.004052381031215191, + -0.0046637654304504395, + -0.015308124013245106, + 0.03658900037407875, + -0.05486782640218735, + 0.002888399176299572, + 0.037122003734111786, + 0.023310987278819084, + -0.02865668199956417, + -0.00705443462356925, + -0.006474403664469719, + 0.012000377289950848, + 0.04235796257853508, + -0.013136925175786018, + -0.0011198915308341384, + 0.03279528394341469, + -0.015449211932718754, + 0.015919508412480354, + -0.036432236433029175, + -0.002782582538202405, + -0.022182278335094452, + -0.039222657680511475, + 0.056404124945402145, + -0.0011825975961983204, + 0.013278014026582241, + 0.008253688924014568, + -0.06929022818803787, + 0.03514676168560982, + -0.005032163579016924, + 0.0024122248869389296, + 0.018169088289141655, + -0.03423752263188362, + 0.0030647600069642067, + 0.015966538339853287, + 0.014218605123460293, + -0.039410777390003204, + 0.026226820424199104, + -0.03790583088994026, + 0.016476023942232132, + -0.03207416459918022, + -0.015135682187974453, + 0.010785447433590889, + 0.03727876767516136, + 0.005137979984283447, + 0.015645168721675873, + 0.029769714921712875, + -0.0173695869743824, + -0.0023181657306849957, + -0.0350213497877121, + -0.018984267488121986, + 0.007991107180714607, + 0.023044487461447716, + -0.007818665355443954, + 0.02327963523566723, + -0.04053948447108269, + 0.002004635287448764, + -0.058065835386514664, + 0.023640194907784462, + -0.013881560415029526, + -0.0034743091091513634, + -0.007230795919895172, + -0.044489968568086624, + -0.002576828235760331, + 0.008888588286936283, + 0.038344770669937134, + -0.0038897369522601366, + 0.033829934895038605, + -0.02194713056087494, + -0.01857667788863182, + -0.02815503254532814, + -0.006027622614055872, + 0.01490053441375494, + 0.021633600816130638, + 0.06722092628479004, + -0.005322179291397333, + -0.02624249830842018, + 0.02561543695628643, + 0.03749823942780495, + -0.007285663392394781, + 0.015268932096660137, + -0.02726147137582302, + -0.019940536469221115, + -0.02351478300988674, + -0.00465984595939517, + -0.019579974934458733, + -0.0011326286476105452, + -0.00047739906585775316, + -0.025521377101540565, + 0.042765550315380096, + 0.023028811439871788, + -0.01699334941804409, + 0.003925009164959192, + 0.013654250651597977, + -0.009899723343551159, + 0.0016411358956247568, + -0.03263852000236511, + 0.026524674147367477, + -0.001224728301167488, + -0.03213686868548393, + -0.020583273842930794, + -0.009789987467229366, + -0.022809339687228203, + 0.029079947620630264, + -0.02536461316049099, + 0.008159630000591278, + -0.009656737558543682, + -0.013230984099209309, + -0.01518271118402481, + -0.006074652075767517, + 0.0023710739333182573, + 0.0007407156517729163, + -0.004742147866636515, + 0.02338937111198902, + -0.01353667676448822, + 0.006654683500528336, + 0.03702794387936592, + -0.022041190415620804, + -0.04690415412187576, + -0.050697870552539825, + 0.01928212121129036, + 0.004507000092417002, + 0.003697699634358287, + -0.013654250651597977, + 0.05467970669269562, + 0.010997080244123936, + -0.019297799095511436, + -0.039348069578409195, + 0.059884313493967056, + -0.008394777774810791, + -0.011710361577570438, + -0.015880316495895386, + -0.0011247904039919376, + -0.006458727177232504, + 0.024392668157815933, + 0.0216963067650795, + 2.584176581876818e-05, + -0.0037368908524513245, + 0.03796853497624397, + -0.04367478936910629, + 0.007469862699508667, + -0.027919884771108627, + 0.029409155249595642, + -0.0028531269636005163, + -0.009962429292500019, + -0.023671548813581467, + 0.008136115036904812, + -0.024439698085188866, + -0.008998323231935501, + -0.008763175457715988, + -0.03198010474443436, + 0.0015118045266717672, + -0.0017430332954972982, + -0.002161400392651558, + 0.000911687733605504, + -0.024753227829933167, + 0.0027453508228063583, + -0.031556837260723114, + -0.00967241358011961, + -0.0493183359503746, + -0.028013944625854492, + 0.003370452206581831, + -0.06245526298880577, + 0.02561543695628643, + 0.0006569442339241505, + 0.025348935276269913, + -0.01984647661447525, + -0.021006539463996887, + -0.030459482222795486, + 0.01226687803864479, + 0.008755337446928024, + -0.009985944256186485, + -0.019940536469221115, + -0.009296177886426449, + 0.025521377101540565, + -0.0010777608258649707, + 0.02619546838104725, + -0.019642682746052742, + -0.007626628037542105, + -0.018733443692326546, + 0.024643491953611374, + -0.004224822856485844, + -0.024251578375697136, + 0.002827652730047703, + -0.024392668157815933, + -0.036181412637233734, + 0.025568407028913498, + -0.004393345210701227, + -0.05649818480014801, + -0.02030109614133835, + -0.013897236436605453, + -0.022668249905109406, + -4.8927893658401445e-05, + 0.026979293674230576, + 0.026681439951062202, + -0.033767227083444595, + -0.026650087907910347, + -0.036996591836214066, + -0.04558732733130455, + -0.0025983834639191628, + 0.029409155249595642, + -0.014061840251088142, + -0.03266987204551697, + -0.029330771416425705, + -0.01145169883966446, + 0.03398669883608818, + -0.005169332958757877, + 0.007951915264129639, + -0.034456994384527206, + -0.03778041899204254, + -0.009633222594857216, + 0.028296122327446938, + 0.028013944625854492, + 0.02396940253674984, + 0.015480564907193184, + 0.0035664087627083063, + -0.036244116723537445, + 0.039912424981594086, + -0.02440834417939186, + -0.010675711557269096, + 0.014806474559009075, + -0.0017763458890840411, + -0.028954535722732544, + -0.005714092403650284, + 0.003090234473347664, + 0.0006662521627731621, + -0.0061216820031404495, + 0.003149021416902542, + 0.01705605536699295, + -0.011569272726774216, + -0.010252445004880428, + -0.007422833237797022, + -0.0353662334382534, + 0.02904859557747841, + -0.009186442010104656, + -0.029518891125917435, + -0.012948807328939438, + 0.029942156746983528, + -0.019109679386019707, + 0.006552786100655794, + -0.01508865226060152, + 0.00017011475574690849, + -0.00630979984998703, + 0.003090234473347664, + -0.0071249790489673615, + -0.0517638735473156, + -0.007669738493859768, + 0.05442888289690018, + -0.007258229423314333, + -0.01680523157119751, + -0.009985944256186485, + 0.016914967447519302, + 0.010675711557269096, + -0.042138490825891495, + -0.01315260212868452, + 0.053237468004226685, + -0.006352910306304693, + 0.04088436812162399, + 0.008245850913226604, + 0.07179847359657288, + 0.02111627534031868, + 0.011263580992817879, + -0.004620654974132776, + 0.005921806208789349, + -0.00013178076187614352, + -0.013999134302139282, + 0.008418291807174683, + -0.017730146646499634, + 0.0025807474739849567, + -0.011373316869139671, + -0.039724305272102356, + 0.0644618570804596, + -0.03511540964245796, + 0.03818800672888756, + -0.018937237560749054, + -0.009554839693009853, + -0.009209956973791122, + 0.01744796894490719, + -0.011530081741511822, + 0.0022632977925240993, + -0.001071882201358676, + 0.034645114094018936, + 0.007277825381606817, + 0.044740792363882065, + 0.011921994388103485, + 0.047092270106077194, + 0.020018918439745903, + -0.008582895621657372, + -0.016632789745926857, + 0.07273906469345093, + -0.0110049182549119, + 0.024047784507274628, + 0.021084921434521675, + 0.04837774485349655, + -0.0018645263044163585, + 0.025474347174167633, + 0.027089029550552368, + -0.018670737743377686, + 0.009915400296449661, + 0.0013863923959434032, + 0.025286229327321053, + -0.038971833884716034, + -0.04649656265974045, + -0.04336125776171684, + 0.04508567601442337, + 0.01915670931339264, + 0.022919075563549995, + -0.002326003974303603, + -0.04981998726725578, + -0.009468618780374527, + -0.007172008510679007, + 0.017150115221738815, + 0.031933076679706573, + 0.02003459446132183, + -0.03868965432047844, + -0.033516403287649155, + -0.02638358622789383, + 0.013591544702649117, + 0.041824959218502045, + 0.0017126599559560418, + -0.029377801343798637, + 0.008629925549030304, + -0.0232639592140913, + 0.011412507854402065, + 0.002200591843575239, + -0.015190549194812775, + 0.037247415632009506, + 0.007395399268716574, + -0.024267256259918213, + -0.025145141407847404, + -0.004785258322954178, + 0.031478457152843475, + -0.030428128316998482, + 0.003413562662899494, + 0.002376952674239874, + -0.00039019843097776175, + 0.02505108155310154, + 0.019313475117087364, + 0.028045296669006348, + 0.028829123824834824, + 0.02284069173038006, + -0.01801232434809208, + -0.01229823101311922, + -0.009061029180884361, + -0.003893656190484762, + 0.020018918439745903, + 0.021727658808231354, + 0.0024788500741124153, + 0.0025533135049045086, + 0.039159949868917465, + -0.02707335352897644, + 0.012376613914966583, + -0.0006015865365043283, + -0.0350213497877121, + 0.005913967732340097, + 0.056843068450689316, + 0.019564298912882805, + -0.02226066030561924, + 0.0016068434342741966, + 0.0032999077811837196, + -0.006313719321042299, + 0.024941345676779747, + -0.00291583314538002, + -0.024110490456223488, + -0.012948807328939438, + 0.05910048633813858, + -0.004420779179781675, + -0.004228741861879826, + -0.0010640439577400684, + -0.027355531230568886, + 0.008990485221147537, + 0.0011757391039282084, + 0.025380289182066917, + -0.004350234754383564, + -0.03558570519089699, + 0.04781339317560196, + -0.030396776273846626, + -0.04132331162691116, + 0.031102219596505165, + 0.042640138417482376, + -0.02802962064743042, + -0.003587963990867138, + -0.0053927237167954445, + 0.01502594631165266, + -0.003246999578550458, + 0.0452737957239151, + -0.017855558544397354, + 0.006325476337224245, + 0.014782960526645184, + -0.001190435839816928, + 0.03270122408866882, + -0.012682306580245495, + -0.028452886268496513, + 0.0010973565513268113, + 0.029707008972764015, + 0.018623707816004753, + 0.03749823942780495, + -0.025004051625728607, + -0.030334070324897766, + 0.03931671753525734, + -0.019674034789204597, + -0.015425697900354862, + -0.02238607406616211, + -0.02009730041027069, + -0.02378128282725811, + -0.0010424887295812368, + 0.047970157116651535, + 0.03183901682496071, + -0.015308124013245106, + 0.008379100821912289, + -0.01113033015280962, + 0.014822151511907578, + 0.011255742982029915, + -0.019579974934458733, + 0.018153412267565727, + 0.030537864193320274, + -0.004706875886768103, + -0.03596194088459015, + 0.02669711597263813, + -0.0011179319117218256, + -0.006834963336586952, + -0.0019233132479712367, + 0.0012276676716282964, + 0.015214064158499241, + 0.01693064346909523, + 0.008755337446928024, + -0.029032917693257332, + -0.04539920762181282, + -0.012658791616559029, + -0.0044834851287305355, + 0.013991295360028744, + 0.005224200896918774, + -0.010613005608320236, + -0.017353909090161324, + 0.006058975588530302, + -0.004322800785303116, + -0.0027316338382661343, + 0.007944077253341675, + -0.04367478936910629, + -0.02117898128926754, + 0.009445104748010635, + 0.021147627383470535, + 0.0129409683868289, + 0.007203361950814724, + 0.006756580900400877, + -0.020065948367118835, + -0.02904859557747841, + -0.01578625664114952, + 0.016961997374892235, + 0.003664386924356222, + -0.0251137875020504, + 0.03361046314239502, + 0.0017596895340830088, + 0.018184766173362732, + -0.011530081741511822, + 0.03204280883073807, + 0.016272230073809624, + -0.02473755180835724, + -0.0007363066542893648, + 0.020379478111863136, + -0.01782420463860035, + 0.011459537781774998, + 0.02478458173573017, + 0.05493053421378136, + -0.010785447433590889, + 0.00702308164909482, + 0.0049459426663815975, + 0.026775499805808067, + 0.02226066030561924, + -0.007262148894369602, + -0.008355585858225822, + -0.01055813767015934, + 0.004032785072922707, + -0.03166657313704491, + -0.016899291425943375, + -0.02296610362827778, + -0.03803124278783798, + -0.03480187803506851, + 0.024063460528850555, + -0.02694794163107872, + 0.018733443692326546, + 0.0007456145831383765, + 0.004581463523209095, + 0.0015529554802924395, + 0.0161154642701149, + 0.045054323971271515, + 0.023875342682003975, + 0.013168278150260448, + -0.013136925175786018, + 0.004115086980164051, + -0.003537015290930867, + -0.009586192667484283, + -0.004507000092417002, + -0.0030079325661063194, + -0.002235863823443651, + -0.026461968198418617, + 0.02478458173573017, + -3.1720461265649647e-05, + 0.04260878637433052, + 0.010119195096194744, + 0.0014197049895301461, + 0.00954700168222189, + 0.03746688738465309, + -0.02130439318716526, + -0.005353532265871763, + -0.014453752897679806, + 0.02625817432999611, + -0.04411373287439346, + -0.03138439729809761, + 0.022715279832482338, + 0.005302583333104849, + -0.03082004189491272, + -0.009954591281712055, + -0.01863938383758068, + -0.011686846613883972, + 0.005290826316922903, + -0.021351423114538193, + -0.048471804708242416, + -0.02776312083005905, + 0.0240321084856987, + 0.02371857687830925, + -0.0008313455618917942, + 0.005220281891524792, + -0.033892638981342316, + 0.01743229292333126, + 0.052547700703144073, + -0.030161628499627113, + -0.02721444144845009, + -0.0003118158201687038, + -0.04000648483633995, + -0.019830800592899323, + -0.018858855590224266, + 0.012737173587083817, + 0.026524674147367477, + -0.004773500841110945, + -0.007556083612143993, + 0.018310178071260452, + -0.008198820985853672, + -0.018106382340192795, + -0.023232605308294296, + -0.02226066030561924, + 0.029754038900136948, + 0.009398074820637703, + 0.033265579491853714, + 0.023577488958835602, + -0.023985078558325768, + -0.010291636921465397, + -0.018216118216514587, + -0.01232958398759365, + -0.0061412774957716465, + 0.008951294235885143, + -0.0026473726611584425, + -0.018796149641275406, + -0.006239255890250206, + -0.024894315749406815, + -0.03146278113126755, + -0.018811825662851334, + -0.019485916942358017, + -0.00031818440766073763, + -0.011475213803350925, + 0.012596085667610168, + 0.050823282450437546, + -0.030647600069642067, + 0.027684736996889114, + 0.03567976504564285, + 0.014445914886891842, + -0.01730688102543354, + -0.005051759071648121, + -0.0044834851287305355, + 0.01017406303435564, + -0.025693818926811218, + 0.011138169094920158, + 0.0006804590229876339, + -0.020144330337643623, + 0.005326098296791315, + 0.005984512157738209, + -0.0015715713379904628, + -0.019674034789204597, + 0.011976862326264381, + 0.013011513277888298, + -0.0022143085952848196, + 0.03489593788981438, + 0.03232498839497566, + 0.03044380620121956, + 0.016523053869605064, + -0.025772202759981155, + -0.007850018329918385, + -0.020975185558199883, + 0.027857178822159767, + -0.003482147352769971, + 0.015292447060346603, + -0.013842368498444557, + -0.011577111668884754, + -0.0110049182549119, + -0.0001840766635723412, + -0.027183089405298233, + 0.0021359261590987444, + -0.0016989430878311396, + -0.014163737185299397, + 0.01058949064463377, + -0.00453443406149745, + 0.005298664327710867, + -0.04267149418592453, + -0.015127843245863914, + -0.0042679328471422195, + 0.008222335949540138, + 0.03790583088994026, + -0.009343206882476807, + -0.01163197960704565, + 0.02777879685163498, + -0.005239877384155989, + -0.008849396370351315, + -0.025035405531525612, + 0.015268932096660137, + -0.014320502988994122, + 0.00377216306515038, + -0.015457050874829292, + 0.009860532358288765, + -0.018216118216514587, + -0.04006918892264366, + 0.005020406097173691, + -0.010471916757524014, + -0.033453699201345444, + -0.009742958471179008, + 0.013489646837115288, + -0.031478457152843475, + 0.023953724652528763, + -0.013677765615284443, + 0.015895992517471313, + -0.018106382340192795, + 0.05772095173597336, + 0.0019203738775104284, + 0.03329693153500557, + 0.011498728767037392, + -0.008888588286936283, + -0.015308124013245106, + 0.006129520013928413, + -0.020473537966609, + 0.008363424800336361, + -0.007571760099381208, + 0.012117951177060604, + -0.004119005985558033, + 0.026273850351572037, + 0.000795093597844243, + 0.009272662922739983, + -0.03317151963710785, + 0.01940753310918808, + 0.006219659931957722, + 0.003372411709278822, + -0.02036380209028721, + 0.002931509632617235, + -0.0010709024500101805, + 0.025599760934710503, + 0.006000188644975424, + -0.028766417875885963, + 0.02059894986450672, + -0.008567219600081444, + 0.012815556488931179, + 0.02542731910943985, + -0.014555650763213634, + 0.016852261498570442, + -0.025474347174167633, + 0.024878639727830887, + 0.0001223503495566547, + -0.001590187195688486, + 0.007505134679377079, + 0.010699226520955563, + 0.04216984286904335, + 0.02467484585940838, + 0.019799446687102318, + -0.008190982975065708, + -0.01601356640458107, + 0.0071406555362045765, + -0.020144330337643623, + 0.013082057237625122, + -0.007689333986490965, + 0.014038325287401676, + 0.018028000369668007, + -0.012815556488931179, + -0.03266987204551697, + -0.006901588756591082, + 0.026524674147367477, + 0.00812043808400631, + 0.0021084921900182962, + -0.02142980508506298, + 0.00702308164909482, + 0.006337233819067478, + 0.02149251103401184, + 0.013779662549495697, + -0.009774311445653439, + -0.04596356302499771, + -0.024126166477799416, + -0.01515135820955038, + -0.003041245276108384, + -0.0036839826498180628, + -0.020834097638726234, + -0.00022926913516130298, + -0.0018880411516875029, + 0.005055678077042103, + 0.03524082154035568, + 0.032952047884464264, + -0.0030980727169662714, + 0.024753227829933167, + 0.007755959406495094, + -0.013066381216049194, + 0.025333259254693985, + 0.012643114663660526, + 0.017996646463871002, + -0.006329395808279514, + -0.018608031794428825, + -0.011733876541256905, + 0.01661711372435093, + 0.026712793856859207, + -0.0070857880637049675, + 0.019862152636051178, + 0.0011140127899125218, + -0.007344450335949659, + 0.02605437859892845, + 0.017197145149111748, + -0.0173695869743824, + 0.015966538339853287, + -0.006329395808279514, + -0.01984647661447525, + 0.031211955472826958, + -0.018811825662851334, + -0.0038858179468661547, + 0.05543218180537224, + -0.011812259443104267, + -0.019689710810780525, + -0.03229363635182381, + -0.0015774499624967575, + 0.008622086606919765, + 0.020003242418169975, + -0.03831341862678528, + -0.0017175589455291629, + 0.01148305181413889, + -0.013740471564233303, + -0.0071210600435733795, + 0.054491590708494186, + -0.02592896670103073, + -0.01780852861702442, + 0.009837017394602299, + 0.02890750579535961, + -0.006983890663832426, + -0.02180604264140129, + -0.006431293208152056, + 0.028484240174293518, + -0.0006520453025586903, + -0.012353098951280117, + -4.360032471595332e-05, + 0.0068388828076422215, + -0.00776771642267704, + 0.00029834380256943405, + -0.004800934810191393, + -0.011028433218598366, + 0.009837017394602299, + -0.0030510430224239826, + -0.01553543284535408, + -0.025270553305745125, + -0.029957832768559456, + 0.02359316498041153, + -0.042326610535383224, + -0.0037094568833708763, + -0.01576274260878563, + -0.026085732504725456, + 0.026806851848959923, + -0.006051137577742338, + -0.009962429292500019, + -0.01106762420386076, + -0.02365587092936039, + -0.010855991393327713, + 0.0010268121259287, + 0.0034351178910583258, + 0.013991295360028744, + 0.03530352562665939, + 0.015558947809040546, + -0.01388939842581749, + -0.01356802973896265, + -0.03273257613182068, + 0.00728958286345005, + -0.004095491487532854, + 0.007712848950177431, + 0.008277203887701035, + -0.034519702196121216, + -0.009899723343551159, + -0.0005756223108619452, + -0.00890426430851221, + -0.024204550310969353, + ], + "index": 73, + }, + { + "title": "Jubilee (biblical)", + "text": "The Jubilee (Hebrew yovel \u05d9\u05d5\u05d1\u05dc) year is the year at the end of seven cycles of shmita (Sabbatical years), and according to Biblical regulations had a special impact on the ownership and management of land in the Land of Israel; there is some debate whether it was the 49th year (the last year of seven sabbatical cycles, referred to as the Sabbath's Sabbath), or whether it was the following (50th) year. Jubilee deals largely with land, property, and property rights.", + "vector": [ + -0.007218821905553341, + 0.000699120108038187, + -0.013559678569436073, + 0.007747226394712925, + -0.03489097207784653, + -0.006568477489054203, + -0.0091129494830966, + -0.010665646754205227, + -0.01128347311168909, + 0.0755700096487999, + -0.010405508801341057, + -0.06435156613588333, + 0.005763676483184099, + 0.03719969466328621, + 0.015502582304179668, + 0.005336887668818235, + 0.034143075346946716, + -0.011478576809167862, + 0.04422341287136078, + 0.012234602123498917, + -0.038858070969581604, + -0.005324693862348795, + -0.01055996585637331, + -0.00483287125825882, + -0.017786916345357895, + -0.012047627940773964, + 0.012462222948670387, + -0.01845351979136467, + -0.03349273279309273, + 0.02832249365746975, + 0.02861514873802662, + 0.007332631852477789, + -0.00664164125919342, + -0.014283186756074429, + 0.02687547728419304, + 0.0005273885908536613, + -0.00814149808138609, + 0.006373374257236719, + -0.03963848575949669, + -0.0915684774518013, + 0.013177601620554924, + -0.019429035484790802, + 0.0041784620843827724, + 0.013592195697128773, + 0.02206292934715748, + 0.0025688600726425648, + -0.010738810524344444, + 0.01920141465961933, + -0.04750765115022659, + 0.027412012219429016, + -0.006531895603984594, + 0.015218056738376617, + 0.03667941689491272, + 0.07433435320854187, + 0.02518458291888237, + -0.05391354113817215, + -0.007804131601005793, + 0.029980871826410294, + -0.06318094581365585, + -0.0011320055928081274, + -0.004865388385951519, + -0.023249808698892593, + -0.01120218075811863, + 0.003971165046095848, + -0.006365244742482901, + -0.0026907995343208313, + 0.012868687510490417, + 0.045751720666885376, + 0.012982497923076153, + 0.006474990397691727, + -0.01770562306046486, + -0.02773718349635601, + 0.03726472705602646, + 0.0036703806836158037, + -0.027493305504322052, + 0.036419279873371124, + 0.03466334939002991, + 0.028989097103476524, + -0.059506502002477646, + 0.04806044325232506, + -0.024127773940563202, + -0.024745600298047066, + -0.04077658802270889, + -0.04090665653347969, + -0.001985582523047924, + 0.029216717928647995, + 0.04106924310326576, + -0.07127773761749268, + 0.03654934838414192, + -0.00013070396380499005, + -0.016843916848301888, + -0.04289020597934723, + -0.06269319355487823, + -0.034728385508060455, + 0.04910099506378174, + -0.012267119251191616, + 0.012608549557626247, + 0.015803366899490356, + 0.00916985422372818, + -0.06679035723209381, + 0.03220830112695694, + -0.06331101804971695, + -0.05745792016386986, + -0.014762815088033676, + 0.007970781996846199, + -0.011250955983996391, + -0.011039594188332558, + 0.0011777328327298164, + 0.009283664636313915, + -0.003737447317689657, + 0.019819242879748344, + 0.041459448635578156, + 0.020794758573174477, + -0.002298560691997409, + -0.031818095594644547, + 0.017689364030957222, + -0.016226090490818024, + -0.04503634199500084, + -0.0043288543820381165, + 6.630463030887768e-05, + -0.013421480543911457, + -0.04253251850605011, + 0.008999139070510864, + -0.014055565930902958, + 0.007946394383907318, + -0.04048393294215202, + -0.005572637543082237, + 0.02204667218029499, + 0.043312929570674896, + -0.027899770066142082, + -0.05976663902401924, + -0.05739288404583931, + -0.042630068957805634, + -0.02007937990128994, + 0.0036581866443157196, + 0.0041337511502206326, + 0.00190428935457021, + 0.032696060836315155, + -0.028793994337320328, + 0.02066469006240368, + -0.013128825463354588, + -0.015193668194115162, + 0.016234219074249268, + 0.0703672543168068, + 0.04763771966099739, + -0.057945676147937775, + -0.0008322374778799713, + 0.030940130352973938, + -0.010242922231554985, + -0.04136189818382263, + 0.054466333240270615, + 0.030598698183894157, + 0.01059248298406601, + -0.001737638609483838, + -0.002672508591786027, + 0.0195591039955616, + -0.04549158364534378, + 0.03219204396009445, + -0.018014537170529366, + 0.023835118860006332, + -0.005405987147241831, + -0.024908186867833138, + -0.029980871826410294, + 0.0351836271584034, + -0.01421815250068903, + -0.012527257204055786, + 0.01985175907611847, + -0.04526396468281746, + 0.029151683673262596, + 0.0165106151252985, + -0.04393075779080391, + -0.05199502781033516, + -0.05267788842320442, + -0.05212509632110596, + 0.053295716643333435, + -0.036874521523714066, + 0.03625669330358505, + 0.00856015644967556, + -0.023184774443507195, + -0.024940703064203262, + -0.03198068216443062, + 0.010454284958541393, + -0.009682000614702702, + 0.009226759895682335, + 0.015258703380823135, + -0.0037963849026709795, + 0.018323451280593872, + 0.008340665139257908, + -0.043833207339048386, + -0.03437069430947304, + -0.00972264725714922, + -0.011437930166721344, + 0.03139537200331688, + 0.027428271248936653, + 0.0017427194397896528, + -0.030257267877459526, + 0.0001978977379621938, + 0.023022187873721123, + -0.062010329216718674, + -0.0243228767067194, + 0.04806044325232506, + 0.02380260080099106, + 0.050336647778749466, + 0.04396327584981918, + 0.03528117761015892, + 0.019233932718634605, + -0.004946681205183268, + -0.051962509751319885, + 0.06763580441474915, + -0.05088943988084793, + 0.06854628771543503, + 0.03905317559838295, + -0.005023909732699394, + -0.046564649790525436, + 0.010031560435891151, + -0.01029982790350914, + 0.02588370256125927, + 0.025786152109503746, + 0.03661438450217247, + 0.0006950554670765996, + 0.04932861402630806, + -0.05749043449759483, + -0.011153404600918293, + -0.030679991468787193, + 0.01363284233957529, + 0.010803844779729843, + 0.007039976771920919, + -0.005418180953711271, + -0.041231829673051834, + -0.014104342088103294, + -0.022469395771622658, + 0.02907039038836956, + -0.03778500482439995, + 0.009072302840650082, + -0.04532899707555771, + -0.011234697885811329, + -0.006068525370210409, + 0.022355584427714348, + 0.019412776455283165, + -0.05414116382598877, + 0.018209639936685562, + -0.02604628913104534, + -0.038858070969581604, + -0.013356446288526058, + -0.03541124612092972, + 0.003912227228283882, + -0.022306809201836586, + 0.03674445301294327, + -0.03986610472202301, + 0.006714805029332638, + 0.028127390891313553, + -0.009771423414349556, + -0.020209448412060738, + 0.008174015209078789, + -0.03485845401883125, + -0.01850229501724243, + -0.030598698183894157, + 0.012242731638252735, + -0.034273143857717514, + 0.061425019055604935, + -0.0097795519977808, + 0.024648047983646393, + -0.02206292934715748, + -0.05323068052530289, + 0.019705431535840034, + 0.036646902561187744, + -0.020518362522125244, + 0.003511859104037285, + 0.001754913479089737, + 0.01427505724132061, + 0.049068477004766464, + 0.028680182993412018, + 0.028420045971870422, + 0.03970351815223694, + -0.022843344137072563, + -0.007832583971321583, + 0.008535768836736679, + 0.021558912470936775, + -0.0019916794262826443, + -0.007243209518492222, + 0.022664498537778854, + -0.00731230853125453, + -0.01238905917853117, + 0.04266258701682091, + 0.02890780381858349, + 0.02430661767721176, + -0.04106924310326576, + -0.008137432858347893, + -0.01549445278942585, + 0.01450267806649208, + -0.006231111474335194, + -0.041296862065792084, + 0.012437834404408932, + 0.02929801121354103, + -0.00011679522867780179, + -0.0378500372171402, + -0.02733071893453598, + 0.019802983850240707, + 0.006292080972343683, + -0.035606350749731064, + -0.0065400246530771255, + 0.004397953394800425, + -0.021623948588967323, + -0.013559678569436073, + -0.005930326879024506, + -0.013226376846432686, + -0.04438599944114685, + 0.011689938604831696, + 0.02791602909564972, + -0.0028777734842151403, + 0.052320197224617004, + -0.004084974993020296, + -0.02269701659679413, + 0.01364097185432911, + 0.0831790342926979, + -0.03732976317405701, + -0.010543706826865673, + -0.02768840827047825, + 0.018437260761857033, + 0.012055757455527782, + 0.037980105727910995, + 0.008271566592156887, + -0.02025822550058365, + -0.05407612770795822, + 0.03677697107195854, + -0.008035816252231598, + -0.03729724511504173, + -0.012681713327765465, + -0.01462461706250906, + 0.004971069283783436, + -0.011063982732594013, + -0.05911629647016525, + 0.014088083058595657, + 0.02687547728419304, + 0.007287920918315649, + -0.027249425649642944, + -0.0067513869144022465, + 0.044776204973459244, + 0.010755068622529507, + -0.026420237496495247, + 0.012884946539998055, + -0.03963848575949669, + 0.011340378783643246, + -0.016478098928928375, + -0.008007364347577095, + 0.0037211887538433075, + -0.010153500363230705, + -0.030273526906967163, + 0.048775821924209595, + -0.025574790313839912, + 0.0008098818943835795, + 0.023477429524064064, + -0.0029326463118195534, + 0.00728385616093874, + 0.018811209127306938, + -0.011023336090147495, + -0.06835118681192398, + -0.029054131358861923, + 0.00732856709510088, + -0.01364097185432911, + 0.0486457534134388, + -0.023054705932736397, + 0.0060319434851408005, + 0.013771040365099907, + -0.027769701555371284, + -0.05856350436806679, + 6.164457317936467e-06, + -0.0024794377386569977, + -0.01603911630809307, + -0.02019319124519825, + -0.03765493631362915, + 0.006292080972343683, + 0.042500000447034836, + 0.0020953279454261065, + -0.016388677060604095, + 0.01398240216076374, + -0.051214613020420074, + 0.015575746074318886, + 0.028127390891313553, + 0.004808483179658651, + 0.0074301837012171745, + 0.02321729063987732, + -0.007808196358382702, + 0.0026481207460165024, + 0.010787585750222206, + -0.007978911511600018, + 0.01218582596629858, + 0.004369500558823347, + -0.01128347311168909, + -0.021136188879609108, + -0.02907039038836956, + 0.01677888259291649, + -0.002062810817733407, + 0.014266927726566792, + 0.0044629876501858234, + 0.0539785772562027, + 0.016860175877809525, + -0.02251817099750042, + 0.027412012219429016, + 0.008072398602962494, + 0.05924636498093605, + -0.050336647778749466, + 0.05192999169230461, + 0.017315417528152466, + 0.03521614521741867, + 0.027720926329493523, + -0.045881789177656174, + 0.00305458577349782, + 0.02407899685204029, + 0.0025790215004235506, + 0.012941851280629635, + 0.03609410673379898, + 0.0006533928099088371, + 0.01804705336689949, + -0.013136954978108406, + -0.009332440793514252, + 0.026550306007266045, + 0.04380068928003311, + -0.0064058913849294186, + -0.01059248298406601, + -0.032923679798841476, + 0.018599847331643105, + -0.06568477302789688, + 0.023721307516098022, + -0.060677122324705124, + -0.009291794151067734, + -0.00843821745365858, + -0.03237088769674301, + -0.03651683032512665, + 0.033687833696603775, + -0.04380068928003311, + -0.012234602123498917, + 0.031232785433530807, + 0.04984889179468155, + 0.03895562142133713, + -0.010868879035115242, + -0.002457082038745284, + -0.0010923751397058368, + 0.015258703380823135, + 0.027460787445306778, + 0.01840474270284176, + -0.017543036490678787, + -0.05153978615999222, + -0.010698163881897926, + -0.010511189699172974, + -0.01000717282295227, + -0.04119931161403656, + -0.01569768600165844, + 0.02554227225482464, + 0.012917463667690754, + 0.03463083505630493, + -0.023542463779449463, + -0.028306234627962112, + -0.005060491617769003, + 0.03131407871842384, + 0.06422150135040283, + -0.015274961479008198, + -0.07153787463903427, + -0.002747704740613699, + 0.015079858712852001, + -0.028533855453133583, + 0.03253347426652908, + 0.023835118860006332, + -0.05355585366487503, + -0.022436877712607384, + -0.002007937990128994, + -0.0037252535112202168, + -0.014161246828734875, + 0.011275344528257847, + 0.025038255378603935, + 0.0014002725947648287, + -0.0054466333240270615, + -0.08857689052820206, + 0.0565149188041687, + -0.021656464785337448, + -0.016632555052638054, + 0.026777926832437515, + -0.010950172320008278, + 0.04162203520536423, + 0.016681330278515816, + 0.025688599795103073, + -0.013145084492862225, + -0.05280795693397522, + 0.05014154687523842, + -0.018323451280593872, + 0.04659716784954071, + 0.012267119251191616, + -0.028582632541656494, + -0.023574979975819588, + 0.015014823526144028, + 0.03157421573996544, + 0.010324215516448021, + -0.0009887265041470528, + 0.009698259644210339, + 0.028127390891313553, + 0.020063120871782303, + -0.027997322380542755, + -0.03446824848651886, + 0.026013771072030067, + -0.0323871448636055, + -0.04591430723667145, + -0.01741296797990799, + 0.0008662789477966726, + 0.039605967700481415, + -0.009438121691346169, + -0.010186017490923405, + -0.02025822550058365, + 0.006133559625595808, + 0.0007539929356426001, + -0.0182258989661932, + -0.005999425891786814, + 0.012632938101887703, + -0.03152544051408768, + -0.01122656837105751, + 0.020225707441568375, + -0.0004123081162106246, + 0.010746939107775688, + -0.005950650200247765, + -0.030777543783187866, + -0.015470065176486969, + -0.0035423440858721733, + 0.00852763932198286, + 0.009958396665751934, + -0.037622418254613876, + 0.024696825072169304, + -0.0032374951988458633, + 0.019185157492756844, + 0.0008474799105897546, + 0.006466860882937908, + 0.016291124746203423, + 0.03254973143339157, + 0.019754208624362946, + -0.050336647778749466, + 0.027769701555371284, + 0.02227429300546646, + -0.022355584427714348, + -0.049068477004766464, + 0.02089231088757515, + -0.0047271898947656155, + -0.021250000223517418, + 0.008365053683519363, + -0.015421289019286633, + 0.009828328154981136, + -0.0059018745087087154, + 0.024583013728260994, + 0.013901108875870705, + 0.03710214048624039, + 0.0032171718776226044, + -0.008917845785617828, + -0.025233358144760132, + 0.05830336734652519, + -0.02240436151623726, + -0.0029163877479732037, + 0.01671384833753109, + 0.006625382695347071, + 0.003654122119769454, + 0.035021040588617325, + 0.03736228123307228, + 0.010405508801341057, + 0.012787395156919956, + 0.0020871986635029316, + 0.013242635875940323, + 0.004038231447339058, + 0.022371843457221985, + -0.018209639936685562, + -0.03654934838414192, + -0.05605967715382576, + 0.0863657221198082, + -0.03713465854525566, + 0.006491248961538076, + -0.04188217222690582, + -0.011722455732524395, + -0.025526013225317, + -0.03006216511130333, + 0.004345112945884466, + -0.018209639936685562, + -0.0023453040048480034, + 0.03424062579870224, + 0.014055565930902958, + 0.048775821924209595, + -0.005084879230707884, + 0.005844969302415848, + -0.0168926939368248, + 0.00230059283785522, + -0.009999043308198452, + 0.01827467419207096, + -0.01978672482073307, + 0.010104724206030369, + -0.032354630529880524, + 0.010551836341619492, + -0.03511859104037285, + 0.03476090356707573, + -0.03168802708387375, + -0.02396518737077713, + -0.011218438856303692, + 0.04363810271024704, + -0.0003830934292636812, + 0.005044233053922653, + 0.030013389885425568, + -0.0042678844183683395, + -0.0016766688786447048, + 0.006926166824996471, + -0.02890780381858349, + 0.0009562093182466924, + 0.003552505746483803, + -0.022469395771622658, + -0.016591908410191536, + -0.03921576216816902, + -0.005206819158047438, + -0.01543754804879427, + -0.035086072981357574, + 0.042500000447034836, + -0.023347361013293266, + -0.018551070243120193, + -0.02692425437271595, + 0.03191564604640007, + -0.06376625597476959, + -0.0023574980441480875, + -0.0068245502188801765, + -0.024095255881547928, + -0.033330146223306656, + 0.021786533296108246, + -0.014478289522230625, + -0.022371843457221985, + -0.016665073111653328, + 0.0022314938250929117, + -0.025753634050488472, + -0.0027659956831485033, + 0.007231015712022781, + -0.0004862339701503515, + 0.034208111464977264, + 0.007222886197268963, + -0.046922340989112854, + -0.014779074117541313, + 0.01639680564403534, + 0.014705910347402096, + 0.00635305093601346, + -0.03385042026638985, + 0.011624904349446297, + 0.003524053143337369, + 0.015917176380753517, + 0.019006311893463135, + 0.004824741743505001, + 0.027005547657608986, + -0.008495122194290161, + 0.018437260761857033, + 0.003591120010241866, + 0.04532899707555771, + 0.005117396824061871, + -0.005552314221858978, + -0.02656656503677368, + 0.04503634199500084, + 0.023119740188121796, + 0.02988331951200962, + -0.033102523535490036, + 0.013600325211882591, + -0.008836553432047367, + 0.01827467419207096, + 0.01944529451429844, + 0.0020059056114405394, + -0.036354247480630875, + 0.038728002458810806, + -0.007210692390799522, + 0.01612853817641735, + 0.012592291459441185, + -0.03680948540568352, + -0.01799827814102173, + -0.0024489527568221092, + 0.02430661767721176, + -0.03404552489519119, + 0.00876338966190815, + 0.013128825463354588, + -0.0032151394989341497, + 0.00274973688647151, + 0.033622801303863525, + 0.0026704762130975723, + -0.025526013225317, + -0.004101233556866646, + 0.04916602745652199, + 0.025233358144760132, + -0.006548154167830944, + -0.02733071893453598, + 0.01798201911151409, + -0.02105489745736122, + 0.027070581912994385, + -0.014023048803210258, + 0.03993114084005356, + -0.029639441519975662, + -0.009641353972256184, + -0.00394677696749568, + -0.0151774100959301, + 0.019591622054576874, + 0.008991009555757046, + -0.05433626472949982, + 0.017965761944651604, + -0.04649961739778519, + 0.002824933035299182, + 0.03654934838414192, + -0.03710214048624039, + -0.025103289633989334, + -0.021965378895401955, + 0.006084783934056759, + -0.06880642473697662, + 0.031818095594644547, + 0.009177983738481998, + 0.04380068928003311, + -0.014722169376909733, + -0.028403786942362785, + 0.03993114084005356, + -0.011966334655880928, + -0.025217099115252495, + -0.00543850427493453, + -0.0499139241874218, + -0.04223986342549324, + 0.016494357958436012, + -0.002215235261246562, + 0.002686734776943922, + 0.006999330595135689, + -0.013811687007546425, + -0.012080145068466663, + 0.009121078997850418, + -0.043312929570674896, + -0.04188217222690582, + -0.003117587883025408, + 0.007100946735590696, + 0.01430757436901331, + -0.05212509632110596, + -0.041296862065792084, + 0.01433196198195219, + 0.009551932103931904, + -0.008909717202186584, + 0.03241966292262077, + -0.01978672482073307, + -0.0061660767532885075, + 0.00965761300176382, + 0.03290742263197899, + -0.025135807693004608, + 0.02263198234140873, + 0.01151922345161438, + -0.024387910962104797, + 0.012063886970281601, + -0.02251817099750042, + -0.0043085310608148575, + 0.04162203520536423, + 0.011998851783573627, + -0.0014388867421075702, + 0.06275822222232819, + -0.007930135354399681, + -0.05215761065483093, + 0.036061592400074005, + -0.011389154009521008, + -0.008755260147154331, + 0.03069625049829483, + 0.0013443835778161883, + 0.038565415889024734, + 0.009088561870157719, + 0.019705431535840034, + -0.05183244124054909, + 0.02344491146504879, + 0.02570485882461071, + -0.02258320525288582, + 0.011787489987909794, + -0.005019844975322485, + -0.05280795693397522, + -0.00869835540652275, + 0.009438121691346169, + 0.019754208624362946, + 0.027818476781249046, + -0.016006598249077797, + 0.02380260080099106, + -0.031427886337041855, + -0.026436494663357735, + -0.01664881408214569, + 0.0024835022632032633, + 0.0031582345254719257, + -0.002715187380090356, + -0.04276013746857643, + 0.008991009555757046, + 0.018664881587028503, + -0.02716813236474991, + -0.007523670792579651, + 0.003875645576044917, + 0.0444510318338871, + -0.024696825072169304, + -0.001723412424325943, + -0.02437165193259716, + 0.0005050330073572695, + -0.009730776771903038, + 0.04302027449011803, + 0.016860175877809525, + 0.010316086001694202, + 0.015592004172503948, + -0.003891904139891267, + 0.019055087119340897, + 0.027298200875520706, + 0.0036663159262388945, + 0.029037872329354286, + -0.0029163877479732037, + 0.014340091496706009, + 0.001700040651485324, + 0.022258033975958824, + -0.040191277861595154, + 0.017510520294308662, + 0.007560252211987972, + 0.021493878215551376, + 0.043442998081445694, + 0.019689174368977547, + -0.003696800908073783, + -0.006954619195312262, + 0.020745983347296715, + -0.03625669330358505, + 0.01488475501537323, + 0.01741296797990799, + -0.008869070559740067, + -0.006357115693390369, + -0.006747322157025337, + -0.013673488982021809, + -0.06441660225391388, + 0.00847073458135128, + 0.04962126910686493, + -0.005101138260215521, + -0.017087796702980995, + 0.027932288125157356, + 0.01897379569709301, + -0.03541124612092972, + 0.04640206694602966, + 0.013901108875870705, + 0.033622801303863525, + 0.018876243382692337, + 0.04201224073767662, + 0.0038268696516752243, + 0.005531991366297007, + -0.03853289783000946, + 0.000835794024169445, + -0.018323451280593872, + 0.01546193566173315, + -0.007422054186463356, + 0.006787968799471855, + 0.00946250930428505, + 0.03843534737825394, + -0.0002535326639190316, + 0.01770562306046486, + -0.0006244321120902896, + 0.009901491925120354, + -0.016543133184313774, + 0.03256599232554436, + 0.012234602123498917, + -0.016087891533970833, + -0.029054131358861923, + -0.005361275747418404, + 0.013730393722653389, + -0.028972838073968887, + -0.0004755642730742693, + 0.01564890891313553, + 0.027135616168379784, + -0.03950841724872589, + -0.027314459905028343, + 0.011218438856303692, + -0.005824645981192589, + 0.01059248298406601, + 0.008068334311246872, + -0.011299732141196728, + 0.0067310635931789875, + -0.008917845785617828, + 0.014665263704955578, + -0.02726568467915058, + 0.0018179155886173248, + -0.02778596058487892, + -0.014998565427958965, + -0.016746366396546364, + 0.016144797205924988, + 0.025379685685038567, + 0.05209257826209068, + 0.021201223134994507, + 0.05235271528363228, + 0.07374904304742813, + 0.010974559932947159, + 0.017543036490678787, + -0.013624712824821472, + -0.055441852658987045, + -0.01770562306046486, + 0.025981254875659943, + 0.027412012219429016, + 0.007186304312199354, + 0.02710309810936451, + 0.016226090490818024, + -0.041752103716135025, + -0.048027925193309784, + 0.0017610103823244572, + 0.005032038781791925, + -0.024810634553432465, + 0.023135999217629433, + -0.01845351979136467, + -0.01311256643384695, + -0.009421862661838531, + 0.022014154121279716, + -0.004320724867284298, + -0.0201281551271677, + -0.01596595160663128, + -0.017152830958366394, + 0.027054322883486748, + 0.006418085191398859, + 0.016274865716695786, + -0.011714326217770576, + 0.0003084054624196142, + 0.013535290956497192, + 0.020176932215690613, + 0.000730621162801981, + -0.023867635056376457, + -0.009186113253235817, + 0.04822302982211113, + 0.0036195723805576563, + 0.0302897859364748, + -0.0025017932057380676, + 0.019396519288420677, + -0.01677888259291649, + 0.011535481549799442, + 0.017266640439629555, + -0.02378634177148342, + 0.03336266055703163, + -0.031541697680950165, + -0.006783904042094946, + -0.012299636378884315, + 0.002125812927260995, + 0.00828782469034195, + -0.046922340989112854, + -0.013258893974125385, + 0.009251147508621216, + 0.02820868417620659, + 0.009934009052813053, + 0.006393697578459978, + 0.02337987720966339, + 0.026907995343208313, + -0.024810634553432465, + 0.0018890469800680876, + 0.0075724464841187, + 0.02084353379905224, + -0.0018595781875774264, + -0.005401922389864922, + -0.0023615628015249968, + 0.021900344640016556, + 0.021656464785337448, + 0.0539785772562027, + -0.0499139241874218, + 0.029525630176067352, + 0.01700650341808796, + -0.03892310708761215, + 0.040061209350824356, + -0.0050279744900763035, + -0.021965378895401955, + -0.005353146698325872, + 0.002318883780390024, + -0.002776157110929489, + -0.01128347311168909, + 0.014925401657819748, + 0.04454858601093292, + -0.022469395771622658, + 0.0045320866629481316, + -0.03557383269071579, + 0.030712509527802467, + 0.00732856709510088, + 0.014291316270828247, + -0.0038695484399795532, + 0.008271566592156887, + 0.00815369188785553, + -0.020095638930797577, + -0.006938360631465912, + -0.012868687510490417, + -0.0243228767067194, + -0.013039402663707733, + 0.014071824960410595, + -0.010608741082251072, + 0.004292272496968508, + 0.006617253180593252, + -0.019542846828699112, + 0.018307192251086235, + 0.03736228123307228, + -0.013941755518317223, + 0.01729915849864483, + 0.02900535613298416, + -0.031249042600393295, + -0.015770848840475082, + -0.0015232282457873225, + 0.04311782494187355, + -0.020680949091911316, + 0.018957536667585373, + -0.015014823526144028, + -7.208406168501824e-05, + 0.0015638747718185186, + 0.03103768080472946, + -0.03150917962193489, + -0.023314842954277992, + 0.00019243586575612426, + -0.041231829673051834, + 0.017250383272767067, + 0.02042081020772457, + 0.0005164648173376918, + -0.009226759895682335, + -0.0580432265996933, + -0.020924827083945274, + -0.026615340262651443, + -0.004406082443892956, + 0.015827754512429237, + 0.05101950839161873, + 0.01840474270284176, + -0.02739575318992138, + -0.04266258701682091, + 0.04536151513457298, + 0.026078805327415466, + -0.021396327763795853, + 0.016461839899420738, + -0.0017193477833643556, + -0.024452945217490196, + -0.014144988730549812, + 0.03677697107195854, + 0.00423536729067564, + 0.0235587228089571, + -0.009771423414349556, + 0.0861055850982666, + 0.017315417528152466, + -0.014283186756074429, + -0.02071346528828144, + -0.02645275369286537, + -0.007019653916358948, + -0.03284238651394844, + 0.007291985210031271, + 0.0006574574508704245, + 0.02019319124519825, + -0.014770944602787495, + -0.022014154121279716, + 0.008690225891768932, + -0.0024591144174337387, + 0.008104915730655193, + -0.033460214734077454, + -0.007730967830866575, + 0.007438312750309706, + -0.0013626745203509927, + 0.012592291459441185, + 0.012852429412305355, + -0.01241344679147005, + 0.014405125752091408, + 0.04210979491472244, + -0.03282612934708595, + 0.030712509527802467, + -0.015974082052707672, + -0.027834735810756683, + -0.010446155443787575, + 0.0034915360156446695, + 0.01601472869515419, + -0.00821059662848711, + -0.008015493862330914, + -0.008568285964429379, + -0.03882555291056633, + 0.012380929663777351, + 0.026013771072030067, + 0.03440321236848831, + -0.020550880581140518, + -0.010836361907422543, + 0.007820390164852142, + -0.015754589810967445, + -0.014933531172573566, + 0.046271998435258865, + 0.013600325211882591, + -0.0017925114370882511, + -0.0010192114859819412, + -0.0633760541677475, + -0.002243687864392996, + 0.050694338977336884, + 0.01007220707833767, + 0.009186113253235817, + -0.03677697107195854, + 0.007117205299437046, + 0.03250095620751381, + -0.013584066182374954, + -0.01915263943374157, + -0.011754972860217094, + -0.011592387221753597, + -0.017510520294308662, + 0.006897713989019394, + -0.00484506506472826, + -0.0005319613264873624, + 0.013332057744264603, + -0.0337853878736496, + -0.008356924168765545, + -0.014031178317964077, + -0.010438025929033756, + -0.005219012964516878, + -0.007202562876045704, + 0.024387910962104797, + -0.007092817686498165, + -0.011381025426089764, + 0.019933052361011505, + -0.03700459003448486, + 0.02105489745736122, + -0.02890780381858349, + -0.002465211320668459, + -0.028176166117191315, + 0.052027542144060135, + -0.03476090356707573, + 0.004341048188507557, + 0.03381790220737457, + -0.02726568467915058, + -0.032175783067941666, + 0.029980871826410294, + -0.019396519288420677, + 0.03726472705602646, + 0.0054425690323114395, + 0.021867826581001282, + 0.0189250186085701, + 0.01944529451429844, + 0.003322852775454521, + 0.0012559774331748486, + -0.013811687007546425, + -0.027720926329493523, + 0.02466430701315403, + 0.014527065679430962, + 0.007548058405518532, + -0.007003395352512598, + 0.0004430470580700785, + -0.021607689559459686, + -0.005145849194377661, + 0.0004318692663218826, + 0.021672723814845085, + -0.006239240523427725, + -0.010015302337706089, + -0.007783808279782534, + -0.017494261264801025, + 0.009852715767920017, + 0.01067377533763647, + -0.001605537487193942, + 0.00228433427400887, + 0.005966908764094114, + -0.01990053616464138, + 0.01128347311168909, + 0.004373565316200256, + -0.027525821700692177, + 0.012787395156919956, + -0.016681330278515816, + -0.020811017602682114, + 0.012616679072380066, + 0.019347742199897766, + -0.008844682015478611, + -0.01277113612741232, + 0.0035403117071837187, + 0.006783904042094946, + -0.031883127987384796, + 0.021965378895401955, + -0.013145084492862225, + -0.003322852775454521, + 0.012039498426020145, + 0.006958683952689171, + 0.016161056235432625, + -0.011803749017417431, + -0.022030413150787354, + 0.03230585157871246, + -0.012283378280699253, + 0.05206006020307541, + -0.01090952567756176, + -0.0009684032993391156, + -0.013063791207969189, + -0.03593152388930321, + -0.0008850779267959297, + 0.00394068006426096, + -0.00393661530688405, + 0.011153404600918293, + -0.0351836271584034, + 0.012510998174548149, + 0.004170332569628954, + 0.002770060207694769, + 0.01363284233957529, + 0.028127390891313553, + 0.016087891533970833, + -0.0048572588711977005, + -0.015486323274672031, + -0.010364862158894539, + -0.005853098817169666, + -0.013299540616571903, + -0.008869070559740067, + 0.0038390636909753084, + -0.01565703935921192, + -0.01903882995247841, + 0.02687547728419304, + -0.006056331098079681, + -0.042857687920331955, + -0.010462413541972637, + 0.033053748309612274, + 0.015274961479008198, + -0.03807765990495682, + 0.06285577267408371, + 0.015047341585159302, + 0.016697589308023453, + -0.014738427475094795, + 0.00012390836491249502, + 0.05531178414821625, + -0.004048393107950687, + 0.017201606184244156, + -0.014234410598874092, + 0.023054705932736397, + -0.005832775495946407, + -0.0020292773842811584, + -0.005174302030354738, + 0.03957344964146614, + 0.011738714762032032, + -0.012486610561609268, + -0.010161629877984524, + -0.010738810524344444, + -0.018957536667585373, + 0.009584449231624603, + -0.04497130960226059, + 0.010828232392668724, + 0.02170524001121521, + 0.016437452286481857, + 0.007791937794536352, + -0.011356636881828308, + 0.013933626934885979, + -0.0030728767160326242, + 0.028159907087683678, + -0.07069242745637894, + 0.016502486541867256, + -0.035606350749731064, + 0.028403786942362785, + 0.008771518245339394, + 0.0007351938984356821, + 0.05222264677286148, + -0.0061416891403496265, + 0.026550306007266045, + 0.036939557641744614, + -0.04578423872590065, + -0.01174684427678585, + -0.025526013225317, + 0.033021230250597, + 0.015600133687257767, + 0.017949502915143967, + 0.033102523535490036, + 0.01944529451429844, + 0.023705050349235535, + 0.014982306398451328, + 0.007523670792579651, + -0.007271662354469299, + -0.03963848575949669, + -0.012673584744334221, + 0.014462031424045563, + 0.023054705932736397, + 0.014518936164677143, + 0.01094204280525446, + 0.002680637873709202, + 0.0836993083357811, + -0.04750765115022659, + -0.032289594411849976, + -0.025786152109503746, + 0.00965761300176382, + 0.013706006109714508, + -0.01087700854986906, + -0.01155174057930708, + 0.004210979212075472, + 0.018843725323677063, + -0.0032293659169226885, + -0.012437834404408932, + 0.008608932606875896, + -0.012641067616641521, + 0.0026399914640933275, + 0.001501888851635158, + -0.021721499040722847, + 0.01555135753005743, + 0.0016583779361099005, + 0.02594873681664467, + -0.03648431599140167, + -0.012746748514473438, + 0.02663159929215908, + -0.005670189391821623, + 0.029281752184033394, + 0.013071920722723007, + 0.02606254816055298, + -0.009877104312181473, + 0.02570485882461071, + -0.036126624792814255, + -0.014478289522230625, + 0.005942521151155233, + -0.024160290136933327, + -0.002664379309862852, + 0.03133033588528633, + 0.029785769060254097, + -0.005857163108885288, + -0.0064262147061526775, + -0.009381216019392014, + -0.025217099115252495, + -0.031996939331293106, + 0.011933817528188229, + -0.01616918481886387, + 0.008722743019461632, + 0.03703710809350014, + -0.01296623982489109, + -0.010795715264976025, + -0.023607498034834862, + -0.010462413541972637, + 0.026729149743914604, + 0.004658090882003307, + -0.00011171441292390227, + 0.010405508801341057, + 0.013380833901464939, + 0.01250286865979433, + -0.023753825575113297, + -0.025135807693004608, + -0.010161629877984524, + -0.05134468153119087, + -0.01926644891500473, + -0.018729915842413902, + 0.0022883990313857794, + -0.011982593685388565, + 0.014697780832648277, + 0.02077849954366684, + -0.016047244891524315, + 0.035086072981357574, + 0.01628299616277218, + 0.004910099320113659, + -0.01543754804879427, + 0.04809296131134033, + -0.02105489745736122, + 0.002054681535810232, + -0.006483119912445545, + -0.03742731362581253, + -0.0018138508312404156, + 0.007243209518492222, + -0.019754208624362946, + -0.018811209127306938, + 0.011494835838675499, + 0.014340091496706009, + -0.007393601816147566, + 0.05297054350376129, + -0.010746939107775688, + 0.0008627223432995379, + 0.007527735084295273, + -0.03170428425073624, + 0.016144797205924988, + -0.02762337401509285, + -0.004406082443892956, + -0.016404934227466583, + -0.009413734078407288, + 0.007483024150133133, + -0.006202658638358116, + 0.018437260761857033, + 0.043377965688705444, + -0.0002258422173326835, + 0.04002869129180908, + -0.002963131293654442, + -0.007499282713979483, + 0.027005547657608986, + 0.01921767368912697, + -0.008779647760093212, + 0.01793324388563633, + -0.015624521300196648, + 0.03846786543726921, + 0.00818620901554823, + 0.00046337032108567655, + 0.011055853217840195, + -0.0040057143196463585, + -0.006194529589265585, + 0.009999043308198452, + 0.01712031289935112, + -0.02084353379905224, + 0.013901108875870705, + -0.04672723636031151, + 0.009438121691346169, + -0.022388102486729622, + 0.006568477489054203, + -0.012933721765875816, + -0.015998469665646553, + -0.01897379569709301, + 0.009860845282673836, + 0.015478193759918213, + -0.008324407041072845, + 0.012429704889655113, + -0.03233836963772774, + -0.015608263202011585, + -0.018583588302135468, + 0.013584066182374954, + -0.00021314018522389233, + -0.020355775952339172, + -0.019282707944512367, + 0.001021243748255074, + 0.0033452084753662348, + 0.024127773940563202, + 0.025916220620274544, + -0.009023526683449745, + 0.01687643490731716, + 0.003538279328495264, + 0.027720926329493523, + -0.013884850777685642, + -0.010234793648123741, + 0.014681522734463215, + -0.0038797101005911827, + -0.031086457893252373, + 0.015868401154875755, + 0.007930135354399681, + -0.030972646549344063, + -0.0022396231070160866, + -0.019071346148848534, + -0.0011777328327298164, + -0.007393601816147566, + 0.0009328376036137342, + -0.002056713914498687, + -0.022794567048549652, + 0.027119357138872147, + -0.016591908410191536, + 0.023412395268678665, + 0.025834927335381508, + 0.01938026025891304, + -0.007710644509643316, + 0.018030796200037003, + 0.0070155891589820385, + 0.0075846402905881405, + 0.014949789270758629, + -0.010454284958541393, + 0.0036947685293853283, + -0.03544376417994499, + 0.004450793843716383, + -0.02999713085591793, + 0.0017071537440642715, + -0.013966144062578678, + 0.030940130352973938, + -0.03801262378692627, + 0.02285960130393505, + 0.002453017281368375, + -0.030891353264451027, + -0.009820198640227318, + -0.0015008726622909307, + 0.006771709769964218, + -0.03012719936668873, + 0.015104246325790882, + 0.008308148011565208, + 0.003383822739124298, + -0.01485223788768053, + 0.017738141119480133, + 0.011307861655950546, + 0.029265493154525757, + 0.023574979975819588, + 0.0021420714911073446, + -0.001266139093786478, + 0.020583396777510643, + -0.027477046474814415, + 0.019071346148848534, + -0.018209639936685562, + -0.005036103539168835, + 0.011120887473225594, + 0.011600516736507416, + -0.00732856709510088, + -0.029281752184033394, + 0.002652185270562768, + 0.02581866830587387, + 0.024794375523924828, + 0.038565415889024734, + 0.005462891887873411, + -0.019412776455283165, + 0.0017732044216245413, + 0.029899578541517258, + 0.007324502803385258, + 0.022436877712607384, + 0.030858837068080902, + -0.005824645981192589, + 0.01920141465961933, + 0.00578806409612298, + 0.032013196498155594, + -0.02739575318992138, + 0.012909334152936935, + 0.00930805318057537, + 0.004231302533298731, + -0.014982306398451328, + 0.004751577973365784, + -0.029281752184033394, + 0.03180183470249176, + 0.03541124612092972, + 0.016413064673542976, + 0.024696825072169304, + -0.020339516922831535, + 0.023656273260712624, + -0.011267215013504028, + -0.04669472202658653, + -0.011567999608814716, + -0.006519701331853867, + 0.036939557641744614, + -0.03150917962193489, + 0.03833779692649841, + -0.021038638427853584, + 0.024631790816783905, + -0.0010547771817073226, + -0.001498840400017798, + 0.021380068734288216, + -0.015510711818933487, + -0.01770562306046486, + 0.01520179770886898, + -0.0025810538791120052, + 0.03433817997574806, + -0.008324407041072845, + 0.02773718349635601, + -0.006373374257236719, + -0.015486323274672031, + -0.022079188376665115, + 0.0021745888516306877, + -0.022355584427714348, + -0.004954810719937086, + 0.006861132103949785, + 0.02170524001121521, + -0.019461553543806076, + 0.007645610254257917, + -0.020063120871782303, + 0.01612853817641735, + 0.001941887428984046, + -0.0024265970569103956, + 0.007052171044051647, + -0.025395944714546204, + 0.011844395659863949, + -0.0248268935829401, + -0.021087413653731346, + 0.007304179482161999, + 0.00788136012852192, + -0.03934583067893982, + 0.0007011524285189807, + 0.0010283569572493434, + 0.013616583310067654, + -0.022258033975958824, + 0.006556283216923475, + 0.028111131861805916, + 0.00521088344976306, + -0.025460978969931602, + 0.007060300093144178, + 0.051734887063503265, + -0.038045141845941544, + 0.005869357381016016, + 0.04402830824255943, + -0.018941277638077736, + -0.0007128383149392903, + -0.006068525370210409, + -0.007011524401605129, + 0.01308817882090807, + 0.006499378476291895, + -0.01459209993481636, + ], + "index": 74, + }, + { + "title": "Vonda Ward", + "text": "Vonda Ward (born March 16, 1973, Macedonia, Ohio, United States) is an American female boxer who was also a well known NCAA basketball player.", + "vector": [ + 0.03396308422088623, + 0.02457417920231819, + -0.029978083446621895, + -0.009539852850139141, + -0.03918585181236267, + -0.028785601258277893, + 0.02391001209616661, + -0.011773869395256042, + -0.03194039314985275, + 0.052227675914764404, + -0.060590144246816635, + 0.04386521130800247, + -0.024000579491257668, + -0.008815307170152664, + -0.0015094703994691372, + 0.004030286334455013, + -0.03731410950422287, + 0.011071966029703617, + -0.012536152265965939, + -0.06016749143600464, + 0.0044378433376550674, + 0.039819829165935516, + 0.003256682539358735, + -0.031185658648610115, + 0.036408428102731705, + 0.0006990734837017953, + -0.016589080914855003, + -0.007826603949069977, + 0.014498463831841946, + 0.03595558553934097, + -0.04978233575820923, + -0.010226662270724773, + -0.024815693497657776, + 0.0055397567339241505, + 0.0017943830462172627, + -0.008090761490166187, + -0.017238153144717216, + 0.012875783257186413, + 0.007309610489755869, + -0.029027117416262627, + 0.011909721419215202, + -0.022989235818386078, + -0.027623308822512627, + 0.013328623957931995, + 0.0020698613952845335, + -0.02899692766368389, + -0.002651007380336523, + -0.01728343591094017, + 0.0195627361536026, + -0.022551488131284714, + -0.0030264882370829582, + -0.027849730104207993, + -0.009366264566779137, + -0.009690800681710243, + 0.04259725660085678, + -0.03166868910193443, + -0.020257093012332916, + 0.05902029573917389, + 0.06089203804731369, + 0.0064643071964383125, + -0.039759453386068344, + -0.045253925025463104, + -0.027019521221518517, + -0.019109895452857018, + 0.0358952060341835, + 0.032332856208086014, + 0.0007943588425405324, + 0.07535276561975479, + -0.03200077265501022, + 0.04084626957774162, + 0.006656764540821314, + -0.027955392375588417, + -0.02022690325975418, + -0.02077031321823597, + -0.015434334985911846, + -0.031517744064331055, + -0.005434093531221151, + 0.03550274670124054, + -0.04301990941166878, + -0.009728536941111088, + 0.004634074401110411, + -0.056635331362485886, + -0.003781223436817527, + 0.0036529183853417635, + 0.01182670146226883, + -0.06357889622449875, + 0.003075546119362116, + -0.0768018588423729, + -0.04917854815721512, + -0.001853818423114717, + 0.017781561240553856, + 0.02975166216492653, + 0.00612844992429018, + 0.03136679530143738, + 0.020649556070566177, + -0.015577735379338264, + -0.021419385448098183, + -0.02258167788386345, + -0.02425719052553177, + 0.04081607982516289, + 0.019849536940455437, + -0.0044378433376550674, + 0.023094898089766502, + 0.031125281006097794, + 0.020272187888622284, + -0.004351048730313778, + -0.0484841912984848, + 0.008920970372855663, + -0.01114743947982788, + 0.04160100594162941, + 0.030129030346870422, + 0.0011792738223448396, + -0.019200464710593224, + -0.0011009699665009975, + 0.026974236592650414, + 0.017177773639559746, + 0.0060831657610833645, + 0.08000193536281586, + -0.028378045186400414, + -0.010370061732828617, + 0.030385639518499374, + 0.009796462953090668, + -0.00975117925554514, + 0.04093683883547783, + 0.027110088616609573, + -0.01969859004020691, + -0.04561619833111763, + 0.07142814248800278, + -0.036348048597574234, + 0.06303548812866211, + -0.011305933818221092, + 0.01600038632750511, + -0.03586501628160477, + -0.025011925026774406, + -0.019472168758511543, + -0.015321125276386738, + 0.04972195625305176, + 0.010845544748008251, + 0.006652990821748972, + 0.030370544642210007, + 0.037555623799562454, + -0.024604368954896927, + 0.00025826095952652395, + 0.0018962722970172763, + -0.009298337623476982, + -0.0075020682998001575, + 0.00133588130120188, + -0.024272285401821136, + -0.008928517811000347, + -0.0493294931948185, + 0.04537468031048775, + -0.009932315908372402, + 0.046401120722293854, + -0.04015191271901131, + 0.0032661166042089462, + -0.02766859345138073, + -0.011373859830200672, + -0.0010236096568405628, + 0.037827327847480774, + 0.008837949484586716, + -0.026008175686001778, + 0.018204214051365852, + -0.01440034806728363, + 0.001872686785645783, + -0.030370544642210007, + 0.03130641579627991, + -0.015177725814282894, + 0.05769196152687073, + -0.015321125276386738, + 0.018672149628400803, + -0.002418926451355219, + 0.03652918338775635, + 0.013472023420035839, + -0.0010292701190337539, + -0.04881627485156059, + 0.01954764313995838, + 0.04416710510849953, + 0.027019521221518517, + 0.025087399408221245, + -0.011336122639477253, + 0.014422990381717682, + 0.03532160818576813, + 0.0006434117676690221, + -0.02606855519115925, + -0.03885376825928688, + 0.03130641579627991, + 0.010875734500586987, + -0.024815693497657776, + 0.0263251643627882, + -0.028106339275836945, + 0.044982220977544785, + -0.05092953145503998, + -0.0012415394885465503, + 0.010226662270724773, + 0.023487361147999763, + -0.015562640503048897, + 0.03864244371652603, + 0.04495203122496605, + 0.0009151164558716118, + 0.0167551226913929, + -0.014558842405676842, + -0.057178739458322525, + 0.04015191271901131, + 0.009728536941111088, + 0.03544236719608307, + -0.030702628195285797, + -0.024000579491257668, + -0.03655937314033508, + -0.0020868428982794285, + 0.013592781499028206, + -0.027547836303710938, + -0.023623213171958923, + 0.00743414182215929, + 0.0007184136193245649, + -0.026898764073848724, + 0.01796269789338112, + -0.029812041670084, + -0.039216041564941406, + -0.013472023420035839, + 0.0007330366061069071, + -0.04295952990651131, + 0.012755025178194046, + -0.0405745655298233, + 0.020272187888622284, + 0.013245603069663048, + 0.02443832717835903, + -0.0008382278028875589, + 0.005445414688438177, + -0.026038365438580513, + 0.02010614611208439, + -0.0358952060341835, + -0.0017000411171466112, + 0.027155373245477676, + -0.03335929661989212, + 0.02579684928059578, + -0.015087157487869263, + 0.005403904244303703, + -0.003756694495677948, + -0.04489165171980858, + 0.005939766298979521, + 0.005211446899920702, + 0.016528701409697533, + -0.015924913808703423, + -0.05065782740712166, + -0.023623213171958923, + 0.033449865877628326, + 0.0053322045132517815, + -0.051201239228248596, + 0.005834103096276522, + 0.001760419923812151, + 0.025540240108966827, + 0.02009105123579502, + -0.026566680520772934, + -0.014853189699351788, + 0.03864244371652603, + 0.007894530892372131, + 0.01689097471535206, + -0.05754101276397705, + 0.00827189814299345, + 0.02819690853357315, + -0.0670204907655716, + -0.04220479354262352, + -0.04241611808538437, + 0.013698444701731205, + -0.007226589601486921, + -0.0688922330737114, + -0.03994058817625046, + -0.01159273274242878, + 0.017434382811188698, + -0.03885376825928688, + -0.03363100066781044, + -0.025510050356388092, + 0.0010528556304052472, + 0.006592612247914076, + 0.05002385005354881, + -0.011736133135855198, + -0.008626624010503292, + 0.05929199978709221, + 0.017192868515849113, + 0.03254418447613716, + -0.0020604270976036787, + 0.0012641814537346363, + 0.008649265393614769, + -0.03994058817625046, + -0.018672149628400803, + -0.01004552561789751, + 0.0036812210455536842, + 0.028106339275836945, + 0.033932894468307495, + -0.011955006048083305, + 0.002341566141694784, + 0.05560889095067978, + 0.0031132828444242477, + -0.010377609170973301, + 0.04821248725056648, + 0.01095120795071125, + 0.002452889457345009, + -0.018943853676319122, + 0.010309683158993721, + -0.03550274670124054, + 0.003462347900494933, + -0.019789157435297966, + -0.05802404507994652, + -0.027547836303710938, + -0.03411403298377991, + -0.035804640501737595, + 0.014045622199773788, + -0.006460533477365971, + -0.00026628002524375916, + -0.013313529081642628, + -0.017238153144717216, + 0.044650137424468994, + 0.027442172169685364, + 0.013894675299525261, + 0.04084626957774162, + 0.022023173049092293, + 0.04045380651950836, + 0.031849827617406845, + -0.01968349516391754, + -0.03643861785531044, + 0.03381213918328285, + 0.037012215703725815, + 0.02872522361576557, + 0.008822854608297348, + -0.02833276055753231, + -0.031910207122564316, + -0.005883160978555679, + 0.0032170589547604322, + -0.04794078320264816, + 0.0010330438381060958, + -0.00793981458991766, + 0.0274723619222641, + 0.02410624362528324, + -0.04555581882596016, + 0.00931343249976635, + -0.001663247705437243, + -0.018596675246953964, + -0.010279493406414986, + -0.04214441403746605, + -0.010581388138234615, + -0.00014552238280884922, + 0.08664360642433167, + -0.003571784356608987, + -0.004690679255872965, + -0.04458975791931152, + -0.039216041564941406, + 0.029932798817753792, + -0.02270243503153324, + -0.041631195694208145, + -0.007581315468996763, + 0.0006646387046203017, + 0.024423232302069664, + 0.009494569152593613, + 0.04172176495194435, + 0.032604560256004333, + 0.04688415303826332, + -0.008000193163752556, + -0.020468419417738914, + -0.016362659633159637, + -0.03221210092306137, + -0.020951449871063232, + 0.03698202595114708, + -0.03891414776444435, + 0.019170274958014488, + 0.010566293261945248, + -0.05243900418281555, + 0.013019182719290257, + -0.00034434793633408844, + 0.04301990941166878, + -0.03652918338775635, + 0.002832144033163786, + -0.029510147869586945, + -0.007456784136593342, + -0.030430924147367477, + 0.005781271960586309, + -0.03511028364300728, + -0.03532160818576813, + -0.05098991096019745, + 0.010422893799841404, + 0.0021151455584913492, + -0.03511028364300728, + 0.06756389886140823, + -0.055639080703258514, + -0.040302861481904984, + -0.006732237990945578, + 0.016438134014606476, + 0.017706088721752167, + 0.02324584499001503, + 0.01968349516391754, + -0.04449918866157532, + 0.022536393254995346, + 0.046250175684690475, + -0.013124845921993256, + -0.017902320250868797, + 0.050204988569021225, + -0.004803889896720648, + -2.8081456093786983e-06, + 0.018038172274827957, + -0.043804831802845, + 0.0028736544772982597, + 0.00299629895016551, + -0.04419729486107826, + 0.0010122886160388589, + -0.0038566971197724342, + 0.006803938187658787, + 0.0001058398192981258, + -0.021751469001173973, + -0.046189796179533005, + 0.01035496685653925, + 0.028438422828912735, + 0.012679551728069782, + -0.005452962126582861, + -0.05412961170077324, + -0.018657054752111435, + 0.022415636107325554, + -0.012724836356937885, + 0.04763888567686081, + 4.823229755857028e-05, + -0.032846078276634216, + 0.011434238404035568, + 0.0012481433805078268, + 0.0036604658234864473, + 0.0661751851439476, + -0.005815234966576099, + 0.02277790941298008, + 0.0023453396279364824, + -0.053495634347200394, + 0.019668400287628174, + -0.0577523410320282, + 0.06744313985109329, + 0.020664650946855545, + -0.04051418602466583, + 0.017162678763270378, + 0.044982220977544785, + 0.006241660099476576, + -0.04359350726008415, + -0.06418268382549286, + 0.015849439427256584, + 0.032604560256004333, + 0.0029434673488140106, + 0.0065322332084178925, + 0.01061912439763546, + 0.00846812967211008, + -0.02135900780558586, + -0.04917854815721512, + 0.016921164467930794, + -0.006494496483355761, + 0.003075546119362116, + 0.029042212292551994, + 0.0014896586071699858, + -0.014815452508628368, + -0.016438134014606476, + 0.005260504316538572, + 0.018657054752111435, + -0.006419023033231497, + 0.04594828188419342, + 0.02452889457345009, + 0.010890829376876354, + -0.01225689984858036, + 0.018053267151117325, + -0.017509857192635536, + -0.003526500426232815, + -0.002371755428612232, + -0.0020547667518258095, + -0.03852168470621109, + 0.03462725132703781, + -0.022626962512731552, + -0.06351851671934128, + -0.02546476572751999, + -0.047669075429439545, + 0.061133552342653275, + -0.014347516931593418, + -0.01034742034971714, + 0.04292934015393257, + 0.024755315855145454, + 0.018189119175076485, + 0.0745074599981308, + 0.006505817640572786, + 0.0058756135404109955, + 0.011328576132655144, + 0.023547738790512085, + -9.646459511714056e-05, + 0.010060620494186878, + 0.03139698505401611, + 0.02618931233882904, + -0.036136724054813385, + -0.04172176495194435, + -0.014226758852601051, + 0.029796946793794632, + 0.007219042629003525, + -0.0017123055877164006, + 0.047336991876363754, + -0.028091244399547577, + 0.04066513478755951, + 0.001433053519576788, + 0.006185055244714022, + 0.005045405123382807, + -0.03598577529191971, + 0.040695324540138245, + 0.030249787494540215, + 0.06394116580486298, + 0.02733650989830494, + 0.021525049582123756, + -0.014694694429636002, + -0.0011292726267129183, + 0.0027604440692812204, + 0.031729068607091904, + 0.004283122252672911, + 0.028091244399547577, + -0.0073926313780248165, + 0.002381189726293087, + 0.07607731223106384, + -0.016302280128002167, + 0.0105889355763793, + -0.016966447234153748, + -0.033932894468307495, + 0.00981910526752472, + -0.01814383454620838, + 0.04401616007089615, + -0.005094463005661964, + 0.04024248197674751, + 0.03858206421136856, + -0.03438573703169823, + 0.014302232302725315, + 0.006369965150952339, + 0.002579307649284601, + -0.025208156555891037, + 0.008581339381635189, + -0.00144060084130615, + -0.009826652705669403, + -0.011766321957111359, + -0.004366143140941858, + -0.006728464737534523, + -0.02685347944498062, + 0.018475918099284172, + 0.04039343073964119, + 0.016392849385738373, + 0.005592587869614363, + 0.015623019076883793, + -0.009600232355296612, + 0.01172103825956583, + -0.011758774518966675, + 0.01882309652864933, + -0.013238055631518364, + -0.026898764073848724, + -0.0372537299990654, + -0.01138895470649004, + -0.02471003122627735, + -0.002581194508820772, + -0.016045670956373215, + -0.00183306320104748, + 0.0023510002065449953, + -0.030325261875987053, + -0.0138644864782691, + 0.027683688327670097, + -0.03456687182188034, + -0.0037925445940345526, + 0.015894724056124687, + 0.035744260996580124, + -0.028438422828912735, + 0.012732382863759995, + -0.010521008633077145, + -0.0011839908547699451, + 0.007547352463006973, + -0.024604368954896927, + 0.008370013907551765, + 0.008626624010503292, + 0.03209134191274643, + -0.014649410732090473, + 0.017177773639559746, + 0.012536152265965939, + -0.0017198529094457626, + 0.02303451858460903, + -0.022732624784111977, + 0.010981397703289986, + 0.0010075715836137533, + -0.0021113718394190073, + 0.015562640503048897, + 0.012453131377696991, + 0.019109895452857018, + -0.011026681400835514, + -0.021253343671560287, + 0.005490698851644993, + -0.031246038153767586, + 0.0016321148723363876, + 0.0029981855768710375, + 0.006543554365634918, + 0.011343670077621937, + -0.03489895537495613, + -0.021721279248595238, + -0.009328527376055717, + -0.016785310581326485, + -0.0014877718640491366, + -0.01640794426202774, + 0.02525344118475914, + -0.021660901606082916, + -0.022400541231036186, + 0.005739761516451836, + 0.03323853760957718, + 0.018672149628400803, + -0.02766859345138073, + 0.0031868694350123405, + 0.023608118295669556, + -0.016423039138317108, + -0.03411403298377991, + -0.002900070045143366, + 0.0097813680768013, + -0.0029472410678863525, + -0.019849536940455437, + -0.0007155833300203085, + -0.002134013921022415, + -0.0531635507941246, + 0.01105687115341425, + 0.0009047388448379934, + -0.022611867636442184, + -0.01534376759082079, + 0.019804252311587334, + -0.004671811126172543, + 0.04238593205809593, + 0.020619366317987442, + 0.02410624362528324, + -0.005249183624982834, + -0.034264978021383286, + -0.03988020867109299, + -0.005147294141352177, + -0.003447253257036209, + -0.03592539578676224, + -0.026113837957382202, + -0.02022690325975418, + 0.005766177084296942, + 0.008083214052021503, + -0.020845787599682808, + 0.011471975594758987, + 0.01962311565876007, + -0.04033305123448372, + 0.000881153391674161, + 0.032513994723558426, + -0.0749301165342331, + 0.0047699264250695705, + -0.04084626957774162, + 0.015253199264407158, + 0.04386521130800247, + 0.02759311906993389, + -0.021449575200676918, + -0.0219024159014225, + -0.01566830277442932, + 0.029449768364429474, + -0.013472023420035839, + 0.012543699704110622, + 0.02431756816804409, + -0.009736084379255772, + 0.0072945160791277885, + -0.020060861483216286, + -0.018913663923740387, + 0.021147681400179863, + -0.03348005563020706, + -0.002581194508820772, + -0.0064680809155106544, + -0.02612893283367157, + -0.03604615479707718, + 0.015449429862201214, + -0.01607586070895195, + -0.006109581794589758, + 0.01393241249024868, + -0.0045321849174797535, + -0.037404678761959076, + -0.04305009916424751, + 0.032181911170482635, + -0.0035623502917587757, + -0.0017406081315129995, + -0.0045019956305623055, + 0.0073284790851175785, + 0.007003942970186472, + -0.05325411632657051, + 0.001417958759702742, + -0.03160830959677696, + -0.03323853760957718, + 0.032936643809080124, + -0.001665134564973414, + -0.06315624713897705, + 0.01707211136817932, + 0.03592539578676224, + -0.0038755654823035, + 0.0396386943757534, + 0.01903442293405533, + -0.009902126155793667, + 0.00449067447334528, + -0.0031623404938727617, + -0.006652990821748972, + 0.03658956289291382, + -0.0404839962720871, + -0.002226468874141574, + 0.043774642050266266, + 0.04582752287387848, + -0.0006325624417513609, + 0.03897452726960182, + 0.023291129618883133, + -0.016438134014606476, + 0.0031283774878829718, + 0.018808001652359962, + -0.004449164029210806, + 0.030778102576732635, + -0.03142717480659485, + 0.006924695800989866, + -0.017298530787229538, + -0.0038397153839468956, + 0.01530603040009737, + 0.009517211467027664, + -0.01936650648713112, + -0.028227098286151886, + -0.010075715370476246, + 0.012166331522166729, + -0.024211905896663666, + -0.0035944264382123947, + -0.013947507366538048, + -0.014672053046524525, + 0.06155620515346527, + 0.01815892942249775, + -0.032181911170482635, + -0.012528604827821255, + 0.021389195695519447, + 0.02410624362528324, + 0.027653498575091362, + 0.01126064918935299, + -0.029434673488140106, + 0.003262343117967248, + -0.03088376484811306, + 0.02116277627646923, + 0.055035293102264404, + 0.014679600484669209, + -0.02679309993982315, + -0.01132102869451046, + 0.005464282818138599, + -0.016513606533408165, + 0.04332180321216583, + 0.028891265392303467, + -0.025434577837586403, + -0.013592781499028206, + 0.019849536940455437, + 0.021343912929296494, + 0.004845400340855122, + 0.0340234637260437, + -0.010664409026503563, + -0.03571407124400139, + -0.013683349825441837, + 0.02680819481611252, + 0.0605599544942379, + 0.0006731294561177492, + -0.0563938170671463, + -0.03094414435327053, + 0.010875734500586987, + 0.011373859830200672, + -0.007577541749924421, + -0.029661094769835472, + -0.008800212293863297, + -0.01443808525800705, + -0.036348048597574234, + 0.03474801033735275, + 0.01001533679664135, + -0.05376733839511871, + 0.010271945968270302, + -0.0008556810789741576, + 0.007373763248324394, + -0.0064643071964383125, + 0.008694550022482872, + -0.03843111917376518, + 0.0031736616510897875, + -0.017841940745711327, + -0.0010075715836137533, + 0.01114743947982788, + -0.018249498680233955, + -0.04072551429271698, + -0.016906069591641426, + -0.021947700530290604, + 0.008800212293863297, + -0.0022340163122862577, + -0.0047737001441419125, + -0.0022698661778122187, + 0.050416313111782074, + -0.006120902486145496, + -0.05633343756198883, + 0.004939741920679808, + -0.04066513478755951, + -0.025494955480098724, + -0.014392800629138947, + -0.040302861481904984, + 0.06333737820386887, + 0.046461500227451324, + -0.06424306333065033, + 0.003992549143731594, + 0.004618979524821043, + 0.0016689082840457559, + -0.03637823835015297, + -0.0782509446144104, + 0.004600111395120621, + 0.007011490408331156, + 0.004777473863214254, + -0.011758774518966675, + 0.026747817173600197, + -0.02700442634522915, + 0.008120951242744923, + -0.007324705366045237, + -0.048061538487672806, + 0.010211567394435406, + 0.004894457757472992, + -0.01061912439763546, + -0.010604029521346092, + -0.013034277595579624, + -0.020860882475972176, + 0.025011925026774406, + 0.06466571241617203, + 0.004124627914279699, + -0.006656764540821314, + 0.01568339765071869, + -0.02988751418888569, + 0.01262672059237957, + -0.01523810438811779, + -0.038280170410871506, + 0.01628718711435795, + -0.0661751851439476, + -0.012438036501407623, + 0.02150995470583439, + 8.001372771104798e-05, + 0.000380669574951753, + -0.026491206139326096, + -0.06376003473997116, + 0.015192819759249687, + 0.0031944168731570244, + 0.02794029749929905, + -0.03302721306681633, + -0.043804831802845, + 0.015192819759249687, + -0.009856842458248138, + -0.028438422828912735, + -0.030491303652524948, + 0.023940201848745346, + -0.015698492527008057, + 0.013638065196573734, + 0.007064321544021368, + 0.015894724056124687, + -0.004539732355624437, + -0.03508009389042854, + 0.026687437668442726, + -0.008792665787041187, + 0.012988992966711521, + -0.028091244399547577, + 0.020679745823144913, + -0.07142814248800278, + -0.005162389017641544, + -0.019200464710593224, + 0.01121536549180746, + 0.013758823275566101, + -0.010249304585158825, + 0.0012792762136086822, + -0.011502164416015148, + 0.006728464737534523, + 0.0027774255722761154, + 0.003484989982098341, + 0.008188877254724503, + 0.014287137426435947, + 0.008483223617076874, + 0.010105905123054981, + 0.0023377924226224422, + -0.034536685794591904, + 0.005434093531221151, + 0.005524661857634783, + 0.0188834760338068, + -0.029042212292551994, + 0.007143568713217974, + -0.01473243162035942, + 0.007275647483766079, + 0.010649314150214195, + -0.003466121619567275, + -0.010339872911572456, + -0.028589369729161263, + -0.0009042671299539506, + -0.009539852850139141, + 0.02692895196378231, + 0.014121095649898052, + 0.0387028232216835, + -0.029238441959023476, + 0.0012877669651061296, + -0.02612893283367157, + 0.03894433751702309, + 0.023291129618883133, + 0.006652990821748972, + -0.020679745823144913, + -0.012943709269165993, + -0.03341967612504959, + 0.015117346309125423, + 0.014347516931593418, + 0.004751058295369148, + 0.023426981642842293, + 0.03287626802921295, + -0.01835516095161438, + 0.026204407215118408, + 0.012687099166214466, + -0.020392945036292076, + -0.01360032893717289, + 0.002435907954350114, + -0.0037887708749622107, + -0.01889857091009617, + -0.029842231422662735, + 0.025887418538331985, + -0.007977551780641079, + -0.016845690086483955, + 0.010128546506166458, + 0.026445921510457993, + -0.015079610049724579, + 0.009698348119854927, + -0.0277289729565382, + -0.01969859004020691, + -0.003683107905089855, + 0.0288761705160141, + -0.01302673015743494, + 0.02149485982954502, + 0.03719335049390793, + 0.016392849385738373, + 0.04305009916424751, + -0.013645612634718418, + -0.0036415974609553814, + -0.027879919856786728, + -0.03154793381690979, + -0.04540487006306648, + -0.007351120933890343, + 0.008211519569158554, + -0.036015965044498444, + 0.008988896384835243, + -0.009268148802220821, + 0.0002724122314248234, + -0.00048137956764549017, + 0.00997759960591793, + -0.005566172301769257, + 0.0009155881707556546, + 0.014611673541367054, + 0.041299112141132355, + -0.0016123030800372362, + -5.993659215164371e-05, + 0.037012215703725815, + -0.018838191404938698, + -0.0012688986025750637, + -0.030717723071575165, + 0.0035906529519706964, + 0.016860784962773323, + 0.001996274571865797, + 0.003141585271805525, + 0.059624083340168, + -0.02143448032438755, + 0.05458245053887367, + 0.015351314097642899, + 0.02605346031486988, + 0.012151237577199936, + -0.015102251432836056, + 0.006841674912720919, + 0.004396332893520594, + 0.040423620492219925, + -0.010581388138234615, + 0.014362611807882786, + -0.03320835158228874, + 0.019940104335546494, + 0.041842520236968994, + -0.00913984328508377, + -0.0025208157021552324, + -0.015381503850221634, + -0.05434093624353409, + 0.023064708337187767, + 0.045857712626457214, + -0.03139698505401611, + -0.027970487251877785, + -0.0010490819113329053, + 0.01849101297557354, + 0.0022698661778122187, + -0.014422990381717682, + 0.05874859169125557, + -0.010966302827000618, + -0.007411499973386526, + 0.005505793262273073, + 0.013992791064083576, + 0.05376733839511871, + 0.01802307739853859, + 0.017177773639559746, + -0.009856842458248138, + -0.0034548004623502493, + 0.03867263346910477, + -0.01788722537457943, + 0.014656958170235157, + -0.021675996482372284, + 0.03242342546582222, + -0.04308028519153595, + -0.0030057330150157213, + -0.036015965044498444, + -0.007309610489755869, + 0.014445632696151733, + 0.006328454706817865, + -0.007705846801400185, + 0.03924623131752014, + 0.006490722764283419, + -0.03006865084171295, + -0.012151237577199936, + -0.024619463831186295, + -0.034325357526540756, + 0.02178165875375271, + -0.009562495164573193, + 0.022491110488772392, + -0.043804831802845, + 0.014339969493448734, + 0.015970196574926376, + 0.03556312248110771, + -0.008520960807800293, + 0.03474801033735275, + -0.010905924253165722, + 0.05117104947566986, + 0.02665724791586399, + 0.048665326088666916, + -0.009954957291483879, + -0.02806105650961399, + 0.020649556070566177, + 0.009003991261124611, + 0.017464572563767433, + 0.03885376825928688, + 0.04561619833111763, + 0.0059888241812586784, + -0.0005141633446328342, + 0.0475483201444149, + -0.007490747142583132, + 0.003943491727113724, + -0.0007622825796715915, + -0.008694550022482872, + 0.030657345429062843, + -0.007256779354065657, + 0.02116277627646923, + -0.01126064918935299, + 0.0004290197975933552, + -0.01763061434030533, + 0.018038172274827957, + 0.017781561240553856, + -0.0031321512069553137, + 0.04688415303826332, + -0.03858206421136856, + -0.0013519194908440113, + -0.00285478588193655, + 0.018128739669919014, + -0.005645419470965862, + 0.001945330062881112, + -0.011336122639477253, + 0.002430247375741601, + -0.01269464660435915, + 0.0016509833512827754, + 0.009162485599517822, + -0.0022566583938896656, + 0.0209665447473526, + 0.03568388149142265, + 0.004728415980935097, + -0.0009033237001858652, + 0.0072945160791277885, + -0.038340549916028976, + -0.014362611807882786, + 0.009554947726428509, + -0.01477016881108284, + 0.02264205738902092, + 0.014943757094442844, + -0.025887418538331985, + 0.030913954600691795, + -0.056816466152668, + 0.0027415757067501545, + -0.018641959875822067, + -0.03988020867109299, + -0.03894433751702309, + -0.002652894239872694, + -0.022023173049092293, + 0.0174796674400568, + -0.015049420297145844, + -0.017917415127158165, + 0.0076039573177695274, + -0.01781175099313259, + -0.025600619614124298, + 0.027985582128167152, + -0.008400202728807926, + -0.00023880293883848935, + -0.011917268857359886, + -0.0072982897982001305, + 0.011736133135855198, + -0.011426690965890884, + -0.013683349825441837, + -0.033057402819395065, + 0.03317816182971001, + 0.013751275837421417, + -0.00910965446382761, + 0.03791789710521698, + -0.033449865877628326, + -0.011411597020924091, + -0.03417441248893738, + 0.0363178588449955, + -0.03568388149142265, + -0.005347298923879862, + -0.05219748988747597, + -0.024815693497657776, + 0.00010890593694057316, + 0.005566172301769257, + 0.020468419417738914, + 0.03423478826880455, + -0.03559331223368645, + -0.04851438105106354, + -0.01607586070895195, + 0.03269512951374054, + 0.010792713612318039, + 0.000763226009439677, + 0.017268342897295952, + 0.008830402046442032, + -0.009947409853339195, + 0.0009651176515035331, + 0.014913568273186684, + -0.020951449871063232, + 0.013781465590000153, + 0.01983444206416607, + 0.007803962100297213, + 0.0009868163615465164, + 0.006490722764283419, + 0.007962456904351711, + -0.015773966908454895, + -0.02860446460545063, + -0.03127622604370117, + 0.004879363346844912, + 0.014694694429636002, + -0.016785310581326485, + -0.0011670093517750502, + -0.02010614611208439, + 0.027547836303710938, + -0.006177507806569338, + 0.004830305464565754, + -0.008219067007303238, + -0.023336412385106087, + -0.030506398528814316, + 0.007173758465796709, + 0.00039859453681856394, + -0.016498511657118797, + 0.0003502443141769618, + -0.0353819876909256, + 0.0104832723736763, + -0.02425719052553177, + 0.0064643071964383125, + -0.06738276034593582, + 0.03501971438527107, + -0.009464379400014877, + 0.01477016881108284, + 0.01453620009124279, + 0.03480838984251022, + 0.036800891160964966, + -0.012551247142255306, + 0.016996636986732483, + -0.020377852022647858, + -0.012905972078442574, + -0.01523810438811779, + -0.0034151768777519464, + 0.03203096240758896, + -0.029766757041215897, + -0.006264302413910627, + 0.003294419264420867, + -0.01067950390279293, + -0.02024199813604355, + -0.021268438547849655, + 0.011170081794261932, + -0.021600522100925446, + 0.018385350704193115, + -0.01708720624446869, + 0.004505769349634647, + 0.004664263688027859, + -0.030868669971823692, + 0.01687587983906269, + 0.02874031662940979, + 0.021660901606082916, + -0.005890708416700363, + -0.03236304596066475, + 0.014445632696151733, + 0.023396791890263557, + -0.0014660732122138143, + 0.008098308928310871, + -0.01954764313995838, + 0.024679841473698616, + -0.008792665787041187, + -0.022460920736193657, + 0.011290838941931725, + 0.02874031662940979, + -0.0251326821744442, + 0.01182670146226883, + 0.03867263346910477, + 0.0018085342599079013, + -0.033057402819395065, + 0.02794029749929905, + -0.006105808075517416, + -0.03991039842367172, + -0.003503858344629407, + -0.03559331223368645, + 0.012166331522166729, + 0.035804640501737595, + -0.0014396574115380645, + -0.0006561479531228542, + -0.005713345482945442, + -0.043231233954429626, + -0.01640794426202774, + 0.005181257147341967, + -0.05458245053887367, + 0.025751566514372826, + -0.005883160978555679, + 0.0027057258412241936, + -0.019592925906181335, + -0.001998161431401968, + -0.01196255348622799, + -0.02083069272339344, + -3.6822824768023565e-05, + -0.014113549143075943, + -0.01674002781510353, + 0.0019396694842725992, + 0.009366264566779137, + -0.0165437962859869, + -0.022959046065807343, + -0.03296683356165886, + 0.014634315855801105, + 0.014309779740869999, + 0.037555623799562454, + 0.0030981882009655237, + 0.01621171273291111, + 0.01962311565876007, + -0.01674002781510353, + -0.007441689260303974, + -0.010279493406414986, + 0.010226662270724773, + 0.006373738870024681, + -0.011034228838980198, + -0.00820397213101387, + 0.02807614952325821, + -0.022476015612483025, + -0.0015273954486474395, + -0.008241708390414715, + 0.01868724450469017, + -0.01119272317737341, + -0.007309610489755869, + 0.005958634428679943, + 0.0019396694842725992, + -0.006905827205628157, + -0.020815597847104073, + -0.01835516095161438, + 0.004471806343644857, + 0.01473243162035942, + 0.007222816348075867, + -0.0018047606572508812, + -0.016226807609200478, + 0.0032019643113017082, + -0.001762306783348322, + -0.02899692766368389, + 0.008460582233965397, + -0.0207099337130785, + 0.009094559587538242, + -0.028438422828912735, + 0.012973898090422153, + 0.017736278474330902, + 0.025027019903063774, + 0.014807905070483685, + -0.04549543932080269, + -0.0003110924153588712, + -0.009856842458248138, + -0.028121434152126312, + 0.024211905896663666, + 0.027110088616609573, + 0.029253536835312843, + -0.01504187285900116, + -0.03658956289291382, + -0.0051246522925794125, + -0.027638403698801994, + -0.01443808525800705, + -0.0011500278487801552, + 0.02110239677131176, + -0.0531635507941246, + 0.02069484069943428, + 0.004132175352424383, + 0.01714758388698101, + -0.015834344550967216, + -0.01566830277442932, + -0.0027585572097450495, + 0.005290694069117308, + -0.010890829376876354, + 0.0138644864782691, + 0.02671762742102146, + -0.017102301120758057, + 0.019004233181476593, + 0.034868765622377396, + 0.02271752990782261, + -0.022143932059407234, + -0.03562350198626518, + 0.00837756134569645, + -0.024483609944581985, + 0.019713684916496277, + 0.0066416701301932335, + -0.018611770123243332, + 0.025268536061048508, + 0.01968349516391754, + -0.015094704926013947, + -0.008883233182132244, + -0.005335978232324123, + 0.009585137479007244, + -0.021811848506331444, + 0.007894530892372131, + -0.03692164644598961, + -0.0335102453827858, + 0.005041631404310465, + 0.00752093642950058, + 0.012075763195753098, + -0.015894724056124687, + -0.01640794426202774, + 0.03435554727911949, + -0.05455226078629494, + -0.01707211136817932, + -0.03936699032783508, + 0.015139988623559475, + 0.016166428104043007, + 0.013373908586800098, + -0.024227000772953033, + -0.010143641382455826, + 0.025827039033174515, + -0.014943757094442844, + -0.04452937841415405, + -0.047186046838760376, + -0.02143448032438755, + 0.004283122252672911, + -0.005049178842455149, + 0.01044553518295288, + 0.016045670956373215, + 0.018234403803944588, + -0.01720796339213848, + 0.01580415479838848, + 0.02137410081923008, + 0.01708720624446869, + -0.04320104420185089, + -0.00968325324356556, + 0.029253536835312843, + -0.008988896384835243, + -0.049540821462869644, + -0.0004202931886538863, + 0.0027396888472139835, + -0.014241853728890419, + -0.022415636107325554, + -0.02203826792538166, + -0.00017547594325151294, + -6.574451163032791e-06, + 0.020528798922896385, + -0.0027170467656105757, + 0.013683349825441837, + 0.01092101912945509, + -0.025102494284510612, + 0.0014811678556725383, + -0.0358952060341835, + 0.012604078277945518, + -0.03314797207713127, + -0.016845690086483955, + 0.008173782378435135, + 0.003279324620962143, + -0.0251779668033123, + -0.05403904244303703, + -0.03616691380739212, + 0.027623308822512627, + -0.0006481288583017886, + 0.02392510697245598, + 0.005588814150542021, + -0.02143448032438755, + 0.03136679530143738, + 0.008053025230765343, + 0.0040529281832277775, + -0.009524758905172348, + -0.010309683158993721, + 0.0023264712654054165, + -0.007271873764693737, + -0.0009764386923052371, + -0.013434287160634995, + -0.0027359151281416416, + -0.023940201848745346, + 0.02135900780558586, + -0.0018585354555398226, + -0.006871864199638367, + -0.031578123569488525, + -0.014906020835042, + -0.008762476034462452, + -0.011630469933152199, + 0.0021415611263364553, + 0.015487167052924633, + 0.0122267110273242, + 0.0015594717115163803, + -0.01366825494915247, + -0.01989481970667839, + 0.013751275837421417, + -0.013509760610759258, + 0.0030246013775467873, + -0.04398597031831741, + -0.043502938002347946, + 0.004286895971745253, + 0.0022925082594156265, + -0.009222864173352718, + 0.008920970372855663, + 0.02412133850157261, + 0.016332469880580902, + -0.003468008479103446, + -0.018657054752111435, + -0.005060499534010887, + 0.003486876841634512, + 0.018234403803944588, + 0.008588886819779873, + 0.018007982522249222, + -0.005792592652142048, + 0.004535958636552095, + 0.011079513467848301, + 0.010702145285904408, + -0.013004087843000889, + 0.027245942503213882, + 0.05098991096019745, + -0.021660901606082916, + 0.03154793381690979, + -0.016845690086483955, + 0.042899150401353836, + -0.019879726693034172, + -0.019925009459257126, + 0.037555623799562454, + -0.017162678763270378, + -0.02237035147845745, + 0.02566099725663662, + -0.006154865957796574, + -0.003301966702565551, + -0.02069484069943428, + 0.014815452508628368, + 0.00891342293471098, + -0.023200560361146927, + 0.013509760610759258, + -0.018521202728152275, + -0.008792665787041187, + 0.013939959928393364, + -0.004275575280189514, + -0.007026584818959236, + -0.014853189699351788, + 0.025600619614124298, + -0.008120951242744923, + 0.041359491646289825, + -0.010800261050462723, + 0.006577517371624708, + -0.014551294967532158, + 0.017057016491889954, + 0.01470978930592537, + -0.014241853728890419, + 0.0131625821813941, + -0.010566293261945248, + -0.0006622801884077489, + -0.0484841912984848, + -0.03236304596066475, + -0.008905875496566296, + -0.033932894468307495, + -0.05002385005354881, + -0.030974334105849266, + 0.009419095702469349, + 0.026944046840071678, + 0.016966447234153748, + 0.012400299310684204, + 0.012075763195753098, + -0.025268536061048508, + -0.03188001736998558, + 0.026113837957382202, + -0.006309586577117443, + -0.0013707878533750772, + -0.023864727467298508, + 0.01829478144645691, + -0.04730680584907532, + -0.0052189938724040985, + 0.015547545626759529, + 0.02511758916079998, + 0.007962456904351711, + -0.013147487305104733, + -0.037404678761959076, + 0.005109557416290045, + 0.008611529134213924, + 0.006279397290199995, + -0.01587962917983532, + -0.02827238105237484, + -0.0221137423068285, + -0.01997029408812523, + -0.013034277595579624, + -0.004030286334455013, + -0.006426570471376181, + -0.006834127474576235, + 0.0125663410872221, + 0.052559759467840195, + 0.016256997361779213, + 0.028710128739476204, + -0.020453324541449547, + 0.020619366317987442, + -0.0009047388448379934, + -0.001107573974877596, + 0.02867993898689747, + 0.03803865611553192, + 0.012271994724869728, + 0.01450601126998663, + 0.04461994767189026, + 0.03891414776444435, + 0.014543747529387474, + 0.048001158982515335, + 0.016589080914855003, + -0.0069473376497626305, + -0.03435554727911949, + -0.0036019738763570786, + 0.010898376815021038, + 0.027713878080248833, + -0.056363627314567566, + 0.024423232302069664, + 0.006569969933480024, + -0.0005995428073219955, + 0.047336991876363754, + -0.015502261929214, + 5.1298411563038826e-05, + -0.017781561240553856, + 0.0377669520676136, + -0.032453615218400955, + 0.0165437962859869, + -0.012747477740049362, + -0.019140085205435753, + 0.01963821053504944, + 4.2276966269128025e-05, + 0.008573791943490505, + -0.012158784084022045, + -0.016453227028250694, + 0.033661190420389175, + 0.011268196627497673, + 0.020755218341946602, + -0.015260746702551842, + -0.04160100594162941, + -0.005792592652142048, + -0.015253199264407158, + -0.06273359060287476, + 0.034536685794591904, + 0.008988896384835243, + 0.02913277968764305, + -0.016332469880580902, + ], + "index": 75, + }, + { + "title": "List of flora of the Sonoran Desert Region by common name", + "text": "The Sonoran Desert is located in the southwestern United States and northwestern Mexico in North America.The Sonoran Desert Region, as defined by the Arizona-Sonora Desert Museum, includes the Sonoran Desert and some surrounding areas. All of Sonora, the Baja California Peninsula, and the islands of the Gulf of California are included.", + "vector": [ + 0.07355865836143494, + 0.03149097412824631, + -0.017765160650014877, + -0.003800176316872239, + 0.02606974169611931, + -0.06207840517163277, + 0.028062840923666954, + -0.048791076987981796, + -0.028142565861344337, + 0.046080462634563446, + -0.083125539124012, + 0.007553847040981054, + 0.0014533017529174685, + 0.0022588460706174374, + -0.00465388735756278, + 0.041084423661231995, + -0.005584000609815121, + 0.016556013375520706, + 0.03313860297203064, + 0.05104992166161537, + 0.013081376440823078, + 0.01733996532857418, + 0.027531348168849945, + 0.005813207011669874, + 0.015652474015951157, + 0.06627720594406128, + -0.04695742577314377, + -0.016290266066789627, + -0.04669167846441269, + -0.024594847112894058, + 0.011108207516372204, + -0.03675275668501854, + 0.03816121071577072, + 0.061972107738256454, + -0.011387242004275322, + 0.027664221823215485, + -0.003411521902307868, + 0.009938922710716724, + 0.005849746987223625, + 0.03106577694416046, + -0.00308432150632143, + -0.04913654550909996, + 0.04477830231189728, + -0.014310454949736595, + -0.0012323998380452394, + -0.03313860297203064, + -0.015054545365273952, + 0.02386404573917389, + -0.00542123056948185, + 0.028966380283236504, + -0.00850389152765274, + -0.005039219744503498, + -0.057188667356967926, + 0.015240567736327648, + -0.003634084714576602, + 0.037071652710437775, + 0.0352911502122879, + 0.11533402651548386, + -0.04360901564359665, + -0.0481267087161541, + -0.023717883974313736, + 0.02390390634536743, + 0.07345236092805862, + 0.008198282681405544, + 0.008012260310351849, + 0.001493163756094873, + 0.003165706293657422, + -0.01787145808339119, + -0.021233152598142624, + 0.0108424611389637, + -0.004813335370272398, + 0.025325650349259377, + -0.035530321300029755, + 0.008045478723943233, + -0.022149980068206787, + 0.06978505849838257, + -0.011241081170737743, + 0.015878358855843544, + -0.005069116596132517, + -0.015413302928209305, + 0.0036839123349636793, + -0.01583849824965, + 0.024249376729130745, + 0.02976362034678459, + -0.022149980068206787, + 0.019625386223196983, + 0.01206489559262991, + -0.0438481904566288, + -0.0035942227113991976, + -0.02335912548005581, + -0.005726839415729046, + 0.008988878689706326, + -0.006311481818556786, + -0.006075631827116013, + 0.031809866428375244, + 0.059899285435676575, + 0.028089415282011032, + 0.013579651713371277, + 0.018190354108810425, + 0.006308159790933132, + -0.031650420278310776, + -0.022216415032744408, + -0.03093290515244007, + 0.02335912548005581, + -0.0047967261634767056, + 0.015227280557155609, + 0.051501691341400146, + 0.013134526088833809, + -0.041562769562006, + -0.008258075453341007, + -0.0025428629014641047, + -0.01991770789027214, + 0.0058763218112289906, + -0.008291293866932392, + -0.026335489004850388, + -0.01516084372997284, + -0.01606438122689724, + -0.0021126854699105024, + -0.062237855046987534, + 0.01561261247843504, + 0.02102055586874485, + -0.005879643373191357, + 0.01710079424083233, + 0.01118128839880228, + -0.025485098361968994, + 0.005617219023406506, + 0.03162384405732155, + 0.013347122818231583, + 0.0420411117374897, + 0.0037603143136948347, + 0.04217398539185524, + 0.02787681855261326, + 0.0642043799161911, + -0.008796212263405323, + -0.03885215148329735, + -0.003154079895466566, + -0.0027471554931253195, + 0.04355586692690849, + 0.01914704218506813, + 0.03316517546772957, + -0.014111144468188286, + 0.01327404286712408, + 0.007381111849099398, + 0.03933049738407135, + 0.0046206689439713955, + -0.06340713798999786, + -0.0737181082367897, + 0.05851740017533302, + 0.01874842308461666, + -0.03199589252471924, + -0.00995885394513607, + 0.0352911502122879, + 0.08397592604160309, + -0.015041257254779339, + 0.049694616347551346, + 0.005956045817583799, + -0.0012664486421272159, + -0.04220056161284447, + 0.08163735270500183, + 0.010098370723426342, + 0.030507709830999374, + 0.061068568378686905, + -0.011599838733673096, + -0.017618998885154724, + -0.0025926902890205383, + -0.0601118803024292, + -0.020661799237132072, + 0.002860097913071513, + 0.014934958890080452, + 0.006088919006288052, + 0.060537077486515045, + 0.03877243027091026, + -0.044804878532886505, + 0.022880783304572105, + 0.005142196547240019, + -0.048791076987981796, + 0.006889480631798506, + -0.0034580277279019356, + -0.04036691039800644, + -0.015320291742682457, + 0.010510277934372425, + -0.02516620233654976, + 0.06500162184238434, + -0.007361181080341339, + -0.021299589425325394, + 0.03587578982114792, + -0.03483938053250313, + 0.03866612911224365, + 0.010350829921662807, + 0.030507709830999374, + -0.014137718826532364, + -0.001380221452564001, + -0.015386728569865227, + -0.042227134108543396, + 0.037603143602609634, + -0.005142196547240019, + 0.009068602696061134, + 0.024275952950119972, + 0.012556526809930801, + -0.005461092572659254, + 0.002906603505834937, + -0.03754999488592148, + 0.022947218269109726, + 0.06138746440410614, + 0.029843343421816826, + 0.040552932769060135, + -0.004062601365149021, + -0.019266627728939056, + -0.011872229166328907, + 0.05027925595641136, + 0.006457642652094364, + -0.004949530586600304, + -0.03279313072562218, + -0.0011742678470909595, + -0.004906346555799246, + 0.011274299584329128, + -0.011606482788920403, + -0.0395696684718132, + -0.0070289974100887775, + -0.012596389278769493, + 0.042227134108543396, + -0.015572750940918922, + -0.018549112603068352, + 0.002806948497891426, + -0.010450485162436962, + -0.011553333140909672, + -0.019027456641197205, + 0.02747819945216179, + -0.015679050236940384, + -0.01740640215575695, + -0.009918991476297379, + -0.07254882156848907, + 0.00728810066357255, + 0.02346542477607727, + -0.04305094853043556, + 0.029816769063472748, + 0.05612568184733391, + -0.03032168745994568, + 0.00512226577848196, + 0.00537140341475606, + -0.02747819945216179, + -0.0037237743381410837, + -0.02507319115102291, + -0.007839525118470192, + 0.04034033417701721, + 0.012197769246995449, + -0.0035277861170470715, + -0.020741522312164307, + 0.04690427705645561, + 0.05200660973787308, + -0.024541698396205902, + -0.005231886170804501, + -0.016675598919391632, + 0.03082660585641861, + -0.02888665534555912, + -0.06792483478784561, + 0.005783310625702143, + 0.0018020941643044353, + 0.022415725514292717, + -0.003288614097982645, + 0.0016210542526096106, + 0.010822530835866928, + 0.01753927581012249, + -0.036035239696502686, + -0.022840920835733414, + -0.005982620175927877, + 0.019691823050379753, + 0.005919505376368761, + -0.02222970314323902, + -0.015971370041370392, + -0.00960673950612545, + -0.027265600860118866, + -0.0026391958817839622, + 0.019426075741648674, + 0.0407123789191246, + 0.06160006299614906, + 0.06659609824419022, + 0.03327147290110588, + 0.02593686804175377, + 0.007872743532061577, + 0.01820364221930504, + -0.01844281330704689, + 0.010869036428630352, + -0.03906475007534027, + -0.0239703431725502, + 0.03173014521598816, + -0.017725298181176186, + 0.0039396933279931545, + 0.0019349674694240093, + -0.014589488506317139, + -0.02785024419426918, + -0.005494310986250639, + 0.04799383506178856, + -0.011094920337200165, + 0.06462957710027695, + 0.030773457139730453, + -0.008105271495878696, + -0.014735649339854717, + -0.05585993453860283, + 0.027172589674592018, + -0.0020313006825745106, + 0.0013719168491661549, + -0.008311225101351738, + 0.03417501226067543, + 0.05793276056647301, + 0.057720161974430084, + -0.034493908286094666, + 0.02888665534555912, + -0.05019953474402428, + -0.017592424526810646, + -0.05349479243159294, + -0.032181914895772934, + 0.019798122346401215, + -0.01067637000232935, + 0.002918229904025793, + -0.02624247781932354, + 0.03361694514751434, + -0.027823669835925102, + -0.018761709332466125, + -0.016688887029886246, + 0.00925462506711483, + -0.053813688457012177, + 0.005351472180336714, + -0.02038276381790638, + 0.02747819945216179, + 0.03454705700278282, + -0.022880783304572105, + 0.018469389528036118, + -0.020236603915691376, + -0.030002791434526443, + 3.122003545286134e-05, + -0.03970254212617874, + 0.006314803846180439, + -0.032580532133579254, + 0.03930392116308212, + 0.004241980146616697, + 0.041323598474264145, + 0.022336002439260483, + 0.042227134108543396, + -0.026295626536011696, + -0.002453173277899623, + 0.029072677716612816, + 0.023040231317281723, + -0.01850925013422966, + 0.03717795014381409, + -0.02787681855261326, + -0.004617347382009029, + 0.05232550576329231, + -0.026029879227280617, + 0.014350316487252712, + 0.00035896553890779614, + -0.022149980068206787, + -0.029364999383687973, + 0.013978270813822746, + -0.004165578167885542, + -0.00982598029077053, + -0.02674739621579647, + 0.0057002645917236805, + 0.04387476295232773, + 0.04193481430411339, + -0.018363090232014656, + -0.026933418586850166, + -0.04666510224342346, + -0.03470650687813759, + -0.02939157374203205, + 7.619453390361741e-05, + -0.019426075741648674, + 0.031278375536203384, + 0.005391334183514118, + 0.00037225286359898746, + -0.020940832793712616, + 0.05413258448243141, + 0.025990016758441925, + -0.03042798675596714, + 0.005869678221642971, + 0.0330057293176651, + 0.0197848342359066, + 0.041217297315597534, + -0.012981721200048923, + -0.02551167458295822, + 0.008118558675050735, + 0.08285979181528091, + -0.007633571047335863, + 0.00349788973107934, + 0.05543474107980728, + -0.020303040742874146, + 0.0033733209129422903, + -0.01031096838414669, + -0.001871852669864893, + -0.026959992945194244, + 0.031544122844934464, + 0.01516084372997284, + 0.007480766624212265, + -0.017512701451778412, + -0.009015453048050404, + -0.03677932918071747, + -0.004039348568767309, + 0.008895867504179478, + -0.003634084714576602, + 0.03853325545787811, + -0.026269052177667618, + 0.005813207011669874, + 0.02419622801244259, + 0.01680847257375717, + 0.0034945677034556866, + 0.015904933214187622, + -0.02657466009259224, + -0.007826237007975578, + -0.013765674084424973, + 0.004022739361971617, + -0.034998826682567596, + 0.014868522062897682, + -0.00845074187964201, + 0.03260710835456848, + -0.025697696954011917, + -0.027292175218462944, + 0.045176923274993896, + 0.03646043315529823, + 0.02456827275454998, + -0.008404236286878586, + -0.014363603666424751, + 0.01619725488126278, + -0.007633571047335863, + -0.01914704218506813, + -0.06346029043197632, + 0.03377639129757881, + 0.039011601358652115, + 0.01720709167420864, + -0.0024199550971388817, + 0.001510603353381157, + 0.03082660585641861, + 0.006032447796314955, + -0.039383646100759506, + 0.03170356899499893, + 0.029099252074956894, + -0.025923581793904305, + -0.052298929542303085, + -0.008822787553071976, + 0.04142989590764046, + 0.040552932769060135, + -0.011001909151673317, + 0.053813688457012177, + -0.014350316487252712, + 0.009188189171254635, + -0.02333255112171173, + 0.035397447645664215, + 0.013280685991048813, + 0.009952209889888763, + 0.009560233913362026, + -0.016383277252316475, + -0.018084056675434113, + 0.008889223448932171, + -0.022654898464679718, + 0.022375863045454025, + 0.01553288847208023, + -0.04047320783138275, + -0.008012260310351849, + 0.015307004563510418, + 0.024076642468571663, + 0.018349802121520042, + -0.0006049887742847204, + -0.048551905900239944, + 0.023691309615969658, + -0.06946615874767303, + 0.007839525118470192, + -0.0008586937328800559, + -0.02657466009259224, + 0.004255267325788736, + -0.02591029368340969, + -0.02888665534555912, + -0.002586046699434519, + -0.024315813556313515, + -0.028089415282011032, + -0.011526758782565594, + -0.010862392373383045, + -0.010237887501716614, + -0.03648700937628746, + -0.0197848342359066, + -0.02095411904156208, + 0.01626369170844555, + -0.011553333140909672, + 0.01690148375928402, + 0.011048414744436741, + 0.005374724976718426, + 0.037098225206136703, + -0.006401171442121267, + -0.006630377843976021, + 0.030720306560397148, + -0.010071796365082264, + 0.07573778182268143, + 0.005364759359508753, + -0.015333578921854496, + -0.024953605607151985, + -0.03497225418686867, + 0.0007922570803202689, + 0.008271362632513046, + -0.042758628726005554, + -0.04849875345826149, + 0.0031391317024827003, + 0.02222970314323902, + -0.05607253313064575, + -0.05633828043937683, + 0.03600866347551346, + -0.03515827655792236, + 0.002918229904025793, + -0.003946336917579174, + -0.05136881768703461, + 0.06122801825404167, + -0.032819706946611404, + 0.009659889154136181, + 0.007035641465336084, + -0.020396051928400993, + 0.0029663965106010437, + 0.004972783382982016, + -0.006942629814147949, + 0.006002551410347223, + -0.0006178608746267855, + 0.015400015749037266, + -0.006590515840798616, + 0.003210551105439663, + 0.005431196186691523, + 0.031172076240181923, + -0.013293974101543427, + 0.009546946734189987, + 0.02300036884844303, + -0.010908897966146469, + 0.022003818303346634, + 0.009533659555017948, + -0.03329804912209511, + 0.01334047969430685, + -0.02436896413564682, + 0.01720709167420864, + -0.015506314113736153, + -0.027797095477581024, + 0.011885516345500946, + -0.04073895514011383, + 0.023372413590550423, + -0.0076734330505132675, + 0.024408824741840363, + 0.028195714578032494, + -0.036300987005233765, + 0.018522538244724274, + 0.004733611363917589, + -0.05532844364643097, + -0.059155192226171494, + 0.014004846103489399, + -0.01074280682951212, + 0.001003193436190486, + -0.044432830065488815, + -0.006431067828088999, + 0.003800176316872239, + 0.04036691039800644, + 0.014988108538091183, + 0.036300987005233765, + 0.007334606256335974, + -0.059367790818214417, + -0.004736933391541243, + 0.0015404998557642102, + 0.0249668937176466, + -0.02212340384721756, + 0.0056404718197882175, + 0.03279313072562218, + 0.012782411649823189, + 0.007905961014330387, + -0.002375110285356641, + 0.0034380967263132334, + -0.03080003149807453, + -0.01176593080163002, + 0.04988063871860504, + 0.006600481458008289, + -0.0015878359554335475, + -0.011493540368974209, + -0.0026441786903887987, + 0.007148583419620991, + 0.024913743138313293, + 0.009148326702415943, + -0.032314788550138474, + -0.0008811160805635154, + -0.007195089478045702, + -0.038506682962179184, + 0.0194526519626379, + -0.04839245602488518, + -0.04371531680226326, + -0.0219240952283144, + -0.005872999783605337, + 0.0036241193301975727, + 0.009918991476297379, + 0.0012440262362360954, + -0.01270268764346838, + 0.010769381187856197, + 0.046505656093358994, + 0.003388269105926156, + 0.023252828046679497, + 0.030135665088891983, + -0.004962817765772343, + -0.005623862612992525, + 0.0018535825656726956, + -0.01387197244912386, + 0.005869678221642971, + -0.0065805502235889435, + 0.06005873158574104, + -0.004524335730820894, + 0.002207357669249177, + -0.007879386655986309, + 0.0300559401512146, + 0.01240372285246849, + 0.06160006299614906, + 0.005564069375395775, + 0.009334349073469639, + 0.020396051928400993, + -0.0011875551426783204, + 0.008138489909470081, + -0.0014250661479309201, + -0.0072017330676317215, + 0.021233152598142624, + 0.012848848477005959, + 0.007992329075932503, + -0.0065572974272072315, + 0.01561261247843504, + -0.030348261818289757, + 0.025192778557538986, + -0.007972397841513157, + -0.026215901598334312, + -0.009932279586791992, + -0.04616018384695053, + -0.014523051679134369, + 0.000685127975884825, + 0.008902511559426785, + 0.027371900156140327, + -0.027903392910957336, + 0.028594333678483963, + -0.031278375536203384, + -0.06149376556277275, + -0.021977243945002556, + 0.02051563747227192, + -0.00895566027611494, + -0.038373809307813644, + -0.04411393776535988, + 0.006118815392255783, + 0.006078953389078379, + -0.009580165147781372, + 0.032580532133579254, + -0.018216930329799652, + -0.04934914410114288, + -0.005118943750858307, + 0.005584000609815121, + 0.029364999383687973, + -0.011393885128200054, + 0.019532375037670135, + 0.00425194576382637, + -0.004793404135853052, + 0.0151475565508008, + -0.046505656093358994, + -0.015253854915499687, + 0.010470416396856308, + 0.011360667645931244, + 0.00823150109499693, + -0.026694245636463165, + -0.0067532854154706, + -0.006341378204524517, + -0.01031096838414669, + -0.0007910113781690598, + -0.03800176456570625, + 0.027637647464871407, + -0.0045608761720359325, + -0.01793789491057396, + 0.0024232768919318914, + -0.0377625934779644, + -0.012981721200048923, + 0.027159303426742554, + 0.004524335730820894, + -0.034493908286094666, + 0.005437839776277542, + 0.01066308282315731, + 0.004328347742557526, + -0.0028036267030984163, + -0.02664109691977501, + 0.011221149936318398, + -0.014469902031123638, + 0.017791735008358955, + -0.00020325463265180588, + -0.036965351551771164, + 0.00401609530672431, + -0.003363355528563261, + -0.017632286995649338, + -0.004766829777508974, + 0.06021818146109581, + -0.0058630346320569515, + -0.012011746875941753, + -0.00801890343427658, + 0.008025547489523888, + -0.003687234129756689, + -0.0372842475771904, + 0.027929967269301414, + 0.022269565612077713, + 0.001643476658500731, + 0.04273205250501633, + -0.02965732105076313, + -0.01516084372997284, + -0.01934635266661644, + 0.0384269580245018, + 0.04129702225327492, + -0.008364374749362469, + -0.007241595070809126, + 0.0072017330676317215, + -0.052272357046604156, + -0.01586507260799408, + 0.001112813944928348, + 0.04589443653821945, + 0.03765629231929779, + 0.010291037149727345, + 0.0014458276564255357, + -0.024315813556313515, + 0.011971884407103062, + -0.016688887029886246, + -0.03212876245379448, + 0.01797775737941265, + 0.004707036539912224, + -0.015134269371628761, + -0.013333835639059544, + 0.024342387914657593, + 0.05102334916591644, + -0.031012628227472305, + 0.024355676025152206, + 0.009965498000383377, + 0.002710615284740925, + -0.01723366789519787, + -0.043927911669015884, + 0.01199845876544714, + 0.005155484192073345, + -0.03279313072562218, + 0.03406871482729912, + -0.014855234883725643, + 0.01183236762881279, + -0.028275437653064728, + -0.015918221324682236, + 0.006437711417675018, + -0.027159303426742554, + -0.012901997193694115, + -0.012078182771801949, + 0.0005701095215044916, + -0.014483190141618252, + -0.025392087176442146, + 0.04538951814174652, + -0.004826622549444437, + 0.012244274839758873, + 0.03972911834716797, + 0.008477316237986088, + -0.026295626536011696, + 0.030614009127020836, + -0.0025478454772382975, + 0.01700778305530548, + -0.0054544489830732346, + -0.03781574219465256, + -0.016316842287778854, + -0.004687105771154165, + 0.05322904512286186, + -0.06765908747911453, + 0.004637278150767088, + 0.061334315687417984, + -0.033085450530052185, + 0.043901339173316956, + -0.028036266565322876, + 0.03983541578054428, + 0.003007919294759631, + 0.004122394137084484, + -0.03438761085271835, + -0.013885259628295898, + -0.018921157345175743, + 0.045708414167165756, + 0.04283835366368294, + 0.025259215384721756, + -0.0291524026542902, + 0.04616018384695053, + 0.014177581295371056, + -0.0497477650642395, + -0.0066038030199706554, + 0.01019138190895319, + -0.01817706786096096, + 0.020409338176250458, + -0.014390178956091404, + -0.014748936519026756, + 0.05522214248776436, + 0.02862090989947319, + 0.03303230181336403, + -0.06096227094531059, + 0.012828917242586613, + 0.023957056924700737, + -0.021060418337583542, + -0.008404236286878586, + -0.0017854849575087428, + 0.0016002928605303168, + -0.006258332636207342, + -0.05248495563864708, + -0.003879900323227048, + 0.009068602696061134, + -0.020037293434143066, + 0.020223315805196762, + -0.03388269245624542, + -0.009839268401265144, + -0.010423910804092884, + 0.012995008379220963, + -0.03935707360506058, + 0.005384690593928099, + 0.03263368457555771, + -0.0124834468588233, + -0.03303230181336403, + 0.0013885259395465255, + -0.030454561114311218, + -0.01927991583943367, + 0.012323998846113682, + 0.006288229022175074, + -0.047542065382003784, + 0.005158805754035711, + -0.013885259628295898, + -0.018854720517992973, + -0.024820731952786446, + -0.006896124221384525, + -0.001949915662407875, + -0.030374836176633835, + 0.050226107239723206, + 0.013028226792812347, + -0.04278520122170448, + -0.016051094979047775, + 0.0171672310680151, + 0.012436941266059875, + -0.001676694955676794, + -0.03789546713232994, + -0.002175800269469619, + 0.04334327206015587, + -0.025857144966721535, + 0.0024365640711039305, + -0.011692850850522518, + -0.00646096421405673, + -0.0005306627717800438, + 0.011945310048758984, + 0.039915140718221664, + 0.016928058117628098, + 0.004155612550675869, + 0.011991815641522408, + 0.042758628726005554, + -0.02912582829594612, + -0.017898034304380417, + -0.013765674084424973, + 0.060430776327848434, + 0.020701659843325615, + 0.005175414960831404, + -0.005258460994809866, + -0.009952209889888763, + 0.0013262416468933225, + 0.02507319115102291, + -0.018482675775885582, + 0.031278375536203384, + -0.006560619454830885, + -0.01897430792450905, + -0.006447677034884691, + -0.0033766427077353, + -0.0077199386432766914, + -0.016276979818940163, + 0.01380553562194109, + -0.023784320801496506, + 0.0014234052505344152, + -0.013400272466242313, + 0.023624872788786888, + -0.017831597477197647, + -0.010636507533490658, + 0.02064851112663746, + 0.002307012677192688, + -0.028062840923666954, + -0.008610189892351627, + 0.037842314690351486, + -0.01573219895362854, + -0.006982491817325354, + -0.03832066059112549, + 0.021180003881454468, + 0.025524960830807686, + -0.00035647416370920837, + 0.026083029806613922, + 0.031783293932676315, + -0.018495963886380196, + -0.0408984012901783, + -0.005975976586341858, + -0.009048671461641788, + 0.012629607692360878, + 0.010981977917253971, + -0.013533146120607853, + 0.005623862612992525, + 0.008464029058814049, + 0.059367790818214417, + -0.006660274229943752, + -0.04002143815159798, + -0.0007357859285548329, + -0.033590368926525116, + -0.015891646966338158, + 0.044539131224155426, + -0.011420460417866707, + 0.010968690738081932, + 0.0030029367189854383, + -0.016928058117628098, + 0.006078953389078379, + 0.009234694764018059, + -0.034254737198352814, + 0.046505656093358994, + -0.01300165243446827, + -0.013533146120607853, + 0.027770519256591797, + 0.022668184712529182, + 0.0003068542864639312, + -0.04150962084531784, + 0.052697550505399704, + -0.004218727350234985, + -0.019306490197777748, + -0.012164550833404064, + 0.004205440171062946, + -0.006437711417675018, + -0.026335489004850388, + -0.010237887501716614, + 0.0015787009615451097, + -0.004029382951557636, + -0.024661283940076828, + 0.04552239179611206, + -0.0413767471909523, + -0.017459550872445107, + -0.008457385934889317, + 0.014616062864661217, + -0.016755323857069016, + 0.031544122844934464, + -0.02212340384721756, + -0.00414232537150383, + -0.042864926159381866, + -0.0001296552800340578, + -0.0061487117782235146, + -0.036540158092975616, + 0.0035709699150174856, + -0.014775510877370834, + -0.0239703431725502, + -0.006869549863040447, + -0.009400785900652409, + -0.025219352915883064, + -0.01516084372997284, + 0.05442490428686142, + 0.010138233192265034, + -0.012330641970038414, + 0.011094920337200165, + -0.000808035780210048, + 0.015360153280198574, + 0.005221920553594828, + -0.0033052233047783375, + 0.03970254212617874, + 0.014031420461833477, + 0.03704507648944855, + 0.033085450530052185, + -0.021033843979239464, + -0.010098370723426342, + -0.003856647526845336, + 0.002610960276797414, + 0.003491245908662677, + 0.008118558675050735, + -0.015679050236940384, + -0.01694134622812271, + -0.03175671771168709, + -0.003233803901821375, + -0.02302694320678711, + 0.009746256284415722, + 0.010756094008684158, + -0.031012628227472305, + -0.02939157374203205, + -0.012443584389984608, + 0.01914704218506813, + 0.0150279700756073, + 0.00728810066357255, + -0.019638674333691597, + -0.0028667415026575327, + -0.03159727156162262, + -0.0025794028770178556, + -0.006630377843976021, + -0.0009492136305198073, + -0.01687490940093994, + 0.036540158092975616, + -0.012948502786457539, + 0.012516665272414684, + -0.008258075453341007, + -0.00781294982880354, + 0.024023493751883507, + 0.023345839232206345, + 0.018429527059197426, + -0.022840920835733414, + 0.01586507260799408, + 0.010702944360673428, + 0.04315724968910217, + 0.032686833292245865, + 0.0030942868907004595, + 0.038506682962179184, + 0.026760682463645935, + -0.03587578982114792, + 0.01650286465883255, + 0.018868008628487587, + 0.012031677179038525, + -0.03340434655547142, + 0.022987080737948418, + 0.003467993112280965, + 0.04448598250746727, + 0.015386728569865227, + -0.030906328931450844, + -0.017300104722380638, + 0.027690796181559563, + 0.02155204862356186, + -0.011407173238694668, + 0.030374836176633835, + 0.01868198625743389, + -0.010443841107189655, + -0.009932279586791992, + 0.005760057829320431, + 0.029710469767451286, + 0.06175950914621353, + 0.02024989016354084, + 0.028169140219688416, + 0.03175671771168709, + -0.004145646933466196, + -0.003567648120224476, + 0.00036623203777708113, + -0.019266627728939056, + -0.03276655450463295, + -0.033723242580890656, + -0.04002143815159798, + 0.03093290515244007, + -0.020063867792487144, + -0.013911834917962551, + 0.03550374507904053, + -0.006620412226766348, + 0.05017295852303505, + 0.0203561894595623, + 0.01619725488126278, + 0.005716873798519373, + -0.020435914397239685, + 0.012264206074178219, + 0.007547203451395035, + -0.0006934325210750103, + -0.03858640789985657, + 0.009135039523243904, + -0.013898547738790512, + 0.05429203063249588, + 0.015253854915499687, + 0.024820731952786446, + -0.03478623181581497, + -0.000708380772266537, + -0.009261269122362137, + -0.014390178956091404, + -0.017127368599176407, + 0.02694670483469963, + -0.0020744844805449247, + 0.02172478474676609, + 0.0037237743381410837, + -0.007939179427921772, + -0.013818823732435703, + -0.02480744570493698, + -0.0031391317024827003, + 0.006062344182282686, + -0.009998715482652187, + 0.026215901598334312, + 0.0028169138822704554, + -0.008244788274168968, + 0.024594847112894058, + 0.05102334916591644, + 0.014018133282661438, + 0.008782925084233284, + 0.0036938777193427086, + -0.04910997301340103, + -0.0038832221180200577, + 0.0069559174589812756, + -0.028036266565322876, + 0.011307517997920513, + -0.01890787109732628, + -0.001380221452564001, + 0.03188959136605263, + 0.021817795932292938, + -0.017725298181176186, + -0.0005900405230931938, + -0.0037736017256975174, + -0.009566877968609333, + 0.04166906699538231, + -0.023372413590550423, + -0.016051094979047775, + 0.002237254288047552, + -0.004069244954735041, + 0.004996036179363728, + 0.031916167587041855, + -0.022415725514292717, + -0.026906844228506088, + -0.005843103397637606, + 0.0038167855236679316, + 0.010423910804092884, + 0.02787681855261326, + -0.007839525118470192, + 0.041695643216371536, + -0.026388637721538544, + 0.018336515873670578, + 0.01019138190895319, + -0.0054411618039011955, + -0.005015966948121786, + 0.020369477570056915, + -0.004232014529407024, + -0.004736933391541243, + 0.011619769968092442, + 0.019027456641197205, + 0.026215901598334312, + -0.03715137392282486, + -0.013699237257242203, + -0.0007175158243626356, + -0.03754999488592148, + -0.012901997193694115, + 0.00048457231605425477, + -5.330502972356044e-05, + 0.012742549180984497, + -0.007381111849099398, + 0.01112813875079155, + 0.04002143815159798, + -0.045469243079423904, + 0.014536338858306408, + 0.004275198560208082, + -0.008072053082287312, + -0.008889223448932171, + -0.005720195826143026, + 0.03273998200893402, + 0.04379504173994064, + 0.000282563385553658, + 0.025245927274227142, + 0.01844281330704689, + -0.01312123890966177, + -0.004979426972568035, + -0.02102055586874485, + 0.0008258906309492886, + -0.013699237257242203, + 0.0027023106813430786, + 0.009434004314243793, + 0.03853325545787811, + 0.0050657945685088634, + -0.019465938210487366, + -0.014589488506317139, + 0.009460578672587872, + 0.013247468508780003, + -0.0028816896956413984, + -0.004574163351207972, + -0.020024007186293602, + -0.00902209710329771, + 0.023638160899281502, + -0.035769492387771606, + -0.0014400144573301077, + -0.02955102175474167, + -0.04722316935658455, + -0.0330057293176651, + -0.011586551554501057, + -0.02289406955242157, + -0.004730289336293936, + -0.011573264375329018, + 0.0022339322604238987, + 0.0348128043115139, + -0.0016750340582802892, + -0.008849361911416054, + -0.025458524003624916, + -0.04124387353658676, + 0.011307517997920513, + -0.0313846729695797, + -0.007547203451395035, + -0.015811922028660774, + -0.016024520620703697, + 0.005211955402046442, + -0.034493908286094666, + -0.02503333054482937, + 0.03196931630373001, + 0.021140141412615776, + -0.025830570608377457, + 0.0036075101234018803, + 0.008962304331362247, + 0.019200192764401436, + 0.00022546938271261752, + 0.015758773311972618, + -0.0026823796797543764, + -0.013553076423704624, + -0.013141169212758541, + -0.008749706670641899, + 0.026295626536011696, + 0.047382619231939316, + 0.005354794207960367, + -0.009447291493415833, + 0.001996421255171299, + -0.01793789491057396, + -0.04735604301095009, + -0.0001126308852690272, + -0.017260242253541946, + 0.014337029308080673, + -0.004813335370272398, + -0.009042028337717056, + 0.037868890911340714, + 0.012496734037995338, + 0.029072677716612816, + 0.027199164032936096, + 0.029099252074956894, + -0.001503129256889224, + 0.011280943639576435, + 0.003936371766030788, + 0.002072823466733098, + 0.009367567487061024, + 0.0006805604207329452, + -0.013559720478951931, + -0.006497504189610481, + 0.036035239696502686, + -0.02245558798313141, + 0.007945823483169079, + 0.002227288670837879, + 0.0135065708309412, + -0.014948246069252491, + -0.020223315805196762, + 0.04100470244884491, + -0.007959110662341118, + -0.04188166558742523, + -0.002526253694668412, + 0.02309338003396988, + 0.006414458621293306, + 0.020781384781003, + -0.013898547738790512, + -0.001065477728843689, + -0.013559720478951931, + -0.01562589965760708, + -0.00530496658757329, + -0.009121752344071865, + -0.019598811864852905, + -0.049986936151981354, + -0.0028385058976709843, + 0.036300987005233765, + -0.03494567796587944, + 0.005049185361713171, + 0.0017439620569348335, + 0.00858361553400755, + 0.015267142094671726, + 0.005896252579987049, + 0.01599794626235962, + 0.0233989879488945, + -0.023438850417733192, + -0.01211804524064064, + -0.026893556118011475, + -0.009859198704361916, + -0.017765160650014877, + -0.014988108538091183, + -0.00605902262032032, + -0.016024520620703697, + 0.024860594421625137, + 0.011945310048758984, + -0.011254368349909782, + -0.030241962522268295, + -0.03893187642097473, + 0.01797775737941265, + 0.015360153280198574, + -0.014815373346209526, + -0.009852555580437183, + 0.025285789743065834, + 0.003989520948380232, + 0.007387755438685417, + -0.028169140219688416, + 0.0323413610458374, + -0.016210542991757393, + 0.028328588232398033, + 0.003441418521106243, + 0.0024432078935205936, + -0.019904419779777527, + 0.02470114640891552, + -0.0032852923031896353, + -0.009865842759609222, + -0.026428500190377235, + -0.00020636884437408298, + -0.031172076240181923, + 0.008410880342125893, + 0.009872485883533955, + -0.00980604998767376, + -0.013413559645414352, + 0.03840038552880287, + -0.03507855162024498, + -0.021060418337583542, + 0.016077669337391853, + -0.01177921798080206, + 0.04243973270058632, + -0.02112685516476631, + 0.021299589425325394, + -0.013147813268005848, + 0.02664109691977501, + -0.01437689084559679, + -0.003969589713960886, + -0.05766701325774193, + -0.01676861010491848, + 0.006447677034884691, + 0.014722362160682678, + -0.016662312671542168, + -0.017446264624595642, + 0.020940832793712616, + -0.0012523308396339417, + 0.021605199202895164, + 0.032288212329149246, + 0.04525664448738098, + -0.006102206185460091, + -0.004630634561181068, + -0.02436896413564682, + 0.025857144966721535, + -0.008105271495878696, + -0.02688026800751686, + -0.00803219061344862, + -0.01241701003164053, + -0.015386728569865227, + 0.009068602696061134, + 0.018030906096100807, + 0.002104380866512656, + -0.015227280557155609, + 0.01054349634796381, + -0.02600330486893654, + -0.0033284761011600494, + 0.04291807487607002, + -0.029072677716612816, + 0.0177385862916708, + -0.013659375719726086, + 0.013400272466242313, + 0.006630377843976021, + 0.005092369392514229, + -0.002597673097625375, + 0.00448447372764349, + -0.03582264110445976, + 0.0006701797246932983, + 0.007268169429153204, + -0.034626781940460205, + 0.03999486193060875, + -0.019293203949928284, + 0.015718910843133926, + -0.03802833706140518, + 0.02031632699072361, + -0.04940229281783104, + 0.0065938374027609825, + -0.012011746875941753, + -0.009693107567727566, + 0.017193805426359177, + 0.010576714761555195, + 0.005132231395691633, + 0.025631260126829147, + -0.013513214886188507, + -0.03289942815899849, + -0.0001548804430058226, + 0.009686463512480259, + -0.027903392910957336, + 0.0016692208591848612, + 0.019253341481089592, + -0.015785347670316696, + -0.049588315188884735, + -0.02787681855261326, + 0.015466452576220036, + -0.010915542021393776, + -0.018602261319756508, + 0.03311202675104141, + -0.007268169429153204, + 0.005424552597105503, + -0.014855234883725643, + -0.021512188017368317, + -0.0017506057629361749, + 0.010603289119899273, + -0.01676861010491848, + 0.014297166839241982, + -0.00803219061344862, + -0.07164528220891953, + 0.009912348352372646, + 0.03196931630373001, + 0.024422112852334976, + -0.016954632475972176, + -0.004743576981127262, + -0.01161312684416771, + 0.013300617225468159, + 0.00896894745528698, + -0.008118558675050735, + 0.020502351224422455, + -0.028966380283236504, + -0.010716231539845467, + -0.0038267511408776045, + -0.02476758323609829, + -0.030614009127020836, + -0.026534797623753548, + -0.013672662898898125, + -0.009055315516889095, + -0.044432830065488815, + -0.006331412587314844, + 0.02175135910511017, + 0.012111401185393333, + -0.0008001464302651584, + 0.001358629553578794, + 0.017924608662724495, + -0.03800176456570625, + 0.02315981686115265, + 0.0030660515185445547, + 0.01561261247843504, + -0.001432540244422853, + 0.007241595070809126, + -0.034759655594825745, + -0.03518484905362129, + -0.02965732105076313, + 0.029444724321365356, + 0.04190823808312416, + -0.003517820732668042, + -0.03130494803190231, + -0.034600209444761276, + 0.02333255112171173, + 0.0022322714794427156, + 0.02745162323117256, + 0.011041771620512009, + -0.03353722020983696, + 0.005205311346799135, + 0.05046527832746506, + -0.011041771620512009, + 0.01991770789027214, + -0.011041771620512009, + 0.013526502065360546, + 0.03664645552635193, + -0.034600209444761276, + -0.016888195648789406, + -0.02333255112171173, + -0.04900367185473442, + 0.042997799813747406, + -0.01670217327773571, + 0.01516084372997284, + -0.013214250095188618, + -0.006623734254390001, + -0.008470673114061356, + 0.006348021794110537, + -0.03789546713232994, + -0.036965351551771164, + 0.021060418337583542, + -0.01606438122689724, + -0.03922419995069504, + 0.028328588232398033, + -0.002984666498377919, + 0.011148069985210896, + 0.057454414665699005, + -0.008623477071523666, + -8.641954627819359e-05, + 0.02044920064508915, + 0.015067832544445992, + -0.026959992945194244, + -0.009859198704361916, + 0.01727352850139141, + 0.03215533867478371, + -0.029046103358268738, + 0.0018735135672613978, + 0.002772069303318858, + -0.033058878034353256, + -0.024275952950119972, + 0.00448447372764349, + 0.005985942203551531, + 0.01351985801011324, + 0.005208633374422789, + -0.0028268794994801283, + -0.00015820226690266281, + 0.02406335435807705, + -0.004916312173008919, + 0.02436896413564682, + 0.02031632699072361, + 0.004803369753062725, + -0.007693364284932613, + 0.016011232510209084, + 0.011912091635167599, + -0.0197848342359066, + 0.010736162774264812, + -0.013659375719726086, + -0.0004687936161644757, + 0.01340691652148962, + -0.04036691039800644, + -0.023518573492765427, + 0.020289752632379532, + 0.022774484008550644, + -0.0019980822689831257, + -0.0004982748650945723, + 0.005623862612992525, + 0.027265600860118866, + -0.032314788550138474, + 0.001247348147444427, + -0.01176593080163002, + 0.018735134974122047, + 0.01696792058646679, + -0.00937421154230833, + -0.020502351224422455, + -0.016011232510209084, + -0.016183968633413315, + -0.05750756338238716, + 0.02637534961104393, + -0.028860080987215042, + -0.0001946386182680726, + 0.029444724321365356, + 0.006676883436739445, + 0.013739099726080894, + 0.0013511553406715393, + -0.0067798602394759655, + 0.0224954504519701, + -0.01767214946448803, + 0.019904419779777527, + 0.014270592480897903, + -0.012257562018930912, + -0.019465938210487366, + -0.0013254111399874091, + -0.0027920003049075603, + -0.010370761156082153, + -0.012031677179038525, + -0.011553333140909672, + 0.01501468289643526, + 0.01444332767277956, + -0.012217700481414795, + -0.007427617441862822, + -0.03337777405977249, + -0.03685905411839485, + -0.028328588232398033, + 0.0036041883286088705, + -0.01283556129783392, + 0.021366026252508163, + -0.06882836669683456, + -0.011393885128200054, + 0.0015811922494322062, + 0.003019545692950487, + 0.02864748425781727, + 0.001838634256273508, + -0.003677268512547016, + 0.016529439017176628, + -0.02242901362478733, + 0.02912582829594612, + -0.0006980000762268901, + -0.004966139793395996, + -0.010045222006738186, + 0.02406335435807705, + -0.011872229166328907, + 0.02798311784863472, + -0.015240567736327648, + -0.009706394746899605, + -0.0007619453244842589, + -0.014762223698198795, + 0.008982235565781593, + 0.03518484905362129, + ], + "index": 76, + }, + { + "title": "Multnomah people", + "text": "The Multnomah were a tribe of Chinookan people who lived in the area of Portland, Oregon, in the United States through the early 19th century. Multnomah villages were located throughout the Portland basin and on both sides of the Columbia River. The Multnomah spoke a dialect of the Upper Chinookan language in the Oregon Penutian family.", + "vector": [ + 0.006801684387028217, + 0.03566597402095795, + -0.02064003236591816, + -0.024768037721514702, + 0.001402728259563446, + -0.006719124037772417, + -0.05415944382548332, + -0.035157911479473114, + -0.06818196177482605, + 0.006249166559427977, + -0.04084821045398712, + 0.021059183403849602, + -0.02380272001028061, + -0.009862760081887245, + 0.012002971954643726, + -0.03627564758062363, + -0.0471227802336216, + 0.04023853689432144, + 0.040772002190351486, + 0.03498008847236633, + -0.0061539048328995705, + -0.01083442848175764, + 0.0015734054613858461, + 0.005842716433107853, + 0.061018284410238266, + 0.00843383464962244, + -0.0022624649573117495, + -0.02572065405547619, + 0.018366452306509018, + -0.0035088052973151207, + 0.007811457850039005, + -0.03492928296327591, + 0.026063596829771996, + 0.011958517134189606, + -0.004286775831133127, + 0.012606295756995678, + 0.02565714716911316, + 0.010961444117128849, + 0.0018242612713947892, + 0.017007386311888695, + -0.02124970592558384, + 0.02735915593802929, + -0.0007688411860726774, + 0.025911178439855576, + -0.02459021657705307, + -0.01876020058989525, + 0.02340897172689438, + 0.02097027190029621, + 0.007106521632522345, + -0.005779208615422249, + 0.057614266872406006, + -0.01869669370353222, + 0.0004640037950593978, + -0.05507395416498184, + -0.009043509140610695, + 0.02672407776117325, + 0.02611440233886242, + 0.05253364145755768, + 0.006763579323887825, + -0.020170073956251144, + -0.026393836364150047, + -0.03015349805355072, + 0.024183766916394234, + -0.01957309991121292, + 0.01996684819459915, + 0.018125122413039207, + 0.0003234928008168936, + 0.027181332930922508, + 0.00392795680090785, + -0.01972552016377449, + 0.0032515989150851965, + 0.04468408226966858, + -0.005985609255731106, + -0.022748490795493126, + 0.0005668069934472442, + -0.01083442848175764, + -0.04371876269578934, + 0.002386305248364806, + -0.027003511786460876, + 0.006446040701121092, + 0.0028499120380729437, + -0.0027054317761212587, + 0.03343050181865692, + -0.005591860972344875, + 0.035488151013851166, + -0.04056877642869949, + -0.016346905380487442, + -0.020068461075425148, + -0.053549766540527344, + -0.049561478197574615, + 0.0030007429886609316, + -0.005458494648337364, + -0.05314331874251366, + 0.0035215069074183702, + -0.009659534320235252, + -0.024272676557302475, + 0.045979637652635574, + 0.011120214127004147, + -0.012002971954643726, + 0.01436546165496111, + -0.045547787100076675, + 0.004280425142496824, + 0.017223311588168144, + 0.011583820916712284, + 0.06355859339237213, + -0.003061075462028384, + 0.011056706309318542, + 0.01353986095637083, + -0.015267272479832172, + 0.03340509533882141, + 0.01376848854124546, + 0.018366452306509018, + 0.011221826076507568, + -0.01094239205121994, + 0.03500549495220184, + 0.040772002190351486, + -0.06574326008558273, + -0.01872209645807743, + -0.04094982147216797, + -0.020373297855257988, + -0.02088136039674282, + -0.027181332930922508, + -0.06731825321912766, + -0.026216015219688416, + -0.016359606757760048, + -0.08408430963754654, + 0.0011058293748646975, + 0.06630213558673859, + 0.003699328750371933, + 0.044480856508016586, + -0.007055715192109346, + -0.04115304723381996, + -0.05067921429872513, + -0.007373254280537367, + -0.022418249398469925, + -0.021935589611530304, + 0.050653811544179916, + -0.009767497889697552, + 0.010821727104485035, + -0.012441175989806652, + -0.0011486971052363515, + 0.041813530027866364, + -0.031042607501149178, + -0.004496351350098848, + -0.022291233763098717, + -0.07219565659761429, + 0.0017051841132342815, + 0.048164308071136475, + 0.0033817896619439125, + 0.00047511764569208026, + 0.026343030855059624, + 0.007201783359050751, + 0.017896495759487152, + 0.007487568538635969, + -0.050044137984514236, + 0.01957309991121292, + 0.002560951514169574, + 0.019674712792038918, + -0.01644851826131344, + -0.016816861927509308, + -0.014581388793885708, + 0.04003531113266945, + 0.047580037266016006, + 0.004502702038735151, + 0.03292243927717209, + -0.05990054830908775, + 0.0222531296312809, + -0.03614863380789757, + 0.024514006450772285, + 0.02437428943812847, + -0.026774883270263672, + 0.08789478242397308, + -0.014670299366116524, + -0.06777551025152206, + -0.018556976690888405, + 0.04006071388721466, + 0.00024331422173418105, + 0.005702999420464039, + 0.033963967114686966, + 0.039349425584077835, + -0.009081614203751087, + -0.018036212772130966, + 0.006366655696183443, + 0.00835762545466423, + 0.024869650602340698, + -0.01475920993834734, + -0.005267971195280552, + 0.07321178168058395, + -0.023294657468795776, + -0.012301458977162838, + 0.00041954833432100713, + 6.301163375610486e-05, + 0.052940092980861664, + 0.017642464488744736, + 0.050653811544179916, + 0.035767585039138794, + 0.019890639930963516, + 0.04067038744688034, + -0.006033239886164665, + -0.011069407686591148, + 0.015279973857104778, + -0.002189431106671691, + -0.021770469844341278, + 0.0077733532525599, + 0.020932167768478394, + 0.02939140424132347, + -0.011075758375227451, + -0.01902693323791027, + 0.008021033369004726, + -0.004858345724642277, + 0.07204323261976242, + -0.057614266872406006, + -0.015305377542972565, + 0.010167596861720085, + -0.01353986095637083, + 0.013247724622488022, + 0.02561904303729534, + 0.04112764447927475, + -0.007684442680329084, + 0.00437568686902523, + 0.03589460253715515, + 0.024488603696227074, + -0.030077289789915085, + -0.006985856685787439, + -0.03988289088010788, + 0.03312566131353378, + -0.07006179541349411, + 0.023421673104166985, + -0.010961444117128849, + 0.027765605598688126, + 0.006055467762053013, + 0.009856408461928368, + 0.004245495889335871, + 0.01848076656460762, + 0.011653679423034191, + 0.03879055753350258, + 0.014238446019589901, + 0.02221502549946308, + 0.015292675234377384, + 0.045065127313137054, + -0.03277001902461052, + 0.04453166201710701, + -0.018048914149403572, + -0.012803169898688793, + 0.05179695412516594, + -0.02197369560599327, + -0.007506620604544878, + -0.06264408677816391, + -0.00963413156569004, + -0.038434915244579315, + 0.026952706277370453, + 0.0062999725341796875, + 0.04303287714719772, + 0.01240307092666626, + -0.04349013417959213, + 0.0270543172955513, + -0.04039095342159271, + -5.442816109280102e-05, + -0.004121655598282814, + -0.020474910736083984, + -0.03823168948292732, + 0.029747048392891884, + -0.01125993113964796, + 0.03523411974310875, + 0.002821333473548293, + -0.012339563108980656, + -0.03683451935648918, + 0.0003260727971792221, + 0.0003875959664583206, + 0.008109944872558117, + 0.023815421387553215, + -0.012377668172121048, + -0.0471227802336216, + 0.051390502601861954, + -0.0017972703790292144, + 0.011044004932045937, + 0.05609007924795151, + -0.007055715192109346, + -0.003126170951873064, + -0.057614266872406006, + 0.02559363842010498, + -0.04463327303528786, + -0.06051022186875343, + -0.11939464509487152, + 0.003330983454361558, + 0.009938969276845455, + -0.00931659247726202, + -0.025453921407461166, + -0.008776776492595673, + -0.033608321100473404, + -0.009945319965481758, + -0.025149084627628326, + -0.0034071928821504116, + 0.003581839380785823, + 0.009024457074701786, + 0.004242320545017719, + 0.03619943931698799, + 0.029416808858513832, + 0.006138027645647526, + 0.01981442980468273, + -0.008865687064826488, + 0.00487104756757617, + 0.018188631162047386, + -0.014225744642317295, + 0.030966397374868393, + -0.0035088052973151207, + 0.02936600148677826, + -0.0017147102626040578, + -0.0053346543572843075, + -0.014162236824631691, + -0.03914619982242584, + -0.04689415171742439, + -0.008281415328383446, + 0.015826141461730003, + -0.005302900448441505, + -0.0008906967705115676, + 0.03373533859848976, + 0.01249198243021965, + 0.00570617476478219, + 0.023320060223340988, + -0.004502702038735151, + -0.0007311334484256804, + -0.01406062487512827, + 0.02452670782804489, + -0.028095845133066177, + 0.005283847916871309, + -0.057817492634058, + -0.02133861742913723, + -0.026470046490430832, + -0.012834924273192883, + -0.023231148719787598, + -0.014594090171158314, + -0.00746216531842947, + -0.020208178088068962, + -0.013196918182075024, + 0.040594179183244705, + -0.0011232940014451742, + -0.003826344385743141, + 0.009183226153254509, + 0.10379713028669357, + 0.0027403610292822123, + -0.03398936986923218, + 0.05939248576760292, + 0.036123231053352356, + 0.02827366814017296, + 0.022659579291939735, + -0.02097027190029621, + 0.018048914149403572, + -0.016981983557343483, + 0.05507395416498184, + 0.00042272370774298906, + 0.06330456584692001, + -0.005210814066231251, + 0.04595423489809036, + 0.03782523795962334, + -0.003100767731666565, + -0.016893072053790092, + 0.015508602373301983, + -0.010993198491632938, + 0.022240428254008293, + -0.053244929760694504, + -0.0035024546086788177, + -0.036123231053352356, + 0.006341252941638231, + -0.023091431707143784, + -0.016524726524949074, + -0.012060129083693027, + 0.004280425142496824, + 0.01656283065676689, + -0.020830554887652397, + 0.03945104032754898, + -0.005661719478666782, + -0.0011074170470237732, + -0.019979549571871758, + -0.01656283065676689, + -0.016219889745116234, + 0.03386235237121582, + -0.0338115468621254, + 0.01015489548444748, + -0.041356272995471954, + -0.002440286800265312, + 0.0949060395359993, + 0.034573640674352646, + 0.005906224250793457, + -0.006055467762053013, + -0.03414178639650345, + 0.013641472905874252, + 0.008598954416811466, + -0.03012809529900551, + -0.027003511786460876, + 0.04201675206422806, + 0.018518870696425438, + 0.04049256816506386, + 0.04026393964886665, + 0.040594179183244705, + 0.053600575774908066, + -0.12244302034378052, + 0.010720115154981613, + -0.0015599100152030587, + 0.012079181149601936, + 0.04745301976799965, + -0.05863039195537567, + -0.011869605630636215, + 0.009856408461928368, + 0.04780866205692291, + -0.042931266129016876, + -0.04803729057312012, + -0.027155930176377296, + -0.02288820780813694, + 0.0032309587113559246, + -0.05375299230217934, + 0.03955265134572983, + -0.054057829082012177, + -0.0012296695495024323, + 0.007316097151488066, + -0.05659814178943634, + -0.044125210493803024, + 0.032084133476018906, + 0.009024457074701786, + -0.0017210610676556826, + 0.004607490263879299, + -0.017820285633206367, + -0.000910542905330658, + -0.015114854089915752, + -0.010110439732670784, + 0.03464984893798828, + 0.008243311196565628, + 0.0014956084778532386, + -0.0052584451623260975, + 0.03376074135303497, + 0.044125210493803024, + -0.010561345145106316, + 0.03172849118709564, + 0.024780739098787308, + 0.04026393964886665, + -0.0696045383810997, + -0.03221115097403526, + 0.003661224152892828, + 0.008490991778671741, + 0.04425222799181938, + 0.026012791320681572, + -0.011113863438367844, + -0.010815376415848732, + -0.026343030855059624, + -0.05314331874251366, + -0.0015829316107556224, + -0.012980991974473, + -0.03967966511845589, + -0.01935717463493347, + 0.033913157880306244, + 0.023116834461688995, + -0.03558976575732231, + -0.004518579225987196, + -0.030712366104125977, + 0.002807044191285968, + -0.017337625846266747, + 0.04277884587645531, + -0.0056871226988732815, + 0.05903683975338936, + -0.0011359956115484238, + -0.01590234972536564, + -0.02024628408253193, + -0.0070430138148367405, + -0.025453921407461166, + -0.04394739121198654, + -0.06396504491567612, + -0.0005914162611588836, + -0.0032404849771410227, + -0.023332761600613594, + -0.06117070093750954, + 0.03627564758062363, + 0.02185938134789467, + 0.0036707501858472824, + -0.020678136497735977, + -0.02951841987669468, + 6.717933138133958e-05, + 0.01531807892024517, + -0.03914619982242584, + -0.01714710332453251, + -0.0023513759952038527, + -0.015368885360658169, + 0.01531807892024517, + -0.04867237061262131, + 0.004042270593345165, + -0.010643905028700829, + 0.006769930478185415, + -0.08098513633012772, + 0.021681558340787888, + 0.0054489681497216225, + -0.011247229762375355, + 0.04618286341428757, + 0.0392732173204422, + -0.010764569975435734, + 0.004966309294104576, + -0.012237951159477234, + 0.06081505864858627, + -0.02873092330992222, + -0.040136922150850296, + 0.00948171317577362, + -0.05113647133111954, + 0.009958021342754364, + 0.03561516851186752, + 0.09023186564445496, + -0.03668209910392761, + -0.005131429526954889, + 0.007360552903264761, + -0.01217444334179163, + -0.0062999725341796875, + -0.004563034512102604, + -0.009646832942962646, + 0.014251148328185081, + 0.010878884233534336, + 0.016334204003214836, + -0.022621475160121918, + -0.014301953837275505, + 0.01144410390406847, + 0.031169623136520386, + 0.0040930770337581635, + 0.005991959944367409, + 0.008973650634288788, + 0.01747734285891056, + -0.002313271164894104, + -0.012987342663109303, + -0.023358164355158806, + -0.027181332930922508, + 0.010916989296674728, + -0.009183226153254509, + 0.02142752893269062, + 0.03203332796692848, + -0.03691072762012482, + -0.04310908913612366, + 0.02768939547240734, + -0.015140256844460964, + 0.02391703426837921, + 0.044734887778759, + -0.03929862007498741, + -0.014428969472646713, + 0.003658048575744033, + -0.027486171573400497, + -0.0029864537063986063, + 0.020474910736083984, + -0.005071097053587437, + -0.033303484320640564, + -0.0035564361605793238, + 0.0028943675570189953, + 0.0381808839738369, + 0.018772901967167854, + -0.014301953837275505, + 0.02118619903922081, + -0.009043509140610695, + -0.03777443245053291, + 0.03061075508594513, + -0.03619943931698799, + 0.002992804627865553, + -0.018404556438326836, + -0.03028051368892193, + -0.014898926950991154, + 0.014035221189260483, + 0.00978654995560646, + 0.012504683807492256, + 0.058223940432071686, + 8.623166650068015e-05, + 0.022837400436401367, + -0.006700071971863508, + -0.042448606342077255, + -0.007894018664956093, + 0.006903296802192926, + -0.009684938006103039, + -0.00012771019828505814, + 0.02218962088227272, + 0.005785559769719839, + -0.023777315393090248, + -0.0040486217476427555, + 0.02480614185333252, + 0.008897441439330578, + 0.021173497661948204, + 0.006401584949344397, + -0.012072830460965633, + -0.005544229876250029, + -0.05349896103143692, + 0.006350778974592686, + 0.02136402018368244, + 0.01141234952956438, + 0.013946310617029667, + -0.007906720042228699, + 0.01924286037683487, + -0.00819250475615263, + 0.026165209710597992, + 0.0025879424065351486, + -0.022392846643924713, + 0.0044391946867108345, + -0.009119718335568905, + 0.0028880166355520487, + 0.0058331904001533985, + -0.0026943180710077286, + 0.0014979899860918522, + -0.031195025891065598, + 0.0035596115048974752, + -0.021059183403849602, + -0.013730384409427643, + 0.06198360398411751, + -0.01483541913330555, + 0.0069604539312422276, + -0.02583496831357479, + 0.0621868260204792, + 0.03871434926986694, + -0.03619943931698799, + 0.017337625846266747, + -0.013006395660340786, + -0.003489752998575568, + -0.017832987010478973, + -0.010459733195602894, + 0.025403115898370743, + 0.023637598380446434, + 0.001959215383976698, + 0.01647392101585865, + -0.02009386382997036, + 0.028705520555377007, + 0.006004661321640015, + -0.0037977658212184906, + 0.021999098360538483, + -0.00892284419387579, + 0.01902693323791027, + -0.03459904342889786, + -0.007652688771486282, + -0.031017204746603966, + 0.014962434768676758, + -0.014898926950991154, + 0.0077543011866509914, + 0.018582379445433617, + -0.07224646210670471, + 0.003753310302272439, + 0.0142892524600029, + -0.01860778219997883, + 0.03492928296327591, + -0.016512025147676468, + -0.03721556439995766, + -0.03218574821949005, + 0.0005223515909165144, + -0.02240554802119732, + -0.048494547605514526, + -0.04577641561627388, + 0.021287810057401657, + -0.0262922253459692, + 0.014695702120661736, + -0.008427483960986137, + -0.02450130507349968, + 0.010910638608038425, + 0.029340598732233047, + -0.022075306624174118, + -0.008033735677599907, + -0.016461219638586044, + -0.027892621234059334, + -0.014797315001487732, + -0.006909647490829229, + -0.003854922717437148, + -0.0023815419990569353, + -0.047681648284196854, + 0.0069985585287213326, + -0.007443112786859274, + -0.006947752088308334, + -0.01830294542014599, + 0.013501755893230438, + -0.010599450208246708, + 0.015699125826358795, + -0.024463200941681862, + 0.01924286037683487, + -0.05893522873520851, + 0.01007868628948927, + 0.033481307327747345, + 0.03442122042179108, + -0.020944869145751, + -0.032058730721473694, + -0.01760435849428177, + -0.005306075792759657, + 0.019928744062781334, + 0.01176164299249649, + -0.0053727589547634125, + -0.025365011766552925, + -0.02386622689664364, + 0.007309746462851763, + -0.026012791320681572, + 0.02185938134789467, + -0.004420142155140638, + -0.062390051782131195, + 0.006242815870791674, + 0.003365912940353155, + -0.05243203043937683, + -0.008427483960986137, + 0.009672236628830433, + 0.021478334441781044, + 0.020843256264925003, + 0.0004624160937964916, + -0.016397710889577866, + -0.0016242116689682007, + 0.02644464373588562, + -0.0001935002946993336, + -0.0020703538320958614, + 0.018125122413039207, + -0.03256679326295853, + -0.0005548993358388543, + 0.030966397374868393, + 0.0035024546086788177, + -0.01021205261349678, + -0.018290244042873383, + 0.035030897706747055, + -0.013565263710916042, + -0.010427978821098804, + -0.0033055804669857025, + 0.015597512945532799, + -0.0022307110484689474, + -0.003419894492253661, + -0.004813890438526869, + 0.021046482026576996, + -0.03236357122659683, + -0.06335537135601044, + 0.02751157432794571, + -0.007982929237186909, + 0.010961444117128849, + 0.009678587317466736, + 0.023942437022924423, + 0.026216015219688416, + -0.00939280167222023, + 0.01159652229398489, + -0.022075306624174118, + 0.05184775963425636, + 0.010656607337296009, + -0.021999098360538483, + -0.004426492843776941, + -0.0021973694674670696, + -0.024399692192673683, + -0.0104724345728755, + 0.0035754884593188763, + 0.0030547247733920813, + -0.0030182076152414083, + 0.029493017122149467, + 0.018074316903948784, + 0.021910186856985092, + 0.015051346272230148, + -0.000414785259636119, + 0.007163678761571646, + -0.00413435697555542, + 0.05283848196268082, + -0.028908746317029, + -0.004023218527436256, + -0.022900909185409546, + -0.009945319965481758, + -0.005283847916871309, + -0.009773848578333855, + -0.01062485296279192, + -0.0006346809677779675, + -0.04564939811825752, + 0.0009740507230162621, + -0.05786829814314842, + 0.0034802269656211138, + 0.009049859829246998, + -0.014225744642317295, + -0.041356272995471954, + 0.010224753990769386, + -0.00673182588070631, + -0.027867218479514122, + -0.015851544216275215, + -0.0008303643553517759, + -0.023396270349621773, + -0.015826141461730003, + -0.014873524196445942, + -0.004858345724642277, + -0.015762632712721825, + -0.008427483960986137, + 0.002761001233011484, + -0.03200792521238327, + 0.00388667662627995, + 0.02166885696351528, + -0.008656111545860767, + 0.028857938945293427, + 0.027765605598688126, + -0.030813978984951973, + 0.005645842291414738, + -0.013247724622488022, + 0.0012717434437945485, + -0.03190631419420242, + 0.0562933050096035, + 0.042118366807699203, + 0.012180794030427933, + -0.027105124667286873, + -0.0002079880068777129, + 0.009253084659576416, + 0.013819294981658459, + -0.015978559851646423, + -0.009068911895155907, + -0.011723537929356098, + -0.004826591815799475, + -0.0012987343361601233, + -0.0012606296222656965, + -0.004204215481877327, + -0.023447075858712196, + 0.0741771012544632, + 0.045522384345531464, + 0.003626294666901231, + -0.004512228537350893, + 0.057309430092573166, + -0.005179060157388449, + 0.001617067027837038, + 0.005252094008028507, + -0.04130546748638153, + 0.006252341903746128, + -0.023624897003173828, + -0.027740202844142914, + -0.02613980695605278, + 0.013476353138685226, + 0.009214980527758598, + -0.003997815307229757, + 0.01869669370353222, + -0.016613638028502464, + -0.0198525357991457, + -0.04331231117248535, + 0.023383567109704018, + 0.03444662317633629, + 0.006271393969655037, + -0.03383694961667061, + 0.011215475387871265, + -0.0006632594740949571, + 0.04224538058042526, + -0.0038199934642761946, + 0.029188180342316628, + 0.013209620490670204, + -0.004832942970097065, + -0.01653742790222168, + -0.024882351979613304, + 0.03498008847236633, + -0.00971034076064825, + 0.0013908206019550562, + -0.025022068992257118, + -0.010796324349939823, + -0.03985748812556267, + 0.02954382263123989, + -0.015597512945532799, + -0.022176919505000114, + 0.0011606048792600632, + 0.009703990072011948, + -0.015572110190987587, + -0.03172849118709564, + 0.06315214931964874, + -0.013438248075544834, + 0.001332869753241539, + 0.033481307327747345, + 0.012460228055715561, + -0.040721192955970764, + 0.020500313490629196, + 0.0011868018191307783, + -0.003365912940353155, + -0.015368885360658169, + 0.015025942586362362, + 0.025174487382173538, + 0.03264300525188446, + -0.043515536934137344, + -0.016054769977927208, + 0.03523411974310875, + 0.010389874689280987, + 0.016651742160320282, + 0.024768037721514702, + -0.013819294981658459, + -0.02271038480103016, + 0.0018274366157129407, + -0.0010073923040181398, + 0.028476892039179802, + 0.033328887075185776, + -0.03492928296327591, + -0.03584379702806473, + -0.011304386891424656, + 0.004670998081564903, + -0.020944869145751, + -0.006674668751657009, + 0.011234527453780174, + 0.0058776456862688065, + -0.005702999420464039, + -0.047681648284196854, + 0.028502296656370163, + -0.004807539749890566, + 0.032058730721473694, + -0.007735248655080795, + -0.03569137677550316, + -0.008338572457432747, + -0.023002522066235542, + 0.05227961391210556, + 0.023612195625901222, + 0.023180343210697174, + -0.00281498278491199, + 0.0246537234634161, + -0.02480614185333252, + -0.02611440233886242, + -0.019433382898569107, + 0.017121700569987297, + 0.0016353256069123745, + -0.016727952286601067, + 0.044125210493803024, + -0.027918023988604546, + -0.009265786036849022, + 0.028832536190748215, + -0.03604702278971672, + 0.007322448305785656, + -0.04133087024092674, + -0.018214033916592598, + -0.00604276591911912, + 0.024755336344242096, + 0.03048373945057392, + 0.05339735001325607, + -0.012041077017784119, + -0.014111430384218693, + -0.02875632606446743, + -0.009430906735360622, + 0.02066543512046337, + 0.009843707084655762, + -0.048621565103530884, + -0.0008232197142206132, + -0.046767134219408035, + -0.010142194107174873, + 0.032846227288246155, + -0.03076317347586155, + 0.0019528644625097513, + -0.018671290948987007, + -0.04453166201710701, + 0.024183766916394234, + 0.014733807183802128, + -0.005086973775178194, + 0.016092874109745026, + 0.017401134595274925, + -0.00722083542495966, + -0.013311232440173626, + 0.01353986095637083, + -0.0050583952106535435, + 0.0027244840748608112, + -0.04318529739975929, + 0.029315195977687836, + 0.05431186035275459, + -0.00851004384458065, + 0.04128006473183632, + -0.004607490263879299, + 0.011653679423034191, + -0.0069287000223994255, + 0.028680117800831795, + 0.014746508561074734, + 0.013387441635131836, + 0.028019636869430542, + 0.010612151585519314, + 0.01574993133544922, + 0.0014170175418257713, + 0.01507674902677536, + 0.01369227934628725, + 0.04425222799181938, + -0.011539365164935589, + 0.03830789774656296, + -0.02149103581905365, + -0.0020465385168790817, + -0.021833978593349457, + 0.03058535046875477, + -0.012625348754227161, + -0.008421133272349834, + 0.02939140424132347, + -0.041813530027866364, + 0.016639040783047676, + 0.025403115898370743, + 0.016740653663873672, + -0.0246537234634161, + 0.00644286535680294, + 0.008941896259784698, + 0.02027168683707714, + -0.02401864528656006, + -0.0044836499728262424, + 1.0605304851196706e-05, + 0.006373006850481033, + 0.03063615784049034, + 9.68121639743913e-06, + -0.005490248557180166, + -0.014263849705457687, + 0.012555490247905254, + -0.002125923288986087, + -0.021376721560955048, + 0.04023853689432144, + -0.0070049092173576355, + 0.061323121190071106, + -0.02561904303729534, + 0.009469011798501015, + 0.013501755893230438, + 0.00830046832561493, + 0.06472714245319366, + -0.006788982544094324, + -0.002148150932043791, + -0.008668812923133373, + 0.00604276591911912, + -0.015203764662146568, + 0.012047427706420422, + 0.018645886331796646, + 0.009551571682095528, + 0.03058535046875477, + 0.013984414748847485, + -0.049383655190467834, + 0.026774883270263672, + 0.0025625391863286495, + -0.017985405400395393, + 0.014632194302976131, + 0.03929862007498741, + 0.011266281828284264, + 0.012409421615302563, + 0.0207289420068264, + -0.01468300074338913, + -0.041203852742910385, + -0.011361543089151382, + -0.026038194075226784, + -0.006852490361779928, + 0.011437753215432167, + -0.01599126122891903, + 0.004642419517040253, + -0.042296186089515686, + 0.003629470244050026, + 0.013514457270503044, + 0.017985405400395393, + -0.035513557493686676, + -0.007258940488100052, + 0.015648318454623222, + -0.007055715192109346, + 0.013336636126041412, + -0.07656498998403549, + -0.027562379837036133, + -0.021910186856985092, + -0.01148855872452259, + -0.030559947714209557, + 0.007030312437564135, + -0.0009478537831455469, + 0.011964867822825909, + -0.01515295822173357, + 0.0016019840259104967, + 0.005439442116767168, + 0.019280964508652687, + 0.006979505997151136, + 0.004420142155140638, + -0.010764569975435734, + 0.0025974686723202467, + 0.01369227934628725, + 0.016791459172964096, + -0.02234204113483429, + 0.0035437345504760742, + -0.02003035694360733, + -0.006865192204713821, + 0.004648770205676556, + -0.00978654995560646, + -0.024272676557302475, + -0.00753837451338768, + 0.0019608030561357737, + 0.009284839034080505, + -0.01217444334179163, + 0.02443779818713665, + -0.027943426743149757, + -0.002329148119315505, + 0.018048914149403572, + -0.012460228055715561, + 0.04648770019412041, + 0.004185163415968418, + -0.02908656746149063, + -0.022875506430864334, + -0.005849067587405443, + -0.0018750674789771438, + 0.017426537349820137, + 0.011755291372537613, + 0.03124583140015602, + -0.019839832559227943, + -0.051873162388801575, + 0.008948247879743576, + 0.02358679287135601, + -0.026190612465143204, + 0.03200792521238327, + -0.04308368265628815, + -0.0032579496037214994, + 0.024425094947218895, + 0.01005963422358036, + 0.011304386891424656, + 0.025885775685310364, + 0.012117286212742329, + 0.022850101813673973, + -0.017401134595274925, + -0.006681019440293312, + 0.0344720296561718, + 0.0021814925130456686, + 0.024641022086143494, + 0.008103594183921814, + 0.015927754342556, + 0.0025990563444793224, + 0.012345913797616959, + 0.007373254280537367, + -0.005420389585196972, + 0.0017591657815501094, + -0.007868614979088306, + -0.023485179990530014, + -0.0045916130766272545, + 0.016766056418418884, + 0.003800941165536642, + -0.014035221189260483, + -0.005614088382571936, + -0.03058535046875477, + -0.046436894685029984, + 0.03370993584394455, + -0.0036326455883681774, + -0.026673272252082825, + -0.02583496831357479, + 0.020474910736083984, + -0.01987793855369091, + 0.010091387666761875, + -0.050196558237075806, + -0.01625799387693405, + -0.021198900416493416, + 0.007595531642436981, + -0.017439238727092743, + 0.026647867634892464, + 0.016067471355199814, + 0.009024457074701786, + 0.009291189722716808, + 0.004366160370409489, + 0.00552517781034112, + 0.024450499564409256, + 0.030051885172724724, + 0.005852242931723595, + -0.0035310331732034683, + -0.028705520555377007, + 0.026774883270263672, + 0.005579159129410982, + -0.042626429349184036, + -0.005388636142015457, + 0.0018988829106092453, + 0.0013979652430862188, + 0.028908746317029, + 0.019560398533940315, + 0.015089450404047966, + -0.01869669370353222, + -0.014314656145870686, + 0.012612647376954556, + 0.02085595764219761, + 0.005490248557180166, + -0.02589847706258297, + -0.024717232212424278, + 0.015356183052062988, + 0.01778218150138855, + -0.005315601825714111, + -0.011037653312087059, + 0.003527857596054673, + -0.0236757043749094, + 0.035157911479473114, + -0.0054489681497216225, + 0.03416718915104866, + -0.040441758930683136, + 0.0032023803796619177, + -0.02559363842010498, + 0.012091883458197117, + 0.005426740739494562, + 0.02081785351037979, + -0.02626682072877884, + -0.009767497889697552, + 0.025707952678203583, + -0.006788982544094324, + -0.014200341887772083, + -0.02231663651764393, + 0.007366903591901064, + 0.021160796284675598, + 0.01644851826131344, + -0.005950680002570152, + -0.04186433553695679, + 0.012409421615302563, + -0.030839381739497185, + -0.009754796512424946, + -0.023599494248628616, + 0.017820285633206367, + -0.015813440084457397, + 0.01280952151864767, + -0.020474910736083984, + -0.03830789774656296, + 0.026368433609604836, + -0.011507611721754074, + -0.006112624891102314, + 0.026241417974233627, + 0.011958517134189606, + -0.0338115468621254, + -0.042296186089515686, + -0.001284445053897798, + -0.015813440084457397, + 0.019903341308236122, + -0.012803169898688793, + -0.026622464880347252, + -0.045700203627347946, + -0.03200792521238327, + -0.026647867634892464, + 0.017832987010478973, + 0.004801189061254263, + -0.032236553728580475, + 0.022088009864091873, + -0.028553102165460587, + -0.015178361907601357, + -0.003947009332478046, + -0.03978127986192703, + -0.004147058818489313, + 0.020754344761371613, + -0.006700071971863508, + 0.005344180390238762, + -0.04503972455859184, + 0.0006061024614609778, + -0.008160751312971115, + -0.035335734486579895, + 0.0077733532525599, + -0.004128006286919117, + 0.004985361360013485, + 0.0077733532525599, + 0.02279929630458355, + -0.017998106777668, + 0.00400416599586606, + -0.022418249398469925, + 0.02443779818713665, + -0.019865237176418304, + -0.029899466782808304, + -0.005931627470999956, + 0.01826483942568302, + 0.03246518224477768, + -0.025403115898370743, + -0.010421628132462502, + -0.012930185534060001, + -0.020195476710796356, + -0.03149986267089844, + -0.02273578941822052, + 0.006376182194799185, + 0.01784568838775158, + 0.0222531296312809, + 0.01086618285626173, + -0.003731082659214735, + -0.024869650602340698, + 0.029645435512065887, + -0.03216034546494484, + 0.004474123939871788, + -0.03498008847236633, + -0.017591657117009163, + -0.01199027057737112, + 0.02452670782804489, + -0.018506169319152832, + -0.021021077409386635, + 0.016816861927509308, + 0.01884911209344864, + -0.00117806950584054, + 0.012669803574681282, + 0.0008803767268545926, + 0.01616908237338066, + 0.005248918663710356, + 0.011291684582829475, + -0.021325916051864624, + -0.022723086178302765, + -0.019255561754107475, + -0.008795828558504581, + -0.013235023245215416, + -0.020220879465341568, + -0.003921606112271547, + -0.004966309294104576, + -0.008910142816603184, + -0.009488063864409924, + -0.004921853542327881, + -0.04097522422671318, + -0.02875632606446743, + 0.010243806056678295, + -0.007411358878016472, + -0.015292675234377384, + 0.03157607465982437, + -0.010218403302133083, + 0.035996213555336, + -0.019992252811789513, + 0.018226735293865204, + 0.0051822355017066, + 0.01614367961883545, + 0.014340058900415897, + -0.0077924057841300964, + 0.02124970592558384, + -0.008490991778671741, + 0.052787672728300095, + -0.03480226919054985, + -0.006341252941638231, + 0.02009386382997036, + 0.02544122003018856, + 0.00044614222133532166, + -0.003826344385743141, + 0.03724096715450287, + -0.015915051102638245, + 0.018061615526676178, + 0.032998647540807724, + -0.001530537731014192, + 0.012091883458197117, + -0.03246518224477768, + -0.0036929778289049864, + 0.0207289420068264, + -0.01352715864777565, + -0.013679577969014645, + -0.01515295822173357, + 0.018887216225266457, + 0.013387441635131836, + -0.012352265417575836, + -0.014251148328185081, + -0.01970011554658413, + -0.01346365176141262, + -0.01240307092666626, + -0.0029483491089195013, + 0.0069287000223994255, + 0.002870552008971572, + 0.024336185306310654, + 0.0029150075279176235, + -0.012746013700962067, + 0.02511098049581051, + 0.0062174126505851746, + 0.03358291834592819, + 0.03894297778606415, + 0.012034726329147816, + -0.022926311939954758, + 0.02923898585140705, + 0.04282965138554573, + 0.013209620490670204, + 0.02194829285144806, + -0.01547049731016159, + 0.012873029336333275, + -0.04432843625545502, + 0.01693117618560791, + -0.024628320708870888, + -0.023535987362265587, + 0.003966061398386955, + 0.011888657696545124, + 0.015406989492475986, + 0.005709350109100342, + 0.04087361320853233, + -0.007392306812107563, + 0.010770920664072037, + -0.017096295952796936, + 0.027181332930922508, + -0.002329148119315505, + 0.013476353138685226, + -0.01120277401059866, + 0.0006231701700016856, + -0.007405008189380169, + -0.00023279573360923678, + 0.036250244826078415, + -0.0031388725619763136, + -0.013870101422071457, + 0.024933157488703728, + -6.216816836968064e-05, + -0.016766056418418884, + 0.0009454722166992724, + 0.0059411535039544106, + -0.03233816474676132, + 0.00808454118669033, + 0.024755336344242096, + 0.001971916761249304, + -0.015826141461730003, + 0.016677144914865494, + -0.04920583590865135, + 2.037954982370138e-05, + -0.03061075508594513, + 0.002983278362080455, + -0.011177371256053448, + -0.017909197136759758, + 0.0025990563444793224, + 0.010180298238992691, + 0.004845644347369671, + 5.919124305364676e-05, + 0.022176919505000114, + 0.009462660178542137, + 0.016194486990571022, + 0.0028197458013892174, + -0.011120214127004147, + -0.009361048229038715, + 0.02720673754811287, + -0.018671290948987007, + -0.0004624160937964916, + -0.01926826313138008, + -0.0054807220585644245, + 0.01817592978477478, + -0.016130978241562843, + 0.023154940456151962, + -0.007957525551319122, + -0.03434501215815544, + -0.02626682072877884, + 0.007214484736323357, + 0.027003511786460876, + 0.016575533896684647, + -0.003292878856882453, + 0.01023110467940569, + 0.02611440233886242, + 0.023993242532014847, + 0.02672407776117325, + -0.004502702038735151, + -0.010015178471803665, + 0.0032738265581429005, + 0.0002574050158727914, + 0.00481706578284502, + 0.026190612465143204, + -0.0006326963775791228, + 0.008078190498054028, + -0.021808573976159096, + 0.015457795932888985, + 0.015851544216275215, + 0.01094239205121994, + 0.013730384409427643, + -0.02216421812772751, + 0.00793212279677391, + 0.004315354395657778, + 0.006903296802192926, + 0.015889648348093033, + -0.013882802799344063, + 0.002003670670092106, + -0.03048373945057392, + -0.002440286800265312, + 0.05227961391210556, + -0.0001410071417922154, + 0.04204215481877327, + 0.015495900996029377, + -0.01522916741669178, + 0.004820241127163172, + 0.0183283481746912, + 0.007646337617188692, + 0.01101860124617815, + 0.013831996358931065, + 0.033481307327747345, + -0.023485179990530014, + -0.022900909185409546, + -0.006423812825232744, + 0.0016250055050477386, + -0.0032468356657773256, + -0.01068201009184122, + -0.029289793223142624, + -0.011405998840928078, + 0.013908205553889275, + -0.0008271889528259635, + -0.0058331904001533985, + 0.01817592978477478, + 0.031017204746603966, + -0.008554499596357346, + 0.06330456584692001, + -0.02875632606446743, + 0.01256819162517786, + -0.028324473649263382, + -0.00636030500754714, + -0.018366452306509018, + 0.05304170399904251, + -0.03571677953004837, + 0.02611440233886242, + 0.03320187330245972, + -0.023447075858712196, + -0.04221997782588005, + -0.006401584949344397, + -0.035945408046245575, + -0.05103486031293869, + -0.018252138048410416, + -0.01460679154843092, + -0.007512971293181181, + -0.017972704023122787, + -0.0026450995355844498, + 0.0037755381781607866, + 0.023167641833424568, + 0.05553121119737625, + 0.03924781456589699, + 0.014822717756032944, + 0.0071192230097949505, + -0.009469011798501015, + -0.002313271164894104, + -0.010351769626140594, + -0.03373533859848976, + -0.011787045747041702, + -0.019433382898569107, + -0.027714800089597702, + -0.005261620506644249, + 0.031322043389081955, + -0.0018941197777166963, + 0.005252094008028507, + 0.009570623748004436, + 0.011723537929356098, + 0.013438248075544834, + -0.013552562333643436, + 0.016829563304781914, + 0.0005187792703509331, + 0.01531807892024517, + 0.019255561754107475, + -0.024158362299203873, + -0.002162440214306116, + -0.022088009864091873, + 0.025580937042832375, + -0.003848572028800845, + -0.0166898462921381, + 0.038257092237472534, + -0.015216466039419174, + 0.015940455719828606, + -0.004318529739975929, + 0.014555985108017921, + -0.00022664341668132693, + -0.0008021827670745552, + -0.03683451935648918, + -0.021109988912940025, + -0.012199846096336842, + -0.006738176569342613, + -0.012822222895920277, + 0.046462297439575195, + 0.010193000547587872, + -0.012949238531291485, + -0.005464845336973667, + -0.01580073870718479, + -0.04158490151166916, + 0.015915051102638245, + 0.00965318363159895, + 0.027613187208771706, + -0.033938564360141754, + 0.01726141758263111, + -0.04143248125910759, + -0.004420142155140638, + -0.043388523161411285, + 0.016588235273957253, + 0.013984414748847485, + 0.022697683423757553, + 0.01909044198691845, + -0.024488603696227074, + 0.004394738934934139, + -0.018518870696425438, + -0.015978559851646423, + -0.01614367961883545, + -0.017528150230646133, + -0.0015130731044337153, + -0.019077740609645844, + -0.02459021657705307, + 0.0031277586240321398, + -0.04318529739975929, + -0.022265831008553505, + -0.001686131814494729, + -0.007487568538635969, + -0.026088999584317207, + -0.011590171605348587, + -0.002252938924357295, + -0.03203332796692848, + 0.010999549180269241, + -0.005071097053587437, + -0.024082154035568237, + ], + "index": 77, + }, + { + "title": "Gray wolf", + "text": "The gray wolf or grey wolf (Canis lupus) also known as the timber wolf, or western wolf, is a canid native to the wilderness and remote areas of North America and Eurasia. It is the largest extant member of its family, with males averaging 43\u201345 kg (95\u201399 lb), and females 36\u201338.5 kg (79\u201385 lb). Like the red wolf, it is distinguished from other Canis species by its larger size and less pointed features, particularly on the ears and muzzle.", + "vector": [ + -0.007719092071056366, + -0.008680134080350399, + -0.00616989191621542, + 0.01832900010049343, + 0.03856470808386803, + 0.003325206460431218, + 0.0006165086524561048, + -0.030169041827321053, + 0.006873374804854393, + 0.02584819495677948, + -0.06003054976463318, + 0.0001552083413116634, + 3.4147036785725504e-05, + -0.03542786464095116, + -0.016483798623085022, + 0.05815459415316582, + -0.029261818155646324, + 0.011740093119442463, + 0.024079877883195877, + 0.021388959139585495, + 0.02177337557077408, + 0.004193988628685474, + 0.0741770938038826, + -0.01983591355383396, + 0.028446853160858154, + -0.0006419763085432351, + -0.015714963898062706, + -0.03521259129047394, + -0.047237154096364975, + -0.02111217752099037, + 0.034812796860933304, + 0.014138855040073395, + 0.02944633737206459, + 0.05630939453840256, + -0.019067080691456795, + -0.055110011249780655, + 0.010679102502763271, + 0.0029254129622131586, + 0.03721155971288681, + 0.019543757662177086, + 0.0278010331094265, + 0.057785555720329285, + -0.029031166806817055, + -0.04434633627533913, + 0.014384881593286991, + 0.008088132366538048, + 0.0249102171510458, + 0.0359506718814373, + 0.04800598695874214, + -0.026601651683449745, + -0.004559184890240431, + -0.048867080360651016, + -0.01900557428598404, + 0.021158307790756226, + 0.009195253252983093, + -0.04997420310974121, + 0.05080454424023628, + 0.08955377340316772, + -0.0032617778051644564, + -0.048159755766391754, + 0.015684211626648903, + -0.0347512923181057, + -0.0533570721745491, + 0.00979494396597147, + 0.00257943756878376, + 0.014923065900802612, + 0.03850319981575012, + -0.02540227212011814, + 0.00041541055543348193, + 0.004343911539763212, + 0.005996904335916042, + 0.003413622500374913, + 0.004539964254945517, + 0.014900000765919685, + 0.046898867934942245, + 0.0010494582820683718, + -0.01599174551665783, + 0.012393602170050144, + 0.020927658304572105, + 0.0036481167189776897, + 0.013423839583992958, + 0.003546246327459812, + -0.004055598750710487, + 0.040748193860054016, + -0.01797533594071865, + 0.016499174758791924, + -0.014538648538291454, + -0.07485366612672806, + -0.03653498739004135, + 0.025171620771288872, + 0.03665800020098686, + 0.008134262636303902, + -0.0024679568596184254, + 0.01969752460718155, + 0.02352631650865078, + -0.032414037734270096, + -0.019743654876947403, + -0.006166047882288694, + -0.003603908699005842, + -0.021404335275292397, + 0.017683180049061775, + 0.0030157507862895727, + 0.029815377667546272, + -0.028600620105862617, + -0.026401754468679428, + 0.010463829152286053, + 0.043392982333898544, + 0.004059442784637213, + -0.029061920940876007, + 0.01634540781378746, + -0.002018188824877143, + -0.0060968524776399136, + -0.00863400474190712, + -0.017191125079989433, + 0.00510121276602149, + 0.006054566707462072, + -0.002517930930480361, + -0.0730084627866745, + 0.0038999097887426615, + 0.028462229296565056, + 0.006600438617169857, + 0.014154232107102871, + -0.013170124031603336, + -0.01343921571969986, + -0.008580186404287815, + -0.022096285596489906, + 0.01763704977929592, + 0.04182456433773041, + 0.018821053206920624, + -0.03764210641384125, + -0.025525284931063652, + 0.02667853608727455, + -0.03416697680950165, + -0.019636016339063644, + -0.02910805121064186, + -0.007757533807307482, + 0.019513003528118134, + 0.0001658999390201643, + 0.012332095764577389, + 0.03339814394712448, + 0.004785990808159113, + -0.0023929954040795565, + 0.041424769908189774, + 0.05043550208210945, + 0.010755985975265503, + -0.01819060929119587, + -0.03161444887518883, + -0.0036154412664473057, + -0.010333127342164516, + 0.006512023042887449, + -0.005454876460134983, + -0.003392479382455349, + 0.040871210396289825, + 0.019036326557397842, + -0.01937461458146572, + 0.04646832123398781, + -0.013223942369222641, + -0.012447420507669449, + -0.03896450251340866, + 0.023587822914123535, + -0.0033098298590630293, + -0.010179360397160053, + 0.012601187452673912, + -0.02271135337650776, + 0.0072731683030724525, + 0.025125490501523018, + 0.05609412118792534, + 0.02875438705086708, + -0.014646285213530064, + 0.01281646080315113, + -0.020235707983374596, + -0.041332509368658066, + -0.006250619422644377, + -0.026340248063206673, + -0.0004766769998241216, + -0.0147769870236516, + 0.002154656918719411, + 0.06667327135801315, + 0.019313106313347816, + 0.08248049765825272, + 0.03675026074051857, + 0.008833901025354862, + -0.02675541862845421, + 0.034136224538087845, + -0.018036842346191406, + 0.0044515482150018215, + -0.0059584625996649265, + 0.03129153698682785, + -0.026171104982495308, + -0.0056047989055514336, + 0.04314695671200752, + -0.01008710078895092, + 0.007519195321947336, + -0.04105572775006294, + 0.05920020863413811, + 0.027170589193701744, + 0.020804645493626595, + 0.054464191198349, + 0.043054696172475815, + 0.05984602868556976, + 0.04588400572538376, + -0.0521884448826313, + 0.0021565789356827736, + 0.014346440322697163, + -0.019328484311699867, + -0.013062487356364727, + 0.01147100143134594, + 0.01436950545758009, + -0.04453085735440254, + 0.04296243563294411, + -0.0019643704872578382, + -0.015484314411878586, + -0.01935923658311367, + 0.017206503078341484, + 0.03896450251340866, + 0.004759081639349461, + 0.02815469726920128, + 0.0046706655994057655, + 0.02400299347937107, + 0.040994223207235336, + 0.027416616678237915, + -0.008126573637127876, + 0.04566873237490654, + 0.014861558564007282, + 0.012862591072916985, + 0.021358205005526543, + 0.0243412796407938, + 0.056862954050302505, + 0.014008153229951859, + -0.03558163344860077, + -0.02051248773932457, + 0.023956863209605217, + 0.0742385983467102, + 0.045022912323474884, + -0.04394654557108879, + 0.03462827950716019, + -0.007822884246706963, + -0.03733457252383232, + -0.02618648111820221, + -0.03687327355146408, + -0.028446853160858154, + 0.013346956111490726, + -0.01888255961239338, + -0.05274200439453125, + 0.01124804001301527, + -0.024418164044618607, + -0.016622187569737434, + -0.07202436029911041, + -0.057570282369852066, + -0.043392982333898544, + -0.009087616577744484, + 0.027539629489183426, + -0.004059442784637213, + -0.020558618009090424, + -0.02306501567363739, + -0.04474613070487976, + 0.030461197718977928, + 0.0347512923181057, + -0.01280877273529768, + 0.005424122791737318, + -0.03973333537578583, + -0.010064035654067993, + -0.03272157162427902, + 0.004736016504466534, + -0.07368503510951996, + -0.04508441686630249, + 0.03533560410141945, + -0.014530960470438004, + -0.005497162230312824, + -0.06796491146087646, + -0.0440080501139164, + 0.032291021198034286, + -0.031583696603775024, + 0.019851291552186012, + -0.019266976043581963, + 0.03410547226667404, + 0.0018749936716631055, + 0.013892828486859798, + 0.08094283193349838, + 0.03407471626996994, + -0.0022642158437520266, + -0.011025077663362026, + -0.010855934582650661, + 0.007642208598554134, + 0.08155789971351624, + 0.002369930502027273, + -0.03687327355146408, + -0.03330588340759277, + 0.042378123849630356, + 0.004128637723624706, + -0.011517131701111794, + 0.030322808772325516, + 0.015445872209966183, + -0.03887224197387695, + -0.0021142931655049324, + 0.0014848103746771812, + 0.017683180049061775, + 0.0027793345507234335, + -0.027893293648958206, + 0.015368989668786526, + 0.004955134354531765, + 0.029400207102298737, + -0.025909701362252235, + -0.03155294060707092, + 0.03693477809429169, + 0.018959444016218185, + -0.028785141184926033, + 0.023341797292232513, + -0.04228586331009865, + 0.005358772352337837, + 0.004697574768215418, + 0.015015325509011745, + -0.010809804312884808, + -0.016299277544021606, + 0.012531992048025131, + -0.0196821466088295, + 0.00817270390689373, + 0.033551909029483795, + -0.03198349103331566, + 0.02467956766486168, + 0.01832900010049343, + 0.017191125079989433, + -0.0272474717348814, + 0.03902600705623627, + -0.008211146108806133, + -0.0011561339488252997, + -0.010832869447767735, + -0.02271135337650776, + -0.03281382843852043, + -0.056032612919807434, + -0.03352115675806999, + 0.0007265480235219002, + -0.02886202372610569, + 0.008510990999639034, + 0.07780598849058151, + -0.00016914345906116068, + -0.024833334609866142, + 0.010371568612754345, + 0.009241383522748947, + 0.018405882641673088, + 0.03026130050420761, + -0.009864138439297676, + -0.011286481283605099, + -0.008434107527136803, + 0.005943085998296738, + -0.00864169280976057, + 0.025340763852000237, + 0.04250113666057587, + -0.01726800948381424, + 0.011148091405630112, + 0.0008817563648335636, + 0.016837462782859802, + -0.04462311789393425, + -0.0035923763643950224, + -0.001383900991640985, + -0.02852373756468296, + -0.00021575400023721159, + -0.04588400572538376, + 0.023849226534366608, + 0.008311093784868717, + -0.004889783449470997, + 0.02944633737206459, + -0.008726264350116253, + -0.04668359458446503, + -0.030169041827321053, + -0.03144530579447746, + 0.018036842346191406, + -0.010333127342164516, + 0.01692972145974636, + -0.00582776078954339, + -0.015330547466874123, + 0.0039287409745156765, + -0.013285449706017971, + -0.005416434723883867, + -0.007161687593907118, + -0.024156760424375534, + 0.05015872046351433, + 0.0038672343362122774, + 0.036104440689086914, + 0.01891331374645233, + -0.01771393232047558, + 0.06224479153752327, + 0.027662642300128937, + 0.04010237380862236, + 0.0359506718814373, + 0.009064551442861557, + -0.027416616678237915, + 0.0001782733597792685, + 0.006758049596101046, + -0.0202664602547884, + 0.02783178724348545, + 0.002466034609824419, + 0.04419257119297981, + 0.012877967208623886, + 0.013400774449110031, + -0.07202436029911041, + -0.03416697680950165, + 0.004263184033334255, + 0.022988133132457733, + 0.021281322464346886, + -0.0025275414809584618, + -0.013985088095068932, + -0.04157853499054909, + 0.03754984587430954, + 0.05037399381399155, + 0.023095769807696342, + 0.00990258064121008, + 0.030538082122802734, + 0.032967597246170044, + -0.02630949579179287, + 0.002621723571792245, + 0.07343900948762894, + -0.05148111656308174, + -0.012270588427782059, + -0.0008913667988963425, + -0.02689380943775177, + -0.0486825592815876, + 0.049082353711128235, + -0.007980495691299438, + -0.012001496739685535, + -0.024279773235321045, + 0.010463829152286053, + 0.0045553408563137054, + -0.027877915650606155, + -0.035858411341905594, + 0.03545861691236496, + -0.023510940372943878, + 0.08020474761724472, + 0.03985634818673134, + -0.0144925182685256, + -0.03259855508804321, + -0.012324406765401363, + -0.02841610088944435, + -0.01971290074288845, + -0.032291021198034286, + 0.0076268319971859455, + 0.019051702693104744, + 0.006481269374489784, + -0.008203457109630108, + -0.03001527488231659, + -0.00437466474249959, + 0.0869089812040329, + 0.009487410075962543, + 0.016499174758791924, + -0.032291021198034286, + -0.01983591355383396, + -0.030184417963027954, + 0.029231064021587372, + 0.06276759505271912, + 0.0284007228910923, + -0.006431295536458492, + 0.008264964446425438, + 0.031921982765197754, + -0.04760619252920151, + -0.01657605916261673, + -0.0029561661649495363, + 0.0004613003402482718, + -0.016376161947846413, + -0.021127555519342422, + 0.002319956198334694, + 0.012086068280041218, + -0.02072776108980179, + 0.03219876438379288, + -0.03235252946615219, + -0.05031248927116394, + 0.045268937945365906, + 0.006950258277356625, + 0.026263365522027016, + -0.023849226534366608, + 0.0336134172976017, + -0.0336134172976017, + -0.006458204705268145, + -0.03126078471541405, + -0.002252683276310563, + -0.009956398978829384, + -0.014338752254843712, + 0.037396080791950226, + 0.022111661732196808, + -0.04831352084875107, + 0.014930753968656063, + 0.018974820151925087, + 0.012478173710405827, + -0.024079877883195877, + -0.02235768921673298, + 0.0007289506029337645, + -0.006638880353420973, + 0.03003065101802349, + 0.037611354142427444, + -0.0029119583778083324, + -0.022173168137669563, + -0.011724716983735561, + 0.0440388061106205, + 0.007792131509631872, + -0.04034840315580368, + -0.02852373756468296, + -0.002125825732946396, + 0.044469352811574936, + -0.03896450251340866, + 0.02235768921673298, + 0.04314695671200752, + -0.023510940372943878, + -0.029246440157294273, + 0.020943034440279007, + -0.0029446338303387165, + 0.005839293356984854, + 0.007211661897599697, + -0.018390506505966187, + 0.01957450993359089, + -0.02920030988752842, + -0.019389990717172623, + -0.019313106313347816, + 0.025202374905347824, + -0.016084004193544388, + -0.03327513113617897, + -0.010056346654891968, + 0.027401238679885864, + -0.014354128390550613, + -0.0056047989055514336, + 0.009548916481435299, + 0.057662539184093475, + -0.016437668353319168, + -0.0023449433501809835, + -0.026986069977283478, + 0.027185965329408646, + -0.007684494834393263, + 0.0671653300523758, + 0.04348524287343025, + 0.009372085332870483, + -0.01645304448902607, + -0.034474510699510574, + -0.032414037734270096, + -0.026801548898220062, + 0.020773891359567642, + 0.0002866308786906302, + 0.017683180049061775, + -0.02980000153183937, + 0.010556088760495186, + -0.049543656408786774, + -0.008034314028918743, + 0.04656057804822922, + 0.016391538083553314, + -0.02038947492837906, + -0.03816491365432739, + 0.0038518577348440886, + 0.0012656927574425936, + -0.02583281882107258, + -0.011440248228609562, + -0.03607368469238281, + -0.06209102272987366, + -0.018452012911438942, + 0.017560165375471115, + -0.01948225125670433, + 0.02269597537815571, + -0.00515887513756752, + 0.049666669219732285, + 0.02944633737206459, + -0.005239602643996477, + 0.032875336706638336, + 0.001452135038562119, + -0.01705273613333702, + 0.04714489355683327, + 0.01048689428716898, + 0.006385165266692638, + 0.021988648921251297, + -0.015053767710924149, + 0.038779981434345245, + -0.006711919791996479, + 0.015676522627472878, + -0.029261818155646324, + 0.0049666669219732285, + -0.012086068280041218, + -0.007542260456830263, + -0.005389525555074215, + -0.013985088095068932, + 0.02398761734366417, + 0.010125542059540749, + -0.02038947492837906, + -0.028462229296565056, + -0.008295717649161816, + 0.006196801085025072, + -0.0029734650161117315, + -0.04613003134727478, + -2.961962536573992e-06, + 0.015453561209142208, + 0.015960991382598877, + -0.020435605198144913, + -0.02203477919101715, + -0.039241280406713486, + 0.011724716983735561, + -0.00816501583904028, + -0.016160888597369194, + 0.025125490501523018, + 0.005320330616086721, + -0.007596078794449568, + -0.026155728846788406, + -0.01888255961239338, + 0.009495098143815994, + -0.021158307790756226, + -0.023249536752700806, + -0.008657069876790047, + -0.011148091405630112, + 0.010663725435733795, + 0.01078673917800188, + -0.008826212957501411, + -0.014746233820915222, + -0.0544949434697628, + 0.0405636765062809, + 0.01077905111014843, + -0.03256780281662941, + -0.009356708265841007, + -0.028785141184926033, + -0.056155625730752945, + 0.03428998962044716, + -0.005485629662871361, + 0.03312136232852936, + -0.006285217124968767, + -0.01855964958667755, + 0.012001496739685535, + -0.026048092171549797, + -0.03742683306336403, + 0.013093240559101105, + -0.00915681105107069, + -0.015222910791635513, + 0.00245065800845623, + 0.014730856753885746, + 0.024495046585798264, + 0.00034092977875843644, + -0.037396080791950226, + 0.0024833334609866142, + 0.015015325509011745, + 0.055479053407907486, + -0.044684626162052155, + -0.02710908278822899, + -0.00863400474190712, + -0.00834184791892767, + 0.01889793761074543, + 0.024064499884843826, + -0.02294200286269188, + -0.009425903670489788, + 0.036104440689086914, + 0.004962822888046503, + 0.051542624831199646, + -0.004778302740305662, + -0.03385944291949272, + -0.0036346621345728636, + -0.010240866802632809, + 0.03410547226667404, + 0.010348504409193993, + 0.010171672329306602, + 0.047483179718256, + 0.005658617243170738, + -0.006508178543299437, + 0.004109417088329792, + -0.014523272402584553, + 0.02178875170648098, + 0.0254945307970047, + 0.021404335275292397, + -0.054064396768808365, + 0.026601651683449745, + -0.007519195321947336, + -0.012416667304933071, + -0.01646842248737812, + -0.04250113666057587, + -0.04843653365969658, + 0.005316486116498709, + -0.005639396607875824, + -0.03198349103331566, + -0.034966565668582916, + 0.014292621985077858, + -0.037857379764318466, + -0.02444891817867756, + -0.02829308621585369, + 0.026140352711081505, + -0.039579566568136215, + 0.009610423818230629, + -0.03548937290906906, + -0.026586275547742844, + -0.028800517320632935, + -0.013293137773871422, + 0.03908751532435417, + -0.051880910992622375, + -0.006969478912651539, + 0.02435665763914585, + -0.013370021246373653, + -0.0579393208026886, + 0.011132714338600636, + -0.032168008387088776, + -0.010625284165143967, + -0.022511456161737442, + 0.0068618422374129295, + 0.008795459754765034, + 0.02191176638007164, + -0.010210113599896431, + 0.015345924533903599, + 0.01902095042169094, + 0.042593397200107574, + 0.007184752728790045, + 0.019097832962870598, + -0.020450981333851814, + 0.025479154661297798, + -0.004520743153989315, + -0.03176821395754814, + 0.008303405717015266, + 0.0009937178110703826, + -0.0266631580889225, + -0.018375130370259285, + -0.02675541862845421, + -0.016898969188332558, + 0.01222445908933878, + 0.029630858451128006, + 0.007007920648902655, + 0.02480258047580719, + -0.00962579995393753, + 0.02226542867720127, + 0.026263365522027016, + 0.01321625430136919, + 0.0011205753544345498, + -0.017913829535245895, + -0.02340330369770527, + 0.034351497888565063, + 0.0324755422770977, + 0.023803096264600754, + 0.014969195239245892, + 0.024725697934627533, + -0.04302394390106201, + -0.01002559345215559, + 0.01240897923707962, + -0.02015882357954979, + 0.030753355473279953, + 0.003878766903653741, + -0.03126078471541405, + -0.02689380943775177, + 0.05264974385499954, + 0.0038480134680867195, + 0.014507895335555077, + 0.016299277544021606, + 0.008795459754765034, + 0.019866667687892914, + 0.011125026270747185, + -0.03468978404998779, + 0.008426419459283352, + 0.04047141596674919, + 0.047021880745887756, + 0.007838261313736439, + -0.027908669784665108, + 0.024387409910559654, + 0.03468978404998779, + 9.129902173299342e-05, + -0.05022022873163223, + 0.03422848507761955, + -0.04326996952295303, + -0.017560165375471115, + 0.012601187452673912, + -0.011978431604802608, + -0.0324447900056839, + -0.004563028924167156, + -0.0030887899920344353, + -0.028908153995871544, + -0.016084004193544388, + 0.02976924739778042, + -0.0382879264652729, + 0.0336441695690155, + -0.013739061541855335, + 0.02040485106408596, + 0.01396971195936203, + 0.045268937945365906, + -0.049912694841623306, + -0.0032367906533181667, + 0.002967698732391, + -0.005743189249187708, + 0.04416181892156601, + 0.020943034440279007, + 0.0010898220352828503, + 0.022465325891971588, + 0.05080454424023628, + -0.054187413305044174, + 0.017652425915002823, + 0.005608642939478159, + -0.035981424152851105, + -0.028462229296565056, + -0.03868772089481354, + -0.029246440157294273, + 0.02191176638007164, + 0.009179876185953617, + -0.01206300314515829, + -0.004889783449470997, + -0.01546893734484911, + 0.04207058995962143, + 0.005608642939478159, + 0.03791888803243637, + 0.0055702016688883305, + -0.022219298407435417, + 0.001698161824606359, + 0.025479154661297798, + -0.01280877273529768, + 0.03290608897805214, + 0.011463313363492489, + 0.03896450251340866, + 0.021757999435067177, + -0.00553560396656394, + -0.0029273349791765213, + -0.017006605863571167, + -0.015476626344025135, + 0.014930753968656063, + 0.017360268160700798, + -0.018021466210484505, + -0.02235768921673298, + -0.0021892543882131577, + -0.008018936961889267, + -0.0029388675466179848, + 0.02086615189909935, + 0.016729824244976044, + -0.006219866219907999, + 0.005120433401316404, + -0.004193988628685474, + 0.015661146491765976, + 0.03272157162427902, + 0.018867183476686478, + 0.011924613267183304, + -0.01785232312977314, + -0.014800052158534527, + 0.008449484594166279, + 0.008188080973923206, + -0.0033847910817712545, + -0.038779981434345245, + 0.02654014527797699, + 0.011078896000981331, + 0.01281646080315113, + 0.007196285296231508, + -0.02793942391872406, + 0.00816501583904028, + 0.014477142132818699, + -0.02690918557345867, + -0.004428483080118895, + 0.013477657921612263, + 0.001260887598618865, + 0.018851807340979576, + 0.013254696503281593, + 0.019989680498838425, + -0.0017289151437580585, + -0.016068628057837486, + 0.016376161947846413, + 0.003033049637451768, + 0.03456677123904228, + -0.010648349300026894, + 0.01314705889672041, + -0.0027947111520916224, + -0.004094040486961603, + -0.008534056134521961, + 0.01430799812078476, + -0.009771878831088543, + -0.0029061920940876007, + -0.021465841680765152, + 0.00886465422809124, + 0.017790816724300385, + -0.010794427245855331, + -0.023434055969119072, + 0.009010733105242252, + -0.016406914219260216, + -0.004328534938395023, + -0.0010494582820683718, + -0.012908720411360264, + -0.0035231811925768852, + -0.002904270077124238, + -0.0009706527926027775, + 0.02735511027276516, + 0.039794839918613434, + 0.011978431604802608, + 0.05612487345933914, + -0.0072731683030724525, + -0.0007577819051221013, + 0.017175748944282532, + 0.0202664602547884, + -0.012877967208623886, + -0.01891331374645233, + 0.022526832297444344, + -0.028262333944439888, + -0.019282354041934013, + 0.010755985975265503, + 0.018390506505966187, + -0.016022497788071632, + -0.015146027319133282, + 0.06704231351613998, + 0.03490505740046501, + -0.007061738986521959, + -0.03653498739004135, + -0.02145046554505825, + -0.014146543107926846, + 0.0011465235147625208, + -0.05744726583361626, + -0.03570464625954628, + 0.021542726084589958, + -0.035304851830005646, + 0.02052786387503147, + -0.005262667778879404, + 0.06107616424560547, + 0.03490505740046501, + 0.016253147274255753, + -0.019728276878595352, + 0.0018077206332236528, + 0.01725263148546219, + -0.028462229296565056, + 0.042470384389162064, + -0.01728338561952114, + -0.01321625430136919, + -0.008587874472141266, + 0.03290608897805214, + 0.019174717366695404, + -0.009433591738343239, + 0.02261909283697605, + -0.008326470851898193, + 0.006823400501161814, + -0.020804645493626595, + -0.04656057804822922, + 0.01762167178094387, + -0.04222435504198074, + 0.0130394222214818, + -0.012309030629694462, + -0.02065087854862213, + 0.04554571956396103, + 0.006569685414433479, + 0.0022469169925898314, + -0.015515067614614964, + 0.038656968623399734, + 0.0034366874024271965, + -0.03512033075094223, + -2.2794723918195814e-05, + -0.0283853467553854, + 0.022173168137669563, + -0.004812899976968765, + -0.021865636110305786, + 0.001357952831313014, + -0.013954334892332554, + -0.0393950492143631, + -0.012101445347070694, + -0.026524769142270088, + 0.025586791336536407, + 0.028585243970155716, + -0.03653498739004135, + -0.021296698600053787, + 0.005581733770668507, + -0.034966565668582916, + 0.03871847316622734, + -0.027985552325844765, + -0.03419772908091545, + 0.0335826650261879, + -0.04382353276014328, + 0.002994607901200652, + 0.04674509912729263, + 0.013962022960186005, + 0.05172714218497276, + -0.022111661732196808, + 0.030860992148518562, + -0.0301229115575552, + -0.003438609419390559, + 0.0016750968061387539, + 0.006727296393364668, + 0.06289061158895493, + 0.014761610887944698, + 0.023710837587714195, + -0.03226026892662048, + 0.04825201258063316, + -0.012032249942421913, + 0.017221879214048386, + -0.028123943135142326, + 0.013254696503281593, + -0.04563798010349274, + -0.011455624364316463, + -0.0005871968460269272, + 0.0475446879863739, + 0.00020518254314083606, + 0.025217751041054726, + 0.011409495025873184, + 0.015084520913660526, + 0.016391538083553314, + 0.01117884460836649, + -0.01060221903026104, + 0.004267028067260981, + 0.034935809671878815, + 0.003944117575883865, + -0.021527348086237907, + 0.011271104216575623, + -0.019743654876947403, + 0.022757483646273613, + 0.05830836296081543, + 0.0007371194660663605, + 0.007834416814148426, + 0.042039837688207626, + -0.01570727676153183, + 0.007015609182417393, + -0.028262333944439888, + 0.021527348086237907, + 0.0440388061106205, + 0.02191176638007164, + -0.021235192194581032, + -0.002452580025419593, + 0.005946930032223463, + 0.016837462782859802, + -0.03232177719473839, + -0.011747781187295914, + -0.017821568995714188, + -0.034013211727142334, + -0.02308039367198944, + -0.029415583238005638, + 0.013715996406972408, + 0.01636078581213951, + -0.03838018700480461, + 0.01263962872326374, + -0.03149143606424332, + 0.02421826682984829, + 0.029707740992307663, + -0.03816491365432739, + 0.0022373066749423742, + -0.06974861025810242, + 0.009664242155849934, + -0.019190093502402306, + -0.00788823515176773, + 0.02269597537815571, + 0.009433591738343239, + 0.04732941463589668, + -0.0034405316691845655, + -0.013646801002323627, + -0.015161404386162758, + -0.006339035462588072, + -0.018605779856443405, + 0.008787770755589008, + 0.01995892822742462, + -0.008487925864756107, + 0.04812899976968765, + 0.0032848427072167397, + 0.03834943473339081, + -0.024418164044618607, + 0.028785141184926033, + 0.03438225015997887, + -0.012255212292075157, + 0.00017863375251181424, + 0.015837978571653366, + -0.00961811188608408, + 0.0312761627137661, + 0.0020431759767234325, + -0.0032560115214437246, + 0.005285732913762331, + 0.025909701362252235, + 0.01320856623351574, + -0.022926626726984978, + -0.00914912298321724, + -0.003967182710766792, + -0.03173746168613434, + -0.026171104982495308, + 0.01299329288303852, + 0.013008669018745422, + 0.01725263148546219, + 0.030415067449212074, + -0.010502270422875881, + 0.02989226207137108, + 0.00852636806666851, + -0.018482767045497894, + 0.011855418793857098, + 0.021388959139585495, + 0.00980263203382492, + 0.019559133797883987, + 0.0018932534148916602, + 0.012278277426958084, + 0.03315211832523346, + 0.008380289189517498, + -0.027385862544178963, + 0.021542726084589958, + 0.013546853326261044, + 0.01691434532403946, + -0.04010237380862236, + 0.018698040395975113, + -0.004578405525535345, + -0.0033944016322493553, + 0.02492559514939785, + -0.023710837587714195, + 0.020327968522906303, + 0.007830573245882988, + -0.0020239551085978746, + -0.01460015494376421, + -0.020128071308135986, + 0.029999898746609688, + -0.014361816458404064, + 0.028662126511335373, + -0.01460015494376421, + -0.0278164092451334, + 0.009495098143815994, + -0.023495562374591827, + 0.05815459415316582, + -0.032383281737565994, + -0.01600712165236473, + -0.011394117958843708, + 0.017437152564525604, + -0.0029965301509946585, + 0.008695511147379875, + 0.043762024492025375, + -0.03638121858239174, + -0.01636078581213951, + 0.03850319981575012, + -0.00669654319062829, + 0.0034366874024271965, + -0.0005131966318003833, + -0.03616594523191452, + 0.00991026870906353, + 0.00817270390689373, + -0.012801083736121655, + -0.011301858350634575, + -0.007822884246706963, + 0.03964107483625412, + -0.02804706059396267, + -0.018621155992150307, + -0.015315170399844646, + 0.03638121858239174, + 0.001308939652517438, + 0.00768065033480525, + -0.0074077146127820015, + 0.003759597660973668, + 0.022865120321512222, + -0.041424769908189774, + 0.015545820817351341, + 0.00984107330441475, + -0.040994223207235336, + 0.019559133797883987, + 0.023387925699353218, + -0.01280877273529768, + -0.005097368732094765, + -0.01725263148546219, + -0.015207533724606037, + -0.04127100110054016, + -0.026986069977283478, + 0.06246006488800049, + -0.01809834875166416, + -0.009233694523572922, + -0.01299329288303852, + 0.02514086849987507, + 0.005781630985438824, + -0.0003241115191485733, + -0.034597523510456085, + -0.040625181049108505, + -0.02733973227441311, + -0.043977297842502594, + -0.006196801085025072, + 0.01565345749258995, + -0.02095841057598591, + -0.015522755682468414, + 0.019882043823599815, + -0.010256243869662285, + -0.026001961901783943, + -0.006512023042887449, + 0.009556605480611324, + 0.03951806202530861, + -0.034843552857637405, + 0.011570950038731098, + 0.017652425915002823, + -0.000978341093286872, + 0.006442828103899956, + 0.014331063255667686, + -0.04508441686630249, + 0.011255728080868721, + -0.0015934081748127937, + 0.02540227212011814, + 0.020143447443842888, + -0.04696037247776985, + -0.010802116245031357, + 0.00215850118547678, + -0.0038518577348440886, + -0.027201343327760696, + -0.0009908346692100167, + 0.0016529927961528301, + -0.016837462782859802, + 0.0004629821632988751, + -0.005474097095429897, + -0.009202941320836544, + 0.012939474545419216, + 0.026724666357040405, + -0.012262900359928608, + -0.01912858709692955, + -0.010140919126570225, + 0.009848762303590775, + 0.016253147274255753, + -0.03281382843852043, + -0.0020527865272015333, + -0.029738495126366615, + 0.008780082687735558, + -0.0039518061093986034, + -0.010986636392772198, + 0.0015222911024466157, + 0.01368524320423603, + 0.015322859399020672, + -0.007219349965453148, + 0.018636533990502357, + -0.009702683426439762, + -0.007772910408675671, + -0.004459236282855272, + 0.011309546418488026, + 0.0020047342404723167, + 0.021050671115517616, + 0.023695459589362144, + 0.00457456149160862, + 0.002398761687800288, + 0.03764210641384125, + -0.012877967208623886, + -0.007073271553963423, + -0.027170589193701744, + 0.018528897315263748, + -0.027631890028715134, + -0.013108617626130581, + -0.03139917552471161, + -0.02272672951221466, + -0.021819505840539932, + 0.017790816724300385, + 0.03278307616710663, + -0.006842621602118015, + 0.021834881976246834, + 0.005704747512936592, + -0.017529413104057312, + 0.003298297291621566, + -0.01771393232047558, + 0.026724666357040405, + 0.05440268665552139, + 0.016637565568089485, + -0.01597636751830578, + 0.002735126530751586, + 0.008257275447249413, + -0.008141950704157352, + -0.01216295175254345, + 0.01694509945809841, + -0.014523272402584553, + -0.044315584003925323, + 0.02747812308371067, + -0.032875336706638336, + -0.01694509945809841, + 0.004501522518694401, + -0.003905676072463393, + 0.053941383957862854, + 0.035181839019060135, + 0.015315170399844646, + 2.8455862775444984e-05, + -0.016253147274255753, + -0.009779566898941994, + -0.017529413104057312, + 0.03324437513947487, + -0.03779587522149086, + -0.012078380212187767, + 0.03149143606424332, + 6.012521043885499e-05, + -0.0007476909668184817, + 0.03548937290906906, + -0.031583696603775024, + -0.01390051655471325, + -0.014592466875910759, + -0.007496130187064409, + 0.014538648538291454, + -0.013562229461967945, + -0.0039594946429133415, + -0.06233705207705498, + 0.0012435887474566698, + -0.008403354324400425, + -0.006750361528247595, + 0.01234747190028429, + -0.013823633082211018, + -0.008772394619882107, + 0.012416667304933071, + 0.015038390643894672, + -0.023726213723421097, + -0.006104541011154652, + 0.003990247845649719, + 0.00611222954466939, + 0.014538648538291454, + 0.013785191811621189, + -0.026232611387968063, + 0.009133746847510338, + 0.023710837587714195, + -0.003357881912961602, + -0.013915893621742725, + 0.00991026870906353, + 0.02283436618745327, + 0.0023353327997028828, + -0.005320330616086721, + 0.0013877451419830322, + 0.05120433494448662, + 0.015668833628296852, + -0.017467904835939407, + -0.017929205670952797, + 0.0055702016688883305, + 0.013370021246373653, + 0.0196821466088295, + 0.018159857019782066, + -0.023141900077462196, + 0.03502807021141052, + -0.00567783834412694, + -0.01636078581213951, + 0.002106604864820838, + -0.0008024703711271286, + 0.0014886546414345503, + -0.04671434685587883, + -0.026986069977283478, + -0.00023965993023011833, + -0.0023276444990187883, + -0.022203922271728516, + 0.0062890611588954926, + 0.04164004325866699, + 0.02015882357954979, + -0.045607224106788635, + -0.012378225103020668, + -0.009894891642034054, + -0.009464344941079617, + -0.04105572775006294, + -0.005058926995843649, + 0.004163235425949097, + 0.02225005254149437, + 0.002615957288071513, + -0.021004540845751762, + 0.004924381151795387, + 0.007400026079267263, + 0.030691849067807198, + 0.023372549563646317, + 0.018821053206920624, + -0.024864086881279945, + -0.025340763852000237, + 0.039333540946245193, + -0.023264912888407707, + 0.016975851729512215, + -0.04545345902442932, + -0.0076268319971859455, + 0.009487410075962543, + 0.004778302740305662, + -0.03302910178899765, + -0.007799819577485323, + -0.017544789239764214, + -0.004336223006248474, + -0.015476626344025135, + 0.014915376901626587, + 0.013646801002323627, + 0.04373127222061157, + -0.013431527651846409, + -0.0046937307342886925, + -0.01049458235502243, + -0.014984572306275368, + -0.021465841680765152, + 0.010210113599896431, + 0.007607611361891031, + -0.0035385580267757177, + -0.00012853941007051617, + 0.006419762969017029, + -0.006857998203486204, + 0.007461532950401306, + -0.023372549563646317, + -0.01875954680144787, + 0.024710319936275482, + -0.03189123049378395, + -0.027078328654170036, + 0.0007347168866544962, + -0.005028173327445984, + -0.006915660575032234, + 0.02678617276251316, + 0.02411063015460968, + -0.0022738261613994837, + -0.03186047449707985, + 0.006550464779138565, + -0.0020470202434808016, + -0.014108101837337017, + -0.000948068278376013, + -0.04034840315580368, + -0.021634984761476517, + 0.036227453500032425, + 0.011570950038731098, + -0.014615532010793686, + 0.011324922554194927, + 0.017667802050709724, + -0.009010733105242252, + -0.001334887812845409, + 0.004605314694344997, + -0.0018413570942357183, + -0.008095820434391499, + 0.0004903718363493681, + -0.006669634021818638, + -0.008541744202375412, + -0.01875954680144787, + -0.040379155427217484, + 0.0579700730741024, + 0.017314139753580093, + -0.009748813696205616, + -0.008426419459283352, + 0.03149143606424332, + 0.024541176855564117, + -0.006273684557527304, + -0.0031522188801318407, + 0.0028177760541439056, + 0.039364293217659, + 0.012439732439815998, + -0.01563808135688305, + -0.009764189831912518, + 0.01829824596643448, + 0.011009701527655125, + -0.02560216747224331, + -0.014792364090681076, + 0.0075307278893888, + 0.04262414947152138, + -0.027062952518463135, + 0.051757898181676865, + 0.005481785628944635, + 0.03152218833565712, + -0.007561481092125177, + 0.0428701788187027, + 0.010448452085256577, + 0.013346956111490726, + -0.003215647768229246, + 0.010456141084432602, + -0.04569948464632034, + -0.009710371494293213, + -0.010271620936691761, + 0.012209082022309303, + -0.006727296393364668, + -0.02886202372610569, + 0.015945615246891975, + 0.02641713246703148, + 0.015945615246891975, + -0.006066099274903536, + -0.0260788444429636, + 0.00915681105107069, + -0.012124510481953621, + -0.004416950512677431, + -0.03352115675806999, + -0.00045529380440711975, + 0.0005328980041667819, + 0.00834953598678112, + -0.009118369780480862, + 0.00443232711404562, + 0.001973981037735939, + 0.011117338202893734, + -0.024618061259388924, + -0.024310527369379997, + -0.016868215054273605, + 0.03336739167571068, + -0.011678586713969707, + -0.024833334609866142, + -0.003159907180815935, + 0.0031752840150147676, + -0.02038947492837906, + -0.029507843777537346, + 0.006646568886935711, + -0.016606811434030533, + 0.02966161072254181, + 0.009541228413581848, + -0.010263931937515736, + 0.0074077146127820015, + -0.03152218833565712, + -0.0225883387029171, + 0.014061971567571163, + 0.030507327988743782, + 0.011901548132300377, + 0.002064318861812353, + 0.013446904718875885, + -0.04157853499054909, + 0.04656057804822922, + 0.024864086881279945, + -0.011978431604802608, + -0.019728276878595352, + -0.016391538083553314, + -0.007438467815518379, + 0.004578405525535345, + -0.016207018867135048, + -0.009272136725485325, + 0.009072239510715008, + -0.02827771008014679, + 0.0030311276204884052, + 0.010102476924657822, + 0.009472033008933067, + -0.03930278867483139, + -0.002285358728840947, + 0.009602734819054604, + -0.002485255477949977, + 0.02632487192749977, + -0.012301341630518436, + -0.05052776262164116, + -0.00979494396597147, + 0.00904148630797863, + -0.04360825568437576, + -0.028769763186573982, + 0.006761894095689058, + 0.027877915650606155, + -0.014615532010793686, + 0.0237569659948349, + 0.01682208478450775, + -0.009518163278698921, + 0.04268565773963928, + -0.013293137773871422, + 0.043392982333898544, + -0.009102992713451385, + 0.0027293602470308542, + -0.023203406482934952, + -0.003457830287516117, + 0.01772930845618248, + 0.0179445818066597, + 0.007127089891582727, + 0.006419762969017029, + 0.006454360205680132, + 0.020927658304572105, + -0.00834953598678112, + 0.04360825568437576, + 0.004109417088329792, + -0.003707701340317726, + 0.011586326174438, + 0.016729824244976044, + 0.01623777113854885, + 0.017913829535245895, + -0.01240897923707962, + 0.008072755299508572, + -0.0179445818066597, + -0.025786688551306725, + 0.004278560634702444, + 0.0047821467742323875, + 0.024310527369379997, + -0.0015828367322683334, + -0.03118390217423439, + -0.024295151233673096, + 0.03419772908091545, + -0.014338752254843712, + -0.0010754064423963428, + -0.0042593395337462425, + -0.013077864423394203, + 0.050497010350227356, + 0.005374148953706026, + -0.013293137773871422, + 0.007015609182417393, + -0.014746233820915222, + 0.025340763852000237, + -0.00834953598678112, + 0.008141950704157352, + 0.0057970075868070126, + 0.017544789239764214, + -0.026386378332972527, + 0.0030580367892980576, + 0.0417015478014946, + 0.014138855040073395, + -0.04124024882912636, + ], + "index": 78, + }, + { + "title": "CUC Broadcasting", + "text": "CUC Broadcasting was a Canadian media company, active from 1968 to 1995. Active primarily as a cable television distributor, the company also had some holdings in broadcast media and publishing.The company was founded in 1968 by chairman Geoffrey Conway, with shareholders including Jerry Grafstein, Michael Koerner and Ken Lefolii.", + "vector": [ + 0.03923020139336586, + -0.0008029687451198697, + -0.03432251885533333, + -0.020537244156003, + 0.018380364403128624, + 0.006474546156823635, + -0.051264964044094086, + 0.023960119113326073, + -0.05707915872335434, + 0.012910017743706703, + -0.026789069175720215, + -0.026398329064249992, + -0.044325437396764755, + -0.01742696203291416, + -0.009049516171216965, + -0.01351175643503666, + -0.021959533914923668, + 0.02449152246117592, + -0.003225550753995776, + 0.05057726055383682, + 0.04013671353459358, + -0.02777373045682907, + -0.024100784212350845, + -0.01627037301659584, + 0.02320989966392517, + -0.00029647324117831886, + -0.024319598451256752, + 0.00419653719291091, + 0.039105162024497986, + -0.011948799714446068, + 0.020756058394908905, + 0.031806159764528275, + -0.0024323505349457264, + -0.024757225066423416, + -0.0205216147005558, + -0.024194560945034027, + -0.016708001494407654, + -0.009338662959635258, + -0.04942067340016365, + -0.07914809882640839, + 0.0006520457682199776, + 0.0020455189514905214, + 0.013277312740683556, + 0.03913642093539238, + -0.001182962441816926, + -0.0016577104106545448, + -0.0507022999227047, + -0.025632482022047043, + 0.011339247226715088, + 0.03335348516702652, + 0.01194098498672247, + -0.05189014598727226, + 0.03713583946228027, + 0.012714648619294167, + -0.0021881386637687683, + 0.028477061539888382, + -0.006576138082891703, + 0.06620682030916214, + 0.006736340932548046, + 0.01429323386400938, + -0.023678787052631378, + 0.021475017070770264, + 0.04516943544149399, + 0.004720127675682306, + 0.006611304823309183, + 0.04804527387022972, + -0.032259415835142136, + 0.009174552746117115, + -0.019333768635988235, + -0.02133435197174549, + -0.07358397543430328, + -0.03441629558801651, + 0.03463510796427727, + 0.0197713952511549, + 0.03213438019156456, + 0.033634815365076065, + 0.04904556646943092, + -0.0018374503124505281, + 0.020646650344133377, + 0.043575219810009, + 0.046107206493616104, + -0.022584717720746994, + -0.004911589901894331, + 0.008275852538645267, + 0.02300671488046646, + -0.007353708613663912, + -0.061611734330654144, + -0.08696287870407104, + 0.006064270157366991, + 0.041480857878923416, + 0.04223107546567917, + -0.017973996698856354, + 0.02327241748571396, + -0.06058018282055855, + 0.018161550164222717, + 0.012402057647705078, + 0.02097487263381481, + -0.013449237681925297, + -0.0339786671102047, + 0.019505692645907402, + 0.007420134264975786, + -0.021771980449557304, + 0.032572004944086075, + -0.037229616194963455, + 0.03916768357157707, + -0.01475430652499199, + -0.0053609395399689674, + 0.022944197058677673, + 0.031040308997035027, + 0.0633935034275055, + 0.01170654222369194, + 0.018224069848656654, + 0.04238737002015114, + 0.01616096682846546, + -0.03613554686307907, + 0.028805281966924667, + -0.011159507557749748, + 0.04413788393139839, + -0.046513576060533524, + 0.0288834311068058, + -0.008775998838245869, + -0.01662985421717167, + -0.04395032674074173, + -0.033165931701660156, + -0.0060564554296433926, + -0.014777750708162785, + -0.032415710389614105, + 0.003499068086966872, + 0.030884014442563057, + 0.01013577077537775, + -0.06458134949207306, + 0.021725090220570564, + -0.018864881247282028, + 0.0006510689272545278, + -0.0258512943983078, + -0.026851586997509003, + 0.009182367473840714, + 0.03754220902919769, + 0.02782062068581581, + -0.03375985473394394, + 0.05285917967557907, + 0.04470054805278778, + -0.013214794918894768, + 0.0207873173058033, + -0.03197808191180229, + -0.022053312510252, + 0.007900743745267391, + 0.056797828525304794, + -0.004055871162563562, + -0.030149424448609352, + 0.014090050011873245, + -0.002317082602530718, + 0.01602030172944069, + -0.010424917563796043, + 0.00396014004945755, + 0.028101952746510506, + 0.013081943616271019, + -0.0011214211117476225, + 0.007713188882917166, + 0.0033310502767562866, + 0.0031063754577189684, + 0.017770811915397644, + -0.02930542826652527, + -0.015137230977416039, + 0.03757346794009209, + -0.03416622057557106, + 0.026585884392261505, + -0.029743056744337082, + -0.03050890378654003, + 0.017145629972219467, + 0.04185596480965614, + 0.015324785374104977, + -0.03654191642999649, + -0.02914913184940815, + -0.04279373958706856, + -0.0001073311286745593, + -0.040543083101511, + -0.0036006602458655834, + -0.007623318582773209, + 0.03172801062464714, + -0.018224069848656654, + 0.007150524295866489, + 0.03163423389196396, + -0.01864606700837612, + -0.008064853958785534, + 0.03263452649116516, + 0.03082149662077427, + 0.021381240338087082, + -0.04282499849796295, + -0.031602974981069565, + 0.010542139410972595, + 0.02038094773888588, + 0.037073321640491486, + -0.0017466035205870867, + 0.019193101674318314, + 0.0031728011090308428, + -0.012151984497904778, + 0.03149356693029404, + -0.039761606603860855, + -0.02422582171857357, + 0.023147381842136383, + -0.01013577077537775, + 0.0009719633962959051, + -0.00026863309904001653, + 0.029117872938513756, + 0.015582673251628876, + 0.025226112455129623, + -0.0215375367552042, + -0.01784895919263363, + 0.05110866576433182, + 0.006552693899720907, + -0.007959354668855667, + 0.0496707484126091, + 0.021615684032440186, + 0.0012044530594721437, + -0.011347061954438686, + 0.008955738507211208, + 0.004079315811395645, + -0.022647235542535782, + 0.0056461794301867485, + 0.09990415722131729, + 0.011597135104238987, + 0.006935617886483669, + -0.03982412442564964, + -0.02944609522819519, + -0.030180683359503746, + -0.02924291044473648, + -0.016192225739359856, + -0.022115830332040787, + 0.003163032466545701, + -0.034947700798511505, + 0.049139343202114105, + -0.037635985761880875, + 0.011206395924091339, + 0.01930250972509384, + -0.02417893148958683, + -0.0276174359023571, + -0.02417893148958683, + -0.07570959627628326, + 0.0016411039978265762, + -0.040480565279722214, + 0.06751970946788788, + -0.017192518338561058, + 0.0021627405658364296, + 0.015020009130239487, + -0.009033886715769768, + 0.03229067474603653, + -0.04066811874508858, + -0.014957490377128124, + -0.06126788258552551, + 0.00889322068542242, + 0.017020592465996742, + 0.046107206493616104, + -0.037729762494564056, + -0.01575459912419319, + -0.028367655351758003, + 0.029274169355630875, + -0.00864314753562212, + 0.0035068828146904707, + 0.025929443538188934, + 0.005845455918461084, + 0.016536075621843338, + 0.03150919824838638, + -0.022850418463349342, + 0.01733318343758583, + -0.017973996698856354, + -0.014394826255738735, + -0.02260034717619419, + -0.06114284694194794, + 0.0071036359295248985, + 0.014863713644444942, + 0.016911186277866364, + 0.030040018260478973, + 6.996670708758757e-05, + -0.05820448696613312, + 0.028648987412452698, + 0.00572823453694582, + 0.03488518297672272, + -0.05495353788137436, + 0.004384092055261135, + 0.0653940886259079, + -0.049858301877975464, + -0.040418047457933426, + -0.029696166515350342, + 0.007412319537252188, + -0.00017668731743469834, + -0.006388583220541477, + 0.02255345694720745, + -0.0003118586027994752, + -0.013714940287172794, + -0.02099050208926201, + 0.0006789090693928301, + 0.044106625020504, + 0.024444634094834328, + -0.007412319537252188, + 0.005607105325907469, + 0.005548494402319193, + -0.010839100927114487, + -0.04516943544149399, + 0.010120141319930553, + 0.021553166210651398, + 0.009112034924328327, + -0.008783813565969467, + -0.05698538199067116, + -0.03569791838526726, + -0.016754889860749245, + -0.004294222220778465, + 0.04251240938901901, + 0.032915856689214706, + -0.0319468230009079, + -0.006349509581923485, + -0.02752365916967392, + -0.020443467423319817, + -0.021912645548582077, + -0.009158923290669918, + 0.0017895848723128438, + 0.0597987025976181, + 0.009033886715769768, + 0.004513035994023085, + -0.017161259427666664, + 0.07183346897363663, + 0.029117872938513756, + -0.10734383016824722, + 0.020302800461649895, + 0.0344788134098053, + -0.0200214684009552, + 0.028977207839488983, + 0.03857375681400299, + 0.011831577867269516, + 0.04548202455043793, + 0.007599874399602413, + 0.015442007221281528, + 0.005020996555685997, + 0.045231953263282776, + 0.03369733691215515, + -0.014308864250779152, + -0.013089758343994617, + 0.005802474915981293, + -0.022240865975618362, + -0.009112034924328327, + 0.030649570748209953, + -0.0029285892378538847, + -0.010370214469730854, + 0.013707125559449196, + -0.01825532875955105, + -0.00594314094632864, + 0.035354070365428925, + 0.008447778411209583, + -0.004387999419122934, + -0.05210895836353302, + 0.0008899081731215119, + 0.023381823673844337, + -0.017051851376891136, + 0.050764817744493484, + 0.017567627131938934, + 0.026070108637213707, + 0.008744739927351475, + -0.049545712769031525, + -0.04557580128312111, + 0.03529154881834984, + 0.07127080112695694, + -0.04288751631975174, + -0.005337495356798172, + 0.04798275604844093, + -0.004868608433753252, + 0.05739175155758858, + -0.0008024803246371448, + -0.006732433568686247, + 0.019599471241235733, + -0.0010598796652629972, + 0.004372369963675737, + 0.0020044913981109858, + -0.029836833477020264, + 0.01687992736697197, + 0.037792280316352844, + 0.04223107546567917, + -0.04229359328746796, + 0.0010227594757452607, + -0.05432835593819618, + 0.006474546156823635, + -0.05110866576433182, + 0.034447554498910904, + 0.0010628101881593466, + 0.010503065772354603, + -0.03313467279076576, + 0.01692681573331356, + -0.016801778227090836, + -0.02777373045682907, + -0.02169383130967617, + -0.01312883198261261, + -0.014097864739596844, + 0.019958950579166412, + 0.008400889113545418, + 0.017614515498280525, + -5.220029561314732e-05, + 0.003710067132487893, + 0.006025196053087711, + 0.005626642145216465, + 0.02144375815987587, + -0.01931813918054104, + -0.020240282639861107, + 0.03279082104563713, + 0.014238530769944191, + 0.028445802628993988, + -0.024100784212350845, + 0.021178055554628372, + -0.027539288625121117, + -0.028477061539888382, + -0.017145629972219467, + 0.007892929017543793, + 0.01744259148836136, + -0.09183930605649948, + -0.03263452649116516, + 0.002918820595368743, + -0.0024323505349457264, + 0.02869587577879429, + 0.028555208817124367, + -0.008674406446516514, + -0.014949675649404526, + 0.009385552257299423, + 0.02514796517789364, + 0.01966198906302452, + 0.0017905617132782936, + -0.03654191642999649, + 0.058016933500766754, + -0.015879634767770767, + 0.023288046941161156, + -0.039105162024497986, + -0.010714064352214336, + 0.015246637165546417, + 0.030290091410279274, + -0.014144753105938435, + -0.014629269950091839, + 0.054265838116407394, + 0.008877591229975224, + 0.011370506137609482, + -0.03754220902919769, + -0.01188628189265728, + -0.030852755531668663, + 0.017411332577466965, + 0.05013963580131531, + 0.010854730382561684, + -0.046857427805662155, + -0.021990792825818062, + 0.004821719601750374, + -0.022615976631641388, + -0.05564124137163162, + -0.05295295640826225, + -0.01972450688481331, + -0.0007399620953947306, + -0.019943321123719215, + -0.017458220943808556, + -0.01244113128632307, + -0.05379695072770119, + -0.06520653516054153, + -0.007138802204281092, + 0.016582965850830078, + -0.020443467423319817, + 0.016801778227090836, + 0.009362107142806053, + -0.0037413262762129307, + 0.010409288108348846, + 9.273947216570377e-05, + -0.025257371366024017, + -0.05457843095064163, + 0.01825532875955105, + -0.06508149206638336, + -0.04229359328746796, + -0.02707040123641491, + -0.013136646710336208, + 0.02255345694720745, + 0.008783813565969467, + -0.023053603246808052, + 0.010846915654838085, + 0.026242034509778023, + -0.041387081146240234, + 0.05954863131046295, + -0.061924323439598083, + 0.017348812893033028, + 0.04076189547777176, + 0.006099436432123184, + 0.010174844413995743, + -0.030837126076221466, + 0.04785771667957306, + -0.04132455959916115, + -0.039355237036943436, + -0.06298713386058807, + 0.007080191280692816, + -0.036573175340890884, + -0.02099050208926201, + 0.03204060345888138, + 0.064893938601017, + 0.013933754526078701, + 0.021521907299757004, + 0.026382699608802795, + -4.856764280702919e-05, + -0.001554164569824934, + 0.018474141135811806, + -0.013675866648554802, + -0.05767308175563812, + -0.011401765048503876, + 0.047420091927051544, + 0.04641979932785034, + 0.01683303713798523, + -0.01803651452064514, + -0.04585713520646095, + 0.03610428795218468, + 0.07889802753925323, + -0.02300671488046646, + 0.011870652437210083, + 0.0048764231614768505, + 0.08596259355545044, + 0.036323100328445435, + 0.011995689012110233, + -0.006212750915437937, + -0.03463510796427727, + 0.013832162134349346, + -0.02818010002374649, + -0.0010081067448481917, + -0.04951445013284683, + 0.03457259014248848, + 0.013292942196130753, + 0.037948574870824814, + 0.0273673627525568, + 0.006962969899177551, + -0.010159214958548546, + 0.02513233572244644, + 0.02336619421839714, + 0.06445631384849548, + -0.007166154216974974, + -0.009080775082111359, + -0.013832162134349346, + 0.031556084752082825, + -0.026898475363850594, + -0.013621163554489613, + 0.027132919058203697, + 0.017520738765597343, + 0.012738092802464962, + -0.011737801134586334, + -0.015957782045006752, + -0.03107156977057457, + 0.018208440393209457, + 0.03354103863239288, + -0.01429323386400938, + -0.009940401650965214, + 0.026038849726319313, + 0.00821333471685648, + 0.014730862341821194, + 0.0023913229815661907, + 0.004317666403949261, + 0.002365924883633852, + 0.017958367243409157, + 0.0019146213307976723, + -0.02200642228126526, + 0.026382699608802795, + 0.016004670411348343, + 0.025960702449083328, + -0.025929443538188934, + -0.04038678854703903, + 0.009916956536471844, + 0.00933084823191166, + 0.004794368054717779, + 0.01474649179726839, + 0.011690911836922169, + -0.03741716966032982, + -0.003774539101868868, + 0.005802474915981293, + 0.022022051736712456, + -0.03713583946228027, + -0.009487143717706203, + -0.00396014004945755, + 0.043106332421302795, + 0.019021175801753998, + -0.04445047304034233, + 0.005231995601207018, + -0.025226112455129623, + 0.029868092387914658, + 0.006415935233235359, + -0.020896723493933678, + 0.002467517042532563, + 0.00876818411052227, + -0.010596842505037785, + 0.032665785402059555, + 0.0038526870775967836, + -0.004716220311820507, + -0.009901327081024647, + -0.011276728473603725, + 0.00032187128090299666, + -0.02017776481807232, + -0.005204644054174423, + -0.05282791703939438, + -0.07164590805768967, + 0.004239518661051989, + -0.013300756923854351, + 0.0053726620972156525, + -0.01652044616639614, + -0.045794617384672165, + 0.0339786671102047, + -0.021099908277392387, + -0.00897136889398098, + 0.014238530769944191, + 0.05839204415678978, + -0.01961510069668293, + -0.06483142077922821, + 0.002444072626531124, + 0.01866169646382332, + 0.016864297911524773, + -0.02782062068581581, + 0.006494082976132631, + -0.03025883249938488, + -0.03579169511795044, + -0.003958186600357294, + 0.03416622057557106, + -0.0025026835501194, + 0.007978891022503376, + -0.023803822696208954, + -0.011034470982849598, + 0.022240865975618362, + 0.040011677891016006, + 0.01748947985470295, + 0.031040308997035027, + -0.038042351603507996, + -0.01728629507124424, + -0.025991961359977722, + 0.055891312658786774, + 0.015442007221281528, + -0.03929271921515465, + -0.0053140511736273766, + -0.007478745188564062, + -0.005997844506055117, + 0.017301924526691437, + 0.005575845949351788, + 0.02691410481929779, + 0.0032783006317913532, + 0.025788776576519012, + -0.051264964044094086, + 0.010206104256212711, + 0.0004625373403541744, + 0.00031649862648919225, + 0.001915598171763122, + -0.055172353982925415, + 0.010112326592206955, + -0.01956821046769619, + 0.02539803832769394, + -0.018427252769470215, + -0.03222815692424774, + 0.006079899612814188, + 0.001412521698512137, + -0.0024655633606016636, + 0.02655462548136711, + -0.04641979932785034, + -0.012034762650728226, + 0.00182768190279603, + -0.008611888624727726, + -0.034041184931993484, + -0.012675574980676174, + 0.002789876889437437, + 0.021771980449557304, + -0.02352249063551426, + -0.027304844930768013, + -0.025413667783141136, + -0.03732339292764664, + 0.0041770003736019135, + 0.003143495647236705, + -0.015449821949005127, + -0.010510880500078201, + -0.0013627024600282311, + -0.009854438714683056, + -0.02347560226917267, + -0.013113202527165413, + 0.017020592465996742, + 0.04982704296708107, + 0.030852755531668663, + -0.001197615172713995, + -0.030696459114551544, + 0.013730569742619991, + -0.02803943306207657, + 0.005739956628531218, + -0.015801487490534782, + -0.023710045963525772, + 0.005239810794591904, + -0.010362399742007256, + 0.0552348718047142, + -0.0011790550779551268, + 0.004743571858853102, + 0.00731072761118412, + -0.00965125486254692, + -0.02575751766562462, + 0.0035166514571756124, + -0.012151984497904778, + 0.01090161968022585, + -0.0023874156177043915, + 0.03036823868751526, + -1.9216424334445037e-05, + -0.030524535104632378, + 0.030852755531668663, + -0.012683389708399773, + 0.010503065772354603, + -0.017598886042833328, + 0.00697078462690115, + -0.02985246293246746, + 0.021412499248981476, + -0.0028719319961965084, + -0.014519862830638885, + -0.010682805441319942, + -0.004091037902981043, + -0.0011350968852639198, + -0.016645483672618866, + -0.040480565279722214, + -0.02397574856877327, + -0.007279468234628439, + -0.011104803532361984, + -0.03247822821140289, + -0.04395032674074173, + 0.005630549509078264, + -0.02038094773888588, + 0.008705666288733482, + -0.024616559967398643, + -0.01437138207256794, + -0.00858844444155693, + 0.038292426615953445, + 0.008572814986109734, + 0.018208440393209457, + 0.01176124531775713, + 0.005583661142736673, + 0.0010764860780909657, + 0.033322226256132126, + -0.02528863027691841, + 0.010354585014283657, + 0.004259055480360985, + 0.01512941624969244, + -0.0022154904436320066, + -0.011425209231674671, + 0.024710336700081825, + 0.021318722516298294, + 0.021349981427192688, + -0.01784895919263363, + 0.01678614877164364, + 0.03400992602109909, + 0.0037569559644907713, + 0.016848668456077576, + 0.006075992248952389, + 0.010659361258149147, + -0.00882288720458746, + -0.014934046193957329, + -0.019536951556801796, + 0.0009358199895359576, + 0.012347353622317314, + -0.0014437807258218527, + 0.018739843741059303, + 0.01617659628391266, + -0.00019634637283161283, + -0.0076975589618086815, + 0.019505692645907402, + -0.011307988315820694, + 0.021068649366497993, + -0.0063456022180616856, + -0.0038097056094557047, + -0.05217147618532181, + -8.950366463977844e-05, + 0.020771687850356102, + 0.014988750219345093, + 0.01936502754688263, + 0.007205227855592966, + 0.010026363655924797, + 0.0022174441255629063, + 0.008752554655075073, + 0.03269704431295395, + 0.0026511643081903458, + 0.005888437386602163, + -0.011651838198304176, + -0.013871235772967339, + -0.03183741867542267, + -0.03350977972149849, + 0.005103052128106356, + 0.00882288720458746, + 0.02031842991709709, + -0.05057726055383682, + 0.0044661471620202065, + -0.03610428795218468, + -0.01972450688481331, + 0.005571938585489988, + 0.02539803832769394, + -0.026945363730192184, + 0.0030966070480644703, + -0.002184231299906969, + -0.0016508724074810743, + 0.02327241748571396, + -0.0027801082469522953, + -0.013754013925790787, + -0.04438795521855354, + -0.013996272347867489, + 0.0011526801390573382, + -0.01107354462146759, + -0.029883721843361855, + 0.005310143809765577, + 0.01972450688481331, + -0.02442900463938713, + -0.015176304616034031, + -0.008455593138933182, + 0.037792280316352844, + -0.021209314465522766, + -0.010745324194431305, + -0.010479621589183807, + 0.03782353922724724, + 0.009487143717706203, + -0.029946239665150642, + -0.02928979881107807, + -0.04535698890686035, + 0.032415710389614105, + 0.021381240338087082, + -0.05432835593819618, + 0.008658776991069317, + 0.0028269970789551735, + -0.016098449006676674, + -0.008205519989132881, + -0.02210020087659359, + -0.037635985761880875, + -0.0023385731037706137, + 0.04035552963614464, + -0.008940109051764011, + -0.023022344335913658, + 0.012167613953351974, + -0.012488019652664661, + -0.004219981841742992, + 0.04216855764389038, + 0.028977207839488983, + -0.02767995372414589, + 0.008346186019480228, + 0.03329096734523773, + 0.005857178475707769, + -0.0029832925647497177, + -0.036979544907808304, + -0.00714661693200469, + 0.01180813368409872, + 0.006326064933091402, + 0.009119849652051926, + -0.027554918080568314, + 0.04516943544149399, + 0.030024388805031776, + -0.006583952810615301, + -0.05164007097482681, + 0.014410455711185932, + -0.047263793647289276, + -0.04238737002015114, + 0.0025788776110857725, + -0.005009274464100599, + -0.03407244384288788, + -0.010776583105325699, + -0.03604177013039589, + -0.0026374885346740484, + -0.0062674544751644135, + 0.010862545110285282, + 0.005614920053631067, + -0.020396579056978226, + -0.015629561617970467, + -0.006767600309103727, + 0.003540095640346408, + 0.002633581170812249, + -0.02306923270225525, + 0.020865464583039284, + 0.008627518080174923, + -0.028352025896310806, + -0.018536660820245743, + -0.009557477198541164, + 0.023178640753030777, + 0.006689452566206455, + 0.016848668456077576, + 0.03149356693029404, + 0.01941191591322422, + -0.03451007232069969, + 0.0021920460276305676, + 0.02306923270225525, + 0.001353910774923861, + -0.034791406244039536, + -0.02569499984383583, + -0.022381532937288284, + 0.03516651317477226, + 0.028805281966924667, + 0.028617728501558304, + 0.0030184590723365545, + -0.020162135362625122, + -0.010510880500078201, + 0.020646650344133377, + 0.022522198036313057, + 0.0015463497256860137, + 0.00024115925771184266, + 0.016754889860749245, + -0.0005548494518734515, + 0.017755182459950447, + 0.009862253442406654, + 0.041887227445840836, + -0.012081651017069817, + 0.0016831083921715617, + -0.03111845813691616, + 0.03476014360785484, + -0.002977431518957019, + 0.02164694294333458, + 0.0010979766957461834, + -0.06908266246318817, + -0.027804991230368614, + -0.0005216366262175143, + 0.0068144891411066055, + 0.017677035182714462, + 0.03522903099656105, + -0.0025964609812945127, + -0.021068649366497993, + 0.0030575329437851906, + -0.008377444930374622, + 0.019536951556801796, + -0.021459387615323067, + 0.022084571421146393, + -0.008322741836309433, + 0.02230338379740715, + -0.006740248296409845, + 0.014215086586773396, + -0.017598886042833328, + -0.00858844444155693, + -0.03025883249938488, + -0.02194390445947647, + 0.042699962854385376, + 0.01738007180392742, + 0.002828950760886073, + -0.04988956078886986, + 0.03247822821140289, + 0.0009529148228466511, + 0.02397574856877327, + 0.003723743138834834, + 0.04826408624649048, + 0.019193101674318314, + -0.01008888240903616, + -0.010151400230824947, + 0.005103052128106356, + 0.02331930585205555, + 0.010526509955525398, + -0.011925355531275272, + -0.03923020139336586, + 0.0102686220780015, + 0.05457843095064163, + -0.0012923694448545575, + -0.009690328501164913, + -0.0050131818279623985, + -0.00988569762557745, + -0.005067885387688875, + 0.002688284730538726, + 0.054672207683324814, + -0.030790235847234726, + -0.028445802628993988, + -0.028414543718099594, + -0.005693067796528339, + -0.03694828227162361, + 0.0131835350766778, + -0.03161860257387161, + -0.025663740932941437, + -0.02899283729493618, + 0.014176012948155403, + -0.02266286499798298, + -0.018083402886986732, + -0.0027508027851581573, + -0.0456070601940155, + 0.0030653479043394327, + -0.010526509955525398, + 0.01330857165157795, + -0.0028777930419892073, + 0.005767308175563812, + 0.02803943306207657, + 0.017551997676491737, + -0.02270975336432457, + -0.024804115295410156, + 0.05082733556628227, + -0.03329096734523773, + 0.03161860257387161, + -0.051077406853437424, + 0.05754804611206055, + 0.01697370409965515, + 0.015668636187911034, + 0.014683973044157028, + -0.008072668686509132, + 0.008885405957698822, + 0.01487934309989214, + 0.03182178735733032, + 0.01606719009578228, + 0.006439379416406155, + 0.046107206493616104, + -0.003524466184899211, + 0.051421258598566055, + -0.01683303713798523, + -0.00889322068542242, + -0.0010061530629172921, + 0.014683973044157028, + -0.00996384583413601, + -0.020459096878767014, + 0.015426377765834332, + -0.034385036677122116, + 0.004376277327537537, + 0.031196605414152145, + 0.0037725854199379683, + -0.001958579523488879, + -0.015567043796181679, + -0.003680761903524399, + -0.0339474081993103, + 0.00261013675481081, + 0.007209135219454765, + 0.041480857878923416, + -0.005794660188257694, + 0.005540679674595594, + -0.034228742122650146, + 0.040730636566877365, + -0.004223889205604792, + 0.04094945266842842, + -0.00815863162279129, + -0.038292426615953445, + 0.022162718698382378, + -0.00406759325414896, + 0.02803943306207657, + -0.041137006133794785, + -0.03300963342189789, + 0.01905243657529354, + 0.06858251988887787, + 0.005696975160390139, + 0.003254856215789914, + -0.00538438418880105, + -0.007396690081804991, + -0.04988956078886986, + -0.022725382819771767, + 0.03626058250665665, + -0.04557580128312111, + -0.015692079439759254, + 0.00513040367513895, + -0.023553749546408653, + 0.04019923135638237, + -0.011894096620380878, + -0.025569962337613106, + 0.016082819551229477, + 0.008299297653138638, + 0.027914397418498993, + 0.003952325321733952, + -0.016145337373018265, + -0.001206406857818365, + 0.002838719170540571, + -0.026195146143436432, + 0.007064561825245619, + -0.00826022308319807, + -0.009557477198541164, + -0.020459096878767014, + -0.009698143228888512, + -0.04798275604844093, + 0.0022994992323219776, + 0.012050392106175423, + -0.0047240350395441055, + 0.009846623986959457, + -0.025585591793060303, + 0.014105679467320442, + 0.025101076811552048, + -0.008705666288733482, + -0.03000875934958458, + -0.06273706257343292, + 0.019177472218871117, + 0.014301048591732979, + 0.01294909231364727, + -0.0007145640556700528, + -0.0023190362844616175, + -0.002276055049151182, + -0.01449641864746809, + -0.007045025005936623, + -0.00894792377948761, + 0.02058413252234459, + -0.035197772085666656, + 0.013019424863159657, + -0.007326357066631317, + -0.0009524264023639262, + -0.010885990224778652, + 0.0047552939504384995, + 0.007111450657248497, + -0.0030575329437851906, + -0.0049194046296179295, + -0.01703622192144394, + -0.011323617771267891, + -0.0021725089754909277, + 0.0021920460276305676, + -0.020912352949380875, + -0.007045025005936623, + -0.0044075362384319305, + -0.043418921530246735, + -0.010979766957461834, + -0.0034189666621387005, + 0.04141834005713463, + 0.042606186121702194, + 0.002805506344884634, + 0.011339247226715088, + -0.002041611587628722, + 0.015020009130239487, + -0.0013627024600282311, + -0.027836250141263008, + 0.013410164043307304, + -0.010323325172066689, + -0.04085567593574524, + 0.04826408624649048, + -0.0380110926926136, + -0.03232193365693092, + 0.005822011735290289, + 0.028805281966924667, + -0.019068066030740738, + -0.010596842505037785, + -0.004927219357341528, + 0.0030966070480644703, + -0.0026023220270872116, + -0.016895556822419167, + -0.02803943306207657, + 0.0029500797390937805, + 0.0006574184517376125, + -0.010299880988895893, + -0.026335811242461205, + -0.0046302578411996365, + 0.022850418463349342, + -0.027898767963051796, + 0.0005484999273903668, + -0.01176124531775713, + 0.015074712224304676, + -0.03654191642999649, + 0.010096697136759758, + -0.015676449984312057, + -0.021756349131464958, + -0.019583841785788536, + -0.030805867165327072, + 0.015965597704052925, + -0.012769351713359356, + 0.02732047438621521, + -0.010417102836072445, + 0.001020805793814361, + -0.011839393526315689, + 0.018208440393209457, + 0.008299297653138638, + -0.004513035994023085, + 0.004348925780504942, + -0.009416811168193817, + -0.0044505177065730095, + -0.0263514406979084, + -0.005720419809222221, + -0.019802654162049294, + 0.004583369009196758, + -0.030071277171373367, + 0.012128540314733982, + 0.03979286551475525, + 0.0023815545719116926, + -0.0018169365357607603, + -0.004309851676225662, + 0.028101952746510506, + -0.012628685683012009, + 0.019677618518471718, + -0.017817700281739235, + -0.004997552372515202, + 0.006544879171997309, + 0.0024362578988075256, + 0.02655462548136711, + 0.012128540314733982, + 0.013199164532124996, + -0.00624791719019413, + 0.008580629713833332, + 0.005204644054174423, + 0.00722085777670145, + 0.03116534650325775, + 0.0261013675481081, + 0.007189598400145769, + -0.013472681865096092, + -0.028570838272571564, + 0.02352249063551426, + -0.02478848583996296, + -0.011487727984786034, + 0.020365318283438683, + 0.01891176961362362, + 0.004415351431816816, + -0.001217152108438313, + -0.019583841785788536, + -0.006251824554055929, + -0.03863627836108208, + -0.007463115733116865, + 0.031149717047810555, + 0.021256204694509506, + 0.01961510069668293, + 0.00021441804710775614, + 9.365526784677058e-05, + 0.002531989011913538, + -0.05782938003540039, + 0.03898012638092041, + 0.0015062990132719278, + 0.02185012772679329, + 0.0018247513798996806, + 0.016739260405302048, + 0.006455008871853352, + 0.03669821098446846, + -0.01803651452064514, + -0.0007941771182231605, + 0.01866169646382332, + -0.03676072880625725, + 0.01738007180392742, + -0.020099615678191185, + -0.014308864250779152, + 0.005978307221084833, + 0.048639196902513504, + -0.042543668299913406, + 0.02352249063551426, + -0.013519571162760258, + 0.014668343588709831, + -0.02417893148958683, + 0.016911186277866364, + -0.015410748310387135, + -0.010299880988895893, + -0.02185012772679329, + -0.00017668731743469834, + 0.012034762650728226, + 0.009995104745030403, + -0.01262087095528841, + 0.008697851561009884, + 0.0334472618997097, + -0.014129123650491238, + 0.02114679664373398, + -0.02488226257264614, + -0.0023874156177043915, + 0.007646763231605291, + 0.008650962263345718, + -0.005501605570316315, + 0.019443174824118614, + -0.012097280472517014, + -0.001388100441545248, + -0.00271758995950222, + -0.021412499248981476, + -0.017520738765597343, + 0.011620579287409782, + 0.010878174565732479, + 0.02033405937254429, + -0.0009714749758131802, + 0.014160382561385632, + 0.04144959896802902, + 0.0100107342004776, + -0.06008003652095795, + -0.004802182782441378, + 0.024288339540362358, + 0.002508544595912099, + -0.03882383182644844, + -0.01830221712589264, + -0.012589612044394016, + -0.0024499339051544666, + 0.009377737529575825, + 0.003200152888894081, + -0.004579461645334959, + 0.011972243897616863, + 0.011300173588097095, + 0.009252700954675674, + -0.0022447959054261446, + -0.02453841269016266, + -0.005923604127019644, + -0.033322226256132126, + 0.011487727984786034, + -0.022975455969572067, + -0.00034629247966222465, + -0.0506710410118103, + 0.010167029686272144, + -0.007236487232148647, + -0.020115245133638382, + 0.026898475363850594, + -0.004430980887264013, + 0.017661405727267265, + -0.01803651452064514, + 0.02038094773888588, + -0.03610428795218468, + -0.023491231724619865, + -0.03744842857122421, + 0.021006131544709206, + -0.017145629972219467, + 0.03622932359576225, + 0.01789584755897522, + 0.013902495615184307, + -0.013167905621230602, + 0.025585591793060303, + -0.006115065887570381, + -0.021834498271346092, + -0.007338079158216715, + 0.009252700954675674, + 0.0200214684009552, + -0.0007277514669112861, + 0.023991378024220467, + -0.026992253959178925, + 0.00815863162279129, + 0.009721587412059307, + 0.0017348813125863671, + 0.015942152589559555, + -0.012894388288259506, + -0.023491231724619865, + 0.007607689127326012, + 0.031087199226021767, + -0.028305135667324066, + -0.010487436316907406, + -0.011644023470580578, + 0.03111845813691616, + -7.497305341530591e-05, + -0.005458624567836523, + 0.0016938537592068315, + -0.0017329276306554675, + 0.015301341190934181, + 0.0066777304746210575, + 0.04182470589876175, + -0.0007165177376009524, + -0.027382992208003998, + 0.006681637838482857, + 0.05510983616113663, + -0.020396579056978226, + 0.004204351920634508, + 0.05104614794254303, + 0.03357229754328728, + 0.04345018044114113, + 0.01631726324558258, + -0.022319015115499496, + -0.008799443021416664, + -0.02447589300572872, + -0.01574678346514702, + 0.0105186952278018, + -0.011433024890720844, + 0.009244886226952076, + -0.0021490647923201323, + 0.04029301181435585, + -0.005571938585489988, + -0.029993129894137383, + -0.00509523693472147, + 0.02503855712711811, + -0.010784397833049297, + -0.020912352949380875, + 0.007537356112152338, + -0.006599582266062498, + -0.02772684209048748, + 0.012183243408799171, + -0.0023014529142528772, + -0.015848375856876373, + 0.0005020996904931962, + -0.01652044616639614, + -0.03107156977057457, + 0.027851879596710205, + -0.032165639102458954, + -0.003962093964219093, + 0.012714648619294167, + 0.0042551481164991856, + 0.0003211386501789093, + -0.00015214401355478913, + 0.04413788393139839, + -0.012613056227564812, + 0.013269498012959957, + -0.005228088237345219, + 7.546148117398843e-05, + 0.015926523134112358, + 0.03385363146662712, + -0.025663740932941437, + -0.00761550385504961, + 0.019708877429366112, + -0.02910224348306656, + -0.0002392055612290278, + -0.015035638585686684, + -0.014590196311473846, + -0.01692681573331356, + 0.013066313229501247, + 0.0035107904113829136, + -0.014082235284149647, + -0.011550245806574821, + -0.010120141319930553, + -0.022272124886512756, + -0.014762121252715588, + 0.02306923270225525, + -0.022115830332040787, + -0.013191349804401398, + 0.024913521483540535, + 0.009135479107499123, + 0.019193101674318314, + 0.019990209490060806, + -0.0008376468322239816, + 0.016286002472043037, + -0.009362107142806053, + -0.00650189770385623, + 0.00603301078081131, + -0.02874276414513588, + 0.057454269379377365, + -0.03554162383079529, + 0.018317846581339836, + -0.04532572999596596, + -0.007064561825245619, + 0.0062088435515761375, + 0.03797983378171921, + 0.0010032225400209427, + 0.014019716531038284, + -0.013496126979589462, + -0.016457928344607353, + 0.05629768222570419, + -0.013582088984549046, + -0.01742696203291416, + 0.0020357503090053797, + 0.013714940287172794, + 0.008494666777551174, + 0.023350564762949944, + -0.02767995372414589, + 0.008017965592443943, + -0.02031842991709709, + -0.013292942196130753, + -0.003245087806135416, + -0.002002537716180086, + 0.03638561815023422, + -0.0026316274888813496, + -0.0005362893571145833, + 0.05620390549302101, + 0.02417893148958683, + 0.009096404537558556, + -0.008432148955762386, + -0.030743347480893135, + 0.03097779117524624, + 0.016958074644207954, + 0.03416622057557106, + 0.03541658818721771, + 0.044981878250837326, + 0.011495542712509632, + -0.0025026835501194, + 0.03704206272959709, + -0.00727556087076664, + -0.03732339292764664, + -0.01814592070877552, + 0.02828950621187687, + 0.02291293814778328, + -0.0016733399825170636, + 0.01911495439708233, + -0.007142709568142891, + 0.020568503066897392, + 0.011862837709486485, + 0.015152860432863235, + -0.00453648017719388, + 0.012714648619294167, + 0.024038266390562057, + 0.04960823059082031, + -0.009854438714683056, + 0.04238737002015114, + 0.003885899903252721, + 0.023663155734539032, + -0.009698143228888512, + 0.014660528860986233, + -0.018833622336387634, + 0.0006095528951846063, + -0.029258539900183678, + -0.001519974903203547, + 0.01269901916384697, + 0.013316386379301548, + 0.00038268003845587373, + 0.0015336507931351662, + 0.005677438341081142, + 0.025585591793060303, + -0.008807257749140263, + -0.04210603982210159, + -0.012784981168806553, + -0.04776393994688988, + 0.015903079882264137, + -0.0011946846498176455, + 0.0005992960068397224, + -0.005794660188257694, + 0.012628685683012009, + -0.010487436316907406, + 0.009877882897853851, + 0.00024238030891865492, + -0.028352025896310806, + 0.003985538147389889, + 0.02575751766562462, + -0.03127475455403328, + 0.03563540056347847, + -0.03594799339771271, + 0.001749534043483436, + -0.016035931184887886, + -0.02655462548136711, + -0.013730569742619991, + 0.007068469189107418, + 0.041137006133794785, + 0.007021580822765827, + 0.0020064450800418854, + 0.008572814986109734, + -0.0030477645341306925, + -0.003143495647236705, + -0.027351733297109604, + 0.0021588332019746304, + -0.002828950760886073, + 0.0273673627525568, + 0.011964429169893265, + 0.009940401650965214, + 0.01814592070877552, + -0.0015404886798933148, + -0.023288046941161156, + 0.02280353009700775, + 0.004513035994023085, + 0.03898012638092041, + -0.008354000747203827, + -0.011870652437210083, + -0.0068301185965538025, + 0.023835081607103348, + -0.009299589321017265, + -0.024976039305329323, + -0.0020650557707995176, + -0.023131752386689186, + -0.040730636566877365, + 0.05379695072770119, + 0.003807751927524805, + -0.030024388805031776, + -0.027336103841662407, + -0.023647526279091835, + 0.018208440393209457, + 0.022381532937288284, + -0.007017673458904028, + 0.026882845908403397, + -0.006783229764550924, + -0.005161662586033344, + -0.01498093456029892, + -0.03607302904129028, + 0.039917901158332825, + 0.013621163554489613, + -0.01223794650286436, + -0.020771687850356102, + -0.0038057982455939054, + 0.002893422730267048, + -0.011855022981762886, + -0.028305135667324066, + -0.019536951556801796, + -0.014199457131326199, + -0.0349789597094059, + -0.021053019911050797, + -0.03061831183731556, + 0.006892636884003878, + -0.03882383182644844, + 0.010143585503101349, + -0.028602097183465958, + 0.03572917729616165, + -0.008346186019480228, + -0.029696166515350342, + -0.007982798852026463, + 0.030071277171373367, + 0.014637084677815437, + 0.01697370409965515, + ], + "index": 79, + }, + { + "title": "Hardtack (game)", + "text": "Hardtack is a set of rules for American Civil War miniature wargaming by Lou Zocchi. It was published as a thirty-page pamphlet by Guidon Games in 1971, with an introduction by Gary Gygax and artwork by Don Lowry. Hardtack was the first set of American Civil War rules published in the United States and had an early following.", + "vector": [ + -0.01987696997821331, + -0.048177510499954224, + -0.03492619842290878, + 0.007129239849746227, + -0.02134193852543831, + -0.005335484631359577, + 0.00368323246948421, + 0.0022453151177614927, + -0.0007616175571456552, + 0.05267230421304703, + 0.034360188990831375, + 0.036324579268693924, + 0.029033027589321136, + 0.023705866187810898, + -0.0160647202283144, + -0.03136365860700607, + -0.006846234202384949, + 0.026719041168689728, + -0.027734531089663506, + -0.04225104674696922, + 0.1127360463142395, + 0.019960206001996994, + 0.008931318297982216, + 0.027068637311458588, + 0.042384225875139236, + 0.0035105159040540457, + 0.007861724123358727, + -0.019011305645108223, + 0.006030512508004904, + -0.0106210270896554, + -0.007711898069828749, + 0.019460784271359444, + 0.02725175768136978, + 0.004086931236088276, + 0.051740050315856934, + -0.012410620227456093, + 0.004365774802863598, + 0.04488133266568184, + 0.0036020763218402863, + -0.018112346529960632, + 0.021491764113307, + -0.019643906503915787, + -0.01937754824757576, + 0.022823555395007133, + -0.0009899988071992993, + 0.00022408930817618966, + -0.056501202285289764, + 0.0037976831663399935, + -0.014042063616216183, + -0.0008089585462585092, + 0.03133036568760872, + -0.022906791418790817, + 0.03715694695711136, + 0.01802911050617695, + 0.031446896493434906, + -0.006679760292172432, + 0.060163624584674835, + 0.07011875510215759, + -0.02194124460220337, + -0.013825647532939911, + -0.03292851522564888, + -0.027434879913926125, + 0.025420546531677246, + -0.03912133723497391, + 0.011278598569333553, + -0.022723671048879623, + 0.01245223917067051, + 0.08423573523759842, + 0.013692468404769897, + -0.00603467458859086, + -0.003479301929473877, + 0.01166981179267168, + -0.01726333051919937, + 0.031097302213311195, + 0.03892156854271889, + -0.043849192559719086, + 0.03432689234614372, + -0.003479301929473877, + -0.01766286790370941, + 0.004715370014309883, + -0.023372918367385864, + -0.000756415247451514, + -0.040086887776851654, + 0.027684589847922325, + -0.031247127801179886, + -0.019061248749494553, + 0.044947922229766846, + -0.047511618584394455, + -0.01569015346467495, + 0.006521610543131828, + 0.001993523444980383, + 0.02680227905511856, + -0.007333170156925917, + -0.016780557110905647, + 0.0015117899747565389, + 0.028084127232432365, + -0.011361835524439812, + -0.004009937401860952, + 0.019860321655869484, + 0.0018301710952073336, + -0.005564386025071144, + -0.005730859935283661, + 0.01576506718993187, + -0.06072963401675224, + -0.03675740957260132, + -0.036624230444431305, + -0.04521428048610687, + 0.03026493266224861, + 0.007029355503618717, + 0.008240452036261559, + -0.004461497534066439, + 0.007345655467361212, + 0.024638120085000992, + -0.05809934809803963, + -0.059863969683647156, + -0.0011060101678594947, + 0.006983574945479631, + -0.026086442172527313, + -0.005322999320924282, + -0.006296870764344931, + -0.050075314939022064, + 0.031446896493434906, + 0.020542863756418228, + -0.0356253907084465, + -0.0014191889204084873, + -0.015473738312721252, + -0.045414045453071594, + 0.016855470836162567, + -0.03324481472373009, + -0.004109821282327175, + -0.01144507247954607, + 0.0029736380092799664, + 0.05959761515259743, + 0.0037851976230740547, + 0.027218462899327278, + 0.013925531879067421, + 0.00710426876321435, + -0.025187483057379723, + -0.0019321363652125, + 0.020393038168549538, + 0.007766001857817173, + 0.028849905356764793, + -0.003075603162869811, + -0.024538235738873482, + -0.01287674717605114, + -0.002228667726740241, + -0.013267960399389267, + -0.017912577837705612, + -0.004902652930468321, + 0.0118695804849267, + -0.03892156854271889, + 0.03073105961084366, + 0.004311671014875174, + 0.02796759456396103, + -0.009305884130299091, + 0.0027759503573179245, + -0.04974236711859703, + 0.03469313681125641, + 0.015049229376018047, + 0.05120733380317688, + 0.014175242744386196, + 0.039987001568078995, + 0.010604379698634148, + 0.039487581700086594, + 0.03222932294011116, + 0.0356253907084465, + 0.018511883914470673, + 0.05526929348707199, + 0.010479524731636047, + -0.003052712883800268, + 0.011619869619607925, + 0.005231438670307398, + 0.028700079768896103, + 0.018645063042640686, + 0.012335707433521748, + 0.03181314095854759, + 0.03519255667924881, + 0.023223092779517174, + 0.05773310735821724, + -0.036224693059921265, + -0.020459627732634544, + 0.0004307508934289217, + 0.05030837655067444, + -0.005909819155931473, + -0.005164849106222391, + -0.0023888987489044666, + -0.006163691636174917, + 0.016772232949733734, + -0.0048901671543717384, + -0.044947922229766846, + -0.08137238025665283, + -0.0026635804679244757, + -0.062327783554792404, + 0.01766286790370941, + -0.03992041200399399, + -0.011986112222075462, + -0.03719024360179901, + -0.04378260299563408, + -0.002832135185599327, + 0.02916620671749115, + -0.015856627374887466, + 0.05280548334121704, + 0.04521428048610687, + -0.009747039526700974, + 0.015315587632358074, + 0.024288523942232132, + 0.0296656284481287, + 0.005543577019125223, + 0.04025335982441902, + 0.0006991898990236223, + 0.0065132868476212025, + 5.6575074268039316e-05, + -0.009880218654870987, + -0.0024513264652341604, + -0.028000889346003532, + 0.010571084916591644, + 0.04481474310159683, + 0.00886472873389721, + 0.03226261958479881, + 0.03539232537150383, + 0.03635787218809128, + -0.023422861471772194, + -0.04867693409323692, + -0.017862636595964432, + 0.0070335171185433865, + 0.006217795889824629, + -0.011278598569333553, + -0.03808920085430145, + -0.03232920914888382, + -0.030947476625442505, + 0.018461942672729492, + -0.03339464217424393, + -0.007840914651751518, + -0.026519272476434708, + -0.004034908022731543, + -0.018545178696513176, + -0.004390745889395475, + 0.007437216117978096, + 0.010562761686742306, + 0.01525732222944498, + -0.01082079578191042, + 0.03207949921488762, + -0.03136365860700607, + 0.0047112079337239265, + -0.023206444457173347, + 0.03133036568760872, + -0.006667274981737137, + -0.048610344529151917, + -0.01362587884068489, + -0.049775660037994385, + 0.01726333051919937, + -0.012585417367517948, + 0.0612623505294323, + 0.034759726375341415, + -0.024538235738873482, + -0.028550254181027412, + 0.0653243139386177, + -0.009214323945343494, + 0.05104086175560951, + -0.016206221655011177, + -0.03093082830309868, + 0.005052479449659586, + -0.035558801144361496, + -0.025919968262314796, + -0.05470328405499458, + -0.009680449962615967, + -0.037523191422224045, + -0.04488133266568184, + -0.026785630732774734, + 0.043349772691726685, + 0.02545384131371975, + -0.03825567290186882, + -0.029249442741274834, + 0.015731772407889366, + -0.020293153822422028, + -0.012726920656859875, + -0.002378494245931506, + 0.04914306104183197, + -0.022856850177049637, + -0.016580788418650627, + -0.021724827587604523, + -0.018994659185409546, + 0.0761118158698082, + -0.010854090563952923, + -0.051973115652799606, + 0.015498708933591843, + -0.019593963399529457, + -0.023156503215432167, + 0.014283450320363045, + -0.02886655367910862, + 0.01072091143578291, + 0.03469313681125641, + 0.044348616153001785, + 0.010229813866317272, + 0.018961364403367043, + 0.005726697854697704, + 0.016697321087121964, + -0.014641368761658669, + 0.02615303173661232, + -0.017912577837705612, + 0.001269362517632544, + 0.002426355378702283, + -0.05646790564060211, + -0.00936415046453476, + -0.036024924367666245, + -0.0043824221938848495, + -0.0021537544671446085, + 0.028383780270814896, + -0.040086887776851654, + -0.07438048720359802, + 0.0042325956746935844, + -0.03201290965080261, + -0.019610611721873283, + 0.023173149675130844, + -0.007607851643115282, + -0.04970907047390938, + 0.05407068505883217, + 0.009921837598085403, + -0.00849432498216629, + -0.029232796281576157, + 0.021974539384245872, + -0.06249425560235977, + -0.03449336811900139, + -0.01782934181392193, + 0.05616825446486473, + 0.0009130046237260103, + 0.03409383073449135, + 0.010362992994487286, + 0.0015336397336795926, + 0.0010810390813276172, + -0.016697321087121964, + -0.02735164202749729, + 0.0025054304860532284, + -0.02585337869822979, + -0.016073044389486313, + 0.0058723627589643, + 0.012984954752027988, + -0.008773168548941612, + 0.05417056754231453, + 0.004374098498374224, + 0.018961364403367043, + 0.05596848577260971, + 0.020609453320503235, + 0.05460340157151222, + 0.013184723444283009, + -0.030148401856422424, + -0.016247840598225594, + 0.04764479771256447, + -0.01912783645093441, + -0.009439063258469105, + 0.000940576836001128, + 0.03868850693106651, + -0.0031505161896348, + 0.01154495682567358, + 0.00926426611840725, + 0.02363927662372589, + 0.02259049192070961, + -0.031946320086717606, + 0.02299002930521965, + 0.040586307644844055, + 0.014175242744386196, + -0.07751019299030304, + -0.011411777697503567, + 0.03669082000851631, + -0.010304726660251617, + -0.007162534631788731, + -0.0009546231012791395, + -0.04934282973408699, + -0.0038705153856426477, + -0.011112124659121037, + 0.0013838133309036493, + 0.004478144459426403, + -0.03354446589946747, + 0.013992121443152428, + 0.031213833019137383, + -0.012751891277730465, + 0.01942748948931694, + -0.03912133723497391, + -0.06898673623800278, + -0.01857847347855568, + 0.00787004828453064, + -0.01114541944116354, + 0.02299002930521965, + 0.011270275339484215, + 0.020492922514677048, + 0.007724383380264044, + -0.0008448544540442526, + -0.0029965280555188656, + 0.031746551394462585, + -0.021508412435650826, + 0.009838600642979145, + 0.03945428505539894, + -0.06911991536617279, + 0.06189495325088501, + 0.03031487576663494, + -0.03848873823881149, + 0.030448054894804955, + 0.008939642459154129, + 0.007437216117978096, + -0.0072041526436805725, + 0.015507033094763756, + 0.010013397783041, + 0.003941266797482967, + 0.018295468762516975, + -0.0005654906271956861, + 0.041185613721609116, + 0.020060090348124504, + -0.013575936667621136, + -0.03975393995642662, + -0.012868423014879227, + 0.03314492851495743, + 0.011519985273480415, + -6.684962863801047e-05, + 0.019044600427150726, + 0.025137539952993393, + 0.016822176054120064, + -0.06306026875972748, + 0.02343950793147087, + -0.043649423867464066, + -0.009796981699764729, + -0.00789501890540123, + -0.02740158513188362, + -0.015107495710253716, + -0.0274515263736248, + -0.004798606503754854, + -0.048976585268974304, + 0.015973160043358803, + -0.014225184917449951, + 0.01792922616004944, + -8.047316555348516e-07, + 0.07251597940921783, + -0.03818908706307411, + -0.01608969084918499, + 0.018045756965875626, + -0.0016688996693119407, + -0.0691865012049675, + -0.01766286790370941, + 0.04934282973408699, + 0.013858942314982414, + 0.016930382698774338, + 0.026785630732774734, + -0.045813582837581635, + 0.022956734523177147, + -0.028650138527154922, + -0.01721338927745819, + 0.015656858682632446, + -0.07751019299030304, + 0.01413362380117178, + 0.07358141243457794, + -0.005909819155931473, + -0.03083094395697117, + -0.024721356108784676, + -0.022673729807138443, + -0.00038939257501624525, + 0.056900739669799805, + -0.011519985273480415, + -0.03895486518740654, + -0.006871205288916826, + 0.0023119046818464994, + -0.014166918583214283, + -0.012385649606585503, + 0.02303997054696083, + 0.03798931837081909, + -0.0022390722297132015, + 0.03103071264922619, + 0.002692713402211666, + 0.0019727142062038183, + 0.03279533609747887, + -0.02525407262146473, + -0.02911626361310482, + -0.0336277037858963, + -0.06522442400455475, + -0.05297195538878441, + 0.009622184559702873, + 0.014125300571322441, + -0.015373853966593742, + -0.022307487204670906, + -0.0029195339884608984, + -0.031247127801179886, + -0.04125220328569412, + 0.027834415435791016, + -0.0013723681913688779, + -0.006829586811363697, + 0.03307833895087242, + 0.011178714223206043, + -0.04131879284977913, + 0.00039979719440452754, + -0.010121606290340424, + 0.03379417583346367, + 0.033111635595560074, + -0.003920457325875759, + 0.007054326590150595, + 0.04904317483305931, + -0.009455710649490356, + -0.01112044882029295, + 0.031197186559438705, + 0.014616398140788078, + 0.02209107019007206, + -0.022573845461010933, + 0.007907504215836525, + 0.0010222530690953135, + 0.02219095453619957, + 0.048377279192209244, + 0.055901896208524704, + 0.029782159253954887, + 0.03675740957260132, + 0.023822398856282234, + 0.0928923711180687, + 0.011353511363267899, + 0.0045031155459582806, + 0.022657081484794617, + -0.004049474839121103, + 0.0036894751247018576, + 0.0053105135448277, + 0.028500311076641083, + -0.006983574945479631, + -0.000569652474950999, + -0.0061845011077821255, + 0.0037519028410315514, + -0.009730392135679722, + -0.025969909504055977, + -0.013409462757408619, + -0.0311305969953537, + 0.010204842314124107, + 0.02680227905511856, + -0.0003038146533071995, + 0.027434879913926125, + 0.011802990920841694, + 0.04478144645690918, + -0.028034184128046036, + 0.02299002930521965, + 0.006371784023940563, + 0.01992691121995449, + -0.0052480860613286495, + -0.018162289634346962, + 0.03739001229405403, + -0.009414092637598515, + 0.009905190207064152, + -0.009314208291471004, + -0.01352599449455738, + -0.025986557826399803, + -0.015723448246717453, + -0.005256409756839275, + 0.012543799355626106, + -0.029832102358341217, + -0.005963923409581184, + -0.024787945672869682, + 0.024371761828660965, + -0.008889700286090374, + 0.007054326590150595, + 0.019943559542298317, + 0.01673893816769123, + -0.012568769976496696, + -0.01144507247954607, + -0.0004146237624809146, + 0.005539414938539267, + 0.01413362380117178, + 0.01736321486532688, + 0.026236267760396004, + 0.006113749463111162, + 0.04261728748679161, + 0.028983084484934807, + 0.014583103358745575, + -0.010804148390889168, + -0.008806463330984116, + 0.016922060400247574, + 0.03267880156636238, + 0.021508412435650826, + 0.03103071264922619, + 0.02801753766834736, + 0.03509267419576645, + 0.06109587848186493, + 0.028034184128046036, + 0.031596723943948746, + 0.021092228591442108, + 0.028933143243193626, + -0.07651134580373764, + -0.01706356182694435, + 0.03758978098630905, + 0.028150716796517372, + 0.006658951286226511, + -0.012726920656859875, + -0.045513931661844254, + -0.009114439599215984, + -0.03066447004675865, + 0.030497996136546135, + -0.0038830009289085865, + -0.020143328234553337, + -0.002794678555801511, + -0.018262173980474472, + -0.014882756397128105, + 0.03036481700837612, + -0.027934299781918526, + 0.020592806860804558, + 0.0012350273318588734, + 0.03224597126245499, + -0.0075329383835196495, + -0.01671396754682064, + 0.023223092779517174, + -0.03063117526471615, + 0.015032581984996796, + -0.01797916740179062, + 0.036823999136686325, + 0.02570355124771595, + -0.027901004999876022, + -0.004873519763350487, + 0.031546782702207565, + 0.008190509863197803, + 0.02189130149781704, + -0.02996527962386608, + 0.02413869835436344, + 0.018245525658130646, + 0.028184011578559875, + 0.016530847176909447, + -0.034859608858823776, + -0.03695717826485634, + 0.005784963723272085, + -0.029382621869444847, + 0.006933632772415876, + 0.000753814063500613, + 0.056201547384262085, + -0.014899403788149357, + 0.027434879913926125, + 0.0010399408638477325, + 0.012244146317243576, + -0.009663802571594715, + -0.031996261328458786, + 0.0005389588768593967, + -0.007607851643115282, + -0.02655256725847721, + 0.015623563900589943, + -0.0036457758396863937, + -0.03053129091858864, + -0.00742889242246747, + 0.040686190128326416, + 0.02042633295059204, + 0.023472802713513374, + 0.009763686917722225, + 0.0035812673158943653, + -0.043349772691726685, + 0.02279026061296463, + 0.03472642973065376, + 0.01495766919106245, + 0.009946808218955994, + -0.017080210149288177, + -0.005751668941229582, + 0.05646790564060211, + -0.030681118369102478, + 0.022707022726535797, + 0.04175162315368652, + 0.011461719870567322, + -0.002268205164000392, + 0.04568040370941162, + 0.009597213007509708, + 0.008889700286090374, + 0.015981482341885567, + -0.01668899692595005, + 0.01982702687382698, + -0.011802990920841694, + -0.004915138240903616, + -0.027368290349841118, + -0.046213120222091675, + -0.006708893459290266, + 0.02333962358534336, + 0.03798931837081909, + -0.03609151393175125, + -0.00875652115792036, + 0.00027572221006266773, + 0.00855675246566534, + -0.024987714365124702, + -0.022723671048879623, + 0.020060090348124504, + -0.018212230876088142, + 0.01897801086306572, + 0.047012194991111755, + -0.01164484117180109, + -0.019410843029618263, + 0.013983797281980515, + -0.04168503358960152, + -0.04111902415752411, + 0.011719753965735435, + -0.029149558395147324, + 0.009014555253088474, + -0.008290394209325314, + -0.02204112894833088, + -0.025287367403507233, + -0.00042216709698550403, + 0.011378482915461063, + 0.021708181127905846, + 0.003433521604165435, + 0.021158818155527115, + 0.033710941672325134, + -0.013659173622727394, + 0.047112081199884415, + -0.029282737523317337, + -0.013867265544831753, + -0.0031713254284113646, + -0.04211786761879921, + -0.024371761828660965, + 0.02530401386320591, + -0.028533605858683586, + 0.05789957940578461, + 0.02037638984620571, + -0.02525407262146473, + 0.014250155538320541, + 0.0036083192098885775, + -0.014083681628108025, + -0.031097302213311195, + 0.010770853608846664, + 4.1325816710013896e-05, + -0.011278598569333553, + 0.03083094395697117, + 0.04684572294354439, + -0.028283895924687386, + -0.004798606503754854, + 0.026469331234693527, + -0.004553057719022036, + -0.02545384131371975, + -0.00833201315253973, + 0.004076526500284672, + -0.029049674049019814, + 0.015881597995758057, + 0.023705866187810898, + 0.0011184957111254334, + -0.00700438441708684, + 0.024688061326742172, + 0.012543799355626106, + -0.022473961114883423, + -0.012926689349114895, + -0.0026365285739302635, + 0.00936415046453476, + -0.013667497783899307, + -0.033411286771297455, + 0.0005909819155931473, + 0.021108875051140785, + -0.017696162685751915, + 0.013417786918580532, + -0.009272589348256588, + 0.0066839223727583885, + 0.02338956668972969, + 0.03352781757712364, + 0.030098458752036095, + -0.00991351343691349, + -0.031097302213311195, + 0.006817101500928402, + -0.009339178912341595, + -0.011278598569333553, + 0.05147369205951691, + 0.02550378255546093, + -0.003858029842376709, + -0.0002983522426802665, + -0.013051544316112995, + 0.0175629835575819, + -0.016747262328863144, + -0.03209614381194115, + -0.008211319334805012, + 0.013417786918580532, + -0.004511439241468906, + 0.004598838277161121, + -0.01626448892056942, + -0.008606694638729095, + 0.021724827587604523, + -0.03962076082825661, + 0.006929471157491207, + 0.02460482530295849, + -0.0025408060755580664, + -0.019544022157788277, + 0.03888827562332153, + 0.0034231171011924744, + 0.0054395305924117565, + -0.008606694638729095, + 0.04045312851667404, + 0.004461497534066439, + -0.038388852030038834, + -0.013168076053261757, + 0.008123920299112797, + 0.04288364574313164, + -0.015307264402508736, + -0.0160647202283144, + -0.041185613721609116, + -0.006775483023375273, + 0.0259532630443573, + -0.008548428304493427, + -0.02032644860446453, + 0.03394400328397751, + -0.024205287918448448, + -0.027218462899327278, + 0.020492922514677048, + -0.005876524373888969, + 0.003335718298330903, + 0.002426355378702283, + 0.03449336811900139, + -0.015482061542570591, + 0.021375233307480812, + 0.0469789020717144, + 0.011961140669882298, + -0.017279978841543198, + -0.009605537168681622, + 0.004786121193319559, + 0.01736321486532688, + 0.04208457097411156, + 0.00583490589633584, + 0.034759726375341415, + 0.017529688775539398, + 0.041385382413864136, + -0.028500311076641083, + -0.03868850693106651, + 0.01505755353718996, + -0.021758122369647026, + 0.04944271221756935, + 0.04115231707692146, + 0.07784313708543777, + 0.033910710364580154, + 0.0030631176196038723, + -0.042750466614961624, + 0.014025416225194931, + 0.013109810650348663, + 0.0005259530735202134, + 0.06003044545650482, + 0.012835128232836723, + -0.04111902415752411, + 0.013867265544831753, + 0.010953974910080433, + 0.01393385510891676, + 0.025986557826399803, + 0.01591489277780056, + 0.027268406003713608, + -0.015232350677251816, + 0.01673893816769123, + -0.03975393995642662, + -0.017746105790138245, + -0.015507033094763756, + -0.01671396754682064, + -0.050175197422504425, + -0.0656905546784401, + 0.0351259671151638, + -0.0017282059416174889, + 0.034060534089803696, + 0.022973380982875824, + 0.03925451636314392, + -0.019111189991235733, + -0.03482631593942642, + 0.02094240114092827, + -0.0037935213185846806, + -0.022457312792539597, + -0.00700438441708684, + -0.0009723108960315585, + -0.011228656396269798, + -0.06492477655410767, + 0.01967720128595829, + 0.04588017240166664, + 0.05243924260139465, + 0.03344458341598511, + 0.004018261097371578, + -0.001642888062633574, + 0.016772232949733734, + -0.01591489277780056, + 0.05410397797822952, + -0.01526564545929432, + -0.012061025016009808, + 0.028899848461151123, + 0.0006102304323576391, + 0.01666402630507946, + 0.01776275224983692, + 0.02132529206573963, + -0.021525058895349503, + 0.0014150271890684962, + -0.022623786702752113, + 0.059064898639917374, + 0.015615240670740604, + -0.040586307644844055, + -0.012552122585475445, + 0.014674663543701172, + -0.0065840380266308784, + -0.04121890664100647, + -0.00011861256643896922, + -0.019893616437911987, + -0.01092068012803793, + 0.0022349106147885323, + 0.04131879284977913, + -0.016497552394866943, + -0.008598370477557182, + -0.032412443310022354, + 0.005289704538881779, + 0.011112124659121037, + -0.03595833480358124, + 0.03133036568760872, + 0.04441520571708679, + -0.0030672794673591852, + 0.03852203115820885, + -0.016580788418650627, + 0.005314675625413656, + 0.002332713920623064, + -0.006063807290047407, + 0.03675740957260132, + 0.022457312792539597, + -0.016147956252098083, + 0.0031775683164596558, + -0.019993500784039497, + 0.03429359942674637, + 0.012718596495687962, + 0.035259146243333817, + 0.002619881182909012, + 0.04111902415752411, + 0.03479301929473877, + 0.022207602858543396, + 0.00603883620351553, + 0.027035342529416084, + 0.05706721171736717, + -0.03118053823709488, + -0.005277218762785196, + 0.0375564843416214, + -0.014624721370637417, + -0.0005582073936238885, + -0.024704709649086, + 0.00504415575414896, + -0.004061960149556398, + -0.014866109006106853, + 0.01473292987793684, + 0.038222379982471466, + -0.02343950793147087, + 0.012011082842946053, + -0.04894329234957695, + -0.007129239849746227, + 0.010296403430402279, + -0.00020588123879861087, + -0.011236980557441711, + -0.024122050032019615, + 0.028983084484934807, + -0.002007049508392811, + -0.002746817423030734, + -0.019593963399529457, + -0.01124530378729105, + 0.008947965689003468, + -0.04950930178165436, + 0.005064964760094881, + -0.01668899692595005, + -0.04568040370941162, + -0.013442757539451122, + -0.06296038627624512, + -0.009763686917722225, + -0.024171993136405945, + 0.020209917798638344, + 0.02154170721769333, + 0.017845990136265755, + 0.00020210957154631615, + 0.004415716975927353, + -0.013059868477284908, + 0.01623951643705368, + 0.006271899677813053, + 0.026136383414268494, + 0.01827882044017315, + -0.009821953251957893, + -0.0038101687096059322, + -0.038122497498989105, + -0.022573845461010933, + 0.006729702465236187, + -0.019360899925231934, + -0.05476987361907959, + 0.0032982616685330868, + -0.006463344674557447, + 0.023522745817899704, + -0.026619156822562218, + 0.01528229285031557, + -0.023256387561559677, + 0.0009223687811754644, + 0.005839067976921797, + -0.03377753123641014, + -0.01882818527519703, + 0.040086887776851654, + 0.005493634846061468, + -0.01134518813341856, + -0.007999065332114697, + 0.011902875266969204, + -0.02445499785244465, + 0.0018228879198431969, + -0.02072598598897457, + 0.037623073905706406, + 0.0018541017780080438, + 0.03825567290186882, + -0.021358586847782135, + 0.013034896925091743, + -0.045347459614276886, + -0.011678135953843594, + 0.0003272250178270042, + 0.06845401972532272, + -0.011311893351376057, + 0.05596848577260971, + -0.01535720657557249, + 0.02906632237136364, + -0.026186326518654823, + 0.027368290349841118, + -0.021674886345863342, + -0.013143104501068592, + 0.028650138527154922, + 0.03429359942674637, + -0.010804148390889168, + -0.017230035737156868, + 0.016880441457033157, + -0.04478144645690918, + 0.014616398140788078, + 0.03695717826485634, + -0.009114439599215984, + 0.011486690491437912, + -0.03056458570063114, + -0.01947743259370327, + 0.00044401679770089686, + 0.025670256465673447, + -0.0420512780547142, + -0.04864363744854927, + -0.02112552337348461, + -0.011053859256207943, + 0.008244614116847515, + -0.0021121359895914793, + -0.008698254823684692, + 0.010013397783041, + -0.013775705359876156, + -0.0035146777518093586, + -0.032046202570199966, + 0.05230606347322464, + 0.010912355966866016, + 0.04930953308939934, + 0.0037914402782917023, + -0.0058557153679430485, + -0.01972714252769947, + 0.005485311150550842, + -0.011403453536331654, + -0.011678135953843594, + 0.01277686282992363, + -0.016056396067142487, + 0.02715187333524227, + 0.03502608463168144, + -0.013351197354495525, + 0.03649105131626129, + -0.02941591665148735, + 0.025969909504055977, + -0.009131086990237236, + -0.015107495710253716, + 0.005689241457730532, + 0.0356253907084465, + -0.05350467190146446, + -0.0043824221938848495, + 0.022057775408029556, + 0.028233952820301056, + -0.034559957683086395, + -0.020209917798638344, + 0.031396955251693726, + 0.005655946675688028, + 0.04378260299563408, + -0.0405530147254467, + 0.007944961078464985, + -0.010346345603466034, + 0.018312115222215652, + -0.002746817423030734, + 0.02114216983318329, + 0.030497996136546135, + -0.012818480841815472, + -0.025021009147167206, + 0.009963455609977245, + 0.0016043910291045904, + 0.018262173980474472, + -0.028333837166428566, + -0.021092228591442108, + -0.03768966346979141, + -0.028000889346003532, + 0.0055768718011677265, + 0.005360455717891455, + -0.048210807144641876, + -0.023972224444150925, + -0.004777797497808933, + -0.01656414195895195, + 0.00762866111472249, + 0.0021912110969424248, + -0.028650138527154922, + -0.005759992636740208, + 0.024005519226193428, + -0.01051281951367855, + -0.05437033623456955, + 0.03629128262400627, + -0.0010956055484712124, + -0.04884340614080429, + -0.01435836311429739, + 0.018362058326601982, + 0.010188194923102856, + -0.011236980557441711, + -0.035725273191928864, + 0.004411555361002684, + 0.007845076732337475, + 0.013534318655729294, + -0.017146799713373184, + -0.014350039884448051, + 0.005356294102966785, + 0.02082587033510208, + -0.0259532630443573, + -0.014882756397128105, + -0.0076702795922756195, + 0.015007611364126205, + 0.03715694695711136, + -0.013159751892089844, + 0.020992344245314598, + -0.015332235023379326, + -0.026785630732774734, + -0.06439206004142761, + 0.0212420541793108, + -0.01987696997821331, + 0.013575936667621136, + 0.01611466147005558, + -0.004923461936414242, + 0.008590047247707844, + -0.028184011578559875, + 0.01216923352330923, + 0.014166918583214283, + -0.01270194910466671, + 0.0023431184235960245, + 0.028350485488772392, + -0.018012462183833122, + 0.0004934386815875769, + -0.029698923230171204, + 0.009513976983726025, + -0.013043221086263657, + 0.018095700070261955, + -0.04994213581085205, + -0.03935440257191658, + -0.010030045174062252, + -0.010953974910080433, + -0.020592806860804558, + -0.0023160665296018124, + -0.002386817941442132, + 0.003110978752374649, + -0.02650262601673603, + -0.029349327087402344, + -0.019943559542298317, + -0.01736321486532688, + 0.01912783645093441, + 0.008773168548941612, + 0.025087598711252213, + 0.014166918583214283, + 0.020060090348124504, + 0.029998574405908585, + -0.013534318655729294, + -0.049276240170001984, + 0.001562772667966783, + 0.03299510478973389, + 0.009572242386639118, + 0.006259414367377758, + -0.02388898655772209, + 0.00019664714636746794, + 0.013684145174920559, + -0.002058032201603055, + 0.017130151391029358, + -0.03141360357403755, + 0.011003917083144188, + 0.03459325060248375, + 0.053637851029634476, + -0.005901495460420847, + -0.0173132736235857, + -0.0017479746602475643, + 0.0073623028583824635, + 0.007087621372193098, + 0.020442979410290718, + 0.007025193423032761, + 0.00971374474465847, + 0.01802911050617695, + 0.0004825138603337109, + 0.012344030663371086, + 0.008352821692824364, + 0.03685729578137398, + -0.0721830278635025, + 0.0056975651532411575, + 0.0013754896353930235, + -0.015273969620466232, + 0.004719531629234552, + 0.005339646711945534, + 0.056601084768772125, + 0.01144507247954607, + 0.005352132022380829, + 0.03201290965080261, + 0.016356049105525017, + 0.021475117653608322, + 0.007433054503053427, + 0.030081812292337418, + -0.011403453536331654, + 0.027801120653748512, + -0.025337308645248413, + -0.016281135380268097, + 0.024871183559298515, + -0.003610400017350912, + -0.0063551366329193115, + 0.004894329234957695, + 0.035259146243333817, + 0.015273969620466232, + 0.01350102387368679, + 0.017479747533798218, + -0.01370911579579115, + -0.020343095064163208, + 0.027734531089663506, + 0.010138253681361675, + -0.005081612151116133, + -0.021724827587604523, + 0.01696367748081684, + 0.004765312187373638, + 0.003115140600129962, + -0.015124143101274967, + 0.04185150936245918, + -0.03294515982270241, + -0.0042825378477573395, + -0.0030964124016463757, + -0.01648922823369503, + 0.0154570909217, + -0.001020172145217657, + 0.0039724805392324924, + -0.02670239470899105, + -0.01196946483105421, + 0.0004913577577099204, + -0.0003373695071786642, + 0.004105659667402506, + -0.013967149890959263, + -0.024471646174788475, + -0.009214323945343494, + 0.012160909362137318, + -0.026485977694392204, + -0.013434434309601784, + -0.016156280413269997, + -0.02229083888232708, + -0.03046470135450363, + -0.036923885345458984, + 0.002084043575450778, + 0.014766224659979343, + 0.00040890122181735933, + 0.00017973965441342443, + -0.04228433966636658, + -0.003914214670658112, + 0.01726333051919937, + -0.008889700286090374, + 0.032412443310022354, + 0.009014555253088474, + 0.009572242386639118, + -0.022906791418790817, + 0.014100329019129276, + 0.03063117526471615, + 0.008386116474866867, + 0.0009676288464106619, + -0.01837870478630066, + -0.04964248090982437, + -0.014258479699492455, + -0.001665778225287795, + -0.00411606440320611, + -0.007058488205075264, + 0.009846923872828484, + 0.038022611290216446, + 0.0031838109716773033, + -0.0010638715466484427, + -0.020409684628248215, + -0.0016012697014957666, + 0.021724827587604523, + 0.02358933538198471, + -0.00787004828453064, + 0.017046915367245674, + 0.007295713294297457, + 0.007745192851871252, + -0.022773612290620804, + 0.0016179170925170183, + -0.009039525873959064, + 0.015049229376018047, + 0.020442979410290718, + 0.05963090807199478, + -0.01807905174791813, + 0.012019407004117966, + -0.022274192422628403, + -0.030348170548677444, + 0.006417564116418362, + 0.010204842314124107, + -0.001656414126046002, + 0.031147243455052376, + 0.016372695565223694, + 0.005801611114293337, + 0.0017167608020827174, + -0.011736401356756687, + -0.020060090348124504, + -0.019960206001996994, + -0.022407371550798416, + -0.01603974960744381, + -0.03675740957260132, + -0.0042617288418114185, + -0.00722912373021245, + -0.022823555395007133, + 0.0010695940582081676, + -0.01518240850418806, + -0.03729012608528137, + 0.019943559542298317, + -0.010604379698634148, + -0.018212230876088142, + -0.00875652115792036, + 0.018911421298980713, + 0.005797449499368668, + 0.005693403072655201, + 0.003206701250746846, + 0.017646221444010735, + 0.014200213365256786, + 0.006467506289482117, + -0.029848748818039894, + -0.016081366688013077, + -0.051939819008111954, + -0.005560224410146475, + -0.014691310934722424, + 0.04881011322140694, + -0.011028887704014778, + 0.02996527962386608, + 0.013992121443152428, + 0.03825567290186882, + -0.02585337869822979, + -0.025220777839422226, + -0.0010336980922147632, + 0.01638934388756752, + -0.001215258613228798, + 0.01166981179267168, + 0.03565868362784386, + -0.01581500843167305, + -0.0259532630443573, + 0.041185613721609116, + -0.008798139169812202, + 0.004848548676818609, + -0.02017662301659584, + 0.010030045174062252, + -0.021874655038118362, + 0.017579631879925728, + -0.016430962830781937, + -0.02122540771961212, + -0.027834415435791016, + -0.01546541415154934, + 0.023705866187810898, + -0.001391096506267786, + -0.024205287918448448, + 0.007274904288351536, + 0.02986539527773857, + -0.027018694207072258, + -0.017396509647369385, + -0.02154170721769333, + 0.015898246318101883, + -0.009638831950724125, + -0.013900560326874256, + 0.008298718370497227, + -0.0002905487781390548, + -0.001778148114681244, + 0.011703106574714184, + -0.004873519763350487, + -0.005468663759529591, + 0.037822842597961426, + -0.021408528089523315, + -0.019510727375745773, + -0.04311670735478401, + -0.01591489277780056, + 0.0020830032881349325, + 0.013143104501068592, + -0.0008667040965519845, + 0.012135938741266727, + -0.018861480057239532, + 0.005780802108347416, + 0.01927766390144825, + 0.010288079269230366, + -0.009655479341745377, + 0.02801753766834736, + -0.027950948104262352, + -0.03469313681125641, + -0.025686904788017273, + -0.007990741170942783, + 0.014541484415531158, + -0.02981545403599739, + 0.023572687059640884, + 0.015581945888698101, + -0.026868868619203568, + -0.002426355378702283, + 0.006196986418217421, + -0.0008370509603992105, + 0.01390888448804617, + -0.018095700070261955, + 0.00029653141973540187, + 0.03695717826485634, + 0.029232796281576157, + 0.004756988491863012, + 0.0036624232307076454, + -0.004719531629234552, + 0.045813582837581635, + 0.010055016726255417, + 0.032911866903305054, + -0.02077592723071575, + 0.01766286790370941, + -0.010837443172931671, + 0.019410843029618263, + -0.002053870353847742, + 0.006067969370633364, + -0.02159164845943451, + -0.019360899925231934, + 0.030747707933187485, + 0.006954442244023085, + 0.038422148674726486, + 0.02017662301659584, + 0.0017552579520270228, + -0.022057775408029556, + -0.0016449689865112305, + 0.013184723444283009, + -0.005114906933158636, + 0.005468663759529591, + -0.02801753766834736, + -0.005676755681633949, + 0.0009410970960743725, + 0.011911199428141117, + 0.014541484415531158, + 0.011561604216694832, + 0.019593963399529457, + 0.030747707933187485, + -0.009705421514809132, + -0.006309356074780226, + 3.4465276257833466e-05, + 0.025187483057379723, + 0.01483281422406435, + 0.009622184559702873, + 0.011736401356756687, + -0.010121606290340424, + 0.0020725985523313284, + -0.023705866187810898, + -0.024088755249977112, + 0.0014576860703527927, + -0.008049007505178452, + 0.0020060089882463217, + 0.047611501067876816, + -0.017945872619748116, + 0.024971067905426025, + -0.01827882044017315, + -0.022723671048879623, + 0.016048071905970573, + 0.024787945672869682, + 0.02881661057472229, + -0.031197186559438705, + 0.011128772050142288, + -0.024671414867043495, + -0.008223804645240307, + 0.026768984273076057, + -0.0037976831663399935, + -0.034160420298576355, + -0.011153743602335453, + -0.002877915510907769, + -0.005202305503189564, + -0.00291745294816792, + -0.0038330587558448315, + 0.006958603858947754, + 0.030098458752036095, + -0.001193408970721066, + -0.003354446729645133, + 0.006812939420342445, + -0.0006180339260026813, + 0.0014254316920414567, + -0.05829911679029465, + -0.013059868477284908, + -0.0420512780547142, + 0.004665427841246128, + -0.0023306328803300858, + -0.024022165685892105, + 0.024388408288359642, + -0.018545178696513176, + -0.006617332808673382, + 0.023722514510154724, + 0.01463304553180933, + -0.0026760660111904144, + 0.009722068905830383, + 0.006908661685883999, + -0.002049708506092429, + 0.025770140811800957, + -0.0031359498389065266, + -0.03915463387966156, + -0.0005145080504007638, + -0.01837870478630066, + -0.005227276589721441, + 0.027035342529416084, + 0.009447387419641018, + 0.02142517641186714, + -0.003610400017350912, + -0.017796047031879425, + 0.031546782702207565, + 0.01124530378729105, + -0.02433846704661846, + -0.0036083192098885775, + -0.012019407004117966, + 0.002871672622859478, + -0.013009926304221153, + -0.006380107719451189, + -0.027484821155667305, + 0.02946585975587368, + -0.03472642973065376, + 0.0030776839703321457, + 0.03519255667924881, + -0.0014712120173498988, + -0.018894774839282036, + -0.020409684628248215, + -0.025820083916187286, + -0.041085727512836456, + -0.0003581787459552288, + -0.017146799713373184, + 0.011561604216694832, + -0.0003053753462154418, + 0.02129199728369713, + -0.009205999784171581, + 0.008369469083845615, + -0.024388408288359642, + 0.0065840380266308784, + -0.0044198790565133095, + -0.02229083888232708, + -0.008698254823684692, + 0.008706578984856606, + -0.017679516226053238, + -0.0045031155459582806, + 0.011611546389758587, + -0.005385426804423332, + -0.009597213007509708, + 0.013659173622727394, + 0.004960918799042702, + -0.016347724944353104, + 0.018062405288219452, + -0.013484376482665539, + 0.01932760514318943, + -0.015273969620466232, + -0.022573845461010933, + 0.020159974694252014, + 0.01776275224983692, + -0.021258702501654625, + -0.0027301700320094824, + -0.018295468762516975, + -0.00916438177227974, + -0.025919968262314796, + 0.0019425408681854606, + -0.03982052952051163, + -0.027901004999876022, + 0.026719041168689728, + -0.02881661057472229, + 0.002193292137235403, + -0.007453863508999348, + ], + "index": 80, + }, + { + "title": "Adjournment sine die", + "text": 'Adjournment sine die (from the Latin "without day") means "without assigning a day for a further meeting or hearing". To adjourn an assembly sine die is to adjourn it for an indefinite period.', + "vector": [ + -0.008480370976030827, + 0.004539786372333765, + -0.01259988360106945, + 0.05502670630812645, + 0.026314949616789818, + 0.031424809247255325, + 0.009562263265252113, + 0.025183124467730522, + 0.00039634708082303405, + -0.035818956792354584, + -0.005621678661555052, + 0.02167113497853279, + -0.018025990575551987, + -0.04224373400211334, + -0.021787647157907486, + -0.0077771409414708614, + -0.03701736032962799, + 0.022253692150115967, + 0.04314253479242325, + -0.006695248652249575, + -0.04091217368841171, + 0.01522971410304308, + 0.018259013071656227, + 0.02035621926188469, + 0.042476754635572433, + 0.0003061027091462165, + -0.029460759833455086, + -0.0015500187873840332, + -0.01909123733639717, + 0.003923940006643534, + -0.009961731731891632, + 0.0005529093905352056, + 0.07157133519649506, + 0.03731696307659149, + -0.007960230112075806, + -0.03725038468837738, + 0.07729703933000565, + -0.015787305310368538, + -0.004606364294886589, + -0.0010912548750638962, + -0.04307595640420914, + 0.01754329912364483, + -0.051065314561128616, + 0.024866878986358643, + -0.04643814638257027, + 0.019523994997143745, + -0.019057948142290115, + -0.007956069894134998, + 0.000991908018477261, + 0.028362222015857697, + -0.008001841604709625, + 0.02152133360505104, + -0.006603704299777746, + 0.031657833606004715, + 0.006761827040463686, + 0.010885501280426979, + 0.029460759833455086, + -0.034853577613830566, + -0.05173109471797943, + -0.04733694717288017, + -0.016220062971115112, + -0.030542651191353798, + 0.016669463366270065, + 0.01815914548933506, + 0.0018912309315055609, + 0.02668112888932228, + 0.02786288782954216, + -0.003499505342915654, + -0.020223064348101616, + -0.006021146662533283, + 0.026098571717739105, + -0.049966778606176376, + -0.036584604531526566, + 0.004240185488015413, + -0.026398172602057457, + -0.029444115236401558, + -0.03758327290415764, + 0.033854905515909195, + -0.02693079598248005, + -0.014239367097616196, + -0.04157795384526253, + -0.019074592739343643, + -0.03182427957653999, + -0.015953749418258667, + -0.005080732516944408, + -0.01248337235301733, + -0.01682758703827858, + -0.049101267009973526, + 0.008929772302508354, + -0.0003867244813591242, + 0.003665950382128358, + -0.0344541072845459, + 0.055759064853191376, + 0.007311095017939806, + -0.006170947104692459, + -0.02974371612071991, + 0.018841570243239403, + 0.021771002560853958, + 0.006770148873329163, + -0.08448746800422668, + -0.010719056241214275, + -0.049267709255218506, + 0.010594221763312817, + -0.011018657125532627, + -0.05229700729250908, + 0.025865547358989716, + -0.00137005012948066, + 0.00935420673340559, + -0.009087895043194294, + 0.041211772710084915, + 0.01706060953438282, + -0.010153142735362053, + 0.017410144209861755, + 0.0068533713929355145, + -0.05938756465911865, + -0.036584604531526566, + -0.006187591701745987, + -0.02951069362461567, + -0.0029668814968317747, + 0.03035956248641014, + -0.003921859432011843, + -0.03521975502371788, + 0.028828268870711327, + -0.03147474303841591, + 0.007951908744871616, + 0.0014740782789885998, + 0.04330898076295853, + 0.018192434683442116, + -0.026830928400158882, + 0.036584604531526566, + -0.019623862579464912, + -0.043475426733493805, + -0.02065582014620304, + -0.0038323954213410616, + 0.01877499185502529, + 0.006532964762300253, + -0.0440080501139164, + -0.009878508746623993, + -0.014497356489300728, + 0.02278631553053856, + -0.009637163951992989, + 0.02067246474325657, + 0.03184092044830322, + 0.03511988744139671, + 0.032306969165802, + -0.03904798999428749, + -0.005309594329446554, + 0.003703400492668152, + -0.012500016950070858, + 0.03215716779232025, + -0.02866182290017605, + 0.007128005847334862, + 0.02623172663152218, + -0.008384665474295616, + -0.006483031436800957, + -0.013357209041714668, + 0.023901497945189476, + -0.003366349497810006, + 0.0001643644063733518, + -0.03904798999428749, + 0.020689109340310097, + 0.03438752889633179, + -0.008018486201763153, + 0.04164453223347664, + -0.04513987526297569, + 0.0055134897120296955, + -0.009420785121619701, + -0.048868242651224136, + 0.005534294992685318, + 0.00896306149661541, + -0.015595893375575542, + -0.011218390427529812, + -0.014189433306455612, + -0.05472710356116295, + 0.011800948530435562, + 0.006050274707376957, + 0.008680105209350586, + 0.038082607090473175, + 0.015263003297150135, + 0.040812306106090546, + -0.040046658366918564, + 0.01792612299323082, + 0.002727616811171174, + -0.020139841362833977, + 0.030642518773674965, + -0.02779630944132805, + 0.03335557132959366, + -0.02551601268351078, + 0.051531363278627396, + -0.03285623714327812, + -0.016078583896160126, + -0.0382157638669014, + 0.06464722752571106, + 0.010793955996632576, + 0.019707083702087402, + 0.0029606397729367018, + -0.029377536848187447, + 0.006541287060827017, + 0.0018756267381832004, + 0.010793955996632576, + -0.009753675200045109, + -0.015471059828996658, + -0.02097206562757492, + 0.08954739570617676, + -0.06438091397285461, + -0.00046942682820372283, + 0.05479368194937706, + 0.01714383251965046, + 0.027430130168795586, + -0.021854223683476448, + 0.002577816369011998, + -0.011709403246641159, + -0.03239019215106964, + 0.03350537270307541, + 0.02065582014620304, + 0.0029315119609236717, + -0.0579228475689888, + -0.042776357382535934, + 0.04783628508448601, + -0.02363518625497818, + -0.002844128292053938, + -0.0399467907845974, + -0.029061291366815567, + 0.02589883655309677, + -0.03412121906876564, + -0.009404140524566174, + 0.02348538488149643, + 0.01987352967262268, + -0.010785633698105812, + 0.02762986533343792, + -0.009995019994676113, + 0.013240696862339973, + 0.018275657668709755, + -0.005326238926500082, + -0.007331900764256716, + -0.02080562151968479, + 0.05439421534538269, + -0.04727037250995636, + 0.02340216189622879, + -0.036351580172777176, + -0.015346226282417774, + 0.05489354953169823, + -0.02348538488149643, + 0.0018381766276434064, + -0.01200900413095951, + -0.018908148631453514, + 0.023069271817803383, + -0.005850540474057198, + -0.010519322007894516, + -0.010768989101052284, + -0.017243698239326477, + 0.031108563765883446, + -0.002606944413855672, + -0.010003342293202877, + -0.0361851342022419, + 0.022053958848118782, + -0.012192093767225742, + -0.017018998041749, + -0.0077688186429440975, + 0.03308925777673721, + 0.007598212920129299, + 0.009470718912780285, + 0.0004806098295375705, + -0.025782326236367226, + -0.020372863858938217, + 0.009312596172094345, + 0.009087895043194294, + 0.0028690951876342297, + 0.01909123733639717, + -0.03204065561294556, + -0.06697745621204376, + -0.01965714991092682, + -0.01885821484029293, + 0.005887990817427635, + -0.029310958459973335, + 0.005575906485319138, + 0.010993690229952335, + 0.025848902761936188, + 0.09340891242027283, + 0.053894881159067154, + -0.01490514725446701, + -0.042310312390327454, + -0.03521975502371788, + -0.046837612986564636, + 0.04467383027076721, + 0.00907957274466753, + -0.02010655216872692, + 0.004781131632626057, + -0.006811760365962982, + 0.00783123541623354, + -0.0243342537432909, + 0.004167365841567516, + 0.03578566759824753, + 0.0353529118001461, + 0.0518309623003006, + 0.017343565821647644, + -0.01568743772804737, + -0.021970735862851143, + -0.03405464068055153, + -0.034154508262872696, + 0.02122173272073269, + 0.04800272732973099, + 0.013581909239292145, + 0.02559923566877842, + 0.01291612908244133, + -0.01181759312748909, + 0.016877518966794014, + 0.033072616904973984, + -0.006025307811796665, + -0.042310312390327454, + 0.04244346544146538, + -0.0573236458003521, + 0.06691087782382965, + -0.021621201187372208, + 0.0067743100225925446, + -0.015637503936886787, + 0.0009846260072663426, + -0.027263686060905457, + 0.03077567368745804, + -0.0234687402844429, + 0.0097786420956254, + 0.01225034985691309, + 6.607409886782989e-06, + -0.027646509930491447, + 0.04940086603164673, + -0.048801664263010025, + -0.002569494303315878, + -0.007743852213025093, + 0.06870847940444946, + -0.01784290000796318, + -0.017709745094180107, + -0.019290972501039505, + 0.005771479103714228, + 0.006840887945145369, + -0.02991016022861004, + 0.0013336403062567115, + -0.0010491234716027975, + 0.011642825789749622, + 0.04513987526297569, + -0.04357529431581497, + 0.028711756691336632, + -0.03442081809043884, + 0.07723046839237213, + -0.022320270538330078, + 0.04540618881583214, + 0.04737023636698723, + -0.018675126135349274, + -0.005754834972321987, + 0.026664484292268753, + 0.02065582014620304, + 0.0006897063576616347, + -0.027962755411863327, + -0.005022476892918348, + 0.007473378907889128, + 0.006391486618667841, + -0.04021310433745384, + -0.017010675743222237, + -0.03179099038243294, + 0.018758347257971764, + -0.01216712687164545, + -0.0005425065755844116, + 0.000173856969922781, + 0.041677821427583694, + -0.013756676577031612, + -0.0019713325891643763, + -0.045739077031612396, + -0.01800934597849846, + -0.0015760257374495268, + 0.03615184873342514, + 0.06644482910633087, + -0.02574903704226017, + -0.016919130459427834, + 0.04467383027076721, + 0.002650636015459895, + 0.026031993329524994, + 0.012266994453966618, + 0.039247725158929825, + -0.025449436157941818, + 0.01925768330693245, + -0.006229202728718519, + 0.02528299018740654, + 0.06567918509244919, + -0.023335585370659828, + 0.03277301415801048, + -0.01784290000796318, + -0.06448078155517578, + 0.012075582519173622, + 0.004477369599044323, + -0.006557931657880545, + -0.022187113761901855, + 0.0015312937321141362, + 0.024983389303088188, + 0.017743034288287163, + -0.04037955030798912, + 0.006170947104692459, + 0.016919130459427834, + -0.013523654080927372, + 0.015121525153517723, + 0.056624576449394226, + 0.006757665891200304, + 0.008459565229713917, + -0.04357529431581497, + -0.0012493774993345141, + 0.006899144034832716, + -0.015188103541731834, + 0.025233056396245956, + -0.018192434683442116, + -0.01240847259759903, + -0.009920120239257812, + -0.028828268870711327, + -0.0144058121368289, + 0.033372215926647186, + 0.022719739004969597, + -0.033788327127695084, + -0.01754329912364483, + 0.0023323101922869682, + -0.002054555108770728, + 0.007194583769887686, + 0.02261987142264843, + -0.0005539496778510511, + -0.013665132224559784, + -0.03848207741975784, + -0.03701736032962799, + -0.005704901181161404, + 0.08209066092967987, + 0.007552440278232098, + -0.0030168150551617146, + 0.016503019258379936, + -0.011676114052534103, + -0.013465397991240025, + -0.07257000356912613, + 0.0804927870631218, + 0.06970715522766113, + 0.04553934186697006, + -0.0010787714272737503, + -0.01060254406183958, + -0.046071965247392654, + 0.03167447820305824, + -0.025382857769727707, + 0.08242354542016983, + -0.04107861965894699, + -0.04900139942765236, + 0.0063706813380122185, + 0.014139500446617603, + 0.02363518625497818, + -0.03571908921003342, + -0.015096558257937431, + -0.02027299627661705, + 0.07190422713756561, + 0.015654148533940315, + -0.0040820627473294735, + -0.034853577613830566, + 0.03428766503930092, + 0.012075582519173622, + 0.10166458785533905, + 0.025765681639313698, + 0.012308605015277863, + -0.06671114265918732, + 0.0440080501139164, + 0.0007760496810078621, + 0.006487192586064339, + 0.037982743233442307, + 0.01775967888534069, + -0.015096558257937431, + 0.06754336506128311, + 0.004835226107388735, + 0.026647839695215225, + -0.01593710482120514, + 0.022503359243273735, + 0.016944097355008125, + -0.028145844116806984, + -0.016810942441225052, + -0.08029305189847946, + 0.022436780855059624, + 0.012017326429486275, + -0.008243187330663204, + -0.08262328058481216, + -0.005942085292190313, + -0.010860534384846687, + 0.02261987142264843, + 0.02714717388153076, + -0.027646509930491447, + -0.04600539058446884, + -0.020289640873670578, + -0.025948770344257355, + 0.04940086603164673, + 0.0195572841912508, + -0.018259013071656227, + -0.03758327290415764, + 0.00896306149661541, + 0.05266318842768669, + 0.01925768330693245, + 0.044640541076660156, + 0.0008545909076929092, + 0.013065929524600506, + -0.011201746761798859, + 0.016369862481951714, + 0.018958082422614098, + 0.03891483321785927, + 0.048868242651224136, + -0.01714383251965046, + 0.04161124303936958, + 0.0440080501139164, + 0.02872840128839016, + -0.0175266545265913, + 0.0033205770887434483, + -0.015104880556464195, + -0.02458392083644867, + -0.031041987240314484, + 0.036984071135520935, + -0.040512703359127045, + -0.026880862191319466, + -0.004385824780911207, + -0.009920120239257812, + 0.03748340532183647, + 0.010402810759842396, + -0.02536621317267418, + -0.03961390256881714, + -0.020456086844205856, + 0.03328899294137955, + 0.0003867244813591242, + 0.0015770660247653723, + 0.01784290000796318, + 0.02255329303443432, + -0.021421467885375023, + 0.01676100865006447, + 0.040412839502096176, + -0.005247177556157112, + -0.024450765922665596, + 0.008621849119663239, + -0.007548279128968716, + -0.029077935963869095, + 0.034786999225616455, + 0.02481694519519806, + -0.006911627482622862, + 0.03465384244918823, + -0.07456734776496887, + 0.043242402374744415, + 0.01644476316869259, + 0.004369180183857679, + 1.5157220332184806e-05, + 0.013065929524600506, + 0.0004051894648000598, + -0.009970053099095821, + -0.007244517095386982, + -0.009853541851043701, + 0.014056277461349964, + -0.0011328660184517503, + 0.01357358694076538, + -0.0019297213293612003, + 0.05432763695716858, + -0.045905523002147675, + -0.0280959103256464, + 0.027529997751116753, + -0.02018977515399456, + -0.012025648728013039, + -0.046604592353105545, + 0.006840887945145369, + 0.01365680992603302, + 0.03531962260603905, + 0.010377843864262104, + 0.017826255410909653, + 0.027979398146271706, + 0.006208397448062897, + -0.006915788631886244, + 0.011434769257903099, + -0.0048685153014957905, + 0.008263993076980114, + 0.006129336077719927, + -0.04134492948651314, + 0.015446092933416367, + -0.020139841362833977, + -0.0077688186429440975, + 0.0006111651309765875, + 0.06364855915307999, + 0.03253998979926109, + 0.0055842287838459015, + -0.01722705364227295, + -0.02363518625497818, + -0.027896177023649216, + 0.028611889109015465, + -0.03608527034521103, + -0.0007235154625959694, + 0.020639175549149513, + -0.05369514599442482, + 0.023219073191285133, + 0.02223704755306244, + -0.05319581180810928, + -0.006299941800534725, + 0.04037955030798912, + 0.014730379916727543, + -7.659069524379447e-05, + 0.045605920255184174, + 0.01123503502458334, + 0.017826255410909653, + -0.010261332616209984, + -0.023968074470758438, + -0.002517480170354247, + -0.000666300009470433, + 0.03661789372563362, + -0.01566247083246708, + 0.03515317663550377, + -0.04211057722568512, + -0.03591882437467575, + -0.04194413125514984, + 0.011060267686843872, + 0.06334895640611649, + -0.013207408599555492, + -0.02082226611673832, + 0.0014563935110345483, + -0.04710392653942108, + -0.012300282716751099, + -0.019157815724611282, + -0.037450116127729416, + -0.0020732800476253033, + -0.02558259107172489, + 0.02137153409421444, + 0.00516395503655076, + -0.013598553836345673, + 0.002746341982856393, + -0.03452068567276001, + 0.01887485943734646, + 0.015754016116261482, + 0.021338244900107384, + -0.009820252656936646, + -0.0021200927440077066, + 0.016145162284374237, + 0.01785954460501671, + 0.010003342293202877, + 0.019224394112825394, + 0.02543279156088829, + 0.015803949907422066, + -0.008971383795142174, + 0.04314253479242325, + 0.02316913940012455, + -0.008596882224082947, + 0.029211092740297318, + -0.017809610813856125, + -0.008209898136556149, + -0.014930113218724728, + 0.0056508067063987255, + 0.006266653072088957, + 0.02168777957558632, + 0.017909478396177292, + -0.009445752017199993, + -0.005742351524531841, + 0.064014732837677, + 0.040113236755132675, + 0.03262321278452873, + 0.017193764448165894, + 0.015163136646151543, + 0.00706558907404542, + 0.0049309320747852325, + 0.03060922957956791, + 0.05535959452390671, + -0.002513319021090865, + 0.0076356627978384495, + -0.019507350400090218, + 0.012441761791706085, + 0.00672853784635663, + -0.012275316752493382, + -0.058522049337625504, + -0.052629899233579636, + 0.010768989101052284, + 0.03263985738158226, + -0.07117186486721039, + -0.01767645590007305, + 0.0012358538806438446, + -0.014497356489300728, + -0.007806268986314535, + -0.010061598382890224, + -0.02473372220993042, + -0.02270309440791607, + -0.049267709255218506, + 0.021721068769693375, + -0.03052600659430027, + -0.013149152509868145, + -0.015554281882941723, + 0.01036952156573534, + -0.0008384665125049651, + -0.004643814638257027, + 0.013215729966759682, + -0.048102594912052155, + -0.035186465829610825, + -0.003326818812638521, + 0.02435089834034443, + -0.002663119463250041, + 0.02080562151968479, + -0.016885841265320778, + -0.0047353594563901424, + -0.015329581685364246, + 0.03605198115110397, + -0.020023329183459282, + -0.008588559925556183, + -0.021105222404003143, + -0.010194754227995872, + 0.003372591221705079, + -0.00025655931676737964, + -0.01832559145987034, + -0.00812667515128851, + -0.012375183403491974, + 0.060685835778713226, + 0.042310312390327454, + 0.009221050888299942, + 0.0385153666138649, + 0.04061257094144821, + 0.018641836941242218, + 0.031724411994218826, + -0.0021367373410612345, + 0.0009669412393122911, + -0.01678597554564476, + -0.02684757299721241, + -0.004814420826733112, + 0.006254169624298811, + 0.05955401062965393, + -0.0023614380042999983, + -0.00022327032638713717, + -0.06048610061407089, + -0.02120508812367916, + -0.015371193177998066, + -0.01240847259759903, + -0.005946246441453695, + -0.009903475642204285, + 0.029294313862919807, + 0.024950100108981133, + -0.013049285858869553, + -0.0555926188826561, + 0.003399638459086418, + -0.01608690619468689, + 0.0032748046796768904, + -0.018425457179546356, + 0.022270336747169495, + 0.0204227976500988, + 0.006820082664489746, + 0.028512023389339447, + -0.03954732418060303, + 0.007435929030179977, + 0.001392936334013939, + -0.003626419696956873, + -0.006974044255912304, + -0.01699403114616871, + -0.03328899294137955, + -0.008409632369875908, + 0.012192093767225742, + 0.004880998749285936, + -0.04484027251601219, + 0.02230362594127655, + 0.023502029478549957, + -0.043475426733493805, + -0.0020847232080996037, + -0.007723046466708183, + -0.003626419696956873, + 0.019124526530504227, + -0.001357566798105836, + -0.009737030602991581, + -0.04314253479242325, + 0.007057266775518656, + -0.02653132751584053, + 0.022270336747169495, + 0.051930829882621765, + 0.0011536716483533382, + 0.009029639884829521, + -0.019191104918718338, + 0.0031728572212159634, + 0.002700569573789835, + 0.022087248042225838, + -0.022170469164848328, + 0.013556942343711853, + 0.002079521771520376, + 0.06581234186887741, + 0.015421126037836075, + -0.01769310049712658, + 0.0013981377705931664, + 0.01581227220594883, + -0.021737713366746902, + 0.021721068769693375, + -0.014355878345668316, + -0.001783041749149561, + -0.004743681754916906, + -0.013590231537818909, + -0.021771002560853958, + -0.0385153666138649, + -0.007981035858392715, + 0.012691428884863853, + -0.004581397864967585, + -0.01900801621377468, + 0.013856543228030205, + -0.001703980378806591, + 0.026980729773640633, + -0.009196084924042225, + 0.03904798999428749, + 0.019690439105033875, + 0.040978752076625824, + -0.018275657668709755, + 0.013215729966759682, + -0.026265015825629234, + -0.0032331934198737144, + -0.033155836164951324, + -0.08382168412208557, + -0.05579235404729843, + 0.017426788806915283, + -0.014181111007928848, + 0.0460386797785759, + 0.024517344310879707, + -0.021854223683476448, + -0.019124526530504227, + 0.009728708304464817, + -0.0014636754058301449, + -0.0008504297584295273, + -0.01785954460501671, + 0.0157040823251009, + -0.023918142542243004, + 0.04627170041203499, + -0.004926770925521851, + 0.015629181638360023, + 0.005209727678447962, + -0.019590573385357857, + -0.008189092390239239, + -0.0212883111089468, + 0.04737023636698723, + -0.004298441112041473, + 0.006624509580433369, + -0.0024987549986690283, + -0.02300269529223442, + -0.011792626231908798, + -0.011559602804481983, + 0.036285001784563065, + 0.001668610842898488, + 0.02739684097468853, + 0.030476072803139687, + -0.017709745094180107, + -0.002511238446459174, + -0.022436780855059624, + 0.046837612986564636, + -0.02033957466483116, + -0.010186431929469109, + 0.014056277461349964, + 0.009745352901518345, + -0.009528974071145058, + 0.04404133930802345, + -0.0009924281621351838, + 0.014222722500562668, + -0.022653160616755486, + -0.045605920255184174, + 0.002507077297195792, + 0.009462396614253521, + 0.002373921452090144, + -0.07203738391399384, + 0.008696749806404114, + -0.01879163645207882, + 0.0347537100315094, + -0.021654490381479263, + 0.012633172795176506, + 0.013015996664762497, + 0.0020389507990330458, + 0.034553974866867065, + -0.014181111007928848, + 0.01145973615348339, + 0.001737269340083003, + -0.006170947104692459, + 0.02300269529223442, + 0.05456066131591797, + -0.038781676441431046, + -0.009037962183356285, + 0.015562604181468487, + 0.01847539097070694, + 0.01284122932702303, + -0.05049940198659897, + 0.028711756691336632, + -0.03811589628458023, + 0.00354111660271883, + -0.01617012917995453, + 0.015512671321630478, + 0.004331730306148529, + 0.007390156388282776, + 0.00023627383052371442, + 0.0037949453108012676, + 0.006445581559091806, + 0.025798970833420753, + 0.02010655216872692, + -0.007311095017939806, + 0.002606944413855672, + -0.048102594912052155, + -0.04181097447872162, + 0.045040007680654526, + 0.02693079598248005, + 0.007073910906910896, + 0.0010382004547864199, + -0.014588901773095131, + -0.02316913940012455, + 0.022969406098127365, + -0.02849537879228592, + -0.0006590180564671755, + 0.011160135269165039, + 0.04117848351597786, + -0.010635833255946636, + 0.012616528198122978, + 0.004623008891940117, + 0.0007625260041095316, + -0.016369862481951714, + -0.012466727755963802, + -0.02230362594127655, + 0.031275007873773575, + -0.007881169207394123, + -0.000979944714345038, + 0.015795627608895302, + 0.009645486250519753, + -0.015587571077048779, + -0.01924103870987892, + -0.008159964345395565, + -0.04513987526297569, + -0.02230362594127655, + -0.013365531340241432, + 0.027430130168795586, + 0.03585224598646164, + -0.025715747848153114, + -0.04753668233752251, + 0.04374173656105995, + -0.00034875422716140747, + 0.015554281882941723, + -0.008521982468664646, + -0.0023531157057732344, + -0.03234025835990906, + -0.0019130768487229943, + 0.009703741408884525, + -0.0021325761917978525, + 0.02942747063934803, + -0.00496838241815567, + 0.02167113497853279, + 0.0047353594563901424, + -0.012549950741231441, + 0.03149138763546944, + 0.04530632123351097, + -0.02543279156088829, + 0.036351580172777176, + -0.031657833606004715, + -0.021554622799158096, + -0.0014199836878105998, + -0.014996691606938839, + 0.008168286643922329, + -0.011326580308377743, + 0.0489681102335453, + -0.008563593961298466, + 0.019207749515771866, + 0.006254169624298811, + -0.003522391663864255, + -0.04171111062169075, + 0.018641836941242218, + -0.024217743426561356, + -0.009204406291246414, + -0.04091217368841171, + 0.035020019859075546, + 0.008779971860349178, + -0.010860534384846687, + 0.01365680992603302, + -0.05079900473356247, + -0.02691415138542652, + 0.004585559014230967, + -0.001785122323781252, + 0.006483031436800957, + -0.028079265728592873, + -0.01032791007310152, + 0.03938087821006775, + 0.00528462789952755, + 0.03951403498649597, + 0.01678597554564476, + 0.006516320630908012, + 0.0015042463783174753, + -0.0028316450770944357, + 0.0144807118922472, + 0.02769644185900688, + -0.004071659874171019, + 0.017260342836380005, + -0.001238974742591381, + -0.04194413125514984, + -0.00508489366620779, + -0.0009216890321113169, + -0.004019645974040031, + 0.020239708945155144, + -0.017559943720698357, + 0.013948088511824608, + 0.031807634979486465, + 0.02604863792657852, + -0.02027299627661705, + 0.009820252656936646, + -0.005542617291212082, + -0.021088577806949615, + 0.019906818866729736, + -0.017809610813856125, + 0.012782973237335682, + -0.011284968815743923, + -0.03804931789636612, + 0.018924793228507042, + -0.02676435001194477, + 0.005059927236288786, + 0.011984037235379219, + 0.005800607148557901, + -0.008438759483397007, + -0.020705753937363625, + 0.015795627608895302, + -0.021820934489369392, + 0.023851564154028893, + -0.022270336747169495, + -0.02175435796380043, + 0.020223064348101616, + -0.0296771377325058, + 0.0012171288253739476, + 0.019191104918718338, + 0.005159793887287378, + -0.014921790920197964, + 0.03764985129237175, + -0.010419455356895924, + -0.024633854627609253, + 0.0347537100315094, + -0.031341586261987686, + -0.022819604724645615, + 0.0010558852227404714, + -0.01870841346681118, + -0.028978068381547928, + 0.012891163118183613, + 0.017043964937329292, + 0.047470103949308395, + -0.016669463366270065, + 0.01549602672457695, + -0.004776970483362675, + 0.016802620142698288, + 0.03788287565112114, + -0.005313755478709936, + 0.028129199519753456, + -0.02684757299721241, + -0.006112691480666399, + 0.02904464676976204, + -0.014738702215254307, + 0.0016207578592002392, + -0.008971383795142174, + -0.02395143173635006, + -0.006915788631886244, + 0.026947440579533577, + 0.004772809334099293, + 0.030476072803139687, + -0.013507009483873844, + 0.02316913940012455, + -0.009429107420146465, + 0.028512023389339447, + 0.00027411404880695045, + 0.008929772302508354, + 2.145579674106557e-05, + -0.024833589792251587, + -0.011351547203958035, + 0.006657798774540424, + -0.02153797820210457, + -0.0037283673882484436, + 0.0067826323211193085, + -0.027729731053113937, + -0.02245342545211315, + 0.001668610842898488, + -0.0011880010133609176, + -0.0021065690089017153, + -0.025166479870676994, + -0.0408455953001976, + 0.016652818769216537, + -0.02691415138542652, + 0.0263648834079504, + -0.01900801621377468, + -0.005267983302474022, + 0.002604863839223981, + 0.06098543480038643, + 0.0263648834079504, + 0.016536308452486992, + 0.00034693372435867786, + -0.00916279572993517, + -0.01522971410304308, + -0.00823486503213644, + -0.0011827995767816901, + 0.009012995287775993, + 0.0007438009488396347, + -0.006695248652249575, + 0.004764487035572529, + 0.0031000375747680664, + 0.02137153409421444, + 0.011517991311848164, + 0.003613936249166727, + -0.028828268870711327, + -0.011984037235379219, + -0.01025301031768322, + 0.027513353154063225, + -0.006803438067436218, + -0.0021429790649563074, + -0.015737371519207954, + -0.0033143353648483753, + -0.02606528252363205, + 0.001851700246334076, + -0.01676100865006447, + 0.027430130168795586, + -0.007344384212046862, + -0.012633172795176506, + 0.019707083702087402, + 0.0018402572022750974, + -0.01052764430642128, + 0.022270336747169495, + -0.013640165328979492, + -0.010311265476047993, + -0.009595552459359169, + 0.030076606199145317, + 0.016652818769216537, + -0.009404140524566174, + -0.0312916524708271, + 0.021404823288321495, + 0.023385517299175262, + -0.004369180183857679, + -0.014996691606938839, + -0.032140523195266724, + -0.0002551289217080921, + -4.557731517706998e-05, + -0.0010766908526420593, + 0.004323408007621765, + 0.003412121906876564, + -0.02866182290017605, + -0.004993348848074675, + -0.00530127203091979, + 0.01987352967262268, + 0.017160475254058838, + -0.0036825949791818857, + 0.02832893282175064, + -0.013548620045185089, + -0.0361851342022419, + -0.002802517032250762, + -0.0015021658036857843, + 0.02395143173635006, + -0.0020909649319946766, + 0.009570585563778877, + -0.018808281049132347, + -0.0064330981113016605, + -0.01995675079524517, + 0.03249005600810051, + 0.004208977334201336, + 0.02559923566877842, + -0.004406630527228117, + -0.006166785955429077, + -0.001205685781314969, + -0.010436099022626877, + -0.02308591641485691, + 0.005679934751242399, + 0.006969883106648922, + -0.019074592739343643, + 0.01648637466132641, + 0.02676435001194477, + 0.006050274707376957, + 0.01173437014222145, + 0.0005183200119063258, + 0.026564616709947586, + -0.02982693910598755, + -0.0020285481587052345, + -0.006607864983379841, + 0.017276987433433533, + -0.02621508203446865, + -0.014489034190773964, + -0.0028919812757521868, + -0.01373170968145132, + -0.0003162454522680491, + -0.056458134204149246, + 0.010577578097581863, + 0.009104539640247822, + 0.03974705934524536, + 0.013348886743187904, + -0.01259988360106945, + -0.019307617098093033, + -0.006037791259586811, + -0.029061291366815567, + 0.0032061461824923754, + 0.03521975502371788, + 0.029477404430508614, + 0.01490514725446701, + -0.0017570346826687455, + 0.010003342293202877, + -0.053661856800317764, + 0.0009752634796313941, + -0.014097888953983784, + 0.013798288069665432, + 0.03144145384430885, + 0.007227872498333454, + 0.02589883655309677, + 0.01275800634175539, + -0.0391145683825016, + 0.004142398945987225, + 0.006957399658858776, + -0.01474702451378107, + 0.015970394015312195, + -0.03725038468837738, + -0.002413452137261629, + 0.002881578402593732, + 0.0110769122838974, + -0.017942767590284348, + 0.025549301877617836, + -0.007956069894134998, + 0.007956069894134998, + 0.015196425840258598, + 0.018675126135349274, + -0.008322248235344887, + 0.014372522942721844, + 0.02120508812367916, + -0.02701401896774769, + 0.016752686351537704, + 0.005209727678447962, + -0.03515317663550377, + -0.004843548405915499, + 0.022603226825594902, + -0.01232524961233139, + 0.003605614183470607, + 0.011326580308377743, + -0.004851870704442263, + 0.008114192634820938, + -0.008338892832398415, + -0.005600873380899429, + 0.016353217884898186, + -0.03954732418060303, + -0.01989017426967621, + -0.020023329183459282, + 0.008954739198088646, + -0.010294620878994465, + 0.011401480063796043, + -0.030625874176621437, + 0.0023926463909447193, + 0.008613526821136475, + 0.004897643346339464, + 0.005742351524531841, + -0.0011276646982878447, + -0.014771990478038788, + 0.011476380750536919, + -0.03741682693362236, + -0.03402135148644447, + 0.037683140486478806, + -0.02559923566877842, + -0.036285001784563065, + 0.04454067349433899, + 0.007132166996598244, + -0.014280978590250015, + -0.0031146013643592596, + -0.0030563457403331995, + -0.004414952825754881, + 0.037283673882484436, + -0.024717077612876892, + -0.001762236119247973, + 0.016095228493213654, + -0.022669805213809013, + -0.0037554146256297827, + 0.01621174067258835, + -0.019474061205983162, + 0.000944575178436935, + -0.018641836941242218, + -0.013049285858869553, + 0.0006049234070815146, + -0.02959391474723816, + 0.006141819525510073, + -0.012974385172128677, + -0.0337383933365345, + -0.035253044217824936, + 0.027663154527544975, + 0.009071250446140766, + -0.00841379351913929, + -0.033455438911914825, + 0.0334387943148613, + 0.008355537429451942, + 0.038948122411966324, + -0.052163854241371155, + 0.019191104918718338, + 0.016902485862374306, + 0.01900801621377468, + -0.017160475254058838, + 0.03661789372563362, + -0.00848869327455759, + 0.057889558374881744, + 0.0023260684683918953, + -0.026015348732471466, + 0.02613185904920101, + 0.004914287477731705, + -0.034320950508117676, + 0.0030272179283201694, + 0.014297622255980968, + 0.0002237904554931447, + 0.007057266775518656, + -0.010194754227995872, + -0.018209079280495644, + 0.04314253479242325, + -0.01593710482120514, + -0.023219073191285133, + -0.017643166705965996, + 0.012733040377497673, + 0.022669805213809013, + 0.009320918470621109, + -0.013939766213297844, + -0.023701762780547142, + 0.002783792093396187, + -0.011368190869688988, + -0.015620860271155834, + 0.004581397864967585, + -0.0021679457277059555, + -0.01432258915156126, + -0.01041113305836916, + 0.01393144391477108, + 0.006012824364006519, + 0.029610559344291687, + -0.0361851342022419, + 0.01393144391477108, + -0.04064586013555527, + -0.00183505576569587, + -0.03257327899336815, + -0.012991029769182205, + -0.02010655216872692, + -0.0031707766465842724, + 0.002373921452090144, + 0.0029731232207268476, + 0.010719056241214275, + 0.04157795384526253, + 0.01416446641087532, + 0.004764487035572529, + 0.06304935365915298, + 0.018891504034399986, + 0.0032103073317557573, + -0.02754664234817028, + -0.008051775395870209, + -0.04294280335307121, + 0.0074276067316532135, + 0.02401800826191902, + -0.01236686110496521, + 0.01150134764611721, + -0.010469388216733932, + -0.03605198115110397, + -0.002673522336408496, + 0.0428762249648571, + 0.001795525080524385, + 0.011268324218690395, + -0.009387495927512646, + 0.02088884264230728, + 0.019474061205983162, + -0.0320073664188385, + -0.02065582014620304, + -0.023368872702121735, + 0.0066453153267502785, + 0.01934090442955494, + -0.0042214603163301945, + 0.0011131006758660078, + -0.00037866231286898255, + 0.019374193623661995, + -0.01721040904521942, + 0.002648555440828204, + 0.023435451090335846, + 0.019124526530504227, + 0.0331391915678978, + -0.011576247401535511, + -0.03387155011296272, + -0.0041486406698822975, + -0.0008285838412120938, + 0.029926804825663567, + -0.03237354755401611, + 0.009212728589773178, + 0.031041987240314484, + 0.02488352358341217, + -0.02982693910598755, + 0.004163204692304134, + 0.004000920802354813, + 0.025632524862885475, + 0.026398172602057457, + 0.0019172379979863763, + -0.004856031853705645, + -0.025848902761936188, + 0.0019942186772823334, + -0.008014325052499771, + -0.0003568163956515491, + 0.0010985367698594928, + -0.0022366042248904705, + -0.011800948530435562, + 0.015446092933416367, + -0.02583225816488266, + 0.009112861938774586, + -0.014397489838302135, + 0.021820934489369392, + -0.0019234796054661274, + -0.030176471918821335, + -0.019141171127557755, + 0.029460759833455086, + -0.004427436273545027, + 0.015762338414788246, + 0.036584604531526566, + -0.037050649523735046, + 0.0651465579867363, + 0.03402135148644447, + -0.009454074315726757, + -0.023285651579499245, + 0.006200075149536133, + 0.011176779866218567, + -0.046837612986564636, + -0.001363808405585587, + 0.02152133360505104, + -0.00951232947409153, + -0.001845458522439003, + -0.0013606876600533724, + -0.014330911450088024, + 0.013174119405448437, + 0.02175435796380043, + 0.0067118932493031025, + 0.03928101062774658, + 0.016794297844171524, + 0.03124172054231167, + -0.008226542733609676, + -0.014014665968716145, + -0.008738360367715359, + 0.015079913660883904, + 0.006158463656902313, + 0.0022282819263637066, + 0.013507009483873844, + 0.0005060967523604631, + 0.011476380750536919, + 0.004485691897571087, + -0.02503332309424877, + 0.007802107837051153, + -0.012932773679494858, + 0.04367515817284584, + -0.011151812970638275, + -0.018175790086388588, + 0.0033205770887434483, + -0.023818274959921837, + -0.008713394403457642, + -0.02308591641485691, + 0.004552269820123911, + 0.012491694651544094, + 0.007090555503964424, + -0.021970735862851143, + 0.03258992359042168, + -0.0022532488219439983, + -0.0015021658036857843, + -0.0022324430756270885, + 0.04154466465115547, + -0.03685091435909271, + 0.03255663439631462, + 0.0599534772336483, + 0.003990517929196358, + -0.0021658651530742645, + 0.012316927313804626, + -0.035818956792354584, + 0.03154132142663002, + -0.015504349023103714, + 0.006408131215721369, + -0.012807940132915974, + -0.018575258553028107, + -0.0006756625371053815, + 0.003705481067299843, + -0.00993676483631134, + 0.003570244647562504, + 0.016686107963323593, + 0.027996042743325233, + -0.01236686110496521, + -0.03152467682957649, + 0.007839557714760303, + 0.004344213753938675, + -0.0003383514122106135, + 0.010044953785836697, + 0.0030501040164381266, + 0.03492015600204468, + -0.011135168373584747, + 0.028195777907967567, + 0.012042293325066566, + -0.0037491729017347097, + -0.012433439493179321, + -0.0036430642940104008, + 0.020838910713791847, + 0.0015583409694954753, + -0.01815914548933506, + -0.016353217884898186, + 0.01942412741482258, + 0.013748354278504848, + 0.004319246858358383, + -0.018458746373653412, + -0.011251679621636868, + -0.011101879179477692, + -0.037916164845228195, + 0.0012733039911836386, + -0.001184880151413381, + -0.003466216381639242, + -0.030426140874624252, + -0.032140523195266724, + -0.0011505507864058018, + -0.025865547358989716, + -0.021504689007997513, + -0.010968723334372044, + 0.0131824417039752, + 0.03961390256881714, + 0.006133497226983309, + 0.0057257069274783134, + 0.021071933209896088, + 0.01847539097070694, + 0.01295774057507515, + -0.04350871592760086, + 0.01400634367018938, + 0.01413117814809084, + -0.02480030059814453, + 0.0005752753932029009, + -0.02067246474325657, + -0.008813261054456234, + -0.019856885075569153, + 0.010244688019156456, + 0.0050765713676810265, + -0.0033122547902166843, + -0.026647839695215225, + 0.019474061205983162, + 0.015828916803002357, + -0.041378218680620193, + 0.015412803739309311, + -0.0334387943148613, + -0.02817913331091404, + -0.018741702660918236, + -0.011218390427529812, + -0.017792966216802597, + 0.007444251328706741, + 0.04307595640420914, + -0.029876871034502983, + 0.032839592546224594, + -0.02629830501973629, + 0.02942747063934803, + -0.006299941800534725, + -0.01784290000796318, + 0.0042901188135147095, + -0.010885501280426979, + 0.0011443091789260507, + 0.013507009483873844, + -0.004389985930174589, + -0.02644810453057289, + -0.021321600303053856, + 0.01847539097070694, + -0.03638486936688423, + 0.007119683548808098, + -0.015246358700096607, + -0.0038719261065125465, + -0.03811589628458023, + 0.0015250520082190633, + 0.02646474912762642, + ], + "index": 81, + }, + { + "title": "BATRAL-class landing ship", + "text": 'The B\u00e2timent de Transport L\u00e9ger "\\Light ferry ship") are small landing ships of the French Navy. They have been used for regional transport and patrol needs in French Overseas Departments and Territories since the 1970s. On 9 January 2014 it was announced that the two remaining Batrals in French service would be replaced in 2015/16 by three 1500-tonne B\u00e2timents Multimission (B2M) at a cost of ~\u20ac100m (US$136m).', + "vector": [ + -0.047751978039741516, + 0.010834340937435627, + -0.013125896453857422, + -0.0066219219006598, + -0.026049597188830376, + 0.006436575669795275, + -0.013985229656100273, + 0.0018176586600020528, + -0.026369741186499596, + 0.005151787772774696, + 0.03194698318839073, + 0.0035573875065892935, + -0.007881435565650463, + -0.007308546453714371, + 0.012687805108726025, + -0.024549975991249084, + -0.032283976674079895, + -0.0019324470777064562, + 0.020169060677289963, + -0.0037616898771375418, + 0.015282654203474522, + -0.01786065474152565, + 0.007986745797097683, + 0.006411300972104073, + -0.02047235518693924, + -0.0005544595769606531, + 0.009216771461069584, + -0.009924458339810371, + 0.003178269835188985, + -0.051795899868011475, + 0.042629677802324295, + 0.019343426451086998, + -0.006874667014926672, + -0.01559437345713377, + 0.0015912411035969853, + -0.050346825271844864, + 0.017658459022641182, + -0.012005393393337727, + -0.05735629051923752, + -0.01658007875084877, + 0.008311102166771889, + -0.03214917704463005, + -0.012114915996789932, + 0.04225898161530495, + 0.0031508891843259335, + -0.007607628125697374, + -0.026740433648228645, + 0.049403246492147446, + 0.013858857564628124, + -0.007738213054835796, + -0.04020332172513008, + 0.03341290354728699, + -0.011264007538557053, + 0.06530933827161789, + 0.01652953028678894, + 0.02165183238685131, + 0.0517285019159317, + 0.11821731179952621, + -0.040978409349918365, + -0.005236036144196987, + -0.01973096840083599, + -0.06116431951522827, + 0.03545171394944191, + -0.03418798744678497, + -0.0099160335958004, + 0.027212224900722504, + 0.02158443257212639, + 0.04947064444422722, + -0.026049597188830376, + 0.009562190622091293, + -0.0010588967707008123, + -0.029975570738315582, + -0.0016628522425889969, + -0.004473588429391384, + 0.00903984997421503, + 0.03535061702132225, + 0.04967283830046654, + -0.013496588915586472, + -0.018315596505999565, + 0.024870119988918304, + 0.026150694116950035, + 0.043101467192173004, + 0.008736556395888329, + 0.0069715529680252075, + -0.0013985229888930917, + 0.04306776821613312, + -0.038686852902173996, + -0.05068381875753403, + -0.038417257368564606, + -0.017523661255836487, + -0.003631104715168476, + 0.026689883321523666, + 0.0364626944065094, + 0.018163949251174927, + -0.005526693072170019, + 0.032115478068590164, + 0.04124800115823746, + -0.0008977717370726168, + 0.007464405614882708, + -0.005914235487580299, + -0.03454183414578438, + 0.013555563054978848, + -0.034086890518665314, + -0.00012874204549007118, + 0.06756719201803207, + 0.012173890136182308, + -0.028374850749969482, + 0.03636159747838974, + -0.01961302012205124, + 0.06611812114715576, + -0.044921230524778366, + -0.0517285019159317, + -0.06062512844800949, + -0.011213458143174648, + -0.02591479942202568, + -0.013210144825279713, + -0.01279732771217823, + -0.029891321435570717, + 0.032873716205358505, + 0.064803846180439, + 0.015088883228600025, + -0.015333203598856926, + -0.01636945828795433, + -0.01007610559463501, + -0.013446040451526642, + -0.05927715450525284, + -0.013917830772697926, + 0.04047291725873947, + 0.02606644667685032, + 0.035586513578891754, + -0.055098436772823334, + -0.05428965017199516, + 0.0027612403500825167, + -0.013597686775028706, + -0.03235137462615967, + 0.02655508741736412, + -0.005412958096712828, + -0.03157629072666168, + -0.05853576958179474, + 0.006377601530402899, + -0.005252886097878218, + -0.0546940416097641, + 0.013151170685887337, + 0.018905334174633026, + 0.0028475949075073004, + -0.027970459312200546, + -0.003548962762579322, + 0.015400602482259274, + -0.003631104715168476, + 0.005324496887624264, + 0.06719650328159332, + -0.00866073276847601, + 0.07508214563131332, + 5.1305942179169506e-05, + 0.006276503670960665, + 0.011078661307692528, + -0.0721840038895607, + 0.05698559805750847, + 0.010994412936270237, + -0.006786206271499395, + 0.005821562372148037, + -0.007809823844581842, + -0.04205678775906563, + -0.037675872445106506, + -0.0033804660197347403, + -0.009056700393557549, + 0.043910250067710876, + 0.03508102148771286, + 0.022511165589094162, + 0.010775366798043251, + 0.015872392803430557, + 0.004311410244554281, + -0.026774132624268532, + -0.03963043540716171, + 0.04542672261595726, + 0.011668399907648563, + 0.024819569662213326, + 0.07663232088088989, + -0.04047291725873947, + -0.008669157512485981, + -0.010615294799208641, + -0.023656941950321198, + -0.013285968452692032, + 0.022005675360560417, + -0.057929180562496185, + 0.0011900082463398576, + 0.07737370580434799, + 0.030312564224004745, + -0.017877504229545593, + -0.008871353231370449, + -0.004802157171070576, + -0.009216771461069584, + -0.015821844339370728, + -0.004650509916245937, + -0.0029044626280665398, + 0.050144631415605545, + 0.0061290692538022995, + -0.003018197836354375, + 0.021095791831612587, + -0.0046252356842160225, + 0.01578814536333084, + -0.04677469655871391, + -0.047111690044403076, + 0.012561432085931301, + 0.047381285578012466, + -0.04239378124475479, + -0.014566543512046337, + 0.03808026388287544, + 0.012274987995624542, + -0.030211465433239937, + -0.026942629367113113, + -0.02197197452187538, + 0.014457020908594131, + 0.03925974294543266, + -0.013269118964672089, + -0.008677582256495953, + -0.0033657224848866463, + -0.04697689041495323, + 0.06237749382853508, + -0.028341151773929596, + 0.014482295140624046, + 0.016596930101513863, + -0.04111320525407791, + 0.0046757846139371395, + -0.04027072340250015, + 0.026302341371774673, + 0.005092814099043608, + 0.02729647234082222, + 0.0023231487721204758, + -0.009267320856451988, + -0.014347497373819351, + 0.04178719222545624, + -0.022999806329607964, + -0.06541043519973755, + -0.06692690402269363, + -0.020725099369883537, + 0.020219609141349792, + -0.02352214604616165, + -0.0009172541322186589, + 0.022157322615385056, + 0.009309445507824421, + 0.027953609824180603, + -0.020034262910485268, + -0.0028497010935097933, + 0.04229268431663513, + -0.005193911958485842, + -0.0001318355352850631, + 0.010564745403826237, + -0.02288185805082321, + 0.0019514028681442142, + 0.03471032902598381, + -0.020910445600748062, + 0.0021672893781214952, + 0.022426916286349297, + -0.0174899622797966, + -0.002074616262689233, + 0.011761073023080826, + 0.05449184775352478, + 0.04616810753941536, + -0.0005828934372402728, + -0.0026390801649540663, + -0.03267151862382889, + -0.026689883321523666, + -0.01554382499307394, + 0.023977085947990417, + -0.0018650483107194304, + -0.024297229945659637, + -0.04296667128801346, + -0.012443484738469124, + -0.057389989495277405, + -0.10507456958293915, + -0.060490332543849945, + -0.00410500168800354, + 0.01897273398935795, + -0.03538431599736214, + 0.014313798397779465, + 0.013606112450361252, + 0.012418209575116634, + -0.0022241570986807346, + 0.03626050055027008, + 0.015577523969113827, + 0.01421270053833723, + -0.011727373115718365, + -0.006352327298372984, + -0.029453231021761894, + 0.07076863199472427, + 0.028138956055045128, + -0.033935245126485825, + 0.03481142595410347, + 0.00036147815990261734, + -0.04077621176838875, + 0.0428655706346035, + 0.012965824455022812, + -0.05594091862440109, + 0.03653009235858917, + -0.021786628291010857, + 0.030936002731323242, + -0.01319329533725977, + -0.04552781954407692, + -0.007430706173181534, + -0.04549412056803703, + 0.014010503888130188, + -0.0187199879437685, + -0.03182903304696083, + 0.04920104891061783, + 0.007498105056583881, + 0.022915557026863098, + 0.029133087024092674, + -0.007388581987470388, + 0.030481060966849327, + 0.014305373653769493, + -0.026959478855133057, + -0.025527257472276688, + -0.05799657851457596, + 0.000583419983740896, + 0.01437277253717184, + 0.018046000972390175, + -0.0333792045712471, + -0.024617373943328857, + 0.043371062725782394, + -0.041450198739767075, + -0.006183830555528402, + -0.06814008206129074, + 0.0032477746717631817, + 0.026976328343153, + -0.05071752145886421, + 0.017607910558581352, + -0.012965824455022812, + -0.00906512513756752, + -0.0005439285305328667, + 0.01711084507405758, + -0.03774327039718628, + 0.021517034620046616, + 0.006613497156649828, + -0.0588727630674839, + 0.013387066312134266, + 0.0024389903992414474, + -0.003885956248268485, + -0.012308686971664429, + 0.003744840156286955, + 0.012148614972829819, + -0.03760847449302673, + -0.0017007640562951565, + 0.010632144287228584, + -0.004722121171653271, + 0.03454183414578438, + 0.01389255654066801, + 0.01044679805636406, + 0.007236935198307037, + -0.04448314011096954, + 0.0008519616676494479, + 0.047583479434251785, + 0.013757758773863316, + -0.015653347596526146, + 0.07824988663196564, + -0.042461179196834564, + 0.021601282060146332, + -0.025678902864456177, + 0.007034739013761282, + -0.01759105920791626, + -0.023640092462301254, + -0.03545171394944191, + -0.03551911190152168, + 0.024920668452978134, + 0.032115478068590164, + 0.008728131651878357, + 0.010632144287228584, + 0.014836138114333153, + -0.04596590995788574, + -0.00914094876497984, + 0.01828189752995968, + 0.004317729268223047, + -0.011558876372873783, + 0.046033311635255814, + 0.022528015077114105, + 0.0016228342428803444, + 0.028408551588654518, + -0.0052865855395793915, + -0.02276390977203846, + -0.003319385927170515, + 0.0293184332549572, + 0.01554382499307394, + -0.03642899543046951, + -0.038046564906835556, + 0.042629677802324295, + 0.0316605381667614, + 0.0014596030814573169, + 0.007965683937072754, + 0.007060013711452484, + 0.010868039913475513, + 0.07959786057472229, + -0.021769778802990913, + 0.04498863220214844, + 0.010960713028907776, + -0.02953747846186161, + -0.0324019230902195, + 0.001092069549486041, + -0.04128170385956764, + -0.011895869858562946, + -0.0013616642681881785, + -0.002626443048939109, + -0.011339831165969372, + 0.00860597100108862, + 0.026622485369443893, + -0.0008972451323643327, + -0.015105732716619968, + 0.013210144825279713, + -0.007156899198889732, + -0.01930972747504711, + -0.042730774730443954, + -0.04229268431663513, + -0.01978151686489582, + 0.019208628684282303, + -0.017304616048932076, + -0.027582917362451553, + -0.038518354296684265, + 0.00534555921331048, + 0.009309445507824421, + -0.048864055424928665, + -0.0034583956003189087, + -0.009536915458738804, + 0.027010027319192886, + -0.057558488100767136, + 0.07285799086093903, + 0.050784919410943985, + -0.017978603020310402, + 0.031171897426247597, + -0.017093993723392487, + -0.018433542922139168, + -0.007266422268003225, + 0.05530063062906265, + -0.021500185132026672, + -0.04495492950081825, + -0.022477464750409126, + 0.032385073602199554, + -0.00670617027208209, + 0.04714538902044296, + -0.006432363297790289, + 0.002014589263126254, + 0.01117133442312479, + -0.02330309897661209, + 0.03113819845020771, + -0.03433963656425476, + 0.006878879386931658, + -0.026740433648228645, + -0.014600242488086224, + 0.03417113795876503, + 0.010244602337479591, + 0.022999806329607964, + 0.009326294995844364, + 0.0027633465360850096, + 0.03727148100733757, + -0.031475190073251724, + -0.022207871079444885, + -0.010943863540887833, + -0.005985846742987633, + 0.008277402259409428, + -0.003563706064596772, + -0.04677469655871391, + 0.034845124930143356, + -0.015569099225103855, + -0.009772811084985733, + 0.006554523482918739, + -0.00845432374626398, + 0.00667668366804719, + -0.02409503422677517, + -0.056749701499938965, + -0.043371062725782394, + 0.0022747060284018517, + 0.002367379143834114, + -0.0357213094830513, + -0.03428908810019493, + -0.05688450112938881, + 0.03437333554029465, + -0.01609986461699009, + -0.012940550222992897, + -0.03471032902598381, + 0.03278946503996849, + -0.015813419595360756, + -0.02222472056746483, + 0.03619309887290001, + -0.024549975991249084, + 0.02761661633849144, + -0.013606112450361252, + 0.0036858662497252226, + 0.01668117754161358, + -0.03102025017142296, + 0.016226235777139664, + -0.012401360087096691, + -0.004401977639645338, + 0.03642899543046951, + -0.025443008169531822, + 0.0007845629588700831, + -0.009545340202748775, + -0.005236036144196987, + -0.04030442237854004, + -0.033177006989717484, + 0.004511500243097544, + -0.03086860291659832, + 0.009932883083820343, + -0.03471032902598381, + -0.017776407301425934, + 0.05577242374420166, + 0.0246342234313488, + -0.01961302012205124, + 0.020590301603078842, + -0.030986551195383072, + 0.03791176900267601, + 0.013538713566958904, + -0.00706422608345747, + -0.0021988824009895325, + -0.03555281460285187, + -0.01929287798702717, + -0.021685531362891197, + 0.0085006607696414, + 0.0068915169686079025, + 0.03551911190152168, + -0.029823923483490944, + -0.06231009587645531, + 0.0020998907275497913, + -0.006108006928116083, + -0.002236794214695692, + -0.03939453884959221, + -0.013900981284677982, + -0.007384369615465403, + 0.018248196691274643, + 0.011238732375204563, + 0.020135361701250076, + 0.056817103177309036, + -0.04930214583873749, + 0.025173412635922432, + 0.03460923209786415, + -0.019983714446425438, + 0.03882164880633354, + -0.00927574560046196, + 0.04377545416355133, + -0.03528321906924248, + -0.006815693341195583, + -0.04792047291994095, + 0.022426916286349297, + 0.019899465143680573, + -0.006710382644087076, + 0.05405375361442566, + -0.008504873141646385, + -0.0045957486145198345, + -0.00557302962988615, + 0.06335477530956268, + 0.011415654793381691, + -0.03359825164079666, + -0.041820891201496124, + -0.018534641712903976, + -0.02532505989074707, + -0.0023736979346722364, + 0.023100903257727623, + -0.007447556126862764, + 0.0008166826446540654, + 0.026083296164870262, + -0.019174929708242416, + 0.021634981036186218, + 0.020708249881863594, + -0.01319329533725977, + 0.010868039913475513, + 0.006529248785227537, + 0.01743941381573677, + 0.0018208179390057921, + -0.004734758287668228, + 0.00090303726028651, + 0.021180041134357452, + -9.319976379629225e-05, + 0.02101154439151287, + 0.002466371050104499, + 0.019596170634031296, + 0.0017039233352988958, + -0.044011350721120834, + -0.020236458629369736, + 0.010960713028907776, + 0.008761830627918243, + 0.0174899622797966, + -0.018046000972390175, + 0.005787862930446863, + -0.0024979643058031797, + -0.04030442237854004, + 0.012595131993293762, + 0.02121374011039734, + 0.028172655031085014, + -0.0010910164564847946, + -0.025813700631260872, + -0.021028393879532814, + 0.0485270619392395, + -0.04111320525407791, + -0.029031988233327866, + 0.0010836446890607476, + 0.029503779485821724, + -0.040607716888189316, + 0.03501362353563309, + 0.028138956055045128, + -0.022089922800660133, + 0.025341909378767014, + 0.03693448752164841, + -0.002132536843419075, + -0.013757758773863316, + 0.04714538902044296, + 0.019865766167640686, + 0.0406414158642292, + 0.025830550119280815, + 0.016765426844358444, + -0.006794631015509367, + 0.0046757846139371395, + -0.012831026688218117, + 0.00807520654052496, + -0.03167738765478134, + 0.013446040451526642, + 0.0054087452590465546, + 0.04984133690595627, + 0.0032456684857606888, + 0.04222528263926506, + 0.008012020029127598, + -0.007468617986887693, + 0.006916791200637817, + -0.04808897152543068, + 0.022359518334269524, + -0.01242663525044918, + 0.04397765174508095, + -0.01335336733609438, + -0.03390154615044594, + -0.03245247155427933, + 0.010295150801539421, + 0.026201244443655014, + 0.013395491056144238, + 0.02271336130797863, + 0.04057401418685913, + 0.0470442920923233, + 0.009461091831326485, + -0.01802915148437023, + 0.0023062992841005325, + -0.04151759669184685, + -0.011727373115718365, + -0.01818079873919487, + 0.034575533121824265, + -0.004418827127665281, + -0.003597405506297946, + -0.044550538063049316, + 0.025560956448316574, + -0.04330366477370262, + -0.027060577645897865, + -0.0205734521150589, + -0.00154911691788584, + -0.002145174192264676, + 0.013707210309803486, + 0.03824876248836517, + -0.03491252660751343, + 0.03310960903763771, + 0.020708249881863594, + 0.007384369615465403, + 0.04124800115823746, + 0.005299222655594349, + -0.012544582597911358, + 0.00593108544126153, + 0.013681935146450996, + -0.010775366798043251, + -0.04525822401046753, + -0.04084360972046852, + -0.04178719222545624, + -0.011954843997955322, + 0.005248673725873232, + -0.022511165589094162, + -0.017557360231876373, + -0.0037174595054239035, + -0.011120785027742386, + -0.010312000289559364, + 0.03545171394944191, + -0.011137634515762329, + -0.014794014394283295, + -0.03481142595410347, + -0.007847735658288002, + 0.029655426740646362, + -0.020910445600748062, + -0.019916314631700516, + 0.00508017698302865, + -0.012005393393337727, + 0.006899941712617874, + -0.03149203956127167, + 0.0036879724357277155, + 0.00028670774190686643, + -0.003083490300923586, + -0.02643713913857937, + -0.02399393543601036, + -0.010092955082654953, + -0.010859615169465542, + -0.023235701024532318, + -0.0023715917486697435, + -0.003142464207485318, + -0.008222641423344612, + 0.024769021198153496, + 0.0333792045712471, + 0.016824400052428246, + 0.00603639567270875, + 0.011718948371708393, + 0.0009930776432156563, + -0.013285968452692032, + 0.021146342158317566, + 0.002685416955500841, + -0.030295714735984802, + 0.0016007190570235252, + 0.004035497084259987, + 0.002546407049521804, + -0.002091465750709176, + -0.059614147990942, + 0.014296948909759521, + 0.02224157005548477, + -0.0008930327603593469, + -0.0043851276859641075, + 0.04158499464392662, + 0.01866943947970867, + -0.0182313472032547, + 0.023640092462301254, + -0.004054452758282423, + 0.03700188547372818, + -0.03096970170736313, + 0.011685249395668507, + -0.007835098542273045, + 0.04165239632129669, + 0.01433907262980938, + 0.004612598568201065, + -0.01626836135983467, + 0.02069140039384365, + -0.006929428782314062, + -0.010472072288393974, + -0.005349771585315466, + 0.0006945225177332759, + -0.02766716480255127, + 0.0025864250492304564, + -0.0039407177828252316, + 0.028273753821849823, + 0.021078942343592644, + 0.047313883900642395, + -0.022679662331938744, + 0.0031319332774728537, + -0.0033909969497472048, + 0.004248224198818207, + -0.0014006291748955846, + 0.02793676033616066, + -0.0475497804582119, + -0.004031284712255001, + -0.03747367486357689, + 0.006124856416136026, + 0.007889860309660435, + -0.0026980540715157986, + 0.007902497425675392, + 0.02335364930331707, + -0.012687805108726025, + -0.04158499464392662, + 0.019714118912816048, + -0.03273891657590866, + -0.024600524455308914, + 0.016445282846689224, + 0.022157322615385056, + -0.027380721643567085, + 0.005926873069256544, + 0.04168609529733658, + -0.0035363254137337208, + 0.033025361597537994, + 0.045831114053726196, + 0.012519308365881443, + 0.02190457656979561, + -0.03221657872200012, + 0.01545957662165165, + -0.051357805728912354, + 0.0014827713603153825, + 0.012788902968168259, + 0.0045746867544949055, + 0.009907608851790428, + 0.04404504969716072, + -0.05698559805750847, + 0.02805470861494541, + 0.027212224900722504, + 0.013614537194371223, + 0.015602798201143742, + -0.0023905476555228233, + 0.019663570448756218, + 0.02761661633849144, + 0.022578563541173935, + -0.006255441810935736, + -0.021988825872540474, + 0.01652110554277897, + 0.01865258999168873, + 0.007455980870872736, + -0.028644446283578873, + -0.0011447247816249728, + -0.02015221118927002, + 0.060692526400089264, + 0.003928080201148987, + 0.006836755201220512, + 0.004869556054472923, + 0.02089359611272812, + 0.014010503888130188, + 0.034036342054605484, + 0.01578814536333084, + -0.054087456315755844, + 0.0059395101852715015, + 0.036867085844278336, + -0.014204275794327259, + -0.03081805445253849, + 0.018062850460410118, + 0.018315596505999565, + 0.0008351120050065219, + 0.0006466062623076141, + -0.02293240651488304, + -0.00989075843244791, + 0.0026348677929490805, + 0.008778680115938187, + -0.005800500512123108, + 0.0015312141040340066, + 0.0027043726295232773, + -0.006908366456627846, + -0.0014975147787481546, + -0.009326294995844364, + -0.06116431951522827, + 0.022477464750409126, + 0.00716953631490469, + 0.004237693268805742, + 0.020506054162979126, + 0.024330928921699524, + 0.00844589900225401, + -0.04377545416355133, + -0.007418069057166576, + 0.04121430218219757, + 0.021196890622377396, + -0.011710523627698421, + 0.0021335899364203215, + -0.005311859771609306, + -0.00044677965342998505, + 0.03290741518139839, + -0.02687523141503334, + -0.039967428892850876, + 0.026268642395734787, + 0.0013879919424653053, + 0.01807969994843006, + -0.012805752456188202, + 0.05570502206683159, + -0.0341205894947052, + -0.012114915996789932, + 0.027127975597977638, + -0.022426916286349297, + 0.00393018638715148, + -0.015569099225103855, + 0.026521386578679085, + 0.0021588646341115236, + -0.014414896257221699, + 0.02357269451022148, + 0.03449128195643425, + 0.024769021198153496, + 0.027852511033415794, + 0.03108764998614788, + -0.006874667014926672, + -0.018534641712903976, + 0.007776124868541956, + 0.02714482508599758, + -0.01154202688485384, + 0.0025843188632279634, + -0.020489204674959183, + -8.082578278845176e-05, + -0.0003733256016857922, + 0.016032464802265167, + -0.001048365724273026, + 5.525508458958939e-05, + -0.007211660500615835, + 0.01060687005519867, + 0.039158642292022705, + 0.02842540107667446, + 0.055536527186632156, + -0.016487406566739082, + -0.022966105490922928, + 0.018467243760824203, + 0.040978409349918365, + 0.013446040451526642, + 0.003580555785447359, + -0.0043050916865468025, + 0.0331433080136776, + -0.013934680260717869, + -0.022831309586763382, + 0.01389255654066801, + -0.03444073349237442, + 0.010834340937435627, + 0.0035763434134423733, + 0.02234266884624958, + -0.007308546453714371, + 0.036327898502349854, + 0.025662053376436234, + -0.033345505595207214, + -0.0023105116561055183, + 0.041349101811647415, + -0.0024179283063858747, + -0.0029149935580790043, + -0.014482295140624046, + -0.009781235828995705, + 0.04380915313959122, + -0.014457020908594131, + -0.03774327039718628, + -0.036395296454429626, + -0.004172400571405888, + -0.027262773364782333, + -0.014937235973775387, + -0.0026011685840785503, + 0.02202252484858036, + 0.008702856488525867, + -0.03700188547372818, + 0.01578814536333084, + 0.01005083043128252, + 0.017287766560912132, + 0.01695919781923294, + -0.02000056393444538, + -0.032604120671749115, + -0.023067204281687737, + -0.008563847281038761, + -0.01178634725511074, + 0.013513438403606415, + -0.0016565335681661963, + -0.007569716311991215, + -0.021887727081775665, + -0.005501418840140104, + -0.005897385999560356, + 0.032553572207689285, + -0.03160998970270157, + -0.04367435723543167, + -0.021786628291010857, + -0.01770900748670101, + 0.032115478068590164, + 0.03230082616209984, + 0.0005971103091724217, + 0.00771715072914958, + -0.03784436732530594, + 0.005282372701913118, + -0.006364964414387941, + -0.011339831165969372, + 0.029722824692726135, + 0.02616754360496998, + -0.031542591750621796, + -0.027094276621937752, + -0.04899885132908821, + -0.03535061702132225, + -0.0065713729709386826, + 0.02805470861494541, + -0.04077621176838875, + -0.0028433825355023146, + -0.03460923209786415, + -0.010682693682610989, + 0.0110870860517025, + -0.028122106567025185, + 0.04640400409698486, + 0.053716760128736496, + -0.024920668452978134, + -0.03368249908089638, + 0.013917830772697926, + 0.03491252660751343, + -0.021230589598417282, + -0.03619309887290001, + -0.00922519713640213, + 0.008403775282204151, + 0.03059900924563408, + 0.009157798252999783, + 0.04394394904375076, + 0.024162432178854942, + -0.003464714391157031, + -0.0396641343832016, + -0.052436187863349915, + -0.03760847449302673, + 0.017085568979382515, + -0.033564552664756775, + 0.0006092210533097386, + -0.04768458008766174, + -0.022275269031524658, + 0.0005644640768878162, + 0.024971216917037964, + -0.010194052942097187, + 0.03027886524796486, + 0.006925215944647789, + -0.009081974625587463, + -0.0035721310414373875, + 0.001643896335735917, + 0.000724009471014142, + -0.03332865610718727, + -0.020455503836274147, + -0.004612598568201065, + 0.004692634101957083, + 0.04569631814956665, + 0.028088407590985298, + 0.005425595212727785, + 0.03447443246841431, + 0.016504256054759026, + -0.01117133442312479, + -0.013311242684721947, + -0.0007724522729404271, + -0.029790224507451057, + -0.003578449599444866, + -0.01053104642778635, + -0.037136681377887726, + 0.023387348279356956, + -0.0070726508274674416, + -0.008803955279290676, + 0.01178634725511074, + -0.0031003400217741728, + -0.04417984560132027, + -0.0026180180720984936, + 0.024667922407388687, + 0.004351428244262934, + -0.019697269424796104, + -0.008770255371928215, + 0.0019092786824330688, + 0.018163949251174927, + 0.029402682557702065, + 0.01535847783088684, + -0.005391895771026611, + -0.02815580554306507, + -0.01754051074385643, + 0.004210312385112047, + 0.015307929366827011, + -0.02436462976038456, + -0.01610828936100006, + 0.048021573573350906, + -0.007565503939986229, + -0.026571936905384064, + -0.02357269451022148, + 0.00011854009062517434, + -0.013319667428731918, + -0.0012868938501924276, + -0.0205734521150589, + 0.025089165195822716, + 0.026571936905384064, + 0.009975006803870201, + -0.008761830627918243, + 0.009023000486195087, + 0.016917072236537933, + 0.045561518520116806, + -0.004789520055055618, + 0.013100622221827507, + 0.028004158288240433, + 0.03679968789219856, + -0.043842852115631104, + -0.011693674139678478, + 0.005353983957320452, + 0.04047291725873947, + -0.012595131993293762, + 0.013690360821783543, + 0.004814794287085533, + 0.022831309586763382, + -0.003959673456847668, + 0.03508102148771286, + 0.006495549343526363, + 0.041450198739767075, + -0.02222472056746483, + 0.020017413422465324, + 0.011685249395668507, + -0.03305906057357788, + 0.026251792907714844, + -0.0006445000180974603, + -0.0379454679787159, + 0.0003462081658653915, + 0.03241877257823944, + 0.02458367496728897, + 0.020388105884194374, + -0.04471903666853905, + 0.007257997058331966, + 0.021921426057815552, + -0.028021007776260376, + 0.00020864636462647468, + -0.025527257472276688, + 0.023808589205145836, + 0.003976522944867611, + 0.018703138455748558, + -0.0010467859683558345, + -0.03268836811184883, + -0.025207113474607468, + -0.013698785565793514, + -0.018147099763154984, + 0.03064955770969391, + 0.018736837431788445, + 0.01021090243011713, + -0.008492236025631428, + 0.03588980808854103, + 0.013799883425235748, + -0.005530905444175005, + 0.01444859616458416, + -0.06055773049592972, + 0.013673510402441025, + 0.0016933922888711095, + 0.0031403580214828253, + -0.0001532267197035253, + 0.009317870251834393, + -0.03268836811184883, + -0.001716560567729175, + 0.062242697924375534, + -0.04131540283560753, + -0.027178524062037468, + -0.04020332172513008, + -0.033665649592876434, + 0.0059689972549676895, + 0.06618551909923553, + -0.021618131548166275, + -0.02377489022910595, + -0.011693674139678478, + -0.015291079878807068, + -0.01924232766032219, + -0.02025330811738968, + -0.009023000486195087, + 0.02985762245953083, + 0.029925022274255753, + 0.0037216718774288893, + 0.027919910848140717, + -0.010135078802704811, + 0.013100622221827507, + -0.021146342158317566, + 0.009014575742185116, + -0.0015501700108870864, + 0.0070726508274674416, + -0.012030667625367641, + 0.01170209888368845, + -0.01522368099540472, + 0.013125896453857422, + 0.02357269451022148, + -0.009444242343306541, + -0.009014575742185116, + 0.0210620928555727, + -0.015316354110836983, + -0.01012665405869484, + 0.0005565658211708069, + -0.008306889794766903, + -0.01117133442312479, + -0.0008335323072969913, + 0.04242748022079468, + -0.0005555127281695604, + 0.00619646767154336, + 0.028964590281248093, + 0.00577101344242692, + 0.02778511308133602, + -0.006398663856089115, + -0.010842765681445599, + 0.004616810940206051, + 0.002868657000362873, + 0.002999241929501295, + -0.0013690360356122255, + 0.032334525138139725, + -0.012611981481313705, + 0.020927295088768005, + -0.004187143873423338, + -0.008837654255330563, + 0.01023617759346962, + -0.025763152167201042, + 0.02778511308133602, + 0.03391839563846588, + 0.0003032941312994808, + -0.01357241254299879, + 0.018416693434119225, + -0.0022304756566882133, + -0.003725884249433875, + -0.016588503494858742, + 0.013538713566958904, + 0.000825634051579982, + -0.03551911190152168, + -0.0005128619377501309, + 0.03198068216443062, + 0.0014827713603153825, + -0.0032140754628926516, + 0.013985229656100273, + -0.014920386485755444, + 0.011752648279070854, + -0.013547138310968876, + -0.0027022664435207844, + -0.00018179218750447035, + 0.024381479248404503, + -0.003856469178572297, + -0.009671713225543499, + -0.01781010627746582, + -0.01234238687902689, + -0.017102420330047607, + 0.010345700196921825, + 0.011533602140843868, + 0.014010503888130188, + 0.017405712977051735, + -0.007316971197724342, + 0.03336235508322716, + -0.009292595088481903, + -0.0027085852343589067, + 0.022140471264719963, + 0.016377883031964302, + -0.015914516523480415, + 0.04269707575440407, + 0.01764160953462124, + -0.03471032902598381, + -0.011390379630029202, + 0.008896628394722939, + -0.011070235632359982, + 0.003776433179154992, + -0.006963127758353949, + 0.023050354793667793, + 0.00329200504347682, + -0.02606644667685032, + -0.003949142526835203, + 0.003321492113173008, + 0.028138956055045128, + 0.0032646243926137686, + -0.01506360899657011, + 0.020067961886525154, + -0.028812943026423454, + 0.0006460797158069909, + 0.02197197452187538, + -0.020067961886525154, + -0.03378359600901604, + 0.015771295875310898, + 0.006714595016092062, + 0.011112360283732414, + -0.027111126109957695, + -0.012679380364716053, + 0.04808897152543068, + 0.039900027215480804, + 0.038518354296684265, + 0.00459996098652482, + -0.01898958347737789, + 0.03615939989686012, + -0.029840772971510887, + -0.0349799245595932, + -0.0066514089703559875, + 0.0017397288465872407, + 0.029739676043391228, + 0.03828246146440506, + -0.0008282667840830982, + 0.01845039427280426, + -0.047111690044403076, + -0.005581454839557409, + -0.017978603020310402, + -0.012283412739634514, + 0.0016860205214470625, + 0.03386784717440605, + 0.001757631660439074, + -0.01988261565566063, + 0.030093519017100334, + -0.035215821117162704, + 0.016066163778305054, + -0.0031993319280445576, + 0.009562190622091293, + 0.016024040058255196, + -0.011803196743130684, + -0.010960713028907776, + -0.009503216482698917, + 0.02527451142668724, + 0.034356486052274704, + 0.001222654478624463, + 0.04546042159199715, + -0.004307197872549295, + -0.009949732571840286, + 0.020876746624708176, + 0.007995170541107655, + -0.026622485369443893, + 0.011432504281401634, + 0.041719794273376465, + -0.017557360231876373, + -0.0036353173200041056, + -0.013749334029853344, + -0.03219972923398018, + 0.013361792080104351, + 0.013521864078938961, + 0.02714482508599758, + -0.019006432965397835, + 0.0031888007652014494, + -0.028408551588654518, + 0.01529950462281704, + 0.020303858444094658, + -0.0037364151794463396, + 0.0052065495401620865, + -0.00014230076340027153, + 0.0507512204349041, + -0.009006150998175144, + -0.0022978743072599173, + 0.029722824692726135, + 0.00935999397188425, + 0.02554410696029663, + 0.0006497655413113534, + -0.025527257472276688, + 0.007308546453714371, + -0.04579741507768631, + 0.03599090501666069, + -0.006883091758936644, + 0.0008514351211488247, + -0.0282063540071249, + 0.0069715529680252075, + -0.01834929548203945, + -0.013909406028687954, + -0.004869556054472923, + 0.0044651636853814125, + 0.015240530483424664, + 0.024027636274695396, + -0.019056981429457664, + 0.029807073995471, + 0.004081833641976118, + -0.020657701417803764, + 0.02170238085091114, + -0.02739757113158703, + 0.013858857564628124, + 0.02825690433382988, + 0.022106772288680077, + 0.005910023115575314, + -0.012628830969333649, + -0.006124856416136026, + -0.007375944871455431, + 0.01770900748670101, + 0.0264876876026392, + 0.00288550672121346, + 0.019798368215560913, + -0.0010520515497773886, + 0.03514841943979263, + 0.025560956448316574, + 0.0055182683281600475, + -0.011019687168300152, + 0.032283976674079895, + -0.01572917029261589, + -0.014928811229765415, + 0.010295150801539421, + 0.03912494331598282, + -0.01567019708454609, + 0.011120785027742386, + -0.009932883083820343, + -0.008525935001671314, + 0.013858857564628124, + 0.014996210113167763, + -0.008862928487360477, + -0.006402876228094101, + -0.009562190622091293, + -0.019663570448756218, + 0.012165464460849762, + -0.001101547502912581, + 0.004743183497339487, + -0.03899014741182327, + -0.0008272136910818517, + 0.029874471947550774, + 0.03358140215277672, + 0.007055801339447498, + -0.013783033937215805, + 0.025493556633591652, + -0.024280380457639694, + 0.045932210981845856, + 0.019545622169971466, + -0.019697269424796104, + -0.0002132536901626736, + -0.013715635053813457, + -3.0062847145018168e-05, + -0.02222472056746483, + -0.021348537877202034, + 0.025257661938667297, + 0.01961302012205124, + 0.003586874343454838, + 0.020977845415472984, + -0.026453988626599312, + -0.0037848581559956074, + 0.027279622852802277, + 0.01877053640782833, + -0.010910164564847946, + -0.03454183414578438, + -0.023100903257727623, + -5.1470487960614264e-05, + -0.027582917362451553, + 0.005332922097295523, + 0.0029255247209221125, + 0.005741526372730732, + -0.015796570107340813, + 0.0182313472032547, + -0.0054087452590465546, + 0.01904013194143772, + 0.020455503836274147, + 0.018163949251174927, + -0.006175405811518431, + 0.003955461084842682, + -0.006348114926367998, + 0.01599034108221531, + 0.003367828670889139, + -0.04670729860663414, + -0.01679070107638836, + -0.004321941640228033, + -0.007055801339447498, + -0.0028644446283578873, + 0.04920104891061783, + 0.02101154439151287, + 0.0030582158360630274, + -0.009983432479202747, + 0.030615858733654022, + 0.03993372991681099, + -0.00807520654052496, + 0.010067680850625038, + -0.01117133442312479, + -0.022848159074783325, + 0.0023736979346722364, + -0.005690977443009615, + -0.015855543315410614, + 0.029284734278917313, + 0.004743183497339487, + 0.044651638716459274, + 0.012864726595580578, + 0.0007882488425821066, + -0.02212362177670002, + -0.05203179270029068, + -0.013370216824114323, + 0.010059255175292492, + -0.022528015077114105, + 0.00015796569641679525, + 0.06163610890507698, + -0.010842765681445599, + -0.021618131548166275, + -0.0018587297527119517, + 0.010312000289559364, + 0.0052865855395793915, + 0.026959478855133057, + 0.006503974087536335, + 0.007797186728566885, + 0.007814036682248116, + -0.021247439086437225, + -0.03710298240184784, + -0.0012858407571911812, + -0.03855205327272415, + -0.0033278106711804867, + -0.0034963074140250683, + -0.023808589205145836, + 0.016386307775974274, + 0.022157322615385056, + 0.0032477746717631817, + -0.02025330811738968, + -0.0033446603920310736, + -0.02554410696029663, + 0.001370089128613472, + -0.02537561021745205, + 0.018298747017979622, + -0.007430706173181534, + 0.037237782031297684, + -0.03754107281565666, + 0.027279622852802277, + 0.016664328053593636, + -0.01106181088835001, + 0.008677582256495953, + -0.04417984560132027, + -0.019764667376875877, + -0.03378359600901604, + -0.011963268741965294, + -0.0012416103854775429, + -0.031272996217012405, + 0.018366144970059395, + 0.03838355839252472, + -0.03882164880633354, + 0.008538572117686272, + 0.013201720081269741, + -0.0031235083006322384, + -0.003970204386860132, + -0.003108764998614788, + -0.010817490518093109, + -0.003382572205737233, + -0.032334525138139725, + 0.009646438993513584, + 0.0210620928555727, + -0.002321042586117983, + 0.03784436732530594, + -0.012114915996789932, + 0.002936055650934577, + -0.01663905382156372, + 0.01522368099540472, + 0.00975596159696579, + -0.04296667128801346, + 0.0068114809691905975, + -0.01993316411972046, + -0.0012753097107633948, + 0.003907018341124058, + -0.024347780272364616, + 0.02618439309298992, + 0.038046564906835556, + -0.015392177738249302, + 0.03460923209786415, + 0.004460951313376427, + 0.03348030149936676, + 0.023016655817627907, + 0.019276026636362076, + -0.019916314631700516, + -0.0025843188632279634, + 0.0018987476360052824, + 0.024769021198153496, + -0.02714482508599758, + -0.00667668366804719, + 0.008028869517147541, + 0.010741667822003365, + 0.02153388410806656, + -0.012940550222992897, + -0.008997726254165173, + 0.03219972923398018, + 0.0019261284032836556, + -0.033446602523326874, + 0.021129490807652473, + 0.001992474077269435, + 0.0025527256075292826, + 0.021685531362891197, + -0.00786037277430296, + 0.01909068040549755, + -0.007826673798263073, + -0.01909068040549755, + 0.00017205097537953407, + 0.004612598568201065, + 0.0055688172578811646, + -0.024971216917037964, + -0.02047235518693924, + 0.0011468309676274657, + -0.050784919410943985, + -0.02660563588142395, + -0.011533602140843868, + 0.021129490807652473, + 0.007249572314321995, + 0.014600242488086224, + -0.00399969145655632, + 0.0011320875491946936, + 0.016512680798768997, + -0.008226853795349598, + -0.043910250067710876, + -0.028071558102965355, + 0.021314838901162148, + -0.008302677422761917, + 0.05479514226317406, + 0.028880340978503227, + 0.012013818137347698, + -0.021129490807652473, + -0.0063607520423829556, + -0.0007608681335113943, + -0.011314556002616882, + -0.021196890622377396, + -0.02884664200246334, + 0.0006376548553816974, + -0.03017776645720005, + 0.03865315392613411, + 0.010834340937435627, + -0.034845124930143356, + 0.005059114657342434, + -0.010960713028907776, + 0.019158080220222473, + 0.0015027803601697087, + ], + "index": 82, + }, + { + "title": "Historical parks of Thailand", + "text": "Historical parks in Thailand (Thai: \u0e2d\u0e38\u0e17\u0e22\u0e32\u0e19\u0e1b\u0e23\u0e30\u0e27\u0e31\u0e15\u0e34\u0e28\u0e32\u0e2a\u0e15\u0e23\u0e4c) are managed by the Fine Arts Department, a sub-division of the Ministry of Education. There are currently ten parks, with four them registered as World Heritage Sites by the UNESCO.", + "vector": [ + 0.027070073410868645, + 0.0030636305455118418, + -0.026276154443621635, + 0.007753514684736729, + 0.046072907745838165, + 0.043767981231212616, + 0.0015878378180786967, + -0.02827375754714012, + -0.018695509061217308, + -0.012209705077111721, + -0.012600261718034744, + -0.007836747914552689, + -0.0037391020450741053, + -0.02617371454834938, + 0.029503051191568375, + -0.01740219071507454, + -0.04448506981134415, + -0.027607889845967293, + 0.03928618133068085, + -0.005637464579194784, + -0.022677909582853317, + 0.0053077321499586105, + -0.019066859036684036, + -0.03144943341612816, + 0.020667502656579018, + 0.032653115689754486, + 0.011249318718910217, + -0.010244115255773067, + -0.009091651998460293, + 0.028529860079288483, + -0.013278934173285961, + 0.004376158118247986, + 0.08430906385183334, + -0.011799939908087254, + -0.01489238254725933, + 0.016224117949604988, + 0.03828737884759903, + -0.0028347386978566647, + -0.020321764051914215, + 0.014264930039644241, + 0.02993842586874962, + -0.06607454270124435, + 0.036008063703775406, + 0.03260189667344093, + 0.01866989955306053, + -0.030962837859988213, + -0.030348191037774086, + -0.05536944046616554, + -0.01975833624601364, + -0.009840752929449081, + -0.004126457497477531, + -0.021320564672350883, + -0.01791439577937126, + 0.033831190317869186, + -0.03431778401136398, + 0.008675484918057919, + 0.015571055002510548, + 0.06668918579816818, + 0.0191308856010437, + 0.08005776256322861, + 0.03703247755765915, + 0.06909655779600143, + -0.0532693974673748, + -0.001645460957661271, + 0.044305797666311264, + -0.01732536032795906, + 0.0039503867737948895, + -0.018823562189936638, + -0.028171315789222717, + -0.00284594320692122, + 0.0035246158950030804, + -0.003777517471462488, + -0.017773538827896118, + 0.018311355262994766, + 0.04415213689208031, + -0.039439842104911804, + 0.02269071526825428, + 0.05900610238313675, + 0.004965194500982761, + 0.028581080958247185, + 0.03790322691202164, + -0.052910853177309036, + -0.04922297224402428, + 0.01756865717470646, + -0.05180961266160011, + -0.030732344835996628, + -0.0009747915901243687, + -0.03052746318280697, + -0.007439788430929184, + 0.01476433128118515, + -0.02768472023308277, + 0.019322961568832397, + -0.03459949791431427, + 0.008707498200237751, + -0.00952062476426363, + 0.0122865354642272, + -0.006562636233866215, + 0.03211529925465584, + 0.025763949379324913, + 0.0016934802988544106, + 0.035751961171627045, + -0.009322145022451878, + -0.02088518999516964, + -0.025827975943684578, + -0.020040050148963928, + -0.07140148431062698, + -0.03475315868854523, + -0.029682323336601257, + 0.029298169538378716, + 0.013970412313938141, + 0.0016078458866104484, + -0.009117262437939644, + 0.041002072393894196, + 0.05782802775502205, + -0.03552147001028061, + 0.026942022144794464, + 0.021410200744867325, + -0.022793155163526535, + -0.03611050546169281, + 0.07452593743801117, + -0.020321764051914215, + 0.008816341869533062, + 0.02197362668812275, + -0.015673495829105377, + -0.023497438058257103, + 0.013688698410987854, + -0.025559067726135254, + -0.008304135873913765, + -0.010500217787921429, + -0.013599062338471413, + -0.00784315075725317, + 0.04031059145927429, + 0.009098054841160774, + 0.022741936147212982, + -0.035880014300346375, + -0.03070673532783985, + 0.0019671902991831303, + 0.014777136035263538, + -0.02683958224952221, + -0.020910799503326416, + -0.015199705958366394, + 0.008361758664250374, + -0.022370586171746254, + -0.023010844364762306, + -0.009527026675641537, + -0.016211312264204025, + -0.007081244606524706, + 0.04947907477617264, + -0.0026826777029782534, + 0.043767981231212616, + 0.021819965913891792, + 0.01865709386765957, + -0.044946055859327316, + 0.030604293569922447, + -0.03716052696108818, + -0.01933576725423336, + -0.04010571166872978, + 0.028965234756469727, + -0.033651918172836304, + -0.023971229791641235, + -0.021410200744867325, + 0.008144071325659752, + 0.005144466646015644, + -0.0033229347318410873, + -0.011044436134397984, + 0.006162475328892469, + 0.019643090665340424, + -0.02763350121676922, + 0.01310606487095356, + 0.011710303835570812, + 0.0029211733490228653, + 0.000725891615729779, + -0.029323779046535492, + -0.0330628827214241, + 0.007042828947305679, + -0.025892000645399094, + -0.02214009314775467, + -0.011876771226525307, + -0.026813970878720284, + -0.04264112934470177, + 0.006709895562380552, + 0.004180879332125187, + 0.042052093893289566, + 0.007849553599953651, + 0.010929190553724766, + 0.05234742909669876, + -0.028068875893950462, + -0.017043646425008774, + -0.046329010277986526, + 0.06228422001004219, + -0.01745341159403324, + 0.026737140491604805, + 0.05526700243353844, + 0.003716693026944995, + -0.016121676191687584, + -0.051860831677913666, + 0.05332062020897865, + 0.051988884806632996, + -0.020654696971178055, + 0.009936791844666004, + 0.0025594281032681465, + -0.02214009314775467, + 0.020782748237252235, + 0.023433413356542587, + -0.047122929245233536, + -0.0019511837745085359, + -0.010557841509580612, + -0.007330944761633873, + 0.030373800545930862, + 0.08943112194538116, + -0.024176111444830894, + -0.026813970878720284, + -0.0074782040901482105, + -0.00800961721688509, + -0.05941586568951607, + 0.03506048396229744, + 0.04189842939376831, + 0.01505884900689125, + 0.0648452490568161, + -0.011838355101644993, + 0.0020984429866075516, + 0.005118856206536293, + 0.02335658296942711, + 0.010685892775654793, + -0.014815551228821278, + -0.04005448892712593, + -0.019604675471782684, + 0.04458751156926155, + 0.02080835960805416, + -0.006697090342640877, + 0.04965834692120552, + -0.006876362022012472, + -0.012382574379444122, + -0.031346991658210754, + 0.006428182125091553, + 0.0764210969209671, + 0.01677473820745945, + -0.07949433475732803, + -0.006825141608715057, + 0.033831190317869186, + -0.0006346549489535391, + 0.054959677159786224, + -0.04387042298913002, + -0.001497401506640017, + -0.014674695208668709, + 0.00333894114010036, + 0.00758064491674304, + -0.014700304716825485, + 0.04781440645456314, + 0.0625915452837944, + 0.029503051191568375, + -0.026788361370563507, + -0.000799921341240406, + 0.04136061295866966, + -0.016198506578803062, + 0.036853205412626266, + 0.007638268172740936, + 0.02558467723429203, + 0.004241704009473324, + -0.01224812027066946, + -0.026224935427308083, + 0.011543837375938892, + -0.008060838095843792, + -0.009021223522722721, + -0.06172079220414162, + 0.05227059870958328, + -0.03974716737866402, + 0.016877179965376854, + -0.00659464905038476, + 0.010916384868323803, + -0.01321490854024887, + -0.033651918172836304, + 0.00305082555860281, + 0.05577920749783516, + 0.048966869711875916, + 0.04484361410140991, + 0.020488230511546135, + -0.010052038356661797, + 0.002162468619644642, + 0.06090126559138298, + -0.022370586171746254, + -0.015378978103399277, + -0.04105329141020775, + 0.035495858639478683, + -0.019566260278224945, + 0.03234579414129257, + -0.03605928644537926, + 0.012363366782665253, + 0.047916848212480545, + -0.012517028488218784, + -0.01941259764134884, + -0.0485571064054966, + 0.028401808813214302, + -0.07780405133962631, + -0.007183685898780823, + -0.0053493487648665905, + -0.03375435993075371, + 0.012152081355452538, + -0.03623855859041214, + -0.015289342030882835, + 0.023420607671141624, + 0.008195292204618454, + -0.030604293569922447, + 0.0017414995236322284, + -0.04202648252248764, + 0.018272940069437027, + -0.014405786991119385, + 0.0382617712020874, + 0.007606255356222391, + -0.04302528500556946, + 0.0036974851973354816, + -0.05516456067562103, + -0.06627942621707916, + 0.03431778401136398, + -0.015891183167696, + -0.006780323572456837, + -0.018964417278766632, + 0.005663075018674135, + 0.010180089622735977, + 0.03442022576928139, + -0.020360179245471954, + 0.016300948336720467, + -0.021487031131982803, + 0.007350152358412743, + 0.0301176980137825, + -0.002828336087986827, + 0.03915812820196152, + -0.050554707646369934, + 0.043767981231212616, + -0.022511443123221397, + 0.016006430611014366, + -0.05557432398200035, + -0.012645079754292965, + -0.009450196288526058, + 0.07027462869882584, + -0.016262533143162727, + -0.01224812027066946, + 0.023382192477583885, + -0.00045498277177102864, + -0.04927419498562813, + 0.011415786109864712, + 0.01900283433496952, + 0.003758309641852975, + 0.01601923443377018, + 0.02696763351559639, + -0.03057868406176567, + -0.02919572778046131, + 0.060542721301317215, + 0.024419410154223442, + 0.008348953910171986, + 0.000560225045774132, + -0.025072472169995308, + -0.03431778401136398, + 0.01933576725423336, + 0.03183358907699585, + -0.0028587484266608953, + 0.055932868272066116, + 0.006287325639277697, + 0.06187445670366287, + 0.001317329122684896, + -0.003927977755665779, + -0.007811137940734625, + -0.02294681780040264, + 0.017338164150714874, + 0.06894289702177048, + 0.02642981708049774, + 0.02868352271616459, + 0.03662271052598953, + -0.00395358819514513, + 0.006626661866903305, + 0.021192513406276703, + -0.014162489213049412, + -0.0017046848079189658, + 0.02814570628106594, + 0.019553454592823982, + 0.02189679630100727, + -0.005218096077442169, + 0.01046180259436369, + 0.014751525595784187, + -0.041002072393894196, + 0.03070673532783985, + 0.009392572566866875, + 0.030553072690963745, + 0.03782639652490616, + 0.027018854394555092, + -0.02881157398223877, + 0.051066912710666656, + -0.0625915452837944, + 0.01430334523320198, + -0.020437009632587433, + 0.025341380387544632, + 0.03045063279569149, + -0.020142491906881332, + -0.04043864458799362, + 0.027735941112041473, + 0.010186491534113884, + -0.015891183167696, + -0.028068875893950462, + -0.04922297224402428, + -0.05654751509428024, + 0.025315769016742706, + -0.03703247755765915, + 0.046738773584365845, + 0.025763949379324913, + -0.015750326216220856, + -0.02005285583436489, + 0.031014058738946915, + 0.05301329493522644, + -0.001751103438436985, + 0.006428182125091553, + -0.061925675719976425, + 0.02490600384771824, + -0.014661889523267746, + 0.0020104076247662306, + 0.016249727457761765, + 0.016761932522058487, + -0.025827975943684578, + 0.03142382204532623, + -0.013112467713654041, + -0.0002194881672039628, + -0.008880367502570152, + 0.03283238783478737, + -0.027121294289827347, + 0.02173032984137535, + -0.020232127979397774, + 0.021141292527318, + -0.047532692551612854, + 0.015366172417998314, + 0.023996839299798012, + -0.02512369304895401, + -0.05506211891770363, + -0.00859865453094244, + -0.0051316614262759686, + 0.01404724270105362, + -0.028657911345362663, + 0.0074269832111895084, + -0.039363011717796326, + 0.04243624582886696, + 0.04256429895758629, + 0.015366172417998314, + 0.004180879332125187, + -0.054754793643951416, + 0.029221337288618088, + -0.0012300941161811352, + -0.031475044786930084, + 0.01815769448876381, + -0.0492485836148262, + -0.01769670844078064, + 0.04658511281013489, + 0.04177037999033928, + -0.04684121534228325, + 0.0036046479362994432, + 0.02470112219452858, + 0.05321817845106125, + 0.00880993902683258, + -0.007388568017631769, + 0.014661889523267746, + -0.0341385118663311, + -0.0038991663604974747, + 0.0005058031529188156, + -0.0002895162906497717, + 0.021064462140202522, + 0.02567431330680847, + -0.04282040148973465, + -0.027966434136033058, + -0.0498376190662384, + 0.03539341688156128, + 0.011979212053120136, + -0.008361758664250374, + 0.03741662949323654, + 0.03941423445940018, + 0.003244503401219845, + -0.040080100297927856, + 0.035547077655792236, + -0.018772341310977936, + -0.007170880679041147, + 0.006914777681231499, + 0.006434584967792034, + -0.009059639647603035, + -0.037262968719005585, + -0.041206952184438705, + 0.016621077433228493, + 0.033575087785720825, + 0.03810810670256615, + 0.06822580844163895, + -0.023932814598083496, + 0.007727904245257378, + 0.025687118992209435, + 0.015122874639928341, + 0.02906767651438713, + 0.01954064890742302, + -0.010455399751663208, + 0.03070673532783985, + 0.022319365292787552, + -0.019643090665340424, + -0.0051060509867966175, + -0.011025228537619114, + -0.0150332385674119, + 0.028324978426098824, + 0.009392572566866875, + -0.05367916449904442, + 0.022319365292787552, + 0.004244904965162277, + -0.010621867142617702, + 0.0028811574447900057, + 0.03452266752719879, + 0.01136456523090601, + 0.0544474720954895, + 0.0015038041165098548, + 0.029707932844758034, + 0.0013021230697631836, + -0.01063467189669609, + -0.018990028649568558, + 0.008252914994955063, + -0.0020888391882181168, + 0.05367916449904442, + 0.012485015206038952, + -0.0095398323610425, + 0.004270515404641628, + -0.006914777681231499, + 0.0017879181541502476, + 0.04307650402188301, + -0.038773976266384125, + -0.0035150120966136456, + -0.027992043644189835, + -0.008316940627992153, + -0.056342631578445435, + -0.015250925906002522, + -0.051015693694353104, + -0.02735178731381893, + 0.014982018619775772, + 0.0124594047665596, + -0.010135271586477757, + -0.02621212974190712, + 0.01496921293437481, + -0.015878377482295036, + -0.03616172447800636, + 0.007350152358412743, + -6.127461529104039e-05, + -0.03019452840089798, + -0.03780078515410423, + -0.03170553594827652, + 0.012299340218305588, + -0.018400991335511208, + -0.05011933296918869, + -0.02385598234832287, + 0.0039087701588869095, + 0.006588246673345566, + -0.0008971603820100427, + -0.016300948336720467, + -0.017594268545508385, + -0.01920771598815918, + 0.00788796879351139, + 0.01241458673030138, + -0.015314952470362186, + -0.017427800223231316, + -0.009680688381195068, + -0.04451068118214607, + 0.016326557844877243, + 0.0011356561444699764, + 0.011947198770940304, + 0.027992043644189835, + 0.001271710847504437, + -0.006946790497750044, + -0.024777952581644058, + -0.017299748957157135, + -0.024880394339561462, + -0.0022040854673832655, + 0.02536698989570141, + -0.011966407299041748, + 0.023394998162984848, + -0.017171697691082954, + -0.0016806750791147351, + 0.04123256355524063, + -0.003188480855897069, + -0.0150332385674119, + -0.011697499081492424, + 0.008060838095843792, + -0.05921098589897156, + 0.009091651998460293, + -0.01318929810076952, + 0.009853558614850044, + 0.03257628530263901, + -0.008291330188512802, + 0.040489863604307175, + 0.013611868023872375, + 0.0038127314765006304, + -0.0019527844851836562, + 0.02545662596821785, + 0.0012885176111012697, + 0.037058085203170776, + -0.004680280108004808, + 0.01318929810076952, + 0.04266674071550369, + 0.0026378596667200327, + 0.020782748237252235, + -0.020437009632587433, + -0.03941423445940018, + 0.043255776166915894, + -0.010564243420958519, + 0.010103258304297924, + -0.007471801247447729, + -0.020795553922653198, + 0.03293482959270477, + -0.010807541199028492, + -0.007145270239561796, + 0.010269725695252419, + -0.03918373957276344, + -0.021883990615606308, + 0.034036073833703995, + 0.01874672994017601, + -0.027735941112041473, + 0.030143309384584427, + -0.031193330883979797, + 0.04381920397281647, + 0.030629904940724373, + 0.004600247833877802, + 0.02927255816757679, + 0.006108053494244814, + -0.0034285772126168013, + 0.023766346275806427, + -0.001821531681343913, + 0.026096882298588753, + -0.016493026167154312, + -0.0318848080933094, + -0.04148866608738899, + -0.0038671535439789295, + -0.04381920397281647, + 0.032064080238342285, + -0.03418973460793495, + 0.0004409771354403347, + -0.003004406811669469, + -0.0005130060599185526, + -0.035419028252363205, + -0.01031454373151064, + -0.005403770599514246, + -0.006837946828454733, + -0.035419028252363205, + -0.001927174162119627, + 0.018567457795143127, + 0.03175675496459007, + -0.0073181395418941975, + -0.006392967887222767, + 0.026557868346571922, + -0.016544245183467865, + -0.046866826713085175, + -0.009866363368928432, + -0.024521850049495697, + 0.0300664771348238, + -0.01900283433496952, + -0.06187445670366287, + 0.005707893054932356, + 0.007830345071852207, + 0.01749182678759098, + -0.02193521149456501, + -0.005723899230360985, + -0.004296125844120979, + -0.05111813545227051, + 0.023599879816174507, + 0.0016182500403374434, + -0.00653062341734767, + 0.0113069424405694, + -0.024022450670599937, + 0.00653062341734767, + 0.013650283217430115, + 0.009059639647603035, + -0.02529015950858593, + 0.006044027861207724, + 0.06868679076433182, + 0.01911807991564274, + -0.013727114535868168, + -0.02479075826704502, + 0.013099662028253078, + 0.025533456355333328, + 0.011543837375938892, + -0.015327757224440575, + -0.004837143234908581, + -0.025469431653618813, + 0.006482603959739208, + -0.02490600384771824, + -0.021115683019161224, + -0.054959677159786224, + -0.009213301353156567, + -0.005259712692350149, + -0.020104076713323593, + 0.0011292536510154605, + 0.0010948397684842348, + 0.011761524714529514, + -0.028401808813214302, + -0.011127670295536518, + -0.0027531059458851814, + 0.009360560216009617, + -0.037134915590286255, + -0.018272940069437027, + 0.02940060943365097, + -0.0030972440727055073, + 0.0007162877591326833, + -0.015545444563031197, + -0.005896768532693386, + -0.010500217787921429, + -0.04046425595879555, + 0.011812745593488216, + 0.007548632100224495, + 0.018170498311519623, + 0.017338164150714874, + 0.017466215416789055, + -0.01063467189669609, + -0.015250925906002522, + -0.027787161991000175, + 0.03057868406176567, + 0.001180474180728197, + -0.014021632261574268, + -0.017043646425008774, + 0.033447034657001495, + -0.026327375322580338, + 0.011569447815418243, + -0.006850752048194408, + -0.03523975610733032, + 0.015481418929994106, + -0.003238100791350007, + 0.005000408738851547, + -0.011063644662499428, + -0.044433850795030594, + 0.005294926930218935, + -0.03662271052598953, + -0.015148485079407692, + -0.04604729637503624, + -0.010058440268039703, + -0.04064352810382843, + 0.013496621511876583, + -0.0231516994535923, + 0.028299367055296898, + -0.003854348324239254, + 0.03162870556116104, + 0.00431853486225009, + 0.02855547145009041, + -0.03283238783478737, + 0.0005902370903640985, + -0.005227699875831604, + -0.02125653810799122, + -0.0008071242482401431, + -0.0492485836148262, + 0.0019783948082476854, + 0.00978953205049038, + 0.014982018619775772, + 0.022280950099229813, + -0.05040104687213898, + -0.022050457075238228, + 0.012913987971842289, + -0.018183303996920586, + -0.017543047666549683, + -0.016467414796352386, + 0.016326557844877243, + -0.058237794786691666, + 0.004449787549674511, + 0.01845221221446991, + -0.01577593758702278, + 0.007164477836340666, + 0.030168918892741203, + 0.06904533505439758, + -0.05793046951293945, + 0.031193330883979797, + -0.016621077433228493, + 0.05086203292012215, + 0.026609089225530624, + -0.0162369217723608, + -0.010602659545838833, + -0.0023161303251981735, + 0.0009411780629307032, + 0.012926792725920677, + 0.04374236986041069, + 0.004840344190597534, + 0.015878377482295036, + 0.03808249905705452, + -0.01035936176776886, + -0.021794354543089867, + 0.003220493672415614, + -0.05577920749783516, + -0.03926056995987892, + 0.02532857470214367, + 0.010929190553724766, + -0.006117657292634249, + -0.04235941544175148, + -0.0034605900291353464, + 0.01664668694138527, + -0.03385680168867111, + -0.02201204188168049, + 0.011319747194647789, + -0.02637859620153904, + 0.015404587611556053, + 0.03221774101257324, + 0.02189679630100727, + 0.024637097492814064, + -0.03931179270148277, + 0.00333894114010036, + 0.03198724985122681, + 0.0008555436506867409, + 0.02788960374891758, + 0.010141673497855663, + -0.018093667924404144, + 0.0033613501582294703, + 0.02134617418050766, + 0.004536222200840712, + -0.04248746857047081, + 0.006204092409461737, + -0.02051384001970291, + 0.023087674751877785, + -0.0012525031343102455, + 0.037852004170417786, + 0.015302146784961224, + -0.02453465573489666, + 0.05280841141939163, + 0.010109661146998405, + -0.0416935496032238, + 0.006908375304192305, + 0.003601446747779846, + -0.005615055561065674, + -0.0010716305114328861, + -0.010269725695252419, + 0.0364946611225605, + -0.033318985253572464, + -0.02562309242784977, + -0.007913579232990742, + 0.04584241658449173, + 0.037186138331890106, + -0.013778334483504295, + 0.017389385029673576, + -0.0036654723808169365, + 0.007689489051699638, + -0.03908129781484604, + -0.005426179617643356, + 0.0049972073175013065, + -0.0011076449882239103, + -0.0347275510430336, + 0.006908375304192305, + 0.03544463962316513, + 0.030296970158815384, + -0.0018327361904084682, + -0.0021656700409948826, + -0.01486677210777998, + 0.0029227740596979856, + 0.004491404164582491, + 0.016198506578803062, + -0.015327757224440575, + -0.036340996623039246, + -0.015391782857477665, + -0.016928400844335556, + -0.032448235899209976, + 0.0133173493668437, + 0.018529042601585388, + 0.035162925720214844, + -0.007017218973487616, + 0.026160908862948418, + 0.04374236986041069, + -0.0017703111516311765, + 0.06750871986150742, + -0.009418183006346226, + 0.020693112164735794, + 0.0054165758192539215, + -0.03150065243244171, + 0.015532639808952808, + -0.03477877005934715, + -0.01824733056128025, + 0.05501089617609978, + -0.011095657013356686, + -0.005493406672030687, + 0.009994414635002613, + -0.020962020382285118, + -0.032653115689754486, + 0.023881593719124794, + 0.022076068446040154, + 0.0301176980137825, + 0.02386878803372383, + -0.018093667924404144, + 0.011012423783540726, + -0.01516128983348608, + -0.012933195568621159, + -0.014405786991119385, + 0.03964472562074661, + -0.028324978426098824, + -0.0025482235942035913, + -0.0324738435447216, + 0.0295286625623703, + 0.043050892651081085, + -0.02650664746761322, + 0.026685919612646103, + -0.007132465019822121, + -0.018132083117961884, + 0.021371785551309586, + 0.0053493487648665905, + -0.03098844736814499, + -0.04827539250254631, + -0.007254113908857107, + 0.03813371807336807, + -0.007715099025517702, + 0.038569092750549316, + 0.012856364250183105, + -0.01126212440431118, + 0.008144071325659752, + 0.011230111122131348, + 0.019258936867117882, + -0.023241335526108742, + -0.035905621945858, + -0.021397395059466362, + -0.008003215305507183, + -0.02512369304895401, + 0.018336966633796692, + 0.0025770352222025394, + -0.01819610968232155, + 0.0266346987336874, + -0.03262750804424286, + 0.01394480187445879, + 0.01325332373380661, + -0.03452266752719879, + 0.03974716737866402, + -0.03823615983128548, + -0.02344621904194355, + 0.009757519699633121, + -0.042000871151685715, + 0.002892361953854561, + -0.009930389001965523, + -0.001211686758324504, + -0.019527845084667206, + -0.006521019618958235, + 0.0010100057115778327, + -0.003895964939147234, + 0.010877969674766064, + -0.021333370357751846, + 0.004766714759171009, + -0.033447034657001495, + -0.0388508066534996, + -0.022805960848927498, + 0.026199324056506157, + 0.011076449416577816, + 0.00011504621215863153, + 0.04297406226396561, + 0.020667502656579018, + 0.0058359443210065365, + -0.03290921822190285, + -0.029707932844758034, + 0.06976242363452911, + -0.005851950496435165, + 0.022409001365303993, + 0.0007170880562625825, + -0.059159763157367706, + -0.014328955672681332, + 0.02637859620153904, + -0.00751661928370595, + 0.025994442403316498, + -0.07186246663331985, + -0.00653062341734767, + 0.028888404369354248, + -0.011729511432349682, + 0.02151264250278473, + 0.031014058738946915, + -0.012337756343185902, + 0.000687076011672616, + -0.04235941544175148, + -0.023087674751877785, + 0.02164069376885891, + 0.011121267452836037, + 0.0106922946870327, + -0.011236513964831829, + 0.022165704518556595, + 0.029426220804452896, + -0.03641783073544502, + -0.003972795791924, + 0.017286943271756172, + -0.02587919495999813, + 0.01727413944900036, + -0.03370313718914986, + 0.034240953624248505, + 0.016557050868868828, + -0.013739919289946556, + -0.03293482959270477, + 0.007190088275820017, + -0.0018455414101481438, + -0.002405766397714615, + 0.016249727457761765, + -0.032729946076869965, + -0.014367371797561646, + 0.023164505138993263, + 0.005669477395713329, + -0.018336966633796692, + 0.021397395059466362, + 0.01577593758702278, + 0.03196163848042488, + -0.0249188095331192, + 0.021128486841917038, + 0.02473953738808632, + -0.018605874851346016, + 0.013054843991994858, + 0.027274956926703453, + -0.028760353103280067, + -0.015583859756588936, + -0.011082852259278297, + -0.013650283217430115, + 0.04671316593885422, + 0.005615055561065674, + -0.016582660377025604, + -0.010596256703138351, + 0.024048060178756714, + -0.009488611482083797, + -0.017018036916851997, + 0.013560647144913673, + -0.014585059136152267, + -0.021909601986408234, + 0.05624019354581833, + 0.029323779046535492, + -0.034701939672231674, + -0.0034221746027469635, + 0.004590644035488367, + -0.009027626365423203, + -0.007977604866027832, + 0.006159274373203516, + -0.05388404428958893, + 0.021499836817383766, + -0.03967033699154854, + -0.033523865044116974, + -0.021615082398056984, + -0.022959623485803604, + -0.008323343470692635, + 0.018042447045445442, + -0.008067240938544273, + 0.00952062476426363, + 0.037134915590286255, + -0.014367371797561646, + 0.008361758664250374, + -0.00039735963218845427, + 0.012510625645518303, + -0.0013925593812018633, + 0.03091161698102951, + -0.01325332373380661, + -0.0014773934381082654, + -0.01664668694138527, + -0.029298169538378716, + -0.02068030647933483, + -0.011870368383824825, + 0.011774329468607903, + 0.0479680672287941, + 0.0024889998603612185, + -0.030015256255865097, + -0.010384971275925636, + 0.023126089945435524, + -0.025354184210300446, + 0.02630176581442356, + 0.002871553413569927, + 0.052910853177309036, + 0.01874672994017601, + -4.145415005041286e-06, + -0.005016414914280176, + 0.021064462140202522, + 0.00350220687687397, + 0.002836339408531785, + -0.020795553922653198, + 0.009219703264534473, + 0.009635870344936848, + 0.02130775898694992, + -0.007094049826264381, + 0.0226138848811388, + 0.009469403885304928, + 0.006972400937229395, + 0.00659464905038476, + 0.019809557124972343, + -0.007830345071852207, + 0.006780323572456837, + -0.016032040119171143, + 0.026942022144794464, + 0.018042447045445442, + -0.006268118042498827, + 0.007190088275820017, + -0.023676710203289986, + -0.012824351899325848, + 0.007900773547589779, + -0.016557050868868828, + -0.0020296152215451, + 0.0228571817278862, + 0.01516128983348608, + -0.009270924143493176, + -0.026352986693382263, + -0.019054053351283073, + 0.009315742179751396, + 0.02893962524831295, + -0.013983217068016529, + 0.05664995685219765, + -0.009206898510456085, + 0.008112058974802494, + -0.034292176365852356, + -0.015391782857477665, + 0.02520052343606949, + 0.019322961568832397, + -0.015993624925613403, + 0.027966434136033058, + 0.017466215416789055, + -0.010500217787921429, + 0.015583859756588936, + -0.013035636395215988, + 0.0006374560762196779, + -0.007740709464997053, + -0.0007214898359961808, + 0.019386988133192062, + -0.0016518635675311089, + -0.012216106988489628, + -0.046149738132953644, + 0.04965834692120552, + 0.004603449255228043, + 0.0012372969649732113, + -0.03283238783478737, + 0.02105165645480156, + -0.0369812548160553, + 0.008611459285020828, + 0.03967033699154854, + -0.04448506981134415, + -0.0014037638902664185, + 0.01664668694138527, + 0.02855547145009041, + -0.03523975610733032, + -0.018055252730846405, + -0.0022857182193547487, + -0.015238121151924133, + -0.011524629779160023, + -0.017376579344272614, + 0.022255340591073036, + -0.01592959836125374, + 0.02034737356007099, + 0.02381756715476513, + 0.0022889194078743458, + 0.009827948175370693, + -0.029426220804452896, + 0.033447034657001495, + -0.005781522486358881, + 0.011479811742901802, + -0.015186900272965431, + 0.019515039399266243, + -0.009251716546714306, + -0.012760326266288757, + 0.012664287351071835, + -0.011787135154008865, + 0.006434584967792034, + 0.0053077321499586105, + -0.0026954826898872852, + -0.008963600732386112, + 0.009078847244381905, + -0.047199759632349014, + -0.003358148969709873, + -0.010103258304297924, + 0.03523975610733032, + -0.006338546052575111, + 0.019322961568832397, + -0.01601923443377018, + -0.027787161991000175, + 0.0037006866186857224, + -0.006181683391332626, + 0.0003741502878256142, + 0.013138077221810818, + -0.00866268016397953, + 0.03019452840089798, + -0.0242785532027483, + -0.01849062740802765, + 0.011652681045234203, + -0.012356963939964771, + 0.005301329772919416, + 0.00987916812300682, + -0.018772341310977936, + 0.014418591745197773, + 0.004312132019549608, + 0.038441043347120285, + -0.006998010911047459, + 0.00164866226259619, + -0.013394180685281754, + 0.008041630499064922, + -0.01983516849577427, + 0.025520652532577515, + 0.013266129419207573, + -0.016249727457761765, + -0.006444188766181469, + -0.027838382869958878, + 0.006876362022012472, + -0.0030092087108641863, + -0.002258507302030921, + 0.0021432610228657722, + 0.012382574379444122, + 0.006889167241752148, + 0.0324738435447216, + -0.00020188109192531556, + -0.001807125867344439, + 0.011454201303422451, + -0.02298523299396038, + 0.03493243083357811, + -5.952390893071424e-06, + -0.012427392415702343, + -0.0051060509867966175, + -0.0017735124565660954, + -0.012126470915973186, + -0.007439788430929184, + 0.025008445605635643, + -0.008528226055204868, + 0.04374236986041069, + 0.01685156859457493, + 0.018042447045445442, + 0.01576313190162182, + -0.026186518371105194, + 0.004555429797619581, + -0.010621867142617702, + -0.027018854394555092, + -0.0029787966050207615, + -0.013547842390835285, + 0.001179673825390637, + -0.024765148758888245, + -0.03175675496459007, + 0.03603367507457733, + -0.01413687877357006, + -0.005762314889580011, + 0.00859865453094244, + -0.015020433813333511, + -0.009763922542333603, + -0.009482208639383316, + 0.0030844390857964754, + -0.0266346987336874, + 0.027479838579893112, + -0.02495722472667694, + 0.0013397381408140063, + -0.010212101973593235, + -0.008477005176246166, + -0.021154098212718964, + 0.00878432858735323, + 0.012446600012481213, + -0.003354947781190276, + -0.015507029369473457, + 0.039234962314367294, + -0.0176582932472229, + -0.005435783416032791, + -0.01400882750749588, + 0.037519071251153946, + -0.020897993817925453, + -0.03395923972129822, + -0.012113666161894798, + 0.017875980585813522, + -0.025597482919692993, + 0.00955903995782137, + -0.017543047666549683, + 0.022716324776411057, + -0.018849171698093414, + -0.010160882025957108, + -0.022844376042485237, + -0.00802882481366396, + -0.026916412636637688, + -0.007919981144368649, + 0.003329337341710925, + -0.02289559692144394, + -0.009699896909296513, + 0.013138077221810818, + -0.022741936147212982, + 0.023010844364762306, + 0.018349770456552505, + -0.017210112884640694, + 0.015788741409778595, + -0.015417393296957016, + 0.005720697809010744, + -0.02293401211500168, + 0.023215726017951965, + 0.0006558634340763092, + -0.007119659800082445, + 0.013010025955736637, + -0.01924613118171692, + 0.03570074215531349, + -0.003402967005968094, + -0.01598081924021244, + -0.03854348137974739, + -0.03595684468746185, + -0.02482917346060276, + -0.002261708490550518, + -0.040028881281614304, + 0.002948384266346693, + 0.0015350165776908398, + -0.017901591956615448, + 0.0025498243048787117, + -0.022165704518556595, + 0.034958042204380035, + -0.024304162710905075, + -0.02650664746761322, + -0.025315769016742706, + -0.05237303674221039, + -0.016825959086418152, + -0.010474607348442078, + 8.838550274958834e-05, + 0.02914450690150261, + -0.016032040119171143, + -0.031193330883979797, + -0.021333370357751846, + -0.009187690913677216, + -0.00327651621773839, + 0.03280678018927574, + 0.015186900272965431, + -0.036084894090890884, + 0.014213710092008114, + -0.0009988012025132775, + 0.001493399846367538, + 0.009847155772149563, + -0.0007182885310612619, + 0.015878377482295036, + -0.01423931960016489, + 0.03170553594827652, + -0.02893962524831295, + -0.0020024043042212725, + -0.05419136956334114, + -0.052398648113012314, + -0.003182078246027231, + -0.040028881281614304, + 0.02272913046181202, + -0.022473027929663658, + -0.012696299701929092, + -0.0013813548721373081, + -0.012625872157514095, + -0.0011540636187419295, + -0.016493026167154312, + -0.003937581554055214, + 0.026942022144794464, + 0.007382165640592575, + 0.005515815690159798, + 0.03208969160914421, + -0.0049299802631139755, + 0.014149683527648449, + -0.06335984915494919, + -0.01656985655426979, + -0.011883173137903214, + -0.020693112164735794, + -0.0022553058806806803, + 0.023433413356542587, + -0.0035950441379100084, + -0.01153103169053793, + -0.05439624935388565, + -0.017709514126181602, + -0.020641891285777092, + 0.019386988133192062, + 0.012613066472113132, + -0.000375150702893734, + -0.015417393296957016, + -0.05629141256213188, + -0.003326136153191328, + 0.006780323572456837, + 0.008835549466311932, + -0.0001141458487836644, + -0.024649901315569878, + -0.05972319096326828, + -0.0076958914287388325, + -0.022703519091010094, + -0.03539341688156128, + -0.011191695928573608, + -0.03882519528269768, + 0.023471828550100327, + 0.009744714014232159, + -0.0138807762414217, + -0.004187282174825668, + -0.0036558685824275017, + 0.02068030647933483, + 0.03867153450846672, + 0.006303332280367613, + 0.002112848684191704, + 0.014610668644309044, + -0.012088055722415447, + -0.005983203649520874, + 0.00899561308324337, + -0.015571055002510548, + -0.019310157746076584, + 0.035342197865247726, + -0.007036426570266485, + -0.016428999602794647, + 0.020782748237252235, + 0.031090889126062393, + 0.014559448696672916, + 0.012062445282936096, + 0.004907571244984865, + 0.0034093696158379316, + 0.00166947057005018, + -0.0015166092198342085, + 0.0037743160501122475, + -0.0009163680952042341, + -0.011038034223020077, + -0.022114483639597893, + 0.005362153984606266, + 0.009597455151379108, + -9.038631105795503e-05, + -0.006284124217927456, + -0.016249727457761765, + -0.02294681780040264, + -0.021410200744867325, + -0.0019367779605090618, + 0.011921589262783527, + 0.012638676911592484, + 0.009917584247887135, + 0.035675130784511566, + 0.010231309570372105, + -0.006463396362960339, + -0.0138807762414217, + 0.007471801247447729, + 0.028709132224321365, + -0.015302146784961224, + 0.011537434533238411, + 0.006383364088833332, + 0.025892000645399094, + 0.009418183006346226, + 0.002983598504215479, + 0.015596665441989899, + 0.024188917130231857, + 0.029477441683411598, + 0.014495423063635826, + -0.016044845804572105, + -0.004597046412527561, + -0.005563835147768259, + -0.011960004456341267, + -0.0005710293771699071, + 0.01505884900689125, + -0.021627888083457947, + -0.008022422902286053, + 0.013535036705434322, + -0.006031222641468048, + -0.03892763704061508, + 0.00563106220215559, + 0.0399264395236969, + 0.002357747172936797, + -0.0066330647096037865, + 0.03229457139968872, + 0.024124890565872192, + -0.006044027861207724, + -0.011166085489094257, + 0.006521019618958235, + 0.012408184818923473, + 0.003777517471462488, + -0.02260107919573784, + 0.031270161271095276, + 0.01837538182735443, + 0.015148485079407692, + -0.0023449419531971216, + -0.0011852760799229145, + -0.04056669399142265, + 0.019233325496315956, + -0.014687499962747097, + -0.01381675060838461, + -0.030015256255865097, + 0.013496621511876583, + 0.0049171750433743, + -0.015507029369473457, + 0.007330944761633873, + -0.022665103897452354, + -0.01832416094839573, + 0.019566260278224945, + 0.01983516849577427, + -0.03618733584880829, + -0.0088035361841321, + -0.021000435575842857, + -0.01715889200568199, + 0.03879958763718605, + 0.019028443843126297, + 0.011588655412197113, + 0.005320537369698286, + -0.012126470915973186, + 0.0014741921331733465, + 0.014290540479123592, + -0.003476596437394619, + 0.02886279486119747, + 0.0014998024562373757, + -0.012081652879714966, + 0.023241335526108742, + 0.038902025669813156, + -0.004116853699088097, + -0.027531059458851814, + 0.01245300192385912, + -0.028965234756469727, + 0.020104076713323593, + -0.012913987971842289, + -0.01042338740080595, + -0.023305362090468407, + -0.03372874855995178, + 0.028529860079288483, + -0.029349390417337418, + 0.0231004785746336, + 0.0173637755215168, + -0.008336148224771023, + 0.005230901297181845, + -0.004280119203031063, + 0.01318929810076952, + -0.013035636395215988, + 0.018695509061217308, + -0.012241717427968979, + 0.04474117234349251, + 0.020667502656579018, + 0.04092523828148842, + 0.018106473609805107, + -0.003639862174168229, + 0.023164505138993263, + 0.02440660446882248, + 0.006028021685779095, + 0.0226138848811388, + -0.041795987635850906, + 0.015801547095179558, + 0.01423931960016489, + 0.012446600012481213, + 0.04333260655403137, + 0.017056452110409737, + 0.010429789312183857, + 0.023202920332551003, + -0.009757519699633121, + -0.008989211171865463, + 0.03572634980082512, + -0.010000817477703094, + 0.02919572778046131, + -0.013394180685281754, + -0.030373800545930862, + -0.019054053351283073, + 0.02239619567990303, + 0.014060048386454582, + -0.044689953327178955, + 0.01581435278058052, + 0.00305082555860281, + -0.022127289324998856, + 0.0071004522033035755, + -0.0024121690075844526, + -0.000944379367865622, + 0.022421807050704956, + 0.005688684992492199, + 0.009962402284145355, + 0.030604293569922447, + -0.002466590842232108, + 0.012670690193772316, + 0.020078465342521667, + -0.04415213689208031, + 0.00950141716748476, + -0.012337756343185902, + 0.001500602811574936, + 0.007190088275820017, + -0.03951667249202728, + -0.050093721598386765, + -0.012856364250183105, + 0.00657544145360589, + -0.0009667883859947324, + ], + "index": 83, + }, + { + "title": "Bonilla observation", + "text": "On August 12, 1883, the astronomer Jos\u00e9 Bonilla reported that he saw more than 300 dark, unidentified objects crossing before the Sun while observing sunspot activity at Zacatecas Observatory in Mexico. He was able to take several photographs, exposing wet plates at 1/100 second. These represent the earliest photos of an unidentified flying object.", + "vector": [ + 0.03938209265470505, + -0.020690200850367546, + -0.013534711673855782, + -0.04537702351808548, + -0.04417803883552551, + -0.03200371563434601, + -0.004519256297498941, + 0.02880641631782055, + 0.034647632390260696, + 0.051433444023132324, + -0.06960269808769226, + 0.01139037124812603, + -0.007412964012473822, + -0.020367396995425224, + -0.033387161791324615, + 0.03314121440052986, + -0.01301207672804594, + 0.028883274644613266, + -0.02583969384431839, + -0.0472831055521965, + 0.01958344504237175, + -0.008277617394924164, + -0.00106928835157305, + 0.03304898366332054, + 0.05020371451973915, + 0.01393437385559082, + 0.021489525213837624, + 0.03861350938677788, + -0.04762127995491028, + 0.01337330974638462, + 0.05469222739338875, + 0.024825166910886765, + 0.00033697474282234907, + 0.028698815032839775, + 0.02238108031451702, + -0.01876874826848507, + 0.004576900042593479, + -0.04602263122797012, + 0.018784120678901672, + -0.011805404908955097, + 0.007778040133416653, + -0.02439476177096367, + 0.021120605990290642, + 0.0032683908939361572, + -0.06274695694446564, + -0.03633851185441017, + -0.024732938036322594, + -0.042794592678546906, + -0.04835911840200424, + -0.022749997675418854, + 0.010306671261787415, + -0.040181417018175125, + -0.020505741238594055, + -0.01580202579498291, + -0.02102837711572647, + 0.027469085529446602, + 0.017262330278754234, + 0.03609256446361542, + 0.0222888495773077, + -0.021105235442519188, + 0.07575134932994843, + -0.03686114773154259, + -0.003443242982029915, + 0.022181248292326927, + -0.00011768897093134001, + -0.02390287071466446, + 0.00931520201265812, + 0.0026093325577676296, + 0.0060410466976463795, + 0.018123140558600426, + 0.02651604637503624, + 0.006682812236249447, + -0.004215667024254799, + 0.0025881966575980186, + 0.03317195549607277, + 0.009000083431601524, + 0.02822229638695717, + -0.02880641631782055, + -0.043194252997636795, + 0.0065137241035699844, + 0.02534780278801918, + -0.01546385046094656, + 0.023195775225758553, + 0.01953732967376709, + 0.030604897066950798, + 0.006006460636854172, + 0.013480911031365395, + -0.05149492993950844, + -0.044823646545410156, + -0.014088090509176254, + 0.00893859751522541, + 0.020813174545764923, + -0.008861739188432693, + 0.04033513367176056, + 0.009392060339450836, + -0.024871282279491425, + 0.05496891587972641, + -0.03360236436128616, + -0.004035050515085459, + 0.05048040300607681, + -0.030589524656534195, + -0.014218749478459358, + -0.03415574133396149, + -0.02633158676326275, + 0.03357161954045296, + -0.06290066987276077, + -0.02548614703118801, + 0.00568365678191185, + -0.034278713166713715, + 0.05466148257255554, + -0.016816552728414536, + 0.008231502957642078, + -0.015317820012569427, + -0.024609964340925217, + 0.00550304027274251, + 0.05546080693602562, + -0.012220438569784164, + 0.051525671035051346, + -0.017001012340188026, + 0.023533951491117477, + 0.036492228507995605, + -0.014326350763440132, + 0.0441165529191494, + 0.05758209154009819, + -0.014956586994230747, + 0.013888259418308735, + 0.043962836265563965, + 0.010176013223826885, + -0.021643241867423058, + 0.006433023139834404, + 0.007977871224284172, + -0.03101992979645729, + 0.03587736189365387, + 0.02574746496975422, + -0.018753377720713615, + -0.006033360958099365, + -0.01876874826848507, + 0.04147263243794441, + 0.02623935602605343, + 0.004784416873008013, + -0.04476216062903404, + 0.011259712278842926, + -0.019660303369164467, + 0.07765742391347885, + -0.047067902982234955, + -0.028299152851104736, + -0.004799788352102041, + -0.03246486186981201, + -0.013842144049704075, + 0.019014695659279823, + 0.03074324131011963, + -0.0052378796972334385, + 0.02044425532221794, + -0.02147415466606617, + 0.0027323055546730757, + 0.04442398250102997, + 0.03381756693124771, + 0.004415498115122318, + -0.02025979571044445, + -0.014779813587665558, + -0.030374322086572647, + 0.020628714933991432, + 0.015509964898228645, + -0.0033279559575021267, + -0.009553462266921997, + -0.055214859545230865, + 0.022949829697608948, + 0.0006907621864229441, + 0.01918378286063671, + 0.02665439061820507, + 0.0409807413816452, + -0.021397296339273453, + -0.01841520145535469, + -0.00046282989205792546, + 0.017123986035585403, + -0.004976562224328518, + 0.04811317101120949, + 0.013357938267290592, + 0.045530740171670914, + -0.003310662694275379, + -0.0648067519068718, + -0.011490286327898502, + 0.042333442717790604, + -0.012858361005783081, + -0.001810008310712874, + 0.011943749152123928, + 0.02124357968568802, + 0.009099999442696571, + -0.04325573891401291, + 0.01008378341794014, + 0.013580827042460442, + -0.03809087723493576, + 0.014241806231439114, + 0.01773885078728199, + 0.032833781093358994, + -0.02786874771118164, + -0.0652986466884613, + -0.06203985959291458, + -0.04848209023475647, + -0.041718579828739166, + -0.017139356583356857, + -0.0020751687698066235, + -0.03237263485789299, + 0.01886097900569439, + 0.008277617394924164, + -0.028760302811861038, + 0.013250336982309818, + -0.006171705666929483, + -0.007028673309832811, + -0.0008488016901537776, + 0.00893859751522541, + -0.039412833750247955, + -0.010652532801032066, + 0.029697971418499947, + -0.025870436802506447, + 0.020382769405841827, + 0.005768200848251581, + -0.042517904192209244, + 0.014864357188344002, + -0.0477135106921196, + 0.035938847810029984, + -0.007678124587982893, + -0.022135132923722267, + 0.021013004705309868, + 0.012912161648273468, + 0.02728462591767311, + 0.009491975419223309, + 0.024702195078134537, + -0.03643074259161949, + -0.05426182225346565, + -0.02809932269155979, + -0.03953580930829048, + -0.0048420606181025505, + -0.0024786738213151693, + 0.03381756693124771, + 0.018430573865771294, + 0.0256552342325449, + 0.03507803753018379, + 0.00025819518486969173, + -0.016017228364944458, + 0.022842228412628174, + 0.05048040300607681, + -0.040765538811683655, + 0.008854053914546967, + 0.05109526589512825, + 0.019199153408408165, + -0.03972026705741882, + -0.0868804007768631, + -0.04156486317515373, + 0.03268006443977356, + 0.06560607999563217, + -0.002513259882107377, + 0.010967651382088661, + 0.0378141850233078, + -0.024118073284626007, + -0.05739763006567955, + -0.025670606642961502, + 0.014702955260872841, + 0.00732841994613409, + 0.003727617906406522, + -0.0387057401239872, + 0.007109374739229679, + -0.002203906187787652, + 0.00594113115221262, + -0.010844678618013859, + 0.004534628242254257, + 0.0026881122030317783, + -0.041657090187072754, + 0.010975337587296963, + -0.035047296434640884, + -0.021489525213837624, + -0.017262330278754234, + 0.008362161926925182, + 0.0017466003773733974, + -0.04549999535083771, + 0.06689729541540146, + 0.005679813679307699, + 0.051740873605012894, + 0.002225042087957263, + -0.0008396747871302068, + 0.022842228412628174, + -0.030866215005517006, + -0.02588580921292305, + -0.031096788123250008, + -0.013004391454160213, + 0.04749830812215805, + -0.03972026705741882, + -0.018445944413542747, + 0.07907161861658096, + -0.011628630571067333, + -0.020336654037237167, + 0.015071874484419823, + -0.04479290172457695, + 0.020136823877692223, + 0.025363173335790634, + 0.009584205225110054, + 0.001077934866771102, + -0.017170099541544914, + 0.006067947018891573, + -0.027884120121598244, + -0.019568072631955147, + 0.04577668756246567, + -0.015740539878606796, + 0.07286148518323898, + 0.015210218727588654, + 0.01152102928608656, + -0.014487752690911293, + -0.03390979394316673, + 0.002119362121447921, + -0.071139857172966, + -0.09376688301563263, + 0.025409288704395294, + -0.005868116393685341, + 0.04537702351808548, + 0.0022192776668816805, + -0.010952279902994633, + 0.04848209023475647, + -0.025317059829831123, + -0.01953732967376709, + -0.019998477771878242, + -0.017984796315431595, + -0.011597887612879276, + 0.03006689064204693, + -0.03430945798754692, + 0.054231077432632446, + 0.010913850739598274, + 0.008285303600132465, + -0.03907465934753418, + -0.04048885032534599, + -0.013811401091516018, + -0.0004212784697301686, + -0.07372229546308517, + 0.006033360958099365, + 0.03181925415992737, + 0.009707177989184856, + -0.005898859351873398, + -0.009968495927751064, + 0.041933782398700714, + 0.012097465805709362, + 0.01850743032991886, + 0.016416890546679497, + -0.009645692072808743, + 0.04669898375868797, + -0.007751139812171459, + -0.04651452228426933, + 0.03317195549607277, + 0.05254019796848297, + -0.011797718703746796, + -0.009599576704204082, + 0.029544254764914513, + 0.0008276656735688448, + -0.022842228412628174, + -0.02809932269155979, + -0.054415538907051086, + 0.034463174641132355, + -0.01469526905566454, + 0.0056144846603274345, + -0.016170945018529892, + 0.014457008801400661, + 0.02777651883661747, + -0.028821788728237152, + 0.02408733032643795, + 0.019752532243728638, + 0.0034336356911808252, + -0.004254096187651157, + 0.02719239704310894, + 0.0477135106921196, + 0.022396450862288475, + -0.019030066207051277, + 0.004957347642630339, + -0.036984119564294815, + 0.0454692542552948, + -0.08110067248344421, + 0.00558374123647809, + -0.058043237775564194, + 0.0024440877605229616, + -0.026884963735938072, + 0.01154408697038889, + -0.0029071576427668333, + -0.007020987570285797, + -0.05558377876877785, + -0.019276011735200882, + 0.03390979394316673, + -0.001032780739478767, + 0.01729307323694229, + 0.007109374739229679, + -0.025455404072999954, + 0.004634543787688017, + -0.0076934960670769215, + -0.06449931859970093, + 0.03928986191749573, + 0.008070101030170918, + -0.004815160296857357, + 0.01733918860554695, + -0.010629476048052311, + -0.030820099636912346, + 0.00742833549156785, + 0.009591891430318356, + 0.019875505939126015, + 0.05884256213903427, + 0.03560067340731621, + 0.04079627990722656, + 0.03716857731342316, + 0.018384458497166634, + 0.013281079940497875, + 0.07409121096134186, + -0.004008150193840265, + 0.051248982548713684, + 0.02646993100643158, + 0.00801630038768053, + 0.02809932269155979, + 0.023195775225758553, + 0.039597295224666595, + -0.02935979515314102, + -0.0044885133393108845, + 0.0004087890265509486, + 0.009638005867600441, + -0.02255016751587391, + 0.032341890037059784, + 0.013972803018987179, + -0.03218817338347435, + 0.03769121319055557, + -0.03615405037999153, + 0.02607026882469654, + -0.03701486065983772, + 0.021673984825611115, + 0.06013378128409386, + 0.00670971255749464, + -0.01944510079920292, + 0.004972719121724367, + 0.03470911830663681, + 0.05380067229270935, + 0.02152026817202568, + 0.008838681504130363, + -0.011766975745558739, + -0.02872955985367298, + 0.04334796965122223, + -0.016232430934906006, + 0.03615405037999153, + -0.02089003287255764, + 3.2664695027051494e-05, + 0.056475333869457245, + -0.05669053643941879, + -0.0027668916154652834, + -0.062009118497371674, + 0.001665899413637817, + -0.023656923323869705, + -0.021489525213837624, + -0.03889020159840584, + 0.0076819672249257565, + -0.08528175204992294, + 0.007674281485378742, + 0.018246114253997803, + -0.026454558596014977, + 0.001323880860581994, + -0.01082930713891983, + -0.014433952048420906, + -0.05795101076364517, + 0.017446789890527725, + 0.0328645259141922, + 0.005376224406063557, + 0.0396280363202095, + 0.035539187490940094, + -0.045315537601709366, + -0.02980557270348072, + -0.014049661345779896, + -0.029498139396309853, + -0.002607411239296198, + 0.01039890106767416, + -0.019829390570521355, + 0.025778207927942276, + 0.03978175297379494, + -0.032126687467098236, + 0.0042925248853862286, + 0.04780574142932892, + -0.015832768753170967, + -0.06388445198535919, + 0.030651012435555458, + 0.022227363660931587, + -0.03191148489713669, + 0.02201216109097004, + 0.00209822622127831, + -0.027069423347711563, + -0.0063407933339476585, + 0.009207600727677345, + 0.0027419128455221653, + -0.04703715816140175, + -0.02696182206273079, + -0.08694188296794891, + 0.051525671035051346, + 0.05290911719202995, + 0.025040369480848312, + -0.01724695786833763, + 0.024287160485982895, + -0.0023883655667304993, + -0.019644930958747864, + -0.014787498861551285, + 0.009384374134242535, + -0.01922989822924137, + 0.011989864520728588, + -0.0032876054756343365, + 0.031096788123250008, + 0.01102913822978735, + -0.012151266448199749, + -0.02030591107904911, + 0.036123309284448624, + 0.014687583781778812, + 0.023841382935643196, + 0.038920942693948746, + -0.006329264957457781, + 0.011813090182840824, + -0.05426182225346565, + 0.027299998328089714, + 0.024364018812775612, + -0.017754221335053444, + 0.019798647612333298, + 0.03298749774694443, + -0.013919002376496792, + 0.009953124448657036, + 0.017139356583356857, + 0.008431334048509598, + -0.026393072679638863, + 0.03529324010014534, + -0.0039927782490849495, + 0.04989628121256828, + -0.01675506681203842, + 0.022673141211271286, + 0.009899323806166649, + -0.0023595436941832304, + 0.03011300414800644, + -0.04297905042767525, + 0.010560302995145321, + -0.005376224406063557, + -0.044147294014692307, + 0.004407812375575304, + 0.03344864770770073, + -0.031542565673589706, + 0.034647632390260696, + 0.007040202151983976, + -0.04470067098736763, + -0.00780878309160471, + -0.032710809260606766, + 0.03839830681681633, + -0.014918157830834389, + -0.027991721406579018, + -0.02485590986907482, + 0.007151646539568901, + 0.012789187952876091, + -0.00222888495773077, + -0.03879797086119652, + 0.0024613807909190655, + 0.03975101187825203, + -0.023195775225758553, + 0.06738918274641037, + -0.016447633504867554, + 0.0018417122773826122, + 0.006260092370212078, + 0.00028797771665267646, + 0.015771282836794853, + 0.031634796410799026, + 0.0016995248151943088, + -0.0020943833515048027, + -0.00127488374710083, + 0.007482136134058237, + -0.014111148193478584, + 0.021996788680553436, + -0.0315118208527565, + 0.04399357736110687, + 0.004707559011876583, + -0.0072438763454556465, + 0.0018484373576939106, + 0.012881417758762836, + -0.014257177710533142, + 7.091360748745501e-05, + 5.311015047482215e-05, + -0.013027448207139969, + 0.00028821788146160543, + -0.06243952363729477, + -0.017170099541544914, + -0.022089019417762756, + -0.023072803393006325, + -0.015148731879889965, + -0.0011730467667803168, + -0.0003129566030111164, + -0.02133580856025219, + 7.199442916316912e-05, + -0.01172854658216238, + -0.03799864649772644, + 0.010329728946089745, + -0.028345268219709396, + -0.0024421662092208862, + 0.018615033477544785, + 0.021089863032102585, + 0.07366080582141876, + 0.013296451419591904, + 0.05091080814599991, + 0.015863511711359024, + -0.008246874436736107, + 0.0019464314682409167, + 0.016539864242076874, + 0.019614188000559807, + 0.012935218401253223, + -0.009422803297638893, + -0.019199153408408165, + 0.024241045117378235, + 0.012935218401253223, + 0.04045810550451279, + 0.011129053309559822, + 0.00891553983092308, + -0.006947972346097231, + 0.017093243077397346, + -0.04925067350268364, + -0.03695337474346161, + 0.009799407795071602, + 0.01981401816010475, + 0.010437330231070518, + -0.011805404908955097, + -0.027838004752993584, + -0.008362161926925182, + -0.01190531998872757, + 0.002463302109390497, + -0.020367396995425224, + -0.014426265843212605, + 0.057920265942811966, + 0.004304053727537394, + -0.04510033503174782, + 0.02999003231525421, + 0.051740873605012894, + -0.0024460090789943933, + 0.005034205969423056, + -0.006390751339495182, + -0.030543409287929535, + 0.017754221335053444, + -0.0028226138092577457, + -0.011559458449482918, + -0.018077025189995766, + 0.027084795758128166, + -0.05281689018011093, + 0.024317903444170952, + -0.062101349234580994, + -0.027023309841752052, + 0.022258106619119644, + -0.003677660133689642, + -0.023165032267570496, + 0.0006691458402201533, + 0.0025805109180510044, + 0.0033048985060304403, + -0.01652449183166027, + -0.00986089464277029, + 0.032926011830568314, + -0.011336570605635643, + -0.014833614230155945, + 0.006344636436551809, + 0.005372381303459406, + 0.023964356631040573, + -0.023211147636175156, + 0.016278546303510666, + 0.001258551492355764, + -0.003729539457708597, + -0.02553226239979267, + -0.014987329952418804, + -0.013173478655517101, + 0.008631165139377117, + -0.014587667770683765, + -0.005406967364251614, + 0.015786655247211456, + 0.0011326962849125266, + 0.010675590485334396, + -0.004807474557310343, + -0.044454727321863174, + 0.020152194425463676, + 0.008362161926925182, + -0.002632390009239316, + -0.048143915832042694, + 0.014103461988270283, + -0.01456461101770401, + -0.028191551566123962, + -0.00841596256941557, + 0.01019906997680664, + -0.028206923976540565, + 0.03249560669064522, + -0.03904391825199127, + 0.01246638409793377, + 0.011267397552728653, + 0.014280235394835472, + -0.017861822620034218, + 0.019644930958747864, + -0.01746216043829918, + -0.002113597933202982, + -0.02128969505429268, + -0.0003607527178246528, + -0.023918241262435913, + -0.001357506262138486, + 0.03461689129471779, + 0.03341790288686752, + 0.0015784732531756163, + -0.01526401937007904, + -0.007332263048738241, + 0.04423952475190163, + -0.0034528502728790045, + -0.031849998980760574, + 0.018538175150752068, + -0.027177024632692337, + -0.029744086787104607, + 0.02102837711572647, + -0.027653545141220093, + -0.02224273420870304, + -0.003873648354783654, + -0.007539779879152775, + -0.006775041576474905, + -0.013096620328724384, + -0.008185387589037418, + -0.02628547139465809, + 0.016862668097019196, + -0.020229052752256393, + -0.004280996508896351, + 0.01589425653219223, + -0.015402363613247871, + 0.011359627358615398, + 0.00668665487319231, + 0.03146570920944214, + 0.028191551566123962, + 0.013849830254912376, + 0.017216214910149574, + 0.039597295224666595, + -0.019199153408408165, + -0.005387753248214722, + 0.029329052194952965, + -0.012819931842386723, + 0.012297296896576881, + 0.021673984825611115, + 0.023165032267570496, + 0.02493276819586754, + 0.015071874484419823, + 0.013181164860725403, + -0.02997465990483761, + -0.0009434332023374736, + -0.014211063273251057, + 0.005257094278931618, + -0.051248982548713684, + 0.016124829649925232, + 0.025993410497903824, + 0.0016995248151943088, + -0.032034456729888916, + -0.0171086136251688, + 0.006156334187835455, + 0.0002728462568484247, + 0.008246874436736107, + 0.014787498861551285, + 0.02175084315240383, + 0.044854387640953064, + -0.0023595436941832304, + -0.002430637599900365, + -0.041257429867982864, + -0.0009155721636489034, + -0.03043580800294876, + -0.011175167746841908, + -0.00013774413673672825, + 0.02733074128627777, + 0.004446241073310375, + 0.01172854658216238, + 0.014895100146532059, + -0.01629391871392727, + 0.04663749784231186, + -0.009230658411979675, + -0.016232430934906006, + 0.01687803864479065, + -0.002065561478957534, + 0.0068788002245128155, + 0.03729155287146568, + -0.026408445090055466, + 0.0007118982030078769, + -0.0360003337264061, + -0.04928141459822655, + -0.01339636743068695, + -0.017231587320566177, + 0.009576519951224327, + -0.013880573213100433, + -0.044454727321863174, + -0.01918378286063671, + -0.024779051542282104, + 0.03606182336807251, + -0.0508800633251667, + 0.03507803753018379, + 0.026101011782884598, + 0.006859585642814636, + -0.06849594414234161, + -0.03876722604036331, + -0.014418580569326878, + -0.01211283728480339, + -0.018538175150752068, + 0.003942820709198713, + 0.032803039997816086, + -0.03246486186981201, + 0.03125050291419029, + 0.038828711956739426, + -0.005994932260364294, + -0.029636485502123833, + -0.0019031987758353353, + -0.01298901904374361, + 0.031450334936380386, + 0.028376011177897453, + -0.0308354701846838, + -0.0041234372183680534, + -0.0025881966575980186, + -0.0033625420182943344, + -0.00896165519952774, + -0.005522254854440689, + -0.005349324084818363, + -0.020229052752256393, + 0.040181417018175125, + 0.00095400121062994, + 0.03088158555328846, + 0.00044313500984571874, + -0.012635472230613232, + 0.018661146983504295, + -0.03178851306438446, + 0.038552023470401764, + 0.0076627531088888645, + 0.00015635820454917848, + -0.021458782255649567, + 0.013734542764723301, + -0.02854510024189949, + -0.02313428930938244, + -0.019829390570521355, + 0.048605065792798996, + -0.02182770147919655, + -0.008308361284434795, + -0.0023384077940136194, + -0.01670895144343376, + 0.001492968644015491, + 0.038521282374858856, + 0.027115538716316223, + 0.044362496584653854, + 0.04199526831507683, + 0.02224273420870304, + -0.003537394106388092, + -0.012205067090690136, + 0.019383613020181656, + 0.06492972373962402, + 0.08091621100902557, + 0.011159796267747879, + -0.013496282510459423, + -0.019245268777012825, + 0.00018457953410688788, + 0.05533783510327339, + -0.011252026073634624, + 0.022273479029536247, + -0.0006902818568050861, + 0.016862668097019196, + 0.025363173335790634, + 0.016416890546679497, + 0.010521874763071537, + 0.03845979645848274, + 0.01245101261883974, + -0.022627025842666626, + -0.006694340612739325, + -0.012174323201179504, + -0.013165793381631374, + -0.04021215811371803, + 0.05057263374328613, + -0.027084795758128166, + -0.0007921188371255994, + -0.009169171564280987, + 0.010099154897034168, + 0.011067566461861134, + 0.008070101030170918, + 0.0373530387878418, + -0.016724323853850365, + 0.00634847953915596, + -0.0032914483454078436, + 0.003794868942350149, + -0.014264863915741444, + -0.003954349551349878, + -0.0034451645333319902, + -0.01381908729672432, + 0.009000083431601524, + 0.0034124997910112143, + 0.005752828903496265, + 0.021397296339273453, + -0.01733918860554695, + 0.018430573865771294, + 0.0085543068125844, + -0.01548690814524889, + -0.00501883402466774, + -0.04789796844124794, + -0.016678208485245705, + 0.008039357140660286, + -0.006717398297041655, + 0.037476010620594025, + 0.013165793381631374, + 0.03268006443977356, + -0.010921536013484001, + 0.027991721406579018, + 0.02065945789217949, + -0.008446705527603626, + 0.009530404582619667, + 0.011205911636352539, + -0.02773040346801281, + -0.03661520034074783, + -0.018830236047506332, + 0.018968580290675163, + 0.010322043672204018, + 0.03092770092189312, + 0.013942060060799122, + -0.004676815588027239, + -0.020859289914369583, + 0.0022192776668816805, + -0.0009174935985356569, + 0.004757516551762819, + -0.0052263508550822735, + 0.011267397552728653, + -0.010575675405561924, + -0.004669129848480225, + -0.0414111465215683, + -0.02322651818394661, + -0.013173478655517101, + 0.0096764350309968, + 0.0030493452213704586, + 0.03470911830663681, + 0.01881486363708973, + 0.025409288704395294, + -0.005034205969423056, + -0.0034067353699356318, + 0.003969721030443907, + -0.040857765823602676, + 0.02179695852100849, + -0.009799407795071602, + 0.025563005357980728, + 0.005975717678666115, + 0.0414111465215683, + -0.0010702491272240877, + 0.005606798455119133, + -0.021551012992858887, + 0.02201216109097004, + 0.003812161972746253, + 0.00840059109032154, + 0.01809239760041237, + 0.030635640025138855, + -0.027484457939863205, + 0.011843834072351456, + 0.054323308169841766, + 0.0025555319152772427, + -0.05091080814599991, + -0.021504897624254227, + -0.010675590485334396, + 0.016017228364944458, + 0.028191551566123962, + 0.026393072679638863, + 0.0008103726431727409, + -0.010091468691825867, + -0.0033471703063696623, + -0.0011211675591766834, + 0.01764662005007267, + -0.013227279298007488, + 0.004730616230517626, + 0.005264780018478632, + -0.0060218325816094875, + 0.013135049492120743, + -0.004822846036404371, + 0.007051730994135141, + -0.0034394001122564077, + -0.05893479287624359, + 0.004035050515085459, + -0.05001925304532051, + 0.013488597236573696, + 0.017892565578222275, + -0.04583817347884178, + -0.003195375669747591, + 0.008861739188432693, + 0.02021368034183979, + 0.013580827042460442, + 0.034862834960222244, + -0.017431417480111122, + 0.030358951538801193, + -0.06308513134717941, + 0.016601350158452988, + 0.012581671588122845, + -0.008123901672661304, + 0.0014881649985909462, + 0.005675971042364836, + -0.006183234509080648, + -0.03793716058135033, + 0.014572296291589737, + -0.033294931054115295, + 0.042118240147829056, + -0.0015928841894492507, + 0.016401519998908043, + 0.0012393369106575847, + -0.002130890963599086, + -0.017800336703658104, + -0.0378141850233078, + 0.015110302716493607, + -0.03366385027766228, + 0.03667668625712395, + 0.0022269636392593384, + -0.03354087471961975, + 0.02196604572236538, + 0.0011240497697144747, + 0.0016831924440339208, + -0.01724695786833763, + 0.07027904689311981, + -0.01206672191619873, + -0.017277700826525688, + -0.007447550073266029, + -0.005798943806439638, + 0.0005846019485034049, + 0.02035202644765377, + -0.026715876534581184, + -0.02457922138273716, + 0.046883441507816315, + -0.0012316510546952486, + 0.008116215467453003, + 0.006237035151571035, + 0.025147970765829086, + 0.011597887612879276, + -0.02291908673942089, + -0.018153883516788483, + 0.04002770036458969, + 0.03231114521622658, + -0.022765370085835457, + 0.0016601349925622344, + -0.01580202579498291, + -0.006509881466627121, + -0.011913006193935871, + -0.02327263355255127, + -0.015832768753170967, + -0.02345709316432476, + -0.017185471951961517, + 0.006198605988174677, + 0.01580202579498291, + 0.02056722901761532, + -0.03307972848415375, + -0.0006888407515361905, + -0.02128969505429268, + 0.007140117697417736, + -0.026223985478281975, + 0.014457008801400661, + 0.030374322086572647, + 0.005456925369799137, + -0.03231114521622658, + -0.01228961069136858, + -0.0333256721496582, + 0.01855354569852352, + -0.026270098984241486, + 0.0071900757029652596, + 0.023195775225758553, + -0.015025759115815163, + -0.03609256446361542, + -0.019644930958747864, + 0.0018811021000146866, + -0.023626180365681648, + 0.01858428865671158, + 0.025947295129299164, + 0.051740873605012894, + -0.01155177317559719, + -0.039996955543756485, + 0.007459078915417194, + 0.030266720801591873, + -0.0008733001886866987, + 0.045407768338918686, + -0.003581587690860033, + 0.0009525601053610444, + 0.0014708719681948423, + 0.016309289261698723, + 0.018922464922070503, + -0.006148648448288441, + -0.01062178984284401, + 0.023779897019267082, + 0.0015448478516191244, + 0.005433867685496807, + 0.02507111243903637, + 0.01909155212342739, + 0.011090624146163464, + -0.023257261142134666, + 0.014510809443891048, + -0.004154180642217398, + -0.015310133807361126, + -0.002225042087957263, + -0.040949996560811996, + 0.02467145025730133, + 0.030604897066950798, + 0.030820099636912346, + -0.012735387310385704, + 0.0032837623730301857, + -0.01451849564909935, + 0.029098477214574814, + 0.027991721406579018, + -0.021089863032102585, + -0.006171705666929483, + -0.013165793381631374, + 0.0014285999350249767, + 0.009238343685865402, + -0.024517735466361046, + -0.03676891699433327, + -0.021720100194215775, + 0.05057263374328613, + 0.0477135106921196, + 0.020413512364029884, + -0.014149576425552368, + 0.001369034987874329, + -0.01864577643573284, + 0.0036046451423317194, + -0.023779897019267082, + -0.017907937988638878, + -0.009976182132959366, + -0.019276011735200882, + -0.00836984720081091, + -0.004899703897535801, + -0.0035354727879166603, + -0.028376011177897453, + 0.028345268219709396, + -0.012543242424726486, + 0.02264239639043808, + 0.012866046279668808, + 0.014057346619665623, + -0.008285303600132465, + -0.015325506217777729, + -0.02359543740749359, + 0.0076512242667376995, + -0.0005149492644704878, + -0.057428374886512756, + -0.017400674521923065, + -0.00896165519952774, + 0.019060809165239334, + -0.011866890825331211, + 0.008500506170094013, + -0.004669129848480225, + -0.025470774620771408, + -0.019706416875123978, + -0.02593192458152771, + -0.02065945789217949, + -0.024287160485982895, + 0.012366469018161297, + -0.005207136273384094, + -0.0048190029338002205, + -0.006844214163720608, + -0.008854053914546967, + -0.02156638354063034, + -0.033110469579696655, + 0.010798563249409199, + 0.012328039854764938, + -0.024148816242814064, + 0.017277700826525688, + 0.031634796410799026, + -0.004769045393913984, + -0.00026708192308433354, + 0.0042925248853862286, + -0.01701638475060463, + 0.008769509382545948, + 0.021627869457006454, + -0.01287373248487711, + 0.00853124912828207, + 0.017861822620034218, + 0.021120605990290642, + -0.018691889941692352, + 0.01112136710435152, + 0.010560302995145321, + -0.010106840170919895, + 0.008769509382545948, + -0.027346113696694374, + -0.01764662005007267, + -0.020198309794068336, + 0.008830996230244637, + 0.014203377068042755, + -0.022135132923722267, + 0.012658529914915562, + -0.010406587272882462, + -0.029006248340010643, + -0.0007964420947246253, + 0.006978715769946575, + 0.0337560772895813, + 0.017477532848715782, + -0.009353631176054478, + 0.010468073189258575, + -0.0012278081849217415, + 0.01114442478865385, + 0.011559458449482918, + 0.016693580895662308, + -0.0193528700619936, + 0.05524560436606407, + 0.012404898181557655, + 0.007674281485378742, + 0.0007335145492106676, + 0.025455404072999954, + -0.02310354635119438, + 0.016170945018529892, + -0.016601350158452988, + 0.045530740171670914, + 0.008900168351829052, + 0.023779897019267082, + 0.017446789890527725, + -0.0041349660605192184, + 0.016954896971583366, + 0.023564694449305534, + -0.008123901672661304, + -0.0055376263335347176, + -0.010491130873560905, + -0.003965877927839756, + 0.008223816752433777, + 0.015148731879889965, + -0.008977026678621769, + -0.02079780213534832, + 0.0027207769453525543, + 0.01188226230442524, + -0.05902702361345291, + 0.010744762606918812, + -0.00041359267197549343, + -0.018876349553465843, + -0.022135132923722267, + 0.03793716058135033, + 0.004392440430819988, + -0.031942225992679596, + 0.0249942559748888, + 0.01967567391693592, + -0.0027438343968242407, + 0.02808395028114319, + 0.018338343128561974, + -0.002715012524276972, + 0.02808395028114319, + 0.02511722780764103, + 0.020244425162672997, + 0.00019514752784743905, + -0.03307972848415375, + 0.003141575027257204, + 0.05835067108273506, + 0.026577532291412354, + -0.01395743153989315, + 0.00952271930873394, + 0.013496282510459423, + 0.008838681504130363, + -0.009484290145337582, + 0.05546080693602562, + -0.00817001610994339, + 0.00889248214662075, + -0.031849998980760574, + 0.0016678208485245705, + 0.015202532522380352, + 0.007835683412849903, + 0.017954053357243538, + -0.01152102928608656, + -0.01564062386751175, + -0.008000928908586502, + 0.0019387456122785807, + -0.006260092370212078, + 0.021812329068779945, + -0.0027822633273899555, + -0.0014872043393552303, + -0.027346113696694374, + -0.02196604572236538, + -0.00929983053356409, + 0.0013392524560913444, + -0.02268851175904274, + 0.01594037003815174, + -0.027668917551636696, + -0.016693580895662308, + -0.012258867733180523, + 0.020106079056859016, + -0.008485134690999985, + -0.019383613020181656, + -0.0039927782490849495, + 0.008154644630849361, + -0.011913006193935871, + 0.007459078915417194, + 0.035416215658187866, + 0.006156334187835455, + 0.01850743032991886, + 0.02313428930938244, + -0.03729155287146568, + -0.0032299617305397987, + -0.005449239630252123, + 0.04586891457438469, + 0.0026054896879941225, + 0.006552153266966343, + 0.0007930795545689762, + 0.007143960800021887, + -0.0014420502120628953, + -0.02516334317624569, + 0.013173478655517101, + -0.010045354254543781, + 0.0002963840670417994, + -0.0028360639698803425, + -0.020813174545764923, + 0.015679053962230682, + 0.009561148472130299, + -0.020244425162672997, + 0.02539391815662384, + -0.011444171890616417, + -0.0014939294196665287, + -0.0021481839939951897, + 0.014257177710533142, + -0.015740539878606796, + -0.030466552823781967, + -0.013503968715667725, + 0.005499197170138359, + 0.014672212302684784, + -0.028698815032839775, + 0.004623014945536852, + 0.013711486011743546, + 0.026408445090055466, + -0.039505064487457275, + -0.031942225992679596, + 0.03928986191749573, + -0.009000083431601524, + 9.877467527985573e-05, + 0.02733074128627777, + -0.016370775178074837, + -0.028191551566123962, + 0.0014036211650818586, + 0.04190303757786751, + -0.04808242991566658, + 0.022980572655797005, + -0.0029744086787104607, + 0.000991469481959939, + 0.04033513367176056, + -0.03160405158996582, + -0.01697026938199997, + 0.007566680200397968, + 0.02002922259271145, + -0.0013949745334684849, + 0.0025805109180510044, + -0.011044509708881378, + 0.058904051780700684, + -0.001545808627270162, + -0.012258867733180523, + -0.034370943903923035, + -0.044546958059072495, + 0.009868580847978592, + 0.008677279576659203, + -0.030420437455177307, + -0.020859289914369583, + 0.01692415401339531, + -0.024840539321303368, + 0.01139037124812603, + 0.023257261142134666, + -0.022473309189081192, + 0.013050505891442299, + 0.005176393315196037, + -0.006540624424815178, + -0.012573985382914543, + -0.025670606642961502, + -0.01492584403604269, + -2.1060921426396817e-05, + 0.012666215188801289, + -0.014795185066759586, + -0.012458698824048042, + -0.030850842595100403, + -0.010514188557863235, + -0.008700337260961533, + 0.02196604572236538, + 0.008654222823679447, + -0.005529940593987703, + 0.022396450862288475, + 0.0003571499837562442, + -0.006805785000324249, + 0.021858444437384605, + 0.028529727831482887, + 0.04070405289530754, + 0.020920775830745697, + 0.015425421297550201, + -0.013534711673855782, + -0.0027092481032013893, + 0.013734542764723301, + -0.02817618101835251, + -0.03134273365139961, + 0.023795269429683685, + 0.02813006564974785, + -0.0008771431166678667, + -0.03483209386467934, + -0.009007769636809826, + -0.03772195801138878, + -0.027207769453525543, + -0.019260641187429428, + -0.013165793381631374, + -0.030374322086572647, + 0.03134273365139961, + -0.0007258286932483315, + 0.018830236047506332, + 0.01156714465469122, + 0.01764662005007267, + 0.0015323584666475654, + -0.02494814060628414, + -0.022365707904100418, + 0.0036699743941426277, + -0.002520945854485035, + 0.015271704643964767, + 0.009130742400884628, + -0.01064484752714634, + -0.026039525866508484, + 0.00259972526691854, + 0.009369002655148506, + -0.013488597236573696, + 0.0024037372786551714, + -0.005748986266553402, + 0.042425673454999924, + 0.033694591373205185, + 0.012904475443065166, + -0.012328039854764938, + 0.027761146426200867, + 0.0017417967319488525, + 0.025578375905752182, + -0.052202023565769196, + 0.03627702593803406, + -0.020244425162672997, + 0.0028149280697107315, + 0.016124829649925232, + 0.0011240497697144747, + 0.006963344290852547, + -0.015786655247211456, + -0.0008070101030170918, + -0.01318885013461113, + 0.01886097900569439, + -0.02224273420870304, + 0.04826688766479492, + 0.01022212766110897, + 0.003372149309143424, + -0.032218918204307556, + 0.030543409287929535, + 0.000530320918187499, + 0.0012451012153178453, + 0.017385302111506462, + 0.004446241073310375, + 0.0124894417822361, + -0.00010784152254927903, + 0.004561528563499451, + 0.008830996230244637, + -0.019967734813690186, + -0.05466148257255554, + 0.006544467527419329, + 0.009491975419223309, + -0.004046579357236624, + 0.010714019648730755, + -0.013288766145706177, + 0.015356249175965786, + 0.005003462545573711, + -0.028376011177897453, + 0.016124829649925232, + -0.017354559153318405, + -0.027930235490202904, + -0.02390287071466446, + -0.007020987570285797, + -0.048420604318380356, + 0.05604492872953415, + 0.015271704643964767, + -0.011989864520728588, + 0.00556068355217576, + -0.012858361005783081, + 0.022442566230893135, + 0.02070557326078415, + -0.03137347847223282, + -0.010076097212731838, + 0.025639863684773445, + -0.031450334936380386, + -0.006732769776135683, + 0.005187922157347202, + -0.008592735975980759, + -0.03255709260702133, + 0.016370775178074837, + -0.008316046558320522, + 0.006479138042777777, + 0.02922145090997219, + -0.023518579080700874, + -0.006014146376401186, + 0.012743073515594006, + -0.015094931237399578, + 0.042118240147829056, + -0.026131754741072655, + -0.0014593432424589992, + -0.0038313765544444323, + 0.02462533675134182, + 0.02822229638695717, + 0.0008363122469745576, + -0.00853124912828207, + 0.018568918108940125, + 0.002513259882107377, + -0.007747296709567308, + 0.019214525818824768, + 0.014141891151666641, + 0.012720015831291676, + -0.033879052847623825, + -0.001936824177391827, + 0.0007637774106115103, + -0.018753377720713615, + -0.032249659299850464, + 0.02250405214726925, + 0.020582599565386772, + -0.006502195727080107, + -0.011236654594540596, + 0.009407431818544865, + 0.012443327344954014, + 0.013219594024121761, + 0.017185471951961517, + -0.012074408121407032, + -0.003620016621425748, + -0.022519424557685852, + -0.014387836679816246, + -0.0056990282610058784, + -0.03148107975721359, + -0.008023985661566257, + 0.0018657305045053363, + -0.0028360639698803425, + 0.023472465574741364, + 0.007908699102699757, + 0.008154644630849361, + 0.020336654037237167, + -0.04291756451129913, + -0.012704644352197647, + 0.02686959318816662, + 0.0012249259743839502, + 0.01629391871392727, + -0.013450168073177338, + -0.03799864649772644, + -0.02457922138273716, + 0.008408276364207268, + 0.030143748968839645, + -0.02660827524960041, + -4.998778968001716e-05, + 0.0024287160485982895, + 0.012720015831291676, + 0.004288682248443365, + -0.0005754750454798341, + -0.011421114206314087, + -0.026531416922807693, + 0.021135978400707245, + -0.032926011830568314, + -0.04669898375868797, + -0.021305065602064133, + 0.008454391732811928, + -0.0052263508550822735, + 0.009807094000279903, + 0.007847212255001068, + -0.0166628360748291, + 0.026054896414279938, + 0.0034720648545771837, + 0.0024440877605229616, + -0.015133360400795937, + ], + "index": 84, + }, + { + "title": "Rhodes Scholarship", + "text": 'The Rhodes Scholarship, named after Cecil John Rhodes, is an international postgraduate award for selected foreign students to study at the University of Oxford. It describes itself as "perhaps the most prestigious scholarship" in the world.', + "vector": [ + 0.02137630805373192, + -0.002015131525695324, + -0.025521298870444298, + 0.02288626879453659, + -0.015121813863515854, + -0.031146641820669174, + 0.047341711819171906, + -0.022560590878129005, + -0.010362476110458374, + 0.041894011199474335, + -0.05181238055229187, + 0.0260098148137331, + 0.0006805001175962389, + -0.01773463748395443, + 0.030939392745494843, + 0.05344076827168465, + -0.002429630607366562, + 0.00839360523968935, + -0.06199721619486809, + 0.018075119704008102, + -0.014329824596643448, + -0.007101997267454863, + -0.008252971805632114, + -0.03541006147861481, + 0.020384471863508224, + 0.006809627171605825, + 0.011983463540673256, + -0.03342638909816742, + -0.06809627264738083, + -0.016180265694856644, + -0.007734848186373711, + 0.01946665160357952, + 0.007131604012101889, + -0.018933724611997604, + 0.009548281319439411, + -0.029592271894216537, + 0.013441612012684345, + -0.010925010778009892, + 0.04227890446782112, + -0.008334391750395298, + 0.04233811795711517, + -0.017349746078252792, + 0.019496258348226547, + 0.015706554055213928, + 0.01373028103262186, + -0.01373768225312233, + -0.04500275477766991, + -0.004244914278388023, + 0.012627417221665382, + 0.0011435733176767826, + -0.0014026351273059845, + -0.02333037555217743, + 0.010776975192129612, + -0.003349300241097808, + -0.02383369579911232, + 0.0020947004668414593, + 0.02565453015267849, + 0.0303768590092659, + -0.0063433158211410046, + -0.03792666271328926, + -0.037541769444942474, + 0.017201710492372513, + -0.009318826720118523, + -0.03917016088962555, + 0.05646069347858429, + -0.01065114513039589, + 0.030643321573734283, + 0.01369327213615179, + -0.003371505532413721, + 0.009644504636526108, + -0.004615002777427435, + 0.04035444185137749, + 0.030909786000847816, + -0.010340270586311817, + -0.03656473755836487, + 0.01485534943640232, + -0.011798419058322906, + -0.022205306217074394, + -0.00861565861850977, + 0.02130229026079178, + 0.034403420984745026, + 0.014588885940611362, + 0.001471101539209485, + 0.0031161445658653975, + -0.018726475536823273, + -0.01714249700307846, + 0.030495287850499153, + -0.04766739159822464, + 0.04127226397395134, + 0.0159878209233284, + -0.015573320910334587, + 0.04627585783600807, + 0.011132259853184223, + -0.0034011127427220345, + 0.017246121540665627, + -0.053529590368270874, + 0.028008293360471725, + 0.0031809101346880198, + 0.026335492730140686, + 0.025846976786851883, + 0.01181322243064642, + -0.018001101911067963, + -0.03647591546177864, + 0.047341711819171906, + 0.008512034080922604, + -0.02005879394710064, + -0.029118558391928673, + -0.024647889658808708, + 0.03780823573470116, + 0.04695682227611542, + -0.0068873455747962, + 0.017912279814481735, + -0.025121603161096573, + 0.012849470600485802, + -0.00432633375748992, + 0.036949630826711655, + 0.026069030165672302, + 0.040798548609018326, + -0.028008293360471725, + -0.0199847761541605, + -0.04941420629620552, + 0.006987269502133131, + -0.0038785268552601337, + -0.01808992214500904, + -0.03366324305534363, + -0.052345309406518936, + 0.009755531325936317, + 0.09717041999101639, + 0.013204755261540413, + 0.026779599487781525, + 0.025980208069086075, + 0.007623821962624788, + -0.020014382898807526, + -0.010910207405686378, + -0.008438016287982464, + 0.0520196296274662, + 0.019244598224759102, + 0.024070551618933678, + -0.04571332409977913, + 0.02855602279305458, + -0.052878234535455704, + -0.02978471666574478, + -0.006498753093183041, + -0.012960497289896011, + 0.005821491125971079, + -0.027371739968657494, + 0.005436599254608154, + -0.0207841657102108, + 0.011346911080181599, + -0.007079791743308306, + 0.015588125213980675, + -0.015440089628100395, + -0.05945100635290146, + 0.024248193949460983, + -0.059628646820783615, + 0.03597259521484375, + -0.04411454126238823, + -0.023093517869710922, + 0.037393733859062195, + 0.0031957137398421764, + -0.024943960830569267, + -0.00594362011179328, + 0.014899760484695435, + 0.029991967603564262, + -0.006554265972226858, + -0.013404603116214275, + 0.0007702465518377721, + 0.0031716579105705023, + -0.013271370902657509, + 0.015736160799860954, + -0.012397962622344494, + -0.024322211742401123, + -7.62729105190374e-05, + -0.029473843052983284, + -0.036446310579776764, + -0.002244586357846856, + 0.04257497191429138, + -0.004648310597985983, + 0.009126381017267704, + -0.037097666412591934, + -0.01576576754450798, + 0.06241171434521675, + 0.04482511058449745, + 0.0055883354507386684, + -0.008008713833987713, + -0.015055197291076183, + 0.05569090694189072, + 0.020947005599737167, + -0.05394408851861954, + -0.03277503326535225, + 0.03170917555689812, + -0.03896291181445122, + 0.013560039922595024, + 0.03218289092183113, + 0.0607537180185318, + 0.0026442818343639374, + -0.03096899949014187, + 0.02266421541571617, + -0.00501469848677516, + 0.022146092727780342, + 0.06614220142364502, + 0.01104343868792057, + 0.021405914798378944, + 0.04962145909667015, + 0.0007623821729794145, + 0.020399274304509163, + 0.062234070152044296, + -0.017823459580540657, + -0.005477308761328459, + -0.008489828556776047, + 0.00523305032402277, + -0.049887921661138535, + 0.0004792645340785384, + -0.005632746033370495, + -0.028245149180293083, + 0.0034973355941474438, + -0.021169058978557587, + -0.00792729388922453, + -0.018430404365062714, + 0.02333037555217743, + -0.015107009559869766, + -0.043552007526159286, + 0.005854798946529627, + 0.004341137129813433, + 0.014374234713613987, + 0.0025369562208652496, + 0.017260923981666565, + -0.016106247901916504, + 0.009555683471262455, + -0.010288458317518234, + -0.01626908779144287, + 0.023271160200238228, + -0.0038785268552601337, + 0.03612063080072403, + -0.019140973687171936, + 0.05237491428852081, + 0.020813774317502975, + -0.02121346816420555, + 0.003602810902521014, + 0.01946665160357952, + -0.002995865885168314, + 0.031797997653484344, + 0.020295649766921997, + -0.03253817558288574, + 0.026069030165672302, + 0.01050310954451561, + -0.058829259127378464, + -0.019140973687171936, + 0.036298274993896484, + -0.033248744904994965, + -0.0066171810030937195, + -0.005044305231422186, + -0.04757856950163841, + 0.04737132042646408, + 0.0017616209806874394, + 0.031946033239364624, + -0.004078374709933996, + -0.04707524925470352, + 0.022856662049889565, + -0.05844436585903168, + 0.03395931422710419, + -0.015218036249279976, + 0.0063285124488174915, + -0.0045964983291924, + -0.05296705663204193, + 0.054388195276260376, + -0.021524343639612198, + -0.047045640647411346, + 0.03576534613966942, + -0.04802267625927925, + -0.01729053258895874, + -0.054240159690380096, + 0.04041365534067154, + -0.0014562979340553284, + 0.006802225485444069, + 0.012212918139994144, + 0.008326989598572254, + -0.06054646894335747, + -0.005340375937521458, + 0.032005246728658676, + 0.024011338129639626, + -0.06211564317345619, + 0.011939052492380142, + 0.0036453711800277233, + 0.02282705530524254, + -0.0047778417356312275, + -0.03191642835736275, + 0.013486022129654884, + 0.045150790363550186, + -0.006087954621762037, + -0.03697923570871353, + -0.0009205949609167874, + 0.02113945223391056, + 0.009511272422969341, + -0.010850992985069752, + -0.01634310558438301, + -0.04663114249706268, + -0.013523031026124954, + -0.011679991148412228, + 0.0018088072538375854, + -0.004492873791605234, + 0.0559573695063591, + -0.0471048578619957, + 0.0027775138150900602, + 0.0028348774649202824, + 0.011605973355472088, + -0.0027016454841941595, + -0.02922218292951584, + 0.010925010778009892, + 0.005988030694425106, + 0.017334941774606705, + -0.025772958993911743, + 0.06708963215351105, + -0.003963646944612265, + -0.003556549781933427, + -0.04201243817806244, + 0.0007087193662300706, + 0.029103754088282585, + 0.09083450585603714, + -0.035854168236255646, + -0.024440640583634377, + -0.010843590833246708, + 0.0071686129085719585, + -0.043848078697919846, + 0.05122023820877075, + -0.0705832690000534, + 0.01933342032134533, + -0.03387049213051796, + -0.004922176245599985, + 0.004082075320184231, + 0.01518842950463295, + -0.02979952096939087, + 0.019585080444812775, + -0.02282705530524254, + 0.01723131723701954, + -0.00527005922049284, + 0.030998608097434044, + 0.04372964799404144, + -0.012975300662219524, + 0.006672694347798824, + 0.00941505003720522, + -0.006491350941359997, + 0.025906190276145935, + 0.03952544555068016, + 0.014004146680235863, + -0.001432242221198976, + 0.054684266448020935, + 0.023167535662651062, + 0.06856998801231384, + -0.037156879901885986, + 0.0005505065200850368, + 0.05166434496641159, + -0.021095041185617447, + -0.01122848317027092, + 0.014263208024203777, + -0.01766061969101429, + 0.01446305587887764, + -0.044795505702495575, + 0.012960497289896011, + 0.04627585783600807, + 0.008719283156096935, + -0.004256017040461302, + -0.01933342032134533, + 0.02130229026079178, + -0.010236646048724651, + -0.006613480392843485, + 0.0171572994440794, + 0.05675676092505455, + 0.021983252838253975, + 0.020473292097449303, + -0.052730198949575424, + 0.049088530242443085, + 0.04470668360590935, + -0.04976949095726013, + 0.011176670901477337, + -0.018874509260058403, + -0.028437595814466476, + -0.01133950985968113, + -0.05696401372551918, + -0.006842934992164373, + 0.01708328165113926, + 0.004093178082257509, + 0.009170791134238243, + 0.06418813765048981, + -0.046187035739421844, + -0.009585290215909481, + 0.03641670197248459, + -0.0025129003915935755, + -0.01634310558438301, + 0.02855602279305458, + -0.01962949149310589, + 0.0319756418466568, + 0.06300385296344757, + 0.0055698310025036335, + -0.003826714353635907, + -0.016683585941791534, + -0.037097666412591934, + 0.03173878416419029, + -0.019066955894231796, + 0.03366324305534363, + -0.044292185455560684, + -0.023345177993178368, + -0.037097666412591934, + 0.041094619780778885, + 0.061523500829935074, + -0.04361122101545334, + -0.029903145506978035, + -0.052345309406518936, + -0.001075106905773282, + 0.004851859528571367, + -0.03552848845720291, + 0.027934275567531586, + -0.015321660786867142, + 0.03387049213051796, + 0.020236436277627945, + 0.03925898298621178, + 0.047193676233291626, + -0.002557310974225402, + -0.02805270254611969, + 0.012768050655722618, + 0.0033048896584659815, + -0.028067506849765778, + 0.006210084073245525, + 0.03022882342338562, + 0.002842279151082039, + 0.021746397018432617, + -0.0456245020031929, + -0.014485261403024197, + -0.06170114502310753, + 0.006746712140738964, + -0.025447281077504158, + 0.04180518910288811, + 0.005802986677736044, + 0.060280002653598785, + -0.012190712615847588, + -0.010362476110458374, + -0.01911136694252491, + 0.0023981730919331312, + 0.02028084546327591, + 0.07757053524255753, + -0.00617677578702569, + -0.04926617071032524, + -0.036239057779312134, + -0.04097619280219078, + -0.05382566154003143, + 0.02834877371788025, + -0.05252294987440109, + -0.0038896293845027685, + 0.028881700709462166, + 0.0019152075983583927, + 0.016165463253855705, + -0.04461786150932312, + -0.025595316663384438, + -0.013486022129654884, + 0.009614897891879082, + -0.049384601414203644, + -0.038252342492341995, + 0.005251554772257805, + -0.0043818471021950245, + 0.014507466927170753, + 0.013256567530333996, + 0.07247811555862427, + 0.04216047376394272, + -0.08100495487451553, + -0.002559161512181163, + 0.03241974860429764, + -0.006247092969715595, + -0.046483106911182404, + 0.009563085623085499, + 0.0352916345000267, + -0.04746014252305031, + -0.002220530528575182, + -0.051841989159584045, + 0.023730071261525154, + 0.02812672033905983, + 0.058829259127378464, + 0.07561647146940231, + -0.003658324247226119, + 0.01816393993794918, + -0.0030846870504319668, + 0.012227721512317657, + -0.03662395104765892, + 0.008593453094363213, + 0.02210168167948723, + -0.0043670437298715115, + -0.03617984429001808, + 0.00015775019710417837, + 0.04257497191429138, + -0.04106501117348671, + 0.027194097638130188, + 0.016594765707850456, + 0.00482965400442481, + 0.019214991480112076, + -0.027194097638130188, + 0.012249927036464214, + 0.0013138139620423317, + 0.018223155289888382, + -0.007257434073835611, + -0.005740071646869183, + 0.018548833206295967, + 0.004311530385166407, + 0.03182760626077652, + 0.005969526246190071, + -0.009740727953612804, + -0.05107220262289047, + 0.037393733859062195, + 0.020961808040738106, + 0.00626559741795063, + -0.010925010778009892, + 0.010118218138813972, + 0.058533187955617905, + 0.0480818897485733, + -0.015247643925249577, + 0.023211946710944176, + 0.026542741805315018, + 0.0072204251773655415, + -0.0017468173755332828, + 0.009799941442906857, + 0.020887792110443115, + -0.017423763871192932, + 0.003373356070369482, + 0.03973269462585449, + -0.04728249832987785, + -0.022471770644187927, + -0.0008026292780414224, + -0.014337225817143917, + -0.010258851572871208, + 0.0047630383633077145, + -0.014085565693676472, + 0.0022889969404786825, + -0.012338748201727867, + 0.018119528889656067, + 0.03395931422710419, + -0.009585290215909481, + -0.009215202182531357, + 0.07076090574264526, + 0.0223829485476017, + -0.019348222762346268, + 0.008164150640368462, + -0.025388065725564957, + 0.009481665678322315, + 0.03132428601384163, + -0.0019300112035125494, + -0.028881700709462166, + 0.022146092727780342, + 0.0006157346069812775, + 0.017838262021541595, + -0.022782644256949425, + -0.018696866929531097, + 0.004337436519563198, + 0.042101260274648666, + -0.04526921734213829, + -0.051486704498529434, + -0.004300427623093128, + 0.0009293846087530255, + -0.0003573666326701641, + -0.04482511058449745, + -0.027593793347477913, + -0.016328301280736923, + -0.017705030739307404, + 0.03493634983897209, + -0.009067166596651077, + 0.0002391696471022442, + -7.89329205872491e-05, + 0.008482427336275578, + 0.023093517869710922, + 0.02411496266722679, + 0.007423974107950926, + -0.010843590833246708, + -0.0392293743789196, + -0.013019710779190063, + 0.015018188394606113, + -0.003256778232753277, + -0.013012309558689594, + 0.006239690817892551, + -0.03073214367032051, + 0.021613163873553276, + -0.0020650934893637896, + -0.012242525815963745, + 0.009489067830145359, + -0.038548409938812256, + -0.011931651271879673, + -0.0044151549227535725, + -0.013567442074418068, + -0.01643192581832409, + -0.0006629208801314235, + -0.016032230108976364, + -0.007227827329188585, + 0.06685277819633484, + -0.04645350202918053, + -0.02863004058599472, + -0.006372923031449318, + -0.01507740281522274, + 0.0010621538385748863, + -0.01700926385819912, + 0.03117625042796135, + 0.01096942089498043, + 0.008800703100860119, + 0.0036490720231086016, + 0.012812461704015732, + 0.0029459039214998484, + 0.007009475026279688, + -0.0017616209806874394, + 0.018918920308351517, + -0.00644694035872817, + 0.021820414811372757, + 0.009999789297580719, + -0.023300766944885254, + 0.0023630147334188223, + 0.01925940252840519, + 0.017053674906492233, + 0.0010741816367954016, + -0.01391532551497221, + 0.03541006147861481, + -0.01569174975156784, + 0.0091929966583848, + -0.004067271947860718, + 0.04600939527153969, + -0.009163389913737774, + 0.04674956947565079, + 0.00348808360286057, + 0.019096562638878822, + -0.005973227322101593, + -0.0013221409171819687, + 0.036801595240831375, + 0.01376728992909193, + 0.003371505532413721, + 0.019170580431818962, + 0.018519224599003792, + 0.0014655501581728458, + -0.011620776727795601, + -0.01771983504295349, + -0.018489617854356766, + 0.012087088078260422, + -0.01569174975156784, + -0.008260373957455158, + 0.027416151016950607, + 0.04026562348008156, + 0.011420928873121738, + -0.028023095801472664, + 0.02565453015267849, + 0.03973269462585449, + 0.02325635775923729, + 0.014685109257698059, + 0.0005259881727397442, + 0.000936786353122443, + 0.02948864735662937, + 0.0471048578619957, + 0.07052405178546906, + -0.02113945223391056, + -0.017246121540665627, + 0.01585458777844906, + 0.01289388071745634, + 0.01315294299274683, + 0.0036860809195786715, + -0.0058103883638978004, + -0.04725288972258568, + -0.015750963240861893, + -0.013552638702094555, + 0.018785689026117325, + -0.01808992214500904, + -0.028363578021526337, + -0.015469696372747421, + 0.020236436277627945, + 0.03313031792640686, + -0.01093241199851036, + -0.01911136694252491, + 0.008060526102781296, + -0.004022861365228891, + -0.024381425231695175, + -0.0024777420330792665, + -0.022723430767655373, + -0.028511613607406616, + 0.0017477426445111632, + 0.021050630137324333, + -0.017853066325187683, + -0.06531320512294769, + 0.004992492962628603, + -0.03700884431600571, + 0.040443263947963715, + 0.01250158715993166, + -0.06170114502310753, + 0.011872436851263046, + -0.05800025910139084, + 0.014292815700173378, + 0.006902149412781, + 0.013197354041039944, + 0.03831155598163605, + -0.046335071325302124, + 0.00904496107250452, + -0.008090132847428322, + 0.018489617854356766, + -0.044440221041440964, + 0.009666710160672665, + -0.008297382853925228, + 0.04754896089434624, + 0.029340611770749092, + -0.04586135968565941, + -0.06448420882225037, + -0.02740134857594967, + -0.03902212530374527, + -0.0030846870504319668, + -0.0009057914721779525, + 0.021924039348959923, + 0.003132798708975315, + 0.0673857033252716, + 0.022175699472427368, + 0.01968870498239994, + -0.02994755655527115, + -0.0028200738597661257, + -0.01860804669559002, + -0.006968765053898096, + -0.025254834443330765, + -0.0327158160507679, + 0.005277460906654596, + -0.02929620072245598, + 0.0006333138444460928, + -0.010081209242343903, + -0.005384786520153284, + 0.04026562348008156, + 0.024159373715519905, + -0.007398067973554134, + 0.0034732799977064133, + -0.0008780347998254001, + 0.020310454070568085, + -0.018060315400362015, + -0.005162733606994152, + 0.016091445460915565, + 0.02137630805373192, + 0.0053958892822265625, + 0.0335744209587574, + 0.03446263447403908, + -0.02609863691031933, + 0.008053123950958252, + 0.03612063080072403, + 0.01714249700307846, + 2.4605098587926477e-05, + -0.01261261384934187, + -0.00430412869900465, + 0.013967137783765793, + -0.020695345476269722, + 0.0004549774748738855, + -0.001744041801430285, + 0.03277503326535225, + 0.01983674056828022, + 0.005629044957458973, + 0.011783615685999393, + -0.01723131723701954, + 0.010384681634604931, + -0.0029921650420874357, + 0.04118344187736511, + 7.72559578763321e-05, + -0.004429958760738373, + -0.02476631850004196, + -0.007838472723960876, + -0.01391532551497221, + 0.003993254154920578, + -0.029991967603564262, + -0.018356386572122574, + 0.015232839621603489, + 0.004270820412784815, + 0.012257329188287258, + -0.0033011888153851032, + -0.0007831996772438288, + 0.026394708082079887, + 0.021257879212498665, + -0.01656515896320343, + 0.014026351273059845, + 0.007398067973554134, + -0.0015293904580175877, + 0.009962780401110649, + 0.001509960857219994, + 0.022146092727780342, + -0.03458106517791748, + -0.02753457985818386, + 0.018489617854356766, + 0.037897054105997086, + -0.021243076771497726, + 0.03771941363811493, + -0.024958763271570206, + -0.01365626323968172, + 0.03395931422710419, + 0.0019004041096195579, + -0.007949499413371086, + -0.006639386527240276, + -0.009873959235846996, + -0.026054225862026215, + 0.035498883575201035, + -0.025269638746976852, + -0.04381847009062767, + -0.03925898298621178, + -0.021317094564437866, + 0.01496637612581253, + 0.01504039391875267, + 0.012198114767670631, + -0.02195364609360695, + 0.027889864519238472, + -0.04971027746796608, + -0.016032230108976364, + -0.027282919734716415, + 0.0038341162726283073, + -0.041449904441833496, + 0.005573531612753868, + 0.043640829622745514, + 0.016594765707850456, + 0.01771983504295349, + 0.013086327351629734, + 0.0048111495561897755, + -0.0504208467900753, + 0.0043818471021950245, + 0.002736804075539112, + 0.005010997410863638, + 0.013278773054480553, + 0.019969971850514412, + 0.0017209112411364913, + 0.02492915652692318, + 0.009074568748474121, + -0.05782261863350868, + 0.027445757761597633, + 0.014973778277635574, + -0.025980208069086075, + -0.037245698273181915, + -0.012161105871200562, + 0.02448505163192749, + -0.042249295860528946, + 0.024144569411873817, + -0.018652457743883133, + 0.025832172483205795, + -0.016816819086670876, + 0.014411243610084057, + 0.008660069666802883, + -0.0032826843671500683, + -0.027445757761597633, + -0.006117561832070351, + 0.034906741231679916, + 0.04337436333298683, + 0.015484499745070934, + 0.0010945365065708756, + -0.0034344205632805824, + -0.011324706487357616, + 0.02156875468790531, + -0.023670855909585953, + -0.02065093442797661, + -0.048585209995508194, + -0.055039551109075546, + 0.027223704382777214, + 0.007801464293152094, + -0.0015136617003008723, + 0.03771941363811493, + -0.03908133879303932, + 0.0027997191064059734, + 0.050687313079833984, + 0.015810178592801094, + 0.024292604997754097, + -0.023804089054465294, + -0.005203443579375744, + 0.04272300750017166, + -0.04426257684826851, + -0.04577253758907318, + -0.014403841458261013, + 0.026261474937200546, + 0.0005107220495119691, + 0.0010741816367954016, + -0.007764455396682024, + 0.0009770335163921118, + 0.01649114117026329, + -0.00849723070859909, + -0.009644504636526108, + -0.01692044362425804, + -0.03167957067489624, + 0.0003996955056209117, + -0.008408409543335438, + -0.033396780490875244, + -0.029118558391928673, + 0.01948145590722561, + -0.006698600482195616, + -0.009000550955533981, + -0.01056972611695528, + 0.045950181782245636, + 0.0024037244729697704, + -0.03058410808444023, + 0.003654623404145241, + -0.0007281489670276642, + -0.03102821484208107, + 0.032745424658060074, + -0.00659497594460845, + -0.01823795773088932, + 0.05625344067811966, + -0.018371189013123512, + -0.020769363269209862, + -0.01046610064804554, + -0.022042466327548027, + 0.004973988514393568, + 0.017823459580540657, + -0.0029051941819489002, + 0.04876285046339035, + -0.038696445524692535, + 0.02281225100159645, + -0.015588125213980675, + 0.0004299964930396527, + 0.024618282914161682, + 0.0056031388230621815, + 0.0031883118208497763, + -0.022279324010014534, + -0.0062878024764359, + -0.024692300707101822, + 0.05326312780380249, + -0.004685319494456053, + 0.02652793936431408, + 0.00655796704813838, + -0.012671828269958496, + -0.009814745746552944, + 0.020828576758503914, + 0.010340270586311817, + 0.020221631973981857, + -0.007261135149747133, + 0.025624923408031464, + -0.048585209995508194, + -0.004918475169688463, + -0.0172165147960186, + -0.001686678035184741, + 0.04227890446782112, + -0.03943662345409393, + 0.014470458030700684, + 0.0343145988881588, + 0.01533646509051323, + -0.008304784074425697, + -0.012072284705936909, + 0.006165673490613699, + -0.003710136516019702, + 0.00492587685585022, + 0.0159878209233284, + 0.03096899949014187, + 0.037245698273181915, + 0.010850992985069752, + -0.03890369459986687, + 0.057941045612096786, + -0.008978345431387424, + -0.017112888395786285, + 0.04680878669023514, + 0.0001761389576131478, + -0.02338958904147148, + -0.005255255848169327, + -0.024588676169514656, + -0.03372245654463768, + -0.0009173566941171885, + -0.047993067651987076, + 0.014566680416464806, + 0.0036638753954321146, + -0.018134333193302155, + -0.056579120457172394, + 0.010436493903398514, + -0.013056719675660133, + -0.01307892519980669, + -0.010236646048724651, + 0.03508438542485237, + 0.0009964631171897054, + 0.05012477934360504, + 0.012198114767670631, + -0.0018393395002931356, + 0.013685869984328747, + 0.0034991861321032047, + 0.021331897005438805, + 0.007324050180613995, + -0.06679356098175049, + -0.0248403362929821, + 0.007224126253277063, + 0.009622299112379551, + -0.03413695842027664, + 0.002035486279055476, + -0.007146407850086689, + 0.019895954057574272, + -0.012220320291817188, + 0.04192361608147621, + 0.0068244305439293385, + -0.017482977360486984, + 0.025091996416449547, + -0.00045012004557065666, + 0.032094068825244904, + 0.05059849098324776, + -0.052789416164159775, + 0.028156328946352005, + -0.014581484720110893, + 0.013959735631942749, + -0.00753870140761137, + 0.03327835351228714, + 0.025624923408031464, + 0.013663665391504765, + -0.0159286055713892, + 0.011687392368912697, + 0.010880599729716778, + 0.002919997787103057, + -0.007623821962624788, + -0.026631563901901245, + -0.013900521211326122, + 0.027090473100543022, + -0.016772408038377762, + -0.008993148803710938, + -0.024011338129639626, + -0.023345177993178368, + -0.03831155598163605, + -0.013463817536830902, + -0.004022861365228891, + -0.06975426524877548, + -0.052078843116760254, + 0.05551326647400856, + 0.004851859528571367, + 0.024366622790694237, + -0.0057437727227807045, + 0.011517152190208435, + -0.00528486305847764, + 0.027786239981651306, + -0.0336928516626358, + -0.047489747405052185, + 0.016298694536089897, + -0.04926617071032524, + 0.014307619072496891, + -0.011724401265382767, + -0.025254834443330765, + -0.02050289884209633, + -0.013019710779190063, + -0.010747368447482586, + -0.005421795416623354, + 0.016106247901916504, + -0.024647889658808708, + 0.03407774493098259, + 0.016609568148851395, + 0.0038304151967167854, + 0.005599438212811947, + 0.004011758603155613, + -0.007364759687334299, + -0.02137630805373192, + -0.009533477947115898, + -0.009000550955533981, + -0.03493634983897209, + -0.01392272673547268, + 0.003299338510259986, + -0.006643087603151798, + -0.001346196630038321, + 0.041094619780778885, + -0.010999028570950031, + 0.007298144046217203, + 0.0041412897408008575, + -0.00666899373754859, + -0.0031957137398421764, + -0.014744323678314686, + 0.017468174919486046, + -0.00904496107250452, + -0.031294677406549454, + -0.037245698273181915, + 0.059687864035367966, + 0.01195385679602623, + -0.003845218801870942, + -0.004996194038540125, + -0.03392970934510231, + -0.04746014252305031, + -0.027919471263885498, + 0.003223470179364085, + 0.012220320291817188, + 0.001772723626345396, + -0.03422577679157257, + -0.0312354639172554, + -0.0103920828551054, + -0.019925560802221298, + 0.01628389023244381, + -0.0036657259333878756, + -0.027519775554537773, + 0.005059109069406986, + 0.05610540509223938, + 0.007897687144577503, + -0.012346150353550911, + 0.046838391572237015, + -0.02179080620408058, + -0.011739205569028854, + -0.010133021511137486, + 0.032005246728658676, + 0.008682274259626865, + 0.02825995348393917, + 0.03212367743253708, + -0.008660069666802883, + 0.00789028499275446, + -0.0004059407510794699, + 0.035350847989320755, + -0.014085565693676472, + -0.01663917675614357, + 0.02993275225162506, + -0.00038003455847501755, + -0.0019503660732880235, + -0.010044200345873833, + -0.021761199459433556, + 0.002416677540168166, + -0.005710464436560869, + 0.02783065102994442, + 0.012064882554113865, + -0.027297722175717354, + -0.01773463748395443, + -0.018060315400362015, + 0.014329824596643448, + -0.04506196826696396, + 0.019599882885813713, + -0.005710464436560869, + -0.0061693741008639336, + 0.021761199459433556, + 0.002220530528575182, + 0.015232839621603489, + -0.006754113826900721, + -0.02521042339503765, + 0.0156177319586277, + -0.00047116883797571063, + 0.0018967032665386796, + 0.010658547282218933, + 0.007050184532999992, + 0.0098073435947299, + 0.0180159043520689, + 0.019673900678753853, + -0.004241213668137789, + -0.027934275567531586, + 0.0012323944829404354, + 0.010813984088599682, + -0.02892611175775528, + 0.0007952275336720049, + -0.0005033202469348907, + 0.016224676743149757, + 0.0049813902005553246, + 0.008948738686740398, + 0.005421795416623354, + -0.0006532060797326267, + -0.013856111094355583, + 0.019644293934106827, + 0.012323944829404354, + -0.002561012050136924, + -0.02442583627998829, + 0.026394708082079887, + 0.011739205569028854, + 0.01883010007441044, + 0.01180582121014595, + 0.008326989598572254, + -0.005566129926592112, + -0.018060315400362015, + -0.021539146080613136, + 0.005817790050059557, + -0.0045705921947956085, + -0.006087954621762037, + 0.0098073435947299, + -0.029459038749337196, + -0.027519775554537773, + 0.02768261544406414, + 0.05335194990038872, + 0.0049998946487903595, + 0.07117541134357452, + -0.011065644212067127, + -0.009718522429466248, + 0.016802014783024788, + 0.02164277248084545, + -0.015025590546429157, + 0.051338668912649155, + 0.0045853955671191216, + -0.005617942661046982, + -0.012072284705936909, + -0.03188681975007057, + 0.030051181092858315, + 0.014692510478198528, + 0.01045869942754507, + 0.030288036912679672, + -0.00421530706807971, + 0.007860678248107433, + -0.0021835218649357557, + -0.010754769667983055, + 0.032153282314538956, + -0.003462177235633135, + 0.01773463748395443, + 0.04343358054757118, + -0.01612105220556259, + -0.019066955894231796, + 0.022797446697950363, + 0.00742767471820116, + -0.035054776817560196, + -0.011613375507295132, + -0.01391532551497221, + -0.022131288424134254, + -0.014211395755410194, + -0.003989553544670343, + 0.010480904020369053, + -0.023493213579058647, + 0.001336019253358245, + 0.02108023688197136, + 0.00020493647025432438, + -0.0015552965924143791, + -0.003919236361980438, + 0.003397411899641156, + 0.008793300949037075, + -0.012553399428725243, + -0.04914774373173714, + 0.014714716002345085, + 0.026898028329014778, + 0.001263851998373866, + -0.008341792970895767, + 0.002227932447567582, + 0.0035935586784034967, + 0.03268621116876602, + 0.007416572421789169, + 0.02331557124853134, + 0.011828026734292507, + 0.040295228362083435, + 0.021198665723204613, + 0.0006259120418690145, + -0.010821386240422726, + -0.014285413548350334, + -0.01381170004606247, + 0.007020577788352966, + 0.03863723203539848, + 0.0046039000153541565, + -0.0075016925111413, + 0.007027979474514723, + 0.034906741231679916, + -0.00900795217603445, + -0.013352790847420692, + -0.045150790363550186, + -0.007631223648786545, + -0.0103920828551054, + -0.00017382591613568366, + -0.05071691796183586, + -0.0303768590092659, + 0.010821386240422726, + 0.03387049213051796, + -0.01296789851039648, + 0.0067393104545772076, + -0.04503235965967178, + 0.026335492730140686, + 0.0260098148137331, + 0.03241974860429764, + 0.01293088961392641, + 0.03176839277148247, + -0.018726475536823273, + 0.012745846062898636, + -0.006047245115041733, + -0.010562323965132236, + 0.0005703988135792315, + -0.02747536450624466, + -0.007542402483522892, + 0.018178744241595268, + -0.007061287295073271, + -0.00915598776191473, + -0.0015145869692787528, + -0.005806687753647566, + 0.01823795773088932, + 0.02441103383898735, + -0.018267564475536346, + -0.0003157316823489964, + 0.006062048487365246, + -0.036298274993896484, + 0.013959735631942749, + -0.008637864142656326, + 0.009563085623085499, + -0.0098073435947299, + -0.007446179166436195, + 0.01881529577076435, + -0.012397962622344494, + 0.010488306172192097, + -0.025402870029211044, + 0.011502348817884922, + 0.005529121030122042, + 0.029251789674162865, + 0.016609568148851395, + 0.048644423484802246, + 0.03736412897706032, + -0.006606078706681728, + -0.02427780069410801, + 0.002783064963296056, + 0.04630546644330025, + -0.02667597495019436, + 0.01133950985968113, + -0.022264519706368446, + 0.030273234471678734, + 0.01714249700307846, + 0.0065690698102116585, + -0.058533187955617905, + 0.0009520524763502181, + -0.03866684064269066, + -0.008741488680243492, + 0.015647338703274727, + -0.002448135055601597, + -0.052286095917224884, + 0.008193758316338062, + 0.03236053138971329, + 0.014174386858940125, + 0.034403420984745026, + -0.021983252838253975, + -0.014670305885374546, + 0.010073807090520859, + -0.0034214674960821867, + -0.014899760484695435, + 0.02863004058599472, + -0.010170030407607555, + -0.015528910793364048, + 0.03330795839428902, + 0.00019383382459636778, + 0.0009659308125264943, + -0.011642982251942158, + 0.02259019762277603, + -0.003582456149160862, + -0.024470247328281403, + 0.03218289092183113, + -0.01976272277534008, + -0.00780886597931385, + -0.027712222188711166, + 0.003543596714735031, + 0.01042909175157547, + -0.01657996140420437, + -0.01526244729757309, + 0.021095041185617447, + -0.0028903905767947435, + 0.005643848795443773, + -0.014625894837081432, + -0.0021224571391940117, + 0.002013280987739563, + -0.00455948943272233, + -0.00697616720572114, + -0.006006535142660141, + -0.013996744528412819, + 0.02084338106215, + -0.00934103224426508, + -0.01583978533744812, + 0.013426808640360832, + -0.008082731626927853, + 0.015306857414543629, + -0.0171572994440794, + -0.0119908656924963, + -0.030939392745494843, + -0.022501377388834953, + -0.00527005922049284, + -0.02457387186586857, + 0.0008678573649376631, + 0.00893393438309431, + 0.01773463748395443, + 0.014255806803703308, + 0.030184412375092506, + 0.0017634714022278786, + 0.004045066423714161, + 0.04201243817806244, + -0.0030994906555861235, + 0.019377831369638443, + -0.0002037799422396347, + 0.010628939606249332, + -0.04213086888194084, + 0.015454893000423908, + 0.037156879901885986, + -0.01450006477534771, + 0.01925940252840519, + -0.00162098731379956, + 0.023078715428709984, + 0.001979973167181015, + -9.691691229818389e-05, + 0.005880705080926418, + -0.0020984013099223375, + 0.0032845349051058292, + 0.03958465903997421, + -0.0005195116391405463, + 0.0035158400423824787, + -0.008334391750395298, + 0.002559161512181163, + 0.007349956315010786, + -0.008800703100860119, + 0.010414288379251957, + -0.021924039348959923, + 0.0037434445694088936, + -0.0303768590092659, + 0.03102821484208107, + 0.008489828556776047, + 0.004681618884205818, + 0.020325256511569023, + 0.004629806149750948, + 0.0015090355882421136, + -0.019969971850514412, + 0.014847948215901852, + 0.005747473333030939, + 0.007364759687334299, + -0.027445757761597633, + -0.03967348113656044, + 0.00753870140761137, + 0.0034991861321032047, + -0.003410364966839552, + 0.013123336248099804, + -0.02005879394710064, + 0.0076164198108017445, + -0.02433701604604721, + -0.015484499745070934, + -0.035202812403440475, + 0.0020040287636220455, + -0.008141945116221905, + 0.006820729933679104, + -0.026764795184135437, + -0.004411454312503338, + 0.028156328946352005, + -0.006413632538169622, + -0.019022544845938683, + 0.0031346490141004324, + -0.001017743139527738, + 0.006891046650707722, + -0.007412871345877647, + 0.009133782237768173, + -0.008001311682164669, + 0.004714926704764366, + -0.00014849798753857613, + -0.009755531325936317, + 0.0012157404562458396, + -0.036505524069070816, + -0.007523898035287857, + 0.007235229015350342, + 0.0006675469921901822, + 0.0005518943653441966, + -0.01773463748395443, + -0.010244048200547695, + -0.0207841657102108, + -0.01808992214500904, + 0.01457408256828785, + 0.0057918839156627655, + -0.008586051873862743, + -0.041745975613594055, + 0.0351732037961483, + -0.026838812977075577, + -0.024603478610515594, + -0.01591380313038826, + -0.013604450970888138, + 0.01976272277534008, + -0.005991731770336628, + -0.0006171224522404373, + -0.04020640626549721, + -0.009355835616588593, + -0.01896333135664463, + 0.006691198796033859, + 0.0495622418820858, + -0.0076164198108017445, + -0.010991626419126987, + 0.01991075836122036, + 0.008956139907240868, + 0.014485261403024197, + 0.025832172483205795, + -0.009792540222406387, + -0.0327158160507679, + 0.013989342376589775, + -0.03606141731142998, + 0.008963542059063911, + 0.023582035675644875, + -0.008171552792191505, + 0.014633296988904476, + -0.02368566021323204, + 0.052878234535455704, + 0.026986848562955856, + 0.0183859933167696, + -0.017542192712426186, + -0.03890369459986687, + -0.004566891118884087, + 0.036002203822135925, + 0.0012000116985291243, + 0.004722328390926123, + -0.005680857691913843, + 0.02420378290116787, + 0.008985747583210468, + 0.007631223648786545, + 0.010910207405686378, + 0.01788267306983471, + 0.003127247327938676, + 0.02762340009212494, + -0.008785899728536606, + 0.001167629030533135, + -0.027608597651124, + 0.002226081909611821, + -0.007079791743308306, + 0.026942437514662743, + -0.031205857172608376, + 0.008452819660305977, + 0.04731210693717003, + 0.01671319454908371, + 0.032153282314538956, + 0.00753870140761137, + -0.016239481046795845, + -0.030613714829087257, + -0.016520747914910316, + 0.01261261384934187, + 0.026409510523080826, + 0.02993275225162506, + 0.05317430570721626, + -0.01464810036122799, + 0.009725923649966717, + -0.019747918471693993, + 0.027593793347477913, + -0.004859261214733124, + -0.011902044527232647, + -0.00178937753662467, + 0.004233811516314745, + -0.028955718502402306, + -0.039347801357507706, + 0.003676828695461154, + -0.016328301280736923, + -0.04278222471475601, + 0.019348222762346268, + 0.016091445460915565, + -0.012486783787608147, + 0.021420719102025032, + 0.001506259897723794, + 0.00988876260817051, + -0.013471218757331371, + -0.0030236225575208664, + -0.01450006477534771, + -0.010858395136892796, + -0.008682274259626865, + -0.0059473211877048016, + -0.0014044856652617455, + 0.005336675327271223, + 0.033455993980169296, + 0.010177431628108025, + -0.002263090806081891, + -0.02550649456679821, + 0.0300067700445652, + -0.014773930422961712, + 0.023093517869710922, + -0.00803091935813427, + -0.0013785794144496322, + -0.038341160863637924, + 0.016047034412622452, + -0.0016802015015855432, + 0.017172103747725487, + -0.022146092727780342, + 0.03407774493098259, + 0.03015480563044548, + 0.0009881361620500684, + -0.02375967800617218, + -0.043048687279224396, + -0.031057821586728096, + -0.0027275518514215946, + 0.0022704924922436476, + -0.023804089054465294, + 0.0006041693850420415, + 0.04787464067339897, + -0.015395678579807281, + ], + "index": 85, + }, + { + "title": "Savai'i", + "text": "Savai\u02bbi is the largest (area 1700 km2) and highest (Mt Silisili at 1,858 m) island in Samoa and the Samoa Islands chain. The island is the fourth largest in Polynesia, behind the two main islands of New Zealand and the Island of Hawaii.The island of Savai'i is also referred to by Samoans as Salafai, a classical Samoan term used in oratory and prose.", + "vector": [ + 0.001201200415380299, + -0.008997833356261253, + -0.009939546696841717, + 0.0025519065093249083, + 0.028760071843862534, + 0.023962143808603287, + -0.005416572093963623, + -0.03832843154668808, + -0.0399506539106369, + 0.005938982591032982, + -0.004626082256436348, + 0.007719302084296942, + -0.06769339740276337, + -0.0266704298555851, + 0.012778435833752155, + 0.04440489038825035, + 0.011025610379874706, + 0.048639167100191116, + 0.027316570281982422, + -0.0009906896157190204, + -0.0015895713586360216, + 0.009286534041166306, + -0.023920901119709015, + 0.039263270795345306, + -0.013658285140991211, + 0.019824102520942688, + 0.006313605699688196, + -0.003629378043115139, + -0.05141618847846985, + -0.007643690332770348, + -0.0017090040491893888, + -0.012682202272117138, + -0.0012433025985956192, + 0.05735517293214798, + 0.008138605393469334, + 0.042315248399972916, + 0.005918360780924559, + 0.002699693664908409, + -0.059334833174943924, + 0.00732749467715621, + 0.03159208595752716, + -0.009513369761407375, + 0.046384550631046295, + 0.02133634313941002, + 0.018476834520697594, + -0.056530315428972244, + -0.007135027553886175, + 0.055760446935892105, + 0.015287380665540695, + 0.005375328939408064, + -0.02601054310798645, + 0.012991524301469326, + -0.0412704274058342, + 0.03321430832147598, + -0.022312426939606667, + -0.0017253293190151453, + -0.007925516925752163, + 0.07929641008377075, + 0.0218999981880188, + -0.028237661346793175, + -0.00949274841696024, + 0.021556306630373, + 0.053615812212228775, + 0.033956680446863174, + -0.013087757863104343, + -0.03145461156964302, + 0.04918907210230827, + -0.008990959264338017, + 0.0007690088823437691, + 0.014984932728111744, + 0.029254987835884094, + -0.0013876528246328235, + 0.011073727160692215, + 0.0698380321264267, + -0.021542558446526527, + 0.013960733078420162, + 0.01670338772237301, + -0.04061054065823555, + -0.03524896129965782, + -0.011596137657761574, + -0.02625800110399723, + -0.023563463240861893, + -0.01937043108046055, + -0.008234838955104351, + 0.022999808192253113, + 0.02818267047405243, + -0.027646513655781746, + -0.03197702020406723, + 0.020827680826187134, + -0.01560357678681612, + 0.016909603029489517, + -0.008234838955104351, + 0.007829283364117146, + -0.004667325410991907, + 0.02548813261091709, + -0.004069302696734667, + 0.005880554672330618, + 0.007306872867047787, + 0.030932199209928513, + 0.018064403906464577, + 0.02327476255595684, + 0.01807815209031105, + 0.06279923766851425, + 0.0041999053210020065, + -0.021735025569796562, + 0.021954987198114395, + -0.00944463163614273, + -0.019356682896614075, + 0.024553293362259865, + -0.022546136751770973, + 0.08309075981378555, + -0.0038184081204235554, + -0.013005271553993225, + -0.00012061409506713971, + 0.006176129449158907, + -0.00681883143261075, + 0.007183144334703684, + -0.010785027407109737, + -0.037503574043512344, + 0.013397079892456532, + -0.0070662894286215305, + 0.09562861174345016, + -0.011706119403243065, + -0.07858153432607651, + 0.012022314593195915, + 0.03337927907705307, + 0.025680599734187126, + 0.04520225524902344, + 0.058070048689842224, + -0.011843595653772354, + -0.02235366962850094, + -0.009698962792754173, + 0.03346176818013191, + -0.001538876909762621, + -0.021322596818208694, + -0.008812240324914455, + 0.007018172647804022, + 0.05719020217657089, + -0.01177485752850771, + 0.030272312462329865, + -0.008008003234863281, + -0.005313464440405369, + -0.003945574164390564, + 0.03450658917427063, + -0.004588276147842407, + 0.01053069531917572, + 0.010970620438456535, + 0.009877682663500309, + -0.020167794078588486, + -0.03769604116678238, + 0.03326930105686188, + 0.01439378410577774, + -0.021432576701045036, + 0.009698962792754173, + 0.0038630880881100893, + 0.0786365270614624, + -0.0001888153055915609, + -0.017954424023628235, + -0.004454236943274736, + 0.02415461093187332, + -0.06263426691293716, + -0.04289264976978302, + 0.007382485084235668, + 0.011135592125356197, + -0.023948395624756813, + -0.009183426387608051, + -0.0036465625744313, + -0.051196228712797165, + -0.011279942467808723, + 0.004412993788719177, + 0.0033183377236127853, + -0.02832014672458172, + 0.02056647650897503, + 0.002689382992684841, + 0.038905832916498184, + -0.02741280198097229, + -0.011554894968867302, + 0.032059505581855774, + -0.011974197812378407, + 0.13659659028053284, + -0.03480903431773186, + -0.05306590721011162, + 0.03984067216515541, + -0.008585403673350811, + -0.05147118121385574, + -0.012256025336682796, + 0.019535401836037636, + 0.05325837433338165, + 0.02811393328011036, + -0.039648205041885376, + -0.010578812099993229, + -0.012929659336805344, + 0.03511148318648338, + -0.003149928990751505, + 0.038245946168899536, + -0.02906252071261406, + -0.03860338404774666, + 0.05177363008260727, + 0.021611297503113747, + 0.004450799897313118, + 0.021858753636479378, + 0.04209528863430023, + -0.01737702265381813, + 0.010620055720210075, + 0.03920828178524971, + 0.02892504446208477, + 0.003271939465776086, + -0.004663888365030289, + 0.0015053671086207032, + 0.018586814403533936, + -0.0006345396977849305, + -0.01765197515487671, + 0.02612052485346794, + -0.014421278610825539, + 0.049161575734615326, + 0.027261579409241676, + -0.0183943472802639, + -0.04566967487335205, + 0.026422971859574318, + 0.025226928293704987, + 0.01479246560484171, + -0.0011324621737003326, + 0.04418493062257767, + 0.00884660892188549, + -0.03907080367207527, + 0.0026859459467232227, + -0.03720112517476082, + 0.024457059800624847, + 0.01866930164396763, + 0.021886250004172325, + 0.007045667618513107, + -0.024663273245096207, + -0.005151929799467325, + 0.04176534339785576, + -0.03109717182815075, + -0.028595101088285446, + 0.003024481702595949, + -0.004254895728081465, + -0.017954424023628235, + 0.009032201953232288, + -0.021886250004172325, + 0.0348915196955204, + 0.008599151857197285, + 0.003234133357182145, + -0.0023422548547387123, + 0.028375137597322464, + 0.019741617143154144, + -0.03975818678736687, + 0.055128052830696106, + 0.034341614693403244, + 0.031784553080797195, + 0.010736910626292229, + -0.00025905718212015927, + 0.049409035593271255, + -0.01948041282594204, + 0.0013945266837254167, + 0.02517193742096424, + 0.007238134741783142, + -0.03923577815294266, + 0.022614875808358192, + -0.02684914879500866, + -0.05149867758154869, + -0.021735025569796562, + -0.016978340223431587, + 0.004261769820004702, + 0.032416947185993195, + -0.00798738095909357, + 0.03131713345646858, + -0.018243124708533287, + -0.026093028485774994, + 0.01688210666179657, + 0.03791600465774536, + -0.047126926481723785, + 0.022133708000183105, + 0.039125796407461166, + 0.048776641488075256, + 0.021212615072727203, + 0.030272312462329865, + 0.032939355820417404, + 0.02151506394147873, + 0.00814547948539257, + -0.03137212619185448, + -0.0036981164012104273, + 0.035853855311870575, + 0.012049810029566288, + 0.025144441053271294, + -0.009726458229124546, + 0.05999471992254257, + 0.06131449341773987, + -0.01877928152680397, + -0.038245946168899536, + -0.0304372850805521, + 0.011699245311319828, + 0.021281354129314423, + -0.013204612769186497, + 0.007299999240785837, + -0.052323535084724426, + 0.053753290325403214, + 0.04883163422346115, + -0.003529707668349147, + 0.011816100217401981, + 0.047154419124126434, + -0.024127116426825523, + 0.023920901119709015, + 0.04047306627035141, + 0.005626223515719175, + -0.00767805939540267, + -0.04286515340209007, + 0.010434461757540703, + 0.006715724244713783, + 0.028842557221651077, + -0.009465252980589867, + 0.038493406027555466, + 0.009575234726071358, + 0.031179657205939293, + -0.004670761991292238, + -7.856563752284274e-05, + -0.01479246560484171, + -0.0583450011909008, + -0.005323775112628937, + -0.016194725409150124, + -0.0070662894286215305, + 0.028265157714486122, + -0.008069867268204689, + 0.029337473213672638, + -0.01860056258738041, + -0.01762448064982891, + -0.05724519118666649, + -0.019425421953201294, + 0.0042823911644518375, + 0.010922503657639027, + -0.0025862755719572306, + 0.0013214923674240708, + 0.0023267888464033604, + 0.10195253044366837, + 0.002819985616952181, + -0.03604632243514061, + 0.0018971749814227223, + -0.031152162700891495, + 0.020442746579647064, + 0.011279942467808723, + 0.006220809184014797, + 0.09199923276901245, + 0.040170617401599884, + 0.04355253651738167, + 0.04124293476343155, + -0.009726458229124546, + -0.029529940336942673, + 0.005169114097952843, + 0.02713784947991371, + 0.0005194031982682645, + -0.010241994634270668, + 0.016620902344584465, + 0.06411901116371155, + 0.01748700439929962, + -0.016648396849632263, + -0.030162332579493523, + -0.05191110447049141, + -0.013390205800533295, + -0.023535966873168945, + 0.016648396849632263, + 0.007238134741783142, + 0.006492325104773045, + -0.0437999963760376, + -0.008825987577438354, + -0.033544253557920456, + 0.036623723804950714, + -0.011108096688985825, + 0.010262616910040379, + 0.007733049802482128, + 0.044872310012578964, + -0.034726548939943314, + 0.012909037992358208, + -0.02881506271660328, + -0.026491710916161537, + -0.00993267260491848, + -0.015644818544387817, + 0.0304372850805521, + 0.00919717364013195, + -0.018861768767237663, + 0.0016978341154754162, + 0.03629378229379654, + -0.032664403319358826, + -0.01642843522131443, + 0.015369866043329239, + -0.02429208718240261, + 0.024718264117836952, + -0.01796817034482956, + 0.04844669997692108, + 0.04773182049393654, + -0.024058377370238304, + 0.019040487706661224, + 0.03956571966409683, + -0.08584029227495193, + -0.010736910626292229, + -0.03505649417638779, + -0.010283238254487514, + -0.033626738935709, + 0.006402965169399977, + -0.020593971014022827, + 0.050041425973176956, + 0.013300846330821514, + 0.0028835684061050415, + 0.053120896220207214, + -0.01470997929573059, + 0.029887378215789795, + 0.023439733311533928, + 0.03183954581618309, + 0.00979519635438919, + -0.031784553080797195, + 0.010956872254610062, + 0.05697023868560791, + -0.00958210788667202, + -0.011183708906173706, + 0.050316378474235535, + -0.03005235083401203, + -0.0285401102155447, + 0.0009554612915962934, + -0.012833425775170326, + 0.019397925585508347, + -0.04102297127246857, + -0.016304707154631615, + 0.04910658672451973, + -0.030382294207811356, + -0.05757513642311096, + 0.07335743308067322, + -0.01521864254027605, + 0.03296685218811035, + -0.02282108925282955, + -0.003973069135099649, + -0.03461656719446182, + 0.0007831861148588359, + 0.031894534826278687, + -0.04718191549181938, + -0.04858417436480522, + -0.0013378176372498274, + -0.051581162959337234, + -0.004083050414919853, + 0.029254987835884094, + 0.023632200434803963, + -0.02583182416856289, + -0.009788323193788528, + -0.01345894392579794, + -0.022119959816336632, + -0.06081957742571831, + -0.013266476802527905, + -0.042947642505168915, + 0.00016421990585513413, + 0.005554048344492912, + 0.019466664642095566, + 0.00263267382979393, + 0.052213553339242935, + 0.03835592791438103, + -0.03057476133108139, + 0.010152635164558887, + -0.04390997439622879, + -0.01198794599622488, + 0.019782859832048416, + -0.027701502665877342, + 0.029639922082424164, + 0.02099265344440937, + -0.016414687037467957, + 0.04355253651738167, + -0.04995894059538841, + 0.020758943632245064, + 0.021212615072727203, + 0.0031585213728249073, + 0.02755028009414673, + 0.005316901486366987, + 0.016029752790927887, + -0.04630206525325775, + -0.0032152303028851748, + -0.047154419124126434, + 0.012324763461947441, + -0.023384742438793182, + -0.03923577815294266, + 0.015576081350445747, + -0.015301127918064594, + 0.03497400879859924, + -0.031784553080797195, + 0.07445724308490753, + 0.032444439828395844, + -0.041545379906892776, + 0.0006371173658408225, + -0.004000564571470022, + 0.0037977867759764194, + -0.026876645162701607, + 0.05180112272500992, + 0.014558755792677402, + -0.011877965182065964, + 0.009155930951237679, + 0.004382061772048473, + 0.0685182586312294, + -0.016125986352562904, + 0.005131308455020189, + 0.018724292516708374, + 0.010551316663622856, + 0.0018387474119663239, + -0.04470733925700188, + 0.059334833174943924, + -0.018133142963051796, + 0.05430319532752037, + -0.020167794078588486, + 0.04044556990265846, + -0.01882052607834339, + 0.028237661346793175, + 0.016304707154631615, + 0.047126926481723785, + -0.021528810262680054, + 0.006970055866986513, + 0.031262144446372986, + 0.040665533393621445, + -0.059444814920425415, + -0.03519396856427193, + -0.014723727479577065, + 0.030409788712859154, + -0.0073343683034181595, + -0.020965157076716423, + -0.008262334391474724, + 0.04451487213373184, + -0.011417418718338013, + 0.022298678755760193, + -0.03923577815294266, + 0.008447927422821522, + 0.001993408426642418, + -8.581537258578464e-05, + -0.009499622508883476, + 0.014215064235031605, + 0.016689639538526535, + 0.0009803789434954524, + -0.041187942028045654, + -0.05254349857568741, + -0.022243687883019447, + 0.024800751358270645, + -0.01789943315088749, + -0.027426550164818764, + -0.03967570140957832, + -0.02305479906499386, + -0.020868923515081406, + 0.05977475643157959, + -0.019219206646084785, + -0.018765535205602646, + -0.012118548154830933, + -0.046357057988643646, + 0.029007529839873314, + -0.02713784947991371, + -0.02266986481845379, + -0.0009717866196297109, + -0.015411109663546085, + -0.04173784703016281, + 0.055018071085214615, + -0.03766854479908943, + -0.0034248819574713707, + 0.018064403906464577, + 0.025955552235245705, + -0.01405696664005518, + -0.005179425235837698, + 0.014833708293735981, + -0.016442183405160904, + -0.007540583144873381, + -0.0013266477035358548, + 0.0405830480158329, + 0.003282250137999654, + -0.00028676725924015045, + -0.02741280198097229, + 0.03134462982416153, + -0.031124666333198547, + 0.052213553339242935, + -0.00949274841696024, + -0.051581162959337234, + -0.010812521912157536, + 0.013452069833874702, + 0.0031739873811602592, + -0.009815817698836327, + 0.04481732100248337, + -0.011795478872954845, + -0.015466099604964256, + -0.002209933940321207, + -0.0387408621609211, + -0.023357247933745384, + 0.0225323885679245, + 0.002136040246114135, + -0.022037474438548088, + 0.03373672068119049, + 0.03478154167532921, + 0.04008813202381134, + -0.008599151857197285, + 0.012008567340672016, + -0.007904895581305027, + -0.019494159147143364, + 0.053478337824344635, + -0.008076741360127926, + 0.006427023559808731, + -0.021226363256573677, + 0.013603294268250465, + 0.04025310277938843, + -0.031069675460457802, + -0.007643690332770348, + -0.052598487585783005, + -0.016167229041457176, + -0.001263924059458077, + -0.009554612450301647, + -0.011094349436461926, + -0.003691242542117834, + 0.010132013820111752, + 0.032801877707242966, + 0.06208436191082001, + 0.0020793313160538673, + -0.04165536165237427, + 0.032444439828395844, + -0.045229751616716385, + 0.0034970571286976337, + -0.006069585215300322, + -0.003149928990751505, + -0.011238698847591877, + 0.026601692661643028, + 0.03120715357363224, + -0.009293407201766968, + 0.010420714505016804, + -0.004261769820004702, + 0.00012619908375199884, + -0.026367980986833572, + 0.0196866262704134, + -0.000724329031072557, + -0.027742747217416763, + 0.026807906106114388, + 0.013232107274234295, + -0.02678041160106659, + -0.006932249758392572, + 0.04492730274796486, + 0.0017416547052562237, + 0.009245290420949459, + 0.0071487752720713615, + -8.645979687571526e-05, + 0.01354830339550972, + -0.02804519422352314, + 0.03351675719022751, + -0.00030932200024835765, + -0.04729189723730087, + 0.008702258579432964, + -0.007794914301484823, + 0.05719020217657089, + 0.017322031781077385, + -0.03629378229379654, + 0.01019387785345316, + -0.02671167254447937, + -0.02481449767947197, + -0.009960168041288853, + -0.014517512172460556, + -0.012015441432595253, + 0.020937662571668625, + 0.006268925964832306, + 0.005145055707544088, + -0.0014271773397922516, + -0.008468548767268658, + 0.025158189237117767, + 0.03640376403927803, + -0.02316478081047535, + 0.008798492141067982, + 0.004907908849418163, + -0.02713784947991371, + -0.01593351922929287, + -0.04275517538189888, + 0.006251741200685501, + -0.027055364102125168, + -0.011032484471797943, + -0.01510866079479456, + -0.011781731620430946, + -0.023068547248840332, + -0.033681727945804596, + 0.008729754015803337, + -0.03291185945272446, + -0.0225323885679245, + -0.009204047732055187, + 0.030794722959399223, + -0.03247193619608879, + -0.012943407520651817, + 0.027041615918278694, + 0.0042205266654491425, + 0.014215064235031605, + 0.029777398332953453, + -0.0380534790456295, + -0.0025415958371013403, + 0.026409225538372993, + 0.013706400990486145, + -0.010626928880810738, + 0.0012630647979676723, + -0.01818813383579254, + 0.027811484411358833, + 0.01389886811375618, + 0.011706119403243065, + 0.05680526793003082, + 0.05009641498327255, + 0.010083897039294243, + 0.04237024113535881, + 0.014201316982507706, + -0.026134271174669266, + -0.00426520686596632, + 6.981225305935368e-05, + 0.01825687102973461, + -0.030547264963388443, + 0.0013678906252607703, + 0.028031446039676666, + -0.019810356199741364, + 0.04539472237229347, + 0.015397361479699612, + -0.0014151481445878744, + 0.010798774659633636, + 0.022161202505230904, + 0.012840299867093563, + 0.014187568798661232, + 0.003973069135099649, + -0.017541993409395218, + 0.0501239113509655, + -0.01898549683392048, + -0.02119886688888073, + 0.034699052572250366, + -0.009224669076502323, + -0.025859318673610687, + 0.004454236943274736, + 0.04426741600036621, + -0.004980084020644426, + -0.01242787018418312, + 0.0393182635307312, + 0.00629298435524106, + -0.040033139288425446, + -0.011699245311319828, + -0.009389640763401985, + -0.03464406356215477, + 0.003849340369924903, + -0.0006096221040934324, + 0.0206352137029171, + -0.024347078055143356, + 0.011664876714348793, + 0.002043243730440736, + 0.005880554672330618, + -0.04998643323779106, + -0.028512613847851753, + 0.024127116426825523, + -0.017294537276029587, + -0.008365442045032978, + -0.03464406356215477, + -0.01066817156970501, + 0.012503482401371002, + 0.026354234665632248, + 0.004980084020644426, + 0.027605269104242325, + 0.0069253756664693356, + -0.013830129988491535, + -0.011218077503144741, + -0.02275235205888748, + 0.056915245950222015, + -0.0029505882412195206, + -0.018064403906464577, + 0.03907080367207527, + 0.01484745554625988, + 0.002087923465296626, + -0.008344819769263268, + 0.02786647528409958, + -0.0036156305577605963, + 0.019920336082577705, + 0.03513897955417633, + -0.003184298053383827, + 0.007190017960965633, + 0.008551035076379776, + -0.0033389590680599213, + -0.04050055891275406, + -0.017803199589252472, + -0.011417418718338013, + -0.027055364102125168, + -0.011025610379874706, + -0.01821562834084034, + 0.056145381182432175, + -0.00910781417042017, + 0.045064777135849, + 0.012317889370024204, + -0.013190864585340023, + -0.004698257427662611, + -0.049299053847789764, + -0.02892504446208477, + 0.0007741642184555531, + -0.0006633238517679274, + 0.017775705084204674, + 0.022202445194125175, + 0.005756826139986515, + -0.019012991338968277, + -0.030547264963388443, + -0.011403671465814114, + 0.015741052106022835, + -0.0019366993801668286, + -0.014380035921931267, + 0.004564217757433653, + 0.007279377896338701, + -0.027000373229384422, + -0.02266986481845379, + -0.022559884935617447, + -0.046384550631046295, + 0.018518077209591866, + 0.014462522231042385, + -0.004004001617431641, + -0.014613745734095573, + -0.008289829827845097, + 0.03629378229379654, + 0.0029557435773313046, + 0.008894725702702999, + 0.007190017960965633, + 0.0010774716502055526, + -0.01927419751882553, + -0.00936901941895485, + -0.003945574164390564, + 0.02558436617255211, + 0.008654141798615456, + 0.02187250182032585, + -0.013087757863104343, + 0.009485874325037003, + 0.03923577815294266, + 0.037751030176877975, + -0.03071223758161068, + -0.014888699166476727, + 0.005310027860105038, + 0.028210166841745377, + 0.024333329871296883, + 0.009561486542224884, + 0.0096714673563838, + 0.011307437904179096, + 0.026299243792891502, + -0.005698398686945438, + 0.02119886688888073, + -0.009128435514867306, + 0.00935527216643095, + -0.018064403906464577, + 0.01547984778881073, + -0.028141427785158157, + 0.010977493599057198, + 0.0209514107555151, + 0.007891148328781128, + 0.03975818678736687, + 0.0035846983082592487, + 0.029227491468191147, + 0.013472691178321838, + 0.02576308511197567, + -0.007526835426688194, + -0.00568808801472187, + 0.017473256215453148, + -0.04542221873998642, + -0.0030485400930047035, + -0.013768265955150127, + 0.007409980520606041, + 0.010771279223263264, + 0.004478295333683491, + -0.018243124708533287, + -0.048941612243652344, + 0.016799621284008026, + 0.02772899903357029, + 0.004873539786785841, + 0.03285687044262886, + -0.033626738935709, + -0.03923577815294266, + 0.01726704090833664, + 0.023370996117591858, + -0.03211449831724167, + 0.02618926204741001, + 0.017720714211463928, + -0.02463577874004841, + 0.0004528130230028182, + -0.01306026242673397, + 0.018971748650074005, + 0.0021875938400626183, + 0.027082858607172966, + -0.05152617022395134, + -0.0317295640707016, + 0.014957437291741371, + -0.0021858755499124527, + -0.02555687166750431, + 0.002077612793073058, + 0.004358003381639719, + -0.009753953665494919, + -0.02594180405139923, + -0.02305479906499386, + 0.039510730654001236, + -0.014490016736090183, + 0.025020712986588478, + -0.021542558446526527, + 0.01393323764204979, + -0.00702848332002759, + -0.02330225706100464, + -0.05485310032963753, + 6.503280019387603e-05, + 0.04643954336643219, + 0.051223721355199814, + -0.010702541097998619, + 0.005877118092030287, + 0.016483426094055176, + 0.03131713345646858, + 0.016717135906219482, + 0.049024101346731186, + -0.006763841025531292, + 0.03285687044262886, + -0.05001392960548401, + 0.02558436617255211, + 0.01579604297876358, + -0.03337927907705307, + -0.0317295640707016, + -0.017734460532665253, + -0.0685732513666153, + -0.012537851929664612, + 0.033434271812438965, + 0.016139734536409378, + -0.03909830003976822, + 0.023755930364131927, + 0.0024866051971912384, + 0.0041277301497757435, + -0.005725893657654524, + -0.03150960057973862, + -0.026161767542362213, + 0.006024905014783144, + -0.006571373902261257, + -0.00024359107192140073, + 0.012345384806394577, + 0.04731939360499382, + -0.036348771303892136, + 0.004880413878709078, + -0.008296702988445759, + 0.029749901965260506, + -0.031124666333198547, + 0.011816100217401981, + -0.05009641498327255, + 0.01645592972636223, + 0.007341241929680109, + -0.031399618834257126, + 6.535501597682014e-05, + 0.026601692661643028, + 0.029529940336942673, + -0.04303012788295746, + -0.009575234726071358, + -0.038245946168899536, + -0.017858190461993217, + -0.03632127493619919, + -0.03601882979273796, + 0.034561578184366226, + 0.011403671465814114, + 0.029887378215789795, + 0.03480903431773186, + -0.051581162959337234, + -0.025983048602938652, + 0.018628058955073357, + -0.005983662325888872, + 0.04011562466621399, + -0.007258756086230278, + -0.018435591831803322, + 0.011108096688985825, + 0.01332146767526865, + 0.015644818544387817, + -0.004766995552927256, + 0.03821844980120659, + -0.05521053820848465, + -0.005712146405130625, + 0.013238981366157532, + -0.05303841084241867, + 0.022477397695183754, + -0.035606399178504944, + 0.01983785070478916, + 0.0010327917989343405, + 0.037366095930337906, + -0.0018679611384868622, + -0.019824102520942688, + 0.007389358710497618, + -0.03986816853284836, + 0.010936250910162926, + -0.02194124087691307, + 0.016717135906219482, + 0.0088809784501791, + 0.020731447264552116, + -0.016620902344584465, + 0.03134462982416153, + 0.018793029710650444, + -0.004557344131171703, + -0.014173821546137333, + 0.014545007608830929, + -0.026601692661643028, + -0.007561204489320517, + -0.029887378215789795, + 0.03337927907705307, + -0.01898549683392048, + 0.0076643116772174835, + -0.0014649833319708705, + 0.007946138270199299, + -0.0118985865265131, + -0.013507060706615448, + 0.03835592791438103, + 0.027605269104242325, + -0.018696796149015427, + -0.012269772589206696, + -0.006385780870914459, + -0.009747079573571682, + 0.014215064235031605, + -0.027756493538618088, + 0.0027357812505215406, + -0.040665533393621445, + 0.0029608989134430885, + 0.015672314912080765, + -0.035826362669467926, + -0.026546701788902283, + -0.016277210786938667, + -0.04528474062681198, + 0.03714613616466522, + -0.013782013207674026, + 0.005804942920804024, + 0.015534837730228901, + -0.002600023290142417, + 0.02386591024696827, + -0.021363839507102966, + -0.03981317952275276, + -0.03703615441918373, + -0.012304142117500305, + 0.00568808801472187, + 0.012221655808389187, + -0.0020363698713481426, + 0.0007187440060079098, + 0.016345949843525887, + -0.020099056884646416, + 0.002792490180581808, + -0.018050657585263252, + -0.033159319311380386, + 0.0027082860469818115, + 0.012434744276106358, + -0.016510920599102974, + -0.005241289269179106, + 0.012792183086276054, + 0.03021732158958912, + 0.017074573785066605, + 0.024195853620767593, + 0.009334650821983814, + -0.03398417681455612, + -0.022862331941723824, + -0.021845007315278053, + -0.016153482720255852, + 0.00979519635438919, + -0.01358267292380333, + 0.020552728325128555, + -0.013843878172338009, + -0.015191147103905678, + 0.022876080125570297, + -0.01631845347583294, + -0.01211167499423027, + -0.047016944736242294, + 0.005172551143914461, + 0.004567654803395271, + -0.017363274469971657, + 0.03145461156964302, + 0.015012427233159542, + 0.006987240165472031, + -0.0026309555396437645, + -0.017294537276029587, + -0.024979470297694206, + 0.010028906166553497, + 0.02695913054049015, + 0.022367417812347412, + -0.008014876395463943, + 0.002512382110580802, + 0.008551035076379776, + 0.006808520760387182, + -0.001191748888231814, + -0.014015723019838333, + 0.015328623354434967, + -0.04074801877140999, + -0.014613745734095573, + 0.011135592125356197, + -0.00900470744818449, + -0.031152162700891495, + -0.008839735761284828, + 0.004883850459009409, + 0.02618926204741001, + 0.0200028233230114, + 0.001955602318048477, + 0.016222219914197922, + -0.017005836591124535, + 0.014929941855370998, + 0.000669338449370116, + -0.02264237031340599, + 0.006052400451153517, + 0.004110545851290226, + 0.007526835426688194, + -0.023247266188263893, + 0.010922503657639027, + 0.021473821252584457, + 0.027701502665877342, + 0.014998679980635643, + 0.003976506181061268, + 0.03288436681032181, + -0.028705080971121788, + 0.007616194896399975, + 0.026656681671738625, + 0.04616459086537361, + 0.0038046606350690126, + -0.0017064263811334968, + -0.026161767542362213, + 0.019494159147143364, + -0.010558190755546093, + -0.011444914154708385, + 0.006086769513785839, + -0.010633802972733974, + 0.02194124087691307, + -0.01846308633685112, + 0.02524067461490631, + 0.020786438137292862, + -0.016332201659679413, + 0.02165254019200802, + 0.005639971233904362, + 0.006705413572490215, + -0.045119769871234894, + 0.03758605942130089, + 0.01959039270877838, + -0.006389217916876078, + -0.004962899722158909, + 0.017596984282135963, + 0.0070869107730686665, + 0.015837285667657852, + -0.010118266567587852, + -0.03186703845858574, + 0.008296702988445759, + -0.004244585055857897, + -0.0064304606057703495, + -0.03337927907705307, + 0.0298323892056942, + -0.023494724184274673, + -0.029117511585354805, + -0.02930997870862484, + 0.014077587984502316, + 0.0017450916348025203, + 0.0010499763302505016, + -0.010991241782903671, + 0.024333329871296883, + -0.030354799702763557, + -0.022559884935617447, + -0.022477397695183754, + -0.0077467975206673145, + -0.052488505840301514, + 0.013005271553993225, + -0.015631072223186493, + 0.009424010291695595, + 0.051828619092702866, + 0.005055696237832308, + -0.003766854526475072, + 0.03670620918273926, + 0.003811534494161606, + -0.011018737219274044, + 0.029969865456223488, + -0.008729754015803337, + -0.009272785857319832, + -0.040390580892562866, + 0.03194952383637428, + 0.009039076045155525, + -0.003694679355248809, + 0.01993408426642418, + 0.013644536957144737, + 0.007000987883657217, + 0.030024854466319084, + -0.02007156051695347, + 0.013740770518779755, + 0.007953012362122536, + -0.02478700317442417, + -0.018243124708533287, + 0.012929659336805344, + -0.02172127738595009, + 0.021913744509220123, + 0.006433897651731968, + -0.032554421573877335, + -0.05413822457194328, + 0.017885684967041016, + 0.02755028009414673, + 0.05402824282646179, + 0.004371751099824905, + 0.005897739436477423, + -0.009822691790759563, + 0.008709132671356201, + -0.019507907330989838, + -0.03447909280657768, + -0.03161958232522011, + -0.003074317006394267, + -0.012228529900312424, + 0.013177117332816124, + -0.053230877965688705, + 0.021143877878785133, + 0.03967570140957832, + -0.005921797826886177, + 0.006045526824891567, + -0.025543123483657837, + 0.04047306627035141, + 0.021556306630373, + -0.022614875808358192, + -0.014833708293735981, + -0.019425421953201294, + -0.01151365227997303, + 0.017074573785066605, + 0.017981918528676033, + -0.014737474732100964, + -0.031674571335315704, + 0.019741617143154144, + 0.021473821252584457, + 0.0051862988620996475, + 0.013087757863104343, + 0.0015225516399368644, + -0.011238698847591877, + -0.025323161855340004, + -0.01629095897078514, + 0.028842557221651077, + -0.026766663417220116, + 0.006636675447225571, + 0.003218667348846793, + 0.01618097722530365, + 0.028031446039676666, + -0.0158647820353508, + 0.01484745554625988, + -0.02400338649749756, + 0.015961015596985817, + 0.0069219390861690044, + -0.002687664469704032, + 0.014325045049190521, + 0.014998679980635643, + -0.0016600280068814754, + 0.03249943256378174, + -0.026161767542362213, + 0.0004712864465545863, + 0.03120715357363224, + 0.015672314912080765, + -0.015768548473715782, + -0.01857306808233261, + 0.010675045661628246, + -0.019384179264307022, + 0.008812240324914455, + 0.02053898014128208, + -0.008956590667366982, + -0.015026175417006016, + -0.0008759826887398958, + -0.0031653952319175005, + 0.008564782328903675, + -0.015301127918064594, + -0.0029213745146989822, + -0.03175705671310425, + 0.020305270329117775, + -0.005299716722220182, + -0.007636816240847111, + 0.011871091090142727, + 0.034836530685424805, + 0.004062429070472717, + 0.023151032626628876, + 0.008468548767268658, + -0.016730884090065956, + -0.005024764221161604, + 0.013507060706615448, + 0.002534721978008747, + -0.002854354679584503, + -0.01151365227997303, + -0.013823256827890873, + -0.05378078296780586, + 0.0012759532546624541, + 0.037751030176877975, + 0.022559884935617447, + -0.024800751358270645, + -0.03692617267370224, + -0.013170243240892887, + -0.03505649417638779, + 0.026340486481785774, + -0.030767228454351425, + 0.007884274236857891, + -0.0072312611155211926, + 0.032801877707242966, + 0.003746233182027936, + -0.0002294138103025034, + 0.02113012969493866, + 0.007574952207505703, + 0.003701553214341402, + -0.007155648898333311, + 0.009884556755423546, + -0.004306449554860592, + 0.0006311028264462948, + 0.00568808801472187, + -0.004828860051929951, + -0.020195290446281433, + -0.006303295027464628, + -0.012654706835746765, + 0.003359580645337701, + 0.03288436681032181, + -0.023989640176296234, + 0.0028509178664535284, + -0.031922031193971634, + -0.038768358528614044, + 0.0010585685959085822, + 0.00603865273296833, + 0.0008347397670149803, + 0.0031739873811602592, + 0.0013996820198372006, + 0.03676120191812515, + -0.014311297796666622, + -0.0036396889481693506, + 0.015768548473715782, + -0.01783069409430027, + 0.018971748650074005, + -0.003397386521100998, + -0.006756967399269342, + -0.016730884090065956, + -0.01783069409430027, + -0.008626647293567657, + -0.020758943632245064, + -0.015562333166599274, + -0.015672314912080765, + -0.06279923766851425, + -0.009774575009942055, + -0.027825232595205307, + 0.0009460097644478083, + 0.0075818258337676525, + -0.019535401836037636, + -0.02295856550335884, + 0.02169378288090229, + -0.0008678200538270175, + 0.0462745726108551, + 0.02264237031340599, + -0.03643125668168068, + 0.014215064235031605, + -0.01930169202387333, + -0.01246223971247673, + -0.016098491847515106, + -0.021432576701045036, + 0.0007333509274758399, + -0.000859227788168937, + 0.002582838758826256, + -0.0008716865559108555, + -0.011809226125478745, + -0.012022314593195915, + -0.010248868726193905, + -0.0037702915724366903, + 0.006354848388582468, + -0.00996704213321209, + 0.006237993482500315, + 0.011809226125478745, + -0.009630224667489529, + -0.005588417407125235, + 0.009204047732055187, + -0.000400829769205302, + -0.012414122931659222, + 0.032032012939453125, + -0.00023091745970305055, + 0.030272312462329865, + -0.0002255472936667502, + 0.0016591688618063927, + -0.0016729164635762572, + 0.005829001311212778, + -0.01607099547982216, + -0.025914309546351433, + -0.03541393205523491, + 0.010035780258476734, + 5.3835989092476666e-05, + 0.0038871464785188437, + -0.019384179264307022, + 0.03511148318648338, + 0.049931444227695465, + 0.02815517596900463, + 0.016937097534537315, + -0.016689639538526535, + -0.00252269278280437, + -0.012530977837741375, + -0.0387408621609211, + -0.03018982708454132, + -0.016304707154631615, + -0.00504538556560874, + -0.0033612989354878664, + 0.00568808801472187, + -0.007093784399330616, + 0.023920901119709015, + 0.020621467381715775, + -0.017596984282135963, + -0.01751449890434742, + -0.010145762003958225, + -0.03758605942130089, + 0.005303153768181801, + -0.0016866640653461218, + -0.0029608989134430885, + -0.032939355820417404, + -0.02137758769094944, + 0.012166664935648441, + 0.03524896129965782, + -0.017926927655935287, + 0.007141901180148125, + 0.0024230224080383778, + 0.009485874325037003, + 0.024470806121826172, + 0.011974197812378407, + 0.0017227516509592533, + -0.03258191794157028, + -0.004248022101819515, + 0.01930169202387333, + 0.007135027553886175, + -0.016648396849632263, + -0.0196866262704134, + 0.0016299551352858543, + 0.01388512086123228, + 0.0387408621609211, + 0.013713275082409382, + 0.021212615072727203, + 0.01319773867726326, + 0.004430178552865982, + -0.005138182081282139, + 0.0006366877933032811, + 0.03538643568754196, + -0.00874350219964981, + 0.015892276540398598, + 0.0008136886754073203, + -0.007836157456040382, + -0.0177619569003582, + -0.005402824375778437, + 0.03159208595752716, + 0.019631635397672653, + -0.03819095715880394, + -0.036101315170526505, + 0.016414687037467957, + -0.024718264117836952, + -0.01053069531917572, + 0.004237711429595947, + 0.010455083101987839, + 0.0006856637774035335, + 0.002974646631628275, + -0.02587306685745716, + -0.0016643241979181767, + 0.0033681727945804596, + 0.02720658853650093, + 0.018050657585263252, + -0.015823539346456528, + 0.01593351922929287, + 0.029859883710741997, + -0.009685215540230274, + 0.019576646387577057, + -0.06257927417755127, + 0.002844044007360935, + 0.0017253293190151453, + 0.02200997807085514, + 0.01961788907647133, + 0.002550187986344099, + -0.0023989640176296234, + -0.00569496164098382, + -0.01769321784377098, + 0.010070149786770344, + -0.022628622129559517, + -0.015782296657562256, + 0.00513474503532052, + 0.01568606309592724, + 0.007829283364117146, + -0.005602165125310421, + -0.020016569644212723, + 0.02941995859146118, + -0.032279469072818756, + 0.013177117332816124, + 0.01943916827440262, + 0.011802352964878082, + -0.010448209941387177, + -0.024484554305672646, + 0.0015612168936058879, + -0.028760071843862534, + -0.002153224777430296, + 0.00209307880140841, + 0.0020449620205909014, + -0.010888134129345417, + -0.04355253651738167, + 0.029364967718720436, + 0.010620055720210075, + 0.008688511326909065, + -0.009155930951237679, + -0.0050213271751999855, + -0.018023161217570305, + 0.0285676047205925, + -0.012063558213412762, + -0.009905178099870682, + 0.01246223971247673, + -0.010290111415088177, + 0.02777024172246456, + 0.013438322581350803, + -0.014008849859237671, + 0.02772899903357029, + -0.01263408549129963, + 0.0044473628513514996, + 0.010379471816122532, + 0.03373672068119049, + 0.0008360286010429263, + 0.028980033472180367, + -0.0026859459467232227, + -0.010241994634270668, + -0.03302184119820595, + -0.026546701788902283, + -0.009059697389602661, + 0.017569489777088165, + 0.02558436617255211, + -0.008241713047027588, + -0.027110354974865913, + 0.0017665723571553826, + -0.0012175258016213775, + 0.015521090477705002, + 0.017115816473960876, + 0.04671449586749077, + 0.013837004080414772, + 0.01509491354227066, + -0.001383356750011444, + 0.0014323326759040356, + 0.001536299241706729, + 0.01803690940141678, + 0.023439733311533928, + -0.038273442536592484, + -0.0033131823875010014, + 0.0025639357045292854, + -0.03222448006272316, + -0.0066160536371171474, + -0.04292014613747597, + -0.005959603935480118, + -0.031262144446372986, + -0.0013300846330821514, + -0.02955743484199047, + 0.014737474732100964, + -0.00021308848226908594, + 0.014668736606836319, + 0.03082221932709217, + -0.020401503890752792, + -0.002780460985377431, + 0.025350656360387802, + 0.021776268258690834, + 0.019150469452142715, + -0.008963463827967644, + 0.008612899109721184, + 0.013754517771303654, + -0.016414687037467957, + 0.02352221868932247, + 0.012661580927670002, + 0.01453126035630703, + -3.305341670056805e-05, + -0.047016944736242294, + 0.008454801514744759, + -0.013252729550004005, + 0.01765197515487671, + ], + "index": 86, + }, + { + "title": "Joshua Gregory", + "text": "Joshua Gregory (1790 \u2013 20 August 1838) was an early settler in colonial Western Australia. Two of his sons, Augustus Charles and Francis Thomas, became renowned Australian explorers.Joshua Gregory entered the army in 1805 as an ensign in the 78th Highlanders (Ross-shire Buffs). At the age of 16 he saw active service when his regiment was sent to Sicily at the height of the Napoleonic Wars.", + "vector": [ + 0.037484049797058105, + 0.012617848813533783, + -0.019056489691138268, + -0.029858311638236046, + -0.04968523606657982, + 0.047358203679323196, + 0.036855123937129974, + -0.0008225186611525714, + -0.035848841071128845, + 0.008038473315536976, + -0.07194925099611282, + 0.025047019124031067, + 0.03226395696401596, + 0.033396024256944656, + 0.025597330182790756, + 0.0340563990175724, + -0.031210504472255707, + 0.029040705412626266, + 0.014646138064563274, + 0.0196854155510664, + 0.040377113968133926, + -0.02231118641793728, + 0.022358356043696404, + -0.007087221369147301, + 0.10320692509412766, + 0.004068371839821339, + 0.007767248898744583, + 0.023883504793047905, + -0.03716958686709404, + 0.00625389302149415, + 0.030078435316681862, + 0.022075338289141655, + 0.03638342767953873, + -0.014072242192924023, + -0.012531370855867863, + -0.01423733588308096, + -0.008121020160615444, + -0.011996783316135406, + 0.0055070421658456326, + -0.01704392209649086, + 0.05286131799221039, + -0.05191792547702789, + 0.018175991252064705, + 0.028333162888884544, + -0.005444149486720562, + 0.001307971659116447, + -0.022625649347901344, + -0.020361512899398804, + -0.05883612483739853, + -0.00017627154011279345, + -0.03437086194753647, + -0.0022877221927046776, + -0.02176087535917759, + 0.0027456595562398434, + -0.012405585497617722, + -0.03465387970209122, + 0.02908787503838539, + 0.08547118306159973, + 0.01650933548808098, + 0.01500777155160904, + 0.0050117624923586845, + 0.00325273210182786, + -0.019465291872620583, + 0.016808075830340385, + 0.02982686460018158, + -0.012452755123376846, + 0.07232660800218582, + 0.034024953842163086, + -0.056163184344768524, + -0.0011713765561580658, + 0.04748399183154106, + -0.016792351379990578, + 0.11974770575761795, + 0.04113182798027992, + 0.0054520112462341785, + -0.019905541092157364, + 0.04732675850391388, + 0.03198093920946121, + -0.02349042519927025, + 0.013380422256886959, + 0.05556570366024971, + -0.03625764325261116, + -0.00842762179672718, + 0.022452695295214653, + 0.005943360272794962, + 0.0019084004452452064, + -0.01237413939088583, + -0.07081718742847443, + 0.012861558236181736, + -0.030235666781663895, + 0.013859979808330536, + -0.004276704043149948, + 0.02573883906006813, + -0.022264016792178154, + 0.012209045700728893, + 0.021525027230381966, + 0.049182094633579254, + -0.009363151155412197, + 0.001887763850390911, + -0.044999729841947556, + -0.07043983042240143, + -0.029763972386717796, + -0.022798605263233185, + 0.0041116103529930115, + 0.028160206973552704, + -0.024135075509548187, + 0.0014583246083930135, + -0.01624204032123089, + 0.05949649587273598, + 0.06691783666610718, + 0.036949463188648224, + 0.009433905594050884, + -0.04424501582980156, + -0.0013983799144625664, + 0.013797086663544178, + -0.01938667520880699, + -0.006293200887739658, + -0.0032271817326545715, + 0.045094069093465805, + -0.020094219595193863, + -0.01115559320896864, + 0.020361512899398804, + -0.012350554578006268, + -0.03908781334757805, + -0.004449658561497927, + -0.05132044479250908, + 0.010809683240950108, + 0.08402465283870697, + 0.04858461394906044, + 0.019921263679862022, + -0.03644632175564766, + 0.013993626460433006, + -0.03754694387316704, + -0.009654030203819275, + 0.02048729732632637, + -0.02982686460018158, + 0.036037519574165344, + 0.0021678328048437834, + 0.016886690631508827, + 0.04088025540113449, + -0.02103760838508606, + -0.05128899961709976, + 0.02556588314473629, + 0.014119411818683147, + -0.0019477084279060364, + -0.033490363508462906, + 0.020188556984066963, + 0.0017678745789453387, + -0.02628915011882782, + -0.039024922996759415, + -0.050439946353435516, + 0.03446520119905472, + 0.004394627641886473, + 0.005990529898554087, + 0.005841159727424383, + -0.009756230749189854, + -0.025219973176717758, + -0.02955957129597664, + -0.007759387139230967, + -0.00830183643847704, + 0.008710639551281929, + 0.0002454289351589978, + 0.0001089566940208897, + 0.032672759145498276, + 0.0074645779095590115, + -0.009213780984282494, + 0.016823798418045044, + -0.03199666365981102, + 0.024999849498271942, + 0.023065898567438126, + -0.021163394674658775, + -0.004276704043149948, + -0.0253929290920496, + -0.017609957605600357, + -0.006088799796998501, + -0.03028283640742302, + -0.011045531369745731, + 0.037106696516275406, + 0.00652511790394783, + -0.02174515277147293, + -0.012767218984663486, + -0.03232685104012489, + 0.03289288282394409, + -0.013679162599146366, + -0.014355259947478771, + -0.013985765166580677, + 0.04911920055747032, + 0.02682373858988285, + -0.0008696881704963744, + 0.020330065861344337, + 0.004280634690076113, + 0.007358446251600981, + -0.01114773191511631, + 0.03418218344449997, + 0.04613179713487625, + 0.02665078267455101, + 0.05128899961709976, + 0.012900865636765957, + -0.04405633732676506, + -0.009984216652810574, + 0.011965337209403515, + -0.04245257377624512, + -0.004669783171266317, + -0.006474017631262541, + 0.009245227091014385, + -0.030345728620886803, + 0.041823647916316986, + -0.00480736093595624, + -0.010754652321338654, + -0.010841129347682, + 0.004665852524340153, + -0.020786037668585777, + 0.005467734299600124, + -0.008278251625597477, + -0.0017767188837751746, + 0.021776597946882248, + 0.062326669692993164, + 0.0040290639735758305, + 0.03940228000283241, + 0.05006259307265282, + 0.006430779118090868, + 0.0424211286008358, + 0.03798719123005867, + -0.03569160774350166, + 0.02276715822517872, + 0.039748188108205795, + -0.03855322673916817, + 0.008812840096652508, + -0.0029087874572724104, + -0.04786134883761406, + 0.015565943904221058, + 0.05610029026865959, + -0.006513325497508049, + 0.004378904588520527, + -0.05654054135084152, + 0.0270124152302742, + 0.023600487038493156, + 0.03933938592672348, + 0.056068845093250275, + -0.02476400136947632, + 0.00330972857773304, + 0.01500777155160904, + -0.021682258695364, + -0.030330006033182144, + 0.04031422361731529, + 0.04886763170361519, + -0.03996831178665161, + -0.03553437814116478, + -0.009017241187393665, + -0.0031682199332863092, + 0.0005306571838445961, + -0.026509273797273636, + -0.012531370855867863, + -0.0422324500977993, + -0.04235823452472687, + -0.006536910310387611, + -0.015723176300525665, + 0.04459092766046524, + 0.038930583745241165, + 0.012067537754774094, + 0.0005915844812989235, + -0.0003034081601072103, + 0.01795586757361889, + -0.011320686899125576, + -0.025896070525050163, + -0.03704380244016647, + -0.025172803550958633, + 0.007071498315781355, + -0.0012529406230896711, + -0.006713795941323042, + -0.006057353690266609, + -0.013529792428016663, + -0.05110032111406326, + -0.007252315059304237, + -0.008553408086299896, + -0.01822316087782383, + -0.04179220274090767, + -0.03166647627949715, + -0.013789225369691849, + -0.007126529235392809, + 0.045565761625766754, + -0.0612574927508831, + -0.020707422867417336, + -0.056603431701660156, + 0.025880347937345505, + 0.04028277471661568, + -0.03361615166068077, + 0.03977963328361511, + 0.021462135016918182, + -0.03600607439875603, + -0.020188556984066963, + -0.015652421861886978, + -0.0007276882533915341, + -0.009488936513662338, + -0.040094099938869476, + -0.0424211286008358, + -0.03625764325261116, + -0.03333313390612602, + -0.04562865570187569, + -0.03852178156375885, + 0.04893052205443382, + -0.014205889776349068, + -0.02276715822517872, + 0.01051880419254303, + -0.0053969803266227245, + -0.019999880343675613, + -0.007578570861369371, + -0.050974536687135696, + 0.03465387970209122, + -0.058804675936698914, + 0.002049908973276615, + -0.009127303957939148, + -0.00718156062066555, + -0.002297549042850733, + -0.01345903892070055, + -0.02210678532719612, + 0.03238974139094353, + 0.018883533775806427, + -0.04207521677017212, + -0.008262529037892818, + 0.017091091722249985, + -6.645498797297478e-05, + -0.021697983145713806, + -0.046823617070913315, + -0.012248354032635689, + -0.03117905743420124, + -0.022908667102456093, + -0.024701109156012535, + -0.03833310306072235, + 0.0006849408382549882, + 0.012727910652756691, + -0.022091062739491463, + 0.007334861438721418, + 0.005070724058896303, + 0.015833238139748573, + -0.027232540771365166, + -0.016163425520062447, + 0.08188629895448685, + 0.008820701390504837, + 0.0018189748516306281, + 0.0013826567446812987, + 0.0024252999573946, + 0.023065898567438126, + 0.044811051338911057, + -0.01591971516609192, + 0.00619100034236908, + 0.06018831580877304, + 0.025047019124031067, + 0.02029862068593502, + -0.017059646546840668, + 0.0006682349485345185, + 0.022625649347901344, + -0.014355259947478771, + 0.010251510888338089, + 0.004021202214062214, + -0.005927637219429016, + 0.03361615166068077, + -0.04015699028968811, + 0.03732682019472122, + 0.008954348973929882, + 0.009143026545643806, + -0.005554211791604757, + -0.01037729624658823, + 0.07251528650522232, + 0.015282927080988884, + -0.029119322076439857, + 0.025219973176717758, + -0.046006012707948685, + -0.031870875507593155, + -0.004040856380015612, + -0.005263333208858967, + 0.07547124475240707, + -0.00657621817663312, + -0.00723266089335084, + -0.009937047027051449, + -0.007716148626059294, + -0.05260974541306496, + 0.0007782971952110529, + 0.0011576188262552023, + -0.023144515231251717, + 0.02783002145588398, + 0.002865548711270094, + -0.0031092579010874033, + -0.008757809177041054, + 0.03471677377820015, + -0.03547148406505585, + -0.05537702515721321, + -0.0227357130497694, + 0.021713705733418465, + 0.0073466538451612, + -0.015424435026943684, + 0.07043983042240143, + 0.058867570012807846, + 0.008576991967856884, + 0.017169708386063576, + 0.004245257470756769, + 0.005935498978942633, + 0.03644632175564766, + 0.007912687957286835, + 0.015896130353212357, + 0.012405585497617722, + -0.05257830023765564, + -0.0015123729826882482, + 0.034307967871427536, + 0.005974806845188141, + 0.02122628688812256, + -0.04940221831202507, + 0.03798719123005867, + 0.035219915211200714, + -0.039936866611242294, + 0.004044787026941776, + 0.012940173968672752, + -0.041006043553352356, + 0.009638306684792042, + -0.0031230158638209105, + -0.01191816758364439, + 0.004878115374594927, + 0.047012295573949814, + -0.01514141820371151, + 0.026241980493068695, + 0.002244483446702361, + 0.013529792428016663, + -0.023726271465420723, + 0.019638245925307274, + 0.0017560821725055575, + 0.03496834263205528, + 0.0135062076151371, + 0.03515702113509178, + 0.016029777005314827, + -0.004492897540330887, + 0.01849045418202877, + -0.003541645361110568, + -0.012971620075404644, + 0.05666632577776909, + -0.02157219685614109, + -0.010306541807949543, + -0.02600613236427307, + -0.015762483701109886, + -0.0018582828342914581, + 0.010495220310986042, + -0.029024982824921608, + 0.024056458845734596, + -0.040660131722688675, + -0.013993626460433006, + -0.02855328656733036, + -0.03191804513335228, + -0.07232660800218582, + 0.00905654951930046, + 0.010102140717208385, + 0.043364517390728, + 0.0030267112888395786, + 0.03952806442975998, + 0.02674512192606926, + -0.029591016471385956, + -0.01382853277027607, + -0.06440212577581406, + -0.006328578107059002, + 0.01856907084584236, + -0.04323873296380043, + 0.029936926439404488, + 0.015440158545970917, + 0.0015516809653490782, + 0.04688651114702225, + -0.04062868654727936, + 0.035314254462718964, + -0.03814442455768585, + -0.0007252314826473594, + -0.0311947800219059, + -0.037012357264757156, + -0.0009640271891839802, + -0.022091062739491463, + 0.006403263192623854, + -0.027877191081643105, + 0.0505971796810627, + 0.009764092043042183, + -0.012130429968237877, + -0.012680741026997566, + 0.022452695295214653, + 0.03751549869775772, + -0.010668174363672733, + 0.008647746406495571, + 0.020251451060175896, + 0.005133616738021374, + 0.028238823637366295, + 0.015927577391266823, + -0.022892944514751434, + 0.02248414047062397, + 0.0009542002226226032, + -0.054905328899621964, + 0.006902473978698254, + -0.04396199807524681, + 0.03389916568994522, + -0.024150798097252846, + 0.008136743679642677, + -0.020786037668585777, + -0.01811309903860092, + -0.018065929412841797, + 0.011312824673950672, + 0.025597330182790756, + -0.03399350494146347, + -0.019528184086084366, + -0.00024555178242735565, + 0.06367886066436768, + -0.025958962738513947, + 0.041477736085653305, + -0.006529048550873995, + -0.04452803358435631, + 0.036572106182575226, + -0.014253058470785618, + -0.005786128807812929, + -0.047546882182359695, + 0.004575444385409355, + 0.002682766877114773, + -0.01205181423574686, + -0.009889877401292324, + -0.0030345728155225515, + 0.012083260342478752, + 0.06584866344928741, + -0.0011291205883026123, + 0.016100531443953514, + -0.03509412705898285, + 0.03342747315764427, + -0.03808153048157692, + 0.0016922068316489458, + 0.012751495465636253, + -0.034024953842163086, + 0.026792291551828384, + 0.03644632175564766, + -0.06823858618736267, + 0.0342450775206089, + 0.016745181754231453, + 0.00625389302149415, + -0.03619474917650223, + 0.03981108218431473, + 0.019150828942656517, + 0.014803370460867882, + 0.012224769219756126, + 0.02946523204445839, + -0.01028295699506998, + -0.01957535371184349, + 0.0038757629226893187, + -0.008136743679642677, + 0.02646210417151451, + -0.014473183080554008, + 0.016619397327303886, + 0.010809683240950108, + -0.012908726930618286, + -0.004669783171266317, + 0.007032190449535847, + -0.004744468256831169, + 0.021870937198400497, + -0.049465112388134, + -0.02113194763660431, + -0.025314312428236008, + 0.04738965258002281, + -0.015723176300525665, + -0.032138172537088394, + 0.06767255067825317, + -0.00695357471704483, + -0.04720097407698631, + 0.0192137211561203, + -0.02874196507036686, + -0.02067597582936287, + -0.02781429886817932, + 0.007087221369147301, + 0.03540859371423721, + -0.0348111130297184, + 0.04251546785235405, + -0.0384274423122406, + 0.016808075830340385, + -0.01060528215020895, + -0.018537623807787895, + -0.01676090620458126, + -0.010793960653245449, + 0.007665048353374004, + -0.025345759466290474, + 0.032672759145498276, + -0.01571531407535076, + 0.015031356364488602, + -0.010102140717208385, + 0.00806598924100399, + -0.02665078267455101, + -0.008632023818790913, + 0.035943180322647095, + 0.002818379318341613, + -0.00816032849252224, + -0.006513325497508049, + -0.013246775604784489, + 0.04543997719883919, + -0.056068845093250275, + -0.08326993882656097, + -0.024638216942548752, + 0.03616330400109291, + 0.015801791101694107, + -0.0023034452460706234, + 0.0174998939037323, + -0.027138201519846916, + 0.0032900746446102858, + 0.01238200068473816, + -0.006171346642076969, + 0.04588022828102112, + -0.00030881300335749984, + 0.03081742487847805, + -0.0194023996591568, + -0.016792351379990578, + -0.017814358696341515, + 0.0030031264759600163, + 0.02185521461069584, + 0.008038473315536976, + -0.036760784685611725, + 0.019999880343675613, + -0.01784580387175083, + 0.0010878472821787, + -0.015290788374841213, + 0.008018819615244865, + 0.004752330016344786, + 0.015094248577952385, + 0.016257762908935547, + 0.040377113968133926, + 0.0043278043158352375, + -0.004917423240840435, + -0.02937089279294014, + 0.035597268491983414, + -0.011139869689941406, + 0.012098983861505985, + 0.0013600547099485993, + -0.03108471818268299, + -0.019370952621102333, + 0.012680741026997566, + 0.031068995594978333, + -0.0340563990175724, + 0.0010947261471301317, + -0.04154063016176224, + -0.007590363267809153, + -0.028804857283830643, + 0.01005497109144926, + 0.032861437648534775, + 0.000349103647749871, + 0.04025132954120636, + -0.004339596722275019, + -0.022264016792178154, + 0.02421369031071663, + -0.003954378888010979, + 0.0005321312346495688, + -0.009685476310551167, + -0.008270390331745148, + -0.016996752470731735, + -0.011768797412514687, + -0.009952770546078682, + 0.0270124152302742, + 0.005161132663488388, + -0.023018728941679, + 0.020597361028194427, + -0.016839521005749702, + -0.031399182975292206, + -0.028773412108421326, + -0.05147767812013626, + -0.018474731594324112, + 0.01948101446032524, + -0.005176855716854334, + -0.010911883786320686, + -0.04433935508131981, + -0.03009415790438652, + 0.035943180322647095, + -0.026446381583809853, + 0.010888298973441124, + -0.04415067657828331, + -0.024260859936475754, + 0.0458487793803215, + -0.026179088279604912, + 0.010125725530087948, + -0.04216955602169037, + -0.014292366802692413, + -0.018175991252064705, + 0.020235726609826088, + 0.0176885724067688, + -0.01814454421401024, + -0.04893052205443382, + -0.022547034546732903, + 0.015746761113405228, + 0.06572287529706955, + -0.03663500025868416, + -0.00852196104824543, + 0.002116732532158494, + -0.009858431294560432, + -0.0017865458503365517, + -0.0036536729894578457, + -0.02374199591577053, + 0.005711443722248077, + 0.0015054941177368164, + 0.005157201550900936, + 0.04993680492043495, + -0.012963758781552315, + -0.003783389227464795, + -0.025581607595086098, + 0.02955957129597664, + -0.004076233133673668, + -0.035219915211200714, + -0.05767260864377022, + -0.05650909245014191, + -0.032232511788606644, + 0.019103659316897392, + 0.011438610032200813, + 0.002971680136397481, + 0.018521901220083237, + -0.0030168844386935234, + -0.005251540802419186, + -0.015314373187720776, + -0.005841159727424383, + -0.03465387970209122, + -0.007417408283799887, + 0.030204221606254578, + -0.04525129869580269, + 0.01028295699506998, + -0.03254697471857071, + -0.062043651938438416, + 0.015613113529980183, + -0.03264131397008896, + -0.009748369455337524, + 0.01138357911258936, + 0.008922901935875416, + 0.019543906673789024, + 0.01776718907058239, + -0.03333313390612602, + 0.00015514352708123624, + 0.04525129869580269, + -0.01305023580789566, + -0.026682229712605476, + 0.017657127231359482, + 0.013097405433654785, + -0.0015487328637391329, + -0.026760844513773918, + 0.0024881926365196705, + 0.001653881510719657, + -0.029150767251849174, + -0.006867097225040197, + -0.002657216740772128, + 0.005542419385164976, + -0.007798695005476475, + 0.003830558620393276, + 0.018427561968564987, + 0.02575456164777279, + 0.011501503176987171, + -0.06053422763943672, + -0.0032763166818767786, + 0.007244453299790621, + 0.008797116577625275, + -0.03716958686709404, + -0.013946456834673882, + -0.013270360417664051, + -0.013608409091830254, + -0.03506268188357353, + -0.024732556194067, + -0.01291658915579319, + -0.03333313390612602, + -0.0085140997543931, + -0.014213751070201397, + -0.026131918653845787, + 0.005664274096488953, + 0.01911938190460205, + 0.02882058173418045, + 0.010503081604838371, + 0.003272386034950614, + 0.0426098071038723, + 0.002751555759459734, + 0.0349997878074646, + 0.02103760838508606, + 0.000539501488674432, + -0.006702003534883261, + -0.018506178632378578, + -0.03143062815070152, + -0.022814327850937843, + 0.00915875006467104, + -0.006324647460132837, + 0.046634938567876816, + -0.006584079936146736, + 0.010479496791958809, + -0.001222476945258677, + -0.015157141722738743, + -0.02493695728480816, + -0.03345891833305359, + 0.014921293593943119, + -0.00029480954981409013, + 0.013970041647553444, + 0.01621059514582157, + -0.000134875372168608, + 0.040188439190387726, + 0.0037676659412682056, + -0.025455821305513382, + -0.020503021776676178, + -0.001347279641777277, + -0.007307345978915691, + -0.0420437715947628, + -0.008113158866763115, + 0.023396085947752, + 0.009465351700782776, + 0.015251480974256992, + 0.0097011998295784, + -0.01580965332686901, + -0.00838045310229063, + 0.019166551530361176, + -0.000332152092596516, + -0.03628908842802048, + 0.03207527846097946, + -0.03371048718690872, + -0.010817544534802437, + -0.00348071800544858, + 0.03455954045057297, + -0.03327023983001709, + 0.019921263679862022, + 0.01759423315525055, + 0.013718470931053162, + 0.012499924749135971, + 0.0018229057313874364, + 0.005440218839794397, + -0.0029009259305894375, + -0.011462194845080376, + 0.007043982855975628, + -0.03273565322160721, + -0.01913510449230671, + -0.03264131397008896, + 0.004952800460159779, + -0.012877280823886395, + -0.003848247230052948, + 0.040094099938869476, + 0.01260212529450655, + -0.0006240135408006608, + -0.011391440406441689, + 0.013875702396035194, + 0.0028026560321450233, + -0.02194955386221409, + -0.02820737659931183, + -0.055156901478767395, + -0.010314403101801872, + 0.009127303957939148, + 0.04207521677017212, + -0.019103659316897392, + 0.014567522332072258, + 0.027436941862106323, + 0.05260974541306496, + -0.007224799133837223, + -0.014748338609933853, + 0.018364669755101204, + -0.02212250791490078, + -0.0176885724067688, + 0.018097374588251114, + 0.008081712760031223, + -0.02518852800130844, + -0.024795448407530785, + -0.008687054738402367, + 0.0059197754599153996, + 0.01522789616137743, + -0.021242011338472366, + 0.04267269745469093, + -0.0055974507704377174, + -0.010660313069820404, + 0.0042413268238306046, + -0.001965397037565708, + -0.041477736085653305, + -0.018521901220083237, + 0.01159584242850542, + -0.004724814556539059, + -0.009449629113078117, + 0.011171316727995872, + 0.025534437969326973, + -0.03490544855594635, + 0.022499864920973778, + -0.017531340941786766, + -0.027263985946774483, + 0.0074881622567772865, + 0.01776718907058239, + -0.004551859572529793, + -0.017201153561472893, + -0.039559509605169296, + 0.027311155572533607, + 0.03471677377820015, + -0.02338036149740219, + 0.003696911735460162, + 0.009473212994635105, + -0.03716958686709404, + -0.013616270385682583, + -0.025408651679754257, + -0.039748188108205795, + 0.027531281113624573, + 0.03232685104012489, + 0.006187069695442915, + 0.025896070525050163, + 0.006116315256804228, + 0.01427664328366518, + 0.013899287208914757, + -0.018474731594324112, + 0.030502961948513985, + -0.025958962738513947, + -0.015581667423248291, + -0.025628777220845222, + 0.03080170229077339, + 0.0023977842647582293, + -0.013168159872293472, + -0.027342602610588074, + -0.014575383625924587, + 0.001549715525470674, + 0.009795538149774075, + 0.010243648663163185, + 0.02493695728480816, + 0.021509304642677307, + 0.002433161484077573, + 0.059056248515844345, + 0.004744468256831169, + -0.00010152503818972036, + 0.03045579232275486, + 0.004677644930779934, + 0.03528280556201935, + -0.042012326419353485, + 0.027625620365142822, + -0.012256215326488018, + -0.018521901220083237, + -0.06660337001085281, + 0.03018849715590477, + 0.004646198358386755, + 0.00711866794154048, + 0.017295492812991142, + -0.04025132954120636, + -0.04760977625846863, + 0.02094327099621296, + -0.007948065176606178, + -0.014205889776349068, + -0.020833207294344902, + -0.022877220064401627, + 0.05566004291176796, + 0.03465387970209122, + 0.012012505903840065, + 0.012492063455283642, + -0.03506268188357353, + -0.005279056262224913, + -0.00852196104824543, + -0.009143026545643806, + 0.022248294204473495, + 0.023962119594216347, + 0.010330126620829105, + 0.001905452343635261, + 0.0133646996691823, + -0.025817453861236572, + -0.001991929719224572, + -0.00842762179672718, + -0.022169677540659904, + 0.04349030554294586, + -0.008993656374514103, + 0.025408651679754257, + -0.010031386278569698, + 0.0008922902052290738, + 0.058238644152879715, + -0.001695154933258891, + -0.015848960727453232, + -0.0012264077086001635, + -0.010676036588847637, + 0.043175842612981796, + -0.005231886636465788, + -0.0014622553717345, + 0.019559631124138832, + 0.021100502461194992, + -0.013616270385682583, + 0.022043893113732338, + -0.009882016107439995, + -0.002385991858318448, + 0.005381256807595491, + 0.006069145631045103, + -0.0036733269225806, + 0.0016607604920864105, + -0.03336457908153534, + 0.00996849313378334, + -0.011234208941459656, + -0.003582918783649802, + -0.014355259947478771, + 0.005157201550900936, + -0.0190250426530838, + 0.040471453219652176, + -0.016918137669563293, + 0.03833310306072235, + -0.009858431294560432, + -0.01059742085635662, + -0.0024135075509548187, + 0.011312824673950672, + -0.05411916971206665, + 0.00929239671677351, + 0.03352181240916252, + 0.009654030203819275, + -0.016525058075785637, + 0.04452803358435631, + 0.008136743679642677, + 0.006823858246207237, + -0.05981096252799034, + 0.01590399257838726, + 0.00580578250810504, + -0.04742109775543213, + -0.026069024577736855, + -0.01831750012934208, + -0.03427652269601822, + 0.00016030269034672529, + 0.025235697627067566, + -0.007016467396169901, + 0.016289209946990013, + 0.05720091238617897, + -0.000616151955910027, + -0.043647535145282745, + 0.006014114711433649, + -0.013176021166145802, + 0.0016882759518921375, + -0.00117334199603647, + -0.0006525117787532508, + -0.012004644609987736, + 0.03028283640742302, + -0.07786116749048233, + 0.016430718824267387, + -0.03282999247312546, + 0.010416603647172451, + -0.02775140479207039, + 0.023883504793047905, + 0.014646138064563274, + 0.007397754117846489, + 0.007185491267591715, + -0.009048687294125557, + -0.040660131722688675, + -0.005852952133864164, + 0.016650842502713203, + -0.032578419893980026, + 0.010856852866709232, + -0.03679222986102104, + 0.0007468508556485176, + 0.0029598877299576998, + 0.04842738062143326, + 0.018364669755101204, + -0.007955927401781082, + 0.01666656695306301, + -0.005845090374350548, + -0.007122598588466644, + 0.02584890089929104, + 0.011808104813098907, + 0.00905654951930046, + -0.0018258538329973817, + 0.04213811084628105, + 0.031682200729846954, + 0.008529823273420334, + -0.019559631124138832, + 0.0001396660227328539, + -0.060408443212509155, + 0.0037696314975619316, + -0.007590363267809153, + 0.011242070235311985, + -0.018977873027324677, + -0.002627735724672675, + 0.012727910652756691, + -0.0004918405902571976, + -0.03055012971162796, + -0.026352042332291603, + -0.04069158062338829, + 0.04559721052646637, + -0.02564449980854988, + -0.03026711381971836, + -0.006344301626086235, + 0.00187597144395113, + -0.011815967038273811, + 0.019606800749897957, + 0.020361512899398804, + -0.027263985946774483, + 0.023977842181921005, + -0.013962180353701115, + 0.01866341009736061, + 0.012421309016644955, + 0.01712253876030445, + -0.013962180353701115, + -0.031116165220737457, + 4.382221231935546e-05, + -0.042106665670871735, + 0.0023800956550985575, + -0.016116255894303322, + 0.021006163209676743, + 0.008050265721976757, + -0.007499954663217068, + -0.019292335957288742, + -0.017877250909805298, + 0.05682355910539627, + -0.004477174486964941, + 0.0016912240535020828, + -0.03193376958370209, + -0.013514069840312004, + 0.03036145307123661, + 0.018160268664360046, + 0.0172168780118227, + -0.0174998939037323, + -0.008718500845134258, + -0.012995204888284206, + -0.011407163925468922, + -0.012067537754774094, + 0.013128851540386677, + -0.03990542143583298, + 0.008498376235365868, + -0.034307967871427536, + 0.04943366348743439, + -0.028600456193089485, + -0.03133628889918327, + 0.0039976174011826515, + -0.0498424656689167, + -0.013655577786266804, + 0.020723145455121994, + 0.018631963059306145, + 0.00806598924100399, + -0.015416573733091354, + -0.0005758613115176558, + -0.04088025540113449, + 0.04949655756354332, + 0.0002962836006190628, + 0.026996692642569542, + -0.024245137348771095, + -0.042012326419353485, + 0.002838033251464367, + 0.02529858984053135, + 0.03017277456820011, + -0.006143830716609955, + 0.006509394850581884, + -0.004595098085701466, + -0.010188617743551731, + -0.014245197176933289, + 0.03691801801323891, + 0.012091122567653656, + -0.007177629973739386, + -0.021792322397232056, + -0.022358356043696404, + -0.010565973818302155, + 0.013301806524395943, + 0.024182245135307312, + 0.024056458845734596, + -0.011957474984228611, + -0.0017875285120680928, + -0.007955927401781082, + 0.01641499623656273, + -0.00284589477814734, + -0.01029081828892231, + -0.0011133974185213447, + -0.01282224990427494, + -0.035314254462718964, + -0.021918106824159622, + -0.029622463509440422, + -0.007818348705768585, + 0.016383549198508263, + -0.02347470074892044, + -0.001990947173908353, + -0.019622523337602615, + 0.0001655847008805722, + -0.04628903046250343, + 0.00123033847194165, + -0.0027201094198971987, + 0.011572257615625858, + 0.016179148107767105, + 0.022342633455991745, + -0.004146987572312355, + 0.015322234481573105, + 0.009999940171837807, + -0.008309698663651943, + -0.023694826290011406, + 0.006859235465526581, + 0.0027102823369205, + 0.004532205406576395, + 0.028128761798143387, + -0.009937047027051449, + -0.02122628688812256, + 0.007586432155221701, + -0.0002751555875875056, + -0.06100592389702797, + 0.006116315256804228, + 0.02492123283445835, + -0.005184717010706663, + -0.017468448728322983, + -0.0016145736444741488, + -0.03600607439875603, + 0.018003037199378014, + -0.02655644342303276, + -0.011815967038273811, + 0.013576962053775787, + 0.015793930739164352, + 0.014001487754285336, + -0.0032743513584136963, + -0.0344337560236454, + -0.036666445434093475, + -0.015801791101694107, + 0.014433875679969788, + -0.029512401670217514, + -0.0393708311021328, + -0.03770417720079422, + 0.009048687294125557, + 0.014308090321719646, + 0.008687054738402367, + 0.0026336319278925657, + -0.0008691968396306038, + 0.01822316087782383, + -0.002963818609714508, + -0.03808153048157692, + 0.008191774599254131, + 0.011776658706367016, + -0.004135195165872574, + 0.018427561968564987, + -0.005817574914544821, + -0.014992048032581806, + 0.009543967433273792, + 0.014268781989812851, + -0.018521901220083237, + 0.011792382225394249, + -0.01345903892070055, + -0.022798605263233185, + -0.0382387638092041, + 0.01504707895219326, + 0.0044968281872570515, + 0.04515695944428444, + 0.0025746701285243034, + 0.028883473947644234, + -0.0021973138209432364, + 0.011242070235311985, + 0.013710609637200832, + -0.005617104470729828, + 0.024685386568307877, + 0.002128524938598275, + -0.02210678532719612, + -0.0012480270816013217, + -0.01580965332686901, + -0.011021946556866169, + -0.011863135732710361, + -0.01704392209649086, + -0.010141448117792606, + -0.03833310306072235, + 0.009182334877550602, + 0.02220112457871437, + -0.06043988838791847, + 0.004032994620501995, + -0.006084869150072336, + -0.007893034256994724, + 0.00745278550311923, + -0.05657198652625084, + 0.021446412429213524, + -0.009347427636384964, + 0.004980315919965506, + 0.0027849674224853516, + 0.003586849430575967, + 0.0070754289627075195, + -0.015707451850175858, + 0.002657216740772128, + -0.0036379497032612562, + 0.008333283476531506, + 0.00700467498973012, + -0.012083260342478752, + 0.021462135016918182, + -0.0022012447007000446, + 0.012554955668747425, + 0.019056489691138268, + -0.0504085011780262, + 0.008207498118281364, + 0.020424405112862587, + -0.0031013963744044304, + 0.024811170995235443, + -0.004992108326405287, + 0.0003626157413236797, + -0.0040565794333815575, + -0.04776700958609581, + -0.01459110714495182, + -0.020345790311694145, + -0.010251510888338089, + 0.01732693985104561, + 0.006293200887739658, + 0.012547094374895096, + -0.014952740631997585, + 0.007920550182461739, + -0.030408622696995735, + -0.016996752470731735, + 0.0063482322730124, + 0.03698090836405754, + -0.01913510449230671, + 0.022405525669455528, + -0.0044221431016922, + -0.012554955668747425, + -0.006792412139475346, + 0.009999940171837807, + 0.00750388577580452, + 0.008404037915170193, + 0.023537594825029373, + -0.0011595842661336064, + -0.02349042519927025, + 0.01047163549810648, + 0.03073880821466446, + -0.006572287529706955, + 0.022798605263233185, + -0.027436941862106323, + -0.011674458160996437, + -0.0429871641099453, + -0.019701140001416206, + -0.004834876395761967, + 0.005432357080280781, + 0.014347397722303867, + 0.022688543424010277, + -0.02638348937034607, + 0.01704392209649086, + -0.0088442862033844, + -0.01128923986107111, + -0.046037457883358, + 0.013207467272877693, + 0.00874994695186615, + 0.02077031508088112, + 0.021525027230381966, + -0.03654066100716591, + -0.012177599593997002, + 0.01051880419254303, + -0.012806526385247707, + 0.017814358696341515, + 0.03155641257762909, + -0.01784580387175083, + 0.02693380042910576, + -0.006859235465526581, + -0.01976403221487999, + 0.0012264077086001635, + 0.045660100877285004, + -0.015518774278461933, + -0.02963818609714508, + 0.03245263546705246, + 0.0033647597301751375, + 0.01776718907058239, + -0.00111634552013129, + 0.028804857283830643, + -0.007220868486911058, + 0.019072212278842926, + -0.017169708386063576, + -0.023003006353974342, + -0.006497602444142103, + -0.002983472542837262, + -0.014504630118608475, + -0.014095827005803585, + 0.005341948941349983, + -0.009992077946662903, + -0.030691638588905334, + -0.03218534216284752, + -0.00011479146633064374, + 0.02446526102721691, + 0.012209045700728893, + -0.035597268491983414, + -0.00819963589310646, + 0.027861466631293297, + -0.00015674041060265154, + 0.03355325758457184, + 0.03415073826909065, + 0.003262558951973915, + -0.01318388245999813, + 0.012790803797543049, + 0.007665048353374004, + -0.04198088124394417, + 0.00580578250810504, + 0.01273577194660902, + -0.0052083018235862255, + 0.011344271712005138, + 0.0015713348984718323, + -0.00519257877022028, + 0.04103748872876167, + -0.0018808848690241575, + 0.0038737973663955927, + 0.0020056876819580793, + -0.0024980194866657257, + -0.01549518946558237, + -0.016116255894303322, + -0.013026650995016098, + 0.0113678565248847, + -0.00795199628919363, + 0.013899287208914757, + -0.03691801801323891, + 0.021509304642677307, + 0.018160268664360046, + 0.004316011909395456, + 0.00421381089836359, + -0.00919805746525526, + -0.004166641738265753, + -0.01327822171151638, + -0.02682373858988285, + 0.00452827475965023, + -0.05386760085821152, + 0.010990499518811703, + 0.0022169677540659904, + 0.022185400128364563, + 0.013584824278950691, + 0.022609926760196686, + -0.003791250754147768, + 0.009858431294560432, + -0.007767248898744583, + 0.0066351802088320255, + 0.0307230856269598, + 0.030785977840423584, + -0.00348071800544858, + 0.018065929412841797, + -0.012759356759488583, + 0.033930614590644836, + -0.010526666417717934, + 0.018474731594324112, + 0.014638276770710945, + -0.004701229743659496, + 0.008655608631670475, + 0.012570679187774658, + -0.027421219274401665, + 0.02600613236427307, + -0.02718537114560604, + -8.230099774664268e-05, + 0.03713814169168472, + -0.0462261363863945, + -0.027625620365142822, + 0.03506268188357353, + -0.02311306819319725, + 0.020534466952085495, + 0.01073892880231142, + -0.018459009006619453, + -0.0014760131016373634, + 0.010432327166199684, + 0.041760753840208054, + 0.02048729732632637, + 0.04333307221531868, + -0.03282999247312546, + 0.0026021855883300304, + -0.012940173968672752, + 0.04521985352039337, + -0.0346224345266819, + -0.04352175071835518, + -0.019072212278842926, + 0.004433935508131981, + 0.041100382804870605, + -0.003791250754147768, + -0.028050145134329796, + -0.007558916695415974, + 0.007197283674031496, + 0.005330156534910202, + -0.013757779262959957, + -0.009724784642457962, + -0.0011301032500341535, + -0.0004680101410485804, + 0.01713826134800911, + -0.02077031508088112, + -0.013215329498052597, + -0.014072242192924023, + -0.01913510449230671, + -0.021902384236454964, + 0.032767098397016525, + -0.00763753242790699, + 0.017153983935713768, + 0.050534285604953766, + -0.03135201334953308, + -0.020707422867417336, + -0.015817515552043915, + -0.012539233081042767, + 0.00829397514462471, + 0.022892944514751434, + 0.03209100291132927, + 0.0232074074447155, + -3.6666937376139686e-05, + 0.015558082610368729, + 0.011234208941459656, + 0.05556570366024971, + 0.03452809527516365, + 0.013325391337275505, + -0.019984155893325806, + -0.0024213690776377916, + -0.013396145775914192, + 0.0010524700628593564, + 0.01577034592628479, + -0.009543967433273792, + -0.002022393513470888, + -0.005117893684655428, + 0.012523509562015533, + -0.021965276449918747, + -0.030770255252718925, + 0.03279854357242584, + -0.002444953890517354, + 0.014567522332072258, + 0.0196854155510664, + 0.025172803550958633, + -0.00700467498973012, + 0.013262499123811722, + -0.0028557218611240387, + -0.03355325758457184, + -0.014111550524830818, + 0.014182304963469505, + 0.005660343449562788, + -0.020157111808657646, + 0.016383549198508263, + -0.002385991858318448, + 0.02176087535917759, + 0.020817484706640244, + -0.005939429625868797, + -0.010188617743551731, + -0.001019058283418417, + 0.014315951615571976, + 0.013859979808330536, + 0.024323752149939537, + 0.011352133005857468, + -0.008474791422486305, + -0.024449538439512253, + -0.023458978161215782, + -0.03298722207546234, + -0.024622492492198944, + -0.0026611476205289364, + 0.01014931034296751, + -0.002704386133700609, + 0.022169677540659904, + -0.01345903892070055, + -0.0050667934119701385, + -0.026965245604515076, + 0.01301092840731144, + 0.014669722877442837, + 0.02003132551908493, + -0.034590985625982285, + -0.016069086268544197, + -0.04402489215135574, + 0.0052397483959794044, + 0.0123662780970335, + 0.008121020160615444, + 0.006399332545697689, + 0.014536076225340366, + 0.012712188065052032, + -0.0008593698148615658, + 0.025141358375549316, + -0.010841129347682, + -0.007810487411916256, + -0.01327822171151638, + 0.022531310096383095, + -0.012413447722792625, + 0.007362376898527145, + -0.012649294920265675, + 0.010793960653245449, + 0.0034335486125200987, + -0.02636776491999626, + -0.004123402759432793, + -0.024591047316789627, + -0.002820344641804695, + 0.011981059797108173, + -0.01949673891067505, + 0.02410362847149372, + -0.02455960027873516, + ], + "index": 87, + }, + { + "title": "Cynric of Wessex", + "text": "Cynric was King of Wessex from 534 to 560. Everything known about him comes from the Anglo-Saxon Chronicle. There he is stated to have been the son of Cerdic, and also (in the regnal list in the preface) to have been the son of Cerdic's son, Creoda. During his reign it is said that the Saxons expanded into Wiltshire against strong resistance and captured Searobyrig or Old Sarum, near Salisbury, in 552.", + "vector": [ + 0.0034433980472385883, + 0.06477025151252747, + -0.021929355338215828, + -0.0037375078536570072, + 0.024573039263486862, + 0.040580544620752335, + -0.011288529261946678, + -0.04845872148871422, + -0.023819589987397194, + 0.018479349091649055, + -0.034526508301496506, + -0.012458359822630882, + -0.058108165860176086, + -0.02717706747353077, + 0.0484851598739624, + 0.024202924221754074, + -0.05305873230099678, + -0.015848884359002113, + -0.012127898633480072, + -0.00563765550032258, + 0.013826466165482998, + 0.00533363176509738, + 0.00780547596514225, + -0.010931632481515408, + 0.05905989184975624, + 0.01290778536349535, + -0.03291386365890503, + -0.008241684176027775, + -0.048379410058259964, + -0.00652328971773386, + 0.023753497749567032, + 0.01587532088160515, + -0.01547876838594675, + 0.06027598679065704, + 0.0008290426922030747, + -0.04874952882528305, + 0.019298890605568886, + 0.02019774354994297, + -0.004533917643129826, + -0.020012686029076576, + 0.0493575744330883, + 0.015743136405944824, + 0.020871883258223534, + 0.03748743608593941, + 0.02565694972872734, + -0.00637127785012126, + -0.033812712877988815, + -0.005736793391406536, + -0.03257018327713013, + -0.018915556371212006, + 0.04280123859643936, + -0.01587532088160515, + -0.03333685174584389, + -0.025775916874408722, + -0.03412995487451553, + 0.03553110733628273, + 0.002270263386890292, + 0.03693225979804993, + 0.012101462110877037, + 0.04388514906167984, + 0.014566697180271149, + 0.027150630950927734, + 0.0013928908156231046, + -0.02096441201865673, + 0.01170490961521864, + -0.01735578291118145, + -0.01681382767856121, + -0.023132232949137688, + 0.016060378402471542, + -0.03357478231191635, + -0.004335641395300627, + -0.005568258929997683, + -0.02543223649263382, + -0.003387219738215208, + -0.054829999804496765, + 0.017871301621198654, + 0.011942841112613678, + -0.0011128255864605308, + -0.0009690753067843616, + 0.027203505858778954, + -0.005208056885749102, + -0.0007703859591856599, + -0.01746153086423874, + 0.024335108697414398, + 0.048934586346149445, + -0.012213818728923798, + 0.01948394812643528, + -0.049807000905275345, + 0.023515567183494568, + -0.016906356438994408, + 0.08042085915803909, + -0.05321735143661499, + -0.003972134552896023, + -0.06228518858551979, + 0.01001295167952776, + 0.00318563892506063, + 0.06947600841522217, + -0.009074443951249123, + -0.004177020397037268, + -0.011182782240211964, + -0.02722994238138199, + -0.026714423671364784, + 0.01506899669766426, + -0.009953469038009644, + 0.005601305048912764, + 0.028525346890091896, + -0.005819408688694239, + 0.024083958938717842, + 0.0018538831500336528, + 0.07042773067951202, + 0.02717706747353077, + -0.014447730965912342, + 0.030111556872725487, + 0.03685295209288597, + -0.04444032162427902, + -0.033812712877988815, + -0.027705805376172066, + -0.018056359142065048, + -0.07793579250574112, + 0.008426741696894169, + -0.030983973294496536, + -0.01779199205338955, + 0.02897477336227894, + 0.0197086613625288, + 0.030375925824046135, + -0.00012330306344665587, + -0.006315099541097879, + 0.011341403238475323, + 0.008406913839280605, + 0.0411621555685997, + -0.014183362945914268, + -0.06582772731781006, + 0.011057207360863686, + 0.03865065425634384, + 0.0718553215265274, + -0.011301747523248196, + -0.005545126739889383, + -0.005898719187825918, + 0.03669432923197746, + 0.010786229744553566, + 0.027811553329229355, + 0.04454607143998146, + 0.009656054899096489, + 0.009081053547561169, + -0.020871883258223534, + 0.006946278735995293, + -0.001014513662084937, + 0.012372439727187157, + 0.01801670528948307, + -0.0015746441204100847, + -0.01599428616464138, + -0.015637388452887535, + 0.00807645358145237, + 0.0124715780839324, + -0.003902737982571125, + -0.04956907033920288, + -0.03793686255812645, + -0.03717019408941269, + 0.06519324332475662, + 0.0411621555685997, + 0.0033161707688122988, + 0.05694494768977165, + -0.024216143414378166, + 0.004114232957363129, + 0.02635752595961094, + 0.013410085812211037, + -0.03307248279452324, + 9.412959479959682e-05, + -0.050520796328783035, + 0.005138660315424204, + -0.004454607143998146, + -0.017421875149011612, + -0.0019612829200923443, + -0.04208744317293167, + 0.01227991096675396, + 0.03510811924934387, + -0.04161158204078674, + 0.01356209721416235, + 0.026291433721780777, + 0.06233806163072586, + 0.009074443951249123, + -0.019364982843399048, + -0.07545073330402374, + 0.006295271683484316, + 0.013575315475463867, + 0.039813876152038574, + 0.00021996274881530553, + 0.029133394360542297, + -0.01097128726541996, + -0.0195368230342865, + 0.03307248279452324, + -0.03843916207551956, + 0.018466129899024963, + 0.047797802835702896, + 0.002380967605859041, + 0.010766401886940002, + 0.021413838490843773, + 0.048617344349622726, + 0.005568258929997683, + -0.006718261167407036, + 0.052159879356622696, + 0.03761962056159973, + 0.0032979953102767467, + -0.020620733499526978, + 0.00604412192478776, + -0.013628189451992512, + 0.013152326457202435, + 0.018267855048179626, + -0.04153227061033249, + 0.0014028046280145645, + -0.0015647303080186248, + -0.006321708671748638, + 0.00594828836619854, + -0.019893718883395195, + -0.030587419867515564, + 0.0334954708814621, + 0.012081634253263474, + 0.0277322418987751, + -0.013092843815684319, + 0.029054082930088043, + 0.015346583910286427, + -0.024810971692204475, + 0.046317338943481445, + 0.01964256912469864, + 0.006325013004243374, + -0.004999866709113121, + -0.031406961381435394, + 0.009292548522353172, + -0.002959273522719741, + 0.03730237856507301, + 0.006794266868382692, + 0.05768517777323723, + 0.003535927040502429, + 0.007831912487745285, + -0.05699782073497772, + 0.015809228643774986, + 0.043700091540813446, + -0.04803573340177536, + -0.007871568202972412, + 0.006847140844911337, + 0.017818428575992584, + 0.029556384310126305, + -0.0024272319860756397, + -0.058213915675878525, + 0.0017828341806307435, + 0.0017828341806307435, + -0.015796009451150894, + -0.03172420337796211, + -0.0255512036383152, + -0.044678255915641785, + 0.012841693125665188, + 0.04687251150608063, + 0.008697719313204288, + -0.012167554348707199, + -0.03143339976668358, + -0.04999205842614174, + -0.01317876297980547, + 0.027058102190494537, + 0.01709141582250595, + 0.027864426374435425, + -0.017977049574255943, + -0.04147939756512642, + 0.020501766353845596, + 0.003045193152502179, + -0.03809548169374466, + -0.054988618940114975, + -0.015452330932021141, + 0.01018479187041521, + -0.005551735870540142, + -0.03336328640580177, + 0.03619202971458435, + 0.034896623343229294, + -0.026925917714834213, + -0.022775335237383842, + -0.027150630950927734, + 0.002549502532929182, + -0.015187962912023067, + 0.0204092375934124, + -0.023766716942191124, + -0.0006943800253793597, + -0.015320147387683392, + 0.014209799468517303, + 0.003810209222137928, + -0.011956059373915195, + -0.002093466930091381, + 0.021387401968240738, + -0.030640294775366783, + -0.011149736121296883, + 0.04562998190522194, + -0.025366144254803658, + -0.002921270439401269, + 0.026463273912668228, + -0.03772536665201187, + 0.02614603191614151, + -0.040369048714637756, + -0.04280123859643936, + -0.036429960280656815, + -0.09184157103300095, + -0.03656214475631714, + -0.05213344097137451, + 0.03595409914851189, + 0.01768624410033226, + -0.00029514249763451517, + 0.024493729695677757, + -0.00013796724670100957, + 0.02025061659514904, + 0.022312689572572708, + -0.054116204380989075, + -0.003787076799198985, + -0.014579915441572666, + -0.07471050322055817, + -0.023013265803456306, + 0.04679320007562637, + 0.02684660814702511, + -0.017183944582939148, + -0.008710937574505806, + 0.04142652451992035, + 0.02047532983124256, + -0.03598053380846977, + 0.061756450682878494, + 0.022907519713044167, + 0.00523779820650816, + 0.020435674116015434, + -0.05152539536356926, + -0.012075025588274002, + 0.019497167319059372, + 0.0054724253714084625, + 0.014170144684612751, + -0.005624437239021063, + -0.003440093481913209, + 0.04007824510335922, + 0.04192882403731346, + 0.003985353279858828, + -0.016086814925074577, + -0.01588853821158409, + -0.07217256724834442, + -0.012240255251526833, + 0.005072568077594042, + -0.04108284413814545, + -0.03272880241274834, + -0.02778511494398117, + 0.014619571156799793, + 0.005826017819344997, + 0.03563685715198517, + -0.02892190031707287, + 0.016179343685507774, + 0.018743718042969704, + -2.3893840989330783e-05, + -0.054988618940114975, + -0.058055292814970016, + 0.0005543474107980728, + -0.006338231731206179, + 0.024652350693941116, + -0.008677891455590725, + 0.03450007364153862, + 0.03344259783625603, + -0.026621894910931587, + 0.014540260657668114, + -0.024810971692204475, + -0.011638817377388477, + -0.01018479187041521, + -0.02265636995434761, + -0.012180772610008717, + 0.013225027360022068, + 0.00033066701143980026, + -0.022233380004763603, + 0.011572725139558315, + 0.039338015019893646, + 0.029556384310126305, + 0.039390888065099716, + 0.009616399183869362, + 0.01296726893633604, + 0.01077962014824152, + -0.029027646407485008, + 0.007091681472957134, + 0.046264465898275375, + 0.004596705082803965, + 0.02881615236401558, + -0.02002590335905552, + 0.004666101653128862, + -0.015505204908549786, + 0.005750012118369341, + 0.004596705082803965, + 0.0015680348733440042, + -0.03772536665201187, + 0.016800610348582268, + 0.008710937574505806, + 0.04679320007562637, + -0.03693225979804993, + 0.008777029812335968, + -0.00269490503706038, + 0.007137945853173733, + 0.0017068282468244433, + 0.031142594292759895, + 0.05578172579407692, + -0.02194257453083992, + 0.0038796057924628258, + 0.05583459883928299, + 0.1138898953795433, + 0.009907204657793045, + -0.05387827381491661, + -0.06640933454036713, + 0.03159201890230179, + -0.04681963846087456, + 0.056521955877542496, + 0.030587419867515564, + -0.027467872947454453, + -0.01522761769592762, + 0.0006237440975382924, + -0.04161158204078674, + 0.0069594974629580975, + 0.04634377360343933, + -4.4147451262688264e-05, + 0.010977896861732006, + 0.04676676541566849, + 0.048775963485240936, + -0.026159249246120453, + 0.005968115758150816, + 0.00272299419157207, + 0.012273301370441914, + -0.016959231346845627, + -0.03973456472158432, + 0.004081186838448048, + 0.004471130203455687, + -0.035716164857149124, + 0.016575897112488747, + -0.04073916748166084, + 0.04065985605120659, + -0.013191981241106987, + 0.0347115658223629, + -0.07497487217187881, + 0.023383382707834244, + 0.014368420466780663, + 0.02794373594224453, + -0.01348278671503067, + -0.027547184377908707, + -0.07037486135959625, + -0.011592552997171879, + -0.01758049614727497, + 0.05157826840877533, + 0.03341616317629814, + 0.0008649802766740322, + -0.04777136445045471, + -0.0258155707269907, + -0.05509436875581741, + 0.04229893907904625, + -0.03164489194750786, + -0.0317506417632103, + 0.006407628301531076, + 0.00018691670265980065, + -0.018426476046442986, + -0.045709289610385895, + 0.05020355433225632, + 0.014183362945914268, + 0.024929936975240707, + -0.04502193257212639, + 0.051604706794023514, + -0.008195419795811176, + -0.011724737472832203, + 0.0010070782154798508, + 0.027362126857042313, + 0.019801190122961998, + -0.044889748096466064, + -0.01730290986597538, + 0.019840845838189125, + -0.017593715339899063, + -0.02804948389530182, + -0.047454122453927994, + -0.023872463032603264, + 0.014090834185481071, + 0.0027692585717886686, + 0.013033360242843628, + -0.01768624410033226, + -0.004785067401826382, + -0.0047982861287891865, + 0.041400086134672165, + 0.029450636357069016, + -0.019669007509946823, + 0.04195525869727135, + 0.02117590606212616, + 0.05266217887401581, + -0.018637970089912415, + -0.037143755704164505, + 0.06371277570724487, + 0.0156109519302845, + -0.0306138563901186, + -0.028234541416168213, + 0.017699461430311203, + -0.07211969047784805, + 0.03106328286230564, + 0.027058102190494537, + 0.0010814318666234612, + 0.07434038817882538, + -0.029106957837939262, + -0.01654946058988571, + -2.552032492530998e-05, + -0.013760373927652836, + 0.013158935122191906, + 0.006724870298057795, + 0.004081186838448048, + -0.007607199717313051, + 0.008492833934724331, + 0.0024272319860756397, + 0.002314875600859523, + -0.001741526648402214, + 0.06693807244300842, + -0.02489028126001358, + 0.043250665068626404, + 0.013760373927652836, + 0.03389202430844307, + 0.056310463696718216, + 0.010079043917357922, + 0.0003688764991238713, + -0.011156344786286354, + 0.001260706689208746, + -0.008552316576242447, + -0.021625332534313202, + 0.011632207781076431, + -0.0008315211161971092, + -0.00958335306495428, + -0.01801670528948307, + -0.02559085749089718, + -0.02752074785530567, + 0.009570134803652763, + -0.0026238560676574707, + 0.038624219596385956, + 0.0511024072766304, + -0.00144328607711941, + -0.006106909364461899, + 0.010581344366073608, + 0.04433457553386688, + -0.003516099415719509, + 0.0011557855177670717, + -0.025286834686994553, + -0.007289957720786333, + 0.001361497095786035, + 0.006539812311530113, + 0.009827894158661366, + -0.01998624950647354, + 0.05757943168282509, + -0.008585362695157528, + 0.007111509330570698, + -0.0007435360457748175, + 0.027097757905721664, + 0.03159201890230179, + -0.006106909364461899, + -0.006344840861856937, + 0.06566910445690155, + 0.012101462110877037, + 0.025670168921351433, + 0.008254902437329292, + -0.0038796057924628258, + -0.04163801670074463, + 0.01582244597375393, + -0.0017068282468244433, + 0.015452330932021141, + 0.008050017058849335, + -0.0039820484817028046, + 0.018968431279063225, + -0.015108652412891388, + 0.03849203512072563, + -0.017276473343372345, + -0.0047751534730196, + 0.022828208282589912, + -0.032993171364068985, + 0.02593453787267208, + 0.011678473092615604, + 0.0021546022035181522, + -0.008942260406911373, + -0.01784486509859562, + 0.03978743776679039, + -0.014540260657668114, + 0.0021529498044401407, + 0.012094852514564991, + -0.0014201538870111108, + 0.007111509330570698, + 0.012015542015433311, + -0.004834636580199003, + 0.025471892207860947, + 0.004203456919640303, + -0.016404056921601295, + 0.011506632901728153, + 0.021982230246067047, + 0.03973456472158432, + -0.016774173825979233, + -0.012015542015433311, + -0.009656054899096489, + 0.015452330932021141, + 0.0641886368393898, + -0.04245756193995476, + -0.050467923283576965, + 0.03997249901294708, + 0.013985087163746357, + 0.016298310831189156, + 0.04999205842614174, + -0.004907337948679924, + -0.03182995319366455, + 0.05921851471066475, + -0.028075920417904854, + 0.007441969588398933, + -0.012656635604798794, + 0.01632474735379219, + 0.012002323754131794, + -0.014857502654194832, + 0.034077081829309464, + -0.05726218968629837, + -0.033918462693691254, + -0.00815576408058405, + -0.029873626306653023, + 0.006741393357515335, + -0.021360963582992554, + -0.027097757905721664, + -0.041400086134672165, + -0.02091153711080551, + 0.011645426973700523, + -0.01039628591388464, + -0.009788238443434238, + 0.03320466727018356, + 0.0020819008350372314, + 0.007164382841438055, + -0.009219846688210964, + 0.04214031621813774, + 0.018743718042969704, + -9.474920807406306e-05, + 0.03674720227718353, + -0.015055778436362743, + -0.008314385078847408, + -0.012610371224582195, + 0.015386238694190979, + 0.04721619188785553, + -0.017725899815559387, + -0.022616714239120483, + 0.0028072616551071405, + -0.000620852573774755, + -0.020343145355582237, + 0.007329612970352173, + 0.004656187724322081, + -0.029292015358805656, + -0.004834636580199003, + -0.029952935874462128, + -0.0009376815869472921, + -0.02046211250126362, + 0.02609315887093544, + -0.014593133702874184, + -0.015901757404208183, + -0.001073170336894691, + -0.013225027360022068, + 0.04092422500252724, + 0.014738536439836025, + -0.016628770157694817, + 0.001217746757902205, + 0.02871040441095829, + -0.028023047372698784, + -0.017382219433784485, + 0.023211542516946793, + -0.02663511410355568, + 0.013462958857417107, + -0.010601171292364597, + -0.011420713737607002, + -0.006645559798926115, + 0.028128795325756073, + -0.03777823969721794, + -0.010178182274103165, + 0.021162688732147217, + 0.02544545568525791, + -0.028736840933561325, + 0.014646007679402828, + -0.021189125254750252, + 0.012352611869573593, + 0.007673291955143213, + 0.00012196056195534766, + -0.0021727774292230606, + -0.005260930396616459, + -0.011691691353917122, + 0.0011194348335266113, + -0.0011466977884992957, + 0.011566116474568844, + 0.0030204085633158684, + 0.0019745011813938618, + 0.023211542516946793, + -0.02073969878256321, + 0.0026155945379287004, + 0.0001970370503840968, + -0.011552897281944752, + -0.014289109967648983, + -0.0002645749191287905, + -0.0114669781178236, + 0.002893181284889579, + 0.01154628861695528, + 0.013852902688086033, + 0.015624170191586018, + 0.04557710513472557, + 0.004930470138788223, + 0.0011029117740690708, + -0.00010388850932940841, + -0.040527671575546265, + 0.00957674439996481, + 0.01871727965772152, + -0.0007195776561275125, + 0.0594828836619854, + -0.007593981456011534, + 0.04925182834267616, + 0.03487018868327141, + 0.010958069004118443, + -0.002303309505805373, + 0.013733936473727226, + 0.0127756018191576, + -0.0002914248325396329, + 0.021546022966504097, + -0.019470730796456337, + -0.0156109519302845, + -0.013165544718503952, + -0.030983973294496536, + -0.01660233363509178, + -0.002410709159448743, + -0.013191981241106987, + 0.02614603191614151, + -0.0042464169673621655, + -0.011169563978910446, + 0.008869558572769165, + 0.017064977437257767, + -0.01200893335044384, + -0.0075675444677472115, + 0.03722306713461876, + 0.015082215890288353, + -0.003483053296804428, + 0.035293176770210266, + -0.019933374598622322, + 0.003724289359524846, + 0.008591972291469574, + -0.017038540914654732, + 0.0493575744330883, + -0.03040236234664917, + 0.018466129899024963, + 0.027758678421378136, + -0.014368420466780663, + 0.009543698281049728, + 0.0013780201552435756, + 0.05567597970366478, + -0.04153227061033249, + -0.034738004207611084, + 0.0242425799369812, + 0.0516311414539814, + 0.020316708832979202, + 0.026516146957874298, + -0.0076005905866622925, + -0.03399777412414551, + -0.019246017560362816, + -0.018519004806876183, + 0.028578219935297966, + 0.004553745035082102, + -0.030693167820572853, + 0.01958969607949257, + -0.05120815336704254, + 0.007012370973825455, + -0.027256378903985023, + 0.002257044892758131, + -0.021955793723464012, + 0.029609257355332375, + 0.02128165401518345, + -0.013654625974595547, + 0.02183682657778263, + -0.022008666768670082, + -0.02368740551173687, + 0.05757943168282509, + 0.0012020498979836702, + 0.014778192155063152, + -0.0017580497078597546, + 0.015042560175061226, + 0.023753497749567032, + 0.020210962742567062, + -0.023819589987397194, + 0.010059216059744358, + -0.009841112419962883, + 0.022801771759986877, + 0.004884205758571625, + 0.010561516508460045, + -0.022828208282589912, + 0.022392001003026962, + -0.04525986313819885, + 0.0217178612947464, + -0.009669273160398006, + -0.014751754701137543, + 0.008433351293206215, + -0.00027345604030415416, + 0.032993171364068985, + -0.008036798797547817, + -0.02255062200129032, + 0.009986515156924725, + 0.036271341145038605, + -0.0022256511729210615, + 0.01697244867682457, + -0.023013265803456306, + 0.03788398578763008, + -0.010944850742816925, + 0.02330407127737999, + 0.027150630950927734, + 0.020396020263433456, + -0.0002994797832798213, + -0.038888588547706604, + -0.011585943400859833, + 0.017263254150748253, + -0.018902339041233063, + 0.00544598838314414, + 0.014341983944177628, + 0.03487018868327141, + -0.020118432119488716, + 0.027705805376172066, + -0.0028898767195641994, + -0.012623589485883713, + 0.012167554348707199, + 0.013720718212425709, + 0.007448578719049692, + 0.023185105994343758, + -0.022087976336479187, + -0.006880186963826418, + 0.0026238560676574707, + -0.0027940431609749794, + 0.013231636956334114, + 0.03344259783625603, + -0.012973877601325512, + -0.006807485595345497, + -0.0021760822273790836, + -0.0033756536431610584, + 0.0019745011813938618, + 0.019854065030813217, + 0.06577485054731369, + -0.06794267147779465, + -0.003339302958920598, + -0.0022983525414019823, + -0.0013961954973638058, + 0.014368420466780663, + -0.02063395082950592, + -0.012319565750658512, + 0.0264236181974411, + 0.014170144684612751, + -0.0105086425319314, + -0.011314965784549713, + -0.0038663872983306646, + -0.02794373594224453, + 0.02614603191614151, + 0.003489662427455187, + 0.011255483143031597, + -0.03693225979804993, + -0.02952994592487812, + 0.030746040865778923, + -0.03143339976668358, + 0.010462378151714802, + -0.0031030236277729273, + -0.0664622113108635, + 0.027864426374435425, + 0.011030769906938076, + -0.011837094090878963, + 0.009642836637794971, + -0.02166498824954033, + 0.002266958821564913, + 0.0373288132250309, + -0.006417542230337858, + 0.004692538641393185, + -0.04777136445045471, + 0.00313772214576602, + 0.024361545220017433, + 0.018902339041233063, + -0.015862101688981056, + 0.007911222986876965, + 0.016575897112488747, + 0.04073916748166084, + -0.011116690002381802, + 0.04002537205815315, + -0.025128213688731194, + 0.019113833084702492, + -0.011863530613481998, + 0.008400305174291134, + -0.04208744317293167, + -0.02630465291440487, + -0.05223919078707695, + -0.01208824384957552, + 0.0528472363948822, + -0.011843702755868435, + 0.013529051095247269, + -0.02253740280866623, + 0.02799661085009575, + -0.00943795032799244, + 0.016033941879868507, + 0.011889967136085033, + -0.00013373322144616395, + 0.02482418902218342, + 0.015386238694190979, + 0.030375925824046135, + -0.04528630152344704, + 0.012431922368705273, + -0.013747154735028744, + -0.013535660691559315, + -0.004527308512479067, + 0.035451799631118774, + -0.012643417343497276, + 0.011757783591747284, + 0.00156886107288301, + -0.05530586466193199, + -0.02085866406559944, + 0.003661501919850707, + 0.01555807888507843, + -0.035716164857149124, + -0.043356411159038544, + -0.014738536439836025, + -0.02047532983124256, + 0.036456398665905, + -0.00044818699825555086, + -0.01047559641301632, + 0.02346269227564335, + -0.017818428575992584, + -0.013826466165482998, + -0.03833341225981712, + 0.0002542480069678277, + 0.015597733668982983, + -0.03711731731891632, + -0.05007136985659599, + 0.013733936473727226, + -0.0014978119870647788, + 0.035187430679798126, + 0.03320466727018356, + 0.028075920417904854, + -0.026621894910931587, + 0.01643049344420433, + 0.020343145355582237, + 0.020488549023866653, + 0.03307248279452324, + -0.034579381346702576, + -0.009477606043219566, + -0.013158935122191906, + 0.0009343769634142518, + -0.008611799217760563, + 0.009715537540614605, + -0.04372652992606163, + -0.0044083427637815475, + -0.026383962482213974, + -0.047189753502607346, + 0.018955212086439133, + 0.00253132707439363, + 0.0007274260860867798, + -0.010819275863468647, + -0.024427637457847595, + 0.01773911714553833, + 0.032226502895355225, + 0.03656214475631714, + -0.016496585682034492, + -0.019034521654248238, + -0.005769839510321617, + -0.01394543144851923, + -0.00845978781580925, + -0.012815256603062153, + -0.038624219596385956, + -0.0032203372102230787, + -0.006946278735995293, + -0.0320943184196949, + 0.018637970089912415, + -0.0018274463945999742, + 0.007005761843174696, + -0.05535873770713806, + -0.03701157122850418, + 0.005459206644445658, + -0.015108652412891388, + 0.002448712009936571, + 0.003483053296804428, + -0.04163801670074463, + -0.023171886801719666, + 0.02145349234342575, + 0.01378681045025587, + -0.030904661864042282, + 0.011718127876520157, + 0.02331729047000408, + 0.05065298080444336, + -0.01866440661251545, + -0.040633417665958405, + -0.014500604942440987, + 0.043858710676431656, + 0.019576476886868477, + 0.031221903860569, + 0.05136677250266075, + 0.010376458056271076, + -0.03500237315893173, + -0.011281920596957207, + -0.03674720227718353, + 0.010911804623901844, + 0.0647173747420311, + 0.0788346454501152, + 0.010178182274103165, + 0.029027646407485008, + -0.009543698281049728, + -0.002569330157712102, + -0.005571563262492418, + -0.01576957292854786, + 0.0020422455854713917, + -0.01992015726864338, + -0.01329111959785223, + 0.011566116474568844, + -0.01670808158814907, + 0.04983343929052353, + -0.01304657943546772, + -0.013284510932862759, + -0.005260930396616459, + -0.005181619897484779, + 0.013588533736765385, + -0.009477606043219566, + -0.030058683827519417, + -0.0014928551390767097, + -0.018241416662931442, + 0.015862101688981056, + 0.03666789457201958, + -0.02958282083272934, + -0.023158669471740723, + 0.024057522416114807, + 0.006070558447390795, + -0.06403002142906189, + 0.02717706747353077, + -0.02440120093524456, + -0.039655257016420364, + -0.005601305048912764, + -0.04896102100610733, + 0.04071272909641266, + 0.02222016081213951, + -0.02384602651000023, + -0.01285491231828928, + -0.02871040441095829, + -0.015320147387683392, + 0.046475958079099655, + -0.005627741571515799, + -0.001429241499863565, + 0.002324789296835661, + 0.02391211874783039, + 0.025630513206124306, + -0.006282053422182798, + 0.0044347792863845825, + 0.013145716860890388, + -0.017659807577729225, + -0.020131651312112808, + 0.004996562376618385, + 0.007104899734258652, + -0.0030435407534241676, + 0.011863530613481998, + 0.013628189451992512, + -0.030904661864042282, + -0.03743455931544304, + -0.006635645870119333, + 0.005611218512058258, + -0.026027066633105278, + 0.026701204478740692, + 0.013681063428521156, + 0.007527889218181372, + -0.04105640947818756, + 0.0047949813306331635, + 0.008433351293206215, + -0.014844284392893314, + -0.01468566246330738, + -0.0038432551082223654, + 0.0060209897346794605, + 0.010059216059744358, + -0.013588533736765385, + -0.007686510216444731, + -0.01241209451109171, + 0.0014085876755416393, + -0.0016266916645690799, + -0.0009748583543114364, + -0.011129908263683319, + 0.022180506959557533, + 0.02728281542658806, + -0.030111556872725487, + -0.02968856878578663, + -0.01015174575150013, + -0.0162189994007349, + 0.02095119282603264, + 0.019893718883395195, + 0.02570982463657856, + 0.02576269768178463, + 0.0025957669131457806, + 0.045709289610385895, + -0.0007625375292263925, + -0.018360383808612823, + 0.019179925322532654, + -0.008823294192552567, + -0.011744564399123192, + 0.015465549193322659, + 0.004943688400089741, + -0.0017481358954682946, + -0.02942419983446598, + 0.029926499351859093, + -0.018862683326005936, + 0.010211228393018246, + 0.002043897984549403, + -0.008492833934724331, + -0.011744564399123192, + -0.0236345324665308, + 0.029212703928351402, + 0.002708123531192541, + 0.025471892207860947, + 0.03405064716935158, + -0.027203505858778954, + 0.0012788820313289762, + -0.04346216097474098, + -0.0003143505018670112, + 0.008387086912989616, + 0.004210066050291061, + 0.002936141099780798, + -0.02177073433995247, + 0.006133346352726221, + -0.00637127785012126, + 0.013377039693295956, + 0.03426213935017586, + -0.03531961515545845, + -0.018135670572519302, + -0.008340821601450443, + 0.005360068753361702, + -0.029715005308389664, + 0.023290853947401047, + -0.03143339976668358, + -0.0277322418987751, + 0.0028353508096188307, + 0.01206180639564991, + 0.008096281439065933, + 0.015280491672456264, + 0.03711731731891632, + -0.043700091540813446, + 0.0005229536909610033, + 0.022193724289536476, + -0.01001295167952776, + 0.007012370973825455, + -0.005366677884012461, + 0.006377886980772018, + 0.009530480019748211, + 0.023608095943927765, + -0.015967849642038345, + -0.017765553668141365, + -0.03502880781888962, + -0.030085120350122452, + -0.005555040203034878, + 0.04660814255475998, + 0.02553798444569111, + -0.003668111050501466, + -0.005558345001190901, + -0.0028089138213545084, + -0.004930470138788223, + -0.025894882157444954, + -0.006149869412183762, + -0.00799714308232069, + 0.011281920596957207, + 0.00013631493493448943, + -0.010568125173449516, + 0.0062357890419662, + -0.005574868060648441, + 0.04425526410341263, + -0.017567278817296028, + 0.0034995763562619686, + 0.019232798367738724, + 0.020713262259960175, + 0.01746153086423874, + 0.023185105994343758, + 0.009186800569295883, + 0.0005080829723738134, + 0.00500647583976388, + 0.034526508301496506, + 0.00996007863432169, + 0.009702319279313087, + -0.0029724917840212584, + 0.004054749850183725, + -0.0013193633640184999, + 0.018135670572519302, + -0.010541688650846481, + -0.019893718883395195, + -0.040474798530340195, + 0.01471209991723299, + -0.004768544342368841, + 0.015981068834662437, + -0.0021678206976503134, + 0.016496585682034492, + 0.027917299419641495, + 0.0036119327414780855, + -0.029027646407485008, + 0.018029922619462013, + 0.0032203372102230787, + 0.011956059373915195, + 0.020396020263433456, + 0.019364982843399048, + 0.008129327557981014, + -0.023211542516946793, + -0.01789773814380169, + 0.026172468438744545, + -0.034420762211084366, + -0.0011962668504565954, + 9.578189929015934e-05, + 0.02309257723391056, + 0.01070030964910984, + 0.014077615924179554, + 0.013489396311342716, + 0.027705805376172066, + 0.01018479187041521, + -0.014500604942440987, + -0.023991430178284645, + 0.01220060046762228, + -0.006377886980772018, + 0.0108589306473732, + -0.0077592115849256516, + -0.016523022204637527, + 0.027203505858778954, + 0.03653571009635925, + 0.007983924821019173, + -0.05958862975239754, + 0.02128165401518345, + -0.004642969463020563, + 0.047084007412195206, + 0.01514830719679594, + 0.006394410040229559, + -0.00027738025528378785, + -0.006731479428708553, + 0.0018505785847082734, + 0.007369268219918013, + -0.0016333007952198386, + 0.008149155415594578, + -0.008631627075374126, + 0.005935070104897022, + 0.011526460759341717, + 0.007501452695578337, + -0.030164431780576706, + 0.008710937574505806, + -0.0059086331166327, + -0.025313271209597588, + -0.03301960974931717, + -0.006814094725996256, + 0.0023347032256424427, + 0.002597419312223792, + 0.03537248820066452, + 0.0043092044070363045, + 0.03598053380846977, + 0.010350021533668041, + -0.0012458359124138951, + 0.040580544620752335, + 0.0030468455515801907, + -0.016774173825979233, + 0.0182281993329525, + -0.010198010131716728, + 0.011751173995435238, + -0.01525405514985323, + -0.004487653262913227, + -0.015187962912023067, + -0.0230264849960804, + -0.020210962742567062, + 0.0032748631201684475, + 0.01873049885034561, + -0.021546022966504097, + -0.020752916112542152, + -0.005558345001190901, + -0.01845291256904602, + 0.016800610348582268, + -0.008241684176027775, + 0.0026916004717350006, + 0.0018770154565572739, + 0.0001930095604620874, + 0.016959231346845627, + 0.025419019162654877, + 0.020819008350372314, + -0.028631094843149185, + -0.03235868737101555, + 0.011037379503250122, + 0.01937820203602314, + 0.010303757153451443, + -0.004940384067595005, + -0.0017018713988363743, + -0.036112718284130096, + 0.008373867720365524, + 0.0004374470445327461, + 0.026555802673101425, + -0.002473496599122882, + -0.01012530829757452, + -0.025352926924824715, + 0.008102890104055405, + 0.021056940779089928, + -0.0021298176143318415, + -0.026185687631368637, + 0.0008732417481951416, + 0.006394410040229559, + -0.007369268219918013, + -0.014434512704610825, + -0.017012104392051697, + -0.031089719384908676, + -0.023660968989133835, + -0.029292015358805656, + -0.014011523686349392, + -0.005911937449127436, + -0.023594876751303673, + -0.008935650810599327, + 0.016575897112488747, + -0.014394857920706272, + 0.029662130400538445, + -0.006919842213392258, + -0.010839102789759636, + -0.0033905243035405874, + 0.001910061459057033, + -0.009589962661266327, + 0.007706338074058294, + 0.007005761843174696, + -0.012901176698505878, + -0.01746153086423874, + 0.03516099229454994, + -0.0077592115849256516, + 0.014223018661141396, + -0.0006873577367514372, + -0.02762649394571781, + -0.009715537540614605, + -0.009259502403438091, + -0.010792838409543037, + 0.014196581207215786, + 0.0048908148892223835, + -0.006288662552833557, + 0.016800610348582268, + -0.005687224678695202, + 0.007190819829702377, + 0.019404638558626175, + -0.018360383808612823, + 0.024929936975240707, + -0.061439208686351776, + -0.006529898848384619, + 0.00511883245781064, + 0.004457911476492882, + 0.02635752595961094, + -0.01220060046762228, + -0.009847722016274929, + 0.020316708832979202, + -5.5455395340686664e-05, + -0.00303032249212265, + -0.06392427533864975, + -0.02303970418870449, + 0.004206761717796326, + 0.020660387352108955, + 0.0060540358535945415, + 0.005251016933470964, + -0.0025676777586340904, + -0.024427637457847595, + 0.04346216097474098, + 0.0277322418987751, + -0.022722462192177773, + 0.03220006823539734, + 0.004847854841500521, + -0.012451750226318836, + -8.901778346626088e-05, + 0.05316447839140892, + -0.041505832225084305, + -0.0014416337944567204, + 0.018162107095122337, + -0.01674773544073105, + -0.027917299419641495, + 0.004117537289857864, + -0.01632474735379219, + 0.0023826200049370527, + 0.02358165942132473, + 0.013529051095247269, + 0.010158354416489601, + -0.027362126857042313, + 0.01665520668029785, + -0.06519324332475662, + -0.028208104893565178, + 0.010277320630848408, + -0.028366725891828537, + 0.0007633636705577374, + 0.018241416662931442, + -0.0014639399014413357, + -0.019338546320796013, + -0.01604715920984745, + 0.02674086019396782, + 0.018690843135118484, + 0.041241466999053955, + -0.021678205579519272, + 0.007501452695578337, + 0.024599477648735046, + 0.035293176770210266, + -0.017778772860765457, + -0.007957488298416138, + -0.018254635855555534, + 0.009986515156924725, + -0.0032368602696806192, + -0.051446083933115005, + -0.038624219596385956, + 0.012207209132611752, + 0.010964677669107914, + -0.015042560175061226, + -0.00308980536647141, + 0.015412676148116589, + -0.0033310414291918278, + 0.022140851244330406, + -0.037910424172878265, + 0.009715537540614605, + 0.031354088336229324, + 0.004937079269438982, + 0.0035194039810448885, + 0.03180351480841637, + -0.01440807618200779, + -0.059800125658512115, + 0.01697244867682457, + -0.04576216638088226, + 0.025789134204387665, + 0.019550040364265442, + 0.02609315887093544, + -0.03775180131196976, + -0.0020323318894952536, + -0.005898719187825918, + -4.776186324306764e-05, + 0.0019398028962314129, + -0.009748583659529686, + 0.015914976596832275, + -0.021638551726937294, + -0.011348011903464794, + -0.02717706747353077, + 0.03394489735364914, + 0.010905195027589798, + 0.018426476046442986, + -0.003757335478439927, + 0.014447730965912342, + 0.013522442430257797, + 0.018043141812086105, + -0.01479141041636467, + 0.028525346890091896, + 0.012577325105667114, + 0.0210172850638628, + 0.01348278671503067, + 0.004937079269438982, + 0.02194257453083992, + -0.02215406857430935, + -0.00962961744517088, + 0.006807485595345497, + -0.019232798367738724, + -0.01509543415158987, + 0.0020719871390610933, + -0.014143708162009716, + -0.011671863496303558, + -0.0030352792236953974, + 0.0028981382492929697, + -0.0017861387459561229, + -0.006367973051965237, + 0.027811553329229355, + -0.023951774463057518, + 0.05342884734272957, + -0.016628770157694817, + -0.030428798869252205, + -0.03656214475631714, + 0.007686510216444731, + 0.008023579604923725, + 0.03389202430844307, + -0.01709141582250595, + 0.027970174327492714, + 0.00927932932972908, + -0.0060507310554385185, + 0.016800610348582268, + 0.025088557973504066, + -0.002944402629509568, + -0.008869558572769165, + -0.0169195756316185, + -0.039047207683324814, + -0.004143974278122187, + -0.018043141812086105, + 0.008578754030168056, + -0.004160497337579727, + -0.012326175346970558, + 0.05615184083580971, + 0.008439959958195686, + -0.025313271209597588, + -0.031909260898828506, + 0.005548431072384119, + 0.009867548942565918, + 0.04869665205478668, + -0.02844603732228279, + -0.0004013029101770371, + 0.008948869071900845, + -0.0005270844558253884, + -0.027811553329229355, + 0.026648331433534622, + -0.028736840933561325, + 0.007045417092740536, + -0.011103471741080284, + 0.008611799217760563, + -0.0333104133605957, + -0.00239583826623857, + -0.0027362126857042313, + 0.014223018661141396, + -0.013733936473727226, + 0.024956373497843742, + 0.011903185397386551, + 0.00035586461308412254, + 0.038729965686798096, + 0.007356049958616495, + 0.03481731563806534, + -0.029450636357069016, + 0.01479141041636467, + 0.00765346409752965, + -0.023832809180021286, + 0.03547823429107666, + -0.005366677884012461, + -0.01468566246330738, + -0.03116903081536293, + -0.027388563379645348, + -0.007898004725575447, + -0.0359276607632637, + 0.04711044207215309, + 0.004190238658338785, + 0.007772429846227169, + 0.0027196896262466908, + 0.0011847007554024458, + -0.004322422668337822, + 0.019034521654248238, + -0.00125161895994097, + -0.0326230563223362, + -0.016417276114225388, + -0.047295499593019485, + -0.024163268506526947, + -0.01653624139726162, + 0.020594295114278793, + 0.0008269773097708821, + 0.048670217394828796, + -0.0249431561678648, + 0.020316708832979202, + 0.010997723788022995, + 0.011169563978910446, + -0.010766401886940002, + -0.013971867971122265, + 0.0108589306473732, + 0.009953469038009644, + -0.020607514306902885, + -0.025855226442217827, + -0.01669486239552498, + -0.016390839591622353, + -0.014156926423311234, + 0.007838522084057331, + -0.01932532712817192, + -0.019735097885131836, + 0.002410709159448743, + 0.02407073974609375, + -0.012696291320025921, + 0.03291386365890503, + 0.028234541416168213, + ], + "index": 88, + }, + { + "title": "Tsq'altubo", + "text": "Tsq'altubo, located in the north of Imereti region of Western Georgia, is a resort situated about 30 km northwest to the city of Kutaisi.et:Tskaltuboka:\u10ec\u10e7\u10d0\u10da\u10e2\u10e3\u10d1\u10ddfi:Tsqaltubo", + "vector": [ + 0.014487741515040398, + 0.023813346400856972, + -0.020972061902284622, + -0.0013942692894488573, + 0.04062194004654884, + 0.004290059674531221, + -0.004328740295022726, + -0.0056368568912148476, + -0.02599354088306427, + 0.023166321218013763, + 0.005313344299793243, + -0.008544954471290112, + -0.0009766918374225497, + 0.011161187663674355, + -0.03448926657438278, + 0.014129064977169037, + -0.034826844930648804, + -0.01925603672862053, + 0.022941268980503082, + 0.013735223561525345, + -0.014656530693173409, + 0.008390231058001518, + 0.009311539120972157, + 0.032688844949007034, + -0.01195590291172266, + -0.020915798842906952, + -0.0248964112251997, + -0.007926060818135738, + 0.012954573146998882, + -0.02237863838672638, + -0.04104391485452652, + -0.017483750358223915, + 0.014072801917791367, + 0.006530032958835363, + -0.02118304744362831, + 0.020381297916173935, + -0.02911614067852497, + 0.006417506840080023, + 0.005608725361526012, + 0.016372554004192352, + -0.007082114461809397, + 0.03828702121973038, + 0.006980137899518013, + 0.05522220954298973, + -0.0030680957715958357, + -0.03873712569475174, + -0.017638474702835083, + -0.008256605826318264, + 0.033898502588272095, + 0.0034179817885160446, + 0.010774378664791584, + -0.0040825894102454185, + 0.00025692005874589086, + 0.00429709255695343, + 0.03440487012267113, + -0.008066718466579914, + -0.009937465190887451, + 0.1251290738582611, + 0.00907945353537798, + 0.016710132360458374, + 0.00878407247364521, + -0.004912469536066055, + 0.01822923682630062, + -0.0004303246096242219, + 0.04529177397489548, + 0.007504087407141924, + 0.010830641724169254, + -0.01393214426934719, + -0.07083521038293839, + 0.024769818410277367, + 0.04565748572349548, + 0.04852690175175667, + 0.009065387770533562, + 0.010239879600703716, + 0.029256798326969147, + 0.023939939215779305, + -0.0011111957719549537, + 0.022336440160870552, + -0.005126972682774067, + -0.0040192934684455395, + 0.005257081240415573, + -0.009199013002216816, + -0.029960086569190025, + 0.0025283219292759895, + 0.04034062474966049, + 0.03809010237455368, + -0.08090630173683167, + -0.05443452298641205, + 0.015162898227572441, + 0.009156815707683563, + 0.028764497488737106, + -0.02183007262647152, + -0.03327960893511772, + -0.005577077157795429, + -0.029284929856657982, + 0.04458848759531975, + 0.01925603672862053, + 0.016499146819114685, + -0.006835963577032089, + 0.06661547720432281, + 0.011977002024650574, + -0.034939371049404144, + 0.01669606752693653, + 0.011308877728879452, + 0.05696636438369751, + -0.009163848124444485, + 0.03907470405101776, + 0.017497817054390907, + 0.040790729224681854, + 0.03496750071644783, + 0.016780462116003036, + 0.013988407328724861, + -0.022674018517136574, + -0.042112912982702255, + -0.05828854441642761, + -0.014867517165839672, + -0.012631060555577278, + -0.025135528296232224, + -0.011794147081673145, + -0.0017801988869905472, + -0.03316708281636238, + -0.008734842762351036, + 0.021154915913939476, + -0.028159668669104576, + 0.000808781711384654, + -0.010999430902302265, + 0.00126504001673311, + 0.012764684855937958, + 0.0037203957326710224, + 0.04416651278734207, + -0.0012808640021830797, + -0.06504011154174805, + -0.0099866958335042, + -0.008256605826318264, + 0.006786733400076628, + -0.006132675334811211, + -0.009487360715866089, + 0.04306938499212265, + -0.0023946971632540226, + -0.01458620186895132, + -0.046979665756225586, + 0.020339101552963257, + -0.02627485617995262, + -0.004202148411422968, + -0.058626122772693634, + -0.02085953578352928, + -0.023110058158636093, + -0.028975483030080795, + 0.01730089634656906, + 0.0016140469815582037, + 0.03944041579961777, + -0.027160998433828354, + -0.02692188136279583, + 0.03125413879752159, + 0.04093138501048088, + 0.06402737647294998, + -0.03763999789953232, + 0.02981942892074585, + 0.006487835664302111, + -0.011688653379678726, + -0.04301312193274498, + -0.020972061902284622, + 0.03688044473528862, + -0.030382059514522552, + 0.05257784202694893, + -0.042056649923324585, + -0.00936076883226633, + 0.04830184951424599, + 0.022350506857037544, + 0.001958658220246434, + 0.03854020684957504, + -0.02237863838672638, + 0.0009125167271122336, + -0.027822090312838554, + 0.015008174814283848, + -0.008270671591162682, + -0.0242353193461895, + -0.0041810497641563416, + 0.048948876559734344, + 0.013116328977048397, + -0.04247862100601196, + -0.06661547720432281, + 0.00919197965413332, + -0.010253945365548134, + -0.009431097656488419, + -0.0050390614196658134, + 0.02358829416334629, + 0.01910131424665451, + 0.07139784097671509, + -0.03744307532906532, + -0.03626155108213425, + 0.01189963985234499, + -0.027428248897194862, + -0.021745678037405014, + 0.009445163421332836, + 0.01739935576915741, + -0.024474438279867172, + 0.07634899020195007, + 0.010387570597231388, + -0.02402433380484581, + -0.022406769916415215, + 0.02561376430094242, + -0.03432047739624977, + 0.006698822136968374, + 0.023335110396146774, + -0.00018285498663317412, + -0.018355827778577805, + 0.01679452694952488, + -0.005235982593148947, + 0.002081733662635088, + -0.03960920497775078, + -0.019762404263019562, + -0.006628493312746286, + 0.006681240163743496, + 0.04509485512971878, + 0.006586296018213034, + 0.024333780631422997, + -0.035276949405670166, + 0.04180346429347992, + 0.04962403327226639, + 0.060820382088422775, + 0.014037637040019035, + 0.0021573372650891542, + -0.046810876578092575, + 0.038990311324596405, + 0.01680859364569187, + -0.014445544220507145, + 0.00407555652782321, + -0.003036447800695896, + 0.04863942787051201, + 0.02232237532734871, + -0.036964841187000275, + 0.007377495523542166, + -0.01904505118727684, + -0.02976316586136818, + 0.01910131424665451, + 0.005837293807417154, + -0.01772286929190159, + -0.0016843758057802916, + 0.001625475357286632, + -0.005028512328863144, + 0.05043984577059746, + 0.0477110855281353, + 0.02429158240556717, + 0.00206590979360044, + 0.009796807542443275, + -0.009290440008044243, + 0.03398289531469345, + -0.023433569818735123, + -0.005285212770104408, + -0.0054715839214622974, + -0.0019252521451562643, + 0.025909146293997765, + -0.006586296018213034, + -0.015134766697883606, + -0.02550123818218708, + 0.011196351610124111, + -0.05274663120508194, + -0.006994203664362431, + -0.07106026262044907, + -0.02298346534371376, + -0.007194640580564737, + 0.034995634108781815, + -0.0407063327729702, + 0.01441741269081831, + 0.01436114963144064, + 0.008741875179111958, + -0.020156245678663254, + -0.012307547964155674, + -0.018918458372354507, + -0.00037669888115487993, + -0.004979282151907682, + 0.023897740989923477, + 0.014403346925973892, + 0.013418743386864662, + 0.04042501747608185, + -0.03839954733848572, + 0.021028324961662292, + -0.011484700255095959, + 0.023883674293756485, + 0.020592285320162773, + -0.021084588021039963, + -0.00021867874602321535, + 0.04526364430785179, + 0.06768447905778885, + -0.021900402382016182, + 0.020972061902284622, + 0.08158145844936371, + -0.0033634768333286047, + -0.04565748572349548, + -0.008059685118496418, + 0.026302987709641457, + 0.07820567488670349, + -0.0029485367704182863, + 0.000345490436302498, + 0.023180386051535606, + -0.008080784231424332, + 0.0008795501198619604, + 0.0248964112251997, + 0.0012369084870442748, + 0.04129709675908089, + 0.025838816538453102, + -0.024713555350899696, + -0.012687323614954948, + 0.042647410184144974, + 0.02970690280199051, + 0.01735715940594673, + 0.04230983182787895, + -0.03173237293958664, + -0.00418808264657855, + 0.004342806059867144, + 0.016020910814404488, + -0.04875195398926735, + 0.018651209771633148, + 0.014129064977169037, + 0.019002852961421013, + -0.04551682621240616, + -0.011618324555456638, + -0.09260901808738708, + -0.035642657428979874, + -0.0013503137743100524, + 0.03173237293958664, + -0.047964271157979965, + -0.03063524328172207, + 0.08715150505304337, + 0.03184489905834198, + 0.00655113160610199, + 0.006333112251013517, + 0.05845733359456062, + -0.0062627834267914295, + -0.030128875747323036, + 0.007461890112608671, + -0.04450409114360809, + 0.03108534961938858, + 0.03989052027463913, + -0.02031097002327442, + 0.0017476717475801706, + 0.019452957436442375, + -0.004191598854959011, + 0.04748603329062462, + -0.01258182991296053, + 0.011020530015230179, + 0.044194646179676056, + 0.035811446607112885, + 0.014185328036546707, + 0.006280365865677595, + 0.028033077716827393, + -0.02341950498521328, + -0.00014725101937074214, + -0.012068429961800575, + 0.0006399924750439823, + 0.026907814666628838, + -0.032041821628808975, + 0.058851175010204315, + 0.046698350459337234, + 0.007075081579387188, + -0.08355066925287247, + -0.028483182191848755, + 0.05246531590819359, + 0.01630222611129284, + 0.014129064977169037, + -0.017483750358223915, + -0.0021801942493766546, + 0.015458280220627785, + -0.02275841310620308, + 0.05752899497747421, + 0.02709067054092884, + 0.035923972725868225, + -0.03676791861653328, + 0.005024995654821396, + -0.01569739729166031, + 0.02523398958146572, + -0.03457365930080414, + 0.0861387699842453, + 0.019284168258309364, + -0.032041821628808975, + 0.026077935472130775, + -0.053984418511390686, + 0.04155028238892555, + 0.0029327126685529947, + -0.028412852436304092, + -0.022181717678904533, + 0.0355863943696022, + -0.012532600201666355, + 0.04351948946714401, + -0.029200535267591476, + -0.014726859517395496, + -0.007764304522424936, + 0.022420834749937057, + 0.0027252426370978355, + -0.028145603835582733, + 0.043857067823410034, + 0.010626688599586487, + -0.06616537272930145, + 0.015064437873661518, + 0.037246156483888626, + -0.02510739676654339, + -0.009529558010399342, + 0.00459598982706666, + -0.01061262283474207, + 0.03392663225531578, + 0.02796274796128273, + -0.0531967356801033, + 0.030466454103589058, + -0.0053414758294820786, + -0.025599699467420578, + -0.03567079082131386, + 0.017005514353513718, + -0.03758373484015465, + 0.01488158293068409, + -0.06549021601676941, + -0.06515263766050339, + 0.04644516855478287, + -0.004965216387063265, + 0.02669682912528515, + 0.012335679493844509, + 0.01228644885122776, + 0.017919789999723434, + -0.021379968151450157, + 0.0007538372883573174, + -0.020761074498295784, + -0.012631060555577278, + -0.030382059514522552, + -0.024826081469655037, + 0.010753280483186245, + -0.008200342766940594, + 0.012328646145761013, + 0.0034988599363714457, + 0.05280289426445961, + -0.08495724201202393, + 0.028651971369981766, + -0.017047710716724396, + -0.05238092318177223, + 0.005875974893569946, + -0.02008591778576374, + 0.02544497512280941, + 0.024150924757122993, + -0.021422166377305984, + 0.0018056930275633931, + 0.006421023514121771, + -0.01834176294505596, + -0.0015375643270090222, + 0.02917240373790264, + 0.0013133911415934563, + 0.05992017313838005, + 0.01165348943322897, + 0.03688044473528862, + 0.021914467215538025, + 0.041015781462192535, + -0.009276374243199825, + 0.03983425721526146, + 0.06127048656344414, + -0.01817297376692295, + 0.026063868775963783, + -0.012272383086383343, + -0.06897853314876556, + 0.025979474186897278, + 0.04655769467353821, + 0.0602014884352684, + -0.01914351060986519, + -0.001329215127043426, + -0.02616233006119728, + -0.011562061496078968, + -0.06205817312002182, + -0.02822999842464924, + 0.003941931761801243, + -0.035642657428979874, + -0.0113581083714962, + -0.006438605487346649, + 0.030325796455144882, + 0.0023226100020110607, + 0.026935946196317673, + -0.035220686346292496, + -0.004736647475510836, + -0.03254818916320801, + -0.025529369711875916, + 0.0028659002855420113, + -0.013742255978286266, + -0.04039688780903816, + 0.044841669499874115, + 0.019073182716965675, + -0.005914655514061451, + 0.024038398638367653, + -0.025037068873643875, + -0.001607014099135995, + 0.04745790362358093, + 0.020325034856796265, + 0.013728190213441849, + 0.015514543280005455, + -0.022730281576514244, + 0.020972061902284622, + 0.019523287191987038, + 0.06352101266384125, + -0.01800418458878994, + 0.008931763470172882, + 0.0030505135655403137, + -0.05100247636437416, + -0.05634747073054314, + -0.017202435061335564, + -0.024994870647788048, + -0.026612434536218643, + 0.05209960788488388, + -0.01176601555198431, + 0.004409618675708771, + -0.031000955030322075, + -0.019621746614575386, + -0.013573466800153255, + 0.01356643345206976, + -0.03344839811325073, + -0.024432240054011345, + 0.03150732070207596, + 0.02391180582344532, + -0.0337015800178051, + -0.04323817417025566, + -0.024643227458000183, + 0.012525566853582859, + 0.03960920497775078, + -0.028061209246516228, + 0.022083256393671036, + -0.035642657428979874, + -0.00039406129508279264, + 0.009086486883461475, + -0.03769626095890999, + -0.013242920860648155, + -0.02665463089942932, + 0.00678321672603488, + -0.03139479458332062, + -0.006456187926232815, + 0.017554080113768578, + 0.0035639142151921988, + -0.036796052008867264, + 0.01964987814426422, + -0.0007569142035208642, + 0.010999430902302265, + 0.01717430353164673, + 0.01910131424665451, + -0.0005652680993080139, + -0.060539066791534424, + -0.01308116503059864, + -0.007511120289564133, + -0.01870747283101082, + -0.0030839198734611273, + -4.2334668250987306e-05, + -0.0026338151656091213, + -0.01343280915170908, + 0.019734272733330727, + 0.019002852961421013, + -0.010704049840569496, + -0.028862956911325455, + -0.03474244847893715, + 0.02090173214673996, + 0.02987569198012352, + 0.023222584277391434, + 0.02671089395880699, + 0.01575366035103798, + 0.014107965864241123, + -0.003825888969004154, + -0.02211138792335987, + 0.0005160378641448915, + 0.023616425693035126, + 0.009902301244437695, + 0.011337009258568287, + 0.03491123765707016, + 0.013889946974813938, + -0.01580992341041565, + -0.012054364196956158, + -0.03744307532906532, + -0.029425587505102158, + -0.03156358376145363, + 0.00018483298481442034, + 0.024769818410277367, + 0.00244216900318861, + 0.011808212846517563, + -0.03758373484015465, + 0.012406008318066597, + 0.004497529473155737, + -0.03139479458332062, + -0.04689527302980423, + -0.015134766697883606, + -0.031704243272542953, + 0.0035533648915588856, + 0.018679341301321983, + -0.0026742543559521437, + 0.025754421949386597, + 0.010879872366786003, + -0.0143400514498353, + -0.037949442863464355, + -0.0008492207853123546, + -0.06819084286689758, + -0.0172305665910244, + -0.017919789999723434, + 0.0010654819197952747, + 0.0008008697186596692, + -0.0034443552140146494, + -0.015317621640861034, + 0.007701008580625057, + 0.024446306750178337, + -0.011991067789494991, + -0.009789775125682354, + 0.01211765967309475, + -0.0015823990106582642, + 0.03136666491627693, + 0.01211765967309475, + -0.012019199319183826, + -0.03223874047398567, + 0.006122125778347254, + -0.00592168839648366, + 0.02292720228433609, + -0.023785214871168137, + 0.029313061386346817, + -0.0581197552382946, + -0.019579550251364708, + 0.030269533395767212, + -0.019903061911463737, + 0.011737884022295475, + -0.009733512066304684, + 0.008115948177874088, + 0.0526341050863266, + 0.013524236157536507, + -0.03471431881189346, + 0.01662573777139187, + -0.025023002177476883, + -0.0031858966685831547, + 0.004986315034329891, + 0.03671165555715561, + -0.008537921123206615, + -0.01569739729166031, + -0.025965409353375435, + -0.016541343182325363, + -0.0003874679678119719, + 0.01669606752693653, + -0.012891276739537716, + 0.07938719540834427, + -0.04723285138607025, + 0.038765259087085724, + 0.015528609044849873, + 0.01178711373358965, + -0.027836157009005547, + 0.0008122981525957584, + -0.003528749803081155, + 0.0033652351703494787, + -0.0034355639945715666, + 0.031760506331920624, + -0.05980764701962471, + -0.011744916439056396, + -0.039215363562107086, + 0.02484014816582203, + 0.04745790362358093, + 0.009536591358482838, + 0.01422752533107996, + -0.06413990259170532, + 0.021211178973317146, + 0.05738833546638489, + 0.015387951396405697, + 0.021647218614816666, + 0.0026338151656091213, + -0.023292912170290947, + -0.00027406270965002477, + 0.01543014869093895, + 0.009325604885816574, + -0.049595899879932404, + 0.015387951396405697, + 0.034995634108781815, + 0.02834252454340458, + -0.006125642452389002, + 0.018946589902043343, + 0.008931763470172882, + 0.011161187663674355, + -0.0016492113936692476, + 1.659321060287766e-05, + -0.03879338875412941, + -0.01680859364569187, + -0.02769549936056137, + 0.02178787626326084, + 0.026359250769019127, + -0.005186752416193485, + -0.0026742543559521437, + -0.03232313692569733, + -0.025796620175242424, + 0.006442122161388397, + 0.006723437458276749, + -0.017216501757502556, + -0.03471431881189346, + 0.02031097002327442, + -0.019931193441152573, + 0.005517297890037298, + -0.0006193333538249135, + -0.003430289449170232, + 0.04475727677345276, + -0.01267325785011053, + 0.037611864507198334, + 0.021408099681138992, + -0.02730165608227253, + -0.001967449439689517, + 0.007511120289564133, + 0.023433569818735123, + -0.03434860706329346, + -0.00919197965413332, + -0.02665463089942932, + -0.040734466165304184, + -0.010366471484303474, + -0.007356396876275539, + 0.021000193431973457, + 0.018510552123188972, + 0.020015588030219078, + 0.009156815707683563, + -0.0014074560021981597, + -0.0022593140602111816, + 0.01286314520984888, + -0.01023284625262022, + -0.011906673200428486, + -0.027315722778439522, + -0.018468353897333145, + 0.04011557251214981, + 0.00752518605440855, + 0.026668697595596313, + 0.02046569250524044, + -0.05221213400363922, + -0.043969593942165375, + 0.05631933733820915, + -0.008566053584218025, + -0.009213078767061234, + -0.06143927574157715, + -0.03792131319642067, + -0.00327029125764966, + 0.03432047739624977, + 0.020170312374830246, + 0.051733896136283875, + 0.014783122576773167, + -0.0004134017217438668, + 0.0012421831488609314, + -0.012567764148116112, + 0.02790648490190506, + -0.00608696136623621, + 0.04166280850768089, + 0.0015015208628028631, + -0.0344611331820488, + -0.011055693961679935, + 0.005591142922639847, + -0.042703673243522644, + 0.04357575252652168, + -0.032913897186517715, + -0.0189325250685215, + 0.019438892602920532, + 0.008573086000978947, + 0.02385554276406765, + -0.026851551607251167, + -0.0005683449562638998, + -0.02270215004682541, + -0.013960275799036026, + 0.005861909128725529, + -0.03749933838844299, + 0.012272383086383343, + -0.013826650567352772, + -0.03375784307718277, + -0.004332256969064474, + -0.027315722778439522, + 0.00787683017551899, + 0.010542294010519981, + 0.014206426218152046, + 0.016766395419836044, + 0.011864475905895233, + 0.03704923391342163, + -0.004778844770044088, + -0.03150732070207596, + 0.018398026004433632, + -0.020606352016329765, + 0.026893749833106995, + -0.004110720939934254, + -0.028117472305893898, + 0.026007605716586113, + 0.0405094139277935, + 0.03944041579961777, + 0.021140851080417633, + 0.022533360868692398, + -0.020662615075707436, + 0.030128875747323036, + 0.0006672448944300413, + -0.026992209255695343, + 0.00936076883226633, + 0.037611864507198334, + -0.0013371271779760718, + -0.002101074205711484, + -0.029678771272301674, + -0.03311081975698471, + -0.046529561281204224, + -0.0005815316108055413, + -0.011266680434346199, + -0.007546284701675177, + 0.0420285165309906, + 0.00033340268419124186, + 0.007729140110313892, + -0.0012342712143436074, + 0.00900209229439497, + -0.014347083866596222, + 0.014740925282239914, + 0.0401437021791935, + 0.007300133816897869, + 0.03583957999944687, + 0.0030012833885848522, + 0.014129064977169037, + -0.0012448205379769206, + 0.05429386720061302, + -0.05691010132431984, + -0.0023735985159873962, + -0.05013040080666542, + -0.001185920089483261, + -0.048076797276735306, + 0.01430488657206297, + 0.03327960893511772, + 0.03353279083967209, + 0.03643034026026726, + 0.014445544220507145, + 0.02123931050300598, + 0.021633151918649673, + -0.008432428352534771, + -0.032801371067762375, + -0.025360580533742905, + 0.013798519037663937, + -0.0034724867437034845, + -0.006072895601391792, + 0.012595895677804947, + 0.013249954208731651, + -0.005700152833014727, + -0.018510552123188972, + 0.02341950498521328, + 0.043041251599788666, + 0.027428248897194862, + -0.00791199505329132, + 0.012476337142288685, + -0.05851359665393829, + 0.0013485555537045002, + -0.023236649110913277, + -0.03229500353336334, + 0.0021204145159572363, + -0.02599354088306427, + -0.044082120060920715, + 0.009965596720576286, + -0.003045239020138979, + 0.0010610864264890552, + -0.005981468129903078, + 0.006283882074058056, + 0.020943930372595787, + 0.00787683017551899, + 0.03145105764269829, + 0.044672880321741104, + -0.02166128344833851, + -0.021590955555438995, + -0.008805171586573124, + 0.004546759650111198, + 0.028412852436304092, + 0.025895079597830772, + 0.0019270103657618165, + -0.00051647744840011, + 0.01575366035103798, + 0.012237219139933586, + -0.021379968151450157, + 0.004068523645401001, + 0.03536134213209152, + -0.0001274710230063647, + 0.04098764806985855, + 0.02911614067852497, + -0.0038856687024235725, + -0.015303555876016617, + 0.002074700780212879, + -0.02173161320388317, + 0.03693670779466629, + -0.029088009148836136, + 0.0008276825537905097, + 0.03792131319642067, + -0.02576848864555359, + -0.049933478236198425, + 0.005510265007615089, + 0.021759744733572006, + 0.007919027470052242, + -0.0012984463246539235, + -0.04427903890609741, + -0.015387951396405697, + -0.025754421949386597, + 0.03820262849330902, + 0.01772286929190159, + -0.004901920445263386, + 0.027512643486261368, + -0.007250903639942408, + -0.007630679290741682, + 0.023616425693035126, + -0.0401437021791935, + 0.0009432855877093971, + -0.018960656598210335, + 0.011688653379678726, + 0.00296084419824183, + -0.01586618646979332, + -0.0263170525431633, + -0.01178711373358965, + 0.015613003633916378, + -0.017877591773867607, + 0.000429225736297667, + -0.012574797496199608, + 0.005313344299793243, + -0.004880821797996759, + 0.006343661807477474, + -0.04230983182787895, + 0.01904505118727684, + 0.02243490144610405, + -0.01745561882853508, + -0.06273332983255386, + -0.010197682306170464, + -0.004919502418488264, + -0.026359250769019127, + 0.037189893424510956, + -0.023503899574279785, + 0.05350618436932564, + -0.031000955030322075, + -0.01849648542702198, + -0.020381297916173935, + -0.016935184597969055, + 0.03645847365260124, + -0.015669265761971474, + 0.019467024132609367, + 0.042872462421655655, + -0.008713743649423122, + 0.04290059581398964, + 0.0025371129158884287, + 0.00911461841315031, + -0.018398026004433632, + -0.01630222611129284, + 0.0035797380842268467, + 0.02468542382121086, + -0.0014426204143092036, + -0.0269781444221735, + 0.01663980446755886, + 0.017976053059101105, + 0.012110627256333828, + -0.02002965472638607, + -0.019678009673953056, + 0.029903823509812355, + -0.004603022709488869, + 0.003171830903738737, + 0.012525566853582859, + -0.012708421796560287, + -0.0018619560869410634, + -0.009381867945194244, + -0.02166128344833851, + 0.00562279112637043, + -0.027667367830872536, + 0.008073750883340836, + -0.020339101552963257, + -0.0023384341038763523, + -0.0469515360891819, + 0.0412689670920372, + -0.005721251480281353, + -0.013207756914198399, + -0.01647101528942585, + -0.013868847861886024, + 0.04672648385167122, + -0.016386620700359344, + -0.0365428663790226, + 0.012314580380916595, + -0.0420285165309906, + -0.03353279083967209, + -0.017033645883202553, + 0.023827411234378815, + 0.011224483139812946, + 0.012363811023533344, + 0.05494089424610138, + -0.020015588030219078, + -0.02002965472638607, + 0.01652727834880352, + -0.01921384036540985, + 0.009691314771771431, + -0.015880253165960312, + 0.01184337679296732, + 0.01620376482605934, + 0.01898878812789917, + -0.024980805814266205, + -0.021112719550728798, + 0.004775328561663628, + -0.020817337557673454, + 0.015795858576893806, + -0.006582779809832573, + 0.02616233006119728, + 0.0006457067211158574, + 0.017469685524702072, + 0.002809637226164341, + 0.00936076883226633, + 0.020915798842906952, + 0.009395933710038662, + 0.005520814098417759, + 0.01543014869093895, + 0.0036430340260267258, + 0.03195742517709732, + 0.011400305666029453, + 0.027104735374450684, + 0.034826844930648804, + -0.005380156449973583, + 0.03797757625579834, + 0.015950581058859825, + -0.008798138238489628, + -0.02709067054092884, + 0.012785783968865871, + 0.01620376482605934, + -0.007328265346586704, + -0.013123362325131893, + 0.03097282350063324, + -0.032970160245895386, + -0.04332256689667702, + -0.01575366035103798, + -0.009297473356127739, + 0.010654820129275322, + 0.03339213505387306, + -0.004304125439375639, + 0.03544573858380318, + -0.00043340149568393826, + -0.027175065129995346, + 0.02730165608227253, + 0.0056368568912148476, + 0.015008174814283848, + -0.03108534961938858, + 0.007504087407141924, + 0.03508002683520317, + -0.013671927154064178, + -0.04596693068742752, + -0.09620986133813858, + -0.026823420077562332, + -0.006698822136968374, + 0.01680859364569187, + -0.03119787573814392, + -0.011773047968745232, + 0.0031911712139844894, + -0.022195782512426376, + 0.020015588030219078, + -0.0004415332805365324, + -0.0012852596119046211, + -0.012631060555577278, + -0.01921384036540985, + -0.02762516960501671, + 0.0033810590393841267, + -0.013151493854820728, + -0.005482133477926254, + 0.022899070754647255, + -0.0024527183268219233, + -0.022463032975792885, + -0.022125454619526863, + -0.00935373641550541, + 0.009726478718221188, + 0.03153545409440994, + -0.028483182191848755, + 0.06217069923877716, + -0.011104924604296684, + 0.03364531695842743, + -0.03848394379019737, + -0.004022809676826, + 0.0027164516504853964, + 0.01302490197122097, + -0.014136097393929958, + -0.024333780631422997, + -0.022688085213303566, + 0.0070258514024317265, + 0.0038751193787902594, + 0.020831404253840446, + 0.007043433841317892, + 0.0016553651075810194, + 0.008882532827556133, + 0.01482531987130642, + 0.0005441694520413876, + 0.009438131004571915, + 0.023447636514902115, + 0.012265350669622421, + 0.006568714044988155, + -0.004135335795581341, + 0.009318571537733078, + 0.007082114461809397, + 0.04706406220793724, + 0.024150924757122993, + 0.010795477777719498, + -0.030438322573900223, + 0.02363049052655697, + -0.009318571537733078, + -0.005383673124015331, + 0.02226611226797104, + -0.016133436933159828, + 0.021590955555438995, + -0.017118040472269058, + 0.003458420978859067, + -0.031816769391298294, + 0.013995439745485783, + 0.01948108896613121, + -0.009276374243199825, + -0.014670596458017826, + 0.0060060834512114525, + -0.0065581644885241985, + 0.007834632880985737, + -0.024868279695510864, + -0.008910664357244968, + -0.015908384695649147, + -0.002327884780243039, + 0.026499908417463303, + 0.0022083257790654898, + 0.012265350669622421, + 0.026415513828396797, + -0.015275424346327782, + -0.0053731235675513744, + -0.03282950446009636, + -0.013868847861886024, + 0.011850410141050816, + -0.0060025667771697044, + 0.025698158890008926, + -0.03631781414151192, + -0.014178294688463211, + -0.025909146293997765, + -0.01877780072391033, + -0.007658810820430517, + -0.018299564719200134, + 0.010296142660081387, + 0.008038586936891079, + 0.005548945628106594, + -0.01178711373358965, + 0.004979282151907682, + 0.013165559619665146, + 0.008931763470172882, + 0.004617088474333286, + 0.016119370236992836, + 0.015373884700238705, + 0.023560162633657455, + -0.015627069398760796, + 0.017047710716724396, + 0.014572136104106903, + -0.01206139661371708, + 0.05254971235990524, + 0.0076166135258972645, + -0.013130394741892815, + 0.019832734018564224, + 0.0308602973818779, + -0.011337009258568287, + -0.01881999894976616, + -0.023897740989923477, + 0.01630222611129284, + -0.009402966126799583, + 0.0010478997137397528, + 0.013911045156419277, + -0.003917316440492868, + -0.019073182716965675, + 0.011147121898829937, + 0.0024052464868873358, + 0.03755560144782066, + -0.0017283313209190965, + 0.00024065651814453304, + 0.00971241295337677, + 0.0005199938896112144, + -0.017990117892622948, + -0.02796274796128273, + -0.0012632817961275578, + 0.027386052533984184, + 0.021464362740516663, + -0.004050941206514835, + -0.009325604885816574, + 0.044897932559251785, + 0.020972061902284622, + 0.015908384695649147, + -0.005738833453506231, + -0.003628968261182308, + -0.013151493854820728, + -0.018426157534122467, + -0.008685612119734287, + -0.020972061902284622, + -0.02917240373790264, + 0.005812678951770067, + 0.006670690607279539, + 0.006185421720147133, + -0.009888235479593277, + 0.0230959914624691, + -0.010415702126920223, + -0.0025986507534980774, + -0.008425395004451275, + -0.004086105618625879, + -0.0012949298834428191, + 0.014023571275174618, + 0.022181717678904533, + -0.006424539722502232, + -0.009149782359600067, + -0.01690705306828022, + -0.0280190110206604, + -0.029200535267591476, + -0.008059685118496418, + -0.0026549138128757477, + -0.010464931838214397, + 0.019059116020798683, + 0.0014118514955043793, + 0.0068922266364097595, + -0.014515873044729233, + -0.027315722778439522, + -0.026795288547873497, + -0.012933474034070969, + -0.017272764816880226, + -0.001803934806957841, + 0.014965977519750595, + 0.0053731235675513744, + -0.025304317474365234, + -0.0072860680520534515, + 0.003115567844361067, + 0.012328646145761013, + 0.05384376272559166, + 0.008755940943956375, + -0.01223018579185009, + -0.022533360868692398, + -0.01821517013013363, + -0.0002181293093599379, + 0.018412090837955475, + -0.023771148175001144, + -0.0012140516191720963, + 0.01009922195225954, + -0.024277517572045326, + -0.004690933972597122, + -0.005183235742151737, + 0.023222584277391434, + -0.02959437668323517, + -0.012954573146998882, + -0.005404771771281958, + 0.02424938604235649, + 0.012012166902422905, + -0.0013626213185489178, + -0.012961605563759804, + -0.0235742274671793, + 0.0007485626265406609, + 0.012588863261044025, + 0.019115379080176353, + -0.02747044712305069, + 0.024474438279867172, + 0.021703481674194336, + -0.039749860763549805, + -0.002945020329207182, + 0.023166321218013763, + 0.03659912943840027, + 0.0003788966569118202, + 0.021520625799894333, + -0.034995634108781815, + 0.016878921538591385, + 0.024544766172766685, + 0.0391872301697731, + 0.015387951396405697, + 0.032576318830251694, + -0.004666318651288748, + 0.009501426480710506, + 0.02436191216111183, + 0.008326934650540352, + -0.009072421118617058, + 0.04337882995605469, + 0.007890895940363407, + -0.011716784909367561, + -0.030775902792811394, + 0.038708996027708054, + 0.03282950446009636, + 0.018651209771633148, + 0.016049042344093323, + 0.027175065129995346, + 0.03747120872139931, + -0.002971393521875143, + 0.004979282151907682, + 0.018074512481689453, + -0.013826650567352772, + 0.003987645264714956, + 0.019495155662298203, + 0.0029344710055738688, + -0.0552784726023674, + 0.011533929966390133, + 0.02468542382121086, + 0.012223153375089169, + 0.012989737093448639, + -0.024826081469655037, + -0.02965063974261284, + 0.04124083369970322, + -0.0020905248820781708, + 0.009501426480710506, + 0.0010276802349835634, + 0.0020325034856796265, + 0.02604980394244194, + 0.010387570597231388, + -0.010239879600703716, + 0.04059380665421486, + -0.010141419246792793, + 0.0053379591554403305, + 0.01592244952917099, + 0.023517964407801628, + -0.0038012738805264235, + -0.0049406010657548904, + -0.03356092423200607, + -0.003664132673293352, + 0.010647786781191826, + 0.024474438279867172, + -0.012553698383271694, + 0.015078503638505936, + -0.007335298229008913, + -0.03820262849330902, + 0.04185972735285759, + 0.027540775015950203, + 0.00752518605440855, + 0.04371640831232071, + 0.02845505066215992, + 0.008052652701735497, + 0.03769626095890999, + 0.022519296035170555, + 0.005953336600214243, + 0.018580880016088486, + -0.01078141201287508, + -0.012884244322776794, + -0.00787683017551899, + -0.011407338082790375, + 0.011161187663674355, + -0.020704811438918114, + 0.0033898502588272095, + 0.010141419246792793, + -0.0021854687947779894, + -0.009529558010399342, + -0.006283882074058056, + 0.015303555876016617, + 0.01969207637012005, + 0.03944041579961777, + -0.03420795127749443, + -0.014150163158774376, + 0.020507890731096268, + -0.020015588030219078, + -0.025402778759598732, + -0.005014446564018726, + 0.020943930372595787, + 0.005510265007615089, + 0.0070258514024317265, + 0.028862956911325455, + 0.024375976994633675, + 0.018412090837955475, + 0.03353279083967209, + -0.01223018579185009, + 0.06526516377925873, + -0.0034267730079591274, + 6.736184877809137e-05, + -0.052887290716171265, + -0.015472345985472202, + -0.012940507382154465, + -0.009719446301460266, + -0.01223018579185009, + 7.321342309296597e-06, + 0.0031472158152610064, + -0.008481658063828945, + -1.0061695320473518e-05, + -0.016456948593258858, + 0.008812204003334045, + -0.01970614120364189, + -0.008200342766940594, + -0.0344611331820488, + 0.013439841568470001, + 0.005130489356815815, + -0.012771718204021454, + 0.007869797758758068, + -0.046642087399959564, + 0.005594659596681595, + 0.013826650567352772, + 0.03156358376145363, + 0.022941268980503082, + -0.007036400958895683, + -0.007272002287209034, + -0.025473106652498245, + -0.002378873061388731, + -0.04155028238892555, + -0.019846798852086067, + 0.018046380952000618, + 0.01141437143087387, + -0.009775709360837936, + -0.0013371271779760718, + -0.02237863838672638, + -0.018834063783288002, + -0.007588481996208429, + -0.009817906655371189, + 0.01143546961247921, + -0.01327105239033699, + 0.005615758243948221, + 0.012469303794205189, + 0.009881202131509781, + 0.0029344710055738688, + -0.022097323089838028, + -0.04540430009365082, + -0.019115379080176353, + 0.022519296035170555, + 0.029960086569190025, + 0.022969400510191917, + 0.024263450875878334, + 0.03848394379019737, + 0.019452957436442375, + 0.007008269429206848, + 0.017638474702835083, + -0.02232237532734871, + 0.04098764806985855, + -0.0026215077377855778, + -0.022139519453048706, + 0.017877591773867607, + -0.004501046147197485, + 0.0051797195337712765, + -0.022252045571804047, + -0.0140095055103302, + -0.012919408269226551, + 0.00516916997730732, + -0.007567383348941803, + 0.0032368849497288465, + 0.017371224239468575, + -0.009262308478355408, + -0.004054457880556583, + 0.027667367830872536, + 0.02813153713941574, + -0.00038856687024235725, + -0.02769549936056137, + 0.0023841478396207094, + -0.01717430353164673, + -0.012019199319183826, + -0.000520433415658772, + 0.011231516487896442, + 0.024882344529032707, + -0.014909714460372925, + -0.008024521172046661, + 0.02112678438425064, + 0.00642805639654398, + -0.06368979811668396, + -0.026401447132229805, + -0.005795096512883902, + -0.024390043690800667, + 0.007426725700497627, + 0.009923399426043034, + 0.012019199319183826, + -0.007391561288386583, + -0.02550123818218708, + 0.0016711890930309892, + 0.003991161938756704, + 0.028469115495681763, + 0.01321478933095932, + 0.00888956617563963, + 0.006751568987965584, + 0.0012158098397776484, + -0.02073294296860695, + 0.039271626621484756, + 0.02118304744362831, + -0.004392036236822605, + 0.019115379080176353, + -0.016724199056625366, + 0.02171754650771618, + -0.002558211563155055, + -0.0032966644503176212, + -0.014459609985351562, + 0.017469685524702072, + -0.009564722888171673, + -0.018524616956710815, + -0.025093331933021545, + -0.016724199056625366, + 0.01717430353164673, + 0.003625451819971204, + 0.011590193025767803, + -0.019452957436442375, + 0.04214104264974594, + -0.00039142396417446434, + -0.021478429436683655, + 0.017807263880968094, + 0.009817906655371189, + 0.03856833651661873, + 0.015739595517516136, + -0.01728682965040207, + -0.01387588120996952, + -0.02298346534371376, + -0.008741875179111958, + -0.03381410613656044, + -0.023883674293756485, + -0.0015920691657811403, + -0.015500477515161037, + -0.009564722888171673, + 0.016006844118237495, + -0.004093138501048088, + -0.003486552508547902, + 0.03440487012267113, + 0.022842807695269585, + -0.0012202054494991899, + 0.005211367271840572, + -0.03637407720088959, + -0.01395324245095253, + 0.02768143266439438, + -0.014347083866596222, + -0.003062821226194501, + -0.013383578509092331, + -0.019579550251364708, + 0.021408099681138992, + -0.02336324192583561, + 0.01384071633219719, + 0.012588863261044025, + 7.763644680380821e-05, + -0.022842807695269585, + 0.002774472814053297, + -0.009388900361955166, + -0.030550848692655563, + 0.02620452642440796, + 0.003917316440492868, + 0.003804790321737528, + -0.023503899574279785, + 0.0061643230728805065, + 0.03536134213209152, + 0.013967308215796947, + 0.01876373589038849, + 0.005584110040217638, + -0.023321043699979782, + 0.017483750358223915, + 0.0049441177397966385, + 0.013580499216914177, + 0.008706711232662201, + 0.014614333398640156, + -0.006378826219588518, + -0.004247861914336681, + 0.021914467215538025, + -0.0005903227138333023, + -0.002486124634742737, + 0.034179817885160446, + -0.010879872366786003, + -0.056881967931985855, + -0.021042389795184135, + -0.05021479353308678, + 0.031873032450675964, + 0.04683900997042656, + -0.007778370287269354, + 0.014951911754906178, + -0.005826744716614485, + 0.022899070754647255, + 0.02112678438425064, + -0.008390231058001518, + 0.030775902792811394, + 0.015387951396405697, + -0.011287779547274113, + -0.018355827778577805, + -0.0011191077064722776, + -0.0055700442753732204, + -0.020339101552963257, + -0.044672880321741104, + 0.01680859364569187, + 0.03749933838844299, + 0.03004448115825653, + ], + "index": 89, + }, + { + "title": "Fernando Mezzasoma", + "text": "Fernando Mezzasoma (August 3, 1907 \u2013 April 28, 1945) was an Italian fascist journalist and political figure.", + "vector": [ + -0.01641802117228508, + 0.06070755422115326, + -0.025051983073353767, + 0.02358151227235794, + 0.0010480484925210476, + 0.007831274531781673, + -0.03485962748527527, + -0.00838438794016838, + -0.027237456291913986, + 0.02827622927725315, + -0.03990509733557701, + 0.030893398448824883, + -0.038636986166238785, + -0.021719813346862793, + -0.010084198787808418, + -0.0015471994411200285, + -0.10468680411577225, + 0.00937594473361969, + -0.04001302272081375, + -0.041065286844968796, + 0.014300001785159111, + -0.021760284900665283, + -0.014907076954841614, + -0.008465331047773361, + -0.02073500119149685, + 0.026104247197508812, + 0.00945014227181673, + 0.012289906851947308, + 0.01281603891402483, + 0.012330378405749798, + 0.024040190503001213, + 0.003919009584933519, + 0.008472076617181301, + -0.009348963387310505, + 0.012242689728736877, + -0.03809736296534538, + 0.029814153909683228, + 0.038556043058633804, + 0.016957642510533333, + 0.03523736074566841, + 0.020276322960853577, + -0.007345614023506641, + 0.031406041234731674, + 0.009531085379421711, + -0.041065286844968796, + -0.024768682196736336, + -0.031298115849494934, + -0.033375661820173264, + -0.027291417121887207, + -0.0004222125862725079, + 0.0425492487847805, + -0.003949363715946674, + -0.04621868208050728, + 0.03726094588637352, + 0.002170294988900423, + -0.04030981659889221, + 0.0382862314581871, + 0.013787359930574894, + -0.0465424582362175, + 0.002617170102894306, + 0.0037335145752876997, + -0.045652080327272415, + -0.020586606115102768, + -0.01626962423324585, + -0.019601793959736824, + 0.02339264377951622, + -0.007541227154433727, + -0.019075661897659302, + 0.04451887309551239, + -0.03664037957787514, + -0.005025236401706934, + 0.045571137219667435, + 0.056768305599689484, + -0.020451700314879417, + -0.011021793819963932, + -0.013173539191484451, + 0.012559718452394009, + -0.0047958968207240105, + -0.08580000698566437, + -0.01057660486549139, + 0.0022782194428145885, + -0.043115854263305664, + -0.02811434306204319, + 0.03796245530247688, + 0.003418172476813197, + 0.0030606724321842194, + -0.04732491075992584, + -0.04638057202100754, + -0.056768305599689484, + 0.0006644104141741991, + -0.024890096858143806, + -0.011197171173989773, + -0.011075755581259727, + 0.010414717718958855, + 0.03755773976445198, + -0.009989765472710133, + 0.028653964400291443, + 0.009335472248494625, + -0.01838764362037182, + -0.03904170170426369, + -0.04138905927538872, + -0.013544529676437378, + -0.024161605164408684, + -0.0033051890786737204, + 0.05541925132274628, + 0.046407550573349, + -0.01601330377161503, + -0.019224058836698532, + 0.043223775923252106, + 0.0685320794582367, + 0.05088641867041588, + -0.0330788716673851, + 0.004812759812921286, + 0.017146511003375053, + -0.010090944357216358, + -0.026266135275363922, + -0.022205473855137825, + 0.01670132204890251, + -0.0382862314581871, + -0.024957548826932907, + 0.05420510098338127, + -0.047972455620765686, + 0.054501891136169434, + 0.043547552078962326, + 0.017106039449572563, + 0.012323632836341858, + -0.04055264592170715, + 0.0006011733785271645, + -0.003032004926353693, + -0.04055264592170715, + 0.03564208000898361, + 0.010097689926624298, + 0.04179377853870392, + -0.03723396733403206, + -0.02806038036942482, + 0.024390945211052895, + -0.03437396511435509, + 0.022353870794177055, + 0.0027014859952032566, + 0.028977738693356514, + 0.043034911155700684, + 0.01397622749209404, + -0.007588444277644157, + -0.006954387295991182, + 0.024620285257697105, + -0.02364896424114704, + 0.015932360664010048, + -0.0027621935587376356, + -0.013767124153673649, + -0.026603398844599724, + 0.03744981437921524, + -0.038259249180555344, + 0.011966133490204811, + -0.00941641628742218, + 0.0044552600011229515, + -0.045786984264850616, + -0.05892679840326309, + 0.0003859566932078451, + 0.029490379616618156, + -0.04451887309551239, + -0.016863208264112473, + 0.00401681661605835, + 0.011075755581259727, + 0.040714532136917114, + 0.008526038378477097, + -0.033672455698251724, + 0.015689529478549957, + 0.013780614361166954, + 0.026616889983415604, + 0.031513966619968414, + -0.026576418429613113, + -0.0040876418352127075, + 0.010421463288366795, + 0.005972948856651783, + 0.019777171313762665, + -0.0020404483657330275, + -0.011547925882041454, + -0.0025783847086131573, + -0.045463211834430695, + 0.013396133668720722, + 0.033699437975883484, + 0.017497265711426735, + 0.007325378246605396, + -0.01286325603723526, + -0.04441094771027565, + 0.06302793323993683, + 0.031325098127126694, + 0.01618868112564087, + -0.0010008314857259393, + -0.05876491218805313, + -0.02321726642549038, + 0.04969925060868263, + 0.021800756454467773, + 0.01872490718960762, + -0.004978019278496504, + 0.016795756295323372, + 0.03548019379377365, + -0.03569604083895683, + -0.014907076954841614, + -0.06281208246946335, + 0.01505547296255827, + 0.03345660865306854, + 0.020073963329195976, + 0.028842832893133163, + -0.010124670341610909, + 0.03326774016022682, + -0.002854941412806511, + 0.017807548865675926, + -0.03440094739198685, + 0.03005698323249817, + 0.03467075899243355, + -0.04457283392548561, + 0.06896378099918365, + 0.025078965350985527, + 0.004293372854590416, + -0.009915567003190517, + -0.0020404483657330275, + -0.011021793819963932, + 0.034050192683935165, + 0.04662340134382248, + -0.0053523825481534, + -0.004863349720835686, + -0.06551019847393036, + -0.008944245986640453, + -0.012411321513354778, + 0.008829575963318348, + 0.032269436866045, + 0.01420556753873825, + -0.0002618013240862638, + 0.05328774079680443, + -0.009861604310572147, + 0.016917170956730843, + -0.03324075788259506, + 0.04942943900823593, + 0.0032866394612938166, + 0.06351359188556671, + -0.031190192326903343, + -0.061624910682439804, + -0.05185773968696594, + 0.04932151362299919, + -0.028600003570318222, + 0.07754378020763397, + -0.02362198382616043, + 0.0068093640729784966, + 0.00027782138204202056, + -0.008795849978923798, + -0.05293698608875275, + -0.03232339769601822, + -0.03936547413468361, + -0.008674434386193752, + 0.00032988653401844203, + -0.04913264513015747, + -0.01655292697250843, + 0.003713278565555811, + 0.006276486441493034, + -0.019197076559066772, + 0.01151419896632433, + 0.0020370755810290575, + -0.028896795585751534, + 0.020181888714432716, + -0.007993160746991634, + -0.010542877949774265, + 0.02846509777009487, + -0.013423114083707333, + -0.013611982576549053, + 0.005760472267866135, + -0.010266321711242199, + 0.0024030073545873165, + -0.022583208978176117, + -0.015500661917030811, + -0.02316330373287201, + -0.013699671253561974, + 0.04959132522344589, + -0.007494010031223297, + -0.02579396404325962, + -0.01852254942059517, + -0.04198264703154564, + 0.03256623074412346, + -0.001146698254160583, + -0.00233049551025033, + 0.030893398448824883, + -0.018104340881109238, + 0.007912217639386654, + -0.019305001944303513, + -0.002693054499104619, + 0.0211397185921669, + -0.02768264338374138, + -0.01838764362037182, + 0.02099132351577282, + -0.01415160484611988, + -0.0232037752866745, + -0.015743492171168327, + -0.024175096303224564, + -0.01875188946723938, + 0.0006091834511607885, + 0.00017643132014200091, + 0.0333486832678318, + -0.017362359911203384, + 0.008640708401799202, + 0.029328493401408195, + 0.008984717540442944, + 0.047972455620765686, + 0.031406041234731674, + -0.031864721328020096, + 0.029463399201631546, + -0.024080662056803703, + 0.02572651207447052, + 0.03893377631902695, + 0.021625379100441933, + 0.0031078895553946495, + -0.019331982359290123, + 0.01898122765123844, + -0.012586698867380619, + -0.002467087469995022, + -0.014731699600815773, + -0.017969435080885887, + 0.01590537838637829, + -0.04508547484874725, + -0.006117972079664469, + -0.006310212891548872, + -0.03021887131035328, + -0.026239152997732162, + -0.05806340277194977, + -0.003517665434628725, + -0.028600003570318222, + -0.03310585394501686, + -0.0014536086237058043, + -0.01844160631299019, + 0.018239246681332588, + 0.02099132351577282, + 0.036235664039850235, + -0.024377455934882164, + 0.03947339951992035, + -0.002736898837611079, + 0.010515897534787655, + 0.015527643263339996, + -0.02533528581261635, + 0.08202265202999115, + 0.0012343869311735034, + -0.006667712703347206, + -0.010650803335011005, + 0.05104830488562584, + -0.04505849629640579, + 0.006134835537523031, + 0.01415160484611988, + 0.02364896424114704, + 0.08849812299013138, + 0.022421322762966156, + 0.03526434302330017, + 0.014313491992652416, + 0.00033094047103077173, + 0.004465377889573574, + 0.0032208729535341263, + 0.03960830718278885, + -0.004563184455037117, + 0.008580001071095467, + -0.01663387008011341, + -0.038663964718580246, + -0.009348963387310505, + -0.014178586192429066, + -0.010367500595748425, + 0.019952548667788506, + 0.03904170170426369, + 0.027035096660256386, + 0.009510849602520466, + -0.008586745709180832, + 0.007865000516176224, + 0.01272835023701191, + -0.004155094735324383, + 0.038798872381448746, + 0.015864906832575798, + 0.007811038289219141, + -0.004779033362865448, + -0.026239152997732162, + 0.0473518930375576, + -0.057631704956293106, + 0.03286302089691162, + 0.002971297362819314, + -0.04260321334004402, + 0.005797571502625942, + 0.008559765294194221, + -0.012134765274822712, + -0.01536575611680746, + 0.017281416803598404, + -0.014596793800592422, + -0.012930708937346935, + -0.043088871985673904, + -0.006772264838218689, + -0.019709719344973564, + -0.012883491814136505, + -0.014259529300034046, + 0.017348868772387505, + 0.03790849447250366, + -0.028653964400291443, + -0.008640708401799202, + 0.0015691216103732586, + 0.027089059352874756, + 0.04969925060868263, + -0.01610773801803589, + 0.00020225311163812876, + 0.01635056734085083, + -0.017092548310756683, + 0.04408717527985573, + 0.040741514414548874, + 0.03067754954099655, + -0.009133114479482174, + -0.029139624908566475, + 0.009902076795697212, + -0.02302839793264866, + 0.03024585172533989, + -0.022826040163636208, + -0.005743608810007572, + 0.02795245498418808, + -0.0040640332736074924, + -0.014556322246789932, + -0.019871605560183525, + 0.026630379259586334, + -0.004974646493792534, + 0.01411113329231739, + -0.043412644416093826, + 0.019547831267118454, + 0.0036424531135708094, + -0.006573278922587633, + 0.000606653920840472, + 0.08277811855077744, + 0.03731491044163704, + -0.029274530708789825, + -0.009564812295138836, + -0.0062967222183942795, + -0.011898680590093136, + 0.008681179955601692, + -0.0028836086858063936, + -0.00209441059269011, + 0.019210567697882652, + 0.04816132411360741, + -0.05844113603234291, + 0.01034726481884718, + -0.01277556736022234, + 0.010509151965379715, + -0.00806735921651125, + 0.02364896424114704, + -0.03245830535888672, + 0.01536575611680746, + 0.024283021688461304, + -0.1029600128531456, + -0.003337229136377573, + 0.01888679340481758, + -0.03197264298796654, + -0.009160094894468784, + 0.03793547675013542, + -0.07317283749580383, + -0.06351359188556671, + 0.014502359554171562, + 0.018050378188490868, + 0.06006000563502312, + -0.047648683190345764, + 0.06124717369675636, + 0.007689623162150383, + -0.029058681800961494, + 0.022758586332201958, + 0.014219057746231556, + 0.04522038251161575, + 0.02364896424114704, + -0.017186982557177544, + 0.015703020617365837, + -0.02590188942849636, + 0.03674830496311188, + 0.015864906832575798, + -0.029490379616618156, + 0.024768682196736336, + -0.009470378048717976, + 0.05833321437239647, + 0.020168397575616837, + -0.012438302859663963, + 0.04629962518811226, + 0.03526434302330017, + -0.02598283253610134, + 0.035965852439403534, + -0.001569964806549251, + 0.0039932080544531345, + -0.02351405844092369, + -0.006580024026334286, + 0.017969435080885887, + 0.036127738654613495, + 0.009517595171928406, + -0.04961830750107765, + -0.020289814099669456, + 0.009800896979868412, + -0.054744720458984375, + 0.019574813544750214, + 0.038421135395765305, + 0.04411415383219719, + -0.027372360229492188, + 0.004195566289126873, + -0.03518339991569519, + 0.06032981723546982, + 0.022097548469901085, + 0.005558113567531109, + -0.025038493797183037, + 0.005753727164119482, + 0.01859000138938427, + 0.035938870161771774, + 0.047783590853214264, + -0.02309585176408291, + 0.022272925823926926, + 0.0021399413235485554, + 0.036019813269376755, + -0.003320365911349654, + -0.021733304485678673, + 0.00936919916421175, + 0.028438115492463112, + 0.03931151330471039, + 0.02833019196987152, + 0.0026660733856260777, + -0.029409436509013176, + -0.03591189160943031, + -0.006225896999239922, + -0.008822831325232983, + 0.01840113289654255, + 0.02564556896686554, + 8.278781751869246e-05, + -0.015217360109090805, + 0.038421135395765305, + 0.0022057078313082457, + 0.04209056869149208, + -0.031621888279914856, + -0.05158792808651924, + -0.0063237035647034645, + -0.036100756376981735, + -0.008411368355154991, + -0.02541622892022133, + 0.017308397218585014, + -0.010913869366049767, + 0.029841134324669838, + -0.016849718987941742, + 0.012411321513354778, + -0.03558811545372009, + 0.014057171531021595, + 0.01513641607016325, + -0.029868116602301598, + 0.015878397971391678, + 0.011844717897474766, + -0.01633707620203495, + -0.034023210406303406, + -0.006934151519089937, + 0.022542737424373627, + -0.009618774056434631, + -0.03243132308125496, + 0.027453305199742317, + -0.036397550255060196, + 0.02770962566137314, + 0.0026003068778663874, + -0.003215814009308815, + 0.010198868811130524, + 0.010178633034229279, + -0.012330378405749798, + -0.026198681443929672, + 0.052316419780254364, + -0.016957642510533333, + 0.014003208838403225, + 0.024067172780632973, + -0.014569812454283237, + 0.013746888376772404, + 0.0018060497241094708, + -0.011541180312633514, + 0.03073151223361492, + -0.041065286844968796, + -0.020424718037247658, + -0.02368943579494953, + -0.049834154546260834, + 0.04176679626107216, + 0.01599981263279915, + 0.006677830591797829, + -0.019966039806604385, + -0.0305426437407732, + 0.022812549024820328, + 0.04646151512861252, + 0.012161746621131897, + 0.01187844481319189, + -0.03073151223361492, + 0.009436652064323425, + -0.059412457048892975, + 0.002231002552434802, + 0.04360151290893555, + 0.02091037854552269, + -0.0010615390492603183, + -0.014124623499810696, + 0.007844764739274979, + 0.004836368374526501, + 0.027156511321663857, + 0.035750001668930054, + -0.008141557686030865, + 0.024458399042487144, + 0.02331170067191124, + 0.027520757168531418, + 0.05693019554018974, + -0.006576651707291603, + -0.020519152283668518, + 0.005436698440462351, + 0.007925707846879959, + 0.00027697821496985853, + 0.029058681800961494, + -0.005949340295046568, + -0.03531830385327339, + 0.036262646317481995, + -0.02364896424114704, + -0.012532737106084824, + -0.009045425802469254, + -0.014434906654059887, + -0.018117832019925117, + 0.0301379282027483, + -0.027264436706900597, + -0.01398971863090992, + 0.03197264298796654, + 0.0376117005944252, + -0.01039448194205761, + 0.0019342100713402033, + -0.0042090569622814655, + 0.018306700512766838, + 0.007345614023506641, + -0.006239387206733227, + 0.004293372854590416, + 0.019871605560183525, + 0.016687830910086632, + -0.009335472248494625, + 0.019264530390501022, + 0.01639103889465332, + 0.03696415573358536, + -0.01625613309442997, + 0.019777171313762665, + -0.030003022402524948, + 0.028950758278369904, + -0.014515850692987442, + -0.012397831305861473, + 0.03221547603607178, + 0.0037436324637383223, + 0.01834717206656933, + -0.03699113428592682, + 0.004910566378384829, + -0.047756608575582504, + 0.0032259318977594376, + -0.026279624551534653, + 0.001765577937476337, + -0.052424345165491104, + -0.019480379298329353, + 0.013079104945063591, + 0.006647476926445961, + -0.028384152799844742, + -0.033969249576330185, + 0.03248528763651848, + -0.0006547140656039119, + -0.04678528755903244, + 0.012357359752058983, + 0.007190472446382046, + 0.031028304249048233, + -0.010219104588031769, + -0.02092386968433857, + 0.024175096303224564, + 0.01040122751146555, + 0.015622076578438282, + 0.014893586747348309, + -0.027547737583518028, + 0.012020095251500607, + 0.041065286844968796, + -0.022906983271241188, + 0.029625285416841507, + -0.019750190898776054, + 0.006256250664591789, + -0.017470285296440125, + -0.022920474410057068, + 0.050130948424339294, + -0.024323493242263794, + -0.0070285857655107975, + -0.0006568219978362322, + -0.03329471871256828, + -0.024768682196736336, + 0.01639103889465332, + -0.0332137756049633, + -0.009301746264100075, + 0.02360849268734455, + 0.052856042981147766, + 0.027439814060926437, + 0.011224151588976383, + 0.012647407129406929, + -0.03952736034989357, + 0.006067382637411356, + -0.01837415248155594, + 0.0369371734559536, + 0.03299792855978012, + -0.0011416393099352717, + 0.0030994578264653683, + -0.004610401578247547, + 0.017294907942414284, + 0.031163210049271584, + 0.02768264338374138, + -0.0028701182454824448, + -0.004822877701371908, + -0.061948686838150024, + -0.0015902005834504962, + 0.006016793195158243, + 0.014421416446566582, + 0.019642265513539314, + -0.014839624054729939, + 0.01653943583369255, + 0.003456957871094346, + -0.005241085309535265, + 0.005433326121419668, + -0.0005438384832814336, + -0.02819528616964817, + -0.043061889708042145, + 0.0027621935587376356, + -0.014407926239073277, + 0.019561322405934334, + -0.009922312572598457, + -0.017875000834465027, + -0.04039075970649719, + -0.009335472248494625, + -0.0127688217908144, + -0.021908681839704514, + 0.015810944139957428, + 0.029706228524446487, + 0.03906868398189545, + -0.00922754779458046, + -0.008175283670425415, + -0.06394528597593307, + 0.026859719306230545, + 0.006799245718866587, + -0.01639103889465332, + 0.012330378405749798, + 0.01397622749209404, + 0.006134835537523031, + 0.02565905824303627, + 0.005517642013728619, + 0.008930755779147148, + -0.002433361019939184, + 0.015176888555288315, + -0.01049566175788641, + -0.05191170424222946, + -0.004225920420140028, + -0.016876699402928352, + 0.007966180332005024, + 0.015082454308867455, + 0.006816109176725149, + -0.03995906189084053, + -0.03048868291079998, + 0.006667712703347206, + 0.0014325296506285667, + 0.004239410627633333, + 0.024512359872460365, + 0.02797943726181984, + 0.007352359127253294, + -0.019912077113986015, + -0.027250945568084717, + 0.008984717540442944, + -0.017888491973280907, + -0.03008396551012993, + 0.015568114817142487, + -0.061948686838150024, + -0.01670132204890251, + 0.03283604234457016, + -0.001235230010934174, + -0.014043680392205715, + -0.014569812454283237, + 0.05191170424222946, + -0.03262019157409668, + 0.015433209016919136, + -0.010886888019740582, + -0.057361893355846405, + -0.015703020617365837, + -0.0006188797997310758, + -0.002495754975825548, + -0.023864813148975372, + 0.0284111350774765, + 0.010016745887696743, + 0.0024417927488684654, + -0.024363964796066284, + 0.029517361894249916, + -0.011332076974213123, + -0.009011698886752129, + 0.027520757168531418, + -0.06313585489988327, + 0.008789104409515858, + -0.048215288668870926, + 0.01393575593829155, + -0.033888306468725204, + -0.02795245498418808, + -0.013247736729681492, + -0.017443303018808365, + -0.009618774056434631, + -0.005726745817810297, + -0.02132858708500862, + 0.02131509594619274, + -0.007986416108906269, + -0.031756795942783356, + -0.01903519034385681, + -0.026171701028943062, + 0.004974646493792534, + 0.008256226778030396, + -0.020087454468011856, + -0.027439814060926437, + -0.04978019371628761, + -0.030812455341219902, + 0.04004000499844551, + 0.06113925203680992, + 0.031271133571863174, + 0.0017419694922864437, + -0.03494057059288025, + 0.0029409436974674463, + -0.041146229952573776, + -0.023972738534212112, + -0.00824273657053709, + 0.03588490933179855, + -0.007676132954657078, + 0.036343589425086975, + -0.010880142450332642, + 0.033780381083488464, + -0.025159908458590508, + -0.02797943726181984, + -0.02542972005903721, + 0.015595096163451672, + 0.011662594974040985, + 0.011332076974213123, + -0.02569952979683876, + 0.033591512590646744, + 0.015851415693759918, + 0.022259436547756195, + 0.008748632855713367, + -0.02074849233031273, + -0.004961156286299229, + -0.016957642510533333, + 0.017375851050019264, + -0.014812642708420753, + -0.0326741524040699, + -0.03245830535888672, + -0.011669340543448925, + 0.03952736034989357, + 0.04926755279302597, + -0.0036424531135708094, + 0.022475285455584526, + 0.033996228128671646, + -0.006849835626780987, + -0.013335425406694412, + -0.04888981580734253, + 0.0003737308725249022, + -0.00699485931545496, + 0.03701811656355858, + -0.020168397575616837, + -0.05380038172006607, + -0.022745097056031227, + -0.06059962883591652, + 0.024377455934882164, + 0.009166840463876724, + 0.0130386333912611, + -0.008053869009017944, + 0.020438209176063538, + -0.003895401256158948, + -0.008755378425121307, + 0.001345684053376317, + 0.03914962708950043, + 0.019426416605710983, + -0.0019325237954035401, + 0.004610401578247547, + -0.026117738336324692, + -0.030974343419075012, + 0.011325331404805183, + -0.04357453063130379, + -0.02337915264070034, + -0.033699437975883484, + -0.020546134561300278, + -0.05072453245520592, + -0.009585048072040081, + -0.017173491418361664, + 0.015082454308867455, + -0.01590537838637829, + -0.02335217222571373, + 0.011952642351388931, + -0.024512359872460365, + -0.000516435771714896, + 0.03709905967116356, + 0.013504058122634888, + 0.03534528613090515, + 0.05908868461847305, + 0.003571627661585808, + -0.022272925823926926, + 0.01875188946723938, + 0.020532643422484398, + -0.001698968349955976, + 0.02370292693376541, + -0.029571322724223137, + 0.01635056734085083, + -0.014610284008085728, + 0.008775614202022552, + -0.007736840285360813, + -0.03429302200675011, + 0.004171957727521658, + 0.0009628892294131219, + 0.01657990738749504, + 0.0029190215282142162, + -0.06448490917682648, + -0.04033679515123367, + -0.01403019018471241, + -0.014812642708420753, + 0.049834154546260834, + 0.0014611970400437713, + 0.033645473420619965, + 0.0027605073992162943, + 0.027358870953321457, + -0.017524246126413345, + 0.010124670341610909, + -0.03583094850182533, + 0.01066429354250431, + -0.033834341913461685, + -0.0010354010155424476, + 0.010772217996418476, + -0.06318981945514679, + 0.033753398805856705, + -0.026333587244153023, + -0.0027976064011454582, + 0.027291417121887207, + -0.017686134204268456, + 0.03029981441795826, + -0.027534248307347298, + 0.026832738891243935, + 0.004381061531603336, + -0.012148255482316017, + -0.020195379853248596, + 0.00023566334857605398, + 0.04381736367940903, + 0.019507359713315964, + -0.0070960381999611855, + -0.0063000950030982494, + -0.003693042788654566, + 0.014192076399922371, + -0.0027402713894844055, + -0.026266135275363922, + -0.021760284900665283, + -0.021436510607600212, + 0.0036053541116416454, + -0.007386085577309132, + -0.006738538388162851, + 0.022731605917215347, + 0.03065056912600994, + 0.03008396551012993, + 0.019669247791171074, + -0.00812132190912962, + -0.031621888279914856, + -0.031567927449941635, + -0.036046795547008514, + -0.022165002301335335, + 0.051614910364151, + -0.005338891874998808, + -0.022664153948426247, + -0.012269671075046062, + -0.01040122751146555, + 0.013962737284600735, + 0.017227454110980034, + -0.012134765274822712, + 0.006158444099128246, + 0.0425492487847805, + 0.00040071201510727406, + -0.009983019903302193, + 0.017794057726860046, + -0.021935662254691124, + -0.0015733373584225774, + -0.04408717527985573, + -0.01614820957183838, + 0.004505849443376064, + -0.015176888555288315, + 0.01505547296255827, + 0.031190192326903343, + -0.06043774262070656, + 0.033753398805856705, + 0.022596700116991997, + -0.014839624054729939, + -0.010934105142951012, + -0.00470483535900712, + 0.024094153195619583, + 0.0321345329284668, + -0.014907076954841614, + 0.009483869187533855, + -0.016903681680560112, + 0.024620285257697105, + 0.007406321354210377, + 0.01633707620203495, + -0.0008486409788019955, + 0.015716511756181717, + -0.024687739089131355, + -0.012114529497921467, + 0.033807363361120224, + 0.013308444991707802, + -0.006397901568561792, + 0.031513966619968414, + 0.01519037876278162, + -0.00955132208764553, + 0.017483774572610855, + 0.007858255878090858, + 0.026954153552651405, + -0.0011163444723933935, + -0.014124623499810696, + 0.008593491278588772, + -0.015203868970274925, + -0.02587490901350975, + -0.029517361894249916, + -0.02833019196987152, + -0.043196797370910645, + -0.0007402948685921729, + 0.007264670450240374, + -0.0032175004016608, + 0.006856580730527639, + 0.03038075752556324, + 0.001789186499081552, + 0.011298350058495998, + 0.02571302093565464, + 0.01864396408200264, + 0.020519152283668518, + -0.03968925029039383, + 0.014947548508644104, + 0.03046170063316822, + -0.0013684494188055396, + 0.04424906149506569, + 0.0028094106819480658, + -0.011122972704470158, + -0.0026036794297397137, + 0.019426416605710983, + -0.015851415693759918, + 0.0330788716673851, + -0.02822226658463478, + -0.006074127741158009, + -0.012101039290428162, + -0.006627241149544716, + 0.019251039251685143, + 0.022326888516545296, + 0.006016793195158243, + 0.02368943579494953, + -0.05860302597284317, + 0.022650662809610367, + -0.00465761823579669, + 0.014880095608532429, + -0.007851510308682919, + -0.0118379732593894, + -0.01036075595766306, + -0.02534877508878708, + -0.00838438794016838, + -0.009052170440554619, + 0.0080336332321167, + -0.045544154942035675, + -0.0037065334618091583, + -0.018212266266345978, + 0.022853020578622818, + -0.031729813665151596, + 0.0007141568930819631, + 0.02111273817718029, + -0.015810944139957428, + -0.009780661202967167, + 0.010131415911018848, + 0.011399528943002224, + -0.03688321262598038, + -0.033915285021066666, + -0.02575349248945713, + 0.01643151044845581, + 0.029355473816394806, + -0.029949059709906578, + -0.015257831662893295, + -0.01892726682126522, + 0.01608075574040413, + 0.029706228524446487, + 0.03310585394501686, + 0.033780381083488464, + 0.04022887349128723, + -0.011851463466882706, + -0.008795849978923798, + -0.0020185261964797974, + -0.050346795469522476, + 0.014583303593099117, + 0.019224058836698532, + 0.0017352242721244693, + -0.0010075767058879137, + -0.029004719108343124, + 0.012350614182651043, + -0.029031701385974884, + 0.07792151719331741, + -0.012836274690926075, + -0.03048868291079998, + -0.001827971893362701, + -0.004354080650955439, + 0.0370720773935318, + -0.013713161461055279, + -0.0030286323744803667, + -0.03502151370048523, + -0.006357430014759302, + -0.005561486352235079, + 0.02541622892022133, + 0.010765472427010536, + -0.005625566467642784, + -0.0029628658667206764, + -0.00174871482886374, + 0.008944245986640453, + -0.05218151584267616, + 0.000813649850897491, + 0.027277927845716476, + -0.0018347171135246754, + -0.03208056837320328, + 0.004205684177577496, + -0.033699437975883484, + 0.03065056912600994, + -0.0066879489459097385, + -0.0032815805170685053, + -0.0008962795836851001, + -0.031406041234731674, + 0.02827622927725315, + -0.02352754957973957, + -0.002190530765801668, + 0.0067823827266693115, + 0.023905284702777863, + -0.0047925240360200405, + 0.011891935020685196, + -0.004397924989461899, + 0.0005750354030169547, + -0.01636405847966671, + 0.003229304449632764, + -0.03947339951992035, + -0.006279859226197004, + -0.02795245498418808, + -0.014259529300034046, + -0.017942454665899277, + -0.0016525945393368602, + -0.0025395993143320084, + 0.011055519804358482, + -0.008856557309627533, + -0.0035817455500364304, + -0.028977738693356514, + -0.02364896424114704, + -0.005564859136939049, + 0.006546297576278448, + 0.056768305599689484, + 0.0007440890767611563, + 0.0065395524725317955, + -0.03445490822196007, + -0.008182029239833355, + -0.00828995369374752, + -0.040930382907390594, + -0.019075661897659302, + 0.002920707920566201, + 0.04265717417001724, + -0.017294907942414284, + 0.029247550293803215, + 0.002514304593205452, + 0.029841134324669838, + -0.00037562797660939395, + -0.003922382369637489, + 0.005288302432745695, + -0.040741514414548874, + 0.0026660733856260777, + -0.011237642727792263, + 0.014758680947124958, + -0.017834529280662537, + -0.011035284027457237, + -0.005514269229024649, + 0.0071500008925795555, + -0.03817830607295036, + 0.036370567977428436, + 0.0017504011048004031, + -0.022326888516545296, + -0.005301793105900288, + -0.01295094471424818, + -0.014583303593099117, + 0.00928151048719883, + -0.033915285021066666, + -0.011176935397088528, + 0.001419039093889296, + 0.020411228761076927, + -0.019183587282896042, + -0.010590095072984695, + -0.01398971863090992, + -0.006192170549184084, + 0.0006787441670894623, + -0.007757076062262058, + -0.0033911913633346558, + 0.0034434671979397535, + -0.04678528755903244, + 0.0020758609753102064, + -0.01680924743413925, + 0.001505884574726224, + 0.01633707620203495, + 0.03059660643339157, + -0.0030387502629309893, + -0.0324043408036232, + 0.03318679705262184, + 0.023837832733988762, + 0.007440047804266214, + 0.012647407129406929, + 0.029895097017288208, + -0.03491358831524849, + -0.007129764650017023, + -0.005773962941020727, + -0.006792500615119934, + -0.0010219104588031769, + -0.027116039767861366, + -0.04217151179909706, + -0.015487171709537506, + -0.010853161104023457, + -0.02537575736641884, + 0.03742283210158348, + 0.004984764847904444, + -0.011338821612298489, + 0.0037706135772168636, + -0.03275509923696518, + -0.0007837176672182977, + 0.013429859653115273, + -0.031190192326903343, + -0.022057076916098595, + -0.024107644334435463, + 0.02348707802593708, + 0.010596840642392635, + -0.010805943980813026, + -0.040984343737363815, + 0.0210722666233778, + 0.020073963329195976, + -0.0052781845442950726, + 0.02613122947514057, + 0.0026812502183020115, + -0.0006972937262617052, + 0.0003996580489911139, + -0.052532270550727844, + -0.005787453148514032, + 0.01411113329231739, + -0.0284111350774765, + 0.0007048821425996721, + -0.006222524214535952, + 0.015932360664010048, + -0.03771962597966194, + -0.020492171868681908, + -0.014246039092540741, + 0.007986416108906269, + -0.00802014209330082, + -0.00764240650460124, + -0.007757076062262058, + -0.007662642281502485, + -0.01896773837506771, + 0.019979530945420265, + -0.04894377663731575, + 0.005335519555956125, + -0.0017385968239977956, + 0.0056221941486001015, + -0.02100481279194355, + 0.0003676179621834308, + 0.04149698466062546, + 0.002133195986971259, + 0.017106039449572563, + -0.017510756850242615, + -0.022704625502228737, + 0.03191868215799332, + -0.031406041234731674, + 0.010644057765603065, + 0.020100945606827736, + 0.010367500595748425, + 0.02092386968433857, + 0.026117738336324692, + 0.018158303573727608, + 0.04263019189238548, + -0.06275811791419983, + 0.021679341793060303, + 0.005230967421084642, + -0.007156745996326208, + -0.03051566332578659, + 0.012249435298144817, + -0.014839624054729939, + -0.01636405847966671, + 0.004357453435659409, + 0.04168585315346718, + -4.945663022226654e-05, + 0.03742283210158348, + -0.04238736256957054, + 0.041038304567337036, + -0.0037099060136824846, + 0.02073500119149685, + 0.0013625472784042358, + -0.0025682668201625347, + 0.05612076073884964, + -0.017133019864559174, + -0.020006511360406876, + -0.02827622927725315, + -0.0058683967217803, + 0.04662340134382248, + 0.006209033541381359, + 0.0068801892921328545, + -0.011062265373766422, + -0.028815852478146553, + -0.006512571591883898, + 0.0009561439510434866, + -0.009160094894468784, + 0.009295000694692135, + 0.0009451828664168715, + 0.009517595171928406, + -0.009861604310572147, + -0.004077523946762085, + -0.009780661202967167, + -0.01895424723625183, + -0.0037099060136824846, + -0.007568208035081625, + 0.01844160631299019, + 0.0004768072394654155, + 0.006725047715008259, + 0.005750354379415512, + 0.029571322724223137, + 0.004492358770221472, + -0.02128811553120613, + -0.009052170440554619, + 0.025119436904788017, + 0.06518641859292984, + -0.013214010745286942, + -0.009787406772375107, + -0.004232665523886681, + -0.01181773655116558, + 0.027143022045493126, + -0.043115854263305664, + -0.027008116245269775, + -0.022461794316768646, + 0.004215802066028118, + 0.010590095072984695, + 0.03769264370203018, + -0.020438209176063538, + 0.01863047294318676, + 0.04611076042056084, + 0.031082266941666603, + -0.0025615214835852385, + -0.04673132672905922, + 0.008863302879035473, + -0.009821132756769657, + -0.036127738654613495, + 0.021881699562072754, + -0.006023538298904896, + -0.022340379655361176, + -0.02065405808389187, + 0.006836344953626394, + -0.04648849368095398, + 0.027304908260703087, + -0.014542831107974052, + -0.005284929648041725, + 0.005649175029247999, + 0.04891679808497429, + -0.013827831484377384, + -4.782300675287843e-05, + 0.007939198985695839, + -0.003952736034989357, + 0.0037706135772168636, + -0.008350661024451256, + 0.024809153750538826, + 0.003895401256158948, + -0.0038245758041739464, + -0.048296231776475906, + -0.017942454665899277, + -0.0184685867279768, + -0.0016129659488797188, + -0.006239387206733227, + -0.014731699600815773, + -0.02061358653008938, + 0.020262831822037697, + 0.019669247791171074, + 0.02569952979683876, + 0.02302839793264866, + 0.00526469387114048, + -0.011237642727792263, + -0.007500755600631237, + 0.010252831503748894, + -0.007325378246605396, + 0.03326774016022682, + -0.0465424582362175, + -0.0032664036843925714, + 0.004866722039878368, + -0.01531179342418909, + 0.012532737106084824, + -0.014664246700704098, + -0.005092689301818609, + -0.008128066547214985, + 0.0302728321403265, + 0.004195566289126873, + -0.010853161104023457, + 0.0008570725913159549, + -0.037476796656847, + 0.012316888198256493, + 0.017551228404045105, + 0.010785708203911781, + 0.031325098127126694, + 0.0058346702717244625, + -0.009719953872263432, + 0.005898750387132168, + 0.015756983309984207, + -0.036289624869823456, + 0.0094029251486063, + 0.013308444991707802, + -0.012087548151612282, + 0.012141510844230652, + -0.04856604337692261, + -0.024660756811499596, + 0.029247550293803215, + -0.004927429836243391, + -0.015581605024635792, + -0.003881910815834999, + 0.0032647172920405865, + -0.006613750476390123, + -0.01621566154062748, + 0.003053927095606923, + 0.007898727431893349, + -0.021989624947309494, + 0.045840948820114136, + -0.00526469387114048, + -0.01617518998682499, + -0.019696228206157684, + 0.008404623717069626, + 0.012377595528960228, + -0.02142302133142948, + 0.012438302859663963, + -0.008526038378477097, + 0.006067382637411356, + 0.005854906048625708, + -0.004937547724694014, + 0.006117972079664469, + -0.008431604132056236, + 0.02564556896686554, + 0.0017841275548562407, + -0.02811434306204319, + 0.018158303573727608, + -0.006097736302763224, + -0.015028491616249084, + 0.027277927845716476, + 0.008667689748108387, + -0.03483264520764351, + 0.016984624788165092, + -0.0006530277896672487, + 0.017659151926636696, + 0.011709812097251415, + 0.019426416605710983, + -0.05412415415048599, + 0.006010047625750303, + -0.07937850058078766, + -0.015487171709537506, + 0.00634056655690074, + -0.011945897713303566, + -0.01639103889465332, + -0.01160188764333725, + -0.01598632149398327, + 0.0010337147396057844, + -0.000995772541500628, + -0.005025236401706934, + 0.012802548706531525, + -0.025173397734761238, + -0.006451863795518875, + -0.029112644493579865, + -0.003723396686837077, + -0.03251226618885994, + -0.01397622749209404, + -0.013065614737570286, + 0.003473821096122265, + -0.002649210160598159, + 0.05444793030619621, + -0.0040640332736074924, + 4.458210969460197e-05, + 0.013497312553226948, + -0.009166840463876724, + 0.0011753656435757875, + -0.022515757009387016, + -0.005929104518145323, + -0.0281413234770298, + 0.008269717916846275, + 0.03726094588637352, + -0.036478493362665176, + 0.03224245458841324, + 0.02360849268734455, + 0.012364105321466923, + -0.0052512031979858875, + -0.013106086291372776, + -0.002209080383181572, + 0.010468680411577225, + 0.012391085736453533, + 0.036262646317481995, + -0.020073963329195976, + -0.01401669904589653, + -0.0048195053823292255, + -0.022745097056031227, + 0.031433023512363434, + 0.006374293006956577, + -0.00814830232411623, + -0.0030994578264653683, + -0.004205684177577496, + 0.013908774591982365, + -0.010954340919852257, + -0.017915474250912666, + 0.019291510805487633, + 0.003355778520926833, + 0.007433302700519562, + 0.012087548151612282, + -0.006883562076836824, + -0.027250945568084717, + -0.004829623270779848, + -0.007069057319313288, + 0.036154720932245255, + -0.02808736078441143, + 0.0016981251537799835, + 0.010698019526898861, + 0.012424812652170658, + -0.010138161480426788, + -0.0016694576479494572, + 0.025038493797183037, + 0.010967831127345562, + -0.017348868772387505, + -0.02100481279194355, + -0.008613727055490017, + -0.021530944854021072, + 0.003155106445774436, + 0.014893586747348309, + 0.018266228958964348, + 0.028492078185081482, + -0.003723396686837077, + 0.03229641914367676, + 0.007446793373674154, + -0.007210708223283291, + 0.0016804187325760722, + 0.029571322724223137, + 0.027615191414952278, + 0.017713114619255066, + 0.021517455577850342, + 0.010455189272761345, + 0.022340379655361176, + -0.01863047294318676, + 0.019305001944303513, + -0.02822226658463478, + -0.0017158315749838948, + -0.013659199699759483, + 0.00955132208764553, + 0.004603656008839607, + 0.03008396551012993, + -0.0040640332736074924, + 0.019588302820920944, + 0.024310002103447914, + -0.02122066169977188, + ], + "index": 90, + }, + { + "title": "Fuzhou", + "text": "Fuzhou (Chinese: \u798f\u5dde; formerly Foochow) is the capital and one of the largest cities in Fujian province, People's Republic of China. Along with the many counties of Ningde, those of Fuzhou are considered to constitute the Mindong (lit. East of Fujian) linguistic and cultural area.Fuzhou's core counties lie on the north (left) bank of the estuary of Fujian's largest river, the Min River. All along its northern border lies Ningde, and Ningde's Gutian County lies upriver.", + "vector": [ + 0.00944509543478489, + 0.09612657874822617, + -0.013512429781258106, + -0.010648109018802643, + 0.0045900726690888405, + -0.0046974848955869675, + -0.0004128648724872619, + -0.027382899075746536, + -0.04923766106367111, + -0.042993441224098206, + -0.011507405899465084, + 0.01715727709233761, + -0.05562509223818779, + 0.023129383102059364, + 0.007121415343135595, + 0.008012935519218445, + -0.022341696545481682, + 0.03892610967159271, + -0.025592699646949768, + -0.005023301113396883, + -0.006716830190271139, + 0.026595210656523705, + 0.0036537982523441315, + -0.013727253302931786, + 0.0062298960983753204, + 0.04127484932541847, + -0.010841450653970242, + -0.02318667061626911, + -0.016340944916009903, + 0.024203503504395485, + 0.04943816363811493, + -0.012087429873645306, + 0.009974994696676731, + -0.029130134731531143, + -0.02211255021393299, + 0.031650736927986145, + 0.03929847106337547, + -0.004264256451278925, + 0.018847225233912468, + 0.044769320636987686, + 0.013712931424379349, + -0.013548233546316624, + 0.049409519881010056, + 0.028328124433755875, + 0.003200877457857132, + -0.04330851882696152, + 0.0011331966379657388, + -0.03480148687958717, + -0.014414690434932709, + -0.01488014217466116, + 0.03497334569692612, + -0.030562294647097588, + -0.01405664999037981, + 0.04176178574562073, + -0.018116824328899384, + 0.03434319794178009, + 0.008285045623779297, + 0.08329442143440247, + -0.03786630928516388, + 0.006172609515488148, + 0.017415065318346024, + -0.039241183549165726, + 0.0003311870095785707, + 0.023415815085172653, + -0.019577626138925552, + 0.035488925874233246, + -0.013082781806588173, + -0.01775878295302391, + 0.006734732538461685, + -0.02132486179471016, + 0.0019978631753474474, + 0.06324418634176254, + 0.03199445456266403, + 0.011915571056306362, + -0.0011681055184453726, + -0.007354141678661108, + -0.006025813054293394, + -0.025621341541409492, + -0.0234731025993824, + -0.024103252217173576, + 0.049409519881010056, + 0.02206958457827568, + -0.033254753798246384, + -0.006462621968239546, + -0.006444720085710287, + -0.030562294647097588, + -0.04794871434569359, + -0.03050500713288784, + -0.07292558252811432, + -0.009717205539345741, + -0.018546471372246742, + 0.007447232026606798, + -0.011908410117030144, + 0.02464747242629528, + 0.016083156690001488, + 0.0024758465588092804, + 0.03637686371803284, + 0.0040816557593643665, + -0.019362803548574448, + 0.029874857515096664, + 0.00020911773026455194, + 0.03374169021844864, + 0.023072097450494766, + 0.04316530004143715, + 0.04199093207716942, + 0.04193364456295967, + -0.021253254264593124, + -0.03995726257562637, + 0.026466315612196922, + 0.0257215928286314, + 0.04138942435383797, + 0.05917685106396675, + 0.0450843945145607, + 0.0411316342651844, + 0.000989085528999567, + 0.04972459375858307, + 0.01629798114299774, + -0.017500994727015495, + -0.017271850258111954, + 0.003480148734524846, + 0.004826379008591175, + 0.03772309422492981, + 0.03354118764400482, + -0.014300117269158363, + -0.0077694677747786045, + 0.022313052788376808, + 0.03236681595444679, + -0.020938178524374962, + 0.01709998957812786, + 0.00046724220737814903, + -0.012832153588533401, + 0.011077756993472576, + 0.03219495713710785, + 0.006519908085465431, + -0.027526114135980606, + -0.013462304137647152, + 0.0234731025993824, + 0.003517742967233062, + -0.027984406799077988, + 0.01874697394669056, + 0.001644298667088151, + 0.047060776501894, + -0.06049443781375885, + 0.0009568618843331933, + 0.017443709075450897, + -0.04156128317117691, + 0.042563796043395996, + 0.030590936541557312, + 0.038496460765600204, + -0.020121848210692406, + -0.010877255350351334, + -0.038639675825834274, + 0.05556780844926834, + -0.007275372743606567, + 0.021725866943597794, + -0.011557530611753464, + -0.004471919499337673, + 0.0020694711711257696, + 0.023072097450494766, + -0.06324418634176254, + 0.015080644749104977, + -0.017300492152571678, + 0.029588425531983376, + -0.015152252279222012, + -0.024404006078839302, + -0.04731856659054756, + 0.011407154612243176, + -0.0286288782954216, + 0.007662056013941765, + 0.020923856645822525, + 0.04075927287340164, + 0.0170570258051157, + -0.011500244960188866, + -0.037092942744493484, + -0.028514305129647255, + -0.005087748169898987, + 0.027096467092633247, + 0.04293615743517876, + 0.02501983568072319, + 0.03448641300201416, + 0.00955966766923666, + -0.044540174305438995, + 0.041160278022289276, + -0.020279385149478912, + -0.049037158489227295, + -0.0052810898050665855, + -0.024203503504395485, + -0.013627002015709877, + 0.037322089076042175, + -0.0037379376590251923, + -0.016054512932896614, + 0.007221666630357504, + 0.044167812913656235, + -0.04803464561700821, + 0.05688539519906044, + -0.010547858662903309, + -0.017314814031124115, + 0.04780549928545952, + 0.03749394789338112, + -0.009531024843454361, + -0.02169722318649292, + -0.0055854241363704205, + -0.02815626561641693, + 0.011872606351971626, + -0.006691767368465662, + 0.00880778394639492, + -0.013004012405872345, + 0.007099932990968227, + -0.03866831958293915, + -0.013641323894262314, + 0.039899978786706924, + -0.03792359679937363, + 0.010884416289627552, + 0.04588640481233597, + -0.008199116215109825, + 0.0029538299422711134, + 0.002805243246257305, + -0.011779516004025936, + 0.02534923143684864, + -0.015166574157774448, + 0.009774492122232914, + 0.017357779666781425, + -0.023014811798930168, + 0.00486218323931098, + -0.05104218050837517, + 0.04316530004143715, + -0.04333716258406639, + 0.04050148278474808, + -0.019506018608808517, + 0.016899487003684044, + -0.003974243998527527, + 0.009731527417898178, + -0.044253744184970856, + 0.036290932446718216, + -0.013784539885818958, + -0.005227384157478809, + -0.024905262514948845, + -0.00034103309735655785, + 0.004704645369201899, + 0.053963787853717804, + -0.0157967247068882, + 0.03259596228599548, + -0.001917304121889174, + 0.02877209335565567, + 0.022799987345933914, + -0.019563306123018265, + 0.006544970907270908, + -0.003603672608733177, + 0.005968526937067509, + -0.028557270765304565, + -0.017458030954003334, + -0.018431898206472397, + 0.02947385236620903, + 0.039155252277851105, + -0.026681140065193176, + 0.018589437007904053, + -0.0021016946993768215, + -0.02291456051170826, + 0.008650246076285839, + -0.026738427579402924, + -0.022313052788376808, + -0.01687084510922432, + 0.03359847143292427, + -0.002721104072406888, + -0.0046581001952290535, + 0.011213812977075577, + -0.037092942744493484, + 0.03102058544754982, + -0.022613806650042534, + 0.013734414242208004, + 0.022141193971037865, + 0.008478387258946896, + 0.016283659264445305, + -0.011636300012469292, + -0.04989645257592201, + -0.013190193101763725, + -0.0026315939612686634, + 0.020866570994257927, + 0.032825104892253876, + 0.0017848294228315353, + 0.02000727504491806, + 0.06158287823200226, + -0.006351629737764597, + -0.028170587494969368, + -0.046888917684555054, + -0.004908728413283825, + -0.016412552446126938, + 0.035775355994701385, + -1.8167733287555166e-05, + -0.028013048693537712, + 0.002092743758112192, + -0.04897987097501755, + -0.005288250744342804, + -0.021195968613028526, + -0.012223485857248306, + 0.005950624588876963, + 0.014751248061656952, + 0.02005023881793022, + -0.005016140174120665, + 0.0011645250488072634, + -0.0404728427529335, + -0.012259289622306824, + 0.010075245052576065, + 0.006641641724854708, + 0.050440672785043716, + 0.03182259574532509, + -0.019949989393353462, + -0.005556780844926834, + -0.06484820693731308, + -0.04686027392745018, + 0.040415555238723755, + -0.004504143260419369, + -0.05258891358971596, + 0.00504836393520236, + -0.023029131814837456, + -0.013784539885818958, + -0.01276770606637001, + -0.03904068097472191, + -0.021912047639489174, + -0.026366064324975014, + -0.04370952397584915, + -0.02174018882215023, + -0.030476365238428116, + -0.01565350778400898, + 0.005793087184429169, + 0.008220598101615906, + -0.022098228335380554, + 0.02060878276824951, + 0.035632140934467316, + 0.04840700700879097, + -0.03929847106337547, + -0.03631957620382309, + -0.01785903424024582, + -0.014565067365765572, + -0.0419050008058548, + 0.0037522590719163418, + 0.009616954252123833, + 0.019004762172698975, + -0.008664567954838276, + 0.07498789578676224, + -0.005972106941044331, + 0.014249991625547409, + 0.03251003101468086, + 0.020723354071378708, + 0.025707270950078964, + 0.029674354940652847, + 0.03594721481204033, + -0.023859785869717598, + 0.015195216983556747, + -0.05797383561730385, + 0.0006731151952408254, + -0.05763011798262596, + 0.001617445726878941, + 0.002286085393279791, + 0.015152252279222012, + 0.008170472458004951, + -0.0329110361635685, + -0.018618078902363777, + -0.004786994773894548, + 0.02202662080526352, + -0.04325123131275177, + 0.01213755551725626, + -0.036290932446718216, + 0.01972084306180477, + 0.024618830531835556, + 0.004661680664867163, + -0.019949989393353462, + 0.016856523230671883, + 0.008764819242060184, + 0.02145375683903694, + 0.020837927237153053, + 0.0694311186671257, + -0.018102502450346947, + 0.014486297965049744, + 0.014937428757548332, + -0.005821730475872755, + 0.008313688449561596, + -0.0167276281863451, + 0.002474056323990226, + -0.025607019662857056, + 0.025750236585736275, + 0.02984621375799179, + 0.05350549519062042, + 0.04282158240675926, + 0.014471977017819881, + -0.030304504558444023, + -0.010948862880468369, + -0.007099932990968227, + -0.01639823243021965, + 0.035546209663152695, + -0.05430750548839569, + 0.02005023881793022, + 0.005538878496736288, + 0.026179883629083633, + 0.012968208640813828, + -0.024962548166513443, + -0.0835808590054512, + 0.005499494262039661, + 0.009409290738403797, + -0.061411019414663315, + 0.012717580422759056, + 0.016412552446126938, + 0.019190942868590355, + 0.007547483313828707, + 0.002354112919420004, + 0.028972595930099487, + -0.011399993672966957, + -0.008635925129055977, + -0.057716045528650284, + 0.05952056869864464, + 0.002805243246257305, + -0.022785665467381477, + 0.012638811953365803, + -0.016269337385892868, + -0.013720092363655567, + 0.023788176476955414, + -0.032080382108688354, + -0.018145466223359108, + 0.021969333291053772, + 0.014808534644544125, + 0.026136919856071472, + -0.03640550747513771, + 0.021826118230819702, + -0.029502496123313904, + 0.004629456903785467, + 0.02788415551185608, + 0.01164346095174551, + 0.02408893033862114, + -0.01396355964243412, + 0.05304720625281334, + -0.011772355064749718, + -0.009194467216730118, + 0.01377737894654274, + 0.017930643633008003, + 0.0072145056910812855, + -0.020393958315253258, + 0.037236157804727554, + -0.0143430819734931, + 0.017357779666781425, + 0.04428238794207573, + 0.02487661875784397, + -0.018388934433460236, + 0.020393958315253258, + 0.006143966224044561, + -0.033197470009326935, + -0.01009672787040472, + 0.01026142667979002, + -0.01525250356644392, + 0.006373112089931965, + 0.03248138725757599, + -0.029259027913212776, + -0.020207777619361877, + -0.035402994602918625, + 0.03692108392715454, + -0.0015932780224829912, + 0.011349868029356003, + 0.025363553315401077, + 0.007884040474891663, + 0.03497334569692612, + -0.009710044600069523, + 0.0034568761475384235, + -0.014565067365765572, + 0.021482400596141815, + 0.0003311870095785707, + 0.015309790149331093, + -0.03987133502960205, + 0.04531354084610939, + -0.045571330934762955, + -0.0327964648604393, + -0.0012271821033209562, + -0.011235294863581657, + 0.031135158613324165, + -0.029216064140200615, + -0.04176178574562073, + -0.031708020716905594, + 0.020222099497914314, + -0.02749747224152088, + -0.06960297375917435, + 0.04330851882696152, + -0.0018528569489717484, + -0.004095977637916803, + -0.018961798399686813, + -0.035259779542684555, + -0.038725607097148895, + 0.02586480975151062, + 0.023888427764177322, + -0.007540322374552488, + -0.012187681160867214, + 0.05731504410505295, + 0.012574364431202412, + 0.04293615743517876, + -0.018116824328899384, + -0.01813114620745182, + 0.0015207749092951417, + -0.0007720237481407821, + 0.025664307177066803, + -0.03102058544754982, + -0.034887418150901794, + -0.05270348861813545, + -0.044167812913656235, + 0.021568330004811287, + 0.07624819874763489, + 0.02300048992037773, + -0.03514520451426506, + -0.012388183735311031, + 0.03497334569692612, + -0.054049719125032425, + 0.013175872154533863, + -0.022656770423054695, + -0.04296480119228363, + 0.016369588673114777, + -0.019749486818909645, + 0.014479137025773525, + -0.026179883629083633, + -0.022098228335380554, + -0.033340685069561005, + 0.030476365238428116, + 0.039756760001182556, + 0.015811046585440636, + 0.004389570560306311, + -0.014586549252271652, + 0.02553541213274002, + -0.04834971949458122, + -0.012889440171420574, + 0.027296969667077065, + -0.023158026859164238, + -0.021711545065045357, + -0.004196228925138712, + -0.01818843185901642, + -0.06897282600402832, + -0.03666329383850098, + 0.010648109018802643, + 0.004421793855726719, + -0.0009568618843331933, + 0.08031553030014038, + -0.03566078469157219, + -0.0012039095163345337, + -0.023401493206620216, + 0.006251378450542688, + -0.009960672818124294, + -0.045571330934762955, + -0.009710044600069523, + -0.008471226319670677, + 0.003045130055397749, + -0.006727571599185467, + -0.004618715960532427, + 0.01808818057179451, + -0.02638038620352745, + -0.02037963643670082, + 0.018388934433460236, + 0.01907637156546116, + 0.04743313789367676, + -0.056255243718624115, + 0.023315563797950745, + 0.01794496364891529, + -0.0011976438108831644, + -0.011901249177753925, + -0.00615112716332078, + -0.03574671223759651, + -0.008972481824457645, + 0.013555394485592842, + 0.042105503380298615, + -0.028199229389429092, + 0.022155513986945152, + -0.021639937534928322, + 0.023014811798930168, + 0.003039759583771229, + -0.03580399975180626, + -0.05046931654214859, + 0.030447721481323242, + 0.010948862880468369, + -0.02165425941348076, + 0.005026881583034992, + -0.01934848167002201, + 0.04061605781316757, + 0.007755146361887455, + -0.015553257428109646, + -0.04465474933385849, + -0.013154389336705208, + -0.01185828447341919, + 0.02338717319071293, + -0.0036162040196359158, + 0.022842951118946075, + 0.03205174207687378, + 0.05193012207746506, + 0.018059536814689636, + 0.022928880527615547, + -0.019992953166365623, + 0.009366326034069061, + -0.021725866943597794, + -0.012345219030976295, + 0.03623364865779877, + -0.012080269865691662, + 0.02910149097442627, + 0.007461553439497948, + 0.026451995596289635, + -0.02159697189927101, + -0.0045113037340343, + -0.03210902586579323, + 0.00890087429434061, + 0.015639187768101692, + -0.008335171267390251, + -0.003447925206273794, + -0.05894770473241806, + -0.03419997915625572, + 0.024805011227726936, + -0.029445208609104156, + 0.0036537982523441315, + -0.01452926266938448, + -0.00687436806038022, + -0.023516066372394562, + 0.020866570994257927, + 0.027583401650190353, + 0.01485149934887886, + -0.010963184759020805, + 0.025191694498062134, + -0.0029681515879929066, + 0.009495221078395844, + 0.03823867067694664, + -0.01833164691925049, + 0.027569079771637917, + -0.05783062055706978, + 0.049925096333026886, + 0.018202753737568855, + -0.04118892177939415, + -0.03293967992067337, + 0.017400743439793587, + -0.06335875391960144, + -0.019548984244465828, + -0.022241445258259773, + -0.025521090254187584, + 0.0008257297449745238, + 0.02834244631230831, + 0.009244592860341072, + 0.032538674771785736, + -0.004905147943645716, + -0.01562486495822668, + -0.04399595409631729, + -0.01606883481144905, + -0.026824356988072395, + -0.029416566714644432, + -0.0007711286307312548, + 0.025735914707183838, + -0.03222360089421272, + 0.02343013696372509, + -0.02844269759953022, + -0.0417904295027256, + -0.005123552400618792, + 0.013698610477149487, + 0.016412552446126938, + 0.019463054835796356, + 2.9006834665779024e-05, + 0.011142204515635967, + -0.010304391384124756, + -0.00874333642423153, + 0.011185169219970703, + 0.029531138017773628, + 0.0115718524903059, + 0.01846054196357727, + 0.02295752428472042, + 0.0143430819734931, + -0.022227123379707336, + 0.013834665529429913, + -0.012789188884198666, + -0.03314018249511719, + 0.0017275429563596845, + -0.01926255226135254, + 0.0034819389693439007, + 0.01532411202788353, + 0.03546028211712837, + 0.010719717480242252, + 0.019620591774582863, + 0.026695461943745613, + -0.03829595819115639, + -0.03631957620382309, + -0.010862933471798897, + 0.016226371750235558, + -0.03743666037917137, + 0.010948862880468369, + 0.003673490369692445, + -0.021869082003831863, + -0.009294718503952026, + -0.0046581001952290535, + -0.03130701556801796, + -0.0321376696228981, + 0.011450119316577911, + 0.015266825444996357, + -0.01443617232143879, + 0.020322350785136223, + 0.020222099497914314, + -0.001010567881166935, + -0.022986168041825294, + 0.015911297872662544, + 0.019477374851703644, + 0.008650246076285839, + 0.009337683208286762, + -0.027855511754751205, + -0.00046097650192677975, + 0.007762307301163673, + -0.043509021401405334, + 0.0041890679858624935, + 0.021725866943597794, + -0.0003972006088588387, + -0.06146830692887306, + 0.010254265740513802, + -0.0010794906411319971, + -0.018546471372246742, + 0.019291194155812263, + -0.020966822281479836, + -0.0030111162923276424, + 0.017744462937116623, + -0.058403484523296356, + 0.01827436126768589, + -0.013669966720044613, + -0.0482637919485569, + -0.02076631970703602, + 0.02633742243051529, + -0.05642710253596306, + 0.005417145323008299, + 0.03566078469157219, + -0.025521090254187584, + 0.00032357865711674094, + 0.02506279945373535, + 0.008499869145452976, + -0.034658271819353104, + 0.007200184278190136, + 0.004360927268862724, + 0.029731640592217445, + -0.03480148687958717, + 0.005256026983261108, + -0.02000727504491806, + 0.05576831102371216, + -0.01645551808178425, + 0.005034042522311211, + -0.007293274626135826, + 0.056914038956165314, + -0.01934848167002201, + 0.023644961416721344, + 0.04010047763586044, + -0.009810295887291431, + 0.0030737733468413353, + -0.005853953771293163, + 0.041876357048749924, + 0.022198479622602463, + -0.0004963329411111772, + -0.030247218906879425, + -0.017816070467233658, + 0.049581378698349, + -0.01701406016945839, + 0.0367492251098156, + 0.004611555021256208, + -0.04213414713740349, + 0.029903501272201538, + -0.027855511754751205, + -0.014364564791321754, + -0.009316200390458107, + -0.01990702375769615, + -0.01112788263708353, + -0.021382149308919907, + 0.02914445474743843, + -0.007955648936331272, + -0.02456154301762581, + 0.02394571527838707, + -0.016656020656228065, + -0.0019835415296256542, + -0.05476579815149307, + -0.01532411202788353, + -0.005485172849148512, + -0.007468714378774166, + -0.01311858557164669, + 0.0021894145756959915, + -0.01066243089735508, + 0.009029768407344818, + -0.04502711072564125, + 0.00908705499023199, + 0.010841450653970242, + 0.0315934494137764, + -0.026409029960632324, + 0.015639187768101692, + -0.0090226074680686, + -0.019878380000591278, + -0.002275344217196107, + -0.013548233546316624, + 1.6083828086266294e-05, + -0.023372851312160492, + -0.028499983251094818, + -0.0046974848955869675, + -0.02501983568072319, + -0.002570727141574025, + 0.035259779542684555, + -0.05969242751598358, + -0.0033369327429682016, + -0.024346720427274704, + -0.025320587679743767, + 0.006007911171764135, + -0.009144341573119164, + 0.033111538738012314, + -0.005334795918315649, + 0.014579388312995434, + -0.025377875193953514, + 0.03703565523028374, + -0.00781243247911334, + 0.0025581957306712866, + 0.025936417281627655, + 0.06152559444308281, + 0.0028840121813118458, + -0.0002163904282497242, + -0.023501744493842125, + -0.06169745326042175, + 0.017644211649894714, + 0.018303005024790764, + 0.004428954795002937, + 0.009323361329734325, + 0.07756578177213669, + -0.009738687425851822, + 0.014550745487213135, + 0.00596136599779129, + -0.013741575181484222, + -0.00561048649251461, + -0.028084658086299896, + 0.04600097984075546, + -0.011937053874135017, + 0.00047574564814567566, + 0.00974584836512804, + -0.014300117269158363, + 0.024762045592069626, + 0.02126757614314556, + -0.053304992616176605, + -0.0067454734817147255, + -0.006376692093908787, + -0.016756271943449974, + -0.030963297933340073, + -0.023673605173826218, + -0.0011296161683276296, + -0.014722604304552078, + -0.018546471372246742, + 0.05178690329194069, + -0.017558282241225243, + 0.026881642639636993, + 0.022155513986945152, + -0.039670832455158234, + -0.01916230097413063, + 0.012867957353591919, + 0.01485149934887886, + -0.02764068730175495, + -0.02287159487605095, + 0.013097102753818035, + -0.03368440270423889, + 0.010626627132296562, + -0.03846781700849533, + 0.025621341541409492, + 0.0157967247068882, + 0.02970299869775772, + 0.003567868610844016, + 0.039527613669633865, + 0.023258278146386147, + -0.0547371543943882, + -0.027239682152867317, + -0.022227123379707336, + -0.013311927206814289, + 0.021754510700702667, + 0.01565350778400898, + -0.03557485342025757, + -0.002545664319768548, + -0.003988565411418676, + -0.0008069326286204159, + 0.01850350759923458, + -0.02811329998075962, + -0.008507030084729195, + 0.014386046677827835, + -0.013440821319818497, + -0.04766228422522545, + -0.01356255542486906, + 0.005094909109175205, + -0.003132849931716919, + -0.03652007877826691, + -0.0032277305144816637, + 0.013899113051593304, + 0.03242410346865654, + 0.030104001984000206, + 0.025463804602622986, + 0.013440821319818497, + 0.041074346750974655, + -0.01063378807157278, + -0.004622296430170536, + 0.03995726257562637, + -0.005324054509401321, + 0.009795974008738995, + 0.0193055160343647, + -0.010232782922685146, + 0.010254265740513802, + 0.0392698273062706, + 0.04995374009013176, + 0.01860375888645649, + -0.0004059278580825776, + -0.011249616742134094, + -0.0261082760989666, + -0.025463804602622986, + 0.021811796352267265, + -0.0059255617670714855, + -0.010619466193020344, + -0.01488014217466116, + 0.027254004031419754, + -0.03293967992067337, + -0.011593335308134556, + 0.012624490074813366, + 0.002520601497963071, + 0.017930643633008003, + -0.00991054717451334, + 0.03660601004958153, + 0.026967572048306465, + 0.02408893033862114, + -0.042850226163864136, + -0.07859694212675095, + -0.020408280193805695, + -0.01424283068627119, + -0.04012912139296532, + 0.058317553251981735, + -0.007568965665996075, + 0.01977812871336937, + -0.003788063069805503, + 0.009180145338177681, + -0.006176189985126257, + -0.01785903424024582, + -0.009502381086349487, + -0.011722229421138763, + 0.031077871099114418, + 0.021009786054491997, + -0.005377760622650385, + 0.007662056013941765, + 0.017185918986797333, + 0.019520340487360954, + 0.027196718379855156, + 0.012388183735311031, + 0.02118164673447609, + -0.02033667080104351, + -0.027683652937412262, + -0.03351254388689995, + 0.0004121935344301164, + 0.016269337385892868, + 0.02431807667016983, + -0.0033082894515246153, + 0.030762797221541405, + -0.05384921655058861, + -0.04007183760404587, + -0.0020014436449855566, + 0.0021786733996123075, + 0.001600438728928566, + -0.030189933255314827, + 0.04935223236680031, + -0.04863615334033966, + -0.026638176292181015, + 0.01621205173432827, + -0.036806512624025345, + 0.045857761055231094, + -0.0010293649975210428, + -0.028170587494969368, + 0.019692199304699898, + 0.00817763339728117, + -0.015725117176771164, + 0.03494470193982124, + 0.030161289498209953, + 0.008356653153896332, + -0.0071572195738554, + 0.007776628714054823, + 0.005735800601541996, + 0.01374873612076044, + -0.04161857068538666, + -0.008771980181336403, + 0.007418588735163212, + -0.002130337990820408, + -0.011937053874135017, + -0.024289432913064957, + 0.015052000992000103, + 0.012925243936479092, + 0.010390320792794228, + 0.02006456069648266, + -0.006061617285013199, + 0.02287159487605095, + -0.014937428757548332, + 0.009101376868784428, + 0.03079143911600113, + 0.01916230097413063, + 0.005220223218202591, + -0.004350185859948397, + 0.025649985298514366, + 0.0141497403383255, + 0.0036949727218598127, + -0.05837484076619148, + 0.01695677451789379, + -0.0011681055184453726, + -0.009044090285897255, + 0.03265324607491493, + -0.036290932446718216, + -0.01635526679456234, + -0.023487424477934837, + -0.04133213683962822, + -0.016799235716462135, + 0.0006292553152889013, + -0.0032742756884545088, + 0.005463690496981144, + 0.0018886609468609095, + -0.041446708142757416, + -0.015223860740661621, + -0.047404494136571884, + 0.022184157744050026, + -0.005646290723234415, + 0.004006467759609222, + -0.01752963848412037, + 0.0046366178430616856, + -0.01907637156546116, + -0.03187987953424454, + 0.009702883660793304, + -0.04153263941407204, + 0.02460450865328312, + -0.018388934433460236, + -0.005750122480094433, + -0.015610544010996819, + -0.00845690444111824, + 0.009258913807570934, + -0.02060878276824951, + -0.013712931424379349, + -0.03468691557645798, + -0.03228088468313217, + -0.006233476102352142, + 0.03534570708870888, + -0.0643899142742157, + -3.896482303389348e-05, + -0.021167324855923653, + -0.03818138688802719, + -0.0015136140864342451, + -0.005861114710569382, + 0.0008266248623840511, + 0.02404596656560898, + -0.04998238384723663, + 0.03013264574110508, + -0.047060776501894, + 0.0012540350435301661, + -0.014493458904325962, + 0.022943202406167984, + -0.013627002015709877, + -0.01752963848412037, + 0.004407472442835569, + 0.02216983586549759, + -0.010039441287517548, + -0.07097785174846649, + 0.0104762502014637, + -0.008464065380394459, + -0.009144341573119164, + -0.02272837981581688, + 0.04353766515851021, + -0.01324031874537468, + 0.01695677451789379, + -0.021969333291053772, + -0.01612612046301365, + 0.007278953213244677, + -0.018245717510581017, + 0.028757771477103233, + -0.005105650518089533, + 0.003920537885278463, + -0.026494959369301796, + 0.028227873146533966, + -0.008850748650729656, + -0.043365802615880966, + -0.005689255427569151, + 0.028414053842425346, + 0.015094966627657413, + 0.03712158650159836, + 0.007712181657552719, + 0.0008378135971724987, + 0.0030164869967848063, + -0.03293967992067337, + 0.001573585788719356, + 0.0045900726690888405, + 0.038124099373817444, + 0.018618078902363777, + -0.008285045623779297, + 0.006684606894850731, + -0.018589437007904053, + -0.004944532178342342, + 0.032166313380002975, + -0.003100626403465867, + 0.011256777681410313, + 0.012445470318198204, + 0.037178874015808105, + -0.026838678866624832, + 0.002259232336655259, + 0.029416566714644432, + 0.0012898390414193273, + 0.026136919856071472, + -0.012846475467085838, + 0.006315825507044792, + 0.0035338548477739096, + 0.0025546152610331774, + 0.0005706262309104204, + -0.002463315147906542, + -0.023559032008051872, + 0.00039362022653222084, + -0.031564805656671524, + -0.0018815001240000129, + -0.016097478568553925, + -0.01775878295302391, + -0.01715727709233761, + -0.014994715340435505, + 0.032825104892253876, + 0.024633152410387993, + -0.004532786551862955, + -0.0247334036976099, + -0.01794496364891529, + -0.015209538862109184, + 0.02103842981159687, + 0.010583662427961826, + 0.0045900726690888405, + -0.000532584497705102, + 0.01466531865298748, + 0.01443617232143879, + -0.009330522269010544, + -0.01709998957812786, + 0.011901249177753925, + -0.00943793449550867, + -0.00459365313872695, + 0.021024107933044434, + -0.0154386842623353, + -0.0041210404597222805, + -0.018589437007904053, + -0.015352754853665829, + -0.01145728025585413, + 0.025649985298514366, + 0.005216642748564482, + 0.006752634420990944, + -0.008335171267390251, + -0.005624808371067047, + 0.014937428757548332, + 0.016097478568553925, + 0.018589437007904053, + 0.012810670770704746, + 0.007221666630357504, + -0.008564316667616367, + -0.023115061223506927, + -0.013977881520986557, + 0.04485525190830231, + 0.01738642156124115, + 0.0030057458207011223, + 0.025463804602622986, + 0.025735914707183838, + 0.0036233647260814905, + -0.0017329135444015265, + 0.05768740549683571, + -0.03583264350891113, + 0.017028382048010826, + 0.0022950363345444202, + 0.0006704299012199044, + 0.016698986291885376, + -0.0231437049806118, + -0.006283601745963097, + -0.0022771344520151615, + 0.010504893027245998, + -0.008163311518728733, + -0.016011549159884453, + 0.007841075770556927, + 0.013934916816651821, + -0.007096352521330118, + -0.005954205058515072, + -0.032452743500471115, + 0.013311927206814289, + -0.004876504652202129, + 0.03485877439379692, + -0.019334159791469574, + -0.020966822281479836, + -0.00017599904094822705, + 0.013691449537873268, + -0.0068994308821856976, + 0.004400311503559351, + -0.01625501550734043, + 0.0030308086425065994, + -0.03918389603495598, + 0.012817831709980965, + 0.014579388312995434, + 0.011865445412695408, + -0.001245979219675064, + -0.017500994727015495, + -0.008578638546168804, + -0.028972595930099487, + 0.004536366555839777, + -0.014063810929656029, + -0.041446708142757416, + -0.02549244835972786, + -0.01583968847990036, + -0.00716796051710844, + -0.01450061984360218, + -0.009108537808060646, + 0.0008172263042069972, + 0.0016997948987409472, + 0.0011842172825708985, + -0.009638437069952488, + 0.009223110042512417, + -0.01668466441333294, + -0.04110299050807953, + 0.007468714378774166, + -0.027239682152867317, + -0.026409029960632324, + -0.034457769244909286, + 0.0033261915668845177, + -0.0005607801140286028, + -0.023014811798930168, + 0.010404642671346664, + 0.001204804633744061, + -0.009237431921064854, + -0.02126757614314556, + -0.007053387816995382, + -0.028600234538316727, + 0.0078697195276618, + 0.03167937695980072, + 0.009215949103236198, + -0.012166199274361134, + -0.03116380050778389, + 0.02174018882215023, + 0.027382899075746536, + 0.03354118764400482, + 0.0327964648604393, + 0.028886666521430016, + 0.014751248061656952, + 0.03677786886692047, + 0.02076631970703602, + -0.019276874139904976, + 0.054479364305734634, + 0.000131803477415815, + -0.028013048693537712, + -0.006040134932845831, + -0.007776628714054823, + -0.008170472458004951, + -0.005252446513622999, + -0.013233157806098461, + 0.0457431897521019, + -0.03626229241490364, + -0.021353505551815033, + 0.021955013275146484, + 0.0143430819734931, + 0.006079519167542458, + -0.007099932990968227, + 0.011278259567916393, + 0.012159038335084915, + 0.01110640075057745, + 0.008786301128566265, + 0.009230270981788635, + 0.04104570671916008, + 0.04138942435383797, + 0.0035804000217467546, + 0.00963127613067627, + -0.017959285527467728, + 0.00298784370534122, + 0.005732220131903887, + -0.010483411140739918, + 0.03251003101468086, + -0.006913752295076847, + -0.01846054196357727, + 0.017816070467233658, + -0.027869833633303642, + -0.010483411140739918, + -0.014865820296108723, + -0.0042105503380298615, + -0.0034246526192873716, + 0.014092453755438328, + -0.012287932448089123, + 0.044311027973890305, + 0.024074608460068703, + -0.039613544940948486, + 0.012481274083256721, + 0.035861287266016006, + 0.02718239650130272, + -0.0012943146284669638, + 0.024776367470622063, + -0.032023098319768906, + 0.038639675825834274, + 0.02258516289293766, + 0.038782890886068344, + 0.02264244854450226, + -0.013927755877375603, + -0.009566828608512878, + -0.020737675949931145, + 0.011242455802857876, + 0.024489935487508774, + -0.007705020718276501, + -0.02357335388660431, + -0.04834971949458122, + -0.019004762172698975, + -0.016985418274998665, + -0.0019155140034854412, + 0.017916321754455566, + 0.027826867997646332, + -0.04643062502145767, + -0.013576876372098923, + 0.009309039451181889, + 0.004242774099111557, + 0.00034729880280792713, + -0.013447982259094715, + 0.03468691557645798, + 0.0179879292845726, + -0.03789495304226875, + -0.003428232856094837, + 0.04385273903608322, + 0.005628388840705156, + 0.011894088238477707, + 0.023315563797950745, + 0.040701985359191895, + -0.025377875193953514, + 0.011185169219970703, + -0.002923396648839116, + -0.008242080919444561, + 0.03889746591448784, + 0.010196979157626629, + -0.011901249177753925, + -0.04855022206902504, + 0.01506632287055254, + -0.01084861159324646, + -0.005467270500957966, + -0.0074973576702177525, + -0.02563566341996193, + 0.020265063270926476, + 0.014923106878995895, + -0.0039348597638309, + -0.041733141988515854, + 0.0007071290165185928, + 0.03228088468313217, + 0.01351958978921175, + -0.0027282647788524628, + 0.0016720467247068882, + -0.007411427795886993, + -0.038353245705366135, + -0.01715727709233761, + -0.03958490118384361, + 0.043136660009622574, + 0.015811046585440636, + 0.0009514912962913513, + 0.0047440300695598125, + -0.02103842981159687, + 0.037092942744493484, + -0.006928073707967997, + -0.013490946963429451, + 0.046029623597860336, + 0.00339779956266284, + 0.014142579399049282, + -0.00016044666699599475, + -0.03737937659025192, + 0.005116391461342573, + -0.005463690496981144, + -0.012524238787591457, + 0.020078882575035095, + 0.03021857514977455, + -0.01488014217466116, + -0.020021596923470497, + -0.0130541380494833, + -0.02792711928486824, + -0.029817570000886917, + -0.014779890887439251, + 0.022613806650042534, + -0.002441832795739174, + 0.00042382985702715814, + -0.0006520803435705602, + 0.01794496364891529, + 0.002452573971822858, + 0.0038525103591382504, + -0.00827072374522686, + 0.03583264350891113, + 0.015052000992000103, + 0.015682151541113853, + -0.030934656038880348, + -0.04803464561700821, + -0.013412178494036198, + 0.030676865950226784, + 0.026165563613176346, + -0.016140442341566086, + 0.01452926266938448, + -0.014020846225321293, + 0.009924869053065777, + 0.0068815285339951515, + 0.0007044436642900109, + -0.004944532178342342, + -0.03646279126405716, + -0.059119563549757004, + 0.002706782426685095, + 0.01901908405125141, + -0.016741950064897537, + 0.006537810433655977, + 0.05164368823170662, + 0.0417904295027256, + 0.03485877439379692, + -0.006072358228266239, + 0.0009819247061386704, + -0.0032169893383979797, + -0.0055854241363704205, + 0.001805416657589376, + 0.01583968847990036, + -0.04643062502145767, + -0.014923106878995895, + 0.02629445679485798, + -0.019362803548574448, + 0.0016013338463380933, + 0.020723354071378708, + 0.019090693444013596, + 0.005134293343871832, + 0.029731640592217445, + -0.012495595961809158, + -0.019334159791469574, + -0.012481274083256721, + 0.020308028906583786, + -0.002581468317657709, + -2.5286573873017915e-05, + 0.02910149097442627, + -0.001428579562343657, + -0.021281898021697998, + -0.0019137237686663866, + 0.021582650020718575, + 0.0007747090421617031, + 0.014751248061656952, + 0.03623364865779877, + 0.028056014329195023, + 0.02047988772392273, + -0.0010034070583060384, + 0.014937428757548332, + -0.011507405899465084, + -0.0329110361635685, + 0.02216983586549759, + 0.022155513986945152, + 0.012381022796034813, + -0.020694712176918983, + -0.024346720427274704, + -0.006741893012076616, + -0.00266560772433877, + -0.010490572080016136, + -0.0022986168041825294, + 0.013111424632370472, + -0.015610544010996819, + 0.02338717319071293, + 0.04809193313121796, + -0.011958535760641098, + -0.012474113143980503, + 0.03523113578557968, + 0.01450061984360218, + -0.012287932448089123, + -0.017415065318346024, + -0.023129383102059364, + -0.036720581352710724, + 0.0019029825925827026, + 0.020179133862257004, + -0.0019298355327919126, + -0.03351254388689995, + -0.027211040258407593, + -0.0014536423841491342, + -0.008721854537725449, + 0.01645551808178425, + 0.035173848271369934, + -0.03382761776447296, + 0.03205174207687378, + -0.029502496123313904, + -0.01860375888645649, + -0.004307221155613661, + 0.040186408907175064, + 0.0027927120681852102, + -0.02417485974729061, + -0.014085293747484684, + 0.010533536784350872, + -0.00022892182460054755, + -0.004880085121840239, + -0.017372099682688713, + 0.003360205329954624, + -0.06708237528800964, + 0.017185918986797333, + -0.026494959369301796, + 0.020880892872810364, + -0.013462304137647152, + 0.013827504590153694, + -0.026867320761084557, + 0.009523863904178143, + 0.0010472669964656234, + 0.007107093930244446, + 0.028170587494969368, + 0.005739381071180105, + -0.00909421592950821, + -0.0209525004029274, + -0.014507780782878399, + 0.0067239911295473576, + -0.0209525004029274, + 0.030333148315548897, + -0.015109287574887276, + 0.015667829662561417, + 0.012051626108586788, + 0.05273212864995003, + 0.025807522237300873, + 0.0007697860128246248, + 0.0046366178430616856, + 0.01823139563202858, + -0.033569831401109695, + -0.013354891911149025, + -0.03302560746669769, + -0.02460450865328312, + 0.046029623597860336, + -0.04316530004143715, + 0.056856751441955566, + 0.03468691557645798, + 0.005997169762849808, + 0.018804261460900307, + -0.0005594374961219728, + 0.02652360312640667, + 0.029903501272201538, + 0.015352754853665829, + -0.024962548166513443, + 0.00017778923211153597, + -0.03929847106337547, + 0.03079143911600113, + -0.05333363637328148, + -0.020465565845370293, + -0.02699621580541134, + -0.002089163288474083, + 0.008227759040892124, + -0.0007066814578138292, + 0.0012415036326274276, + 0.022656770423054695, + 0.015682151541113853, + 0.03669193759560585, + 0.024518579244613647, + -0.04353766515851021, + 0.003195506986230612, + 0.023587675765156746, + -0.013791700825095177, + -0.016799235716462135, + 0.001075910171493888, + -0.01658441312611103, + -0.010433285497128963, + -0.02023642137646675, + -0.0329110361635685, + 0.004153263755142689, + 0.005066265817731619, + 0.022714057937264442, + -0.011206652037799358, + 0.03368440270423889, + ], + "index": 91, + }, + { + "title": "Patricide", + "text": "Patricide is (i) the act of killing one's father, or (ii) a person who kills his father. The word patricide derives from the Latin word pater (father) and the Latin suffix -cida (cutter or killer). Patricide is a sub-form of parricide, which is defined as an act of killing a close relative.", + "vector": [ + -0.02162994258105755, + 0.009556903503835201, + -0.03192991763353348, + 0.04835101589560509, + -0.04882187023758888, + 0.04479016736149788, + -0.008497477509081364, + -0.047703590244054794, + -0.007471159100532532, + 0.03758018836379051, + 0.0345490537583828, + -0.03781561553478241, + -0.03966961055994034, + -0.041553035378456116, + -0.022571654990315437, + -0.0428478866815567, + -0.010358829982578754, + -0.0023524402640759945, + 0.023380938917398453, + -0.040081609040498734, + -0.014699532650411129, + -0.004568773787468672, + -0.009630474261939526, + -0.01789252460002899, + 0.08952148258686066, + 0.004469452425837517, + -0.00014806211402174085, + -0.010027759708464146, + -0.0021390835754573345, + -0.014066820032894611, + -0.014515604823827744, + -0.0006492661777883768, + 0.021747658029198647, + 0.034078195691108704, + 0.014110962860286236, + -0.04114103317260742, + -0.03602047637104988, + 0.0020912622567266226, + 0.06274154782295227, + 0.010380901396274567, + 0.027559785172343254, + 0.013412036001682281, + -0.0344313383102417, + 0.03961075469851494, + -0.01818680949509144, + 0.04031703621149063, + -0.013750463724136353, + 0.0038514542393386364, + -0.09782031178474426, + -0.05915127322077751, + 0.014787818305194378, + -0.020187946036458015, + -0.0019202092662453651, + 0.03663847595453262, + 0.02444036491215229, + 0.005639235023409128, + 0.03937532380223274, + -0.013809320516884327, + -0.0300759207457304, + 0.04220046103000641, + -0.02062937431037426, + -0.018392808735370636, + -0.017833666875958443, + 0.012359967455267906, + 0.039905037730932236, + 0.012234896421432495, + -0.009770260192453861, + -0.0002317493926966563, + -0.0013941748766228557, + 0.02202722802758217, + 0.04902787134051323, + 0.0044473810121417046, + -0.012985322624444962, + -0.01815738156437874, + -0.030458491295576096, + 0.012212825007736683, + 0.025190791115164757, + 0.01250710990279913, + 0.022409798577427864, + -0.012926465831696987, + 0.011131327599287033, + -0.009704045951366425, + 0.02717721462249756, + 0.03581447899341583, + 0.02848678268492222, + -0.00645955465734005, + 0.011050399392843246, + -0.06486040353775024, + 0.028575068339705467, + 0.023792937397956848, + 0.023439794778823853, + -0.016936099156737328, + 0.008688762784004211, + 0.01206568256020546, + 0.028163067996501923, + 0.026794644072651863, + 0.047585874795913696, + 0.02318965271115303, + -0.002093101618811488, + -0.031135346740484238, + -0.0344901941716671, + 0.019216805696487427, + -0.025396790355443954, + -0.04955758526921272, + -0.007294587790966034, + 0.016950812190771103, + -0.0854603499174118, + 0.029369637370109558, + 0.021747658029198647, + 0.08234092593193054, + -0.03675618767738342, + -0.003139652544632554, + 0.03457847982645035, + 0.011815540492534637, + 0.0010143633699044585, + -0.05918070301413536, + 0.04031703621149063, + -0.011925897561013699, + -0.027957068756222725, + -0.012028897181153297, + -0.03178277239203453, + -0.04561416432261467, + 0.007901550270617008, + 0.007268838118761778, + -0.02995820716023445, + 0.022659940645098686, + 0.02574993297457695, + 0.003910311032086611, + -0.040729034692049026, + -0.003735579550266266, + 0.002306458307430148, + -0.051970720291137695, + -0.0012277199421077967, + 0.08334149420261383, + 0.0343136228621006, + -0.029384350404143333, + -0.01877537928521633, + -0.014228676445782185, + 0.01880480721592903, + 0.02703007124364376, + 0.011668398045003414, + -0.00615423358976841, + -0.006573589984327555, + 0.009409761056303978, + 0.01316189393401146, + -0.021615229547023773, + 0.009409761056303978, + 0.046879589557647705, + 0.028148354962468147, + 0.034843336790800095, + 0.015317531302571297, + -0.030752776190638542, + 0.012396752834320068, + 0.015111532062292099, + 0.02669164352118969, + -0.0013748625060543418, + 0.007099624257534742, + -0.03861018270254135, + 0.009983616881072521, + 0.03275391459465027, + -0.024675792083144188, + 0.04893958568572998, + -0.00719894515350461, + 0.014000605791807175, + 0.020070232450962067, + 0.021865371614694595, + -0.039139896631240845, + -0.008254692889750004, + 0.018819522112607956, + 0.00030233178404159844, + 0.02532321959733963, + -0.04361302778124809, + 0.04814501479268074, + -0.04620273411273956, + -0.008725548163056374, + -0.0517941489815712, + 0.024793505668640137, + 0.002484868513420224, + 0.0052272360771894455, + 0.02995820716023445, + 0.012440895661711693, + 0.037521328777074814, + -0.023572223260998726, + -0.004697523545473814, + 0.007842693477869034, + 0.0060990555211901665, + 0.0037999541964381933, + 0.006128483917564154, + 0.043524742126464844, + -0.04826273024082184, + -0.027559785172343254, + 0.015214531682431698, + -0.01706852577626705, + 0.032135915011167526, + 0.026941785588860512, + 0.021835941821336746, + -0.006992945913225412, + 0.03354848176240921, + 0.017818953841924667, + 0.023204367607831955, + 0.010138115845620632, + -0.07363009452819824, + 0.0027386893052607775, + 0.09581917524337769, + 0.015096817165613174, + 0.0019606733694672585, + 0.023719366639852524, + 0.00943183246999979, + 0.03937532380223274, + -0.021924227476119995, + 0.013198679313063622, + 0.010851757600903511, + 0.005959270056337118, + 0.040787894278764725, + 0.004469452425837517, + 0.012926465831696987, + -0.023410366848111153, + 0.02017323300242424, + 0.045084454119205475, + 0.011234327219426632, + -0.0041898819617927074, + 0.018819522112607956, + 0.045231595635414124, + -0.016141528263688087, + 0.018142666667699814, + -0.01581781543791294, + -0.014339033514261246, + -0.005631878040730953, + -0.024822935461997986, + 0.032224200665950775, + 0.02703007124364376, + -0.015611816197633743, + -0.016582956537604332, + -0.016376957297325134, + -0.04184731841087341, + -0.007629337254911661, + -0.026132503524422646, + -0.045084454119205475, + -0.004186203237622976, + -0.026338502764701843, + -0.03343077003955841, + -0.007261481136083603, + -0.008004550822079182, + -0.00591144897043705, + 0.04052303731441498, + 0.03287162631750107, + -0.0052272360771894455, + -0.07827979326248169, + -0.04220046103000641, + -0.01461124699562788, + -0.029811063781380653, + 0.015641244128346443, + 0.04461359605193138, + -0.02922249399125576, + -0.010454472154378891, + -0.01227903924882412, + 0.029663922265172005, + 0.013345821760594845, + 0.018245667219161987, + 0.0474681593477726, + -0.03975789621472359, + -0.03607933223247528, + -0.0469384491443634, + 0.0018834236543625593, + 0.011366755701601505, + -0.08075178414583206, + -0.02544093318283558, + -0.013463536277413368, + -0.02532321959733963, + -0.008975690230727196, + 0.0035001514479517937, + 0.011293184943497181, + -0.029207780957221985, + -0.05294186249375343, + -0.024190222844481468, + 0.007644051220268011, + 0.0346079096198082, + 0.04476074129343033, + -0.009784974157810211, + 0.030576204881072044, + -0.027294928207993507, + -0.04196503385901451, + -0.035549622029066086, + 0.023145509883761406, + 0.053736429661512375, + -0.01328696496784687, + -0.03525533527135849, + 0.005756949074566364, + 0.026838786900043488, + 0.023483937606215477, + 0.010174902155995369, + 0.03178277239203453, + 0.0075704799965023994, + 0.020040804520249367, + -0.01544995978474617, + -0.04976358264684677, + -0.0013242822606116533, + -0.08063407242298126, + -0.01724509708583355, + -0.015420530922710896, + 0.02541150525212288, + -0.020850088447332382, + 0.032165344804525375, + 0.016950812190771103, + -0.021644657477736473, + -0.00033130045630969107, + -0.003855132730677724, + 0.019496377557516098, + -0.02398422174155712, + -0.01305889431387186, + -0.02285122498869896, + -0.040699608623981476, + 0.017598239704966545, + 0.058032989501953125, + -0.0021335657220333815, + -0.04896901547908783, + -0.006919374689459801, + -0.013088323175907135, + -0.011896468698978424, + 0.00171237054746598, + -0.0517352931201458, + 0.02032037451863289, + -0.00034739417606033385, + -0.040052179247140884, + 0.016980241984128952, + -0.058739274740219116, + -0.017200954258441925, + -0.03504933789372444, + -0.028810495510697365, + -0.03337191045284271, + -0.023763509467244148, + 0.023174939677119255, + 0.011830254457890987, + -0.010785543359816074, + -0.015832530334591866, + 0.009255261160433292, + -0.017171526327729225, + 0.05953384190797806, + 0.05488414317369461, + -0.06274154782295227, + -0.017863096669316292, + 0.008924190886318684, + 0.031311918050050735, + 0.0600929856300354, + -0.014361104927957058, + 0.026382645592093468, + -0.025602789595723152, + 0.010962113738059998, + -0.01968766190111637, + 0.02964920736849308, + 0.0005927082384005189, + 0.03204762935638428, + -0.041670747101306915, + -0.03966961055994034, + 0.014868746511638165, + -0.05732670798897743, + 0.02398422174155712, + -0.03334248438477516, + 0.04387788474559784, + -0.007710265461355448, + 0.0013435946311801672, + -0.027809927240014076, + 0.000797328248154372, + -0.06509582698345184, + -0.015979671850800514, + -0.06427183002233505, + 0.061564408242702484, + 0.05509014055132866, + 0.025823503732681274, + 0.0383453294634819, + 0.01480988971889019, + -0.043230459094047546, + 0.07480723410844803, + 0.01286025159060955, + -0.013507679104804993, + 0.013882892206311226, + 0.04476074129343033, + 0.015302817337214947, + -0.010866471566259861, + 0.018701808527112007, + -0.008806477300822735, + -0.01602381467819214, + -0.012433539144694805, + 0.0030587241053581238, + -0.060622699558734894, + -0.019672948867082596, + 0.0026890286244452, + 0.0018356023356318474, + -0.0030899918638169765, + -0.02800121158361435, + -0.015332245267927647, + 0.03354848176240921, + -0.031135346740484238, + -0.030635062605142593, + 0.01986423321068287, + -0.011337327770888805, + 0.0016176474746316671, + 0.002551082521677017, + 0.017348097637295723, + -0.05785641819238663, + 0.018024953082203865, + -0.040081609040498734, + 0.045055024325847626, + 0.037462472915649414, + 0.02093837410211563, + -0.007673479616641998, + 0.021291514858603477, + -0.026588644832372665, + -0.05052872374653816, + 0.015096817165613174, + 0.010601614601910114, + 0.020702945068478584, + 0.01227903924882412, + 0.04190617427229881, + 0.05176471918821335, + -0.02096780203282833, + -0.014118320308625698, + 0.006838446483016014, + -0.006761196535080671, + 0.02882521040737629, + -0.04905730113387108, + 0.005436914507299662, + 0.007125373929738998, + 0.004657058976590633, + 0.03275391459465027, + 0.016582956537604332, + 0.01226432528346777, + 0.0047490233555436134, + 0.05058757960796356, + 0.019040236249566078, + -0.07262952625751495, + -0.019672948867082596, + 0.009115476161241531, + 0.10711971670389175, + -0.019525805488228798, + -0.04558473825454712, + -0.019761234521865845, + 0.002392904367297888, + 0.014339033514261246, + 0.03160620108246803, + 0.00619469815865159, + -0.06244726479053497, + -0.018701808527112007, + 0.026882929727435112, + 0.0256910752505064, + 0.005782699212431908, + -0.010270544327795506, + 0.003349330509081483, + 0.02861921116709709, + -0.023660508915781975, + 0.0033107055351138115, + -0.01989366114139557, + -0.0258970744907856, + -0.01965823397040367, + 0.05158815160393715, + -0.006591982673853636, + -0.004462095443159342, + -0.05912184342741966, + -0.024263793602585793, + 0.02452865056693554, + -0.032135915011167526, + 0.021262086927890778, + -0.02976692095398903, + -0.03696218878030777, + 0.05423671379685402, + -0.01293382328003645, + 0.011727254837751389, + -0.005852591712027788, + -0.003932382445782423, + -0.0016912188148126006, + 0.011101899668574333, + 0.014316962100565434, + -0.04031703621149063, + -0.034931622445583344, + 0.02461693435907364, + -0.04470188170671463, + 0.02617664635181427, + -0.011455041356384754, + 0.009637831710278988, + -0.0004575211205519736, + 0.03928703814744949, + 0.0030734383035451174, + -0.02492593415081501, + 0.025073077529668808, + 0.005238271784037352, + -0.0561789944767952, + -0.044231027364730835, + -0.02964920736849308, + -0.05326557531952858, + 0.011020971462130547, + 0.018657665699720383, + 0.0028950280975550413, + -0.005859948694705963, + -0.049528155475854874, + 0.004693844821304083, + -0.005050665233284235, + -0.013721035793423653, + 0.028722209855914116, + 0.004234024789184332, + -0.001844798680394888, + 0.015758957713842392, + -0.0386984683573246, + 0.02065880224108696, + 0.018731236457824707, + 0.046879589557647705, + 0.034755051136016846, + 0.0017638703575357795, + 0.010270544327795506, + 0.007140088360756636, + 0.01675952784717083, + -0.023086654022336006, + 0.03749190270900726, + -0.040022753179073334, + 0.015096817165613174, + 0.006735446397215128, + -0.0023303688503801823, + 0.006389661692082882, + -0.02182122878730297, + -0.008821191266179085, + -0.009777616709470749, + -0.011800826527178288, + -0.042494744062423706, + -0.007364480756223202, + -0.04228874668478966, + -0.011366755701601505, + 0.028207210823893547, + 0.017348097637295723, + 0.014706890098750591, + 0.006967195775359869, + -0.020467517897486687, + 0.03245962783694267, + 0.027692213654518127, + 0.004620273597538471, + 0.03089991956949234, + 0.0038588112220168114, + -0.011903826147317886, + -0.02705950103700161, + -0.030635062605142593, + 0.0035130265168845654, + 0.0035369370598345995, + 0.01139618456363678, + 0.008460692130029202, + 0.026044217869639397, + 0.03166506066918373, + -0.015832530334591866, + -0.004605559166520834, + 0.018569380044937134, + 0.05414842814207077, + -0.03946360945701599, + -0.04582016542553902, + 0.008379763923585415, + -0.03678561747074127, + 0.01141089852899313, + 0.051058437675237656, + 0.04484902322292328, + -0.004267131444066763, + 0.009696688503026962, + 0.0023653151001781225, + 0.02157108671963215, + -0.014912889339029789, + 0.028898781165480614, + 0.01834866590797901, + 0.0071180169470608234, + 0.004002275411039591, + -0.036461904644966125, + 0.023380938917398453, + 0.025705790147185326, + -0.017598239704966545, + 0.03599104657769203, + 0.010550115257501602, + 0.01767181046307087, + -0.02102665975689888, + -0.027412641793489456, + 0.01983480527997017, + 0.03872789815068245, + 0.00025841896422207355, + -0.01681838370859623, + 0.01789252460002899, + 0.003950775135308504, + -0.03599104657769203, + -0.0193492341786623, + -0.0022144941613078117, + -0.03087048977613449, + 0.01986423321068287, + 0.008416549302637577, + -0.0018218077020719647, + -0.03710933029651642, + 0.02779521234333515, + 0.0171273835003376, + 0.0014162462903186679, + -0.030487919226288795, + -0.02285122498869896, + 0.03357791155576706, + 0.017774811014533043, + -0.009137547574937344, + 0.0015799422981217504, + -0.005959270056337118, + 0.01670067012310028, + 0.015744244679808617, + 0.023454509675502777, + 0.004822594579309225, + 0.032989341765642166, + 0.0009840152924880385, + -0.02635321579873562, + -0.002955724485218525, + -0.008166407234966755, + 0.0559435673058033, + -0.10735514760017395, + 0.003231616457924247, + 0.06321240216493607, + -0.0038404185324907303, + -0.04193560406565666, + -0.052853576838970184, + -0.0343136228621006, + 0.023969508707523346, + 0.022601082921028137, + 0.022571654990315437, + -0.043230459094047546, + 0.003641776042059064, + -0.02413136512041092, + -0.01986423321068287, + 0.023910650983452797, + 0.015288102440536022, + -0.023483937606215477, + -0.05500185489654541, + -0.0024536007549613714, + 0.0030624025966972113, + -0.0069966246373951435, + 0.004337024409323931, + 0.006385983433574438, + 0.015758957713842392, + -0.0010474704904481769, + 0.006555196829140186, + 0.0016360403969883919, + -0.03275391459465027, + -0.02486707828938961, + 0.019923090934753418, + -0.037433043122291565, + -0.013470892794430256, + -0.002271511824801564, + 0.0140447486191988, + -0.008960976265370846, + -0.0037742042914032936, + -0.028751637786626816, + -0.009623117744922638, + 0.0214828010648489, + -0.005587735213339329, + 0.009490689262747765, + 0.009380332194268703, + 0.02669164352118969, + -0.012713109143078327, + -0.030281919986009598, + 0.006069627124816179, + -0.007460123393684626, + 0.016965527087450027, + -0.04534931108355522, + -0.014236033894121647, + -0.0129191093146801, + 0.013522393070161343, + 0.002540046814829111, + -0.022983653470873833, + -0.028045354411005974, + -0.016833098605275154, + -0.002479350659996271, + -0.018760664388537407, + -0.002242083428427577, + -0.017789524048566818, + -0.03178277239203453, + -0.030752776190638542, + 0.02501421980559826, + -0.017833666875958443, + -0.013412036001682281, + 0.0016820223536342382, + -0.011190185323357582, + 0.0021280478686094284, + 0.010631043463945389, + -0.003628901205956936, + -0.012448253110051155, + 0.02745678462088108, + 0.015001174993813038, + -0.017083240672945976, + -0.005264021921902895, + -0.011999468319118023, + -0.009174332953989506, + 0.029119495302438736, + -0.00944654643535614, + 0.006242519244551659, + -0.0004543023824226111, + -0.012330538593232632, + -0.03928703814744949, + -0.0049807727336883545, + 0.03978732228279114, + 0.0010787382489070296, + 0.03684447333216667, + 0.016376957297325134, + 0.011440327391028404, + -0.009865902364253998, + -0.009247904643416405, + -0.012095111422240734, + 0.007879478856921196, + 0.03790390118956566, + -0.0015422370051965117, + -0.03866904228925705, + 0.012161324732005596, + -0.008092835545539856, + 0.005183093715459108, + -0.010270544327795506, + -0.02245394140481949, + -0.0009463099995627999, + -0.026706358417868614, + 0.001094372128136456, + 0.044083885848522186, + -0.001933084218762815, + 0.0037282223347574472, + 0.0029060638044029474, + 0.020423375070095062, + 0.010947399772703648, + -0.01831923797726631, + 0.013676892966032028, + 0.020379232242703438, + 0.0043333456851542, + 0.016170958057045937, + -0.011013614013791084, + 0.025308504700660706, + -0.004623952321708202, + -0.011506541632115841, + -0.04891015589237213, + -0.02096780203282833, + -0.006065948400646448, + 0.00857840571552515, + -0.018422236666083336, + 0.03104706108570099, + 0.025131933391094208, + 0.00679430365562439, + 0.015700101852416992, + -0.015611816197633743, + -0.009027190506458282, + -0.03357791155576706, + -0.05423671379685402, + -0.004520952235907316, + -0.026824072003364563, + -0.022071370854973793, + 0.0025952253490686417, + -0.03793332725763321, + -0.012654252350330353, + -0.007232052274048328, + -0.012448253110051155, + 0.024881791323423386, + -0.006882588844746351, + 0.020040804520249367, + 0.045937880873680115, + 0.015582387335598469, + 0.005870984401553869, + -0.02273351140320301, + 0.015376388095319271, + -0.027927640825510025, + -0.051264435052871704, + -0.02355751022696495, + 0.007938336580991745, + -0.01776009611785412, + -0.0034394552931189537, + 0.005172058008611202, + -0.009726117365062237, + 0.011661040596663952, + 0.027250785380601883, + -0.044289883226156235, + 0.01403003465384245, + -0.02404307946562767, + 0.0030679204501211643, + 0.016009101644158363, + 0.013853463344275951, + 0.031459059566259384, + 0.02102665975689888, + -0.059769272804260254, + -0.026927072554826736, + -0.03758018836379051, + -0.00472327321767807, + 0.022998368367552757, + 0.008696120232343674, + -0.040876179933547974, + 0.00879176240414381, + -0.023748794570565224, + -0.034755051136016846, + -0.010395615361630917, + 0.008585763163864613, + -0.018113238736987114, + 0.03369562700390816, + 0.009777616709470749, + -0.010093973018229008, + 0.004745344631373882, + 0.026309072971343994, + -0.028589781373739243, + -0.004167810548096895, + 0.03675618767738342, + -0.006669232621788979, + -0.02435207925736904, + -0.027074214071035385, + 0.011771397665143013, + -0.01621510088443756, + -0.05002843961119652, + 0.03849247097969055, + -0.002484868513420224, + -0.0025786717887967825, + 0.0076881940476596355, + 0.021291514858603477, + 0.004355417098850012, + 0.05158815160393715, + -0.005304486025124788, + -0.024970076978206635, + -0.05423671379685402, + 0.018701808527112007, + 0.05511957034468651, + 0.0033327769488096237, + 0.026882929727435112, + -0.04537873715162277, + 0.00821055006235838, + 0.010667828842997551, + -0.03381333872675896, + -0.0018236469477415085, + 0.03257734328508377, + -0.029487350955605507, + 0.0021409229375422, + 0.06650839745998383, + -0.018083808943629265, + -0.004164131823927164, + -0.00802662130445242, + 0.07056953012943268, + -0.015015888959169388, + 0.009829116985201836, + -0.016597671434283257, + 0.012757251970469952, + 0.008048692718148232, + 0.01798081025481224, + -0.04043475165963173, + 0.03084106184542179, + -0.015611816197633743, + 0.029781635850667953, + 0.001980905421078205, + -0.0007265159511007369, + 0.028442639857530594, + -0.0035829192493110895, + -0.004719594959169626, + 0.039110466837882996, + -0.03087048977613449, + -0.03346019610762596, + -0.032253630459308624, + -0.009571617469191551, + -0.014912889339029789, + 0.014552390202879906, + -0.04496673867106438, + 0.009748188778758049, + -0.04702673479914665, + 0.025117220357060432, + 0.0256910752505064, + -0.06097583845257759, + -0.0013638267992064357, + 0.0384041853249073, + -0.0014705050271004438, + -0.021924227476119995, + -0.021306229755282402, + -0.013051536865532398, + 0.02663278765976429, + -0.0473504476249218, + 0.0139417489990592, + -0.017259811982512474, + 0.009777616709470749, + 0.049469299614429474, + -0.028383782133460045, + 0.008519548922777176, + -0.031282488256692886, + 0.012801394797861576, + -0.02279236912727356, + 0.048557016998529434, + -0.011020971462130547, + -0.02051166072487831, + 0.010991542600095272, + 0.029178351163864136, + -0.018819522112607956, + 0.026809358969330788, + 0.039051610976457596, + -0.00620941212400794, + 0.027383213862776756, + -0.014508247375488281, + -0.004370131529867649, + 0.0070039816200733185, + 0.01546467375010252, + 0.04149417579174042, + 0.003936061169952154, + 0.03195934370160103, + -0.03234191611409187, + 0.014471461996436119, + 0.009601046331226826, + -0.006113769486546516, + -0.04187674820423126, + 0.011035685427486897, + 0.024087222293019295, + -0.008938904851675034, + 0.007165838498622179, + -0.016494670882821083, + -0.05411900207400322, + 0.006334483157843351, + 0.013478250242769718, + -0.04411331191658974, + 0.023013083264231682, + 0.0279129259288311, + 0.006389661692082882, + 0.03275391459465027, + -0.009240547195076942, + 0.0012709430884569883, + 0.010211687535047531, + 0.0045356666669249535, + -0.017568811774253845, + -0.030782204121351242, + -0.01667124219238758, + 0.03243020176887512, + 0.015273388475179672, + -0.03693275898694992, + -0.019334521144628525, + -0.0024168151430785656, + -0.02876635268330574, + 0.03805104270577431, + 0.019923090934753418, + -0.030487919226288795, + -0.004693844821304083, + -0.0002706041850615293, + 0.013228108175098896, + 0.04022875055670738, + 0.02401365153491497, + 0.030635062605142593, + 0.009284690022468567, + -0.014272819273173809, + -0.004962379578500986, + 0.011043041944503784, + 0.009152261540293694, + -0.003141491673886776, + -0.05226500704884529, + -0.017039097845554352, + -0.0027442071586847305, + -0.036432474851608276, + -0.030664490535855293, + -0.04234760254621506, + 0.026618072763085365, + 0.02523493394255638, + -0.021777085959911346, + 0.07539580017328262, + 0.02626493014395237, + -0.015126246027648449, + -0.01675952784717083, + -0.024749362841248512, + -0.019643519073724747, + -0.03101763315498829, + -0.018966663628816605, + -0.006731768138706684, + -0.025279076769948006, + -0.009483331814408302, + -0.020452803000807762, + -0.006492661312222481, + -0.011741968803107738, + -0.004517273977398872, + -0.007379194721579552, + 0.00025474041467532516, + 0.04187674820423126, + 0.032312486320734024, + 0.005418521352112293, + -0.04293617233633995, + 0.00505802221596241, + 0.011065113358199596, + -0.03705047443509102, + 0.014817247167229652, + -0.003097349079325795, + 0.0005076415254734457, + -0.046761877834796906, + 0.009012476541101933, + 0.045996736735105515, + -0.0013509518466889858, + -0.004590845201164484, + 0.010601614601910114, + 0.026426788419485092, + 0.0035056693013757467, + 0.006382304709404707, + -0.016185671091079712, + 0.02617664635181427, + 0.01077082846313715, + 0.004031703807413578, + -0.013139822520315647, + 0.04387788474559784, + -0.03607933223247528, + 0.039228182286024094, + -0.005749592091888189, + 0.031341347843408585, + 0.001635120715945959, + 0.01031468715518713, + 0.009049261920154095, + -0.04896901547908783, + 0.014236033894121647, + -0.00645955465734005, + 0.023292653262615204, + 0.005179414991289377, + -0.02401365153491497, + -0.016259243711829185, + -0.030281919986009598, + 0.0022163335233926773, + -0.027648070827126503, + -0.0429656021296978, + -0.012514467351138592, + 0.007265159394592047, + -0.01435374841094017, + 0.007872122339904308, + -0.04222988709807396, + -0.02276293933391571, + 0.010594258084893227, + -0.001023559831082821, + -0.00422666734084487, + 0.021291514858603477, + 0.020364517346024513, + 0.030576204881072044, + 0.03587333485484123, + -0.03596162050962448, + -0.018848950043320656, + 0.058945272117853165, + -0.004991808440536261, + 0.04552587866783142, + 0.023866508156061172, + 0.044260453432798386, + -0.0234692245721817, + 0.04049360752105713, + -0.03716818615794182, + 0.008401835337281227, + 0.023969508707523346, + 0.014471461996436119, + 0.013904963620007038, + -0.015288102440536022, + 0.015729529783129692, + 0.01602381467819214, + -0.004679130390286446, + -0.021350372582674026, + -0.03178277239203453, + -0.03519647940993309, + -0.004679130390286446, + -0.006702339742332697, + 0.01238939631730318, + 0.016612384468317032, + 0.0019202092662453651, + 0.0033051876816898584, + -0.01858409307897091, + -0.0026375288143754005, + 0.013309036381542683, + -0.03192991763353348, + -0.003581079887226224, + -0.046820733696222305, + -0.02273351140320301, + -0.023145509883761406, + -0.004300238564610481, + 0.021247372031211853, + -0.027839355170726776, + 0.010035116225481033, + -0.0026908679865300655, + -0.006823732051998377, + -0.032077059149742126, + -0.013559178449213505, + 0.004587166476994753, + -0.005403807386755943, + 0.01227903924882412, + -0.00013357777788769454, + 0.024646364152431488, + -0.004182524513453245, + 0.005337593145668507, + -0.0008198594441637397, + 0.003770525800064206, + -0.005286093335598707, + -0.010704615153372288, + -0.006080662366002798, + -0.00024761317763477564, + -2.1051143903605407e-06, + 0.01886366493999958, + 0.019584663212299347, + 0.00262833246961236, + -0.003088152501732111, + 0.02102665975689888, + 0.022939510643482208, + 0.004969737026840448, + 0.03351905569434166, + 0.008409191854298115, + -0.013853463344275951, + -0.03610876202583313, + -0.01892252080142498, + -0.0024131364189088345, + -0.01260275300592184, + 0.027765784412622452, + -0.02444036491215229, + -0.009946830570697784, + 0.01645052805542946, + -0.015920815989375114, + 0.01642110012471676, + -0.0010318366112187505, + 0.02526436187326908, + -0.0012222020886838436, + -0.010476543568074703, + -0.03169448673725128, + 0.01647995598614216, + -0.019143234938383102, + 0.008092835545539856, + 0.013735749758780003, + 0.04896901547908783, + 0.006385983433574438, + 0.026029502972960472, + -0.01901080645620823, + 0.00444002402946353, + -0.02677992917597294, + 0.003788918722420931, + 0.026103073731064796, + 0.00635287631303072, + -0.01789252460002899, + -0.03540247678756714, + 0.009056619368493557, + -0.02105608768761158, + -0.02157108671963215, + -0.008821191266179085, + 0.0007872122223488986, + -0.024366792291402817, + 0.02922249399125576, + -0.01627395674586296, + -0.005381735973060131, + 0.02264522574841976, + -0.006926731672137976, + -0.01051332987844944, + 0.002801224822178483, + 0.015361674129962921, + 0.01238939631730318, + 0.01549410168081522, + -0.01989366114139557, + -0.01293382328003645, + -0.02111494354903698, + 0.022115513682365417, + -0.007533694617450237, + 0.04493730887770653, + 0.027839355170726776, + -0.0052198790945112705, + 0.003796275705099106, + -0.0473504476249218, + -0.00663612550124526, + 0.019878948107361794, + -0.0047674160450696945, + -0.020408660173416138, + 0.019569948315620422, + -0.012786680832505226, + -0.023601653054356575, + 0.022586369886994362, + -0.0010437918826937675, + 0.02307193912565708, + -0.009696688503026962, + 0.0005140790017321706, + 0.010461829602718353, + 0.005374378524720669, + 0.01226432528346777, + 0.006926731672137976, + -0.01718624122440815, + -0.015420530922710896, + -0.0140153206884861, + 0.024425650015473366, + -0.03849247097969055, + 0.02279236912727356, + 0.0259265024214983, + 0.04529045149683952, + 0.013478250242769718, + 0.021718228235840797, + -0.03884561359882355, + -0.0037558116018772125, + -0.0035111871547997, + -0.024690506979823112, + 0.021762371063232422, + 0.03357791155576706, + -0.0010217205854132771, + 0.00599605543538928, + 0.053765859454870224, + -0.03784504160284996, + -0.016170958057045937, + -0.001600174349732697, + -0.0006170787382870913, + -0.006466911640018225, + 0.012242253869771957, + 0.007842693477869034, + 0.010925328359007835, + 0.008100192993879318, + -0.00012622064969036728, + 0.01227903924882412, + -0.003170920303091407, + -0.006073305383324623, + -0.004410595633089542, + -0.00599605543538928, + 0.0016544332029297948, + 0.005142629146575928, + -0.011712540872395039, + -0.021865371614694595, + -0.00036601690226234496, + 0.012411467730998993, + -0.004620273597538471, + 0.02273351140320301, + -0.006242519244551659, + 0.009704045951366425, + 0.0018622719217091799, + -0.012874966487288475, + 0.029237208887934685, + 0.027191927656531334, + -0.019113807007670403, + -0.030782204121351242, + -0.01684781350195408, + -0.03510819375514984, + 0.034078195691108704, + 0.0076881940476596355, + -0.0034541694913059473, + -0.010719329118728638, + 0.00909340474754572, + -0.042671315371990204, + 0.025955932214856148, + -0.004925594199448824, + -0.022189084440469742, + 0.0021022979635745287, + -0.00040992972208186984, + -0.029855206608772278, + 0.000574315432459116, + -0.008379763923585415, + -0.020526373758912086, + -0.0236752238124609, + -0.014699532650411129, + 0.043583597987890244, + -0.0012387556489557028, + 0.0025731539353728294, + 0.02188008464872837, + 0.014206605963408947, + -0.01849580928683281, + 0.016465242952108383, + 0.027765784412622452, + -0.0025363683234900236, + 0.013492964208126068, + -0.024881791323423386, + -0.01687724143266678, + -0.007445408962666988, + 0.0034063481725752354, + 0.015346959233283997, + 0.019981946796178818, + -0.031429633498191833, + 0.023969508707523346, + -0.0020563160069286823, + 0.009961545467376709, + 0.018701808527112007, + 0.000969301036093384, + 0.03087048977613449, + 0.01892252080142498, + -0.005028593819588423, + 0.024278508499264717, + -0.013088323175907135, + 0.008033978752791882, + 0.02202722802758217, + 0.025985360145568848, + -1.984411574085243e-05, + 0.03964018076658249, + 0.035637907683849335, + 0.023425081744790077, + -0.03961075469851494, + -0.0171273835003376, + -0.04011103883385658, + 0.013419393450021744, + -0.001683861599303782, + 0.014618604443967342, + 0.019569948315620422, + -0.008725548163056374, + 0.008291478268802166, + -0.0023873865138739347, + -0.01445674803107977, + 0.005473699886351824, + 0.039169326424598694, + -0.0015477548586204648, + -0.014618604443967342, + 0.0023285294882953167, + 0.03610876202583313, + -0.024455077946186066, + -0.029443208128213882, + -0.02005551941692829, + -0.020585231482982635, + -0.004443702753633261, + -0.0129485372453928, + 0.019334521144628525, + 0.017289239913225174, + -0.03516704961657524, + 0.003593954723328352, + -0.015729529783129692, + -0.026529787108302116, + 0.014971746131777763, + -0.018113238736987114, + 0.011315256357192993, + 0.0024131364189088345, + 0.0008198594441637397, + -0.017142098397016525, + -0.027162499725818634, + 0.006216769572347403, + 0.025882359594106674, + 0.006003412883728743, + -0.0071180169470608234, + -0.030031777918338776, + -0.0032757592853158712, + 0.014037392102181911, + -0.008688762784004211, + -0.011455041356384754, + -0.045084454119205475, + -0.02635321579873562, + 0.009895331226289272, + 0.00020117135136388242, + 0.03699161857366562, + 0.002212654799222946, + 0.006669232621788979, + -0.04108217731118202, + -0.011388827115297318, + 0.015082103200256824, + -0.00516470056027174, + -0.0051132007502019405, + -0.0024664755910634995, + 0.004454738460481167, + -0.007592551410198212, + -0.017804238945245743, + 0.0029115816578269005, + 0.0007692791987210512, + 0.009748188778758049, + 0.012249610386788845, + -0.025485076010227203, + -0.014780460856854916, + -0.00040602125227451324, + -0.01317660789936781, + 0.0017767453100532293, + 0.009571617469191551, + 0.00117713981308043, + -0.019084379076957703, + 0.0051941294223070145, + 0.009137547574937344, + -0.02763335593044758, + -0.010498614981770515, + 0.02763335593044758, + 0.009063975885510445, + 0.00041774666169658303, + 0.004892487078905106, + 0.017509954050183296, + -0.01459653303027153, + -0.00023531299666501582, + 0.04649702087044716, + 0.009843830950558186, + 0.022601082921028137, + 0.01217603962868452, + -0.002878474537283182, + 0.01815738156437874, + -0.03084106184542179, + -0.02745678462088108, + -0.0023101367987692356, + 0.001088854274712503, + -0.020393947139382362, + 0.002177708549425006, + -0.04623216390609741, + 0.01581781543791294, + -0.02660335786640644, + -0.018422236666083336, + 0.02833963930606842, + -0.032224200665950775, + 0.009505403228104115, + 0.04378959909081459, + -0.019305091351270676, + -0.00027014437364414334, + 0.03204762935638428, + 0.010189616121351719, + -0.019981946796178818, + 0.032312486320734024, + 0.000429701991379261, + 0.02477879263460636, + 0.020761802792549133, + 0.06127012521028519, + -0.023351509124040604, + -0.033107057213783264, + -0.040729034692049026, + 0.01803966611623764, + -0.008983047679066658, + -0.0215122289955616, + -0.013669535517692566, + 0.005032272543758154, + 0.0096599031239748, + -0.017053812742233276, + -0.03275391459465027, + 0.03098820336163044, + 0.0058746631257236, + 0.010219044983386993, + -0.02956092171370983, + 0.0035884371027350426, + 0.013772535137832165, + 0.024793505668640137, + 0.021335657685995102, + 0.007607265841215849, + -0.04311274364590645, + -0.005197807680815458, + -0.002731332089751959, + 0.0019294056110084057, + 0.0017224865732714534, + -0.01590610109269619, + 0.031253062188625336, + -0.028604496270418167, + -0.01645052805542946, + -0.0021574764978140593, + -0.011506541632115841, + 0.004520952235907316, + 0.030370205640792847, + -0.010211687535047531, + 0.022689368575811386, + -0.0015183263458311558, + 0.003490955103188753, + 0.0052198790945112705, + 0.009424475021660328, + 0.024749362841248512, + 0.02675050124526024, + 0.0046423450112342834, + -0.00039153691614046693, + -0.0076955510303378105, + -0.00504330825060606, + 0.01752466894686222, + 0.03543190658092499, + -0.02051166072487831, + -0.00729090953245759, + 0.013809320516884327, + 0.028295496478676796, + 0.016170958057045937, + -0.0004464854428078979, + 0.020908944308757782, + -0.00626091193407774, + 0.019599376246333122, + -0.028045354411005974, + 0.014110962860286236, + 0.007044445723295212, + -0.01142561249434948, + 0.007114338222891092, + 0.01971709169447422, + 0.01007190253585577, + 0.0027037428226321936, + 0.0020305661018937826, + 0.007636694237589836, + -0.038374755531549454, + 0.003604990430176258, + 0.00941711850464344, + 0.022071370854973793, + 0.019040236249566078, + -0.006065948400646448, + -0.021615229547023773, + 0.01752466894686222, + -0.02404307946562767, + -0.029472636058926582, + 0.01424339134246111, + 0.012698395177721977, + -0.034931622445583344, + -0.0009794171201065183, + 0.008534262888133526, + -0.01445674803107977, + -0.012433539144694805, + 0.02188008464872837, + 0.007386552169919014, + 0.004649701993912458, + 0.018790094181895256, + 0.017627667635679245, + 0.01142561249434948, + -0.03201820328831673, + -0.01801023818552494, + -0.014522962272167206, + -0.008659333921968937, + 0.03275391459465027, + -0.03266562893986702, + -0.007026053033769131, + -0.017568811774253845, + -0.01226432528346777, + 0.00039843423292040825, + 0.01706852577626705, + -0.016582956537604332, + -0.019820090383291245, + 0.021409230306744576, + 0.001914691412821412, + -0.029001781716942787, + 0.04222988709807396, + 0.030120063573122025, + 0.004016989376395941, + -0.015258674509823322, + 0.04376016929745674, + 0.013963820412755013, + 0.005197807680815458, + -0.014302248135209084, + -0.008909476920962334, + 0.0342547670006752, + 0.006963517516851425, + -0.009578974917531013, + -0.013095679692924023, + -0.02620607428252697, + 0.008725548163056374, + 0.04526102542877197, + 0.0005361503572203219, + -0.013441464863717556, + -0.023366224020719528, + 0.025955932214856148, + 0.03245962783694267, + -0.018024953082203865, + 0.0192903783172369, + -0.034048765897750854, + -0.0346079096198082, + -0.026161931455135345, + -0.006628768052905798, + -0.018848950043320656, + 0.008526906371116638, + 0.013507679104804993, + 0.013522393070161343, + -0.019069664180278778, + -0.057885847985744476, + 0.005124236457049847, + -0.0024499220307916403, + -0.014221319928765297, + 0.0020894231274724007, + -0.017142098397016525, + 0.020187946036458015, + 0.0010539079084992409, + 0.05673813819885254, + -0.033107057213783264, + -0.005631878040730953, + 0.005782699212431908, + -0.009608402848243713, + -0.023631080985069275, + -0.027339071035385132, + -0.036550190299749374, + -0.0006529447273351252, + -0.02392536588013172, + -0.008585763163864613, + -0.03552019223570824, + 0.003021938493475318, + -3.2798113807075424e-06, + 0.016656527295708656, + 0.0022218513768166304, + 0.017686525359749794, + -0.007151124067604542, + ], + "index": 92, + }, + { + "title": "Beni Mellal", + "text": "Beni-Mellal (Berber: Bni Mellal, Arabic: \u0628\u0646\u064a \u0645\u0644\u0627\u0644\u200e) is a Moroccan city located at (32\u00b020\u203222\u2033N 6\u00b021\u203239\u2033W). It is the capital city of the Tadla-Azilal Region, with a population of 489,248 (2010 census).", + "vector": [ + 0.017672881484031677, + 0.031421344727277756, + 0.007017173338681459, + -0.010213885456323624, + 0.03908825293183327, + 0.0003459856379777193, + -0.06684507429599762, + -0.025365782901644707, + -0.026197446510195732, + -0.06325852125883102, + -0.01639939472079277, + -0.01394338347017765, + -0.046391312032938004, + 0.03994590789079666, + 0.021376390010118484, + 0.017114106565713882, + -0.02446914277970791, + 0.014554137364029884, + 0.02910827472805977, + -0.016594314947724342, + -0.012364519760012627, + -0.0002984735183417797, + 0.036489300429821014, + 0.03552768751978874, + -0.019518136978149414, + -0.008946896530687809, + -0.009622624143958092, + -0.014943980611860752, + -0.013774451799690723, + -0.04368840157985687, + -0.012455482967197895, + 0.004246039781719446, + 0.016763247549533844, + -0.003437115577980876, + -0.0062959641218185425, + -0.0059808408841490746, + -0.03521581366658211, + -0.014749058522284031, + -0.0070106759667396545, + 0.05247286334633827, + 0.019959960132837296, + -0.02793874591588974, + -0.04160923883318901, + 0.007030168082565069, + 0.03508586809039116, + -0.05847644433379173, + 0.06596142798662186, + -0.01734801195561886, + 0.00348259718157351, + -0.01972605474293232, + 0.022870786488056183, + 0.01895936205983162, + -0.03446211665868759, + -0.028692442923784256, + 0.029758013784885406, + 0.011903204955160618, + 0.03355248644948006, + 0.1191360130906105, + -0.020635686814785004, + 0.02255891263484955, + -0.005964597221463919, + -0.026977133005857468, + 0.022039122879505157, + 0.014450179412961006, + 0.02228602208197117, + 0.04428616166114807, + -0.02307870425283909, + 0.00851157121360302, + 0.026405364274978638, + 0.03019983507692814, + -0.004938011057674885, + 0.020648682489991188, + -0.04761281982064247, + -0.02228602208197117, + -0.028562495484948158, + 0.04267480969429016, + 0.013839425519108772, + -0.00972658209502697, + 0.051199376583099365, + 0.009486178867518902, + -0.00754346139729023, + -0.061543211340904236, + 0.01625645160675049, + 0.01476205326616764, + -0.0011484123533591628, + 0.031993113458156586, + 0.002546973992139101, + -0.0536423921585083, + -0.037528883665800095, + 0.01890738308429718, + -0.030459729954600334, + -0.0026103234849870205, + -0.04498787969350815, + 0.015749655663967133, + 0.005529272835701704, + 0.0065915947780013084, + -0.003152854973450303, + 0.005990586709231138, + 0.033110663294792175, + 0.019414179027080536, + -0.02161029540002346, + -0.00031857480644248426, + -0.01271537784487009, + -0.05049765855073929, + 0.00784234143793583, + 0.06518174707889557, + 0.03599550202488899, + -0.04925016313791275, + 0.02895233780145645, + -0.012007162906229496, + 0.019089311361312866, + -0.004967248998582363, + 0.04015382379293442, + 0.005155673250555992, + -0.03004389815032482, + 0.007458995562046766, + -0.01841358281672001, + -0.010727179236710072, + 0.017724860459566116, + 0.0008893292397260666, + -0.04568959400057793, + -0.01607452519237995, + 0.019933970645070076, + -0.0005908557213842869, + 0.008531063795089722, + 0.005607241299003363, + 0.013917393982410431, + -0.020856598392128944, + -0.006627330556511879, + -0.003375390311703086, + -0.04228496551513672, + -0.034722015261650085, + -0.012526953592896461, + 0.010311346501111984, + -0.0581645704805851, + -0.03295472636818886, + 0.043480485677719116, + -0.015580723993480206, + 0.006614335812628269, + -0.03165524825453758, + -0.012617917731404305, + -0.018595509231090546, + -0.07162714749574661, + 0.046781156212091446, + -0.030355772003531456, + -0.06253080815076828, + -0.011682294309139252, + 0.00957714207470417, + 0.07162714749574661, + 0.0210645142942667, + 0.010727179236710072, + -0.011974676512181759, + -0.01580163463950157, + -0.0003599956107791513, + 0.03157728165388107, + 0.03869841247797012, + -0.0038821862544864416, + 0.006042566150426865, + -0.023585500195622444, + -0.04618339613080025, + 0.07329047471284866, + 0.05166718736290932, + 0.05754082277417183, + 0.03415024280548096, + -0.019933970645070076, + -0.008251676335930824, + -0.0036255395971238613, + 0.014632105827331543, + 0.001154097612015903, + 0.014593121595680714, + -0.038152631372213364, + 0.0006793825887143612, + -0.05296666547656059, + -0.07516172528266907, + 0.05034172162413597, + -0.008602534420788288, + 0.07536964118480682, + 0.025989530608057976, + 0.02079162560403347, + 0.016620304435491562, + 0.03435815870761871, + -0.028068693354725838, + 0.025274818763136864, + -0.00866101123392582, + 0.010018964298069477, + -0.051823124289512634, + 0.009642115794122219, + -0.059983838349580765, + 0.04264882206916809, + -0.009356231428682804, + -0.06840444356203079, + 0.007666911464184523, + 0.04636532440781593, + 0.014177288860082626, + 0.028302598744630814, + 0.03817862272262573, + -0.013774451799690723, + 0.02073964662849903, + 0.04657324030995369, + 0.008082743734121323, + 0.018296629190444946, + 0.028380567207932472, + -0.04893828555941582, + 0.03927018120884895, + 0.08602534979581833, + 0.020063918083906174, + 0.019843006506562233, + -0.03337055817246437, + -0.02848452515900135, + 0.051277343183755875, + -0.0010907481191679835, + 0.005311610642820597, + -0.023832399398088455, + 0.012254063971340656, + 0.07178308814764023, + -0.013410598039627075, + 0.004220050293952227, + -0.028796400874853134, + 0.011727775447070599, + 0.028770411387085915, + 0.01083113718777895, + -0.03745091333985329, + -0.08280264586210251, + -0.0642981007695198, + -0.0028799648862332106, + 0.011136514134705067, + 0.004986741114407778, + 0.007062654942274094, + -0.04870438203215599, + -0.0118967080488801, + -0.023559510707855225, + -0.007569450885057449, + -0.008303655311465263, + -0.0022269778419286013, + -0.03329258784651756, + 0.02359849400818348, + 0.031447332352399826, + -0.019440168514847755, + -0.021298421546816826, + 0.026418358087539673, + 0.015762651339173317, + 0.014151299372315407, + -0.024573100730776787, + 0.0058021629229187965, + 0.0366712287068367, + -0.037476904690265656, + -0.026639269664883614, + -0.0018777436343953013, + 0.04015382379293442, + 0.011669299565255642, + -0.0058508929796516895, + -0.013189687393605709, + 0.018725456669926643, + 0.013462577015161514, + -0.0017851559678092599, + -0.01051926240324974, + -0.009408210404217243, + 0.038048673421144485, + 0.019011342898011208, + -0.027237027883529663, + -0.014099320396780968, + 0.01811470277607441, + -0.01734801195561886, + 0.0128778126090765, + 0.020011939108371735, + 0.010525760240852833, + -0.05164119973778725, + 0.013098723255097866, + -0.04004986584186554, + 0.008303655311465263, + -0.05164119973778725, + -0.01925824210047722, + 0.022545918822288513, + 0.04168720915913582, + 0.02248094417154789, + -0.013735467568039894, + 0.008401116356253624, + -0.023780420422554016, + 0.0018956114072352648, + -0.050133805721998215, + 0.055669575929641724, + 0.03942611813545227, + 0.017205068841576576, + 0.005610490217804909, + -0.04049168899655342, + 0.014060336165130138, + 0.008712990209460258, + -0.04095949977636337, + -0.023663468658924103, + -0.005084202159196138, + -0.0043922308832407, + 0.01069469191133976, + -0.003706756979227066, + 0.017140096053481102, + -0.03661924973130226, + 0.01967407576739788, + 0.011708283796906471, + 0.007088644430041313, + 0.00018923627794720232, + 0.02851051650941372, + -0.027548903599381447, + 0.0027256521862000227, + -0.012546446174383163, + 0.019635090604424477, + -0.02496294490993023, + -0.0012629288248717785, + 0.04381835088133812, + 0.009239278733730316, + -0.02079162560403347, + -0.020037928596138954, + -0.01645137369632721, + -0.025794610381126404, + 0.024625081568956375, + -0.017685875296592712, + -0.03615143895149231, + -0.00845959223806858, + -0.022052116692066193, + -0.02079162560403347, + -0.03165524825453758, + 0.028666453436017036, + -0.016906190663576126, + -0.04145330190658569, + -0.001793277682736516, + -0.04932812973856926, + -0.036905135959386826, + 0.02352052554488182, + -0.0003599956107791513, + 0.00867400597780943, + 0.010109927505254745, + -0.05858040228486061, + -0.05080953240394592, + 0.011052047833800316, + -0.03895830735564232, + -0.016243457794189453, + -0.020635686814785004, + 0.022169070318341255, + 0.0357356034219265, + -0.025443751364946365, + 0.006140026729553938, + 0.0026720487512648106, + -8.172489469870925e-05, + 0.02029782347381115, + 0.028380567207932472, + 0.01773785427212715, + 0.05044567957520485, + 0.009707089513540268, + -0.01925824210047722, + 0.017127100378274918, + 0.02791275642812252, + -0.005048466380685568, + 0.0004954254254698753, + -0.008914409205317497, + -0.024729039520025253, + 0.03739893436431885, + 0.020128892734646797, + -0.045247774571180344, + -0.04870438203215599, + -0.024975938722491264, + -0.026587290689349174, + 0.026483332738280296, + -0.015489760786294937, + -0.025105886161327362, + -0.02793874591588974, + 0.0017981507116928697, + -0.022584902122616768, + -0.005464299116283655, + 0.006520123686641455, + 0.008920906111598015, + -0.016568325459957123, + -0.011389912106096745, + 0.06045164912939072, + 0.04379235953092575, + 0.0038432020228356123, + 0.06939204782247543, + -0.0028149911668151617, + 0.03009587712585926, + 0.03022582456469536, + 0.0028734675142914057, + 0.0032584373839199543, + -0.01065570767968893, + -0.023169666528701782, + -0.0064746420830488205, + -0.008056754246354103, + -0.03544972091913223, + -0.00859603751450777, + -0.004915270023047924, + 0.045195795595645905, + -0.033188629895448685, + -0.01816668175160885, + -0.027756819501519203, + 0.006497382652014494, + -0.03495591878890991, + 0.038646433502435684, + -0.02843254618346691, + 0.03955606743693352, + 0.02908228524029255, + -0.024923959746956825, + -0.010889613069593906, + 0.020830608904361725, + -0.009908508509397507, + -0.0007541024824604392, + -0.007796859368681908, + 0.004609893076121807, + -0.020167876034975052, + 0.02046675607562065, + -0.015385802835226059, + 0.014333226718008518, + -0.09881220012903214, + 0.024495132267475128, + 0.01942717470228672, + 0.011298948898911476, + -0.00029360048938542604, + -0.008095738478004932, + 0.007270571310073137, + -0.02089558355510235, + -0.028692442923784256, + 0.014372210949659348, + 0.0038821862544864416, + -0.043506473302841187, + -0.026665259152650833, + -0.02602851577103138, + -0.037996694445610046, + -0.0015869857743382454, + -0.014814033173024654, + -0.033630453050136566, + 0.04555964842438698, + -0.04787271469831467, + 0.03238295391201973, + -0.03009587712585926, + 0.036489300429821014, + -0.05073156580328941, + -0.007400518748909235, + -0.034280192106962204, + 0.01506093330681324, + 0.048574432730674744, + 0.008355634286999702, + 0.04389631748199463, + -0.007160115987062454, + 0.004847047384828329, + 0.020206861197948456, + 0.004434463568031788, + -0.004233045037835836, + -0.026314400136470795, + 0.06653320044279099, + -0.03378638997673988, + -0.00022903273929841816, + 0.02793874591588974, + -0.04361043497920036, + 0.004236293490976095, + -0.012650404125452042, + -0.0548379123210907, + 0.026951143518090248, + -0.023663468658924103, + 0.04036174342036247, + 0.01274136733263731, + 0.00433050561696291, + 0.02163628488779068, + 0.04457204416394234, + -0.0030375265050679445, + 0.008173707872629166, + -0.033734411001205444, + -0.0057404376566410065, + -0.028770411387085915, + -0.01476205326616764, + 0.009193796664476395, + -0.027003122493624687, + -0.00755645614117384, + 0.05644926056265831, + 0.014216273091733456, + 0.030797595158219337, + 0.01704913191497326, + 0.06741684675216675, + -0.02354651503264904, + -0.020921573042869568, + 0.018764441832900047, + -0.028068693354725838, + -0.029861971735954285, + -0.0487823486328125, + -0.025963541120290756, + -0.020128892734646797, + 0.03765882924199104, + 0.002482000272721052, + -0.02294875681400299, + 0.012143608182668686, + 0.009785058908164501, + 0.02076563611626625, + -0.014359216205775738, + -0.010350330732762814, + -0.023949353024363518, + -0.013449582271277905, + 0.008855932392179966, + -0.018972357735037804, + 0.006075053010135889, + 0.033136650919914246, + -0.01058423612266779, + 0.01702314242720604, + 0.00754346139729023, + -0.0097655663266778, + -0.06346643716096878, + 0.01202015858143568, + -0.028224630281329155, + 0.006201751995831728, + 0.02144136279821396, + -0.00967460311949253, + 0.03773679956793785, + 0.042908716946840286, + -0.035891544073820114, + -0.032538894563913345, + 0.02461208589375019, + -0.015541739761829376, + 0.009733079001307487, + 0.03552768751978874, + 0.020726650953292847, + -0.02270185574889183, + -0.008180204778909683, + -0.026743227615952492, + 0.017425980418920517, + -0.030797595158219337, + -0.03602148965001106, + -0.006497382652014494, + 0.009992974810302258, + -0.01950514316558838, + 0.0009664857061579823, + 0.024196254089474678, + -0.015008954331278801, + -0.007329047657549381, + -0.015775645151734352, + -0.020583707839250565, + -0.006243984680622816, + -0.07490182667970657, + 0.004307764582335949, + 0.012819335795938969, + -0.013709478080272675, + 0.02471604384481907, + 0.009375723078846931, + 0.006672812160104513, + -0.023754430934786797, + -0.03732096776366234, + -0.04641730338335037, + 0.00975257158279419, + -0.007647419348359108, + 0.010454288683831692, + 0.0354757085442543, + 0.0075044771656394005, + 0.02446914277970791, + 0.011565341614186764, + 0.03071962483227253, + 0.014515153132379055, + -0.009518666192889214, + -0.011181996203958988, + 0.04106345772743225, + -0.010798649862408638, + 0.023442557081580162, + -0.020609697327017784, + -0.04418220371007919, + 0.021753236651420593, + 0.004934762138873339, + -0.02161029540002346, + -0.02632739581167698, + 0.019076315686106682, + 0.028848379850387573, + -0.025911562144756317, + -0.007335545029491186, + 0.021233446896076202, + -0.026951143518090248, + 0.00955115258693695, + -0.00972658209502697, + 0.004512432496994734, + 0.017153089866042137, + -0.022091101855039597, + 0.010337335988879204, + -0.017101110890507698, + 0.03500789776444435, + -0.025599688291549683, + -0.0014675963902845979, + -0.013748462311923504, + 0.008017770014703274, + -0.013371613807976246, + -0.015125907026231289, + 0.0003518738958518952, + 0.02404031716287136, + -0.021896179765462875, + 0.051797136664390564, + 0.004171319771558046, + 0.007153618615120649, + -0.003982895519584417, + 0.040257785469293594, + -0.005288869608193636, + 0.005526023916900158, + 0.012169597670435905, + 0.08004775643348694, + -0.02900431677699089, + -0.02346854656934738, + -0.00985003262758255, + -0.02294875681400299, + -0.0172700434923172, + 0.012936289422214031, + 0.010246372781693935, + -0.004460453055799007, + 0.005958099849522114, + -0.010590733960270882, + -0.01285182312130928, + 0.015502755530178547, + 0.001162219326943159, + 0.05650123953819275, + -0.007744880393147469, + -0.004103097133338451, + 0.019843006506562233, + -0.02431320585310459, + -0.000877958838827908, + -0.011013063602149487, + 0.021597299724817276, + 0.01395637821406126, + 0.0026785461232066154, + -0.01945316419005394, + 0.009109330363571644, + -0.01095458772033453, + -0.04389631748199463, + -0.000756538996938616, + -0.07562953233718872, + -0.012474974617362022, + -0.016711268573999405, + 0.0074460008181631565, + -0.0007134938496164978, + -0.008043759502470493, + -0.009992974810302258, + 0.017140096053481102, + -0.0010330838849768043, + 0.006926210131496191, + -0.03069363534450531, + 0.019466158002614975, + 0.021675268188118935, + 0.018127698451280594, + 0.0017071872716769576, + -0.004743089433759451, + -0.0195311326533556, + -0.007465492933988571, + -0.012910299934446812, + -0.017412986606359482, + -0.010155409574508667, + 0.020427770912647247, + -0.01830962486565113, + 0.0013092226581647992, + -0.04719698801636696, + -0.008979382924735546, + 0.00039227947127074003, + -0.006705299019813538, + -0.006536366883665323, + -0.005292118061333895, + -0.006624081637710333, + 0.023689458146691322, + -0.03724299743771553, + 0.01912829466164112, + 0.006429160479456186, + -0.006913215387612581, + 0.0014667841605842113, + 0.01590559259057045, + -0.012832330539822578, + 0.023481542244553566, + 0.011454885825514793, + -0.03570961579680443, + -0.016711268573999405, + 0.0032600618433207273, + -0.007608435116708279, + 0.03617742657661438, + 0.0030245317611843348, + -0.0442601703107357, + 0.03498191013932228, + 0.033136650919914246, + -0.01858251541852951, + -0.040283773094415665, + -0.03126540407538414, + 0.005025725346058607, + -0.011214482598006725, + 0.006153021473437548, + 0.006640325300395489, + -0.06705299019813538, + -0.01069469191133976, + -0.0037327464669942856, + 0.012721875682473183, + 0.017659885808825493, + -0.02436518482863903, + -0.015294838696718216, + 0.060503628104925156, + -0.032590873539447784, + 0.0017542933346703649, + -0.0295500960201025, + 0.00037420864100567997, + 0.016802232712507248, + -0.0017851559678092599, + 0.051277343183755875, + 0.0033851363696157932, + -0.025885572656989098, + -0.018348608165979385, + 0.014606116339564323, + -0.004847047384828329, + 0.012312540784478188, + -0.039218202233314514, + -0.015593718737363815, + -0.03734695538878441, + -0.006630579009652138, + -0.015762651339173317, + -0.051745157688856125, + -0.009278262965381145, + -0.02791275642812252, + 0.035813573747873306, + 0.0024072802625596523, + -0.032123059034347534, + 0.03191514313220978, + -0.02515786699950695, + 0.0019443418132141232, + -0.0025453497655689716, + 0.05112140625715256, + 0.012923294678330421, + -0.022883782163262367, + -0.01890738308429718, + -0.0020223103929311037, + 0.008803953416645527, + 0.01734801195561886, + 0.0069002206437289715, + 0.024183258414268494, + 0.04293470457196236, + 0.0005027349689044058, + -0.008966388180851936, + -0.014956975355744362, + -0.0026476834900677204, + 0.008186702616512775, + -0.01256593782454729, + -0.022584902122616768, + 0.0016430256655439734, + -0.06835246831178665, + 0.005152424331754446, + -0.01478804275393486, + 0.010129420086741447, + -0.0070691523142158985, + 0.011104026809334755, + 0.001187396701425314, + -0.012260560877621174, + 0.01623046211898327, + 0.01895936205983162, + -0.0017299281898885965, + -0.04314262047410011, + 0.040777575224637985, + -0.03846450522542, + -0.01751694455742836, + 0.023962346836924553, + -0.017828818410634995, + 0.012819335795938969, + 0.0015082049649208784, + 0.005815157666802406, + 0.01304024737328291, + -0.009304252453148365, + 0.017776839435100555, + -0.03888033702969551, + -0.014476168900728226, + 0.04218100756406784, + 0.07703296840190887, + 0.013098723255097866, + 0.005958099849522114, + -0.050575628876686096, + -0.023286620154976845, + -0.039166223257780075, + 0.043558452278375626, + -0.00949267577379942, + -0.004986741114407778, + -0.0351378470659256, + -0.057800717651844025, + 0.005600743927061558, + -0.015424787066876888, + 0.019414179027080536, + 0.006672812160104513, + -0.01702314242720604, + 0.007166613359004259, + 0.02228602208197117, + 0.042986683547496796, + 0.020908577367663383, + 0.051771145313978195, + -0.02384539507329464, + -0.017412986606359482, + -0.023936357349157333, + 0.017893793061375618, + -0.03823060169816017, + 0.05473395064473152, + 0.030771605670452118, + 0.013566534966230392, + 0.03469602391123772, + -0.009447194635868073, + -0.034202221781015396, + -0.010590733960270882, + -0.025352787226438522, + -0.00851157121360302, + -0.032668840140104294, + -0.02485898695886135, + -0.011851225979626179, + -0.007907315157353878, + 0.021220451220870018, + -0.0007435442530550063, + -0.013007760047912598, + 0.012929791584610939, + 0.020674671977758408, + 0.004687861539423466, + -0.01509991753846407, + 0.029835982248187065, + 0.03136936575174332, + -0.0012840452836826444, + 0.03326660022139549, + -0.016035540029406548, + 0.010148911736905575, + 0.010285357013344765, + -0.014892001636326313, + -0.008992377668619156, + -0.02044076658785343, + 0.00048811588203534484, + -0.0078033567406237125, + 0.004876285791397095, + 0.0023260631132870913, + 0.0330067053437233, + -0.0006107539520598948, + 0.025794610381126404, + 0.03352649509906769, + 0.05416218191385269, + -0.028900358825922012, + 0.009031361900269985, + -0.02595054730772972, + 0.0007082147058099508, + -0.010207388550043106, + 0.0012669896241277456, + -0.005454552825540304, + -0.04020580276846886, + 0.013228671625256538, + -0.010012466460466385, + 0.026691248640418053, + -0.03882835805416107, + -0.0027597632724791765, + -0.019037332385778427, + -0.023143677040934563, + -0.057124990969896317, + -0.005724193993955851, + -0.0012182592181488872, + 0.04883432760834694, + -0.013397603295743465, + 0.007627927232533693, + 0.06065956503152847, + -0.004704105202108622, + -0.007218592334538698, + 0.03136936575174332, + 0.03191514313220978, + -0.027081090956926346, + 0.024703050032258034, + -0.008284162729978561, + 0.002542101079598069, + 0.005698204506188631, + -0.024079300463199615, + -0.0127283725887537, + -0.009661608375608921, + -0.022350996732711792, + 0.01868647336959839, + 0.0028620969969779253, + 0.010077441111207008, + 0.031109469011425972, + 0.001973580103367567, + -0.0003626351826824248, + -0.005210901144891977, + -0.03734695538878441, + -0.0033494008239358664, + -0.008115231059491634, + -0.03924419358372688, + -0.0075629535131156445, + 0.003107373369857669, + 0.020999541506171227, + 0.00832314696162939, + -0.04329855740070343, + 0.014736063778400421, + 0.020583707839250565, + 0.020154882222414017, + -0.018231656402349472, + -0.012845325283706188, + 0.04010184481739998, + 0.008297157473862171, + 0.011552346870303154, + 0.021675268188118935, + 0.025937551632523537, + 0.020726650953292847, + -0.012949284166097641, + -0.053486455231904984, + 0.013917393982410431, + -0.0075629535131156445, + -0.025118881836533546, + -0.028328588232398033, + -0.045715585350990295, + -0.005282372236251831, + -0.03220102936029434, + 0.033084671944379807, + -0.001965458272024989, + 0.028822390362620354, + 0.019193269312381744, + 0.0059808408841490746, + 0.012643907219171524, + -0.026366379112005234, + -0.001351455575786531, + 0.034176234155893326, + -0.018374597653746605, + 0.008667509071528912, + -0.010168404318392277, + 0.024923959746956825, + -0.01977803371846676, + 0.015125907026231289, + 0.02161029540002346, + 0.0011792749864980578, + 0.01781582273542881, + -0.005555262323468924, + 0.016009550541639328, + 0.01945316419005394, + -0.0327468104660511, + -0.01808871328830719, + -0.020037928596138954, + -0.009083340875804424, + 0.030797595158219337, + 0.006084798835217953, + 0.04345449432730675, + 0.03064165636897087, + 0.0018143941415473819, + 0.004629385191947222, + -0.06253080815076828, + 0.0012645531678572297, + -0.002853975398465991, + 0.010168404318392277, + 0.03383836895227432, + 0.0295500960201025, + -0.003960154950618744, + 0.030511708930134773, + 0.009512168355286121, + 0.009570645168423653, + 0.005951602477580309, + 0.05416218191385269, + -0.01365749817341566, + 0.010408807545900345, + 0.016295436769723892, + -0.009947492741048336, + -0.0014034346677362919, + 0.01923225261271, + -0.024845991283655167, + 0.022299017757177353, + -0.01316369790583849, + -0.026119478046894073, + -0.01803673431277275, + -0.010233378037810326, + 0.0019232253544032574, + -0.023910367861390114, + 0.02292276732623577, + -0.010486776009202003, + -0.0469890721142292, + -0.007679906208068132, + 0.011110524646937847, + 0.04654724895954132, + 0.03544972091913223, + -0.03282477706670761, + 0.023286620154976845, + -0.05265479162335396, + 0.014853017404675484, + 0.023104693740606308, + 0.020401781424880028, + -0.03191514313220978, + 0.014021351933479309, + 0.00493151368573308, + 0.0073745292611420155, + -0.0028344832826405764, + -0.018023740500211716, + 0.03139535337686539, + -0.014229267835617065, + -0.005318108014762402, + 0.0366712287068367, + 0.03981596231460571, + 0.04181715473532677, + -0.040257785469293594, + 0.002548598451539874, + -0.02193516492843628, + 0.0140083571895957, + 0.039114244282245636, + 0.010727179236710072, + 0.020986545830965042, + -0.015918588265776634, + 0.03625539690256119, + -0.02218206413090229, + 0.049094222486019135, + 0.06372632831335068, + -0.01208513230085373, + -0.019466158002614975, + 0.023689458146691322, + 0.014242262579500675, + -0.021896179765462875, + -0.05473395064473152, + 0.01882941462099552, + -0.011792750097811222, + 0.030355772003531456, + 0.006029571406543255, + 0.0035345761571079493, + 0.0233256034553051, + 0.011104026809334755, + -0.009928001090884209, + 0.00597434351220727, + -0.006815754342824221, + 0.019765038043260574, + -0.015385802835226059, + 0.051797136664390564, + -0.0006968443049117923, + -0.03134337440133095, + 0.003183717606589198, + 0.006744283251464367, + 0.025079896673560143, + 0.0008121728315018117, + 0.025989530608057976, + -0.0030716375913470984, + 0.03555367887020111, + 0.0351378470659256, + 0.011136514134705067, + -0.021571310237050056, + 0.00987602211534977, + 0.024183258414268494, + 0.013085728511214256, + 0.017361007630825043, + 0.012637409381568432, + -0.02848452515900135, + 0.028744421899318695, + -0.02461208589375019, + 0.013878409750759602, + 0.011246969923377037, + -0.04589751362800598, + 0.0330067053437233, + -0.006455149967223406, + -0.003100875997915864, + 0.005288869608193636, + 0.009265268221497536, + 0.03745091333985329, + -0.04490990936756134, + -0.015528745017945766, + 0.03355248644948006, + 0.017711864784359932, + 0.010538754984736443, + -0.009798053652048111, + -0.004447458311915398, + 0.02084360457956791, + -0.014372210949659348, + 0.012585430406033993, + -0.02114248275756836, + -0.017724860459566116, + -0.014619111083447933, + -0.020986545830965042, + -0.0077513777650892735, + 0.01860850490629673, + -0.004694358911365271, + -0.014593121595680714, + 0.012117618694901466, + -0.0005847644642926753, + 0.010018964298069477, + -0.01565869338810444, + -0.003159352345392108, + -0.009102833457291126, + -0.012487969361245632, + -0.013631508685648441, + 0.0007260825368575752, + -0.02357250452041626, + -0.03500789776444435, + -0.0017802828224375844, + 0.010987074114382267, + 0.04228496551513672, + 0.03282477706670761, + 0.011305445805191994, + 0.02436518482863903, + 0.011039053089916706, + -0.0048080631531775, + -0.014671090058982372, + -0.0019817017018795013, + 0.002015813020989299, + 0.03170722723007202, + 0.0354757085442543, + 0.01669827289879322, + -0.0219611544162035, + 0.02962806634604931, + -0.02079162560403347, + 0.008394618518650532, + 0.0022091101855039597, + 0.02193516492843628, + 0.01504793856292963, + 0.015749655663967133, + -0.023832399398088455, + 0.0005543079460039735, + -0.00849857646971941, + -0.028354577720165253, + -0.02567765675485134, + -0.008134723640978336, + 0.0210645142942667, + -0.030797595158219337, + 0.009343236684799194, + 0.014463174156844616, + -0.016763247549533844, + 0.02731499634683132, + -0.0032389452680945396, + -0.0055617596954107285, + -0.0307456161826849, + -0.011084535159170628, + 5.908557432121597e-05, + 0.023442557081580162, + -0.007900817319750786, + -0.016529342159628868, + -0.003713254351168871, + -0.028666453436017036, + 0.05143328383564949, + -0.028562495484948158, + -0.04587152227759361, + -0.02277982421219349, + 0.03680117428302765, + 0.04171319678425789, + 0.01888139359652996, + 0.010356828570365906, + -0.00652662105858326, + 0.015723666176199913, + 0.015333822928369045, + 0.008940398693084717, + 0.026717238128185272, + -0.0030586428474634886, + 0.012799844145774841, + -0.0031853418331593275, + -0.008011273108422756, + 0.04259684309363365, + -0.02952410653233528, + -0.022221049293875694, + 0.02002493292093277, + 0.002553471364080906, + -0.018673477694392204, + -0.026613280177116394, + 0.008290660567581654, + 0.028276609256863594, + 0.02223404310643673, + 0.043922308832407, + -0.009557650424540043, + 0.003580057993531227, + 0.003924419172108173, + 0.0001221304846694693, + -0.01399536244571209, + 0.009336738847196102, + 0.024300212040543556, + -0.010194393806159496, + 0.021376390010118484, + 0.0131766926497221, + -0.011233975179493427, + -0.01278035156428814, + -0.0015926709165796638, + -0.02796473540365696, + 0.03004389815032482, + 0.028744421899318695, + -0.0038334557320922613, + -0.0035703119356185198, + 0.001139478525146842, + -8.253706619143486e-05, + -0.028250619769096375, + 0.0012921669986099005, + -0.01920626312494278, + -0.06372632831335068, + -0.016321426257491112, + -0.011981173418462276, + 0.02692515403032303, + -0.008479084819555283, + 0.03170722723007202, + 0.004031626041978598, + -0.013397603295743465, + -0.010226880200207233, + -0.026197446510195732, + 0.0043175108730793, + 0.03157728165388107, + -0.017750849947333336, + 0.02580760419368744, + -0.025079896673560143, + 0.001905357465147972, + -0.01972605474293232, + -0.06653320044279099, + -0.023403571918606758, + -0.036359354853630066, + 0.0061660162173211575, + -0.049588024616241455, + -0.025118881836533546, + 0.021155478432774544, + -0.008907911367714405, + 0.03456607460975647, + -0.004031626041978598, + -0.022325007244944572, + -0.027756819501519203, + 0.028328588232398033, + 0.006084798835217953, + -0.030433740466833115, + -0.002205861499533057, + 0.007523969281464815, + 0.005704701878130436, + 0.01650335267186165, + 0.016802232712507248, + 0.0007102451636455953, + 0.036957114934921265, + 0.028120672330260277, + 0.0030212830752134323, + -0.02471604384481907, + -0.0034566076938062906, + -0.029498117044568062, + 0.024300212040543556, + -0.020661676302552223, + -0.018075719475746155, + 0.023416567593812943, + 0.008992377668619156, + -0.04101147875189781, + 0.020154882222414017, + 0.035397741943597794, + -0.032097071409225464, + -0.016659289598464966, + -0.0077513777650892735, + -0.020037928596138954, + -0.0005116689135320485, + -0.020336808636784554, + 0.007043162826448679, + -0.006620833184570074, + 0.020141886547207832, + 0.013358619064092636, + 0.03446211665868759, + 0.002808493794873357, + 0.02213008515536785, + 0.024157268926501274, + 0.018205666914582253, + 0.004434463568031788, + -0.033734411001205444, + -0.029809992760419846, + -0.025989530608057976, + -0.010181399062275887, + 0.020752640441060066, + 0.017283037304878235, + -0.01304024737328291, + -0.005181662738323212, + -0.05520176514983177, + -0.008751974441111088, + 0.014073330909013748, + 0.03825658932328224, + -0.016061529517173767, + 0.011630315333604813, + -0.013248163275420666, + 0.010142414830625057, + -0.024209247902035713, + 0.020804619416594505, + 0.01582762412726879, + 0.06502580642700195, + -0.0060393172316253185, + -0.006705299019813538, + -0.017335018143057823, + -0.015450776554644108, + 0.019881991669535637, + 0.0018192671705037355, + -0.006815754342824221, + 0.0130272526293993, + -0.001158158527687192, + 0.005971094593405724, + 0.020921573042869568, + 0.011552346870303154, + 0.01645137369632721, + 0.012273555621504784, + -0.009992974810302258, + -0.010402309708297253, + -0.023130683228373528, + 0.03376040235161781, + -0.02567765675485134, + 0.030329782515764236, + 0.015346817672252655, + 0.03843851760029793, + 0.029887961223721504, + 0.0497179739177227, + 0.03890632838010788, + 0.014489163644611835, + 0.0010103429667651653, + -0.008699995465576649, + -0.02044076658785343, + 0.010051450692117214, + -0.02292276732623577, + 0.009525163099169731, + 0.023663468658924103, + -0.020960556343197823, + -0.009668105281889439, + -0.0025226089637726545, + -0.017114106565713882, + -0.027548903599381447, + 0.03230498731136322, + -0.042440902441740036, + -0.019894985482096672, + -0.011669299565255642, + 0.02550872415304184, + 0.02739296667277813, + 0.02384539507329464, + -0.04205106198787689, + -0.01476205326616764, + 0.02456010691821575, + -0.053434476256370544, + -0.01173427328467369, + -0.00871948804706335, + 0.03017384558916092, + -0.0051979064010083675, + -0.02622343599796295, + 0.013209179043769836, + 0.001120798522606492, + 0.004986741114407778, + 0.024807007983326912, + 0.017880797386169434, + 0.009772063232958317, + -0.002361798658967018, + -0.013774451799690723, + -0.008303655311465263, + 0.014606116339564323, + -0.019037332385778427, + 0.01778983324766159, + 5.888253144803457e-05, + 0.005227144341915846, + 0.01863449439406395, + -0.013111717998981476, + -0.0024755029007792473, + -0.005480542313307524, + 0.015268849208950996, + 0.0022887031082063913, + -0.01072068139910698, + -0.012936289422214031, + -0.008687000721693039, + -0.008602534420788288, + -0.04568959400057793, + 0.013274152763187885, + 0.007523969281464815, + 0.013358619064092636, + -0.013222173787653446, + -0.03555367887020111, + 0.026288410648703575, + 0.01637340523302555, + -0.02572963573038578, + -0.03555367887020111, + 0.03986794129014015, + 0.0045806546695530415, + -0.008505074307322502, + 0.011402906849980354, + 0.016490356996655464, + -0.001158158527687192, + 0.011370419524610043, + -0.011311943642795086, + -7.91868515079841e-05, + -0.0016422135522589087, + 0.013865415006875992, + 0.01838759332895279, + 0.025612682104110718, + 0.030901553109288216, + -0.012150106020271778, + -0.014099320396780968, + 0.020882587879896164, + -0.008258173242211342, + -0.03113545849919319, + -0.013105221092700958, + -0.02845853567123413, + -0.007679906208068132, + -0.03508586809039116, + 0.028224630281329155, + 0.03186316415667534, + -0.009135319851338863, + 9.101411706069484e-05, + -0.011656304821372032, + 0.003934165462851524, + 0.011558843776583672, + 0.007777367252856493, + -0.03012186661362648, + -0.010057948529720306, + -0.016737258061766624, + -0.033084671944379807, + -0.025794610381126404, + 0.03238295391201973, + 0.04436412826180458, + -0.0012093253899365664, + -0.01623046211898327, + -0.014632105827331543, + 0.027574893087148666, + 0.0007727824850007892, + 0.004986741114407778, + -0.0345400869846344, + -0.0045221783220767975, + 0.04379235953092575, + 0.002525857649743557, + -0.0012759235687553883, + 0.005022476892918348, + -0.006013327743858099, + 0.017231058329343796, + -0.015138901770114899, + -0.008056754246354103, + -0.026665259152650833, + 0.017906786873936653, + -0.025222839787602425, + 0.018478557467460632, + -0.0014464798150584102, + -0.05416218191385269, + 0.011500367894768715, + -0.026977133005857468, + -0.003982895519584417, + 0.026665259152650833, + 0.02002493292093277, + 0.004483194090425968, + -0.024352191016077995, + -0.008069748990237713, + -0.006234238855540752, + 0.00755645614117384, + -0.0626867488026619, + 0.0210645142942667, + 0.036931123584508896, + 0.026119478046894073, + 0.01393038872629404, + 0.030381761491298676, + -0.002974177012220025, + 0.014177288860082626, + 0.03321462124586105, + -0.002590831369161606, + 0.009284759871661663, + 0.00866101123392582, + 0.015242859721183777, + 0.0037392438389360905, + -0.02376742660999298, + 0.0020434269681572914, + 0.008641518652439117, + 0.014242262579500675, + -0.002397534204646945, + 0.014463174156844616, + 0.023611489683389664, + -0.024651071056723595, + 0.003632036969065666, + 0.0022367241326719522, + -0.027756819501519203, + -0.004421468824148178, + 0.027107080444693565, + 0.0008194823749363422, + -0.004099848680198193, + -0.004541670437902212, + 0.042960695922374725, + -0.010155409574508667, + -0.00738102663308382, + -0.008102236315608025, + 0.0363333635032177, + 0.004544919356703758, + 0.004730094689875841, + -0.022013133391737938, + 0.03012186661362648, + 0.011201487854123116, + -0.034202221781015396, + -0.00947968102991581, + 0.007322550285607576, + -0.03243493661284447, + -0.03490393981337547, + 0.002278957050293684, + -0.020011939108371735, + 0.00635119155049324, + -0.0015187632525339723, + 0.027522914111614227, + 0.0017396742478013039, + 0.02002493292093277, + -0.021623289212584496, + -0.0054935370571911335, + 0.040725596249103546, + 0.028822390362620354, + -0.016165487468242645, + -0.043012674897909164, + -0.023182662203907967, + -0.02736697532236576, + 0.006802759598940611, + -0.022870786488056183, + 0.016087519004940987, + -0.0018322619143873453, + 0.004278526641428471, + 0.023754430934786797, + -0.013800441287457943, + 0.026340389624238014, + -0.016841216012835503, + 0.006399922072887421, + -0.029861971735954285, + -0.00755645614117384, + -0.011695289053022861, + 0.015216870233416557, + 0.028250619769096375, + 0.03469602391123772, + -0.024261226877570152, + 0.0017461716197431087, + 0.022883782163262367, + 0.025326797738671303, + -0.002413777634501457, + 0.0048308041878044605, + 0.0064746420830488205, + -0.001591858803294599, + 0.015359812416136265, + -0.02161029540002346, + -0.004145330283790827, + 0.04966599494218826, + -0.029472127556800842, + 0.03771080821752548, + -0.016269447281956673, + 7.030371489236131e-05, + 0.026262421160936356, + 0.03557966649532318, + -0.013222173787653446, + 0.029861971735954285, + 0.0025144871324300766, + -0.04368840157985687, + 0.009544655680656433, + -0.028042703866958618, + -0.007913812063634396, + -0.015528745017945766, + -0.02905629575252533, + -0.00215875543653965, + -0.001247497508302331, + 0.02853650599718094, + 0.016529342159628868, + 0.02466406486928463, + -0.022818807512521744, + -0.016282441094517708, + -0.006393424700945616, + 0.007595440372824669, + 0.046807143837213516, + -0.020128892734646797, + 0.016633300110697746, + 0.029498117044568062, + 0.008855932392179966, + 0.015775645151734352, + 0.0015691178850829601, + -0.008589539676904678, + -0.014385205693542957, + -0.04976995289325714, + -0.018842410296201706, + -0.05385030806064606, + 0.0009616126772016287, + 0.002530730562284589, + 0.03004389815032482, + -0.007426508702337742, + -0.04501386731863022, + 0.02488497644662857, + 0.014645100571215153, + 0.028094682842493057, + ], + "index": 93, + }, + { + "title": "High-speed steel", + "text": "High-speed steel (HSS or HS) is a subset of tool steels, commonly used in tool bits and cutting tools.It is often used in power-saw blades and drill bits. It is superior to the older high-carbon steel tools used extensively through the 1940s in that it can withstand higher temperatures without losing its temper (hardness). This property allows HSS to cut faster than high carbon steel, hence the name high-speed steel.", + "vector": [ + 0.025558795779943466, + 0.039122700691223145, + -0.023505879566073418, + 0.015382200479507446, + 0.037890952080488205, + 0.013343948870897293, + 0.0008614912512712181, + -0.04448960721492767, + 0.011298365890979767, + -0.0006002944428473711, + -0.00047519488725811243, + 0.04290593042969704, + 0.03111632913351059, + 0.012852716259658337, + -0.007456481456756592, + 0.05619122460484505, + 0.022068839520215988, + 0.024224400520324707, + 0.01000796165317297, + -0.0478035993874073, + 0.06475481390953064, + -0.028696822002530098, + -0.06311248242855072, + -0.03284664452075958, + -0.0020675789564847946, + -0.02954731695353985, + 0.004494417924433947, + 0.0025038234889507294, + -0.09150136262178421, + -0.02145296521484852, + -0.0018705357797443867, + -0.007342838216573, + -0.011364351958036423, + -0.013167984783649445, + 0.058390773832798004, + 0.012647424824535847, + -0.008446279913187027, + 0.001985095674172044, + -0.055311404168605804, + 0.00019750144565477967, + 0.025397494435310364, + -0.05173346400260925, + -0.033726464956998825, + 0.038301534950733185, + 0.008475607261061668, + 0.001821962301619351, + -0.0031141990330070257, + 0.002324193250387907, + 0.023344580084085464, + -0.005997445434331894, + -0.006279721390455961, + 0.05129355564713478, + 0.0037575680762529373, + 0.0324360616505146, + 0.00177155586425215, + 0.006466683000326157, + 0.06622117757797241, + 0.1239960789680481, + -0.016848569735884666, + 0.008666235022246838, + -0.04135157912969589, + -0.009487401694059372, + 0.006704967934638262, + -0.024327045306563377, + -0.007064227946102619, + -0.025676105171442032, + 0.010191258043050766, + 0.026995835825800896, + -0.033491846174001694, + -0.013409935869276524, + -0.06059032678604126, + -0.010271907784044743, + 0.08053293079137802, + 0.02752372808754444, + -0.007771750446408987, + -0.006107422988861799, + 0.02783166617155075, + 0.005858140531927347, + -0.0027384422719478607, + -0.007254855707287788, + 0.014949622564017773, + 0.020807761698961258, + 0.012581437826156616, + -0.008160337805747986, + 0.02148229256272316, + -0.007144878152757883, + -0.004241469781845808, + -0.037568349391222, + 0.014260428957641125, + -0.015895429998636246, + -0.02926870621740818, + 0.004743700847029686, + 0.043463148176670074, + -0.0006552832201123238, + -0.023388570174574852, + 0.04217274487018585, + -0.00038240128196775913, + -0.012163522653281689, + 0.009575383737683296, + 0.030207181349396706, + -0.012889374978840351, + 0.013571236282587051, + 0.00857092160731554, + -0.017713725566864014, + -0.0009256448247469962, + -0.04457758739590645, + -0.00646301731467247, + 0.01564614661037922, + 0.03613130748271942, + -0.02305130660533905, + -0.018564218655228615, + -0.026423951610922813, + 0.008717558346688747, + -9.760512330103666e-05, + 0.01286004763096571, + -0.022318121045827866, + 0.02657058835029602, + -0.0031581902876496315, + 0.013688545674085617, + 0.02415108121931553, + -0.04255400225520134, + 0.06463750451803207, + 0.002666956977918744, + 0.007529799826443195, + -0.03419570252299309, + 0.028154266998171806, + -0.01922408491373062, + -0.008160337805747986, + -0.01244946476072073, + -0.048448801040649414, + 0.005733498837798834, + 0.005755494814366102, + 0.0631711333990097, + -0.0014535373775288463, + 0.01970798708498478, + -0.02291933260858059, + 0.036424580961465836, + 0.021130364388227463, + 0.0093920873478055, + 0.010367222130298615, + -0.048888709396123886, + -0.005682175979018211, + -0.03838951513171196, + 0.025998705998063087, + 0.040765032172203064, + -0.006268723402172327, + -0.022992650046944618, + 0.006184407044202089, + -0.019620005041360855, + 0.03445965051651001, + 0.04047175869345665, + -0.02790498360991478, + -0.015734128654003143, + -0.026981171220541, + -0.0009998796740546823, + -0.009736684150993824, + -0.04789157956838608, + 0.02772901952266693, + -0.028095612302422523, + -0.00558319641277194, + 0.02291933260858059, + -0.05079498887062073, + -0.005744496826082468, + 0.029151396825909615, + -0.02469363808631897, + 0.009252781979739666, + -0.020133232697844505, + -0.01991327852010727, + -0.03319857269525528, + 0.0148543082177639, + 0.03170287609100342, + 0.03915202617645264, + 0.020103905349969864, + -0.04736368730664253, + 0.005586862098425627, + 0.00836563017219305, + -0.019356058910489082, + 0.016789915040135384, + 0.017904354259371758, + -0.005935124587267637, + -0.008328970521688461, + 0.010873119346797466, + 0.031028347089886665, + -0.025573458522558212, + 0.013101998716592789, + -0.02387247234582901, + 0.013497917912900448, + 0.07695499807596207, + -0.025353504344820976, + -0.020441170781850815, + -0.03011919930577278, + 0.004780360031872988, + 0.016921887174248695, + 0.004076503217220306, + -0.000938017328735441, + -0.03008987195789814, + -0.03762700408697128, + -0.017977671697735786, + 0.006899261847138405, + -0.027362428605556488, + -0.014385070651769638, + 0.01202421821653843, + 0.021057045087218285, + -0.009538724087178707, + 0.06721831113100052, + 0.048272836953401566, + 0.027860993519425392, + 0.006008442956954241, + -0.0508829727768898, + 0.012794061563909054, + 0.035632744431495667, + 0.008944844827055931, + -0.014927626587450504, + -0.03272933512926102, + -0.005487882532179356, + -0.011379015631973743, + 0.006133084185421467, + -0.023931127041578293, + -0.015602155588567257, + 0.025764087215065956, + -0.01819762773811817, + -0.0022307124454528093, + 0.02541215904057026, + -0.031820185482501984, + -0.022567404434084892, + -0.029122069478034973, + -0.012574106454849243, + 0.031438931822776794, + 0.024165745824575424, + 0.005707837641239166, + 0.062174003571271896, + -0.0010521190706640482, + 0.017229825258255005, + 0.020235879346728325, + -0.031438931822776794, + 0.01523556374013424, + -0.002892411081120372, + -0.024869602173566818, + -0.008380293846130371, + -0.06287786364555359, + 0.03979722782969475, + 0.006041436456143856, + 0.009897984564304352, + -0.0009852160001173615, + -0.08147140592336655, + -0.025118885561823845, + 0.015088927000761032, + -0.04070637747645378, + -0.0044724224135279655, + -0.007815741933882236, + 0.005605191923677921, + -0.011730944737792015, + 0.018564218655228615, + 0.04821418225765228, + 0.03504619747400284, + -0.004740034695714712, + -0.016335340216755867, + 0.014304419979453087, + 0.027567720040678978, + -0.024224400520324707, + 0.019751977175474167, + -0.011093074455857277, + -6.121800311120751e-07, + 0.054460909217596054, + -0.042466018348932266, + 0.003728240728378296, + 0.032084133476018906, + -0.03988521173596382, + -0.008175001479685307, + 0.018490901216864586, + 0.022068839520215988, + -0.03794960677623749, + 0.017743052914738655, + 0.002098739380016923, + 0.020367851480841637, + -0.050736334174871445, + 0.006833275314420462, + 0.017699062824249268, + -0.008600248955190182, + 0.00877621304243803, + -0.007515136152505875, + -0.006287053227424622, + 0.05648449808359146, + 0.03794960677623749, + -0.030207181349396706, + -0.05243732035160065, + -0.03179085999727249, + 0.011899576522409916, + 0.04091166704893112, + -0.012750070542097092, + -0.014802985824644566, + -0.03275866061449051, + 0.02425372786819935, + 0.013820518739521503, + 0.008350965566933155, + 0.016027402132749557, + -0.007269519381225109, + -0.02572009526193142, + 0.03783229738473892, + -0.004439429379999638, + 0.04589731991291046, + 0.0327879898250103, + -0.021335655823349953, + -0.03387310355901718, + -0.01311666239053011, + 0.005253263749182224, + 5.5704800615785643e-05, + -0.023300588130950928, + 0.014883635565638542, + -0.07806943356990814, + -0.010836459696292877, + 0.030383145436644554, + -0.01130569726228714, + 0.05607391521334648, + 0.020030587911605835, + -0.008453612215816975, + -0.0011703449999913573, + -0.034166377037763596, + -0.029386015608906746, + -0.0022160487715154886, + -0.02940068021416664, + 0.006653645075857639, + -0.08575320243835449, + -0.005942456424236298, + 0.031849514693021774, + -0.0007299763383343816, + -0.04135157912969589, + 0.0324360616505146, + 0.054050326347351074, + -0.025588123127818108, + 0.03445965051651001, + -0.03161489591002464, + -0.026687897741794586, + 0.016540631651878357, + 0.021335655823349953, + -0.07806943356990814, + -0.004762030206620693, + -0.014693007804453373, + -0.05437292903661728, + -0.02107170969247818, + 0.007859732955694199, + 0.02649727091193199, + 0.0062174005433917046, + 0.04220207408070564, + 0.053434450179338455, + 0.018124308437108994, + -0.050120458006858826, + 0.017801707610487938, + -0.002157394075766206, + 0.009047490544617176, + 0.0006332877092063427, + -0.002492825733497739, + 0.010345226153731346, + 0.009890652261674404, + -0.008328970521688461, + -0.03193749487400055, + -0.006701301783323288, + -0.009700024500489235, + -0.015426191501319408, + 0.019268076866865158, + 0.05372772365808487, + -0.00804302841424942, + 0.01824161782860756, + -0.022068839520215988, + 0.02145296521484852, + -0.01068982295691967, + -0.02574942260980606, + 0.022054174914956093, + -0.022977987304329872, + -0.01865220069885254, + -0.006957916542887688, + -0.017772380262613297, + 0.06000377982854843, + -0.013175317086279392, + -0.05023777112364769, + -0.01670193113386631, + 0.017391124740242958, + -0.04220207408070564, + -0.06328844279050827, + 0.023784490302205086, + 0.028506195172667503, + 0.06064898148179054, + 0.020543815568089485, + 0.03149758651852608, + 0.014465720392763615, + -0.04314054921269417, + -0.0067526246421039104, + -0.011826258152723312, + -0.02052915282547474, + -0.006734295282512903, + 0.02032386139035225, + 0.0017779712798073888, + -0.012838052585721016, + -0.020001260563731194, + 0.026805207133293152, + 0.03337453678250313, + -0.017713725566864014, + -0.027948975563049316, + 0.01246412843465805, + 0.00366775318980217, + -0.0007872563437558711, + 0.024957584217190742, + -0.018329599872231483, + 0.006939586717635393, + 0.005047971848398447, + -0.05416763573884964, + -0.013791191391646862, + -0.01950269564986229, + -0.039914537221193314, + 0.008021033369004726, + 0.01333661749958992, + -0.04894736409187317, + 0.04176216199994087, + -0.002118901815265417, + -0.00872488971799612, + -0.004333117511123419, + 0.03882942721247673, + 0.015895429998636246, + 0.02605736069381237, + -0.04932862147688866, + -0.03378511965274811, + -0.06258458644151688, + 0.019751977175474167, + -0.0010832793777808547, + 0.02459099143743515, + 0.0440496951341629, + -0.04293525591492653, + 0.03422503173351288, + 0.027127807959914207, + -0.04627857729792595, + -0.02769969217479229, + -0.00707889162003994, + -0.00039683585055172443, + 0.07214530557394028, + -0.03575005382299423, + -0.003390975994989276, + 0.02913673222064972, + -0.004883005749434233, + 0.001687239739112556, + 0.046395886689424515, + -0.009626706130802631, + -0.04085301235318184, + -0.01901879347860813, + 0.009604711085557938, + -0.02636529691517353, + 0.0006484095938503742, + -0.04572135582566261, + -0.009142804890871048, + 0.015499509871006012, + -0.03674718365073204, + -0.049739204347133636, + 0.006840607151389122, + -0.02497224695980549, + -0.018769510090351105, + 0.010968432761728764, + -0.048038218170404434, + 0.013923164457082748, + 0.011679621413350105, + 0.00788906030356884, + -0.017743052914738655, + 0.013380608521401882, + 0.08176468312740326, + 0.04434296861290932, + -0.04296458512544632, + 0.033726464956998825, + 0.022068839520215988, + 0.0006195405148901045, + 0.048008888959884644, + -0.002157394075766206, + 0.0372164212167263, + -0.0631711333990097, + -0.03231875225901604, + -0.04255400225520134, + 0.029693953692913055, + -0.01111506950110197, + -0.02137964591383934, + 0.02981126308441162, + -0.015484846197068691, + -0.0512349009513855, + 0.005381570663303137, + 0.015690138563513756, + -0.01922408491373062, + 0.008754217065870762, + 0.049299292266368866, + 0.01937072165310383, + 0.008153006434440613, + 0.04231938347220421, + -0.023007314652204514, + -0.025324176996946335, + 0.03284664452075958, + -0.006932254880666733, + -0.013974487781524658, + -0.03821355104446411, + -0.03531014174222946, + -0.004754698369652033, + 0.057774901390075684, + 0.011840921826660633, + 0.0018668698612600565, + -0.0020455834455788136, + -0.002626631874591112, + -0.021115699782967567, + -0.02459099143743515, + -0.04753965139389038, + -0.013754532672464848, + 0.03094036504626274, + 0.026453278958797455, + -0.01752309873700142, + -0.04032512009143829, + 0.003999518696218729, + -0.005055303685367107, + -0.048038218170404434, + -0.037861622869968414, + -0.00729151489213109, + 0.009216123260557652, + -0.002580807777121663, + 0.03566206991672516, + -0.01786036230623722, + 0.0015781786059960723, + 0.008783544413745403, + 0.019927941262722015, + 0.0016111718723550439, + 0.039122700691223145, + -0.02893144078552723, + -0.008182333782315254, + 0.023916462436318398, + -0.0283448938280344, + 0.01891614869236946, + 0.01505959965288639, + -0.00018959680164698511, + -0.008182333782315254, + -0.023799153044819832, + -0.033081263303756714, + -0.03343319147825241, + 0.018388254567980766, + -0.02025054208934307, + 0.017464444041252136, + 0.007735091261565685, + 0.022992650046944618, + 0.009744015522301197, + 0.017127178609371185, + -0.010902446694672108, + 0.052202701568603516, + 0.018901484087109566, + -0.006437355652451515, + 0.011027087457478046, + 0.030001889914274216, + -0.00558319641277194, + -0.018505563959479332, + -0.013160653412342072, + -0.02940068021416664, + -0.011965563520789146, + 0.03959193825721741, + -0.005663846619427204, + -0.01467101275920868, + 0.007287849206477404, + -0.006048768293112516, + -0.03489955887198448, + -0.044694896787405014, + 0.040383774787187576, + 0.003647590521723032, + -0.005850808694958687, + 0.012310159392654896, + 0.04557471722364426, + -0.00826298352330923, + -0.024678973481059074, + 0.013849846087396145, + 0.00023484800476580858, + 0.018094981089234352, + -0.04399104043841362, + 0.009861324913799763, + 0.0018448743503540754, + 0.009758679196238518, + 0.01272074319422245, + -0.0008523264550603926, + -0.040354449301958084, + -0.02708381786942482, + -0.0553407296538353, + -0.028476867824792862, + -0.005704171489924192, + -0.0037868954241275787, + -0.011994890868663788, + -0.026731889694929123, + -0.016232693567872047, + -0.018021663650870323, + 0.005869138054549694, + 0.02608668804168701, + -0.019268076866865158, + -0.05126422643661499, + -0.005220270249992609, + 0.0011034419294446707, + -0.012060876935720444, + 0.024297717958688736, + -0.04384440556168556, + 0.02705449052155018, + -0.0028869120869785547, + 0.01286004763096571, + -0.029723281040787697, + -0.05932925269007683, + -0.027245119214057922, + 0.08375894278287888, + 0.04237803816795349, + 0.03170287609100342, + 0.031820185482501984, + 0.00966336578130722, + -0.02212749421596527, + 0.029254041612148285, + -0.000954055693000555, + -0.03363848477602005, + -0.012838052585721016, + -0.004109496250748634, + 0.023095296695828438, + 0.007779082283377647, + 0.047422342002391815, + 0.00030083456658758223, + 0.03665919974446297, + -0.00918679591268301, + -0.00700923940166831, + 0.0032223437447100878, + 0.027582382783293724, + -0.054460909217596054, + 0.025016238912940025, + 0.01786036230623722, + 0.0006997325108386576, + 0.01311666239053011, + -0.007302512880414724, + 0.0009169382974505424, + 0.0028209255542606115, + 0.03070574626326561, + 0.04252467304468155, + 0.004487086087465286, + -0.018666865304112434, + -0.0042707971297204494, + -0.021438300609588623, + -0.004857344087213278, + 0.005931458901613951, + 0.0010035455925390124, + 0.052818577736616135, + 0.014627020806074142, + 0.014751662500202656, + -0.0059461225755512714, + 0.028784804046154022, + 0.012214845977723598, + 0.023520544171333313, + -0.022068839520215988, + -0.017743052914738655, + 0.03302260860800743, + 0.006188073195517063, + 0.01162829902023077, + -0.002558812266215682, + -0.010205921716988087, + -0.012163522653281689, + -0.034166377037763596, + -0.015719465911388397, + 0.027142472565174103, + -0.014832313172519207, + -0.006664642598479986, + -0.001512192073278129, + 0.007669104728847742, + 0.03410772234201431, + 0.0020804095547646284, + -0.0123834777623415, + -0.02223013900220394, + 0.020881080999970436, + 0.005487882532179356, + 0.01588076539337635, + 0.060062434524297714, + -0.014553702436387539, + 0.005905797239392996, + -0.02500157430768013, + 0.010308567434549332, + -0.03419570252299309, + -0.03718709200620651, + -0.0023846810217946768, + 0.024224400520324707, + 0.025485476478934288, + -0.02063179761171341, + -0.0019631001632660627, + -0.0020804095547646284, + 0.033139917999506, + 0.024708300828933716, + 0.025265522301197052, + 0.005066301673650742, + -0.003645757446065545, + -0.025368167087435722, + 0.050765663385391235, + -0.04143955931067467, + -0.03844816982746124, + 0.008013701066374779, + -0.009678029455244541, + 0.01395249180495739, + -0.003709911135956645, + -0.006957916542887688, + -0.028843458741903305, + 0.03319857269525528, + 0.026629243046045303, + 0.02363785356283188, + -0.008702894672751427, + -0.04363911226391792, + 0.011701617389917374, + 0.008673567324876785, + 0.0011813427554443479, + 0.0064923446625471115, + -0.0026339637115597725, + -0.01203888189047575, + 0.05337579548358917, + 0.042055435478687286, + 0.008673567324876785, + -0.05721767991781235, + -0.029957899823784828, + -0.019458703696727753, + 0.001026457641273737, + 0.02844754047691822, + 0.019356058910489082, + -0.02530951239168644, + 0.03706978261470795, + 0.016657941043376923, + -0.01048453152179718, + 0.0035999335814267397, + -0.035192832350730896, + 0.038682788610458374, + 0.05918261408805847, + 0.024957584217190742, + -0.00944341067224741, + -0.006679306272417307, + 0.021775566041469574, + -0.01580744795501232, + 0.026247987523674965, + 0.01241280511021614, + -0.013754532672464848, + 0.0019814297556877136, + 0.036453910171985626, + -0.029019422829151154, + -0.02746507339179516, + 0.019268076866865158, + 0.0032461723312735558, + -0.01629134826362133, + 0.00028754561208188534, + -0.017889689654111862, + -0.005975449923425913, + 0.017801707610487938, + -0.008336301892995834, + -0.01916543021798134, + -0.01819762773811817, + -0.032260097563266754, + -0.011173724196851254, + 0.00810901541262865, + 0.031204311177134514, + 0.013138657435774803, + -0.000333369622239843, + 0.026614580303430557, + 0.008842199109494686, + -0.02469363808631897, + 0.018784174695611, + -0.02690785378217697, + 0.005509878043085337, + 0.02438570000231266, + -0.03384377434849739, + 0.0070862234570086, + -0.001434291247278452, + -0.005014978814870119, + -0.031820185482501984, + 0.05047238990664482, + -0.04190880060195923, + -0.002853918820619583, + 0.030353818088769913, + 0.052642613649368286, + 0.02250874973833561, + -0.01110040582716465, + 0.0011281869374215603, + 0.02947399765253067, + 0.0005219353479333222, + 0.04214341938495636, + -0.014304419979453087, + -0.0073465039022266865, + 0.010132603347301483, + 0.01292603462934494, + 0.02572009526193142, + 0.010315898805856705, + -0.011679621413350105, + -0.004663050174713135, + 0.018872156739234924, + 0.011914240196347237, + -0.0036714191082865, + 0.03695247322320938, + 0.04633723199367523, + 0.0023095295764505863, + -0.033110588788986206, + -0.017097851261496544, + 0.039533283561468124, + 0.010572513565421104, + 0.053199831396341324, + 0.02001592330634594, + -0.0006158745964057744, + 0.048243507742881775, + 0.00823365617543459, + -0.0009623040095902979, + -0.03158556669950485, + 0.02420973591506481, + -0.03114565648138523, + -0.015587491914629936, + -0.0015974247362464666, + -0.015176909044384956, + 0.028183594346046448, + -0.004780360031872988, + 0.053199831396341324, + -0.02445901930332184, + -0.027685029432177544, + 0.01005928497761488, + 0.05023777112364769, + -0.004556738771498203, + -0.012933366000652313, + 0.054871492087841034, + 0.009824666194617748, + 0.03844816982746124, + -0.003077539848163724, + 0.020001260563731194, + -0.003775897668674588, + -0.00022247552988119423, + 0.02168758399784565, + 0.030383145436644554, + -0.03569139912724495, + -0.030823055654764175, + -0.0013683047145605087, + -0.012845383957028389, + 0.007793745957314968, + 0.0416741780936718, + 0.01847623661160469, + -0.0044174338690936565, + 0.02988458052277565, + -0.010917110368609428, + 0.011994890868663788, + -0.03531014174222946, + -0.005150617565959692, + -0.020382516086101532, + -0.05915328860282898, + 0.026731889694929123, + -0.04569202661514282, + 0.06393364816904068, + 0.018212290480732918, + -0.016643276438117027, + 0.027846328914165497, + -0.03566206991672516, + -0.010029957629740238, + 0.028095612302422523, + -0.014465720392763615, + -0.006048768293112516, + -0.026042696088552475, + -0.004556738771498203, + -0.008798208087682724, + 0.022010184824466705, + 0.05129355564713478, + 0.0029455667827278376, + 0.023608526214957237, + 0.06305382400751114, + -0.010645831935107708, + 0.031204311177134514, + 0.03111632913351059, + -0.016760587692260742, + 0.016437985002994537, + -0.040589068084955215, + 0.030823055654764175, + 0.010440540499985218, + -0.034166377037763596, + 0.036835163831710815, + 0.00021961152378935367, + -0.0013472256250679493, + 0.023623188957571983, + 0.000476111366879195, + 0.052642613649368286, + 0.02988458052277565, + 0.00877621304243803, + 0.01156231202185154, + 0.003830886445939541, + -0.026995835825800896, + -0.009494733065366745, + -0.012889374978840351, + -0.06293651461601257, + -0.011892245151102543, + 0.003728240728378296, + 0.040794357657432556, + 0.054020997136831284, + 0.00025363583699800074, + -0.0033488180488348007, + -0.018212290480732918, + 0.011261706240475178, + 0.04026646539568901, + -0.039973191916942596, + -0.0072145308367908, + 0.022156821563839912, + 0.004945326130837202, + -0.012933366000652313, + 0.03217211365699768, + 0.039738573133945465, + -0.003878543386235833, + 0.0024616653099656105, + 0.02469363808631897, + -0.0017358132172375917, + 0.01137168426066637, + 0.014179779216647148, + -0.016115384176373482, + -0.0015891763614490628, + -0.011122401803731918, + -0.014458389021456242, + -0.0196346677839756, + 0.011093074455857277, + -0.01636466756463051, + -0.03073507361114025, + 0.017801707610487938, + 0.020103905349969864, + -0.008189665153622627, + 0.02001592330634594, + 0.04627857729792595, + -0.0009659699280746281, + -0.0002884620917029679, + -0.0031746868044137955, + 0.00415715342387557, + 0.004648386500775814, + 0.005553869064897299, + -0.019971933215856552, + -0.014685676433146, + 0.042231399565935135, + -0.020573142915964127, + 0.0031123661901801825, + 0.008614912629127502, + -0.03841884434223175, + 0.0016322509618476033, + -0.0007826739456504583, + -0.006759956479072571, + 0.009414083324372768, + -0.02585206925868988, + -0.035574089735746384, + -0.02909274213016033, + 0.01991327852010727, + -0.019004130735993385, + -0.022626059129834175, + -0.02073444426059723, + -0.012016885913908482, + 0.011137065477669239, + -0.015660811215639114, + -0.017669735476374626, + 0.00041608192259445786, + 0.012566774152219296, + -0.018256282433867455, + 0.018842829391360283, + 0.010037289001047611, + -0.02308063395321369, + -0.044079024344682693, + -0.0025826406199485064, + -0.027450410649180412, + 0.06950584799051285, + 0.0029290702659636736, + 0.04352180287241936, + -0.012427468784153461, + -0.01595408469438553, + -0.06786351650953293, + -0.014502380043268204, + -0.012845383957028389, + 0.01601273939013481, + -0.05624987930059433, + 0.014121124520897865, + 0.01896013878285885, + -0.036424580961465836, + 0.02240610308945179, + 0.025294849649071693, + -0.012625428847968578, + -0.02988458052277565, + -0.014978949911892414, + -0.04281794652342796, + -0.061763420701026917, + -0.007559127174317837, + 0.02124767377972603, + 0.01844690926373005, + 0.019150767475366592, + 0.03472359478473663, + -0.00807968806475401, + -0.010645831935107708, + 0.020778434351086617, + 0.025148212909698486, + 0.044518932700157166, + 0.016995206475257874, + -0.009516729041934013, + 0.03481157869100571, + -0.026717225089669228, + 0.017699062824249268, + 0.054284945130348206, + -0.013622559607028961, + 0.029224714264273643, + 0.005256929434835911, + -0.01601273939013481, + 0.02161426469683647, + 0.002098739380016923, + -0.017640408128499985, + 0.026731889694929123, + 0.0026138010434806347, + -0.005850808694958687, + 0.042260728776454926, + -0.004912333097308874, + 0.02821292169392109, + -0.051146917045116425, + -0.05680709704756737, + 0.017567088827490807, + -0.04296458512544632, + -0.06745292991399765, + -0.04352180287241936, + 0.002054748125374317, + 0.01891614869236946, + -0.02944467030465603, + 0.04011983051896095, + -0.03821355104446411, + -0.029151396825909615, + 0.015924757346510887, + -0.03410772234201431, + -0.02394578978419304, + 0.010323231108486652, + -0.017332470044493675, + 0.03548610582947731, + -0.01205354556441307, + -0.03264135122299194, + 0.02261139452457428, + 0.028095612302422523, + 0.02001592330634594, + -0.02813960239291191, + -0.007225528359413147, + -0.0068442728370428085, + -0.011884912848472595, + 0.006085427477955818, + 0.002307696733623743, + -0.0003842342412099242, + 0.010719150304794312, + -0.023388570174574852, + -0.03730440139770508, + 0.0022362112067639828, + 0.004054507706314325, + -0.061528801918029785, + 0.027685029432177544, + -0.00782307330518961, + 0.008438948541879654, + -0.009098813869059086, + -0.005282591097056866, + 0.0017468109726905823, + -0.028462203219532967, + -0.01703919656574726, + 0.022274130955338478, + -0.005080965347588062, + 0.019590677693486214, + -0.007830405607819557, + 0.02258206717669964, + -0.002327859168872237, + 0.042260728776454926, + -0.04522278904914856, + 0.010425876826047897, + -0.020705116912722588, + 0.00763244554400444, + 0.023300588130950928, + -0.028872786089777946, + -0.01088045071810484, + -0.025148212909698486, + -0.0016111718723550439, + 0.006312714423984289, + -0.005528207402676344, + -0.015176909044384956, + -0.04231938347220421, + -0.0014287923695519567, + -0.0011153562227264047, + 0.003204014152288437, + 0.01875484734773636, + -0.02032386139035225, + 0.0024854938965290785, + 0.00015202112263068557, + -0.013021348044276237, + 0.012002222239971161, + -0.014443725347518921, + -0.0182709451764822, + 0.009531392715871334, + 0.003733739722520113, + 0.006356705445796251, + -0.02533883973956108, + 0.005649182945489883, + 0.0019631001632660627, + 0.0032645019236952066, + -0.023857807740569115, + -0.005938790738582611, + 0.005348577629774809, + -0.011679621413350105, + 0.002599137369543314, + 0.019766641780734062, + 0.030617764219641685, + 0.01355657260864973, + -0.009568051435053349, + -0.00788906030356884, + -0.006004777271300554, + 0.017772380262613297, + 0.02343256212770939, + 0.01881350204348564, + 0.003418470500037074, + -0.006224732380360365, + 0.01327063050121069, + 0.057364318519830704, + -0.03882942721247673, + -0.0010035455925390124, + -0.0034917888697236776, + -0.015088927000761032, + -0.03841884434223175, + -0.005847142543643713, + 0.0065326695330441, + 0.016819242388010025, + -0.00489400327205658, + -0.012955361977219582, + -0.03750969469547272, + -0.012816056609153748, + 0.034958213567733765, + 0.03833086043596268, + 0.01744977943599224, + 0.004384440369904041, + -0.0007043149089440703, + -0.0040508415549993515, + -0.020367851480841637, + -0.01724448800086975, + 0.019883951172232628, + 0.04290593042969704, + 0.008673567324876785, + 0.006972580216825008, + 0.0036329268477857113, + -0.01646731235086918, + 0.0013087334809824824, + 0.002974894130602479, + 0.016130048781633377, + 0.0006117504090070724, + 0.00024217984173446894, + -0.0009760512039065361, + -0.002976727206259966, + -0.016115384176373482, + 0.015411527827382088, + -0.031820185482501984, + -0.007042232435196638, + 0.008607580326497555, + -0.03152691200375557, + 0.0033836441580206156, + 0.002428672043606639, + 0.00244700163602829, + -0.006382367108017206, + -0.013644554652273655, + -0.002930903108790517, + -0.019869286566972733, + 0.018798837438225746, + 0.020573142915964127, + 0.0013976320624351501, + 0.04727570712566376, + 0.01354190893471241, + 0.009824666194617748, + -0.0008921932894736528, + -0.013673882000148296, + 0.018461573868989944, + 0.031233638525009155, + -0.02063179761171341, + 0.005275259260088205, + -0.021320991218090057, + 0.030793728306889534, + 0.0074711451306939125, + -0.01420910656452179, + 0.02769969217479229, + -0.002388346940279007, + 0.03261202573776245, + 0.03363848477602005, + -0.03572072461247444, + 0.0036109313368797302, + 0.02677587978541851, + -0.001668910146690905, + -0.010235249064862728, + 0.049885839223861694, + -0.004883005749434233, + 0.016613949090242386, + 0.008145674131810665, + 0.018637537956237793, + -0.021335655823349953, + 0.005722501315176487, + -0.018124308437108994, + -0.0004871091223321855, + -0.006921257358044386, + 0.006184407044202089, + 0.02690785378217697, + 0.012346819043159485, + 0.02950332500040531, + -0.00034940801560878754, + 0.029957899823784828, + 0.016555294394493103, + -0.03111632913351059, + -0.019971933215856552, + 0.013710541650652885, + -0.015734128654003143, + -0.0008940262487158179, + -0.010814464651048183, + -0.014495047740638256, + 0.0013866343069821596, + 0.04316987469792366, + -0.013255966827273369, + 0.00196859915740788, + -0.005326582118868828, + 0.0026064692065119743, + -0.035808708518743515, + -0.023887135088443756, + 0.02217148430645466, + -0.0016514969756826758, + 0.006514340173453093, + -0.014055137522518635, + -0.014539038762450218, + -0.007661772891879082, + -0.028359558433294296, + 0.006602322217077017, + 0.0003106867370661348, + 0.015015608631074429, + -0.020690452307462692, + -0.0060231066308915615, + -0.005172613076865673, + 0.02261139452457428, + -0.01503027230501175, + -0.060062434524297714, + -0.03906404599547386, + 0.028183594346046448, + -0.0035559425596147776, + -0.018769510090351105, + -0.007669104728847742, + 0.02410709112882614, + -0.025382831692695618, + 0.012156191281974316, + -0.01347592193633318, + 0.021731574088335037, + -0.013659218326210976, + -0.029532652348279953, + -0.01355657260864973, + 0.0035724390763789415, + -0.010836459696292877, + 8.076480298768729e-05, + 0.0402957946062088, + 0.003711744211614132, + -0.0005411814781837165, + 0.0024415028747171164, + 0.006906593684107065, + 0.008702894672751427, + -0.033961083739995956, + -0.0167312603443861, + 0.01752309873700142, + -0.015074263326823711, + 0.053639743477106094, + -0.008783544413745403, + 0.021057045087218285, + -0.01437773834913969, + -0.007830405607819557, + -0.008482939563691616, + -0.013717873021960258, + 0.010403880849480629, + 0.03445965051651001, + -0.03011919930577278, + 0.05856674164533615, + 0.018417581915855408, + -0.0024579993914812803, + 0.02896076813340187, + -0.013549240306019783, + 0.03730440139770508, + 0.009985966607928276, + -0.0283448938280344, + 0.0338144488632679, + -0.017640408128499985, + 0.023315252736210823, + -0.037451039999723434, + 0.06616252660751343, + -0.0024268392007797956, + 0.00048481792327947915, + -0.005542871076613665, + 0.01775771751999855, + 0.006085427477955818, + -0.012955361977219582, + -0.027230454608798027, + -0.018769510090351105, + 0.020793098956346512, + 0.04487086087465286, + 0.02435637265443802, + -0.011144396848976612, + 0.038712117820978165, + -0.012354150414466858, + 0.009751347824931145, + -0.01629134826362133, + -0.03921068087220192, + 0.024165745824575424, + -0.008409621194005013, + 0.03487023338675499, + 0.0032974951900541782, + -0.0324360616505146, + 0.0046447208151221275, + -0.015440855175256729, + 0.00831430684775114, + 0.004300124477595091, + 0.05745229870080948, + 0.02181955613195896, + -0.0033854772336781025, + -0.006316380575299263, + 0.02274336852133274, + -0.01379852369427681, + -0.007133880630135536, + 0.02674655243754387, + 0.01703919656574726, + -0.0053962343372404575, + 0.03481157869100571, + -0.044929515570402145, + -0.03982655704021454, + -0.04073570296168327, + -0.004039844032377005, + -0.011093074455857277, + -0.019209422171115875, + 0.0317615307867527, + -0.004853678401559591, + -0.026893189176917076, + -0.029561979696154594, + 0.0082849794998765, + -0.014810317195951939, + -0.010095943696796894, + 0.017068523913621902, + 0.013204644434154034, + 0.031233638525009155, + -0.03445965051651001, + -0.010462536476552486, + 0.019561350345611572, + 0.002351687755435705, + -0.027333101257681847, + 0.018666865304112434, + -0.024327045306563377, + -0.012016885913908482, + 0.013681214302778244, + 0.026555925607681274, + -0.05504745617508888, + -0.007383163087069988, + 0.002344355918467045, + -0.015008277259767056, + 0.021878210827708244, + -0.002896076999604702, + -0.0039042048156261444, + 0.026819871738553047, + -0.02291933260858059, + 0.01646731235086918, + 0.021291663870215416, + 0.0433751679956913, + 0.03460628539323807, + -0.0001539686491014436, + -0.005506211891770363, + 0.010557849891483784, + -0.019561350345611572, + -0.0010961100924760103, + -0.0075737908482551575, + 0.02462031878530979, + 0.00565284863114357, + -0.02294865995645523, + -0.006979912053793669, + -0.05607391521334648, + 0.007053230423480272, + 0.00720719899982214, + 0.0002046041627181694, + 0.01601273939013481, + 0.011027087457478046, + 0.005579530261456966, + 0.020646462216973305, + -0.041820816695690155, + 0.017288479954004288, + -0.02489892952144146, + 0.014348411001265049, + 0.00381622277200222, + 0.007031234912574291, + 0.008328970521688461, + -0.009032826870679855, + -0.005326582118868828, + 0.013036011718213558, + -0.020470498129725456, + 0.002155561000108719, + -0.014861640520393848, + 0.014956953935325146, + 0.015836775302886963, + -0.01844690926373005, + -0.004344115499407053, + 0.009912648238241673, + 0.03501686826348305, + -0.029943235218524933, + 0.004003184847533703, + -0.004611727315932512, + -0.001837542513385415, + 0.0215116199105978, + -0.006015774793922901, + -0.01137168426066637, + -0.01005928497761488, + -0.006202736869454384, + -0.0021757236681878567, + -0.0032150119077414274, + -0.005891133565455675, + -0.013233971782028675, + -0.013659218326210976, + -0.020705116912722588, + 0.01505959965288639, + -0.01504493597894907, + -0.03469426929950714, + -0.013101998716592789, + 0.0069945757277309895, + 0.026101350784301758, + -0.03575005382299423, + -0.01314598973840475, + -0.005810483358800411, + -0.011921572498977184, + 0.019238749518990517, + 0.008013701066374779, + -0.01898946613073349, + 0.009678029455244541, + 0.014011146500706673, + -0.007522467989474535, + -0.004314788151532412, + -0.0093920873478055, + 1.4950080185371917e-05, + 0.005132288206368685, + -0.0018467073095962405, + 0.016144711524248123, + 0.0030097204726189375, + 0.017669735476374626, + 0.015822110697627068, + 0.01662861369550228, + 0.005737164989113808, + -0.011027087457478046, + -0.003392809070646763, + 0.009223454631865025, + 0.03363848477602005, + 0.021394310519099236, + 0.006690304260700941, + 0.011012423783540726, + -0.0069945757277309895, + -0.007779082283377647, + -0.0012299162335693836, + 0.014106460846960545, + -0.00944341067224741, + 0.003504619700834155, + -0.0026247987989336252, + 0.03337453678250313, + 0.015103590674698353, + 0.01205354556441307, + -0.01898946613073349, + -0.003966525662690401, + 0.005799485836178064, + 0.04463624209165573, + -0.021804893389344215, + 0.02217148430645466, + 0.011547648347914219, + -0.011943567544221878, + 0.016965879127383232, + 0.012632761150598526, + -0.012376146391034126, + 0.008380293846130371, + -0.07466746121644974, + -0.009098813869059086, + -0.0274944007396698, + -0.010924441739916801, + 0.029957899823784828, + -0.0060927593149244785, + 0.006583992391824722, + -0.0009485568152740598, + -0.008849531412124634, + 0.018798837438225746, + 0.004351447336375713, + -0.03275866061449051, + -0.03610198199748993, + 0.012082872912287712, + -0.029122069478034973, + 0.02811027504503727, + -0.0022068838588893414, + -0.021570274606347084, + -0.022670049220323563, + -0.0023828481789678335, + 0.00826298352330923, + 0.013365944847464561, + 0.045516062527894974, + 0.0047253710217773914, + -0.00810901541262865, + -0.01241280511021614, + -0.018564218655228615, + 0.01286004763096571, + 0.012764734216034412, + 0.021540947258472443, + -0.011408342979848385, + 0.01595408469438553, + -0.007159541826695204, + 0.01490563154220581, + 0.010594509541988373, + 0.048859383910894394, + -0.02643861621618271, + 0.01960534043610096, + -0.0029895578045397997, + 0.0372164212167263, + 0.031820185482501984, + -0.02346188947558403, + -0.011723612435162067, + 0.0179336816072464, + 0.008123679086565971, + 0.014011146500706673, + -0.00674529280513525, + 0.015367536805570126, + -0.00826298352330923, + 0.014260428957641125, + 0.012251504696905613, + -0.02415108121931553, + -0.034342341125011444, + -0.011349688284099102, + -0.03366781026124954, + -0.0005498880054801702, + 0.013717873021960258, + 0.000322371837683022, + 0.01731780730187893, + -0.04381507635116577, + -0.01703919656574726, + 0.0379202775657177, + -0.01327063050121069, + 0.02366718091070652, + 0.014788322150707245, + 0.0010209587635472417, + -0.01314598973840475, + -0.0021922201849520206, + -0.018021663650870323, + -0.01483964454382658, + -0.0032205109018832445, + 0.014546371065080166, + -0.016027402132749557, + 0.027685029432177544, + -0.0009316019713878632, + -0.0017532262718304992, + 0.010220585390925407, + -0.010931774042546749, + 0.01203888189047575, + -0.003077539848163724, + 0.014297088608145714, + -0.011745608411729336, + 0.0029950567986816168, + -0.051557499915361404, + -0.0032571700867265463, + -0.02114502713084221, + ], + "index": 94, + }, + { + "title": "Cricket poetry", + "text": "The game of cricket has inspired much poetry, most of which romanticises the sport and its culture.", + "vector": [ + -0.0013973518507555127, + 0.011464058421552181, + -0.027261095121502876, + 0.05063745006918907, + -0.027315428480505943, + 0.05960223823785782, + -0.02391967549920082, + -0.03827691450715065, + -0.023580100387334824, + -0.01996702142059803, + 0.012829150073230267, + 0.015335215255618095, + -0.00465218024328351, + -0.027804415673017502, + -0.0011511598713696003, + -0.031648408621549606, + 0.03338703140616417, + 0.014085578732192516, + -0.033495694398880005, + -0.027274679392576218, + -0.006485885940492153, + 0.04588339850306511, + 0.003484041430056095, + -0.029420794919133186, + 0.04292230308055878, + 0.03254488483071327, + -0.0291491337120533, + -0.004587660543620586, + -0.012937814928591251, + 0.013046478852629662, + 0.006146310828626156, + 0.004356749821454287, + 0.05574466288089752, + -0.013746003620326519, + -0.015824204310774803, + 0.003579122480005026, + -0.00483215507119894, + 0.03412051498889923, + 0.004302417393773794, + -0.06470944732427597, + -0.027193181216716766, + -0.01688367873430252, + 0.06976232677698135, + 0.007103912997990847, + -0.003721744054928422, + -0.009732224978506565, + -0.013895416632294655, + -0.01231978740543127, + 0.013026104308664799, + -0.015158636495471, + 0.08247601985931396, + -0.01343359425663948, + -0.004788009915500879, + 0.005433203186839819, + 0.00360968429595232, + 0.00660813320428133, + 0.021488318219780922, + -0.021366070955991745, + 0.03667411953210831, + -0.031268082559108734, + -0.042623478919267654, + -0.008170179091393948, + 0.02549530565738678, + -0.040749020874500275, + 0.02363443374633789, + -0.03509848937392235, + -0.009535270743072033, + -0.029638122767210007, + 0.008822163566946983, + 0.0008820465300232172, + 0.002821869682520628, + 0.027166014537215233, + -0.02656836248934269, + 0.02966528758406639, + 0.025087814778089523, + -0.00793926790356636, + 0.02643253281712532, + 0.03259921818971634, + -0.0060648126527667046, + 0.016842929646372795, + -0.003229360096156597, + -0.004478996619582176, + -0.05090911313891411, + 0.027736501768231392, + -0.011185606941580772, + -0.018581554293632507, + 0.030480269342660904, + -0.03993404284119606, + 0.03172990679740906, + 0.06367713958024979, + 0.027057351544499397, + 0.03482683002948761, + 0.0341748483479023, + 0.01687009446322918, + -0.04914332181215286, + 0.018989045172929764, + 0.002329485723748803, + 0.015009223483502865, + 0.018404975533485413, + 0.005979918874800205, + 0.05536433681845665, + -0.016530519351363182, + -0.018228396773338318, + -0.04751335829496384, + -0.012469200417399406, + -0.014954891055822372, + -0.07595618069171906, + -0.0323275588452816, + 0.04512275010347366, + -0.029692454263567924, + 0.006231204606592655, + -0.026486864313483238, + 0.017399832606315613, + -0.03599496930837631, + 0.013229848816990852, + -0.01457456685602665, + 0.027179596945643425, + -0.00285412953235209, + -0.0007165036513470113, + 0.027980994433164597, + -0.044552262872457504, + 0.009229653514921665, + -0.018703801557421684, + 0.019804025068879128, + 0.02800816111266613, + 0.018282728269696236, + -0.03528865426778793, + -0.016340358182787895, + 0.033441364765167236, + -0.0015756288776174188, + -0.01687009446322918, + -0.0015467649791389704, + 0.01961386203765869, + 0.029040470719337463, + 0.03757059946656227, + 0.035859137773513794, + -0.04191716015338898, + -0.05574466288089752, + 0.03355002775788307, + -0.011185606941580772, + 0.009148155339062214, + 0.0032480366062372923, + 0.028687311336398125, + 0.024150587618350983, + 0.0029543042182922363, + 0.007789854891598225, + -0.01572912186384201, + -0.030507434159517288, + -0.016340358182787895, + 0.04561173915863037, + -0.017182504758238792, + 0.023240525275468826, + 0.018133314326405525, + -0.028904639184474945, + -0.04995829984545708, + 0.04102068394422531, + 0.021379653364419937, + -0.011212772689759731, + 0.017033090814948082, + 0.031213751062750816, + -0.017535662278532982, + -0.015172218903899193, + 0.0017793739680200815, + -0.017929568886756897, + 0.05710296332836151, + -0.027396926656365395, + -0.06345981359481812, + -0.026391783729195595, + 0.004316000733524561, + 0.007681190501898527, + 0.0070020402781665325, + 0.02879597619175911, + 0.007273700553923845, + 0.019708944484591484, + -0.004261668771505356, + -0.011178814806044102, + -0.022792287170886993, + -0.03297954052686691, + -0.0015671395231038332, + 0.04167266562581062, + -0.03588630631566048, + -0.03814108297228813, + -0.00016671018966007978, + -0.0542776994407177, + -0.039173394441604614, + 0.0768798217177391, + 0.02118949219584465, + 0.03863007202744484, + 0.02836131863296032, + 0.03765209764242172, + 0.013155142776668072, + -0.0019933064468204975, + 0.0019440678879618645, + -0.05161542817950249, + 0.04042302817106247, + 0.016421856358647346, + 0.004777822643518448, + -0.009229653514921665, + -0.007796646095812321, + -0.03322403505444527, + 0.03023577481508255, + 0.013345304876565933, + 0.028252655640244484, + -0.045204248279333115, + 0.012000586837530136, + 0.06889301538467407, + -0.013094019144773483, + 0.032273225486278534, + 0.014248575083911419, + -0.0020866894628852606, + 0.0017284377245232463, + 0.04903465509414673, + -0.009100615046918392, + 0.016897261142730713, + -0.021855058148503304, + -0.002769235521554947, + 0.002156302332878113, + 0.044117607176303864, + -0.02449016273021698, + -0.035234320908784866, + 0.015253717079758644, + 0.009317942894995213, + -0.028850307688117027, + 0.006723588798195124, + -0.07579318434000015, + -0.030779095366597176, + -0.053598545491695404, + -0.004733677953481674, + -0.052185915410518646, + -0.01407199539244175, + 0.04343845695257187, + 0.009229653514921665, + -0.05196858569979668, + -0.028632979840040207, + 0.004261668771505356, + 0.0291491337120533, + 0.0020866894628852606, + -0.007626858539879322, + 0.027233930304646492, + 0.057917945086956024, + 0.03871157020330429, + -0.0028592231683433056, + 0.015674790367484093, + -0.019858356565237045, + -0.031920067965984344, + -0.0007716846303083003, + -0.0032259642612189054, + -0.02053750678896904, + -0.04281364008784294, + -0.025807714089751244, + 0.030561767518520355, + 0.00023642921587452292, + -0.02893180586397648, + 0.020157182589173317, + 0.02435433305799961, + 0.007239743135869503, + 0.06862135231494904, + -0.013644130900502205, + 0.007368781603872776, + 0.018119731917977333, + 0.02068692073225975, + 0.0007534324540756643, + 0.016340358182787895, + -0.009759390726685524, + -0.028415651991963387, + 0.015158636495471, + 0.031702738255262375, + 0.016286026686429977, + -0.02548172138631344, + 0.05802660807967186, + 0.014397988095879555, + -0.0723702609539032, + 0.003200496081262827, + -0.008394298143684864, + -0.025305142626166344, + 0.03708161041140556, + 0.010058216750621796, + -0.003380470909178257, + 0.023240525275468826, + 0.00624818354845047, + 0.04034153372049332, + 0.004720095079392195, + 0.11529256403446198, + 0.013114393688738346, + -0.05384304001927376, + -0.018649470061063766, + -0.02038809470832348, + 0.00041237162076868117, + -0.03287087753415108, + -0.041319508105516434, + 0.03238188847899437, + 0.0038168251048773527, + -0.006017272360622883, + 0.007952851243317127, + 0.024965567514300346, + 0.02923063188791275, + -0.01615019515156746, + -9.773398051038384e-05, + -0.007477445527911186, + 0.02117590792477131, + 0.00782381184399128, + 0.0032123811542987823, + -0.012801984325051308, + 0.05237607657909393, + -0.02068692073225975, + -0.046997204422950745, + 0.06552442908287048, + 0.030561767518520355, + -0.013053270056843758, + -0.013121184892952442, + -0.04612789303064346, + -0.013121184892952442, + 0.02004851959645748, + -0.011864757165312767, + -0.026975853368639946, + 0.03297954052686691, + -0.006231204606592655, + 0.020741252228617668, + -0.037380434572696686, + -0.034229177981615067, + 0.0067439633421599865, + -0.014248575083911419, + -0.009813723154366016, + 0.019776858389377594, + 0.055473003536462784, + 0.008176970295608044, + 0.01063549518585205, + -0.04762202501296997, + 0.011586305685341358, + 0.012224706821143627, + -0.010560788214206696, + 0.004492579493671656, + 0.025943543761968613, + -0.03757059946656227, + 0.01623169332742691, + 0.04400894418358803, + 0.05579899623990059, + -0.05134376883506775, + -0.00944019015878439, + -0.026907937601208687, + -0.035859137773513794, + 0.032436221837997437, + -0.010750950314104557, + 0.03129524737596512, + 0.02944795973598957, + -0.0020153787918388844, + 0.000795879343058914, + -0.0341748483479023, + 0.03425634652376175, + -0.0313224159181118, + 0.0006001991569064558, + 0.06737171858549118, + -0.06394879519939423, + 0.0008578518172726035, + 0.011953046545386314, + 0.01902979426085949, + 0.044986922293901443, + -0.08611626923084259, + 0.008149804547429085, + -0.03504415974020958, + 0.01923353783786297, + -0.0161637794226408, + -0.015280883759260178, + -0.0788901075720787, + 0.03556031361222267, + -0.028415651991963387, + 0.0029339296743273735, + -0.03776076063513756, + 0.04023286700248718, + -0.017902404069900513, + -0.03488116338849068, + 0.026052208617329597, + -0.016353940591216087, + -0.03911906108260155, + -0.0283069871366024, + -0.030290106311440468, + -0.019858356565237045, + -0.009874846786260605, + -0.01693801023066044, + -0.00310711283236742, + -0.008224510587751865, + -0.034582335501909256, + 0.04289513826370239, + 0.007389156147837639, + -0.05550016835331917, + -0.002670758869498968, + 0.027030184864997864, + -0.007817020639777184, + -0.012686529196798801, + 0.016842929646372795, + 0.02311827801167965, + 0.025087814778089523, + -0.011307853274047375, + 0.004088485147804022, + 0.015498211607336998, + 0.05867859348654747, + 0.03640246018767357, + -0.013277390040457249, + -0.009311151690781116, + -0.02557680383324623, + -0.003020521253347397, + -0.003928884863853455, + -0.04775785282254219, + 0.00944019015878439, + 0.021922973915934563, + -0.025250811129808426, + 0.01752207987010479, + 0.019980603829026222, + -0.03588630631566048, + -0.003647037548944354, + 0.007952851243317127, + 0.0525934062898159, + -0.019831189885735512, + -0.0060580214485526085, + 0.03360436111688614, + 0.00804793182760477, + -0.002565490547567606, + 0.04332979395985603, + 0.004862716421484947, + -0.025033483281731606, + 0.003431407269090414, + 0.017345501109957695, + -0.022357629612088203, + -0.00821771938353777, + -0.03892889991402626, + 0.04509558528661728, + -0.015430296771228313, + 0.020877081900835037, + 0.004353353753685951, + -0.01127389632165432, + -0.025549637153744698, + 0.025807714089751244, + 0.04544874280691147, + 0.050528787076473236, + 0.03322403505444527, + -0.05797227472066879, + -0.03604930266737938, + 0.05104494094848633, + 0.04134667292237282, + 0.019831189885735512, + 0.0024279626086354256, + -0.03058893233537674, + -0.01145726628601551, + -0.05824393406510353, + -0.02792666293680668, + 0.014316489920020103, + -0.01623169332742691, + -0.017929568886756897, + -0.03197439759969711, + -0.02980111911892891, + 0.05006696656346321, + -0.007891727611422539, + -0.0433841273188591, + 0.008482588455080986, + 0.03746193274855614, + -0.004159796051681042, + -0.0291491337120533, + 0.010295920073986053, + -0.033006709069013596, + 0.030643263831734657, + -0.030561767518520355, + 0.03933639079332352, + -0.014982056804001331, + -0.053326886147260666, + -0.058787256479263306, + -0.02534589171409607, + 0.025237226858735085, + 0.04778502136468887, + -0.014221408404409885, + -0.003108810866251588, + -0.03729894012212753, + -0.04259631037712097, + -0.09768898785114288, + 0.03569614514708519, + -0.015484628267586231, + -0.0525934062898159, + 0.0564509779214859, + 0.004088485147804022, + -0.02556321956217289, + -0.00501212989911437, + -0.002672456670552492, + 0.008129430003464222, + -0.026446115225553513, + 0.02779083326458931, + 0.02457166090607643, + 0.015688372775912285, + -0.015783455222845078, + -0.03944505378603935, + 0.004723490681499243, + 0.022968865931034088, + -0.03697294741868973, + -0.022058803588151932, + -0.00031686609145253897, + -0.018948296085000038, + -0.026731358841061592, + 0.02284661866724491, + 0.01213641744107008, + -0.014289324171841145, + -0.009976718574762344, + 0.009847680106759071, + -0.0061361235566437244, + -0.04066752269864082, + 0.0003612230939324945, + 0.03352286294102669, + -0.022276131436228752, + 0.022928116843104362, + 0.033278368413448334, + 0.04373728483915329, + -0.0311594195663929, + 0.05313672497868538, + 0.04946931451559067, + 0.05737462267279625, + -0.025468138977885246, + -0.012285830453038216, + -0.008489379659295082, + 0.006479094736278057, + 0.05998256057500839, + 0.022588541731238365, + 0.00611914461478591, + -0.014099162071943283, + -0.018703801557421684, + 0.015960033982992172, + 0.019573112949728966, + 0.011735718697309494, + -0.01593286730349064, + 0.018866797909140587, + 0.03871157020330429, + 0.002382119884714484, + -0.07209860533475876, + -0.01446590293198824, + -0.0009592999122105539, + 0.024734657257795334, + 0.03308820724487305, + -0.04544874280691147, + -0.02398759126663208, + 0.007626858539879322, + 0.0050664618611335754, + -0.03879306837916374, + -0.0075114029459655285, + -0.011674595065414906, + -0.05550016835331917, + 0.01954594813287258, + -0.02478898875415325, + 0.00034042412880808115, + 0.014099162071943283, + 0.02743767574429512, + -0.01037741731852293, + 0.02334919013082981, + -0.028035327792167664, + -0.008536919951438904, + 0.0017233440885320306, + -0.021800726652145386, + 0.014275740832090378, + -0.011335019953548908, + -0.022588541731238365, + 0.005338122136890888, + -0.054196201264858246, + 0.014859810471534729, + -0.0005021467804908752, + -0.01681576296687126, + 0.007063163910061121, + 0.015212967991828918, + -0.005147960036993027, + 0.040830519050359726, + 0.007531777489930391, + 0.0035859139170497656, + 0.02579413168132305, + -0.02758708782494068, + 0.027301844209432602, + -0.04653538390994072, + 0.00944019015878439, + 0.0584612637758255, + 0.04553024098277092, + -0.01446590293198824, + -0.008564086630940437, + -0.023743096739053726, + -0.019478032365441322, + 0.023797428235411644, + 0.013053270056843758, + -0.015212967991828918, + -0.014751145616173744, + 0.01396333146840334, + 0.00664548622444272, + 0.0028677124064415693, + -0.01708742417395115, + -0.02053750678896904, + 0.002494179643690586, + 0.02196372300386429, + -0.02398759126663208, + 0.014479486271739006, + -0.027166014537215233, + -0.003200496081262827, + -0.008244885131716728, + -0.0291491337120533, + 0.00624818354845047, + 0.01360338181257248, + 0.0044348519295454025, + -0.018500056117773056, + -0.0014397987397387624, + -0.0252100620418787, + 0.04580190032720566, + 0.0007148057920858264, + -0.012190748937427998, + 0.029773952439427376, + 0.027464840561151505, + 0.007097121328115463, + 0.013141559436917305, + -0.010370626114308834, + 0.013311346992850304, + 0.02182789333164692, + -0.051751259714365005, + -0.022955281659960747, + 0.0003085889620706439, + 0.017128173261880875, + -0.03477250039577484, + -0.0291491337120533, + -0.0036572248209267855, + 0.017114588990807533, + 0.004271856043487787, + 0.005844088736921549, + 0.027899498119950294, + -0.015321631915867329, + -0.016123030334711075, + -0.03746193274855614, + 0.054196201264858246, + -0.020279429852962494, + -0.006163289770483971, + -0.0034976243041455746, + 0.006305911112576723, + 0.0075114029459655285, + 0.00448578828945756, + 0.02284661866724491, + -0.02190939150750637, + 0.02893180586397648, + -0.007008831948041916, + 0.013426803052425385, + 0.005949357058852911, + 0.000777202716562897, + -0.0008052176563069224, + -0.017046675086021423, + -0.0020866894628852606, + -0.02341710403561592, + 0.002565490547567606, + -0.03175707161426544, + -0.021298155188560486, + 0.010397791862487793, + -0.018649470061063766, + 0.03001844696700573, + 0.02276512049138546, + 0.04596489667892456, + 0.0007610729080624878, + 0.010533622466027737, + -0.0023906093556433916, + 0.022493461146950722, + 0.026826439425349236, + 0.049306318163871765, + 0.013698463328182697, + -0.02334919013082981, + 0.015851369127631187, + 0.0027182993944734335, + 0.030697597190737724, + -0.0004626711888704449, + 0.009277193807065487, + -0.01973610930144787, + 0.0110565684735775, + 0.015443879179656506, + -0.032653551548719406, + 0.013630547560751438, + 0.024585243314504623, + -0.039254892617464066, + -0.007395947352051735, + 0.008380715735256672, + -0.004139421507716179, + -0.03914622589945793, + 0.03330553323030472, + 0.0062651620246469975, + -0.0331697054207325, + -0.016612017527222633, + -0.00148479244671762, + 0.019763275980949402, + -0.02412342093884945, + -0.02233046479523182, + -0.022805869579315186, + -0.05617931857705116, + 0.027233930304646492, + -0.012034544721245766, + 0.03814108297228813, + -0.02743767574429512, + -0.0011503109708428383, + -0.013114393688738346, + -0.022656455636024475, + 0.019491614773869514, + -0.017359083518385887, + 0.04246048256754875, + 0.0544406920671463, + 0.03230039030313492, + -0.013005729764699936, + 0.003392356215044856, + -0.00796643365174532, + -0.001701271627098322, + -0.03474533185362816, + 0.0011503109708428383, + 0.009745807386934757, + -0.00855050329118967, + -0.01213641744107008, + 0.027532756328582764, + -0.0034076368901878595, + 0.006611528806388378, + -0.012523532845079899, + 0.002151208696886897, + -0.0020034934859722853, + 0.016136612743139267, + 0.012944606132805347, + 0.013189099729061127, + 0.03355002775788307, + -0.014289324171841145, + 0.0019746297039091587, + -0.00023982497805263847, + -0.01688367873430252, + 0.028605813160538673, + 0.0033295347820967436, + 0.027845164760947227, + -0.02663627825677395, + -0.006003689486533403, + 0.007980016991496086, + 0.0683496966958046, + -0.0037251398898661137, + -0.003776076016947627, + -0.002298923907801509, + -0.003360096365213394, + -0.01443873718380928, + -0.0010798490839079022, + -0.002616426907479763, + 0.014262157492339611, + 0.014628899283707142, + 0.013420010916888714, + -0.002888086950406432, + -0.0064383456483483315, + -0.044552262872457504, + 0.020646171644330025, + -0.01623169332742691, + -0.027980994433164597, + -0.02685360610485077, + 0.004326188005506992, + 0.04588339850306511, + 0.011042985133826733, + 0.015769870951771736, + 0.0035519564989954233, + 0.001264068647287786, + -0.033061038702726364, + 0.005599594675004482, + -0.031213751062750816, + 0.0505831204354763, + -0.0026435928884893656, + -0.004923840053379536, + 0.0025400223676115274, + -0.012897065840661526, + 0.012414868921041489, + -0.009643935598433018, + 0.019016209989786148, + -0.021488318219780922, + 0.05954790487885475, + 0.027166014537215233, + -0.006638695020228624, + -0.00723295146599412, + 0.018567971885204315, + -0.03246338665485382, + 0.02189580723643303, + -0.017033090814948082, + -0.005358496215194464, + -0.018866797909140587, + 0.016503354534506798, + 0.010839239694178104, + 0.03857574239373207, + -0.012557490728795528, + -0.03748910129070282, + -0.015824204310774803, + -0.030290106311440468, + -0.004105464089661837, + 0.0038202209398150444, + -0.012815567664802074, + 0.019002627581357956, + -0.04433493688702583, + 0.00797322578728199, + -0.02398759126663208, + -0.007497820071876049, + 0.014031246304512024, + -0.006197247188538313, + -0.031186584383249283, + -0.009868054650723934, + 0.006954499986022711, + 0.02664986066520214, + -0.00339405401609838, + -0.003864365629851818, + 0.008102264255285263, + -0.010927529074251652, + 0.02569904923439026, + -0.0012674643658101559, + -0.025087814778089523, + -0.05395170673727989, + -0.044552262872457504, + 0.011593096889555454, + 0.022113136947155, + 0.00023133559443522245, + 0.013528675772249699, + 0.012082085013389587, + -0.04012420400977135, + -0.041754163801670074, + 0.014601732604205608, + 0.0008701613987796009, + 0.05137093365192413, + 0.006030855234712362, + 0.024748239666223526, + -0.062373168766498566, + 0.0025790734216570854, + 0.02318619377911091, + 0.04006987065076828, + -0.0021987492218613625, + 0.0267177764326334, + 0.04379161447286606, + 0.009935969486832619, + -0.02405550703406334, + 0.022031638771295547, + 0.029393628239631653, + -0.022574957460165024, + 0.024829737842082977, + 0.04107501357793808, + -0.0012199238408356905, + 0.0029033678583800793, + -0.0006405236781574786, + 0.0016112842131406069, + -0.03857574239373207, + 0.023539351299405098, + -0.01730475202202797, + 0.0040511321276426315, + 0.03977104648947716, + 0.033278368413448334, + -0.004251481499522924, + -0.00019748418708331883, + -0.017780156806111336, + 0.008163387887179852, + 0.004923840053379536, + 0.007165036629885435, + -0.022778702899813652, + -0.0343378409743309, + 0.001136727980338037, + -0.0028269633185118437, + 0.011267104186117649, + -0.03412051498889923, + -0.0007385760545730591, + -0.009073449298739433, + 0.030860593542456627, + 0.04797518253326416, + 0.014357239007949829, + -0.05169692635536194, + -0.00721936859190464, + 0.05884158983826637, + 0.036728452891111374, + 0.016027947887778282, + -0.005127585493028164, + -0.010289127938449383, + 0.03211022913455963, + 0.0026249161455780268, + -0.015756288543343544, + 0.02083633281290531, + 0.018146898597478867, + 0.05270206928253174, + 0.019342202693223953, + 0.01310081034898758, + -0.04251481220126152, + -0.0564509779214859, + 0.02463957481086254, + 0.006995248608291149, + -0.01507713831961155, + 0.024014757946133614, + -0.002930533839389682, + 0.03947221860289574, + -0.0018303102115169168, + 0.009379066526889801, + -0.003193704644218087, + 0.011953046545386314, + -4.650588380172849e-05, + -0.034799665212631226, + -0.005304164253175259, + -0.041618335992097855, + 0.053462717682123184, + -0.021814309060573578, + 0.02018434926867485, + -0.0030833426862955093, + -0.008353549987077713, + 0.005229457747191191, + 0.00671679712831974, + -0.018038233742117882, + 0.03346852958202362, + -0.038602907210588455, + 0.0018303102115169168, + -0.020143600180745125, + -0.005643739365041256, + -0.016421856358647346, + -0.03431067615747452, + 0.011987004429101944, + -0.025373058393597603, + -0.020496757701039314, + -0.005487535148859024, + 0.03811391815543175, + -0.010248378850519657, + -0.0052430410869419575, + -0.010234796442091465, + 0.04661688208580017, + 0.0033176494762301445, + -0.018554387614130974, + 0.020360928028821945, + 0.03455517068505287, + 0.0015781756956130266, + 0.036239463835954666, + -0.007185410708189011, + 0.010105757042765617, + -0.0036809949669986963, + 0.02018434926867485, + 0.012761235237121582, + 0.040613193064928055, + -0.014452319592237473, + -0.04960514232516289, + 0.01346076000481844, + -0.0004715850518550724, + 0.01019404735416174, + 0.026826439425349236, + -0.019410118460655212, + -0.030480269342660904, + -0.018649470061063766, + 0.02584846317768097, + -0.0028286613523960114, + 0.022737953811883926, + 0.021433984860777855, + -0.013134768232703209, + 0.008122638799250126, + 0.02485690265893936, + -0.03743476793169975, + -0.008598043583333492, + -0.06590475142002106, + -0.014778312295675278, + -0.05063745006918907, + 0.023376354947686195, + -0.022968865931034088, + 0.04892599210143089, + -0.03640246018767357, + 0.020632587373256683, + 0.03295237571001053, + -0.034500837326049805, + -0.01738625019788742, + -0.0030544789042323828, + -0.005144563969224691, + 0.00476084416732192, + 0.015321631915867329, + 0.0056335520930588245, + 0.02844281680881977, + -0.011796842329204082, + -0.01923353783786297, + -0.023648016154766083, + 0.011824008077383041, + -0.026242369785904884, + -0.025468138977885246, + -0.01701950840651989, + 0.0007131078746169806, + 0.022737953811883926, + 0.045068416744470596, + -0.018364226445555687, + -0.010187255218625069, + -0.011586305685341358, + 0.015226551331579685, + -6.727833533659577e-05, + -0.012401285581290722, + -0.05737462267279625, + -0.007212576922029257, + -0.016041532158851624, + 0.008210928179323673, + 0.0007143812836147845, + -0.0028082868084311485, + 0.024177752435207367, + 0.018690217286348343, + -0.0010017467429861426, + 0.02598429284989834, + -0.03914622589945793, + 0.01752207987010479, + 0.00916173867881298, + 0.0033465134911239147, + -0.020279429852962494, + -0.02492481842637062, + -0.001428762567229569, + 0.03172990679740906, + -0.04126517474651337, + -0.019654611125588417, + -0.01152518205344677, + -0.002694529015570879, + -0.027315428480505943, + 0.0056301564909517765, + 0.015987198799848557, + 0.007491028402000666, + -0.03843991085886955, + -0.02988261543214321, + 0.010309502482414246, + 0.021922973915934563, + 0.01810614950954914, + 0.003928884863853455, + -0.015362381003797054, + 0.008380715735256672, + -0.004886487033218145, + 0.05998256057500839, + 0.04895315691828728, + 0.008210928179323673, + -0.018554387614130974, + 0.037516266107559204, + -0.013637339696288109, + 0.004010383039712906, + 0.03865724056959152, + -0.022996030747890472, + -0.03721744194626808, + -0.025033483281731606, + -0.03053460083901882, + 0.024150587618350983, + -0.010289127938449383, + -0.011844382621347904, + -0.0034415945410728455, + -0.01968177780508995, + 0.015688372775912285, + 0.01310081034898758, + -0.04770352318882942, + 0.009358691982924938, + 0.014425153844058514, + -0.007572526577860117, + 0.042052991688251495, + -0.012061710469424725, + -0.005606386344879866, + 0.016408272087574005, + -0.024530911818146706, + 0.012020961381494999, + 0.04186283051967621, + 0.011749301105737686, + -0.001011934014968574, + -0.010730575770139694, + -0.004190357867628336, + 0.01738625019788742, + 0.01257107313722372, + 0.008699916303157806, + 0.007613275665789843, + 0.0029424189124256372, + 0.005175125785171986, + 0.027125265449285507, + -0.0025773756206035614, + -0.022724371403455734, + 0.00897157657891512, + 0.03409335017204285, + 0.017331916838884354, + 0.009725432842969894, + -0.02822548896074295, + -0.019858356565237045, + 0.016421856358647346, + 0.015634041279554367, + -0.011267104186117649, + 0.022248966619372368, + 0.010730575770139694, + -0.014914141967892647, + 0.0010509851854294538, + -0.02261570654809475, + -0.0028456400614231825, + 0.004203940741717815, + 0.042052991688251495, + -0.0014423455577343702, + 0.03140391409397125, + -0.015837786719202995, + 0.044063277542591095, + 0.0024075880646705627, + 0.02591637894511223, + -0.019070541486144066, + 0.024082671850919724, + -0.005090232007205486, + -0.012706903740763664, + 0.03797809034585953, + 0.037516266107559204, + 0.03814108297228813, + -0.022303298115730286, + -0.027383342385292053, + -0.0038202209398150444, + -0.007334824185818434, + -0.02993694879114628, + -0.027451258152723312, + 0.01159988809376955, + -0.0012199238408356905, + 0.022574957460165024, + -0.0027896100655198097, + -0.003647037548944354, + 0.023933259770274162, + 0.004709907807409763, + -0.015769870951771736, + 0.0005136074614711106, + 0.011783258989453316, + -0.04251481220126152, + 0.0393635556101799, + -0.03151257708668709, + 0.01782090589404106, + -0.00014431944873649627, + -0.030072778463363647, + -0.0281439907848835, + 0.009786556474864483, + -0.021420402452349663, + 0.016353940591216087, + 0.015742706134915352, + -0.007538569159805775, + -0.036375295370817184, + -0.021719228476285934, + 0.001552707515656948, + 0.02262929081916809, + 0.04110218212008476, + 0.004244689829647541, + -0.0007657420355826616, + 0.014493068680167198, + -0.00502571277320385, + 0.019423700869083405, + -0.0018914337269961834, + -0.02333560585975647, + -0.00448578828945756, + 0.0025162522215396166, + -0.008509754203259945, + -0.016068696975708008, + -0.05438636243343353, + 0.00897157657891512, + 0.00628553656861186, + -0.006784712430089712, + -0.03531581908464432, + 0.0054501816630363464, + -0.011987004429101944, + 0.010255170986056328, + -0.02038809470832348, + 0.0323275588452816, + 0.0008353549637831748, + 0.01665276661515236, + 0.020374510437250137, + 0.022099552676081657, + 0.020795583724975586, + -0.014031246304512024, + -0.009480939246714115, + -0.014139911159873009, + -0.024245668202638626, + -0.005949357058852911, + 0.00018305225239600986, + -0.030344437807798386, + 0.010166880674660206, + -0.000542471359949559, + -0.02190939150750637, + 0.051751259714365005, + -0.01504997257143259, + -0.017141755670309067, + -0.016476187855005264, + 0.022574957460165024, + 0.03303387388586998, + 0.0064417412504553795, + 0.0020866894628852606, + -0.006013876758515835, + 0.025970710441470146, + -0.010547204874455929, + 0.02866014651954174, + 0.02089066617190838, + 0.0066930269822478294, + -0.0019933064468204975, + 0.00037926304503344, + -0.032653551548719406, + 0.026622693985700607, + 0.007708356715738773, + -0.025318725034594536, + -0.007783063221722841, + -0.009895221330225468, + 0.02298244833946228, + -0.04126517474651337, + -0.0003056176647078246, + -0.02936646156013012, + 0.005535075441002846, + -0.028741642832756042, + -0.06579608470201492, + -0.04574757069349289, + -0.006513052154332399, + 0.0053788707591593266, + -0.037597764283418655, + 0.02291453257203102, + 0.004696324933320284, + -0.022113136947155, + -0.007239743135869503, + 0.00010309290519217029, + -0.04224315285682678, + 0.03713594377040863, + 0.012109250761568546, + 0.04178133234381676, + 0.0021274385508149862, + -0.013807127252221107, + -0.003198798280209303, + -0.002981470199301839, + 0.009861263446509838, + 0.010547204874455929, + -0.01242845132946968, + 0.018146898597478867, + 0.022656455636024475, + -0.00843504723161459, + -0.026174455881118774, + 0.006390804890543222, + 0.005351705010980368, + 0.00014325827942229807, + 0.04093918576836586, + 0.031186584383249283, + -0.013583007268607616, + -0.0037353269290179014, + 0.0031139045022428036, + -0.0010441937483847141, + -0.008346757851541042, + -0.022072387859225273, + 0.006703214254230261, + -0.02879597619175911, + 0.0018642677459865808, + 0.0011537066893652081, + -0.028958972543478012, + -0.043411292135715485, + 0.002764142118394375, + -0.028823141008615494, + -0.03963521495461464, + -0.027383342385292053, + 0.01738625019788742, + -0.016218110918998718, + -0.01731833443045616, + -0.014710397459566593, + -0.056559644639492035, + 0.00027017449610866606, + 1.4604385796701536e-05, + 0.036945778876543045, + -0.03221889212727547, + 0.037869423627853394, + -0.023077528923749924, + -0.043139632791280746, + 0.021556232124567032, + 0.010852823033928871, + -0.03509848937392235, + -0.025019899010658264, + 0.02291453257203102, + -0.002220821799710393, + -0.02196372300386429, + -0.006574175786226988, + 0.019858356565237045, + -0.009195695631206036, + -0.006906959228217602, + -0.005810131318867207, + -0.014941307716071606, + 0.004136025905609131, + 0.007029206492006779, + -0.018513638526201248, + -0.0030833426862955093, + -0.005878046620637178, + 0.007681190501898527, + -0.011314645409584045, + 0.003864365629851818, + 0.00422091968357563, + -0.021012911573052406, + -0.022710788995027542, + -0.0031139045022428036, + -0.0333327017724514, + -0.019708944484591484, + 0.009895221330225468, + 0.009779765270650387, + 0.03944505378603935, + -0.016408272087574005, + -0.017861654981970787, + 0.011464058421552181, + 0.011531973257660866, + 0.00029394475859589875, + 0.03425634652376175, + -0.040966350585222244, + -0.009650726802647114, + 0.04156400263309479, + 0.04710587114095688, + 0.010241587646305561, + -0.01030271127820015, + 0.003918697591871023, + -0.008747456595301628, + -0.018500056117773056, + -0.006930729374289513, + -0.02923063188791275, + 0.010499664582312107, + -0.007294075097888708, + 0.012652571313083172, + -0.016408272087574005, + 0.002760746283456683, + -0.03289804235100746, + -0.00423450255766511, + -0.005412828642874956, + 0.020714085549116135, + -0.004923840053379536, + 0.005341517738997936, + -0.00012330824392847717, + -0.024897651746869087, + 0.0100514255464077, + 0.007314449641853571, + 0.008672750554978848, + 0.002166489604860544, + -0.019124874845147133, + -0.019994186237454414, + 0.026826439425349236, + 0.03330553323030472, + -0.027899498119950294, + -0.0006719343946315348, + 0.011857965029776096, + -0.028768809512257576, + 0.0033906581811606884, + 0.009372275322675705, + 0.019708944484591484, + 0.030317272990942, + 0.015090721659362316, + 0.001390560413710773, + 0.011464058421552181, + -0.01644902117550373, + -0.002601145999506116, + -0.00915494654327631, + -0.02857864834368229, + 0.02549530565738678, + -0.02226254902780056, + 0.026989435777068138, + -0.00013487502292264253, + -0.00422091968357563, + -0.007572526577860117, + 0.00879499688744545, + 0.015756288543343544, + -0.020360928028821945, + 0.02313186228275299, + -0.04273214191198349, + -0.014927725307643414, + -0.025196479633450508, + -0.018269145861268044, + 0.009555645287036896, + -0.03849424421787262, + -0.03276221454143524, + 0.006020667962729931, + 0.012183957733213902, + -0.010506455786526203, + 0.01629960909485817, + -0.014194242656230927, + -0.011864757165312767, + 0.00169702700804919, + 1.554617665533442e-05, + -0.0018557783914729953, + 0.024870486930012703, + 0.00538566242903471, + -0.0293121300637722, + 0.0033550027292221785, + -0.03490832820534706, + 0.030860593542456627, + -0.007063163910061121, + -0.005253227893263102, + 0.006811878178268671, + 0.008890078403055668, + -0.02988261543214321, + 0.016992341727018356, + 0.04911615327000618, + 0.013223057612776756, + 0.022289715707302094, + -0.013847876340150833, + 0.009324735030531883, + 0.01044533308595419, + -0.050012633204460144, + -0.013610173016786575, + -0.013243432156741619, + 0.019084125757217407, + -0.007959642447531223, + -0.012815567664802074, + 0.013053270056843758, + 0.009392649866640568, + -0.003776076016947627, + 0.016530519351363182, + -0.014696814119815826, + -0.03841274604201317, + 0.030860593542456627, + 0.005779569502919912, + 0.0015977012226358056, + -0.009311151690781116, + -0.026038624346256256, + -0.005368683487176895, + 0.005643739365041256, + -0.03705444559454918, + 0.0025705841835588217, + -0.01242845132946968, + -0.005575824528932571, + -0.026120122522115707, + -0.012706903740763664, + -0.018771715462207794, + 0.009847680106759071, + -0.03667411953210831, + -0.0034398967400193214, + -0.0011469151359051466, + 0.04879016429185867, + 0.009847680106759071, + 0.00012171648268122226, + -0.006156498100608587, + -0.008054723031818867, + -0.040178537368774414, + 0.0023549539037048817, + -0.012346954084932804, + 0.003704765345901251, + -0.01780732348561287, + 0.005429807119071484, + -0.0059357741847634315, + -0.006244787480682135, + -0.03642962500452995, + 0.01788882166147232, + -0.005236249417066574, + 0.015919284895062447, + 0.04881732910871506, + 0.012550698593258858, + -0.044416435062885284, + 0.00075852609006688, + -0.01730475202202797, + 0.01195983774960041, + 0.003701369510963559, + 0.0036028926260769367, + 0.009868054650723934, + -0.049523644149303436, + 0.07171827554702759, + 0.03186573460698128, + 0.023077528923749924, + -0.0007296621915884316, + -0.013379261828958988, + -0.004804988857358694, + 0.012577865272760391, + 0.0206054225564003, + 0.04308529943227768, + 0.0010739065473899245, + -0.05900458246469498, + 0.0005390755832195282, + 0.009277193807065487, + 0.011925880797207355, + 0.015837786719202995, + 0.017780156806111336, + 0.008835745975375175, + -0.06688272953033447, + 0.003596101189032197, + -0.0075793182477355, + -0.010764533653855324, + 0.008557294495403767, + -0.022670039907097816, + 0.007280491758137941, + -0.0033821689430624247, + 0.026772107928991318, + -0.000561572436708957, + 0.041401006281375885, + 0.03784225881099701, + 0.00865916721522808, + 0.00698166573420167, + -0.006166685372591019, + -0.02578054741024971, + 0.004618222359567881, + 0.0231997761875391, + -0.033006709069013596, + 0.0005743065266869962, + -0.009134572930634022, + 0.0022632686886936426, + 0.0002784516545943916, + 0.01213641744107008, + 0.010886779986321926, + 0.0180925652384758, + 0.011932672001421452, + 0.022276131436228752, + -0.024150587618350983, + 0.05463085696101189, + -0.040966350585222244, + 0.00734161539003253, + 0.017576411366462708, + -0.03197439759969711, + -0.013311346992850304, + -0.03268071636557579, + -0.012903857044875622, + 0.017399832606315613, + -0.008306008763611317, + -0.02857864834368229, + -0.01586495339870453, + -0.028469983488321304, + 0.018500056117773056, + -0.017494913190603256, + 0.006835648324340582, + 0.030616099014878273, + -0.02713884972035885, + -0.012951397337019444, + 0.027980994433164597, + -0.008523337543010712, + -0.01149122416973114, + -0.011015819385647774, + -0.0027862144634127617, + 0.008890078403055668, + 0.0072533260099589825, + -0.005188708659261465, + -0.023933259770274162, + 0.015919284895062447, + 0.006115749012678862, + -0.01518580224364996, + -0.005657322704792023, + -0.03023577481508255, + 0.02262929081916809, + 0.016978759318590164, + -0.0016426949296146631, + -0.00013338937424123287, + -0.02118949219584465, + -0.002723393030464649, + 0.00606820872053504, + 0.007884935475885868, + -0.03566897660493851, + -0.028334153816103935, + 0.002641894854605198, + 0.008815371431410313, + -0.0013837688602507114, + 0.006580966990441084, + -0.017562828958034515, + 0.026812857016921043, + -0.008516545407474041, + -0.0028965764213353395, + 0.002081595826894045, + 0.00891045294702053, + -0.025957128033041954, + -0.0226972047239542, + 0.01837780885398388, + 0.034066181629896164, + 0.010968278162181377, + 0.028171157464385033, + -0.0005068159662187099, + 0.023783845826983452, + 0.0011579514248296618, + 0.00709032965824008, + -0.014411570504307747, + 0.0030629681423306465, + -0.05406036972999573, + 0.0013752795057371259, + 0.009827305562794209, + 0.03892889991402626, + 0.01923353783786297, + -0.00785776972770691, + ], + "index": 95, + }, + { + "title": "Clint Stennett", + "text": 'W. Clinton "Clint" Stennett (October 1, 1956 \u2013 October 14, 2010) was a Democratic politician and a minority leader of the Idaho Senate. Stennett represented District 25, which includes Blaine, Gooding, Camas and Lincoln Counties. Stennett served in the Idaho Senate from 1994 to 2010, but was unable to fulfill his duties after the 2008 session due to poor health. He served as the minority leader from 1999 to 2009.', + "vector": [ + 0.035401877015829086, + -0.027498804032802582, + -0.021522914990782738, + -0.010113664902746677, + 0.02487524226307869, + -0.007089282386004925, + 0.02983085811138153, + 1.987977339013014e-05, + -0.019320419058203697, + 0.049135081470012665, + -0.007915218360722065, + 0.04550744220614433, + -0.019530951976776123, + 0.007712782826274633, + -0.01033229473978281, + 0.022008759900927544, + -0.02928023412823677, + 0.03093210607767105, + 0.021296188235282898, + -0.02740163542330265, + 0.04145873710513115, + -0.04026032239198685, + -0.041167233139276505, + 0.002064839471131563, + 0.06464972347021103, + 0.027061544358730316, + 0.009959814138710499, + -0.006052813958376646, + -0.029118286445736885, + -0.031547509133815765, + -0.011376860551536083, + 0.007340302225202322, + 0.04181502386927605, + 0.03909429535269737, + 0.024859048426151276, + 0.02532869763672352, + 0.004963712301105261, + -0.002483880380168557, + -0.012518595904111862, + 0.042495205998420715, + -0.019644316285848618, + -0.023935943841934204, + -0.019530951976776123, + -0.01319068018347025, + 0.013287849724292755, + -0.000880087201949209, + -0.010696678422391415, + -0.006931382697075605, + 0.012154212221503258, + 0.01590331271290779, + -0.026689061895012856, + -0.03381478413939476, + -0.024891437962651253, + -0.0033280353527516127, + 0.05208253860473633, + 0.0272234920412302, + 0.000954482180532068, + 0.0782533660531044, + -0.05094890296459198, + -0.030219532549381256, + -0.031094053760170937, + 0.0064576840959489346, + -0.04638196527957916, + 0.02226787619292736, + 0.01695597544312477, + 0.022332657128572464, + 0.030349092558026314, + 0.001865440746769309, + -0.04009837284684181, + -0.011028672568500042, + 0.028988726437091827, + -0.0360172800719738, + 0.03844650089740753, + 0.03770153969526291, + 0.03494841977953911, + 0.0018522824393585324, + -0.016891196370124817, + -0.03776631876826286, + -0.03588772192597389, + 0.008672325871884823, + -0.0034515210427343845, + -0.03426823765039444, + 0.005129708908498287, + 0.006077106110751629, + -0.0052187805995345116, + -0.02612224407494068, + 0.03193618357181549, + -0.05732966214418411, + 0.013846570625901222, + 0.023482488468289375, + 0.05072217434644699, + 0.005639845971018076, + 0.004380698781460524, + -0.01805722340941429, + -0.008137896656990051, + -0.024664711207151413, + 0.04667346924543381, + -0.01695597544312477, + -0.007073087617754936, + -0.05072217434644699, + 0.0059192064218223095, + 0.03702135756611824, + 0.03423584997653961, + 0.0598236620426178, + 0.05347529426217079, + 0.033879563212394714, + -0.02890775352716446, + -0.024583736434578896, + 0.013563161715865135, + 0.07954895496368408, + 0.006004229187965393, + -0.017652353271842003, + -0.02670525759458542, + -0.0062309568747878075, + 0.026915790513157845, + 0.03284309431910515, + -0.029863247647881508, + 0.06189659982919693, + 0.009109586477279663, + -0.03977447748184204, + -0.0152555201202631, + -0.01891554892063141, + -0.0330212377011776, + -0.019952017813920975, + -0.004032509867101908, + -0.009190560318529606, + -0.02532869763672352, + 0.01868882216513157, + -0.005745112430304289, + 0.003996071871370077, + -0.02702915482223034, + -0.04048704728484154, + -0.037410032004117966, + -0.010259417816996574, + -0.02602507546544075, + 0.004060850944370031, + 0.051661472767591476, + 0.008664228953421116, + 0.01910988800227642, + 0.0019646340515464544, + 0.03303743153810501, + 0.013441700488328934, + -0.05593690648674965, + 0.03468930348753929, + -0.015968091785907745, + -0.04210653156042099, + 0.04285149276256561, + 0.013733207248151302, + -0.015239325352013111, + 0.008996222168207169, + 0.010542827658355236, + 0.0031539411284029484, + -0.030575819313526154, + -0.012745322659611702, + 0.029976611956954002, + -0.07838292419910431, + -0.060730572789907455, + 0.003489983733743429, + -0.028065621852874756, + 0.007486055605113506, + -0.02905350551009178, + 0.017247483134269714, + -0.021603889763355255, + 0.025458255782723427, + 0.031320780515670776, + -0.041167233139276505, + 0.0360172800719738, + 0.03179043158888817, + -0.04732126370072365, + 0.022105928510427475, + -0.005534579511731863, + -0.0539611391723156, + 0.02259177342057228, + -0.006097349803894758, + -0.038835179060697556, + -0.017668548971414566, + 0.0215391106903553, + -0.004538598004728556, + 0.008445598185062408, + -0.005809891503304243, + 0.019320419058203697, + 0.003390790428966284, + -0.0229156706482172, + 0.00151522783562541, + -0.015190741047263145, + -0.006405051331967115, + 0.05927303805947304, + -0.002747046295553446, + 0.041879802942276, + -0.04265715554356575, + 0.027709336951375008, + -0.04291627183556557, + -0.004789617843925953, + 0.01786288619041443, + 0.03491603210568428, + 0.05172625556588173, + -0.01289917342364788, + 0.009425384923815727, + -0.011660270392894745, + 0.03279450908303261, + 0.020324498414993286, + -0.0009651100262999535, + 0.00702045438811183, + 0.025539230555295944, + -0.0059880344197154045, + -0.01154690608382225, + 0.004898932762444019, + -0.0003152928838972002, + -0.033199381083250046, + -0.011976068839430809, + -0.011093451641499996, + 0.015304104425013065, + -2.584212415968068e-05, + 0.03504559025168419, + -0.037960655987262726, + 0.014275733381509781, + 0.016421547159552574, + 0.03702135756611824, + 0.04184741526842117, + 0.008024533279240131, + 0.057621169835329056, + -0.0007226938032545149, + -0.03285928815603256, + -0.019919628277420998, + 0.011992263607680798, + -0.025393476709723473, + -0.01718270406126976, + 0.02647853083908558, + 0.027385439723730087, + 0.008745202794671059, + -0.04324016720056534, + -0.019320419058203697, + -0.02515055425465107, + 0.04884357750415802, + -0.03436540812253952, + -0.01642964407801628, + 0.030041391029953957, + -0.004579085391014814, + -0.035855330526828766, + -0.016526812687516212, + -0.01755518466234207, + 0.05502999573945999, + -0.031628482043743134, + 0.03111024759709835, + 0.009287728928029537, + 0.017846690490841866, + -0.0065427073277533054, + -0.022688942030072212, + -0.02813040092587471, + 0.047353651374578476, + -0.03689179942011833, + -0.015798047184944153, + 0.002599268453195691, + 0.010478048585355282, + 0.0002546888426877558, + -0.02442178875207901, + -0.050786953419446945, + -0.04003359377384186, + 0.01600858010351658, + -0.03115883283317089, + -0.015287909656763077, + -0.0069435290060937405, + 0.014162370003759861, + 0.030672987923026085, + 0.0087047154083848, + 0.03423584997653961, + -0.01642964407801628, + 0.029474571347236633, + 0.050365887582302094, + -0.003724808571860194, + 0.03967730700969696, + -0.022688942030072212, + 0.023336734622716904, + 0.02757977694272995, + -0.011247302405536175, + 0.011012477800250053, + -0.013142095878720284, + -0.01901271753013134, + -0.07268235087394714, + 0.023352930322289467, + -0.03180662542581558, + -0.013636037707328796, + 0.020454056560993195, + -0.030122363939881325, + -0.02885916829109192, + 0.017717132344841957, + 0.042268477380275726, + -0.024891437962651253, + 0.028648635372519493, + -0.004575036466121674, + -0.031191222369670868, + 0.026365166530013084, + 0.034300629049539566, + 0.032697342336177826, + 0.0022612016182392836, + 0.019725291058421135, + -0.02680242620408535, + 0.02497241273522377, + 0.030721573159098625, + -0.0045547932386398315, + -0.005020393989980221, + 0.002083058701828122, + 0.040389880537986755, + -0.03880278766155243, + 0.008720910176634789, + 0.02327195554971695, + 0.005307852290570736, + -0.009020514786243439, + 0.0004327053320594132, + -0.0020709126256406307, + -0.06011516973376274, + 0.005020393989980221, + 0.026332776993513107, + 0.033879563212394714, + 0.010000301524996758, + -0.00504063768312335, + 0.002067876048386097, + 0.0015466052573174238, + -0.010704775340855122, + -0.009401093237102032, + 0.008510377258062363, + 0.0014656311832368374, + 0.03676224127411842, + -0.007044746540486813, + 0.025004802271723747, + -0.04887596517801285, + -0.011538809165358543, + 0.02923164889216423, + -0.04732126370072365, + 0.010437561199069023, + -0.05405830964446068, + -0.0317094586789608, + 0.022300265729427338, + -0.03527231886982918, + -0.02923164889216423, + 0.018397314473986626, + -0.04320777952671051, + -0.007453665602952242, + 0.03728047385811806, + 0.026510920375585556, + -0.008405111730098724, + -0.038640838116407394, + -0.011109646409749985, + 0.0044171372428536415, + -0.010251320898532867, + -0.013984226621687412, + 0.0743018314242363, + 0.007105477154254913, + 0.01727987267076969, + 0.005226877983659506, + 0.000804173992946744, + 0.015061181969940662, + -0.01317448541522026, + -0.0016984316753223538, + 0.01157119870185852, + 0.0248266588896513, + -0.05017155036330223, + -0.0011771610006690025, + 0.02116663008928299, + 0.055645398795604706, + 0.029199259355664253, + 0.02071317471563816, + 0.0019869019743055105, + -0.014032810926437378, + 0.022462215274572372, + -0.006287638563662767, + 0.024227449670433998, + 0.010818139649927616, + -0.0379282683134079, + -0.005797745659947395, + 0.002263226080685854, + -0.03624400496482849, + 0.019984407350420952, + 0.039968814700841904, + 0.039385803043842316, + -0.025992685928940773, + -0.0003780478145927191, + 0.03964491933584213, + -0.025506841018795967, + -0.012607666663825512, + 0.0394829697906971, + 0.004498111084103584, + 0.018397314473986626, + -0.03656790405511856, + -0.017992444336414337, + -0.039418190717697144, + -0.011886997148394585, + 0.03546665608882904, + -0.022575577720999718, + -0.03783109784126282, + 0.0012996342265978456, + -0.04145873710513115, + -0.030980689451098442, + 0.0006402014405466616, + 0.01833253540098667, + -0.030753962695598602, + -0.012154212221503258, + 0.011150132864713669, + 0.05668186768889427, + -0.04641435295343399, + -0.03190379589796066, + -0.07404271513223648, + 0.0356609933078289, + -0.008834274485707283, + -0.006032570265233517, + -0.023531073704361916, + -0.020275915041565895, + -0.012364745140075684, + 0.006886846851557493, + -0.030543429777026176, + -0.010073177516460419, + -0.010040787979960442, + -0.06691699475049973, + 0.028017038479447365, + 0.050365887582302094, + -0.01983865350484848, + -0.041393958032131195, + 0.03854367136955261, + 0.011806023307144642, + 0.01923944614827633, + 0.034300629049539566, + -0.02432461827993393, + 0.03153131529688835, + 0.01896413415670395, + 0.026332776993513107, + 0.0007849426474422216, + -0.004202555865049362, + 0.019757680594921112, + 0.008931443095207214, + -0.026996763423085213, + -0.049361810088157654, + -0.024065501987934113, + -0.011976068839430809, + 0.04884357750415802, + -0.019628120586276054, + -0.026770036667585373, + -0.05483565852046013, + 0.015490344725549221, + -0.019579537212848663, + 0.03556382283568382, + -0.021846812218427658, + -0.020956097170710564, + -0.014470071531832218, + 0.06312740594148636, + -0.0434345044195652, + 0.0195633415132761, + -0.006069008726626635, + 0.020923707634210587, + -0.008510377258062363, + -0.013020634651184082, + -0.039742086082696915, + -0.012162309139966965, + 0.007271474227309227, + 0.0008846420096233487, + 0.01129588671028614, + 0.011652172543108463, + 0.013757498934864998, + -0.0032875484321266413, + 0.04230086877942085, + -0.04609045758843422, + -0.01539317611604929, + -0.059953223913908005, + -0.00029935111524537206, + -0.0029879442881792784, + -0.027741726487874985, + -0.013555063866078854, + 0.020648395642638206, + -0.03987164422869682, + -0.01174934208393097, + 0.039515361189842224, + 0.011619783006608486, + 0.024162670597434044, + -0.07494962215423584, + -0.00457098800688982, + 0.029085896909236908, + 0.028875363990664482, + -0.004518354777246714, + 0.00374505203217268, + 0.027919869869947433, + 0.0029231649823486805, + 0.008648033253848553, + -0.023854969069361687, + 0.0031154784373939037, + -0.015263617038726807, + 0.041393958032131195, + 0.01841351017355919, + -0.04916747286915779, + -0.06335413455963135, + -0.04589612036943436, + -0.02890775352716446, + 0.012793907895684242, + 0.053540073335170746, + 0.03617922589182854, + -0.019822459667921066, + -0.0018421607092022896, + 0.024227449670433998, + -0.05007438361644745, + 0.009222949855029583, + 0.03455974534153938, + -0.0031397705897688866, + 0.03336132690310478, + 0.06691699475049973, + 0.001359352725557983, + -0.0201625507324934, + -0.06464972347021103, + 0.0020628152415156364, + 0.04842251166701317, + 0.017166508361697197, + -0.004530500620603561, + -0.017247483134269714, + 0.02089131809771061, + 0.051013682037591934, + -0.00966830737888813, + 0.010291808284819126, + 0.042819101363420486, + -0.03462452441453934, + -0.004607426002621651, + 0.0047693741507828236, + 0.009101488627493382, + -0.010388976894319057, + -0.016243403777480125, + -0.009206755086779594, + -0.019773874431848526, + 0.010704775340855122, + -0.015182643197476864, + 0.006959723774343729, + 0.014065200462937355, + -0.03536948561668396, + -0.052762720733881, + -0.056519921869039536, + -0.003536543808877468, + 0.0017227239441126585, + 0.024178866297006607, + 0.003971779718995094, + -0.03106166422367096, + 0.05447937175631523, + -0.01778191141784191, + -0.0014727164525538683, + 0.0061054471880197525, + -0.007696588058024645, + 0.011101548559963703, + 0.0272234920412302, + 0.0038563914131373167, + -0.03698896989226341, + 0.029749883338809013, + 0.03336132690310478, + -0.043272558599710464, + -0.0014484241837635636, + 0.004773423075675964, + -0.028551466763019562, + -0.0007029564003460109, + 0.0269805695861578, + -0.011344471015036106, + 0.00012291615712456405, + -0.03101307898759842, + -0.031077858060598373, + 0.00517829367890954, + 0.030413871631026268, + 0.0047693741507828236, + 0.0010971990413963795, + -0.0067006065510213375, + -0.030527234077453613, + -0.04026032239198685, + -0.019207056611776352, + -0.011992263607680798, + 0.010243223048746586, + -0.06319218873977661, + 0.030915910378098488, + -0.010680483654141426, + 0.005546725820749998, + 0.02850288338959217, + -0.021474331617355347, + -1.2256820980383054e-07, + 0.017522795125842094, + -0.007947607897222042, + 0.0379282683134079, + 0.02349868416786194, + -0.007060941308736801, + -0.01613003946840763, + 0.021409550681710243, + -0.0052754622884094715, + -0.0012055018451064825, + 0.05736204981803894, + -0.02717490680515766, + -0.010308003053069115, + 0.033053625375032425, + 0.012834394350647926, + -0.017247483134269714, + 0.00800429005175829, + 0.021571500226855278, + -0.02753119356930256, + -0.014210954308509827, + 0.019628120586276054, + 0.02029210887849331, + 0.02534489333629608, + 0.053216177970170975, + -0.009619723074138165, + 0.011198718100786209, + -0.013579356484115124, + 0.007473909296095371, + 0.027110127732157707, + 0.017700938507914543, + 0.010243223048746586, + -0.04048704728484154, + 0.023887358605861664, + -0.04910269379615784, + -0.04984765499830246, + -0.01833253540098667, + 0.0016093602171167731, + -0.029296427965164185, + 0.048228174448013306, + -0.05379918962717056, + 0.01495591551065445, + -0.023158591240644455, + -0.0017864910187199712, + -0.029312623664736748, + 0.034333016723394394, + 0.035401877015829086, + -0.023660631850361824, + -0.026996763423085213, + -0.0269805695861578, + -0.03909429535269737, + 0.021830616518855095, + 0.04055183008313179, + 0.04599328711628914, + 0.04064899682998657, + -0.0003836147952824831, + 0.007652052212506533, + -0.006040667649358511, + -0.016364865005016327, + -0.0449892096221447, + -0.034430187195539474, + -0.013538869097828865, + 0.015895215794444084, + -0.014324317686259747, + -0.019644316285848618, + 0.026316581293940544, + -0.00688279839232564, + -0.011142035946249962, + 0.009870742447674274, + 0.02221929281949997, + 0.03627639636397362, + 0.04942658916115761, + 0.016219111159443855, + -0.013506479561328888, + -0.011101548559963703, + 0.02089131809771061, + 0.04045465961098671, + 0.022964254021644592, + 0.010955795645713806, + 0.025118164718151093, + -0.0277579203248024, + -0.015522734262049198, + -0.006959723774343729, + -0.025134360417723656, + -0.03284309431910515, + 0.0007545773987658322, + 0.025684984400868416, + 0.05959693714976311, + -0.016632080078125, + -0.011603588238358498, + -0.024486567825078964, + 0.03284309431910515, + -0.014146175235509872, + 0.021020876243710518, + 0.051985371857881546, + 0.046479132026433945, + 0.016526812687516212, + -0.01623530685901642, + 0.026818621903657913, + -0.057750727981328964, + 0.039418190717697144, + 0.024211255833506584, + -0.0003557799500413239, + 0.019401393830776215, + -0.0015304104890674353, + -0.04622001573443413, + -0.01255098544061184, + 0.024713294580578804, + -0.018478289246559143, + 0.022656552493572235, + -0.019028913229703903, + -0.017069339752197266, + 0.009457774460315704, + -0.03870561718940735, + 0.018267756327986717, + 0.0087047154083848, + -0.010688580572605133, + 0.020324498414993286, + -0.010097470134496689, + 0.00859135203063488, + 0.020972291007637978, + 0.005826086271554232, + -0.011765536852180958, + 0.018996523693203926, + -0.015409370884299278, + 0.024357007816433907, + -0.032000962644815445, + -0.00682611670345068, + -0.022575577720999718, + -0.00336244935169816, + 0.025490645319223404, + 0.023450098931789398, + 0.02304522879421711, + 0.009716891683638096, + 0.04126439988613129, + -0.01237284205853939, + -0.025280114263296127, + -0.013546966947615147, + 0.007692539133131504, + -0.006781580857932568, + 0.036405954509973526, + -0.009716891683638096, + 0.02254318818449974, + 0.0075508346781134605, + 0.012996342964470387, + 0.02116663008928299, + -0.016162430867552757, + 0.018202977254986763, + -0.022332657128572464, + 0.019223250448703766, + 0.03179043158888817, + -0.006170226261019707, + -0.002961627673357725, + -0.019028913229703903, + 0.04907030239701271, + -0.015385078266263008, + 0.010810041800141335, + 0.018445899710059166, + 0.01993582211434841, + -0.020032992586493492, + -0.04417946934700012, + 0.04142634943127632, + -0.024033112451434135, + 0.03247061371803284, + -0.01647822931408882, + 0.031822819262742996, + -0.01723128743469715, + 0.016664469614624977, + -0.005328095518052578, + 0.007056892849504948, + -0.04252759739756584, + -0.029166869819164276, + 0.001460570259951055, + 0.03624400496482849, + -0.01695597544312477, + 0.03582294285297394, + 0.018866965547204018, + 0.003151916665956378, + -0.0008654106641188264, + 0.03478647395968437, + -0.04356406629085541, + -0.002805752446874976, + 0.002356346230953932, + -0.030025195330381393, + -0.03536948561668396, + -0.009303923696279526, + 6.838515400886536e-05, + 0.04252759739756584, + 0.031029274687170982, + -0.010413268581032753, + 0.0053240470588207245, + 0.038640838116407394, + 0.021425746381282806, + 0.00333208404481411, + 0.001055699773132801, + 0.05726488307118416, + 0.008785689249634743, + -0.0010435536969453096, + 0.033231768757104874, + -0.0018158440943807364, + -0.05869002640247345, + -0.01484255213290453, + -0.010696678422391415, + -0.005239024292677641, + 0.01796005479991436, + -0.0016528838314116001, + 0.056293193250894547, + 0.028891557827591896, + -0.039385803043842316, + -0.05856046825647354, + 0.037086136639118195, + 0.00289279967546463, + -0.0028361177537590265, + -0.017377041280269623, + -0.011878900229930878, + 0.062382444739341736, + 0.031223611906170845, + -0.03899712488055229, + -0.03394434228539467, + 0.013142095878720284, + 0.009344411082565784, + 0.021587694063782692, + -0.011142035946249962, + 0.039742086082696915, + 0.0019190860912203789, + 0.02437320351600647, + -0.0014959964901208878, + -0.0005835195770487189, + 0.004664108157157898, + 0.051564306020736694, + -0.032778315246105194, + 0.015061181969940662, + -0.01713411882519722, + 0.06264156103134155, + -0.02469710074365139, + -0.007267425302416086, + -0.04000120609998703, + -0.005287608597427607, + -0.0009549882961437106, + 0.03747481107711792, + -0.008526572957634926, + 0.003449496580287814, + -0.0001495490432716906, + -0.006380758713930845, + 0.0072755226865410805, + -0.03669746220111847, + 0.0403251014649868, + -0.006522463634610176, + -0.030446261167526245, + -0.019579537212848663, + 0.00286445883102715, + 0.04919986054301262, + -0.021782033145427704, + -0.028017038479447365, + 0.03407390043139458, + 0.03669746220111847, + -0.025361087173223495, + -0.0008077166276052594, + 0.011255399323999882, + 0.004526452161371708, + 0.04699736833572388, + -0.03511036932468414, + -0.0006290675373747945, + -0.05645514279603958, + 0.03676224127411842, + -0.07864204049110413, + -0.029668910428881645, + -0.011214912869036198, + 0.03899712488055229, + 0.03313460201025009, + -0.03349088877439499, + -0.012308062985539436, + -0.018947938457131386, + 0.04443858563899994, + 0.013822278939187527, + 0.006712752860039473, + -0.0026883401442319155, + 0.0007702661096118391, + -0.007635857444256544, + 0.020227329805493355, + 0.01833253540098667, + -0.030964495614171028, + 0.02442178875207901, + 0.037086136639118195, + 0.02740163542330265, + 0.03028431348502636, + -0.01705314591526985, + 0.013854668475687504, + -0.018041029572486877, + 0.04175024479627609, + 0.024178866297006607, + -0.0017115899827331305, + -0.02474568411707878, + -0.012154212221503258, + 0.016615884378552437, + 0.004429283086210489, + -0.03617922589182854, + 0.012210894376039505, + -0.06445538252592087, + 0.03436540812253952, + 0.009660209529101849, + 0.012866783887147903, + -0.02652711421251297, + -0.0005410081939771771, + 0.034754082560539246, + -0.019579537212848663, + 0.006008278112858534, + 0.025830736383795738, + 0.008324136957526207, + -0.008012386970221996, + -0.015036890283226967, + -0.04087572544813156, + -0.04081094637513161, + 0.021863006055355072, + -0.02226787619292736, + -0.053216177970170975, + -0.002866483060643077, + -0.0004823019844479859, + -0.00580584304407239, + 0.004307821858674288, + -0.007814000360667706, + 0.016372961923480034, + -0.04596089944243431, + 0.008445598185062408, + 0.018543068319559097, + 0.014445778913795948, + -0.007437470834702253, + -0.014874941669404507, + -0.03326416015625, + 0.011830315925180912, + -0.034851253032684326, + -0.011563100852072239, + 0.031175028532743454, + 0.04022793099284172, + -0.007660149596631527, + -0.0035405925009399652, + 0.008206725120544434, + 0.037539590150117874, + -0.01307731680572033, + 0.025733567774295807, + -0.049135081470012665, + 1.706465809547808e-05, + -0.01676163822412491, + 0.04126439988613129, + 0.018931744620203972, + -0.01690739206969738, + 0.010024593211710453, + 0.020680785179138184, + -0.0012915368424728513, + -0.012016556225717068, + 0.05020394176244736, + -0.0016619933303445578, + -0.01351457741111517, + -0.022624162957072258, + -0.028600051999092102, + 0.00289279967546463, + -0.033150795847177505, + -0.007951656356453896, + 0.03569338098168373, + -0.021587694063782692, + -0.019692901521921158, + 0.021879201754927635, + -0.014057103544473648, + 0.043272558599710464, + -0.0031903793569654226, + 0.02562020532786846, + 0.03345849737524986, + -0.010413268581032753, + -0.01276151742786169, + 0.018931744620203972, + 0.027158712968230247, + -0.012891076505184174, + 0.003330059815198183, + 0.011579295620322227, + 0.00950635876506567, + -0.0010354563128203154, + -0.005376680288463831, + 0.010243223048746586, + 3.0523438908858225e-05, + 0.04485965147614479, + 0.011360665783286095, + -0.02396833337843418, + 0.0011903191916644573, + 0.014478168450295925, + 0.0217172522097826, + -0.013717012479901314, + 0.02730446681380272, + 0.0029049457516521215, + -0.0028320690616965294, + -0.008332234807312489, + -0.019093692302703857, + -0.019854849204421043, + -0.004182312171906233, + 0.036859408020973206, + 0.016186721622943878, + 0.011206815019249916, + -0.0008699654717929661, + -0.02642994560301304, + -0.028891557827591896, + -0.007769464515149593, + 0.03164467588067055, + -0.001584055833518505, + 0.01836492493748665, + -0.04728887230157852, + 0.025118164718151093, + -0.03345849737524986, + 0.006360515486449003, + 0.04511876776814461, + 0.021506721153855324, + 0.03478647395968437, + 0.055191945284605026, + 0.0021093753166496754, + 0.033782392740249634, + 0.025717373937368393, + 0.04288388416171074, + -0.002659999066963792, + 0.03643834590911865, + 0.04045465961098671, + 0.0406813882291317, + -0.03559621423482895, + -0.03647073358297348, + 0.017765717580914497, + -0.003473788732662797, + 0.009457774460315704, + 0.024211255833506584, + -0.06409909576177597, + -0.004745081998407841, + 0.02702915482223034, + -0.0006032570381648839, + 0.0008942576823756099, + 0.03821977600455284, + -0.013943740166723728, + 0.011741244234144688, + -0.003907000180333853, + 0.003423179965466261, + -0.0017298092134296894, + 0.02642994560301304, + -0.007805902976542711, + 0.03766915202140808, + 0.009733086451888084, + 0.01509357150644064, + 0.01961192674934864, + 0.00633217440918088, + 0.03143414482474327, + -0.038090214133262634, + -0.00043877839925698936, + -0.005133757833391428, + -0.01610574871301651, + 0.019676705822348595, + -0.0017480283277109265, + -0.011814121156930923, + 0.007441519759595394, + 0.028470491990447044, + -0.010623801499605179, + -0.012777713127434254, + 0.026235608384013176, + 0.00014524729340337217, + 0.012882978655397892, + 0.01264815405011177, + 0.015514637343585491, + 0.0305110402405262, + -0.006866603624075651, + 0.019142277538776398, + 0.004979907069355249, + -0.018591653555631638, + 0.017943860962986946, + 0.05026872083544731, + -0.00020357394532766193, + -0.0465439110994339, + 0.03582294285297394, + 0.015352688729763031, + -0.021312382072210312, + 0.02562020532786846, + -0.030980689451098442, + -0.006781580857932568, + -0.04252759739756584, + 0.012583374977111816, + -0.03133697435259819, + -0.029523156583309174, + -0.01319877803325653, + -0.012518595904111862, + -0.012955855578184128, + -0.008137896656990051, + 0.023288151249289513, + -0.03439779579639435, + 0.04311060905456543, + -0.015425565652549267, + -0.02204114943742752, + 0.020097771659493446, + -0.003611444728448987, + -0.025944100692868233, + 0.0187859907746315, + 0.03216291218996048, + 0.0006862554582767189, + 0.012316159904003143, + 0.0040932404808700085, + 0.014089493080973625, + -0.020194940268993378, + -0.004400942008942366, + 0.008834274485707283, + -0.021231409162282944, + 0.0066317785531282425, + 0.012891076505184174, + -0.03990403562784195, + 0.029992805793881416, + -0.020696979016065598, + 0.02106945961713791, + -0.04168546572327614, + -0.022850889712572098, + -0.0023158593103289604, + 0.03614683821797371, + -0.0330212377011776, + 0.007660149596631527, + 0.006858506239950657, + 0.020535031333565712, + 0.002060790779069066, + 0.024988606572151184, + -0.005380728747695684, + 0.005028491374105215, + -0.009749281220138073, + 0.0010045849485322833, + -0.016291989013552666, + -0.01647822931408882, + 0.006514366250485182, + 0.017603768035769463, + -0.012777713127434254, + 0.03368522599339485, + -0.043499287217855453, + -0.021247602999210358, + -0.0031397705897688866, + -0.02996041625738144, + -0.020194940268993378, + -0.007016405463218689, + -0.01846209354698658, + 0.003864488797262311, + -0.015870923176407814, + 0.02863244153559208, + -0.026867205277085304, + -0.015644196420907974, + 0.00845369603484869, + 0.01838112063705921, + -0.009125781245529652, + 0.014834455214440823, + -0.0059313527308404446, + -0.013166388496756554, + -0.028162790462374687, + 0.00898002739995718, + -0.011530711315572262, + -0.0005293681751936674, + -0.04732126370072365, + -0.0065629505552351475, + -0.00454669538885355, + -0.0022105928510427475, + 0.002259177388623357, + -0.028373323380947113, + 0.0007910157437436283, + 0.0001891504361992702, + 0.042268477380275726, + 0.0024676856119185686, + -0.03060820885002613, + -0.03311840444803238, + -0.004639816004782915, + -0.005457654129713774, + 0.001134649501182139, + -0.008963832631707191, + -0.018656432628631592, + -0.008712813258171082, + 0.02377399429678917, + 0.0021923736203461885, + 0.01703695021569729, + -0.01681022346019745, + -0.0046681566163897514, + 0.013976129703223705, + 0.04184741526842117, + -0.00495966337621212, + -0.004830104764550924, + 0.01676163822412491, + -0.009684502147138119, + 9.672609303379431e-05, + -0.0026296337600797415, + -0.021571500226855278, + -0.0037754173390567303, + 0.0027409731410443783, + 0.03815499320626259, + -0.008793787099421024, + 0.02639755606651306, + -0.00994361937046051, + -0.006846359930932522, + 0.029895637184381485, + -0.00980596337467432, + -0.014162370003759861, + -0.006878749467432499, + 0.0005809891736134887, + 0.006996162235736847, + 0.03621161729097366, + -0.02098848670721054, + -0.01864023692905903, + -0.00032541464315727353, + -0.016121942549943924, + -0.01773332804441452, + 0.025166749954223633, + -0.04395274072885513, + -0.012518595904111862, + 0.021101849153637886, + -0.007226938381791115, + -0.01805722340941429, + 0.04126439988613129, + 0.02034069411456585, + -0.014210954308509827, + -0.02963651902973652, + -0.010567119345068932, + 0.040163151919841766, + -0.007858536206185818, + -0.0026377311442047358, + 0.005534579511731863, + 0.03834933415055275, + -0.019644316285848618, + -0.04200936108827591, + 0.01470489613711834, + -0.0021761788520962, + -0.024583736434578896, + 0.029539350420236588, + -0.029814662411808968, + 0.006073057185858488, + -0.03821977600455284, + 0.012324257753789425, + 0.013595551252365112, + 0.005907060578465462, + 0.007174305152148008, + -0.004643864464014769, + -0.012016556225717068, + -0.012380939908325672, + 0.009976008906960487, + -0.006927334237843752, + -0.029847051948308945, + -0.0013370848027989268, + -0.02349868416786194, + 0.01509357150644064, + 0.028259960934519768, + -0.02694818004965782, + -0.00584228103980422, + 0.007036649156361818, + 0.01565229333937168, + 0.035531435161828995, + -0.0035588114988058805, + 0.0140004213899374, + -0.00039803830441087484, + 0.017668548971414566, + -0.02051883563399315, + 0.01282629743218422, + -0.03812260553240776, + -0.004777472000569105, + -0.021296188235282898, + -0.02895633690059185, + 0.0014798016054555774, + -0.00043599490891210735, + -0.022705137729644775, + 0.007818048819899559, + -0.012696738354861736, + -0.03245441988110542, + 0.005789647810161114, + -0.016891196370124817, + -0.013368823565542698, + -0.0036276394966989756, + -0.07779991626739502, + 0.015660390257835388, + 0.04097289219498634, + 0.0009585308725945652, + 0.0152555201202631, + 0.020858928561210632, + 0.005077076144516468, + -0.04268954321742058, + -0.012704836204648018, + -0.01280200481414795, + 0.011903192847967148, + -0.0028806535992771387, + 0.002382662845775485, + -0.022883279249072075, + 0.019919628277420998, + -0.007854487746953964, + -0.00740912975743413, + 0.00886666402220726, + -0.02808181755244732, + -0.007623711135238409, + -0.006988064851611853, + -0.0017945884028449655, + 0.02144194208085537, + -0.003973803948611021, + 0.0032875484321266413, + -0.006789678242057562, + 0.025782153010368347, + 0.032826900482177734, + 0.03737764433026314, + 0.023628242313861847, + 0.013749402016401291, + -0.04181502386927605, + 0.00749010406434536, + 0.021199019625782967, + 0.004006193485110998, + -0.025231529027223587, + -0.007154061459004879, + 0.018154392018914223, + -0.009449677541851997, + -0.024437982589006424, + 0.009595430456101894, + 0.0007707722252234817, + 0.015765657648444176, + -0.019725291058421135, + 0.03909429535269737, + -0.011393055319786072, + 0.009214852005243301, + -0.0033138650469481945, + -0.018267756327986717, + 0.012267575599253178, + 0.004781520459800959, + -0.0027652655262500048, + -0.0011538808466866612, + -0.009652112610638142, + 0.007603467907756567, + 0.011085353791713715, + 0.025684984400868416, + 0.004054777789860964, + -0.010963892564177513, + -0.019093692302703857, + -0.01317448541522026, + -0.0013836448779329658, + -0.007133818231523037, + -0.0044738189317286015, + -0.004996101837605238, + -0.0050811246037483215, + -0.0031154784373939037, + -0.035531435161828995, + -0.010777652263641357, + 0.00015726688434369862, + -0.018543068319559097, + -0.012486206367611885, + 0.0023705167695879936, + 0.005004199221730232, + 0.014988305978477001, + 0.022413630038499832, + -0.02437320351600647, + -0.011886997148394585, + 0.0283571295440197, + 0.004202555865049362, + 0.008882858790457249, + 0.019045107066631317, + 0.00754678575322032, + 0.027644557878375053, + 0.00672489870339632, + 0.011603588238358498, + -0.026559503749012947, + -0.021360967308282852, + -0.020648395642638206, + -0.03253539279103279, + 0.003423179965466261, + -0.024616125971078873, + 0.011352568864822388, + -0.0037187354173511267, + -0.025134360417723656, + 0.00037551738205365837, + 0.0035021298099309206, + -0.02199256420135498, + -0.04113484174013138, + -0.02474568411707878, + 0.0034393747337162495, + -0.00641314871609211, + -0.009328216314315796, + 0.03634117543697357, + 9.46384752751328e-05, + 0.0014271684922277927, + 0.007562980987131596, + -0.00025380318402312696, + 0.04275432229042053, + -0.03656790405511856, + -0.004190409556031227, + 0.03689179942011833, + 0.001110357348807156, + 0.027612168341875076, + -0.034754082560539246, + -0.0021964223124086857, + 0.0026053416077047586, + 0.028842974454164505, + 0.018251562491059303, + -0.029928026720881462, + 0.013749402016401291, + 0.0019514757441356778, + -0.01781430095434189, + 0.006016375496983528, + -0.010429464280605316, + -0.023110007867217064, + 0.011085353791713715, + 0.013506479561328888, + -0.030770156532526016, + -0.010461853817105293, + -0.0004896402242593467, + 0.027385439723730087, + 0.025182943791151047, + -0.010939600877463818, + 0.0051499526016414165, + -0.024859048426151276, + 0.0016022749477997422, + 0.005870622117072344, + 0.02029210887849331, + 0.010348489508032799, + 0.006571047939360142, + -0.0002457057707943022, + -0.0217172522097826, + -0.02557162009179592, + -0.004898932762444019, + -0.029668910428881645, + -0.026267997920513153, + -0.018526874482631683, + 0.011789828538894653, + 0.051467135548591614, + 0.027968453243374825, + -0.0020729368552565575, + -0.00625524902716279, + 0.005907060578465462, + 0.014283831231296062, + 0.005348339211195707, + 0.030543429777026176, + -0.03183901682496071, + -0.011328276246786118, + -0.0002316618338227272, + 0.005550774279981852, + -0.006360515486449003, + 0.0018340633250772953, + -0.004975858144462109, + 0.03436540812253952, + -0.023514878004789352, + -0.012332355603575706, + 0.008971930481493473, + -0.01979007013142109, + -0.025490645319223404, + -0.03316698968410492, + -0.019903432577848434, + -0.016972171142697334, + 0.0016457985620945692, + -0.03724808618426323, + -0.0244703721255064, + -0.006320028565824032, + 0.005939450114965439, + -0.002704534912481904, + 0.022251682355999947, + 0.011344471015036106, + 0.009061001241207123, + 0.07015595585107803, + -0.021782033145427704, + 0.0025284162256866693, + -0.015336493961513042, + 0.01074526272714138, + -0.0008072105119936168, + 0.05713532492518425, + 0.004842251073569059, + -0.035855330526828766, + -0.025863127782940865, + -0.039288632571697235, + 0.019547147676348686, + -0.020308304578065872, + -0.024357007816433907, + -0.0030871375929564238, + 0.0009686526609584689, + -0.006344320718199015, + 0.03224388509988785, + 0.012931563891470432, + 0.009133878163993359, + -0.008834274485707283, + 0.039612527936697006, + -0.022802306339144707, + 0.02194398082792759, + -0.010113664902746677, + 0.03352327644824982, + 0.028292350471019745, + -0.020745564252138138, + -0.04336972534656525, + -0.022786110639572144, + 0.0114578353241086, + 0.015644196420907974, + 0.014883039519190788, + 0.015223130583763123, + 0.0014200832229107618, + -0.0025182943791151047, + -0.03715091571211815, + 0.031596094369888306, + 0.04123201221227646, + 0.014065200462937355, + -0.003767319954931736, + 0.04022793099284172, + 0.007664198521524668, + -0.02029210887849331, + 0.01332833617925644, + -0.03352327644824982, + -0.01102057471871376, + -0.037636760622262955, + -0.03381478413939476, + -0.0023239566944539547, + 0.011239204555749893, + -0.031045468524098396, + -0.013636037707328796, + 0.005328095518052578, + 0.007384837605059147, + -0.0006437440752051771, + 0.006012326572090387, + -0.012704836204648018, + -0.031677067279815674, + -0.004380698781460524, + -0.007320058532059193, + -0.02286708541214466, + -0.05098129063844681, + 0.01668066345155239, + -0.011814121156930923, + -0.013814181089401245, + -0.00043953751446679235, + 0.00023710228560958058, + 0.030770156532526016, + -0.006259297952055931, + 0.026316581293940544, + 0.011352568864822388, + 0.025684984400868416, + -0.027158712968230247, + 0.0038563914131373167, + 0.014996402896940708, + -0.020227329805493355, + -0.02341770939528942, + -0.013020634651184082, + 0.0018016736721619964, + -0.010761457495391369, + 0.026867205277085304, + -0.01319068018347025, + 0.0036964674945920706, + -0.0048462999984622, + 0.00214783800765872, + -0.027288271114230156, + -0.027563583105802536, + 0.038284555077552795, + -0.05214731767773628, + -0.0083160400390625, + -0.02547445148229599, + -0.014065200462937355, + 0.01676163822412491, + -0.009069099090993404, + 0.012607666663825512, + 0.003943438641726971, + 0.01553083211183548, + 0.014421487227082253, + 0.033328939229249954, + -0.02945837751030922, + -0.04401751980185509, + 0.011700756847858429, + 0.009935521520674229, + -0.02519913949072361, + -0.006263346411287785, + -0.017328457906842232, + -0.009846450760960579, + -0.06241483613848686, + -0.004064899869263172, + 0.02294806018471718, + -0.010688580572605133, + -0.006514366250485182, + 0.00011254134733462706, + -0.011498321779072285, + 0.030397675931453705, + -0.04443858563899994, + -0.011838412843644619, + 0.02024352364242077, + ], + "index": 96, + }, + { + "title": "Soyuz 1", + "text": "Soyuz 1 (Russian: \u0421\u043e\u044e\u0437 1 , Union 1) was a manned spaceflight of the Soviet space program. Launched into orbit on 23 April 1967 carrying cosmonaut Colonel Vladimir Komarov, Soyuz 1 was the first crewed flight of the Soyuz spacecraft. The mission plan was complex, involving a rendezvous with Soyuz 2 and an exchange of crew members before returning to Earth.", + "vector": [ + 0.027997292578220367, + 0.01810913160443306, + 0.0026427116245031357, + -0.022966979071497917, + -0.04242710769176483, + -0.03782796487212181, + 0.0009494718397036195, + 0.03363124653697014, + -0.013517173007130623, + -0.013783060945570469, + -0.03590207174420357, + -0.039006493985652924, + -0.021041085943579674, + 0.0021702214144170284, + 0.028299111872911453, + 0.07927775382995605, + -0.0028044001664966345, + 0.01566583663225174, + -0.02280888333916664, + -0.04136355593800545, + 0.05001569911837578, + -0.0103983785957098, + 0.023872435092926025, + 0.0312166940420866, + 0.04403680935502052, + -0.04139230027794838, + 0.021889053285121918, + 0.035557135939598083, + -0.029980674386024475, + -0.02975071594119072, + 0.017289908602833748, + -0.03196405619382858, + -0.016715016216039658, + 0.03196405619382858, + 0.06657262146472931, + -0.04472668096423149, + 0.019014587625861168, + -0.006553781218826771, + -0.029161451384425163, + -0.008314390666782856, + -0.008515603840351105, + -0.02884525991976261, + 0.024116763845086098, + -0.009622273035347462, + -0.01609700545668602, + -0.01399146020412445, + -0.015536485239863396, + 0.010010325349867344, + 0.024418583139777184, + 0.0034637306816875935, + -0.0097013209015131, + 0.02529529482126236, + 0.014817869290709496, + 0.04443923383951187, + 0.021213553845882416, + 0.023699967190623283, + 0.013409380801022053, + 0.04489915072917938, + -0.044640447944402695, + -0.053148865699768066, + -3.208509588148445e-05, + -0.0702519342303276, + -0.05004444345831871, + -0.010944526642560959, + 0.020035022869706154, + -0.012051195837557316, + 0.013179423287510872, + -0.009794740937650204, + -0.025913305580615997, + -0.0026966077275574207, + 0.056282032281160355, + 0.028586557134985924, + 0.025453390553593636, + 0.0028151795268058777, + 0.017117440700531006, + -0.05478730797767639, + 0.07939273118972778, + 0.022248361259698868, + -0.03955264389514923, + -0.03857532516121864, + 0.03915021941065788, + 0.022392084822058678, + 0.014437002129852772, + 0.03207903355360031, + 0.031705353409051895, + -0.04685378447175026, + -0.008077247999608517, + -0.06772240251302719, + -0.0008928807801567018, + -0.024375466629862785, + -0.04027125984430313, + 0.05458609759807587, + -0.0042003123089671135, + 0.01842532306909561, + 0.08071498572826385, + -0.06047875061631203, + 0.044927895069122314, + -0.01006062887609005, + -0.04314572364091873, + -0.0005636647110804915, + -0.009765995666384697, + -0.024131136015057564, + -0.00966538954526186, + -0.04510036110877991, + 0.03848909214138985, + 0.03397618234157562, + 0.0395238995552063, + 0.044209275394678116, + 0.021716585382819176, + 0.03713809326291084, + -0.052401501685380936, + 0.0064603607170283794, + -0.0004356611461844295, + -0.018008526414632797, + 0.007509540766477585, + -0.035442158579826355, + -0.02575520984828472, + -0.0047967638820409775, + -0.039753854274749756, + -0.014523236081004143, + 0.0304980780929327, + 0.011311021633446217, + -0.011950589716434479, + -0.014587911777198315, + -0.03147539496421814, + 0.022090265527367592, + 0.01440825778990984, + 0.009873788803815842, + -0.006370533723384142, + 0.016326963901519775, + 0.06697504222393036, + -0.01276981271803379, + -0.034579817205667496, + 0.03064180165529251, + 0.019963162019848824, + 0.01753423921763897, + -0.048233527690172195, + 0.031417906284332275, + -0.008400624617934227, + 0.033257562667131424, + -0.023757455870509148, + 0.002008532639592886, + 0.00964383129030466, + 0.08887846767902374, + 0.008005386218428612, + 0.03647696599364281, + -0.006560967303812504, + 0.0330563522875309, + -0.024317976087331772, + -0.03075677901506424, + 0.03294137120246887, + -0.06910214573144913, + 0.019373895600438118, + 0.003249942325055599, + 0.003564337035641074, + 0.011138553731143475, + 0.041679747402668, + -0.01605388894677162, + 0.045905210077762604, + 0.024763518944382668, + 0.0020516496151685715, + -0.029578248038887978, + 0.003161911852657795, + 0.0035140339750796556, + -0.0025151572190225124, + -0.040012557059526443, + 0.003469120478257537, + 0.010685824789106846, + -0.013941156677901745, + 0.00833594985306263, + -0.0007213111384771764, + -0.05967390164732933, + 0.009011449292302132, + -0.029405780136585236, + 0.035298433154821396, + 0.01031214464455843, + 0.022320223972201347, + 0.01566583663225174, + -0.014975964091718197, + 0.01655692048370838, + 0.006115424912422895, + 0.04556027427315712, + 0.0005407587741501629, + 0.030871758237481117, + 0.009550411254167557, + 0.015766441822052002, + 0.01605388894677162, + 0.01605388894677162, + 0.0005057262605987489, + 0.047227464616298676, + 0.019086450338363647, + -0.027221186086535454, + 0.030843013897538185, + 0.03236648067831993, + -0.010858292691409588, + 0.02733616530895233, + 0.02194654382765293, + 0.03138916194438934, + 0.002497191773727536, + -0.030153142288327217, + 0.009543225169181824, + -0.03420613706111908, + -0.029089588671922684, + -0.03411990404129028, + -0.02582707069814205, + -0.014163928106427193, + 0.042513344436883926, + 0.01698809117078781, + 0.02493598684668541, + -0.01796540804207325, + 0.04265706613659859, + -0.046077679842710495, + 0.0603637732565403, + 0.016441941261291504, + 0.02553962543606758, + -0.019517619162797928, + -0.029262056574225426, + 0.03420613706111908, + -0.02302446775138378, + 0.04208217188715935, + -0.004674599505960941, + -0.03363124653697014, + 0.06640014797449112, + -0.01153379213064909, + -0.002213338389992714, + 0.015335272997617722, + 0.01734739914536476, + -0.022320223972201347, + 0.0020732081029564142, + -0.09296020865440369, + -0.08600400388240814, + 0.026215124875307083, + 0.021889053285121918, + 0.0431169793009758, + -0.009995953179895878, + 0.012834487482905388, + 0.027034346014261246, + 0.01318661030381918, + -0.025625858455896378, + -0.030411843210458755, + -0.019158311188220978, + -0.014171114191412926, + -0.028040409088134766, + -0.04645135998725891, + 0.033861201256513596, + 0.04898088797926903, + 0.06024879217147827, + 0.0023211308289319277, + -0.02917582355439663, + 0.009248591959476471, + 0.03676441311836243, + 0.03535592555999756, + -0.0287446528673172, + 0.026387592777609825, + -0.009169544093310833, + -0.018410950899124146, + -0.0034906789660453796, + -0.017979780212044716, + -0.04107610881328583, + 0.008932401426136494, + -0.05073431506752968, + 0.05708688125014305, + 0.023556243628263474, + 0.003916459158062935, + -0.015680208802223206, + -0.05967390164732933, + 0.0004913539160043001, + -0.040185026824474335, + 0.016010772436857224, + -0.01957510970532894, + 0.02515157125890255, + -0.007660450413823128, + -0.0016653933562338352, + -0.009974394924938679, + 0.0033882760908454657, + 0.018669651821255684, + 0.010470240376889706, + 0.0588403046131134, + -0.022507064044475555, + -0.041765980422496796, + 0.036591943353414536, + -0.02040870487689972, + 0.05608081817626953, + -0.08186477422714233, + -0.03963887691497803, + -0.01770670711994171, + -0.022363340482115746, + -0.00038064210093580186, + -0.010599590837955475, + 0.018525930121541023, + -0.043030746281147, + 0.008343135938048363, + -0.04127732291817665, + -0.03205028921365738, + -0.009521666914224625, + 0.07099929451942444, + 0.028428463265299797, + 0.02374308370053768, + 0.01806601509451866, + -0.010175607167184353, + -0.011806866154074669, + 0.007739497814327478, + 0.031532883644104004, + 0.026646293699741364, + -0.02338377572596073, + 0.014199858531355858, + 0.036735668778419495, + -0.0681823194026947, + -0.0033541417215019464, + 0.019014587625861168, + -0.030239375308156013, + -0.002560070715844631, + 0.009464177303016186, + -0.025568369776010513, + 0.04900963604450226, + -0.01115292590111494, + 0.02242082916200161, + 0.027609240263700485, + -0.011914659291505814, + 0.01465977355837822, + -0.014465746469795704, + 0.011375696398317814, + 0.011691887862980366, + -0.05401120334863663, + 0.048520974814891815, + -0.008163481950759888, + -0.014803496189415455, + 0.034551072865724564, + -0.01064989436417818, + 0.0014013018226251006, + 0.04725620895624161, + -0.025683347135782242, + 0.01695934496819973, + 0.019460130482912064, + 0.0287015363574028, + 0.012151801958680153, + 0.028974611312150955, + -0.022320223972201347, + 0.006981357932090759, + -0.04495663940906525, + 0.05329258739948273, + -0.0006521443137899041, + 0.006898717023432255, + -0.03018188662827015, + -0.02137164957821369, + 0.06789486855268478, + 0.03035435453057289, + -0.008918028324842453, + -0.00659330515190959, + -0.03130292892456055, + 0.0004376822616904974, + 0.0222339890897274, + 0.012194919399917126, + -0.02500784955918789, + 0.003948797006160021, + -0.024519190192222595, + -0.014702890068292618, + -0.01445856038480997, + -0.004128450993448496, + -0.025137199088931084, + -0.029017727822065353, + -0.001185716944746673, + 0.02975071594119072, + 0.035298433154821396, + -0.011936217546463013, + -0.05205656588077545, + 0.00869525782763958, + -0.00833594985306263, + 0.01619761250913143, + 0.002392992377281189, + 0.000190433333045803, + 0.022176500409841537, + 0.0136537104845047, + -0.0031134053133428097, + -0.03064180165529251, + -0.04573274403810501, + -0.01460228394716978, + 0.003641588380560279, + 0.019488874822854996, + 0.017778567969799042, + -0.0031026259530335665, + -0.024332350119948387, + -0.05990385636687279, + 0.017289908602833748, + -0.0003941161558032036, + -0.011612839996814728, + 0.02206152118742466, + -0.0034978650510311127, + 0.019963162019848824, + -0.014465746469795704, + -0.04357689619064331, + -0.008364694193005562, + -0.0037547703832387924, + 0.028227249160408974, + 0.02270827628672123, + -0.03265392780303955, + 0.011167298071086407, + -0.01412081066519022, + -0.014142369851469994, + 0.06122611090540886, + -0.04556027427315712, + 0.01655692048370838, + 0.01741925999522209, + -0.034867264330387115, + 0.02313944697380066, + -0.0011938014067709446, + -0.05452860891819, + 0.001882774755358696, + -0.0265456885099411, + 0.024706030264496803, + -0.0037152464501559734, + -0.026502570137381554, + 0.021615980193018913, + -0.019819438457489014, + 0.03107297047972679, + -0.031561627984046936, + 0.010132490657269955, + 0.02572646550834179, + -0.02946327067911625, + -0.029808206483721733, + -0.042513344436883926, + 0.04443923383951187, + 0.01451604999601841, + 0.03239522501826286, + 0.003999100066721439, + -0.02141476608812809, + 0.02069615013897419, + 0.018985843285918236, + -0.025237806141376495, + -0.02931954711675644, + 0.048233527690172195, + -0.04130606725811958, + 0.01379743404686451, + 0.03518345579504967, + -0.022478319704532623, + 0.010139676742255688, + 0.05645449832081795, + 0.0015171787235885859, + -0.0017040190286934376, + 0.0116775156930089, + 0.008874911814928055, + 0.05564964935183525, + -0.015320900827646255, + -0.02338377572596073, + -0.05271769315004349, + -0.02884525991976261, + -0.018367834389209747, + 0.007304735016077757, + 0.005396808497607708, + -0.023656850680708885, + -0.0183247160166502, + -0.03958138823509216, + 0.005540532059967518, + 0.04216840863227844, + 0.0035607439931482077, + 0.0025870187673717737, + -0.007459237705916166, + -0.006410057656466961, + -0.01839657872915268, + 0.03207903355360031, + 0.02543901838362217, + 0.009061751887202263, + 0.04282953217625618, + -0.010297772474586964, + 0.02565460279583931, + 0.028874004259705544, + 0.006424430292099714, + -0.06381312757730484, + 0.01445856038480997, + -0.011267904192209244, + -0.02043744921684265, + 0.002463057404384017, + -0.007531099021434784, + -0.0480610616505146, + 0.012741067446768284, + 0.01854030229151249, + -0.006995730102062225, + 0.02288074418902397, + -0.011095436289906502, + -0.00494767352938652, + -0.01064989436417818, + 0.014932847581803799, + 0.0011282276827841997, + 0.001262968173250556, + 0.05349380150437355, + 0.0020678185392171144, + 0.064675472676754, + -0.03345877677202225, + -0.028658419847488403, + -0.00035818532342091203, + 0.05013067647814751, + 0.001404894981533289, + 0.04656633734703064, + 0.05481605604290962, + -0.00731192110106349, + -0.001782168517820537, + -0.01796540804207325, + 0.013718386180698872, + 0.02647382579743862, + 0.0011461930116638541, + 0.04541655257344246, + 0.006309451535344124, + -0.017074324190616608, + 0.012496737763285637, + 0.011993707157671452, + 0.021328533068299294, + 0.005993260070681572, + -0.02206152118742466, + 0.035154711455106735, + -0.02712058089673519, + -0.004017065279185772, + 0.014092066325247288, + 0.051107995212078094, + 0.05358003452420235, + -0.009097683243453503, + 0.015004709362983704, + 0.004293732810765505, + -0.029836950823664665, + 0.008752747438848019, + 0.030986737459897995, + -0.001139006926678121, + 0.006086680572479963, + -0.0022887929808348417, + 0.023843690752983093, + 0.007617333438247442, + -0.00930608157068491, + 0.024691658094525337, + 0.0033002456184476614, + 0.04196719452738762, + -0.025956422090530396, + -0.009428245946764946, + 0.0003878282441291958, + -0.02280888333916664, + -0.01904333382844925, + 0.009974394924938679, + 0.013610593043267727, + -0.01681562326848507, + -0.014480119571089745, + -0.011052318848669529, + -0.014034576714038849, + -0.011196042411029339, + 0.021386021748185158, + -0.03575835004448891, + 0.003298449097201228, + -0.005285423249006271, + 0.013337519019842148, + 0.026286985725164413, + -0.03662068769335747, + -0.00023085549764800817, + -0.011612839996814728, + 0.0013599813682958484, + 0.03302760794758797, + -0.0388052836060524, + 0.007753870449960232, + 0.03998381271958351, + -0.05530471354722977, + 0.008450928144156933, + 0.027063092216849327, + -0.008436555974185467, + 0.032711416482925415, + 0.0005546819884330034, + -0.021041085943579674, + 0.018669651821255684, + 0.0009041091543622315, + 0.044784169644117355, + 0.008422183804214, + -0.015076571144163609, + 0.026128889992833138, + -0.02381494641304016, + -0.034263625741004944, + 0.006496291607618332, + -0.04547404125332832, + 0.02608577348291874, + -0.038747791200876236, + 0.018152248114347458, + -0.023398147895932198, + 0.023153819143772125, + -0.0005708508542738855, + 0.03777047619223595, + -0.008982704021036625, + 0.0013734555104747415, + 0.011497861705720425, + 0.012245221994817257, + -0.016844367608428, + 0.015823932364583015, + 0.033717479556798935, + -0.006758586503565311, + 0.016154495999217033, + 0.0015998196322470903, + -0.005572869908064604, + 0.0215584896504879, + -0.03380371257662773, + -0.026028282940387726, + 0.008472486399114132, + -0.015306527726352215, + 0.022392084822058678, + 0.02364247851073742, + 0.03894900530576706, + 0.027149325236678123, + -0.018669651821255684, + -0.009988767094910145, + -0.012942280620336533, + -0.026459453627467155, + 0.0222339890897274, + -0.013502800837159157, + 0.026172006502747536, + -0.02697685733437538, + -0.001409386284649372, + -0.003063102252781391, + 0.00830001849681139, + -0.027134953066706657, + -0.0035355924628674984, + 0.02252143621444702, + -0.0012584768701344728, + -0.020178746432065964, + -0.006025597918778658, + -0.015450251288712025, + -0.0019043333595618606, + 0.03503973409533501, + 0.03268267214298248, + 0.011713446117937565, + 0.03248145803809166, + 0.01348842866718769, + 0.014774751849472523, + -0.016614409163594246, + 0.04639387130737305, + -0.018295971676707268, + 0.031245438382029533, + -0.00020121257693972439, + 0.015090943314135075, + -0.031130459159612656, + 0.012503924779593945, + -0.01273388136178255, + 0.018554674461483955, + -0.0012117668520659208, + 0.005860316101461649, + 0.0423121303319931, + -0.05734558403491974, + -0.0006350771873258054, + -0.02543901838362217, + -0.02608577348291874, + -0.011131366714835167, + 0.009801927022635937, + -0.007782614789903164, + -0.012137429788708687, + -0.011296648532152176, + 0.010628336109220982, + 0.035269688814878464, + -0.03613203018903732, + 0.03210777789354324, + -0.0036523675080388784, + 0.013589034788310528, + 0.03245271369814873, + 0.0019905671942979097, + -0.0366494320333004, + -0.014235789887607098, + -0.0008017063373699784, + -0.013574662618339062, + 0.007595774717628956, + -0.007315514143556356, + 0.003436782630160451, + 0.029434524476528168, + 0.010743314400315285, + -0.003641588380560279, + -0.00046216012560762465, + 0.003643384901806712, + -0.011792493984103203, + 0.00012441044964361936, + -0.00039613727130927145, + -0.0011946996673941612, + 0.031015481799840927, + -0.030411843210458755, + 0.03633324056863785, + 0.03811541199684143, + -0.0009683355456218123, + 0.020839873701334, + -0.04193845018744469, + 0.03348752111196518, + 0.0022259140387177467, + 0.0018558267038315535, + 0.020207490772008896, + -0.017936663702130318, + -0.019129566848278046, + 0.021041085943579674, + -0.007883220911026001, + -0.00297327502630651, + 0.03308509662747383, + -0.03782796487212181, + -0.04860720783472061, + 0.0029085995629429817, + -0.012051195837557316, + -0.00019200530368834734, + 0.0008133838418871164, + 0.042513344436883926, + -0.006582525558769703, + 0.011584095656871796, + 0.002576239639893174, + 0.0027990106027573347, + -0.002330113435164094, + 0.0018558267038315535, + -0.0006781941629014909, + -0.0016995276091620326, + 0.020250609144568443, + -0.007696380838751793, + 0.015708953142166138, + -0.02316819131374359, + -0.008091620169579983, + 0.01566583663225174, + 0.016930600628256798, + 0.018094759434461594, + -0.019891301169991493, + -0.01609700545668602, + -0.05320635437965393, + 0.01720367558300495, + -0.03187781944870949, + -0.030153142288327217, + -0.022578924894332886, + -0.0013734555104747415, + 0.012841673567891121, + -0.03483851999044418, + -0.00284751714207232, + 0.01810913160443306, + -0.0012207494582980871, + -0.0373680479824543, + -0.02946327067911625, + -0.006057935766875744, + -0.035988304764032364, + -0.003492475487291813, + -0.03251020237803459, + 0.006647201254963875, + 0.004031437449157238, + -0.010261841118335724, + 0.006474733352661133, + 0.03210777789354324, + 0.014020204544067383, + 0.0038410043343901634, + -0.021587233990430832, + -0.03118794970214367, + 0.007854476571083069, + 0.024993475526571274, + 0.0409611314535141, + 0.01602514460682869, + -0.03742554038763046, + 0.011397255584597588, + -0.002238489920273423, + -0.010067814961075783, + 0.040328748524188995, + -0.02503659389913082, + -0.0287015363574028, + -0.0016088023548945785, + 0.004904556553810835, + 0.03351626545190811, + -0.0005600716103799641, + -0.017491120845079422, + -0.008709629997611046, + -0.01609700545668602, + 0.02690499648451805, + 0.0062878928147256374, + 0.006758586503565311, + 0.025841442868113518, + 0.05145293101668358, + 0.0037403979804366827, + -0.02438983879983425, + 0.032855138182640076, + 0.013071631081402302, + -0.0011614636750891805, + -0.0001121153763961047, + -0.007408934645354748, + -0.0056052072905004025, + 0.009320453740656376, + 0.016140123829245567, + 0.01228833943605423, + -0.04561776667833328, + -0.029693227261304855, + -0.017994152382016182, + -0.020063769072294235, + 0.009564783424139023, + -0.0017058155499398708, + -0.025266550481319427, + -0.012108685448765755, + 0.011691887862980366, + -0.035269688814878464, + -0.029262056574225426, + 0.026416337117552757, + -0.006769366096705198, + -0.00031776315881870687, + 0.026603177189826965, + -0.011447558179497719, + 0.0025079711340367794, + 0.014199858531355858, + -0.04081740975379944, + -0.0013734555104747415, + 0.0123745733872056, + 0.026071401312947273, + -0.011311021633446217, + -0.03092924691736698, + -0.001334829838015139, + 0.003052322892472148, + -0.010441495105624199, + -0.010326516814529896, + 0.036994367837905884, + -0.04271455481648445, + -0.011253532022237778, + -0.022622043266892433, + -0.01445856038480997, + 0.003909273073077202, + -0.0013204575516283512, + 0.01463821530342102, + -0.026387592777609825, + 0.01993441767990589, + -0.014990337193012238, + -0.009370757266879082, + 0.017304280772805214, + 0.017361771315336227, + -0.027249932289123535, + 0.021457884460687637, + 0.021529745310544968, + -0.018957098945975304, + 0.005795640870928764, + -0.011770935729146004, + 0.03751177340745926, + -0.00046754974755458534, + 0.010010325349867344, + -0.036275751888751984, + 0.05631077662110329, + -0.02191779762506485, + -0.014307651668787003, + 0.005515380296856165, + 0.015119687654078007, + -0.014889730140566826, + -0.002003143075853586, + 0.01835346221923828, + 0.023484382778406143, + 2.3495385903515853e-05, + 0.02230585180222988, + -0.02862967550754547, + 0.0731263980269432, + 0.0008600939181633294, + 0.018310343846678734, + 0.04058745130896568, + -0.012992583215236664, + -0.023455636575818062, + -0.033717479556798935, + -0.0027181662153452635, + -0.021357277408242226, + 0.010189979337155819, + -0.025022221729159355, + 0.008867725729942322, + -0.011045132763683796, + -0.04716997593641281, + -0.03489600867033005, + 0.005766896065324545, + -0.005281830206513405, + 0.01455198135226965, + -0.038460347801446915, + 0.003212215146049857, + -1.771276947692968e-05, + 0.00894677359610796, + 0.007516726851463318, + -0.014731635339558125, + 0.05978887900710106, + 6.6703596530715e-06, + -0.007516726851463318, + -0.018195366486907005, + -0.005375250242650509, + -0.03633324056863785, + 0.017146185040473938, + -0.026172006502747536, + -0.06208845227956772, + 0.03411990404129028, + -0.010685824789106846, + 0.010182793252170086, + -0.022004032507538795, + 0.004793170839548111, + -0.013984274119138718, + -0.0008268579258583486, + 0.006862786132842302, + 0.001845047459937632, + -0.031015481799840927, + 0.02108420431613922, + 0.0022115418687462807, + 0.012762626633048058, + -0.012856046669185162, + 0.017131812870502472, + 0.03075677901506424, + -0.004897370468825102, + 0.023843690752983093, + 0.032423969358205795, + 0.02582707069814205, + -0.04581897705793381, + 2.122163823514711e-05, + 0.02977946028113365, + -0.020308097824454308, + -0.01140444166958332, + -0.05047561228275299, + -0.041047364473342896, + 0.01691622845828533, + 0.0459914468228817, + -0.044065553694963455, + -0.005845943931490183, + 0.0020750046242028475, + -0.00022456760052591562, + -0.035729605704545975, + -0.0016510210698470473, + -0.03383245691657066, + -0.034263625741004944, + -0.007617333438247442, + -0.026861878111958504, + 0.013775874860584736, + -0.017289908602833748, + -0.012906349264085293, + 0.02069615013897419, + -0.03843160346150398, + 0.04849223047494888, + -0.031532883644104004, + -0.027278676629066467, + -0.006327416747808456, + 0.013732758350670338, + 0.02594204992055893, + 0.03216526657342911, + 0.01774982362985611, + -0.056885670870542526, + 0.0009584545623511076, + 0.0051345136016607285, + 0.01767796277999878, + -0.06369815021753311, + -0.02349875494837761, + -0.013711200095713139, + 0.012281153351068497, + -0.020379958674311638, + -0.007157418876886368, + 0.018885238096117973, + -0.01412081066519022, + -0.035873327404260635, + -0.005486635956913233, + -0.02781045250594616, + 0.0595589205622673, + 0.03064180165529251, + 0.031101714819669724, + -0.03337254375219345, + -0.010621149092912674, + 0.018008526414632797, + 0.010103745386004448, + 0.020178746432065964, + -0.0069310544058680534, + -0.03857532516121864, + 0.008795863948762417, + 0.023699967190623283, + 0.01703120768070221, + -0.011857169680297375, + -0.01287760492414236, + -0.01731865294277668, + -0.026631921529769897, + -0.04280078783631325, + 0.017002463340759277, + -0.01312912069261074, + -0.004886591341346502, + -0.02266515977680683, + -0.046365126967430115, + 0.001954636536538601, + 0.00758140254765749, + -0.008565906435251236, + -0.033430032432079315, + 0.02237771265208721, + 0.003564337035641074, + -0.019589481875300407, + -0.0337749682366848, + -0.016326963901519775, + -0.01153379213064909, + 0.024763518944382668, + -0.016226356849074364, + -0.0038805282674729824, + 0.05573588237166405, + -0.07416120916604996, + -0.0007612842018716037, + -0.01501908153295517, + -0.03791419789195061, + 0.017548611387610435, + -0.01516280509531498, + 0.03613203018903732, + -0.019876927137374878, + -0.05234401300549507, + -0.0038014804013073444, + -0.06318075209856033, + 0.0012827301397919655, + 0.009974394924938679, + -0.0222339890897274, + 0.0009584545623511076, + -0.02977946028113365, + 0.0013527952833101153, + 0.003294855821877718, + -0.011167298071086407, + 0.04386433959007263, + 0.004002693109214306, + 0.006453174632042646, + 0.016010772436857224, + 0.08502668887376785, + 0.01806601509451866, + 0.01117448415607214, + 0.005996853578835726, + -0.019057705998420715, + -0.026631921529769897, + 0.0017372550209984183, + -0.0054794494062662125, + 0.016571292653679848, + 0.03046933375298977, + 0.021098576486110687, + -0.02129978872835636, + -0.03618951886892319, + -0.0010473832953721285, + 0.007355038076639175, + -0.011921845376491547, + 0.009888160973787308, + -0.06398560106754303, + 0.001176734222099185, + 0.013833364471793175, + -0.018525930121541023, + -0.03236648067831993, + 0.07663324475288391, + 0.04906712472438812, + -0.015867048874497414, + -0.016829995438456535, + -0.022075893357396126, + 0.025410274043679237, + -0.008652140386402607, + 0.023872435092926025, + 0.04558902233839035, + 0.00459914468228817, + -0.005598021205514669, + 0.027580495923757553, + -0.000665169267449528, + -0.024634167551994324, + -0.0005623172619380057, + -0.017907919362187386, + -0.01670064404606819, + -0.0015126874204725027, + -0.011461930349469185, + 0.015478995628654957, + -0.006920275278389454, + 0.0265456885099411, + -0.006129797548055649, + -0.01081517618149519, + 0.023728711530566216, + -0.00582079216837883, + 0.02776733599603176, + -0.039897579699754715, + -0.03575835004448891, + 0.006474733352661133, + -0.014278906397521496, + -0.00022355705732479692, + -0.0025439017917960882, + 0.003524813102558255, + -0.015708953142166138, + 0.004132044035941362, + 0.004254208877682686, + -0.014760379679501057, + -0.04576148837804794, + 0.006262741517275572, + 0.040759917348623276, + -0.01228833943605423, + -0.03245271369814873, + 0.017663588747382164, + 0.02436109445989132, + 0.01993441767990589, + 0.02931954711675644, + -0.041449788957834244, + 0.004383559804409742, + -0.009888160973787308, + 0.02781045250594616, + 0.005443518981337547, + 0.026991229504346848, + 0.01020435243844986, + 0.02242082916200161, + 0.019244546070694923, + -0.02464853972196579, + 0.0008780593634583056, + -0.02773859165608883, + -0.00704962620511651, + 0.004591958597302437, + 0.0028834480326622725, + 0.03621826320886612, + -0.009342011995613575, + 0.0035122374538332224, + -0.01856904663145542, + 0.012712323106825352, + 0.005411181133240461, + -0.010283399373292923, + 0.036591943353414536, + 0.0015513129765167832, + -0.020178746432065964, + -0.006769366096705198, + -0.011562536470592022, + 0.014178300276398659, + -0.024404210969805717, + -0.020724894478917122, + -0.008364694193005562, + -0.015177177265286446, + -0.008953959681093693, + -0.030268119648098946, + 0.0215584896504879, + -0.00817066803574562, + 0.006352568510919809, + -0.02457667887210846, + 0.009945650584995747, + 0.018640907481312752, + -0.020379958674311638, + 0.020638661459088326, + -0.029089588671922684, + 0.02539590187370777, + 0.02633010223507881, + 0.006873565260320902, + 0.035585880279541016, + -0.011814052239060402, + 0.028543440625071526, + -0.004052996169775724, + 0.00297686830163002, + -0.00657533947378397, + -0.006722656078636646, + 0.013330332934856415, + 0.029578248038887978, + -0.03202154487371445, + -0.001377048552967608, + 0.0006296875653788447, + 0.05151041969656944, + -0.0016573088942095637, + 0.01892835460603237, + 0.015996400266885757, + 0.003909273073077202, + -0.03239522501826286, + 0.019531991332769394, + 0.0001857174065662548, + -0.04498538374900818, + 0.025568369776010513, + -0.015867048874497414, + 0.03909273073077202, + -0.007559843827039003, + 0.000790927093476057, + -0.0240736473351717, + -0.003397258697077632, + -0.017117440700531006, + 0.025352785363793373, + 0.027422400191426277, + -0.027508633211255074, + 0.056885670870542526, + -0.022751392796635628, + 0.012108685448765755, + -0.034579817205667496, + -0.02324005216360092, + -0.005296202376484871, + -0.031561627984046936, + 0.010089373216032982, + 0.020423077046871185, + -0.002152255969122052, + -0.014271720312535763, + 0.012604530900716782, + 0.01997753418982029, + -0.017692334949970245, + 0.007283176761120558, + -0.03308509662747383, + -0.010197165422141552, + -0.02338377572596073, + 0.00545070506632328, + -0.0036218264140188694, + -0.03532717749476433, + -0.03480977565050125, + -0.06013381481170654, + -0.030239375308156013, + -0.0294201523065567, + -0.024777891114354134, + 0.05036063492298126, + 0.02198966033756733, + 0.013725572265684605, + -0.020308097824454308, + -0.009924091398715973, + -0.0437493622303009, + 0.03167660906910896, + 0.00804850272834301, + -0.0279829204082489, + -0.033142585307359695, + 0.022507064044475555, + 0.011706260032951832, + 0.008616209961473942, + 0.03863281384110451, + 0.011857169680297375, + 0.023326287046074867, + 0.03046933375298977, + -0.005928584840148687, + -0.01002469751983881, + 0.02737928181886673, + -0.04570399969816208, + 0.0028600930236279964, + -0.010599590837955475, + -0.018008526414632797, + -0.015910165384411812, + -0.011972147971391678, + -0.02237771265208721, + -0.0233550313860178, + 0.005914212670177221, + -0.01304288674145937, + -0.019991906359791756, + 0.030124396085739136, + 0.0020929700694978237, + 0.0329701192677021, + -0.0029175824020057917, + -0.007811359595507383, + -0.015090943314135075, + -0.025597114115953445, + 0.018669651821255684, + -0.02367122285068035, + -0.031245438382029533, + -0.013452498242259026, + -0.013955529779195786, + 0.012511110864579678, + 0.02417425438761711, + 0.019158311188220978, + 0.02781045250594616, + 0.01248236559331417, + 0.015191549435257912, + -0.00909049715846777, + -0.0002957555407192558, + -0.0502169094979763, + 0.04487040266394615, + -0.03179158642888069, + -0.0233119148761034, + -0.015680208802223206, + -0.019891301169991493, + 0.005389622412621975, + 0.015795188024640083, + 0.02306758426129818, + 0.008364694193005562, + -0.033430032432079315, + 0.01979069411754608, + 0.01911519467830658, + -0.052430249750614166, + 0.007674822583794594, + -0.03912147507071495, + -0.012115871533751488, + -0.021544117480516434, + 0.006126204505562782, + -0.0031044224742799997, + -0.05202782154083252, + -0.03092924691736698, + -0.00855153426527977, + 0.011828425340354443, + 0.031532883644104004, + 0.0002721759374253452, + 0.010836734436452389, + -0.014142369851469994, + 0.017002463340759277, + -0.034004926681518555, + 0.01243206299841404, + -0.05358003452420235, + -0.03288388252258301, + -0.005924991797655821, + -0.020638661459088326, + -0.004308104980736971, + -0.02069615013897419, + -0.02862967550754547, + 0.01997753418982029, + -0.0007419713656418025, + 0.014537608250975609, + -0.0047033438459038734, + 0.020926108583807945, + -0.03205028921365738, + 0.015263411216437817, + -0.016657527536153793, + -0.0003718839434441179, + -0.008041316643357277, + 0.009658203460276127, + -0.03782796487212181, + -0.018152248114347458, + 0.055132243782281876, + -0.01703120768070221, + 0.048635952174663544, + 0.02055242657661438, + 0.0026552872732281685, + -0.009004263207316399, + 0.00791915226727724, + -0.025553997606039047, + 0.009694134816527367, + -0.015507740899920464, + 0.01835346221923828, + 0.007495168596506119, + -0.007358631119132042, + -0.015220293775200844, + 0.02776733599603176, + 0.007897594012320042, + 0.0008515603840351105, + -0.025783954188227654, + -0.0013285420136526227, + 0.005562090314924717, + 0.0182815995067358, + -0.0024522782769054174, + -0.018295971676707268, + 0.001537838950753212, + 0.002777452114969492, + 0.0330563522875309, + -0.01681562326848507, + -0.01785043068230152, + 0.03825913369655609, + -0.058150433003902435, + -0.01106669194996357, + -0.011957775801420212, + -0.004056589212268591, + -0.005874688737094402, + 0.05386748164892197, + -0.002772062551230192, + 0.008724002167582512, + -0.03374622389674187, + -0.006715469527989626, + -0.012151801958680153, + 0.013617780059576035, + -0.02234896831214428, + -0.015090943314135075, + -0.005041093565523624, + -0.015263411216437817, + -0.003109812270849943, + 0.022435201331973076, + -0.006111831869930029, + 0.015565229579806328, + -0.0143507681787014, + 0.0037152464501559734, + 0.010470240376889706, + -0.0005712999845854938, + -0.0040278444066643715, + -0.008501231670379639, + -0.023369403555989265, + -0.015349645167589188, + -0.013474056497216225, + -0.007423306815326214, + -0.02781045250594616, + -0.013876481913030148, + 0.02119918167591095, + -0.0032768906094133854, + -0.019819438457489014, + -0.04222589731216431, + -0.004369187168776989, + -0.024734774604439735, + 0.009931277483701706, + -0.007229280192404985, + -0.01251829694956541, + -0.00011554003140190616, + -0.00024994375417008996, + -0.0012530871899798512, + -0.013071631081402302, + -0.034436095505952835, + -0.0005367166013456881, + 0.0226364154368639, + 0.0011309224646538496, + 0.02719244174659252, + 0.02438983879983425, + -0.02589893341064453, + 0.018842119723558426, + 0.020825501531362534, + 0.0019438571762293577, + 0.015680208802223206, + 0.023153819143772125, + 0.01634133607149124, + -0.009794740937650204, + 0.026028282940387726, + 0.010836734436452389, + 0.018942726776003838, + -0.00631304457783699, + -0.02781045250594616, + 0.042484596371650696, + -0.012654833495616913, + 0.017663588747382164, + 0.001915112603455782, + -0.021472256630659103, + -0.007890406996011734, + 0.018727142363786697, + -0.005885467864573002, + 0.0010375023121014237, + 0.02428923174738884, + -0.03923645243048668, + -0.03216526657342911, + 0.006154948845505714, + -0.01983381062746048, + -0.02903209999203682, + 0.018267227336764336, + 0.006259148474782705, + 0.021026713773608208, + -0.0091623580083251, + -0.04788859188556671, + 0.03541341423988342, + 0.009780368767678738, + 0.0344073511660099, + 0.01426453422755003, + -0.020969225093722343, + -0.034263625741004944, + 0.007373003754764795, + -0.043921831995248795, + -0.011454744264483452, + 0.042197152972221375, + 0.0168874841183424, + 0.015478995628654957, + -0.004818322602659464, + -0.00011408034333726391, + 0.00880305003374815, + -0.0027828416787087917, + 0.031015481799840927, + 0.01724679209291935, + 0.03998381271958351, + 0.028141016140580177, + 0.025783954188227654, + 0.01914393901824951, + -0.036735668778419495, + 0.0030110024381428957, + -0.009629459120333195, + -0.005051872693002224, + 0.04639387130737305, + 0.014544794335961342, + -0.007495168596506119, + 0.048377253115177155, + 0.007365817669779062, + 0.0019510433776304126, + 0.002834941493347287, + 0.02931954711675644, + 0.004070961382240057, + 0.0280260369181633, + 0.017448004335165024, + 0.0026534907519817352, + 0.01979069411754608, + -0.044209275394678116, + 0.03294137120246887, + 0.0011399051873013377, + 0.0265888050198555, + -0.03423488140106201, + -0.0020372772123664618, + -0.021242298185825348, + 0.015924537554383278, + 0.006154948845505714, + -0.015407134778797626, + -0.03167660906910896, + -0.0008618904976174235, + -0.029434524476528168, + -0.0036469779442995787, + 0.018454067409038544, + -0.00944980513304472, + -0.019560737535357475, + -0.004746460821479559, + -0.04489915072917938, + 0.006018411833792925, + -0.02194654382765293, + -0.03794294223189354, + 0.016729388386011124, + -0.02719244174659252, + 9.059899639396463e-06, + 0.009528852999210358, + 0.01624072901904583, + -0.01474600750952959, + -0.024547934532165527, + -0.03420613706111908, + -0.015507740899920464, + 0.02148662880063057, + 0.0028690756298601627, + -0.012194919399917126, + 0.00679811043664813, + -0.02622949704527855, + -0.002145069884136319, + -0.032567691057920456, + 0.0062878928147256374, + -0.023081956431269646, + 0.01273388136178255, + -0.014322023838758469, + 0.009974394924938679, + -0.04142104461789131, + -0.011612839996814728, + 0.014760379679501057, + 0.024131136015057564, + -0.022507064044475555, + 0.012022451497614384, + -0.004157195333391428, + -0.018640907481312752, + 0.0011228380026295781, + -0.013466870412230492, + -0.029218940064311028, + -0.002078597666695714, + -0.02898898348212242, + -0.03360249847173691, + 0.008853353559970856, + 0.0029624958988279104, + -0.02446169964969158, + 0.007473609875887632, + -0.016643155366182327, + -0.00533572630956769, + 0.0013608797453343868, + -0.02927643060684204, + -0.027364909648895264, + 0.0033002456184476614, + 3.435884354985319e-05, + 0.013768688775599003, + 0.008429369889199734, + 0.00409611314535141, + 0.021860308945178986, + -0.0020336841698735952, + 0.007588588632643223, + -0.03219401091337204, + -0.03409115970134735, + -0.00780417351052165, + -0.006560967303812504, + -0.012065568007528782, + -0.0029463269747793674, + -0.01648505963385105, + 0.012848860584199429, + -0.016298217698931694, + -0.029233312234282494, + 0.013624966144561768, + 0.031245438382029533, + -0.023728711530566216, + 0.01645631343126297, + -0.034292370080947876, + -0.008889283984899521, + -0.0032535353675484657, + -0.019100822508335114, + -0.03409115970134735, + 0.02608577348291874, + -0.019014587625861168, + 0.03288388252258301, + -0.005770489107817411, + -0.00029081504908390343, + 0.0071897562593221664, + 0.011167298071086407, + 0.013337519019842148, + 0.001416572486050427, + -0.01354591827839613, + -0.0016411400865763426, + 0.011483489535748959, + -0.023455636575818062, + -0.015723325312137604, + 0.02737928181886673, + 0.013143492862582207, + -0.012604530900716782, + 0.0233550313860178, + 0.024346722289919853, + -0.025712093338370323, + ], + "index": 97, + }, + { + "title": "Bob Wilson (footballer, born 1941)", + "text": 'Robert "Bob" Primrose Wilson OBE (born 30 October 1941 in Chesterfield, England) is a former Scotland international football goalkeeper and later broadcaster and is noted for creating the charity the Willow FoundationAs a player, Wilson is most noted for his career at Arsenal between 1963 and 1974. He made over 300 appearances for Arsenal and two appearances for Scotland.', + "vector": [ + 0.02003723941743374, + 0.005079223774373531, + -0.02599387988448143, + 0.01989741250872612, + 0.011102280579507351, + -0.005596584174782038, + -0.007173136342316866, + -0.014737788587808609, + 0.001047830213792622, + 0.08288957178592682, + -0.02238633669912815, + 0.028832372277975082, + -0.011864339001476765, + 0.03154502063989639, + -0.0036669687833637, + 0.04709380492568016, + 0.005110684782266617, + 0.03769741579890251, + -0.03450935706496239, + -0.06040535867214203, + 0.02656717039644718, + -0.022358370944857597, + -0.016583507880568504, + 0.00018330474267713726, + 0.025085002183914185, + 0.03017471358180046, + 0.020191049203276634, + 0.01304587908089161, + 0.0006217941408976912, + -0.013835903257131577, + 0.021295685321092606, + 0.020554600283503532, + 0.010389162227511406, + 0.0019156328635290265, + -0.006851533427834511, + -0.002890927717089653, + -0.01696104183793068, + -0.018037710338830948, + -0.004261234309524298, + 0.022638026624917984, + -0.007606600411236286, + 0.009207622148096561, + 0.031489089131355286, + -0.02149144373834133, + -0.005628045182675123, + 0.009046820923686028, + -0.026427343487739563, + 0.021169841289520264, + -0.025532448664307594, + 0.0023403579834848642, + 0.04723363369703293, + -0.050981003791093826, + 0.030118782073259354, + 0.08115571737289429, + 0.013136766850948334, + -0.0319644995033741, + -0.01580047607421875, + 0.041276995092630386, + 0.035711869597435, + -0.036830488592386246, + 0.029447611421346664, + -0.06113245710730553, + 0.015646666288375854, + -0.011857347562909126, + 0.021351614966988564, + -0.003427514573559165, + 0.03512459620833397, + -0.010333231650292873, + -0.06762044131755829, + 0.0001246428582817316, + 0.0046177939511835575, + 0.024413831532001495, + 0.030146747827529907, + 0.0060335444286465645, + -0.02020503208041191, + 0.036438971757888794, + 0.06292224675416946, + -0.012738259509205818, + 0.02270793914794922, + 0.023043524473905563, + -0.002567577175796032, + -0.007319954689592123, + -0.024917209520936012, + -0.01086457446217537, + -0.04038209840655327, + -0.02100204862654209, + -0.0036215248983353376, + -0.06146804243326187, + 0.017072902992367744, + 0.027797650545835495, + -0.013374472968280315, + 0.05204369127750397, + 0.01280118152499199, + -0.02568626031279564, + -0.014947528950870037, + -0.01677926629781723, + -0.03548814728856087, + -0.01981351710855961, + 0.015772510319948196, + -0.00892796739935875, + -0.023518936708569527, + -0.003285939572378993, + -0.01497549470514059, + 0.005044266581535339, + -0.015017443336546421, + -0.021211788058280945, + 0.020806290209293365, + -0.011095289140939713, + 0.02750401385128498, + -0.004761116579174995, + 0.03000692091882229, + 0.01571657881140709, + -0.02835696004331112, + 0.032244157046079636, + -0.04519215598702431, + 0.020624514669179916, + 0.00885805394500494, + -0.014220427721738815, + -0.04041006416082382, + 0.00442902697250247, + -0.0035603505093604326, + -0.02662310190498829, + -0.01610809564590454, + -0.03506866469979286, + 0.01633181795477867, + -0.029671335592865944, + -0.015828439965844154, + 0.006393599323928356, + -0.0003165775560773909, + 0.002829753328114748, + -0.022232526913285255, + -0.016933076083660126, + -0.05086914077401161, + 0.04152868315577507, + -0.05047762393951416, + 0.0447726733982563, + -0.01508735679090023, + 0.015688613057136536, + 0.049750521779060364, + 0.029084060341119766, + 0.01620597392320633, + 4.1948165744543076e-05, + 0.047289565205574036, + 0.0902724489569664, + 0.011332996189594269, + -0.05176403373479843, + 0.019114380702376366, + 7.805199129506946e-05, + 0.0030534768011420965, + 0.00983684416860342, + -0.017869917675852776, + 0.003705421229824424, + 0.0026357430033385754, + 0.032328050583601, + -0.002307149115949869, + -0.03993465378880501, + -0.024959158152341843, + -0.04421336576342583, + 0.005841281730681658, + 0.016947058960795403, + -0.014737788587808609, + -0.0016709351912140846, + -0.0003089307574555278, + 0.019240224733948708, + -0.03529239073395729, + -0.0009281031670980155, + -0.01399670448154211, + 0.007236058358103037, + 0.04798870161175728, + 0.016569525003433228, + -0.014402203261852264, + -0.0031181469094008207, + 0.00455137575045228, + 0.012961982749402523, + -0.020232997834682465, + 0.0017102615674957633, + -0.06454424560070038, + -0.00599858770146966, + 0.010109507478773594, + -0.0030150243546813726, + -0.01985546387732029, + -0.033222947269678116, + -0.01594030298292637, + -0.022190578281879425, + -0.016667403280735016, + -0.019463948905467987, + 0.028720509260892868, + -0.005477731116116047, + 0.006519443821161985, + -0.03579576686024666, + 0.026553187519311905, + 0.019394034519791603, + 0.008158917538821697, + -0.0406058244407177, + 0.036914385855197906, + 0.01462592650204897, + 0.006190849933773279, + -0.041864268481731415, + 0.007795367389917374, + -0.012269837781786919, + 0.05380551144480705, + 0.04491250216960907, + 0.01647164672613144, + -0.016975024715065956, + 0.003023763420060277, + 0.041332926601171494, + 0.0138219203799963, + 0.013786963187158108, + -0.01861100271344185, + -0.01726866140961647, + 0.0380050353705883, + 0.008130952715873718, + -0.03165687993168831, + 0.05056152120232582, + 0.01780000515282154, + -0.005739907268434763, + -0.014122548513114452, + 0.03400597721338272, + -0.008319719694554806, + 0.020988065749406815, + 0.00020668210345320404, + 0.014346272684633732, + -0.017646195366978645, + -0.007487747352570295, + -0.01931013911962509, + 0.031321294605731964, + -0.032300084829330444, + 0.0010513258166611195, + 0.020540617406368256, + 0.0010172430193051696, + -0.03512459620833397, + 0.030734021216630936, + -0.008515477180480957, + 0.028832372277975082, + 0.0058307950384914875, + 0.05053355544805527, + 0.03711014240980148, + -0.03537628427147865, + 0.006330677308142185, + -0.012025140225887299, + 0.02323928289115429, + 0.012332760728895664, + -0.033139050006866455, + -0.06336969137191772, + 0.0372220054268837, + 0.02020503208041191, + -0.024623572826385498, + 0.015786493197083473, + -0.05545547232031822, + -0.009410372003912926, + 0.05070134997367859, + 0.0059111956506967545, + -0.006956404075026512, + -0.013675102032721043, + -0.019575810059905052, + -0.035851698368787766, + -0.005572114605456591, + 0.04376591742038727, + 0.04301084950566292, + 0.01571657881140709, + -0.07589821517467499, + -0.01395475585013628, + 0.01883472502231598, + 0.06734078377485275, + -0.06443238258361816, + -0.017016971483826637, + -0.060069773346185684, + -0.011207151226699352, + 0.023267248645424843, + -0.03862027823925018, + 0.01682121306657791, + 0.003375079482793808, + 0.031097572296857834, + 0.01714281737804413, + -0.030482333153486252, + -0.02319733425974846, + -0.01406661793589592, + 0.015171253122389317, + -0.018331347033381462, + -0.0003611474821809679, + 0.02358885109424591, + -0.03210432827472687, + 0.02172914892435074, + -0.053973305970430374, + -0.006596348714083433, + -0.022693956270813942, + -0.003235252108424902, + 0.02768578939139843, + 0.0031618429347872734, + -0.01931013911962509, + -0.037054210901260376, + 0.07863882929086685, + 0.009927731938660145, + 0.03375428915023804, + 0.04910731688141823, + -0.004914926830679178, + 0.006627810187637806, + -0.02242828533053398, + 0.012283820658922195, + 0.03392208367586136, + 0.0030167722143232822, + 0.014919564127922058, + -0.03820079565048218, + -0.06281038373708725, + -0.04242357611656189, + -0.030817918479442596, + -0.005844777449965477, + -0.002476689638569951, + 0.03339073807001114, + -0.009270544163882732, + -0.07930999994277954, + -0.034956805408000946, + -0.020023256540298462, + -0.0010137473000213504, + 0.032383982092142105, + 0.030817918479442596, + 0.02007918804883957, + 0.002868205774575472, + -0.03543221578001976, + 0.03341870382428169, + -0.01388484239578247, + 0.025406604632735252, + -0.0586715005338192, + -0.004079458769410849, + 0.03624321520328522, + -0.053749579936265945, + 0.010633859783411026, + -0.0197575856000185, + -0.026357430964708328, + -0.031125538051128387, + -0.01633181795477867, + -0.05738509073853493, + 0.014052635058760643, + 0.023295214399695396, + 0.02666505053639412, + 0.007134683430194855, + -0.031852640211582184, + 0.056322403252124786, + -0.072262704372406, + 0.012989948503673077, + 0.030482333153486252, + 0.009927731938660145, + -0.026553187519311905, + -0.018093641847372055, + -0.05777660384774208, + -0.01757628098130226, + 0.07612193375825882, + -0.04927511140704155, + -0.026818860322237015, + -0.04144478589296341, + 0.0006436421535909176, + 0.03339073807001114, + 0.060908734798431396, + 0.03702624514698982, + -0.018093641847372055, + -0.0038242742884904146, + 0.016947058960795403, + -0.03350260108709335, + 0.011053341440856457, + -0.056602057069540024, + 0.005809820722788572, + 0.011053341440856457, + -0.00017817046318668872, + 0.022540146484971046, + -0.012871094979345798, + -0.003205538960173726, + 0.036215249449014664, + -0.03176874294877052, + -0.0074318163096904755, + -0.030286574736237526, + 0.013982721604406834, + 0.0027336219791322947, + -0.0011640615994110703, + 0.029279818758368492, + 0.026147689670324326, + 0.02136559784412384, + -0.03241194784641266, + -0.04463284835219383, + -0.014821684919297695, + -0.005834290757775307, + -0.04854800924658775, + -0.003546367632225156, + -0.03355853259563446, + -0.008019090630114079, + -0.001001512398943305, + -0.042311716824769974, + -0.006134918890893459, + -0.05100896954536438, + 0.03235601633787155, + 0.022554129362106323, + 0.015926320105791092, + 0.045387912541627884, + -0.005460252519696951, + -0.08233026415109634, + -0.010200395248830318, + -0.019729619845747948, + 0.0017967796884477139, + 0.021757114678621292, + 0.033055152744054794, + -0.010920505039393902, + 0.0018701889785006642, + 0.007071761414408684, + -0.022232526913285255, + -0.011416892521083355, + 0.013304559513926506, + -0.018233468756079674, + -0.024246038869023323, + -0.017100868746638298, + 0.01887667365372181, + 0.02358885109424591, + 0.005505696404725313, + 0.046142980456352234, + -0.035991523414850235, + -0.06062908098101616, + 0.025490501895546913, + 0.001368558849208057, + 0.0043800873681902885, + -0.013765988871455193, + 0.020988065749406815, + -0.015325062908232212, + -0.013430403545498848, + -0.012528518214821815, + 0.02554643154144287, + 0.005019797012209892, + 0.014905581250786781, + 0.02554643154144287, + 0.029475577175617218, + 0.06219514459371567, + -0.005925178062170744, + -0.00938939768821001, + -0.04910731688141823, + 0.014695839956402779, + -0.010277300141751766, + 0.018932605162262917, + -0.020484687760472298, + -0.0481564924120903, + -0.08434377610683441, + -0.010710764676332474, + 0.004114415962249041, + 0.005309938453137875, + 0.025448553264141083, + 0.07405249029397964, + -0.0013327281922101974, + -0.027224358171224594, + -0.028384923934936523, + -0.0019663202110677958, + 0.00872521847486496, + 0.045387912541627884, + 0.008774157613515854, + 0.03610338643193245, + 0.0010618128580972552, + -0.0051456415094435215, + 0.009445328265428543, + 0.01798178069293499, + -0.02911202609539032, + -0.05212758481502533, + 0.06325783580541611, + 0.012885077856481075, + -0.039095688611269, + 0.032300084829330444, + -0.05514785274863243, + 0.012745250947773457, + 0.049163248389959335, + 0.007788375951349735, + -0.01745043694972992, + 0.006617323029786348, + 0.0009420858696103096, + -0.02177109755575657, + -0.0013003931380808353, + -0.023449024185538292, + -0.020904168486595154, + 0.0349847674369812, + -0.04505232721567154, + 0.00808201264590025, + -0.00825679674744606, + -0.0195478443056345, + 0.005142145790159702, + -0.018792778253555298, + 0.045331984758377075, + -0.030678091570734978, + 0.03551611304283142, + -0.036522869020700455, + -0.042926955968141556, + 0.0018911630613729358, + 0.0670052021741867, + -0.012067088857293129, + -0.050142038613557816, + -0.029056094586849213, + 0.012234881520271301, + -0.004893952514976263, + 0.02030291222035885, + 0.012724276632070541, + -0.02862263098359108, + 0.030202679336071014, + 0.013807937502861023, + -0.01085758302360773, + -0.009724983014166355, + 0.002553594531491399, + 0.024861278012394905, + 0.023742660880088806, + 0.028287045657634735, + -0.006938925478607416, + 0.013982721604406834, + 0.028077304363250732, + 0.035460181534290314, + -0.0100605683401227, + 0.013276593759655952, + 0.06868312507867813, + 0.009578164666891098, + 0.042619336396455765, + 0.01606614701449871, + -0.0016482132486999035, + -0.0083686588332057, + -0.015213200822472572, + -0.019505895674228668, + -0.03912365436553955, + -0.02030291222035885, + -0.028301028534770012, + 0.023071490228176117, + 0.006099962163716555, + -0.014262376353144646, + 0.023602833971381187, + -0.001861449796706438, + 0.06991361081600189, + 0.03263567015528679, + 0.015143287368118763, + 0.013542265631258488, + -0.004771603737026453, + -0.09066396951675415, + -0.015492855571210384, + -0.009424353949725628, + 0.028077304363250732, + 0.02852475270628929, + -0.016709351912140846, + -0.024497728794813156, + 0.021113909780979156, + 0.026245567947626114, + 0.028832372277975082, + 0.012500553391873837, + 0.024469763040542603, + 0.050365764647722244, + -0.016989005729556084, + 0.010410136543214321, + -0.044716741889715195, + -0.012982957065105438, + 0.0020135119557380676, + -0.0032789481338113546, + -0.004103928804397583, + -0.03492883965373039, + -0.028860338032245636, + -0.03529239073395729, + 0.011130246333777905, + 0.007103222422301769, + 0.017212729901075363, + 0.04124902933835983, + -0.0002529998600948602, + -0.04793277010321617, + -0.02199482172727585, + -0.014821684919297695, + -0.014723805710673332, + 0.032244157046079636, + 0.0007485125679522753, + -0.023337163031101227, + 0.00994870625436306, + 0.031181469559669495, + 0.03733386471867561, + -0.01949191465973854, + 0.022889714688062668, + -0.034481391310691833, + 0.00697737792506814, + -0.011277064681053162, + -0.00934744905680418, + 0.029084060341119766, + 0.007858289405703545, + -0.053078409284353256, + -0.0030062850564718246, + 0.031181469559669495, + 0.012046114541590214, + 0.0021603305358439684, + -0.020023256540298462, + 0.014793719165027142, + -0.024413831532001495, + 0.0009045072947628796, + -0.0267069973051548, + -0.00200302479788661, + -0.00685502914711833, + 0.012724276632070541, + 0.011312021873891354, + -0.019338103011250496, + -0.04169647395610809, + -0.01195522677153349, + -0.03610338643193245, + 0.004684211686253548, + 0.011444857344031334, + 0.03476104512810707, + 0.005037275608628988, + 0.01075271237641573, + 0.019394034519791603, + -0.006858524866402149, + 0.006288729142397642, + 0.0030779466032981873, + -0.010941479355096817, + -0.016681386157870293, + 0.024917209520936012, + 0.0001365500211250037, + 0.0015957780415192246, + -0.014807702042162418, + 0.02964336983859539, + -0.019156329333782196, + -0.017702125012874603, + 0.007264023646712303, + 0.016947058960795403, + -0.028105270117521286, + 0.020484687760472298, + 0.025350674986839294, + -0.014793719165027142, + -0.04144478589296341, + 0.027294272556900978, + 0.018932605162262917, + -0.002623508218675852, + -0.022721922025084496, + -0.0300908163189888, + -0.01132600475102663, + 0.016499610617756844, + 0.04348626360297203, + -0.01557675190269947, + 0.015255149453878403, + -0.06197142228484154, + 0.005100197624415159, + 0.009822862222790718, + 0.041193097829818726, + -0.008445563726127148, + -0.020177066326141357, + -0.015297097153961658, + 0.010584920644760132, + -0.0010784174082800746, + 0.06079687178134918, + -0.026720980182290077, + 0.02105797827243805, + -0.023518936708569527, + 0.019352085888385773, + 0.016191991046071053, + -0.009731974452733994, + -0.0026497256476432085, + -0.02185499295592308, + 0.007718462496995926, + 0.006215319503098726, + -0.018009744584560394, + 0.0028856841381639242, + -0.024134177714586258, + -0.10397551953792572, + -0.03227212280035019, + 0.021337632089853287, + -0.007424825336784124, + 0.01315074972808361, + 0.020624514669179916, + 0.028021374717354774, + -0.0008616851991973817, + -0.017995761707425117, + -0.0018894152017310262, + -0.022498199716210365, + 0.04015837609767914, + 0.011060332879424095, + 0.02613370679318905, + -0.009906758554279804, + 0.010473058559000492, + -0.02732223831117153, + 0.011011392809450626, + 0.06560692936182022, + 0.03202043101191521, + 0.009193639270961285, + -0.0017382270889356732, + -0.02065248042345047, + -0.0045758457854390144, + 0.016038181260228157, + 0.013528282754123211, + -0.029056094586849213, + -0.0003574333095457405, + 0.05447668209671974, + 0.003971092868596315, + -0.016261905431747437, + -0.02465153858065605, + -0.0007174884085543454, + -0.031321294605731964, + 0.03635507449507713, + -0.008270779624581337, + -0.015283114276826382, + 0.031237399205565453, + 0.0032702090684324503, + 0.02648327499628067, + 0.0016508350381627679, + -0.018261434510350227, + 0.011235116980969906, + -0.04203205928206444, + 0.0238964706659317, + 0.030286574736237526, + -0.01322066318243742, + -0.023756643757224083, + -0.03464918211102486, + 0.010899531655013561, + -0.005631540901958942, + 0.019785551354289055, + -0.0017950318288058043, + -0.02007918804883957, + -0.00878814049065113, + 0.011319013312458992, + -0.003046485362574458, + -0.012954991310834885, + 0.012598431669175625, + 0.0031653386540710926, + -0.013828911818563938, + 0.024287987500429153, + -0.05109286308288574, + -0.002924136584624648, + 0.0319644995033741, + -0.01602419838309288, + 0.014255384914577007, + 0.01333252526819706, + 0.006019561551511288, + 0.03797707334160805, + -0.01266135461628437, + 0.006026552990078926, + -0.014989477582275867, + -0.0009237335179932415, + 0.02185499295592308, + 0.021799063310027122, + 0.010703773237764835, + -0.03845248371362686, + -0.02919592335820198, + -0.003497428260743618, + 0.0010521997464820743, + 0.025532448664307594, + 0.003132129553705454, + 0.01905844919383526, + 0.0015782996779307723, + -0.01066182553768158, + -0.02639937773346901, + -0.004726159851998091, + 0.024945175275206566, + 0.0002013293415075168, + 0.010640851221978664, + 0.024427814409136772, + 0.06661368161439896, + -0.010137473233044147, + -0.03241194784641266, + -0.02091815136373043, + -0.05542750656604767, + -0.022442268207669258, + -0.02323928289115429, + -0.011242108419537544, + 0.039822790771722794, + 0.07181525975465775, + 0.014150514267385006, + 0.0028856841381639242, + -0.0225681122392416, + 0.026902755722403526, + 0.004806560464203358, + 0.029000164940953255, + -0.017688142135739326, + 0.018303383141756058, + -0.005149137228727341, + 0.009291518479585648, + -0.0008752309950068593, + -0.020890185609459877, + 0.026651067659258842, + 0.013367481529712677, + -0.003929144702851772, + -0.0022494702134281397, + 0.012353734113276005, + 0.03092977963387966, + 0.042087990790605545, + -0.010976436547935009, + -0.021603304892778397, + -0.013437394984066486, + 0.028692545369267464, + 0.01793983206152916, + 0.024008333683013916, + -0.030901813879609108, + -0.018499139696359634, + -0.02154737338423729, + -0.06297817826271057, + -0.03252381086349487, + -0.03811689838767052, + -0.027881545946002007, + -0.01700298860669136, + 0.01268931943923235, + -0.009235587902367115, + 0.007536686956882477, + -0.04099734127521515, + -0.03397801145911217, + -0.013255620375275612, + 0.03115350380539894, + 0.01659749075770378, + -0.0002228496305178851, + 0.006841046269983053, + -0.00850149430334568, + 0.02474941685795784, + 0.007606600411236286, + -0.0007135557825677097, + -0.006099962163716555, + -0.011179185472428799, + -0.0056909676641225815, + -0.029531508684158325, + -0.011367952451109886, + -0.035096630454063416, + -0.04161258041858673, + -0.034201737493276596, + -0.003946623299270868, + 0.002829753328114748, + -0.011123254895210266, + 0.013115792535245419, + 0.011668581515550613, + 0.017478402704000473, + -0.02096009999513626, + -0.015227183699607849, + 0.015059391036629677, + -0.006257267668843269, + 0.019743602722883224, + 0.0231414046138525, + -0.032915327697992325, + 0.030202679336071014, + -0.0068864901550114155, + -0.0259519312530756, + 0.030566228553652763, + -0.007257032673805952, + 0.02639937773346901, + 0.009864809922873974, + 0.011409901082515717, + 0.0133534986525774, + -0.02862263098359108, + 0.00890000257641077, + 0.021085944026708603, + -0.0439896434545517, + -0.0173106100410223, + -0.013975730165839195, + 0.060069773346185684, + 0.010473058559000492, + -0.03587966412305832, + 0.012276829220354557, + 0.009997646324336529, + 0.039822790771722794, + 0.004991831723600626, + -0.01310880109667778, + -0.025979897007346153, + 0.04192019999027252, + -0.0038941879756748676, + 0.025182882323861122, + -0.052239447832107544, + -0.04384981468319893, + -0.03560001030564308, + -0.037725381553173065, + 0.012011157348752022, + -0.04494046792387962, + -0.00666626263409853, + -0.013989713042974472, + -0.007963160052895546, + -0.0028647100552916527, + 0.007047291845083237, + -0.01985546387732029, + 0.021533390507102013, + 0.025071019306778908, + -0.02733622118830681, + -0.017520349472761154, + -0.04116513207554817, + 0.002284427173435688, + -0.008249805308878422, + 0.03680252283811569, + -0.02693072147667408, + 0.00044132964103482664, + -0.0511767603456974, + -0.0026637085247784853, + 0.02407824620604515, + 0.0013711806386709213, + -0.018806761130690575, + -0.05635036900639534, + 0.02114187553524971, + -0.05288265272974968, + -0.04256340488791466, + 0.013059861958026886, + 0.04625484347343445, + 0.002567577175796032, + -0.006068501155823469, + -0.004047997761517763, + -0.007305971812456846, + -0.01284313015639782, + -0.014458133839070797, + -0.02585405297577381, + -0.003764847759157419, + 0.006536922417581081, + 0.008466538041830063, + 0.018219485878944397, + 0.03582373261451721, + -0.02888830192387104, + -0.0041773379780352116, + -0.02061053179204464, + -0.011444857344031334, + -0.026147689670324326, + -0.02925185300409794, + -0.02817518450319767, + -0.01708688586950302, + 0.013157741166651249, + 0.025085002183914185, + 0.024329936131834984, + -0.03940330818295479, + 0.024539675563573837, + 0.02416214346885681, + 0.017058920115232468, + 0.017883900552988052, + -0.013241637498140335, + -0.04782090708613396, + 0.011717520654201508, + 0.024329936131834984, + -0.0004754125257022679, + 0.07092036306858063, + 0.02590998262166977, + 0.035991523414850235, + -0.023798592388629913, + 0.0009831601055338979, + 0.004121406935155392, + -0.021169841289520264, + 0.005089710466563702, + 0.03635507449507713, + -0.03864824399352074, + 0.015926320105791092, + -0.030789952725172043, + -0.02799340896308422, + -0.006005578674376011, + -0.016905110329389572, + 0.0346212200820446, + 0.02456764131784439, + 0.03850841522216797, + 0.011654598638415337, + 0.020051222294569016, + 0.006089475005865097, + 0.03560001030564308, + 0.004289199598133564, + 0.04250747337937355, + 0.009892775677144527, + -0.03271956741809845, + -0.039011791348457336, + 0.0074667735025286674, + 0.025476519018411636, + -0.007683505304157734, + -0.012325769290328026, + 0.0068060895428061485, + -0.006071996875107288, + 0.004268225748091936, + -0.01508735679090023, + -0.012675337493419647, + -0.005656010936945677, + 0.05710543319582939, + 0.008508485741913319, + 0.014765754342079163, + -0.01745043694972992, + -0.029139991849660873, + 0.047513287514448166, + 0.0026304994244128466, + 0.026902755722403526, + -0.015632683411240578, + -0.030062850564718246, + -0.040298204869031906, + -0.01816355437040329, + -0.06868312507867813, + 0.005778359714895487, + 0.005558131728321314, + -0.004166850820183754, + 0.03529239073395729, + -0.03506866469979286, + 0.0013169975718483329, + 0.0032037911005318165, + 0.03744572773575783, + 7.280847057700157e-05, + -0.008005107752978802, + -0.00257631647400558, + -0.00018177538004238158, + 0.001744344481267035, + -0.008851062506437302, + 0.009396389126777649, + 0.010179420933127403, + 0.008089004084467888, + -0.05702153965830803, + 0.016219956800341606, + -0.0150454081594944, + -0.013346507214009762, + 0.021757114678621292, + 0.00819387473165989, + -0.021211788058280945, + 0.04552774131298065, + 0.0034956804011017084, + -0.029699301347136497, + -0.0707525685429573, + 0.02430197037756443, + 0.00400604959577322, + -0.01068279892206192, + 0.016317835077643394, + 0.009913749992847443, + -0.0007402102928608656, + -0.019925378262996674, + 0.006267754826694727, + -0.01824745163321495, + -0.014500082470476627, + -0.009424353949725628, + -0.008473529480397701, + -0.04317864403128624, + -0.01659749075770378, + 0.005502200685441494, + -0.030873849987983704, + 0.0027248829137533903, + 0.013800946064293385, + -0.016038181260228157, + -0.006411077920347452, + 0.02658115327358246, + -0.01121414266526699, + 0.0008761048666201532, + 0.013556248508393764, + 0.0006244159303605556, + -0.0074667735025286674, + -0.01026331726461649, + 0.020512651652097702, + 0.043821848928928375, + -0.01887667365372181, + 0.005565123166888952, + -0.015646666288375854, + 0.002307149115949869, + -0.02052663452923298, + 0.01036818791180849, + 0.0020012769382447004, + -0.011556719429790974, + 0.04463284835219383, + 0.017841951921582222, + 0.006582366302609444, + -0.0010539476061239839, + 0.03632710874080658, + 0.0019191285828128457, + -0.03940330818295479, + 0.007417833898216486, + -0.017296627163887024, + 0.04603111743927002, + -0.02919592335820198, + 0.019128363579511642, + 0.009934723377227783, + -0.02363079972565174, + -0.03459325432777405, + -0.0034816977567970753, + -0.04723363369703293, + 0.013619170524179935, + -0.029895057901740074, + 0.013633153401315212, + 0.01696104183793068, + -0.02711249701678753, + -0.020442739129066467, + 0.026413360610604286, + 0.012682328000664711, + 0.020414773374795914, + -0.017198747023940086, + 0.0012724276166409254, + -0.005075728055089712, + 0.004317165352404118, + 0.04670228809118271, + 0.0077743930742144585, + 0.00045924499863758683, + -0.02212066575884819, + -0.011298038996756077, + -0.0008629960939288139, + 0.04001854732632637, + -0.008592382073402405, + 0.023001577705144882, + -0.014989477582275867, + -0.002887431997805834, + -0.012500553391873837, + 0.007438807748258114, + 0.035683903843164444, + 0.0034380017314106226, + -0.017953814938664436, + 0.02804933860898018, + 0.009927731938660145, + 0.014038652181625366, + -0.0071661449037492275, + 0.005180598236620426, + -0.002557090250775218, + 0.029671335592865944, + 0.006889985874295235, + 0.005995091982185841, + -0.017953814938664436, + -0.04206002503633499, + -0.03490087389945984, + -0.0018090145895257592, + 0.02003723941743374, + 0.007138179149478674, + 0.029056094586849213, + -0.005033779889345169, + -0.004268225748091936, + 0.028035355731844902, + -0.03400597721338272, + 0.031405191868543625, + 0.011228125542402267, + -0.010088533163070679, + 0.05979011580348015, + -0.017282644286751747, + 0.03627118095755577, + -0.018862690776586533, + -0.014793719165027142, + -0.01217195950448513, + -0.021533390507102013, + 0.024847296997904778, + -0.0022704442963004112, + -0.002211017766967416, + 0.02381257526576519, + -0.05327416956424713, + -0.020946117118000984, + -0.01753433234989643, + -0.012556483969092369, + 0.014919564127922058, + 0.011906287632882595, + 0.045248087495565414, + -0.020932134240865707, + 0.008578399196267128, + -0.02862263098359108, + 0.0005623675533570349, + -0.006274746265262365, + -0.03375428915023804, + -0.010277300141751766, + 0.023337163031101227, + 0.01820550300180912, + 0.012402674183249474, + 0.009018855169415474, + -0.0011623137397691607, + 0.017660176381468773, + -0.023938419297337532, + 0.02760189212858677, + -0.03249584510922432, + -0.01904446631669998, + -0.01896057091653347, + 0.005442774388939142, + -0.025001106783747673, + -0.024022314697504044, + 0.00042341428343206644, + 0.0034642191603779793, + -0.03814486414194107, + 0.005376356188207865, + 0.0042577385902404785, + -0.008795131929218769, + -0.0015529560623690486, + 0.024385865777730942, + -0.005124667659401894, + -0.019729619845747948, + -0.013073844835162163, + 0.02065248042345047, + -0.03862027823925018, + 0.01865295134484768, + -0.01602419838309288, + -0.014150514267385006, + 0.018219485878944397, + -0.0012872843071818352, + 0.034425459802150726, + 0.010039594024419785, + 0.019925378262996674, + -0.012025140225887299, + -0.02509898506104946, + 0.008767166174948215, + 0.010361196473240852, + -0.003799804486334324, + -0.00917266495525837, + -0.02448374591767788, + -0.01793983206152916, + 0.002646230161190033, + 0.0030202679336071014, + 0.015646666288375854, + 0.00393963186070323, + 0.029839128255844116, + 0.011158212088048458, + 0.008424589410424232, + -0.02821713127195835, + -0.02291768044233322, + -0.021841010078787804, + 0.047737009823322296, + -0.023966385051608086, + 0.013647136278450489, + -0.020484687760472298, + -0.02911202609539032, + 0.0075716436840593815, + -0.005229537840932608, + 0.0057154372334480286, + -0.012738259509205818, + -0.003694934071972966, + -0.003918657545000315, + -0.0072290669195353985, + -0.005460252519696951, + -0.005659506656229496, + -0.002053712261840701, + -0.0024277500342577696, + 0.020065205171704292, + -0.0034537322353571653, + -0.011857347562909126, + -0.017827969044446945, + -0.006306207273155451, + -0.04496843367815018, + 7.242612628033385e-05, + 0.0012112532276660204, + 0.06269852072000504, + -0.009249569848179817, + -0.003652985906228423, + -0.0018457192927598953, + -0.0028647100552916527, + -0.0016237435629591346, + -0.04348626360297203, + -0.025826087221503258, + -0.03179670870304108, + -0.030146747827529907, + 0.02465153858065605, + -0.024637555703520775, + -0.014073609374463558, + 0.0001496588229201734, + -0.0033296355977654457, + 0.03778131306171417, + -0.034117840230464935, + 0.022498199716210365, + -0.00012256728950887918, + 0.009221605025231838, + 0.022498199716210365, + -0.013528282754123211, + -0.015380993485450745, + -0.00934744905680418, + 0.002966084750369191, + -0.0018369799945503473, + -0.01402466930449009, + -0.00981587078422308, + -0.005663002375513315, + -0.013073844835162163, + 0.037194039672613144, + -0.020191049203276634, + -0.03587966412305832, + 0.03979482501745224, + -0.008040064945816994, + -0.004911431111395359, + -0.03459325432777405, + -0.017030954360961914, + -0.022064734250307083, + -0.014003695920109749, + 0.00400604959577322, + 0.005767872557044029, + -0.003530637128278613, + -0.0026532213669270277, + -0.04228375107049942, + -0.04695397987961769, + 0.018457192927598953, + 0.03551611304283142, + -0.01732459105551243, + -0.0038557355292141438, + -0.02813323587179184, + 0.003943127579987049, + 0.012150985188782215, + -0.005711941514164209, + -0.007347919978201389, + -0.028692545369267464, + 0.001232227310538292, + 0.006477495655417442, + 0.035320352762937546, + 0.00336634018458426, + 0.007844306528568268, + 0.022889714688062668, + -0.002158582676202059, + 0.007403851021081209, + 0.024385865777730942, + 0.014472116716206074, + -0.01838727854192257, + -0.01248657051473856, + -0.035236459225416183, + -0.011647607199847698, + 0.00040440651355311275, + -0.014003695920109749, + 0.0436260923743248, + 0.00903283804655075, + 0.03520849347114563, + -0.029223887249827385, + -0.009193639270961285, + -0.019128363579511642, + -0.00040528044337406754, + -0.018988536670804024, + 0.03134926036000252, + 0.009669051505625248, + 0.008962924592196941, + 0.002689925953745842, + 0.008487512357532978, + 0.021910924464464188, + 0.004229773301631212, + 0.0055511402897536755, + -0.025140933692455292, + -0.01448609959334135, + -0.0014105070149526, + -0.0040375106036663055, + 0.0087461918592453, + -0.01061987690627575, + -0.028776440769433975, + -0.02515491656959057, + 0.002191791543737054, + -0.008340693078935146, + -0.00028271315386518836, + -0.01455601304769516, + -0.013255620375275612, + 0.010053576901555061, + 0.025630328804254532, + 0.0011448353761807084, + -0.005400826223194599, + -0.004467479418963194, + -0.048631906509399414, + 0.009361431933939457, + -0.014891598373651505, + -0.01740848831832409, + 0.007536686956882477, + -0.03266363590955734, + -0.01682121306657791, + -0.018009744584560394, + 0.00861335638910532, + 0.051484379917383194, + 0.031852640211582184, + -0.004411548841744661, + -0.02585405297577381, + -0.007564652245491743, + 0.00941736251115799, + 0.002751100342720747, + -0.0042157904244959354, + 0.024315953254699707, + -0.007050787098705769, + -0.006659271195530891, + 0.02105797827243805, + -0.005809820722788572, + 0.006970386486500502, + -0.05537157878279686, + -0.017380522564053535, + -0.0402422733604908, + -0.0010915262391790748, + -0.039682962000370026, + -0.010515006259083748, + 0.024623572826385498, + -0.019156329333782196, + 0.012472587637603283, + -0.013877850957214832, + 0.012745250947773457, + -0.030118782073259354, + -0.02319733425974846, + -0.005540653597563505, + -6.909430521773174e-05, + 0.007312963251024485, + 0.013542265631258488, + 0.016191991046071053, + -0.011144229210913181, + -0.07019326090812683, + -0.027406133711338043, + -0.05956639349460602, + 0.017156798392534256, + -0.003569089574739337, + -0.004068972077220678, + -0.041948165744543076, + 0.00757863512262702, + 0.022624043747782707, + 0.024581624194979668, + 0.019967326894402504, + -0.010403145104646683, + -0.017562298104166985, + -0.00865530502051115, + -0.007257032673805952, + 0.01873684674501419, + -0.007250041235238314, + -0.015786493197083473, + 0.0150454081594944, + -0.007928202860057354, + 0.0033174005802720785, + -0.027545960620045662, + 0.03325091302394867, + 0.01333252526819706, + 0.013786963187158108, + 0.023309197276830673, + 0.0413888543844223, + 0.010696781799197197, + -0.015478872694075108, + -0.011179185472428799, + 0.02247023396193981, + -0.0016482132486999035, + 0.008550434373319149, + 0.016303854063153267, + 0.002506402786821127, + 0.016261905431747437, + -0.023155387490987778, + -0.025308726355433464, + -0.02862263098359108, + 0.00023879866057541221, + -0.002473193919286132, + 0.004946387838572264, + 0.017254678532481194, + -0.026804877445101738, + 0.0036914385855197906, + 0.006117440760135651, + 0.008893011137843132, + -0.01567463018000126, + 0.004027023911476135, + -0.007865280844271183, + -0.02790951170027256, + -0.016583507880568504, + -0.03199246525764465, + -0.0293357502669096, + -0.01700298860669136, + 0.01838727854192257, + 0.019519878551363945, + 0.026511240750551224, + 0.012989948503673077, + 0.004096937365829945, + 0.01359819620847702, + 0.021868975833058357, + 0.012668346054852009, + -0.026818860322237015, + 0.01511532161384821, + -0.010046585462987423, + 0.0036634730640798807, + 0.031125538051128387, + -0.03898382931947708, + -0.0024889244232326746, + 0.005547644570469856, + -0.032747533172369, + 0.046618394553661346, + -0.012675337493419647, + 0.009396389126777649, + 0.004845012910664082, + 0.020596548914909363, + 0.03350260108709335, + 0.018443210050463676, + -0.04379388317465782, + 0.004998823162168264, + 0.008851062506437302, + -0.00037338235415518284, + -0.0003838693955913186, + -0.003013276495039463, + -0.03154502063989639, + 0.016863161697983742, + 0.02590998262166977, + -0.0011902791447937489, + -0.004236764740198851, + 0.04320660978555679, + 0.030789952725172043, + -0.01526913233101368, + -0.006473999936133623, + 0.0083686588332057, + 0.05042169243097305, + 0.032467879354953766, + -0.02030291222035885, + -0.010703773237764835, + 0.008634330704808235, + 0.007291989400982857, + 0.025029070675373077, + -0.00019630430324468762, + 0.02684682607650757, + -0.02825907990336418, + -0.010773686692118645, + 0.012430639006197453, + 0.0035236459225416183, + -0.012290812097489834, + 0.010689790360629559, + 0.007047291845083237, + 0.0006357768434099853, + -0.0083686588332057, + 0.011724512092769146, + -0.009676042944192886, + 0.0036599773447960615, + -0.012745250947773457, + -0.010088533163070679, + -0.0050477623008191586, + 0.02385452203452587, + -0.008809114806354046, + 0.028245097026228905, + 0.03070605732500553, + 0.021924907341599464, + -0.03417377173900604, + -0.005037275608628988, + 0.042675264179706573, + -0.020372824743390083, + 0.0014061374822631478, + 0.014611943624913692, + -0.043598126620054245, + 0.018051693215966225, + -0.012773215770721436, + 0.04829632118344307, + 0.007739436347037554, + -0.019422000274062157, + 0.006687236484140158, + -0.019771568477153778, + 0.008459546603262424, + 0.0016726830508559942, + 0.03204839676618576, + 0.03934737667441368, + 0.021617287769913673, + 0.029895057901740074, + -0.021757114678621292, + 0.02118382230401039, + 0.014262376353144646, + -0.03898382931947708, + 0.019282173365354538, + 0.012710293754935265, + 0.008948941715061665, + 0.007417833898216486, + 0.03355853259563446, + 0.0002971328212879598, + -0.008627339266240597, + 0.03154502063989639, + -0.025840070098638535, + 0.04281509295105934, + 0.01424140203744173, + -0.07310166954994202, + 0.007257032673805952, + -0.03115350380539894, + -0.028119252994656563, + 0.03308311849832535, + 0.023826558142900467, + -0.019883429631590843, + -0.032915327697992325, + -0.03711014240980148, + -0.038927897810935974, + -0.021127892658114433, + -0.0029416149482131004, + -0.008179891854524612, + 0.010403145104646683, + 0.008529460057616234, + 0.0063411640003323555, + 0.020988065749406815, + -0.015353028662502766, + -0.018135590478777885, + 0.008844071067869663, + 0.00981587078422308, + 0.0029276323039084673, + -0.0011981443967670202, + 0.019156329333782196, + -0.02140754647552967, + -0.01268931943923235, + 0.02332318015396595, + 0.010494032874703407, + -0.020708410069346428, + -0.03601948916912079, + ], + "index": 98, + }, + { + "title": "University of Monastir", + "text": "The University of Monastir (Arabic: \u062c\u0627\u0645\u0639\u0629 \u0627\u0644\u0645\u0646\u0633\u062a\u064a\u0631\u200e) is a university located in Monastir, Tunisia. It was founded in 2004 and is organized in 6 Faculties.", + "vector": [ + 0.01370352040976286, + 0.08861248940229416, + -0.023745546117424965, + 0.009841619059443474, + 0.026930395513772964, + 0.02426552213728428, + -0.06265704333782196, + 0.0036425364669412374, + 0.0031144365202635527, + -0.0054516177624464035, + -0.0017657499993219972, + -0.012641903944313526, + -0.01959657482802868, + -0.009787455201148987, + -0.0074475654400885105, + 0.027970347553491592, + -0.02119983360171318, + 0.06798679381608963, + -0.0010318263666704297, + 0.03739490360021591, + -0.021925631910562515, + 0.019899895414710045, + -0.011970268562436104, + -0.028338663280010223, + 0.03119852766394615, + 0.024698834866285324, + 0.01349769625812769, + -0.03732990473508835, + -0.008005456067621708, + 0.028706979006528854, + -0.01930408924818039, + 0.011536955833435059, + -0.01502512488514185, + -0.023377230390906334, + -0.0027258088812232018, + 0.029291952028870583, + -0.02024654485285282, + -0.005524739157408476, + -0.03654994070529938, + -0.0066621857695281506, + 0.04766441881656647, + -0.02404886484146118, + 0.05706730857491493, + 0.017884990200400352, + 0.005484116263687611, + -0.04757775738835335, + -0.019618241116404533, + -0.06902674585580826, + -0.04892102628946304, + -0.014104334637522697, + 0.03966979682445526, + 0.044631227850914, + 0.0036723266821354628, + -0.03041856549680233, + -0.04666779935359955, + -0.001960740890353918, + -0.013411033898591995, + 0.05256085470318794, + 0.011753612197935581, + -0.017061695456504822, + 0.027082055807113647, + 0.0633070170879364, + -0.0013879553880542517, + -0.023918870836496353, + 0.04757775738835335, + 0.0024861327838152647, + 0.02112400345504284, + 0.0043439618311822414, + 0.04983098432421684, + -0.011211970821022987, + 0.04541119188070297, + 0.02608543634414673, + -0.044457901269197464, + -0.015588431619107723, + -0.04402459040284157, + -0.020842351019382477, + -0.056114017963409424, + -0.04088307172060013, + -0.004693320486694574, + -0.020029887557029724, + -0.01140696182847023, + -0.05004763975739479, + 0.019271591678261757, + -0.07747634500265121, + -0.021513985469937325, + 0.02851198799908161, + 0.03509834408760071, + -0.007983789779245853, + -0.0047447760589420795, + 0.046234484761953354, + 0.010572834871709347, + 0.004828730598092079, + -0.02235894463956356, + 0.0037941960617899895, + -0.01250107679516077, + -0.010188269428908825, + -0.0380232073366642, + 0.013291873037815094, + -0.022532271221280098, + -0.014981793239712715, + -0.004907268565148115, + 0.0008436060161329806, + 0.04393792897462845, + -0.016270898282527924, + 0.02472050115466118, + 0.011190305463969707, + 0.040731411427259445, + -0.010881570167839527, + 0.03615996241569519, + 0.02413552813231945, + 0.02599877305328846, + 0.04274631664156914, + 0.002840907545760274, + 0.038413189351558685, + -0.02115650102496147, + 0.02649708278477192, + -0.04203135147690773, + 0.03009358048439026, + -0.05312415957450867, + 0.020820684731006622, + -0.04740443080663681, + 9.732614125823602e-05, + -0.003978353925049305, + -0.009435388259589672, + -0.024980487301945686, + 0.04658113420009613, + -0.02376721240580082, + 0.02810034155845642, + -0.006770513951778412, + 0.013335204683244228, + 0.04580117389559746, + 0.028533654287457466, + -0.04322296008467674, + -0.011916104704141617, + -0.004105639643967152, + 0.01805831491947174, + 0.024828828871250153, + 0.04003811255097389, + -0.0004962786915712059, + 0.023983867838978767, + -0.0036777432542294264, + 0.040319763123989105, + -0.02326890267431736, + 0.004831438884139061, + -0.002784035401418805, + -0.04714444279670715, + -0.01113614160567522, + 0.02955194003880024, + 0.04541119188070297, + -0.012717733159661293, + 0.03633328527212143, + 0.03743823245167732, + -0.009164568036794662, + 0.006651353091001511, + 0.0005944511503912508, + 0.028533654287457466, + -0.0021015675738453865, + 0.04315796494483948, + 0.02699539251625538, + -0.015263446606695652, + 0.00529183354228735, + 0.017884990200400352, + -0.005611401982605457, + -0.033126771450042725, + 0.011688615195453167, + -0.027537034824490547, + -0.02454717457294464, + -0.04567117989063263, + 0.042507994920015335, + 0.00153419841080904, + -0.010399509221315384, + -0.014808468520641327, + 0.0027813271153718233, + -0.022618932649493217, + -0.030938539654016495, + -0.008650008589029312, + -0.017874157056212425, + 0.004335836973041296, + -0.015252613462507725, + -0.0016804415499791503, + -0.03451337292790413, + 0.0003165215312037617, + 0.023333899676799774, + -0.048747699707746506, + 0.01539344061166048, + 0.00503184599801898, + 0.008476683869957924, + -0.04161970317363739, + -0.03241180256009102, + -0.005012888461351395, + -0.015653427690267563, + 0.014667641371488571, + 0.037178244441747665, + 0.01113614160567522, + 0.00441166665405035, + 0.011851107701659203, + 0.00958704762160778, + 0.08986909687519073, + -0.006413030903786421, + -0.004503746051341295, + 0.02732037752866745, + -0.03286678344011307, + 0.03379840403795242, + -0.011114475317299366, + 0.038456518203020096, + 0.046971116214990616, + 0.007555893622338772, + -0.01801498420536518, + -0.03245513513684273, + 0.00611512828618288, + 0.002352076582610607, + -0.028013678267598152, + -0.0033690077252686024, + 0.013172712177038193, + 0.018404964357614517, + 0.026670409366488457, + -0.019000770524144173, + -0.05134757608175278, + -0.024850495159626007, + -0.022120622918009758, + -0.06391365081071854, + -0.08094284683465958, + -0.007626306731253862, + -0.00787546206265688, + -0.009175400249660015, + -0.007539644371718168, + 0.010480755940079689, + -0.045064542442560196, + 0.0043520862236619, + 0.062137067317962646, + -0.07808298617601395, + -0.015447604469954967, + 0.008996658958494663, + 0.003970229532569647, + -0.04140304774045944, + 0.033711742609739304, + 0.023247236385941505, + -0.0042654238641262054, + -0.027255380526185036, + 0.03405839204788208, + -0.016130072996020317, + 0.045194536447525024, + -0.0025321722496300936, + 0.0646502822637558, + 0.017495008185505867, + -0.0017386679537594318, + 0.025738785043358803, + -0.013584359548985958, + 0.01518761646002531, + -0.006212623789906502, + -0.010724494233727455, + -0.011255302466452122, + 0.0013920177007094026, + -0.0040731411427259445, + -0.036723267287015915, + -0.010637831874191761, + 0.03278012201189995, + -0.0332350991666317, + -0.034860022366046906, + -0.05078427121043205, + -0.04211801290512085, + -0.023117242380976677, + 0.021383991464972496, + -0.018534958362579346, + 0.015945915132761, + -0.03158850967884064, + -0.02950860746204853, + 0.005562654230743647, + -0.03167517110705376, + -0.010995314456522465, + 0.009402889758348465, + -0.046971116214990616, + 0.0687667578458786, + -0.015761757269501686, + 0.05364413559436798, + -0.00878000259399414, + 0.001538260723464191, + 0.04441457241773605, + 0.02545713260769844, + -0.06309035420417786, + -0.014364322647452354, + 0.014418486505746841, + -0.05667732656002045, + -0.06495360285043716, + -0.0016763792373239994, + 0.006033882033079863, + 0.004717694129794836, + 0.02294391766190529, + -0.010280348360538483, + -0.041814692318439484, + 0.04675446078181267, + -0.04740443080663681, + -0.006050131283700466, + 0.07041334360837936, + -0.012576906941831112, + -0.009554549120366573, + -0.0057901437394320965, + 0.03962646424770355, + 0.007068416569381952, + 0.012121927924454212, + 0.007268823683261871, + 0.024698834866285324, + -0.03369007632136345, + -0.030266905203461647, + 0.006694684270769358, + -0.0291402917355299, + -0.004124597180634737, + -0.0006259339861571789, + -0.00029773334972560406, + -0.032758455723524094, + 0.0015991954132914543, + -0.02732037752866745, + -0.043461281806230545, + 0.004335836973041296, + 0.01987822912633419, + 0.012371082790195942, + 0.001933658728376031, + -0.03382007032632828, + -0.007431316189467907, + 0.0026581038255244493, + -0.016552552580833435, + -0.02823033556342125, + -0.0003014571266248822, + -0.03206515312194824, + 0.01864328794181347, + -0.019856562837958336, + 0.004579575732350349, + 0.00797837320715189, + -0.0007698074332438409, + -0.03704825043678284, + -0.009809120558202267, + -0.024287188425660133, + -0.02210978977382183, + -0.01689920201897621, + 0.03345175459980965, + 0.0010975003242492676, + 0.04653780534863472, + -0.027623696252703667, + -0.008964160457253456, + -0.016801707446575165, + 0.0009038636344484985, + 0.04588783532381058, + 0.01140696182847023, + 0.03934480994939804, + 0.007880878634750843, + 0.03083021193742752, + -0.027212049812078476, + 0.026475418359041214, + 0.012620237655937672, + -0.038001541048288345, + 0.00014835888578090817, + -0.025283807888627052, + -0.013129380531609058, + -0.007274240255355835, + 0.03466503322124481, + -0.05633067712187767, + 0.004089390393346548, + -0.0633070170879364, + 0.029768595471978188, + 0.008281692862510681, + -0.014440151862800121, + 0.055940695106983185, + 0.02736370824277401, + 0.0014624310424551368, + -0.03310510516166687, + 0.008579595014452934, + 0.015848418697714806, + 0.004644572734832764, + 0.002119170967489481, + -0.015685927122831345, + 0.00946788676083088, + 0.0013425928773358464, + 0.03611662983894348, + 0.04493454843759537, + 0.03423171862959862, + -0.033625081181526184, + -0.007664221804589033, + 0.033993396908044815, + 0.0018280387157574296, + -0.038911499083042145, + 0.010296597145497799, + -0.05520406365394592, + 0.005876806098967791, + 0.004582284018397331, + 0.009711625054478645, + -0.016130072996020317, + 0.05386079102754593, + -0.04406792297959328, + -0.012815228663384914, + -0.04584450274705887, + -0.02827366627752781, + -0.029248619452118874, + -0.018664952367544174, + 0.02294391766190529, + 0.03518500551581383, + -0.030656887218356133, + -0.047101110219955444, + -0.053167492151260376, + -0.03037523292005062, + -0.01107656117528677, + -0.018004151061177254, + -0.01801498420536518, + -0.048661038279533386, + 0.013811848126351833, + -0.03091687522828579, + 0.027948681265115738, + -0.002346660243347287, + -0.003377132350578904, + -0.02285725437104702, + -0.02690873108804226, + -0.009987861849367619, + -0.017245853319764137, + 0.009939114563167095, + 0.06313368678092957, + 0.012631070800125599, + 0.03624662384390831, + 0.01101698074489832, + -0.01757083833217621, + -0.02446051314473152, + 0.030201908200979233, + 0.04853104427456856, + 0.024352185428142548, + -0.008438768796622753, + 0.045194536447525024, + 0.012533575296401978, + 0.051564235240221024, + -0.05728396400809288, + -0.03360341489315033, + -0.05923387408256531, + 0.02872864529490471, + 0.005121216643601656, + 0.00192418007645756, + -0.020192380994558334, + 0.0182208064943552, + 0.052517522126436234, + 0.010838238522410393, + -0.010572834871709347, + 0.03550999239087105, + 0.047014448791742325, + -0.033625081181526184, + -0.0017467925790697336, + -0.039734791964292526, + 0.03871650621294975, + 0.05797726660966873, + -0.009494968689978123, + 0.0034908768720924854, + 0.00801628828048706, + -0.014180164784193039, + 0.0019052226562052965, + 0.009641211479902267, + 0.07535310834646225, + 0.00440083397552371, + -0.04541119188070297, + -0.03685326129198074, + 0.025305472314357758, + -0.025023819878697395, + 0.04588783532381058, + 0.03228181228041649, + 0.014288492500782013, + 6.804366421420127e-05, + -0.016758376732468605, + 0.016433391720056534, + -0.0147976353764534, + 0.008054203353822231, + -0.02968193218111992, + -0.046234484761953354, + -0.015761757269501686, + -0.020517366006970406, + -0.013021052815020084, + 0.011981101706624031, + -0.00692217331379652, + 0.0025755034293979406, + -0.03284511715173721, + 0.03243346884846687, + 0.003935022745281458, + 0.00479352381080389, + 0.007474647369235754, + 0.009034574031829834, + 0.01872994937002659, + -0.013031885027885437, + -0.0008862602990120649, + 0.02290058694779873, + 0.020690690726041794, + 0.036224957555532455, + -0.010989897884428501, + 0.014905963093042374, + -0.01980239897966385, + 0.02500215359032154, + 0.002010842552408576, + 0.023290567100048065, + -0.012641903944313526, + -0.009153734892606735, + 0.03087354265153408, + 0.02454717457294464, + -0.01641172543168068, + 0.005178089253604412, + 0.04840105026960373, + 0.030635220929980278, + -0.026302091777324677, + 0.02309557795524597, + -0.07127997279167175, + -0.00787546206265688, + 0.03817486763000488, + -0.014905963093042374, + -0.04060141742229462, + 0.06478027999401093, + 0.003146934788674116, + 0.022878920659422874, + -0.03037523292005062, + 0.01029118150472641, + 0.00820586271584034, + 0.034903354942798615, + 0.018296636641025543, + 0.019520746544003487, + 0.024373849853873253, + 0.02495882287621498, + 0.038001541048288345, + 0.012576906941831112, + 0.007783382665365934, + 0.00797837320715189, + 0.04588783532381058, + 0.0010975003242492676, + -0.000725122052244842, + 0.010204518213868141, + -0.025197144597768784, + -0.024525510147213936, + -0.02896696701645851, + -0.034578368067741394, + 0.037178244441747665, + -0.02153564989566803, + 0.001083959243260324, + -0.0015612804563716054, + 0.009169983677566051, + 0.04931100830435753, + -0.005925553850829601, + 0.02992025576531887, + -0.01504679024219513, + -0.024937156587839127, + -0.009104987606406212, + 0.0014339948538690805, + 0.001570759224705398, + 0.003271512221544981, + -0.005386620759963989, + -0.027385374531149864, + 0.0056763989850878716, + -0.02115650102496147, + 0.0030358985532075167, + -0.010399509221315384, + -0.030266905203461647, + 0.019206594675779343, + -0.021102337166666985, + 0.05607068911194801, + 0.00290861283428967, + 0.0111578069627285, + -0.023030580952763557, + -0.0066188545897603035, + -0.03054855950176716, + -0.011320299468934536, + -0.053254153579473495, + -0.030158577486872673, + 0.033581748604774475, + 0.0036750349681824446, + 0.04649447277188301, + 0.016682546585798264, + 0.01192693691700697, + 0.024005534127354622, + 0.0016817956930026412, + 0.023983867838978767, + -0.02004072070121765, + 0.02513214759528637, + 0.016595883294939995, + 0.016151737421751022, + 0.026583746075630188, + 0.00028385379118844867, + 0.008081285282969475, + -0.010567418299615383, + 0.01574009098112583, + -0.006656769197434187, + 0.02049569971859455, + 0.010117855854332447, + 0.05260418355464935, + -0.010339928790926933, + 0.0016872120322659612, + -0.027493702247738838, + 0.03650661185383797, + 0.006575522944331169, + -0.004747484344989061, + 0.016379227861762047, + -0.015512601472437382, + -0.023485558107495308, + 0.06547357887029648, + -0.045237865298986435, + -0.021524818614125252, + -0.008086701855063438, + 0.000903186562936753, + 0.02318223938345909, + 0.005381204653531313, + -0.0034367127809673548, + 0.011396128684282303, + 0.019704904407262802, + -0.03520667180418968, + 0.0022261450067162514, + -0.04441457241773605, + 0.036809928715229034, + 0.0024184274952858686, + 0.03737323731184006, + -0.022228950634598732, + -0.02235894463956356, + -0.023485558107495308, + -0.047057781368494034, + 0.019455749541521072, + -0.033495087176561356, + 0.037221577018499374, + 0.02892363630235195, + -0.029356949031352997, + -0.03050522692501545, + 0.017787493765354156, + -0.015490936115384102, + 0.02905363030731678, + 0.029811926186084747, + 0.027797022834420204, + 0.02781868726015091, + -0.021113170310854912, + -0.004918101243674755, + 0.008899163454771042, + 0.028078675270080566, + -0.003260679543018341, + -0.027537034824490547, + -0.026345424354076385, + 0.006283036898821592, + -0.009343309327960014, + 0.019618241116404533, + 0.0016587759600952268, + 0.012327752076089382, + -0.019748235121369362, + 0.0038266945630311966, + 0.013281039893627167, + -0.020029887557029724, + 0.010664913803339005, + -0.003122560912743211, + -0.010356178507208824, + -0.03752489760518074, + 0.024850495159626007, + 0.0009221439831890166, + 0.0033256765455007553, + -0.00011645283666439354, + -0.007079249247908592, + -0.02554379589855671, + -0.0063588665798306465, + 0.01211109571158886, + -0.03128518909215927, + 0.0364416129887104, + 0.019412416964769363, + 0.011298634111881256, + 0.0001987145806197077, + -0.014700139872729778, + -0.01587008498609066, + 0.03345175459980965, + 0.011807776056230068, + -0.0332350991666317, + -0.012121927924454212, + 0.009922864846885204, + -0.004647280555218458, + -0.005359538830816746, + 0.008536264300346375, + 0.020755687728524208, + 0.01711585931479931, + -0.02781868726015091, + 0.010935734026134014, + 0.019065767526626587, + 0.024807162582874298, + -0.009771205484867096, + -0.008325023576617241, + 0.0111578069627285, + -0.00717132817953825, + -0.034361712634563446, + -0.058540571480989456, + 0.04311463236808777, + -0.03356008231639862, + -0.017050862312316895, + -0.022640598937869072, + -0.02723371610045433, + 0.039453137665987015, + 0.035726647824048996, + 0.008297941647469997, + -0.022077292203903198, + 0.02768869325518608, + 0.0028463241178542376, + 0.010708244517445564, + -0.05113092064857483, + 0.017300017178058624, + -0.006369699724018574, + 0.0009167275857180357, + 0.01719168946146965, + 0.0042410497553646564, + 0.021438155323266983, + 0.02235894463956356, + -0.021513985469937325, + 0.043006304651498795, + -0.04404625669121742, + 0.021871468052268028, + 0.022640598937869072, + -0.03124186024069786, + -0.02083151787519455, + -0.0027325793635100126, + -0.005169964395463467, + -0.004807064775377512, + 0.008530847728252411, + 0.007257991004735231, + 0.03295344486832619, + 0.006255954969674349, + -0.0020270918030291796, + 0.040774744004011154, + -0.016335895285010338, + -0.019824065268039703, + 0.002056882018223405, + -0.00022224211716093123, + 0.015220114961266518, + 0.004801648668944836, + 0.035943303257226944, + 0.0320868194103241, + 0.020961511880159378, + -0.03046189621090889, + 0.022044792771339417, + 0.045237865298986435, + 0.019444916397333145, + 0.03821819648146629, + 0.013172712177038193, + 0.00769672030583024, + 6.626640242757276e-05, + 0.002862573368474841, + 0.004414374940097332, + -0.019856562837958336, + 0.022965583950281143, + -0.056027356535196304, + 0.026973728090524673, + -0.0043087550438940525, + -0.026627076789736748, + 0.03542332723736763, + 0.028490323573350906, + -0.03652827814221382, + 0.03291011229157448, + 0.012620237655937672, + 0.03037523292005062, + 0.021264830604195595, + -0.019780732691287994, + -0.029898589476943016, + -0.0014719096943736076, + 0.0005172672681510448, + 0.045107871294021606, + -0.05399078503251076, + -0.009695376269519329, + -0.03384173661470413, + -0.0011164577445015311, + -0.031220193952322006, + 0.03148018196225166, + 0.03611662983894348, + 0.005232253111898899, + 0.026692073792219162, + -0.011049478314816952, + -0.005159131716936827, + -0.04261632263660431, + 0.02476383186876774, + 0.03884650021791458, + -0.04909434914588928, + -0.006250538397580385, + 0.011244469322264194, + -0.020398205146193504, + -0.00857417844235897, + 0.021633146330714226, + -0.007962124422192574, + -0.04662446677684784, + 0.011796943843364716, + 0.0037129498086869717, + 0.051564235240221024, + 0.05728396400809288, + 0.029898589476943016, + -0.040363095700740814, + 0.0010873444844037294, + -0.020268211141228676, + -0.0019079308258369565, + 0.012826061807572842, + 0.022467274218797684, + 0.04393792897462845, + -0.030700217932462692, + -0.03964813053607941, + -0.0348166897892952, + -0.020929012447595596, + -0.029248619452118874, + 0.024005534127354622, + 0.015588431619107723, + -0.02736370824277401, + 0.010453673079609871, + 0.00771838566288352, + 0.01971573568880558, + 0.047967735677957535, + 0.019889062270522118, + 0.03297511115670204, + -0.007155078928917646, + -0.019564077258110046, + -0.005800976417958736, + -0.009473303332924843, + -0.027927014976739883, + 0.00370482518337667, + -0.020766520872712135, + 0.02028987556695938, + -0.03971312567591667, + -0.013053551316261292, + -0.016216734424233437, + 0.0061476267874240875, + -0.004579575732350349, + 0.007886294275522232, + -0.0034448374062776566, + 0.030028583481907845, + -0.019488247111439705, + 0.03269345685839653, + 0.08271943032741547, + -0.04298463836312294, + 0.005941803101450205, + -0.02446051314473152, + 0.05836724489927292, + 0.006992586888372898, + 0.016801707446575165, + 0.03641995042562485, + 0.001058908412232995, + 0.014115167781710625, + 0.025067150592803955, + 0.02025737799704075, + -0.007680471055209637, + -0.0111578069627285, + -0.027493702247738838, + -0.019206594675779343, + 0.00919706653803587, + -0.01661754958331585, + -0.0032444302923977375, + -0.008021704852581024, + -0.030440229922533035, + 0.021145669743418694, + -0.007182161323726177, + 0.012674402445554733, + -0.0016845038626343012, + 0.011710280552506447, + 0.00636428315192461, + 0.02025737799704075, + 0.005516614764928818, + -0.010448257438838482, + 0.014104334637522697, + -0.008958743885159492, + -0.02677873708307743, + 0.008926245383918285, + 0.021438155323266983, + 0.0371132493019104, + 0.05186755210161209, + 0.04107806086540222, + 0.04818439483642578, + 0.001882202923297882, + -0.04814106225967407, + -0.01006369199603796, + 0.0016411725664511323, + -0.001005421276204288, + -0.018318302929401398, + 0.027493702247738838, + -0.017300017178058624, + -0.040688078850507736, + -0.01607590913772583, + -0.00613679364323616, + -0.0002750521234702319, + -0.023550555109977722, + 0.03293177857995033, + 0.0007711615180596709, + 0.019000770524144173, + -0.006965504959225655, + 0.0040189772844314575, + 0.025803782045841217, + 0.00022190359595697373, + -0.020571529865264893, + -0.002671644790098071, + -0.003821277990937233, + -0.03041856549680233, + 0.008633759804069996, + -0.012858560308814049, + 0.04148970916867256, + -0.0018957438878715038, + -0.026843734085559845, + -0.01345436554402113, + 0.013790182769298553, + -0.022293947637081146, + -0.010166604071855545, + 0.02203396148979664, + 0.036138296127319336, + 0.036311618983745575, + -0.03295344486832619, + 9.15712007554248e-05, + -0.014645976014435291, + 0.011331131681799889, + -0.008086701855063438, + 0.005313499365001917, + 0.03145851567387581, + -0.01056200172752142, + -0.01930408924818039, + -0.0019092849688604474, + -0.026627076789736748, + 0.006694684270769358, + -0.023377230390906334, + -0.027472037822008133, + -0.01192693691700697, + 0.029855258762836456, + -0.026930395513772964, + -0.004991223104298115, + -0.014960127882659435, + -0.01992155984044075, + 0.05035095661878586, + -0.0500909686088562, + -0.05585402995347977, + 0.008937078528106213, + 0.00851459801197052, + -0.004774566274136305, + 0.04170636460185051, + -0.06023049354553223, + 0.010502421297132969, + 0.016292564570903778, + -0.03100353665649891, + -0.0250454843044281, + 0.0005744781228713691, + -0.008417102508246899, + 0.012782730162143707, + 0.00605554785579443, + 0.03269345685839653, + 0.029486943036317825, + -0.02178480476140976, + 0.0029438193887472153, + -0.02294391766190529, + 0.009863284416496754, + 0.012349417433142662, + 0.0473610982298851, + -0.011948603205382824, + -0.013519362546503544, + 0.04092640429735184, + 0.00637511583045125, + 0.025305472314357758, + 0.021503152325749397, + 0.014602644369006157, + 0.03243346884846687, + -0.008043370209634304, + -0.0018564749043434858, + 0.014613477513194084, + -0.02169814333319664, + -0.01459181122481823, + -0.013411033898591995, + 0.022618932649493217, + 0.029573604464530945, + -0.012945222668349743, + -0.024525510147213936, + 0.04567117989063263, + 0.027623696252703667, + 0.007350069936364889, + 0.021091505885124207, + -0.00541370315477252, + -0.023550555109977722, + 0.004815189633518457, + -0.00581722566857934, + 0.01914159767329693, + 0.01846996136009693, + 0.009180816821753979, + 0.0017088777385652065, + 0.025262141600251198, + 0.013887678273022175, + -0.012067764066159725, + -0.0015653427690267563, + -0.006732598878443241, + -0.012511909939348698, + -0.007041334640234709, + 0.053297486156225204, + -0.019856562837958336, + -0.00738798500970006, + -0.008855831809341908, + 0.052387528121471405, + 0.004189594183117151, + -0.008043370209634304, + 0.008585011586546898, + 0.009327059611678123, + -0.014732638373970985, + 0.02210978977382183, + -0.0069330064579844475, + 9.377161768497899e-05, + -0.003742740023881197, + 0.019239092245697975, + -0.027667028829455376, + 0.04987431317567825, + -0.011363630183041096, + 0.012555240653455257, + -0.03319176658987999, + 0.014765136875212193, + 0.025500463321805, + -0.016379227861762047, + 0.043829597532749176, + 0.02335556410253048, + 0.03304010629653931, + -0.037546563893556595, + -0.037546563893556595, + 0.009603297337889671, + -0.021015675738453865, + 0.018090812489390373, + -0.025023819878697395, + -0.002096151001751423, + 0.040774744004011154, + -0.0076588052324950695, + 0.015295945107936859, + 0.03054855950176716, + -0.01624923385679722, + -0.004677071236073971, + 0.01165611669421196, + 0.05390412360429764, + -0.0037535729352384806, + 0.007106331642717123, + -0.014830133877694607, + 0.0132052106782794, + 0.023702215403318405, + 0.02500215359032154, + -0.015696760267019272, + -0.017711663618683815, + -0.0038754420820623636, + 0.010285764932632446, + -0.006960088387131691, + -0.014017672277987003, + 0.012587739154696465, + -0.019856562837958336, + -0.002320932224392891, + -0.007268823683261871, + 0.033083438873291016, + -0.03195682540535927, + -0.013519362546503544, + 0.002832782920449972, + 0.00960871297866106, + 0.003886274993419647, + -0.004460414405912161, + -0.019694071263074875, + 0.008417102508246899, + -0.007490896619856358, + -0.022174786776304245, + -0.01384434662759304, + 0.007339237257838249, + -0.0014840966323390603, + 0.04224800691008568, + -0.016953367739915848, + -0.00843335222452879, + -0.0025308181066066027, + 0.004457706585526466, + 0.011027812957763672, + 0.011087393388152122, + 0.010805740021169186, + 0.039084821939468384, + 0.015133452601730824, + -0.02905363030731678, + 0.018123311921954155, + -0.038369856774806976, + 0.04016810655593872, + -0.01751667447388172, + -0.011536955833435059, + -0.02203396148979664, + -0.013649356551468372, + 0.0007149662706069648, + 0.03087354265153408, + -0.011027812957763672, + 0.03154517710208893, + 0.00979828741401434, + -0.005121216643601656, + 0.05186755210161209, + 0.02141648903489113, + 0.007095498498529196, + -0.0020338622853159904, + -0.02313890866935253, + 0.012316918931901455, + 0.0582805834710598, + 0.017083359882235527, + 0.034903354942798615, + 0.0006652029696851969, + -0.0004783368203788996, + -0.01908743381500244, + -0.046927787363529205, + -0.031025202944874763, + 0.020690690726041794, + 0.0373515710234642, + -0.038456518203020096, + 0.009294561110436916, + 0.00686259288340807, + 0.010529503226280212, + -0.048877693712711334, + -0.012046098709106445, + -0.02181730419397354, + -0.0033690077252686024, + -0.00685176020488143, + 0.008249194361269474, + 0.010670330375432968, + 0.051607564091682434, + 0.03345175459980965, + 0.016541719436645508, + -0.028576985001564026, + 0.003899815957993269, + -0.02768869325518608, + -0.017083359882235527, + 0.005763061344623566, + -0.00558973615989089, + -0.007095498498529196, + -0.005402870010584593, + 0.010605333372950554, + 0.046061161905527115, + -0.02066902443766594, + 0.05485741049051285, + 0.004048767499625683, + -0.01848079450428486, + -0.016606716439127922, + -0.043872930109500885, + 0.00473394338041544, + -0.02409219741821289, + 0.006131377536803484, + 0.012923557311296463, + -0.012046098709106445, + -0.00981453713029623, + 0.04057975113391876, + 0.0066621857695281506, + 0.024893825873732567, + -0.04207468032836914, + 0.057760607451200485, + 0.023052245378494263, + -0.010513254441320896, + -0.0034773359075188637, + 0.00039946031756699085, + -0.011515290476381779, + 0.01347603090107441, + -0.011753612197935581, + 0.0419013574719429, + 0.01967240497469902, + 0.010491588152945042, + 0.029486943036317825, + -0.0021069839131087065, + -0.007100915070623159, + 2.5960689526982605e-05, + 0.0057901437394320965, + -0.011439460329711437, + 0.00878000259399414, + 0.00661343801766634, + -0.013432699255645275, + 0.04021143540740013, + -0.011970268562436104, + 0.020528199151158333, + 0.004000019747763872, + 0.011493624188005924, + 0.04411125183105469, + 0.03288844972848892, + 0.0019526162650436163, + 0.008384604007005692, + 0.005156423430889845, + 0.024525510147213936, + -0.004761025309562683, + -0.01598924584686756, + 0.03466503322124481, + -0.010708244517445564, + -0.019542410969734192, + -0.009234980680048466, + -0.00439000129699707, + -0.00880166795104742, + 0.006023049354553223, + 0.0464511401951313, + -0.02459050714969635, + 0.012338584288954735, + 0.02099400945007801, + 0.004243758041411638, + -0.011482791975140572, + -0.0006577554158866405, + 0.00480435648933053, + -0.034080058336257935, + -0.015295945107936859, + -0.0678567960858345, + -0.006694684270769358, + -0.03364674746990204, + 0.02227228321135044, + -0.01117947231978178, + 0.006174708716571331, + 0.020896514877676964, + 0.0009532883414067328, + -0.014310157857835293, + -0.004089390393346548, + 0.024893825873732567, + -0.02946527674794197, + 0.013129380531609058, + -0.0028436158318072557, + -0.028663648292422295, + 0.0320868194103241, + 0.008167947642505169, + 0.021914798766374588, + -0.0020690690726041794, + -0.01950991339981556, + -0.00019752974912989885, + -0.010058275423943996, + -0.02677873708307743, + -0.015978412702679634, + 0.008070453070104122, + -0.0018253305461257696, + 0.0127502316609025, + -0.011471958830952644, + 0.03124186024069786, + 0.01574009098112583, + -0.032628461718559265, + -0.01506845559924841, + -0.03743823245167732, + 0.005595152731984854, + -0.008178780786693096, + -0.005012888461351395, + -0.02968193218111992, + -0.05286417156457901, + -0.004966848995536566, + 0.03637661784887314, + -0.011959435418248177, + 0.005643900483846664, + 0.024070531129837036, + 0.008335856720805168, + 0.011233637109398842, + -0.0018713700119405985, + 0.03343008831143379, + -0.005140174180269241, + 0.0153717752546072, + 0.022922251373529434, + -0.0024116570129990578, + 0.02376721240580082, + 0.025262141600251198, + -0.007653389126062393, + -0.01686670444905758, + 0.008601261302828789, + 0.019206594675779343, + 0.03501168265938759, + 0.037719886749982834, + -0.016888370737433434, + -0.001004067249596119, + -0.03637661784887314, + -0.019737401977181435, + -0.02950860746204853, + 0.00582805834710598, + 0.06179041787981987, + 0.003065688768401742, + -0.04757775738835335, + 0.00793504249304533, + -0.01186194084584713, + -0.011699448339641094, + -0.009229565039277077, + 0.0227705929428339, + -0.022922251373529434, + -0.02078818529844284, + -0.030591890215873718, + -0.025760451331734657, + 0.013270207680761814, + 0.03460003435611725, + -0.018004151061177254, + 0.015935081988573074, + -0.0025064442306756973, + -0.03810986876487732, + 0.008617510087788105, + -0.012262755073606968, + 0.0019471998093649745, + -0.004078557714819908, + -0.020647360011935234, + 0.038868166506290436, + 0.011796943843364716, + 0.004035226535052061, + 0.04352628067135811, + 0.006640519946813583, + -0.003344633849337697, + 0.007593808230012655, + 0.06287369877099991, + 0.009597880765795708, + -0.006895091384649277, + 0.01863245479762554, + -0.002136774128302932, + 0.018773281946778297, + -0.004974973853677511, + -0.00137712259311229, + -0.014916796237230301, + 0.004874770063906908, + 0.0023507224395871162, + -0.028013678267598152, + -0.016151737421751022, + -0.025760451331734657, + 0.03245513513684273, + -0.009099571034312248, + 0.010957399383187294, + -0.015360942110419273, + 0.02963860146701336, + -0.004154387395828962, + -0.014960127882659435, + 0.014765136875212193, + 0.040233101695775986, + -0.014017672277987003, + 0.009435388259589672, + -0.0005365632241591811, + 0.01661754958331585, + -0.04363460838794708, + 0.00607721321284771, + 0.013107715174555779, + -0.0075613101944327354, + 0.018794946372509003, + 0.005492241121828556, + -0.00746923079714179, + 0.005703480914235115, + 0.02818700298666954, + -0.007176744751632214, + -0.024850495159626007, + 0.023117242380976677, + -0.0027312252204865217, + -0.009803703986108303, + 0.04057975113391876, + 0.014505148865282536, + -0.0016398184234276414, + -0.03678826615214348, + 0.018784113228321075, + 0.013183544389903545, + 0.002832782920449972, + 0.04094806686043739, + 0.014645976014435291, + 0.031046869233250618, + 0.004227508790791035, + 0.02066902443766594, + 0.0005517968675121665, + -0.01926075853407383, + 0.017841657623648643, + -0.0307435505092144, + -0.004384584724903107, + 0.004040642641484737, + 0.04419791325926781, + -0.006878842134028673, + 0.005616818554699421, + 0.002792160026729107, + 0.009863284416496754, + 0.028620315715670586, + -0.0021340660750865936, + -0.04083973914384842, + -0.016270898282527924, + -0.05455409362912178, + 0.006710933521389961, + 0.04083973914384842, + 0.016595883294939995, + -0.0034069225657731295, + 0.020777354016900063, + -5.0863487558672205e-05, + 0.02918362244963646, + 0.036593273282051086, + 0.007745468057692051, + 0.02777535654604435, + -0.02124316431581974, + -0.01393100991845131, + -0.004116472322493792, + 0.02591211162507534, + 0.026540415361523628, + -0.00740965036675334, + 0.005963468458503485, + -0.002824658527970314, + 0.0031144365202635527, + 0.001378476619720459, + -0.037589892745018005, + 0.022044792771339417, + -0.0023155156522989273, + -0.005600569304078817, + -0.008200446143746376, + 0.007534227799624205, + 0.016845038160681725, + -0.01744084432721138, + -0.012089429423213005, + 0.035856641829013824, + 0.010258683003485203, + -0.0003447884228080511, + -0.026800401508808136, + 0.002203125273808837, + 0.009440804831683636, + -0.030028583481907845, + -0.009039990603923798, + -0.005272876471281052, + 0.009928281418979168, + 0.006023049354553223, + 0.0546407550573349, + 0.008525431156158447, + 0.02381054311990738, + -0.006071797106415033, + -0.03514167666435242, + -0.0043520862236619, + 0.010166604071855545, + -0.00975495669990778, + -0.014743471518158913, + 0.02157898247241974, + 0.03728657588362694, + -0.014331824146211147, + 0.05442409962415695, + -0.023485558107495308, + -0.019943226128816605, + -0.008612093515694141, + 0.012013600207865238, + -0.006938422564417124, + -0.004325004294514656, + -0.005995966959744692, + 0.051564235240221024, + -0.0018998062005266547, + -0.006093462463468313, + 0.013692687265574932, + -0.006337201222777367, + -0.0007515270262956619, + 0.0009512571850791574, + 0.0188924428075552, + 0.05459742620587349, + -0.006348033901304007, + 0.007035918068140745, + -0.02335556410253048, + 0.016151737421751022, + 0.00795670785009861, + 0.029443610459566116, + 0.0074583981186151505, + 0.0016641922993585467, + -0.02946527674794197, + 0.016725877299904823, + 0.02454717457294464, + 0.009511218406260014, + -0.011796943843364716, + 0.04356960952281952, + 0.03410172462463379, + 0.019434083253145218, + 0.03574831411242485, + 0.023247236385941505, + -0.0021381282713264227, + -0.06668685376644135, + -0.005958052352070808, + -0.019737401977181435, + -0.036224957555532455, + 0.002234269632026553, + 0.026692073792219162, + 0.02992025576531887, + 0.04274631664156914, + -0.01921742595732212, + -0.005903888028115034, + -0.01846996136009693, + -0.01926075853407383, + -0.0026107102166861296, + 0.02781868726015091, + -0.017061695456504822, + -0.005386620759963989, + -0.0026134182699024677, + 0.01004744227975607, + -0.03392839804291725, + 0.036809928715229034, + 0.00818419735878706, + -0.014537647366523743, + 0.019000770524144173, + -0.0031333938241004944, + -0.005584320053458214, + -0.0067759305238723755, + -0.01484096609055996, + 0.010128688998520374, + -0.007756300736218691, + 0.04361294209957123, + -0.008736670948565006, + -0.043287958949804306, + 0.006006800103932619, + 0.011807776056230068, + -0.00425729900598526, + -0.012013600207865238, + -0.03158850967884064, + -0.008839583024382591, + 0.013779349625110626, + -0.007333820685744286, + 0.055940695106983185, + -0.034860022366046906, + -0.018448296934366226, + -0.03202182427048683, + -0.00979287177324295, + -0.009673709981143475, + -0.01880577951669693, + -0.008530847728252411, + 0.004173344932496548, + 0.042464662343263626, + 0.00872042216360569, + -0.059450529515743256, + 0.002840907545760274, + 0.03806653618812561, + 0.02099400945007801, + 0.004855812527239323, + -0.01270690094679594, + 0.00212323316372931, + 0.007490896619856358, + 0.018740782514214516, + 0.03206515312194824, + -0.001734605641104281, + -0.01454848051071167, + 0.0011252594413235784, + 0.003978353925049305, + -0.029313616454601288, + 0.02066902443766594, + 0.00849293265491724, + 0.011796943843364716, + 0.010388677008450031, + -0.014645976014435291, + 0.02417885884642601, + 0.016953367739915848, + 0.018859943374991417, + -0.018567457795143127, + 0.0005277615855447948, + -0.034405045211315155, + -0.01025326643139124, + 0.008893746882677078, + -0.014830133877694607, + 0.006456362083554268, + 0.022922251373529434, + -0.013389368541538715, + -0.013887678273022175, + 0.00529183354228735, + -0.012414414435625076, + 0.016433391720056534, + -0.0211673341691494, + -0.013140213675796986, + 0.02313890866935253, + -0.0021814596839249134, + 0.012511909939348698, + -0.0021922923624515533, + 0.020517366006970406, + 0.04558451473712921, + -0.015285111963748932, + 0.015350108966231346, + -0.003274220507591963, + 0.03050522692501545, + 0.0014746179804205894, + 0.015501768328249454, + -0.07179994881153107, + -0.020755687728524208, + -0.016314230859279633, + 0.02404886484146118, + -0.012327752076089382, + 0.000824648595880717, + -0.010193686001002789, + -0.016920868307352066, + 0.01698586530983448, + -0.007360902614891529, + ], + "index": 99, + }, + { + "title": "Jarkko Wiss", + "text": "Jarkko Wiss (born 17 April 1972) is a Finnish former footballer. Wiss is currently working as a manager of the Finland national under-18 football team.", + "vector": [ + 0.006705993786454201, + 0.04774228855967522, + -0.008756163530051708, + -0.04268447309732437, + -0.011321617290377617, + 0.04590042307972908, + 0.04107649624347687, + 0.009333573281764984, + -0.03189640864729881, + 0.019456516951322556, + -0.03610638529062271, + -0.002424755599349737, + -0.027174806222319603, + 0.004699677228927612, + -0.0427137054502964, + 0.014354846440255642, + 0.0020465156994760036, + 0.0397024042904377, + -0.04142732545733452, + -0.028402715921401978, + 0.04861936718225479, + 0.022935593500733376, + -0.015538902021944523, + -0.013046537525951862, + 0.029469827190041542, + -0.028037264943122864, + 0.014822620898485184, + 0.020640572533011436, + -0.028899725526571274, + 0.02362263947725296, + 0.03692499175667763, + 0.023798054084181786, + 0.016606014221906662, + -0.06198019161820412, + 0.013718964532017708, + 0.038416024297475815, + 0.024426627904176712, + 0.01893027126789093, + -0.03534625098109245, + 0.004436553921550512, + 0.026063838973641396, + -0.005565791856497526, + 0.004560806322842836, + 0.014917638152837753, + 0.00958938803523779, + 0.011818628758192062, + -0.044994112104177475, + -0.006124929059296846, + -0.008478422649204731, + -0.03572631627321243, + 0.07273901998996735, + 0.02276017889380455, + 0.016006676480174065, + -0.02898743376135826, + 0.010780752636492252, + -0.028621984645724297, + 0.019544225186109543, + 0.09068988263607025, + -0.0154658118262887, + 0.03449840843677521, + -0.018330933526158333, + -0.0025617992505431175, + 0.001768774352967739, + -0.029996072873473167, + 0.023388750851154327, + -0.011007331311702728, + 0.0015586409717798233, + 0.015202688053250313, + 0.001157560502178967, + 0.044350918382406235, + -0.0006367953028529882, + -0.013543548993766308, + 0.020128944888710976, + -0.029732950031757355, + -0.03552166745066643, + -0.024207357317209244, + 0.05353100597858429, + 0.015085744671523571, + 0.04347384348511696, + 0.0007290712092071772, + 0.0004184393910691142, + -0.05221538618206978, + -0.06630711257457733, + -0.0036764193791896105, + -0.03414757549762726, + -0.03613562136888504, + 0.012695706449449062, + -0.0567469596862793, + -0.031194746494293213, + -0.0012425273889675736, + -0.016547542065382004, + 0.049876511096954346, + 0.011306999251246452, + 0.04136885330080986, + 0.008814635686576366, + -0.011204673908650875, + 0.006314963102340698, + -0.02081598900258541, + 0.001997180050238967, + 0.009684405289590359, + 0.02422197535634041, + -0.009757494553923607, + -0.012023280374705791, + -0.05013963580131531, + 0.018915653228759766, + -0.05148448795080185, + -0.006881409324705601, + 0.015787407755851746, + 0.031867172569036484, + 0.028417332097887993, + 0.051221366971731186, + 0.025903042405843735, + -0.03645721450448036, + 0.018594058230519295, + 0.017190732061862946, + 0.030434612184762955, + -0.005419612396508455, + -0.0340891070663929, + 0.002591035095974803, + 0.031107040122151375, + -0.010612646117806435, + -0.0029016670305281878, + -0.0015979268355295062, + 0.024441245943307877, + 0.002474091248586774, + 0.03274425119161606, + 0.01260799914598465, + 0.015275778248906136, + -0.0028340588323771954, + -0.019573461264371872, + -0.05329711735248566, + 0.014903020113706589, + -0.04414626955986023, + -0.011182746849954128, + 0.02138608880341053, + 0.03750970959663391, + -0.04233364015817642, + -0.006855827756226063, + -0.009077759459614754, + 0.053735654801130295, + 0.0737915113568306, + 0.0033146245405077934, + 0.03160405158996582, + -0.00278837769292295, + 0.023286426439881325, + -0.004897019825875759, + 0.02898743376135826, + -0.0030515012331306934, + -0.049905747175216675, + -0.009340882301330566, + 0.03417681157588959, + -0.024061178788542747, + -0.04420474171638489, + -0.020158180966973305, + -0.007762141991406679, + 0.0223070215433836, + 0.009106995537877083, + -0.009720949456095695, + 0.014471789821982384, + 0.0154658118262887, + -0.0028413678519427776, + -0.007056824862957001, + -0.016971463337540627, + 0.00019254606741014868, + -0.045666538178920746, + 0.004001669120043516, + -0.06127852946519852, + 0.019412662833929062, + 0.01933957450091839, + -0.0027207694947719574, + -0.012220622971653938, + 0.028651220723986626, + 0.014340228401124477, + 0.02467513270676136, + 0.02977680414915085, + 0.0034352228976786137, + 0.0052843960002064705, + 0.0382990799844265, + -0.004681404680013657, + 0.012308330275118351, + -0.017950866371393204, + 0.01895950734615326, + 0.007586726453155279, + -0.018623292446136475, + -0.05736091360449791, + -0.023067155852913857, + -0.005448848009109497, + 0.014120958745479584, + 0.05247851088643074, + -0.04689444601535797, + 0.016006676480174065, + 0.03745123744010925, + 0.0406087189912796, + -0.017497709020972252, + 0.004027250688523054, + -0.005503665655851364, + 0.034586116671562195, + 0.014259829185903072, + -0.03949775546789169, + 0.003734891302883625, + 0.05318017303943634, + -0.03502465412020683, + -0.02238011173903942, + 0.011979426257312298, + 0.0152903962880373, + 0.025040581822395325, + 0.014369464479386806, + -0.04128114506602287, + -0.04844395071268082, + -0.017029935494065285, + 0.005510974675416946, + 0.013507003895938396, + 0.054466553032398224, + -0.021079111844301224, + -0.00906314142048359, + -0.03172099590301514, + 0.030405376106500626, + 0.006420942954719067, + 0.041515033692121506, + -0.015743553638458252, + -0.0015211824793368578, + -0.016971463337540627, + 0.020640572533011436, + -0.026063838973641396, + 0.034206047654151917, + 0.00071216921787709, + 0.024441245943307877, + -0.025449885055422783, + -0.022175459191203117, + 0.03405987098813057, + 0.035697080194950104, + 0.045023348182439804, + 0.03025919757783413, + -0.035317014902830124, + -0.013119627721607685, + -0.0302299614995718, + 0.027145570144057274, + -2.2983331291470677e-05, + 0.014617969281971455, + -0.04771305248141289, + 0.031048567965626717, + 0.011270454153418541, + -0.01825784333050251, + -0.011562814004719257, + -0.033855218440294266, + -0.011979426257312298, + -0.04549112170934677, + 0.013916307128965855, + -0.076598159968853, + 0.021824628114700317, + -0.003608811181038618, + 0.0010780752636492252, + -0.0255668293684721, + -0.03657415881752968, + -0.005529247224330902, + -0.006972771603614092, + 0.0074551645666360855, + -0.02786185033619404, + 0.04245058447122574, + 0.013178099878132343, + -0.005653499625623226, + -0.015875114127993584, + -0.03020072542130947, + -0.011211982928216457, + -0.05285857990384102, + 0.008624602109193802, + -0.04686520993709564, + -0.03511236235499382, + 0.02786185033619404, + -0.0037458548322319984, + -0.008069119416177273, + 0.06010909005999565, + 0.00422093877568841, + 0.07431776076555252, + 0.03686651960015297, + -0.015275778248906136, + 0.0003460347361396998, + 0.03435222804546356, + -0.011116965673863888, + 0.0822114646434784, + 0.027247894555330276, + 0.017497709020972252, + 0.008573438972234726, + 0.001554986578412354, + 0.008273771032691002, + 0.024952873587608337, + -0.021941572427749634, + -0.0019715987145900726, + 0.031048567965626717, + 0.031077804043889046, + -0.033855218440294266, + -0.013879762031137943, + 0.006632903590798378, + -0.018667146563529968, + 0.06291574239730835, + -0.06069381162524223, + 0.0046777501702308655, + 0.009932910092175007, + -0.01358009409159422, + 0.012023280374705791, + 0.005364794749766588, + 0.03622332960367203, + -0.05455426126718521, + -0.05528515949845314, + -0.039146922528743744, + -0.02384190820157528, + -0.009026596322655678, + 0.04306453838944435, + 0.008734236471354961, + 0.03449840843677521, + -0.008851180784404278, + 0.0212545283138752, + -0.029835276305675507, + -0.008368787355720997, + -0.026794739067554474, + 0.019076449796557426, + 0.023958852514624596, + 0.03160405158996582, + -0.03403063490986824, + 0.03166252374649048, + 0.03327050060033798, + 0.007181077729910612, + -0.03484924137592316, + 0.015129598788917065, + 0.05046123266220093, + -0.012673779390752316, + 0.0059166233986616135, + 0.028066501021385193, + -0.04861936718225479, + 0.01449371688067913, + 0.03964393213391304, + -0.032451894134283066, + -0.03063926473259926, + -0.04133961722254753, + 0.024631278589367867, + -0.03139939904212952, + -0.08835101127624512, + -0.025464503094553947, + -0.049730334430933, + 0.0032433620654046535, + 0.004568115342408419, + 0.025683771818876266, + -0.006537886802107096, + -0.010861151851713657, + -0.028271153569221497, + -0.012534908950328827, + 0.04037483036518097, + -0.01831631548702717, + -0.007034897804260254, + 0.010203342884778976, + 0.0005084312288090587, + -0.014734913595020771, + 0.02729174867272377, + 0.018520968034863472, + 0.019324956461787224, + 0.007623271085321903, + 0.045666538178920746, + -0.006033566780388355, + -0.013667801395058632, + -0.016430597752332687, + -0.008821944706141949, + 0.0151149807497859, + -0.010013309307396412, + 0.0022091406863182783, + 0.04455557093024254, + 0.014756840653717518, + 0.045666538178920746, + -0.013711655512452126, + -0.08022341877222061, + 0.01828707940876484, + 0.029294410720467567, + -0.008975433185696602, + 0.030434612184762955, + 0.0706925019621849, + 0.03239342197775841, + -0.04721604287624359, + -0.047479163855314255, + -0.006830246187746525, + -0.016810664907097816, + -0.003402332542464137, + -0.002455818932503462, + -0.02422197535634041, + -0.019134921953082085, + 0.037422001361846924, + 0.016240565106272697, + 0.00620167376473546, + 0.013565476052463055, + 0.0007034898153506219, + 0.010298359207808971, + -0.038796089589595795, + -0.009925601072609425, + 0.018696382641792297, + -0.005942204501479864, + -0.015611991286277771, + -0.007871776819229126, + -0.009545533917844296, + 0.02923593856394291, + -0.009604006074368954, + -0.01969040557742119, + -0.032159533351659775, + -0.028753546997904778, + 0.0021963499020785093, + -0.0072541674599051476, + -0.05832570046186447, + -0.0034918675664812326, + -0.024748222902417183, + -0.035287778824567795, + 0.01219138689339161, + 0.00010301100701326504, + -0.0061797467060387135, + 0.0295282993465662, + -0.01966116949915886, + -0.027598727494478226, + -0.025318322703242302, + 0.002667779568582773, + 0.01742462068796158, + 0.03441070020198822, + 0.001052493811585009, + 0.00823722593486309, + -0.008134899660944939, + -0.008931579068303108, + -0.015085744671523571, + 0.015275778248906136, + 0.01847711391746998, + 0.01569969952106476, + 0.05809181183576584, + -0.020611336454749107, + 0.05242003872990608, + 0.031223982572555542, + 0.020611336454749107, + -0.035287778824567795, + -0.013843216933310032, + 3.2890431612031534e-05, + 0.026341581717133522, + -0.004897019825875759, + 0.0014736740849912167, + -0.030463848263025284, + 0.04897020012140274, + 0.0015476775588467717, + -0.019734259694814682, + 0.03262730687856674, + -0.004199011716991663, + -0.004407317843288183, + 0.02289174124598503, + 0.014099031686782837, + 0.0156412273645401, + -0.04277217760682106, + 0.037714362144470215, + 0.027730287984013557, + 0.0840240865945816, + 0.014932256191968918, + -0.032130297273397446, + 0.03791901469230652, + -0.021590741351246834, + -0.0008030746830627322, + 0.009472444653511047, + 0.006844864226877689, + 0.02680935710668564, + -0.015582755208015442, + -0.039117686450481415, + 0.019266484305262566, + 0.02664855867624283, + -0.05350176990032196, + 0.004611969459801912, + -0.015158834867179394, + -0.03373827412724495, + 0.01701531745493412, + 0.043210718780756, + -0.002735387533903122, + -0.01650368794798851, + 0.023374132812023163, + -0.022833269089460373, + -0.004831239115446806, + 0.027817996218800545, + 0.042596764862537384, + 0.054788149893283844, + 0.01742462068796158, + 0.0005801506922580302, + -0.01976349577307701, + -0.03172099590301514, + 0.04446786269545555, + 0.01286381296813488, + -0.05730244144797325, + 0.03476153314113617, + 0.07431776076555252, + -0.020435921847820282, + 0.06157088652253151, + -0.027876468375325203, + 0.010795370675623417, + -0.011087729595601559, + 0.09121613204479218, + 0.010824606753885746, + 0.003775090677663684, + -0.005291705019772053, + -0.036281801760196686, + 0.005394030828028917, + 0.03294890373945236, + -0.013609330169856548, + -0.031867172569036484, + -0.010875768959522247, + 0.012008662335574627, + -0.01083922479301691, + -0.002687879139557481, + 0.07367456704378128, + 0.01739538460969925, + -0.030493084341287613, + 0.03020072542130947, + 0.018184754997491837, + 0.011402016505599022, + -0.01882794499397278, + 0.012505672872066498, + 0.010524937883019447, + -0.01803857460618019, + -0.034235283732414246, + -0.022423965856432915, + 0.008566129952669144, + -0.04476022347807884, + -0.0266193225979805, + 0.03230571374297142, + 0.002764623612165451, + -0.02508443593978882, + -0.00599336763843894, + -0.019017977640032768, + -0.010159488767385483, + 0.0562499463558197, + 0.01101464033126831, + 0.006811973638832569, + -0.04207051545381546, + -0.0032908704597502947, + 0.014449862763285637, + -0.005598682444542646, + 0.0055475193075835705, + -0.006684066727757454, + 0.016971463337540627, + -0.06408517807722092, + 0.02604922279715538, + -0.011562814004719257, + -0.00543423043563962, + 0.017161495983600616, + 0.05066588148474693, + 0.04493563994765282, + -0.011073111556470394, + -0.015217306092381477, + 0.007414964959025383, + -0.00013293216761667281, + 0.005887387320399284, + -0.03160405158996582, + -0.004728913307189941, + 0.006062802858650684, + 0.0205528661608696, + -0.01174553856253624, + -0.008990051224827766, + 0.045081816613674164, + -0.022833269089460373, + 0.03593096882104874, + -0.01602129451930523, + 0.0009291546884924173, + -0.02017279900610447, + -0.01442793570458889, + -0.04768381640315056, + 0.027715669944882393, + 0.010605337098240852, + -0.0018491731025278568, + 0.01035683136433363, + 0.04031636193394661, + 0.041515033692121506, + -0.0560452938079834, + 0.021619977429509163, + -0.052653927356004715, + 0.03537548705935478, + 0.03517083451151848, + 0.03099009580910206, + -0.02221931330859661, + -0.0020154525991529226, + -0.014639896340668201, + 0.009552842937409878, + 0.014237902127206326, + -0.033884454518556595, + 0.03677881136536598, + 0.0046448600478470325, + 0.018301697447896004, + -0.005912968888878822, + -0.015933586284518242, + 0.05326788127422333, + -0.0004090747388545424, + 0.046397436410188675, + 0.016445215791463852, + 0.028812017291784286, + -0.01201597135514021, + 0.014822620898485184, + -0.004915292374789715, + -0.036661867052316666, + 0.02793494053184986, + 0.03821137174963951, + 0.001878409064374864, + -0.016109002754092216, + -0.011380089446902275, + -0.010079090483486652, + 0.04785923287272453, + -0.002130569191649556, + -0.02648776024580002, + 0.012454509735107422, + -0.005967786069959402, + 0.019997382536530495, + -0.0058033340610563755, + -0.022497056052088737, + 0.010539555922150612, + -0.012805341742932796, + -0.02694091759622097, + -0.01244720071554184, + 0.04835624247789383, + -0.04651438072323799, + 0.0115043418481946, + 0.007864467799663544, + -0.0005294446018524468, + 0.004264792427420616, + -0.020669808611273766, + -0.02221931330859661, + 0.010751516558229923, + 0.02378343604505062, + -0.01726382225751877, + 0.020055854693055153, + 0.001746847410686314, + 0.013638565316796303, + 0.03344591334462166, + -0.0030350559391081333, + -0.021429942920804024, + -0.022497056052088737, + -0.010400685481727123, + -0.002167114056646824, + 0.006117620505392551, + 0.003722100518643856, + -0.0020245888736099005, + 0.00041478488128632307, + -0.01841864176094532, + 0.010093707591295242, + 0.06613169610500336, + 0.0036453562788665295, + -0.015246542170643806, + -0.007107987534254789, + 0.044380154460668564, + 0.0378020703792572, + -0.029323646798729897, + 0.004085722379386425, + -0.05250774696469307, + -0.03581402450799942, + 0.023403368890285492, + -0.06724265962839127, + 0.017804687842726707, + -0.0031921991612762213, + -0.02413426712155342, + 0.02202928066253662, + 0.04005323722958565, + 0.0219561904668808, + 0.010634573176503181, + -0.014866475015878677, + 0.039819348603487015, + 0.013382751494646072, + -0.023227954283356667, + -0.02243858389556408, + 0.009808657690882683, + -0.014946874231100082, + -0.017833922058343887, + 0.017293058335781097, + -0.04414626955986023, + 0.019061831757426262, + -0.01358009409159422, + 0.034966181963682175, + -0.022994065657258034, + -0.014501025900244713, + 0.017117641866207123, + -0.003537548705935478, + -0.002145186997950077, + -0.02202928066253662, + 0.004973764065653086, + -0.011730920523405075, + -0.012454509735107422, + -0.05584064498543739, + 0.028651220723986626, + -0.006022603716701269, + 0.014778767712414265, + -0.016942227259278297, + 0.024821313098073006, + -0.016927609220147133, + 0.02144456095993519, + 0.022263167425990105, + 0.026034604758024216, + 0.02192695438861847, + -0.0019588079303503036, + -0.012352184392511845, + 0.004118612967431545, + 0.019573461264371872, + 0.038825325667858124, + 0.030083781108260155, + 0.02221931330859661, + 0.008551511913537979, + -0.020509012043476105, + -0.04718680679798126, + 0.013287734240293503, + 0.005320941098034382, + -0.01306846458464861, + 0.035609375685453415, + -0.018520968034863472, + -0.0005623350152745843, + 0.02049439400434494, + -0.010736898519098759, + -0.0015586409717798233, + -0.00911430362612009, + -0.01682528294622898, + -0.029645241796970367, + 0.020830607041716576, + -0.03099009580910206, + 0.01966116949915886, + -0.009947528131306171, + 0.04034559801220894, + 0.015933586284518242, + 0.0049956911243498325, + 0.020421303808689117, + -0.04002400115132332, + 0.05794563144445419, + 0.019032595679163933, + 0.03692499175667763, + -0.04037483036518097, + -0.04932102933526039, + 0.030376140028238297, + -0.027788760140538216, + -0.009194702841341496, + 0.022555526345968246, + -0.006077420897781849, + -8.342520595761016e-05, + -0.04999345541000366, + 0.014734913595020771, + -0.01742462068796158, + 0.007937557063996792, + -0.020918315276503563, + 0.03540472313761711, + -0.05399877950549126, + 0.014786076731979847, + -0.007126260083168745, + -0.018199373036623, + 0.016415979713201523, + -0.045344941318035126, + -0.04660208895802498, + -0.033387441188097, + -0.009669787250459194, + -0.03938081115484238, + -0.007513636257499456, + 0.0013549030991271138, + 0.008653838187456131, + 0.04277217760682106, + -0.018053192645311356, + 0.013075773604214191, + 0.02295021153986454, + -0.004089376889169216, + -0.016620632261037827, + -0.021619977429509163, + -0.0013265807647258043, + -0.00028596402262337506, + -0.00646479707211256, + -0.05320940911769867, + 0.01637212559580803, + -0.018623292446136475, + -0.0056352270767092705, + 0.0005216787685640156, + 0.04823929816484451, + -0.00699835317209363, + -0.005423266906291246, + -0.0223070215433836, + -0.0051455250941216946, + 0.011906336061656475, + 0.05622071027755737, + -0.017293058335781097, + 0.04160274192690849, + 0.021810010075569153, + -0.0014727604575455189, + -0.018974125385284424, + -0.018462495878338814, + -0.015626609325408936, + 0.002638543490320444, + -0.031428635120391846, + -0.05002269148826599, + -0.018155518919229507, + -0.05326788127422333, + -0.008390714414417744, + 0.022233931347727776, + 0.031487107276916504, + 0.048853255808353424, + 0.007056824862957001, + -0.027540255337953568, + 0.05759480223059654, + -0.013002684339880943, + 0.014544880017638206, + 0.007097024470567703, + -0.01163590420037508, + 0.008990051224827766, + -0.012666470371186733, + 0.013587403111159801, + -0.005605991464108229, + 0.03745123744010925, + -0.03125321865081787, + -0.013214644975960255, + 0.004224593285471201, + 0.0312824547290802, + 0.020216651260852814, + 0.006325926166027784, + -0.033884454518556595, + -0.015246542170643806, + -0.020918315276503563, + 0.043678492307662964, + 0.01007178146392107, + 0.025318322703242302, + 0.024148885160684586, + 0.0011867964640259743, + 0.006899681873619556, + -0.06338351964950562, + -0.011847864836454391, + -0.03724658489227295, + 0.015392721630632877, + -0.009991382248699665, + -0.06993236392736435, + -0.04926255717873573, + 0.02387114427983761, + 0.016971463337540627, + -0.01863791048526764, + -0.04429244622588158, + -0.010035236366093159, + 0.005368449259549379, + -0.009852511808276176, + -0.011577432043850422, + -0.053706418722867966, + -0.024412009865045547, + 0.0166937205940485, + -0.027467165142297745, + -0.010210651904344559, + -0.05040276050567627, + -0.012169459834694862, + 0.02186848223209381, + 0.02292097732424736, + 0.003131899982690811, + 0.020406685769557953, + 0.008324934169650078, + -0.019222630187869072, + -0.024075796827673912, + 0.020976785570383072, + 0.01688375510275364, + -0.027744906023144722, + -0.04095955193042755, + -0.049876511096954346, + 0.015611991286277771, + -0.0418073944747448, + -0.009487062692642212, + -0.006205328274518251, + 0.003141036257147789, + 0.0026330617256462574, + 0.00608107540756464, + 0.017190732061862946, + -0.008069119416177273, + 0.00289253075607121, + 0.033592093735933304, + -0.010312977246940136, + 0.004962800536304712, + -0.0036727648694068193, + -0.016620632261037827, + -0.024850549176335335, + 0.00958938803523779, + -0.05449578911066055, + 0.02071366272866726, + -0.03788977861404419, + -0.008916961029171944, + 0.002446682658046484, + 0.021751537919044495, + 0.01704455353319645, + -0.007586726453155279, + 0.014018632471561432, + -0.004728913307189941, + 0.014515643939375877, + -0.031867172569036484, + 0.014435244724154472, + -0.01898874342441559, + 0.013507003895938396, + 0.029996072873473167, + -0.02821268141269684, + -0.01425252016633749, + 0.018535586073994637, + -0.03786054253578186, + 0.015173452906310558, + 0.005923932418227196, + -0.021619977429509163, + 0.010371449403464794, + 0.009823275730013847, + 0.017146877944469452, + -0.00965516921132803, + -0.022263167425990105, + 0.014384082518517971, + 0.004111303947865963, + 0.026034604758024216, + -0.01672295667231083, + -0.004199011716991663, + -0.024909019470214844, + 0.016415979713201523, + -0.01192095410078764, + -0.013806672766804695, + 0.027876468375325203, + 0.005931240972131491, + -0.014201357960700989, + -0.004114958457648754, + 0.00318854465149343, + 4.376825745566748e-05, + 0.05239080265164375, + -0.005843533203005791, + 0.026692412793636322, + -0.011774774640798569, + -0.059290483593940735, + 0.03443993628025055, + 0.0016070629935711622, + 0.014055177569389343, + -0.012206004932522774, + 0.0291774682700634, + -0.0009323523845523596, + 0.006110311485826969, + 0.04806388542056084, + -0.003194026416167617, + 0.010407994501292706, + -0.021663831546902657, + 0.004951837006956339, + 0.007827922701835632, + 0.0003455779515206814, + -0.032861195504665375, + 0.014310992322862148, + 0.03265654295682907, + -0.055811408907175064, + -0.00442924490198493, + 0.02381267212331295, + -0.0003805240266956389, + -0.009794039651751518, + 0.023037919774651527, + 0.032539598643779755, + 0.016299035400152206, + 0.03096085973083973, + -0.04405856132507324, + 0.019237248227000237, + 0.04970109835267067, + -0.008997360244393349, + 0.03604791313409805, + 0.002792032202705741, + -0.01104387640953064, + -0.03952699154615402, + -0.06192171946167946, + -0.02888510748744011, + 0.043210718780756, + 0.06490378826856613, + -0.012374111451208591, + -0.007652507163584232, + 0.020801370963454247, + -0.016971463337540627, + -0.012776105664670467, + -0.005156488623470068, + 0.01663525030016899, + 0.014435244724154472, + -0.011672448366880417, + 0.002494191052392125, + -0.026443907991051674, + -0.04587118700146675, + 0.017790069803595543, + 0.001997180050238967, + 0.014186739921569824, + -0.051981501281261444, + 0.0073418752290308475, + 0.01463258732110262, + 0.017833922058343887, + -0.002104987623170018, + 0.015407339669764042, + 0.019047213718295097, + 0.036691103130578995, + 0.0012005007592961192, + 0.024850549176335335, + -0.019924292340874672, + 0.0018080601003021002, + 0.05119213089346886, + 0.0061212750151753426, + -0.004381736274808645, + 0.023403368890285492, + 0.005682735703885555, + -0.03403063490986824, + 0.0347907692193985, + 0.01707378774881363, + -0.0011201018933206797, + 0.010539555922150612, + -0.0013649528846144676, + 0.011350853368639946, + -0.02106449380517006, + -0.02993760257959366, + 0.017673125490546227, + 0.0039029978215694427, + -0.029513681307435036, + -0.022000044584274292, + 0.011928263120353222, + -0.034936945885419846, + 0.044672515243291855, + -0.003935888409614563, + 0.009004669263958931, + -0.003206817200407386, + -0.011511650867760181, + -0.008478422649204731, + 0.008807326667010784, + 0.024616660550236702, + -0.03262730687856674, + 0.02224854938685894, + -0.009004669263958931, + -0.0018053192179650068, + -0.003141036257147789, + -0.031487107276916504, + 0.019734259694814682, + -0.0033529968932271004, + 0.01463258732110262, + -0.05984596908092499, + 0.004228247795253992, + 0.019237248227000237, + 0.005518283694982529, + 0.05142601579427719, + -0.003360305679962039, + -0.01931033842265606, + 0.06373434513807297, + 0.04516952484846115, + -0.006424597464501858, + 0.04335689917206764, + 0.007696360815316439, + -0.0015796542866155505, + 0.01985120214521885, + 0.021108347922563553, + 0.03020072542130947, + -0.03332896903157234, + 0.03473229706287384, + 0.015875114127993584, + 0.007835231721401215, + 0.006980080623179674, + -0.002000834560021758, + 0.017994720488786697, + -0.020962169393897057, + 0.007334566209465265, + 0.026853209361433983, + 0.013046537525951862, + 0.021283764392137527, + -0.00782061368227005, + -0.02977680414915085, + -0.012586072087287903, + -0.008536893874406815, + -0.0026093076448887587, + 0.012140223756432533, + 0.002792032202705741, + -0.012235241010785103, + 0.013770127668976784, + 0.023198718205094337, + 0.008069119416177273, + -0.03335820510983467, + 0.024602042511105537, + 0.0028907035011798143, + -0.006475760601460934, + 0.03648645058274269, + 0.02604922279715538, + 0.007908321917057037, + -0.010291050188243389, + -0.024952873587608337, + 0.027891086414456367, + 0.012973448261618614, + -0.0368957556784153, + 0.026882445439696312, + 0.03993629291653633, + 0.027686433866620064, + 0.009333573281764984, + 0.006782738026231527, + 0.0206551905721426, + -0.006950844544917345, + 0.0340891070663929, + 0.058881182223558426, + 0.021079111844301224, + -0.019061831757426262, + -0.021473797038197517, + -0.01701531745493412, + 0.01612362079322338, + -0.01966116949915886, + -0.045403413474559784, + -0.02812497317790985, + 0.0032671161461621523, + 0.0024137923028320074, + -0.00033529967186041176, + 0.023768818005919456, + 0.012008662335574627, + 0.012132914736866951, + 0.05209844559431076, + -0.005364794749766588, + -0.014515643939375877, + 0.018433259800076485, + 0.02537679485976696, + 0.00043054489651694894, + -0.0067352293990552425, + -0.04686520993709564, + -0.03593096882104874, + -0.004546188749372959, + 0.009172775782644749, + 0.02642928995192051, + -0.0291774682700634, + -0.024251211434602737, + 0.007184732239693403, + 0.002126914681866765, + 0.03099009580910206, + 0.011211982928216457, + 0.019705023616552353, + -0.025128290057182312, + 0.014237902127206326, + -0.02238011173903942, + 0.0354924313724041, + 0.018374787643551826, + -0.011928263120353222, + -0.010583410039544106, + 0.011862481944262981, + 0.003979742061346769, + -0.021561505272984505, + 0.03063926473259926, + -0.008661147207021713, + -0.03324126452207565, + 0.009172775782644749, + -0.002823095303028822, + -0.024207357317209244, + -0.009618624113500118, + -0.031837936490774155, + -0.003530239686369896, + 0.0018117146100848913, + 0.03862067684531212, + 0.006446524523198605, + -0.03210106119513512, + -0.01618209294974804, + -0.029411355033516884, + -0.032539598643779755, + 0.013653183355927467, + 0.02799341268837452, + 0.008134899660944939, + 0.005437884479761124, + 0.029469827190041542, + -0.0010725934989750385, + 0.012184077873826027, + 0.016679102554917336, + -0.02384190820157528, + 0.012885740026831627, + 0.045403413474559784, + -0.00696546258404851, + -0.014062486588954926, + -0.009582079015672207, + -0.016240565106272697, + 0.013704346492886543, + -0.013178099878132343, + 0.01596282236278057, + 0.004231902305036783, + -0.03446917235851288, + 0.004202666226774454, + 0.017848540097475052, + 0.008244534954428673, + 0.028066501021385193, + -0.009903674013912678, + 0.008032574318349361, + -0.013229262083768845, + -0.011380089446902275, + -0.013879762031137943, + -0.01723458617925644, + -0.015041890554130077, + -0.003482731292024255, + 0.034556880593299866, + -0.028168827295303345, + 0.015875114127993584, + 0.03645721450448036, + 0.01189171802252531, + -0.027598727494478226, + -0.0025837260764092207, + -0.0069910441525280476, + -0.025844570249319077, + -0.009501680731773376, + -0.016766810789704323, + 0.0007423187489621341, + 0.004893365316092968, + -0.02311100997030735, + -0.003652665065601468, + -0.027788760140538216, + -0.009808657690882683, + -0.007784069050103426, + -0.013090391643345356, + 0.014946874231100082, + 0.007118951063603163, + -0.053004756569862366, + 0.007827922701835632, + 0.01976349577307701, + 0.0003293611225672066, + 0.02926517464220524, + -0.05072435364127159, + 0.005616954993456602, + -0.038386788219213486, + -0.018491731956601143, + 0.0003910306841135025, + 0.025449885055422783, + -0.009918292053043842, + 0.013441222719848156, + 0.0017103024292737246, + -0.03613562136888504, + 0.0023662839084863663, + 0.010714971460402012, + -0.021824628114700317, + 0.01469836849719286, + -0.018345551565289497, + -0.008544202893972397, + -0.019997382536530495, + -0.007484400644898415, + -0.03265654295682907, + -0.008653838187456131, + 0.04043330252170563, + -0.005255159921944141, + 0.021751537919044495, + -0.008017956279218197, + -0.0203043594956398, + 0.05154296010732651, + 0.016255183145403862, + 0.021079111844301224, + 0.0034443591721355915, + -0.004294028505682945, + -0.028709692880511284, + 0.003194026416167617, + -0.01330966129899025, + 0.006680412217974663, + -0.03482000529766083, + -0.029601387679576874, + 0.006015294697135687, + -0.00868307426571846, + 0.0210060216486454, + -0.005236887838691473, + -0.006475760601460934, + 0.02157612331211567, + 0.008463804610073566, + 0.012900358065962791, + -0.01077344361692667, + -0.0030770825687795877, + -0.002205486176535487, + -0.010853842832148075, + -0.027233276516199112, + 0.007071442902088165, + 0.014822620898485184, + -0.030142253264784813, + -0.038035955280065536, + 0.02780337817966938, + 0.02993760257959366, + 0.015714317560195923, + 0.005496356636285782, + 0.0012388728791847825, + 0.01650368794798851, + 0.010371449403464794, + -0.030756209045648575, + 0.004491371102631092, + 0.00422093877568841, + -0.011467796750366688, + -0.006705993786454201, + -0.025391412898898125, + -2.048514261332457e-06, + -0.02243858389556408, + -0.06157088652253151, + -0.002634888980537653, + -0.026692412793636322, + 0.011643213219940662, + -0.01976349577307701, + -0.0031081459019333124, + -0.0027573145925998688, + -0.03467382490634918, + -0.019953528419137, + -0.018725618720054626, + 0.0004383106715977192, + 0.012666470371186733, + 0.011738229542970657, + 0.010583410039544106, + -0.020055854693055153, + -0.009070450440049171, + 0.011979426257312298, + 0.008734236471354961, + 0.03230571374297142, + -0.00015451651415787637, + -0.003738545812666416, + 0.030171489343047142, + -0.03613562136888504, + -0.0031958536710590124, + -0.03125321865081787, + -0.04654361680150032, + -0.03581402450799942, + -0.01841864176094532, + -0.01777545176446438, + 0.001956980675458908, + -0.05771174281835556, + 0.04142732545733452, + -0.021488415077328682, + -0.016386743634939194, + 0.006819282658398151, + 0.015451193787157536, + 0.014859165996313095, + -0.020962169393897057, + 0.006885063834488392, + 0.0019368809880688787, + 0.02534755878150463, + 0.035580139607191086, + -0.021912336349487305, + 0.025069817900657654, + 0.010590719059109688, + -0.014479098841547966, + 0.0057485164143145084, + -0.025610683485865593, + -0.053677186369895935, + 0.03555090352892876, + -0.03192564472556114, + 0.0021872136276215315, + -0.05709778890013695, + 0.01171630248427391, + 0.03613562136888504, + 0.015538902021944523, + -0.004794694017618895, + -0.018667146563529968, + 0.006607322487980127, + 0.013075773604214191, + -0.00498838210478425, + -0.003382232738658786, + 0.005050508305430412, + -0.008909652940928936, + -0.02923593856394291, + 0.0020830605644732714, + 0.03555090352892876, + 0.014800693839788437, + 0.012052515521645546, + 0.04315224662423134, + -0.02403194271028042, + 0.006176092196255922, + 0.010393376462161541, + -0.004370772745460272, + -0.02575686201453209, + 0.012388729490339756, + -0.023900380358099937, + 0.005529247224330902, + 0.0028249225579202175, + -0.016869137063622475, + -0.009633242152631283, + 0.025654537603259087, + -0.0002528452023398131, + 0.017439236864447594, + -0.009428590536117554, + 0.008990051224827766, + 0.017468472942709923, + -0.023885762318968773, + 0.03727582097053528, + -0.03028843365609646, + -0.025303704664111137, + -0.009326264262199402, + -0.03847449645400047, + -0.02604922279715538, + 0.02961600571870804, + 0.001576913520693779, + -0.015041890554130077, + 0.001594272325746715, + 0.005065126344561577, + 0.007422273978590965, + -0.01449371688067913, + -0.01857944019138813, + 0.000633597606793046, + -0.020187415182590485, + 0.018243225291371346, + -0.03821137174963951, + 0.018111664801836014, + -0.010488392785191536, + 0.015305014327168465, + -0.00478007597848773, + 0.013704346492886543, + 0.032861195504665375, + 0.01988043822348118, + -0.001184055581688881, + 0.020757516846060753, + -0.00010672259668353945, + 0.005620609503239393, + 0.017029935494065285, + -0.007484400644898415, + 0.0024137923028320074, + -0.0002987547486554831, + -0.02259938046336174, + 0.0013512485893443227, + 0.013704346492886543, + 0.015904350206255913, + -0.016240565106272697, + 0.011723611503839493, + 0.03329973667860031, + 0.026604704558849335, + 0.017600035294890404, + -0.005525592714548111, + 0.007444201037287712, + -0.02780337817966938, + -0.004016287159174681, + -0.03160405158996582, + -0.00047325677587650716, + -0.03686651960015297, + 0.015407339669764042, + -0.01707378774881363, + -0.00941397249698639, + 0.011095038615167141, + -0.03221800550818443, + -0.003088046098127961, + 0.02850504033267498, + 0.017146877944469452, + -0.01236680243164301, + 0.012995375320315361, + 0.004122267477214336, + -0.004809312056750059, + -0.035667844116687775, + -0.009070450440049171, + 0.006782738026231527, + 0.017848540097475052, + -0.02993760257959366, + 0.03552166745066643, + -0.02036283165216446, + 0.03517083451151848, + 0.032451894134283066, + 0.002764623612165451, + 0.03695422783493996, + 0.01771697960793972, + 0.007159150671213865, + -0.0248651672154665, + 0.033855218440294266, + 0.005945859011262655, + -0.010897696018218994, + -0.00820068083703518, + -0.013894380070269108, + 0.027364838868379593, + -0.002424755599349737, + 0.010890386998653412, + 0.013675110414624214, + -0.00016399534069932997, + -0.0017148705665022135, + 0.0009159071487374604, + 0.012827268801629543, + 0.01739538460969925, + -0.00896812416613102, + -0.01950037106871605, + -0.013821289874613285, + -0.0223070215433836, + 0.003972433041781187, + 0.03151634335517883, + 0.012695706449449062, + -0.0011867964640259743, + 0.020582100376486778, + 0.030025308951735497, + 0.004041868727654219, + 0.003797017503529787, + 0.008405332453548908, + 0.025654537603259087, + 0.012878431007266045, + -0.0020958513487130404, + 0.0018354688072577119, + 0.029484445229172707, + 0.02642928995192051, + 0.004294028505682945, + -0.028621984645724297, + -0.0034005052875727415, + -0.010459157638251781, + -0.0021835591178387403, + 0.0055475193075835705, + -0.009399354457855225, + 0.006479415111243725, + 0.0023955197539180517, + 0.01615285687148571, + -0.010291050188243389, + -0.004290373995900154, + 0.0219561904668808, + -0.000965699611697346, + -0.010269124060869217, + 0.007981411181390285, + 0.018082428723573685, + 0.013221953995525837, + 0.027087097987532616, + 0.006826591677963734, + 0.010108325630426407, + -0.026502378284931183, + 0.02828577160835266, + -0.0106784263625741, + 0.018491731956601143, + 0.0007633321220055223, + -0.02847580425441265, + 0.011255837045609951, + 0.018871799111366272, + 0.005529247224330902, + 0.007020279765129089, + 0.0017358838813379407, + -0.012293712235987186, + 0.03923463076353073, + 0.01631365343928337, + -0.0007532822201028466, + 0.023988088592886925, + 0.05692237243056297, + -0.005269777961075306, + 0.021634595468640327, + 0.028519658371806145, + -0.00037938199238851666, + -0.0021908681374043226, + 0.0031227637082338333, + 0.007203004322946072, + -0.01348507683724165, + -0.004374427255243063, + -0.005967786069959402, + 0.003157481551170349, + 0.0034681132528930902, + -0.03347514942288399, + -0.0011676102876663208, + 0.0034681132528930902, + -0.04163197800517082, + -0.03063926473259926, + 0.01602129451930523, + -0.013813980855047703, + -0.03376751020550728, + 0.0692891776561737, + -0.01094885915517807, + -0.029762186110019684, + -0.013221953995525837, + -0.009399354457855225, + 0.0002273779537063092, + 0.02610769309103489, + -0.0004408231470733881, + 0.05037352442741394, + -0.019675787538290024, + 0.015348868444561958, + -0.006483069621026516, + 0.015407339669764042, + -0.017848540097475052, + -0.001891199848614633, + 0.01514421682804823, + 0.03201335296034813, + 0.022935593500733376, + 0.019573461264371872, + -0.00782061368227005, + -0.008039883337914944, + -0.02403194271028042, + ], + "index": 100, + }, + ] + } diff --git a/sdk/cosmos/azure-cosmos/tests/routing/__init__.py b/sdk/cosmos/azure-cosmos/tests/routing/__init__.py index a696bf740950..f5373937e446 100644 --- a/sdk/cosmos/azure-cosmos/tests/routing/__init__.py +++ b/sdk/cosmos/azure-cosmos/tests/routing/__init__.py @@ -1,20 +1,20 @@ -#The MIT License (MIT) -#Copyright (c) 2014 Microsoft Corporation +# The MIT License (MIT) +# Copyright (c) 2014 Microsoft Corporation -#Permission is hereby granted, free of charge, to any person obtaining a copy -#of this software and associated documentation files (the "Software"), to deal -#in the Software without restriction, including without limitation the rights -#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -#copies of the Software, and to permit persons to whom the Software is -#furnished to do so, subject to the following conditions: +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: -#The above copyright notice and this permission notice shall be included in all -#copies or substantial portions of the Software. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. -#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -#SOFTWARE. \ No newline at end of file +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/sdk/cosmos/azure-cosmos/tests/routing/test_collection_routing_map.py b/sdk/cosmos/azure-cosmos/tests/routing/test_collection_routing_map.py index 0b7046cf0fdc..a310848ebd35 100644 --- a/sdk/cosmos/azure-cosmos/tests/routing/test_collection_routing_map.py +++ b/sdk/cosmos/azure-cosmos/tests/routing/test_collection_routing_map.py @@ -14,15 +14,17 @@ class TestCollectionRoutingMap(unittest.TestCase): def test_advanced(self): - partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, - {u'id': u'1', u'minInclusive': u'05C1C9CD673398', u'maxExclusive': u'05C1D9CD673398'}, - {u'id': u'2', u'minInclusive': u'05C1D9CD673398', u'maxExclusive': u'05C1E399CD6732'}, - {u'id': u'3', u'minInclusive': u'05C1E399CD6732', u'maxExclusive': u'05C1E9CD673398'}, - {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] + partition_key_ranges = [ + {"id": "0", "minInclusive": "", "maxExclusive": "05C1C9CD673398"}, + {"id": "1", "minInclusive": "05C1C9CD673398", "maxExclusive": "05C1D9CD673398"}, + {"id": "2", "minInclusive": "05C1D9CD673398", "maxExclusive": "05C1E399CD6732"}, + {"id": "3", "minInclusive": "05C1E399CD6732", "maxExclusive": "05C1E9CD673398"}, + {"id": "4", "minInclusive": "05C1E9CD673398", "maxExclusive": "FF"}, + ] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] pkRange = routing_range.Range("", "FF", True, False) - collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, "sample collection id") overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(pkRange) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) @@ -32,97 +34,73 @@ def test_partition_key_ranges_parent_filter(self): # for large collection with thousands of partitions, a split may complete between the read partition key ranges query pages, # causing the return map to have both the new children ranges and their ranges. This test is to verify the fix for that. - Id = 'id' - MinInclusive = 'minInclusive' - MaxExclusive = 'maxExclusive' - Parents = 'parents' + Id = "id" + MinInclusive = "minInclusive" + MaxExclusive = "maxExclusive" + Parents = "parents" # create a complete set of partition key ranges - # some have parents as empty array while some don't have the parents - partitionKeyRanges = \ - [ - {Id: "2", - MinInclusive: "0000000050", - MaxExclusive: "0000000070", - Parents: []}, - {Id: "0", - MinInclusive: "", - MaxExclusive: "0000000030"}, - {Id: "1", - MinInclusive: "0000000030", - MaxExclusive: "0000000050"}, - {Id: "3", - MinInclusive: "0000000070", - MaxExclusive: "FF", - Parents: []} - ] + # some have parents as empty array while some don't have the parents + partitionKeyRanges = [ + {Id: "2", MinInclusive: "0000000050", MaxExclusive: "0000000070", Parents: []}, + {Id: "0", MinInclusive: "", MaxExclusive: "0000000030"}, + {Id: "1", MinInclusive: "0000000030", MaxExclusive: "0000000050"}, + {Id: "3", MinInclusive: "0000000070", MaxExclusive: "FF", Parents: []}, + ] def get_range_id(r): return r[Id] # verify no thing is filtered out since there is no children ranges filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) - self.assertEqual(['2', '0', '1', '3'], list(map(get_range_id, filteredRanges))) + self.assertEqual(["2", "0", "1", "3"], list(map(get_range_id, filteredRanges))) # add some children partition key ranges with parents Ids # e.g., range 0 was split in to range 4 and 5, and then range 4 was split into range 6 and 7 - partitionKeyRanges.append({Id: "6", - MinInclusive: "", - MaxExclusive: "0000000010", - Parents: ["0", "4"]}) - partitionKeyRanges.append({Id: "7", - MinInclusive: "0000000010", - MaxExclusive: "0000000020", - Parents: ["0", "4"]}) - partitionKeyRanges.append({Id: "5", - MinInclusive: "0000000020", - MaxExclusive: "0000000030", - Parents: ["0"]}) + partitionKeyRanges.append({Id: "6", MinInclusive: "", MaxExclusive: "0000000010", Parents: ["0", "4"]}) + partitionKeyRanges.append( + {Id: "7", MinInclusive: "0000000010", MaxExclusive: "0000000020", Parents: ["0", "4"]} + ) + partitionKeyRanges.append({Id: "5", MinInclusive: "0000000020", MaxExclusive: "0000000030", Parents: ["0"]}) # verify the filtered range list has children ranges and the parent Ids are discarded filteredRanges = PartitionKeyRangeCache._discard_parent_ranges(partitionKeyRanges) - expectedRanges = ['2', '1', '3', '6', '7', '5'] + expectedRanges = ["2", "1", "3", "6", "7", "5"] self.assertEqual(expectedRanges, list(map(get_range_id, filteredRanges))) def test_point_range_mapping(self): - partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'}, - {u'id': u'1', u'minInclusive': u'1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', u'maxExclusive': u'FF'}] + partition_key_ranges = [ + {"id": "0", "minInclusive": "", "maxExclusive": "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"}, + {"id": "1", "minInclusive": "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "maxExclusive": "FF"}, + ] partitionRangeWithInfo = [(r, True) for r in partition_key_ranges] expected_partition_key_range = routing_range.Range("", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", True, False) - pk_range = routing_range.Range("1EC0C2CBE45DBC919CF2B65D399C2673", "1EC0C2CBE45DBC919CF2B65D399C2673", True, True) + pk_range = routing_range.Range( + "1EC0C2CBE45DBC919CF2B65D399C2673", "1EC0C2CBE45DBC919CF2B65D399C2673", True, True + ) normalized_pk_range = pk_range.to_normalized_range() - collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, 'sample collection id') + collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, "sample collection id") overlapping_partition_key_ranges = collection_routing_map.get_overlapping_ranges(normalized_pk_range) # a partition key feed range should only map to one physical partition self.assertEqual(1, len(overlapping_partition_key_ranges)) - self.assertEqual(expected_partition_key_range, routing_range.Range.PartitionKeyRangeToRange(overlapping_partition_key_ranges[0])) + self.assertEqual( + expected_partition_key_range, + routing_range.Range.PartitionKeyRangeToRange(overlapping_partition_key_ranges[0]), + ) def test_collection_routing_map(self): - Id = 'id' - MinInclusive = 'minInclusive' - MaxExclusive = 'maxExclusive' - - partitionKeyRanges = \ - [ - ({Id: "2", - MinInclusive: "0000000050", - MaxExclusive: "0000000070"}, - 2), - ({Id: "0", - MinInclusive: "", - MaxExclusive: "0000000030"}, - 0), - ({Id: "1", - MinInclusive: "0000000030", - MaxExclusive: "0000000050"}, - 1), - ({Id: "3", - MinInclusive: "0000000070", - MaxExclusive: "FF"}, - 3) - ] + Id = "id" + MinInclusive = "minInclusive" + MaxExclusive = "maxExclusive" + + partitionKeyRanges = [ + ({Id: "2", MinInclusive: "0000000050", MaxExclusive: "0000000070"}, 2), + ({Id: "0", MinInclusive: "", MaxExclusive: "0000000030"}, 0), + ({Id: "1", MinInclusive: "0000000030", MaxExclusive: "0000000050"}, 1), + ({Id: "3", MinInclusive: "0000000070", MaxExclusive: "FF"}, 3), + ] crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") @@ -145,22 +123,29 @@ def test_collection_routing_map(self): self.assertEqual("0", crm.get_range_by_partition_key_range_id("0")[Id]) self.assertEqual("1", crm.get_range_by_partition_key_range_id("1")[Id]) - fullRangeMinToMaxRange = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, - CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, True, - False) + fullRangeMinToMaxRange = routing_range.Range( + CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, + CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey, + True, + False, + ) overlappingRanges = crm.get_overlapping_ranges([fullRangeMinToMaxRange]) self.assertEqual(4, len(overlappingRanges)) onlyPartitionRanges = [item[0] for item in partitionKeyRanges] def getKey(r): - return r['id'] + return r["id"] onlyPartitionRanges.sort(key=getKey) self.assertEqual(overlappingRanges, onlyPartitionRanges) - noPoint = routing_range.Range(CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, - CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, False, False) + noPoint = routing_range.Range( + CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, + CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey, + False, + False, + ) self.assertEqual(0, len(crm.get_overlapping_ranges([noPoint]))) onePoint = routing_range.Range("0000000040", "0000000040", True, True) @@ -171,7 +156,7 @@ def getKey(r): ranges = [ routing_range.Range("0000000040", "0000000045", True, True), routing_range.Range("0000000045", "0000000046", True, True), - routing_range.Range("0000000046", "0000000050", True, True) + routing_range.Range("0000000046", "0000000050", True, True), ] overlappingPartitionKeyRanges = crm.get_overlapping_ranges(ranges) @@ -180,11 +165,10 @@ def getKey(r): self.assertEqual("2", overlappingPartitionKeyRanges[1][Id]) def test_invalid_routing_map(self): - partitionKeyRanges = \ - [ - ({'id': "1", 'minInclusive': "0000000020", 'maxExclusive': "0000000030"}, 2), - ({'id': "2", 'minInclusive': "0000000025", 'maxExclusive': "0000000035"}, 2), - ] + partitionKeyRanges = [ + ({"id": "1", "minInclusive": "0000000020", "maxExclusive": "0000000030"}, 2), + ({"id": "2", "minInclusive": "0000000025", "maxExclusive": "0000000035"}, 2), + ] collectionUniqueId = "" @@ -196,21 +180,23 @@ def createRoutingMap(): def test_incomplete_routing_map(self): crm = CollectionRoutingMap.CompleteRoutingMap( [ - ({'id': "2", 'minInclusive': "", 'maxExclusive': "0000000030"}, 2), - ({'id': "3", 'minInclusive': "0000000031", 'maxExclusive': "FF"}, 2), - ] - , "") + ({"id": "2", "minInclusive": "", "maxExclusive": "0000000030"}, 2), + ({"id": "3", "minInclusive": "0000000031", "maxExclusive": "FF"}, 2), + ], + "", + ) self.assertIsNone(crm) crm = CollectionRoutingMap.CompleteRoutingMap( [ - ({'id': "2", 'minInclusive': "", 'maxExclusive': "0000000030"}, 2), - ({'id': "2", 'minInclusive': "0000000030", 'maxExclusive': "FF"}, 2), - ] - , "") + ({"id": "2", "minInclusive": "", "maxExclusive": "0000000030"}, 2), + ({"id": "2", "minInclusive": "0000000030", "maxExclusive": "FF"}, 2), + ], + "", + ) self.assertIsNotNone(crm) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/routing/test_routing_map_provider.py b/sdk/cosmos/azure-cosmos/tests/routing/test_routing_map_provider.py index 2d30dee5dfbc..9f205e569519 100644 --- a/sdk/cosmos/azure-cosmos/tests/routing/test_routing_map_provider.py +++ b/sdk/cosmos/azure-cosmos/tests/routing/test_routing_map_provider.py @@ -11,6 +11,7 @@ from typing import Optional, Mapping, Any + @pytest.mark.cosmosEmulator class TestRoutingMapProvider(unittest.TestCase): class MockedCosmosClientConnection(object): @@ -18,23 +19,25 @@ class MockedCosmosClientConnection(object): def __init__(self, partition_key_ranges): self.partition_key_ranges = partition_key_ranges - def _ReadPartitionKeyRanges(self, collection_link: str, feed_options: Optional[Mapping[str, Any]] = None, **kwargs): + def _ReadPartitionKeyRanges( + self, collection_link: str, feed_options: Optional[Mapping[str, Any]] = None, **kwargs + ): return self.partition_key_ranges def setUp(self): - self.partition_key_ranges = [{u'id': u'0', u'minInclusive': u'', u'maxExclusive': u'05C1C9CD673398'}, - {u'id': u'1', u'minInclusive': u'05C1C9CD673398', - u'maxExclusive': u'05C1D9CD673398'}, - {u'id': u'2', u'minInclusive': u'05C1D9CD673398', - u'maxExclusive': u'05C1E399CD6732'}, - {u'id': u'3', u'minInclusive': u'05C1E399CD6732', - u'maxExclusive': u'05C1E9CD673398'}, - {u'id': u'4', u'minInclusive': u'05C1E9CD673398', u'maxExclusive': u'FF'}] + self.partition_key_ranges = [ + {"id": "0", "minInclusive": "", "maxExclusive": "05C1C9CD673398"}, + {"id": "1", "minInclusive": "05C1C9CD673398", "maxExclusive": "05C1D9CD673398"}, + {"id": "2", "minInclusive": "05C1D9CD673398", "maxExclusive": "05C1E399CD6732"}, + {"id": "3", "minInclusive": "05C1E399CD6732", "maxExclusive": "05C1E9CD673398"}, + {"id": "4", "minInclusive": "05C1E9CD673398", "maxExclusive": "FF"}, + ] self.smart_routing_map_provider = self.instantiate_smart_routing_map_provider(self.partition_key_ranges) partitionRangeWithInfo = map(lambda r: (r, True), self.partition_key_ranges) - self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap(partitionRangeWithInfo, - 'sample collection id') + self.cached_collection_routing_map = CollectionRoutingMap.CompleteRoutingMap( + partitionRangeWithInfo, "sample collection id" + ) def instantiate_smart_routing_map_provider(self, partition_key_ranges): client = TestRoutingMapProvider.MockedCosmosClientConnection(partition_key_ranges) @@ -50,8 +53,9 @@ def test_full_range(self): pkRange = routing_range.Range("", "FF", False, False) overlapping_partition_key_ranges = self.get_overlapping_ranges([pkRange]) self.assertEqual(overlapping_partition_key_ranges, self.partition_key_ranges) - self.assertEqual(self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), - self.partition_key_ranges) + self.assertEqual( + self.cached_collection_routing_map.get_overlapping_ranges([pkRange]), self.partition_key_ranges + ) def test_empty_ranges(self): # query range is the whole partition key range @@ -68,10 +72,15 @@ def test_empty_ranges(self): empty_start_range = routing_range.Range("", "", False, True) empty_end_range = routing_range.Range("FF", "FF", False, True) empty_range = routing_range.Range("AA", "AA", False, True) - self.validate_empty_query_ranges([empty_range], [empty_start_range], [empty_end_range], - [empty_start_range, empty_range], [empty_start_range, empty_end_range], - [empty_range, empty_end_range], - [empty_range, empty_range, empty_end_range]) + self.validate_empty_query_ranges( + [empty_range], + [empty_start_range], + [empty_end_range], + [empty_start_range, empty_range], + [empty_start_range, empty_end_range], + [empty_range, empty_end_range], + [empty_range, empty_range, empty_end_range], + ) def test_bad_overlapping_query_ranges(self): # they share AA point @@ -118,13 +127,12 @@ def test_simple(self): ranges = [ routing_range.Range("0000000040", "0000000045", True, False), routing_range.Range("0000000045", "0000000046", True, False), - routing_range.Range("0000000046", "0000000050", True, False) + routing_range.Range("0000000046", "0000000050", True, False), ] self.validate_against_cached_collection_results(ranges) def test_simple_boundary(self): ranges = [ - routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), ] self.validate_against_cached_collection_results(ranges) @@ -134,7 +142,6 @@ def test_two_adjacent_boundary(self): ranges = [ # self.partition_key_ranges[1] routing_range.Range("05C1C9CD673398", "05C1D9CD673398", True, False), - # self.partition_key_ranges[2] routing_range.Range("05C1D9CD673398", "05C1D9CD673399", True, False), ] @@ -146,7 +153,6 @@ def test_two_ranges_in_one_partition_key_range(self): ranges = [ routing_range.Range("05C1C9CD673400", "05C1C9CD673401", True, False), routing_range.Range("05C1C9CD673402", "05C1C9CD673403", True, False), - ] self.validate_against_cached_collection_results(ranges) self.validate_overlapping_ranges_results(ranges, self.partition_key_ranges[1:2]) @@ -170,8 +176,9 @@ def test_complex(self): def validate_against_cached_collection_results(self, queryRanges): # validates the results of smart routing map provider against the results of cached collection map overlapping_partition_key_ranges = self.get_overlapping_ranges(queryRanges) - self.assertEqual(overlapping_partition_key_ranges, - self.cached_collection_routing_map.get_overlapping_ranges(queryRanges)) + self.assertEqual( + overlapping_partition_key_ranges, self.cached_collection_routing_map.get_overlapping_ranges(queryRanges) + ) def validate_overlapping_ranges_results(self, queryRanges, expected_overlapping_partition_key_ranges): overlapping_partition_key_ranges = self.get_overlapping_ranges(queryRanges) diff --git a/sdk/cosmos/azure-cosmos/tests/test_aad.py b/sdk/cosmos/azure-cosmos/tests/test_aad.py index b1d593bd96a6..6784c013804a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_aad.py +++ b/sdk/cosmos/azure-cosmos/tests/test_aad.py @@ -16,20 +16,16 @@ from azure.cosmos import DatabaseProxy, ContainerProxy, exceptions from azure.core.exceptions import HttpResponseError + def _remove_padding(encoded_string): while encoded_string.endswith("="): - encoded_string = encoded_string[0:len(encoded_string) - 1] + encoded_string = encoded_string[0 : len(encoded_string) - 1] return encoded_string def get_test_item(num): - test_item = { - 'pk': 'pk', - 'id': 'Item_' + str(num), - 'test_object': True, - 'lastName': 'Smith' - } + test_item = {"pk": "pk", "id": "Item_" + str(num), "test_object": True, "lastName": "Smith"} return test_item @@ -47,22 +43,35 @@ def get_token(self, *scopes, **kwargs): :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` attribute gives a reason. """ - aad_header_cosmos_emulator = "{\"typ\":\"JWT\",\"alg\":\"RS256\",\"x5t\":\"" \ - "CosmosEmulatorPrimaryMaster\",\"kid\":\"CosmosEmulatorPrimaryMaster\"}" - - aad_claim_cosmos_emulator_format = {"aud": "https://localhost.localhost", - "iss": "https://sts.fake-issuer.net/7b1999a1-dfd7-440e-8204-00170979b984", - "iat": int(time.time()), "nbf": int(time.time()), - "exp": int(time.time() + 7200), "aio": "", "appid": "localhost", - "appidacr": "1", "idp": "https://localhost:8081/", - "oid": "96313034-4739-43cb-93cd-74193adbe5b6", "rh": "", "sub": "localhost", - "tid": "EmulatorFederation", "uti": "", "ver": "1.0", - "scp": "user_impersonation", - "groups": ["7ce1d003-4cb3-4879-b7c5-74062a35c66e", - "e99ff30c-c229-4c67-ab29-30a6aebc3e58", - "5549bb62-c77b-4305-bda9-9ec66b85d9e4", - "c44fd685-5c58-452c-aaf7-13ce75184f65", - "be895215-eab5-43b7-9536-9ef8fe130330"]} + aad_header_cosmos_emulator = ( + '{"typ":"JWT","alg":"RS256","x5t":"' 'CosmosEmulatorPrimaryMaster","kid":"CosmosEmulatorPrimaryMaster"}' + ) + + aad_claim_cosmos_emulator_format = { + "aud": "https://localhost.localhost", + "iss": "https://sts.fake-issuer.net/7b1999a1-dfd7-440e-8204-00170979b984", + "iat": int(time.time()), + "nbf": int(time.time()), + "exp": int(time.time() + 7200), + "aio": "", + "appid": "localhost", + "appidacr": "1", + "idp": "https://localhost:8081/", + "oid": "96313034-4739-43cb-93cd-74193adbe5b6", + "rh": "", + "sub": "localhost", + "tid": "EmulatorFederation", + "uti": "", + "ver": "1.0", + "scp": "user_impersonation", + "groups": [ + "7ce1d003-4cb3-4879-b7c5-74062a35c66e", + "e99ff30c-c229-4c67-ab29-30a6aebc3e58", + "5549bb62-c77b-4305-bda9-9ec66b85d9e4", + "c44fd685-5c58-452c-aaf7-13ce75184f65", + "be895215-eab5-43b7-9536-9ef8fe130330", + ], + } emulator_key = test_config.TestConfig.masterKey @@ -104,11 +113,11 @@ def setUpClass(cls): def test_aad_credentials(self): print("Container info: " + str(self.container.read())) self.container.create_item(get_test_item(0)) - print("Point read result: " + str(self.container.read_item(item='Item_0', partition_key='pk'))) - query_results = list(self.container.query_items(query='select * from c', partition_key='pk')) + print("Point read result: " + str(self.container.read_item(item="Item_0", partition_key="pk"))) + query_results = list(self.container.query_items(query="select * from c", partition_key="pk")) assert len(query_results) == 1 print("Query result: " + str(query_results[0])) - self.container.delete_item(item='Item_0', partition_key='pk') + self.container.delete_item(item="Item_0", partition_key="pk") # Attempting to do management operations will return a 403 Forbidden exception try: @@ -117,7 +126,6 @@ def test_aad_credentials(self): assert e.status_code == 403 print("403 error assertion success") - def _run_with_scope_capture(self, credential_cls, action, *args, **kwargs): scopes_captured = [] original_get_token = credential_cls.get_token @@ -152,7 +160,7 @@ def action(scopes_captured): finally: del os.environ["AZURE_COSMOS_AAD_SCOPE_OVERRIDE"] try: - container.delete_item(item='Item_10', partition_key='pk') + container.delete_item(item="Item_10", partition_key="pk") except Exception: pass @@ -199,7 +207,7 @@ def action(scopes_captured): assert all(scope == account_scope for scope in scopes), f"Expected only account scope, got: {scopes}" finally: try: - container.delete_item(item='Item_12', partition_key='pk') + container.delete_item(item="Item_12", partition_key="pk") except Exception: pass @@ -230,10 +238,12 @@ def action(scopes_captured): scopes, container = self._run_with_scope_capture(FallbackCredential, action) try: # Accept multiple calls, but the first should be account_scope, and fallback_scope should appear after error - assert account_scope in scopes and fallback_scope in scopes, f"Expected fallback to default scope, got: {scopes}" + assert ( + account_scope in scopes and fallback_scope in scopes + ), f"Expected fallback to default scope, got: {scopes}" finally: try: - container.delete_item(item='Item_13', partition_key='pk') + container.delete_item(item="Item_13", partition_key="pk") except Exception: pass diff --git a/sdk/cosmos/azure-cosmos/tests/test_aad_async.py b/sdk/cosmos/azure-cosmos/tests/test_aad_async.py index 6ce3cb4d1124..11221c2b9dd7 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_aad_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_aad_async.py @@ -16,20 +16,16 @@ from azure.cosmos.aio import CosmosClient, DatabaseProxy, ContainerProxy from azure.core.exceptions import HttpResponseError + def _remove_padding(encoded_string): while encoded_string.endswith("="): - encoded_string = encoded_string[0:len(encoded_string) - 1] + encoded_string = encoded_string[0 : len(encoded_string) - 1] return encoded_string def get_test_item(num): - test_item = { - 'pk': 'pk', - 'id': 'Item_' + str(num), - 'test_object': True, - 'lastName': 'Smith' - } + test_item = {"pk": "pk", "id": "Item_" + str(num), "test_object": True, "lastName": "Smith"} return test_item @@ -47,22 +43,35 @@ async def get_token(self, *scopes, **kwargs): :raises ~azure.core.exceptions.ClientAuthenticationError: authentication failed. The error's ``message`` attribute gives a reason. """ - aad_header_cosmos_emulator = "{\"typ\":\"JWT\",\"alg\":\"RS256\",\"x5t\":\"" \ - "CosmosEmulatorPrimaryMaster\",\"kid\":\"CosmosEmulatorPrimaryMaster\"}" - - aad_claim_cosmos_emulator_format = {"aud": "https://localhost.localhost", - "iss": "https://sts.fake-issuer.net/7b1999a1-dfd7-440e-8204-00170979b984", - "iat": int(time.time()), "nbf": int(time.time()), - "exp": int(time.time() + 7200), "aio": "", "appid": "localhost", - "appidacr": "1", "idp": "https://localhost:8081/", - "oid": "96313034-4739-43cb-93cd-74193adbe5b6", "rh": "", "sub": "localhost", - "tid": "EmulatorFederation", "uti": "", "ver": "1.0", - "scp": "user_impersonation", - "groups": ["7ce1d003-4cb3-4879-b7c5-74062a35c66e", - "e99ff30c-c229-4c67-ab29-30a6aebc3e58", - "5549bb62-c77b-4305-bda9-9ec66b85d9e4", - "c44fd685-5c58-452c-aaf7-13ce75184f65", - "be895215-eab5-43b7-9536-9ef8fe130330"]} + aad_header_cosmos_emulator = ( + '{"typ":"JWT","alg":"RS256","x5t":"' 'CosmosEmulatorPrimaryMaster","kid":"CosmosEmulatorPrimaryMaster"}' + ) + + aad_claim_cosmos_emulator_format = { + "aud": "https://localhost.localhost", + "iss": "https://sts.fake-issuer.net/7b1999a1-dfd7-440e-8204-00170979b984", + "iat": int(time.time()), + "nbf": int(time.time()), + "exp": int(time.time() + 7200), + "aio": "", + "appid": "localhost", + "appidacr": "1", + "idp": "https://localhost:8081/", + "oid": "96313034-4739-43cb-93cd-74193adbe5b6", + "rh": "", + "sub": "localhost", + "tid": "EmulatorFederation", + "uti": "", + "ver": "1.0", + "scp": "user_impersonation", + "groups": [ + "7ce1d003-4cb3-4879-b7c5-74062a35c66e", + "e99ff30c-c229-4c67-ab29-30a6aebc3e58", + "5549bb62-c77b-4305-bda9-9ec66b85d9e4", + "c44fd685-5c58-452c-aaf7-13ce75184f65", + "be895215-eab5-43b7-9536-9ef8fe130330", + ], + } emulator_key = test_config.TestConfig.masterKey @@ -97,12 +106,12 @@ class TestAADAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.credential == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.credential == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.credential) @@ -117,11 +126,11 @@ async def test_aad_credentials_async(self): print("Container info: " + str(await self.container.read())) await self.container.create_item(get_test_item(0)) - print("Point read result: " + str(await self.container.read_item(item='Item_0', partition_key='pk'))) - query_results = [item async for item in self.container.query_items(query='select * from c', partition_key='pk')] + print("Point read result: " + str(await self.container.read_item(item="Item_0", partition_key="pk"))) + query_results = [item async for item in self.container.query_items(query="select * from c", partition_key="pk")] assert len(query_results) == 1 print("Query result: " + str(query_results[0])) - await self.container.delete_item(item='Item_0', partition_key='pk') + await self.container.delete_item(item="Item_0", partition_key="pk") # Attempting to do management operations will return a 403 Forbidden exception try: @@ -168,7 +177,7 @@ async def action(scopes_captured): finally: del os.environ["AZURE_COSMOS_AAD_SCOPE_OVERRIDE"] try: - await container.delete_item(item='Item_20', partition_key='pk') + await container.delete_item(item="Item_20", partition_key="pk") except Exception: pass @@ -201,7 +210,7 @@ async def action(scopes_captured): finally: del os.environ["AZURE_COSMOS_AAD_SCOPE_OVERRIDE"] try: - await container.delete_item(item='Item_21', partition_key='pk') + await container.delete_item(item="Item_21", partition_key="pk") except Exception: pass @@ -226,7 +235,7 @@ async def action(scopes_captured): assert all(scope == account_scope for scope in scopes), f"Expected only account scope, got: {scopes}" finally: try: - await container.delete_item(item='Item_22', partition_key='pk') + await container.delete_item(item="Item_22", partition_key="pk") except Exception: pass @@ -259,12 +268,15 @@ async def action(scopes_captured): scopes, container = await self._run_with_scope_capture_async(FallbackCredential, action) try: - assert account_scope in scopes and fallback_scope in scopes, f"Expected fallback to default scope, got: {scopes}" + assert ( + account_scope in scopes and fallback_scope in scopes + ), f"Expected fallback to default scope, got: {scopes}" finally: try: - await container.delete_item(item='Item_23', partition_key='pk') + await container.delete_item(item="Item_23", partition_key="pk") except Exception: pass + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_aggregate.py b/sdk/cosmos/azure-cosmos/tests/test_aggregate.py index ea841819a4d5..19b07b645deb 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_aggregate.py +++ b/sdk/cosmos/azure-cosmos/tests/test_aggregate.py @@ -18,9 +18,9 @@ class _config: host = test_config.TestConfig.host master_key = test_config.TestConfig.masterKey connection_policy = test_config.TestConfig.connectionPolicy - PARTITION_KEY = 'key' - UNIQUE_PARTITION_KEY = 'uniquePartitionKey' - FIELD = 'field' + PARTITION_KEY = "key" + UNIQUE_PARTITION_KEY = "uniquePartitionKey" + FIELD = "field" DOCUMENTS_COUNT = 400 DOCS_WITH_SAME_PARTITION_KEY = 200 docs_with_numeric_id = 0 @@ -50,7 +50,8 @@ def _setup(cls): raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(_config.host, _config.master_key) cls.created_db = cls.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) @@ -61,81 +62,96 @@ def _setup(cls): values = [None, False, True, "abc", "cdfg", "opqrs", "ttttttt", "xyz", "oo", "ppp"] for value in values: - d = {_config.PARTITION_KEY: value, 'id': str(uuid.uuid4())} + d = {_config.PARTITION_KEY: value, "id": str(uuid.uuid4())} document_definitions.append(d) for i in range(_config.DOCS_WITH_SAME_PARTITION_KEY): - d = {_config.PARTITION_KEY: _config.UNIQUE_PARTITION_KEY, - 'resourceId': i, - _config.FIELD: i + 1, - 'id': str(uuid.uuid4())} + d = { + _config.PARTITION_KEY: _config.UNIQUE_PARTITION_KEY, + "resourceId": i, + _config.FIELD: i + 1, + "id": str(uuid.uuid4()), + } document_definitions.append(d) - _config.docs_with_numeric_id = \ - _config.DOCUMENTS_COUNT - len(values) - _config.DOCS_WITH_SAME_PARTITION_KEY + _config.docs_with_numeric_id = _config.DOCUMENTS_COUNT - len(values) - _config.DOCS_WITH_SAME_PARTITION_KEY for i in range(_config.docs_with_numeric_id): - d = {_config.PARTITION_KEY: i + 1, 'id': str(uuid.uuid4())} + d = {_config.PARTITION_KEY: i + 1, "id": str(uuid.uuid4())} document_definitions.append(d) - _config.sum = _config.docs_with_numeric_id \ - * (_config.docs_with_numeric_id + 1) / 2.0 + _config.sum = _config.docs_with_numeric_id * (_config.docs_with_numeric_id + 1) / 2.0 cls._insert_doc(cls.created_collection, document_definitions) @classmethod def _generate_test_configs(cls): - aggregate_query_format = 'SELECT VALUE {}(r.{}) FROM r WHERE {}' - aggregate_orderby_query_format = 'SELECT VALUE {}(r.{}) FROM r WHERE {} ORDER BY r.{}' + aggregate_query_format = "SELECT VALUE {}(r.{}) FROM r WHERE {}" + aggregate_orderby_query_format = "SELECT VALUE {}(r.{}) FROM r WHERE {} ORDER BY r.{}" aggregate_configs = [ - ['AVG', _config.sum / _config.docs_with_numeric_id, - 'IS_NUMBER(r.{})'.format(_config.PARTITION_KEY)], - ['AVG', None, 'true'], - ['COUNT', _config.DOCUMENTS_COUNT, 'true'], - ['MAX', 'xyz', 'true'], - ['MIN', None, 'true'], - ['SUM', _config.sum, 'IS_NUMBER(r.{})'.format(_config.PARTITION_KEY)], - ['SUM', None, 'true'] + ["AVG", _config.sum / _config.docs_with_numeric_id, "IS_NUMBER(r.{})".format(_config.PARTITION_KEY)], + ["AVG", None, "true"], + ["COUNT", _config.DOCUMENTS_COUNT, "true"], + ["MAX", "xyz", "true"], + ["MIN", None, "true"], + ["SUM", _config.sum, "IS_NUMBER(r.{})".format(_config.PARTITION_KEY)], + ["SUM", None, "true"], ] for operator, expected, condition in aggregate_configs: - cls._all_tests.append([ - '{} {}'.format(operator, condition), - aggregate_query_format.format(operator, _config.PARTITION_KEY, condition), - expected]) - cls._all_tests.append([ - '{} {} OrderBy'.format(operator, condition), - aggregate_orderby_query_format.format(operator, _config.PARTITION_KEY, condition, - _config.PARTITION_KEY), - expected]) - - aggregate_single_partition_format = 'SELECT VALUE {}(r.{}) FROM r WHERE r.{} = \'{}\'' - aggregate_orderby_single_partition_format = 'SELECT {}(r.{}) FROM r WHERE r.{} = \'{}\'' + cls._all_tests.append( + [ + "{} {}".format(operator, condition), + aggregate_query_format.format(operator, _config.PARTITION_KEY, condition), + expected, + ] + ) + cls._all_tests.append( + [ + "{} {} OrderBy".format(operator, condition), + aggregate_orderby_query_format.format( + operator, _config.PARTITION_KEY, condition, _config.PARTITION_KEY + ), + expected, + ] + ) + + aggregate_single_partition_format = "SELECT VALUE {}(r.{}) FROM r WHERE r.{} = '{}'" + aggregate_orderby_single_partition_format = "SELECT {}(r.{}) FROM r WHERE r.{} = '{}'" same_partiton_sum = _config.DOCS_WITH_SAME_PARTITION_KEY * (_config.DOCS_WITH_SAME_PARTITION_KEY + 1) / 2.0 aggregate_single_partition_configs = [ - ['AVG', same_partiton_sum / _config.DOCS_WITH_SAME_PARTITION_KEY], - ['COUNT', _config.DOCS_WITH_SAME_PARTITION_KEY], - ['MAX', _config.DOCS_WITH_SAME_PARTITION_KEY], - ['MIN', 1], - ['SUM', same_partiton_sum] + ["AVG", same_partiton_sum / _config.DOCS_WITH_SAME_PARTITION_KEY], + ["COUNT", _config.DOCS_WITH_SAME_PARTITION_KEY], + ["MAX", _config.DOCS_WITH_SAME_PARTITION_KEY], + ["MIN", 1], + ["SUM", same_partiton_sum], ] for operator, expected in aggregate_single_partition_configs: - cls._all_tests.append([ - '{} SinglePartition {}'.format(operator, 'SELECT VALUE'), - aggregate_single_partition_format.format( - operator, _config.FIELD, _config.PARTITION_KEY, _config.UNIQUE_PARTITION_KEY), expected]) - cls._all_tests.append([ - '{} SinglePartition {}'.format(operator, 'SELECT'), - aggregate_orderby_single_partition_format.format( - operator, _config.FIELD, _config.PARTITION_KEY, _config.UNIQUE_PARTITION_KEY), - Exception()]) + cls._all_tests.append( + [ + "{} SinglePartition {}".format(operator, "SELECT VALUE"), + aggregate_single_partition_format.format( + operator, _config.FIELD, _config.PARTITION_KEY, _config.UNIQUE_PARTITION_KEY + ), + expected, + ] + ) + cls._all_tests.append( + [ + "{} SinglePartition {}".format(operator, "SELECT"), + aggregate_orderby_single_partition_format.format( + operator, _config.FIELD, _config.PARTITION_KEY, _config.UNIQUE_PARTITION_KEY + ), + Exception(), + ] + ) def test_run_all(self): for test_name, query, expected_result in self._all_tests: test_name = "test_%s" % test_name try: self._run_one(query, expected_result) - print(test_name + ': ' + query + " PASSED") + print(test_name + ": " + query + " PASSED") except Exception as e: - print(test_name + ': ' + query + " FAILED") + print(test_name + ": " + query + " FAILED") raise e def _run_one(self, query, expected_result): @@ -145,29 +161,20 @@ def _run_one(self, query, expected_result): def _create_collection(cls, created_db): # type: (Database) -> Container created_collection = created_db.create_container( - id='aggregate tests collection ' + str(uuid.uuid4()), + id="aggregate tests collection " + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ + "includedPaths": [ { - 'path': '/', - 'indexes': [ - { - 'kind': 'Range', - 'dataType': 'Number' - }, - { - 'kind': 'Range', - 'dataType': 'String' - } - ] + "path": "/", + "indexes": [{"kind": "Range", "dataType": "Number"}, {"kind": "Range", "dataType": "String"}], } ] }, partition_key=PartitionKey( - path='/{}'.format(_config.PARTITION_KEY), + path="/{}".format(_config.PARTITION_KEY), kind=documents.PartitionKind.Hash, ), - offer_throughput=10100 + offer_throughput=10100, ) return created_collection @@ -185,10 +192,7 @@ def _execute_query_and_validate_results(self, collection, query, expected): # type: (Container, str, Dict[str, Any]) -> None # executes the query and validates the results against the expected results - result_iterable = collection.query_items( - query=query, - enable_cross_partition_query=True - ) + result_iterable = collection.query_items(query=query, enable_cross_partition_query=True) def _verify_result(): ###################################### diff --git a/sdk/cosmos/azure-cosmos/tests/test_auto_scale.py b/sdk/cosmos/azure-cosmos/tests/test_auto_scale.py index 62960f7859bb..0b849f5ff5e3 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_auto_scale.py +++ b/sdk/cosmos/azure-cosmos/tests/test_auto_scale.py @@ -11,6 +11,7 @@ from azure.cosmos import CosmosClient, cosmos_client from azure.cosmos import ThroughputProperties, PartitionKey + @pytest.mark.cosmosLong class TestAutoScale(unittest.TestCase): client: CosmosClient = None @@ -20,12 +21,12 @@ class TestAutoScale(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_database = cls.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) @@ -33,12 +34,11 @@ def setUpClass(cls): def test_autoscale_create_container(self): container_id = None try: - container_id = 'auto_scale' + container_id = "auto_scale" created_container = self.created_database.create_container( id=container_id, partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=0) - + offer_throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=0), ) created_container_properties = created_container.get_throughput() # Testing the input value of the max_throughput @@ -51,17 +51,20 @@ def test_autoscale_create_container(self): # Testing the incorrect passing of an input value of the max_throughput to verify negative behavior with self.assertRaises(exceptions.CosmosHttpResponseError) as e: self.created_database.create_container( - id='container_with_wrong_auto_scale_settings', + id="container_with_wrong_auto_scale_settings", partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=-200, auto_scale_increment_percent=0)) + offer_throughput=ThroughputProperties( + auto_scale_max_throughput=-200, auto_scale_increment_percent=0 + ), + ) assert "Requested throughput -200 is less than required minimum throughput 1000" in str(e.exception) # Testing auto_scale_settings for the create_container_if_not_exists method - container_id = 'auto_scale_2' + container_id = "auto_scale_2" created_container = self.created_database.create_container_if_not_exists( id=container_id, partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=1000, auto_scale_increment_percent=3) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=1000, auto_scale_increment_percent=3), ) created_container_properties = created_container.get_throughput() # Testing the input value of the max_throughput @@ -75,9 +78,10 @@ def test_autoscale_create_database(self): database_id = "db_auto_scale_" + str(uuid.uuid4()) try: # Testing auto_scale_settings for the create_database method - created_database = self.client.create_database(database_id, offer_throughput=ThroughputProperties( - auto_scale_max_throughput=5000, - auto_scale_increment_percent=2)) + created_database = self.client.create_database( + database_id, + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=2), + ) created_db_properties = created_database.get_throughput() # Testing the input value of the max_throughput assert created_db_properties.auto_scale_max_throughput == 5000 @@ -88,10 +92,10 @@ def test_autoscale_create_database(self): # Testing auto_scale_settings for the create_database_if_not_exists method database_id = "db_auto_scale_2_" + str(uuid.uuid4()) - created_database = self.client.create_database_if_not_exists(database_id, - offer_throughput=ThroughputProperties( - auto_scale_max_throughput=9000, - auto_scale_increment_percent=11)) + created_database = self.client.create_database_if_not_exists( + database_id, + offer_throughput=ThroughputProperties(auto_scale_max_throughput=9000, auto_scale_increment_percent=11), + ) created_db_properties = created_database.get_throughput() # Testing the input value of the max_throughput assert created_db_properties.auto_scale_max_throughput == 9000 @@ -104,11 +108,13 @@ def test_autoscale_replace_throughput(self): database_id = "replace_db" + str(uuid.uuid4()) container_id = None try: - created_database = self.client.create_database(database_id, offer_throughput=ThroughputProperties( - auto_scale_max_throughput=5000, - auto_scale_increment_percent=2)) + created_database = self.client.create_database( + database_id, + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=2), + ) created_database.replace_throughput( - throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20)) + throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20) + ) created_db_properties = created_database.get_throughput() # Testing the input value of the max_throughput assert created_db_properties.auto_scale_max_throughput == 7000 @@ -120,9 +126,11 @@ def test_autoscale_replace_throughput(self): created_container = self.created_database.create_container( id=container_id, partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0)) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), + ) created_container.replace_throughput( - throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20)) + throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20) + ) created_container_properties = created_container.get_throughput() # Testing the input value of the replaced auto_scale settings assert created_container_properties.auto_scale_max_throughput == 7000 @@ -132,5 +140,5 @@ def test_autoscale_replace_throughput(self): self.created_database.delete_container(container_id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_auto_scale_async.py b/sdk/cosmos/azure-cosmos/tests/test_auto_scale_async.py index 0b00a9ee5b14..aba33548db21 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_auto_scale_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_auto_scale_async.py @@ -11,6 +11,7 @@ from azure.cosmos import ThroughputProperties, PartitionKey from azure.cosmos.aio import CosmosClient, DatabaseProxy + @pytest.mark.cosmosLong class TestAutoScaleAsync(unittest.IsolatedAsyncioTestCase): host = test_config.TestConfig.host @@ -24,12 +25,12 @@ class TestAutoScaleAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -40,10 +41,9 @@ async def asyncTearDown(self): async def test_autoscale_create_container_async(self): created_container = await self.created_database.create_container( - id='container_with_auto_scale_settings', + id="container_with_auto_scale_settings", partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0) - + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), ) created_container_properties = await created_container.get_throughput() # Testing the input value of the max_throughput @@ -56,16 +56,17 @@ async def test_autoscale_create_container_async(self): # Testing the incorrect passing of an input value of the max_throughput to verify negative behavior with self.assertRaises(exceptions.CosmosHttpResponseError) as e: await self.created_database.create_container( - id='container_with_wrong_auto_scale_settings', + id="container_with_wrong_auto_scale_settings", partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=-200, auto_scale_increment_percent=0)) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=-200, auto_scale_increment_percent=0), + ) assert "Requested throughput -200 is less than required minimum throughput 1000" in str(e.exception) # Testing auto_scale_settings for the create_container_if_not_exists method created_container = await self.created_database.create_container_if_not_exists( - id='container_with_auto_scale_settings', + id="container_with_auto_scale_settings", partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=1000, auto_scale_increment_percent=3) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=1000, auto_scale_increment_percent=3), ) created_container_properties = await created_container.get_throughput() # Testing the input value of the max_throughput @@ -80,9 +81,10 @@ async def test_autoscale_create_database_async(self): try: # Testing auto_scale_settings for the create_database method database_id = "db1_" + str(uuid.uuid4()) - created_database = await self.client.create_database(database_id, offer_throughput=ThroughputProperties( - auto_scale_max_throughput=5000, - auto_scale_increment_percent=0)) + created_database = await self.client.create_database( + database_id, + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), + ) created_db_properties = await created_database.get_throughput() # Testing the input value of the max_throughput assert created_db_properties.auto_scale_max_throughput == 5000 @@ -93,9 +95,10 @@ async def test_autoscale_create_database_async(self): # Testing auto_scale_settings for the create_database_if_not_exists method database_id = "db2_" + str(uuid.uuid4()) - created_database = await self.client.create_database_if_not_exists(database_id, offer_throughput=ThroughputProperties( - auto_scale_max_throughput=9000, - auto_scale_increment_percent=11)) + created_database = await self.client.create_database_if_not_exists( + database_id, + offer_throughput=ThroughputProperties(auto_scale_max_throughput=9000, auto_scale_increment_percent=11), + ) created_db_properties = await created_database.get_throughput() # Testing the input value of the max_throughput assert created_db_properties.auto_scale_max_throughput == 9000 @@ -108,11 +111,13 @@ async def test_replace_throughput_async(self): database_id = "replace_db" + str(uuid.uuid4()) container_id = None try: - created_database = await self.client.create_database(database_id, offer_throughput=ThroughputProperties( - auto_scale_max_throughput=5000, - auto_scale_increment_percent=0)) + created_database = await self.client.create_database( + database_id, + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), + ) await created_database.replace_throughput( - throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20)) + throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20) + ) created_db_properties = await created_database.get_throughput() # Testing the replaced value of the max_throughput assert created_db_properties.auto_scale_max_throughput == 7000 @@ -124,9 +129,11 @@ async def test_replace_throughput_async(self): created_container = await self.created_database.create_container( id=container_id, partition_key=PartitionKey(path="/id"), - offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0)) + offer_throughput=ThroughputProperties(auto_scale_max_throughput=5000, auto_scale_increment_percent=0), + ) await created_container.replace_throughput( - throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20)) + throughput=ThroughputProperties(auto_scale_max_throughput=7000, auto_scale_increment_percent=20) + ) created_container_properties = await created_container.get_throughput() # Testing the input value of the replaced auto_scale settings assert created_container_properties.auto_scale_max_throughput == 7000 @@ -135,5 +142,5 @@ async def test_replace_throughput_async(self): await self.created_database.delete_container(container_id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_availability_strategy.py b/sdk/cosmos/azure-cosmos/tests/test_availability_strategy.py index f76f531874fb..77a6fbfb0426 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_availability_strategy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_availability_strategy.py @@ -21,7 +21,8 @@ from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.http_constants import ResourceType -#cspell:ignore PPAF, ppaf +# cspell:ignore PPAF, ppaf + class MockHandler(logging.Handler): def __init__(self): @@ -34,6 +35,7 @@ def reset(self): def emit(self, record): self.messages.append(record.msg) + # Operation constants READ = "read" CREATE = "create" @@ -48,191 +50,173 @@ def emit(self, record): CHANGE_FEED = "change_feed" # Non-transient status codes -NON_TRANSIENT_STATUS_CODES = [ - (400, None), - (409, None), - (405, None), - (412, None), - (413, None), - (401, None), - (404, 0) -] +NON_TRANSIENT_STATUS_CODES = [(400, None), (409, None), (405, None), (412, None), (413, None), (401, None), (404, 0)] + def _create_doc(): - return { - 'id': str(uuid.uuid4()), - 'pk': 'test_pk', - 'name': 'sample document', - 'key': 'value' - } + return {"id": str(uuid.uuid4()), "pk": "test_pk", "name": "sample document", "key": "value"} + def _perform_read_operation( - operation, - container, - created_doc, - expected_uris, - excluded_uris, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - excluded_locations: Optional[list[str]] = None, - **kwargs): + operation, + container, + created_doc, + expected_uris, + excluded_uris, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + excluded_locations: Optional[list[str]] = None, + **kwargs, +): excluded_locations = [] if excluded_locations is None else excluded_locations """Execute different types of read operations""" if availability_strategy is not None: - kwargs['availability_strategy'] = availability_strategy + kwargs["availability_strategy"] = availability_strategy if operation == READ: container.read_item( - item=created_doc['id'], - partition_key=created_doc['pk'], - excluded_locations=excluded_locations, - **kwargs) + item=created_doc["id"], partition_key=created_doc["pk"], excluded_locations=excluded_locations, **kwargs + ) elif operation == QUERY: - response = list(container.query_items( - query="SELECT * FROM c WHERE c.id=@id", - parameters=[{"name": "@id", "value": created_doc['id']}], - enable_cross_partition_query=True, - excluded_locations=excluded_locations, - **kwargs - )) - assert response[0]['id'] == created_doc['id'] + response = list( + container.query_items( + query="SELECT * FROM c WHERE c.id=@id", + parameters=[{"name": "@id", "value": created_doc["id"]}], + enable_cross_partition_query=True, + excluded_locations=excluded_locations, + **kwargs, + ) + ) + assert response[0]["id"] == created_doc["id"] elif operation == QUERY_PK: - response = list(container.query_items( - query="SELECT * FROM c WHERE c.id=@id AND c.pk=@pk", - parameters=[{"name": "@id", "value": created_doc['id']}, {"name": "@pk", "value": created_doc['pk']}], - partition_key=created_doc['pk'], - excluded_locations=excluded_locations, - **kwargs - )) - assert response[0]['id'] == created_doc['id'] - elif operation == READ_ALL: response = list( - container.read_all_items( + container.query_items( + query="SELECT * FROM c WHERE c.id=@id AND c.pk=@pk", + parameters=[{"name": "@id", "value": created_doc["id"]}, {"name": "@pk", "value": created_doc["pk"]}], + partition_key=created_doc["pk"], excluded_locations=excluded_locations, - **kwargs)) - assert any(item['id'] == created_doc['id'] for item in response) + **kwargs, + ) + ) + assert response[0]["id"] == created_doc["id"] + elif operation == READ_ALL: + response = list(container.read_all_items(excluded_locations=excluded_locations, **kwargs)) + assert any(item["id"] == created_doc["id"] for item in response) elif operation == CHANGE_FEED: response = list( container.query_items_change_feed( - partition_key=created_doc['pk'], - excluded_locations=excluded_locations, - **kwargs)) - any(item['id'] == created_doc['id'] for item in response) + partition_key=created_doc["pk"], excluded_locations=excluded_locations, **kwargs + ) + ) + any(item["id"] == created_doc["id"] for item in response) _validate_response_uris( - expected_uris, - excluded_uris, - operation_type=_get_operation_type(operation), - resource_type=ResourceType.Document) + expected_uris, excluded_uris, operation_type=_get_operation_type(operation), resource_type=ResourceType.Document + ) + def _perform_write_operation( - operation, - container, - created_doc, - expected_uris, - excluded_uris, - retry_write=False, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - excluded_locations: Optional[list[str]] = None, - **kwargs): + operation, + container, + created_doc, + expected_uris, + excluded_uris, + retry_write=False, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + excluded_locations: Optional[list[str]] = None, + **kwargs, +): """Execute different types of write operations""" excluded_locations = [] if excluded_locations is None else excluded_locations if availability_strategy is not None: - kwargs['availability_strategy'] = availability_strategy + kwargs["availability_strategy"] = availability_strategy if operation == CREATE: doc = _create_doc() - container.create_item( - body=doc, - retry_write=retry_write, - excluded_locations=excluded_locations, - **kwargs) + container.create_item(body=doc, retry_write=retry_write, excluded_locations=excluded_locations, **kwargs) elif operation == UPSERT: doc = _create_doc() - container.upsert_item( - body=doc, - retry_write=retry_write, - excluded_locations=excluded_locations, - **kwargs) + container.upsert_item(body=doc, retry_write=retry_write, excluded_locations=excluded_locations, **kwargs) elif operation == REPLACE: - created_doc['name'] = 'updated document' + created_doc["name"] = "updated document" container.replace_item( - item=created_doc['id'], + item=created_doc["id"], body=created_doc, retry_write=retry_write, excluded_locations=excluded_locations, - **kwargs) + **kwargs, + ) elif operation == DELETE: container.delete_item( - item=created_doc['id'], - partition_key=created_doc['pk'], + item=created_doc["id"], + partition_key=created_doc["pk"], retry_write=retry_write, excluded_locations=excluded_locations, - **kwargs) + **kwargs, + ) elif operation == PATCH: operations = [{"op": "replace", "path": "/name", "value": "patched document"}] container.patch_item( - item=created_doc['id'], - partition_key=created_doc['pk'], + item=created_doc["id"], + partition_key=created_doc["pk"], patch_operations=operations, retry_write=retry_write, excluded_locations=excluded_locations, - **kwargs) + **kwargs, + ) elif operation == BATCH: doc = _create_doc() - batch_ops = [ - ("upsert", (doc,)) - ] + batch_ops = [("upsert", (doc,))] container.execute_item_batch( - batch_ops, - partition_key=doc['pk'], - retry_write=retry_write, - excluded_locations=excluded_locations, - **kwargs) + batch_ops, partition_key=doc["pk"], retry_write=retry_write, excluded_locations=excluded_locations, **kwargs + ) _validate_response_uris( - expected_uris, - excluded_uris, - operation_type=_get_operation_type(operation), - resource_type=ResourceType.Document) + expected_uris, excluded_uris, operation_type=_get_operation_type(operation), resource_type=ResourceType.Document + ) + def _validate_response_uris(expected_location_uris, excluded_location_uris, operation_type=None, resource_type=None): """Validate that response came from expected region and not from excluded regions""" # Get Request URLs from mock handler messages req_urls = [] for msg in TestAvailabilityStrategy.MOCK_HANDLER.messages: - if 'Request URL:' not in msg: + if "Request URL:" not in msg: continue - + # If operation_type and resource_type specified, filter messages if operation_type and resource_type: req_resource_type = re.search(r"'x-ms-thinclient-proxy-resource-type':\s*'([^']+)'", msg) req_operation_type = re.search(r"'x-ms-thinclient-proxy-operation-type':\s*'([^']+)'", msg) - + if not (req_resource_type and req_operation_type): continue - + if resource_type != req_resource_type.group(1) or operation_type != req_operation_type.group(1): continue - + scheme, rest = msg.split()[2].strip("'").split("//", 1) req_location = rest.split("/", 1)[0] req_urls.append(f"{scheme}//{req_location}/") assert set(req_urls) == set(expected_location_uris), "No matching request URLs found in mock handler messages" - assert all(location not in excluded_location_uris for location in req_urls), "Found request being routed to excluded regions unexpected" + assert all( + location not in excluded_location_uris for location in req_urls + ), "Found request being routed to excluded regions unexpected" + def _validate_error_uri(exc_info, expected_uri): """Validate that error response came from expected region""" request = exc_info.value.response.get_response_headers()["_request"] assert request.url.startswith(expected_uri) + def _get_operation_type(test_operation_type: str) -> str: if test_operation_type == READ: return OperationType.Read @@ -259,6 +243,7 @@ def _get_operation_type(test_operation_type: str) -> str: raise ValueError("invalid operationType") + @pytest.mark.cosmosMultiRegion class TestAvailabilityStrategy: host = test_config.TestConfig.host @@ -296,28 +281,27 @@ def _setup_method_with_custom_transport(self, custom_transport, default_endpoint default_endpoint = self.host # Set preferred locations with write locations first - preferred_locations = self.write_locations + [loc for loc in self.read_locations if loc not in self.write_locations] + preferred_locations = self.write_locations + [ + loc for loc in self.read_locations if loc not in self.write_locations + ] container_id = kwargs.pop("container_id", None) if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID client = CosmosClient( - default_endpoint, + default_endpoint, self.master_key, preferred_locations=preferred_locations, transport=custom_transport, retry_write=retry_write, - **kwargs + **kwargs, ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} - def _get_custom_transport_with_fault_injection( - self, - predicate, - error_lambda): + def _get_custom_transport_with_fault_injection(self, predicate, error_lambda): """Setup test with fault injection""" custom_transport = FaultInjectionTransport() custom_transport.add_fault(predicate, error_lambda) @@ -328,40 +312,44 @@ def _clean_up_container(self, database_id: str, container_id: str): all_items = list(container.read_all_items()) for item in all_items: try: - container.delete_item(item['id'], item['pk']) + container.delete_item(item["id"], item["pk"]) except Exception: pass - @pytest.mark.parametrize("threshold_ms,threshold_steps_ms, error_message", [ - (-1, 100, "threshold_ms must be positive"), - (0, 100, "threshold_ms must be positive"), - (100, -1, "threshold_steps_ms must be positive"), - (100,0, "threshold_steps_ms must be positive") - ]) + @pytest.mark.parametrize( + "threshold_ms,threshold_steps_ms, error_message", + [ + (-1, 100, "threshold_ms must be positive"), + (0, 100, "threshold_ms must be positive"), + (100, -1, "threshold_steps_ms must be positive"), + (100, 0, "threshold_steps_ms must be positive"), + ], + ) def test_invalid_thresholds(self, threshold_ms, threshold_steps_ms, error_message): """Test that creating strategy with non-positive thresholds raises ValueError when enabled""" with pytest.raises(ValueError, match=error_message): - config = {'threshold_ms':threshold_ms, 'threshold_steps_ms':threshold_steps_ms} + config = {"threshold_ms": threshold_ms, "threshold_steps_ms": threshold_steps_ms} _validate_request_hedging_strategy(config) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) - @pytest.mark.parametrize("client_availability_strategy, request_availability_strategy", [ - (None, {'threshold_ms':150, 'threshold_steps_ms':50}), - ({'threshold_ms':150, 'threshold_steps_ms':50}, None), - ({'threshold_ms':150, 'threshold_steps_ms':50}, {'threshold_ms':150, 'threshold_steps_ms':50}) - ]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) + @pytest.mark.parametrize( + "client_availability_strategy, request_availability_strategy", + [ + (None, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ({"threshold_ms": 150, "threshold_steps_ms": 50}, None), + ({"threshold_ms": 150, "threshold_steps_ms": 50}, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ], + ) def test_availability_strategy_in_steady_state( - self, - operation, - client_availability_strategy, - request_availability_strategy): + self, operation, client_availability_strategy, request_availability_strategy + ): """Test for steady state, operations go to first preferred location even with availability strategy enabled""" - setup = self._setup_method_with_custom_transport( - None, - availability_strategy=client_availability_strategy) + setup = self._setup_method_with_custom_transport(None, availability_strategy=client_availability_strategy) doc = _create_doc() - setup['col'].create_item(body=doc) + setup["col"].create_item(body=doc) expected_uris = [_location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1)] excluded_uris = [_location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2)] @@ -370,199 +358,221 @@ def test_availability_strategy_in_steady_state( if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: _perform_read_operation( operation, - setup['col'], + setup["col"], doc, expected_uris, excluded_uris, - availability_strategy=request_availability_strategy) + availability_strategy=request_availability_strategy, + ) else: _perform_write_operation( operation, - setup['col'], + setup["col"], doc, expected_uris, excluded_uris, - availability_strategy=request_availability_strategy) - self._clean_up_container(setup['db'].id, setup['col'].id) - - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) - @pytest.mark.parametrize("client_availability_strategy, request_availability_strategy", [ - (None, {'threshold_ms':150, 'threshold_steps_ms':50}), - ({'threshold_ms':150, 'threshold_steps_ms':50}, None), - ({'threshold_ms':700, 'threshold_steps_ms':50}, {'threshold_ms':150, 'threshold_steps_ms':50}) - ]) + availability_strategy=request_availability_strategy, + ) + self._clean_up_container(setup["db"].id, setup["col"].id) + + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) + @pytest.mark.parametrize( + "client_availability_strategy, request_availability_strategy", + [ + (None, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ({"threshold_ms": 150, "threshold_steps_ms": 50}, None), + ({"threshold_ms": 700, "threshold_steps_ms": 50}, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ], + ) def test_client_availability_strategy_failover( - self, - operation, - client_availability_strategy, - request_availability_strategy): + self, operation, client_availability_strategy, request_availability_strategy + ): """Test operations failover to second preferred location on errors""" uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True, - availability_strategy=client_availability_strategy) + custom_transport, multiple_write_locations=True, availability_strategy=client_availability_strategy + ) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down, failed_over_uri] # Test operation with fault injection if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: _perform_read_operation( - operation, - setup['col'], - doc, - expected_uris, - [], - availability_strategy=request_availability_strategy) + operation, setup["col"], doc, expected_uris, [], availability_strategy=request_availability_strategy + ) else: _perform_write_operation( operation, - setup['col'], + setup["col"], doc, expected_uris, [], retry_write=True, - availability_strategy=request_availability_strategy) - self._clean_up_container(setup['db'].id, setup['col'].id) + availability_strategy=request_availability_strategy, + ) + self._clean_up_container(setup["db"].id, setup["col"].id) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) @pytest.mark.parametrize("status_code, sub_status_code", NON_TRANSIENT_STATUS_CODES) - def test_non_transient_errors_from_failed_over_region(self, operation, status_code: int, sub_status_code: Optional[int]): + def test_non_transient_errors_from_failed_over_region( + self, operation, status_code: int, sub_status_code: Optional[int] + ): """Test that operations non-transient errors from failed over region will be returned as the final result""" uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) # fault injection in second preferred region - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, failed_over_uri)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, failed_over_uri) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( 0, - CosmosHttpResponseError(status_code=status_code, message=f"Injected {status_code} Error", sub_status=sub_status_code) + CosmosHttpResponseError( + status_code=status_code, message=f"Injected {status_code} Error", sub_status=sub_status_code + ), ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) # setup fault injection in first preferred region - predicate_first_region = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate_first_region = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda_first_region = lambda r: FaultInjectionTransport.error_after_delay( - 500, - CosmosHttpResponseError(status_code=503, message="Injected Error") + 500, CosmosHttpResponseError(status_code=503, message="Injected Error") ) custom_transport.add_fault(predicate_first_region, error_lambda_first_region) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} - setup = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True) + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} + setup = self._setup_method_with_custom_transport(custom_transport, multiple_write_locations=True) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down, failed_over_uri] # Test should fail with original error without failover with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - _perform_read_operation(operation, setup['col'], doc, expected_uris, [], availability_strategy=strategy) + _perform_read_operation(operation, setup["col"], doc, expected_uris, [], availability_strategy=strategy) else: - _perform_write_operation(operation, setup['col'], doc, expected_uris, [], retry_write=True, availability_strategy=strategy) - + _perform_write_operation( + operation, setup["col"], doc, expected_uris, [], retry_write=True, availability_strategy=strategy + ) + # Verify error code assert exc_info.value.status_code == status_code - self._clean_up_container(setup['db'].id, setup['col'].id) + self._clean_up_container(setup["db"].id, setup["col"].id) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) def test_transient_error_from_failed_over_region(self, operation): """Test non-CosmosHttpResponseError exceptions from second region will be treated as transient failure, - the result from first result will be used as the final result""" + the result from first result will be used as the final result""" uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) # fault injection in second preferred region - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, failed_over_uri)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, failed_over_uri) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - ServiceResponseError(message="Generic Service Error") + 0, ServiceResponseError(message="Generic Service Error") ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) # setup fault injection in first preferred region - predicate_first_region = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate_first_region = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda_first_region = lambda r: FaultInjectionTransport.error_after_delay( 500, - CosmosHttpResponseError(status_code=400, message="Injected Error") # using a non retryable exceptions here + CosmosHttpResponseError(status_code=400, message="Injected Error"), # using a non retryable exceptions here ) custom_transport.add_fault(predicate_first_region, error_lambda_first_region) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} - setup = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True) + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} + setup = self._setup_method_with_custom_transport(custom_transport, multiple_write_locations=True) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down, failed_over_uri] # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - _perform_read_operation(operation, setup['col'], doc, expected_uris, [], availability_strategy=strategy) + _perform_read_operation(operation, setup["col"], doc, expected_uris, [], availability_strategy=strategy) else: - _perform_write_operation(operation, setup['col'], doc, expected_uris, [], retry_write=True, availability_strategy=strategy) + _perform_write_operation( + operation, setup["col"], doc, expected_uris, [], retry_write=True, availability_strategy=strategy + ) # Verify error code assert exc_info.value.status_code == 400 - self._clean_up_container(setup['db'].id, setup['col'].id) + self._clean_up_container(setup["db"].id, setup["col"].id) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) def test_request_level_disable_override_client_strategy(self, operation): """Test that request-level disabled policy overrides client-level enabled policy""" # Setup client with enabled hedging policy - client_strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + client_strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( 500, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") # using non retryable errors to verify the request will only go to the first region + CosmosHttpResponseError( + status_code=400, message="Injected Error" + ), # using non retryable errors to verify the request will only go to the first region ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup = self._setup_method_with_custom_transport(custom_transport, availability_strategy=client_strategy) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down] excluded_uris = [failed_over_uri] @@ -570,104 +580,130 @@ def test_request_level_disable_override_client_strategy(self, operation): # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - _perform_read_operation(operation, setup['col'], doc, expected_uris, excluded_uris, availability_strategy=False) + _perform_read_operation( + operation, setup["col"], doc, expected_uris, excluded_uris, availability_strategy=False + ) else: - _perform_write_operation(operation, setup['col'], doc, expected_uris, excluded_uris, retry_write=True, availability_strategy=False) + _perform_write_operation( + operation, + setup["col"], + doc, + expected_uris, + excluded_uris, + retry_write=True, + availability_strategy=False, + ) # Verify error code assert exc_info.value.status_code == 400 - self._clean_up_container(setup['db'].id, setup['col'].id) + self._clean_up_container(setup["db"].id, setup["col"].id) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) def test_request_level_enable_override_client_disable(self, operation): """Test that request-level enabled policy overrides client-level disabled policy""" uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( 700, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + CosmosHttpResponseError(status_code=400, message="Injected Error"), # using non retryable errors to verify the request will only go to the first region ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - setup = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True) + setup = self._setup_method_with_custom_transport(custom_transport, multiple_write_locations=True) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) # Create request-level policy to enable hedging - request_strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + request_strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} expected_uris = [uri_down, failed_over_uri] # Test operation with fault injection if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - _perform_read_operation(operation, setup['col'], doc, expected_uris, [], availability_strategy=request_strategy) + _perform_read_operation( + operation, setup["col"], doc, expected_uris, [], availability_strategy=request_strategy + ) else: - _perform_write_operation(operation, setup['col'], doc, expected_uris, [], retry_write=True, availability_strategy=request_strategy) + _perform_write_operation( + operation, + setup["col"], + doc, + expected_uris, + [], + retry_write=True, + availability_strategy=request_strategy, + ) - self._clean_up_container(setup['db'].id, setup['col'].id) + self._clean_up_container(setup["db"].id, setup["col"].id) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) def test_no_cross_region_request_with_exclude_regions(self, operation): """Test that even with request-level CrossRegionHedgingStrategy overrides, there will be no cross region hedging due to excluded regions""" uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( 500, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + CosmosHttpResponseError(status_code=400, message="Injected Error"), # using non retryable errors to verify the request will only go to the first region ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - setup = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True) + setup = self._setup_method_with_custom_transport(custom_transport, multiple_write_locations=True) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down] excluded_uris = [failed_over_uri] # Test should fail with error from the first region - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: _perform_read_operation( operation, - setup['col'], + setup["col"], doc, expected_uris, excluded_uris, excluded_locations=[self.REGION_2], - availability_strategy=strategy) + availability_strategy=strategy, + ) else: _perform_write_operation( operation, - setup['col'], + setup["col"], doc, expected_uris, excluded_uris, retry_write=True, excluded_locations=[self.REGION_2], - availability_strategy=strategy) + availability_strategy=strategy, + ) # Verify error code assert exc_info.value.status_code == 400 - self._clean_up_container(setup['db'].id, setup['col'].id) + self._clean_up_container(setup["db"].id, setup["col"].id) @pytest.mark.parametrize("operation", [CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) def test_no_cross_region_request_with_retry_write_disabled(self, operation): @@ -675,35 +711,37 @@ def test_no_cross_region_request_with_retry_write_disabled(self, operation): uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( 500, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + CosmosHttpResponseError(status_code=400, message="Injected Error"), # using non retryable errors to verify the request will only go to the first region ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - setup = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True) + setup = self._setup_method_with_custom_transport(custom_transport, multiple_write_locations=True) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down] excluded_uris = [failed_over_uri] - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: - _perform_write_operation(operation, setup['col'], doc, expected_uris, excluded_uris, availability_strategy=strategy) + _perform_write_operation( + operation, setup["col"], doc, expected_uris, excluded_uris, availability_strategy=strategy + ) # Verify error code assert exc_info.value.status_code == 400 - self._clean_up_container(setup['db'].id, setup['col'].id) + self._clean_up_container(setup["db"].id, setup["col"].id) @pytest.mark.parametrize("operation", [READ, QUERY_PK, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) def test_per_partition_circular_breaker_with_cancelled_first_future(self, operation): @@ -720,82 +758,87 @@ def test_per_partition_circular_breaker_with_cancelled_first_future(self, operat uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=503, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=503, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} setup_with_fault_injection = self._setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True, - container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID + custom_transport, multiple_write_locations=True, container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID + ) + setup_without_fault = self._setup_method_with_custom_transport( + None, container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID ) - setup_without_fault = self._setup_method_with_custom_transport(None, container_id = self.TEST_SINGLE_PARTITION_CONTAINER_ID) # First operation will attempt first region, fail, and then succeed in second region expected_uris = [uri_down, failed_over_uri] for _ in range(5): doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: _perform_read_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, [], - availability_strategy=strategy) + availability_strategy=strategy, + ) else: _perform_write_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, [], retry_write=True, - availability_strategy=strategy) + availability_strategy=strategy, + ) # Subsequent operations should go directly to second region due to per partition circular breaker expected_uris = [failed_over_uri] excluded_uris = [uri_down] doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) self.MOCK_HANDLER.reset() time.sleep(2) if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: _perform_read_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, excluded_uris, - availability_strategy=strategy) + availability_strategy=strategy, + ) else: _perform_write_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, excluded_uris, retry_write=True, - availability_strategy=strategy) + availability_strategy=strategy, + ) finally: del os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] del os.environ["AZURE_COSMOS_CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_WRITE"] del os.environ["AZURE_COSMOS_CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_READ"] - self._clean_up_container(setup_with_fault_injection['db'].id, setup_with_fault_injection['col'].id) + self._clean_up_container(setup_with_fault_injection["db"].id, setup_with_fault_injection["col"].id) def test_custom_thread_pool_executor(self): """Test a customized thread pool executor can be configured on client""" @@ -804,88 +847,76 @@ def test_custom_thread_pool_executor(self): failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) # fault injection in first preferred region - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, OperationType.Read) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, OperationType.Read) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 500, - CosmosHttpResponseError(status_code=400, message="Injected Error") + 500, CosmosHttpResponseError(status_code=400, message="Injected Error") ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} setup_with_transport = self._setup_method_with_custom_transport( - custom_transport, - availability_strategy_executor=ThreadPoolExecutor(max_workers=1)) + custom_transport, availability_strategy_executor=ThreadPoolExecutor(max_workers=1) + ) doc = _create_doc() - setup_with_transport['col'].create_item(doc) + setup_with_transport["col"].create_item(doc) # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: _perform_read_operation( - READ, - setup_with_transport['col'], - doc, - [uri_down], - [failed_over_uri], - availability_strategy=strategy) + READ, setup_with_transport["col"], doc, [uri_down], [failed_over_uri], availability_strategy=strategy + ) # Verify error code matches first region's error assert exc_info.value.status_code == 400 - self._clean_up_container(setup_with_transport['db'].id, setup_with_transport['col'].id) + self._clean_up_container(setup_with_transport["db"].id, setup_with_transport["col"].id) - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) def test_default_availability_strategy_with_ppaf_enabled(self, operation): """Test availability strategy is enabled when ppaf is enabled, operations failover to second preferred location on errors""" uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_1) failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, self.REGION_2) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_is_operation_type(r, - _get_operation_type(operation)) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) # enable ppaf is_get_account_predicate = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) # Set the database account response to have PPAF enabled - ppaf_enabled_database_account = \ - lambda r, inner: FaultInjectionTransport.transform_topology_ppaf_enabled(inner=inner) - custom_transport.add_response_transformation( - is_get_account_predicate, - ppaf_enabled_database_account) + ppaf_enabled_database_account = lambda r, inner: FaultInjectionTransport.transform_topology_ppaf_enabled( + inner=inner + ) + custom_transport.add_response_transformation(is_get_account_predicate, ppaf_enabled_database_account) - setup = self._setup_method_with_custom_transport(custom_transport,multiple_write_locations=True) + setup = self._setup_method_with_custom_transport(custom_transport, multiple_write_locations=True) setup_without_fault = self._setup_method_with_custom_transport(None) doc = _create_doc() - setup_without_fault['col'].create_item(body=doc) + setup_without_fault["col"].create_item(body=doc) expected_uris = [uri_down, failed_over_uri] # Test operation with fault injection if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - _perform_read_operation( - operation, - setup['col'], - doc, - expected_uris, - []) + _perform_read_operation(operation, setup["col"], doc, expected_uris, []) else: - _perform_write_operation( - operation, - setup['col'], - doc, - expected_uris, - [], - retry_write=True) - self._clean_up_container(setup['db'].id, setup['col'].id) + _perform_write_operation(operation, setup["col"], doc, expected_uris, [], retry_write=True) + self._clean_up_container(setup["db"].id, setup["col"].id) + -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_availability_strategy_async.py b/sdk/cosmos/azure-cosmos/tests/test_availability_strategy_async.py index ffd783498c6c..047da5780e55 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_availability_strategy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_availability_strategy_async.py @@ -21,7 +21,8 @@ from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.http_constants import ResourceType -#cspell:ignore PPAF, ppaf +# cspell:ignore PPAF, ppaf + class MockHandler(logging.Handler): def __init__(self): @@ -34,6 +35,7 @@ def reset(self): def emit(self, record): self.messages.append(record.msg) + @pytest_asyncio.fixture() async def setup(): # Set up logging @@ -42,11 +44,12 @@ async def setup(): logger.setLevel(logging.DEBUG) config = test_config.TestConfig() - if config.masterKey == '[YOUR_KEY_HERE]' or config.host == '[YOUR_ENDPOINT_HERE]': + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) test_client = CosmosClient(config.host, config.masterKey) database_account = await test_client._get_database_account() write_locations = [loc["name"] for loc in database_account._WritableLocations] @@ -58,13 +61,14 @@ async def setup(): "read_locations": read_locations, "region_1": write_locations[0], "region_2": write_locations[1] if len(write_locations) > 1 else read_locations[0], - "client_without_fault": test_client + "client_without_fault": test_client, } yield account_location_with_client await test_client.close() logger.removeHandler(TestAsyncAvailabilityStrategy.MOCK_HANDLER) + # Operation constants READ = "read" CREATE = "create" @@ -79,182 +83,169 @@ async def setup(): CHANGE_FEED = "change_feed" # Non-transient status codes -NON_TRANSIENT_STATUS_CODES = [ - (400, None), - (409, None), - (405, None), - (412, None), - (413, None), - (401, None), - (404, 0) -] +NON_TRANSIENT_STATUS_CODES = [(400, None), (409, None), (405, None), (412, None), (413, None), (401, None), (404, 0)] + def _create_doc(): - return { - 'id': str(uuid.uuid4()), - 'pk': 'test_pk', - 'name': 'sample document', - 'key': 'value' - } + return {"id": str(uuid.uuid4()), "pk": "test_pk", "name": "sample document", "key": "value"} + async def _perform_read_operation( - operation, - container, - created_doc, - expected_uris, - excluded_uris, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - excluded_locations: Optional[list[str]] = None, - **kwargs): + operation, + container, + created_doc, + expected_uris, + excluded_uris, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + excluded_locations: Optional[list[str]] = None, + **kwargs, +): excluded_locations = [] if excluded_locations is None else excluded_locations """Execute different types of read operations""" if availability_strategy is not None: - kwargs['availability_strategy'] = availability_strategy + kwargs["availability_strategy"] = availability_strategy if operation == READ: await container.read_item( - item=created_doc['id'], - partition_key=created_doc['pk'], - excluded_locations=excluded_locations, - **kwargs) + item=created_doc["id"], partition_key=created_doc["pk"], excluded_locations=excluded_locations, **kwargs + ) elif operation == QUERY: - response = [item async for item in container.query_items( - query="SELECT * FROM c WHERE c.id=@id", - parameters=[{"name": "@id", "value": created_doc['id']}], - excluded_locations=excluded_locations, - **kwargs - )] - assert response[0]['id'] == created_doc['id'] + response = [ + item + async for item in container.query_items( + query="SELECT * FROM c WHERE c.id=@id", + parameters=[{"name": "@id", "value": created_doc["id"]}], + excluded_locations=excluded_locations, + **kwargs, + ) + ] + assert response[0]["id"] == created_doc["id"] elif operation == QUERY_PK: - response = [item async for item in container.query_items( - query="SELECT * FROM c WHERE c.id=@id AND c.pk=@pk", - parameters=[{"name": "@id", "value": created_doc['id']}, {"name": "@pk", "value": created_doc['pk']}], - partition_key=created_doc['pk'], - excluded_locations=excluded_locations, - **kwargs - )] - assert response[0]['id'] == created_doc['id'] + response = [ + item + async for item in container.query_items( + query="SELECT * FROM c WHERE c.id=@id AND c.pk=@pk", + parameters=[{"name": "@id", "value": created_doc["id"]}, {"name": "@pk", "value": created_doc["pk"]}], + partition_key=created_doc["pk"], + excluded_locations=excluded_locations, + **kwargs, + ) + ] + assert response[0]["id"] == created_doc["id"] elif operation == READ_ALL: - response = [item async for item in container.read_all_items( - excluded_locations=excluded_locations, - **kwargs)] - assert any(item['id'] == created_doc['id'] for item in response) + response = [item async for item in container.read_all_items(excluded_locations=excluded_locations, **kwargs)] + assert any(item["id"] == created_doc["id"] for item in response) elif operation == CHANGE_FEED: - response = [item async for item in container.query_items_change_feed( - partition_key=created_doc['pk'], - excluded_locations=excluded_locations, - **kwargs)] - any(item['id'] == created_doc['id'] for item in response) + response = [ + item + async for item in container.query_items_change_feed( + partition_key=created_doc["pk"], excluded_locations=excluded_locations, **kwargs + ) + ] + any(item["id"] == created_doc["id"] for item in response) _validate_response_uris( - expected_uris, - excluded_uris, - operation_type=_get_operation_type(operation), - resource_type=ResourceType.Document) + expected_uris, excluded_uris, operation_type=_get_operation_type(operation), resource_type=ResourceType.Document + ) + async def _perform_write_operation( - operation, - container, - created_doc, - expected_uris, - excluded_uris, - retry_write=False, - availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, - excluded_locations: Optional[list[str]] = None, - **kwargs): + operation, + container, + created_doc, + expected_uris, + excluded_uris, + retry_write=False, + availability_strategy: Optional[Union[bool, dict[str, Any]]] = None, + excluded_locations: Optional[list[str]] = None, + **kwargs, +): """Execute different types of write operations""" excluded_locations = [] if excluded_locations is None else excluded_locations if availability_strategy is not None: - kwargs['availability_strategy'] = availability_strategy + kwargs["availability_strategy"] = availability_strategy if operation == CREATE: doc = _create_doc() - await container.create_item( - body=doc, - retry_write=retry_write, - excluded_locations=excluded_locations, - **kwargs) + await container.create_item(body=doc, retry_write=retry_write, excluded_locations=excluded_locations, **kwargs) elif operation == UPSERT: doc = _create_doc() - await container.upsert_item( - body=doc, - retry_write=retry_write, - excluded_locations=excluded_locations, - **kwargs) + await container.upsert_item(body=doc, retry_write=retry_write, excluded_locations=excluded_locations, **kwargs) elif operation == REPLACE: - created_doc['name'] = 'updated document' + created_doc["name"] = "updated document" await container.replace_item( - item=created_doc['id'], + item=created_doc["id"], body=created_doc, retry_write=retry_write, excluded_locations=excluded_locations, - **kwargs) + **kwargs, + ) elif operation == DELETE: await container.delete_item( - item=created_doc['id'], - partition_key=created_doc['pk'], + item=created_doc["id"], + partition_key=created_doc["pk"], retry_write=retry_write, excluded_locations=excluded_locations, - **kwargs) + **kwargs, + ) elif operation == PATCH: operations = [{"op": "replace", "path": "/name", "value": "patched document"}] await container.patch_item( - item=created_doc['id'], - partition_key=created_doc['pk'], + item=created_doc["id"], + partition_key=created_doc["pk"], patch_operations=operations, retry_write=retry_write, excluded_locations=excluded_locations, - **kwargs) + **kwargs, + ) elif operation == BATCH: doc = _create_doc() - batch_ops = [ - ("create", (doc,)) - ] + batch_ops = [("create", (doc,))] await container.execute_item_batch( - batch_ops, - partition_key=doc['pk'], - retry_write=retry_write, - excluded_locations=excluded_locations, - **kwargs) + batch_ops, partition_key=doc["pk"], retry_write=retry_write, excluded_locations=excluded_locations, **kwargs + ) _validate_response_uris( - expected_uris, - excluded_uris, - operation_type=_get_operation_type(operation), - resource_type=ResourceType.Document) + expected_uris, excluded_uris, operation_type=_get_operation_type(operation), resource_type=ResourceType.Document + ) + def _validate_response_uris(expected_location_uris, excluded_location_uris, operation_type=None, resource_type=None): """Validate that response came from expected region and not from excluded regions""" # Get Request URLs from mock handler messages req_urls = [] for msg in TestAsyncAvailabilityStrategy.MOCK_HANDLER.messages: - if 'Request URL:' not in msg: + if "Request URL:" not in msg: continue - + # If operation_type and resource_type specified, filter messages if operation_type and resource_type: req_resource_type = re.search(r"'x-ms-thinclient-proxy-resource-type':\s*'([^']+)'", msg) req_operation_type = re.search(r"'x-ms-thinclient-proxy-operation-type':\s*'([^']+)'", msg) - + if not (req_resource_type and req_operation_type): continue - + if resource_type != req_resource_type.group(1) or operation_type != req_operation_type.group(1): continue - + scheme, rest = msg.split()[2].strip("'").split("//", 1) req_location = rest.split("/", 1)[0] req_urls.append(f"{scheme}//{req_location}/") assert set(req_urls) == set(expected_location_uris), "No matching request URLs found in mock handler messages" - assert all(location not in excluded_location_uris for location in req_urls), "Found request being routed to excluded regions unexpected" + assert all( + location not in excluded_location_uris for location in req_urls + ), "Found request being routed to excluded regions unexpected" + def _validate_error_uri(exc_info, expected_uri): """Validate that error response came from expected region""" request = exc_info.value.response.get_response_headers()["_request"] assert request.url.startswith(expected_uri) + def _get_operation_type(test_operation_type: str) -> str: if test_operation_type == READ: return OperationType.Read @@ -281,6 +272,7 @@ def _get_operation_type(test_operation_type: str) -> str: raise ValueError("invalid operationType") + @pytest.mark.cosmosMultiRegion @pytest.mark.asyncio @pytest.mark.usefixtures("setup") @@ -301,13 +293,8 @@ def setup_method(self): self.MOCK_HANDLER.reset() async def _setup_method_with_custom_transport( - self, - write_locations, - read_locations, - custom_transport, - default_endpoint=None, - retry_write=False, - **kwargs): + self, write_locations, read_locations, custom_transport, default_endpoint=None, retry_write=False, **kwargs + ): """Initialize test client with optional custom transport and endpoint""" if default_endpoint is None: default_endpoint = self.host @@ -320,76 +307,74 @@ async def _setup_method_with_custom_transport( container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID client = CosmosClient( - default_endpoint, + default_endpoint, self.master_key, preferred_locations=preferred_locations, transport=custom_transport, retry_write=retry_write, - **kwargs + **kwargs, ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} - def _get_custom_transport_with_fault_injection( - self, - predicate, - error_lambda): + def _get_custom_transport_with_fault_injection(self, predicate, error_lambda): """Setup test with fault injection""" custom_transport = FaultInjectionTransportAsync() custom_transport.add_fault(predicate, error_lambda) return custom_transport - async def _clean_up_container(self, client: CosmosClient, database_id:str, container_id:str): + async def _clean_up_container(self, client: CosmosClient, database_id: str, container_id: str): container = client.get_database_client(database_id).get_container_client(container_id) all_items = [item async for item in container.read_all_items()] for item in all_items: try: - await container.delete_item(item['id'], item['pk']) + await container.delete_item(item["id"], item["pk"]) except Exception: pass - @pytest.mark.parametrize("threshold_ms,threshold_steps_ms, error_message", [ - (-1, 100, "threshold_ms must be positive"), - (0, 100, "threshold_ms must be positive"), - (100, -1, "threshold_steps_ms must be positive"), - (100, 0, "threshold_steps_ms must be positive") - ]) + @pytest.mark.parametrize( + "threshold_ms,threshold_steps_ms, error_message", + [ + (-1, 100, "threshold_ms must be positive"), + (0, 100, "threshold_ms must be positive"), + (100, -1, "threshold_steps_ms must be positive"), + (100, 0, "threshold_steps_ms must be positive"), + ], + ) def test_invalid_thresholds_async(self, threshold_ms, threshold_steps_ms, error_message): """Test that creating strategy with non-positive thresholds raises ValueError when enabled""" with pytest.raises(ValueError, match=error_message): - config = {'threshold_ms': threshold_ms, - 'threshold_steps_ms': threshold_steps_ms} + config = {"threshold_ms": threshold_ms, "threshold_steps_ms": threshold_steps_ms} _validate_request_hedging_strategy(config) @pytest.mark.asyncio - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) - @pytest.mark.parametrize("client_availability_strategy, request_availability_strategy", [ - (None, {'threshold_ms':150, 'threshold_steps_ms':50}), - ({'threshold_ms':150, 'threshold_steps_ms':50}, None), - ({'threshold_ms':150, 'threshold_steps_ms':50}, - {'threshold_ms':150, 'threshold_steps_ms':50}) - ]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) + @pytest.mark.parametrize( + "client_availability_strategy, request_availability_strategy", + [ + (None, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ({"threshold_ms": 150, "threshold_steps_ms": 50}, None), + ({"threshold_ms": 150, "threshold_steps_ms": 50}, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ], + ) async def test_availability_strategy_in_steady_state_async( - self, - operation, - client_availability_strategy, - request_availability_strategy, - setup): + self, operation, client_availability_strategy, request_availability_strategy, setup + ): """Test for steady state, operations go to first preferred location even with availability strategy enabled""" # Setup client with availability strategy setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None, - availability_strategy=client_availability_strategy) + setup["write_locations"], setup["read_locations"], None, availability_strategy=client_availability_strategy + ) doc = _create_doc() - await setup_with_transport['col'].create_item(doc) + await setup_with_transport["col"].create_item(doc) await asyncio.sleep(0.5) - container = setup_with_transport['col'] - expected_uris = [_location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1'])] - excluded_uris = [_location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2'])] + container = setup_with_transport["col"] + expected_uris = [_location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"])] + excluded_uris = [_location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"])] # Test operation if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: @@ -399,7 +384,8 @@ async def test_availability_strategy_in_steady_state_async( doc, expected_uris, excluded_uris, - availability_strategy=request_availability_strategy) + availability_strategy=request_availability_strategy, + ) else: await _perform_write_operation( operation, @@ -407,189 +393,206 @@ async def test_availability_strategy_in_steady_state_async( doc, expected_uris, excluded_uris, - availability_strategy=request_availability_strategy) - await setup_with_transport['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + availability_strategy=request_availability_strategy, + ) + await setup_with_transport["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation",[READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) - @pytest.mark.parametrize("client_availability_strategy, request_availability_strategy", [ - (None, {'threshold_ms':150, 'threshold_steps_ms':50}), - ({'threshold_ms':150, 'threshold_steps_ms':50}, None), - ({'threshold_ms':700, 'threshold_steps_ms':50}, {'threshold_ms':150, 'threshold_steps_ms':50}) - ]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) + @pytest.mark.parametrize( + "client_availability_strategy, request_availability_strategy", + [ + (None, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ({"threshold_ms": 150, "threshold_steps_ms": 50}, None), + ({"threshold_ms": 700, "threshold_steps_ms": 50}, {"threshold_ms": 150, "threshold_steps_ms": 50}), + ], + ) async def test_client_availability_strategy_failover_async( - self, - operation, - client_availability_strategy, - request_availability_strategy, - setup): + self, operation, client_availability_strategy, request_availability_strategy, setup + ): """Test operations failover to second preferred location on errors""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], + setup["write_locations"], + setup["read_locations"], custom_transport, multiple_write_locations=True, - availability_strategy=client_availability_strategy) + availability_strategy=client_availability_strategy, + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) # Test operation with fault injection if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: await _perform_read_operation( operation, - setup_with_transport['col'], + setup_with_transport["col"], doc, [uri_down, failed_over_uri], [], - availability_strategy=request_availability_strategy) + availability_strategy=request_availability_strategy, + ) else: await _perform_write_operation( operation, - setup_with_transport['col'], + setup_with_transport["col"], doc, [uri_down, failed_over_uri], [], retry_write=True, - availability_strategy=request_availability_strategy) - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + availability_strategy=request_availability_strategy, + ) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) @pytest.mark.parametrize("status_code, sub_status_code", NON_TRANSIENT_STATUS_CODES) - async def test_non_transient_errors_from_failed_over_region_async(self, operation, status_code: int, sub_status_code: Optional[int], setup): + async def test_non_transient_errors_from_failed_over_region_async( + self, operation, status_code: int, sub_status_code: Optional[int], setup + ): """Test that operations non-transient errors from failed over region will be returned as the final result""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) # fault injection in second preferred region - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, failed_over_uri)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, failed_over_uri) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( 0, - CosmosHttpResponseError(status_code=status_code, message=f"Injected {status_code} Error", sub_status=sub_status_code) + CosmosHttpResponseError( + status_code=status_code, message=f"Injected {status_code} Error", sub_status=sub_status_code + ), ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) # setup fault injection in first preferred region - predicate_first_region = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate_first_region = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda_first_region = lambda r: FaultInjectionTransportAsync.error_after_delay( - 500, - CosmosHttpResponseError(status_code=503, message="Injected Error") + 500, CosmosHttpResponseError(status_code=503, message="Injected Error") ) custom_transport.add_fault(predicate_first_region, error_lambda_first_region) setup_with_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - multiple_write_locations=True) + setup["write_locations"], setup["read_locations"], custom_transport, multiple_write_locations=True + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) expected_uris = [uri_down, failed_over_uri] # Test should fail with original error without failover - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: await _perform_read_operation( - operation, - setup_with_fault['col'], - doc, - expected_uris, - [], - availability_strategy=strategy) + operation, setup_with_fault["col"], doc, expected_uris, [], availability_strategy=strategy + ) else: await _perform_write_operation( operation, - setup_with_fault['col'], + setup_with_fault["col"], doc, expected_uris, [], retry_write=True, - availability_strategy=strategy) + availability_strategy=strategy, + ) # Verify error code assert exc_info.value.status_code == status_code - await setup_with_fault['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_fault['db'].id, setup_with_fault['col'].id) + await setup_with_fault["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_fault["db"].id, setup_with_fault["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) async def test_transient_error_from_failed_over_region_async(self, operation, setup): """Test non-CosmosHttpResponseError exceptions from second region will be treated as transient failure, the result from first result will be used as the final result""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) # fault injection in second preferred region - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, failed_over_uri)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, failed_over_uri) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 0, - ServiceResponseError(message="Generic Service Error") + 0, ServiceResponseError(message="Generic Service Error") ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) # setup fault injection in first preferred region - predicate_first_region = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate_first_region = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda_first_region = lambda r: FaultInjectionTransportAsync.error_after_delay( 500, - CosmosHttpResponseError(status_code=400, message="Injected Error") # using a non retryable exception here + CosmosHttpResponseError(status_code=400, message="Injected Error"), # using a non retryable exception here ) custom_transport.add_fault(predicate_first_region, error_lambda_first_region) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - multiple_write_locations=True) + setup["write_locations"], setup["read_locations"], custom_transport, multiple_write_locations=True + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) expected_uris = [uri_down, failed_over_uri] @@ -597,61 +600,61 @@ async def test_transient_error_from_failed_over_region_async(self, operation, se with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: await _perform_read_operation( - operation, - setup_with_transport['col'], - doc, - expected_uris, - [], - availability_strategy=strategy) + operation, setup_with_transport["col"], doc, expected_uris, [], availability_strategy=strategy + ) else: await _perform_write_operation( operation, - setup_with_transport['col'], + setup_with_transport["col"], doc, expected_uris, [], retry_write=True, - availability_strategy=strategy) + availability_strategy=strategy, + ) # Verify error code matches first region's error assert exc_info.value.status_code == 400 - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) async def test_request_level_disabled_override_client_strategy_async(self, operation, setup): """Test that request-level disabled strategy overrides client-level enabled strategy""" # Setup client with enabled hedging strategy - client_strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + client_strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( 500, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + CosmosHttpResponseError(status_code=400, message="Injected Error"), # using none retryable errors to verify the request will only go to the first region ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - availability_strategy=client_strategy) + setup["write_locations"], setup["read_locations"], custom_transport, availability_strategy=client_strategy + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) expected_uris = [uri_down] excluded_uris = [failed_over_uri] @@ -659,176 +662,210 @@ async def test_request_level_disabled_override_client_strategy_async(self, opera # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - await _perform_read_operation(operation, setup_with_transport['col'], doc, expected_uris, excluded_uris, availability_strategy=False) + await _perform_read_operation( + operation, + setup_with_transport["col"], + doc, + expected_uris, + excluded_uris, + availability_strategy=False, + ) else: - await _perform_write_operation(operation, setup_with_transport['col'], doc, expected_uris, excluded_uris, retry_write=True, availability_strategy=False) + await _perform_write_operation( + operation, + setup_with_transport["col"], + doc, + expected_uris, + excluded_uris, + retry_write=True, + availability_strategy=False, + ) # Verify error code assert exc_info.value.status_code == 400 - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) async def test_request_level_enabled_override_client_disabled_async(self, operation, setup): """Test that request-level enabled policy overrides client-level disabled policy""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - multiple_write_locations=True) + setup["write_locations"], setup["read_locations"], custom_transport, multiple_write_locations=True + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) # Create request-level enabled policy - request_strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + request_strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} expected_uris = [uri_down, failed_over_uri] # Test operation with fault injection if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - await _perform_read_operation(operation, setup_with_transport['col'], doc, expected_uris, [], availability_strategy=request_strategy) + await _perform_read_operation( + operation, setup_with_transport["col"], doc, expected_uris, [], availability_strategy=request_strategy + ) else: - await _perform_write_operation(operation, setup_with_transport['col'], doc, expected_uris, [], retry_write=True, availability_strategy=request_strategy) + await _perform_write_operation( + operation, + setup_with_transport["col"], + doc, + expected_uris, + [], + retry_write=True, + availability_strategy=request_strategy, + ) - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio @pytest.mark.parametrize("operation", [CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) async def test_no_cross_region_request_with_retry_write_disabled_async(self, operation, setup): """Test that no cross region hedging occurs when retry_write is disabled for write operations""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 500, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 500, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - multiple_write_locations=True) + setup["write_locations"], setup["read_locations"], custom_transport, multiple_write_locations=True + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) expected_uris = [uri_down] excluded_uris = [failed_over_uri] - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: await _perform_write_operation( operation, - setup_with_transport['col'], + setup_with_transport["col"], doc, expected_uris, excluded_uris, retry_write=False, - availability_strategy=strategy) + availability_strategy=strategy, + ) # Verify error code assert exc_info.value.status_code == 400 - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) async def test_no_cross_region_request_with_exclude_regions_async(self, operation, setup): """Test that even with request-level CrossRegionHedgingStrategy overrides, there will be no cross region hedging due to excluded regions""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 500, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 500, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - multiple_write_locations=True) + setup["write_locations"], setup["read_locations"], custom_transport, multiple_write_locations=True + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) expected_uris = [uri_down] excluded_uris = [failed_over_uri] - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: await _perform_read_operation( operation, - setup_with_transport['col'], + setup_with_transport["col"], doc, expected_uris, excluded_uris, - excluded_locations=[setup['region_2']], - availability_strategy=strategy) + excluded_locations=[setup["region_2"]], + availability_strategy=strategy, + ) else: await _perform_write_operation( operation, - setup_with_transport['col'], + setup_with_transport["col"], doc, expected_uris, excluded_uris, retry_write=True, - excluded_locations=[setup['region_2']], - availability_strategy=strategy) + excluded_locations=[setup["region_2"]], + availability_strategy=strategy, + ) # Verify error code assert exc_info.value.status_code == 400 - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio @pytest.mark.parametrize("operation", [READ, QUERY_PK, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) @@ -843,199 +880,195 @@ async def test_per_partition_circular_breaker_with_cancelled_first_future_async( This test verifies the logic of recording failure of cancelled first_future.""" # Setup fault injection for first region - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=503, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=503, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} setup_with_fault_injection = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], + setup["write_locations"], + setup["read_locations"], custom_transport, multiple_write_locations=True, - container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID + container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID, ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], + setup["write_locations"], + setup["read_locations"], None, - container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID) + container_id=self.TEST_SINGLE_PARTITION_CONTAINER_ID, + ) # First operation will attempt first region, fail, and then succeed in second region expected_uris = [uri_down, failed_over_uri] for _ in range(5): doc = _create_doc() - await setup_without_fault['col'].create_item(body=doc) + await setup_without_fault["col"].create_item(body=doc) if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: await _perform_read_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, [], - availability_strategy=strategy) + availability_strategy=strategy, + ) else: await _perform_write_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, [], retry_write=True, - availability_strategy=strategy) + availability_strategy=strategy, + ) # Subsequent operations should go directly to second region due to per partition circular breaker expected_uris = [failed_over_uri] excluded_uris = [uri_down] doc = _create_doc() - await setup_without_fault['col'].create_item(body=doc) + await setup_without_fault["col"].create_item(body=doc) self.MOCK_HANDLER.reset() await asyncio.sleep(2) if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: await _perform_read_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, excluded_uris, - availability_strategy=strategy) + availability_strategy=strategy, + ) else: await _perform_write_operation( operation, - setup_with_fault_injection['col'], + setup_with_fault_injection["col"], doc, expected_uris, excluded_uris, retry_write=True, - availability_strategy=strategy) + availability_strategy=strategy, + ) - await setup_with_fault_injection['client'].close() - await setup_without_fault['client'].close() + await setup_with_fault_injection["client"].close() + await setup_without_fault["client"].close() finally: del os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] del os.environ["AZURE_COSMOS_CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_WRITE"] del os.environ["AZURE_COSMOS_CONSECUTIVE_ERROR_COUNT_TOLERATED_FOR_READ"] - await self._clean_up_container(setup['client_without_fault'], setup_with_fault_injection['db'].id, setup_with_fault_injection['col'].id) + await self._clean_up_container( + setup["client_without_fault"], setup_with_fault_injection["db"].id, setup_with_fault_injection["col"].id + ) @pytest.mark.asyncio async def test_max_concurrency_async(self, setup): """Test availability_strategy_max_concurrency will be effective""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) # fault injection in first preferred region - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, OperationType.Read) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, OperationType.Read) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 500, - CosmosHttpResponseError(status_code=400, message="Injected Error") + 500, CosmosHttpResponseError(status_code=400, message="Injected Error") ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - strategy = {'threshold_ms':100, 'threshold_steps_ms':50} + strategy = {"threshold_ms": 100, "threshold_steps_ms": 50} setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], + setup["write_locations"], + setup["read_locations"], custom_transport, multiple_write_locations=True, - availability_strategy_max_concurrency=1) + availability_strategy_max_concurrency=1, + ) doc = _create_doc() - await setup_with_transport['col'].create_item(doc) + await setup_with_transport["col"].create_item(doc) # Test should fail with error from the first region with pytest.raises(CosmosHttpResponseError) as exc_info: await _perform_read_operation( - READ, - setup_with_transport['col'], - doc, - [uri_down], - [failed_over_uri], - availability_strategy=strategy) + READ, setup_with_transport["col"], doc, [uri_down], [failed_over_uri], availability_strategy=strategy + ) # Verify error code matches first region's error assert exc_info.value.status_code == 400 - await setup_with_transport['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, setup_with_transport['col'].id) + await setup_with_transport["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) @pytest.mark.asyncio - @pytest.mark.parametrize("operation",[READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH]) - async def test_default_availability_strategy_with_ppaf_enabled_async( - self, - operation, - setup): + @pytest.mark.parametrize( + "operation", [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED, CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] + ) + async def test_default_availability_strategy_with_ppaf_enabled_async(self, operation, setup): """Test availability strategy is enabled when ppaf is enabled, operations failover to second preferred location on errors""" - uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_1']) - failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup['region_2']) + uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_1"]) + failed_over_uri = _location_cache.LocationCache.GetLocationalEndpoint(self.host, setup["region_2"]) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type( - operation)) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, _get_operation_type(operation)) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) error_lambda = lambda r: FaultInjectionTransportAsync.error_after_delay( - 1000, # Add delay to trigger hedging - CosmosHttpResponseError(status_code=400, message="Injected Error") + 1000, CosmosHttpResponseError(status_code=400, message="Injected Error") # Add delay to trigger hedging ) custom_transport = self._get_custom_transport_with_fault_injection(predicate, error_lambda) - #enable ppaf + # enable ppaf is_get_account_predicate = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) # Set the database account response to have PPAF enabled - ppaf_enabled_database_account = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_ppaf_enabled(inner=inner) - custom_transport.add_response_transformation( - is_get_account_predicate, - ppaf_enabled_database_account) + ppaf_enabled_database_account = lambda r, inner: FaultInjectionTransportAsync.transform_topology_ppaf_enabled( + inner=inner + ) + custom_transport.add_response_transformation(is_get_account_predicate, ppaf_enabled_database_account) setup_with_transport = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - custom_transport, - multiple_write_locations=True) + setup["write_locations"], setup["read_locations"], custom_transport, multiple_write_locations=True + ) setup_without_fault = await self._setup_method_with_custom_transport( - setup['write_locations'], - setup['read_locations'], - None) + setup["write_locations"], setup["read_locations"], None + ) doc = _create_doc() - await setup_without_fault['col'].create_item(doc) + await setup_without_fault["col"].create_item(doc) # Test operation with fault injection if operation in [READ, QUERY, QUERY_PK, READ_ALL, CHANGE_FEED]: - await _perform_read_operation( - operation, - setup_with_transport['col'], - doc, - [uri_down, failed_over_uri], - []) + await _perform_read_operation(operation, setup_with_transport["col"], doc, [uri_down, failed_over_uri], []) else: await _perform_write_operation( - operation, - setup_with_transport['col'], - doc, - [uri_down, failed_over_uri], - [], - retry_write=True) - await setup_with_transport['client'].close() - await setup_without_fault['client'].close() - await self._clean_up_container(setup['client_without_fault'], setup_with_transport['db'].id, - setup_with_transport['col'].id) - -if __name__ == '__main__': - unittest.main() \ No newline at end of file + operation, setup_with_transport["col"], doc, [uri_down, failed_over_uri], [], retry_write=True + ) + await setup_with_transport["client"].close() + await setup_without_fault["client"].close() + await self._clean_up_container( + setup["client_without_fault"], setup_with_transport["db"].id, setup_with_transport["col"].id + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility.py b/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility.py index 290308d6dcee..025b111ffc3b 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility.py +++ b/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility.py @@ -11,11 +11,14 @@ from azure.cosmos import Offer, http_constants, CosmosClient, DatabaseProxy, ContainerProxy, PartitionKey from azure.cosmos.exceptions import CosmosHttpResponseError + def check_pk_range_statistics_request_headers(raw_response): - assert raw_response.http_request.headers[http_constants.HttpHeaders.PopulatePartitionKeyRangeStatistics] == 'True' + assert raw_response.http_request.headers[http_constants.HttpHeaders.PopulatePartitionKeyRangeStatistics] == "True" + def check_quota_info_request_headers(raw_response): - assert raw_response.http_request.headers[http_constants.HttpHeaders.PopulateQuotaInfo] == 'True' + assert raw_response.http_request.headers[http_constants.HttpHeaders.PopulateQuotaInfo] == "True" + @pytest.mark.cosmosEmulator class TestBackwardsCompatibility(unittest.TestCase): @@ -30,11 +33,12 @@ class TestBackwardsCompatibility(unittest.TestCase): @classmethod def setUpClass(cls): - if cls.masterKey == '[YOUR_KEY_HERE]' or cls.host == '[YOUR_ENDPOINT_HERE]': + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.databaseForTest = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) cls.containerForTest = cls.databaseForTest.get_container_client(cls.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -50,11 +54,13 @@ def test_offer_methods(self): self.assertTrue(isinstance(container_offer, Offer)) def test_populate_quota_info(self): - self.containerForTest.read(populate_quota_info=True, raw_response_hook=check_quota_info_request_headers) - self.containerForTest.read(False, False, True, raw_response_hook=check_quota_info_request_headers) + self.containerForTest.read(populate_quota_info=True, raw_response_hook=check_quota_info_request_headers) + self.containerForTest.read(False, False, True, raw_response_hook=check_quota_info_request_headers) def test_populate_partition_key_range_statistics(self): - self.containerForTest.read(populate_partition_key_range_statistics=True, raw_response_hook=check_pk_range_statistics_request_headers) + self.containerForTest.read( + populate_partition_key_range_statistics=True, raw_response_hook=check_pk_range_statistics_request_headers + ) self.containerForTest.read(False, True, raw_response_hook=check_pk_range_statistics_request_headers) def test_session_token_compatibility(self): @@ -78,21 +84,29 @@ def test_session_token_compatibility(self): assert e.status_code == 404 # Container - container = self.databaseForTest.create_container(str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4())) + container = self.databaseForTest.create_container( + str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4()) + ) assert container is not None - container2 = self.databaseForTest.create_container_if_not_exists(str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4())) + container2 = self.databaseForTest.create_container_if_not_exists( + str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4()) + ) assert container2 is not None container_list = list(self.databaseForTest.list_containers(session_token=str(uuid.uuid4()))) - container_list2 = list(self.databaseForTest.query_containers(query="select * from c", session_token=str(uuid.uuid4()))) + container_list2 = list( + self.databaseForTest.query_containers(query="select * from c", session_token=str(uuid.uuid4())) + ) assert len(container_list) > 0 assert len(container_list2) > 0 container2_read = container2.read(session_token=str(uuid.uuid4())) assert container2_read is not None - replace_container = self.databaseForTest.replace_container(container2, PartitionKey(path="/pk"), default_ttl=30, session_token=str(uuid.uuid4())) + replace_container = self.databaseForTest.replace_container( + container2, PartitionKey(path="/pk"), default_ttl=30, session_token=str(uuid.uuid4()) + ) replace_container_read = replace_container.read() assert replace_container is not None assert replace_container_read != container2_read - assert 'defaultTtl' in replace_container_read # Check for default_ttl as a new additional property + assert "defaultTtl" in replace_container_read # Check for default_ttl as a new additional property self.databaseForTest.delete_container(replace_container.id, session_token=str(uuid.uuid4())) try: container2.read() @@ -105,9 +119,13 @@ def test_session_token_compatibility(self): def test_etag_match_condition_compatibility(self): # Verifying that behavior is unaffected across the board for using `etag`/`match_condition` on irrelevant methods # Database - database = self.client.create_database(str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + database = self.client.create_database( + str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) assert database is not None - database2 = self.client.create_database_if_not_exists(str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified) + database2 = self.client.create_database_if_not_exists( + str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified + ) assert database2 is not None self.client.delete_database(database2.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) try: @@ -117,21 +135,36 @@ def test_etag_match_condition_compatibility(self): assert e.status_code == 404 # Container - container = self.databaseForTest.create_container(str(uuid.uuid4()), PartitionKey(path="/pk"), - etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + container = self.databaseForTest.create_container( + str(uuid.uuid4()), + PartitionKey(path="/pk"), + etag=str(uuid.uuid4()), + match_condition=MatchConditions.IfModified, + ) assert container is not None - container2 = self.databaseForTest.create_container_if_not_exists(str(uuid.uuid4()), PartitionKey(path="/pk"), - etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified) + container2 = self.databaseForTest.create_container_if_not_exists( + str(uuid.uuid4()), + PartitionKey(path="/pk"), + etag=str(uuid.uuid4()), + match_condition=MatchConditions.IfNotModified, + ) assert container2 is not None container2_read = container2.read() assert container2_read is not None - replace_container = self.databaseForTest.replace_container(container2, PartitionKey(path="/pk"), default_ttl=30, - etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + replace_container = self.databaseForTest.replace_container( + container2, + PartitionKey(path="/pk"), + default_ttl=30, + etag=str(uuid.uuid4()), + match_condition=MatchConditions.IfModified, + ) replace_container_read = replace_container.read() assert replace_container is not None assert replace_container_read != container2_read - assert 'defaultTtl' in replace_container_read # Check for default_ttl as a new additional property - self.databaseForTest.delete_container(replace_container.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + assert "defaultTtl" in replace_container_read # Check for default_ttl as a new additional property + self.databaseForTest.delete_container( + replace_container.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) try: container2.read() pytest.fail("Container read should have failed") @@ -139,10 +172,13 @@ def test_etag_match_condition_compatibility(self): assert e.status_code == 404 # Item - item = container.create_item({"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + item = container.create_item( + {"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) assert item is not None - item2 = container.upsert_item({"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), - match_condition=MatchConditions.IfNotModified) + item2 = container.upsert_item( + {"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified + ) assert item2 is not None item = container.create_item({"id": str(uuid.uuid4()), "pk": 0}, etag=None, match_condition=None) assert item is not None @@ -150,16 +186,19 @@ def test_etag_match_condition_compatibility(self): assert item2 is not None batch_operations = [ ("create", ({"id": str(uuid.uuid4()), "pk": 0},)), - ("replace", (item2['id'], {"id": str(uuid.uuid4()), "pk": 0})), - ("read", (item['id'],)), + ("replace", (item2["id"], {"id": str(uuid.uuid4()), "pk": 0})), + ("read", (item["id"],)), ("upsert", ({"id": str(uuid.uuid4()), "pk": 0},)), ] - batch_results = container.execute_item_batch(batch_operations, partition_key=0, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + batch_results = container.execute_item_batch( + batch_operations, partition_key=0, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) assert len(batch_results) == 4 for result in batch_results: - assert result['statusCode'] in (200, 201) + assert result["statusCode"] in (200, 201) self.client.delete_database(database.id) + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility_async.py b/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility_async.py index 5167d0f05ea8..caba89f79a42 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_backwards_compatibility_async.py @@ -12,6 +12,7 @@ from azure.cosmos.aio import CosmosClient, DatabaseProxy from azure.cosmos.exceptions import CosmosHttpResponseError + @pytest.mark.cosmosEmulator class TestBackwardsCompatibilityAsync(unittest.IsolatedAsyncioTestCase): host = test_config.TestConfig.host @@ -25,12 +26,12 @@ class TestBackwardsCompatibilityAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -47,7 +48,9 @@ async def test_session_token_compatibility_async(self): database2 = await self.client.create_database_if_not_exists(str(uuid.uuid4()), session_token=str(uuid.uuid4())) assert database2 is not None database_list = [db async for db in self.client.list_databases(session_token=str(uuid.uuid4()))] - database_list2 = [db async for db in self.client.query_databases(query="select * from c", session_token=str(uuid.uuid4()))] + database_list2 = [ + db async for db in self.client.query_databases(query="select * from c", session_token=str(uuid.uuid4())) + ] assert len(database_list) > 0 assert len(database_list2) > 0 database_read = await database.read(session_token=str(uuid.uuid4())) @@ -60,22 +63,33 @@ async def test_session_token_compatibility_async(self): assert e.status_code == 404 # Container - container = await self.created_database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4())) + container = await self.created_database.create_container( + str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4()) + ) assert container is not None - container2 = await self.created_database.create_container_if_not_exists(str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4())) + container2 = await self.created_database.create_container_if_not_exists( + str(uuid.uuid4()), PartitionKey(path="/pk"), session_token=str(uuid.uuid4()) + ) assert container2 is not None container_list = [cont async for cont in self.created_database.list_containers(session_token=str(uuid.uuid4()))] - container_list2 = [cont async for cont in self.created_database.query_containers(query="select * from c", session_token=str(uuid.uuid4()))] + container_list2 = [ + cont + async for cont in self.created_database.query_containers( + query="select * from c", session_token=str(uuid.uuid4()) + ) + ] assert len(container_list) > 0 assert len(container_list2) > 0 container2_read = await container2.read(session_token=str(uuid.uuid4())) assert container2_read is not None - replace_container = await self.created_database.replace_container(container2, PartitionKey(path="/pk"), default_ttl=30, session_token=str(uuid.uuid4())) + replace_container = await self.created_database.replace_container( + container2, PartitionKey(path="/pk"), default_ttl=30, session_token=str(uuid.uuid4()) + ) replace_container_read = await replace_container.read() assert replace_container is not None assert replace_container_read != container2_read - assert 'defaultTtl' in replace_container_read # Check for default_ttl as a new additional property - assert replace_container_read['defaultTtl'] == 30 + assert "defaultTtl" in replace_container_read # Check for default_ttl as a new additional property + assert replace_container_read["defaultTtl"] == 30 await self.created_database.delete_container(replace_container.id, session_token=str(uuid.uuid4())) try: await container2.read() @@ -88,11 +102,17 @@ async def test_session_token_compatibility_async(self): async def test_etag_match_condition_compatibility_async(self): # Verifying that behavior is unaffected across the board for using `etag`/`match_condition` on irrelevant methods # Database - database = await self.client.create_database(str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + database = await self.client.create_database( + str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) assert database is not None - database2 = await self.client.create_database_if_not_exists(str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified) + database2 = await self.client.create_database_if_not_exists( + str(uuid.uuid4()), etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified + ) assert database2 is not None - await self.client.delete_database(database2.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + await self.client.delete_database( + database2.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) try: await database2.read() pytest.fail("Database read should have failed") @@ -100,21 +120,36 @@ async def test_etag_match_condition_compatibility_async(self): assert e.status_code == 404 # Container - container = await self.created_database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk"), - etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + container = await self.created_database.create_container( + str(uuid.uuid4()), + PartitionKey(path="/pk"), + etag=str(uuid.uuid4()), + match_condition=MatchConditions.IfModified, + ) assert container is not None - container2 = await self.created_database.create_container_if_not_exists(str(uuid.uuid4()), PartitionKey(path="/pk"), - etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified) + container2 = await self.created_database.create_container_if_not_exists( + str(uuid.uuid4()), + PartitionKey(path="/pk"), + etag=str(uuid.uuid4()), + match_condition=MatchConditions.IfNotModified, + ) assert container2 is not None container2_read = await container2.read() assert container2_read is not None - replace_container = await self.created_database.replace_container(container2, PartitionKey(path="/pk"), default_ttl=30, - etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + replace_container = await self.created_database.replace_container( + container2, + PartitionKey(path="/pk"), + default_ttl=30, + etag=str(uuid.uuid4()), + match_condition=MatchConditions.IfModified, + ) replace_container_read = await replace_container.read() assert replace_container is not None assert replace_container_read != container2_read - assert 'defaultTtl' in replace_container_read # Check for default_ttl as a new additional property - await self.created_database.delete_container(replace_container.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + assert "defaultTtl" in replace_container_read # Check for default_ttl as a new additional property + await self.created_database.delete_container( + replace_container.id, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) try: await container2.read() pytest.fail("Container read should have failed") @@ -122,29 +157,33 @@ async def test_etag_match_condition_compatibility_async(self): assert e.status_code == 404 # Item - item = await container.create_item({"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + item = await container.create_item( + {"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) assert item is not None - item2 = await container.upsert_item({"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), - match_condition=MatchConditions.IfNotModified) + item2 = await container.upsert_item( + {"id": str(uuid.uuid4()), "pk": 0}, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfNotModified + ) assert item2 is not None item = await container.create_item({"id": str(uuid.uuid4()), "pk": 0}, etag=None, match_condition=None) assert item is not None - item2 = await container.upsert_item({"id": str(uuid.uuid4()), "pk": 0}, etag=None, - match_condition=None) + item2 = await container.upsert_item({"id": str(uuid.uuid4()), "pk": 0}, etag=None, match_condition=None) assert item2 is not None batch_operations = [ ("create", ({"id": str(uuid.uuid4()), "pk": 0},)), - ("replace", (item2['id'], {"id": str(uuid.uuid4()), "pk": 0})), - ("read", (item['id'],)), + ("replace", (item2["id"], {"id": str(uuid.uuid4()), "pk": 0})), + ("read", (item["id"],)), ("upsert", ({"id": str(uuid.uuid4()), "pk": 0},)), ] - batch_results = await container.execute_item_batch(batch_operations, partition_key=0, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified) + batch_results = await container.execute_item_batch( + batch_operations, partition_key=0, etag=str(uuid.uuid4()), match_condition=MatchConditions.IfModified + ) assert len(batch_results) == 4 for result in batch_results: - assert result['statusCode'] in (200, 201) + assert result["statusCode"] in (200, 201) await self.client.delete_database(database.id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_change_feed.py b/sdk/cosmos/azure-cosmos/tests/test_change_feed.py index 0d8d5b6ed312..9d4cc6e6ea80 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_change_feed.py +++ b/sdk/cosmos/azure-cosmos/tests/test_change_feed.py @@ -14,29 +14,35 @@ import test_config from azure.cosmos.partition_key import PartitionKey + @pytest.fixture(scope="class") def setup(): config = test_config.TestConfig() use_multiple_write_locations = False if os.environ.get("AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER", "False") == "True": use_multiple_write_locations = True - if (config.masterKey == '[YOUR_KEY_HERE]' or - config.host == '[YOUR_ENDPOINT_HERE]'): + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - test_client = cosmos_client.CosmosClient(config.host, config.masterKey, - multiple_write_locations=use_multiple_write_locations), + "tests." + ) + test_client = ( + cosmos_client.CosmosClient( + config.host, config.masterKey, multiple_write_locations=use_multiple_write_locations + ), + ) return { "created_db": test_client[0].get_database_client(config.TEST_DATABASE_ID), - "is_emulator": config.is_emulator + "is_emulator": config.is_emulator, } + def round_time(): utc_now = datetime.now(timezone.utc) return utc_now - timedelta(microseconds=utc_now.microsecond) + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosQuery @pytest.mark.unittest @@ -45,15 +51,17 @@ class TestChangeFeed: """Test to ensure escaping of non-ascii characters from partition key""" def test_get_feed_ranges(self, setup): - created_collection = setup["created_db"].create_container("get_feed_ranges_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_collection = setup["created_db"].create_container( + "get_feed_ranges_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) result = list(created_collection.read_feed_ranges()) assert len(result) == 1 @pytest.mark.parametrize("change_feed_filter_param", ["partitionKey", "partitionKeyRangeId", "feedRange"]) def test_query_change_feed_with_different_filter(self, change_feed_filter_param, setup): - created_collection = setup["created_db"].create_container(f"change_feed_test_{change_feed_filter_param}_{str(uuid.uuid4())}", - PartitionKey(path="/pk")) + created_collection = setup["created_db"].create_container( + f"change_feed_test_{change_feed_filter_param}_{str(uuid.uuid4())}", PartitionKey(path="/pk") + ) # Read change feed without passing any options query_iterable = created_collection.query_items_change_feed() iter_list = list(query_iterable) @@ -74,64 +82,54 @@ def test_query_change_feed_with_different_filter(self, change_feed_filter_param, query_iterable = created_collection.query_items_change_feed(**filter_param) iter_list = list(query_iterable) assert len(iter_list) == 0 - assert 'etag' in created_collection.client_connection.last_response_headers - assert created_collection.client_connection.last_response_headers['etag'] !='' + assert "etag" in created_collection.client_connection.last_response_headers + assert created_collection.client_connection.last_response_headers["etag"] != "" # Read change feed from beginning should return an empty list - query_iterable = created_collection.query_items_change_feed( - is_start_from_beginning=True, - **filter_param - ) + query_iterable = created_collection.query_items_change_feed(is_start_from_beginning=True, **filter_param) iter_list = list(query_iterable) assert len(iter_list) == 0 - assert 'etag' in created_collection.client_connection.last_response_headers - continuation1 = created_collection.client_connection.last_response_headers['etag'] - assert continuation1 != '' + assert "etag" in created_collection.client_connection.last_response_headers + continuation1 = created_collection.client_connection.last_response_headers["etag"] + assert continuation1 != "" # Create a document. Read change feed should return be able to read that document - document_definition = {'pk': 'pk', 'id': 'doc1'} + document_definition = {"pk": "pk", "id": "doc1"} created_collection.create_item(body=document_definition) - query_iterable = created_collection.query_items_change_feed( - is_start_from_beginning=True, - **filter_param - ) + query_iterable = created_collection.query_items_change_feed(is_start_from_beginning=True, **filter_param) iter_list = list(query_iterable) assert len(iter_list) == 1 - assert iter_list[0]['id'] == 'doc1' - assert 'etag' in created_collection.client_connection.last_response_headers - continuation2 = created_collection.client_connection.last_response_headers['etag'] - assert continuation2 != '' + assert iter_list[0]["id"] == "doc1" + assert "etag" in created_collection.client_connection.last_response_headers + continuation2 = created_collection.client_connection.last_response_headers["etag"] + assert continuation2 != "" assert continuation2 != continuation1 # Create two new documents. Verify that change feed contains the 2 new documents # with page size 1 and page size 100 - document_definition = {'pk': 'pk', 'id': 'doc2'} + document_definition = {"pk": "pk", "id": "doc2"} created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk3', 'id': 'doc3'} + document_definition = {"pk": "pk3", "id": "doc3"} created_collection.create_item(body=document_definition) for pageSize in [1, 100]: # verify iterator query_iterable = created_collection.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - **filter_param + continuation=continuation2, max_item_count=pageSize, **filter_param ) it = query_iterable.__iter__() - expected_ids = 'doc2.doc3.' + expected_ids = "doc2.doc3." if "partition_key" in filter_param: - expected_ids = 'doc2.' - actual_ids = '' + expected_ids = "doc2." + actual_ids = "" for item in it: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids # verify by_page # the options is not copied, therefore it need to be restored query_iterable = created_collection.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - **filter_param + continuation=continuation2, max_item_count=pageSize, **filter_param ) count = 0 expected_count = 2 @@ -144,52 +142,48 @@ def test_query_change_feed_with_different_filter(self, change_feed_filter_param, count += len(fetched_res) all_fetched_res.extend(fetched_res) - actual_ids = '' + actual_ids = "" for item in all_fetched_res: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids # verify reading change feed from the beginning - query_iterable = created_collection.query_items_change_feed( - is_start_from_beginning=True, - **filter_param - ) - expected_ids = 'doc1.doc2.doc3.' + query_iterable = created_collection.query_items_change_feed(is_start_from_beginning=True, **filter_param) + expected_ids = "doc1.doc2.doc3." if "partition_key" in filter_param: - expected_ids = 'doc1.doc2.' + expected_ids = "doc1.doc2." it = query_iterable.__iter__() - actual_ids = '' + actual_ids = "" for item in it: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids - assert 'etag' in created_collection.client_connection.last_response_headers - continuation3 = created_collection.client_connection.last_response_headers['etag'] + assert "etag" in created_collection.client_connection.last_response_headers + continuation3 = created_collection.client_connection.last_response_headers["etag"] # verify reading empty change feed query_iterable = created_collection.query_items_change_feed( - continuation=continuation3, - is_start_from_beginning=True, - **filter_param + continuation=continuation3, is_start_from_beginning=True, **filter_param ) iter_list = list(query_iterable) assert len(iter_list) == 0 setup["created_db"].delete_container(created_collection.id) def test_query_change_feed_with_start_time(self, setup): - created_collection = setup["created_db"].create_container_if_not_exists("query_change_feed_start_time_test", - PartitionKey(path="/pk")) + created_collection = setup["created_db"].create_container_if_not_exists( + "query_change_feed_start_time_test", PartitionKey(path="/pk") + ) batchSize = 50 def create_random_items(container, batch_size): for _ in range(batch_size): # Generate a Random partition key - partition_key = 'pk' + str(uuid.uuid4()) + partition_key = "pk" + str(uuid.uuid4()) # Generate a random item item = { - 'id': 'item' + str(uuid.uuid4()), - 'partitionKey': partition_key, - 'content': 'This is some random content', + "id": "item" + str(uuid.uuid4()), + "partitionKey": partition_key, + "content": "This is some random content", } try: @@ -233,17 +227,18 @@ def create_random_items(container, batch_size): setup["created_db"].delete_container(created_collection.id) def test_query_change_feed_with_multi_partition(self, setup): - created_collection = setup["created_db"].create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=11000) + created_collection = setup["created_db"].create_container( + "change_feed_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), offer_throughput=11000 + ) # create one doc and make sure change feed query can return the document new_documents = [ - {'pk': 'pk', 'id': 'doc1'}, - {'pk': 'pk2', 'id': 'doc2'}, - {'pk': 'pk3', 'id': 'doc3'}, - {'pk': 'pk4', 'id': 'doc4'}] - expected_ids = ['doc1', 'doc2', 'doc3', 'doc4'] + {"pk": "pk", "id": "doc1"}, + {"pk": "pk2", "id": "doc2"}, + {"pk": "pk3", "id": "doc3"}, + {"pk": "pk4", "id": "doc4"}, + ] + expected_ids = ["doc1", "doc2", "doc3", "doc4"] for document in new_documents: created_collection.create_item(body=document) @@ -252,9 +247,10 @@ def test_query_change_feed_with_multi_partition(self, setup): it = query_iterable.__iter__() actual_ids = [] for item in it: - actual_ids.append(item['id']) + actual_ids.append(item["id"]) assert actual_ids == expected_ids + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions.py b/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions.py index 66b0c845e945..94bddcdfd036 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions.py +++ b/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions.py @@ -12,47 +12,57 @@ from azure.cosmos.partition_key import PartitionKey from azure.cosmos._change_feed.change_feed_state import ChangeFeedStateV2 -ID = 'id' -CURRENT = 'current' -PREVIOUS = 'previous' -METADATA = 'metadata' -OPERATION_TYPE = 'operationType' -CREATE = 'create' -DELETE = 'delete' -E_TAG = 'etag' +ID = "id" +CURRENT = "current" +PREVIOUS = "previous" +METADATA = "metadata" +OPERATION_TYPE = "operationType" +CREATE = "create" +DELETE = "delete" +E_TAG = "etag" + @pytest.fixture(scope="class") def setup(): config = test_config.TestConfig() - if (config.masterKey == '[YOUR_KEY_HERE]' or - config.host == '[YOUR_ENDPOINT_HERE]'): + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - test_client = cosmos_client.CosmosClient(config.host, config.masterKey), + "tests." + ) + test_client = (cosmos_client.CosmosClient(config.host, config.masterKey),) return { "created_db": test_client[0].get_database_client(config.TEST_DATABASE_ID), - "is_emulator": config.is_emulator + "is_emulator": config.is_emulator, } + def round_time(): utc_now = datetime.now(timezone.utc) return utc_now - timedelta(microseconds=utc_now.microsecond) + def assert_change_feed(expected, actual): if len(actual) == 0: assert len(expected) == len(actual) return - #TODO: remove this if we can add flag to get 'previous' always + # TODO: remove this if we can add flag to get 'previous' always for item in actual: if METADATA in item and item[METADATA][OPERATION_TYPE] == DELETE: if ID in item[METADATA]: item[PREVIOUS] = {ID: item[METADATA][ID]} # Sort actual by operation_type and id - actual = sorted(actual, key=lambda k: (k[METADATA][OPERATION_TYPE], k[CURRENT][ID]) if k[METADATA][OPERATION_TYPE] == CREATE else (k[METADATA][OPERATION_TYPE], k[PREVIOUS][ID])) + actual = sorted( + actual, + key=lambda k: ( + (k[METADATA][OPERATION_TYPE], k[CURRENT][ID]) + if k[METADATA][OPERATION_TYPE] == CREATE + else (k[METADATA][OPERATION_TYPE], k[PREVIOUS][ID]) + ), + ) for expected_change_feed, actual_change_feed in zip(expected, actual): for expected_type, expected_data in expected_change_feed.items(): @@ -62,6 +72,7 @@ def assert_change_feed(expected, actual): assert key in actual_data assert expected_data[key] == actual_data[key] + @pytest.mark.cosmosEmulator @pytest.mark.unittest @pytest.mark.usefixtures("setup") @@ -69,13 +80,15 @@ class TestChangeAllVersionsFeed: """Test to verify All Versions And Delete change feed behavior""" def test_query_change_feed_all_versions_and_deletes(self, setup): - partition_key = 'pk' + partition_key = "pk" # 'retentionDuration' was required to enable `ALL_VERSIONS_AND_DELETES` for Emulator testing change_feed_policy = {"retentionDuration": 10} if setup["is_emulator"] else None - created_collection = setup["created_db"].create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path=f"/{partition_key}"), - change_feed_policy=change_feed_policy) - mode = 'AllVersionsAndDeletes' + created_collection = setup["created_db"].create_container( + "change_feed_test_" + str(uuid.uuid4()), + PartitionKey(path=f"/{partition_key}"), + change_feed_policy=change_feed_policy, + ) + mode = "AllVersionsAndDeletes" ## Test Change Feed with empty collection(Save the continuation token) query_iterable = created_collection.query_items_change_feed( @@ -87,7 +100,7 @@ def test_query_change_feed_all_versions_and_deletes(self, setup): assert_change_feed(expected_change_feeds, actual_change_feeds) ## Test change_feed for created items from cont_token1 (Save the new continuation token) - new_documents = [{partition_key: f'pk{i}', ID: f'doc{i}'} for i in range(4)] + new_documents = [{partition_key: f"pk{i}", ID: f"doc{i}"} for i in range(4)] created_items = [] for document in new_documents: created_item = created_collection.create_item(body=document) @@ -97,64 +110,62 @@ def test_query_change_feed_all_versions_and_deletes(self, setup): mode=mode, ) - expected_change_feeds = [{CURRENT: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] + expected_change_feeds = [{CURRENT: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] actual_change_feeds = list(query_iterable) - cont_token2 = created_collection.client_connection.last_response_headers['etag'] + cont_token2 = created_collection.client_connection.last_response_headers["etag"] assert_change_feed(expected_change_feeds, actual_change_feeds) ## Test change_feed for deleted items for item in created_items: - created_collection.delete_item(item=item, partition_key=item['pk']) + created_collection.delete_item(item=item, partition_key=item["pk"]) query_iterable = created_collection.query_items_change_feed( continuation=cont_token2, mode=mode, ) - expected_change_feeds = [{CURRENT: {}, PREVIOUS: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: DELETE}} for i in range(4)] + expected_change_feeds = [ + {CURRENT: {}, PREVIOUS: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: DELETE}} for i in range(4) + ] actual_change_feeds = list(query_iterable) assert_change_feed(expected_change_feeds, actual_change_feeds) ## Test change_feed for created/deleted items - query_iterable = created_collection.query_items_change_feed( - continuation=cont_token1, - mode = mode - ) + query_iterable = created_collection.query_items_change_feed(continuation=cont_token1, mode=mode) - expected_change_feeds = [{CURRENT: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)]\ - + [{CURRENT: {}, PREVIOUS: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: DELETE}} for i in range(4)] + expected_change_feeds = [{CURRENT: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] + [ + {CURRENT: {}, PREVIOUS: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: DELETE}} for i in range(4) + ] actual_change_feeds = list(query_iterable) assert_change_feed(expected_change_feeds, actual_change_feeds) - query_iterable = created_collection.query_items_change_feed( - mode = mode, - partition_key = 'pk1' - ) + query_iterable = created_collection.query_items_change_feed(mode=mode, partition_key="pk1") list(query_iterable) pk_cont_token = created_collection.client_connection.last_response_headers[E_TAG] - new_documents = [{partition_key: f'pk{i}', ID: f'doc{i}'} for i in range(4)] + new_documents = [{partition_key: f"pk{i}", ID: f"doc{i}"} for i in range(4)] created_items = [] for document in new_documents: created_item = created_collection.create_item(body=document) created_items.append(created_item) - query_iterable = created_collection.query_items_change_feed( - continuation=pk_cont_token, - mode=mode - ) - expected_change_feeds = [{CURRENT: {ID: f'doc1'}, METADATA: {OPERATION_TYPE: CREATE}}] + query_iterable = created_collection.query_items_change_feed(continuation=pk_cont_token, mode=mode) + expected_change_feeds = [{CURRENT: {ID: f"doc1"}, METADATA: {OPERATION_TYPE: CREATE}}] actual_change_feeds = list(query_iterable) assert_change_feed(expected_change_feeds, actual_change_feeds) def test_query_change_feed_all_versions_and_deletes_errors(self, setup): - created_collection = setup["created_db"].create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - mode = 'AllVersionsAndDeletes' + created_collection = setup["created_db"].create_container( + "change_feed_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + mode = "AllVersionsAndDeletes" # Error if invalid mode was used with pytest.raises(ValueError) as e: created_collection.query_items_change_feed( mode="test_invalid_mode", ) - assert str(e.value) == "Invalid mode was used: 'test_invalid_mode'. Supported modes are ['LatestVersion', 'AllVersionsAndDeletes']." + assert ( + str(e.value) + == "Invalid mode was used: 'test_invalid_mode'. Supported modes are ['LatestVersion', 'AllVersionsAndDeletes']." + ) # Error if partition_key_range_id was used with FULL_FIDELITY_FEED with pytest.raises(ValueError) as e: @@ -162,7 +173,10 @@ def test_query_change_feed_all_versions_and_deletes_errors(self, setup): partition_key_range_id="TestPartitionKeyRangeId", mode=mode, ) - assert str(e.value) == "'AllVersionsAndDeletes' mode is not supported if 'partition_key_range_id' was used. Please use 'feed_range' instead." + assert ( + str(e.value) + == "'AllVersionsAndDeletes' mode is not supported if 'partition_key_range_id' was used. Please use 'feed_range' instead." + ) # Error if is_start_from_beginning was in invalid type with pytest.raises(TypeError) as e: @@ -177,7 +191,10 @@ def test_query_change_feed_all_versions_and_deletes_errors(self, setup): is_start_from_beginning=True, mode=mode, ) - assert str(e.value) == "'AllVersionsAndDeletes' mode is only supported if 'is_start_from_beginning' is 'False'. Please use 'is_start_from_beginning=False' or 'continuation' instead." + assert ( + str(e.value) + == "'AllVersionsAndDeletes' mode is only supported if 'is_start_from_beginning' is 'False'. Please use 'is_start_from_beginning=False' or 'continuation' instead." + ) # Error if 'is_start_from_beginning' was used with 'start_time' with pytest.raises(ValueError) as e: @@ -206,7 +223,10 @@ def test_query_change_feed_all_versions_and_deletes_errors(self, setup): start_time=round_time(), mode=mode, ) - assert str(e.value) == "'AllVersionsAndDeletes' mode is only supported if 'start_time' is 'Now'. Please use 'start_time=\"Now\"' or 'continuation' instead." + assert ( + str(e.value) + == "'AllVersionsAndDeletes' mode is only supported if 'start_time' is 'Now'. Please use 'start_time=\"Now\"' or 'continuation' instead." + ) # Error if too many positional arguments with pytest.raises(TypeError) as e: @@ -234,8 +254,32 @@ def test_query_change_feed_all_versions_and_deletes_errors(self, setup): with pytest.raises(ValueError) as e: continuation_json = { "containerRid": "", - "startFrom": {'Type': 'Now'}, - "continuation": {'Range': {'isMaxInclusive': False, 'isMinInclusive': True, 'max': 'FF', 'min': ''}, 'continuation': [{'range': {'isMaxInclusive': False, 'isMinInclusive': True, 'max': '1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 'min': ''}, 'token': '"1"'}, {'range': {'isMaxInclusive': False, 'isMinInclusive': True, 'max': 'FF', 'min': '1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'}, 'token': '"1"'}], 'rid': 'ksMfAMrReEg=', 'v': 'v2'}, + "startFrom": {"Type": "Now"}, + "continuation": { + "Range": {"isMaxInclusive": False, "isMinInclusive": True, "max": "FF", "min": ""}, + "continuation": [ + { + "range": { + "isMaxInclusive": False, + "isMinInclusive": True, + "max": "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", + "min": "", + }, + "token": '"1"', + }, + { + "range": { + "isMaxInclusive": False, + "isMinInclusive": True, + "max": "FF", + "min": "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", + }, + "token": '"1"', + }, + ], + "rid": "ksMfAMrReEg=", + "v": "v2", + }, } ChangeFeedStateV2.from_continuation( container_link="", @@ -244,5 +288,6 @@ def test_query_change_feed_all_versions_and_deletes_errors(self, setup): ) assert str(e.value) == "Invalid continuation: [Missing mode]" + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions_async.py b/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions_async.py index d743c3347aad..4db00ab564f2 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_change_feed_all_versions_async.py @@ -12,50 +12,58 @@ from azure.cosmos.aio import CosmosClient from azure.cosmos.partition_key import PartitionKey -ID = 'id' -CURRENT = 'current' -PREVIOUS = 'previous' -METADATA = 'metadata' -OPERATION_TYPE = 'operationType' -CREATE = 'create' -DELETE = 'delete' -E_TAG = 'etag' +ID = "id" +CURRENT = "current" +PREVIOUS = "previous" +METADATA = "metadata" +OPERATION_TYPE = "operationType" +CREATE = "create" +DELETE = "delete" +E_TAG = "etag" + @pytest_asyncio.fixture() async def setup(): config = test_config.TestConfig() - if config.masterKey == '[YOUR_KEY_HERE]' or config.host == '[YOUR_ENDPOINT_HERE]': + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) test_client = CosmosClient(config.host, config.masterKey) created_db = await test_client.create_database_if_not_exists(config.TEST_DATABASE_ID) - created_db_data = { - "created_db": created_db, - "is_emulator": config.is_emulator - } + created_db_data = {"created_db": created_db, "is_emulator": config.is_emulator} yield created_db_data await test_client.close() + def round_time(): utc_now = datetime.now(timezone.utc) return utc_now - timedelta(microseconds=utc_now.microsecond) + async def assert_change_feed(expected, actual): if len(actual) == 0: assert len(expected) == len(actual) return - #TODO: remove this if we can add flag to get 'previous' always + # TODO: remove this if we can add flag to get 'previous' always for item in actual: if METADATA in item and item[METADATA][OPERATION_TYPE] == DELETE: if ID in item[METADATA]: item[PREVIOUS] = {ID: item[METADATA][ID]} # Sort actual by operation_type and id - actual = sorted(actual, key=lambda k: (k[METADATA][OPERATION_TYPE], k[CURRENT][ID]) if k[METADATA][OPERATION_TYPE] == CREATE else (k[METADATA][OPERATION_TYPE], k[PREVIOUS][ID])) + actual = sorted( + actual, + key=lambda k: ( + (k[METADATA][OPERATION_TYPE], k[CURRENT][ID]) + if k[METADATA][OPERATION_TYPE] == CREATE + else (k[METADATA][OPERATION_TYPE], k[PREVIOUS][ID]) + ), + ) for expected_change_feed, actual_change_feed in zip(expected, actual): for expected_type, expected_data in expected_change_feed.items(): @@ -65,6 +73,7 @@ async def assert_change_feed(expected, actual): assert key in actual_data assert expected_data[key] == actual_data[key] + @pytest.mark.cosmosEmulator @pytest.mark.asyncio @pytest.mark.usefixtures("setup") @@ -72,14 +81,16 @@ class TestAllVersionsChangeFeedAsync: """Test to verify All Versions And Delete change feed behavior""" async def test_query_change_feed_all_versions_and_deletes_async(self, setup): - partition_key = 'pk' + partition_key = "pk" # 'retentionDuration' was required to enable `ALL_VERSIONS_AND_DELETES` for Emulator testing change_feed_policy = {"retentionDuration": 10} if setup["is_emulator"] else None - created_collection = await setup["created_db"].create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path=f"/{partition_key}"), - change_feed_policy=change_feed_policy) + created_collection = await setup["created_db"].create_container( + "change_feed_test_" + str(uuid.uuid4()), + PartitionKey(path=f"/{partition_key}"), + change_feed_policy=change_feed_policy, + ) - mode = 'AllVersionsAndDeletes' + mode = "AllVersionsAndDeletes" ## Test Change Feed with empty collection(Save the continuation token) query_iterable = created_collection.query_items_change_feed( @@ -91,7 +102,7 @@ async def test_query_change_feed_all_versions_and_deletes_async(self, setup): await assert_change_feed(expected_change_feeds, actual_change_feeds) ## Test change_feed for created items from cont_token1 (Save the new continuation token) - new_documents = [{partition_key: f'pk{i}', ID: f'doc{i}'} for i in range(4)] + new_documents = [{partition_key: f"pk{i}", ID: f"doc{i}"} for i in range(4)] created_items = [] for document in new_documents: created_item = await created_collection.create_item(body=document) @@ -101,66 +112,62 @@ async def test_query_change_feed_all_versions_and_deletes_async(self, setup): mode=mode, ) - expected_change_feeds = [{CURRENT: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] + expected_change_feeds = [{CURRENT: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] actual_change_feeds = [item async for item in query_iterable] - cont_token2 = created_collection.client_connection.last_response_headers['etag'] + cont_token2 = created_collection.client_connection.last_response_headers["etag"] await assert_change_feed(expected_change_feeds, actual_change_feeds) ## Test change_feed for deleted items for item in created_items: - await created_collection.delete_item(item=item, partition_key=item['pk']) + await created_collection.delete_item(item=item, partition_key=item["pk"]) query_iterable = created_collection.query_items_change_feed( continuation=cont_token2, mode=mode, ) - expected_change_feeds = [{CURRENT: {}, PREVIOUS: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: DELETE}} for i in - range(4)] + expected_change_feeds = [ + {CURRENT: {}, PREVIOUS: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: DELETE}} for i in range(4) + ] actual_change_feeds = [item async for item in query_iterable] await assert_change_feed(expected_change_feeds, actual_change_feeds) ## Test change_feed for created/deleted items - query_iterable = created_collection.query_items_change_feed( - continuation=cont_token1, - mode=mode - ) + query_iterable = created_collection.query_items_change_feed(continuation=cont_token1, mode=mode) - expected_change_feeds = [{CURRENT: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] \ - + [{CURRENT: {}, PREVIOUS: {ID: f'doc{i}'}, METADATA: {OPERATION_TYPE: DELETE}} for i in - range(4)] + expected_change_feeds = [{CURRENT: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: CREATE}} for i in range(4)] + [ + {CURRENT: {}, PREVIOUS: {ID: f"doc{i}"}, METADATA: {OPERATION_TYPE: DELETE}} for i in range(4) + ] actual_change_feeds = [item async for item in query_iterable] await assert_change_feed(expected_change_feeds, actual_change_feeds) - query_iterable = created_collection.query_items_change_feed( - mode = mode, - partition_key = 'pk1' - ) + query_iterable = created_collection.query_items_change_feed(mode=mode, partition_key="pk1") empty_list = [item async for item in query_iterable] pk_cont_token = created_collection.client_connection.last_response_headers[E_TAG] - new_documents = [{partition_key: f'pk{i}', ID: f'doc{i}'} for i in range(4)] + new_documents = [{partition_key: f"pk{i}", ID: f"doc{i}"} for i in range(4)] created_items = [] for document in new_documents: created_item = await created_collection.create_item(body=document) created_items.append(created_item) - query_iterable = created_collection.query_items_change_feed( - continuation=pk_cont_token, - mode=mode - ) - expected_change_feeds = [{CURRENT: {ID: f'doc1'}, METADATA: {OPERATION_TYPE: CREATE}}] + query_iterable = created_collection.query_items_change_feed(continuation=pk_cont_token, mode=mode) + expected_change_feeds = [{CURRENT: {ID: f"doc1"}, METADATA: {OPERATION_TYPE: CREATE}}] actual_change_feeds = [item async for item in query_iterable] await assert_change_feed(expected_change_feeds, actual_change_feeds) async def test_query_change_feed_all_versions_and_deletes_errors_async(self, setup): - created_collection = await setup["created_db"].create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - mode = 'AllVersionsAndDeletes' + created_collection = await setup["created_db"].create_container( + "change_feed_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + mode = "AllVersionsAndDeletes" # Error if invalid mode was used with pytest.raises(ValueError) as e: created_collection.query_items_change_feed( mode="test_invalid_mode", ) - assert str(e.value) == "Invalid mode was used: 'test_invalid_mode'. Supported modes are ['LatestVersion', 'AllVersionsAndDeletes']." + assert ( + str(e.value) + == "Invalid mode was used: 'test_invalid_mode'. Supported modes are ['LatestVersion', 'AllVersionsAndDeletes']." + ) # Error if partition_key_range_id was used with FULL_FIDELITY_FEED with pytest.raises(ValueError) as e: @@ -168,7 +175,10 @@ async def test_query_change_feed_all_versions_and_deletes_errors_async(self, set partition_key_range_id="TestPartitionKeyRangeId", mode=mode, ) - assert str(e.value) == "'AllVersionsAndDeletes' mode is not supported if 'partition_key_range_id' was used. Please use 'feed_range' instead." + assert ( + str(e.value) + == "'AllVersionsAndDeletes' mode is not supported if 'partition_key_range_id' was used. Please use 'feed_range' instead." + ) # Error if is_start_from_beginning was in invalid type with pytest.raises(TypeError) as e: @@ -183,7 +193,10 @@ async def test_query_change_feed_all_versions_and_deletes_errors_async(self, set is_start_from_beginning="Now", mode=mode, ) - assert str(e.value) == "'AllVersionsAndDeletes' mode is only supported if 'is_start_from_beginning' is 'False'. Please use 'is_start_from_beginning=False' or 'continuation' instead." + assert ( + str(e.value) + == "'AllVersionsAndDeletes' mode is only supported if 'is_start_from_beginning' is 'False'. Please use 'is_start_from_beginning=False' or 'continuation' instead." + ) # Error if 'is_start_from_beginning' was used with 'start_time' with pytest.raises(ValueError) as e: @@ -212,7 +225,11 @@ async def test_query_change_feed_all_versions_and_deletes_errors_async(self, set start_time=round_time(), mode=mode, ) - assert str(e.value) == "'AllVersionsAndDeletes' mode is only supported if 'start_time' is 'Now'. Please use 'start_time=\"Now\"' or 'continuation' instead." + assert ( + str(e.value) + == "'AllVersionsAndDeletes' mode is only supported if 'start_time' is 'Now'. Please use 'start_time=\"Now\"' or 'continuation' instead." + ) + -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_change_feed_async.py b/sdk/cosmos/azure-cosmos/tests/test_change_feed_async.py index 6ac11e520920..76bc37971245 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_change_feed_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_change_feed_async.py @@ -23,26 +23,26 @@ async def setup(): if os.environ.get("AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER", "False") == "True": use_multiple_write_locations = True config = test_config.TestConfig() - if config.masterKey == '[YOUR_KEY_HERE]' or config.host == '[YOUR_ENDPOINT_HERE]': + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) test_client = CosmosClient(config.host, config.masterKey, multiple_write_locations=use_multiple_write_locations) await test_client.__aenter__() created_db = await test_client.create_database_if_not_exists(config.TEST_DATABASE_ID) - created_db_data = { - "created_db": created_db, - "is_emulator": config.is_emulator - } + created_db_data = {"created_db": created_db, "is_emulator": config.is_emulator} yield created_db_data await test_client.close() + def round_time(): utc_now = datetime.now(timezone.utc) return utc_now - timedelta(microseconds=utc_now.microsecond) + @pytest.mark.cosmosQuery @pytest.mark.asyncio @pytest.mark.usefixtures("setup") @@ -50,8 +50,9 @@ class TestChangeFeedAsync: """Test to ensure escaping of non-ascii characters from partition key""" async def test_get_feed_ranges(self, setup): - created_collection = await setup["created_db"].create_container("get_feed_ranges_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_collection = await setup["created_db"].create_container( + "get_feed_ranges_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) result = [feed_range async for feed_range in created_collection.read_feed_ranges()] assert len(result) == 1 @@ -59,8 +60,8 @@ async def test_get_feed_ranges(self, setup): async def test_query_change_feed_with_different_filter_async(self, change_feed_filter_param, setup): created_collection = await setup["created_db"].create_container( - "change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + "change_feed_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) if change_feed_filter_param == "partitionKey": filter_param = {"partition_key": "pk"} @@ -82,75 +83,66 @@ async def test_query_change_feed_with_different_filter_async(self, change_feed_f query_iterable = created_collection.query_items_change_feed(**filter_param) iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 - if 'Etag' in created_collection.client_connection.last_response_headers: - assert created_collection.client_connection.last_response_headers['Etag'] != '' - elif 'etag' in created_collection.client_connection.last_response_headers: - assert created_collection.client_connection.last_response_headers['etag'] != '' + if "Etag" in created_collection.client_connection.last_response_headers: + assert created_collection.client_connection.last_response_headers["Etag"] != "" + elif "etag" in created_collection.client_connection.last_response_headers: + assert created_collection.client_connection.last_response_headers["etag"] != "" else: fail("No Etag or etag found in last response headers") # Read change feed from beginning should return an empty list - query_iterable = created_collection.query_items_change_feed( - is_start_from_beginning=True, - **filter_param - ) + query_iterable = created_collection.query_items_change_feed(is_start_from_beginning=True, **filter_param) iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 - if 'Etag' in created_collection.client_connection.last_response_headers: - continuation1 = created_collection.client_connection.last_response_headers['Etag'] - elif 'etag' in created_collection.client_connection.last_response_headers: - continuation1 = created_collection.client_connection.last_response_headers['etag'] + if "Etag" in created_collection.client_connection.last_response_headers: + continuation1 = created_collection.client_connection.last_response_headers["Etag"] + elif "etag" in created_collection.client_connection.last_response_headers: + continuation1 = created_collection.client_connection.last_response_headers["etag"] else: fail("No Etag or etag found in last response headers") - assert continuation1 != '' + assert continuation1 != "" # Create a document. Read change feed should return be able to read that document - document_definition = {'pk': 'pk', 'id': 'doc1'} + document_definition = {"pk": "pk", "id": "doc1"} await created_collection.create_item(body=document_definition) - query_iterable = created_collection.query_items_change_feed( - is_start_from_beginning=True, - **filter_param - ) + query_iterable = created_collection.query_items_change_feed(is_start_from_beginning=True, **filter_param) iter_list = [item async for item in query_iterable] assert len(iter_list) == 1 - assert iter_list[0]['id'] == 'doc1' - if 'Etag' in created_collection.client_connection.last_response_headers: - continuation2 = created_collection.client_connection.last_response_headers['Etag'] - elif 'etag' in created_collection.client_connection.last_response_headers: - continuation2 = created_collection.client_connection.last_response_headers['etag'] + assert iter_list[0]["id"] == "doc1" + if "Etag" in created_collection.client_connection.last_response_headers: + continuation2 = created_collection.client_connection.last_response_headers["Etag"] + elif "etag" in created_collection.client_connection.last_response_headers: + continuation2 = created_collection.client_connection.last_response_headers["etag"] else: fail("No Etag or etag found in last response headers") - assert continuation2 != '' + assert continuation2 != "" assert continuation2 != continuation1 # Create two new documents. Verify that change feed contains the 2 new documents # with page size 1 and page size 100 - document_definition = {'pk': 'pk', 'id': 'doc2'} + document_definition = {"pk": "pk", "id": "doc2"} await created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk3', 'id': 'doc3'} + document_definition = {"pk": "pk3", "id": "doc3"} await created_collection.create_item(body=document_definition) for pageSize in [2, 100]: # verify iterator query_iterable = created_collection.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - **filter_param) + continuation=continuation2, max_item_count=pageSize, **filter_param + ) it = query_iterable.__aiter__() - expected_ids = 'doc2.doc3.' + expected_ids = "doc2.doc3." if "partition_key" in filter_param: - expected_ids = 'doc2.' - actual_ids = '' + expected_ids = "doc2." + actual_ids = "" async for item in it: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids # verify by_page # the options is not copied, therefore it need to be restored query_iterable = created_collection.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - **filter_param + continuation=continuation2, max_item_count=pageSize, **filter_param ) count = 0 expected_count = 2 @@ -163,36 +155,31 @@ async def test_query_change_feed_with_different_filter_async(self, change_feed_f all_fetched_res.append(items) assert count == expected_count - actual_ids = '' + actual_ids = "" for item in all_fetched_res: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids # verify reading change feed from the beginning - query_iterable = created_collection.query_items_change_feed( - is_start_from_beginning=True, - **filter_param - ) + query_iterable = created_collection.query_items_change_feed(is_start_from_beginning=True, **filter_param) it = query_iterable.__aiter__() - expected_ids = 'doc1.doc2.doc3.' + expected_ids = "doc1.doc2.doc3." if "partition_key" in filter_param: - expected_ids = 'doc1.doc2.' - actual_ids = '' + expected_ids = "doc1.doc2." + actual_ids = "" async for item in it: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids - if 'Etag' in created_collection.client_connection.last_response_headers: - continuation3 = created_collection.client_connection.last_response_headers['Etag'] - elif 'etag' in created_collection.client_connection.last_response_headers: - continuation3 = created_collection.client_connection.last_response_headers['etag'] + if "Etag" in created_collection.client_connection.last_response_headers: + continuation3 = created_collection.client_connection.last_response_headers["Etag"] + elif "etag" in created_collection.client_connection.last_response_headers: + continuation3 = created_collection.client_connection.last_response_headers["etag"] else: fail("No Etag or etag found in last response headers") # verify reading empty change feed query_iterable = created_collection.query_items_change_feed( - continuation=continuation3, - is_start_from_beginning=True, - **filter_param + continuation=continuation3, is_start_from_beginning=True, **filter_param ) iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 @@ -201,20 +188,21 @@ async def test_query_change_feed_with_different_filter_async(self, change_feed_f @pytest.mark.asyncio async def test_query_change_feed_with_start_time(self, setup): - created_collection = await setup["created_db"].create_container_if_not_exists("query_change_feed_start_time_test", - PartitionKey(path="/pk")) + created_collection = await setup["created_db"].create_container_if_not_exists( + "query_change_feed_start_time_test", PartitionKey(path="/pk") + ) batchSize = 50 async def create_random_items(container, batch_size): for _ in range(batch_size): # Generate a Random partition key - partition_key = 'pk' + str(uuid.uuid4()) + partition_key = "pk" + str(uuid.uuid4()) # Generate a random item item = { - 'id': 'item' + str(uuid.uuid4()), - 'partitionKey': partition_key, - 'content': 'This is some random content', + "id": "item" + str(uuid.uuid4()), + "partitionKey": partition_key, + "content": "This is some random content", } try: @@ -258,17 +246,18 @@ async def create_random_items(container, batch_size): await setup["created_db"].delete_container(created_collection.id) async def test_query_change_feed_with_multi_partition_async(self, setup): - created_collection = await setup["created_db"].create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=11000) + created_collection = await setup["created_db"].create_container( + "change_feed_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), offer_throughput=11000 + ) # create one doc and make sure change feed query can return the document new_documents = [ - {'pk': 'pk', 'id': 'doc1'}, - {'pk': 'pk2', 'id': 'doc2'}, - {'pk': 'pk3', 'id': 'doc3'}, - {'pk': 'pk4', 'id': 'doc4'}] - expected_ids = ['doc1', 'doc2', 'doc3', 'doc4'] + {"pk": "pk", "id": "doc1"}, + {"pk": "pk2", "id": "doc2"}, + {"pk": "pk3", "id": "doc3"}, + {"pk": "pk4", "id": "doc4"}, + ] + expected_ids = ["doc1", "doc2", "doc3", "doc4"] for document in new_documents: await created_collection.create_item(body=document) @@ -277,9 +266,10 @@ async def test_query_change_feed_with_multi_partition_async(self, setup): it = query_iterable.__aiter__() actual_ids = [] async for item in it: - actual_ids.append(item['id']) + actual_ids.append(item["id"]) assert actual_ids == expected_ids -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_change_feed_split.py b/sdk/cosmos/azure-cosmos/tests/test_change_feed_split.py index 724760725690..d17e38513d45 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_change_feed_split.py +++ b/sdk/cosmos/azure-cosmos/tests/test_change_feed_split.py @@ -27,30 +27,30 @@ def setUpClass(cls): cls.database = cls.client.get_database_client(cls.TEST_DATABASE_ID) def test_query_change_feed_with_split(self): - created_collection = self.database.create_container("change_feed_split_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=400) + created_collection = self.database.create_container( + "change_feed_split_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), offer_throughput=400 + ) # initial change feed query returns empty result query_iterable = created_collection.query_items_change_feed(start_time="Beginning") iter_list = list(query_iterable) assert len(iter_list) == 0 - continuation = created_collection.client_connection.last_response_headers['etag'] - assert continuation != '' + continuation = created_collection.client_connection.last_response_headers["etag"] + assert continuation != "" # create one doc and make sure change feed query can return the document - document_definition = {'pk': 'pk', 'id': 'doc1'} + document_definition = {"pk": "pk", "id": "doc1"} created_collection.create_item(body=document_definition) query_iterable = created_collection.query_items_change_feed(continuation=continuation) iter_list = list(query_iterable) assert len(iter_list) == 1 - continuation = created_collection.client_connection.last_response_headers['etag'] + continuation = created_collection.client_connection.last_response_headers["etag"] test_config.TestConfig.trigger_split(created_collection, 11000) print("creating few more documents") - new_documents = [{'pk': 'pk2', 'id': 'doc2'}, {'pk': 'pk3', 'id': 'doc3'}, {'pk': 'pk4', 'id': 'doc4'}] - expected_ids = ['doc2', 'doc3', 'doc4'] + new_documents = [{"pk": "pk2", "id": "doc2"}, {"pk": "pk3", "id": "doc3"}, {"pk": "pk4", "id": "doc4"}] + expected_ids = ["doc2", "doc3", "doc4"] for document in new_documents: created_collection.create_item(body=document) @@ -58,10 +58,11 @@ def test_query_change_feed_with_split(self): it = query_iterable.__iter__() actual_ids = [] for item in it: - actual_ids.append(item['id']) + actual_ids.append(item["id"]) assert actual_ids == expected_ids self.database.delete_container(created_collection.id) + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_change_feed_split_async.py b/sdk/cosmos/azure-cosmos/tests/test_change_feed_split_async.py index 8a404d1d7dbe..35ba93b9fb39 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_change_feed_split_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_change_feed_split_async.py @@ -25,12 +25,12 @@ class TestPartitionSplitChangeFeedAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -40,30 +40,30 @@ async def asyncTearDown(self): await self.client.close() async def test_query_change_feed_with_split_async(self): - created_collection = await self.created_database.create_container("change_feed_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=400) + created_collection = await self.created_database.create_container( + "change_feed_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), offer_throughput=400 + ) # initial change feed query returns empty result query_iterable = created_collection.query_items_change_feed(start_time="Beginning") iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 - continuation = created_collection.client_connection.last_response_headers['etag'] - assert continuation != '' + continuation = created_collection.client_connection.last_response_headers["etag"] + assert continuation != "" # create one doc and make sure change feed query can return the document - document_definition = {'pk': 'pk', 'id': 'doc1'} + document_definition = {"pk": "pk", "id": "doc1"} await created_collection.create_item(body=document_definition) query_iterable = created_collection.query_items_change_feed(continuation=continuation) iter_list = [item async for item in query_iterable] assert len(iter_list) == 1 - continuation = created_collection.client_connection.last_response_headers['etag'] + continuation = created_collection.client_connection.last_response_headers["etag"] await test_config.TestConfig.trigger_split_async(created_collection, 11000) print("creating few more documents") - new_documents = [{'pk': 'pk2', 'id': 'doc2'}, {'pk': 'pk3', 'id': 'doc3'}, {'pk': 'pk4', 'id': 'doc4'}] - expected_ids = ['doc2', 'doc3', 'doc4'] + new_documents = [{"pk": "pk2", "id": "doc2"}, {"pk": "pk3", "id": "doc3"}, {"pk": "pk4", "id": "doc4"}] + expected_ids = ["doc2", "doc3", "doc4"] for document in new_documents: await created_collection.create_item(body=document) @@ -71,10 +71,11 @@ async def test_query_change_feed_with_split_async(self): it = query_iterable.__aiter__() actual_ids = [] async for item in it: - actual_ids.append(item['id']) + actual_ids.append(item["id"]) assert actual_ids == expected_ids await self.created_database.delete_container(created_collection.id) -if __name__ == '__main__': - unittest.main() \ No newline at end of file + +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation.py b/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation.py index 2e403bd38df0..09a46dab9c1d 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation.py +++ b/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation.py @@ -10,6 +10,7 @@ from azure.cosmos.partition_key import PartitionKey, _get_partition_key_from_partition_key_definition from azure.cosmos.container import _get_epk_range_for_partition_key + @pytest.mark.cosmosEmulator class TestChangeFeedPKVariation(unittest.TestCase): """Test change feed with different partition key variations.""" @@ -20,30 +21,22 @@ class TestChangeFeedPKVariation(unittest.TestCase): connectionPolicy = configs.connectionPolicy client: cosmos_client.CosmosClient = None # Items for Hash V1 partition key - single_hash_items = [ - {"id": str(i), "pk": f"short_string"} for i in range(1, 101) - ] + [ - {"id": str(i), "pk": f"long_string_" + "a" * 251} for i in range(101, 201) - ] + [ - {"id": str(i), "pk": 1000} for i in range(201, 301) - ] + [ - {"id": str(i), "pk": 1000 * 1.1111} for i in range(301, 401) - ] + [ - {"id": str(i), "pk": True} for i in range(401, 501) - ] + single_hash_items = ( + [{"id": str(i), "pk": f"short_string"} for i in range(1, 101)] + + [{"id": str(i), "pk": f"long_string_" + "a" * 251} for i in range(101, 201)] + + [{"id": str(i), "pk": 1000} for i in range(201, 301)] + + [{"id": str(i), "pk": 1000 * 1.1111} for i in range(301, 401)] + + [{"id": str(i), "pk": True} for i in range(401, 501)] + ) # Items for Hierarchical Partition Keys - hpk_items = [ - {"id": str(i), "pk1": "level1_", "pk2": "level2_"} for i in range(1, 101) - ] + [ - {"id": str(i), "pk1": "level1_", "pk2": f"level2_long__" + "c" * 101} for i in range(101, 201) - ] + [ - {"id": str(i), "pk1": 10, "pk2": 1000} for i in range(201, 301) - ] + [ - {"id": str(i), "pk1": 10 * 1.1, "pk2": 10 * 2.2} for i in range(301, 401) - ] + [ - {"id": str(i), "pk1": True, 'pk2': False} for i in range(401, 501) - ] + hpk_items = ( + [{"id": str(i), "pk1": "level1_", "pk2": "level2_"} for i in range(1, 101)] + + [{"id": str(i), "pk1": "level1_", "pk2": f"level2_long__" + "c" * 101} for i in range(101, 201)] + + [{"id": str(i), "pk1": 10, "pk2": 1000} for i in range(201, 301)] + + [{"id": str(i), "pk1": 10 * 1.1, "pk2": 10 * 2.2} for i in range(301, 401)] + + [{"id": str(i), "pk1": True, "pk2": False} for i in range(401, 501)] + ) test_data_hash = [ { @@ -56,21 +49,19 @@ class TestChangeFeedPKVariation(unittest.TestCase): }, { "version": 2, - "expected_epk": ( - "2032D236DA8678BFB900E866D7EBCE76" - ), + "expected_epk": ("2032D236DA8678BFB900E866D7EBCE76"), }, ] @classmethod def setUpClass(cls): cls.config = test_config.TestConfig() - if (cls.config.masterKey == '[YOUR_KEY_HERE]' or - cls.config.host == '[YOUR_ENDPOINT_HERE]'): + if cls.config.masterKey == "[YOUR_KEY_HERE]" or cls.config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.config.host, cls.config.masterKey) cls.db = cls.client.get_database_client(cls.config.TEST_DATABASE_ID) @@ -78,9 +69,9 @@ def create_container(self, db, container_id, partition_key, version=None, throug """Helper to create a container with a specific partition key definition.""" if isinstance(partition_key, list): # Assume multihash (hierarchical partition key) for the container - pk_definition = PartitionKey(path=partition_key, kind='MultiHash') + pk_definition = PartitionKey(path=partition_key, kind="MultiHash") else: - pk_definition = PartitionKey(path=partition_key, kind='Hash', version=version) + pk_definition = PartitionKey(path=partition_key, kind="Hash", version=version) if throughput: return db.create_container(id=container_id, partition_key=pk_definition, offer_throughput=throughput) return db.create_container(id=container_id, partition_key=pk_definition) @@ -114,7 +105,7 @@ def validate_changefeed_hpk(self, container): ["level1_", "level2_long__" + "c" * 101], [10, 1000], [10 * 1.1, 10 * 2.2], - [True, False] + [True, False], ] for pk in partition_keys: # Perform a change feed query @@ -136,21 +127,18 @@ def test_partition_key_hashing(self): for hash_data in self.test_data_hash: version = hash_data["version"] expected_epk = hash_data["expected_epk"] - part_k = ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij" - "klmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz") - partition_key = PartitionKey( - path="/field1", - kind="Hash", - version=version + part_k = ( + "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij" + "klmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz" ) + partition_key = PartitionKey(path="/field1", kind="Hash", version=version) epk_str = partition_key._get_effective_partition_key_string(part_k) assert epk_str.upper() == expected_epk def test_hash_v1_partition_key(self): """Test changefeed with Hash V1 partition key.""" db = self.db - container = self.create_container(db, f"container_test_hash_V1_{uuid.uuid4()}", - "/pk", version=1) + container = self.create_container(db, f"container_test_hash_V1_{uuid.uuid4()}", "/pk", version=1) items = self.single_hash_items self.insert_items(container, items) self.validate_changefeed(container) @@ -159,8 +147,7 @@ def test_hash_v1_partition_key(self): def test_hash_v2_partition_key(self): """Test changefeed with Hash V2 partition key.""" db = self.db - container = self.create_container(db, f"container_test_hash_V2_{uuid.uuid4()}", - "/pk", version=2) + container = self.create_container(db, f"container_test_hash_V2_{uuid.uuid4()}", "/pk", version=2) items = self.single_hash_items self.insert_items(container, items) self.validate_changefeed(container) @@ -169,8 +156,7 @@ def test_hash_v2_partition_key(self): def test_hpk_partition_key(self): """Test changefeed with hierarchical partition key.""" db = self.db - container = self.create_container(db, f"container_test_hpk_{uuid.uuid4()}", - ["/pk1", "/pk2"]) + container = self.create_container(db, f"container_test_hpk_{uuid.uuid4()}", ["/pk1", "/pk2"]) items = self.hpk_items self.insert_items(container, items) self.validate_changefeed_hpk(container) @@ -245,8 +231,9 @@ def _get_properties_override(**kwargs): container_properties = container._get_properties() partition_key_definition = container_properties["partitionKey"] # Ensure the version key is not included in the definition - assert "version" not in partition_key_definition, ("Version key should not be included " - "in the partition key definition.") + assert "version" not in partition_key_definition, ( + "Version key should not be included " "in the partition key definition." + ) # Create a PartitionKey instance from the definition and validate partition_key_instance = _get_partition_key_from_partition_key_definition(partition_key_definition) @@ -254,11 +241,7 @@ def _get_properties_override(**kwargs): assert partition_key_instance.version == 1, "Partition key version mismatch." # Upsert items and validate _get_epk_range_for_partition_key - items = [ - {"id": "1", "pk": "value1"}, - {"id": "2", "pk": "value2"}, - {"id": "3", "pk": "value3"} - ] + items = [{"id": "1", "pk": "value1"}, {"id": "2", "pk": "value2"}, {"id": "3", "pk": "value3"}] self.insert_items(container, items) for item in items: @@ -277,7 +260,7 @@ def _get_properties_override(**kwargs): f"while {len(items)} items were created." ) for index, item in enumerate(items): - assert item['id'] == change_feed_items[index]['id'], f"Item {item} not found in change feed results." + assert item["id"] == change_feed_items[index]["id"], f"Item {item} not found in change feed results." finally: # Clean up the container diff --git a/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation_async.py b/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation_async.py index 725ee56d1f2e..13b412be8558 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_changefeed_partition_key_variation_async.py @@ -5,6 +5,7 @@ import test_config from azure.cosmos.partition_key import PartitionKey, _get_partition_key_from_partition_key_definition + @pytest.mark.cosmosEmulator @pytest.mark.asyncio class TestChangeFeedPKVariationAsync(unittest.IsolatedAsyncioTestCase): @@ -17,30 +18,22 @@ class TestChangeFeedPKVariationAsync(unittest.IsolatedAsyncioTestCase): client: CosmosClient = None # Items for Hash V1 partition key - single_hash_items = [ - {"id": str(i), "pk": f"short_string"} for i in range(1, 101) - ] + [ - {"id": str(i), "pk": f"long_string_" + "a" * 251} for i in range(101, 201) - ] + [ - {"id": str(i), "pk": 1000} for i in range(201, 301) - ] + [ - {"id": str(i), "pk": 1000 * 1.1111} for i in range(301, 401) - ] + [ - {"id": str(i), "pk": True} for i in range(401, 501) - ] + single_hash_items = ( + [{"id": str(i), "pk": f"short_string"} for i in range(1, 101)] + + [{"id": str(i), "pk": f"long_string_" + "a" * 251} for i in range(101, 201)] + + [{"id": str(i), "pk": 1000} for i in range(201, 301)] + + [{"id": str(i), "pk": 1000 * 1.1111} for i in range(301, 401)] + + [{"id": str(i), "pk": True} for i in range(401, 501)] + ) # Items for Hierarchical Partition Keys - hpk_items = [ - {"id": str(i), "pk1": "level1_", "pk2": "level2_"} for i in range(1, 101) - ] + [ - {"id": str(i), "pk1": "level1_", "pk2": f"level2_long__" + "c" * 101} for i in range(101, 201) - ] + [ - {"id": str(i), "pk1": 10, "pk2": 1000} for i in range(201, 301) - ] + [ - {"id": str(i), "pk1": 10 * 1.1, "pk2": 10 * 2.2} for i in range(301, 401) - ] + [ - {"id": str(i), "pk1": True, 'pk2': False} for i in range(401, 501) - ] + hpk_items = ( + [{"id": str(i), "pk1": "level1_", "pk2": "level2_"} for i in range(1, 101)] + + [{"id": str(i), "pk1": "level1_", "pk2": f"level2_long__" + "c" * 101} for i in range(101, 201)] + + [{"id": str(i), "pk1": 10, "pk2": 1000} for i in range(201, 301)] + + [{"id": str(i), "pk1": 10 * 1.1, "pk2": 10 * 2.2} for i in range(301, 401)] + + [{"id": str(i), "pk1": True, "pk2": False} for i in range(401, 501)] + ) test_data_hash = [ { @@ -53,21 +46,19 @@ class TestChangeFeedPKVariationAsync(unittest.IsolatedAsyncioTestCase): }, { "version": 2, - "expected_epk": ( - "2032D236DA8678BFB900E866D7EBCE76" - ), + "expected_epk": ("2032D236DA8678BFB900E866D7EBCE76"), }, ] @classmethod async def asyncSetUpClass(cls): cls.config = test_config.TestConfig() - if (cls.config.masterKey == '[YOUR_KEY_HERE]' or - cls.config.host == '[YOUR_ENDPOINT_HERE]'): + if cls.config.masterKey == "[YOUR_KEY_HERE]" or cls.config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -80,9 +71,9 @@ async def create_container(self, db, container_id, partition_key, version=None, """Helper to create a container with a specific partition key definition.""" if isinstance(partition_key, list): # Assume multihash (hierarchical partition key) for the container - pk_definition = PartitionKey(path=partition_key, kind='MultiHash') + pk_definition = PartitionKey(path=partition_key, kind="MultiHash") else: - pk_definition = PartitionKey(path=partition_key, kind='Hash', version=version) + pk_definition = PartitionKey(path=partition_key, kind="Hash", version=version) if throughput: return await db.create_container(container_id, pk_definition, offer_throughput=throughput) return await db.create_container(container_id, pk_definition) @@ -116,7 +107,7 @@ async def validate_changefeed_hpk(self, container): ["level1_", "level2_long__" + "c" * 101], [10, 1000], [10 * 1.1, 10 * 2.2], - [True, False] + [True, False], ] for pk in partition_keys: # Perform a change feed query @@ -138,13 +129,11 @@ async def test_partition_key_hashing(self): for hash_data in self.test_data_hash: version = hash_data["version"] expected_epk = hash_data["expected_epk"] - part_k = ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij" - "klmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz") - partition_key = PartitionKey( - path="/field1", - kind="Hash", - version=version + part_k = ( + "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij" + "klmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz" ) + partition_key = PartitionKey(path="/field1", kind="Hash", version=version) epk_str = partition_key._get_effective_partition_key_string(part_k) assert epk_str.upper() == expected_epk @@ -244,8 +233,9 @@ async def _get_properties_override(**kwargs): container_properties = await container._get_properties() partition_key_definition = container_properties["partitionKey"] # Ensure the version key is not included in the definition - assert "version" not in partition_key_definition, ("Version key should not be included " - "in the partition key definition.") + assert "version" not in partition_key_definition, ( + "Version key should not be included " "in the partition key definition." + ) # Create a PartitionKey instance from the definition and validate partition_key_instance = _get_partition_key_from_partition_key_definition(partition_key_definition) @@ -253,11 +243,7 @@ async def _get_properties_override(**kwargs): assert partition_key_instance.version == 1, "Partition key version mismatch." # Upsert items and validate _get_epk_range_for_partition_key - items = [ - {"id": "1", "pk": "value1"}, - {"id": "2", "pk": "value2"}, - {"id": "3", "pk": "value3"} - ] + items = [{"id": "1", "pk": "value1"}, {"id": "2", "pk": "value2"}, {"id": "3", "pk": "value3"}] await self.insert_items(container, items) for item in items: @@ -276,7 +262,7 @@ async def _get_properties_override(**kwargs): f"while {len(items)} items were created." ) for index, item in enumerate(items): - assert item['id'] == change_feed_items[index]['id'], f"Item {item} not found in change feed results." + assert item["id"] == change_feed_items[index]["id"], f"Item {item} not found in change feed results." finally: # Clean up the container @@ -284,5 +270,5 @@ async def _get_properties_override(**kwargs): await self.db.delete_container(container.id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator.py b/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator.py index 4f7b9a6d3254..72e7c02b0ce1 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator.py +++ b/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator.py @@ -14,29 +14,39 @@ from azure.cosmos.exceptions import CosmosHttpResponseError from _fault_injection_transport import FaultInjectionTransport from azure.cosmos.http_constants import ResourceType, HttpHeaders -from test_per_partition_circuit_breaker_mm import create_doc, DELETE_ALL_ITEMS_BY_PARTITION_KEY, PK_VALUE, \ - create_errors, perform_write_operation, validate_unhealthy_partitions as validate_unhealthy_partitions_mm -from test_per_partition_circuit_breaker_sm_mrr import \ - validate_unhealthy_partitions as validate_unhealthy_partitions_sm_mrr +from test_per_partition_circuit_breaker_mm import ( + create_doc, + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + PK_VALUE, + create_errors, + perform_write_operation, + validate_unhealthy_partitions as validate_unhealthy_partitions_mm, +) +from test_per_partition_circuit_breaker_sm_mrr import ( + validate_unhealthy_partitions as validate_unhealthy_partitions_sm_mrr, +) COLLECTION = "created_collection" + + @pytest.fixture(scope="class", autouse=True) def setup_teardown(): os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] = "True" yield os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] = "False" + def create_custom_transport_mm(): custom_transport = FaultInjectionTransport() is_get_account_predicate = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="Write Region", - second_region_name="Read Region", - inner=inner) + first_region_name="Write Region", second_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) return custom_transport @@ -50,35 +60,40 @@ class TestCircuitBreakerEmulator: TEST_CONTAINER_SINGLE_PARTITION_ID = test_config.TestConfig.TEST_MULTI_PARTITION_CONTAINER_ID def setup_method_with_custom_transport(self, custom_transport, default_endpoint=host, **kwargs): - client = CosmosClient(default_endpoint, self.master_key, consistency_level="Session", - preferred_locations=["Write Region", "Read Region"], - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + consistency_level="Session", + preferred_locations=["Write Region", "Read Region"], + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID) return {"client": client, "db": db, "col": container} - def create_custom_transport_sm_mrr(self): - custom_transport = FaultInjectionTransport() + custom_transport = FaultInjectionTransport() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate = lambda \ - r: FaultInjectionTransport.predicate_is_write_operation(r, self.host) + is_write_operation_in_read_region_predicate = lambda r: FaultInjectionTransport.predicate_is_write_operation( + r, self.host + ) custom_transport.add_fault( - is_write_operation_in_read_region_predicate, - lambda r: FaultInjectionTransport.error_write_forbidden()) + is_write_operation_in_read_region_predicate, lambda r: FaultInjectionTransport.error_write_forbidden() + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions is_get_account_predicate = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation = \ + emulator_as_multi_region_sm_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) return custom_transport def setup_info(self, error=None, mm=False): @@ -87,21 +102,24 @@ def setup_info(self, error=None, mm=False): custom_transport = create_custom_transport_mm() if mm else self.create_custom_transport_sm_mrr() # two documents targeted to same partition, one will always fail and the other will succeed doc = create_doc() - predicate = lambda r: (FaultInjectionTransport.predicate_is_resource_type(r, ResourceType.Collection) and - FaultInjectionTransport.predicate_is_operation_type(r, documents._OperationType.Delete) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_resource_type(r, ResourceType.Collection) + and FaultInjectionTransport.predicate_is_operation_type(r, documents._OperationType.Delete) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) if error is not None: - custom_transport.add_fault(predicate, - error) - custom_setup = self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, multiple_write_locations=mm) + custom_transport.add_fault(predicate, error) + custom_setup = self.setup_method_with_custom_transport( + custom_transport, default_endpoint=self.host, multiple_write_locations=mm + ) setup = self.setup_method_with_custom_transport(None, default_endpoint=self.host, multiple_write_locations=mm) return setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate def test_pk_range_wrapper(self): _, _, _, _, custom_setup, _, _ = self.setup_info() - container = custom_setup['col'] + container = custom_setup["col"] prop = container.read() - headers = {HttpHeaders.IntendedCollectionRID: prop['_rid']} + headers = {HttpHeaders.IntendedCollectionRID: prop["_rid"]} # check request with partition key flow request = RequestObject( ResourceType.Document, @@ -114,7 +132,7 @@ def test_pk_range_wrapper(self): assert pk_range_wrapper.partition_key_range.min == "26666666666666666666666666666664" # check request with partition key range id flow - headers[HttpHeaders.PartitionKeyRangeID] = '0' + headers[HttpHeaders.PartitionKeyRangeID] = "0" request = RequestObject( ResourceType.Document, documents._OperationType.Create, @@ -129,8 +147,8 @@ def test_pk_range_wrapper(self): def test_write_consecutive_failure_threshold_delete_all_items_by_pk_sm(self, setup_teardown, error): error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda) - fault_injection_container = custom_setup['col'] - container = setup['col'] + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # writes should fail in sm mrr with circuit breaker and should not mark unavailable a partition @@ -148,24 +166,27 @@ def test_write_consecutive_failure_threshold_delete_all_items_by_pk_sm(self, set validate_unhealthy_partitions_sm_mrr(global_endpoint_manager, 0) - @pytest.mark.parametrize("error", create_errors()) def test_write_consecutive_failure_threshold_delete_all_items_by_pk_mm(self, setup_teardown, error): if hasattr(error, "status_code") and error.status_code == 503: pytest.skip("ServiceUnavailableError will do a cross-region retry, so it has to be special cased.") error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda, mm=True) - fault_injection_container = custom_setup['col'] - container = setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info( + error_lambda, mm=True + ) + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions_mm(global_endpoint_manager, 0) @@ -173,21 +194,25 @@ def test_write_consecutive_failure_threshold_delete_all_items_by_pk_mm(self, set # writes should fail but still be tracked for i in range(4): with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error # writes should now succeed because going to the other region - perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) validate_unhealthy_partitions_mm(global_endpoint_manager, 1) # remove faults and reduce initial recover time and perform a write @@ -195,25 +220,28 @@ def test_write_consecutive_failure_threshold_delete_all_items_by_pk_mm(self, set _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - uri_down) + perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + uri_down, + ) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions_mm(global_endpoint_manager, 0) - @pytest.mark.parametrize("error", create_errors()) def test_write_failure_rate_threshold_delete_all_items_by_pk_mm(self, setup_teardown, error): if hasattr(error, "status_code") and error.status_code == 503: pytest.skip("ServiceUnavailableError will do a cross-region retry, so it has to be special cased.") error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda, mm=True) - fault_injection_container = custom_setup['col'] - container = setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info( + error_lambda, mm=True + ) + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -227,19 +255,17 @@ def test_write_failure_rate_threshold_delete_all_items_by_pk_mm(self, setup_tear # remove faults and perform a write custom_transport.faults = [] fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: FaultInjectionTransport.error_after_delay( - 0, - error - )) + custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay(0, error)) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions_mm(global_endpoint_manager, 1) @@ -253,8 +279,8 @@ def test_write_failure_rate_threshold_delete_all_items_by_pk_mm(self, setup_tear def test_write_failure_rate_threshold_delete_all_items_by_pk_sm(self, setup_teardown, error): error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda) - fault_injection_container = custom_setup['col'] - container = setup['col'] + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -268,19 +294,17 @@ def test_write_failure_rate_threshold_delete_all_items_by_pk_sm(self, setup_tear # remove faults and perform a write custom_transport.faults = [] fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: FaultInjectionTransport.error_after_delay( - 0, - error - )) + custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay(0, error)) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions_sm_mrr(global_endpoint_manager, 0) @@ -292,5 +316,6 @@ def test_write_failure_rate_threshold_delete_all_items_by_pk_sm(self, setup_tear # test cosmos client timeout -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator_async.py b/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator_async.py index c15051859c50..182966a3e356 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_circuit_breaker_emulator_async.py @@ -15,31 +15,40 @@ from azure.cosmos.aio import CosmosClient from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.http_constants import ResourceType, HttpHeaders -from test_per_partition_circuit_breaker_mm_async import (perform_write_operation, cleanup_method) -from test_per_partition_circuit_breaker_mm import create_doc, DELETE_ALL_ITEMS_BY_PARTITION_KEY, PK_VALUE, \ - create_errors, validate_unhealthy_partitions as validate_unhealthy_partitions_mm -from test_per_partition_circuit_breaker_sm_mrr import \ - validate_unhealthy_partitions as validate_unhealthy_partitions_sm_mrr +from test_per_partition_circuit_breaker_mm_async import perform_write_operation, cleanup_method +from test_per_partition_circuit_breaker_mm import ( + create_doc, + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + PK_VALUE, + create_errors, + validate_unhealthy_partitions as validate_unhealthy_partitions_mm, +) +from test_per_partition_circuit_breaker_sm_mrr import ( + validate_unhealthy_partitions as validate_unhealthy_partitions_sm_mrr, +) from _fault_injection_transport_async import FaultInjectionTransportAsync COLLECTION = "created_collection" + + @pytest_asyncio.fixture(scope="class", autouse=True) async def setup_teardown(): os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] = "True" yield os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] = "False" + async def create_custom_transport_mm(): custom_transport = FaultInjectionTransportAsync() is_get_account_predicate = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="Write Region", - second_region_name="Read Region", - inner=inner) + first_region_name="Write Region", second_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) return custom_transport @@ -54,35 +63,40 @@ class TestCircuitBreakerEmulatorAsync: TEST_CONTAINER_SINGLE_PARTITION_ID = test_config.TestConfig.TEST_MULTI_PARTITION_CONTAINER_ID async def setup_method_with_custom_transport(self, custom_transport, default_endpoint=host, **kwargs): - client = CosmosClient(default_endpoint, self.master_key, consistency_level="Session", - preferred_locations=["Write Region", "Read Region"], - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + consistency_level="Session", + preferred_locations=["Write Region", "Read Region"], + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID) return {"client": client, "db": db, "col": container} - async def create_custom_transport_sm_mrr(self): - custom_transport = FaultInjectionTransportAsync() + custom_transport = FaultInjectionTransportAsync() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate = lambda \ - r: FaultInjectionTransportAsync.predicate_is_write_operation(r, self.host) + is_write_operation_in_read_region_predicate = ( + lambda r: FaultInjectionTransportAsync.predicate_is_write_operation(r, self.host) + ) custom_transport.add_fault( - is_write_operation_in_read_region_predicate, - lambda r: FaultInjectionTransportAsync.error_write_forbidden()) + is_write_operation_in_read_region_predicate, lambda r: FaultInjectionTransportAsync.error_write_forbidden() + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions is_get_account_predicate = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation = \ + emulator_as_multi_region_sm_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) return custom_transport async def setup_info(self, error=None, mm=False): @@ -91,20 +105,26 @@ async def setup_info(self, error=None, mm=False): custom_transport = await create_custom_transport_mm() if mm else await self.create_custom_transport_sm_mrr() # two documents targeted to same partition, one will always fail and the other will succeed doc = create_doc() - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_resource_type(r, ResourceType.Collection) and - FaultInjectionTransportAsync.predicate_is_operation_type(r, documents._OperationType.Delete) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_resource_type(r, ResourceType.Collection) + and FaultInjectionTransportAsync.predicate_is_operation_type(r, documents._OperationType.Delete) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) if error is not None: custom_transport.add_fault(predicate, error) - custom_setup = await self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, multiple_write_locations=mm) - setup = await self.setup_method_with_custom_transport(None, default_endpoint=self.host, multiple_write_locations=mm) + custom_setup = await self.setup_method_with_custom_transport( + custom_transport, default_endpoint=self.host, multiple_write_locations=mm + ) + setup = await self.setup_method_with_custom_transport( + None, default_endpoint=self.host, multiple_write_locations=mm + ) return setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate async def test_pk_range_wrapper_async(self): _, _, _, _, custom_setup, _, _ = await self.setup_info() - container = custom_setup['col'] + container = custom_setup["col"] prop = await container.read() - headers = {HttpHeaders.IntendedCollectionRID: prop['_rid']} + headers = {HttpHeaders.IntendedCollectionRID: prop["_rid"]} # check request with partition key flow request = RequestObject( ResourceType.Document, @@ -117,7 +137,7 @@ async def test_pk_range_wrapper_async(self): assert pk_range_wrapper.partition_key_range.min == "26666666666666666666666666666664" # check request with partition key range id flow - headers[HttpHeaders.PartitionKeyRangeID] = '0' + headers[HttpHeaders.PartitionKeyRangeID] = "0" request = RequestObject( ResourceType.Document, documents._OperationType.Create, @@ -132,9 +152,11 @@ async def test_pk_range_wrapper_async(self): @pytest.mark.parametrize("error", create_errors()) async def test_write_consecutive_failure_threshold_delete_all_items_by_pk_sm_async(self, setup_teardown, error): error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - fault_injection_container = custom_setup['col'] - container = setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # writes should fail in sm mrr with circuit breaker and should not mark unavailable a partition @@ -153,24 +175,27 @@ async def test_write_consecutive_failure_threshold_delete_all_items_by_pk_sm_asy validate_unhealthy_partitions_sm_mrr(global_endpoint_manager, 0) await cleanup_method([custom_setup, setup]) - @pytest.mark.parametrize("error", create_errors()) async def test_write_consecutive_failure_threshold_delete_all_items_by_pk_mm_async(self, setup_teardown, error): if hasattr(error, "status_code") and error.status_code == 503: pytest.skip("ServiceUnavailableError will do a cross-region retry, so it has to be special cased.") error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda, mm=True) - fault_injection_container = custom_setup['col'] - container = setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, mm=True + ) + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions_mm(global_endpoint_manager, 0) @@ -178,21 +203,25 @@ async def test_write_consecutive_failure_threshold_delete_all_items_by_pk_mm_asy # writes should fail but still be tracked for i in range(4): with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error # writes should now succeed because going to the other region - await perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) validate_unhealthy_partitions_mm(global_endpoint_manager, 1) # remove faults and reduce initial recover time and perform a write @@ -200,26 +229,29 @@ async def test_write_consecutive_failure_threshold_delete_all_items_by_pk_mm_asy _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - await perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - uri_down) + await perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + uri_down, + ) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions_mm(global_endpoint_manager, 0) await cleanup_method([custom_setup, setup]) - @pytest.mark.parametrize("error", create_errors()) async def test_write_failure_rate_threshold_delete_all_items_by_pk_mm_async(self, setup_teardown, error): if hasattr(error, "status_code") and error.status_code == 503: pytest.skip("ServiceUnavailableError will do a cross-region retry, so it has to be special cased.") error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda, mm=True) - fault_injection_container = custom_setup['col'] - container = setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, mm=True + ) + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -233,19 +265,20 @@ async def test_write_failure_rate_threshold_delete_all_items_by_pk_mm_async(self # remove faults and perform a write custom_transport.faults = [] await fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - ))) + custom_transport.add_fault( + predicate, + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)), + ) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions_mm(global_endpoint_manager, 1) @@ -259,9 +292,11 @@ async def test_write_failure_rate_threshold_delete_all_items_by_pk_mm_async(self @pytest.mark.parametrize("error", create_errors()) async def test_write_failure_rate_threshold_delete_all_items_by_pk_sm_async(self, setup_teardown, error): error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - fault_injection_container = custom_setup['col'] - container = setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + fault_injection_container = custom_setup["col"] + container = setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -275,19 +310,20 @@ async def test_write_failure_rate_threshold_delete_all_items_by_pk_sm_async(self # remove faults and perform a write custom_transport.faults = [] await fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - ))) + custom_transport.add_fault( + predicate, + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)), + ) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(DELETE_ALL_ITEMS_BY_PARTITION_KEY, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions_sm_mrr(global_endpoint_manager, 0) @@ -300,5 +336,6 @@ async def test_write_failure_rate_threshold_delete_all_items_by_pk_sm_async(self # test cosmos client timeout -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_client_user_agent_async.py b/sdk/cosmos/azure-cosmos/tests/test_client_user_agent_async.py index 422d309949d7..ece5c0e0c006 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_client_user_agent_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_client_user_agent_async.py @@ -22,8 +22,12 @@ async def test_client_user_agent(self): self.assertTrue(client_async.client_connection._user_agent != client_sync.client_connection._user_agent) async def test_client_user_agent_suffix(self): - async with async_client(url=TestConfig.host, credential=TestConfig.masterKey, user_agent_suffix="testAsyncSuffix") as client_async: - client_sync = sync_client(url=TestConfig.host, credential=TestConfig.masterKey, user_agent_suffix="testSyncSuffix") + async with async_client( + url=TestConfig.host, credential=TestConfig.masterKey, user_agent_suffix="testAsyncSuffix" + ) as client_async: + client_sync = sync_client( + url=TestConfig.host, credential=TestConfig.masterKey, user_agent_suffix="testSyncSuffix" + ) self.assertTrue(client_sync.client_connection._user_agent.endswith(" testSyncSuffix")) self.assertTrue(client_async.client_connection._user_agent.endswith(" testAsyncSuffix")) diff --git a/sdk/cosmos/azure-cosmos/tests/test_computed_properties.py b/sdk/cosmos/azure-cosmos/tests/test_computed_properties.py index c41fcd52567f..7ad5c8da49fd 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_computed_properties.py +++ b/sdk/cosmos/azure-cosmos/tests/test_computed_properties.py @@ -11,6 +11,7 @@ from azure.cosmos.partition_key import PartitionKey import azure.cosmos.exceptions as exceptions + @pytest.mark.cosmosQuery class TestComputedPropertiesQuery(unittest.TestCase): """Test to ensure escaping of non-ascii characters from partition key""" @@ -25,31 +26,33 @@ class TestComputedPropertiesQuery(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.client.create_database_if_not_exists(cls.TEST_DATABASE_ID) cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.items = [ - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'prefixOne', 'db_group': 'GroUp1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'prefixTwo', 'db_group': 'GrOUp1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord1', 'db_group': 'GroUp2'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord2', 'db_group': 'groUp1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord3', 'db_group': 'GroUp3'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord4', 'db_group': 'GrOUP1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord5', 'db_group': 'GroUp2'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 0, 'stringProperty': 'randomWord6', 'db_group': 'group1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 3, 'stringProperty': 'randomWord7', 'db_group': 'group2'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 2, 'stringProperty': 'randomWord8', 'db_group': 'GroUp3'} + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "prefixOne", "db_group": "GroUp1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "prefixTwo", "db_group": "GrOUp1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord1", "db_group": "GroUp2"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord2", "db_group": "groUp1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord3", "db_group": "GroUp3"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord4", "db_group": "GrOUP1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord5", "db_group": "GroUp2"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 0, "stringProperty": "randomWord6", "db_group": "group1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 3, "stringProperty": "randomWord7", "db_group": "group2"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 2, "stringProperty": "randomWord8", "db_group": "GroUp3"}, + ] + cls.computed_properties = [ + {"name": "cp_lower", "query": "SELECT VALUE LOWER(c.db_group) FROM c"}, + {"name": "cp_power", "query": "SELECT VALUE POWER(c.val, 2) FROM c"}, + {"name": "cp_str_len", "query": "SELECT VALUE LENGTH(c.stringProperty) FROM c"}, ] - cls.computed_properties = [{'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"}, - {'name': "cp_power", 'query': "SELECT VALUE POWER(c.val, 2) FROM c"}, - {'name': "cp_str_len", 'query': "SELECT VALUE LENGTH(c.stringProperty) FROM c"}] def computedPropertiesTestCases(self, created_collection): # Check that computed properties were properly sent @@ -57,38 +60,44 @@ def computedPropertiesTestCases(self, created_collection): # Test 0: Negative test, test if using non-existent computed property queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_upper = "GROUP2"', - partition_key="test")) + created_collection.query_items(query='Select * from c Where c.cp_upper = "GROUP2"', partition_key="test") + ) self.assertEqual(len(queried_items), 0) # Test 1: Test first computed property queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_lower = "group1"', partition_key="test")) + created_collection.query_items(query='Select * from c Where c.cp_lower = "group1"', partition_key="test") + ) self.assertEqual(len(queried_items), 5) # Test 1 Negative: Test if using non-existent string in group property returns nothing queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_lower = "group4"', partition_key="test")) + created_collection.query_items(query='Select * from c Where c.cp_lower = "group4"', partition_key="test") + ) self.assertEqual(len(queried_items), 0) # Test 2: Test second computed property queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_power = 25', partition_key="test")) + created_collection.query_items(query="Select * from c Where c.cp_power = 25", partition_key="test") + ) self.assertEqual(len(queried_items), 7) # Test 2 Negative: Test Non-Existent POWER queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_power = 16', partition_key="test")) + created_collection.query_items(query="Select * from c Where c.cp_power = 16", partition_key="test") + ) self.assertEqual(len(queried_items), 0) # Test 3: Test Third Computed Property queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_str_len = 9', partition_key="test")) + created_collection.query_items(query="Select * from c Where c.cp_str_len = 9", partition_key="test") + ) self.assertEqual(len(queried_items), 2) # Test 3 Negative: Test Str length that isn't there queried_items = list( - created_collection.query_items(query='Select * from c Where c.cp_str_len = 3', partition_key="test")) + created_collection.query_items(query="Select * from c Where c.cp_str_len = 3", partition_key="test") + ) self.assertEqual(len(queried_items), 0) def test_computed_properties_query(self): @@ -96,7 +105,8 @@ def test_computed_properties_query(self): created_collection = self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -109,7 +119,8 @@ def test_replace_with_same_computed_properties(self): created_collection = self.created_db.create_container( id="computed_properties_query_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -117,28 +128,29 @@ def test_replace_with_same_computed_properties(self): # Check that computed properties were properly sent self.assertListEqual(self.computed_properties, created_collection.read()["computedProperties"]) - replaced_collection= self.created_db.replace_container( + replaced_collection = self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties= self.computed_properties) + computed_properties=self.computed_properties, + ) self.computedPropertiesTestCases(replaced_collection) self.created_db.delete_container(replaced_collection.id) def test_replace_without_computed_properties(self): created_collection = self.created_db.create_container( - id="computed_properties_query_test_" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk")) + id="computed_properties_query_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") + ) # Create Items for item in self.items: created_collection.create_item(body=item) # Replace Container - replaced_collection= self.created_db.replace_container( + replaced_collection = self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties= self.computed_properties + computed_properties=self.computed_properties, ) self.computedPropertiesTestCases(replaced_collection) self.created_db.delete_container(replaced_collection.id) @@ -147,7 +159,8 @@ def test_replace_with_new_computed_properties(self): created_collection = self.created_db.create_container( id="computed_properties_query_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -156,56 +169,61 @@ def test_replace_with_new_computed_properties(self): # Check that computed properties were properly sent self.assertListEqual(self.computed_properties, created_collection.read()["computedProperties"]) - new_computed_properties = [{'name': "cp_upper", 'query': "SELECT VALUE UPPER(c.db_group) FROM c"}, - {'name': "cp_len", 'query': "SELECT VALUE LENGTH(c.stringProperty) FROM c"}] + new_computed_properties = [ + {"name": "cp_upper", "query": "SELECT VALUE UPPER(c.db_group) FROM c"}, + {"name": "cp_len", "query": "SELECT VALUE LENGTH(c.stringProperty) FROM c"}, + ] # Replace Container replaced_collection = self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties=new_computed_properties + computed_properties=new_computed_properties, ) # Check that computed properties were properly sent to replaced container self.assertListEqual(new_computed_properties, replaced_collection.read()["computedProperties"]) # Test 1: Test first computed property queried_items = list( - replaced_collection.query_items(query='Select * from c Where c.cp_upper = "GROUP2"', - partition_key="test")) + replaced_collection.query_items(query='Select * from c Where c.cp_upper = "GROUP2"', partition_key="test") + ) self.assertEqual(len(queried_items), 3) # Test 1 Negative: Test if using non-existent computed property name returns nothing queried_items = list( - replaced_collection.query_items(query='Select * from c Where c.cp_lower = "group1"', partition_key="test")) + replaced_collection.query_items(query='Select * from c Where c.cp_lower = "group1"', partition_key="test") + ) self.assertEqual(len(queried_items), 0) # Test 2: Test Second Computed Property queried_items = list( - replaced_collection.query_items(query='Select * from c Where c.cp_len = 9', partition_key="test")) + replaced_collection.query_items(query="Select * from c Where c.cp_len = 9", partition_key="test") + ) self.assertEqual(len(queried_items), 2) # Test 2 Negative: Test Str length using old computed properties name queried_items = list( - replaced_collection.query_items(query='Select * from c Where c.cp_str_len = 9', partition_key="test")) + replaced_collection.query_items(query="Select * from c Where c.cp_str_len = 9", partition_key="test") + ) self.assertEqual(len(queried_items), 0) self.created_db.delete_container(created_collection.id) def test_replace_with_incorrect_computed_properties(self): created_collection = self.created_db.create_container( - id="computed_properties_query_test_" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk")) + id="computed_properties_query_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") + ) # Create Items for item in self.items: created_collection.create_item(body=item) - computed_properties = {'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"} + computed_properties = {"name": "cp_lower", "query": "SELECT VALUE LOWER(c.db_group) FROM c"} try: # Replace Container with wrong type for computed_properties self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties= computed_properties + computed_properties=computed_properties, ) pytest.fail("Container creation should have failed for invalid input.") except exceptions.CosmosHttpResponseError as e: @@ -216,7 +234,8 @@ def test_replace_with_remove_computed_properties_(self): created_collection = self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -228,8 +247,8 @@ def test_replace_with_remove_computed_properties_(self): # Replace Container replaced_collection = self.created_db.replace_container( - container=created_collection.id, - partition_key=PartitionKey(path="/pk")) + container=created_collection.id, partition_key=PartitionKey(path="/pk") + ) # Check if computed properties were not set container = replaced_collection.read() @@ -238,5 +257,6 @@ def test_replace_with_remove_computed_properties_(self): with pytest.raises(KeyError): computed_properties = container["computedProperties"] + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_computed_properties_async.py b/sdk/cosmos/azure-cosmos/tests/test_computed_properties_async.py index 3b4a35a97318..d3db9fa6a79b 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_computed_properties_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_computed_properties_async.py @@ -10,6 +10,7 @@ from azure.cosmos.partition_key import PartitionKey import azure.cosmos.exceptions as exceptions + @pytest.mark.cosmosQuery class TestComputedPropertiesQueryAsync(unittest.IsolatedAsyncioTestCase): """Test to ensure escaping of non-ascii characters from partition key""" @@ -26,32 +27,34 @@ class TestComputedPropertiesQueryAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) await self.client.__aenter__() self.created_db = self.client.get_database_client(self.TEST_DATABASE_ID) self.items = [ - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'prefixOne', 'db_group': 'GroUp1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'prefixTwo', 'db_group': 'GrOUp1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord1', 'db_group': 'GroUp2'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord2', 'db_group': 'groUp1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord3', 'db_group': 'GroUp3'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord4', 'db_group': 'GrOUP1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5, 'stringProperty': 'randomWord5', 'db_group': 'GroUp2'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 0, 'stringProperty': 'randomWord6', 'db_group': 'group1'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 3, 'stringProperty': 'randomWord7', 'db_group': 'group2'}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 2, 'stringProperty': 'randomWord8', 'db_group': 'GroUp3'} + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "prefixOne", "db_group": "GroUp1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "prefixTwo", "db_group": "GrOUp1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord1", "db_group": "GroUp2"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord2", "db_group": "groUp1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord3", "db_group": "GroUp3"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord4", "db_group": "GrOUP1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5, "stringProperty": "randomWord5", "db_group": "GroUp2"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 0, "stringProperty": "randomWord6", "db_group": "group1"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 3, "stringProperty": "randomWord7", "db_group": "group2"}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 2, "stringProperty": "randomWord8", "db_group": "GroUp3"}, + ] + self.computed_properties = [ + {"name": "cp_lower", "query": "SELECT VALUE LOWER(c.db_group) FROM c"}, + {"name": "cp_power", "query": "SELECT VALUE POWER(c.val, 2) FROM c"}, + {"name": "cp_str_len", "query": "SELECT VALUE LENGTH(c.stringProperty) FROM c"}, ] - self.computed_properties = [{'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"}, - {'name': "cp_power", 'query': "SELECT VALUE POWER(c.val, 2) FROM c"}, - {'name': "cp_str_len", 'query': "SELECT VALUE LENGTH(c.stringProperty) FROM c"}] async def asyncTearDown(self): await self.client.close() @@ -62,49 +65,74 @@ async def computedPropertiesTestCases(self, created_collection): assert self.computed_properties == container["computedProperties"] # Test 0: Negative test, test if using non-existent computed property - queried_items = [q async for q in - created_collection.query_items(query='Select * from c Where c.cp_upper = "GROUP2"', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query='Select * from c Where c.cp_upper = "GROUP2"', partition_key="test" + ) + ] assert len(queried_items) == 0 # Test 1: Test first computed property - queried_items = [q async for q in - created_collection.query_items(query='Select * from c Where c.cp_lower = "group1"', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query='Select * from c Where c.cp_lower = "group1"', partition_key="test" + ) + ] assert len(queried_items) == 5 # Test 1 Negative: Test if using non-existent string in group property returns nothing - queried_items = [q async for q in - created_collection.query_items(query='Select * from c Where c.cp_lower = "group4"', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query='Select * from c Where c.cp_lower = "group4"', partition_key="test" + ) + ] assert len(queried_items) == 0 # Test 2: Test second computed property - queried_items = [q async for q in created_collection.query_items(query='Select * from c Where c.cp_power = 25', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query="Select * from c Where c.cp_power = 25", partition_key="test" + ) + ] assert len(queried_items) == 7 # Test 2 Negative: Test Non-Existent POWER - queried_items = [q async for q in created_collection.query_items(query='Select * from c Where c.cp_power = 16', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query="Select * from c Where c.cp_power = 16", partition_key="test" + ) + ] assert len(queried_items) == 0 # Test 3: Test Third Computed Property - queried_items = [q async for q in created_collection.query_items(query='Select * from c Where c.cp_str_len = 9', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query="Select * from c Where c.cp_str_len = 9", partition_key="test" + ) + ] assert len(queried_items) == 2 # Test 3 Negative: Test Str length that isn't there - queried_items = [q async for q in created_collection.query_items(query='Select * from c Where c.cp_str_len = 3', - partition_key="test")] + queried_items = [ + q + async for q in created_collection.query_items( + query="Select * from c Where c.cp_str_len = 3", partition_key="test" + ) + ] assert len(queried_items) == 0 - async def test_computed_properties_query_async(self): created_collection = await self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -113,12 +141,12 @@ async def test_computed_properties_query_async(self): await self.computedPropertiesTestCases(created_collection) await self.created_db.delete_container(created_collection.id) - async def test_replace_with_same_computed_properties_async(self): created_collection = await self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -128,7 +156,7 @@ async def test_replace_with_same_computed_properties_async(self): replaced_collection = await self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties=self.computed_properties + computed_properties=self.computed_properties, ) await self.computedPropertiesTestCases(replaced_collection) @@ -136,8 +164,8 @@ async def test_replace_with_same_computed_properties_async(self): async def test_replace_without_computed_properties_async(self): created_collection = await self.created_db.create_container( - "computed_properties_query_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) # Create Items for item in self.items: @@ -147,7 +175,7 @@ async def test_replace_without_computed_properties_async(self): replaced_collection = await self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties=self.computed_properties + computed_properties=self.computed_properties, ) await self.computedPropertiesTestCases(replaced_collection) @@ -157,7 +185,8 @@ async def test_replace_with_new_computed_properties_async(self): created_collection = await self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -167,14 +196,16 @@ async def test_replace_with_new_computed_properties_async(self): container = await created_collection.read() assert self.computed_properties == container["computedProperties"] - new_computed_properties = [{'name': "cp_upper", 'query': "SELECT VALUE UPPER(c.db_group) FROM c"}, - {'name': "cp_len", 'query': "SELECT VALUE LENGTH(c.stringProperty) FROM c"}] + new_computed_properties = [ + {"name": "cp_upper", "query": "SELECT VALUE UPPER(c.db_group) FROM c"}, + {"name": "cp_len", "query": "SELECT VALUE LENGTH(c.stringProperty) FROM c"}, + ] # Replace Container replaced_collection = await self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties=new_computed_properties + computed_properties=new_computed_properties, ) # Check if computed properties were set @@ -182,27 +213,39 @@ async def test_replace_with_new_computed_properties_async(self): assert new_computed_properties == container["computedProperties"] # Test 1: Test first computed property - queried_items = [q async for q in - replaced_collection.query_items(query='Select * from c Where c.cp_upper = "GROUP2"', - partition_key="test")] + queried_items = [ + q + async for q in replaced_collection.query_items( + query='Select * from c Where c.cp_upper = "GROUP2"', partition_key="test" + ) + ] self.assertEqual(len(queried_items), 3) # Test 1 Negative: Test if using non-existent computed property name returns nothing - queried_items = [q async for q in - replaced_collection.query_items(query='Select * from c Where c.cp_lower = "group1"', - partition_key="test")] + queried_items = [ + q + async for q in replaced_collection.query_items( + query='Select * from c Where c.cp_lower = "group1"', partition_key="test" + ) + ] self.assertEqual(len(queried_items), 0) # Test 2: Test Second Computed Property - queried_items = [q async for q in - replaced_collection.query_items(query='Select * from c Where c.cp_len = 9', - partition_key="test")] + queried_items = [ + q + async for q in replaced_collection.query_items( + query="Select * from c Where c.cp_len = 9", partition_key="test" + ) + ] self.assertEqual(len(queried_items), 2) # Test 2 Negative: Test Str length using old computed properties name - queried_items = [q async for q in - replaced_collection.query_items(query='Select * from c Where c.cp_str_len = 9', - partition_key="test")] + queried_items = [ + q + async for q in replaced_collection.query_items( + query="Select * from c Where c.cp_str_len = 9", partition_key="test" + ) + ] self.assertEqual(len(queried_items), 0) await self.created_db.delete_container(created_collection.id) @@ -210,7 +253,8 @@ async def test_replace_with_incorrect_computed_properties_async(self): created_collection = await self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -220,14 +264,14 @@ async def test_replace_with_incorrect_computed_properties_async(self): container = await created_collection.read() assert self.computed_properties == container["computedProperties"] - new_computed_properties = {'name': "cp_lower", 'query': "SELECT VALUE LOWER(c.db_group) FROM c"} + new_computed_properties = {"name": "cp_lower", "query": "SELECT VALUE LOWER(c.db_group) FROM c"} try: # Replace Container with wrong type for computed_properties await self.created_db.replace_container( container=created_collection.id, partition_key=PartitionKey(path="/pk"), - computed_properties=new_computed_properties + computed_properties=new_computed_properties, ) pytest.fail("Container creation should have failed for invalid input.") except exceptions.CosmosHttpResponseError as e: @@ -238,7 +282,8 @@ async def test_replace_with_remove_computed_properties_async(self): created_collection = await self.created_db.create_container( "computed_properties_query_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), - computed_properties=self.computed_properties) + computed_properties=self.computed_properties, + ) # Create Items for item in self.items: @@ -250,8 +295,8 @@ async def test_replace_with_remove_computed_properties_async(self): # Replace Container replaced_collection = await self.created_db.replace_container( - container=created_collection.id, - partition_key=PartitionKey(path="/pk")) + container=created_collection.id, partition_key=PartitionKey(path="/pk") + ) # Check if computed properties were not set container = await replaced_collection.read() @@ -261,5 +306,6 @@ async def test_replace_with_remove_computed_properties_async(self): computed_properties = container["computedProperties"] await self.created_db.delete_container(created_collection.id) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_config.py b/sdk/cosmos/azure-cosmos/tests/test_config.py index 2e580f56cabc..e2de6a194f5e 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_config.py +++ b/sdk/cosmos/azure-cosmos/tests/test_config.py @@ -17,10 +17,14 @@ from azure.cosmos.cosmos_client import CosmosClient from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.http_constants import StatusCodes, HttpHeaders -from azure.cosmos.partition_key import (PartitionKey, _PartitionKeyKind, _PartitionKeyVersion, _Undefined, - NonePartitionKeyValue) -from azure.cosmos import (ContainerProxy, DatabaseProxy, documents, exceptions, - http_constants) +from azure.cosmos.partition_key import ( + PartitionKey, + _PartitionKeyKind, + _PartitionKeyVersion, + _Undefined, + NonePartitionKeyValue, +) +from azure.cosmos import ContainerProxy, DatabaseProxy, documents, exceptions, http_constants from devtools_testutils.azure_recorded_testcase import get_credential from devtools_testutils.helpers import is_live from typing import Sequence, Type, Union @@ -32,16 +36,18 @@ except: print("no urllib3") -SPLIT_TIMEOUT = 60*10 # timeout test at 10 minutes +SPLIT_TIMEOUT = 60 * 10 # timeout test at 10 minutes SLEEP_TIME = 30 # sleep for 30 seconds + class TestConfig(object): - local_host = 'https://localhost:8081/' + local_host = "https://localhost:8081/" # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Cosmos DB Emulator Key")] - masterKey = os.getenv('ACCOUNT_KEY', - 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==') - host = os.getenv('ACCOUNT_HOST', local_host) - connection_str = os.getenv('ACCOUNT_CONNECTION_STR', 'AccountEndpoint={};AccountKey={};'.format(host, masterKey)) + masterKey = os.getenv( + "ACCOUNT_KEY", "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" + ) + host = os.getenv("ACCOUNT_HOST", local_host) + connection_str = os.getenv("ACCOUNT_CONNECTION_STR", "AccountEndpoint={};AccountKey={};".format(host, masterKey)) connectionPolicy = documents.ConnectionPolicy() connectionPolicy.DisableSSLVerification = True @@ -50,21 +56,21 @@ class TestConfig(object): credential = masterKey if is_emulator else get_credential() credential_async = masterKey if is_emulator else get_credential(is_async=True) - global_host = os.getenv('GLOBAL_ACCOUNT_HOST', host) - write_location_host = os.getenv('WRITE_LOCATION_HOST', host) - read_location_host = os.getenv('READ_LOCATION_HOST', host) - read_location2_host = os.getenv('READ_LOCATION_HOST2', host) - global_masterKey = os.getenv('GLOBAL_ACCOUNT_KEY', masterKey) + global_host = os.getenv("GLOBAL_ACCOUNT_HOST", host) + write_location_host = os.getenv("WRITE_LOCATION_HOST", host) + read_location_host = os.getenv("READ_LOCATION_HOST", host) + read_location2_host = os.getenv("READ_LOCATION_HOST2", host) + global_masterKey = os.getenv("GLOBAL_ACCOUNT_KEY", masterKey) - write_location = os.getenv('WRITE_LOCATION', host) - read_location = os.getenv('READ_LOCATION', host) - read_location2 = os.getenv('READ_LOCATION2', host) + write_location = os.getenv("WRITE_LOCATION", host) + read_location = os.getenv("READ_LOCATION", host) + read_location2 = os.getenv("READ_LOCATION2", host) THROUGHPUT_FOR_5_PARTITIONS = 30000 THROUGHPUT_FOR_2_PARTITIONS = 12000 THROUGHPUT_FOR_1_PARTITION = 400 - TEST_DATABASE_ID = os.getenv('COSMOS_TEST_DATABASE_ID', "PythonSDKTestDatabase-" + str(uuid.uuid4())) + TEST_DATABASE_ID = os.getenv("COSMOS_TEST_DATABASE_ID", "PythonSDKTestDatabase-" + str(uuid.uuid4())) TEST_SINGLE_PARTITION_CONTAINER_ID = "SinglePartitionTestContainer-" + str(uuid.uuid4()) TEST_MULTI_PARTITION_CONTAINER_ID = "MultiPartitionTestContainer-" + str(uuid.uuid4()) @@ -73,7 +79,7 @@ class TestConfig(object): TEST_CONTAINER_PARTITION_KEY = "pk" TEST_CONTAINER_PREFIX_PARTITION_KEY = ["pk1", "pk2"] - TEST_CONTAINER_PREFIX_PARTITION_KEY_PATH = ['/pk1', '/pk2'] + TEST_CONTAINER_PREFIX_PARTITION_KEY_PATH = ["/pk1", "/pk2"] # these will be populated by the get_account_info method WRITE_LOCATION = "" @@ -90,8 +96,9 @@ def get_account_info(cls, client: CosmosClient): @classmethod def create_database_if_not_exist(cls, client): # type: (CosmosClient) -> DatabaseProxy - test_database = client.create_database_if_not_exists(cls.TEST_DATABASE_ID, - offer_throughput=cls.THROUGHPUT_FOR_1_PARTITION) + test_database = client.create_database_if_not_exists( + cls.TEST_DATABASE_ID, offer_throughput=cls.THROUGHPUT_FOR_1_PARTITION + ) return test_database @classmethod @@ -100,8 +107,9 @@ def create_single_partition_container_if_not_exist(cls, client): database = cls.create_database_if_not_exist(client) document_collection = database.create_container_if_not_exists( id=cls.TEST_SINGLE_PARTITION_CONTAINER_ID, - partition_key=PartitionKey(path='/' + cls.TEST_CONTAINER_PARTITION_KEY, kind='Hash'), - offer_throughput=cls.THROUGHPUT_FOR_1_PARTITION) + partition_key=PartitionKey(path="/" + cls.TEST_CONTAINER_PARTITION_KEY, kind="Hash"), + offer_throughput=cls.THROUGHPUT_FOR_1_PARTITION, + ) return document_collection @classmethod @@ -110,8 +118,9 @@ def create_multi_partition_container_if_not_exist(cls, client): database = cls.create_database_if_not_exist(client) document_collection = database.create_container_if_not_exists( id=cls.TEST_MULTI_PARTITION_CONTAINER_ID, - partition_key=PartitionKey(path='/' + cls.TEST_CONTAINER_PARTITION_KEY, kind='Hash'), - offer_throughput=cls.THROUGHPUT_FOR_5_PARTITIONS) + partition_key=PartitionKey(path="/" + cls.TEST_CONTAINER_PARTITION_KEY, kind="Hash"), + offer_throughput=cls.THROUGHPUT_FOR_5_PARTITIONS, + ) return document_collection @classmethod @@ -120,8 +129,9 @@ def create_single_partition_prefix_pk_container_if_not_exist(cls, client): database = cls.create_database_if_not_exist(client) document_collection = database.create_container_if_not_exists( id=cls.TEST_SINGLE_PARTITION_PREFIX_PK_CONTAINER_ID, - partition_key=PartitionKey(path=cls.TEST_CONTAINER_PREFIX_PARTITION_KEY_PATH, kind='MultiHash'), - offer_throughput=cls.THROUGHPUT_FOR_1_PARTITION) + partition_key=PartitionKey(path=cls.TEST_CONTAINER_PREFIX_PARTITION_KEY_PATH, kind="MultiHash"), + offer_throughput=cls.THROUGHPUT_FOR_1_PARTITION, + ) return document_collection @classmethod @@ -130,8 +140,9 @@ def create_multi_partition_prefix_pk_container_if_not_exist(cls, client): database = cls.create_database_if_not_exist(client) document_collection = database.create_container_if_not_exists( id=cls.TEST_MULTI_PARTITION_PREFIX_PK_CONTAINER_ID, - partition_key=PartitionKey(path=cls.TEST_CONTAINER_PREFIX_PARTITION_KEY_PATH, kind='MultiHash'), - offer_throughput=cls.THROUGHPUT_FOR_5_PARTITIONS) + partition_key=PartitionKey(path=cls.TEST_CONTAINER_PREFIX_PARTITION_KEY_PATH, kind="MultiHash"), + offer_throughput=cls.THROUGHPUT_FOR_5_PARTITIONS, + ) return document_collection @classmethod @@ -207,18 +218,19 @@ def _get_order_by_docs(cls, documents_param, field1, field2): if field2 is None: return sorted(documents_param, key=lambda d: (d[field1] is not None, d[field1])) else: - return sorted(documents_param, - key=lambda d: (d[field1] is not None, d[field1], d[field2] is not None, d[field2])) + return sorted( + documents_param, key=lambda d: (d[field1] is not None, d[field1], d[field2] is not None, d[field2]) + ) @classmethod async def _validate_distinct_offset_limit(cls, created_collection, query, results): query_iterable = created_collection.query_items(query=query) - assert list(map(lambda doc: doc['value'], [item async for item in query_iterable])) == results + assert list(map(lambda doc: doc["value"], [item async for item in query_iterable])) == results @classmethod async def _validate_offset_limit(cls, created_collection, query, results): query_iterable = created_collection.query_items(query=query) - assert list(map(lambda doc: doc['pk'], [item async for item in query_iterable])) == results + assert list(map(lambda doc: doc["pk"], [item async for item in query_iterable])) == results @staticmethod def trigger_split(container, throughput): @@ -231,7 +243,7 @@ def trigger_split(container, throughput): while True: offer = container.get_throughput() - if offer.properties['content'].get('isOfferReplacePending', False): + if offer.properties["content"].get("isOfferReplacePending", False): if time.time() - start_time > SPLIT_TIMEOUT: # timeout test at 10 minutes raise unittest.SkipTest("Partition split didn't complete in time") else: @@ -252,7 +264,7 @@ async def trigger_split_async(container, throughput): while True: offer = await container.get_throughput() - if offer.properties['content'].get('isOfferReplacePending', False): + if offer.properties["content"].get("isOfferReplacePending", False): if time.time() - start_time > SPLIT_TIMEOUT: # timeout test at 10 minutes raise unittest.SkipTest("Partition split didn't complete in time") else: @@ -267,10 +279,8 @@ def get_vector_indexing_policy(embedding_type): return { "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], - 'excludedPaths': [{'path': '/"_etag"/?'}], - "vectorIndexes": [ - {"path": "/embedding", "type": f"{embedding_type}"} - ] + "excludedPaths": [{"path": '/"_etag"/?'}], + "vectorIndexes": [{"path": "/embedding", "type": f"{embedding_type}"}], } @@ -281,7 +291,7 @@ def get_vector_embedding_policy(distance_function, data_type, dimensions): "path": "/embedding", "dataType": f"{data_type}", "dimensions": dimensions, - "distanceFunction": f"{distance_function}" + "distanceFunction": f"{distance_function}", } ] } @@ -291,49 +301,43 @@ def get_full_text_indexing_policy(path): return { "indexingMode": "consistent", "includedPaths": [{"path": "/*"}], - 'excludedPaths': [{'path': '/"_etag"/?'}], - "fullTextIndexes": [ - {"path": path} - ] + "excludedPaths": [{"path": '/"_etag"/?'}], + "fullTextIndexes": [{"path": path}], } def get_full_text_policy(path): - return { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": path, - "language": "en-US" - } - ] - } + return {"defaultLanguage": "en-US", "fullTextPaths": [{"path": path, "language": "en-US"}]} + def get_test_item(): test_item = { - 'id': 'Item_' + str(uuid.uuid4()), - 'test_object': True, - 'lastName': 'Smith', - 'attr1': random.randint(0, 10) + "id": "Item_" + str(uuid.uuid4()), + "test_object": True, + "lastName": "Smith", + "attr1": random.randint(0, 10), } return test_item + def pre_split_hook(response): request_headers = response.http_request.headers - session_token = request_headers.get('x-ms-session-token') + session_token = request_headers.get("x-ms-session-token") assert len(session_token) <= 20 - assert session_token.startswith('0') - assert session_token.count(':') == 1 - assert session_token.count(',') == 0 + assert session_token.startswith("0") + assert session_token.count(":") == 1 + assert session_token.count(",") == 0 + def post_split_hook(response): request_headers = response.http_request.headers - session_token = request_headers.get('x-ms-session-token') + session_token = request_headers.get("x-ms-session-token") assert len(session_token) > 30 - assert len(session_token) < 60 # should only be 0-1 or 0-2, not 0-1-2 - assert session_token.startswith('0') is False - assert session_token.count(':') == 2 - assert session_token.count(',') == 1 + assert len(session_token) < 60 # should only be 0-1 or 0-2, not 0-1-2 + assert session_token.startswith("0") is False + assert session_token.count(":") == 2 + assert session_token.count(",") == 1 + class ResponseHookCaller: def __init__(self): @@ -366,10 +370,12 @@ def __init__(self, headers=None, status_code=200, message="test-message"): def body(self): return None + def no_token_response_hook(raw_response): request_headers = raw_response.http_request.headers assert request_headers.get(HttpHeaders.SessionToken) is None + def token_response_hook(raw_response): request_headers = raw_response.http_request.headers assert request_headers.get(HttpHeaders.SessionToken) is not None @@ -386,12 +392,15 @@ def __init__(self, resource_type, error=None, **kwargs): def send(self, request): # background health checks could reset counter unintentionally - if request.http_request.headers.get(http_constants.HttpHeaders.ThinClientProxyResourceType) == self.resource_type: + if ( + request.http_request.headers.get(http_constants.HttpHeaders.ThinClientProxyResourceType) + == self.resource_type + ): self.counter = 0 - absolute_timeout = request.context.options.pop('timeout', None) - per_request_timeout = request.context.options.pop('connection_timeout', 0) - request_params = request.context.options.pop('request_params', None) - global_endpoint_manager = request.context.options.pop('global_endpoint_manager', None) + absolute_timeout = request.context.options.pop("timeout", None) + per_request_timeout = request.context.options.pop("connection_timeout", 0) + request_params = request.context.options.pop("request_params", None) + global_endpoint_manager = request.context.options.pop("global_endpoint_manager", None) retry_error = None retry_active = True response = None @@ -400,7 +409,10 @@ def send(self, request): start_time = time.time() try: # raise the passed in exception for the passed in resource + operation combination - if request.http_request.headers.get(http_constants.HttpHeaders.ThinClientProxyResourceType) == self.resource_type: + if ( + request.http_request.headers.get(http_constants.HttpHeaders.ThinClientProxyResourceType) + == self.resource_type + ): self.request_endpoints.append(request.http_request.url) if self.error: raise self.error @@ -414,16 +426,18 @@ def send(self, request): except exceptions.CosmosClientTimeoutError as timeout_error: timeout_error.inner_exception = retry_error timeout_error.response = response - timeout_error.history = retry_settings['history'] + timeout_error.history = retry_settings["history"] raise except ServiceRequestError as err: retry_error = err # the request ran into a socket timeout or failed to establish a new connection # since request wasn't sent, raise exception immediately to be dealt with in client retry policies # This logic is based on the _retry.py file from azure-core - if (not _has_database_account_header(request.http_request.headers) - and not request_params.healthy_tentative_location): - if retry_settings['connect'] > 0: + if ( + not _has_database_account_header(request.http_request.headers) + and not request_params.healthy_tentative_location + ): + if retry_settings["connect"] > 0: self.counter += 1 global_endpoint_manager.record_failure(request_params) retry_active = self.increment(retry_settings, response=request, error=err) @@ -434,12 +448,14 @@ def send(self, request): except ServiceResponseError as err: retry_error = err # Only read operations can be safely retried with ServiceResponseError - if (not _has_read_retryable_headers(request.http_request.headers) or - _has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + not _has_read_retryable_headers(request.http_request.headers) + or _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err # This logic is based on the _retry.py file from azure-core - if retry_settings['read'] > 0: + if retry_settings["read"] > 0: self.counter += 1 global_endpoint_manager.record_failure(request_params) retry_active = self.increment(retry_settings, response=request, error=err) @@ -451,10 +467,12 @@ def send(self, request): raise err except AzureError as err: retry_error = err - if (_has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err - if _has_read_retryable_headers(request.http_request.headers) and retry_settings['read'] > 0: + if _has_read_retryable_headers(request.http_request.headers) and retry_settings["read"] > 0: self.counter += 1 global_endpoint_manager.record_failure(request_params) retry_active = self.increment(retry_settings, response=request, error=err) @@ -465,14 +483,15 @@ def send(self, request): finally: end_time = time.time() if absolute_timeout: - absolute_timeout -= (end_time - start_time) + absolute_timeout -= end_time - start_time self.update_context(response.context, retry_settings) return response + class MockConnectionRetryPolicyAsync(AsyncRetryPolicy): - def __init__(self, resource_type, error = None, **kwargs): + def __init__(self, resource_type, error=None, **kwargs): self.resource_type = resource_type self.error = error self.counter = 0 @@ -493,10 +512,10 @@ async def send(self, request): :raises ~azure.core.exceptions.ClientAuthenticationError: Authentication failed. """ self.counter = 0 - absolute_timeout = request.context.options.pop('timeout', None) - per_request_timeout = request.context.options.pop('connection_timeout', 0) - request_params = request.context.options.pop('request_params', None) - global_endpoint_manager = request.context.options.pop('global_endpoint_manager', None) + absolute_timeout = request.context.options.pop("timeout", None) + per_request_timeout = request.context.options.pop("connection_timeout", 0) + request_params = request.context.options.pop("request_params", None) + global_endpoint_manager = request.context.options.pop("global_endpoint_manager", None) retry_error = None retry_active = True response = None @@ -504,8 +523,10 @@ async def send(self, request): while retry_active: start_time = time.time() try: - if request.http_request.headers.get( - http_constants.HttpHeaders.ThinClientProxyResourceType) == self.resource_type: + if ( + request.http_request.headers.get(http_constants.HttpHeaders.ThinClientProxyResourceType) + == self.resource_type + ): self.request_endpoints.append(request.http_request.url) if self.error: raise self.error @@ -519,15 +540,17 @@ async def send(self, request): except exceptions.CosmosClientTimeoutError as timeout_error: timeout_error.inner_exception = retry_error timeout_error.response = response - timeout_error.history = retry_settings['history'] + timeout_error.history = retry_settings["history"] raise except ServiceRequestError as err: retry_error = err # the request ran into a socket timeout or failed to establish a new connection # since request wasn't sent, raise exception immediately to be dealt with in client retry policies - if (not _has_database_account_header(request.http_request.headers) - and not request_params.healthy_tentative_location): - if retry_settings['connect'] > 0: + if ( + not _has_database_account_header(request.http_request.headers) + and not request_params.healthy_tentative_location + ): + if retry_settings["connect"] > 0: self.counter += 1 await global_endpoint_manager.record_failure(request_params) retry_active = self.increment(retry_settings, response=request, error=err) @@ -537,18 +560,21 @@ async def send(self, request): raise err except ServiceResponseError as err: retry_error = err - if (_has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err # Since this is ClientConnectionError, it is safe to be retried on both read and write requests try: # pylint: disable=networking-import-outside-azure-core-transport - from aiohttp.client_exceptions import ( - ClientConnectionError) - if (isinstance(err.inner_exception, ClientConnectionError) - or _has_read_retryable_headers(request.http_request.headers)): + from aiohttp.client_exceptions import ClientConnectionError + + if isinstance(err.inner_exception, ClientConnectionError) or _has_read_retryable_headers( + request.http_request.headers + ): # This logic is based on the _retry.py file from azure-core - if retry_settings['read'] > 0: + if retry_settings["read"] > 0: self.counter += 1 await global_endpoint_manager.record_failure(request_params) retry_active = self.increment(retry_settings, response=request, error=err) @@ -556,16 +582,18 @@ async def send(self, request): await self.sleep(retry_settings, request.context.transport) continue except ImportError: - raise err # pylint: disable=raise-missing-from + raise err # pylint: disable=raise-missing-from raise err except CosmosHttpResponseError as err: raise err except AzureError as err: retry_error = err - if (_has_database_account_header(request.http_request.headers) or - request_params.healthy_tentative_location): + if ( + _has_database_account_header(request.http_request.headers) + or request_params.healthy_tentative_location + ): raise err - if _has_read_retryable_headers(request.http_request.headers) and retry_settings['read'] > 0: + if _has_read_retryable_headers(request.http_request.headers) and retry_settings["read"] > 0: self.counter += 1 retry_active = self.increment(retry_settings, response=request, error=err) if retry_active: @@ -575,22 +603,24 @@ async def send(self, request): finally: end_time = time.time() if absolute_timeout: - absolute_timeout -= (end_time - start_time) + absolute_timeout -= end_time - start_time self.update_context(response.context, retry_settings) return response + def hash_partition_key_value( - pk_value: Sequence[Union[None, bool, int, float, str, _Undefined, Type[NonePartitionKeyValue]]], - kind: str = _PartitionKeyKind.HASH, - version: int = _PartitionKeyVersion.V2, - ): + pk_value: Sequence[Union[None, bool, int, float, str, _Undefined, Type[NonePartitionKeyValue]]], + kind: str = _PartitionKeyKind.HASH, + version: int = _PartitionKeyVersion.V2, +): return PartitionKey._get_hashed_partition_key_string( pk_value=pk_value, kind=kind, version=version, ) + def create_range(range_min: str, range_max: str, is_min_inclusive: bool = True, is_max_inclusive: bool = False): if range_max == range_min: range_max += "FF" @@ -601,6 +631,7 @@ def create_range(range_min: str, range_max: str, is_min_inclusive: bool = True, isMaxInclusive=is_max_inclusive, ) + def create_feed_range_in_dict(feed_range): return FeedRangeInternalEpk(feed_range).to_dict() diff --git a/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache.py b/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache.py index 77965f9a0e1f..e54a38710758 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache.py +++ b/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import copy import unittest import uuid @@ -18,8 +18,7 @@ @pytest.mark.cosmosLong class TestContainerPropertiesCache(unittest.TestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" configs = test_config.TestConfig host = configs.host @@ -27,15 +26,14 @@ class TestContainerPropertiesCache(unittest.TestCase): connectionPolicy = configs.connectionPolicy client: cosmos_client.CosmosClient = None - @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.databaseForTest = cls.client.create_database_if_not_exists(cls.configs.TEST_DATABASE_ID) @@ -47,8 +45,9 @@ def test_container_properties_cache(self): container_pk = "PK" # Create The Container try: - client.get_database_client(database_name).create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + client.get_database_client(database_name).create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -60,7 +59,8 @@ def test_container_properties_cache(self): # container properties. We test to check the cache is empty since we just created the container self.assertTrue(client.client_connection._container_properties_cache == {}) client.get_database_client(database_name).get_container_client(container_name).create_item( - body={'id': 'item1', container_pk: 'value'}) + body={"id": "item1", container_pk: "value"} + ) # Since the cache was empty, it should have called a container read to get properties. So now Cache should # be populated and available even when we don't have a container instance self.assertTrue(client.client_connection._container_properties_cache != {}) @@ -82,8 +82,9 @@ def test_container_recreate_create_upsert_replace_item(self): container2_pk = "partkey" # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -95,14 +96,15 @@ def test_container_recreate_create_upsert_replace_item(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # let's test create by replacing current container properties cache with old one client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) + created_container.create_item(body={"id": "item1", container2_pk: "val"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) # Do the same thing for upsert operation @@ -115,7 +117,7 @@ def test_container_recreate_create_upsert_replace_item(self): item = created_container.read_item("item1", partition_key="val") client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.replace_item(item=item, body={'id': 'item1', container2_pk: 'val'}) + created_container.replace_item(item=item, body={"id": "item1", container2_pk: "val"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -123,7 +125,7 @@ def test_container_recreate_create_upsert_replace_item(self): # This should result in an error of 400 as the container has been recreated. client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.create_item(body={'id': 'item3', container_pk: 'val'}) + created_container.create_item(body={"id": "item3", container_pk: "val"}) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 400) created_db.delete_container(container_name) @@ -136,8 +138,9 @@ def test_container_recreate_create_upsert_replace_item_sub_partitioning(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -149,27 +152,28 @@ def test_container_recreate_create_upsert_replace_item_sub_partitioning(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # let's test create by replacing current container properties cache with old one client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.create_item(body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) + created_container.create_item(body={"id": "item1", "county": "ventura", "city": "oxnard"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) # Do the same thing for upsert operation client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.upsert_item(dict(id="item2", county='Santa Barbara', city='Santa Barbara')) + created_container.upsert_item(dict(id="item2", county="Santa Barbara", city="Santa Barbara")) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) # Finally test replace item - item = created_container.read_item("item1", partition_key=['ventura', 'oxnard']) + item = created_container.read_item("item1", partition_key=["ventura", "oxnard"]) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.replace_item(item=item, body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) + created_container.replace_item(item=item, body={"id": "item1", "county": "ventura", "city": "oxnard"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -177,7 +181,7 @@ def test_container_recreate_create_upsert_replace_item_sub_partitioning(self): # This should result in an error of 400 as the container has been recreated. client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - created_container.create_item(body={'id': 'item3', 'country': 'USA', 'state': 'CA'}) + created_container.create_item(body={"id": "item3", "country": "USA", "state": "CA"}) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 400) created_db.delete_container(container_name) @@ -190,8 +194,9 @@ def test_offer_throughput_container_recreate(self): container2_pk = "partkey" # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk), offer_throughput=600) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk), offer_throughput=600 + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -200,8 +205,9 @@ def test_offer_throughput_container_recreate(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk), offer_throughput=800) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk), offer_throughput=800 + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # let's test offer throughput by replacing current container properties cache with old one @@ -231,8 +237,9 @@ def test_offer_throughput_container_recreate_sub_partition(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk), offer_throughput=600) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk), offer_throughput=600 + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -241,8 +248,9 @@ def test_offer_throughput_container_recreate_sub_partition(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk), offer_throughput=800) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk), offer_throughput=800 + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # let's test offer throughput by replacing current container properties cache with old one @@ -272,14 +280,15 @@ def test_container_recreate_read_item(self): container2_pk = "partkey" # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # create an item to read try: - item_to_read = created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - item_to_read2 = created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_read = created_container.create_item(body={"id": "item1", container_pk: "val"}) + item_to_read2 = created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -287,13 +296,14 @@ def test_container_recreate_read_item(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) - created_container.create_item(body={'id': 'item2', container2_pk: 'DifferentValue'}) + created_container.create_item(body={"id": "item1", container2_pk: "val"}) + created_container.create_item(body={"id": "item2", container2_pk: "DifferentValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) @@ -324,33 +334,35 @@ def test_container_recreate_read_item_sub_partition(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - item_to_read = created_container.create_item(body={'id': 'item1', 'country': 'USA', 'state': 'CA'}) - item_to_read2 = created_container.create_item(body={'id': 'item2', - 'country': 'MEX', - 'state': 'Michoacán'}) # cspell:disable-line + item_to_read = created_container.create_item(body={"id": "item1", "country": "USA", "state": "CA"}) + item_to_read2 = created_container.create_item( + body={"id": "item2", "country": "MEX", "state": "Michoacán"} + ) # cspell:disable-line except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) # Recreate container old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - created_container.create_item(body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) + created_container.create_item(body={"id": "item1", "county": "ventura", "city": "oxnard"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: # Cache will refresh but will error out since item no longer exists - created_container.read_item(item=item_to_read, partition_key=['USA', 'CA']) + created_container.read_item(item=item_to_read, partition_key=["USA", "CA"]) self.fail("Read should not succeed as item no longer exists.") except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 404) @@ -364,14 +376,15 @@ def test_container_recreate_delete_item(self): container2_pk = "partkey" # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # create items try: - item_to_delete = created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_delete = created_container.create_item(body={"id": "item1", container_pk: "val"}) + created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -379,19 +392,20 @@ def test_container_recreate_delete_item(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) - created_container.create_item(body={'id': 'item2', container2_pk: 'DifferentValue'}) + created_container.create_item(body={"id": "item1", container2_pk: "val"}) + created_container.create_item(body={"id": "item2", container2_pk: "DifferentValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) # Should fail as the item no longer exists try: - created_container.delete_item(item_to_delete, partition_key='val') + created_container.delete_item(item_to_delete, partition_key="val") except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 404) created_db.delete_container(container_name) @@ -404,15 +418,17 @@ def test_container_recreate_delete_item_sub_partition(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # create items try: - item_to_del = created_container.create_item(body={'id': 'item1', 'country': 'USA', 'state': 'CA'}) - created_container.create_item(body={'id': 'item2', - 'country': 'MEX', 'state': 'Michoacán'}) # cspell:disable-line + item_to_del = created_container.create_item(body={"id": "item1", "country": "USA", "state": "CA"}) + created_container.create_item( + body={"id": "item2", "country": "MEX", "state": "Michoacán"} + ) # cspell:disable-line except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -420,20 +436,20 @@ def test_container_recreate_delete_item_sub_partition(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - created_container.create_item(body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) - created_container.create_item(body={'id': 'item2', - 'county': 'santa barbara', 'city': 'santa barbara'}) + created_container.create_item(body={"id": "item1", "county": "ventura", "city": "oxnard"}) + created_container.create_item(body={"id": "item2", "county": "santa barbara", "city": "santa barbara"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) # Should fail as the item no longer exists try: - created_container.delete_item(item_to_del, partition_key=['USA', 'CA']) + created_container.delete_item(item_to_del, partition_key=["USA", "CA"]) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 404) created_db.delete_container(container_name) @@ -446,14 +462,15 @@ def test_container_recreate_query(self): container2_pk = "partkey" # Create The Container try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # create an item to read try: - item_to_read = created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - item_to_read2 = created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_read = created_container.create_item(body={"id": "item1", container_pk: "val"}) + item_to_read2 = created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -461,13 +478,14 @@ def test_container_recreate_query(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) - created_container.create_item(body={'id': 'item2', container2_pk: 'DifferentValue'}) + created_container.create_item(body={"id": "item1", container2_pk: "val"}) + created_container.create_item(body={"id": "item2", container2_pk: "DifferentValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) @@ -475,28 +493,29 @@ def test_container_recreate_query(self): # But queried items are not the same as their RID will be different try: query = "SELECT * FROM c WHERE c.id = @id" - parameters = [{"name": "@id", "value": item_to_read['id']}] - query_result = list(created_container.query_items(query=query, - parameters=parameters, - enable_cross_partition_query=True)) + parameters = [{"name": "@id", "value": item_to_read["id"]}] + query_result = list( + created_container.query_items(query=query, parameters=parameters, enable_cross_partition_query=True) + ) self.assertEqual(1, len(query_result)) except exceptions.CosmosHttpResponseError as e: self.fail("Query should still succeed as item has same id despite the RID not matching.") # Will succeed because item id and partition key value are the same as an existing one in the new container # But queried items are not the same as their RID will be different query = "SELECT * FROM c WHERE c.id = @id" - parameters = [{"name": "@id", "value": 'item1'}] + parameters = [{"name": "@id", "value": "item1"}] query_result = list( - created_container.query_items(query=query, parameters=parameters, enable_cross_partition_query=True)) + created_container.query_items(query=query, parameters=parameters, enable_cross_partition_query=True) + ) self.assertNotEqual(query_result[0], item_to_read) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: # Trying to query for item from old container will return empty query query = "SELECT * FROM c WHERE c.partKey = @partKey" - parameters = [{"name": "@partKey", "value": item_to_read2['PK']}] - query_result = list(created_container.query_items(query=query, - parameters=parameters, - enable_cross_partition_query=True)) + parameters = [{"name": "@partKey", "value": item_to_read2["PK"]}] + query_result = list( + created_container.query_items(query=query, parameters=parameters, enable_cross_partition_query=True) + ) self.assertEqual(0, len(query_result)) except exceptions.CosmosHttpResponseError as e: self.fail("Query should still succeed if container is recreated.") @@ -511,8 +530,9 @@ def test_container_recreate_transactional_batch(self): # Create The Container try: - created_container = created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -521,8 +541,9 @@ def test_container_recreate_transactional_batch(self): for i in range(100): batch_operations.append(("create", ({"id": "item" + str(i), container_pk: "Microsoft"},))) - batch_response = created_container.execute_item_batch(batch_operations=batch_operations, - partition_key="Microsoft") + batch_response = created_container.execute_item_batch( + batch_operations=batch_operations, partition_key="Microsoft" + ) self.assertEqual(len(batch_response), 100) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -531,8 +552,9 @@ def test_container_recreate_transactional_batch(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container2_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -543,8 +565,9 @@ def test_container_recreate_transactional_batch(self): for i in range(100): batch_operations.append(("create", ({"id": "item" + str(i), container2_pk: "Microsoft"},))) - batch_response = created_container.execute_item_batch(batch_operations=batch_operations, - partition_key="Microsoft") + batch_response = created_container.execute_item_batch( + batch_operations=batch_operations, partition_key="Microsoft" + ) self.assertEqual(len(batch_response), 100) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -553,8 +576,9 @@ def test_container_recreate_transactional_batch(self): client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: batch_operations = [("create", ({"id": "item" + str(101), container2_pk: "Microsoft"},))] - batch_response = created_container.execute_item_batch(batch_operations=batch_operations, - partition_key="Microsoft") + batch_response = created_container.execute_item_batch( + batch_operations=batch_operations, partition_key="Microsoft" + ) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 400) @@ -568,15 +592,16 @@ def test_container_recreate_change_feed(self): # Create the container try: - created_container = created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container should not already exist.") # Create initial items try: - item_to_read = created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - item_to_read2 = created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_read = created_container.create_item(body={"id": "item1", container_pk: "val"}) + item_to_read2 = created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -584,36 +609,37 @@ def test_container_recreate_change_feed(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) created_db.delete_container(created_container) try: - created_container = created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container_pk)) + created_container = created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container should not already exist.") # Create new items in the recreated container try: - new_item1 = created_container.create_item(body={'id': 'item3', container_pk: 'newVal'}) - new_item2 = created_container.create_item(body={'id': 'item4', container_pk: 'newOtherValue'}) + new_item1 = created_container.create_item(body={"id": "item3", container_pk: "newVal"}) + new_item2 = created_container.create_item(body={"id": "item4", container_pk: "newOtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) # Query change feed for the new items - change_feed = list(created_container.query_items_change_feed(start_time='Beginning')) + change_feed = list(created_container.query_items_change_feed(start_time="Beginning")) self.assertEqual(len(change_feed), 2) # Verify that the change feed contains the new items - self.assertTrue(any(item['id'] == 'item3' and item[container_pk] == 'newVal' for item in change_feed)) - self.assertTrue(any(item['id'] == 'item4' and item[container_pk] == 'newOtherValue' for item in change_feed)) + self.assertTrue(any(item["id"] == "item3" and item[container_pk] == "newVal" for item in change_feed)) + self.assertTrue(any(item["id"] == "item4" and item[container_pk] == "newOtherValue" for item in change_feed)) # Verify that the change feed does not contain the old items - self.assertFalse(any(item['id'] == 'item1' and item[container_pk] == 'val' for item in change_feed)) - self.assertFalse(any(item['id'] == 'item2' and item[container_pk] == 'OtherValue' for item in change_feed)) + self.assertFalse(any(item["id"] == "item1" and item[container_pk] == "val" for item in change_feed)) + self.assertFalse(any(item["id"] == "item2" and item[container_pk] == "OtherValue" for item in change_feed)) created_db.delete_container(container_name) -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: diff --git a/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache_async.py b/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache_async.py index 687e6a90d050..6ec27524a670 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_container_properties_cache_async.py @@ -2,8 +2,7 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" import copy import unittest @@ -19,8 +18,7 @@ @pytest.mark.cosmosLong class TestContainerPropertiesCache(unittest.IsolatedAsyncioTestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" client: CosmosClient = None configs = test_config.TestConfig @@ -31,12 +29,12 @@ class TestContainerPropertiesCache(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -54,8 +52,9 @@ async def test_container_properties_cache_async(self): container_pk = "PK" # Create The Container try: - await client.get_database_client(database_name).create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + await client.get_database_client(database_name).create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -67,7 +66,8 @@ async def test_container_properties_cache_async(self): # container properties. We test to check the cache is empty since we just created the container assert client.client_connection._container_properties_cache == {} await client.get_database_client(database_name).get_container_client(container_name).create_item( - body={'id': 'item1', container_pk: 'value'}) + body={"id": "item1", container_pk: "value"} + ) # Since the cache was empty, it should have called a container read to get properties. So now Cache should # be populated and available even when we don't have a container instance assert client.client_connection._container_properties_cache != {} @@ -89,8 +89,7 @@ async def test_container_recreate_create_upsert_replace_item_async(self): container2_pk = "partkey" # Create The Container try: - await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + await created_db.create_container(id=container_name, partition_key=PartitionKey(path="/" + container_pk)) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -102,15 +101,15 @@ async def test_container_recreate_create_upsert_replace_item_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(container_name) try: - await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + await created_db.create_container(id=container_name, partition_key=PartitionKey(path="/" + container2_pk)) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # let's test create by replacing current container properties cache with old one client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: await created_db.get_container_client(container_name).create_item( - body={'id': 'item1', container2_pk: 'val'}) + body={"id": "item1", container2_pk: "val"} + ) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) # Do the same thing for upsert operation @@ -123,8 +122,9 @@ async def test_container_recreate_create_upsert_replace_item_async(self): item = await created_db.get_container_client(container_name).read_item("item1", partition_key="val") client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - await created_db.get_container_client(container_name).replace_item(item=item, body={'id': 'item1', - container2_pk: 'val'}) + await created_db.get_container_client(container_name).replace_item( + item=item, body={"id": "item1", container2_pk: "val"} + ) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -132,7 +132,7 @@ async def test_container_recreate_create_upsert_replace_item_async(self): # This should result in an error of 400 as the container has been recreated. client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - await created_db.get_container_client(container_name).create_item(body={'id': 'item3', container_pk: 'val'}) + await created_db.get_container_client(container_name).create_item(body={"id": "item3", container_pk: "val"}) except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 await created_db.delete_container(container_name) @@ -145,8 +145,7 @@ async def test_container_recreate_create_upsert_replace_item_sub_partitioning_as container2_pk = ["/county", "/city"] # Create The Container try: - await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk)) + await created_db.create_container(id=container_name, partition_key=PartitionKey(path=container_pk)) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." @@ -158,32 +157,34 @@ async def test_container_recreate_create_upsert_replace_item_sub_partitioning_as old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(container_name) try: - await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk)) + await created_db.create_container(id=container_name, partition_key=PartitionKey(path=container2_pk)) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." # let's test create by replacing current container properties cache with old one client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: await created_db.get_container_client(container_name).create_item( - body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) + body={"id": "item1", "county": "ventura", "city": "oxnard"} + ) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) # Do the same thing for upsert operation client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: await created_db.get_container_client(container_name).upsert_item( - dict(id="item2", county='Santa Barbara', city='Santa Barbara')) + dict(id="item2", county="Santa Barbara", city="Santa Barbara") + ) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) # Finally test replace item - item = await created_db.get_container_client(container_name).read_item("item1", - partition_key=['ventura', 'oxnard']) + item = await created_db.get_container_client(container_name).read_item( + "item1", partition_key=["ventura", "oxnard"] + ) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: - await created_db.get_container_client(container_name).replace_item(item=item, - body={'id': 'item1', 'county': 'ventura', - 'city': 'oxnard'}) + await created_db.get_container_client(container_name).replace_item( + item=item, body={"id": "item1", "county": "ventura", "city": "oxnard"} + ) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) @@ -192,7 +193,8 @@ async def test_container_recreate_create_upsert_replace_item_sub_partitioning_as client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: await created_db.get_container_client(container_name).create_item( - body={'id': 'item3', 'country': 'USA', 'state': 'CA'}) + body={"id": "item3", "country": "USA", "state": "CA"} + ) except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400, "Expected status code 400" await created_db.delete_container(container_name) @@ -205,8 +207,9 @@ async def test_offer_throughput_container_recreate_async(self): container2_pk = "partkey" # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk), offer_throughput=600) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk), offer_throughput=600 + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." @@ -214,8 +217,9 @@ async def test_offer_throughput_container_recreate_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk), offer_throughput=800) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk), offer_throughput=800 + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." @@ -246,8 +250,9 @@ async def test_offer_throughput_container_recreate_sub_partition_async(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk), offer_throughput=600) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk), offer_throughput=600 + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." @@ -255,8 +260,9 @@ async def test_offer_throughput_container_recreate_sub_partition_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk), offer_throughput=800) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk), offer_throughput=800 + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." @@ -287,14 +293,15 @@ async def test_container_recreate_read_item_async(self): container2_pk = "partkey" # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." # Create an item to read try: - item_to_read = await created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - item_to_read2 = await created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_read = await created_container.create_item(body={"id": "item1", container_pk: "val"}) + item_to_read2 = await created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) @@ -302,13 +309,14 @@ async def test_container_recreate_read_item_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." try: - await created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) - await created_container.create_item(body={'id': 'item2', container2_pk: 'DifferentValue'}) + await created_container.create_item(body={"id": "item1", container2_pk: "val"}) + await created_container.create_item(body={"id": "item2", container2_pk: "DifferentValue"}) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) @@ -339,14 +347,16 @@ async def test_container_recreate_read_item_sub_partition_async(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." try: - item_to_read = await created_container.create_item(body={'id': 'item1', 'country': 'USA', 'state': 'CA'}) + item_to_read = await created_container.create_item(body={"id": "item1", "country": "USA", "state": "CA"}) item_to_read2 = await created_container.create_item( - body={'id': 'item2', 'country': 'MEX', 'state': 'Michoacán'}) # cspell:disable-line + body={"id": "item2", "country": "MEX", "state": "Michoacán"} + ) # cspell:disable-line except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) @@ -354,18 +364,19 @@ async def test_container_recreate_read_item_sub_partition_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." try: - await created_container.create_item(body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) + await created_container.create_item(body={"id": "item1", "county": "ventura", "city": "oxnard"}) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: # Cache will refresh but will error out since the item no longer exists - await created_container.read_item(item=item_to_read, partition_key=['USA', 'CA']) + await created_container.read_item(item=item_to_read, partition_key=["USA", "CA"]) assert False, "Read should not succeed as item no longer exists." except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404 @@ -379,14 +390,15 @@ async def test_container_recreate_delete_item_async(self): container2_pk = "partkey" # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." # Create items try: - item_to_delete = await created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - await created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_delete = await created_container.create_item(body={"id": "item1", container_pk: "val"}) + await created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) @@ -394,19 +406,20 @@ async def test_container_recreate_delete_item_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." try: - await created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) - await created_container.create_item(body={'id': 'item2', container2_pk: 'DifferentValue'}) + await created_container.create_item(body={"id": "item1", container2_pk: "val"}) + await created_container.create_item(body={"id": "item2", container2_pk: "DifferentValue"}) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) # Should fail as the item no longer exists try: - await created_container.delete_item(item_to_delete, partition_key='val') + await created_container.delete_item(item_to_delete, partition_key="val") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404 await created_db.delete_container(container_name) @@ -419,16 +432,17 @@ async def test_container_recreate_delete_item_sub_partition_async(self): container2_pk = ["/county", "/city"] # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." # Create items try: - item_to_del = await created_container.create_item(body={'id': 'item1', 'country': 'USA', 'state': 'CA'}) - await created_container.create_item(body={'id': 'item2', - 'country': 'MEX', - 'state': 'Michoacán'}) # cspell:disable-line + item_to_del = await created_container.create_item(body={"id": "item1", "country": "USA", "state": "CA"}) + await created_container.create_item( + body={"id": "item2", "country": "MEX", "state": "Michoacán"} + ) # cspell:disable-line except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) @@ -436,20 +450,22 @@ async def test_container_recreate_delete_item_sub_partition_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path=container2_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path=container2_pk) + ) except exceptions.CosmosResourceExistsError: assert False, "Container Should not Already Exist." try: - await created_container.create_item(body={'id': 'item1', 'county': 'ventura', 'city': 'oxnard'}) + await created_container.create_item(body={"id": "item1", "county": "ventura", "city": "oxnard"}) await created_container.create_item( - body={'id': 'item2', 'county': 'santa barbara', 'city': 'santa barbara'}) + body={"id": "item2", "county": "santa barbara", "city": "santa barbara"} + ) except exceptions.CosmosHttpResponseError as e: assert False, "{}".format(e.http_error_message) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) # Should fail as the item no longer exists try: - await created_container.delete_item(item_to_del, partition_key=['USA', 'CA']) + await created_container.delete_item(item_to_del, partition_key=["USA", "CA"]) except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404 await created_db.delete_container(container_name) @@ -462,14 +478,15 @@ async def test_container_recreate_query_async(self): container2_pk = "partkey" # Create The Container try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") # create an item to read try: - item_to_read = await created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - item_to_read2 = await created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_read = await created_container.create_item(body={"id": "item1", container_pk: "val"}) + item_to_read2 = await created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -477,13 +494,14 @@ async def test_container_recreate_query_async(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, partition_key=PartitionKey( - path="/" + container2_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") try: - await created_container.create_item(body={'id': 'item1', container2_pk: 'val'}) - await created_container.create_item(body={'id': 'item2', container2_pk: 'DifferentValue'}) + await created_container.create_item(body={"id": "item1", container2_pk: "val"}) + await created_container.create_item(body={"id": "item2", container2_pk: "DifferentValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) @@ -491,26 +509,23 @@ async def test_container_recreate_query_async(self): # But queried items are not the same as their RID will be different try: query = "SELECT * FROM c WHERE c.id = @id" - parameters = [{"name": "@id", "value": item_to_read['id']}] - query_result = [item async for item in created_container.query_items(query=query, - parameters=parameters)] + parameters = [{"name": "@id", "value": item_to_read["id"]}] + query_result = [item async for item in created_container.query_items(query=query, parameters=parameters)] assert len(query_result) == 1 except exceptions.CosmosHttpResponseError as e: self.fail("Query should still succeed as item has same id despite the RID not matching.") # Will succeed because item id and partition key value are the same as an existing one in the new container # But queried items are not the same as their RID will be different query = "SELECT * FROM c WHERE c.id = @id" - parameters = [{"name": "@id", "value": 'item1'}] - query_result = [item async for item in created_container.query_items(query=query, - parameters=parameters)] + parameters = [{"name": "@id", "value": "item1"}] + query_result = [item async for item in created_container.query_items(query=query, parameters=parameters)] assert query_result[0] != item_to_read client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: # Trying to query for item from old container will return empty query query = "SELECT * FROM c WHERE c.partKey = @partKey" - parameters = [{"name": "@partKey", "value": item_to_read2['PK']}] - query_result = [item async for item in created_container.query_items(query=query, - parameters=parameters)] + parameters = [{"name": "@partKey", "value": item_to_read2["PK"]}] + query_result = [item async for item in created_container.query_items(query=query, parameters=parameters)] assert len(query_result) == 0 except exceptions.CosmosHttpResponseError as e: self.fail("Query should still succeed if container is recreated.") @@ -525,8 +540,9 @@ async def test_container_recreate_transactional_batch(self): # Create The Container try: - created_container = await created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -535,8 +551,9 @@ async def test_container_recreate_transactional_batch(self): for i in range(100): batch_operations.append(("create", ({"id": "item" + str(i), container_pk: "Microsoft"},))) - batch_response = await created_container.execute_item_batch(batch_operations=batch_operations, - partition_key="Microsoft") + batch_response = await created_container.execute_item_batch( + batch_operations=batch_operations, partition_key="Microsoft" + ) assert len(batch_response) == 100 except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -545,8 +562,9 @@ async def test_container_recreate_transactional_batch(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container2_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container2_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container Should not Already Exist.") @@ -557,8 +575,9 @@ async def test_container_recreate_transactional_batch(self): for i in range(100): batch_operations.append(("create", ({"id": "item" + str(i), container2_pk: "Microsoft"},))) - batch_response = await created_container.execute_item_batch(batch_operations=batch_operations, - partition_key="Microsoft") + batch_response = await created_container.execute_item_batch( + batch_operations=batch_operations, partition_key="Microsoft" + ) assert len(batch_response) == 100 except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -567,8 +586,9 @@ async def test_container_recreate_transactional_batch(self): client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) try: batch_operations = [("create", ({"id": "item" + str(101), container2_pk: "Microsoft"},))] - batch_response = await created_container.execute_item_batch(batch_operations=batch_operations, - partition_key="Microsoft") + batch_response = await created_container.execute_item_batch( + batch_operations=batch_operations, partition_key="Microsoft" + ) except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 @@ -582,15 +602,16 @@ async def test_container_recreate_change_feed(self): # Create the container try: - created_container = await created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container should not already exist.") # Create initial items try: - item_to_read = await created_container.create_item(body={'id': 'item1', container_pk: 'val'}) - item_to_read2 = await created_container.create_item(body={'id': 'item2', container_pk: 'OtherValue'}) + item_to_read = await created_container.create_item(body={"id": "item1", container_pk: "val"}) + item_to_read2 = await created_container.create_item(body={"id": "item2", container_pk: "OtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) @@ -598,34 +619,35 @@ async def test_container_recreate_change_feed(self): old_cache = copy.deepcopy(client.client_connection._CosmosClientConnection__container_properties_cache) await created_db.delete_container(created_container) try: - created_container = await created_db.create_container(id=container_name, - partition_key=PartitionKey(path="/" + container_pk)) + created_container = await created_db.create_container( + id=container_name, partition_key=PartitionKey(path="/" + container_pk) + ) except exceptions.CosmosResourceExistsError: self.fail("Container should not already exist.") # Create new items in the recreated container try: - new_item1 = await created_container.create_item(body={'id': 'item3', container_pk: 'newVal'}) - new_item2 = await created_container.create_item(body={'id': 'item4', container_pk: 'newOtherValue'}) + new_item1 = await created_container.create_item(body={"id": "item3", container_pk: "newVal"}) + new_item2 = await created_container.create_item(body={"id": "item4", container_pk: "newOtherValue"}) except exceptions.CosmosHttpResponseError as e: self.fail("{}".format(e.http_error_message)) client.client_connection._CosmosClientConnection__container_properties_cache = copy.deepcopy(old_cache) # Query change feed for the new items - change_feed = [item async for item in created_container.query_items_change_feed(start_time='Beginning')] + change_feed = [item async for item in created_container.query_items_change_feed(start_time="Beginning")] assert len(change_feed) == 2 # Verify that the change feed contains the new items - assert any(item['id'] == 'item3' and item[container_pk] == 'newVal' for item in change_feed) - assert any(item['id'] == 'item4' and item[container_pk] == 'newOtherValue' for item in change_feed) + assert any(item["id"] == "item3" and item[container_pk] == "newVal" for item in change_feed) + assert any(item["id"] == "item4" and item[container_pk] == "newOtherValue" for item in change_feed) # Verify that the change feed does not contain the old items - assert not any(item['id'] == 'item1' and item[container_pk] == 'val' for item in change_feed) - assert not any(item['id'] == 'item2' and item[container_pk] == 'OtherValue' for item in change_feed) + assert not any(item["id"] == "item1" and item[container_pk] == "val" for item in change_feed) + assert not any(item["id"] == "item2" and item[container_pk] == "OtherValue" for item in change_feed) await created_db.delete_container(container_name) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy.py b/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy.py index bbd9089d23a7..83e7da871824 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy.py @@ -3,6 +3,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. """Tests for the CosmosHttpLoggingPolicy.""" + import logging import unittest import uuid @@ -26,18 +27,17 @@ class FilterStatusCode(logging.Filter): def filter(self, record): - if hasattr(record, 'status_code') and record.status_code >= 400: + if hasattr(record, "status_code") and record.status_code >= 400: return True return False + CONFIG = test_config.TestConfig L1 = "Location1" L2 = "Location2" L1_URL = test_config.TestConfig.local_host L2_URL = L1_URL.replace("localhost", "127.0.0.1") -URL_TO_LOCATIONS = { - L1_URL: L1, - L2_URL: L2} +URL_TO_LOCATIONS = {L1_URL: L1, L2_URL: L2} def create_logger(name: str, mock_handler: test_config.MockHandler, level: int = logging.INFO) -> logging.Logger: @@ -47,15 +47,17 @@ def create_logger(name: str, mock_handler: test_config.MockHandler, level: int = return logger + def get_locations_list(msg: str) -> List[str]: - msg = msg.replace(' ', '') - msg = msg.replace('\'', '') + msg = msg.replace(" ", "") + msg = msg.replace("'", "") # Find the substring between the first '[' and the last ']' - start = msg.find('[') + 1 - end = msg.rfind(']') + start = msg.find("[") + 1 + end = msg.rfind("]") # Extract the substring and convert it to a list using ast.literal_eval msg = msg[start:end] - return msg.split(',') + return msg.split(",") + @pytest.mark.cosmosEmulator class TestCosmosHttpLogger(unittest.TestCase): @@ -70,12 +72,12 @@ class TestCosmosHttpLogger(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.mock_handler_default = test_config.MockHandler() cls.mock_handler_diagnostic = test_config.MockHandler() cls.mock_handler_filtered_diagnostic = test_config.MockHandler() @@ -85,22 +87,32 @@ def setUpClass(cls): cls.mock_handler_filtered_diagnostic.addFilter(FilterStatusCode()) cls.logger_default = create_logger("testloggerdefault", cls.mock_handler_default) cls.logger_diagnostic = create_logger("testloggerdiagnostic", cls.mock_handler_diagnostic) - cls.logger_filtered_diagnostic = create_logger("testloggerfiltereddiagnostic", - cls.mock_handler_filtered_diagnostic) - cls.client_default = cosmos_client.CosmosClient(cls.host, cls.masterKey, - consistency_level="Session", - connection_policy=cls.connectionPolicy, - logger=cls.logger_default) - cls.client_diagnostic = cosmos_client.CosmosClient(cls.host, cls.masterKey, - consistency_level="Session", - connection_policy=cls.connectionPolicy, - logger=cls.logger_diagnostic, - enable_diagnostics_logging=True) - cls.client_filtered_diagnostic = cosmos_client.CosmosClient(cls.host, cls.masterKey, - consistency_level="Session", - connection_policy=cls.connectionPolicy, - logger=cls.logger_filtered_diagnostic, - enable_diagnostics_logging=True) + cls.logger_filtered_diagnostic = create_logger( + "testloggerfiltereddiagnostic", cls.mock_handler_filtered_diagnostic + ) + cls.client_default = cosmos_client.CosmosClient( + cls.host, + cls.masterKey, + consistency_level="Session", + connection_policy=cls.connectionPolicy, + logger=cls.logger_default, + ) + cls.client_diagnostic = cosmos_client.CosmosClient( + cls.host, + cls.masterKey, + consistency_level="Session", + connection_policy=cls.connectionPolicy, + logger=cls.logger_diagnostic, + enable_diagnostics_logging=True, + ) + cls.client_filtered_diagnostic = cosmos_client.CosmosClient( + cls.host, + cls.masterKey, + consistency_level="Session", + connection_policy=cls.connectionPolicy, + logger=cls.logger_filtered_diagnostic, + enable_diagnostics_logging=True, + ) # Create a root logger with a mock handler and a filter for status codes above 400 cls.root_mock_handler = test_config.MockHandler() @@ -118,21 +130,21 @@ def setUpClass(cls): consistency_level="Session", connection_policy=cls.connectionPolicy, logger=cls.root_logger_grandchild, - enable_diagnostics_logging=True + enable_diagnostics_logging=True, ) def test_default_http_logging_policy(self): # Test if we can log into from creating a database database_id = "database_test-" + str(uuid.uuid4()) self.client_default.create_database(id=database_id) - assert all(m.levelname == 'INFO' for m in self.mock_handler_default.messages) + assert all(m.levelname == "INFO" for m in self.mock_handler_default.messages) messages_request = self.mock_handler_default.messages[0].message.split("\n") messages_response = self.mock_handler_default.messages[1].message.split("\n") assert messages_request[1] == "Request method: 'GET'" - assert 'Request headers:' in messages_request[2] - assert messages_request[-1] == 'No body was attached to the request' - assert messages_response[0] == 'Response status: 200' - assert 'Response headers:' in messages_response[1] + assert "Request headers:" in messages_request[2] + assert messages_request[-1] == "No body was attached to the request" + assert messages_response[0] == "Response status: 200" + assert "Response headers:" in messages_response[1] self.mock_handler_default.reset() @@ -143,7 +155,7 @@ def test_cosmos_http_logging_policy(self): # Test if we can log info from reading a database database_id = "database_test-" + str(uuid.uuid4()) self.client_diagnostic.create_database(id=database_id) - assert all(m.levelname == 'INFO' for m in self.mock_handler_diagnostic.messages) + assert all(m.levelname == "INFO" for m in self.mock_handler_diagnostic.messages) # Check that we made a databaseaccount read request only once and that we only logged it once messages_request = self.mock_handler_diagnostic.messages[0] messages_response = self.mock_handler_diagnostic.messages[1] @@ -174,14 +186,14 @@ def test_cosmos_http_logging_policy(self): self.client_diagnostic.create_database(id=database_id) except: pass - assert all(m.levelname == 'INFO' for m in self.mock_handler_diagnostic.messages) + assert all(m.levelname == "INFO" for m in self.mock_handler_diagnostic.messages) messages_request = self.mock_handler_diagnostic.messages[0] messages_response = self.mock_handler_diagnostic.messages[1] elapsed_time = messages_response.duration assert "dbs" == messages_request.resource_type assert messages_request.operation_type == "Create" - assert 'Request headers:' in messages_request.msg - assert 'A body is sent with the request' in messages_request.msg + assert "Request headers:" in messages_request.msg + assert "A body is sent with the request" in messages_request.msg assert messages_response.status_code == 409 assert elapsed_time is not None assert "Response headers" in messages_response.msg @@ -245,9 +257,10 @@ def test_client_settings(self): logger = create_logger("test_logger_client_settings", mock_handler) custom_transport = FaultInjectionTransport() - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( first_region_name=L1, second_region_name=L2, @@ -255,9 +268,10 @@ def test_client_settings(self): first_region_url=L1_URL, second_region_url=L2_URL, ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) initialized_objects = TestFaultInjectionTransport.setup_method_with_custom_transport( custom_transport, @@ -268,13 +282,13 @@ def test_client_settings(self): preferred_locations=all_locations, excluded_locations=client_excluded_locations, multiple_write_locations=multiple_write_locations, - custom_logger=logger + custom_logger=logger, ) mock_handler.reset() # create an item id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, 'pk': id_value} + document_definition = {"id": id_value, "pk": id_value} container: ContainerProxy = initialized_objects["col"] container.create_item(body=document_definition) @@ -306,7 +320,7 @@ def test_activity_id_logging_policy(self): consistency_level="Session", connection_policy=self.connectionPolicy, logger=self.logger_activity_id, - enable_diagnostics_logging=True + enable_diagnostics_logging=True, ) # Generate a custom activity ID @@ -354,19 +368,17 @@ def test_logging_exceptions_with_no_response(self): # Set up FaultInjectionTransport to inject a 502 error id_value = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} custom_transport = FaultInjectionTransport() predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_req_for_document_with_id( - r, id_value) - custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay( - 1000, - CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error."))) - + r, id_value + ) + custom_transport.add_fault( + predicate, + lambda r: FaultInjectionTransport.error_after_delay( + 1000, CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ), + ) # Initialize the client with the custom transport and logger initialized_objects = TestFaultInjectionTransport.setup_method_with_custom_transport( @@ -378,7 +390,7 @@ def test_logging_exceptions_with_no_response(self): preferred_locations=[L1, L2], excluded_locations=[], multiple_write_locations=True, - custom_logger=logger + custom_logger=logger, ) mock_handler.reset() @@ -420,5 +432,6 @@ def test_hierarchical_logger_with_filter(self): self.client_grandchild_logger.delete_database(database_id) self.root_mock_handler.reset() + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy_async.py b/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy_async.py index d607e940420c..52e150dee351 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_cosmos_http_logging_policy_async.py @@ -3,6 +3,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. """Tests for the CosmosHttpLoggingPolicy.""" + import asyncio import unittest import uuid @@ -17,14 +18,14 @@ from _fault_injection_transport_async import FaultInjectionTransportAsync from test_fault_injection_transport_async import TestFaultInjectionTransportAsync -from test_cosmos_http_logging_policy import create_logger, L1, L2, CONFIG, \ - get_locations_list, FilterStatusCode +from test_cosmos_http_logging_policy import create_logger, L1, L2, CONFIG, get_locations_list, FilterStatusCode try: from unittest.mock import Mock except ImportError: # python < 3.3 from mock import Mock # type: ignore + @pytest.mark.cosmosEmulator class TestCosmosHttpLoggerAsync(unittest.IsolatedAsyncioTestCase): mock_handler_diagnostic = None @@ -36,12 +37,12 @@ class TestCosmosHttpLoggerAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.mock_handler_default = test_config.MockHandler() @@ -76,21 +77,22 @@ async def asyncTearDown(self): async def test_default_http_logging_policy_async(self): self.logger.addHandler(self.mock_handler_default) # Create a client with the default logging policy - self.client_default = cosmos_client.CosmosClient(self.host, self.masterKey, - consistency_level="Session", logger=self.logger) + self.client_default = cosmos_client.CosmosClient( + self.host, self.masterKey, consistency_level="Session", logger=self.logger + ) await self.client_default.__aenter__() # Test if we can log info from creating a database database_id = "database_test-" + str(uuid.uuid4()) await self.client_default.create_database(id=database_id) - assert all(m.levelname == 'INFO' for m in self.mock_handler_default.messages) + assert all(m.levelname == "INFO" for m in self.mock_handler_default.messages) messages_request = self.mock_handler_default.messages[0].message.split("\n") messages_response = self.mock_handler_default.messages[1].message.split("\n") assert messages_request[1] == "Request method: 'GET'" - assert 'Request headers:' in messages_request[2] - assert messages_request[-1] == 'No body was attached to the request' - assert messages_response[0] == 'Response status: 200' - assert 'Response headers:' in messages_response[1] + assert "Request headers:" in messages_request[2] + assert messages_request[-1] == "No body was attached to the request" + assert messages_response[0] == "Response status: 200" + assert "Response headers:" in messages_response[1] self.mock_handler_default.reset() self.logger.removeHandler(self.mock_handler_default) @@ -101,16 +103,16 @@ async def test_default_http_logging_policy_async(self): async def test_cosmos_http_logging_policy_async(self): self.logger.addHandler(self.mock_handler_diagnostic) # Create a client with the diagnostic logging policy - self.client_diagnostic = cosmos_client.CosmosClient(self.host, self.masterKey, - consistency_level="Session", logger=self.logger, - enable_diagnostics_logging=True) + self.client_diagnostic = cosmos_client.CosmosClient( + self.host, self.masterKey, consistency_level="Session", logger=self.logger, enable_diagnostics_logging=True + ) await self.client_diagnostic.__aenter__() # give time to background health check to run await asyncio.sleep(1) # Test if we can log into from reading a database database_id = "database_test-" + str(uuid.uuid4()) await self.client_diagnostic.create_database(id=database_id) - assert all(m.levelname == 'INFO' for m in self.mock_handler_diagnostic.messages) + assert all(m.levelname == "INFO" for m in self.mock_handler_diagnostic.messages) # Check that we made a databaseaccount read request only once and that we only logged it once messages_request = self.mock_handler_diagnostic.messages[0] messages_response = self.mock_handler_diagnostic.messages[1] @@ -141,14 +143,14 @@ async def test_cosmos_http_logging_policy_async(self): await self.client_diagnostic.create_database(id=database_id) except: pass - assert all(m.levelname == 'INFO' for m in self.mock_handler_diagnostic.messages) + assert all(m.levelname == "INFO" for m in self.mock_handler_diagnostic.messages) messages_request = self.mock_handler_diagnostic.messages[0] messages_response = self.mock_handler_diagnostic.messages[1] elapsed_time = messages_response.duration assert "dbs" == messages_request.resource_type assert messages_request.operation_type == "Create" - assert 'Request headers:' in messages_request.msg - assert 'A body is sent with the request' in messages_request.msg + assert "Request headers:" in messages_request.msg + assert "A body is sent with the request" in messages_request.msg assert messages_response.status_code == 409 assert elapsed_time is not None assert "Response headers" in messages_response.msg @@ -162,10 +164,9 @@ async def test_cosmos_http_logging_policy_async(self): async def test_filtered_diagnostics_logging_policy_async(self): self.logger.addHandler(self.mock_handler_filtered_diagnostic) # Create a client with the filtered diagnostics logging policy - self.client_filtered_diagnostic = cosmos_client.CosmosClient(self.host, self.masterKey, - consistency_level="Session", - logger=self.logger, - enable_diagnostics_logging=True) + self.client_filtered_diagnostic = cosmos_client.CosmosClient( + self.host, self.masterKey, consistency_level="Session", logger=self.logger, enable_diagnostics_logging=True + ) # Test if we can log errors with the filtered diagnostics logger database_id = "database_test_" + str(uuid.uuid4()) container_id = "diagnostics_container_test_" + str(uuid.uuid4()) @@ -221,15 +222,16 @@ async def test_client_settings_async(self): custom_transport = FaultInjectionTransportAsync() is_get_account_predicate = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( first_region_name=L1, second_region_name=L2, inner=inner, ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( custom_transport, @@ -240,13 +242,13 @@ async def test_client_settings_async(self): custom_logger=logger, preferred_locations=all_locations, excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations + multiple_write_locations=multiple_write_locations, ) mock_handler.reset() # create an item id_value = str(uuid.uuid4()) - document_definition = {'id': id_value, 'pk': id_value} + document_definition = {"id": id_value, "pk": id_value} container = initialized_objects["col"] await container.create_item(body=document_definition) @@ -273,11 +275,7 @@ async def test_activity_id_logging_policy_async(self): # Create a new client with the logger and enable diagnostics logging self.client_activity_id = cosmos_client.CosmosClient( - self.host, - self.masterKey, - consistency_level="Session", - logger=self.logger, - enable_diagnostics_logging=True + self.host, self.masterKey, consistency_level="Session", logger=self.logger, enable_diagnostics_logging=True ) # Generate a custom activity ID custom_activity_id = str(uuid.uuid4()) @@ -326,17 +324,15 @@ async def test_logging_exceptions_with_no_response_async(self): # Set up FaultInjectionTransportAsync to inject a 502 error id_value = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} custom_transport = FaultInjectionTransportAsync() predicate = lambda r: FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, id_value) - custom_transport.add_fault(predicate, lambda r: FaultInjectionTransportAsync.error_after_delay( - 1000, - CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error."))) + custom_transport.add_fault( + predicate, + lambda r: FaultInjectionTransportAsync.error_after_delay( + 1000, CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ), + ) # Initialize the client with the custom transport and logger initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( @@ -348,7 +344,7 @@ async def test_logging_exceptions_with_no_response_async(self): preferred_locations=[L1, L2], excluded_locations=[], multiple_write_locations=True, - custom_logger=logger + custom_logger=logger, ) mock_handler.reset() @@ -382,7 +378,7 @@ async def test_hierarchical_logger_with_filter_async(self): self.masterKey, consistency_level="Session", logger=root_logger_grandchild, - enable_diagnostics_logging=True + enable_diagnostics_logging=True, ) # Reset the mock handler before the test diff --git a/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses.py b/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses.py index 5ad4a911146d..12a5bc99fdb0 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses.py +++ b/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses.py @@ -10,14 +10,13 @@ from azure.cosmos import CosmosClient, PartitionKey, ContainerProxy, DatabaseProxy from azure.cosmos.http_constants import HttpHeaders - # TODO: add more tests in this file once we have response headers in control plane operations # TODO: add query tests once those changes are available + @pytest.mark.cosmosEmulator class TestCosmosResponses(unittest.TestCase): - """Python Cosmos Responses Tests. - """ + """Python Cosmos Responses Tests.""" configs = test_config.TestConfig host = configs.host @@ -28,46 +27,47 @@ class TestCosmosResponses(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.test_database = cls.client.get_database_client(cls.TEST_DATABASE_ID) def test_point_operation_headers(self): - container = self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) first_response = container.upsert_item({"id": str(uuid.uuid4()), "company": "Microsoft"}) - lsn = first_response.get_response_headers()['lsn'] + lsn = first_response.get_response_headers()["lsn"] create_response = container.create_item({"id": str(uuid.uuid4()), "company": "Microsoft"}) assert len(create_response.get_response_headers()) > 0 - assert int(lsn) + 1 == int(create_response.get_response_headers()['lsn']) - lsn = create_response.get_response_headers()['lsn'] + assert int(lsn) + 1 == int(create_response.get_response_headers()["lsn"]) + lsn = create_response.get_response_headers()["lsn"] - read_response = container.read_item(create_response['id'], create_response['company']) + read_response = container.read_item(create_response["id"], create_response["company"]) assert len(read_response.get_response_headers()) > 0 upsert_response = container.upsert_item({"id": str(uuid.uuid4()), "company": "Microsoft"}) assert len(upsert_response.get_response_headers()) > 0 - assert int(lsn) + 1 == int(upsert_response.get_response_headers()['lsn']) - lsn = upsert_response.get_response_headers()['lsn'] + assert int(lsn) + 1 == int(upsert_response.get_response_headers()["lsn"]) + lsn = upsert_response.get_response_headers()["lsn"] - upsert_response['replace'] = True - replace_response = container.replace_item(upsert_response['id'], upsert_response) - assert replace_response['replace'] is not None + upsert_response["replace"] = True + replace_response = container.replace_item(upsert_response["id"], upsert_response) + assert replace_response["replace"] is not None assert len(replace_response.get_response_headers()) > 0 - assert int(lsn) + 1 == int(replace_response.get_response_headers()['lsn']) + assert int(lsn) + 1 == int(replace_response.get_response_headers()["lsn"]) batch = [] for i in range(50): batch.append(("create", ({"id": "item" + str(i), "company": "Microsoft"},))) batch_response = container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response.get_response_headers()) > 0 - assert int(lsn) + 1 < int(batch_response.get_response_headers()['lsn']) + assert int(lsn) + 1 < int(batch_response.get_response_headers()["lsn"]) def test_create_database_headers(self): first_response = self.client.create_database(id="responses_test" + str(uuid.uuid4()), return_properties=True) @@ -79,7 +79,9 @@ def test_create_database_returns_database_proxy(self): assert isinstance(first_response, DatabaseProxy) def test_create_database_if_not_exists_headers(self): - first_response = self.client.create_database_if_not_exists(id="responses_test" + str(uuid.uuid4()), return_properties=True) + first_response = self.client.create_database_if_not_exists( + id="responses_test" + str(uuid.uuid4()), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 def test_create_database_if_not_exists_headers_negative(self): @@ -88,32 +90,39 @@ def test_create_database_if_not_exists_headers_negative(self): assert len(second_response[1].get_response_headers()) > 0 def test_create_container_headers(self): - first_response = self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 def test_create_container_returns_container_proxy(self): - first_response = self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + first_response = self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) assert isinstance(first_response, ContainerProxy) def test_create_container_if_not_exists_headers(self): - first_response = self.test_database.create_container_if_not_exists(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = self.test_database.create_container_if_not_exists( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 def test_create_container_if_not_exists_headers_negative(self): - first_response = self.test_database.create_container_if_not_exists(id="responses_test", - partition_key=PartitionKey(path="/company"), return_properties=True) - second_response = self.test_database.create_container_if_not_exists(id="responses_test", - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = self.test_database.create_container_if_not_exists( + id="responses_test", partition_key=PartitionKey(path="/company"), return_properties=True + ) + second_response = self.test_database.create_container_if_not_exists( + id="responses_test", partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(second_response[1].get_response_headers()) > 0 def test_replace_container_headers(self): - first_response = self.test_database.create_container_if_not_exists(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) - second_response = self.test_database.replace_container(first_response.id, - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = self.test_database.create_container_if_not_exists( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) + second_response = self.test_database.replace_container( + first_response.id, partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(second_response[1].get_response_headers()) > 0 def test_database_read_headers(self): @@ -122,14 +131,16 @@ def test_database_read_headers(self): assert len(first_response.get_response_headers()) > 0 def test_container_read_headers(self): - container = self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) first_response = container.read() assert len(first_response.get_response_headers()) > 0 def test_container_replace_throughput(self): - container = self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company"), offer_throughput=400) + container = self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company"), offer_throughput=400 + ) replace_throughput_value = 500 first_response = container.replace_throughput(replace_throughput_value) assert len(first_response.get_response_headers()) > 0 @@ -142,5 +153,6 @@ def test_database_replace_throughput(self): assert len(first_response.get_response_headers()) > 0 assert replace_throughput_value == db.get_throughput().offer_throughput -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses_async.py b/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses_async.py index 4b3194718f19..d992a8a67be1 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_cosmos_responses_async.py @@ -11,14 +11,13 @@ from azure.cosmos.aio import CosmosClient, ContainerProxy, DatabaseProxy from azure.cosmos.http_constants import HttpHeaders - # TODO: add more tests in this file once we have response headers in control plane operations # TODO: add query tests once those changes are available + @pytest.mark.cosmosEmulator class TestCosmosResponsesAsync(unittest.IsolatedAsyncioTestCase): - """Python Cosmos Responses Tests. - """ + """Python Cosmos Responses Tests.""" configs = test_config.TestConfig host = configs.host @@ -27,12 +26,12 @@ class TestCosmosResponsesAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -42,39 +41,42 @@ async def asyncTearDown(self): await self.client.close() async def test_point_operation_headers_async(self): - container = await self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) first_response = await container.upsert_item({"id": str(uuid.uuid4()), "company": "Microsoft"}) - lsn = first_response.get_response_headers()['lsn'] + lsn = first_response.get_response_headers()["lsn"] create_response = await container.create_item({"id": str(uuid.uuid4()), "company": "Microsoft"}) assert len(create_response.get_response_headers()) > 0 - assert int(lsn) + 1 == int(create_response.get_response_headers()['lsn']) - lsn = create_response.get_response_headers()['lsn'] + assert int(lsn) + 1 == int(create_response.get_response_headers()["lsn"]) + lsn = create_response.get_response_headers()["lsn"] - read_response = await container.read_item(create_response['id'], create_response['company']) + read_response = await container.read_item(create_response["id"], create_response["company"]) assert len(read_response.get_response_headers()) > 0 upsert_response = await container.upsert_item({"id": str(uuid.uuid4()), "company": "Microsoft"}) assert len(upsert_response.get_response_headers()) > 0 - assert int(lsn) + 1 == int(upsert_response.get_response_headers()['lsn']) - lsn = upsert_response.get_response_headers()['lsn'] + assert int(lsn) + 1 == int(upsert_response.get_response_headers()["lsn"]) + lsn = upsert_response.get_response_headers()["lsn"] - upsert_response['replace'] = True - replace_response = await container.replace_item(upsert_response['id'], upsert_response) - assert replace_response['replace'] is not None + upsert_response["replace"] = True + replace_response = await container.replace_item(upsert_response["id"], upsert_response) + assert replace_response["replace"] is not None assert len(replace_response.get_response_headers()) > 0 - assert int(lsn) + 1 == int(replace_response.get_response_headers()['lsn']) + assert int(lsn) + 1 == int(replace_response.get_response_headers()["lsn"]) batch = [] for i in range(50): batch.append(("create", ({"id": "item" + str(i), "company": "Microsoft"},))) batch_response = await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response.get_response_headers()) > 0 - assert int(lsn) + 1 < int(batch_response.get_response_headers()['lsn']) + assert int(lsn) + 1 < int(batch_response.get_response_headers()["lsn"]) async def test_create_database_headers_async(self): - first_response = await self.client.create_database(id="responses_test" + str(uuid.uuid4()), return_properties=True) + first_response = await self.client.create_database( + id="responses_test" + str(uuid.uuid4()), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 @@ -83,7 +85,9 @@ async def test_create_database_returns_database_proxy_async(self): assert isinstance(first_response, DatabaseProxy) async def test_create_database_if_not_exists_headers_async(self): - first_response = await self.client.create_database_if_not_exists(id="responses_test" + str(uuid.uuid4()), return_properties=True) + first_response = await self.client.create_database_if_not_exists( + id="responses_test" + str(uuid.uuid4()), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 async def test_create_database_if_not_exists_headers_negative_async(self): @@ -92,32 +96,39 @@ async def test_create_database_if_not_exists_headers_negative_async(self): assert len(second_response[1].get_response_headers()) > 0 async def test_create_container_headers_async(self): - first_response = await self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = await self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 async def test_create_container_returns_container_proxy_async(self): - first_response = await self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + first_response = await self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) assert isinstance(first_response, ContainerProxy) async def test_create_container_if_not_exists_headers_async(self): - first_response = await self.test_database.create_container_if_not_exists(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = await self.test_database.create_container_if_not_exists( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(first_response[1].get_response_headers()) > 0 async def test_create_container_if_not_exists_headers_negative_async(self): - first_response = await self.test_database.create_container_if_not_exists(id="responses_test1", - partition_key=PartitionKey(path="/company"), return_properties=True) - second_response = await self.test_database.create_container_if_not_exists(id="responses_test1", - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = await self.test_database.create_container_if_not_exists( + id="responses_test1", partition_key=PartitionKey(path="/company"), return_properties=True + ) + second_response = await self.test_database.create_container_if_not_exists( + id="responses_test1", partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(second_response[1].get_response_headers()) > 0 async def test_replace_container_headers_async(self): - first_response = await self.test_database.create_container_if_not_exists(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) - second_response = await self.test_database.replace_container(first_response.id, - partition_key=PartitionKey(path="/company"), return_properties=True) + first_response = await self.test_database.create_container_if_not_exists( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) + second_response = await self.test_database.replace_container( + first_response.id, partition_key=PartitionKey(path="/company"), return_properties=True + ) assert len(second_response[1].get_response_headers()) > 0 async def test_database_read_headers_async(self): @@ -126,14 +137,16 @@ async def test_database_read_headers_async(self): assert len(first_response.get_response_headers()) > 0 async def test_container_read_headers_async(self): - container = await self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) first_response = await container.read() assert len(first_response.get_response_headers()) > 0 async def test_container_replace_throughput_async(self): - container = await self.test_database.create_container(id="responses_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company"), offer_throughput=400) + container = await self.test_database.create_container( + id="responses_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company"), offer_throughput=400 + ) replace_throughput_value = 500 first_response = await container.replace_throughput(replace_throughput_value) assert len(first_response.get_response_headers()) > 0 @@ -149,5 +162,5 @@ async def test_database_replace_throughput_async(self): assert replace_throughput_value == new_throughput.offer_throughput -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud.py b/sdk/cosmos/azure-cosmos/tests/test_crud.py index dc9cb5882747..01fdb201e8cd 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import logging import threading import time @@ -47,11 +47,11 @@ def send(self, *args, **kwargs): response = RequestsTransportResponse(None, output) return response + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosLong class TestCRUDOperations(unittest.TestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" configs = test_config.TestConfig host = configs.host @@ -69,7 +69,7 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @@ -78,13 +78,15 @@ def setUpClass(cls): use_multiple_write_locations = False if os.environ.get("AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER", "False") == "True": use_multiple_write_locations = True - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey, multiple_write_locations=use_multiple_write_locations) + "tests." + ) + cls.client = cosmos_client.CosmosClient( + cls.host, cls.masterKey, multiple_write_locations=use_multiple_write_locations + ) cls.databaseForTest = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) def test_partitioned_collection_document_crud_and_query(self): @@ -92,85 +94,82 @@ def test_partitioned_collection_document_crud_and_query(self): created_collection = created_db.create_container("crud-query-container", partition_key=PartitionKey("/pk")) - document_definition = {'id': 'document', - 'key': 'value', - 'pk': 'pk'} + document_definition = {"id": "document", "key": "value", "pk": "pk"} - created_document = created_collection.create_item( - body=document_definition - ) + created_document = created_collection.create_item(body=document_definition) - self.assertEqual(created_document.get('id'), document_definition.get('id')) - self.assertEqual(created_document.get('key'), document_definition.get('key')) + self.assertEqual(created_document.get("id"), document_definition.get("id")) + self.assertEqual(created_document.get("key"), document_definition.get("key")) # read document read_document = created_collection.read_item( - item=created_document.get('id'), - partition_key=created_document.get('pk') + item=created_document.get("id"), partition_key=created_document.get("pk") ) - self.assertEqual(read_document.get('id'), created_document.get('id')) - self.assertEqual(read_document.get('key'), created_document.get('key')) + self.assertEqual(read_document.get("id"), created_document.get("id")) + self.assertEqual(read_document.get("key"), created_document.get("key")) # Read document feed doesn't require partitionKey as it's always a cross partition query documentlist = list(created_collection.read_all_items()) self.assertEqual(1, len(documentlist)) # replace document - document_definition['key'] = 'new value' + document_definition["key"] = "new value" - replaced_document = created_collection.replace_item( - item=read_document, - body=document_definition - ) + replaced_document = created_collection.replace_item(item=read_document, body=document_definition) - self.assertEqual(replaced_document.get('key'), document_definition.get('key')) + self.assertEqual(replaced_document.get("key"), document_definition.get("key")) # upsert document(create scenario) - new_document_definition = {'id': 'document2', - 'key': 'value2', - 'pk': 'pk'} + new_document_definition = {"id": "document2", "key": "value2", "pk": "pk"} upserted_document = created_collection.upsert_item(body=new_document_definition) - self.assertEqual(upserted_document.get('id'), new_document_definition.get('id')) - self.assertEqual(upserted_document.get('key'), new_document_definition.get('key')) + self.assertEqual(upserted_document.get("id"), new_document_definition.get("id")) + self.assertEqual(upserted_document.get("key"), new_document_definition.get("key")) documentlist = list(created_collection.read_all_items()) self.assertEqual(2, len(documentlist)) # delete document - created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get('pk')) + created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get("pk")) # query document on the partition key specified in the predicate will pass even without setting enableCrossPartitionQuery or passing in the partitionKey value - documentlist = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.id=\'' + replaced_document.get('id') + '\'' # nosec - }, enable_cross_partition_query=True)) + documentlist = list( + created_collection.query_items( + {"query": "SELECT * FROM root r WHERE r.id='" + replaced_document.get("id") + "'"}, # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(1, len(documentlist)) # query document on any property other than partitionKey will fail without setting enableCrossPartitionQuery or passing in the partitionKey value try: - list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'' # nosec - })) + list( + created_collection.query_items( + {"query": "SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'"} # nosec + ) + ) except Exception: pass # cross partition query - documentlist = list(created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - enable_cross_partition_query=True - )) + documentlist = list( + created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(1, len(documentlist)) # query document by providing the partitionKey value - documentlist = list(created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - partition_key=replaced_document.get('pk') - )) + documentlist = list( + created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + partition_key=replaced_document.get("pk"), + ) + ) self.assertEqual(1, len(documentlist)) created_db.delete_container(created_collection.id) @@ -180,83 +179,81 @@ def test_partitioned_collection_execute_stored_procedure(self): document_id = str(uuid.uuid4()) sproc = { - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' var client = getContext().getCollection();' + - ' client.createDocument(client.getSelfLink(), { id: "' + document_id + '", pk : 2}, ' + - ' {}, function(err, docCreated, options) { ' + - ' if(err) throw new Error(\'Error while creating document: \' + err.message);' + - ' else {' + - ' getContext().getResponse().setBody(1);' + - ' }' + - ' });}') + "id": "storedProcedure" + str(uuid.uuid4()), + "body": ( + "function () {" + + " var client = getContext().getCollection();" + + ' client.createDocument(client.getSelfLink(), { id: "' + + document_id + + '", pk : 2}, ' + + " {}, function(err, docCreated, options) { " + + " if(err) throw new Error('Error while creating document: ' + err.message);" + + " else {" + + " getContext().getResponse().setBody(1);" + + " }" + + " });}" + ), } created_sproc = created_collection.scripts.create_stored_procedure(sproc) # Partition Key value same as what is specified in the stored procedure body - result = created_collection.scripts.execute_stored_procedure(sproc=created_sproc['id'], partition_key=2) + result = created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=2) self.assertEqual(result, 1) # Partition Key value different than what is specified in the stored procedure body will cause a bad request(400) error self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.scripts.execute_stored_procedure, - created_sproc['id'], - 3) + StatusCodes.BAD_REQUEST, created_collection.scripts.execute_stored_procedure, created_sproc["id"], 3 + ) def test_script_logging_execute_stored_procedure(self): created_collection = self.databaseForTest.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - stored_proc_id = 'storedProcedure-1-' + str(uuid.uuid4()) + stored_proc_id = "storedProcedure-1-" + str(uuid.uuid4()) sproc = { - 'id': stored_proc_id, - 'body': ( - 'function () {' + - ' var mytext = \'x\';' + - ' var myval = 1;' + - ' try {' + - ' console.log(\'The value of %s is %s.\', mytext, myval);' + - ' getContext().getResponse().setBody(\'Success!\');' + - ' }' + - ' catch (err) {' + - ' getContext().getResponse().setBody(\'inline err: [\' + err.number + \'] \' + err);' + - ' }' - '}') + "id": stored_proc_id, + "body": ( + "function () {" + + " var mytext = 'x';" + + " var myval = 1;" + + " try {" + + " console.log('The value of %s is %s.', mytext, myval);" + + " getContext().getResponse().setBody('Success!');" + + " }" + + " catch (err) {" + + " getContext().getResponse().setBody('inline err: [' + err.number + '] ' + err);" + + " }" + "}" + ), } created_sproc = created_collection.scripts.create_stored_procedure(sproc) - result = created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - partition_key=1 - ) + result = created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=1) - self.assertEqual(result, 'Success!') + self.assertEqual(result, "Success!") self.assertFalse( - HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers) + HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers + ) result = created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=True, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=True, partition_key=1 ) - self.assertEqual(result, 'Success!') - self.assertEqual(urllib.quote('The value of x is 1.'), - created_collection.scripts.client_connection.last_response_headers.get( - HttpHeaders.ScriptLogResults)) + self.assertEqual(result, "Success!") + self.assertEqual( + urllib.quote("The value of x is 1."), + created_collection.scripts.client_connection.last_response_headers.get(HttpHeaders.ScriptLogResults), + ) result = created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=False, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=False, partition_key=1 ) - self.assertEqual(result, 'Success!') + self.assertEqual(result, "Success!") self.assertFalse( - HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers) + HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers + ) def test_stored_procedure_functionality(self): # create database @@ -264,108 +261,94 @@ def test_stored_procedure_functionality(self): # create collection collection = self.databaseForTest.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - stored_proc_id = 'storedProcedure-1-' + str(uuid.uuid4()) + stored_proc_id = "storedProcedure-1-" + str(uuid.uuid4()) sproc1 = { - 'id': stored_proc_id, - 'body': ( - 'function () {' + - ' for (var i = 0; i < 1000; i++) {' + - ' var item = getContext().getResponse().getBody();' + - ' if (i > 0 && item != i - 1) throw \'body mismatch\';' + - ' getContext().getResponse().setBody(i);' + - ' }' + - '}') + "id": stored_proc_id, + "body": ( + "function () {" + + " for (var i = 0; i < 1000; i++) {" + + " var item = getContext().getResponse().getBody();" + + " if (i > 0 && item != i - 1) throw 'body mismatch';" + + " getContext().getResponse().setBody(i);" + + " }" + + "}" + ), } retrieved_sproc = collection.scripts.create_stored_procedure(sproc1) - result = collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc['id'], - partition_key=1 - ) + result = collection.scripts.execute_stored_procedure(sproc=retrieved_sproc["id"], partition_key=1) self.assertEqual(result, 999) - stored_proc_id_2 = 'storedProcedure-2-' + str(uuid.uuid4()) + stored_proc_id_2 = "storedProcedure-2-" + str(uuid.uuid4()) sproc2 = { - 'id': stored_proc_id_2, - 'body': ( - 'function () {' + - ' for (var i = 0; i < 10; i++) {' + - ' getContext().getResponse().appendValue(\'Body\', i);' + - ' }' + - '}') + "id": stored_proc_id_2, + "body": ( + "function () {" + + " for (var i = 0; i < 10; i++) {" + + " getContext().getResponse().appendValue('Body', i);" + + " }" + + "}" + ), } retrieved_sproc2 = collection.scripts.create_stored_procedure(sproc2) - result = collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc2['id'], - partition_key=1 - ) + result = collection.scripts.execute_stored_procedure(sproc=retrieved_sproc2["id"], partition_key=1) self.assertEqual(int(result), 123456789) - stored_proc_id_3 = 'storedProcedure-3-' + str(uuid.uuid4()) + stored_proc_id_3 = "storedProcedure-3-" + str(uuid.uuid4()) sproc3 = { - 'id': stored_proc_id_3, - 'body': ( - 'function (input) {' + - ' getContext().getResponse().setBody(' + - ' \'a\' + input.temp);' + - '}') + "id": stored_proc_id_3, + "body": ("function (input) {" + " getContext().getResponse().setBody(" + " 'a' + input.temp);" + "}"), } retrieved_sproc3 = collection.scripts.create_stored_procedure(sproc3) result = collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc3['id'], - params={'temp': 'so'}, - partition_key=1 + sproc=retrieved_sproc3["id"], params={"temp": "so"}, partition_key=1 ) - self.assertEqual(result, 'aso') + self.assertEqual(result, "aso") def test_partitioned_collection_permissions(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_permissions all collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions all collection" + str(uuid.uuid4()) all_collection = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - collection_id = 'test_partitioned_collection_permissions read collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions read collection" + str(uuid.uuid4()) read_collection = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - user = created_db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = created_db.create_user(body={"id": "user" + str(uuid.uuid4())}) permission_definition = { - 'id': 'all permission', - 'permissionMode': documents.PermissionMode.All, - 'resource': all_collection.container_link, - 'resourcePartitionKey': [1] + "id": "all permission", + "permissionMode": documents.PermissionMode.All, + "resource": all_collection.container_link, + "resourcePartitionKey": [1], } all_permission = user.create_permission(body=permission_definition) permission_definition = { - 'id': 'read permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': read_collection.container_link, - 'resourcePartitionKey': [1] + "id": "read permission", + "permissionMode": documents.PermissionMode.Read, + "resource": read_collection.container_link, + "resourcePartitionKey": [1], } read_permission = user.create_permission(body=permission_definition) resource_tokens = {} # storing the resource tokens based on Resource IDs - resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = (all_permission.properties['_token']) - resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = ( - read_permission.properties['_token']) + resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = all_permission.properties["_token"] + resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = read_permission.properties["_token"] restricted_client = cosmos_client.CosmosClient( - TestCRUDOperations.host, resource_tokens, "Session", connection_policy=TestCRUDOperations.connectionPolicy) + TestCRUDOperations.host, resource_tokens, "Session", connection_policy=TestCRUDOperations.connectionPolicy + ) - document_definition = {'id': 'document1', - 'key': 1 - } + document_definition = {"id": "document1", "key": 1} all_collection.client_connection = restricted_client.client_connection read_collection.client_connection = restricted_client.client_connection @@ -374,29 +357,21 @@ def test_partitioned_collection_permissions(self): created_document = all_collection.create_item(body=document_definition) # Create document in read_collection should fail since it has only read permissions for this collection - self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - read_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, read_collection.create_item, document_definition) - document_definition['key'] = 2 + document_definition["key"] = 2 # Create document should fail since the partitionKey is 2 which is different that what is specified as resourcePartitionKey in permission object - self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - all_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, all_collection.create_item, document_definition) - document_definition['key'] = 1 + document_definition["key"] = 1 # Delete document should succeed since the partitionKey is 1 which is what specified as resourcePartitionKey in permission object - created_document = all_collection.delete_item(item=created_document['id'], - partition_key=document_definition['key']) + created_document = all_collection.delete_item( + item=created_document["id"], partition_key=document_definition["key"] + ) # Delete document in read_collection should fail since it has only read permissions for this collection self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - read_collection.delete_item, - document_definition['id'], - document_definition['id'] + StatusCodes.FORBIDDEN, read_collection.delete_item, document_definition["id"], document_definition["id"] ) created_db.delete_container(all_collection) @@ -407,57 +382,40 @@ def test_partitioned_collection_partition_key_value_types(self): created_collection = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': None, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": None, "spam": "eggs"} # create document with partitionKey set as None here created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "spam": "eggs"} # create document with partitionKey set as Undefined here created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': True, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": True, "spam": "eggs"} # create document with bool partitionKey created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 'value', - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": "value", "spam": "eggs"} # create document with string partitionKey created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 100, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 100, "spam": "eggs"} # create document with int partitionKey created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 10.50, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 10.50, "spam": "eggs"} # create document with float partitionKey created_collection.create_item(body=document_definition) - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'pk': 'value'} + document_definition = {"name": "sample document", "spam": "eggs", "pk": "value"} # Should throw an error because automatic id generation is disabled always. - self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition - ) + self.__AssertHTTPFailureWithStatus(StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition) def test_document_crud(self): # create database @@ -470,88 +428,78 @@ def test_document_crud(self): before_create_documents_count = len(documents) # create a document with auto ID generation - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk'} + document_definition = {"name": "sample document", "spam": "eggs", "key": "value", "pk": "pk"} - no_response = created_collection.create_item(body=document_definition, enable_automatic_id_generation=True, no_response=True) + no_response = created_collection.create_item( + body=document_definition, enable_automatic_id_generation=True, no_response=True + ) self.assertDictEqual(no_response, {}) created_document = created_collection.create_item(body=document_definition, enable_automatic_id_generation=True) - self.assertEqual(created_document.get('name'), - document_definition['name']) - - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk', - 'id': str(uuid.uuid4())} + self.assertEqual(created_document.get("name"), document_definition["name"]) + + document_definition = { + "name": "sample document", + "spam": "eggs", + "key": "value", + "pk": "pk", + "id": str(uuid.uuid4()), + } created_document = created_collection.create_item(body=document_definition) - self.assertEqual(created_document.get('name'), - document_definition['name']) - self.assertEqual(created_document.get('id'), - document_definition['id']) + self.assertEqual(created_document.get("name"), document_definition["name"]) + self.assertEqual(created_document.get("id"), document_definition["id"]) # duplicated documents are not allowed when 'id' is provided. duplicated_definition_with_id = document_definition.copy() - self.__AssertHTTPFailureWithStatus(StatusCodes.CONFLICT, - created_collection.create_item, - duplicated_definition_with_id) + self.__AssertHTTPFailureWithStatus( + StatusCodes.CONFLICT, created_collection.create_item, duplicated_definition_with_id + ) # read documents after creation documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 3, - 'create should increase the number of documents') + len(documents), before_create_documents_count + 3, "create should increase the number of documents" + ) # query documents - documents = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.name=@name', - 'parameters': [ - {'name': '@name', 'value': document_definition['name']} - ] - }, enable_cross_partition_query=True - )) + documents = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.name=@name", + "parameters": [{"name": "@name", "value": document_definition["name"]}], + }, + enable_cross_partition_query=True, + ) + ) self.assertTrue(documents) - documents = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.name=@name', - 'parameters': [ - {'name': '@name', 'value': document_definition['name']} - ], - }, enable_cross_partition_query=True, - enable_scan_in_query=True - )) + documents = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.name=@name", + "parameters": [{"name": "@name", "value": document_definition["name"]}], + }, + enable_cross_partition_query=True, + enable_scan_in_query=True, + ) + ) self.assertTrue(documents) # replace document. - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' - old_etag = created_document['_etag'] - replaced_document = created_collection.replace_item( - item=created_document['id'], - body=created_document - ) - self.assertEqual(replaced_document['name'], - 'replaced document', - 'document id property should change') - self.assertEqual(replaced_document['spam'], - 'not eggs', - 'property should have changed') - self.assertEqual(created_document['id'], - replaced_document['id'], - 'document id should stay the same') + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" + old_etag = created_document["_etag"] + replaced_document = created_collection.replace_item(item=created_document["id"], body=created_document) + self.assertEqual(replaced_document["name"], "replaced document", "document id property should change") + self.assertEqual(replaced_document["spam"], "not eggs", "property should have changed") + self.assertEqual(created_document["id"], replaced_document["id"], "document id should stay the same") # replace document based on condition - replaced_document['name'] = 'replaced document based on condition' - replaced_document['spam'] = 'new spam field' + replaced_document["name"] = "replaced document based on condition" + replaced_document["spam"] = "new spam field" # should fail for stale etag self.__AssertHTTPFailureWithStatus( StatusCodes.PRECONDITION_FAILED, created_collection.replace_item, - replaced_document['id'], + replaced_document["id"], replaced_document, if_match=old_etag, ) @@ -559,66 +507,52 @@ def test_document_crud(self): # should fail if only etag specified with self.assertRaises(ValueError): created_collection.replace_item( - etag=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document + etag=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document ) # should fail if only match condition specified with self.assertRaises(ValueError): created_collection.replace_item( - match_condition=MatchConditions.IfNotModified, - item=replaced_document['id'], - body=replaced_document + match_condition=MatchConditions.IfNotModified, item=replaced_document["id"], body=replaced_document ) with self.assertRaises(ValueError): created_collection.replace_item( - match_condition=MatchConditions.IfModified, - item=replaced_document['id'], - body=replaced_document + match_condition=MatchConditions.IfModified, item=replaced_document["id"], body=replaced_document ) # should fail if invalid match condition specified with self.assertRaises(TypeError): created_collection.replace_item( - match_condition=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document + match_condition=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document ) # should pass for most recent etag replaced_document_conditional = created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - etag=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document + etag=replaced_document["_etag"], + item=replaced_document["id"], + body=replaced_document, + ) + self.assertEqual( + replaced_document_conditional["name"], + "replaced document based on condition", + "document id property should change", + ) + self.assertEqual(replaced_document_conditional["spam"], "new spam field", "property should have changed") + self.assertEqual( + replaced_document_conditional["id"], replaced_document["id"], "document id should stay the same" ) - self.assertEqual(replaced_document_conditional['name'], - 'replaced document based on condition', - 'document id property should change') - self.assertEqual(replaced_document_conditional['spam'], - 'new spam field', - 'property should have changed') - self.assertEqual(replaced_document_conditional['id'], - replaced_document['id'], - 'document id should stay the same') # read document one_document_from_read = created_collection.read_item( - item=replaced_document['id'], - partition_key=replaced_document['pk'] + item=replaced_document["id"], partition_key=replaced_document["pk"] ) - self.assertEqual(replaced_document['id'], - one_document_from_read['id']) + self.assertEqual(replaced_document["id"], one_document_from_read["id"]) # delete document - created_collection.delete_item( - item=replaced_document, - partition_key=replaced_document['pk'] - ) + created_collection.delete_item(item=replaced_document, partition_key=replaced_document["pk"]) # read documents after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - created_collection.read_item, - replaced_document['id'], - replaced_document['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, created_collection.read_item, replaced_document["id"], replaced_document["id"] + ) def test_read_collection_only_once(self): # Add filter to the filtered diagnostics handler @@ -633,7 +567,7 @@ def test_read_collection_only_once(self): def upsert_worker(): # Synchronously perform the upsert item operation - container.upsert_item(body={'id': str(uuid.uuid4()), 'name': f'sample-'}) + container.upsert_item(body={"id": str(uuid.uuid4()), "name": f"sample-"}) # Perform 10 concurrent upserts threads = [] @@ -644,8 +578,13 @@ def upsert_worker(): for t in threads: t.join() - assert sum("'x-ms-thinclient-proxy-resource-type': 'colls'" in response.message for response in mock_handler.messages) == 1 - + assert ( + sum( + "'x-ms-thinclient-proxy-resource-type': 'colls'" in response.message + for response in mock_handler.messages + ) + == 1 + ) def test_document_upsert(self): # create database @@ -659,142 +598,96 @@ def test_document_upsert(self): before_create_documents_count = len(documents) # create document definition - document_definition = {'id': 'doc', - 'name': 'sample document', - 'spam': 'eggs', - 'pk': 'pk', - 'key': 'value'} + document_definition = {"id": "doc", "name": "sample document", "spam": "eggs", "pk": "pk", "key": "value"} # create document using Upsert API created_document = created_collection.upsert_item(body=document_definition) # verify id property - self.assertEqual(created_document['id'], - document_definition['id']) + self.assertEqual(created_document["id"], document_definition["id"]) # test error for non-string id with self.assertRaises(TypeError): - document_definition['id'] = 7 + document_definition["id"] = 7 created_collection.upsert_item(body=document_definition) # read documents after creation and verify updated count documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 1, - 'create should increase the number of documents') + len(documents), before_create_documents_count + 1, "create should increase the number of documents" + ) # update document - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" # should replace document since it already exists upserted_document = created_collection.upsert_item(body=created_document) # verify the changed properties - self.assertEqual(upserted_document['name'], - created_document['name'], - 'document name property should change') - self.assertEqual(upserted_document['spam'], - created_document['spam'], - 'property should have changed') + self.assertEqual(upserted_document["name"], created_document["name"], "document name property should change") + self.assertEqual(upserted_document["spam"], created_document["spam"], "property should have changed") # verify id property - self.assertEqual(upserted_document['id'], - created_document['id'], - 'document id should stay the same') + self.assertEqual(upserted_document["id"], created_document["id"], "document id should stay the same") # read documents after upsert and verify count doesn't increases again documents = list(created_collection.read_all_items()) - self.assertEqual( - len(documents), - before_create_documents_count + 1, - 'number of documents should remain same') + self.assertEqual(len(documents), before_create_documents_count + 1, "number of documents should remain same") - created_document['id'] = 'new id' + created_document["id"] = "new id" # Upsert should create new document since the id is different new_document = created_collection.upsert_item(body=created_document) # Test modified access conditions - created_document['spam'] = 'more eggs' + created_document["spam"] = "more eggs" created_collection.upsert_item(body=created_document) with self.assertRaises(exceptions.CosmosHttpResponseError): created_collection.upsert_item( - body=created_document, - match_condition=MatchConditions.IfNotModified, - etag=new_document['_etag']) + body=created_document, match_condition=MatchConditions.IfNotModified, etag=new_document["_etag"] + ) # verify id property - self.assertEqual(created_document['id'], - new_document['id'], - 'document id should be same') + self.assertEqual(created_document["id"], new_document["id"], "document id should be same") # read documents after upsert and verify count increases documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 2, - 'upsert should increase the number of documents') + len(documents), before_create_documents_count + 2, "upsert should increase the number of documents" + ) # delete documents - created_collection.delete_item(item=upserted_document, partition_key=upserted_document['pk']) - created_collection.delete_item(item=new_document, partition_key=new_document['pk']) + created_collection.delete_item(item=upserted_document, partition_key=upserted_document["pk"]) + created_collection.delete_item(item=new_document, partition_key=new_document["pk"]) # read documents after delete and verify count is same as original documents = list(created_collection.read_all_items()) - self.assertEqual( - len(documents), - before_create_documents_count, - 'number of documents should remain same') + self.assertEqual(len(documents), before_create_documents_count, "number of documents should remain same") def test_geospatial_index(self): db = self.databaseForTest # partial policy specified collection = db.create_container( - id='collection with spatial index ' + str(uuid.uuid4()), + id="collection with spatial index " + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ - { - 'path': '/"Location"/?', - 'indexes': [ - { - 'kind': 'Spatial', - 'dataType': 'Point' - } - ] - }, - { - 'path': '/' - } + "includedPaths": [ + {"path": '/"Location"/?', "indexes": [{"kind": "Spatial", "dataType": "Point"}]}, + {"path": "/"}, ] }, - partition_key=PartitionKey(path='/id', kind='Hash') - ) - collection.create_item( - body={ - 'id': 'loc1', - 'Location': { - 'type': 'Point', - 'coordinates': [20.0, 20.0] - } - } + partition_key=PartitionKey(path="/id", kind="Hash"), ) - collection.create_item( - body={ - 'id': 'loc2', - 'Location': { - 'type': 'Point', - 'coordinates': [100.0, 100.0] - } - } + collection.create_item(body={"id": "loc1", "Location": {"type": "Point", "coordinates": [20.0, 20.0]}}) + collection.create_item(body={"id": "loc2", "Location": {"type": "Point", "coordinates": [100.0, 100.0]}}) + results = list( + collection.query_items( + query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)", + enable_cross_partition_query=True, + ) ) - results = list(collection.query_items( - query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)", - enable_cross_partition_query=True - )) self.assertEqual(1, len(results)) - self.assertEqual('loc1', results[0]['id']) + self.assertEqual("loc1", results[0]["id"]) db.delete_container(container=collection) @@ -807,32 +700,25 @@ def test_user_crud(self): users = list(db.list_users()) before_create_count = len(users) # create user - user_id = 'new user' + str(uuid.uuid4()) - user = db.create_user(body={'id': user_id}) - self.assertEqual(user.id, user_id, 'user id error') + user_id = "new user" + str(uuid.uuid4()) + user = db.create_user(body={"id": user_id}) + self.assertEqual(user.id, user_id, "user id error") # list users after creation users = list(db.list_users()) self.assertEqual(len(users), before_create_count + 1) # query users - results = list(db.query_users( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': user_id} - ] - )) + results = list( + db.query_users(query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": user_id}]) + ) self.assertTrue(results) # replace user - replaced_user_id = 'replaced user' + str(uuid.uuid4()) + replaced_user_id = "replaced user" + str(uuid.uuid4()) user_properties = user.read() - user_properties['id'] = replaced_user_id + user_properties["id"] = replaced_user_id replaced_user = db.replace_user(user_id, user_properties) - self.assertEqual(replaced_user.id, - replaced_user_id, - 'user id should change') - self.assertEqual(user_properties['id'], - replaced_user.id, - 'user id should stay the same') + self.assertEqual(replaced_user.id, replaced_user_id, "user id should change") + self.assertEqual(user_properties["id"], replaced_user.id, "user id should stay the same") # read user user = db.get_user_client(replaced_user.id) self.assertEqual(replaced_user.id, user.id) @@ -840,8 +726,7 @@ def test_user_crud(self): db.delete_user(user.id) # read user after deletion deleted_user = db.get_user_client(user.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - deleted_user.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, deleted_user.read) def test_user_upsert(self): # create database @@ -852,11 +737,11 @@ def test_user_upsert(self): before_create_count = len(users) # create user using Upsert API - user_id = 'user' + str(uuid.uuid4()) - user = db.upsert_user(body={'id': user_id}) + user_id = "user" + str(uuid.uuid4()) + user = db.upsert_user(body={"id": user_id}) # verify id property - self.assertEqual(user.id, user_id, 'user id error') + self.assertEqual(user.id, user_id, "user id error") # read users after creation and verify updated count users = list(db.list_users()) @@ -867,23 +752,21 @@ def test_user_upsert(self): upserted_user = db.upsert_user(user_properties) # verify id property - self.assertEqual(upserted_user.id, - user.id, - 'user id should remain same') + self.assertEqual(upserted_user.id, user.id, "user id should remain same") # read users after upsert and verify count doesn't increases again users = list(db.list_users()) self.assertEqual(len(users), before_create_count + 1) user_properties = user.read() - user_properties['id'] = 'new user' + str(uuid.uuid4()) - user.id = user_properties['id'] + user_properties["id"] = "new user" + str(uuid.uuid4()) + user.id = user_properties["id"] # Upsert should create new user since id is different new_user = db.upsert_user(user_properties) # verify id property - self.assertEqual(new_user.id, user.id, 'user id error') + self.assertEqual(new_user.id, user.id, "user id error") # read users after upsert and verify count increases users = list(db.list_users()) @@ -902,119 +785,104 @@ def test_permission_crud(self): # create database db = self.databaseForTest # create user - user = db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # list permissions permissions = list(user.list_permissions()) before_create_count = len(permissions) permission = { - 'id': 'new permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "new permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission permission = user.create_permission(permission) - self.assertEqual(permission.id, - 'new permission', - 'permission id error') + self.assertEqual(permission.id, "new permission", "permission id error") # list permissions after creation permissions = list(user.list_permissions()) self.assertEqual(len(permissions), before_create_count + 1) # query permissions - results = list(user.query_permissions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': permission.id} - ] - )) + results = list( + user.query_permissions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": permission.id}] + ) + ) self.assertTrue(results) # replace permission change_permission = permission.properties.copy() - permission.properties['id'] = 'replaced permission' - permission.id = permission.properties['id'] - replaced_permission = user.replace_permission(change_permission['id'], permission.properties) - self.assertEqual(replaced_permission.id, - 'replaced permission', - 'permission id should change') - self.assertEqual(permission.id, - replaced_permission.id, - 'permission id should stay the same') + permission.properties["id"] = "replaced permission" + permission.id = permission.properties["id"] + replaced_permission = user.replace_permission(change_permission["id"], permission.properties) + self.assertEqual(replaced_permission.id, "replaced permission", "permission id should change") + self.assertEqual(permission.id, replaced_permission.id, "permission id should stay the same") # read permission permission = user.get_permission(replaced_permission.id) self.assertEqual(replaced_permission.id, permission.id) # delete permission user.delete_permission(replaced_permission.id) # read permission after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - user.get_permission, - permission.id) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, user.get_permission, permission.id) def test_permission_upsert(self): # create database db = self.databaseForTest # create user - user = db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # read permissions and check count permissions = list(user.list_permissions()) before_create_count = len(permissions) permission_definition = { - 'id': 'permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission using Upsert API created_permission = user.upsert_permission(permission_definition) # verify id property - self.assertEqual(created_permission.id, - permission_definition['id'], - 'permission id error') + self.assertEqual(created_permission.id, permission_definition["id"], "permission id error") # read permissions after creation and verify updated count permissions = list(user.list_permissions()) self.assertEqual(len(permissions), before_create_count + 1) # update permission mode - permission_definition['permissionMode'] = documents.PermissionMode.All + permission_definition["permissionMode"] = documents.PermissionMode.All # should repace the permission since it already exists upserted_permission = user.upsert_permission(permission_definition) # verify id property - self.assertEqual(upserted_permission.id, - created_permission.id, - 'permission id should remain same') + self.assertEqual(upserted_permission.id, created_permission.id, "permission id should remain same") # verify changed property - self.assertEqual(upserted_permission.permission_mode, - permission_definition['permissionMode'], - 'permissionMode should change') + self.assertEqual( + upserted_permission.permission_mode, permission_definition["permissionMode"], "permissionMode should change" + ) # read permissions and verify count doesn't increases again permissions = list(user.list_permissions()) self.assertEqual(len(permissions), before_create_count + 1) # update permission id - created_permission.properties['id'] = 'new permission' - created_permission.id = created_permission.properties['id'] + created_permission.properties["id"] = "new permission" + created_permission.id = created_permission.properties["id"] # resource needs to be changed along with the id in order to create a new permission - created_permission.properties['resource'] = 'dbs/N9EdAA==/colls/N9EdAIugXgA=' - created_permission.resource_link = created_permission.properties['resource'] + created_permission.properties["resource"] = "dbs/N9EdAA==/colls/N9EdAIugXgA=" + created_permission.resource_link = created_permission.properties["resource"] # should create new permission since id has changed new_permission = user.upsert_permission(created_permission.properties) # verify id and resource property - self.assertEqual(new_permission.id, - created_permission.id, - 'permission id should be same') + self.assertEqual(new_permission.id, created_permission.id, "permission id should be same") - self.assertEqual(new_permission.resource_link, - created_permission.resource_link, - 'permission resource should be same') + self.assertEqual( + new_permission.resource_link, created_permission.resource_link, "permission resource should be same" + ) # read permissions and verify count increases permissions = list(user.list_permissions()) @@ -1044,108 +912,105 @@ def __SetupEntities(client): db = self.databaseForTest # create collection collection = db.create_container( - id='test_authorization' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_authorization" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id", kind="Hash") ) # create document1 document = collection.create_item( - body={'id': 'doc1', - 'spam': 'eggs', - 'key': 'value'}, + body={"id": "doc1", "spam": "eggs", "key": "value"}, ) # create user - user = db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = db.create_user(body={"id": "user" + str(uuid.uuid4())}) # create permission for collection permission = { - 'id': 'permission On Coll', - 'permissionMode': documents.PermissionMode.Read, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "id": "permission On Coll", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/" + db.id + "/colls/" + collection.id, } permission_on_coll = user.create_permission(body=permission) - self.assertIsNotNone(permission_on_coll.properties['_token'], - 'permission token is invalid') + self.assertIsNotNone(permission_on_coll.properties["_token"], "permission token is invalid") # create permission for document permission = { - 'id': 'permission On Doc', - 'permissionMode': documents.PermissionMode.All, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + document["id"] + "id": "permission On Doc", + "permissionMode": documents.PermissionMode.All, + "resource": "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + document["id"], } permission_on_doc = user.create_permission(body=permission) - self.assertIsNotNone(permission_on_doc.properties['_token'], - 'permission token is invalid') + self.assertIsNotNone(permission_on_doc.properties["_token"], "permission token is invalid") entities = { - 'db': db, - 'coll': collection, - 'doc': document, - 'user': user, - 'permissionOnColl': permission_on_coll, - 'permissionOnDoc': permission_on_doc, + "db": db, + "coll": collection, + "doc": document, + "user": user, + "permissionOnColl": permission_on_coll, + "permissionOnDoc": permission_on_doc, } return entities # Client without any authorization will fail. try: - cosmos_client.CosmosClient(TestCRUDOperations.host, {}, "Session", - connection_policy=TestCRUDOperations.connectionPolicy) + cosmos_client.CosmosClient( + TestCRUDOperations.host, {}, "Session", connection_policy=TestCRUDOperations.connectionPolicy + ) raise Exception("Test did not fail as expected.") except exceptions.CosmosHttpResponseError as error: self.assertEqual(error.status_code, StatusCodes.UNAUTHORIZED) # Client with master key. - client = cosmos_client.CosmosClient(TestCRUDOperations.host, - TestCRUDOperations.masterKey, - "Session", - connection_policy=TestCRUDOperations.connectionPolicy) + client = cosmos_client.CosmosClient( + TestCRUDOperations.host, + TestCRUDOperations.masterKey, + "Session", + connection_policy=TestCRUDOperations.connectionPolicy, + ) # setup entities entities = __SetupEntities(client) - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id: - entities['permissionOnColl'].properties['_token']} + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id: entities["permissionOnColl"].properties["_token"] + } col_client = cosmos_client.CosmosClient( - TestCRUDOperations.host, resource_tokens, "Session", connection_policy=TestCRUDOperations.connectionPolicy) - db = entities['db'] + TestCRUDOperations.host, resource_tokens, "Session", connection_policy=TestCRUDOperations.connectionPolicy + ) + db = entities["db"] old_client_connection = db.client_connection db.client_connection = col_client.client_connection # 1. Success-- Use Col Permission to Read - success_coll = db.get_container_client(container=entities['coll']) + success_coll = db.get_container_client(container=entities["coll"]) # 2. Failure-- Use Col Permission to delete - self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, - db.delete_container, - success_coll) + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, db.delete_container, success_coll) # 3. Success-- Use Col Permission to Read All Docs success_documents = list(success_coll.read_all_items()) - self.assertTrue(success_documents != None, - 'error reading documents') - self.assertEqual(len(success_documents), - 1, - 'Expected 1 Document to be successfully read') + self.assertTrue(success_documents != None, "error reading documents") + self.assertEqual(len(success_documents), 1, "Expected 1 Document to be successfully read") # 4. Success-- Use Col Permission to Read Doc - docId = entities['doc']['id'] - success_doc = success_coll.read_item( - item=docId, - partition_key=docId - ) - self.assertTrue(success_doc != None, 'error reading document') - self.assertEqual( - success_doc['id'], - entities['doc']['id'], - 'Expected to read children using parent permissions') + docId = entities["doc"]["id"] + success_doc = success_coll.read_item(item=docId, partition_key=docId) + self.assertTrue(success_doc != None, "error reading document") + self.assertEqual(success_doc["id"], entities["doc"]["id"], "Expected to read children using parent permissions") # 5. Failure-- Use Col Permission to Delete Doc - self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, - success_coll.delete_item, - docId, docId) - - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id + "/docs/" + docId: - entities['permissionOnDoc'].properties['_token']} + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, success_coll.delete_item, docId, docId) + + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id + + "/docs/" + + docId: entities["permissionOnDoc"].properties["_token"] + } doc_client = cosmos_client.CosmosClient( - TestCRUDOperations.host, resource_tokens, "Session", connection_policy=TestCRUDOperations.connectionPolicy) + TestCRUDOperations.host, resource_tokens, "Session", connection_policy=TestCRUDOperations.connectionPolicy + ) # 6. Success-- Use Doc permission to read doc read_doc = doc_client.get_database_client(db.id).get_container_client(success_coll.id).read_item(docId, docId) @@ -1156,23 +1021,24 @@ def __SetupEntities(client): self.assertEqual(read_doc["id"], docId) db.client_connection = old_client_connection - db.delete_container(entities['coll']) + db.delete_container(entities["coll"]) def test_client_request_timeout(self): # Test is flaky on Emulator - if not ('localhost' in self.host or '127.0.0.1' in self.host): + if not ("localhost" in self.host or "127.0.0.1" in self.host): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 # client does a getDatabaseAccount on initialization, which will not time out because # there is a forced timeout for those calls - client = cosmos_client.CosmosClient(TestCRUDOperations.host, TestCRUDOperations.masterKey, "Session", - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + TestCRUDOperations.host, TestCRUDOperations.masterKey, "Session", connection_policy=connection_policy + ) with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - container.create_item(body={'id': str(uuid.uuid4()), 'name': 'sample'}) + container.create_item(body={"id": str(uuid.uuid4()), "name": "sample"}) def test_read_timeout(self): connection_policy = documents.ConnectionPolicy() @@ -1181,23 +1047,19 @@ def test_read_timeout(self): # this will make a get database account call # this succeeds because the timeout is changed for database account call retries with cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy): - print('initialization') + print("initialization") connection_policy.DBAConnectionTimeout = 0.000000000001 with self.assertRaises(ServiceRequestError): with cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy): - print('initialization') + print("initialization") def test_client_request_timeout_when_connection_retry_configuration_specified(self): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 connection_policy.ConnectionRetryConfiguration = Retry( - total=3, - read=3, - connect=3, - backoff_factor=0.3, - status_forcelist=(500, 502, 504) + total=3, read=3, connect=3, backoff_factor=0.3, status_forcelist=(500, 502, 504) ) # client does a getDatabaseAccount on initialization, which will not time out because # there is a forced timeout for those calls @@ -1205,7 +1067,7 @@ def test_client_request_timeout_when_connection_retry_configuration_specified(se with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - container.create_item(body={'id': str(uuid.uuid4()), 'name': 'sample'}) + container.create_item(body={"id": str(uuid.uuid4()), "name": "sample"}) # TODO: Skipping this test to debug later @unittest.skip @@ -1224,7 +1086,8 @@ def initialize_client_with_connection_core_retry_config(self, retries): retry_total=retries, retry_read=retries, retry_connect=retries, - retry_status=retries) + retry_status=retries, + ) self.fail() except AzureError as e: end_time = time.time() @@ -1247,15 +1110,15 @@ def test_timeout_on_connection_error(self): TestCRUDOperations.masterKey, retry_total=50, connection_timeout=100, - timeout=10) + timeout=10, + ) def test_timeout_on_read_operation(self): error_response = ServiceResponseError("Read timeout") # Initialize transport with passthrough enabled for client setup timeout_transport = TimeoutTransport(error_response, passthrough=True) - client = cosmos_client.CosmosClient( - self.host, self.masterKey, "Session", transport=timeout_transport) + client = cosmos_client.CosmosClient(self.host, self.masterKey, "Session", transport=timeout_transport) timeout_transport.passthrough = False with self.assertRaises(exceptions.CosmosClientTimeoutError): client.create_database_if_not_exists("test", timeout=2) @@ -1264,8 +1127,7 @@ def test_timeout_on_throttling_error(self): # Throttling(429): Keeps retrying -> Eventually times out -> CosmosClientTimeoutError status_response = 429 # Uses Cosmos custom retry timeout_transport = TimeoutTransport(status_response, passthrough=True) - client = cosmos_client.CosmosClient( - self.host, self.masterKey, "Session", transport=timeout_transport) + client = cosmos_client.CosmosClient(self.host, self.masterKey, "Session", transport=timeout_transport) timeout_transport.passthrough = False with self.assertRaises(exceptions.CosmosClientTimeoutError): @@ -1279,8 +1141,7 @@ def test_inner_exceptions_on_timeout(self): # Throttling(429): Keeps retrying -> Eventually times out -> CosmosClientTimeoutError status_response = 429 # Uses Cosmos custom retry timeout_transport = TimeoutTransport(status_response, passthrough=True) - client = cosmos_client.CosmosClient( - self.host, self.masterKey, "Session", transport=timeout_transport) + client = cosmos_client.CosmosClient(self.host, self.masterKey, "Session", transport=timeout_transport) timeout_transport.passthrough = False with self.assertRaises(exceptions.CosmosClientTimeoutError) as cm: @@ -1298,12 +1159,11 @@ def test_timeout_for_read_items(self): # Create a container with multiple partitions created_container = self.databaseForTest.create_container( - id='multi_partition_container_' + str(uuid.uuid4()), + id="multi_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=11000 + offer_throughput=11000, ) - pk_ranges = list(created_container.client_connection._ReadPartitionKeyRanges( - created_container.container_link)) + pk_ranges = list(created_container.client_connection._ReadPartitionKeyRanges(created_container.container_link)) self.assertGreater(len(pk_ranges), 1, "Container should have multiple physical partitions.") # 2. Create items across different logical partitions @@ -1313,7 +1173,7 @@ def test_timeout_for_read_items(self): doc_id = f"item_{i}_{uuid.uuid4()}" pk = i % 10 all_item_ids.add(doc_id) - created_container.create_item({'id': doc_id, 'pk': pk, 'data': i}) + created_container.create_item({"id": doc_id, "pk": pk, "data": i}) items_to_read.append((doc_id, pk)) # Create a custom transport that introduces delays @@ -1331,22 +1191,15 @@ def send(self, request, **kwargs): # Verify timeout fails when cumulative time exceeds limit delayed_transport = DelayedTransport(delay_per_request=2) - client_with_delay = cosmos_client.CosmosClient( - self.host, - self.masterKey, - transport=delayed_transport + client_with_delay = cosmos_client.CosmosClient(self.host, self.masterKey, transport=delayed_transport) + container_with_delay = client_with_delay.get_database_client(self.databaseForTest.id).get_container_client( + created_container.id ) - container_with_delay = client_with_delay.get_database_client( - self.databaseForTest.id - ).get_container_client(created_container.id) start_time = time.time() with self.assertRaises(exceptions.CosmosClientTimeoutError): # This should timeout because multiple partition requests * 2s delay > 5s timeout - list(container_with_delay.read_items( - items = items_to_read, - timeout = 5 # 5 second total timeout - )) + list(container_with_delay.read_items(items=items_to_read, timeout=5)) # 5 second total timeout elapsed_time = time.time() - start_time @@ -1361,28 +1214,28 @@ def send(self, request, **kwargs): doc_id = f"item_{i}_{uuid.uuid4()}" pk = i % 10 all_item_ids.add(doc_id) - created_container.create_item({'id': doc_id, 'pk': pk, 'data': i}) + created_container.create_item({"id": doc_id, "pk": pk, "data": i}) items_to_read.append((doc_id, pk)) - items = list(container_with_delay.read_items( - items=items_to_read, - )) + items = list( + container_with_delay.read_items( + items=items_to_read, + ) + ) elapsed_time = time.time() - start_time - def test_timeout_for_paged_request(self): """Test that timeout applies to each individual page request, not cumulatively""" # Create container and add items created_container = self.databaseForTest.create_container( - id='paged_timeout_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="paged_timeout_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) # Create enough items to ensure multiple pages for i in range(100): - created_container.create_item({'id': f'item_{i}', 'pk': i % 10, 'data': 'x' * 1000}) + created_container.create_item({"id": f"item_{i}", "pk": i % 10, "data": "x" * 1000}) # Create a transport that delays each request class DelayedTransport(RequestsTransport): @@ -1396,19 +1249,17 @@ def send(self, request, **kwargs): # Test with delayed transport delayed_transport = DelayedTransport(delay_seconds=3) - client_with_delay = cosmos_client.CosmosClient( - self.host, self.masterKey, transport=delayed_transport + client_with_delay = cosmos_client.CosmosClient(self.host, self.masterKey, transport=delayed_transport) + container_with_delay = client_with_delay.get_database_client(self.databaseForTest.id).get_container_client( + created_container.id ) - container_with_delay = client_with_delay.get_database_client( - self.databaseForTest.id - ).get_container_client(created_container.id) # Test 1: Timeout should apply per page item_pages = container_with_delay.query_items( query="SELECT * FROM c", enable_cross_partition_query=True, max_item_count=10, # Small page size - timeout=5 # Pass timeout here + timeout=5, # Pass timeout here ).by_page() # First page should succeed with 5s timeout (3s delay < 5s timeout) @@ -1424,7 +1275,7 @@ def send(self, request, **kwargs): query="SELECT * FROM c", enable_cross_partition_query=True, max_item_count=10, - timeout=2 # 2s timeout < 3s delay, should fail + timeout=2, # 2s timeout < 3s delay, should fail ).by_page() with self.assertRaises(exceptions.CosmosClientTimeoutError): @@ -1438,186 +1289,149 @@ def test_timeout_for_point_operation(self): # Create a container for testing created_container = self.databaseForTest.create_container( - id='point_op_timeout_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="point_op_timeout_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) # Create a test item - test_item = { - 'id': 'test_item_1', - 'pk': 'partition1', - 'data': 'test_data' - } + test_item = {"id": "test_item_1", "pk": "partition1", "data": "test_data"} created_container.create_item(test_item) # Test 1: Short timeout should fail with self.assertRaises(exceptions.CosmosClientTimeoutError): created_container.read_item( - item='test_item_1', - partition_key='partition1', - timeout=0.00000002 # very small timeout to force failure + item="test_item_1", + partition_key="partition1", + timeout=0.00000002, # very small timeout to force failure ) # Test 2: Long timeout should succeed - result = created_container.read_item( - item='test_item_1', - partition_key='partition1', - timeout=3.0 - ) - self.assertEqual(result['id'], 'test_item_1') + result = created_container.read_item(item="test_item_1", partition_key="partition1", timeout=3.0) + self.assertEqual(result["id"], "test_item_1") def test_point_operation_read_timeout(self): """Test that point operations respect client provided read timeout""" # Create a container for testing container = self.databaseForTest.create_container( - id='point_op_timeout_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="point_op_timeout_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) # Create a test item - test_item = { - 'id': 'test_item_1', - 'pk': 'partition1', - 'data': 'test_data' - } + test_item = {"id": "test_item_1", "pk": "partition1", "data": "test_data"} container.create_item(test_item) try: - container.read_item( - item='test_item_1', - partition_key='partition1', - read_timeout=0.000003 - ) + container.read_item(item="test_item_1", partition_key="partition1", read_timeout=0.000003) except Exception as e: print(f"Exception is {e}") # TODO: for read timeouts azure-core returns a ServiceResponseError, needs to be fixed in azure-core and then this test can be enabled @unittest.skip def test_query_operation_single_partition_read_timeout(self): - """Test that timeout is properly maintained across multiple network requests for a single logical operation - """ + """Test that timeout is properly maintained across multiple network requests for a single logical operation""" # Create a container with multiple partitions container = self.databaseForTest.create_container( - id='single_partition_container_' + str(uuid.uuid4()), + id="single_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), ) single_partition_key = 0 - large_string = 'a' * 1000 # 1KB string + large_string = "a" * 1000 # 1KB string for i in range(500): # Insert 500 documents - container.create_item({ - 'id': f'item_{i}', - 'pk': single_partition_key, - 'data': large_string, - 'order_field': i - }) + container.create_item( + {"id": f"item_{i}", "pk": single_partition_key, "data": large_string, "order_field": i} + ) with self.assertRaises(exceptions.CosmosClientTimeoutError): - items = list(container.query_items( - query="SELECT * FROM c ORDER BY c.order_field ASC", - max_item_count=100, - read_timeout=0.00005, - partition_key=single_partition_key - )) + items = list( + container.query_items( + query="SELECT * FROM c ORDER BY c.order_field ASC", + max_item_count=100, + read_timeout=0.00005, + partition_key=single_partition_key, + ) + ) self.assertEqual(len(items), 500) # TODO: for read timeouts azure-core returns a ServiceResponseError, needs to be fixed in azure-core and then this test can be enabled @unittest.skip def test_query_operation_cross_partition_read_timeout(self): - """Test that timeout is properly maintained across multiple partition requests for a single logical operation - """ + """Test that timeout is properly maintained across multiple partition requests for a single logical operation""" # Create a container with multiple partitions container = self.databaseForTest.create_container( - id='multi_partition_container_' + str(uuid.uuid4()), + id="multi_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=11000 + offer_throughput=11000, ) # 2. Create large documents to increase payload size - large_string = 'a' * 1000 # 1KB string + large_string = "a" * 1000 # 1KB string for i in range(500): # Insert 500 documents - container.create_item({ - 'id': f'item_{i}', - 'pk': i % 2, - 'data': large_string, - 'order_field': i - }) + container.create_item({"id": f"item_{i}", "pk": i % 2, "data": large_string, "order_field": i}) - pk_ranges = list(container.client_connection._ReadPartitionKeyRanges( - container.container_link)) + pk_ranges = list(container.client_connection._ReadPartitionKeyRanges(container.container_link)) self.assertGreater(len(pk_ranges), 1, "Container should have multiple physical partitions.") with self.assertRaises(exceptions.CosmosClientTimeoutError): # This should timeout because of multiple partition requests - list(container.query_items( + list( + container.query_items( + query="SELECT * FROM c ORDER BY c.order_field ASC", + enable_cross_partition_query=True, + max_item_count=100, + read_timeout=0.00005, + ) + ) + # This shouldn't result in any error because the default 65seconds is respected + + items = list( + container.query_items( query="SELECT * FROM c ORDER BY c.order_field ASC", enable_cross_partition_query=True, max_item_count=100, - read_timeout=0.00005, - )) - # This shouldn't result in any error because the default 65seconds is respected - - items = list(container.query_items( - query="SELECT * FROM c ORDER BY c.order_field ASC", - enable_cross_partition_query=True, - max_item_count=100, - )) + ) + ) self.assertEqual(len(items), 500) - def test_query_iterable_functionality(self): - collection = self.databaseForTest.create_container("query-iterable-container", - partition_key=PartitionKey("/pk")) - - doc1 = collection.create_item(body={'id': 'doc1', 'prop1': 'value1', 'pk': 'pk'}) - doc2 = collection.create_item(body={'id': 'doc2', 'prop1': 'value2', 'pk': 'pk'}) - doc3 = collection.create_item(body={'id': 'doc3', 'prop1': 'value3', 'pk': 'pk'}) - resources = { - 'coll': collection, - 'doc1': doc1, - 'doc2': doc2, - 'doc3': doc3 - } + collection = self.databaseForTest.create_container( + "query-iterable-container", partition_key=PartitionKey("/pk") + ) + + doc1 = collection.create_item(body={"id": "doc1", "prop1": "value1", "pk": "pk"}) + doc2 = collection.create_item(body={"id": "doc2", "prop1": "value2", "pk": "pk"}) + doc3 = collection.create_item(body={"id": "doc3", "prop1": "value3", "pk": "pk"}) + resources = {"coll": collection, "doc1": doc1, "doc2": doc2, "doc3": doc3} - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) docs = list(iter(results)) - self.assertEqual(3, - len(docs), - 'QueryIterable should return all documents' + - ' using continuation') - self.assertEqual(resources['doc1']['id'], docs[0]['id']) - self.assertEqual(resources['doc2']['id'], docs[1]['id']) - self.assertEqual(resources['doc3']['id'], docs[2]['id']) + self.assertEqual(3, len(docs), "QueryIterable should return all documents" + " using continuation") + self.assertEqual(resources["doc1"]["id"], docs[0]["id"]) + self.assertEqual(resources["doc2"]["id"], docs[1]["id"]) + self.assertEqual(resources["doc3"]["id"], docs[2]["id"]) # Validate QueryIterable iterator with 'for'. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) counter = 0 # test QueryIterable with 'for'. for doc in iter(results): counter += 1 if counter == 1: - self.assertEqual(resources['doc1']['id'], - doc['id'], - 'first document should be doc1') + self.assertEqual(resources["doc1"]["id"], doc["id"], "first document should be doc1") elif counter == 2: - self.assertEqual(resources['doc2']['id'], - doc['id'], - 'second document should be doc2') + self.assertEqual(resources["doc2"]["id"], doc["id"], "second document should be doc2") elif counter == 3: - self.assertEqual(resources['doc3']['id'], - doc['id'], - 'third document should be doc3') + self.assertEqual(resources["doc3"]["id"], doc["id"], "third document should be doc3") self.assertEqual(counter, 3) # Get query results page by page. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) page_iter = results.by_page() first_block = list(next(page_iter)) - self.assertEqual(2, len(first_block), 'First block should have 2 entries.') - self.assertEqual(resources['doc1']['id'], first_block[0]['id']) - self.assertEqual(resources['doc2']['id'], first_block[1]['id']) - self.assertEqual(1, len(list(next(page_iter))), 'Second block should have 1 entry.') + self.assertEqual(2, len(first_block), "First block should have 2 entries.") + self.assertEqual(resources["doc1"]["id"], first_block[0]["id"]) + self.assertEqual(resources["doc2"]["id"], first_block[1]["id"]) + self.assertEqual(1, len(list(next(page_iter))), "Second block should have 1 entry.") with self.assertRaises(StopIteration): next(page_iter) @@ -1653,60 +1467,58 @@ def test_get_resource_with_dictionary_and_object(self): read_container = created_db.get_container_client(created_properties) self.assertEqual(read_container.id, created_container.id) - created_item = created_container.create_item({'id': '1' + str(uuid.uuid4()), 'pk': 'pk'}) + created_item = created_container.create_item({"id": "1" + str(uuid.uuid4()), "pk": "pk"}) # read item with id - read_item = created_container.read_item(item=created_item['id'], partition_key=created_item['pk']) - self.assertEqual(read_item['id'], created_item['id']) + read_item = created_container.read_item(item=created_item["id"], partition_key=created_item["pk"]) + self.assertEqual(read_item["id"], created_item["id"]) # read item with properties - read_item = created_container.read_item(item=created_item, partition_key=created_item['pk']) - self.assertEqual(read_item['id'], created_item['id']) + read_item = created_container.read_item(item=created_item, partition_key=created_item["pk"]) + self.assertEqual(read_item["id"], created_item["id"]) - created_sproc = created_container.scripts.create_stored_procedure({ - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': 'function () { }' - }) + created_sproc = created_container.scripts.create_stored_procedure( + {"id": "storedProcedure" + str(uuid.uuid4()), "body": "function () { }"} + ) # read sproc with id - read_sproc = created_container.scripts.get_stored_procedure(created_sproc['id']) - self.assertEqual(read_sproc['id'], created_sproc['id']) + read_sproc = created_container.scripts.get_stored_procedure(created_sproc["id"]) + self.assertEqual(read_sproc["id"], created_sproc["id"]) # read sproc with properties read_sproc = created_container.scripts.get_stored_procedure(created_sproc) - self.assertEqual(read_sproc['id'], created_sproc['id']) + self.assertEqual(read_sproc["id"], created_sproc["id"]) - created_trigger = created_container.scripts.create_trigger({ - 'id': 'sample trigger' + str(uuid.uuid4()), - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }) + created_trigger = created_container.scripts.create_trigger( + { + "id": "sample trigger" + str(uuid.uuid4()), + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + } + ) # read trigger with id - read_trigger = created_container.scripts.get_trigger(created_trigger['id']) - self.assertEqual(read_trigger['id'], created_trigger['id']) + read_trigger = created_container.scripts.get_trigger(created_trigger["id"]) + self.assertEqual(read_trigger["id"], created_trigger["id"]) # read trigger with properties read_trigger = created_container.scripts.get_trigger(created_trigger) - self.assertEqual(read_trigger['id'], created_trigger['id']) + self.assertEqual(read_trigger["id"], created_trigger["id"]) - created_udf = created_container.scripts.create_user_defined_function({ - 'id': 'sample udf' + str(uuid.uuid4()), - 'body': 'function() {var x = 10;}' - }) + created_udf = created_container.scripts.create_user_defined_function( + {"id": "sample udf" + str(uuid.uuid4()), "body": "function() {var x = 10;}"} + ) # read udf with id - read_udf = created_container.scripts.get_user_defined_function(created_udf['id']) - self.assertEqual(created_udf['id'], read_udf['id']) + read_udf = created_container.scripts.get_user_defined_function(created_udf["id"]) + self.assertEqual(created_udf["id"], read_udf["id"]) # read udf with properties read_udf = created_container.scripts.get_user_defined_function(created_udf) - self.assertEqual(created_udf['id'], read_udf['id']) + self.assertEqual(created_udf["id"], read_udf["id"]) - created_user = created_db.create_user({ - 'id': 'user' + str(uuid.uuid4()) - }) + created_user = created_db.create_user({"id": "user" + str(uuid.uuid4())}) # read user with id read_user = created_db.get_user_client(created_user.id) @@ -1721,12 +1533,14 @@ def test_get_resource_with_dictionary_and_object(self): read_user = created_db.get_user_client(created_user_properties) self.assertEqual(read_user.id, created_user.id) - created_permission = created_user.create_permission({ - 'id': 'all permission' + str(uuid.uuid4()), - 'permissionMode': documents.PermissionMode.All, - 'resource': created_container.container_link, - 'resourcePartitionKey': [1] - }) + created_permission = created_user.create_permission( + { + "id": "all permission" + str(uuid.uuid4()), + "permissionMode": documents.PermissionMode.All, + "resource": created_container.container_link, + "resourcePartitionKey": [1], + } + ) # read permission with id read_permission = created_user.get_permission(created_permission.id) @@ -1749,8 +1563,8 @@ def test_delete_all_items_by_partition_key(self): # create container created_collection = created_db.create_container( - id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/pk', kind='Hash') + id="test_delete_all_items_by_partition_key " + str(uuid.uuid4()), + partition_key=PartitionKey(path="/pk", kind="Hash"), ) # Create two partition keys partition_key1 = "{}-{}".format("Partition Key 1", str(uuid.uuid4())) @@ -1758,9 +1572,7 @@ def test_delete_all_items_by_partition_key(self): # add items for partition key 1 for i in range(1, 3): - created_collection.upsert_item( - dict(id="item{}".format(i), pk=partition_key1) - ) + created_collection.upsert_item(dict(id="item{}".format(i), pk=partition_key1)) # add items for partition key 2 @@ -1796,11 +1608,10 @@ def test_patch_operations(self): "id": "patch_item", "pk": pkValue, "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } created_container.create_item(item) # Define and run patch operations operations = [ @@ -1809,10 +1620,11 @@ def test_patch_operations(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] - patched_item = created_container.patch_item(item="patch_item", partition_key=pkValue, - patch_operations=operations) + patched_item = created_container.patch_item( + item="patch_item", partition_key=pkValue, patch_operations=operations + ) # Verify results from patch operations self.assertTrue(patched_item.get("color") is None) self.assertTrue(patched_item.get("prop") is None) @@ -1857,11 +1669,10 @@ def test_conditional_patching(self): "id": "conditional_patch_item", "pk": pkValue, "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } created_container.create_item(item) # Define patch operations @@ -1871,22 +1682,30 @@ def test_conditional_patching(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] # Run patch operations with wrong filter num_false = item.get("number") + 1 filter_predicate = "from root where root.number = " + str(num_false) try: - created_container.patch_item(item="conditional_patch_item", partition_key=pkValue, - patch_operations=operations, filter_predicate=filter_predicate) + created_container.patch_item( + item="conditional_patch_item", + partition_key=pkValue, + patch_operations=operations, + filter_predicate=filter_predicate, + ) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.PRECONDITION_FAILED) # Run patch operations with correct filter filter_predicate = "from root where root.number = " + str(item.get("number")) - patched_item = created_container.patch_item(item="conditional_patch_item", partition_key=pkValue, - patch_operations=operations, filter_predicate=filter_predicate) + patched_item = created_container.patch_item( + item="conditional_patch_item", + partition_key=pkValue, + patch_operations=operations, + filter_predicate=filter_predicate, + ) # Verify results from patch operations self.assertTrue(patched_item.get("color") is None) self.assertTrue(patched_item.get("prop") is None) @@ -1975,8 +1794,9 @@ def test_priority_level(self): def priority_mock_execute_function(function, *args, **kwargs): if args: - priority_headers.append(args[4].headers[HttpHeaders.PriorityLevel] - if HttpHeaders.PriorityLevel in args[4].headers else '') + priority_headers.append( + args[4].headers[HttpHeaders.PriorityLevel] if HttpHeaders.PriorityLevel in args[4].headers else "" + ) return self.OriginalExecuteFunction(function, *args, **kwargs) _retry_utility.ExecuteFunction = priority_mock_execute_function @@ -2012,7 +1832,7 @@ def _MockExecuteFunction(self, function, *args, **kwargs): return self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_async.py b/sdk/cosmos/azure-cosmos/tests/test_crud_async.py index 8e6a3529ff86..dc1d491597b1 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_async.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import asyncio import logging import os @@ -51,11 +51,12 @@ async def send(self, request, **kwargs): await response.load_body() return response + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosLong class TestCRUDOperationsAsync(unittest.IsolatedAsyncioTestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" + client: CosmosClient = None configs = test_config.TestConfig host = configs.host @@ -73,18 +74,18 @@ async def __assert_http_failure_with_status(self, status_code, func, *args, **kw """ try: await func(*args, **kwargs) - self.fail('function should fail.') + self.fail("function should fail.") except exceptions.CosmosHttpResponseError as inst: assert inst.status_code == status_code @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): use_multiple_write_locations = False @@ -103,30 +104,32 @@ async def test_partitioned_collection_execute_stored_procedure_async(self): document_id = str(uuid.uuid4()) sproc = { - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' var client = getContext().getCollection();' + - ' client.createDocument(client.getSelfLink(), { id: "' + document_id + '", pk : 2}, ' + - ' {}, function(err, docCreated, options) { ' + - ' if(err) throw new Error(\'Error while creating document: \' + err.message);' + - ' else {' + - ' getContext().getResponse().setBody(1);' + - ' }' + - ' });}') + "id": "storedProcedure" + str(uuid.uuid4()), + "body": ( + "function () {" + + " var client = getContext().getCollection();" + + ' client.createDocument(client.getSelfLink(), { id: "' + + document_id + + '", pk : 2}, ' + + " {}, function(err, docCreated, options) { " + + " if(err) throw new Error('Error while creating document: ' + err.message);" + + " else {" + + " getContext().getResponse().setBody(1);" + + " }" + + " });}" + ), } created_sproc = await created_collection.scripts.create_stored_procedure(body=sproc) # Partiton Key value same as what is specified in the stored procedure body - result = await created_collection.scripts.execute_stored_procedure(sproc=created_sproc['id'], partition_key=2) + result = await created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=2) assert result == 1 # Partiton Key value different than what is specified in the stored procedure body will cause a bad request(400) error await self.__assert_http_failure_with_status( - StatusCodes.BAD_REQUEST, - created_collection.scripts.execute_stored_procedure, - created_sproc['id']) + StatusCodes.BAD_REQUEST, created_collection.scripts.execute_stored_procedure, created_sproc["id"] + ) async def test_partitioned_collection_partition_key_value_types_async(self): @@ -134,74 +137,57 @@ async def test_partitioned_collection_partition_key_value_types_async(self): created_collection = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': None, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": None, "spam": "eggs"} # create document with partitionKey set as None here await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "spam": "eggs"} # create document with partitionKey set as Undefined here await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': True, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": True, "spam": "eggs"} # create document with bool partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 'value', - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": "value", "spam": "eggs"} # create document with string partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 100, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 100, "spam": "eggs"} # create document with int partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 10.50, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 10.50, "spam": "eggs"} # create document with float partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'pk': 'value'} + document_definition = {"name": "sample document", "spam": "eggs", "pk": "value"} # Should throw an error because automatic id generation is disabled always. await self.__assert_http_failure_with_status( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition + StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition ) async def test_partitioned_collection_conflict_crud_and_query_async(self): created_collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - conflict_definition = {'id': 'new conflict', - 'resourceId': 'doc1', - 'operationType': 'create', - 'resourceType': 'document' - } + conflict_definition = { + "id": "new conflict", + "resourceId": "doc1", + "operationType": "create", + "resourceType": "document", + } # read conflict here will return resource not found(404) since there is no conflict here await self.__assert_http_failure_with_status( - StatusCodes.NOT_FOUND, - created_collection.get_conflict, - conflict_definition['id'], - conflict_definition['id'] + StatusCodes.NOT_FOUND, created_collection.get_conflict, conflict_definition["id"], conflict_definition["id"] ) # Read conflict feed doesn't require partitionKey to be specified as it's a cross partition thing @@ -212,22 +198,29 @@ async def test_partitioned_collection_conflict_crud_and_query_async(self): await self.__assert_http_failure_with_status( StatusCodes.NOT_FOUND, created_collection.delete_conflict, - conflict_definition['id'], - conflict_definition['id'] + conflict_definition["id"], + conflict_definition["id"], ) - conflict_list = [conflict async for conflict in created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'')] + conflict_list = [ + conflict + async for conflict in created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'" + ) + ] assert len(conflict_list) == 0 # query conflicts by providing the partitionKey value - options = {'partitionKey': conflict_definition.get('id')} - conflict_list = [conflict async for conflict in created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', - # nosec - partition_key=conflict_definition['id'] - )] + options = {"partitionKey": conflict_definition.get("id")} + conflict_list = [ + conflict + async for conflict in created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + # nosec + partition_key=conflict_definition["id"], + ) + ] assert len(conflict_list) == 0 @@ -241,68 +234,69 @@ async def test_document_crud_async(self): before_create_documents_count = len(document_list) # create a document with auto ID generation - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk'} - - created_document = await created_collection.create_item(body=document_definition, - enable_automatic_id_generation=True) - assert created_document.get('name') == document_definition['name'] + document_definition = {"name": "sample document", "spam": "eggs", "key": "value", "pk": "pk"} - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk', - 'id': str(uuid.uuid4())} + created_document = await created_collection.create_item( + body=document_definition, enable_automatic_id_generation=True + ) + assert created_document.get("name") == document_definition["name"] + + document_definition = { + "name": "sample document", + "spam": "eggs", + "key": "value", + "pk": "pk", + "id": str(uuid.uuid4()), + } created_document = await created_collection.create_item(body=document_definition) - assert created_document.get('name') == document_definition['name'] - assert created_document.get('id') == document_definition['id'] + assert created_document.get("name") == document_definition["name"] + assert created_document.get("id") == document_definition["id"] # duplicated documents are not allowed when 'id' is provided. duplicated_definition_with_id = document_definition.copy() - await self.__assert_http_failure_with_status(StatusCodes.CONFLICT, - created_collection.create_item, - duplicated_definition_with_id) + await self.__assert_http_failure_with_status( + StatusCodes.CONFLICT, created_collection.create_item, duplicated_definition_with_id + ) # read documents after creation document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == before_create_documents_count + 2 # query documents - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.name=@name', - parameters=[{'name': '@name', 'value': document_definition['name']}] - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.name=@name", + parameters=[{"name": "@name", "value": document_definition["name"]}], + ) + ] assert document_list is not None - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.name=@name', - parameters=[ - {'name': '@name', 'value': document_definition['name']} - ], - enable_scan_in_query=True - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.name=@name", + parameters=[{"name": "@name", "value": document_definition["name"]}], + enable_scan_in_query=True, + ) + ] assert document_list is not None # replace document. - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' - old_etag = created_document['_etag'] - replaced_document = await created_collection.replace_item( - item=created_document['id'], - body=created_document - ) - assert replaced_document['name'] == 'replaced document' - assert replaced_document['spam'] == 'not eggs' - assert created_document['id'] == replaced_document['id'] + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" + old_etag = created_document["_etag"] + replaced_document = await created_collection.replace_item(item=created_document["id"], body=created_document) + assert replaced_document["name"] == "replaced document" + assert replaced_document["spam"] == "not eggs" + assert created_document["id"] == replaced_document["id"] # replace document based on condition - replaced_document['name'] = 'replaced document based on condition' - replaced_document['spam'] = 'new spam field' + replaced_document["name"] = "replaced document based on condition" + replaced_document["spam"] = "new spam field" # should fail for stale etag await self.__assert_http_failure_with_status( StatusCodes.PRECONDITION_FAILED, created_collection.replace_item, - replaced_document['id'], + replaced_document["id"], replaced_document, if_match=old_etag, ) @@ -310,9 +304,8 @@ async def test_document_crud_async(self): # should fail if only etag specified try: await created_collection.replace_item( - etag=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document) + etag=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if only etag specified") except ValueError: pass @@ -320,18 +313,16 @@ async def test_document_crud_async(self): # should fail if only match condition specified try: await created_collection.replace_item( - match_condition=MatchConditions.IfNotModified, - item=replaced_document['id'], - body=replaced_document) + match_condition=MatchConditions.IfNotModified, item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if only match condition specified") except ValueError: pass try: await created_collection.replace_item( - match_condition=MatchConditions.IfModified, - item=replaced_document['id'], - body=replaced_document) + match_condition=MatchConditions.IfModified, item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if only match condition specified") except ValueError: pass @@ -339,9 +330,8 @@ async def test_document_crud_async(self): # should fail if invalid match condition specified try: await created_collection.replace_item( - match_condition=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document) + match_condition=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if invalid match condition specified") except TypeError: pass @@ -349,30 +339,25 @@ async def test_document_crud_async(self): # should pass for most recent etag replaced_document_conditional = await created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - etag=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document + etag=replaced_document["_etag"], + item=replaced_document["id"], + body=replaced_document, ) - assert replaced_document_conditional['name'] == 'replaced document based on condition' - assert replaced_document_conditional['spam'] == 'new spam field' - assert replaced_document_conditional['id'] == replaced_document['id'] + assert replaced_document_conditional["name"] == "replaced document based on condition" + assert replaced_document_conditional["spam"] == "new spam field" + assert replaced_document_conditional["id"] == replaced_document["id"] # read document one_document_from_read = await created_collection.read_item( - item=replaced_document['id'], - partition_key=replaced_document['pk'] + item=replaced_document["id"], partition_key=replaced_document["pk"] ) - assert replaced_document['id'] == one_document_from_read['id'] + assert replaced_document["id"] == one_document_from_read["id"] # delete document - await created_collection.delete_item( - item=replaced_document, - partition_key=replaced_document['pk'] - ) + await created_collection.delete_item(item=replaced_document, partition_key=replaced_document["pk"]) # read documents after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - created_collection.read_item, - replaced_document['id'], - replaced_document['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, created_collection.read_item, replaced_document["id"], replaced_document["id"] + ) async def test_document_upsert_async(self): @@ -384,21 +369,17 @@ async def test_document_upsert_async(self): before_create_documents_count = len(document_list) # create document definition - document_definition = {'id': 'doc', - 'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk'} + document_definition = {"id": "doc", "name": "sample document", "spam": "eggs", "key": "value", "pk": "pk"} # create document using Upsert API created_document = await created_collection.upsert_item(body=document_definition) # verify id property - assert created_document['id'] == document_definition['id'] + assert created_document["id"] == document_definition["id"] # test error for non-string id with self.assertRaises(TypeError): - document_definition['id'] = 7 + document_definition["id"] = 7 await created_collection.upsert_item(body=document_definition) # read documents after creation and verify updated count @@ -406,47 +387,46 @@ async def test_document_upsert_async(self): assert len(document_list) == before_create_documents_count + 1 # update document - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" # should replace document since it already exists upserted_document = await created_collection.upsert_item(body=created_document) # verify the changed properties - assert upserted_document['name'] == created_document['name'] - assert upserted_document['spam'] == created_document['spam'] + assert upserted_document["name"] == created_document["name"] + assert upserted_document["spam"] == created_document["spam"] # verify id property - assert upserted_document['id'] == created_document['id'] + assert upserted_document["id"] == created_document["id"] # read documents after upsert and verify count doesn't increases again document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == before_create_documents_count + 1 - created_document['id'] = 'new id' + created_document["id"] = "new id" # Upsert should create new document since the id is different new_document = await created_collection.upsert_item(body=created_document) # Test modified access conditions - created_document['spam'] = 'more eggs' + created_document["spam"] = "more eggs" await created_collection.upsert_item(body=created_document) with self.assertRaises(exceptions.CosmosHttpResponseError): await created_collection.upsert_item( - body=created_document, - match_condition=MatchConditions.IfNotModified, - etag=new_document['_etag']) + body=created_document, match_condition=MatchConditions.IfNotModified, etag=new_document["_etag"] + ) # verify id property - assert created_document['id'] == new_document['id'] + assert created_document["id"] == new_document["id"] # read documents after upsert and verify count increases document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == before_create_documents_count + 2 # delete documents - await created_collection.delete_item(item=upserted_document, partition_key=upserted_document['pk']) - await created_collection.delete_item(item=new_document, partition_key=new_document['pk']) + await created_collection.delete_item(item=upserted_document, partition_key=upserted_document["pk"]) + await created_collection.delete_item(item=new_document, partition_key=new_document["pk"]) # read documents after delete and verify count remains the same document_list = [document async for document in created_collection.read_all_items()] @@ -456,47 +436,25 @@ async def test_geospatial_index_async(self): db = self.database_for_test # partial policy specified collection = await db.create_container( - id='collection with spatial index ' + str(uuid.uuid4()), + id="collection with spatial index " + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ - { - 'path': '/"Location"/?', - 'indexes': [ - { - 'kind': 'Spatial', - 'dataType': 'Point' - } - ] - }, - { - 'path': '/' - } + "includedPaths": [ + {"path": '/"Location"/?', "indexes": [{"kind": "Spatial", "dataType": "Point"}]}, + {"path": "/"}, ] }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) - await collection.create_item( - body={ - 'id': 'loc1', - 'Location': { - 'type': 'Point', - 'coordinates': [20.0, 20.0] - } - } - ) - await collection.create_item( - body={ - 'id': 'loc2', - 'Location': { - 'type': 'Point', - 'coordinates': [100.0, 100.0] - } - } - ) - results = [result async for result in collection.query_items( - query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)")] + await collection.create_item(body={"id": "loc1", "Location": {"type": "Point", "coordinates": [20.0, 20.0]}}) + await collection.create_item(body={"id": "loc2", "Location": {"type": "Point", "coordinates": [100.0, 100.0]}}) + results = [ + result + async for result in collection.query_items( + query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)" + ) + ] assert len(results) == 1 - assert 'loc1' == results[0]['id'] + assert "loc1" == results[0]["id"] # CRUD test for User resource @@ -509,28 +467,28 @@ async def test_user_crud_async(self): users = [user async for user in db.list_users()] before_create_count = len(users) # create user - user_id = 'new user' + str(uuid.uuid4()) - user = await db.create_user(body={'id': user_id}) + user_id = "new user" + str(uuid.uuid4()) + user = await db.create_user(body={"id": user_id}) assert user.id == user_id # list users after creation users = [user async for user in db.list_users()] assert len(users) == before_create_count + 1 # query users - results = [user async for user in db.query_users( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': user_id} - ] - )] + results = [ + user + async for user in db.query_users( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": user_id}] + ) + ] assert results is not None # replace user - replaced_user_id = 'replaced user' + str(uuid.uuid4()) + replaced_user_id = "replaced user" + str(uuid.uuid4()) user_properties = await user.read() - user_properties['id'] = replaced_user_id + user_properties["id"] = replaced_user_id replaced_user = await db.replace_user(user_id, user_properties) assert replaced_user.id == replaced_user_id - assert user_properties['id'] == replaced_user.id + assert user_properties["id"] == replaced_user.id # read user user = db.get_user_client(replaced_user.id) @@ -541,8 +499,7 @@ async def test_user_crud_async(self): # read user after deletion deleted_user = db.get_user_client(user.id) - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - deleted_user.read) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, deleted_user.read) async def test_user_upsert_async(self): @@ -554,8 +511,8 @@ async def test_user_upsert_async(self): before_create_count = len(users) # create user using Upsert API - user_id = 'user' + str(uuid.uuid4()) - user = await db.upsert_user(body={'id': user_id}) + user_id = "user" + str(uuid.uuid4()) + user = await db.upsert_user(body={"id": user_id}) # verify id property assert user.id == user_id @@ -576,8 +533,8 @@ async def test_user_upsert_async(self): assert len(users) == before_create_count + 1 user_properties = await user.read() - user_properties['id'] = 'new user' + str(uuid.uuid4()) - user.id = user_properties['id'] + user_properties["id"] = "new user" + str(uuid.uuid4()) + user.id = user_properties["id"] # Upsert should create new user since id is different new_user = await db.upsert_user(user_properties) @@ -602,36 +559,36 @@ async def test_permission_crud_async(self): # create database db = self.database_for_test # create user - user = await db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = await db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # list permissions permissions = [permission async for permission in user.list_permissions()] before_create_count = len(permissions) permission = { - 'id': 'new permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "new permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission permission = await user.create_permission(permission) - assert permission.id == 'new permission' + assert permission.id == "new permission" # list permissions after creation permissions = [permission async for permission in user.list_permissions()] assert len(permissions) == before_create_count + 1 # query permissions - results = [permission async for permission in user.query_permissions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': permission.id} - ] - )] + results = [ + permission + async for permission in user.query_permissions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": permission.id}] + ) + ] assert results is not None # replace permission change_permission = permission.properties.copy() - permission.properties['id'] = 'replaced permission' - permission.id = permission.properties['id'] - replaced_permission = await user.replace_permission(change_permission['id'], permission.properties) - assert replaced_permission.id == 'replaced permission' + permission.properties["id"] = "replaced permission" + permission.id = permission.properties["id"] + replaced_permission = await user.replace_permission(change_permission["id"], permission.properties) + assert replaced_permission.id == "replaced permission" assert permission.id == replaced_permission.id # read permission permission = await user.get_permission(replaced_permission.id) @@ -639,9 +596,7 @@ async def test_permission_crud_async(self): # delete permission await user.delete_permission(replaced_permission.id) # read permission after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - user.get_permission, - permission.id) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, user.get_permission, permission.id) async def test_permission_upsert_async(self): @@ -649,30 +604,30 @@ async def test_permission_upsert_async(self): db = self.database_for_test # create user - user = await db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = await db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # read permissions and check count permissions = [permission async for permission in user.list_permissions()] before_create_count = len(permissions) permission_definition = { - 'id': 'permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission using Upsert API created_permission = await user.upsert_permission(permission_definition) # verify id property - assert created_permission.id == permission_definition['id'] + assert created_permission.id == permission_definition["id"] # read permissions after creation and verify updated count permissions = [permission async for permission in user.list_permissions()] assert len(permissions) == before_create_count + 1 # update permission mode - permission_definition['permissionMode'] = documents.PermissionMode.All + permission_definition["permissionMode"] = documents.PermissionMode.All # should repace the permission since it already exists upserted_permission = await user.upsert_permission(permission_definition) @@ -680,18 +635,18 @@ async def test_permission_upsert_async(self): assert upserted_permission.id == created_permission.id # verify changed property - assert upserted_permission.permission_mode == permission_definition['permissionMode'] + assert upserted_permission.permission_mode == permission_definition["permissionMode"] # read permissions and verify count doesn't increase again permissions = [permission async for permission in user.list_permissions()] assert len(permissions) == before_create_count + 1 # update permission id - created_permission.properties['id'] = 'new permission' - created_permission.id = created_permission.properties['id'] + created_permission.properties["id"] = "new permission" + created_permission.id = created_permission.properties["id"] # resource needs to be changed along with the id in order to create a new permission - created_permission.properties['resource'] = 'dbs/N9EdAA==/colls/N9EdAIugXgA=' - created_permission.resource_link = created_permission.properties['resource'] + created_permission.properties["resource"] = "dbs/N9EdAA==/colls/N9EdAIugXgA=" + created_permission.resource_link = created_permission.properties["resource"] # should create new permission since id has changed new_permission = await user.upsert_permission(created_permission.properties) @@ -730,44 +685,41 @@ async def __setup_entities(): db = self.database_for_test # create collection collection = await db.create_container( - id='test_authorization' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_authorization" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id", kind="Hash") ) # create document1 document = await collection.create_item( - body={'id': 'doc1', - 'spam': 'eggs', - 'key': 'value'}, + body={"id": "doc1", "spam": "eggs", "key": "value"}, ) # create user - user = await db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = await db.create_user(body={"id": "user" + str(uuid.uuid4())}) # create permission for collection permission = { - 'id': 'permission On Coll', - 'permissionMode': documents.PermissionMode.Read, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "id": "permission On Coll", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/" + db.id + "/colls/" + collection.id, } permission_on_coll = await user.create_permission(body=permission) - assert permission_on_coll.properties['_token'] is not None + assert permission_on_coll.properties["_token"] is not None # create permission for document permission = { - 'id': 'permission On Doc', - 'permissionMode': documents.PermissionMode.All, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + document["id"] + "id": "permission On Doc", + "permissionMode": documents.PermissionMode.All, + "resource": "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + document["id"], } permission_on_doc = await user.create_permission(body=permission) - assert permission_on_doc.properties['_token'] is not None + assert permission_on_doc.properties["_token"] is not None entities = { - 'db': db, - 'coll': collection, - 'doc': document, - 'user': user, - 'permissionOnColl': permission_on_coll, - 'permissionOnDoc': permission_on_doc, + "db": db, + "coll": collection, + "doc": document, + "user": user, + "permissionOnColl": permission_on_coll, + "permissionOnDoc": permission_on_doc, } return entities @@ -779,115 +731,116 @@ async def __setup_entities(): assert e.status_code == StatusCodes.UNAUTHORIZED # Client with master key. - async with CosmosClient(TestCRUDOperationsAsync.host, - TestCRUDOperationsAsync.masterKey) as client: + async with CosmosClient(TestCRUDOperationsAsync.host, TestCRUDOperationsAsync.masterKey) as client: # setup entities entities = await __setup_entities() - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id: - entities['permissionOnColl'].properties['_token']} + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id: entities["permissionOnColl"].properties["_token"] + } - async with CosmosClient( - TestCRUDOperationsAsync.host, resource_tokens) as col_client: - db = entities['db'] + async with CosmosClient(TestCRUDOperationsAsync.host, resource_tokens) as col_client: + db = entities["db"] old_client_connection = db.client_connection db.client_connection = col_client.client_connection # 1. Success-- Use Col Permission to Read - success_coll = db.get_container_client(container=entities['coll']) + success_coll = db.get_container_client(container=entities["coll"]) # 2. Failure-- Use Col Permission to delete - await self.__assert_http_failure_with_status(StatusCodes.FORBIDDEN, - db.delete_container, - success_coll) + await self.__assert_http_failure_with_status(StatusCodes.FORBIDDEN, db.delete_container, success_coll) # 3. Success-- Use Col Permission to Read All Docs success_documents = [document async for document in success_coll.read_all_items()] assert success_documents is not None assert len(success_documents) == 1 # 4. Success-- Use Col Permission to Read Doc - doc_id = entities['doc']['id'] - success_doc = await success_coll.read_item( - item=doc_id, - partition_key=doc_id - ) + doc_id = entities["doc"]["id"] + success_doc = await success_coll.read_item(item=doc_id, partition_key=doc_id) assert success_doc is not None - assert success_doc['id'] == entities['doc']['id'] + assert success_doc["id"] == entities["doc"]["id"] # 5. Failure-- Use Col Permission to Delete Doc - await self.__assert_http_failure_with_status(StatusCodes.FORBIDDEN, - success_coll.delete_item, - doc_id, doc_id) + await self.__assert_http_failure_with_status( + StatusCodes.FORBIDDEN, success_coll.delete_item, doc_id, doc_id + ) - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id + "/docs/" + doc_id: - entities['permissionOnDoc'].properties['_token']} + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id + + "/docs/" + + doc_id: entities["permissionOnDoc"].properties["_token"] + } - async with CosmosClient( - TestCRUDOperationsAsync.host, resource_tokens) as doc_client: + async with CosmosClient(TestCRUDOperationsAsync.host, resource_tokens) as doc_client: # 6. Success-- Use Doc permission to read doc - read_doc = await doc_client.get_database_client(db.id).get_container_client(success_coll.id).read_item( - doc_id, doc_id) + read_doc = ( + await doc_client.get_database_client(db.id) + .get_container_client(success_coll.id) + .read_item(doc_id, doc_id) + ) assert read_doc["id"] == doc_id # 6. Success-- Use Doc permission to delete doc - await doc_client.get_database_client(db.id).get_container_client(success_coll.id).delete_item(doc_id, - doc_id) + await doc_client.get_database_client(db.id).get_container_client(success_coll.id).delete_item( + doc_id, doc_id + ) assert read_doc["id"] == doc_id db.client_connection = old_client_connection - await db.delete_container(entities['coll']) + await db.delete_container(entities["coll"]) async def test_script_logging_execute_stored_procedure_async(self): created_collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) sproc = { - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' var mytext = \'x\';' + - ' var myval = 1;' + - ' try {' + - ' console.log(\'The value of %s is %s.\', mytext, myval);' + - ' getContext().getResponse().setBody(\'Success!\');' + - ' }' + - ' catch (err) {' + - ' getContext().getResponse().setBody(\'inline err: [\' + err.number + \'] \' + err);' + - ' }' - '}') + "id": "storedProcedure" + str(uuid.uuid4()), + "body": ( + "function () {" + + " var mytext = 'x';" + + " var myval = 1;" + + " try {" + + " console.log('The value of %s is %s.', mytext, myval);" + + " getContext().getResponse().setBody('Success!');" + + " }" + + " catch (err) {" + + " getContext().getResponse().setBody('inline err: [' + err.number + '] ' + err);" + + " }" + "}" + ), } created_sproc = await created_collection.scripts.create_stored_procedure(body=sproc) - result = await created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - partition_key=1 - ) + result = await created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=1) - assert result == 'Success!' + assert result == "Success!" assert HttpHeaders.ScriptLogResults not in created_collection.scripts.client_connection.last_response_headers result = await created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=True, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=True, partition_key=1 ) - assert result == 'Success!' - assert urllib.quote('The value of x is 1.') == created_collection.scripts.client_connection. \ - last_response_headers.get(HttpHeaders.ScriptLogResults) + assert result == "Success!" + assert urllib.quote( + "The value of x is 1." + ) == created_collection.scripts.client_connection.last_response_headers.get(HttpHeaders.ScriptLogResults) result = await created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=False, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=False, partition_key=1 ) - assert result == 'Success!' + assert result == "Success!" assert HttpHeaders.ScriptLogResults not in created_collection.scripts.client_connection.last_response_headers async def test_client_request_timeout_async(self): # Test is flaky on Emulator - if not ('localhost' in self.host or '127.0.0.1' in self.host): + if not ("localhost" in self.host or "127.0.0.1" in self.host): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 @@ -897,10 +850,10 @@ async def test_client_request_timeout_async(self): with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - item = {'id': str(uuid.uuid4()), 'name': 'sample'} + item = {"id": str(uuid.uuid4()), "name": "sample"} await container.create_item(body=item) - await container.read_item(item=item['id'], partition_key=item['id']) - print('Async initialization') + await container.read_item(item=item["id"], partition_key=item["id"]) + print("Async initialization") async def test_read_timeout_async(self): connection_policy = documents.ConnectionPolicy() @@ -908,28 +861,34 @@ async def test_read_timeout_async(self): connection_policy.DBAReadTimeout = 0.000000000001 # this will make a get database account call async with CosmosClient(self.host, self.masterKey, connection_policy=connection_policy): - print('Async initialization') + print("Async initialization") connection_policy.DBAConnectionTimeout = 0.000000000001 with self.assertRaises(ServiceRequestError): async with CosmosClient(self.host, self.masterKey, connection_policy=connection_policy): - print('Async initialization') + print("Async initialization") async def test_client_request_timeout_when_connection_retry_configuration_specified_async(self): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 - async with CosmosClient(TestCRUDOperationsAsync.host, TestCRUDOperationsAsync.masterKey, - connection_policy=connection_policy, - retry_total=3, retry_connect=3, retry_read=3, retry_backoff_max=0.3, - retry_on_status_codes=[500, 502, 504]) as client: + async with CosmosClient( + TestCRUDOperationsAsync.host, + TestCRUDOperationsAsync.masterKey, + connection_policy=connection_policy, + retry_total=3, + retry_connect=3, + retry_read=3, + retry_backoff_max=0.3, + retry_on_status_codes=[500, 502, 504], + ) as client: with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - item = {'id': str(uuid.uuid4()), 'name': 'sample'} + item = {"id": str(uuid.uuid4()), "name": "sample"} await container.create_item(body=item) - await container.read_item(item=item['id'], partition_key=item['id']) - print('Async Initialization') + await container.read_item(item=item["id"], partition_key=item["id"]) + print("Async Initialization") async def test_read_collection_only_once_async(self): # Add filter to the filtered diagnostics handler @@ -943,12 +902,15 @@ async def test_read_collection_only_once_async(self): container = database.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) # Perform 10 concurrent upserts - tasks = [ - container.upsert_item(body={'id': str(uuid.uuid4()), 'name': f'sample-{i}'}) - for i in range(10) - ] + tasks = [container.upsert_item(body={"id": str(uuid.uuid4()), "name": f"sample-{i}"}) for i in range(10)] await asyncio.gather(*tasks) - assert sum("'x-ms-thinclient-proxy-resource-type': 'colls'" in response.message for response in mock_handler.messages) == 1 + assert ( + sum( + "'x-ms-thinclient-proxy-resource-type': 'colls'" in response.message + for response in mock_handler.messages + ) + == 1 + ) # TODO: Skipping this test to debug later @unittest.skip @@ -958,10 +920,15 @@ async def test_client_connection_retry_configuration_async(self): assert total_time_for_four_retries > total_time_for_two_retries async def initialize_client_with_connection_urllib_retry_config(self, retries): - async with CosmosClient(TestCRUDOperationsAsync.host, TestCRUDOperationsAsync.masterKey, - retry_total=retries, retry_connect=retries, retry_read=retries, - retry_backoff_max=0.3, - connection_timeout=.000000001) as client: + async with CosmosClient( + TestCRUDOperationsAsync.host, + TestCRUDOperationsAsync.masterKey, + retry_total=retries, + retry_connect=retries, + retry_read=retries, + retry_backoff_max=0.3, + connection_timeout=0.000000001, + ) as client: databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) start_time = time.time() @@ -969,9 +936,9 @@ async def initialize_client_with_connection_urllib_retry_config(self, retries): # there is a forced timeout for those calls try: - item = {'id': str(uuid.uuid4()), 'name': 'sample'} + item = {"id": str(uuid.uuid4()), "name": "sample"} await container.create_item(body=item) - print('Async initialization') + print("Async initialization") self.fail() except AzureError as e: self.assertIsInstance(e, ServiceResponseError) @@ -994,7 +961,8 @@ async def test_timeout_on_connection_error_async(self): TestCRUDOperationsAsync.masterKey, retry_total=10, connection_timeout=100, - timeout=2) + timeout=2, + ) # The __aenter__ call is what triggers the connection attempt. await client.__aenter__() finally: @@ -1006,22 +974,18 @@ async def test_timeout_on_read_operation_async(self): # Initialize transport with passthrough enabled for client setup timeout_transport = TimeoutTransport(error_response, passthrough=True) - async with CosmosClient( - self.host, self.masterKey, transport=timeout_transport) as client: + async with CosmosClient(self.host, self.masterKey, transport=timeout_transport) as client: # Disable passthrough to test the timeout on the next call timeout_transport.passthrough = False with self.assertRaises(exceptions.CosmosClientTimeoutError): await client.create_database_if_not_exists("test", timeout=2) - async def test_timeout_on_throttling_error_async(self): # Throttling(429): Keeps retrying -> Eventually times out -> CosmosClientTimeoutError status_response = 429 # Uses Cosmos custom retry timeout_transport = TimeoutTransport(status_response, passthrough=True) - async with CosmosClient( - self.host, self.masterKey, transport=timeout_transport - ) as client: - print('Async initialization') + async with CosmosClient(self.host, self.masterKey, transport=timeout_transport) as client: + print("Async initialization") timeout_transport.passthrough = False with self.assertRaises(exceptions.CosmosClientTimeoutError): await client.create_database_if_not_exists("test", timeout=20) @@ -1034,12 +998,10 @@ async def test_inner_exceptions_on_timeout_async(self): # Throttling(429): Keeps retrying -> Eventually times out -> CosmosClientTimeoutError status_response = 429 # Uses Cosmos custom retry timeout_transport = TimeoutTransport(status_response, passthrough=True) - async with CosmosClient( - self.host, self.masterKey, transport=timeout_transport - ) as client: - print('Async initialization') + async with CosmosClient(self.host, self.masterKey, transport=timeout_transport) as client: + print("Async initialization") timeout_transport.passthrough = False - with self.assertRaises(exceptions.CosmosClientTimeoutError) as cm : + with self.assertRaises(exceptions.CosmosClientTimeoutError) as cm: await client.create_database_if_not_exists("test", timeout=20) # Verify the inner_exception is set and is a 429 error @@ -1054,13 +1016,15 @@ async def test_timeout_for_read_items_async(self): # Create a container with multiple partitions created_container = await self.database_for_test.create_container( - id='multi_partition_container_' + str(uuid.uuid4()), + id="multi_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=11000 + offer_throughput=11000, ) pk_ranges = [ - pk async for pk in - created_container.client_connection._ReadPartitionKeyRanges(created_container.container_link) + pk + async for pk in created_container.client_connection._ReadPartitionKeyRanges( + created_container.container_link + ) ] self.assertGreater(len(pk_ranges), 1, "Container should have multiple physical partitions.") @@ -1071,7 +1035,7 @@ async def test_timeout_for_read_items_async(self): doc_id = f"item_{i}_{uuid.uuid4()}" pk = i % 10 all_item_ids.add(doc_id) - await created_container.create_item({'id': doc_id, 'pk': pk, 'data': i}) + await created_container.create_item({"id": doc_id, "pk": pk, "data": i}) items_to_read.append((doc_id, pk)) # Create a custom transport that introduces delays @@ -1090,9 +1054,7 @@ async def send(self, request, **kwargs): # Verify timeout fails when cumulative time exceeds limit delayed_transport = DelayedTransport(delay_per_request=2) - async with CosmosClient( - self.host, self.masterKey, transport=delayed_transport - ) as client_with_delay: + async with CosmosClient(self.host, self.masterKey, transport=delayed_transport) as client_with_delay: container_with_delay = client_with_delay.get_database_client( self.database_for_test.id @@ -1102,54 +1064,42 @@ async def send(self, request, **kwargs): with self.assertRaises(exceptions.CosmosClientTimeoutError): # This should timeout because multiple partition requests * 2s delay > 5s timeout - await container_with_delay.read_items( - items=items_to_read, - timeout=5 # 5 second total timeout - ) + await container_with_delay.read_items(items=items_to_read, timeout=5) # 5 second total timeout elapsed_time = time.time() - start_time # Should fail close to 5 seconds (not wait for all requests) self.assertLess(elapsed_time, 7) # Allow some overhead self.assertGreater(elapsed_time, 5) # Should wait at least close to timeout - async def test_timeout_for_point_operation_async(self): """Test that point operations respect client timeout""" # Create a container for testing created_container = await self.database_for_test.create_container( - id='point_op_timeout_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="point_op_timeout_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) # Create a test item - test_item = { - 'id': 'test_item_1', - 'pk': 'partition1', - 'data': 'test_data' - } + test_item = {"id": "test_item_1", "pk": "partition1", "data": "test_data"} await created_container.create_item(test_item) # Long timeout should succeed result = await created_container.read_item( - item='test_item_1', - partition_key='partition1', - timeout=1.0 # 1 second timeout + item="test_item_1", partition_key="partition1", timeout=1.0 # 1 second timeout ) - self.assertEqual(result['id'], 'test_item_1') + self.assertEqual(result["id"], "test_item_1") async def test_timeout_for_paged_request_async(self): """Test that timeout applies to each individual page request, not cumulatively""" # Create container and add items created_container = await self.database_for_test.create_container( - id='paged_timeout_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="paged_timeout_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) # Create enough items to ensure multiple pages for i in range(100): - await created_container.create_item({'id': f'item_{i}', 'pk': i % 10, 'data': 'x' * 1000}) + await created_container.create_item({"id": f"item_{i}", "pk": i % 10, "data": "x" * 1000}) # Create a transport that delays each request class DelayedTransport(AioHttpTransport): @@ -1163,9 +1113,7 @@ async def send(self, request, **kwargs): # Test with delayed transport - reduced delay to 1 second for stability delayed_transport = DelayedTransport(delay_seconds=1) - async with CosmosClient( - self.host, self.masterKey, transport=delayed_transport - ) as client_with_delay: + async with CosmosClient(self.host, self.masterKey, transport=delayed_transport) as client_with_delay: container_with_delay = client_with_delay.get_database_client( self.database_for_test.id ).get_container_client(created_container.id) @@ -1173,9 +1121,9 @@ async def send(self, request, **kwargs): # Test 1: Timeout should apply per page item_pages = container_with_delay.query_items( query="SELECT * FROM c", - #enable_cross_partition_query=True, + # enable_cross_partition_query=True, max_item_count=10, # Small page size - timeout=3 # 3s timeout > 1s delay, should succeed + timeout=3, # 3s timeout > 1s delay, should succeed ).by_page() # First page should succeed with 3s timeout (1s delay < 3s timeout) @@ -1189,9 +1137,9 @@ async def send(self, request, **kwargs): # Test 2: Timeout too short should fail item_pages_short_timeout = container_with_delay.query_items( query="SELECT * FROM c", - #enable_cross_partition_query=True, + # enable_cross_partition_query=True, max_item_count=10, - timeout=0.5 # 0.5s timeout < 1s delay, should fail + timeout=0.5, # 0.5s timeout < 1s delay, should fail ).by_page() with self.assertRaises(exceptions.CosmosClientTimeoutError): @@ -1203,31 +1151,27 @@ async def send(self, request, **kwargs): # TODO: for read timeouts azure-core returns a ServiceResponseError, needs to be fixed in azure-core and then this test can be enabled @unittest.skip async def test_query_operation_single_partition_read_timeout_async(self): - """Test that timeout is properly maintained across multiple network requests for a single logical operation - """ + """Test that timeout is properly maintained across multiple network requests for a single logical operation""" # Create a container with multiple partitions container = await self.database_for_test.create_container( - id='single_partition_container_' + str(uuid.uuid4()), + id="single_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), ) single_partition_key = 0 - large_string = 'a' * 1000 # 1KB string + large_string = "a" * 1000 # 1KB string for i in range(200): # Insert 500 documents - await container.create_item({ - 'id': f'item_{i}', - 'pk': single_partition_key, - 'data': large_string, - 'order_field': i - }) + await container.create_item( + {"id": f"item_{i}", "pk": single_partition_key, "data": large_string, "order_field": i} + ) start_time = time.time() with self.assertRaises(exceptions.CosmosClientTimeoutError): async for item in container.query_items( - query="SELECT * FROM c ORDER BY c.order_field ASC", - max_item_count=200, - read_timeout=0.00005, - partition_key=single_partition_key + query="SELECT * FROM c ORDER BY c.order_field ASC", + max_item_count=200, + read_timeout=0.00005, + partition_key=single_partition_key, ): pass @@ -1237,92 +1181,84 @@ async def test_query_operation_single_partition_read_timeout_async(self): # TODO: for read timeouts azure-core returns a ServiceResponseError, needs to be fixed in azure-core and then this test can be enabled @unittest.skip async def test_query_operation_cross_partition_read_timeout_async(self): - """Test that timeout is properly maintained across multiple partition requests for a single logical operation - """ + """Test that timeout is properly maintained across multiple partition requests for a single logical operation""" # Create a container with multiple partitions container = await self.database_for_test.create_container( - id='multi_partition_container_' + str(uuid.uuid4()), + id="multi_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=11000 + offer_throughput=11000, ) # 2. Create large documents to increase payload size - large_string = 'a' * 1000 # 1KB string + large_string = "a" * 1000 # 1KB string for i in range(1000): # Insert 500 documents - await container.create_item({ - 'id': f'item_{i}', - 'pk': i % 2, - 'data': large_string, - 'order_field': i - }) + await container.create_item({"id": f"item_{i}", "pk": i % 2, "data": large_string, "order_field": i}) - pk_ranges = [ - pk async for pk in container.client_connection._ReadPartitionKeyRanges(container.container_link) - ] + pk_ranges = [pk async for pk in container.client_connection._ReadPartitionKeyRanges(container.container_link)] self.assertGreater(len(pk_ranges), 1, "Container should have multiple physical partitions.") with self.assertRaises(exceptions.CosmosClientTimeoutError): # This should timeout because of multiple partition requests - items = [doc async for doc in container.query_items( - query="SELECT * FROM c ORDER BY c.order_field ASC", - max_item_count=100, - read_timeout=0.00005, - )] + items = [ + doc + async for doc in container.query_items( + query="SELECT * FROM c ORDER BY c.order_field ASC", + max_item_count=100, + read_timeout=0.00005, + ) + ] # This shouldn't result in any error because the default 65seconds is respected - items = [doc async for doc in container.query_items( - query="SELECT * FROM c ORDER BY c.order_field ASC", - max_item_count=100, - )] + items = [ + doc + async for doc in container.query_items( + query="SELECT * FROM c ORDER BY c.order_field ASC", + max_item_count=100, + ) + ] self.assertEqual(len(items), 1000) - - async def test_query_iterable_functionality_async(self): - collection = await self.database_for_test.create_container("query-iterable-container-async", - PartitionKey(path="/pk")) - doc1 = await collection.upsert_item(body={'id': 'doc1', 'prop1': 'value1'}) - doc2 = await collection.upsert_item(body={'id': 'doc2', 'prop1': 'value2'}) - doc3 = await collection.upsert_item(body={'id': 'doc3', 'prop1': 'value3'}) + collection = await self.database_for_test.create_container( + "query-iterable-container-async", PartitionKey(path="/pk") + ) + doc1 = await collection.upsert_item(body={"id": "doc1", "prop1": "value1"}) + doc2 = await collection.upsert_item(body={"id": "doc2", "prop1": "value2"}) + doc3 = await collection.upsert_item(body={"id": "doc3", "prop1": "value3"}) await asyncio.sleep(1) - resources = { - 'coll': collection, - 'doc1': doc1, - 'doc2': doc2, - 'doc3': doc3 - } + resources = {"coll": collection, "doc1": doc1, "doc2": doc2, "doc3": doc3} # Validate QueryIterable by converting it to a list. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) docs = [doc async for doc in results] assert 3 == len(docs) - assert resources['doc1']['id'] == docs[0]['id'] - assert resources['doc2']['id'] == docs[1]['id'] - assert resources['doc3']['id'] == docs[2]['id'] + assert resources["doc1"]["id"] == docs[0]["id"] + assert resources["doc2"]["id"] == docs[1]["id"] + assert resources["doc3"]["id"] == docs[2]["id"] # Validate QueryIterable iterator with 'for'. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) counter = 0 # test QueryIterable with 'for'. async for doc in results: counter += 1 if counter == 1: - assert resources['doc1']['id'] == doc['id'] + assert resources["doc1"]["id"] == doc["id"] elif counter == 2: - assert resources['doc2']['id'] == doc['id'] + assert resources["doc2"]["id"] == doc["id"] elif counter == 3: - assert resources['doc3']['id'] == doc['id'] + assert resources["doc3"]["id"] == doc["id"] assert counter == 3 # Get query results page by page. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) page_iter = results.by_page() first_block = [page async for page in await page_iter.__anext__()] assert 2 == len(first_block) - assert resources['doc1']['id'] == first_block[0]['id'] - assert resources['doc2']['id'] == first_block[1]['id'] + assert resources["doc1"]["id"] == first_block[0]["id"] + assert resources["doc2"]["id"] == first_block[1]["id"] assert 1 == len([page async for page in await page_iter.__anext__()]) with self.assertRaises(StopAsyncIteration): await page_iter.__anext__() @@ -1335,53 +1271,43 @@ async def test_stored_procedure_functionality_async(self): collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) sproc1 = { - 'id': 'storedProcedure1' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' for (var i = 0; i < 1000; i++) {' + - ' var item = getContext().getResponse().getBody();' + - ' if (i > 0 && item != i - 1) throw \'body mismatch\';' + - ' getContext().getResponse().setBody(i);' + - ' }' + - '}') + "id": "storedProcedure1" + str(uuid.uuid4()), + "body": ( + "function () {" + + " for (var i = 0; i < 1000; i++) {" + + " var item = getContext().getResponse().getBody();" + + " if (i > 0 && item != i - 1) throw 'body mismatch';" + + " getContext().getResponse().setBody(i);" + + " }" + + "}" + ), } retrieved_sproc = await collection.scripts.create_stored_procedure(body=sproc1) - result = await collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc['id'], - partition_key=1 - ) + result = await collection.scripts.execute_stored_procedure(sproc=retrieved_sproc["id"], partition_key=1) assert result == 999 sproc2 = { - 'id': 'storedProcedure2' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' for (var i = 0; i < 10; i++) {' + - ' getContext().getResponse().appendValue(\'Body\', i);' + - ' }' + - '}') + "id": "storedProcedure2" + str(uuid.uuid4()), + "body": ( + "function () {" + + " for (var i = 0; i < 10; i++) {" + + " getContext().getResponse().appendValue('Body', i);" + + " }" + + "}" + ), } retrieved_sproc2 = await collection.scripts.create_stored_procedure(body=sproc2) - result = await collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc2['id'], - partition_key=1 - ) + result = await collection.scripts.execute_stored_procedure(sproc=retrieved_sproc2["id"], partition_key=1) assert int(result) == 123456789 sproc3 = { - 'id': 'storedProcedure3' + str(uuid.uuid4()), - 'body': ( - 'function (input) {' + - ' getContext().getResponse().setBody(' + - ' \'a\' + input.temp);' + - '}') + "id": "storedProcedure3" + str(uuid.uuid4()), + "body": ("function (input) {" + " getContext().getResponse().setBody(" + " 'a' + input.temp);" + "}"), } retrieved_sproc3 = await collection.scripts.create_stored_procedure(body=sproc3) result = await collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc3['id'], - parameters={'temp': 'so'}, - partition_key=1 + sproc=retrieved_sproc3["id"], parameters={"temp": "so"}, partition_key=1 ) - assert result == 'aso' + assert result == "aso" async def test_get_resource_with_dictionary_and_object_async(self): @@ -1414,60 +1340,59 @@ async def test_get_resource_with_dictionary_and_object_async(self): read_container = created_db.get_container_client(created_properties) assert read_container.id == created_container.id - created_item = await created_container.create_item({'id': '1' + str(uuid.uuid4()), 'pk': 'pk'}) + created_item = await created_container.create_item({"id": "1" + str(uuid.uuid4()), "pk": "pk"}) await sleep(5) # read item with id - read_item = await created_container.read_item(item=created_item['id'], partition_key=created_item['pk']) - assert read_item['id'] == created_item['id'] + read_item = await created_container.read_item(item=created_item["id"], partition_key=created_item["pk"]) + assert read_item["id"] == created_item["id"] # read item with properties - read_item = await created_container.read_item(item=created_item, partition_key=created_item['pk']) - assert read_item['id'], created_item['id'] + read_item = await created_container.read_item(item=created_item, partition_key=created_item["pk"]) + assert read_item["id"], created_item["id"] - created_sproc = await created_container.scripts.create_stored_procedure({ - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': 'function () { }' - }) + created_sproc = await created_container.scripts.create_stored_procedure( + {"id": "storedProcedure" + str(uuid.uuid4()), "body": "function () { }"} + ) # read sproc with id - read_sproc = await created_container.scripts.get_stored_procedure(created_sproc['id']) - assert read_sproc['id'] == created_sproc['id'] + read_sproc = await created_container.scripts.get_stored_procedure(created_sproc["id"]) + assert read_sproc["id"] == created_sproc["id"] # read sproc with properties read_sproc = await created_container.scripts.get_stored_procedure(created_sproc) - assert read_sproc['id'] == created_sproc['id'] - - created_trigger = await created_container.scripts.create_trigger({ - 'id': 'sample trigger' + str(uuid.uuid4()), - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }) + assert read_sproc["id"] == created_sproc["id"] + + created_trigger = await created_container.scripts.create_trigger( + { + "id": "sample trigger" + str(uuid.uuid4()), + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + } + ) # read trigger with id - read_trigger = await created_container.scripts.get_trigger(created_trigger['id']) - assert read_trigger['id'] == created_trigger['id'] + read_trigger = await created_container.scripts.get_trigger(created_trigger["id"]) + assert read_trigger["id"] == created_trigger["id"] # read trigger with properties read_trigger = await created_container.scripts.get_trigger(created_trigger) - assert read_trigger['id'] == created_trigger['id'] + assert read_trigger["id"] == created_trigger["id"] - created_udf = await created_container.scripts.create_user_defined_function({ - 'id': 'sample udf' + str(uuid.uuid4()), - 'body': 'function() {var x = 10;}' - }) + created_udf = await created_container.scripts.create_user_defined_function( + {"id": "sample udf" + str(uuid.uuid4()), "body": "function() {var x = 10;}"} + ) # read udf with id - read_udf = await created_container.scripts.get_user_defined_function(created_udf['id']) - assert created_udf['id'] == read_udf['id'] + read_udf = await created_container.scripts.get_user_defined_function(created_udf["id"]) + assert created_udf["id"] == read_udf["id"] # read udf with properties read_udf = await created_container.scripts.get_user_defined_function(created_udf) - assert created_udf['id'] == read_udf['id'] + assert created_udf["id"] == read_udf["id"] - created_user = await created_db.create_user({ - 'id': 'user' + str(uuid.uuid4())}) + created_user = await created_db.create_user({"id": "user" + str(uuid.uuid4())}) # read user with id read_user = created_db.get_user_client(created_user.id) @@ -1482,12 +1407,14 @@ async def test_get_resource_with_dictionary_and_object_async(self): read_user = created_db.get_user_client(created_user_properties) assert read_user.id == created_user.id - created_permission = await created_user.create_permission({ - 'id': 'all permission' + str(uuid.uuid4()), - 'permissionMode': documents.PermissionMode.All, - 'resource': created_container.container_link, - 'resourcePartitionKey': [1] - }) + created_permission = await created_user.create_permission( + { + "id": "all permission" + str(uuid.uuid4()), + "permissionMode": documents.PermissionMode.All, + "resource": created_container.container_link, + "resourcePartitionKey": [1], + } + ) # read permission with id read_permission = await created_user.get_permission(created_permission.id) @@ -1501,7 +1428,6 @@ async def test_get_resource_with_dictionary_and_object_async(self): read_permission = await created_user.get_permission(created_permission.properties) assert read_permission.id == created_permission.id - async def test_delete_all_items_by_partition_key_async(self): # enable the test only for the emulator if "localhost" not in self.host and "127.0.0.1" not in self.host: @@ -1511,8 +1437,8 @@ async def test_delete_all_items_by_partition_key_async(self): # create container created_collection = await created_db.create_container( - id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/pk', kind='Hash') + id="test_delete_all_items_by_partition_key " + str(uuid.uuid4()), + partition_key=PartitionKey(path="/pk", kind="Hash"), ) # Create two partition keys partition_key1 = "{}-{}".format("Partition Key 1", str(uuid.uuid4())) @@ -1520,9 +1446,7 @@ async def test_delete_all_items_by_partition_key_async(self): # add items for partition key 1 for i in range(1, 3): - await created_collection.upsert_item( - dict(id="item{}".format(i), pk=partition_key1) - ) + await created_collection.upsert_item(dict(id="item{}".format(i), pk=partition_key1)) # add items for partition key 2 pk2_item = await created_collection.upsert_item(dict(id="item{}".format(3), pk=partition_key2)) @@ -1558,11 +1482,10 @@ async def test_patch_operations_async(self): "id": item_id, "pk": "patch_item_pk", "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } await created_container.create_item(item) # Define and run patch operations operations = [ @@ -1571,10 +1494,11 @@ async def test_patch_operations_async(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] - patched_item = await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + patched_item = await created_container.patch_item( + item=item_id, partition_key="patch_item_pk", patch_operations=operations + ) # Verify results from patch operations assert patched_item.get("color") is None assert patched_item.get("prop") is None @@ -1586,32 +1510,28 @@ async def test_patch_operations_async(self): # Negative test - attempt to replace non-existent field operations = [{"op": "replace", "path": "/wrong_field", "value": "wrong_value"}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST # Negative test - attempt to remove non-existent field operations = [{"op": "remove", "path": "/wrong_field"}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST # Negative test - attempt to increment non-number field operations = [{"op": "incr", "path": "/company", "value": 3}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST # Negative test - attempt to move from non-existent field operations = [{"op": "move", "from": "/wrong_field", "path": "/other_field"}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST @@ -1624,11 +1544,10 @@ async def test_conditional_patching_async(self): "id": item_id, "pk": "patch_item_pk", "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } await created_container.create_item(item) # Define patch operations @@ -1638,23 +1557,27 @@ async def test_conditional_patching_async(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] # Run patch operations with wrong filter num_false = item.get("number") + 1 filter_predicate = "from root where root.number = " + str(num_false) try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations, filter_predicate=filter_predicate) + await created_container.patch_item( + item=item_id, + partition_key="patch_item_pk", + patch_operations=operations, + filter_predicate=filter_predicate, + ) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.PRECONDITION_FAILED # Run patch operations with correct filter filter_predicate = "from root where root.number = " + str(item.get("number")) - patched_item = await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations, - filter_predicate=filter_predicate) + patched_item = await created_container.patch_item( + item=item_id, partition_key="patch_item_pk", patch_operations=operations, filter_predicate=filter_predicate + ) # Verify results from patch operations assert patched_item.get("color") is None assert patched_item.get("prop") is None @@ -1676,7 +1599,7 @@ async def test_conditional_patching_async(self): # created_recorder = RecordDiagnostics() # created_collection = created_db.create_container(id=collection_id, # indexing_policy=collection_indexing_policy, - # partition_key=PartitionKey(path="/pk", kind="Hash"), + # partition_key=PartitionKey(path="/pk", kind="Hash"), # response_hook=created_recorder) # properties = created_collection.read() # ttl_key = "analyticalStorageTtl" @@ -1694,7 +1617,7 @@ async def test_conditional_patching_async(self): # created_collection = created_db.create_container(id=collection_id, # analytical_storage_ttl=-1, # indexing_policy=collection_indexing_policy, - # partition_key=PartitionKey(path="/pk", kind="Hash"), + # partition_key=PartitionKey(path="/pk", kind="Hash"), # response_hook=created_recorder) # properties = created_collection.read() # ttl_key = "analyticalStorageTtl" @@ -1744,8 +1667,9 @@ async def test_priority_level_async(self): async def priority_mock_execute_function(function, *args, **kwargs): if args: - priority_headers.append(args[4].headers[HttpHeaders.PriorityLevel] - if HttpHeaders.PriorityLevel in args[4].headers else '') + priority_headers.append( + args[4].headers[HttpHeaders.PriorityLevel] if HttpHeaders.PriorityLevel in args[4].headers else "" + ) return await self.OriginalExecuteFunction(function, *args, **kwargs) _retry_utility_async.ExecuteFunctionAsync = priority_mock_execute_function @@ -1763,8 +1687,9 @@ async def priority_mock_execute_function(function, *args, **kwargs): item2_read = await created_container.read_item("item2", "pk2", priority="Low") assert priority_headers[-1] == "Low" # repeat for query - query = [doc async for doc in created_container.query_items("Select * from c", - partition_key="pk1", priority="High")] + query = [ + doc async for doc in created_container.query_items("Select * from c", partition_key="pk1", priority="High") + ] assert priority_headers[-1] == "High" @@ -1782,6 +1707,5 @@ async def _mock_execute_function(self, function, *args, **kwargs): return await self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() - diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_container.py b/sdk/cosmos/azure-cosmos/tests/test_crud_container.py index ea53c233efb0..c331eb8d2b94 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_container.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_container.py @@ -2,8 +2,7 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" import json import os.path @@ -50,8 +49,7 @@ def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestCRUDContainerOperations(unittest.TestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" configs = test_config.TestConfig host = configs.host @@ -69,18 +67,18 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.databaseForTest = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) @@ -89,64 +87,68 @@ def test_collection_crud(self): collections = list(created_db.list_containers()) # create a collection before_create_collections_count = len(collections) - collection_id = 'test_collection_crud ' + str(uuid.uuid4()) - collection_indexing_policy = {'indexingMode': 'consistent'} - created_collection = created_db.create_container(id=collection_id, - indexing_policy=collection_indexing_policy, - partition_key=PartitionKey(path="/pk", kind="Hash")) + collection_id = "test_collection_crud " + str(uuid.uuid4()) + collection_indexing_policy = {"indexingMode": "consistent"} + created_collection = created_db.create_container( + id=collection_id, + indexing_policy=collection_indexing_policy, + partition_key=PartitionKey(path="/pk", kind="Hash"), + ) self.assertEqual(collection_id, created_collection.id) created_properties = created_collection.read() - self.assertEqual('consistent', created_properties['indexingPolicy']['indexingMode']) - self.assertDictEqual(PartitionKey(path='/pk', kind='Hash'), created_properties['partitionKey']) + self.assertEqual("consistent", created_properties["indexingPolicy"]["indexingMode"]) + self.assertDictEqual(PartitionKey(path="/pk", kind="Hash"), created_properties["partitionKey"]) # read collections after creation collections = list(created_db.list_containers()) - self.assertEqual(len(collections), - before_create_collections_count + 1, - 'create should increase the number of collections') + self.assertEqual( + len(collections), before_create_collections_count + 1, "create should increase the number of collections" + ) # query collections - collections = list(created_db.query_containers( - { - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': collection_id} - ] - })) + collections = list( + created_db.query_containers( + { + "query": "SELECT * FROM root r WHERE r.id=@id", + "parameters": [{"name": "@id", "value": collection_id}], + } + ) + ) self.assertTrue(collections) # delete collection created_db.delete_container(created_collection.id) # read collection after deletion created_container = created_db.get_container_client(created_collection.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - created_container.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, created_container.read) def test_partitioned_collection(self): created_db = self.databaseForTest - collection_definition = {'id': 'test_partitioned_collection ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id'], - 'kind': documents.PartitionKind.Hash - } - } + collection_definition = { + "id": "test_partitioned_collection " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/id"], "kind": documents.PartitionKind.Hash}, + } offer_throughput = 10100 - created_collection = created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition['partitionKey'], - offer_throughput=offer_throughput) + created_collection = created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition["partitionKey"], + offer_throughput=offer_throughput, + ) - self.assertEqual(collection_definition.get('id'), created_collection.id) + self.assertEqual(collection_definition.get("id"), created_collection.id) created_collection_properties = created_collection.read( - populate_partition_key_range_statistics=True, - populate_quota_info=True) - self.assertEqual(collection_definition.get('partitionKey').get('paths')[0], - created_collection_properties['partitionKey']['paths'][0]) - self.assertEqual(collection_definition.get('partitionKey').get('kind'), - created_collection_properties['partitionKey']['kind']) + populate_partition_key_range_statistics=True, populate_quota_info=True + ) + self.assertEqual( + collection_definition.get("partitionKey").get("paths")[0], + created_collection_properties["partitionKey"]["paths"][0], + ) + self.assertEqual( + collection_definition.get("partitionKey").get("kind"), created_collection_properties["partitionKey"]["kind"] + ) self.assertIsNotNone(created_collection_properties.get("statistics")) self.assertIsNotNone(created_db.client_connection.last_response_headers.get("x-ms-resource-usage")) @@ -161,19 +163,15 @@ def test_partitioned_collection(self): def test_partitioned_collection_partition_key_extraction(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_extraction ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction " + str(uuid.uuid4()) created_collection = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state", kind=documents.PartitionKind.Hash) ) - document_definition = {'id': 'document1', - 'address': {'street': '1 Microsoft Way', - 'city': 'Redmond', - 'state': 'WA', - 'zip code': 98052 - } - } + document_definition = { + "id": "document1", + "address": {"street": "1 Microsoft Way", "city": "Redmond", "state": "WA", "zip code": 98052}, + } self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -183,13 +181,12 @@ def test_partitioned_collection_partition_key_extraction(self): self.assertEqual(self.last_headers[0], '["WA"]') del self.last_headers[:] - self.assertEqual(created_document.get('id'), document_definition.get('id')) - self.assertEqual(created_document.get('address').get('state'), document_definition.get('address').get('state')) + self.assertEqual(created_document.get("id"), document_definition.get("id")) + self.assertEqual(created_document.get("address").get("state"), document_definition.get("address").get("state")) - collection_id = 'test_partitioned_collection_partition_key_extraction1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction1 " + str(uuid.uuid4()) created_collection1 = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility.ExecuteFunction @@ -202,10 +199,9 @@ def test_partitioned_collection_partition_key_extraction(self): # self.assertEqual(options['partitionKey'], documents.Undefined) - collection_id = 'test_partitioned_collection_partition_key_extraction2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction2 " + str(uuid.uuid4()) created_collection2 = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state/city", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility.ExecuteFunction @@ -225,15 +221,13 @@ def test_partitioned_collection_partition_key_extraction(self): def test_partitioned_collection_partition_key_extraction_special_chars(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars1 " + str(uuid.uuid4()) created_collection1 = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\"level\' 1*()\"/\"le/vel2\"', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path='/"level\' 1*()"/"le/vel2"', kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document1', - "level' 1*()": {"le/vel2": 'val1'} - } + document_definition = {"id": "document1", "level' 1*()": {"le/vel2": "val1"}} self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -243,24 +237,18 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): del self.last_headers[:] collection_definition2 = { - 'id': 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/\'level\" 1*()\'/\'le/vel2\''], - 'kind': documents.PartitionKind.Hash - } + "id": "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/'level\" 1*()'/'le/vel2'"], "kind": documents.PartitionKind.Hash}, } - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()) created_collection2 = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\'level\" 1*()\'/\'le/vel2\'', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path="/'level\" 1*()'/'le/vel2'", kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document2', - 'level\" 1*()': {'le/vel2': 'val2'} - } + document_definition = {"id": "document2", 'level" 1*()': {"le/vel2": "val2"}} self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -278,15 +266,15 @@ def test_partitioned_collection_path_parser(self): with open(os.path.join(test_dir, "BaselineTest.PathParser.json")) as json_file: entries = json.loads(json_file.read()) for entry in entries: - parts = base.ParsePaths([entry['path']]) - self.assertEqual(parts, entry['parts']) + parts = base.ParsePaths([entry["path"]]) + self.assertEqual(parts, entry["parts"]) - paths = ["/\"Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1\"/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ['/"Ke \\ \\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1"/*'] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] self.assertEqual(parts, base.ParsePaths(paths)) - paths = ["/'Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ["/'Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] self.assertEqual(parts, base.ParsePaths(paths)) def test_partitioned_collection_conflict_crud_and_query(self): @@ -294,18 +282,16 @@ def test_partitioned_collection_conflict_crud_and_query(self): created_collection = self.databaseForTest.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - conflict_definition = {'id': 'new conflict', - 'resourceId': 'doc1', - 'operationType': 'create', - 'resourceType': 'document' - } + conflict_definition = { + "id": "new conflict", + "resourceId": "doc1", + "operationType": "create", + "resourceType": "document", + } # read conflict here will return resource not found(404) since there is no conflict here self.__AssertHTTPFailureWithStatus( - StatusCodes.NOT_FOUND, - created_collection.get_conflict, - conflict_definition['id'], - conflict_definition['id'] + StatusCodes.NOT_FOUND, created_collection.get_conflict, conflict_definition["id"], conflict_definition["id"] ) # Read conflict feed doesn't require partitionKey to be specified as it's a cross partition thing @@ -316,34 +302,41 @@ def test_partitioned_collection_conflict_crud_and_query(self): self.__AssertHTTPFailureWithStatus( StatusCodes.NOT_FOUND, created_collection.delete_conflict, - conflict_definition['id'], - conflict_definition['id'] + conflict_definition["id"], + conflict_definition["id"], ) # query conflicts on any property other than partitionKey will fail without setting enableCrossPartitionQuery or passing in the partitionKey value try: - list(created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get( # nosec - 'resourceType') + '\'' - )) + list( + created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + + conflict_definition.get("resourceType") # nosec + + "'" + ) + ) except Exception: pass - conflict_list = list(created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', - # nosec - enable_cross_partition_query=True - )) + conflict_list = list( + created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(0, len(conflict_list)) # query conflicts by providing the partitionKey value - options = {'partitionKey': conflict_definition.get('id')} - conflict_list = list(created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', - # nosec - partition_key=conflict_definition['id'] - )) + options = {"partitionKey": conflict_definition.get("id")} + conflict_list = list( + created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + # nosec + partition_key=conflict_definition["id"], + ) + ) self.assertEqual(0, len(conflict_list)) @@ -356,12 +349,12 @@ def test_trigger_crud(self): triggers = list(collection.scripts.list_triggers()) # create a trigger before_create_triggers_count = len(triggers) - trigger_id = 'sample trigger-' + str(uuid.uuid4()) + trigger_id = "sample trigger-" + str(uuid.uuid4()) trigger_definition = { - 'id': trigger_id, - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": trigger_id, + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, } trigger = collection.scripts.create_trigger(body=trigger_definition) for property in trigger_definition: @@ -369,48 +362,48 @@ def test_trigger_crud(self): self.assertEqual( trigger[property], trigger_definition[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(trigger['body'], - 'function() {var x = 10;}') + self.assertEqual(trigger["body"], "function() {var x = 10;}") # read triggers after creation triggers = list(collection.scripts.list_triggers()) - self.assertEqual(len(triggers), - before_create_triggers_count + 1, - 'create should increase the number of triggers') + self.assertEqual( + len(triggers), before_create_triggers_count + 1, "create should increase the number of triggers" + ) # query triggers - triggers = list(collection.scripts.query_triggers( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': trigger_definition['id']} - ] - )) + triggers = list( + collection.scripts.query_triggers( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": trigger_definition["id"]}], + ) + ) self.assertTrue(triggers) # replace trigger change_trigger = trigger.copy() - trigger['body'] = 'function() {var x = 20;}' - replaced_trigger = collection.scripts.replace_trigger(change_trigger['id'], trigger) + trigger["body"] = "function() {var x = 20;}" + replaced_trigger = collection.scripts.replace_trigger(change_trigger["id"], trigger) for property in trigger_definition: if property != "serverScript": self.assertEqual( replaced_trigger[property], trigger[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(replaced_trigger['body'], - 'function() {var x = 20;}') + self.assertEqual(replaced_trigger["body"], "function() {var x = 20;}") # read trigger - trigger = collection.scripts.get_trigger(replaced_trigger['id']) - self.assertEqual(replaced_trigger['id'], trigger['id']) + trigger = collection.scripts.get_trigger(replaced_trigger["id"]) + self.assertEqual(replaced_trigger["id"], trigger["id"]) # delete trigger - collection.scripts.delete_trigger(replaced_trigger['id']) + collection.scripts.delete_trigger(replaced_trigger["id"]) # read triggers after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - collection.scripts.delete_trigger, - replaced_trigger['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, collection.scripts.delete_trigger, replaced_trigger["id"] + ) def test_udf_crud(self): # create database @@ -421,48 +414,40 @@ def test_udf_crud(self): udfs = list(collection.scripts.list_user_defined_functions()) # create a udf before_create_udfs_count = len(udfs) - udf_definition = { - 'id': 'sample udf', - 'body': 'function() {var x = 10;}' - } + udf_definition = {"id": "sample udf", "body": "function() {var x = 10;}"} udf = collection.scripts.create_user_defined_function(body=udf_definition) for property in udf_definition: self.assertEqual( - udf[property], - udf_definition[property], - 'property {property} should match'.format(property=property)) + udf[property], udf_definition[property], "property {property} should match".format(property=property) + ) # read udfs after creation udfs = list(collection.scripts.list_user_defined_functions()) - self.assertEqual(len(udfs), - before_create_udfs_count + 1, - 'create should increase the number of udfs') + self.assertEqual(len(udfs), before_create_udfs_count + 1, "create should increase the number of udfs") # query udfs - results = list(collection.scripts.query_user_defined_functions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': udf_definition['id']} - ] - )) + results = list( + collection.scripts.query_user_defined_functions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": udf_definition["id"]}] + ) + ) self.assertTrue(results) # replace udf change_udf = udf.copy() - udf['body'] = 'function() {var x = 20;}' - replaced_udf = collection.scripts.replace_user_defined_function(udf=udf['id'], body=udf) + udf["body"] = "function() {var x = 20;}" + replaced_udf = collection.scripts.replace_user_defined_function(udf=udf["id"], body=udf) for property in udf_definition: self.assertEqual( - replaced_udf[property], - udf[property], - 'property {property} should match'.format(property=property)) + replaced_udf[property], udf[property], "property {property} should match".format(property=property) + ) # read udf - udf = collection.scripts.get_user_defined_function(replaced_udf['id']) - self.assertEqual(replaced_udf['id'], udf['id']) + udf = collection.scripts.get_user_defined_function(replaced_udf["id"]) + self.assertEqual(replaced_udf["id"], udf["id"]) # delete udf - collection.scripts.delete_user_defined_function(replaced_udf['id']) + collection.scripts.delete_user_defined_function(replaced_udf["id"]) # read udfs after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - collection.scripts.get_user_defined_function, - replaced_udf['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, collection.scripts.get_user_defined_function, replaced_udf["id"] + ) def test_sproc_crud(self): # create database @@ -473,56 +458,52 @@ def test_sproc_crud(self): sprocs = list(collection.scripts.list_stored_procedures()) # create a sproc before_create_sprocs_count = len(sprocs) - sproc_id = 'sample sproc-' + str(uuid.uuid4()) - sproc_definition = { - 'id': sproc_id, - 'serverScript': 'function() {var x = 10;}' - } + sproc_id = "sample sproc-" + str(uuid.uuid4()) + sproc_definition = {"id": sproc_id, "serverScript": "function() {var x = 10;}"} sproc = collection.scripts.create_stored_procedure(sproc_definition) for property in sproc_definition: if property != "serverScript": self.assertEqual( sproc[property], sproc_definition[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(sproc['body'], 'function() {var x = 10;}') + self.assertEqual(sproc["body"], "function() {var x = 10;}") # read sprocs after creation sprocs = list(collection.scripts.list_stored_procedures()) - self.assertEqual(len(sprocs), - before_create_sprocs_count + 1, - 'create should increase the number of sprocs') + self.assertEqual(len(sprocs), before_create_sprocs_count + 1, "create should increase the number of sprocs") # query sprocs - sprocs = list(collection.scripts.query_stored_procedures( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': sproc_definition['id']} - ] - )) + sprocs = list( + collection.scripts.query_stored_procedures( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": sproc_definition["id"]}], + ) + ) self.assertIsNotNone(sprocs) # replace sproc change_sproc = sproc.copy() - sproc['body'] = 'function() {var x = 20;}' - replaced_sproc = collection.scripts.replace_stored_procedure(sproc=change_sproc['id'], body=sproc) + sproc["body"] = "function() {var x = 20;}" + replaced_sproc = collection.scripts.replace_stored_procedure(sproc=change_sproc["id"], body=sproc) for property in sproc_definition: - if property != 'serverScript': + if property != "serverScript": self.assertEqual( replaced_sproc[property], sproc[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(replaced_sproc['body'], - "function() {var x = 20;}") + self.assertEqual(replaced_sproc["body"], "function() {var x = 20;}") # read sproc - sproc = collection.scripts.get_stored_procedure(replaced_sproc['id']) - self.assertEqual(replaced_sproc['id'], sproc['id']) + sproc = collection.scripts.get_stored_procedure(replaced_sproc["id"]) + self.assertEqual(replaced_sproc["id"], sproc["id"]) # delete sproc - collection.scripts.delete_stored_procedure(replaced_sproc['id']) + collection.scripts.delete_stored_procedure(replaced_sproc["id"]) # read sprocs after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - collection.scripts.get_stored_procedure, - replaced_sproc['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, collection.scripts.get_stored_procedure, replaced_sproc["id"] + ) def test_collection_indexing_policy(self): # create database @@ -531,43 +512,41 @@ def test_collection_indexing_policy(self): collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = collection.read() - self.assertEqual(collection_properties['indexingPolicy']['indexingMode'], - documents.IndexingMode.Consistent, - 'default indexing mode should be consistent') + self.assertEqual( + collection_properties["indexingPolicy"]["indexingMode"], + documents.IndexingMode.Consistent, + "default indexing mode should be consistent", + ) collection_with_indexing_policy = db.create_container( - id='CollectionWithIndexingPolicy ' + str(uuid.uuid4()), + id="CollectionWithIndexingPolicy " + str(uuid.uuid4()), indexing_policy={ - 'automatic': True, - 'indexingMode': documents.IndexingMode.Consistent, - 'includedPaths': [ + "automatic": True, + "indexingMode": documents.IndexingMode.Consistent, + "includedPaths": [ { - 'path': '/', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.Number, - 'precision': 2 - } - ] + "path": "/", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.Number, "precision": 2} + ], } ], - 'excludedPaths': [ - { - 'path': '/"systemMetadata"/*' - } - ] + "excludedPaths": [{"path": '/"systemMetadata"/*'}], }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_with_indexing_policy_properties = collection_with_indexing_policy.read() - self.assertEqual(1, - len(collection_with_indexing_policy_properties['indexingPolicy']['includedPaths']), - 'Unexpected includedPaths length') - self.assertEqual(2, - len(collection_with_indexing_policy_properties['indexingPolicy']['excludedPaths']), - 'Unexpected excluded path count') + self.assertEqual( + 1, + len(collection_with_indexing_policy_properties["indexingPolicy"]["includedPaths"]), + "Unexpected includedPaths length", + ) + self.assertEqual( + 2, + len(collection_with_indexing_policy_properties["indexingPolicy"]["excludedPaths"]), + "Unexpected excluded path count", + ) db.delete_container(collection_with_indexing_policy.id) def test_create_default_indexing_policy(self): @@ -578,70 +557,56 @@ def test_create_default_indexing_policy(self): collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) # partial policy specified collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy01' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.Consistent, 'automatic': True - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy01" + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.Consistent, "automatic": True}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) # default policy collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy03' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy03" + str(uuid.uuid4()), indexing_policy={}, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) # missing indexes collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy04' + str(uuid.uuid4()), - indexing_policy={ - 'includedPaths': [ - { - 'path': '/*' - } - ] - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy04" + str(uuid.uuid4()), + indexing_policy={"includedPaths": [{"path": "/*"}]}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) # missing precision collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy05' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy05" + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ + "includedPaths": [ { - 'path': '/*', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.String - }, - { - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.Number - } - ] + "path": "/*", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.String}, + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.Number}, + ], } ] }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) def test_create_indexing_policy_with_composite_and_spatial_indexes(self): @@ -650,62 +615,28 @@ def test_create_indexing_policy_with_composite_and_spatial_indexes(self): indexing_policy = { "spatialIndexes": [ - { - "path": "/path0/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - }, - { - "path": "/path1/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - } + {"path": "/path0/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, + {"path": "/path1/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, ], "compositeIndexes": [ [ - { - "path": "/path1", - "order": "ascending" - }, - { - "path": "/path2", - "order": "descending" - }, - { - "path": "/path3", - "order": "ascending" - } + {"path": "/path1", "order": "ascending"}, + {"path": "/path2", "order": "descending"}, + {"path": "/path3", "order": "ascending"}, ], [ - { - "path": "/path4", - "order": "ascending" - }, - { - "path": "/path5", - "order": "descending" - }, - { - "path": "/path6", - "order": "ascending" - } - ] - ] + {"path": "/path4", "order": "ascending"}, + {"path": "/path5", "order": "descending"}, + {"path": "/path6", "order": "ascending"}, + ], + ], } # TODO: custom_logger = logging.getLogger("CustomLogger") was in old code, check on later created_container = db.create_container( - id='composite_index_spatial_index' + str(uuid.uuid4()), + id="composite_index_spatial_index" + str(uuid.uuid4()), indexing_policy=indexing_policy, - partition_key=PartitionKey(path='/id', kind='Hash'), + partition_key=PartitionKey(path="/id", kind="Hash"), headers={"Foo": "bar"}, user_agent="blah", user_agent_overwrite=True, @@ -713,15 +644,15 @@ def test_create_indexing_policy_with_composite_and_spatial_indexes(self): ) # TODO: logger was passed into read previously created_properties = created_container.read() - read_indexing_policy = created_properties['indexingPolicy'] + read_indexing_policy = created_properties["indexingPolicy"] - if 'localhost' in self.host or '127.0.0.1' in self.host: # TODO: Differing result between live and emulator - self.assertListEqual(indexing_policy['spatialIndexes'], read_indexing_policy['spatialIndexes']) + if "localhost" in self.host or "127.0.0.1" in self.host: # TODO: Differing result between live and emulator + self.assertListEqual(indexing_policy["spatialIndexes"], read_indexing_policy["spatialIndexes"]) else: # All types are returned for spatial Indexes - self.assertListEqual(indexing_policy['spatialIndexes'], read_indexing_policy['spatialIndexes']) + self.assertListEqual(indexing_policy["spatialIndexes"], read_indexing_policy["spatialIndexes"]) - self.assertListEqual(indexing_policy['compositeIndexes'], read_indexing_policy['compositeIndexes']) + self.assertListEqual(indexing_policy["compositeIndexes"], read_indexing_policy["compositeIndexes"]) db.delete_container(container=created_container) def _check_default_indexing_policy_paths(self, indexing_policy): @@ -732,81 +663,89 @@ def __get_first(array): return None # '/_etag' is present in excluded paths by default - self.assertEqual(1, len(indexing_policy['excludedPaths'])) + self.assertEqual(1, len(indexing_policy["excludedPaths"])) # included paths should be 1: '/'. - self.assertEqual(1, len(indexing_policy['includedPaths'])) + self.assertEqual(1, len(indexing_policy["includedPaths"])) - root_included_path = __get_first([included_path for included_path in indexing_policy['includedPaths'] - if included_path['path'] == '/*']) - self.assertFalse(root_included_path.get('indexes')) + root_included_path = __get_first( + [included_path for included_path in indexing_policy["includedPaths"] if included_path["path"] == "/*"] + ) + self.assertFalse(root_included_path.get("indexes")) def test_trigger_functionality(self): triggers_in_collection1 = [ { - 'id': 't1', - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toUpperCase() + \'t1\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t1", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toUpperCase() + 't1';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response1', - 'body': ( - 'function() {' + - ' var prebody = getContext().getRequest().getBody();' + - ' if (prebody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' + - ' var postbody = getContext().getResponse().getBody();' + - ' if (postbody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All + "id": "response1", + "body": ( + "function() {" + + " var prebody = getContext().getRequest().getBody();" + + " if (prebody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + + " var postbody = getContext().getResponse().getBody();" + + " if (postbody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response2', + "id": "response2", # can't be used because setValue is currently disabled - 'body': ( - 'function() {' + - ' var predoc = getContext().getRequest().getBody();' + - ' var postdoc = getContext().getResponse().getBody();' + - ' getContext().getResponse().setValue(' + - ' \'predocname\', predoc.id + \'response2\');' + - ' getContext().getResponse().setValue(' + - ' \'postdocname\', postdoc.id + \'response2\');' + - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All, - }] + "body": ( + "function() {" + + " var predoc = getContext().getRequest().getBody();" + + " var postdoc = getContext().getResponse().getBody();" + + " getContext().getResponse().setValue(" + + " 'predocname', predoc.id + 'response2');" + + " getContext().getResponse().setValue(" + + " 'postdocname', postdoc.id + 'response2');" + + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection2 = [ { - 'id': "t2", - 'body': "function() { }", # trigger already stringified - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t2", + "body": "function() { }", # trigger already stringified + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': "t3", - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toLowerCase() + \'t3\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }] + "id": "t3", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toLowerCase() + 't3';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection3 = [ { - 'id': 'triggerOpType', - 'body': 'function() { }', - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.Delete, - }] + "id": "triggerOpType", + "body": "function() { }", + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.Delete, + } + ] def __CreateTriggers(collection, triggers): """Creates triggers. @@ -822,18 +761,22 @@ def __CreateTriggers(collection, triggers): self.assertEqual( trigger[property], trigger_i[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) # create database db = self.databaseForTest # create collections - pkd = PartitionKey(path='/id', kind='Hash') - collection1 = db.create_container(id='test_trigger_functionality 1 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection2 = db.create_container(id='test_trigger_functionality 2 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection3 = db.create_container(id='test_trigger_functionality 3 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) + pkd = PartitionKey(path="/id", kind="Hash") + collection1 = db.create_container( + id="test_trigger_functionality 1 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection2 = db.create_container( + id="test_trigger_functionality 2 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection3 = db.create_container( + id="test_trigger_functionality 3 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) # create triggers __CreateTriggers(collection1, triggers_in_collection1) __CreateTriggers(collection2, triggers_in_collection2) @@ -841,52 +784,32 @@ def __CreateTriggers(collection, triggers): # create document triggers_1 = list(collection1.scripts.list_triggers()) self.assertEqual(len(triggers_1), 3) - document_1_1 = collection1.create_item( - body={'id': 'doc1', - 'key': 'value'}, - pre_trigger_include='t1' - ) - self.assertEqual(document_1_1['id'], - 'DOC1t1', - 'id should be capitalized') + document_1_1 = collection1.create_item(body={"id": "doc1", "key": "value"}, pre_trigger_include="t1") + self.assertEqual(document_1_1["id"], "DOC1t1", "id should be capitalized") document_1_2 = collection1.create_item( - body={'id': 'testing post trigger', 'key': 'value'}, - pre_trigger_include='t1', - post_trigger_include='response1', + body={"id": "testing post trigger", "key": "value"}, + pre_trigger_include="t1", + post_trigger_include="response1", ) - self.assertEqual(document_1_2['id'], 'TESTING POST TRIGGERt1') + self.assertEqual(document_1_2["id"], "TESTING POST TRIGGERt1") - document_1_3 = collection1.create_item( - body={'id': 'responseheaders', 'key': 'value'}, - pre_trigger_include='t1' - ) - self.assertEqual(document_1_3['id'], "RESPONSEHEADERSt1") + document_1_3 = collection1.create_item(body={"id": "responseheaders", "key": "value"}, pre_trigger_include="t1") + self.assertEqual(document_1_3["id"], "RESPONSEHEADERSt1") triggers_2 = list(collection2.scripts.list_triggers()) self.assertEqual(len(triggers_2), 2) - document_2_1 = collection2.create_item( - body={'id': 'doc2', - 'key': 'value2'}, - pre_trigger_include='t2' - ) - self.assertEqual(document_2_1['id'], - 'doc2', - 'id shouldn\'t change') + document_2_1 = collection2.create_item(body={"id": "doc2", "key": "value2"}, pre_trigger_include="t2") + self.assertEqual(document_2_1["id"], "doc2", "id shouldn't change") document_2_2 = collection2.create_item( - body={'id': 'Doc3', - 'prop': 'empty', - 'key': 'value2'}, - pre_trigger_include='t3') - self.assertEqual(document_2_2['id'], 'doc3t3') + body={"id": "Doc3", "prop": "empty", "key": "value2"}, pre_trigger_include="t3" + ) + self.assertEqual(document_2_2["id"], "doc3t3") triggers_3 = list(collection3.scripts.list_triggers()) self.assertEqual(len(triggers_3), 1) with self.assertRaises(Exception): - collection3.create_item( - body={'id': 'Docoptype', 'key': 'value2'}, - post_trigger_include='triggerOpType' - ) + collection3.create_item(body={"id": "Docoptype", "key": "value2"}, post_trigger_include="triggerOpType") db.delete_container(collection1) db.delete_container(collection2) @@ -894,15 +817,16 @@ def __CreateTriggers(collection, triggers): def __ValidateOfferResponseBody(self, offer, expected_coll_link, expected_offer_type): # type: (Offer, str, Any) -> None - self.assertIsNotNone(offer.properties['id'], 'Id cannot be null.') - self.assertIsNotNone(offer.properties.get('_rid'), 'Resource Id (Rid) cannot be null.') - self.assertIsNotNone(offer.properties.get('_self'), 'Self Link cannot be null.') - self.assertIsNotNone(offer.properties.get('resource'), 'Resource Link cannot be null.') - self.assertTrue(offer.properties['_self'].find(offer.properties['id']) != -1, - 'Offer id not contained in offer self link.') - self.assertEqual(expected_coll_link.strip('/'), offer.properties['resource'].strip('/')) - if (expected_offer_type): - self.assertEqual(expected_offer_type, offer.properties.get('offerType')) + self.assertIsNotNone(offer.properties["id"], "Id cannot be null.") + self.assertIsNotNone(offer.properties.get("_rid"), "Resource Id (Rid) cannot be null.") + self.assertIsNotNone(offer.properties.get("_self"), "Self Link cannot be null.") + self.assertIsNotNone(offer.properties.get("resource"), "Resource Link cannot be null.") + self.assertTrue( + offer.properties["_self"].find(offer.properties["id"]) != -1, "Offer id not contained in offer self link." + ) + self.assertEqual(expected_coll_link.strip("/"), offer.properties["resource"].strip("/")) + if expected_offer_type: + self.assertEqual(expected_offer_type, offer.properties.get("offerType")) def test_offer_read_and_query(self): # Create database. @@ -911,7 +835,7 @@ def test_offer_read_and_query(self): # Read the offer. expected_offer = collection.get_throughput() collection_properties = collection.read() - self.__ValidateOfferResponseBody(expected_offer, collection_properties.get('_self'), None) + self.__ValidateOfferResponseBody(expected_offer, collection_properties.get("_self"), None) def test_offer_replace(self): # Create database. @@ -921,16 +845,17 @@ def test_offer_replace(self): # Read Offer expected_offer = collection.get_throughput() collection_properties = collection.read() - self.__ValidateOfferResponseBody(expected_offer, collection_properties.get('_self'), None) + self.__ValidateOfferResponseBody(expected_offer, collection_properties.get("_self"), None) # Replace the offer. replaced_offer = collection.replace_throughput(expected_offer.offer_throughput + 100) collection_properties = collection.read() - self.__ValidateOfferResponseBody(replaced_offer, collection_properties.get('_self'), None) + self.__ValidateOfferResponseBody(replaced_offer, collection_properties.get("_self"), None) # Check if the replaced offer is what we expect. - self.assertEqual(expected_offer.properties.get('content').get('offerThroughput') + 100, - replaced_offer.properties.get('content').get('offerThroughput')) - self.assertEqual(expected_offer.offer_throughput + 100, - replaced_offer.offer_throughput) + self.assertEqual( + expected_offer.properties.get("content").get("offerThroughput") + 100, + replaced_offer.properties.get("content").get("offerThroughput"), + ) + self.assertEqual(expected_offer.offer_throughput + 100, replaced_offer.offer_throughput) def test_index_progress_headers(self): created_db = self.databaseForTest @@ -940,12 +865,9 @@ def test_index_progress_headers(self): self.assertTrue(HttpHeaders.IndexTransformationProgress in created_db.client_connection.last_response_headers) none_coll = created_db.create_container( - id='test_index_progress_headers none_coll ' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.NoIndex, - 'automatic': False - }, - partition_key=PartitionKey(path="/id", kind='Hash') + id="test_index_progress_headers none_coll " + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.NoIndex, "automatic": False}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) created_container = created_db.get_container_client(container=none_coll) created_container.read(populate_quota_info=True) @@ -978,7 +900,9 @@ def test_negative_replace_throughput_with_all_configs_set(self): created_db = self.databaseForTest collection = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - new_throughput = ThroughputProperties(offer_throughput=2500, auto_scale_max_throughput=4000, auto_scale_increment_percent=5) + new_throughput = ThroughputProperties( + offer_throughput=2500, auto_scale_max_throughput=4000, auto_scale_increment_percent=5 + ) with pytest.raises(KeyError): collection.replace_throughput(new_throughput) @@ -988,9 +912,10 @@ def _MockExecuteFunction(self, function, *args, **kwargs): self.last_headers.append(args[4].headers[HttpHeaders.PartitionKey]) return self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': + +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: if inst.args[0] is True: # raised by sys.exit(True) when tests failed - raise \ No newline at end of file + raise diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_container_async.py b/sdk/cosmos/azure-cosmos/tests/test_crud_container_async.py index 3128618c18fc..c9fb6684abf3 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_container_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_container_async.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import json import logging import os.path @@ -50,8 +50,8 @@ async def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestCRUDContainerOperationsAsync(unittest.IsolatedAsyncioTestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" + client: CosmosClient = None configs = test_config.TestConfig host = configs.host @@ -69,18 +69,18 @@ async def __assert_http_failure_with_status(self, status_code, func, *args, **kw """ try: await func(*args, **kwargs) - self.fail('function should fail.') + self.fail("function should fail.") except exceptions.CosmosHttpResponseError as inst: assert inst.status_code == status_code @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -94,60 +94,63 @@ async def test_collection_crud_async(self): collections = [collection async for collection in created_db.list_containers()] # create a collection before_create_collections_count = len(collections) - collection_id = 'test_collection_crud ' + str(uuid.uuid4()) - collection_indexing_policy = {'indexingMode': 'consistent'} - created_collection = await created_db.create_container(id=collection_id, - indexing_policy=collection_indexing_policy, - partition_key=PartitionKey(path="/pk", kind="Hash")) + collection_id = "test_collection_crud " + str(uuid.uuid4()) + collection_indexing_policy = {"indexingMode": "consistent"} + created_collection = await created_db.create_container( + id=collection_id, + indexing_policy=collection_indexing_policy, + partition_key=PartitionKey(path="/pk", kind="Hash"), + ) assert collection_id == created_collection.id created_properties = await created_collection.read() - assert 'consistent' == created_properties['indexingPolicy']['indexingMode'] - assert PartitionKey(path='/pk', kind='Hash') == created_properties['partitionKey'] + assert "consistent" == created_properties["indexingPolicy"]["indexingMode"] + assert PartitionKey(path="/pk", kind="Hash") == created_properties["partitionKey"] # read collections after creation collections = [collection async for collection in created_db.list_containers()] assert len(collections) == before_create_collections_count + 1 # query collections - collections = [collection async for collection in created_db.query_containers( - - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': collection_id} - ] - )] + collections = [ + collection + async for collection in created_db.query_containers( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": collection_id}] + ) + ] assert len(collections) > 0 # delete collection await created_db.delete_container(created_collection.id) # read collection after deletion created_container = created_db.get_container_client(created_collection.id) - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - created_container.read) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, created_container.read) async def test_partitioned_collection_async(self): created_db = self.database_for_test - collection_definition = {'id': 'test_partitioned_collection ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id'], - 'kind': documents.PartitionKind.Hash - } - } + collection_definition = { + "id": "test_partitioned_collection " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/id"], "kind": documents.PartitionKind.Hash}, + } offer_throughput = 10100 - created_collection = await created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition['partitionKey'], - offer_throughput=offer_throughput) + created_collection = await created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition["partitionKey"], + offer_throughput=offer_throughput, + ) - assert collection_definition.get('id') == created_collection.id + assert collection_definition.get("id") == created_collection.id created_collection_properties = await created_collection.read() - assert collection_definition.get('partitionKey').get('paths')[0] == \ - created_collection_properties['partitionKey']['paths'][0] - assert collection_definition.get('partitionKey').get('kind') == created_collection_properties['partitionKey'][ - 'kind'] + assert ( + collection_definition.get("partitionKey").get("paths")[0] + == created_collection_properties["partitionKey"]["paths"][0] + ) + assert ( + collection_definition.get("partitionKey").get("kind") + == created_collection_properties["partitionKey"]["kind"] + ) expected_offer = await created_collection.get_throughput() @@ -160,31 +163,26 @@ async def test_partitioned_collection_async(self): async def test_partitioned_collection_quota_async(self): created_db = self.database_for_test - created_collection = self.database_for_test.get_container_client( - self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) + created_collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) retrieved_collection_properties = await created_collection.read( - populate_partition_key_range_statistics=True, - populate_quota_info=True) + populate_partition_key_range_statistics=True, populate_quota_info=True + ) assert retrieved_collection_properties.get("statistics") is not None assert created_db.client_connection.last_response_headers.get("x-ms-resource-usage") is not None async def test_partitioned_collection_partition_key_extraction_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_extraction ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction " + str(uuid.uuid4()) created_collection = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state", kind=documents.PartitionKind.Hash) ) - document_definition = {'id': 'document1', - 'address': {'street': '1 Microsoft Way', - 'city': 'Redmond', - 'state': 'WA', - 'zip code': 98052 - } - } + document_definition = { + "id": "document1", + "address": {"street": "1 Microsoft Way", "city": "Redmond", "state": "WA", "zip code": 98052}, + } self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._mock_execute_function @@ -194,13 +192,12 @@ async def test_partitioned_collection_partition_key_extraction_async(self): assert self.last_headers[0] == '["WA"]' del self.last_headers[:] - assert created_document.get('id') == document_definition.get('id') - assert created_document.get('address').get('state') == document_definition.get('address').get('state') + assert created_document.get("id") == document_definition.get("id") + assert created_document.get("address").get("state") == document_definition.get("address").get("state") - collection_id = 'test_partitioned_collection_partition_key_extraction1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction1 " + str(uuid.uuid4()) created_collection1 = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync @@ -211,10 +208,9 @@ async def test_partitioned_collection_partition_key_extraction_async(self): assert self.last_headers[0] == [{}] del self.last_headers[:] - collection_id = 'test_partitioned_collection_partition_key_extraction2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction2 " + str(uuid.uuid4()) created_collection2 = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state/city", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync @@ -232,15 +228,13 @@ async def test_partitioned_collection_partition_key_extraction_async(self): async def test_partitioned_collection_partition_key_extraction_special_chars_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars1 " + str(uuid.uuid4()) created_collection1 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\"level\' 1*()\"/\"le/vel2\"', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path='/"level\' 1*()"/"le/vel2"', kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document1', - "level' 1*()": {"le/vel2": 'val1'} - } + document_definition = {"id": "document1", "level' 1*()": {"le/vel2": "val1"}} self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._mock_execute_function @@ -249,16 +243,14 @@ async def test_partitioned_collection_partition_key_extraction_special_chars_asy assert self.last_headers[0] == '["val1"]' del self.last_headers[:] - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()) created_collection2 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\'level\" 1*()\'/\'le/vel2\'', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path="/'level\" 1*()'/'le/vel2'", kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document2', - 'level\" 1*()': {'le/vel2': 'val2'} - } + document_definition = {"id": "document2", 'level" 1*()': {"le/vel2": "val2"}} self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._mock_execute_function @@ -276,83 +268,88 @@ def test_partitioned_collection_path_parser(self): with open(os.path.join(test_dir, "BaselineTest.PathParser.json")) as json_file: entries = json.loads(json_file.read()) for entry in entries: - parts = base.ParsePaths([entry['path']]) - assert parts == entry['parts'] + parts = base.ParsePaths([entry["path"]]) + assert parts == entry["parts"] - paths = ["/\"Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1\"/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ['/"Ke \\ \\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1"/*'] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] assert parts == base.ParsePaths(paths) - paths = ["/'Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ["/'Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] assert parts == base.ParsePaths(paths) async def test_partitioned_collection_document_crud_and_query_async(self): created_collection = await self.database_for_test.create_container(str(uuid.uuid4()), PartitionKey(path="/id")) - document_definition = {'id': 'document', - 'key': 'value'} + document_definition = {"id": "document", "key": "value"} created_document = await created_collection.create_item(body=document_definition) - assert created_document.get('id') == document_definition.get('id') - assert created_document.get('key') == document_definition.get('key') + assert created_document.get("id") == document_definition.get("id") + assert created_document.get("key") == document_definition.get("key") # read document read_document = await created_collection.read_item( - item=created_document.get('id'), - partition_key=created_document.get('id') + item=created_document.get("id"), partition_key=created_document.get("id") ) - assert read_document.get('id') == created_document.get('id') - assert read_document.get('key') == created_document.get('key') + assert read_document.get("id") == created_document.get("id") + assert read_document.get("key") == created_document.get("key") # Read document feed doesn't require partitionKey as it's always a cross partition query document_list = [document async for document in created_collection.read_all_items()] assert 1 == len(document_list) # replace document - document_definition['key'] = 'new value' + document_definition["key"] = "new value" - replaced_document = await created_collection.replace_item( - item=read_document, - body=document_definition - ) + replaced_document = await created_collection.replace_item(item=read_document, body=document_definition) - assert replaced_document.get('key') == document_definition.get('key') + assert replaced_document.get("key") == document_definition.get("key") # upsert document(create scenario) - document_definition['id'] = 'document2' - document_definition['key'] = 'value2' + document_definition["id"] = "document2" + document_definition["key"] = "value2" upserted_document = await created_collection.upsert_item(body=document_definition) - assert upserted_document.get('id') == document_definition.get('id') - assert upserted_document.get('key') == document_definition.get('key') + assert upserted_document.get("id") == document_definition.get("id") + assert upserted_document.get("key") == document_definition.get("key") document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == 2 # delete document - await created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get('id')) + await created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get("id")) # query document on the partition key specified in the predicate will pass even without setting enableCrossPartitionQuery or passing in the partitionKey value - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.id=\'' + replaced_document.get('id') + '\'' # nosec - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.id='" + replaced_document.get("id") + "'" # nosec + ) + ] assert len(document_list) == 1 # cross partition query - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'')] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'" + ) + ] assert len(document_list) == 1 # query document by providing the partitionKey value - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - partition_key=replaced_document.get('id') - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + partition_key=replaced_document.get("id"), + ) + ] assert len(document_list) == 1 await self.database_for_test.delete_container(created_collection.id) @@ -360,52 +357,47 @@ async def test_partitioned_collection_document_crud_and_query_async(self): async def test_partitioned_collection_permissions_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_permissions all collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions all collection" + str(uuid.uuid4()) all_collection = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - collection_id = 'test_partitioned_collection_permissions read collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions read collection" + str(uuid.uuid4()) read_collection = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - user = await created_db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = await created_db.create_user(body={"id": "user" + str(uuid.uuid4())}) permission_definition = { - 'id': 'all permission', - 'permissionMode': documents.PermissionMode.All, - 'resource': all_collection.container_link, - 'resourcePartitionKey': [1] + "id": "all permission", + "permissionMode": documents.PermissionMode.All, + "resource": all_collection.container_link, + "resourcePartitionKey": [1], } all_permission = await user.create_permission(body=permission_definition) permission_definition = { - 'id': 'read permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': read_collection.container_link, - 'resourcePartitionKey': [1] + "id": "read permission", + "permissionMode": documents.PermissionMode.Read, + "resource": read_collection.container_link, + "resourcePartitionKey": [1], } read_permission = await user.create_permission(body=permission_definition) resource_tokens = {} # storing the resource tokens based on Resource IDs - resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = (all_permission.properties['_token']) - resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = ( - read_permission.properties['_token']) + resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = all_permission.properties["_token"] + resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = read_permission.properties["_token"] async with CosmosClient(TestCRUDContainerOperationsAsync.host, resource_tokens) as restricted_client: - print('Async Initialization') + print("Async Initialization") - document_definition = {'id': 'document1', - 'key': 1 - } + document_definition = {"id": "document1", "key": 1} all_collection.client_connection = restricted_client.client_connection read_collection.client_connection = restricted_client.client_connection @@ -415,28 +407,22 @@ async def test_partitioned_collection_permissions_async(self): # Create document in read_collection should fail since it has only read permissions for this collection await self.__assert_http_failure_with_status( - StatusCodes.FORBIDDEN, - read_collection.create_item, - document_definition) + StatusCodes.FORBIDDEN, read_collection.create_item, document_definition + ) - document_definition['key'] = 2 + document_definition["key"] = 2 # Create document should fail since the partitionKey is 2 which is different that what is specified as resourcePartitionKey in permission object await self.__assert_http_failure_with_status( - StatusCodes.FORBIDDEN, - all_collection.create_item, - document_definition) + StatusCodes.FORBIDDEN, all_collection.create_item, document_definition + ) - document_definition['key'] = 1 + document_definition["key"] = 1 # Delete document should succeed since the partitionKey is 1 which is what specified as resourcePartitionKey in permission object - await all_collection.delete_item(item=created_document['id'], - partition_key=document_definition['key']) + await all_collection.delete_item(item=created_document["id"], partition_key=document_definition["key"]) # Delete document in read_collection should fail since it has only read permissions for this collection await self.__assert_http_failure_with_status( - StatusCodes.FORBIDDEN, - read_collection.delete_item, - document_definition['id'], - document_definition['id'] + StatusCodes.FORBIDDEN, read_collection.delete_item, document_definition["id"], document_definition["id"] ) await self.database_for_test.delete_container(all_collection.id) @@ -451,49 +437,50 @@ async def test_trigger_crud_async(self): # create a trigger before_create_triggers_count = len(triggers) trigger_definition = { - 'id': 'sample trigger', - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "sample trigger", + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, } trigger = await collection.scripts.create_trigger(body=trigger_definition) for property in trigger_definition: if property != "serverScript": assert trigger[property] == trigger_definition[property] else: - assert trigger['body'] == 'function() {var x = 10;}' + assert trigger["body"] == "function() {var x = 10;}" # read triggers after creation triggers = [trigger async for trigger in collection.scripts.list_triggers()] assert len(triggers) == before_create_triggers_count + 1 # query triggers - triggers = [trigger async for trigger in collection.scripts.query_triggers( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': trigger_definition['id']} - ] - )] + triggers = [ + trigger + async for trigger in collection.scripts.query_triggers( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": trigger_definition["id"]}], + ) + ] assert triggers is not None # replace trigger change_trigger = trigger.copy() - trigger['body'] = 'function() {var x = 20;}' - replaced_trigger = await collection.scripts.replace_trigger(change_trigger['id'], trigger) + trigger["body"] = "function() {var x = 20;}" + replaced_trigger = await collection.scripts.replace_trigger(change_trigger["id"], trigger) for property in trigger_definition: if property != "serverScript": assert replaced_trigger[property] == trigger[property] else: - assert replaced_trigger['body'] == 'function() {var x = 20;}' + assert replaced_trigger["body"] == "function() {var x = 20;}" # read trigger - trigger = await collection.scripts.get_trigger(replaced_trigger['id']) - assert replaced_trigger['id'] == trigger['id'] + trigger = await collection.scripts.get_trigger(replaced_trigger["id"]) + assert replaced_trigger["id"] == trigger["id"] # delete trigger - await collection.scripts.delete_trigger(replaced_trigger['id']) + await collection.scripts.delete_trigger(replaced_trigger["id"]) # read triggers after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - collection.scripts.delete_trigger, - replaced_trigger['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, collection.scripts.delete_trigger, replaced_trigger["id"] + ) async def test_udf_crud_async(self): @@ -503,10 +490,7 @@ async def test_udf_crud_async(self): udfs = [udf async for udf in collection.scripts.list_user_defined_functions()] # create a udf before_create_udfs_count = len(udfs) - udf_definition = { - 'id': 'sample udf', - 'body': 'function() {var x = 10;}' - } + udf_definition = {"id": "sample udf", "body": "function() {var x = 10;}"} udf = await collection.scripts.create_user_defined_function(body=udf_definition) for property in udf_definition: assert udf[property] == udf_definition[property] @@ -515,27 +499,27 @@ async def test_udf_crud_async(self): udfs = [udf async for udf in collection.scripts.list_user_defined_functions()] assert len(udfs) == before_create_udfs_count + 1 # query udfs - results = [udf async for udf in collection.scripts.query_user_defined_functions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': udf_definition['id']} - ] - )] + results = [ + udf + async for udf in collection.scripts.query_user_defined_functions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": udf_definition["id"]}] + ) + ] assert results is not None # replace udf - udf['body'] = 'function() {var x = 20;}' - replaced_udf = await collection.scripts.replace_user_defined_function(udf=udf['id'], body=udf) + udf["body"] = "function() {var x = 20;}" + replaced_udf = await collection.scripts.replace_user_defined_function(udf=udf["id"], body=udf) for property in udf_definition: assert replaced_udf[property] == udf[property] # read udf - udf = await collection.scripts.get_user_defined_function(replaced_udf['id']) - assert replaced_udf['body'] == udf['body'] + udf = await collection.scripts.get_user_defined_function(replaced_udf["id"]) + assert replaced_udf["body"] == udf["body"] # delete udf - await collection.scripts.delete_user_defined_function(replaced_udf['id']) + await collection.scripts.delete_user_defined_function(replaced_udf["id"]) # read udfs after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - collection.scripts.get_user_defined_function, - replaced_udf['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, collection.scripts.get_user_defined_function, replaced_udf["id"] + ) async def test_sproc_crud_async(self): @@ -545,46 +529,44 @@ async def test_sproc_crud_async(self): sprocs = [sproc async for sproc in collection.scripts.list_stored_procedures()] # create a sproc before_create_sprocs_count = len(sprocs) - sproc_definition = { - 'id': 'sample sproc', - 'serverScript': 'function() {var x = 10;}' - } + sproc_definition = {"id": "sample sproc", "serverScript": "function() {var x = 10;}"} sproc = await collection.scripts.create_stored_procedure(body=sproc_definition) for property in sproc_definition: if property != "serverScript": assert sproc[property] == sproc_definition[property] else: - assert sproc['body'] == 'function() {var x = 10;}' + assert sproc["body"] == "function() {var x = 10;}" # read sprocs after creation sprocs = [sproc async for sproc in collection.scripts.list_stored_procedures()] assert len(sprocs) == before_create_sprocs_count + 1 # query sprocs - sprocs = [sproc async for sproc in collection.scripts.query_stored_procedures( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': sproc_definition['id']} - ] - )] + sprocs = [ + sproc + async for sproc in collection.scripts.query_stored_procedures( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": sproc_definition["id"]}], + ) + ] assert sprocs is not None # replace sproc change_sproc = sproc.copy() - sproc['body'] = 'function() {var x = 20;}' - replaced_sproc = await collection.scripts.replace_stored_procedure(sproc=change_sproc['id'], body=sproc) + sproc["body"] = "function() {var x = 20;}" + replaced_sproc = await collection.scripts.replace_stored_procedure(sproc=change_sproc["id"], body=sproc) for property in sproc_definition: - if property != 'serverScript': + if property != "serverScript": assert replaced_sproc[property] == sproc[property] else: - assert replaced_sproc['body'] == "function() {var x = 20;}" + assert replaced_sproc["body"] == "function() {var x = 20;}" # read sproc - sproc = await collection.scripts.get_stored_procedure(replaced_sproc['id']) - assert replaced_sproc['id'] == sproc['id'] + sproc = await collection.scripts.get_stored_procedure(replaced_sproc["id"]) + assert replaced_sproc["id"] == sproc["id"] # delete sproc - await collection.scripts.delete_stored_procedure(replaced_sproc['id']) + await collection.scripts.delete_stored_procedure(replaced_sproc["id"]) # read sprocs after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - collection.scripts.get_stored_procedure, - replaced_sproc['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, collection.scripts.get_stored_procedure, replaced_sproc["id"] + ) async def test_collection_indexing_policy_async(self): @@ -594,37 +576,29 @@ async def test_collection_indexing_policy_async(self): collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = await collection.read() - assert collection_properties['indexingPolicy']['indexingMode'] == documents.IndexingMode.Consistent + assert collection_properties["indexingPolicy"]["indexingMode"] == documents.IndexingMode.Consistent collection_with_indexing_policy = await db.create_container( - id='CollectionWithIndexingPolicy ' + str(uuid.uuid4()), + id="CollectionWithIndexingPolicy " + str(uuid.uuid4()), indexing_policy={ - 'automatic': True, - 'indexingMode': documents.IndexingMode.Consistent, - 'includedPaths': [ + "automatic": True, + "indexingMode": documents.IndexingMode.Consistent, + "includedPaths": [ { - 'path': '/', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.Number, - 'precision': 2 - } - ] + "path": "/", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.Number, "precision": 2} + ], } ], - 'excludedPaths': [ - { - 'path': '/"systemMetadata"/*' - } - ] + "excludedPaths": [{"path": '/"systemMetadata"/*'}], }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_with_indexing_policy_properties = await collection_with_indexing_policy.read() - assert 1 == len(collection_with_indexing_policy_properties['indexingPolicy']['includedPaths']) - assert 2 == len(collection_with_indexing_policy_properties['indexingPolicy']['excludedPaths']) + assert 1 == len(collection_with_indexing_policy_properties["indexingPolicy"]["includedPaths"]) + assert 2 == len(collection_with_indexing_policy_properties["indexingPolicy"]["excludedPaths"]) await db.delete_container(collection_with_indexing_policy.id) @@ -636,70 +610,56 @@ async def test_create_default_indexing_policy_async(self): # no indexing policy specified collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) # partial policy specified collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy01' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.Consistent, 'automatic': True - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy01" + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.Consistent, "automatic": True}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) # default policy collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy03' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy03" + str(uuid.uuid4()), indexing_policy={}, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) # missing indexes collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy04' + str(uuid.uuid4()), - indexing_policy={ - 'includedPaths': [ - { - 'path': '/*' - } - ] - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy04" + str(uuid.uuid4()), + indexing_policy={"includedPaths": [{"path": "/*"}]}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) # missing precision collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy05' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy05" + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ + "includedPaths": [ { - 'path': '/*', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.String - }, - { - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.Number - } - ] + "path": "/*", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.String}, + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.Number}, + ], } ] }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) async def test_create_indexing_policy_with_composite_and_spatial_indexes_async(self): @@ -709,62 +669,28 @@ async def test_create_indexing_policy_with_composite_and_spatial_indexes_async(s indexing_policy = { "spatialIndexes": [ - { - "path": "/path0/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - }, - { - "path": "/path1/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - } + {"path": "/path0/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, + {"path": "/path1/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, ], "compositeIndexes": [ [ - { - "path": "/path1", - "order": "ascending" - }, - { - "path": "/path2", - "order": "descending" - }, - { - "path": "/path3", - "order": "ascending" - } + {"path": "/path1", "order": "ascending"}, + {"path": "/path2", "order": "descending"}, + {"path": "/path3", "order": "ascending"}, ], [ - { - "path": "/path4", - "order": "ascending" - }, - { - "path": "/path5", - "order": "descending" - }, - { - "path": "/path6", - "order": "ascending" - } - ] - ] + {"path": "/path4", "order": "ascending"}, + {"path": "/path5", "order": "descending"}, + {"path": "/path6", "order": "ascending"}, + ], + ], } # TODO: Check why custom logger was previously used # custom_logger = logging.getLogger("CustomLogger") created_container = await db.create_container( - id='composite_index_spatial_index' + str(uuid.uuid4()), + id="composite_index_spatial_index" + str(uuid.uuid4()), indexing_policy=indexing_policy, - partition_key=PartitionKey(path='/id', kind='Hash'), + partition_key=PartitionKey(path="/id", kind="Hash"), headers={"Foo": "bar"}, user_agent="blah", user_agent_overwrite=True, @@ -772,15 +698,15 @@ async def test_create_indexing_policy_with_composite_and_spatial_indexes_async(s ) # TODO: Check why custom logger was previously used for container read created_properties = await created_container.read() - read_indexing_policy = created_properties['indexingPolicy'] + read_indexing_policy = created_properties["indexingPolicy"] - if 'localhost' in self.host or '127.0.0.1' in self.host: # TODO: Differing result between live and emulator - assert indexing_policy['spatialIndexes'] == read_indexing_policy['spatialIndexes'] + if "localhost" in self.host or "127.0.0.1" in self.host: # TODO: Differing result between live and emulator + assert indexing_policy["spatialIndexes"] == read_indexing_policy["spatialIndexes"] else: # All types are returned for spatial Indexes - assert indexing_policy['spatialIndexes'] == read_indexing_policy['spatialIndexes'] + assert indexing_policy["spatialIndexes"] == read_indexing_policy["spatialIndexes"] - assert indexing_policy['compositeIndexes'] == read_indexing_policy['compositeIndexes'] + assert indexing_policy["compositeIndexes"] == read_indexing_policy["compositeIndexes"] await db.delete_container(created_container.id) @@ -792,82 +718,90 @@ def __get_first(array): return None # '/_etag' is present in excluded paths by default - assert 1 == len(indexing_policy['excludedPaths']) + assert 1 == len(indexing_policy["excludedPaths"]) # included paths should be 1: '/'. - assert 1 == len(indexing_policy['includedPaths']) + assert 1 == len(indexing_policy["includedPaths"]) - root_included_path = __get_first([included_path for included_path in indexing_policy['includedPaths'] - if included_path['path'] == '/*']) - assert root_included_path.get('indexes') is None + root_included_path = __get_first( + [included_path for included_path in indexing_policy["includedPaths"] if included_path["path"] == "/*"] + ) + assert root_included_path.get("indexes") is None async def test_trigger_functionality_async(self): triggers_in_collection1 = [ { - 'id': 't1', - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toUpperCase() + \'t1\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t1", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toUpperCase() + 't1';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response1', - 'body': ( - 'function() {' + - ' var prebody = getContext().getRequest().getBody();' + - ' if (prebody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' + - ' var postbody = getContext().getResponse().getBody();' + - ' if (postbody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All + "id": "response1", + "body": ( + "function() {" + + " var prebody = getContext().getRequest().getBody();" + + " if (prebody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + + " var postbody = getContext().getResponse().getBody();" + + " if (postbody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response2', + "id": "response2", # can't be used because setValue is currently disabled - 'body': ( - 'function() {' + - ' var predoc = getContext().getRequest().getBody();' + - ' var postdoc = getContext().getResponse().getBody();' + - ' getContext().getResponse().setValue(' + - ' \'predocname\', predoc.id + \'response2\');' + - ' getContext().getResponse().setValue(' + - ' \'postdocname\', postdoc.id + \'response2\');' + - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All, - }] + "body": ( + "function() {" + + " var predoc = getContext().getRequest().getBody();" + + " var postdoc = getContext().getResponse().getBody();" + + " getContext().getResponse().setValue(" + + " 'predocname', predoc.id + 'response2');" + + " getContext().getResponse().setValue(" + + " 'postdocname', postdoc.id + 'response2');" + + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection2 = [ { - 'id': "t2", - 'body': "function() { }", # trigger already stringified - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t2", + "body": "function() { }", # trigger already stringified + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': "t3", - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toLowerCase() + \'t3\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }] + "id": "t3", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toLowerCase() + 't3';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection3 = [ { - 'id': 'triggerOpType', - 'body': 'function() { }', - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.Delete, - }] + "id": "triggerOpType", + "body": "function() { }", + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.Delete, + } + ] async def __create_triggers(collection, triggers): """Creates triggers. @@ -885,12 +819,15 @@ async def __create_triggers(collection, triggers): # create database db = self.database_for_test # create collections - collection1 = await db.create_container(id='test_trigger_functionality 1 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection2 = await db.create_container(id='test_trigger_functionality 2 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection3 = await db.create_container(id='test_trigger_functionality 3 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) + collection1 = await db.create_container( + id="test_trigger_functionality 1 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection2 = await db.create_container( + id="test_trigger_functionality 2 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection3 = await db.create_container( + id="test_trigger_functionality 3 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) # create triggers await __create_triggers(collection1, triggers_in_collection1) await __create_triggers(collection2, triggers_in_collection2) @@ -898,47 +835,35 @@ async def __create_triggers(collection, triggers): # create document triggers_1 = [trigger async for trigger in collection1.scripts.list_triggers()] assert len(triggers_1) == 3 - document_1_1 = await collection1.create_item( - body={'id': 'doc1', - 'key': 'value'}, - pre_trigger_include='t1' - ) - assert document_1_1['id'] == 'DOC1t1' + document_1_1 = await collection1.create_item(body={"id": "doc1", "key": "value"}, pre_trigger_include="t1") + assert document_1_1["id"] == "DOC1t1" document_1_2 = await collection1.create_item( - body={'id': 'testing post trigger', 'key': 'value'}, - pre_trigger_include='t1', - post_trigger_include='response1', + body={"id": "testing post trigger", "key": "value"}, + pre_trigger_include="t1", + post_trigger_include="response1", ) - assert document_1_2['id'] == 'TESTING POST TRIGGERt1' + assert document_1_2["id"] == "TESTING POST TRIGGERt1" document_1_3 = await collection1.create_item( - body={'id': 'responseheaders', 'key': 'value'}, - pre_trigger_include='t1' + body={"id": "responseheaders", "key": "value"}, pre_trigger_include="t1" ) - assert document_1_3['id'] == "RESPONSEHEADERSt1" + assert document_1_3["id"] == "RESPONSEHEADERSt1" triggers_2 = [trigger async for trigger in collection2.scripts.list_triggers()] assert len(triggers_2) == 2 - document_2_1 = await collection2.create_item( - body={'id': 'doc2', - 'key': 'value2'}, - pre_trigger_include='t2' - ) - assert document_2_1['id'] == 'doc2' + document_2_1 = await collection2.create_item(body={"id": "doc2", "key": "value2"}, pre_trigger_include="t2") + assert document_2_1["id"] == "doc2" document_2_2 = await collection2.create_item( - body={'id': 'Doc3', - 'prop': 'empty', - 'key': 'value2'}, - pre_trigger_include='t3') - assert document_2_2['id'] == 'doc3t3' + body={"id": "Doc3", "prop": "empty", "key": "value2"}, pre_trigger_include="t3" + ) + assert document_2_2["id"] == "doc3t3" triggers_3 = [trigger async for trigger in collection3.scripts.list_triggers()] assert len(triggers_3) == 1 with self.assertRaises(Exception): await collection3.create_item( - body={'id': 'Docoptype', 'key': 'value2'}, - post_trigger_include='triggerOpType' + body={"id": "Docoptype", "key": "value2"}, post_trigger_include="triggerOpType" ) await db.delete_container(collection1) @@ -947,14 +872,14 @@ async def __create_triggers(collection, triggers): def __validate_offer_response_body(self, offer, expected_coll_link, expected_offer_type): # type: (Offer, str, Any) -> None - assert offer.properties.get('id') is not None - assert offer.properties.get('_rid') is not None - assert offer.properties.get('_self') is not None - assert offer.properties.get('resource') is not None - assert offer.properties['_self'].find(offer.properties['id']) != -1 - assert expected_coll_link.strip('/') == offer.properties['resource'].strip('/') + assert offer.properties.get("id") is not None + assert offer.properties.get("_rid") is not None + assert offer.properties.get("_self") is not None + assert offer.properties.get("resource") is not None + assert offer.properties["_self"].find(offer.properties["id"]) != -1 + assert expected_coll_link.strip("/") == offer.properties["resource"].strip("/") if expected_offer_type: - assert expected_offer_type == offer.properties.get('offerType') + assert expected_offer_type == offer.properties.get("offerType") async def test_offer_read_and_query_async(self): # Create database. @@ -965,21 +890,22 @@ async def test_offer_read_and_query_async(self): # Read the offer. expected_offer = await collection.get_throughput() collection_properties = await collection.read() - self.__validate_offer_response_body(expected_offer, collection_properties.get('_self'), None) + self.__validate_offer_response_body(expected_offer, collection_properties.get("_self"), None) async def test_offer_replace_async(self): collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) # Read Offer expected_offer = await collection.get_throughput() collection_properties = await collection.read() - self.__validate_offer_response_body(expected_offer, collection_properties.get('_self'), None) + self.__validate_offer_response_body(expected_offer, collection_properties.get("_self"), None) # Replace the offer. replaced_offer = await collection.replace_throughput(expected_offer.offer_throughput + 100) collection_properties = await collection.read() - self.__validate_offer_response_body(replaced_offer, collection_properties.get('_self'), None) + self.__validate_offer_response_body(replaced_offer, collection_properties.get("_self"), None) # Check if the replaced offer is what we expect. - assert expected_offer.properties.get('content').get('offerThroughput') + 100 == replaced_offer.properties.get( - 'content').get('offerThroughput') + assert expected_offer.properties.get("content").get("offerThroughput") + 100 == replaced_offer.properties.get( + "content" + ).get("offerThroughput") assert expected_offer.offer_throughput + 100 == replaced_offer.offer_throughput async def test_index_progress_headers_async(self): @@ -991,12 +917,9 @@ async def test_index_progress_headers_async(self): assert HttpHeaders.IndexTransformationProgress in created_db.client_connection.last_response_headers none_coll = await created_db.create_container( - id='test_index_progress_headers none_coll ' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.NoIndex, - 'automatic': False - }, - partition_key=PartitionKey(path="/id", kind='Hash') + id="test_index_progress_headers none_coll " + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.NoIndex, "automatic": False}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) created_container = created_db.get_container_client(container=none_coll) await created_container.read(populate_quota_info=True) @@ -1029,7 +952,9 @@ async def test_negative_replace_throughput_with_all_configs_set(self): created_db = self.database_for_test collection = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - new_throughput = ThroughputProperties(offer_throughput=2500, auto_scale_max_throughput=4000, auto_scale_increment_percent=5) + new_throughput = ThroughputProperties( + offer_throughput=2500, auto_scale_max_throughput=4000, auto_scale_increment_percent=5 + ) with pytest.raises(KeyError): await collection.replace_throughput(new_throughput) @@ -1040,5 +965,5 @@ async def _mock_execute_function(self, function, *args, **kwargs): return await self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_database.py b/sdk/cosmos/azure-cosmos/tests/test_crud_database.py index 06a4f419d847..05f668db55c3 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_database.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_database.py @@ -2,8 +2,7 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" import json import os.path @@ -50,8 +49,7 @@ def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestCRUDDatabaseOperations(unittest.TestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" configs = test_config.TestConfig host = configs.host @@ -69,18 +67,18 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.databaseForTest = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) @@ -89,13 +87,12 @@ def test_database_crud(self): created_db = self.client.create_database(database_id) self.assertEqual(created_db.id, database_id) # Read databases after creation. - databases = list(self.client.query_databases({ - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': database_id} - ] - })) - self.assertTrue(databases, 'number of results for the query should be > 0') + databases = list( + self.client.query_databases( + {"query": "SELECT * FROM root r WHERE r.id=@id", "parameters": [{"name": "@id", "value": database_id}]} + ) + ) + self.assertTrue(databases, "number of results for the query should be > 0") # read database. self.client.get_database_client(created_db.id).read() @@ -104,8 +101,7 @@ def test_database_crud(self): self.client.delete_database(created_db.id) # read database after deletion read_db = self.client.get_database_client(created_db.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - read_db.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, read_db.read) database_proxy = self.client.create_database_if_not_exists(id=database_id, offer_throughput=5000) self.assertEqual(database_id, database_proxy.id) @@ -121,10 +117,7 @@ def test_database_level_offer_throughput(self): # Create a database with throughput offer_throughput = 1000 database_id = str(uuid.uuid4()) - created_db = self.client.create_database( - id=database_id, - offer_throughput=offer_throughput - ) + created_db = self.client.create_database(id=database_id, offer_throughput=offer_throughput) self.assertEqual(created_db.id, database_id) # Verify offer throughput for database @@ -139,96 +132,92 @@ def test_database_level_offer_throughput(self): def test_sql_query_crud(self): # create two databases. - db1 = self.client.create_database('database 1' + str(uuid.uuid4())) - db2 = self.client.create_database('database 2' + str(uuid.uuid4())) + db1 = self.client.create_database("database 1" + str(uuid.uuid4())) + db2 = self.client.create_database("database 2" + str(uuid.uuid4())) # query with parameters. - databases = list(self.client.query_databases({ - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': db1.id} - ] - })) - self.assertEqual(1, len(databases), 'Unexpected number of query results.') + databases = list( + self.client.query_databases( + {"query": "SELECT * FROM root r WHERE r.id=@id", "parameters": [{"name": "@id", "value": db1.id}]} + ) + ) + self.assertEqual(1, len(databases), "Unexpected number of query results.") # query without parameters. - databases = list(self.client.query_databases({ - 'query': 'SELECT * FROM root r WHERE r.id="database non-existing"' - })) - self.assertEqual(0, len(databases), 'Unexpected number of query results.') + databases = list( + self.client.query_databases({"query": 'SELECT * FROM root r WHERE r.id="database non-existing"'}) + ) + self.assertEqual(0, len(databases), "Unexpected number of query results.") # query with a string. databases = list(self.client.query_databases('SELECT * FROM root r WHERE r.id="' + db2.id + '"')) # nosec - self.assertEqual(1, len(databases), 'Unexpected number of query results.') + self.assertEqual(1, len(databases), "Unexpected number of query results.") self.client.delete_database(db1.id) self.client.delete_database(db2.id) def test_database_account_functionality(self): # Validate database account functionality. database_account = self.client.get_database_account() - self.assertEqual(database_account.DatabasesLink, '/dbs/') - self.assertEqual(database_account.MediaLink, '/media/') - if (HttpHeaders.MaxMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): + self.assertEqual(database_account.DatabasesLink, "/dbs/") + self.assertEqual(database_account.MediaLink, "/media/") + if HttpHeaders.MaxMediaStorageUsageInMB in self.client.client_connection.last_response_headers: self.assertEqual( database_account.MaxMediaStorageUsageInMB, - self.client.client_connection.last_response_headers[ - HttpHeaders.MaxMediaStorageUsageInMB]) - if (HttpHeaders.CurrentMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): + self.client.client_connection.last_response_headers[HttpHeaders.MaxMediaStorageUsageInMB], + ) + if HttpHeaders.CurrentMediaStorageUsageInMB in self.client.client_connection.last_response_headers: self.assertEqual( database_account.CurrentMediaStorageUsageInMB, - self.client.client_connection.last_response_headers[ - HttpHeaders.CurrentMediaStorageUsageInMB]) - self.assertIsNotNone(database_account.ConsistencyPolicy['defaultConsistencyLevel']) + self.client.client_connection.last_response_headers[HttpHeaders.CurrentMediaStorageUsageInMB], + ) + self.assertIsNotNone(database_account.ConsistencyPolicy["defaultConsistencyLevel"]) def test_id_validation(self): # Id shouldn't end with space. try: - self.client.create_database(id='id_with_space ') + self.client.create_database(id="id_with_space ") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id ends with a space or newline.', e.args[0]) + self.assertEqual("Id ends with a space or newline.", e.args[0]) # Id shouldn't contain '/'. try: - self.client.create_database(id='id_with_illegal/_char') + self.client.create_database(id="id_with_illegal/_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id shouldn't contain '\\'. try: - self.client.create_database(id='id_with_illegal\\_char') + self.client.create_database(id="id_with_illegal\\_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id shouldn't contain '?'. try: - self.client.create_database(id='id_with_illegal?_char') + self.client.create_database(id="id_with_illegal?_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id shouldn't contain '#'. try: - self.client.create_database(id='id_with_illegal#_char') + self.client.create_database(id="id_with_illegal#_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id can begin with space - db = self.client.create_database(id=' id_begin_space' + str(uuid.uuid4())) + db = self.client.create_database(id=" id_begin_space" + str(uuid.uuid4())) self.assertTrue(True) self.client.delete_database(db.id) - -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: if inst.args[0] is True: # raised by sys.exit(True) when tests failed - raise \ No newline at end of file + raise diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_database_async.py b/sdk/cosmos/azure-cosmos/tests/test_crud_database_async.py index db67fc9c1600..6b1a7f507e28 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_database_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_database_async.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import json import logging import os.path @@ -49,8 +49,8 @@ async def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestCRUDDatabaseOperationsAsync(unittest.IsolatedAsyncioTestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" + client: CosmosClient = None configs = test_config.TestConfig host = configs.host @@ -68,18 +68,18 @@ async def __assert_http_failure_with_status(self, status_code, func, *args, **kw """ try: await func(*args, **kwargs) - self.fail('function should fail.') + self.fail("function should fail.") except exceptions.CosmosHttpResponseError as inst: assert inst.status_code == status_code @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -93,12 +93,12 @@ async def test_database_crud_async(self): created_db = await self.client.create_database(database_id) assert created_db.id == database_id # query databases. - databases = [database async for database in self.client.query_databases( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': database_id} - ] - )] + databases = [ + database + async for database in self.client.query_databases( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": database_id}] + ) + ] assert len(databases) > 0 @@ -129,10 +129,7 @@ async def test_database_level_offer_throughput_async(self): # Create a database with throughput offer_throughput = 1000 database_id = str(uuid.uuid4()) - created_db = await self.client.create_database( - id=database_id, - offer_throughput=offer_throughput - ) + created_db = await self.client.create_database(id=database_id, offer_throughput=offer_throughput) assert created_db.id == database_id # Verify offer throughput for database @@ -148,28 +145,30 @@ async def test_database_level_offer_throughput_async(self): async def test_sql_query_crud_async(self): # create two databases. - db1 = await self.client.create_database('database 1' + str(uuid.uuid4())) - db2 = await self.client.create_database('database 2' + str(uuid.uuid4())) + db1 = await self.client.create_database("database 1" + str(uuid.uuid4())) + db2 = await self.client.create_database("database 2" + str(uuid.uuid4())) # query with parameters. - databases = [database async for database in self.client.query_databases( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': db1.id} - ] - )] + databases = [ + database + async for database in self.client.query_databases( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": db1.id}] + ) + ] assert 1 == len(databases) # query without parameters. - databases = [database async for database in self.client.query_databases( - query='SELECT * FROM root r WHERE r.id="database non-existing"' - )] + databases = [ + database + async for database in self.client.query_databases( + query='SELECT * FROM root r WHERE r.id="database non-existing"' + ) + ] assert 0 == len(databases) # query with a string. query_string = 'SELECT * FROM root r WHERE r.id="' + db2.id + '"' - databases = [database async for database in - self.client.query_databases(query=query_string)] + databases = [database async for database in self.client.query_databases(query=query_string)] assert 1 == len(databases) await self.client.delete_database(db1.id) @@ -178,19 +177,20 @@ async def test_sql_query_crud_async(self): async def test_database_account_functionality_async(self): # Validate database account functionality. database_account = await self.client._get_database_account() - assert database_account.DatabasesLink == '/dbs/' - assert database_account.MediaLink == '/media/' - if (HttpHeaders.MaxMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): - assert database_account.MaxMediaStorageUsageInMB == self.client.client_connection.last_response_headers[ - HttpHeaders.MaxMediaStorageUsageInMB] - if (HttpHeaders.CurrentMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): - assert database_account.CurrentMediaStorageUsageInMB == self.client.client_connection.last_response_headers[ - HttpHeaders.CurrentMediaStorageUsageInMB] - assert database_account.ConsistencyPolicy['defaultConsistencyLevel'] is not None - - - -if __name__ == '__main__': + assert database_account.DatabasesLink == "/dbs/" + assert database_account.MediaLink == "/media/" + if HttpHeaders.MaxMediaStorageUsageInMB in self.client.client_connection.last_response_headers: + assert ( + database_account.MaxMediaStorageUsageInMB + == self.client.client_connection.last_response_headers[HttpHeaders.MaxMediaStorageUsageInMB] + ) + if HttpHeaders.CurrentMediaStorageUsageInMB in self.client.client_connection.last_response_headers: + assert ( + database_account.CurrentMediaStorageUsageInMB + == self.client.client_connection.last_response_headers[HttpHeaders.CurrentMediaStorageUsageInMB] + ) + assert database_account.ConsistencyPolicy["defaultConsistencyLevel"] is not None + + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled.py b/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled.py index 5f3bbbe25fb7..3f77f812b177 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled.py @@ -2,8 +2,7 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" import json import logging @@ -29,13 +28,15 @@ from azure.cosmos.http_constants import HttpHeaders, StatusCodes from azure.cosmos.partition_key import PartitionKey + class CosmosResponseHeaderEnvelope: def __init__(self): self.headers: Optional[Dict[str, Any]] = None - + def capture_response_headers(self, headers: Dict[str, Any], response: Dict[str, Any]): self.headers = headers + class TimeoutTransport(RequestsTransport): def __init__(self, response): @@ -57,8 +58,7 @@ def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestCRUDOperationsResponsePayloadOnWriteDisabled(unittest.TestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" configs = test_config.TestConfig host = configs.host @@ -76,18 +76,18 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey, no_response_on_write=True) cls.databaseForTest = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) cls.logger = logging.getLogger("DisableResponseOnWriteTestLogger") @@ -98,13 +98,12 @@ def test_database_crud(self): created_db = self.client.create_database(database_id) self.assertEqual(created_db.id, database_id) # Read databases after creation. - databases = list(self.client.query_databases({ - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': database_id} - ] - })) - self.assertTrue(databases, 'number of results for the query should be > 0') + databases = list( + self.client.query_databases( + {"query": "SELECT * FROM root r WHERE r.id=@id", "parameters": [{"name": "@id", "value": database_id}]} + ) + ) + self.assertTrue(databases, "number of results for the query should be > 0") # read database. self.client.get_database_client(created_db.id).read() @@ -113,8 +112,7 @@ def test_database_crud(self): self.client.delete_database(created_db.id) # read database after deletion read_db = self.client.get_database_client(created_db.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - read_db.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, read_db.read) database_proxy = self.client.create_database_if_not_exists(id=database_id, offer_throughput=5000) self.assertEqual(database_id, database_proxy.id) @@ -130,10 +128,7 @@ def test_database_level_offer_throughput(self): # Create a database with throughput offer_throughput = 1000 database_id = str(uuid.uuid4()) - created_db = self.client.create_database( - id=database_id, - offer_throughput=offer_throughput - ) + created_db = self.client.create_database(id=database_id, offer_throughput=offer_throughput) self.assertEqual(created_db.id, database_id) # Verify offer throughput for database @@ -148,27 +143,26 @@ def test_database_level_offer_throughput(self): def test_sql_query_crud(self): # create two databases. - db1 = self.client.create_database('database 1' + str(uuid.uuid4())) - db2 = self.client.create_database('database 2' + str(uuid.uuid4())) + db1 = self.client.create_database("database 1" + str(uuid.uuid4())) + db2 = self.client.create_database("database 2" + str(uuid.uuid4())) # query with parameters. - databases = list(self.client.query_databases({ - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': db1.id} - ] - })) - self.assertEqual(1, len(databases), 'Unexpected number of query results.') + databases = list( + self.client.query_databases( + {"query": "SELECT * FROM root r WHERE r.id=@id", "parameters": [{"name": "@id", "value": db1.id}]} + ) + ) + self.assertEqual(1, len(databases), "Unexpected number of query results.") # query without parameters. - databases = list(self.client.query_databases({ - 'query': 'SELECT * FROM root r WHERE r.id="database non-existing"' - })) - self.assertEqual(0, len(databases), 'Unexpected number of query results.') + databases = list( + self.client.query_databases({"query": 'SELECT * FROM root r WHERE r.id="database non-existing"'}) + ) + self.assertEqual(0, len(databases), "Unexpected number of query results.") # query with a string. databases = list(self.client.query_databases('SELECT * FROM root r WHERE r.id="' + db2.id + '"')) # nosec - self.assertEqual(1, len(databases), 'Unexpected number of query results.') + self.assertEqual(1, len(databases), "Unexpected number of query results.") self.client.delete_database(db1.id) self.client.delete_database(db2.id) @@ -177,64 +171,68 @@ def test_collection_crud(self): collections = list(created_db.list_containers()) # create a collection before_create_collections_count = len(collections) - collection_id = 'test_collection_crud ' + str(uuid.uuid4()) - collection_indexing_policy = {'indexingMode': 'consistent'} - created_collection = created_db.create_container(id=collection_id, - indexing_policy=collection_indexing_policy, - partition_key=PartitionKey(path="/pk", kind="Hash")) + collection_id = "test_collection_crud " + str(uuid.uuid4()) + collection_indexing_policy = {"indexingMode": "consistent"} + created_collection = created_db.create_container( + id=collection_id, + indexing_policy=collection_indexing_policy, + partition_key=PartitionKey(path="/pk", kind="Hash"), + ) self.assertEqual(collection_id, created_collection.id) created_properties = created_collection.read() - self.assertEqual('consistent', created_properties['indexingPolicy']['indexingMode']) - self.assertDictEqual(PartitionKey(path='/pk', kind='Hash'), created_properties['partitionKey']) + self.assertEqual("consistent", created_properties["indexingPolicy"]["indexingMode"]) + self.assertDictEqual(PartitionKey(path="/pk", kind="Hash"), created_properties["partitionKey"]) # read collections after creation collections = list(created_db.list_containers()) - self.assertEqual(len(collections), - before_create_collections_count + 1, - 'create should increase the number of collections') + self.assertEqual( + len(collections), before_create_collections_count + 1, "create should increase the number of collections" + ) # query collections - collections = list(created_db.query_containers( - { - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': collection_id} - ] - })) + collections = list( + created_db.query_containers( + { + "query": "SELECT * FROM root r WHERE r.id=@id", + "parameters": [{"name": "@id", "value": collection_id}], + } + ) + ) self.assertTrue(collections) # delete collection created_db.delete_container(created_collection.id) # read collection after deletion created_container = created_db.get_container_client(created_collection.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - created_container.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, created_container.read) def test_partitioned_collection(self): created_db = self.databaseForTest - collection_definition = {'id': 'test_partitioned_collection ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id'], - 'kind': documents.PartitionKind.Hash - } - } + collection_definition = { + "id": "test_partitioned_collection " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/id"], "kind": documents.PartitionKind.Hash}, + } offer_throughput = 10100 - created_collection = created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition['partitionKey'], - offer_throughput=offer_throughput) + created_collection = created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition["partitionKey"], + offer_throughput=offer_throughput, + ) - self.assertEqual(collection_definition.get('id'), created_collection.id) + self.assertEqual(collection_definition.get("id"), created_collection.id) created_collection_properties = created_collection.read( - populate_partition_key_range_statistics=True, - populate_quota_info=True) - self.assertEqual(collection_definition.get('partitionKey').get('paths')[0], - created_collection_properties['partitionKey']['paths'][0]) - self.assertEqual(collection_definition.get('partitionKey').get('kind'), - created_collection_properties['partitionKey']['kind']) + populate_partition_key_range_statistics=True, populate_quota_info=True + ) + self.assertEqual( + collection_definition.get("partitionKey").get("paths")[0], + created_collection_properties["partitionKey"]["paths"][0], + ) + self.assertEqual( + collection_definition.get("partitionKey").get("kind"), created_collection_properties["partitionKey"]["kind"] + ) self.assertIsNotNone(created_collection_properties.get("statistics")) self.assertIsNotNone(created_db.client_connection.last_response_headers.get("x-ms-resource-usage")) @@ -249,19 +247,15 @@ def test_partitioned_collection(self): def test_partitioned_collection_partition_key_extraction(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_extraction ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction " + str(uuid.uuid4()) created_collection = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state", kind=documents.PartitionKind.Hash) ) - document_definition = {'id': 'document1', - 'address': {'street': '1 Microsoft Way', - 'city': 'Redmond', - 'state': 'WA', - 'zip code': 98052 - } - } + document_definition = { + "id": "document1", + "address": {"street": "1 Microsoft Way", "city": "Redmond", "state": "WA", "zip code": 98052}, + } self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -271,13 +265,12 @@ def test_partitioned_collection_partition_key_extraction(self): self.assertEqual(self.last_headers[0], '["WA"]') del self.last_headers[:] - self.assertEqual(created_document.get('id'), document_definition.get('id')) - self.assertEqual(created_document.get('address').get('state'), document_definition.get('address').get('state')) + self.assertEqual(created_document.get("id"), document_definition.get("id")) + self.assertEqual(created_document.get("address").get("state"), document_definition.get("address").get("state")) - collection_id = 'test_partitioned_collection_partition_key_extraction1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction1 " + str(uuid.uuid4()) created_collection1 = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility.ExecuteFunction @@ -290,10 +283,9 @@ def test_partitioned_collection_partition_key_extraction(self): # self.assertEqual(options['partitionKey'], documents.Undefined) - collection_id = 'test_partitioned_collection_partition_key_extraction2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction2 " + str(uuid.uuid4()) created_collection2 = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state/city", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility.ExecuteFunction @@ -313,15 +305,13 @@ def test_partitioned_collection_partition_key_extraction(self): def test_partitioned_collection_partition_key_extraction_special_chars(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars1 " + str(uuid.uuid4()) created_collection1 = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\"level\' 1*()\"/\"le/vel2\"', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path='/"level\' 1*()"/"le/vel2"', kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document1', - "level' 1*()": {"le/vel2": 'val1'} - } + document_definition = {"id": "document1", "level' 1*()": {"le/vel2": "val1"}} self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -331,24 +321,18 @@ def test_partitioned_collection_partition_key_extraction_special_chars(self): del self.last_headers[:] collection_definition2 = { - 'id': 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/\'level\" 1*()\'/\'le/vel2\''], - 'kind': documents.PartitionKind.Hash - } + "id": "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/'level\" 1*()'/'le/vel2'"], "kind": documents.PartitionKind.Hash}, } - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()) created_collection2 = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\'level\" 1*()\'/\'le/vel2\'', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path="/'level\" 1*()'/'le/vel2'", kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document2', - 'level\" 1*()': {'le/vel2': 'val2'} - } + document_definition = {"id": "document2", 'level" 1*()': {"le/vel2": "val2"}} self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -366,15 +350,15 @@ def test_partitioned_collection_path_parser(self): with open(os.path.join(test_dir, "BaselineTest.PathParser.json")) as json_file: entries = json.loads(json_file.read()) for entry in entries: - parts = base.ParsePaths([entry['path']]) - self.assertEqual(parts, entry['parts']) + parts = base.ParsePaths([entry["path"]]) + self.assertEqual(parts, entry["parts"]) - paths = ["/\"Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1\"/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ['/"Ke \\ \\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1"/*'] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] self.assertEqual(parts, base.ParsePaths(paths)) - paths = ["/'Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ["/'Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] self.assertEqual(parts, base.ParsePaths(paths)) def test_partitioned_collection_document_crud_and_query(self): @@ -382,102 +366,103 @@ def test_partitioned_collection_document_crud_and_query(self): created_collection = created_db.create_container("crud-query-container", partition_key=PartitionKey("/pk")) - document_definition = {'id': 'document', - 'key': 'value', - 'pk': 'pk'} + document_definition = {"id": "document", "key": "value", "pk": "pk"} - headerEnvelope=CosmosResponseHeaderEnvelope() + headerEnvelope = CosmosResponseHeaderEnvelope() no_response = created_collection.create_item( - body=document_definition, - response_hook=headerEnvelope.capture_response_headers + body=document_definition, response_hook=headerEnvelope.capture_response_headers ) self.assertDictEqual(no_response, {}) # read document read_document = created_collection.read_item( - item=document_definition.get('id'), - partition_key=document_definition.get('pk') + item=document_definition.get("id"), partition_key=document_definition.get("pk") ) - self.assertEqual(headerEnvelope.headers['etag'], read_document['_etag']) - self.assertEqual(read_document.get('id'), document_definition.get('id')) - self.assertEqual(read_document.get('key'), document_definition.get('key')) + self.assertEqual(headerEnvelope.headers["etag"], read_document["_etag"]) + self.assertEqual(read_document.get("id"), document_definition.get("id")) + self.assertEqual(read_document.get("key"), document_definition.get("key")) # Read document feed doesn't require partitionKey as it's always a cross partition query documentlist = list(created_collection.read_all_items()) self.assertEqual(1, len(documentlist)) # replace document - document_definition['key'] = 'new value' + document_definition["key"] = "new value" no_Response = created_collection.replace_item( - item=read_document, - body=document_definition, - response_hook=headerEnvelope.capture_response_headers + item=read_document, body=document_definition, response_hook=headerEnvelope.capture_response_headers ) self.assertDictEqual(no_response, {}) # read document replaced_document = created_collection.read_item( - item=document_definition.get('id'), - partition_key=document_definition.get('pk') + item=document_definition.get("id"), partition_key=document_definition.get("pk") ) - self.assertEqual(headerEnvelope.headers['etag'], replaced_document.get('_etag')) - self.assertEqual(replaced_document.get('key'), document_definition.get('key')) + self.assertEqual(headerEnvelope.headers["etag"], replaced_document.get("_etag")) + self.assertEqual(replaced_document.get("key"), document_definition.get("key")) # upsert document(create scenario) - document_definition['id'] = 'document2' - document_definition['key'] = 'value2' + document_definition["id"] = "document2" + document_definition["key"] = "value2" - no_Response = created_collection.upsert_item(body=document_definition, response_hook=headerEnvelope.capture_response_headers) + no_Response = created_collection.upsert_item( + body=document_definition, response_hook=headerEnvelope.capture_response_headers + ) self.assertDictEqual(no_response, {}) upserted_document = created_collection.read_item( - item=document_definition.get('id'), - partition_key=document_definition.get('pk') + item=document_definition.get("id"), partition_key=document_definition.get("pk") ) - self.assertEqual(headerEnvelope.headers['etag'], upserted_document.get('_etag')) - self.assertEqual(upserted_document.get('id'), document_definition.get('id')) - self.assertEqual(upserted_document.get('key'), document_definition.get('key')) + self.assertEqual(headerEnvelope.headers["etag"], upserted_document.get("_etag")) + self.assertEqual(upserted_document.get("id"), document_definition.get("id")) + self.assertEqual(upserted_document.get("key"), document_definition.get("key")) documentlist = list(created_collection.read_all_items()) self.assertEqual(2, len(documentlist)) # delete document - created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get('pk')) + created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get("pk")) # query document on the partition key specified in the predicate will pass even without setting enableCrossPartitionQuery or passing in the partitionKey value - documentlist = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.id=\'' + replaced_document.get('id') + '\'' # nosec - }, enable_cross_partition_query=True)) + documentlist = list( + created_collection.query_items( + {"query": "SELECT * FROM root r WHERE r.id='" + replaced_document.get("id") + "'"}, # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(1, len(documentlist)) # query document on any property other than partitionKey will fail without setting enableCrossPartitionQuery or passing in the partitionKey value try: - list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'' # nosec - })) + list( + created_collection.query_items( + {"query": "SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'"} # nosec + ) + ) except Exception: pass # cross partition query - documentlist = list(created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - enable_cross_partition_query=True - )) + documentlist = list( + created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(1, len(documentlist)) # query document by providing the partitionKey value - documentlist = list(created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - partition_key=replaced_document.get('pk') - )) + documentlist = list( + created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + partition_key=replaced_document.get("pk"), + ) + ) self.assertEqual(1, len(documentlist)) created_db.delete_container(created_collection.id) @@ -485,52 +470,48 @@ def test_partitioned_collection_document_crud_and_query(self): def test_partitioned_collection_permissions(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_permissions all collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions all collection" + str(uuid.uuid4()) all_collection = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - collection_id = 'test_partitioned_collection_permissions read collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions read collection" + str(uuid.uuid4()) read_collection = created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - user = created_db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = created_db.create_user(body={"id": "user" + str(uuid.uuid4())}) permission_definition = { - 'id': 'all permission', - 'permissionMode': documents.PermissionMode.All, - 'resource': all_collection.container_link, - 'resourcePartitionKey': [1] + "id": "all permission", + "permissionMode": documents.PermissionMode.All, + "resource": all_collection.container_link, + "resourcePartitionKey": [1], } all_permission = user.create_permission(body=permission_definition) permission_definition = { - 'id': 'read permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': read_collection.container_link, - 'resourcePartitionKey': [1] + "id": "read permission", + "permissionMode": documents.PermissionMode.Read, + "resource": read_collection.container_link, + "resourcePartitionKey": [1], } read_permission = user.create_permission(body=permission_definition) resource_tokens = {} # storing the resource tokens based on Resource IDs - resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = (all_permission.properties['_token']) - resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = ( - read_permission.properties['_token']) + resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = all_permission.properties["_token"] + resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = read_permission.properties["_token"] restricted_client = cosmos_client.CosmosClient( - self.host, resource_tokens, "Session", connection_policy=self.connectionPolicy) + self.host, resource_tokens, "Session", connection_policy=self.connectionPolicy + ) - document_definition = {'id': 'document1', - 'key': 1 - } + document_definition = {"id": "document1", "key": 1} all_collection.client_connection = restricted_client.client_connection read_collection.client_connection = restricted_client.client_connection @@ -539,29 +520,21 @@ def test_partitioned_collection_permissions(self): created_document = all_collection.create_item(body=document_definition) # Create document in read_collection should fail since it has only read permissions for this collection - self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - read_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, read_collection.create_item, document_definition) - document_definition['key'] = 2 + document_definition["key"] = 2 # Create document should fail since the partitionKey is 2 which is different that what is specified as resourcePartitionKey in permission object - self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - all_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, all_collection.create_item, document_definition) - document_definition['key'] = 1 + document_definition["key"] = 1 # Delete document should succeed since the partitionKey is 1 which is what specified as resourcePartitionKey in permission object - created_document = all_collection.delete_item(item=created_document['id'], - partition_key=document_definition['key']) + created_document = all_collection.delete_item( + item=created_document["id"], partition_key=document_definition["key"] + ) # Delete document in read_collection should fail since it has only read permissions for this collection self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - read_collection.delete_item, - document_definition['id'], - document_definition['id'] + StatusCodes.FORBIDDEN, read_collection.delete_item, document_definition["id"], document_definition["id"] ) created_db.delete_container(all_collection) @@ -574,106 +547,88 @@ def test_partitioned_collection_execute_stored_procedure(self): document_id = str(uuid.uuid4()) sproc = { - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' var client = getContext().getCollection();' + - ' client.createDocument(client.getSelfLink(), { id: "' + document_id + '", pk : 2}, ' + - ' {}, function(err, docCreated, options) { ' + - ' if(err) throw new Error(\'Error while creating document: \' + err.message);' + - ' else {' + - ' getContext().getResponse().setBody(1);' + - ' }' + - ' });}') + "id": "storedProcedure" + str(uuid.uuid4()), + "body": ( + "function () {" + + " var client = getContext().getCollection();" + + ' client.createDocument(client.getSelfLink(), { id: "' + + document_id + + '", pk : 2}, ' + + " {}, function(err, docCreated, options) { " + + " if(err) throw new Error('Error while creating document: ' + err.message);" + + " else {" + + " getContext().getResponse().setBody(1);" + + " }" + + " });}" + ), } created_sproc = created_collection.scripts.create_stored_procedure(sproc) # Partiton Key value same as what is specified in the stored procedure body - result = created_collection.scripts.execute_stored_procedure(sproc=created_sproc['id'], partition_key=2) + result = created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=2) self.assertEqual(result, 1) # Partiton Key value different than what is specified in the stored procedure body will cause a bad request(400) error self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.scripts.execute_stored_procedure, - created_sproc['id'], - 3) + StatusCodes.BAD_REQUEST, created_collection.scripts.execute_stored_procedure, created_sproc["id"], 3 + ) def test_partitioned_collection_partition_key_value_types(self): created_db = self.databaseForTest created_collection = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': None, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": None, "spam": "eggs"} # create document with partitionKey set as None here created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "spam": "eggs"} # create document with partitionKey set as Undefined here created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': True, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": True, "spam": "eggs"} # create document with bool partitionKey created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 'value', - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": "value", "spam": "eggs"} # create document with string partitionKey created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 100, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 100, "spam": "eggs"} # create document with int partitionKey created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 10.50, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 10.50, "spam": "eggs"} # create document with float partitionKey created_collection.create_item(body=document_definition) - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'pk': 'value'} + document_definition = {"name": "sample document", "spam": "eggs", "pk": "value"} # Should throw an error because automatic id generation is disabled always. - self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition - ) + self.__AssertHTTPFailureWithStatus(StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition) def test_partitioned_collection_conflict_crud_and_query(self): created_db = self.databaseForTest created_collection = self.databaseForTest.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - conflict_definition = {'id': 'new conflict', - 'resourceId': 'doc1', - 'operationType': 'create', - 'resourceType': 'document' - } + conflict_definition = { + "id": "new conflict", + "resourceId": "doc1", + "operationType": "create", + "resourceType": "document", + } # read conflict here will return resource not found(404) since there is no conflict here self.__AssertHTTPFailureWithStatus( - StatusCodes.NOT_FOUND, - created_collection.get_conflict, - conflict_definition['id'], - conflict_definition['id'] + StatusCodes.NOT_FOUND, created_collection.get_conflict, conflict_definition["id"], conflict_definition["id"] ) # Read conflict feed doesn't requires partitionKey to be specified as it's a cross partition thing @@ -684,34 +639,41 @@ def test_partitioned_collection_conflict_crud_and_query(self): self.__AssertHTTPFailureWithStatus( StatusCodes.NOT_FOUND, created_collection.delete_conflict, - conflict_definition['id'], - conflict_definition['id'] + conflict_definition["id"], + conflict_definition["id"], ) # query conflicts on any property other than partitionKey will fail without setting enableCrossPartitionQuery or passing in the partitionKey value try: - list(created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get( # nosec - 'resourceType') + '\'' - )) + list( + created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + + conflict_definition.get("resourceType") # nosec + + "'" + ) + ) except Exception: pass - conflictlist = list(created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', - # nosec - enable_cross_partition_query=True - )) + conflictlist = list( + created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(0, len(conflictlist)) # query conflicts by providing the partitionKey value - options = {'partitionKey': conflict_definition.get('id')} - conflictlist = list(created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', - # nosec - partition_key=conflict_definition['id'] - )) + options = {"partitionKey": conflict_definition.get("id")} + conflictlist = list( + created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + # nosec + partition_key=conflict_definition["id"], + ) + ) self.assertEqual(0, len(conflictlist)) @@ -726,86 +688,77 @@ def test_document_crud_response_payload_enabled_via_override(self): before_create_documents_count = len(documents) # create a document with auto ID generation - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk'} + document_definition = {"name": "sample document", "spam": "eggs", "key": "value", "pk": "pk"} - created_document = created_collection.create_item(body=document_definition, enable_automatic_id_generation=True, no_response=False) - self.assertEqual(created_document.get('name'), - document_definition['name']) - - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk', - 'id': str(uuid.uuid4())} + created_document = created_collection.create_item( + body=document_definition, enable_automatic_id_generation=True, no_response=False + ) + self.assertEqual(created_document.get("name"), document_definition["name"]) + + document_definition = { + "name": "sample document", + "spam": "eggs", + "key": "value", + "pk": "pk", + "id": str(uuid.uuid4()), + } created_document = created_collection.create_item(body=document_definition, no_response=False) - self.assertEqual(created_document.get('name'), - document_definition['name']) - self.assertEqual(created_document.get('id'), - document_definition['id']) + self.assertEqual(created_document.get("name"), document_definition["name"]) + self.assertEqual(created_document.get("id"), document_definition["id"]) # duplicated documents are not allowed when 'id' is provided. duplicated_definition_with_id = document_definition.copy() - self.__AssertHTTPFailureWithStatus(StatusCodes.CONFLICT, - created_collection.create_item, - duplicated_definition_with_id) + self.__AssertHTTPFailureWithStatus( + StatusCodes.CONFLICT, created_collection.create_item, duplicated_definition_with_id + ) # read documents after creation documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 2, - 'create should increase the number of documents') + len(documents), before_create_documents_count + 2, "create should increase the number of documents" + ) # query documents - documents = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.name=@name', - 'parameters': [ - {'name': '@name', 'value': document_definition['name']} - ] - }, enable_cross_partition_query=True - )) + documents = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.name=@name", + "parameters": [{"name": "@name", "value": document_definition["name"]}], + }, + enable_cross_partition_query=True, + ) + ) self.assertTrue(documents) - documents = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.name=@name', - 'parameters': [ - {'name': '@name', 'value': document_definition['name']} - ], - }, enable_cross_partition_query=True, - enable_scan_in_query=True - )) + documents = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.name=@name", + "parameters": [{"name": "@name", "value": document_definition["name"]}], + }, + enable_cross_partition_query=True, + enable_scan_in_query=True, + ) + ) self.assertTrue(documents) # replace document. - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' - old_etag = created_document['_etag'] + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" + old_etag = created_document["_etag"] replaced_document = created_collection.replace_item( - item=created_document['id'], - body=created_document, - no_response=False - ) - self.assertEqual(replaced_document['name'], - 'replaced document', - 'document id property should change') - self.assertEqual(replaced_document['spam'], - 'not eggs', - 'property should have changed') - self.assertEqual(created_document['id'], - replaced_document['id'], - 'document id should stay the same') + item=created_document["id"], body=created_document, no_response=False + ) + self.assertEqual(replaced_document["name"], "replaced document", "document id property should change") + self.assertEqual(replaced_document["spam"], "not eggs", "property should have changed") + self.assertEqual(created_document["id"], replaced_document["id"], "document id should stay the same") # replace document based on condition - replaced_document['name'] = 'replaced document based on condition' - replaced_document['spam'] = 'new spam field' + replaced_document["name"] = "replaced document based on condition" + replaced_document["spam"] = "new spam field" # should fail for stale etag self.__AssertHTTPFailureWithStatus( StatusCodes.PRECONDITION_FAILED, created_collection.replace_item, - replaced_document['id'], + replaced_document["id"], replaced_document, if_match=old_etag, ) @@ -813,71 +766,62 @@ def test_document_crud_response_payload_enabled_via_override(self): # should fail if only etag specified with self.assertRaises(ValueError): created_collection.replace_item( - etag=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document, - no_response=False + etag=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document, no_response=False ) # should fail if only match condition specified with self.assertRaises(ValueError): created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - item=replaced_document['id'], + item=replaced_document["id"], body=replaced_document, - no_response=False + no_response=False, ) with self.assertRaises(ValueError): created_collection.replace_item( match_condition=MatchConditions.IfModified, - item=replaced_document['id'], + item=replaced_document["id"], body=replaced_document, - no_response=False + no_response=False, ) # should fail if invalid match condition specified with self.assertRaises(TypeError): created_collection.replace_item( - match_condition=replaced_document['_etag'], - item=replaced_document['id'], + match_condition=replaced_document["_etag"], + item=replaced_document["id"], body=replaced_document, - no_response=False + no_response=False, ) # should pass for most recent etag replaced_document_conditional = created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - etag=replaced_document['_etag'], - item=replaced_document['id'], + etag=replaced_document["_etag"], + item=replaced_document["id"], body=replaced_document, - no_response=False - ) - self.assertEqual(replaced_document_conditional['name'], - 'replaced document based on condition', - 'document id property should change') - self.assertEqual(replaced_document_conditional['spam'], - 'new spam field', - 'property should have changed') - self.assertEqual(replaced_document_conditional['id'], - replaced_document['id'], - 'document id should stay the same') + no_response=False, + ) + self.assertEqual( + replaced_document_conditional["name"], + "replaced document based on condition", + "document id property should change", + ) + self.assertEqual(replaced_document_conditional["spam"], "new spam field", "property should have changed") + self.assertEqual( + replaced_document_conditional["id"], replaced_document["id"], "document id should stay the same" + ) # read document one_document_from_read = created_collection.read_item( - item=replaced_document['id'], - partition_key=replaced_document['pk'] + item=replaced_document["id"], partition_key=replaced_document["pk"] ) - self.assertEqual(replaced_document['id'], - one_document_from_read['id']) + self.assertEqual(replaced_document["id"], one_document_from_read["id"]) # delete document - created_collection.delete_item( - item=replaced_document, - partition_key=replaced_document['pk'] - ) + created_collection.delete_item(item=replaced_document, partition_key=replaced_document["pk"]) # read documents after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - created_collection.read_item, - replaced_document['id'], - replaced_document['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, created_collection.read_item, replaced_document["id"], replaced_document["id"] + ) def test_document_crud(self): # create database @@ -892,93 +836,94 @@ def test_document_crud(self): id = str(uuid.uuid4()) # create a document with auto ID generation - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk', - 'id': id} - + document_definition = {"name": "sample document", "spam": "eggs", "key": "value", "pk": "pk", "id": id} + headerEnvelope = CosmosResponseHeaderEnvelope() self.assertIsNone(headerEnvelope.headers) - created_document = created_collection.create_item(body=document_definition, enable_automatic_id_generation=False, response_hook=headerEnvelope.capture_response_headers) + created_document = created_collection.create_item( + body=document_definition, + enable_automatic_id_generation=False, + response_hook=headerEnvelope.capture_response_headers, + ) self.assertDictEqual(created_document, {}) self.assertIsNotNone(headerEnvelope.headers) - - expectedEtag = headerEnvelope.headers['etag'] - read_document = created_collection.read_item(item=id, partition_key=document_definition['pk']) + + expectedEtag = headerEnvelope.headers["etag"] + read_document = created_collection.read_item(item=id, partition_key=document_definition["pk"]) self.assertIsNotNone(read_document) - self.assertEqual(id, read_document['id']) - self.assertEqual(expectedEtag, read_document['_etag']) - self.assertEqual(read_document['name'], document_definition['name']) + self.assertEqual(id, read_document["id"]) + self.assertEqual(expectedEtag, read_document["_etag"]) + self.assertEqual(read_document["name"], document_definition["name"]) # duplicated documents are not allowed when 'id' is provided. duplicated_definition_with_id = document_definition.copy() - self.__AssertHTTPFailureWithStatus(StatusCodes.CONFLICT, - created_collection.create_item, - duplicated_definition_with_id) + self.__AssertHTTPFailureWithStatus( + StatusCodes.CONFLICT, created_collection.create_item, duplicated_definition_with_id + ) # read documents after creation documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 1, - 'create should increase the number of documents') + len(documents), before_create_documents_count + 1, "create should increase the number of documents" + ) # query documents - documents = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.name=@name', - 'parameters': [ - {'name': '@name', 'value': document_definition['name']} - ] - }, enable_cross_partition_query=True - )) + documents = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.name=@name", + "parameters": [{"name": "@name", "value": document_definition["name"]}], + }, + enable_cross_partition_query=True, + ) + ) self.assertTrue(documents) - documents = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.name=@name', - 'parameters': [ - {'name': '@name', 'value': document_definition['name']} - ], - }, enable_cross_partition_query=True, - enable_scan_in_query=True - )) + documents = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.name=@name", + "parameters": [{"name": "@name", "value": document_definition["name"]}], + }, + enable_cross_partition_query=True, + enable_scan_in_query=True, + ) + ) self.assertTrue(documents) # replace document. to_be_replaced_document = read_document.copy() - to_be_replaced_document['name'] = 'replaced document' - to_be_replaced_document['spam'] = 'not eggs' + to_be_replaced_document["name"] = "replaced document" + to_be_replaced_document["spam"] = "not eggs" old_etag = expectedEtag replaced_document = created_collection.replace_item( - item=to_be_replaced_document['id'], + item=to_be_replaced_document["id"], body=to_be_replaced_document, - response_hook=headerEnvelope.capture_response_headers + response_hook=headerEnvelope.capture_response_headers, ) self.assertDictEqual(replaced_document, {}) - read_document = created_collection.read_item(item=id, partition_key=document_definition['pk']) + read_document = created_collection.read_item(item=id, partition_key=document_definition["pk"]) self.assertIsNotNone(read_document) - self.assertEqual(id, read_document['id']) - self.assertNotEqual(expectedEtag, headerEnvelope.headers['etag']) - self.assertNotEqual(expectedEtag, read_document['_etag']) - self.assertEqual(headerEnvelope.headers['etag'], read_document['_etag']) - self.assertEqual(read_document['name'], to_be_replaced_document['name']) - self.assertEqual(read_document['spam'], to_be_replaced_document['spam']) + self.assertEqual(id, read_document["id"]) + self.assertNotEqual(expectedEtag, headerEnvelope.headers["etag"]) + self.assertNotEqual(expectedEtag, read_document["_etag"]) + self.assertEqual(headerEnvelope.headers["etag"], read_document["_etag"]) + self.assertEqual(read_document["name"], to_be_replaced_document["name"]) + self.assertEqual(read_document["spam"], to_be_replaced_document["spam"]) - self.assertEqual(read_document['name'], 'replaced document') - self.assertEqual(read_document['spam'], 'not eggs') - self.assertEqual(id, read_document['id']) + self.assertEqual(read_document["name"], "replaced document") + self.assertEqual(read_document["spam"], "not eggs") + self.assertEqual(id, read_document["id"]) # replace document based on condition to_be_replaced_document = read_document.copy() - to_be_replaced_document['name'] = 'replaced document based on condition' - to_be_replaced_document['spam'] = 'new spam field' + to_be_replaced_document["name"] = "replaced document based on condition" + to_be_replaced_document["spam"] = "new spam field" # should fail for stale etag self.__AssertHTTPFailureWithStatus( StatusCodes.PRECONDITION_FAILED, created_collection.replace_item, - to_be_replaced_document['id'], + to_be_replaced_document["id"], to_be_replaced_document, if_match=old_etag, ) @@ -986,67 +931,62 @@ def test_document_crud(self): # should fail if only etag specified with self.assertRaises(ValueError): created_collection.replace_item( - etag=to_be_replaced_document['_etag'], - item=to_be_replaced_document['id'], - body=to_be_replaced_document + etag=to_be_replaced_document["_etag"], item=to_be_replaced_document["id"], body=to_be_replaced_document ) # should fail if only match condition specified with self.assertRaises(ValueError): created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - item=to_be_replaced_document['id'], - body=to_be_replaced_document + item=to_be_replaced_document["id"], + body=to_be_replaced_document, ) with self.assertRaises(ValueError): created_collection.replace_item( match_condition=MatchConditions.IfModified, - item=to_be_replaced_document['id'], - body=to_be_replaced_document + item=to_be_replaced_document["id"], + body=to_be_replaced_document, ) # should fail if invalid match condition specified with self.assertRaises(TypeError): created_collection.replace_item( - match_condition=to_be_replaced_document['_etag'], - item=to_be_replaced_document['id'], - body=to_be_replaced_document + match_condition=to_be_replaced_document["_etag"], + item=to_be_replaced_document["id"], + body=to_be_replaced_document, ) # should pass for most recent etag replaced_document_conditional = created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - etag=to_be_replaced_document['_etag'], - item=to_be_replaced_document['id'], + etag=to_be_replaced_document["_etag"], + item=to_be_replaced_document["id"], body=to_be_replaced_document, - no_response=False - ) - self.assertEqual(replaced_document_conditional['name'], - 'replaced document based on condition', - 'document id property should change') - self.assertEqual(replaced_document_conditional['spam'], - 'new spam field', - 'property should have changed') - self.assertEqual(replaced_document_conditional['id'], - to_be_replaced_document['id'], - 'document id should stay the same') + no_response=False, + ) + self.assertEqual( + replaced_document_conditional["name"], + "replaced document based on condition", + "document id property should change", + ) + self.assertEqual(replaced_document_conditional["spam"], "new spam field", "property should have changed") + self.assertEqual( + replaced_document_conditional["id"], to_be_replaced_document["id"], "document id should stay the same" + ) # read document one_document_from_read = created_collection.read_item( - item=to_be_replaced_document['id'], - partition_key=to_be_replaced_document['pk'] + item=to_be_replaced_document["id"], partition_key=to_be_replaced_document["pk"] ) - self.assertEqual(to_be_replaced_document['id'], - one_document_from_read['id']) + self.assertEqual(to_be_replaced_document["id"], one_document_from_read["id"]) # delete document - created_collection.delete_item( - item=to_be_replaced_document, - partition_key=to_be_replaced_document['pk'] - ) + created_collection.delete_item(item=to_be_replaced_document, partition_key=to_be_replaced_document["pk"]) # read documents after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - created_collection.read_item, - to_be_replaced_document['id'], - to_be_replaced_document['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, + created_collection.read_item, + to_be_replaced_document["id"], + to_be_replaced_document["id"], + ) def test_document_upsert(self): # create database @@ -1060,156 +1000,116 @@ def test_document_upsert(self): before_create_documents_count = len(documents) # create document definition - id = 'doc' - document_definition = {'id': id, - 'name': 'sample document', - 'spam': 'eggs', - 'pk': 'pk', - 'key': 'value'} + id = "doc" + document_definition = {"id": id, "name": "sample document", "spam": "eggs", "pk": "pk", "key": "value"} # create document using Upsert API headerEnvelope = CosmosResponseHeaderEnvelope() - none_response = created_collection.upsert_item(body=document_definition, response_hook=headerEnvelope.capture_response_headers) + none_response = created_collection.upsert_item( + body=document_definition, response_hook=headerEnvelope.capture_response_headers + ) self.assertDictEqual(none_response, {}) - created_document = created_collection.read_item(item='doc', partition_key=document_definition['pk']) - self.assertEqual(headerEnvelope.headers['etag'], created_document['_etag']) + created_document = created_collection.read_item(item="doc", partition_key=document_definition["pk"]) + self.assertEqual(headerEnvelope.headers["etag"], created_document["_etag"]) # verify id property - self.assertEqual(created_document['id'], - document_definition['id']) + self.assertEqual(created_document["id"], document_definition["id"]) # test error for non-string id with self.assertRaises(TypeError): - document_definition['id'] = 7 + document_definition["id"] = 7 created_collection.upsert_item(body=document_definition) # read documents after creation and verify updated count documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 1, - 'create should increase the number of documents') + len(documents), before_create_documents_count + 1, "create should increase the number of documents" + ) # update document - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" # should replace document since it already exists - none_response = created_collection.upsert_item(body=created_document, response_hook=headerEnvelope.capture_response_headers) + none_response = created_collection.upsert_item( + body=created_document, response_hook=headerEnvelope.capture_response_headers + ) self.assertDictEqual(none_response, {}) - upserted_document = created_collection.read_item(item=id, partition_key=document_definition['pk']) - self.assertEqual(headerEnvelope.headers['etag'], upserted_document['_etag']) + upserted_document = created_collection.read_item(item=id, partition_key=document_definition["pk"]) + self.assertEqual(headerEnvelope.headers["etag"], upserted_document["_etag"]) # verify the changed properties - self.assertEqual(upserted_document['name'], - created_document['name'], - 'document name property should change') - self.assertEqual(upserted_document['spam'], - created_document['spam'], - 'property should have changed') + self.assertEqual(upserted_document["name"], created_document["name"], "document name property should change") + self.assertEqual(upserted_document["spam"], created_document["spam"], "property should have changed") # verify id property - self.assertEqual(upserted_document['id'], - created_document['id'], - 'document id should stay the same') + self.assertEqual(upserted_document["id"], created_document["id"], "document id should stay the same") # read documents after upsert and verify count doesn't increases again documents = list(created_collection.read_all_items()) - self.assertEqual( - len(documents), - before_create_documents_count + 1, - 'number of documents should remain same') + self.assertEqual(len(documents), before_create_documents_count + 1, "number of documents should remain same") - created_document['id'] = 'new id' + created_document["id"] = "new id" # Upsert should create new document since the id is different - no_response = created_collection.upsert_item(body=created_document, response_hook=headerEnvelope.capture_response_headers) + no_response = created_collection.upsert_item( + body=created_document, response_hook=headerEnvelope.capture_response_headers + ) self.assertDictEqual(none_response, {}) - new_document = created_collection.read_item(item='new id', partition_key=document_definition['pk']) - self.assertEqual(headerEnvelope.headers['etag'], new_document['_etag']) + new_document = created_collection.read_item(item="new id", partition_key=document_definition["pk"]) + self.assertEqual(headerEnvelope.headers["etag"], new_document["_etag"]) # Test modified access conditions - created_document['spam'] = 'more eggs' + created_document["spam"] = "more eggs" created_collection.upsert_item(body=created_document) with self.assertRaises(exceptions.CosmosHttpResponseError): created_collection.upsert_item( - body=created_document, - match_condition=MatchConditions.IfNotModified, - etag=new_document['_etag']) + body=created_document, match_condition=MatchConditions.IfNotModified, etag=new_document["_etag"] + ) # verify id property - self.assertEqual(created_document['id'], - new_document['id'], - 'document id should be same') + self.assertEqual(created_document["id"], new_document["id"], "document id should be same") # read documents after upsert and verify count increases documents = list(created_collection.read_all_items()) self.assertEqual( - len(documents), - before_create_documents_count + 2, - 'upsert should increase the number of documents') + len(documents), before_create_documents_count + 2, "upsert should increase the number of documents" + ) # delete documents - created_collection.delete_item(item=upserted_document, partition_key=upserted_document['pk']) - created_collection.delete_item(item=new_document, partition_key=new_document['pk']) + created_collection.delete_item(item=upserted_document, partition_key=upserted_document["pk"]) + created_collection.delete_item(item=new_document, partition_key=new_document["pk"]) # read documents after delete and verify count is same as original documents = list(created_collection.read_all_items()) - self.assertEqual( - len(documents), - before_create_documents_count, - 'number of documents should remain same') + self.assertEqual(len(documents), before_create_documents_count, "number of documents should remain same") def test_geospatial_index(self): db = self.databaseForTest # partial policy specified collection = db.create_container( - id='collection with spatial index ' + str(uuid.uuid4()), + id="collection with spatial index " + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ - { - 'path': '/"Location"/?', - 'indexes': [ - { - 'kind': 'Spatial', - 'dataType': 'Point' - } - ] - }, - { - 'path': '/' - } + "includedPaths": [ + {"path": '/"Location"/?', "indexes": [{"kind": "Spatial", "dataType": "Point"}]}, + {"path": "/"}, ] }, - partition_key=PartitionKey(path='/id', kind='Hash') - ) - collection.create_item( - body={ - 'id': 'loc1', - 'Location': { - 'type': 'Point', - 'coordinates': [20.0, 20.0] - } - } + partition_key=PartitionKey(path="/id", kind="Hash"), ) - collection.create_item( - body={ - 'id': 'loc2', - 'Location': { - 'type': 'Point', - 'coordinates': [100.0, 100.0] - } - } + collection.create_item(body={"id": "loc1", "Location": {"type": "Point", "coordinates": [20.0, 20.0]}}) + collection.create_item(body={"id": "loc2", "Location": {"type": "Point", "coordinates": [100.0, 100.0]}}) + results = list( + collection.query_items( + query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)", + enable_cross_partition_query=True, + ) ) - results = list(collection.query_items( - query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)", - enable_cross_partition_query=True - )) self.assertEqual(1, len(results)) - self.assertEqual('loc1', results[0]['id']) + self.assertEqual("loc1", results[0]["id"]) db.delete_container(container=collection) @@ -1222,32 +1122,25 @@ def test_user_crud(self): users = list(db.list_users()) before_create_count = len(users) # create user - user_id = 'new user' + str(uuid.uuid4()) - user = db.create_user(body={'id': user_id}) - self.assertEqual(user.id, user_id, 'user id error') + user_id = "new user" + str(uuid.uuid4()) + user = db.create_user(body={"id": user_id}) + self.assertEqual(user.id, user_id, "user id error") # list users after creation users = list(db.list_users()) self.assertEqual(len(users), before_create_count + 1) # query users - results = list(db.query_users( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': user_id} - ] - )) + results = list( + db.query_users(query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": user_id}]) + ) self.assertTrue(results) # replace user - replaced_user_id = 'replaced user' + str(uuid.uuid4()) + replaced_user_id = "replaced user" + str(uuid.uuid4()) user_properties = user.read() - user_properties['id'] = replaced_user_id + user_properties["id"] = replaced_user_id replaced_user = db.replace_user(user_id, user_properties) - self.assertEqual(replaced_user.id, - replaced_user_id, - 'user id should change') - self.assertEqual(user_properties['id'], - replaced_user.id, - 'user id should stay the same') + self.assertEqual(replaced_user.id, replaced_user_id, "user id should change") + self.assertEqual(user_properties["id"], replaced_user.id, "user id should stay the same") # read user user = db.get_user_client(replaced_user.id) self.assertEqual(replaced_user.id, user.id) @@ -1255,8 +1148,7 @@ def test_user_crud(self): db.delete_user(user.id) # read user after deletion deleted_user = db.get_user_client(user.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - deleted_user.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, deleted_user.read) def test_user_upsert(self): # create database @@ -1267,11 +1159,11 @@ def test_user_upsert(self): before_create_count = len(users) # create user using Upsert API - user_id = 'user' + str(uuid.uuid4()) - user = db.upsert_user(body={'id': user_id}) + user_id = "user" + str(uuid.uuid4()) + user = db.upsert_user(body={"id": user_id}) # verify id property - self.assertEqual(user.id, user_id, 'user id error') + self.assertEqual(user.id, user_id, "user id error") # read users after creation and verify updated count users = list(db.list_users()) @@ -1282,23 +1174,21 @@ def test_user_upsert(self): upserted_user = db.upsert_user(user_properties) # verify id property - self.assertEqual(upserted_user.id, - user.id, - 'user id should remain same') + self.assertEqual(upserted_user.id, user.id, "user id should remain same") # read users after upsert and verify count doesn't increases again users = list(db.list_users()) self.assertEqual(len(users), before_create_count + 1) user_properties = user.read() - user_properties['id'] = 'new user' + str(uuid.uuid4()) - user.id = user_properties['id'] + user_properties["id"] = "new user" + str(uuid.uuid4()) + user.id = user_properties["id"] # Upsert should create new user since id is different new_user = db.upsert_user(user_properties) # verify id property - self.assertEqual(new_user.id, user.id, 'user id error') + self.assertEqual(new_user.id, user.id, "user id error") # read users after upsert and verify count increases users = list(db.list_users()) @@ -1317,119 +1207,104 @@ def test_permission_crud(self): # create database db = self.databaseForTest # create user - user = db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # list permissions permissions = list(user.list_permissions()) before_create_count = len(permissions) permission = { - 'id': 'new permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "new permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission permission = user.create_permission(permission) - self.assertEqual(permission.id, - 'new permission', - 'permission id error') + self.assertEqual(permission.id, "new permission", "permission id error") # list permissions after creation permissions = list(user.list_permissions()) self.assertEqual(len(permissions), before_create_count + 1) # query permissions - results = list(user.query_permissions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': permission.id} - ] - )) + results = list( + user.query_permissions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": permission.id}] + ) + ) self.assertTrue(results) # replace permission change_permission = permission.properties.copy() - permission.properties['id'] = 'replaced permission' - permission.id = permission.properties['id'] - replaced_permission = user.replace_permission(change_permission['id'], permission.properties) - self.assertEqual(replaced_permission.id, - 'replaced permission', - 'permission id should change') - self.assertEqual(permission.id, - replaced_permission.id, - 'permission id should stay the same') + permission.properties["id"] = "replaced permission" + permission.id = permission.properties["id"] + replaced_permission = user.replace_permission(change_permission["id"], permission.properties) + self.assertEqual(replaced_permission.id, "replaced permission", "permission id should change") + self.assertEqual(permission.id, replaced_permission.id, "permission id should stay the same") # read permission permission = user.get_permission(replaced_permission.id) self.assertEqual(replaced_permission.id, permission.id) # delete permission user.delete_permission(replaced_permission.id) # read permission after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - user.get_permission, - permission.id) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, user.get_permission, permission.id) def test_permission_upsert(self): # create database db = self.databaseForTest # create user - user = db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # read permissions and check count permissions = list(user.list_permissions()) before_create_count = len(permissions) permission_definition = { - 'id': 'permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission using Upsert API created_permission = user.upsert_permission(permission_definition) # verify id property - self.assertEqual(created_permission.id, - permission_definition['id'], - 'permission id error') + self.assertEqual(created_permission.id, permission_definition["id"], "permission id error") # read permissions after creation and verify updated count permissions = list(user.list_permissions()) self.assertEqual(len(permissions), before_create_count + 1) # update permission mode - permission_definition['permissionMode'] = documents.PermissionMode.All + permission_definition["permissionMode"] = documents.PermissionMode.All # should repace the permission since it already exists upserted_permission = user.upsert_permission(permission_definition) # verify id property - self.assertEqual(upserted_permission.id, - created_permission.id, - 'permission id should remain same') + self.assertEqual(upserted_permission.id, created_permission.id, "permission id should remain same") # verify changed property - self.assertEqual(upserted_permission.permission_mode, - permission_definition['permissionMode'], - 'permissionMode should change') + self.assertEqual( + upserted_permission.permission_mode, permission_definition["permissionMode"], "permissionMode should change" + ) # read permissions and verify count doesn't increases again permissions = list(user.list_permissions()) self.assertEqual(len(permissions), before_create_count + 1) # update permission id - created_permission.properties['id'] = 'new permission' - created_permission.id = created_permission.properties['id'] + created_permission.properties["id"] = "new permission" + created_permission.id = created_permission.properties["id"] # resource needs to be changed along with the id in order to create a new permission - created_permission.properties['resource'] = 'dbs/N9EdAA==/colls/N9EdAIugXgA=' - created_permission.resource_link = created_permission.properties['resource'] + created_permission.properties["resource"] = "dbs/N9EdAA==/colls/N9EdAIugXgA=" + created_permission.resource_link = created_permission.properties["resource"] # should create new permission since id has changed new_permission = user.upsert_permission(created_permission.properties) # verify id and resource property - self.assertEqual(new_permission.id, - created_permission.id, - 'permission id should be same') + self.assertEqual(new_permission.id, created_permission.id, "permission id should be same") - self.assertEqual(new_permission.resource_link, - created_permission.resource_link, - 'permission resource should be same') + self.assertEqual( + new_permission.resource_link, created_permission.resource_link, "permission resource should be same" + ) # read permissions and verify count increases permissions = list(user.list_permissions()) @@ -1459,112 +1334,104 @@ def __SetupEntities(client): db = self.databaseForTest # create collection collection = db.create_container( - id='test_authorization' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_authorization" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id", kind="Hash") ) # create document1 - id = 'doc1' + id = "doc1" document = collection.create_item( - body={'id': id, - 'spam': 'eggs', - 'key': 'value'}, + body={"id": id, "spam": "eggs", "key": "value"}, ) self.assertDictEqual(document, {}) - document = collection.read_item(item = id, partition_key = id) + document = collection.read_item(item=id, partition_key=id) # create user - user = db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = db.create_user(body={"id": "user" + str(uuid.uuid4())}) # create permission for collection permission = { - 'id': 'permission On Coll', - 'permissionMode': documents.PermissionMode.Read, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "id": "permission On Coll", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/" + db.id + "/colls/" + collection.id, } permission_on_coll = user.create_permission(body=permission) - self.assertIsNotNone(permission_on_coll.properties['_token'], - 'permission token is invalid') + self.assertIsNotNone(permission_on_coll.properties["_token"], "permission token is invalid") # create permission for document permission = { - 'id': 'permission On Doc', - 'permissionMode': documents.PermissionMode.All, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + id + "id": "permission On Doc", + "permissionMode": documents.PermissionMode.All, + "resource": "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + id, } permission_on_doc = user.create_permission(body=permission) - self.assertIsNotNone(permission_on_doc.properties['_token'], - 'permission token is invalid') + self.assertIsNotNone(permission_on_doc.properties["_token"], "permission token is invalid") entities = { - 'db': db, - 'coll': collection, - 'doc': document, - 'user': user, - 'permissionOnColl': permission_on_coll, - 'permissionOnDoc': permission_on_doc, + "db": db, + "coll": collection, + "doc": document, + "user": user, + "permissionOnColl": permission_on_coll, + "permissionOnDoc": permission_on_doc, } return entities # Client without any authorization will fail. try: - cosmos_client.CosmosClient(self.host, {}, "Session", - connection_policy=self.connectionPolicy) + cosmos_client.CosmosClient(self.host, {}, "Session", connection_policy=self.connectionPolicy) raise Exception("Test did not fail as expected.") except exceptions.CosmosHttpResponseError as error: self.assertEqual(error.status_code, StatusCodes.UNAUTHORIZED) # Client with master key. - client = cosmos_client.CosmosClient(self.host, - self.masterKey, - "Session", - connection_policy=self.connectionPolicy) + client = cosmos_client.CosmosClient( + self.host, self.masterKey, "Session", connection_policy=self.connectionPolicy + ) # setup entities entities = __SetupEntities(client) - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id: - entities['permissionOnColl'].properties['_token']} + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id: entities["permissionOnColl"].properties["_token"] + } col_client = cosmos_client.CosmosClient( - self.host, resource_tokens, "Session", connection_policy=self.connectionPolicy) - db = entities['db'] + self.host, resource_tokens, "Session", connection_policy=self.connectionPolicy + ) + db = entities["db"] old_client_connection = db.client_connection db.client_connection = col_client.client_connection # 1. Success-- Use Col Permission to Read - success_coll = db.get_container_client(container=entities['coll']) + success_coll = db.get_container_client(container=entities["coll"]) # 2. Failure-- Use Col Permission to delete - self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, - db.delete_container, - success_coll) + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, db.delete_container, success_coll) # 3. Success-- Use Col Permission to Read All Docs success_documents = list(success_coll.read_all_items()) - self.assertTrue(success_documents != None, - 'error reading documents') - self.assertEqual(len(success_documents), - 1, - 'Expected 1 Document to be successfully read') + self.assertTrue(success_documents != None, "error reading documents") + self.assertEqual(len(success_documents), 1, "Expected 1 Document to be successfully read") # 4. Success-- Use Col Permission to Read Doc - docId = entities['doc']['id'] - success_doc = success_coll.read_item( - item=docId, - partition_key=docId - ) - self.assertTrue(success_doc != None, 'error reading document') - self.assertEqual( - success_doc['id'], - entities['doc']['id'], - 'Expected to read children using parent permissions') + docId = entities["doc"]["id"] + success_doc = success_coll.read_item(item=docId, partition_key=docId) + self.assertTrue(success_doc != None, "error reading document") + self.assertEqual(success_doc["id"], entities["doc"]["id"], "Expected to read children using parent permissions") # 5. Failure-- Use Col Permission to Delete Doc - self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, - success_coll.delete_item, - docId, docId) - - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id + "/docs/" + docId: - entities['permissionOnDoc'].properties['_token']} + self.__AssertHTTPFailureWithStatus(StatusCodes.FORBIDDEN, success_coll.delete_item, docId, docId) + + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id + + "/docs/" + + docId: entities["permissionOnDoc"].properties["_token"] + } doc_client = cosmos_client.CosmosClient( - self.host, resource_tokens, "Session", connection_policy=self.connectionPolicy) + self.host, resource_tokens, "Session", connection_policy=self.connectionPolicy + ) # 6. Success-- Use Doc permission to read doc read_doc = doc_client.get_database_client(db.id).get_container_client(success_coll.id).read_item(docId, docId) @@ -1575,7 +1442,7 @@ def __SetupEntities(client): self.assertEqual(read_doc["id"], docId) db.client_connection = old_client_connection - db.delete_container(entities['coll']) + db.delete_container(entities["coll"]) def test_trigger_crud(self): # create database @@ -1586,12 +1453,12 @@ def test_trigger_crud(self): triggers = list(collection.scripts.list_triggers()) # create a trigger before_create_triggers_count = len(triggers) - trigger_id = 'sample trigger-' + str(uuid.uuid4()) + trigger_id = "sample trigger-" + str(uuid.uuid4()) trigger_definition = { - 'id': trigger_id, - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": trigger_id, + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, } trigger = collection.scripts.create_trigger(body=trigger_definition) for property in trigger_definition: @@ -1599,48 +1466,48 @@ def test_trigger_crud(self): self.assertEqual( trigger[property], trigger_definition[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(trigger['body'], - 'function() {var x = 10;}') + self.assertEqual(trigger["body"], "function() {var x = 10;}") # read triggers after creation triggers = list(collection.scripts.list_triggers()) - self.assertEqual(len(triggers), - before_create_triggers_count + 1, - 'create should increase the number of triggers') + self.assertEqual( + len(triggers), before_create_triggers_count + 1, "create should increase the number of triggers" + ) # query triggers - triggers = list(collection.scripts.query_triggers( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': trigger_definition['id']} - ] - )) + triggers = list( + collection.scripts.query_triggers( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": trigger_definition["id"]}], + ) + ) self.assertTrue(triggers) # replace trigger change_trigger = trigger.copy() - trigger['body'] = 'function() {var x = 20;}' - replaced_trigger = collection.scripts.replace_trigger(change_trigger['id'], trigger) + trigger["body"] = "function() {var x = 20;}" + replaced_trigger = collection.scripts.replace_trigger(change_trigger["id"], trigger) for property in trigger_definition: if property != "serverScript": self.assertEqual( replaced_trigger[property], trigger[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(replaced_trigger['body'], - 'function() {var x = 20;}') + self.assertEqual(replaced_trigger["body"], "function() {var x = 20;}") # read trigger - trigger = collection.scripts.get_trigger(replaced_trigger['id']) - self.assertEqual(replaced_trigger['id'], trigger['id']) + trigger = collection.scripts.get_trigger(replaced_trigger["id"]) + self.assertEqual(replaced_trigger["id"], trigger["id"]) # delete trigger - collection.scripts.delete_trigger(replaced_trigger['id']) + collection.scripts.delete_trigger(replaced_trigger["id"]) # read triggers after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - collection.scripts.delete_trigger, - replaced_trigger['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, collection.scripts.delete_trigger, replaced_trigger["id"] + ) def test_udf_crud(self): # create database @@ -1651,48 +1518,40 @@ def test_udf_crud(self): udfs = list(collection.scripts.list_user_defined_functions()) # create a udf before_create_udfs_count = len(udfs) - udf_definition = { - 'id': 'sample udf', - 'body': 'function() {var x = 10;}' - } + udf_definition = {"id": "sample udf", "body": "function() {var x = 10;}"} udf = collection.scripts.create_user_defined_function(body=udf_definition) for property in udf_definition: self.assertEqual( - udf[property], - udf_definition[property], - 'property {property} should match'.format(property=property)) + udf[property], udf_definition[property], "property {property} should match".format(property=property) + ) # read udfs after creation udfs = list(collection.scripts.list_user_defined_functions()) - self.assertEqual(len(udfs), - before_create_udfs_count + 1, - 'create should increase the number of udfs') + self.assertEqual(len(udfs), before_create_udfs_count + 1, "create should increase the number of udfs") # query udfs - results = list(collection.scripts.query_user_defined_functions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': udf_definition['id']} - ] - )) + results = list( + collection.scripts.query_user_defined_functions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": udf_definition["id"]}] + ) + ) self.assertTrue(results) # replace udf change_udf = udf.copy() - udf['body'] = 'function() {var x = 20;}' - replaced_udf = collection.scripts.replace_user_defined_function(udf=udf['id'], body=udf) + udf["body"] = "function() {var x = 20;}" + replaced_udf = collection.scripts.replace_user_defined_function(udf=udf["id"], body=udf) for property in udf_definition: self.assertEqual( - replaced_udf[property], - udf[property], - 'property {property} should match'.format(property=property)) + replaced_udf[property], udf[property], "property {property} should match".format(property=property) + ) # read udf - udf = collection.scripts.get_user_defined_function(replaced_udf['id']) - self.assertEqual(replaced_udf['id'], udf['id']) + udf = collection.scripts.get_user_defined_function(replaced_udf["id"]) + self.assertEqual(replaced_udf["id"], udf["id"]) # delete udf - collection.scripts.delete_user_defined_function(replaced_udf['id']) + collection.scripts.delete_user_defined_function(replaced_udf["id"]) # read udfs after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - collection.scripts.get_user_defined_function, - replaced_udf['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, collection.scripts.get_user_defined_function, replaced_udf["id"] + ) def test_sproc_crud(self): # create database @@ -1703,108 +1562,101 @@ def test_sproc_crud(self): sprocs = list(collection.scripts.list_stored_procedures()) # create a sproc before_create_sprocs_count = len(sprocs) - sproc_id = 'sample sproc-' + str(uuid.uuid4()) - sproc_definition = { - 'id': sproc_id, - 'serverScript': 'function() {var x = 10;}' - } + sproc_id = "sample sproc-" + str(uuid.uuid4()) + sproc_definition = {"id": sproc_id, "serverScript": "function() {var x = 10;}"} sproc = collection.scripts.create_stored_procedure(sproc_definition) for property in sproc_definition: if property != "serverScript": self.assertEqual( sproc[property], sproc_definition[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(sproc['body'], 'function() {var x = 10;}') + self.assertEqual(sproc["body"], "function() {var x = 10;}") # read sprocs after creation sprocs = list(collection.scripts.list_stored_procedures()) - self.assertEqual(len(sprocs), - before_create_sprocs_count + 1, - 'create should increase the number of sprocs') + self.assertEqual(len(sprocs), before_create_sprocs_count + 1, "create should increase the number of sprocs") # query sprocs - sprocs = list(collection.scripts.query_stored_procedures( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': sproc_definition['id']} - ] - )) + sprocs = list( + collection.scripts.query_stored_procedures( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": sproc_definition["id"]}], + ) + ) self.assertIsNotNone(sprocs) # replace sproc change_sproc = sproc.copy() - sproc['body'] = 'function() {var x = 20;}' - replaced_sproc = collection.scripts.replace_stored_procedure(sproc=change_sproc['id'], body=sproc) + sproc["body"] = "function() {var x = 20;}" + replaced_sproc = collection.scripts.replace_stored_procedure(sproc=change_sproc["id"], body=sproc) for property in sproc_definition: - if property != 'serverScript': + if property != "serverScript": self.assertEqual( replaced_sproc[property], sproc[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) else: - self.assertEqual(replaced_sproc['body'], - "function() {var x = 20;}") + self.assertEqual(replaced_sproc["body"], "function() {var x = 20;}") # read sproc - sproc = collection.scripts.get_stored_procedure(replaced_sproc['id']) - self.assertEqual(replaced_sproc['id'], sproc['id']) + sproc = collection.scripts.get_stored_procedure(replaced_sproc["id"]) + self.assertEqual(replaced_sproc["id"], sproc["id"]) # delete sproc - collection.scripts.delete_stored_procedure(replaced_sproc['id']) + collection.scripts.delete_stored_procedure(replaced_sproc["id"]) # read sprocs after deletion - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - collection.scripts.get_stored_procedure, - replaced_sproc['id']) + self.__AssertHTTPFailureWithStatus( + StatusCodes.NOT_FOUND, collection.scripts.get_stored_procedure, replaced_sproc["id"] + ) def test_script_logging_execute_stored_procedure(self): created_collection = self.databaseForTest.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - stored_proc_id = 'storedProcedure-1-' + str(uuid.uuid4()) + stored_proc_id = "storedProcedure-1-" + str(uuid.uuid4()) sproc = { - 'id': stored_proc_id, - 'body': ( - 'function () {' + - ' var mytext = \'x\';' + - ' var myval = 1;' + - ' try {' + - ' console.log(\'The value of %s is %s.\', mytext, myval);' + - ' getContext().getResponse().setBody(\'Success!\');' + - ' }' + - ' catch (err) {' + - ' getContext().getResponse().setBody(\'inline err: [\' + err.number + \'] \' + err);' + - ' }' - '}') + "id": stored_proc_id, + "body": ( + "function () {" + + " var mytext = 'x';" + + " var myval = 1;" + + " try {" + + " console.log('The value of %s is %s.', mytext, myval);" + + " getContext().getResponse().setBody('Success!');" + + " }" + + " catch (err) {" + + " getContext().getResponse().setBody('inline err: [' + err.number + '] ' + err);" + + " }" + "}" + ), } created_sproc = created_collection.scripts.create_stored_procedure(sproc) - result = created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - partition_key=1 - ) + result = created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=1) - self.assertEqual(result, 'Success!') + self.assertEqual(result, "Success!") self.assertFalse( - HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers) + HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers + ) result = created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=True, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=True, partition_key=1 ) - self.assertEqual(result, 'Success!') - self.assertEqual(urllib.quote('The value of x is 1.'), - created_collection.scripts.client_connection.last_response_headers.get( - HttpHeaders.ScriptLogResults)) + self.assertEqual(result, "Success!") + self.assertEqual( + urllib.quote("The value of x is 1."), + created_collection.scripts.client_connection.last_response_headers.get(HttpHeaders.ScriptLogResults), + ) result = created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=False, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=False, partition_key=1 ) - self.assertEqual(result, 'Success!') + self.assertEqual(result, "Success!") self.assertFalse( - HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers) + HttpHeaders.ScriptLogResults in created_collection.scripts.client_connection.last_response_headers + ) def test_collection_indexing_policy(self): # create database @@ -1813,43 +1665,41 @@ def test_collection_indexing_policy(self): collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = collection.read() - self.assertEqual(collection_properties['indexingPolicy']['indexingMode'], - documents.IndexingMode.Consistent, - 'default indexing mode should be consistent') + self.assertEqual( + collection_properties["indexingPolicy"]["indexingMode"], + documents.IndexingMode.Consistent, + "default indexing mode should be consistent", + ) collection_with_indexing_policy = db.create_container( - id='CollectionWithIndexingPolicy ' + str(uuid.uuid4()), + id="CollectionWithIndexingPolicy " + str(uuid.uuid4()), indexing_policy={ - 'automatic': True, - 'indexingMode': documents.IndexingMode.Consistent, - 'includedPaths': [ + "automatic": True, + "indexingMode": documents.IndexingMode.Consistent, + "includedPaths": [ { - 'path': '/', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.Number, - 'precision': 2 - } - ] + "path": "/", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.Number, "precision": 2} + ], } ], - 'excludedPaths': [ - { - 'path': '/"systemMetadata"/*' - } - ] + "excludedPaths": [{"path": '/"systemMetadata"/*'}], }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_with_indexing_policy_properties = collection_with_indexing_policy.read() - self.assertEqual(1, - len(collection_with_indexing_policy_properties['indexingPolicy']['includedPaths']), - 'Unexpected includedPaths length') - self.assertEqual(2, - len(collection_with_indexing_policy_properties['indexingPolicy']['excludedPaths']), - 'Unexpected excluded path count') + self.assertEqual( + 1, + len(collection_with_indexing_policy_properties["indexingPolicy"]["includedPaths"]), + "Unexpected includedPaths length", + ) + self.assertEqual( + 2, + len(collection_with_indexing_policy_properties["indexingPolicy"]["excludedPaths"]), + "Unexpected excluded path count", + ) db.delete_container(collection_with_indexing_policy.id) def test_create_default_indexing_policy(self): @@ -1860,70 +1710,56 @@ def test_create_default_indexing_policy(self): collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) # partial policy specified collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy01' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.Consistent, 'automatic': True - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy01" + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.Consistent, "automatic": True}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) # default policy collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy03' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy03" + str(uuid.uuid4()), indexing_policy={}, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) # missing indexes collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy04' + str(uuid.uuid4()), - indexing_policy={ - 'includedPaths': [ - { - 'path': '/*' - } - ] - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy04" + str(uuid.uuid4()), + indexing_policy={"includedPaths": [{"path": "/*"}]}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) # missing precision collection = db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy05' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy05" + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ + "includedPaths": [ { - 'path': '/*', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.String - }, - { - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.Number - } - ] + "path": "/*", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.String}, + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.Number}, + ], } ] }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = collection.read() - self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) db.delete_container(container=collection) def test_create_indexing_policy_with_composite_and_spatial_indexes(self): @@ -1932,62 +1768,28 @@ def test_create_indexing_policy_with_composite_and_spatial_indexes(self): indexing_policy = { "spatialIndexes": [ - { - "path": "/path0/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - }, - { - "path": "/path1/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - } + {"path": "/path0/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, + {"path": "/path1/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, ], "compositeIndexes": [ [ - { - "path": "/path1", - "order": "ascending" - }, - { - "path": "/path2", - "order": "descending" - }, - { - "path": "/path3", - "order": "ascending" - } + {"path": "/path1", "order": "ascending"}, + {"path": "/path2", "order": "descending"}, + {"path": "/path3", "order": "ascending"}, ], [ - { - "path": "/path4", - "order": "ascending" - }, - { - "path": "/path5", - "order": "descending" - }, - { - "path": "/path6", - "order": "ascending" - } - ] - ] + {"path": "/path4", "order": "ascending"}, + {"path": "/path5", "order": "descending"}, + {"path": "/path6", "order": "ascending"}, + ], + ], } # TODO: Custom Logger passed into create container # custom_logger = logging.getLogger("CustomLogger") was used here and passed in the create_container method created_container = db.create_container( - id='composite_index_spatial_index' + str(uuid.uuid4()), + id="composite_index_spatial_index" + str(uuid.uuid4()), indexing_policy=indexing_policy, - partition_key=PartitionKey(path='/id', kind='Hash'), + partition_key=PartitionKey(path="/id", kind="Hash"), headers={"Foo": "bar"}, user_agent="blah", user_agent_overwrite=True, @@ -1995,15 +1797,15 @@ def test_create_indexing_policy_with_composite_and_spatial_indexes(self): ) # TODO: check on why Custom_logger was passed into the read here before created_properties = created_container.read() - read_indexing_policy = created_properties['indexingPolicy'] + read_indexing_policy = created_properties["indexingPolicy"] - if 'localhost' in self.host or '127.0.0.1' in self.host: # TODO: Differing result between live and emulator - self.assertListEqual(indexing_policy['spatialIndexes'], read_indexing_policy['spatialIndexes']) + if "localhost" in self.host or "127.0.0.1" in self.host: # TODO: Differing result between live and emulator + self.assertListEqual(indexing_policy["spatialIndexes"], read_indexing_policy["spatialIndexes"]) else: # All types are returned for spatial Indexes - self.assertListEqual(indexing_policy['spatialIndexes'], read_indexing_policy['spatialIndexes']) + self.assertListEqual(indexing_policy["spatialIndexes"], read_indexing_policy["spatialIndexes"]) - self.assertListEqual(indexing_policy['compositeIndexes'], read_indexing_policy['compositeIndexes']) + self.assertListEqual(indexing_policy["compositeIndexes"], read_indexing_policy["compositeIndexes"]) db.delete_container(container=created_container) def _check_default_indexing_policy_paths(self, indexing_policy): @@ -2014,82 +1816,71 @@ def __get_first(array): return None # '/_etag' is present in excluded paths by default - self.assertEqual(1, len(indexing_policy['excludedPaths'])) + self.assertEqual(1, len(indexing_policy["excludedPaths"])) # included paths should be 1: '/'. - self.assertEqual(1, len(indexing_policy['includedPaths'])) + self.assertEqual(1, len(indexing_policy["includedPaths"])) - root_included_path = __get_first([included_path for included_path in indexing_policy['includedPaths'] - if included_path['path'] == '/*']) - self.assertFalse(root_included_path.get('indexes')) + root_included_path = __get_first( + [included_path for included_path in indexing_policy["includedPaths"] if included_path["path"] == "/*"] + ) + self.assertFalse(root_included_path.get("indexes")) def test_client_request_timeout(self): # Test is flaky on Emulator - if not ('localhost' in self.host or '127.0.0.1' in self.host): + if not ("localhost" in self.host or "127.0.0.1" in self.host): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 # client does a getDatabaseAccount on initialization, which will not time out because # there is a forced timeout for those calls - client = cosmos_client.CosmosClient(self.host, self.masterKey, "Session", - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + self.host, self.masterKey, "Session", connection_policy=connection_policy + ) with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - container.create_item(body={'id': str(uuid.uuid4()), 'name': 'sample'}) + container.create_item(body={"id": str(uuid.uuid4()), "name": "sample"}) def test_query_iterable_functionality(self): - collection = self.databaseForTest.create_container("query-iterable-container", - partition_key=PartitionKey("/pk")) - - doc1 = collection.create_item(body={'id': 'doc1', 'prop1': 'value1', 'pk': 'pk'}, no_response=False) - doc2 = collection.create_item(body={'id': 'doc2', 'prop1': 'value2', 'pk': 'pk'}, no_response=False) - doc3 = collection.create_item(body={'id': 'doc3', 'prop1': 'value3', 'pk': 'pk'}, no_response=False) - resources = { - 'coll': collection, - 'doc1': doc1, - 'doc2': doc2, - 'doc3': doc3 - } + collection = self.databaseForTest.create_container( + "query-iterable-container", partition_key=PartitionKey("/pk") + ) - results = resources['coll'].read_all_items(max_item_count=2) + doc1 = collection.create_item(body={"id": "doc1", "prop1": "value1", "pk": "pk"}, no_response=False) + doc2 = collection.create_item(body={"id": "doc2", "prop1": "value2", "pk": "pk"}, no_response=False) + doc3 = collection.create_item(body={"id": "doc3", "prop1": "value3", "pk": "pk"}, no_response=False) + resources = {"coll": collection, "doc1": doc1, "doc2": doc2, "doc3": doc3} + + results = resources["coll"].read_all_items(max_item_count=2) docs = list(iter(results)) - self.assertEqual(3, - len(docs), - 'QueryIterable should return all documents' + - ' using continuation') - self.assertEqual(resources['doc1']['id'], docs[0]['id']) - self.assertEqual(resources['doc2']['id'], docs[1]['id']) - self.assertEqual(resources['doc3']['id'], docs[2]['id']) + self.assertEqual(3, len(docs), "QueryIterable should return all documents" + " using continuation") + self.assertEqual(resources["doc1"]["id"], docs[0]["id"]) + self.assertEqual(resources["doc2"]["id"], docs[1]["id"]) + self.assertEqual(resources["doc3"]["id"], docs[2]["id"]) # Validate QueryIterable iterator with 'for'. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) counter = 0 # test QueryIterable with 'for'. for doc in iter(results): counter += 1 if counter == 1: - self.assertEqual(resources['doc1']['id'], - doc['id'], - 'first document should be doc1') + self.assertEqual(resources["doc1"]["id"], doc["id"], "first document should be doc1") elif counter == 2: - self.assertEqual(resources['doc2']['id'], - doc['id'], - 'second document should be doc2') + self.assertEqual(resources["doc2"]["id"], doc["id"], "second document should be doc2") elif counter == 3: - self.assertEqual(resources['doc3']['id'], - doc['id'], - 'third document should be doc3') + self.assertEqual(resources["doc3"]["id"], doc["id"], "third document should be doc3") self.assertEqual(counter, 3) # Get query results page by page. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) page_iter = results.by_page() first_block = list(next(page_iter)) - self.assertEqual(2, len(first_block), 'First block should have 2 entries.') - self.assertEqual(resources['doc1']['id'], first_block[0]['id']) - self.assertEqual(resources['doc2']['id'], first_block[1]['id']) - self.assertEqual(1, len(list(next(page_iter))), 'Second block should have 1 entry.') + self.assertEqual(2, len(first_block), "First block should have 2 entries.") + self.assertEqual(resources["doc1"]["id"], first_block[0]["id"]) + self.assertEqual(resources["doc2"]["id"], first_block[1]["id"]) + self.assertEqual(1, len(list(next(page_iter))), "Second block should have 1 entry.") with self.assertRaises(StopIteration): next(page_iter) @@ -2098,70 +1889,77 @@ def test_query_iterable_functionality(self): def test_trigger_functionality(self): triggers_in_collection1 = [ { - 'id': 't1', - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toUpperCase() + \'t1\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t1", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toUpperCase() + 't1';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response1', - 'body': ( - 'function() {' + - ' var prebody = getContext().getRequest().getBody();' + - ' if (prebody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' + - ' var postbody = getContext().getResponse().getBody();' + - ' if (postbody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All + "id": "response1", + "body": ( + "function() {" + + " var prebody = getContext().getRequest().getBody();" + + " if (prebody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + + " var postbody = getContext().getResponse().getBody();" + + " if (postbody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response2', + "id": "response2", # can't be used because setValue is currently disabled - 'body': ( - 'function() {' + - ' var predoc = getContext().getRequest().getBody();' + - ' var postdoc = getContext().getResponse().getBody();' + - ' getContext().getResponse().setValue(' + - ' \'predocname\', predoc.id + \'response2\');' + - ' getContext().getResponse().setValue(' + - ' \'postdocname\', postdoc.id + \'response2\');' + - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All, - }] + "body": ( + "function() {" + + " var predoc = getContext().getRequest().getBody();" + + " var postdoc = getContext().getResponse().getBody();" + + " getContext().getResponse().setValue(" + + " 'predocname', predoc.id + 'response2');" + + " getContext().getResponse().setValue(" + + " 'postdocname', postdoc.id + 'response2');" + + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection2 = [ { - 'id': "t2", - 'body': "function() { }", # trigger already stringified - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t2", + "body": "function() { }", # trigger already stringified + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': "t3", - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toLowerCase() + \'t3\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }] + "id": "t3", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toLowerCase() + 't3';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection3 = [ { - 'id': 'triggerOpType', - 'body': 'function() { }', - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.Delete, - }] + "id": "triggerOpType", + "body": "function() { }", + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.Delete, + } + ] def __CreateTriggers(collection, triggers): """Creates triggers. @@ -2177,18 +1975,22 @@ def __CreateTriggers(collection, triggers): self.assertEqual( trigger[property], trigger_i[property], - 'property {property} should match'.format(property=property)) + "property {property} should match".format(property=property), + ) # create database db = self.databaseForTest # create collections - pkd = PartitionKey(path='/id', kind='Hash') - collection1 = db.create_container(id='test_trigger_functionality 1 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection2 = db.create_container(id='test_trigger_functionality 2 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection3 = db.create_container(id='test_trigger_functionality 3 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) + pkd = PartitionKey(path="/id", kind="Hash") + collection1 = db.create_container( + id="test_trigger_functionality 1 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection2 = db.create_container( + id="test_trigger_functionality 2 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection3 = db.create_container( + id="test_trigger_functionality 3 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) # create triggers __CreateTriggers(collection1, triggers_in_collection1) __CreateTriggers(collection2, triggers_in_collection2) @@ -2197,56 +1999,39 @@ def __CreateTriggers(collection, triggers): triggers_1 = list(collection1.scripts.list_triggers()) self.assertEqual(len(triggers_1), 3) document_1_1 = collection1.create_item( - body={'id': 'doc1', - 'key': 'value'}, - pre_trigger_include='t1', - no_response=False + body={"id": "doc1", "key": "value"}, pre_trigger_include="t1", no_response=False ) - self.assertEqual(document_1_1['id'], - 'DOC1t1', - 'id should be capitalized') + self.assertEqual(document_1_1["id"], "DOC1t1", "id should be capitalized") document_1_2 = collection1.create_item( - body={'id': 'testing post trigger', 'key': 'value'}, - pre_trigger_include='t1', - post_trigger_include='response1', - no_response=False + body={"id": "testing post trigger", "key": "value"}, + pre_trigger_include="t1", + post_trigger_include="response1", + no_response=False, ) - self.assertEqual(document_1_2['id'], 'TESTING POST TRIGGERt1') + self.assertEqual(document_1_2["id"], "TESTING POST TRIGGERt1") document_1_3 = collection1.create_item( - body={'id': 'responseheaders', 'key': 'value'}, - pre_trigger_include='t1', - no_response=False + body={"id": "responseheaders", "key": "value"}, pre_trigger_include="t1", no_response=False ) - self.assertEqual(document_1_3['id'], "RESPONSEHEADERSt1") + self.assertEqual(document_1_3["id"], "RESPONSEHEADERSt1") triggers_2 = list(collection2.scripts.list_triggers()) self.assertEqual(len(triggers_2), 2) document_2_1 = collection2.create_item( - body={'id': 'doc2', - 'key': 'value2'}, - pre_trigger_include='t2', - no_response=False - ) - self.assertEqual(document_2_1['id'], - 'doc2', - 'id shouldn\'t change') + body={"id": "doc2", "key": "value2"}, pre_trigger_include="t2", no_response=False + ) + self.assertEqual(document_2_1["id"], "doc2", "id shouldn't change") document_2_2 = collection2.create_item( - body={'id': 'Doc3', - 'prop': 'empty', - 'key': 'value2'}, - pre_trigger_include='t3', - no_response=False) - self.assertEqual(document_2_2['id'], 'doc3t3') + body={"id": "Doc3", "prop": "empty", "key": "value2"}, pre_trigger_include="t3", no_response=False + ) + self.assertEqual(document_2_2["id"], "doc3t3") triggers_3 = list(collection3.scripts.list_triggers()) self.assertEqual(len(triggers_3), 1) with self.assertRaises(Exception): collection3.create_item( - body={'id': 'Docoptype', 'key': 'value2'}, - post_trigger_include='triggerOpType', - no_response=False + body={"id": "Docoptype", "key": "value2"}, post_trigger_include="triggerOpType", no_response=False ) db.delete_container(collection1) @@ -2259,70 +2044,61 @@ def test_stored_procedure_functionality(self): # create collection collection = self.databaseForTest.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - stored_proc_id = 'storedProcedure-1-' + str(uuid.uuid4()) + stored_proc_id = "storedProcedure-1-" + str(uuid.uuid4()) sproc1 = { - 'id': stored_proc_id, - 'body': ( - 'function () {' + - ' for (var i = 0; i < 1000; i++) {' + - ' var item = getContext().getResponse().getBody();' + - ' if (i > 0 && item != i - 1) throw \'body mismatch\';' + - ' getContext().getResponse().setBody(i);' + - ' }' + - '}') + "id": stored_proc_id, + "body": ( + "function () {" + + " for (var i = 0; i < 1000; i++) {" + + " var item = getContext().getResponse().getBody();" + + " if (i > 0 && item != i - 1) throw 'body mismatch';" + + " getContext().getResponse().setBody(i);" + + " }" + + "}" + ), } retrieved_sproc = collection.scripts.create_stored_procedure(sproc1) - result = collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc['id'], - partition_key=1 - ) + result = collection.scripts.execute_stored_procedure(sproc=retrieved_sproc["id"], partition_key=1) self.assertEqual(result, 999) - stored_proc_id_2 = 'storedProcedure-2-' + str(uuid.uuid4()) + stored_proc_id_2 = "storedProcedure-2-" + str(uuid.uuid4()) sproc2 = { - 'id': stored_proc_id_2, - 'body': ( - 'function () {' + - ' for (var i = 0; i < 10; i++) {' + - ' getContext().getResponse().appendValue(\'Body\', i);' + - ' }' + - '}') + "id": stored_proc_id_2, + "body": ( + "function () {" + + " for (var i = 0; i < 10; i++) {" + + " getContext().getResponse().appendValue('Body', i);" + + " }" + + "}" + ), } retrieved_sproc2 = collection.scripts.create_stored_procedure(sproc2) - result = collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc2['id'], - partition_key=1 - ) + result = collection.scripts.execute_stored_procedure(sproc=retrieved_sproc2["id"], partition_key=1) self.assertEqual(int(result), 123456789) - stored_proc_id_3 = 'storedProcedure-3-' + str(uuid.uuid4()) + stored_proc_id_3 = "storedProcedure-3-" + str(uuid.uuid4()) sproc3 = { - 'id': stored_proc_id_3, - 'body': ( - 'function (input) {' + - ' getContext().getResponse().setBody(' + - ' \'a\' + input.temp);' + - '}') + "id": stored_proc_id_3, + "body": ("function (input) {" + " getContext().getResponse().setBody(" + " 'a' + input.temp);" + "}"), } retrieved_sproc3 = collection.scripts.create_stored_procedure(sproc3) result = collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc3['id'], - params={'temp': 'so'}, - partition_key=1 + sproc=retrieved_sproc3["id"], params={"temp": "so"}, partition_key=1 ) - self.assertEqual(result, 'aso') + self.assertEqual(result, "aso") def __ValidateOfferResponseBody(self, offer, expected_coll_link, expected_offer_type): # type: (Offer, str, Any) -> None - self.assertIsNotNone(offer.properties['id'], 'Id cannot be null.') - self.assertIsNotNone(offer.properties.get('_rid'), 'Resource Id (Rid) cannot be null.') - self.assertIsNotNone(offer.properties.get('_self'), 'Self Link cannot be null.') - self.assertIsNotNone(offer.properties.get('resource'), 'Resource Link cannot be null.') - self.assertTrue(offer.properties['_self'].find(offer.properties['id']) != -1, - 'Offer id not contained in offer self link.') - self.assertEqual(expected_coll_link.strip('/'), offer.properties['resource'].strip('/')) - if (expected_offer_type): - self.assertEqual(expected_offer_type, offer.properties.get('offerType')) + self.assertIsNotNone(offer.properties["id"], "Id cannot be null.") + self.assertIsNotNone(offer.properties.get("_rid"), "Resource Id (Rid) cannot be null.") + self.assertIsNotNone(offer.properties.get("_self"), "Self Link cannot be null.") + self.assertIsNotNone(offer.properties.get("resource"), "Resource Link cannot be null.") + self.assertTrue( + offer.properties["_self"].find(offer.properties["id"]) != -1, "Offer id not contained in offer self link." + ) + self.assertEqual(expected_coll_link.strip("/"), offer.properties["resource"].strip("/")) + if expected_offer_type: + self.assertEqual(expected_offer_type, offer.properties.get("offerType")) def test_offer_read_and_query(self): # Create database. @@ -2331,7 +2107,7 @@ def test_offer_read_and_query(self): # Read the offer. expected_offer = collection.get_throughput() collection_properties = collection.read() - self.__ValidateOfferResponseBody(expected_offer, collection_properties.get('_self'), None) + self.__ValidateOfferResponseBody(expected_offer, collection_properties.get("_self"), None) def test_offer_replace(self): # Create database. @@ -2341,35 +2117,34 @@ def test_offer_replace(self): # Read Offer expected_offer = collection.get_throughput() collection_properties = collection.read() - self.__ValidateOfferResponseBody(expected_offer, collection_properties.get('_self'), None) + self.__ValidateOfferResponseBody(expected_offer, collection_properties.get("_self"), None) # Replace the offer. replaced_offer = collection.replace_throughput(expected_offer.offer_throughput + 100) collection_properties = collection.read() - self.__ValidateOfferResponseBody(replaced_offer, collection_properties.get('_self'), None) + self.__ValidateOfferResponseBody(replaced_offer, collection_properties.get("_self"), None) # Check if the replaced offer is what we expect. - self.assertEqual(expected_offer.properties.get('content').get('offerThroughput') + 100, - replaced_offer.properties.get('content').get('offerThroughput')) - self.assertEqual(expected_offer.offer_throughput + 100, - replaced_offer.offer_throughput) + self.assertEqual( + expected_offer.properties.get("content").get("offerThroughput") + 100, + replaced_offer.properties.get("content").get("offerThroughput"), + ) + self.assertEqual(expected_offer.offer_throughput + 100, replaced_offer.offer_throughput) def test_database_account_functionality(self): # Validate database account functionality. database_account = self.client.get_database_account() - self.assertEqual(database_account.DatabasesLink, '/dbs/') - self.assertEqual(database_account.MediaLink, '/media/') - if (HttpHeaders.MaxMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): + self.assertEqual(database_account.DatabasesLink, "/dbs/") + self.assertEqual(database_account.MediaLink, "/media/") + if HttpHeaders.MaxMediaStorageUsageInMB in self.client.client_connection.last_response_headers: self.assertEqual( database_account.MaxMediaStorageUsageInMB, - self.client.client_connection.last_response_headers[ - HttpHeaders.MaxMediaStorageUsageInMB]) - if (HttpHeaders.CurrentMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): + self.client.client_connection.last_response_headers[HttpHeaders.MaxMediaStorageUsageInMB], + ) + if HttpHeaders.CurrentMediaStorageUsageInMB in self.client.client_connection.last_response_headers: self.assertEqual( database_account.CurrentMediaStorageUsageInMB, - self.client.client_connection.last_response_headers[ - HttpHeaders.CurrentMediaStorageUsageInMB]) - self.assertIsNotNone(database_account.ConsistencyPolicy['defaultConsistencyLevel']) + self.client.client_connection.last_response_headers[HttpHeaders.CurrentMediaStorageUsageInMB], + ) + self.assertIsNotNone(database_account.ConsistencyPolicy["defaultConsistencyLevel"]) def test_index_progress_headers(self): created_db = self.databaseForTest @@ -2379,12 +2154,9 @@ def test_index_progress_headers(self): self.assertTrue(HttpHeaders.IndexTransformationProgress in created_db.client_connection.last_response_headers) none_coll = created_db.create_container( - id='test_index_progress_headers none_coll ' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.NoIndex, - 'automatic': False - }, - partition_key=PartitionKey(path="/id", kind='Hash') + id="test_index_progress_headers none_coll " + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.NoIndex, "automatic": False}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) created_container = created_db.get_container_client(container=none_coll) created_container.read(populate_quota_info=True) @@ -2396,41 +2168,41 @@ def test_index_progress_headers(self): def test_id_validation(self): # Id shouldn't end with space. try: - self.client.create_database(id='id_with_space ') + self.client.create_database(id="id_with_space ") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id ends with a space or newline.', e.args[0]) + self.assertEqual("Id ends with a space or newline.", e.args[0]) # Id shouldn't contain '/'. try: - self.client.create_database(id='id_with_illegal/_char') + self.client.create_database(id="id_with_illegal/_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id shouldn't contain '\\'. try: - self.client.create_database(id='id_with_illegal\\_char') + self.client.create_database(id="id_with_illegal\\_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id shouldn't contain '?'. try: - self.client.create_database(id='id_with_illegal?_char') + self.client.create_database(id="id_with_illegal?_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id shouldn't contain '#'. try: - self.client.create_database(id='id_with_illegal#_char') + self.client.create_database(id="id_with_illegal#_char") self.assertFalse(True) except ValueError as e: - self.assertEqual('Id contains illegal chars.', e.args[0]) + self.assertEqual("Id contains illegal chars.", e.args[0]) # Id can begin with space - db = self.client.create_database(id=' id_begin_space' + str(uuid.uuid4())) + db = self.client.create_database(id=" id_begin_space" + str(uuid.uuid4())) self.assertTrue(True) self.client.delete_database(db.id) @@ -2465,60 +2237,58 @@ def test_get_resource_with_dictionary_and_object(self): read_container = created_db.get_container_client(created_properties) self.assertEqual(read_container.id, created_container.id) - created_item = created_container.create_item({'id': '1' + str(uuid.uuid4()), 'pk': 'pk'}, no_response=False) + created_item = created_container.create_item({"id": "1" + str(uuid.uuid4()), "pk": "pk"}, no_response=False) # read item with id - read_item = created_container.read_item(item=created_item['id'], partition_key=created_item['pk']) - self.assertEqual(read_item['id'], created_item['id']) + read_item = created_container.read_item(item=created_item["id"], partition_key=created_item["pk"]) + self.assertEqual(read_item["id"], created_item["id"]) # read item with properties - read_item = created_container.read_item(item=created_item, partition_key=created_item['pk']) - self.assertEqual(read_item['id'], created_item['id']) + read_item = created_container.read_item(item=created_item, partition_key=created_item["pk"]) + self.assertEqual(read_item["id"], created_item["id"]) - created_sproc = created_container.scripts.create_stored_procedure({ - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': 'function () { }' - }) + created_sproc = created_container.scripts.create_stored_procedure( + {"id": "storedProcedure" + str(uuid.uuid4()), "body": "function () { }"} + ) # read sproc with id - read_sproc = created_container.scripts.get_stored_procedure(created_sproc['id']) - self.assertEqual(read_sproc['id'], created_sproc['id']) + read_sproc = created_container.scripts.get_stored_procedure(created_sproc["id"]) + self.assertEqual(read_sproc["id"], created_sproc["id"]) # read sproc with properties read_sproc = created_container.scripts.get_stored_procedure(created_sproc) - self.assertEqual(read_sproc['id'], created_sproc['id']) + self.assertEqual(read_sproc["id"], created_sproc["id"]) - created_trigger = created_container.scripts.create_trigger({ - 'id': 'sample trigger' + str(uuid.uuid4()), - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }) + created_trigger = created_container.scripts.create_trigger( + { + "id": "sample trigger" + str(uuid.uuid4()), + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + } + ) # read trigger with id - read_trigger = created_container.scripts.get_trigger(created_trigger['id']) - self.assertEqual(read_trigger['id'], created_trigger['id']) + read_trigger = created_container.scripts.get_trigger(created_trigger["id"]) + self.assertEqual(read_trigger["id"], created_trigger["id"]) # read trigger with properties read_trigger = created_container.scripts.get_trigger(created_trigger) - self.assertEqual(read_trigger['id'], created_trigger['id']) + self.assertEqual(read_trigger["id"], created_trigger["id"]) - created_udf = created_container.scripts.create_user_defined_function({ - 'id': 'sample udf' + str(uuid.uuid4()), - 'body': 'function() {var x = 10;}' - }) + created_udf = created_container.scripts.create_user_defined_function( + {"id": "sample udf" + str(uuid.uuid4()), "body": "function() {var x = 10;}"} + ) # read udf with id - read_udf = created_container.scripts.get_user_defined_function(created_udf['id']) - self.assertEqual(created_udf['id'], read_udf['id']) + read_udf = created_container.scripts.get_user_defined_function(created_udf["id"]) + self.assertEqual(created_udf["id"], read_udf["id"]) # read udf with properties read_udf = created_container.scripts.get_user_defined_function(created_udf) - self.assertEqual(created_udf['id'], read_udf['id']) + self.assertEqual(created_udf["id"], read_udf["id"]) - created_user = created_db.create_user({ - 'id': 'user' + str(uuid.uuid4()) - }) + created_user = created_db.create_user({"id": "user" + str(uuid.uuid4())}) # read user with id read_user = created_db.get_user_client(created_user.id) @@ -2533,12 +2303,14 @@ def test_get_resource_with_dictionary_and_object(self): read_user = created_db.get_user_client(created_user_properties) self.assertEqual(read_user.id, created_user.id) - created_permission = created_user.create_permission({ - 'id': 'all permission' + str(uuid.uuid4()), - 'permissionMode': documents.PermissionMode.All, - 'resource': created_container.container_link, - 'resourcePartitionKey': [1] - }) + created_permission = created_user.create_permission( + { + "id": "all permission" + str(uuid.uuid4()), + "permissionMode": documents.PermissionMode.All, + "resource": created_container.container_link, + "resourcePartitionKey": [1], + } + ) # read permission with id read_permission = created_user.get_permission(created_permission.id) @@ -2561,8 +2333,8 @@ def test_delete_all_items_by_partition_key(self): # create container created_collection = created_db.create_container( - id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/pk', kind='Hash') + id="test_delete_all_items_by_partition_key " + str(uuid.uuid4()), + partition_key=PartitionKey(path="/pk", kind="Hash"), ) # Create two partition keys partition_key1 = "{}-{}".format("Partition Key 1", str(uuid.uuid4())) @@ -2570,9 +2342,7 @@ def test_delete_all_items_by_partition_key(self): # add items for partition key 1 for i in range(1, 3): - created_collection.upsert_item( - dict(id="item{}".format(i), pk=partition_key1) - ) + created_collection.upsert_item(dict(id="item{}".format(i), pk=partition_key1)) # add items for partition key 2 @@ -2608,11 +2378,10 @@ def test_patch_operations(self): "id": "patch_item", "pk": pkValue, "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } created_container.create_item(item) # Define and run patch operations operations = [ @@ -2621,10 +2390,11 @@ def test_patch_operations(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] - none_response = created_container.patch_item(item="patch_item", partition_key=pkValue, - patch_operations=operations) + none_response = created_container.patch_item( + item="patch_item", partition_key=pkValue, patch_operations=operations + ) self.assertDictEqual(none_response, {}) patched_item = created_container.read_item(item="patch_item", partition_key=pkValue) @@ -2673,11 +2443,10 @@ def test_conditional_patching(self): "id": "conditional_patch_item", "pk": pkValue, "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } created_container.create_item(item) # Define patch operations @@ -2687,30 +2456,36 @@ def test_conditional_patching(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] # Run patch operations with wrong filter num_false = item.get("number") + 1 filter_predicate = "from root where root.number = " + str(num_false) try: - created_container.patch_item(item="conditional_patch_item", partition_key=pkValue, - patch_operations=operations, filter_predicate=filter_predicate) + created_container.patch_item( + item="conditional_patch_item", + partition_key=pkValue, + patch_operations=operations, + filter_predicate=filter_predicate, + ) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.PRECONDITION_FAILED) # Run patch operations with correct filter - headerEnvelope=CosmosResponseHeaderEnvelope() + headerEnvelope = CosmosResponseHeaderEnvelope() filter_predicate = "from root where root.number = " + str(item.get("number")) - none_Response = created_container.patch_item(item="conditional_patch_item", - partition_key=pkValue, - patch_operations=operations, - filter_predicate=filter_predicate, - response_hook=headerEnvelope.capture_response_headers) + none_Response = created_container.patch_item( + item="conditional_patch_item", + partition_key=pkValue, + patch_operations=operations, + filter_predicate=filter_predicate, + response_hook=headerEnvelope.capture_response_headers, + ) self.assertDictEqual(none_Response, {}) patched_item = created_container.read_item(item="conditional_patch_item", partition_key=pkValue) - self.assertEqual(headerEnvelope.headers['etag'], patched_item['_etag']) + self.assertEqual(headerEnvelope.headers["etag"], patched_item["_etag"]) # Verify results from patch operations self.assertTrue(patched_item.get("color") is None) @@ -2732,7 +2507,7 @@ def test_conditional_patching(self): # created_recorder = RecordDiagnostics() # created_collection = created_db.create_container(id=collection_id, # indexing_policy=collection_indexing_policy, - # partition_key=PartitionKey(path="/pk", kind="Hash"), + # partition_key=PartitionKey(path="/pk", kind="Hash"), # response_hook=created_recorder) # properties = created_collection.read() # ttl_key = "analyticalStorageTtl" @@ -2750,7 +2525,7 @@ def test_conditional_patching(self): # created_collection = created_db.create_container(id=collection_id, # analytical_storage_ttl=-1, # indexing_policy=collection_indexing_policy, - # partition_key=PartitionKey(path="/pk", kind="Hash"), + # partition_key=PartitionKey(path="/pk", kind="Hash"), # response_hook=created_recorder) # properties = created_collection.read() # ttl_key = "analyticalStorageTtl" @@ -2800,8 +2575,9 @@ def test_priority_level(self): def priority_mock_execute_function(function, *args, **kwargs): if args: - priority_headers.append(args[4].headers[HttpHeaders.PriorityLevel] - if HttpHeaders.PriorityLevel in args[4].headers else '') + priority_headers.append( + args[4].headers[HttpHeaders.PriorityLevel] if HttpHeaders.PriorityLevel in args[4].headers else "" + ) return self.OriginalExecuteFunction(function, *args, **kwargs) _retry_utility.ExecuteFunction = priority_mock_execute_function @@ -2837,7 +2613,7 @@ def _MockExecuteFunction(self, function, *args, **kwargs): return self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled_async.py b/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled_async.py index 6f893f7e629b..a234945b27aa 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_response_payload_on_write_disabled_async.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import json import logging import os.path @@ -27,6 +27,7 @@ from azure.cosmos.http_constants import HttpHeaders, StatusCodes from azure.cosmos.partition_key import PartitionKey + class CosmosResponseHeaderEnvelope: def __init__(self): self.headers: Optional[Dict[str, Any]] = None @@ -34,6 +35,7 @@ def __init__(self): def capture_response_headers(self, headers: Dict[str, Any], response: Dict[str, Any]): self.headers = headers + class TimeoutTransport(AsyncioRequestsTransport): def __init__(self, response): @@ -56,8 +58,8 @@ async def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled(unittest.IsolatedAsyncioTestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" + client: CosmosClient = None configs = test_config.TestConfig host = configs.host @@ -75,18 +77,18 @@ async def __assert_http_failure_with_status(self, status_code, func, *args, **kw """ try: await func(*args, **kwargs) - self.fail('function should fail.') + self.fail("function should fail.") except exceptions.CosmosHttpResponseError as inst: assert inst.status_code == status_code @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey, no_response_on_write=True) @@ -103,12 +105,12 @@ async def test_database_crud_async(self): created_db = await self.client.create_database(database_id) assert created_db.id == database_id # query databases. - databases = [database async for database in self.client.query_databases( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': database_id} - ] - )] + databases = [ + database + async for database in self.client.query_databases( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": database_id}] + ) + ] assert len(databases) > 0 @@ -139,10 +141,7 @@ async def test_database_level_offer_throughput_async(self): # Create a database with throughput offer_throughput = 1000 database_id = str(uuid.uuid4()) - created_db = await self.client.create_database( - id=database_id, - offer_throughput=offer_throughput - ) + created_db = await self.client.create_database(id=database_id, offer_throughput=offer_throughput) assert created_db.id == database_id # Verify offer throughput for database @@ -158,28 +157,30 @@ async def test_database_level_offer_throughput_async(self): async def test_sql_query_crud_async(self): # create two databases. - db1 = await self.client.create_database('database 1' + str(uuid.uuid4())) - db2 = await self.client.create_database('database 2' + str(uuid.uuid4())) + db1 = await self.client.create_database("database 1" + str(uuid.uuid4())) + db2 = await self.client.create_database("database 2" + str(uuid.uuid4())) # query with parameters. - databases = [database async for database in self.client.query_databases( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': db1.id} - ] - )] + databases = [ + database + async for database in self.client.query_databases( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": db1.id}] + ) + ] assert 1 == len(databases) # query without parameters. - databases = [database async for database in self.client.query_databases( - query='SELECT * FROM root r WHERE r.id="database non-existing"' - )] + databases = [ + database + async for database in self.client.query_databases( + query='SELECT * FROM root r WHERE r.id="database non-existing"' + ) + ] assert 0 == len(databases) # query with a string. query_string = 'SELECT * FROM root r WHERE r.id="' + db2.id + '"' - databases = [database async for database in - self.client.query_databases(query=query_string)] + databases = [database async for database in self.client.query_databases(query=query_string)] assert 1 == len(databases) await self.client.delete_database(db1.id) @@ -190,60 +191,63 @@ async def test_collection_crud_async(self): collections = [collection async for collection in created_db.list_containers()] # create a collection before_create_collections_count = len(collections) - collection_id = 'test_collection_crud ' + str(uuid.uuid4()) - collection_indexing_policy = {'indexingMode': 'consistent'} - created_collection = await created_db.create_container(id=collection_id, - indexing_policy=collection_indexing_policy, - partition_key=PartitionKey(path="/pk", kind="Hash")) + collection_id = "test_collection_crud " + str(uuid.uuid4()) + collection_indexing_policy = {"indexingMode": "consistent"} + created_collection = await created_db.create_container( + id=collection_id, + indexing_policy=collection_indexing_policy, + partition_key=PartitionKey(path="/pk", kind="Hash"), + ) assert collection_id == created_collection.id created_properties = await created_collection.read() - assert 'consistent' == created_properties['indexingPolicy']['indexingMode'] - assert PartitionKey(path='/pk', kind='Hash') == created_properties['partitionKey'] + assert "consistent" == created_properties["indexingPolicy"]["indexingMode"] + assert PartitionKey(path="/pk", kind="Hash") == created_properties["partitionKey"] # read collections after creation collections = [collection async for collection in created_db.list_containers()] assert len(collections) == before_create_collections_count + 1 # query collections - collections = [collection async for collection in created_db.query_containers( - - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': collection_id} - ] - )] + collections = [ + collection + async for collection in created_db.query_containers( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": collection_id}] + ) + ] assert len(collections) > 0 # delete collection await created_db.delete_container(created_collection.id) # read collection after deletion created_container = created_db.get_container_client(created_collection.id) - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - created_container.read) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, created_container.read) async def test_partitioned_collection_async(self): created_db = self.database_for_test - collection_definition = {'id': 'test_partitioned_collection ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id'], - 'kind': documents.PartitionKind.Hash - } - } + collection_definition = { + "id": "test_partitioned_collection " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/id"], "kind": documents.PartitionKind.Hash}, + } offer_throughput = 10100 - created_collection = await created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition['partitionKey'], - offer_throughput=offer_throughput) + created_collection = await created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition["partitionKey"], + offer_throughput=offer_throughput, + ) - assert collection_definition.get('id') == created_collection.id + assert collection_definition.get("id") == created_collection.id created_collection_properties = await created_collection.read() - assert collection_definition.get('partitionKey').get('paths')[0] == \ - created_collection_properties['partitionKey']['paths'][0] - assert collection_definition.get('partitionKey').get('kind') == created_collection_properties['partitionKey'][ - 'kind'] + assert ( + collection_definition.get("partitionKey").get("paths")[0] + == created_collection_properties["partitionKey"]["paths"][0] + ) + assert ( + collection_definition.get("partitionKey").get("kind") + == created_collection_properties["partitionKey"]["kind"] + ) expected_offer = await created_collection.get_throughput() @@ -256,50 +260,44 @@ async def test_partitioned_collection_async(self): async def test_partitioned_collection_quota_async(self): created_db = self.database_for_test - created_collection = self.database_for_test.get_container_client( - self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) + created_collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) retrieved_collection_properties = await created_collection.read( - populate_partition_key_range_statistics=True, - populate_quota_info=True) + populate_partition_key_range_statistics=True, populate_quota_info=True + ) assert retrieved_collection_properties.get("statistics") is not None assert created_db.client_connection.last_response_headers.get("x-ms-resource-usage") is not None async def test_partitioned_collection_partition_key_extraction_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_extraction ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction " + str(uuid.uuid4()) created_collection = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state", kind=documents.PartitionKind.Hash) ) - document_definition = {'id': 'document1A', - 'address': {'street': '1 Microsoft Way', - 'city': 'Redmond', - 'state': 'WA', - 'zip code': 98052 - } - } + document_definition = { + "id": "document1A", + "address": {"street": "1 Microsoft Way", "city": "Redmond", "state": "WA", "zip code": 98052}, + } self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._mock_execute_function # create document without partition key being specified created_document = await created_collection.create_item(body=document_definition, no_response=True) - self.assertDictEqual(created_document,{}) - document_definition["id"]= "document1" + self.assertDictEqual(created_document, {}) + document_definition["id"] = "document1" created_document = await created_collection.create_item(body=document_definition, no_response=False) _retry_utility_async.ExecuteFunctionAsync = self.OriginalExecuteFunction assert self.last_headers[0] == '["WA"]' del self.last_headers[:] - assert created_document.get('id') == document_definition.get('id') - assert created_document.get('address').get('state') == document_definition.get('address').get('state') + assert created_document.get("id") == document_definition.get("id") + assert created_document.get("address").get("state") == document_definition.get("address").get("state") - collection_id = 'test_partitioned_collection_partition_key_extraction1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction1 " + str(uuid.uuid4()) created_collection1 = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync @@ -310,10 +308,9 @@ async def test_partitioned_collection_partition_key_extraction_async(self): assert self.last_headers[0] == [{}] del self.last_headers[:] - collection_id = 'test_partitioned_collection_partition_key_extraction2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction2 " + str(uuid.uuid4()) created_collection2 = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/address/state/city', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/address/state/city", kind=documents.PartitionKind.Hash) ) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync @@ -331,15 +328,13 @@ async def test_partitioned_collection_partition_key_extraction_async(self): async def test_partitioned_collection_partition_key_extraction_special_chars_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars1 " + str(uuid.uuid4()) created_collection1 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\"level\' 1*()\"/\"le/vel2\"', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path='/"level\' 1*()"/"le/vel2"', kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document1', - "level' 1*()": {"le/vel2": 'val1'} - } + document_definition = {"id": "document1", "level' 1*()": {"le/vel2": "val1"}} self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._mock_execute_function @@ -348,16 +343,14 @@ async def test_partitioned_collection_partition_key_extraction_special_chars_asy assert self.last_headers[0] == '["val1"]' del self.last_headers[:] - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()) created_collection2 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path='/\'level\" 1*()\'/\'le/vel2\'', kind=documents.PartitionKind.Hash) + partition_key=PartitionKey(path="/'level\" 1*()'/'le/vel2'", kind=documents.PartitionKind.Hash), ) - document_definition = {'id': 'document2', - 'level\" 1*()': {'le/vel2': 'val2'} - } + document_definition = {"id": "document2", 'level" 1*()': {"le/vel2": "val2"}} self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._mock_execute_function @@ -375,22 +368,21 @@ def test_partitioned_collection_path_parser(self): with open(os.path.join(test_dir, "BaselineTest.PathParser.json")) as json_file: entries = json.loads(json_file.read()) for entry in entries: - parts = base.ParsePaths([entry['path']]) - assert parts == entry['parts'] + parts = base.ParsePaths([entry["path"]]) + assert parts == entry["parts"] - paths = ["/\"Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1\"/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ['/"Ke \\ \\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1"/*'] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] assert parts == base.ParsePaths(paths) - paths = ["/'Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] - parts = ["Ke \\ \\\" \\\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] + paths = ["/'Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1'/*"] + parts = ["Ke \\ \\\" \\' \\? \\a \\\b \\\f \\\n \\\r \\\t \\v y1", "*"] assert parts == base.ParsePaths(paths) async def test_partitioned_collection_document_crud_and_query_async(self): created_collection = await self.database_for_test.create_container(str(uuid.uuid4()), PartitionKey(path="/id")) - document_definition = {'id': 'document', - 'key': 'value'} + document_definition = {"id": "document", "key": "value"} created_document = await created_collection.create_item(body=document_definition) self.assertDictEqual(created_document, {}) @@ -401,77 +393,79 @@ async def test_partitioned_collection_document_crud_and_query_async(self): created_document = await created_collection.upsert_item(body=document_definition, no_response=False) assert created_document is not {} - assert created_document.get('id') == document_definition.get('id') - assert created_document.get('key') == document_definition.get('key') + assert created_document.get("id") == document_definition.get("id") + assert created_document.get("key") == document_definition.get("key") # read document read_document = await created_collection.read_item( - item=created_document.get('id'), - partition_key=created_document.get('id') + item=created_document.get("id"), partition_key=created_document.get("id") ) - assert read_document.get('id') == created_document.get('id') - assert read_document.get('key') == created_document.get('key') + assert read_document.get("id") == created_document.get("id") + assert read_document.get("key") == created_document.get("key") # Read document feed doesn't require partitionKey as it's always a cross partition query document_list = [document async for document in created_collection.read_all_items()] assert 1 == len(document_list) # replace document - document_definition['key'] = 'new value' + document_definition["key"] = "new value" - replaced_document = await created_collection.replace_item( - item=read_document, - body=document_definition - ) + replaced_document = await created_collection.replace_item(item=read_document, body=document_definition) self.assertDictEqual(replaced_document, {}) replaced_document = await created_collection.replace_item( - item=read_document, - body=document_definition, - no_response=True + item=read_document, body=document_definition, no_response=True ) self.assertDictEqual(replaced_document, {}) replaced_document = await created_collection.replace_item( - item=read_document, - body=document_definition, - no_response=False + item=read_document, body=document_definition, no_response=False ) assert replaced_document is not None - assert replaced_document.get('key') == document_definition.get('key') + assert replaced_document.get("key") == document_definition.get("key") # upsert document(create scenario) - document_definition['id'] = 'document2' - document_definition['key'] = 'value2' + document_definition["id"] = "document2" + document_definition["key"] = "value2" upserted_document = await created_collection.upsert_item(body=document_definition, no_response=False) - assert upserted_document.get('id') == document_definition.get('id') - assert upserted_document.get('key') == document_definition.get('key') + assert upserted_document.get("id") == document_definition.get("id") + assert upserted_document.get("key") == document_definition.get("key") document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == 2 # delete document - await created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get('id')) + await created_collection.delete_item(item=upserted_document, partition_key=upserted_document.get("id")) # query document on the partition key specified in the predicate will pass even without setting enableCrossPartitionQuery or passing in the partitionKey value - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.id=\'' + replaced_document.get('id') + '\'' # nosec - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.id='" + replaced_document.get("id") + "'" # nosec + ) + ] assert len(document_list) == 1 # cross partition query - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'')] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'" + ) + ] assert len(document_list) == 1 # query document by providing the partitionKey value - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - partition_key=replaced_document.get('id') - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + partition_key=replaced_document.get("id"), + ) + ] assert len(document_list) == 1 await self.database_for_test.delete_container(created_collection.id) @@ -479,52 +473,49 @@ async def test_partitioned_collection_document_crud_and_query_async(self): async def test_partitioned_collection_permissions_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_permissions all collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions all collection" + str(uuid.uuid4()) all_collection = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - collection_id = 'test_partitioned_collection_permissions read collection' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_permissions read collection" + str(uuid.uuid4()) read_collection = await created_db.create_container( - id=collection_id, - partition_key=PartitionKey(path='/key', kind=documents.PartitionKind.Hash) + id=collection_id, partition_key=PartitionKey(path="/key", kind=documents.PartitionKind.Hash) ) - user = await created_db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = await created_db.create_user(body={"id": "user" + str(uuid.uuid4())}) permission_definition = { - 'id': 'all permission', - 'permissionMode': documents.PermissionMode.All, - 'resource': all_collection.container_link, - 'resourcePartitionKey': [1] + "id": "all permission", + "permissionMode": documents.PermissionMode.All, + "resource": all_collection.container_link, + "resourcePartitionKey": [1], } all_permission = await user.create_permission(body=permission_definition) permission_definition = { - 'id': 'read permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': read_collection.container_link, - 'resourcePartitionKey': [1] + "id": "read permission", + "permissionMode": documents.PermissionMode.Read, + "resource": read_collection.container_link, + "resourcePartitionKey": [1], } read_permission = await user.create_permission(body=permission_definition) resource_tokens = {} # storing the resource tokens based on Resource IDs - resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = (all_permission.properties['_token']) - resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = ( - read_permission.properties['_token']) + resource_tokens["dbs/" + created_db.id + "/colls/" + all_collection.id] = all_permission.properties["_token"] + resource_tokens["dbs/" + created_db.id + "/colls/" + read_collection.id] = read_permission.properties["_token"] - async with CosmosClient(TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, resource_tokens) as restricted_client: - print('Async Initialization') + async with CosmosClient( + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, resource_tokens + ) as restricted_client: + print("Async Initialization") - document_definition = {'id': 'document1', - 'key': 1 - } + document_definition = {"id": "document1", "key": 1} all_collection.client_connection = restricted_client.client_connection read_collection.client_connection = restricted_client.client_connection @@ -534,28 +525,22 @@ async def test_partitioned_collection_permissions_async(self): # Create document in read_collection should fail since it has only read permissions for this collection await self.__assert_http_failure_with_status( - StatusCodes.FORBIDDEN, - read_collection.create_item, - document_definition) + StatusCodes.FORBIDDEN, read_collection.create_item, document_definition + ) - document_definition['key'] = 2 + document_definition["key"] = 2 # Create document should fail since the partitionKey is 2 which is different that what is specified as resourcePartitionKey in permission object await self.__assert_http_failure_with_status( - StatusCodes.FORBIDDEN, - all_collection.create_item, - document_definition) + StatusCodes.FORBIDDEN, all_collection.create_item, document_definition + ) - document_definition['key'] = 1 + document_definition["key"] = 1 # Delete document should succeed since the partitionKey is 1 which is what specified as resourcePartitionKey in permission object - await all_collection.delete_item(item=created_document['id'], - partition_key=document_definition['key']) + await all_collection.delete_item(item=created_document["id"], partition_key=document_definition["key"]) # Delete document in read_collection should fail since it has only read permissions for this collection await self.__assert_http_failure_with_status( - StatusCodes.FORBIDDEN, - read_collection.delete_item, - document_definition['id'], - document_definition['id'] + StatusCodes.FORBIDDEN, read_collection.delete_item, document_definition["id"], document_definition["id"] ) await self.database_for_test.delete_container(all_collection.id) @@ -567,30 +552,32 @@ async def test_partitioned_collection_execute_stored_procedure_async(self): document_id = str(uuid.uuid4()) sproc = { - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' var client = getContext().getCollection();' + - ' client.createDocument(client.getSelfLink(), { id: "' + document_id + '", pk : 2}, ' + - ' {}, function(err, docCreated, options) { ' + - ' if(err) throw new Error(\'Error while creating document: \' + err.message);' + - ' else {' + - ' getContext().getResponse().setBody(1);' + - ' }' + - ' });}') + "id": "storedProcedure" + str(uuid.uuid4()), + "body": ( + "function () {" + + " var client = getContext().getCollection();" + + ' client.createDocument(client.getSelfLink(), { id: "' + + document_id + + '", pk : 2}, ' + + " {}, function(err, docCreated, options) { " + + " if(err) throw new Error('Error while creating document: ' + err.message);" + + " else {" + + " getContext().getResponse().setBody(1);" + + " }" + + " });}" + ), } created_sproc = await created_collection.scripts.create_stored_procedure(body=sproc) # Partiton Key value same as what is specified in the stored procedure body - result = await created_collection.scripts.execute_stored_procedure(sproc=created_sproc['id'], partition_key=2) + result = await created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=2) assert result == 1 # Partiton Key value different than what is specified in the stored procedure body will cause a bad request(400) error await self.__assert_http_failure_with_status( - StatusCodes.BAD_REQUEST, - created_collection.scripts.execute_stored_procedure, - created_sproc['id']) + StatusCodes.BAD_REQUEST, created_collection.scripts.execute_stored_procedure, created_sproc["id"] + ) async def test_partitioned_collection_partition_key_value_types_async(self): @@ -598,74 +585,57 @@ async def test_partitioned_collection_partition_key_value_types_async(self): created_collection = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': None, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": None, "spam": "eggs"} # create document with partitionKey set as None here await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "spam": "eggs"} # create document with partitionKey set as Undefined here await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': True, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": True, "spam": "eggs"} # create document with bool partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 'value', - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": "value", "spam": "eggs"} # create document with string partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 100, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 100, "spam": "eggs"} # create document with int partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'id': 'document1' + str(uuid.uuid4()), - 'pk': 10.50, - 'spam': 'eggs'} + document_definition = {"id": "document1" + str(uuid.uuid4()), "pk": 10.50, "spam": "eggs"} # create document with float partitionKey await created_collection.create_item(body=document_definition) - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'pk': 'value'} + document_definition = {"name": "sample document", "spam": "eggs", "pk": "value"} # Should throw an error because automatic id generation is disabled always. await self.__assert_http_failure_with_status( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition + StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition ) async def test_partitioned_collection_conflict_crud_and_query_async(self): created_collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - conflict_definition = {'id': 'new conflict', - 'resourceId': 'doc1', - 'operationType': 'create', - 'resourceType': 'document' - } + conflict_definition = { + "id": "new conflict", + "resourceId": "doc1", + "operationType": "create", + "resourceType": "document", + } # read conflict here will return resource not found(404) since there is no conflict here await self.__assert_http_failure_with_status( - StatusCodes.NOT_FOUND, - created_collection.get_conflict, - conflict_definition['id'], - conflict_definition['id'] + StatusCodes.NOT_FOUND, created_collection.get_conflict, conflict_definition["id"], conflict_definition["id"] ) # Read conflict feed doesn't require partitionKey to be specified as it's a cross partition thing @@ -676,22 +646,29 @@ async def test_partitioned_collection_conflict_crud_and_query_async(self): await self.__assert_http_failure_with_status( StatusCodes.NOT_FOUND, created_collection.delete_conflict, - conflict_definition['id'], - conflict_definition['id'] + conflict_definition["id"], + conflict_definition["id"], ) - conflict_list = [conflict async for conflict in created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'')] + conflict_list = [ + conflict + async for conflict in created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'" + ) + ] assert len(conflict_list) == 0 # query conflicts by providing the partitionKey value - options = {'partitionKey': conflict_definition.get('id')} - conflict_list = [conflict async for conflict in created_collection.query_conflicts( - query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', - # nosec - partition_key=conflict_definition['id'] - )] + options = {"partitionKey": conflict_definition.get("id")} + conflict_list = [ + conflict + async for conflict in created_collection.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + # nosec + partition_key=conflict_definition["id"], + ) + ] assert len(conflict_list) == 0 @@ -705,21 +682,20 @@ async def test_document_crud_async(self): before_create_documents_count = len(document_list) # create a document with auto ID generation - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk'} - - created_document = await created_collection.create_item(body=document_definition, - enable_automatic_id_generation=True, - no_response=False) - assert created_document.get('name') == document_definition['name'] - - document_definition = {'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk', - 'id': str(uuid.uuid4())} + document_definition = {"name": "sample document", "spam": "eggs", "key": "value", "pk": "pk"} + + created_document = await created_collection.create_item( + body=document_definition, enable_automatic_id_generation=True, no_response=False + ) + assert created_document.get("name") == document_definition["name"] + + document_definition = { + "name": "sample document", + "spam": "eggs", + "key": "value", + "pk": "pk", + "id": str(uuid.uuid4()), + } created_document = await created_collection.create_item(body=document_definition) self.assertDictEqual(created_document, {}) @@ -732,69 +708,66 @@ async def test_document_crud_async(self): created_document = await created_collection.create_item(body=document_definition, no_response=False) assert created_document is not {} - assert created_document.get('name') == document_definition['name'] - assert created_document.get('id') == document_definition['id'] + assert created_document.get("name") == document_definition["name"] + assert created_document.get("id") == document_definition["id"] # duplicated documents are not allowed when 'id' is provided. duplicated_definition_with_id = document_definition.copy() - await self.__assert_http_failure_with_status(StatusCodes.CONFLICT, - created_collection.create_item, - duplicated_definition_with_id) + await self.__assert_http_failure_with_status( + StatusCodes.CONFLICT, created_collection.create_item, duplicated_definition_with_id + ) # read documents after creation document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == before_create_documents_count + 4 # query documents - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.name=@name', - parameters=[{'name': '@name', 'value': document_definition['name']}] - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.name=@name", + parameters=[{"name": "@name", "value": document_definition["name"]}], + ) + ] assert document_list is not None - document_list = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.name=@name', - parameters=[ - {'name': '@name', 'value': document_definition['name']} - ], - enable_scan_in_query=True - )] + document_list = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.name=@name", + parameters=[{"name": "@name", "value": document_definition["name"]}], + enable_scan_in_query=True, + ) + ] assert document_list is not None # replace document. - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' - old_etag = created_document['_etag'] - replaced_document = await created_collection.replace_item( - item=created_document['id'], - body=created_document - ) + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" + old_etag = created_document["_etag"] + replaced_document = await created_collection.replace_item(item=created_document["id"], body=created_document) self.assertDictEqual(replaced_document, {}) replaced_document = await created_collection.replace_item( - item=created_document['id'], - body=created_document, - no_response=True + item=created_document["id"], body=created_document, no_response=True ) self.assertDictEqual(replaced_document, {}) replaced_document = await created_collection.replace_item( - item=created_document['id'], - body=created_document, - no_response=False + item=created_document["id"], body=created_document, no_response=False ) assert replaced_document is not None - assert replaced_document['name'] == 'replaced document' - assert replaced_document['spam'] == 'not eggs' - assert created_document['id'] == replaced_document['id'] + assert replaced_document["name"] == "replaced document" + assert replaced_document["spam"] == "not eggs" + assert created_document["id"] == replaced_document["id"] # replace document based on condition - replaced_document['name'] = 'replaced document based on condition' - replaced_document['spam'] = 'new spam field' + replaced_document["name"] = "replaced document based on condition" + replaced_document["spam"] = "new spam field" # should fail for stale etag await self.__assert_http_failure_with_status( StatusCodes.PRECONDITION_FAILED, created_collection.replace_item, - replaced_document['id'], + replaced_document["id"], replaced_document, if_match=old_etag, ) @@ -802,9 +775,8 @@ async def test_document_crud_async(self): # should fail if only etag specified try: await created_collection.replace_item( - etag=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document) + etag=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if only etag specified") except ValueError: pass @@ -812,18 +784,16 @@ async def test_document_crud_async(self): # should fail if only match condition specified try: await created_collection.replace_item( - match_condition=MatchConditions.IfNotModified, - item=replaced_document['id'], - body=replaced_document) + match_condition=MatchConditions.IfNotModified, item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if only match condition specified") except ValueError: pass try: await created_collection.replace_item( - match_condition=MatchConditions.IfModified, - item=replaced_document['id'], - body=replaced_document) + match_condition=MatchConditions.IfModified, item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if only match condition specified") except ValueError: pass @@ -831,49 +801,43 @@ async def test_document_crud_async(self): # should fail if invalid match condition specified try: await created_collection.replace_item( - match_condition=replaced_document['_etag'], - item=replaced_document['id'], - body=replaced_document) + match_condition=replaced_document["_etag"], item=replaced_document["id"], body=replaced_document + ) self.fail("should fail if invalid match condition specified") except TypeError: pass # should pass for most recent etag - headerEnvelope=CosmosResponseHeaderEnvelope() + headerEnvelope = CosmosResponseHeaderEnvelope() replaced_document_conditional = await created_collection.replace_item( match_condition=MatchConditions.IfNotModified, - etag=replaced_document['_etag'], - item=replaced_document['id'], + etag=replaced_document["_etag"], + item=replaced_document["id"], body=replaced_document, - response_hook=headerEnvelope.capture_response_headers + response_hook=headerEnvelope.capture_response_headers, ) self.assertDictEqual(replaced_document_conditional, {}) replaced_document_conditional = await created_collection.read_item( - item=replaced_document['id'], - partition_key=replaced_document['pk']) + item=replaced_document["id"], partition_key=replaced_document["pk"] + ) assert replaced_document_conditional is not None - assert replaced_document_conditional['_etag'] == headerEnvelope.headers["etag"] - assert replaced_document_conditional['name'] == 'replaced document based on condition' - assert replaced_document_conditional['spam'] == 'new spam field' - assert replaced_document_conditional['id'] == replaced_document['id'] + assert replaced_document_conditional["_etag"] == headerEnvelope.headers["etag"] + assert replaced_document_conditional["name"] == "replaced document based on condition" + assert replaced_document_conditional["spam"] == "new spam field" + assert replaced_document_conditional["id"] == replaced_document["id"] # read document one_document_from_read = await created_collection.read_item( - item=replaced_document['id'], - partition_key=replaced_document['pk'] + item=replaced_document["id"], partition_key=replaced_document["pk"] ) - assert replaced_document['id'] == one_document_from_read['id'] + assert replaced_document["id"] == one_document_from_read["id"] # delete document - await created_collection.delete_item( - item=replaced_document, - partition_key=replaced_document['pk'] - ) + await created_collection.delete_item(item=replaced_document, partition_key=replaced_document["pk"]) # read documents after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - created_collection.read_item, - replaced_document['id'], - replaced_document['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, created_collection.read_item, replaced_document["id"], replaced_document["id"] + ) async def test_document_upsert_async(self): @@ -885,11 +849,7 @@ async def test_document_upsert_async(self): before_create_documents_count = len(document_list) # create document definition - document_definition = {'id': 'doc', - 'name': 'sample document', - 'spam': 'eggs', - 'key': 'value', - 'pk': 'pk'} + document_definition = {"id": "doc", "name": "sample document", "spam": "eggs", "key": "value", "pk": "pk"} # create document using Upsert API created_document = await created_collection.upsert_item(body=document_definition) @@ -900,11 +860,11 @@ async def test_document_upsert_async(self): assert created_document is not None # verify id property - assert created_document['id'] == document_definition['id'] + assert created_document["id"] == document_definition["id"] # test error for non-string id with self.assertRaises(TypeError): - document_definition['id'] = 7 + document_definition["id"] = 7 await created_collection.upsert_item(body=document_definition) # read documents after creation and verify updated count @@ -912,47 +872,46 @@ async def test_document_upsert_async(self): assert len(document_list) == before_create_documents_count + 1 # update document - created_document['name'] = 'replaced document' - created_document['spam'] = 'not eggs' + created_document["name"] = "replaced document" + created_document["spam"] = "not eggs" # should replace document since it already exists upserted_document = await created_collection.upsert_item(body=created_document, no_response=False) # verify the changed properties - assert upserted_document['name'] == created_document['name'] - assert upserted_document['spam'] == created_document['spam'] + assert upserted_document["name"] == created_document["name"] + assert upserted_document["spam"] == created_document["spam"] # verify id property - assert upserted_document['id'] == created_document['id'] + assert upserted_document["id"] == created_document["id"] # read documents after upsert and verify count doesn't increases again document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == before_create_documents_count + 1 - created_document['id'] = 'new id' + created_document["id"] = "new id" # Upsert should create new document since the id is different new_document = await created_collection.upsert_item(body=created_document, no_response=False) # Test modified access conditions - created_document['spam'] = 'more eggs' + created_document["spam"] = "more eggs" await created_collection.upsert_item(body=created_document) with self.assertRaises(exceptions.CosmosHttpResponseError): await created_collection.upsert_item( - body=created_document, - match_condition=MatchConditions.IfNotModified, - etag=new_document['_etag']) + body=created_document, match_condition=MatchConditions.IfNotModified, etag=new_document["_etag"] + ) # verify id property - assert created_document['id'] == new_document['id'] + assert created_document["id"] == new_document["id"] # read documents after upsert and verify count increases document_list = [document async for document in created_collection.read_all_items()] assert len(document_list) == before_create_documents_count + 2 # delete documents - await created_collection.delete_item(item=upserted_document, partition_key=upserted_document['pk']) - await created_collection.delete_item(item=new_document, partition_key=new_document['pk']) + await created_collection.delete_item(item=upserted_document, partition_key=upserted_document["pk"]) + await created_collection.delete_item(item=new_document, partition_key=new_document["pk"]) # read documents after delete and verify count is same as original document_list = [document async for document in created_collection.read_all_items()] @@ -962,47 +921,25 @@ async def test_geospatial_index_async(self): db = self.database_for_test # partial policy specified collection = await db.create_container( - id='collection with spatial index ' + str(uuid.uuid4()), + id="collection with spatial index " + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ - { - 'path': '/"Location"/?', - 'indexes': [ - { - 'kind': 'Spatial', - 'dataType': 'Point' - } - ] - }, - { - 'path': '/' - } + "includedPaths": [ + {"path": '/"Location"/?', "indexes": [{"kind": "Spatial", "dataType": "Point"}]}, + {"path": "/"}, ] }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) - await collection.create_item( - body={ - 'id': 'loc1', - 'Location': { - 'type': 'Point', - 'coordinates': [20.0, 20.0] - } - } - ) - await collection.create_item( - body={ - 'id': 'loc2', - 'Location': { - 'type': 'Point', - 'coordinates': [100.0, 100.0] - } - } - ) - results = [result async for result in collection.query_items( - query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)")] + await collection.create_item(body={"id": "loc1", "Location": {"type": "Point", "coordinates": [20.0, 20.0]}}) + await collection.create_item(body={"id": "loc2", "Location": {"type": "Point", "coordinates": [100.0, 100.0]}}) + results = [ + result + async for result in collection.query_items( + query="SELECT * FROM root WHERE (ST_DISTANCE(root.Location, {type: 'Point', coordinates: [20.1, 20]}) < 20000)" + ) + ] assert len(results) == 1 - assert 'loc1' == results[0]['id'] + assert "loc1" == results[0]["id"] # CRUD test for User resource @@ -1015,28 +952,28 @@ async def test_user_crud_async(self): users = [user async for user in db.list_users()] before_create_count = len(users) # create user - user_id = 'new user' + str(uuid.uuid4()) - user = await db.create_user(body={'id': user_id}) + user_id = "new user" + str(uuid.uuid4()) + user = await db.create_user(body={"id": user_id}) assert user.id == user_id # list users after creation users = [user async for user in db.list_users()] assert len(users) == before_create_count + 1 # query users - results = [user async for user in db.query_users( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': user_id} - ] - )] + results = [ + user + async for user in db.query_users( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": user_id}] + ) + ] assert results is not None # replace user - replaced_user_id = 'replaced user' + str(uuid.uuid4()) + replaced_user_id = "replaced user" + str(uuid.uuid4()) user_properties = await user.read() - user_properties['id'] = replaced_user_id + user_properties["id"] = replaced_user_id replaced_user = await db.replace_user(user_id, user_properties) assert replaced_user.id == replaced_user_id - assert user_properties['id'] == replaced_user.id + assert user_properties["id"] == replaced_user.id # read user user = db.get_user_client(replaced_user.id) @@ -1047,8 +984,7 @@ async def test_user_crud_async(self): # read user after deletion deleted_user = db.get_user_client(user.id) - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - deleted_user.read) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, deleted_user.read) async def test_user_upsert_async(self): @@ -1060,8 +996,8 @@ async def test_user_upsert_async(self): before_create_count = len(users) # create user using Upsert API - user_id = 'user' + str(uuid.uuid4()) - user = await db.upsert_user(body={'id': user_id}) + user_id = "user" + str(uuid.uuid4()) + user = await db.upsert_user(body={"id": user_id}) # verify id property assert user.id == user_id @@ -1082,8 +1018,8 @@ async def test_user_upsert_async(self): assert len(users) == before_create_count + 1 user_properties = await user.read() - user_properties['id'] = 'new user' + str(uuid.uuid4()) - user.id = user_properties['id'] + user_properties["id"] = "new user" + str(uuid.uuid4()) + user.id = user_properties["id"] # Upsert should create new user since id is different new_user = await db.upsert_user(user_properties) @@ -1108,36 +1044,36 @@ async def test_permission_crud_async(self): # create database db = self.database_for_test # create user - user = await db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = await db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # list permissions permissions = [permission async for permission in user.list_permissions()] before_create_count = len(permissions) permission = { - 'id': 'new permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "new permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission permission = await user.create_permission(permission) - assert permission.id == 'new permission' + assert permission.id == "new permission" # list permissions after creation permissions = [permission async for permission in user.list_permissions()] assert len(permissions) == before_create_count + 1 # query permissions - results = [permission async for permission in user.query_permissions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': permission.id} - ] - )] + results = [ + permission + async for permission in user.query_permissions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": permission.id}] + ) + ] assert results is not None # replace permission change_permission = permission.properties.copy() - permission.properties['id'] = 'replaced permission' - permission.id = permission.properties['id'] - replaced_permission = await user.replace_permission(change_permission['id'], permission.properties) - assert replaced_permission.id == 'replaced permission' + permission.properties["id"] = "replaced permission" + permission.id = permission.properties["id"] + replaced_permission = await user.replace_permission(change_permission["id"], permission.properties) + assert replaced_permission.id == "replaced permission" assert permission.id == replaced_permission.id # read permission permission = await user.get_permission(replaced_permission.id) @@ -1145,9 +1081,7 @@ async def test_permission_crud_async(self): # delete permission await user.delete_permission(replaced_permission.id) # read permission after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - user.get_permission, - permission.id) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, user.get_permission, permission.id) async def test_permission_upsert_async(self): @@ -1155,30 +1089,30 @@ async def test_permission_upsert_async(self): db = self.database_for_test # create user - user = await db.create_user(body={'id': 'new user' + str(uuid.uuid4())}) + user = await db.create_user(body={"id": "new user" + str(uuid.uuid4())}) # read permissions and check count permissions = [permission async for permission in user.list_permissions()] before_create_count = len(permissions) permission_definition = { - 'id': 'permission', - 'permissionMode': documents.PermissionMode.Read, - 'resource': 'dbs/AQAAAA==/colls/AQAAAJ0fgTc=' # A random one. + "id": "permission", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/AQAAAA==/colls/AQAAAJ0fgTc=", # A random one. } # create permission using Upsert API created_permission = await user.upsert_permission(permission_definition) # verify id property - assert created_permission.id == permission_definition['id'] + assert created_permission.id == permission_definition["id"] # read permissions after creation and verify updated count permissions = [permission async for permission in user.list_permissions()] assert len(permissions) == before_create_count + 1 # update permission mode - permission_definition['permissionMode'] = documents.PermissionMode.All + permission_definition["permissionMode"] = documents.PermissionMode.All # should repace the permission since it already exists upserted_permission = await user.upsert_permission(permission_definition) @@ -1186,18 +1120,18 @@ async def test_permission_upsert_async(self): assert upserted_permission.id == created_permission.id # verify changed property - assert upserted_permission.permission_mode == permission_definition['permissionMode'] + assert upserted_permission.permission_mode == permission_definition["permissionMode"] # read permissions and verify count doesn't increase again permissions = [permission async for permission in user.list_permissions()] assert len(permissions) == before_create_count + 1 # update permission id - created_permission.properties['id'] = 'new permission' - created_permission.id = created_permission.properties['id'] + created_permission.properties["id"] = "new permission" + created_permission.id = created_permission.properties["id"] # resource needs to be changed along with the id in order to create a new permission - created_permission.properties['resource'] = 'dbs/N9EdAA==/colls/N9EdAIugXgA=' - created_permission.resource_link = created_permission.properties['resource'] + created_permission.properties["resource"] = "dbs/N9EdAA==/colls/N9EdAIugXgA=" + created_permission.resource_link = created_permission.properties["resource"] # should create new permission since id has changed new_permission = await user.upsert_permission(created_permission.properties) @@ -1236,45 +1170,41 @@ async def __setup_entities(): db = self.database_for_test # create collection collection = await db.create_container( - id='test_authorization' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_authorization" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id", kind="Hash") ) # create document1 document = await collection.create_item( - body={'id': 'doc1', - 'spam': 'eggs', - 'key': 'value'}, - no_response=False + body={"id": "doc1", "spam": "eggs", "key": "value"}, no_response=False ) # create user - user = await db.create_user(body={'id': 'user' + str(uuid.uuid4())}) + user = await db.create_user(body={"id": "user" + str(uuid.uuid4())}) # create permission for collection permission = { - 'id': 'permission On Coll', - 'permissionMode': documents.PermissionMode.Read, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "id": "permission On Coll", + "permissionMode": documents.PermissionMode.Read, + "resource": "dbs/" + db.id + "/colls/" + collection.id, } permission_on_coll = await user.create_permission(body=permission) - assert permission_on_coll.properties['_token'] is not None + assert permission_on_coll.properties["_token"] is not None # create permission for document permission = { - 'id': 'permission On Doc', - 'permissionMode': documents.PermissionMode.All, - 'resource': "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + document["id"] + "id": "permission On Doc", + "permissionMode": documents.PermissionMode.All, + "resource": "dbs/" + db.id + "/colls/" + collection.id + "/docs/" + document["id"], } permission_on_doc = await user.create_permission(body=permission) - assert permission_on_doc.properties['_token'] is not None + assert permission_on_doc.properties["_token"] is not None entities = { - 'db': db, - 'coll': collection, - 'doc': document, - 'user': user, - 'permissionOnColl': permission_on_coll, - 'permissionOnDoc': permission_on_doc, + "db": db, + "coll": collection, + "doc": document, + "user": user, + "permissionOnColl": permission_on_coll, + "permissionOnDoc": permission_on_doc, } return entities @@ -1286,62 +1216,75 @@ async def __setup_entities(): assert e.status_code == StatusCodes.UNAUTHORIZED # Client with master key. - async with CosmosClient(TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, - TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.masterKey) as client: + async with CosmosClient( + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.masterKey, + ) as client: # setup entities entities = await __setup_entities() - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id: - entities['permissionOnColl'].properties['_token']} + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id: entities["permissionOnColl"].properties["_token"] + } async with CosmosClient( - TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, resource_tokens) as col_client: - db = entities['db'] + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, resource_tokens + ) as col_client: + db = entities["db"] old_client_connection = db.client_connection db.client_connection = col_client.client_connection # 1. Success-- Use Col Permission to Read - success_coll = db.get_container_client(container=entities['coll']) + success_coll = db.get_container_client(container=entities["coll"]) # 2. Failure-- Use Col Permission to delete - await self.__assert_http_failure_with_status(StatusCodes.FORBIDDEN, - db.delete_container, - success_coll) + await self.__assert_http_failure_with_status(StatusCodes.FORBIDDEN, db.delete_container, success_coll) # 3. Success-- Use Col Permission to Read All Docs success_documents = [document async for document in success_coll.read_all_items()] assert success_documents is not None assert len(success_documents) == 1 # 4. Success-- Use Col Permission to Read Doc - doc_id = entities['doc']['id'] - success_doc = await success_coll.read_item( - item=doc_id, - partition_key=doc_id - ) + doc_id = entities["doc"]["id"] + success_doc = await success_coll.read_item(item=doc_id, partition_key=doc_id) assert success_doc is not None - assert success_doc['id'] == entities['doc']['id'] + assert success_doc["id"] == entities["doc"]["id"] # 5. Failure-- Use Col Permission to Delete Doc - await self.__assert_http_failure_with_status(StatusCodes.FORBIDDEN, - success_coll.delete_item, - doc_id, doc_id) + await self.__assert_http_failure_with_status( + StatusCodes.FORBIDDEN, success_coll.delete_item, doc_id, doc_id + ) - resource_tokens = {"dbs/" + entities['db'].id + "/colls/" + entities['coll'].id + "/docs/" + doc_id: - entities['permissionOnDoc'].properties['_token']} + resource_tokens = { + "dbs/" + + entities["db"].id + + "/colls/" + + entities["coll"].id + + "/docs/" + + doc_id: entities["permissionOnDoc"].properties["_token"] + } async with CosmosClient( - TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, resource_tokens) as doc_client: + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, resource_tokens + ) as doc_client: # 6. Success-- Use Doc permission to read doc - read_doc = await doc_client.get_database_client(db.id).get_container_client(success_coll.id).read_item( - doc_id, doc_id) + read_doc = ( + await doc_client.get_database_client(db.id) + .get_container_client(success_coll.id) + .read_item(doc_id, doc_id) + ) assert read_doc["id"] == doc_id # 6. Success-- Use Doc permission to delete doc - await doc_client.get_database_client(db.id).get_container_client(success_coll.id).delete_item(doc_id, - doc_id) + await doc_client.get_database_client(db.id).get_container_client(success_coll.id).delete_item( + doc_id, doc_id + ) assert read_doc["id"] == doc_id db.client_connection = old_client_connection - await db.delete_container(entities['coll']) + await db.delete_container(entities["coll"]) async def test_trigger_crud_async(self): @@ -1352,49 +1295,50 @@ async def test_trigger_crud_async(self): # create a trigger before_create_triggers_count = len(triggers) trigger_definition = { - 'id': 'sample trigger', - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "sample trigger", + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, } trigger = await collection.scripts.create_trigger(body=trigger_definition) for property in trigger_definition: if property != "serverScript": assert trigger[property] == trigger_definition[property] else: - assert trigger['body'] == 'function() {var x = 10;}' + assert trigger["body"] == "function() {var x = 10;}" # read triggers after creation triggers = [trigger async for trigger in collection.scripts.list_triggers()] assert len(triggers) == before_create_triggers_count + 1 # query triggers - triggers = [trigger async for trigger in collection.scripts.query_triggers( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': trigger_definition['id']} - ] - )] + triggers = [ + trigger + async for trigger in collection.scripts.query_triggers( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": trigger_definition["id"]}], + ) + ] assert triggers is not None # replace trigger change_trigger = trigger.copy() - trigger['body'] = 'function() {var x = 20;}' - replaced_trigger = await collection.scripts.replace_trigger(change_trigger['id'], trigger) + trigger["body"] = "function() {var x = 20;}" + replaced_trigger = await collection.scripts.replace_trigger(change_trigger["id"], trigger) for property in trigger_definition: if property != "serverScript": assert replaced_trigger[property] == trigger[property] else: - assert replaced_trigger['body'] == 'function() {var x = 20;}' + assert replaced_trigger["body"] == "function() {var x = 20;}" # read trigger - trigger = await collection.scripts.get_trigger(replaced_trigger['id']) - assert replaced_trigger['id'] == trigger['id'] + trigger = await collection.scripts.get_trigger(replaced_trigger["id"]) + assert replaced_trigger["id"] == trigger["id"] # delete trigger - await collection.scripts.delete_trigger(replaced_trigger['id']) + await collection.scripts.delete_trigger(replaced_trigger["id"]) # read triggers after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - collection.scripts.delete_trigger, - replaced_trigger['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, collection.scripts.delete_trigger, replaced_trigger["id"] + ) async def test_udf_crud_async(self): @@ -1404,10 +1348,7 @@ async def test_udf_crud_async(self): udfs = [udf async for udf in collection.scripts.list_user_defined_functions()] # create a udf before_create_udfs_count = len(udfs) - udf_definition = { - 'id': 'sample udf', - 'body': 'function() {var x = 10;}' - } + udf_definition = {"id": "sample udf", "body": "function() {var x = 10;}"} udf = await collection.scripts.create_user_defined_function(body=udf_definition) for property in udf_definition: assert udf[property] == udf_definition[property] @@ -1416,27 +1357,27 @@ async def test_udf_crud_async(self): udfs = [udf async for udf in collection.scripts.list_user_defined_functions()] assert len(udfs) == before_create_udfs_count + 1 # query udfs - results = [udf async for udf in collection.scripts.query_user_defined_functions( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': udf_definition['id']} - ] - )] + results = [ + udf + async for udf in collection.scripts.query_user_defined_functions( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": udf_definition["id"]}] + ) + ] assert results is not None # replace udf - udf['body'] = 'function() {var x = 20;}' - replaced_udf = await collection.scripts.replace_user_defined_function(udf=udf['id'], body=udf) + udf["body"] = "function() {var x = 20;}" + replaced_udf = await collection.scripts.replace_user_defined_function(udf=udf["id"], body=udf) for property in udf_definition: assert replaced_udf[property] == udf[property] # read udf - udf = await collection.scripts.get_user_defined_function(replaced_udf['id']) - assert replaced_udf['body'] == udf['body'] + udf = await collection.scripts.get_user_defined_function(replaced_udf["id"]) + assert replaced_udf["body"] == udf["body"] # delete udf - await collection.scripts.delete_user_defined_function(replaced_udf['id']) + await collection.scripts.delete_user_defined_function(replaced_udf["id"]) # read udfs after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - collection.scripts.get_user_defined_function, - replaced_udf['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, collection.scripts.get_user_defined_function, replaced_udf["id"] + ) async def test_sproc_crud_async(self): @@ -1446,94 +1387,87 @@ async def test_sproc_crud_async(self): sprocs = [sproc async for sproc in collection.scripts.list_stored_procedures()] # create a sproc before_create_sprocs_count = len(sprocs) - sproc_definition = { - 'id': 'sample sproc', - 'serverScript': 'function() {var x = 10;}' - } + sproc_definition = {"id": "sample sproc", "serverScript": "function() {var x = 10;}"} sproc = await collection.scripts.create_stored_procedure(body=sproc_definition) for property in sproc_definition: if property != "serverScript": assert sproc[property] == sproc_definition[property] else: - assert sproc['body'] == 'function() {var x = 10;}' + assert sproc["body"] == "function() {var x = 10;}" # read sprocs after creation sprocs = [sproc async for sproc in collection.scripts.list_stored_procedures()] assert len(sprocs) == before_create_sprocs_count + 1 # query sprocs - sprocs = [sproc async for sproc in collection.scripts.query_stored_procedures( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': sproc_definition['id']} - ] - )] + sprocs = [ + sproc + async for sproc in collection.scripts.query_stored_procedures( + query="SELECT * FROM root r WHERE r.id=@id", + parameters=[{"name": "@id", "value": sproc_definition["id"]}], + ) + ] assert sprocs is not None # replace sproc change_sproc = sproc.copy() - sproc['body'] = 'function() {var x = 20;}' - replaced_sproc = await collection.scripts.replace_stored_procedure(sproc=change_sproc['id'], body=sproc) + sproc["body"] = "function() {var x = 20;}" + replaced_sproc = await collection.scripts.replace_stored_procedure(sproc=change_sproc["id"], body=sproc) for property in sproc_definition: - if property != 'serverScript': + if property != "serverScript": assert replaced_sproc[property] == sproc[property] else: - assert replaced_sproc['body'] == "function() {var x = 20;}" + assert replaced_sproc["body"] == "function() {var x = 20;}" # read sproc - sproc = await collection.scripts.get_stored_procedure(replaced_sproc['id']) - assert replaced_sproc['id'] == sproc['id'] + sproc = await collection.scripts.get_stored_procedure(replaced_sproc["id"]) + assert replaced_sproc["id"] == sproc["id"] # delete sproc - await collection.scripts.delete_stored_procedure(replaced_sproc['id']) + await collection.scripts.delete_stored_procedure(replaced_sproc["id"]) # read sprocs after deletion - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - collection.scripts.get_stored_procedure, - replaced_sproc['id']) + await self.__assert_http_failure_with_status( + StatusCodes.NOT_FOUND, collection.scripts.get_stored_procedure, replaced_sproc["id"] + ) async def test_script_logging_execute_stored_procedure_async(self): created_collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) sproc = { - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' var mytext = \'x\';' + - ' var myval = 1;' + - ' try {' + - ' console.log(\'The value of %s is %s.\', mytext, myval);' + - ' getContext().getResponse().setBody(\'Success!\');' + - ' }' + - ' catch (err) {' + - ' getContext().getResponse().setBody(\'inline err: [\' + err.number + \'] \' + err);' + - ' }' - '}') + "id": "storedProcedure" + str(uuid.uuid4()), + "body": ( + "function () {" + + " var mytext = 'x';" + + " var myval = 1;" + + " try {" + + " console.log('The value of %s is %s.', mytext, myval);" + + " getContext().getResponse().setBody('Success!');" + + " }" + + " catch (err) {" + + " getContext().getResponse().setBody('inline err: [' + err.number + '] ' + err);" + + " }" + "}" + ), } created_sproc = await created_collection.scripts.create_stored_procedure(body=sproc) - result = await created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - partition_key=1 - ) + result = await created_collection.scripts.execute_stored_procedure(sproc=created_sproc["id"], partition_key=1) - assert result == 'Success!' + assert result == "Success!" assert HttpHeaders.ScriptLogResults not in created_collection.scripts.client_connection.last_response_headers result = await created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=True, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=True, partition_key=1 ) - assert result == 'Success!' - assert urllib.quote('The value of x is 1.') == created_collection.scripts.client_connection. \ - last_response_headers.get(HttpHeaders.ScriptLogResults) + assert result == "Success!" + assert urllib.quote( + "The value of x is 1." + ) == created_collection.scripts.client_connection.last_response_headers.get(HttpHeaders.ScriptLogResults) result = await created_collection.scripts.execute_stored_procedure( - sproc=created_sproc['id'], - enable_script_logging=False, - partition_key=1 + sproc=created_sproc["id"], enable_script_logging=False, partition_key=1 ) - assert result == 'Success!' + assert result == "Success!" assert HttpHeaders.ScriptLogResults not in created_collection.scripts.client_connection.last_response_headers async def test_collection_indexing_policy_async(self): @@ -1544,37 +1478,29 @@ async def test_collection_indexing_policy_async(self): collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = await collection.read() - assert collection_properties['indexingPolicy']['indexingMode'] == documents.IndexingMode.Consistent + assert collection_properties["indexingPolicy"]["indexingMode"] == documents.IndexingMode.Consistent collection_with_indexing_policy = await db.create_container( - id='CollectionWithIndexingPolicy ' + str(uuid.uuid4()), + id="CollectionWithIndexingPolicy " + str(uuid.uuid4()), indexing_policy={ - 'automatic': True, - 'indexingMode': documents.IndexingMode.Consistent, - 'includedPaths': [ + "automatic": True, + "indexingMode": documents.IndexingMode.Consistent, + "includedPaths": [ { - 'path': '/', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.Number, - 'precision': 2 - } - ] + "path": "/", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.Number, "precision": 2} + ], } ], - 'excludedPaths': [ - { - 'path': '/"systemMetadata"/*' - } - ] + "excludedPaths": [{"path": '/"systemMetadata"/*'}], }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_with_indexing_policy_properties = await collection_with_indexing_policy.read() - assert 1 == len(collection_with_indexing_policy_properties['indexingPolicy']['includedPaths']) - assert 2 == len(collection_with_indexing_policy_properties['indexingPolicy']['excludedPaths']) + assert 1 == len(collection_with_indexing_policy_properties["indexingPolicy"]["includedPaths"]) + assert 2 == len(collection_with_indexing_policy_properties["indexingPolicy"]["excludedPaths"]) await db.delete_container(collection_with_indexing_policy.id) @@ -1586,70 +1512,56 @@ async def test_create_default_indexing_policy_async(self): # no indexing policy specified collection = db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) # partial policy specified collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy01' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.Consistent, 'automatic': True - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy01" + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.Consistent, "automatic": True}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) # default policy collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy03' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy03" + str(uuid.uuid4()), indexing_policy={}, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) # missing indexes collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy04' + str(uuid.uuid4()), - indexing_policy={ - 'includedPaths': [ - { - 'path': '/*' - } - ] - }, - partition_key=PartitionKey(path='/id', kind='Hash') + id="test_create_default_indexing_policy TestCreateDefaultPolicy04" + str(uuid.uuid4()), + indexing_policy={"includedPaths": [{"path": "/*"}]}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) # missing precision collection = await db.create_container( - id='test_create_default_indexing_policy TestCreateDefaultPolicy05' + str(uuid.uuid4()), + id="test_create_default_indexing_policy TestCreateDefaultPolicy05" + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ + "includedPaths": [ { - 'path': '/*', - 'indexes': [ - { - 'kind': documents.IndexKind.Hash, - 'dataType': documents.DataType.String - }, - { - 'kind': documents.IndexKind.Range, - 'dataType': documents.DataType.Number - } - ] + "path": "/*", + "indexes": [ + {"kind": documents.IndexKind.Hash, "dataType": documents.DataType.String}, + {"kind": documents.IndexKind.Range, "dataType": documents.DataType.Number}, + ], } ] }, - partition_key=PartitionKey(path='/id', kind='Hash') + partition_key=PartitionKey(path="/id", kind="Hash"), ) collection_properties = await collection.read() - await self._check_default_indexing_policy_paths(collection_properties['indexingPolicy']) + await self._check_default_indexing_policy_paths(collection_properties["indexingPolicy"]) await db.delete_container(container=collection) async def test_create_indexing_policy_with_composite_and_spatial_indexes_async(self): @@ -1659,63 +1571,29 @@ async def test_create_indexing_policy_with_composite_and_spatial_indexes_async(s indexing_policy = { "spatialIndexes": [ - { - "path": "/path0/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - }, - { - "path": "/path1/*", - "types": [ - "Point", - "LineString", - "Polygon", - "MultiPolygon" - ] - } + {"path": "/path0/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, + {"path": "/path1/*", "types": ["Point", "LineString", "Polygon", "MultiPolygon"]}, ], "compositeIndexes": [ [ - { - "path": "/path1", - "order": "ascending" - }, - { - "path": "/path2", - "order": "descending" - }, - { - "path": "/path3", - "order": "ascending" - } + {"path": "/path1", "order": "ascending"}, + {"path": "/path2", "order": "descending"}, + {"path": "/path3", "order": "ascending"}, ], [ - { - "path": "/path4", - "order": "ascending" - }, - { - "path": "/path5", - "order": "descending" - }, - { - "path": "/path6", - "order": "ascending" - } - ] - ] + {"path": "/path4", "order": "ascending"}, + {"path": "/path5", "order": "descending"}, + {"path": "/path6", "order": "ascending"}, + ], + ], } # TODO: Check on why custom logger was previously used here # custom_logger = logging.getLogger("CustomLogger") created_container = await db.create_container( - id='composite_index_spatial_index' + str(uuid.uuid4()), + id="composite_index_spatial_index" + str(uuid.uuid4()), indexing_policy=indexing_policy, - partition_key=PartitionKey(path='/id', kind='Hash'), + partition_key=PartitionKey(path="/id", kind="Hash"), headers={"Foo": "bar"}, user_agent="blah", user_agent_overwrite=True, @@ -1723,15 +1601,15 @@ async def test_create_indexing_policy_with_composite_and_spatial_indexes_async(s ) # TODO: check on why custom logger was used for container read. created_properties = await created_container.read() - read_indexing_policy = created_properties['indexingPolicy'] + read_indexing_policy = created_properties["indexingPolicy"] - if 'localhost' in self.host or '127.0.0.1' in self.host: # TODO: Differing result between live and emulator - assert indexing_policy['spatialIndexes'] == read_indexing_policy['spatialIndexes'] + if "localhost" in self.host or "127.0.0.1" in self.host: # TODO: Differing result between live and emulator + assert indexing_policy["spatialIndexes"] == read_indexing_policy["spatialIndexes"] else: # All types are returned for spatial Indexes - assert indexing_policy['spatialIndexes'] == read_indexing_policy['spatialIndexes'] + assert indexing_policy["spatialIndexes"] == read_indexing_policy["spatialIndexes"] - assert indexing_policy['compositeIndexes'] == read_indexing_policy['compositeIndexes'] + assert indexing_policy["compositeIndexes"] == read_indexing_policy["compositeIndexes"] await db.delete_container(created_container.id) @@ -1743,17 +1621,18 @@ def __get_first(array): return None # '/_etag' is present in excluded paths by default - assert 1 == len(indexing_policy['excludedPaths']) + assert 1 == len(indexing_policy["excludedPaths"]) # included paths should be 1: '/'. - assert 1 == len(indexing_policy['includedPaths']) + assert 1 == len(indexing_policy["includedPaths"]) - root_included_path = __get_first([included_path for included_path in indexing_policy['includedPaths'] - if included_path['path'] == '/*']) - assert root_included_path.get('indexes') is None + root_included_path = __get_first( + [included_path for included_path in indexing_policy["includedPaths"] if included_path["path"] == "/*"] + ) + assert root_included_path.get("indexes") is None async def test_client_request_timeout_async(self): # Test is flaky on Emulator - if not ('localhost' in self.host or '127.0.0.1' in self.host): + if not ("localhost" in self.host or "127.0.0.1" in self.host): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 @@ -1764,76 +1643,77 @@ async def test_client_request_timeout_async(self): with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - item = {'id': str(uuid.uuid4()), 'name': 'sample'} + item = {"id": str(uuid.uuid4()), "name": "sample"} await container.create_item(body=item) - await container.read_item(item=item['id'], partition_key=item['id']) - print('Async initialization') + await container.read_item(item=item["id"], partition_key=item["id"]) + print("Async initialization") async def test_client_request_timeout_when_connection_retry_configuration_specified_async(self): connection_policy = documents.ConnectionPolicy() # making timeout 0 ms to make sure it will throw connection_policy.ReadTimeout = 0.000000000001 - async with CosmosClient(TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, - TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.masterKey, - connection_policy=connection_policy, - retry_total=3, retry_connect=3, retry_read=3, retry_backoff_max=0.3, - retry_on_status_codes=[500, 502, 504]) as client: + async with CosmosClient( + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.host, + TestCRUDOperationsAsyncResponsePayloadOnWriteDisabled.masterKey, + connection_policy=connection_policy, + retry_total=3, + retry_connect=3, + retry_read=3, + retry_backoff_max=0.3, + retry_on_status_codes=[500, 502, 504], + ) as client: with self.assertRaises(ServiceResponseError): databaseForTest = client.get_database_client(self.configs.TEST_DATABASE_ID) container = databaseForTest.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - item = {'id': str(uuid.uuid4()), 'name': 'sample'} + item = {"id": str(uuid.uuid4()), "name": "sample"} await container.create_item(body=item) - await container.read_item(item=item['id'], partition_key=item['id']) - print('Async Initialization') + await container.read_item(item=item["id"], partition_key=item["id"]) + print("Async Initialization") async def test_query_iterable_functionality_async(self): - collection = await self.database_for_test.create_container("query-iterable-container-async", - PartitionKey(path="/pk")) - doc1 = await collection.upsert_item(body={'id': 'doc1', 'prop1': 'value1'}) + collection = await self.database_for_test.create_container( + "query-iterable-container-async", PartitionKey(path="/pk") + ) + doc1 = await collection.upsert_item(body={"id": "doc1", "prop1": "value1"}) self.assertDictEqual(doc1, {}) - doc1 = await collection.upsert_item(body={'id': 'doc1', 'prop1': 'value1'}, no_response=True) + doc1 = await collection.upsert_item(body={"id": "doc1", "prop1": "value1"}, no_response=True) self.assertDictEqual(doc1, {}) - doc1 = await collection.upsert_item(body={'id': 'doc1', 'prop1': 'value1'}, no_response=False) + doc1 = await collection.upsert_item(body={"id": "doc1", "prop1": "value1"}, no_response=False) assert doc1 is not None - doc2 = await collection.upsert_item(body={'id': 'doc2', 'prop1': 'value2'}, no_response=False) - doc3 = await collection.upsert_item(body={'id': 'doc3', 'prop1': 'value3'}, no_response=False) - resources = { - 'coll': collection, - 'doc1': doc1, - 'doc2': doc2, - 'doc3': doc3 - } + doc2 = await collection.upsert_item(body={"id": "doc2", "prop1": "value2"}, no_response=False) + doc3 = await collection.upsert_item(body={"id": "doc3", "prop1": "value3"}, no_response=False) + resources = {"coll": collection, "doc1": doc1, "doc2": doc2, "doc3": doc3} # Validate QueryIterable by converting it to a list. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) docs = [doc async for doc in results] assert 3 == len(docs) - assert resources['doc1']['id'] == docs[0]['id'] - assert resources['doc2']['id'] == docs[1]['id'] - assert resources['doc3']['id'] == docs[2]['id'] + assert resources["doc1"]["id"] == docs[0]["id"] + assert resources["doc2"]["id"] == docs[1]["id"] + assert resources["doc3"]["id"] == docs[2]["id"] # Validate QueryIterable iterator with 'for'. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) counter = 0 # test QueryIterable with 'for'. async for doc in results: counter += 1 if counter == 1: - assert resources['doc1']['id'] == doc['id'] + assert resources["doc1"]["id"] == doc["id"] elif counter == 2: - assert resources['doc2']['id'] == doc['id'] + assert resources["doc2"]["id"] == doc["id"] elif counter == 3: - assert resources['doc3']['id'] == doc['id'] + assert resources["doc3"]["id"] == doc["id"] assert counter == 3 # Get query results page by page. - results = resources['coll'].read_all_items(max_item_count=2) + results = resources["coll"].read_all_items(max_item_count=2) page_iter = results.by_page() first_block = [page async for page in await page_iter.__anext__()] assert 2 == len(first_block) - assert resources['doc1']['id'] == first_block[0]['id'] - assert resources['doc2']['id'] == first_block[1]['id'] + assert resources["doc1"]["id"] == first_block[0]["id"] + assert resources["doc2"]["id"] == first_block[1]["id"] assert 1 == len([page async for page in await page_iter.__anext__()]) with self.assertRaises(StopAsyncIteration): await page_iter.__anext__() @@ -1844,70 +1724,77 @@ async def test_trigger_functionality_async(self): triggers_in_collection1 = [ { - 'id': 't1', - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toUpperCase() + \'t1\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t1", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toUpperCase() + 't1';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response1', - 'body': ( - 'function() {' + - ' var prebody = getContext().getRequest().getBody();' + - ' if (prebody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' + - ' var postbody = getContext().getResponse().getBody();' + - ' if (postbody.id != \'TESTING POST TRIGGERt1\')' - ' throw \'id mismatch\';' - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All + "id": "response1", + "body": ( + "function() {" + + " var prebody = getContext().getRequest().getBody();" + + " if (prebody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + + " var postbody = getContext().getResponse().getBody();" + + " if (postbody.id != 'TESTING POST TRIGGERt1')" + " throw 'id mismatch';" + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': 'response2', + "id": "response2", # can't be used because setValue is currently disabled - 'body': ( - 'function() {' + - ' var predoc = getContext().getRequest().getBody();' + - ' var postdoc = getContext().getResponse().getBody();' + - ' getContext().getResponse().setValue(' + - ' \'predocname\', predoc.id + \'response2\');' + - ' getContext().getResponse().setValue(' + - ' \'postdocname\', postdoc.id + \'response2\');' + - '}'), - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.All, - }] + "body": ( + "function() {" + + " var predoc = getContext().getRequest().getBody();" + + " var postdoc = getContext().getResponse().getBody();" + + " getContext().getResponse().setValue(" + + " 'predocname', predoc.id + 'response2');" + + " getContext().getResponse().setValue(" + + " 'postdocname', postdoc.id + 'response2');" + + "}" + ), + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection2 = [ { - 'id': "t2", - 'body': "function() { }", # trigger already stringified - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All + "id": "t2", + "body": "function() { }", # trigger already stringified + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, }, { - 'id': "t3", - 'body': ( - 'function() {' + - ' var item = getContext().getRequest().getBody();' + - ' item.id = item.id.toLowerCase() + \'t3\';' + - ' getContext().getRequest().setBody(item);' + - '}'), - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }] + "id": "t3", + "body": ( + "function() {" + + " var item = getContext().getRequest().getBody();" + + " item.id = item.id.toLowerCase() + 't3';" + + " getContext().getRequest().setBody(item);" + + "}" + ), + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + }, + ] triggers_in_collection3 = [ { - 'id': 'triggerOpType', - 'body': 'function() { }', - 'triggerType': documents.TriggerType.Post, - 'triggerOperation': documents.TriggerOperation.Delete, - }] + "id": "triggerOpType", + "body": "function() { }", + "triggerType": documents.TriggerType.Post, + "triggerOperation": documents.TriggerOperation.Delete, + } + ] async def __create_triggers(collection, triggers): """Creates triggers. @@ -1925,12 +1812,15 @@ async def __create_triggers(collection, triggers): # create database db = self.database_for_test # create collections - collection1 = await db.create_container(id='test_trigger_functionality 1 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection2 = await db.create_container(id='test_trigger_functionality 2 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) - collection3 = await db.create_container(id='test_trigger_functionality 3 ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/key', kind='Hash')) + collection1 = await db.create_container( + id="test_trigger_functionality 1 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection2 = await db.create_container( + id="test_trigger_functionality 2 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) + collection3 = await db.create_container( + id="test_trigger_functionality 3 " + str(uuid.uuid4()), partition_key=PartitionKey(path="/key", kind="Hash") + ) # create triggers await __create_triggers(collection1, triggers_in_collection1) await __create_triggers(collection2, triggers_in_collection2) @@ -1939,51 +1829,39 @@ async def __create_triggers(collection, triggers): triggers_1 = [trigger async for trigger in collection1.scripts.list_triggers()] assert len(triggers_1) == 3 document_1_1 = await collection1.create_item( - body={'id': 'doc1', - 'key': 'value'}, - pre_trigger_include='t1', - no_response=False + body={"id": "doc1", "key": "value"}, pre_trigger_include="t1", no_response=False ) - assert document_1_1['id'] == 'DOC1t1' + assert document_1_1["id"] == "DOC1t1" document_1_2 = await collection1.create_item( - body={'id': 'testing post trigger', 'key': 'value'}, - pre_trigger_include='t1', - post_trigger_include='response1', - no_response=False + body={"id": "testing post trigger", "key": "value"}, + pre_trigger_include="t1", + post_trigger_include="response1", + no_response=False, ) - assert document_1_2['id'] == 'TESTING POST TRIGGERt1' + assert document_1_2["id"] == "TESTING POST TRIGGERt1" document_1_3 = await collection1.create_item( - body={'id': 'responseheaders', 'key': 'value'}, - pre_trigger_include='t1', - no_response=False + body={"id": "responseheaders", "key": "value"}, pre_trigger_include="t1", no_response=False ) - assert document_1_3['id'] == "RESPONSEHEADERSt1" + assert document_1_3["id"] == "RESPONSEHEADERSt1" triggers_2 = [trigger async for trigger in collection2.scripts.list_triggers()] assert len(triggers_2) == 2 document_2_1 = await collection2.create_item( - body={'id': 'doc2', - 'key': 'value2'}, - pre_trigger_include='t2', - no_response=False + body={"id": "doc2", "key": "value2"}, pre_trigger_include="t2", no_response=False ) - assert document_2_1['id'] == 'doc2' + assert document_2_1["id"] == "doc2" document_2_2 = await collection2.create_item( - body={'id': 'Doc3', - 'prop': 'empty', - 'key': 'value2'}, - pre_trigger_include='t3', - no_response=False) - assert document_2_2['id'] == 'doc3t3' + body={"id": "Doc3", "prop": "empty", "key": "value2"}, pre_trigger_include="t3", no_response=False + ) + assert document_2_2["id"] == "doc3t3" triggers_3 = [trigger async for trigger in collection3.scripts.list_triggers()] assert len(triggers_3) == 1 with self.assertRaises(Exception): await collection3.create_item( - body={'id': 'Docoptype', 'key': 'value2'}, - post_trigger_include='triggerOpType' + body={"id": "Docoptype", "key": "value2"}, post_trigger_include="triggerOpType" ) await db.delete_container(collection1) @@ -1996,64 +1874,54 @@ async def test_stored_procedure_functionality_async(self): collection = self.database_for_test.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) sproc1 = { - 'id': 'storedProcedure1' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' for (var i = 0; i < 1000; i++) {' + - ' var item = getContext().getResponse().getBody();' + - ' if (i > 0 && item != i - 1) throw \'body mismatch\';' + - ' getContext().getResponse().setBody(i);' + - ' }' + - '}') + "id": "storedProcedure1" + str(uuid.uuid4()), + "body": ( + "function () {" + + " for (var i = 0; i < 1000; i++) {" + + " var item = getContext().getResponse().getBody();" + + " if (i > 0 && item != i - 1) throw 'body mismatch';" + + " getContext().getResponse().setBody(i);" + + " }" + + "}" + ), } retrieved_sproc = await collection.scripts.create_stored_procedure(body=sproc1) - result = await collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc['id'], - partition_key=1 - ) + result = await collection.scripts.execute_stored_procedure(sproc=retrieved_sproc["id"], partition_key=1) assert result == 999 sproc2 = { - 'id': 'storedProcedure2' + str(uuid.uuid4()), - 'body': ( - 'function () {' + - ' for (var i = 0; i < 10; i++) {' + - ' getContext().getResponse().appendValue(\'Body\', i);' + - ' }' + - '}') + "id": "storedProcedure2" + str(uuid.uuid4()), + "body": ( + "function () {" + + " for (var i = 0; i < 10; i++) {" + + " getContext().getResponse().appendValue('Body', i);" + + " }" + + "}" + ), } retrieved_sproc2 = await collection.scripts.create_stored_procedure(body=sproc2) - result = await collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc2['id'], - partition_key=1 - ) + result = await collection.scripts.execute_stored_procedure(sproc=retrieved_sproc2["id"], partition_key=1) assert int(result) == 123456789 sproc3 = { - 'id': 'storedProcedure3' + str(uuid.uuid4()), - 'body': ( - 'function (input) {' + - ' getContext().getResponse().setBody(' + - ' \'a\' + input.temp);' + - '}') + "id": "storedProcedure3" + str(uuid.uuid4()), + "body": ("function (input) {" + " getContext().getResponse().setBody(" + " 'a' + input.temp);" + "}"), } retrieved_sproc3 = await collection.scripts.create_stored_procedure(body=sproc3) result = await collection.scripts.execute_stored_procedure( - sproc=retrieved_sproc3['id'], - parameters={'temp': 'so'}, - partition_key=1 + sproc=retrieved_sproc3["id"], parameters={"temp": "so"}, partition_key=1 ) - assert result == 'aso' + assert result == "aso" def __validate_offer_response_body(self, offer, expected_coll_link, expected_offer_type): # type: (Offer, str, Any) -> None - assert offer.properties.get('id') is not None - assert offer.properties.get('_rid') is not None - assert offer.properties.get('_self') is not None - assert offer.properties.get('resource') is not None - assert offer.properties['_self'].find(offer.properties['id']) != -1 - assert expected_coll_link.strip('/') == offer.properties['resource'].strip('/') + assert offer.properties.get("id") is not None + assert offer.properties.get("_rid") is not None + assert offer.properties.get("_self") is not None + assert offer.properties.get("resource") is not None + assert offer.properties["_self"].find(offer.properties["id"]) != -1 + assert expected_coll_link.strip("/") == offer.properties["resource"].strip("/") if expected_offer_type: - assert expected_offer_type == offer.properties.get('offerType') + assert expected_offer_type == offer.properties.get("offerType") async def test_offer_read_and_query_async(self): @@ -2065,7 +1933,7 @@ async def test_offer_read_and_query_async(self): # Read the offer. expected_offer = await collection.get_throughput() collection_properties = await collection.read() - self.__validate_offer_response_body(expected_offer, collection_properties.get('_self'), None) + self.__validate_offer_response_body(expected_offer, collection_properties.get("_self"), None) async def test_offer_replace_async(self): @@ -2073,31 +1941,34 @@ async def test_offer_replace_async(self): # Read Offer expected_offer = await collection.get_throughput() collection_properties = await collection.read() - self.__validate_offer_response_body(expected_offer, collection_properties.get('_self'), None) + self.__validate_offer_response_body(expected_offer, collection_properties.get("_self"), None) # Replace the offer. replaced_offer = await collection.replace_throughput(expected_offer.offer_throughput + 100) collection_properties = await collection.read() - self.__validate_offer_response_body(replaced_offer, collection_properties.get('_self'), None) + self.__validate_offer_response_body(replaced_offer, collection_properties.get("_self"), None) # Check if the replaced offer is what we expect. - assert expected_offer.properties.get('content').get('offerThroughput') + 100 == replaced_offer.properties.get( - 'content').get('offerThroughput') + assert expected_offer.properties.get("content").get("offerThroughput") + 100 == replaced_offer.properties.get( + "content" + ).get("offerThroughput") assert expected_offer.offer_throughput + 100 == replaced_offer.offer_throughput async def test_database_account_functionality_async(self): # Validate database account functionality. database_account = await self.client._get_database_account() - assert database_account.DatabasesLink == '/dbs/' - assert database_account.MediaLink == '/media/' - if (HttpHeaders.MaxMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): - assert database_account.MaxMediaStorageUsageInMB == self.client.client_connection.last_response_headers[ - HttpHeaders.MaxMediaStorageUsageInMB] - if (HttpHeaders.CurrentMediaStorageUsageInMB in - self.client.client_connection.last_response_headers): - assert database_account.CurrentMediaStorageUsageInMB == self.client.client_connection.last_response_headers[ - HttpHeaders.CurrentMediaStorageUsageInMB] - assert database_account.ConsistencyPolicy['defaultConsistencyLevel'] is not None + assert database_account.DatabasesLink == "/dbs/" + assert database_account.MediaLink == "/media/" + if HttpHeaders.MaxMediaStorageUsageInMB in self.client.client_connection.last_response_headers: + assert ( + database_account.MaxMediaStorageUsageInMB + == self.client.client_connection.last_response_headers[HttpHeaders.MaxMediaStorageUsageInMB] + ) + if HttpHeaders.CurrentMediaStorageUsageInMB in self.client.client_connection.last_response_headers: + assert ( + database_account.CurrentMediaStorageUsageInMB + == self.client.client_connection.last_response_headers[HttpHeaders.CurrentMediaStorageUsageInMB] + ) + assert database_account.ConsistencyPolicy["defaultConsistencyLevel"] is not None async def test_index_progress_headers_async(self): @@ -2109,12 +1980,9 @@ async def test_index_progress_headers_async(self): assert HttpHeaders.IndexTransformationProgress in created_db.client_connection.last_response_headers none_coll = await created_db.create_container( - id='test_index_progress_headers none_coll ' + str(uuid.uuid4()), - indexing_policy={ - 'indexingMode': documents.IndexingMode.NoIndex, - 'automatic': False - }, - partition_key=PartitionKey(path="/id", kind='Hash') + id="test_index_progress_headers none_coll " + str(uuid.uuid4()), + indexing_policy={"indexingMode": documents.IndexingMode.NoIndex, "automatic": False}, + partition_key=PartitionKey(path="/id", kind="Hash"), ) created_container = created_db.get_container_client(container=none_coll) await created_container.read(populate_quota_info=True) @@ -2154,59 +2022,60 @@ async def test_get_resource_with_dictionary_and_object_async(self): read_container = created_db.get_container_client(created_properties) assert read_container.id == created_container.id - created_item = await created_container.create_item({'id': '1' + str(uuid.uuid4()), 'pk': 'pk'}, no_response=False) + created_item = await created_container.create_item( + {"id": "1" + str(uuid.uuid4()), "pk": "pk"}, no_response=False + ) # read item with id - read_item = await created_container.read_item(item=created_item['id'], partition_key=created_item['pk']) - assert read_item['id'] == created_item['id'] + read_item = await created_container.read_item(item=created_item["id"], partition_key=created_item["pk"]) + assert read_item["id"] == created_item["id"] # read item with properties - read_item = await created_container.read_item(item=created_item, partition_key=created_item['pk']) - assert read_item['id'], created_item['id'] + read_item = await created_container.read_item(item=created_item, partition_key=created_item["pk"]) + assert read_item["id"], created_item["id"] - created_sproc = await created_container.scripts.create_stored_procedure({ - 'id': 'storedProcedure' + str(uuid.uuid4()), - 'body': 'function () { }' - }) + created_sproc = await created_container.scripts.create_stored_procedure( + {"id": "storedProcedure" + str(uuid.uuid4()), "body": "function () { }"} + ) # read sproc with id - read_sproc = await created_container.scripts.get_stored_procedure(created_sproc['id']) - assert read_sproc['id'] == created_sproc['id'] + read_sproc = await created_container.scripts.get_stored_procedure(created_sproc["id"]) + assert read_sproc["id"] == created_sproc["id"] # read sproc with properties read_sproc = await created_container.scripts.get_stored_procedure(created_sproc) - assert read_sproc['id'] == created_sproc['id'] + assert read_sproc["id"] == created_sproc["id"] - created_trigger = await created_container.scripts.create_trigger({ - 'id': 'sample trigger' + str(uuid.uuid4()), - 'serverScript': 'function() {var x = 10;}', - 'triggerType': documents.TriggerType.Pre, - 'triggerOperation': documents.TriggerOperation.All - }) + created_trigger = await created_container.scripts.create_trigger( + { + "id": "sample trigger" + str(uuid.uuid4()), + "serverScript": "function() {var x = 10;}", + "triggerType": documents.TriggerType.Pre, + "triggerOperation": documents.TriggerOperation.All, + } + ) # read trigger with id - read_trigger = await created_container.scripts.get_trigger(created_trigger['id']) - assert read_trigger['id'] == created_trigger['id'] + read_trigger = await created_container.scripts.get_trigger(created_trigger["id"]) + assert read_trigger["id"] == created_trigger["id"] # read trigger with properties read_trigger = await created_container.scripts.get_trigger(created_trigger) - assert read_trigger['id'] == created_trigger['id'] + assert read_trigger["id"] == created_trigger["id"] - created_udf = await created_container.scripts.create_user_defined_function({ - 'id': 'sample udf' + str(uuid.uuid4()), - 'body': 'function() {var x = 10;}' - }) + created_udf = await created_container.scripts.create_user_defined_function( + {"id": "sample udf" + str(uuid.uuid4()), "body": "function() {var x = 10;}"} + ) # read udf with id - read_udf = await created_container.scripts.get_user_defined_function(created_udf['id']) - assert created_udf['id'] == read_udf['id'] + read_udf = await created_container.scripts.get_user_defined_function(created_udf["id"]) + assert created_udf["id"] == read_udf["id"] # read udf with properties read_udf = await created_container.scripts.get_user_defined_function(created_udf) - assert created_udf['id'] == read_udf['id'] + assert created_udf["id"] == read_udf["id"] - created_user = await created_db.create_user({ - 'id': 'user' + str(uuid.uuid4())}) + created_user = await created_db.create_user({"id": "user" + str(uuid.uuid4())}) # read user with id read_user = created_db.get_user_client(created_user.id) @@ -2221,12 +2090,14 @@ async def test_get_resource_with_dictionary_and_object_async(self): read_user = created_db.get_user_client(created_user_properties) assert read_user.id == created_user.id - created_permission = await created_user.create_permission({ - 'id': 'all permission' + str(uuid.uuid4()), - 'permissionMode': documents.PermissionMode.All, - 'resource': created_container.container_link, - 'resourcePartitionKey': [1] - }) + created_permission = await created_user.create_permission( + { + "id": "all permission" + str(uuid.uuid4()), + "permissionMode": documents.PermissionMode.All, + "resource": created_container.container_link, + "resourcePartitionKey": [1], + } + ) # read permission with id read_permission = await created_user.get_permission(created_permission.id) @@ -2240,7 +2111,6 @@ async def test_get_resource_with_dictionary_and_object_async(self): read_permission = await created_user.get_permission(created_permission.properties) assert read_permission.id == created_permission.id - async def test_delete_all_items_by_partition_key_async(self): # enable the test only for the emulator if "localhost" not in self.host and "127.0.0.1" not in self.host: @@ -2250,8 +2120,8 @@ async def test_delete_all_items_by_partition_key_async(self): # create container created_collection = await created_db.create_container( - id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/pk', kind='Hash') + id="test_delete_all_items_by_partition_key " + str(uuid.uuid4()), + partition_key=PartitionKey(path="/pk", kind="Hash"), ) # Create two partition keys partition_key1 = "{}-{}".format("Partition Key 1", str(uuid.uuid4())) @@ -2259,14 +2129,14 @@ async def test_delete_all_items_by_partition_key_async(self): # add items for partition key 1 for i in range(1, 3): - newDoc = await created_collection.upsert_item( - dict(id="item{}".format(i), pk=partition_key1) - ) + newDoc = await created_collection.upsert_item(dict(id="item{}".format(i), pk=partition_key1)) self.assertDictEqual(newDoc, {}) # add items for partition key 2 - pk2_item = await created_collection.upsert_item(dict(id="item{}".format(3), pk=partition_key2), no_response=False) - + pk2_item = await created_collection.upsert_item( + dict(id="item{}".format(3), pk=partition_key2), no_response=False + ) + # delete all items for partition key 1 await created_collection.delete_all_items_by_partition_key(partition_key1) @@ -2298,11 +2168,10 @@ async def test_patch_operations_async(self): "id": item_id, "pk": "patch_item_pk", "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } await created_container.create_item(item) # Define and run patch operations operations = [ @@ -2311,10 +2180,11 @@ async def test_patch_operations_async(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] - patched_item = await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + patched_item = await created_container.patch_item( + item=item_id, partition_key="patch_item_pk", patch_operations=operations + ) # Verify results from patch operations self.assertDictEqual(patched_item, {}) patched_item = await created_container.read_item(item=item_id, partition_key="patch_item_pk") @@ -2329,32 +2199,28 @@ async def test_patch_operations_async(self): # Negative test - attempt to replace non-existent field operations = [{"op": "replace", "path": "/wrong_field", "value": "wrong_value"}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST # Negative test - attempt to remove non-existent field operations = [{"op": "remove", "path": "/wrong_field"}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST # Negative test - attempt to increment non-number field operations = [{"op": "incr", "path": "/company", "value": 3}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST # Negative test - attempt to move from non-existent field operations = [{"op": "move", "from": "/wrong_field", "path": "/other_field"}] try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations) + await created_container.patch_item(item=item_id, partition_key="patch_item_pk", patch_operations=operations) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST @@ -2367,13 +2233,12 @@ async def test_conditional_patching_async(self): "id": item_id, "pk": "patch_item_pk", "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } newDoc = await created_container.create_item(item) - self.assertDictEqual(newDoc,{}) + self.assertDictEqual(newDoc, {}) # Define patch operations operations = [ @@ -2382,25 +2247,29 @@ async def test_conditional_patching_async(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] # Run patch operations with wrong filter num_false = item.get("number") + 1 filter_predicate = "from root where root.number = " + str(num_false) try: - await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations, filter_predicate=filter_predicate) + await created_container.patch_item( + item=item_id, + partition_key="patch_item_pk", + patch_operations=operations, + filter_predicate=filter_predicate, + ) except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.PRECONDITION_FAILED # Run patch operations with correct filter filter_predicate = "from root where root.number = " + str(item.get("number")) - patched_item = await created_container.patch_item(item=item_id, partition_key="patch_item_pk", - patch_operations=operations, - filter_predicate=filter_predicate) + patched_item = await created_container.patch_item( + item=item_id, partition_key="patch_item_pk", patch_operations=operations, filter_predicate=filter_predicate + ) # Verify results from patch operations - self.assertDictEqual(patched_item,{}) + self.assertDictEqual(patched_item, {}) patched_item = await created_container.read_item(item=item_id, partition_key="patch_item_pk") assert patched_item is not {} assert patched_item.get("color") is None @@ -2423,7 +2292,7 @@ async def test_conditional_patching_async(self): # created_recorder = RecordDiagnostics() # created_collection = created_db.create_container(id=collection_id, # indexing_policy=collection_indexing_policy, - # partition_key=PartitionKey(path="/pk", kind="Hash"), + # partition_key=PartitionKey(path="/pk", kind="Hash"), # response_hook=created_recorder) # properties = created_collection.read() # ttl_key = "analyticalStorageTtl" @@ -2441,7 +2310,7 @@ async def test_conditional_patching_async(self): # created_collection = created_db.create_container(id=collection_id, # analytical_storage_ttl=-1, # indexing_policy=collection_indexing_policy, - # partition_key=PartitionKey(path="/pk", kind="Hash"), + # partition_key=PartitionKey(path="/pk", kind="Hash"), # response_hook=created_recorder) # properties = created_collection.read() # ttl_key = "analyticalStorageTtl" @@ -2491,8 +2360,9 @@ async def test_priority_level_async(self): async def priority_mock_execute_function(function, *args, **kwargs): if args: - priority_headers.append(args[4].headers[HttpHeaders.PriorityLevel] - if HttpHeaders.PriorityLevel in args[4].headers else '') + priority_headers.append( + args[4].headers[HttpHeaders.PriorityLevel] if HttpHeaders.PriorityLevel in args[4].headers else "" + ) return await self.OriginalExecuteFunction(function, *args, **kwargs) _retry_utility_async.ExecuteFunctionAsync = priority_mock_execute_function @@ -2510,8 +2380,9 @@ async def priority_mock_execute_function(function, *args, **kwargs): item2_read = await created_container.read_item("item2", "pk2", priority="Low") assert priority_headers[-1] == "Low" # repeat for query - query = [doc async for doc in created_container.query_items("Select * from c", - partition_key="pk1", priority="High")] + query = [ + doc async for doc in created_container.query_items("Select * from c", partition_key="pk1", priority="High") + ] assert priority_headers[-1] == "High" @@ -2529,5 +2400,5 @@ async def _mock_execute_function(self, function, *args, **kwargs): return await self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition.py b/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition.py index a7bd88a35253..627146aee526 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition.py @@ -2,8 +2,7 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" import time import unittest @@ -41,10 +40,11 @@ def send(self, *args, **kwargs): response = RequestsTransportResponse(None, output) return response + @pytest.mark.cosmosLong class TestSubpartitionCrud(unittest.TestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" + configs = test_config.TestConfig host = configs.host masterKey = configs.masterKey @@ -61,18 +61,18 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.databaseForTest = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) @@ -81,74 +81,76 @@ def test_collection_crud_subpartition(self): collections = list(created_db.list_containers()) # create a collection before_create_collections_count = len(collections) - collection_id = 'test_collection_crud_MH ' + str(uuid.uuid4()) - collection_indexing_policy = {'indexingMode': 'consistent'} - created_collection = created_db.create_container(id=collection_id, - indexing_policy=collection_indexing_policy, - partition_key=PartitionKey(path=["/pk1", "/pk2", "/pk3"], - kind="MultiHash")) + collection_id = "test_collection_crud_MH " + str(uuid.uuid4()) + collection_indexing_policy = {"indexingMode": "consistent"} + created_collection = created_db.create_container( + id=collection_id, + indexing_policy=collection_indexing_policy, + partition_key=PartitionKey(path=["/pk1", "/pk2", "/pk3"], kind="MultiHash"), + ) self.assertEqual(collection_id, created_collection.id) created_properties = created_collection.read() - self.assertEqual('consistent', created_properties['indexingPolicy']['indexingMode']) + self.assertEqual("consistent", created_properties["indexingPolicy"]["indexingMode"]) # read collections after creation collections = list(created_db.list_containers()) - self.assertEqual(len(collections), - before_create_collections_count + 1, - 'create should increase the number of collections') + self.assertEqual( + len(collections), before_create_collections_count + 1, "create should increase the number of collections" + ) # query collections - collections = list(created_db.query_containers( - { - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': collection_id} - ] - })) + collections = list( + created_db.query_containers( + { + "query": "SELECT * FROM root r WHERE r.id=@id", + "parameters": [{"name": "@id", "value": collection_id}], + } + ) + ) self.assertTrue(collections) # delete collection created_db.delete_container(created_collection.id) # read collection after deletion created_container = created_db.get_container_client(created_collection.id) - self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, - created_container.read) + self.__AssertHTTPFailureWithStatus(StatusCodes.NOT_FOUND, created_container.read) - container_proxy = created_db.create_container(id=created_collection.id, - partition_key=PartitionKey(path= - ["/id1", "/id2", "/id3"], - kind='MultiHash')) + container_proxy = created_db.create_container( + id=created_collection.id, partition_key=PartitionKey(path=["/id1", "/id2", "/id3"], kind="MultiHash") + ) self.assertEqual(created_collection.id, container_proxy.id) container_properties = container_proxy._get_properties() - self.assertDictEqual(PartitionKey(path=["/id1", "/id2", "/id3"], kind='MultiHash'), - container_properties['partitionKey']) + self.assertDictEqual( + PartitionKey(path=["/id1", "/id2", "/id3"], kind="MultiHash"), container_properties["partitionKey"] + ) created_db.delete_container(created_collection.id) def test_partitioned_collection_subpartition(self): created_db = self.databaseForTest - collection_definition = {'id': 'test_partitioned_collection_MH ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id', '/pk'], - 'kind': documents.PartitionKind.MultiHash, - 'version': 2 - } - } + collection_definition = { + "id": "test_partitioned_collection_MH " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/id", "/pk"], "kind": documents.PartitionKind.MultiHash, "version": 2}, + } offer_throughput = 10100 - created_collection = created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition['partitionKey'], - offer_throughput=offer_throughput) + created_collection = created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition["partitionKey"], + offer_throughput=offer_throughput, + ) - self.assertEqual(collection_definition.get('id'), created_collection.id) + self.assertEqual(collection_definition.get("id"), created_collection.id) created_collection_properties = created_collection.read() - self.assertEqual(collection_definition.get('partitionKey').get('paths'), - created_collection_properties['partitionKey']['paths']) - self.assertEqual(collection_definition.get('partitionKey').get('kind'), - created_collection_properties['partitionKey']['kind']) + self.assertEqual( + collection_definition.get("partitionKey").get("paths"), + created_collection_properties["partitionKey"]["paths"], + ) + self.assertEqual( + collection_definition.get("partitionKey").get("kind"), created_collection_properties["partitionKey"]["kind"] + ) expected_offer = created_collection.get_throughput() @@ -157,35 +159,39 @@ def test_partitioned_collection_subpartition(self): self.assertEqual(expected_offer.offer_throughput, offer_throughput) # Negative test, check that user can't make a subpartition higher than 3 levels - collection_definition2 = {'id': 'test_partitioned_collection2_MH ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id', '/pk', '/id2', "/pk2"], - 'kind': documents.PartitionKind.MultiHash, - 'version': 2 - } - } + collection_definition2 = { + "id": "test_partitioned_collection2_MH " + str(uuid.uuid4()), + "partitionKey": { + "paths": ["/id", "/pk", "/id2", "/pk2"], + "kind": documents.PartitionKind.MultiHash, + "version": 2, + }, + } try: - created_collection = created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition2['partitionKey'], - offer_throughput=offer_throughput) + created_collection = created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition2["partitionKey"], + offer_throughput=offer_throughput, + ) except exceptions.CosmosHttpResponseError as error: self.assertEqual(error.status_code, StatusCodes.BAD_REQUEST) self.assertTrue("Too many partition key paths" in error.message) # Negative Test: Check if user tries to create multihash container while defining single hash - collection_definition3 = {'id': 'test_partitioned_collection2_MH ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id', '/pk', '/id2', "/pk2"], - 'kind': documents.PartitionKind.Hash, - 'version': 2 - } - } + collection_definition3 = { + "id": "test_partitioned_collection2_MH " + str(uuid.uuid4()), + "partitionKey": { + "paths": ["/id", "/pk", "/id2", "/pk2"], + "kind": documents.PartitionKind.Hash, + "version": 2, + }, + } try: - created_collection = created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition3['partitionKey'], - offer_throughput=offer_throughput) + created_collection = created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition3["partitionKey"], + offer_throughput=offer_throughput, + ) except exceptions.CosmosHttpResponseError as error: self.assertEqual(error.status_code, StatusCodes.BAD_REQUEST) self.assertTrue("Too many partition key paths" in error.message) @@ -194,19 +200,18 @@ def test_partitioned_collection_subpartition(self): def test_partitioned_collection_partition_key_extraction_subpartition(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_extraction_MH ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_MH " + str(uuid.uuid4()) created_collection = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/address/state', '/address/city'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey( + path=["/address/state", "/address/city"], kind=documents.PartitionKind.MultiHash + ), ) - document_definition = {'id': 'document1', - 'address': {'street': '1 Microsoft Way', - 'city': 'Redmond', - 'state': 'WA', - 'zip code': 98052 - } - } + document_definition = { + "id": "document1", + "address": {"street": "1 Microsoft Way", "city": "Redmond", "state": "WA", "zip code": 98052}, + } self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -216,14 +221,15 @@ def test_partitioned_collection_partition_key_extraction_subpartition(self): self.assertEqual(self.last_headers[0], '["WA","Redmond"]') del self.last_headers[:] - self.assertEqual(created_document.get('id'), document_definition.get('id')) - self.assertEqual(created_document.get('address').get('state'), document_definition.get('address').get('state')) + self.assertEqual(created_document.get("id"), document_definition.get("id")) + self.assertEqual(created_document.get("address").get("state"), document_definition.get("address").get("state")) - collection_id = 'test_partitioned_collection_partition_key_extraction_MH_2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_MH_2 " + str(uuid.uuid4()) created_collection2 = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/address/state/city', '/address/city/state'], - kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey( + path=["/address/state/city", "/address/city/state"], kind=documents.PartitionKind.MultiHash + ), ) self.OriginalExecuteFunction = _retry_utility.ExecuteFunction @@ -233,7 +239,7 @@ def test_partitioned_collection_partition_key_extraction_subpartition(self): created_document = created_collection2.create_item(document_definition) _retry_utility.ExecuteFunction = self.OriginalExecuteFunction del self.last_headers[:] - self.fail('Operation Should Fail.') + self.fail("Operation Should Fail.") except exceptions.CosmosHttpResponseError as error: self.assertEqual(error.status_code, StatusCodes.BAD_REQUEST) self.assertEqual(error.sub_status, SubStatusCodes.PARTITION_KEY_MISMATCH) @@ -245,18 +251,20 @@ def test_partitioned_collection_partition_key_extraction_subpartition(self): def test_partitioned_collection_partition_key_extraction_special_chars_subpartition(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars_MH_1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars_MH_1 " + str(uuid.uuid4()) created_collection1 = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/\"first level\' 1*()\"/\"le/vel2\"', - '/\"second level\' 1*()\"/\"le/vel2\"'], - kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey( + path=['/"first level\' 1*()"/"le/vel2"', '/"second level\' 1*()"/"le/vel2"'], + kind=documents.PartitionKind.MultiHash, + ), ) - document_definition = {'id': 'document1', - "first level' 1*()": {"le/vel2": 'val1'}, - "second level' 1*()": {"le/vel2": 'val2'} - } + document_definition = { + "id": "document1", + "first level' 1*()": {"le/vel2": "val1"}, + "second level' 1*()": {"le/vel2": "val2"}, + } self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction created_document = created_collection1.create_item(body=document_definition) @@ -265,25 +273,26 @@ def test_partitioned_collection_partition_key_extraction_special_chars_subpartit del self.last_headers[:] collection_definition2 = { - 'id': 'test_partitioned_collection_partition_key_extraction_special_chars_MH_2 ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/\'first level\" 1*()\'/\'first le/vel2\'', - '/\'second level\" 1*()\'/\'second le/vel2\''], - 'kind': documents.PartitionKind.MultiHash - } + "id": "test_partitioned_collection_partition_key_extraction_special_chars_MH_2 " + str(uuid.uuid4()), + "partitionKey": { + "paths": ["/'first level\" 1*()'/'first le/vel2'", "/'second level\" 1*()'/'second le/vel2'"], + "kind": documents.PartitionKind.MultiHash, + }, } created_collection2 = created_db.create_container( - id=collection_definition2['id'], - partition_key=PartitionKey(path=collection_definition2["partitionKey"]["paths"] - , kind=collection_definition2["partitionKey"]["kind"]) + id=collection_definition2["id"], + partition_key=PartitionKey( + path=collection_definition2["partitionKey"]["paths"], + kind=collection_definition2["partitionKey"]["kind"], + ), ) - document_definition = {'id': 'document2', - 'first level\" 1*()': {'first le/vel2': 'val3'}, - 'second level\" 1*()': {'second le/vel2': 'val4'} - } + document_definition = { + "id": "document2", + 'first level" 1*()': {"first le/vel2": "val3"}, + 'second level" 1*()': {"second le/vel2": "val4"}, + } self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction @@ -299,111 +308,113 @@ def test_partitioned_collection_partition_key_extraction_special_chars_subpartit def test_partitioned_collection_document_crud_and_query_subpartition(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_document_crud_and_query_MH ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_document_crud_and_query_MH " + str(uuid.uuid4()) created_collection = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/city', '/zipcode'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey(path=["/city", "/zipcode"], kind=documents.PartitionKind.MultiHash), ) - document_definition = {'id': 'document', - 'key': 'value', - 'city': 'Redmond', - 'zipcode': '98052'} + document_definition = {"id": "document", "key": "value", "city": "Redmond", "zipcode": "98052"} - created_document = created_collection.create_item( - body=document_definition - ) + created_document = created_collection.create_item(body=document_definition) - self.assertEqual(created_document.get('id'), document_definition.get('id')) - self.assertEqual(created_document.get('key'), document_definition.get('key')) - self.assertEqual(created_document.get('city'), document_definition.get('city')) - self.assertEqual(created_document.get('zipcode'), document_definition.get('zipcode')) + self.assertEqual(created_document.get("id"), document_definition.get("id")) + self.assertEqual(created_document.get("key"), document_definition.get("key")) + self.assertEqual(created_document.get("city"), document_definition.get("city")) + self.assertEqual(created_document.get("zipcode"), document_definition.get("zipcode")) # read document read_document = created_collection.read_item( - item=created_document.get('id'), - partition_key=[created_document.get('city'), created_document.get('zipcode')] + item=created_document.get("id"), + partition_key=[created_document.get("city"), created_document.get("zipcode")], ) - self.assertEqual(read_document.get('id'), created_document.get('id')) - self.assertEqual(read_document.get('key'), created_document.get('key')) - self.assertEqual(read_document.get('city'), created_document.get('city')) - self.assertEqual(read_document.get('zipcode'), created_document.get('zipcode')) + self.assertEqual(read_document.get("id"), created_document.get("id")) + self.assertEqual(read_document.get("key"), created_document.get("key")) + self.assertEqual(read_document.get("city"), created_document.get("city")) + self.assertEqual(read_document.get("zipcode"), created_document.get("zipcode")) # Read document feed doesn't require partitionKey as it's always a cross partition query documentlist = list(created_collection.read_all_items()) self.assertEqual(1, len(documentlist)) # replace document - document_definition['key'] = 'new value' + document_definition["key"] = "new value" - replaced_document = created_collection.replace_item( - item=read_document, - body=document_definition - ) + replaced_document = created_collection.replace_item(item=read_document, body=document_definition) - self.assertEqual(replaced_document.get('key'), document_definition.get('key')) + self.assertEqual(replaced_document.get("key"), document_definition.get("key")) # upsert document(create scenario) - document_definition['id'] = 'document2' - document_definition['key'] = 'value2' - document_definition['city'] = 'Atlanta' - document_definition['zipcode'] = '30363' + document_definition["id"] = "document2" + document_definition["key"] = "value2" + document_definition["city"] = "Atlanta" + document_definition["zipcode"] = "30363" upserted_document = created_collection.upsert_item(body=document_definition) - self.assertEqual(upserted_document.get('id'), document_definition.get('id')) - self.assertEqual(upserted_document.get('key'), document_definition.get('key')) - self.assertEqual(upserted_document.get('city'), document_definition.get('city')) - self.assertEqual(upserted_document.get('zipcode'), document_definition.get('zipcode')) + self.assertEqual(upserted_document.get("id"), document_definition.get("id")) + self.assertEqual(upserted_document.get("key"), document_definition.get("key")) + self.assertEqual(upserted_document.get("city"), document_definition.get("city")) + self.assertEqual(upserted_document.get("zipcode"), document_definition.get("zipcode")) documentlist = list(created_collection.read_all_items()) self.assertEqual(2, len(documentlist)) # delete document - created_collection.delete_item(item=upserted_document, partition_key=[upserted_document.get('city'), - upserted_document.get('zipcode')]) + created_collection.delete_item( + item=upserted_document, partition_key=[upserted_document.get("city"), upserted_document.get("zipcode")] + ) # query document on the partition key specified in the predicate will pass even without setting # enableCrossPartitionQuery or passing in the partitionKey value - documentlist = list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.city=\'' + replaced_document.get( - 'city') + '\' and r.zipcode=\'' + replaced_document.get('zipcode') + '\'' - # pylint: disable=line-too-long - })) + documentlist = list( + created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.city='" + + replaced_document.get("city") + + "' and r.zipcode='" + + replaced_document.get("zipcode") + + "'" + # pylint: disable=line-too-long + } + ) + ) self.assertEqual(1, len(documentlist)) # query document on any property other than partitionKey will fail without setting enableCrossPartitionQuery # or passing in the partitionKey value try: - list(created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'' # nosec - })) + list( + created_collection.query_items( + {"query": "SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'"} # nosec + ) + ) except Exception: pass # cross partition query - documentlist = list(created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - enable_cross_partition_query=True - )) + documentlist = list( + created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + enable_cross_partition_query=True, + ) + ) self.assertEqual(1, len(documentlist)) # query document by providing the partitionKey value - documentlist = list(created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - partition_key=[replaced_document.get('city'), replaced_document.get('zipcode')] - )) + documentlist = list( + created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + partition_key=[replaced_document.get("city"), replaced_document.get("zipcode")], + ) + ) self.assertEqual(1, len(documentlist)) # Using incomplete extracted partition key in item body - incomplete_document = {'id': 'document3', - 'key': 'value3', - 'city': 'Vancouver'} + incomplete_document = {"id": "document3", "key": "value3", "city": "Vancouver"} try: created_collection.create_item(body=incomplete_document) @@ -421,23 +432,20 @@ def test_partitioned_collection_document_crud_and_query_subpartition(self): self.assertEqual(error.sub_status, SubStatusCodes.PARTITION_KEY_MISMATCH) # using mix value types for partition key - doc_mixed_types = {'id': "doc4", - 'key': 'value4', - 'city': None, - 'zipcode': 1000} + doc_mixed_types = {"id": "doc4", "key": "value4", "city": None, "zipcode": 1000} created_mixed_type_doc = created_collection.create_item(body=doc_mixed_types) - self.assertEqual(doc_mixed_types.get('city'), created_mixed_type_doc.get('city')) - self.assertEqual(doc_mixed_types.get('zipcode'), created_mixed_type_doc.get('zipcode')) + self.assertEqual(doc_mixed_types.get("city"), created_mixed_type_doc.get("city")) + self.assertEqual(doc_mixed_types.get("zipcode"), created_mixed_type_doc.get("zipcode")) created_db.delete_container(collection_id) def test_partitioned_collection_prefix_partition_query_subpartition(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_partition_key_prefix_query_MH ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_prefix_query_MH " + str(uuid.uuid4()) created_collection = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/state', '/city', '/zipcode'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind=documents.PartitionKind.MultiHash), ) item_values = [ @@ -450,138 +458,86 @@ def test_partitioned_collection_prefix_partition_query_subpartition(self): ["CA", "Ojai", "93023"], # cspell:disable-line ["CA", "Port Hueneme", "93041"], # cspell:disable-line ["WA", "Seattle", "98101"], - ["WA", "Bellevue", "98004"] + ["WA", "Bellevue", "98004"], ] - document_definitions = [{'id': 'document1', - 'state': item_values[0][0], - 'city': item_values[0][1], - 'zipcode': item_values[0][2] - }, - {'id': 'document2', - 'state': item_values[1][0], - 'city': item_values[1][1], - 'zipcode': item_values[1][2] - }, - {'id': 'document3', - 'state': item_values[2][0], - 'city': item_values[2][1], - 'zipcode': item_values[2][2] - }, - {'id': 'document4', - 'state': item_values[3][0], - 'city': item_values[3][1], - 'zipcode': item_values[3][2] - }, - {'id': 'document5', - 'state': item_values[4][0], - 'city': item_values[4][1], - 'zipcode': item_values[4][2] - }, - {'id': 'document6', - 'state': item_values[5][0], - 'city': item_values[5][1], - 'zipcode': item_values[5][2] - }, - {'id': 'document7', - 'state': item_values[6][0], - 'city': item_values[6][1], - 'zipcode': item_values[6][2] - }, - {'id': 'document8', - 'state': item_values[7][0], - 'city': item_values[7][1], - 'zipcode': item_values[7][2] - }, - {'id': 'document9', - 'state': item_values[8][0], - 'city': item_values[8][1], - 'zipcode': item_values[8][2] - }, - {'id': 'document10', - 'state': item_values[9][0], - 'city': item_values[9][1], - 'zipcode': item_values[9][2] - } - ] + document_definitions = [ + {"id": "document1", "state": item_values[0][0], "city": item_values[0][1], "zipcode": item_values[0][2]}, + {"id": "document2", "state": item_values[1][0], "city": item_values[1][1], "zipcode": item_values[1][2]}, + {"id": "document3", "state": item_values[2][0], "city": item_values[2][1], "zipcode": item_values[2][2]}, + {"id": "document4", "state": item_values[3][0], "city": item_values[3][1], "zipcode": item_values[3][2]}, + {"id": "document5", "state": item_values[4][0], "city": item_values[4][1], "zipcode": item_values[4][2]}, + {"id": "document6", "state": item_values[5][0], "city": item_values[5][1], "zipcode": item_values[5][2]}, + {"id": "document7", "state": item_values[6][0], "city": item_values[6][1], "zipcode": item_values[6][2]}, + {"id": "document8", "state": item_values[7][0], "city": item_values[7][1], "zipcode": item_values[7][2]}, + {"id": "document9", "state": item_values[8][0], "city": item_values[8][1], "zipcode": item_values[8][2]}, + {"id": "document10", "state": item_values[9][0], "city": item_values[9][1], "zipcode": item_values[9][2]}, + ] created_documents = [] for document_definition in document_definitions: - created_documents.append(created_collection.create_item( - body=document_definition)) + created_documents.append(created_collection.create_item(body=document_definition)) self.assertEqual(len(created_documents), len(document_definitions)) # Query all documents should return all items - document_list = list(created_collection.query_items(query='Select * from c', enable_cross_partition_query=True)) + document_list = list(created_collection.query_items(query="Select * from c", enable_cross_partition_query=True)) self.assertEqual(len(document_list), len(document_definitions)) # Query all items with only CA for 1st level. Should return only 8 items instead of 10 - document_list = list(created_collection.query_items(query='Select * from c', partition_key=['CA'])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=["CA"])) self.assertEqual(8, len(document_list)) # Query all items with CA for 1st level and Oxnard for second level. Should only return 3 items - document_list = list(created_collection.query_items(query='Select * from c', partition_key=['CA', 'Oxnard'])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=["CA", "Oxnard"])) self.assertEqual(3, len(document_list)) # Query for specific zipcode using 1st level of partition key value only: - document_list = list(created_collection.query_items(query='Select * from c where c.zipcode = "93033"', - partition_key=['CA'])) + document_list = list( + created_collection.query_items(query='Select * from c where c.zipcode = "93033"', partition_key=["CA"]) + ) self.assertEqual(1, len(document_list)) # Query Should work with None values: - document_list = list(created_collection.query_items(query='Select * from c', partition_key=[None, '93033'])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=[None, "93033"])) self.assertEqual(0, len(document_list)) # Query Should Work with non string values - document_list = list(created_collection.query_items(query='Select * from c', partition_key=[0xFF, 0xFF])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=[0xFF, 0xFF])) self.assertEqual(0, len(document_list)) - document_list = list(created_collection.query_items(query='Select * from c', partition_key=[None, None])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=[None, None])) self.assertEqual(0, len(document_list)) - document_list = list(created_collection.query_items(query='Select * from c', partition_key=["", ""])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=["", ""])) self.assertEqual(0, len(document_list)) - document_list = list(created_collection.query_items(query='Select * from c', partition_key=[""])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=[""])) self.assertEqual(0, len(document_list)) # Negative Test, prefix query should not work if no partition is given (empty list is given) try: - document_list = list(created_collection.query_items(query='Select * from c', partition_key=[])) + document_list = list(created_collection.query_items(query="Select * from c", partition_key=[])) self.fail("Test did not fail as expected") except exceptions.CosmosHttpResponseError as error: self.assertEqual(error.status_code, StatusCodes.BAD_REQUEST) - self.assertTrue("Cross partition query is required but disabled" - in error.message) + self.assertTrue("Cross partition query is required but disabled" in error.message) def test_partition_key_range_overlap_subpartition(self): - Id = 'id' - MinInclusive = 'minInclusive' - MaxExclusive = 'maxExclusive' - partitionKeyRanges = \ - [ - ({Id: "2", - MinInclusive: "0000000050", - MaxExclusive: "0000000070"}, - 2), - ({Id: "0", - MinInclusive: "", - MaxExclusive: "0000000030"}, - 0), - ({Id: "1", - MinInclusive: "0000000030", - MaxExclusive: "0000000050"}, - 1), - ({Id: "3", - MinInclusive: "0000000070", - MaxExclusive: "FF"}, - 3) - ] + Id = "id" + MinInclusive = "minInclusive" + MaxExclusive = "maxExclusive" + partitionKeyRanges = [ + ({Id: "2", MinInclusive: "0000000050", MaxExclusive: "0000000070"}, 2), + ({Id: "0", MinInclusive: "", MaxExclusive: "0000000030"}, 0), + ({Id: "1", MinInclusive: "0000000030", MaxExclusive: "0000000050"}, 1), + ({Id: "3", MinInclusive: "0000000070", MaxExclusive: "FF"}, 3), + ] crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") # Case 1: EPK range matches a single entire physical partition - EPK_range_1 = routing_range.Range(range_min="0000000030", range_max="0000000050", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_1 = routing_range.Range( + range_min="0000000030", range_max="0000000050", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_1 = crm.get_overlapping_ranges([EPK_range_1]) # Should only have 1 over lapping range self.assertEqual(len(over_lapping_ranges_1), 1) @@ -594,8 +550,9 @@ def test_partition_key_range_overlap_subpartition(self): # Case 2: EPK range is a sub range of a single physical partition - EPK_range_2 = routing_range.Range(range_min="0000000035", range_max="0000000045", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_2 = routing_range.Range( + range_min="0000000035", range_max="0000000045", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_2 = crm.get_overlapping_ranges([EPK_range_2]) # Should only have 1 over lapping range self.assertEqual(len(over_lapping_ranges_2), 1) @@ -608,8 +565,9 @@ def test_partition_key_range_overlap_subpartition(self): # Case 3: EPK range partially spans 2 physical partitions - EPK_range_3 = routing_range.Range(range_min="0000000035", range_max="0000000055", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_3 = routing_range.Range( + range_min="0000000035", range_max="0000000055", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_3 = crm.get_overlapping_ranges([EPK_range_3]) # Should overlap exactly two partition ranges self.assertEqual(len(over_lapping_ranges_3), 2) @@ -626,8 +584,9 @@ def test_partition_key_range_overlap_subpartition(self): # Case 4: EPK range spans multiple physical partitions, including entire physical partitions - EPK_range_4 = routing_range.Range(range_min="0000000020", range_max="0000000060", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_4 = routing_range.Range( + range_min="0000000020", range_max="0000000060", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_4 = crm.get_overlapping_ranges([EPK_range_4]) # should overlap 3 partitions self.assertEqual(len(over_lapping_ranges_4), 3) @@ -653,23 +612,21 @@ def test_partition_key_range_overlap_subpartition(self): def test_partitioned_collection_query_with_tuples_subpartition(self): created_db = self.databaseForTest - collection_id = 'test_partitioned_collection_query_with_tuples_MH ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_query_with_tuples_MH " + str(uuid.uuid4()) created_collection = created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/state', '/city', '/zipcode'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind=documents.PartitionKind.MultiHash), ) - document_definition = {'id': 'document1', - 'state': 'CA', - 'city': 'Oxnard', - 'zipcode': '93033'} + document_definition = {"id": "document1", "state": "CA", "city": "Oxnard", "zipcode": "93033"} created_document = created_collection.create_item(body=document_definition) - self.assertEqual(created_document.get('id'), document_definition.get('id')) + self.assertEqual(created_document.get("id"), document_definition.get("id")) # Query using tuple instead of list document_list = list( - created_collection.query_items(query='Select * from c', partition_key=('CA', 'Oxnard', '93033'))) + created_collection.query_items(query="Select * from c", partition_key=("CA", "Oxnard", "93033")) + ) self.assertEqual(1, len(document_list)) created_db.delete_container(created_collection.id) @@ -722,14 +679,15 @@ def test_partitioned_collection_query_with_tuples_subpartition(self): def _MockExecuteFunction(self, function, *args, **kwargs): try: - self.last_headers.append(args[4].headers[HttpHeaders.PartitionKey] - if HttpHeaders.PartitionKey in args[4].headers else '') + self.last_headers.append( + args[4].headers[HttpHeaders.PartitionKey] if HttpHeaders.PartitionKey in args[4].headers else "" + ) except IndexError: - self.last_headers.append('') + self.last_headers.append("") return self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: diff --git a/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition_async.py b/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition_async.py index bcccc4735c63..0c4db3965803 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_crud_subpartition_async.py @@ -2,8 +2,8 @@ # The MIT License (MIT) # Copyright (c) Microsoft Corporation. All rights reserved. -"""End-to-end test. -""" +"""End-to-end test.""" + import time import unittest import uuid @@ -45,8 +45,7 @@ async def send(self, *args, **kwargs): @pytest.mark.cosmosLong class TestSubpartitionCrudAsync(unittest.IsolatedAsyncioTestCase): - """Python CRUD Tests. - """ + """Python CRUD Tests.""" configs = test_config.TestConfig host = configs.host @@ -70,12 +69,12 @@ async def __assert_http_failure_with_status(self, status_code, func, *args, **kw @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -90,78 +89,79 @@ async def test_collection_crud_subpartition_async(self): collections = [collection async for collection in created_db.list_containers()] # create a collection before_create_collections_count = len(collections) - collection_id = 'test_collection_crud ' + str(uuid.uuid4()) - collection_indexing_policy = {'indexingMode': 'consistent'} + collection_id = "test_collection_crud " + str(uuid.uuid4()) + collection_indexing_policy = {"indexingMode": "consistent"} created_recorder = RecordDiagnostics() - created_collection = await created_db.create_container(id=collection_id, - indexing_policy=collection_indexing_policy, - partition_key=PartitionKey(path=["/pk1", "/pk2"], - kind="MultiHash"), - response_hook=created_recorder) + created_collection = await created_db.create_container( + id=collection_id, + indexing_policy=collection_indexing_policy, + partition_key=PartitionKey(path=["/pk1", "/pk2"], kind="MultiHash"), + response_hook=created_recorder, + ) assert collection_id == created_collection.id assert isinstance(created_recorder.headers, Mapping) - assert 'Content-Type' in created_recorder.headers + assert "Content-Type" in created_recorder.headers assert isinstance(created_recorder.body, Mapping) - assert 'id' in created_recorder.body + assert "id" in created_recorder.body created_properties = await created_collection.read() - assert 'consistent' == created_properties['indexingPolicy']['indexingMode'] + assert "consistent" == created_properties["indexingPolicy"]["indexingMode"] # read collections after creation collections = [collection async for collection in created_db.list_containers()] assert len(collections) == before_create_collections_count + 1 # query collections - collections = [collection async for collection in created_db.query_containers( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[ - {'name': '@id', 'value': collection_id} - ] - )] + collections = [ + collection + async for collection in created_db.query_containers( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": collection_id}] + ) + ] assert collections is not None # delete collection await created_db.delete_container(created_collection.id) # read collection after deletion created_container = created_db.get_container_client(created_collection.id) - await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, - created_container.read) - - container_proxy = await created_db.create_container(id=created_collection.id, - partition_key=PartitionKey(path=['/id1', - '/id2', - '/id3'], - kind='MultiHash')) + await self.__assert_http_failure_with_status(StatusCodes.NOT_FOUND, created_container.read) + + container_proxy = await created_db.create_container( + id=created_collection.id, partition_key=PartitionKey(path=["/id1", "/id2", "/id3"], kind="MultiHash") + ) assert created_collection.id == container_proxy.id container_proxy_properties = await container_proxy._get_properties() - assert PartitionKey(path=["/id1", "/id2", "/id3"], kind='MultiHash') == container_proxy_properties[ - 'partitionKey'] + assert ( + PartitionKey(path=["/id1", "/id2", "/id3"], kind="MultiHash") == container_proxy_properties["partitionKey"] + ) await created_db.delete_container(created_collection.id) async def test_partitioned_collection_subpartition_async(self): created_db = self.database_for_test - collection_definition = {'id': 'test_partitioned_collection ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id', '/pk'], - 'kind': documents.PartitionKind.MultiHash, - 'version': 2 - } - } + collection_definition = { + "id": "test_partitioned_collection " + str(uuid.uuid4()), + "partitionKey": {"paths": ["/id", "/pk"], "kind": documents.PartitionKind.MultiHash, "version": 2}, + } offer_throughput = 10100 - created_collection = await created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition['partitionKey'], - offer_throughput=offer_throughput) + created_collection = await created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition["partitionKey"], + offer_throughput=offer_throughput, + ) - assert collection_definition.get('id') == created_collection.id + assert collection_definition.get("id") == created_collection.id created_collection_properties = await created_collection.read() - assert collection_definition.get('partitionKey').get('paths') == created_collection_properties['partitionKey'][ - 'paths'] - assert collection_definition.get('partitionKey').get('kind') == created_collection_properties['partitionKey'][ - 'kind'] + assert ( + collection_definition.get("partitionKey").get("paths") + == created_collection_properties["partitionKey"]["paths"] + ) + assert ( + collection_definition.get("partitionKey").get("kind") + == created_collection_properties["partitionKey"]["kind"] + ) expected_offer = await created_collection.get_throughput() @@ -170,35 +170,39 @@ async def test_partitioned_collection_subpartition_async(self): assert expected_offer.offer_throughput == offer_throughput # Negative test, check that user can't make a subpartition higher than 3 levels - collection_definition2 = {'id': 'test_partitioned_collection2_MH ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id', '/pk', '/id2', "/pk2"], - 'kind': documents.PartitionKind.MultiHash, - 'version': 2 - } - } + collection_definition2 = { + "id": "test_partitioned_collection2_MH " + str(uuid.uuid4()), + "partitionKey": { + "paths": ["/id", "/pk", "/id2", "/pk2"], + "kind": documents.PartitionKind.MultiHash, + "version": 2, + }, + } try: - created_collection = await created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition2['partitionKey'], - offer_throughput=offer_throughput) + created_collection = await created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition2["partitionKey"], + offer_throughput=offer_throughput, + ) except exceptions.CosmosHttpResponseError as error: assert error.status_code == StatusCodes.BAD_REQUEST assert "Too many partition key paths" in error.message # Negative Test: Check if user tries to create multihash container while defining single hash - collection_definition3 = {'id': 'test_partitioned_collection2_MH ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/id', '/pk', '/id2', "/pk2"], - 'kind': documents.PartitionKind.Hash, - 'version': 2 - } - } + collection_definition3 = { + "id": "test_partitioned_collection2_MH " + str(uuid.uuid4()), + "partitionKey": { + "paths": ["/id", "/pk", "/id2", "/pk2"], + "kind": documents.PartitionKind.Hash, + "version": 2, + }, + } try: - created_collection = await created_db.create_container(id=collection_definition['id'], - partition_key=collection_definition3['partitionKey'], - offer_throughput=offer_throughput) + created_collection = await created_db.create_container( + id=collection_definition["id"], + partition_key=collection_definition3["partitionKey"], + offer_throughput=offer_throughput, + ) except exceptions.CosmosHttpResponseError as error: assert error.status_code == StatusCodes.BAD_REQUEST assert "Too many partition key paths" in error.message @@ -208,19 +212,18 @@ async def test_partitioned_collection_subpartition_async(self): async def test_partitioned_collection_partition_key_extraction_subpartition_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_extraction ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction " + str(uuid.uuid4()) created_collection = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/address/state', '/address/city'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey( + path=["/address/state", "/address/city"], kind=documents.PartitionKind.MultiHash + ), ) - document_definition = {'id': 'document1', - 'address': {'street': '1 Microsoft Way', - 'city': 'Redmond', - 'state': 'WA', - 'zip code': 98052 - } - } + document_definition = { + "id": "document1", + "address": {"street": "1 Microsoft Way", "city": "Redmond", "state": "WA", "zip code": 98052}, + } self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._MockExecuteFunction @@ -230,14 +233,15 @@ async def test_partitioned_collection_partition_key_extraction_subpartition_asyn assert self.last_headers[0] == '["WA","Redmond"]' del self.last_headers[:] - assert created_document.get('id') == document_definition.get('id') - assert created_document.get('address').get('state') == document_definition.get('address').get('state') + assert created_document.get("id") == document_definition.get("id") + assert created_document.get("address").get("state") == document_definition.get("address").get("state") - collection_id = 'test_partitioned_collection_partition_key_extraction1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction1 " + str(uuid.uuid4()) created_collection1 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/address/state/city', '/address/city/state'], - kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey( + path=["/address/state/city", "/address/city/state"], kind=documents.PartitionKind.MultiHash + ), ) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync @@ -246,7 +250,7 @@ async def test_partitioned_collection_partition_key_extraction_subpartition_asyn try: created_document = await created_collection1.create_item(document_definition) _retry_utility_async.ExecuteFunctionAsync = self.OriginalExecuteFunction - self.fail('Operation Should Fail.') + self.fail("Operation Should Fail.") except exceptions.CosmosHttpResponseError as error: assert error.status_code == StatusCodes.BAD_REQUEST assert error.sub_status == SubStatusCodes.PARTITION_KEY_MISMATCH @@ -258,18 +262,20 @@ async def test_partitioned_collection_partition_key_extraction_subpartition_asyn async def test_partitioned_collection_partition_key_extraction_special_chars_subpartition_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars1 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars1 " + str(uuid.uuid4()) created_collection1 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/\"first level\' 1*()\"/\"le/vel2\"', - '/\"second level\' 1*()\"/\"le/vel2\"'], - kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey( + path=['/"first level\' 1*()"/"le/vel2"', '/"second level\' 1*()"/"le/vel2"'], + kind=documents.PartitionKind.MultiHash, + ), ) - document_definition = {'id': 'document1', - "first level' 1*()": {"le/vel2": 'val1'}, - "second level' 1*()": {"le/vel2": 'val2'} - } + document_definition = { + "id": "document1", + "first level' 1*()": {"le/vel2": "val1"}, + "second level' 1*()": {"le/vel2": "val2"}, + } self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._MockExecuteFunction @@ -279,27 +285,28 @@ async def test_partitioned_collection_partition_key_extraction_special_chars_sub del self.last_headers[:] collection_definition2 = { - 'id': 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()), - 'partitionKey': - { - 'paths': ['/\'first level\" 1*()\'/\'first le/vel2\'', - '/\'second level\" 1*()\'/\'second le/vel2\''], - 'kind': documents.PartitionKind.MultiHash - } + "id": "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()), + "partitionKey": { + "paths": ["/'first level\" 1*()'/'first le/vel2'", "/'second level\" 1*()'/'second le/vel2'"], + "kind": documents.PartitionKind.MultiHash, + }, } - collection_id = 'test_partitioned_collection_partition_key_extraction_special_chars2 ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_extraction_special_chars2 " + str(uuid.uuid4()) created_collection2 = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=collection_definition2["partitionKey"]["paths"], - kind=collection_definition2["partitionKey"]["kind"]) + partition_key=PartitionKey( + path=collection_definition2["partitionKey"]["paths"], + kind=collection_definition2["partitionKey"]["kind"], + ), ) - document_definition = {'id': 'document2', - 'first level\" 1*()': {'first le/vel2': 'val3'}, - 'second level\" 1*()': {'second le/vel2': 'val4'} - } + document_definition = { + "id": "document2", + 'first level" 1*()': {"first le/vel2": "val3"}, + 'second level" 1*()': {"second le/vel2": "val4"}, + } self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._MockExecuteFunction @@ -314,97 +321,102 @@ async def test_partitioned_collection_partition_key_extraction_special_chars_sub async def test_partitioned_collection_document_crud_and_query_subpartition_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_document_crud_and_query_MH ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_document_crud_and_query_MH " + str(uuid.uuid4()) created_collection = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/city', '/zipcode'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey(path=["/city", "/zipcode"], kind=documents.PartitionKind.MultiHash), ) - document_definition = {'id': 'document', - 'key': 'value', - 'city': 'Redmond', - 'zipcode': '98052'} + document_definition = {"id": "document", "key": "value", "city": "Redmond", "zipcode": "98052"} created_document = await created_collection.create_item(body=document_definition) - assert created_document.get('id') == document_definition.get('id') - assert created_document.get('key') == document_definition.get('key') - assert created_document.get('city') == document_definition.get('city') - assert created_document.get('zipcode') == document_definition.get('zipcode') + assert created_document.get("id") == document_definition.get("id") + assert created_document.get("key") == document_definition.get("key") + assert created_document.get("city") == document_definition.get("city") + assert created_document.get("zipcode") == document_definition.get("zipcode") # read document read_document = await created_collection.read_item( - item=created_document.get('id'), - partition_key=[created_document.get('city'), created_document.get('zipcode')] + item=created_document.get("id"), + partition_key=[created_document.get("city"), created_document.get("zipcode")], ) - assert read_document.get('id') == created_document.get('id') - assert read_document.get('key') == created_document.get('key') - assert read_document.get('city') == created_document.get('city') - assert read_document.get('zipcode') == created_document.get('zipcode') + assert read_document.get("id") == created_document.get("id") + assert read_document.get("key") == created_document.get("key") + assert read_document.get("city") == created_document.get("city") + assert read_document.get("zipcode") == created_document.get("zipcode") # Read document feed doesn't require partitionKey as it's always a cross partition query documentlist = [document async for document in created_collection.read_all_items()] assert 1 == len(documentlist) # replace document - document_definition['key'] = 'new value' + document_definition["key"] = "new value" - replaced_document = await created_collection.replace_item( - item=read_document, - body=document_definition - ) + replaced_document = await created_collection.replace_item(item=read_document, body=document_definition) - assert replaced_document.get('key') == document_definition.get('key') + assert replaced_document.get("key") == document_definition.get("key") # upsert document(create scenario) - document_definition['id'] = 'document2' - document_definition['key'] = 'value2' - document_definition['city'] = 'Atlanta' - document_definition['zipcode'] = '30363' + document_definition["id"] = "document2" + document_definition["key"] = "value2" + document_definition["city"] = "Atlanta" + document_definition["zipcode"] = "30363" upserted_document = await created_collection.upsert_item(body=document_definition) - assert upserted_document.get('id') == document_definition.get('id') - assert upserted_document.get('key') == document_definition.get('key') - assert upserted_document.get('city') == document_definition.get('city') - assert upserted_document.get('zipcode') == document_definition.get('zipcode') + assert upserted_document.get("id") == document_definition.get("id") + assert upserted_document.get("key") == document_definition.get("key") + assert upserted_document.get("city") == document_definition.get("city") + assert upserted_document.get("zipcode") == document_definition.get("zipcode") documentlist = [document async for document in created_collection.read_all_items()] assert 2 == len(documentlist) # delete document - await created_collection.delete_item(item=upserted_document, partition_key=[upserted_document.get('city'), - upserted_document.get('zipcode')]) + await created_collection.delete_item( + item=upserted_document, partition_key=[upserted_document.get("city"), upserted_document.get("zipcode")] + ) # query document on the partition key specified in the predicate will pass even without setting # enableCrossPartitionQuery or passing in the partitionKey value - documentlist = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.city=\'' + replaced_document.get( - 'city') + '\' and r.zipcode=\'' + replaced_document.get('zipcode') + '\'' - # pylint: disable=line-too-long - )] + documentlist = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.city='" + + replaced_document.get("city") + + "' and r.zipcode='" + + replaced_document.get("zipcode") + + "'" + # pylint: disable=line-too-long + ) + ] assert 1 == len(documentlist) # cross partition query - documentlist = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - )] + documentlist = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + ) + ] assert 1 == len(documentlist) # query document by providing the partitionKey value - documentlist = [document async for document in created_collection.query_items( - query='SELECT * FROM root r WHERE r.key=\'' + replaced_document.get('key') + '\'', # nosec - partition_key=[replaced_document.get('city'), replaced_document.get('zipcode')] - )] + documentlist = [ + document + async for document in created_collection.query_items( + query="SELECT * FROM root r WHERE r.key='" + replaced_document.get("key") + "'", # nosec + partition_key=[replaced_document.get("city"), replaced_document.get("zipcode")], + ) + ] assert 1 == len(documentlist) # Using incomplete extracted partition key in item body - incomplete_document = {'id': 'document3', - 'key': 'value3', - 'city': 'Vancouver'} + incomplete_document = {"id": "document3", "key": "value3", "city": "Vancouver"} try: await created_collection.create_item(body=incomplete_document) @@ -422,21 +434,18 @@ async def test_partitioned_collection_document_crud_and_query_subpartition_async assert error.sub_status == SubStatusCodes.PARTITION_KEY_MISMATCH # using mix value types for partition key - doc_mixed_types = {'id': "doc4", - 'key': 'value4', - 'city': None, - 'zipcode': 1000} + doc_mixed_types = {"id": "doc4", "key": "value4", "city": None, "zipcode": 1000} created_mixed_type_doc = await created_collection.create_item(body=doc_mixed_types) - assert doc_mixed_types.get('city') == created_mixed_type_doc.get('city') - assert doc_mixed_types.get('zipcode') == created_mixed_type_doc.get('zipcode') + assert doc_mixed_types.get("city") == created_mixed_type_doc.get("city") + assert doc_mixed_types.get("zipcode") == created_mixed_type_doc.get("zipcode") await created_db.delete_container(created_collection.id) async def test_partitioned_collection_prefix_partition_query_subpartition_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_partition_key_prefix_query_async ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_partition_key_prefix_query_async " + str(uuid.uuid4()) created_collection = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/state', '/city', '/zipcode'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind=documents.PartitionKind.MultiHash), ) item_values = [ ["CA", "Newbury Park", "91319"], @@ -448,102 +457,76 @@ async def test_partitioned_collection_prefix_partition_query_subpartition_async( ["CA", "Ojai", "93023"], # cspell:disable-line ["CA", "Port Hueneme", "93041"], # cspell:disable-line ["WA", "Seattle", "98101"], - ["WA", "Bellevue", "98004"] + ["WA", "Bellevue", "98004"], ] - document_definitions = [{'id': 'document1', - 'state': item_values[0][0], - 'city': item_values[0][1], - 'zipcode': item_values[0][2] - }, - {'id': 'document2', - 'state': item_values[1][0], - 'city': item_values[1][1], - 'zipcode': item_values[1][2] - }, - {'id': 'document3', - 'state': item_values[2][0], - 'city': item_values[2][1], - 'zipcode': item_values[2][2] - }, - {'id': 'document4', - 'state': item_values[3][0], - 'city': item_values[3][1], - 'zipcode': item_values[3][2] - }, - {'id': 'document5', - 'state': item_values[4][0], - 'city': item_values[4][1], - 'zipcode': item_values[4][2] - }, - {'id': 'document6', - 'state': item_values[5][0], - 'city': item_values[5][1], - 'zipcode': item_values[5][2] - }, - {'id': 'document7', - 'state': item_values[6][0], - 'city': item_values[6][1], - 'zipcode': item_values[6][2] - }, - {'id': 'document8', - 'state': item_values[7][0], - 'city': item_values[7][1], - 'zipcode': item_values[7][2] - }, - {'id': 'document9', - 'state': item_values[8][0], - 'city': item_values[8][1], - 'zipcode': item_values[8][2] - }, - {'id': 'document10', - 'state': item_values[9][0], - 'city': item_values[9][1], - 'zipcode': item_values[9][2] - } - ] + document_definitions = [ + {"id": "document1", "state": item_values[0][0], "city": item_values[0][1], "zipcode": item_values[0][2]}, + {"id": "document2", "state": item_values[1][0], "city": item_values[1][1], "zipcode": item_values[1][2]}, + {"id": "document3", "state": item_values[2][0], "city": item_values[2][1], "zipcode": item_values[2][2]}, + {"id": "document4", "state": item_values[3][0], "city": item_values[3][1], "zipcode": item_values[3][2]}, + {"id": "document5", "state": item_values[4][0], "city": item_values[4][1], "zipcode": item_values[4][2]}, + {"id": "document6", "state": item_values[5][0], "city": item_values[5][1], "zipcode": item_values[5][2]}, + {"id": "document7", "state": item_values[6][0], "city": item_values[6][1], "zipcode": item_values[6][2]}, + {"id": "document8", "state": item_values[7][0], "city": item_values[7][1], "zipcode": item_values[7][2]}, + {"id": "document9", "state": item_values[8][0], "city": item_values[8][1], "zipcode": item_values[8][2]}, + {"id": "document10", "state": item_values[9][0], "city": item_values[9][1], "zipcode": item_values[9][2]}, + ] created_documents = [] for document_definition in document_definitions: - created_documents.append(await created_collection.create_item( - body=document_definition)) + created_documents.append(await created_collection.create_item(body=document_definition)) assert len(created_documents) == len(document_definitions) # Query all documents should return all items - document_list = [document async for document in created_collection.query_items(query='Select * from c')] + document_list = [document async for document in created_collection.query_items(query="Select * from c")] assert len(document_list) == len(document_definitions) # Query all items with only CA for 1st level. Should return only 8 items instead of 10 - document_list = [document async for document in created_collection.query_items(query='Select * from c' - , partition_key=['CA'])] + document_list = [ + document async for document in created_collection.query_items(query="Select * from c", partition_key=["CA"]) + ] assert 8 == len(document_list) # Query all items with CA for 1st level and Oxnard for second level. Should only return 3 items - document_list = [document async for document in created_collection.query_items(query='Select * from c' - , partition_key=['CA', - 'Oxnard'])] # pylint: disable=line-too-long + document_list = [ + document + async for document in created_collection.query_items( + query="Select * from c", partition_key=["CA", "Oxnard"] + ) + ] # pylint: disable=line-too-long assert 3 == len(document_list) # Query for specific zipcode using 1st level of partition key value only: - document_list = [document async for document in - created_collection.query_items(query='Select * from c where c.zipcode = "93033"' - # pylint: disable=line-too-long - , partition_key=['CA'])] + document_list = [ + document + async for document in created_collection.query_items( + query='Select * from c where c.zipcode = "93033"' + # pylint: disable=line-too-long + , + partition_key=["CA"], + ) + ] assert 1 == len(document_list) # Query Should work with None values: - document_list = [document async for document in created_collection.query_items(query='Select * from c' - , partition_key=[None, '93033'])] + document_list = [ + document + async for document in created_collection.query_items(query="Select * from c", partition_key=[None, "93033"]) + ] assert 0 == len(document_list) # Query Should Work with non string values - document_list = [document async for document in created_collection.query_items(query='Select * from c' - , partition_key=[0xFF, 0xFF])] + document_list = [ + document + async for document in created_collection.query_items(query="Select * from c", partition_key=[0xFF, 0xFF]) + ] assert 0 == len(document_list) # Negative Test, prefix query should not work if no partition is given (empty list is given) try: - document_list = [document async for document in created_collection.query_items(query='Select * from c' - , partition_key=[])] + document_list = [ + document async for document in created_collection.query_items(query="Select * from c", partition_key=[]) + ] self.fail("Test did not fail as expected") except exceptions.CosmosHttpResponseError as error: assert error.status_code == StatusCodes.BAD_REQUEST @@ -552,34 +535,22 @@ async def test_partitioned_collection_prefix_partition_query_subpartition_async( await created_db.delete_container(created_collection.id) async def test_partition_key_range_subpartition_overlap(self): - Id = 'id' - MinInclusive = 'minInclusive' - MaxExclusive = 'maxExclusive' - partitionKeyRanges = \ - [ - ({Id: "2", - MinInclusive: "0000000050", - MaxExclusive: "0000000070"}, - 2), - ({Id: "0", - MinInclusive: "", - MaxExclusive: "0000000030"}, - 0), - ({Id: "1", - MinInclusive: "0000000030", - MaxExclusive: "0000000050"}, - 1), - ({Id: "3", - MinInclusive: "0000000070", - MaxExclusive: "FF"}, - 3) - ] + Id = "id" + MinInclusive = "minInclusive" + MaxExclusive = "maxExclusive" + partitionKeyRanges = [ + ({Id: "2", MinInclusive: "0000000050", MaxExclusive: "0000000070"}, 2), + ({Id: "0", MinInclusive: "", MaxExclusive: "0000000030"}, 0), + ({Id: "1", MinInclusive: "0000000030", MaxExclusive: "0000000050"}, 1), + ({Id: "3", MinInclusive: "0000000070", MaxExclusive: "FF"}, 3), + ] crm = CollectionRoutingMap.CompleteRoutingMap(partitionKeyRanges, "") # Case 1: EPK range matches a single entire physical partition - EPK_range_1 = routing_range.Range(range_min="0000000030", range_max="0000000050", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_1 = routing_range.Range( + range_min="0000000030", range_max="0000000050", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_1 = crm.get_overlapping_ranges([EPK_range_1]) # Should only have 1 over lapping range assert len(over_lapping_ranges_1) == 1 @@ -592,8 +563,9 @@ async def test_partition_key_range_subpartition_overlap(self): # Case 2: EPK range is a sub range of a single physical partition - EPK_range_2 = routing_range.Range(range_min="0000000035", range_max="0000000045", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_2 = routing_range.Range( + range_min="0000000035", range_max="0000000045", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_2 = crm.get_overlapping_ranges([EPK_range_2]) # Should only have 1 over lapping range assert len(over_lapping_ranges_2) == 1 @@ -606,8 +578,9 @@ async def test_partition_key_range_subpartition_overlap(self): # Case 3: EPK range partially spans 2 physical partitions - EPK_range_3 = routing_range.Range(range_min="0000000035", range_max="0000000055", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_3 = routing_range.Range( + range_min="0000000035", range_max="0000000055", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_3 = crm.get_overlapping_ranges([EPK_range_3]) # Should overlap exactly two partition ranges assert len(over_lapping_ranges_3) == 2 @@ -624,8 +597,9 @@ async def test_partition_key_range_subpartition_overlap(self): # Case 4: EPK range spans multiple physical partitions, including entire physical partitions - EPK_range_4 = routing_range.Range(range_min="0000000020", range_max="0000000060", - isMinInclusive=True, isMaxInclusive=False) + EPK_range_4 = routing_range.Range( + range_min="0000000020", range_max="0000000060", isMinInclusive=True, isMaxInclusive=False + ) over_lapping_ranges_4 = crm.get_overlapping_ranges([EPK_range_4]) # should overlap 3 partitions assert len(over_lapping_ranges_4) == 3 @@ -651,23 +625,24 @@ async def test_partition_key_range_subpartition_overlap(self): async def test_partitioned_collection_query_with_tuples_subpartition_async(self): created_db = self.database_for_test - collection_id = 'test_partitioned_collection_query_with_tuples_MH ' + str(uuid.uuid4()) + collection_id = "test_partitioned_collection_query_with_tuples_MH " + str(uuid.uuid4()) created_collection = await created_db.create_container( id=collection_id, - partition_key=PartitionKey(path=['/state', '/city', '/zipcode'], kind=documents.PartitionKind.MultiHash) + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind=documents.PartitionKind.MultiHash), ) - document_definition = {'id': 'document1', - 'state': 'CA', - 'city': 'Oxnard', - 'zipcode': '93033'} + document_definition = {"id": "document1", "state": "CA", "city": "Oxnard", "zipcode": "93033"} created_document = await created_collection.create_item(body=document_definition) - assert created_document.get('id') == document_definition.get('id') + assert created_document.get("id") == document_definition.get("id") # Query using tuple instead of list - document_list = [document async for document in created_collection.query_items( - query='Select * from c', partition_key=('CA', 'Oxnard', '93033'))] + document_list = [ + document + async for document in created_collection.query_items( + query="Select * from c", partition_key=("CA", "Oxnard", "93033") + ) + ] assert 1 == len(document_list) await created_db.delete_container(created_collection.id) @@ -724,12 +699,13 @@ async def test_partitioned_collection_query_with_tuples_subpartition_async(self) async def _MockExecuteFunction(self, function, *args, **kwargs): try: - self.last_headers.append(args[4].headers[HttpHeaders.PartitionKey] - if HttpHeaders.PartitionKey in args[4].headers else '') + self.last_headers.append( + args[4].headers[HttpHeaders.PartitionKey] if HttpHeaders.PartitionKey in args[4].headers else "" + ) except IndexError: - self.last_headers.append('') + self.last_headers.append("") return await self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_diagnostics.py b/sdk/cosmos/azure-cosmos/tests/test_diagnostics.py index 1566615ea78f..9d757e7010d6 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_diagnostics.py +++ b/sdk/cosmos/azure-cosmos/tests/test_diagnostics.py @@ -8,16 +8,16 @@ import azure.cosmos.diagnostics as m _common = { - 'x-ms-activity-id', - 'x-ms-session-token', - 'x-ms-item-count', - 'x-ms-request-quota', - 'x-ms-resource-usage', - 'x-ms-retry-after-ms', + "x-ms-activity-id", + "x-ms-session-token", + "x-ms-item-count", + "x-ms-request-quota", + "x-ms-resource-usage", + "x-ms-retry-after-ms", } _headers = dict(zip(_common, _common)) -_headers['other'] = 'other' +_headers["other"] = "other" @pytest.mark.cosmosEmulator @@ -46,16 +46,16 @@ def test_common_attrs(self): rh(_headers, "body") for name in _common: assert rh.headers[name] == name - attr = name.replace('x-ms-', '').replace('-', '_') + attr = name.replace("x-ms-", "").replace("-", "_") assert getattr(rh, attr) == name def test_other_attrs(self): rh = m.RecordDiagnostics() rh(_headers, "body") - assert rh.headers['other'] == 'other' + assert rh.headers["other"] == "other" with self.assertRaises(AttributeError): rh.other -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations.py b/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations.py index f84e230c3023..de2e99de51eb 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations.py +++ b/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations.py @@ -8,8 +8,13 @@ from azure.core.exceptions import ServiceRequestError import test_config -from azure.cosmos import DatabaseAccount, _location_cache, CosmosClient, _global_endpoint_manager, \ - _cosmos_client_connection +from azure.cosmos import ( + DatabaseAccount, + _location_cache, + CosmosClient, + _global_endpoint_manager, + _cosmos_client_connection, +) from azure.cosmos._location_cache import RegionalRoutingContext from _fault_injection_transport import FaultInjectionTransport from azure.cosmos.exceptions import CosmosHttpResponseError @@ -20,21 +25,23 @@ REGION_3 = "West US 2" ACCOUNT_REGIONS = [REGION_1, REGION_2, REGION_3] + @pytest.fixture() def setup(): - if (TestPreferredLocations.master_key == '[YOUR_KEY_HERE]' or - TestPreferredLocations.host == '[YOUR_ENDPOINT_HERE]'): + if TestPreferredLocations.master_key == "[YOUR_KEY_HERE]" or TestPreferredLocations.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) client = CosmosClient(TestPreferredLocations.host, TestPreferredLocations.master_key, consistency_level="Session") created_database = client.get_database_client(TestPreferredLocations.TEST_DATABASE_ID) - created_collection = created_database.get_container_client(TestPreferredLocations.TEST_CONTAINER_SINGLE_PARTITION_ID) - yield { - COLLECTION: created_collection - } + created_collection = created_database.get_container_client( + TestPreferredLocations.TEST_CONTAINER_SINGLE_PARTITION_ID + ) + yield {COLLECTION: created_collection} + def preferred_locations(): host = test_config.TestConfig.host @@ -49,27 +56,32 @@ def preferred_locations(): ([REGION_2], locational_endpoint), ([REGION_3, REGION_1], locational_endpoint), ([REGION_1, REGION_3], locational_endpoint), - ([REGION_1, REGION_2, REGION_3], locational_endpoint) + ([REGION_1, REGION_2, REGION_3], locational_endpoint), ] + def construct_item(): return { "id": "test_item_no_preferred_locations" + str(uuid.uuid4()), - test_config.TestConfig.TEST_CONTAINER_PARTITION_KEY: str(uuid.uuid4()) + test_config.TestConfig.TEST_CONTAINER_PARTITION_KEY: str(uuid.uuid4()), } + def error(): status_codes = [503, 408, 404] sub_status = [0, 0, 1002] errors = [] for i, status_code in enumerate(status_codes): - errors.append(CosmosHttpResponseError( - status_code=status_code, - message=f"Error with status code {status_code} and substatus {sub_status[i]}", - sub_status=sub_status[i] - )) + errors.append( + CosmosHttpResponseError( + status_code=status_code, + message=f"Error with status code {status_code} and substatus {sub_status[i]}", + sub_status=sub_status[i], + ) + ) return errors + @pytest.mark.unittest @pytest.mark.usefixtures("setup") class TestPreferredLocations: @@ -81,18 +93,24 @@ class TestPreferredLocations: def setup_method_with_custom_transport(self, custom_transport, error_lambda, default_endpoint=host, **kwargs): uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_1) - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - (FaultInjectionTransport.predicate_targets_region(r, uri_down) or - FaultInjectionTransport.predicate_targets_region(r, default_endpoint)) and - not FaultInjectionTransport.predicate_is_operation_type(r, "ReadFeed") - ) - - custom_transport.add_fault(predicate, - error_lambda) - client = CosmosClient(default_endpoint, - self.master_key, - multiple_write_locations=True, - transport=custom_transport, consistency_level="Session", **kwargs) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and ( + FaultInjectionTransport.predicate_targets_region(r, uri_down) + or FaultInjectionTransport.predicate_targets_region(r, default_endpoint) + ) + and not FaultInjectionTransport.predicate_is_operation_type(r, "ReadFeed") + ) + + custom_transport.add_fault(predicate, error_lambda) + client = CosmosClient( + default_endpoint, + self.master_key, + multiple_write_locations=True, + transport=custom_transport, + consistency_level="Session", + **kwargs, + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID) return {"client": client, "db": db, "col": container} @@ -103,14 +121,18 @@ def test_effective_preferred_regions(self, setup, preferred_location, default_en self.original_getDatabaseAccountStub = _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.original_getDatabaseAccountCheck = _cosmos_client_connection.CosmosClientConnection.health_check - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount(ACCOUNT_REGIONS) + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount( + ACCOUNT_REGIONS + ) _cosmos_client_connection.CosmosClientConnection.health_check = self.MockGetDatabaseAccount(ACCOUNT_REGIONS) try: client = CosmosClient(default_endpoint, self.master_key, preferred_locations=preferred_location) # this will setup the location cache client.client_connection._global_endpoint_manager.force_refresh_on_startup(None) finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) _cosmos_client_connection.CosmosClientConnection.health_check = self.original_getDatabaseAccountCheck expected_endpoints = [] @@ -140,12 +162,11 @@ def test_read_no_preferred_locations_with_errors(self, setup, error): # setup fault injection so that first account region fails custom_transport = FaultInjectionTransport() - error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - error - ) + error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) expected = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_2) - fault_setup = self.setup_method_with_custom_transport(custom_transport=custom_transport, error_lambda=error_lambda) + fault_setup = self.setup_method_with_custom_transport( + custom_transport=custom_transport, error_lambda=error_lambda + ) fault_container = fault_setup["col"] response = fault_container.read_item(item=item_to_read["id"], partition_key=item_to_read[self.partition_key]) request = response.get_response_headers()["_request"] @@ -154,7 +175,9 @@ def test_read_no_preferred_locations_with_errors(self, setup, error): # should fail if using excluded locations because no where to failover to with pytest.raises(CosmosHttpResponseError): - fault_container.read_item(item=item_to_read["id"], partition_key=item_to_read[self.partition_key], excluded_locations=[REGION_2]) + fault_container.read_item( + item=item_to_read["id"], partition_key=item_to_read[self.partition_key], excluded_locations=[REGION_2] + ) @pytest.mark.cosmosMultiRegion def test_write_no_preferred_locations_with_errors(self, setup): @@ -163,7 +186,9 @@ def test_write_no_preferred_locations_with_errors(self, setup): expected = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_2) error_lambda = lambda r: FaultInjectionTransport.error_region_down() - fault_setup = self.setup_method_with_custom_transport(custom_transport=custom_transport, error_lambda=error_lambda) + fault_setup = self.setup_method_with_custom_transport( + custom_transport=custom_transport, error_lambda=error_lambda + ) fault_container = fault_setup["col"] response = fault_container.create_item(body=construct_item()) request = response.get_response_headers()["_request"] @@ -176,8 +201,8 @@ def test_write_no_preferred_locations_with_errors(self, setup): class MockGetDatabaseAccount(object): def __init__( - self, - regions: List[str], + self, + regions: List[str], ): self.regions = regions @@ -186,14 +211,18 @@ def __call__(self, endpoint): read_locations = [] counter = 0 for loc in read_regions: - locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(TestPreferredLocations.host, loc) - read_locations.append({'databaseAccountEndpoint': locational_endpoint, 'name': loc}) + locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint( + TestPreferredLocations.host, loc + ) + read_locations.append({"databaseAccountEndpoint": locational_endpoint, "name": loc}) counter += 1 write_regions = [self.regions[0]] write_locations = [] for loc in write_regions: - locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(TestPreferredLocations.host, loc) - write_locations.append({'databaseAccountEndpoint': locational_endpoint, 'name': loc}) + locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint( + TestPreferredLocations.host, loc + ) + write_locations.append({"databaseAccountEndpoint": locational_endpoint, "name": loc}) multi_write = False db_acc = DatabaseAccount() diff --git a/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations_async.py b/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations_async.py index f4419e69d4e0..21b90bf69cbf 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_effective_preferred_locations_async.py @@ -21,21 +21,27 @@ @pytest_asyncio.fixture() async def setup(): - if (TestPreferredLocationsAsync.master_key == '[YOUR_KEY_HERE]' or - TestPreferredLocationsAsync.host == '[YOUR_ENDPOINT_HERE]'): + if ( + TestPreferredLocationsAsync.master_key == "[YOUR_KEY_HERE]" + or TestPreferredLocationsAsync.host == "[YOUR_ENDPOINT_HERE]" + ): raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) - client = CosmosClient(TestPreferredLocationsAsync.host, TestPreferredLocationsAsync.master_key, consistency_level="Session") + client = CosmosClient( + TestPreferredLocationsAsync.host, TestPreferredLocationsAsync.master_key, consistency_level="Session" + ) created_database = client.get_database_client(TestPreferredLocationsAsync.TEST_DATABASE_ID) - created_collection = created_database.get_container_client(TestPreferredLocationsAsync.TEST_CONTAINER_SINGLE_PARTITION_ID) - yield { - COLLECTION: created_collection - } + created_collection = created_database.get_container_client( + TestPreferredLocationsAsync.TEST_CONTAINER_SINGLE_PARTITION_ID + ) + yield {COLLECTION: created_collection} await client.close() + def preferred_locations(): host = test_config.TestConfig.host locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(host, REGION_2) @@ -49,9 +55,10 @@ def preferred_locations(): ([REGION_2], locational_endpoint), ([REGION_3, REGION_1], locational_endpoint), ([REGION_1, REGION_3], locational_endpoint), - ([REGION_1, REGION_2, REGION_3], locational_endpoint) + ([REGION_1, REGION_2, REGION_3], locational_endpoint), ] + @pytest.mark.asyncio @pytest.mark.usefixtures("setup") class TestPreferredLocationsAsync: @@ -63,15 +70,17 @@ class TestPreferredLocationsAsync: async def setup_method_with_custom_transport(self, custom_transport, error_lambda, default_endpoint=host, **kwargs): uri_down = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_1) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - (FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) or - FaultInjectionTransportAsync.predicate_targets_region(r, self.host))) - custom_transport.add_fault(predicate, - error_lambda) - client = CosmosClient(default_endpoint, - self.master_key, - multiple_write_locations=True, - transport=custom_transport, **kwargs) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and ( + FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + or FaultInjectionTransportAsync.predicate_targets_region(r, self.host) + ) + ) + custom_transport.add_fault(predicate, error_lambda) + client = CosmosClient( + default_endpoint, self.master_key, multiple_write_locations=True, transport=custom_transport, **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID) return {"client": client, "db": db, "col": container} @@ -80,16 +89,24 @@ async def setup_method_with_custom_transport(self, custom_transport, error_lambd @pytest.mark.parametrize("preferred_location, default_endpoint", preferred_locations()) async def test_effective_preferred_regions_async(self, setup, preferred_location, default_endpoint): - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) self.original_getDatabaseAccountCheck = _cosmos_client_connection_async.CosmosClientConnection.health_check - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount(ACCOUNT_REGIONS) - _cosmos_client_connection_async.CosmosClientConnection.health_check = self.MockGetDatabaseAccount(ACCOUNT_REGIONS) + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount( + ACCOUNT_REGIONS + ) + _cosmos_client_connection_async.CosmosClientConnection.health_check = self.MockGetDatabaseAccount( + ACCOUNT_REGIONS + ) try: client = CosmosClient(default_endpoint, self.master_key, preferred_locations=preferred_location) # this will setup the location cache await client.__aenter__() finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) _cosmos_client_connection_async.CosmosClientConnection.health_check = self.original_getDatabaseAccountCheck expected_endpoints = [] @@ -120,21 +137,26 @@ async def test_read_no_preferred_locations_with_errors_async(self, setup, error) # setup fault injection so that first account region fails custom_transport = FaultInjectionTransportAsync() expected = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_2) - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) try: - fault_setup = await self.setup_method_with_custom_transport(custom_transport=custom_transport, error_lambda=error_lambda) + fault_setup = await self.setup_method_with_custom_transport( + custom_transport=custom_transport, error_lambda=error_lambda + ) fault_container = fault_setup["col"] - response = await fault_container.read_item(item=item_to_read["id"], partition_key=item_to_read[self.partition_key]) + response = await fault_container.read_item( + item=item_to_read["id"], partition_key=item_to_read[self.partition_key] + ) request = response.get_response_headers()["_request"] # Validate the response comes from another region meaning that the account locations were used assert request.url.startswith(expected) # should fail if using excluded locations because no where to failover to with pytest.raises(CosmosHttpResponseError): - await fault_container.read_item(item=item_to_read["id"], partition_key=item_to_read[self.partition_key], excluded_locations=[REGION_2]) + await fault_container.read_item( + item=item_to_read["id"], + partition_key=item_to_read[self.partition_key], + excluded_locations=[REGION_2], + ) finally: await fault_setup["client"].close() @@ -147,7 +169,9 @@ async def test_write_no_preferred_locations_with_errors_async(self, setup): error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) try: - fault_setup = await self.setup_method_with_custom_transport(custom_transport=custom_transport, error_lambda=error_lambda) + fault_setup = await self.setup_method_with_custom_transport( + custom_transport=custom_transport, error_lambda=error_lambda + ) fault_container = fault_setup["col"] response = await fault_container.create_item(body=construct_item()) request = response.get_response_headers()["_request"] @@ -163,8 +187,8 @@ async def test_write_no_preferred_locations_with_errors_async(self, setup): class MockGetDatabaseAccount(object): def __init__( - self, - regions: List[str], + self, + regions: List[str], ): self.regions = regions @@ -173,14 +197,18 @@ async def __call__(self, endpoint): read_locations = [] counter = 0 for loc in read_regions: - locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(TestPreferredLocationsAsync.host, loc) - read_locations.append({'databaseAccountEndpoint': locational_endpoint, 'name': loc}) + locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint( + TestPreferredLocationsAsync.host, loc + ) + read_locations.append({"databaseAccountEndpoint": locational_endpoint, "name": loc}) counter += 1 write_regions = [self.regions[0]] write_locations = [] for loc in write_regions: - locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(TestPreferredLocationsAsync.host, loc) - write_locations.append({'databaseAccountEndpoint': locational_endpoint, 'name': loc}) + locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint( + TestPreferredLocationsAsync.host, loc + ) + write_locations.append({"databaseAccountEndpoint": locational_endpoint, "name": loc}) multi_write = False db_acc = DatabaseAccount() diff --git a/sdk/cosmos/azure-cosmos/tests/test_encoding.py b/sdk/cosmos/azure-cosmos/tests/test_encoding.py index df893b34c9e7..1e904829f1c6 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_encoding.py +++ b/sdk/cosmos/azure-cosmos/tests/test_encoding.py @@ -25,44 +25,47 @@ class TestEncoding(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_db = cls.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) cls.created_container = cls.created_db.get_container_client( - test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) + test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID + ) def test_unicode_characters_in_partition_key(self): - test_string = u'€€ کلید پارتیشن विभाजन कुंजी 123' # cspell:disable-line - document_definition = {'pk': test_string, 'id': 'myid' + str(uuid.uuid4())} + test_string = "€€ کلید پارتیشن विभाजन कुंजी 123" # cspell:disable-line + document_definition = {"pk": test_string, "id": "myid" + str(uuid.uuid4())} created_doc = self.created_container.create_item(body=document_definition) - read_doc = self.created_container.read_item(item=created_doc['id'], partition_key=test_string) - self.assertEqual(read_doc['pk'], test_string) + read_doc = self.created_container.read_item(item=created_doc["id"], partition_key=test_string) + self.assertEqual(read_doc["pk"], test_string) def test_create_document_with_line_separator_para_seperator_next_line_unicodes(self): - test_string = u'Line Separator (
) & Paragraph Separator (
) & Next Line (…) & نیم‌فاصله' # cspell:disable-line - document_definition = {'pk': 'pk', 'id': 'myid' + str(uuid.uuid4()), 'unicode_content': test_string} + test_string = "Line Separator (
) & Paragraph Separator (
) & Next Line (…) & نیم‌فاصله" # cspell:disable-line + document_definition = {"pk": "pk", "id": "myid" + str(uuid.uuid4()), "unicode_content": test_string} created_doc = self.created_container.create_item(body=document_definition) - read_doc = self.created_container.read_item(item=created_doc['id'], partition_key='pk') - self.assertEqual(read_doc['unicode_content'], test_string) + read_doc = self.created_container.read_item(item=created_doc["id"], partition_key="pk") + self.assertEqual(read_doc["unicode_content"], test_string) def test_create_stored_procedure_with_line_separator_para_seperator_next_line_unicodes(self): - test_string = 'Line Separator (
) & Paragraph Separator (
) & Next Line (…) & نیم‌فاصله' # cspell:disable-line + test_string = "Line Separator (
) & Paragraph Separator (
) & Next Line (…) & نیم‌فاصله" # cspell:disable-line - test_string_unicode = u'Line Separator (
) & Paragraph Separator (
) & Next Line (…) & نیم‌فاصله' # cspell:disable-line + test_string_unicode = ( + "Line Separator (
) & Paragraph Separator (
) & Next Line (…) & نیم‌فاصله" # cspell:disable-line + ) - stored_proc_definition = {'id': 'myid' + str(uuid.uuid4()), 'body': test_string} + stored_proc_definition = {"id": "myid" + str(uuid.uuid4()), "body": test_string} created_sp = self.created_container.scripts.create_stored_procedure(body=stored_proc_definition) - read_sp = self.created_container.scripts.get_stored_procedure(created_sp['id']) - self.assertEqual(read_sp['body'], test_string_unicode) + read_sp = self.created_container.scripts.get_stored_procedure(created_sp["id"]) + self.assertEqual(read_sp["body"], test_string_unicode) if __name__ == "__main__": diff --git a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations.py b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations.py index a385a2ca3e1f..3d1c9fcd8d11 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations.py +++ b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations.py @@ -25,11 +25,13 @@ def reset(self): def emit(self, record): self.messages.append(record.msg) + # Test configurations class TestDataType: - CLIENT_ONLY_TESTS = 'clientOnlyTests' - CLIENT_AND_REQUEST_TESTS = 'clientAndRequestTests' - ALL_TESTS = 'allTests' + CLIENT_ONLY_TESTS = "clientOnlyTests" + CLIENT_AND_REQUEST_TESTS = "clientAndRequestTests" + ALL_TESTS = "allTests" + TEST_DATA_TYPE = TestDataType.ALL_TESTS @@ -40,11 +42,11 @@ class TestDataType: DATABASE_ID = CONFIG.TEST_DATABASE_ID CONTAINER_ID = CONFIG.TEST_MULTI_PARTITION_PREFIX_PK_CONTAINER_ID PARTITION_KEY = CONFIG.TEST_CONTAINER_PREFIX_PARTITION_KEY -ITEM_ID = 'doc1' -PARTITION_KEY_VALUES = [f'value{i+1}' for i in range(len(PARTITION_KEY))] +ITEM_ID = "doc1" +PARTITION_KEY_VALUES = [f"value{i+1}" for i in range(len(PARTITION_KEY))] PREFIX_PARTITION_KEY = [PARTITION_KEY_VALUES[0]] PARTITION_KEY_ITEMS = dict(zip(PARTITION_KEY, PARTITION_KEY_VALUES)) -TEST_ITEM = {'id': ITEM_ID} +TEST_ITEM = {"id": ITEM_ID} TEST_ITEM.update(PARTITION_KEY_ITEMS) L0 = "Default" @@ -84,10 +86,12 @@ class TestDataType: [[L1, L2], [L1, L2], []], ] + def set_test_data_type(test_data_type): global TEST_DATA_TYPE TEST_DATA_TYPE = test_data_type + def get_test_data_with_expected_output(_client_only_output_data, _client_and_request_output_data): if TEST_DATA_TYPE == TestDataType.CLIENT_ONLY_TESTS: all_input_test_data = CLIENT_ONLY_TEST_DATA @@ -99,10 +103,12 @@ def get_test_data_with_expected_output(_client_only_output_data, _client_and_req all_input_test_data = CLIENT_ONLY_TEST_DATA + CLIENT_AND_REQUEST_TEST_DATA all_output_data = _client_only_output_data + _client_and_request_output_data - all_test_data = [input_data + [output_data] for input_data, output_data in - zip(all_input_test_data, all_output_data)] + all_test_data = [ + input_data + [output_data] for input_data, output_data in zip(all_input_test_data, all_output_data) + ] return all_test_data + def read_item_test_data(): client_only_output_data = [ [L1], # 0 @@ -142,6 +148,7 @@ def write_item_test_data(): ] return get_test_data_with_expected_output(client_only_output_data, client_and_request_output_data) + def read_and_write_item_test_data(): read_item = read_item_test_data() write_item = write_item_test_data() @@ -151,36 +158,45 @@ def read_and_write_item_test_data(): read_item[i][-1] += write_item[i][-1] return read_item + def create_item_with_excluded_locations(container, body, excluded_locations): if excluded_locations is None: container.create_item(body=body) else: container.create_item(body=body, excluded_locations=excluded_locations) + def init_container(preferred_locations, client_excluded_locations, multiple_write_locations=True): - client = CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) + client = CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) db = client.get_database_client(DATABASE_ID) container = db.get_container_client(CONTAINER_ID) MOCK_HANDLER.reset() return client, db, container -def verify_endpoint(messages, client, expected_locations, multiple_write_locations=True, - operation_type=None, resource_type=None): + +def verify_endpoint( + messages, client, expected_locations, multiple_write_locations=True, operation_type=None, resource_type=None +): if not multiple_write_locations: expected_locations[-1] = L1 # get mapping for locations - location_mapping = (client.client_connection._global_endpoint_manager. - location_cache.account_locations_by_write_endpoints) - default_endpoint = (client.client_connection._global_endpoint_manager. - location_cache.default_regional_routing_context.get_primary()) + location_mapping = ( + client.client_connection._global_endpoint_manager.location_cache.account_locations_by_write_endpoints + ) + default_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.default_regional_routing_context.get_primary() + ) # get Request URL - req_urls = [url.replace("Request URL: '", "") for url in messages if 'Request URL:' in url] + req_urls = [url.replace("Request URL: '", "") for url in messages if "Request URL:" in url] # get location actual_locations = set() @@ -208,6 +224,7 @@ def verify_endpoint(messages, client, expected_locations, multiple_write_locatio assert actual_locations == set(expected_locations) + @pytest.fixture(scope="class", autouse=True) def setup_and_teardown(): print("Setup: This runs before any tests") @@ -223,10 +240,11 @@ def setup_and_teardown(): # Code to run after tests print("Teardown: This runs after all tests") + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosMultiRegion class TestExcludedLocations: - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) def test_read_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data @@ -238,12 +256,14 @@ def test_read_item(self, test_data): if request_excluded_locations is None: container.read_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES) else: - container.read_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, excluded_locations=request_excluded_locations) + container.read_item( + item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, excluded_locations=request_excluded_locations + ) # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) def test_read_all_items(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data @@ -260,7 +280,7 @@ def test_read_all_items(self, test_data): # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) def test_query_items_with_partition_key(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data @@ -269,16 +289,20 @@ def test_query_items_with_partition_key(self, test_data): client, db, container = init_container(preferred_locations, client_excluded_locations) # API call: query_items - query = 'select * from c' + query = "select * from c" if request_excluded_locations is None: list(container.query_items(query, partition_key=PREFIX_PARTITION_KEY)) else: - list(container.query_items(query, partition_key=PREFIX_PARTITION_KEY, excluded_locations=request_excluded_locations)) + list( + container.query_items( + query, partition_key=PREFIX_PARTITION_KEY, excluded_locations=request_excluded_locations + ) + ) # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) def test_query_items_with_query_plan(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data @@ -287,17 +311,21 @@ def test_query_items_with_query_plan(self, test_data): client, db, container = init_container(preferred_locations, client_excluded_locations) # API call: query_items - query = 'Select top 10 value count(c.id) from c' + query = "Select top 10 value count(c.id) from c" if request_excluded_locations is None: list(container.query_items(query, enable_cross_partition_query=True)) # list(container.query_items(query)) else: - list(container.query_items(query, enable_cross_partition_query=True, excluded_locations=request_excluded_locations)) + list( + container.query_items( + query, enable_cross_partition_query=True, excluded_locations=request_excluded_locations + ) + ) # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) def test_query_items_change_feed(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data @@ -309,19 +337,27 @@ def test_query_items_change_feed(self, test_data): if request_excluded_locations is None: items = list(container.query_items_change_feed(start_time="Beginning", partition_key=PREFIX_PARTITION_KEY)) else: - items = list(container.query_items_change_feed(start_time="Beginning", partition_key=PREFIX_PARTITION_KEY, excluded_locations=request_excluded_locations)) + items = list( + container.query_items_change_feed( + start_time="Beginning", + partition_key=PREFIX_PARTITION_KEY, + excluded_locations=request_excluded_locations, + ) + ) # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) def test_replace_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup and create an item - client, db, container = init_container(preferred_locations, client_excluded_locations, multiple_write_locations) + client, db, container = init_container( + preferred_locations, client_excluded_locations, multiple_write_locations + ) # API call: replace_item if request_excluded_locations is None: @@ -332,17 +368,19 @@ def test_replace_item(self, test_data): # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) def test_upsert_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup and create an item - client, db, container = init_container(preferred_locations, client_excluded_locations, multiple_write_locations) + client, db, container = init_container( + preferred_locations, client_excluded_locations, multiple_write_locations + ) # API call: upsert_item - body = {'id': f'doc2-{str(uuid.uuid4())}'} + body = {"id": f"doc2-{str(uuid.uuid4())}"} body.update(PARTITION_KEY_ITEMS) if request_excluded_locations is None: container.upsert_item(body=body) @@ -352,90 +390,100 @@ def test_upsert_item(self, test_data): # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) def test_create_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup and create an item - client, db, container = init_container(preferred_locations, client_excluded_locations, multiple_write_locations) + client, db, container = init_container( + preferred_locations, client_excluded_locations, multiple_write_locations + ) # API call: create_item - body = {'id': f'doc2-{str(uuid.uuid4())}'} + body = {"id": f"doc2-{str(uuid.uuid4())}"} body.update(PARTITION_KEY_ITEMS) create_item_with_excluded_locations(container, body, request_excluded_locations) # Single write verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) def test_patch_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup and create an item - client, db, container = init_container(preferred_locations, client_excluded_locations, - multiple_write_locations) + client, db, container = init_container( + preferred_locations, client_excluded_locations, multiple_write_locations + ) # API call: patch_item operations = [ - {"op": "add", "path": "/test_data", "value": f'Data-{str(uuid.uuid4())}'}, + {"op": "add", "path": "/test_data", "value": f"Data-{str(uuid.uuid4())}"}, ] if request_excluded_locations is None: - container.patch_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, - patch_operations=operations) + container.patch_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, patch_operations=operations) else: - container.patch_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, - patch_operations=operations, - excluded_locations=request_excluded_locations) + container.patch_item( + item=ITEM_ID, + partition_key=PARTITION_KEY_VALUES, + patch_operations=operations, + excluded_locations=request_excluded_locations, + ) # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) def test_execute_item_batch(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup and create an item - client, db, container = init_container(preferred_locations, client_excluded_locations, - multiple_write_locations) + client, db, container = init_container( + preferred_locations, client_excluded_locations, multiple_write_locations + ) # API call: execute_item_batch batch_operations = [] for i in range(3): - body = {'id': f'doc2-{str(uuid.uuid4())}'} + body = {"id": f"doc2-{str(uuid.uuid4())}"} body.update(PARTITION_KEY_ITEMS) - batch_operations.append(("create", ( - body, - ))) + batch_operations.append(("create", (body,))) if request_excluded_locations is None: - container.execute_item_batch(batch_operations=batch_operations, - partition_key=PARTITION_KEY_VALUES,) + container.execute_item_batch( + batch_operations=batch_operations, + partition_key=PARTITION_KEY_VALUES, + ) else: - container.execute_item_batch(batch_operations=batch_operations, - partition_key=PARTITION_KEY_VALUES, - excluded_locations=request_excluded_locations) + container.execute_item_batch( + batch_operations=batch_operations, + partition_key=PARTITION_KEY_VALUES, + excluded_locations=request_excluded_locations, + ) # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', write_item_test_data()) + @pytest.mark.parametrize("test_data", write_item_test_data()) def test_delete_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - client, db, container = init_container(preferred_locations, client_excluded_locations, multiple_write_locations) + client, db, container = init_container( + preferred_locations, client_excluded_locations, multiple_write_locations + ) # create before delete - item_id = f'doc2-{str(uuid.uuid4())}' - body = {'id': item_id} + item_id = f"doc2-{str(uuid.uuid4())}" + body = {"id": item_id} body.update(PARTITION_KEY_ITEMS) create_item_with_excluded_locations(container, body, request_excluded_locations) MOCK_HANDLER.reset() @@ -448,8 +496,15 @@ def test_delete_item(self, test_data): container.delete_item(item_id, PARTITION_KEY_VALUES, excluded_locations=request_excluded_locations) # Verify endpoint locations - verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations, - operation_type=OperationType.Delete, resource_type=ResourceType.Document) + verify_endpoint( + MOCK_HANDLER.messages, + client, + expected_locations, + multiple_write_locations, + operation_type=OperationType.Delete, + resource_type=ResourceType.Document, + ) + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_async.py b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_async.py index 676e9affe793..5584de6fd73f 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_async.py @@ -12,9 +12,14 @@ from azure.cosmos.aio import CosmosClient from azure.cosmos.documents import _OperationType as OperationType from azure.cosmos.http_constants import ResourceType -from test_excluded_locations import (TestDataType, set_test_data_type, - read_item_test_data, write_item_test_data, read_and_write_item_test_data, - verify_endpoint) +from test_excluded_locations import ( + TestDataType, + set_test_data_type, + read_item_test_data, + write_item_test_data, + read_and_write_item_test_data, + verify_endpoint, +) class MockHandler(logging.Handler): @@ -28,6 +33,7 @@ def reset(self): def emit(self, record): self.messages.append(record.msg) + # Test configurations MOCK_HANDLER = MockHandler() CONFIG = test_config.TestConfig() @@ -36,21 +42,23 @@ def emit(self, record): DATABASE_ID = CONFIG.TEST_DATABASE_ID CONTAINER_ID = CONFIG.TEST_MULTI_PARTITION_PREFIX_PK_CONTAINER_ID PARTITION_KEY = CONFIG.TEST_CONTAINER_PREFIX_PARTITION_KEY -ITEM_ID = 'doc1' -PARTITION_KEY_VALUES = [f'value{i+1}' for i in range(len(PARTITION_KEY))] +ITEM_ID = "doc1" +PARTITION_KEY_VALUES = [f"value{i+1}" for i in range(len(PARTITION_KEY))] PREFIX_PARTITION_KEY = [PARTITION_KEY_VALUES[0]] PARTITION_KEY_ITEMS = dict(zip(PARTITION_KEY, PARTITION_KEY_VALUES)) -TEST_ITEM = {'id': ITEM_ID} +TEST_ITEM = {"id": ITEM_ID} TEST_ITEM.update(PARTITION_KEY_ITEMS) set_test_data_type(TestDataType.ALL_TESTS) + async def create_item_with_excluded_locations_async(container, body, excluded_locations): if excluded_locations is None: await container.create_item(body=body) else: await container.create_item(body=body, excluded_locations=excluded_locations) + async def init_container_async(client): db = client.get_database_client(DATABASE_ID) container = db.get_container_client(CONTAINER_ID) @@ -58,6 +66,7 @@ async def init_container_async(client): return db, container + @pytest_asyncio.fixture(scope="class", autouse=True) async def setup_and_teardown_async(): print("Setup: This runs before any tests") @@ -74,21 +83,25 @@ async def setup_and_teardown_async(): # Code to run after tests print("Teardown: This runs after all tests") + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosMultiRegion @pytest.mark.asyncio @pytest.mark.usefixtures("setup_and_teardown_async") class TestExcludedLocationsAsync: - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) async def test_read_item_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=True) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=True, + ) as client: db, container = await init_container_async(client) # API call: read_item @@ -100,104 +113,138 @@ async def test_read_item_async(self, test_data): # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) async def test_read_all_items_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=True) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=True, + ) as client: db, container = await init_container_async(client) # API call: read_all_items if request_excluded_locations is None: all_items = [item async for item in container.read_all_items()] else: - all_items = [item async for item in container.read_all_items(excluded_locations=request_excluded_locations)] + all_items = [ + item async for item in container.read_all_items(excluded_locations=request_excluded_locations) + ] # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) async def test_query_items_with_partition_key_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=True) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=True, + ) as client: db, container = await init_container_async(client) # API call: query_items - query = 'select * from c' + query = "select * from c" if request_excluded_locations is None: all_items = [item async for item in container.query_items(query, partition_key=PREFIX_PARTITION_KEY)] else: - all_items = [item async for item in container.query_items(query, partition_key=PREFIX_PARTITION_KEY, excluded_locations=request_excluded_locations)] + all_items = [ + item + async for item in container.query_items( + query, partition_key=PREFIX_PARTITION_KEY, excluded_locations=request_excluded_locations + ) + ] # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) async def test_query_items_with_query_plan_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=True) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=True, + ) as client: db, container = await init_container_async(client) # API call: query_items - query = 'Select top 10 value count(c.id) from c' + query = "Select top 10 value count(c.id) from c" if request_excluded_locations is None: all_items = [item async for item in container.query_items(query)] else: - all_items = [item async for item in container.query_items(query, excluded_locations=request_excluded_locations)] + all_items = [ + item async for item in container.query_items(query, excluded_locations=request_excluded_locations) + ] # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) async def test_query_items_change_feed_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data - # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=True) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=True, + ) as client: db, container = await init_container_async(client) # API call: query_items_change_feed if request_excluded_locations is None: - all_items = [item async for item in container.query_items_change_feed(start_time="Beginning", partition_key=PREFIX_PARTITION_KEY)] + all_items = [ + item + async for item in container.query_items_change_feed( + start_time="Beginning", partition_key=PREFIX_PARTITION_KEY + ) + ] else: - all_items = [item async for item in container.query_items_change_feed(start_time="Beginning", partition_key=PREFIX_PARTITION_KEY, excluded_locations=request_excluded_locations)] + all_items = [ + item + async for item in container.query_items_change_feed( + start_time="Beginning", + partition_key=PREFIX_PARTITION_KEY, + excluded_locations=request_excluded_locations, + ) + ] # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations) - - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) async def test_replace_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) as client: db, container = await init_container_async(client) # API call: replace_item @@ -209,21 +256,24 @@ async def test_replace_item(self, test_data): # Verify endpoint locations verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) async def test_upsert_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) as client: db, container = await init_container_async(client) # API call: upsert_item - body = {'id': f'doc2-{str(uuid.uuid4())}'} + body = {"id": f"doc2-{str(uuid.uuid4())}"} body.update(PARTITION_KEY_ITEMS) if request_excluded_locations is None: await container.upsert_item(body=body) @@ -233,104 +283,122 @@ async def test_upsert_item(self, test_data): # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) async def test_create_item(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) as client: db, container = await init_container_async(client) # API call: create_item - body = {'id': f'doc2-{str(uuid.uuid4())}'} + body = {"id": f"doc2-{str(uuid.uuid4())}"} body.update(PARTITION_KEY_ITEMS) await create_item_with_excluded_locations_async(container, body, request_excluded_locations) # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) async def test_patch_item_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) as client: db, container = await init_container_async(client) # API call: patch_item operations = [ - {"op": "add", "path": "/test_data", "value": f'Data-{str(uuid.uuid4())}'}, + {"op": "add", "path": "/test_data", "value": f"Data-{str(uuid.uuid4())}"}, ] if request_excluded_locations is None: - await container.patch_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, - patch_operations=operations) + await container.patch_item( + item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, patch_operations=operations + ) else: - await container.patch_item(item=ITEM_ID, partition_key=PARTITION_KEY_VALUES, - patch_operations=operations, - excluded_locations=request_excluded_locations) + await container.patch_item( + item=ITEM_ID, + partition_key=PARTITION_KEY_VALUES, + patch_operations=operations, + excluded_locations=request_excluded_locations, + ) # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', read_and_write_item_test_data()) + @pytest.mark.parametrize("test_data", read_and_write_item_test_data()) async def test_execute_item_batch_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) as client: db, container = await init_container_async(client) # API call: execute_item_batch batch_operations = [] for i in range(3): - body = {'id': f'doc2-{str(uuid.uuid4())}'} + body = {"id": f"doc2-{str(uuid.uuid4())}"} body.update(PARTITION_KEY_ITEMS) - batch_operations.append(("create", ( - body, - ))) + batch_operations.append(("create", (body,))) if request_excluded_locations is None: - await container.execute_item_batch(batch_operations=batch_operations, - partition_key=PARTITION_KEY_VALUES,) + await container.execute_item_batch( + batch_operations=batch_operations, + partition_key=PARTITION_KEY_VALUES, + ) else: - await container.execute_item_batch(batch_operations=batch_operations, - partition_key=PARTITION_KEY_VALUES, - excluded_locations=request_excluded_locations) + await container.execute_item_batch( + batch_operations=batch_operations, + partition_key=PARTITION_KEY_VALUES, + excluded_locations=request_excluded_locations, + ) # get location from mock_handler verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations) - @pytest.mark.parametrize('test_data', write_item_test_data()) + @pytest.mark.parametrize("test_data", write_item_test_data()) async def test_delete_item_async(self, test_data): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_locations = test_data for multiple_write_locations in [True, False]: # Client setup - async with CosmosClient(HOST, KEY, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=multiple_write_locations) as client: + async with CosmosClient( + HOST, + KEY, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=multiple_write_locations, + ) as client: db, container = await init_container_async(client) # create before delete - item_id = f'doc2-{str(uuid.uuid4())}' - body = {'id': item_id} + item_id = f"doc2-{str(uuid.uuid4())}" + body = {"id": item_id} body.update(PARTITION_KEY_ITEMS) await create_item_with_excluded_locations_async(container, body, request_excluded_locations) MOCK_HANDLER.reset() @@ -339,11 +407,20 @@ async def test_delete_item_async(self, test_data): if request_excluded_locations is None: await container.delete_item(item_id, PARTITION_KEY_VALUES) else: - await container.delete_item(item_id, PARTITION_KEY_VALUES, excluded_locations=request_excluded_locations) + await container.delete_item( + item_id, PARTITION_KEY_VALUES, excluded_locations=request_excluded_locations + ) # Verify endpoint locations - verify_endpoint(MOCK_HANDLER.messages, client, expected_locations, multiple_write_locations, - operation_type=OperationType.Delete, resource_type=ResourceType.Document) + verify_endpoint( + MOCK_HANDLER.messages, + client, + expected_locations, + multiple_write_locations, + operation_type=OperationType.Delete, + resource_type=ResourceType.Document, + ) + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator.py b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator.py index db787b7353b5..2a72a9f33475 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator.py +++ b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator.py @@ -10,9 +10,14 @@ from azure.core.rest import HttpRequest from _fault_injection_transport import FaultInjectionTransport, ERROR_WITH_COUNTER from azure.cosmos.container import ContainerProxy -from test_excluded_locations import (L1, L2, read_item_test_data, - TestDataType, set_test_data_type, - get_test_data_with_expected_output) +from test_excluded_locations import ( + L1, + L2, + read_item_test_data, + TestDataType, + set_test_data_type, + get_test_data_with_expected_output, +) from test_fault_injection_transport import TestFaultInjectionTransport from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.http_constants import ResourceType @@ -25,39 +30,31 @@ SINGLE_PARTITION_PREFIX_PK_CONTAINER_ID = CONFIG.TEST_SINGLE_PARTITION_PREFIX_PK_CONTAINER_ID L1_URL = CONFIG.local_host L2_URL = L1_URL.replace("localhost", "127.0.0.1") -URL_TO_LOCATIONS = { - L1_URL: L1, - L2_URL: L2 -} +URL_TO_LOCATIONS = {L1_URL: L1, L2_URL: L2} set_test_data_type(TestDataType.ALL_TESTS) + # The output data is the number of retries that happened with different timeout region cases # [timeout L1, timeout L2] def metadata_read_with_excluded_locations_test_data() -> List[str]: - client_only_output_data = [ - [1, 0], #0 - [0, 1], #1 - [1, 0], #3 - [1, 0] #4 - ] + client_only_output_data = [[1, 0], [0, 1], [1, 0], [1, 0]] # 0 # 1 # 3 # 4 client_and_request_output_data = [ - [0, 1], #0 - [0, 1], #1 - [0, 1], #2 - [1, 0], #3 - [1, 0], #4 - [1, 0], #5 - [1, 0], #6 - [1, 0], #7 + [0, 1], # 0 + [0, 1], # 1 + [0, 1], # 2 + [1, 0], # 3 + [1, 0], # 4 + [1, 0], # 5 + [1, 0], # 6 + [1, 0], # 7 ] return get_test_data_with_expected_output(client_only_output_data, client_and_request_output_data) -def get_location( - initialized_objects: Mapping[str, Any], - url_to_locations: Mapping[str, str] = URL_TO_LOCATIONS) -> str: + +def get_location(initialized_objects: Mapping[str, Any], url_to_locations: Mapping[str, str] = URL_TO_LOCATIONS) -> str: # get Request URL - header = initialized_objects['client'].client_connection.last_response_headers + header = initialized_objects["client"].client_connection.last_response_headers request_url = header["_request"].url # verify @@ -68,10 +65,11 @@ def get_location( break return location + @pytest.mark.unittest @pytest.mark.cosmosEmulator class TestExcludedLocationsEmulator: - @pytest.mark.parametrize('test_data', read_item_test_data()) + @pytest.mark.parametrize("test_data", read_item_test_data()) def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmulator", test_data: List[List[str]]): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_location = test_data @@ -79,9 +77,10 @@ def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmulator" # Inject topology transformation that would make Emulator look like a multiple write region account # with two read regions custom_transport = FaultInjectionTransport() - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( first_region_name=L1, second_region_name=L2, @@ -89,9 +88,10 @@ def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmulator" first_region_url=L1_URL, second_region_url=L2_URL, ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) for multiple_write_locations in [True, False]: # Create client @@ -109,7 +109,7 @@ def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmulator" # create an item id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, 'pk': id_value} + document_definition = {"id": id_value, "pk": id_value} container.create_item(body=document_definition) # API call: delete_all_items_by_partition_key @@ -125,7 +125,7 @@ def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmulator" else: assert actual_location == L1 - @pytest.mark.parametrize('test_data', metadata_read_with_excluded_locations_test_data()) + @pytest.mark.parametrize("test_data", metadata_read_with_excluded_locations_test_data()) def test_metadata_read_with_excluded_locations(self: "TestExcludedLocationsEmulator", test_data: List[List[str]]): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_counts = test_data @@ -135,9 +135,10 @@ def test_metadata_read_with_excluded_locations(self: "TestExcludedLocationsEmula # Inject topology transformation that would make Emulator look like a multiple write region account # with two read regions custom_transport = FaultInjectionTransport() - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( first_region_name=L1, second_region_name=L2, @@ -145,19 +146,19 @@ def test_metadata_read_with_excluded_locations(self: "TestExcludedLocationsEmula first_region_url=L1_URL, second_region_url=L2_URL, ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate request timeout in target region - is_request_to_target_region: Callable[[HttpRequest], bool] = lambda \ - r: (FaultInjectionTransport.predicate_targets_region(r, target_url) and - FaultInjectionTransport.predicate_is_resource_type(r, ResourceType.Collection) and - not FaultInjectionTransport.predicate_is_write_operation(r, target_url)) + is_request_to_target_region: Callable[[HttpRequest], bool] = lambda r: ( + FaultInjectionTransport.predicate_targets_region(r, target_url) + and FaultInjectionTransport.predicate_is_resource_type(r, ResourceType.Collection) + and not FaultInjectionTransport.predicate_is_write_operation(r, target_url) + ) fault_factory = lambda r: custom_transport.error_with_counter( - CosmosHttpResponseError( - status_code=408, - message="Request Time Out Error.") + CosmosHttpResponseError(status_code=408, message="Request Time Out Error.") ) custom_transport.add_fault(is_request_to_target_region, fault_factory) diff --git a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator_async.py b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator_async.py index b00c1b54a768..9625a0169475 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_excluded_locations_emulator_async.py @@ -15,11 +15,13 @@ from azure.core.pipeline.transport import AioHttpTransport from _fault_injection_transport_async import FaultInjectionTransportAsync, ERROR_WITH_COUNTER from azure.cosmos.aio._container import ContainerProxy -from test_excluded_locations import (L1, L2, read_item_test_data, - TestDataType, set_test_data_type) -from test_excluded_locations_emulator import (L1_URL, L2_URL, - get_location, - metadata_read_with_excluded_locations_test_data) +from test_excluded_locations import L1, L2, read_item_test_data, TestDataType, set_test_data_type +from test_excluded_locations_emulator import ( + L1_URL, + L2_URL, + get_location, + metadata_read_with_excluded_locations_test_data, +) from test_fault_injection_transport_async import TestFaultInjectionTransportAsync from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.http_constants import ResourceType @@ -33,35 +35,42 @@ set_test_data_type(TestDataType.ALL_TESTS) + async def init_container(client, db_id, container_id): db = client.get_database_client(db_id) container = db.get_container_client(container_id) return db, container + @pytest.mark.cosmosEmulator @pytest.mark.asyncio class TestExcludedLocationsEmulatorAsync: - @pytest.mark.parametrize('test_data', read_item_test_data()) - async def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmulatorAsync", test_data: List[List[str]]): + @pytest.mark.parametrize("test_data", read_item_test_data()) + async def test_delete_all_items_by_partition_key( + self: "TestExcludedLocationsEmulatorAsync", test_data: List[List[str]] + ): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_location = test_data # Inject topology transformation that would make Emulator look like a multiple write region account # with two read regions custom_transport = FaultInjectionTransportAsync() - is_get_account_predicate: Callable[[AioHttpTransport], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[AioHttpTransport], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( first_region_name=L1, first_region_url=L1_URL, inner=inner, second_region_name=L2, - second_region_url=L2_URL) + second_region_url=L2_URL, + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) for multiple_write_locations in [True, False]: # Create client @@ -79,14 +88,16 @@ async def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmu # create an item id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, 'pk': id_value} + document_definition = {"id": id_value, "pk": id_value} await container.create_item(body=document_definition) # API call: delete_all_items_by_partition_key if request_excluded_locations is None: await container.delete_all_items_by_partition_key(id_value) else: - await container.delete_all_items_by_partition_key(id_value, excluded_locations=request_excluded_locations) + await container.delete_all_items_by_partition_key( + id_value, excluded_locations=request_excluded_locations + ) # Verify endpoint locations actual_location = get_location(initialized_objects) @@ -95,8 +106,10 @@ async def test_delete_all_items_by_partition_key(self: "TestExcludedLocationsEmu else: assert actual_location == L1 - @pytest.mark.parametrize('test_data', metadata_read_with_excluded_locations_test_data()) - async def test_metadata_read_with_excluded_locations(self: "TestExcludedLocationsEmulatorAsync", test_data: List[List[str]]): + @pytest.mark.parametrize("test_data", metadata_read_with_excluded_locations_test_data()) + async def test_metadata_read_with_excluded_locations( + self: "TestExcludedLocationsEmulatorAsync", test_data: List[List[str]] + ): # Init test variables preferred_locations, client_excluded_locations, request_excluded_locations, expected_counts = test_data target_urls = [L1_URL, L2_URL] @@ -105,40 +118,46 @@ async def test_metadata_read_with_excluded_locations(self: "TestExcludedLocation # Inject topology transformation that would make Emulator look like a multiple write region account # with two read regions custom_transport = FaultInjectionTransportAsync() - is_get_account_predicate: Callable[[AioHttpTransport], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[AioHttpTransport], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( first_region_name=L1, first_region_url=L1_URL, inner=inner, second_region_name=L2, - second_region_url=L2_URL) + second_region_url=L2_URL, + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate request timeout in target region - is_request_to_target_region: Callable[[HttpRequest], bool] = lambda \ - r: (FaultInjectionTransportAsync.predicate_targets_region(r, target_url) and - FaultInjectionTransportAsync.predicate_is_resource_type(r, ResourceType.Collection) and - not FaultInjectionTransportAsync.predicate_is_write_operation(r, target_url)) - fault_factory = lambda r: asyncio.create_task(custom_transport.error_with_counter( - CosmosHttpResponseError( - status_code=408, - message="Request Time Out Error.") - )) + is_request_to_target_region: Callable[[HttpRequest], bool] = lambda r: ( + FaultInjectionTransportAsync.predicate_targets_region(r, target_url) + and FaultInjectionTransportAsync.predicate_is_resource_type(r, ResourceType.Collection) + and not FaultInjectionTransportAsync.predicate_is_write_operation(r, target_url) + ) + fault_factory = lambda r: asyncio.create_task( + custom_transport.error_with_counter( + CosmosHttpResponseError(status_code=408, message="Request Time Out Error.") + ) + ) custom_transport.add_fault(is_request_to_target_region, fault_factory) - # Create client - async with CosmosClient(HOST, KEY, - consistency_level="Session", - transport=custom_transport, - # logger=logger, enable_diagnostics_logging=True, - preferred_locations=preferred_locations, - excluded_locations=client_excluded_locations, - multiple_write_locations=True) as client: + async with CosmosClient( + HOST, + KEY, + consistency_level="Session", + transport=custom_transport, + # logger=logger, enable_diagnostics_logging=True, + preferred_locations=preferred_locations, + excluded_locations=client_excluded_locations, + multiple_write_locations=True, + ) as client: db, container = await init_container(client, DATABASE_ID, SINGLE_PARTITION_PREFIX_PK_CONTAINER_ID) await custom_transport.reset_counters() @@ -153,5 +172,6 @@ async def test_metadata_read_with_excluded_locations(self: "TestExcludedLocation actual_count = custom_transport.counters[ERROR_WITH_COUNTER] assert actual_count == expected_count + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport.py b/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport.py index e34da32e649a..b551206f3697 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport.py +++ b/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport.py @@ -19,7 +19,7 @@ from _fault_injection_transport import FaultInjectionTransport from azure.core.exceptions import ServiceRequestError -logger = logging.getLogger('azure.cosmos') +logger = logging.getLogger("azure.cosmos") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler(sys.stdout)) @@ -28,6 +28,7 @@ TEST_DATABASE_ID = test_config.TestConfig.TEST_DATABASE_ID SINGLE_PARTITION_CONTAINER_NAME = os.path.basename(__file__) + str(uuid.uuid4()) + @pytest.mark.unittest @pytest.mark.cosmosEmulator class TestFaultInjectionTransport: @@ -38,12 +39,12 @@ def setup_class(cls): cls.host = host cls.master_key = master_key - if (cls.master_key == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.master_key == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.database_id = TEST_DATABASE_ID cls.single_partition_container_name = SINGLE_PARTITION_CONTAINER_NAME @@ -51,7 +52,6 @@ def setup_class(cls): created_database = cls.mgmt_client.get_database_client(cls.database_id) created_database.create_container(cls.single_partition_container_name, partition_key=PartitionKey("/pk")) - @classmethod def teardown_class(cls): logger.info("tearing down class: {}".format(cls.__name__)) @@ -59,38 +59,47 @@ def teardown_class(cls): try: created_database.delete_container(cls.single_partition_container_name), except Exception as containerDeleteError: - logger.warning("Exception trying to delete database {}. {}".format(created_database.id, containerDeleteError)) + logger.warning( + "Exception trying to delete database {}. {}".format(created_database.id, containerDeleteError) + ) @staticmethod def setup_method_with_custom_transport( - custom_transport: RequestsTransport, - default_endpoint: str = host, - key: str = master_key, - database_id: str = TEST_DATABASE_ID, - container_id: str = SINGLE_PARTITION_CONTAINER_NAME, - custom_logger = logger, - **kwargs): - client = CosmosClient(default_endpoint, key, consistency_level="Session", - transport=custom_transport, logger=custom_logger, enable_diagnostics_logging=True, **kwargs) + custom_transport: RequestsTransport, + default_endpoint: str = host, + key: str = master_key, + database_id: str = TEST_DATABASE_ID, + container_id: str = SINGLE_PARTITION_CONTAINER_NAME, + custom_logger=logger, + **kwargs + ): + client = CosmosClient( + default_endpoint, + key, + consistency_level="Session", + transport=custom_transport, + logger=custom_logger, + enable_diagnostics_logging=True, + **kwargs + ) db: DatabaseProxy = client.get_database_client(database_id) container: ContainerProxy = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} - def test_throws_injected_error(self: "TestFaultInjectionTransport"): id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} - - custom_transport = FaultInjectionTransport() - predicate : Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_req_for_document_with_id(r, id_value) - custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay( - 10000, - CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error."))) + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} + + custom_transport = FaultInjectionTransport() + predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_req_for_document_with_id( + r, id_value + ) + custom_transport.add_fault( + predicate, + lambda r: FaultInjectionTransport.error_after_delay( + 10000, CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ), + ) initialized_objects = TestFaultInjectionTransport.setup_method_with_custom_transport(custom_transport) start: float = time.perf_counter() @@ -110,34 +119,34 @@ def test_swr_mrr_succeeds(self: "TestFaultInjectionTransport"): expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransport() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( - is_write_operation_in_read_region_predicate, - lambda r: FaultInjectionTransport.error_write_forbidden()) + is_write_operation_in_read_region_predicate, lambda r: FaultInjectionTransport.error_write_forbidden() + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_region_sm_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["Read Region", "Write Region"]) + custom_transport, preferred_locations=["Read Region", "Write Region"] + ) container: ContainerProxy = initialized_objects["col"] created_document = container.create_item(body=document_definition) @@ -152,56 +161,55 @@ def test_swr_mrr_succeeds(self: "TestFaultInjectionTransport"): # Validate the response comes from "Read Region" (the most preferred read-only region) assert request.url.startswith(expected_read_region_uri) - def test_swr_mrr_region_down_read_succeeds(self: "TestFaultInjectionTransport"): expected_read_region_uri: str = test_config.TestConfig.local_host expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransport() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( - is_write_operation_in_read_region_predicate, - lambda r: FaultInjectionTransport.error_write_forbidden()) + is_write_operation_in_read_region_predicate, lambda r: FaultInjectionTransport.error_write_forbidden() + ) # Inject rule to simulate regional outage in "Read Region" - is_request_to_read_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, expected_read_region_uri) + is_request_to_read_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, expected_read_region_uri) + ) - custom_transport.add_fault( - is_request_to_read_region, - lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(is_request_to_read_region, lambda r: FaultInjectionTransport.error_region_down()) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_region_sm_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( custom_transport, default_endpoint=expected_write_region_uri, - preferred_locations=["Read Region", "Write Region"]) + preferred_locations=["Read Region", "Write Region"], + ) container: ContainerProxy = initialized_objects["col"] created_document = container.create_item(body=document_definition) request: HttpRequest = created_document.get_response_headers()["_request"] # Validate the response comes from "South Central US" (the write region) assert request.url.startswith(expected_write_region_uri) - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: read_document = container.read_item(id_value, partition_key=id_value) @@ -209,61 +217,61 @@ def test_swr_mrr_region_down_read_succeeds(self: "TestFaultInjectionTransport"): # Validate the response comes from "Write Region" ("Read Region" the most preferred read-only region is down) assert request.url.startswith(expected_write_region_uri) - def test_swr_mrr_region_down_envoy_read_succeeds(self: "TestFaultInjectionTransport"): expected_read_region_uri: str = test_config.TestConfig.local_host expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransport() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( - is_write_operation_in_read_region_predicate, - lambda r: FaultInjectionTransport.error_write_forbidden()) + is_write_operation_in_read_region_predicate, lambda r: FaultInjectionTransport.error_write_forbidden() + ) # Inject rule to simulate regional outage in "Read Region" - is_request_to_read_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, expected_read_region_uri) and \ - FaultInjectionTransport.predicate_is_document_operation(r) + is_request_to_read_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, expected_read_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + ) custom_transport.add_fault( is_request_to_read_region, lambda r: FaultInjectionTransport.error_after_delay( - 500, - CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error."))) + 500, CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ), + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_region_sm_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( - custom_transport, - default_endpoint=expected_write_region_uri, - preferred_locations=["Read Region", "Write Region"]) + custom_transport, + default_endpoint=expected_write_region_uri, + preferred_locations=["Read Region", "Write Region"], + ) container: ContainerProxy = initialized_objects["col"] created_document = container.create_item(body=document_definition) request: HttpRequest = created_document.get_response_headers()["_request"] # Validate the response comes from "South Central US" (the write region) assert request.url.startswith(expected_write_region_uri) - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: read_document = container.read_item(id_value, partition_key=id_value) @@ -271,29 +279,26 @@ def test_swr_mrr_region_down_envoy_read_succeeds(self: "TestFaultInjectionTransp # Validate the response comes from "Write Region" ("Read Region" the most preferred read-only region is down) assert request.url.startswith(expected_write_region_uri) - - def test_mwr_succeeds(self: "TestFaultInjectionTransport"): first_region_uri: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransport() # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( custom_transport, @@ -306,7 +311,7 @@ def test_mwr_succeeds(self: "TestFaultInjectionTransport"): request: HttpRequest = created_document.get_response_headers()["_request"] # Validate the response comes from "South Central US" (the write region) assert request.url.startswith(first_region_uri) - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: read_document = container.read_item(id_value, partition_key=id_value) @@ -314,7 +319,6 @@ def test_mwr_succeeds(self: "TestFaultInjectionTransport"): # Validate the response comes from "East US" (the most preferred read-only region) assert request.url.startswith(first_region_uri) - def test_mwr_region_down_succeeds(self: "TestFaultInjectionTransport"): first_region_uri: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1") second_region_uri: str = test_config.TestConfig.local_host @@ -322,39 +326,35 @@ def test_mwr_region_down_succeeds(self: "TestFaultInjectionTransport"): # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransport.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + ) - custom_transport.add_fault( - is_request_to_first_region, - lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(is_request_to_first_region, lambda r: FaultInjectionTransport.error_region_down()) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True, - preferred_locations=["First Region", "Second Region"] + custom_transport, multiple_write_locations=True, preferred_locations=["First Region", "Second Region"] ) container: ContainerProxy = initialized_objects["col"] - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: # reads and writes should failover to second region upsert_document = container.upsert_item(body=document_definition) @@ -365,62 +365,57 @@ def test_mwr_region_down_succeeds(self: "TestFaultInjectionTransport"): # Validate the response comes from "East US" (the most preferred read-only region) assert request.url.startswith(second_region_uri) - def test_swr_mrr_all_regions_down_for_read(self: "TestFaultInjectionTransport"): expected_read_region_uri: str = test_config.TestConfig.local_host expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransport() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( - is_write_operation_in_read_region_predicate, - lambda r: FaultInjectionTransport.error_write_forbidden()) + is_write_operation_in_read_region_predicate, lambda r: FaultInjectionTransport.error_write_forbidden() + ) # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: (FaultInjectionTransport.predicate_targets_region(r, expected_write_region_uri) and - FaultInjectionTransport.predicate_is_document_operation(r) and - not FaultInjectionTransport.predicate_is_write_operation(r, expected_write_region_uri)) - + is_request_to_first_region: Callable[[HttpRequest], bool] = lambda r: ( + FaultInjectionTransport.predicate_targets_region(r, expected_write_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + and not FaultInjectionTransport.predicate_is_write_operation(r, expected_write_region_uri) + ) # Inject rule to simulate regional outage in "Second Region" - is_request_to_second_region: Callable[[HttpRequest], bool] = lambda \ - r: (FaultInjectionTransport.predicate_targets_region(r, expected_read_region_uri) and - FaultInjectionTransport.predicate_is_document_operation(r) and - not FaultInjectionTransport.predicate_is_write_operation(r, expected_write_region_uri)) + is_request_to_second_region: Callable[[HttpRequest], bool] = lambda r: ( + FaultInjectionTransport.predicate_targets_region(r, expected_read_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + and not FaultInjectionTransport.predicate_is_write_operation(r, expected_write_region_uri) + ) - custom_transport.add_fault( - is_request_to_first_region, - lambda r: FaultInjectionTransport.error_region_down()) - custom_transport.add_fault( - is_request_to_second_region, - lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(is_request_to_first_region, lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(is_request_to_second_region, lambda r: FaultInjectionTransport.error_region_down()) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"]) + custom_transport, preferred_locations=["First Region", "Second Region"] + ) container: ContainerProxy = initialized_objects["col"] container.upsert_item(body=document_definition) with pytest.raises(ServiceRequestError): @@ -434,49 +429,43 @@ def test_mwr_all_regions_down(self: "TestFaultInjectionTransport"): # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransport.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + ) # Inject rule to simulate regional outage in "Second Region" - is_request_to_second_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, second_region_uri) and \ - FaultInjectionTransport.predicate_is_document_operation(r) + is_request_to_second_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, second_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + ) - custom_transport.add_fault( - is_request_to_first_region, - lambda r: FaultInjectionTransport.error_region_down()) - custom_transport.add_fault( - is_request_to_second_region, - lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(is_request_to_first_region, lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(is_request_to_second_region, lambda r: FaultInjectionTransport.error_region_down()) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"], - multiple_write_locations=True + custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True ) container: ContainerProxy = initialized_objects["col"] with pytest.raises(ServiceRequestError): container.upsert_item(body=document_definition) -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport_async.py b/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport_async.py index ab6a90264032..ffb0476eae0e 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_fault_injection_transport_async.py @@ -27,7 +27,7 @@ from azure.core.exceptions import ServiceRequestError MGMT_TIMEOUT = 5.0 -logger = logging.getLogger('azure.cosmos') +logger = logging.getLogger("azure.cosmos") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler(sys.stdout)) @@ -36,6 +36,7 @@ TEST_DATABASE_ID = test_config.TestConfig.TEST_DATABASE_ID SINGLE_PARTITION_CONTAINER_NAME = os.path.basename(__file__) + str(uuid.uuid4()) + @pytest.mark.cosmosEmulator @pytest.mark.asyncio class TestFaultInjectionTransportAsync(IsolatedAsyncioTestCase): @@ -45,50 +46,57 @@ async def asyncSetUp(cls): cls.host = host cls.master_key = master_key - if (cls.master_key == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.master_key == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.database_id = TEST_DATABASE_ID cls.single_partition_container_name = SINGLE_PARTITION_CONTAINER_NAME cls.mgmt_client = CosmosClient(cls.host, cls.master_key, consistency_level="Session", logger=logger) created_database = cls.mgmt_client.get_database_client(cls.database_id) await asyncio.wait_for( - created_database.create_container( - cls.single_partition_container_name, - partition_key=PartitionKey("/pk")), - MGMT_TIMEOUT) - + created_database.create_container(cls.single_partition_container_name, partition_key=PartitionKey("/pk")), + MGMT_TIMEOUT, + ) + @classmethod async def asyncTearDown(cls): logger.info("tearing down class: {}".format(cls.__name__)) created_database = cls.mgmt_client.get_database_client(cls.database_id) try: - await asyncio.wait_for( - created_database.delete_container(cls.single_partition_container_name), - MGMT_TIMEOUT) - except Exception as containerDeleteError: - logger.warning("Exception trying to delete database {}. {}".format(created_database.id, containerDeleteError)) - finally: + await asyncio.wait_for(created_database.delete_container(cls.single_partition_container_name), MGMT_TIMEOUT) + except Exception as containerDeleteError: + logger.warning( + "Exception trying to delete database {}. {}".format(created_database.id, containerDeleteError) + ) + finally: try: await asyncio.wait_for(cls.mgmt_client.close(), MGMT_TIMEOUT) - except Exception as closeError: + except Exception as closeError: logger.warning("Exception trying to close client {}. {}".format(created_database.id, closeError)) @staticmethod async def setup_method_with_custom_transport( - custom_transport: AioHttpTransport, - default_endpoint: str = host, - key: str = master_key, - database_id: str = TEST_DATABASE_ID, - container_id: str = SINGLE_PARTITION_CONTAINER_NAME, - custom_logger: logging.Logger = logger, - **kwargs): - client = CosmosClient(default_endpoint, key, consistency_level="Session", - transport=custom_transport, logger=custom_logger, enable_diagnostics_logging=True, **kwargs) + custom_transport: AioHttpTransport, + default_endpoint: str = host, + key: str = master_key, + database_id: str = TEST_DATABASE_ID, + container_id: str = SINGLE_PARTITION_CONTAINER_NAME, + custom_logger: logging.Logger = logger, + **kwargs, + ): + client = CosmosClient( + default_endpoint, + key, + consistency_level="Session", + transport=custom_transport, + logger=custom_logger, + enable_diagnostics_logging=True, + **kwargs, + ) await client.__aenter__() db: DatabaseProxy = client.get_database_client(database_id) container: ContainerProxy = db.get_container_client(container_id) @@ -104,25 +112,29 @@ async def cleanup_method(initialized_objects: Dict[str, Any]): async def test_throws_injected_error_async(self: "TestFaultInjectionTransportAsync"): id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} - - custom_transport = FaultInjectionTransportAsync() - predicate : Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, id_value) - custom_transport.add_fault(predicate, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 10000, - CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error.")))) - - initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport(custom_transport) + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} + + custom_transport = FaultInjectionTransportAsync() + predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, id_value) + ) + custom_transport.add_fault( + predicate, + lambda r: asyncio.create_task( + FaultInjectionTransportAsync.error_after_delay( + 10000, CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ) + ), + ) + + initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( + custom_transport + ) start: float = time.perf_counter() try: container: ContainerProxy = initialized_objects["col"] await container.create_item(body=document_definition) - pytest.fail("Expected exception not thrown") + pytest.fail("Expected exception not thrown") except CosmosHttpResponseError as cosmosError: end = time.perf_counter() - start # validate response took more than 10 seconds @@ -137,34 +149,35 @@ async def test_swr_mrr_succeeds_async(self: "TestFaultInjectionTransportAsync"): expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransportAsync() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( is_write_operation_in_read_region_predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden())) + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden()), + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation: Callable[[HttpRequest, Callable[[], AsyncHttpResponse]], AioHttpTransportResponse] = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_region_sm_account_transformation: Callable[ + [HttpRequest, Callable[[], AsyncHttpResponse]], AioHttpTransportResponse + ] = lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["Read Region", "Write Region"]) + custom_transport, preferred_locations=["Read Region", "Write Region"] + ) try: container: ContainerProxy = initialized_objects["col"] @@ -188,43 +201,46 @@ async def test_swr_mrr_region_down_read_succeeds_async(self: "TestFaultInjection expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransportAsync() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( is_write_operation_in_read_region_predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden())) + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden()), + ) # Inject rule to simulate regional outage in "Read Region" - is_request_to_read_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, expected_read_region_uri) + is_request_to_read_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, expected_read_region_uri) + ) custom_transport.add_fault( - is_request_to_read_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_read_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation: Callable[[HttpRequest, Callable[[HttpRequest], AsyncHttpResponse]], AioHttpTransportResponse] = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_region_sm_account_transformation: Callable[ + [HttpRequest, Callable[[HttpRequest], AsyncHttpResponse]], AioHttpTransportResponse + ] = lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( custom_transport, default_endpoint=expected_write_region_uri, - preferred_locations=["Read Region", "Write Region"]) + preferred_locations=["Read Region", "Write Region"], + ) try: container: ContainerProxy = initialized_objects["col"] @@ -232,7 +248,7 @@ async def test_swr_mrr_region_down_read_succeeds_async(self: "TestFaultInjection request: HttpRequest = created_document.get_response_headers()["_request"] # Validate the response comes from "South Central US" (the write region) assert request.url.startswith(expected_write_region_uri) - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: read_document = await container.read_item(id_value, partition_key=id_value) @@ -248,48 +264,52 @@ async def test_swr_mrr_region_down_envoy_read_succeeds_async(self: "TestFaultInj expected_write_region_uri: str = expected_read_region_uri.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransportAsync() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( is_write_operation_in_read_region_predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden())) + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden()), + ) # Inject rule to simulate regional outage in "Read Region" - is_request_to_read_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, expected_read_region_uri) and \ - FaultInjectionTransportAsync.predicate_is_document_operation(r) + is_request_to_read_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, expected_read_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + ) custom_transport.add_fault( is_request_to_read_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 500, - CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error.")))) + lambda r: asyncio.create_task( + FaultInjectionTransportAsync.error_after_delay( + 500, CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ) + ), + ) # Inject topology transformation that would make Emulator look like a single write region # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_region_sm_account_transformation: Callable[[HttpRequest, Callable[[HttpRequest], Awaitable[AsyncHttpResponse]]], AioHttpTransportResponse] = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_region_sm_account_transformation: Callable[ + [HttpRequest, Callable[[HttpRequest], Awaitable[AsyncHttpResponse]]], AioHttpTransportResponse + ] = lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_region_sm_account_transformation) + is_get_account_predicate, emulator_as_multi_region_sm_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( custom_transport, default_endpoint=expected_write_region_uri, - preferred_locations=["Read Region", "Write Region"]) + preferred_locations=["Read Region", "Write Region"], + ) try: container: ContainerProxy = initialized_objects["col"] @@ -297,7 +317,7 @@ async def test_swr_mrr_region_down_envoy_read_succeeds_async(self: "TestFaultInj request: HttpRequest = created_document.get_response_headers()["_request"] # Validate the response comes from "South Central US" (the write region) assert request.url.startswith(expected_write_region_uri) - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: read_document = await container.read_item(id_value, partition_key=id_value) @@ -308,33 +328,29 @@ async def test_swr_mrr_region_down_envoy_read_succeeds_async(self: "TestFaultInj finally: await TestFaultInjectionTransportAsync.cleanup_method(initialized_objects) - async def test_mwr_succeeds_async(self: "TestFaultInjectionTransportAsync"): first_region_uri: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1") custom_transport = FaultInjectionTransportAsync() # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation: Callable[[HttpRequest, Callable[[HttpRequest], Awaitable[AsyncHttpResponse]]], AioHttpTransportResponse] = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation: Callable[ + [HttpRequest, Callable[[HttpRequest], Awaitable[AsyncHttpResponse]]], AioHttpTransportResponse + ] = lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"], - multiple_write_locations=True + custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True ) try: container: ContainerProxy = initialized_objects["col"] @@ -343,7 +359,7 @@ async def test_mwr_succeeds_async(self: "TestFaultInjectionTransportAsync"): request: HttpRequest = created_document.get_response_headers()["_request"] # Validate the response comes from "South Central US" (the write region) assert request.url.startswith(first_region_uri) - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: read_document = await container.read_item(id_value, partition_key=id_value) @@ -361,40 +377,38 @@ async def test_mwr_region_down_succeeds_async(self: "TestFaultInjectionTransport # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransportAsync.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + ) custom_transport.add_fault( - is_request_to_first_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_first_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( - custom_transport, - multiple_write_locations=True, - preferred_locations=["First Region", "Second Region"] + custom_transport, multiple_write_locations=True, preferred_locations=["First Region", "Second Region"] ) try: container: ContainerProxy = initialized_objects["col"] - start:float = time.perf_counter() + start: float = time.perf_counter() while (time.perf_counter() - start) < 2: # reads and writes should failover to second region upsert_document = await container.upsert_item(body=document_definition) @@ -414,55 +428,55 @@ async def test_swr_mrr_all_regions_down_for_read_async(self: "TestFaultInjection custom_transport = FaultInjectionTransportAsync() # Inject rule to disallow writes in the read-only region - is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + is_write_operation_in_read_region_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_read_region_uri) + ) custom_transport.add_fault( is_write_operation_in_read_region_predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden())) + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_write_forbidden()), + ) # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_swr_mrr( - write_region_name="Write Region", - read_region_name="Read Region", - inner=inner) + write_region_name="Write Region", read_region_name="Read Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: (FaultInjectionTransportAsync.predicate_targets_region(r, expected_write_region_uri) and - FaultInjectionTransportAsync.predicate_is_document_operation(r) and - not FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_write_region_uri)) - + is_request_to_first_region: Callable[[HttpRequest], bool] = lambda r: ( + FaultInjectionTransportAsync.predicate_targets_region(r, expected_write_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + and not FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_write_region_uri) + ) # Inject rule to simulate regional outage in "Second Region" - is_request_to_second_region: Callable[[HttpRequest], bool] = lambda \ - r: (FaultInjectionTransportAsync.predicate_targets_region(r, expected_read_region_uri) and - FaultInjectionTransportAsync.predicate_is_document_operation(r) and - not FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_write_region_uri)) + is_request_to_second_region: Callable[[HttpRequest], bool] = lambda r: ( + FaultInjectionTransportAsync.predicate_targets_region(r, expected_read_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + and not FaultInjectionTransportAsync.predicate_is_write_operation(r, expected_write_region_uri) + ) custom_transport.add_fault( - is_request_to_first_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_first_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) custom_transport.add_fault( - is_request_to_second_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_second_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"] + custom_transport, preferred_locations=["First Region", "Second Region"] ) try: container: ContainerProxy = initialized_objects["col"] @@ -480,44 +494,42 @@ async def test_mwr_all_regions_down_async(self: "TestFaultInjectionTransportAsyn # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransportAsync.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + ) # Inject rule to simulate regional outage in "Second Region" - is_request_to_second_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, second_region_uri) and \ - FaultInjectionTransportAsync.predicate_is_document_operation(r) + is_request_to_second_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, second_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + ) custom_transport.add_fault( - is_request_to_first_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_first_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) custom_transport.add_fault( - is_request_to_second_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_second_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await TestFaultInjectionTransportAsync.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"], - multiple_write_locations=True + custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True ) try: container: ContainerProxy = initialized_objects["col"] @@ -526,5 +538,6 @@ async def test_mwr_all_regions_down_async(self: "TestFaultInjectionTransportAsyn finally: await TestFaultInjectionTransportAsync.cleanup_method(initialized_objects) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_feed_range.py b/sdk/cosmos/azure-cosmos/tests/test_feed_range.py index fe292547d505..b6577077ac5f 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_feed_range.py +++ b/sdk/cosmos/azure-cosmos/tests/test_feed_range.py @@ -12,106 +12,79 @@ from azure.cosmos._change_feed.feed_range_internal import FeedRangeInternalEpk from azure.cosmos._routing.routing_range import Range + @pytest.fixture(scope="class") def setup(): - if (TestFeedRange.masterKey == '[YOUR_KEY_HERE]' or - TestFeedRange.host == '[YOUR_ENDPOINT_HERE]'): + if TestFeedRange.masterKey == "[YOUR_KEY_HERE]" or TestFeedRange.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - test_client = cosmos_client.CosmosClient(TestFeedRange.host, test_config.TestConfig.masterKey), + "tests." + ) + test_client = (cosmos_client.CosmosClient(TestFeedRange.host, test_config.TestConfig.masterKey),) created_db = test_client[0].get_database_client(TestFeedRange.TEST_DATABASE_ID) return { "created_db": created_db, - "created_collection": created_db.get_container_client(TestFeedRange.TEST_CONTAINER_ID) + "created_collection": created_db.get_container_client(TestFeedRange.TEST_CONTAINER_ID), } -test_subset_ranges = [(Range("", "FF", True, False), - Range("3F", "7F", True, False), - True), - (Range("3F", "7F", True, False), - Range("", "FF", True, False), - False), - (Range("3F", "7F", True, False), - Range("", "5F", True, False), - False), - (Range("3F", "7F", True, True), - Range("3F", "7F", True, True), - True), - (Range("3F", "7F", False, True), - Range("3F", "7F", True, True), - True), - (Range("3F", "7F", True, False), - Range("3F", "7F", True, True), - False), - (Range("3F", "7F", True, False), - Range("", "2F", True, False), - False), - (Range("3F", "3F", True, True), - Range("3F", "3F", True, True), - True), - (Range("3F", "3F", True, True), - Range("4F", "4F", True, True), - False) - ] - - -test_overlaps_ranges = [(Range("", "FF", True, False), - Range("3F", "7F", True, False), - True), - (Range("3F", "7F", True, False), - Range("", "FF", True, False), - True), - (Range("3F", "7F", True, False), - Range("", "5F", True, False), - True), - (Range("3F", "7F", True, False), - Range("3F", "7F", True, False), - True), - (Range("3F", "7F", True, False), - Range("", "2F", True, False), - False), - (Range("3F", "7F", True, False), - Range("6F", "FF", True, False), - True), - (Range("AA", "BB", True, False), - Range("CC", "FF", True, False), - False)] + +test_subset_ranges = [ + (Range("", "FF", True, False), Range("3F", "7F", True, False), True), + (Range("3F", "7F", True, False), Range("", "FF", True, False), False), + (Range("3F", "7F", True, False), Range("", "5F", True, False), False), + (Range("3F", "7F", True, True), Range("3F", "7F", True, True), True), + (Range("3F", "7F", False, True), Range("3F", "7F", True, True), True), + (Range("3F", "7F", True, False), Range("3F", "7F", True, True), False), + (Range("3F", "7F", True, False), Range("", "2F", True, False), False), + (Range("3F", "3F", True, True), Range("3F", "3F", True, True), True), + (Range("3F", "3F", True, True), Range("4F", "4F", True, True), False), +] + + +test_overlaps_ranges = [ + (Range("", "FF", True, False), Range("3F", "7F", True, False), True), + (Range("3F", "7F", True, False), Range("", "FF", True, False), True), + (Range("3F", "7F", True, False), Range("", "5F", True, False), True), + (Range("3F", "7F", True, False), Range("3F", "7F", True, False), True), + (Range("3F", "7F", True, False), Range("", "2F", True, False), False), + (Range("3F", "7F", True, False), Range("6F", "FF", True, False), True), + (Range("AA", "BB", True, False), Range("CC", "FF", True, False), False), +] + @pytest.mark.cosmosEmulator @pytest.mark.unittest @pytest.mark.usefixtures("setup") class TestFeedRange: - """Tests to verify methods for operations on feed ranges - """ + """Tests to verify methods for operations on feed ranges""" host = test_config.TestConfig.host masterKey = test_config.TestConfig.masterKey TEST_DATABASE_ID = test_config.TestConfig.TEST_DATABASE_ID TEST_CONTAINER_ID = test_config.TestConfig.TEST_MULTI_PARTITION_CONTAINER_ID - def test_partition_key_to_feed_range(self, setup): created_container = setup["created_db"].create_container( - id='container_' + str(uuid.uuid4()), - partition_key=partition_key.PartitionKey(path="/id") + id="container_" + str(uuid.uuid4()), partition_key=partition_key.PartitionKey(path="/id") ) feed_range = created_container.feed_range_from_partition_key("1") feed_range_epk = FeedRangeInternalEpk.from_json(feed_range) - assert feed_range_epk.get_normalized_range() == Range("3C80B1B7310BB39F29CC4EA05BDD461E", - "3c80b1b7310bb39f29cc4ea05bdd461f", True, False) + assert feed_range_epk.get_normalized_range() == Range( + "3C80B1B7310BB39F29CC4EA05BDD461E", "3c80b1b7310bb39f29cc4ea05bdd461f", True, False + ) setup["created_db"].delete_container(created_container) @pytest.mark.parametrize("parent_feed_range, child_feed_range, is_subset", test_subset_ranges) def test_feed_range_is_subset(self, setup, parent_feed_range, child_feed_range, is_subset): epk_parent_feed_range = FeedRangeInternalEpk(parent_feed_range).to_dict() epk_child_feed_range = FeedRangeInternalEpk(child_feed_range).to_dict() - assert setup["created_collection"].is_feed_range_subset(epk_parent_feed_range, epk_child_feed_range) == is_subset + assert ( + setup["created_collection"].is_feed_range_subset(epk_parent_feed_range, epk_child_feed_range) == is_subset + ) def test_feed_range_is_subset_from_pk(self, setup): - epk_parent_feed_range = FeedRangeInternalEpk( - Range("", "FF", True, False)).to_dict() + epk_parent_feed_range = FeedRangeInternalEpk(Range("", "FF", True, False)).to_dict() epk_child_feed_range = setup["created_collection"].feed_range_from_partition_key("1") assert setup["created_collection"].is_feed_range_subset(epk_parent_feed_range, epk_child_feed_range) @@ -119,5 +92,6 @@ def test_feed_range_is_subset_from_pk(self, setup): def test_overlaps(self, setup, range1, range2, overlaps): assert Range.overlaps(range1, range2) == overlaps -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_feed_range_async.py b/sdk/cosmos/azure-cosmos/tests/test_feed_range_async.py index 84318f4dc5bb..7ece277cb159 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_feed_range_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_feed_range_async.py @@ -11,11 +11,11 @@ from azure.cosmos.aio import CosmosClient from azure.cosmos import PartitionKey + @pytest.mark.cosmosEmulator @pytest.mark.asyncio class TestFeedRangeAsync(unittest.IsolatedAsyncioTestCase): - """Tests to verify methods for operations on feed ranges - """ + """Tests to verify methods for operations on feed ranges""" host = test_config.TestConfig.host masterKey = test_config.TestConfig.masterKey @@ -24,41 +24,39 @@ class TestFeedRangeAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) self.database_for_test = await self.client.create_database_if_not_exists(self.TEST_DATABASE_ID) - self.container_for_test = await self.database_for_test.create_container_if_not_exists(self.TEST_CONTAINER_ID, - PartitionKey(path="/id")) + self.container_for_test = await self.database_for_test.create_container_if_not_exists( + self.TEST_CONTAINER_ID, PartitionKey(path="/id") + ) async def asyncTearDown(self): await self.client.close() - async def test_partition_key_to_feed_range_async(self): created_container = await self.database_for_test.create_container( - id='container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/id") + id="container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id") ) feed_range = await created_container.feed_range_from_partition_key("1") feed_range_epk = FeedRangeInternalEpk.from_json(feed_range) - assert feed_range_epk.get_normalized_range() == Range("3C80B1B7310BB39F29CC4EA05BDD461E", - "3c80b1b7310bb39f29cc4ea05bdd461f", True, False) + assert feed_range_epk.get_normalized_range() == Range( + "3C80B1B7310BB39F29CC4EA05BDD461E", "3c80b1b7310bb39f29cc4ea05bdd461f", True, False + ) await self.database_for_test.delete_container(created_container) async def test_feed_range_is_subset_from_pk_async(self): - epk_parent_feed_range = FeedRangeInternalEpk(Range("", - "FF", - True, - False)).to_dict() + epk_parent_feed_range = FeedRangeInternalEpk(Range("", "FF", True, False)).to_dict() epk_child_feed_range = await self.container_for_test.feed_range_from_partition_key("1") assert await self.container_for_test.is_feed_range_subset(epk_parent_feed_range, epk_child_feed_range) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py b/sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py index 2c3d883a7049..317893926998 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py @@ -49,12 +49,12 @@ class TestFullTextPolicy(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.created_database = cls.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) @@ -62,37 +62,23 @@ def setUpClass(cls): def test_create_full_text_container(self): # Create a container with a valid full text policy and full text indexing policy - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } - indexing_policy = { - "fullTextIndexes": [ - {"path": "/abstract"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} + indexing_policy = {"fullTextIndexes": [{"path": "/abstract"}]} created_container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = created_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] self.test_db.delete_container(created_container.id) # Create a container with a full text policy containing only default language - full_text_policy_no_paths = { - "defaultLanguage": "en-US" - } + full_text_policy_no_paths = {"defaultLanguage": "en-US"} created_container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy_no_paths, ) @@ -101,16 +87,9 @@ def test_create_full_text_container(self): self.test_db.delete_container(created_container.id) # Create a container with a full text policy with a given path containing only default language - full_text_policy_no_langs = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract" - } - ] - } + full_text_policy_no_langs = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract"}]} created_container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy_no_langs, ) @@ -122,62 +101,49 @@ def test_replace_full_text_container(self): # Replace a container without a full text policy and full text indexing policy created_container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/id") + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id") ) created_container_properties = created_container.read() - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } - indexing_policy = { - "fullTextIndexes": [ - {"path": "/abstract"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} + indexing_policy = {"fullTextIndexes": [{"path": "/abstract"}]} # Replace the container with new policies replaced_container = self.test_db.replace_container( container=created_container.id, partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = replaced_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] - assert created_container_properties['indexingPolicy'] != properties['indexingPolicy'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] + assert created_container_properties["indexingPolicy"] != properties["indexingPolicy"] self.test_db.delete_container(created_container.id) # Replace a container with a valid full text policy and full text indexing policy created_container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) created_container_properties = created_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] # Replace the container with new policies - full_text_policy['fullTextPaths'][0]['path'] = "/new_path" - indexing_policy['fullTextIndexes'][0]['path'] = "/new_path" + full_text_policy["fullTextPaths"][0]["path"] = "/new_path" + indexing_policy["fullTextIndexes"][0]["path"] = "/new_path" replaced_container = self.test_db.replace_container( container=created_container.id, partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = replaced_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] - assert created_container_properties['fullTextPolicy'] != properties['fullTextPolicy'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] + assert created_container_properties["fullTextPolicy"] != properties["fullTextPolicy"] assert created_container_properties["indexingPolicy"] != properties["indexingPolicy"] self.test_db.delete_container(created_container.id) @@ -185,18 +151,13 @@ def test_fail_create_full_text_policy(self): # Pass a full text policy with a wrongly formatted path full_text_policy_wrong_path = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "abstract", - "language": "en-US" - } - ] + "fullTextPaths": [{"path": "abstract", "language": "en-US"}], } try: self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_wrong_path + full_text_policy=full_text_policy_wrong_path, ) pytest.fail("Container creation should have failed for invalid path.") except exceptions.CosmosHttpResponseError as e: @@ -206,66 +167,48 @@ def test_fail_create_full_text_policy(self): # Pass a full text policy with an unsupported default language full_text_policy_wrong_default = { "defaultLanguage": "spa-SPA", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] + "fullTextPaths": [{"path": "/abstract", "language": "en-US"}], } try: self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_wrong_default + full_text_policy=full_text_policy_wrong_default, ) pytest.fail("Container creation should have failed for wrong supported language.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:"\ - in e.http_error_message + assert ( + "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:" + in e.http_error_message + ) # Pass a full text policy with an unsupported path language full_text_policy_wrong_default = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "spa-SPA" - } - ] + "fullTextPaths": [{"path": "/abstract", "language": "spa-SPA"}], } try: self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_wrong_default + full_text_policy=full_text_policy_wrong_default, ) pytest.fail("Container creation should have failed for wrong supported language.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:"\ - in e.http_error_message + assert ( + "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:" + in e.http_error_message + ) def test_fail_create_full_text_indexing_policy(self): - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} # Pass a full text indexing policy with a path not present in the full text policy - indexing_policy_wrong_path = { - "fullTextIndexes": [ - {"path": "/path"} - ] - } + indexing_policy_wrong_path = {"fullTextIndexes": [{"path": "/path"}]} try: container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy_wrong_path, ) @@ -274,21 +217,19 @@ def test_fail_create_full_text_indexing_policy(self): # pytest.fail("Container creation should have failed for lack of embedding policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The path of the Full Text Index /path does not match the path specified in the Full Text Policy"\ - in e.http_error_message + assert ( + "The path of the Full Text Index /path does not match the path specified in the Full Text Policy" + in e.http_error_message + ) # Pass a full text indexing policy with a wrongly formatted path - indexing_policy_wrong_path = { - "fullTextIndexes": [ - {"path": "abstract"} - ] - } + indexing_policy_wrong_path = {"fullTextIndexes": [{"path": "abstract"}]} try: self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy_wrong_path, - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) pytest.fail("Container creation should have failed for invalid path.") except exceptions.CosmosHttpResponseError as e: @@ -296,17 +237,13 @@ def test_fail_create_full_text_indexing_policy(self): assert "Full-text index specification at index (0) contains invalid path" in e.http_error_message # Pass a full text indexing policy without a path field - indexing_policy_no_path = { - "fullTextIndexes": [ - {"not_path": "abstract"} - ] - } + indexing_policy_no_path = {"fullTextIndexes": [{"not_path": "abstract"}]} try: self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy_no_path, - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) pytest.fail("Container creation should have failed for missing path.") except exceptions.CosmosHttpResponseError as e: @@ -317,29 +254,17 @@ def test_fail_create_full_text_indexing_policy(self): @pytest.mark.skip def test_supported_languages_in_full_text_policy(self): # Create the container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - {"path": "/abstract", "language": "en-US"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: for lang in self.supported_languages.values(): - updated_policy = { - "defaultLanguage": lang, - "fullTextPaths": [ - {"path": "/abstract", "language": lang} - ] - } + updated_policy = {"defaultLanguage": lang, "fullTextPaths": [{"path": "/abstract", "language": lang}]} replaced_container = self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -350,30 +275,18 @@ def test_supported_languages_in_full_text_policy(self): @pytest.mark.skip def test_default_language_fallback(self): # Use centralized dictionaries - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - {"path": "/abstract"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract"}]} container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: for language_code in self.supported_languages.values(): # Replace the container's full text policy for each language - updated_policy = { - "defaultLanguage": language_code, - "fullTextPaths": [ - {"path": "/abstract"} - ] - } + updated_policy = {"defaultLanguage": language_code, "fullTextPaths": [{"path": "/abstract"}]} replaced_container = self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -397,36 +310,18 @@ def test_default_language_fallback(self): @pytest.mark.skip def test_mismatched_default_and_path_languages(self): # Create the initial container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: # Update the full text policy with mismatched default and path languages - updated_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "fr-FR" - } - ] - } + updated_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "fr-FR"}]} replaced_container = self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -439,19 +334,11 @@ def test_mismatched_default_and_path_languages(self): @pytest.mark.skip def test_replace_full_text_policy_with_different_languages(self): # Create the initial container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: @@ -459,17 +346,10 @@ def test_replace_full_text_policy_with_different_languages(self): for language in self.supported_languages.values(): updated_policy = { "defaultLanguage": language, - "fullTextPaths": [ - { - "path": "/abstract", - "language": language - } - ] + "fullTextPaths": [{"path": "/abstract", "language": language}], } replaced_container = self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -482,19 +362,11 @@ def test_replace_full_text_policy_with_different_languages(self): @pytest.mark.skip def test_replace_full_text_policy_with_different_path_languages(self): # Create the initial container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: @@ -502,17 +374,10 @@ def test_replace_full_text_policy_with_different_path_languages(self): for language in self.supported_languages.values(): updated_policy = { "defaultLanguage": "en-US", # Keep default language as English - "fullTextPaths": [ - { - "path": "/abstract", - "language": language - } - ] + "fullTextPaths": [{"path": "/abstract", "language": language}], } replaced_container = self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -528,24 +393,18 @@ def test_multi_path_multi_language_policy(self): full_text_paths_multi = [] for lang_code in self.supported_languages.values(): # Use a unique, valid suffix for each language (replace '-' with '_') - suffix = lang_code.replace('-', '_').lower() - full_text_paths_multi.append({ - "path": f"/abstract_{suffix}", - "language": lang_code - }) - full_text_policy_multi = { - "defaultLanguage": "en-US", - "fullTextPaths": full_text_paths_multi - } + suffix = lang_code.replace("-", "_").lower() + full_text_paths_multi.append({"path": f"/abstract_{suffix}", "language": lang_code}) + full_text_policy_multi = {"defaultLanguage": "en-US", "fullTextPaths": full_text_paths_multi} container = self.test_db.create_container( - id='full_text_container_multi_' + str(uuid.uuid4()), + id="full_text_container_multi_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_multi + full_text_policy=full_text_policy_multi, ) try: # Insert one item per language, each with its own path for lang_code in self.supported_languages.values(): - suffix = lang_code.replace('-', '_').lower() + suffix = lang_code.replace("-", "_").lower() item = { "id": str(uuid.uuid4()), f"abstract_{suffix}": self.language_abstracts[lang_code], @@ -555,12 +414,12 @@ def test_multi_path_multi_language_policy(self): properties = container.read() for path_entry in properties["fullTextPolicy"]["fullTextPaths"]: lang = path_entry["language"] - suffix = lang.replace('-', '_').lower() + suffix = lang.replace("-", "_").lower() assert path_entry["path"] == f"/abstract_{suffix}" assert lang in self.language_abstracts # Perform a full-text search for each language for lang_code in self.supported_languages.values(): - suffix = lang_code.replace('-', '_').lower() + suffix = lang_code.replace("-", "_").lower() query = ( f"SELECT TOP 1 * FROM c WHERE FullTextContains(c.abstract_{suffix}, " f"'{self.search_terms[lang_code]}') " @@ -577,36 +436,21 @@ def test_multi_path_multi_language_policy(self): @pytest.mark.skip def test_unsupported_language_in_full_text_policy(self): # Create the container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: # Replace the full-text policy with an unsupported language updated_policy = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "unsupported-LANG" - } - ] + "fullTextPaths": [{"path": "/abstract", "language": "unsupported-LANG"}], } try: self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) pytest.fail("Container replacement should have failed for unsupported language.") except exceptions.CosmosHttpResponseError as e: @@ -616,5 +460,5 @@ def test_unsupported_language_in_full_text_policy(self): self.test_db.delete_container(container.id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py b/sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py index 378ce6138b81..9e1bb14e192f 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py @@ -55,12 +55,12 @@ class TestFullTextPolicyAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.cosmos_sync_client = CosmosSyncClient(cls.host, cls.masterKey) cls.test_db = cls.cosmos_sync_client.create_database(str(uuid.uuid4())) @@ -77,37 +77,23 @@ async def tearDown(self): async def test_create_full_text_container_async(self): # Create a container with a valid full text policy and full text indexing policy - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } - indexing_policy = { - "fullTextIndexes": [ - {"path": "/abstract"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} + indexing_policy = {"fullTextIndexes": [{"path": "/abstract"}]} created_container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = await created_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] await self.test_db.delete_container(created_container.id) # Create a container with a full text policy containing only default language - full_text_policy_no_paths = { - "defaultLanguage": "en-US" - } + full_text_policy_no_paths = {"defaultLanguage": "en-US"} created_container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy_no_paths, ) @@ -116,16 +102,9 @@ async def test_create_full_text_container_async(self): await self.test_db.delete_container(created_container.id) # Create a container with a full text policy with a given path containing only default language - full_text_policy_no_langs = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract" - } - ] - } + full_text_policy_no_langs = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract"}]} created_container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy_no_langs, ) @@ -136,62 +115,49 @@ async def test_replace_full_text_container_async(self): # Replace a container without a full text policy and full text indexing policy created_container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/id") + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id") ) created_container_properties = await created_container.read() - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } - indexing_policy = { - "fullTextIndexes": [ - {"path": "/abstract"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} + indexing_policy = {"fullTextIndexes": [{"path": "/abstract"}]} # Replace the container with new policies replaced_container = await self.test_db.replace_container( container=created_container.id, partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] - assert created_container_properties['indexingPolicy'] != properties['indexingPolicy'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] + assert created_container_properties["indexingPolicy"] != properties["indexingPolicy"] await self.test_db.delete_container(created_container.id) # Replace a container with a valid full text policy and full text indexing policy created_container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) created_container_properties = await created_container.read() assert created_container_properties["fullTextPolicy"] == full_text_policy - assert created_container_properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] + assert created_container_properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] # Replace the container with new policies - full_text_policy['fullTextPaths'][0]['path'] = "/new_path" - indexing_policy['fullTextIndexes'][0]['path'] = "/new_path" + full_text_policy["fullTextPaths"][0]["path"] = "/new_path" + indexing_policy["fullTextIndexes"][0]["path"] = "/new_path" replaced_container = await self.test_db.replace_container( container=created_container.id, partition_key=PartitionKey(path="/id"), full_text_policy=full_text_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == full_text_policy - assert properties["indexingPolicy"]['fullTextIndexes'] == indexing_policy['fullTextIndexes'] - assert created_container_properties['fullTextPolicy'] != properties['fullTextPolicy'] + assert properties["indexingPolicy"]["fullTextIndexes"] == indexing_policy["fullTextIndexes"] + assert created_container_properties["fullTextPolicy"] != properties["fullTextPolicy"] assert created_container_properties["indexingPolicy"] != properties["indexingPolicy"] self.test_db.delete_container(created_container.id) @@ -199,18 +165,13 @@ async def test_fail_create_full_text_policy_async(self): # Pass a full text policy with a wrongly formatted path full_text_policy_wrong_path = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "abstract", - "language": "en-US" - } - ] + "fullTextPaths": [{"path": "abstract", "language": "en-US"}], } try: await self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_wrong_path + full_text_policy=full_text_policy_wrong_path, ) pytest.fail("Container creation should have failed for invalid path.") except exceptions.CosmosHttpResponseError as e: @@ -220,66 +181,48 @@ async def test_fail_create_full_text_policy_async(self): # Pass a full text policy with an unsupported default language full_text_policy_wrong_default = { "defaultLanguage": "spa-SPA", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] + "fullTextPaths": [{"path": "/abstract", "language": "en-US"}], } try: await self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_wrong_default + full_text_policy=full_text_policy_wrong_default, ) pytest.fail("Container creation should have failed for wrong supported language.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:" \ - in e.http_error_message + assert ( + "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:" + in e.http_error_message + ) # Pass a full text policy with an unsupported path language full_text_policy_wrong_default = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "spa-SPA" - } - ] + "fullTextPaths": [{"path": "/abstract", "language": "spa-SPA"}], } try: await self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_wrong_default + full_text_policy=full_text_policy_wrong_default, ) pytest.fail("Container creation should have failed for wrong supported language.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:" \ - in e.http_error_message + assert ( + "The Full Text Policy contains an unsupported language spa-SPA. Supported languages are:" + in e.http_error_message + ) async def test_fail_create_full_text_indexing_policy_async(self): - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} # Pass a full text indexing policy with a path not present in the full text policy - indexing_policy_wrong_path = { - "fullTextIndexes": [ - {"path": "/path"} - ] - } + indexing_policy_wrong_path = {"fullTextIndexes": [{"path": "/path"}]} try: container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy_wrong_path, ) @@ -288,21 +231,19 @@ async def test_fail_create_full_text_indexing_policy_async(self): # pytest.fail("Container creation should have failed for lack of embedding policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The path of the Full Text Index /path does not match the path specified in the Full Text Policy" \ - in e.http_error_message + assert ( + "The path of the Full Text Index /path does not match the path specified in the Full Text Policy" + in e.http_error_message + ) # Pass a full text indexing policy with a wrongly formatted path - indexing_policy_wrong_path = { - "fullTextIndexes": [ - {"path": "abstract"} - ] - } + indexing_policy_wrong_path = {"fullTextIndexes": [{"path": "abstract"}]} try: await self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy_wrong_path, - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) pytest.fail("Container creation should have failed for invalid path.") except exceptions.CosmosHttpResponseError as e: @@ -310,17 +251,13 @@ async def test_fail_create_full_text_indexing_policy_async(self): assert "Full-text index specification at index (0) contains invalid path" in e.http_error_message # Pass a full text indexing policy without a path field - indexing_policy_no_path = { - "fullTextIndexes": [ - {"not_path": "abstract"} - ] - } + indexing_policy_no_path = {"fullTextIndexes": [{"not_path": "abstract"}]} try: await self.test_db.create_container( - id='full_text_container', + id="full_text_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy_no_path, - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) pytest.fail("Container creation should have failed for missing path.") except exceptions.CosmosHttpResponseError as e: @@ -330,29 +267,17 @@ async def test_fail_create_full_text_indexing_policy_async(self): # Skipped until testing pipeline is set up for full text multi-language support @pytest.mark.skip async def test_supported_languages_in_full_text_policy_async(self): - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - {"path": "/abstract", "language": "en-US"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: for lang in self.supported_languages.values(): - updated_policy = { - "defaultLanguage": lang, - "fullTextPaths": [ - {"path": "/abstract", "language": lang} - ] - } + updated_policy = {"defaultLanguage": lang, "fullTextPaths": [{"path": "/abstract", "language": lang}]} replaced_container = await self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -362,29 +287,17 @@ async def test_supported_languages_in_full_text_policy_async(self): # Skipped until testing pipeline is set up for full text multi-language support @pytest.mark.skip async def test_default_language_fallback_async(self): - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - {"path": "/abstract"} - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract"}]} container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: for language_code in self.supported_languages.values(): - updated_policy = { - "defaultLanguage": language_code, - "fullTextPaths": [ - {"path": "/abstract"} - ] - } + updated_policy = {"defaultLanguage": language_code, "fullTextPaths": [{"path": "/abstract"}]} replaced_container = await self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -407,36 +320,18 @@ async def test_default_language_fallback_async(self): @pytest.mark.skip async def test_mismatched_default_and_path_languages_async(self): # Create the container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: # Replace the full-text policy with mismatched default and path languages - updated_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "fr-FR" - } - ] - } + updated_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "fr-FR"}]} replaced_container = await self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -447,37 +342,22 @@ async def test_mismatched_default_and_path_languages_async(self): @pytest.mark.skip async def test_unsupported_language_in_full_text_policy_async(self): # Create the container with English as the default language - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: # Replace the full-text policy with an unsupported language updated_policy = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "unsupported-LANG" - } - ] + "fullTextPaths": [{"path": "/abstract", "language": "unsupported-LANG"}], } try: await self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) pytest.fail("Container replacement should have failed for unsupported language.") except exceptions.CosmosHttpResponseError as e: @@ -490,36 +370,21 @@ async def test_unsupported_language_in_full_text_policy_async(self): @pytest.mark.skip async def test_replace_full_text_policy_with_different_languages_async(self): - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: for language in self.supported_languages.values(): updated_policy = { "defaultLanguage": language, - "fullTextPaths": [ - { - "path": "/abstract", - "language": language - } - ] + "fullTextPaths": [{"path": "/abstract", "language": language}], } replaced_container = await self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -530,36 +395,21 @@ async def test_replace_full_text_policy_with_different_languages_async(self): @pytest.mark.skip async def test_replace_full_text_policy_with_different_path_languages_async(self): - full_text_policy = { - "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": "en-US" - } - ] - } + full_text_policy = {"defaultLanguage": "en-US", "fullTextPaths": [{"path": "/abstract", "language": "en-US"}]} container = await self.test_db.create_container( - id='full_text_container' + str(uuid.uuid4()), + id="full_text_container" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy + full_text_policy=full_text_policy, ) try: for language in self.supported_languages.values(): updated_policy = { "defaultLanguage": "en-US", - "fullTextPaths": [ - { - "path": "/abstract", - "language": language - } - ] + "fullTextPaths": [{"path": "/abstract", "language": language}], } replaced_container = await self.test_db.replace_container( - container=container.id, - partition_key=PartitionKey(path="/id"), - full_text_policy=updated_policy + container=container.id, partition_key=PartitionKey(path="/id"), full_text_policy=updated_policy ) properties = await replaced_container.read() assert properties["fullTextPolicy"] == updated_policy @@ -573,24 +423,18 @@ async def test_multi_path_multi_language_policy_async(self): full_text_paths_multi = [] for lang_code in self.supported_languages.values(): # Use a unique, valid suffix for each language (replace '-' with '_') - suffix = lang_code.replace('-', '_').lower() - full_text_paths_multi.append({ - "path": f"/abstract_{suffix}", - "language": lang_code - }) - full_text_policy_multi = { - "defaultLanguage": "en-US", - "fullTextPaths": full_text_paths_multi - } + suffix = lang_code.replace("-", "_").lower() + full_text_paths_multi.append({"path": f"/abstract_{suffix}", "language": lang_code}) + full_text_policy_multi = {"defaultLanguage": "en-US", "fullTextPaths": full_text_paths_multi} container = await self.test_db.create_container( - id='full_text_container_multi_' + str(uuid.uuid4()), + id="full_text_container_multi_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), - full_text_policy=full_text_policy_multi + full_text_policy=full_text_policy_multi, ) try: # Insert one item per language, each with its own path for lang_code in self.supported_languages.values(): - suffix = lang_code.replace('-', '_').lower() + suffix = lang_code.replace("-", "_").lower() item = { "id": str(uuid.uuid4()), f"abstract_{suffix}": self.language_abstracts[lang_code], @@ -600,12 +444,12 @@ async def test_multi_path_multi_language_policy_async(self): properties = await container.read() for path_entry in properties["fullTextPolicy"]["fullTextPaths"]: lang = path_entry["language"] - suffix = lang.replace('-', '_').lower() + suffix = lang.replace("-", "_").lower() assert path_entry["path"] == f"/abstract_{suffix}" assert lang in self.language_abstracts # Perform a full-text search for each language for lang_code in self.supported_languages.values(): - suffix = lang_code.replace('-', '_').lower() + suffix = lang_code.replace("-", "_").lower() query = ( f"SELECT TOP 1 * FROM c WHERE FullTextContains(c.abstract_{suffix}, " f"'{self.search_terms[lang_code]}') " @@ -619,5 +463,5 @@ async def test_multi_path_multi_language_policy_async(self): await self.test_db.delete_container(container.id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_globaldb.py b/sdk/cosmos/azure-cosmos/tests/test_globaldb.py index 378052b30026..7bd6c03b3749 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_globaldb.py +++ b/sdk/cosmos/azure-cosmos/tests/test_globaldb.py @@ -10,16 +10,24 @@ import azure.cosmos.cosmos_client as cosmos_client import test_config -from azure.cosmos import documents, exceptions, DatabaseProxy, ContainerProxy, \ - _synchronized_request, _endpoint_discovery_retry_policy, PartitionKey, _location_cache +from azure.cosmos import ( + documents, + exceptions, + DatabaseProxy, + ContainerProxy, + _synchronized_request, + _endpoint_discovery_retry_policy, + PartitionKey, + _location_cache, +) from azure.cosmos.http_constants import HttpHeaders, StatusCodes, SubStatusCodes, ResourceType from azure.core.exceptions import ServiceRequestError # TODO: These tests need to be properly configured in the pipeline with locational endpoints. # For now we use the is_not_default_host() method to skip regional checks. -contoso_west = 'https://contoso-westus.documents.azure.com:443/' -contoso_west2 = 'https://contoso-westus2.documents.azure.com:443/' +contoso_west = "https://contoso-westus.documents.azure.com:443/" +contoso_west2 = "https://contoso-westus2.documents.azure.com:443/" def is_not_default_host(endpoint): @@ -29,27 +37,27 @@ def is_not_default_host(endpoint): def _mock_execute_function(function, *args, **kwargs): - response = test_config.FakeResponse({'x-ms-substatus': SubStatusCodes.WRITE_FORBIDDEN}) + response = test_config.FakeResponse({"x-ms-substatus": SubStatusCodes.WRITE_FORBIDDEN}) raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.FORBIDDEN, - message="Write Forbidden", - response=response) + status_code=StatusCodes.FORBIDDEN, message="Write Forbidden", response=response + ) -def _mock_pipeline_run_function_error(pipeline_client, - request, - **kwargs): - response = test_config.FakePipelineResponse(headers={'x-ms-substatus': SubStatusCodes.WRITE_FORBIDDEN}, - status_code=StatusCodes.FORBIDDEN, message="Write Forbidden") +def _mock_pipeline_run_function_error(pipeline_client, request, **kwargs): + response = test_config.FakePipelineResponse( + headers={"x-ms-substatus": SubStatusCodes.WRITE_FORBIDDEN}, + status_code=StatusCodes.FORBIDDEN, + message="Write Forbidden", + ) return response def _mock_get_database_account(url_connection=None, **kwargs): database_account = documents.DatabaseAccount() - database_account._ReadableLocations = \ - [{'databaseAccountEndpoint': TestGlobalDB.host, 'name': 'West US 2'}] - database_account._WritableLocations = \ - [{'databaseAccountEndpoint': TestGlobalDB.host.replace("localhost", "127.0.0.1"), 'name': 'West US'}] + database_account._ReadableLocations = [{"databaseAccountEndpoint": TestGlobalDB.host, "name": "West US 2"}] + database_account._WritableLocations = [ + {"databaseAccountEndpoint": TestGlobalDB.host.replace("localhost", "127.0.0.1"), "name": "West US"} + ] return database_account @@ -57,6 +65,7 @@ def _mock_pipeline_run_function(pipeline_client, request, **kwargs): assert "127.0.0.1" in request.url return test_config.FakePipelineResponse() + @pytest.mark.cosmosEmulator class TestGlobalDB(unittest.TestCase): host = test_config.TestConfig.global_host @@ -85,19 +94,19 @@ def __AssertHTTPFailureWithStatus(self, status_code, sub_status, func, *args, ** """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) self.assertEqual(inst.sub_status, sub_status) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_GLOBAL_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_GLOBAL_ENDPOINT_HERE]": return ( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.test_db = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) @@ -107,13 +116,11 @@ def test_global_db_read_write_endpoints(self): connection_policy = documents.ConnectionPolicy() connection_policy.EnableEndpointDiscovery = False - client = cosmos_client.CosmosClient(TestGlobalDB.host, TestGlobalDB.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + TestGlobalDB.host, TestGlobalDB.masterKey, connection_policy=connection_policy + ) - document_definition = {'id': 'doc', - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "doc", "pk": "pk", "name": "sample document", "key": "value"} # When EnableEndpointDiscovery is False, WriteEndpoint is set to the endpoint passed while creating the client instance created_document = self.test_coll.create_item(document_definition) @@ -122,7 +129,7 @@ def test_global_db_read_write_endpoints(self): # Delay to get these resources replicated to read location due to Eventual consistency time.sleep(5) - read_response = self.test_coll.read_item(item=created_document, partition_key=created_document['pk']) + read_response = self.test_coll.read_item(item=created_document, partition_key=created_document["pk"]) content_location = str(read_response.get_response_headers()[HttpHeaders.ContentLocation]) # When EnableEndpointDiscovery is False, ReadEndpoint is set to the endpoint passed while creating the client @@ -130,10 +137,11 @@ def test_global_db_read_write_endpoints(self): assert client.client_connection.ReadEndpoint == TestGlobalDB.host connection_policy.EnableEndpointDiscovery = True - document_definition['id'] = 'doc2' + document_definition["id"] = "doc2" - client = cosmos_client.CosmosClient(TestGlobalDB.host, TestGlobalDB.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + TestGlobalDB.host, TestGlobalDB.masterKey, connection_policy=connection_policy + ) database = client.get_database_client(self.configs.TEST_DATABASE_ID) container = database.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -146,7 +154,7 @@ def test_global_db_read_write_endpoints(self): # Delay to get these resources replicated to read location due to Eventual consistency time.sleep(5) - read_response = container.read_item(item=created_document, partition_key=created_document['pk']) + read_response = container.read_item(item=created_document, partition_key=created_document["pk"]) content_location = str(read_response.get_response_headers()[HttpHeaders.ContentLocation]) content_location_url = urlparse(content_location) @@ -161,13 +169,11 @@ def test_global_db_endpoint_discovery(self): connection_policy = documents.ConnectionPolicy() connection_policy.EnableEndpointDiscovery = False - read_location_client = cosmos_client.CosmosClient(self.read_location_host, - self.masterKey, - connection_policy=connection_policy) + read_location_client = cosmos_client.CosmosClient( + self.read_location_host, self.masterKey, connection_policy=connection_policy + ) - document_definition = {'id': 'doc1', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "doc1", "name": "sample document", "key": "value"} database = read_location_client.get_database_client(self.configs.TEST_DATABASE_ID) container = database.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -176,50 +182,46 @@ def test_global_db_endpoint_discovery(self): # the endpoint that was used to create the client instance(which happens to be a read endpoint) if is_not_default_host(self.read_location_host): self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - SubStatusCodes.WRITE_FORBIDDEN, - container.create_item, - document_definition) + StatusCodes.FORBIDDEN, SubStatusCodes.WRITE_FORBIDDEN, container.create_item, document_definition + ) # Query databases will pass for the read location client as it's a GET operation - list(read_location_client.query_databases( - query='SELECT * FROM root r WHERE r.id=@id', - parameters=[{'name': '@id', 'value': self.test_db.id}])) + list( + read_location_client.query_databases( + query="SELECT * FROM root r WHERE r.id=@id", parameters=[{"name": "@id", "value": self.test_db.id}] + ) + ) connection_policy.EnableEndpointDiscovery = True - read_location_client = cosmos_client.CosmosClient(self.read_location_host, - self.masterKey, - connection_policy=connection_policy) + read_location_client = cosmos_client.CosmosClient( + self.read_location_host, self.masterKey, connection_policy=connection_policy + ) database = read_location_client.get_database_client(self.configs.TEST_DATABASE_ID) container = database.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) # CreateDocument call will go to the WriteEndpoint as EnableEndpointDiscovery is set to True and client will resolve the right endpoint based on the operation created_document = container.create_item(document_definition) - self.assertEqual(created_document['id'], document_definition['id']) + self.assertEqual(created_document["id"], document_definition["id"]) def test_global_db_preferred_locations(self): connection_policy = documents.ConnectionPolicy() connection_policy.EnableEndpointDiscovery = True - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) - document_definition = {'id': 'doc3', - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "doc3", "pk": "pk", "name": "sample document", "key": "value"} database = client.get_database_client(self.configs.TEST_DATABASE_ID) container = database.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) created_document = container.create_item(document_definition) - self.assertEqual(created_document['id'], document_definition['id']) + self.assertEqual(created_document["id"], document_definition["id"]) # Delay to get these resources replicated to read location due to Eventual consistency time.sleep(5) - read_response = container.read_item(item=created_document, partition_key=created_document['pk']) + read_response = container.read_item(item=created_document, partition_key=created_document["pk"]) content_location = str(read_response.get_response_headers()[HttpHeaders.ContentLocation]) content_location_url = urlparse(content_location) @@ -233,19 +235,18 @@ def test_global_db_preferred_locations(self): if is_not_default_host(self.read_location2): # Client init will fail if no read location given connection_policy.PreferredLocations = [self.read_location2] - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) database = client.get_database_client(self.configs.TEST_DATABASE_ID) container = database.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition['id'] = 'doc4' + document_definition["id"] = "doc4" created_document = container.create_item(document_definition) # Delay to get these resources replicated to read location due to Eventual consistency time.sleep(5) - read_response = container.read_item(item=created_document, partition_key=created_document['pk']) + read_response = container.read_item(item=created_document, partition_key=created_document["pk"]) content_location = str(read_response.get_response_headers()[HttpHeaders.ContentLocation]) content_location_url = urlparse(content_location) @@ -259,50 +260,47 @@ def test_global_db_endpoint_assignments(self): connection_policy = documents.ConnectionPolicy() connection_policy.EnableEndpointDiscovery = False - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) # When EnableEndpointDiscovery is set to False, both Read and Write Endpoints point to endpoint passed while creating the client instance self.assertEqual(client.client_connection.WriteEndpoint, self.host) self.assertEqual(client.client_connection.ReadEndpoint, self.host) connection_policy.EnableEndpointDiscovery = True - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) # If no preferred locations is set, we return the write endpoint as ReadEndpoint for better latency performance, write endpoint is set as expected - self.assertEqual(client.client_connection.WriteEndpoint, - client.client_connection.ReadEndpoint) + self.assertEqual(client.client_connection.WriteEndpoint, client.client_connection.ReadEndpoint) if is_not_default_host(self.write_location_host): - self.assertEqual(client.client_connection.WriteEndpoint, - self.write_location_host) + self.assertEqual(client.client_connection.WriteEndpoint, self.write_location_host) if is_not_default_host(self.read_location2): connection_policy.PreferredLocations = [self.read_location2] - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) # Test that the preferred location is set as ReadEndpoint instead of default write endpoint when no preference is set - self.assertEqual(client.client_connection._global_endpoint_manager.WriteEndpoint, - self.write_location_host) - self.assertEqual(client.client_connection._global_endpoint_manager.ReadEndpoint, - self.read_location2_host) + self.assertEqual(client.client_connection._global_endpoint_manager.WriteEndpoint, self.write_location_host) + self.assertEqual(client.client_connection._global_endpoint_manager.ReadEndpoint, self.read_location2_host) def test_global_db_update_locations_cache(self): client = cosmos_client.CosmosClient(self.host, self.masterKey) - writable_locations = [{'name': self.write_location, - 'databaseAccountEndpoint': self.write_location_host}] - readable_locations = [{'name': self.read_location, - 'databaseAccountEndpoint': self.read_location_host}, - {'name': self.read_location2, - 'databaseAccountEndpoint': self.read_location2_host}] - - if (is_not_default_host(self.write_location_host) - and is_not_default_host(self.read_location_host) - and is_not_default_host(self.read_location2_host)): - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + writable_locations = [{"name": self.write_location, "databaseAccountEndpoint": self.write_location_host}] + readable_locations = [ + {"name": self.read_location, "databaseAccountEndpoint": self.read_location_host}, + {"name": self.read_location2, "databaseAccountEndpoint": self.read_location2_host}, + ] + + if ( + is_not_default_host(self.write_location_host) + and is_not_default_host(self.read_location_host) + and is_not_default_host(self.read_location2_host) + ): + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # If no preferred locations is set, we return the write endpoint as ReadEndpoint for better latency performance, write endpoint is set as expected self.assertEqual(write_endpoint, self.write_location_host) @@ -311,107 +309,117 @@ def test_global_db_update_locations_cache(self): writable_locations = [] readable_locations = [] - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # If writable_locations and readable_locations are empty, both Read and Write Endpoints point to endpoint passed while creating the client instance self.assertEqual(write_endpoint, self.host) self.assertEqual(read_endpoint, self.host) - writable_locations = [{'name': self.write_location, - 'databaseAccountEndpoint': self.write_location_host}] + writable_locations = [{"name": self.write_location, "databaseAccountEndpoint": self.write_location_host}] readable_locations = [] - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # If there are no readable_locations, we use the write endpoint as ReadEndpoint self.assertEqual(write_endpoint, self.write_location_host) self.assertEqual(read_endpoint, self.write_location_host) writable_locations = [] - readable_locations = [{'name': self.read_location, - 'databaseAccountEndpoint': self.read_location_host}] + readable_locations = [{"name": self.read_location, "databaseAccountEndpoint": self.read_location_host}] - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # If there are no writable_locations, both Read and Write Endpoints point to endpoint passed while creating the client instance self.assertEqual(write_endpoint, self.host) self.assertEqual(read_endpoint, self.host) - writable_locations = [{'name': self.write_location, - 'databaseAccountEndpoint': self.write_location_host}] - readable_locations = [{'name': self.read_location, - 'databaseAccountEndpoint': self.read_location_host}, - {'name': self.read_location2, - 'databaseAccountEndpoint': self.read_location2_host}] + writable_locations = [{"name": self.write_location, "databaseAccountEndpoint": self.write_location_host}] + readable_locations = [ + {"name": self.read_location, "databaseAccountEndpoint": self.read_location_host}, + {"name": self.read_location2, "databaseAccountEndpoint": self.read_location2_host}, + ] connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = [self.read_location2] - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # Test that the preferred location is set as ReadEndpoint instead of default write endpoint when no preference is set self.assertEqual(write_endpoint, self.write_location_host) self.assertEqual(read_endpoint, self.read_location2_host) - writable_locations = [{'name': self.write_location, - 'databaseAccountEndpoint': self.write_location_host}, - {'name': self.read_location2, - 'databaseAccountEndpoint': self.read_location2_host}] - readable_locations = [{'name': self.read_location, - 'databaseAccountEndpoint': self.read_location_host}] + writable_locations = [ + {"name": self.write_location, "databaseAccountEndpoint": self.write_location_host}, + {"name": self.read_location2, "databaseAccountEndpoint": self.read_location2_host}, + ] + readable_locations = [{"name": self.read_location, "databaseAccountEndpoint": self.read_location_host}] connection_policy = documents.ConnectionPolicy() connection_policy.PreferredLocations = [self.read_location2] - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # Test that the preferred location is chosen from the WriteLocations if it's not present in the ReadLocations self.assertEqual(write_endpoint, self.write_location_host) self.assertEqual(read_endpoint, self.read_location2_host) - writable_locations = [{'name': self.write_location, - 'databaseAccountEndpoint': self.write_location_host}] - readable_locations = [{'name': self.read_location, - 'databaseAccountEndpoint': self.read_location_host}, - {'name': self.read_location2, - 'databaseAccountEndpoint': self.read_location2_host}] + writable_locations = [{"name": self.write_location, "databaseAccountEndpoint": self.write_location_host}] + readable_locations = [ + {"name": self.read_location, "databaseAccountEndpoint": self.read_location_host}, + {"name": self.read_location2, "databaseAccountEndpoint": self.read_location2_host}, + ] connection_policy.EnableEndpointDiscovery = False - client = cosmos_client.CosmosClient(self.host, self.masterKey, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) - write_endpoint, read_endpoint = client.client_connection._global_endpoint_manager.location_cache.update_location_cache( - writable_locations, readable_locations) + write_endpoint, read_endpoint = ( + client.client_connection._global_endpoint_manager.location_cache.update_location_cache( + writable_locations, readable_locations + ) + ) # If EnableEndpointDiscovery is False, both Read and Write Endpoints point to endpoint passed while creating the client instance self.assertEqual(write_endpoint, self.host) self.assertEqual(read_endpoint, self.host) def test_global_db_locational_endpoint_parser(self): - url_endpoint = 'https://contoso.documents.azure.com:443/' - location_name = 'East US' + url_endpoint = "https://contoso.documents.azure.com:443/" + location_name = "East US" # Creating a locational endpoint from the location name using the parser method locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(url_endpoint, location_name) - self.assertEqual(locational_endpoint, 'https://contoso-eastus.documents.azure.com:443/') + self.assertEqual(locational_endpoint, "https://contoso-eastus.documents.azure.com:443/") - url_endpoint = 'https://Contoso.documents.azure.com:443/' - location_name = 'East US' + url_endpoint = "https://Contoso.documents.azure.com:443/" + location_name = "East US" # Note that the host name gets lowercased as the urlparser in Python doesn't retains the casing locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(url_endpoint, location_name) - self.assertEqual(locational_endpoint, 'https://contoso-eastus.documents.azure.com:443/') + self.assertEqual(locational_endpoint, "https://contoso-eastus.documents.azure.com:443/") def test_global_db_service_request_errors(self): mock_retry_policy = test_config.MockConnectionRetryPolicy( @@ -444,28 +452,26 @@ def test_global_db_endpoint_discovery_retry_policy_mock(self): client.client_connection = cc_copy # Replace _PipelineRunFunction to send a 403/3 - with patch.object(_synchronized_request, '_PipelineRunFunction', new=_mock_pipeline_run_function_error): + with patch.object(_synchronized_request, "_PipelineRunFunction", new=_mock_pipeline_run_function_error): # original_pipeline_function = _synchronized_request._PipelineRunFunction # _synchronized_request._PipelineRunFunction = _mock_pipeline_run_function_error - document_definition = {'id': 'doc7', - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "doc7", "pk": "pk", "name": "sample document", "key": "value"} max_retry_attempt_count = 10 retry_after_in_milliseconds = 500 - _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = max_retry_attempt_count + _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Max_retry_attempt_count = ( + max_retry_attempt_count + ) _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = ( - retry_after_in_milliseconds) + retry_after_in_milliseconds + ) self.__AssertHTTPFailureWithStatus( - StatusCodes.FORBIDDEN, - SubStatusCodes.WRITE_FORBIDDEN, - container.create_item, - document_definition) + StatusCodes.FORBIDDEN, SubStatusCodes.WRITE_FORBIDDEN, container.create_item, document_definition + ) - with patch.object(_synchronized_request, '_PipelineRunFunction', new=_mock_pipeline_run_function): + with patch.object(_synchronized_request, "_PipelineRunFunction", new=_mock_pipeline_run_function): # Verify next outgoing requests have the new updated regions from the 403 retry _synchronized_request._PipelineRunFunction = _mock_pipeline_run_function container.create_item(document_definition) @@ -473,5 +479,5 @@ def test_global_db_endpoint_discovery_retry_policy_mock(self): client.client_connection = cc_copy -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_globaldb_mock.py b/sdk/cosmos/azure-cosmos/tests/test_globaldb_mock.py index a7aee626bfb8..458d936d3888 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_globaldb_mock.py +++ b/sdk/cosmos/azure-cosmos/tests/test_globaldb_mock.py @@ -12,8 +12,9 @@ import azure.cosmos.exceptions as exceptions import test_config from azure.cosmos import _retry_utility -from azure.cosmos._global_partition_endpoint_manager_circuit_breaker import \ - _GlobalPartitionEndpointManagerForCircuitBreaker +from azure.cosmos._global_partition_endpoint_manager_circuit_breaker import ( + _GlobalPartitionEndpointManagerForCircuitBreaker, +) from azure.cosmos.http_constants import StatusCodes location_changed = False @@ -86,19 +87,23 @@ def can_use_multiple_write_locations(self, request): def GetDatabaseAccount1(self): database_account = documents.DatabaseAccount() - database_account._ReadableLocations = [{'name': TestGlobalDBMock.read_location, - 'databaseAccountEndpoint': TestGlobalDBMock.read_location_host}] - database_account._WritableLocations = [{'name': TestGlobalDBMock.write_location, - 'databaseAccountEndpoint': TestGlobalDBMock.write_location_host}] + database_account._ReadableLocations = [ + {"name": TestGlobalDBMock.read_location, "databaseAccountEndpoint": TestGlobalDBMock.read_location_host} + ] + database_account._WritableLocations = [ + {"name": TestGlobalDBMock.write_location, "databaseAccountEndpoint": TestGlobalDBMock.write_location_host} + ] return database_account def GetDatabaseAccount2(self): database_account = documents.DatabaseAccount() - database_account._ReadableLocations = [{'name': TestGlobalDBMock.write_location, - 'databaseAccountEndpoint': TestGlobalDBMock.write_location_host}] - database_account._WritableLocations = [{'name': TestGlobalDBMock.read_location, - 'databaseAccountEndpoint': TestGlobalDBMock.read_location_host}] + database_account._ReadableLocations = [ + {"name": TestGlobalDBMock.write_location, "databaseAccountEndpoint": TestGlobalDBMock.write_location_host} + ] + database_account._WritableLocations = [ + {"name": TestGlobalDBMock.read_location, "databaseAccountEndpoint": TestGlobalDBMock.read_location_host} + ] return database_account @@ -128,12 +133,12 @@ class TestGlobalDBMock(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_GLOBAL_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_GLOBAL_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) def setUp(self): self.endpoint_discovery_retry_count = 0 @@ -154,30 +159,37 @@ def tearDown(self): def MockGetDatabaseAccountStub(self, endpoint): raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.INTERNAL_SERVER_ERROR, message="Internal Server Error") + status_code=StatusCodes.INTERNAL_SERVER_ERROR, message="Internal Server Error" + ) def test_global_db_endpoint_discovery_retry_policy(self): connection_policy = documents.ConnectionPolicy() connection_policy.EnableEndpointDiscovery = True - write_location_client = cosmos_client.CosmosClient(TestGlobalDBMock.write_location_host, - TestGlobalDBMock.masterKey, - consistency_level="Session", - connection_policy=connection_policy) - write_location_client.client_connection._global_endpoint_manager = MockGlobalEndpointManager(write_location_client.client_connection) + write_location_client = cosmos_client.CosmosClient( + TestGlobalDBMock.write_location_host, + TestGlobalDBMock.masterKey, + consistency_level="Session", + connection_policy=connection_policy, + ) + write_location_client.client_connection._global_endpoint_manager = MockGlobalEndpointManager( + write_location_client.client_connection + ) write_location_client.client_connection._global_endpoint_manager.refresh_endpoint_list(None) - self.assertEqual(write_location_client.client_connection.WriteEndpoint, - TestGlobalDBMock.write_location_host) + self.assertEqual(write_location_client.client_connection.WriteEndpoint, TestGlobalDBMock.write_location_host) - self.assertEqual(write_location_client.client_connection.WriteEndpoint, - TestGlobalDBMock.read_location_host) + self.assertEqual(write_location_client.client_connection.WriteEndpoint, TestGlobalDBMock.read_location_host) def test_global_db_database_account_unavailable(self): connection_policy = documents.ConnectionPolicy() connection_policy.EnableEndpointDiscovery = True - client = cosmos_client.CosmosClient(TestGlobalDBMock.host, TestGlobalDBMock.masterKey, - consistency_level="Session", connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + TestGlobalDBMock.host, + TestGlobalDBMock.masterKey, + consistency_level="Session", + connection_policy=connection_policy, + ) client.client_connection._global_endpoint_manager = MockGlobalEndpointManager(client.client_connection) client.client_connection._global_endpoint_manager.refresh_endpoint_list(None) @@ -193,5 +205,5 @@ def test_global_db_database_account_unavailable(self): self.assertEqual(client.client_connection.ReadEndpoint, TestGlobalDBMock.host) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_headers.py b/sdk/cosmos/azure-cosmos/tests/test_headers.py index 7aeb6afed067..685128bafd08 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_headers.py +++ b/sdk/cosmos/azure-cosmos/tests/test_headers.py @@ -18,27 +18,35 @@ client_priority = "Low" request_priority = "High" + def client_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] - == str(client_throughput_bucket_number)) + assert response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] == str( + client_throughput_bucket_number + ) + def request_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] - == str(request_throughput_bucket_number)) + assert response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] == str( + request_throughput_bucket_number + ) + def client_priority_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] - == client_priority) + assert response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] == client_priority + def request_priority_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] - == request_priority) + assert response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] == request_priority + def partition_merge_support_response_hook(raw_response): header = raw_response.http_request.headers assert http_constants.HttpHeaders.SDKSupportedCapabilities in header - assert header[http_constants.HttpHeaders.SDKSupportedCapabilities] == \ - http_constants.SDKSupportedCapabilities.PARTITION_MERGE + assert ( + header[http_constants.HttpHeaders.SDKSupportedCapabilities] + == http_constants.SDKSupportedCapabilities.PARTITION_MERGE + ) + @pytest.mark.cosmosEmulator class TestHeaders(unittest.TestCase): @@ -79,12 +87,13 @@ def side_effect_client_id(self, *args, **kwargs): raise StopIteration def test_correlated_activity_id(self): - query = 'SELECT * from c ORDER BY c._ts' + query = "SELECT * from c ORDER BY c._ts" cosmos_client_connection = self.container.client_connection original_connection_post = cosmos_client_connection._CosmosClientConnection__Post cosmos_client_connection._CosmosClientConnection__Post = MagicMock( - side_effect=self.side_effect_correlated_activity_id) + side_effect=self.side_effect_correlated_activity_id + ) try: list(self.container.query_items(query=query, partition_key="pk-1")) except StopIteration: @@ -96,18 +105,26 @@ def test_max_integrated_cache_staleness(self): cosmos_client_connection = self.container.client_connection original_connection_get = cosmos_client_connection._CosmosClientConnection__Get cosmos_client_connection._CosmosClientConnection__Get = MagicMock( - side_effect=self.side_effect_dedicated_gateway_max_age_thousand) + side_effect=self.side_effect_dedicated_gateway_max_age_thousand + ) try: - self.container.read_item(item="id-1", partition_key="pk-1", - max_integrated_cache_staleness_in_ms=self.dedicated_gateway_max_age_thousand) + self.container.read_item( + item="id-1", + partition_key="pk-1", + max_integrated_cache_staleness_in_ms=self.dedicated_gateway_max_age_thousand, + ) except StopIteration: pass cosmos_client_connection._CosmosClientConnection__Get = MagicMock( - side_effect=self.side_effect_dedicated_gateway_max_age_million) + side_effect=self.side_effect_dedicated_gateway_max_age_million + ) try: - self.container.read_item(item="id-1", partition_key="pk-1", - max_integrated_cache_staleness_in_ms=self.dedicated_gateway_max_age_million) + self.container.read_item( + item="id-1", + partition_key="pk-1", + max_integrated_cache_staleness_in_ms=self.dedicated_gateway_max_age_million, + ) except StopIteration: pass finally: @@ -115,8 +132,11 @@ def test_max_integrated_cache_staleness(self): def test_negative_max_integrated_cache_staleness(self): try: - self.container.read_item(item="id-1", partition_key="pk-1", - max_integrated_cache_staleness_in_ms=self.dedicated_gateway_max_age_negative) + self.container.read_item( + item="id-1", + partition_key="pk-1", + max_integrated_cache_staleness_in_ms=self.dedicated_gateway_max_age_negative, + ) except Exception as exception: assert isinstance(exception, ValueError) @@ -124,8 +144,7 @@ def test_client_id(self): # Client ID should be sent on every request, Verify it is sent on a read_item request cosmos_client_connection = self.container.client_connection original_connection_get = cosmos_client_connection._CosmosClientConnection__Get - cosmos_client_connection._CosmosClientConnection__Get = MagicMock( - side_effect=self.side_effect_client_id) + cosmos_client_connection._CosmosClientConnection__Get = MagicMock(side_effect=self.side_effect_client_id) try: self.container.read_item(item="id-1", partition_key="pk-1") except StopIteration: @@ -133,72 +152,79 @@ def test_client_id(self): finally: cosmos_client_connection._CosmosClientConnection__Get = original_connection_get - def test_client_level_throughput_bucket(self): - cosmos_client.CosmosClient(self.host, self.masterKey, + cosmos_client.CosmosClient( + self.host, + self.masterKey, throughput_bucket=client_throughput_bucket_number, - raw_response_hook=client_raw_response_hook) + raw_response_hook=client_raw_response_hook, + ) def test_request_precedence_throughput_bucket(self): - client = cosmos_client.CosmosClient(self.host, self.masterKey, - throughput_bucket=client_throughput_bucket_number) + client = cosmos_client.CosmosClient( + self.host, self.masterKey, throughput_bucket=client_throughput_bucket_number + ) created_db = client.get_database_client(self.configs.TEST_DATABASE_ID) - created_container = created_db.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = created_db.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) created_db.delete_container(created_container.id) def test_container_read_item_throughput_bucket(self): - created_document = self.container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_document = self.container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) self.container.read_item( - item=created_document['id'], - partition_key="mypk", - throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + item=created_document["id"], + partition_key="mypk", + throughput_bucket=request_throughput_bucket_number, + raw_response_hook=request_raw_response_hook, + ) def test_container_read_all_items_throughput_bucket(self): for i in range(10): - self.container.create_item(body={'id': ''.format(i) + str(uuid.uuid4()), 'pk': 'mypk'}) + self.container.create_item(body={"id": "".format(i) + str(uuid.uuid4()), "pk": "mypk"}) self.container.read_all_items( - throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + throughput_bucket=request_throughput_bucket_number, raw_response_hook=request_raw_response_hook + ) def test_container_query_items_throughput_bucket(self): - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} self.container.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" self.container.query_items( query=query, - partition_key='pk', + partition_key="pk", throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) def test_container_replace_item_throughput_bucket(self): - created_document = self.container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_document = self.container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) self.container.replace_item( - item=created_document['id'], - body={'id': '2' + str(uuid.uuid4()), 'pk': 'mypk'}, + item=created_document["id"], + body={"id": "2" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) def test_container_upsert_item_throughput_bucket(self): - self.container.upsert_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + self.container.upsert_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) def test_container_create_item_throughput_bucket(self): self.container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) def test_container_patch_item_throughput_bucket(self): pkValue = "patch_item_pk" + str(uuid.uuid4()) @@ -207,11 +233,10 @@ def test_container_patch_item_throughput_bucket(self): "id": "patch_item", "pk": pkValue, "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } self.container.create_item(item) # Define and run patch operations operations = [ @@ -220,19 +245,20 @@ def test_container_patch_item_throughput_bucket(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] self.container.patch_item( item="patch_item", partition_key=pkValue, patch_operations=operations, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) def test_container_execute_item_batch_throughput_bucket(self): created_collection = self.database.create_container( - id='test_execute_item ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/company')) + id="test_execute_item " + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) batch = [] for i in range(100): batch.append(("create", ({"id": "item" + str(i), "company": "Microsoft"},))) @@ -241,23 +267,26 @@ def test_container_execute_item_batch_throughput_bucket(self): batch_operations=batch, partition_key="Microsoft", throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) self.database.delete_container(created_collection) def test_container_delete_item_throughput_bucket(self): - created_item = self.container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_item = self.container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) self.container.delete_item( - created_item['id'], - partition_key='mypk', + created_item["id"], + partition_key="mypk", throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) def test_container_delete_all_items_by_partition_key_throughput_bucket(self): created_collection = self.database.create_container( - id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/pk', kind='Hash')) + id="test_delete_all_items_by_partition_key " + str(uuid.uuid4()), + partition_key=PartitionKey(path="/pk", kind="Hash"), + ) # Create two partition keys partition_key1 = "{}-{}".format("Partition Key 1", str(uuid.uuid4())) @@ -265,8 +294,7 @@ def test_container_delete_all_items_by_partition_key_throughput_bucket(self): # add items for partition key 1 for i in range(1, 3): - created_collection.upsert_item( - dict(id="item{}".format(i), pk=partition_key1)) + created_collection.upsert_item(dict(id="item{}".format(i), pk=partition_key1)) # add items for partition key 2 pk2_item = created_collection.upsert_item(dict(id="item{}".format(3), pk=partition_key2)) @@ -275,7 +303,8 @@ def test_container_delete_all_items_by_partition_key_throughput_bucket(self): created_collection.delete_all_items_by_partition_key( partition_key1, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) self.database.delete_container(created_collection) @@ -303,22 +332,23 @@ def test_partition_merge_support_header(self): def test_client_level_priority(self): # Test that priority level set at client level is used for all requests - cosmos_client.CosmosClient(self.host, self.masterKey, - priority=client_priority, - raw_response_hook=client_priority_raw_response_hook) + cosmos_client.CosmosClient( + self.host, self.masterKey, priority=client_priority, raw_response_hook=client_priority_raw_response_hook + ) def test_request_precedence_priority(self): # Test that request-level priority takes precedence over client-level priority - client = cosmos_client.CosmosClient(self.host, self.masterKey, - priority=client_priority) + client = cosmos_client.CosmosClient(self.host, self.masterKey, priority=client_priority) created_db = client.get_database_client(self.configs.TEST_DATABASE_ID) created_container = created_db.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - + # Create an item with request-level priority that overrides client-level priority created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, priority=request_priority, - raw_response_hook=request_priority_raw_response_hook) + raw_response_hook=request_priority_raw_response_hook, + ) + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_headers_async.py b/sdk/cosmos/azure-cosmos/tests/test_headers_async.py index d0453f5bf3fc..ff401de6799a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_headers_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_headers_async.py @@ -19,25 +19,30 @@ client_priority = "Low" request_priority = "High" + async def client_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] - == str(client_throughput_bucket_number)) + assert response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] == str( + client_throughput_bucket_number + ) + async def request_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] - == str(request_throughput_bucket_number)) + assert response.http_request.headers[http_constants.HttpHeaders.ThroughputBucket] == str( + request_throughput_bucket_number + ) + async def client_priority_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] - == client_priority) + assert response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] == client_priority + async def request_priority_raw_response_hook(response): - assert (response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] - == request_priority) + assert response.http_request.headers[http_constants.HttpHeaders.PriorityLevel] == request_priority class ClientIDVerificationError(Exception): """Custom exception for client ID verification errors.""" + pass @@ -51,12 +56,12 @@ class TestHeadersAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -64,70 +69,80 @@ async def asyncSetUp(self): self.container = self.database.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) async def test_client_level_throughput_bucket_async(self): - CosmosClient(self.host, self.masterKey, + CosmosClient( + self.host, + self.masterKey, throughput_bucket=client_throughput_bucket_number, - raw_response_hook=client_raw_response_hook) + raw_response_hook=client_raw_response_hook, + ) async def test_request_precedence_throughput_bucket_async(self): - client = CosmosClient(self.host, self.masterKey, - throughput_bucket=client_throughput_bucket_number) + client = CosmosClient(self.host, self.masterKey, throughput_bucket=client_throughput_bucket_number) database = client.get_database_client(self.configs.TEST_DATABASE_ID) - created_container = await database.create_container( - str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_container = await database.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) await created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) await database.delete_container(created_container.id) async def test_container_read_item_throughput_bucket_async(self): - created_document = await self.container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_document = await self.container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) await self.container.read_item( - item=created_document['id'], - partition_key="mypk", - throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + item=created_document["id"], + partition_key="mypk", + throughput_bucket=request_throughput_bucket_number, + raw_response_hook=request_raw_response_hook, + ) async def test_container_read_all_items_throughput_bucket_async(self): for i in range(10): - await self.container.create_item(body={'id': ''.format(i) + str(uuid.uuid4()), 'pk': 'mypk'}) + await self.container.create_item(body={"id": "".format(i) + str(uuid.uuid4()), "pk": "mypk"}) - async for item in self.container.read_all_items(throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook): + async for item in self.container.read_all_items( + throughput_bucket=request_throughput_bucket_number, raw_response_hook=request_raw_response_hook + ): pass async def test_container_query_items_throughput_bucket_async(self): - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} await self.container.create_item(body=document_definition) - query = 'SELECT * from c' - query_results = [item async for item in self.container.query_items( - query=query, - partition_key='pk', - throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook)] + query = "SELECT * from c" + query_results = [ + item + async for item in self.container.query_items( + query=query, + partition_key="pk", + throughput_bucket=request_throughput_bucket_number, + raw_response_hook=request_raw_response_hook, + ) + ] async def test_container_replace_item_throughput_bucket_async(self): - created_document = await self.container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_document = await self.container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) await self.container.replace_item( - item=created_document['id'], - body={'id': '2' + str(uuid.uuid4()), 'pk': 'mypk'}, + item=created_document["id"], + body={"id": "2" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) async def test_container_upsert_item_throughput_bucket_async(self): - await self.container.upsert_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + await self.container.upsert_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) async def test_container_create_item_throughput_bucket_async(self): await self.container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) async def test_container_patch_item_throughput_bucket_async(self): pkValue = "patch_item_pk" + str(uuid.uuid4()) @@ -136,11 +151,10 @@ async def test_container_patch_item_throughput_bucket_async(self): "id": "patch_item", "pk": pkValue, "prop": "prop1", - "address": { - "city": "Redmond" - }, + "address": {"city": "Redmond"}, "company": "Microsoft", - "number": 3} + "number": 3, + } await self.container.create_item(item) # Define and run patch operations operations = [ @@ -149,19 +163,20 @@ async def test_container_patch_item_throughput_bucket_async(self): {"op": "replace", "path": "/company", "value": "CosmosDB"}, {"op": "set", "path": "/address/new_city", "value": "Atlanta"}, {"op": "incr", "path": "/number", "value": 7}, - {"op": "move", "from": "/color", "path": "/favorite_color"} + {"op": "move", "from": "/color", "path": "/favorite_color"}, ] await self.container.patch_item( item="patch_item", partition_key=pkValue, patch_operations=operations, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) async def test_container_execute_item_batch_throughput_bucket_async(self): created_collection = await self.database.create_container( - id='test_execute_item ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/company')) + id="test_execute_item " + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) batch = [] for i in range(100): batch.append(("create", ({"id": "item" + str(i), "company": "Microsoft"},))) @@ -170,23 +185,26 @@ async def test_container_execute_item_batch_throughput_bucket_async(self): batch_operations=batch, partition_key="Microsoft", throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) await self.database.delete_container(created_collection) async def test_container_delete_item_throughput_bucket_async(self): - created_item = await self.container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_item = await self.container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) await self.container.delete_item( - created_item['id'], - partition_key='mypk', + created_item["id"], + partition_key="mypk", throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) async def test_container_delete_all_items_by_partition_key_throughput_bucket_async(self): created_collection = await self.database.create_container( - id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/pk', kind='Hash')) + id="test_delete_all_items_by_partition_key " + str(uuid.uuid4()), + partition_key=PartitionKey(path="/pk", kind="Hash"), + ) # Create two partition keys partition_key1 = "{}-{}".format("Partition Key 1", str(uuid.uuid4())) @@ -194,8 +212,7 @@ async def test_container_delete_all_items_by_partition_key_throughput_bucket_asy # add items for partition key 1 for i in range(1, 3): - await created_collection.upsert_item( - dict(id="item{}".format(i), pk=partition_key1)) + await created_collection.upsert_item(dict(id="item{}".format(i), pk=partition_key1)) # add items for partition key 2 pk2_item = await created_collection.upsert_item(dict(id="item{}".format(3), pk=partition_key2)) @@ -204,7 +221,8 @@ async def test_container_delete_all_items_by_partition_key_throughput_bucket_asy await created_collection.delete_all_items_by_partition_key( partition_key1, throughput_bucket=request_throughput_bucket_number, - raw_response_hook=request_raw_response_hook) + raw_response_hook=request_raw_response_hook, + ) await self.database.delete_container(created_collection) @@ -233,8 +251,7 @@ async def test_client_id(self): # Client ID should be sent on every request, Verify it is sent on a read_item request cosmos_client_connection = self.container.client_connection original_connection_get = cosmos_client_connection._CosmosClientConnection__Get - cosmos_client_connection._CosmosClientConnection__Get = MagicMock( - side_effect=self.side_effect_client_id) + cosmos_client_connection._CosmosClientConnection__Get = MagicMock(side_effect=self.side_effect_client_id) try: await self.container.read_item(item="id-1", partition_key="pk-1") except ClientIDVerificationError: @@ -249,26 +266,27 @@ async def test_partition_merge_support_header(self): async def test_client_level_priority_async(self): # Test that priority level set at client level is used for all requests - async with CosmosClient(self.host, self.masterKey, - priority=client_priority, - raw_response_hook=client_priority_raw_response_hook) as client: + async with CosmosClient( + self.host, self.masterKey, priority=client_priority, raw_response_hook=client_priority_raw_response_hook + ) as client: # Make a request to trigger the hook database = client.get_database_client(self.configs.TEST_DATABASE_ID) container = database.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - created_item = await container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_item = await container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) async def test_request_precedence_priority_async(self): # Test that request-level priority takes precedence over client-level priority - async with CosmosClient(self.host, self.masterKey, - priority=client_priority) as client: + async with CosmosClient(self.host, self.masterKey, priority=client_priority) as client: database = client.get_database_client(self.configs.TEST_DATABASE_ID) created_container = database.get_container_client(self.configs.TEST_MULTI_PARTITION_CONTAINER_ID) - + # Create an item with request-level priority that overrides client-level priority await created_container.create_item( - body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, priority=request_priority, - raw_response_hook=request_priority_raw_response_hook) + raw_response_hook=request_priority_raw_response_hook, + ) + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_health_check.py b/sdk/cosmos/azure-cosmos/tests/test_health_check.py index 6f31c621cf66..2d9b3939ca70 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_health_check.py +++ b/sdk/cosmos/azure-cosmos/tests/test_health_check.py @@ -8,8 +8,13 @@ import pytest import test_config -from azure.cosmos import DatabaseAccount, _location_cache, CosmosClient, _global_endpoint_manager, \ - _cosmos_client_connection +from azure.cosmos import ( + DatabaseAccount, + _location_cache, + CosmosClient, + _global_endpoint_manager, + _cosmos_client_connection, +) from azure.cosmos._location_cache import RegionalRoutingContext @@ -18,21 +23,21 @@ REGION_2 = "West US" REGIONS = [REGION_1, REGION_2] + @pytest.fixture() def setup(): - if (TestHealthCheck.masterKey == '[YOUR_KEY_HERE]' or - TestHealthCheck.host == '[YOUR_ENDPOINT_HERE]'): + if TestHealthCheck.masterKey == "[YOUR_KEY_HERE]" or TestHealthCheck.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) client = CosmosClient(TestHealthCheck.host, TestHealthCheck.masterKey, consistency_level="Session") created_database = client.get_database_client(TestHealthCheck.TEST_DATABASE_ID) created_collection = created_database.get_container_client(TestHealthCheck.TEST_CONTAINER_SINGLE_PARTITION_ID) - yield { - COLLECTION: created_collection - } + yield {COLLECTION: created_collection} + @pytest.mark.cosmosEmulator @pytest.mark.unittest @@ -51,15 +56,16 @@ def test_health_check_success(self, setup): self.original_getDatabaseAccountStub = _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.original_health_check = _cosmos_client_connection.CosmosClientConnection.health_check mock_health_check = self.MockHealthCheckProbe() - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount(REGIONS) _cosmos_client_connection.CosmosClientConnection.health_check = mock_health_check try: client = CosmosClient(self.host, self.masterKey, preferred_locations=REGIONS) # give some time for the health check to finish sleep(3) finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) _cosmos_client_connection.CosmosClientConnection.health_check = self.original_health_check expected_regional_routing_contexts = [] @@ -68,27 +74,32 @@ def test_health_check_success(self, setup): expected_regional_routing_contexts.append(RegionalRoutingContext(locational_endpoint)) locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_2) expected_regional_routing_contexts.append(RegionalRoutingContext(locational_endpoint)) - read_regional_routing_contexts = client.client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + read_regional_routing_contexts = ( + client.client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + ) assert read_regional_routing_contexts == expected_regional_routing_contexts def test_health_check_failure(self, setup): # checks at startup that the health check will mark endpoints as unavailable if it gets an error self.original_getDatabaseAccountStub = _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount(REGIONS) try: client = CosmosClient(self.host, self.masterKey, preferred_locations=REGIONS) # give some time for the health check to finish sleep(10) finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) expected_endpoints = [] for region in REGIONS: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(self.host, region) expected_endpoints.append(locational_endpoint) - unavailable_endpoint_info = client.client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + unavailable_endpoint_info = ( + client.client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + ) assert len(unavailable_endpoint_info) == len(expected_endpoints) for expected_regional_routing_contexts in expected_endpoints: assert expected_regional_routing_contexts in unavailable_endpoint_info.keys() @@ -98,20 +109,22 @@ def test_health_check_timeouts_on_unavailable_endpoints(self, setup): self.original_getDatabaseAccountStub = _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub self.original_health_check = _cosmos_client_connection.CosmosClientConnection.health_check mock_health_check = self.MockHealthCheckProbe(setup[COLLECTION].client_connection, True) - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount(REGIONS) _cosmos_client_connection.CosmosClientConnection.health_check = mock_health_check setup[COLLECTION].client_connection._global_endpoint_manager.refreshed_needed = True # mark endpoint as unavailable for read locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(TestHealthCheck.host, REGION_1) setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.mark_endpoint_unavailable_for_read( - locational_endpoint, True) + locational_endpoint, True + ) self.original_preferred_locations = setup[COLLECTION].client_connection.connection_policy.PreferredLocations setup[COLLECTION].client_connection.connection_policy.PreferredLocations = REGIONS try: - setup[COLLECTION].create_item(body={'id': 'item' + str(uuid.uuid4()), 'pk': 'pk'}) + setup[COLLECTION].create_item(body={"id": "item" + str(uuid.uuid4()), "pk": "pk"}) finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) _cosmos_client_connection.CosmosClientConnection.health_check = self.original_health_check setup[COLLECTION].client_connection.connection_policy.PreferredLocations = self.original_preferred_locations @@ -120,14 +133,13 @@ def __init__(self, client_connection=None, endpoint_unavailable=False): self.counter = 0 self.client_connection = client_connection - def __call__(self, endpoint): self.counter += 1 class MockGetDatabaseAccount(object): def __init__( - self, - regions: List[str], + self, + regions: List[str], ): self.regions = regions @@ -136,14 +148,14 @@ def __call__(self, endpoint): read_locations = [] for loc in read_regions: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(endpoint, loc) - account_endpoint = locational_endpoint - read_locations.append({'databaseAccountEndpoint': account_endpoint, 'name': loc}) + account_endpoint = locational_endpoint + read_locations.append({"databaseAccountEndpoint": account_endpoint, "name": loc}) write_regions = [self.regions[0]] write_locations = [] for loc in write_regions: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(endpoint, loc) account_endpoint = locational_endpoint - write_locations.append({'databaseAccountEndpoint': account_endpoint, 'name': loc}) + write_locations.append({"databaseAccountEndpoint": account_endpoint, "name": loc}) multi_write = False db_acc = DatabaseAccount() @@ -155,7 +167,6 @@ def __call__(self, endpoint): db_acc.ConsistencyPolicy = {"defaultConsistencyLevel": "Session"} return db_acc - def test_force_refresh_on_startup_with_none_should_fetch_database_account(self, setup): """Verifies that calling force_refresh_on_startup(None) fetches the database account instead of crashing with AttributeError on NoneType._WritableLocations. @@ -180,17 +191,19 @@ def test_force_refresh_on_startup_with_none_should_fetch_database_account(self, assert len(read_contexts) > 0, "Location cache should have read endpoints after startup refresh" finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) def test_force_refresh_on_startup_with_valid_account_uses_provided_account(self, setup): """Verifies that when a valid database account is provided to force_refresh_on_startup, it uses that account directly without making another network call. """ self.original_getDatabaseAccountStub = _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub - call_counter = {'count': 0} + call_counter = {"count": 0} def counting_mock(self_gem, endpoint, **kwargs): - call_counter['count'] += 1 + call_counter["count"] += 1 return self.MockGetDatabaseAccount(REGIONS)(endpoint) _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = counting_mock @@ -201,7 +214,7 @@ def counting_mock(self_gem, endpoint, **kwargs): # Get a valid database account first db_account = gem._GetDatabaseAccount() - initial_call_count = call_counter['count'] + initial_call_count = call_counter["count"] # Reset startup state gem.startup = True @@ -211,12 +224,15 @@ def counting_mock(self_gem, endpoint, **kwargs): gem.force_refresh_on_startup(db_account) # Since we provided a valid account, no additional GetDatabaseAccount call should be made - assert call_counter['count'] == initial_call_count, \ - "Should not call _GetDatabaseAccount when valid account is provided" + assert ( + call_counter["count"] == initial_call_count + ), "Should not call _GetDatabaseAccount when valid account is provided" finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_health_check_async.py b/sdk/cosmos/azure-cosmos/tests/test_health_check_async.py index 87aa65b06694..3166274ad4bf 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_health_check_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_health_check_async.py @@ -15,32 +15,36 @@ from azure.cosmos import DatabaseAccount, _location_cache from azure.cosmos._location_cache import RegionalRoutingContext -from azure.cosmos.aio import CosmosClient, _global_endpoint_manager_async, _cosmos_client_connection_async, \ - _retry_utility_async +from azure.cosmos.aio import ( + CosmosClient, + _global_endpoint_manager_async, + _cosmos_client_connection_async, + _retry_utility_async, +) COLLECTION = "created_collection" REGION_1 = "East US" REGION_2 = "West US" REGIONS = [REGION_1, REGION_2] + @pytest_asyncio.fixture() async def setup(): - if (TestHealthCheckAsync.masterKey == '[YOUR_KEY_HERE]' or - TestHealthCheckAsync.host == '[YOUR_ENDPOINT_HERE]'): + if TestHealthCheckAsync.masterKey == "[YOUR_KEY_HERE]" or TestHealthCheckAsync.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) client = CosmosClient(TestHealthCheckAsync.host, TestHealthCheckAsync.masterKey, consistency_level="Session") created_database = client.get_database_client(TestHealthCheckAsync.TEST_DATABASE_ID) created_collection = created_database.get_container_client(TestHealthCheckAsync.TEST_CONTAINER_SINGLE_PARTITION_ID) - yield { - COLLECTION: created_collection - } + yield {COLLECTION: created_collection} await client.close() + @pytest.mark.cosmosEmulator @pytest.mark.asyncio @pytest.mark.usefixtures("setup") @@ -53,19 +57,24 @@ class TestHealthCheckAsync: async def test_health_check_success_startup_async(self, setup): # checks at startup that we perform a health check on all the necessary endpoints - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) self.original_health_check = _cosmos_client_connection_async.CosmosClientConnection.health_check mock_health_check = self.MockHealthCheckProbe() - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount( + REGIONS + ) _cosmos_client_connection_async.CosmosClientConnection.health_check = mock_health_check try: client = CosmosClient(self.host, self.masterKey, preferred_locations=REGIONS) # this will setup the location cache await client.__aenter__() - await asyncio.sleep(10) # give some time for the background health check to complete + await asyncio.sleep(10) # give some time for the background health check to complete finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) _cosmos_client_connection_async.CosmosClientConnection.health_check = self.original_health_check expected_regional_routing_context = [] @@ -75,15 +84,20 @@ async def test_health_check_success_startup_async(self, setup): expected_regional_routing_context.append(RegionalRoutingContext(endpoint)) locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_2) expected_regional_routing_context.append(RegionalRoutingContext(locational_endpoint)) - read_regional_routing_context = client.client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + read_regional_routing_context = ( + client.client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + ) assert read_regional_routing_context == expected_regional_routing_context await client.close() async def test_health_check_failure_startup_async(self, setup): # checks at startup that the health check will mark endpoints as unavailable if it gets an error - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount( + REGIONS + ) # don't mock database account check because we want it to fail and the emulator doesn't have extra regions try: client = CosmosClient(self.host, self.masterKey, preferred_locations=REGIONS) @@ -91,18 +105,27 @@ async def test_health_check_failure_startup_async(self, setup): await client.__aenter__() # Poll until the background health check marks endpoints as unavailable start_time = time.time() - while (len(client.client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint) < len(REGIONS) - and time.time() - start_time < 10): + while ( + len( + client.client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + ) + < len(REGIONS) + and time.time() - start_time < 10 + ): await asyncio.sleep(0.1) finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) expected_endpoints = [] for region in REGIONS: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(self.host, region) expected_endpoints.append(locational_endpoint) - unavailable_endpoint_info = client.client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + unavailable_endpoint_info = ( + client.client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + ) assert len(unavailable_endpoint_info) == len(expected_endpoints) for expected_endpoint in expected_endpoints: assert expected_endpoint in unavailable_endpoint_info.keys() @@ -116,7 +139,7 @@ async def test_health_check_background(self, setup): try: setup[COLLECTION].client_connection._global_endpoint_manager.startup = False for i in range(5): - await setup[COLLECTION].create_item(body={'id': 'item' + str(uuid.uuid4()), 'pk': 'pk'}) + await setup[COLLECTION].create_item(body={"id": "item" + str(uuid.uuid4()), "pk": "pk"}) finally: _global_endpoint_manager_async._GlobalEndpointManager._endpoints_health_check = self.original_health_check end_time = time.time() @@ -131,37 +154,46 @@ async def test_health_check_background_fail(self, setup): try: setup[COLLECTION].client_connection._global_endpoint_manager.startup = False for i in range(20): - await setup[COLLECTION].create_item(body={'id': 'item' + str(uuid.uuid4()), 'pk': 'pk'}) + await setup[COLLECTION].create_item(body={"id": "item" + str(uuid.uuid4()), "pk": "pk"}) finally: _global_endpoint_manager_async._GlobalEndpointManager._endpoints_health_check = self.original_health_check async def test_health_check_success_async(self, setup): # checks the background health check works as expected when all endpoints healthy - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) self.original_health_check = _cosmos_client_connection_async.CosmosClientConnection.health_check self.original_preferred_locations = setup[COLLECTION].client_connection.connection_policy.PreferredLocations setup[COLLECTION].client_connection.connection_policy.PreferredLocations = REGIONS mock_get_database_account_check = self.MockHealthCheckProbe() - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount( + REGIONS + ) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _cosmos_client_connection_async.CosmosClientConnection.health_check = mock_get_database_account_check + async def mock_execute_function(function, *args, **kwargs): if args: - args[4].url = args[4].url.replace('-eastus', '').replace('-westus', '') - args[1].location_endpoint_to_route = args[1].location_endpoint_to_route.replace('-eastus', '').replace('-westus', '') + args[4].url = args[4].url.replace("-eastus", "").replace("-westus", "") + args[1].location_endpoint_to_route = ( + args[1].location_endpoint_to_route.replace("-eastus", "").replace("-westus", "") + ) if args[1].endpoint_override: - args[1].endpoint_override = args[1].endpoint_override.replace('-eastus', '').replace('-westus', '') + args[1].endpoint_override = args[1].endpoint_override.replace("-eastus", "").replace("-westus", "") return await self.OriginalExecuteFunction(function, *args, **kwargs) + _retry_utility_async.ExecuteFunctionAsync = mock_execute_function try: setup[COLLECTION].client_connection._global_endpoint_manager.startup = False setup[COLLECTION].client_connection._global_endpoint_manager.refresh_needed = True for i in range(2): - await setup[COLLECTION].create_item(body={'id': 'item' + str(uuid.uuid4()), 'pk': 'pk'}) + await setup[COLLECTION].create_item(body={"id": "item" + str(uuid.uuid4()), "pk": "pk"}) finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) _cosmos_client_connection_async.CosmosClientConnection.health_check = self.original_health_check setup[COLLECTION].client_connection.connection_policy.PreferredLocations = self.original_preferred_locations _retry_utility_async.ExecuteFunctionAsync = self.OriginalExecuteFunction @@ -173,28 +205,37 @@ async def mock_execute_function(function, *args, **kwargs): expected_regional_routing_contexts.append(RegionalRoutingContext(locational_endpoint)) locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_2) expected_regional_routing_contexts.append(RegionalRoutingContext(locational_endpoint)) - read_regional_routing_context = setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + read_regional_routing_context = setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts assert read_regional_routing_context == expected_regional_routing_contexts - async def test_health_check_failure_async(self, setup): # checks the background health check works as expected when all endpoints unhealthy - it should mark the endpoints unavailable - setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint.clear() - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( - self.MockGetDatabaseAccount(REGIONS)) + setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint.clear() + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccount( + REGIONS + ) self.original_health_check = _cosmos_client_connection_async.CosmosClientConnection.health_check self.original_preferred_locations = setup[COLLECTION].client_connection.connection_policy.PreferredLocations self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync mock_health_check_error = self.MockHealthCheckError() _cosmos_client_connection_async.CosmosClientConnection.health_check = mock_health_check_error setup[COLLECTION].client_connection.connection_policy.PreferredLocations = REGIONS + async def mock_execute_function(function, *args, **kwargs): if args: - args[4].url = args[4].url.replace('-eastus', '').replace('-westus', '') - args[1].location_endpoint_to_route = args[1].location_endpoint_to_route.replace('-eastus', '').replace('-westus', '') + args[4].url = args[4].url.replace("-eastus", "").replace("-westus", "") + args[1].location_endpoint_to_route = ( + args[1].location_endpoint_to_route.replace("-eastus", "").replace("-westus", "") + ) if args[1].endpoint_override: - args[1].endpoint_override = args[1].endpoint_override.replace('-eastus', '').replace('-westus', '') + args[1].endpoint_override = args[1].endpoint_override.replace("-eastus", "").replace("-westus", "") return await self.OriginalExecuteFunction(function, *args, **kwargs) _retry_utility_async.ExecuteFunctionAsync = mock_execute_function @@ -203,25 +244,34 @@ async def mock_execute_function(function, *args, **kwargs): setup[COLLECTION].client_connection._global_endpoint_manager.startup = False setup[COLLECTION].client_connection._global_endpoint_manager.refresh_needed = True # Trigger the background health check - await setup[COLLECTION].create_item(body={'id': 'item' + str(uuid.uuid4()), 'pk': 'pk'}) + await setup[COLLECTION].create_item(body={"id": "item" + str(uuid.uuid4()), "pk": "pk"}) # Poll until the background task marks the endpoints as unavailable start_time = time.time() - while (len(setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint) < len( - REGIONS) and time.time() - start_time < 10): + while ( + len( + setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + ) + < len(REGIONS) + and time.time() - start_time < 10 + ): await asyncio.sleep(0.1) finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) setup[COLLECTION].client_connection.connection_policy.PreferredLocations = self.original_preferred_locations _cosmos_client_connection_async.CosmosClientConnection.health_check = self.original_health_check _retry_utility_async.ExecuteFunctionAsync = self.OriginalExecuteFunction num_unavailable_endpoints = len(REGIONS) - unavailable_endpoint_info = setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint + unavailable_endpoint_info = setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint assert len(unavailable_endpoint_info) == num_unavailable_endpoints - write_endpoints = { - _location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_1) - } + write_endpoints = {_location_cache.LocationCache.GetLocationalEndpoint(self.host, REGION_1)} for endpoint, info in unavailable_endpoint_info.items(): assert _location_cache.EndpointOperationType.ReadType in info["operationType"] @@ -252,8 +302,8 @@ async def __call__(self, endpoint): class MockGetDatabaseAccount(object): def __init__( - self, - regions: List[str], + self, + regions: List[str], ): self.regions = regions @@ -263,13 +313,13 @@ async def __call__(self, endpoint): for loc in read_regions: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(endpoint, loc) account_endpoint = locational_endpoint - read_locations.append({'databaseAccountEndpoint': account_endpoint, 'name': loc}) + read_locations.append({"databaseAccountEndpoint": account_endpoint, "name": loc}) write_regions = [self.regions[0]] write_locations = [] for loc in write_regions: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(endpoint, loc) account_endpoint = locational_endpoint - write_locations.append({'databaseAccountEndpoint': account_endpoint, 'name': loc}) + write_locations.append({"databaseAccountEndpoint": account_endpoint, "name": loc}) multi_write = False db_acc = DatabaseAccount() @@ -281,12 +331,13 @@ async def __call__(self, endpoint): db_acc.ConsistencyPolicy = {"defaultConsistencyLevel": "Session"} return db_acc - async def test_force_refresh_on_startup_with_none_should_fetch_database_account(self, setup): """Verifies that calling force_refresh_on_startup(None) fetches the database account instead of crashing with AttributeError on NoneType._WritableLocations. """ - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) mock_get_db_account = self.MockGetDatabaseAccount(REGIONS) _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = mock_get_db_account @@ -309,17 +360,21 @@ async def test_force_refresh_on_startup_with_none_should_fetch_database_account( await client.close() finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) async def test_force_refresh_on_startup_with_valid_account_uses_provided_account(self, setup): """Verifies that when a valid database account is provided to force_refresh_on_startup, it uses that account directly without making another network call. """ - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub - call_counter = {'count': 0} + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) + call_counter = {"count": 0} async def counting_mock(self_gem, endpoint, **kwargs): - call_counter['count'] += 1 + call_counter["count"] += 1 return await self.MockGetDatabaseAccount(REGIONS)(endpoint) _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = counting_mock @@ -331,7 +386,7 @@ async def counting_mock(self_gem, endpoint, **kwargs): # Get a valid database account first db_account = await gem._GetDatabaseAccount() - initial_call_count = call_counter['count'] + initial_call_count = call_counter["count"] # Reset startup state gem.startup = True @@ -343,22 +398,27 @@ async def counting_mock(self_gem, endpoint, **kwargs): # Since we provided a valid account, no additional GetDatabaseAccount call should be made - assert call_counter['count'] == initial_call_count, \ - "Should not call _GetDatabaseAccount when valid account is provided" + assert ( + call_counter["count"] == initial_call_count + ), "Should not call _GetDatabaseAccount when valid account is provided" await client.close() finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) async def test_aenter_used_flag_with_none_still_fetches_account(self, setup): """Verifies that even when _aenter_used=True, passing None to force_refresh_on_startup still fetches the database account. """ - self.original_getDatabaseAccountStub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub - fetch_was_called = {'called': False} + self.original_getDatabaseAccountStub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) + fetch_was_called = {"called": False} async def tracking_mock(self_gem, endpoint, **kwargs): - fetch_was_called['called'] = True + fetch_was_called["called"] = True return await self.MockGetDatabaseAccount(REGIONS)(endpoint) _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = tracking_mock @@ -372,20 +432,23 @@ async def tracking_mock(self_gem, endpoint, **kwargs): gem.startup = True gem.refresh_needed = True gem._aenter_used = True # This was causing the bug to skip fetching - fetch_was_called['called'] = False # Reset tracking + fetch_was_called["called"] = False # Reset tracking # Call with None - should still fetch database account (this is the fix) await gem.force_refresh_on_startup(None) # This ensures that even with _aenter_used=True, if database_account is None, # it fetches the database account - assert fetch_was_called['called'], \ - "With _aenter_used=True and database_account=None, should still fetch database account" + assert fetch_was_called[ + "called" + ], "With _aenter_used=True and database_account=None, should still fetch database account" await client.close() finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_getDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_getDatabaseAccountStub + ) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_latest_session_token.py b/sdk/cosmos/azure-cosmos/tests/test_latest_session_token.py index f7ef86f1ec4f..1879fe8d4e1b 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_latest_session_token.py +++ b/sdk/cosmos/azure-cosmos/tests/test_latest_session_token.py @@ -17,18 +17,14 @@ def create_item(hpk): if hpk: item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'state': 'CA', - 'city': 'LA' + str(random.randint(1, 10)), - 'zipcode': '90001' + "id": "item" + str(uuid.uuid4()), + "name": "sample", + "state": "CA", + "city": "LA" + str(random.randint(1, 10)), + "zipcode": "90001", } else: - item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'pk': 'A' + str(random.randint(1, 10)) - } + item = {"id": "item" + str(uuid.uuid4()), "name": "sample", "pk": "A" + str(random.randint(1, 10))} return item @@ -48,19 +44,20 @@ def setUpClass(cls): cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.database = cls.client.get_database_client(cls.TEST_DATABASE_ID) - def test_latest_session_token_from_pk(self): - container = self.database.create_container("test_updated_session_token_from_logical_pk" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=400) + container = self.database.create_container( + "test_updated_session_token_from_logical_pk" + str(uuid.uuid4()), + PartitionKey(path="/pk"), + offer_throughput=400, + ) # testing with storing session tokens by feed range that maps to logical pk feed_ranges_and_session_tokens = [] previous_session_token = "" - target_pk = 'A1' + target_pk = "A1" target_feed_range = container.feed_range_from_partition_key(target_pk) - target_session_token, previous_session_token = self.create_items_logical_pk(container, target_feed_range, - previous_session_token, - feed_ranges_and_session_tokens) + target_session_token, previous_session_token = self.create_items_logical_pk( + container, target_feed_range, previous_session_token, feed_ranges_and_session_tokens + ) session_token = container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token @@ -68,11 +65,13 @@ def test_latest_session_token_from_pk(self): phys_feed_ranges_and_session_tokens = [] phys_previous_session_token = "" pk_feed_range = container.feed_range_from_partition_key(target_pk) - phys_target_session_token, phys_target_feed_range, phys_previous_session_token = self.create_items_physical_pk(container, pk_feed_range, - phys_previous_session_token, - phys_feed_ranges_and_session_tokens) + phys_target_session_token, phys_target_feed_range, phys_previous_session_token = self.create_items_physical_pk( + container, pk_feed_range, phys_previous_session_token, phys_feed_ranges_and_session_tokens + ) - phys_session_token = container.get_latest_session_token(phys_feed_ranges_and_session_tokens, phys_target_feed_range) + phys_session_token = container.get_latest_session_token( + phys_feed_ranges_and_session_tokens, phys_target_feed_range + ) assert phys_session_token == phys_target_session_token feed_ranges_and_session_tokens.append((target_feed_range, session_token)) @@ -80,82 +79,87 @@ def test_latest_session_token_from_pk(self): test_config.TestConfig.trigger_split(container, 11000) # testing with storing session tokens by feed range that maps to logical pk post split - target_session_token, _ = self.create_items_logical_pk(container, target_feed_range, session_token, - feed_ranges_and_session_tokens) + target_session_token, _ = self.create_items_logical_pk( + container, target_feed_range, session_token, feed_ranges_and_session_tokens + ) target_feed_range = container.feed_range_from_partition_key(target_pk) session_token = container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token # testing with storing session tokens by feed range that maps to physical pk post split - _, phys_target_feed_range, phys_previous_session_token = self.create_items_physical_pk(container, pk_feed_range, - phys_session_token, - phys_feed_ranges_and_session_tokens) + _, phys_target_feed_range, phys_previous_session_token = self.create_items_physical_pk( + container, pk_feed_range, phys_session_token, phys_feed_ranges_and_session_tokens + ) - phys_session_token = container.get_latest_session_token(phys_feed_ranges_and_session_tokens, phys_target_feed_range) + phys_session_token = container.get_latest_session_token( + phys_feed_ranges_and_session_tokens, phys_target_feed_range + ) pk_range_id, session_token = parse_session_token(phys_session_token) assert 300 <= session_token.global_lsn <= 370 - assert '2' in pk_range_id + assert "2" in pk_range_id self.database.delete_container(container.id) def test_latest_session_token_hpk(self): - container = self.database.create_container("test_updated_session_token_hpk" + str(uuid.uuid4()), - PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), - offer_throughput=400) + container = self.database.create_container( + "test_updated_session_token_hpk" + str(uuid.uuid4()), + PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), + offer_throughput=400, + ) feed_ranges_and_session_tokens = [] previous_session_token = "" - pk = ['CA', 'LA1', '90001'] + pk = ["CA", "LA1", "90001"] pk_feed_range = container.feed_range_from_partition_key(pk) - target_session_token, target_feed_range, previous_session_token = self.create_items_physical_pk(container, - pk_feed_range, - previous_session_token, - feed_ranges_and_session_tokens, - True) + target_session_token, target_feed_range, previous_session_token = self.create_items_physical_pk( + container, pk_feed_range, previous_session_token, feed_ranges_and_session_tokens, True + ) session_token = container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token self.database.delete_container(container.id) - def test_latest_session_token_logical_hpk(self): - container = self.database.create_container("test_updated_session_token_from_logical_hpk" + str(uuid.uuid4()), - PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), - offer_throughput=400) + container = self.database.create_container( + "test_updated_session_token_from_logical_hpk" + str(uuid.uuid4()), + PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), + offer_throughput=400, + ) feed_ranges_and_session_tokens = [] previous_session_token = "" - target_pk = ['CA', 'LA1', '90001'] + target_pk = ["CA", "LA1", "90001"] target_feed_range = container.feed_range_from_partition_key(target_pk) - target_session_token, previous_session_token = self.create_items_logical_pk(container, target_feed_range, - previous_session_token, - feed_ranges_and_session_tokens, - True) + target_session_token, previous_session_token = self.create_items_logical_pk( + container, target_feed_range, previous_session_token, feed_ranges_and_session_tokens, True + ) session_token = container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token self.database.delete_container(container.id) @staticmethod - def create_items_logical_pk(container, target_pk_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False): + def create_items_logical_pk( + container, target_pk_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False + ): target_session_token = "" for i in range(100): item = create_item(hpk) response = container.create_item(item, session_token=previous_session_token) session_token = response.get_response_headers()[HttpHeaders.SessionToken] - pk = item['pk'] if not hpk else [item['state'], item['city'], item['zipcode']] + pk = item["pk"] if not hpk else [item["state"], item["city"], item["zipcode"]] pk_range = container.feed_range_from_partition_key(pk) pk_feed_range_epk = FeedRangeInternalEpk.from_json(pk_range) target_feed_range_epk = FeedRangeInternalEpk.from_json(target_pk_range) - if (pk_feed_range_epk.get_normalized_range() == - target_feed_range_epk.get_normalized_range()): + if pk_feed_range_epk.get_normalized_range() == target_feed_range_epk.get_normalized_range(): target_session_token = session_token previous_session_token = session_token - feed_ranges_and_session_tokens.append((pk_range, - session_token)) + feed_ranges_and_session_tokens.append((pk_range, session_token)) return target_session_token, previous_session_token @staticmethod - def create_items_physical_pk(container, pk_feed_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False): + def create_items_physical_pk( + container, pk_feed_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False + ): target_session_token = "" container_feed_ranges = list(container.read_feed_ranges()) target_feed_range = None @@ -169,10 +173,10 @@ def create_items_physical_pk(container, pk_feed_range, previous_session_token, f response = container.create_item(item, session_token=previous_session_token) session_token = response.get_response_headers()[HttpHeaders.SessionToken] if hpk: - pk = [item['state'], item['city'], item['zipcode']] + pk = [item["state"], item["city"], item["zipcode"]] curr_feed_range = container.feed_range_from_partition_key(pk) else: - curr_feed_range = container.feed_range_from_partition_key(item['pk']) + curr_feed_range = container.feed_range_from_partition_key(item["pk"]) if container.is_feed_range_subset(target_feed_range, curr_feed_range): target_session_token = session_token previous_session_token = session_token @@ -180,5 +184,6 @@ def create_items_physical_pk(container, pk_feed_range, previous_session_token, f return target_session_token, target_feed_range, previous_session_token -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_latest_session_token_async.py b/sdk/cosmos/azure-cosmos/tests/test_latest_session_token_async.py index e11aa613e182..78ea05500a42 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_latest_session_token_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_latest_session_token_async.py @@ -18,18 +18,14 @@ def create_item(hpk): if hpk: item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'state': 'CA', - 'city': 'LA' + str(random.randint(1, 10)), - 'zipcode': '90001' + "id": "item" + str(uuid.uuid4()), + "name": "sample", + "state": "CA", + "city": "LA" + str(random.randint(1, 10)), + "zipcode": "90001", } else: - item = { - 'id': 'item' + str(uuid.uuid4()), - 'name': 'sample', - 'pk': 'A' + str(random.randint(1, 10)) - } + item = {"id": "item" + str(uuid.uuid4()), "name": "sample", "pk": "A" + str(random.randint(1, 10))} return item @@ -53,17 +49,19 @@ async def asyncTearDown(self): await self.client.close() async def test_latest_session_token_from_pk_async(self): - container = await self.database.create_container("test_updated_session_token_from_logical_pk" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=400) + container = await self.database.create_container( + "test_updated_session_token_from_logical_pk" + str(uuid.uuid4()), + PartitionKey(path="/pk"), + offer_throughput=400, + ) # testing with storing session tokens by feed range that maps to logical pk feed_ranges_and_session_tokens = [] previous_session_token = "" - target_pk = 'A1' + target_pk = "A1" target_feed_range = await container.feed_range_from_partition_key(target_pk) - target_session_token, previous_session_token = await self.create_items_logical_pk_async(container, target_feed_range, - previous_session_token, - feed_ranges_and_session_tokens) + target_session_token, previous_session_token = await self.create_items_logical_pk_async( + container, target_feed_range, previous_session_token, feed_ranges_and_session_tokens + ) session_token = await container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token @@ -71,11 +69,15 @@ async def test_latest_session_token_from_pk_async(self): phys_feed_ranges_and_session_tokens = [] phys_previous_session_token = "" pk_feed_range = await container.feed_range_from_partition_key(target_pk) - phys_target_session_token, phys_target_feed_range, phys_previous_session_token = await self.create_items_physical_pk_async(container, pk_feed_range, - phys_previous_session_token, - phys_feed_ranges_and_session_tokens) - - phys_session_token = await container.get_latest_session_token(phys_feed_ranges_and_session_tokens, phys_target_feed_range) + phys_target_session_token, phys_target_feed_range, phys_previous_session_token = ( + await self.create_items_physical_pk_async( + container, pk_feed_range, phys_previous_session_token, phys_feed_ranges_and_session_tokens + ) + ) + + phys_session_token = await container.get_latest_session_token( + phys_feed_ranges_and_session_tokens, phys_target_feed_range + ) assert phys_session_token == phys_target_session_token feed_ranges_and_session_tokens.append((target_feed_range, session_token)) @@ -83,82 +85,87 @@ async def test_latest_session_token_from_pk_async(self): await test_config.TestConfig.trigger_split_async(container, 11000) # testing with storing session tokens by feed range that maps to logical pk post split - target_session_token, _ = await self.create_items_logical_pk_async(container, target_feed_range, session_token, - feed_ranges_and_session_tokens) + target_session_token, _ = await self.create_items_logical_pk_async( + container, target_feed_range, session_token, feed_ranges_and_session_tokens + ) target_feed_range = await container.feed_range_from_partition_key(target_pk) session_token = await container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token # testing with storing session tokens by feed range that maps to physical pk post split - _, phys_target_feed_range, phys_previous_session_token = await self.create_items_physical_pk_async(container, pk_feed_range, - phys_session_token, - phys_feed_ranges_and_session_tokens) + _, phys_target_feed_range, phys_previous_session_token = await self.create_items_physical_pk_async( + container, pk_feed_range, phys_session_token, phys_feed_ranges_and_session_tokens + ) - phys_session_token = await container.get_latest_session_token(phys_feed_ranges_and_session_tokens, phys_target_feed_range) + phys_session_token = await container.get_latest_session_token( + phys_feed_ranges_and_session_tokens, phys_target_feed_range + ) pk_range_id, session_token = parse_session_token(phys_session_token) assert 300 <= session_token.global_lsn <= 370 - assert '2' in pk_range_id + assert "2" in pk_range_id await self.database.delete_container(container.id) async def test_latest_session_token_hpk(self): - container = await self.database.create_container("test_updated_session_token_hpk" + str(uuid.uuid4()), - PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), - offer_throughput=400) + container = await self.database.create_container( + "test_updated_session_token_hpk" + str(uuid.uuid4()), + PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), + offer_throughput=400, + ) feed_ranges_and_session_tokens = [] previous_session_token = "" - pk = ['CA', 'LA1', '90001'] + pk = ["CA", "LA1", "90001"] pk_feed_range = await container.feed_range_from_partition_key(pk) - target_session_token, target_feed_range, previous_session_token = await self.create_items_physical_pk_async(container, - pk_feed_range, - previous_session_token, - feed_ranges_and_session_tokens, - True) + target_session_token, target_feed_range, previous_session_token = await self.create_items_physical_pk_async( + container, pk_feed_range, previous_session_token, feed_ranges_and_session_tokens, True + ) session_token = await container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token await self.database.delete_container(container.id) - async def test_latest_session_token_logical_hpk(self): - container = await self.database.create_container("test_updated_session_token_from_logical_hpk" + str(uuid.uuid4()), - PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), - offer_throughput=400) + container = await self.database.create_container( + "test_updated_session_token_from_logical_hpk" + str(uuid.uuid4()), + PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), + offer_throughput=400, + ) feed_ranges_and_session_tokens = [] previous_session_token = "" - target_pk = ['CA', 'LA1', '90001'] + target_pk = ["CA", "LA1", "90001"] target_feed_range = await container.feed_range_from_partition_key(target_pk) - target_session_token, previous_session_token = await self.create_items_logical_pk_async(container, target_feed_range, - previous_session_token, - feed_ranges_and_session_tokens, - True) + target_session_token, previous_session_token = await self.create_items_logical_pk_async( + container, target_feed_range, previous_session_token, feed_ranges_and_session_tokens, True + ) session_token = await container.get_latest_session_token(feed_ranges_and_session_tokens, target_feed_range) assert session_token == target_session_token await self.database.delete_container(container.id) @staticmethod - async def create_items_logical_pk_async(container, target_pk_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False): + async def create_items_logical_pk_async( + container, target_pk_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False + ): target_session_token = "" for i in range(100): item = create_item(hpk) response = await container.create_item(item, session_token=previous_session_token) session_token = response.get_response_headers()[HttpHeaders.SessionToken] - pk = item['pk'] if not hpk else [item['state'], item['city'], item['zipcode']] + pk = item["pk"] if not hpk else [item["state"], item["city"], item["zipcode"]] pk_feed_range = await container.feed_range_from_partition_key(pk) pk_feed_range_epk = FeedRangeInternalEpk.from_json(pk_feed_range) target_feed_range_epk = FeedRangeInternalEpk.from_json(target_pk_range) - if (pk_feed_range_epk.get_normalized_range() == - target_feed_range_epk.get_normalized_range()): + if pk_feed_range_epk.get_normalized_range() == target_feed_range_epk.get_normalized_range(): target_session_token = session_token previous_session_token = session_token - feed_ranges_and_session_tokens.append((pk_feed_range, - session_token)) + feed_ranges_and_session_tokens.append((pk_feed_range, session_token)) return target_session_token, previous_session_token @staticmethod - async def create_items_physical_pk_async(container, pk_feed_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False): + async def create_items_physical_pk_async( + container, pk_feed_range, previous_session_token, feed_ranges_and_session_tokens, hpk=False + ): target_session_token = "" container_feed_ranges = [feed_range async for feed_range in container.read_feed_ranges()] target_feed_range = None @@ -172,10 +179,10 @@ async def create_items_physical_pk_async(container, pk_feed_range, previous_sess response = await container.create_item(item, session_token=previous_session_token) session_token = response.get_response_headers()[HttpHeaders.SessionToken] if hpk: - pk = [item['state'], item['city'], item['zipcode']] + pk = [item["state"], item["city"], item["zipcode"]] curr_feed_range = await container.feed_range_from_partition_key(pk) else: - curr_feed_range = await container.feed_range_from_partition_key(item['pk']) + curr_feed_range = await container.feed_range_from_partition_key(item["pk"]) if await container.is_feed_range_subset(target_feed_range, curr_feed_range): target_session_token = session_token previous_session_token = session_token @@ -183,5 +190,6 @@ async def create_items_physical_pk_async(container, pk_feed_range, previous_sess return target_session_token, target_feed_range, previous_session_token -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_location_cache.py b/sdk/cosmos/azure-cosmos/tests/test_location_cache.py index 8f44511cfdb9..72dc87fbbf1a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_location_cache.py +++ b/sdk/cosmos/azure-cosmos/tests/test_location_cache.py @@ -29,23 +29,29 @@ def create_database_account(enable_multiple_writable_locations): db_acc = DatabaseAccount() - db_acc._WritableLocations = [{"name": location1_name, "databaseAccountEndpoint": location1_endpoint}, - {"name": location2_name, "databaseAccountEndpoint": location2_endpoint}, - {"name": location3_name, "databaseAccountEndpoint": location3_endpoint}] - db_acc._ReadableLocations = [{"name": location1_name, "databaseAccountEndpoint": location1_endpoint}, - {"name": location2_name, "databaseAccountEndpoint": location2_endpoint}, - {"name": location4_name, "databaseAccountEndpoint": location4_endpoint}] + db_acc._WritableLocations = [ + {"name": location1_name, "databaseAccountEndpoint": location1_endpoint}, + {"name": location2_name, "databaseAccountEndpoint": location2_endpoint}, + {"name": location3_name, "databaseAccountEndpoint": location3_endpoint}, + ] + db_acc._ReadableLocations = [ + {"name": location1_name, "databaseAccountEndpoint": location1_endpoint}, + {"name": location2_name, "databaseAccountEndpoint": location2_endpoint}, + {"name": location4_name, "databaseAccountEndpoint": location4_endpoint}, + ] db_acc._EnableMultipleWritableLocations = enable_multiple_writable_locations return db_acc -def refresh_location_cache(preferred_locations, use_multiple_write_locations, connection_policy=documents.ConnectionPolicy()): +def refresh_location_cache( + preferred_locations, use_multiple_write_locations, connection_policy=documents.ConnectionPolicy() +): connection_policy.PreferredLocations = preferred_locations connection_policy.UseMultipleWriteLocations = use_multiple_write_locations - lc = LocationCache(default_endpoint=default_endpoint, - connection_policy=connection_policy) + lc = LocationCache(default_endpoint=default_endpoint, connection_policy=connection_policy) return lc + @pytest.mark.cosmosEmulator class TestLocationCache: @@ -54,13 +60,13 @@ def test_mark_endpoint_unavailable(self): # mark unavailable for read lc.mark_endpoint_unavailable_for_read(location1_endpoint, True) location1_info = lc.location_unavailability_info_by_endpoint[location1_endpoint] - assert location1_info['operationType'] == {'Read'} + assert location1_info["operationType"] == {"Read"} # mark unavailable for write time.sleep(1) lc.mark_endpoint_unavailable_for_write(location1_endpoint, False) location1_info = lc.location_unavailability_info_by_endpoint[location1_endpoint] - assert location1_info['operationType'] == {'Read', 'Write'} + assert location1_info["operationType"] == {"Read", "Write"} def test_is_endpoint_unavailable(self): lc = refresh_location_cache([], False) @@ -106,7 +112,7 @@ def test_get_locations(self): assert len(read_regions) == len(db_acc.ReadableLocations) for read_region in db_acc.ReadableLocations: found_endpoint = False - endpoint = read_region['databaseAccountEndpoint'] + endpoint = read_region["databaseAccountEndpoint"] for region in read_regions: if endpoint == region.get_primary(): found_endpoint = True @@ -117,7 +123,7 @@ def test_get_locations(self): assert len(write_regions) == len(db_acc.WritableLocations) for write_region in db_acc.WritableLocations: found_endpoint = False - endpoint = write_region['databaseAccountEndpoint'] + endpoint = write_region["databaseAccountEndpoint"] for region in write_regions: if endpoint == region.get_primary(): found_endpoint = True @@ -153,7 +159,7 @@ def test_resolve_request_endpoint_preferred_regions(self): assert read_resolved == location1_endpoint assert write_resolved == location1_endpoint - @pytest.mark.parametrize("test_type",["OnClient", "OnRequest", "OnBoth"]) + @pytest.mark.parametrize("test_type", ["OnClient", "OnRequest", "OnBoth"]) def test_get_applicable_regional_endpoints_excluded_regions(self, test_type): # Init test data if test_type == "OnClient": @@ -206,14 +212,25 @@ def test_get_applicable_regional_endpoints_excluded_regions(self, test_type): ] # Loop over each test cases - for excluded_locations_on_client, excluded_locations_on_requests, expected_read_endpoints, expected_write_endpoints in zip(excluded_locations_on_client_list, excluded_locations_on_requests_list, expected_read_endpoints_list, expected_write_endpoints_list): + for ( + excluded_locations_on_client, + excluded_locations_on_requests, + expected_read_endpoints, + expected_write_endpoints, + ) in zip( + excluded_locations_on_client_list, + excluded_locations_on_requests_list, + expected_read_endpoints_list, + expected_write_endpoints_list, + ): # Init excluded_locations in ConnectionPolicy connection_policy = documents.ConnectionPolicy() connection_policy.ExcludedLocations = excluded_locations_on_client # Init location_cache - location_cache = refresh_location_cache([location1_name, location2_name, location3_name], True, - connection_policy) + location_cache = refresh_location_cache( + [location1_name, location2_name, location3_name], True, connection_policy + ) database_account = create_database_account(True) location_cache.perform_on_database_account_read(database_account) @@ -224,13 +241,21 @@ def test_get_applicable_regional_endpoints_excluded_regions(self, test_type): read_doc_request.excluded_locations = excluded_locations_on_requests # Test if read endpoints were correctly filtered on client level - read_regional_routing_contexts = location_cache._get_applicable_read_regional_routing_contexts(read_doc_request) - read_doc_endpoint = [regional_routing_contexts.get_primary() for regional_routing_contexts in read_regional_routing_contexts] + read_regional_routing_contexts = location_cache._get_applicable_read_regional_routing_contexts( + read_doc_request + ) + read_doc_endpoint = [ + regional_routing_contexts.get_primary() for regional_routing_contexts in read_regional_routing_contexts + ] assert read_doc_endpoint == expected_read_endpoints # Test if write endpoints were correctly filtered on client level - write_regional_routing_contexts = location_cache._get_applicable_write_regional_routing_contexts(write_doc_request) - write_doc_endpoint = [regional_routing_contexts.get_primary() for regional_routing_contexts in write_regional_routing_contexts] + write_regional_routing_contexts = location_cache._get_applicable_write_regional_routing_contexts( + write_doc_request + ) + write_doc_endpoint = [ + regional_routing_contexts.get_primary() for regional_routing_contexts in write_regional_routing_contexts + ] assert write_doc_endpoint == expected_write_endpoints def test_set_excluded_locations_for_requests(self): @@ -240,8 +265,9 @@ def test_set_excluded_locations_for_requests(self): connection_policy.ExcludedLocations = excluded_locations_on_client # Init location_cache - location_cache = refresh_location_cache([location1_name, location2_name, location3_name], True, - connection_policy) + location_cache = refresh_location_cache( + [location1_name, location2_name, location3_name], True, connection_policy + ) database_account = create_database_account(True) location_cache.perform_on_database_account_read(database_account) @@ -257,18 +283,21 @@ def test_set_excluded_locations_for_requests(self): expected_read_endpoints = [location2_endpoint] read_regional_routing_contexts = location_cache._get_applicable_read_regional_routing_contexts(read_doc_request) - read_doc_endpoint = [regional_routing_contexts.get_primary() for regional_routing_contexts in read_regional_routing_contexts] + read_doc_endpoint = [ + regional_routing_contexts.get_primary() for regional_routing_contexts in read_regional_routing_contexts + ] assert read_doc_endpoint == expected_read_endpoints # Test setting excluded locations with None value - expected_error_message = ("Excluded locations cannot be None. " - "If you want to remove all excluded locations, try passing an empty list.") + expected_error_message = ( + "Excluded locations cannot be None. " + "If you want to remove all excluded locations, try passing an empty list." + ) with pytest.raises(ValueError) as e: options: Mapping[str, Any] = {"excludedLocations": None} doc_request = RequestObject(ResourceType.Document, _OperationType.Create, None) doc_request.set_excluded_location_from_options(options) - assert str( - e.value) == expected_error_message + assert str(e.value) == expected_error_message def test_resolve_endpoint_unavailable_and_excluded_preferred_regions(self): # Scenario: All preferred read locations are unavailable AND in the excluded list. @@ -501,9 +530,10 @@ def test_unavailable_endpoints_not_dropped_from_routing_list(self): # After marking unavailable, the routing list should still contain # both endpoints - healthy ones first, unavailable ones at the end write_contexts_after = lc.get_write_regional_routing_contexts() - assert len(write_contexts_after) == 2, \ - f"Expected 2 endpoints in routing list, got {len(write_contexts_after)}. " \ + assert len(write_contexts_after) == 2, ( + f"Expected 2 endpoints in routing list, got {len(write_contexts_after)}. " "Unavailable endpoint was incorrectly dropped!" + ) # location2 (healthy) should be first assert write_contexts_after[0].get_primary() == location2_endpoint # location1 (unavailable) should be at the end as fallback @@ -519,9 +549,10 @@ def test_unavailable_endpoints_not_dropped_from_routing_list(self): # Should fall back to location1 (unavailable regional endpoint) # NOT the global endpoint - assert resolved_endpoint == location1_endpoint, \ - f"Expected {location1_endpoint} but got {resolved_endpoint}. " \ + assert resolved_endpoint == location1_endpoint, ( + f"Expected {location1_endpoint} but got {resolved_endpoint}. " f"Bug: Unavailable endpoint was dropped and SDK fell back to global endpoint!" + ) def test_unavailable_endpoints_ordering_in_routing_list(self): """ @@ -555,5 +586,6 @@ def test_unavailable_endpoints_ordering_in_routing_list(self): assert write_contexts[1].get_primary() == location1_endpoint assert write_contexts[2].get_primary() == location2_endpoint + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_multi_orderby.py b/sdk/cosmos/azure-cosmos/tests/test_multi_orderby.py index 38699590b637..219f3eba9bc5 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_multi_orderby.py +++ b/sdk/cosmos/azure-cosmos/tests/test_multi_orderby.py @@ -13,10 +13,10 @@ from azure.cosmos import DatabaseProxy from azure.cosmos.partition_key import PartitionKey + @pytest.mark.cosmosQuery class TestMultiOrderBy(unittest.TestCase): - """Multi Orderby and Composite Indexes Tests. - """ + """Multi Orderby and Composite Indexes Tests.""" NUMBER_FIELD = "numberField" STRING_FIELD = "stringField" @@ -45,14 +45,21 @@ def setUpClass(cls): cls.database = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) def generate_multi_orderby_item(self): - item = {'id': str(uuid.uuid4()), self.NUMBER_FIELD: random.randint(0, 5), - self.NUMBER_FIELD_2: random.randint(0, 5), self.BOOL_FIELD: random.randint(0, 2) % 2 == 0, - self.STRING_FIELD: str(random.randint(0, 5)), self.STRING_FIELD_2: str(random.randint(0, 5)), - self.NULL_FIELD: None, self.OBJECT_FIELD: "", self.ARRAY_FIELD: [], - self.SHORT_STRING_FIELD: "a" + str(random.randint(0, 100)), - self.MEDIUM_STRING_FIELD: "a" + str(random.randint(0, 128) + 100), - self.LONG_STRING_FIELD: "a" + str(random.randint(0, 255) + 128), - self.PARTITION_KEY: random.randint(0, 5)} + item = { + "id": str(uuid.uuid4()), + self.NUMBER_FIELD: random.randint(0, 5), + self.NUMBER_FIELD_2: random.randint(0, 5), + self.BOOL_FIELD: random.randint(0, 2) % 2 == 0, + self.STRING_FIELD: str(random.randint(0, 5)), + self.STRING_FIELD_2: str(random.randint(0, 5)), + self.NULL_FIELD: None, + self.OBJECT_FIELD: "", + self.ARRAY_FIELD: [], + self.SHORT_STRING_FIELD: "a" + str(random.randint(0, 100)), + self.MEDIUM_STRING_FIELD: "a" + str(random.randint(0, 128) + 100), + self.LONG_STRING_FIELD: "a" + str(random.randint(0, 255) + 128), + self.PARTITION_KEY: random.randint(0, 5), + } return item def create_random_items(self, container, number_of_items, number_of_duplicates): @@ -63,29 +70,29 @@ def create_random_items(self, container, number_of_items, number_of_duplicates): for j in range(0, number_of_duplicates): # Add the item itself for exact duplicates clone = multi_orderby_item.copy() - clone['id'] = str(uuid.uuid4()) + clone["id"] = str(uuid.uuid4()) self.items.append(clone) # Permute all the fields so that there are duplicates with tie breaks number_clone = multi_orderby_item.copy() number_clone[self.NUMBER_FIELD] = random.randint(0, 5) - number_clone['id'] = str(uuid.uuid4()) + number_clone["id"] = str(uuid.uuid4()) self.items.append(number_clone) string_clone = multi_orderby_item.copy() string_clone[self.STRING_FIELD] = str(random.randint(0, 5)) - string_clone['id'] = str(uuid.uuid4()) + string_clone["id"] = str(uuid.uuid4()) self.items.append(string_clone) bool_clone = multi_orderby_item.copy() bool_clone[self.BOOL_FIELD] = random.randint(0, 2) % 2 == 0 - bool_clone['id'] = str(uuid.uuid4()) + bool_clone["id"] = str(uuid.uuid4()) self.items.append(bool_clone) # Also fuzz what partition it goes to partition_clone = multi_orderby_item.copy() partition_clone[self.PARTITION_KEY] = random.randint(0, 5) - partition_clone['id'] = str(uuid.uuid4()) + partition_clone["id"] = str(uuid.uuid4()) self.items.append(partition_clone) for item in self.items: @@ -95,98 +102,44 @@ def test_multi_orderby_queries(self): indexingPolicy = { "indexingMode": "consistent", "automatic": True, - "includedPaths": [ - { - "path": "/*", - "indexes": [] - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ], + "includedPaths": [{"path": "/*", "indexes": []}], + "excludedPaths": [{"path": '/"_etag"/?'}], "compositeIndexes": [ + [{"path": "/numberField", "order": "ascending"}, {"path": "/stringField", "order": "descending"}], [ - { - "path": "/numberField", - "order": "ascending" - }, - { - "path": "/stringField", - "order": "descending" - } + {"path": "/numberField", "order": "descending"}, + {"path": "/stringField", "order": "ascending"}, + {"path": "/numberField2", "order": "descending"}, + {"path": "/stringField2", "order": "ascending"}, ], [ - { - "path": "/numberField", - "order": "descending" - }, - { - "path": "/stringField", - "order": "ascending" - }, - { - "path": "/numberField2", - "order": "descending" - }, - { - "path": "/stringField2", - "order": "ascending" - } + {"path": "/numberField", "order": "descending"}, + {"path": "/stringField", "order": "ascending"}, + {"path": "/boolField", "order": "descending"}, + {"path": "/nullField", "order": "ascending"}, ], [ - { - "path": "/numberField", - "order": "descending" - }, - { - "path": "/stringField", - "order": "ascending" - }, - { - "path": "/boolField", - "order": "descending" - }, - { - "path": "/nullField", - "order": "ascending" - } + {"path": "/stringField", "order": "ascending"}, + {"path": "/shortStringField", "order": "ascending"}, + {"path": "/mediumStringField", "order": "ascending"}, + {"path": "/longStringField", "order": "ascending"}, ], - [ - { - "path": "/stringField", - "order": "ascending" - }, - { - "path": "/shortStringField", - "order": "ascending" - }, - { - "path": "/mediumStringField", - "order": "ascending" - }, - { - "path": "/longStringField", - "order": "ascending" - } - ] - ] + ], } - options = {'offerThroughput': 25100} + options = {"offerThroughput": 25100} created_container = self.database.create_container( - id='multi_orderby_container' + str(uuid.uuid4()), + id="multi_orderby_container" + str(uuid.uuid4()), indexing_policy=indexingPolicy, - partition_key=PartitionKey(path='/pk'), - request_options=options + partition_key=PartitionKey(path="/pk"), + request_options=options, ) number_of_items = 5 self.create_random_items(created_container, number_of_items, number_of_items) bool_vals = [True, False] - composite_indexes = indexingPolicy['compositeIndexes'] + composite_indexes = indexingPolicy["compositeIndexes"] for composite_index in composite_indexes: # for every order for invert in bool_vals: @@ -199,12 +152,12 @@ def test_multi_orderby_queries(self): orderby_items = [] select_items = [] for composite_path in composite_index: - is_desc = True if composite_path['order'] == "descending" else False + is_desc = True if composite_path["order"] == "descending" else False if invert: is_desc = not is_desc is_desc_string = "DESC" if is_desc else "ASC" - composite_path_name = composite_path['path'].replace("/", "") + composite_path_name = composite_path["path"].replace("/", "") orderby_items_string = "root." + composite_path_name + " " + is_desc_string select_items_string = "root." + composite_path_name orderby_items.append(orderby_items_string) @@ -223,15 +176,26 @@ def test_multi_orderby_queries(self): top_string = "TOP " + str(top_count) if has_top else "" where_string = "WHERE root." + self.NUMBER_FIELD + " % 2 = 0" if has_filter else "" - query = "SELECT " + top_string + " [" + select_item_builder + "] " + \ - "FROM root " + where_string + " " + \ - "ORDER BY " + orderby_item_builder # nosec + query = ( + "SELECT " + + top_string + + " [" + + select_item_builder + + "] " + + "FROM root " + + where_string + + " " + + "ORDER BY " + + orderby_item_builder + ) # nosec expected_ordered_list = self.top( - self.sort(self.filter(self.items, has_filter), composite_index, invert), has_top, top_count) + self.sort(self.filter(self.items, has_filter), composite_index, invert), has_top, top_count + ) result_ordered_list = list( - created_container.query_items(query=query, enable_cross_partition_query=True)) + created_container.query_items(query=query, enable_cross_partition_query=True) + ) self.validate_results(expected_ordered_list, result_ordered_list, composite_index) @@ -243,13 +207,14 @@ def top(self, items, has_top, top_count): def sort(self, items, composite_index, invert): current_docs = items for composite_path in reversed(composite_index): - order = composite_path['order'] + order = composite_path["order"] if invert: order = "ascending" if order == "descending" else "descending" - path = composite_path['path'].replace("/", "") + path = composite_path["path"].replace("/", "") if self.NULL_FIELD not in path: - current_docs = sorted(current_docs, key=lambda x: x[path], - reverse=True if order == "descending" else False) + current_docs = sorted( + current_docs, key=lambda x: x[path], reverse=True if order == "descending" else False + ) return current_docs def filter(self, items, has_filter): @@ -259,11 +224,11 @@ def validate_results(self, expected_ordered_list, result_ordered_list, composite self.assertEqual(len(expected_ordered_list), len(result_ordered_list)) for i in range(0, len(expected_ordered_list)): - result_values = result_ordered_list[i]['$1'] + result_values = result_ordered_list[i]["$1"] self.assertEqual(len(result_values), len(composite_index)) for j in range(0, len(composite_index)): - path = composite_index[j]['path'].replace("/", "") + path = composite_index[j]["path"].replace("/", "") if self.NULL_FIELD in path: self.assertIsNone(expected_ordered_list[i][path]) self.assertIsNone(result_values[j]) @@ -271,5 +236,5 @@ def validate_results(self, expected_ordered_list, result_ordered_list, composite self.assertEqual(expected_ordered_list[i][path], result_values[j]) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_multimaster.py b/sdk/cosmos/azure-cosmos/tests/test_multimaster.py index 10da5c8bb63e..9662ee4be21e 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_multimaster.py +++ b/sdk/cosmos/azure-cosmos/tests/test_multimaster.py @@ -40,49 +40,39 @@ def _validate_tentative_write_headers(self): try: connectionPolicy = TestMultiMaster.connectionPolicy connectionPolicy.UseMultipleWriteLocations = True - client = cosmos_client.CosmosClient(TestMultiMaster.host, TestMultiMaster.masterKey, - consistency_level="Session", - connection_policy=connectionPolicy) + client = cosmos_client.CosmosClient( + TestMultiMaster.host, + TestMultiMaster.masterKey, + consistency_level="Session", + connection_policy=connectionPolicy, + ) created_db = client.get_database_client(self.configs.TEST_DATABASE_ID) created_collection = created_db.get_container_client(self.configs.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': 'doc' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'operation': 'insertion'} + document_definition = { + "id": "doc" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "operation": "insertion", + } created_document = created_collection.create_item(body=document_definition) - sproc_definition = { - 'id': 'sample sproc' + str(uuid.uuid4()), - 'serverScript': 'function() {var x = 10;}' - } + sproc_definition = {"id": "sample sproc" + str(uuid.uuid4()), "serverScript": "function() {var x = 10;}"} sproc = created_collection.scripts.create_stored_procedure(body=sproc_definition) - created_collection.scripts.execute_stored_procedure( - sproc=sproc['id'], - partition_key='pk' - ) + created_collection.scripts.execute_stored_procedure(sproc=sproc["id"], partition_key="pk") - created_collection.read_item( - item=created_document, - partition_key='pk' - ) + created_collection.read_item(item=created_document, partition_key="pk") - created_document['operation'] = 'replace' - replaced_document = created_collection.replace_item( - item=created_document['id'], - body=created_document - ) + created_document["operation"] = "replace" + replaced_document = created_collection.replace_item(item=created_document["id"], body=created_document) - replaced_document['operation'] = 'upsert' + replaced_document["operation"] = "upsert" upserted_document = created_collection.upsert_item(body=replaced_document) - created_collection.delete_item( - item=upserted_document, - partition_key='pk' - ) + created_collection.delete_item(item=upserted_document, partition_key="pk") is_allow_tentative_writes_set = self.EnableMultipleWritableLocations is True @@ -93,14 +83,19 @@ def _validate_tentative_write_headers(self): # When multi-write is enabled, at least 6 write operations should have the header: # create_item, create_stored_procedure, execute_stored_procedure, # replace_item, upsert_item, delete_item - self.assertGreaterEqual(headers_with_tentative_writes, 6, + self.assertGreaterEqual( + headers_with_tentative_writes, + 6, f"Expected at least 6 write operations with tentative writes header, " - f"got {headers_with_tentative_writes}") + f"got {headers_with_tentative_writes}", + ) else: # When multi-write is disabled, no operations should have the header - self.assertEqual(headers_with_tentative_writes, 0, - f"Expected 0 operations with tentative writes header, " - f"got {headers_with_tentative_writes}") + self.assertEqual( + headers_with_tentative_writes, + 0, + f"Expected 0 operations with tentative writes header, " f"got {headers_with_tentative_writes}", + ) finally: _retry_utility.ExecuteFunction = self.OriginalExecuteFunction @@ -110,10 +105,12 @@ def _MockExecuteFunction(self, function, *args, **kwargs): return {constants._Constants.EnableMultipleWritableLocations: self.EnableMultipleWritableLocations}, {} else: if len(args) > 0: - self.last_headers.append(HttpHeaders.AllowTentativeWrites in args[4].headers - and args[4].headers[HttpHeaders.AllowTentativeWrites] == 'true') + self.last_headers.append( + HttpHeaders.AllowTentativeWrites in args[4].headers + and args[4].headers[HttpHeaders.AllowTentativeWrites] == "true" + ) return self.OriginalExecuteFunction(function, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_murmurhash3.py b/sdk/cosmos/azure-cosmos/tests/test_murmurhash3.py index 5990b2d62e8e..3c5c355b22bf 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_murmurhash3.py +++ b/sdk/cosmos/azure-cosmos/tests/test_murmurhash3.py @@ -12,8 +12,8 @@ @pytest.mark.cosmosEmulator class TestMurmurHash3(unittest.TestCase): - """Python Murmurhash3 Tests and its compatibility with backend implementation.. - """ + """Python Murmurhash3 Tests and its compatibility with backend implementation..""" + string_low_value = 2792699143512860960 string_high_value = 15069672278200047189 test_seed = _UInt128(0, 0) @@ -29,13 +29,13 @@ def test_float_hash(self): def test_string_hash(self): s = "afdgdd" # cspell:disable-line ba = bytearray() - ba.extend(s.encode('utf-8')) + ba.extend(s.encode("utf-8")) ret = murmurhash3_128(ba, self.test_seed) self.assertEqual(self.string_low_value, ret.get_low().value) self.assertEqual(self.string_high_value, ret.get_high().value) -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: diff --git a/sdk/cosmos/azure-cosmos/tests/test_none_options.py b/sdk/cosmos/azure-cosmos/tests/test_none_options.py index 8c39f3f12795..5254deaeb950 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_none_options.py +++ b/sdk/cosmos/azure-cosmos/tests/test_none_options.py @@ -24,96 +24,190 @@ def setUp(self) -> None: def _create_sample_item(self): item = {"id": str(uuid.uuid4()), "pk": "pk-value", "value": 42} - self.container.create_item(item, pre_trigger_include=None, post_trigger_include=None, indexing_directive=None, - enable_automatic_id_generation=False, session_token=None, initial_headers=None, - priority=None, no_response=None, retry_write=None, throughput_bucket=None) + self.container.create_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) return item def test_container_read_none_options(self): - result = self.container.read(populate_partition_key_range_statistics=None, populate_quota_info=None, - priority=None, initial_headers=None) + result = self.container.read( + populate_partition_key_range_statistics=None, populate_quota_info=None, priority=None, initial_headers=None + ) assert result def test_container_create_item_none_options(self): item = {"id": str(uuid.uuid4()), "pk": "pk-value", "value": 1} - created = self.container.create_item(item, pre_trigger_include=None, post_trigger_include=None, - indexing_directive=None, enable_automatic_id_generation=False, - session_token=None, initial_headers=None, priority=None, no_response=None, - retry_write=None, throughput_bucket=None) + created = self.container.create_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert created["id"] == item["id"] def test_container_read_item_none_options(self): item = self._create_sample_item() - read_back = self.container.read_item(item["id"], partition_key=item["pk"], post_trigger_include=None, - session_token=None, initial_headers=None, - max_integrated_cache_staleness_in_ms=None, priority=None, - throughput_bucket=None) + read_back = self.container.read_item( + item["id"], + partition_key=item["pk"], + post_trigger_include=None, + session_token=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + priority=None, + throughput_bucket=None, + ) assert read_back["id"] == item["id"] def test_container_read_all_items_none_options(self): self._create_sample_item() - pager = self.container.read_all_items(max_item_count=None, session_token=None, initial_headers=None, - max_integrated_cache_staleness_in_ms=None, priority=None, - throughput_bucket=None) + pager = self.container.read_all_items( + max_item_count=None, + session_token=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + priority=None, + throughput_bucket=None, + ) items = list(pager) assert len(items) >= 1 def test_container_read_items_none_options(self): item = self._create_sample_item() - results = self.container.read_items([(item["id"], item["pk"])], max_concurrency=None, consistency_level=None, - session_token=None, initial_headers=None, excluded_locations=None, - priority=None, throughput_bucket=None) + results = self.container.read_items( + [(item["id"], item["pk"])], + max_concurrency=None, + consistency_level=None, + session_token=None, + initial_headers=None, + excluded_locations=None, + priority=None, + throughput_bucket=None, + ) assert any(r["id"] == item["id"] for r in results) def test_container_query_items_none_options_partition(self): self._create_sample_item() - pager = self.container.query_items("SELECT * FROM c", continuation_token_limit=None, enable_scan_in_query=None, - initial_headers=None, max_integrated_cache_staleness_in_ms=None, max_item_count=None, - parameters=None, partition_key=None, populate_index_metrics=None, - populate_query_advice=None, - populate_query_metrics=None, priority=None, response_hook=None, session_token=None, - throughput_bucket=None, enable_cross_partition_query=True) + pager = self.container.query_items( + "SELECT * FROM c", + continuation_token_limit=None, + enable_scan_in_query=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + max_item_count=None, + parameters=None, + partition_key=None, + populate_index_metrics=None, + populate_query_advice=None, + populate_query_metrics=None, + priority=None, + response_hook=None, + session_token=None, + throughput_bucket=None, + enable_cross_partition_query=True, + ) items = list(pager) assert len(items) >= 1 def test_upsert_item_none_options(self): item = {"id": str(uuid.uuid4()), "pk": "pk-value", "value": 5} - upserted = self.container.upsert_item(item, pre_trigger_include=None, post_trigger_include=None, - session_token=None, initial_headers=None, etag=None, - match_condition=None, priority=None, no_response=None, - retry_write=None, throughput_bucket=None) + upserted = self.container.upsert_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + initial_headers=None, + etag=None, + match_condition=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert upserted["id"] == item["id"] def test_replace_item_none_options(self): item = self._create_sample_item() new_body = {"id": item["id"], "pk": item["pk"], "value": 999} - replaced = self.container.replace_item(item["id"], new_body, pre_trigger_include=None, - post_trigger_include=None, session_token=None, - initial_headers=None, etag=None, match_condition=None, - priority=None, no_response=None, retry_write=None, - throughput_bucket=None) + replaced = self.container.replace_item( + item["id"], + new_body, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + initial_headers=None, + etag=None, + match_condition=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert replaced["value"] == 999 def test_patch_item_none_options(self): item = self._create_sample_item() operations = [{"op": "add", "path": "/patched", "value": True}] - patched = self.container.patch_item(item["id"], partition_key=item["pk"], patch_operations=operations, - filter_predicate=None, pre_trigger_include=None, post_trigger_include=None, - session_token=None, etag=None, match_condition=None, priority=None, - no_response=None, retry_write=None, throughput_bucket=None) + patched = self.container.patch_item( + item["id"], + partition_key=item["pk"], + patch_operations=operations, + filter_predicate=None, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + etag=None, + match_condition=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert patched["patched"] is True def test_delete_item_none_options(self): item = self._create_sample_item() - self.container.delete_item(item["id"], partition_key=item["pk"], pre_trigger_include=None, - post_trigger_include=None, session_token=None, initial_headers=None, - etag=None, match_condition=None, priority=None, retry_write=None, - throughput_bucket=None) + self.container.delete_item( + item["id"], + partition_key=item["pk"], + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + initial_headers=None, + etag=None, + match_condition=None, + priority=None, + retry_write=None, + throughput_bucket=None, + ) with self.assertRaises(CosmosHttpResponseError): - self.container.read_item(item["id"], partition_key=item["pk"], post_trigger_include=None, - session_token=None, initial_headers=None, - max_integrated_cache_staleness_in_ms=None, priority=None, - throughput_bucket=None) + self.container.read_item( + item["id"], + partition_key=item["pk"], + post_trigger_include=None, + session_token=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + priority=None, + throughput_bucket=None, + ) def test_get_throughput_none_options(self): tp = self.container.get_throughput(response_hook=None) @@ -125,8 +219,14 @@ def test_list_conflicts_none_options(self): assert conflicts == conflicts # may be empty def test_query_conflicts_none_options(self): - pager = self.container.query_conflicts("SELECT * FROM c", parameters=None, partition_key=None, - max_item_count=None, response_hook=None, enable_cross_partition_query=True) + pager = self.container.query_conflicts( + "SELECT * FROM c", + parameters=None, + partition_key=None, + max_item_count=None, + response_hook=None, + enable_cross_partition_query=True, + ) conflicts = list(pager) assert conflicts == conflicts @@ -134,16 +234,39 @@ def test_delete_all_items_by_partition_key_none_options(self): pk_value = "delete-pk" for _ in range(2): item = {"id": str(uuid.uuid4()), "pk": pk_value, "value": 1} - self.container.create_item(item, pre_trigger_include=None, post_trigger_include=None, indexing_directive=None, - enable_automatic_id_generation=False, session_token=None, initial_headers=None, - priority=None, no_response=None, retry_write=None, throughput_bucket=None) - self.container.delete_all_items_by_partition_key(pk_value, pre_trigger_include=None, post_trigger_include=None, - session_token=None, throughput_bucket=None) - pager = self.container.query_items("SELECT * FROM c WHERE c.pk = @pk", parameters=[{"name": "@pk", "value": pk_value}], - partition_key=None, continuation_token_limit=None, enable_scan_in_query=None, - initial_headers=None, max_integrated_cache_staleness_in_ms=None, max_item_count=None, - populate_index_metrics=None, populate_query_advice=None, populate_query_metrics=None, priority=None, - response_hook=None, session_token=None, throughput_bucket=None) + self.container.create_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) + self.container.delete_all_items_by_partition_key( + pk_value, pre_trigger_include=None, post_trigger_include=None, session_token=None, throughput_bucket=None + ) + pager = self.container.query_items( + "SELECT * FROM c WHERE c.pk = @pk", + parameters=[{"name": "@pk", "value": pk_value}], + partition_key=None, + continuation_token_limit=None, + enable_scan_in_query=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + max_item_count=None, + populate_index_metrics=None, + populate_query_advice=None, + populate_query_metrics=None, + priority=None, + response_hook=None, + session_token=None, + throughput_bucket=None, + ) _items = list(pager) assert _items == _items @@ -155,19 +278,41 @@ def test_execute_item_batch_none_options(self): ("create", ({"id": id1, "pk": pk_value},)), ("create", ({"id": id2, "pk": pk_value},)), ] - batch_result = self.container.execute_item_batch(ops, partition_key=pk_value, - pre_trigger_include=None, post_trigger_include=None, - session_token=None, priority=None, - throughput_bucket=None) - assert any(r.get("resourceBody").get("id") == id1 for r in batch_result) or any(r.get("resourceBody").get("id") == id2 for r in batch_result) + batch_result = self.container.execute_item_batch( + ops, + partition_key=pk_value, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + priority=None, + throughput_bucket=None, + ) + assert any(r.get("resourceBody").get("id") == id1 for r in batch_result) or any( + r.get("resourceBody").get("id") == id2 for r in batch_result + ) def test_query_items_change_feed_none_options(self): - #Create an item, then acquire the change feed pager to verify the item appears in the feed. - self.container.create_item({"id": str(uuid.uuid4()), "pk": "cf-pk", "value": 100}, - pre_trigger_include=None, post_trigger_include=None, indexing_directive=None, - enable_automatic_id_generation=False, session_token=None, initial_headers=None, - priority=None, no_response=None, retry_write=None, throughput_bucket=None) - pager = self.container.query_items_change_feed(max_item_count=None, start_time="Beginning", partition_key=None, - priority=None, mode=None, response_hook=None) + # Create an item, then acquire the change feed pager to verify the item appears in the feed. + self.container.create_item( + {"id": str(uuid.uuid4()), "pk": "cf-pk", "value": 100}, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) + pager = self.container.query_items_change_feed( + max_item_count=None, + start_time="Beginning", + partition_key=None, + priority=None, + mode=None, + response_hook=None, + ) changes = list(pager) assert len(changes) >= 1 diff --git a/sdk/cosmos/azure-cosmos/tests/test_none_options_async.py b/sdk/cosmos/azure-cosmos/tests/test_none_options_async.py index 0045f53a1062..f0e8c7e76ecd 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_none_options_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_none_options_async.py @@ -28,96 +28,189 @@ async def asyncTearDown(self): async def _create_sample_item(self): item = {"id": str(uuid.uuid4()), "pk": "pk-value", "value": 42} - await self.container.create_item(item, pre_trigger_include=None, post_trigger_include=None, indexing_directive=None, - enable_automatic_id_generation=False, session_token=None, initial_headers=None, - priority=None, no_response=None, retry_write=None, throughput_bucket=None) + await self.container.create_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) return item async def test_container_read_none_options_async(self): - result = await self.container.read(populate_partition_key_range_statistics=None, populate_quota_info=None, - priority=None, initial_headers=None) + result = await self.container.read( + populate_partition_key_range_statistics=None, populate_quota_info=None, priority=None, initial_headers=None + ) assert result async def test_container_create_item_none_options_async(self): item = {"id": str(uuid.uuid4()), "pk": "pk-value", "value": 1} - created = await self.container.create_item(item, pre_trigger_include=None, post_trigger_include=None, - indexing_directive=None, enable_automatic_id_generation=False, - session_token=None, initial_headers=None, priority=None, no_response=None, - retry_write=None, throughput_bucket=None) + created = await self.container.create_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert created["id"] == item["id"] async def test_container_read_item_none_options_async(self): item = await self._create_sample_item() - read_back = await self.container.read_item(item["id"], partition_key=item["pk"], post_trigger_include=None, - session_token=None, initial_headers=None, - max_integrated_cache_staleness_in_ms=None, priority=None, - throughput_bucket=None) + read_back = await self.container.read_item( + item["id"], + partition_key=item["pk"], + post_trigger_include=None, + session_token=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + priority=None, + throughput_bucket=None, + ) assert read_back["id"] == item["id"] async def test_container_read_all_items_none_options_async(self): await self._create_sample_item() - pager = self.container.read_all_items(max_item_count=None, session_token=None, initial_headers=None, - max_integrated_cache_staleness_in_ms=None, priority=None, - throughput_bucket=None) + pager = self.container.read_all_items( + max_item_count=None, + session_token=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + priority=None, + throughput_bucket=None, + ) items = [item async for item in pager] assert len(items) >= 1 async def test_container_read_items_none_options_async(self): item = await self._create_sample_item() - results = await self.container.read_items([(item["id"], item["pk"])], max_concurrency=None, consistency_level=None, - session_token=None, initial_headers=None, excluded_locations=None, - priority=None, throughput_bucket=None) + results = await self.container.read_items( + [(item["id"], item["pk"])], + max_concurrency=None, + consistency_level=None, + session_token=None, + initial_headers=None, + excluded_locations=None, + priority=None, + throughput_bucket=None, + ) assert any(r["id"] == item["id"] for r in results) async def test_container_query_items_none_options_partition_async(self): await self._create_sample_item() - pager = self.container.query_items("SELECT * FROM c", continuation_token_limit=None, enable_scan_in_query=None, - initial_headers=None, max_integrated_cache_staleness_in_ms=None, max_item_count=None, - parameters=None, partition_key=None, populate_index_metrics=None, - populate_query_advice=None, - populate_query_metrics=None, priority=None, response_hook=None, session_token=None, - throughput_bucket=None) + pager = self.container.query_items( + "SELECT * FROM c", + continuation_token_limit=None, + enable_scan_in_query=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + max_item_count=None, + parameters=None, + partition_key=None, + populate_index_metrics=None, + populate_query_advice=None, + populate_query_metrics=None, + priority=None, + response_hook=None, + session_token=None, + throughput_bucket=None, + ) items = [doc async for doc in pager] assert len(items) >= 1 async def test_upsert_item_none_options_async(self): item = {"id": str(uuid.uuid4()), "pk": "pk-value", "value": 5} - upserted = await self.container.upsert_item(item, pre_trigger_include=None, post_trigger_include=None, - session_token=None, initial_headers=None, etag=None, - match_condition=None, priority=None, no_response=None, - retry_write=None, throughput_bucket=None) + upserted = await self.container.upsert_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + initial_headers=None, + etag=None, + match_condition=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert upserted["id"] == item["id"] async def test_replace_item_none_options_async(self): item = await self._create_sample_item() new_body = {"id": item["id"], "pk": item["pk"], "value": 999} - replaced = await self.container.replace_item(item["id"], new_body, pre_trigger_include=None, - post_trigger_include=None, session_token=None, - initial_headers=None, etag=None, match_condition=None, - priority=None, no_response=None, retry_write=None, - throughput_bucket=None) + replaced = await self.container.replace_item( + item["id"], + new_body, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + initial_headers=None, + etag=None, + match_condition=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert replaced["value"] == 999 async def test_patch_item_none_options_async(self): item = await self._create_sample_item() operations = [{"op": "add", "path": "/patched", "value": True}] - patched = await self.container.patch_item(item["id"], partition_key=item["pk"], patch_operations=operations, - filter_predicate=None, pre_trigger_include=None, post_trigger_include=None, - session_token=None, etag=None, match_condition=None, priority=None, - no_response=None, retry_write=None, throughput_bucket=None) + patched = await self.container.patch_item( + item["id"], + partition_key=item["pk"], + patch_operations=operations, + filter_predicate=None, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + etag=None, + match_condition=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) assert patched["patched"] is True async def test_delete_item_none_options_async(self): item = await self._create_sample_item() - await self.container.delete_item(item["id"], partition_key=item["pk"], pre_trigger_include=None, - post_trigger_include=None, session_token=None, initial_headers=None, - etag=None, match_condition=None, priority=None, retry_write=None, - throughput_bucket=None) + await self.container.delete_item( + item["id"], + partition_key=item["pk"], + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + initial_headers=None, + etag=None, + match_condition=None, + priority=None, + retry_write=None, + throughput_bucket=None, + ) with self.assertRaises(CosmosHttpResponseError): - await self.container.read_item(item["id"], partition_key=item["pk"], post_trigger_include=None, - session_token=None, initial_headers=None, - max_integrated_cache_staleness_in_ms=None, priority=None, - throughput_bucket=None) + await self.container.read_item( + item["id"], + partition_key=item["pk"], + post_trigger_include=None, + session_token=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + priority=None, + throughput_bucket=None, + ) async def test_get_throughput_none_options_async(self): tp = await self.container.get_throughput(response_hook=None) @@ -129,8 +222,9 @@ async def test_list_conflicts_none_options_async(self): assert conflicts == conflicts # simple sanity (may be empty) async def test_query_conflicts_none_options_async(self): - pager = self.container.query_conflicts("SELECT * FROM c", parameters=None, partition_key=None, - max_item_count=None, response_hook=None) + pager = self.container.query_conflicts( + "SELECT * FROM c", parameters=None, partition_key=None, max_item_count=None, response_hook=None + ) conflicts = [c async for c in pager] assert conflicts == conflicts @@ -138,19 +232,40 @@ async def test_delete_all_items_by_partition_key_none_options_async(self): pk_value = "delete-pk" for _ in range(2): item = {"id": str(uuid.uuid4()), "pk": pk_value, "value": 1} - await self.container.create_item(item, pre_trigger_include=None, post_trigger_include=None, - indexing_directive=None, enable_automatic_id_generation=False, - session_token=None, initial_headers=None, priority=None, no_response=None, - retry_write=None, throughput_bucket=None) - await self.container.delete_all_items_by_partition_key(pk_value, pre_trigger_include=None, - post_trigger_include=None, session_token=None, - throughput_bucket=None) + await self.container.create_item( + item, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) + await self.container.delete_all_items_by_partition_key( + pk_value, pre_trigger_include=None, post_trigger_include=None, session_token=None, throughput_bucket=None + ) # Just ensure query still works with None options - pager = self.container.query_items("SELECT * FROM c WHERE c.pk = @pk", parameters=[{"name": "@pk", "value": pk_value}], - partition_key=None, continuation_token_limit=None, enable_scan_in_query=None, - initial_headers=None, max_integrated_cache_staleness_in_ms=None, max_item_count=None, - populate_index_metrics=None, populate_query_advice=None, populate_query_metrics=None, priority=None, - response_hook=None, session_token=None, throughput_bucket=None) + pager = self.container.query_items( + "SELECT * FROM c WHERE c.pk = @pk", + parameters=[{"name": "@pk", "value": pk_value}], + partition_key=None, + continuation_token_limit=None, + enable_scan_in_query=None, + initial_headers=None, + max_integrated_cache_staleness_in_ms=None, + max_item_count=None, + populate_index_metrics=None, + populate_query_advice=None, + populate_query_metrics=None, + priority=None, + response_hook=None, + session_token=None, + throughput_bucket=None, + ) _items = [doc async for doc in pager] assert _items == _items @@ -162,22 +277,43 @@ async def test_execute_item_batch_none_options_async(self): ("create", ({"id": id1, "pk": pk_value},)), ("create", ({"id": id2, "pk": pk_value},)), ] - batch_result = await self.container.execute_item_batch(ops, partition_key=pk_value, - pre_trigger_include=None, post_trigger_include=None, - session_token=None, priority=None, - throughput_bucket=None) - assert any(r.get("resourceBody").get("id") == id1 for r in batch_result) or any(r.get("resourceBody").get("id") == id2 for r in batch_result) - + batch_result = await self.container.execute_item_batch( + ops, + partition_key=pk_value, + pre_trigger_include=None, + post_trigger_include=None, + session_token=None, + priority=None, + throughput_bucket=None, + ) + assert any(r.get("resourceBody").get("id") == id1 for r in batch_result) or any( + r.get("resourceBody").get("id") == id2 for r in batch_result + ) async def test_query_items_change_feed_none_options_async(self): for _ in range(15): - await self.container.create_item({"id": str(uuid.uuid4()), "pk": "cf-pk", "value": 100}, - pre_trigger_include=None, post_trigger_include=None, indexing_directive=None, - enable_automatic_id_generation=False, session_token=None, initial_headers=None, - priority=None, no_response=None, retry_write=None, throughput_bucket=None) + await self.container.create_item( + {"id": str(uuid.uuid4()), "pk": "cf-pk", "value": 100}, + pre_trigger_include=None, + post_trigger_include=None, + indexing_directive=None, + enable_automatic_id_generation=False, + session_token=None, + initial_headers=None, + priority=None, + no_response=None, + retry_write=None, + throughput_bucket=None, + ) # Obtain the change feed pager with all optional parameters set to None (including partition_key) - pager = self.container.query_items_change_feed(max_item_count=None, start_time="Beginning", partition_key=None, - priority=None, mode=None, response_hook=None) + pager = self.container.query_items_change_feed( + max_item_count=None, + start_time="Beginning", + partition_key=None, + priority=None, + mode=None, + response_hook=None, + ) changes = [doc async for doc in pager] assert len(changes) >= 1 diff --git a/sdk/cosmos/azure-cosmos/tests/test_orderby.py b/sdk/cosmos/azure-cosmos/tests/test_orderby.py index cc64b9432ce5..f92cdcad1e34 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_orderby.py +++ b/sdk/cosmos/azure-cosmos/tests/test_orderby.py @@ -17,8 +17,7 @@ @pytest.mark.cosmosQuery class TestCrossPartitionTopOrderBy(unittest.TestCase): - """Orderby Tests. - """ + """Orderby Tests.""" document_definitions = None created_container: ContainerProxy = None @@ -32,51 +31,44 @@ class TestCrossPartitionTopOrderBy(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.created_container = cls.created_db.create_container( - id='orderby_tests collection ' + str(uuid.uuid4()), + id="orderby_tests collection " + str(uuid.uuid4()), indexing_policy={ - 'includedPaths': [ + "includedPaths": [ { - 'path': '/', - 'indexes': [ - { - 'kind': 'Range', - 'dataType': 'Number' - }, - { - 'kind': 'Range', - 'dataType': 'String' - } - ] + "path": "/", + "indexes": [{"kind": "Range", "dataType": "Number"}, {"kind": "Range", "dataType": "String"}], } ] }, - partition_key=PartitionKey(path='/id'), - offer_throughput=30000) + partition_key=PartitionKey(path="/id"), + offer_throughput=30000, + ) cls.collection_link = cls.GetDocumentCollectionLink(cls.created_db, cls.created_container) # create a document using the document definition cls.document_definitions = [] for i in range(20): - d = {'id': str(i), - 'name': 'sample document', - 'spam': 'eggs' + str(i), - 'cnt': i, - 'key': 'value', - 'spam2': 'eggs' + str(i) if (i == 3) else i, - 'boolVar': (i % 2 == 0), - 'number': 1.1 * i - } + d = { + "id": str(i), + "name": "sample document", + "spam": "eggs" + str(i), + "cnt": i, + "key": "value", + "spam2": "eggs" + str(i) if (i == 3) else i, + "boolVar": (i % 2 == 0), + "number": 1.1 * i, + } cls.created_container.create_item(d) cls.document_definitions.append(d) @@ -92,13 +84,13 @@ def test_orderby_query(self): # an order by query query = { - 'query': 'SELECT * FROM root r order by r.spam', + "query": "SELECT * FROM root r order by r.spam", } def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] # validates the results size and order self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -107,12 +99,12 @@ def test_orderby_query_as_string(self): # test a simple order by query as string # an order by query - query = 'SELECT * FROM root r order by r.spam' + query = "SELECT * FROM root r order by r.spam" def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] # validates the results size and order self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -122,13 +114,13 @@ def test_orderby_asc_query(self): # an ascending order by query (ascending explicitly mentioned in the query) query = { - 'query': 'SELECT * FROM root r order by r.spam ASC', + "query": "SELECT * FROM root r order by r.spam ASC", } def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] # validates the results size and order self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -138,13 +130,13 @@ def test_orderby_desc_query(self): # a descending order by query query = { - 'query': 'SELECT * FROM root r order by r.spam DESC', + "query": "SELECT * FROM root r order by r.spam DESC", } def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key, reverse=True)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key, reverse=True)] # validates the results size and order self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -153,18 +145,16 @@ def test_orderby_top_query(self): # test an order by query combined with top top_count = 9 - # sanity check + # sanity check self.assertLess(top_count, len(self.document_definitions)) - # an order by query with top, total existing docs more than requested top count - query = { - 'query': 'SELECT top %d * FROM root r order by r.spam' % top_count # nosec - } + # an order by query with top, total existing docs more than requested top count + query = {"query": "SELECT top %d * FROM root r order by r.spam" % top_count} # nosec def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)[:top_count]] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)[:top_count]] self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -172,23 +162,21 @@ def test_orderby_top_query_less_results_than_top_counts(self): # test an order by query combined with top. where top is greater than the total number of docs top_count = 30 - # sanity check + # sanity check self.assertGreater(top_count, len(self.document_definitions)) - # an order by query with top, total existing docs less than requested top count - query = { - 'query': 'SELECT top %d * FROM root r order by r.spam' % top_count # nosec - } + # an order by query with top, total existing docs less than requested top count + query = {"query": "SELECT top %d * FROM root r order by r.spam" % top_count} # nosec def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] self.execute_query_and_validate_results(query, expected_ordered_ids) def test_top_query(self): - # test a simple top query without order by. + # test a simple top query without order by. # The rewrittenQuery in the query execution info responded by backend will be empty partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) @@ -201,7 +189,7 @@ def test_top_query(self): for r in partition_key_ranges: if cnt >= 2: break - p_id = r['id'] + p_id = r["id"] if len(docs_by_partition_key_range_id[p_id]) > 0: first_two_ranges_results.extend(docs_by_partition_key_range_id[p_id]) cnt += 1 @@ -214,16 +202,14 @@ def test_top_query(self): self.assertLess(len(first_two_ranges_results), len(self.document_definitions)) self.assertGreater(len(first_two_ranges_results), 1) - expected_ordered_ids = [d['id'] for d in first_two_ranges_results] + expected_ordered_ids = [d["id"] for d in first_two_ranges_results] - # a top query, the results will be sorted based on the target partition key range - query = { - 'query': 'SELECT top %d * FROM root r' % len(expected_ordered_ids) # nosec - } + # a top query, the results will be sorted based on the target partition key range + query = {"query": "SELECT top %d * FROM root r" % len(expected_ordered_ids)} # nosec self.execute_query_and_validate_results(query, expected_ordered_ids) def test_top_query_as_string(self): - # test a simple top query without order by. + # test a simple top query without order by. # The rewrittenQuery in the query execution info responded by backend will be empty partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) @@ -236,7 +222,7 @@ def test_top_query_as_string(self): for r in partition_key_ranges: if cnt >= 2: break - p_id = r['id'] + p_id = r["id"] if len(docs_by_partition_key_range_id[p_id]) > 0: first_two_ranges_results.extend(docs_by_partition_key_range_id[p_id]) cnt += 1 @@ -249,14 +235,14 @@ def test_top_query_as_string(self): self.assertLess(len(first_two_ranges_results), len(self.document_definitions)) self.assertGreater(len(first_two_ranges_results), 1) - expected_ordered_ids = [d['id'] for d in first_two_ranges_results] + expected_ordered_ids = [d["id"] for d in first_two_ranges_results] - # a top query, the results will be sorted based on the target partition key range - query = 'SELECT top %d * FROM root r' % len(expected_ordered_ids) # nosec + # a top query, the results will be sorted based on the target partition key range + query = "SELECT top %d * FROM root r" % len(expected_ordered_ids) # nosec self.execute_query_and_validate_results(query, expected_ordered_ids) def test_parametrized_top_query(self): - # test a simple parameterized query without order by. + # test a simple parameterized query without order by. # The rewrittenQuery in the query execution info responded by backend will be empty partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) @@ -269,7 +255,7 @@ def test_parametrized_top_query(self): for r in partition_key_ranges: if cnt >= 2: break - p_id = r['id'] + p_id = r["id"] if len(docs_by_partition_key_range_id[p_id]) > 0: first_two_ranges_results.extend(docs_by_partition_key_range_id[p_id]) cnt += 1 @@ -282,15 +268,12 @@ def test_parametrized_top_query(self): self.assertLess(len(first_two_ranges_results), len(self.document_definitions)) self.assertGreater(len(first_two_ranges_results), 1) - expected_ordered_ids = [d['id'] for d in first_two_ranges_results] + expected_ordered_ids = [d["id"] for d in first_two_ranges_results] - # a top query, the results will be sorted based on the target partition key range + # a top query, the results will be sorted based on the target partition key range query = { - 'query': 'SELECT top @n * FROM root r', - - "parameters": [ - {"name": "@n", "value": len(expected_ordered_ids)} - ] + "query": "SELECT top @n * FROM root r", + "parameters": [{"name": "@n", "value": len(expected_ordered_ids)}], } self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -298,21 +281,18 @@ def test_orderby_query_with_parametrized_top(self): # test an order by query combined with parametrized top top_count = 9 - # sanity check + # sanity check self.assertLess(top_count, len(self.document_definitions)) def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)[:top_count]] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)[:top_count]] # a parametrized top order by query query = { - 'query': 'SELECT top @n * FROM root r order by r.spam', - - "parameters": [ - {"name": "@n", "value": top_count} - ] + "query": "SELECT top @n * FROM root r order by r.spam", + "parameters": [{"name": "@n", "value": top_count}], } self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -322,19 +302,16 @@ def test_orderby_query_with_parametrized_predicate(self): # an order by query with parametrized predicate query = { - 'query': 'SELECT * FROM root r where r.cnt > @cnt order by r.spam', - - "parameters": [ - {"name": "@cnt", "value": 5} - ] - + "query": "SELECT * FROM root r where r.cnt > @cnt order by r.spam", + "parameters": [{"name": "@cnt", "value": 5}], } def get_order_by_key(r): - return r['spam'] + return r["spam"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key) if - r['cnt'] > 5] + expected_ordered_ids = [ + r["id"] for r in sorted(self.document_definitions, key=get_order_by_key) if r["cnt"] > 5 + ] self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -343,32 +320,33 @@ def test_orderby_query_noncomparable_orderby_item(self): # an order by query query = { - 'query': 'SELECT * FROM root r order by r.spam2 DESC', + "query": "SELECT * FROM root r order by r.spam2 DESC", } def get_order_by_key(r): - return r['id'] + return r["id"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] # validates the results size and order try: self.execute_query_and_validate_results(query, expected_ordered_ids) - self.fail('non comparable order by items did not result in failure.') + self.fail("non comparable order by items did not result in failure.") except ValueError as e: self.assertTrue( - e.args[0] == "Expected String, but got Number." or e.message == "Expected Number, but got String.") + e.args[0] == "Expected String, but got Number." or e.message == "Expected Number, but got String." + ) def test_orderby_integer_query(self): # an order by integer query query = { - 'query': 'SELECT * FROM root r order by r.cnt', + "query": "SELECT * FROM root r order by r.cnt", } def get_order_by_key(r): - return r['cnt'] + return r["cnt"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] # validates the results size and order self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -376,13 +354,13 @@ def get_order_by_key(r): def test_orderby_floating_point_number_query(self): # an orderby by floating point number query query = { - 'query': 'SELECT * FROM root r order by r.number', + "query": "SELECT * FROM root r order by r.number", } def get_order_by_key(r): - return r['number'] + return r["number"] - expected_ordered_ids = [r['id'] for r in sorted(self.document_definitions, key=get_order_by_key)] + expected_ordered_ids = [r["id"] for r in sorted(self.document_definitions, key=get_order_by_key)] # validates the results size and order self.execute_query_and_validate_results(query, expected_ordered_ids) @@ -390,13 +368,11 @@ def get_order_by_key(r): def test_orderby_boolean_query(self): # an orderby by floating point number query query = { - 'query': 'SELECT * FROM root r order by r.boolVar', + "query": "SELECT * FROM root r order by r.boolVar", } result_iterable = self.created_container.query_items( - query=query, - enable_cross_partition_query=True, - max_item_count=2 + query=query, enable_cross_partition_query=True, max_item_count=2 ) results = list(result_iterable) # validates the results size and order @@ -406,32 +382,30 @@ def test_orderby_boolean_query(self): # false values before true values index = 0 while index < len(results): - if results[index]['boolVar']: + if results[index]["boolVar"]: break - self.assertTrue(int(results[index]['id']) % 2 == 1) + self.assertTrue(int(results[index]["id"]) % 2 == 1) index = index + 1 while index < len(results): - self.assertTrue(results[index]['boolVar']) - self.assertTrue(int(results[index]['id']) % 2 == 0) + self.assertTrue(results[index]["boolVar"]) + self.assertTrue(int(results[index]["id"]) % 2 == 0) index = index + 1 def find_docs_by_partition_key_range_id(self): - query = { - 'query': 'SELECT * FROM root r' - } + query = {"query": "SELECT * FROM root r"} partition_key_range = list(self.client.client_connection._ReadPartitionKeyRanges(self.collection_link)) docs_by_partition_key_range_id = {} for r in partition_key_range: options = {} - path = base.GetPathFromLink(self.collection_link, 'docs') + path = base.GetPathFromLink(self.collection_link, "docs") collection_id = base.GetResourceIdOrFullNameFromLink(self.collection_link) def fetch_fn(options): - return self.client.client_connection.QueryFeed(path, collection_id, query, options, r['id']) + return self.client.client_connection.QueryFeed(path, collection_id, query, options, r["id"]) docResultsIterable = ItemPaged( self.client.client_connection, @@ -439,12 +413,12 @@ def fetch_fn(options): options, fetch_function=fetch_fn, collection_link=self.collection_link, - page_iterator_class=query_iterable.QueryIterable + page_iterator_class=query_iterable.QueryIterable, ) docs = list(docResultsIterable) - self.assertFalse(r['id'] in docs_by_partition_key_range_id) - docs_by_partition_key_range_id[r['id']] = docs + self.assertFalse(r["id"] in docs_by_partition_key_range_id) + docs_by_partition_key_range_id[r["id"]] = docs return docs_by_partition_key_range_id def execute_query_and_validate_results(self, query, expected_ordered_ids): @@ -452,9 +426,7 @@ def execute_query_and_validate_results(self, query, expected_ordered_ids): page_size = 2 result_iterable = self.created_container.query_items( - query=query, - enable_cross_partition_query=True, - max_item_count=page_size + query=query, enable_cross_partition_query=True, max_item_count=page_size ) self.assertTrue(isinstance(result_iterable, ItemPaged)) @@ -471,7 +443,7 @@ def invokeNext(): # validate that invocations of next() produces the same results as expected_ordered_ids for i in range(len(expected_ordered_ids)): item = invokeNext() - self.assertEqual(item['id'], expected_ordered_ids[i]) + self.assertEqual(item["id"], expected_ordered_ids[i]) ###################################### # test by_page() behavior @@ -484,10 +456,10 @@ def invokeNext(): fetched_size = len(fetched_res) for item in fetched_res: - self.assertEqual(item['id'], expected_ordered_ids[cnt]) + self.assertEqual(item["id"], expected_ordered_ids[cnt]) results[cnt] = item cnt = cnt + 1 - if (cnt < len(expected_ordered_ids)): + if cnt < len(expected_ordered_ids): self.assertEqual(fetched_size, page_size, "page size") else: if cnt == len(expected_ordered_ids): @@ -507,23 +479,23 @@ def invokeNext(): @classmethod def GetDatabaseLink(cls, database, is_name_based=True): if is_name_based: - return 'dbs/' + database.id + return "dbs/" + database.id else: - return database['_self'] + return database["_self"] @classmethod def GetDocumentCollectionLink(cls, database, document_collection, is_name_based=True): if is_name_based: - return cls.GetDatabaseLink(database) + '/colls/' + document_collection.id + return cls.GetDatabaseLink(database) + "/colls/" + document_collection.id else: - return document_collection['_self'] + return document_collection["_self"] @classmethod def GetDocumentLink(cls, database, document_collection, document, is_name_based=True): if is_name_based: - return cls.GetDocumentCollectionLink(database, document_collection) + '/docs/' + document['id'] + return cls.GetDocumentCollectionLink(database, document_collection) + "/docs/" + document["id"] else: - return document['_self'] + return document["_self"] if __name__ == "__main__": diff --git a/sdk/cosmos/azure-cosmos/tests/test_partition_key.py b/sdk/cosmos/azure-cosmos/tests/test_partition_key.py index fb6f0d73f7d8..ee53486f42a0 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_partition_key.py +++ b/sdk/cosmos/azure-cosmos/tests/test_partition_key.py @@ -24,31 +24,31 @@ def _new_null_pk_doc(pk_field: PkField) -> ItemDict: if pk_field is None: - return {'id': str(uuid.uuid4())} - return {'id': str(uuid.uuid4()), pk_field: None} + return {"id": str(uuid.uuid4())} + return {"id": str(uuid.uuid4()), pk_field: None} -def _assert_pk(item: ItemDict, pk_field: PkField = 'pk') -> None: +def _assert_pk(item: ItemDict, pk_field: PkField = "pk") -> None: if pk_field: assert item[pk_field] is None else: assert pk_field not in item -def _read_and_assert(container: ContainerProxy, doc_id: str, pk_field: PkField = 'pk', pk_value: Any = None) -> None: +def _read_and_assert(container: ContainerProxy, doc_id: str, pk_field: PkField = "pk", pk_value: Any = None) -> None: item = container.read_item(item=doc_id, partition_key=pk_value) _assert_pk(item, pk_field) -def _query_and_assert_single(container: ContainerProxy, pk_field: PkField = 'pk', pk_value: Any = None) -> None: - query_iterable = container.query_items(query='SELECT * from c', partition_key=pk_value) +def _query_and_assert_single(container: ContainerProxy, pk_field: PkField = "pk", pk_value: Any = None) -> None: + query_iterable = container.query_items(query="SELECT * from c", partition_key=pk_value) results = list(query_iterable) assert len(results) > 0 for result in results: _assert_pk(result, pk_field) -def _change_feed_and_assert(container: ContainerProxy, pk_field: PkField = 'pk', pk_value: Any = None) -> None: +def _change_feed_and_assert(container: ContainerProxy, pk_field: PkField = "pk", pk_value: Any = None) -> None: changes_iterable = container.query_items_change_feed(is_start_from_beginning=True, partition_key=pk_value) changes = list(changes_iterable) assert len(changes) > 0 @@ -56,23 +56,23 @@ def _change_feed_and_assert(container: ContainerProxy, pk_field: PkField = 'pk', _assert_pk(change, pk_field) -def _replace_update_cycle(container: ContainerProxy, doc: ItemDict, pk_field: PkField = 'pk') -> None: - doc['newField'] = 'newValue' - item = container.replace_item(item=doc['id'], body=doc) - assert item['newField'] == 'newValue' +def _replace_update_cycle(container: ContainerProxy, doc: ItemDict, pk_field: PkField = "pk") -> None: + doc["newField"] = "newValue" + item = container.replace_item(item=doc["id"], body=doc) + assert item["newField"] == "newValue" _assert_pk(item, pk_field) item = container.upsert_item(body=doc) _assert_pk(item, pk_field) -def _patch_and_assert(container: ContainerProxy, doc_id: str, pk_field: PkField = 'pk', pk_value: Any = None) -> None: +def _patch_and_assert(container: ContainerProxy, doc_id: str, pk_field: PkField = "pk", pk_value: Any = None) -> None: operations = [{"op": "add", "path": "/favorite_color", "value": "red"}] item = container.patch_item(item=doc_id, partition_key=pk_value, patch_operations=operations) - assert item['favorite_color'] == 'red' + assert item["favorite_color"] == "red" _assert_pk(item, pk_field) -def _batch_and_assert(container: ContainerProxy, pk_field: PkField = 'pk', pk_value: Any = None) -> None: +def _batch_and_assert(container: ContainerProxy, pk_field: PkField = "pk", pk_value: Any = None) -> None: if pk_value == partition_key.NullPartitionKeyValue: batch_operations = [ ("upsert", (({"id": str(uuid.uuid4()), pk_field: None}),)), @@ -87,37 +87,57 @@ def _batch_and_assert(container: ContainerProxy, pk_field: PkField = 'pk', pk_va ] items = container.execute_item_batch(batch_operations=batch_operations, partition_key=pk_value) assert len(items) == 1 - _assert_pk(items[0]['resourceBody'], pk_field) + _assert_pk(items[0]["resourceBody"], pk_field) + @pytest.fixture(scope="class") def setup(): - if (TestPartitionKey.masterKey == '[YOUR_KEY_HERE]' or - TestPartitionKey.host == '[YOUR_ENDPOINT_HERE]'): + if TestPartitionKey.masterKey == "[YOUR_KEY_HERE]" or TestPartitionKey.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - test_client = cosmos_client.CosmosClient(TestPartitionKey.host, TestPartitionKey.masterKey), + "tests." + ) + test_client = (cosmos_client.CosmosClient(TestPartitionKey.host, TestPartitionKey.masterKey),) created_db = test_client[0].get_database_client(TestPartitionKey.TEST_DATABASE_ID) - return { - DATABASE: created_db, - COLLECTION: created_db.get_container_client(TestPartitionKey.TEST_CONTAINER_ID) - } + return {DATABASE: created_db, COLLECTION: created_db.get_container_client(TestPartitionKey.TEST_CONTAINER_ID)} def _assert_no_conflicts(container: ContainerProxy, pk_value: PkField) -> None: - conflict_definition: ItemDict = {'id': 'new conflict', 'resourceId': 'doc1', 'operationType': 'create', 'resourceType': 'document'} + conflict_definition: ItemDict = { + "id": "new conflict", + "resourceId": "doc1", + "operationType": "create", + "resourceType": "document", + } if pk_value: - assert len(list(container.query_conflicts(query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', partition_key=pk_value))) == 0 + assert ( + len( + list( + container.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + + conflict_definition.get("resourceType") + + "'", + partition_key=pk_value, + ) + ) + ) + == 0 + ) else: try: - list(container.query_conflicts(query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', partition_key=pk_value)) + list( + container.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + partition_key=pk_value, + ) + ) pytest.fail("Should have thrown since cross partition query not allowed") except CosmosHttpResponseError as ex: assert ex.status_code, 400 for api_call in (container.get_conflict, container.delete_conflict): try: - api_call(conflict_definition['id'], partition_key=pk_value) + api_call(conflict_definition["id"], partition_key=pk_value) pytest.fail("Should have thrown since there are no conflicts") except AzureError as ex: assert isinstance(ex, CosmosResourceNotFoundError) @@ -129,8 +149,8 @@ def _perform_operations_on_pk(created_container, pk_field, pk_value): item = created_container.create_item(body=document_definition) _assert_pk(item, pk_field) # Read & point reads - _read_and_assert(created_container, document_definition['id'], pk_field, pk_value) - items_iter = created_container.read_items(items=[(document_definition['id'], pk_value)]) + _read_and_assert(created_container, document_definition["id"], pk_field, pk_value) + items_iter = created_container.read_items(items=[(document_definition["id"], pk_value)]) items_list = list(items_iter) assert len(items_list) == 1 _assert_pk(items_list[0], pk_field) @@ -151,7 +171,7 @@ def _perform_operations_on_pk(created_container, pk_field, pk_value): # Replace / Upsert cycle _replace_update_cycle(created_container, document_definition, pk_field) # Patch - _patch_and_assert(created_container, document_definition['id'], pk_field, pk_value) + _patch_and_assert(created_container, document_definition["id"], pk_field, pk_value) # Batch _batch_and_assert(created_container, pk_field, pk_value) # Conflicts @@ -159,15 +179,15 @@ def _perform_operations_on_pk(created_container, pk_field, pk_value): # Get Feed Range feed_range = created_container.feed_range_from_partition_key(partition_key=pk_value) assert feed_range is not None - items_iter = created_container.query_items(query='SELECT * FROM c', - feed_range=feed_range, - enable_cross_partition_query=True) + items_iter = created_container.query_items( + query="SELECT * FROM c", feed_range=feed_range, enable_cross_partition_query=True + ) items_list = list(items_iter) assert len(items_list) > 0 for item in items_list: _assert_pk(item, pk_field) # Delete - created_container.delete_item(item=document_definition['id'], partition_key=pk_value) + created_container.delete_item(item=document_definition["id"], partition_key=pk_value) # recreate the item to test delete item api created_container.create_item(body=document_definition) created_container.delete_all_items_by_partition_key(partition_key=pk_value) @@ -177,8 +197,7 @@ def _perform_operations_on_pk(created_container, pk_field, pk_value): @pytest.mark.unittest @pytest.mark.usefixtures("setup") class TestPartitionKey: - """Tests to verify if non-partitioned collections are properly accessed on migration with version 2018-12-31. - """ + """Tests to verify if non-partitioned collections are properly accessed on migration with version 2018-12-31.""" client: cosmos_client.CosmosClient = None created_db: DatabaseProxy = None @@ -194,20 +213,20 @@ def test_multi_partition_collection_read_document_with_no_pk(self, setup, versio pk_val: PkField = partition_key.NonePartitionKeyValue # type: ignore[assignment] created_container = setup[DATABASE].create_container_if_not_exists( id="container_with_no_pk" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk", kind='Hash', version=version) + partition_key=PartitionKey(path="/pk", kind="Hash", version=version), ) try: - _perform_operations_on_pk(created_container, None, pk_val) + _perform_operations_on_pk(created_container, None, pk_val) finally: setup[DATABASE].delete_container(created_container) @pytest.mark.parametrize("version", VERSIONS) def test_with_null_pk(self, setup, version) -> None: - pk_field = 'pk' + pk_field = "pk" pk_vals = [None, partition_key.NullPartitionKeyValue] created_container = setup[DATABASE].create_container_if_not_exists( id="container_with_nul_pk" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk", kind='Hash', version=version) + partition_key=PartitionKey(path="/pk", kind="Hash", version=version), ) try: for pk_value in pk_vals: @@ -217,17 +236,17 @@ def test_with_null_pk(self, setup, version) -> None: def test_hash_v2_partition_key_definition(self, setup) -> None: created_container_properties = setup[COLLECTION].read() - assert created_container_properties['partitionKey']['version'] == 2 + assert created_container_properties["partitionKey"]["version"] == 2 def test_hash_v1_partition_key_definition(self, setup) -> None: created_container = setup[DATABASE].create_container( - id='container_with_pkd_v2' + str(uuid.uuid4()), - partition_key=partition_key.PartitionKey(path="/id", kind="Hash", version=1) + id="container_with_pkd_v2" + str(uuid.uuid4()), + partition_key=partition_key.PartitionKey(path="/id", kind="Hash", version=1), ) created_container_properties = created_container.read() - assert created_container_properties['partitionKey']['version'] == 1 + assert created_container_properties["partitionKey"]["version"] == 1 setup[DATABASE].delete_container(created_container) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_partition_key_async.py b/sdk/cosmos/azure-cosmos/tests/test_partition_key_async.py index dab9f530abf0..488e255d2e0f 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_partition_key_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_partition_key_async.py @@ -22,19 +22,28 @@ DATABASE = "created_db" CLIENT = "client" -async def _read_and_assert(container: ContainerProxy, doc_id: str, pk_field: Optional[str] = 'pk', pk_value: Any = None) -> None: + +async def _read_and_assert( + container: ContainerProxy, doc_id: str, pk_field: Optional[str] = "pk", pk_value: Any = None +) -> None: item = await container.read_item(item=doc_id, partition_key=pk_value) _assert_pk(item, pk_field) -async def _query_and_assert_single(container: ContainerProxy, pk_field: Optional[str] = 'pk', pk_value: Any = None) -> None: - query_iterable = container.query_items(query='SELECT * from c', partition_key=pk_value) + +async def _query_and_assert_single( + container: ContainerProxy, pk_field: Optional[str] = "pk", pk_value: Any = None +) -> None: + query_iterable = container.query_items(query="SELECT * from c", partition_key=pk_value) counter = 0 async for item in query_iterable: _assert_pk(item, pk_field) counter += 1 assert counter > 0 -async def _change_feed_and_assert(container: ContainerProxy, pk_field: Optional[str] = 'pk', pk_value: Any = None) -> None: + +async def _change_feed_and_assert( + container: ContainerProxy, pk_field: Optional[str] = "pk", pk_value: Any = None +) -> None: changes_iterable = container.query_items_change_feed(is_start_from_beginning=True, partition_key=pk_value) counter = 0 async for change in changes_iterable: @@ -42,68 +51,87 @@ async def _change_feed_and_assert(container: ContainerProxy, pk_field: Optional[ counter += 1 assert counter > 0 -async def _replace_update_cycle(container: ContainerProxy, doc: ItemDict, pk_field: Optional[str] = 'pk') -> None: - doc['newField'] = 'newValue' - item = await container.replace_item(item=doc['id'], body=doc) - assert item['newField'] == 'newValue' + +async def _replace_update_cycle(container: ContainerProxy, doc: ItemDict, pk_field: Optional[str] = "pk") -> None: + doc["newField"] = "newValue" + item = await container.replace_item(item=doc["id"], body=doc) + assert item["newField"] == "newValue" _assert_pk(item, pk_field) item = await container.upsert_item(body=doc) _assert_pk(item, pk_field) -async def _patch_and_assert(container: ContainerProxy, doc_id: str, pk_field: Optional[str] = 'pk', pk_value: Any = None) -> None: + +async def _patch_and_assert( + container: ContainerProxy, doc_id: str, pk_field: Optional[str] = "pk", pk_value: Any = None +) -> None: operations = [{"op": "add", "path": "/favorite_color", "value": "red"}] item = await container.patch_item(item=doc_id, partition_key=pk_value, patch_operations=operations) - assert item['favorite_color'] == 'red' + assert item["favorite_color"] == "red" _assert_pk(item, pk_field) -async def _batch_and_assert(container: ContainerProxy, pk_field: Optional[str] = 'pk', pk_value: Any = None) -> None: + +async def _batch_and_assert(container: ContainerProxy, pk_field: Optional[str] = "pk", pk_value: Any = None) -> None: if pk_value == partition_key.NullPartitionKeyValue: - batch_operations = [("upsert", (({"id": str(uuid.uuid4()), pk_field: None}),)),] + batch_operations = [ + ("upsert", (({"id": str(uuid.uuid4()), pk_field: None}),)), + ] elif pk_field: - batch_operations = [("upsert", (({"id": str(uuid.uuid4()), pk_field: pk_value}),)),] + batch_operations = [ + ("upsert", (({"id": str(uuid.uuid4()), pk_field: pk_value}),)), + ] else: - batch_operations = [("upsert", (({"id": str(uuid.uuid4())}),)),] + batch_operations = [ + ("upsert", (({"id": str(uuid.uuid4())}),)), + ] items = await container.execute_item_batch(batch_operations=batch_operations, partition_key=pk_value) assert len(items) == 1 - _assert_pk(items[0]['resourceBody'], pk_field) + _assert_pk(items[0]["resourceBody"], pk_field) + @pytest_asyncio.fixture() async def setup_async(): - if (TestPartitionKeyAsync.masterKey == '[YOUR_KEY_HERE]' or - TestPartitionKeyAsync.host == '[YOUR_ENDPOINT_HERE]'): + if TestPartitionKeyAsync.masterKey == "[YOUR_KEY_HERE]" or TestPartitionKeyAsync.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) test_client = CosmosClient(TestPartitionKeyAsync.host, TestPartitionKeyAsync.masterKey) created_db = test_client.get_database_client(TestPartitionKeyAsync.TEST_DATABASE_ID) - yield { - DATABASE: created_db, - COLLECTION: created_db.get_container_client(TestPartitionKeyAsync.TEST_CONTAINER_ID) - } + yield {DATABASE: created_db, COLLECTION: created_db.get_container_client(TestPartitionKeyAsync.TEST_CONTAINER_ID)} await test_client.close() + async def _assert_no_conflicts(container: ContainerProxy, pk_value: PkField) -> None: - conflict_definition: ItemDict = {'id': 'new conflict', 'resourceId': 'doc1', 'operationType': 'create', 'resourceType': 'document'} + conflict_definition: ItemDict = { + "id": "new conflict", + "resourceId": "doc1", + "operationType": "create", + "resourceType": "document", + } if pk_value: - conflicts_iter = container.query_conflicts(query='SELECT * FROM root r WHERE r.resourceType=\'' + conflict_definition.get('resourceType') + '\'', partition_key=pk_value) + conflicts_iter = container.query_conflicts( + query="SELECT * FROM root r WHERE r.resourceType='" + conflict_definition.get("resourceType") + "'", + partition_key=pk_value, + ) conflicts = [c async for c in conflicts_iter] assert len(conflicts) == 0 for api_call in (container.get_conflict, container.delete_conflict): try: - await api_call(conflict_definition['id'], partition_key=pk_value) + await api_call(conflict_definition["id"], partition_key=pk_value) pytest.fail("Should have thrown since there are no conflicts") except AzureError as ex: assert isinstance(ex, CosmosResourceNotFoundError) + async def _perform_operations_on_pk(created_container, pk_field, pk_value): # Create initial null PK doc document_definition = _new_null_pk_doc(pk_field) item = await created_container.create_item(body=document_definition) _assert_pk(item, pk_field) # Read & point reads - await _read_and_assert(created_container, document_definition['id'], pk_field, pk_value) - items_iter = await created_container.read_items(items=[(document_definition['id'], pk_value)]) + await _read_and_assert(created_container, document_definition["id"], pk_field, pk_value) + items_iter = await created_container.read_items(items=[(document_definition["id"], pk_value)]) items_list = [i for i in items_iter] assert len(items_list) == 1 _assert_pk(items_list[0], pk_field) @@ -116,7 +144,7 @@ async def _perform_operations_on_pk(created_container, pk_field, pk_value): # Replace / Upsert cycle await _replace_update_cycle(created_container, document_definition, pk_field) # Patch - await _patch_and_assert(created_container, document_definition['id'], pk_field, pk_value) + await _patch_and_assert(created_container, document_definition["id"], pk_field, pk_value) # Batch await _batch_and_assert(created_container, pk_field, pk_value) # Conflicts @@ -124,24 +152,23 @@ async def _perform_operations_on_pk(created_container, pk_field, pk_value): # Get Feed Range feed_range = await created_container.feed_range_from_partition_key(partition_key=pk_value) assert feed_range is not None - items_iter = created_container.query_items(query='SELECT * FROM c', - feed_range=feed_range) + items_iter = created_container.query_items(query="SELECT * FROM c", feed_range=feed_range) items_list = [i async for i in items_iter] assert len(items_list) > 0 for item in items_list: _assert_pk(item, pk_field) # Delete - await created_container.delete_item(item=document_definition['id'], partition_key=pk_value) + await created_container.delete_item(item=document_definition["id"], partition_key=pk_value) # recreate the item to test delete item api await created_container.create_item(body=document_definition) await created_container.delete_all_items_by_partition_key(partition_key=pk_value) + @pytest.mark.asyncio @pytest.mark.usefixtures("setup_async") @pytest.mark.cosmosEmulator class TestPartitionKeyAsync: - """Tests to verify if non-partitioned collections are properly accessed on migration with version 2018-12-31. - """ + """Tests to verify if non-partitioned collections are properly accessed on migration with version 2018-12-31.""" client: CosmosClient = None created_db: DatabaseProxy = None @@ -155,18 +182,21 @@ class TestPartitionKeyAsync: @pytest.mark.parametrize("version", VERSIONS) async def test_multi_partition_collection_read_document_with_no_pk_async(self, setup_async, version) -> None: pk_val = partition_key.NonePartitionKeyValue - created_container = await setup_async[DATABASE].create_container_if_not_exists(id="container_with_no_pk" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind='Hash')) + created_container = await setup_async[DATABASE].create_container_if_not_exists( + id="container_with_no_pk" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind="Hash") + ) try: - await _perform_operations_on_pk(created_container, pk_field=None, pk_value=pk_val) + await _perform_operations_on_pk(created_container, pk_field=None, pk_value=pk_val) finally: await setup_async[DATABASE].delete_container(created_container) - @pytest.mark.parametrize("version", VERSIONS) async def test_with_null_pk_async(self, setup_async, version) -> None: - pk_field = 'pk' + pk_field = "pk" pk_values = [None, partition_key.NullPartitionKeyValue] - created_container = await setup_async[DATABASE].create_container_if_not_exists(id="container_with_nul_pk" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind='Hash')) + created_container = await setup_async[DATABASE].create_container_if_not_exists( + id="container_with_nul_pk" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind="Hash") + ) try: for pk_value in pk_values: await _perform_operations_on_pk(created_container, pk_field, pk_value) @@ -175,14 +205,17 @@ async def test_with_null_pk_async(self, setup_async, version) -> None: async def test_hash_v2_partition_key_definition_async(self, setup_async) -> None: created_container_properties = await setup_async[COLLECTION].read() - assert created_container_properties['partitionKey']['version'] == 2 + assert created_container_properties["partitionKey"]["version"] == 2 async def test_hash_v1_partition_key_definition_async(self, setup_async) -> None: - created_container = await setup_async[DATABASE].create_container(id='container_with_pkd_v2' + str(uuid.uuid4()), partition_key=partition_key.PartitionKey(path="/id", kind="Hash", version=1)) + created_container = await setup_async[DATABASE].create_container( + id="container_with_pkd_v2" + str(uuid.uuid4()), + partition_key=partition_key.PartitionKey(path="/id", kind="Hash", version=1), + ) created_container_properties = await created_container.read() - assert created_container_properties['partitionKey']['version'] == 1 + assert created_container_properties["partitionKey"]["version"] == 1 await setup_async[DATABASE].delete_container(created_container) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_partition_split_query.py b/sdk/cosmos/azure-cosmos/tests/test_partition_split_query.py index dab0f1be6d0d..0912bcff0ff8 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_partition_split_query.py +++ b/sdk/cosmos/azure-cosmos/tests/test_partition_split_query.py @@ -18,14 +18,14 @@ def run_queries(container, iterations): ret_list = [] for i in range(iterations): curr = str(random.randint(0, 10)) - query = 'SELECT * FROM c WHERE c.attr1=' + curr + ' order by c.attr1' + query = "SELECT * FROM c WHERE c.attr1=" + curr + " order by c.attr1" qlist = list(container.query_items(query=query, enable_cross_partition_query=True)) ret_list.append((curr, qlist)) for ret in ret_list: curr = ret[0] if len(ret[1]) != 0: for results in ret[1]: - attr_number = results['attr1'] + attr_number = results["attr1"] assert str(attr_number) == curr # verify that all results match their randomly generated attributes print("validation succeeded for all query results") @@ -48,9 +48,8 @@ def setUpClass(cls): cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.database = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.container = cls.database.create_container( - id=cls.TEST_CONTAINER_ID, - partition_key=PartitionKey(path="/id"), - offer_throughput=cls.throughput) + id=cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/id"), offer_throughput=cls.throughput + ) @classmethod def tearDownClass(cls) -> None: @@ -78,7 +77,7 @@ def test_partition_split_query(self): while True: if time.time() - start_time > self.MAX_TIME: # timeout test at 10 minutes self.skipTest("Partition split didn't complete in time") - if offer.properties['content'].get('isOfferReplacePending', False): + if offer.properties["content"].get("isOfferReplacePending", False): time.sleep(30) # wait for the offer to be replaced, check every 30 seconds offer = self.container.get_throughput() else: diff --git a/sdk/cosmos/azure-cosmos/tests/test_partition_split_query_async.py b/sdk/cosmos/azure-cosmos/tests/test_partition_split_query_async.py index 37642712fb8b..04772dc30c2d 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_partition_split_query_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_partition_split_query_async.py @@ -11,18 +11,19 @@ from azure.cosmos import PartitionKey from azure.cosmos.aio import CosmosClient, DatabaseProxy, ContainerProxy + async def run_queries(container, iterations): ret_list = [] for i in range(iterations): curr = str(random.randint(0, 10)) - query = 'SELECT * FROM c WHERE c.attr1=' + curr + ' order by c.attr1' + query = "SELECT * FROM c WHERE c.attr1=" + curr + " order by c.attr1" qlist = [item async for item in container.query_items(query=query)] ret_list.append((curr, qlist)) for ret in ret_list: curr = ret[0] if len(ret[1]) != 0: for results in ret[1]: - attr_number = results['attr1'] + attr_number = results["attr1"] assert str(attr_number) == curr # verify that all results match their randomly generated attributes print("validation succeeded for all query results") @@ -42,21 +43,20 @@ class TestPartitionSplitQueryAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) await self.client.__aenter__() self.created_database = self.client.get_database_client(self.TEST_DATABASE_ID) self.container = await self.created_database.create_container( - id=self.TEST_CONTAINER_ID, - partition_key=PartitionKey(path="/id"), - offer_throughput=self.throughput) + id=self.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/id"), offer_throughput=self.throughput + ) async def asyncTearDown(self): await self.client.close() @@ -80,7 +80,7 @@ async def test_partition_split_query_async(self): while True: if time.time() - start_time > self.MAX_TIME: # timeout test at 10 minutes self.skipTest("Partition split didn't complete in time.") - if offer.properties['content'].get('isOfferReplacePending', False): + if offer.properties["content"].get("isOfferReplacePending", False): time.sleep(30) # wait for the offer to be replaced, check every 30 seconds offer = await self.container.get_throughput() else: @@ -89,5 +89,6 @@ async def test_partition_split_query_async(self): self.assertTrue(offer.offer_throughput > self.throughput) return -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit.py b/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit.py index 5564136002b7..09d81a299b2a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit.py +++ b/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit.py @@ -19,6 +19,7 @@ # tracemalloc is not available in PyPy, so we import conditionally try: import tracemalloc + HAS_TRACEMALLOC = True except ImportError: HAS_TRACEMALLOC = False @@ -28,14 +29,17 @@ # Shared Test Helpers # ================================= + class MockGlobalEndpointManager: """Mock global endpoint manager for testing.""" + def is_circuit_breaker_applicable(self, request): return False class MockClient: """Mock Cosmos client for testing partition split retry logic.""" + def __init__(self): self._global_endpoint_manager = MockGlobalEndpointManager() self.refresh_routing_map_provider_call_count = 0 @@ -50,10 +54,7 @@ def reset_counts(self): def create_410_partition_split_error(): """Create a 410 partition split error for testing.""" - error = exceptions.CosmosHttpResponseError( - status_code=StatusCodes.GONE, - message="Partition key range is gone" - ) + error = exceptions.CosmosHttpResponseError(status_code=StatusCodes.GONE, message="Partition key range is gone") error.sub_status = SubStatusCodes.PARTITION_KEY_RANGE_GONE return error @@ -67,6 +68,7 @@ def raise_410_partition_split_error(*args, **kwargs): # Test Class # ========================== + @pytest.mark.cosmosEmulator class TestPartitionSplitRetryUnit(unittest.TestCase): """ @@ -92,8 +94,7 @@ def mock_fetch_function(options): # Verify the loop condition without state reset - this is false loop_condition_without_reset = context._continuation or not context._has_started - assert not loop_condition_without_reset, \ - "Without state reset, loop condition should be False" + assert not loop_condition_without_reset, "Without state reset, loop condition should be False" # Verify _fetch_items_helper_no_retries returns empty when state is not reset fetch_was_called = [False] @@ -103,10 +104,8 @@ def tracking_fetch(options): return ([{"id": "1"}], {}) result = context._fetch_items_helper_no_retries(tracking_fetch) - assert not fetch_was_called[0], \ - "Fetch should NOT be called when _has_started=True and _continuation=None" - assert result == [], \ - "Should return empty list when while loop doesn't execute" + assert not fetch_was_called[0], "Fetch should NOT be called when _has_started=True and _continuation=None" + assert result == [], "Should return empty list when while loop doesn't execute" # Now reset state context._has_started = False @@ -114,17 +113,14 @@ def tracking_fetch(options): # verify the loop condition with state reset loop_condition_with_reset = context._continuation or not context._has_started - assert loop_condition_with_reset, \ - "With state reset, loop condition should be True" + assert loop_condition_with_reset, "With state reset, loop condition should be True" # verify _fetch_items_helper_no_retries works after state reset result = context._fetch_items_helper_no_retries(tracking_fetch) - assert fetch_was_called[0], \ - "Fetch SHOULD be called after state reset" - assert result == [{"id": "1"}], \ - "Should return documents after state reset" + assert fetch_was_called[0], "Fetch SHOULD be called after state reset" + assert result == [{"id": "1"}], "Should return documents after state reset" - @patch('azure.cosmos._retry_utility.Execute') + @patch("azure.cosmos._retry_utility.Execute") def test_retry_with_410_resets_state_and_succeeds(self, mock_execute): """ Test the full retry flow: 410 partition split error triggers state reset and retry succeeds. @@ -148,11 +144,12 @@ def mock_fetch_function(options): result = context._fetch_items_helper_with_retries(mock_fetch_function) assert call_count[0] == 2, "Should have retried once after 410" - assert mock_client.refresh_routing_map_provider_call_count == 1, \ - "refresh_routing_map_provider should be called once on 410" + assert ( + mock_client.refresh_routing_map_provider_call_count == 1 + ), "refresh_routing_map_provider should be called once on 410" assert result == expected_docs, "Should return expected documents after retry" - @patch('azure.cosmos._retry_utility.Execute') + @patch("azure.cosmos._retry_utility.Execute") def test_pk_range_query_skips_410_retry_to_prevent_recursion(self, mock_execute): """ Test that partition key range queries (marked with _internal_pk_range_fetch=True) @@ -182,12 +179,12 @@ def mock_fetch_function(options): context._fetch_items_helper_with_retries(mock_fetch_function) assert exc_info.value.status_code == StatusCodes.GONE - assert mock_client.refresh_routing_map_provider_call_count == 0, \ - "refresh_routing_map_provider should NOT be called for PK range queries" - assert mock_execute.call_count == 1, \ - "Execute should only be called once - no retry for PK range queries" + assert ( + mock_client.refresh_routing_map_provider_call_count == 0 + ), "refresh_routing_map_provider should NOT be called for PK range queries" + assert mock_execute.call_count == 1, "Execute should only be called once - no retry for PK range queries" - @patch('azure.cosmos._retry_utility.Execute') + @patch("azure.cosmos._retry_utility.Execute") def test_410_retry_behavior_with_and_without_pk_range_flag(self, mock_execute): """ Test that verifies the fix for the partition split recursion problem. @@ -211,10 +208,10 @@ def mock_fetch_function(options): with pytest.raises(exceptions.CosmosHttpResponseError): context._fetch_items_helper_with_retries(mock_fetch_function) - assert mock_client.refresh_routing_map_provider_call_count == 3, \ - f"Expected 3 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" - assert mock_execute.call_count == 4, \ - f"Expected 4 Execute calls, got {mock_execute.call_count}" + assert ( + mock_client.refresh_routing_map_provider_call_count == 3 + ), f"Expected 3 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" + assert mock_execute.call_count == 4, f"Expected 4 Execute calls, got {mock_execute.call_count}" # Test 2: PK range query (with flag) - should NOT retry mock_client.reset_counts() @@ -227,13 +224,13 @@ def mock_fetch_function(options): with pytest.raises(exceptions.CosmosHttpResponseError): context_pk_range._fetch_items_helper_with_retries(mock_fetch_function) - assert mock_client.refresh_routing_map_provider_call_count == 0, \ - f"With flag, expected 0 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" - assert mock_execute.call_count == 1, \ - f"With flag, expected 1 Execute call, got {mock_execute.call_count}" + assert ( + mock_client.refresh_routing_map_provider_call_count == 0 + ), f"With flag, expected 0 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" + assert mock_execute.call_count == 1, f"With flag, expected 1 Execute call, got {mock_execute.call_count}" @pytest.mark.skipif(not HAS_TRACEMALLOC, reason="tracemalloc not available in PyPy") - @patch('azure.cosmos._retry_utility.Execute') + @patch("azure.cosmos._retry_utility.Execute") def test_memory_bounded_no_leak_on_410_retries(self, mock_execute): """ Test that memory usage is bounded during 410 partition split retries. @@ -268,7 +265,7 @@ def mock_fetch_function(options): gc.collect() snapshot_after = tracemalloc.take_snapshot() # compare_to() shows memory difference between snapshots to identify growth - top_stats = snapshot_after.compare_to(snapshot_before, 'lineno') + top_stats = snapshot_after.compare_to(snapshot_before, "lineno") memory_growth = sum(stat.size_diff for stat in top_stats if stat.size_diff > 0) peak_memory = tracemalloc.get_traced_memory()[1] # tracemalloc.stop() ends memory tracing and frees tracing overhead @@ -290,14 +287,14 @@ def mock_fetch_function(options): print(f" - Peak memory: {peak_memory / 1024:.2f} KB") print(f"{'=' * 60}") - assert execute_calls == 4, \ - f"Execute calls should be bounded to 4, got {execute_calls}" - assert refresh_calls == 3, \ - f"Refresh calls should be bounded to 3, got {refresh_calls}" - assert elapsed_time < 1.0, \ - f"Should complete quickly (< 1s), took {elapsed_time:.2f}s - indicates no infinite loop" - assert memory_growth < 500 * 1024, \ - f"Memory growth should be < 500KB, got {memory_growth / 1024:.2f} KB - indicates no memory leak" + assert execute_calls == 4, f"Execute calls should be bounded to 4, got {execute_calls}" + assert refresh_calls == 3, f"Refresh calls should be bounded to 3, got {refresh_calls}" + assert ( + elapsed_time < 1.0 + ), f"Should complete quickly (< 1s), took {elapsed_time:.2f}s - indicates no infinite loop" + assert ( + memory_growth < 500 * 1024 + ), f"Memory growth should be < 500KB, got {memory_growth / 1024:.2f} KB - indicates no memory leak" # Test PK range query - should have NO retries (prevents recursion) mock_client.reset_counts() @@ -318,10 +315,8 @@ def mock_fetch_function(options): print(f" - Refresh calls: {pk_refresh_calls} (no recursion)") print(f"{'=' * 60}\n") - assert pk_execute_calls == 1, \ - f"PK range query should have 1 execute call, got {pk_execute_calls}" - assert pk_refresh_calls == 0, \ - f"PK range query should have 0 refresh calls, got {pk_refresh_calls}" + assert pk_execute_calls == 1, f"PK range query should have 1 execute call, got {pk_execute_calls}" + assert pk_refresh_calls == 0, f"PK range query should have 0 refresh calls, got {pk_refresh_calls}" if __name__ == "__main__": diff --git a/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit_async.py b/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit_async.py index a487fc6a85eb..e12696fb7648 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_partition_split_retry_unit_async.py @@ -20,6 +20,7 @@ # tracemalloc is not available in PyPy, so we import conditionally try: import tracemalloc + HAS_TRACEMALLOC = True except ImportError: HAS_TRACEMALLOC = False @@ -29,14 +30,17 @@ # Shared Test Helpers # ==================================== + class MockGlobalEndpointManager: """Mock global endpoint manager for testing.""" + def is_circuit_breaker_applicable(self, request): return False class MockClient: """Mock Cosmos client for testing partition split retry logic.""" + def __init__(self): self._global_endpoint_manager = MockGlobalEndpointManager() self.refresh_routing_map_provider_call_count = 0 @@ -51,10 +55,7 @@ def reset_counts(self): def create_410_partition_split_error(): """Create a 410 partition split error for testing.""" - error = exceptions.CosmosHttpResponseError( - status_code=StatusCodes.GONE, - message="Partition key range is gone" - ) + error = exceptions.CosmosHttpResponseError(status_code=StatusCodes.GONE, message="Partition key range is gone") error.sub_status = SubStatusCodes.PARTITION_KEY_RANGE_GONE return error @@ -69,7 +70,6 @@ def raise_410_partition_split_error(*args, **kwargs): # =============================== - @pytest.mark.cosmosEmulator class TestPartitionSplitRetryUnitAsync(unittest.IsolatedAsyncioTestCase): """ @@ -96,8 +96,7 @@ async def mock_fetch_function(options): # Verify the loop condition WITHOUT state reset - this is FALSE loop_condition_without_reset = context._continuation or not context._has_started - assert not loop_condition_without_reset, \ - "Without state reset, loop condition should be False" + assert not loop_condition_without_reset, "Without state reset, loop condition should be False" # Verify _fetch_items_helper_no_retries returns empty when state is not reset fetch_was_called = [False] @@ -107,10 +106,8 @@ async def tracking_fetch(options): return ([{"id": "1"}], {}) result = await context._fetch_items_helper_no_retries(tracking_fetch) - assert not fetch_was_called[0], \ - "Fetch should NOT be called when _has_started=True and _continuation=None" - assert result == [], \ - "Should return empty list when while loop doesn't execute" + assert not fetch_was_called[0], "Fetch should NOT be called when _has_started=True and _continuation=None" + assert result == [], "Should return empty list when while loop doesn't execute" # reset state context._has_started = False @@ -118,12 +115,10 @@ async def tracking_fetch(options): # Verify _fetch_items_helper_no_retries works after state reset result = await context._fetch_items_helper_no_retries(tracking_fetch) - assert fetch_was_called[0], \ - "Fetch SHOULD be called after state reset" - assert result == [{"id": "1"}], \ - "Should return documents after state reset" + assert fetch_was_called[0], "Fetch SHOULD be called after state reset" + assert result == [{"id": "1"}], "Should return documents after state reset" - @patch('azure.cosmos.aio._retry_utility_async.ExecuteAsync') + @patch("azure.cosmos.aio._retry_utility_async.ExecuteAsync") async def test_retry_with_410_resets_state_and_succeeds_async(self, mock_execute): """ Test the full retry flow: 410 partition split error triggers state reset and retry succeeds (async). @@ -147,11 +142,12 @@ async def mock_fetch_function(options): result = await context._fetch_items_helper_with_retries(mock_fetch_function) assert call_count[0] == 2, "Should have retried once after 410" - assert mock_client.refresh_routing_map_provider_call_count == 1, \ - "refresh_routing_map_provider should be called once on 410" + assert ( + mock_client.refresh_routing_map_provider_call_count == 1 + ), "refresh_routing_map_provider should be called once on 410" assert result == expected_docs, "Should return expected documents after retry" - @patch('azure.cosmos.aio._retry_utility_async.ExecuteAsync') + @patch("azure.cosmos.aio._retry_utility_async.ExecuteAsync") async def test_pk_range_query_skips_410_retry_to_prevent_recursion_async(self, mock_execute): """ Test that partition key range queries skip 410 retry to prevent recursion (async). @@ -170,12 +166,12 @@ async def mock_fetch_function(options): await context._fetch_items_helper_with_retries(mock_fetch_function) assert exc_info.value.status_code == StatusCodes.GONE - assert mock_client.refresh_routing_map_provider_call_count == 0, \ - "refresh_routing_map_provider should NOT be called for PK range queries" - assert mock_execute.call_count == 1, \ - "ExecuteAsync should only be called once - no retry for PK range queries" + assert ( + mock_client.refresh_routing_map_provider_call_count == 0 + ), "refresh_routing_map_provider should NOT be called for PK range queries" + assert mock_execute.call_count == 1, "ExecuteAsync should only be called once - no retry for PK range queries" - @patch('azure.cosmos.aio._retry_utility_async.ExecuteAsync') + @patch("azure.cosmos.aio._retry_utility_async.ExecuteAsync") async def test_410_retry_behavior_with_and_without_pk_range_flag_async(self, mock_execute): """ Test that verifies the fix for the partition split recursion problem (async). @@ -199,10 +195,10 @@ async def mock_fetch_function(options): with pytest.raises(exceptions.CosmosHttpResponseError): await context._fetch_items_helper_with_retries(mock_fetch_function) - assert mock_client.refresh_routing_map_provider_call_count == 3, \ - f"Expected 3 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" - assert mock_execute.call_count == 4, \ - f"Expected 4 ExecuteAsync calls, got {mock_execute.call_count}" + assert ( + mock_client.refresh_routing_map_provider_call_count == 3 + ), f"Expected 3 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" + assert mock_execute.call_count == 4, f"Expected 4 ExecuteAsync calls, got {mock_execute.call_count}" # Test 2: PK range query (with flag) - should NOT retry mock_client.reset_counts() @@ -215,13 +211,13 @@ async def mock_fetch_function(options): with pytest.raises(exceptions.CosmosHttpResponseError): await context_pk_range._fetch_items_helper_with_retries(mock_fetch_function) - assert mock_client.refresh_routing_map_provider_call_count == 0, \ - f"With flag, expected 0 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" - assert mock_execute.call_count == 1, \ - f"With flag, expected 1 ExecuteAsync call, got {mock_execute.call_count}" + assert ( + mock_client.refresh_routing_map_provider_call_count == 0 + ), f"With flag, expected 0 refresh calls, got {mock_client.refresh_routing_map_provider_call_count}" + assert mock_execute.call_count == 1, f"With flag, expected 1 ExecuteAsync call, got {mock_execute.call_count}" @pytest.mark.skipif(not HAS_TRACEMALLOC, reason="tracemalloc not available in PyPy") - @patch('azure.cosmos.aio._retry_utility_async.ExecuteAsync') + @patch("azure.cosmos.aio._retry_utility_async.ExecuteAsync") async def test_memory_bounded_no_leak_on_410_retries_async(self, mock_execute): """ Test that memory usage is bounded during 410 partition split retries. @@ -256,7 +252,7 @@ async def mock_fetch_function(options): gc.collect() snapshot_after = tracemalloc.take_snapshot() # compare_to() shows memory difference between snapshots to identify growth - top_stats = snapshot_after.compare_to(snapshot_before, 'lineno') + top_stats = snapshot_after.compare_to(snapshot_before, "lineno") memory_growth = sum(stat.size_diff for stat in top_stats if stat.size_diff > 0) peak_memory = tracemalloc.get_traced_memory()[1] # tracemalloc.stop() ends memory tracing and frees tracing overhead @@ -278,14 +274,14 @@ async def mock_fetch_function(options): print(f" - Peak memory: {peak_memory / 1024:.2f} KB") print(f"{'=' * 60}") - assert execute_calls == 4, \ - f"Execute calls should be bounded to 4, got {execute_calls}" - assert refresh_calls == 3, \ - f"Refresh calls should be bounded to 3, got {refresh_calls}" - assert elapsed_time < 1.0, \ - f"Should complete quickly (< 1s), took {elapsed_time:.2f}s - indicates no infinite loop" - assert memory_growth < 500 * 1024, \ - f"Memory growth should be < 500KB, got {memory_growth / 1024:.2f} KB - indicates no memory leak" + assert execute_calls == 4, f"Execute calls should be bounded to 4, got {execute_calls}" + assert refresh_calls == 3, f"Refresh calls should be bounded to 3, got {refresh_calls}" + assert ( + elapsed_time < 1.0 + ), f"Should complete quickly (< 1s), took {elapsed_time:.2f}s - indicates no infinite loop" + assert ( + memory_growth < 500 * 1024 + ), f"Memory growth should be < 500KB, got {memory_growth / 1024:.2f} KB - indicates no memory leak" # Test PK range query - should have NO retries (prevents recursion) mock_client.reset_counts() @@ -306,12 +302,9 @@ async def mock_fetch_function(options): print(f" - Refresh calls: {pk_refresh_calls} (no recursion)") print(f"{'=' * 60}\n") - assert pk_execute_calls == 1, \ - f"PK range query should have 1 execute call, got {pk_execute_calls}" - assert pk_refresh_calls == 0, \ - f"PK range query should have 0 refresh calls, got {pk_refresh_calls}" + assert pk_execute_calls == 1, f"PK range query should have 1 execute call, got {pk_execute_calls}" + assert pk_refresh_calls == 0, f"PK range query should have 0 refresh calls, got {pk_refresh_calls}" if __name__ == "__main__": unittest.main() - diff --git a/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover.py b/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover.py index 437c25556e05..de1a75b6223c 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover.py +++ b/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover.py @@ -9,33 +9,38 @@ from azure.cosmos import CosmosClient from azure.cosmos.exceptions import CosmosHttpResponseError from _fault_injection_transport import FaultInjectionTransport -from test_per_partition_circuit_breaker_mm import (REGION_1, REGION_2, PK_VALUE, BATCH, - write_operations_errors_and_boolean, perform_write_operation) +from test_per_partition_circuit_breaker_mm import ( + REGION_1, + REGION_2, + PK_VALUE, + BATCH, + write_operations_errors_and_boolean, + perform_write_operation, +) # cspell:disable + def create_failover_errors(): errors = [] error_codes = [403, 503] for error_code in error_codes: - errors.append(CosmosHttpResponseError( - status_code=error_code, - message="Some injected error.", - sub_status=3)) + errors.append(CosmosHttpResponseError(status_code=error_code, message="Some injected error.", sub_status=3)) return errors + def create_threshold_errors(): errors = [] error_codes = [408, 500, 502, 504] for error_code in error_codes: - errors.append(CosmosHttpResponseError( - status_code=error_code, - message="Some injected error.")) + errors.append(CosmosHttpResponseError(status_code=error_code, message="Some injected error.")) errors.append(ServiceResponseError(message="Injected Service Response Error.")) return errors + # These tests assume that the configured live account has one main write region and one secondary read region. + @pytest.mark.cosmosPerPartitionAutomaticFailover class TestPerPartitionAutomaticFailover: host = test_config.TestConfig.host @@ -52,93 +57,105 @@ def setup_method_with_custom_transport(self, custom_transport, default_endpoint= excluded_regions = [REGION_2] if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID - client = CosmosClient(default_endpoint, self.master_key, consistency_level="Session", - preferred_locations=regions, - excluded_locations=excluded_regions, - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + consistency_level="Session", + preferred_locations=regions, + excluded_locations=excluded_regions, + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} - def setup_info(self, error=None, max_count=None, is_batch=False, exclude_client_regions=False, session_error=False, **kwargs): + def setup_info( + self, error=None, max_count=None, is_batch=False, exclude_client_regions=False, session_error=False, **kwargs + ): custom_transport = FaultInjectionTransport() # two documents targeted to same partition, one will always fail and the other will succeed doc_fail_id = str(uuid.uuid4()) doc_success_id = str(uuid.uuid4()) - predicate = lambda r: (FaultInjectionTransport.predicate_req_for_document_with_id(r, doc_fail_id) and - FaultInjectionTransport.predicate_is_write_operation(r, "com")) + predicate = lambda r: ( + FaultInjectionTransport.predicate_req_for_document_with_id(r, doc_fail_id) + and FaultInjectionTransport.predicate_is_write_operation(r, "com") + ) # The MockRequest only gets used to create the MockHttpResponse mock_request = FaultInjectionTransport.MockHttpRequest(url=self.host) if is_batch: - success_response = FaultInjectionTransport.MockHttpResponse(mock_request, 200, [{"statusCode": 200}],) + success_response = FaultInjectionTransport.MockHttpResponse( + mock_request, + 200, + [{"statusCode": 200}], + ) else: success_response = FaultInjectionTransport.MockHttpResponse(mock_request, 200) if error: - custom_transport.add_fault(predicate=predicate, fault_factory=error, max_inner_count=max_count, - after_max_count=success_response) + custom_transport.add_fault( + predicate=predicate, fault_factory=error, max_inner_count=max_count, after_max_count=success_response + ) if session_error: - read_predicate = lambda r: (FaultInjectionTransport.predicate_is_operation_type(r, "Read") - and FaultInjectionTransport.predicate_req_for_document_with_id(r, doc_fail_id)) - read_error = CosmosHttpResponseError( - status_code=404, - message="Some injected error.", - sub_status=1002) + read_predicate = lambda r: ( + FaultInjectionTransport.predicate_is_operation_type(r, "Read") + and FaultInjectionTransport.predicate_req_for_document_with_id(r, doc_fail_id) + ) + read_error = CosmosHttpResponseError(status_code=404, message="Some injected error.", sub_status=1002) error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, read_error) success_response = FaultInjectionTransport.MockHttpResponse(mock_request, 200) - custom_transport.add_fault(predicate=read_predicate, fault_factory=error_lambda, max_inner_count=max_count, - after_max_count=success_response) + custom_transport.add_fault( + predicate=read_predicate, + fault_factory=error_lambda, + max_inner_count=max_count, + after_max_count=success_response, + ) is_get_account_predicate = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) # Set the database account response to have PPAF enabled - ppaf_enabled_database_account = \ - lambda r, inner: FaultInjectionTransport.transform_topology_ppaf_enabled(inner=inner) - custom_transport.add_response_transformation( - is_get_account_predicate, - ppaf_enabled_database_account) - setup = self.setup_method_with_custom_transport(None, default_endpoint=self.host, - exclude_client_regions=exclude_client_regions, **kwargs) - custom_setup = self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, - exclude_client_regions=exclude_client_regions, **kwargs) + ppaf_enabled_database_account = lambda r, inner: FaultInjectionTransport.transform_topology_ppaf_enabled( + inner=inner + ) + custom_transport.add_response_transformation(is_get_account_predicate, ppaf_enabled_database_account) + setup = self.setup_method_with_custom_transport( + None, default_endpoint=self.host, exclude_client_regions=exclude_client_regions, **kwargs + ) + custom_setup = self.setup_method_with_custom_transport( + custom_transport, default_endpoint=self.host, exclude_client_regions=exclude_client_regions, **kwargs + ) return setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate - @pytest.mark.parametrize("write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors())) + @pytest.mark.parametrize( + "write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors()) + ) def test_ppaf_partition_info_cache_and_routing(self, write_operation, error, exclude_regions): # This test validates that the partition info cache is updated correctly upon failures, and that the # per-partition automatic failover logic routes requests to the next available regional endpoint on 403.3 errors. # We also verify that this logic is unaffected by user excluded regions, since write-region routing is entirely # taken care of on the service. error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) - setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info(error_lambda, 1, - write_operation == BATCH, exclude_client_regions=exclude_regions) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info( + error_lambda, 1, write_operation == BATCH, exclude_client_regions=exclude_regions + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # Create a document to populate the per-partition GEM partition range info cache - fault_injection_container.create_item(body={'id': doc_success_id, 'pk': PK_VALUE, - 'name': 'sample document', 'key': 'value'}) + fault_injection_container.create_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"} + ) pk_range_wrapper = list(global_endpoint_manager.partition_range_to_failover_info.keys())[0] initial_region = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper].current_region # Based on our configuration, we should have had one error followed by a success - marking only the previous endpoint as unavailable - perform_write_operation( - write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the partition is marked as unavailable, and that the current regional endpoint is not the same assert len(partition_info.unavailable_regional_endpoints) == 1 assert initial_region in partition_info.unavailable_regional_endpoints - assert initial_region != partition_info.current_region # west us 3 != west us + assert initial_region != partition_info.current_region # west us 3 != west us # Now we run another request to see how the cache gets updated - perform_write_operation( - write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE) + perform_write_operation(write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE) partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the cache is empty, since the request going to the second regional endpoint failed # Once we reach the point of all available regions being marked as unavailable, the cache is cleared @@ -146,23 +163,26 @@ def test_ppaf_partition_info_cache_and_routing(self, write_operation, error, exc assert initial_region not in partition_info.unavailable_regional_endpoints assert partition_info.current_region is None - - @pytest.mark.parametrize("write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_threshold_errors())) + @pytest.mark.parametrize( + "write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_threshold_errors()) + ) def test_ppaf_partition_thresholds_and_routing(self, write_operation, error, exclude_regions): # This test validates the consecutive failures logic is properly handled for per-partition automatic failover, # and that the per-partition automatic failover logic routes requests to the next available regional endpoint # after enough consecutive failures have occurred. We also verify that this logic is unaffected by user excluded # regions, since write-region routing is entirely taken care of on the service. error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) - setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info(error=error_lambda, - exclude_client_regions=exclude_regions) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info( + error=error_lambda, exclude_client_regions=exclude_regions + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # Create a document to populate the per-partition GEM partition range info cache - fault_injection_container.create_item(body={'id': doc_success_id, 'pk': PK_VALUE, - 'name': 'sample document', 'key': 'value'}) + fault_injection_container.create_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"} + ) pk_range_wrapper = list(global_endpoint_manager.partition_range_to_failover_info.keys())[0] initial_region = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper].current_region @@ -170,49 +190,47 @@ def test_ppaf_partition_thresholds_and_routing(self, write_operation, error, exc for i in range(consecutive_failures): # We perform the write operation multiple times to check the consecutive failures logic with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) assert exc_info.value == error # Verify that the threshold for consecutive failures is updated - pk_range_wrappers = list(global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.keys()) + pk_range_wrappers = list( + global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.keys() + ) assert len(pk_range_wrappers) == 1 - failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[pk_range_wrappers[0]] + failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[ + pk_range_wrappers[0] + ] assert failure_count == consecutive_failures # Verify that a single success to the same partition resets the consecutive failures count - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE) + perform_write_operation(write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE) - failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.get(pk_range_wrappers[0], 0) + failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.get( + pk_range_wrappers[0], 0 + ) assert failure_count == 0 # Run enough failed requests to the partition to trigger the failover logic for i in range(12): with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) assert exc_info.value == error # We should have marked the previous endpoint as unavailable after 10 successive failures partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the partition is marked as unavailable, and that the current regional endpoint is not the same assert len(partition_info.unavailable_regional_endpoints) == 1 assert initial_region in partition_info.unavailable_regional_endpoints - assert initial_region != partition_info.current_region # west us 3 != west us + assert initial_region != partition_info.current_region # west us 3 != west us # 12 failures - 10 to trigger failover, 2 more to start counting again - failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[pk_range_wrappers[0]] + failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[ + pk_range_wrappers[0] + ] assert failure_count == 2 - @pytest.mark.parametrize("write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors())) + @pytest.mark.parametrize( + "write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors()) + ) def test_ppaf_session_unavailable_retry(self, write_operation, error, exclude_regions): # Account config has 2 regions: West US 3 (A) and West US (B). This test validates that after marking the write # region (A) as unavailable, the next request is retried to the read region (B) and succeeds. The next read request @@ -220,37 +238,39 @@ def test_ppaf_session_unavailable_retry(self, write_operation, error, exclude_re # We also verify that this logic is unaffected by user excluded regions, since write-region routing is entirely # taken care of on the service. error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) - setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info(error_lambda, max_count=1, - is_batch=write_operation==BATCH, - session_error=True, exclude_client_regions=exclude_regions) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info( + error_lambda, + max_count=1, + is_batch=write_operation == BATCH, + session_error=True, + exclude_client_regions=exclude_regions, + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # Create a document to populate the per-partition GEM partition range info cache - fault_injection_container.create_item(body={'id': doc_success_id, 'pk': PK_VALUE, - 'name': 'sample document', 'key': 'value'}) + fault_injection_container.create_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"} + ) pk_range_wrapper = list(global_endpoint_manager.partition_range_to_failover_info.keys())[0] initial_region = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper].current_region # Verify the region that is being used for the read requests read_response = fault_injection_container.read_item(doc_success_id, PK_VALUE) - uri = read_response.get_response_headers().get('Content-Location') - region = fault_injection_container.client_connection._global_endpoint_manager.location_cache.get_location_from_endpoint(uri) - assert region == REGION_1 # first preferred region + uri = read_response.get_response_headers().get("Content-Location") + region = fault_injection_container.client_connection._global_endpoint_manager.location_cache.get_location_from_endpoint( + uri + ) + assert region == REGION_1 # first preferred region # Based on our configuration, we should have had one error followed by a success - marking only the previous endpoint as unavailable - perform_write_operation( - write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the partition is marked as unavailable, and that the current regional endpoint is not the same assert len(partition_info.unavailable_regional_endpoints) == 1 assert initial_region in partition_info.unavailable_regional_endpoints - assert initial_region != partition_info.current_region # west us 3 != west us + assert initial_region != partition_info.current_region # west us 3 != west us # Now we run a read request that runs into a 404.1002 error, which should retry to the read region # We verify that the read request was going to the correct region by using the raw_response_hook @@ -259,21 +279,26 @@ def test_ppaf_session_unavailable_retry(self, write_operation, error, exclude_re def test_ppaf_user_agent_feature_flag(self): # Simple test to verify the user agent suffix is being updated with the relevant feature flags setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = self.setup_info() - fault_injection_container = custom_setup['col'] + fault_injection_container = custom_setup["col"] # Create a document to check the response headers - fault_injection_container.upsert_item(body={'id': doc_success_id, 'pk': PK_VALUE, 'name': 'sample document', 'key': 'value'}, - raw_response_hook=ppaf_user_agent_hook) + fault_injection_container.upsert_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"}, + raw_response_hook=ppaf_user_agent_hook, + ) + def session_retry_hook(raw_response): - if raw_response.http_request.headers.get('x-ms-thinclient-proxy-resource-type') != 'databaseaccount': + if raw_response.http_request.headers.get("x-ms-thinclient-proxy-resource-type") != "databaseaccount": # This hook is used to verify the request routing that happens after the session retry logic - region_string = "-" + REGION_2.replace(' ', '').lower() + "." + region_string = "-" + REGION_2.replace(" ", "").lower() + "." assert region_string in raw_response.http_request.url + def ppaf_user_agent_hook(raw_response): # Used to verify the user agent feature flags - user_agent = raw_response.http_request.headers.get('user-agent') - assert user_agent.endswith('| F3') + user_agent = raw_response.http_request.headers.get("user-agent") + assert user_agent.endswith("| F3") + -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover_async.py b/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover_async.py index 860727c18b0b..675198caf061 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_per_partition_automatic_failover_async.py @@ -15,14 +15,26 @@ from azure.cosmos.aio import CosmosClient from _fault_injection_transport import FaultInjectionTransport from _fault_injection_transport_async import FaultInjectionTransportAsync -from test_per_partition_automatic_failover import create_failover_errors, create_threshold_errors, session_retry_hook, ppaf_user_agent_hook -from test_per_partition_circuit_breaker_mm import REGION_1, REGION_2, PK_VALUE, BATCH, write_operations_errors_and_boolean +from test_per_partition_automatic_failover import ( + create_failover_errors, + create_threshold_errors, + session_retry_hook, + ppaf_user_agent_hook, +) +from test_per_partition_circuit_breaker_mm import ( + REGION_1, + REGION_2, + PK_VALUE, + BATCH, + write_operations_errors_and_boolean, +) from test_per_partition_circuit_breaker_mm_async import perform_write_operation -#cspell:ignore PPAF, ppaf +# cspell:ignore PPAF, ppaf # These tests assume that the configured live account has one main write region and one secondary read region. + @pytest.mark.cosmosPerPartitionAutomaticFailover @pytest.mark.asyncio class TestPerPartitionAutomaticFailoverAsync: @@ -31,8 +43,9 @@ class TestPerPartitionAutomaticFailoverAsync: TEST_DATABASE_ID = test_config.TestConfig.TEST_DATABASE_ID TEST_CONTAINER_MULTI_PARTITION_ID = test_config.TestConfig.TEST_MULTI_PARTITION_CONTAINER_ID - async def setup_method_with_custom_transport(self, custom_transport: Optional[AioHttpTransport], - default_endpoint=host, read_first=False, **kwargs): + async def setup_method_with_custom_transport( + self, custom_transport: Optional[AioHttpTransport], default_endpoint=host, read_first=False, **kwargs + ): regions = [REGION_2, REGION_1] if read_first else [REGION_1, REGION_2] container_id = kwargs.pop("container_id", None) exclude_client_regions = kwargs.pop("exclude_client_regions", False) @@ -41,99 +54,111 @@ async def setup_method_with_custom_transport(self, custom_transport: Optional[Ai excluded_regions = [REGION_2] if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID - client = CosmosClient(default_endpoint, self.master_key, consistency_level="Session", - preferred_locations=regions, - excluded_locations=excluded_regions, - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + consistency_level="Session", + preferred_locations=regions, + excluded_locations=excluded_regions, + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) await client.__aenter__() return {"client": client, "db": db, "col": container} - + @staticmethod async def cleanup_method(initialized_objects: Dict[str, Any]): method_client: CosmosClient = initialized_objects["client"] await method_client.close() - async def setup_info(self, error=None, max_count=None, is_batch=False, exclude_client_regions=False, session_error=False, **kwargs): + async def setup_info( + self, error=None, max_count=None, is_batch=False, exclude_client_regions=False, session_error=False, **kwargs + ): custom_transport = FaultInjectionTransportAsync() # two documents targeted to same partition, one will always fail and the other will succeed doc_fail_id = str(uuid.uuid4()) doc_success_id = str(uuid.uuid4()) - predicate = lambda r: (FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, doc_fail_id) and - FaultInjectionTransportAsync.predicate_is_write_operation(r, "com")) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, doc_fail_id) + and FaultInjectionTransportAsync.predicate_is_write_operation(r, "com") + ) # The MockRequest only gets used to create the MockHttpResponse mock_request = FaultInjectionTransport.MockHttpRequest(url=self.host) if is_batch: - success_response = FaultInjectionTransportAsync.MockHttpResponse(mock_request, 200, [{"statusCode": 200}],) + success_response = FaultInjectionTransportAsync.MockHttpResponse( + mock_request, + 200, + [{"statusCode": 200}], + ) else: success_response = FaultInjectionTransportAsync.MockHttpResponse(mock_request, 200) if error: - custom_transport.add_fault(predicate=predicate, fault_factory=error, max_inner_count=max_count, - after_max_count=success_response) + custom_transport.add_fault( + predicate=predicate, fault_factory=error, max_inner_count=max_count, after_max_count=success_response + ) if session_error: - read_predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_operation_type(r, "Read") - and FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, doc_fail_id)) - read_error = CosmosHttpResponseError( - status_code=404, - message="Some injected error.", - sub_status=1002) + read_predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_operation_type(r, "Read") + and FaultInjectionTransportAsync.predicate_req_for_document_with_id(r, doc_fail_id) + ) + read_error = CosmosHttpResponseError(status_code=404, message="Some injected error.", sub_status=1002) error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, read_error)) success_response = FaultInjectionTransportAsync.MockHttpResponse(mock_request, 200) - custom_transport.add_fault(predicate=read_predicate, fault_factory=error_lambda, max_inner_count=max_count, - after_max_count=success_response) + custom_transport.add_fault( + predicate=read_predicate, + fault_factory=error_lambda, + max_inner_count=max_count, + after_max_count=success_response, + ) is_get_account_predicate = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) # Set the database account response to have PPAF enabled - ppaf_enabled_database_account = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_ppaf_enabled(inner=inner) - custom_transport.add_response_transformation( - is_get_account_predicate, - ppaf_enabled_database_account) - setup = await self.setup_method_with_custom_transport(None, default_endpoint=self.host, - exclude_client_regions=exclude_client_regions, **kwargs) - custom_setup = await self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, - exclude_client_regions=exclude_client_regions, **kwargs) + ppaf_enabled_database_account = lambda r, inner: FaultInjectionTransportAsync.transform_topology_ppaf_enabled( + inner=inner + ) + custom_transport.add_response_transformation(is_get_account_predicate, ppaf_enabled_database_account) + setup = await self.setup_method_with_custom_transport( + None, default_endpoint=self.host, exclude_client_regions=exclude_client_regions, **kwargs + ) + custom_setup = await self.setup_method_with_custom_transport( + custom_transport, default_endpoint=self.host, exclude_client_regions=exclude_client_regions, **kwargs + ) return setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate - @pytest.mark.parametrize("write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors())) + @pytest.mark.parametrize( + "write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors()) + ) async def test_ppaf_partition_info_cache_and_routing_async(self, write_operation, error, exclude_regions): # This test validates that the partition info cache is updated correctly upon failures, and that the # per-partition automatic failover logic routes requests to the next available regional endpoint. # We also verify that this logic is unaffected by user excluded regions, since write-region routing is # entirely taken care of on the service. error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda, 1, - write_operation == BATCH, exclude_client_regions=exclude_regions) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, 1, write_operation == BATCH, exclude_client_regions=exclude_regions + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # Create a document to populate the per-partition GEM partition range info cache - await fault_injection_container.create_item(body={'id': doc_success_id, 'pk': PK_VALUE, - 'name': 'sample document', 'key': 'value'}) + await fault_injection_container.create_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"} + ) pk_range_wrapper = list(global_endpoint_manager.partition_range_to_failover_info.keys())[0] initial_region = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper].current_region # Based on our configuration, we should have had one error followed by a success - marking only the previous endpoint as unavailable - await perform_write_operation( - write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + await perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the partition is marked as unavailable, and that the current regional endpoint is not the same assert len(partition_info.unavailable_regional_endpoints) == 1 assert initial_region in partition_info.unavailable_regional_endpoints - assert initial_region != partition_info.current_region # west us 3 != west us + assert initial_region != partition_info.current_region # west us 3 != west us # Now we run another request to see how the cache gets updated - await perform_write_operation( - write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + await perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the cache is empty, since the request going to the second regional endpoint failed # Once we reach the point of all available regions being marked as unavailable, the cache is cleared @@ -141,22 +166,27 @@ async def test_ppaf_partition_info_cache_and_routing_async(self, write_operation assert initial_region not in partition_info.unavailable_regional_endpoints assert partition_info.current_region is None - @pytest.mark.parametrize("write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_threshold_errors())) + @pytest.mark.parametrize( + "write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_threshold_errors()) + ) async def test_ppaf_partition_thresholds_and_routing_async(self, write_operation, error, exclude_regions): # This test validates that the partition info cache is updated correctly upon failures, and that the # per-partition automatic failover logic routes requests to the next available regional endpoint. # We also verify that this logic is unaffected by user excluded regions, since write-region routing is # entirely taken care of on the service. error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda, - exclude_client_regions=exclude_regions,) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, + exclude_client_regions=exclude_regions, + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # Create a document to populate the per-partition GEM partition range info cache - await fault_injection_container.create_item(body={'id': doc_success_id, 'pk': PK_VALUE, - 'name': 'sample document', 'key': 'value'}) + await fault_injection_container.create_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"} + ) pk_range_wrapper = list(global_endpoint_manager.partition_range_to_failover_info.keys())[0] initial_region = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper].current_region @@ -164,50 +194,54 @@ async def test_ppaf_partition_thresholds_and_routing_async(self, write_operation for i in range(consecutive_failures): # We perform the write operation multiple times to check the consecutive failures logic with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + await perform_write_operation( + write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE + ) assert exc_info.value == error # Verify that the threshold for consecutive failures is updated - pk_range_wrappers = list(global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.keys()) + pk_range_wrappers = list( + global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.keys() + ) assert len(pk_range_wrappers) == 1 - failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[pk_range_wrappers[0]] + failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[ + pk_range_wrappers[0] + ] assert failure_count == consecutive_failures # Verify that a single success to the same partition resets the consecutive failures count - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE + ) - failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.get(pk_range_wrappers[0], 0) + failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count.get( + pk_range_wrappers[0], 0 + ) assert failure_count == 0 # Run enough failed requests to the partition to trigger the failover logic for i in range(12): with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + await perform_write_operation( + write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE + ) assert exc_info.value == error # We should have marked the previous endpoint as unavailable after 10 successive failures partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the partition is marked as unavailable, and that the current regional endpoint is not the same assert len(partition_info.unavailable_regional_endpoints) == 1 assert initial_region in partition_info.unavailable_regional_endpoints - assert initial_region != partition_info.current_region # west us 3 != west us + assert initial_region != partition_info.current_region # west us 3 != west us # 12 failures - 10 to trigger failover, 2 more to start counting again - failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[pk_range_wrappers[0]] + failure_count = global_endpoint_manager.ppaf_thresholds_tracker.pk_range_wrapper_to_failure_count[ + pk_range_wrappers[0] + ] assert failure_count == 2 - @pytest.mark.parametrize("write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors())) + @pytest.mark.parametrize( + "write_operation, error, exclude_regions", write_operations_errors_and_boolean(create_failover_errors()) + ) async def test_ppaf_session_unavailable_retry_async(self, write_operation, error, exclude_regions): # Account config has 2 regions: West US 3 (A) and West US (B). This test validates that after marking the write # region (A) as unavailable, the next request is retried to the read region (B) and succeeds. The next read request @@ -215,37 +249,39 @@ async def test_ppaf_session_unavailable_retry_async(self, write_operation, error # We also verify that this logic is unaffected by user excluded regions, since write-region routing is # entirely taken care of on the service. error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) - setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda, max_count=1, - is_batch=write_operation==BATCH, - session_error=True, exclude_client_regions=exclude_regions) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, + max_count=1, + is_batch=write_operation == BATCH, + session_error=True, + exclude_client_regions=exclude_regions, + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # Create a document to populate the per-partition GEM partition range info cache - await fault_injection_container.create_item(body={'id': doc_success_id, 'pk': PK_VALUE, - 'name': 'sample document', 'key': 'value'}) + await fault_injection_container.create_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"} + ) pk_range_wrapper = list(global_endpoint_manager.partition_range_to_failover_info.keys())[0] initial_region = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper].current_region # Verify the region that is being used for the read requests read_response = await fault_injection_container.read_item(doc_success_id, PK_VALUE) - uri = read_response.get_response_headers().get('Content-Location') - region = fault_injection_container.client_connection._global_endpoint_manager.location_cache.get_location_from_endpoint(uri) - assert region == REGION_1 # first preferred region + uri = read_response.get_response_headers().get("Content-Location") + region = fault_injection_container.client_connection._global_endpoint_manager.location_cache.get_location_from_endpoint( + uri + ) + assert region == REGION_1 # first preferred region # Based on our configuration, we should have had one error followed by a success - marking only the previous endpoint as unavailable - await perform_write_operation( - write_operation, - container, - fault_injection_container, - doc_fail_id, - PK_VALUE) + await perform_write_operation(write_operation, container, fault_injection_container, doc_fail_id, PK_VALUE) partition_info = global_endpoint_manager.partition_range_to_failover_info[pk_range_wrapper] # Verify that the partition is marked as unavailable, and that the current regional endpoint is not the same assert len(partition_info.unavailable_regional_endpoints) == 1 assert initial_region in partition_info.unavailable_regional_endpoints - assert initial_region != partition_info.current_region # west us 3 != west us + assert initial_region != partition_info.current_region # west us 3 != west us # Now we run a read request that runs into a 404.1002 error, which should retry to the read region # We verify that the read request was going to the correct region by using the raw_response_hook @@ -254,10 +290,13 @@ async def test_ppaf_session_unavailable_retry_async(self, write_operation, error async def test_ppaf_user_agent_feature_flag_async(self): # Simple test to verify the user agent suffix is being updated with the relevant feature flags setup, doc_fail_id, doc_success_id, custom_setup, custom_transport, predicate = await self.setup_info() - fault_injection_container = custom_setup['col'] + fault_injection_container = custom_setup["col"] # Create a document to check the response headers - await fault_injection_container.upsert_item(body={'id': doc_success_id, 'pk': PK_VALUE, 'name': 'sample document', 'key': 'value'}, - raw_response_hook=ppaf_user_agent_hook) + await fault_injection_container.upsert_item( + body={"id": doc_success_id, "pk": PK_VALUE, "name": "sample document", "key": "value"}, + raw_response_hook=ppaf_user_agent_hook, + ) + -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm.py b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm.py index 700e2112621b..a76e95ff546c 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm.py +++ b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm.py @@ -33,11 +33,9 @@ DELETE = "delete" PK_VALUE = "pk1" + def create_doc(): - return {'id': str(uuid.uuid4()), - 'pk': PK_VALUE, - 'name': 'sample document', - 'key': 'value'} + return {"id": str(uuid.uuid4()), "pk": PK_VALUE, "name": "sample document", "key": "value"} def read_operations_and_errors(): @@ -50,6 +48,7 @@ def read_operations_and_errors(): return params + def write_operations_and_errors(error_list=None): write_operations = [CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] errors = error_list or create_errors() @@ -60,6 +59,7 @@ def write_operations_and_errors(error_list=None): return params + def write_operations_errors_and_boolean(error_list=None): write_operations = [CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] errors = error_list or create_errors() @@ -71,6 +71,7 @@ def write_operations_errors_and_boolean(error_list=None): return params + def operations(): write_operations = [CREATE, UPSERT, REPLACE, DELETE, PATCH, BATCH] read_operations = [READ, QUERY_PK, CHANGE_FEED_PK, CHANGE_FEED_EPK] @@ -80,19 +81,20 @@ def operations(): return operations + def create_errors(errors=None): errors = [] error_codes = [408, 500, 502, 504] for error_code in error_codes: - errors.append(CosmosHttpResponseError( - status_code=error_code, - message="Some injected error.")) + errors.append(CosmosHttpResponseError(status_code=error_code, message="Some injected error.")) errors.append(ServiceResponseError(message="Injected Service Response Error.")) return errors -def validate_unhealthy_partitions(global_endpoint_manager, - expected_unhealthy_partitions): - health_info_map = global_endpoint_manager.global_partition_endpoint_manager_core.partition_health_tracker.pk_range_wrapper_to_health_info + +def validate_unhealthy_partitions(global_endpoint_manager, expected_unhealthy_partitions): + health_info_map = ( + global_endpoint_manager.global_partition_endpoint_manager_core.partition_health_tracker.pk_range_wrapper_to_health_info + ) unhealthy_partitions = 0 for pk_range_wrapper, location_to_health_info in health_info_map.items(): for location, health_info in location_to_health_info.items(): @@ -105,15 +107,14 @@ def validate_unhealthy_partitions(global_endpoint_manager, assert unhealthy_partitions == expected_unhealthy_partitions + def validate_response_uri(response, expected_uri): request = response.get_response_headers()["_request"] assert request.url.startswith(expected_uri) + def perform_write_operation(operation, container, fault_injection_container, doc_id, pk, expected_uri=None): - doc = {'id': doc_id, - 'pk': pk, - 'name': 'sample document', - 'key': 'value'} + doc = {"id": doc_id, "pk": pk, "name": "sample document", "key": "value"} if operation == CREATE: resp = fault_injection_container.create_item(body=doc) elif operation == UPSERT: @@ -121,28 +122,27 @@ def perform_write_operation(operation, container, fault_injection_container, doc elif operation == REPLACE: container.upsert_item(body=doc) sleep(1) - new_doc = {'id': doc_id, - 'pk': pk, - 'name': 'sample document' + str(uuid), - 'key': 'value'} - resp = fault_injection_container.replace_item(item=doc['id'], body=new_doc) + new_doc = {"id": doc_id, "pk": pk, "name": "sample document" + str(uuid), "key": "value"} + resp = fault_injection_container.replace_item(item=doc["id"], body=new_doc) elif operation == DELETE: container.upsert_item(body=doc) sleep(1) - resp = fault_injection_container.delete_item(item=doc['id'], partition_key=doc['pk']) + resp = fault_injection_container.delete_item(item=doc["id"], partition_key=doc["pk"]) elif operation == PATCH: container.upsert_item(body=doc) sleep(1) operations = [{"op": "incr", "path": "/company", "value": 3}] - resp = fault_injection_container.patch_item(item=doc['id'], partition_key=doc['pk'], patch_operations=operations) + resp = fault_injection_container.patch_item( + item=doc["id"], partition_key=doc["pk"], patch_operations=operations + ) elif operation == BATCH: batch_operations = [ - ("create", (doc, )), + ("create", (doc,)), ("upsert", (doc,)), ("upsert", (doc,)), ("upsert", (doc,)), ] - resp = fault_injection_container.execute_item_batch(batch_operations, partition_key=doc['pk']) + resp = fault_injection_container.execute_item_batch(batch_operations, partition_key=doc["pk"]) # this will need to be emulator only elif operation == DELETE_ALL_ITEMS_BY_PARTITION_KEY: container.upsert_item(body=doc) @@ -150,6 +150,7 @@ def perform_write_operation(operation, container, fault_injection_container, doc if resp and expected_uri: validate_response_uri(resp, expected_uri) + def perform_read_operation(operation, container, doc_id, pk, expected_uri): if operation == READ: read_resp = container.read_item(item=doc_id, partition_key=pk) @@ -161,13 +162,13 @@ def perform_read_operation(operation, container, doc_id, pk, expected_uri): query = "SELECT * FROM c WHERE c.id = @id AND c.pk = @pk" parameters = [{"name": "@id", "value": doc_id}, {"name": "@pk", "value": pk}] for item in container.query_items(query=query, partition_key=pk, parameters=parameters): - assert item['id'] == doc_id + assert item["id"] == doc_id # need to do query with no pk and with feed range elif operation == QUERY: # cross partition query query = "SELECT * FROM c WHERE c.id = @id" for item in container.query_items(query=query): - assert item['id'] == doc_id + assert item["id"] == doc_id elif operation == CHANGE_FEED: for _ in container.query_items_change_feed(): pass @@ -184,6 +185,7 @@ def perform_read_operation(operation, container, doc_id, pk, expected_uri): for _ in container.read_all_items(): pass + @pytest.mark.cosmosCircuitBreaker class TestPerPartitionCircuitBreakerMM: host = test_config.TestConfig.host @@ -195,30 +197,30 @@ def setup_method_with_custom_transport(self, custom_transport, default_endpoint= container_id = kwargs.pop("container_id", None) if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID - client = CosmosClient(default_endpoint, self.master_key, - preferred_locations=[REGION_1, REGION_2], - multiple_write_locations=True, - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + preferred_locations=[REGION_1, REGION_2], + multiple_write_locations=True, + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} @pytest.mark.parametrize("write_operation, error", write_operations_and_errors()) def test_write_consecutive_failure_threshold(self, write_operation, error): - error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - error + error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) + container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = ( + self.setup_info(error_lambda) ) - container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = self.setup_info(error_lambda) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) assert exc_info.value == error validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -226,21 +228,15 @@ def test_write_consecutive_failure_threshold(self, write_operation, error): # writes should fail but still be tracked for i in range(4): with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) assert exc_info.value == error # writes should now succeed because going to the other region - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) validate_unhealthy_partitions(global_endpoint_manager, 1) # remove faults and reduce initial recover time and perform a write @@ -248,12 +244,9 @@ def test_write_consecutive_failure_threshold(self, write_operation, error): _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - uri_down) + perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, uri_down + ) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -261,32 +254,23 @@ def test_write_consecutive_failure_threshold(self, write_operation, error): @pytest.mark.cosmosCircuitBreakerMultiRegion @pytest.mark.parametrize("read_operation, error", read_operations_and_errors()) def test_read_consecutive_failure_threshold(self, read_operation, error): - error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - error + error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) + container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = ( + self.setup_info(error_lambda) ) - container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = self.setup_info(error_lambda) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager - + # create a document to read container.create_item(body=doc) # reads should fail over and only the relevant partition should be marked as unavailable - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - doc['pk'], - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], doc["pk"], expected_uri) # partition should not have been marked unavailable after one error validate_unhealthy_partitions(global_endpoint_manager, 0) for i in range(10): - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - doc['pk'], - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], doc["pk"], expected_uri) # the partition should have been marked as unavailable after breaking read threshold if read_operation in (CHANGE_FEED, QUERY, READ_ALL_ITEMS): @@ -300,22 +284,17 @@ def test_read_consecutive_failure_threshold(self, read_operation, error): _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - doc['pk'], - uri_down) + perform_read_operation(read_operation, fault_injection_container, doc["id"], doc["pk"], uri_down) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) @pytest.mark.parametrize("write_operation, error", write_operations_and_errors()) def test_write_failure_rate_threshold(self, write_operation, error): - error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - error + error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) + container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = ( + self.setup_info(error_lambda) ) - container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = self.setup_info(error_lambda) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -329,19 +308,17 @@ def test_write_failure_rate_threshold(self, write_operation, error): # remove faults and perform a write custom_transport.faults = [] fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: FaultInjectionTransport.error_after_delay( - 0, - error - )) + custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay(0, error)) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions(global_endpoint_manager, 1) @@ -354,11 +331,10 @@ def test_write_failure_rate_threshold(self, write_operation, error): @pytest.mark.cosmosCircuitBreakerMultiRegion @pytest.mark.parametrize("read_operation, error", read_operations_and_errors()) def test_read_failure_rate_threshold(self, read_operation, error): - error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - error + error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) + container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = ( + self.setup_info(error_lambda) ) - container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = self.setup_info(error_lambda) container.upsert_item(body=doc) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing @@ -373,11 +349,7 @@ def test_read_failure_rate_threshold(self, read_operation, error): for i in range(num_operations): validate_unhealthy_partitions(global_endpoint_manager, 0) # read will fail and retry in other region - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) if read_operation in (CHANGE_FEED, QUERY, READ_ALL_ITEMS): # these operations are cross partition so they would mark both partitions as unavailable expected_unhealthy_partitions = 5 @@ -396,26 +368,25 @@ def setup_info(self, error, **kwargs): custom_transport = FaultInjectionTransport() # two documents targeted to same partition, one will always fail and the other will succeed doc = create_doc() - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) - custom_transport.add_fault(predicate, - error) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) + custom_transport.add_fault(predicate, error) custom_setup = self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, **kwargs) - fault_injection_container = custom_setup['col'] + fault_injection_container = custom_setup["col"] setup = self.setup_method_with_custom_transport(None, default_endpoint=self.host, **kwargs) - container = setup['col'] + container = setup["col"] return container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate def test_stat_reset(self): status_code = 500 error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - CosmosHttpResponseError( - status_code=status_code, - message="Some injected error.") + 0, CosmosHttpResponseError(status_code=status_code, message="Some injected error.") ) - container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = \ + container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = ( self.setup_info(error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) + ) container.upsert_item(body=doc) sleep(1) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager @@ -425,28 +396,17 @@ def test_stat_reset(self): for i in range(2): validate_unhealthy_partitions(global_endpoint_manager, 0) # read will fail and retry in other region - perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) try: - perform_write_operation(CREATE, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + CREATE, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) except CosmosHttpResponseError as e: assert e.status_code == status_code validate_unhealthy_partitions(global_endpoint_manager, 0) - validate_stats(global_endpoint_manager, 2, 2, 2, 2, 0, 0) + validate_stats(global_endpoint_manager, 2, 2, 2, 2, 0, 0) sleep(25) - perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) validate_stats(global_endpoint_manager, 2, 3, 1, 0, 0, 0) finally: @@ -457,13 +417,11 @@ def test_service_request_error(self, read_operation, write_operation): # the region should be tried 4 times before failing over and mark the partition as unavailable # the region should not be marked as unavailable error_lambda = lambda r: FaultInjectionTransport.error_region_down() - container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = self.setup_info(error_lambda) + container, doc, expected_uri, uri_down, fault_injection_container, custom_transport, predicate = ( + self.setup_info(error_lambda) + ) container.upsert_item(body=doc) - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -476,24 +434,16 @@ def test_service_request_error(self, read_operation, write_operation): _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) - custom_transport.add_fault(predicate, - lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_region_down()) - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -503,25 +453,32 @@ def test_service_request_error(self, read_operation, write_operation): def test_circuit_breaker_user_agent_feature_flag_mm(self): # Simple test to verify the user agent suffix is being updated with the relevant feature flags custom_setup = self.setup_method_with_custom_transport(None) - container = custom_setup['col'] + container = custom_setup["col"] # Create a document to check the response headers - container.upsert_item(body={'id': str(uuid.uuid4()), 'pk': PK_VALUE, 'name': 'sample document', 'key': 'value'}, - raw_response_hook=user_agent_hook) + container.upsert_item( + body={"id": str(uuid.uuid4()), "pk": PK_VALUE, "name": "sample document", "key": "value"}, + raw_response_hook=user_agent_hook, + ) # test cosmos client timeout -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() -def validate_stats(global_endpoint_manager, - expected_write_consecutive_failure_count, - expected_read_consecutive_failure_count, - expected_read_failure_count, - expected_write_failure_count, - expected_write_success_count, - expected_read_success_count): - health_info_map = global_endpoint_manager.global_partition_endpoint_manager_core.partition_health_tracker.pk_range_wrapper_to_health_info +def validate_stats( + global_endpoint_manager, + expected_write_consecutive_failure_count, + expected_read_consecutive_failure_count, + expected_read_failure_count, + expected_write_failure_count, + expected_write_success_count, + expected_read_success_count, +): + health_info_map = ( + global_endpoint_manager.global_partition_endpoint_manager_core.partition_health_tracker.pk_range_wrapper_to_health_info + ) for pk_range_wrapper, location_to_health_info in health_info_map.items(): health_info = location_to_health_info[REGION_1] assert health_info.read_consecutive_failure_count == expected_read_consecutive_failure_count @@ -531,7 +488,8 @@ def validate_stats(global_endpoint_manager, assert health_info.read_success_count == expected_read_success_count assert health_info.write_success_count == expected_write_success_count + def user_agent_hook(raw_response): # Used to verify the user agent feature flags - user_agent = raw_response.http_request.headers.get('user-agent') - assert user_agent.endswith('| F2') \ No newline at end of file + user_agent = raw_response.http_request.headers.get("user-agent") + assert user_agent.endswith("| F2") diff --git a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm_async.py b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm_async.py index 90131646c17a..4a8bd9fa4d7e 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_mm_async.py @@ -15,48 +15,67 @@ from azure.cosmos.aio import CosmosClient from azure.cosmos.exceptions import CosmosHttpResponseError from _fault_injection_transport_async import FaultInjectionTransportAsync -from test_per_partition_circuit_breaker_mm import create_doc, read_operations_and_errors, \ - write_operations_and_errors, operations, REGION_1, REGION_2, CHANGE_FEED, CHANGE_FEED_PK, CHANGE_FEED_EPK, READ, \ - CREATE, READ_ALL_ITEMS, DELETE_ALL_ITEMS_BY_PARTITION_KEY, QUERY, QUERY_PK, BATCH, UPSERT, REPLACE, PATCH, DELETE, \ - PK_VALUE, validate_unhealthy_partitions, validate_response_uri, user_agent_hook +from test_per_partition_circuit_breaker_mm import ( + create_doc, + read_operations_and_errors, + write_operations_and_errors, + operations, + REGION_1, + REGION_2, + CHANGE_FEED, + CHANGE_FEED_PK, + CHANGE_FEED_EPK, + READ, + CREATE, + READ_ALL_ITEMS, + DELETE_ALL_ITEMS_BY_PARTITION_KEY, + QUERY, + QUERY_PK, + BATCH, + UPSERT, + REPLACE, + PATCH, + DELETE, + PK_VALUE, + validate_unhealthy_partitions, + validate_response_uri, + user_agent_hook, +) from test_per_partition_circuit_breaker_mm import validate_stats COLLECTION = "created_collection" + async def perform_write_operation(operation, container, fault_injection_container, doc_id, pk, expected_uri=None): - doc = {'id': doc_id, - 'pk': pk, - 'name': 'sample document', - 'key': 'value'} + doc = {"id": doc_id, "pk": pk, "name": "sample document", "key": "value"} if operation == CREATE: resp = await fault_injection_container.create_item(body=doc) elif operation == UPSERT: resp = await fault_injection_container.upsert_item(body=doc) elif operation == REPLACE: await container.upsert_item(body=doc) - new_doc = {'id': doc_id, - 'pk': pk, - 'name': 'sample document' + str(uuid), - 'key': 'value'} + new_doc = {"id": doc_id, "pk": pk, "name": "sample document" + str(uuid), "key": "value"} await asyncio.sleep(1) - resp = await fault_injection_container.replace_item(item=doc['id'], body=new_doc) + resp = await fault_injection_container.replace_item(item=doc["id"], body=new_doc) elif operation == DELETE: await container.upsert_item(body=doc) await asyncio.sleep(1) - resp = await fault_injection_container.delete_item(item=doc['id'], partition_key=doc['pk']) + resp = await fault_injection_container.delete_item(item=doc["id"], partition_key=doc["pk"]) elif operation == PATCH: await container.upsert_item(body=doc) await asyncio.sleep(1) operations = [{"op": "incr", "path": "/company", "value": 3}] - resp = await fault_injection_container.patch_item(item=doc['id'], partition_key=doc['pk'], patch_operations=operations) + resp = await fault_injection_container.patch_item( + item=doc["id"], partition_key=doc["pk"], patch_operations=operations + ) elif operation == BATCH: batch_operations = [ - ("create", (doc, )), + ("create", (doc,)), ("upsert", (doc,)), ("upsert", (doc,)), ("upsert", (doc,)), ] - resp = await fault_injection_container.execute_item_batch(batch_operations, partition_key=doc['pk']) + resp = await fault_injection_container.execute_item_batch(batch_operations, partition_key=doc["pk"]) # this will need to be emulator only elif operation == DELETE_ALL_ITEMS_BY_PARTITION_KEY: await container.upsert_item(body=doc) @@ -64,6 +83,7 @@ async def perform_write_operation(operation, container, fault_injection_containe if resp and expected_uri: validate_response_uri(resp, expected_uri) + async def perform_read_operation(operation, container, doc_id, pk, expected_uri): if operation == READ: read_resp = await container.read_item(item=doc_id, partition_key=pk) @@ -75,13 +95,13 @@ async def perform_read_operation(operation, container, doc_id, pk, expected_uri) query = "SELECT * FROM c WHERE c.id = @id AND c.pk = @pk" parameters = [{"name": "@id", "value": doc_id}, {"name": "@pk", "value": pk}] async for item in container.query_items(query=query, partition_key=pk, parameters=parameters): - assert item['id'] == doc_id + assert item["id"] == doc_id # need to do query with no pk and with feed range elif operation == QUERY: # cross partition query query = "SELECT * FROM c WHERE c.id = @id" async for item in container.query_items(query=query): - assert item['id'] == doc_id + assert item["id"] == doc_id elif operation == CHANGE_FEED: async for _ in container.query_items_change_feed(): pass @@ -98,11 +118,13 @@ async def perform_read_operation(operation, container, doc_id, pk, expected_uri) async for _ in container.read_all_items(): pass + async def cleanup_method(initialized_objects: list[dict[str, Any]]): for obj in initialized_objects: method_client: CosmosClient = obj["client"] await method_client.close() + @pytest.mark.cosmosCircuitBreaker @pytest.mark.asyncio class TestPerPartitionCircuitBreakerMMAsync: @@ -111,14 +133,20 @@ class TestPerPartitionCircuitBreakerMMAsync: TEST_DATABASE_ID = test_config.TestConfig.TEST_DATABASE_ID TEST_CONTAINER_MULTI_PARTITION_ID = test_config.TestConfig.TEST_MULTI_PARTITION_CONTAINER_ID - async def setup_method_with_custom_transport(self, custom_transport: Union[AioHttpTransport, Any], default_endpoint=host, **kwargs): + async def setup_method_with_custom_transport( + self, custom_transport: Union[AioHttpTransport, Any], default_endpoint=host, **kwargs + ): container_id = kwargs.pop("container_id", None) if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID - client = CosmosClient(default_endpoint, self.master_key, - preferred_locations=[REGION_1, REGION_2], - multiple_write_locations=True, - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + preferred_locations=[REGION_1, REGION_2], + multiple_write_locations=True, + transport=custom_transport, + **kwargs + ) await client.__aenter__() db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) @@ -126,22 +154,18 @@ async def setup_method_with_custom_transport(self, custom_transport: Union[AioHt @pytest.mark.parametrize("write_operation, error", write_operations_and_errors()) async def test_write_consecutive_failure_threshold_async(self, write_operation, error): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) assert exc_info.value == error validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -149,21 +173,15 @@ async def test_write_consecutive_failure_threshold_async(self, write_operation, # writes should fail but still be tracked for i in range(4): with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) assert exc_info.value == error # writes should now succeed because going to the other region - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) validate_unhealthy_partitions(global_endpoint_manager, 1) # remove faults and reduce initial recover time and perform a write @@ -171,12 +189,9 @@ async def test_write_consecutive_failure_threshold_async(self, write_operation, _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - uri_down) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, uri_down + ) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -188,46 +203,39 @@ async def setup_info(self, error, **kwargs): custom_transport = FaultInjectionTransportAsync() # two documents targeted to same partition, one will always fail and the other will succeed doc = create_doc() - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) - custom_transport.add_fault(predicate, - error) - custom_setup = await self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, **kwargs) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) + custom_transport.add_fault(predicate, error) + custom_setup = await self.setup_method_with_custom_transport( + custom_transport, default_endpoint=self.host, **kwargs + ) setup = await self.setup_method_with_custom_transport(None, default_endpoint=self.host, **kwargs) return setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate - @pytest.mark.cosmosCircuitBreakerMultiRegion @pytest.mark.parametrize("read_operation, error", read_operations_and_errors()) async def test_read_consecutive_failure_threshold_async(self, read_operation, error): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager - + # create a document to read await container.create_item(body=doc) # reads should fail over and only the relevant partition should be marked as unavailable - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - doc['pk'], - expected_uri) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], doc["pk"], expected_uri) # partition should not have been marked unavailable after one error validate_unhealthy_partitions(global_endpoint_manager, 0) for i in range(10): - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - doc['pk'], - expected_uri) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], doc["pk"], expected_uri) # the partition should have been marked as unavailable after breaking read threshold if read_operation in (CHANGE_FEED, QUERY, READ_ALL_ITEMS): @@ -241,11 +249,7 @@ async def test_read_consecutive_failure_threshold_async(self, read_operation, er _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - doc['pk'], - uri_down) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], doc["pk"], uri_down) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -253,13 +257,12 @@ async def test_read_consecutive_failure_threshold_async(self, read_operation, er @pytest.mark.parametrize("write_operation, error", write_operations_and_errors()) async def test_write_failure_rate_threshold_async(self, write_operation, error): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -273,19 +276,20 @@ async def test_write_failure_rate_threshold_async(self, write_operation, error): # remove faults and perform a write custom_transport.faults = [] await fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - ))) + custom_transport.add_fault( + predicate, + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)), + ) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions(global_endpoint_manager, 1) @@ -299,13 +303,12 @@ async def test_write_failure_rate_threshold_async(self, write_operation, error): @pytest.mark.cosmosCircuitBreakerMultiRegion @pytest.mark.parametrize("read_operation, error", read_operations_and_errors()) async def test_read_failure_rate_threshold_async(self, read_operation, error): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] await container.upsert_item(body=doc) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing @@ -320,11 +323,9 @@ async def test_read_failure_rate_threshold_async(self, read_operation, error): for i in range(num_operations): validate_unhealthy_partitions(global_endpoint_manager, 0) # read will fail and retry in other region - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation( + read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri + ) if read_operation in (CHANGE_FEED, QUERY, READ_ALL_ITEMS): # these operations are cross partition so they would mark both partitions as unavailable expected_unhealthy_partitions = 5 @@ -340,16 +341,16 @@ async def test_read_failure_rate_threshold_async(self, read_operation, error): async def test_stat_reset_async(self): status_code = 500 - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - CosmosHttpResponseError( - status_code=status_code, - message="Some injected error.") - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = \ - await self.setup_info(error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task( + FaultInjectionTransportAsync.error_after_delay( + 0, CosmosHttpResponseError(status_code=status_code, message="Some injected error.") + ) + ) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] await container.upsert_item(body=doc) await asyncio.sleep(1) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager @@ -359,28 +360,17 @@ async def test_stat_reset_async(self): for i in range(2): validate_unhealthy_partitions(global_endpoint_manager, 0) # read will fail and retry in other region - await perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) try: - await perform_write_operation(CREATE, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + CREATE, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) except CosmosHttpResponseError as e: assert e.status_code == status_code validate_unhealthy_partitions(global_endpoint_manager, 0) validate_stats(global_endpoint_manager, 2, 2, 2, 2, 0, 0) await asyncio.sleep(25) - await perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) validate_stats(global_endpoint_manager, 2, 3, 1, 0, 0, 0) finally: @@ -392,15 +382,13 @@ async def test_service_request_error_async(self, read_operation, write_operation # the region should be tried 4 times before failing over and mark the partition as unavailable # the region should not be marked as unavailable error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] await container.upsert_item(body=doc) - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -412,57 +400,48 @@ async def test_service_request_error_async(self, read_operation, write_operation _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) # per partition circuit breaker should not regress connection timeouts marking the region as unavailable assert len(global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint) == 1 - custom_transport.add_fault(predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + custom_transport.add_fault( + predicate, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager validate_unhealthy_partitions(global_endpoint_manager, 0) assert len(global_endpoint_manager.location_cache.location_unavailability_info_by_endpoint) == 1 - await cleanup_method([custom_setup, setup]) - # send 15 write concurrent requests when trying to recover # verify that only one failed async def test_recovering_only_fails_one_requests_async(self): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, CosmosHttpResponseError( - status_code=502, - message="Some envoy error."))) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task( + FaultInjectionTransportAsync.error_after_delay( + 0, CosmosHttpResponseError(status_code=502, message="Some envoy error.") + ) + ) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + fault_injection_container = custom_setup["col"] for i in range(5): with pytest.raises(CosmosHttpResponseError): await fault_injection_container.create_item(body=doc) - number_of_errors = 0 async def concurrent_upsert(): nonlocal number_of_errors - doc = {'id': str(uuid.uuid4()), - 'pk': PK_VALUE, - 'name': 'sample document', - 'key': 'value'} + doc = {"id": str(uuid.uuid4()), "pk": PK_VALUE, "name": "sample document", "key": "value"} try: await fault_injection_container.upsert_item(doc) except CosmosHttpResponseError as e: @@ -484,10 +463,13 @@ async def concurrent_upsert(): async def test_circuit_breaker_user_agent_feature_flag_mm_async(self): # Simple test to verify the user agent suffix is being updated with the relevant feature flags custom_setup = await self.setup_method_with_custom_transport(None) - container = custom_setup['col'] + container = custom_setup["col"] # Create a document to check the response headers - await container.upsert_item(body={'id': str(uuid.uuid4()), 'pk': PK_VALUE, 'name': 'sample document', 'key': 'value'}, - raw_response_hook=user_agent_hook) + await container.upsert_item( + body={"id": str(uuid.uuid4()), "pk": PK_VALUE, "name": "sample document", "key": "value"}, + raw_response_hook=user_agent_hook, + ) + -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr.py b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr.py index 0ec3df11d270..ccaa105a681d 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr.py +++ b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr.py @@ -14,14 +14,28 @@ from azure.cosmos._partition_health_tracker import HEALTH_STATUS, UNHEALTHY_TENTATIVE, UNHEALTHY from azure.cosmos.exceptions import CosmosHttpResponseError from _fault_injection_transport import FaultInjectionTransport -from test_per_partition_circuit_breaker_mm import create_doc, write_operations_and_errors, operations, REGION_1, \ - REGION_2, PK_VALUE, perform_write_operation, perform_read_operation, CREATE, READ, validate_stats, user_agent_hook +from test_per_partition_circuit_breaker_mm import ( + create_doc, + write_operations_and_errors, + operations, + REGION_1, + REGION_2, + PK_VALUE, + perform_write_operation, + perform_read_operation, + CREATE, + READ, + validate_stats, + user_agent_hook, +) COLLECTION = "created_collection" -def validate_unhealthy_partitions(global_endpoint_manager, - expected_unhealthy_partitions): - health_info_map = global_endpoint_manager.global_partition_endpoint_manager_core.partition_health_tracker.pk_range_wrapper_to_health_info + +def validate_unhealthy_partitions(global_endpoint_manager, expected_unhealthy_partitions): + health_info_map = ( + global_endpoint_manager.global_partition_endpoint_manager_core.partition_health_tracker.pk_range_wrapper_to_health_info + ) unhealthy_partitions = 0 for pk_range_wrapper, location_to_health_info in health_info_map.items(): for location, health_info in location_to_health_info.items(): @@ -37,6 +51,7 @@ def validate_unhealthy_partitions(global_endpoint_manager, assert unhealthy_partitions == expected_unhealthy_partitions + @pytest.mark.cosmosCircuitBreakerMultiRegion class TestPerPartitionCircuitBreakerSmMrr: host = test_config.TestConfig.host @@ -49,9 +64,14 @@ def setup_method_with_custom_transport(self, custom_transport, default_endpoint= container_id = kwargs.pop("container_id", None) if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID - client = CosmosClient(default_endpoint, self.master_key, consistency_level="Session", - preferred_locations=[REGION_1, REGION_2], - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + consistency_level="Session", + preferred_locations=[REGION_1, REGION_2], + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} @@ -62,10 +82,11 @@ def setup_info(self, error, **kwargs): custom_transport = FaultInjectionTransport() # two documents targeted to same partition, one will always fail and the other will succeed doc = create_doc() - predicate = lambda r: (FaultInjectionTransport.predicate_is_document_operation(r) and - FaultInjectionTransport.predicate_targets_region(r, uri_down)) - custom_transport.add_fault(predicate, - error) + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_document_operation(r) + and FaultInjectionTransport.predicate_targets_region(r, uri_down) + ) + custom_transport.add_fault(predicate, error) custom_setup = self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, **kwargs) setup = self.setup_method_with_custom_transport(None, default_endpoint=self.host, **kwargs) return setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate @@ -73,15 +94,13 @@ def setup_info(self, error, **kwargs): def test_stat_reset(self): status_code = 500 error_lambda = lambda r: FaultInjectionTransport.error_after_delay( - 0, - CosmosHttpResponseError( - status_code=status_code, - message="Some injected error.") + 0, CosmosHttpResponseError(status_code=status_code, message="Some injected error.") ) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = \ - self.setup_info(error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info( + error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] container.upsert_item(body=doc) sleep(1) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager @@ -91,28 +110,17 @@ def test_stat_reset(self): for i in range(2): validate_unhealthy_partitions(global_endpoint_manager, 0) # read will fail and retry in other region - perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) try: - perform_write_operation(CREATE, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + CREATE, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) except CosmosHttpResponseError as e: assert e.status_code == status_code validate_unhealthy_partitions(global_endpoint_manager, 0) - validate_stats(global_endpoint_manager, 0, 2, 2, 0, 0, 0) + validate_stats(global_endpoint_manager, 0, 2, 2, 0, 0, 0) sleep(25) - perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) validate_stats(global_endpoint_manager, 0, 3, 1, 0, 0, 0) finally: @@ -122,8 +130,8 @@ def test_stat_reset(self): def test_write_consecutive_failure_threshold(self, write_operation, error): error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = container.client_connection._global_endpoint_manager # writes should fail in sm mrr with circuit breaker and should not mark unavailable a partition @@ -145,8 +153,8 @@ def test_write_consecutive_failure_threshold(self, write_operation, error): def test_write_failure_rate_threshold(self, write_operation, error): error_lambda = lambda r: FaultInjectionTransport.error_after_delay(0, error) setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -160,19 +168,17 @@ def test_write_failure_rate_threshold(self, write_operation, error): # remove faults and perform a write custom_transport.faults = [] fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: FaultInjectionTransport.error_after_delay( - 0, - error - )) + custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay(0, error)) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -188,14 +194,10 @@ def test_service_request_error(self, read_operation, write_operation): # the partition should not be marked as unavailable error_lambda = lambda r: FaultInjectionTransport.error_region_down() setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + container = setup["col"] + fault_injection_container = custom_setup["col"] container.upsert_item(body=doc) - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # there shouldn't be partition marked as unavailable @@ -208,26 +210,18 @@ def test_service_request_error(self, read_operation, write_operation): _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) - custom_transport.add_fault(predicate, - lambda r: FaultInjectionTransport.error_region_down()) + custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_region_down()) # for single write region account if regional endpoint is down there will be write unavailability with pytest.raises(ServiceRequestError): - perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager @@ -238,13 +232,15 @@ def test_service_request_error(self, read_operation, write_operation): def test_circuit_breaker_user_agent_feature_flag_sm(self): # Simple test to verify the user agent suffix is being updated with the relevant feature flags custom_setup = self.setup_method_with_custom_transport(None) - container = custom_setup['col'] + container = custom_setup["col"] # Create a document to check the response headers - container.upsert_item(body={'id': str(uuid.uuid4()), 'pk': PK_VALUE, 'name': 'sample document', 'key': 'value'}, - raw_response_hook=user_agent_hook) + container.upsert_item( + body={"id": str(uuid.uuid4()), "pk": PK_VALUE, "name": "sample document", "key": "value"}, + raw_response_hook=user_agent_hook, + ) # test cosmos client timeout -if __name__ == '__main__': - unittest.main() +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr_async.py b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr_async.py index 2d43fb492b8c..f5bd79f403d9 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_per_partition_circuit_breaker_sm_mrr_async.py @@ -16,12 +16,23 @@ from azure.cosmos.exceptions import CosmosHttpResponseError from _fault_injection_transport_async import FaultInjectionTransportAsync from test_per_partition_circuit_breaker_mm_async import perform_write_operation, cleanup_method, perform_read_operation -from test_per_partition_circuit_breaker_mm import create_doc, write_operations_and_errors, operations, REGION_1, \ - REGION_2, PK_VALUE, READ, validate_stats, CREATE, user_agent_hook +from test_per_partition_circuit_breaker_mm import ( + create_doc, + write_operations_and_errors, + operations, + REGION_1, + REGION_2, + PK_VALUE, + READ, + validate_stats, + CREATE, + user_agent_hook, +) from test_per_partition_circuit_breaker_sm_mrr import validate_unhealthy_partitions COLLECTION = "created_collection" + @pytest.mark.cosmosCircuitBreakerMultiRegion @pytest.mark.asyncio class TestPerPartitionCircuitBreakerSmMrrAsync: @@ -31,13 +42,20 @@ class TestPerPartitionCircuitBreakerSmMrrAsync: TEST_DATABASE_ID = test_config.TestConfig.TEST_DATABASE_ID TEST_CONTAINER_MULTI_PARTITION_ID = test_config.TestConfig.TEST_MULTI_PARTITION_CONTAINER_ID - async def setup_method_with_custom_transport(self, custom_transport: Union[AioHttpTransport, Any], default_endpoint=host, **kwargs): + async def setup_method_with_custom_transport( + self, custom_transport: Union[AioHttpTransport, Any], default_endpoint=host, **kwargs + ): container_id = kwargs.pop("container_id", None) if not container_id: container_id = self.TEST_CONTAINER_MULTI_PARTITION_ID - client = CosmosClient(default_endpoint, self.master_key, consistency_level="Session", - preferred_locations=[REGION_1, REGION_2], - transport=custom_transport, **kwargs) + client = CosmosClient( + default_endpoint, + self.master_key, + consistency_level="Session", + preferred_locations=[REGION_1, REGION_2], + transport=custom_transport, + **kwargs + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(container_id) return {"client": client, "db": db, "col": container} @@ -53,23 +71,25 @@ async def setup_info(self, error, **kwargs): custom_transport = FaultInjectionTransportAsync() # two documents targeted to same partition, one will always fail and the other will succeed doc = create_doc() - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_document_operation(r) and - FaultInjectionTransportAsync.predicate_targets_region(r, uri_down)) - custom_transport.add_fault(predicate, - error) - custom_setup = await self.setup_method_with_custom_transport(custom_transport, default_endpoint=self.host, **kwargs) + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_document_operation(r) + and FaultInjectionTransportAsync.predicate_targets_region(r, uri_down) + ) + custom_transport.add_fault(predicate, error) + custom_setup = await self.setup_method_with_custom_transport( + custom_transport, default_endpoint=self.host, **kwargs + ) setup = await self.setup_method_with_custom_transport(None, default_endpoint=self.host, **kwargs) return setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate @pytest.mark.parametrize("write_operation, error", write_operations_and_errors()) async def test_write_consecutive_failure_threshold_async(self, write_operation, error): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = container.client_connection._global_endpoint_manager # writes should fail in sm mrr with circuit breaker and should not mark unavailable a partition @@ -88,16 +108,14 @@ async def test_write_consecutive_failure_threshold_async(self, write_operation, validate_unhealthy_partitions(global_endpoint_manager, 0) await cleanup_method([custom_setup, setup]) - @pytest.mark.parametrize("write_operation, error", write_operations_and_errors()) async def test_write_failure_rate_threshold_async(self, write_operation, error): - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager # lower minimum requests for testing _partition_health_tracker.MINIMUM_REQUESTS_FOR_FAILURE_RATE = 10 @@ -111,19 +129,20 @@ async def test_write_failure_rate_threshold_async(self, write_operation, error): # remove faults and perform a write custom_transport.faults = [] await fault_injection_container.upsert_item(body=doc) - custom_transport.add_fault(predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - error - ))) + custom_transport.add_fault( + predicate, + lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay(0, error)), + ) else: with pytest.raises((CosmosHttpResponseError, ServiceResponseError)) as exc_info: - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, + container, + fault_injection_container, + str(uuid.uuid4()), + PK_VALUE, + expected_uri, + ) assert exc_info.value == error validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -136,16 +155,16 @@ async def test_write_failure_rate_threshold_async(self, write_operation, error): async def test_stat_reset_async(self): status_code = 500 - error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - CosmosHttpResponseError( - status_code=status_code, - message="Some injected error.") - )) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = \ - await self.setup_info(error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - container = setup['col'] - fault_injection_container = custom_setup['col'] + error_lambda = lambda r: asyncio.create_task( + FaultInjectionTransportAsync.error_after_delay( + 0, CosmosHttpResponseError(status_code=status_code, message="Some injected error.") + ) + ) + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda, container_id=test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] await container.upsert_item(body=doc) await asyncio.sleep(1) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager @@ -155,28 +174,17 @@ async def test_stat_reset_async(self): for i in range(2): validate_unhealthy_partitions(global_endpoint_manager, 0) # read will fail and retry in other region - await perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) try: - await perform_write_operation(CREATE, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + CREATE, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) except CosmosHttpResponseError as e: assert e.status_code == status_code validate_unhealthy_partitions(global_endpoint_manager, 0) - validate_stats(global_endpoint_manager, 0, 2, 2, 0, 0, 0) + validate_stats(global_endpoint_manager, 0, 2, 2, 0, 0, 0) await asyncio.sleep(25) - await perform_read_operation(READ, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(READ, fault_injection_container, doc["id"], PK_VALUE, expected_uri) validate_stats(global_endpoint_manager, 0, 3, 1, 0, 0, 0) finally: @@ -188,15 +196,13 @@ async def test_service_request_error_async(self, read_operation, write_operation # the region should be tried 4 times before failing over and mark the region as unavailable # the partition should not be marked as unavailable error_lambda = lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) - setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info(error_lambda) - container = setup['col'] - fault_injection_container = custom_setup['col'] + setup, doc, expected_uri, uri_down, custom_setup, custom_transport, predicate = await self.setup_info( + error_lambda + ) + container = setup["col"] + fault_injection_container = custom_setup["col"] await container.upsert_item(body=doc) - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -209,25 +215,19 @@ async def test_service_request_error_async(self, read_operation, write_operation _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = 1 custom_transport.faults = [] try: - await perform_read_operation(read_operation, - fault_injection_container, - doc['id'], - PK_VALUE, - expected_uri) + await perform_read_operation(read_operation, fault_injection_container, doc["id"], PK_VALUE, expected_uri) finally: _partition_health_tracker.INITIAL_UNAVAILABLE_TIME_MS = original_unavailable_time validate_unhealthy_partitions(global_endpoint_manager, 0) - custom_transport.add_fault(predicate, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + custom_transport.add_fault( + predicate, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) # for single write region account if regional endpoint is down there will be write unavailability with pytest.raises(ServiceRequestError): - await perform_write_operation(write_operation, - container, - fault_injection_container, - str(uuid.uuid4()), - PK_VALUE, - expected_uri) + await perform_write_operation( + write_operation, container, fault_injection_container, str(uuid.uuid4()), PK_VALUE, expected_uri + ) global_endpoint_manager = fault_injection_container.client_connection._global_endpoint_manager validate_unhealthy_partitions(global_endpoint_manager, 0) @@ -237,12 +237,15 @@ async def test_service_request_error_async(self, read_operation, write_operation async def test_circuit_breaker_user_agent_feature_flag_sm_async(self): # Simple test to verify the user agent suffix is being updated with the relevant feature flags custom_setup = await self.setup_method_with_custom_transport(None) - container = custom_setup['col'] + container = custom_setup["col"] # Create a document to check the response headers - await container.upsert_item(body={'id': str(uuid.uuid4()), 'pk': PK_VALUE, 'name': 'sample document', 'key': 'value'}, - raw_response_hook=user_agent_hook) + await container.upsert_item( + body={"id": str(uuid.uuid4()), "pk": PK_VALUE, "name": "sample document", "key": "value"}, + raw_response_hook=user_agent_hook, + ) # test cosmos client timeout -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_proxy.py b/sdk/cosmos/azure-cosmos/tests/test_proxy.py index 44cee2c3ea72..abcbe58f94e0 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_proxy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_proxy.py @@ -19,12 +19,12 @@ class CustomRequestHandler(BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) - self.send_header('Content-type', 'application/json') + self.send_header("Content-type", "application/json") self.end_headers() def _send_payload(self): self._set_headers() - payload = "{\"id\":\"" + self.database_name + "\", \"_self\":\"self_link\"}" + payload = '{"id":"' + self.database_name + '", "_self":"self_link"}' self.wfile.write(bytes(payload, "utf-8")) def do_GET(self): @@ -37,7 +37,7 @@ def do_POST(self): class Server(Thread): def __init__(self, database_name, PORT): Thread.__init__(self) - server_address = ('', PORT) + server_address = ("", PORT) CustomRequestHandler.database_name = database_name self.httpd = HTTPServer(server_address, CustomRequestHandler) @@ -50,11 +50,11 @@ def shutdown(self): @pytest.mark.cosmosEmulator class TestProxy(unittest.TestCase): - """Proxy Tests. - """ - host = 'http://localhost:8081' + """Proxy Tests.""" + + host = "http://localhost:8081" masterKey = test_config.TestConfig.masterKey - testDbName = 'sample database' + testDbName = "sample database" serverPort = 8089 @classmethod @@ -65,7 +65,7 @@ def setUpClass(cls): server.start() connection_policy = documents.ConnectionPolicy() connection_policy.ProxyConfiguration = documents.ProxyConfiguration() - connection_policy.ProxyConfiguration.Host = 'http://127.0.0.1' + connection_policy.ProxyConfiguration.Host = "http://127.0.0.1" @classmethod def tearDownClass(cls): @@ -74,11 +74,12 @@ def tearDownClass(cls): # Needs further debugging @pytest.mark.skip def test_success_with_correct_proxy(self): - if platform.system() == 'Darwin': + if platform.system() == "Darwin": self.skipTest("TODO: Connection error raised on OSX") connection_policy.ProxyConfiguration.Port = self.serverPort - client = cosmos_client.CosmosClient(self.host, self.masterKey, consistency_level="Session", - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + self.host, self.masterKey, consistency_level="Session", connection_policy=connection_policy + ) created_db = client.create_database_if_not_exists(self.testDbName) self.assertEqual(created_db.id, self.testDbName, msg="Database id is incorrect") @@ -86,7 +87,7 @@ def test_failure_with_wrong_proxy(self): connection_policy.ProxyConfiguration.Port = self.serverPort + 1 try: # client does a getDatabaseAccount on initialization, which fails - cosmos_client.CosmosClient(self.host, {'masterKey': self.masterKey}, connection_policy=connection_policy) + cosmos_client.CosmosClient(self.host, {"masterKey": self.masterKey}, connection_policy=connection_policy) self.fail("Client instantiation is not expected") except Exception as e: self.assertTrue(type(e) is ServiceRequestError, msg="Error is not a ServiceRequestError") diff --git a/sdk/cosmos/azure-cosmos/tests/test_query.py b/sdk/cosmos/azure-cosmos/tests/test_query.py index 5d3b13073d76..f72ac41e3ee1 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query.py @@ -17,6 +17,7 @@ from azure.cosmos.documents import _DistinctType from azure.cosmos.partition_key import PartitionKey + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosQuery class TestQuery(unittest.TestCase): @@ -36,91 +37,91 @@ def setUpClass(cls): use_multiple_write_locations = False if os.environ.get("AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER", "False") == "True": use_multiple_write_locations = True - cls.client = cosmos_client.CosmosClient(cls.host, cls.credential, multiple_write_locations=use_multiple_write_locations) + cls.client = cosmos_client.CosmosClient( + cls.host, cls.credential, multiple_write_locations=use_multiple_write_locations + ) cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID) def test_first_and_last_slashes_trimmed_for_query_string(self): - created_collection = self.created_db.create_container( - "test_trimmed_slashes", PartitionKey(path="/pk")) - doc_id = 'myId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + created_collection = self.created_db.create_container("test_trimmed_slashes", PartitionKey(path="/pk")) + doc_id = "myId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} created_collection.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk' - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk") iter_list = list(query_iterable) - self.assertEqual(iter_list[0]['id'], doc_id) + self.assertEqual(iter_list[0]["id"], doc_id) self.created_db.delete_container(created_collection.id) def test_populate_query_metrics(self): - created_collection = self.created_db.create_container("query_metrics_test", - PartitionKey(path="/pk")) - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + created_collection = self.created_db.create_container("query_metrics_test", PartitionKey(path="/pk")) + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} created_collection.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk', - populate_query_metrics=True - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk", populate_query_metrics=True) iter_list = list(query_iterable) - self.assertEqual(iter_list[0]['id'], doc_id) + self.assertEqual(iter_list[0]["id"], doc_id) - METRICS_HEADER_NAME = 'x-ms-documentdb-query-metrics' + METRICS_HEADER_NAME = "x-ms-documentdb-query-metrics" self.assertTrue(METRICS_HEADER_NAME in created_collection.client_connection.last_response_headers) metrics_header = created_collection.client_connection.last_response_headers[METRICS_HEADER_NAME] # Validate header is well-formed: "key1=value1;key2=value2;etc" - metrics = metrics_header.split(';') + metrics = metrics_header.split(";") self.assertTrue(len(metrics) > 1) - self.assertTrue(all(['=' in x for x in metrics])) + self.assertTrue(all(["=" in x for x in metrics])) self.created_db.delete_container(created_collection.id) def test_populate_index_metrics(self): - created_collection = self.created_db.create_container("query_index_test", - PartitionKey(path="/pk")) + created_collection = self.created_db.create_container("query_index_test", PartitionKey(path="/pk")) - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} created_collection.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk', - populate_index_metrics=True - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk", populate_index_metrics=True) iter_list = list(query_iterable) - self.assertEqual(iter_list[0]['id'], doc_id) + self.assertEqual(iter_list[0]["id"], doc_id) INDEX_HEADER_NAME = http_constants.HttpHeaders.IndexUtilization self.assertTrue(INDEX_HEADER_NAME in created_collection.client_connection.last_response_headers) index_metrics = created_collection.client_connection.last_response_headers[INDEX_HEADER_NAME] self.assertIsNotNone(index_metrics) - expected_index_metrics = {'UtilizedSingleIndexes': [{'FilterExpression': '', 'IndexSpec': '/pk/?', - 'FilterPreciseSet': True, 'IndexPreciseSet': True, - 'IndexImpactScore': 'High'}], - 'PotentialSingleIndexes': [], 'UtilizedCompositeIndexes': [], - 'PotentialCompositeIndexes': []} + expected_index_metrics = { + "UtilizedSingleIndexes": [ + { + "FilterExpression": "", + "IndexSpec": "/pk/?", + "FilterPreciseSet": True, + "IndexPreciseSet": True, + "IndexImpactScore": "High", + } + ], + "PotentialSingleIndexes": [], + "UtilizedCompositeIndexes": [], + "PotentialCompositeIndexes": [], + } self.assertDictEqual(expected_index_metrics, index_metrics) self.created_db.delete_container(created_collection.id) @pytest.mark.skip(reason="Emulator does not support query advisor yet") def test_populate_query_advice(self): - created_collection = self.created_db.create_container("query_advice_test", - PartitionKey(path="/pk")) + created_collection = self.created_db.create_container("query_advice_test", PartitionKey(path="/pk")) - doc_id = 'MyId' + str(uuid.uuid4()) + doc_id = "MyId" + str(uuid.uuid4()) document_definition = { - 'pk': 'pk', 'id': doc_id, 'name': 'test document', - 'tags': [{'name': 'python'}, {'name': 'cosmos'}], - 'timestamp': '2099-01-01T00:00:00Z', 'ticks': 0, 'ts': 0 + "pk": "pk", + "id": doc_id, + "name": "test document", + "tags": [{"name": "python"}, {"name": "cosmos"}], + "timestamp": "2099-01-01T00:00:00Z", + "ticks": 0, + "ts": 0, } created_collection.create_item(body=document_definition) @@ -129,7 +130,8 @@ def test_populate_query_advice(self): # QA1000 - PartialArrayContains: ARRAY_CONTAINS with partial match query_iterable = created_collection.query_items( query='SELECT * FROM c WHERE ARRAY_CONTAINS(c.tags, {"name": "python"}, true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -138,8 +140,7 @@ def test_populate_query_advice(self): # QA1002 - Contains: CONTAINS usage query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', - partition_key='pk', populate_query_advice=True + query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', partition_key="pk", populate_query_advice=True ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -149,7 +150,8 @@ def test_populate_query_advice(self): # QA1003 - CaseInsensitiveStartsWithOrStringEquals: case-insensitive STARTSWITH query_iterable = created_collection.query_items( query='SELECT * FROM c WHERE STARTSWITH(c.name, "test", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -159,7 +161,8 @@ def test_populate_query_advice(self): # QA1004 - CaseInsensitiveEndsWith: case-insensitive ENDSWITH query_iterable = created_collection.query_items( query='SELECT * FROM c WHERE ENDSWITH(c.name, "document", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -168,8 +171,9 @@ def test_populate_query_advice(self): # QA1007 - GetCurrentDateTime: usage of GetCurrentDateTime query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()", + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -178,8 +182,7 @@ def test_populate_query_advice(self): # QA1008 - GetCurrentTicks: usage of GetCurrentTicks query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE c.ticks < GetCurrentTicks()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ticks < GetCurrentTicks()", partition_key="pk", populate_query_advice=True ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -188,8 +191,7 @@ def test_populate_query_advice(self): # QA1009 - GetCurrentTimestamp: usage of GetCurrentTimestamp query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()", partition_key="pk", populate_query_advice=True ) list(query_iterable) query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -200,25 +202,22 @@ def test_populate_query_advice(self): # TODO: Need to validate the query request count logic @pytest.mark.skip def test_max_item_count_honored_in_order_by_query(self): - created_collection = self.created_db.create_container("test-max-item-count" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_collection = self.created_db.create_container( + "test-max-item-count" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) docs = [] for i in range(10): - document_definition = {'pk': 'pk', 'id': 'myId' + str(uuid.uuid4())} + document_definition = {"pk": "pk", "id": "myId" + str(uuid.uuid4())} docs.append(created_collection.create_item(body=document_definition)) - query = 'SELECT * from c ORDER BY c._ts' + query = "SELECT * from c ORDER BY c._ts" query_iterable = created_collection.query_items( - query=query, - max_item_count=1, - enable_cross_partition_query=True + query=query, max_item_count=1, enable_cross_partition_query=True ) self.validate_query_requests_count(query_iterable, 25) query_iterable = created_collection.query_items( - query=query, - max_item_count=100, - enable_cross_partition_query=True + query=query, max_item_count=100, enable_cross_partition_query=True ) self.validate_query_requests_count(query_iterable, 5) @@ -240,38 +239,45 @@ def _MockExecuteFunction(self, function, *args, **kwargs): def test_get_query_plan_through_gateway(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - self._validate_query_plan(query="Select top 10 value count(c.id) from c", - container_link=created_collection.container_link, - top=10, - order_by=[], - aggregate=['Count'], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.NoneType) - - self._validate_query_plan(query="Select * from c order by c._ts offset 5 limit 10", - container_link=created_collection.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=False, - offset=5, - limit=10, - distinct=_DistinctType.NoneType) - - self._validate_query_plan(query="Select distinct value c.id from c order by c.id", - container_link=created_collection.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.Ordered) - - def _validate_query_plan(self, query, container_link, top, order_by, aggregate, select_value, offset, limit, - distinct): + self._validate_query_plan( + query="Select top 10 value count(c.id) from c", + container_link=created_collection.container_link, + top=10, + order_by=[], + aggregate=["Count"], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.NoneType, + ) + + self._validate_query_plan( + query="Select * from c order by c._ts offset 5 limit 10", + container_link=created_collection.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=False, + offset=5, + limit=10, + distinct=_DistinctType.NoneType, + ) + + self._validate_query_plan( + query="Select distinct value c.id from c order by c.id", + container_link=created_collection.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.Ordered, + ) + + def _validate_query_plan( + self, query, container_link, top, order_by, aggregate, select_value, offset, limit, distinct + ): query_plan_dict = self.client.client_connection._GetQueryPlanThroughGateway(query, container_link) query_execution_info = _PartitionedQueryExecutionInfo(query_plan_dict) self.assertTrue(query_execution_info.has_rewritten_query()) @@ -291,7 +297,7 @@ def _validate_query_plan(self, query, container_link, top, order_by, aggregate, def test_unsupported_queries(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - queries = ['SELECT COUNT(1) FROM c', 'SELECT COUNT(1) + 5 FROM c', 'SELECT COUNT(1) + SUM(c) FROM c'] + queries = ["SELECT COUNT(1) FROM c", "SELECT COUNT(1) + 5 FROM c", "SELECT COUNT(1) + SUM(c) FROM c"] for query in queries: query_iterable = created_collection.query_items(query=query, enable_cross_partition_query=True) try: @@ -302,123 +308,138 @@ def test_unsupported_queries(self): def test_query_with_non_overlapping_pk_ranges(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - query_iterable = created_collection.query_items("select * from c where c.pk='1' or c.pk='2'", - enable_cross_partition_query=True) + query_iterable = created_collection.query_items( + "select * from c where c.pk='1' or c.pk='2'", enable_cross_partition_query=True + ) self.assertListEqual(list(query_iterable), []) def test_offset_limit(self): - created_collection = self.created_db.create_container("offset_limit_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_collection = self.created_db.create_container( + "offset_limit_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) values = [] for i in range(10): - document_definition = {'pk': i, 'id': 'myId' + str(uuid.uuid4()), 'value': i // 3} - values.append(created_collection.create_item(body=document_definition)['pk']) + document_definition = {"pk": i, "id": "myId" + str(uuid.uuid4()), "value": i // 3} + values.append(created_collection.create_item(body=document_definition)["pk"]) - self._validate_distinct_offset_limit(created_collection=created_collection, - query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 0 LIMIT 2', - results=[0, 1]) + self._validate_distinct_offset_limit( + created_collection=created_collection, + query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 0 LIMIT 2', + results=[0, 1], + ) - self._validate_distinct_offset_limit(created_collection=created_collection, - query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 2 LIMIT 2', - results=[2, 3]) + self._validate_distinct_offset_limit( + created_collection=created_collection, + query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 2 LIMIT 2', + results=[2, 3], + ) - self._validate_distinct_offset_limit(created_collection=created_collection, - query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 4 LIMIT 3', - results=[]) + self._validate_distinct_offset_limit( + created_collection=created_collection, + query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 4 LIMIT 3', + results=[], + ) - self._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5', - results=values[:5]) + self._validate_offset_limit( + created_collection=created_collection, + query="SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5", + results=values[:5], + ) - self._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10', - results=values[5:]) + self._validate_offset_limit( + created_collection=created_collection, + query="SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10", + results=values[5:], + ) - self._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5', - results=[]) + self._validate_offset_limit( + created_collection=created_collection, query="SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5", results=[] + ) - self._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1', - results=[]) + self._validate_offset_limit( + created_collection=created_collection, query="SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1", results=[] + ) self.created_db.delete_container(created_collection.id) def _validate_offset_limit(self, created_collection, query, results): - query_iterable = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) - self.assertListEqual(list(map(lambda doc: doc['pk'], list(query_iterable))), results) + query_iterable = created_collection.query_items(query=query, enable_cross_partition_query=True) + self.assertListEqual(list(map(lambda doc: doc["pk"], list(query_iterable))), results) def _validate_distinct_offset_limit(self, created_collection, query, results): - query_iterable = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) + query_iterable = created_collection.query_items(query=query, enable_cross_partition_query=True) self.assertListEqual(list(map(lambda doc: doc["value"], list(query_iterable))), results) def test_distinct(self): - distinct_field = 'distinct_field' + distinct_field = "distinct_field" pk_field = "pk" different_field = "different_field" created_collection = self.created_db.create_container( - id='collection with composite index ' + str(uuid.uuid4()), + id="collection with composite index " + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind="Hash"), indexing_policy={ "compositeIndexes": [ - [{"path": "/" + pk_field, "order": "ascending"}, - {"path": "/" + distinct_field, "order": "ascending"}], - [{"path": "/" + distinct_field, "order": "ascending"}, - {"path": "/" + pk_field, "order": "ascending"}] + [ + {"path": "/" + pk_field, "order": "ascending"}, + {"path": "/" + distinct_field, "order": "ascending"}, + ], + [ + {"path": "/" + distinct_field, "order": "ascending"}, + {"path": "/" + pk_field, "order": "ascending"}, + ], ] - } + }, ) documents = [] for i in range(5): j = i while j > i - 5: - document_definition = {pk_field: i, 'id': str(uuid.uuid4()), distinct_field: j} + document_definition = {pk_field: i, "id": str(uuid.uuid4()), distinct_field: j} documents.append(created_collection.create_item(body=document_definition)) - document_definition = {pk_field: i, 'id': str(uuid.uuid4()), distinct_field: j} + document_definition = {pk_field: i, "id": str(uuid.uuid4()), distinct_field: j} documents.append(created_collection.create_item(body=document_definition)) - document_definition = {pk_field: i, 'id': str(uuid.uuid4())} + document_definition = {pk_field: i, "id": str(uuid.uuid4())} documents.append(created_collection.create_item(body=document_definition)) j -= 1 padded_docs = self.config._pad_with_none(documents, distinct_field) - self._validate_distinct(created_collection=created_collection, # returns {} and is right number - query='SELECT distinct c.%s from c' % distinct_field, # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, None, False), - is_select=True, - fields=[distinct_field]) - - self._validate_distinct(created_collection=created_collection, - query='SELECT distinct c.%s, c.%s from c' % (distinct_field, pk_field), # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, pk_field, False), - is_select=True, - fields=[distinct_field, pk_field]) - - self._validate_distinct(created_collection=created_collection, - query='SELECT distinct value c.%s from c' % distinct_field, # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, None, True), - is_select=True, - fields=[distinct_field]) - - self._validate_distinct(created_collection=created_collection, - query='SELECT distinct c.%s from c' % different_field, # nosec - results=['None'], - is_select=True, - fields=[different_field]) + self._validate_distinct( + created_collection=created_collection, # returns {} and is right number + query="SELECT distinct c.%s from c" % distinct_field, # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, None, False), + is_select=True, + fields=[distinct_field], + ) + + self._validate_distinct( + created_collection=created_collection, + query="SELECT distinct c.%s, c.%s from c" % (distinct_field, pk_field), # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, pk_field, False), + is_select=True, + fields=[distinct_field, pk_field], + ) + + self._validate_distinct( + created_collection=created_collection, + query="SELECT distinct value c.%s from c" % distinct_field, # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, None, True), + is_select=True, + fields=[distinct_field], + ) + + self._validate_distinct( + created_collection=created_collection, + query="SELECT distinct c.%s from c" % different_field, # nosec + results=["None"], + is_select=True, + fields=[different_field], + ) self.created_db.delete_container(created_collection.id) def _validate_distinct(self, created_collection, query, results, is_select, fields): - query_iterable = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) + query_iterable = created_collection.query_items(query=query, enable_cross_partition_query=True) query_results = list(query_iterable) self.assertEqual(len(results), len(query_results)) @@ -436,11 +457,12 @@ def test_distinct_on_different_types_and_field_orders(self): created_collection = self.created_db.create_container( id="test-distinct-container-" + str(uuid.uuid4()), partition_key=PartitionKey("/pk"), - offer_throughput=self.config.THROUGHPUT_FOR_5_PARTITIONS) + offer_throughput=self.config.THROUGHPUT_FOR_5_PARTITIONS, + ) self.payloads = [ - {'f1': 1, 'f2': 'value', 'f3': 100000000000000000, 'f4': [1, 2, '3'], 'f5': {'f6': {'f7': 2}}}, - {'f2': '\'value', 'f4': [1.0, 2, '3'], 'f5': {'f6': {'f7': 2.0}}, 'f1': 1.0, 'f3': 100000000000000000.00}, - {'f3': 100000000000000000.0, 'f5': {'f6': {'f7': 2}}, 'f2': '\'value', 'f1': 1, 'f4': [1, 2.0, '3']} + {"f1": 1, "f2": "value", "f3": 100000000000000000, "f4": [1, 2, "3"], "f5": {"f6": {"f7": 2}}}, + {"f2": "'value", "f4": [1.0, 2, "3"], "f5": {"f6": {"f7": 2.0}}, "f1": 1.0, "f3": 100000000000000000.00}, + {"f3": 100000000000000000.0, "f5": {"f6": {"f7": 2}}, "f2": "'value", "f1": 1, "f4": [1, 2.0, "3"]}, ] self.OriginalExecuteFunction = _QueryExecutionContextBase.__next__ _QueryExecutionContextBase.__next__ = self._MockNextFunction @@ -449,56 +471,56 @@ def test_distinct_on_different_types_and_field_orders(self): collection=created_collection, query="Select distinct value c.f1 from c", expected_results=[1], - get_mock_result=lambda x, i: (None, x[i]["f1"]) + get_mock_result=lambda x, i: (None, x[i]["f1"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f2 from c", - expected_results=['value', '\'value'], - get_mock_result=lambda x, i: (None, x[i]["f2"]) + expected_results=["value", "'value"], + get_mock_result=lambda x, i: (None, x[i]["f2"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f2 from c order by c.f2", - expected_results=['\'value', 'value'], - get_mock_result=lambda x, i: (x[i]["f2"], x[i]["f2"]) + expected_results=["'value", "value"], + get_mock_result=lambda x, i: (x[i]["f2"], x[i]["f2"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f3 from c", expected_results=[100000000000000000], - get_mock_result=lambda x, i: (None, x[i]["f3"]) + get_mock_result=lambda x, i: (None, x[i]["f3"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f4 from c", - expected_results=[[1, 2, '3']], - get_mock_result=lambda x, i: (None, x[i]["f4"]) + expected_results=[[1, 2, "3"]], + get_mock_result=lambda x, i: (None, x[i]["f4"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f5.f6 from c", - expected_results=[{'f7': 2}], - get_mock_result=lambda x, i: (None, x[i]["f5"]["f6"]) + expected_results=[{"f7": 2}], + get_mock_result=lambda x, i: (None, x[i]["f5"]["f6"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct c.f1, c.f2, c.f3 from c", expected_results=[self.payloads[0], self.payloads[1]], - get_mock_result=lambda x, i: (None, x[i]) + get_mock_result=lambda x, i: (None, x[i]), ) self._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct c.f1, c.f2, c.f3 from c order by c.f1", expected_results=[self.payloads[0], self.payloads[1]], - get_mock_result=lambda x, i: (i, x[i]) + get_mock_result=lambda x, i: (i, x[i]), ) _QueryExecutionContextBase.__next__ = self.OriginalExecuteFunction @@ -509,17 +531,13 @@ def test_distinct_on_different_types_and_field_orders(self): def test_paging_with_continuation_token(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'pk': 'pk', 'id': '1'} + document_definition = {"pk": "pk", "id": "1"} created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk', 'id': '2'} + document_definition = {"pk": "pk", "id": "2"} created_collection.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk', - max_item_count=1 - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk", max_item_count=1) pager = query_iterable.by_page() pager.next() token = pager.continuation_token @@ -528,16 +546,16 @@ def test_paging_with_continuation_token(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = list(pager.next())[0] - self.assertEqual(second_page['id'], second_page_fetched_with_continuation_token['id']) + self.assertEqual(second_page["id"], second_page_fetched_with_continuation_token["id"]) def test_cross_partition_query_with_continuation_token(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'pk': 'pk1', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk1", "id": str(uuid.uuid4())} created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk2', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk2", "id": str(uuid.uuid4())} created_collection.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" query_iterable = created_collection.query_items( query=query, enable_cross_partition_query=True, @@ -551,26 +569,25 @@ def test_cross_partition_query_with_continuation_token(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = list(pager.next())[0] - self.assertEqual(second_page['id'], second_page_fetched_with_continuation_token['id']) + self.assertEqual(second_page["id"], second_page_fetched_with_continuation_token["id"]) def test_cross_partition_query_with_none_partition_key(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'pk': 'pk1', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk1", "id": str(uuid.uuid4())} created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk2', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk2", "id": str(uuid.uuid4())} created_collection.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" query_iterable = created_collection.query_items( - query=query, - partition_key=None, - enable_cross_partition_query=True + query=query, partition_key=None, enable_cross_partition_query=True ) assert len(list(query_iterable)) >= 2 - def _validate_distinct_on_different_types_and_field_orders(self, collection, query, expected_results, - get_mock_result): + def _validate_distinct_on_different_types_and_field_orders( + self, collection, query, expected_results, get_mock_result + ): self.count = 0 self.get_mock_result = get_mock_result query_iterable = collection.query_items(query, enable_cross_partition_query=True) @@ -587,22 +604,28 @@ def _validate_distinct_on_different_types_and_field_orders(self, collection, que def test_value_max_query(self): container = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) query = "Select value max(c.version) FROM c where c.isComplete = true and c.lookupVersion = @lookupVersion" - query_results = container.query_items(query, parameters=[ - {"name": "@lookupVersion", "value": "console_csat"} # cspell:disable-line - ], enable_cross_partition_query=True) + query_results = container.query_items( + query, + parameters=[{"name": "@lookupVersion", "value": "console_csat"}], # cspell:disable-line + enable_cross_partition_query=True, + ) self.assertListEqual(list(query_results), [None]) def test_value_max_query_results(self): container = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) container.upsert_item( - {"id": str(uuid.uuid4()), "isComplete": True, "version": 3, "lookupVersion": "console_version"}) + {"id": str(uuid.uuid4()), "isComplete": True, "version": 3, "lookupVersion": "console_version"} + ) container.upsert_item( - {"id": str(uuid.uuid4()), "isComplete": True, "version": 2, "lookupVersion": "console_version"}) + {"id": str(uuid.uuid4()), "isComplete": True, "version": 2, "lookupVersion": "console_version"} + ) query = "Select value max(c.version) FROM c where c.isComplete = true and c.lookupVersion = @lookupVersion" - query_results = container.query_items(query, parameters=[ - {"name": "@lookupVersion", "value": "console_version"} # cspell:disable-line - ], enable_cross_partition_query=True) + query_results = container.query_items( + query, + parameters=[{"name": "@lookupVersion", "value": "console_version"}], # cspell:disable-line + enable_cross_partition_query=True, + ) item_list = list(query_results) assert len(item_list) == 1 assert item_list[0] == 3 @@ -610,28 +633,31 @@ def test_value_max_query_results(self): def test_continuation_token_size_limit_query(self): container = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) for i in range(1, 1000): - container.create_item(body=dict(pk='123', id=str(uuid.uuid4()), some_value=str(i % 3))) + container.create_item(body=dict(pk="123", id=str(uuid.uuid4()), some_value=str(i % 3))) query = "Select * from c where c.some_value='2'" - response_query = container.query_items(query, partition_key='123', max_item_count=100, - continuation_token_limit=1) + response_query = container.query_items( + query, partition_key="123", max_item_count=100, continuation_token_limit=1 + ) pager = response_query.by_page() pager.next() token = pager.continuation_token # Continuation token size should be below 1kb - self.assertLessEqual(len(token.encode('utf-8')), 1024) + self.assertLessEqual(len(token.encode("utf-8")), 1024) pager.next() token = pager.continuation_token # verify a second time - self.assertLessEqual(len(token.encode('utf-8')), 1024) + self.assertLessEqual(len(token.encode("utf-8")), 1024) def test_query_request_params_none_retry_policy(self): created_collection = self.created_db.create_container( - "query_request_params_none_retry_policy_" + str(uuid.uuid4()), PartitionKey(path="/pk")) + "query_request_params_none_retry_policy_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) items = [ - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5}] + {"id": str(uuid.uuid4()), "pk": "test", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5}, + ] for item in items: created_collection.create_item(body=item) @@ -641,10 +667,7 @@ def test_query_request_params_none_retry_policy(self): retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionRetry try: query = "SELECT * FROM c" - items = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) + items = created_collection.query_items(query=query, enable_cross_partition_query=True) fetch_results = list(items) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, 404) @@ -656,10 +679,7 @@ def test_query_request_params_none_retry_policy(self): _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy.Retry_after_in_milliseconds = 10 try: query = "SELECT * FROM c" - items = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) + items = created_collection.query_items(query=query, enable_cross_partition_query=True) fetch_results = list(items) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, http_constants.StatusCodes.FORBIDDEN) @@ -671,10 +691,7 @@ def test_query_request_params_none_retry_policy(self): retry_utility.ExecuteFunction = self._MockExecuteFunctionTimeoutFailoverRetry try: query = "SELECT * FROM c" - items = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) + items = created_collection.query_items(query=query, enable_cross_partition_query=True) fetch_results = list(items) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, http_constants.StatusCodes.REQUEST_TIMEOUT) @@ -685,20 +702,16 @@ def test_query_request_params_none_retry_policy(self): def test_query_pagination_with_max_item_count(self): """Test pagination showing per-page limits and total results counting.""" created_collection = self.created_db.create_container( - "pagination_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - + "pagination_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create 20 items in a single partition total_items = 20 partition_key_value = "test_pk" for i in range(total_items): - document_definition = { - 'pk': partition_key_value, - 'id': f'item_{i}', - 'value': i - } + document_definition = {"pk": partition_key_value, "id": f"item_{i}", "value": i} created_collection.create_item(body=document_definition) - + # Test pagination with max_item_count limiting items per page max_items_per_page = 7 query = "SELECT * FROM c WHERE c.pk = @pk ORDER BY c['value']" @@ -706,65 +719,59 @@ def test_query_pagination_with_max_item_count(self): query=query, parameters=[{"name": "@pk", "value": partition_key_value}], partition_key=partition_key_value, - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) - + # Iterate through pages and verify per-page counts all_fetched_results = [] page_count = 0 item_pages = query_iterable.by_page() - + for page in item_pages: page_count += 1 items_in_page = list(page) all_fetched_results.extend(items_in_page) - + # Each page should have at most max_item_count items # (last page may have fewer) self.assertLessEqual(len(items_in_page), max_items_per_page) - + # Verify total results match expected count self.assertEqual(len(all_fetched_results), total_items) - + # Verify we got the expected number of pages # 20 items with max 7 per page = 3 pages (7, 7, 6) self.assertEqual(page_count, 3) - + # Verify ordering is maintained for i, item in enumerate(all_fetched_results): - self.assertEqual(item['value'], i) - + self.assertEqual(item["value"], i) + self.created_db.delete_container(created_collection.id) - + def test_query_pagination_without_max_item_count(self): """Test pagination behavior without specifying max_item_count.""" created_collection = self.created_db.create_container( - "pagination_no_max_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - + "pagination_no_max_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create 15 items in a single partition total_items = 15 partition_key_value = "test_pk_2" for i in range(total_items): - document_definition = { - 'pk': partition_key_value, - 'id': f'item_{i}', - 'value': i - } + document_definition = {"pk": partition_key_value, "id": f"item_{i}", "value": i} created_collection.create_item(body=document_definition) - + # Query without specifying max_item_count query = "SELECT * FROM c WHERE c.pk = @pk" query_iterable = created_collection.query_items( - query=query, - parameters=[{"name": "@pk", "value": partition_key_value}], - partition_key=partition_key_value + query=query, parameters=[{"name": "@pk", "value": partition_key_value}], partition_key=partition_key_value ) - + # Count total results all_results = list(query_iterable) self.assertEqual(len(all_results), total_items) - + self.created_db.delete_container(created_collection.id) def test_query_positional_args(self): @@ -778,8 +785,8 @@ def test_query_positional_args(self): for i in range(num_items): item = { self.config.TEST_CONTAINER_PARTITION_KEY: pk_value, - 'id': f"{pk_value}_{i}", - 'name': 'sample name' + "id": f"{pk_value}_{i}", + "name": "sample name", } new_items.append(item) @@ -787,7 +794,7 @@ def test_query_positional_args(self): container.upsert_item(body=item) query = "SELECT * FROM root r WHERE r.name=@name" - parameters = [{'name': '@name', 'value': 'sample name'}] + parameters = [{"name": "@name", "value": "sample name"}] partition_key_value = partition_key_value2 enable_cross_partition_query = True max_item_count = 3 @@ -808,34 +815,37 @@ def test_query_positional_args(self): items = list(page) num_items = len(items) for item in items: - assert item['pk'] == partition_key_value - ids.append(item['id']) + assert item["pk"] == partition_key_value + ids.append(item["id"]) assert num_items <= max_item_count - assert ids == [item['id'] for item in new_items if item['pk'] == partition_key_value] + assert ids == [item["id"] for item in new_items if item["pk"] == partition_key_value] def _MockExecuteFunctionSessionRetry(self, function, *args, **kwargs): if args: - if args[1].operation_type == 'SqlQuery': - ex_to_raise = exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.NOT_FOUND, - message="Read Session is Not Available") + if args[1].operation_type == "SqlQuery": + ex_to_raise = exceptions.CosmosHttpResponseError( + status_code=http_constants.StatusCodes.NOT_FOUND, message="Read Session is Not Available" + ) ex_to_raise.sub_status = http_constants.SubStatusCodes.READ_SESSION_NOTAVAILABLE raise ex_to_raise return self.OriginalExecuteFunction(function, *args, **kwargs) def _MockExecuteFunctionEndPointRetry(self, function, *args, **kwargs): if args: - if args[1].operation_type == 'SqlQuery': - ex_to_raise = exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.FORBIDDEN, - message="End Point Discovery") + if args[1].operation_type == "SqlQuery": + ex_to_raise = exceptions.CosmosHttpResponseError( + status_code=http_constants.StatusCodes.FORBIDDEN, message="End Point Discovery" + ) ex_to_raise.sub_status = http_constants.SubStatusCodes.WRITE_FORBIDDEN raise ex_to_raise return self.OriginalExecuteFunction(function, *args, **kwargs) def _MockExecuteFunctionTimeoutFailoverRetry(self, function, *args, **kwargs): if args: - if args[1].operation_type == 'SqlQuery': - ex_to_raise = exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.REQUEST_TIMEOUT, - message="Timeout Failover") + if args[1].operation_type == "SqlQuery": + ex_to_raise = exceptions.CosmosHttpResponseError( + status_code=http_constants.StatusCodes.REQUEST_TIMEOUT, message="Timeout Failover" + ) raise ex_to_raise return self.OriginalExecuteFunction(function, *args, **kwargs) @@ -844,7 +854,7 @@ def _MockNextFunction(self): item, result = self.get_mock_result(self.payloads, self.count) self.count += 1 if item is not None: - return {'orderByItems': [{'item': item}], '_rid': 'fake_rid', 'payload': result} + return {"orderByItems": [{"item": item}], "_rid": "fake_rid", "payload": result} else: return result else: @@ -853,50 +863,38 @@ def _MockNextFunction(self): def test_query_items_with_parameters_none(self): """Test that query_items handles parameters=None correctly (issue #43662).""" created_collection = self.created_db.create_container( - "test_params_none_" + str(uuid.uuid4()), PartitionKey(path="/pk")) - + "test_params_none_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create test documents - doc1_id = 'doc1_' + str(uuid.uuid4()) - doc2_id = 'doc2_' + str(uuid.uuid4()) - created_collection.create_item(body={'pk': 'pk1', 'id': doc1_id, 'value1': 1}) - created_collection.create_item(body={'pk': 'pk2', 'id': doc2_id, 'value1': 2}) + doc1_id = "doc1_" + str(uuid.uuid4()) + doc2_id = "doc2_" + str(uuid.uuid4()) + created_collection.create_item(body={"pk": "pk1", "id": doc1_id, "value1": 1}) + created_collection.create_item(body={"pk": "pk2", "id": doc2_id, "value1": 2}) # Test 1: Explicitly passing parameters=None should not cause TypeError - query = 'SELECT * FROM c' - query_iterable = created_collection.query_items( - query=query, - parameters=None, - enable_cross_partition_query=True - ) + query = "SELECT * FROM c" + query_iterable = created_collection.query_items(query=query, parameters=None, enable_cross_partition_query=True) results = list(query_iterable) self.assertEqual(len(results), 2) # Test 2: parameters=None with partition_key should work - query_iterable = created_collection.query_items( - query=query, - parameters=None, - partition_key='pk1' - ) + query_iterable = created_collection.query_items(query=query, parameters=None, partition_key="pk1") results = list(query_iterable) self.assertEqual(len(results), 1) - self.assertEqual(results[0]['id'], doc1_id) + self.assertEqual(results[0]["id"], doc1_id) # Test 3: Verify parameterized query still works with actual parameters - query_with_params = 'SELECT * FROM c WHERE c.value1 = @value' + query_with_params = "SELECT * FROM c WHERE c.value1 = @value" query_iterable = created_collection.query_items( - query=query_with_params, - parameters=[{'name': '@value', 'value': 2}], - enable_cross_partition_query=True + query=query_with_params, parameters=[{"name": "@value", "value": 2}], enable_cross_partition_query=True ) results = list(query_iterable) self.assertEqual(len(results), 1) - self.assertEqual(results[0]['id'], doc2_id) + self.assertEqual(results[0]["id"], doc2_id) # Test 4: Query without parameters argument should work (default behavior) - query_iterable = created_collection.query_items( - query=query, - enable_cross_partition_query=True - ) + query_iterable = created_collection.query_items(query=query, enable_cross_partition_query=True) results = list(query_iterable) self.assertEqual(len(results), 2) @@ -905,22 +903,20 @@ def test_query_items_with_parameters_none(self): def test_query_items_parameters_none_with_options(self): """Test parameters=None works with various query options.""" created_collection = self.created_db.create_container( - "test_params_none_opts_" + str(uuid.uuid4()), PartitionKey(path="/pk")) - + "test_params_none_opts_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create multiple test documents for i in range(5): - doc_id = f'doc_{i}_' + str(uuid.uuid4()) - created_collection.create_item(body={'pk': 'test', 'id': doc_id, 'index': i}) + doc_id = f"doc_{i}_" + str(uuid.uuid4()) + created_collection.create_item(body={"pk": "test", "id": doc_id, "index": i}) # Test with parameters=None and max_item_count - query = 'SELECT * FROM c ORDER BY c.index' + query = "SELECT * FROM c ORDER BY c.index" query_iterable = created_collection.query_items( - query=query, - parameters=None, - partition_key='test', - max_item_count=2 + query=query, parameters=None, partition_key="test", max_item_count=2 ) - + # Verify pagination works page_count = 0 total_items = 0 @@ -929,22 +925,19 @@ def test_query_items_parameters_none_with_options(self): items = list(page) total_items += len(items) self.assertLessEqual(len(items), 2) - + self.assertEqual(total_items, 5) self.assertGreaterEqual(page_count, 2) # Should have multiple pages # Test with parameters=None and populate_query_metrics query_iterable = created_collection.query_items( - query=query, - parameters=None, - partition_key='test', - populate_query_metrics=True + query=query, parameters=None, partition_key="test", populate_query_metrics=True ) results = list(query_iterable) self.assertEqual(len(results), 5) - + # Verify query metrics were populated - metrics_header_name = 'x-ms-documentdb-query-metrics' + metrics_header_name = "x-ms-documentdb-query-metrics" self.assertTrue(metrics_header_name in created_collection.client_connection.last_response_headers) self.created_db.delete_container(created_collection.id) diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_advisor.py b/sdk/cosmos/azure-cosmos/tests/test_query_advisor.py index a33fd5636157..22db05119d64 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_advisor.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_advisor.py @@ -5,12 +5,7 @@ import unittest from urllib.parse import quote -from azure.cosmos._query_advisor import ( - QueryAdvice, - QueryAdviceEntry, - RuleDirectory, - get_query_advice_info -) +from azure.cosmos._query_advisor import QueryAdvice, QueryAdviceEntry, RuleDirectory, get_query_advice_info class TestQueryAdvisor(unittest.TestCase): @@ -19,10 +14,10 @@ class TestQueryAdvisor(unittest.TestCase): def test_rule_directory_loads_rules(self): """Test that RuleDirectory loads all 10 rules.""" directory = RuleDirectory() - + # Check URL prefix self.assertTrue(directory.url_prefix.startswith("https://")) - + # Check all 10 rules exist for rule_id in [f"QA{1000 + i}" for i in range(10)]: message = directory.get_rule_message(rule_id) @@ -42,7 +37,7 @@ def test_query_advice_entry_from_dict(self): """Test creating QueryAdviceEntry from dictionary.""" data = {"Id": "QA1000", "Params": ["param1", "param2"]} entry = QueryAdviceEntry.from_dict(data) - + self.assertEqual(entry.id, "QA1000") self.assertEqual(entry.parameters, ["param1", "param2"]) @@ -50,9 +45,9 @@ def test_query_advice_entry_str(self): """Test formatting QueryAdviceEntry as string.""" directory = RuleDirectory() entry = QueryAdviceEntry("QA1000", []) - + result = str(entry) - + self.assertIsNotNone(result) self.assertIn("QA1000:", result) self.assertIn("ARRAY_CONTAINS", result) @@ -63,9 +58,9 @@ def test_query_advice_entry_with_parameters(self): """Test formatting QueryAdviceEntry with parameters.""" # Create a mock entry that would use parameters entry = QueryAdviceEntry("QA1000", ["field1", "field2"]) - + result = str(entry) - + self.assertIsNotNone(result) self.assertIn("QA1000:", result) @@ -116,9 +111,9 @@ def test_query_advice_try_create_from_string_single_entry(self): data = [{"Id": "QA1002", "Params": []}] json_str = json.dumps(data) encoded = quote(json_str) - + advice = QueryAdvice.try_create_from_string(encoded) - + self.assertIsNotNone(advice) self.assertEqual(len(advice.entries), 1) self.assertEqual(advice.entries[0].id, "QA1002") @@ -126,15 +121,12 @@ def test_query_advice_try_create_from_string_single_entry(self): def test_query_advice_try_create_from_string_multiple_entries(self): """Test parsing query advice with multiple entries.""" # Create URL-encoded JSON - data = [ - {"Id": "QA1008", "Params": []}, - {"Id": "QA1009", "Params": []} - ] + data = [{"Id": "QA1008", "Params": []}, {"Id": "QA1009", "Params": []}] json_str = json.dumps(data) encoded = quote(json_str) - + advice = QueryAdvice.try_create_from_string(encoded) - + self.assertIsNotNone(advice) self.assertEqual(len(advice.entries), 2) self.assertEqual(advice.entries[0].id, "QA1008") @@ -160,10 +152,10 @@ def test_query_advice_str_single_entry(self): data = [{"Id": "QA1002", "Params": []}] json_str = json.dumps(data) encoded = quote(json_str) - + advice = QueryAdvice.try_create_from_string(encoded) result = str(advice) - + self.assertIsInstance(result, str) self.assertIn("QA1002:", result) self.assertIn("STARTSWITH", result) @@ -171,16 +163,13 @@ def test_query_advice_str_single_entry(self): def test_query_advice_str_multiple_entries(self): """Test formatting QueryAdvice with multiple entries as multi-line string.""" - data = [ - {"Id": "QA1008", "Params": []}, - {"Id": "QA1009", "Params": []} - ] + data = [{"Id": "QA1008", "Params": []}, {"Id": "QA1009", "Params": []}] json_str = json.dumps(data) encoded = quote(json_str) - + advice = QueryAdvice.try_create_from_string(encoded) result = str(advice) - + self.assertIsInstance(result, str) lines = result.split("\n") self.assertEqual(len(lines), 2) @@ -201,9 +190,9 @@ def test_get_query_advice_info_valid_input(self): data = [{"Id": "QA1002", "Params": []}] json_str = json.dumps(data) encoded = quote(json_str) - + result = get_query_advice_info(encoded) - + self.assertIsInstance(result, str) self.assertIn("QA1002:", result) self.assertIn("STARTSWITH", result) @@ -221,7 +210,7 @@ def test_get_query_advice_info_invalid_input(self): def test_query_advice_filters_null_entries(self): """Test that QueryAdvice filters out None entries.""" advice = QueryAdvice([QueryAdviceEntry("QA1000"), None, QueryAdviceEntry("QA1002")]) - + self.assertEqual(len(advice.entries), 2) self.assertEqual(advice.entries[0].id, "QA1000") self.assertEqual(advice.entries[1].id, "QA1002") diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_async.py b/sdk/cosmos/azure-cosmos/tests/test_query_async.py index 0bf1802522de..ce8cc75ea0ca 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_async.py @@ -18,6 +18,7 @@ from azure.cosmos.documents import _DistinctType from azure.cosmos.partition_key import PartitionKey + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosQuery class TestQueryAsync(unittest.IsolatedAsyncioTestCase): @@ -38,15 +39,17 @@ def setUpClass(cls): cls.use_multiple_write_locations = False if os.environ.get("AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER", "False") == "True": cls.use_multiple_write_locations = True - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): - self.client = CosmosClient(self.host, self.masterKey, multiple_write_locations=self.use_multiple_write_locations) + self.client = CosmosClient( + self.host, self.masterKey, multiple_write_locations=self.use_multiple_write_locations + ) await self.client.__aenter__() self.created_db = self.client.get_database_client(self.TEST_DATABASE_ID) @@ -54,81 +57,78 @@ async def asyncTearDown(self): await self.client.close() async def test_first_and_last_slashes_trimmed_for_query_string_async(self): - created_collection = await self.created_db.create_container( - str(uuid.uuid4()), PartitionKey(path="/pk")) - doc_id = 'myId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + created_collection = await self.created_db.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) + doc_id = "myId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} await created_collection.create_item(body=document_definition) await asyncio.sleep(1) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk' - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk") iter_list = [item async for item in query_iterable] - assert iter_list[0]['id'] == doc_id + assert iter_list[0]["id"] == doc_id await self.created_db.delete_container(created_collection.id) @pytest.mark.asyncio async def test_populate_query_metrics_async(self): created_collection = await self.created_db.create_container( - "query_metrics_test" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + "query_metrics_test" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} await created_collection.create_item(body=document_definition) await asyncio.sleep(1) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk', - populate_query_metrics=True - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk", populate_query_metrics=True) iter_list = [item async for item in query_iterable] - assert iter_list[0]['id'] == doc_id + assert iter_list[0]["id"] == doc_id - metrics_header_name = 'x-ms-documentdb-query-metrics' + metrics_header_name = "x-ms-documentdb-query-metrics" assert metrics_header_name in created_collection.client_connection.last_response_headers metrics_header = created_collection.client_connection.last_response_headers[metrics_header_name] # Validate header is well-formed: "key1=value1;key2=value2;etc" - metrics = metrics_header.split(';') + metrics = metrics_header.split(";") assert len(metrics) > 1 - assert all(['=' in x for x in metrics]) + assert all(["=" in x for x in metrics]) await self.created_db.delete_container(created_collection.id) async def test_populate_index_metrics_async(self): created_collection = await self.created_db.create_container( - "index_metrics_test" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + "index_metrics_test" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} await created_collection.create_item(body=document_definition) await asyncio.sleep(1) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk', - populate_index_metrics=True - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk", populate_index_metrics=True) iter_list = [item async for item in query_iterable] - assert iter_list[0]['id'] == doc_id + assert iter_list[0]["id"] == doc_id index_header_name = http_constants.HttpHeaders.IndexUtilization assert index_header_name in created_collection.client_connection.last_response_headers index_metrics = created_collection.client_connection.last_response_headers[index_header_name] assert index_metrics != {} - expected_index_metrics = {'UtilizedSingleIndexes': [{'FilterExpression': '', 'IndexSpec': '/pk/?', - 'FilterPreciseSet': True, 'IndexPreciseSet': True, - 'IndexImpactScore': 'High'}], - 'PotentialSingleIndexes': [], 'UtilizedCompositeIndexes': [], - 'PotentialCompositeIndexes': []} + expected_index_metrics = { + "UtilizedSingleIndexes": [ + { + "FilterExpression": "", + "IndexSpec": "/pk/?", + "FilterPreciseSet": True, + "IndexPreciseSet": True, + "IndexImpactScore": "High", + } + ], + "PotentialSingleIndexes": [], + "UtilizedCompositeIndexes": [], + "PotentialCompositeIndexes": [], + } assert expected_index_metrics == index_metrics await self.created_db.delete_container(created_collection.id) @@ -136,13 +136,17 @@ async def test_populate_index_metrics_async(self): @pytest.mark.skip(reason="Emulator does not support query advisor yet") async def test_populate_query_advice_async(self): created_collection = await self.created_db.create_container( - "query_advice_test" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - doc_id = 'MyId' + str(uuid.uuid4()) + "query_advice_test" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + doc_id = "MyId" + str(uuid.uuid4()) document_definition = { - 'pk': 'pk', 'id': doc_id, 'name': 'test document', - 'tags': [{'name': 'python'}, {'name': 'cosmos'}], - 'timestamp': '2099-01-01T00:00:00Z', 'ticks': 0, 'ts': 0 + "pk": "pk", + "id": doc_id, + "name": "test document", + "tags": [{"name": "python"}, {"name": "cosmos"}], + "timestamp": "2099-01-01T00:00:00Z", + "ticks": 0, + "ts": 0, } await created_collection.create_item(body=document_definition) await asyncio.sleep(1) @@ -152,7 +156,8 @@ async def test_populate_query_advice_async(self): # QA1000 - PartialArrayContains: ARRAY_CONTAINS with partial match query_iterable = created_collection.query_items( query='SELECT * FROM c WHERE ARRAY_CONTAINS(c.tags, {"name": "python"}, true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -161,8 +166,7 @@ async def test_populate_query_advice_async(self): # QA1002 - Contains: CONTAINS usage query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', - partition_key='pk', populate_query_advice=True + query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', partition_key="pk", populate_query_advice=True ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -172,7 +176,8 @@ async def test_populate_query_advice_async(self): # QA1003 - CaseInsensitiveStartsWithOrStringEquals: case-insensitive STARTSWITH query_iterable = created_collection.query_items( query='SELECT * FROM c WHERE STARTSWITH(c.name, "test", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -182,7 +187,8 @@ async def test_populate_query_advice_async(self): # QA1004 - CaseInsensitiveEndsWith: case-insensitive ENDSWITH query_iterable = created_collection.query_items( query='SELECT * FROM c WHERE ENDSWITH(c.name, "document", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -191,8 +197,9 @@ async def test_populate_query_advice_async(self): # QA1007 - GetCurrentDateTime: usage of GetCurrentDateTime query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()", + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -201,8 +208,7 @@ async def test_populate_query_advice_async(self): # QA1008 - GetCurrentTicks: usage of GetCurrentTicks query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE c.ticks < GetCurrentTicks()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ticks < GetCurrentTicks()", partition_key="pk", populate_query_advice=True ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -211,8 +217,7 @@ async def test_populate_query_advice_async(self): # QA1009 - GetCurrentTimestamp: usage of GetCurrentTimestamp query_iterable = created_collection.query_items( - query='SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()", partition_key="pk", populate_query_advice=True ) [item async for item in query_iterable] query_advice = created_collection.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -224,24 +229,17 @@ async def test_populate_query_advice_async(self): # TODO: Need to validate the query request count logic @pytest.mark.skip async def test_max_item_count_honored_in_order_by_query_async(self): - created_collection = await self.created_db.create_container(str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_collection = await self.created_db.create_container(str(uuid.uuid4()), PartitionKey(path="/pk")) docs = [] for i in range(10): - document_definition = {'pk': 'pk', 'id': 'myId' + str(uuid.uuid4())} + document_definition = {"pk": "pk", "id": "myId" + str(uuid.uuid4())} docs.append(await created_collection.create_item(body=document_definition)) - query = 'SELECT * from c ORDER BY c._ts' - query_iterable = created_collection.query_items( - query=query, - max_item_count=1 - ) + query = "SELECT * from c ORDER BY c._ts" + query_iterable = created_collection.query_items(query=query, max_item_count=1) await self.validate_query_requests_count(query_iterable, 25) - query_iterable = created_collection.query_items( - query=query, - max_item_count=100 - ) + query_iterable = created_collection.query_items(query=query, max_item_count=100) await self.validate_query_requests_count(query_iterable, 5) @@ -268,38 +266,45 @@ async def _mock_execute_function(self, function, *args, **kwargs): async def test_get_query_plan_through_gateway_async(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - await self._validate_query_plan(query="Select top 10 value count(c.id) from c", - container_link=created_collection.container_link, - top=10, - order_by=[], - aggregate=['Count'], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.NoneType) - - await self._validate_query_plan(query="Select * from c order by c._ts offset 5 limit 10", - container_link=created_collection.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=False, - offset=5, - limit=10, - distinct=_DistinctType.NoneType) - - await self._validate_query_plan(query="Select distinct value c.id from c order by c.id", - container_link=created_collection.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.Ordered) - - async def _validate_query_plan(self, query, container_link, top, order_by, aggregate, select_value, offset, limit, - distinct): + await self._validate_query_plan( + query="Select top 10 value count(c.id) from c", + container_link=created_collection.container_link, + top=10, + order_by=[], + aggregate=["Count"], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.NoneType, + ) + + await self._validate_query_plan( + query="Select * from c order by c._ts offset 5 limit 10", + container_link=created_collection.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=False, + offset=5, + limit=10, + distinct=_DistinctType.NoneType, + ) + + await self._validate_query_plan( + query="Select distinct value c.id from c order by c.id", + container_link=created_collection.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.Ordered, + ) + + async def _validate_query_plan( + self, query, container_link, top, order_by, aggregate, select_value, offset, limit, distinct + ): query_plan_dict = await self.client.client_connection._GetQueryPlanThroughGateway(query, container_link) query_execution_info = _PartitionedQueryExecutionInfo(query_plan_dict) assert query_execution_info.has_rewritten_query() @@ -319,7 +324,7 @@ async def _validate_query_plan(self, query, container_link, top, order_by, aggre async def test_unsupported_queries_async(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - queries = ['SELECT COUNT(1) FROM c', 'SELECT COUNT(1) + 5 FROM c', 'SELECT COUNT(1) + SUM(c) FROM c'] + queries = ["SELECT COUNT(1) FROM c", "SELECT COUNT(1) + 5 FROM c", "SELECT COUNT(1) + SUM(c) FROM c"] for query in queries: query_iterable = created_collection.query_items(query=query) try: @@ -334,106 +339,123 @@ async def test_query_with_non_overlapping_pk_ranges_async(self): assert [item async for item in query_iterable] == [] async def test_offset_limit_async(self): - created_collection = await self.created_db.create_container("offset_limit_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) + created_collection = await self.created_db.create_container( + "offset_limit_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) values = [] for i in range(10): - document_definition = {'pk': i, 'id': 'myId' + str(uuid.uuid4()), 'value': i // 3} + document_definition = {"pk": i, "id": "myId" + str(uuid.uuid4()), "value": i // 3} current_document = await created_collection.create_item(body=document_definition) - values.append(current_document['pk']) + values.append(current_document["pk"]) await self.config._validate_distinct_offset_limit( created_collection=created_collection, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 0 LIMIT 2', - results=[0, 1]) + results=[0, 1], + ) await self.config._validate_distinct_offset_limit( created_collection=created_collection, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 2 LIMIT 2', - results=[2, 3]) + results=[2, 3], + ) await self.config._validate_distinct_offset_limit( created_collection=created_collection, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 4 LIMIT 3', - results=[]) + results=[], + ) - await self.config._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5', - results=values[:5]) + await self.config._validate_offset_limit( + created_collection=created_collection, + query="SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5", + results=values[:5], + ) - await self.config._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10', - results=values[5:]) + await self.config._validate_offset_limit( + created_collection=created_collection, + query="SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10", + results=values[5:], + ) - await self.config._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5', - results=[]) + await self.config._validate_offset_limit( + created_collection=created_collection, query="SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5", results=[] + ) - await self.config._validate_offset_limit(created_collection=created_collection, - query='SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1', - results=[]) + await self.config._validate_offset_limit( + created_collection=created_collection, query="SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1", results=[] + ) await self.created_db.delete_container(created_collection.id) async def test_distinct_async(self): created_database = self.created_db - distinct_field = 'distinct_field' + distinct_field = "distinct_field" pk_field = "pk" different_field = "different_field" created_collection = await created_database.create_container( - id='collection with composite index ' + str(uuid.uuid4()), + id="collection with composite index " + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind="Hash"), indexing_policy={ "compositeIndexes": [ - [{"path": "/" + pk_field, "order": "ascending"}, - {"path": "/" + distinct_field, "order": "ascending"}], - [{"path": "/" + distinct_field, "order": "ascending"}, - {"path": "/" + pk_field, "order": "ascending"}] + [ + {"path": "/" + pk_field, "order": "ascending"}, + {"path": "/" + distinct_field, "order": "ascending"}, + ], + [ + {"path": "/" + distinct_field, "order": "ascending"}, + {"path": "/" + pk_field, "order": "ascending"}, + ], ] - } + }, ) documents = [] for i in range(5): j = i while j > i - 5: - document_definition = {pk_field: i, 'id': str(uuid.uuid4()), distinct_field: j} + document_definition = {pk_field: i, "id": str(uuid.uuid4()), distinct_field: j} documents.append(await created_collection.create_item(body=document_definition)) - document_definition = {pk_field: i, 'id': str(uuid.uuid4()), distinct_field: j} + document_definition = {pk_field: i, "id": str(uuid.uuid4()), distinct_field: j} documents.append(await created_collection.create_item(body=document_definition)) - document_definition = {pk_field: i, 'id': str(uuid.uuid4())} + document_definition = {pk_field: i, "id": str(uuid.uuid4())} documents.append(await created_collection.create_item(body=document_definition)) j -= 1 padded_docs = self.config._pad_with_none(documents, distinct_field) - await self.config._validate_distinct(created_collection=created_collection, # returns {} and is right number - query='SELECT distinct c.%s from c' % distinct_field, # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, None, - False), - is_select=True, - fields=[distinct_field]) - - await self.config._validate_distinct(created_collection=created_collection, - query='SELECT distinct c.%s, c.%s from c' % (distinct_field, pk_field), - # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, - pk_field, False), - is_select=True, - fields=[distinct_field, pk_field]) - - await self.config._validate_distinct(created_collection=created_collection, - query='SELECT distinct value c.%s from c' % distinct_field, # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, None, - True), - is_select=True, - fields=[distinct_field]) - - await self.config._validate_distinct(created_collection=created_collection, - query='SELECT distinct c.%s from c' % different_field, # nosec - results=['None'], - is_select=True, - fields=[different_field]) + await self.config._validate_distinct( + created_collection=created_collection, # returns {} and is right number + query="SELECT distinct c.%s from c" % distinct_field, # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, None, False), + is_select=True, + fields=[distinct_field], + ) + + await self.config._validate_distinct( + created_collection=created_collection, + query="SELECT distinct c.%s, c.%s from c" % (distinct_field, pk_field), + # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, pk_field, False), + is_select=True, + fields=[distinct_field, pk_field], + ) + + await self.config._validate_distinct( + created_collection=created_collection, + query="SELECT distinct value c.%s from c" % distinct_field, # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, None, True), + is_select=True, + fields=[distinct_field], + ) + + await self.config._validate_distinct( + created_collection=created_collection, + query="SELECT distinct c.%s from c" % different_field, # nosec + results=["None"], + is_select=True, + fields=[different_field], + ) await created_database.delete_container(created_collection.id) @@ -441,66 +463,83 @@ async def test_distinct_on_different_types_and_field_orders_async(self): created_collection = await self.created_db.create_container( id="test-distinct-container-" + str(uuid.uuid4()), partition_key=PartitionKey("/pk"), - offer_throughput=self.config.THROUGHPUT_FOR_5_PARTITIONS) + offer_throughput=self.config.THROUGHPUT_FOR_5_PARTITIONS, + ) payloads = [ - {'id': str(uuid.uuid4()), 'f1': 1, 'f2': 'value', 'f3': 100000000000000000, 'f4': [1, 2, '3'], - 'f5': {'f6': {'f7': 2}}}, - {'id': str(uuid.uuid4()), 'f2': '\'value', 'f4': [1.0, 2, '3'], 'f5': {'f6': {'f7': 2.0}}, 'f1': 1.0, - 'f3': 100000000000000000.00}, - {'id': str(uuid.uuid4()), 'f3': 100000000000000000.0, 'f5': {'f6': {'f7': 2}}, 'f2': '\'value', 'f1': 1, - 'f4': [1, 2.0, '3']} + { + "id": str(uuid.uuid4()), + "f1": 1, + "f2": "value", + "f3": 100000000000000000, + "f4": [1, 2, "3"], + "f5": {"f6": {"f7": 2}}, + }, + { + "id": str(uuid.uuid4()), + "f2": "'value", + "f4": [1.0, 2, "3"], + "f5": {"f6": {"f7": 2.0}}, + "f1": 1.0, + "f3": 100000000000000000.00, + }, + { + "id": str(uuid.uuid4()), + "f3": 100000000000000000.0, + "f5": {"f6": {"f7": 2}}, + "f2": "'value", + "f1": 1, + "f4": [1, 2.0, "3"], + }, ] for pay in payloads: await created_collection.create_item(pay) await self.config._validate_distinct_on_different_types_and_field_orders( - collection=created_collection, - query="Select distinct value c.f1 from c", - expected_results=[1] + collection=created_collection, query="Select distinct value c.f1 from c", expected_results=[1] ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f2 from c", - expected_results=['value', '\'value'] + expected_results=["value", "'value"], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f2 from c order by c.f2", - expected_results=['value', '\'value'] + expected_results=["value", "'value"], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct value c.f3 from c", - expected_results=[100000000000000000] + expected_results=[100000000000000000], ) await self.config._validate_distinct_on_different_types_and_field_orders( - collection=created_collection, - query="Select distinct value c.f4 from c", - expected_results=[[1, 2, '3']] + collection=created_collection, query="Select distinct value c.f4 from c", expected_results=[[1, 2, "3"]] ) await self.config._validate_distinct_on_different_types_and_field_orders( - collection=created_collection, - query="Select distinct value c.f5.f6 from c", - expected_results=[{'f7': 2}] + collection=created_collection, query="Select distinct value c.f5.f6 from c", expected_results=[{"f7": 2}] ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct c.f1, c.f2, c.f3 from c", - expected_results=[{'f1': 1, 'f2': 'value', 'f3': 100000000000000000}, - {'f1': 1.0, 'f2': '\'value', 'f3': 100000000000000000.00}] + expected_results=[ + {"f1": 1, "f2": "value", "f3": 100000000000000000}, + {"f1": 1.0, "f2": "'value", "f3": 100000000000000000.00}, + ], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=created_collection, query="Select distinct c.f1, c.f2, c.f3 from c order by c.f1", - expected_results=[{'f1': 1, 'f2': 'value', 'f3': 100000000000000000}, - {'f1': 1.0, 'f2': '\'value', 'f3': 100000000000000000.00}] + expected_results=[ + {"f1": 1, "f2": "value", "f3": 100000000000000000}, + {"f1": 1.0, "f2": "'value", "f3": 100000000000000000.00}, + ], ) await self.created_db.delete_container(created_collection.id) @@ -508,17 +547,13 @@ async def test_distinct_on_different_types_and_field_orders_async(self): async def test_paging_with_continuation_token_async(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'pk': 'pk', 'id': '1'} + document_definition = {"pk": "pk", "id": "1"} await created_collection.upsert_item(body=document_definition) - document_definition = {'pk': 'pk', 'id': '2'} + document_definition = {"pk": "pk", "id": "2"} await created_collection.upsert_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key='pk', - max_item_count=1 - ) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key="pk", max_item_count=1) pager = query_iterable.by_page() await pager.__anext__() token = pager.continuation_token @@ -528,19 +563,17 @@ async def test_paging_with_continuation_token_async(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = [item async for item in await pager.__anext__()][0] - assert second_page['id'] == second_page_fetched_with_continuation_token['id'] + assert second_page["id"] == second_page_fetched_with_continuation_token["id"] async def test_cross_partition_query_with_continuation_token_async(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'pk': 'pk1', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk1", "id": str(uuid.uuid4())} await created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk2', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk2", "id": str(uuid.uuid4())} await created_collection.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - max_item_count=1) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, max_item_count=1) pager = query_iterable.by_page() await pager.__anext__() token = pager.continuation_token @@ -549,32 +582,32 @@ async def test_cross_partition_query_with_continuation_token_async(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = [item async for item in await pager.__anext__()][0] - assert second_page['id'] == second_page_fetched_with_continuation_token['id'] + assert second_page["id"] == second_page_fetched_with_continuation_token["id"] async def test_cross_partition_query_with_none_partition_key_async(self): created_collection = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) - document_definition = {'pk': 'pk1', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk1", "id": str(uuid.uuid4())} await created_collection.create_item(body=document_definition) - document_definition = {'pk': 'pk2' , 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk2", "id": str(uuid.uuid4())} await created_collection.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = created_collection.query_items( - query=query, - partition_key=None) + query = "SELECT * from c" + query_iterable = created_collection.query_items(query=query, partition_key=None) assert len([item async for item in query_iterable]) >= 2 async def test_value_max_query_results_async(self): container = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) await container.create_item( - {"id": str(uuid.uuid4()), "isComplete": True, "version": 3, "lookupVersion": "console_version"}) + {"id": str(uuid.uuid4()), "isComplete": True, "version": 3, "lookupVersion": "console_version"} + ) await container.create_item( - {"id": str(uuid.uuid4()), "isComplete": True, "version": 2, "lookupVersion": "console_version"}) + {"id": str(uuid.uuid4()), "isComplete": True, "version": 2, "lookupVersion": "console_version"} + ) query = "Select value max(c.version) FROM c where c.isComplete = true and c.lookupVersion = @lookupVersion" - query_results = container.query_items(query, parameters=[ - {"name": "@lookupVersion", "value": "console_version"} - ]) + query_results = container.query_items( + query, parameters=[{"name": "@lookupVersion", "value": "console_version"}] + ) item_list = [item async for item in query_results] assert len(item_list) == 1 assert item_list[0] == 3 @@ -582,20 +615,21 @@ async def test_value_max_query_results_async(self): async def test_continuation_token_size_limit_query_async(self): container = self.created_db.get_container_client(self.config.TEST_MULTI_PARTITION_CONTAINER_ID) for i in range(1, 1000): - await container.create_item(body=dict(pk='123', id=str(uuid.uuid4()), some_value=str(i % 3))) + await container.create_item(body=dict(pk="123", id=str(uuid.uuid4()), some_value=str(i % 3))) query = "Select * from c where c.some_value='2'" - response_query = container.query_items(query, partition_key='123', max_item_count=100, - continuation_token_limit=1) + response_query = container.query_items( + query, partition_key="123", max_item_count=100, continuation_token_limit=1 + ) pager = response_query.by_page() await pager.__anext__() token = pager.continuation_token # Continuation token size should be below 1kb - assert len(token.encode('utf-8')) <= 1024 + assert len(token.encode("utf-8")) <= 1024 await pager.__anext__() token = pager.continuation_token # verify a second time - assert len(token.encode('utf-8')) <= 1024 + assert len(token.encode("utf-8")) <= 1024 async def test_cosmos_query_retryable_error_async(self): async def query_items(database): @@ -616,18 +650,19 @@ async def query_items(database): # A retryable exception should be surfaced when retries run out assert ex.status_code == 429 - created_collection = await self.created_db.create_container_if_not_exists("query_retryable_error_test", - PartitionKey(path="/pk")) + created_collection = await self.created_db.create_container_if_not_exists( + "query_retryable_error_test", PartitionKey(path="/pk") + ) # Created items to query for _ in range(150): # Generate a Random partition key - partition_key = 'pk' + str(uuid.uuid4()) + partition_key = "pk" + str(uuid.uuid4()) # Generate a random item item = { - 'id': 'item' + str(uuid.uuid4()), - 'partitionKey': partition_key, - 'content': 'This is some random content', + "id": "item" + str(uuid.uuid4()), + "partitionKey": partition_key, + "content": "This is some random content", } try: @@ -636,12 +671,14 @@ async def query_items(database): except exceptions.CosmosHttpResponseError as e: pytest.fail(e) # Set retry options to fail much more easily to avoid too much concurrency - retry_options = RetryOptions(max_retry_attempt_count=1, - fixed_retry_interval_in_milliseconds=1, max_wait_time_in_seconds=1) + retry_options = RetryOptions( + max_retry_attempt_count=1, fixed_retry_interval_in_milliseconds=1, max_wait_time_in_seconds=1 + ) old_retry = self.client.client_connection.connection_policy.RetryOptions self.client.client_connection.connection_policy.RetryOptions = retry_options - created_collection = await self.created_db.create_container_if_not_exists("query_retryable_error_test", - PartitionKey(path="/pk")) + created_collection = await self.created_db.create_container_if_not_exists( + "query_retryable_error_test", PartitionKey(path="/pk") + ) # Force a 429 exception by having multiple concurrent queries. num_queries = 4 await gather(*[query_items(self.created_db) for _ in range(num_queries)]) @@ -651,13 +688,12 @@ async def query_items(database): async def test_query_request_params_none_retry_policy_async(self): created_collection = await self.created_db.create_container_if_not_exists( - id="query_request_params_none_retry_policy_" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="query_request_params_none_retry_policy_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) items = [ - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': 'test', 'val': 5} + {"id": str(uuid.uuid4()), "pk": "test", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "test", "val": 5}, ] for item in items: @@ -710,23 +746,27 @@ async def test_query_request_params_none_retry_policy_async(self): async def test_partitioned_query_response_hook_async(self): created_collection = await self.created_db.create_container_if_not_exists( - id="query_response_hook_test" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="query_response_hook_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) items = [ - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10}, - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10}, - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10} + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, ] for item in items: await created_collection.create_item(body=item) response_hook = test_config.ResponseHookCaller() - item_list = [item async for item in created_collection.query_items("select * from c", partition_key="0", response_hook=response_hook)] + item_list = [ + item + async for item in created_collection.query_items( + "select * from c", partition_key="0", response_hook=response_hook + ) + ] assert len(item_list) == 3 assert response_hook.count == 1 await self.created_db.delete_container(created_collection.id) @@ -734,20 +774,16 @@ async def test_partitioned_query_response_hook_async(self): async def test_query_pagination_with_max_item_count_async(self): """Test pagination showing per-page limits and total results counting.""" created_collection = await self.created_db.create_container( - "pagination_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - + "pagination_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create 20 items in a single partition total_items = 20 partition_key_value = "test_pk" for i in range(total_items): - document_definition = { - 'pk': partition_key_value, - 'id': f'item_{i}', - 'value': i - } + document_definition = {"pk": partition_key_value, "id": f"item_{i}", "value": i} await created_collection.create_item(body=document_definition) - + # Test pagination with max_item_count limiting items per page max_items_per_page = 7 query = "SELECT * FROM c WHERE c.pk = @pk ORDER BY c['value']" @@ -755,137 +791,125 @@ async def test_query_pagination_with_max_item_count_async(self): query=query, parameters=[{"name": "@pk", "value": partition_key_value}], partition_key=partition_key_value, - max_item_count=max_items_per_page + max_item_count=max_items_per_page, ) - + # Iterate through pages and verify per-page counts all_fetched_results = [] page_count = 0 item_pages = query_iterable.by_page() - + async for page in item_pages: page_count += 1 items_in_page = [item async for item in page] all_fetched_results.extend(items_in_page) - + # Each page should have at most max_item_count items # (last page may have fewer) assert len(items_in_page) <= max_items_per_page - + # Verify total results match expected count assert len(all_fetched_results) == total_items - + # Verify we got the expected number of pages # 20 items with max 7 per page = 3 pages (7, 7, 6) assert page_count == 3 - + # Verify ordering is maintained for i, item in enumerate(all_fetched_results): - assert item['value'] == i - + assert item["value"] == i + await self.created_db.delete_container(created_collection.id) - + async def test_query_pagination_without_max_item_count_async(self): """Test pagination behavior without specifying max_item_count.""" created_collection = await self.created_db.create_container( - "pagination_no_max_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk")) - + "pagination_no_max_test_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create 15 items in a single partition total_items = 15 partition_key_value = "test_pk_2" for i in range(total_items): - document_definition = { - 'pk': partition_key_value, - 'id': f'item_{i}', - 'value': i - } + document_definition = {"pk": partition_key_value, "id": f"item_{i}", "value": i} await created_collection.create_item(body=document_definition) - + # Query without specifying max_item_count query = "SELECT * FROM c WHERE c.pk = @pk" query_iterable = created_collection.query_items( - query=query, - parameters=[{"name": "@pk", "value": partition_key_value}], - partition_key=partition_key_value + query=query, parameters=[{"name": "@pk", "value": partition_key_value}], partition_key=partition_key_value ) - + # Count total results all_results = [item async for item in query_iterable] assert len(all_results) == total_items - + await self.created_db.delete_container(created_collection.id) async def _MockExecuteFunctionSessionRetry(self, function, *args, **kwargs): if args: - if args[1].operation_type == 'SqlQuery': - ex_to_raise = exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.NOT_FOUND, - message="Read Session is Not Available") + if args[1].operation_type == "SqlQuery": + ex_to_raise = exceptions.CosmosHttpResponseError( + status_code=http_constants.StatusCodes.NOT_FOUND, message="Read Session is Not Available" + ) ex_to_raise.sub_status = http_constants.SubStatusCodes.READ_SESSION_NOTAVAILABLE raise ex_to_raise return await self.OriginalExecuteFunction(function, *args, **kwargs) async def _MockExecuteFunctionEndPointRetry(self, function, *args, **kwargs): if args: - if args[1].operation_type == 'SqlQuery': - ex_to_raise = exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.FORBIDDEN, - message="End Point Discovery") + if args[1].operation_type == "SqlQuery": + ex_to_raise = exceptions.CosmosHttpResponseError( + status_code=http_constants.StatusCodes.FORBIDDEN, message="End Point Discovery" + ) ex_to_raise.sub_status = http_constants.SubStatusCodes.WRITE_FORBIDDEN raise ex_to_raise return await self.OriginalExecuteFunction(function, *args, **kwargs) async def _MockExecuteFunctionTimeoutFailoverRetry(self, function, *args, **kwargs): if args: - if args[1].operation_type == 'SqlQuery': - ex_to_raise = exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.REQUEST_TIMEOUT, - message="Timeout Failover") + if args[1].operation_type == "SqlQuery": + ex_to_raise = exceptions.CosmosHttpResponseError( + status_code=http_constants.StatusCodes.REQUEST_TIMEOUT, message="Timeout Failover" + ) raise ex_to_raise return await self.OriginalExecuteFunction(function, *args, **kwargs) async def test_query_items_with_parameters_none_async(self): """Test that query_items handles parameters=None correctly (issue #43662).""" created_collection = await self.created_db.create_container( - "test_params_none_" + str(uuid.uuid4()), PartitionKey(path="/pk")) - + "test_params_none_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create test documents - doc1_id = 'doc1_' + str(uuid.uuid4()) - doc2_id = 'doc2_' + str(uuid.uuid4()) - await created_collection.create_item(body={'pk': 'pk1', 'id': doc1_id, 'value1': 1}) - await created_collection.create_item(body={'pk': 'pk2', 'id': doc2_id, 'value1': 2}) + doc1_id = "doc1_" + str(uuid.uuid4()) + doc2_id = "doc2_" + str(uuid.uuid4()) + await created_collection.create_item(body={"pk": "pk1", "id": doc1_id, "value1": 1}) + await created_collection.create_item(body={"pk": "pk2", "id": doc2_id, "value1": 2}) # Test 1: Explicitly passing parameters=None should not cause TypeError - query = 'SELECT * FROM c' - query_iterable = created_collection.query_items( - query=query, - parameters=None - ) + query = "SELECT * FROM c" + query_iterable = created_collection.query_items(query=query, parameters=None) results = [item async for item in query_iterable] assert len(results) == 2 # Test 2: parameters=None with partition_key should work - query_iterable = created_collection.query_items( - query=query, - parameters=None, - partition_key='pk1' - ) + query_iterable = created_collection.query_items(query=query, parameters=None, partition_key="pk1") results = [item async for item in query_iterable] assert len(results) == 1 - assert results[0]['id'] == doc1_id + assert results[0]["id"] == doc1_id # Test 3: Verify parameterized query still works with actual parameters - query_with_params = 'SELECT * FROM c WHERE c.value1 = @value' + query_with_params = "SELECT * FROM c WHERE c.value1 = @value" query_iterable = created_collection.query_items( - query=query_with_params, - parameters=[{'name': '@value', 'value': 2}] + query=query_with_params, parameters=[{"name": "@value", "value": 2}] ) results = [item async for item in query_iterable] assert len(results) == 1 - assert results[0]['id'] == doc2_id + assert results[0]["id"] == doc2_id # Test 4: Query without parameters argument should work (default behavior) - query_iterable = created_collection.query_items( - query=query - ) + query_iterable = created_collection.query_items(query=query) results = [item async for item in query_iterable] assert len(results) == 2 @@ -894,22 +918,20 @@ async def test_query_items_with_parameters_none_async(self): async def test_query_items_parameters_none_with_options_async(self): """Test parameters=None works with various query options.""" created_collection = await self.created_db.create_container( - "test_params_none_opts_" + str(uuid.uuid4()), PartitionKey(path="/pk")) - + "test_params_none_opts_" + str(uuid.uuid4()), PartitionKey(path="/pk") + ) + # Create multiple test documents for i in range(5): - doc_id = f'doc_{i}_' + str(uuid.uuid4()) - await created_collection.create_item(body={'pk': 'test', 'id': doc_id, 'index': i}) + doc_id = f"doc_{i}_" + str(uuid.uuid4()) + await created_collection.create_item(body={"pk": "test", "id": doc_id, "index": i}) # Test with parameters=None and max_item_count - query = 'SELECT * FROM c ORDER BY c.index' + query = "SELECT * FROM c ORDER BY c.index" query_iterable = created_collection.query_items( - query=query, - parameters=None, - partition_key='test', - max_item_count=2 + query=query, parameters=None, partition_key="test", max_item_count=2 ) - + # Verify pagination works page_count = 0 total_items = 0 @@ -918,26 +940,23 @@ async def test_query_items_parameters_none_with_options_async(self): items = [item async for item in page] total_items += len(items) assert len(items) <= 2 - + assert total_items == 5 assert page_count >= 2 # Should have multiple pages # Test with parameters=None and populate_query_metrics query_iterable = created_collection.query_items( - query=query, - parameters=None, - partition_key='test', - populate_query_metrics=True + query=query, parameters=None, partition_key="test", populate_query_metrics=True ) results = [item async for item in query_iterable] assert len(results) == 5 - + # Verify query metrics were populated - metrics_header_name = 'x-ms-documentdb-query-metrics' + metrics_header_name = "x-ms-documentdb-query-metrics" assert metrics_header_name in created_collection.client_connection.last_response_headers await self.created_db.delete_container(created_collection.id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition.py b/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition.py index 6db8d5c2f3d2..40114a1b12e7 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition.py @@ -16,6 +16,7 @@ from azure.cosmos.documents import _DistinctType from azure.cosmos.partition_key import PartitionKey + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosQuery class TestCrossPartitionQuery(unittest.TestCase): @@ -32,24 +33,27 @@ class TestCrossPartitionQuery(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) use_multiple_write_locations = False if os.environ.get("AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER", "False") == "True": use_multiple_write_locations = True - cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey, multiple_write_locations=use_multiple_write_locations) + cls.client = cosmos_client.CosmosClient( + cls.host, cls.masterKey, multiple_write_locations=use_multiple_write_locations + ) cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID) def setUp(self): self.created_container = self.created_db.create_container( id=self.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), - offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS) + offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS, + ) def tearDown(self): try: @@ -58,17 +62,14 @@ def tearDown(self): pass def test_first_and_last_slashes_trimmed_for_query_string(self): - doc_id = 'myId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "myId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = self.created_container.query_items( - query=query, - partition_key='pk' - ) + query = "SELECT * from c" + query_iterable = self.created_container.query_items(query=query, partition_key="pk") iter_list = list(query_iterable) - self.assertEqual(iter_list[0]['id'], doc_id) + self.assertEqual(iter_list[0]["id"], doc_id) def test_query_change_feed_with_pk(self): # The test targets partition #3 @@ -83,62 +84,56 @@ def test_query_change_feed_with_pk(self): query_iterable = self.created_container.query_items_change_feed(partition_key=partition_key) iter_list = list(query_iterable) self.assertEqual(len(iter_list), 0) - self.assertTrue('etag' in self.created_container.client_connection.last_response_headers) - self.assertNotEqual(self.created_container.client_connection.last_response_headers['etag'], '') + self.assertTrue("etag" in self.created_container.client_connection.last_response_headers) + self.assertNotEqual(self.created_container.client_connection.last_response_headers["etag"], "") # Read change feed from beginning should return an empty list query_iterable = self.created_container.query_items_change_feed( - is_start_from_beginning=True, - partition_key=partition_key + is_start_from_beginning=True, partition_key=partition_key ) iter_list = list(query_iterable) self.assertEqual(len(iter_list), 0) - self.assertTrue('etag' in self.created_container.client_connection.last_response_headers) - continuation1 = self.created_container.client_connection.last_response_headers['etag'] - self.assertNotEqual(continuation1, '') + self.assertTrue("etag" in self.created_container.client_connection.last_response_headers) + continuation1 = self.created_container.client_connection.last_response_headers["etag"] + self.assertNotEqual(continuation1, "") # Create a document. Read change feed should return be able to read that document - document_definition = {'pk': 'pk', 'id': 'doc1'} + document_definition = {"pk": "pk", "id": "doc1"} self.created_container.create_item(body=document_definition) query_iterable = self.created_container.query_items_change_feed( - is_start_from_beginning=True, - partition_key=partition_key + is_start_from_beginning=True, partition_key=partition_key ) iter_list = list(query_iterable) self.assertEqual(len(iter_list), 1) - self.assertEqual(iter_list[0]['id'], 'doc1') - self.assertTrue('etag' in self.created_container.client_connection.last_response_headers) - continuation2 = self.created_container.client_connection.last_response_headers['etag'] - self.assertNotEqual(continuation2, '') + self.assertEqual(iter_list[0]["id"], "doc1") + self.assertTrue("etag" in self.created_container.client_connection.last_response_headers) + continuation2 = self.created_container.client_connection.last_response_headers["etag"] + self.assertNotEqual(continuation2, "") self.assertNotEqual(continuation2, continuation1) # Create two new documents. Verify that change feed contains the 2 new documents # with page size 1 and page size 100 - document_definition = {'pk': 'pk', 'id': 'doc2'} + document_definition = {"pk": "pk", "id": "doc2"} self.created_container.create_item(body=document_definition) - document_definition = {'pk': 'pk', 'id': 'doc3'} + document_definition = {"pk": "pk", "id": "doc3"} self.created_container.create_item(body=document_definition) for pageSize in [1, 100]: # verify iterator query_iterable = self.created_container.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - partition_key=partition_key + continuation=continuation2, max_item_count=pageSize, partition_key=partition_key ) it = query_iterable.__iter__() - expected_ids = 'doc2.doc3.' - actual_ids = '' + expected_ids = "doc2.doc3." + actual_ids = "" for item in it: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." self.assertEqual(actual_ids, expected_ids) # verify by_page # the options is not copied, therefore it need to be restored query_iterable = self.created_container.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - partition_key=partition_key + continuation=continuation2, max_item_count=pageSize, partition_key=partition_key ) count = 0 expected_count = 2 @@ -149,89 +144,95 @@ def test_query_change_feed_with_pk(self): count += len(fetched_res) all_fetched_res.extend(fetched_res) - actual_ids = '' + actual_ids = "" for item in all_fetched_res: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." self.assertEqual(actual_ids, expected_ids) # verify reading change feed from the beginning query_iterable = self.created_container.query_items_change_feed( - is_start_from_beginning=True, - partition_key=partition_key + is_start_from_beginning=True, partition_key=partition_key ) - expected_ids = ['doc1', 'doc2', 'doc3'] + expected_ids = ["doc1", "doc2", "doc3"] it = query_iterable.__iter__() for i in range(0, len(expected_ids)): doc = next(it) - self.assertEqual(doc['id'], expected_ids[i]) - self.assertTrue('etag' in self.created_container.client_connection.last_response_headers) - continuation3 = self.created_container.client_connection.last_response_headers['etag'] + self.assertEqual(doc["id"], expected_ids[i]) + self.assertTrue("etag" in self.created_container.client_connection.last_response_headers) + continuation3 = self.created_container.client_connection.last_response_headers["etag"] # verify reading empty change feed query_iterable = self.created_container.query_items_change_feed( - continuation=continuation3, - is_start_from_beginning=True, - partition_key=partition_key + continuation=continuation3, is_start_from_beginning=True, partition_key=partition_key ) iter_list = list(query_iterable) self.assertEqual(len(iter_list), 0) def test_populate_query_metrics(self): - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" query_iterable = self.created_container.query_items( - query=query, - partition_key='pk', - populate_query_metrics=True + query=query, partition_key="pk", populate_query_metrics=True ) iter_list = list(query_iterable) - self.assertEqual(iter_list[0]['id'], doc_id) + self.assertEqual(iter_list[0]["id"], doc_id) - metrics_header_name = 'x-ms-documentdb-query-metrics' + metrics_header_name = "x-ms-documentdb-query-metrics" self.assertTrue(metrics_header_name in self.created_container.client_connection.last_response_headers) metrics_header = self.created_container.client_connection.last_response_headers[metrics_header_name] # Validate header is well-formed: "key1=value1;key2=value2;etc" - metrics = metrics_header.split(';') + metrics = metrics_header.split(";") self.assertTrue(len(metrics) > 1) - self.assertTrue(all(['=' in x for x in metrics])) + self.assertTrue(all(["=" in x for x in metrics])) def test_populate_index_metrics(self): - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" query_iterable = self.created_container.query_items( - query=query, - partition_key='pk', - populate_index_metrics=True + query=query, partition_key="pk", populate_index_metrics=True ) iter_list = list(query_iterable) - self.assertEqual(iter_list[0]['id'], doc_id) + self.assertEqual(iter_list[0]["id"], doc_id) INDEX_HEADER_NAME = http_constants.HttpHeaders.IndexUtilization self.assertTrue(INDEX_HEADER_NAME in self.created_container.client_connection.last_response_headers) index_metrics = self.created_container.client_connection.last_response_headers[INDEX_HEADER_NAME] self.assertIsNotNone(index_metrics) - expected_index_metrics = {'UtilizedSingleIndexes': [{'FilterExpression': '', 'IndexSpec': '/pk/?', - 'FilterPreciseSet': True, 'IndexPreciseSet': True, - 'IndexImpactScore': 'High'}], - 'PotentialSingleIndexes': [], 'UtilizedCompositeIndexes': [], - 'PotentialCompositeIndexes': []} + expected_index_metrics = { + "UtilizedSingleIndexes": [ + { + "FilterExpression": "", + "IndexSpec": "/pk/?", + "FilterPreciseSet": True, + "IndexPreciseSet": True, + "IndexImpactScore": "High", + } + ], + "PotentialSingleIndexes": [], + "UtilizedCompositeIndexes": [], + "PotentialCompositeIndexes": [], + } self.assertDictEqual(expected_index_metrics, index_metrics) @pytest.mark.skip(reason="Emulator does not support query advisor yet") def test_populate_query_advice(self): - doc_id = 'MyId' + str(uuid.uuid4()) + doc_id = "MyId" + str(uuid.uuid4()) document_definition = { - 'pk': 'pk', 'id': doc_id, 'name': 'test document', - 'tags': [{'name': 'python'}, {'name': 'cosmos'}], - 'timestamp': '2099-01-01T00:00:00Z', 'ticks': 0, 'ts': 0 + "pk": "pk", + "id": doc_id, + "name": "test document", + "tags": [{"name": "python"}, {"name": "cosmos"}], + "timestamp": "2099-01-01T00:00:00Z", + "ticks": 0, + "ts": 0, } self.created_container.create_item(body=document_definition) @@ -240,7 +241,8 @@ def test_populate_query_advice(self): # QA1000 - PartialArrayContains: ARRAY_CONTAINS with partial match query_iterable = self.created_container.query_items( query='SELECT * FROM c WHERE ARRAY_CONTAINS(c.tags, {"name": "python"}, true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -249,8 +251,7 @@ def test_populate_query_advice(self): # QA1002 - Contains: CONTAINS usage query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', - partition_key='pk', populate_query_advice=True + query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', partition_key="pk", populate_query_advice=True ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -260,7 +261,8 @@ def test_populate_query_advice(self): # QA1003 - CaseInsensitiveStartsWithOrStringEquals: case-insensitive STARTSWITH query_iterable = self.created_container.query_items( query='SELECT * FROM c WHERE STARTSWITH(c.name, "test", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -270,7 +272,8 @@ def test_populate_query_advice(self): # QA1004 - CaseInsensitiveEndsWith: case-insensitive ENDSWITH query_iterable = self.created_container.query_items( query='SELECT * FROM c WHERE ENDSWITH(c.name, "document", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -279,8 +282,9 @@ def test_populate_query_advice(self): # QA1007 - GetCurrentDateTime: usage of GetCurrentDateTime query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()", + partition_key="pk", + populate_query_advice=True, ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -289,8 +293,7 @@ def test_populate_query_advice(self): # QA1008 - GetCurrentTicks: usage of GetCurrentTicks query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE c.ticks < GetCurrentTicks()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ticks < GetCurrentTicks()", partition_key="pk", populate_query_advice=True ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -299,8 +302,7 @@ def test_populate_query_advice(self): # QA1009 - GetCurrentTimestamp: usage of GetCurrentTimestamp query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()", partition_key="pk", populate_query_advice=True ) list(query_iterable) query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -308,38 +310,45 @@ def test_populate_query_advice(self): self.assertIn("QA1009", query_advice) def test_get_query_plan_through_gateway(self): - self._validate_query_plan(query="Select top 10 value count(c.id) from c", - container_link=self.created_container.container_link, - top=10, - order_by=[], - aggregate=['Count'], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.NoneType) - - self._validate_query_plan(query="Select * from c order by c._ts offset 5 limit 10", - container_link=self.created_container.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=False, - offset=5, - limit=10, - distinct=_DistinctType.NoneType) - - self._validate_query_plan(query="Select distinct value c.id from c order by c.id", - container_link=self.created_container.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.Ordered) - - def _validate_query_plan(self, query, container_link, top, order_by, aggregate, select_value, offset, limit, - distinct): + self._validate_query_plan( + query="Select top 10 value count(c.id) from c", + container_link=self.created_container.container_link, + top=10, + order_by=[], + aggregate=["Count"], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.NoneType, + ) + + self._validate_query_plan( + query="Select * from c order by c._ts offset 5 limit 10", + container_link=self.created_container.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=False, + offset=5, + limit=10, + distinct=_DistinctType.NoneType, + ) + + self._validate_query_plan( + query="Select distinct value c.id from c order by c.id", + container_link=self.created_container.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.Ordered, + ) + + def _validate_query_plan( + self, query, container_link, top, order_by, aggregate, select_value, offset, limit, distinct + ): query_plan_dict = self.client.client_connection._GetQueryPlanThroughGateway(query, container_link) query_execution_info = _PartitionedQueryExecutionInfo(query_plan_dict) self.assertTrue(query_execution_info.has_rewritten_query()) @@ -358,7 +367,7 @@ def _validate_query_plan(self, query, container_link, top, order_by, aggregate, self.assertEqual(query_execution_info.get_limit(), limit) def test_unsupported_queries(self): - queries = ['SELECT COUNT(1) FROM c', 'SELECT COUNT(1) + 5 FROM c', 'SELECT COUNT(1) + SUM(c) FROM c'] + queries = ["SELECT COUNT(1) FROM c", "SELECT COUNT(1) + 5 FROM c", "SELECT COUNT(1) + SUM(c) FROM c"] for query in queries: query_iterable = self.created_container.query_items(query=query, enable_cross_partition_query=True) try: @@ -368,52 +377,64 @@ def test_unsupported_queries(self): self.assertEqual(e.status_code, 400) def test_query_with_non_overlapping_pk_ranges(self): - query_iterable = self.created_container.query_items("select * from c where c.pk='1' or c.pk='2'", - enable_cross_partition_query=True) + query_iterable = self.created_container.query_items( + "select * from c where c.pk='1' or c.pk='2'", enable_cross_partition_query=True + ) self.assertListEqual(list(query_iterable), []) def test_offset_limit(self): values = [] for i in range(10): - document_definition = {'pk': i, 'id': 'myId' + str(uuid.uuid4()), 'value': i // 3} - values.append(self.created_container.create_item(body=document_definition)['pk']) + document_definition = {"pk": i, "id": "myId" + str(uuid.uuid4()), "value": i // 3} + values.append(self.created_container.create_item(body=document_definition)["pk"]) self.config._validate_distinct_offset_limit( created_collection=self.created_container, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 0 LIMIT 2', - results=[0, 1]) + results=[0, 1], + ) self.config._validate_distinct_offset_limit( created_collection=self.created_container, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 2 LIMIT 2', - results=[2, 3]) + results=[2, 3], + ) self.config._validate_distinct_offset_limit( created_collection=self.created_container, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 4 LIMIT 3', - results=[]) + results=[], + ) - self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5', - results=values[:5]) + self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5", + results=values[:5], + ) - self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10', - results=values[5:]) + self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10", + results=values[5:], + ) - self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5', - results=[]) + self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5", + results=[], + ) - self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1', - results=[]) + self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1", + results=[], + ) def test_distinct_on_different_types_and_field_orders(self): self.payloads = [ - {'f1': 1, 'f2': 'value', 'f3': 100000000000000000, 'f4': [1, 2, '3'], 'f5': {'f6': {'f7': 2}}}, - {'f2': '\'value', 'f4': [1.0, 2, '3'], 'f5': {'f6': {'f7': 2.0}}, 'f1': 1.0, 'f3': 100000000000000000.00}, - {'f3': 100000000000000000.0, 'f5': {'f6': {'f7': 2}}, 'f2': '\'value', 'f1': 1, 'f4': [1, 2.0, '3']} + {"f1": 1, "f2": "value", "f3": 100000000000000000, "f4": [1, 2, "3"], "f5": {"f6": {"f7": 2}}}, + {"f2": "'value", "f4": [1.0, 2, "3"], "f5": {"f6": {"f7": 2.0}}, "f1": 1.0, "f3": 100000000000000000.00}, + {"f3": 100000000000000000.0, "f5": {"f6": {"f7": 2}}, "f2": "'value", "f1": 1, "f4": [1, 2.0, "3"]}, ] self.OriginalExecuteFunction = _QueryExecutionContextBase.__next__ _QueryExecutionContextBase.__next__ = self._MockNextFunction @@ -422,73 +443,69 @@ def test_distinct_on_different_types_and_field_orders(self): collection=self.created_container, query="Select distinct value c.f1 from c", expected_results=[1], - get_mock_result=lambda x, i: (None, x[i]["f1"]) + get_mock_result=lambda x, i: (None, x[i]["f1"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f2 from c", - expected_results=['value', '\'value'], - get_mock_result=lambda x, i: (None, x[i]["f2"]) + expected_results=["value", "'value"], + get_mock_result=lambda x, i: (None, x[i]["f2"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f2 from c order by c.f2", - expected_results=['\'value', 'value'], - get_mock_result=lambda x, i: (x[i]["f2"], x[i]["f2"]) + expected_results=["'value", "value"], + get_mock_result=lambda x, i: (x[i]["f2"], x[i]["f2"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f3 from c", expected_results=[100000000000000000], - get_mock_result=lambda x, i: (None, x[i]["f3"]) + get_mock_result=lambda x, i: (None, x[i]["f3"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f4 from c", - expected_results=[[1, 2, '3']], - get_mock_result=lambda x, i: (None, x[i]["f4"]) + expected_results=[[1, 2, "3"]], + get_mock_result=lambda x, i: (None, x[i]["f4"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f5.f6 from c", - expected_results=[{'f7': 2}], - get_mock_result=lambda x, i: (None, x[i]["f5"]["f6"]) + expected_results=[{"f7": 2}], + get_mock_result=lambda x, i: (None, x[i]["f5"]["f6"]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct c.f1, c.f2, c.f3 from c", expected_results=[self.payloads[0], self.payloads[1]], - get_mock_result=lambda x, i: (None, x[i]) + get_mock_result=lambda x, i: (None, x[i]), ) self._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct c.f1, c.f2, c.f3 from c order by c.f1", expected_results=[self.payloads[0], self.payloads[1]], - get_mock_result=lambda x, i: (i, x[i]) + get_mock_result=lambda x, i: (i, x[i]), ) _QueryExecutionContextBase.__next__ = self.OriginalExecuteFunction _QueryExecutionContextBase.next = self.OriginalExecuteFunction def test_paging_with_continuation_token(self): - document_definition = {'pk': 'pk', 'id': '1'} + document_definition = {"pk": "pk", "id": "1"} self.created_container.create_item(body=document_definition) - document_definition = {'pk': 'pk', 'id': '2'} + document_definition = {"pk": "pk", "id": "2"} self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = self.created_container.query_items( - query=query, - partition_key='pk', - max_item_count=1 - ) + query = "SELECT * from c" + query_iterable = self.created_container.query_items(query=query, partition_key="pk", max_item_count=1) pager = query_iterable.by_page() pager.next() token = pager.continuation_token @@ -497,15 +514,15 @@ def test_paging_with_continuation_token(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = list(pager.next())[0] - self.assertEqual(second_page['id'], second_page_fetched_with_continuation_token['id']) + self.assertEqual(second_page["id"], second_page_fetched_with_continuation_token["id"]) def test_cross_partition_query_with_continuation_token(self): - document_definition = {'pk': 'pk1', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk1", "id": str(uuid.uuid4())} self.created_container.create_item(body=document_definition) - document_definition = {'pk': 'pk2', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk2", "id": str(uuid.uuid4())} self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" query_iterable = self.created_container.query_items( query=query, enable_cross_partition_query=True, @@ -519,10 +536,11 @@ def test_cross_partition_query_with_continuation_token(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = list(pager.next())[0] - self.assertEqual(second_page['id'], second_page_fetched_with_continuation_token['id']) + self.assertEqual(second_page["id"], second_page_fetched_with_continuation_token["id"]) - def _validate_distinct_on_different_types_and_field_orders(self, collection, query, expected_results, - get_mock_result): + def _validate_distinct_on_different_types_and_field_orders( + self, collection, query, expected_results, get_mock_result + ): self.count = 0 self.get_mock_result = get_mock_result query_iterable = collection.query_items(query, enable_cross_partition_query=True) @@ -538,49 +556,57 @@ def _validate_distinct_on_different_types_and_field_orders(self, collection, que def test_value_max_query(self): query = "Select value max(c.version) FROM c where c.isComplete = true and c.lookupVersion = @lookupVersion" - query_results = self.created_container.query_items(query, parameters=[ - {"name": "@lookupVersion", "value": "console_csat"} # cspell:disable-line - ], enable_cross_partition_query=True) + query_results = self.created_container.query_items( + query, + parameters=[{"name": "@lookupVersion", "value": "console_csat"}], # cspell:disable-line + enable_cross_partition_query=True, + ) self.assertListEqual(list(query_results), [None]) def test_continuation_token_size_limit_query(self): for i in range(1, 1000): - self.created_container.create_item(body=dict(pk='123', id=str(i), some_value=str(i % 3))) + self.created_container.create_item(body=dict(pk="123", id=str(i), some_value=str(i % 3))) query = "Select * from c where c.some_value='2'" - response_query = self.created_container.query_items(query, partition_key='123', max_item_count=100, - continuation_token_limit=1) + response_query = self.created_container.query_items( + query, partition_key="123", max_item_count=100, continuation_token_limit=1 + ) pager = response_query.by_page() pager.next() token = pager.continuation_token # Continuation token size should be below 1kb - self.assertLessEqual(len(token.encode('utf-8')), 1024) + self.assertLessEqual(len(token.encode("utf-8")), 1024) pager.next() token = pager.continuation_token # verify a second time - self.assertLessEqual(len(token.encode('utf-8')), 1024) + self.assertLessEqual(len(token.encode("utf-8")), 1024) def test_cross_partition_query_response_hook(self): created_collection = self.created_db.create_container_if_not_exists( id="query_response_hook_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=12000 + offer_throughput=12000, ) items = [ - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10}, - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10}, - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10} + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, ] for item in items: created_collection.create_item(body=item) response_hook = test_config.ResponseHookCaller() - item_list = [item for item in created_collection.query_items("select * from c", enable_cross_partition_query=True, response_hook=response_hook)] + item_list = [ + item + for item in created_collection.query_items( + "select * from c", enable_cross_partition_query=True, response_hook=response_hook + ) + ] assert len(item_list) == 6 assert response_hook.count == 2 self.created_db.delete_container(created_collection.id) @@ -590,94 +616,79 @@ def test_cross_partition_query_pagination_with_max_item_count(self): created_collection = self.created_db.create_container( "cross_partition_pagination_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS) - + offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS, + ) + # Create 30 items across 3 different partitions total_items = 30 items_per_partition = 10 partitions = ["pk_1", "pk_2", "pk_3"] - + for pk in partitions: for i in range(items_per_partition): - document_definition = { - 'pk': pk, - 'id': f'{pk}_item_{i}', - 'value': i - } + document_definition = {"pk": pk, "id": f"{pk}_item_{i}", "value": i} created_collection.create_item(body=document_definition) - + # Test cross-partition query with max_item_count max_items_per_page = 8 query = "SELECT * FROM c ORDER BY c['value']" query_iterable = created_collection.query_items( - query=query, - enable_cross_partition_query=True, - max_item_count=max_items_per_page + query=query, enable_cross_partition_query=True, max_item_count=max_items_per_page ) - + # Iterate through pages and verify per-page counts all_fetched_results = [] page_count = 0 item_pages = query_iterable.by_page() - + for page in item_pages: page_count += 1 items_in_page = list(page) all_fetched_results.extend(items_in_page) - + # Each page should have at most max_item_count items # In cross-partition queries, pages may have fewer items self.assertLessEqual(len(items_in_page), max_items_per_page) self.assertGreater(len(items_in_page), 0) # Pages should not be empty - + # Verify total results match expected count self.assertEqual(len(all_fetched_results), total_items) - + # Verify we got multiple pages self.assertGreater(page_count, 1) - + self.created_db.delete_container(created_collection.id) - + def test_cross_partition_query_pagination_counting_results(self): """Test counting total results while paginating across partitions.""" created_collection = self.created_db.create_container( "cross_partition_count_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS) - + offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS, + ) + # Create items across multiple partitions with different counts - partitions_config = [ - ("partition_a", 5), - ("partition_b", 8), - ("partition_c", 3), - ("partition_d", 12) - ] - + partitions_config = [("partition_a", 5), ("partition_b", 8), ("partition_c", 3), ("partition_d", 12)] + total_expected = 0 for pk, count in partitions_config: for i in range(count): - document_definition = { - 'pk': pk, - 'id': f'{pk}_item_{i}', - 'name': f'Item {i} in {pk}' - } + document_definition = {"pk": pk, "id": f"{pk}_item_{i}", "name": f"Item {i} in {pk}"} created_collection.create_item(body=document_definition) total_expected += 1 - + # Query across partitions with pagination max_items_per_page = 5 query = "SELECT * FROM c" query_iterable = created_collection.query_items( - query=query, - enable_cross_partition_query=True, - max_item_count=max_items_per_page + query=query, enable_cross_partition_query=True, max_item_count=max_items_per_page ) - + # Count items across all pages total_count = 0 page_count = 0 page_sizes = [] - + item_pages = query_iterable.by_page() for page in item_pages: page_count += 1 @@ -685,17 +696,17 @@ def test_cross_partition_query_pagination_counting_results(self): page_size = len(items) page_sizes.append(page_size) total_count += page_size - + # Verify page size constraints self.assertLessEqual(page_size, max_items_per_page) self.assertGreater(page_size, 0) - + # Verify total count matches what we inserted self.assertEqual(total_count, total_expected) - + # Verify we processed multiple pages self.assertGreater(page_count, 1) - + self.created_db.delete_container(created_collection.id) def _MockNextFunction(self): @@ -703,7 +714,7 @@ def _MockNextFunction(self): item, result = self.get_mock_result(self.payloads, self.count) self.count += 1 if item is not None: - return {'orderByItems': [{'item': item}], '_rid': 'fake_rid', 'payload': result} + return {"orderByItems": [{"item": item}], "_rid": "fake_rid", "payload": result} else: return result else: diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition_async.py b/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition_async.py index 62d5a8954c4d..3b19be8ab430 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_cross_partition_async.py @@ -17,6 +17,7 @@ from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.partition_key import PartitionKey + @pytest.mark.cosmosCircuitBreaker @pytest.mark.cosmosQuery class TestQueryCrossPartitionAsync(unittest.IsolatedAsyncioTestCase): @@ -34,12 +35,12 @@ class TestQueryCrossPartitionAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): use_multiple_write_locations = False @@ -50,7 +51,8 @@ async def asyncSetUp(self): self.created_container = await self.created_db.create_container( self.TEST_CONTAINER_ID, PartitionKey(path="/pk"), - offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS) + offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS, + ) async def asyncTearDown(self): try: @@ -61,17 +63,14 @@ async def asyncTearDown(self): await self.client.close() async def test_first_and_last_slashes_trimmed_for_query_string_async(self): - doc_id = 'myId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "myId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} await self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = self.created_container.query_items( - query=query, - partition_key='pk' - ) + query = "SELECT * from c" + query_iterable = self.created_container.query_items(query=query, partition_key="pk") iter_list = [item async for item in query_iterable] - assert iter_list[0]['id'] == doc_id + assert iter_list[0]["id"] == doc_id async def test_query_change_feed_with_pk_async(self): # The test targets partition #3 @@ -86,73 +85,68 @@ async def test_query_change_feed_with_pk_async(self): query_iterable = self.created_container.query_items_change_feed(partition_key=partition_key) iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 - if 'Etag' in self.created_container.client_connection.last_response_headers: - assert self.created_container.client_connection.last_response_headers['Etag'] != '' - elif 'etag' in self.created_container.client_connection.last_response_headers: - assert self.created_container.client_connection.last_response_headers['etag'] != '' + if "Etag" in self.created_container.client_connection.last_response_headers: + assert self.created_container.client_connection.last_response_headers["Etag"] != "" + elif "etag" in self.created_container.client_connection.last_response_headers: + assert self.created_container.client_connection.last_response_headers["etag"] != "" else: self.fail("No Etag or etag found in last response headers") # Read change feed from beginning should return an empty list query_iterable = self.created_container.query_items_change_feed( - is_start_from_beginning=True, - partition_key=partition_key + is_start_from_beginning=True, partition_key=partition_key ) iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 - if 'Etag' in self.created_container.client_connection.last_response_headers: - continuation1 = self.created_container.client_connection.last_response_headers['Etag'] - elif 'etag' in self.created_container.client_connection.last_response_headers: - continuation1 = self.created_container.client_connection.last_response_headers['etag'] + if "Etag" in self.created_container.client_connection.last_response_headers: + continuation1 = self.created_container.client_connection.last_response_headers["Etag"] + elif "etag" in self.created_container.client_connection.last_response_headers: + continuation1 = self.created_container.client_connection.last_response_headers["etag"] else: self.fail("No Etag or etag found in last response headers") - assert continuation1 != '' + assert continuation1 != "" # Create a document. Read change feed should return be able to read that document - document_definition = {'pk': 'pk', 'id': 'doc1'} + document_definition = {"pk": "pk", "id": "doc1"} await self.created_container.create_item(body=document_definition) query_iterable = self.created_container.query_items_change_feed( - is_start_from_beginning=True, - partition_key=partition_key + is_start_from_beginning=True, partition_key=partition_key ) iter_list = [item async for item in query_iterable] assert len(iter_list) == 1 - assert iter_list[0]['id'] == 'doc1' - if 'Etag' in self.created_container.client_connection.last_response_headers: - continuation2 = self.created_container.client_connection.last_response_headers['Etag'] - elif 'etag' in self.created_container.client_connection.last_response_headers: - continuation2 = self.created_container.client_connection.last_response_headers['etag'] + assert iter_list[0]["id"] == "doc1" + if "Etag" in self.created_container.client_connection.last_response_headers: + continuation2 = self.created_container.client_connection.last_response_headers["Etag"] + elif "etag" in self.created_container.client_connection.last_response_headers: + continuation2 = self.created_container.client_connection.last_response_headers["etag"] else: self.fail("No Etag or etag found in last response headers") - assert continuation2 != '' + assert continuation2 != "" assert continuation2 != continuation1 # Create two new documents. Verify that change feed contains the 2 new documents # with page size 1 and page size 100 - document_definition = {'pk': 'pk', 'id': 'doc2'} + document_definition = {"pk": "pk", "id": "doc2"} await self.created_container.create_item(body=document_definition) - document_definition = {'pk': 'pk', 'id': 'doc3'} + document_definition = {"pk": "pk", "id": "doc3"} await self.created_container.create_item(body=document_definition) for pageSize in [2, 100]: # verify iterator query_iterable = self.created_container.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - partition_key=partition_key) + continuation=continuation2, max_item_count=pageSize, partition_key=partition_key + ) it = query_iterable.__aiter__() - expected_ids = 'doc2.doc3.' - actual_ids = '' + expected_ids = "doc2.doc3." + actual_ids = "" async for item in it: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids # verify by_page # the options is not copied, therefore it need to be restored query_iterable = self.created_container.query_items_change_feed( - continuation=continuation2, - max_item_count=pageSize, - partition_key=partition_key + continuation=continuation2, max_item_count=pageSize, partition_key=partition_key ) count = 0 expected_count = 2 @@ -163,59 +157,54 @@ async def test_query_change_feed_with_pk_async(self): all_fetched_res.append(items) assert count == expected_count - actual_ids = '' + actual_ids = "" for item in all_fetched_res: - actual_ids += item['id'] + '.' + actual_ids += item["id"] + "." assert actual_ids == expected_ids # verify reading change feed from the beginning query_iterable = self.created_container.query_items_change_feed( - is_start_from_beginning=True, - partition_key=partition_key + is_start_from_beginning=True, partition_key=partition_key ) - expected_ids = ['doc1', 'doc2', 'doc3'] + expected_ids = ["doc1", "doc2", "doc3"] it = query_iterable.__aiter__() for i in range(0, len(expected_ids)): doc = await it.__anext__() - assert doc['id'] == expected_ids[i] - if 'Etag' in self.created_container.client_connection.last_response_headers: - continuation3 = self.created_container.client_connection.last_response_headers['Etag'] - elif 'etag' in self.created_container.client_connection.last_response_headers: - continuation3 = self.created_container.client_connection.last_response_headers['etag'] + assert doc["id"] == expected_ids[i] + if "Etag" in self.created_container.client_connection.last_response_headers: + continuation3 = self.created_container.client_connection.last_response_headers["Etag"] + elif "etag" in self.created_container.client_connection.last_response_headers: + continuation3 = self.created_container.client_connection.last_response_headers["etag"] else: self.fail("No Etag or etag found in last response headers") # verify reading empty change feed query_iterable = self.created_container.query_items_change_feed( - continuation=continuation3, - is_start_from_beginning=True, - partition_key=partition_key + continuation=continuation3, is_start_from_beginning=True, partition_key=partition_key ) iter_list = [item async for item in query_iterable] assert len(iter_list) == 0 async def test_populate_query_metrics_async(self): - doc_id = 'MyId' + str(uuid.uuid4()) - document_definition = {'pk': 'pk', 'id': doc_id} + doc_id = "MyId" + str(uuid.uuid4()) + document_definition = {"pk": "pk", "id": doc_id} await self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' + query = "SELECT * from c" query_iterable = self.created_container.query_items( - query=query, - partition_key='pk', - populate_query_metrics=True + query=query, partition_key="pk", populate_query_metrics=True ) iter_list = [item async for item in query_iterable] - assert iter_list[0]['id'] == doc_id + assert iter_list[0]["id"] == doc_id - metrics_header_name = 'x-ms-documentdb-query-metrics' + metrics_header_name = "x-ms-documentdb-query-metrics" assert metrics_header_name in self.created_container.client_connection.last_response_headers metrics_header = self.created_container.client_connection.last_response_headers[metrics_header_name] # Validate header is well-formed: "key1=value1;key2=value2;etc" - metrics = metrics_header.split(';') + metrics = metrics_header.split(";") assert len(metrics) > 1 - assert all(['=' in x for x in metrics]) + assert all(["=" in x for x in metrics]) async def validate_query_requests_count(self, query_iterable, expected_count): self.count = 0 @@ -234,11 +223,15 @@ async def validate_query_requests_count(self, query_iterable, expected_count): @pytest.mark.skip(reason="Emulator does not support query advisor yet") async def test_populate_query_advice(self): - doc_id = 'MyId' + str(uuid.uuid4()) + doc_id = "MyId" + str(uuid.uuid4()) document_definition = { - 'pk': 'pk', 'id': doc_id, 'name': 'test document', - 'tags': [{'name': 'python'}, {'name': 'cosmos'}], - 'timestamp': '2099-01-01T00:00:00Z', 'ticks': 0, 'ts': 0 + "pk": "pk", + "id": doc_id, + "name": "test document", + "tags": [{"name": "python"}, {"name": "cosmos"}], + "timestamp": "2099-01-01T00:00:00Z", + "ticks": 0, + "ts": 0, } await self.created_container.create_item(body=document_definition) @@ -247,7 +240,8 @@ async def test_populate_query_advice(self): # QA1000 - PartialArrayContains: ARRAY_CONTAINS with partial match query_iterable = self.created_container.query_items( query='SELECT * FROM c WHERE ARRAY_CONTAINS(c.tags, {"name": "python"}, true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -256,8 +250,7 @@ async def test_populate_query_advice(self): # QA1002 - Contains: CONTAINS usage query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', - partition_key='pk', populate_query_advice=True + query='SELECT * FROM c WHERE CONTAINS(c.name, "test")', partition_key="pk", populate_query_advice=True ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -267,7 +260,8 @@ async def test_populate_query_advice(self): # QA1003 - CaseInsensitiveStartsWithOrStringEquals: case-insensitive STARTSWITH query_iterable = self.created_container.query_items( query='SELECT * FROM c WHERE STARTSWITH(c.name, "test", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -277,7 +271,8 @@ async def test_populate_query_advice(self): # QA1004 - CaseInsensitiveEndsWith: case-insensitive ENDSWITH query_iterable = self.created_container.query_items( query='SELECT * FROM c WHERE ENDSWITH(c.name, "document", true)', - partition_key='pk', populate_query_advice=True + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -286,8 +281,9 @@ async def test_populate_query_advice(self): # QA1007 - GetCurrentDateTime: usage of GetCurrentDateTime query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.timestamp < GetCurrentDateTime()", + partition_key="pk", + populate_query_advice=True, ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -296,8 +292,7 @@ async def test_populate_query_advice(self): # QA1008 - GetCurrentTicks: usage of GetCurrentTicks query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE c.ticks < GetCurrentTicks()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ticks < GetCurrentTicks()", partition_key="pk", populate_query_advice=True ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -306,8 +301,7 @@ async def test_populate_query_advice(self): # QA1009 - GetCurrentTimestamp: usage of GetCurrentTimestamp query_iterable = self.created_container.query_items( - query='SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()', - partition_key='pk', populate_query_advice=True + query="SELECT * FROM c WHERE c.ts < GetCurrentTimestamp()", partition_key="pk", populate_query_advice=True ) [item async for item in query_iterable] query_advice = self.created_container.client_connection.last_response_headers.get(QUERY_ADVICE_HEADER) @@ -319,38 +313,45 @@ async def _mock_execute_function(self, function, *args, **kwargs): return await self.OriginalExecuteFunction(function, *args, **kwargs) async def test_get_query_plan_through_gateway_async(self): - await self._validate_query_plan(query="Select top 10 value count(c.id) from c", - container_link=self.created_container.container_link, - top=10, - order_by=[], - aggregate=['Count'], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.NoneType) - - await self._validate_query_plan(query="Select * from c order by c._ts offset 5 limit 10", - container_link=self.created_container.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=False, - offset=5, - limit=10, - distinct=_DistinctType.NoneType) - - await self._validate_query_plan(query="Select distinct value c.id from c order by c.id", - container_link=self.created_container.container_link, - top=None, - order_by=['Ascending'], - aggregate=[], - select_value=True, - offset=None, - limit=None, - distinct=_DistinctType.Ordered) - - async def _validate_query_plan(self, query, container_link, top, order_by, aggregate, select_value, offset, limit, - distinct): + await self._validate_query_plan( + query="Select top 10 value count(c.id) from c", + container_link=self.created_container.container_link, + top=10, + order_by=[], + aggregate=["Count"], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.NoneType, + ) + + await self._validate_query_plan( + query="Select * from c order by c._ts offset 5 limit 10", + container_link=self.created_container.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=False, + offset=5, + limit=10, + distinct=_DistinctType.NoneType, + ) + + await self._validate_query_plan( + query="Select distinct value c.id from c order by c.id", + container_link=self.created_container.container_link, + top=None, + order_by=["Ascending"], + aggregate=[], + select_value=True, + offset=None, + limit=None, + distinct=_DistinctType.Ordered, + ) + + async def _validate_query_plan( + self, query, container_link, top, order_by, aggregate, select_value, offset, limit, distinct + ): query_plan_dict = await self.client.client_connection._GetQueryPlanThroughGateway(query, container_link) query_execution_info = _PartitionedQueryExecutionInfo(query_plan_dict) assert query_execution_info.has_rewritten_query() @@ -369,7 +370,7 @@ async def _validate_query_plan(self, query, container_link, top, order_by, aggre assert query_execution_info.get_limit() == limit async def test_unsupported_queries_async(self): - queries = ['SELECT COUNT(1) FROM c', 'SELECT COUNT(1) + 5 FROM c', 'SELECT COUNT(1) + SUM(c) FROM c'] + queries = ["SELECT COUNT(1) FROM c", "SELECT COUNT(1) + 5 FROM c", "SELECT COUNT(1) + SUM(c) FROM c"] for query in queries: query_iterable = self.created_container.query_items(query=query) try: @@ -385,177 +386,211 @@ async def test_query_with_non_overlapping_pk_ranges_async(self): async def test_offset_limit_async(self): values = [] for i in range(10): - document_definition = {'pk': i, 'id': 'myId' + str(uuid.uuid4()), 'value': i // 3} + document_definition = {"pk": i, "id": "myId" + str(uuid.uuid4()), "value": i // 3} current_document = await self.created_container.create_item(body=document_definition) - values.append(current_document['pk']) + values.append(current_document["pk"]) await self.config._validate_distinct_offset_limit( created_collection=self.created_container, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 0 LIMIT 2', - results=[0, 1]) + results=[0, 1], + ) await self.config._validate_distinct_offset_limit( created_collection=self.created_container, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 2 LIMIT 2', - results=[2, 3]) + results=[2, 3], + ) await self.config._validate_distinct_offset_limit( created_collection=self.created_container, query='SELECT DISTINCT c["value"] from c ORDER BY c.pk OFFSET 4 LIMIT 3', - results=[]) + results=[], + ) - await self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5', - results=values[:5]) + await self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 0 LIMIT 5", + results=values[:5], + ) - await self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10', - results=values[5:]) + await self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 5 LIMIT 10", + results=values[5:], + ) - await self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5', - results=[]) + await self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 10 LIMIT 5", + results=[], + ) - await self.config._validate_offset_limit(created_collection=self.created_container, - query='SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1', - results=[]) + await self.config._validate_offset_limit( + created_collection=self.created_container, + query="SELECT * from c ORDER BY c.pk OFFSET 100 LIMIT 1", + results=[], + ) async def test_distinct_async(self): created_database = self.created_db - distinct_field = 'distinct_field' + distinct_field = "distinct_field" pk_field = "pk" different_field = "different_field" created_collection = await created_database.create_container( - id='collection with composite index ' + str(uuid.uuid4()), + id="collection with composite index " + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk", kind="Hash"), indexing_policy={ "compositeIndexes": [ - [{"path": "/" + pk_field, "order": "ascending"}, - {"path": "/" + distinct_field, "order": "ascending"}], - [{"path": "/" + distinct_field, "order": "ascending"}, - {"path": "/" + pk_field, "order": "ascending"}] + [ + {"path": "/" + pk_field, "order": "ascending"}, + {"path": "/" + distinct_field, "order": "ascending"}, + ], + [ + {"path": "/" + distinct_field, "order": "ascending"}, + {"path": "/" + pk_field, "order": "ascending"}, + ], ] - } + }, ) documents = [] for i in range(5): j = i while j > i - 5: - document_definition = {pk_field: i, 'id': str(uuid.uuid4()), distinct_field: j} + document_definition = {pk_field: i, "id": str(uuid.uuid4()), distinct_field: j} documents.append(await created_collection.create_item(body=document_definition)) - document_definition = {pk_field: i, 'id': str(uuid.uuid4()), distinct_field: j} + document_definition = {pk_field: i, "id": str(uuid.uuid4()), distinct_field: j} documents.append(await created_collection.create_item(body=document_definition)) - document_definition = {pk_field: i, 'id': str(uuid.uuid4())} + document_definition = {pk_field: i, "id": str(uuid.uuid4())} documents.append(await created_collection.create_item(body=document_definition)) j -= 1 padded_docs = self.config._pad_with_none(documents, distinct_field) - await self.config._validate_distinct(created_collection=created_collection, # returns {} and is right number - query='SELECT distinct c.%s from c' % distinct_field, # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, None, - False), - is_select=True, - fields=[distinct_field]) - - await self.config._validate_distinct(created_collection=created_collection, - query='SELECT distinct c.%s, c.%s from c' % (distinct_field, pk_field), - # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, - pk_field, False), - is_select=True, - fields=[distinct_field, pk_field]) - - await self.config._validate_distinct(created_collection=created_collection, - query='SELECT distinct value c.%s from c' % distinct_field, # nosec - results=self.config._get_distinct_docs(padded_docs, distinct_field, None, - True), - is_select=True, - fields=[distinct_field]) - - await self.config._validate_distinct(created_collection=created_collection, - query='SELECT distinct c.%s from c' % different_field, # nosec - results=['None'], - is_select=True, - fields=[different_field]) + await self.config._validate_distinct( + created_collection=created_collection, # returns {} and is right number + query="SELECT distinct c.%s from c" % distinct_field, # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, None, False), + is_select=True, + fields=[distinct_field], + ) + + await self.config._validate_distinct( + created_collection=created_collection, + query="SELECT distinct c.%s, c.%s from c" % (distinct_field, pk_field), + # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, pk_field, False), + is_select=True, + fields=[distinct_field, pk_field], + ) + + await self.config._validate_distinct( + created_collection=created_collection, + query="SELECT distinct value c.%s from c" % distinct_field, # nosec + results=self.config._get_distinct_docs(padded_docs, distinct_field, None, True), + is_select=True, + fields=[distinct_field], + ) + + await self.config._validate_distinct( + created_collection=created_collection, + query="SELECT distinct c.%s from c" % different_field, # nosec + results=["None"], + is_select=True, + fields=[different_field], + ) await created_database.delete_container(created_collection.id) async def test_distinct_on_different_types_and_field_orders_async(self): payloads = [ - {'id': str(uuid.uuid4()), 'f1': 1, 'f2': 'value', 'f3': 100000000000000000, 'f4': [1, 2, '3'], - 'f5': {'f6': {'f7': 2}}}, - {'id': str(uuid.uuid4()), 'f2': '\'value', 'f4': [1.0, 2, '3'], 'f5': {'f6': {'f7': 2.0}}, 'f1': 1.0, - 'f3': 100000000000000000.00}, - {'id': str(uuid.uuid4()), 'f3': 100000000000000000.0, 'f5': {'f6': {'f7': 2}}, 'f2': '\'value', 'f1': 1, - 'f4': [1, 2.0, '3']} + { + "id": str(uuid.uuid4()), + "f1": 1, + "f2": "value", + "f3": 100000000000000000, + "f4": [1, 2, "3"], + "f5": {"f6": {"f7": 2}}, + }, + { + "id": str(uuid.uuid4()), + "f2": "'value", + "f4": [1.0, 2, "3"], + "f5": {"f6": {"f7": 2.0}}, + "f1": 1.0, + "f3": 100000000000000000.00, + }, + { + "id": str(uuid.uuid4()), + "f3": 100000000000000000.0, + "f5": {"f6": {"f7": 2}}, + "f2": "'value", + "f1": 1, + "f4": [1, 2.0, "3"], + }, ] for pay in payloads: await self.created_container.create_item(pay) await self.config._validate_distinct_on_different_types_and_field_orders( - collection=self.created_container, - query="Select distinct value c.f1 from c", - expected_results=[1] + collection=self.created_container, query="Select distinct value c.f1 from c", expected_results=[1] ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f2 from c", - expected_results=['value', '\'value'] + expected_results=["value", "'value"], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f2 from c order by c.f2", - expected_results=['value', '\'value'] + expected_results=["value", "'value"], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f3 from c", - expected_results=[100000000000000000] + expected_results=[100000000000000000], ) await self.config._validate_distinct_on_different_types_and_field_orders( - collection=self.created_container, - query="Select distinct value c.f4 from c", - expected_results=[[1, 2, '3']] + collection=self.created_container, query="Select distinct value c.f4 from c", expected_results=[[1, 2, "3"]] ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct value c.f5.f6 from c", - expected_results=[{'f7': 2}] + expected_results=[{"f7": 2}], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct c.f1, c.f2, c.f3 from c", - expected_results=[{'f1': 1, 'f2': 'value', 'f3': 100000000000000000}, - {'f1': 1.0, 'f2': '\'value', 'f3': 100000000000000000.00}] + expected_results=[ + {"f1": 1, "f2": "value", "f3": 100000000000000000}, + {"f1": 1.0, "f2": "'value", "f3": 100000000000000000.00}, + ], ) await self.config._validate_distinct_on_different_types_and_field_orders( collection=self.created_container, query="Select distinct c.f1, c.f2, c.f3 from c order by c.f1", - expected_results=[{'f1': 1, 'f2': 'value', 'f3': 100000000000000000}, - {'f1': 1.0, 'f2': '\'value', 'f3': 100000000000000000.00}] + expected_results=[ + {"f1": 1, "f2": "value", "f3": 100000000000000000}, + {"f1": 1.0, "f2": "'value", "f3": 100000000000000000.00}, + ], ) async def test_paging_with_continuation_token_async(self): - document_definition = {'pk': 'pk', 'id': '1'} + document_definition = {"pk": "pk", "id": "1"} await self.created_container.upsert_item(body=document_definition) - document_definition = {'pk': 'pk', 'id': '2'} + document_definition = {"pk": "pk", "id": "2"} await self.created_container.upsert_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = self.created_container.query_items( - query=query, - partition_key='pk', - max_item_count=1 - ) + query = "SELECT * from c" + query_iterable = self.created_container.query_items(query=query, partition_key="pk", max_item_count=1) pager = query_iterable.by_page() await pager.__anext__() token = pager.continuation_token @@ -565,18 +600,16 @@ async def test_paging_with_continuation_token_async(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = [item async for item in await pager.__anext__()][0] - assert second_page['id'] == second_page_fetched_with_continuation_token['id'] + assert second_page["id"] == second_page_fetched_with_continuation_token["id"] async def test_cross_partition_query_with_continuation_token_async(self): - document_definition = {'pk': 'pk1', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk1", "id": str(uuid.uuid4())} await self.created_container.create_item(body=document_definition) - document_definition = {'pk': 'pk2', 'id': str(uuid.uuid4())} + document_definition = {"pk": "pk2", "id": str(uuid.uuid4())} await self.created_container.create_item(body=document_definition) - query = 'SELECT * from c' - query_iterable = self.created_container.query_items( - query=query, - max_item_count=1) + query = "SELECT * from c" + query_iterable = self.created_container.query_items(query=query, max_item_count=1) pager = query_iterable.by_page() await pager.__anext__() token = pager.continuation_token @@ -585,60 +618,65 @@ async def test_cross_partition_query_with_continuation_token_async(self): pager = query_iterable.by_page(token) second_page_fetched_with_continuation_token = [item async for item in await pager.__anext__()][0] - assert second_page['id'] == second_page_fetched_with_continuation_token['id'] + assert second_page["id"] == second_page_fetched_with_continuation_token["id"] async def test_value_max_query_async(self): await self.created_container.create_item( - {"id": str(uuid.uuid4()), "isComplete": True, "version": 3, "lookupVersion": "console_version"}) + {"id": str(uuid.uuid4()), "isComplete": True, "version": 3, "lookupVersion": "console_version"} + ) await self.created_container.create_item( - {"id": str(uuid.uuid4()), "isComplete": True, "version": 2, "lookupVersion": "console_version"}) + {"id": str(uuid.uuid4()), "isComplete": True, "version": 2, "lookupVersion": "console_version"} + ) query = "Select value max(c.version) FROM c where c.isComplete = true and c.lookupVersion = @lookupVersion" - query_results = self.created_container.query_items(query, parameters=[ - {"name": "@lookupVersion", "value": "console_version"} - ]) + query_results = self.created_container.query_items( + query, parameters=[{"name": "@lookupVersion", "value": "console_version"}] + ) item_list = [item async for item in query_results] assert len(item_list) == 1 assert item_list[0] == 3 async def test_continuation_token_size_limit_query_async(self): for i in range(1, 1000): - await self.created_container.create_item(body=dict(pk='123', id=str(i), some_value=str(i % 3))) + await self.created_container.create_item(body=dict(pk="123", id=str(i), some_value=str(i % 3))) query = "Select * from c where c.some_value='2'" print("Created 1000 items") - response_query = self.created_container.query_items(query, partition_key='123', max_item_count=100, - continuation_token_limit=1) + response_query = self.created_container.query_items( + query, partition_key="123", max_item_count=100, continuation_token_limit=1 + ) pager = response_query.by_page() await pager.__anext__() token = pager.continuation_token # Continuation token size should be below 1kb - assert len(token.encode('utf-8')) <= 1024 + assert len(token.encode("utf-8")) <= 1024 await pager.__anext__() token = pager.continuation_token # verify a second time - assert len(token.encode('utf-8')) <= 1024 + assert len(token.encode("utf-8")) <= 1024 print("Test done") async def test_cross_partition_query_response_hook_async(self): created_collection = await self.created_db.create_container_if_not_exists( id="query_response_hook_test" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=12000 + offer_throughput=12000, ) items = [ - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10}, - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10}, - {'id': str(uuid.uuid4()), 'pk': '0', 'val': 5}, - {'id': str(uuid.uuid4()), 'pk': '1', 'val': 10} + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, + {"id": str(uuid.uuid4()), "pk": "0", "val": 5}, + {"id": str(uuid.uuid4()), "pk": "1", "val": 10}, ] for item in items: await created_collection.create_item(body=item) response_hook = test_config.ResponseHookCaller() - item_list = [item async for item in created_collection.query_items("select * from c", response_hook=response_hook)] + item_list = [ + item async for item in created_collection.query_items("select * from c", response_hook=response_hook) + ] assert len(item_list) == 6 assert response_hook.count == 2 await self.created_db.delete_container(created_collection.id) @@ -648,92 +686,75 @@ async def test_cross_partition_query_pagination_with_max_item_count_async(self): created_collection = await self.created_db.create_container( "cross_partition_pagination_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS) - + offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS, + ) + # Create 30 items across 3 different partitions total_items = 30 items_per_partition = 10 partitions = ["pk_1", "pk_2", "pk_3"] - + for pk in partitions: for i in range(items_per_partition): - document_definition = { - 'pk': pk, - 'id': f'{pk}_item_{i}', - 'value': i - } + document_definition = {"pk": pk, "id": f"{pk}_item_{i}", "value": i} await created_collection.create_item(body=document_definition) - + # Test cross-partition query with max_item_count max_items_per_page = 8 query = "SELECT * FROM c ORDER BY c['value']" - query_iterable = created_collection.query_items( - query=query, - max_item_count=max_items_per_page - ) - + query_iterable = created_collection.query_items(query=query, max_item_count=max_items_per_page) + # Iterate through pages and verify per-page counts all_fetched_results = [] page_count = 0 item_pages = query_iterable.by_page() - + async for page in item_pages: page_count += 1 items_in_page = [item async for item in page] all_fetched_results.extend(items_in_page) - + # Each page should have at most max_item_count items # In cross-partition queries, pages may have fewer items assert len(items_in_page) <= max_items_per_page assert len(items_in_page) > 0 # Pages should not be empty - + # Verify total results match expected count assert len(all_fetched_results) == total_items - + # Verify we got multiple pages assert page_count > 1 - + await self.created_db.delete_container(created_collection.id) - + async def test_cross_partition_query_pagination_counting_results_async(self): """Test counting total results while paginating across partitions.""" created_collection = await self.created_db.create_container( "cross_partition_count_test_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS) - + offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_5_PARTITIONS, + ) + # Create items across multiple partitions with different counts - partitions_config = [ - ("partition_a", 5), - ("partition_b", 8), - ("partition_c", 3), - ("partition_d", 12) - ] - + partitions_config = [("partition_a", 5), ("partition_b", 8), ("partition_c", 3), ("partition_d", 12)] + total_expected = 0 for pk, count in partitions_config: for i in range(count): - document_definition = { - 'pk': pk, - 'id': f'{pk}_item_{i}', - 'name': f'Item {i} in {pk}' - } + document_definition = {"pk": pk, "id": f"{pk}_item_{i}", "name": f"Item {i} in {pk}"} await created_collection.create_item(body=document_definition) total_expected += 1 - + # Query across partitions with pagination max_items_per_page = 5 query = "SELECT * FROM c" - query_iterable = created_collection.query_items( - query=query, - max_item_count=max_items_per_page - ) - + query_iterable = created_collection.query_items(query=query, max_item_count=max_items_per_page) + # Count items across all pages total_count = 0 page_count = 0 page_sizes = [] - + item_pages = query_iterable.by_page() async for page in item_pages: page_count += 1 @@ -741,18 +762,19 @@ async def test_cross_partition_query_pagination_counting_results_async(self): page_size = len(items) page_sizes.append(page_size) total_count += page_size - + # Verify page size constraints assert page_size <= max_items_per_page assert page_size > 0 - + # Verify total count matches what we inserted assert total_count == total_expected - + # Verify we processed multiple pages assert page_count > 1 - + await self.created_db.delete_container(created_collection.id) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_execution_context.py b/sdk/cosmos/azure-cosmos/tests/test_query_execution_context.py index 3d095336c376..ebafe949be60 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_execution_context.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_execution_context.py @@ -15,17 +15,16 @@ def get_database_link(database): - return 'dbs/' + database.id + return "dbs/" + database.id def get_document_collection_link(database, document_collection): - return get_database_link(database) + '/colls/' + document_collection.id + return get_database_link(database) + "/colls/" + document_collection.id @pytest.mark.cosmosEmulator class TestQueryExecutionContextEndToEnd(unittest.TestCase): - """Routing Map Functionalities end-to-end Tests. - """ + """Routing Map Functionalities end-to-end Tests.""" created_collection = None document_definitions = None @@ -39,27 +38,23 @@ class TestQueryExecutionContextEndToEnd(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.created_collection = cls.created_db.create_container( - id='query_execution_context_tests_' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/id', kind='Hash') + id="query_execution_context_tests_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id", kind="Hash") ) cls.document_definitions = [] # create a document using the document definition for i in range(20): - d = {'id': str(i), - 'name': 'sample document', - 'spam': 'eggs' + str(i), - 'key': 'value'} + d = {"id": str(i), "name": "sample document", "spam": "eggs" + str(i), "key": "value"} cls.document_definitions.append(d) cls.insert_doc(cls.document_definitions) @@ -72,76 +67,61 @@ def tearDownClass(cls): def setUp(self): # sanity check: - partition_key_ranges = list(self.client.client_connection._ReadPartitionKeyRanges( - get_document_collection_link(self.created_db, self.created_collection))) + partition_key_ranges = list( + self.client.client_connection._ReadPartitionKeyRanges( + get_document_collection_link(self.created_db, self.created_collection) + ) + ) self.assertGreaterEqual(len(partition_key_ranges), 1) # sanity check: read documents after creation queried_docs = list(self.created_collection.read_all_items()) self.assertEqual( - len(queried_docs), - len(self.document_definitions), - 'create should increase the number of documents') + len(queried_docs), len(self.document_definitions), "create should increase the number of documents" + ) def test_no_query_default_execution_context(self): - options = {'maxItemCount': 2} + options = {"maxItemCount": 2} self._test_default_execution_context(options, None, 20) def test_no_query_default_execution_context_with_small_last_page(self): - options = {'maxItemCount': 3} + options = {"maxItemCount": 3} self._test_default_execution_context(options, None, 20) def test_simple_query_default_execution_context(self): - query = { - 'query': 'SELECT * FROM root r WHERE r.id != @id', - 'parameters': [ - {'name': '@id', 'value': '5'} - ] - } + query = {"query": "SELECT * FROM root r WHERE r.id != @id", "parameters": [{"name": "@id", "value": "5"}]} - options = {'enableCrossPartitionQuery': True, 'maxItemCount': 2} + options = {"enableCrossPartitionQuery": True, "maxItemCount": 2} - res = self.created_collection.query_items( - query=query, - enable_cross_partition_query=True, - max_item_count=2 - ) + res = self.created_collection.query_items(query=query, enable_cross_partition_query=True, max_item_count=2) self.assertEqual(len(list(res)), 19) self._test_default_execution_context(options, query, 19) def test_simple_query_default_execution_context_with_small_last_page(self): - query = { - 'query': 'SELECT * FROM root r WHERE r.id != @id', - 'parameters': [ - {'name': '@id', 'value': '5'} - ] - } + query = {"query": "SELECT * FROM root r WHERE r.id != @id", "parameters": [{"name": "@id", "value": "5"}]} options = {} - options['enableCrossPartitionQuery'] = True - options['maxItemCount'] = 3 + options["enableCrossPartitionQuery"] = True + options["maxItemCount"] = 3 self._test_default_execution_context(options, query, 19) def _test_default_execution_context(self, options, query, expected_number_of_results): - page_size = options['maxItemCount'] + page_size = options["maxItemCount"] collection_link = get_document_collection_link(self.created_db, self.created_collection) - path = base.GetPathFromLink(collection_link, 'docs') + path = base.GetPathFromLink(collection_link, "docs") collection_id = base.GetResourceIdOrFullNameFromLink(collection_link) def fetch_fn(options): - return self.client.client_connection.QueryFeed(path, - collection_id, - query, - options) + return self.client.client_connection.QueryFeed(path, collection_id, query, options) ###################################### # test next() behavior @@ -157,7 +137,7 @@ def invokeNext(): # validate that invocations of next() produces the same results as expected for _ in range(expected_number_of_results): item = invokeNext() - results[item['id']] = item + results[item["id"]] = item self.assertEqual(len(results), expected_number_of_results) @@ -177,7 +157,7 @@ def invokeNext(): fetched_size = len(fetched_res) for item in fetched_res: - results[item['id']] = item + results[item["id"]] = item cnt += fetched_size fetched_res = ex.fetch_next_block() diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_feed_range.py b/sdk/cosmos/azure-cosmos/tests/test_query_feed_range.py index 7b717953fc26..9bc93bb7cc31 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_feed_range.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_feed_range.py @@ -21,7 +21,9 @@ TEST_CONTAINERS_IDS = [SINGLE_PARTITION_CONTAINER_ID, MULTI_PARTITION_CONTAINER_ID] TEST_OFFER_THROUGHPUTS = [CONFIG.THROUGHPUT_FOR_1_PARTITION, CONFIG.THROUGHPUT_FOR_5_PARTITIONS] PARTITION_KEY = CONFIG.TEST_CONTAINER_PARTITION_KEY -PK_VALUES = ('pk1', 'pk2', 'pk3') +PK_VALUES = ("pk1", "pk2", "pk3") + + def add_all_pk_values_to_set(items: List[Mapping[str, str]], pk_value_set: Set[str]) -> None: if len(items) == 0: return @@ -29,83 +31,79 @@ def add_all_pk_values_to_set(items: List[Mapping[str, str]], pk_value_set: Set[s pk_values = [item[PARTITION_KEY] for item in items if PARTITION_KEY in item] pk_value_set.update(pk_values) + @pytest.fixture(scope="class", autouse=True) def setup_and_teardown(): print("Setup: This runs before any tests") - document_definitions = [{PARTITION_KEY: pk, 'id': str(uuid.uuid4()), 'value': 100} for pk in PK_VALUES] + document_definitions = [{PARTITION_KEY: pk, "id": str(uuid.uuid4()), "value": 100} for pk in PK_VALUES] database = CosmosClient(HOST, KEY).get_database_client(DATABASE_ID) for container_id, offer_throughput in zip(TEST_CONTAINERS_IDS, TEST_OFFER_THROUGHPUTS): container = database.create_container_if_not_exists( id=container_id, - partition_key=PartitionKey(path='/' + PARTITION_KEY, kind='Hash'), - offer_throughput=offer_throughput) + partition_key=PartitionKey(path="/" + PARTITION_KEY, kind="Hash"), + offer_throughput=offer_throughput, + ) for document_definition in document_definitions: container.upsert_item(body=document_definition) yield # Code to run after tests print("Teardown: This runs after all tests") + def get_container(container_id: str): client = CosmosClient(HOST, KEY) db = client.get_database_client(DATABASE_ID) return db.get_container_client(container_id) + @pytest.mark.cosmosQuery class TestQueryFeedRange: - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_feed_range_for_all_partitions(self, container_id): container = get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() iter_feed_ranges = list(container.read_feed_ranges()) for feed_range in iter_feed_ranges: - items = list(container.query_items( - query=query, - feed_range=feed_range - )) + items = list(container.query_items(query=query, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values) assert actual_pk_values == expected_pk_values - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_feed_range_for_partition_key(self, container_id): container = get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" for pk_value in PK_VALUES: expected_pk_values = {pk_value} actual_pk_values = set() feed_range = container.feed_range_from_partition_key(pk_value) - items = list(container.query_items( - query=query, - feed_range=feed_range - )) + items = list(container.query_items(query=query, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values) assert actual_pk_values == expected_pk_values - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_both_feed_range_and_partition_key(self, container_id): container = get_container(container_id) - expected_error_message = "'feed_range' and 'partition_key' are exclusive parameters, please only set one of them." - query = 'SELECT * from c' + expected_error_message = ( + "'feed_range' and 'partition_key' are exclusive parameters, please only set one of them." + ) + query = "SELECT * from c" partition_key = PK_VALUES[0] feed_range = container.feed_range_from_partition_key(partition_key) with pytest.raises(ValueError) as e: - list(container.query_items( - query=query, - feed_range=feed_range, - partition_key=partition_key - )) + list(container.query_items(query=query, feed_range=feed_range, partition_key=partition_key)) assert str(e.value) == expected_error_message - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_feed_range_for_a_full_range(self, container_id): container = get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -116,14 +114,11 @@ def test_query_with_feed_range_for_a_full_range(self, container_id): is_max_inclusive=False, ) feed_range = test_config.create_feed_range_in_dict(new_range) - items = list(container.query_items( - query=query, - feed_range=feed_range - )) + items = list(container.query_items(query=query, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values) assert expected_pk_values.issubset(actual_pk_values) - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_feed_range_during_partition_split_combined(self, container_id): container = get_container(container_id) @@ -146,16 +141,14 @@ def test_query_with_feed_range_during_partition_split_combined(self, container_i initial_sum = 0 for feed_range in feed_ranges_before_split: - count_items = list(container.query_items( - query='SELECT VALUE COUNT(1) FROM c', - feed_range=feed_range - )) + count_items = list(container.query_items(query="SELECT VALUE COUNT(1) FROM c", feed_range=feed_range)) initial_count += count_items[0] if count_items else 0 - sum_items = list(container.query_items( - query='SELECT VALUE SUM(c["value"]) FROM c WHERE IS_DEFINED(c["value"])', - feed_range=feed_range - )) + sum_items = list( + container.query_items( + query='SELECT VALUE SUM(c["value"]) FROM c WHERE IS_DEFINED(c["value"])', feed_range=feed_range + ) + ) initial_sum += sum_items[0] if sum_items else 0 print(f"Initial count: {initial_count}, Initial sum: {initial_sum}") @@ -166,7 +159,7 @@ def test_query_with_feed_range_during_partition_split_combined(self, container_i # Collect all PK values before split expected_pk_values = set() for feed_range in feed_ranges_before_split: - items = list(container.query_items(query='SELECT * FROM c', feed_range=feed_range)) + items = list(container.query_items(query="SELECT * FROM c", feed_range=feed_range)) add_all_pk_values_to_set(items, expected_pk_values) print(f"Found {len(expected_pk_values)} unique partition keys before split") @@ -179,29 +172,33 @@ def test_query_with_feed_range_during_partition_split_combined(self, container_i # Test 1: Basic query with stale feed ranges (SDK should handle split) actual_pk_values = set() - query = 'SELECT * from c' + query = "SELECT * from c" for feed_range in feed_ranges_before_split: items = list(container.query_items(query=query, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values) - assert expected_pk_values == actual_pk_values, f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values)}" + assert ( + expected_pk_values == actual_pk_values + ), f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values)}" print("Test 1 (basic query with stale feed ranges) passed") # Test 2: Order by query with stale feed ranges actual_pk_values_order_by = set() - query_order_by = 'SELECT * FROM c ORDER BY c.id' + query_order_by = "SELECT * FROM c ORDER BY c.id" for feed_range in feed_ranges_before_split: items = list(container.query_items(query=query_order_by, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values_order_by) - assert expected_pk_values == actual_pk_values_order_by, f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values_order_by)}" + assert ( + expected_pk_values == actual_pk_values_order_by + ), f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values_order_by)}" print("Test 2 (order by query with stale feed ranges) passed") # Test 3: Count aggregate query with stale feed ranges post_split_count = 0 - query_count = 'SELECT VALUE COUNT(1) FROM c' + query_count = "SELECT VALUE COUNT(1) FROM c" for i, feed_range in enumerate(feed_ranges_before_split): items = list(container.query_items(query=query_count, feed_range=feed_range)) @@ -227,10 +224,10 @@ def test_query_with_feed_range_during_partition_split_combined(self, container_i print("Test 4 (sum aggregate with stale feed ranges) passed") @pytest.mark.skip(reason="Covered by test_query_with_feed_range_during_partition_split_combined") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_feed_range_during_partition_split(self, container_id): container = get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -238,18 +235,15 @@ def test_query_with_feed_range_during_partition_split(self, container_id): feed_ranges = list(container.read_feed_ranges()) test_config.TestConfig.trigger_split(container, 11000) for feed_range in feed_ranges: - items = list(container.query_items( - query=query, - feed_range=feed_range - )) + items = list(container.query_items(query=query, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values) assert expected_pk_values == actual_pk_values @pytest.mark.skip(reason="Covered by test_query_with_feed_range_during_partition_split_combined") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_order_by_and_feed_range_during_partition_split(self, container_id): container = get_container(container_id) - query = 'SELECT * FROM c ORDER BY c.id' + query = "SELECT * FROM c ORDER BY c.id" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -258,16 +252,13 @@ def test_query_with_order_by_and_feed_range_during_partition_split(self, contain test_config.TestConfig.trigger_split(container, 11000) for feed_range in feed_ranges: - items = list(container.query_items( - query=query, - feed_range=feed_range - )) + items = list(container.query_items(query=query, feed_range=feed_range)) add_all_pk_values_to_set(items, actual_pk_values) assert expected_pk_values == actual_pk_values @pytest.mark.skip(reason="Covered by test_query_with_feed_range_during_partition_split_combined") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_count_aggregate_and_feed_range_during_partition_split(self, container_id): container = get_container(container_id) # Get initial counts per feed range before split @@ -275,7 +266,7 @@ def test_query_with_count_aggregate_and_feed_range_during_partition_split(self, initial_total_count = 0 for feed_range in feed_ranges: - query = 'SELECT VALUE COUNT(1) FROM c' + query = "SELECT VALUE COUNT(1) FROM c" items = list(container.query_items(query=query, feed_range=feed_range)) count = items[0] if items else 0 initial_total_count += count @@ -286,7 +277,7 @@ def test_query_with_count_aggregate_and_feed_range_during_partition_split(self, # Query with aggregate after split using original feed ranges post_split_total_count = 0 for feed_range in feed_ranges: - query = 'SELECT VALUE COUNT(1) FROM c' + query = "SELECT VALUE COUNT(1) FROM c" items = list(container.query_items(query=query, feed_range=feed_range)) count = items[0] if items else 0 post_split_total_count += count @@ -296,7 +287,7 @@ def test_query_with_count_aggregate_and_feed_range_during_partition_split(self, assert post_split_total_count == len(PK_VALUES) @pytest.mark.skip(reason="Covered by test_query_with_feed_range_during_partition_split_combined") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) def test_query_with_sum_aggregate_and_feed_range_during_partition_split(self, container_id): container = get_container(container_id) # Get initial sums per feed range before split @@ -329,35 +320,35 @@ def test_query_with_sum_aggregate_and_feed_range_during_partition_split(self, co def test_query_with_static_continuation(self): container = get_container(SINGLE_PARTITION_CONTAINER_ID) - query = 'SELECT * from c' + query = "SELECT * from c" # verify continuation token does not have any impact for i in range(10): query_by_page = container.query_items( query=query, feed_range={ - 'Range': {'isMaxInclusive': False, 'isMinInclusive': True, - 'max': '1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE', - 'min': '0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'}}, + "Range": { + "isMaxInclusive": False, + "isMinInclusive": True, + "max": "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE", + "min": "0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", + } + }, max_item_count=1, - continuation='-RID:~a0NPAOszCpOChB4AAAAAAA==#RT:1#TRC:2#ISV:2#IEO:65567#QCF:8').by_page() + continuation="-RID:~a0NPAOszCpOChB4AAAAAAA==#RT:1#TRC:2#ISV:2#IEO:65567#QCF:8", + ).by_page() for page in query_by_page: items = list(page) assert len(items) > 0 def test_query_with_continuation(self): container = get_container(SINGLE_PARTITION_CONTAINER_ID) - query = 'SELECT * from c' + query = "SELECT * from c" # go through all feed ranges using pagination feed_ranges = container.read_feed_ranges() for feed in feed_ranges: - query_kwargs = { - "query": query, - "feed_range": feed, - "priority": "Low", - "max_item_count": 1 - } + query_kwargs = {"query": query, "feed_range": feed, "priority": "Low", "max_item_count": 1} query_results = container.query_items(**query_kwargs) pager = query_results.by_page() first_page = next(pager) @@ -370,7 +361,7 @@ def test_query_with_continuation(self): "feed_range": feed, "continuation": continuation_token, "priority": "Low", - "max_item_count": 2 + "max_item_count": 2, } query_results = container.query_items(**query_kwargs) pager = query_results.by_page(continuation_token=continuation_token) @@ -378,5 +369,6 @@ def test_query_with_continuation(self): items = list(new_page) assert len(items) > 0 + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_feed_range_async.py b/sdk/cosmos/azure-cosmos/tests/test_query_feed_range_async.py index ac5c3e5e8ead..12b3afc15f8b 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_feed_range_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_feed_range_async.py @@ -23,7 +23,9 @@ TEST_CONTAINERS_IDS = [SINGLE_PARTITION_CONTAINER_ID, MULTI_PARTITION_CONTAINER_ID] TEST_OFFER_THROUGHPUTS = [CONFIG.THROUGHPUT_FOR_1_PARTITION, CONFIG.THROUGHPUT_FOR_5_PARTITIONS] PARTITION_KEY = CONFIG.TEST_CONTAINER_PARTITION_KEY -PK_VALUES = ('pk1', 'pk2', 'pk3') +PK_VALUES = ("pk1", "pk2", "pk3") + + async def add_all_pk_values_to_set_async(items: List[Mapping[str, str]], pk_value_set: Set[str]) -> None: if len(items) == 0: return @@ -31,17 +33,19 @@ async def add_all_pk_values_to_set_async(items: List[Mapping[str, str]], pk_valu pk_values = [item[PARTITION_KEY] for item in items if PARTITION_KEY in item] pk_value_set.update(pk_values) + @pytest_asyncio.fixture(scope="class", autouse=True) async def setup_and_teardown_async(): print("Setup: This runs before any tests") - document_definitions = [{PARTITION_KEY: pk, 'id': str(uuid.uuid4()), 'value': 100} for pk in PK_VALUES] + document_definitions = [{PARTITION_KEY: pk, "id": str(uuid.uuid4()), "value": 100} for pk in PK_VALUES] database = CosmosClient(HOST, KEY).get_database_client(DATABASE_ID) for container_id, offer_throughput in zip(TEST_CONTAINERS_IDS, TEST_OFFER_THROUGHPUTS): container = await database.create_container_if_not_exists( id=container_id, - partition_key=PartitionKey(path='/' + PARTITION_KEY, kind='Hash'), - offer_throughput=offer_throughput) + partition_key=PartitionKey(path="/" + PARTITION_KEY, kind="Hash"), + offer_throughput=offer_throughput, + ) for document_definition in document_definitions: await container.upsert_item(body=document_definition) @@ -55,68 +59,60 @@ async def get_container(container_id: str): db = client.get_database_client(DATABASE_ID) return db.get_container_client(container_id) + @pytest.mark.cosmosQuery @pytest.mark.asyncio @pytest.mark.usefixtures("setup_and_teardown_async") class TestQueryFeedRangeAsync: - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_feed_range_for_all_partitions_async(self, container_id): container = await get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() async for feed_range in container.read_feed_ranges(): - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range - ) - )] + items = [item async for item in (container.query_items(query=query, feed_range=feed_range))] await add_all_pk_values_to_set_async(items, actual_pk_values) assert expected_pk_values == actual_pk_values - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_feed_range_for_partition_key_async(self, container_id): container = await get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" for pk_value in PK_VALUES: expected_pk_values = {pk_value} actual_pk_values = set() feed_range = await container.feed_range_from_partition_key(pk_value) - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range - ) - )] + items = [item async for item in (container.query_items(query=query, feed_range=feed_range))] await add_all_pk_values_to_set_async(items, actual_pk_values) assert expected_pk_values == actual_pk_values - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_both_feed_range_and_partition_key_async(self, container_id): container = await get_container(container_id) - expected_error_message = "'feed_range' and 'partition_key' are exclusive parameters, please only set one of them." - query = 'SELECT * from c' + expected_error_message = ( + "'feed_range' and 'partition_key' are exclusive parameters, please only set one of them." + ) + query = "SELECT * from c" partition_key = PK_VALUES[0] feed_range = await container.feed_range_from_partition_key(partition_key) with pytest.raises(ValueError) as e: - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range, - partition_key=partition_key - ) - )] + items = [ + item + async for item in ( + container.query_items(query=query, feed_range=feed_range, partition_key=partition_key) + ) + ] assert str(e.value) == expected_error_message - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_feed_range_for_a_full_range_async(self, container_id): container = await get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -127,20 +123,15 @@ async def test_query_with_feed_range_for_a_full_range_async(self, container_id): is_max_inclusive=False, ) feed_range = test_config.create_feed_range_in_dict(new_range) - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range - ) - )] + items = [item async for item in (container.query_items(query=query, feed_range=feed_range))] await add_all_pk_values_to_set_async(items, actual_pk_values) assert expected_pk_values.issubset(actual_pk_values) @pytest.mark.skip(reason="will be moved to a new pipeline") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_feed_range_async_during_back_to_back_partition_splits_async(self, container_id): container = await get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -154,17 +145,12 @@ async def test_query_with_feed_range_async_during_back_to_back_partition_splits_ # Query using the original feed ranges, the SDK should handle the splits for feed_range in feed_ranges: - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range - ) - )] + items = [item async for item in (container.query_items(query=query, feed_range=feed_range))] await add_all_pk_values_to_set_async(items, actual_pk_values) assert expected_pk_values == actual_pk_values - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_feed_range_async_during_partition_split_combined_async(self, container_id): container = await get_container(container_id) @@ -187,16 +173,18 @@ async def test_query_with_feed_range_async_during_partition_split_combined_async initial_sum = 0 for feed_range in feed_ranges_before_split: - count_items = [item async for item in container.query_items( - query='SELECT VALUE COUNT(1) FROM c', - feed_range=feed_range - )] + count_items = [ + item + async for item in container.query_items(query="SELECT VALUE COUNT(1) FROM c", feed_range=feed_range) + ] initial_count += count_items[0] if count_items else 0 - sum_items = [item async for item in container.query_items( - query='SELECT VALUE SUM(c["value"]) FROM c WHERE IS_DEFINED(c["value"])', - feed_range=feed_range - )] + sum_items = [ + item + async for item in container.query_items( + query='SELECT VALUE SUM(c["value"]) FROM c WHERE IS_DEFINED(c["value"])', feed_range=feed_range + ) + ] initial_sum += sum_items[0] if sum_items else 0 print(f"Initial count: {initial_count}, Initial sum: {initial_sum}") @@ -207,7 +195,7 @@ async def test_query_with_feed_range_async_during_partition_split_combined_async # Collect all PK values before split expected_pk_values = set() for feed_range in feed_ranges_before_split: - items = [item async for item in container.query_items(query='SELECT * FROM c', feed_range=feed_range)] + items = [item async for item in container.query_items(query="SELECT * FROM c", feed_range=feed_range)] await add_all_pk_values_to_set_async(items, expected_pk_values) print(f"Found {len(expected_pk_values)} unique partition keys before split") @@ -220,29 +208,33 @@ async def test_query_with_feed_range_async_during_partition_split_combined_async # Test 1: Basic query with stale feed ranges (SDK should handle split) actual_pk_values = set() - query = 'SELECT * from c' + query = "SELECT * from c" for feed_range in feed_ranges_before_split: items = [item async for item in container.query_items(query=query, feed_range=feed_range)] await add_all_pk_values_to_set_async(items, actual_pk_values) - assert expected_pk_values == actual_pk_values, f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values)}" + assert ( + expected_pk_values == actual_pk_values + ), f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values)}" print("Test 1 (basic query with stale feed ranges) passed") # Test 2: Order by query with stale feed ranges actual_pk_values_order_by = set() - query_order_by = 'SELECT * FROM c ORDER BY c.id' + query_order_by = "SELECT * FROM c ORDER BY c.id" for feed_range in feed_ranges_before_split: items = [item async for item in container.query_items(query=query_order_by, feed_range=feed_range)] await add_all_pk_values_to_set_async(items, actual_pk_values_order_by) - assert expected_pk_values == actual_pk_values_order_by, f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values_order_by)}" + assert ( + expected_pk_values == actual_pk_values_order_by + ), f"Expected {len(expected_pk_values)} PKs, got {len(actual_pk_values_order_by)}" print("Test 2 (order by query with stale feed ranges) passed") # Test 3: Count aggregate query with stale feed ranges post_split_count = 0 - query_count = 'SELECT VALUE COUNT(1) FROM c' + query_count = "SELECT VALUE COUNT(1) FROM c" for i, feed_range in enumerate(feed_ranges_before_split): items = [item async for item in container.query_items(query=query_count, feed_range=feed_range)] @@ -268,10 +260,10 @@ async def test_query_with_feed_range_async_during_partition_split_combined_async print("Test 4 (sum aggregate with stale feed ranges) passed") @pytest.mark.skip(reason="Covered by test_query_with_feed_range_async_during_partition_split_combined_async") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_feed_range_async_during_partition_split_async(self, container_id): container = await get_container(container_id) - query = 'SELECT * from c' + query = "SELECT * from c" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -279,20 +271,15 @@ async def test_query_with_feed_range_async_during_partition_split_async(self, co feed_ranges = [feed_range async for feed_range in container.read_feed_ranges()] await test_config.TestConfig.trigger_split_async(container, 11000) for feed_range in feed_ranges: - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range - ) - )] + items = [item async for item in (container.query_items(query=query, feed_range=feed_range))] await add_all_pk_values_to_set_async(items, actual_pk_values) assert expected_pk_values == actual_pk_values @pytest.mark.skip(reason="Covered by test_query_with_feed_range_async_during_partition_split_combined_async") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_order_by_and_feed_range_async_during_partition_split_async(self, container_id): container = await get_container(container_id) - query = 'SELECT * FROM c ORDER BY c.id' + query = "SELECT * FROM c ORDER BY c.id" expected_pk_values = set(PK_VALUES) actual_pk_values = set() @@ -301,18 +288,13 @@ async def test_query_with_order_by_and_feed_range_async_during_partition_split_a await test_config.TestConfig.trigger_split_async(container, 11000) for feed_range in feed_ranges: - items = [item async for item in - (container.query_items( - query=query, - feed_range=feed_range - ) - )] + items = [item async for item in (container.query_items(query=query, feed_range=feed_range))] await add_all_pk_values_to_set_async(items, actual_pk_values) assert expected_pk_values == actual_pk_values @pytest.mark.skip(reason="Covered by test_query_with_feed_range_async_during_partition_split_combined_async") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_count_aggregate_and_feed_range_async_during_partition_split_async(self, container_id): container = await get_container(container_id) # Get initial counts per feed range before split @@ -321,7 +303,7 @@ async def test_query_with_count_aggregate_and_feed_range_async_during_partition_ initial_total_count = 0 for i, feed_range in enumerate(feed_ranges): - query = 'SELECT VALUE COUNT(1) FROM c' + query = "SELECT VALUE COUNT(1) FROM c" items = [item async for item in container.query_items(query=query, feed_range=feed_range)] count = items[0] if items else 0 print(f"Feed range {i} count BEFORE split: {count}") @@ -335,7 +317,7 @@ async def test_query_with_count_aggregate_and_feed_range_async_during_partition_ # Query with aggregate after split using original feed ranges post_split_total_count = 0 for i, feed_range in enumerate(feed_ranges): - query = 'SELECT VALUE COUNT(1) FROM c' + query = "SELECT VALUE COUNT(1) FROM c" items = [item async for item in container.query_items(query=query, feed_range=feed_range)] count = items[0] if items else 0 print(f"Original feed range {i} count AFTER split: {count}") @@ -354,7 +336,7 @@ async def test_query_with_count_aggregate_and_feed_range_async_during_partition_ assert post_split_total_count == len(PK_VALUES) @pytest.mark.skip(reason="Covered by test_query_with_feed_range_async_during_partition_split_combined_async") - @pytest.mark.parametrize('container_id', TEST_CONTAINERS_IDS) + @pytest.mark.parametrize("container_id", TEST_CONTAINERS_IDS) async def test_query_with_sum_aggregate_and_feed_range_async_during_partition_split_async(self, container_id): container = await get_container(container_id) # Get initial sums per feed range before split @@ -385,38 +367,37 @@ async def test_query_with_sum_aggregate_and_feed_range_async_during_partition_sp assert initial_total_sum == post_split_total_sum assert post_split_total_sum == expected_total_sum - async def test_query_with_static_continuation_async(self): container = await get_container(SINGLE_PARTITION_CONTAINER_ID) - query = 'SELECT * from c' + query = "SELECT * from c" # verify continuation token does not have any impact for i in range(10): query_by_page = container.query_items( query=query, feed_range={ - 'Range': {'isMaxInclusive': False, 'isMinInclusive': True, - 'max': '1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE', - 'min': '0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'}}, + "Range": { + "isMaxInclusive": False, + "isMinInclusive": True, + "max": "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE", + "min": "0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", + } + }, max_item_count=1, - continuation='-RID:~a0NPAOszCpOChB4AAAAAAA==#RT:1#TRC:2#ISV:2#IEO:65567#QCF:8').by_page() + continuation="-RID:~a0NPAOszCpOChB4AAAAAAA==#RT:1#TRC:2#ISV:2#IEO:65567#QCF:8", + ).by_page() async for page in query_by_page: items = [item async for item in page] assert len(items) > 0 async def test_query_with_continuation_async(self): container = await get_container(SINGLE_PARTITION_CONTAINER_ID) - query = 'SELECT * from c' + query = "SELECT * from c" # go through all feed ranges using pagination feed_ranges = container.read_feed_ranges() async for feed in feed_ranges: - query_kwargs = { - "query": query, - "feed_range": feed, - "priority": "Low", - "max_item_count": 1 - } + query_kwargs = {"query": query, "feed_range": feed, "priority": "Low", "max_item_count": 1} query_results = container.query_items(**query_kwargs) pager = query_results.by_page() first_page = await pager.__anext__() @@ -429,7 +410,7 @@ async def test_query_with_continuation_async(self): "feed_range": feed, "continuation": continuation_token, "priority": "Low", - "max_item_count": 2 + "max_item_count": 2, } query_results = container.query_items(**query_kwargs) pager = query_results.by_page(continuation_token=continuation_token) @@ -437,5 +418,6 @@ async def test_query_with_continuation_async(self): items = [item async for item in new_page] assert len(items) > 0 + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search.py b/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search.py index 39ef0525719b..02a9f7de4487 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search.py @@ -16,6 +16,7 @@ from azure.cosmos import http_constants, DatabaseProxy from azure.cosmos.partition_key import PartitionKey + @pytest.mark.cosmosSearchQuery class TestFullTextHybridSearchQuery(unittest.TestCase): """Test to check full text search and hybrid search queries behavior.""" @@ -30,12 +31,12 @@ class TestFullTextHybridSearchQuery(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.test_db = cls.client.create_database(str(uuid.uuid4())) @@ -44,11 +45,12 @@ def setUpClass(cls): partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_full_text_indexing_policy(path="/text"), - full_text_policy=test_config.get_full_text_policy(path="/text")) + full_text_policy=test_config.get_full_text_policy(path="/text"), + ) data = hybrid_search_data.get_full_text_items() for index, item in enumerate(data.get("items")): - item['id'] = str(index) - item['pk'] = str((index % 2) + 1) + item["id"] = str(index) + item["pk"] = str((index % 2) + 1) cls.test_container.create_item(item) # Need to give the container time to index all the recently added items - 10 minutes seems to work # time.sleep(5 * 60) @@ -70,130 +72,164 @@ def test_wrong_hybrid_search_queries(self): except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST # TODO: This message seems to differ depending on machine as well - assert ("One of the input values is invalid" in e.message or - "Syntax error, incorrect syntax near 'FROM'" in e.message) + assert ( + "One of the input values is invalid" in e.message + or "Syntax error, incorrect syntax near 'FROM'" in e.message + ) try: - query = "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" \ - " ORDER BY RANK FullTextScore(c.title, 'John') DESC" + query = ( + "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" + " ORDER BY RANK FullTextScore(c.title, 'John') DESC" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) list(results) pytest.fail("Attempting to set an ordering direction in a full text score query should fail.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST - assert ("One of the input values is invalid" in e.message or - "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message) + assert ( + "One of the input values is invalid" in e.message + or "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message + ) try: - query = "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" \ - " ORDER BY RANK RRF(FullTextScore(c.title, 'John'), VectorDistance(c.vector, [1,2,3])) DESC" + query = ( + "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" + " ORDER BY RANK RRF(FullTextScore(c.title, 'John'), VectorDistance(c.vector, [1,2,3])) DESC" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) list(results) pytest.fail("Attempting to set an ordering direction in a hybrid search query should fail.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST # TODO: Find why this behavior is inconsistent across runs - message should be the same - assert ("One of the input values is invalid" in e.message or - "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message) + assert ( + "One of the input values is invalid" in e.message + or "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message + ) def test_hybrid_search_env_variables(self): os.environ["AZURE_COSMOS_HYBRID_SEARCH_MAX_ITEMS"] = "0" try: - query = "SELECT TOP 1 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " \ - "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + query = ( + "SELECT TOP 1 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " + "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) [item for item in results] pytest.fail("Config was not applied properly.") except ValueError as e: - assert e.args[0] == ("Executing a hybrid search query with more items than the max is not allowed. " - "Please ensure you are using a limit smaller than the max, or change the max.") + assert e.args[0] == ( + "Executing a hybrid search query with more items than the max is not allowed. " + "Please ensure you are using a limit smaller than the max, or change the max." + ) finally: os.environ["AZURE_COSMOS_HYBRID_SEARCH_MAX_ITEMS"] = "1000" def test_hybrid_search_queries(self): - query = "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " \ - "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + query = ( + "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " + "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 3 for res in result_list: - assert res['index'] in [2, 85, 57] + assert res["index"] in [2, 85, 57] - query = "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" \ - " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + query = ( + "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" + " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 3 for res in result_list: - assert res['index'] in [2, 85, 57] + assert res["index"] in [2, 85, 57] - query = "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" \ - " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John') OFFSET 1 LIMIT 5" + query = ( + "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" + " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John') OFFSET 1 LIMIT 5" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 2 for res in result_list: - assert res['index'] in [85, 57] + assert res["index"] in [85, 57] - query = "SELECT TOP 20 c.index, c.title, c.text FROM c WHERE FullTextContains(c.title, 'John') OR " \ - "FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + query = ( + "SELECT TOP 20 c.index, c.title, c.text FROM c WHERE FullTextContains(c.title, 'John') OR " + "FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 13 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] - query = "SELECT TOP 10 c.index, c.title, c.text FROM c WHERE " \ - "FullTextContains(c.title, 'John') OR FullTextContains(c.text, 'John') OR " \ - "FullTextContains(c.text, 'United States') ORDER BY RANK RRF(FullTextScore(c.title, 'John')," \ - " FullTextScore(c.text, 'United States'))" + query = ( + "SELECT TOP 10 c.index, c.title, c.text FROM c WHERE " + "FullTextContains(c.title, 'John') OR FullTextContains(c.text, 'John') OR " + "FullTextContains(c.text, 'United States') ORDER BY RANK RRF(FullTextScore(c.title, 'John')," + " FullTextScore(c.text, 'United States'))" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 10 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] - query = "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" \ - " OR FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') ORDER BY " \ - "RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) OFFSET 5 LIMIT 10" + query = ( + "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" + " OR FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') ORDER BY " + "RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) OFFSET 5 LIMIT 10" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 8 for res in result_list: - assert res['index'] in [24, 77, 76, 80, 25, 22, 2, 66, 57, 85] + assert res["index"] in [24, 77, 76, 80, 25, 22, 2, 66, 57, 85] - query = "SELECT TOP 10 c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + query = ( + "SELECT TOP 10 c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 10 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " \ - "OFFSET 0 LIMIT 13" + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " + "OFFSET 0 LIMIT 13" + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 13 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 1, 4] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 1, 4] - item_vector = self.test_container.read_item('50', '1')['vector'] - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + item_vector = self.test_container.read_item("50", "1")["vector"] + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 10 for res in result_list: - assert res['index'] in [51, 54, 28, 70, 24, 61, 56, 26, 58, 77, 2, 68] + assert res["index"] in [51, 54, 28, 70, 24, 61, 56, 26, 58, 77, 2, 68] def test_hybrid_search_query_pagination(self): - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " \ - "OFFSET 0 LIMIT 13" + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " + "OFFSET 0 LIMIT 13" + ) query_iterable = self.test_container.query_items(query, enable_cross_partition_query=True, max_item_count=5) all_fetched_res = [] count = 0 @@ -205,23 +241,29 @@ def test_hybrid_search_query_pagination(self): assert len(all_fetched_res) == 13 def test_hybrid_search_cross_partition_query_response_hook(self): - item_vector = self.test_container.read_item('50', '1')['vector'] + item_vector = self.test_container.read_item("50", "1")["vector"] response_hook = test_config.ResponseHookCaller() - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) results = self.test_container.query_items(query, enable_cross_partition_query=True, response_hook=response_hook) result_list = list(results) assert len(result_list) == 10 - assert response_hook.count == 6 # one global stat query per partition, two queries per partition for each component query + assert ( + response_hook.count == 6 + ) # one global stat query per partition, two queries per partition for each component query def test_hybrid_search_partitioned_query_response_hook(self): - item_vector = self.test_container.read_item('50', '1')['vector'] + item_vector = self.test_container.read_item("50", "1")["vector"] response_hook = test_config.ResponseHookCaller() - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) - results = self.test_container.query_items(query, partition_key='1', response_hook=response_hook) + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) + results = self.test_container.query_items(query, partition_key="1", response_hook=response_hook) result_list = list(results) assert len(result_list) == 10 assert response_hook.count == 1 @@ -235,7 +277,7 @@ def test_hybrid_search_weighted_reciprocal_rank_fusion(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, 1]) """ results = self.test_container.query_items(query, enable_cross_partition_query=True) - result_list = [res['Index'] for res in results] + result_list = [res["Index"] for res in results] # If some scores rank the same the order of the results may change for result in result_list: assert result in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] @@ -248,7 +290,7 @@ def test_hybrid_search_weighted_reciprocal_rank_fusion(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [10, 10]) """ results = self.test_container.query_items(query, enable_cross_partition_query=True) - result_list = [res['Index'] for res in results] + result_list = [res["Index"] for res in results] # If some scores rank the same the order of the results may change for result in result_list: assert result in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] @@ -261,7 +303,7 @@ def test_hybrid_search_weighted_reciprocal_rank_fusion(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [0.1, 0.1]) """ results = self.test_container.query_items(query, enable_cross_partition_query=True) - result_list = [res['Index'] for res in results] + result_list = [res["Index"] for res in results] for result in result_list: assert result in [61, 51, 49, 54, 75, 24, 77, 76, 80, 2, 25] @@ -273,20 +315,22 @@ def test_hybrid_search_weighted_reciprocal_rank_fusion(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [-1, -1]) """ results = self.test_container.query_items(query, enable_cross_partition_query=True) - result_list = [res['Index'] for res in results] + result_list = [res["Index"] for res in results] # If some scores rank the same the order of the results may change for result in result_list: assert result in [85, 57, 66, 2, 22, 25, 77, 76, 80, 75, 24, 49, 54, 51, 81, 61] # Test case 5 - item_vector = self.test_container.read_item('50', '1')['vector'] - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {}), [1,1]) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + item_vector = self.test_container.read_item("50", "1")["vector"] + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {}), [1,1]) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) results = self.test_container.query_items(query, enable_cross_partition_query=True) result_list = list(results) assert len(result_list) == 10 - result_list = [res['index'] for res in result_list] + result_list = [res["index"] for res in result_list] assert result_list == [51, 54, 28, 70, 56, 24, 26, 61, 58, 68] def test_invalid_hybrid_search_queries_weighted_reciprocal_rank_fusion(self): @@ -305,29 +349,35 @@ def test_weighted_vs_non_weighted_reciprocal_rank_fusion(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) """ results_non_weighted = self.test_container.query_items(query_non_weighted, enable_cross_partition_query=True) - result_list_non_weighted = [res['index'] for res in results_non_weighted] + result_list_non_weighted = [res["index"] for res in results_non_weighted] # Weighted RRF query with equal weights query_weighted_equal = """ SELECT TOP 10 c.index, c.title FROM c ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, 1]) """ - results_weighted_equal = self.test_container.query_items(query_weighted_equal, - enable_cross_partition_query=True) - result_list_weighted_equal = [res['index'] for res in results_weighted_equal] + results_weighted_equal = self.test_container.query_items( + query_weighted_equal, enable_cross_partition_query=True + ) + result_list_weighted_equal = [res["index"] for res in results_weighted_equal] # Weighted RRF query with different direction weights query_weighted_different = """ SELECT TOP 10 c.index, c.title FROM c ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, -0.5]) """ - results_weighted_different = self.test_container.query_items(query_weighted_different, - enable_cross_partition_query=True) - result_list_weighted_different = [res['index'] for res in results_weighted_different] + results_weighted_different = self.test_container.query_items( + query_weighted_different, enable_cross_partition_query=True + ) + result_list_weighted_different = [res["index"] for res in results_weighted_different] # Assertions - assert result_list_non_weighted == result_list_weighted_equal, "Non-weighted and equally weighted RRF results should match." - assert result_list_non_weighted != result_list_weighted_different, "Non-weighted and differently weighted RRF results should not match." + assert ( + result_list_non_weighted == result_list_weighted_equal + ), "Non-weighted and equally weighted RRF results should match." + assert ( + result_list_non_weighted != result_list_weighted_different + ), "Non-weighted and differently weighted RRF results should not match." def test_weighted_reciprocal_rank_fusion_with_missing_or_extra_weights(self): try: @@ -336,7 +386,7 @@ def test_weighted_reciprocal_rank_fusion_with_missing_or_extra_weights(self): SELECT TOP 10 c.index, c.title FROM c ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1]) """ - + res = self.test_container.query_items(query_missing_weight, enable_cross_partition_query=True) list(res) pytest.fail("Query with missing weights should fail.") @@ -359,8 +409,9 @@ def test_weighted_reciprocal_rank_fusion_with_response_hook(self): SELECT TOP 10 c.index, c.title FROM c ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, 0.5]) """ - results = self.test_container.query_items(query_weighted_rrf, enable_cross_partition_query=True, - response_hook=response_hook) + results = self.test_container.query_items( + query_weighted_rrf, enable_cross_partition_query=True, response_hook=response_hook + ) result_list = list(results) assert len(result_list) == 10 assert response_hook.count > 0 # Ensure the response hook was called @@ -427,11 +478,13 @@ def test_weighted_rrf_hybrid_search_with_params_and_response_hook(self): def test_hybrid_and_non_hybrid_param_queries_equivalence(self): # Hybrid query with vector distance (literal vs param) and compare equality - item = self.test_container.read_item('50', '1') - item_vector = item['vector'] - literal_hybrid = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + item = self.test_container.read_item("50", "1") + item_vector = item["vector"] + literal_hybrid = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) literal_hybrid_results = self.test_container.query_items(literal_hybrid, enable_cross_partition_query=True) literal_hybrid_results = list(literal_hybrid_results) literal_hybrid_indices = [res["index"] for res in literal_hybrid_results] diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search_async.py b/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search_async.py index da68ae5b384c..51567969d4c2 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_hybrid_search_async.py @@ -29,12 +29,12 @@ class TestFullTextHybridSearchQueryAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.sync_client = CosmosSyncClient(cls.host, cls.masterKey) cls.test_db = cls.sync_client.create_database(str(uuid.uuid4())) cls.test_container = cls.test_db.create_container( @@ -42,11 +42,12 @@ def setUpClass(cls): partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_full_text_indexing_policy(path="/text"), - full_text_policy=test_config.get_full_text_policy(path="/text")) + full_text_policy=test_config.get_full_text_policy(path="/text"), + ) data = hybrid_search_data.get_full_text_items() for index, item in enumerate(data.get("items")): - item['id'] = str(index) - item['pk'] = str((index % 2) + 1) + item["id"] = str(index) + item["pk"] = str((index % 2) + 1) cls.test_container.create_item(item) @classmethod @@ -72,130 +73,164 @@ async def test_wrong_hybrid_search_queries_async(self): pytest.fail("Attempting to project RRF in a query should fail.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST - assert ("One of the input values is invalid" in e.message or - "Syntax error, incorrect syntax near 'FROM'" in e.message) + assert ( + "One of the input values is invalid" in e.message + or "Syntax error, incorrect syntax near 'FROM'" in e.message + ) try: - query = "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" \ - " ORDER BY RANK FullTextScore(c.title, 'John') DESC" + query = ( + "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" + " ORDER BY RANK FullTextScore(c.title, 'John') DESC" + ) results = self.test_container.query_items(query) [item async for item in results] pytest.fail("Attempting to set an ordering direction in a full text score query should fail.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST - assert ("One of the input values is invalid" in e.message or - "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message) + assert ( + "One of the input values is invalid" in e.message + or "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message + ) try: - query = "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" \ - " ORDER BY RANK RRF(FullTextScore(c.title, 'John'), VectorDistance(c.vector, [1,2,3])) DESC" + query = ( + "SELECT TOP 10 c.index FROM c WHERE FullTextContains(c.title, 'John')" + " ORDER BY RANK RRF(FullTextScore(c.title, 'John'), VectorDistance(c.vector, [1,2,3])) DESC" + ) results = self.test_container.query_items(query) [item async for item in results] pytest.fail("Attempting to set an ordering direction in a hybrid search query should fail.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST - assert ("One of the input values is invalid" in e.message or - "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message) + assert ( + "One of the input values is invalid" in e.message + or "Specifying a sort order (ASC or DESC) in the ORDER BY RANK clause is not allowed." in e.message + ) async def test_hybrid_search_env_variables_async(self): os.environ["AZURE_COSMOS_HYBRID_SEARCH_MAX_ITEMS"] = "0" try: - query = "SELECT TOP 1 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " \ - "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + query = ( + "SELECT TOP 1 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " + "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + ) results = self.test_container.query_items(query) [item async for item in results] pytest.fail("Config was not applied properly.") except ValueError as e: - assert e.args[0] == ("Executing a hybrid search query with more items than the max is not allowed. " - "Please ensure you are using a limit smaller than the max, or change the max.") + assert e.args[0] == ( + "Executing a hybrid search query with more items than the max is not allowed. " + "Please ensure you are using a limit smaller than the max, or change the max." + ) finally: os.environ["AZURE_COSMOS_HYBRID_SEARCH_MAX_ITEMS"] = "1000" async def test_hybrid_search_queries_async(self): - query = "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " \ - "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + query = ( + "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " + "FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 3 for res in result_list: - assert res['index'] in [2, 85, 57] + assert res["index"] in [2, 85, 57] - query = "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" \ - " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + query = ( + "SELECT TOP 10 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" + " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John')" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 3 for res in result_list: - assert res['index'] in [2, 85, 57] + assert res["index"] in [2, 85, 57] - query = "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" \ - " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John') OFFSET 1 LIMIT 5" + query = ( + "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" + " OR FullTextContains(c.text, 'John') ORDER BY RANK FullTextScore(c.title, 'John') OFFSET 1 LIMIT 5" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 2 for res in result_list: - assert res['index'] in [85, 57] + assert res["index"] in [85, 57] - query = "SELECT TOP 20 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " \ - "FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + query = ( + "SELECT TOP 20 c.index, c.title FROM c WHERE FullTextContains(c.title, 'John') OR " + "FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 13 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] - query = "SELECT TOP 10 c.index, c.title FROM c WHERE " \ - "FullTextContains(c.title, 'John') OR FullTextContains(c.text, 'John') OR " \ - "FullTextContains(c.text, 'United States') ORDER BY RANK RRF(FullTextScore(c.title, 'John')," \ - " FullTextScore(c.text, 'United States'))" + query = ( + "SELECT TOP 10 c.index, c.title FROM c WHERE " + "FullTextContains(c.title, 'John') OR FullTextContains(c.text, 'John') OR " + "FullTextContains(c.text, 'United States') ORDER BY RANK RRF(FullTextScore(c.title, 'John')," + " FullTextScore(c.text, 'United States'))" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 10 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] - query = "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" \ - " OR FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') ORDER BY " \ - "RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) OFFSET 5 LIMIT 10" + query = ( + "SELECT c.index, c.title FROM c WHERE FullTextContains(c.title, 'John')" + " OR FullTextContains(c.text, 'John') OR FullTextContains(c.text, 'United States') ORDER BY " + "RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) OFFSET 5 LIMIT 10" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 8 for res in result_list: - assert res['index'] in [24, 77, 76, 80, 25, 22, 2, 66, 57, 85] + assert res["index"] in [24, 77, 76, 80, 25, 22, 2, 66, 57, 85] - query = "SELECT TOP 10 c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + query = ( + "SELECT TOP 10 c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'))" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 10 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 2] - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " \ - "OFFSET 0 LIMIT 13" + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " + "OFFSET 0 LIMIT 13" + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 13 for res in result_list: - assert res['index'] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 1, 4] + assert res["index"] in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 1, 4] - read_item = await self.test_container.read_item('50', '1') - item_vector = read_item['vector'] - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + read_item = await self.test_container.read_item("50", "1") + item_vector = read_item["vector"] + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) results = self.test_container.query_items(query) result_list = [item async for item in results] assert len(result_list) == 10 for res in result_list: - assert res['index'] in [51, 54, 28, 70, 24, 61, 56, 26, 58, 77, 2, 68] + assert res["index"] in [51, 54, 28, 70, 24, 61, 56, 26, 58, 77, 2, 68] async def test_hybrid_search_query_pagination_async(self): - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " \ - "OFFSET 0 LIMIT 13" + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) " + "OFFSET 0 LIMIT 13" + ) query_iterable = self.test_container.query_items(query, max_item_count=5) all_fetched_res = [] count = 0 @@ -207,25 +242,31 @@ async def test_hybrid_search_query_pagination_async(self): assert len(all_fetched_res) == 13 async def test_hybrid_search_cross_partition_query_response_hook_async(self): - item = await self.test_container.read_item('50', '1') - item_vector = item['vector'] + item = await self.test_container.read_item("50", "1") + item_vector = item["vector"] response_hook = test_config.ResponseHookCaller() - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) results = self.test_container.query_items(query, response_hook=response_hook) result_list = [item async for item in results] assert len(result_list) == 10 - assert response_hook.count == 6 # one global stat query per partition, two queries per partition for each component query + assert ( + response_hook.count == 6 + ) # one global stat query per partition, two queries per partition for each component query async def test_hybrid_search_partitioned_query_response_hook_async(self): - item = await self.test_container.read_item('50', '1') - item_vector = item['vector'] + item = await self.test_container.read_item("50", "1") + item_vector = item["vector"] response_hook = test_config.ResponseHookCaller() - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " \ - "OFFSET 0 LIMIT 10".format(item_vector) - results = self.test_container.query_items(query, partition_key='1', response_hook=response_hook) + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) + results = self.test_container.query_items(query, partition_key="1", response_hook=response_hook) result_list = [item async for item in results] assert len(result_list) == 10 assert response_hook.count == 1 @@ -239,7 +280,7 @@ async def test_hybrid_search_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, 1]) """ results = self.test_container.query_items(query) - result_list = [res['Index'] async for res in results] + result_list = [res["Index"] async for res in results] # If some scores rank the same the order of the results may change for result in result_list: assert result in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] @@ -252,7 +293,7 @@ async def test_hybrid_search_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [10, 10]) """ results = self.test_container.query_items(query) - result_list = [res['Index'] async for res in results] + result_list = [res["Index"] async for res in results] # If some scores rank the same the order of the results may change for result in result_list: assert result in [61, 51, 49, 54, 75, 24, 77, 76, 80, 25, 22, 2, 66, 57, 85] @@ -265,7 +306,7 @@ async def test_hybrid_search_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [0.1, 0.1]) """ results = self.test_container.query_items(query) - result_list = [res['Index'] async for res in results] + result_list = [res["Index"] async for res in results] for result in result_list: assert result in [61, 51, 49, 54, 75, 24, 77, 76, 80, 2, 25] @@ -277,21 +318,23 @@ async def test_hybrid_search_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [-1, -1]) """ results = self.test_container.query_items(query) - result_list = [res['Index'] async for res in results] + result_list = [res["Index"] async for res in results] # If some scores rank the same the order of the results may change for result in result_list: assert result in [85, 57, 66, 2, 22, 25, 77, 76, 80, 75, 24, 49, 54, 51, 81, 61] # Test case 5 - read_item = await self.test_container.read_item('50', '1') - item_vector = read_item['vector'] - query = "SELECT c.index, c.title FROM c " \ - "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {}), [1,1]) " \ - "OFFSET 0 LIMIT 10".format(item_vector) + read_item = await self.test_container.read_item("50", "1") + item_vector = read_item["vector"] + query = ( + "SELECT c.index, c.title FROM c " + "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {}), [1,1]) " + "OFFSET 0 LIMIT 10".format(item_vector) + ) results = self.test_container.query_items(query) result_list = [res async for res in results] assert len(result_list) == 10 - result_list = [res['index'] for res in result_list] + result_list = [res["index"] for res in result_list] assert result_list == [51, 54, 28, 70, 56, 24, 26, 61, 58, 68] async def test_invalid_hybrid_search_queries_weighted_reciprocal_rank_fusion_async(self): @@ -310,7 +353,7 @@ async def test_weighted_vs_non_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States')) """ results_non_weighted = self.test_container.query_items(query_non_weighted) - result_list_non_weighted = [res['index'] async for res in results_non_weighted] + result_list_non_weighted = [res["index"] async for res in results_non_weighted] # Weighted RRF query with equal weights query_weighted_equal = """ @@ -318,7 +361,7 @@ async def test_weighted_vs_non_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, 1]) """ results_weighted_equal = self.test_container.query_items(query_weighted_equal) - result_list_weighted_equal = [res['index'] async for res in results_weighted_equal] + result_list_weighted_equal = [res["index"] async for res in results_weighted_equal] # Weighted RRF query with different direction weights query_weighted_different = """ @@ -326,11 +369,15 @@ async def test_weighted_vs_non_weighted_reciprocal_rank_fusion_async(self): ORDER BY RANK RRF(FullTextScore(c.title, 'John'), FullTextScore(c.text, 'United States'), [1, -0.5]) """ results_weighted_different = self.test_container.query_items(query_weighted_different) - result_list_weighted_different = [res['index'] async for res in results_weighted_different] + result_list_weighted_different = [res["index"] async for res in results_weighted_different] # Assertions - assert result_list_non_weighted == result_list_weighted_equal, "Non-weighted and equally weighted RRF results should match." - assert result_list_non_weighted != result_list_weighted_different, "Non-weighted and differently direction weighted RRF results should not match." + assert ( + result_list_non_weighted == result_list_weighted_equal + ), "Non-weighted and equally weighted RRF results should match." + assert ( + result_list_non_weighted != result_list_weighted_different + ), "Non-weighted and differently direction weighted RRF results should not match." async def test_weighted_reciprocal_rank_fusion_with_missing_or_extra_weights_async(self): try: @@ -386,9 +433,7 @@ async def test_hybrid_search_query_with_params_equivalence_async(self): "ORDER BY RANK FullTextScore(c.title, @term)" ) params = [{"name": "@term", "value": "John"}] - param_results = self.test_container.query_items( - param_query, parameters=params - ) + param_results = self.test_container.query_items(param_query, parameters=params) param_results = [res async for res in param_results] param_indices = [res["index"] for res in param_results] @@ -417,9 +462,7 @@ async def test_weighted_rrf_hybrid_search_with_params_and_response_hook_async(se {"name": "@textTerm", "value": "United States"}, {"name": "@weights", "value": [1, 0.5]}, ] - param_results = self.test_container.query_items( - param_query, parameters=params, response_hook=response_hook - ) + param_results = self.test_container.query_items(param_query, parameters=params, response_hook=response_hook) param_results = [res async for res in param_results] param_indices = [res["index"] for res in param_results] @@ -430,8 +473,8 @@ async def test_weighted_rrf_hybrid_search_with_params_and_response_hook_async(se async def test_hybrid_and_non_hybrid_param_queries_equivalence_async(self): # Hybrid query with vector distance (literal vs param) and compare equality - item = await self.test_container.read_item('50', '1') - item_vector = item['vector'] + item = await self.test_container.read_item("50", "1") + item_vector = item["vector"] literal_hybrid = ( "SELECT c.index, c.title FROM c " "ORDER BY RANK RRF(FullTextScore(c.text, 'United States'), VectorDistance(c.vector, {})) " @@ -450,9 +493,7 @@ async def test_hybrid_and_non_hybrid_param_queries_equivalence_async(self): {"name": "@country", "value": "United States"}, {"name": "@vec", "value": item_vector}, ] - param_hybrid_results = self.test_container.query_items( - param_hybrid, parameters=params_hybrid - ) + param_hybrid_results = self.test_container.query_items(param_hybrid, parameters=params_hybrid) param_hybrid_results = [res async for res in param_hybrid_results] param_hybrid_indices = [res["index"] for res in param_hybrid_results] @@ -468,9 +509,7 @@ async def test_hybrid_and_non_hybrid_param_queries_equivalence_async(self): param_simple = "SELECT TOP 5 c.index FROM c WHERE c.pk = @pk ORDER BY c.index" params_simple = [{"name": "@pk", "value": "1"}] - param_simple_results = self.test_container.query_items( - param_simple, parameters=params_simple - ) + param_simple_results = self.test_container.query_items(param_simple, parameters=params_simple) param_simple_results = [res async for res in param_simple_results] param_simple_indices = [res["index"] for res in param_simple_results] diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_response_headers.py b/sdk/cosmos/azure-cosmos/tests/test_query_response_headers.py index fa19a101a4d1..6bc430ffae3e 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_response_headers.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_response_headers.py @@ -49,9 +49,7 @@ def test_query_response_headers_single_page(self): query = "SELECT * FROM c WHERE c.pk = @pk" query_iterable = created_collection.query_items( - query=query, - parameters=[{"name": "@pk", "value": "test"}], - partition_key="test" + query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test" ) # Iterate through items using for loop (pagination) @@ -97,7 +95,7 @@ def test_query_response_headers_multiple_pages(self): query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test", - max_item_count=5 # Force pagination with 5 items per page + max_item_count=5, # Force pagination with 5 items per page ) # Iterate through items using for loop (pagination) @@ -138,9 +136,7 @@ def test_query_response_headers_empty_result(self): query = "SELECT * FROM c WHERE c.pk = @pk" query_iterable = created_collection.query_items( - query=query, - parameters=[{"name": "@pk", "value": "nonexistent"}], - partition_key="nonexistent" + query=query, parameters=[{"name": "@pk", "value": "nonexistent"}], partition_key="nonexistent" ) # Iterate through items (should be empty) @@ -179,7 +175,7 @@ def test_query_response_headers_with_query_metrics(self): query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test", - populate_query_metrics=True + populate_query_metrics=True, ) # Iterate through items @@ -223,7 +219,7 @@ def test_query_response_headers_by_page_iteration(self): query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test", - max_item_count=3 # Force multiple pages + max_item_count=3, # Force multiple pages ) # Iterate by page @@ -258,10 +254,7 @@ def test_query_response_headers_returns_copies(self): created_collection.create_item(body={"pk": "test", "id": "item_1"}) query = "SELECT * FROM c" - query_iterable = created_collection.query_items( - query=query, - partition_key="test" - ) + query_iterable = created_collection.query_items(query=query, partition_key="test") # Iterate for item in query_iterable: @@ -283,7 +276,7 @@ def test_query_response_headers_returns_copies(self): def test_query_response_headers_thread_safety(self): """Test that response headers are captured correctly when multiple queries run concurrently. - + This test verifies that each query operation captures its own headers independently, without interference from concurrent queries. This is the key thread-safety guarantee. """ @@ -314,7 +307,7 @@ def run_query(partition_key: str, thread_id: int): parameters=[{"name": "@pk", "value": partition_key}], partition_key=partition_key, max_item_count=2, # Small page size to ensure multiple pages - populate_query_metrics=True + populate_query_metrics=True, ) # Consume all items @@ -326,7 +319,7 @@ def run_query(partition_key: str, thread_id: int): "partition_key": partition_key, "item_count": len(items), "header_count": len(headers), - "headers": headers + "headers": headers, } except Exception as e: with lock: @@ -339,7 +332,7 @@ def run_query(partition_key: str, thread_id: int): for i in range(num_threads): partition_key = f"partition_{i % num_partitions}" futures.append(executor.submit(run_query, partition_key, i)) - + # Wait for all to complete for future in as_completed(futures): future.result() # This will raise if the thread raised @@ -352,15 +345,14 @@ def run_query(partition_key: str, thread_id: int): # Verify each thread captured headers correctly for thread_id, result in results.items(): - self.assertEqual(result["item_count"], items_per_partition, - f"Thread {thread_id} got wrong item count") - self.assertGreater(result["header_count"], 0, - f"Thread {thread_id} should have captured headers") - + self.assertEqual(result["item_count"], items_per_partition, f"Thread {thread_id} got wrong item count") + self.assertGreater(result["header_count"], 0, f"Thread {thread_id} should have captured headers") + # Verify headers contain expected keys (basic sanity check) for header_dict in result["headers"]: - self.assertIn("x-ms-request-charge", header_dict, - f"Thread {thread_id} headers missing x-ms-request-charge") + self.assertIn( + "x-ms-request-charge", header_dict, f"Thread {thread_id} headers missing x-ms-request-charge" + ) # Verify that different threads have independent header lists # (modifying one doesn't affect others) @@ -368,7 +360,7 @@ def run_query(partition_key: str, thread_id: int): thread_ids = list(results.keys()) headers_0 = results[thread_ids[0]]["headers"] headers_1 = results[thread_ids[1]]["headers"] - + # They should be different objects self.assertIsNot(headers_0, headers_1) if len(headers_0) > 0 and len(headers_1) > 0: @@ -379,7 +371,7 @@ def run_query(partition_key: str, thread_id: int): def test_query_response_headers_concurrent_same_container(self): """Test concurrent queries on the same container with overlapping execution. - + This test specifically targets the race condition that would occur if headers were captured from a shared client.last_response_headers after fetch_next_block(). """ @@ -402,7 +394,7 @@ def run_synchronized_query(thread_id: int): parameters=[{"name": "@pk", "value": "shared"}], partition_key="shared", max_item_count=5, # Small pages = more fetches - populate_query_metrics=True + populate_query_metrics=True, ) # Wait for all threads to be ready @@ -416,9 +408,7 @@ def run_synchronized_query(thread_id: int): results[thread_id] = { "item_count": len(items), "header_count": len(headers), - "request_charges": [ - float(h.get("x-ms-request-charge", 0)) for h in headers - ] + "request_charges": [float(h.get("x-ms-request-charge", 0)) for h in headers], } threads = [] @@ -433,14 +423,11 @@ def run_synchronized_query(thread_id: int): # Verify all threads completed and got correct results self.assertEqual(len(results), 5) for thread_id, result in results.items(): - self.assertEqual(result["item_count"], 50, - f"Thread {thread_id} should have gotten all 50 items") - self.assertGreater(result["header_count"], 0, - f"Thread {thread_id} should have captured headers") + self.assertEqual(result["item_count"], 50, f"Thread {thread_id} should have gotten all 50 items") + self.assertGreater(result["header_count"], 0, f"Thread {thread_id} should have captured headers") # Each request should have a positive request charge for charge in result["request_charges"]: - self.assertGreater(charge, 0, - f"Thread {thread_id} should have positive request charges") + self.assertGreater(charge, 0, f"Thread {thread_id} should have positive request charges") finally: self.created_db.delete_container(created_collection.id) diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_response_headers_async.py b/sdk/cosmos/azure-cosmos/tests/test_query_response_headers_async.py index b55e9e4dfb4b..a11f7c1a9f02 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_response_headers_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_response_headers_async.py @@ -53,9 +53,7 @@ async def test_query_response_headers_single_page_async(self): query = "SELECT * FROM c WHERE c.pk = @pk" query_iterable = created_collection.query_items( - query=query, - parameters=[{"name": "@pk", "value": "test"}], - partition_key="test" + query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test" ) # Iterate through items using async for loop (pagination) @@ -106,7 +104,7 @@ async def test_query_response_headers_multiple_pages_async(self): query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test", - max_item_count=5 # Force pagination with 5 items per page + max_item_count=5, # Force pagination with 5 items per page ) # Iterate through items using async for loop (pagination) @@ -146,9 +144,7 @@ async def test_query_response_headers_empty_result_async(self): query = "SELECT * FROM c WHERE c.pk = @pk" query_iterable = created_collection.query_items( - query=query, - parameters=[{"name": "@pk", "value": "nonexistent"}], - partition_key="nonexistent" + query=query, parameters=[{"name": "@pk", "value": "nonexistent"}], partition_key="nonexistent" ) # Iterate through items (should be empty) @@ -186,7 +182,7 @@ async def test_query_response_headers_with_query_metrics_async(self): query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test", - populate_query_metrics=True + populate_query_metrics=True, ) # Iterate through items @@ -230,7 +226,7 @@ async def test_query_response_headers_by_page_iteration_async(self): query=query, parameters=[{"name": "@pk", "value": "test"}], partition_key="test", - max_item_count=3 # Force multiple pages + max_item_count=3, # Force multiple pages ) # Iterate by page @@ -265,10 +261,7 @@ async def test_query_response_headers_returns_copies_async(self): await created_collection.create_item(body={"pk": "test", "id": "item_1"}) query = "SELECT * FROM c" - query_iterable = created_collection.query_items( - query=query, - partition_key="test" - ) + query_iterable = created_collection.query_items(query=query, partition_key="test") # Iterate async for item in query_iterable: @@ -290,7 +283,7 @@ async def test_query_response_headers_returns_copies_async(self): async def test_query_response_headers_concurrent_async(self): """Test that response headers are captured correctly when multiple async queries run concurrently. - + This test verifies that each query operation captures its own headers independently, without interference from concurrent queries. This is the key thread-safety guarantee. """ @@ -315,7 +308,7 @@ async def run_query(partition_key: str, query_id: int): parameters=[{"name": "@pk", "value": partition_key}], partition_key=partition_key, max_item_count=2, # Small page size to ensure multiple pages - populate_query_metrics=True + populate_query_metrics=True, ) # Consume all items @@ -327,7 +320,7 @@ async def run_query(partition_key: str, query_id: int): "partition_key": partition_key, "item_count": len(items), "header_count": len(headers), - "headers": headers + "headers": headers, } # Run multiple queries concurrently using asyncio.gather @@ -344,21 +337,20 @@ async def run_query(partition_key: str, query_id: int): # Verify each query captured headers correctly for result in results: - assert result["item_count"] == items_per_partition, \ - f"Query {result['query_id']} got wrong item count" - assert result["header_count"] > 0, \ - f"Query {result['query_id']} should have captured headers" - + assert result["item_count"] == items_per_partition, f"Query {result['query_id']} got wrong item count" + assert result["header_count"] > 0, f"Query {result['query_id']} should have captured headers" + # Verify headers contain expected keys for header_dict in result["headers"]: - assert "x-ms-request-charge" in header_dict, \ - f"Query {result['query_id']} headers missing x-ms-request-charge" + assert ( + "x-ms-request-charge" in header_dict + ), f"Query {result['query_id']} headers missing x-ms-request-charge" # Verify that different queries have independent header lists if len(results) >= 2: headers_0 = results[0]["headers"] headers_1 = results[1]["headers"] - + # They should be different objects assert headers_0 is not headers_1 if len(headers_0) > 0 and len(headers_1) > 0: @@ -369,7 +361,7 @@ async def run_query(partition_key: str, query_id: int): async def test_query_response_headers_high_concurrency_async(self): """Test with high concurrency to stress-test the thread-safety. - + This test specifically targets the race condition that would occur if headers were captured from a shared client.last_response_headers after fetch operations. """ @@ -379,9 +371,7 @@ async def test_query_response_headers_high_concurrency_async(self): try: # Create enough items to ensure multiple pages for i in range(50): - await created_collection.create_item( - body={"pk": "shared", "id": f"item_{i}", "value": i} - ) + await created_collection.create_item(body={"pk": "shared", "id": f"item_{i}", "value": i}) # Use an event to synchronize all coroutines start_event = asyncio.Event() @@ -393,7 +383,7 @@ async def run_synchronized_query(query_id: int): parameters=[{"name": "@pk", "value": "shared"}], partition_key="shared", max_item_count=5, # Small pages = more fetches - populate_query_metrics=True + populate_query_metrics=True, ) # Wait for the start signal @@ -407,9 +397,7 @@ async def run_synchronized_query(query_id: int): "query_id": query_id, "item_count": len(items), "header_count": len(headers), - "request_charges": [ - float(h.get("x-ms-request-charge", 0)) for h in headers - ] + "request_charges": [float(h.get("x-ms-request-charge", 0)) for h in headers], } # Create tasks but don't start fetching yet @@ -431,14 +419,11 @@ async def run_synchronized_query(query_id: int): # Verify all queries completed correctly assert len(results) == num_concurrent for result in results: - assert result["item_count"] == 50, \ - f"Query {result['query_id']} should have gotten all 50 items" - assert result["header_count"] > 0, \ - f"Query {result['query_id']} should have captured headers" + assert result["item_count"] == 50, f"Query {result['query_id']} should have gotten all 50 items" + assert result["header_count"] > 0, f"Query {result['query_id']} should have captured headers" # Each request should have a positive request charge for charge in result["request_charges"]: - assert charge > 0, \ - f"Query {result['query_id']} should have positive request charges" + assert charge > 0, f"Query {result['query_id']} should have positive request charges" finally: await self.created_db.delete_container(created_collection.id) diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity.py b/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity.py index 6339dfbc6639..09edbcc9429a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity.py @@ -24,6 +24,7 @@ def verify_ordering(item_list, distance_function): for i in range(len(item_list) - 1): assert item_list[i]["SimilarityScore"] >= item_list[i + 1]["SimilarityScore"] + @pytest.mark.cosmosSearchQuery class TestVectorSimilarityQuery(unittest.TestCase): """Test to check vector similarity queries behavior.""" @@ -38,12 +39,12 @@ class TestVectorSimilarityQuery(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.test_db = cls.client.create_database(str(uuid.uuid4())) @@ -52,33 +53,37 @@ def setUpClass(cls): partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="quantizedFlat"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="cosine", - dimensions=128)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="cosine", dimensions=128 + ), + ) cls.created_flat_euclidean_container = cls.test_db.create_container( id="flat" + cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="flat"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="euclidean", - dimensions=128)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="euclidean", dimensions=128 + ), + ) cls.created_diskANN_dotproduct_container = cls.test_db.create_container( id="diskANN" + cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="diskANN"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="dotproduct", - dimensions=128)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="dotproduct", dimensions=128 + ), + ) cls.created_large_container = cls.test_db.create_container( id="large_container" + cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="quantizedFlat"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="cosine", - dimensions=2)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="cosine", dimensions=2 + ), + ) for item in vector_test_data.get_vector_items(): cls.created_quantized_cosine_container.create_item(item) cls.created_flat_euclidean_container.create_item(item) @@ -98,40 +103,52 @@ def tearDownClass(cls): def test_wrong_vector_search_queries(self): vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") # try to send a vector search query without limit filters - query = "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + query = ( + "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + ) try: list(self.created_large_container.query_items(query=query, enable_cross_partition_query=True)) pytest.fail("Client should not allow queries without filters.") except ValueError as e: - assert "Executing a vector search query without TOP or LIMIT can consume many RUs very fast and" \ - " have long runtimes. Please ensure you are using one of the two filters with your" \ - " vector search query." in e.args[0] + assert ( + "Executing a vector search query without TOP or LIMIT can consume many RUs very fast and" + " have long runtimes. Please ensure you are using one of the two filters with your" + " vector search query." in e.args[0] + ) # try to send a vector search query specifying the ordering as ASC or DESC - query = "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}]) ASC".format(vector_string, - vector_string) + query = ( + "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}]) ASC".format(vector_string, vector_string) + ) try: list(self.created_large_container.query_items(query=query, enable_cross_partition_query=True)) pytest.fail("Client should not allow queries with ASC/DESC.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST # TODO: Seems like this error message differs depending on Ubuntu vs. Windows runs? - assert ("One of the input values is invalid." in e.message - or "Specifying a sorting order (ASC or DESC) with VectorDistance function is not supported." in e.message) + assert ( + "One of the input values is invalid." in e.message + or "Specifying a sorting order (ASC or DESC) with VectorDistance function is not supported." + in e.message + ) def test_vector_search_environment_variables(self): vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 10 c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + query = ( + "SELECT TOP 10 c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + ) os.environ["AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"] = "1" try: [item for item in self.created_large_container.query_items(query=query, enable_cross_partition_query=True)] pytest.fail("Config was not set correctly.") except ValueError as e: - assert e.args[0] == ("Executing a vector search query with more items than the max is not allowed. " - "Please ensure you are using a limit smaller than the max, or change the max.") + assert e.args[0] == ( + "Executing a vector search query with more items than the max is not allowed. " + "Please ensure you are using a limit smaller than the max, or change the max." + ) os.environ["AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"] = "50000" [item for item in self.created_large_container.query_items(query=query, enable_cross_partition_query=True)] @@ -143,85 +160,119 @@ def test_ordering_distances(self): # test euclidean distance for i in range(1, 11): # we define queries with and without specs to directly use the embeddings in our container policies - vanilla_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(str(i), - vector_string, - vector_string) - specs_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}})" \ - .format(str(i), vector_string, vector_string) - - flat_list = list(self.created_flat_euclidean_container.query_items(query=vanilla_query, - enable_cross_partition_query=True)) + vanilla_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format( + str(i), vector_string, vector_string + ) + ) + specs_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}})".format( + str(i), vector_string, vector_string + ) + ) + + flat_list = list( + self.created_flat_euclidean_container.query_items( + query=vanilla_query, enable_cross_partition_query=True + ) + ) verify_ordering(flat_list, "euclidean") quantized_list = list( - self.created_quantized_cosine_container.query_items(query=specs_query, - enable_cross_partition_query=True)) + self.created_quantized_cosine_container.query_items( + query=specs_query, enable_cross_partition_query=True + ) + ) verify_ordering(quantized_list, "euclidean") disk_ann_list = list( - self.created_diskANN_dotproduct_container.query_items(query=specs_query, - enable_cross_partition_query=True)) + self.created_diskANN_dotproduct_container.query_items( + query=specs_query, enable_cross_partition_query=True + ) + ) verify_ordering(disk_ann_list, "euclidean") # test cosine distance for i in range(1, 11): - vanilla_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(str(i), - vector_string, - vector_string) - specs_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}})" \ - .format(str(i), vector_string, vector_string) + vanilla_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format( + str(i), vector_string, vector_string + ) + ) + specs_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}})".format( + str(i), vector_string, vector_string + ) + ) flat_list = list( - self.created_flat_euclidean_container.query_items(query=specs_query, enable_cross_partition_query=True)) + self.created_flat_euclidean_container.query_items(query=specs_query, enable_cross_partition_query=True) + ) verify_ordering(flat_list, "cosine") quantized_list = list( - self.created_quantized_cosine_container.query_items(query=vanilla_query, - enable_cross_partition_query=True)) + self.created_quantized_cosine_container.query_items( + query=vanilla_query, enable_cross_partition_query=True + ) + ) verify_ordering(quantized_list, "cosine") disk_ann_list = list( - self.created_diskANN_dotproduct_container.query_items(query=specs_query, - enable_cross_partition_query=True)) + self.created_diskANN_dotproduct_container.query_items( + query=specs_query, enable_cross_partition_query=True + ) + ) verify_ordering(disk_ann_list, "cosine") # test dot product distance for i in range(1, 11): - vanilla_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(str(i), - vector_string, - vector_string) - specs_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}})" \ - .format(str(i), vector_string, vector_string) + vanilla_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format( + str(i), vector_string, vector_string + ) + ) + specs_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}})".format( + str(i), vector_string, vector_string + ) + ) flat_list = list( - self.created_flat_euclidean_container.query_items(query=specs_query, enable_cross_partition_query=True)) + self.created_flat_euclidean_container.query_items(query=specs_query, enable_cross_partition_query=True) + ) verify_ordering(flat_list, "dotproduct") quantized_list = list( - self.created_quantized_cosine_container.query_items(query=specs_query, - enable_cross_partition_query=True)) + self.created_quantized_cosine_container.query_items( + query=specs_query, enable_cross_partition_query=True + ) + ) verify_ordering(quantized_list, "dotproduct") disk_ann_list = list( - self.created_diskANN_dotproduct_container.query_items(query=vanilla_query, - enable_cross_partition_query=True)) + self.created_diskANN_dotproduct_container.query_items( + query=vanilla_query, enable_cross_partition_query=True + ) + ) verify_ordering(disk_ann_list, "dotproduct") def test_vector_query_pagination(self): # load up previously calculated embedding for the given string vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 8 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " \ - "'cosine'}})".format(vector_string, vector_string) + query = ( + "SELECT TOP 8 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " + "'cosine'}})".format(vector_string, vector_string) + ) - query_iterable = self.created_quantized_cosine_container.query_items(query=query, - enable_cross_partition_query=True, - max_item_count=3) + query_iterable = self.created_quantized_cosine_container.query_items( + query=query, enable_cross_partition_query=True, max_item_count=3 + ) all_fetched_res = [] count = 0 item_pages = query_iterable.by_page() @@ -240,61 +291,67 @@ def test_vector_query_large_data(self): self.created_large_container.create_item(item) embedding_value += 0.0001 - query = "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - "OFFSET 0 LIMIT 1000" + query = ( + "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + "OFFSET 0 LIMIT 1000" + ) - query_iterable = self.created_large_container.query_items(query=query, - enable_cross_partition_query=True) + query_iterable = self.created_large_container.query_items(query=query, enable_cross_partition_query=True) result_list = list(query_iterable) assert len(result_list) == 1000 - query = "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - "OFFSET 0 LIMIT 1000" + query = ( + "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + "OFFSET 0 LIMIT 1000" + ) - query_iterable = self.created_large_container.query_items(query=query, - enable_cross_partition_query=True) + query_iterable = self.created_large_container.query_items(query=query, enable_cross_partition_query=True) result_list = list(query_iterable) assert len(result_list) == 1000 - query = "SELECT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + query = ( + "SELECT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + ) - query_iterable = self.created_large_container.query_items(query=query, - enable_cross_partition_query=True) + query_iterable = self.created_large_container.query_items(query=query, enable_cross_partition_query=True) result_list = list(query_iterable) assert len(result_list) == 750 - query = "SELECT DISTINCT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + query = ( + "SELECT DISTINCT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + ) - query_iterable = self.created_large_container.query_items(query=query, - enable_cross_partition_query=True) + query_iterable = self.created_large_container.query_items(query=query, enable_cross_partition_query=True) result_list = list(query_iterable) assert len(result_list) == 750 - query = "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - " OFFSET 1000 LIMIT 500" + query = ( + "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + " OFFSET 1000 LIMIT 500" + ) - query_iterable = self.created_large_container.query_items(query=query, - enable_cross_partition_query=True) + query_iterable = self.created_large_container.query_items(query=query, enable_cross_partition_query=True) result_list = list(query_iterable) assert len(result_list) == 500 - query = "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - " OFFSET 1000 LIMIT 500" + query = ( + "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + " OFFSET 1000 LIMIT 500" + ) - query_iterable = self.created_large_container.query_items(query=query, - enable_cross_partition_query=True) + query_iterable = self.created_large_container.query_items(query=query, enable_cross_partition_query=True) result_list = list(query_iterable) assert len(result_list) == 500 @@ -302,14 +359,16 @@ def test_vector_query_cross_partition_response_hook(self): # load up previously calculated embedding for the given string vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 5 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " \ - "'cosine'}})".format(vector_string, vector_string) + query = ( + "SELECT TOP 5 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " + "'cosine'}})".format(vector_string, vector_string) + ) response_hook = test_config.ResponseHookCaller() - query_iterable = self.created_quantized_cosine_container.query_items(query=query, - enable_cross_partition_query=True, - response_hook=response_hook) + query_iterable = self.created_quantized_cosine_container.query_items( + query=query, enable_cross_partition_query=True, response_hook=response_hook + ) result_list = list(query_iterable) assert len(result_list) == 5 assert response_hook.count == 2 @@ -318,19 +377,20 @@ def test_vector_query_partitioned_response_hook(self): # load up previously calculated embedding for the given string vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 4 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " \ - "'cosine'}})".format(vector_string, vector_string) + query = ( + "SELECT TOP 4 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " + "'cosine'}})".format(vector_string, vector_string) + ) response_hook = test_config.ResponseHookCaller() - query_iterable = self.created_quantized_cosine_container.query_items(query=query, - partition_key='1', - response_hook=response_hook) + query_iterable = self.created_quantized_cosine_container.query_items( + query=query, partition_key="1", response_hook=response_hook + ) result_list = list(query_iterable) assert len(result_list) == 4 assert response_hook.count == 1 - if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity_async.py b/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity_async.py index a263e833461e..2d90a631a0b8 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_query_vector_similarity_async.py @@ -25,6 +25,7 @@ def verify_ordering(item_list, distance_function): for i in range(len(item_list) - 1): assert item_list[i]["SimilarityScore"] >= item_list[i + 1]["SimilarityScore"] + @pytest.mark.cosmosSearchQuery class TestVectorSimilarityQueryAsync(unittest.IsolatedAsyncioTestCase): """Test to check vector similarity queries behavior.""" @@ -39,12 +40,12 @@ class TestVectorSimilarityQueryAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.sync_client = CosmosSyncClient(cls.host, cls.masterKey) cls.test_db = cls.sync_client.create_database(str(uuid.uuid4())) cls.created_quantized_cosine_container = cls.test_db.create_container( @@ -52,33 +53,37 @@ def setUpClass(cls): partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="quantizedFlat"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="cosine", - dimensions=128)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="cosine", dimensions=128 + ), + ) cls.created_flat_euclidean_container = cls.test_db.create_container( id="flat" + cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="flat"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="euclidean", - dimensions=128)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="euclidean", dimensions=128 + ), + ) cls.created_diskANN_dotproduct_container = cls.test_db.create_container( id="diskANN" + cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="diskANN"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="dotproduct", - dimensions=128)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="dotproduct", dimensions=128 + ), + ) cls.created_large_container = cls.test_db.create_container( id="large_container" + cls.TEST_CONTAINER_ID, partition_key=PartitionKey(path="/pk"), offer_throughput=test_config.TestConfig.THROUGHPUT_FOR_2_PARTITIONS, indexing_policy=test_config.get_vector_indexing_policy(embedding_type="quantizedFlat"), - vector_embedding_policy=test_config.get_vector_embedding_policy(data_type="float32", - distance_function="cosine", - dimensions=2)) + vector_embedding_policy=test_config.get_vector_embedding_policy( + data_type="float32", distance_function="cosine", dimensions=2 + ), + ) for item in vector_test_data.get_vector_items(): cls.created_quantized_cosine_container.create_item(item) cls.created_flat_euclidean_container.create_item(item) @@ -94,9 +99,15 @@ def tearDownClass(cls): async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) self.test_db = self.client.get_database_client(self.test_db.id) - self.created_flat_euclidean_container = self.test_db.get_container_client(self.created_flat_euclidean_container.id) - self.created_quantized_cosine_container = self.test_db.get_container_client(self.created_quantized_cosine_container.id) - self.created_diskANN_dotproduct_container = self.test_db.get_container_client(self.created_diskANN_dotproduct_container.id) + self.created_flat_euclidean_container = self.test_db.get_container_client( + self.created_flat_euclidean_container.id + ) + self.created_quantized_cosine_container = self.test_db.get_container_client( + self.created_quantized_cosine_container.id + ) + self.created_diskANN_dotproduct_container = self.test_db.get_container_client( + self.created_diskANN_dotproduct_container.id + ) self.created_large_container = self.test_db.get_container_client(self.created_large_container.id) async def asyncTearDown(self): @@ -105,39 +116,51 @@ async def asyncTearDown(self): async def test_wrong_vector_search_queries_async(self): vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") # try to send a vector search query without limit filters - query = "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + query = ( + "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + ) try: [item async for item in self.created_large_container.query_items(query=query)] pytest.fail("Client should not allow queries without filters.") except ValueError as e: - assert "Executing a vector search query without TOP or LIMIT can consume many RUs very fast and" \ - " have long runtimes. Please ensure you are using one of the two filters with your" \ - " vector search query." in e.args[0] + assert ( + "Executing a vector search query without TOP or LIMIT can consume many RUs very fast and" + " have long runtimes. Please ensure you are using one of the two filters with your" + " vector search query." in e.args[0] + ) # try to send a vector search query specifying the ordering as ASC or DESC - query = "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}]) ASC".format(vector_string, - vector_string) + query = ( + "SELECT c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}]) ASC".format(vector_string, vector_string) + ) try: [item async for item in self.created_large_container.query_items(query=query)] pytest.fail("Client should not allow queries with ASC/DESC.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == http_constants.StatusCodes.BAD_REQUEST - assert ("One of the input values is invalid." in e.message - or "Specifying a sorting order (ASC or DESC) with VectorDistance function is not supported." in e.message) + assert ( + "One of the input values is invalid." in e.message + or "Specifying a sorting order (ASC or DESC) with VectorDistance function is not supported." + in e.message + ) async def test_vector_search_environment_variables_async(self): vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 10 c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + query = ( + "SELECT TOP 10 c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(vector_string, vector_string) + ) os.environ["AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"] = "1" try: [item async for item in self.created_large_container.query_items(query=query)] pytest.fail("Config was not set correctly.") except ValueError as e: - assert e.args[0] == ("Executing a vector search query with more items than the max is not allowed. " - "Please ensure you are using a limit smaller than the max, or change the max.") + assert e.args[0] == ( + "Executing a vector search query with more items than the max is not allowed. " + "Please ensure you are using a limit smaller than the max, or change the max." + ) os.environ["AZURE_COSMOS_MAX_ITEM_BUFFER_VECTOR_SEARCH"] = "50000" [item async for item in self.created_large_container.query_items(query=query)] @@ -149,69 +172,97 @@ async def test_ordering_distances_async(self): # test euclidean distance for i in range(1, 11): # we define queries with and without specs to directly use the embeddings in our container policies - vanilla_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(str(i), - vector_string, - vector_string) - specs_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}})" \ - .format(str(i), vector_string, vector_string) + vanilla_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format( + str(i), vector_string, vector_string + ) + ) + specs_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'euclidean'}})".format( + str(i), vector_string, vector_string + ) + ) flat_list = [item async for item in self.created_flat_euclidean_container.query_items(query=vanilla_query)] verify_ordering(flat_list, "euclidean") - quantized_list = [item async for item in self.created_quantized_cosine_container.query_items(query=specs_query)] + quantized_list = [ + item async for item in self.created_quantized_cosine_container.query_items(query=specs_query) + ] verify_ordering(quantized_list, "euclidean") - disk_ann_list = [item async for item in self.created_diskANN_dotproduct_container.query_items(query=specs_query)] + disk_ann_list = [ + item async for item in self.created_diskANN_dotproduct_container.query_items(query=specs_query) + ] verify_ordering(disk_ann_list, "euclidean") # test cosine distance for i in range(1, 11): - vanilla_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(str(i), - vector_string, - vector_string) - specs_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}})" \ - .format(str(i), vector_string, vector_string) + vanilla_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format( + str(i), vector_string, vector_string + ) + ) + specs_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}})".format( + str(i), vector_string, vector_string + ) + ) flat_list = [item async for item in self.created_flat_euclidean_container.query_items(query=specs_query)] verify_ordering(flat_list, "cosine") - quantized_list = [item async for item in self.created_quantized_cosine_container.query_items(query=vanilla_query)] + quantized_list = [ + item async for item in self.created_quantized_cosine_container.query_items(query=vanilla_query) + ] verify_ordering(quantized_list, "cosine") - disk_ann_list = [item async for item in self.created_diskANN_dotproduct_container.query_items(query=specs_query)] + disk_ann_list = [ + item async for item in self.created_diskANN_dotproduct_container.query_items(query=specs_query) + ] verify_ordering(disk_ann_list, "cosine") # test dot product distance for i in range(1, 11): - vanilla_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format(str(i), - vector_string, - vector_string) - specs_query = "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}})" \ - .format(str(i), vector_string, vector_string) + vanilla_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}]) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}])".format( + str(i), vector_string, vector_string + ) + ) + specs_query = ( + "SELECT TOP {} c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'dotproduct'}})".format( + str(i), vector_string, vector_string + ) + ) flat_list = [item async for item in self.created_flat_euclidean_container.query_items(query=specs_query)] verify_ordering(flat_list, "dotproduct") - quantized_list = [item async for item in self.created_quantized_cosine_container.query_items(query=specs_query)] + quantized_list = [ + item async for item in self.created_quantized_cosine_container.query_items(query=specs_query) + ] verify_ordering(quantized_list, "dotproduct") - disk_ann_list = [item async for item in self.created_diskANN_dotproduct_container.query_items(query=vanilla_query)] + disk_ann_list = [ + item async for item in self.created_diskANN_dotproduct_container.query_items(query=vanilla_query) + ] verify_ordering(disk_ann_list, "dotproduct") async def test_vector_query_pagination_async(self): # load up previously calculated embedding for the given string vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 8 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " \ - "'cosine'}})".format(vector_string, vector_string) + query = ( + "SELECT TOP 8 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " + "'cosine'}})".format(vector_string, vector_string) + ) - query_iterable = self.created_quantized_cosine_container.query_items(query=query, - max_item_count=3) + query_iterable = self.created_quantized_cosine_container.query_items(query=query, max_item_count=3) all_fetched_res = [] count = 0 item_pages = query_iterable.by_page() @@ -230,53 +281,65 @@ async def test_vector_query_large_data_async(self): await self.created_large_container.create_item(item) embedding_value += 0.0001 - query = "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - " OFFSET 0 LIMIT 1000" + query = ( + "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + " OFFSET 0 LIMIT 1000" + ) query_iterable = self.created_large_container.query_items(query=query) result_list = [item async for item in query_iterable] assert len(result_list) == 1000 - query = "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - " OFFSET 0 LIMIT 1000" + query = ( + "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + " OFFSET 0 LIMIT 1000" + ) query_iterable = self.created_large_container.query_items(query=query) result_list = [item async for item in query_iterable] assert len(result_list) == 1000 - query = "SELECT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + query = ( + "SELECT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + ) query_iterable = self.created_large_container.query_items(query=query) result_list = [item async for item in query_iterable] assert len(result_list) == 750 - query = "SELECT DISTINCT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + query = ( + "SELECT DISTINCT TOP 750 c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + ) query_iterable = self.created_large_container.query_items(query=query) result_list = [item async for item in query_iterable] assert len(result_list) == 750 - query = "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - " OFFSET 1000 LIMIT 500" + query = ( + "SELECT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + " OFFSET 1000 LIMIT 500" + ) query_iterable = self.created_large_container.query_items(query=query) result_list = [item async for item in query_iterable] assert len(result_list) == 500 - query = "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," \ - " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" \ - " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" \ - " OFFSET 1000 LIMIT 500" + query = ( + "SELECT DISTINCT c.id, VectorDistance(c.embedding, [0.0001, 0.0001], false," + " {'distanceFunction': 'cosine'}) AS SimilarityScore FROM c ORDER BY" + " VectorDistance(c.embedding, [0.0001, 0.0001], false, {'distanceFunction': 'cosine'})" + " OFFSET 1000 LIMIT 500" + ) query_iterable = self.created_large_container.query_items(query=query) result_list = [item async for item in query_iterable] @@ -286,13 +349,14 @@ async def test_vector_query_cross_partition_response_hook_async(self): # load up previously calculated embedding for the given string vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 5 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " \ - "'cosine'}})".format(vector_string, vector_string) + query = ( + "SELECT TOP 5 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " + "'cosine'}})".format(vector_string, vector_string) + ) response_hook = test_config.ResponseHookCaller() - query_iterable = self.created_quantized_cosine_container.query_items(query=query, - response_hook=response_hook) + query_iterable = self.created_quantized_cosine_container.query_items(query=query, response_hook=response_hook) result_list = [item async for item in query_iterable] assert len(result_list) == 5 assert response_hook.count == 2 @@ -301,14 +365,16 @@ async def test_vector_query_partitioned_response_hook_async(self): # load up previously calculated embedding for the given string vector_string = vector_test_data.get_embedding_string("I am having a wonderful day.") - query = "SELECT TOP 4 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " \ - "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " \ - "'cosine'}})".format(vector_string, vector_string) + query = ( + "SELECT TOP 4 c.text, VectorDistance(c.embedding, [{}], false, {{'distanceFunction': 'cosine'}}) AS " + "SimilarityScore FROM c ORDER BY VectorDistance(c.embedding, [{}], false, {{'distanceFunction': " + "'cosine'}})".format(vector_string, vector_string) + ) response_hook = test_config.ResponseHookCaller() - query_iterable = self.created_quantized_cosine_container.query_items(query=query, - partition_key='1', - response_hook=response_hook) + query_iterable = self.created_quantized_cosine_container.query_items( + query=query, partition_key="1", response_hook=response_hook + ) result_list = [item async for item in query_iterable] assert len(result_list) == 4 assert response_hook.count == 1 diff --git a/sdk/cosmos/azure-cosmos/tests/test_read_items.py b/sdk/cosmos/azure-cosmos/tests/test_read_items.py index db770c88d363..4b34f41d89f7 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_read_items.py +++ b/sdk/cosmos/azure-cosmos/tests/test_read_items.py @@ -14,6 +14,7 @@ from azure.cosmos.exceptions import CosmosHttpResponseError from azure.cosmos.documents import _OperationType + @pytest.mark.cosmosEmulator class TestReadItems(unittest.TestCase): """Test cases for the read_items API.""" @@ -27,19 +28,18 @@ class TestReadItems(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) def setUp(self): self.client = cosmos_client.CosmosClient(self.host, self.masterKey) self.database = self.client.get_database_client(self.configs.TEST_DATABASE_ID) self.container = self.database.create_container( - id='read_items_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/id") + id="read_items_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id") ) def tearDown(self): @@ -61,7 +61,7 @@ def _create_records_for_read_items(container, count, id_prefix="item"): doc_id = f"{id_prefix}_{i}_{uuid.uuid4()}" item_ids.append(doc_id) items_to_read.append((doc_id, doc_id)) - container.create_item({'id': doc_id, 'data': i}) + container.create_item({"id": doc_id, "data": i}) return items_to_read, item_ids def _setup_fault_injection(self, error_to_inject, inject_once=False): @@ -69,14 +69,16 @@ def _setup_fault_injection(self, error_to_inject, inject_once=False): fault_injection_transport = FaultInjectionTransport() client_with_faults = cosmos_client.CosmosClient(self.host, self.masterKey, transport=fault_injection_transport) container_with_faults = client_with_faults.get_database_client(self.database.id).get_container_client( - self.container.id) + self.container.id + ) fault_has_been_injected = False def predicate(request): nonlocal fault_has_been_injected - is_query = (request.method == 'POST' and - FaultInjectionTransport.predicate_is_operation_type(request, _OperationType.SqlQuery)) + is_query = request.method == "POST" and FaultInjectionTransport.predicate_is_operation_type( + request, _OperationType.SqlQuery + ) if is_query: if inject_once: if not fault_has_been_injected: @@ -102,7 +104,7 @@ def test_read_items_with_missing_items(self): read_items = self.container.read_items(items=items_to_read) self.assertEqual(len(read_items), 3) - returned_ids = {item['id'] for item in read_items} + returned_ids = {item["id"] for item in read_items} expected_ids = {item_tuple[0] for item_tuple in items_to_read if "existing" in item_tuple[0]} self.assertSetEqual(returned_ids, expected_ids) @@ -115,14 +117,12 @@ def test_read_items_single_item(self): # Verify that one item was returned and it's the correct one self.assertEqual(len(read_items), 1) - self.assertEqual(read_items[0]['id'], item_ids[0]) - + self.assertEqual(read_items[0]["id"], item_ids[0]) def test_read_items_different_partition_key(self): """Tests read_items with partition key different from id.""" container_pk = self.database.create_container( - id='read_items_pk_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="read_items_pk_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) try: items_to_read = [] @@ -131,23 +131,22 @@ def test_read_items_different_partition_key(self): doc_id = f"item{i}_{uuid.uuid4()}" pk_value = f"pk_{i}" item_ids.append(doc_id) - container_pk.create_item({'id': doc_id, 'pk': pk_value, 'data': i}) + container_pk.create_item({"id": doc_id, "pk": pk_value, "data": i}) items_to_read.append((doc_id, pk_value)) read_items = container_pk.read_items(items=items_to_read) self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) finally: self.database.delete_container(container_pk) - def test_read_items_fails_with_incomplete_hierarchical_pk(self): """Tests that read_items raises ValueError for an incomplete hierarchical partition key.""" container_hpk = self.database.create_container( - id='read_items_hpk_incomplete_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash") + id="read_items_hpk_incomplete_container_" + str(uuid.uuid4()), + partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash"), ) try: items_to_read = [] @@ -155,7 +154,7 @@ def test_read_items_fails_with_incomplete_hierarchical_pk(self): doc_id = f"item_valid_{uuid.uuid4()}" tenant_id = "tenant1" user_id = "user1" - container_hpk.create_item({'id': doc_id, 'tenantId': tenant_id, 'userId': user_id}) + container_hpk.create_item({"id": doc_id, "tenantId": tenant_id, "userId": user_id}) items_to_read.append((doc_id, [tenant_id, user_id])) # Add an item with an incomplete partition key @@ -166,16 +165,17 @@ def test_read_items_fails_with_incomplete_hierarchical_pk(self): with self.assertRaises(ValueError) as context: container_hpk.read_items(items=items_to_read) - self.assertIn("Number of components in partition key value (1) does not match definition (2)", - str(context.exception)) + self.assertIn( + "Number of components in partition key value (1) does not match definition (2)", str(context.exception) + ) finally: self.database.delete_container(container_hpk) def test_read_items_hierarchical_partition_key(self): """Tests read_items with hierarchical partition key.""" container_hpk = self.database.create_container( - id='read_hpk_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash") + id="read_hpk_container_" + str(uuid.uuid4()), + partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash"), ) try: items_to_read = [] @@ -185,13 +185,13 @@ def test_read_items_hierarchical_partition_key(self): tenant_id = f"tenant{i % 2}" user_id = f"user{i}" item_ids.append(doc_id) - container_hpk.create_item({'id': doc_id, 'tenantId': tenant_id, 'userId': user_id, 'data': i}) + container_hpk.create_item({"id": doc_id, "tenantId": tenant_id, "userId": user_id, "data": i}) items_to_read.append((doc_id, [tenant_id, user_id])) read_items = container_hpk.read_items(items=items_to_read) self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) finally: self.database.delete_container(container_hpk) @@ -200,7 +200,7 @@ def test_read_items_with_no_results_preserve_headers(self): """Tests read_items with only non-existent items, expecting an empty result.""" items_to_read = [ ("non_existent_item_1_" + str(uuid.uuid4()), "non_existent_pk_1"), - ("non_existent_item_2_" + str(uuid.uuid4()), "non_existent_pk_2") + ("non_existent_item_2_" + str(uuid.uuid4()), "non_existent_pk_2"), ] # Call read_items with the list of non-existent items. @@ -208,9 +208,9 @@ def test_read_items_with_no_results_preserve_headers(self): headers = read_items.get_response_headers() # Verify that the result is an empty list. self.assertEqual(len(read_items), 0) - self.assertListEqual(list(headers.keys()), ['x-ms-request-charge']) + self.assertListEqual(list(headers.keys()), ["x-ms-request-charge"]) # Verify the request charge is a positive value. - self.assertGreater(float(headers.get('x-ms-request-charge')), 0) + self.assertGreater(float(headers.get("x-ms-request-charge")), 0) def test_headers_being_returned_on_success(self): """Tests that on success, only the aggregated request charge header is returned.""" @@ -223,9 +223,9 @@ def test_headers_being_returned_on_success(self): self.assertIsNotNone(headers) # On success, only the aggregated request charge should be returned. - self.assertListEqual(list(headers.keys()), ['x-ms-request-charge']) + self.assertListEqual(list(headers.keys()), ["x-ms-request-charge"]) # Verify the request charge is a positive value. - self.assertGreater(float(headers.get('x-ms-request-charge')), 0) + self.assertGreater(float(headers.get("x-ms-request-charge")), 0) def test_read_items_large_count(self): """Tests read_items with a large number of items.""" @@ -234,7 +234,7 @@ def test_read_items_large_count(self): read_items = self.container.read_items(items=items_to_read) self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) def test_read_items_surfaces_exceptions(self): @@ -253,23 +253,26 @@ def test_read_failure_preserves_headers(self): """Tests that if a query fails, the exception contains the headers from the failed request.""" # 1. Define headers and the error to inject failed_headers = { - 'x-ms-request-charge': '12.34', - 'x-ms-activity-id': 'a-fake-activity-id', - 'x-ms-session-token': 'session-token-for-failure' + "x-ms-request-charge": "12.34", + "x-ms-activity-id": "a-fake-activity-id", + "x-ms-session-token": "session-token-for-failure", } # 2. Create a mock response object with the headers we want to inject. - mock_response = type('MockResponse', (), { - 'headers': failed_headers, - 'reason': 'Mock reason for failure', - 'status_code': 429, - 'request': 'mock_request' - }) + mock_response = type( + "MockResponse", + (), + { + "headers": failed_headers, + "reason": "Mock reason for failure", + "status_code": 429, + "request": "mock_request", + }, + ) # 3. Create the error to inject, passing the mock response error_to_inject = CosmosHttpResponseError( - message="Simulated query failure with headers", - response=mock_response() + message="Simulated query failure with headers", response=mock_response() ) # 4. Use the fault injection helper to get a container that will raise the error @@ -286,16 +289,14 @@ def test_read_failure_preserves_headers(self): exc = context.exception self.assertEqual(exc.status_code, 429) self.assertIsNotNone(exc.headers) - self.assertEqual(exc.headers.get('x-ms-request-charge'), '12.34') - self.assertEqual(exc.headers.get('x-ms-activity-id'), 'a-fake-activity-id') - self.assertEqual(exc.headers.get('x-ms-session-token'), 'session-token-for-failure') + self.assertEqual(exc.headers.get("x-ms-request-charge"), "12.34") + self.assertEqual(exc.headers.get("x-ms-activity-id"), "a-fake-activity-id") + self.assertEqual(exc.headers.get("x-ms-session-token"), "session-token-for-failure") def test_read_items_with_throttling_retry(self): """Tests that the retry policy handles a throttling error (429) and succeeds.""" error_to_inject = CosmosHttpResponseError( - status_code=429, - message="Throttling error injected for testing", - headers={'x-ms-retry-after-ms': '10'} + status_code=429, message="Throttling error injected for testing", headers={"x-ms-retry-after-ms": "10"} ) container_with_faults = self._setup_fault_injection(error_to_inject, inject_once=True) items_to_read, item_ids = self._create_records_for_read_items(self.container, 5, "item_for_throttle") @@ -306,14 +307,14 @@ def side_effect_should_retry(self_instance, exception, *args, **kwargs): return original_should_retry(self_instance, exception) with patch( - 'azure.cosmos._resource_throttle_retry_policy.ResourceThrottleRetryPolicy.ShouldRetry', - side_effect=side_effect_should_retry, - autospec=True + "azure.cosmos._resource_throttle_retry_policy.ResourceThrottleRetryPolicy.ShouldRetry", + side_effect=side_effect_should_retry, + autospec=True, ) as mock_should_retry: read_items = container_with_faults.read_items(items=items_to_read) mock_should_retry.assert_called_once() self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) def test_read_items_with_gone_retry(self): @@ -328,13 +329,12 @@ def test_read_items_with_gone_retry(self): items_to_read, item_ids = self._create_records_for_read_items(self.container, 20, "item_for_gone") with patch( - 'azure.cosmos._gone_retry_policy.PartitionKeyRangeGoneRetryPolicy.ShouldRetry', - autospec=True + "azure.cosmos._gone_retry_policy.PartitionKeyRangeGoneRetryPolicy.ShouldRetry", autospec=True ) as mock_should_retry: read_items = container_with_faults.read_items(items=items_to_read) mock_should_retry.assert_called_once() self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) def test_read_after_container_recreation(self): @@ -349,9 +349,7 @@ def test_read_after_container_recreation(self): # Recreate the container with a different partition key and throughput self.container = self.database.create_container( - id=container_id, - partition_key=PartitionKey(path="/pk"), - offer_throughput=10100 + id=container_id, partition_key=PartitionKey(path="/pk"), offer_throughput=10100 ) # Create new items with the new partition key structure @@ -361,19 +359,18 @@ def test_read_after_container_recreation(self): doc_id = f"new_item_{i}_{uuid.uuid4()}" pk_value = f"new_pk_{i}" new_item_ids.append(doc_id) - self.container.create_item({'id': doc_id, 'pk': pk_value, 'data': i}) + self.container.create_item({"id": doc_id, "pk": pk_value, "data": i}) new_items_to_read.append((doc_id, pk_value)) read_items_after = self.container.read_items(items=new_items_to_read) self.assertEqual(len(read_items_after), len(new_item_ids)) - read_ids = {item['id'] for item in read_items_after} + read_ids = {item["id"] for item in read_items_after} self.assertSetEqual(read_ids, set(new_item_ids)) def test_read_items_preserves_input_order(self): """Tests that read_items preserves the original order of input items.""" container_pk = self.database.create_container( - id='read_order_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="read_order_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) try: @@ -387,7 +384,7 @@ def test_read_items_preserves_input_order(self): pk_value = f"pk_{i % 5}" # Create the item in the container - container_pk.create_item({'id': doc_id, 'pk': pk_value, 'order_value': i}) + container_pk.create_item({"id": doc_id, "pk": pk_value, "order_value": i}) # Add to our master list all_items.append((doc_id, pk_value)) @@ -416,14 +413,14 @@ def test_read_items_preserves_input_order(self): expected_id = scrambled_items[i][0] expected_pk = scrambled_items[i][1] self.assertEqual( - item['id'], + item["id"], expected_id, - f"Item at position {i} does not match input order. Expected ID {expected_id}, got {item['id']}" + f"Item at position {i} does not match input order. Expected ID {expected_id}, got {item['id']}", ) self.assertEqual( - item['pk'], + item["pk"], expected_pk, - f"Item at position {i} does not match input order. Expected PK {expected_pk}, got {item['pk']}" + f"Item at position {i} does not match input order. Expected PK {expected_pk}, got {item['pk']}", ) finally: @@ -433,8 +430,7 @@ def test_read_items_preserves_input_order(self): def test_read_items_order_using_zip_comparison(self): """Tests that read_items preserves the original order using zip and boolean comparison.""" container_pk = self.database.create_container( - id='read_order_zip_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="read_order_zip_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) try: @@ -445,7 +441,7 @@ def test_read_items_order_using_zip_comparison(self): pk_value = f"pk_{i % 5}" # Distribute across 5 partition keys # Create the item in the container - container_pk.create_item({'id': doc_id, 'pk': pk_value, 'order_value': i}) + container_pk.create_item({"id": doc_id, "pk": pk_value, "order_value": i}) # Add to our list all_items.append((doc_id, pk_value)) @@ -461,8 +457,7 @@ def test_read_items_order_using_zip_comparison(self): matching = [x[0][0] == x[1]["id"] and x[0][1] == x[1]["pk"] for x in consolidated] # Assert all items match in order - self.assertTrue(all(matching), - "Order was not preserved. Input order doesn't match output order.") + self.assertTrue(all(matching), "Order was not preserved. Input order doesn't match output order.") finally: self.database.delete_container(container_pk) @@ -474,7 +469,7 @@ def test_read_items_concurrency_internals(self): doc_id = f"chunk_item_{i}_{uuid.uuid4()}" items_to_read.append((doc_id, doc_id)) - with patch.object(self.container.client_connection, 'QueryItems') as mock_query: + with patch.object(self.container.client_connection, "QueryItems") as mock_query: mock_query.return_value = [] self.container.read_items(items=items_to_read) @@ -482,26 +477,28 @@ def test_read_items_concurrency_internals(self): self.assertEqual(mock_query.call_count, 3) call_args = mock_query.call_args_list # Extract the number of parameters from each call. - chunk_sizes = [len(call[0][1]['parameters']) for call in call_args] + chunk_sizes = [len(call[0][1]["parameters"]) for call in call_args] # Sort the chunk sizes to make the assertion deterministic. chunk_sizes.sort(reverse=True) self.assertEqual(chunk_sizes[0], 1000) self.assertEqual(chunk_sizes[1], 1000) self.assertEqual(chunk_sizes[2], 500) - def test_read_items_multiple_physical_partitions_and_hook(self): """Tests read_items on a container with multiple physical partitions and verifies response_hook.""" # Create a container with high throughput to force multiple physical partitions multi_partition_container = self.database.create_container( - id='multi_partition_container_' + str(uuid.uuid4()), + id="multi_partition_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=11000 + offer_throughput=11000, ) try: # 1. Verify that we have more than one physical partition - pk_ranges = list(multi_partition_container.client_connection._ReadPartitionKeyRanges( - multi_partition_container.container_link)) + pk_ranges = list( + multi_partition_container.client_connection._ReadPartitionKeyRanges( + multi_partition_container.container_link + ) + ) self.assertGreater(len(pk_ranges), 1, "Container should have multiple physical partitions.") # 2. Create items across different logical partitions @@ -511,53 +508,50 @@ def test_read_items_multiple_physical_partitions_and_hook(self): doc_id = f"item_{i}_{uuid.uuid4()}" pk = i % 2 all_item_ids.add(doc_id) - multi_partition_container.create_item({'id': doc_id, 'pk': pk, 'data': i}) + multi_partition_container.create_item({"id": doc_id, "pk": pk, "data": i}) items_to_read.append((doc_id, pk)) # 3. Check item distribution across physical partitions partition_item_map = {} for pk_range in pk_ranges: - pk_range_id = pk_range['id'] + pk_range_id = pk_range["id"] # Query items within this specific physical partition - items_in_partition = list(multi_partition_container.query_items( - "SELECT c.id FROM c", - partition_key_range_id=pk_range_id - )) + items_in_partition = list( + multi_partition_container.query_items("SELECT c.id FROM c", partition_key_range_id=pk_range_id) + ) if items_in_partition: - partition_item_map[pk_range_id] = {item['id'] for item in items_in_partition} + partition_item_map[pk_range_id] = {item["id"] for item in items_in_partition} # Assert that items were created on more than one physical partition - self.assertGreater(len(partition_item_map), 1, - "Items were not distributed across multiple physical partitions.") + self.assertGreater( + len(partition_item_map), 1, "Items were not distributed across multiple physical partitions." + ) # 3. Set up a response hook to capture both headers and results hook_captured_data = {} def response_hook(headers, results_list): - hook_captured_data['headers'] = headers - hook_captured_data['results'] = results_list - hook_captured_data['call_count'] = hook_captured_data.get('call_count', 0) + 1 + hook_captured_data["headers"] = headers + hook_captured_data["results"] = results_list + hook_captured_data["call_count"] = hook_captured_data.get("call_count", 0) + 1 # 4. Execute read_items with the hook - read_items_result = multi_partition_container.read_items( - items=items_to_read, - response_hook=response_hook - ) + read_items_result = multi_partition_container.read_items(items=items_to_read, response_hook=response_hook) # 5. Verify the response_hook was called correctly - self.assertEqual(hook_captured_data.get('call_count'), 1, "Response hook should be called exactly once.") + self.assertEqual(hook_captured_data.get("call_count"), 1, "Response hook should be called exactly once.") # Verify the headers passed to the hook - hook_headers = hook_captured_data.get('headers', {}) - self.assertIn('x-ms-request-charge', hook_headers) - self.assertGreater(float(hook_headers['x-ms-request-charge']), 0) + hook_headers = hook_captured_data.get("headers", {}) + self.assertIn("x-ms-request-charge", hook_headers) + self.assertGreater(float(hook_headers["x-ms-request-charge"]), 0) # Verify the CosmosList passed to the hook - hook_results = hook_captured_data.get('results') + hook_results = hook_captured_data.get("results") self.assertIsNotNone(hook_results, "CosmosList should be passed to the hook.") self.assertIsInstance(hook_results, list) # CosmosList inherits from list self.assertEqual(len(hook_results), len(items_to_read)) - hook_read_ids = {item['id'] for item in hook_results} + hook_read_ids = {item["id"] for item in hook_results} self.assertSetEqual(hook_read_ids, all_item_ids) # Verify that the CosmosList passed to the hook is the same object as the one returned @@ -565,4 +559,3 @@ def response_hook(headers, results_list): finally: self.database.delete_container(multi_partition_container) - diff --git a/sdk/cosmos/azure-cosmos/tests/test_read_items_async.py b/sdk/cosmos/azure-cosmos/tests/test_read_items_async.py index 4c40b006bb16..718bfb830862 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_read_items_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_read_items_async.py @@ -3,6 +3,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. """End-to-end test for read_items API.""" + import asyncio import unittest import uuid @@ -18,6 +19,7 @@ from _fault_injection_transport_async import FaultInjectionTransportAsync from azure.cosmos._resource_throttle_retry_policy import ResourceThrottleRetryPolicy + @pytest.mark.cosmosEmulator class TestReadItemsAsync(unittest.IsolatedAsyncioTestCase): """Test cases for the read_items API.""" @@ -31,19 +33,18 @@ class TestReadItemsAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) self.database = self.client.get_database_client(self.configs.TEST_DATABASE_ID) self.container = await self.database.create_container( - id='read_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/id") + id="read_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id") ) async def asyncTearDown(self): @@ -68,7 +69,7 @@ async def _create_records_for_read_items(container, count, id_prefix="item"): doc_id = f"{id_prefix}_{i}_{uuid.uuid4()}" item_ids.append(doc_id) items_to_read.append((doc_id, doc_id)) - tasks.append(container.create_item({'id': doc_id, 'data': i})) + tasks.append(container.create_item({"id": doc_id, "data": i})) await asyncio.gather(*tasks) return items_to_read, item_ids @@ -78,14 +79,16 @@ def _setup_fault_injection_async(self, error_to_inject, inject_once=False): fault_injection_transport = FaultInjectionTransportAsync() client_with_faults = CosmosClient(self.host, self.masterKey, transport=fault_injection_transport) container_with_faults = client_with_faults.get_database_client(self.database.id).get_container_client( - self.container.id) + self.container.id + ) fault_has_been_injected = False def predicate(request): nonlocal fault_has_been_injected - is_query = (request.method == 'POST' and - FaultInjectionTransportAsync.predicate_is_operation_type(request, _OperationType.SqlQuery)) + is_query = request.method == "POST" and FaultInjectionTransportAsync.predicate_is_operation_type( + request, _OperationType.SqlQuery + ) if is_query: if inject_once: if not fault_has_been_injected: @@ -112,7 +115,7 @@ async def test_read_items_with_missing_items_async(self): read_items = await self.container.read_items(items=items_to_read) self.assertEqual(len(read_items), 3) - returned_ids = {item['id'] for item in read_items} + returned_ids = {item["id"] for item in read_items} expected_ids = {item_tuple[0] for item_tuple in items_to_read if "existing" in item_tuple[0]} self.assertSetEqual(returned_ids, expected_ids) @@ -125,14 +128,12 @@ async def test_read_items_single_item_async(self): # Verify that one item was returned and it's the correct one self.assertEqual(len(read_items), 1) - self.assertEqual(read_items[0]['id'], item_ids[0]) - + self.assertEqual(read_items[0]["id"], item_ids[0]) async def test_read_items_different_partition_key_async(self): """Tests read_items with partition key different from id.""" container_pk = await self.database.create_container( - id='read_pk_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="read_pk_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) try: items_to_read = [] @@ -141,13 +142,13 @@ async def test_read_items_different_partition_key_async(self): doc_id = f"item{i}_{uuid.uuid4()}" pk_value = f"pk_{i}" item_ids.append(doc_id) - await container_pk.create_item({'id': doc_id, 'pk': pk_value, 'data': i}) + await container_pk.create_item({"id": doc_id, "pk": pk_value, "data": i}) items_to_read.append((doc_id, pk_value)) read_items = await container_pk.read_items(items=items_to_read) self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) finally: await self.database.delete_container(container_pk) @@ -155,8 +156,8 @@ async def test_read_items_different_partition_key_async(self): async def test_read_items_fails_with_incomplete_hierarchical_pk_async(self): """Tests that read_items raises ValueError for an incomplete hierarchical partition key.""" container_hpk = await self.database.create_container( - id='read_hpk_incomplete_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash") + id="read_hpk_incomplete_container_" + str(uuid.uuid4()), + partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash"), ) try: items_to_read = [] @@ -164,7 +165,7 @@ async def test_read_items_fails_with_incomplete_hierarchical_pk_async(self): doc_id = f"item_valid_{uuid.uuid4()}" tenant_id = "tenant1" user_id = "user1" - await container_hpk.create_item({'id': doc_id, 'tenantId': tenant_id, 'userId': user_id}) + await container_hpk.create_item({"id": doc_id, "tenantId": tenant_id, "userId": user_id}) items_to_read.append((doc_id, [tenant_id, user_id])) # Add an item with an incomplete partition key @@ -175,16 +176,17 @@ async def test_read_items_fails_with_incomplete_hierarchical_pk_async(self): with self.assertRaises(ValueError) as context: await container_hpk.read_items(items=items_to_read) - self.assertIn("Number of components in partition key value (1) does not match definition (2)", - str(context.exception)) + self.assertIn( + "Number of components in partition key value (1) does not match definition (2)", str(context.exception) + ) finally: await self.database.delete_container(container_hpk) async def test_read_items_hierarchical_partition_key_async(self): """Tests read_items with hierarchical partition key.""" container_hpk = await self.database.create_container( - id='read_hpk_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash") + id="read_hpk_container_" + str(uuid.uuid4()), + partition_key=PartitionKey(path=["/tenantId", "/userId"], kind="MultiHash"), ) try: items_to_read = [] @@ -194,13 +196,13 @@ async def test_read_items_hierarchical_partition_key_async(self): tenant_id = f"tenant{i % 2}" user_id = f"user{i}" item_ids.append(doc_id) - await container_hpk.create_item({'id': doc_id, 'tenantId': tenant_id, 'userId': user_id, 'data': i}) + await container_hpk.create_item({"id": doc_id, "tenantId": tenant_id, "userId": user_id, "data": i}) items_to_read.append((doc_id, [tenant_id, user_id])) read_items = await container_hpk.read_items(items=items_to_read) self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) finally: await self.database.delete_container(container_hpk) @@ -208,8 +210,7 @@ async def test_read_items_hierarchical_partition_key_async(self): async def test_read_items_preserves_input_order_async(self): """Tests that read_items preserves the original order of input items.""" container_pk = await self.database.create_container( - id='read_order_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="read_order_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) try: @@ -223,7 +224,7 @@ async def test_read_items_preserves_input_order_async(self): pk_value = f"pk_{i % 5}" # Create the item in the container - await container_pk.create_item({'id': doc_id, 'pk': pk_value, 'order_value': i}) + await container_pk.create_item({"id": doc_id, "pk": pk_value, "order_value": i}) all_items.append((doc_id, pk_value)) # Create a complex order for the read operation @@ -249,14 +250,14 @@ async def test_read_items_preserves_input_order_async(self): expected_id = scrambled_items[i][0] expected_pk = scrambled_items[i][1] self.assertEqual( - item['id'], + item["id"], expected_id, - f"Item at position {i} does not match input order. Expected ID {expected_id}, got {item['id']}" + f"Item at position {i} does not match input order. Expected ID {expected_id}, got {item['id']}", ) self.assertEqual( - item['pk'], + item["pk"], expected_pk, - f"Item at position {i} does not match input order. Expected PK {expected_pk}, got {item['pk']}" + f"Item at position {i} does not match input order. Expected PK {expected_pk}, got {item['pk']}", ) finally: @@ -266,8 +267,7 @@ async def test_read_items_preserves_input_order_async(self): async def test_read_items_order_using_zip_comparison_async(self): """Tests that read_items_async preserves the original order using zip and boolean comparison.""" container_pk = await self.database.create_container( - id='read_order_zip_async_container_' + str(uuid.uuid4()), - partition_key=PartitionKey(path="/pk") + id="read_order_zip_async_container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk") ) try: @@ -278,7 +278,7 @@ async def test_read_items_order_using_zip_comparison_async(self): pk_value = f"pk_{i % 5}" # Distribute across 5 partition keys # Create the item in the container - await container_pk.create_item({'id': doc_id, 'pk': pk_value, 'order_value': i}) + await container_pk.create_item({"id": doc_id, "pk": pk_value, "order_value": i}) # Add to our list all_items.append((doc_id, pk_value)) @@ -294,8 +294,9 @@ async def test_read_items_order_using_zip_comparison_async(self): matching = [x[0][0] == x[1]["id"] and x[0][1] == x[1]["pk"] for x in consolidated] # Assert all items match in order - self.assertTrue(all(matching), - "Order was not preserved in async version. Input order doesn't match output order.") + self.assertTrue( + all(matching), "Order was not preserved in async version. Input order doesn't match output order." + ) finally: await self.database.delete_container(container_pk) @@ -303,25 +304,30 @@ async def test_read_items_order_using_zip_comparison_async(self): async def test_read_failure_preserves_headers_async(self): """Tests that if a query fails, the exception contains the headers from the failed request.""" # 1. Define headers and the error to inject - failed_headers = CaseInsensitiveDict({ - 'x-ms-request-charge': '12.34', - 'x-ms-activity-id': 'a-fake-activity-id', - 'x-ms-session-token': 'session-token-for-failure' - }) + failed_headers = CaseInsensitiveDict( + { + "x-ms-request-charge": "12.34", + "x-ms-activity-id": "a-fake-activity-id", + "x-ms-session-token": "session-token-for-failure", + } + ) # CosmosHttpResponseError populates the headers attribute from the response object passed during initialization # So we need to create a mock response object with the headers we want to inject. - mock_response = type('MockResponse', (), { - 'headers': failed_headers, - 'reason': 'Mock reason for failure', - 'status_code': 429, - 'request': 'mock_request' # Add request attribute - }) + mock_response = type( + "MockResponse", + (), + { + "headers": failed_headers, + "reason": "Mock reason for failure", + "status_code": 429, + "request": "mock_request", # Add request attribute + }, + ) # 3. Create the error to inject, passing the mock response error_to_inject = CosmosHttpResponseError( - message = "Simulated query failure with headers", - response = mock_response() + message="Simulated query failure with headers", response=mock_response() ) # 2. Use the fault injection helper to get a container that will raise the error @@ -338,20 +344,19 @@ async def test_read_failure_preserves_headers_async(self): exc = context.exception self.assertEqual(exc.status_code, 429) self.assertIsNotNone(exc.headers) - self.assertEqual(exc.headers.get('x-ms-request-charge'), '12.34') - self.assertEqual(exc.headers.get('x-ms-activity-id'), 'a-fake-activity-id') - self.assertEqual(exc.headers.get('x-ms-session-token'), 'session-token-for-failure') + self.assertEqual(exc.headers.get("x-ms-request-charge"), "12.34") + self.assertEqual(exc.headers.get("x-ms-activity-id"), "a-fake-activity-id") + self.assertEqual(exc.headers.get("x-ms-session-token"), "session-token-for-failure") finally: # 6. Clean up the client with fault injection await client_with_faults.close() - async def test_read_items_with_no_results_preserve_headers_async(self): """Tests read_items with only non-existent items, expecting an empty result.""" items_to_read = [ ("non_existent_item_1_" + str(uuid.uuid4()), "non_existent_pk_1"), - ("non_existent_item_2_" + str(uuid.uuid4()), "non_existent_pk_2") + ("non_existent_item_2_" + str(uuid.uuid4()), "non_existent_pk_2"), ] # Call read_items with the list of non-existent items. @@ -359,9 +364,9 @@ async def test_read_items_with_no_results_preserve_headers_async(self): headers = read_items.get_response_headers() # Verify that the result is an empty list. self.assertEqual(len(read_items), 0) - self.assertListEqual(list(headers.keys()), ['x-ms-request-charge']) + self.assertListEqual(list(headers.keys()), ["x-ms-request-charge"]) # Verify the request charge is a positive value. - self.assertGreater(float(headers.get('x-ms-request-charge')), 0) + self.assertGreater(float(headers.get("x-ms-request-charge")), 0) async def test_headers_being_returned_on_success_async(self): """Tests that on success, only the aggregated request charge header is returned.""" @@ -375,10 +380,9 @@ async def test_headers_being_returned_on_success_async(self): self.assertIsNotNone(headers) # On success, only the aggregated request charge should be returned. - self.assertListEqual(list(headers.keys()), ['x-ms-request-charge']) + self.assertListEqual(list(headers.keys()), ["x-ms-request-charge"]) # Verify the request charge is a positive value. - self.assertGreater(float(headers.get('x-ms-request-charge')), 0) - + self.assertGreater(float(headers.get("x-ms-request-charge")), 0) async def test_read_items_large_count_async(self): """Tests read_items with a large number of items.""" @@ -387,7 +391,7 @@ async def test_read_items_large_count_async(self): read_items = await self.container.read_items(items=items_to_read) self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) async def test_read_items_surfaces_exceptions_async(self): @@ -408,12 +412,9 @@ async def test_read_items_surfaces_exceptions_async(self): async def test_read_items_with_throttling_retry_async(self): """Tests that the retry policy handles a throttling error (429) and succeeds.""" error_to_inject = CosmosHttpResponseError( - status_code=429, - message="Throttling error injected for testing", - headers={'x-ms-retry-after-ms': '10'} + status_code=429, message="Throttling error injected for testing", headers={"x-ms-retry-after-ms": "10"} ) - container_with_faults, client_with_faults = self._setup_fault_injection_async(error_to_inject, - inject_once=True) + container_with_faults, client_with_faults = self._setup_fault_injection_async(error_to_inject, inject_once=True) try: items_to_read, item_ids = await self._create_records_for_read_items(self.container, 5, "item_for_throttle") @@ -423,14 +424,14 @@ def side_effect_should_retry(self_instance, exception, *args, **kwargs): return original_should_retry(self_instance, exception) with patch( - 'azure.cosmos._resource_throttle_retry_policy.ResourceThrottleRetryPolicy.ShouldRetry', - side_effect=side_effect_should_retry, - autospec=True + "azure.cosmos._resource_throttle_retry_policy.ResourceThrottleRetryPolicy.ShouldRetry", + side_effect=side_effect_should_retry, + autospec=True, ) as mock_should_retry: read_items = await container_with_faults.read_items(items=items_to_read) mock_should_retry.assert_called_once() self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) finally: await client_with_faults.close() @@ -442,19 +443,17 @@ async def test_read_items_with_gone_retry_async(self): message="Gone error injected for testing", ) error_to_inject.sub_status = 1002 # Substatus for PartitionKeyRangeGone is required - container_with_faults, client_with_faults = self._setup_fault_injection_async(error_to_inject, - inject_once=True) + container_with_faults, client_with_faults = self._setup_fault_injection_async(error_to_inject, inject_once=True) try: items_to_read, item_ids = await self._create_records_for_read_items(self.container, 20, "item_for_gone") with patch( - 'azure.cosmos._gone_retry_policy.PartitionKeyRangeGoneRetryPolicy.ShouldRetry', - autospec=True + "azure.cosmos._gone_retry_policy.PartitionKeyRangeGoneRetryPolicy.ShouldRetry", autospec=True ) as mock_should_retry: read_items = await container_with_faults.read_items(items=items_to_read) mock_should_retry.assert_called_once() self.assertEqual(len(read_items), len(item_ids)) - read_ids = {item['id'] for item in read_items} + read_ids = {item["id"] for item in read_items} self.assertSetEqual(read_ids, set(item_ids)) finally: await client_with_faults.close() @@ -462,8 +461,9 @@ async def test_read_items_with_gone_retry_async(self): async def test_read_after_container_recreation_async(self): """Tests read_items after a container is deleted and recreated with a different configuration.""" container_id = self.container.id - initial_items_to_read, initial_item_ids = await self._create_records_for_read_items(self.container, 3, - "initial") + initial_items_to_read, initial_item_ids = await self._create_records_for_read_items( + self.container, 3, "initial" + ) read_items_before = await self.container.read_items(items=initial_items_to_read) self.assertEqual(len(read_items_before), len(initial_item_ids)) @@ -472,9 +472,7 @@ async def test_read_after_container_recreation_async(self): # Recreate the container with a different partition key and throughput self.container = await self.database.create_container( - id=container_id, - partition_key=PartitionKey(path="/pk"), - offer_throughput=10100 + id=container_id, partition_key=PartitionKey(path="/pk"), offer_throughput=10100 ) # Create new items with the new partition key structure @@ -486,13 +484,13 @@ async def test_read_after_container_recreation_async(self): pk_value = f"new_pk_{i}" new_item_ids.append(doc_id) new_items_to_read.append((doc_id, pk_value)) - task = self.container.create_item({'id': doc_id, 'pk': pk_value, 'data': i}) + task = self.container.create_item({"id": doc_id, "pk": pk_value, "data": i}) creation_tasks.append(task) await asyncio.gather(*creation_tasks) read_items_after = await self.container.read_items(items=new_items_to_read) self.assertEqual(len(read_items_after), len(new_item_ids)) - read_ids = {item['id'] for item in read_items_after} + read_ids = {item["id"] for item in read_items_after} self.assertSetEqual(read_ids, set(new_item_ids)) async def test_read_items_concurrency_internals_async(self): @@ -502,7 +500,7 @@ async def test_read_items_concurrency_internals_async(self): doc_id = f"chunk_item_{i}_{uuid.uuid4()}" items_to_read.append((doc_id, doc_id)) - with patch.object(self.container.client_connection, 'QueryItems') as mock_query: + with patch.object(self.container.client_connection, "QueryItems") as mock_query: # The mock now needs to return an object with a .by_page() method, # which in turn returns an async iterator. class MockPageIterator: @@ -522,30 +520,29 @@ def by_page(self, **kwargs): self.assertEqual(mock_query.call_count, 3) call_args = mock_query.call_args_list - self.assertEqual(len(call_args[0][0][1]['parameters']), 1000) - self.assertEqual(len(call_args[1][0][1]['parameters']), 1000) - self.assertEqual(len(call_args[2][0][1]['parameters']), 500) + self.assertEqual(len(call_args[0][0][1]["parameters"]), 1000) + self.assertEqual(len(call_args[1][0][1]["parameters"]), 1000) + self.assertEqual(len(call_args[2][0][1]["parameters"]), 500) async def test_read_items_multiple_physical_partitions_and_hook_async(self): """Tests async read_items on a container with multiple physical partitions and verifies response_hook.""" # Create a container with high throughput to force multiple physical partitions multi_partition_container = await self.database.create_container( - id='multi_partition_container_async_' + str(uuid.uuid4()), + id="multi_partition_container_async_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/pk"), - offer_throughput=11000 + offer_throughput=11000, ) try: # 1. Verify that we have more than one physical partition # We must consume the async iterator to get the list of partition key ranges. pk_ranges = [ - pk_range async for pk_range in - multi_partition_container.client_connection._ReadPartitionKeyRanges( + pk_range + async for pk_range in multi_partition_container.client_connection._ReadPartitionKeyRanges( multi_partition_container.container_link ) ] self.assertGreater(len(pk_ranges), 1, "Container should have multiple physical partitions.") - # 2. Create items across different logical partitions creation_tasks = [] items_to_read = [] @@ -554,7 +551,7 @@ async def test_read_items_multiple_physical_partitions_and_hook_async(self): doc_id = f"item_{i}_{uuid.uuid4()}" pk = i % 2 all_item_ids.add(doc_id) - task = multi_partition_container.create_item({'id': doc_id, 'pk': pk, 'data': i}) + task = multi_partition_container.create_item({"id": doc_id, "pk": pk, "data": i}) creation_tasks.append(task) items_to_read.append((doc_id, pk)) await asyncio.gather(*creation_tasks) @@ -562,50 +559,49 @@ async def test_read_items_multiple_physical_partitions_and_hook_async(self): # 3. Check item distribution across physical partitions partition_item_map = {} for pk_range in pk_ranges: - pk_range_id = pk_range['id'] + pk_range_id = pk_range["id"] # Query items within this specific physical partition items_in_partition = [ - item async for item in multi_partition_container.query_items( - "SELECT c.id FROM c", - partition_key_range_id=pk_range_id + item + async for item in multi_partition_container.query_items( + "SELECT c.id FROM c", partition_key_range_id=pk_range_id ) ] if items_in_partition: - partition_item_map[pk_range_id] = {item['id'] for item in items_in_partition} + partition_item_map[pk_range_id] = {item["id"] for item in items_in_partition} # Assert that items were created on more than one physical partition - self.assertGreater(len(partition_item_map), 1, - "Items were not distributed across multiple physical partitions.") + self.assertGreater( + len(partition_item_map), 1, "Items were not distributed across multiple physical partitions." + ) # 3. Set up a response hook to capture both headers and results hook_captured_data = {} def response_hook(headers, results_list): - hook_captured_data['headers'] = headers - hook_captured_data['results'] = results_list - hook_captured_data['call_count'] = hook_captured_data.get('call_count', 0) + 1 + hook_captured_data["headers"] = headers + hook_captured_data["results"] = results_list + hook_captured_data["call_count"] = hook_captured_data.get("call_count", 0) + 1 # 4. Execute read_items with the hook read_items_result = await multi_partition_container.read_items( - items=items_to_read, - response_hook=response_hook + items=items_to_read, response_hook=response_hook ) # 5. Verify the response_hook was called correctly - self.assertEqual(hook_captured_data.get('call_count'), 1, - "Response hook should be called exactly once.") + self.assertEqual(hook_captured_data.get("call_count"), 1, "Response hook should be called exactly once.") # Verify the headers passed to the hook - hook_headers = hook_captured_data.get('headers', {}) - self.assertIn('x-ms-request-charge', hook_headers) - self.assertGreater(float(hook_headers['x-ms-request-charge']), 0) + hook_headers = hook_captured_data.get("headers", {}) + self.assertIn("x-ms-request-charge", hook_headers) + self.assertGreater(float(hook_headers["x-ms-request-charge"]), 0) # Verify the CosmosList passed to the hook - hook_results = hook_captured_data.get('results') + hook_results = hook_captured_data.get("results") self.assertIsNotNone(hook_results, "CosmosList should be passed to the hook.") self.assertIsInstance(hook_results, list) # CosmosList inherits from list self.assertEqual(len(hook_results), len(items_to_read)) - hook_read_ids = {item['id'] for item in hook_results} + hook_read_ids = {item["id"] for item in hook_results} self.assertSetEqual(hook_read_ids, all_item_ids) # Verify that the CosmosList passed to the hook is the same object as the one returned @@ -614,5 +610,6 @@ def response_hook(headers, results_list): finally: await self.database.delete_container(multi_partition_container) -if __name__ == '__main__': - unittest.main() \ No newline at end of file + +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split.py b/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split.py index fc8ad6b55d8d..2e5f315ef121 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split.py +++ b/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split.py @@ -27,9 +27,9 @@ def setUpClass(cls): def test_read_items_with_partition_split(self): """Tests that read_items works correctly after a partition split.""" - container = self.database.create_container("read_items_split_test_" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=400) + container = self.database.create_container( + "read_items_split_test_" + str(uuid.uuid4()), PartitionKey(path="/pk"), offer_throughput=400 + ) # 1. Create 5 items to read items_to_read = [] item_ids = [] @@ -37,7 +37,7 @@ def test_read_items_with_partition_split(self): doc_id = f"item_split_{i}_{uuid.uuid4()}" item_ids.append(doc_id) # Add the partition key field 'pk' to the item body - container.create_item({'id': doc_id, 'pk': doc_id, 'data': i}) + container.create_item({"id": doc_id, "pk": doc_id, "data": i}) items_to_read.append((doc_id, doc_id)) # 2. Initial read_items call before the split @@ -55,10 +55,11 @@ def test_read_items_with_partition_split(self): # 5. Verify the results self.assertEqual(len(final_read_items), len(items_to_read)) - final_read_ids = {item['id'] for item in final_read_items} + final_read_ids = {item["id"] for item in final_read_items} self.assertSetEqual(final_read_ids, set(item_ids)) print("Post-split call successful.") self.database.delete_container(container.id) -if __name__ == '__main__': - unittest.main() \ No newline at end of file + +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split_async.py b/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split_async.py index 1886e0f7fa47..de52c64efca2 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_read_items_partition_split_async.py @@ -29,9 +29,8 @@ async def asyncTearDown(self): async def test_read_items_with_partition_split_async(self): """Tests that read_items works correctly after a partition split.""" container = await self.database.create_container( - "read_items_split_test_async" + str(uuid.uuid4()), - PartitionKey(path="/pk"), - offer_throughput=400) + "read_items_split_test_async" + str(uuid.uuid4()), PartitionKey(path="/pk"), offer_throughput=400 + ) # 1. Create 5 items to read items_to_read = [] item_ids = [] @@ -39,7 +38,7 @@ async def test_read_items_with_partition_split_async(self): doc_id = f"item_split_{i}_{uuid.uuid4()}" item_ids.append(doc_id) # Add the partition key field 'pk' to the item body - await container.create_item({'id': doc_id, 'pk': doc_id, 'data': i}) + await container.create_item({"id": doc_id, "pk": doc_id, "data": i}) items_to_read.append((doc_id, doc_id)) # 2. Initial read_items call before the split @@ -57,11 +56,11 @@ async def test_read_items_with_partition_split_async(self): # 5. Verify the results self.assertEqual(len(final_read_items), len(items_to_read)) - final_read_ids = {item['id'] for item in final_read_items} + final_read_ids = {item["id"] for item in final_read_items} self.assertSetEqual(final_read_ids, set(item_ids)) print("Post-split call successful.") await self.database.delete_container(container.id) -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context.py b/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context.py index f44d9c75eeae..05a46c6675f2 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context.py +++ b/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context.py @@ -18,25 +18,28 @@ class TestRegionalRoutingContext(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.created_database = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.created_container = cls.created_database.get_container_client(cls.TEST_CONTAINER_ID) def test_no_swaps_on_successful_request(self): - original_read_endpoint = (self.client.client_connection._global_endpoint_manager - .location_cache.get_read_regional_routing_context()) + original_read_endpoint = ( + self.client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_context() + ) self.created_container.create_item(body={"id": str(uuid.uuid4())}) # Check for if there was a swap - self.assertEqual(original_read_endpoint, - self.client.client_connection._global_endpoint_manager - .location_cache.get_read_regional_routing_context()) - self.assertEqual(original_read_endpoint, - self.client.client_connection._global_endpoint_manager - .location_cache.get_write_regional_routing_context()) + self.assertEqual( + original_read_endpoint, + self.client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_context(), + ) + self.assertEqual( + original_read_endpoint, + self.client.client_connection._global_endpoint_manager.location_cache.get_write_regional_routing_context(), + ) diff --git a/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context_async.py b/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context_async.py index 0267c4c9f710..a14873885f1b 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_regional_routing_context_async.py @@ -18,12 +18,12 @@ class TestRegionalRoutingContextAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -36,13 +36,16 @@ async def asyncTearDown(self): async def test_no_swaps_on_successful_request_async(self): # Make sure that getDatabaseAccount call has finished await self.client.__aenter__() - original_read_endpoint = (self.client.client_connection._global_endpoint_manager - .location_cache.get_read_regional_routing_context()) + original_read_endpoint = ( + self.client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_context() + ) await self.created_container.create_item(body={"id": str(uuid.uuid4())}) # Check for if there was a swap - self.assertEqual(original_read_endpoint, - self.client.client_connection._global_endpoint_manager - .location_cache.get_read_regional_routing_context()) - self.assertEqual(original_read_endpoint, - self.client.client_connection._global_endpoint_manager - .location_cache.get_write_regional_routing_context()) + self.assertEqual( + original_read_endpoint, + self.client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_context(), + ) + self.assertEqual( + original_read_endpoint, + self.client.client_connection._global_endpoint_manager.location_cache.get_write_regional_routing_context(), + ) diff --git a/sdk/cosmos/azure-cosmos/tests/test_resource_id.py b/sdk/cosmos/azure-cosmos/tests/test_resource_id.py index beb5aaea7b61..0d6b26e77c05 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_resource_id.py +++ b/sdk/cosmos/azure-cosmos/tests/test_resource_id.py @@ -22,17 +22,17 @@ class TestResourceIds(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) def test_id_unicode_validation(self): # unicode chars in Hindi for Id which translates to: "Hindi is the national language of India" - resource_id1 = u'हिन्दी भारत की राष्ट्रीय भाषा है' + str(uuid.uuid4()) # cspell:disable-line + resource_id1 = "हिन्दी भारत की राष्ट्रीय भाषा है" + str(uuid.uuid4()) # cspell:disable-line # Special allowed chars for Id resource_id2 = "!@$%^&*()-~`'_[]{}|;:,.<>" + str(uuid.uuid4()) @@ -46,11 +46,11 @@ def test_id_unicode_validation(self): # verify that collections are created with specified IDs created_collection1 = created_db1.create_container( - id=resource_id1, - partition_key=PartitionKey(path='/id', kind='Hash')) + id=resource_id1, partition_key=PartitionKey(path="/id", kind="Hash") + ) created_collection2 = created_db2.create_container( - id=resource_id2, - partition_key=PartitionKey(path='/id', kind='Hash')) + id=resource_id2, partition_key=PartitionKey(path="/id", kind="Hash") + ) assert resource_id1 == created_collection1.id assert resource_id2 == created_collection2.id @@ -74,7 +74,7 @@ def test_create_illegal_characters(self): created_container = created_database.create_container(id=container_id, partition_key=partition_key) # Define errors returned by checks - error_strings = ['Id contains illegal chars.', 'Id ends with a space or newline.'] + error_strings = ["Id contains illegal chars.", "Id ends with a space or newline."] # Define illegal strings illegal_strings = [ @@ -87,7 +87,7 @@ def test_create_illegal_characters(self): "ID_with_newline\n", "ID_with_newline\n2", "ID_with_more_than_255" + "_add" * 255, - "ID_with_trailing_spaces " + "ID_with_trailing_spaces ", ] # test illegal resource id's for all resources @@ -132,5 +132,5 @@ def test_create_illegal_characters(self): self.client.delete_database(database_id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_resource_id_async.py b/sdk/cosmos/azure-cosmos/tests/test_resource_id_async.py index 4ff86ca401d4..c32ac4cbac3e 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_resource_id_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_resource_id_async.py @@ -23,12 +23,12 @@ class TestResourceIdsAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -38,7 +38,7 @@ async def asyncTearDown(self): async def test_id_unicode_validation_async(self): # unicode chars in Hindi for Id which translates to: "Hindi is the national language of India" - resource_id1 = u'हिन्दी भारत की राष्ट्रीय भाषा है' + str(uuid.uuid4()) # cspell:disable-line + resource_id1 = "हिन्दी भारत की राष्ट्रीय भाषा है" + str(uuid.uuid4()) # cspell:disable-line # Special allowed chars for Id resource_id2 = "!@$%^&*()-~`'_[]{}|;:,.<>" + str(uuid.uuid4()) @@ -52,11 +52,11 @@ async def test_id_unicode_validation_async(self): # verify that collections are created with specified IDs created_collection1 = await created_db1.create_container( - id=resource_id1, - partition_key=PartitionKey(path='/id', kind='Hash')) + id=resource_id1, partition_key=PartitionKey(path="/id", kind="Hash") + ) created_collection2 = await created_db2.create_container( - id=resource_id2, - partition_key=PartitionKey(path='/id', kind='Hash')) + id=resource_id2, partition_key=PartitionKey(path="/id", kind="Hash") + ) assert resource_id1 == created_collection1.id assert resource_id2 == created_collection2.id @@ -80,7 +80,7 @@ async def test_create_illegal_characters_async(self): created_container = await created_database.create_container(id=container_id, partition_key=partition_key) # Define errors returned by checks - error_strings = ['Id contains illegal chars.', 'Id ends with a space or newline.'] + error_strings = ["Id contains illegal chars.", "Id ends with a space or newline."] # Define illegal strings illegal_strings = [ @@ -93,7 +93,7 @@ async def test_create_illegal_characters_async(self): "ID_with_newline\n", "ID_with_newline\n2", "ID_with_more_than_255" + "_added" * 255, - "ID_with_trailing_spaces " + "ID_with_trailing_spaces ", ] # test illegal resource id's for all resources @@ -137,5 +137,5 @@ async def test_create_illegal_characters_async(self): await self.client.delete_database(created_database) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_retry_policy.py b/sdk/cosmos/azure-cosmos/tests/test_retry_policy.py index f12924460d71..e4e6cca2e153 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_retry_policy.py @@ -19,12 +19,15 @@ from azure.cosmos._constants import _Constants -def setup_method_with_custom_transport( - custom_transport, - **kwargs): +def setup_method_with_custom_transport(custom_transport, **kwargs): connection_retry_policy = test_config.MockConnectionRetryPolicy(resource_type="docs") - client = cosmos_client.CosmosClient(test_config.TestConfig.host, test_config.TestConfig.masterKey, - transport=custom_transport, connection_retry_policy=connection_retry_policy, **kwargs) + client = cosmos_client.CosmosClient( + test_config.TestConfig.host, + test_config.TestConfig.masterKey, + transport=custom_transport, + connection_retry_policy=connection_retry_policy, + **kwargs + ) db = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = db.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) return {"client": client, "db": db, "col": container, "retry_policy": connection_retry_policy} @@ -50,27 +53,29 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) - cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey, consistency_level="Session", - connection_policy=cls.connectionPolicy) + cls.client = cosmos_client.CosmosClient( + cls.host, cls.masterKey, consistency_level="Session", connection_policy=cls.connectionPolicy + ) cls.created_database = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.retry_after_in_milliseconds = 1000 def setUp(self) -> None: - self.created_collection = self.created_database.create_container(self.TEST_CONTAINER_SINGLE_PARTITION_ID, - partition_key=PartitionKey("/pk")) + self.created_collection = self.created_database.create_container( + self.TEST_CONTAINER_SINGLE_PARTITION_ID, partition_key=PartitionKey("/pk") + ) def tearDown(self) -> None: try: @@ -86,22 +91,22 @@ def test_resource_throttle_retry_policy_default_retry_after(self): try: _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.created_collection.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(connection_policy.RetryOptions.MaxRetryAttemptCount, - self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + self.assertEqual( + connection_policy.RetryOptions.MaxRetryAttemptCount, + self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + self.created_collection.client_connection.last_response_headers[ + HttpHeaders.ThrottleRetryWaitTimeInMs + ], + connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -113,21 +118,23 @@ def test_resource_throttle_retry_policy_fixed_retry_after(self): try: _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.created_collection.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(connection_policy.RetryOptions.MaxRetryAttemptCount, - self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) + self.assertEqual( + connection_policy.RetryOptions.MaxRetryAttemptCount, + self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + self.created_collection.client_connection.last_response_headers[ + HttpHeaders.ThrottleRetryWaitTimeInMs + ], + connection_policy.RetryOptions.MaxRetryAttemptCount + * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -140,18 +147,18 @@ def test_resource_throttle_retry_policy_max_wait_time(self): try: _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.created_collection.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) + self.assertGreaterEqual( + self.created_collection.client_connection.last_response_headers[ + HttpHeaders.ThrottleRetryWaitTimeInMs + ], + connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -159,10 +166,7 @@ def test_resource_throttle_retry_policy_query(self): connection_policy = TestRetryPolicy.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} self.created_collection.create_item(body=document_definition) @@ -171,35 +175,34 @@ def test_resource_throttle_retry_policy_query(self): _retry_utility.ExecuteFunction = self._MockExecuteFunction try: - list(self.created_collection.query_items( - { - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': document_definition['id']} - ] - })) + list( + self.created_collection.query_items( + { + "query": "SELECT * FROM root r WHERE r.id=@id", + "parameters": [{"name": "@id", "value": document_definition["id"]}], + } + ) + ) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(connection_policy.RetryOptions.MaxRetryAttemptCount, - self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(self.created_collection.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) + self.assertEqual( + connection_policy.RetryOptions.MaxRetryAttemptCount, + self.created_collection.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + self.created_collection.client_connection.last_response_headers[ + HttpHeaders.ThrottleRetryWaitTimeInMs + ], + connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function # TODO: Need to validate the query retries @pytest.mark.skip def test_default_retry_policy_for_query(self): - document_definition_1 = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} - document_definition_2 = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition_1 = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} + document_definition_2 = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} self.created_collection.create_item(body=document_definition_1) self.created_collection.create_item(body=document_definition_2) @@ -208,22 +211,20 @@ def test_default_retry_policy_for_query(self): mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) _retry_utility.ExecuteFunction = mf - docs = self.created_collection.query_items(query="Select * from c order by c._ts", max_item_count=1, - enable_cross_partition_query=True) + docs = self.created_collection.query_items( + query="Select * from c order by c._ts", max_item_count=1, enable_cross_partition_query=True + ) result_docs = list(docs) - self.assertEqual(result_docs[0]['id'], document_definition_1['id']) - self.assertEqual(result_docs[1]['id'], document_definition_2['id']) + self.assertEqual(result_docs[0]["id"], document_definition_1["id"]) + self.assertEqual(result_docs[1]["id"], document_definition_2["id"]) self.assertEqual(mf.counter, 27) finally: _retry_utility.ExecuteFunction = self.original_execute_function def test_default_retry_policy_for_create(self): - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunction @@ -243,10 +244,7 @@ def test_default_retry_policy_for_create(self): _retry_utility.ExecuteFunction = self.original_execute_function def test_timeout_failover_retry_policy_for_read(self): - document_definition = {'id': 'failoverDoc', - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "failoverDoc", "pk": "pk", "name": "sample document", "key": "value"} created_document = self.created_collection.create_item(body=document_definition) self.original_execute_function = _retry_utility.ExecuteFunction @@ -254,7 +252,7 @@ def test_timeout_failover_retry_policy_for_read(self): mf = self.MockExecuteFunctionTimeout(self.original_execute_function) _retry_utility.ExecuteFunction = mf try: - self.created_collection.read_item(item=created_document['id'], partition_key=created_document['pk']) + self.created_collection.read_item(item=created_document["id"], partition_key=created_document["pk"]) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 408) finally: @@ -269,47 +267,48 @@ def test_resource_throttle_retry_policy_with_retry_total(self): try: self.original_execute_function = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, max_total_retries) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, + max_total_retries, + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount + * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function def test_resource_throttle_retry_policy_with_retry_throttle_total(self): - #Testing the kwarg retry_throttle_total is behaving as expected + # Testing the kwarg retry_throttle_total is behaving as expected with cosmos_client.CosmosClient(self.host, self.masterKey, retry_throttle_total=5) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) try: self.original_execute_function = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount + * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -318,27 +317,31 @@ def test_resource_throttle_retry_policy_precedence(self): max_retry_throttle_retries = 15 max_total_retries = 20 - with cosmos_client.CosmosClient(self.host, self.masterKey, retry_throttle_total=max_retry_throttle_retries, retry_total=max_total_retries) as client: + with cosmos_client.CosmosClient( + self.host, self.masterKey, retry_throttle_total=max_retry_throttle_retries, retry_total=max_total_retries + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) try: self.original_execute_function = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, max_total_retries) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, + max_total_retries, + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount + * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -346,13 +349,12 @@ def test_resource_connection_retry_policy_max_backoff(self): # Tests that kwarg retry_max_backoff sets both throttle and connection retry policy max_backoff_in_seconds = 10 - with cosmos_client.CosmosClient(self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, retry_total=5) as client: + with cosmos_client.CosmosClient( + self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, retry_total=5 + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -361,8 +363,14 @@ def test_resource_connection_retry_policy_max_backoff(self): created_document = container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 10054) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, max_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, max_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, + max_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_backoff_in_seconds, + ) self.assertDictEqual(created_document, {}) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -371,13 +379,12 @@ def test_resource_throttle_retry_policy_max_throttle_backoff(self): # Tests that kwarg retry_throttle_backoff_max sets the throttle max backoff retry independent of connection max backoff retry max_throttle_backoff_in_seconds = 10 - with cosmos_client.CosmosClient(self.host, self.masterKey, retry_throttle_backoff_max=max_throttle_backoff_in_seconds) as client: + with cosmos_client.CosmosClient( + self.host, self.masterKey, retry_throttle_backoff_max=max_throttle_backoff_in_seconds + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -386,8 +393,10 @@ def test_resource_throttle_retry_policy_max_throttle_backoff(self): created_document = container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 10054) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_throttle_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_throttle_backoff_in_seconds, + ) self.assertDictEqual(created_document, {}) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -397,14 +406,15 @@ def test_resource_throttle_retry_policy_max_backoff_precedence(self): max_backoff_in_seconds = 10 max_throttle_backoff_in_seconds = 5 - with cosmos_client.CosmosClient(self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, - retry_throttle_backoff_max=max_throttle_backoff_in_seconds) as client: + with cosmos_client.CosmosClient( + self.host, + self.masterKey, + retry_backoff_max=max_backoff_in_seconds, + retry_throttle_backoff_max=max_throttle_backoff_in_seconds, + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunction mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -413,10 +423,14 @@ def test_resource_throttle_retry_policy_max_backoff_precedence(self): created_document = container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 10054) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, - max_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_throttle_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, + max_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_throttle_backoff_in_seconds, + ) self.assertDictEqual(created_document, {}) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -428,10 +442,14 @@ def test_resource_throttle_and_connection_retry_total_retry_with_max_backoff(sel max_throttle_backoff_in_seconds = 25 max_backoff_in_seconds = 30 - with cosmos_client.CosmosClient(self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, - retry_throttle_backoff_max=max_throttle_backoff_in_seconds, - retry_throttle_total=max_retry_throttle_retries, - retry_total=max_total_retries) as client: + with cosmos_client.CosmosClient( + self.host, + self.masterKey, + retry_backoff_max=max_backoff_in_seconds, + retry_throttle_backoff_max=max_throttle_backoff_in_seconds, + retry_throttle_total=max_retry_throttle_retries, + retry_total=max_total_retries, + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -439,38 +457,42 @@ def test_resource_throttle_and_connection_retry_total_retry_with_max_backoff(sel try: _retry_utility.ExecuteFunction = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, - max_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_throttle_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, - max_total_retries) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, + max_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_throttle_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, + max_total_retries, + ) finally: _retry_utility.ExecuteFunction = self.original_execute_function def test_patch_replace_no_retry(self): - doc = {'id': str(uuid.uuid4()), - 'pk': str(uuid.uuid4()), - 'name': 'sample document', - 'key': 'value'} - custom_transport = FaultInjectionTransport() - predicate = lambda r: (FaultInjectionTransport.predicate_is_operation_type(r, documents._OperationType.Patch) - or FaultInjectionTransport.predicate_is_operation_type(r, documents._OperationType.Replace)) - custom_transport.add_fault(predicate, lambda r: FaultInjectionTransport.error_after_delay( - 0, - exceptions.CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error."))) + doc = {"id": str(uuid.uuid4()), "pk": str(uuid.uuid4()), "name": "sample document", "key": "value"} + custom_transport = FaultInjectionTransport() + predicate = lambda r: ( + FaultInjectionTransport.predicate_is_operation_type(r, documents._OperationType.Patch) + or FaultInjectionTransport.predicate_is_operation_type(r, documents._OperationType.Replace) + ) + custom_transport.add_fault( + predicate, + lambda r: FaultInjectionTransport.error_after_delay( + 0, exceptions.CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ), + ) initialized_objects = setup_method_with_custom_transport( custom_transport, @@ -480,19 +502,18 @@ def test_patch_replace_no_retry(self): container.create_item(body=doc) operations = [{"op": "incr", "path": "/company", "value": 3}] with self.assertRaises(exceptions.CosmosHttpResponseError): - container.patch_item(item=doc['id'], partition_key=doc['pk'], patch_operations=operations) + container.patch_item(item=doc["id"], partition_key=doc["pk"], patch_operations=operations) assert connection_retry_policy.counter == 0 with self.assertRaises(exceptions.CosmosHttpResponseError): - doc['name'] = "something else" - container.replace_item(item=doc['id'], body=doc) + doc["name"] = "something else" + container.replace_item(item=doc["id"], body=doc) assert connection_retry_policy.counter == 0 - def test_health_check_retry_policy(self): - os.environ['AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES'] = '5' - os.environ['AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS'] = '2' - max_retries = int(os.environ['AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES']) - retry_after_ms = int(os.environ['AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS']) + os.environ["AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES"] = "5" + os.environ["AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS"] = "2" + max_retries = int(os.environ["AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES"]) + retry_after_ms = int(os.environ["AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS"]) self.original_execute_function = _retry_utility.ExecuteFunction mock_execute = self.MockExecuteFunctionHealthCheck(self.original_execute_function) _retry_utility.ExecuteFunction = mock_execute @@ -522,14 +543,10 @@ def test_health_check_retry_policy_defaults(self): cosmos_client.CosmosClient(self.host, self.masterKey) self.assertEqual(context.exception.status_code, 503) - self.assertEqual( - mock_execute.counter, - _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1 - ) + self.assertEqual(mock_execute.counter, _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1) policy = HealthCheckRetryPolicy(self.connectionPolicy) self.assertEqual( - policy.retry_after_in_milliseconds, - _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT + policy.retry_after_in_milliseconds, _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -545,14 +562,10 @@ def test_health_check_retry_with_service_response_error(self): # Client initialization triggers database account read # Should use default retry attempts from _constants.py - self.assertEqual( - mock_execute.counter, - _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1 - ) + self.assertEqual(mock_execute.counter, _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1) policy = HealthCheckRetryPolicy(self.connectionPolicy) self.assertEqual( - policy.retry_after_in_milliseconds, - _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT + policy.retry_after_in_milliseconds, _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT ) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -565,8 +578,10 @@ def __init__(self, org_func): def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 return self.org_func(func, *args, **kwargs) @@ -578,8 +593,10 @@ def __init__(self, org_func): def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 raise ServiceResponseError("mocked service response error") return self.org_func(func, *args, **kwargs) @@ -593,8 +610,10 @@ def __init__(self, org_func, error): def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 raise self.error return self.org_func(func, *args, **kwargs) @@ -602,9 +621,8 @@ def __call__(self, func, *args, **kwargs): def _MockExecuteFunction(self, function, *args, **kwargs): response = test_config.FakeResponse({HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.TOO_MANY_REQUESTS, - message="Request rate is too large", - response=response) + status_code=StatusCodes.TOO_MANY_REQUESTS, message="Request rate is too large", response=response + ) class MockExecuteFunctionTimeout(object): def __init__(self, org_func): @@ -613,9 +631,8 @@ def __init__(self, org_func): def __call__(self, func, *args, **kwargs): raise exceptions.CosmosHttpResponseError( - status_code=408, - message="Timeout", - response=test_config.FakeResponse({})) + status_code=408, message="Timeout", response=test_config.FakeResponse({}) + ) class MockExecuteFunctionConnectionReset(object): def __init__(self, org_func): @@ -628,9 +645,8 @@ def __call__(self, func, *args, **kwargs): return self.org_func(func, *args, **kwargs) else: raise exceptions.CosmosHttpResponseError( - status_code=10054, - message="Connection was reset", - response=test_config.FakeResponse({})) + status_code=10054, message="Connection was reset", response=test_config.FakeResponse({}) + ) class MockExecuteFunctionHealthCheck(object): def __init__(self, org_func): @@ -639,14 +655,14 @@ def __init__(self, org_func): def __call__(self, func, *args, **kwargs): request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 - raise exceptions.CosmosHttpResponseError( - status_code=503, - message="Service Unavailable.") + raise exceptions.CosmosHttpResponseError(status_code=503, message="Service Unavailable.") return self.org_func(func, *args, **kwargs) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_retry_policy_async.py b/sdk/cosmos/azure-cosmos/tests/test_retry_policy_async.py index e8edb035958d..6bcf1b97f6ad 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_retry_policy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_retry_policy_async.py @@ -24,20 +24,23 @@ from azure.cosmos._constants import _Constants from azure.cosmos._health_check_retry_policy import HealthCheckRetryPolicy + class ConnectionMode: """Represents the connection mode to be used by the client.""" + Gateway: int = 0 """Use the Azure Cosmos gateway to route all requests. The gateway proxies requests to the right data partition. """ + class ConnectionPolicy: - #Represents the Connection policy associated with a CosmosClientConnection. + # Represents the Connection policy associated with a CosmosClientConnection. __defaultRequestTimeout: int = 5 # seconds __defaultDBAConnectionTimeout: int = 3 # seconds __defaultReadTimeout: int = 65 # seconds - __defaultDBAReadTimeout: int = 3 # seconds - __defaultMaxBackoff: int = 1 # seconds + __defaultDBAReadTimeout: int = 3 # seconds + __defaultMaxBackoff: int = 1 # seconds def __init__(self) -> None: self.RequestTimeout: int = self.__defaultRequestTimeout @@ -57,18 +60,23 @@ def __init__(self) -> None: self.ConnectionRetryConfiguration: Optional["ConnectionRetryPolicy"] = None self.ResponsePayloadOnWriteDisabled: bool = False -async def setup_method_with_custom_transport( - custom_transport, - **kwargs): + +async def setup_method_with_custom_transport(custom_transport, **kwargs): connection_policy = ConnectionPolicy() connection_retry_policy = test_config.MockConnectionRetryPolicyAsync(resource_type="docs") connection_policy.ConnectionRetryConfiguration = connection_retry_policy - client = CosmosClient(test_config.TestConfig.host, test_config.TestConfig.masterKey, - transport=custom_transport, connection_policy=connection_policy, **kwargs) + client = CosmosClient( + test_config.TestConfig.host, + test_config.TestConfig.masterKey, + transport=custom_transport, + connection_policy=connection_policy, + **kwargs + ) db = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = db.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) return {"client": client, "db": db, "col": container, "retry_policy": connection_retry_policy} + @pytest.mark.cosmosEmulator class TestRetryPolicyAsync(unittest.IsolatedAsyncioTestCase): created_database: DatabaseProxy = None @@ -91,18 +99,18 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def test_resource_throttle_retry_policy_default_retry_after_async(self): connection_policy = TestRetryPolicyAsync.connectionPolicy @@ -115,22 +123,20 @@ async def test_resource_throttle_retry_policy_default_retry_after_async(self): try: _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + self.assertEqual( + connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -144,21 +150,21 @@ async def test_resource_throttle_retry_policy_fixed_retry_after_async(self): try: _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxRetryAttemptCount * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds) + self.assertEqual( + connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + connection_policy.RetryOptions.MaxRetryAttemptCount + * connection_policy.RetryOptions.FixedRetryIntervalInMilliseconds, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -173,18 +179,16 @@ async def test_resource_throttle_retry_policy_max_wait_time_async(self): try: _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + connection_policy.RetryOptions.MaxWaitTimeInSeconds * 1000, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -192,10 +196,7 @@ async def test_resource_throttle_retry_policy_query_async(self): connection_policy = TestRetryPolicyAsync.connectionPolicy connection_policy.RetryOptions = retry_options.RetryOptions(5) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} async with CosmosClient(self.host, self.masterKey, connection_policy=connection_policy) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -208,35 +209,30 @@ async def test_resource_throttle_retry_policy_query_async(self): try: query_results = container.query_items( { - 'query': 'SELECT * FROM root r WHERE r.id=@id', - 'parameters': [ - {'name': '@id', 'value': document_definition['id']} - ] - }) + "query": "SELECT * FROM root r WHERE r.id=@id", + "parameters": [{"name": "@id", "value": document_definition["id"]}], + } + ) async for item in query_results: pass except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds) + self.assertEqual( + connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + connection_policy.RetryOptions.MaxRetryAttemptCount * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function # TODO: Need to validate the query retries @pytest.mark.skip async def test_default_retry_policy_for_query_async(self): - document_definition_1 = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} - document_definition_2 = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition_1 = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} + document_definition_2 = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} self.created_collection.create_item(body=document_definition_1) self.created_collection.create_item(body=document_definition_2) @@ -245,26 +241,25 @@ async def test_default_retry_policy_for_query_async(self): mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) _retry_utility.ExecuteFunctionAsync = mf - docs = await self.created_collection.query_items(query="Select * from c order by c._ts", max_item_count=1, - enable_cross_partition_query=True) + docs = await self.created_collection.query_items( + query="Select * from c order by c._ts", max_item_count=1, enable_cross_partition_query=True + ) result_docs = list(docs) - self.assertEqual(result_docs[0]['id'], document_definition_1['id']) - self.assertEqual(result_docs[1]['id'], document_definition_2['id']) + self.assertEqual(result_docs[0]["id"], document_definition_1["id"]) + self.assertEqual(result_docs[1]["id"], document_definition_2["id"]) self.assertEqual(mf.counter, 27) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function async def test_default_retry_policy_for_create_async(self): - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} async with CosmosClient(self.host, self.masterKey) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) - container = await database.create_container_if_not_exists(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID, - partition_key=PartitionKey("/pk")) + container = await database.create_container_if_not_exists( + test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID, partition_key=PartitionKey("/pk") + ) try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -283,10 +278,7 @@ async def test_default_retry_policy_for_create_async(self): _retry_utility.ExecuteFunctionAsync = self.original_execute_function async def test_timeout_failover_retry_policy_for_read_async(self): - document_definition = {'id': 'failoverDoc', - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "failoverDoc", "pk": "pk", "name": "sample document", "key": "value"} async with CosmosClient(self.host, self.masterKey) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -296,7 +288,7 @@ async def test_timeout_failover_retry_policy_for_read_async(self): mf = self.MockExecuteFunctionTimeout(self.original_execute_function) _retry_utility.ExecuteFunctionAsync = mf try: - await container.read_item(item=created_document['id'], partition_key=created_document['pk']) + await container.read_item(item=created_document["id"], partition_key=created_document["pk"]) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 408) finally: @@ -311,23 +303,23 @@ async def test_resource_throttle_retry_policy_with_retry_total_async(self): try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) self.assertEqual( container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, - max_total_retries) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + max_total_retries, + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount + * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -339,21 +331,20 @@ async def test_resource_throttle_retry_policy_with_retry_throttle_total_async(se try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount + * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -362,30 +353,31 @@ async def test_resource_throttle_retry_policy_precedence_async(self): max_retry_throttle_retries = 15 max_total_retries = 20 - async with CosmosClient(self.host, self.masterKey, retry_throttle_total=max_retry_throttle_retries, - retry_total=max_total_retries) as client: + async with CosmosClient( + self.host, self.masterKey, retry_throttle_total=max_retry_throttle_retries, retry_total=max_total_retries + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) self.assertEqual( container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, - max_total_retries) - self.assertGreaterEqual(container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryWaitTimeInMs], - container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount * - self.retry_after_in_milliseconds) + max_total_retries, + ) + self.assertGreaterEqual( + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryWaitTimeInMs], + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount + * self.retry_after_in_milliseconds, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -393,14 +385,12 @@ async def test_resource_connection_retry_policy_max_backoff_async(self): # Tests that kwarg retry_max_backoff sets both throttle and connection retry policy max_backoff_in_seconds = 10 - async with CosmosClient(self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, - retry_total=5) as client: + async with CosmosClient( + self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, retry_total=5 + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -409,10 +399,14 @@ async def test_resource_connection_retry_policy_max_backoff_async(self): created_document = await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 10054) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, - max_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, + max_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_backoff_in_seconds, + ) self.assertDictEqual(created_document, {}) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -421,14 +415,12 @@ async def test_resource_throttle_retry_policy_max_throttle_backoff_async(self): # Tests that kwarg retry_throttle_backoff_max sets the throttle max backoff retry independent of connection max backoff retry max_throttle_backoff_in_seconds = 10 - async with CosmosClient(self.host, self.masterKey, - retry_throttle_backoff_max=max_throttle_backoff_in_seconds) as client: + async with CosmosClient( + self.host, self.masterKey, retry_throttle_backoff_max=max_throttle_backoff_in_seconds + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -437,8 +429,10 @@ async def test_resource_throttle_retry_policy_max_throttle_backoff_async(self): created_document = await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 10054) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_throttle_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_throttle_backoff_in_seconds, + ) self.assertDictEqual(created_document, {}) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -448,14 +442,15 @@ async def test_resource_throttle_retry_policy_max_backoff_precedence_async(self) max_backoff_in_seconds = 10 max_throttle_backoff_in_seconds = 5 - async with CosmosClient(self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, - retry_throttle_backoff_max=max_throttle_backoff_in_seconds) as client: + async with CosmosClient( + self.host, + self.masterKey, + retry_backoff_max=max_backoff_in_seconds, + retry_throttle_backoff_max=max_throttle_backoff_in_seconds, + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} try: self.original_execute_function = _retry_utility.ExecuteFunctionAsync mf = self.MockExecuteFunctionConnectionReset(self.original_execute_function) @@ -464,10 +459,14 @@ async def test_resource_throttle_retry_policy_max_backoff_precedence_async(self) created_document = await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as err: self.assertEqual(err.status_code, 10054) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, - max_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_throttle_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, + max_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_throttle_backoff_in_seconds, + ) self.assertDictEqual(created_document, {}) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -479,10 +478,14 @@ async def test_resource_throttle_and_connection_retry_total_retry_with_max_backo max_throttle_backoff_in_seconds = 15 max_backoff_in_seconds = 20 - async with CosmosClient(self.host, self.masterKey, retry_backoff_max=max_backoff_in_seconds, - retry_throttle_backoff_max=max_throttle_backoff_in_seconds, - retry_throttle_total=max_retry_throttle_retries, - retry_total=max_total_retries) as client: + async with CosmosClient( + self.host, + self.masterKey, + retry_backoff_max=max_backoff_in_seconds, + retry_throttle_backoff_max=max_throttle_backoff_in_seconds, + retry_throttle_total=max_retry_throttle_retries, + retry_total=max_total_retries, + ) as client: database = client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) container = database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) @@ -490,39 +493,44 @@ async def test_resource_throttle_and_connection_retry_total_retry_with_max_backo try: _retry_utility.ExecuteFunctionAsync = self._MockExecuteFunction - document_definition = {'id': str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": str(uuid.uuid4()), "pk": "pk", "name": "sample document", "key": "value"} await container.create_item(body=document_definition) except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.status_code, StatusCodes.TOO_MANY_REQUESTS) - self.assertEqual(container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, - container.client_connection.last_response_headers[ - HttpHeaders.ThrottleRetryCount]) - self.assertEqual(container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, - max_backoff_in_seconds) - self.assertEqual(container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, - max_throttle_backoff_in_seconds) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions.MaxRetryAttemptCount, + container.client_connection.last_response_headers[HttpHeaders.ThrottleRetryCount], + ) + self.assertEqual( + container.client_connection.connection_policy.ConnectionRetryConfiguration.backoff_max, + max_backoff_in_seconds, + ) + self.assertEqual( + container.client_connection.connection_policy.RetryOptions._max_wait_time_in_seconds, + max_throttle_backoff_in_seconds, + ) self.assertEqual( container.client_connection.connection_policy.ConnectionRetryConfiguration.total_retries, - max_total_retries) + max_total_retries, + ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function async def test_patch_replace_no_retry_async(self): - doc = {'id': str(uuid.uuid4()), - 'pk': str(uuid.uuid4()), - 'name': 'sample document', - 'key': 'value'} - custom_transport = FaultInjectionTransportAsync() - predicate = lambda r: (FaultInjectionTransportAsync.predicate_is_operation_type(r, documents._OperationType.Patch) - or FaultInjectionTransportAsync.predicate_is_operation_type(r, documents._OperationType.Replace)) - custom_transport.add_fault(predicate, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_after_delay( - 0, - exceptions.CosmosHttpResponseError( - status_code=502, - message="Some random reverse proxy error.")))) + doc = {"id": str(uuid.uuid4()), "pk": str(uuid.uuid4()), "name": "sample document", "key": "value"} + custom_transport = FaultInjectionTransportAsync() + predicate = lambda r: ( + FaultInjectionTransportAsync.predicate_is_operation_type(r, documents._OperationType.Patch) + or FaultInjectionTransportAsync.predicate_is_operation_type(r, documents._OperationType.Replace) + ) + custom_transport.add_fault( + predicate, + lambda r: asyncio.create_task( + FaultInjectionTransportAsync.error_after_delay( + 0, exceptions.CosmosHttpResponseError(status_code=502, message="Some random reverse proxy error.") + ) + ), + ) initialized_objects = await setup_method_with_custom_transport( custom_transport, @@ -532,29 +540,28 @@ async def test_patch_replace_no_retry_async(self): await container.create_item(body=doc) operations = [{"op": "incr", "path": "/company", "value": 3}] with self.assertRaises(exceptions.CosmosHttpResponseError): - await container.patch_item(item=doc['id'], partition_key=doc['pk'], patch_operations=operations) + await container.patch_item(item=doc["id"], partition_key=doc["pk"], patch_operations=operations) assert connection_retry_policy.counter == 0 with self.assertRaises(exceptions.CosmosHttpResponseError): - doc['name'] = "something else" - await container.replace_item(item=doc['id'], body=doc) + doc["name"] = "something else" + await container.replace_item(item=doc["id"], body=doc) assert connection_retry_policy.counter == 0 # Cleanup await initialized_objects["client"].close() async def test_health_check_retry_policy_async(self): - os.environ['AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES'] = '5' - os.environ['AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS'] = '2' - max_retries = int(os.environ['AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES']) - retry_after_ms = int(os.environ['AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS']) + os.environ["AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES"] = "5" + os.environ["AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS"] = "2" + max_retries = int(os.environ["AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES"]) + retry_after_ms = int(os.environ["AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS"]) self.original_execute_function = _retry_utility.ExecuteFunctionAsync mock_execute = self.MockExecuteFunctionHealthCheck(self.original_execute_function) _retry_utility.ExecuteFunctionAsync = mock_execute try: with self.assertRaises(exceptions.CosmosHttpResponseError) as context: - async with CosmosClient( self.host, - self.masterKey): - pass + async with CosmosClient(self.host, self.masterKey): + pass self.assertEqual(context.exception.status_code, 503) # The total number of calls will be the initial call + the number of retries @@ -576,19 +583,15 @@ async def test_health_check_retry_policy_defaults_async(self): try: with self.assertRaises(ServiceRequestError): async with CosmosClient(self.host, self.masterKey): - pass + pass # Should use default retry attempts from _constants.py - self.assertEqual( - mock_execute.counter, - _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1 - ) + self.assertEqual(mock_execute.counter, _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1) # Verify default retry time in ms policy = HealthCheckRetryPolicy(ConnectionPolicy()) self.assertEqual( - policy.retry_after_in_milliseconds, - _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT + policy.retry_after_in_milliseconds, _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -601,18 +604,14 @@ async def test_health_check_retry_with_service_request_error_async(self): try: with self.assertRaises(ServiceRequestError): async with CosmosClient(self.host, self.masterKey): - pass # Triggers database account read + pass # Triggers database account read # Should use default retry attempts from _constants.py - self.assertEqual( - mock_execute.counter, - _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1 - ) + self.assertEqual(mock_execute.counter, _Constants.AZURE_COSMOS_HEALTH_CHECK_MAX_RETRIES_DEFAULT + 1) # Verify default retry time in ms policy = HealthCheckRetryPolicy(ConnectionPolicy()) self.assertEqual( - policy.retry_after_in_milliseconds, - _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT + policy.retry_after_in_milliseconds, _Constants.AZURE_COSMOS_HEALTH_CHECK_RETRY_AFTER_MS_DEFAULT ) finally: _retry_utility.ExecuteFunctionAsync = self.original_execute_function @@ -625,8 +624,10 @@ def __init__(self, org_func): async def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 raise ServiceRequestError("mocked service request error") return await self.org_func(func, *args, **kwargs) @@ -640,8 +641,10 @@ def __init__(self, org_func, error): async def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 raise self.error return await self.org_func(func, *args, **kwargs) @@ -654,17 +657,18 @@ def __init__(self, org_func): async def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 return await self.org_func(func, *args, **kwargs) async def _MockExecuteFunction(self, function, *args, **kwargs): response = test_config.FakeResponse({HttpHeaders.RetryAfterInMilliseconds: self.retry_after_in_milliseconds}) raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.TOO_MANY_REQUESTS, - message="Request rate is too large", - response=response) + status_code=StatusCodes.TOO_MANY_REQUESTS, message="Request rate is too large", response=response + ) class MockExecuteFunctionTimeout(object): def __init__(self, org_func): @@ -673,9 +677,8 @@ def __init__(self, org_func): async def __call__(self, func, *args, **kwargs): raise exceptions.CosmosHttpResponseError( - status_code=408, - message="Timeout", - response=test_config.FakeResponse({})) + status_code=408, message="Timeout", response=test_config.FakeResponse({}) + ) class MockExecuteFunctionConnectionReset(object): def __init__(self, org_func): @@ -688,9 +691,8 @@ async def __call__(self, func, *args, **kwargs): return await self.org_func(func, *args, **kwargs) else: raise exceptions.CosmosHttpResponseError( - status_code=10054, - message="Connection was reset", - response=test_config.FakeResponse({})) + status_code=10054, message="Connection was reset", response=test_config.FakeResponse({}) + ) class MockExecuteFunctionHealthCheck(object): def __init__(self, org_func): @@ -700,13 +702,14 @@ def __init__(self, org_func): async def __call__(self, func, *args, **kwargs): # The second argument to the internal _request function is the RequestObject. request_object = args[1] - if (request_object.operation_type == documents._OperationType.Read and - request_object.resource_type == ResourceType.DatabaseAccount): + if ( + request_object.operation_type == documents._OperationType.Read + and request_object.resource_type == ResourceType.DatabaseAccount + ): self.counter += 1 - raise exceptions.CosmosHttpResponseError( - status_code=503, - message="Service Unavailable.") + raise exceptions.CosmosHttpResponseError(status_code=503, message="Service Unavailable.") return await self.org_func(func, *args, **kwargs) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_retryable_writes.py b/sdk/cosmos/azure-cosmos/tests/test_retryable_writes.py index 110e26beea80..114df2e51460 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_retryable_writes.py +++ b/sdk/cosmos/azure-cosmos/tests/test_retryable_writes.py @@ -15,26 +15,27 @@ HPK_CONTAINER = "TestContainerHPK" + @pytest.fixture(scope="class") def setup(): config = test_config.TestConfig() - if config.masterKey == '[YOUR_KEY_HERE]' or config.host == '[YOUR_ENDPOINT_HERE]': + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) test_client = CosmosClient(config.host, config.masterKey) database = test_client.create_database_if_not_exists(id=config.TEST_DATABASE_ID) created_container = database.create_container_if_not_exists( - id=config.TEST_SINGLE_PARTITION_CONTAINER_ID, - partition_key=PartitionKey(path="/pk") + id=config.TEST_SINGLE_PARTITION_CONTAINER_ID, partition_key=PartitionKey(path="/pk") ) container_hpk = database.create_container_if_not_exists( - id=HPK_CONTAINER, - partition_key=PartitionKey(path=["/state", "/city"], kind="MultiHash") + id=HPK_CONTAINER, partition_key=PartitionKey(path=["/state", "/city"], kind="MultiHash") ) yield {"database": database, "container": created_container, "container_hpk": container_hpk} + @pytest.mark.cosmosEmulator @pytest.mark.usefixtures("setup") class TestRetryableWrites: @@ -47,14 +48,14 @@ class TestRetryableWrites: @staticmethod def setup_method_with_custom_transport( - custom_transport: RequestsTransport, - default_endpoint: str = host, - key: str = master_key, - database_id: str = TEST_DATABASE_ID, - container_id: str = TEST_CONTAINER_SINGLE_PARTITION_ID, - **kwargs): - client = CosmosClient(default_endpoint, key, consistency_level="Session", - transport=custom_transport, **kwargs) + custom_transport: RequestsTransport, + default_endpoint: str = host, + key: str = master_key, + database_id: str = TEST_DATABASE_ID, + container_id: str = TEST_CONTAINER_SINGLE_PARTITION_ID, + **kwargs + ): + client = CosmosClient(default_endpoint, key, consistency_level="Session", transport=custom_transport, **kwargs) db: DatabaseProxy = client.create_database_if_not_exists(database_id) container: ContainerProxy = db.create_container_if_not_exists(container_id, PartitionKey(path="/pk")) return {"client": client, "db": db, "col": container} @@ -87,8 +88,8 @@ def test_retryable_writes_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute # Verify the item was written - read_item = container.read_item(item=test_item['id'], partition_key=test_item['pk']) - assert read_item['id'] == test_item['id'], "Item was not written successfully after retries" + read_item = container.read_item(item=test_item["id"], partition_key=test_item["pk"]) + assert read_item["id"] == test_item["id"], "Item was not written successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility.ExecuteFunction @@ -115,21 +116,19 @@ def test_retryable_writes_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute # Verify the item was created - read_item_create = container.read_item(item=test_item_create['id'], - partition_key=test_item_create['pk']) - assert read_item_create['id'] == test_item_create['id'], "Item was not created successfully after retries" + read_item_create = container.read_item(item=test_item_create["id"], partition_key=test_item_create["pk"]) + assert read_item_create["id"] == test_item_create["id"], "Item was not created successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility.ExecuteFunction me = self.MockExecuteFunction(original_execute) _retry_utility.ExecuteFunction = me # Test without retry_write for patch_item - test_patch_operations = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - container.patch_item(item=test_item['id'], partition_key=test_item['pk'], - patch_operations=test_patch_operations) + container.patch_item( + item=test_item["id"], partition_key=test_item["pk"], patch_operations=test_patch_operations + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries without retry_write" @@ -137,8 +136,12 @@ def test_retryable_writes_request_level(self, setup): # Test with retry_write for patch_item me.counter = 0 # Reset counter try: - container.patch_item(item=test_item['id'], partition_key=test_item['pk'], - patch_operations=test_patch_operations, retry_write=2) + container.patch_item( + item=test_item["id"], + partition_key=test_item["pk"], + patch_operations=test_patch_operations, + retry_write=2, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -146,8 +149,8 @@ def test_retryable_writes_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute # Verify the item was patched - patched_item = container.read_item(item=test_item['id'], partition_key=test_item['pk']) - assert patched_item['data'] == "patched retryable write test", "Item was not patched successfully after retries" + patched_item = container.read_item(item=test_item["id"], partition_key=test_item["pk"]) + assert patched_item["data"] == "patched retryable write test", "Item was not patched successfully after retries" # Verify original execution function is used to upsert an item test_item = {"id": "1", "pk": "test", "data": "retryable write test"} @@ -161,18 +164,18 @@ def test_retryable_writes_request_level(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - container.delete_item(item=test_item['id'], partition_key=test_item['pk']) + container.delete_item(item=test_item["id"], partition_key=test_item["pk"]) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for delete_item" # Verify the item was not deleted - read_item = container.read_item(item=test_item['id'], partition_key=test_item['pk']) - assert read_item['id'] == test_item['id'], "Item was unexpectedly deleted" + read_item = container.read_item(item=test_item["id"], partition_key=test_item["pk"]) + assert read_item["id"] == test_item["id"], "Item was unexpectedly deleted" me.counter = 0 # Reset counter try: - container.delete_item(item=test_item['id'], partition_key=test_item['pk'], retry_write=2) + container.delete_item(item=test_item["id"], partition_key=test_item["pk"], retry_write=2) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -180,7 +183,7 @@ def test_retryable_writes_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute try: - container.read_item(item=test_item['id'], partition_key=test_item['pk']) + container.read_item(item=test_item["id"], partition_key=test_item["pk"]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -195,30 +198,32 @@ def test_retryable_writes_request_level(self, setup): _retry_utility.ExecuteFunction = me # Test without retry_write for replace_item try: - container.replace_item(item=test_item_replace['id'], body={"id": "3", "pk": "test", "data": "updated data"}) + container.replace_item(item=test_item_replace["id"], body={"id": "3", "pk": "test", "data": "updated data"}) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries without retry_write" # Test with retry_write for replace_item me.counter = 0 # Reset counter try: - container.replace_item(item=test_item_replace['id'], body={"id": "3", "pk": "test", - "data": "updated data"}, retry_write=2) + container.replace_item( + item=test_item_replace["id"], body={"id": "3", "pk": "test", "data": "updated data"}, retry_write=2 + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: # Restore the original retry_utility.execute function _retry_utility.ExecuteFunction = original_execute # Verify the item was replaced - replaced_item = container.read_item(item=test_item_replace['id'], - partition_key=test_item_replace['pk']) - assert replaced_item['data'] == "updated data", "Item was not replaced successfully after retries" + replaced_item = container.read_item(item=test_item_replace["id"], partition_key=test_item_replace["pk"]) + assert replaced_item["data"] == "updated data", "Item was not replaced successfully after retries" def test_retryable_writes_client_level(self, setup): """Test retryable writes for a container with retry_write set at the client level.""" # Create a client with retry_write enabled client_with_retry = CosmosClient(self.host, credential=self.master_key, retry_write=2) - container = client_with_retry.get_database_client(self.TEST_DATABASE_ID).get_container_client(setup['container'].id) + container = client_with_retry.get_database_client(self.TEST_DATABASE_ID).get_container_client( + setup["container"].id + ) # Mock retry_utility.execute to track retries original_execute = _retry_utility.ExecuteFunction @@ -242,12 +247,11 @@ def test_retryable_writes_client_level(self, setup): # Test patch_item me.counter = 0 # Reset counter - test_patch_operations = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - container.patch_item(item=test_item['id'], partition_key=test_item['pk'], - patch_operations=test_patch_operations) + container.patch_item( + item=test_item["id"], partition_key=test_item["pk"], patch_operations=test_patch_operations + ) pytest.fail("Expected an exception without retries") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for patch_item with client_retry_write" @@ -267,7 +271,7 @@ def test_retryable_writes_client_level(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - container.delete_item(item=test_item['id'], partition_key=test_item['pk']) + container.delete_item(item=test_item["id"], partition_key=test_item["pk"]) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -276,7 +280,7 @@ def test_retryable_writes_client_level(self, setup): # Verify the item was deleted try: - container.read_item(item=test_item['id'], partition_key=test_item['pk']) + container.read_item(item=test_item["id"], partition_key=test_item["pk"]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -302,17 +306,15 @@ def test_retryable_writes_client_level(self, setup): _retry_utility.ExecuteFunction = me # Test replace item, writes will retry by default with client level retry_write try: - container.replace_item(item=test_item_replace['id'], body={"id": "8", "pk": "test", - "data": "updated data"}) + container.replace_item(item=test_item_replace["id"], body={"id": "8", "pk": "test", "data": "updated data"}) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: # Restore the original retry_utility.execute function _retry_utility.ExecuteFunction = original_execute # Verify the item was replaced - replaced_item = container.read_item(item=test_item_replace['id'], - partition_key=test_item_replace['pk']) - assert replaced_item['data'] == "updated data", "Item was not replaced successfully after retries" + replaced_item = container.read_item(item=test_item_replace["id"], partition_key=test_item_replace["pk"]) + assert replaced_item["data"] == "updated data", "Item was not replaced successfully after retries" def test_retryable_writes_hpk_request_level(self, setup): """Test retryable writes for a container with hierarchical partition keys.""" @@ -342,8 +344,8 @@ def test_retryable_writes_hpk_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute # Verify the item was written - read_item = container.read_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) - assert read_item['id'] == test_item['id'], "Item was not written successfully after retries" + read_item = container.read_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) + assert read_item["id"] == test_item["id"], "Item was not written successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility.ExecuteFunction @@ -369,9 +371,10 @@ def test_retryable_writes_hpk_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute # Verify the item was created - read_item_create = container.read_item(item=test_item_create['id'], - partition_key=[test_item_create['state'], test_item_create['city']]) - assert read_item_create['id'] == test_item_create['id'], "Item was not created successfully after retries" + read_item_create = container.read_item( + item=test_item_create["id"], partition_key=[test_item_create["state"], test_item_create["city"]] + ) + assert read_item_create["id"] == test_item_create["id"], "Item was not created successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility.ExecuteFunction @@ -379,12 +382,13 @@ def test_retryable_writes_hpk_request_level(self, setup): _retry_utility.ExecuteFunction = me # Test without retry_write for patch_item - test_patch_operations_hpk = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations_hpk = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - container.patch_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']], - patch_operations=test_patch_operations_hpk) + container.patch_item( + item=test_item["id"], + partition_key=[test_item["state"], test_item["city"]], + patch_operations=test_patch_operations_hpk, + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries without retry_write" @@ -392,8 +396,12 @@ def test_retryable_writes_hpk_request_level(self, setup): # Test with retry_write for patch_item me.counter = 0 # Reset counter try: - container.patch_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']], - patch_operations=test_patch_operations_hpk, retry_write=2) + container.patch_item( + item=test_item["id"], + partition_key=[test_item["state"], test_item["city"]], + patch_operations=test_patch_operations_hpk, + retry_write=2, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -401,10 +409,12 @@ def test_retryable_writes_hpk_request_level(self, setup): _retry_utility.ExecuteFunction = original_execute # Verify the item was patched - patched_item_hpk = container.read_item(item=test_item['id'], - partition_key=[test_item['state'], test_item['city']]) - assert patched_item_hpk[ - 'data'] == "patched retryable write test", "Item was not patched successfully after retries" + patched_item_hpk = container.read_item( + item=test_item["id"], partition_key=[test_item["state"], test_item["city"]] + ) + assert ( + patched_item_hpk["data"] == "patched retryable write test" + ), "Item was not patched successfully after retries" # Verify original execution function is used to upsert an item test_item = {"id": "1", "state": "CA", "city": "San Francisco", "data": "retryable write test"} @@ -418,14 +428,15 @@ def test_retryable_writes_hpk_request_level(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - container.delete_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + container.delete_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for delete_item" me.counter = 0 # Reset counter try: - container.delete_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']], - retry_write=2) + container.delete_item( + item=test_item["id"], partition_key=[test_item["state"], test_item["city"]], retry_write=2 + ) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -434,7 +445,7 @@ def test_retryable_writes_hpk_request_level(self, setup): # Verify the item was deleted try: - container.read_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + container.read_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -448,26 +459,31 @@ def test_retryable_writes_hpk_request_level(self, setup): _retry_utility.ExecuteFunction = me # Test replace item without retry_write try: - container.replace_item(item=test_item_replace['id'], body={"id": "6", "state": "CA", "city": "San Francisco", - "data": "updated data"}) + container.replace_item( + item=test_item_replace["id"], + body={"id": "6", "state": "CA", "city": "San Francisco", "data": "updated data"}, + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries without retry_write" # Test replace item with retry_write me.counter = 0 # Reset counter try: - container.replace_item(item=test_item_replace['id'], body={"id": "6", "state": "CA", - "city": "San Francisco", - "data": "updated data"}, retry_write=2) + container.replace_item( + item=test_item_replace["id"], + body={"id": "6", "state": "CA", "city": "San Francisco", "data": "updated data"}, + retry_write=2, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: # Restore the original retry_utility.execute function _retry_utility.ExecuteFunction = original_execute # Verify the item was replaced - replaced_item_hpk = container.read_item(item=test_item_replace['id'], - partition_key=[test_item_replace['state'], test_item_replace['city']]) - assert replaced_item_hpk['data'] == "updated data", "Item was not replaced successfully after retries" + replaced_item_hpk = container.read_item( + item=test_item_replace["id"], partition_key=[test_item_replace["state"], test_item_replace["city"]] + ) + assert replaced_item_hpk["data"] == "updated data", "Item was not replaced successfully after retries" def test_retryable_writes_hpk_client_level(self, setup): """Test retryable writes for a container with hierarchical partition keys and @@ -475,7 +491,8 @@ def test_retryable_writes_hpk_client_level(self, setup): # Create a client with retry_write enabled client_with_retry = CosmosClient(self.host, credential=self.master_key, retry_write=2) container = client_with_retry.get_database_client(self.TEST_DATABASE_ID).get_container_client( - setup['container_hpk'].id) + setup["container_hpk"].id + ) # Mock retry_utility.execute to track retries original_execute = _retry_utility.ExecuteFunction @@ -499,12 +516,13 @@ def test_retryable_writes_hpk_client_level(self, setup): # Test patch_item me.counter = 0 # Reset counter - test_patch_operations_hpk = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations_hpk = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - container.patch_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']], - patch_operations=test_patch_operations_hpk) + container.patch_item( + item=test_item["id"], + partition_key=[test_item["state"], test_item["city"]], + patch_operations=test_patch_operations_hpk, + ) pytest.fail("Expected an exception without retries") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for patch_item with client_retry_write" @@ -524,7 +542,7 @@ def test_retryable_writes_hpk_client_level(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - container.delete_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + container.delete_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -533,7 +551,7 @@ def test_retryable_writes_hpk_client_level(self, setup): # Verify the item was deleted try: - container.read_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + container.read_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -547,23 +565,29 @@ def test_retryable_writes_hpk_client_level(self, setup): _retry_utility.ExecuteFunction = me # Test replace item, writes will retry by default with client level retry_write try: - container.replace_item(item=test_item_replace['id'], body={"id": "8", "state": "CA", - "city": "San Francisco", - "data": "updated data"}) + container.replace_item( + item=test_item_replace["id"], + body={"id": "8", "state": "CA", "city": "San Francisco", "data": "updated data"}, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: # Restore the original retry_utility.execute function _retry_utility.ExecuteFunction = original_execute # Verify the item was replaced - replaced_item_hpk = container.read_item(item=test_item_replace['id'], - partition_key=[test_item_replace['state'], test_item_replace['city']]) - assert replaced_item_hpk['data'] == "updated data", "Item was not replaced successfully after retries" - - - @pytest.mark.parametrize("injected_error", [FaultInjectionTransport.error_request_timeout(), - FaultInjectionTransport.error_internal_server_error(), - FaultInjectionTransport.error_service_response()]) + replaced_item_hpk = container.read_item( + item=test_item_replace["id"], partition_key=[test_item_replace["state"], test_item_replace["city"]] + ) + assert replaced_item_hpk["data"] == "updated data", "Item was not replaced successfully after retries" + + @pytest.mark.parametrize( + "injected_error", + [ + FaultInjectionTransport.error_request_timeout(), + FaultInjectionTransport.error_internal_server_error(), + FaultInjectionTransport.error_service_response(), + ], + ) def test_retryable_writes_mrw_request_level(self, injected_error): # Verify cross regional retries when using retryable writes at request level with multiple write locations. # Need to test for 408s, 500s, and ServiceResponseError. @@ -572,36 +596,31 @@ def test_retryable_writes_mrw_request_level(self, injected_error): custom_transport = FaultInjectionTransport() # Inject topology transformation that would make Emulator look like a multiple write region account - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" to test retry happens in next region - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransport.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + ) - custom_transport.add_fault( - is_request_to_first_region, - lambda r: injected_error) + custom_transport.add_fault(is_request_to_first_region, lambda r: injected_error) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"], - multiple_write_locations=True + custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True ) container: ContainerProxy = initialized_objects["col"] @@ -613,19 +632,32 @@ def test_retryable_writes_mrw_request_level(self, injected_error): request = upsert_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - replace_document = container.replace_item(item=document_definition['id'], body=document_definition, retry_write=2) + replace_document = container.replace_item( + item=document_definition["id"], body=document_definition, retry_write=2 + ) request = replace_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - operations = [{"op": "add", "path": "/favorite_color", "value": "red"},] - patch_document = container.patch_item(item=document_definition['id'], partition_key=document_definition['pk'], - patch_operations=operations, retry_write=2) + operations = [ + {"op": "add", "path": "/favorite_color", "value": "red"}, + ] + patch_document = container.patch_item( + item=document_definition["id"], + partition_key=document_definition["pk"], + patch_operations=operations, + retry_write=2, + ) request = patch_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - @pytest.mark.parametrize("injected_error", [FaultInjectionTransport.error_request_timeout(), - FaultInjectionTransport.error_internal_server_error(), - FaultInjectionTransport.error_service_response()]) + @pytest.mark.parametrize( + "injected_error", + [ + FaultInjectionTransport.error_request_timeout(), + FaultInjectionTransport.error_internal_server_error(), + FaultInjectionTransport.error_service_response(), + ], + ) def test_retryable_writes_mrw_client_level(self, injected_error): # Verify cross regional retries when using retryable writes at client level with multiple write locations. # Need to test for 408s, 500s, and ServiceResponseError. @@ -634,37 +666,34 @@ def test_retryable_writes_mrw_client_level(self, injected_error): custom_transport = FaultInjectionTransport() # Inject topology transformation that would make Emulator look like a multiple write region account - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" to test retry happens in next region - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransport.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransport.predicate_is_document_operation(r) + ) - custom_transport.add_fault( - is_request_to_first_region, - lambda r: injected_error) + custom_transport.add_fault(is_request_to_first_region, lambda r: injected_error) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = self.setup_method_with_custom_transport( custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True, - retry_write=2 + retry_write=2, ) container: ContainerProxy = initialized_objects["col"] @@ -676,15 +705,18 @@ def test_retryable_writes_mrw_client_level(self, injected_error): request = upsert_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - replace_document = container.replace_item(item=document_definition['id'], body=document_definition) + replace_document = container.replace_item(item=document_definition["id"], body=document_definition) request = replace_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) # Patch operation should not retry - operations = [{"op": "add", "path": "/favorite_color", "value": "red"},] + operations = [ + {"op": "add", "path": "/favorite_color", "value": "red"}, + ] try: - container.patch_item(item=document_definition['id'], partition_key=document_definition['pk'], - patch_operations=operations) + container.patch_item( + item=document_definition["id"], partition_key=document_definition["pk"], patch_operations=operations + ) except (ServiceResponseError, exceptions.CosmosHttpResponseError) as e: if isinstance(e, exceptions.CosmosHttpResponseError): assert e.status_code in [408, 500], "Expected a retryable error for patch_item" @@ -698,10 +730,7 @@ def __call__(self, func, *args, **kwargs): self.counter = self.counter + 1 if self.counter < 2: # Simulate a retryable error on the second call - raise exceptions.CosmosHttpResponseError( - status_code=408, - message="Simulated timeout error." - ) + raise exceptions.CosmosHttpResponseError(status_code=408, message="Simulated timeout error.") else: return self.org_func(func, *args, **kwargs) @@ -716,5 +745,6 @@ def __call__(self, func, *args, **kwargs): exception.exc_type = self.err_type raise exception + if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_retryable_writes_async.py b/sdk/cosmos/azure-cosmos/tests/test_retryable_writes_async.py index 3481ff7bd09a..3a5d8ba8a71c 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_retryable_writes_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_retryable_writes_async.py @@ -20,26 +20,27 @@ HPK_CONTAINER = "TestContainerHPK" + @pytest_asyncio.fixture() async def setup(): config = test_config.TestConfig() - if config.masterKey == '[YOUR_KEY_HERE]' or config.host == '[YOUR_ENDPOINT_HERE]': + if config.masterKey == "[YOUR_KEY_HERE]" or config.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) test_client = CosmosClient(config.host, config.masterKey) database = await test_client.create_database_if_not_exists(id=config.TEST_DATABASE_ID) created_container = await database.create_container_if_not_exists( - id=config.TEST_SINGLE_PARTITION_CONTAINER_ID, - partition_key=PartitionKey(path="/pk") + id=config.TEST_SINGLE_PARTITION_CONTAINER_ID, partition_key=PartitionKey(path="/pk") ) container_hpk = await database.create_container_if_not_exists( - id=HPK_CONTAINER, - partition_key=PartitionKey(path=["/state", "/city"], kind="MultiHash") + id=HPK_CONTAINER, partition_key=PartitionKey(path=["/state", "/city"], kind="MultiHash") ) yield {"database": database, "container": created_container, "container_hpk": container_hpk} + @pytest.mark.cosmosEmulator @pytest.mark.asyncio @pytest.mark.usefixtures("setup") @@ -53,21 +54,28 @@ class TestRetryableWritesAsync: @staticmethod async def setup_method_with_custom_transport( - custom_transport: AioHttpTransport, - default_endpoint: str = host, - key: str = master_key, - database_id: str = TEST_DATABASE_ID, - container_id: str = TEST_CONTAINER_SINGLE_PARTITION_ID, - **kwargs): - client = CosmosClient(default_endpoint, key, consistency_level="Session", - transport=custom_transport, enable_diagnostics_logging=True, **kwargs) + custom_transport: AioHttpTransport, + default_endpoint: str = host, + key: str = master_key, + database_id: str = TEST_DATABASE_ID, + container_id: str = TEST_CONTAINER_SINGLE_PARTITION_ID, + **kwargs + ): + client = CosmosClient( + default_endpoint, + key, + consistency_level="Session", + transport=custom_transport, + enable_diagnostics_logging=True, + **kwargs + ) await client.__aenter__() db: DatabaseProxy = await client.create_database_if_not_exists(database_id) container: ContainerProxy = await db.create_container_if_not_exists(container_id, PartitionKey(path="/pk")) return {"client": client, "db": db, "col": container} async def test_retryable_writes_request_level_async(self, setup): - container = setup['container'] + container = setup["container"] # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -93,8 +101,8 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was written - read_item = await container.read_item(item=test_item['id'], partition_key=test_item['pk']) - assert read_item['id'] == test_item['id'], "Item was not written successfully after retries" + read_item = await container.read_item(item=test_item["id"], partition_key=test_item["pk"]) + assert read_item["id"] == test_item["id"], "Item was not written successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -120,9 +128,8 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was created - read_item_create = await container.read_item(item=test_item_create['id'], - partition_key=test_item_create['pk']) - assert read_item_create['id'] == test_item_create['id'], "Item was not created successfully after retries" + read_item_create = await container.read_item(item=test_item_create["id"], partition_key=test_item_create["pk"]) + assert read_item_create["id"] == test_item_create["id"], "Item was not created successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -130,12 +137,13 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = me # Test without retry_write for patch_item - test_patch_operations = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - await container.patch_item(item=test_item_create['id'], partition_key=test_item_create['pk'], - patch_operations=test_patch_operations) + await container.patch_item( + item=test_item_create["id"], + partition_key=test_item_create["pk"], + patch_operations=test_patch_operations, + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries without retry_write" @@ -143,8 +151,12 @@ async def test_retryable_writes_request_level_async(self, setup): # Test with retry_write for patch_item me.counter = 0 # Reset counter try: - await container.patch_item(item=test_item_create['id'], partition_key=test_item_create['pk'], - patch_operations=test_patch_operations, retry_write=2) + await container.patch_item( + item=test_item_create["id"], + partition_key=test_item_create["pk"], + patch_operations=test_patch_operations, + retry_write=2, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -152,8 +164,8 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was patched - patched_item = await container.read_item(item=test_item_create['id'], partition_key=test_item_create['pk']) - assert patched_item['data'] == "patched retryable write test", "Item was not patched successfully after retries" + patched_item = await container.read_item(item=test_item_create["id"], partition_key=test_item_create["pk"]) + assert patched_item["data"] == "patched retryable write test", "Item was not patched successfully after retries" # Verify original execution function is used to upsert an item test_item = {"id": "5", "pk": "test", "data": "retryable write test"} @@ -167,7 +179,7 @@ async def test_retryable_writes_request_level_async(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - await container.delete_item(item=test_item['id'], partition_key=test_item['pk']) + await container.delete_item(item=test_item["id"], partition_key=test_item["pk"]) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for delete_item" @@ -176,8 +188,8 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was not deleted - read_item = await container.read_item(item=test_item['id'], partition_key=test_item['pk']) - assert read_item['id'] == test_item['id'], "Item was unexpectedly deleted" + read_item = await container.read_item(item=test_item["id"], partition_key=test_item["pk"]) + assert read_item["id"] == test_item["id"], "Item was unexpectedly deleted" # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -186,7 +198,7 @@ async def test_retryable_writes_request_level_async(self, setup): me.counter = 0 # Reset counter try: - await container.delete_item(item=test_item['id'], partition_key=test_item['pk'], retry_write=2) + await container.delete_item(item=test_item["id"], partition_key=test_item["pk"], retry_write=2) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -194,7 +206,7 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute try: - await container.read_item(item=test_item['id'], partition_key=test_item['pk']) + await container.read_item(item=test_item["id"], partition_key=test_item["pk"]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -211,9 +223,10 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = me me.counter = 0 # Reset counter try: - await container.replace_item(item=test_item_replace['id'], body={"id": test_item_replace['id'], - "pk": "test", - "data": "original data"}) + await container.replace_item( + item=test_item_replace["id"], + body={"id": test_item_replace["id"], "pk": "test", "data": "original data"}, + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for replace_item without retry_write" @@ -221,10 +234,11 @@ async def test_retryable_writes_request_level_async(self, setup): # Test with retry_write for replace_item me.counter = 0 # Reset counter try: - await container.replace_item(item=test_item_replace['id'], body={"id": test_item_replace['id'], - "pk": "test", - "data": "replaced data"}, - retry_write=2) + await container.replace_item( + item=test_item_replace["id"], + body={"id": test_item_replace["id"], "pk": "test", "data": "replaced data"}, + retry_write=2, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -232,10 +246,10 @@ async def test_retryable_writes_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was replaced - read_item_replace = await container.read_item(item=test_item_replace['id'], - partition_key=test_item_replace['pk']) - assert read_item_replace['data'] == "replaced data", "Item was not replaced successfully after retries" - + read_item_replace = await container.read_item( + item=test_item_replace["id"], partition_key=test_item_replace["pk"] + ) + assert read_item_replace["data"] == "replaced data", "Item was not replaced successfully after retries" async def test_retryable_writes_client_level_write(self, setup): """Test retryable writes for a container with retry_write set at the client level.""" @@ -246,7 +260,8 @@ async def test_retryable_writes_client_level_write(self, setup): try: container = client_with_retry.get_database_client(self.TEST_DATABASE_ID).get_container_client( - setup['container'].id) + setup["container"].id + ) # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -270,12 +285,11 @@ async def test_retryable_writes_client_level_write(self, setup): # Test patch_item me.counter = 0 # Reset counter - test_patch_operations = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - await container.patch_item(item=test_item['id'], partition_key=test_item['pk'], - patch_operations=test_patch_operations) + await container.patch_item( + item=test_item["id"], partition_key=test_item["pk"], patch_operations=test_patch_operations + ) pytest.fail("Expected an exception without retries") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for patch_item with client_retry_write" @@ -295,7 +309,7 @@ async def test_retryable_writes_client_level_write(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - await container.delete_item(item=test_item['id'], partition_key=test_item['pk']) + await container.delete_item(item=test_item["id"], partition_key=test_item["pk"]) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -304,7 +318,7 @@ async def test_retryable_writes_client_level_write(self, setup): # Verify the item was deleted try: - await container.read_item(item=test_item['id'], partition_key=test_item['pk']) + await container.read_item(item=test_item["id"], partition_key=test_item["pk"]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -319,25 +333,27 @@ async def test_retryable_writes_client_level_write(self, setup): _retry_utility_async.ExecuteFunctionAsync = me me.counter = 0 # Reset counter try: - await container.replace_item(item=test_item_replace['id'], body={"id": test_item_replace['id'], - "pk": "test", - "data": "replaced data"}) + await container.replace_item( + item=test_item_replace["id"], + body={"id": test_item_replace["id"], "pk": "test", "data": "replaced data"}, + ) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries for replace_item with retry_write enabled" finally: # Restore the original retry_utility.execute function _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was replaced - read_item_replace = await container.read_item(item=test_item_replace['id'], - partition_key=test_item_replace['pk']) - assert read_item_replace['data'] == "replaced data", "Item was not replaced successfully after retries" + read_item_replace = await container.read_item( + item=test_item_replace["id"], partition_key=test_item_replace["pk"] + ) + assert read_item_replace["data"] == "replaced data", "Item was not replaced successfully after retries" finally: if client_with_retry: await client_with_retry.close() async def test_retryable_writes_hpk_request_level_async(self, setup): """Test retryable writes for a container with hierarchical partition keys.""" - container = setup['container_hpk'] + container = setup["container_hpk"] # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -363,9 +379,10 @@ async def test_retryable_writes_hpk_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was written - read_item = await container.read_item(item=test_item['id'], partition_key=[test_item['state'], - test_item['city']]) - assert read_item['id'] == test_item['id'], "Item was not written successfully after retries" + read_item = await container.read_item( + item=test_item["id"], partition_key=[test_item["state"], test_item["city"]] + ) + assert read_item["id"] == test_item["id"], "Item was not written successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -391,41 +408,43 @@ async def test_retryable_writes_hpk_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was created - read_item_create = await container.read_item(item=test_item_create['id'], - partition_key=[test_item_create['state'], - test_item_create['city']]) - assert read_item_create['id'] == test_item_create['id'], "Item was not created successfully after retries" + read_item_create = await container.read_item( + item=test_item_create["id"], partition_key=[test_item_create["state"], test_item_create["city"]] + ) + assert read_item_create["id"] == test_item_create["id"], "Item was not created successfully after retries" # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync me = self.MockExecuteFunction(original_execute) _retry_utility_async.ExecuteFunctionAsync = me - test_patch_operations = [ - {"op": "add", "path": "/year", "value": "2025"} - ] + test_patch_operations = [{"op": "add", "path": "/year", "value": "2025"}] # Test without retry_write for patch_item try: - await container.patch_item(item=test_item['id'], - partition_key=[test_item['state'], test_item['city']], - patch_operations=test_patch_operations) + await container.patch_item( + item=test_item["id"], + partition_key=[test_item["state"], test_item["city"]], + patch_operations=test_patch_operations, + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries without retry_write" # Now properly replace with retry_write me.counter = 0 # Reset counter - await container.patch_item(item=test_item['id'], - partition_key=[test_item['state'], test_item['city']], - patch_operations=test_patch_operations, - retry_write=2) + await container.patch_item( + item=test_item["id"], + partition_key=[test_item["state"], test_item["city"]], + patch_operations=test_patch_operations, + retry_write=2, + ) assert me.counter == 2 # Verify the item was patched - patched_item = await container.read_item(item=test_item['id'], - partition_key=[test_item['state'], - test_item['city']]) - assert patched_item['year'] == "2025", "Item was not patched successfully after retries" + patched_item = await container.read_item( + item=test_item["id"], partition_key=[test_item["state"], test_item["city"]] + ) + assert patched_item["year"] == "2025", "Item was not patched successfully after retries" # Verify original execution function is used to upsert an item test_item = {"id": "1", "state": "CA", "city": "San Francisco", "data": "retryable write test"} @@ -439,14 +458,15 @@ async def test_retryable_writes_hpk_request_level_async(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - await container.delete_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + await container.delete_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for delete_item" me.counter = 0 # Reset counter try: - await container.delete_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']], - retry_write=2) + await container.delete_item( + item=test_item["id"], partition_key=[test_item["state"], test_item["city"]], retry_write=2 + ) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -455,7 +475,7 @@ async def test_retryable_writes_hpk_request_level_async(self, setup): # Verify the item was deleted try: - await container.read_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + await container.read_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -470,21 +490,21 @@ async def test_retryable_writes_hpk_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = me me.counter = 0 # Reset counter try: - await container.replace_item(item=test_item_replace['id'], body={"id": test_item_replace['id'], - "state": "TX", - "city": "Austin", - "data": "original data"}) + await container.replace_item( + item=test_item_replace["id"], + body={"id": test_item_replace["id"], "state": "TX", "city": "Austin", "data": "original data"}, + ) pytest.fail("Expected an exception without retry_write") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for replace_item without retry_write" # Test with retry_write for replace_item me.counter = 0 # Reset counter try: - await container.replace_item(item=test_item_replace['id'], body={"id": test_item_replace['id'], - "state": "TX", - "city": "Austin", - "data": "replaced data"}, - retry_write=2) + await container.replace_item( + item=test_item_replace["id"], + body={"id": test_item_replace["id"], "state": "TX", "city": "Austin", "data": "replaced data"}, + retry_write=2, + ) except exceptions.CosmosHttpResponseError as e: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -492,10 +512,10 @@ async def test_retryable_writes_hpk_request_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was replaced - read_item_replace = await container.read_item(item=test_item_replace['id'], - partition_key=[test_item_replace['state'], - test_item_replace['city']]) - assert read_item_replace['data'] == "replaced data", "Item was not replaced successfully after retries" + read_item_replace = await container.read_item( + item=test_item_replace["id"], partition_key=[test_item_replace["state"], test_item_replace["city"]] + ) + assert read_item_replace["data"] == "replaced data", "Item was not replaced successfully after retries" async def test_retryable_writes_hpk_client_level_async(self, setup): """Test retryable writes for a container with hierarchical partition keys and retry_write @@ -505,7 +525,8 @@ async def test_retryable_writes_hpk_client_level_async(self, setup): await client_with_retry.__aenter__() try: container = client_with_retry.get_database_client(self.TEST_DATABASE_ID).get_container_client( - setup['container_hpk'].id) + setup["container_hpk"].id + ) # Mock retry_utility.execute to track retries original_execute = _retry_utility_async.ExecuteFunctionAsync @@ -529,12 +550,13 @@ async def test_retryable_writes_hpk_client_level_async(self, setup): # Test patch_item me.counter = 0 # Reset counter - test_patch_operations_hpk = [ - {"op": "add", "path": "/data", "value": "patched retryable write test"} - ] + test_patch_operations_hpk = [{"op": "add", "path": "/data", "value": "patched retryable write test"}] try: - await container.patch_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']], - patch_operations=test_patch_operations_hpk) + await container.patch_item( + item=test_item["id"], + partition_key=[test_item["state"], test_item["city"]], + patch_operations=test_patch_operations_hpk, + ) pytest.fail("Expected an exception without retries") except exceptions.CosmosHttpResponseError: assert me.counter == 1, "Expected no retries for patch_item with client_retry_write" @@ -553,7 +575,7 @@ async def test_retryable_writes_hpk_client_level_async(self, setup): # Verify delete_item does not retry me.counter = 0 # Reset counter try: - await container.delete_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + await container.delete_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries due to simulated errors" finally: @@ -562,7 +584,7 @@ async def test_retryable_writes_hpk_client_level_async(self, setup): # Verify the item was deleted try: - await container.read_item(item=test_item['id'], partition_key=[test_item['state'], test_item['city']]) + await container.read_item(item=test_item["id"], partition_key=[test_item["state"], test_item["city"]]) pytest.fail("Expected an exception for item that should have been deleted") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 404, "Expected item to be deleted but it was not" @@ -578,27 +600,32 @@ async def test_retryable_writes_hpk_client_level_async(self, setup): _retry_utility_async.ExecuteFunctionAsync = me me.counter = 0 # Reset counter try: - await container.replace_item(item=test_item_replace['id'], body={"id": test_item_replace['id'], - "state": "TX", - "city": "Austin", - "data": "replaced data"}) + await container.replace_item( + item=test_item_replace["id"], + body={"id": test_item_replace["id"], "state": "TX", "city": "Austin", "data": "replaced data"}, + ) except exceptions.CosmosHttpResponseError: assert me.counter > 1, "Expected multiple retries for replace_item with retry_write enabled" finally: # Restore the original retry_utility.execute function _retry_utility_async.ExecuteFunctionAsync = original_execute # Verify the item was replaced - read_item_replace = await container.read_item(item=test_item_replace['id'], - partition_key=[test_item_replace['state'], - test_item_replace['city']]) - assert read_item_replace['data'] == "replaced data", "Item was not replaced successfully after retries" + read_item_replace = await container.read_item( + item=test_item_replace["id"], partition_key=[test_item_replace["state"], test_item_replace["city"]] + ) + assert read_item_replace["data"] == "replaced data", "Item was not replaced successfully after retries" finally: await client_with_retry.close() - @pytest.mark.parametrize("injected_error", [FaultInjectionTransportAsync.error_request_timeout(), - FaultInjectionTransportAsync.error_internal_server_error(), - FaultInjectionTransportAsync.error_service_response()]) + @pytest.mark.parametrize( + "injected_error", + [ + FaultInjectionTransportAsync.error_request_timeout(), + FaultInjectionTransportAsync.error_internal_server_error(), + FaultInjectionTransportAsync.error_service_response(), + ], + ) async def test_retryable_writes_mrw_request_level_async(self, injected_error): first_region_uri: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1") second_region_uri: str = test_config.TestConfig.local_host @@ -606,36 +633,33 @@ async def test_retryable_writes_mrw_request_level_async(self, injected_error): # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransportAsync.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + ) custom_transport.add_fault( - is_request_to_first_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_first_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await self.setup_method_with_custom_transport( - custom_transport, - preferred_locations=["First Region", "Second Region"], - multiple_write_locations=True + custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True ) try: container: ContainerProxy = initialized_objects["col"] @@ -648,61 +672,71 @@ async def test_retryable_writes_mrw_request_level_async(self, injected_error): request = upsert_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - replace_document = await container.replace_item(item=document_definition['id'], body=document_definition, - retry_write=2) + replace_document = await container.replace_item( + item=document_definition["id"], body=document_definition, retry_write=2 + ) request = replace_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - operations = [{"op": "add", "path": "/favorite_color", "value": "red"}, ] - patch_document = await container.patch_item(item=document_definition['id'], - partition_key=document_definition['pk'], - patch_operations=operations, retry_write=2) + operations = [ + {"op": "add", "path": "/favorite_color", "value": "red"}, + ] + patch_document = await container.patch_item( + item=document_definition["id"], + partition_key=document_definition["pk"], + patch_operations=operations, + retry_write=2, + ) request = patch_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) finally: await TestFaultInjectionTransportAsync.cleanup_method(initialized_objects) - @pytest.mark.parametrize("injected_error", [FaultInjectionTransportAsync.error_request_timeout(), - FaultInjectionTransportAsync.error_internal_server_error(), - FaultInjectionTransportAsync.error_service_response()]) + @pytest.mark.parametrize( + "injected_error", + [ + FaultInjectionTransportAsync.error_request_timeout(), + FaultInjectionTransportAsync.error_internal_server_error(), + FaultInjectionTransportAsync.error_service_response(), + ], + ) async def test_retryable_writes_mrw_client_level_async(self, injected_error): first_region_uri: str = test_config.TestConfig.local_host.replace("localhost", "127.0.0.1") second_region_uri: str = test_config.TestConfig.local_host custom_transport = FaultInjectionTransportAsync() # Inject topology transformation that would make Emulator look like a multiple write region account - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) # Inject rule to simulate regional outage in "First Region" - is_request_to_first_region: Callable[[HttpRequest], bool] = lambda \ - r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) and \ - FaultInjectionTransportAsync.predicate_is_document_operation(r) + is_request_to_first_region: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_targets_region(r, first_region_uri) + and FaultInjectionTransportAsync.predicate_is_document_operation(r) + ) custom_transport.add_fault( - is_request_to_first_region, - lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down())) + is_request_to_first_region, lambda r: asyncio.create_task(FaultInjectionTransportAsync.error_region_down()) + ) id_value: str = str(uuid.uuid4()) - document_definition = {'id': id_value, - 'pk': id_value, - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": id_value, "pk": id_value, "name": "sample document", "key": "value"} initialized_objects = await self.setup_method_with_custom_transport( custom_transport, preferred_locations=["First Region", "Second Region"], multiple_write_locations=True, - retry_write=2 + retry_write=2, ) try: container: ContainerProxy = initialized_objects["col"] @@ -715,15 +749,18 @@ async def test_retryable_writes_mrw_client_level_async(self, injected_error): request = upsert_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) - replace_document = await container.replace_item(item=document_definition['id'], body=document_definition) + replace_document = await container.replace_item(item=document_definition["id"], body=document_definition) request = replace_document.get_response_headers()["_request"] assert request.url.startswith(second_region_uri) # Patch operation should not retry - operations = [{"op": "add", "path": "/favorite_color", "value": "red"}, ] + operations = [ + {"op": "add", "path": "/favorite_color", "value": "red"}, + ] try: - await container.patch_item(item=document_definition['id'], partition_key=document_definition['pk'], - patch_operations=operations) + await container.patch_item( + item=document_definition["id"], partition_key=document_definition["pk"], patch_operations=operations + ) except (ServiceResponseError, exceptions.CosmosHttpResponseError) as e: if isinstance(e, exceptions.CosmosHttpResponseError): assert e.status_code in [408, 500], "Expected a retryable error for patch_item" @@ -740,10 +777,7 @@ async def __call__(self, func, *args, **kwargs): self.counter = self.counter + 1 if self.counter < 2: # Simulate a retryable error on the second call - raise exceptions.CosmosHttpResponseError( - status_code=408, - message="Simulated timeout error." - ) + raise exceptions.CosmosHttpResponseError(status_code=408, message="Simulated timeout error.") else: return await self.org_func(func, *args, **kwargs) @@ -760,5 +794,6 @@ def __call__(self, func, *args, **kwargs): exception.inner_exception = self.inner_exception raise exception -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_routing_map.py b/sdk/cosmos/azure-cosmos/tests/test_routing_map.py index 2e4a01d7f1e6..77ec5ccee068 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_routing_map.py +++ b/sdk/cosmos/azure-cosmos/tests/test_routing_map.py @@ -14,8 +14,7 @@ @pytest.mark.cosmosEmulator class TestRoutingMapEndToEnd(unittest.TestCase): - """Routing Map Functionalities end-to-end Tests. - """ + """Routing Map Functionalities end-to-end Tests.""" host = test_config.TestConfig.host masterKey = test_config.TestConfig.masterKey @@ -29,12 +28,12 @@ class TestRoutingMapEndToEnd(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_database = cls.client.get_database_client(cls.TEST_DATABASE_ID) @@ -50,9 +49,8 @@ def test_routing_map_provider(self): routing_mp = PartitionKeyRangeCache(self.client.client_connection) overlapping_partition_key_ranges = routing_mp.get_overlapping_ranges( - self.collection_link, - routing_range.Range("", "FF", True, False), - {}) + self.collection_link, routing_range.Range("", "FF", True, False), {} + ) self.assertEqual(len(overlapping_partition_key_ranges), len(partition_key_ranges)) self.assertEqual(overlapping_partition_key_ranges, partition_key_ranges) diff --git a/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker.py b/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker.py index 3266aee918b0..09b01b14eba5 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker.py +++ b/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker.py @@ -15,6 +15,7 @@ @pytest.mark.semanticReranker class TestSemanticReranker(unittest.TestCase): """Test to check semantic reranker behavior.""" + client: cosmos_client.CosmosClient = None config = test_config.TestConfig host = config.host @@ -24,17 +25,19 @@ class TestSemanticReranker(unittest.TestCase): @classmethod def setUpClass(cls): - if cls.host == '[YOUR_ENDPOINT_HERE]': + if cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'host' at the top of this class to run the " - "tests.") + "tests." + ) credential = DefaultAzureCredential() cls.client = cosmos_client.CosmosClient(cls.host, credential=credential) cls.test_db = cls.client.create_database_if_not_exists(cls.TEST_DATABASE_ID) - cls.test_container = cls.test_db.create_container_if_not_exists(cls.TEST_CONTAINER_ID, - cls.TEST_CONTAINER_PARTITION_KEY) + cls.test_container = cls.test_db.create_container_if_not_exists( + cls.TEST_CONTAINER_ID, cls.TEST_CONTAINER_PARTITION_KEY + ) @classmethod def tearDownClass(cls): @@ -49,12 +52,7 @@ def test_semantic_reranker(self): results = self.test_container.semantic_rerank( reranking_context="What is the capital of France?", documents=documents, - semantic_reranking_options={ - "return_documents": True, - "top_k": 10, - "batch_size": 32, - "sort": True - } + semantic_reranking_options={"return_documents": True, "top_k": 10, "batch_size": 32, "sort": True}, ) assert len(results["Scores"]) == len(documents) @@ -72,7 +70,7 @@ def test_semantic_reranker_json_documents(self): "sort": True, "document_type": "json", "target_paths": "text", - } + }, ) assert len(results["Scores"]) == len(documents) @@ -91,7 +89,7 @@ def test_semantic_reranker_nested_json_documents(self): "sort": True, "document_type": "json", "target_paths": "info.text", - } + }, ) assert len(results["Scores"]) == len(documents) @@ -103,19 +101,19 @@ def _get_documents(self, document_type: str): return [ "Berlin is the capital of Germany.", "Paris is the capital of France.", - "Madrid is the capital of Spain." + "Madrid is the capital of Spain.", ] elif document_type == "json": return [ {"id": "1", "text": "Berlin is the capital of Germany."}, {"id": "2", "text": "Paris is the capital of France."}, - {"id": "3", "text": "Madrid is the capital of Spain."} + {"id": "3", "text": "Madrid is the capital of Spain."}, ] elif document_type == "nested_json": return [ {"id": "1", "info": {"text": "Berlin is the capital of Germany."}}, {"id": "2", "info": {"text": "Paris is the capital of France."}}, - {"id": "3", "info": {"text": "Madrid is the capital of Spain."}} + {"id": "3", "info": {"text": "Madrid is the capital of Spain."}}, ] else: raise ValueError("Unsupported document type") diff --git a/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_async.py b/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_async.py index b8500641a8d8..e67f8ab16647 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_async.py @@ -16,6 +16,7 @@ @pytest.mark.semanticReranker class TestSemanticRerankerAsync(unittest.TestCase): """Test to check async semantic reranker behavior.""" + client: CosmosClient = None config = test_config.TestConfig host = config.host @@ -23,14 +24,14 @@ class TestSemanticRerankerAsync(unittest.TestCase): TEST_CONTAINER_ID = config.TEST_SINGLE_PARTITION_CONTAINER_ID TEST_CONTAINER_PARTITION_KEY = config.TEST_CONTAINER_PARTITION_KEY - @classmethod def setUpClass(cls): - if cls.host == '[YOUR_ENDPOINT_HERE]': + if cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): """Async setup for each test.""" @@ -38,8 +39,7 @@ async def asyncSetUp(self): self.client = CosmosClient(self.host, credential, connection_verify=False) self.test_db = await self.client.create_database_if_not_exists(self.TEST_DATABASE_ID) self.test_container = await self.test_db.create_container_if_not_exists( - self.TEST_CONTAINER_ID, - self.TEST_CONTAINER_PARTITION_KEY + self.TEST_CONTAINER_ID, self.TEST_CONTAINER_PARTITION_KEY ) async def asyncTearDown(self): @@ -54,6 +54,7 @@ async def asyncTearDown(self): def test_semantic_reranker_async(self): """Test async semantic reranking functionality.""" + async def run_test(): await self.asyncSetUp() try: @@ -61,18 +62,14 @@ async def run_test(): results = await self.test_container.semantic_rerank( reranking_context="What is the capital of France?", documents=documents, - semantic_reranking_options={ - "return_documents": True, - "top_k": 10, - "batch_size": 32, - "sort": True - } + semantic_reranking_options={"return_documents": True, "top_k": 10, "batch_size": 32, "sort": True}, ) assert len(results["Scores"]) == len(documents) assert results["Scores"][0]["document"] == "Paris is the capital of France." finally: await self.asyncTearDown() + asyncio.run(run_test()) def test_semantic_reranker_async_json_documents(self): @@ -90,7 +87,7 @@ async def run_test(): "sort": True, "document_type": "json", "target_paths": "text", - } + }, ) assert len(results["Scores"]) == len(documents) @@ -98,6 +95,7 @@ async def run_test(): assert returned_document["text"] == "Paris is the capital of France." finally: await self.asyncTearDown() + asyncio.run(run_test()) def test_semantic_reranker_async_nested_json_documents(self): @@ -115,7 +113,7 @@ async def run_test(): "sort": True, "document_type": "json", "target_paths": "info.text", - } + }, ) assert len(results["Scores"]) == len(documents) @@ -123,6 +121,7 @@ async def run_test(): assert returned_document["info"]["text"] == "Paris is the capital of France." finally: await self.asyncTearDown() + asyncio.run(run_test()) def _get_documents(self, document_type: str): @@ -130,19 +129,19 @@ def _get_documents(self, document_type: str): return [ "Berlin is the capital of Germany.", "Paris is the capital of France.", - "Madrid is the capital of Spain." + "Madrid is the capital of Spain.", ] elif document_type == "json": return [ {"id": "1", "text": "Berlin is the capital of Germany."}, {"id": "2", "text": "Paris is the capital of France."}, - {"id": "3", "text": "Madrid is the capital of Spain."} + {"id": "3", "text": "Madrid is the capital of Spain."}, ] elif document_type == "nested_json": return [ {"id": "1", "info": {"text": "Berlin is the capital of Germany."}}, {"id": "2", "info": {"text": "Paris is the capital of France."}}, - {"id": "3", "info": {"text": "Madrid is the capital of Spain."}} + {"id": "3", "info": {"text": "Madrid is the capital of Spain."}}, ] else: raise ValueError("Unsupported document type") diff --git a/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_unit.py b/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_unit.py index 0a60818759c2..a72975c925e2 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_unit.py +++ b/sdk/cosmos/azure-cosmos/tests/test_semantic_reranker_unit.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # cspell:ignore rerank reranker reranking """Unit tests for semantic reranker inference service timeout policy.""" + import asyncio import os import unittest @@ -36,19 +37,16 @@ def test_sync_inference_timeout_raises_408(self): service = _InferenceService(mock_connection) with patch.object( - service._inference_pipeline_client._pipeline, "run", - side_effect=ServiceRequestError("Connection timeout") + service._inference_pipeline_client._pipeline, "run", side_effect=ServiceRequestError("Connection timeout") ): with self.assertRaises(exceptions.CosmosHttpResponseError) as ctx: - service.rerank( - reranking_context="test query", - documents=["doc1", "doc2"] - ) + service.rerank(reranking_context="test query", documents=["doc1", "doc2"]) self.assertEqual(ctx.exception.status_code, 408) self.assertIn("Inference Service Request Timeout", str(ctx.exception)) def test_async_inference_timeout_raises_408(self): """Test that async inference service converts ServiceRequestError to 408.""" + async def run_test(): from azure.cosmos.aio._inference_service_async import _InferenceService @@ -57,14 +55,12 @@ async def run_test(): service = _InferenceService(mock_connection) with patch.object( - service._inference_pipeline_client._pipeline, "run", - side_effect=ServiceRequestError("Connection timeout") + service._inference_pipeline_client._pipeline, + "run", + side_effect=ServiceRequestError("Connection timeout"), ): with self.assertRaises(exceptions.CosmosHttpResponseError) as ctx: - await service.rerank( - reranking_context="test query", - documents=["doc1", "doc2"] - ) + await service.rerank(reranking_context="test query", documents=["doc1", "doc2"]) self.assertEqual(ctx.exception.status_code, 408) self.assertIn("Inference Service Request Timeout", str(ctx.exception)) @@ -101,14 +97,8 @@ def test_sync_inference_passes_timeout_to_pipeline(self): mock_response.http_response.headers = {} mock_response.http_response.body.return_value = b'{"Scores": []}' - with patch.object( - service._inference_pipeline_client._pipeline, "run", - return_value=mock_response - ) as mock_run: - service.rerank( - reranking_context="test query", - documents=["doc1"] - ) + with patch.object(service._inference_pipeline_client._pipeline, "run", return_value=mock_response) as mock_run: + service.rerank(reranking_context="test query", documents=["doc1"]) mock_run.assert_called_once() call_kwargs = mock_run.call_args[1] self.assertEqual(call_kwargs["connection_timeout"], 7) @@ -116,6 +106,7 @@ def test_sync_inference_passes_timeout_to_pipeline(self): def test_async_inference_passes_timeout_to_pipeline(self): """Test that async inference service passes timeout kwargs to pipeline.run().""" + async def run_test(): from azure.cosmos.aio._inference_service_async import _InferenceService @@ -129,13 +120,9 @@ async def run_test(): mock_response.http_response.body.return_value = b'{"Scores": []}' with patch.object( - service._inference_pipeline_client._pipeline, "run", - return_value=mock_response + service._inference_pipeline_client._pipeline, "run", return_value=mock_response ) as mock_run: - await service.rerank( - reranking_context="test query", - documents=["doc1"] - ) + await service.rerank(reranking_context="test query", documents=["doc1"]) mock_run.assert_called_once() call_kwargs = mock_run.call_args[1] self.assertEqual(call_kwargs["connection_timeout"], 12) @@ -151,19 +138,16 @@ def test_sync_inference_response_timeout_raises_408(self): service = _InferenceService(mock_connection) with patch.object( - service._inference_pipeline_client._pipeline, "run", - side_effect=ServiceResponseError("Read timeout") + service._inference_pipeline_client._pipeline, "run", side_effect=ServiceResponseError("Read timeout") ): with self.assertRaises(exceptions.CosmosHttpResponseError) as ctx: - service.rerank( - reranking_context="test query", - documents=["doc1", "doc2"] - ) + service.rerank(reranking_context="test query", documents=["doc1", "doc2"]) self.assertEqual(ctx.exception.status_code, 408) self.assertIn("Inference Service Request Timeout", str(ctx.exception)) def test_async_inference_response_timeout_raises_408(self): """Test that async inference service converts ServiceResponseError to 408.""" + async def run_test(): from azure.cosmos.aio._inference_service_async import _InferenceService @@ -172,14 +156,10 @@ async def run_test(): service = _InferenceService(mock_connection) with patch.object( - service._inference_pipeline_client._pipeline, "run", - side_effect=ServiceResponseError("Read timeout") + service._inference_pipeline_client._pipeline, "run", side_effect=ServiceResponseError("Read timeout") ): with self.assertRaises(exceptions.CosmosHttpResponseError) as ctx: - await service.rerank( - reranking_context="test query", - documents=["doc1", "doc2"] - ) + await service.rerank(reranking_context="test query", documents=["doc1", "doc2"]) self.assertEqual(ctx.exception.status_code, 408) self.assertIn("Inference Service Request Timeout", str(ctx.exception)) diff --git a/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy.py b/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy.py index da600a065075..76ab913a94ce 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy.py @@ -29,10 +29,10 @@ def setUpClass(cls): cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.database = cls.client.get_database_client(cls.TEST_DATABASE_ID) - def test_write_failover_to_global_with_service_request_error(self): - container = self.database.create_container("service_request_mrr_test_" + str(uuid.uuid4()), - PartitionKey(path="/id")) + container = self.database.create_container( + "service_request_mrr_test_" + str(uuid.uuid4()), PartitionKey(path="/id") + ) # 1. Get write regions and ensure there are at least 2 for this test. endpoint_manager = self.client.client_connection._global_endpoint_manager @@ -48,7 +48,7 @@ def test_write_failover_to_global_with_service_request_error(self): write_locations = list(write_locations_map.values()) account_name = self.host.split(".")[0].split("//")[1] - region_to_fail_slug = write_endpoints[1].split('/')[2].replace(f"{account_name}-", "").split('.')[0] + region_to_fail_slug = write_endpoints[1].split("/")[2].replace(f"{account_name}-", "").split(".")[0] region_to_exclude = write_locations[0] # Use the display name for ExcludedLocations @@ -64,10 +64,10 @@ def test_write_failover_to_global_with_service_request_error(self): self.masterKey, connection_policy=policy, transport=fault_injection_transport, - ) container_with_faults = client_with_faults.get_database_client(self.database.id).get_container_client( - container.id) + container.id + ) # 3. Configure fault injection to fail requests to the second write region with a ServiceRequestError. error_to_inject = ServiceRequestError(message="Simulated Service Request Error") @@ -85,11 +85,10 @@ def fault_action(_): # 4. Execute a write operation. It should fail with ServiceRequestError as no regions are available. with self.assertRaises(ServiceRequestError) as context: - container_with_faults.create_item(body={'id': 'failover_test_id', 'pk': 'pk_value'}) + container_with_faults.create_item(body={"id": "failover_test_id", "pk": "pk_value"}) self.assertIn("Simulated Service Request Error", str(context.exception)) if __name__ == "__main__": unittest.main() - diff --git a/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy_async.py b/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy_async.py index 516619ea9ba4..ed649647cd15 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_service_request_retry_policy_async.py @@ -27,8 +27,9 @@ class TestServiceRequestRetryPoliciesAsync(unittest.TestCase): async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) self.database = self.client.get_database_client(self.TEST_DATABASE_ID) - self.container = await self.database.create_container("service_request_mrr_test_" + str(uuid.uuid4()), - PartitionKey(path="/id")) + self.container = await self.database.create_container( + "service_request_mrr_test_" + str(uuid.uuid4()), PartitionKey(path="/id") + ) async def asyncTearDown(self): await self.client.close() @@ -48,7 +49,7 @@ async def test_write_failover_to_global_with_service_request_error_async(self): write_locations = list(write_locations_map.values()) account_name = self.host.split(".")[0].split("//")[1] - region_to_fail_slug = write_endpoints[1].split('/')[2].replace(f"{account_name}-", "").split('.')[0] + region_to_fail_slug = write_endpoints[1].split("/")[2].replace(f"{account_name}-", "").split(".")[0] region_to_exclude = write_locations[0] # Use the display name for ExcludedLocations @@ -60,14 +61,14 @@ async def test_write_failover_to_global_with_service_request_error_async(self): fault_injection_transport = FaultInjectionTransport() async with CosmosClient( - self.host, - self.masterKey, - connection_policy=policy, - transport=fault_injection_transport, - + self.host, + self.masterKey, + connection_policy=policy, + transport=fault_injection_transport, ) as client_with_faults: container_with_faults = client_with_faults.get_database_client(self.database.id).get_container_client( - self.container.id) + self.container.id + ) # 3. Configure fault injection to fail requests to the second write region with a ServiceRequestError. error_to_inject = ServiceRequestError(message="Simulated Service Request Error") @@ -85,11 +86,10 @@ def fault_action(_): # 4. Execute a write operation. It should fail with ServiceRequestError as no regions are available. with self.assertRaises(ServiceRequestError) as context: - await container_with_faults.create_item(body={'id': 'failover_test_id', 'pk': 'pk_value'}) + await container_with_faults.create_item(body={"id": "failover_test_id", "pk": "pk_value"}) self.assertIn("Simulated Service Request Error", str(context.exception)) if __name__ == "__main__": unittest.main() - diff --git a/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies.py b/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies.py index 0a4e19049886..e0133e62ba24 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies.py +++ b/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies.py @@ -7,8 +7,7 @@ from azure.core.exceptions import ServiceRequestError, ServiceResponseError import test_config -from azure.cosmos import (CosmosClient, _retry_utility, DatabaseAccount, _global_endpoint_manager, - _location_cache) +from azure.cosmos import CosmosClient, _retry_utility, DatabaseAccount, _global_endpoint_manager, _location_cache from azure.cosmos._location_cache import RegionalRoutingContext from azure.cosmos._request_object import RequestObject @@ -28,12 +27,12 @@ class TestServiceRetryPolicies(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.created_database = cls.client.get_database_client(cls.TEST_DATABASE_ID) cls.created_container = cls.created_database.get_container_client(cls.TEST_CONTAINER_ID) @@ -50,18 +49,23 @@ def test_service_request_retry_policy(self): # Change the location cache to have 3 preferred read regions and 3 available read endpoints by location original_location_cache = mock_client.client_connection._global_endpoint_manager.location_cache original_location_cache.account_read_locations = [self.REGION1, self.REGION2, self.REGION3] - original_location_cache.available_read_regional_endpoints_by_locations = {self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + original_location_cache.available_read_regional_endpoints_by_locations = { + self.REGION1: self.REGIONAL_ENDPOINT, + self.REGION2: self.REGIONAL_ENDPOINT, + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] expected_counter = len(original_location_cache.read_regional_routing_contexts) try: # Mock the function to return the ServiceRequestException we retry mf = self.MockExecuteServiceRequestExceptionIgnoreQuery(self.original_execute_function) _retry_utility.ExecuteFunction = mf - container.read_item(created_item['id'], created_item['pk']) + container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceRequestError: assert mf.counter == expected_counter @@ -78,16 +82,20 @@ def test_service_request_retry_policy(self): original_location_cache.available_read_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] expected_counter = len(original_location_cache.read_regional_routing_contexts) try: # Mock the function to return the ServiceRequestException we retry mf = self.MockExecuteServiceRequestException() _retry_utility.ExecuteFunction = mf - items = list(container.query_items(query="SELECT * FROM c", partition_key=created_item['pk'])) + items = list(container.query_items(query="SELECT * FROM c", partition_key=created_item["pk"])) pytest.fail("Exception was not raised.") except ServiceRequestError: assert mf.counter == expected_counter @@ -102,7 +110,7 @@ def test_service_request_retry_policy(self): # Reset the function to reset the counter mf = self.MockExecuteServiceRequestException() _retry_utility.ExecuteFunction = mf - container.read_item(created_item['id'], created_item['pk']) + container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceRequestError: assert mf.counter == expected_counter @@ -112,8 +120,10 @@ def test_service_request_retry_policy(self): # Now we try it out with a write request original_location_cache.account_write_locations = [self.REGION1, self.REGION2] original_location_cache.write_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT] - original_location_cache.available_write_regional_endpoints_by_locations = {self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT} + original_location_cache.available_write_regional_endpoints_by_locations = { + self.REGION1: self.REGIONAL_ENDPOINT, + self.REGION2: self.REGIONAL_ENDPOINT, + } expected_counter = len(original_location_cache.write_regional_routing_contexts) try: # Reset the function to reset the counter @@ -139,16 +149,21 @@ def test_service_response_retry_policy(self): # Change the location cache to have 3 preferred read regions and 3 available read endpoints by location original_location_cache = mock_client.client_connection._global_endpoint_manager.location_cache original_location_cache.account_read_locations = [self.REGION1, self.REGION2, self.REGION3] - original_location_cache.available_read_regional_endpoints_by_locations = {self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + original_location_cache.available_read_regional_endpoints_by_locations = { + self.REGION1: self.REGIONAL_ENDPOINT, + self.REGION2: self.REGIONAL_ENDPOINT, + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] try: # Mock the function to return the ServiceResponseException we retry mf = self.MockExecuteServiceResponseExceptionIgnoreQuery(Exception, self.original_execute_function) _retry_utility.ExecuteFunction = mf - container.read_item(created_item['id'], created_item['pk']) + container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceResponseError: assert mf.counter == 3 @@ -162,7 +177,7 @@ def test_service_response_retry_policy(self): # Reset the function to reset the counter mf = self.MockExecuteServiceResponseException(Exception) _retry_utility.ExecuteFunction = mf - container.read_item(created_item['id'], created_item['pk']) + container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceResponseError: assert mf.counter == 1 @@ -172,8 +187,10 @@ def test_service_response_retry_policy(self): # Now we try it out with a write request original_location_cache.account_write_locations = [self.REGION1, self.REGION2] original_location_cache.write_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT] - original_location_cache.available_write_regional_endpoints_by_locations = {self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT} + original_location_cache.available_write_regional_endpoints_by_locations = { + self.REGION1: self.REGIONAL_ENDPOINT, + self.REGION2: self.REGIONAL_ENDPOINT, + } try: # Reset the function to reset the counter mf = self.MockExecuteServiceResponseException(Exception) @@ -251,12 +268,20 @@ def test_global_endpoint_manager_retry(self): # - GetDatabaseAccountStub allows us to receive any number of endpoints for that call independent of account used exception = ServiceRequestError("mock exception") exception.exc_type = Exception - self.original_get_database_account_stub = _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub + self.original_get_database_account_stub = ( + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub + ) _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccountStub connection_retry_policy = test_config.MockConnectionRetryPolicy(resource_type="docs", error=exception) - mock_client = CosmosClient(self.host, self.masterKey, connection_retry_policy=connection_retry_policy, - preferred_locations=[self.REGION1, self.REGION2]) - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_get_database_account_stub + mock_client = CosmosClient( + self.host, + self.masterKey, + connection_retry_policy=connection_retry_policy, + preferred_locations=[self.REGION1, self.REGION2], + ) + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_get_database_account_stub + ) db = mock_client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_ID) @@ -269,7 +294,9 @@ def test_global_endpoint_manager_retry(self): # 4 total in region retries assert len(connection_retry_policy.request_endpoints) == 4 finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_get_database_account_stub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_get_database_account_stub + ) # Now we try with a read request - reset the policy to reset the counter connection_retry_policy.request_endpoints = [] @@ -282,7 +309,9 @@ def test_global_endpoint_manager_retry(self): # 4 total requests in each main region (preferred read region 1 -> preferred read region 2) assert len(connection_retry_policy.request_endpoints) == 8 finally: - _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = self.original_get_database_account_stub + _global_endpoint_manager._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_get_database_account_stub + ) class MockExecuteServiceRequestException(object): def __init__(self): @@ -303,8 +332,12 @@ def __call__(self, func, *args, **kwargs): if args and isinstance(args[1], RequestObject): request_obj = args[1] - if request_obj.resource_type == "docs" and request_obj.operation_type == "Query" or\ - request_obj.resource_type == "pkranges" and request_obj.operation_type == "ReadFeed": + if ( + request_obj.resource_type == "docs" + and request_obj.operation_type == "Query" + or request_obj.resource_type == "pkranges" + and request_obj.operation_type == "ReadFeed" + ): # Ignore query requests, As an additional ReadFeed might occur during a regular Read operation return self.original_execute_function(func, *args, **kwargs) self.counter = self.counter + 1 @@ -334,8 +367,12 @@ def __call__(self, func, *args, **kwargs): if args and isinstance(args[1], RequestObject): request_obj = args[1] - if request_obj.resource_type == "docs" and request_obj.operation_type == "Query" or\ - request_obj.resource_type == "pkranges" and request_obj.operation_type == "ReadFeed": + if ( + request_obj.resource_type == "docs" + and request_obj.operation_type == "Query" + or request_obj.resource_type == "pkranges" + and request_obj.operation_type == "ReadFeed" + ): # Ignore query requests, As an additional ReadFeed might occur during a regular Read operation return self.original_execute_function(func, *args, **kwargs) self.counter = self.counter + 1 @@ -348,12 +385,12 @@ def MockGetDatabaseAccountStub(self, endpoint): read_regions = ["West US", "East US"] read_locations = [] for loc in read_regions: - read_locations.append({'databaseAccountEndpoint': endpoint, 'name': loc}) + read_locations.append({"databaseAccountEndpoint": endpoint, "name": loc}) write_regions = ["West US"] write_locations = [] for loc in write_regions: locational_endpoint = _location_cache.LocationCache.GetLocationalEndpoint(endpoint, loc) - write_locations.append({'databaseAccountEndpoint': locational_endpoint, 'name': loc}) + write_locations.append({"databaseAccountEndpoint": locational_endpoint, "name": loc}) multi_write = False db_acc = DatabaseAccount() diff --git a/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies_async.py b/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies_async.py index 7e2235b66b33..1beaee203cd3 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_service_retry_policies_async.py @@ -5,8 +5,12 @@ import uuid import pytest -from aiohttp.client_exceptions import (ClientConnectionError, ClientConnectionResetError, - ClientOSError, ServerConnectionError) +from aiohttp.client_exceptions import ( + ClientConnectionError, + ClientConnectionResetError, + ClientOSError, + ServerConnectionError, +) from azure.core.exceptions import ServiceRequestError, ServiceResponseError import test_config @@ -31,12 +35,12 @@ class TestServiceRetryPoliciesAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -63,15 +67,19 @@ async def test_service_request_retry_policy_async(self): original_location_cache.available_read_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] expected_counter = len(original_location_cache.read_regional_routing_contexts) try: # Mock the function to return the ServiceRequestException we retry mf = self.MockExecuteServiceRequestExceptionIgnoreQuery(self.original_execute_function) _retry_utility_async.ExecuteFunctionAsync = mf - await container.read_item(created_item['id'], created_item['pk']) + await container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceRequestError: assert mf.counter == expected_counter @@ -88,17 +96,23 @@ async def test_service_request_retry_policy_async(self): original_location_cache.available_read_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] expected_counter = len(original_location_cache.read_regional_routing_contexts) try: # Mock the function to return the ServiceRequestException we retry mf = self.MockExecuteServiceRequestException() _retry_utility_async.ExecuteFunctionAsync = mf - items = [item async for item in container.query_items(query="SELECT * FROM c", - partition_key=created_item['pk'])] + items = [ + item + async for item in container.query_items(query="SELECT * FROM c", partition_key=created_item["pk"]) + ] pytest.fail("Exception was not raised.") except ServiceRequestError: assert mf.counter == expected_counter @@ -113,7 +127,7 @@ async def test_service_request_retry_policy_async(self): # Reset the function to reset the counter mf = self.MockExecuteServiceRequestException() _retry_utility_async.ExecuteFunctionAsync = mf - await container.read_item(created_item['id'], created_item['pk']) + await container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceRequestError: assert mf.counter == expected_counter @@ -125,7 +139,8 @@ async def test_service_request_retry_policy_async(self): original_location_cache.write_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT] original_location_cache.available_write_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT} + self.REGION2: self.REGIONAL_ENDPOINT, + } expected_counter = len(original_location_cache.write_regional_routing_contexts) try: # Reset the function to reset the counter @@ -155,15 +170,20 @@ async def test_service_response_retry_policy_async(self): original_location_cache.available_read_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] try: # Mock the function to return the ClientConnectionError we retry - mf = self.MockExecuteServiceResponseExceptionIgnoreQuery(AttributeError, - None, self.original_execute_function) + mf = self.MockExecuteServiceResponseExceptionIgnoreQuery( + AttributeError, None, self.original_execute_function + ) _retry_utility_async.ExecuteFunctionAsync = mf - await container.read_item(created_item['id'], created_item['pk']) + await container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceResponseError: assert mf.counter == 3 @@ -177,7 +197,7 @@ async def test_service_response_retry_policy_async(self): # Reset the function to reset the counter mf = self.MockExecuteServiceResponseException(AttributeError, None) _retry_utility_async.ExecuteFunctionAsync = mf - await container.read_item(created_item['id'], created_item['pk']) + await container.read_item(created_item["id"], created_item["pk"]) pytest.fail("Exception was not raised.") except ServiceResponseError: assert mf.counter == 1 @@ -189,7 +209,8 @@ async def test_service_response_retry_policy_async(self): original_location_cache.write_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT] original_location_cache.available_write_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT} + self.REGION2: self.REGIONAL_ENDPOINT, + } try: # Reset the function to reset the counter mf = self.MockExecuteServiceResponseException(AttributeError, None) @@ -209,7 +230,8 @@ async def test_service_response_retry_policy_async(self): original_location_cache.write_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT] original_location_cache.available_write_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT} + self.REGION2: self.REGIONAL_ENDPOINT, + } try: # Reset the function to reset the counter mf = self.MockExecuteServiceResponseException(ClientConnectionError, ClientConnectionError()) @@ -297,14 +319,19 @@ async def test_service_response_errors_async(self): original_location_cache.available_read_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, self.REGION2: self.REGIONAL_ENDPOINT, - self.REGION3: self.REGIONAL_ENDPOINT} - original_location_cache.read_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT, - self.REGIONAL_ENDPOINT] + self.REGION3: self.REGIONAL_ENDPOINT, + } + original_location_cache.read_regional_routing_contexts = [ + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + self.REGIONAL_ENDPOINT, + ] original_location_cache.account_write_locations = [self.REGION1, self.REGION2] original_location_cache.write_regional_routing_contexts = [self.REGIONAL_ENDPOINT, self.REGIONAL_ENDPOINT] original_location_cache.available_write_regional_endpoints_by_locations = { self.REGION1: self.REGIONAL_ENDPOINT, - self.REGION2: self.REGIONAL_ENDPOINT} + self.REGION2: self.REGIONAL_ENDPOINT, + } try: # Start with a normal ServiceResponseException with no special casing mf = self.MockExecuteServiceResponseException(AttributeError, AttributeError()) @@ -330,8 +357,8 @@ async def test_service_response_errors_async(self): assert len(original_location_cache.location_unavailability_info_by_endpoint) == 1 host_unavailable = original_location_cache.location_unavailability_info_by_endpoint.get(self.host) assert host_unavailable is not None - assert len(host_unavailable.get('operationType')) == 1 - assert 'Write' in host_unavailable.get('operationType') + assert len(host_unavailable.get("operationType")) == 1 + assert "Write" in host_unavailable.get("operationType") finally: _retry_utility_async.ExecuteFunctionAsync = self.original_execute_function @@ -347,8 +374,8 @@ async def test_service_response_errors_async(self): assert mf.counter == 1 host_unavailable = original_location_cache.location_unavailability_info_by_endpoint.get(self.host) assert host_unavailable is not None - assert len(host_unavailable.get('operationType')) == 1 - assert 'Write' in host_unavailable.get('operationType') + assert len(host_unavailable.get("operationType")) == 1 + assert "Write" in host_unavailable.get("operationType") finally: _retry_utility_async.ExecuteFunctionAsync = self.original_execute_function @@ -368,8 +395,8 @@ async def test_service_response_errors_async(self): assert len(original_location_cache.location_unavailability_info_by_endpoint) == 1 host_unavailable = original_location_cache.location_unavailability_info_by_endpoint.get(self.host) assert host_unavailable is not None - assert len(host_unavailable.get('operationType')) == 1 - assert 'Write' in host_unavailable.get('operationType') + assert len(host_unavailable.get("operationType")) == 1 + assert "Write" in host_unavailable.get("operationType") finally: _retry_utility_async.ExecuteFunctionAsync = self.original_execute_function @@ -411,13 +438,19 @@ async def test_global_endpoint_manager_retry_async(self): # - GetDatabaseAccountStub allows us to receive any number of endpoints for that call independent of account used exception = ServiceRequestError("mock exception") exception.exc_type = Exception - self.original_get_database_account_stub = _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + self.original_get_database_account_stub = ( + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub + ) _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccountStub connection_policy = self.connectionPolicy connection_retry_policy = test_config.MockConnectionRetryPolicyAsync(resource_type="docs", error=exception) connection_policy.ConnectionRetryConfiguration = connection_retry_policy - async with CosmosClient(self.host, self.masterKey, connection_policy=connection_policy, - preferred_locations=[self.REGION1, self.REGION2]) as mock_client: + async with CosmosClient( + self.host, + self.masterKey, + connection_policy=connection_policy, + preferred_locations=[self.REGION1, self.REGION2], + ) as mock_client: db = mock_client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_ID) @@ -431,10 +464,14 @@ async def test_global_endpoint_manager_retry_async(self): except CosmosHttpResponseError as e: print(e) finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_get_database_account_stub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_get_database_account_stub + ) # Now we try with a read request - reset the policy to reset the counter - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.MockGetDatabaseAccountStub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.MockGetDatabaseAccountStub + ) connection_retry_policy.request_endpoints = [] try: await container.read_item("some_id", "some_pk") @@ -444,7 +481,9 @@ async def test_global_endpoint_manager_retry_async(self): # 4 total requests in each main region (preferred read region 1 -> preferred read region 2) assert len(connection_retry_policy.request_endpoints) == 8 finally: - _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = self.original_get_database_account_stub + _global_endpoint_manager_async._GlobalEndpointManager._GetDatabaseAccountStub = ( + self.original_get_database_account_stub + ) class MockExecuteServiceRequestException(object): def __init__(self): @@ -465,8 +504,12 @@ def __call__(self, func, *args, **kwargs): if args and isinstance(args[1], RequestObject): request_obj = args[1] - if request_obj.resource_type == "docs" and request_obj.operation_type == "Query" or\ - request_obj.resource_type == "pkranges" and request_obj.operation_type == "ReadFeed": + if ( + request_obj.resource_type == "docs" + and request_obj.operation_type == "Query" + or request_obj.resource_type == "pkranges" + and request_obj.operation_type == "ReadFeed" + ): # Ignore query requests, As an additional ReadFeed might occur during a regular Read operation return self.original_execute_function(func, *args, **kwargs) self.counter = self.counter + 1 @@ -499,8 +542,12 @@ def __call__(self, func, *args, **kwargs): if args and isinstance(args[1], RequestObject): request_obj = args[1] - if request_obj.resource_type == "docs" and request_obj.operation_type == "Query" or \ - request_obj.resource_type == "pkranges" and request_obj.operation_type == "ReadFeed": + if ( + request_obj.resource_type == "docs" + and request_obj.operation_type == "Query" + or request_obj.resource_type == "pkranges" + and request_obj.operation_type == "ReadFeed" + ): # Ignore query requests, As an additional ReadFeed might occur during a regular Read operation return self.original_execute_function(func, *args, **kwargs) self.counter = self.counter + 1 @@ -514,12 +561,12 @@ async def MockGetDatabaseAccountStub(self, endpoint): read_regions = ["West US", "East US"] read_locations = [] for loc in read_regions: - read_locations.append({'databaseAccountEndpoint': endpoint, 'name': loc}) + read_locations.append({"databaseAccountEndpoint": endpoint, "name": loc}) write_regions = ["West US"] write_locations = [] for loc in write_regions: locational_endpoint = self.host.replace("localhost", "127.0.0.1") - write_locations.append({'databaseAccountEndpoint': locational_endpoint, 'name': loc}) + write_locations.append({"databaseAccountEndpoint": locational_endpoint, "name": loc}) multi_write = False db_acc = DatabaseAccount() diff --git a/sdk/cosmos/azure-cosmos/tests/test_session.py b/sdk/cosmos/azure-cosmos/tests/test_session.py index e4a675236125..5bf447237db1 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_session.py +++ b/sdk/cosmos/azure-cosmos/tests/test_session.py @@ -37,10 +37,12 @@ def setUpClass(cls): # we will gain some speed up in running the tests by creating the # database, collection and inserting all the docs only once - if cls.masterKey == '[YOUR_KEY_HERE]' or cls.host == '[YOUR_ENDPOINT_HERE]': - raise Exception("You must specify your Azure Cosmos account values for " - "'masterKey' and 'host' at the top of this class to run the " - "tests.") + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": + raise Exception( + "You must specify your Azure Cosmos account values for " + "'masterKey' and 'host' at the top of this class to run the " + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_db = cls.client.get_database_client(cls.TEST_DATABASE_ID) @@ -48,20 +50,17 @@ def setUpClass(cls): def test_manual_session_token_takes_precedence(self): # Establish an initial session state for the primary client. After this call, self.client has an internal session token. - self.created_collection.create_item( - body={'id': 'precedence_doc_1' + str(uuid.uuid4()), 'pk': 'mypk'} - ) + self.created_collection.create_item(body={"id": "precedence_doc_1" + str(uuid.uuid4()), "pk": "mypk"}) # Capture the session token from the primary client (Token A) token_A = self.client.client_connection.last_response_headers.get(HttpHeaders.SessionToken) self.assertIsNotNone(token_A) # Use a separate client to create a second item. This gives us a new, distinct session token from the response. with cosmos_client.CosmosClient(self.host, self.masterKey) as other_client: - other_collection = other_client.get_database_client(self.TEST_DATABASE_ID) \ - .get_container_client(self.TEST_COLLECTION_ID) - item2 = other_collection.create_item( - body={'id': 'precedence_doc_2' + str(uuid.uuid4()), 'pk': 'mypk'} + other_collection = other_client.get_database_client(self.TEST_DATABASE_ID).get_container_client( + self.TEST_COLLECTION_ID ) + item2 = other_collection.create_item(body={"id": "precedence_doc_2" + str(uuid.uuid4()), "pk": "mypk"}) # Capture the session token from the second client (Token B) manual_session_token = other_client.client_connection.last_response_headers.get(HttpHeaders.SessionToken) self.assertIsNotNone(manual_session_token) @@ -75,18 +74,18 @@ def manual_token_hook(request): self.assertIn(HttpHeaders.SessionToken, request.http_request.headers) self.assertEqual(request.http_request.headers[HttpHeaders.SessionToken], manual_session_token) - #Read an item using the primary client, but manually providing second token. The hook will verify that second token overrides the client's internal first token. + # Read an item using the primary client, but manually providing second token. The hook will verify that second token overrides the client's internal first token. self.created_collection.read_item( - item=item2['id'], # Reading the item associated with second token - partition_key='mypk', + item=item2["id"], # Reading the item associated with second token + partition_key="mypk", session_token=manual_session_token, # Manually provide second token - raw_request_hook=manual_token_hook + raw_request_hook=manual_token_hook, ) def test_manual_session_token_override(self): # Create an item to get a valid session token from the response created_document = self.created_collection.create_item( - body={'id': 'doc_for_manual_session' + str(uuid.uuid4()), 'pk': 'mypk'} + body={"id": "doc_for_manual_session" + str(uuid.uuid4()), "pk": "mypk"} ) session_token = self.client.client_connection.last_response_headers.get(HttpHeaders.SessionToken) self.assertIsNotNone(session_token) @@ -104,10 +103,10 @@ def manual_token_hook(request): # Read the item, passing the session token manually. # The hook will verify it's correctly added to the request headers. self.created_collection.read_item( - item=created_document['id'], - partition_key='mypk', + item=created_document["id"], + partition_key="mypk", session_token=session_token, # Manually provide the session token - raw_request_hook=manual_token_hook + raw_request_hook=manual_token_hook, ) finally: # Restore the original session object to avoid affecting other tests @@ -116,42 +115,62 @@ def manual_token_hook(request): def test_session_token_sm_for_ops(self): # Session token should not be sent for control plane operations - test_container = self.created_db.create_container(str(uuid.uuid4()), PartitionKey(path="/id"), raw_response_hook=test_config.no_token_response_hook) - self.created_db.get_container_client(container=self.created_collection).read(raw_response_hook=test_config.no_token_response_hook) + test_container = self.created_db.create_container( + str(uuid.uuid4()), PartitionKey(path="/id"), raw_response_hook=test_config.no_token_response_hook + ) + self.created_db.get_container_client(container=self.created_collection).read( + raw_response_hook=test_config.no_token_response_hook + ) self.created_db.delete_container(test_container, raw_response_hook=test_config.no_token_response_hook) # Session token should be sent for document read/batch requests only - verify it is not sent for write requests - up_item = self.created_collection.upsert_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) - replaced_item = self.created_collection.replace_item(item=up_item['id'], body={'id': up_item['id'], 'song': 'song', 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) - created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) + up_item = self.created_collection.upsert_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) + replaced_item = self.created_collection.replace_item( + item=up_item["id"], + body={"id": up_item["id"], "song": "song", "pk": "mypk"}, + raw_response_hook=test_config.no_token_response_hook, + ) + created_document = self.created_collection.create_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) response_session_token = created_document.get_response_headers().get(HttpHeaders.SessionToken) - read_item = self.created_collection.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) - read_item2 = self.created_collection.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + read_item = self.created_collection.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) + read_item2 = self.created_collection.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) # Since the session hasn't been updated (no write requests have happened) verify session is still the same - assert (read_item.get_response_headers().get(HttpHeaders.SessionToken) == - read_item2.get_response_headers().get(HttpHeaders.SessionToken) == - response_session_token) + assert ( + read_item.get_response_headers().get(HttpHeaders.SessionToken) + == read_item2.get_response_headers().get(HttpHeaders.SessionToken) + == response_session_token + ) # Verify session tokens are sent for batch requests too batch_operations = [ - ("create", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), - ("replace", (read_item2['id'], {"id": str(uuid.uuid4()), "pk": 'mypk'})), - ("read", (replaced_item['id'],)), - ("upsert", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), + ("create", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), + ("replace", (read_item2["id"], {"id": str(uuid.uuid4()), "pk": "mypk"})), + ("read", (replaced_item["id"],)), + ("upsert", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), ] - batch_result = self.created_collection.execute_item_batch(batch_operations, 'mypk', raw_response_hook=test_config.token_response_hook) + batch_result = self.created_collection.execute_item_batch( + batch_operations, "mypk", raw_response_hook=test_config.token_response_hook + ) batch_response_token = batch_result.get_response_headers().get(HttpHeaders.SessionToken) assert batch_response_token != response_session_token # Verify no session tokens are sent for delete requests either - but verify session token is updated - self.created_collection.delete_item(replaced_item['id'], replaced_item['pk'], raw_response_hook=test_config.no_token_response_hook) + self.created_collection.delete_item( + replaced_item["id"], replaced_item["pk"], raw_response_hook=test_config.no_token_response_hook + ) assert self.created_db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) is not None - assert self.created_db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) != batch_response_token + assert ( + self.created_db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) + != batch_response_token + ) def test_session_token_with_space_in_container_name(self): @@ -159,24 +178,26 @@ def test_session_token_with_space_in_container_name(self): test_container = self.created_db.create_container( "Container with space" + str(uuid.uuid4()), PartitionKey(path="/pk"), - raw_response_hook=test_config.no_token_response_hook + raw_response_hook=test_config.no_token_response_hook, ) try: # Session token should be sent for document read/batch requests only - verify it is not sent for write requests - created_document = test_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) + created_document = test_container.create_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) response_session_token = created_document.get_response_headers().get(HttpHeaders.SessionToken) - read_item = test_container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + read_item = test_container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) query_iterable = test_container.query_items( - "SELECT * FROM c WHERE c.id = '" + str(created_document['id']) + "'", - partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + "SELECT * FROM c WHERE c.id = '" + str(created_document["id"]) + "'", + partition_key="mypk", + raw_response_hook=test_config.token_response_hook, + ) for _ in query_iterable: pass - assert (read_item.get_response_headers().get(HttpHeaders.SessionToken) == - response_session_token) + assert read_item.get_response_headers().get(HttpHeaders.SessionToken) == response_session_token finally: self.created_db.delete_container(test_container) @@ -187,105 +208,124 @@ def test_session_token_mwr_for_ops(self): # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation = \ + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransport.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation = ( lambda r, inner: FaultInjectionTransport.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) - client = cosmos_client.CosmosClient(self.host, self.masterKey, consistency_level="Session", - transport=custom_transport, multiple_write_locations=True) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) + client = cosmos_client.CosmosClient( + self.host, + self.masterKey, + consistency_level="Session", + transport=custom_transport, + multiple_write_locations=True, + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_COLLECTION_ID) # Session token should not be sent for control plane operations - test_container = db.create_container(str(uuid.uuid4()), PartitionKey(path="/id"), - raw_response_hook=test_config.no_token_response_hook) + test_container = db.create_container( + str(uuid.uuid4()), PartitionKey(path="/id"), raw_response_hook=test_config.no_token_response_hook + ) db.get_container_client(container=self.created_collection).read( - raw_response_hook=test_config.no_token_response_hook) + raw_response_hook=test_config.no_token_response_hook + ) db.delete_container(test_container, raw_response_hook=test_config.no_token_response_hook) # Session token should be sent for all document requests since we have mwr configuration # First write request won't have since tokens need to be populated on the client first - container.upsert_item(body={'id': '0' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) - up_item = container.upsert_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.token_response_hook) - replaced_item = container.replace_item(item=up_item['id'], body={'id': up_item['id'], 'song': 'song', - 'pk': 'mypk'}, - raw_response_hook=test_config.token_response_hook) - created_document = container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.token_response_hook) + container.upsert_item( + body={"id": "0" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) + up_item = container.upsert_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.token_response_hook + ) + replaced_item = container.replace_item( + item=up_item["id"], + body={"id": up_item["id"], "song": "song", "pk": "mypk"}, + raw_response_hook=test_config.token_response_hook, + ) + created_document = container.create_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.token_response_hook + ) response_session_token = created_document.get_response_headers().get(HttpHeaders.SessionToken) - read_item = container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) - read_item2 = container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + read_item = container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) + read_item2 = container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) # Since the session hasn't been updated (no write requests have happened) verify session is still the same - assert (read_item.get_response_headers().get(HttpHeaders.SessionToken) == - read_item2.get_response_headers().get(HttpHeaders.SessionToken) == - response_session_token) + assert ( + read_item.get_response_headers().get(HttpHeaders.SessionToken) + == read_item2.get_response_headers().get(HttpHeaders.SessionToken) + == response_session_token + ) # Verify session tokens are sent for batch requests too batch_operations = [ - ("create", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), - ("replace", (read_item2['id'], {"id": str(uuid.uuid4()), "pk": 'mypk'})), - ("read", (replaced_item['id'],)), - ("upsert", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), + ("create", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), + ("replace", (read_item2["id"], {"id": str(uuid.uuid4()), "pk": "mypk"})), + ("read", (replaced_item["id"],)), + ("upsert", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), ] - batch_result = container.execute_item_batch(batch_operations, 'mypk', - raw_response_hook=test_config.token_response_hook) + batch_result = container.execute_item_batch( + batch_operations, "mypk", raw_response_hook=test_config.token_response_hook + ) batch_response_token = batch_result.get_response_headers().get(HttpHeaders.SessionToken) assert batch_response_token != response_session_token # Should get sent now that we have mwr configuration - container.delete_item(replaced_item['id'], replaced_item['pk'], - raw_response_hook=test_config.token_response_hook) + container.delete_item( + replaced_item["id"], replaced_item["pk"], raw_response_hook=test_config.token_response_hook + ) assert db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) is not None assert db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) != batch_response_token - def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): response = test_config.FakeResponse({HttpHeaders.SubStatus: SubStatusCodes.READ_SESSION_NOTAVAILABLE}) raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.NOT_FOUND, - message="Read Session not available", - response=response) + status_code=StatusCodes.NOT_FOUND, message="Read Session not available", response=response + ) def test_clear_session_token(self): - created_document = self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_document = self.created_collection.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunctionSessionReadFailureOnce try: - self.created_collection.read_item(item=created_document['id'], partition_key='mypk') + self.created_collection.read_item(item=created_document["id"], partition_key="mypk") except exceptions.CosmosHttpResponseError as e: - self.assertEqual(self.client.client_connection.session.get_session_token( - 'dbs/' + self.created_db.id + '/colls/' + self.created_collection.id, - None, - {}, - None, - None, - None), "") + self.assertEqual( + self.client.client_connection.session.get_session_token( + "dbs/" + self.created_db.id + "/colls/" + self.created_collection.id, None, {}, None, None, None + ), + "", + ) self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) finally: _retry_utility.ExecuteFunction = self.OriginalExecuteFunction def _MockExecuteFunctionInvalidSessionToken(self, function, *args, **kwargs): - response = {'_self': 'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id': '1'} - headers = {HttpHeaders.SessionToken: '0:2', - HttpHeaders.AlternateContentPath: 'dbs/testDatabase/colls/testCollection'} + response = {"_self": "dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/", "id": "1"} + headers = { + HttpHeaders.SessionToken: "0:2", + HttpHeaders.AlternateContentPath: "dbs/testDatabase/colls/testCollection", + } return (response, headers) def test_internal_server_error_raised_for_invalid_session_token_received_from_server(self): self.OriginalExecuteFunction = _retry_utility.ExecuteFunction _retry_utility.ExecuteFunction = self._MockExecuteFunctionInvalidSessionToken try: - self.created_collection.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + self.created_collection.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) self.fail() except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.http_error_message, "Could not parse the received session token: 2") @@ -293,5 +333,5 @@ def test_internal_server_error_raised_for_invalid_session_token_received_from_se _retry_utility.ExecuteFunction = self.OriginalExecuteFunction -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_session_async.py b/sdk/cosmos/azure-cosmos/tests/test_session_async.py index 6a991be540ab..9fc3dd45d9ff 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_session_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_session_async.py @@ -18,7 +18,6 @@ from typing import Awaitable, Callable - @pytest.mark.cosmosEmulator class TestSessionAsync(unittest.IsolatedAsyncioTestCase): """Test to ensure escaping of non-ascii characters from partition key""" @@ -34,10 +33,12 @@ class TestSessionAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if cls.masterKey == '[YOUR_KEY_HERE]' or cls.host == '[YOUR_ENDPOINT_HERE]': - raise Exception("You must specify your Azure Cosmos account values for " - "'masterKey' and 'host' at the top of this class to run the " - "tests.") + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": + raise Exception( + "You must specify your Azure Cosmos account values for " + "'masterKey' and 'host' at the top of this class to run the " + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -51,7 +52,7 @@ async def asyncTearDown(self): async def test_manual_session_token_takes_precedence_async(self): # Establish an initial session state for the primary async client. await self.created_container.create_item( - body={'id': 'precedence_doc_1_async' + str(uuid.uuid4()), 'pk': 'mypk'} + body={"id": "precedence_doc_1_async" + str(uuid.uuid4()), "pk": "mypk"} ) # Capture the session token from the primary client (Token A) token_A = self.client.client_connection.last_response_headers.get(HttpHeaders.SessionToken) @@ -59,10 +60,11 @@ async def test_manual_session_token_takes_precedence_async(self): # Use a separate async client to create a second item. This gives us a new, distinct session token. async with CosmosClient(self.host, self.masterKey) as other_client: - other_collection = other_client.get_database_client(self.TEST_DATABASE_ID) \ - .get_container_client(self.TEST_COLLECTION_ID) + other_collection = other_client.get_database_client(self.TEST_DATABASE_ID).get_container_client( + self.TEST_COLLECTION_ID + ) item2 = await other_collection.create_item( - body={'id': 'precedence_doc_2_async' + str(uuid.uuid4()), 'pk': 'mypk'} + body={"id": "precedence_doc_2_async" + str(uuid.uuid4()), "pk": "mypk"} ) # Capture the session token from the second client (Token B) manual_session_token = other_client.client_connection.last_response_headers.get(HttpHeaders.SessionToken) @@ -80,16 +82,16 @@ def manual_token_hook(request): # Read an item using the primary client, but manually providing Token B. # The hook will verify that Token B overrides the client's internal Token A. await self.created_container.read_item( - item=item2['id'], - partition_key='mypk', + item=item2["id"], + partition_key="mypk", session_token=manual_session_token, # Manually provide Token B - raw_request_hook=manual_token_hook + raw_request_hook=manual_token_hook, ) async def test_manual_session_token_override_async(self): # Create an item to get a valid session token from the response created_document = await self.created_container.create_item( - body={'id': 'doc_for_manual_session' + str(uuid.uuid4()), 'pk': 'mypk'} + body={"id": "doc_for_manual_session" + str(uuid.uuid4()), "pk": "mypk"} ) session_token = self.client.client_connection.last_response_headers.get(HttpHeaders.SessionToken) self.assertIsNotNone(session_token) @@ -107,10 +109,10 @@ def manual_token_hook(request): # Read the item, passing the session token manually. # The hook will verify it's correctly added to the request headers. await self.created_container.read_item( - item=created_document['id'], - partition_key='mypk', + item=created_document["id"], + partition_key="mypk", session_token=session_token, # Manually provide the session token - raw_request_hook=manual_token_hook + raw_request_hook=manual_token_hook, ) finally: # Restore the original session object to avoid affecting other tests @@ -118,42 +120,62 @@ def manual_token_hook(request): async def test_session_token_swr_for_ops_async(self): # Session token should not be sent for control plane operations - test_container = await self.created_db.create_container(str(uuid.uuid4()), PartitionKey(path="/id"), raw_response_hook=test_config.no_token_response_hook) - await self.created_db.get_container_client(container=self.created_container).read(raw_response_hook=test_config.no_token_response_hook) + test_container = await self.created_db.create_container( + str(uuid.uuid4()), PartitionKey(path="/id"), raw_response_hook=test_config.no_token_response_hook + ) + await self.created_db.get_container_client(container=self.created_container).read( + raw_response_hook=test_config.no_token_response_hook + ) await self.created_db.delete_container(test_container, raw_response_hook=test_config.no_token_response_hook) # Session token should be sent for document read/batch requests only - verify it is not sent for write requests - up_item = await self.created_container.upsert_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) - replaced_item = await self.created_container.replace_item(item=up_item['id'], body={'id': up_item['id'], 'song': 'song', 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) - created_document = await self.created_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) + up_item = await self.created_container.upsert_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) + replaced_item = await self.created_container.replace_item( + item=up_item["id"], + body={"id": up_item["id"], "song": "song", "pk": "mypk"}, + raw_response_hook=test_config.no_token_response_hook, + ) + created_document = await self.created_container.create_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) response_session_token = created_document.get_response_headers().get(HttpHeaders.SessionToken) - read_item = await self.created_container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) - read_item2 = await self.created_container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + read_item = await self.created_container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) + read_item2 = await self.created_container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) # Since the session hasn't been updated (no write requests have happened) verify session is still the same - assert (read_item.get_response_headers().get(HttpHeaders.SessionToken) == - read_item2.get_response_headers().get(HttpHeaders.SessionToken) == - response_session_token) + assert ( + read_item.get_response_headers().get(HttpHeaders.SessionToken) + == read_item2.get_response_headers().get(HttpHeaders.SessionToken) + == response_session_token + ) # Verify session tokens are sent for batch requests too batch_operations = [ - ("create", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), - ("replace", (read_item2['id'], {"id": str(uuid.uuid4()), "pk": 'mypk'})), - ("read", (replaced_item['id'],)), - ("upsert", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), + ("create", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), + ("replace", (read_item2["id"], {"id": str(uuid.uuid4()), "pk": "mypk"})), + ("read", (replaced_item["id"],)), + ("upsert", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), ] - batch_result = await self.created_container.execute_item_batch(batch_operations, 'mypk', raw_response_hook=test_config.token_response_hook) + batch_result = await self.created_container.execute_item_batch( + batch_operations, "mypk", raw_response_hook=test_config.token_response_hook + ) batch_response_token = batch_result.get_response_headers().get(HttpHeaders.SessionToken) assert batch_response_token != response_session_token # Verify no session tokens are sent for delete requests either - but verify session token is updated - await self.created_container.delete_item(replaced_item['id'], replaced_item['pk'], raw_response_hook=test_config.no_token_response_hook) + await self.created_container.delete_item( + replaced_item["id"], replaced_item["pk"], raw_response_hook=test_config.no_token_response_hook + ) assert self.created_db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) is not None - assert self.created_db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) != batch_response_token + assert ( + self.created_db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) + != batch_response_token + ) async def test_session_token_with_space_in_container_name_async(self): @@ -161,25 +183,27 @@ async def test_session_token_with_space_in_container_name_async(self): test_container = await self.created_db.create_container( "Container with space" + str(uuid.uuid4()), PartitionKey(path="/pk"), - raw_response_hook=test_config.no_token_response_hook + raw_response_hook=test_config.no_token_response_hook, ) try: # Session token should be sent for document read/batch requests only - verify it is not sent for write requests - created_document = await test_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) + created_document = await test_container.create_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) response_session_token = created_document.get_response_headers().get(HttpHeaders.SessionToken) - read_item = await test_container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + read_item = await test_container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) query_iterable = test_container.query_items( - "SELECT * FROM c WHERE c.id = '" + str(created_document['id']) + "'", - partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + "SELECT * FROM c WHERE c.id = '" + str(created_document["id"]) + "'", + partition_key="mypk", + raw_response_hook=test_config.token_response_hook, + ) async for _ in query_iterable: pass - assert (read_item.get_response_headers().get(HttpHeaders.SessionToken) == - response_session_token) + assert read_item.get_response_headers().get(HttpHeaders.SessionToken) == response_session_token finally: await self.created_db.delete_container(test_container) @@ -190,92 +214,105 @@ async def test_session_token_mwr_for_ops_async(self): # Inject topology transformation that would make Emulator look like a multiple write region account # account with two read regions - is_get_account_predicate: Callable[[HttpRequest], bool] = lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) - emulator_as_multi_write_region_account_transformation: Callable[[HttpRequest, Callable[[HttpRequest], Awaitable[AsyncHttpResponse]]], AioHttpTransportResponse] = \ - lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( - first_region_name="First Region", - second_region_name="Second Region", - inner=inner) + is_get_account_predicate: Callable[[HttpRequest], bool] = ( + lambda r: FaultInjectionTransportAsync.predicate_is_database_account_call(r) + ) + emulator_as_multi_write_region_account_transformation: Callable[ + [HttpRequest, Callable[[HttpRequest], Awaitable[AsyncHttpResponse]]], AioHttpTransportResponse + ] = lambda r, inner: FaultInjectionTransportAsync.transform_topology_mwr( + first_region_name="First Region", second_region_name="Second Region", inner=inner + ) custom_transport.add_response_transformation( - is_get_account_predicate, - emulator_as_multi_write_region_account_transformation) - client = CosmosClient(self.host, self.masterKey, consistency_level="Session", - transport=custom_transport, multiple_write_locations=True) + is_get_account_predicate, emulator_as_multi_write_region_account_transformation + ) + client = CosmosClient( + self.host, + self.masterKey, + consistency_level="Session", + transport=custom_transport, + multiple_write_locations=True, + ) db = client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_COLLECTION_ID) await client.__aenter__() # Session token should not be sent for control plane operations - test_container = await db.create_container(str(uuid.uuid4()), PartitionKey(path="/id"), - raw_response_hook=test_config.no_token_response_hook) + test_container = await db.create_container( + str(uuid.uuid4()), PartitionKey(path="/id"), raw_response_hook=test_config.no_token_response_hook + ) await db.get_container_client(container=self.created_container).read( - raw_response_hook=test_config.no_token_response_hook) + raw_response_hook=test_config.no_token_response_hook + ) await db.delete_container(test_container, raw_response_hook=test_config.no_token_response_hook) # Session token should be sent for all document requests since we have mwr configuration # First write request won't have since tokens need to be populated on the client first - await container.upsert_item(body={'id': '0' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.no_token_response_hook) - up_item = await container.upsert_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.token_response_hook) - replaced_item = await container.replace_item(item=up_item['id'], - body={'id': up_item['id'], 'song': 'song', - 'pk': 'mypk'}, - raw_response_hook=test_config.token_response_hook) - created_document = await container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}, - raw_response_hook=test_config.token_response_hook) + await container.upsert_item( + body={"id": "0" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.no_token_response_hook + ) + up_item = await container.upsert_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.token_response_hook + ) + replaced_item = await container.replace_item( + item=up_item["id"], + body={"id": up_item["id"], "song": "song", "pk": "mypk"}, + raw_response_hook=test_config.token_response_hook, + ) + created_document = await container.create_item( + body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}, raw_response_hook=test_config.token_response_hook + ) response_session_token = created_document.get_response_headers().get(HttpHeaders.SessionToken) - read_item = await container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) - read_item2 = await container.read_item(item=created_document['id'], partition_key='mypk', - raw_response_hook=test_config.token_response_hook) + read_item = await container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) + read_item2 = await container.read_item( + item=created_document["id"], partition_key="mypk", raw_response_hook=test_config.token_response_hook + ) # Since the session hasn't been updated (no write requests have happened) verify session is still the same - assert (read_item.get_response_headers().get(HttpHeaders.SessionToken) == - read_item2.get_response_headers().get(HttpHeaders.SessionToken) == - response_session_token) + assert ( + read_item.get_response_headers().get(HttpHeaders.SessionToken) + == read_item2.get_response_headers().get(HttpHeaders.SessionToken) + == response_session_token + ) # Verify session tokens are sent for batch requests too batch_operations = [ - ("create", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), - ("replace", (read_item2['id'], {"id": str(uuid.uuid4()), "pk": 'mypk'})), - ("read", (replaced_item['id'],)), - ("upsert", ({"id": str(uuid.uuid4()), "pk": 'mypk'},)), + ("create", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), + ("replace", (read_item2["id"], {"id": str(uuid.uuid4()), "pk": "mypk"})), + ("read", (replaced_item["id"],)), + ("upsert", ({"id": str(uuid.uuid4()), "pk": "mypk"},)), ] - batch_result = await container.execute_item_batch(batch_operations, 'mypk', - raw_response_hook=test_config.token_response_hook) + batch_result = await container.execute_item_batch( + batch_operations, "mypk", raw_response_hook=test_config.token_response_hook + ) batch_response_token = batch_result.get_response_headers().get(HttpHeaders.SessionToken) assert batch_response_token != response_session_token # Should get sent now that we have mwr configuration - await container.delete_item(replaced_item['id'], replaced_item['pk'], - raw_response_hook=test_config.token_response_hook) + await container.delete_item( + replaced_item["id"], replaced_item["pk"], raw_response_hook=test_config.token_response_hook + ) assert db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) is not None assert db.client_connection.last_response_headers.get(HttpHeaders.SessionToken) != batch_response_token await client.close() - def _MockExecuteFunctionSessionReadFailureOnce(self, function, *args, **kwargs): response = test_config.FakeResponse({HttpHeaders.SubStatus: SubStatusCodes.READ_SESSION_NOTAVAILABLE}) raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.NOT_FOUND, - message="Read Session not available", - response=response) + status_code=StatusCodes.NOT_FOUND, message="Read Session not available", response=response + ) async def test_clear_session_token_async(self): - created_document = await self.created_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) + created_document = await self.created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._MockExecuteFunctionSessionReadFailureOnce try: - await self.created_container.read_item(item=created_document['id'], partition_key='mypk') + await self.created_container.read_item(item=created_document["id"], partition_key="mypk") except exceptions.CosmosHttpResponseError as e: session_token = await self.client.client_connection.session.get_session_token_async( - 'dbs/' + self.created_db.id + '/colls/' + self.created_container.id, - None, - {}, - None, - None, - None) + "dbs/" + self.created_db.id + "/colls/" + self.created_container.id, None, {}, None, None, None + ) self.assertEqual(session_token, "") self.assertEqual(e.status_code, StatusCodes.NOT_FOUND) self.assertEqual(e.sub_status, SubStatusCodes.READ_SESSION_NOTAVAILABLE) @@ -283,17 +320,19 @@ async def test_clear_session_token_async(self): _retry_utility_async.ExecuteFunctionAsync = self.OriginalExecuteFunction async def _MockExecuteFunctionInvalidSessionTokenAsync(self, function, *args, **kwargs): - response = {'_self': 'dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/', 'id': '1'} - headers = {HttpHeaders.SessionToken: '0:2', - HttpHeaders.AlternateContentPath: 'dbs/testDatabase/colls/testCollection'} + response = {"_self": "dbs/90U1AA==/colls/90U1AJ4o6iA=/docs/90U1AJ4o6iABCT0AAAAABA==/", "id": "1"} + headers = { + HttpHeaders.SessionToken: "0:2", + HttpHeaders.AlternateContentPath: "dbs/testDatabase/colls/testCollection", + } return (response, headers) async def test_internal_server_error_raised_for_invalid_session_token_received_from_server_async(self): self.OriginalExecuteFunction = _retry_utility_async.ExecuteFunctionAsync _retry_utility_async.ExecuteFunctionAsync = self._MockExecuteFunctionInvalidSessionTokenAsync try: - await self.created_container.create_item(body={'id': '1' + str(uuid.uuid4()), 'pk': 'mypk'}) - self.fail('Test did not fail as expected') + await self.created_container.create_item(body={"id": "1" + str(uuid.uuid4()), "pk": "mypk"}) + self.fail("Test did not fail as expected") except exceptions.CosmosHttpResponseError as e: self.assertEqual(e.http_error_message, "Could not parse the received session token: 2") self.assertEqual(e.status_code, StatusCodes.INTERNAL_SERVER_ERROR) diff --git a/sdk/cosmos/azure-cosmos/tests/test_session_token_helpers.py b/sdk/cosmos/azure-cosmos/tests/test_session_token_helpers.py index d733c213e788..6924e6c35b6c 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_session_token_helpers.py +++ b/sdk/cosmos/azure-cosmos/tests/test_session_token_helpers.py @@ -14,75 +14,116 @@ COLLECTION = "created_collection" DATABASE = "created_db" + + @pytest.fixture(scope="class") def setup(): - if (TestSessionTokenHelpers.masterKey == '[YOUR_KEY_HERE]' or - TestSessionTokenHelpers.host == '[YOUR_ENDPOINT_HERE]'): + if TestSessionTokenHelpers.masterKey == "[YOUR_KEY_HERE]" or TestSessionTokenHelpers.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - test_client = cosmos_client.CosmosClient(TestSessionTokenHelpers.host, test_config.TestConfig.masterKey), + "tests." + ) + test_client = (cosmos_client.CosmosClient(TestSessionTokenHelpers.host, test_config.TestConfig.masterKey),) created_db = test_client[0].get_database_client(TestSessionTokenHelpers.TEST_DATABASE_ID) return { DATABASE: created_db, - COLLECTION: created_db.get_container_client(TestSessionTokenHelpers.TEST_COLLECTION_ID) + COLLECTION: created_db.get_container_client(TestSessionTokenHelpers.TEST_COLLECTION_ID), } + def create_split_ranges(): - return [ # split with two children - ([(("AA", "DD"), "0:1#51#3=52"), (("AA", "BB"),"1:1#55#3=52"), (("BB", "DD"),"2:1#54#3=52")], - ("AA", "DD"), "1:1#55#3=52,2:1#54#3=52"), - # same range different partition key range ids - ([(("AA", "DD"), "1:1#51#3=52"), (("AA", "DD"),"0:1#55#3=52")], - ("AA", "DD"), "0:1#55#3=52"), - # split with one child - ([(("AA", "DD"), "0:1#51#3=52"), (("AA", "BB"),"1:1#55#3=52")], - ("AA", "DD"), "0:1#51#3=52,1:1#55#3=52"), - # Highest GLSN, which is 55 in this # cspell:disable-line - # ex. "1:1#55#3=52", is the one that will be returned because - # it is higher than all of the other feed range contained in the same - # range - ([(("AA", "DD"), "0:1#42#3=52"), (("AA", "BB"), "1:1#51#3=52"), - (("BB", "CC"),"1:1#53#3=52"), (("CC", "DD"),"1:1#55#3=52")], - ("AA", "DD"), "1:1#55#3=52"), - # Highest GLSN, which is 60 in this # cspell:disable-line - # ex. "1:1#60#3=52", is the one that will be returned because - # it is higher than all of the other feed range contained in the same - # range with some of them overlapping with each other - ([(("AA", "DD"), "0:1#60#3=52"), (("AA", "BB"), "1:1#51#3=52"), - (("BB", "CC"),"1:1#53#3=52"), (("CC", "DD"),"1:1#55#3=52")], - ("AA", "DD"), "0:1#60#3=52"), - # AA-DD can be created from the other ranges - # but the GLSN's are not all larger than the one # cspell:disable-line - # in the AA-DD range so we just compound as cannot make - # conclusions in this case - ([(("AA", "DD"), "0:1#60#3=52"), (("AA", "BB"), "1:1#51#3=52"), - (("BB", "CC"),"1:1#66#3=52"), (("CC", "DD"),"1:1#55#3=52")], - ("AA", "DD"), "0:1#60#3=52,1:1#66#3=52"), - # merge with one child - ([(("AA", "DD"), "3:1#55#3=52"), (("AA", "BB"),"1:1#51#3=52")], - ("AA", "DD"), "3:1#55#3=52"), - # merge with two children - ([(("AA", "DD"), "3:1#55#3=52"), (("AA", "BB"),"1:1#51#3=52"), (("BB", "DD"),"2:1#54#3=52")], - ("AA", "DD"), "3:1#55#3=52"), - # compound session token - ([(("AA", "DD"), "2:1#54#3=52,1:1#55#3=52"), (("AA", "BB"),"0:1#51#3=52")], - ("AA", "BB"), "2:1#54#3=52,1:1#55#3=52,0:1#51#3=52"), - # several compound session token with one range - ([(("AA", "DD"), "2:1#57#3=52,1:1#57#3=52"), (("AA", "DD"),"2:1#56#3=52,1:1#58#3=52")], - ("AA", "DD"), "2:1#57#3=52,1:1#58#3=52"), - # overlapping ranges - ([(("AA", "CC"), "0:1#54#3=52"), (("BB", "FF"),"2:1#51#3=52")], - ("AA", "EE"), "0:1#54#3=52,2:1#51#3=52"), - # different version numbers - ([(("AA", "BB"), "0:1#54#3=52"), (("AA", "BB"),"0:2#57#3=53")], - ("AA", "BB"), "0:2#57#3=53"), - # mixed scenarios - ([(("AA", "DD"), "3:1#60#3=53"), (("AA", "BB"), "1:1#54#3=52"), (("AA", "BB"), "1:1#52#3=53"), - (("BB", "CC"),"1:1#53#3=52"), (("BB", "CC"),"6:1#70#3=55,4:1#90#3=52"), - (("CC", "DD"),"1:1#55#3=52")], ("AA", "DD"), "3:1#60#3=53,6:1#70#3=55,4:1#90#3=52") - ] + return [ # split with two children + ( + [(("AA", "DD"), "0:1#51#3=52"), (("AA", "BB"), "1:1#55#3=52"), (("BB", "DD"), "2:1#54#3=52")], + ("AA", "DD"), + "1:1#55#3=52,2:1#54#3=52", + ), + # same range different partition key range ids + ([(("AA", "DD"), "1:1#51#3=52"), (("AA", "DD"), "0:1#55#3=52")], ("AA", "DD"), "0:1#55#3=52"), + # split with one child + ([(("AA", "DD"), "0:1#51#3=52"), (("AA", "BB"), "1:1#55#3=52")], ("AA", "DD"), "0:1#51#3=52,1:1#55#3=52"), + # Highest GLSN, which is 55 in this # cspell:disable-line + # ex. "1:1#55#3=52", is the one that will be returned because + # it is higher than all of the other feed range contained in the same + # range + ( + [ + (("AA", "DD"), "0:1#42#3=52"), + (("AA", "BB"), "1:1#51#3=52"), + (("BB", "CC"), "1:1#53#3=52"), + (("CC", "DD"), "1:1#55#3=52"), + ], + ("AA", "DD"), + "1:1#55#3=52", + ), + # Highest GLSN, which is 60 in this # cspell:disable-line + # ex. "1:1#60#3=52", is the one that will be returned because + # it is higher than all of the other feed range contained in the same + # range with some of them overlapping with each other + ( + [ + (("AA", "DD"), "0:1#60#3=52"), + (("AA", "BB"), "1:1#51#3=52"), + (("BB", "CC"), "1:1#53#3=52"), + (("CC", "DD"), "1:1#55#3=52"), + ], + ("AA", "DD"), + "0:1#60#3=52", + ), + # AA-DD can be created from the other ranges + # but the GLSN's are not all larger than the one # cspell:disable-line + # in the AA-DD range so we just compound as cannot make + # conclusions in this case + ( + [ + (("AA", "DD"), "0:1#60#3=52"), + (("AA", "BB"), "1:1#51#3=52"), + (("BB", "CC"), "1:1#66#3=52"), + (("CC", "DD"), "1:1#55#3=52"), + ], + ("AA", "DD"), + "0:1#60#3=52,1:1#66#3=52", + ), + # merge with one child + ([(("AA", "DD"), "3:1#55#3=52"), (("AA", "BB"), "1:1#51#3=52")], ("AA", "DD"), "3:1#55#3=52"), + # merge with two children + ( + [(("AA", "DD"), "3:1#55#3=52"), (("AA", "BB"), "1:1#51#3=52"), (("BB", "DD"), "2:1#54#3=52")], + ("AA", "DD"), + "3:1#55#3=52", + ), + # compound session token + ( + [(("AA", "DD"), "2:1#54#3=52,1:1#55#3=52"), (("AA", "BB"), "0:1#51#3=52")], + ("AA", "BB"), + "2:1#54#3=52,1:1#55#3=52,0:1#51#3=52", + ), + # several compound session token with one range + ( + [(("AA", "DD"), "2:1#57#3=52,1:1#57#3=52"), (("AA", "DD"), "2:1#56#3=52,1:1#58#3=52")], + ("AA", "DD"), + "2:1#57#3=52,1:1#58#3=52", + ), + # overlapping ranges + ([(("AA", "CC"), "0:1#54#3=52"), (("BB", "FF"), "2:1#51#3=52")], ("AA", "EE"), "0:1#54#3=52,2:1#51#3=52"), + # different version numbers + ([(("AA", "BB"), "0:1#54#3=52"), (("AA", "BB"), "0:2#57#3=53")], ("AA", "BB"), "0:2#57#3=53"), + # mixed scenarios + ( + [ + (("AA", "DD"), "3:1#60#3=53"), + (("AA", "BB"), "1:1#54#3=52"), + (("AA", "BB"), "1:1#52#3=53"), + (("BB", "CC"), "1:1#53#3=52"), + (("BB", "CC"), "6:1#70#3=55,4:1#90#3=52"), + (("CC", "DD"), "1:1#55#3=52"), + ], + ("AA", "DD"), + "3:1#60#3=53,6:1#70#3=55,4:1#90#3=52", + ), + ] + @pytest.mark.cosmosEmulator @pytest.mark.unittest @@ -99,8 +140,7 @@ class TestSessionTokenHelpers: TEST_COLLECTION_ID = configs.TEST_SINGLE_PARTITION_CONTAINER_ID def test_get_session_token_update(self, setup): - feed_range = FeedRangeInternalEpk( - Range("AA", "BB", True, False)).to_dict() + feed_range = FeedRangeInternalEpk(Range("AA", "BB", True, False)).to_dict() session_token = "0:1#54#3=50" feed_ranges_and_session_tokens = [(feed_range, session_token)] session_token = "0:1#51#3=52" @@ -109,31 +149,28 @@ def test_get_session_token_update(self, setup): assert session_token == "0:1#54#3=52" def test_many_session_tokens_update_same_range(self, setup): - feed_range = FeedRangeInternalEpk( - Range("AA", "BB", True, False)).to_dict() + feed_range = FeedRangeInternalEpk(Range("AA", "BB", True, False)).to_dict() feed_ranges_and_session_tokens = [] for i in range(1000): session_token = "0:1#" + str(random.randint(1, 100)) + "#3=" + str(random.randint(1, 100)) feed_ranges_and_session_tokens.append((feed_range, session_token)) session_token = "0:1#101#3=101" feed_ranges_and_session_tokens.append((feed_range, session_token)) - updated_session_token = setup["created_collection"].get_latest_session_token(feed_ranges_and_session_tokens, - feed_range) + updated_session_token = setup["created_collection"].get_latest_session_token( + feed_ranges_and_session_tokens, feed_range + ) assert updated_session_token == session_token def test_many_session_tokens_update(self, setup): - feed_range = FeedRangeInternalEpk( - Range("AA", "BB", True, False)).to_dict() + feed_range = FeedRangeInternalEpk(Range("AA", "BB", True, False)).to_dict() feed_ranges_and_session_tokens = [] for i in range(1000): session_token = "0:1#" + str(random.randint(1, 100)) + "#3=" + str(random.randint(1, 100)) feed_ranges_and_session_tokens.append((feed_range, session_token)) # adding irrelevant feed ranges - feed_range1 = FeedRangeInternalEpk( - Range("CC", "FF", True, False)).to_dict() - feed_range2 = FeedRangeInternalEpk( - Range("00", "55", True, False)).to_dict() + feed_range1 = FeedRangeInternalEpk(Range("CC", "FF", True, False)).to_dict() + feed_range2 = FeedRangeInternalEpk(Range("00", "55", True, False)).to_dict() for i in range(1000): session_token = "0:1#" + str(random.randint(1, 100)) + "#3=" + str(random.randint(1, 100)) if i % 2 == 0: @@ -142,33 +179,33 @@ def test_many_session_tokens_update(self, setup): feed_ranges_and_session_tokens.append((feed_range2, session_token)) session_token = "0:1#101#3=101" feed_ranges_and_session_tokens.append((feed_range, session_token)) - updated_session_token = setup["created_collection"].get_latest_session_token(feed_ranges_and_session_tokens, - feed_range) + updated_session_token = setup["created_collection"].get_latest_session_token( + feed_ranges_and_session_tokens, feed_range + ) assert updated_session_token == session_token @pytest.mark.parametrize("split_ranges, target_feed_range, expected_session_token", create_split_ranges()) def test_simulated_splits_merges(self, setup, split_ranges, target_feed_range, expected_session_token): actual_split_ranges = [] for feed_range, session_token in split_ranges: - actual_split_ranges.append((FeedRangeInternalEpk(Range(feed_range[0], feed_range[1], - True, False)).to_dict(), session_token)) - target_feed_range = FeedRangeInternalEpk(Range(target_feed_range[0], target_feed_range[1][1], - True, False)).to_dict() + actual_split_ranges.append( + (FeedRangeInternalEpk(Range(feed_range[0], feed_range[1], True, False)).to_dict(), session_token) + ) + target_feed_range = FeedRangeInternalEpk( + Range(target_feed_range[0], target_feed_range[1][1], True, False) + ).to_dict() updated_session_token = setup[COLLECTION].get_latest_session_token(actual_split_ranges, target_feed_range) assert updated_session_token == expected_session_token def test_invalid_feed_range(self, setup): - feed_range = FeedRangeInternalEpk( - Range("AA", "BB", True, False)).to_dict() + feed_range = FeedRangeInternalEpk(Range("AA", "BB", True, False)).to_dict() session_token = "0:1#54#3=50" feed_ranges_and_session_tokens = [(feed_range, session_token)] - with pytest.raises(ValueError, match='There were no overlapping feed ranges with the target.'): - setup["created_collection"].get_latest_session_token(feed_ranges_and_session_tokens, - FeedRangeInternalEpk(Range( - "CC", - "FF", - True, - False)).to_dict()) - -if __name__ == '__main__': + with pytest.raises(ValueError, match="There were no overlapping feed ranges with the target."): + setup["created_collection"].get_latest_session_token( + feed_ranges_and_session_tokens, FeedRangeInternalEpk(Range("CC", "FF", True, False)).to_dict() + ) + + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_session_token_unit.py b/sdk/cosmos/azure-cosmos/tests/test_session_token_unit.py index 31f70fca2c31..473006f0984a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_session_token_unit.py +++ b/sdk/cosmos/azure-cosmos/tests/test_session_token_unit.py @@ -80,8 +80,7 @@ def _different_merge_scenarios(self): self.assertIsNotNone(session_token1) self.assertIsNotNone(session_token2) - self.assertTrue(session_token1.merge(session_token2).equals( - VectorSessionToken.create("1#197#1=20#2=5"))) + self.assertTrue(session_token1.merge(session_token2).equals(VectorSessionToken.create("1#197#1=20#2=5"))) # same vector clock version with global lsn increase and local lsn increase session_token1 = VectorSessionToken.create("1#100#1=20#2=5") @@ -89,8 +88,7 @@ def _different_merge_scenarios(self): self.assertIsNotNone(session_token1) self.assertIsNotNone(session_token2) - self.assertTrue(session_token1.merge(session_token2).equals( - VectorSessionToken.create("1#197#1=23#2=15"))) + self.assertTrue(session_token1.merge(session_token2).equals(VectorSessionToken.create("1#197#1=23#2=15"))) # different number of regions with same region should throw error session_token1 = VectorSessionToken.create("1#101#1=20#2=5#3=30") @@ -101,9 +99,11 @@ def _different_merge_scenarios(self): session_token1.merge(session_token2) self.fail("Region progress can not be different when version is same") except CosmosHttpResponseError as e: - self.assertEqual(str(e), - "Status code: 500\nCompared session tokens '1#101#1=20#2=5#3=30' " - "and '1#100#1=20#2=5#3=30#4=40' have unexpected regions.") + self.assertEqual( + str(e), + "Status code: 500\nCompared session tokens '1#101#1=20#2=5#3=30' " + "and '1#100#1=20#2=5#3=30#4=40' have unexpected regions.", + ) # same version with different region progress should throw error session_token1 = VectorSessionToken.create("1#101#1=20#2=5#3=30") @@ -115,9 +115,11 @@ def _different_merge_scenarios(self): session_token1.merge(session_token2) self.fail("Region progress can not be different when version is same") except CosmosHttpResponseError as e: - self.assertEqual(str(e), - "Status code: 500\nCompared session tokens '1#101#1=20#2=5#3=30' " - "and '1#100#4=20#2=5#3=30' have unexpected regions.") + self.assertEqual( + str(e), + "Status code: 500\nCompared session tokens '1#101#1=20#2=5#3=30' " + "and '1#100#4=20#2=5#3=30' have unexpected regions.", + ) def test_validate_session_token_comparison(self): self._different_merge_scenarios() @@ -141,8 +143,7 @@ def validate_different_session_token_false_progress_merge_scenarios(self, false_ expected_session_token = "2#100#1=20#2=8#3=30" else: expected_session_token = "2#200#1=20#2=8#3=30" - self.assertTrue(session_token1.merge(session_token2).equals( - VectorSessionToken.create(expected_session_token))) + self.assertTrue(session_token1.merge(session_token2).equals(VectorSessionToken.create(expected_session_token))) # vector clock version increase with removed region progress should merge session_token1 = VectorSessionToken.create("1#200#1=20#2=5#3=30") @@ -154,8 +155,7 @@ def validate_different_session_token_false_progress_merge_scenarios(self, false_ expected_session_token = "2#100#1=20#2=5" else: expected_session_token = "2#200#1=20#2=5" - self.assertTrue(session_token1.merge(session_token2).equals( - VectorSessionToken.create(expected_session_token))) + self.assertTrue(session_token1.merge(session_token2).equals(VectorSessionToken.create(expected_session_token))) # vector clock version increase with new region progress should merge session_token1 = VectorSessionToken.create("1#200#1=20#2=5") @@ -166,8 +166,8 @@ def validate_different_session_token_false_progress_merge_scenarios(self, false_ expected_session_token = "2#100#1=20#2=5#3=30" else: expected_session_token = "2#200#1=20#2=5#3=30" - self.assertTrue(session_token1.merge(session_token2).equals( - VectorSessionToken.create(expected_session_token))) + self.assertTrue(session_token1.merge(session_token2).equals(VectorSessionToken.create(expected_session_token))) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_streaming_failover.py b/sdk/cosmos/azure-cosmos/tests/test_streaming_failover.py index bb2a986e6471..2b684edfcf04 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_streaming_failover.py +++ b/sdk/cosmos/azure-cosmos/tests/test_streaming_failover.py @@ -43,26 +43,32 @@ def test_streaming_fail_over(self): connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True - client = cosmos_client.CosmosClient(self.DEFAULT_ENDPOINT, self.MASTER_KEY, - consistency_level=documents.ConsistencyLevel.Eventual, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + self.DEFAULT_ENDPOINT, + self.MASTER_KEY, + consistency_level=documents.ConsistencyLevel.Eventual, + connection_policy=connection_policy, + ) self.original_get_database_account = client.client_connection.GetDatabaseAccount - self.original_get_read_endpoints = (client.client_connection._global_endpoint_manager.location_cache - .get_read_regional_routing_contexts()) - self.original_get_write_endpoints = (client.client_connection._global_endpoint_manager.location_cache - .get_write_regional_routing_contexts()) + self.original_get_read_endpoints = ( + client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_contexts() + ) + self.original_get_write_endpoints = ( + client.client_connection._global_endpoint_manager.location_cache.get_write_regional_routing_contexts() + ) client.client_connection.GetDatabaseAccount = self.mock_get_database_account client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_contexts = ( - self.mock_get_read_endpoints) + self.mock_get_read_endpoints + ) client.client_connection._global_endpoint_manager.location_cache.get_write_regional_routing_contexts = ( - self.mock_get_write_endpoints) + self.mock_get_write_endpoints + ) created_db = client.create_database_if_not_exists("streaming-db" + str(uuid.uuid4())) - created_container = created_db.create_container("streaming-container" + str(uuid.uuid4()), - PartitionKey(path="/id")) + created_container = created_db.create_container( + "streaming-container" + str(uuid.uuid4()), PartitionKey(path="/id") + ) - document_definition = {'id': 'doc', - 'name': 'sample document', - 'key': 'value'} + document_definition = {"id": "doc", "name": "sample document", "key": "value"} created_document = created_container.create_item(document_definition) @@ -83,33 +89,35 @@ def test_streaming_fail_over(self): cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account _retry_utility.ExecuteFunction = self.OriginalExecuteFunction client.client_connection._global_endpoint_manager.location_cache.get_read_regional_routing_contexts = ( - self.original_get_read_endpoints) + self.original_get_read_endpoints + ) client.client_connection._global_endpoint_manager.location_cache.get_write_regional_routing_contexts = ( - self.original_get_write_endpoints) + self.original_get_write_endpoints + ) def mock_get_database_account(self, url_connection=None): database_account = documents.DatabaseAccount() database_account._EnableMultipleWritableLocations = True database_account._WritableLocations = [ - {'name': self.WRITE_ENDPOINT_NAME1, 'databaseAccountEndpoint': self.WRITE_ENDPOINT1}, - {'name': self.WRITE_ENDPOINT_NAME2, 'databaseAccountEndpoint': self.WRITE_ENDPOINT2} + {"name": self.WRITE_ENDPOINT_NAME1, "databaseAccountEndpoint": self.WRITE_ENDPOINT1}, + {"name": self.WRITE_ENDPOINT_NAME2, "databaseAccountEndpoint": self.WRITE_ENDPOINT2}, ] database_account._ReadableLocations = [ - {'name': self.READ_ENDPOINT_NAME1, 'databaseAccountEndpoint': self.READ_ENDPOINT1}, - {'name': self.READ_ENDPOINT_NAME2, 'databaseAccountEndpoint': self.READ_ENDPOINT2} + {"name": self.READ_ENDPOINT_NAME1, "databaseAccountEndpoint": self.READ_ENDPOINT1}, + {"name": self.READ_ENDPOINT_NAME2, "databaseAccountEndpoint": self.READ_ENDPOINT2}, ] return database_account def mock_get_read_endpoints(self): return [ - {'name': self.READ_ENDPOINT_NAME1, 'databaseAccountEndpoint': self.READ_ENDPOINT1}, - {'name': self.READ_ENDPOINT_NAME2, 'databaseAccountEndpoint': self.READ_ENDPOINT2} + {"name": self.READ_ENDPOINT_NAME1, "databaseAccountEndpoint": self.READ_ENDPOINT1}, + {"name": self.READ_ENDPOINT_NAME2, "databaseAccountEndpoint": self.READ_ENDPOINT2}, ] def mock_get_write_endpoints(self): return [ - {'name': self.WRITE_ENDPOINT_NAME1, 'databaseAccountEndpoint': self.WRITE_ENDPOINT1}, - {'name': self.WRITE_ENDPOINT_NAME2, 'databaseAccountEndpoint': self.WRITE_ENDPOINT2} + {"name": self.WRITE_ENDPOINT_NAME1, "databaseAccountEndpoint": self.WRITE_ENDPOINT1}, + {"name": self.WRITE_ENDPOINT_NAME2, "databaseAccountEndpoint": self.WRITE_ENDPOINT2}, ] def _MockExecuteFunctionEndpointDiscover(self, function, *args, **kwargs): @@ -120,9 +128,8 @@ def _MockExecuteFunctionEndpointDiscover(self, function, *args, **kwargs): self.endpoint_sequence.append(args[1].location_endpoint_to_route) response = test_config.FakeResponse({HttpHeaders.SubStatus: SubStatusCodes.WRITE_FORBIDDEN}) raise exceptions.CosmosHttpResponseError( - status_code=StatusCodes.FORBIDDEN, - message="Request is not permitted in this region", - response=response) + status_code=StatusCodes.FORBIDDEN, message="Request is not permitted in this region", response=response + ) def test_retry_policy_does_not_mark_null_locations_unavailable(self): self.OriginalExecuteFunction = _retry_utility.ExecuteFunction @@ -131,9 +138,12 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): connection_policy.PreferredLocations = self.preferred_regional_endpoints connection_policy.DisableSSLVerification = True - client = cosmos_client.CosmosClient(self.DEFAULT_ENDPOINT, self.MASTER_KEY, - consistency_level=documents.ConsistencyLevel.Eventual, - connection_policy=connection_policy) + client = cosmos_client.CosmosClient( + self.DEFAULT_ENDPOINT, + self.MASTER_KEY, + consistency_level=documents.ConsistencyLevel.Eventual, + connection_policy=connection_policy, + ) self.original_get_database_account = client.client_connection.GetDatabaseAccount client.client_connection.GetDatabaseAccount = self.mock_get_database_account @@ -141,22 +151,26 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): self.original_mark_endpoint_unavailable_for_read_function = endpoint_manager.mark_endpoint_unavailable_for_read endpoint_manager.mark_endpoint_unavailable_for_read = self._mock_mark_endpoint_unavailable_for_read - self.original_mark_endpoint_unavailable_for_write_function = endpoint_manager.mark_endpoint_unavailable_for_write + self.original_mark_endpoint_unavailable_for_write_function = ( + endpoint_manager.mark_endpoint_unavailable_for_write + ) endpoint_manager.mark_endpoint_unavailable_for_write = self._mock_mark_endpoint_unavailable_for_write self.original_resolve_service_endpoint = endpoint_manager.resolve_service_endpoint_for_partition endpoint_manager.resolve_service_endpoint_for_partition = self._mock_resolve_service_endpoint # Read and write counters count the number of times the endpoint manager's - # mark_endpoint_unavailable_for_read() and mark_endpoint_unavailable_for_read() + # mark_endpoint_unavailable_for_read() and mark_endpoint_unavailable_for_read() # functions were called. When a 'None' location is returned by resolve_service_endpoint(), # these functions should not be called self._read_counter = 0 self._write_counter = 0 request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Read) endpoint_discovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy( - documents.ConnectionPolicy(), endpoint_manager, request) - endpoint_discovery_retry_policy.ShouldRetry(exceptions.CosmosHttpResponseError( - status_code=http_constants.StatusCodes.FORBIDDEN)) + documents.ConnectionPolicy(), endpoint_manager, request + ) + endpoint_discovery_retry_policy.ShouldRetry( + exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.FORBIDDEN) + ) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) @@ -164,16 +178,18 @@ def test_retry_policy_does_not_mark_null_locations_unavailable(self): self._write_counter = 0 request = RequestObject(http_constants.ResourceType.Document, documents._OperationType.Create) endpoint_discovery_retry_policy = _endpoint_discovery_retry_policy.EndpointDiscoveryRetryPolicy( - documents.ConnectionPolicy(), endpoint_manager, request) - endpoint_discovery_retry_policy.ShouldRetry(exceptions.CosmosHttpResponseError( - status_code=http_constants.StatusCodes.FORBIDDEN)) + documents.ConnectionPolicy(), endpoint_manager, request + ) + endpoint_discovery_retry_policy.ShouldRetry( + exceptions.CosmosHttpResponseError(status_code=http_constants.StatusCodes.FORBIDDEN) + ) self.assertEqual(self._read_counter, 0) self.assertEqual(self._write_counter, 0) - endpoint_manager.mark_endpoint_unavailable_for_read = (self - .original_mark_endpoint_unavailable_for_read_function) - endpoint_manager.mark_endpoint_unavailable_for_write = (self. - original_mark_endpoint_unavailable_for_write_function) + endpoint_manager.mark_endpoint_unavailable_for_read = self.original_mark_endpoint_unavailable_for_read_function + endpoint_manager.mark_endpoint_unavailable_for_write = ( + self.original_mark_endpoint_unavailable_for_write_function + ) cosmos_client_connection.CosmosClientConnection.GetDatabaseAccount = self.original_get_database_account def _mock_mark_endpoint_unavailable_for_read(self, endpoint): @@ -189,5 +205,5 @@ def _mock_resolve_service_endpoint(request): return None -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy.py b/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy.py index 585f58a85978..1516427e0701 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy.py @@ -14,29 +14,32 @@ from azure.cosmos._request_object import RequestObject COLLECTION = "created_collection" + + @pytest.fixture(scope="class") def setup(): - if (TestTimeoutRetryPolicy.masterKey == '[YOUR_KEY_HERE]' or - TestTimeoutRetryPolicy.host == '[YOUR_ENDPOINT_HERE]'): + if TestTimeoutRetryPolicy.masterKey == "[YOUR_KEY_HERE]" or TestTimeoutRetryPolicy.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") - - client = cosmos_client.CosmosClient(TestTimeoutRetryPolicy.host, TestTimeoutRetryPolicy.masterKey, consistency_level="Session", - connection_policy=TestTimeoutRetryPolicy.connectionPolicy) + "tests." + ) + + client = cosmos_client.CosmosClient( + TestTimeoutRetryPolicy.host, + TestTimeoutRetryPolicy.masterKey, + consistency_level="Session", + connection_policy=TestTimeoutRetryPolicy.connectionPolicy, + ) created_database = client.get_database_client(TestTimeoutRetryPolicy.TEST_DATABASE_ID) - created_collection = created_database.create_container(TestTimeoutRetryPolicy.TEST_CONTAINER_SINGLE_PARTITION_ID, - partition_key=PartitionKey("/pk")) - yield { - COLLECTION: created_collection - } + created_collection = created_database.create_container( + TestTimeoutRetryPolicy.TEST_CONTAINER_SINGLE_PARTITION_ID, partition_key=PartitionKey("/pk") + ) + yield {COLLECTION: created_collection} created_database.delete_container(TestTimeoutRetryPolicy.TEST_CONTAINER_SINGLE_PARTITION_ID) - - def error_codes(): return [408, 500, 502, 503] @@ -53,10 +56,12 @@ class TestTimeoutRetryPolicy: @pytest.mark.parametrize("error_code", error_codes()) def test_timeout_failover_retry_policy_for_read_success(self, setup, error_code): - document_definition = {'id': 'failoverDoc-' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc-" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } created_document = setup[COLLECTION].create_item(body=document_definition) self.original_execute_function = _retry_utility.ExecuteFunction @@ -64,28 +69,35 @@ def test_timeout_failover_retry_policy_for_read_success(self, setup, error_code) # should retry once and then succeed mf = self.MockExecuteFunction(self.original_execute_function, 1, error_code) _retry_utility.ExecuteFunction = mf - doc = setup[COLLECTION].read_item(item=created_document['id'], - partition_key=created_document['pk']) + doc = setup[COLLECTION].read_item(item=created_document["id"], partition_key=created_document["pk"]) assert doc == created_document finally: _retry_utility.ExecuteFunction = self.original_execute_function @pytest.mark.parametrize("error_code", error_codes()) def test_timeout_failover_retry_policy_for_read_failure(self, setup, error_code): - document_definition = {'id': 'failoverDoc-' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc-" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } created_document = setup[COLLECTION].create_item(body=document_definition) self.original_execute_function = _retry_utility.ExecuteFunction - num_exceptions = max(2, len(setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts)) + num_exceptions = max( + 2, + len( + setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + ), + ) try: # should retry and then fail mf = self.MockExecuteFunction(self.original_execute_function, num_exceptions, error_code) _retry_utility.ExecuteFunction = mf - setup[COLLECTION].read_item(item=created_document['id'], - partition_key=created_document['pk']) + setup[COLLECTION].read_item(item=created_document["id"], partition_key=created_document["pk"]) pytest.fail("Exception was not raised.") except exceptions.CosmosHttpResponseError as err: assert err.status_code == error_code @@ -94,13 +106,22 @@ def test_timeout_failover_retry_policy_for_read_failure(self, setup, error_code) @pytest.mark.parametrize("error_code", error_codes()) def test_timeout_failover_retry_policy_for_write_failure(self, setup, error_code): - document_definition = {'id': 'failoverDoc' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } self.original_execute_function = _retry_utility.ExecuteFunction - num_exceptions_503 = max(2, len(setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.write_regional_routing_contexts)) + num_exceptions_503 = max( + 2, + len( + setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.write_regional_routing_contexts + ), + ) try: # timeouts should fail immediately for writes - except for 503s, which should retry on every preferred location num_exceptions = num_exceptions_503 if error_code == 503 else 0 @@ -119,10 +140,12 @@ def test_cross_region_retry(self, setup, error_code): mock_client = cosmos_client.CosmosClient(self.host, self.masterKey) db = mock_client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID) - document_definition = {'id': 'failoverDoc' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } created_document = container.create_item(body=document_definition) self.original_execute_function = _retry_utility.ExecuteFunction @@ -133,16 +156,16 @@ def test_cross_region_retry(self, setup, error_code): regional_routing_context = RegionalRoutingContext(self.host) regional_routing_context_2 = RegionalRoutingContext(fake_endpoint) original_location_cache.account_read_locations = [region_1, region_2] - original_location_cache.account_read_regional_routing_contexts_by_location = {region_1: regional_routing_context, - region_2: regional_routing_context_2 - } + original_location_cache.account_read_regional_routing_contexts_by_location = { + region_1: regional_routing_context, + region_2: regional_routing_context_2, + } original_location_cache.read_regional_routing_contexts = [regional_routing_context, regional_routing_context_2] try: # should retry once and then succeed mf = self.MockExecuteFunctionCrossRegion(self.original_execute_function, error_code, fake_endpoint) _retry_utility.ExecuteFunction = mf - container.read_item(item=created_document['id'], - partition_key=created_document['pk']) + container.read_item(item=created_document["id"], partition_key=created_document["pk"]) finally: _retry_utility.ExecuteFunction = self.original_execute_function @@ -156,8 +179,12 @@ def __init__(self, org_func, num_exceptions, status_code): def __call__(self, func, *args, **kwargs): if args and isinstance(args[1], RequestObject): request_obj = args[1] - if request_obj.resource_type == "docs" and request_obj.operation_type == "Query" or \ - request_obj.resource_type == "pkranges" and request_obj.operation_type == "ReadFeed": + if ( + request_obj.resource_type == "docs" + and request_obj.operation_type == "Query" + or request_obj.resource_type == "pkranges" + and request_obj.operation_type == "ReadFeed" + ): # Ignore query or ReadFeed requests return self.org_func(func, *args, **kwargs) if self.counter != 0 and self.counter >= self.num_exceptions: @@ -165,9 +192,8 @@ def __call__(self, func, *args, **kwargs): else: self.counter += 1 raise exceptions.CosmosHttpResponseError( - status_code=self.status_code, - message="Some Exception", - response=test_config.FakeResponse({})) + status_code=self.status_code, message="Some Exception", response=test_config.FakeResponse({}) + ) return self.org_func(func, *args, **kwargs) class MockExecuteFunctionCrossRegion(object): @@ -180,8 +206,12 @@ def __init__(self, org_func, status_code, location_endpoint_to_route): def __call__(self, func, *args, **kwargs): if args and isinstance(args[1], RequestObject): request_obj = args[1] - if request_obj.resource_type == "docs" and request_obj.operation_type == "Query" or \ - request_obj.resource_type == "pkranges" and request_obj.operation_type == "ReadFeed": + if ( + request_obj.resource_type == "docs" + and request_obj.operation_type == "Query" + or request_obj.resource_type == "pkranges" + and request_obj.operation_type == "ReadFeed" + ): # Ignore query or ReadFeed requests return self.org_func(func, *args, **kwargs) if self.counter == 1: @@ -191,12 +221,10 @@ def __call__(self, func, *args, **kwargs): else: self.counter += 1 raise exceptions.CosmosHttpResponseError( - status_code=self.status_code, - message="Some Exception", - response=test_config.FakeResponse({})) + status_code=self.status_code, message="Some Exception", response=test_config.FakeResponse({}) + ) return self.org_func(func, *args, **kwargs) - -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy_async.py b/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy_async.py index e21ed080b913..4469698b32d7 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_timeout_and_failover_retry_policy_async.py @@ -14,29 +14,33 @@ from azure.cosmos.aio import CosmosClient, _retry_utility_async COLLECTION = "created_collection" + + @pytest_asyncio.fixture() async def setup(): - if (TestTimeoutRetryPolicyAsync.masterKey == '[YOUR_KEY_HERE]' or - TestTimeoutRetryPolicyAsync.host == '[YOUR_ENDPOINT_HERE]'): + if ( + TestTimeoutRetryPolicyAsync.masterKey == "[YOUR_KEY_HERE]" + or TestTimeoutRetryPolicyAsync.host == "[YOUR_ENDPOINT_HERE]" + ): raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) - client = CosmosClient(TestTimeoutRetryPolicyAsync.host, TestTimeoutRetryPolicyAsync.masterKey, consistency_level="Session") + client = CosmosClient( + TestTimeoutRetryPolicyAsync.host, TestTimeoutRetryPolicyAsync.masterKey, consistency_level="Session" + ) created_database = client.get_database_client(TestTimeoutRetryPolicyAsync.TEST_DATABASE_ID) - created_collection = await created_database.create_container(TestTimeoutRetryPolicyAsync.TEST_CONTAINER_SINGLE_PARTITION_ID, - partition_key=PartitionKey("/pk")) - yield { - COLLECTION: created_collection - } + created_collection = await created_database.create_container( + TestTimeoutRetryPolicyAsync.TEST_CONTAINER_SINGLE_PARTITION_ID, partition_key=PartitionKey("/pk") + ) + yield {COLLECTION: created_collection} await created_database.delete_container(TestTimeoutRetryPolicyAsync.TEST_CONTAINER_SINGLE_PARTITION_ID) await client.close() - - def error_codes(): return [408, 500, 502, 503] @@ -53,10 +57,12 @@ class TestTimeoutRetryPolicyAsync: @pytest.mark.parametrize("error_code", error_codes()) async def test_timeout_failover_retry_policy_for_read_success_async(self, setup, error_code): - document_definition = {'id': 'failoverDoc-' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc-" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } created_document = await setup[COLLECTION].create_item(body=document_definition) self.original_execute_function = _retry_utility_async.ExecuteFunctionAsync @@ -64,28 +70,35 @@ async def test_timeout_failover_retry_policy_for_read_success_async(self, setup, # should retry once and then succeed mf = self.MockExecuteFunction(self.original_execute_function, 1, error_code) _retry_utility_async.ExecuteFunctionAsync = mf - doc = await setup[COLLECTION].read_item(item=created_document['id'], - partition_key=created_document['pk']) + doc = await setup[COLLECTION].read_item(item=created_document["id"], partition_key=created_document["pk"]) assert doc == created_document finally: _retry_utility_async.ExecuteFunctionAsync = self.original_execute_function @pytest.mark.parametrize("error_code", error_codes()) async def test_timeout_failover_retry_policy_for_read_failure_async(self, setup, error_code): - document_definition = {'id': 'failoverDoc-' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc-" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } created_document = await setup[COLLECTION].create_item(body=document_definition) self.original_execute_function = _retry_utility_async.ExecuteFunctionAsync - num_exceptions = max(2, len(setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts)) + num_exceptions = max( + 2, + len( + setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.read_regional_routing_contexts + ), + ) try: # should retry and then succeed mf = self.MockExecuteFunction(self.original_execute_function, num_exceptions, error_code) _retry_utility_async.ExecuteFunctionAsync = mf - await setup[COLLECTION].read_item(item=created_document['id'], - partition_key=created_document['pk']) + await setup[COLLECTION].read_item(item=created_document["id"], partition_key=created_document["pk"]) pytest.fail("Exception was not raised.") except exceptions.CosmosHttpResponseError as err: assert err.status_code == error_code @@ -97,10 +110,12 @@ async def test_cross_region_retry_async(self, setup, error_code): mock_client = CosmosClient(self.host, self.masterKey) db = mock_client.get_database_client(self.TEST_DATABASE_ID) container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID) - document_definition = {'id': 'failoverDoc' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } created_document = await container.create_item(body=document_definition) self.original_execute_function = _retry_utility_async.ExecuteFunctionAsync @@ -111,28 +126,38 @@ async def test_cross_region_retry_async(self, setup, error_code): region_1 = "East US" region_2 = "West US" original_location_cache.account_read_locations = [region_1, region_2] - original_location_cache.account_read_regional_routing_contexts_by_location = {region_1: regional_routing_context, - region_2: regional_routing_context_2 - } + original_location_cache.account_read_regional_routing_contexts_by_location = { + region_1: regional_routing_context, + region_2: regional_routing_context_2, + } original_location_cache.read_regional_routing_contexts = [regional_routing_context, regional_routing_context_2] try: # should retry once and then succeed mf = self.MockExecuteFunctionCrossRegion(self.original_execute_function, error_code, fake_endpoint) _retry_utility_async.ExecuteFunctionAsync = mf - await container.read_item(item=created_document['id'], partition_key=created_document['pk']) + await container.read_item(item=created_document["id"], partition_key=created_document["pk"]) finally: _retry_utility_async.ExecuteFunctionAsync = self.original_execute_function await mock_client.close() @pytest.mark.parametrize("error_code", error_codes()) async def test_timeout_failover_retry_policy_for_write_failure_async(self, setup, error_code): - document_definition = {'id': 'failoverDoc' + str(uuid.uuid4()), - 'pk': 'pk', - 'name': 'sample document', - 'key': 'value'} + document_definition = { + "id": "failoverDoc" + str(uuid.uuid4()), + "pk": "pk", + "name": "sample document", + "key": "value", + } self.original_execute_function = _retry_utility_async.ExecuteFunctionAsync - num_exceptions_503 = max(2, len(setup[COLLECTION].client_connection._global_endpoint_manager.location_cache.write_regional_routing_contexts)) + num_exceptions_503 = max( + 2, + len( + setup[ + COLLECTION + ].client_connection._global_endpoint_manager.location_cache.write_regional_routing_contexts + ), + ) try: # timeouts should fail immediately for writes - except for 503s, which should retry on every preferred location num_exceptions = num_exceptions_503 if error_code == 503 else 0 @@ -159,9 +184,8 @@ async def __call__(self, func, global_endpoint_manager, *args, **kwargs): else: self.counter += 1 raise exceptions.CosmosHttpResponseError( - status_code=self.status_code, - message="Some Exception", - response=test_config.FakeResponse({})) + status_code=self.status_code, message="Some Exception", response=test_config.FakeResponse({}) + ) class MockExecuteFunctionCrossRegion(object): def __init__(self, org_func, status_code, location_endpoint_to_route): @@ -178,11 +202,9 @@ async def __call__(self, func, *args, **kwargs): else: self.counter += 1 raise exceptions.CosmosHttpResponseError( - status_code=self.status_code, - message="Some Exception", - response=test_config.FakeResponse({})) - + status_code=self.status_code, message="Some Exception", response=test_config.FakeResponse({}) + ) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_transactional_batch.py b/sdk/cosmos/azure-cosmos/tests/test_transactional_batch.py index 33bdbcd7a5f6..85070ee5c13a 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_transactional_batch.py +++ b/sdk/cosmos/azure-cosmos/tests/test_transactional_batch.py @@ -12,17 +12,12 @@ def get_subpartition_item(item_id): - return {'id': item_id, - 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'} + return {"id": item_id, "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"} @pytest.mark.cosmosEmulator class TestTransactionalBatch(unittest.TestCase): - """Python Transactional Batch Tests. - """ + """Python Transactional Batch Tests.""" configs = test_config.TestConfig host = configs.host @@ -33,18 +28,19 @@ class TestTransactionalBatch(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.test_database = cls.client.get_database_client(cls.TEST_DATABASE_ID) def test_invalid_batch_sizes(self): - container = self.test_database.create_container(id="invalid_batch_size" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="invalid_batch_size" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) # empty batch try: @@ -82,8 +78,9 @@ def test_invalid_batch_sizes(self): self.test_database.delete_container(container.id) def test_batch_create(self): - container = self.test_database.create_container(id="batch_create" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="batch_create" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) batch = [] for i in range(100): batch.append(("create", ({"id": "item" + str(i), "company": "Microsoft"},))) @@ -93,8 +90,10 @@ def test_batch_create(self): # create the same item twice item_id = str(uuid.uuid4()) - batch = [("create", ({"id": item_id, "company": "Microsoft"},)), - ("create", ({"id": item_id, "company": "Microsoft"},))] + batch = [ + ("create", ({"id": item_id, "company": "Microsoft"},)), + ("create", ({"id": item_id, "company": "Microsoft"},)), + ] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -108,8 +107,10 @@ def test_batch_create(self): assert operation_results[1].get("statusCode") == StatusCodes.CONFLICT # create an item without the right partition key. - batch = [("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), - ("create", ({"id": str(uuid.uuid4()), "company": "Not-Microsoft"},))] + batch = [ + ("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), + ("create", ({"id": str(uuid.uuid4()), "company": "Not-Microsoft"},)), + ] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -123,8 +124,10 @@ def test_batch_create(self): assert operation_results[1].get("statusCode") == StatusCodes.BAD_REQUEST # create an item without a partition key - batch = [("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), - ("create", ({"id": str(uuid.uuid4()), "name": "Simon"},))] + batch = [ + ("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), + ("create", ({"id": str(uuid.uuid4()), "name": "Simon"},)), + ] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -140,8 +143,9 @@ def test_batch_create(self): self.test_database.delete_container(container.id) def test_batch_read(self): - container = self.test_database.create_container(id="batch_read" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="batch_read" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) batch = [] for i in range(100): container.create_item({"id": "item" + str(i), "company": "Microsoft"}) @@ -153,8 +157,7 @@ def test_batch_read(self): assert result.get("statusCode") == 200 # read non-existent item - batch = [("read", (str(uuid.uuid4()),)), - ("read", (str(uuid.uuid4()),))] + batch = [("read", (str(uuid.uuid4()),)), ("read", (str(uuid.uuid4()),))] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -170,10 +173,13 @@ def test_batch_read(self): self.test_database.delete_container(container.id) def test_batch_replace(self): - container = self.test_database.create_container(id="batch_replace" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) - batch = [("create", ({"id": "new-item", "company": "Microsoft"},)), - ("replace", ("new-item", {"id": "new-item", "company": "Microsoft", "message": "item was replaced"}))] + container = self.test_database.create_container( + id="batch_replace" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) + batch = [ + ("create", ({"id": "new-item", "company": "Microsoft"},)), + ("replace", ("new-item", {"id": "new-item", "company": "Microsoft", "message": "item was replaced"})), + ] batch_response = container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 2 @@ -194,11 +200,19 @@ def test_batch_replace(self): # replace with wrong etag item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, "company": "Microsoft"},)), - ("replace", (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), - {"if_match_etag": "some-tag"}), - ("replace", (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), - {"if_none_match_etag": "some-tag"})] + batch = [ + ("upsert", ({"id": item_id, "company": "Microsoft"},)), + ( + "replace", + (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), + {"if_match_etag": "some-tag"}, + ), + ( + "replace", + (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), + {"if_none_match_etag": "some-tag"}, + ), + ] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -215,12 +229,15 @@ def test_batch_replace(self): self.test_database.delete_container(container.id) def test_batch_upsert(self): - container = self.test_database.create_container(id="batch_upsert" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="batch_upsert" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, "company": "Microsoft"},)), - ("upsert", ({"id": item_id, "company": "Microsoft", "message": "item was upsert"},)), - ("upsert", ({"id": str(uuid.uuid4()), "company": "Microsoft"},))] + batch = [ + ("upsert", ({"id": item_id, "company": "Microsoft"},)), + ("upsert", ({"id": item_id, "company": "Microsoft", "message": "item was upsert"},)), + ("upsert", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), + ] batch_response = container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 3 @@ -229,23 +246,40 @@ def test_batch_upsert(self): self.test_database.delete_container(container.id) def test_batch_patch(self): - container = self.test_database.create_container(id="batch_patch" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="batch_patch" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, - "company": "Microsoft", - "city": "Seattle", - "port": 9000, - "remove_path": True, - "move_path": "yes", - "set_path": 1},)), - ("patch", (item_id, [ - {"op": "add", "path": "/favorite_color", "value": "red"}, - {"op": "remove", "path": "/remove_path"}, - {"op": "replace", "path": "/city", "value": "Redmond"}, - {"op": "set", "path": "/set_path", "value": 0}, - {"op": "incr", "path": "/port", "value": 5}, - {"op": "move", "from": "/move_path", "path": "/moved_path"}]))] + batch = [ + ( + "upsert", + ( + { + "id": item_id, + "company": "Microsoft", + "city": "Seattle", + "port": 9000, + "remove_path": True, + "move_path": "yes", + "set_path": 1, + }, + ), + ), + ( + "patch", + ( + item_id, + [ + {"op": "add", "path": "/favorite_color", "value": "red"}, + {"op": "remove", "path": "/remove_path"}, + {"op": "replace", "path": "/city", "value": "Redmond"}, + {"op": "set", "path": "/set_path", "value": 0}, + {"op": "incr", "path": "/port", "value": 5}, + {"op": "move", "from": "/move_path", "path": "/moved_path"}, + ], + ), + ), + ] batch_response = container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 2 @@ -259,15 +293,27 @@ def test_batch_patch(self): # conditional patching incorrect filter item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, - "company": "Microsoft", - "city": "Seattle", - "port": 9000, - "remove_path": True, - "move_path": "yes", - "set_path": 1},)), - ("patch", (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), - {"filter_predicate": "from c where c.set_path = 0"})] + batch = [ + ( + "upsert", + ( + { + "id": item_id, + "company": "Microsoft", + "city": "Seattle", + "port": 9000, + "remove_path": True, + "move_path": "yes", + "set_path": 1, + }, + ), + ), + ( + "patch", + (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), + {"filter_predicate": "from c where c.set_path = 0"}, + ), + ] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -281,15 +327,27 @@ def test_batch_patch(self): assert operation_results[1].get("statusCode") == StatusCodes.PRECONDITION_FAILED # with correct filter - batch = [("upsert", ({"id": item_id, - "company": "Microsoft", - "city": "Seattle", - "port": 9000, - "remove_path": True, - "move_path": "yes", - "set_path": 1},)), - ("patch", (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), - {"filter_predicate": "from c where c.set_path = 1"})] + batch = [ + ( + "upsert", + ( + { + "id": item_id, + "company": "Microsoft", + "city": "Seattle", + "port": 9000, + "remove_path": True, + "move_path": "yes", + "set_path": 1, + }, + ), + ), + ( + "patch", + (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), + {"filter_predicate": "from c where c.set_path = 1"}, + ), + ] batch_response = container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 2 @@ -297,8 +355,9 @@ def test_batch_patch(self): self.test_database.delete_container(container.id) def test_batch_delete(self): - container = self.test_database.create_container(id="batch_delete" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="batch_delete" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) create_batch = [] delete_batch = [] for i in range(10): @@ -315,8 +374,7 @@ def test_batch_delete(self): assert len(list(container.read_all_items())) == 0 # delete non-existent item - batch = [("delete", ("new-item",)), - ("delete", ("new-item",))] + batch = [("delete", ("new-item",)), ("delete", ("new-item",))] try: container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -332,8 +390,9 @@ def test_batch_delete(self): self.test_database.delete_container(container.id) def test_batch_lsn(self): - container = self.test_database.create_container(id="batch_lsn" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = self.test_database.create_container( + id="batch_lsn" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) # create test items container.upsert_item({"id": "read_item", "company": "Microsoft"}) container.upsert_item({"id": "replace_item", "company": "Microsoft", "value": 0}) @@ -343,12 +402,14 @@ def test_batch_lsn(self): read_response = container.read_item(item="read_item", partition_key="Microsoft") lsn = read_response.get_response_headers().get(HttpHeaders.LSN) - batch = [("create", ({"id": "create_item", "company": "Microsoft"},)), - ("replace", ("replace_item", {"id": "replace_item", "company": "Microsoft", "value": True})), - ("upsert", ({"id": "upsert_item", "company": "Microsoft"},)), - ("patch", ("patch_item", [{"op": "add", "path": "/favorite_color", "value": "red"}])), - ("read", ("read_item",)), - ("delete", ("delete_item",))] + batch = [ + ("create", ({"id": "create_item", "company": "Microsoft"},)), + ("replace", ("replace_item", {"id": "replace_item", "company": "Microsoft", "value": True})), + ("upsert", ({"id": "upsert_item", "company": "Microsoft"},)), + ("patch", ("patch_item", [{"op": "add", "path": "/favorite_color", "value": "red"}])), + ("read", ("read_item",)), + ("delete", ("delete_item",)), + ] batch_response = container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 6 @@ -359,34 +420,27 @@ def test_batch_lsn(self): def test_batch_subpartition(self): container = self.test_database.create_container( id="batch_subpartition" + str(uuid.uuid4()), - partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash")) + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), + ) item_ids = [str(uuid.uuid4()), str(uuid.uuid4()), str(uuid.uuid4())] - container.upsert_item({'id': item_ids[0], - 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'}) - container.upsert_item({'id': item_ids[1], - 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'}) - container.upsert_item({'id': item_ids[2], - 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'}) - - batch = [("create", (get_subpartition_item(str(uuid.uuid4())),)), - ("replace", (item_ids[0], {"id": item_ids[0], - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052', - 'replaced': True})), - ("upsert", (get_subpartition_item(str(uuid.uuid4())),)), - ("patch", (item_ids[1], [{"op": "add", "path": "/favorite_color", "value": "red"}])), - ("read", (item_ids[2],)), - ("delete", (item_ids[2],))] + container.upsert_item({"id": item_ids[0], "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"}) + container.upsert_item({"id": item_ids[1], "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"}) + container.upsert_item({"id": item_ids[2], "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"}) + + batch = [ + ("create", (get_subpartition_item(str(uuid.uuid4())),)), + ( + "replace", + ( + item_ids[0], + {"id": item_ids[0], "state": "WA", "city": "Redmond", "zipcode": "98052", "replaced": True}, + ), + ), + ("upsert", (get_subpartition_item(str(uuid.uuid4())),)), + ("patch", (item_ids[1], [{"op": "add", "path": "/favorite_color", "value": "red"}])), + ("read", (item_ids[2],)), + ("delete", (item_ids[2],)), + ] batch_response = container.execute_item_batch(batch_operations=batch, partition_key=["WA", "Redmond", "98052"]) assert len(batch_response) == 6 @@ -397,12 +451,14 @@ def test_batch_subpartition(self): self.fail("Request should have failed.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST - assert "Partition key provided either doesn't correspond to " \ - "definition in the collection or doesn't match partition key " \ - "field values specified in the document." in e.message + assert ( + "Partition key provided either doesn't correspond to " + "definition in the collection or doesn't match partition key " + "field values specified in the document." in e.message + ) self.test_database.delete_container(container.id) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_transactional_batch_async.py b/sdk/cosmos/azure-cosmos/tests/test_transactional_batch_async.py index ad26b766627b..ca52f9601381 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_transactional_batch_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_transactional_batch_async.py @@ -13,17 +13,12 @@ def get_subpartition_item(item_id): - return {'id': item_id, - 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'} + return {"id": item_id, "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"} @pytest.mark.cosmosEmulator class TestTransactionalBatchAsync(unittest.IsolatedAsyncioTestCase): - """Python Transactional Batch Tests. - """ + """Python Transactional Batch Tests.""" configs = test_config.TestConfig host = configs.host @@ -32,12 +27,12 @@ class TestTransactionalBatchAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def asyncSetUp(self): self.client = CosmosClient(self.host, self.masterKey) @@ -48,8 +43,8 @@ async def asyncTearDown(self): async def test_invalid_batch_sizes_async(self): container = await self.test_database.create_container( - id="invalid_batch_size_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + id="invalid_batch_size_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) # empty batch try: @@ -87,8 +82,9 @@ async def test_invalid_batch_sizes_async(self): await self.test_database.delete_container(container.id) async def test_batch_create_async(self): - container = await self.test_database.create_container(id="batch_create_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="batch_create_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) batch = [] for i in range(100): batch.append(("create", ({"id": "item" + str(i), "company": "Microsoft"},))) @@ -98,8 +94,10 @@ async def test_batch_create_async(self): # create the same item twice item_id = str(uuid.uuid4()) - batch = [("create", ({"id": item_id, "company": "Microsoft"},)), - ("create", ({"id": item_id, "company": "Microsoft"},))] + batch = [ + ("create", ({"id": item_id, "company": "Microsoft"},)), + ("create", ({"id": item_id, "company": "Microsoft"},)), + ] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -113,8 +111,10 @@ async def test_batch_create_async(self): assert operation_results[1].get("statusCode") == StatusCodes.CONFLICT # create an item without the right partition key. - batch = [("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), - ("create", ({"id": str(uuid.uuid4()), "company": "Not-Microsoft"},))] + batch = [ + ("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), + ("create", ({"id": str(uuid.uuid4()), "company": "Not-Microsoft"},)), + ] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -128,8 +128,10 @@ async def test_batch_create_async(self): assert operation_results[1].get("statusCode") == StatusCodes.BAD_REQUEST # create an item without a partition key - batch = [("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), - ("create", ({"id": str(uuid.uuid4()), "name": "Simon"},))] + batch = [ + ("create", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), + ("create", ({"id": str(uuid.uuid4()), "name": "Simon"},)), + ] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -145,8 +147,9 @@ async def test_batch_create_async(self): await self.test_database.delete_container(container.id) async def test_batch_read_async(self): - container = await self.test_database.create_container(id="batch_read_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="batch_read_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) batch = [] for i in range(100): await container.create_item({"id": "item" + str(i), "company": "Microsoft"}) @@ -158,8 +161,7 @@ async def test_batch_read_async(self): assert result.get("statusCode") == 200 # read non-existent item - batch = [("read", (str(uuid.uuid4()),)), - ("read", (str(uuid.uuid4()),))] + batch = [("read", (str(uuid.uuid4()),)), ("read", (str(uuid.uuid4()),))] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -175,10 +177,13 @@ async def test_batch_read_async(self): await self.test_database.delete_container(container.id) async def test_batch_replace_async(self): - container = await self.test_database.create_container(id="batch_replace_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) - batch = [("create", ({"id": "new-item", "company": "Microsoft"},)), - ("replace", ("new-item", {"id": "new-item", "company": "Microsoft", "message": "item was replaced"}))] + container = await self.test_database.create_container( + id="batch_replace_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) + batch = [ + ("create", ({"id": "new-item", "company": "Microsoft"},)), + ("replace", ("new-item", {"id": "new-item", "company": "Microsoft", "message": "item was replaced"})), + ] batch_response = await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 2 @@ -199,11 +204,19 @@ async def test_batch_replace_async(self): # replace with wrong etag item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, "company": "Microsoft"},)), - ("replace", (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), - {"if_match_etag": "some-tag"}), - ("replace", (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), - {"if_none_match_etag": "some-tag"})] + batch = [ + ("upsert", ({"id": item_id, "company": "Microsoft"},)), + ( + "replace", + (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), + {"if_match_etag": "some-tag"}, + ), + ( + "replace", + (item_id, {"id": item_id, "company": "Microsoft", "message": "item was replaced"}), + {"if_none_match_etag": "some-tag"}, + ), + ] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -220,12 +233,15 @@ async def test_batch_replace_async(self): await self.test_database.delete_container(container.id) async def test_batch_upsert_async(self): - container = await self.test_database.create_container(id="batch_upsert_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="batch_upsert_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, "company": "Microsoft"},)), - ("upsert", ({"id": item_id, "company": "Microsoft", "message": "item was upsert"},)), - ("upsert", ({"id": str(uuid.uuid4()), "company": "Microsoft"},))] + batch = [ + ("upsert", ({"id": item_id, "company": "Microsoft"},)), + ("upsert", ({"id": item_id, "company": "Microsoft", "message": "item was upsert"},)), + ("upsert", ({"id": str(uuid.uuid4()), "company": "Microsoft"},)), + ] batch_response = await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 3 @@ -234,23 +250,40 @@ async def test_batch_upsert_async(self): await self.test_database.delete_container(container.id) async def test_batch_patch_async(self): - container = await self.test_database.create_container(id="batch_patch_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="batch_patch_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, - "company": "Microsoft", - "city": "Seattle", - "port": 9000, - "remove_path": True, - "move_path": "yes", - "set_path": 1},)), - ("patch", (item_id, [ - {"op": "add", "path": "/favorite_color", "value": "red"}, - {"op": "remove", "path": "/remove_path"}, - {"op": "replace", "path": "/city", "value": "Redmond"}, - {"op": "set", "path": "/set_path", "value": 0}, - {"op": "incr", "path": "/port", "value": 5}, - {"op": "move", "from": "/move_path", "path": "/moved_path"}]))] + batch = [ + ( + "upsert", + ( + { + "id": item_id, + "company": "Microsoft", + "city": "Seattle", + "port": 9000, + "remove_path": True, + "move_path": "yes", + "set_path": 1, + }, + ), + ), + ( + "patch", + ( + item_id, + [ + {"op": "add", "path": "/favorite_color", "value": "red"}, + {"op": "remove", "path": "/remove_path"}, + {"op": "replace", "path": "/city", "value": "Redmond"}, + {"op": "set", "path": "/set_path", "value": 0}, + {"op": "incr", "path": "/port", "value": 5}, + {"op": "move", "from": "/move_path", "path": "/moved_path"}, + ], + ), + ), + ] batch_response = await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 2 @@ -264,15 +297,27 @@ async def test_batch_patch_async(self): # conditional patching incorrect filter item_id = str(uuid.uuid4()) - batch = [("upsert", ({"id": item_id, - "company": "Microsoft", - "city": "Seattle", - "port": 9000, - "remove_path": True, - "move_path": "yes", - "set_path": 1},)), - ("patch", (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), - {"filter_predicate": "from c where c.set_path = 0"})] + batch = [ + ( + "upsert", + ( + { + "id": item_id, + "company": "Microsoft", + "city": "Seattle", + "port": 9000, + "remove_path": True, + "move_path": "yes", + "set_path": 1, + }, + ), + ), + ( + "patch", + (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), + {"filter_predicate": "from c where c.set_path = 0"}, + ), + ] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -286,15 +331,27 @@ async def test_batch_patch_async(self): assert operation_results[1].get("statusCode") == StatusCodes.PRECONDITION_FAILED # with correct filter - batch = [("upsert", ({"id": item_id, - "company": "Microsoft", - "city": "Seattle", - "port": 9000, - "remove_path": True, - "move_path": "yes", - "set_path": 1},)), - ("patch", (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), - {"filter_predicate": "from c where c.set_path = 1"})] + batch = [ + ( + "upsert", + ( + { + "id": item_id, + "company": "Microsoft", + "city": "Seattle", + "port": 9000, + "remove_path": True, + "move_path": "yes", + "set_path": 1, + }, + ), + ), + ( + "patch", + (item_id, [{"op": "add", "path": "/favorite_color", "value": "red"}]), + {"filter_predicate": "from c where c.set_path = 1"}, + ), + ] await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -303,8 +360,9 @@ async def test_batch_patch_async(self): await self.test_database.delete_container(container.id) async def test_batch_delete_async(self): - container = await self.test_database.create_container(id="batch_delete_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="batch_delete_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) create_batch = [] delete_batch = [] for i in range(10): @@ -323,8 +381,7 @@ async def test_batch_delete_async(self): assert len(all_items) == 0 # delete non-existent item - batch = [("delete", ("new-item",)), - ("delete", ("new-item",))] + batch = [("delete", ("new-item",)), ("delete", ("new-item",))] try: await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") @@ -340,8 +397,9 @@ async def test_batch_delete_async(self): await self.test_database.delete_container(container.id) async def test_batch_lsn_async(self): - container = await self.test_database.create_container(id="batch_lsn_async" + str(uuid.uuid4()), - partition_key=PartitionKey(path="/company")) + container = await self.test_database.create_container( + id="batch_lsn_async" + str(uuid.uuid4()), partition_key=PartitionKey(path="/company") + ) # Create test items await container.upsert_item({"id": "read_item", "company": "Microsoft"}) await container.upsert_item({"id": "replace_item", "company": "Microsoft", "value": 0}) @@ -351,12 +409,14 @@ async def test_batch_lsn_async(self): read_response = await container.read_item(item="read_item", partition_key="Microsoft") lsn = read_response.get_response_headers().get(HttpHeaders.LSN) - batch = [("create", ({"id": "create_item", "company": "Microsoft"},)), - ("replace", ("replace_item", {"id": "replace_item", "company": "Microsoft", "value": True})), - ("upsert", ({"id": "upsert_item", "company": "Microsoft"},)), - ("patch", ("patch_item", [{"op": "add", "path": "/favorite_color", "value": "red"}])), - ("read", ("read_item",)), - ("delete", ("delete_item",))] + batch = [ + ("create", ({"id": "create_item", "company": "Microsoft"},)), + ("replace", ("replace_item", {"id": "replace_item", "company": "Microsoft", "value": True})), + ("upsert", ({"id": "upsert_item", "company": "Microsoft"},)), + ("patch", ("patch_item", [{"op": "add", "path": "/favorite_color", "value": "red"}])), + ("read", ("read_item",)), + ("delete", ("delete_item",)), + ] batch_response = await container.execute_item_batch(batch_operations=batch, partition_key="Microsoft") assert len(batch_response) == 6 @@ -367,35 +427,37 @@ async def test_batch_lsn_async(self): async def test_batch_subpartition(self): container = await self.test_database.create_container( id="batch_subpartition" + str(uuid.uuid4()), - partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash")) + partition_key=PartitionKey(path=["/state", "/city", "/zipcode"], kind="MultiHash"), + ) item_ids = [str(uuid.uuid4()), str(uuid.uuid4()), str(uuid.uuid4())] - await container.upsert_item({'id': item_ids[0], 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'}) - await container.upsert_item({'id': item_ids[1], 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'}) - await container.upsert_item({'id': item_ids[2], - 'key': 'value', - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052'}) - - batch = [("create", (get_subpartition_item(str(uuid.uuid4())),)), - ("replace", (item_ids[0], {"id": item_ids[0], - 'state': 'WA', - 'city': 'Redmond', - 'zipcode': '98052', - 'replaced': True})), - ("upsert", (get_subpartition_item(str(uuid.uuid4())),)), - ("patch", (item_ids[1], [{"op": "add", "path": "/favorite_color", "value": "red"}])), - ("read", (item_ids[2],)), - ("delete", (item_ids[2],))] - - batch_response = await container.execute_item_batch(batch_operations=batch, - partition_key=["WA", "Redmond", "98052"]) + await container.upsert_item( + {"id": item_ids[0], "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"} + ) + await container.upsert_item( + {"id": item_ids[1], "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"} + ) + await container.upsert_item( + {"id": item_ids[2], "key": "value", "state": "WA", "city": "Redmond", "zipcode": "98052"} + ) + + batch = [ + ("create", (get_subpartition_item(str(uuid.uuid4())),)), + ( + "replace", + ( + item_ids[0], + {"id": item_ids[0], "state": "WA", "city": "Redmond", "zipcode": "98052", "replaced": True}, + ), + ), + ("upsert", (get_subpartition_item(str(uuid.uuid4())),)), + ("patch", (item_ids[1], [{"op": "add", "path": "/favorite_color", "value": "red"}])), + ("read", (item_ids[2],)), + ("delete", (item_ids[2],)), + ] + + batch_response = await container.execute_item_batch( + batch_operations=batch, partition_key=["WA", "Redmond", "98052"] + ) assert len(batch_response) == 6 # try to use incomplete key @@ -404,9 +466,11 @@ async def test_batch_subpartition(self): self.fail("Request should have failed.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == StatusCodes.BAD_REQUEST - assert "Partition key provided either doesn't correspond to " \ - "definition in the collection or doesn't match partition key " \ - "field values specified in the document." in e.message + assert ( + "Partition key provided either doesn't correspond to " + "definition in the collection or doesn't match partition key " + "field values specified in the document." in e.message + ) await self.test_database.delete_container(container.id) diff --git a/sdk/cosmos/azure-cosmos/tests/test_ttl.py b/sdk/cosmos/azure-cosmos/tests/test_ttl.py index c0a2dc068aa7..b0017441fa55 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_ttl.py +++ b/sdk/cosmos/azure-cosmos/tests/test_ttl.py @@ -15,8 +15,7 @@ @pytest.mark.cosmosEmulator class TestTimeToLive(unittest.TestCase): - """TTL Unit Tests. - """ + """TTL Unit Tests.""" client = None created_db = None @@ -34,31 +33,30 @@ def __AssertHTTPFailureWithStatus(self, status_code, func, *args, **kwargs): """ try: func(*args, **kwargs) - self.assertFalse(True, 'function should fail.') + self.assertFalse(True, "function should fail.") except exceptions.CosmosHttpResponseError as inst: self.assertEqual(inst.status_code, status_code) @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = cosmos_client.CosmosClient(cls.host, cls.masterKey) cls.created_db = cls.client.get_database_client(cls.configs.TEST_DATABASE_ID) def test_collection_and_document_ttl_values(self): ttl = 10 created_collection = self.created_db.create_container( - id='test_ttl_values1' + str(uuid.uuid4()), - partition_key=PartitionKey(path='/id'), - default_ttl=ttl) + id="test_ttl_values1" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), default_ttl=ttl + ) created_collection_properties = created_collection.read() - self.assertEqual(created_collection_properties['defaultTtl'], ttl) + self.assertEqual(created_collection_properties["defaultTtl"], ttl) - collection_id = 'test_ttl_values4' + str(uuid.uuid4()) + collection_id = "test_ttl_values4" + str(uuid.uuid4()) ttl = -10 # -10 is an unsupported value for defaultTtl. Valid values are -1 or a non-zero positive 32-bit integer value @@ -66,43 +64,32 @@ def test_collection_and_document_ttl_values(self): StatusCodes.BAD_REQUEST, self.created_db.create_container, collection_id, - PartitionKey(path='/id'), + PartitionKey(path="/id"), None, - ttl) + ttl, + ) - document_definition = {'id': 'doc1' + str(uuid.uuid4()), - 'name': 'sample document', - 'key': 'value', - 'ttl': 0} + document_definition = {"id": "doc1" + str(uuid.uuid4()), "name": "sample document", "key": "value", "ttl": 0} # 0 is an unsupported value for ttl. Valid values are -1 or a non-zero positive 32-bit integer value - self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition) - document_definition['id'] = 'doc2' + str(uuid.uuid4()) - document_definition['ttl'] = None + document_definition["id"] = "doc2" + str(uuid.uuid4()) + document_definition["ttl"] = None # None is an unsupported value for ttl. Valid values are -1 or a non-zero positive 32-bit integer value - self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition) - document_definition['id'] = 'doc3' + str(uuid.uuid4()) - document_definition['ttl'] = -10 + document_definition["id"] = "doc3" + str(uuid.uuid4()) + document_definition["ttl"] = -10 # -10 is an unsupported value for ttl. Valid values are -1 or a non-zero positive 32-bit integer value - self.__AssertHTTPFailureWithStatus( - StatusCodes.BAD_REQUEST, - created_collection.create_item, - document_definition) + self.__AssertHTTPFailureWithStatus(StatusCodes.BAD_REQUEST, created_collection.create_item, document_definition) self.created_db.delete_container(container=created_collection) -if __name__ == '__main__': +if __name__ == "__main__": try: unittest.main() except SystemExit as inst: diff --git a/sdk/cosmos/azure-cosmos/tests/test_user_agent.py b/sdk/cosmos/azure-cosmos/tests/test_user_agent.py index 41beb3cde109..933cb940ec9f 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_user_agent.py +++ b/sdk/cosmos/azure-cosmos/tests/test_user_agent.py @@ -23,35 +23,35 @@ class TestUserAgent(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) def _check(self, user_agent_kw: dict[str, Any]) -> None: self.client = CosmosClient(self.host, self.masterKey, **user_agent_kw) created_database = self.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) read_result = created_database.read() - assert read_result['id'] == created_database.id + assert read_result["id"] == created_database.id def test_user_agent_special_characters(self): # Values cover normal, accented, apostrophe, unicode, and spaces / symbols - user_agents = ["TestUserAgent", "TéstUserAgent's", "UserAgent with space$%_^()*&"] # cspell:disable-line + user_agents = ["TestUserAgent", "TéstUserAgent's", "UserAgent with space$%_^()*&"] # cspell:disable-line for ua in user_agents: # Prefix usage - self._check({'user_agent': ua}) + self._check({"user_agent": ua}) # Suffix usage - self._check({'user_agent_suffix': ua}) + self._check({"user_agent_suffix": ua}) # Explicit negative test for disallowed unicode (same logic as previous unicode test) bad = "UnicodeChar鱀InUserAgent" # expecting potential encode issues when used as prefix try: # Prefix usage - self._check({'user_agent': bad}) + self._check({"user_agent": bad}) # Suffix usage - self._check({'user_agent_suffix': bad}) + self._check({"user_agent_suffix": bad}) pytest.fail("Unicode characters should not be allowed.") except UnicodeEncodeError as e: assert "ordinal not in range(256)" in e.reason @@ -70,7 +70,9 @@ def _run_case(use_suffix: bool) -> None: kwargs["user_agent"] = user_agent_value self.client = CosmosClient(self.host, self.masterKey, **kwargs) created_database = self.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) - container = created_database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) + container = created_database.get_container_client( + test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID + ) container.create_item(body={"id": "testItem" + str(uuid.uuid4()), "content": "testContent"}) container.create_item(body={"id": "testItem" + str(uuid.uuid4()), "content": "testContent"}) finally: @@ -93,8 +95,8 @@ def _run_case(use_suffix: bool) -> None: assert ua.endswith("| F2") _run_case(False) # prefix scenario - _run_case(True) # suffix scenario + _run_case(True) # suffix scenario -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_user_agent_async.py b/sdk/cosmos/azure-cosmos/tests/test_user_agent_async.py index 507a3f1e81b0..79672ad6cac2 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_user_agent_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_user_agent_async.py @@ -15,8 +15,7 @@ @pytest.mark.cosmosEmulator class TestUserAgentAsync(unittest.IsolatedAsyncioTestCase): - """Python User Agent Prefix Tests (async). - """ + """Python User Agent Prefix Tests (async).""" configs = test_config.TestConfig host = configs.host @@ -25,25 +24,30 @@ class TestUserAgentAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) async def _check(self, user_agent_kw): self.client = CosmosClient(self.host, self.masterKey, **user_agent_kw) self.created_database = self.client.get_database_client(self.TEST_DATABASE_ID) read_result = await self.created_database.read() - assert read_result['id'] == self.created_database.id + assert read_result["id"] == self.created_database.id await self.client.close() async def test_user_agent_special_characters_async(self): - user_agents = ["TestUserAgent", "TéstUserAgent's", "UnicodeChar鱀InUserAgent", "UserAgent with space$%_^()*&"] # cspell:disable-line + user_agents = [ + "TestUserAgent", + "TéstUserAgent's", + "UnicodeChar鱀InUserAgent", + "UserAgent with space$%_^()*&", + ] # cspell:disable-line for user_agent in user_agents: - await self._check({'user_agent': user_agent}) - await self._check({'user_agent_suffix': user_agent}) + await self._check({"user_agent": user_agent}) + await self._check({"user_agent_suffix": user_agent}) async def test_user_agent_with_features_async(self): async def _run_case(use_suffix: bool): @@ -59,7 +63,9 @@ async def _run_case(use_suffix: bool): kwargs["user_agent"] = user_agent self.client = CosmosClient(self.host, self.masterKey, **kwargs) self.created_database = self.client.get_database_client(self.TEST_DATABASE_ID) - container = self.created_database.get_container_client(test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID) + container = self.created_database.get_container_client( + test_config.TestConfig.TEST_SINGLE_PARTITION_CONTAINER_ID + ) await container.create_item(body={"id": "testItem" + str(uuid.uuid4()), "content": "testContent"}) await container.create_item(body={"id": "testItem" + str(uuid.uuid4()), "content": "testContent"}) finally: @@ -87,4 +93,3 @@ async def _run_case(use_suffix: bool): if __name__ == "__main__": unittest.main() - diff --git a/sdk/cosmos/azure-cosmos/tests/test_user_configs.py b/sdk/cosmos/azure-cosmos/tests/test_user_configs.py index 471cff2b53e0..715640f07f96 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_user_configs.py +++ b/sdk/cosmos/azure-cosmos/tests/test_user_configs.py @@ -10,18 +10,13 @@ from azure.cosmos import http_constants, exceptions, PartitionKey from test_config import TestConfig - # This test class serves to test user-configurable options and verify they are # properly set and saved into the different object instances that use these # user-configurable settings. def get_test_item(): - item = { - 'id': 'Async_' + str(uuid.uuid4()), - 'test_object': True, - 'lastName': 'Smith' - } + item = {"id": "Async_" + str(uuid.uuid4()), "test_object": True, "lastName": "Smith"} return item @@ -30,18 +25,31 @@ class TestUserConfigs(unittest.TestCase): def test_invalid_connection_retry_configuration(self): try: - cosmos_client.CosmosClient(url=TestConfig.host, credential=TestConfig.masterKey, - consistency_level="Session", connection_retry_policy="Invalid Policy") + cosmos_client.CosmosClient( + url=TestConfig.host, + credential=TestConfig.masterKey, + consistency_level="Session", + connection_retry_policy="Invalid Policy", + ) except TypeError as e: - self.assertTrue(str(e).startswith('Unsupported retry policy')) + self.assertTrue(str(e).startswith("Unsupported retry policy")) def test_enable_endpoint_discovery(self): - client_false = cosmos_client.CosmosClient(url=TestConfig.host, credential=TestConfig.masterKey, - consistency_level="Session", enable_endpoint_discovery=False) - client_default = cosmos_client.CosmosClient(url=TestConfig.host, credential=TestConfig.masterKey, - consistency_level="Session") - client_true = cosmos_client.CosmosClient(url=TestConfig.host, credential=TestConfig.masterKey, - consistency_level="Session", enable_endpoint_discovery=True) + client_false = cosmos_client.CosmosClient( + url=TestConfig.host, + credential=TestConfig.masterKey, + consistency_level="Session", + enable_endpoint_discovery=False, + ) + client_default = cosmos_client.CosmosClient( + url=TestConfig.host, credential=TestConfig.masterKey, consistency_level="Session" + ) + client_true = cosmos_client.CosmosClient( + url=TestConfig.host, + credential=TestConfig.masterKey, + consistency_level="Session", + enable_endpoint_discovery=True, + ) self.assertFalse(client_false.client_connection.connection_policy.EnableEndpointDiscovery) self.assertTrue(client_default.client_connection.connection_policy.EnableEndpointDiscovery) @@ -82,22 +90,22 @@ def test_default_account_consistency(self): # Now testing a user-defined consistency level as opposed to using the account one custom_level = "Eventual" - eventual_consistency_client = cosmos_client.CosmosClient(url=TestConfig.host, - credential=TestConfig.masterKey, - consistency_level=custom_level) + eventual_consistency_client = cosmos_client.CosmosClient( + url=TestConfig.host, credential=TestConfig.masterKey, consistency_level=custom_level + ) database_account = eventual_consistency_client.get_database_account() account_consistency_level = database_account.ConsistencyPolicy["defaultConsistencyLevel"] # Here they're not equal, since the headers being used make the client use a different level of consistency self.assertNotEqual( - eventual_consistency_client - .client_connection.default_headers[http_constants.HttpHeaders.ConsistencyLevel], - account_consistency_level) + eventual_consistency_client.client_connection.default_headers[http_constants.HttpHeaders.ConsistencyLevel], + account_consistency_level, + ) # Test for failure when trying to set consistency to higher level than account level custom_level = "Strong" - strong_consistency_client = cosmos_client.CosmosClient(url=TestConfig.host, - credential=TestConfig.masterKey, - consistency_level=custom_level) + strong_consistency_client = cosmos_client.CosmosClient( + url=TestConfig.host, credential=TestConfig.masterKey, consistency_level=custom_level + ) try: strong_consistency_client.create_database(database_id) except exceptions.CosmosHttpResponseError as e: diff --git a/sdk/cosmos/azure-cosmos/tests/test_utils.py b/sdk/cosmos/azure-cosmos/tests/test_utils.py index fae6d6b763f8..533c623ffdfd 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_utils.py +++ b/sdk/cosmos/azure-cosmos/tests/test_utils.py @@ -13,26 +13,22 @@ from azure.cosmos import CosmosClient - @pytest.mark.cosmosEmulator class TestsUtils(unittest.TestCase): - """Utils Tests - """ + """Utils Tests""" def test_user_agent(self): user_agent = _utils.get_user_agent() expected_user_agent = "azsdk-python-cosmos/{} Python/{} ({})".format( - azure.cosmos.__version__, - platform.python_version(), - platform.platform() + azure.cosmos.__version__, platform.python_version(), platform.platform() ) self.assertEqual(user_agent, expected_user_agent) def test_connection_string(self): - client: CosmosClient = (azure.cosmos.CosmosClient - .from_connection_string(test_config.TestConfig.connection_str, - consistency_level="Session")) + client: CosmosClient = azure.cosmos.CosmosClient.from_connection_string( + test_config.TestConfig.connection_str, consistency_level="Session" + ) database_id = "connection_string_test" + str(uuid.uuid4()) db = client.create_database(database_id) self.assertTrue(db is not None) @@ -63,8 +59,10 @@ def test_add_args_to_kwargs(self): args = ("arg1_val", "arg2_val", "arg3_val", "arg4_val", "arg5_val") with pytest.raises(ValueError) as e: _utils.add_args_to_kwargs(arg_names, args, kwargs) - assert str(e.value) == (f"Positional argument is out of range. Expected {len(arg_names)} arguments, " - f"but got {len(args)} instead. Please review argument list in API documentation.") + assert str(e.value) == ( + f"Positional argument is out of range. Expected {len(arg_names)} arguments, " + f"but got {len(args)} instead. Please review argument list in API documentation." + ) def test_verify_exclusive_arguments(self): exclusive_keys = ["key1", "key2", "key3", "key4"] @@ -95,4 +93,3 @@ def test_verify_exclusive_arguments(self): with pytest.raises(ValueError) as e: _utils.verify_exclusive_arguments(exclusive_keys, **kwargs) assert str(e.value) == expected_error_message - diff --git a/sdk/cosmos/azure-cosmos/tests/test_vector_policy.py b/sdk/cosmos/azure-cosmos/tests/test_vector_policy.py index d4d37fd44034..3267c3bbb626 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_vector_policy.py +++ b/sdk/cosmos/azure-cosmos/tests/test_vector_policy.py @@ -11,47 +11,34 @@ from azure.cosmos import CosmosClient, PartitionKey VectorPolicyTestData = { - "valid_vector_indexing_policy" : { + "valid_vector_indexing_policy": { "indexing_policy": { "vectorIndexes": [ {"path": "/vector1", "type": "flat"}, {"path": "/vector2", "type": "quantizedFlat", "quantizerType": "product", "quantizationByteSize": 8}, - {"path": "/vector3", "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 8, - "vectorIndexShardKey": ["/city"], "indexingSearchListSize": 50}, + { + "path": "/vector3", + "type": "diskANN", + "quantizerType": "product", + "quantizationByteSize": 8, + "vectorIndexShardKey": ["/city"], + "indexingSearchListSize": 50, + }, {"path": "/vector4", "type": "diskANN", "quantizerType": "spherical", "indexingSearchListSize": 50}, ] }, "vector_embedding_policy": { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, - { - "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" - }, - { - "path": "/vector3", - "dataType": "uint8", - "dimensions": 400, - "distanceFunction": "cosine" - }, - { - "path": "/vector4", - "dataType": "uint8", - "dimensions": 400, - "distanceFunction": "euclidean" - }, + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, + {"path": "/vector3", "dataType": "uint8", "dimensions": 400, "distanceFunction": "cosine"}, + {"path": "/vector4", "dataType": "uint8", "dimensions": 400, "distanceFunction": "euclidean"}, ] - } + }, } } + @pytest.mark.cosmosSearchQuery class TestVectorPolicy(unittest.TestCase): client: CosmosClient = None @@ -61,12 +48,12 @@ class TestVectorPolicy(unittest.TestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.client = CosmosClient(cls.host, cls.masterKey) cls.created_database = cls.client.get_database_client(test_config.TestConfig.TEST_DATABASE_ID) @@ -82,19 +69,17 @@ def test_create_valid_vector_embedding_policy(self): for data_type in data_types: vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": data_type, - "dimensions": 256, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": data_type, "dimensions": 256, "distanceFunction": "euclidean"} + ] + } created_container = self.test_db.create_container( - id='vector_container_' + data_type, + id="vector_container_" + data_type, partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) properties = created_container.read() assert properties["vectorEmbeddingPolicy"]["vectorEmbeddings"][0]["dataType"] == data_type - self.test_db.delete_container('vector_container_' + data_type) + self.test_db.delete_container("vector_container_" + data_type) @unittest.skip def test_create_valid_vector_indexing_policy(self): @@ -106,9 +91,10 @@ def test_create_valid_vector_indexing_policy(self): id="container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=indexing_policy) + indexing_policy=indexing_policy, + ) properties = created_container.read() - assert properties['indexingPolicy']['vectorIndexes'] == indexing_policy['vectorIndexes'] + assert properties["indexingPolicy"]["vectorIndexes"] == indexing_policy["vectorIndexes"] self.test_db.delete_container(created_container.id) def test_create_vector_embedding_container(self): @@ -116,29 +102,21 @@ def test_create_vector_embedding_container(self): "vectorIndexes": [ {"path": "/vector1", "type": "flat"}, {"path": "/vector2", "type": "quantizedFlat", "quantizerType": "product", "quantizationByteSize": 8}, - {"path": "/vector3", "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 8, "vectorIndexShardKey": ["/city"], "indexingSearchListSize": 50} + { + "path": "/vector3", + "type": "diskANN", + "quantizerType": "product", + "quantizationByteSize": 8, + "vectorIndexShardKey": ["/city"], + "indexingSearchListSize": 50, + }, ] } vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, - { - "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" - }, - { - "path": "/vector3", - "dataType": "uint8", - "dimensions": 400, - "distanceFunction": "cosine" - } + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, + {"path": "/vector3", "dataType": "uint8", "dimensions": 400, "distanceFunction": "cosine"}, ] } container_id = "vector_container" + str(uuid.uuid4()) @@ -146,7 +124,7 @@ def test_create_vector_embedding_container(self): id=container_id, partition_key=PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = created_container.read() assert properties["vectorEmbeddingPolicy"] == vector_embedding_policy @@ -156,14 +134,22 @@ def test_create_vector_embedding_container(self): # Pass a vector indexing policy with hierarchical vectorIndexShardKey value indexing_policy = { "vectorIndexes": [ - {"path": "/vector2", "type": "diskANN", "quantizerType": "product", 'quantizationByteSize': 64, 'indexingSearchListSize': 100, "vectorIndexShardKey": ["/country/city"]}] + { + "path": "/vector2", + "type": "diskANN", + "quantizerType": "product", + "quantizationByteSize": 64, + "indexingSearchListSize": 100, + "vectorIndexShardKey": ["/country/city"], + } + ] } container_id = "vector_container" + str(uuid.uuid4()) created_container = self.test_db.create_container( id=container_id, partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) properties = created_container.read() assert properties["vectorEmbeddingPolicy"] == vector_embedding_policy @@ -175,30 +161,14 @@ def test_replace_vector_indexing_policy(self): # the previously defined vector embedding policy is also provided. vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - } + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"} ] } indexing_policy = { "indexingMode": "consistent", "automatic": True, - "includedPaths": [ - { - "path": "/*" - } - ], - "excludedPaths": [ - { - "path": "/vector1/*" - }, - { - "path": "/\"_etag\"/?" - } - ], + "includedPaths": [{"path": "/*"}], + "excludedPaths": [{"path": "/vector1/*"}, {"path": '/"_etag"/?'}], "fullTextIndexes": [], "vectorIndexes": [ { @@ -206,30 +176,22 @@ def test_replace_vector_indexing_policy(self): "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 128, - "indexingSearchListSize": 100 + "indexingSearchListSize": 100, } - ] + ], } container_id = "vector_container" + str(uuid.uuid4()) created_container = self.test_db.create_container( id=container_id, partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) new_indexing_policy = { "indexingMode": "consistent", "automatic": True, - "includedPaths": [ - {"path": "/color/?"}, - {"path": "/description/?"}, - {"path": "/cost/?"} - ], - "excludedPaths": [ - {"path": "/*"}, - {"path": "/vector1/*"}, - {"path": "/\"_etag\"/?"} - ], + "includedPaths": [{"path": "/color/?"}, {"path": "/description/?"}, {"path": "/cost/?"}], + "excludedPaths": [{"path": "/*"}, {"path": "/vector1/*"}, {"path": '/"_etag"/?'}], "fullTextIndexes": [], "vectorIndexes": [ { @@ -237,14 +199,16 @@ def test_replace_vector_indexing_policy(self): "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 128, - "indexingSearchListSize": 100 - }] + "indexingSearchListSize": 100, + } + ], } self.test_db.replace_container( created_container, PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=new_indexing_policy) + indexing_policy=new_indexing_policy, + ) properties = created_container.read() assert properties["vectorEmbeddingPolicy"] == vector_embedding_policy assert properties["indexingPolicy"]["vectorIndexes"] == indexing_policy["vectorIndexes"] @@ -253,31 +217,16 @@ def test_replace_vector_indexing_policy(self): def test_fail_create_vector_indexing_policy(self): vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, - { - "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" - } + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, ] } # Pass a vector indexing policy without embedding policy - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "flat"}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "flat"}]} try: self.test_db.create_container( - id='vector_container', - partition_key=PartitionKey(path="/id"), - indexing_policy=indexing_policy + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy ) pytest.fail("Container creation should have failed for lack of embedding policy.") except exceptions.CosmosHttpResponseError as e: @@ -285,16 +234,13 @@ def test_fail_create_vector_indexing_policy(self): assert "vector1 not matching in Embedding's path" in e.http_error_message # Pass a vector indexing policy with an invalid type - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "notFlat"}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "notFlat"}]} try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for wrong index type.") except exceptions.CosmosHttpResponseError as e: @@ -302,16 +248,13 @@ def test_fail_create_vector_indexing_policy(self): assert "Index Type::notFlat is invalid" in e.http_error_message # Pass a vector indexing policy with non-matching path - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector3", "type": "flat"}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector3", "type": "flat"}]} try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for index mismatch.") except exceptions.CosmosHttpResponseError as e: @@ -319,52 +262,49 @@ def test_fail_create_vector_indexing_policy(self): assert "vector3 not matching in Embedding's path" in e.http_error_message # Pass a vector indexing policy with wrong quantizationByteSize value - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "quantizedFlat", "quantizationByteSize": 0}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "quantizedFlat", "quantizationByteSize": 0}]} try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Vector Indexing Policy parameter QuantizationByteSize value :: 0 is out of range. The allowed range is between 1 and 256."\ - in e.http_error_message + assert ( + "The Vector Indexing Policy parameter QuantizationByteSize value :: 0 is out of range. The allowed range is between 1 and 256." + in e.http_error_message + ) # Pass a vector indexing policy with wrong indexingSearchListSize value - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "diskANN", "indexingSearchListSize": 5}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "diskANN", "indexingSearchListSize": 5}]} try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "IndexingSearchListSize value :: 5 is out of range. The allowed range is between 25 and 500."\ - in e.http_error_message + assert ( + "IndexingSearchListSize value :: 5 is out of range. The allowed range is between 25 and 500." + in e.http_error_message + ) # Pass a vector indexing policy with wrong vectorIndexShardKey value indexing_policy = { - "vectorIndexes": [ - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["country"]}] + "vectorIndexes": [{"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["country"]}] } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: @@ -374,148 +314,135 @@ def test_fail_create_vector_indexing_policy(self): # Pass a vector indexing policy with too many shard paths indexing_policy = { "vectorIndexes": [ - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/country", "/city", "/zipcode"]}] + {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/country", "/city", "/zipcode"]} + ] } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The number of shard paths defined in the Vector Indexing Policy: 3 exceeds the maximum: 1." \ - in e.http_error_message + assert ( + "The number of shard paths defined in the Vector Indexing Policy: 3 exceeds the maximum: 1." + in e.http_error_message + ) # Pass a vector indexing policy with an invalid type for vectorIndexShardKey indexing_policy = { - "vectorIndexes": [ - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": "/country"}] + "vectorIndexes": [{"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": "/country"}] } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "One of the specified inputs is invalid" \ - in e.http_error_message + assert "One of the specified inputs is invalid" in e.http_error_message # Pass a vector indexing policy with dimensions above 512 to test the max range of "quantizationByteSize" vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 550, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": 550, "distanceFunction": "euclidean"} + ] + } indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "quantizedFlat", "quantizationByteSize": 513 }] + "vectorIndexes": [{"path": "/vector1", "type": "quantizedFlat", "quantizationByteSize": 513}] } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Vector Indexing Policy parameter QuantizationByteSize value :: 513 is out of range." \ - in e.http_error_message + assert ( + "The Vector Indexing Policy parameter QuantizationByteSize value :: 513 is out of range." + in e.http_error_message + ) def test_fail_replace_vector_indexing_policy(self): vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }]} - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "flat"}] + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"} + ] } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "flat"}]} container_id = "vector_container" + str(uuid.uuid4()) created_container = self.test_db.create_container( id=container_id, partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) # don't provide vector embedding policy try: - self.test_db.replace_container( - created_container, - PartitionKey(path="/id"), - indexing_policy=indexing_policy) + self.test_db.replace_container(created_container, PartitionKey(path="/id"), indexing_policy=indexing_policy) pytest.fail("Container replace should have failed for missing embedding policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert ("The Vector Indexing Policy's path::/vector1 not matching in Embedding's path." - in e.http_error_message) + assert ( + "The Vector Indexing Policy's path::/vector1 not matching in Embedding's path." in e.http_error_message + ) # using a new indexing policy - new_indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "quantizedFlat"}] - } + new_indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "quantizedFlat"}]} try: self.test_db.replace_container( created_container, PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=new_indexing_policy) + indexing_policy=new_indexing_policy, + ) pytest.fail("Container replace should have failed for new indexing policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert ("Paths in existing vector indexing policy cannot be modified in Collection Replace" - in e.http_error_message) + assert ( + "Paths in existing vector indexing policy cannot be modified in Collection Replace" + in e.http_error_message + ) # using a new vector embedding policy new_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 384, - "distanceFunction": "euclidean"}]} + {"path": "/vector1", "dataType": "float32", "dimensions": 384, "distanceFunction": "euclidean"} + ] + } try: self.test_db.replace_container( created_container, PartitionKey(path="/id"), vector_embedding_policy=new_embedding_policy, - indexing_policy=indexing_policy) + indexing_policy=indexing_policy, + ) pytest.fail("Container replace should have failed for new embedding policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert ("Paths in existing embedding policy cannot be modified in Collection Replace" - in e.http_error_message) + assert "Paths in existing embedding policy cannot be modified in Collection Replace" in e.http_error_message self.test_db.delete_container(container_id) def test_fail_create_vector_embedding_policy(self): # Using invalid data type vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float33", - "dimensions": 256, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float33", "dimensions": 256, "distanceFunction": "euclidean"} + ] + } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 @@ -524,37 +451,35 @@ def test_fail_create_vector_embedding_policy(self): # Using too many dimensions vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 8000, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": 8000, "distanceFunction": "euclidean"} + ] + } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "Vector Embedding Policy has Dimensions:8000 which is more than the maximum" \ - " supported value" in e.http_error_message + assert ( + "Vector Embedding Policy has Dimensions:8000 which is more than the maximum" + " supported value" in e.http_error_message + ) # Using negative dimensions vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": -1, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": -1, "distanceFunction": "euclidean"} + ] + } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 @@ -563,17 +488,14 @@ def test_fail_create_vector_embedding_policy(self): # Using invalid distance function vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "handMeasured" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "handMeasured"} + ] + } try: self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: @@ -581,5 +503,5 @@ def test_fail_create_vector_embedding_policy(self): assert "The Vector Embedding Policy has an invalid DistanceFunction:handMeasured" in e.http_error_message -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/test_vector_policy_async.py b/sdk/cosmos/azure-cosmos/tests/test_vector_policy_async.py index dd0c779982db..86bdf2b7cd83 100644 --- a/sdk/cosmos/azure-cosmos/tests/test_vector_policy_async.py +++ b/sdk/cosmos/azure-cosmos/tests/test_vector_policy_async.py @@ -13,6 +13,7 @@ from azure.cosmos.aio import CosmosClient from test_vector_policy import VectorPolicyTestData + @pytest.mark.cosmosSearchQuery class TestVectorPolicyAsync(unittest.IsolatedAsyncioTestCase): host = test_config.TestConfig.host @@ -26,12 +27,12 @@ class TestVectorPolicyAsync(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - if (cls.masterKey == '[YOUR_KEY_HERE]' or - cls.host == '[YOUR_ENDPOINT_HERE]'): + if cls.masterKey == "[YOUR_KEY_HERE]" or cls.host == "[YOUR_ENDPOINT_HERE]": raise Exception( "You must specify your Azure Cosmos account values for " "'masterKey' and 'host' at the top of this class to run the " - "tests.") + "tests." + ) cls.cosmos_sync_client = CosmosSyncClient(cls.host, cls.masterKey) cls.test_db = cls.cosmos_sync_client.create_database(str(uuid.uuid4())) @@ -56,9 +57,10 @@ async def test_create_valid_vector_indexing_policy_async(self): id="container_" + str(uuid.uuid4()), partition_key=PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=indexing_policy) + indexing_policy=indexing_policy, + ) properties = await created_container.read() - assert properties['indexingPolicy']['vectorIndexes'] == indexing_policy['vectorIndexes'] + assert properties["indexingPolicy"]["vectorIndexes"] == indexing_policy["vectorIndexes"] await self.test_db.delete_container(created_container.id) async def test_create_valid_vector_embedding_policy_async(self): @@ -67,17 +69,13 @@ async def test_create_valid_vector_embedding_policy_async(self): for data_type in data_types: vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": data_type, - "dimensions": 256, - "distanceFunction": "euclidean" - }]} - container_id = 'vector_container_' + data_type + {"path": "/vector1", "dataType": data_type, "dimensions": 256, "distanceFunction": "euclidean"} + ] + } + container_id = "vector_container_" + data_type created_container = await self.test_db.create_container( - id=container_id, - partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + id=container_id, partition_key=PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy + ) properties = await created_container.read() assert properties["vectorEmbeddingPolicy"]["vectorEmbeddings"][0]["dataType"] == data_type await self.test_db.delete_container(container_id) @@ -86,32 +84,27 @@ async def test_create_vector_embedding_container_async(self): indexing_policy = { "vectorIndexes": [ {"path": "/vector1", "type": "flat"}, - - {"path": "/vector2", "type": "quantizedFlat", "quantizerType": "product", "quantizationByteSize": 64, "vectorIndexShardKey": ["/city"]}, - - {"path": "/vector3", "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 8, "indexingSearchListSize": 50} - ] - } - vector_embedding_policy = { - "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, { "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" + "type": "quantizedFlat", + "quantizerType": "product", + "quantizationByteSize": 64, + "vectorIndexShardKey": ["/city"], }, { "path": "/vector3", - "dataType": "uint8", - "dimensions": 400, - "distanceFunction": "cosine" - } + "type": "diskANN", + "quantizerType": "product", + "quantizationByteSize": 8, + "indexingSearchListSize": 50, + }, + ] + } + vector_embedding_policy = { + "vectorEmbeddings": [ + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, + {"path": "/vector3", "dataType": "uint8", "dimensions": 400, "distanceFunction": "cosine"}, ] } container_id = "vector_container" + str(uuid.uuid4()) @@ -119,7 +112,7 @@ async def test_create_vector_embedding_container_async(self): id=container_id, partition_key=PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=indexing_policy + indexing_policy=indexing_policy, ) properties = await created_container.read() assert properties["vectorEmbeddingPolicy"] == vector_embedding_policy @@ -131,30 +124,14 @@ async def test_replace_vector_indexing_policy_async(self): # the previously defined vector embedding policy is also provided. vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - } + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"} ] } indexing_policy = { "indexingMode": "consistent", "automatic": True, - "includedPaths": [ - { - "path": "/*" - } - ], - "excludedPaths": [ - { - "path": "/vector1/*" - }, - { - "path": "/\"_etag\"/?" - } - ], + "includedPaths": [{"path": "/*"}], + "excludedPaths": [{"path": "/vector1/*"}, {"path": '/"_etag"/?'}], "fullTextIndexes": [], "vectorIndexes": [ { @@ -162,30 +139,22 @@ async def test_replace_vector_indexing_policy_async(self): "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 128, - "indexingSearchListSize": 100 + "indexingSearchListSize": 100, } - ] + ], } container_id = "vector_container" + str(uuid.uuid4()) created_container = await self.test_db.create_container( id=container_id, partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) new_indexing_policy = { "indexingMode": "consistent", "automatic": True, - "includedPaths": [ - {"path": "/color/?"}, - {"path": "/description/?"}, - {"path": "/cost/?"} - ], - "excludedPaths": [ - {"path": "/*"}, - {"path": "/vector1/*"}, - {"path": "/\"_etag\"/?"} - ], + "includedPaths": [{"path": "/color/?"}, {"path": "/description/?"}, {"path": "/cost/?"}], + "excludedPaths": [{"path": "/*"}, {"path": "/vector1/*"}, {"path": '/"_etag"/?'}], "fullTextIndexes": [], "vectorIndexes": [ { @@ -193,14 +162,16 @@ async def test_replace_vector_indexing_policy_async(self): "type": "diskANN", "quantizerType": "product", "quantizationByteSize": 128, - "indexingSearchListSize": 100 - }] + "indexingSearchListSize": 100, + } + ], } await self.test_db.replace_container( created_container, PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=new_indexing_policy) + indexing_policy=new_indexing_policy, + ) properties = await created_container.read() assert properties["vectorEmbeddingPolicy"] == vector_embedding_policy assert properties["indexingPolicy"]["vectorIndexes"] == indexing_policy["vectorIndexes"] @@ -209,31 +180,16 @@ async def test_replace_vector_indexing_policy_async(self): async def test_fail_create_vector_indexing_policy_async(self): vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }, - { - "path": "/vector2", - "dataType": "int8", - "dimensions": 200, - "distanceFunction": "dotproduct" - } + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"}, + {"path": "/vector2", "dataType": "int8", "dimensions": 200, "distanceFunction": "dotproduct"}, ] } # Pass a vector indexing policy without embedding policy - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "flat"}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "flat"}]} try: await self.test_db.create_container( - id='vector_container', - partition_key=PartitionKey(path="/id"), - indexing_policy=indexing_policy + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy ) pytest.fail("Container creation should have failed for lack of embedding policy.") except exceptions.CosmosHttpResponseError as e: @@ -241,16 +197,13 @@ async def test_fail_create_vector_indexing_policy_async(self): assert "vector1 not matching in Embedding's path" in e.http_error_message # Pass a vector indexing policy with an invalid type - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "notFlat"}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "notFlat"}]} try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for wrong index type.") except exceptions.CosmosHttpResponseError as e: @@ -258,16 +211,13 @@ async def test_fail_create_vector_indexing_policy_async(self): assert "Index Type::notFlat is invalid" in e.http_error_message # Pass a vector indexing policy with non-matching path - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector3", "type": "flat"}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector3", "type": "flat"}]} try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for index mismatch.") except exceptions.CosmosHttpResponseError as e: @@ -275,52 +225,49 @@ async def test_fail_create_vector_indexing_policy_async(self): assert "vector3 not matching in Embedding's path" in e.http_error_message # Pass a vector indexing policy with wrong quantizationByteSize value - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "quantizedFlat", "quantizationByteSize": 0}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "quantizedFlat", "quantizationByteSize": 0}]} try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The Vector Indexing Policy parameter QuantizationByteSize value :: 0 is out of range. The allowed range is between 1 and 256." \ - in e.http_error_message + assert ( + "The Vector Indexing Policy parameter QuantizationByteSize value :: 0 is out of range. The allowed range is between 1 and 256." + in e.http_error_message + ) # Pass a vector indexing policy with wrong indexingSearchListSize value - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "diskANN", "indexingSearchListSize": 5}] - } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "diskANN", "indexingSearchListSize": 5}]} try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "IndexingSearchListSize value :: 5 is out of range. The allowed range is between 25 and 500." \ - in e.http_error_message + assert ( + "IndexingSearchListSize value :: 5 is out of range. The allowed range is between 25 and 500." + in e.http_error_message + ) # Pass a vector indexing policy with wrong vectorIndexShardKey value indexing_policy = { - "vectorIndexes": [ - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["country"]}] + "vectorIndexes": [{"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["country"]}] } try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: @@ -330,104 +277,97 @@ async def test_fail_create_vector_indexing_policy_async(self): # Pass a vector indexing policy with too many shard paths indexing_policy = { "vectorIndexes": [ - {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/country", "/city", "/zipcode"]}] + {"path": "/vector2", "type": "diskANN", "vectorIndexShardKey": ["/country", "/city", "/zipcode"]} + ] } try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed for value mismatch.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "The number of shard paths defined in the Vector Indexing Policy: 3 exceeds the maximum: 1." \ - in e.http_error_message + assert ( + "The number of shard paths defined in the Vector Indexing Policy: 3 exceeds the maximum: 1." + in e.http_error_message + ) async def test_fail_replace_vector_indexing_policy_async(self): vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "euclidean" - }]} - indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "flat"}] + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "euclidean"} + ] } + indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "flat"}]} container_id = "vector_container" + str(uuid.uuid4()) created_container = await self.test_db.create_container( id=container_id, partition_key=PartitionKey(path="/id"), indexing_policy=indexing_policy, - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) # don't provide vector embedding policy try: await self.test_db.replace_container( - created_container, - PartitionKey(path="/id"), - indexing_policy=indexing_policy) + created_container, PartitionKey(path="/id"), indexing_policy=indexing_policy + ) pytest.fail("Container replace should have failed for missing embedding policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert ("The Vector Indexing Policy's path::/vector1 not matching in Embedding's path." - in e.http_error_message) + assert ( + "The Vector Indexing Policy's path::/vector1 not matching in Embedding's path." in e.http_error_message + ) # using a new indexing policy - new_indexing_policy = { - "vectorIndexes": [ - {"path": "/vector1", "type": "quantizedFlat"}] - } + new_indexing_policy = {"vectorIndexes": [{"path": "/vector1", "type": "quantizedFlat"}]} try: await self.test_db.replace_container( created_container, PartitionKey(path="/id"), vector_embedding_policy=vector_embedding_policy, - indexing_policy=new_indexing_policy) + indexing_policy=new_indexing_policy, + ) pytest.fail("Container replace should have failed for new indexing policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert ("Paths in existing vector indexing policy cannot be modified in Collection Replace" - in e.http_error_message) + assert ( + "Paths in existing vector indexing policy cannot be modified in Collection Replace" + in e.http_error_message + ) # using a new vector embedding policy new_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 384, - "distanceFunction": "euclidean"}]} + {"path": "/vector1", "dataType": "float32", "dimensions": 384, "distanceFunction": "euclidean"} + ] + } try: await self.test_db.replace_container( created_container, PartitionKey(path="/id"), vector_embedding_policy=new_embedding_policy, - indexing_policy=indexing_policy) + indexing_policy=indexing_policy, + ) pytest.fail("Container replace should have failed for new embedding policy.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert ("Paths in existing embedding policy cannot be modified in Collection Replace" - in e.http_error_message) + assert "Paths in existing embedding policy cannot be modified in Collection Replace" in e.http_error_message await self.test_db.delete_container(container_id) async def test_fail_create_vector_embedding_policy_async(self): # Using invalid data type vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float33", - "dimensions": 256, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float33", "dimensions": 256, "distanceFunction": "euclidean"} + ] + } try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 @@ -436,37 +376,35 @@ async def test_fail_create_vector_embedding_policy_async(self): # Using too many dimensions vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 8000, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": 8000, "distanceFunction": "euclidean"} + ] + } try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 - assert "Vector Embedding Policy has Dimensions:8000 which is more than the maximum" \ - " supported value" in e.http_error_message + assert ( + "Vector Embedding Policy has Dimensions:8000 which is more than the maximum" + " supported value" in e.http_error_message + ) # Using negative dimensions vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": -1, - "distanceFunction": "euclidean" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": -1, "distanceFunction": "euclidean"} + ] + } try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy) + vector_embedding_policy=vector_embedding_policy, + ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: assert e.status_code == 400 @@ -475,17 +413,14 @@ async def test_fail_create_vector_embedding_policy_async(self): # Using invalid distance function vector_embedding_policy = { "vectorEmbeddings": [ - { - "path": "/vector1", - "dataType": "float32", - "dimensions": 256, - "distanceFunction": "handMeasured" - }]} + {"path": "/vector1", "dataType": "float32", "dimensions": 256, "distanceFunction": "handMeasured"} + ] + } try: await self.test_db.create_container( - id='vector_container', + id="vector_container", partition_key=PartitionKey(path="/id"), - vector_embedding_policy=vector_embedding_policy + vector_embedding_policy=vector_embedding_policy, ) pytest.fail("Container creation should have failed but succeeded.") except exceptions.CosmosHttpResponseError as e: @@ -493,5 +428,5 @@ async def test_fail_create_vector_embedding_policy_async(self): assert "The Vector Embedding Policy has an invalid DistanceFunction:handMeasured" in e.http_error_message -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/cosmos/azure-cosmos/tests/vector_test_data.py b/sdk/cosmos/azure-cosmos/tests/vector_test_data.py index eceeaf1d4b7f..7810a1936ec3 100644 --- a/sdk/cosmos/azure-cosmos/tests/vector_test_data.py +++ b/sdk/cosmos/azure-cosmos/tests/vector_test_data.py @@ -1,40 +1,1392 @@ - def get_vector_items(): - return [{'id': 'item0', 'pk': '1', 'text': 'Good morning!', 'embedding': [-0.008334724, -0.05993167, -0.0903545, -0.04791922, -0.01825805, -0.053011455, 0.120733805, 0.017714009, 0.07346743, 0.11559805, 0.03262076, 0.074512, 0.015864266, 0.01981401, 0.007850527, 0.076296456, -0.08539284, 0.016593281, -0.05423011, 0.07520837, 0.074250855, 0.056754466, -0.022098986, 0.03155444, 0.04334927, 0.024655985, -0.02109795, 0.044023883, -0.027550288, -0.11350893, -0.022806242, 0.08608921, 0.009221513, 0.06659074, 0.09087678, 0.024830079, 0.0075513036, 0.036472578, 0.015418151, 0.060497474, 0.010940685, -0.059365865, 0.043566886, 0.00427073, -0.023546139, 0.030357545, -0.03403527, 0.1182965, 0.1115939, -0.018954424, 0.0032452107, 0.10297628, 0.15328929, -0.016952349, -0.04530782, 0.04674409, -8.351895e-05, -0.19376601, -0.025091218, -0.03664667, -0.011860116, -0.10454312, -0.13109237, -0.049268447, 0.17557324, 0.044872586, 0.046787616, 0.15337633, -0.019509347, 0.0077743605, 0.04556896, -0.08413066, -0.028681897, 0.1209079, 0.1357929, -0.09314, 0.12534729, -0.065546185, 0.12212656, 0.04892026, 0.07394619, -0.08134516, -0.004493787, 0.08138869, 0.028573086, 0.12290998, -0.16477945, -0.29839617, -0.08090993, 0.12256179, 0.16591106, -0.08173688, -0.034383457, -0.1076768, -0.043022845, -0.07655759, 0.2021225, 0.03923631, 0.07703635, -0.08587159, 0.06498038, -0.08330371, 0.16486649, -0.14040637, 0.02070624, -0.069855, 0.052880887, 0.016136287, 0.00024294876, -0.19968519, 0.06933272, 0.013241983, 0.0004002109, 0.14998151, 0.07516485, 0.18610589, -0.07895138, -0.108982496, -0.03494926, -0.027637335, -0.032925423, -0.009509855, 0.1182965, -0.075513035, -0.08665501, 0.019629037, 0.2583547, 0.00983084]}, - {'id': 'item1', 'pk': '2', 'text': 'Good afternoon!', 'embedding': [-0.04136167, -0.047741424, -0.08737179, -3.0502639e-05, 0.054595508, -0.11298566, 0.0906921, 0.108052626, 0.04729081, 0.21287979, -0.06588459, -0.052793052, -0.05568647, 0.017384235, -0.02518698, 0.021665072, -0.19238868, 0.03379609, 0.0075359354, -0.04989963, 0.055449303, 0.03282371, 0.026064493, 0.042096883, -0.007192045, 0.0786441, -0.09012291, 0.094012424, -0.0031483725, -0.0318039, -0.034721036, 0.10255038, 0.08851018, 0.11327027, 0.031614166, 0.006035863, 0.021321183, 0.0703433, 0.14201473, 0.058674756, -0.007986549, 0.03329804, 0.08884221, -0.09505595, -0.015522485, -0.068161376, 0.072572656, 0.049235567, 0.2263508, 0.029574543, -0.050563693, 0.050516263, 0.04660303, 0.08376687, 0.017514676, 0.0706279, 0.007921329, -0.1353741, -0.054358345, -0.1628853, -0.097617336, -0.123326086, -0.0489984, -0.0693472, 0.15396787, 0.027368903, 0.06042978, 0.22862759, -0.016293272, 0.033582643, 0.06697555, -0.10302471, -0.12104929, 0.18034068, 0.068303674, 0.003468546, 0.07480201, -0.1204801, 0.06787678, -0.042926963, 0.15785739, -0.034531303, -0.028934196, 0.022933908, -0.012012435, 0.004248228, -0.19172463, -0.31837103, -0.099230066, 0.02071641, 0.18546346, 0.06299117, -0.047053643, -0.09206767, 0.049472734, -0.046365865, 0.18214314, 0.0051079527, 0.105680965, -0.026443958, 0.072714955, -0.08073115, 0.09429702, -0.113744594, 0.02092986, -0.013625161, -0.07390078, 0.020550394, 0.011787128, -0.13499463, 0.015107445, -0.0015223064, 0.040104695, 0.094961084, 0.13404597, 0.082486175, -0.07428025, -0.026847139, -0.025163265, -0.09818654, 0.010043961, 0.013601444, 0.077932596, 0.016056107, -0.026965722, 0.045606934, 0.085047565, -0.005878741]}, - {'id': 'item2', 'pk': '1', 'text': 'Great weather today!', 'embedding': [0.07557184, -0.047335204, -0.054325826, 0.011354052, 0.07698824, -0.025358144, -0.07927276, 0.1510523, 0.022251202, 0.026249107, -0.021725763, 0.062047496, 0.14556946, -0.0006071819, -0.107098185, 0.021394506, -0.13771072, -0.10527057, 0.115048304, -0.048842985, -0.059443146, 0.060585406, -0.014940745, 0.18075103, 0.053777542, -0.022057017, 0.08493836, 0.1198001, 0.041555375, -0.066525154, 0.054280136, 0.107646465, 0.023359193, -0.0046632714, -0.1017981, 0.04105278, 0.11376897, 0.016437104, 0.067393266, 0.0961325, -0.017727856, -0.03333111, -0.020492123, -0.041943744, 0.0031040881, -0.028053876, 0.053640474, -0.02215982, 0.08205987, 0.015100661, -0.17133881, -0.05843796, 0.0895074, -0.04064157, -0.10225501, 0.11367759, -0.03593546, -0.010999952, -0.14273666, -0.010383132, 0.026112035, -0.14200561, -0.0634639, -0.04029889, 0.07383561, 0.116784535, 0.0805064, 0.13241065, -0.100884296, -0.10216363, -0.030384084, -0.07657703, -0.06323545, -0.013101708, 0.15233164, -0.009880538, 0.16448526, -0.11148446, -0.05606206, -0.11587073, 0.084892675, -0.1397211, -0.04948265, 0.006470896, 0.015637523, 0.09051259, -0.12665366, -0.28583884, -0.16046451, 0.055833608, 0.100244634, 0.013535767, -0.07155109, -0.10051877, 0.08662891, -0.0729218, 0.15818, 0.025449526, 0.05053353, -0.015740326, -0.0767141, -0.056381892, 0.091517776, -0.075114936, -0.04621579, -0.040458806, 0.03947646, 0.10901718, 0.0076417113, -0.34487078, 0.024375802, -0.072419204, 0.053000808, 0.04057303, -0.08434439, 0.027185759, 0.03403931, -0.06332683, 0.051858548, 0.011993717, 0.10728095, -0.09887392, 0.07593736, -0.0025172527, 0.1089258, -0.048934367, 0.051264573, 0.017008234]}, - {'id': 'item3', 'pk': '2', 'text': "Hope you're doing well.", 'embedding': [-0.016385807, 0.16914073, -0.062722616, 0.009645036, 0.06367876, -0.10871283, -0.034588274, 0.0038275379, 0.107661076, 0.069654614, 0.036404934, -0.037910853, 0.08872956, 0.14571536, -0.082227826, 0.034731694, -0.07405285, 0.050340638, -0.16569862, -0.20671692, -0.0834708, 0.0043175584, -0.017234378, 0.052683175, 0.013863994, 0.12142946, -0.002630872, 0.069702424, 0.095804974, -0.10020321, 0.0793116, 0.028970966, 0.13940485, 0.15814514, 0.11597948, -0.03795866, -0.018178564, 0.14753202, -0.10670494, -0.055455975, 0.058037546, -0.04457991, -0.0046014115, -0.018704439, 0.07902476, -0.07902476, 0.031026661, -0.017855868, 0.098769, 0.118847884, -0.051488005, 0.009017572, 0.15068726, 0.044962365, 0.18233542, -0.0006853563, 0.11205931, -0.2602606, 0.09848216, 0.08681728, -0.077638365, -0.008664995, 0.010314333, -0.0361659, 0.047185384, 0.09202823, 0.004359389, -0.008545479, -0.08815587, 0.0765388, 0.012262463, 0.0542608, -0.10813915, 0.11722245, 0.013744476, -0.08265808, 0.008055458, 0.12085578, 0.056364305, -0.12907855, -0.05311344, -0.060666922, 0.117031224, 0.029233903, -0.148775, 0.017879771, -0.081558526, -0.26332027, -0.22029407, -0.07410065, 0.0059340284, -0.11234615, -0.06898532, 0.046516087, 0.06798138, -0.049193274, -0.04687464, -0.049002044, -0.03145692, 0.0065614935, -0.021274058, -0.060188852, -0.04584679, -0.015979448, 0.08949447, -0.050197218, -0.051440194, -0.1341461, 0.08557431, -0.08261028, -0.104314595, -0.016134819, 0.057320442, -0.022421423, 0.012501498, 0.055503782, 0.020568907, -0.095183484, 0.0049450235, -0.03525757, 0.17688543, -0.06888971, -0.005694994, 0.05622088, -0.04250031, 0.050053798, 0.16063109, 0.06353533]}, - {'id': 'item4', 'pk': '1', 'text': 'Excuse me please.', 'embedding': [-0.19188246, 0.018719073, -0.032395326, 0.09734556, 0.021671357, -0.11751684, -0.078514785, 0.16507255, -0.0012956136, 0.117006175, -0.065492816, 0.106282204, -0.009750514, -0.006008296, 0.021799022, 0.04643862, -0.046023704, -0.023442727, 0.12868765, -0.1466886, -0.085089594, -0.046885453, -0.0067742937, 0.048162118, -0.04739612, 0.021687314, -0.025581138, 0.04841745, -0.10519704, -0.039129723, -0.09747323, 0.10532471, 0.04375763, 0.09536674, 0.0145938555, -0.0060681393, 0.26171595, 0.1815415, -0.03833181, 0.012487361, -0.027192924, -0.12281499, 0.017937116, -0.02173519, 0.07308897, -0.06913131, 0.07417413, -0.01884674, 0.049023863, -0.049949445, 0.081068106, 0.22060739, -0.031645287, -0.024735348, -0.041108552, 0.1823075, -0.06230116, -0.119048834, -0.07813178, -0.0841321, -0.007711843, 0.039576557, -0.07589762, 0.028198296, 0.003087929, 0.047970615, 0.0845151, 0.08208944, 0.07423796, 0.01259907, 0.00046179298, 0.024671515, 0.10302671, 0.12160216, 0.1353263, -0.16251922, 0.069195144, -0.09160058, 0.033320908, -0.06341824, -0.06402466, -0.048864283, -0.10053722, -0.019341446, 0.027033342, -0.19354212, -0.011146865, -0.31329313, 0.054513514, -0.0098861605, 0.10277138, 0.059237167, 0.021495815, -0.0704718, 0.14285861, 0.042672466, 0.057769008, 0.054353934, -0.041363884, 0.07819562, 0.1085802, -0.0047874865, 0.0035626881, 0.025405597, 0.0032953867, 0.13430496, -0.084451266, -0.10883553, 0.115601845, -0.072259136, -0.06976964, -0.1081972, 0.08515343, 0.044715125, 0.05725834, -0.06759931, -0.0421618, -0.06185433, -0.068939805, -0.13673063, -0.032874074, -0.121538326, -0.010157451, -0.048608948, 0.049949445, 0.031310163, 0.13238996, 0.06855681]}, - {'id': 'item5', 'pk': '2', 'text': 'Is this the right place?', 'embedding': [-0.05695127, 0.07729321, -0.07253956, 0.054049686, -0.084886715, -0.1677979, -0.020681491, -0.010765179, -0.05312365, 0.10964277, -0.1724898, -0.0139754405, -0.019446775, -0.009877727, 0.10902541, 0.06599557, -0.20224646, -0.008658445, -0.11698933, -0.00034678154, 0.059760246, 0.023660243, 0.014523345, 0.058340326, -0.116927594, -0.0011546522, 0.035991967, 0.017857078, -0.21261807, -0.07568809, -0.007250097, 0.09525833, 0.073033445, -0.078157514, -0.14816591, -0.089578636, -0.006030815, 0.08519539, 0.059852853, 0.12328638, 0.08544234, -0.017656436, -0.03901702, 0.036238912, -0.09482618, 0.007215371, 0.15742627, 0.014183799, 0.107914165, 0.014245534, -0.011907292, 0.025188204, 0.057630364, -0.057321683, 0.0024366346, 0.034695517, 0.11766842, -0.16520499, 0.065193, 0.10822285, -0.06834152, -0.048925616, -0.078836605, 0.05161112, 0.07235435, 0.07636718, -0.075996764, 0.13902901, 0.023860885, 0.07846619, 0.02665443, -0.026870504, -0.0084115015, 0.07550287, 0.07500899, -0.07395948, 0.05062335, 0.05621044, -0.031531557, -0.001280053, 0.06908235, 0.078280985, -0.060068928, 0.14236274, 0.14236274, 0.06358787, -0.042474225, -0.38053942, 0.062785305, 0.050870296, 0.038677476, -0.078157514, 0.029309068, -0.07809578, 0.07439163, -0.06772417, 0.11896487, 0.073589064, 0.05238282, 0.018196626, 0.116371974, 0.0033067234, -0.020264775, -0.006304768, -0.10686466, 0.08408415, -0.04386328, -0.0068681072, 0.08994905, -0.059513304, 0.021823604, 0.049419504, -0.012817894, -0.093221046, 0.02802805, 0.089578636, 0.07124311, -0.26694557, 0.024833223, -0.03802925, -0.18483697, -0.1103836, 0.11877967, 0.07000839, -0.018860284, -0.044974525, -0.034016423, 0.022780508]}, - {'id': 'item6', 'pk': '1', 'text': 'Awful weather today.', 'embedding': [0.002305239, -0.02629875, 0.009952777, 0.026884208, -0.0067561795, -0.1118458, 0.07432968, 0.0999493, 0.02177902, -0.047726493, 0.042059265, 0.1583077, 0.11175212, 0.07685886, -0.14060347, 0.005084698, -0.19277944, -0.05606341, 0.082619764, -0.04241054, 0.09620237, 0.011832096, -0.023301208, 0.28214368, 0.02451896, 0.02793803, 0.03358184, 0.044424515, 0.11006601, 0.038101573, 0.0077982936, 0.045572013, 0.075922124, 0.016369391, -0.0039986745, 0.22781321, 0.062854715, 0.048054352, 0.010251361, 0.07170683, -0.018816603, 0.027329156, -0.08482108, -0.079481706, 0.042785235, 0.024120849, 0.17413847, 0.035431888, 0.12439801, 0.10641275, -0.14828467, -0.024425287, 0.083415985, 0.1184966, 0.0026799317, 0.15399873, -0.010304051, 0.009742012, -0.10781785, -0.019472316, 0.061777476, -0.09798217, 0.028804509, -0.023371464, 0.015491205, 0.07521958, 0.024003757, 0.013465522, -0.089692086, -0.097794816, 0.021193562, -0.0592483, -0.056438103, -0.10987866, 0.11802823, -0.06440032, 0.07704621, -0.040138967, -0.13891736, -0.16027485, 0.08631986, -0.16786237, -0.085757814, 0.015491205, -0.013243048, 0.09133137, -0.16196096, -0.2313728, -0.083134964, 0.12308659, 0.07559427, 0.09723278, 0.048663225, -0.13339064, 0.016345974, -0.13189186, 0.11025336, 0.03346475, -0.00688498, -0.059435643, 0.0056877197, 0.014999421, 0.063650936, -0.15053283, -0.017481761, 0.05194179, 0.061402783, 0.0077924393, 0.19971126, -0.07713988, 0.06425981, 0.0021369199, 0.12158781, -0.024331613, -0.008571098, 0.03264511, -0.0020242194, -0.05507984, -0.00805004, -0.03304322, 0.050630365, -0.1475353, -0.003735219, -0.0202217, 0.16271034, -0.059435643, 0.06023187, 0.06660164]}, - {'id': 'item7', 'pk': '2', 'text': 'Dinosaurs were huge.', 'embedding': [0.09842033, -0.025395654, -0.03831241, 0.037825905, 0.17008278, -0.022269849, -0.05935383, 0.032668933, -0.022148222, 0.08178179, -0.062710725, 0.164342, -0.024021273, -0.052640036, 0.027366007, 0.18098053, -0.18487258, -0.008903074, 0.16346629, 0.009407825, 0.110339746, -0.046315446, 0.08046822, 0.12512955, -0.06635953, 0.0070239417, 0.055753678, -0.0005336371, -0.012326866, 0.1578228, -0.023668556, -0.035904203, 0.05988899, -0.08032227, -0.11520481, 0.08499274, 0.05093726, -0.09248494, -0.011128843, -0.07064079, 0.01466818, 0.082073696, -0.040574666, -0.07292737, 0.03539337, 0.05025615, -0.1145237, 0.09584184, 0.04186391, -0.034833886, -0.18234275, -0.090441614, -0.09194978, -0.031331036, -0.13106494, 0.068208255, 0.03220675, -0.031233737, -0.04337208, 0.1289243, 0.1363192, 0.052494083, 0.03074723, -0.000113359885, 0.07681943, 0.03962598, 0.016529068, -0.04191256, -0.03612313, 0.023084749, 0.10917213, 0.09477153, -0.09652295, -0.0999285, 0.11685894, -0.012649177, 0.043688312, -0.10333405, -0.060521446, -0.042034186, 0.0483831, 0.0028141378, -0.17270991, 0.05424551, 0.25570798, 0.09511208, -0.08504139, -0.1570444, -0.084262975, -0.13291366, -0.023741532, -0.14857918, 0.09190113, -0.08041958, -0.019837314, 0.09569589, -0.053029243, -0.030722905, -0.05239678, -0.15091442, -0.05872137, -0.056045584, 0.11831845, -0.1145237, -0.08761988, -0.0035727844, -0.05570503, 0.19285129, 0.011761302, 0.087717175, 0.107712604, -0.11277228, -0.042423394, 0.13048112, -0.03356897, 0.056775343, 0.08640361, -0.11831845, -0.10868562, 0.0410855, 0.12036178, -0.09477153, -0.017611546, 0.0075043673, -0.12668636, -0.006391483, 0.0012185475, -0.05161837]}, - {'id': 'item8', 'pk': '1', 'text': 'The hero saves the day again.', 'embedding': [0.11208976, 0.058739875, -0.017022463, 0.15080968, -0.0031057745, -0.048069898, -0.059069872, 0.09861479, 0.11626975, 0.12935972, 0.008882481, 0.08766981, -0.00940498, -0.077164836, 0.0015795279, 0.06297486, -0.06313986, 0.0931698, -0.17247963, -0.12077974, -0.044797402, -0.1404697, -0.050077394, 0.020432455, 0.07897983, 0.022632452, -0.046914898, 0.0031212433, -0.059399873, 0.03321993, -0.07237984, 0.10119978, 0.19612958, -0.086349815, 0.038252417, 0.084094815, 0.16257966, 0.15520966, 0.063304864, -0.08761481, 0.06132487, -0.08486482, -0.09789979, 0.06935485, -0.04160741, 0.05585238, -0.13485971, 0.105544776, -0.08084983, 0.103344776, 0.053817384, -0.0923998, -0.052607387, 0.015537467, 0.025299946, -0.05961987, 0.08090483, -0.25453946, 0.01894746, -0.026344944, -0.14552969, 0.014341219, 0.14409968, 0.12264974, -0.0456224, -0.13529971, -0.0466674, 0.006166862, 0.02776119, -0.020184956, 0.093939796, 0.054779883, -0.09635979, -0.016334964, -0.029177437, -0.06863985, 0.19139959, -0.08794481, -0.08464482, -0.013413096, 0.022109952, -0.122099735, -0.0458149, -0.019676207, 0.10785477, -0.109119765, -0.09690979, -0.28423938, 0.050709892, 0.12803972, 0.10620477, 0.12110974, -0.006658423, -0.052304886, -0.07798983, -0.035667423, -0.07507484, 0.02745869, 0.07237984, -0.0230862, -0.03684992, -0.067539856, -0.052387387, -0.05202989, 0.14244969, 0.080684826, -0.038472418, 0.112639755, 0.03242243, -0.07501984, 0.10631477, -0.024076197, -0.07754983, 0.06610986, -0.12671973, -0.044082403, 0.006001862, 0.037454918, 0.054504883, -0.03679492, 0.076669835, 0.02271495, 0.14794968, 0.06440486, -0.006850923, -0.06984985, 0.035639923, -0.009143731]}, - {'id': 'item9', 'pk': '2', 'text': "Don't worry about it.", 'embedding': [-0.051598575, 0.22204931, -0.017881807, 0.11678282, 0.18426134, -0.03713568, -0.016847137, 0.06549915, 0.057626653, 0.032569632, 0.00076827104, -0.04489571, -0.07530603, 0.10778569, 0.030477798, 0.050338972, -0.21053298, -0.04341118, -0.097708896, -0.13432723, 0.1438642, 0.059606023, -0.12299085, -0.036820777, -0.026699001, 0.18381149, -0.02861089, 0.08259371, -0.14962237, -0.07373153, 0.02321261, 0.085607745, -0.13810603, 0.065139264, -0.12685962, 0.14098512, 0.17112552, -0.035921063, -0.008536032, -0.09680918, 0.04435588, -0.16086878, -0.035718627, 0.09689915, -0.0007956842, 0.034256592, -0.00234769, 0.04577293, 0.06725359, 0.015958669, -0.06486935, 0.124160476, 0.09887852, -0.050518915, -0.07080746, -0.078859895, 0.17013584, -0.22078972, -0.10103783, 0.06873812, 0.0370682, 0.04563797, -0.060235824, -0.056816913, -0.064689405, 0.11273411, 0.16572724, 0.108415484, 0.07921978, 0.05569227, -0.11210431, -0.05848138, -0.008361713, 0.07458626, -0.08992637, -0.07557594, -0.0020102975, -0.07080746, -0.0092614265, 0.06626391, -0.05848138, -0.078545, 0.08362838, -0.031737395, -0.047549862, -0.15367107, 0.093930095, -0.087182246, 0.06401462, 0.09006133, 0.10886534, 0.013338254, 0.025551865, -0.027553728, 0.14206477, -0.09060115, -0.07818511, -0.001209693, 0.017893054, -0.069367915, 0.0709874, 0.050249003, -0.13396735, -0.056681953, -0.022166694, -0.02170559, 0.08277365, -0.101667635, 0.09096104, 0.049529232, -0.095819496, -0.08974643, 0.054477658, -0.037967913, -0.08682236, 0.077690266, 0.03828281, -0.04136433, -0.14431405, -0.060505737, 0.025619343, -0.019400073, 0.11075474, 0.066893704, 0.07494614, 0.03684327, 0.03929499, -0.017353225]}] + return [ + { + "id": "item0", + "pk": "1", + "text": "Good morning!", + "embedding": [ + -0.008334724, + -0.05993167, + -0.0903545, + -0.04791922, + -0.01825805, + -0.053011455, + 0.120733805, + 0.017714009, + 0.07346743, + 0.11559805, + 0.03262076, + 0.074512, + 0.015864266, + 0.01981401, + 0.007850527, + 0.076296456, + -0.08539284, + 0.016593281, + -0.05423011, + 0.07520837, + 0.074250855, + 0.056754466, + -0.022098986, + 0.03155444, + 0.04334927, + 0.024655985, + -0.02109795, + 0.044023883, + -0.027550288, + -0.11350893, + -0.022806242, + 0.08608921, + 0.009221513, + 0.06659074, + 0.09087678, + 0.024830079, + 0.0075513036, + 0.036472578, + 0.015418151, + 0.060497474, + 0.010940685, + -0.059365865, + 0.043566886, + 0.00427073, + -0.023546139, + 0.030357545, + -0.03403527, + 0.1182965, + 0.1115939, + -0.018954424, + 0.0032452107, + 0.10297628, + 0.15328929, + -0.016952349, + -0.04530782, + 0.04674409, + -8.351895e-05, + -0.19376601, + -0.025091218, + -0.03664667, + -0.011860116, + -0.10454312, + -0.13109237, + -0.049268447, + 0.17557324, + 0.044872586, + 0.046787616, + 0.15337633, + -0.019509347, + 0.0077743605, + 0.04556896, + -0.08413066, + -0.028681897, + 0.1209079, + 0.1357929, + -0.09314, + 0.12534729, + -0.065546185, + 0.12212656, + 0.04892026, + 0.07394619, + -0.08134516, + -0.004493787, + 0.08138869, + 0.028573086, + 0.12290998, + -0.16477945, + -0.29839617, + -0.08090993, + 0.12256179, + 0.16591106, + -0.08173688, + -0.034383457, + -0.1076768, + -0.043022845, + -0.07655759, + 0.2021225, + 0.03923631, + 0.07703635, + -0.08587159, + 0.06498038, + -0.08330371, + 0.16486649, + -0.14040637, + 0.02070624, + -0.069855, + 0.052880887, + 0.016136287, + 0.00024294876, + -0.19968519, + 0.06933272, + 0.013241983, + 0.0004002109, + 0.14998151, + 0.07516485, + 0.18610589, + -0.07895138, + -0.108982496, + -0.03494926, + -0.027637335, + -0.032925423, + -0.009509855, + 0.1182965, + -0.075513035, + -0.08665501, + 0.019629037, + 0.2583547, + 0.00983084, + ], + }, + { + "id": "item1", + "pk": "2", + "text": "Good afternoon!", + "embedding": [ + -0.04136167, + -0.047741424, + -0.08737179, + -3.0502639e-05, + 0.054595508, + -0.11298566, + 0.0906921, + 0.108052626, + 0.04729081, + 0.21287979, + -0.06588459, + -0.052793052, + -0.05568647, + 0.017384235, + -0.02518698, + 0.021665072, + -0.19238868, + 0.03379609, + 0.0075359354, + -0.04989963, + 0.055449303, + 0.03282371, + 0.026064493, + 0.042096883, + -0.007192045, + 0.0786441, + -0.09012291, + 0.094012424, + -0.0031483725, + -0.0318039, + -0.034721036, + 0.10255038, + 0.08851018, + 0.11327027, + 0.031614166, + 0.006035863, + 0.021321183, + 0.0703433, + 0.14201473, + 0.058674756, + -0.007986549, + 0.03329804, + 0.08884221, + -0.09505595, + -0.015522485, + -0.068161376, + 0.072572656, + 0.049235567, + 0.2263508, + 0.029574543, + -0.050563693, + 0.050516263, + 0.04660303, + 0.08376687, + 0.017514676, + 0.0706279, + 0.007921329, + -0.1353741, + -0.054358345, + -0.1628853, + -0.097617336, + -0.123326086, + -0.0489984, + -0.0693472, + 0.15396787, + 0.027368903, + 0.06042978, + 0.22862759, + -0.016293272, + 0.033582643, + 0.06697555, + -0.10302471, + -0.12104929, + 0.18034068, + 0.068303674, + 0.003468546, + 0.07480201, + -0.1204801, + 0.06787678, + -0.042926963, + 0.15785739, + -0.034531303, + -0.028934196, + 0.022933908, + -0.012012435, + 0.004248228, + -0.19172463, + -0.31837103, + -0.099230066, + 0.02071641, + 0.18546346, + 0.06299117, + -0.047053643, + -0.09206767, + 0.049472734, + -0.046365865, + 0.18214314, + 0.0051079527, + 0.105680965, + -0.026443958, + 0.072714955, + -0.08073115, + 0.09429702, + -0.113744594, + 0.02092986, + -0.013625161, + -0.07390078, + 0.020550394, + 0.011787128, + -0.13499463, + 0.015107445, + -0.0015223064, + 0.040104695, + 0.094961084, + 0.13404597, + 0.082486175, + -0.07428025, + -0.026847139, + -0.025163265, + -0.09818654, + 0.010043961, + 0.013601444, + 0.077932596, + 0.016056107, + -0.026965722, + 0.045606934, + 0.085047565, + -0.005878741, + ], + }, + { + "id": "item2", + "pk": "1", + "text": "Great weather today!", + "embedding": [ + 0.07557184, + -0.047335204, + -0.054325826, + 0.011354052, + 0.07698824, + -0.025358144, + -0.07927276, + 0.1510523, + 0.022251202, + 0.026249107, + -0.021725763, + 0.062047496, + 0.14556946, + -0.0006071819, + -0.107098185, + 0.021394506, + -0.13771072, + -0.10527057, + 0.115048304, + -0.048842985, + -0.059443146, + 0.060585406, + -0.014940745, + 0.18075103, + 0.053777542, + -0.022057017, + 0.08493836, + 0.1198001, + 0.041555375, + -0.066525154, + 0.054280136, + 0.107646465, + 0.023359193, + -0.0046632714, + -0.1017981, + 0.04105278, + 0.11376897, + 0.016437104, + 0.067393266, + 0.0961325, + -0.017727856, + -0.03333111, + -0.020492123, + -0.041943744, + 0.0031040881, + -0.028053876, + 0.053640474, + -0.02215982, + 0.08205987, + 0.015100661, + -0.17133881, + -0.05843796, + 0.0895074, + -0.04064157, + -0.10225501, + 0.11367759, + -0.03593546, + -0.010999952, + -0.14273666, + -0.010383132, + 0.026112035, + -0.14200561, + -0.0634639, + -0.04029889, + 0.07383561, + 0.116784535, + 0.0805064, + 0.13241065, + -0.100884296, + -0.10216363, + -0.030384084, + -0.07657703, + -0.06323545, + -0.013101708, + 0.15233164, + -0.009880538, + 0.16448526, + -0.11148446, + -0.05606206, + -0.11587073, + 0.084892675, + -0.1397211, + -0.04948265, + 0.006470896, + 0.015637523, + 0.09051259, + -0.12665366, + -0.28583884, + -0.16046451, + 0.055833608, + 0.100244634, + 0.013535767, + -0.07155109, + -0.10051877, + 0.08662891, + -0.0729218, + 0.15818, + 0.025449526, + 0.05053353, + -0.015740326, + -0.0767141, + -0.056381892, + 0.091517776, + -0.075114936, + -0.04621579, + -0.040458806, + 0.03947646, + 0.10901718, + 0.0076417113, + -0.34487078, + 0.024375802, + -0.072419204, + 0.053000808, + 0.04057303, + -0.08434439, + 0.027185759, + 0.03403931, + -0.06332683, + 0.051858548, + 0.011993717, + 0.10728095, + -0.09887392, + 0.07593736, + -0.0025172527, + 0.1089258, + -0.048934367, + 0.051264573, + 0.017008234, + ], + }, + { + "id": "item3", + "pk": "2", + "text": "Hope you're doing well.", + "embedding": [ + -0.016385807, + 0.16914073, + -0.062722616, + 0.009645036, + 0.06367876, + -0.10871283, + -0.034588274, + 0.0038275379, + 0.107661076, + 0.069654614, + 0.036404934, + -0.037910853, + 0.08872956, + 0.14571536, + -0.082227826, + 0.034731694, + -0.07405285, + 0.050340638, + -0.16569862, + -0.20671692, + -0.0834708, + 0.0043175584, + -0.017234378, + 0.052683175, + 0.013863994, + 0.12142946, + -0.002630872, + 0.069702424, + 0.095804974, + -0.10020321, + 0.0793116, + 0.028970966, + 0.13940485, + 0.15814514, + 0.11597948, + -0.03795866, + -0.018178564, + 0.14753202, + -0.10670494, + -0.055455975, + 0.058037546, + -0.04457991, + -0.0046014115, + -0.018704439, + 0.07902476, + -0.07902476, + 0.031026661, + -0.017855868, + 0.098769, + 0.118847884, + -0.051488005, + 0.009017572, + 0.15068726, + 0.044962365, + 0.18233542, + -0.0006853563, + 0.11205931, + -0.2602606, + 0.09848216, + 0.08681728, + -0.077638365, + -0.008664995, + 0.010314333, + -0.0361659, + 0.047185384, + 0.09202823, + 0.004359389, + -0.008545479, + -0.08815587, + 0.0765388, + 0.012262463, + 0.0542608, + -0.10813915, + 0.11722245, + 0.013744476, + -0.08265808, + 0.008055458, + 0.12085578, + 0.056364305, + -0.12907855, + -0.05311344, + -0.060666922, + 0.117031224, + 0.029233903, + -0.148775, + 0.017879771, + -0.081558526, + -0.26332027, + -0.22029407, + -0.07410065, + 0.0059340284, + -0.11234615, + -0.06898532, + 0.046516087, + 0.06798138, + -0.049193274, + -0.04687464, + -0.049002044, + -0.03145692, + 0.0065614935, + -0.021274058, + -0.060188852, + -0.04584679, + -0.015979448, + 0.08949447, + -0.050197218, + -0.051440194, + -0.1341461, + 0.08557431, + -0.08261028, + -0.104314595, + -0.016134819, + 0.057320442, + -0.022421423, + 0.012501498, + 0.055503782, + 0.020568907, + -0.095183484, + 0.0049450235, + -0.03525757, + 0.17688543, + -0.06888971, + -0.005694994, + 0.05622088, + -0.04250031, + 0.050053798, + 0.16063109, + 0.06353533, + ], + }, + { + "id": "item4", + "pk": "1", + "text": "Excuse me please.", + "embedding": [ + -0.19188246, + 0.018719073, + -0.032395326, + 0.09734556, + 0.021671357, + -0.11751684, + -0.078514785, + 0.16507255, + -0.0012956136, + 0.117006175, + -0.065492816, + 0.106282204, + -0.009750514, + -0.006008296, + 0.021799022, + 0.04643862, + -0.046023704, + -0.023442727, + 0.12868765, + -0.1466886, + -0.085089594, + -0.046885453, + -0.0067742937, + 0.048162118, + -0.04739612, + 0.021687314, + -0.025581138, + 0.04841745, + -0.10519704, + -0.039129723, + -0.09747323, + 0.10532471, + 0.04375763, + 0.09536674, + 0.0145938555, + -0.0060681393, + 0.26171595, + 0.1815415, + -0.03833181, + 0.012487361, + -0.027192924, + -0.12281499, + 0.017937116, + -0.02173519, + 0.07308897, + -0.06913131, + 0.07417413, + -0.01884674, + 0.049023863, + -0.049949445, + 0.081068106, + 0.22060739, + -0.031645287, + -0.024735348, + -0.041108552, + 0.1823075, + -0.06230116, + -0.119048834, + -0.07813178, + -0.0841321, + -0.007711843, + 0.039576557, + -0.07589762, + 0.028198296, + 0.003087929, + 0.047970615, + 0.0845151, + 0.08208944, + 0.07423796, + 0.01259907, + 0.00046179298, + 0.024671515, + 0.10302671, + 0.12160216, + 0.1353263, + -0.16251922, + 0.069195144, + -0.09160058, + 0.033320908, + -0.06341824, + -0.06402466, + -0.048864283, + -0.10053722, + -0.019341446, + 0.027033342, + -0.19354212, + -0.011146865, + -0.31329313, + 0.054513514, + -0.0098861605, + 0.10277138, + 0.059237167, + 0.021495815, + -0.0704718, + 0.14285861, + 0.042672466, + 0.057769008, + 0.054353934, + -0.041363884, + 0.07819562, + 0.1085802, + -0.0047874865, + 0.0035626881, + 0.025405597, + 0.0032953867, + 0.13430496, + -0.084451266, + -0.10883553, + 0.115601845, + -0.072259136, + -0.06976964, + -0.1081972, + 0.08515343, + 0.044715125, + 0.05725834, + -0.06759931, + -0.0421618, + -0.06185433, + -0.068939805, + -0.13673063, + -0.032874074, + -0.121538326, + -0.010157451, + -0.048608948, + 0.049949445, + 0.031310163, + 0.13238996, + 0.06855681, + ], + }, + { + "id": "item5", + "pk": "2", + "text": "Is this the right place?", + "embedding": [ + -0.05695127, + 0.07729321, + -0.07253956, + 0.054049686, + -0.084886715, + -0.1677979, + -0.020681491, + -0.010765179, + -0.05312365, + 0.10964277, + -0.1724898, + -0.0139754405, + -0.019446775, + -0.009877727, + 0.10902541, + 0.06599557, + -0.20224646, + -0.008658445, + -0.11698933, + -0.00034678154, + 0.059760246, + 0.023660243, + 0.014523345, + 0.058340326, + -0.116927594, + -0.0011546522, + 0.035991967, + 0.017857078, + -0.21261807, + -0.07568809, + -0.007250097, + 0.09525833, + 0.073033445, + -0.078157514, + -0.14816591, + -0.089578636, + -0.006030815, + 0.08519539, + 0.059852853, + 0.12328638, + 0.08544234, + -0.017656436, + -0.03901702, + 0.036238912, + -0.09482618, + 0.007215371, + 0.15742627, + 0.014183799, + 0.107914165, + 0.014245534, + -0.011907292, + 0.025188204, + 0.057630364, + -0.057321683, + 0.0024366346, + 0.034695517, + 0.11766842, + -0.16520499, + 0.065193, + 0.10822285, + -0.06834152, + -0.048925616, + -0.078836605, + 0.05161112, + 0.07235435, + 0.07636718, + -0.075996764, + 0.13902901, + 0.023860885, + 0.07846619, + 0.02665443, + -0.026870504, + -0.0084115015, + 0.07550287, + 0.07500899, + -0.07395948, + 0.05062335, + 0.05621044, + -0.031531557, + -0.001280053, + 0.06908235, + 0.078280985, + -0.060068928, + 0.14236274, + 0.14236274, + 0.06358787, + -0.042474225, + -0.38053942, + 0.062785305, + 0.050870296, + 0.038677476, + -0.078157514, + 0.029309068, + -0.07809578, + 0.07439163, + -0.06772417, + 0.11896487, + 0.073589064, + 0.05238282, + 0.018196626, + 0.116371974, + 0.0033067234, + -0.020264775, + -0.006304768, + -0.10686466, + 0.08408415, + -0.04386328, + -0.0068681072, + 0.08994905, + -0.059513304, + 0.021823604, + 0.049419504, + -0.012817894, + -0.093221046, + 0.02802805, + 0.089578636, + 0.07124311, + -0.26694557, + 0.024833223, + -0.03802925, + -0.18483697, + -0.1103836, + 0.11877967, + 0.07000839, + -0.018860284, + -0.044974525, + -0.034016423, + 0.022780508, + ], + }, + { + "id": "item6", + "pk": "1", + "text": "Awful weather today.", + "embedding": [ + 0.002305239, + -0.02629875, + 0.009952777, + 0.026884208, + -0.0067561795, + -0.1118458, + 0.07432968, + 0.0999493, + 0.02177902, + -0.047726493, + 0.042059265, + 0.1583077, + 0.11175212, + 0.07685886, + -0.14060347, + 0.005084698, + -0.19277944, + -0.05606341, + 0.082619764, + -0.04241054, + 0.09620237, + 0.011832096, + -0.023301208, + 0.28214368, + 0.02451896, + 0.02793803, + 0.03358184, + 0.044424515, + 0.11006601, + 0.038101573, + 0.0077982936, + 0.045572013, + 0.075922124, + 0.016369391, + -0.0039986745, + 0.22781321, + 0.062854715, + 0.048054352, + 0.010251361, + 0.07170683, + -0.018816603, + 0.027329156, + -0.08482108, + -0.079481706, + 0.042785235, + 0.024120849, + 0.17413847, + 0.035431888, + 0.12439801, + 0.10641275, + -0.14828467, + -0.024425287, + 0.083415985, + 0.1184966, + 0.0026799317, + 0.15399873, + -0.010304051, + 0.009742012, + -0.10781785, + -0.019472316, + 0.061777476, + -0.09798217, + 0.028804509, + -0.023371464, + 0.015491205, + 0.07521958, + 0.024003757, + 0.013465522, + -0.089692086, + -0.097794816, + 0.021193562, + -0.0592483, + -0.056438103, + -0.10987866, + 0.11802823, + -0.06440032, + 0.07704621, + -0.040138967, + -0.13891736, + -0.16027485, + 0.08631986, + -0.16786237, + -0.085757814, + 0.015491205, + -0.013243048, + 0.09133137, + -0.16196096, + -0.2313728, + -0.083134964, + 0.12308659, + 0.07559427, + 0.09723278, + 0.048663225, + -0.13339064, + 0.016345974, + -0.13189186, + 0.11025336, + 0.03346475, + -0.00688498, + -0.059435643, + 0.0056877197, + 0.014999421, + 0.063650936, + -0.15053283, + -0.017481761, + 0.05194179, + 0.061402783, + 0.0077924393, + 0.19971126, + -0.07713988, + 0.06425981, + 0.0021369199, + 0.12158781, + -0.024331613, + -0.008571098, + 0.03264511, + -0.0020242194, + -0.05507984, + -0.00805004, + -0.03304322, + 0.050630365, + -0.1475353, + -0.003735219, + -0.0202217, + 0.16271034, + -0.059435643, + 0.06023187, + 0.06660164, + ], + }, + { + "id": "item7", + "pk": "2", + "text": "Dinosaurs were huge.", + "embedding": [ + 0.09842033, + -0.025395654, + -0.03831241, + 0.037825905, + 0.17008278, + -0.022269849, + -0.05935383, + 0.032668933, + -0.022148222, + 0.08178179, + -0.062710725, + 0.164342, + -0.024021273, + -0.052640036, + 0.027366007, + 0.18098053, + -0.18487258, + -0.008903074, + 0.16346629, + 0.009407825, + 0.110339746, + -0.046315446, + 0.08046822, + 0.12512955, + -0.06635953, + 0.0070239417, + 0.055753678, + -0.0005336371, + -0.012326866, + 0.1578228, + -0.023668556, + -0.035904203, + 0.05988899, + -0.08032227, + -0.11520481, + 0.08499274, + 0.05093726, + -0.09248494, + -0.011128843, + -0.07064079, + 0.01466818, + 0.082073696, + -0.040574666, + -0.07292737, + 0.03539337, + 0.05025615, + -0.1145237, + 0.09584184, + 0.04186391, + -0.034833886, + -0.18234275, + -0.090441614, + -0.09194978, + -0.031331036, + -0.13106494, + 0.068208255, + 0.03220675, + -0.031233737, + -0.04337208, + 0.1289243, + 0.1363192, + 0.052494083, + 0.03074723, + -0.000113359885, + 0.07681943, + 0.03962598, + 0.016529068, + -0.04191256, + -0.03612313, + 0.023084749, + 0.10917213, + 0.09477153, + -0.09652295, + -0.0999285, + 0.11685894, + -0.012649177, + 0.043688312, + -0.10333405, + -0.060521446, + -0.042034186, + 0.0483831, + 0.0028141378, + -0.17270991, + 0.05424551, + 0.25570798, + 0.09511208, + -0.08504139, + -0.1570444, + -0.084262975, + -0.13291366, + -0.023741532, + -0.14857918, + 0.09190113, + -0.08041958, + -0.019837314, + 0.09569589, + -0.053029243, + -0.030722905, + -0.05239678, + -0.15091442, + -0.05872137, + -0.056045584, + 0.11831845, + -0.1145237, + -0.08761988, + -0.0035727844, + -0.05570503, + 0.19285129, + 0.011761302, + 0.087717175, + 0.107712604, + -0.11277228, + -0.042423394, + 0.13048112, + -0.03356897, + 0.056775343, + 0.08640361, + -0.11831845, + -0.10868562, + 0.0410855, + 0.12036178, + -0.09477153, + -0.017611546, + 0.0075043673, + -0.12668636, + -0.006391483, + 0.0012185475, + -0.05161837, + ], + }, + { + "id": "item8", + "pk": "1", + "text": "The hero saves the day again.", + "embedding": [ + 0.11208976, + 0.058739875, + -0.017022463, + 0.15080968, + -0.0031057745, + -0.048069898, + -0.059069872, + 0.09861479, + 0.11626975, + 0.12935972, + 0.008882481, + 0.08766981, + -0.00940498, + -0.077164836, + 0.0015795279, + 0.06297486, + -0.06313986, + 0.0931698, + -0.17247963, + -0.12077974, + -0.044797402, + -0.1404697, + -0.050077394, + 0.020432455, + 0.07897983, + 0.022632452, + -0.046914898, + 0.0031212433, + -0.059399873, + 0.03321993, + -0.07237984, + 0.10119978, + 0.19612958, + -0.086349815, + 0.038252417, + 0.084094815, + 0.16257966, + 0.15520966, + 0.063304864, + -0.08761481, + 0.06132487, + -0.08486482, + -0.09789979, + 0.06935485, + -0.04160741, + 0.05585238, + -0.13485971, + 0.105544776, + -0.08084983, + 0.103344776, + 0.053817384, + -0.0923998, + -0.052607387, + 0.015537467, + 0.025299946, + -0.05961987, + 0.08090483, + -0.25453946, + 0.01894746, + -0.026344944, + -0.14552969, + 0.014341219, + 0.14409968, + 0.12264974, + -0.0456224, + -0.13529971, + -0.0466674, + 0.006166862, + 0.02776119, + -0.020184956, + 0.093939796, + 0.054779883, + -0.09635979, + -0.016334964, + -0.029177437, + -0.06863985, + 0.19139959, + -0.08794481, + -0.08464482, + -0.013413096, + 0.022109952, + -0.122099735, + -0.0458149, + -0.019676207, + 0.10785477, + -0.109119765, + -0.09690979, + -0.28423938, + 0.050709892, + 0.12803972, + 0.10620477, + 0.12110974, + -0.006658423, + -0.052304886, + -0.07798983, + -0.035667423, + -0.07507484, + 0.02745869, + 0.07237984, + -0.0230862, + -0.03684992, + -0.067539856, + -0.052387387, + -0.05202989, + 0.14244969, + 0.080684826, + -0.038472418, + 0.112639755, + 0.03242243, + -0.07501984, + 0.10631477, + -0.024076197, + -0.07754983, + 0.06610986, + -0.12671973, + -0.044082403, + 0.006001862, + 0.037454918, + 0.054504883, + -0.03679492, + 0.076669835, + 0.02271495, + 0.14794968, + 0.06440486, + -0.006850923, + -0.06984985, + 0.035639923, + -0.009143731, + ], + }, + { + "id": "item9", + "pk": "2", + "text": "Don't worry about it.", + "embedding": [ + -0.051598575, + 0.22204931, + -0.017881807, + 0.11678282, + 0.18426134, + -0.03713568, + -0.016847137, + 0.06549915, + 0.057626653, + 0.032569632, + 0.00076827104, + -0.04489571, + -0.07530603, + 0.10778569, + 0.030477798, + 0.050338972, + -0.21053298, + -0.04341118, + -0.097708896, + -0.13432723, + 0.1438642, + 0.059606023, + -0.12299085, + -0.036820777, + -0.026699001, + 0.18381149, + -0.02861089, + 0.08259371, + -0.14962237, + -0.07373153, + 0.02321261, + 0.085607745, + -0.13810603, + 0.065139264, + -0.12685962, + 0.14098512, + 0.17112552, + -0.035921063, + -0.008536032, + -0.09680918, + 0.04435588, + -0.16086878, + -0.035718627, + 0.09689915, + -0.0007956842, + 0.034256592, + -0.00234769, + 0.04577293, + 0.06725359, + 0.015958669, + -0.06486935, + 0.124160476, + 0.09887852, + -0.050518915, + -0.07080746, + -0.078859895, + 0.17013584, + -0.22078972, + -0.10103783, + 0.06873812, + 0.0370682, + 0.04563797, + -0.060235824, + -0.056816913, + -0.064689405, + 0.11273411, + 0.16572724, + 0.108415484, + 0.07921978, + 0.05569227, + -0.11210431, + -0.05848138, + -0.008361713, + 0.07458626, + -0.08992637, + -0.07557594, + -0.0020102975, + -0.07080746, + -0.0092614265, + 0.06626391, + -0.05848138, + -0.078545, + 0.08362838, + -0.031737395, + -0.047549862, + -0.15367107, + 0.093930095, + -0.087182246, + 0.06401462, + 0.09006133, + 0.10886534, + 0.013338254, + 0.025551865, + -0.027553728, + 0.14206477, + -0.09060115, + -0.07818511, + -0.001209693, + 0.017893054, + -0.069367915, + 0.0709874, + 0.050249003, + -0.13396735, + -0.056681953, + -0.022166694, + -0.02170559, + 0.08277365, + -0.101667635, + 0.09096104, + 0.049529232, + -0.095819496, + -0.08974643, + 0.054477658, + -0.037967913, + -0.08682236, + 0.077690266, + 0.03828281, + -0.04136433, + -0.14431405, + -0.060505737, + 0.025619343, + -0.019400073, + 0.11075474, + 0.066893704, + 0.07494614, + 0.03684327, + 0.03929499, + -0.017353225, + ], + }, + ] def get_ordered_item_texts(): - return ["Great weather today!", "Good afternoon!", "Good morning!", "Awful weather today.", - "Hope you're doing well.", "Excuse me please.", "Is this the right place?", "The hero saves the day again." - , "Don't worry about it.", "Dinosaurs were huge."] + return [ + "Great weather today!", + "Good afternoon!", + "Good morning!", + "Awful weather today.", + "Hope you're doing well.", + "Excuse me please.", + "Is this the right place?", + "The hero saves the day again.", + "Don't worry about it.", + "Dinosaurs were huge.", + ] def get_embedding_string(string): if string == "I am having a wonderful day.": - return "0.13481648, 0.022579897, -0.038054377, 0.035029914, 0.15404047, -0.012947189, 0.013434003, 0.0328755, " \ - "0.0859279, 0.090071, 0.07391291, 0.10896354, 0.04085097, 0.019876525, 0.013806882, 0.03799223, " \ - "-0.097528584, -0.10324606, -0.07863604, -0.01846787, -0.0018139011, 0.09686569, 0.0065512774, " \ - "0.014107257, 0.0004389097, 0.07432722, 0.012698603, 0.09404838, 0.11592395, -0.08290344, -0.023802113, " \ - "0.0771031, 0.15578057, 0.17152436, 0.06732538, 0.04408259, 0.04163816, 0.03196402, 0.08451925, " \ - "0.05365315, -0.10473758, 0.054730356, -0.0686926, 0.12412729, 0.1910798, -0.048971448, -0.007649199, " \ - "-0.059122045, -0.005241022, 0.021440545, -0.1014231, 0.08282058, -0.057671957, -0.024755025, -0.07619162, " \ - "0.0966171, 0.047272775, -0.20384054, -0.024319999, -0.014739079, 0.03681145, -0.03331053, 0.09172824, " \ - "-0.09744572, 0.08584504, 0.13440217, -0.019234344, 0.19605151, 0.030389642, -0.0646738, 0.08447782, " \ - "-0.107969195, -0.19058262, -0.05369458, 0.071675636, -0.095871344, 0.030141056, 0.025107188, 0.06309942, " \ - "-0.09951727, 0.031446133, -0.07888463, -0.08182623, -0.063762315, -0.0955399, -0.03948375, -0.031073254, " \ - "-0.29979473, -0.06711823, 0.07743455, 0.0074161496, 0.01248109, -0.0812462, -0.0676154, 3.0668652e-05, " \ - "-0.17931339, 0.2008575, 0.026950868, 0.11111795, 0.07507298, -0.00898017, 0.038800135, -0.015267325, " \ - "-0.13788238, -0.010740988, -0.00870569, -0.037743647, -0.12445874, 0.014676933, -0.27344462, -0.05738194, " \ - "0.07101274, -0.023615673, 0.0040369336, -0.039028008, 0.06546099, -0.072421394, -0.17119291, " \ - "-0.019358637, -0.05489608, 0.006199114, 0.0515816, 0.050048653, -0.034843475, 0.07847032, -0.13315925, " \ - "0.025335059, -0.0432954" + return ( + "0.13481648, 0.022579897, -0.038054377, 0.035029914, 0.15404047, -0.012947189, 0.013434003, 0.0328755, " + "0.0859279, 0.090071, 0.07391291, 0.10896354, 0.04085097, 0.019876525, 0.013806882, 0.03799223, " + "-0.097528584, -0.10324606, -0.07863604, -0.01846787, -0.0018139011, 0.09686569, 0.0065512774, " + "0.014107257, 0.0004389097, 0.07432722, 0.012698603, 0.09404838, 0.11592395, -0.08290344, -0.023802113, " + "0.0771031, 0.15578057, 0.17152436, 0.06732538, 0.04408259, 0.04163816, 0.03196402, 0.08451925, " + "0.05365315, -0.10473758, 0.054730356, -0.0686926, 0.12412729, 0.1910798, -0.048971448, -0.007649199, " + "-0.059122045, -0.005241022, 0.021440545, -0.1014231, 0.08282058, -0.057671957, -0.024755025, -0.07619162, " + "0.0966171, 0.047272775, -0.20384054, -0.024319999, -0.014739079, 0.03681145, -0.03331053, 0.09172824, " + "-0.09744572, 0.08584504, 0.13440217, -0.019234344, 0.19605151, 0.030389642, -0.0646738, 0.08447782, " + "-0.107969195, -0.19058262, -0.05369458, 0.071675636, -0.095871344, 0.030141056, 0.025107188, 0.06309942, " + "-0.09951727, 0.031446133, -0.07888463, -0.08182623, -0.063762315, -0.0955399, -0.03948375, -0.031073254, " + "-0.29979473, -0.06711823, 0.07743455, 0.0074161496, 0.01248109, -0.0812462, -0.0676154, 3.0668652e-05, " + "-0.17931339, 0.2008575, 0.026950868, 0.11111795, 0.07507298, -0.00898017, 0.038800135, -0.015267325, " + "-0.13788238, -0.010740988, -0.00870569, -0.037743647, -0.12445874, 0.014676933, -0.27344462, -0.05738194, " + "0.07101274, -0.023615673, 0.0040369336, -0.039028008, 0.06546099, -0.072421394, -0.17119291, " + "-0.019358637, -0.05489608, 0.006199114, 0.0515816, 0.050048653, -0.034843475, 0.07847032, -0.13315925, " + "0.025335059, -0.0432954" + ) return " " diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/custom_tcp_connector.py b/sdk/cosmos/azure-cosmos/tests/workloads/custom_tcp_connector.py index 8ea938cfd945..b53cc740ed21 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/custom_tcp_connector.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/custom_tcp_connector.py @@ -15,11 +15,11 @@ class ProxiedTCPConnector(TCPConnector): """ def __init__( - self, - *, - proxy_host: str, - proxy_port: int, - **kwargs: Any, + self, + *, + proxy_host: str, + proxy_port: int, + **kwargs: Any, ) -> None: """ Initialize the ProxiedTCPConnector. @@ -34,20 +34,18 @@ def __init__( self.__proxy_port = proxy_port async def _create_direct_connection( - self, - req: ClientRequest, - traces: list[tracing.Trace], - timeout: ClientTimeout, - *, - client_error: type[Exception] = ClientConnectorError, + self, + req: ClientRequest, + traces: list[tracing.Trace], + timeout: ClientTimeout, + *, + client_error: type[Exception] = ClientConnectorError, ) -> tuple[asyncio.Transport, client_proto.ResponseHandler]: """Override host, port, and schema to use proxy""" - req.url = ( - req.url.with_host(self.__proxy_host).with_port(self.__proxy_port).with_scheme("http") - ) + req.url = req.url.with_host(self.__proxy_host).with_port(self.__proxy_port).with_scheme("http") return await super()._create_direct_connection( req, traces, timeout, client_error=client_error, - ) \ No newline at end of file + ) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/get-database-account-call.py b/sdk/cosmos/azure-cosmos/tests/workloads/get-database-account-call.py index 6b798b46babc..f158900cbb1e 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/get-database-account-call.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/get-database-account-call.py @@ -13,21 +13,29 @@ async def run_workload(client_id: str): - async with AsyncClient(COSMOS_URI, COSMOS_CREDENTIAL, preferred_locations=PREFERRED_LOCATIONS, - enable_diagnostics_logging=True, logger=logger, - user_agent=client_id + "-" + datetime.now().strftime( - "%Y%m%d-%H%M%S")) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + preferred_locations=PREFERRED_LOCATIONS, + enable_diagnostics_logging=True, + logger=logger, + user_agent=client_id + "-" + datetime.now().strftime("%Y%m%d-%H%M%S"), + ) as client: await asyncio.sleep(1) while True: try: database_account = await client._get_database_account() - logger.info("%s - Database account - writable locations: %s", - datetime.now().strftime("%Y%m%d-%H%M%S"), - database_account.WritableLocations) - logger.info("%s - Database account - readable locations: %s", - datetime.now().strftime("%Y%m%d-%H%M%S"), - database_account.ReadableLocations) + logger.info( + "%s - Database account - writable locations: %s", + datetime.now().strftime("%Y%m%d-%H%M%S"), + database_account.WritableLocations, + ) + logger.info( + "%s - Database account - readable locations: %s", + datetime.now().strftime("%Y%m%d-%H%M%S"), + database_account.ReadableLocations, + ) time.sleep(1) except Exception as e: logger.error(e) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/initial-setup.py b/sdk/cosmos/azure-cosmos/tests/workloads/initial-setup.py index 3ae52b84c889..18be32866e3f 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/initial-setup.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/initial-setup.py @@ -4,14 +4,23 @@ from azure.cosmos import PartitionKey, ThroughputProperties from workload_utils import create_logger, create_random_item -from workload_configs import COSMOS_URI, COSMOS_KEY, PREFERRED_LOCATIONS, COSMOS_CONTAINER, COSMOS_DATABASE, \ - NUMBER_OF_LOGICAL_PARTITIONS, PARTITION_KEY, THROUGHPUT +from workload_configs import ( + COSMOS_URI, + COSMOS_KEY, + PREFERRED_LOCATIONS, + COSMOS_CONTAINER, + COSMOS_DATABASE, + NUMBER_OF_LOGICAL_PARTITIONS, + PARTITION_KEY, + THROUGHPUT, +) from azure.cosmos.aio import CosmosClient as AsyncClient import asyncio from datetime import datetime + async def write_item_concurrently_initial(container, num_upserts): tasks = [] for i in range(num_upserts): @@ -25,16 +34,24 @@ async def write_item_concurrently_initial(container, num_upserts): async def run_workload(client_id: str): # Key always needs to be used for the initial setup to create the database and container as aad for control plane # operations using the dataplane sdk is not supported. - async with AsyncClient(COSMOS_URI, COSMOS_KEY, preferred_locations=PREFERRED_LOCATIONS, - enable_diagnostics_logging=True, logger=logger, - user_agent=str(client_id) + "-" + datetime.now().strftime("%Y%m%d-%H%M%S")) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_KEY, + preferred_locations=PREFERRED_LOCATIONS, + enable_diagnostics_logging=True, + logger=logger, + user_agent=str(client_id) + "-" + datetime.now().strftime("%Y%m%d-%H%M%S"), + ) as client: db = await client.create_database_if_not_exists(COSMOS_DATABASE) - cont = await db.create_container_if_not_exists(COSMOS_CONTAINER, PartitionKey("/" + PARTITION_KEY), - offer_throughput=ThroughputProperties(THROUGHPUT)) + cont = await db.create_container_if_not_exists( + COSMOS_CONTAINER, PartitionKey("/" + PARTITION_KEY), offer_throughput=ThroughputProperties(THROUGHPUT) + ) await asyncio.sleep(1) try: - await write_item_concurrently_initial(cont, NUMBER_OF_LOGICAL_PARTITIONS + 1) # Number of concurrent upserts + await write_item_concurrently_initial( + cont, NUMBER_OF_LOGICAL_PARTITIONS + 1 + ) # Number of concurrent upserts except Exception as e: logger.error(e) raise e diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/r_proxy_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/r_proxy_workload.py index c53ec13090ac..112e1f6b7f95 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/r_proxy_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/r_proxy_workload.py @@ -6,18 +6,20 @@ from azure.core.pipeline.transport import AioHttpTransport import asyncio + async def run_workload(client_id, client_logger): session = create_custom_session() - async with AsyncClient(COSMOS_URI, - COSMOS_CREDENTIAL, - multiple_write_locations=USE_MULTIPLE_WRITABLE_LOCATIONS, - preferred_locations=PREFERRED_LOCATIONS, - transport=AioHttpTransport(session=session, session_owner=False), - excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, - logger=client_logger, - user_agent=get_user_agent(client_id) - ) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + multiple_write_locations=USE_MULTIPLE_WRITABLE_LOCATIONS, + preferred_locations=PREFERRED_LOCATIONS, + transport=AioHttpTransport(session=session, session_owner=False), + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_proxy_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_proxy_workload.py index 925713b78c81..955543700b3b 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_proxy_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_proxy_workload.py @@ -8,18 +8,20 @@ from azure.cosmos.aio import CosmosClient as AsyncClient import asyncio + async def run_workload(client_id, client_logger): session = create_custom_session() - async with AsyncClient(COSMOS_URI, - COSMOS_CREDENTIAL, - multiple_write_locations=USE_MULTIPLE_WRITABLE_LOCATIONS, - preferred_locations=PREFERRED_LOCATIONS, - transport=AioHttpTransport(session=session, session_owner=False), - excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, - logger=client_logger, - user_agent=get_user_agent(client_id) - ) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + multiple_write_locations=USE_MULTIPLE_WRITABLE_LOCATIONS, + preferred_locations=PREFERRED_LOCATIONS, + transport=AioHttpTransport(session=session, session_owner=False), + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_sync_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_sync_workload.py index 5f50d7e6d140..298245d82cc7 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_sync_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_sync_workload.py @@ -7,13 +7,20 @@ from azure.cosmos import CosmosClient, documents + def run_workload(client_id, client_logger): connectionPolicy = documents.ConnectionPolicy() connectionPolicy.UseMultipleWriteLocations = USE_MULTIPLE_WRITABLE_LOCATIONS - with CosmosClient(COSMOS_URI, COSMOS_CREDENTIAL, connection_policy=connectionPolicy, - preferred_locations=PREFERRED_LOCATIONS, excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, logger=client_logger, - user_agent=get_user_agent(client_id)) as client: + with CosmosClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + connection_policy=connectionPolicy, + preferred_locations=PREFERRED_LOCATIONS, + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) time.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_with_incorrect_client_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_with_incorrect_client_workload.py index 0b585a621c1a..afe4ad884e00 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_with_incorrect_client_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_with_incorrect_client_workload.py @@ -8,13 +8,20 @@ from azure.cosmos.aio import CosmosClient as AsyncClient import asyncio + async def run_workload(client_id, client_logger): connectionPolicy = documents.ConnectionPolicy() connectionPolicy.UseMultipleWriteLocations = USE_MULTIPLE_WRITABLE_LOCATIONS - client = AsyncClient(COSMOS_URI, COSMOS_CREDENTIAL, connection_policy=connectionPolicy, - preferred_locations=PREFERRED_LOCATIONS, excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, logger=client_logger, - user_agent=get_user_agent(client_id)) + client = AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + connection_policy=connectionPolicy, + preferred_locations=PREFERRED_LOCATIONS, + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_workload.py index 0d7730c6f86e..d3ec854825fc 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_workload.py @@ -8,11 +8,13 @@ from workload_utils import _get_upsert_item from workload_utils import * from workload_configs import * + sys.path.append(r"/") from azure.cosmos.aio import CosmosClient as AsyncClient import asyncio + async def log_request_counts(counter): while True: await asyncio.sleep(300) # 5 minutes @@ -30,16 +32,23 @@ async def log_request_counts(counter): counter["read_time"] = 0 counter["error_count"] = 0 + async def run_workload(client_id, client_logger): counter = {"count": 0, "upsert_time": 0, "read_time": 0, "error_count": 0} # Start background task asyncio.create_task(log_request_counts(counter)) connectionPolicy = documents.ConnectionPolicy() connectionPolicy.UseMultipleWriteLocations = USE_MULTIPLE_WRITABLE_LOCATIONS - async with AsyncClient(COSMOS_URI, COSMOS_CREDENTIAL, connection_policy=connectionPolicy, - preferred_locations=PREFERRED_LOCATIONS, excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, logger=client_logger, - user_agent=get_user_agent(client_id)) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + connection_policy=connectionPolicy, + preferred_locations=PREFERRED_LOCATIONS, + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/r_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/r_workload.py index b412c683419d..22aa5d82a9f7 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/r_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/r_workload.py @@ -8,13 +8,20 @@ from azure.cosmos.aio import CosmosClient as AsyncClient import asyncio + async def run_workload(client_id, client_logger): connectionPolicy = documents.ConnectionPolicy() connectionPolicy.UseMultipleWriteLocations = USE_MULTIPLE_WRITABLE_LOCATIONS - async with AsyncClient(COSMOS_URI, COSMOS_CREDENTIAL, connection_policy=connectionPolicy, - preferred_locations=PREFERRED_LOCATIONS, excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, logger=client_logger, - user_agent=get_user_agent(client_id)) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + connection_policy=connectionPolicy, + preferred_locations=PREFERRED_LOCATIONS, + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/w_proxy_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/w_proxy_workload.py index eea17899360a..25da9f5d1896 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/w_proxy_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/w_proxy_workload.py @@ -8,18 +8,20 @@ from azure.core.pipeline.transport import AioHttpTransport import asyncio + async def run_workload(client_id, client_logger): session = create_custom_session() - async with AsyncClient(COSMOS_URI, - COSMOS_CREDENTIAL, - multiple_write_locations=USE_MULTIPLE_WRITABLE_LOCATIONS, - preferred_locations=PREFERRED_LOCATIONS, - transport=AioHttpTransport(session=session, session_owner=False), - excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, - logger=client_logger, - user_agent=get_user_agent(client_id) - ) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + multiple_write_locations=USE_MULTIPLE_WRITABLE_LOCATIONS, + preferred_locations=PREFERRED_LOCATIONS, + transport=AioHttpTransport(session=session, session_owner=False), + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/w_workload.py b/sdk/cosmos/azure-cosmos/tests/workloads/w_workload.py index d40ed4dc1ea9..402cb6a5a3ff 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/w_workload.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/w_workload.py @@ -5,18 +5,26 @@ from azure.cosmos import documents from workload_utils import * from workload_configs import * + sys.path.append(r"/") from azure.cosmos.aio import CosmosClient as AsyncClient import asyncio + async def run_workload(client_id, client_logger): connectionPolicy = documents.ConnectionPolicy() connectionPolicy.UseMultipleWriteLocations = USE_MULTIPLE_WRITABLE_LOCATIONS - async with AsyncClient(COSMOS_URI, COSMOS_CREDENTIAL, connection_policy=connectionPolicy, - preferred_locations=PREFERRED_LOCATIONS, excluded_locations=CLIENT_EXCLUDED_LOCATIONS, - enable_diagnostics_logging=True, logger=client_logger, - user_agent=get_user_agent(client_id)) as client: + async with AsyncClient( + COSMOS_URI, + COSMOS_CREDENTIAL, + connection_policy=connectionPolicy, + preferred_locations=PREFERRED_LOCATIONS, + excluded_locations=CLIENT_EXCLUDED_LOCATIONS, + enable_diagnostics_logging=True, + logger=client_logger, + user_agent=get_user_agent(client_id), + ) as client: db = client.get_database_client(COSMOS_DATABASE) cont = db.get_container_client(COSMOS_CONTAINER) await asyncio.sleep(1) diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/workload_configs.py b/sdk/cosmos/azure-cosmos/tests/workloads/workload_configs.py index fc4c640418d0..99366cb59d1e 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/workload_configs.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/workload_configs.py @@ -20,6 +20,6 @@ USE_MULTIPLE_WRITABLE_LOCATIONS = False CONCURRENT_REQUESTS = 100 CONCURRENT_QUERIES = 2 -PARTITION_KEY = "id" # id or pk +PARTITION_KEY = "id" # id or pk NUMBER_OF_LOGICAL_PARTITIONS = 10000 THROUGHPUT = 100000 diff --git a/sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py b/sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py index fe3d69b3bfbe..a5dc2f301da6 100644 --- a/sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py +++ b/sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py @@ -17,10 +17,12 @@ _NOISY_SUB_STATUS_CODES = set([0, None]) _REQUIRED_ATTRIBUTES = ["resource_type", "verb", "operation_type", "status_code", "sub_status_code", "duration"] + def get_user_agent(client_id): prefix = USER_AGENT_PREFIX + "-" if USER_AGENT_PREFIX else "" return prefix + str(client_id) + "-" + datetime.now().strftime("%Y%m%d-%H%M%S") + def get_existing_random_item(): random_int = random.randint(0, NUMBER_OF_LOGICAL_PARTITIONS) item = create_random_item() @@ -28,6 +30,7 @@ def get_existing_random_item(): item["pk"] = "pk-" + str(random_int) return item + def create_random_item(): paragraph1 = ( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " @@ -46,19 +49,20 @@ def create_random_item(): "value": random.randint(1, 1000000000), "timestamp": datetime.utcnow().isoformat() + "Z", "flag": random.choice([True, False]), - "description": paragraph1 + "\n\n" + paragraph2 + "description": paragraph1 + "\n\n" + paragraph2, } + def _get_upsert_item(): # 10 percent of the time, create a new item instead of updating an existing one return create_random_item() if random.random() < 0.1 else get_existing_random_item() + def upsert_item(container, excluded_locations, num_upserts): item = _get_upsert_item() for _ in range(num_upserts): if excluded_locations: - container.upsert_item(item, etag=None, match_condition=None, - excluded_locations=excluded_locations) + container.upsert_item(item, etag=None, match_condition=None, excluded_locations=excluded_locations) else: container.upsert_item(item, etag=None, match_condition=None) @@ -67,11 +71,13 @@ def read_item(container, excluded_locations, num_reads): for _ in range(num_reads): item = get_existing_random_item() if excluded_locations: - container.read_item(item["id"], item[PARTITION_KEY], etag=None, match_condition=None, - excluded_locations=excluded_locations) + container.read_item( + item["id"], item[PARTITION_KEY], etag=None, match_condition=None, excluded_locations=excluded_locations + ) else: container.read_item(item["id"], item[PARTITION_KEY], etag=None, match_condition=None) + def query_items(container, excluded_locations, num_queries): for _ in range(num_queries): perform_query(container, excluded_locations) @@ -80,25 +86,29 @@ def query_items(container, excluded_locations, num_queries): def perform_query(container, excluded_locations): random_item = get_existing_random_item() if excluded_locations: - results = container.query_items(query="SELECT * FROM c where c.id=@id and c.pk=@pk", - parameters=[{"name": "@id", "value": random_item["id"]}, - {"name": "@pk", "value": random_item["pk"]}], - partition_key=random_item[PARTITION_KEY], - excluded_locations=excluded_locations) + results = container.query_items( + query="SELECT * FROM c where c.id=@id and c.pk=@pk", + parameters=[{"name": "@id", "value": random_item["id"]}, {"name": "@pk", "value": random_item["pk"]}], + partition_key=random_item[PARTITION_KEY], + excluded_locations=excluded_locations, + ) else: - results = container.query_items(query="SELECT * FROM c where c.id=@id and c.pk=@pk", - parameters=[{"name": "@id", "value": random_item["id"]}, - {"name": "@pk", "value": random_item["pk"]}], - partition_key=random_item[PARTITION_KEY]) + results = container.query_items( + query="SELECT * FROM c where c.id=@id and c.pk=@pk", + parameters=[{"name": "@id", "value": random_item["id"]}, {"name": "@pk", "value": random_item["pk"]}], + partition_key=random_item[PARTITION_KEY], + ) items = [item for item in results] + async def upsert_item_concurrently(container, excluded_locations, num_upserts): tasks = [] for _ in range(num_upserts): item = _get_upsert_item() if excluded_locations: - tasks.append(container.upsert_item(item, etag=None, match_condition=None, - excluded_locations=excluded_locations)) + tasks.append( + container.upsert_item(item, etag=None, match_condition=None, excluded_locations=excluded_locations) + ) else: tasks.append(container.upsert_item(item, etag=None, match_condition=None)) await asyncio.gather(*tasks) @@ -109,8 +119,15 @@ async def read_item_concurrently(container, excluded_locations, num_reads): for _ in range(num_reads): item = get_existing_random_item() if excluded_locations: - tasks.append(container.read_item(item["id"], item[PARTITION_KEY], etag=None, match_condition=None, - excluded_locations=excluded_locations)) + tasks.append( + container.read_item( + item["id"], + item[PARTITION_KEY], + etag=None, + match_condition=None, + excluded_locations=excluded_locations, + ) + ) else: tasks.append(container.read_item(item["id"], item[PARTITION_KEY], etag=None, match_condition=None)) await asyncio.gather(*tasks) @@ -122,32 +139,39 @@ async def query_items_concurrently(container, excluded_locations, num_queries): tasks.append(perform_query_concurrently(container, excluded_locations)) await asyncio.gather(*tasks) + def create_custom_session(): - proxied_connector = ProxiedTCPConnector(proxy_host=COSMOS_PROXY_URI, - proxy_port=5100, - limit=100, # Max total open connections - limit_per_host=10, # Max per Cosmos DB host - keepalive_timeout=30, # Keep-alive duration for idle connections - enable_cleanup_closed=True) # Helpful for TLS/FIN issues + proxied_connector = ProxiedTCPConnector( + proxy_host=COSMOS_PROXY_URI, + proxy_port=5100, + limit=100, # Max total open connections + limit_per_host=10, # Max per Cosmos DB host + keepalive_timeout=30, # Keep-alive duration for idle connections + enable_cleanup_closed=True, + ) # Helpful for TLS/FIN issues session = ClientSession(connector=proxied_connector) return session + async def perform_query_concurrently(container, excluded_locations): random_item = get_existing_random_item() if excluded_locations: - results = container.query_items(query="SELECT * FROM c where c.id=@id and c.pk=@pk", - parameters=[{"name": "@id", "value": random_item["id"]}, - {"name": "@pk", "value": random_item["pk"]}], - partition_key=random_item[PARTITION_KEY], - excluded_locations=excluded_locations) + results = container.query_items( + query="SELECT * FROM c where c.id=@id and c.pk=@pk", + parameters=[{"name": "@id", "value": random_item["id"]}, {"name": "@pk", "value": random_item["pk"]}], + partition_key=random_item[PARTITION_KEY], + excluded_locations=excluded_locations, + ) else: - results = container.query_items(query="SELECT * FROM c where c.id=@id and c.pk=@pk", - parameters=[{"name": "@id", "value": random_item["id"]}, - {"name": "@pk", "value": random_item["pk"]}], - partition_key=random_item[PARTITION_KEY]) + results = container.query_items( + query="SELECT * FROM c where c.id=@id and c.pk=@pk", + parameters=[{"name": "@id", "value": random_item["id"]}, {"name": "@pk", "value": random_item["pk"]}], + partition_key=random_item[PARTITION_KEY], + ) items = [item async for item in results] + def create_logger(file_name): os.environ["AZURE_COSMOS_ENABLE_CIRCUIT_BREAKER"] = str(CIRCUIT_BREAKER_ENABLED) logger = logging.getLogger() @@ -159,9 +183,7 @@ def create_logger(file_name): prefix = os.path.splitext(file_name)[0] + "-" + str(os.getpid()) # Create a rotating file handler handler = RotatingFileHandler( - "log-" + get_user_agent(prefix) + '.log', - maxBytes=1024 * 1024 * 10, # 10 mb - backupCount=5 + "log-" + get_user_agent(prefix) + ".log", maxBytes=1024 * 1024 * 10, backupCount=5 # 10 mb ) logger.setLevel(LOG_LEVEL) # create filters for the logger handler to reduce the noise @@ -170,15 +192,12 @@ def create_logger(file_name): logger.addHandler(handler) return prefix, logger + def create_inner_logger(file_name="internal_logger_tues"): logger = logging.getLogger("internal_requests") prefix = os.path.splitext(file_name)[0] + "-" + str(os.getpid()) # Create a rotating file handler - handler = RotatingFileHandler( - "log-" + file_name + '.log', - maxBytes=1024 * 1024 * 10, # 10 mb - backupCount=5 - ) + handler = RotatingFileHandler("log-" + file_name + ".log", maxBytes=1024 * 1024 * 10, backupCount=5) # 10 mb logger.setLevel(LOG_LEVEL) logger.addHandler(handler) @@ -198,7 +217,8 @@ def filter(self, record): return True # Check if there is an error and omit noisy errors if record.status_code >= 400 and not ( - record.status_code in _NOISY_ERRORS and record.sub_status_code in _NOISY_SUB_STATUS_CODES): + record.status_code in _NOISY_ERRORS and record.sub_status_code in _NOISY_SUB_STATUS_CODES + ): return True # Check if the latency (duration) was above 1000 ms if record.duration >= 1000: diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_patch.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_patch.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_patch.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_patch.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_patch.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_patch.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/_patch.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/_patch.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/_patch.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/_patch.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/operations/_patch.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/operations/_patch.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/models/_patch.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/models/_patch.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/operations/_patch.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/operations/_patch.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/azure/mgmt/cosmosdbforpostgresql/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/setup.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/setup.py index 289a57e22229..96064f83b140 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/setup.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/conftest.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/conftest.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/test_cli_mgmt_cosmosdbforpostgresql.py b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/test_cli_mgmt_cosmosdbforpostgresql.py index 7ad853c5ff2f..3ab2345e712b 100644 --- a/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/test_cli_mgmt_cosmosdbforpostgresql.py +++ b/sdk/cosmosdbforpostgresql/azure-mgmt-cosmosdbforpostgresql/tests/test_cli_mgmt_cosmosdbforpostgresql.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.cosmosdbforpostgresql import CosmosdbForPostgresqlMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtCosmosdbForPostgresql(AzureMgmtRecordedTestCase): diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/setup.py b/sdk/costmanagement/azure-mgmt-costmanagement/setup.py index bdcf90a92b53..97337bd0cf42 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/setup.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_patch.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_patch.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_patch.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_patch.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_patch.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_patch.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/models/_patch.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/models/_patch.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_patch.py b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_patch.py +++ b/sdk/customproviders/azure-mgmt-customproviders/azure/mgmt/customproviders/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/customproviders/azure-mgmt-customproviders/setup.py b/sdk/customproviders/azure-mgmt-customproviders/setup.py index e0bcad9ccf8f..f23c46e72cf6 100644 --- a/sdk/customproviders/azure-mgmt-customproviders/setup.py +++ b/sdk/customproviders/azure-mgmt-customproviders/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Custom Providers Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/_patch.py b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/_patch.py +++ b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/_patch.py b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/_patch.py +++ b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/operations/_patch.py b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/operations/_patch.py +++ b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/models/_patch.py b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/models/_patch.py +++ b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/operations/_patch.py b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/operations/_patch.py +++ b/sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databasewatcher/azure-mgmt-databasewatcher/setup.py b/sdk/databasewatcher/azure-mgmt-databasewatcher/setup.py index c7effaf033fc..d7a24a402af3 100644 --- a/sdk/databasewatcher/azure-mgmt-databasewatcher/setup.py +++ b/sdk/databasewatcher/azure-mgmt-databasewatcher/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_patch.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_patch.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_patch.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_patch.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/operations/_patch.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/operations/_patch.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_patch.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_patch.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_patch.py b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_patch.py +++ b/sdk/databox/azure-mgmt-databox/azure/mgmt/databox/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databox/azure-mgmt-databox/setup.py b/sdk/databox/azure-mgmt-databox/setup.py index a501a52acfdd..5b39dfd469f1 100644 --- a/sdk/databox/azure-mgmt-databox/setup.py +++ b/sdk/databox/azure-mgmt-databox/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/setup.py b/sdk/databoxedge/azure-mgmt-databoxedge/setup.py index 50e31be7d90c..b95e4dc6c55a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/setup.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_patch.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_patch.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/_patch.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/_patch.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/operations/_patch.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/operations/_patch.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_patch.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_patch.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_patch.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_patch.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/databricks/azure-mgmt-databricks/setup.py b/sdk/databricks/azure-mgmt-databricks/setup.py index 7b2212e87e3f..92fa31196300 100644 --- a/sdk/databricks/azure-mgmt-databricks/setup.py +++ b/sdk/databricks/azure-mgmt-databricks/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/databricks/azure-mgmt-databricks/tests/test_cli_mgmt_databricks.py b/sdk/databricks/azure-mgmt-databricks/tests/test_cli_mgmt_databricks.py index 63c881aef0d7..c53fbd2df384 100644 --- a/sdk/databricks/azure-mgmt-databricks/tests/test_cli_mgmt_databricks.py +++ b/sdk/databricks/azure-mgmt-databricks/tests/test_cli_mgmt_databricks.py @@ -1,24 +1,24 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import pytest from azure.mgmt.databricks import AzureDatabricksManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + @pytest.mark.skip(reason="fix later") class TestAzureMgmtDatabricks(AzureMgmtRecordedTestCase): def setup_method(self, method): self.mgmt_client = self.create_mgmt_client(AzureDatabricksManagementClient) - + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_list_by_sub(self, resource_group): self.mgmt_client.workspaces.list_by_subscription() - diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_patch.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_patch.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_patch.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_patch.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_patch.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_patch.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_patch.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_patch.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_patch.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_patch.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datadog/azure-mgmt-datadog/setup.py b/sdk/datadog/azure-mgmt-datadog/setup.py index 679dc3b1c5d7..6a5ba854b274 100644 --- a/sdk/datadog/azure-mgmt-datadog/setup.py +++ b/sdk/datadog/azure-mgmt-datadog/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/operations/_patch.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/operations/_patch.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_patch.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_patch.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_patch.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_patch.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datafactory/azure-mgmt-datafactory/setup.py b/sdk/datafactory/azure-mgmt-datafactory/setup.py index 907fd55998d6..570262824209 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/setup.py +++ b/sdk/datafactory/azure-mgmt-datafactory/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/__init__.py b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/__init__.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/_patch.py b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/_patch.py b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/operations/_patch.py b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/operations/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/_patch.py b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/_patch.py b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/setup.py b/sdk/datalake/azure-mgmt-datalake-analytics/setup.py index 5dddcdc88f05..777aca286ff9 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/setup.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,59 +16,65 @@ PACKAGE_PPRINT_NAME = "Datalake-analytics Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - 'azure.mgmt.datalake', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + "azure.mgmt.datalake", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -76,5 +82,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/tests/conftest.py b/sdk/datalake/azure-mgmt-datalake-analytics/tests/conftest.py index dbd200dc67c5..4eb9f14ffe84 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/tests/conftest.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/datalake/azure-mgmt-datalake-analytics/tests/test_mgmt_datalake.py b/sdk/datalake/azure-mgmt-datalake-analytics/tests/test_mgmt_datalake.py index 468644acf002..ee139e63dbed 100644 --- a/sdk/datalake/azure-mgmt-datalake-analytics/tests/test_mgmt_datalake.py +++ b/sdk/datalake/azure-mgmt-datalake-analytics/tests/test_mgmt_datalake.py @@ -2,9 +2,7 @@ import unittest -from devtools_testutils import ( - AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy -) +from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy class TestMgmtDatalake(AzureMgmtRecordedTestCase): @@ -22,5 +20,5 @@ def test_generate_recommendations(self): assert response -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_patch.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_patch.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_patch.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/_patch.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_patch.py b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_patch.py +++ b/sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datalake/azure-mgmt-datalake-store/setup.py b/sdk/datalake/azure-mgmt-datalake-store/setup.py index 27f92d4cc064..8cbee7f60d07 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/setup.py +++ b/sdk/datalake/azure-mgmt-datalake-store/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,59 +16,65 @@ PACKAGE_PPRINT_NAME = "Data Lake Store Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - 'azure.mgmt.datalake', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + "azure.mgmt.datalake", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -76,5 +82,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/datalake/azure-mgmt-datalake-store/tests/disable_test_mgmt_datalake_store.py b/sdk/datalake/azure-mgmt-datalake-store/tests/disable_test_mgmt_datalake_store.py index c5597abeafff..6142f7f6dcf6 100644 --- a/sdk/datalake/azure-mgmt-datalake-store/tests/disable_test_mgmt_datalake_store.py +++ b/sdk/datalake/azure-mgmt-datalake-store/tests/disable_test_mgmt_datalake_store.py @@ -10,11 +10,12 @@ import azure.mgmt.datalake.store from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer from azure.mgmt.datalake.store import models + # from azure.mgmt.network import NetworkManagementClient # this is the ADL produciton region for now -LOCATION = 'eastus2' -VIRTUAL_NETWORK_NAME = 'Testvirtualnetworkname' +LOCATION = "eastus2" +VIRTUAL_NETWORK_NAME = "Testvirtualnetworkname" SUBNET_NAME = "TestSubnet" PRIVATE_ENDPOINT_NAME = "myPrivateEndpoint" @@ -161,8 +162,8 @@ def setUp(self): @ResourceGroupPreparer(location=LOCATION) def test_adls_accounts(self, resource_group, location): # define account params - account_name = self.get_resource_name('testadls') - account_name_no_encryption = self.get_resource_name('testadls2') + account_name = self.get_resource_name("testadls") + account_name_no_encryption = self.get_resource_name("testadls2") params_create = azure.mgmt.datalake.store.models.CreateDataLakeStoreAccountParameters( location=location, @@ -171,25 +172,16 @@ def test_adls_accounts(self, resource_group, location): type=azure.mgmt.datalake.store.models.EncryptionConfigType.service_managed ), encryption_state=azure.mgmt.datalake.store.models.EncryptionState.enabled, - tags={ - 'tag1': 'value1' - } + tags={"tag1": "value1"}, ) params_create_no_encryption = azure.mgmt.datalake.store.models.CreateDataLakeStoreAccountParameters( - location=location, - tags={ - 'tag1': 'value1' - } + location=location, tags={"tag1": "value1"} ) # ensure that the account name is available name_availability = self.adls_account_client.accounts.check_name_availability( - location.replace(" ", ""), - { - 'name': account_name, - "type": "Microsoft.DataLakeStore/accounts" - } + location.replace(" ", ""), {"name": account_name, "type": "Microsoft.DataLakeStore/accounts"} ) self.assertTrue(name_availability.name_available) @@ -202,49 +194,44 @@ def test_adls_accounts(self, resource_group, location): # ensure that the account name is no longer available name_availability = self.adls_account_client.accounts.check_name_availability( - location.replace(" ", ""), - { - 'name': account_name, - "type": "Microsoft.DataLakeStore/accounts" - } + location.replace(" ", ""), {"name": account_name, "type": "Microsoft.DataLakeStore/accounts"} ) self.assertFalse(name_availability.name_available) # full validation of the create self.assertEqual(adls_account.name, account_name) - self.assertEqual(azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus.succeeded, - adls_account.provisioning_state) + self.assertEqual( + azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus.succeeded, adls_account.provisioning_state + ) self.assertIsNotNone(adls_account.id) self.assertIn(account_name, adls_account.id) self.assertIn(account_name, adls_account.endpoint) self.assertEqual(location, adls_account.location) - self.assertEqual('Microsoft.DataLakeStore/accounts', adls_account.type) + self.assertEqual("Microsoft.DataLakeStore/accounts", adls_account.type) self.assertEqual(azure.mgmt.datalake.store.models.EncryptionState.enabled, adls_account.encryption_state) - self.assertEqual('SystemAssigned', adls_account.identity.type) + self.assertEqual("SystemAssigned", adls_account.identity.type) self.assertIsNotNone(adls_account.identity.principal_id) self.assertIsNotNone(adls_account.identity.tenant_id) - self.assertEqual(adls_account.tags['tag1'], 'value1') + self.assertEqual(adls_account.tags["tag1"], "value1") # get the account and do the same checks - adls_account = self.adls_account_client.accounts.get( - resource_group.name, - account_name - ) + adls_account = self.adls_account_client.accounts.get(resource_group.name, account_name) # full validation self.assertEqual(adls_account.name, account_name) - self.assertEqual(azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus.succeeded, - adls_account.provisioning_state) + self.assertEqual( + azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus.succeeded, adls_account.provisioning_state + ) self.assertIsNotNone(adls_account.id) self.assertIn(account_name, adls_account.id) self.assertIn(account_name, adls_account.endpoint) self.assertEqual(location, adls_account.location) - self.assertEqual('Microsoft.DataLakeStore/accounts', adls_account.type) + self.assertEqual("Microsoft.DataLakeStore/accounts", adls_account.type) self.assertEqual(azure.mgmt.datalake.store.models.EncryptionState.enabled, adls_account.encryption_state) - self.assertEqual('SystemAssigned', adls_account.identity.type) + self.assertEqual("SystemAssigned", adls_account.identity.type) self.assertIsNotNone(adls_account.identity.principal_id) self.assertIsNotNone(adls_account.identity.tenant_id) - self.assertEqual(adls_account.tags['tag1'], 'value1') + self.assertEqual(adls_account.tags["tag1"], "value1") # create no encryption account # create and validate an ADLS account @@ -255,23 +242,25 @@ def test_adls_accounts(self, resource_group, location): ).result() adls_account_no_encryption = self.adls_account_client.accounts.get( - resource_group.name, - account_name_no_encryption + resource_group.name, account_name_no_encryption ) # full validation of the create self.assertEqual(adls_account_no_encryption.name, account_name_no_encryption) - self.assertEqual(azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus.succeeded, - adls_account_no_encryption.provisioning_state) + self.assertEqual( + azure.mgmt.datalake.store.models.DataLakeStoreAccountStatus.succeeded, + adls_account_no_encryption.provisioning_state, + ) self.assertIsNotNone(adls_account_no_encryption.id) self.assertIn(account_name_no_encryption, adls_account_no_encryption.id) self.assertIn(account_name_no_encryption, adls_account_no_encryption.endpoint) self.assertEqual(location, adls_account_no_encryption.location) - self.assertEqual('Microsoft.DataLakeStore/accounts', adls_account_no_encryption.type) - self.assertEqual(azure.mgmt.datalake.store.models.EncryptionState.enabled, - adls_account_no_encryption.encryption_state) + self.assertEqual("Microsoft.DataLakeStore/accounts", adls_account_no_encryption.type) + self.assertEqual( + azure.mgmt.datalake.store.models.EncryptionState.enabled, adls_account_no_encryption.encryption_state + ) self.assertIsNone(adls_account_no_encryption.identity) - self.assertEqual(adls_account_no_encryption.tags['tag1'], 'value1') + self.assertEqual(adls_account_no_encryption.tags["tag1"], "value1") # list all the accounts result_list = list(self.adls_account_client.accounts.list_by_resource_group(resource_group.name)) @@ -284,14 +273,10 @@ def test_adls_accounts(self, resource_group, location): adls_account = self.adls_account_client.accounts.begin_update( resource_group.name, account_name, - azure.mgmt.datalake.store.models.UpdateDataLakeStoreAccountParameters( - tags={ - 'tag2': 'value2' - } - ) + azure.mgmt.datalake.store.models.UpdateDataLakeStoreAccountParameters(tags={"tag2": "value2"}), ).result() - self.assertEqual(adls_account.tags['tag2'], 'value2') + self.assertEqual(adls_account.tags["tag2"], "value2") # confirm that 'locations.get_capability' is functional get_capability = self.adls_account_client.locations.get_capability(location.replace(" ", "")) @@ -301,12 +286,9 @@ def test_adls_accounts(self, resource_group, location): operations_list = self.adls_account_client.operations.list() self.assertIsNotNone(operations_list) - self.adls_account_client.accounts.begin_delete( - resource_group.name, - account_name - ).wait() + self.adls_account_client.accounts.begin_delete(resource_group.name, account_name).wait() # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_patch.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_patch.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/_patch.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/_patch.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_patch.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_patch.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_patch.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_patch.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_patch.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_patch.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datamigration/azure-mgmt-datamigration/setup.py b/sdk/datamigration/azure-mgmt-datamigration/setup.py index e4bebd5f1c73..4102357b4bdd 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/setup.py +++ b/sdk/datamigration/azure-mgmt-datamigration/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_patch.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_patch.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_patch.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_patch.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_patch.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_patch.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_patch.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_patch.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_patch.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_patch.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_async_test.py b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_async_test.py index 621958a298c7..01a2542a9f2b 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_async_test.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_async_test.py @@ -13,6 +13,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestDataProtectionManagementOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_test.py b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_test.py index 0c5c80fd5e49..e5bf5a782025 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_test.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_operations_test.py @@ -12,6 +12,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestDataProtectionManagementOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_async_test.py b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_async_test.py index e43937c00028..40ba389d340c 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_async_test.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_async_test.py @@ -13,6 +13,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestDataProtectionManagementResourceGuardsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_test.py b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_test.py index 798efd028dee..9a873669d88e 100644 --- a/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_test.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/tests/test_dataprotection_management_resourceguards_operations_test.py @@ -12,6 +12,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestDataProtectionManagementResourceGuardsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_patch.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_patch.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_patch.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_patch.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_patch.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_patch.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_patch.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_patch.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_patch.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_patch.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/datashare/azure-mgmt-datashare/setup.py b/sdk/datashare/azure-mgmt-datashare/setup.py index b5db68fabf7d..163c7b778a15 100644 --- a/sdk/datashare/azure-mgmt-datashare/setup.py +++ b/sdk/datashare/azure-mgmt-datashare/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Data Share Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/_patch.py b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/_patch.py +++ b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/_patch.py b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/_patch.py +++ b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/operations/_patch.py b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/operations/_patch.py +++ b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/models/_patch.py b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/models/_patch.py +++ b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/operations/_patch.py b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/operations/_patch.py +++ b/sdk/defendereasm/azure-mgmt-defendereasm/azure/mgmt/defendereasm/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/defendereasm/azure-mgmt-defendereasm/setup.py b/sdk/defendereasm/azure-mgmt-defendereasm/setup.py index efe716f056e2..0554834eeb26 100644 --- a/sdk/defendereasm/azure-mgmt-defendereasm/setup.py +++ b/sdk/defendereasm/azure-mgmt-defendereasm/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Defendereasm Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/_patch.py b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/_patch.py +++ b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/_patch.py b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/_patch.py +++ b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/operations/_patch.py b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/operations/_patch.py +++ b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/models/_patch.py b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/models/_patch.py +++ b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/operations/_patch.py b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/operations/_patch.py +++ b/sdk/dell/azure-mgmt-dellstorage/azure/mgmt/dellstorage/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_patch.py b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_patch.py +++ b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/_patch.py b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/_patch.py +++ b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/operations/_patch.py b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/operations/_patch.py +++ b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/models/_patch.py b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/models/_patch.py +++ b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/operations/_patch.py b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/operations/_patch.py +++ b/sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dependencymap/azure-mgmt-dependencymap/setup.py b/sdk/dependencymap/azure-mgmt-dependencymap/setup.py index 4aad6d4ca6ba..9e4c48487841 100644 --- a/sdk/dependencymap/azure-mgmt-dependencymap/setup.py +++ b/sdk/dependencymap/azure-mgmt-dependencymap/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/_patch.py b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/_patch.py +++ b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/_patch.py b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/_patch.py +++ b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/operations/_patch.py b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/operations/_patch.py +++ b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/_patch.py b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/_patch.py +++ b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/_patch.py b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/_patch.py +++ b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/azure/mgmt/deploymentmanager/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py index f72cbc2e34b5..3a341c4dad76 100644 --- a/sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py +++ b/sdk/deploymentmanager/azure-mgmt-deploymentmanager/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Deployment Manager" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_patch.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_patch.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_patch.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_patch.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_patch.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_patch.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_patch.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_patch.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_patch.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_patch.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py index d28166930acb..0f709e1d9831 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_async_test.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_async_test.py index c9c87513a464..dca96a89807b 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_async_test.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_async_test.py @@ -25,4 +25,3 @@ async def test_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_test.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_test.py index 12ae57a4ba7e..41b7baa276c6 100644 --- a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_test.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/tests/test_desktop_virtualization_mgmt_operations_test.py @@ -24,4 +24,3 @@ def test_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_operations/_patch.py b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_operations/_patch.py +++ b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_patch.py b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_patch.py +++ b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_operations/_patch.py b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_operations/_patch.py +++ b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_patch.py b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_patch.py +++ b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/models/_patch.py b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/models/_patch.py +++ b/sdk/devcenter/azure-developer-devcenter/azure/developer/devcenter/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/deployment_environments_async_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/deployment_environments_async_sample.py index c09e6cd08891..e4327a6a537c 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/deployment_environments_async_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/deployment_environments_async_sample.py @@ -30,7 +30,7 @@ DESCRIPTION: This sample demonstrates how to create and delete Environments using python DevCenterClient. For this sample, - you must have previously configured a DevCenter, Project, Catalog, Environment Definition and Environment Type. + you must have previously configured a DevCenter, Project, Catalog, Environment Definition and Environment Type. More details on how to configure those requirements at https://learn.microsoft.com/azure/deployment-environments/ USAGE: @@ -90,7 +90,9 @@ async def environment_create_and_delete_async(): # List available Environment Definitions environment_definitions = [] - async for environment_definition in client.list_environment_definitions_by_catalog(target_project_name, target_catalog_name): + async for environment_definition in client.list_environment_definitions_by_catalog( + target_project_name, target_catalog_name + ): environment_definitions.append(environment_definition) if environment_definitions: print("\nList of environment definitions: ") @@ -141,8 +143,10 @@ async def environment_create_and_delete_async(): print(f"Completed deletion for the environment with status {delete_result.status}") # [END environment_create_and_delete_async] + async def main(): await environment_create_and_delete_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_action_async_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_action_async_sample.py index f07a385725d8..3c22d6be12b1 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_action_async_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_action_async_sample.py @@ -47,6 +47,7 @@ 1) DEVCENTER_ENDPOINT - the endpoint for your devcenter """ + async def dev_box_action_async(): # Set the values of the dev center endpoint, client ID, and client secret of the AAD application as environment variables: @@ -75,7 +76,9 @@ async def dev_box_action_async(): raise ValueError("Missing Dev Box - please create one before running the example.") # Get the schedule default action. This action should exist for dev boxes created with auto-stop enabled - action = await client.get_dev_box_action(target_dev_box.project_name, "me", target_dev_box.name, "schedule-default") + action = await client.get_dev_box_action( + target_dev_box.project_name, "me", target_dev_box.name, "schedule-default" + ) next_action_time = action.next.scheduled_time print(f"\nAction {action.Name} is schedule to {action.ActionType} at {next_action_time}.") @@ -92,8 +95,10 @@ async def dev_box_action_async(): await client.skip_dev_box_action(target_dev_box.project_name, "me", target_dev_box.name, "schedule-default") print(f"\nThe scheduled auto-stop action in dev box {target_dev_box.name} has been skipped") + async def main(): await dev_box_action_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_create_async_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_create_async_sample.py index a2335ad58a19..c971aaae9680 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_create_async_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_create_async_sample.py @@ -29,7 +29,7 @@ DESCRIPTION: This sample demonstrates how to create, connect and delete a dev box using python DevCenterClient. For this sample, - you must have previously configured DevCenter, Project, Network Connection, Dev Box Definition, and Pool.More details + you must have previously configured DevCenter, Project, Network Connection, Dev Box Definition, and Pool.More details on how to configure those requirements at https://learn.microsoft.com/azure/dev-box/quickstart-configure-dev-box-service @@ -39,12 +39,14 @@ Set the environment variables with your own values before running the sample: 1) DEVCENTER_ENDPOINT - the endpoint for your devcenter """ + import os import asyncio from azure.developer.devcenter.aio import DevCenterClient from azure.identity import DefaultAzureCredential + async def dev_box_create_connect_delete_async(): # [START dev_box_create_connect_delete_async] # Set the values of the dev center endpoint, client ID, and client secret of the AAD application as environment variables: @@ -66,12 +68,12 @@ async def dev_box_create_connect_delete_async(): print("\nList of projects: ") for project in projects: print(f"{project.name}") - + # Select first project in the list target_project_name = projects[0].name else: raise ValueError("Missing Project - please create one before running the example") - + # List available Pools pools = [] async for pool in client.list_pools(target_project_name): @@ -80,35 +82,37 @@ async def dev_box_create_connect_delete_async(): print("\nList of pools: ") for pool in pools: print(f"{pool.name}") - + # Select first pool in the list target_pool_name = pools[0].name else: raise ValueError("Missing Pool - please create one before running the example") - + # Stand up a new Dev Box print(f"\nStarting to create dev box in project {target_project_name} and pool {target_pool_name}") - + dev_box_poller = await client.begin_create_dev_box( target_project_name, "me", "Test_DevBox", {"poolName": target_pool_name} ) dev_box = await dev_box_poller.result() print(f"Provisioned dev box with status {dev_box.provisioning_state}.") - + # Connect to the provisioned Dev Box remote_connection = await client.get_remote_connection(target_project_name, "me", dev_box.name) print(f"Connect to the dev box using web URL {remote_connection.web_url}") - + # Tear down the Dev Box when finished print(f"Starting to delete dev box.") - + delete_poller = await client.begin_delete_dev_box(target_project_name, "me", "Test_DevBox") delete_result = await delete_poller.result() print(f"Completed deletion for the dev box with status {delete_result.status}") # [END dev_box_create_connect_delete_async] + async def main(): await dev_box_create_connect_delete_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_restart_async_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_restart_async_sample.py index 8cff68746acd..dad191d28b54 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_restart_async_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/async_samples/dev_box_restart_async_sample.py @@ -46,6 +46,7 @@ 1) DEVCENTER_ENDPOINT - the endpoint for your devcenter """ + async def dev_box_restart_stop_start_async(): # Set the values of the dev center endpoint, client ID, and client secret of the AAD application as environment variables: @@ -67,35 +68,37 @@ async def dev_box_restart_stop_start_async(): print("List of dev boxes: ") for dev_box in dev_boxes: print(f"{dev_box.name}") - + # Select first dev box in the list target_dev_box = dev_boxes[0] else: raise ValueError("Missing Dev Box - please create one before running the example.") - + # Get the target dev box properties project_name = target_dev_box.project_name user = target_dev_box.user dev_box_name = target_dev_box.name - + # Stop dev box if it's running if target_dev_box.power_state == PowerState.Running: stop_poller = await client.begin_stop_dev_box(project_name, user, dev_box_name) stop_result = await stop_poller.result() print(f"Stopping dev box completed with status {stop_result.status}") - + # At this point we should have a stopped dev box . Let's start it start_poller = await client.begin_start_dev_box(project_name, user, dev_box_name) start_result = await start_poller.result() print(f"Starting dev box completed with status {start_result.status}") - + # Restart the dev box restart_poller = await client.begin_restart_dev_box(project_name, user, dev_box_name) restart_result = await restart_poller.result() print(f"Done restarting the dev box with status {start_result.status}") + async def main(): await dev_box_restart_stop_start_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/devcenter/azure-developer-devcenter/samples/create_client_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/create_client_sample.py index 70836ae439c7..245d8ce00034 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/create_client_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/create_client_sample.py @@ -28,8 +28,8 @@ FILE: create_client_sample.py DESCRIPTION: - This sample demonstrates how to create a Dev Center client. For this sample, you must - have previously configured a Dev Center in Azure. More details on how to configure it at + This sample demonstrates how to create a Dev Center client. For this sample, you must + have previously configured a Dev Center in Azure. More details on how to configure it at https://learn.microsoft.com/azure/deployment-environments/quickstart-create-and-configure-devcenter#create-a-dev-center USAGE: @@ -39,6 +39,7 @@ 1) DEVCENTER_ENDPOINT - the endpoint for your devcenter """ + def create_dev_center_client(): # [START create_dev_center_client] import os @@ -57,5 +58,6 @@ def create_dev_center_client(): client = DevCenterClient(endpoint, credential=DefaultAzureCredential()) # [END create_dev_center_client] + if __name__ == "__main__": create_dev_center_client() diff --git a/sdk/devcenter/azure-developer-devcenter/samples/deployment_environments_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/deployment_environments_sample.py index 4ffaf5d12603..77c525a0cfd5 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/deployment_environments_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/deployment_environments_sample.py @@ -30,7 +30,7 @@ DESCRIPTION: This sample demonstrates how to create and delete Environments using python DevCenterClient. For this sample, - you must have previously configured a DevCenter, Project, Catalog, Environment Definition and Environment Type. + you must have previously configured a DevCenter, Project, Catalog, Environment Definition and Environment Type. More details on how to configure those requirements at https://learn.microsoft.com/azure/deployment-environments/ USAGE: @@ -40,6 +40,7 @@ 1) DEVCENTER_ENDPOINT - the endpoint for your devcenter """ + def environment_create_and_delete(): # [START environment_create_and_delete] import os diff --git a/sdk/devcenter/azure-developer-devcenter/samples/dev_box_create_sample.py b/sdk/devcenter/azure-developer-devcenter/samples/dev_box_create_sample.py index c8cefb4c41c8..a3d945b3c818 100644 --- a/sdk/devcenter/azure-developer-devcenter/samples/dev_box_create_sample.py +++ b/sdk/devcenter/azure-developer-devcenter/samples/dev_box_create_sample.py @@ -29,7 +29,7 @@ DESCRIPTION: This sample demonstrates how to create, connect and delete a dev box using python DevCenterClient. For this sample, - you must have previously configured DevCenter, Project, Network Connection, Dev Box Definition, and Pool.More details + you must have previously configured DevCenter, Project, Network Connection, Dev Box Definition, and Pool.More details on how to configure those requirements at https://learn.microsoft.com/azure/dev-box/quickstart-configure-dev-box-service @@ -40,6 +40,7 @@ 1) DEVCENTER_ENDPOINT - the endpoint for your devcenter """ + def dev_box_create_connect_delete(): # [START dev_box_create_connect_delete] import os @@ -102,5 +103,6 @@ def dev_box_create_connect_delete(): print(f"Completed deletion for the dev box with status {delete_result.status}") # [END dev_box_create_connect_delete] + if __name__ == "__main__": dev_box_create_connect_delete() diff --git a/sdk/devcenter/azure-developer-devcenter/setup.py b/sdk/devcenter/azure-developer-devcenter/setup.py index 2be63bfc3c86..576c1a3d368d 100644 --- a/sdk/devcenter/azure-developer-devcenter/setup.py +++ b/sdk/devcenter/azure-developer-devcenter/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-developer-devcenter" PACKAGE_PPRINT_NAME = "Azure Developer Devcenter" diff --git a/sdk/devcenter/azure-developer-devcenter/tests/conftest.py b/sdk/devcenter/azure-developer-devcenter/tests/conftest.py index 07e19a00eff0..a759437b05a2 100644 --- a/sdk/devcenter/azure-developer-devcenter/tests/conftest.py +++ b/sdk/devcenter/azure-developer-devcenter/tests/conftest.py @@ -15,19 +15,23 @@ ) import pytest + # autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy): add_body_key_sanitizer(json_path="$..id_token", value="Sanitized") add_body_key_sanitizer(json_path="$..client_info", value="Sanitized") add_oauth_response_sanitizer() - add_uri_regex_sanitizer(regex="\\.(?.*)\\.devcenter\\.azure\\.com", group_for_replace="location", value="location") + add_uri_regex_sanitizer( + regex="\\.(?.*)\\.devcenter\\.azure\\.com", group_for_replace="location", value="location" + ) # Remove the following sanitizers since certain fields are needed in tests and are non-sensitive: # - AZSDK2003: Location # - AZSDK3493: $..name remove_batch_sanitizers(["AZSDK2003", "AZSDK3493"]) return + @pytest.fixture(scope="session", autouse=True) def patch_async_sleep(): async def immediate_return(_): diff --git a/sdk/devcenter/azure-developer-devcenter/tests/test_devcenter_operations_async.py b/sdk/devcenter/azure-developer-devcenter/tests/test_devcenter_operations_async.py index d5023a07a7e0..5eed70e20e02 100644 --- a/sdk/devcenter/azure-developer-devcenter/tests/test_devcenter_operations_async.py +++ b/sdk/devcenter/azure-developer-devcenter/tests/test_devcenter_operations_async.py @@ -139,13 +139,15 @@ async def test_create_dev_box_async(self, **kwargs): async with client: # Create DevBox - create_devbox_response = await client.begin_create_dev_box(project_name, user, devbox_name, {"poolName": pool_name}) + create_devbox_response = await client.begin_create_dev_box( + project_name, user, devbox_name, {"poolName": pool_name} + ) devbox_result = await create_devbox_response.result() assert devbox_result is not None assert devbox_result.provisioning_state in [ DevBoxProvisioningState.SUCCEEDED, DevBoxProvisioningState.PROVISIONED_WITH_WARNING, - ] + ] @DevcenterPowerShellPreparer() @recorded_by_proxy_async @@ -160,7 +162,9 @@ async def test_dev_box_action_async(self, **kwargs): async with client: # Actions - action_response = await client.get_dev_box_action(project_name, default_user, devbox_name, "schedule-default") + action_response = await client.get_dev_box_action( + project_name, default_user, devbox_name, "schedule-default" + ) next_time_date = action_response.next.scheduled_time assert next_time_date is not None assert action_response.name == "schedule-default" @@ -172,7 +176,9 @@ async def test_dev_box_action_async(self, **kwargs): next_time_date = next_time_date + timedelta(hours=1) delay_all_response = [] - async for action in client.delay_all_dev_box_actions(project_name, default_user, devbox_name, delay_until=next_time_date): + async for action in client.delay_all_dev_box_actions( + project_name, default_user, devbox_name, delay_until=next_time_date + ): delay_all_response.append(action) assert delay_all_response[0].action.next.scheduled_time == next_time_date @@ -247,7 +253,7 @@ async def test_list_all_dev_boxes_by_user_async(self, **kwargs): default_user = "me" client = self.create_client(endpoint) - + async with client: devboxes = [] async for devbox in client.list_all_dev_boxes_by_user(default_user): @@ -320,7 +326,7 @@ async def test_get_catalog_async(self, **kwargs): catalog_name = kwargs.pop("devcenter_catalog_name") client = self.create_client(endpoint) - + async with client: catalog_response = await client.get_catalog(project_name, catalog_name) assert catalog_response.name == catalog_name @@ -340,7 +346,7 @@ async def test_list_catalogs_async(self, **kwargs): async for catalog in client.list_catalogs(project_name): if catalog.name == catalog_name: catalogs.append(catalog) - + assert len(catalogs) == 1 assert catalogs[0].name == catalog_name @@ -356,7 +362,9 @@ async def test_get_environment_definition_async(self, **kwargs): client = self.create_client(endpoint) async with client: - env_definition_response = await client.get_environment_definition(project_name, catalog_name, env_definition_name) + env_definition_response = await client.get_environment_definition( + project_name, catalog_name, env_definition_name + ) assert env_definition_response.name == env_definition_name @DevcenterPowerShellPreparer() @@ -368,13 +376,13 @@ async def test_list_environment_definitions_async(self, **kwargs): env_definition_name = kwargs.pop("devcenter_environment_definition_name") client = self.create_client(endpoint) - + async with client: env_definitions = [] async for env_definition in client.list_environment_definitions(project_name): if env_definition.name == env_definition_name: env_definitions.append(env_definition) - + assert len(env_definitions) == 1 assert env_definitions[0].name == env_definition_name @@ -443,26 +451,26 @@ async def test_environments_async(self, **kwargs): ) create_env_result = await create_env_response.result() assert create_env_result.provisioning_state == DevBoxProvisioningState.SUCCEEDED - + env_response = await client.get_environment(project_name, default_user, env_name) assert env_response.name == env_name - + envs = [] async for env in client.list_environments(project_name, default_user): if env.name == env_name: envs.append(env) - + assert len(envs) == 1 assert envs[0].name == env_name - + all_envs = [] async for env in client.list_all_environments(project_name): if env.name == env_name: all_envs.append(env) - + assert len(all_envs) == 1 assert all_envs[0].name == env_name - + delete_response = await client.begin_delete_environment(project_name, default_user, env_name) delete_result = await delete_response.result() - assert delete_result.status == OperationStatus.SUCCEEDED \ No newline at end of file + assert delete_result.status == OperationStatus.SUCCEEDED diff --git a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/_patch.py b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/_patch.py +++ b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/_patch.py b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/_patch.py +++ b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/operations/_patch.py b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/operations/_patch.py +++ b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/models/_patch.py b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/models/_patch.py +++ b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/operations/_patch.py b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/operations/_patch.py +++ b/sdk/devcenter/azure-mgmt-devcenter/azure/mgmt/devcenter/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devcenter/azure-mgmt-devcenter/setup.py b/sdk/devcenter/azure-mgmt-devcenter/setup.py index b6a84f25852a..98d1d0d5599a 100644 --- a/sdk/devcenter/azure-mgmt-devcenter/setup.py +++ b/sdk/devcenter/azure-mgmt-devcenter/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/_patch.py b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/_patch.py +++ b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/_patch.py b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/_patch.py +++ b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/operations/_patch.py b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/operations/_patch.py +++ b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/models/_patch.py b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/models/_patch.py +++ b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/operations/_patch.py b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/operations/_patch.py +++ b/sdk/devhub/azure-mgmt-devhub/azure/mgmt/devhub/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devhub/azure-mgmt-devhub/setup.py b/sdk/devhub/azure-mgmt-devhub/setup.py index f6d8dcc8da9f..6d22c6967c43 100644 --- a/sdk/devhub/azure-mgmt-devhub/setup.py +++ b/sdk/devhub/azure-mgmt-devhub/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Devhub Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "isodate<1.0.0,>=0.6.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/azure/__init__.py b/sdk/deviceupdate/azure-iot-deviceupdate/azure/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/azure/__init__.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/__init__.py b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/__init__.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeleteUpdate/sample_delete_update.py b/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeleteUpdate/sample_delete_update.py index 9d03ed5d7f9c..7ae665b51cea 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeleteUpdate/sample_delete_update.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeleteUpdate/sample_delete_update.py @@ -23,8 +23,10 @@ update_name = os.environ["DEVICEUPDATE_UPDATE_NAME"] update_version = "2022.812.234.42" # os.environ["DEVICEUPDATE_UPDATE_VERSION"] except KeyError: - print("Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " - "DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION") + print( + "Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " + "DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION" + ) exit() # Build a client through AAD @@ -35,4 +37,4 @@ response.wait except HttpResponseError as e: - print('Failed to delete update: {}'.format(e)) + print("Failed to delete update: {}".format(e)) diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeployUpdate/sample_deploy_update.py b/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeployUpdate/sample_deploy_update.py index e56bdd7836de..cc5f98f72e45 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeployUpdate/sample_deploy_update.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/samples/DeployUpdate/sample_deploy_update.py @@ -27,7 +27,9 @@ group = os.environ["DEVICEUPDATE_DEVICE_GROUP"] except KeyError: print("Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, ") - print("DEVICEUPDATE_DEVICE_GROUP, DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION") + print( + "DEVICEUPDATE_DEVICE_GROUP, DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION" + ) exit() # Build a client through AAD @@ -38,16 +40,12 @@ deployment = { "deploymentId": deployment_id, "startDateTime": str(datetime.now(timezone.utc)), - "updateId": { - "provider": update_provider, - "name": update_name, - "version": update_version - }, - "groupId": group + "updateId": {"provider": update_provider, "name": update_name, "version": update_version}, + "groupId": group, } response = client.device_management.create_or_update_deployment(group, deployment_id, deployment) response = client.device_management.get_deployment_status(group, deployment_id) print(response) except HttpResponseError as e: - print('Failed to deploy update: {}'.format(e)) + print("Failed to deploy update: {}".format(e)) diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetDevice/sample_get_device.py b/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetDevice/sample_get_device.py index f062c56ebb03..5104d28289d8 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetDevice/sample_get_device.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetDevice/sample_get_device.py @@ -20,7 +20,9 @@ instance = os.environ["DEVICEUPDATE_INSTANCE_ID"] group = os.environ["DEVICEUPDATE_DEVICE_GROUP"] except KeyError: - print("Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, DEVICEUPDATE_DEVICE_GROUP") + print( + "Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, DEVICEUPDATE_DEVICE_GROUP" + ) exit() # Build a client through AAD @@ -52,4 +54,4 @@ print(f" {item['update']['updateId']['name']}") print(f" {item['update']['updateId']['version']}") except HttpResponseError as e: - print('Failed to get device message: {}'.format(e)) + print("Failed to get device message: {}".format(e)) diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetUpdate/sample_get_update.py b/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetUpdate/sample_get_update.py index ed8ad0cd6f9f..9e65df1a9bd2 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetUpdate/sample_get_update.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/samples/GetUpdate/sample_get_update.py @@ -23,8 +23,10 @@ update_name = os.environ["DEVICEUPDATE_UPDATE_NAME"] update_version = os.environ["DEVICEUPDATE_UPDATE_VERSION"] except KeyError: - print("Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " - "DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION") + print( + "Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " + "DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION" + ) exit() # Build a client through AAD @@ -56,4 +58,4 @@ print(response) except HttpResponseError as e: - print('Failed to get update: {}'.format(e)) + print("Failed to get update: {}".format(e)) diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/samples/ImportUpdate/sample_import_update.py b/sdk/deviceupdate/azure-iot-deviceupdate/samples/ImportUpdate/sample_import_update.py index d1a2f377ef8b..ea85becdf7eb 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/samples/ImportUpdate/sample_import_update.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/samples/ImportUpdate/sample_import_update.py @@ -27,8 +27,10 @@ manifest_file = os.environ["DEVICEUPDATE_MANIFEST_FILE"] manifest_url = os.environ["DEVICEUPDATE_MANIFEST_URL"] except KeyError: - print("Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " - "DEVICEUPDATE_PAYLOAD_FILE, DEVICEUPDATE_PAYLOAD_URL, DEVICEUPDATE_MANIFEST_FILE, DEVICEUPDATE_MANIFEST_URL") + print( + "Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " + "DEVICEUPDATE_PAYLOAD_FILE, DEVICEUPDATE_PAYLOAD_URL, DEVICEUPDATE_MANIFEST_FILE, DEVICEUPDATE_MANIFEST_URL" + ) exit() @@ -46,25 +48,20 @@ def get_file_hash(file_path): client = DeviceUpdateClient(credential=DefaultAzureCredential(), endpoint=endpoint, instance_id=instance) try: - content = [{ - "importManifest": { - "url": manifest_url, - "sizeInBytes": get_file_size(manifest_file), - "hashes": { - "sha256": get_file_hash(manifest_file) - } - }, - "files": [{ - "fileName": os.path.basename(payload_file), - "url": payload_url - }] - }] + content = [ + { + "importManifest": { + "url": manifest_url, + "sizeInBytes": get_file_size(manifest_file), + "hashes": {"sha256": get_file_hash(manifest_file)}, + }, + "files": [{"fileName": os.path.basename(payload_file), "url": payload_url}], + } + ] response = client.device_update.begin_import_update(content) response.wait print(response.result()) except HttpResponseError as e: - print('Failed to import update: {}'.format(e)) - - + print("Failed to import update: {}".format(e)) diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/samples/ListUpdates/sample_list_updates.py b/sdk/deviceupdate/azure-iot-deviceupdate/samples/ListUpdates/sample_list_updates.py index 95e178f02a63..7c1ee632caca 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/samples/ListUpdates/sample_list_updates.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/samples/ListUpdates/sample_list_updates.py @@ -23,8 +23,10 @@ update_name = os.environ["DEVICEUPDATE_UPDATE_NAME"] update_version = os.environ["DEVICEUPDATE_UPDATE_VERSION"] except KeyError: - print("Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " - "DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION") + print( + "Missing one of environment variables: DEVICEUPDATE_ENDPOINT, DEVICEUPDATE_INSTANCE_ID, " + "DEVICEUPDATE_UPDATE_PROVIDER, DEVICEUPDATE_UPDATE_NAME, DEVICEUPDATE_UPDATE_VERSION" + ) exit() # Build a client through AAD @@ -48,4 +50,4 @@ for item in response: print(f" {item}") except HttpResponseError as e: - print('Failed to get data: {}'.format(e)) + print("Failed to get data: {}".format(e)) diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/setup.py b/sdk/deviceupdate/azure-iot-deviceupdate/setup.py index 4ba12b083a3d..5f7f1a62c9ed 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/setup.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,33 +16,32 @@ PACKAGE_PPRINT_NAME = "Azure Device Update" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=readme + "\n\n" + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='adupmdevteam@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/deviceupdate/azure-iot-deviceupdate', + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="adupmdevteam@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/deviceupdate/azure-iot-deviceupdate", keywords="azure, azure sdk", classifiers=[ "Development Status :: 5 - Production/Stable", @@ -57,15 +56,17 @@ "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.iot', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.iot", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "isodate<1.0.0,>=0.6.1", diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py b/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py index 2d45cd5408cc..b30f5c590855 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py @@ -9,14 +9,11 @@ from azure.core.exceptions import ResourceNotFoundError import pytest + class TestDeviceManagementClient(DeviceUpdateTest): @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_devices( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_devices(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: response = client.device_management.list_devices() @@ -27,11 +24,7 @@ def test_get_devices( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_device_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_device_not_found(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: client.device_management.get_device("foo") @@ -41,11 +34,7 @@ def test_get_device_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_groups( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_groups(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: response = client.device_management.list_groups() @@ -56,23 +45,14 @@ def test_get_groups( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_group( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_device_group - ): + def test_get_group(self, deviceupdate_endpoint, deviceupdate_instance_id, deviceupdate_device_group): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) response = client.device_management.get_group(deviceupdate_device_group) assert response is not None @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_group_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_group_not_found(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: client.device_management.get_group("foo") @@ -82,11 +62,7 @@ def test_get_group_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def _test_get_device_classes( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def _test_get_device_classes(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: response = client.device_management.list_device_classes() @@ -97,11 +73,7 @@ def _test_get_device_classes( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_device_class_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_device_class_not_found(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: client.device_management.get_device_class("foo") @@ -112,10 +84,7 @@ def test_get_device_class_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def _test_get_best_updates_for_group( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_device_group + self, deviceupdate_endpoint, deviceupdate_instance_id, deviceupdate_device_group ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) response = client.device_management.list_best_updates_for_group(deviceupdate_device_group) @@ -124,11 +93,7 @@ def _test_get_best_updates_for_group( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_best_updates_for_group_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_best_updates_for_group_not_found(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: response = client.device_management.list_best_updates_for_group("foo") @@ -140,10 +105,7 @@ def test_get_best_updates_for_group_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def _test_get_deployments_for_group( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_device_group + self, deviceupdate_endpoint, deviceupdate_instance_id, deviceupdate_device_group ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) response = client.device_management.list_best_updates_for_group(deviceupdate_device_group) @@ -152,11 +114,7 @@ def _test_get_deployments_for_group( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() - def test_get_deployments_for_group_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id - ): + def test_get_deployments_for_group_not_found(self, deviceupdate_endpoint, deviceupdate_instance_id): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: response = client.device_management.list_best_updates_for_group("foo") @@ -164,4 +122,3 @@ def test_get_deployments_for_group_not_found( assert len(result) > 0 except ResourceNotFoundError as e: assert 404 == e.status_code - diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py b/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py index 22cbda39cec1..055c7866622e 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py @@ -15,9 +15,9 @@ class TestDeviceUpdateClient(DeviceUpdateTest): @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_providers( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: @@ -30,10 +30,10 @@ def test_get_update_providers( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_names( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_update_provider, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, + deviceupdate_update_provider, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: @@ -46,9 +46,9 @@ def test_get_update_names( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_names_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: @@ -61,11 +61,11 @@ def test_get_update_names_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_versions( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_update_provider, - deviceupdate_update_name, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, + deviceupdate_update_provider, + deviceupdate_update_name, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: @@ -78,9 +78,9 @@ def test_get_update_versions( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_versions_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: @@ -93,23 +93,25 @@ def test_get_update_versions_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_update_provider, - deviceupdate_update_name, - deviceupdate_update_version, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, + deviceupdate_update_provider, + deviceupdate_update_name, + deviceupdate_update_version, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) - response = client.device_update.get_update(deviceupdate_update_provider, deviceupdate_update_name, deviceupdate_update_version) + response = client.device_update.get_update( + deviceupdate_update_provider, deviceupdate_update_name, deviceupdate_update_version + ) assert response is not None @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: @@ -121,16 +123,18 @@ def test_get_update_not_found( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_files( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, - deviceupdate_update_provider, - deviceupdate_update_name, - deviceupdate_update_version, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, + deviceupdate_update_provider, + deviceupdate_update_name, + deviceupdate_update_version, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: - response = client.device_update.list_files(deviceupdate_update_provider, deviceupdate_update_name, deviceupdate_update_version) + response = client.device_update.list_files( + deviceupdate_update_provider, deviceupdate_update_name, deviceupdate_update_version + ) result = [item for item in response] assert len(result) > 0 except ResourceNotFoundError as e: @@ -139,9 +143,9 @@ def test_get_update_files( @recorded_by_proxy @DeviceUpdatePowerShellPreparer() def test_get_update_files_not_found( - self, - deviceupdate_endpoint, - deviceupdate_instance_id, + self, + deviceupdate_endpoint, + deviceupdate_instance_id, ): client = self.create_client(endpoint=deviceupdate_endpoint, instance_id=deviceupdate_instance_id) try: diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/tests/testcase.py b/sdk/deviceupdate/azure-iot-deviceupdate/tests/testcase.py index b25f44dd4e2c..e48cbadc4f6c 100644 --- a/sdk/deviceupdate/azure-iot-deviceupdate/tests/testcase.py +++ b/sdk/deviceupdate/azure-iot-deviceupdate/tests/testcase.py @@ -13,10 +13,7 @@ class DeviceUpdateTest(AzureRecordedTestCase): def create_client(self, endpoint, instance_id): credential = self.get_credential(DeviceUpdateClient) return self.create_client_from_credential( - DeviceUpdateClient, - endpoint=endpoint, - instance_id=instance_id, - credential=credential + DeviceUpdateClient, endpoint=endpoint, instance_id=instance_id, credential=credential ) @@ -28,5 +25,5 @@ def create_client(self, endpoint, instance_id): deviceupdate_update_provider="foo", deviceupdate_update_name="bar", deviceupdate_update_version="1.2", - deviceupdate_device_group="foo" + deviceupdate_device_group="foo", ) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_patch.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_patch.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_patch.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_patch.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_patch.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_patch.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_patch.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_patch.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_patch.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_patch.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py index a4d93d51b514..79bb0ab49fcc 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/conftest.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/conftest.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/test_cli_mgmt_deviceupdate.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/test_cli_mgmt_deviceupdate.py index 53bd23dc17b0..57fba8f253d9 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/test_cli_mgmt_deviceupdate.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/tests/test_cli_mgmt_deviceupdate.py @@ -1,14 +1,15 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.deviceupdate import DeviceUpdateMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy + class TestMgmtDeviceUpdate(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/_patch.py b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/_patch.py +++ b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/_patch.py b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/_patch.py +++ b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/operations/_patch.py b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/operations/_patch.py +++ b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/models/_patch.py b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/models/_patch.py +++ b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/operations/_patch.py b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/operations/_patch.py +++ b/sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_patch.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_patch.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_patch.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_patch.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_patch.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_patch.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_patch.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_patch.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_patch.py b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_patch.py +++ b/sdk/devtestlabs/azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/__init__.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/__init__.py index 2f93185ab054..0c2e1f58af70 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/__init__.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/__init__.py @@ -11,12 +11,7 @@ from ._generated.models import IncomingRelationship from ._generated.models import DigitalTwinsEventRoute -__all__ = [ - 'DigitalTwinsClient', - 'DigitalTwinsModelData', - 'IncomingRelationship', - 'DigitalTwinsEventRoute' -] +__all__ = ["DigitalTwinsClient", "DigitalTwinsModelData", "IncomingRelationship", "DigitalTwinsEventRoute"] from ._version import VERSION diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py index d8350aa68315..8a4829898732 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py @@ -18,10 +18,7 @@ from ._generated._utils.serialization import Serializer from ._version import SDK_MONIKER -from ._utils import ( - prep_if_match, - prep_if_none_match -) +from ._utils import prep_if_match, prep_if_none_match from ._generated.models import ( QuerySpecification, DigitalTwinsAddOptions, @@ -30,7 +27,7 @@ DigitalTwinsUpdateComponentOptions, DigitalTwinsDeleteRelationshipOptions, DigitalTwinsUpdateRelationshipOptions, - DigitalTwinsAddRelationshipOptions + DigitalTwinsAddRelationshipOptions, ) from ._generated import AzureDigitalTwinsAPI @@ -39,22 +36,18 @@ from ._generated.models import DigitalTwinsModelData -class DigitalTwinsClient(object): # pylint: disable=too-many-public-methods,client-accepts-api-version-keyword +class DigitalTwinsClient(object): # pylint: disable=too-many-public-methods,client-accepts-api-version-keyword """Creates an instance of the Digital Twins client. :param str endpoint: The URL endpoint of an Azure search service :param ~azure.core.credentials.TokenCredential credential: A credential to authenticate requests to the service """ + def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None: - if not endpoint.startswith('http'): - endpoint = 'https://' + endpoint - self._client = AzureDigitalTwinsAPI( - credential=credential, - base_url=endpoint, - sdk_moniker=SDK_MONIKER, - **kwargs - ) + if not endpoint.startswith("http"): + endpoint = "https://" + endpoint + self._client = AzureDigitalTwinsAPI(credential=credential, base_url=endpoint, sdk_moniker=SDK_MONIKER, **kwargs) @distributed_trace def get_digital_twin(self, digital_twin_id: str, **kwargs: Any) -> MutableMapping[str, Any]: @@ -67,18 +60,12 @@ def get_digital_twin(self, digital_twin_id: str, **kwargs: Any) -> MutableMappin :raises ~azure.core.exceptions.ResourceNotFoundError: If the digital twin doesn't exist. """ - return self._client.digital_twins.get_by_id( - digital_twin_id, - **kwargs - ) + return self._client.digital_twins.get_by_id(digital_twin_id, **kwargs) # pylint: disable=docstring-keyword-should-match-keyword-only @distributed_trace def upsert_digital_twin( - self, - digital_twin_id: str, - digital_twin: Dict[str, object], - **kwargs: Any + self, digital_twin_id: str, digital_twin: Dict[str, object], **kwargs: Any ) -> MutableMapping[str, Any]: """Create or update a digital twin. @@ -102,20 +89,13 @@ def upsert_digital_twin( if if_none_match: options = DigitalTwinsAddOptions(if_none_match=if_none_match) return self._client.digital_twins.add( - digital_twin_id, - digital_twin, - digital_twins_add_options=options, - error_map=error_map, - **kwargs + digital_twin_id, digital_twin, digital_twins_add_options=options, error_map=error_map, **kwargs ) # pylint: disable=docstring-keyword-should-match-keyword-only @distributed_trace def update_digital_twin( - self, - digital_twin_id: str, - json_patch: Sequence[MutableMapping[str, Any]], - **kwargs: Any + self, digital_twin_id: str, json_patch: Sequence[MutableMapping[str, Any]], **kwargs: Any ) -> None: """Update a digital twin using a JSON patch. @@ -140,7 +120,7 @@ def update_digital_twin( if_match, error_map = prep_if_match(etag, match_condition) if if_match: options = DigitalTwinsUpdateOptions(if_match=if_match) - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) return self._client.digital_twins.update( digital_twin_id, patch_document=patch_document, @@ -173,19 +153,11 @@ def delete_digital_twin(self, digital_twin_id: str, **kwargs: Any) -> None: if if_match: options = DigitalTwinsDeleteOptions(if_match=if_match) return self._client.digital_twins.delete( - digital_twin_id, - digital_twins_delete_options=options, - error_map=error_map, - **kwargs + digital_twin_id, digital_twins_delete_options=options, error_map=error_map, **kwargs ) @distributed_trace - def get_component( - self, - digital_twin_id: str, - component_name: str, - **kwargs: Any - ) -> MutableMapping[str, Any]: + def get_component(self, digital_twin_id: str, component_name: str, **kwargs: Any) -> MutableMapping[str, Any]: """Get a component on a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -196,19 +168,11 @@ def get_component( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is either no digital twin with the provided ID or the component name is invalid. """ - return self._client.digital_twins.get_component( - digital_twin_id, - component_name, - **kwargs - ) + return self._client.digital_twins.get_component(digital_twin_id, component_name, **kwargs) @distributed_trace def update_component( - self, - digital_twin_id: str, - component_name: str, - json_patch: Sequence[MutableMapping[str, Any]], - **kwargs: Any + self, digital_twin_id: str, component_name: str, json_patch: Sequence[MutableMapping[str, Any]], **kwargs: Any ) -> None: """Update properties of a component on a digital twin using a JSON patch. @@ -232,7 +196,7 @@ def update_component( if_match, error_map = prep_if_match(etag, match_condition) if if_match: options = DigitalTwinsUpdateComponentOptions(if_match=if_match) - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) return self._client.digital_twins.update_component( digital_twin_id, component_name, @@ -243,12 +207,7 @@ def update_component( ) @distributed_trace - def get_relationship( - self, - digital_twin_id: str, - relationship_id: str, - **kwargs: Any - ) -> MutableMapping[str, Any]: + def get_relationship(self, digital_twin_id: str, relationship_id: str, **kwargs: Any) -> MutableMapping[str, Any]: """Get a relationship on a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -259,19 +218,11 @@ def get_relationship( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is either no digital twin or relationship with the provided ID. """ - return self._client.digital_twins.get_relationship_by_id( - digital_twin_id, - relationship_id, - **kwargs - ) + return self._client.digital_twins.get_relationship_by_id(digital_twin_id, relationship_id, **kwargs) @distributed_trace def upsert_relationship( - self, - digital_twin_id: str, - relationship_id: str, - relationship: Dict[str, object], - **kwargs: Any + self, digital_twin_id: str, relationship_id: str, relationship: Dict[str, object], **kwargs: Any ) -> MutableMapping[str, Any]: """Create or update a relationship on a digital twin. @@ -306,11 +257,7 @@ def upsert_relationship( @distributed_trace def update_relationship( - self, - digital_twin_id: str, - relationship_id: str, - json_patch: Sequence[MutableMapping[str, Any]], - **kwargs: Any + self, digital_twin_id: str, relationship_id: str, json_patch: Sequence[MutableMapping[str, Any]], **kwargs: Any ) -> None: """Updates the properties of a relationship on a digital twin using a JSON patch. @@ -335,7 +282,7 @@ def update_relationship( if_match, error_map = prep_if_match(etag, match_condition) if if_match: options = DigitalTwinsUpdateRelationshipOptions(if_match=if_match) - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) return self._client.digital_twins.update_relationship( id=digital_twin_id, relationship_id=relationship_id, @@ -378,10 +325,7 @@ def delete_relationship(self, digital_twin_id: str, relationship_id: str, **kwar @distributed_trace def list_relationships( - self, - digital_twin_id: str, - relationship_id: Optional[str] = None, - **kwargs: Any + self, digital_twin_id: str, relationship_id: Optional[str] = None, **kwargs: Any ) -> ItemPaged[MutableMapping[str, Any]]: """Retrieve relationships for a digital twin. @@ -395,17 +339,11 @@ def list_relationships( digital twin with the provided ID. """ return self._client.digital_twins.list_relationships( - digital_twin_id, - relationship_name=relationship_id, - **kwargs + digital_twin_id, relationship_name=relationship_id, **kwargs ) @distributed_trace - def list_incoming_relationships( - self, - digital_twin_id: str, - **kwargs: Any - ) -> ItemPaged[IncomingRelationship]: + def list_incoming_relationships(self, digital_twin_id: str, **kwargs: Any) -> ItemPaged[IncomingRelationship]: """Retrieve all incoming relationships for a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -415,18 +353,10 @@ def list_incoming_relationships( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is no digital twin with the provided ID. """ - return self._client.digital_twins.list_incoming_relationships( - digital_twin_id, - **kwargs - ) + return self._client.digital_twins.list_incoming_relationships(digital_twin_id, **kwargs) @distributed_trace - def publish_telemetry( - self, - digital_twin_id: str, - telemetry: MutableMapping[str, Any], - **kwargs: Any - ) -> None: + def publish_telemetry(self, digital_twin_id: str, telemetry: MutableMapping[str, Any], **kwargs: Any) -> None: """Publish telemetry from a digital twin. The result is then consumed by one or many destination endpoints (subscribers) defined under DigitalTwinsEventRoute. These event routes need to be set before publishing @@ -441,23 +371,15 @@ def publish_telemetry( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is no digital twin with the provided ID. """ - message_id = kwargs.pop('message_id', None) or str(uuid.uuid4()) + message_id = kwargs.pop("message_id", None) or str(uuid.uuid4()) timestamp = Serializer.serialize_iso(datetime.utcnow()) return self._client.digital_twins.send_telemetry( - id=digital_twin_id, - message_id=message_id, - telemetry=telemetry, - telemetry_source_time=timestamp, - **kwargs + id=digital_twin_id, message_id=message_id, telemetry=telemetry, telemetry_source_time=timestamp, **kwargs ) @distributed_trace def publish_component_telemetry( - self, - digital_twin_id: str, - component_name: str, - telemetry: MutableMapping[str, Any], - **kwargs: Any + self, digital_twin_id: str, component_name: str, telemetry: MutableMapping[str, Any], **kwargs: Any ) -> None: """Publish telemetry from a digital twin. The result is then consumed by one or many destination endpoints (subscribers) defined under @@ -474,7 +396,7 @@ def publish_component_telemetry( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is no digital twin with the provided ID or the component name is invalid. """ - message_id = kwargs.pop('message_id', None) or str(uuid.uuid4()) + message_id = kwargs.pop("message_id", None) or str(uuid.uuid4()) timestamp = Serializer.serialize_iso(datetime.utcnow()) return self._client.digital_twins.send_component_telemetry( digital_twin_id, @@ -500,16 +422,12 @@ def get_model(self, model_id: str, **kwargs: Any) -> "DigitalTwinsModelData": """ include_model_definition = kwargs.pop("include_model_definition", False) return self._client.digital_twin_models.get_by_id( - model_id, - include_model_definition=include_model_definition, - **kwargs + model_id, include_model_definition=include_model_definition, **kwargs ) @distributed_trace def list_models( - self, - dependencies_for: Optional[List[str]] = None, - **kwargs: Any + self, dependencies_for: Optional[List[str]] = None, **kwargs: Any ) -> ItemPaged["DigitalTwinsModelData"]: """Get the list of models. @@ -523,22 +441,18 @@ def list_models( :rtype: ~azure.core.paging.ItemPaged[~azure.digitaltwins.core.DigitalTwinsModelData] :raises ~azure.core.exceptions.HttpResponseError: """ - include_model_definition = kwargs.pop('include_model_definition', False) - results_per_page = kwargs.pop('results_per_page', None) + include_model_definition = kwargs.pop("include_model_definition", False) + results_per_page = kwargs.pop("results_per_page", None) if results_per_page is not None: - kwargs['max_item_count'] = results_per_page + kwargs["max_item_count"] = results_per_page return self._client.digital_twin_models.list( - dependencies_for=dependencies_for, - include_model_definition=include_model_definition, - **kwargs + dependencies_for=dependencies_for, include_model_definition=include_model_definition, **kwargs ) @distributed_trace def create_models( - self, - dtdl_models: List[MutableMapping[str, Any]], - **kwargs: Any + self, dtdl_models: List[MutableMapping[str, Any]], **kwargs: Any ) -> List["DigitalTwinsModelData"]: """Create one or more models. When any error occurs, no models are uploaded. @@ -550,10 +464,7 @@ def create_models( :raises ~azure.core.exceptions.ResourceExistsError: One or more of the provided models already exist. """ - return self._client.digital_twin_models.add( - dtdl_models, - **kwargs - ) + return self._client.digital_twin_models.add(dtdl_models, **kwargs) @distributed_trace def decommission_model(self, model_id: str, **kwargs: Any) -> None: @@ -566,13 +477,9 @@ def decommission_model(self, model_id: str, **kwargs: Any) -> None: :raises ~azure.core.exceptions.ResourceNotFoundError: There is no model with the provided ID. """ - json_patch = [{'op': 'replace', 'path': '/decommissioned', 'value': True}] - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) - return self._client.digital_twin_models.update( - model_id, - update_model=patch_document, - **kwargs - ) + json_patch = [{"op": "replace", "path": "/decommissioned", "value": True}] + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) + return self._client.digital_twin_models.update(model_id, update_model=patch_document, **kwargs) @distributed_trace def delete_model(self, model_id: str, **kwargs: Any) -> None: @@ -587,10 +494,7 @@ def delete_model(self, model_id: str, **kwargs: Any) -> None: :raises ~azure.core.exceptions.ResourceExistsError: There are dependencies on the model that prevent it from being deleted. """ - return self._client.digital_twin_models.delete( - model_id, - **kwargs - ) + return self._client.digital_twin_models.delete(model_id, **kwargs) @distributed_trace def get_event_route(self, event_route_id: str, **kwargs: Any) -> DigitalTwinsEventRoute: @@ -603,10 +507,7 @@ def get_event_route(self, event_route_id: str, **kwargs: Any) -> DigitalTwinsEve :raises ~azure.core.exceptions.ResourceNotFoundError: There is no event route with the provided ID. """ - return self._client.event_routes.get_by_id( - event_route_id, - **kwargs - ) + return self._client.event_routes.get_by_id(event_route_id, **kwargs) @distributed_trace def list_event_routes(self, **kwargs: Any) -> ItemPaged[DigitalTwinsEventRoute]: @@ -618,21 +519,14 @@ def list_event_routes(self, **kwargs: Any) -> ItemPaged[DigitalTwinsEventRoute]: :rtype: ~azure.core.paging.ItemPaged[~azure.digitaltwins.core.DigitalTwinsEventRoute] :raises ~azure.core.exceptions.HttpResponseError: """ - results_per_page = kwargs.pop('results_per_page', None) + results_per_page = kwargs.pop("results_per_page", None) if results_per_page is not None: - kwargs['max_item_count'] = results_per_page + kwargs["max_item_count"] = results_per_page - return self._client.event_routes.list( - **kwargs - ) + return self._client.event_routes.list(**kwargs) @distributed_trace - def upsert_event_route( - self, - event_route_id: str, - event_route: DigitalTwinsEventRoute, - **kwargs: Any - ) -> None: + def upsert_event_route(self, event_route_id: str, event_route: DigitalTwinsEventRoute, **kwargs: Any) -> None: """Create or update an event route. :param str event_route_id: The ID of the event route to create or update. @@ -641,11 +535,7 @@ def upsert_event_route( :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - return self._client.event_routes.add( - event_route_id, - event_route=event_route, - **kwargs - ) + return self._client.event_routes.add(event_route_id, event_route=event_route, **kwargs) @distributed_trace def delete_event_route(self, event_route_id: str, **kwargs: Any) -> None: @@ -658,17 +548,10 @@ def delete_event_route(self, event_route_id: str, **kwargs: Any) -> None: :raises ~azure.core.exceptions.ResourceNotFoundError: There is no event route with the provided ID. """ - return self._client.event_routes.delete( - event_route_id, - **kwargs - ) + return self._client.event_routes.delete(event_route_id, **kwargs) @distributed_trace - def query_twins( - self, - query_expression: str, - **kwargs: Any - ) -> ItemPaged[MutableMapping[str, Any]]: + def query_twins(self, query_expression: str, **kwargs: Any) -> ItemPaged[MutableMapping[str, Any]]: """Query for digital twins. Note: that there may be a delay between before changes in your instance are reflected in queries. @@ -680,17 +563,13 @@ def query_twins( :rtype: ~azure.core.paging.ItemPaged[Dict[str, object]] :raises ~azure.core.exceptions.HttpResponseError: """ + def extract_data(deserialized): list_of_elem = deserialized.value return deserialized.continuation_token or None, iter(list_of_elem) def get_next(continuation_token=None): - query_spec = QuerySpecification( - query=query_expression, - continuation_token=continuation_token) + query_spec = QuerySpecification(query=query_expression, continuation_token=continuation_token) return self._client.query.query_twins(query_spec, **kwargs) - return ItemPaged( - get_next, - extract_data - ) + return ItemPaged(get_next, extract_data) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/_patch.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/_patch.py index 96d94d7e7a07..dbc2edde2e6f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/_patch.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/_patch.py @@ -30,5 +30,6 @@ __all__ = ["patch_sdk"] + def patch_sdk(): pass diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/_patch.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/_patch.py index 96d94d7e7a07..dbc2edde2e6f 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/_patch.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/_patch.py @@ -30,5 +30,6 @@ __all__ = ["patch_sdk"] + def patch_sdk(): pass diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/operations/_patch.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/operations/_patch.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/models/_patch.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/models/_patch.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/operations/_patch.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/operations/_patch.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_utils.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_utils.py index 2a446c4aacd9..eea1bad3e89d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_utils.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_utils.py @@ -6,10 +6,8 @@ from typing import Optional from azure.core import MatchConditions -from azure.core.exceptions import ( - ResourceExistsError, - ResourceModifiedError, - ResourceNotModifiedError) +from azure.core.exceptions import ResourceExistsError, ResourceModifiedError, ResourceNotModifiedError + def prep_if_match(etag: str, match_condition: MatchConditions) -> tuple[Optional[str], dict]: error_map = {} @@ -26,6 +24,7 @@ def prep_if_match(etag: str, match_condition: MatchConditions) -> tuple[Optional raise ValueError("Unsupported match condition: {}".format(match_condition)) return None, error_map + def prep_if_none_match(etag: str, match_condition: MatchConditions) -> tuple[Optional[str], dict]: error_map = {} if match_condition == MatchConditions.IfModified: diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/__init__.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/__init__.py index 9fe82716acfa..bee8e20f822d 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/__init__.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/__init__.py @@ -7,4 +7,4 @@ # -------------------------------------------------------------------------- from ._digitaltwins_client_async import DigitalTwinsClient -__all__ = ['DigitalTwinsClient'] +__all__ = ["DigitalTwinsClient"] diff --git a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/_digitaltwins_client_async.py b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/_digitaltwins_client_async.py index 9ea1906cf63d..3fd6fbd52e21 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/_digitaltwins_client_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/aio/_digitaltwins_client_async.py @@ -17,10 +17,7 @@ from .._generated._utils.serialization import Serializer from .._version import SDK_MONIKER -from .._utils import ( - prep_if_match, - prep_if_none_match -) +from .._utils import prep_if_match, prep_if_none_match from .._generated.aio import AzureDigitalTwinsAPI from .._generated.models import ( QuerySpecification, @@ -31,33 +28,26 @@ DigitalTwinsDeleteRelationshipOptions, DigitalTwinsUpdateRelationshipOptions, DigitalTwinsAddRelationshipOptions, - DigitalTwinsModelData + DigitalTwinsModelData, ) if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential - from .._generated.models import ( - IncomingRelationship, - DigitalTwinsEventRoute - ) + from .._generated.models import IncomingRelationship, DigitalTwinsEventRoute -class DigitalTwinsClient(object): # pylint: disable=too-many-public-methods,client-accepts-api-version-keyword +class DigitalTwinsClient(object): # pylint: disable=too-many-public-methods,client-accepts-api-version-keyword """Creates an instance of the Digital Twins client. :param str endpoint: The URL endpoint of an Azure search service :param ~azure.core.credentials_async.AsyncTokenCredential credential: A credential to authenticate requests to the service. """ + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs) -> None: - if not endpoint.startswith('http'): - endpoint = 'https://' + endpoint - self._client = AzureDigitalTwinsAPI( - credential=credential, - base_url=endpoint, - sdk_moniker=SDK_MONIKER, - **kwargs - ) + if not endpoint.startswith("http"): + endpoint = "https://" + endpoint + self._client = AzureDigitalTwinsAPI(credential=credential, base_url=endpoint, sdk_moniker=SDK_MONIKER, **kwargs) async def close(self) -> None: await self._client.close() @@ -80,18 +70,12 @@ async def get_digital_twin(self, digital_twin_id: str, **kwargs) -> MutableMappi :raises ~azure.core.exceptions.ResourceNotFoundError: If the digital twin doesn't exist. """ - return await self._client.digital_twins.get_by_id( - digital_twin_id, - **kwargs - ) + return await self._client.digital_twins.get_by_id(digital_twin_id, **kwargs) # pylint: disable=docstring-keyword-should-match-keyword-only @distributed_trace_async async def upsert_digital_twin( - self, - digital_twin_id: str, - digital_twin: Dict[str, object], - **kwargs + self, digital_twin_id: str, digital_twin: Dict[str, object], **kwargs ) -> MutableMapping[str, Any]: """Create or update a digital twin. @@ -116,20 +100,13 @@ async def upsert_digital_twin( if if_none_match: options = DigitalTwinsAddOptions(if_none_match=if_none_match) return await self._client.digital_twins.add( - digital_twin_id, - digital_twin, - digital_twins_add_options=options, - error_map=error_map, - **kwargs + digital_twin_id, digital_twin, digital_twins_add_options=options, error_map=error_map, **kwargs ) # pylint: disable=docstring-keyword-should-match-keyword-only @distributed_trace_async async def update_digital_twin( - self, - digital_twin_id: str, - json_patch: Sequence[MutableMapping[str, Any]], - **kwargs + self, digital_twin_id: str, json_patch: Sequence[MutableMapping[str, Any]], **kwargs ) -> None: """Update a digital twin using a JSON patch. @@ -154,7 +131,7 @@ async def update_digital_twin( if_match, error_map = prep_if_match(etag, match_condition) if if_match: options = DigitalTwinsUpdateOptions(if_match=if_match) - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) return await self._client.digital_twins.update( digital_twin_id, patch_document=patch_document, @@ -165,11 +142,7 @@ async def update_digital_twin( # pylint: disable=docstring-keyword-should-match-keyword-only @distributed_trace_async - async def delete_digital_twin( - self, - digital_twin_id: str, - **kwargs - ) -> None: + async def delete_digital_twin(self, digital_twin_id: str, **kwargs) -> None: """Delete a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -191,10 +164,7 @@ async def delete_digital_twin( if if_match: options = DigitalTwinsDeleteOptions(if_match=if_match) return await self._client.digital_twins.delete( - digital_twin_id, - digital_twins_delete_options=options, - error_map=error_map, - **kwargs + digital_twin_id, digital_twins_delete_options=options, error_map=error_map, **kwargs ) @distributed_trace_async @@ -209,19 +179,11 @@ async def get_component(self, digital_twin_id: str, component_name: str, **kwarg :raises ~azure.core.exceptions.ResourceNotFoundError: If there is either no digital twin with the provided ID or the component name is invalid. """ - return await self._client.digital_twins.get_component( - digital_twin_id, - component_name, - **kwargs - ) + return await self._client.digital_twins.get_component(digital_twin_id, component_name, **kwargs) @distributed_trace_async async def update_component( - self, - digital_twin_id: str, - component_name: str, - json_patch: Sequence[MutableMapping[str, Any]], - **kwargs + self, digital_twin_id: str, component_name: str, json_patch: Sequence[MutableMapping[str, Any]], **kwargs ) -> None: """Update properties of a component on a digital twin using a JSON patch. @@ -245,7 +207,7 @@ async def update_component( if_match, error_map = prep_if_match(etag, match_condition) if if_match: options = DigitalTwinsUpdateComponentOptions(if_match=if_match) - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) return await self._client.digital_twins.update_component( digital_twin_id, component_name, @@ -256,12 +218,7 @@ async def update_component( ) @distributed_trace_async - async def get_relationship( - self, - digital_twin_id: str, - relationship_id: str, - **kwargs - ) -> MutableMapping[str, Any]: + async def get_relationship(self, digital_twin_id: str, relationship_id: str, **kwargs) -> MutableMapping[str, Any]: """Get a relationship on a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -272,19 +229,11 @@ async def get_relationship( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is either no digital twin or relationship with the provided ID. """ - return await self._client.digital_twins.get_relationship_by_id( - digital_twin_id, - relationship_id, - **kwargs - ) + return await self._client.digital_twins.get_relationship_by_id(digital_twin_id, relationship_id, **kwargs) @distributed_trace_async async def upsert_relationship( - self, - digital_twin_id: str, - relationship_id: str, - relationship: Dict[str, object], - **kwargs + self, digital_twin_id: str, relationship_id: str, relationship: Dict[str, object], **kwargs ) -> MutableMapping[str, Any]: """Create or update a relationship on a digital twin. @@ -319,11 +268,7 @@ async def upsert_relationship( @distributed_trace_async async def update_relationship( - self, - digital_twin_id: str, - relationship_id: str, - json_patch: Sequence[MutableMapping[str, Any]], - **kwargs + self, digital_twin_id: str, relationship_id: str, json_patch: Sequence[MutableMapping[str, Any]], **kwargs ) -> None: """Updates the properties of a relationship on a digital twin using a JSON patch. @@ -348,7 +293,7 @@ async def update_relationship( if_match, error_map = prep_if_match(etag, match_condition) if if_match: options = DigitalTwinsUpdateRelationshipOptions(if_match=if_match) - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) return await self._client.digital_twins.update_relationship( id=digital_twin_id, relationship_id=relationship_id, @@ -359,12 +304,7 @@ async def update_relationship( ) @distributed_trace_async - async def delete_relationship( - self, - digital_twin_id: str, - relationship_id: str, - **kwargs - ) -> None: + async def delete_relationship(self, digital_twin_id: str, relationship_id: str, **kwargs) -> None: """Delete a relationship on a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -396,10 +336,7 @@ async def delete_relationship( @distributed_trace def list_relationships( - self, - digital_twin_id: str, - relationship_id: Optional[str] = None, - **kwargs + self, digital_twin_id: str, relationship_id: Optional[str] = None, **kwargs ) -> AsyncItemPaged[MutableMapping[str, Any]]: """Retrieve relationships for a digital twin. @@ -413,17 +350,11 @@ def list_relationships( digital twin with the provided ID. """ return self._client.digital_twins.list_relationships( - digital_twin_id, - relationship_name=relationship_id, - **kwargs + digital_twin_id, relationship_name=relationship_id, **kwargs ) @distributed_trace - def list_incoming_relationships( - self, - digital_twin_id: str, - **kwargs - ) -> AsyncItemPaged['IncomingRelationship']: + def list_incoming_relationships(self, digital_twin_id: str, **kwargs) -> AsyncItemPaged["IncomingRelationship"]: """Retrieve all incoming relationships for a digital twin. :param str digital_twin_id: The ID of the digital twin. @@ -433,18 +364,10 @@ def list_incoming_relationships( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is no digital twin with the provided ID. """ - return self._client.digital_twins.list_incoming_relationships( - digital_twin_id, - **kwargs - ) + return self._client.digital_twins.list_incoming_relationships(digital_twin_id, **kwargs) @distributed_trace_async - async def publish_telemetry( - self, - digital_twin_id: str, - telemetry: MutableMapping[str, Any], - **kwargs - ) -> None: + async def publish_telemetry(self, digital_twin_id: str, telemetry: MutableMapping[str, Any], **kwargs) -> None: """Publish telemetry from a digital twin. The result is then consumed by one or many destination endpoints (subscribers) defined under DigitalTwinsEventRoute. These event routes need to be set before publishing @@ -459,23 +382,15 @@ async def publish_telemetry( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is no digital twin with the provided ID. """ - message_id = kwargs.pop('message_id', None) or str(uuid.uuid4()) + message_id = kwargs.pop("message_id", None) or str(uuid.uuid4()) timestamp = Serializer.serialize_iso(datetime.utcnow()) return await self._client.digital_twins.send_telemetry( - id=digital_twin_id, - message_id=message_id, - telemetry=telemetry, - telemetry_source_time=timestamp, - **kwargs + id=digital_twin_id, message_id=message_id, telemetry=telemetry, telemetry_source_time=timestamp, **kwargs ) @distributed_trace_async async def publish_component_telemetry( - self, - digital_twin_id: str, - component_name: str, - telemetry: MutableMapping[str, Any], - **kwargs + self, digital_twin_id: str, component_name: str, telemetry: MutableMapping[str, Any], **kwargs ) -> None: """Publish telemetry from a digital twin. The result is then consumed by one or many destination endpoints (subscribers) defined under @@ -492,7 +407,7 @@ async def publish_component_telemetry( :raises ~azure.core.exceptions.ResourceNotFoundError: If there is no digital twin with the provided ID or the component name is invalid. """ - message_id = kwargs.pop('message_id', None) or str(uuid.uuid4()) + message_id = kwargs.pop("message_id", None) or str(uuid.uuid4()) timestamp = Serializer.serialize_iso(datetime.utcnow()) return await self._client.digital_twins.send_component_telemetry( id=digital_twin_id, @@ -518,16 +433,12 @@ async def get_model(self, model_id: str, **kwargs) -> DigitalTwinsModelData: """ include_model_definition = kwargs.pop("include_model_definition", False) return await self._client.digital_twin_models.get_by_id( - model_id, - include_model_definition=include_model_definition, - **kwargs + model_id, include_model_definition=include_model_definition, **kwargs ) @distributed_trace def list_models( - self, - dependencies_for: Optional[List[str]] = None, - **kwargs + self, dependencies_for: Optional[List[str]] = None, **kwargs ) -> AsyncItemPaged[DigitalTwinsModelData]: """Get the list of models. @@ -541,15 +452,13 @@ def list_models( :rtype: ~azure.core.paging.AsyncItemPaged[~azure.digitaltwins.core.DigitalTwinsModelData] :raises ~azure.core.exceptions.HttpResponseError: """ - include_model_definition = kwargs.pop('include_model_definition', False) - results_per_page = kwargs.pop('results_per_page', None) + include_model_definition = kwargs.pop("include_model_definition", False) + results_per_page = kwargs.pop("results_per_page", None) if results_per_page is not None: - kwargs['max_item_count'] = results_per_page + kwargs["max_item_count"] = results_per_page return self._client.digital_twin_models.list( - dependencies_for=dependencies_for, - include_model_definition=include_model_definition, - **kwargs + dependencies_for=dependencies_for, include_model_definition=include_model_definition, **kwargs ) @distributed_trace_async @@ -564,10 +473,7 @@ async def create_models(self, dtdl_models: List[MutableMapping[str, Any]], **kwa :raises ~azure.core.exceptions.ResourceExistsError: One or more of the provided models already exist. """ - return await self._client.digital_twin_models.add( - dtdl_models, - **kwargs - ) + return await self._client.digital_twin_models.add(dtdl_models, **kwargs) @distributed_trace_async async def decommission_model(self, model_id: str, **kwargs) -> None: @@ -580,13 +486,9 @@ async def decommission_model(self, model_id: str, **kwargs) -> None: :raises ~azure.core.exceptions.ResourceNotFoundError: There is no model with the provided ID. """ - json_patch = [{'op': 'replace', 'path': '/decommissioned', 'value': True}] - patch_document = BytesIO(json.dumps(json_patch).encode('utf-8')) - return await self._client.digital_twin_models.update( - model_id, - update_model=patch_document, - **kwargs - ) + json_patch = [{"op": "replace", "path": "/decommissioned", "value": True}] + patch_document = BytesIO(json.dumps(json_patch).encode("utf-8")) + return await self._client.digital_twin_models.update(model_id, update_model=patch_document, **kwargs) @distributed_trace_async async def delete_model(self, model_id: str, **kwargs) -> None: @@ -601,13 +503,10 @@ async def delete_model(self, model_id: str, **kwargs) -> None: :raises ~azure.core.exceptions.ResourceExistsError: There are dependencies on the model that prevent it from being deleted. """ - return await self._client.digital_twin_models.delete( - model_id, - **kwargs - ) + return await self._client.digital_twin_models.delete(model_id, **kwargs) @distributed_trace_async - async def get_event_route(self, event_route_id: str, **kwargs) -> 'DigitalTwinsEventRoute': + async def get_event_route(self, event_route_id: str, **kwargs) -> "DigitalTwinsEventRoute": """Get an event route. :param str event_route_id: The ID of the event route. @@ -617,13 +516,10 @@ async def get_event_route(self, event_route_id: str, **kwargs) -> 'DigitalTwinsE :raises ~azure.core.exceptions.ResourceNotFoundError: There is no event route with the provided ID. """ - return await self._client.event_routes.get_by_id( - event_route_id, - **kwargs - ) + return await self._client.event_routes.get_by_id(event_route_id, **kwargs) @distributed_trace - def list_event_routes(self, **kwargs) -> AsyncItemPaged['DigitalTwinsEventRoute']: + def list_event_routes(self, **kwargs) -> AsyncItemPaged["DigitalTwinsEventRoute"]: """Retrieves all event routes. :keyword int results_per_page: The maximum number of items to retrieve per request. @@ -632,21 +528,14 @@ def list_event_routes(self, **kwargs) -> AsyncItemPaged['DigitalTwinsEventRoute' :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.digitaltwins.core.DigitalTwinsEventRoute] :raises ~azure.core.exceptions.HttpResponseError: """ - results_per_page = kwargs.pop('results_per_page', None) + results_per_page = kwargs.pop("results_per_page", None) if results_per_page is not None: - kwargs['max_item_count'] = results_per_page + kwargs["max_item_count"] = results_per_page - return self._client.event_routes.list( - **kwargs - ) + return self._client.event_routes.list(**kwargs) @distributed_trace_async - async def upsert_event_route( - self, - event_route_id: str, - event_route: 'DigitalTwinsEventRoute', - **kwargs - ) -> None: + async def upsert_event_route(self, event_route_id: str, event_route: "DigitalTwinsEventRoute", **kwargs) -> None: """Create or update an event route. :param str event_route_id: The ID of the event route to create or update. @@ -655,11 +544,7 @@ async def upsert_event_route( :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - return await self._client.event_routes.add( - event_route_id, - event_route=event_route, - **kwargs - ) + return await self._client.event_routes.add(event_route_id, event_route=event_route, **kwargs) @distributed_trace_async async def delete_event_route(self, event_route_id: str, **kwargs) -> None: @@ -672,10 +557,7 @@ async def delete_event_route(self, event_route_id: str, **kwargs) -> None: :raises ~azure.core.exceptions.ResourceNotFoundError: There is no event route with the provided ID. """ - return await self._client.event_routes.delete( - event_route_id, - **kwargs - ) + return await self._client.event_routes.delete(event_route_id, **kwargs) @distributed_trace def query_twins(self, query_expression: str, **kwargs) -> AsyncItemPaged[Dict[str, object]]: @@ -690,17 +572,13 @@ def query_twins(self, query_expression: str, **kwargs) -> AsyncItemPaged[Dict[st :rtype: ~azure.core.async_paging.AsyncItemPaged[Dict[str, object]] :raises ~azure.core.exceptions.HttpResponseError: """ + async def extract_data(deserialized): list_of_elem = deserialized.value return deserialized.continuation_token or None, iter(list_of_elem) async def get_next(continuation_token=None): - query_spec = QuerySpecification( - query=query_expression, - continuation_token=continuation_token) + query_spec = QuerySpecification(query=query_expression, continuation_token=continuation_token) return await self._client.query.query_twins(query_spec, **kwargs) - return AsyncItemPaged( - get_next, - extract_data - ) + return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_create_digitaltwins_service_client_async.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_create_digitaltwins_service_client_async.py index 4ff2b745dc67..d8a6d56ec336 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_create_digitaltwins_service_client_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_create_digitaltwins_service_client_async.py @@ -17,6 +17,7 @@ from azure.identity.aio import DefaultAzureCredential from azure.digitaltwins.core.aio import DigitalTwinsClient + async def create_digitaltwins_service_client(): # DefaultAzureCredential supports different authentication mechanisms and determines # the appropriate credential type based of the environment it is executing in. @@ -36,5 +37,6 @@ async def create_digitaltwins_service_client(): print(service_client) -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(create_digitaltwins_service_client()) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_digitaltwins_get_async.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_digitaltwins_get_async.py index ec8f2c585147..4b324fa8ca42 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_digitaltwins_get_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/async_samples/dt_digitaltwins_get_async.py @@ -19,6 +19,7 @@ from azure.identity.aio import DefaultAzureCredential from azure.digitaltwins.core.aio import DigitalTwinsClient + async def create_digitaltwins_service_client(): # DefaultAzureCredential supports different authentication mechanisms and determines # the appropriate credential type based of the environment it is executing in. @@ -38,6 +39,7 @@ async def create_digitaltwins_service_client(): return service_client + async def digitaltwins_get(): # service_client = await create_digitaltwins_service_client() @@ -46,7 +48,7 @@ async def digitaltwins_get(): raise ValueError("AZURE_URL environment variable is not set") credential = DefaultAzureCredential() - digital_twint_id = "BuildingTwin" # from the samples: BuildingTwin, FloorTwin, HVACTwin, RoomTwin + digital_twint_id = "BuildingTwin" # from the samples: BuildingTwin, FloorTwin, HVACTwin, RoomTwin try: async with DigitalTwinsClient(url, credential) as service_client: digital_twin = await service_client.get_digital_twin(digital_twint_id) @@ -55,5 +57,6 @@ async def digitaltwins_get(): finally: pass -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(digitaltwins_get()) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_component_lifecycle.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_component_lifecycle.py index 9559cc850a90..eedb3c62ec71 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_component_lifecycle.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_component_lifecycle.py @@ -25,22 +25,16 @@ # For the purpose of this example we will create temporary digital twin using random Ids. # We have to make sure these model Ids are unique within the DT instance so we use generated UUIDs. try: - model_id = 'dtmi:samples:componentlifecyclemodel;1' - component_id = 'dtmi:samples:componentlifecycle;1' - digital_twin_id = 'digitalTwin-' + str(uuid.uuid4()) + model_id = "dtmi:samples:componentlifecyclemodel;1" + component_id = "dtmi:samples:componentlifecycle;1" + digital_twin_id = "digitalTwin-" + str(uuid.uuid4()) temporary_component = { "@id": component_id, "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "Component1", - "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - } - ] + "contents": [{"@type": "Property", "name": "ComponentProp1", "schema": "string"}], } temporary_model = { @@ -49,29 +43,16 @@ "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "double" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - } - ] + {"@type": "Property", "name": "Prop1", "schema": "double"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + ], } temporary_twin = { - "$metadata": { - "$model": model_id - }, + "$metadata": {"$model": model_id}, "$dtId": digital_twin_id, "Prop1": 42, - "Component1": { - "$metadata": {}, - "ComponentProp1": "value1" - } + "Component1": {"$metadata": {}, "ComponentProp1": "value1"}, } # DefaultAzureCredential supports different authentication mechanisms and determines @@ -88,32 +69,26 @@ # - AZURE_CLIENT_ID: The application (client) ID registered in the AAD tenant # - AZURE_CLIENT_SECRET: The client secret for the registered application credential = DefaultAzureCredential() - service_client = DigitalTwinsClient(url, credential) # type: ignore + service_client = DigitalTwinsClient(url, credential) # type: ignore # Create models models = service_client.create_models(cast(List[MutableMapping[str, Any]], [temporary_component, temporary_model])) - print('Created Models:') + print("Created Models:") print(models) # Create digital twin created_twin = service_client.upsert_digital_twin(digital_twin_id, temporary_twin) - print('Created Digital Twin:') + print("Created Digital Twin:") print(created_twin) # Update component component_name = "Component1" - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] service_client.update_component(digital_twin_id, component_name, patch) # Get component get_component = service_client.get_component(digital_twin_id, component_name) - print('Get Component:') + print("Get Component:") print(get_component) # Delete digital twin diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_get.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_get.py index 00679029bfc3..646332b54dce 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_get.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_get.py @@ -32,7 +32,7 @@ credential = DefaultAzureCredential() # Create logger - logger = logging.getLogger('azure') + logger = logging.getLogger("azure") logger.setLevel(logging.DEBUG) handler = logging.StreamHandler(stream=sys.stdout) logger.addHandler(handler) @@ -40,7 +40,7 @@ # Create service client and enable logging for all operations service_client = DigitalTwinsClient(url, credential, logging_enable=True) - # DigitalTwinId from the samples: + # DigitalTwinId from the samples: # BuildingTwin # FloorTwin # HVACTwin diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_lifecycle.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_lifecycle.py index 250f25b06912..618ca55cf09c 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_lifecycle.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_lifecycle.py @@ -23,30 +23,18 @@ # For the purpose of this example we will create temporary digital twin using random Ids. # We have to make sure these Ids are unique within the DT instance so we use generated UUIDs. try: - model_id = 'dtmi:samples:digitaltwinlifecyclemodel;1' - digital_twin_id = 'digitalTwin-' + str(uuid.uuid4()) + model_id = "dtmi:samples:digitaltwinlifecyclemodel;1" + digital_twin_id = "digitalTwin-" + str(uuid.uuid4()) temporary_model = { "@id": model_id, "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", - "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "double" - } - ] + "contents": [{"@type": "Property", "name": "Prop1", "schema": "double"}], } - temporary_twin = { - "$metadata": { - "$model": model_id - }, - "$dtId": digital_twin_id, - "Prop1": 42 - } + temporary_twin = {"$metadata": {"$model": model_id}, "$dtId": digital_twin_id, "Prop1": 42} # DefaultAzureCredential supports different authentication mechanisms and determines # the appropriate credential type based of the environment it is executing in. @@ -61,33 +49,27 @@ # - AZURE_CLIENT_ID: The application (client) ID registered in the AAD tenant # - AZURE_CLIENT_SECRET: The client secret for the registered application credential = DefaultAzureCredential() - service_client = DigitalTwinsClient(url, credential) # type: ignore + service_client = DigitalTwinsClient(url, credential) # type: ignore # Create model first from sample dtdl model = service_client.create_models(cast(List[MutableMapping[str, Any]], [temporary_model])) - print('Created Model:') + print("Created Model:") print(model) # Create digital twin based on the created model created_twin = service_client.upsert_digital_twin(digital_twin_id, temporary_twin) - print('Created Digital Twin:') + print("Created Digital Twin:") print(created_twin) # Get digital twin get_twin = service_client.get_digital_twin(digital_twin_id) - print('Get Digital Twin:') + print("Get Digital Twin:") print(get_twin) # Update digital twin - patch = [ - { - "op": "replace", - "path": "/Prop1", - "value": 13 - } - ] + patch = [{"op": "replace", "path": "/Prop1", "value": 13}] updated_twin = service_client.update_digital_twin(digital_twin_id, patch) - print('Updated Digital Twin:') + print("Updated Digital Twin:") print(updated_twin) # Delete digital twin diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_query.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_query.py index d1dbd113b75a..a388ce5ffd5e 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_query.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_digitaltwins_query.py @@ -23,7 +23,7 @@ url = os.getenv("AZURE_URL") if url is None: raise ValueError("AZURE_URL environment variable is not set") - + # DefaultAzureCredential expects the following three environment variables: # - AZURE_TENANT_ID: The tenant ID in Azure Active Directory # - AZURE_CLIENT_ID: The application (client) ID registered in the AAD tenant @@ -32,9 +32,9 @@ service_client = DigitalTwinsClient(url, credential) # Query digital twins - query_expression = 'SELECT * FROM digitaltwins' + query_expression = "SELECT * FROM digitaltwins" query_result = service_client.query_twins(query_expression) - print('DigitalTwins:') + print("DigitalTwins:") for twin in query_result: print(twin) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_event_routes_get.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_event_routes_get.py index e30736abadd8..1cebf95cc696 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_event_routes_get.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_event_routes_get.py @@ -34,7 +34,7 @@ # Get event route event_route_id = "" event_route = service_client.get_event_route(event_route_id) - print('EventRoute:') + print("EventRoute:") print(event_route) except HttpResponseError as e: diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_incoming_relationships_list.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_incoming_relationships_list.py index b534e1bf22e0..cecdaffc23eb 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_incoming_relationships_list.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_incoming_relationships_list.py @@ -32,7 +32,7 @@ service_client = DigitalTwinsClient(url, credential) # List incoming relationships - digital_twin_id = "" # from the samples: BuildingTwin, FloorTwin, HVACTwin, RoomTwin + digital_twin_id = "" # from the samples: BuildingTwin, FloorTwin, HVACTwin, RoomTwin incoming_relationships = service_client.list_incoming_relationships(digital_twin_id) for incoming_relationship in incoming_relationships: print(incoming_relationship) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_get.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_get.py index 6d03e89612d8..8285c3cf8df0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_get.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_get.py @@ -42,7 +42,7 @@ model_id = "" # Create logger - logger = logging.getLogger('azure') + logger = logging.getLogger("azure") logger.setLevel(logging.DEBUG) handler = logging.StreamHandler(stream=sys.stdout) logger.addHandler(handler) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_lifecycle.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_lifecycle.py index 94fedfb18fb8..27918ad4494a 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_lifecycle.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_models_lifecycle.py @@ -24,8 +24,8 @@ # For the purpose of this example we will create temporary model and a temporay component model using random Ids. # We have to make sure these model Ids are unique within the DT instance so we use generated UUIDs. try: - model_id = 'dtmi:samples:examplemodel;1' - component_id = 'dtmi:samples:examplecomponent;1' + model_id = "dtmi:samples:examplemodel;1" + component_id = "dtmi:samples:examplecomponent;1" temporary_component = { "@id": component_id, @@ -33,17 +33,9 @@ "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } temporary_model = { @@ -52,22 +44,10 @@ "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } # DefaultAzureCredential supports different authentication mechanisms and determines @@ -84,20 +64,20 @@ # - AZURE_CLIENT_ID: The application (client) ID registered in the AAD tenant # - AZURE_CLIENT_SECRET: The client secret for the registered application credential = DefaultAzureCredential() - service_client = DigitalTwinsClient(url, credential) # type: ignore + service_client = DigitalTwinsClient(url, credential) # type: ignore # Create models models = service_client.create_models(cast(List[MutableMapping[str, Any]], [temporary_component, temporary_model])) - print('Created Models:') + print("Created Models:") print(models) # Get created models get_component_model = service_client.get_model(component_id) - print('Get Component Models:') + print("Get Component Models:") print(get_component_model) get_model = service_client.get_model(model_id) - print('Get Model:') + print("Get Model:") print(get_model) # List all models diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_component_telemetry.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_component_telemetry.py index d789db8b1f69..0b4dcf749795 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_component_telemetry.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_component_telemetry.py @@ -35,11 +35,7 @@ digita_twin_id = "" component_name = "" telemetry_payload = {"Telemetry1": 5} - service_client.publish_component_telemetry( - digita_twin_id, - component_name, - telemetry_payload - ) + service_client.publish_component_telemetry(digita_twin_id, component_name, telemetry_payload) except HttpResponseError as e: print("\nThis sample has caught an error. {0}".format(e.message)) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_telemetry.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_telemetry.py index 57ec52fd3293..48349466c099 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_telemetry.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_publish_telemetry.py @@ -34,10 +34,7 @@ # Publish telemetry message digita_twin_id = "" telemetry_payload = {"Telemetry1": 5} - service_client.publish_telemetry( - digita_twin_id, - telemetry_payload - ) + service_client.publish_telemetry(digita_twin_id, telemetry_payload) except HttpResponseError as e: print("\nThis sample has caught an error. {0}".format(e.message)) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_get.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_get.py index f991a884a24b..7dc226992041 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_get.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_get.py @@ -23,7 +23,7 @@ url = os.getenv("AZURE_URL") if url is None: raise ValueError("AZURE_URL environment variable is not set") - + # DefaultAzureCredential expects the following three environment variables: # - AZURE_TENANT_ID: The tenant ID in Azure Active Directory # - AZURE_CLIENT_ID: The application (client) ID registered in the AAD tenant @@ -37,7 +37,7 @@ # from the samples: BuildingHasFloor, BuildingIsEquippedWithHVAC, HVACCoolsFloor, FloorContainsRoom relationship_id = "" relationship = service_client.get_relationship(digital_twin_id, relationship_id) - print('Relationship:') + print("Relationship:") print(relationship) except HttpResponseError as e: diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_list.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_list.py index cefa94390a84..0c65155e4748 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_list.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_relationships_list.py @@ -32,7 +32,7 @@ service_client = DigitalTwinsClient(url, credential) # List relationships - digital_twint_id = "" # from the samples: BuildingTwin, FloorTwin, HVACTwin, RoomTwin + digital_twint_id = "" # from the samples: BuildingTwin, FloorTwin, HVACTwin, RoomTwin relationships = service_client.list_relationships(digital_twint_id) for relationship in relationships: print(relationship) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_scenario.py b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_scenario.py index 5b17b9d6e9be..798237b9ab4c 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_scenario.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/samples/dt_scenario.py @@ -51,7 +51,7 @@ # For the purpose of this example we will create temporary model and a temporay component model using random Ids. # We have to make sure these model Ids are unique within the DT instance so we use generated UUIDs. try: - building_model_id = 'dtmi:samples:Building;1' + building_model_id = "dtmi:samples:Building;1" building_model = { "@id": building_model_id, "@type": "Interface", @@ -62,179 +62,94 @@ "@type": "Relationship", "name": "has", "target": "dtmi:samples:Floor;1", - "properties": [ - { - "@type": "Property", - "name": "isAccessRestricted", - "schema": "boolean" - } - ] + "properties": [{"@type": "Property", "name": "isAccessRestricted", "schema": "boolean"}], }, - { - "@type": "Relationship", - "name": "isEquippedWith", - "target": "dtmi:samples:HVAC;1" - }, - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "TemperatureUnit", - "schema": "string" - } - ] + {"@type": "Relationship", "name": "isEquippedWith", "target": "dtmi:samples:HVAC;1"}, + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + {"@type": "Property", "name": "TemperatureUnit", "schema": "string"}, + ], } - floor_model_id = 'dtmi:samples:Floor;1' + floor_model_id = "dtmi:samples:Floor;1" floor_model = { "@id": floor_model_id, "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "Floor", "contents": [ - { - "@type": "Relationship", - "name": "contains", - "target": "dtmi:samples:Room;1" - }, - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - } - ] + {"@type": "Relationship", "name": "contains", "target": "dtmi:samples:Room;1"}, + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + ], } - hvac_model_id = 'dtmi:samples:HVAC;1' + hvac_model_id = "dtmi:samples:HVAC;1" hvac_model = { "@id": hvac_model_id, "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "HVAC", "contents": [ - { - "@type": "Property", - "name": "Efficiency", - "schema": "double" - }, - { - "@type": "Property", - "name": "TargetTemperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "TargetHumidity", - "schema": "double" - }, - { - "@type": "Relationship", - "name": "controlsTemperature", - "target": "dtmi:samples:Floor;1" - } - ] + {"@type": "Property", "name": "Efficiency", "schema": "double"}, + {"@type": "Property", "name": "TargetTemperature", "schema": "double"}, + {"@type": "Property", "name": "TargetHumidity", "schema": "double"}, + {"@type": "Relationship", "name": "controlsTemperature", "target": "dtmi:samples:Floor;1"}, + ], } - room_model_id = 'dtmi:samples:Room;1' + room_model_id = "dtmi:samples:Room;1" room_model = { "@id": room_model_id, "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "Room", "contents": [ - { - "@type": "Property", - "name": "Temperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "Humidity", - "schema": "double" - }, - { - "@type": "Property", - "name": "IsOccupied", - "schema": "boolean" - }, - { - "@type": "Property", - "name": "EmployeeId", - "schema": "string" - }, - { - "@type": "Component", - "name": "wifiAccessPoint", - "schema": "dtmi:samples:Wifi;1" - } - ] + {"@type": "Property", "name": "Temperature", "schema": "double"}, + {"@type": "Property", "name": "Humidity", "schema": "double"}, + {"@type": "Property", "name": "IsOccupied", "schema": "boolean"}, + {"@type": "Property", "name": "EmployeeId", "schema": "string"}, + {"@type": "Component", "name": "wifiAccessPoint", "schema": "dtmi:samples:Wifi;1"}, + ], } - wifi_model_id = 'dtmi:samples:Wifi;1' + wifi_model_id = "dtmi:samples:Wifi;1" wifi_model = { "@id": wifi_model_id, "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "Wifi", "contents": [ - { - "@type": "Property", - "name": "RouterName", - "schema": "string" - }, - { - "@type": "Property", - "name": "Network", - "schema": "string" - } - ] + {"@type": "Property", "name": "RouterName", "schema": "string"}, + {"@type": "Property", "name": "Network", "schema": "string"}, + ], } - building_twin_id = 'BuildingTwin-' + str(uuid.uuid4()) + building_twin_id = "BuildingTwin-" + str(uuid.uuid4()) building_twin = { - "$metadata": { - "$model": 'dtmi:samples:Building;1' - }, + "$metadata": {"$model": "dtmi:samples:Building;1"}, "$dtId": building_twin_id, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } - floor_twin_id = 'FloorTwin-' + str(uuid.uuid4()) - floor_twin = { - "$metadata": { - "$model": "dtmi:samples:Floor;1" - }, - "AverageTemperature": 75 - } + floor_twin_id = "FloorTwin-" + str(uuid.uuid4()) + floor_twin = {"$metadata": {"$model": "dtmi:samples:Floor;1"}, "AverageTemperature": 75} - hvac_twin_id = 'HVACTwin-' + str(uuid.uuid4()) + hvac_twin_id = "HVACTwin-" + str(uuid.uuid4()) hvac_twin = { - "$metadata": { - "$model": "dtmi:samples:HVAC;1" - }, + "$metadata": {"$model": "dtmi:samples:HVAC;1"}, "Efficiency": 94, "TargetTemperature": 72, - "TargetHumidity": 30 + "TargetHumidity": 30, } - room_twin_id = 'RoomTwin-' + str(uuid.uuid4()) + room_twin_id = "RoomTwin-" + str(uuid.uuid4()) room_twin = { - "$metadata": { - "$model": "dtmi:samples:Room;1" - }, + "$metadata": {"$model": "dtmi:samples:Room;1"}, "Temperature": 80, "Humidity": 25, "IsOccupied": True, "EmployeeId": "Employee1", - "wifiAccessPoint": { - "$metadata": {}, - "RouterName": "Cisco1", - "Network": "Room1" - } + "wifiAccessPoint": {"$metadata": {}, "RouterName": "Cisco1", "Network": "Room1"}, } # These must be dictionaries with string keys and values that can be serialized to JSON @@ -244,26 +159,26 @@ "$sourceId": building_twin_id, "$relationshipName": "has", "$targetId": floor_twin_id, - "isAccessRestricted": False + "isAccessRestricted": False, }, { "$relationshipId": "BuildingIsEquippedWithHVAC", "$sourceId": building_twin_id, "$relationshipName": "isEquippedWith", - "$targetId": hvac_twin_id + "$targetId": hvac_twin_id, }, { "$relationshipId": "HVACCoolsFloor", "$sourceId": hvac_twin_id, "$relationshipName": "controlsTemperature", - "$targetId": floor_twin_id + "$targetId": floor_twin_id, }, { "$relationshipId": "FloorContainsRoom", "$sourceId": floor_twin_id, "$relationshipName": "contains", - "$targetId": room_twin_id - } + "$targetId": room_twin_id, + }, ] # DefaultAzureCredential supports different authentication mechanisms and determines @@ -285,47 +200,46 @@ service_client = DigitalTwinsClient(url, credential) # Create models - models = service_client.create_models(cast(List[MutableMapping[str, Any]], [building_model, floor_model, hvac_model, room_model, wifi_model])) - print('Created Models:') + models = service_client.create_models( + cast(List[MutableMapping[str, Any]], [building_model, floor_model, hvac_model, room_model, wifi_model]) + ) + print("Created Models:") print(models) # Create digital twins created_building_twin = service_client.upsert_digital_twin(building_twin_id, building_twin) - print('BuildingTwin:') + print("BuildingTwin:") print(created_building_twin) created_floor_twin = service_client.upsert_digital_twin(floor_twin_id, floor_twin) - print('FloorTwin:') + print("FloorTwin:") print(created_floor_twin) created_hvac_twin = service_client.upsert_digital_twin(hvac_twin_id, hvac_twin) - print('HVACTwin:') + print("HVACTwin:") print(created_hvac_twin) created_room_twin = service_client.upsert_digital_twin(room_twin_id, room_twin) - print('RoomTwin:') + print("RoomTwin:") print(created_room_twin) # Create digital relationships for relationship in hospital_relationships: service_client.upsert_relationship( - relationship["$sourceId"], # type: ignore - relationship["$relationshipId"], # type: ignore - relationship + relationship["$sourceId"], # type: ignore + relationship["$relationshipId"], # type: ignore + relationship, ) # Create event route - event_route_id = 'eventRoute-' + str(uuid.uuid4()) + event_route_id = "eventRoute-" + str(uuid.uuid4()) event_filter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'" - route = DigitalTwinsEventRoute( - endpoint_name=event_hub_endpoint_name, - filter=event_filter - ) + route = DigitalTwinsEventRoute(endpoint_name=event_hub_endpoint_name, filter=event_filter) service_client.upsert_event_route(event_route_id, route) # Get event route created_event_route = service_client.get_event_route(event_route_id) - print('Created Event Route:') + print("Created Event Route:") print(created_event_route) # Clean up @@ -333,9 +247,9 @@ for relationship in hospital_relationships: service_client.delete_relationship( - relationship["$sourceId"], # type: ignore - relationship["$relationshipId"] # type: ignore - ) + relationship["$sourceId"], # type: ignore + relationship["$relationshipId"], # type: ignore + ) service_client.delete_digital_twin(building_twin_id) service_client.delete_digital_twin(floor_twin_id) @@ -355,4 +269,4 @@ service_client.delete_model(wifi_model_id) except HttpResponseError as e: - print("\nThis sample has caught an error. {0}".format(e.message)) \ No newline at end of file + print("\nThis sample has caught an error. {0}".format(e.message)) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/setup.py b/sdk/digitaltwins/azure-digitaltwins-core/setup.py index 2f79b6ea2841..9ca85eab11a9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/setup.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/setup.py @@ -60,12 +60,12 @@ "tests", # Exclude packages that will be covered by PEP420 or nspkg "azure", - 'azure.digitaltwins', + "azure.digitaltwins", ] ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.7", install_requires=[ diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/conftest.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/conftest.py index f5bdd0f81792..b976b7556ed6 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/conftest.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/conftest.py @@ -32,7 +32,7 @@ def add_sanitizers(test_proxy, environment_variables): ENV_SUBSCRIPTION_ID: TEST_ID, ENV_TENANT_ID: TEST_ID, ENV_CLIENT_ID: TEST_ID, - ENV_CLIENT_SECRET: TEST_ID + ENV_CLIENT_SECRET: TEST_ID, } environment_variables.sanitize_batch(sanitization_mapping) add_remove_header_sanitizer(headers="Telemetry-Source-Time, Message-Id") diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components.py index cb37aeb6e466..ad0203ba7794 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components.py @@ -6,15 +6,10 @@ import pytest from azure.core import MatchConditions -from azure.core.exceptions import ( - ResourceNotFoundError, - HttpResponseError, - ResourceModifiedError -) +from azure.core.exceptions import ResourceNotFoundError, HttpResponseError, ResourceModifiedError from azure.digitaltwins.core import DigitalTwinsClient from devtools_testutils import AzureRecordedTestCase - MODEL_ID = "dtmi:com:samples:DTComponentTestsModel;1" COMPONENT_ID = "dtmi:com:samples:DTComponentTestsComponent;1" DIGITAL_TWIN_ID = "DTComponentTestsTempTwin" @@ -24,11 +19,7 @@ class TestDigitalTwinsComponent(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) def _clean_up_models(self, client, *models): models = [m.id for m in client.list_models()] @@ -49,17 +40,9 @@ def _set_up_models(self, client): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -68,34 +51,17 @@ def _set_up_models(self, client): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": COMPONENT_ID - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": COMPONENT_ID}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } client.create_models([component, model]) temporary_twin = { - "$metadata": { - "$model": MODEL_ID - }, + "$metadata": {"$model": MODEL_ID}, "Prop1": "value", - "Component1": { - "$metadata": {}, - "ComponentProp1": "value1" - } + "Component1": {"$metadata": {}, "ComponentProp1": "value1"}, } client.upsert_digital_twin(DIGITAL_TWIN_ID, temporary_twin) @@ -123,13 +89,7 @@ def test_update_component_replace(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] update = client.update_component(DIGITAL_TWIN_ID, "Component1", patch) assert update is None component = client.get_component(DIGITAL_TWIN_ID, "Component1") @@ -162,13 +122,7 @@ def test_update_component_add(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - patch = [ - { - "op": "add", - "path": "/ComponentProp1", - "value": "5" - } - ] + patch = [{"op": "add", "path": "/ComponentProp1", "value": "5"}] update = client.update_component(DIGITAL_TWIN_ID, "Component1", patch) assert update is None @@ -183,15 +137,11 @@ def test_update_component_multiple(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - }, + {"op": "replace", "path": "/ComponentProp1", "value": "value2"}, { "op": "remove", "path": "/ComponentProp1", - } + }, ] update = client.update_component(DIGITAL_TWIN_ID, "Component1", patch) @@ -205,19 +155,11 @@ def test_update_component_multiple(self, recorded_test, digitaltwin): def test_update_component_invalid_patch(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - patch = [ - { - "op": "move", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "move", "path": "/AverageTemperature", "value": 42}] with pytest.raises(HttpResponseError): client.update_component(DIGITAL_TWIN_ID, "Component1", patch) - patch = { - "AverageTemperature": 42 - } + patch = {"AverageTemperature": 42} with pytest.raises(HttpResponseError): client.update_component(DIGITAL_TWIN_ID, "Component1", patch) @@ -225,23 +167,11 @@ def test_update_component_invalid_patch(self, recorded_test, digitaltwin): with pytest.raises(HttpResponseError): client.update_component(DIGITAL_TWIN_ID, "Component1", patch) - patch = [ - { - "op": "add", - "path": "/ComponentProp2", - "value": "5" - } - ] + patch = [{"op": "add", "path": "/ComponentProp2", "value": "5"}] with pytest.raises(HttpResponseError): client.update_component(DIGITAL_TWIN_ID, "Component1", patch) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": 42}] with pytest.raises(HttpResponseError): client.update_component(DIGITAL_TWIN_ID, "Component1", patch) @@ -249,26 +179,18 @@ def test_update_component_conditionally_if_not_modified(self, recorded_test, dig client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) twin = client.get_digital_twin(DIGITAL_TWIN_ID) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] with pytest.raises(ResourceModifiedError): client.update_component( DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfNotModified, - etag=twin['$etag']) + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfNotModified, etag=twin["$etag"] + ) component = client.get_component(DIGITAL_TWIN_ID, "Component1") assert "ComponentProp1" in component assert component["ComponentProp1"] == "value2" @@ -276,69 +198,33 @@ def test_update_component_conditionally_if_not_modified(self, recorded_test, dig def test_update_component_conditionally_if_present(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] - client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfPresent) + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] + client.update_component(DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfPresent) component = client.get_component(DIGITAL_TWIN_ID, "Component1") assert "ComponentProp1" in component assert component["ComponentProp1"] == "value2" def test_update_component_invalid_conditions(self, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] with pytest.raises(ValueError): client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfPresent, - etag='etag-value') + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): - client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfNotModified) + client.update_component(DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfNotModified) with pytest.raises(ValueError): client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfModified, - etag='etag-value') + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): - client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfMissing) + client.update_component(DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfMissing) def test_update_component_not_existing(self, recorded_test, digitaltwin): - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): client.update_component(DIGITAL_TWIN_ID, "Component2", patch) @@ -348,22 +234,15 @@ def test_update_component_not_existing(self, recorded_test, digitaltwin): def test_publish_component_telemetry(self, recorded_test, digitaltwin): # TODO: How to validate this test? It seems to pass regardless - telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 + telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 client = self._get_client(digitaltwin["endpoint"]) - client.publish_component_telemetry( - DIGITAL_TWIN_ID, - "Component1", - telemetry - ) + client.publish_component_telemetry(DIGITAL_TWIN_ID, "Component1", telemetry) def test_publish_component_telemetry_with_message_id(self, recorded_test, digitaltwin): - telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 + telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 client = self._get_client(digitaltwin["endpoint"]) client.publish_component_telemetry( - DIGITAL_TWIN_ID, - "Component1", - telemetry, - message_id=self.create_random_name('message-') + DIGITAL_TWIN_ID, "Component1", telemetry, message_id=self.create_random_name("message-") ) def test_publish_component_telemetry_not_existing(self, recorded_test, digitaltwin): @@ -371,14 +250,6 @@ def test_publish_component_telemetry_not_existing(self, recorded_test, digitaltw client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): - client.publish_component_telemetry( - "foo", - "Component1", - telemetry - ) + client.publish_component_telemetry("foo", "Component1", telemetry) with pytest.raises(HttpResponseError): - client.publish_component_telemetry( - "foo", - "Component2", - telemetry - ) + client.publish_component_telemetry("foo", "Component2", telemetry) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components_async.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components_async.py index 10dbaa9e9d1b..614a16178ef9 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_components_async.py @@ -6,15 +6,10 @@ import pytest from azure.core import MatchConditions -from azure.core.exceptions import ( - ResourceNotFoundError, - HttpResponseError, - ResourceModifiedError -) +from azure.core.exceptions import ResourceNotFoundError, HttpResponseError, ResourceModifiedError from azure.digitaltwins.core.aio import DigitalTwinsClient from devtools_testutils import AzureRecordedTestCase - MODEL_ID = "dtmi:com:samples:DTComponentTestsModel;1" COMPONENT_ID = "dtmi:com:samples:DTComponentTestsComponent;1" DIGITAL_TWIN_ID = "DTComponentTestsTempTwin" @@ -24,11 +19,7 @@ class TestDigitalTwinsComponentAsync(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient, is_async=True) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) async def _clean_up_models(self, client, *models): models = [] @@ -53,17 +44,9 @@ async def _set_up_models(self, client): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -72,34 +55,17 @@ async def _set_up_models(self, client): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": COMPONENT_ID - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": COMPONENT_ID}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } await client.create_models([component, model]) temporary_twin = { - "$metadata": { - "$model": MODEL_ID - }, + "$metadata": {"$model": MODEL_ID}, "Prop1": "value", - "Component1": { - "$metadata": {}, - "ComponentProp1": "value1" - } + "Component1": {"$metadata": {}, "ComponentProp1": "value1"}, } await client.upsert_digital_twin(DIGITAL_TWIN_ID, temporary_twin) @@ -130,13 +96,7 @@ async def test_update_component_replace(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] update = await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) assert update is None component = await client.get_component(DIGITAL_TWIN_ID, "Component1") @@ -171,13 +131,7 @@ async def test_update_component_add(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - patch = [ - { - "op": "add", - "path": "/ComponentProp1", - "value": "5" - } - ] + patch = [{"op": "add", "path": "/ComponentProp1", "value": "5"}] update = await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) assert update is None @@ -193,15 +147,11 @@ async def test_update_component_multiple(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - }, + {"op": "replace", "path": "/ComponentProp1", "value": "value2"}, { "op": "remove", "path": "/ComponentProp1", - } + }, ] update = await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) @@ -216,19 +166,11 @@ async def test_update_component_multiple(self, recorded_test, digitaltwin): async def test_update_component_invalid_patch(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - patch = [ - { - "op": "move", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "move", "path": "/AverageTemperature", "value": 42}] with pytest.raises(HttpResponseError): await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) - patch = { - "AverageTemperature": 42 - } + patch = {"AverageTemperature": 42} with pytest.raises(HttpResponseError): await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) @@ -236,23 +178,11 @@ async def test_update_component_invalid_patch(self, recorded_test, digitaltwin): with pytest.raises(HttpResponseError): await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) - patch = [ - { - "op": "add", - "path": "/ComponentProp2", - "value": "5" - } - ] + patch = [{"op": "add", "path": "/ComponentProp2", "value": "5"}] with pytest.raises(HttpResponseError): await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": 42}] with pytest.raises(HttpResponseError): await client.update_component(DIGITAL_TWIN_ID, "Component1", patch) @@ -261,26 +191,18 @@ async def test_update_component_conditionally_if_not_modified(self, recorded_tes client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) twin = await client.get_digital_twin(DIGITAL_TWIN_ID) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] with pytest.raises(ResourceModifiedError): await client.update_component( DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) await client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfNotModified, - etag=twin['$etag']) + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfNotModified, etag=twin["$etag"] + ) component = await client.get_component(DIGITAL_TWIN_ID, "Component1") assert "ComponentProp1" in component assert component["ComponentProp1"] == "value2" @@ -289,18 +211,8 @@ async def test_update_component_conditionally_if_not_modified(self, recorded_tes async def test_update_component_conditionally_if_present(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] - await client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfPresent) + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] + await client.update_component(DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfPresent) component = await client.get_component(DIGITAL_TWIN_ID, "Component1") assert "ComponentProp1" in component assert component["ComponentProp1"] == "value2" @@ -308,52 +220,30 @@ async def test_update_component_conditionally_if_present(self, recorded_test, di @pytest.mark.asyncio async def test_update_component_invalid_conditions(self, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] with pytest.raises(ValueError): await client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfPresent, - etag='etag-value') + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): await client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfNotModified) + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfNotModified + ) with pytest.raises(ValueError): await client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfModified, - etag='etag-value') + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): await client.update_component( - DIGITAL_TWIN_ID, - "Component1", - patch, - match_condition=MatchConditions.IfMissing) + DIGITAL_TWIN_ID, "Component1", patch, match_condition=MatchConditions.IfMissing + ) @pytest.mark.asyncio async def test_update_component_not_existing(self, recorded_test, digitaltwin): - patch = [ - { - "op": "replace", - "path": "/ComponentProp1", - "value": "value2" - } - ] + patch = [{"op": "replace", "path": "/ComponentProp1", "value": "value2"}] client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): await client.update_component(DIGITAL_TWIN_ID, "Component2", patch) @@ -364,26 +254,19 @@ async def test_update_component_not_existing(self, recorded_test, digitaltwin): @pytest.mark.asyncio async def test_publish_component_telemetry(self, recorded_test, digitaltwin): # TODO: How to validate this test? It seems to pass regardless - telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 + telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - published = await client.publish_component_telemetry( - DIGITAL_TWIN_ID, - "Component1", - telemetry - ) + published = await client.publish_component_telemetry(DIGITAL_TWIN_ID, "Component1", telemetry) assert published is None @pytest.mark.asyncio async def test_publish_component_telemetry_with_message_id(self, recorded_test, digitaltwin): - telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 + telemetry = {"ComponentTelemetry1": 5} # ComponentTelemetry1 client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) published = await client.publish_component_telemetry( - DIGITAL_TWIN_ID, - "Component1", - telemetry, - message_id=self.create_random_name('message-') + DIGITAL_TWIN_ID, "Component1", telemetry, message_id=self.create_random_name("message-") ) assert published is None @@ -392,14 +275,6 @@ async def test_publish_component_telemetry_not_existing(self, recorded_test, dig telemetry = {"ComponentTelemetry1": 5} client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): - await client.publish_component_telemetry( - "foo", - "Component1", - telemetry - ) + await client.publish_component_telemetry("foo", "Component1", telemetry) with pytest.raises(HttpResponseError): - await client.publish_component_telemetry( - "foo", - "Component2", - telemetry - ) + await client.publish_component_telemetry("foo", "Component2", telemetry) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins.py index 821db247f00c..dbd15515dbea 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins.py @@ -12,12 +12,11 @@ HttpResponseError, ResourceExistsError, ResourceModifiedError, - ResourceNotModifiedError + ResourceNotModifiedError, ) from azure.digitaltwins.core import DigitalTwinsClient from devtools_testutils import AzureRecordedTestCase - BUILDING_MODEL_ID = "dtmi:samples:DTTestBuilding;1" @@ -25,11 +24,7 @@ class TestDigitalTwins(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) def _clean_up_models(self, client, *models): models = [m.id for m in client.list_models()] @@ -50,17 +45,9 @@ def _set_up_models(self, client, dt_id): "@context": "dtmi:dtdl:context;2", "displayName": "Building", "contents": [ - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "TemperatureUnit", - "schema": "string" - } - ] + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + {"@type": "Property", "name": "TemperatureUnit", "schema": "string"}, + ], } client.create_models([dtdl_model_building]) try: @@ -69,40 +56,34 @@ def _set_up_models(self, client, dt_id): pass def test_create_simple_digitaltwin(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) assert created_twin["AverageTemperature"] == dtdl_digital_twins_building_twin["AverageTemperature"] - assert created_twin.get('$etag') - assert created_twin.get('$dtId') == digital_twin_id + assert created_twin.get("$etag") + assert created_twin.get("$dtId") == digital_twin_id def test_create_digitaltwin_without_model(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": "dtmi:samples:Building;2" - }, + "$metadata": {"$model": "dtmi:samples:Building;2"}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) def test_create_invalid_digitaltwin(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "LowestTemperature": 68, } client = self._get_client(digitaltwin["endpoint"]) @@ -111,86 +92,78 @@ def test_create_invalid_digitaltwin(self, recorded_test, digitaltwin): client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) def test_create_digitaltwin_conditionally_if_missing(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfMissing) - assert created_twin.get('$dtId') == digital_twin_id + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfMissing + ) + assert created_twin.get("$dtId") == digital_twin_id with pytest.raises(ResourceExistsError): client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfMissing) + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfMissing + ) @pytest.mark.skip("Conditional etag does not appear to be supported") def test_create_digitaltwin_conditionally_if_modified(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin.get('$dtId') == digital_twin_id + assert created_twin.get("$dtId") == digital_twin_id with pytest.raises(ResourceNotModifiedError): client.upsert_digital_twin( digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfModified, - etag=created_twin.get('$etag')) + etag=created_twin.get("$etag"), + ) dtdl_digital_twins_building_twin["AverageTemperature"] = 69 updated_twin = client.upsert_digital_twin( digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') - assert created_twin.get('$dtId') == updated_twin.get('$dtId') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) + assert created_twin.get("$dtId") == updated_twin.get("$dtId") assert created_twin["AverageTemperature"] != updated_twin["AverageTemperature"] def test_upsert_simple_digitaltwin(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin.get('$dtId') == digital_twin_id + assert created_twin.get("$dtId") == digital_twin_id dtdl_digital_twins_building_twin["AverageTemperature"] = 69 upserted_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin.get('$dtId') == upserted_twin.get('$dtId') + assert created_twin.get("$dtId") == upserted_twin.get("$dtId") assert created_twin["AverageTemperature"] != upserted_twin["AverageTemperature"] def test_upsert_digitaltwin_invalid_conditions(self, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): @@ -198,35 +171,33 @@ def test_upsert_digitaltwin_invalid_conditions(self, digitaltwin): digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfMissing, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfModified) + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfModified + ) with pytest.raises(ValueError): client.upsert_digital_twin( digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfNotModified, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfPresent) + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfPresent + ) def test_get_digitaltwin(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) @@ -238,16 +209,14 @@ def test_get_digitaltwin(self, recorded_test, digitaltwin): def test_get_digitaltwin_not_existing(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): - client.get_digital_twin(self.create_random_name('digitalTwin-')) + client.get_digital_twin(self.create_random_name("digitalTwin-")) def test_delete_digitaltwin(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) @@ -261,16 +230,14 @@ def test_delete_digitaltwin(self, recorded_test, digitaltwin): def test_delete_digitaltwin_not_existing(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): - client.delete_digital_twin(self.create_random_name('digitalTwin-')) + client.delete_digital_twin(self.create_random_name("digitalTwin-")) def test_delete_digitaltwin_conditionally_if_not_modified(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) @@ -280,94 +247,70 @@ def test_delete_digitaltwin_conditionally_if_not_modified(self, recorded_test, d client.delete_digital_twin( digital_twin_id, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) deleted = client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfNotModified, - etag=created_twin['$etag']) + digital_twin_id, match_condition=MatchConditions.IfNotModified, etag=created_twin["$etag"] + ) assert deleted is None with pytest.raises(ResourceNotFoundError): client.get_digital_twin(digital_twin_id) def test_delete_digitaltwin_conditionally_if_present(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - deleted = client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfPresent) + deleted = client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfPresent) assert deleted is None with pytest.raises(ResourceNotFoundError): client.get_digital_twin(digital_twin_id) def test_delete_digitaltwin_invalid_conditions(self, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): - client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfPresent, - etag='etag-value') + client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfPresent, etag="etag-value") with pytest.raises(ValueError): - client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfNotModified) + client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfNotModified) with pytest.raises(ValueError): - client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfModified, - etag='etag-value') + client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfModified, etag="etag-value") with pytest.raises(ValueError): - client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfMissing) + client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfMissing) def test_update_digitaltwin_replace(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin['AverageTemperature'] == 68 - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] + assert created_twin["AverageTemperature"] == 68 + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] update = client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = client.get_digital_twin(digital_twin_id) - assert updated_twin['AverageTemperature'] == 42 + assert updated_twin["AverageTemperature"] == 42 def test_update_digitaltwin_remove(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) @@ -383,39 +326,29 @@ def test_update_digitaltwin_remove(self, recorded_test, digitaltwin): update = client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = client.get_digital_twin(digital_twin_id) - assert 'AverageTemperature' not in updated_twin + assert "AverageTemperature" not in updated_twin def test_update_digitaltwin_add(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "add", - "path": "/TemperatureUnit", - "value": "Celsius" - } - ] + patch = [{"op": "add", "path": "/TemperatureUnit", "value": "Celsius"}] update = client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = client.get_digital_twin(digital_twin_id) - assert updated_twin['TemperatureUnit'] == "Celsius" + assert updated_twin["TemperatureUnit"] == "Celsius" def test_update_digitaltwin_multiple(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, } client = self._get_client(digitaltwin["endpoint"]) @@ -423,50 +356,32 @@ def test_update_digitaltwin_multiple(self, recorded_test, digitaltwin): client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) patch = [ - { - "op": "add", - "path": "/TemperatureUnit", - "value": "Celsius" - }, - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } + {"op": "add", "path": "/TemperatureUnit", "value": "Celsius"}, + {"op": "replace", "path": "/AverageTemperature", "value": 42}, ] update = client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = client.get_digital_twin(digital_twin_id) - assert updated_twin['TemperatureUnit'] == "Celsius" - assert updated_twin['AverageTemperature'] == 42 + assert updated_twin["TemperatureUnit"] == "Celsius" + assert updated_twin["AverageTemperature"] == 42 def test_update_digitaltwin_invalid_patch(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "move", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "move", "path": "/AverageTemperature", "value": 42}] with pytest.raises(HttpResponseError): client.update_digital_twin(digital_twin_id, patch) - patch = { - "AverageTemperature": 42 - } + patch = {"AverageTemperature": 42} with pytest.raises(HttpResponseError): client.update_digital_twin(digital_twin_id, patch) @@ -475,139 +390,93 @@ def test_update_digitaltwin_invalid_patch(self, recorded_test, digitaltwin): client.upsert_digital_twin(digital_twin_id, patch) def test_update_digitaltwin_conditionally_if_not_match(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] with pytest.raises(ResourceModifiedError): client.update_digital_twin( digital_twin_id, patch, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfNotModified, - etag=created_twin['$etag']) + digital_twin_id, patch, match_condition=MatchConditions.IfNotModified, etag=created_twin["$etag"] + ) updated = client.get_digital_twin(digital_twin_id) - assert updated['AverageTemperature'] == 42 + assert updated["AverageTemperature"] == 42 def test_update_digitaltwin_conditionally_if_present(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client, digital_twin_id) created_twin = client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] - client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfPresent) + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] + client.update_digital_twin(digital_twin_id, patch, match_condition=MatchConditions.IfPresent) updated = client.get_digital_twin(digital_twin_id) - assert updated['AverageTemperature'] == 42 + assert updated["AverageTemperature"] == 42 def test_update_digitaltwin_invalid_conditions(self, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") client = self._get_client(digitaltwin["endpoint"]) - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] with pytest.raises(ValueError): client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfPresent, - etag='etag-value') + digital_twin_id, patch, match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): - client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfNotModified) + client.update_digital_twin(digital_twin_id, patch, match_condition=MatchConditions.IfNotModified) with pytest.raises(ValueError): client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfModified, - etag='etag-value') + digital_twin_id, patch, match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): - client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfMissing) + client.update_digital_twin(digital_twin_id, patch, match_condition=MatchConditions.IfMissing) def test_update_digitaltwin_not_existing(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') - patch = [ - { - "op": "replace", - "path": "/Property1", - "value": 42 - } - ] + digital_twin_id = self.create_random_name("digitalTwin-") + patch = [{"op": "replace", "path": "/Property1", "value": 42}] client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): client.update_digital_twin(digital_twin_id, patch) def test_query_digitaltwins(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") digital_twin_id = "adt-pp3" dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) if self.is_live: # Wait for digital twin to reflect on service side. time.sleep(10) - dt_ids = [t["$dtId"] for t in client.query_twins('SELECT * FROM digitaltwins')] + dt_ids = [t["$dtId"] for t in client.query_twins("SELECT * FROM digitaltwins")] assert digital_twin_id in dt_ids def test_query_digitaltwins_invalid_expression(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): @@ -616,13 +485,8 @@ def test_query_digitaltwins_invalid_expression(self, recorded_test, digitaltwin) def test_publish_telemetry(self, recorded_test, digitaltwin): # TODO: How to validate this test? It seems to pass regardless telemetry = {"ComponentTelemetry1": 5} - digital_twin_id = self.create_random_name('digitalTwin-') - dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, - "AverageTemperature": 68 - } + digital_twin_id = self.create_random_name("digitalTwin-") + dtdl_digital_twins_building_twin = {"$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68} client = self._get_client(digitaltwin["endpoint"]) client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) @@ -631,17 +495,12 @@ def test_publish_telemetry(self, recorded_test, digitaltwin): def test_publish_telemetry_with_message_id(self, recorded_test, digitaltwin): telemetry = {"ComponentTelemetry1": 5} - digital_twin_id = self.create_random_name('digitalTwin-') - dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, - "AverageTemperature": 68 - } + digital_twin_id = self.create_random_name("digitalTwin-") + dtdl_digital_twins_building_twin = {"$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68} client = self._get_client(digitaltwin["endpoint"]) client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - published = client.publish_telemetry(digital_twin_id, telemetry, message_id=self.create_random_name('message-')) + published = client.publish_telemetry(digital_twin_id, telemetry, message_id=self.create_random_name("message-")) assert published is None def test_publish_telemetry_not_existing(self, recorded_test, digitaltwin): diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins_async.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins_async.py index c06e82c3d14b..754f356b9f65 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_digital_twins_async.py @@ -12,12 +12,11 @@ HttpResponseError, ResourceExistsError, ResourceModifiedError, - ResourceNotModifiedError + ResourceNotModifiedError, ) from azure.digitaltwins.core.aio import DigitalTwinsClient from devtools_testutils import AzureRecordedTestCase - BUILDING_MODEL_ID = "dtmi:samples:DTTestBuilding;1" @@ -25,11 +24,7 @@ class TestDigitalTwinsAsync(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient, is_async=True) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) async def _clean_up_models(self, client, *models): models = [] @@ -54,17 +49,9 @@ async def _set_up_models(self, client, dt_id): "@context": "dtmi:dtdl:context;2", "displayName": "Building", "contents": [ - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "TemperatureUnit", - "schema": "string" - } - ] + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + {"@type": "Property", "name": "TemperatureUnit", "schema": "string"}, + ], } await client.create_models([dtdl_model_building]) @@ -75,30 +62,26 @@ async def _set_up_models(self, client, dt_id): @pytest.mark.asyncio async def test_create_simple_digitaltwin_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) created_twin = await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) assert created_twin["AverageTemperature"] == dtdl_digital_twins_building_twin["AverageTemperature"] - assert created_twin.get('$etag') - assert created_twin.get('$dtId') == digital_twin_id + assert created_twin.get("$etag") + assert created_twin.get("$dtId") == digital_twin_id @pytest.mark.asyncio async def test_create_digitaltwin_without_model_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": "dtmi:samples:Building;2" - }, + "$metadata": {"$model": "dtmi:samples:Building;2"}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): @@ -106,11 +89,9 @@ async def test_create_digitaltwin_without_model_async(self, recorded_test, digit @pytest.mark.asyncio async def test_create_invalid_digitaltwin_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "LowestTemperature": 68, } client = self._get_client(digitaltwin["endpoint"]) @@ -120,89 +101,81 @@ async def test_create_invalid_digitaltwin_async(self, recorded_test, digitaltwin @pytest.mark.asyncio async def test_create_digitaltwin_conditionally_if_missing_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) created_twin = await client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfMissing) - assert created_twin.get('$dtId') == digital_twin_id + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfMissing + ) + assert created_twin.get("$dtId") == digital_twin_id with pytest.raises(ResourceExistsError): await client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfMissing) + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfMissing + ) @pytest.mark.asyncio @pytest.mark.skip("Conditional etag does not appear to be supported") async def test_create_digitaltwin_conditionally_if_modified_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) created_twin = await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin.get('$dtId') == digital_twin_id + assert created_twin.get("$dtId") == digital_twin_id with pytest.raises(ResourceNotModifiedError): await client.upsert_digital_twin( digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfModified, - etag=created_twin.get('$etag')) + etag=created_twin.get("$etag"), + ) dtdl_digital_twins_building_twin["AverageTemperature"] = 69 updated_twin = await client.upsert_digital_twin( digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') - assert created_twin.get('$dtId') == updated_twin.get('$dtId') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) + assert created_twin.get("$dtId") == updated_twin.get("$dtId") assert created_twin["AverageTemperature"] != updated_twin["AverageTemperature"] @pytest.mark.asyncio async def test_upsert_simple_digitaltwin_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) created_twin = await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin.get('$dtId') == digital_twin_id + assert created_twin.get("$dtId") == digital_twin_id dtdl_digital_twins_building_twin["AverageTemperature"] = 69 upserted_twin = await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin.get('$dtId') == upserted_twin.get('$dtId') + assert created_twin.get("$dtId") == upserted_twin.get("$dtId") assert created_twin["AverageTemperature"] != upserted_twin["AverageTemperature"] @pytest.mark.asyncio async def test_upsert_digitaltwin_invalid_conditions_async(self, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): @@ -210,36 +183,34 @@ async def test_upsert_digitaltwin_invalid_conditions_async(self, digitaltwin): digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfMissing, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): await client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfModified) + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfModified + ) with pytest.raises(ValueError): await client.upsert_digital_twin( digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfNotModified, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): await client.upsert_digital_twin( - digital_twin_id, - dtdl_digital_twins_building_twin, - match_condition=MatchConditions.IfPresent) + digital_twin_id, dtdl_digital_twins_building_twin, match_condition=MatchConditions.IfPresent + ) @pytest.mark.asyncio async def test_get_digitaltwin_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) @@ -252,17 +223,15 @@ async def test_get_digitaltwin_async(self, recorded_test, digitaltwin): async def test_get_digitaltwin_not_existing_async(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): - await client.get_digital_twin(self.create_random_name('digitalTwin-')) + await client.get_digital_twin(self.create_random_name("digitalTwin-")) @pytest.mark.asyncio async def test_delete_digitaltwin_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) @@ -277,17 +246,15 @@ async def test_delete_digitaltwin_async(self, recorded_test, digitaltwin): async def test_delete_digitaltwin_not_existing_async(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): - await client.delete_digital_twin(self.create_random_name('digitalTwin-')) + await client.delete_digital_twin(self.create_random_name("digitalTwin-")) @pytest.mark.asyncio async def test_delete_digitaltwin_conditionally_if_not_modified_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) @@ -297,98 +264,78 @@ async def test_delete_digitaltwin_conditionally_if_not_modified_async(self, reco await client.delete_digital_twin( digital_twin_id, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) deleted = await client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfNotModified, - etag=created_twin['$etag']) + digital_twin_id, match_condition=MatchConditions.IfNotModified, etag=created_twin["$etag"] + ) assert deleted is None with pytest.raises(ResourceNotFoundError): await client.get_digital_twin(digital_twin_id) @pytest.mark.asyncio async def test_delete_digitaltwin_conditionally_if_present_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - deleted = await client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfPresent) + deleted = await client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfPresent) assert deleted is None with pytest.raises(ResourceNotFoundError): await client.get_digital_twin(digital_twin_id) @pytest.mark.asyncio async def test_delete_digitaltwin_invalid_conditions_async(self, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): await client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfPresent, - etag='etag-value') + digital_twin_id, match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): - await client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfNotModified) + await client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfNotModified) with pytest.raises(ValueError): await client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfModified, - etag='etag-value') + digital_twin_id, match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): - await client.delete_digital_twin( - digital_twin_id, - match_condition=MatchConditions.IfMissing) + await client.delete_digital_twin(digital_twin_id, match_condition=MatchConditions.IfMissing) @pytest.mark.asyncio async def test_update_digitaltwin_replace_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) created_twin = await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - assert created_twin['AverageTemperature'] == 68 - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] + assert created_twin["AverageTemperature"] == 68 + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] update = await client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = await client.get_digital_twin(digital_twin_id) - assert updated_twin['AverageTemperature'] == 42 + assert updated_twin["AverageTemperature"] == 42 @pytest.mark.asyncio async def test_update_digitaltwin_remove_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) @@ -404,41 +351,31 @@ async def test_update_digitaltwin_remove_async(self, recorded_test, digitaltwin) update = await client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = await client.get_digital_twin(digital_twin_id) - assert 'AverageTemperature' not in updated_twin + assert "AverageTemperature" not in updated_twin @pytest.mark.asyncio async def test_update_digitaltwin_add_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "add", - "path": "/TemperatureUnit", - "value": "Celsius" - } - ] + patch = [{"op": "add", "path": "/TemperatureUnit", "value": "Celsius"}] update = await client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = await client.get_digital_twin(digital_twin_id) - assert updated_twin['TemperatureUnit'] == "Celsius" + assert updated_twin["TemperatureUnit"] == "Celsius" @pytest.mark.asyncio async def test_update_digitaltwin_multiple_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, } client = self._get_client(digitaltwin["endpoint"]) @@ -446,51 +383,33 @@ async def test_update_digitaltwin_multiple_async(self, recorded_test, digitaltwi await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) patch = [ - { - "op": "add", - "path": "/TemperatureUnit", - "value": "Celsius" - }, - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } + {"op": "add", "path": "/TemperatureUnit", "value": "Celsius"}, + {"op": "replace", "path": "/AverageTemperature", "value": 42}, ] update = await client.update_digital_twin(digital_twin_id, patch) assert update is None updated_twin = await client.get_digital_twin(digital_twin_id) - assert updated_twin['TemperatureUnit'] == "Celsius" - assert updated_twin['AverageTemperature'] == 42 + assert updated_twin["TemperatureUnit"] == "Celsius" + assert updated_twin["AverageTemperature"] == 42 @pytest.mark.asyncio async def test_update_digitaltwin_invalid_patch_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "move", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "move", "path": "/AverageTemperature", "value": 42}] with pytest.raises(HttpResponseError): await client.update_digital_twin(digital_twin_id, patch) - patch = { - "AverageTemperature": 42 - } + patch = {"AverageTemperature": 42} with pytest.raises(HttpResponseError): await client.update_digital_twin(digital_twin_id, patch) @@ -500,125 +419,81 @@ async def test_update_digitaltwin_invalid_patch_async(self, recorded_test, digit @pytest.mark.asyncio async def test_update_digitaltwin_conditionally_if_not_match_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) created_twin = await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] with pytest.raises(ResourceModifiedError): await client.update_digital_twin( digital_twin_id, patch, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) await client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfNotModified, - etag=created_twin['$etag']) + digital_twin_id, patch, match_condition=MatchConditions.IfNotModified, etag=created_twin["$etag"] + ) updated = await client.get_digital_twin(digital_twin_id) - assert updated['AverageTemperature'] == 42 + assert updated["AverageTemperature"] == 42 @pytest.mark.asyncio async def test_update_digitaltwin_conditionally_if_present_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, digital_twin_id) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] - await client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfPresent) + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] + await client.update_digital_twin(digital_twin_id, patch, match_condition=MatchConditions.IfPresent) updated = await client.get_digital_twin(digital_twin_id) - assert updated['AverageTemperature'] == 42 + assert updated["AverageTemperature"] == 42 @pytest.mark.asyncio async def test_update_digitaltwin_invalid_conditions_async(self, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") client = self._get_client(digitaltwin["endpoint"]) - patch = [ - { - "op": "replace", - "path": "/AverageTemperature", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/AverageTemperature", "value": 42}] with pytest.raises(ValueError): await client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfPresent, - etag='etag-value') + digital_twin_id, patch, match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): - await client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfNotModified) + await client.update_digital_twin(digital_twin_id, patch, match_condition=MatchConditions.IfNotModified) with pytest.raises(ValueError): await client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfModified, - etag='etag-value') + digital_twin_id, patch, match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): - await client.update_digital_twin( - digital_twin_id, - patch, - match_condition=MatchConditions.IfMissing) + await client.update_digital_twin(digital_twin_id, patch, match_condition=MatchConditions.IfMissing) @pytest.mark.asyncio async def test_update_digitaltwin_not_existing_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') - patch = [ - { - "op": "replace", - "path": "/Property1", - "value": 42 - } - ] + digital_twin_id = self.create_random_name("digitalTwin-") + patch = [{"op": "replace", "path": "/Property1", "value": 42}] client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): await client.update_digital_twin(digital_twin_id, patch) @pytest.mark.asyncio async def test_query_digitaltwins_async(self, recorded_test, digitaltwin): - digital_twin_id = self.create_random_name('digitalTwin-') + digital_twin_id = self.create_random_name("digitalTwin-") dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, - "TemperatureUnit": "Celsius" + "TemperatureUnit": "Celsius", } client = self._get_client(digitaltwin["endpoint"]) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) @@ -626,7 +501,7 @@ async def test_query_digitaltwins_async(self, recorded_test, digitaltwin): # Wait for digital twin to reflect on service side. time.sleep(10) dt_ids = [] - async for t in client.query_twins('SELECT * FROM digitaltwins'): + async for t in client.query_twins("SELECT * FROM digitaltwins"): dt_ids.append(t["$dtId"]) assert digital_twin_id in dt_ids @@ -641,13 +516,8 @@ async def test_query_digitaltwins_invalid_expression_async(self, recorded_test, async def test_publish_telemetry(self, recorded_test, digitaltwin): # TODO: How to validate this test? It seems to pass regardless telemetry = {"ComponentTelemetry1": 5} - digital_twin_id = self.create_random_name('digitalTwin-') - dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, - "AverageTemperature": 68 - } + digital_twin_id = self.create_random_name("digitalTwin-") + dtdl_digital_twins_building_twin = {"$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68} client = self._get_client(digitaltwin["endpoint"]) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) @@ -657,17 +527,14 @@ async def test_publish_telemetry(self, recorded_test, digitaltwin): @pytest.mark.asyncio async def test_publish_telemetry_with_message_id(self, recorded_test, digitaltwin): telemetry = {"ComponentTelemetry1": 5} - digital_twin_id = self.create_random_name('digitalTwin-') - dtdl_digital_twins_building_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, - "AverageTemperature": 68 - } + digital_twin_id = self.create_random_name("digitalTwin-") + dtdl_digital_twins_building_twin = {"$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68} client = self._get_client(digitaltwin["endpoint"]) await client.upsert_digital_twin(digital_twin_id, dtdl_digital_twins_building_twin) - published = await client.publish_telemetry(digital_twin_id, telemetry, message_id=self.create_random_name('message-')) + published = await client.publish_telemetry( + digital_twin_id, telemetry, message_id=self.create_random_name("message-") + ) assert published is None @pytest.mark.asyncio diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes.py index 5806dc162207..60cead854f5e 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes.py @@ -14,26 +14,19 @@ class TestDigitalTwinsEventRoute(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) def test_create_event_route_no_endpoint(self, recorded_test, digitaltwin): - event_route_id = self.create_random_name('eventRoute-') + event_route_id = self.create_random_name("eventRoute-") event_filter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'" - endpoint = self.create_random_name('endpoint-') - route = DigitalTwinsEventRoute( - endpoint_name=endpoint, - filter=event_filter - ) + endpoint = self.create_random_name("endpoint-") + route = DigitalTwinsEventRoute(endpoint_name=endpoint, filter=event_filter) client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): client.upsert_event_route(event_route_id, route) def test_get_event_route_not_existing(self, recorded_test, digitaltwin): - event_route_id = self.create_random_name('eventRoute-') + event_route_id = self.create_random_name("eventRoute-") client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): client.get_event_route(event_route_id) @@ -44,7 +37,7 @@ def test_list_event_routes(self, recorded_test, digitaltwin): assert all_routes == [] def test_delete_event_route_not_existing(self, recorded_test, digitaltwin): - event_route_id = self.create_random_name('eventRoute-') + event_route_id = self.create_random_name("eventRoute-") client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): client.delete_event_route(event_route_id) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes_async.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes_async.py index 814d97db6056..69ab8a19a281 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_event_routes_async.py @@ -5,7 +5,7 @@ # ------------------------------------------------------------------------- import pytest -from azure.core.exceptions import ResourceNotFoundError, HttpResponseError +from azure.core.exceptions import ResourceNotFoundError, HttpResponseError from azure.digitaltwins.core.aio import DigitalTwinsClient from azure.digitaltwins.core import DigitalTwinsEventRoute from devtools_testutils import AzureRecordedTestCase @@ -15,28 +15,21 @@ class TestDigitalTwinsEventRouteAsync(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient, is_async=True) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) @pytest.mark.asyncio async def test_create_event_route_no_endpoint(self, recorded_test, digitaltwin): - event_route_id = self.create_random_name('eventRoute-') + event_route_id = self.create_random_name("eventRoute-") event_filter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'" - endpoint = self.create_random_name('endpoint-') - route = DigitalTwinsEventRoute( - endpoint_name=endpoint, - filter=event_filter - ) + endpoint = self.create_random_name("endpoint-") + route = DigitalTwinsEventRoute(endpoint_name=endpoint, filter=event_filter) client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(HttpResponseError): await client.upsert_event_route(event_route_id, route) @pytest.mark.asyncio async def test_get_event_route_not_existing(self, recorded_test, digitaltwin): - event_route_id = self.create_random_name('eventRoute-') + event_route_id = self.create_random_name("eventRoute-") client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): await client.get_event_route(event_route_id) @@ -51,7 +44,7 @@ async def test_list_event_routes(self, recorded_test, digitaltwin): @pytest.mark.asyncio async def test_delete_event_route_not_existing(self, recorded_test, digitaltwin): - event_route_id = self.create_random_name('eventRoute-') + event_route_id = self.create_random_name("eventRoute-") client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): await client.delete_event_route(event_route_id) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models.py index 92de1dcaafa8..4caba71c3e7c 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models.py @@ -14,11 +14,7 @@ class TestDigitalTwinsModels(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) def _clean_up_models(self, client, *models): models = [m.id for m in client.list_models()] @@ -40,7 +36,7 @@ def _get_unique_component_id(self, client): return id def _get_unique_model_id(self, client): - id = "dtmi:com:samples:{};1".format(self.create_random_name("TempModel")) + id = "dtmi:com:samples:{};1".format(self.create_random_name("TempModel")) try: client.get_model(id) except ResourceNotFoundError: @@ -69,17 +65,9 @@ def test_create_models(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -88,22 +76,10 @@ def test_create_models(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } models = client.create_models([component, model]) assert isinstance(models, list) @@ -123,17 +99,9 @@ def test_create_model_existing(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -142,17 +110,9 @@ def test_create_model_existing(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } models = client.create_models([model]) assert len(models) == 1 @@ -168,22 +128,10 @@ def test_create_model_invalid_model(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } with pytest.raises(HttpResponseError): client.create_models([model]) @@ -198,22 +146,10 @@ def test_create_model_invalid_reference(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } with pytest.raises(HttpResponseError): client.create_models([model]) @@ -227,17 +163,9 @@ def test_get_model(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } models = client.create_models([component]) model = client.get_model(component_id) @@ -254,17 +182,9 @@ def test_get_model_with_definition(self, recorded_test, digitaltwin): "@context": ["dtmi:dtdl:context;2"], "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } models = client.create_models([component]) model = client.get_model(component_id, include_model_definition=True) @@ -286,17 +206,9 @@ def test_list_models(self, recorded_test, digitaltwin): "@context": ["dtmi:dtdl:context;2"], "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } client.create_models([component]) listed_models = [m.id for m in client.list_models()] @@ -312,17 +224,9 @@ def test_list_models_with_definition(self, recorded_test, digitaltwin): "@context": ["dtmi:dtdl:context;2"], "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } client.create_models([component]) listed_models = [m.model for m in client.list_models(include_model_definition=True)] @@ -339,17 +243,9 @@ def test_decommission_model(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } client.create_models([component]) model = client.get_model(component_id) @@ -375,17 +271,9 @@ def test_decommission_model_already_decommissioned(self, recorded_test, digitalt "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } client.create_models([component]) model = client.get_model(component_id) @@ -406,17 +294,9 @@ def test_delete_model(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } client.create_models([component]) @@ -440,17 +320,9 @@ def test_delete_model_already_deleted(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } client.create_models([component]) client.delete_model(component_id) @@ -467,17 +339,9 @@ def test_delete_models_with_dependencies(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -486,22 +350,10 @@ def test_delete_models_with_dependencies(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } client.create_models([component, model]) with pytest.raises(ResourceExistsError): diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models_async.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models_async.py index e5cbd742ba37..cfafcd02abd0 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_models_async.py @@ -15,11 +15,7 @@ class TestDigitalTwinsModelsAsync(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient, is_async=True) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) async def _clean_up_models(self, client, *models): models = [] @@ -46,7 +42,7 @@ async def _get_unique_component_id(self, client): return id async def _get_unique_model_id(self, client): - id = "dtmi:com:samples:{};1".format(self.create_random_name("TempModel")) + id = "dtmi:com:samples:{};1".format(self.create_random_name("TempModel")) try: await client.get_model(id) except ResourceNotFoundError: @@ -77,17 +73,9 @@ async def test_create_models_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -96,22 +84,10 @@ async def test_create_models_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } models = await client.create_models([component, model]) assert isinstance(models, list) @@ -132,17 +108,9 @@ async def test_create_model_existing_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -151,17 +119,9 @@ async def test_create_model_existing_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } models = await client.create_models([model]) assert len(models) == 1 @@ -178,22 +138,10 @@ async def test_create_model_invalid_model_async(self, recorded_test, digitaltwin "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } with pytest.raises(HttpResponseError): await client.create_models([model]) @@ -209,22 +157,10 @@ async def test_create_model_invalid_reference_async(self, recorded_test, digital "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } with pytest.raises(HttpResponseError): await client.create_models([model]) @@ -239,17 +175,9 @@ async def test_get_model_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } models = await client.create_models([component]) model = await client.get_model(component_id) @@ -267,17 +195,9 @@ async def test_get_model_with_definition_async(self, recorded_test, digitaltwin) "@context": ["dtmi:dtdl:context;2"], "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } models = await client.create_models([component]) model = await client.get_model(component_id, include_model_definition=True) @@ -302,17 +222,9 @@ async def test_list_models_async(self, recorded_test, digitaltwin): "@context": ["dtmi:dtdl:context;2"], "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } await client.create_models([component]) listed_models = [] @@ -331,17 +243,9 @@ async def test_list_models_with_definition_async(self, recorded_test, digitaltwi "@context": ["dtmi:dtdl:context;2"], "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } await client.create_models([component]) listed_models = [] @@ -361,17 +265,9 @@ async def test_decommission_model_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } await client.create_models([component]) model = await client.get_model(component_id) @@ -399,17 +295,9 @@ async def test_decommission_model_already_decommissioned_async(self, recorded_te "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } await client.create_models([component]) model = await client.get_model(component_id) @@ -431,17 +319,9 @@ async def test_delete_model_async(self, recorded_test, digitaltwin): "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } await client.create_models([component]) @@ -467,17 +347,9 @@ async def test_delete_model_already_deleted_async(self, recorded_test, digitaltw "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } await client.create_models([component]) await client.delete_model(component_id) @@ -495,17 +367,9 @@ async def test_delete_models_with_dependencies_async(self, recorded_test, digita "@context": "dtmi:dtdl:context;2", "displayName": "Component1", "contents": [ - { - "@type": "Property", - "name": "ComponentProp1", - "schema": "string" - }, - { - "@type": "Telemetry", - "name": "ComponentTelemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "ComponentProp1", "schema": "string"}, + {"@type": "Telemetry", "name": "ComponentTelemetry1", "schema": "integer"}, + ], } model = { @@ -514,22 +378,10 @@ async def test_delete_models_with_dependencies_async(self, recorded_test, digita "@context": "dtmi:dtdl:context;2", "displayName": "TempModel", "contents": [ - { - "@type": "Property", - "name": "Prop1", - "schema": "string" - }, - { - "@type": "Component", - "name": "Component1", - "schema": component_id - }, - { - "@type": "Telemetry", - "name": "Telemetry1", - "schema": "integer" - } - ] + {"@type": "Property", "name": "Prop1", "schema": "string"}, + {"@type": "Component", "name": "Component1", "schema": component_id}, + {"@type": "Telemetry", "name": "Telemetry1", "schema": "integer"}, + ], } await client.create_models([component, model]) with pytest.raises(ResourceExistsError): diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships.py index eed2d0c42f58..7d0d821444e1 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships.py @@ -11,12 +11,11 @@ HttpResponseError, ResourceExistsError, ResourceModifiedError, - ResourceNotModifiedError + ResourceNotModifiedError, ) from azure.digitaltwins.core import DigitalTwinsClient from devtools_testutils import AzureRecordedTestCase - BUILDING_MODEL_ID = "dtmi:samples:RelationshipTestBuilding;1" FLOOR_MODEL_ID = "dtmi:samples:RelationshipTestFloor;1" ROOM_MODEL_ID = "dtmi:samples:RelationshipTestRoom;1" @@ -29,11 +28,7 @@ class TestDigitalTwinsRelationship(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) def _clean_up_models(self, client, *models): models = [m.id for m in client.list_models()] @@ -50,17 +45,14 @@ def _clean_up_relationships(self, client): for dt_id in [ROOM_DIGITAL_TWIN, FLOOR_DIGITAL_TWIN, BUILDING_DIGITAL_TWIN]: try: for relationship in client.list_relationships(dt_id): - client.delete_relationship( - dt_id, - relationship['$relationshipId'] - ) + client.delete_relationship(dt_id, relationship["$relationshipId"]) except ResourceNotFoundError: pass def _clean_up_twins(self, client): for dt_id in [ROOM_DIGITAL_TWIN, FLOOR_DIGITAL_TWIN, BUILDING_DIGITAL_TWIN]: try: - client.delete_digital_twin(dt_id) + client.delete_digital_twin(dt_id) except ResourceNotFoundError: pass @@ -77,23 +69,13 @@ def _set_up_models(self, client, *models): "displayName": "Building", "contents": [ { - "@type": "Relationship", - "name": "has", - "target": FLOOR_MODEL_ID, - "properties": [ - { - "@type": "Property", - "name": "isAccessRestricted", - "schema": "boolean" - } - ] + "@type": "Relationship", + "name": "has", + "target": FLOOR_MODEL_ID, + "properties": [{"@type": "Property", "name": "isAccessRestricted", "schema": "boolean"}], }, - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - } - ] + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + ], } dtdl_model_floor = { "@id": FLOOR_MODEL_ID, @@ -101,17 +83,9 @@ def _set_up_models(self, client, *models): "@context": "dtmi:dtdl:context;2", "displayName": "Floor", "contents": [ - { - "@type": "Relationship", - "name": "contains", - "target": ROOM_MODEL_ID - }, - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - } - ] + {"@type": "Relationship", "name": "contains", "target": ROOM_MODEL_ID}, + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + ], } dtdl_model_room = { "@id": ROOM_MODEL_ID, @@ -119,170 +93,109 @@ def _set_up_models(self, client, *models): "@context": "dtmi:dtdl:context;2", "displayName": "Room", "contents": [ - { - "@type": "Property", - "name": "Temperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "IsOccupied", - "schema": "boolean" - } - ] + {"@type": "Property", "name": "Temperature", "schema": "double"}, + {"@type": "Property", "name": "IsOccupied", "schema": "boolean"}, + ], } client.create_models([dtdl_model_building, dtdl_model_floor, dtdl_model_room]) - building_digital_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, - "AverageTemperature": 68 - } + building_digital_twin = {"$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68} client.upsert_digital_twin(BUILDING_DIGITAL_TWIN, building_digital_twin) - floor_digital_twin = { - "$metadata": { - "$model": FLOOR_MODEL_ID - }, - "AverageTemperature": 75 - } + floor_digital_twin = {"$metadata": {"$model": FLOOR_MODEL_ID}, "AverageTemperature": 75} client.upsert_digital_twin(FLOOR_DIGITAL_TWIN, floor_digital_twin) - room_digital_twin = { - "$metadata": { - "$model": ROOM_MODEL_ID - }, - "Temperature": 80, - "IsOccupied": True - } + room_digital_twin = {"$metadata": {"$model": ROOM_MODEL_ID}, "Temperature": 80, "IsOccupied": True} client.upsert_digital_twin(ROOM_DIGITAL_TWIN, room_digital_twin) def test_create_basic_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } - created_relationship = client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert created_relationship['$relationshipId'] == "FloorContainsRoom" - assert created_relationship['$etag'] + created_relationship = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert created_relationship["$relationshipId"] == "FloorContainsRoom" + assert created_relationship["$etag"] def test_create_invalid_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } with pytest.raises(ResourceNotFoundError): - client.upsert_relationship( - "foo", - "FloorContainsRoom", - relationship) - upserted = client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "foo", - relationship) - assert upserted['$relationshipId'] == 'foo' - relationship = { + client.upsert_relationship("foo", "FloorContainsRoom", relationship) + upserted = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "foo", relationship) + assert upserted["$relationshipId"] == "foo" + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": "foo" + "$targetId": "foo", } with pytest.raises(HttpResponseError): - client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - relationship = { + client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": "foo", "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN - } - upserted = client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert upserted['$sourceId'] == FLOOR_DIGITAL_TWIN - relationship = { - "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN - } - upserted = client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert upserted['$sourceId'] == FLOOR_DIGITAL_TWIN - assert upserted['$relationshipId'] == 'FloorContainsRoom' - relationship = { + "$targetId": ROOM_DIGITAL_TWIN, + } + upserted = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert upserted["$sourceId"] == FLOOR_DIGITAL_TWIN + relationship = {"$relationshipName": "contains", "$targetId": ROOM_DIGITAL_TWIN} + upserted = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert upserted["$sourceId"] == FLOOR_DIGITAL_TWIN + assert upserted["$relationshipId"] == "FloorContainsRoom" + relationship = { "$relationshipId": "foo", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN - } - upserted = client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert upserted['$relationshipId'] == 'FloorContainsRoom' - relationship = { - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } + upserted = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert upserted["$relationshipId"] == "FloorContainsRoom" + relationship = {"$targetId": ROOM_DIGITAL_TWIN} with pytest.raises(HttpResponseError): - client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) + client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) with pytest.raises(HttpResponseError): - client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - {}) + client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", {}) def test_create_relationship_conditionally_if_missing(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } - created_relationship = client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert created_relationship.get('$relationshipId') == "FloorContainsRoom" + created_relationship = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert created_relationship.get("$relationshipId") == "FloorContainsRoom" with pytest.raises(ResourceExistsError): client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship, - match_condition=MatchConditions.IfMissing) + FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship, match_condition=MatchConditions.IfMissing + ) @pytest.mark.skip("Conditional etag does not appear to be supported") def test_create_relationship_conditionally_if_modified(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } created_relationship = client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) - assert created_relationship.get('$relationshipId') == "FloorContainsRoom" + assert created_relationship.get("$relationshipId") == "FloorContainsRoom" with pytest.raises(ResourceNotModifiedError): client.upsert_relationship( @@ -290,48 +203,44 @@ def test_create_relationship_conditionally_if_modified(self, recorded_test, digi "FloorContainsRoom", relationship, match_condition=MatchConditions.IfModified, - etag=created_relationship.get('$etag')) + etag=created_relationship.get("$etag"), + ) updated = client.upsert_relationship( FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship, match_condition=MatchConditions.IfModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') - assert updated['$relationshipId'] == "FloorContainsRoom" + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) + assert updated["$relationshipId"] == "FloorContainsRoom" def test_upsert_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - created_relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship) - assert created_relationship['$relationshipId'] == "BuildingHasFloor" - assert created_relationship['isAccessRestricted'] == False + created_relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship) + assert created_relationship["$relationshipId"] == "BuildingHasFloor" + assert created_relationship["isAccessRestricted"] == False relationship["isAccessRestricted"] = True - upserted_relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship) - assert upserted_relationship['$relationshipId'] == "BuildingHasFloor" - assert upserted_relationship['isAccessRestricted'] == True + upserted_relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship) + assert upserted_relationship["$relationshipId"] == "BuildingHasFloor" + assert upserted_relationship["isAccessRestricted"] == True def test_upsert_relationship_invalid_conditions(self, digitaltwin): - relationship = { + relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): @@ -340,14 +249,13 @@ def test_upsert_relationship_invalid_conditions(self, digitaltwin): "BuildingHasFloor", relationship, match_condition=MatchConditions.IfMissing, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship, - match_condition=MatchConditions.IfModified) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship, match_condition=MatchConditions.IfModified + ) with pytest.raises(ValueError): client.upsert_relationship( @@ -355,29 +263,25 @@ def test_upsert_relationship_invalid_conditions(self, digitaltwin): "BuildingHasFloor", relationship, match_condition=MatchConditions.IfNotModified, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship, - match_condition=MatchConditions.IfPresent) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship, match_condition=MatchConditions.IfPresent + ) def test_get_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - created_relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + created_relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) relationship = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") assert created_relationship == relationship @@ -392,17 +296,14 @@ def test_get_relationship_not_existing(self, recorded_test, digitaltwin): def test_delete_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) deleted = client.delete_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") assert deleted is None @@ -419,30 +320,29 @@ def test_delete_relationship_not_existing(self, recorded_test, digitaltwin): def test_delete_relationship_conditionally_if_not_modified(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) with pytest.raises(ResourceModifiedError): client.delete_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) deleted = client.delete_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfNotModified, - etag=relationship['$etag']) + etag=relationship["$etag"], + ) assert deleted is None with pytest.raises(ResourceNotFoundError): client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") @@ -450,22 +350,18 @@ def test_delete_relationship_conditionally_if_not_modified(self, recorded_test, def test_delete_relationship_conditionally_if_present(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) deleted = client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfPresent) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfPresent + ) assert deleted is None with pytest.raises(ResourceNotFoundError): client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") @@ -474,73 +370,55 @@ def test_delete_relationship_invalid_conditions(self, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfPresent, - etag='etag-value') + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfNotModified) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfNotModified + ) with pytest.raises(ValueError): client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfModified, - etag='etag-value') + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfMissing) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfMissing + ) def test_update_relationship_replace(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] update = client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True def test_update_relationship_remove(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False patch = [ { "op": "remove", @@ -551,103 +429,69 @@ def test_update_relationship_remove(self, recorded_test, digitaltwin): update = client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert 'isAccessRestricted' not in updated + assert "isAccessRestricted" not in updated def test_update_relationship_add(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False - patch = [ - { - "op": "add", - "path": "/isAccessRestricted", - "value": True - } - ] + patch = [{"op": "add", "path": "/isAccessRestricted", "value": True}] update = client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True def test_update_relationship_multiple(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - }, - { - "op": "remove", - "path": "/isAccessRestricted" - } + {"op": "replace", "path": "/isAccessRestricted", "value": True}, + {"op": "remove", "path": "/isAccessRestricted"}, ] update = client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert 'isAccessRestricted' not in updated + assert "isAccessRestricted" not in updated def test_update_relationship_invalid_patch(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) - patch = [ - { - "op": "move", - "path": "/isAccessRestricted" - } - ] + patch = [{"op": "move", "path": "/isAccessRestricted"}] with pytest.raises(HttpResponseError): client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) - patch = [ - { - "op": "remove", - "path": "/isAccessDoorRestricted" - } - ] + patch = [{"op": "remove", "path": "/isAccessDoorRestricted"}] with pytest.raises(HttpResponseError): client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) - patch = { - "isAccessRestricted": True - } + patch = {"isAccessRestricted": True} with pytest.raises(HttpResponseError): client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) @@ -661,92 +505,67 @@ def test_update_relationship_invalid_patch(self, recorded_test, digitaltwin): def test_update_relationship_conditionally_if_not_modified(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] with pytest.raises(ResourceModifiedError): client.update_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) client.update_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfNotModified, - etag=relationship['$etag']) + etag=relationship["$etag"], + ) updated = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True def test_update_digitaltwin_conditionally_if_present(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] client.update_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - patch, - match_condition=MatchConditions.IfPresent) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfPresent + ) updated = client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True def test_update_relationship_invalid_conditions(self, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] with pytest.raises(ValueError): client.update_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfPresent, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): client.update_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - patch, - match_condition=MatchConditions.IfNotModified) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfNotModified + ) with pytest.raises(ValueError): client.update_relationship( @@ -754,23 +573,16 @@ def test_update_relationship_invalid_conditions(self, digitaltwin): "BuildingHasFloor", patch, match_condition=MatchConditions.IfModified, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): client.update_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - patch, - match_condition=MatchConditions.IfMissing) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfMissing + ) def test_update_relationship_not_existing(self, recorded_test, digitaltwin): - patch = [ - { - "op": "replace", - "path": "/Property1", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/Property1", "value": 42}] client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): client.update_relationship(BUILDING_DIGITAL_TWIN, "foo", patch) @@ -780,36 +592,30 @@ def test_update_relationship_not_existing(self, recorded_test, digitaltwin): def test_list_relationships(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) all_relationships = list(client.list_relationships(BUILDING_DIGITAL_TWIN)) assert relationship in all_relationships - assert all_relationships[0]['$relationshipId'] == "BuildingHasFloor" + assert all_relationships[0]["$relationshipId"] == "BuildingHasFloor" def test_list_relationship_by_id(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) all_relationships = list(client.list_relationships(BUILDING_DIGITAL_TWIN, relationship_id="BuildingHasFloor")) assert len(all_relationships) == 0 @@ -817,17 +623,14 @@ def test_list_relationship_by_id(self, recorded_test, digitaltwin): def test_list_incoming_relationships(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) all_relationships = list(client.list_incoming_relationships(BUILDING_DIGITAL_TWIN)) assert relationship not in all_relationships diff --git a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships_async.py b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships_async.py index 5f84c2996897..bea4d1e1dce5 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships_async.py +++ b/sdk/digitaltwins/azure-digitaltwins-core/tests/test_relationships_async.py @@ -11,12 +11,11 @@ HttpResponseError, ResourceExistsError, ResourceModifiedError, - ResourceNotModifiedError + ResourceNotModifiedError, ) from azure.digitaltwins.core.aio import DigitalTwinsClient from devtools_testutils import AzureRecordedTestCase - BUILDING_MODEL_ID = "dtmi:samples:RelationshipTestBuilding;1" FLOOR_MODEL_ID = "dtmi:samples:RelationshipTestFloor;1" ROOM_MODEL_ID = "dtmi:samples:RelationshipTestRoom;1" @@ -29,11 +28,7 @@ class TestDigitalTwinsRelationshipAsync(AzureRecordedTestCase): def _get_client(self, endpoint, **kwargs): credential = self.get_credential(DigitalTwinsClient, is_async=True) - return self.create_client_from_credential( - DigitalTwinsClient, - credential, - endpoint=endpoint, - **kwargs) + return self.create_client_from_credential(DigitalTwinsClient, credential, endpoint=endpoint, **kwargs) async def _clean_up_models(self, client, *models): models = [] @@ -54,10 +49,7 @@ async def _clean_up_relationships(self, client): for dt_id in [ROOM_DIGITAL_TWIN, FLOOR_DIGITAL_TWIN, BUILDING_DIGITAL_TWIN]: try: async for relationship in client.list_relationships(dt_id): - await client.delete_relationship( - dt_id, - relationship['$relationshipId'] - ) + await client.delete_relationship(dt_id, relationship["$relationshipId"]) except: pass @@ -80,23 +72,13 @@ async def _set_up_models(self, client, *delete_old): "displayName": "Building", "contents": [ { - "@type": "Relationship", - "name": "has", - "target": FLOOR_MODEL_ID, - "properties": [ - { - "@type": "Property", - "name": "isAccessRestricted", - "schema": "boolean" - } - ] + "@type": "Relationship", + "name": "has", + "target": FLOOR_MODEL_ID, + "properties": [{"@type": "Property", "name": "isAccessRestricted", "schema": "boolean"}], }, - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - } - ] + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + ], } dtdl_model_floor = { "@id": FLOOR_MODEL_ID, @@ -104,17 +86,9 @@ async def _set_up_models(self, client, *delete_old): "@context": "dtmi:dtdl:context;2", "displayName": "Floor", "contents": [ - { - "@type": "Relationship", - "name": "contains", - "target": ROOM_MODEL_ID - }, - { - "@type": "Property", - "name": "AverageTemperature", - "schema": "double" - } - ] + {"@type": "Relationship", "name": "contains", "target": ROOM_MODEL_ID}, + {"@type": "Property", "name": "AverageTemperature", "schema": "double"}, + ], } dtdl_model_room = { "@id": ROOM_MODEL_ID, @@ -122,41 +96,20 @@ async def _set_up_models(self, client, *delete_old): "@context": "dtmi:dtdl:context;2", "displayName": "Room", "contents": [ - { - "@type": "Property", - "name": "Temperature", - "schema": "double" - }, - { - "@type": "Property", - "name": "IsOccupied", - "schema": "boolean" - } - ] + {"@type": "Property", "name": "Temperature", "schema": "double"}, + {"@type": "Property", "name": "IsOccupied", "schema": "boolean"}, + ], } await client.create_models([dtdl_model_building, dtdl_model_floor, dtdl_model_room]) building_digital_twin = { - "$metadata": { - "$model": BUILDING_MODEL_ID - }, + "$metadata": {"$model": BUILDING_MODEL_ID}, "AverageTemperature": 68, } await client.upsert_digital_twin(BUILDING_DIGITAL_TWIN, building_digital_twin) - floor_digital_twin = { - "$metadata": { - "$model": FLOOR_MODEL_ID - }, - "AverageTemperature": 75 - } + floor_digital_twin = {"$metadata": {"$model": FLOOR_MODEL_ID}, "AverageTemperature": 75} await client.upsert_digital_twin(FLOOR_DIGITAL_TWIN, floor_digital_twin) - room_digital_twin = { - "$metadata": { - "$model": ROOM_MODEL_ID - }, - "Temperature": 80, - "IsOccupied": True - } + room_digital_twin = {"$metadata": {"$model": ROOM_MODEL_ID}, "Temperature": 80, "IsOccupied": True} await client.upsert_digital_twin(ROOM_DIGITAL_TWIN, room_digital_twin) if delete_old: try: @@ -168,118 +121,81 @@ async def _set_up_models(self, client, *delete_old): async def test_create_basic_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } - created_relationship = await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert created_relationship['$relationshipId'] == "FloorContainsRoom" - assert created_relationship['$etag'] + created_relationship = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert created_relationship["$relationshipId"] == "FloorContainsRoom" + assert created_relationship["$etag"] @pytest.mark.asyncio async def test_create_invalid_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } with pytest.raises(ResourceNotFoundError): - await client.upsert_relationship( - "foo", - "FloorContainsRoom", - relationship) - upserted = await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "foo", - relationship) - assert upserted['$relationshipId'] == 'foo' - relationship = { + await client.upsert_relationship("foo", "FloorContainsRoom", relationship) + upserted = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "foo", relationship) + assert upserted["$relationshipId"] == "foo" + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": "foo" + "$targetId": "foo", } with pytest.raises(HttpResponseError): - await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - relationship = { + await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": "foo", "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN - } - upserted = await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert upserted['$sourceId'] == FLOOR_DIGITAL_TWIN - relationship = { - "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN - } - upserted = await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert upserted['$sourceId'] == FLOOR_DIGITAL_TWIN - assert upserted['$relationshipId'] == 'FloorContainsRoom' - relationship = { + "$targetId": ROOM_DIGITAL_TWIN, + } + upserted = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert upserted["$sourceId"] == FLOOR_DIGITAL_TWIN + relationship = {"$relationshipName": "contains", "$targetId": ROOM_DIGITAL_TWIN} + upserted = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert upserted["$sourceId"] == FLOOR_DIGITAL_TWIN + assert upserted["$relationshipId"] == "FloorContainsRoom" + relationship = { "$relationshipId": "foo", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN - } - upserted = await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert upserted['$relationshipId'] == 'FloorContainsRoom' - relationship = { - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } + upserted = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert upserted["$relationshipId"] == "FloorContainsRoom" + relationship = {"$targetId": ROOM_DIGITAL_TWIN} with pytest.raises(HttpResponseError): - await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) + await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) with pytest.raises(HttpResponseError): - await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - {}) + await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", {}) @pytest.mark.asyncio async def test_create_relationship_conditionally_if_missing(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client, FLOOR_DIGITAL_TWIN, "FloorContainsRoom") - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } - created_relationship = await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship) - assert created_relationship.get('$relationshipId') == "FloorContainsRoom" + created_relationship = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) + assert created_relationship.get("$relationshipId") == "FloorContainsRoom" with pytest.raises(ResourceExistsError): await client.upsert_relationship( - FLOOR_DIGITAL_TWIN, - "FloorContainsRoom", - relationship, - match_condition=MatchConditions.IfMissing) + FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship, match_condition=MatchConditions.IfMissing + ) @pytest.mark.skip("Conditional etag does not appear to be supported") @pytest.mark.asyncio @@ -287,14 +203,14 @@ async def test_create_relationship_conditionally_if_modified(self, recorded_test client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "FloorContainsRoom", "$sourceId": FLOOR_DIGITAL_TWIN, "$relationshipName": "contains", - "$targetId": ROOM_DIGITAL_TWIN + "$targetId": ROOM_DIGITAL_TWIN, } created_relationship = await client.upsert_relationship(FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship) - assert created_relationship.get('$relationshipId') == "FloorContainsRoom" + assert created_relationship.get("$relationshipId") == "FloorContainsRoom" with pytest.raises(ResourceNotModifiedError): await client.upsert_relationship( @@ -302,50 +218,48 @@ async def test_create_relationship_conditionally_if_modified(self, recorded_test "FloorContainsRoom", relationship, match_condition=MatchConditions.IfModified, - etag=created_relationship.get('$etag')) + etag=created_relationship.get("$etag"), + ) updated = await client.upsert_relationship( FLOOR_DIGITAL_TWIN, "FloorContainsRoom", relationship, match_condition=MatchConditions.IfModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') - assert updated['$relationshipId'] == "FloorContainsRoom" + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) + assert updated["$relationshipId"] == "FloorContainsRoom" @pytest.mark.asyncio async def test_upsert_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - relationship = { + relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - created_relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship) - assert created_relationship['$relationshipId'] == "BuildingHasFloor" - assert created_relationship['isAccessRestricted'] == False + created_relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship) + assert created_relationship["$relationshipId"] == "BuildingHasFloor" + assert created_relationship["isAccessRestricted"] == False relationship["isAccessRestricted"] = True upserted_relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship) - assert upserted_relationship['$relationshipId'] == "BuildingHasFloor" - assert upserted_relationship['isAccessRestricted'] == True + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship + ) + assert upserted_relationship["$relationshipId"] == "BuildingHasFloor" + assert upserted_relationship["isAccessRestricted"] == True @pytest.mark.asyncio async def test_upsert_relationship_invalid_conditions(self, digitaltwin): - relationship = { + relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): @@ -354,14 +268,13 @@ async def test_upsert_relationship_invalid_conditions(self, digitaltwin): "BuildingHasFloor", relationship, match_condition=MatchConditions.IfMissing, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship, - match_condition=MatchConditions.IfModified) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship, match_condition=MatchConditions.IfModified + ) with pytest.raises(ValueError): await client.upsert_relationship( @@ -369,30 +282,28 @@ async def test_upsert_relationship_invalid_conditions(self, digitaltwin): "BuildingHasFloor", relationship, match_condition=MatchConditions.IfNotModified, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - relationship, - match_condition=MatchConditions.IfPresent) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", relationship, match_condition=MatchConditions.IfPresent + ) @pytest.mark.asyncio async def test_get_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } created_relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship + ) relationship = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") assert created_relationship == relationship @@ -409,17 +320,14 @@ async def test_get_relationship_not_existing(self, recorded_test, digitaltwin): async def test_delete_relationship(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) deleted = await client.delete_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") assert deleted is None @@ -438,30 +346,29 @@ async def test_delete_relationship_not_existing(self, recorded_test, digitaltwin async def test_delete_relationship_conditionally_if_not_modified(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) with pytest.raises(ResourceModifiedError): await client.delete_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) deleted = await client.delete_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfNotModified, - etag=relationship['$etag']) + etag=relationship["$etag"], + ) assert deleted is None with pytest.raises(ResourceNotFoundError): await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") @@ -470,22 +377,18 @@ async def test_delete_relationship_conditionally_if_not_modified(self, recorded_ async def test_delete_relationship_conditionally_if_present(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) deleted = await client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfPresent) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfPresent + ) assert deleted is None with pytest.raises(ResourceNotFoundError): await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") @@ -495,75 +398,57 @@ async def test_delete_relationship_invalid_conditions(self, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ValueError): await client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfPresent, - etag='etag-value') + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfPresent, etag="etag-value" + ) with pytest.raises(ValueError): await client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfNotModified) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfNotModified + ) with pytest.raises(ValueError): await client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfModified, - etag='etag-value') + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfModified, etag="etag-value" + ) with pytest.raises(ValueError): await client.delete_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - match_condition=MatchConditions.IfMissing) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", match_condition=MatchConditions.IfMissing + ) @pytest.mark.asyncio async def test_update_relationship_replace(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] update = await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True @pytest.mark.asyncio async def test_update_relationship_remove(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False patch = [ { "op": "remove", @@ -574,106 +459,72 @@ async def test_update_relationship_remove(self, recorded_test, digitaltwin): update = await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert 'isAccessRestricted' not in updated + assert "isAccessRestricted" not in updated @pytest.mark.asyncio async def test_update_relationship_add(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False - patch = [ - { - "op": "add", - "path": "/isAccessRestricted", - "value": True - } - ] + patch = [{"op": "add", "path": "/isAccessRestricted", "value": True}] update = await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True @pytest.mark.asyncio async def test_update_relationship_multiple(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - assert relationship['isAccessRestricted'] == False + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + assert relationship["isAccessRestricted"] == False patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - }, - { - "op": "remove", - "path": "/isAccessRestricted" - } + {"op": "replace", "path": "/isAccessRestricted", "value": True}, + {"op": "remove", "path": "/isAccessRestricted"}, ] update = await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) assert update is None updated = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert 'isAccessRestricted' not in updated + assert "isAccessRestricted" not in updated @pytest.mark.asyncio async def test_update_relationship_invalid_patch(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) - patch = [ - { - "op": "move", - "path": "/isAccessRestricted" - } - ] + patch = [{"op": "move", "path": "/isAccessRestricted"}] with pytest.raises(HttpResponseError): await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) - patch = [ - { - "op": "remove", - "path": "/isAccessDoorRestricted" - } - ] + patch = [{"op": "remove", "path": "/isAccessDoorRestricted"}] with pytest.raises(HttpResponseError): await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) - patch = { - "isAccessRestricted": True - } + patch = {"isAccessRestricted": True} with pytest.raises(HttpResponseError): await client.update_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch) @@ -688,94 +539,69 @@ async def test_update_relationship_invalid_patch(self, recorded_test, digitaltwi async def test_update_relationship_conditionally_if_not_modified(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] with pytest.raises(ResourceModifiedError): await client.update_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfNotModified, - etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"') + etag='W/"7e67a355-f19c-4c19-8a10-2d69b2d2253f"', + ) await client.update_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfNotModified, - etag=relationship['$etag']) + etag=relationship["$etag"], + ) updated = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True @pytest.mark.asyncio async def test_update_relationship_conditionally_if_present(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] await client.update_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - patch, - match_condition=MatchConditions.IfPresent) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfPresent + ) updated = await client.get_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor") - assert updated['isAccessRestricted'] == True + assert updated["isAccessRestricted"] == True @pytest.mark.asyncio async def test_update_relationship_invalid_conditions(self, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) - patch = [ - { - "op": "replace", - "path": "/isAccessRestricted", - "value": True - } - ] + patch = [{"op": "replace", "path": "/isAccessRestricted", "value": True}] with pytest.raises(ValueError): await client.update_relationship( BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfPresent, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): await client.update_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - patch, - match_condition=MatchConditions.IfNotModified) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfNotModified + ) with pytest.raises(ValueError): await client.update_relationship( @@ -783,24 +609,17 @@ async def test_update_relationship_invalid_conditions(self, digitaltwin): "BuildingHasFloor", patch, match_condition=MatchConditions.IfModified, - etag='etag-value') + etag="etag-value", + ) with pytest.raises(ValueError): await client.update_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - patch, - match_condition=MatchConditions.IfMissing) + BUILDING_DIGITAL_TWIN, "BuildingHasFloor", patch, match_condition=MatchConditions.IfMissing + ) @pytest.mark.asyncio async def test_update_relationship_not_existing(self, recorded_test, digitaltwin): - patch = [ - { - "op": "replace", - "path": "/Property1", - "value": 42 - } - ] + patch = [{"op": "replace", "path": "/Property1", "value": 42}] client = self._get_client(digitaltwin["endpoint"]) with pytest.raises(ResourceNotFoundError): await client.update_relationship(BUILDING_DIGITAL_TWIN, "foo", patch) @@ -811,39 +630,33 @@ async def test_update_relationship_not_existing(self, recorded_test, digitaltwin async def test_list_relationships(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) all_relationships = [] async for r in client.list_relationships(BUILDING_DIGITAL_TWIN): all_relationships.append(r) assert relationship in all_relationships - assert all_relationships[0]['$relationshipId'] == "BuildingHasFloor" + assert all_relationships[0]["$relationshipId"] == "BuildingHasFloor" @pytest.mark.asyncio async def test_list_relationship_by_id(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) all_relationships = [] async for r in client.list_relationships(BUILDING_DIGITAL_TWIN, relationship_id="BuildingHasFloor"): @@ -854,17 +667,14 @@ async def test_list_relationship_by_id(self, recorded_test, digitaltwin): async def test_list_incoming_relationships(self, recorded_test, digitaltwin): client = self._get_client(digitaltwin["endpoint"]) await self._set_up_models(client) - new_relationship = { + new_relationship = { "$relationshipId": "BuildingHasFloor", "$sourceId": BUILDING_DIGITAL_TWIN, "$relationshipName": "has", "$targetId": FLOOR_DIGITAL_TWIN, - "isAccessRestricted": False + "isAccessRestricted": False, } - relationship = await client.upsert_relationship( - BUILDING_DIGITAL_TWIN, - "BuildingHasFloor", - new_relationship) + relationship = await client.upsert_relationship(BUILDING_DIGITAL_TWIN, "BuildingHasFloor", new_relationship) all_relationships = [] async for r in client.list_incoming_relationships(BUILDING_DIGITAL_TWIN): diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_patch.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_patch.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_patch.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_patch.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/operations/_patch.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/operations/_patch.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/models/_patch.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/models/_patch.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/operations/_patch.py b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/operations/_patch.py +++ b/sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/_patch.py b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/_patch.py +++ b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/_patch.py b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/_patch.py +++ b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/operations/_patch.py b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/operations/_patch.py +++ b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/models/_patch.py b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/models/_patch.py +++ b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/operations/_patch.py b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/operations/_patch.py +++ b/sdk/disconnectedoperations/azure-mgmt-disconnectedoperations/azure/mgmt/disconnectedoperations/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/_patch.py b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/_patch.py +++ b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/_patch.py b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/_patch.py +++ b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/operations/_patch.py b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/operations/_patch.py +++ b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/models/_patch.py b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/models/_patch.py +++ b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_patch.py b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_patch.py +++ b/sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_patch.py b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_patch.py index b5517b65441e..b417500864c7 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_patch.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import re import io @@ -365,7 +366,13 @@ def get_long_running_output(pipeline_response): if polling is True: polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, lro_options={"final-state-via": "operation-location"}, **kwargs) + PollingMethod, + LROBasePolling( + lro_delay, + path_format_arguments=path_format_arguments, + lro_options={"final-state-via": "operation-location"}, + **kwargs, + ), ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_patch.py b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_patch.py index a77adcdfb601..47c251b2823c 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_patch.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, List, Union from azure.core.credentials import AzureKeyCredential, TokenCredential from ._client import ( diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_operations/_patch.py b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_operations/_patch.py index 8158f14847f5..33aa9012a25d 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_operations/_patch.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import io from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, Mapping, cast, overload @@ -345,7 +346,12 @@ def get_long_running_output(pipeline_response): if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, lro_options={"final-state-via": "operation-location"}, **kwargs), + AsyncLROBasePolling( + lro_delay, + path_format_arguments=path_format_arguments, + lro_options={"final-state-via": "operation-location"}, + **kwargs + ), ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_patch.py b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_patch.py index 471c1967baa0..f8442a23837e 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_patch.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, List, Union from azure.core.credentials import AzureKeyCredential diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/models/_patch.py b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/models/_patch.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_receipts_from_url_async.py b/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_receipts_from_url_async.py index c52fa267ea60..9128a81e544c 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_receipts_from_url_async.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_receipts_from_url_async.py @@ -21,7 +21,7 @@ Set the environment variables with your own values before running the sample: 1) DOCUMENTINTELLIGENCE_ENDPOINT - the endpoint to your Document Intelligence resource. - 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. + 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. """ import os diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_tax_us_w2_async.py b/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_tax_us_w2_async.py index c9a67860808e..66cb7a2f6473 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_tax_us_w2_async.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/samples/async_samples/sample_analyze_tax_us_w2_async.py @@ -20,7 +20,7 @@ Set the environment variables with your own values before running the sample: 1) DOCUMENTINTELLIGENCE_ENDPOINT - the endpoint to your Document Intelligence resource. - 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. + 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. """ import os diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_receipts_from_url.py b/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_receipts_from_url.py index a090ba55e597..bdf998d7c99e 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_receipts_from_url.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_receipts_from_url.py @@ -21,7 +21,7 @@ Set the environment variables with your own values before running the sample: 1) DOCUMENTINTELLIGENCE_ENDPOINT - the endpoint to your Document Intelligence resource. - 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. + 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. """ import os diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_tax_us_w2.py b/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_tax_us_w2.py index 2fa1b3066bb9..17449ff695f1 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_tax_us_w2.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_analyze_tax_us_w2.py @@ -20,7 +20,7 @@ Set the environment variables with your own values before running the sample: 1) DOCUMENTINTELLIGENCE_ENDPOINT - the endpoint to your Document Intelligence resource. - 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. + 2) DOCUMENTINTELLIGENCE_API_KEY - your Document Intelligence API key. """ import os diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_convert_to_and_from_dict.py b/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_convert_to_and_from_dict.py index 76084da11cb4..0a42cb337e85 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_convert_to_and_from_dict.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/samples/sample_convert_to_and_from_dict.py @@ -54,7 +54,7 @@ def convert_to_and_from_dict(): # save the dictionary as JSON content in a JSON file with open("data.json", "w") as output_file: json.dump(analyze_result_dict, output_file, indent=4) - + # convert the dictionary back to the original model model = AnalyzeResult(analyze_result_dict) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/setup.py b/sdk/documentintelligence/azure-ai-documentintelligence/setup.py index efc94a219375..5046331aef5b 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/setup.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-documentintelligence" PACKAGE_PPRINT_NAME = "Azure AI Document Intelligence" diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents.py b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents.py index ba0e36ca5faf..bbd3021de7be 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents.py @@ -15,7 +15,6 @@ from testcase import DocumentIntelligenceTest from preparers import DocumentIntelligencePreparer, GlobalClientPreparer as _GlobalClientPreparer - DocumentIntelligenceClientPreparer = functools.partial(_GlobalClientPreparer, DocumentIntelligenceClient) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents_async.py b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents_async.py index 15d23c91e953..da662d7923f7 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents_async.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_batch_documents_async.py @@ -16,7 +16,6 @@ from preparers import DocumentIntelligencePreparer, GlobalClientPreparerAsync as _GlobalClientPreparer from asynctestcase import AsyncDocumentIntelligenceTest - DocumentIntelligenceClientPreparer = functools.partial(_GlobalClientPreparer, DocumentIntelligenceClient) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout.py b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout.py index 91f2d344d00c..90cbc262c6a2 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout.py @@ -18,7 +18,6 @@ from conftest import skip_flaky_test from preparers import DocumentIntelligencePreparer, GlobalClientPreparer as _GlobalClientPreparer - DocumentIntelligenceClientPreparer = functools.partial(_GlobalClientPreparer, DocumentIntelligenceClient) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout_async.py b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout_async.py index 31efdff0929b..a55507fd5633 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout_async.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_analyze_layout_async.py @@ -19,7 +19,6 @@ from conftest import skip_flaky_test from preparers import DocumentIntelligencePreparer, GlobalClientPreparerAsync as _GlobalClientPreparer - DocumentIntelligenceClientPreparer = functools.partial(_GlobalClientPreparer, DocumentIntelligenceClient) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document.py b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document.py index 0b427fb05817..e3de1e57030c 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document.py @@ -18,7 +18,6 @@ from conftest import skip_flaky_test from preparers import DocumentIntelligencePreparer, GlobalClientPreparer as _GlobalClientPreparer - DocumentModelAdministrationClientPreparer = functools.partial( _GlobalClientPreparer, DocumentIntelligenceAdministrationClient ) diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document_async.py b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document_async.py index 8b2aa394b98b..19d518e125c1 100644 --- a/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document_async.py +++ b/sdk/documentintelligence/azure-ai-documentintelligence/tests/test_dac_classify_document_async.py @@ -19,7 +19,6 @@ from conftest import skip_flaky_test from preparers import DocumentIntelligencePreparer, GlobalClientPreparerAsync as _GlobalClientPreparer - DocumentModelAdministrationClientPreparer = functools.partial( _GlobalClientPreparer, DocumentIntelligenceAdministrationClient ) diff --git a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/_patch.py b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/_patch.py +++ b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/_patch.py b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/_patch.py +++ b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/operations/_patch.py b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/operations/_patch.py +++ b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/models/_patch.py b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/models/_patch.py +++ b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/operations/_patch.py b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/operations/_patch.py +++ b/sdk/durabletask/azure-mgmt-durabletask/azure/mgmt/durabletask/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/_patch.py b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/_patch.py +++ b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/_patch.py b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/_patch.py +++ b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/operations/_patch.py b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/operations/_patch.py +++ b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/models/_patch.py b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/models/_patch.py +++ b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/operations/_patch.py b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/operations/_patch.py +++ b/sdk/dynatrace/azure-mgmt-dynatrace/azure/mgmt/dynatrace/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/dynatrace/azure-mgmt-dynatrace/setup.py b/sdk/dynatrace/azure-mgmt-dynatrace/setup.py index 17a53b9367c5..66389f6d657a 100644 --- a/sdk/dynatrace/azure-mgmt-dynatrace/setup.py +++ b/sdk/dynatrace/azure-mgmt-dynatrace/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/easm/azure-defender-easm/azure/defender/easm/_patch.py b/sdk/easm/azure-defender-easm/azure/defender/easm/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/easm/azure-defender-easm/azure/defender/easm/_patch.py +++ b/sdk/easm/azure-defender-easm/azure/defender/easm/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/easm/azure-defender-easm/azure/defender/easm/aio/_patch.py b/sdk/easm/azure-defender-easm/azure/defender/easm/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/easm/azure-defender-easm/azure/defender/easm/aio/_patch.py +++ b/sdk/easm/azure-defender-easm/azure/defender/easm/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/easm/azure-defender-easm/azure/defender/easm/aio/operations/_patch.py b/sdk/easm/azure-defender-easm/azure/defender/easm/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/easm/azure-defender-easm/azure/defender/easm/aio/operations/_patch.py +++ b/sdk/easm/azure-defender-easm/azure/defender/easm/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/easm/azure-defender-easm/azure/defender/easm/operations/_patch.py b/sdk/easm/azure-defender-easm/azure/defender/easm/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/easm/azure-defender-easm/azure/defender/easm/operations/_patch.py +++ b/sdk/easm/azure-defender-easm/azure/defender/easm/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/easm/azure-defender-easm/samples/sample1_managing_discovery_runs.py b/sdk/easm/azure-defender-easm/samples/sample1_managing_discovery_runs.py index 6c1e6d293976..da8218a9638f 100644 --- a/sdk/easm/azure-defender-easm/samples/sample1_managing_discovery_runs.py +++ b/sdk/easm/azure-defender-easm/samples/sample1_managing_discovery_runs.py @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -''' +""" FILE: sample1_managing_discovery_runs.py DESCRIPTION: @@ -19,19 +19,19 @@ 4) REGION - the azure region your resource is in 5) HOSTS - a comma separated list of hosts you would like to run discovery on 6) DOMAINS - a comma separated list of hosts you would like to run discovery on -''' +""" import itertools import os from azure.identity import InteractiveBrowserCredential from azure.defender.easm import EasmClient -#To create an EasmClient, you need your subscription ID, region, and some sort of credential. -sub_id = os.environ['SUBSCRIPTION_ID'] -workspace_name = os.environ['WORKSPACE_NAME'] -resource_group = os.environ['RESOURCE_GROUP'] -region = os.environ['REGION'] -endpoint = f'{region}.easm.defender.microsoft.com' +# To create an EasmClient, you need your subscription ID, region, and some sort of credential. +sub_id = os.environ["SUBSCRIPTION_ID"] +workspace_name = os.environ["WORKSPACE_NAME"] +resource_group = os.environ["RESOURCE_GROUP"] +region = os.environ["REGION"] +endpoint = f"{region}.easm.defender.microsoft.com" # For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. @@ -40,14 +40,11 @@ # in order to start discovery runs, we must first create a discovery group, which is a collection of known assets that we can pivot off of. these are created using the `discovery_groups.put` method -hosts = [{'kind': 'host', 'name': i.strip()} for i in os.environ['HOSTS'].split(',')] -domains = [{'kind': 'host', 'name': i.strip()} for i in os.environ['DOMAINS'].split(',')] -name = 'sample discovery group' +hosts = [{"kind": "host", "name": i.strip()} for i in os.environ["HOSTS"].split(",")] +domains = [{"kind": "host", "name": i.strip()} for i in os.environ["DOMAINS"].split(",")] +name = "sample discovery group" assets = hosts + domains -request = { - 'description': 'Discovery group made using the Defender EASM SDK sample', - 'seeds': assets -} +request = {"description": "Discovery group made using the Defender EASM SDK sample", "seeds": assets} response = client.discovery_groups.put(name, request) @@ -55,7 +52,9 @@ client.discovery_groups.run(name) for group in client.discovery_groups.list(): - print(group['name']) - runs = client.discovery_groups.list_runs(group['name']) + print(group["name"]) + runs = client.discovery_groups.list_runs(group["name"]) for run in itertools.islice(runs, 5): - print(f" - started: {run['startedDate']}, finished: {run['completedDate']}, assets found: {run['totalAssetsFoundCount']}") + print( + f" - started: {run['startedDate']}, finished: {run['completedDate']}, assets found: {run['totalAssetsFoundCount']}" + ) diff --git a/sdk/easm/azure-defender-easm/samples/sample2_create_disco_group_from_template.py b/sdk/easm/azure-defender-easm/samples/sample2_create_disco_group_from_template.py index 0f97d670271f..80b6c6e06a3a 100644 --- a/sdk/easm/azure-defender-easm/samples/sample2_create_disco_group_from_template.py +++ b/sdk/easm/azure-defender-easm/samples/sample2_create_disco_group_from_template.py @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -''' +""" FILE: sample2_create_disco_group_from_template.py DESCRIPTION: @@ -18,18 +18,18 @@ 3) RESOURCE_GROUP - the resource group for your resource 4) REGION - the azure region your resource is in 5) PARTIAL_NAME - the search term for the templates. used for a case insensitive "contains" search -''' +""" import os from azure.identity import InteractiveBrowserCredential from azure.defender.easm import EasmClient -#To create an EasmClient, you need your subscription ID, region, and some sort of credential. -sub_id = os.environ['SUBSCRIPTION_ID'] -workspace_name = os.environ['WORKSPACE_NAME'] -resource_group = os.environ['RESOURCE_GROUP'] -region = os.environ['REGION'] -endpoint = f'{region}.easm.defender.microsoft.com' +# To create an EasmClient, you need your subscription ID, region, and some sort of credential. +sub_id = os.environ["SUBSCRIPTION_ID"] +workspace_name = os.environ["WORKSPACE_NAME"] +resource_group = os.environ["RESOURCE_GROUP"] +region = os.environ["REGION"] +endpoint = f"{region}.easm.defender.microsoft.com" # For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. browser_credential = InteractiveBrowserCredential() @@ -37,7 +37,7 @@ # The discovery_templates.list method can be used to find a discovery template using a filter. # The endpoint will return templates based on a partial match on the name field. -partial_name = os.environ['PARTIAL_NAME'] +partial_name = os.environ["PARTIAL_NAME"] templates = client.discovery_templates.list(filter=partial_name) for template in templates: @@ -45,24 +45,24 @@ # To get more detail about a disco template, we can use the discovery_templates.get method. # From here, we can see the names and seeds which would be used in a discovery run. -template_id = input('choose a template id: ') +template_id = input("choose a template id: ") template = client.discovery_templates.get(template_id) -print(f'Chosen template id: {template_id}') -print('The following names will be used:') -for name in template['names']: +print(f"Chosen template id: {template_id}") +print("The following names will be used:") +for name in template["names"]: print(name) print() -print('The following seeds will be used:') -for seed in template['seeds']: +print("The following seeds will be used:") +for seed in template["seeds"]: print(f'{seed["kind"]}, {seed["name"]}') print() -#The discovery template can be used to create a discovery group with using the EasmClient's discovery_groups.put method. Don't forget to run your new disco group with discovery_groups.run -group_name = 'sample discovery group' +# The discovery template can be used to create a discovery group with using the EasmClient's discovery_groups.put method. Don't forget to run your new disco group with discovery_groups.run +group_name = "sample discovery group" -request = {'templateId': template_id} +request = {"templateId": template_id} response = client.discovery_groups.put(group_name, body=request) client.discovery_groups.run(group_name) diff --git a/sdk/easm/azure-defender-easm/samples/sample3_use_saved_filters.py b/sdk/easm/azure-defender-easm/samples/sample3_use_saved_filters.py index 4e20cdaab860..5b5217035403 100644 --- a/sdk/easm/azure-defender-easm/samples/sample3_use_saved_filters.py +++ b/sdk/easm/azure-defender-easm/samples/sample3_use_saved_filters.py @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -''' +""" FILE: sample3_use_saved_filters.py DESCRIPTION: @@ -18,53 +18,53 @@ 2) WORKSPACE_NAME - the workspace name for your resource 3) RESOURCE_GROUP - the resource group for your resource 4) REGION - the azure region your resource is in -''' +""" import os from azure.identity import InteractiveBrowserCredential from azure.defender.easm import EasmClient -#To create an EasmClient, you need your subscription ID, region, and some sort of credential. -sub_id = os.environ['SUBSCRIPTION_ID'] -workspace_name = os.environ['WORKSPACE_NAME'] -resource_group = os.environ['RESOURCE_GROUP'] -region = os.environ['REGION'] -endpoint = f'{region}.easm.defender.microsoft.com' +# To create an EasmClient, you need your subscription ID, region, and some sort of credential. +sub_id = os.environ["SUBSCRIPTION_ID"] +workspace_name = os.environ["WORKSPACE_NAME"] +resource_group = os.environ["RESOURCE_GROUP"] +region = os.environ["REGION"] +endpoint = f"{region}.easm.defender.microsoft.com" # For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. browser_credential = InteractiveBrowserCredential() client = EasmClient(endpoint, resource_group, sub_id, workspace_name, browser_credential) # To create a Saved Filter, we need to send a filter, name, and description to the `saved_filters.put` endpoint -saved_filter_name = 'sample saved filter' +saved_filter_name = "sample saved filter" request = { - 'filter': 'IP Address = 1.1.1.1', - 'description': 'Monitored Addresses', + "filter": "IP Address = 1.1.1.1", + "description": "Monitored Addresses", } client.saved_filters.put(saved_filter_name, body=request) # The saved filter can now be used in scripts to monitor the assets # First, retrieve the saved filter by name, then use it in an asset list or update call + # A sample asset list call that could be used to monitor the assets: def monitor(asset): - pass #your monitor logic here + pass # your monitor logic here + -monitor_filter = client.saved_filters.get(saved_filter_name)['filter'] +monitor_filter = client.saved_filters.get(saved_filter_name)["filter"] for asset in client.assets.list(filter=monitor_filter): - monitor(asset) + monitor(asset) # A sample asset update call, which could be used to update the monitored assets: -monitor_filter = client.saved_filters.get(saved_filter_name)['filter'] +monitor_filter = client.saved_filters.get(saved_filter_name)["filter"] -body = { - 'state': 'confirmed' -} +body = {"state": "confirmed"} client.assets.update(body, filter=monitor_filter) # Should your needs change, the filter can be updated with no need to update the scripts it's used in # Simply submit a new `saved_filters.put` request to replace the old description and filter with a new set -request = {'filter': 'IP Address = 0.0.0.0', 'description': 'Monitored Addresses'} +request = {"filter": "IP Address = 0.0.0.0", "description": "Monitored Addresses"} client.saved_filters.put(saved_filter_name, body=request) diff --git a/sdk/easm/azure-defender-easm/samples/sample4_managing_external_ids.py b/sdk/easm/azure-defender-easm/samples/sample4_managing_external_ids.py index ee01f90797ec..eb88f54be1b0 100644 --- a/sdk/easm/azure-defender-easm/samples/sample4_managing_external_ids.py +++ b/sdk/easm/azure-defender-easm/samples/sample4_managing_external_ids.py @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -''' +""" FILE: sample4_managing_external_ids.py DESCRIPTION: @@ -31,19 +31,19 @@ 3) RESOURCE_GROUP - the resource group for your resource 4) REGION - the azure region your resource is in 5) MAPPING - a json file with an external id mapping. -''' +""" import os import json from azure.identity import InteractiveBrowserCredential from azure.defender.easm import EasmClient -#To create an EasmClient, you need your subscription ID, region, and some sort of credential. -sub_id = os.environ['SUBSCRIPTION_ID'] -workspace_name = os.environ['WORKSPACE_NAME'] -resource_group = os.environ['RESOURCE_GROUP'] -region = os.environ['REGION'] -endpoint = f'{region}.easm.defender.microsoft.com' +# To create an EasmClient, you need your subscription ID, region, and some sort of credential. +sub_id = os.environ["SUBSCRIPTION_ID"] +workspace_name = os.environ["WORKSPACE_NAME"] +resource_group = os.environ["RESOURCE_GROUP"] +region = os.environ["REGION"] +endpoint = f"{region}.easm.defender.microsoft.com" # For the purposes of this demo, I've chosen the InteractiveBrowserCredential but any credential will work. browser_credential = InteractiveBrowserCredential() @@ -51,17 +51,17 @@ # Assets in EASM can be uniquely distinguished by `name` and `kind`, so we can create a simple dictionary containing `name`, `kind`, and `external_id`. In a more realistic case, this could be generated using an export from the external system we're using for tagging external_id_mapping = None -with open(os.environ['MAPPING']) as mapping: +with open(os.environ["MAPPING"]) as mapping: external_id_mapping = json.load(mapping) # Using the `assets` client, we can update each asset and append the tracking id of the update to our update ID list, so that we can keep track of the progress on each update later update_ids = [] for asset in external_id_mapping: - update_request = {'externalId': asset['external_id']} + update_request = {"externalId": asset["external_id"]} asset_filter = f"kind = {asset['kind']} AND name = {asset['name']}" update = client.assets.update(body=update_request, filter=asset_filter) - update_ids.append(update['id']) + update_ids.append(update["id"]) # Using the `tasks` client, we can view the progress of each update using the `get` method for update_id in update_ids: @@ -69,9 +69,8 @@ print(f'{update["id"]}: {update["state"]}') # The updates can be viewed using the `assets.list` method by creating a filter that matches on each external id using an `in` query -ids = ', '.join([f'"{asset["external_id"]}"' for asset in external_id_mapping]) -asset_filter = f'External ID in ({ids})' +ids = ", ".join([f'"{asset["external_id"]}"' for asset in external_id_mapping]) +asset_filter = f"External ID in ({ids})" for asset in client.assets.list(filter=asset_filter): print(f'{asset["externalId"]}, {asset["name"]}') - diff --git a/sdk/easm/azure-defender-easm/setup.py b/sdk/easm/azure-defender-easm/setup.py index 8e6a7cd98000..e90ddb5b76ac 100644 --- a/sdk/easm/azure-defender-easm/setup.py +++ b/sdk/easm/azure-defender-easm/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-defender-easm" PACKAGE_PPRINT_NAME = "EASM Data Plane Client" diff --git a/sdk/easm/azure-defender-easm/tests/test_asset_client.py b/sdk/easm/azure-defender-easm/tests/test_asset_client.py index 87ab7aa68936..a329a709c28f 100644 --- a/sdk/easm/azure-defender-easm/tests/test_asset_client.py +++ b/sdk/easm/azure-defender-easm/tests/test_asset_client.py @@ -7,40 +7,56 @@ from testcase import EasmTest, EasmParameterProvider from devtools_testutils import recorded_by_proxy + class TestEasmAssetClient(EasmTest): - kind = 'domain' - name = 'hellointernet.fm' - asset_filter = f'name = {name} and type = {kind}' - asset_id = f'{kind}$${name}' - time_format = '%Y-%m-%dT%H:%M:%S.%f%z' + kind = "domain" + name = "hellointernet.fm" + asset_filter = f"name = {name} and type = {kind}" + asset_id = f"{kind}$${name}" + time_format = "%Y-%m-%dT%H:%M:%S.%f%z" @EasmParameterProvider() @recorded_by_proxy def test_list_assets(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) assets = client.assets.list(filter=self.asset_filter) asset = assets.next() - assert self.kind == asset['kind'] - assert self.name == asset['name'] - self.check_guid_format(asset['uuid']) + assert self.kind == asset["kind"] + assert self.name == asset["name"] + self.check_guid_format(asset["uuid"]) @EasmParameterProvider() @recorded_by_proxy def test_get_asset(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) asset = client.assets.get(self.asset_id) - assert self.kind == asset['kind'] - assert self.name == asset['name'] - self.check_guid_format(asset['uuid']) + assert self.kind == asset["kind"] + assert self.name == asset["name"] + self.check_guid_format(asset["uuid"]) @EasmParameterProvider() @recorded_by_proxy def test_update_asset(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) - asset_update_request = {'externalId': 'new_external_id'} + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) + asset_update_request = {"externalId": "new_external_id"} response = client.assets.update(body=asset_update_request, filter=self.asset_filter) - assert 'complete' == response['state'] - assert 'complete' == response['phase'] - self.check_timestamp_format(self.time_format, response['startedAt']) - self.check_timestamp_format(self.time_format, response['completedAt']) - self.check_guid_format(response['id']) + assert "complete" == response["state"] + assert "complete" == response["phase"] + self.check_timestamp_format(self.time_format, response["startedAt"]) + self.check_timestamp_format(self.time_format, response["completedAt"]) + self.check_guid_format(response["id"]) diff --git a/sdk/easm/azure-defender-easm/tests/test_discovery_groups_client.py b/sdk/easm/azure-defender-easm/tests/test_discovery_groups_client.py index 9e61aee44980..c14be884345f 100644 --- a/sdk/easm/azure-defender-easm/tests/test_discovery_groups_client.py +++ b/sdk/easm/azure-defender-easm/tests/test_discovery_groups_client.py @@ -7,71 +7,99 @@ from testcase import EasmTest, EasmParameterProvider from devtools_testutils import recorded_by_proxy + class TestEasmDiscoveryGroupClient(EasmTest): - put_discovery_group_name = 'smoke_test_put_discovery_group' - delete_discovery_group_name = 'smoke_test_delete_discovery_group' - known_existing_group = 'test_group' - time_format = '%Y-%m-%dT%H:%M:%S.%f%z' + put_discovery_group_name = "smoke_test_put_discovery_group" + delete_discovery_group_name = "smoke_test_delete_discovery_group" + known_existing_group = "test_group" + time_format = "%Y-%m-%dT%H:%M:%S.%f%z" @EasmParameterProvider() @recorded_by_proxy def test_list_discovery_groups(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.discovery_groups.list() group = response.next() - assert group['id'] - assert group['name'] - assert group['displayName'] - assert group['description'] - assert group['tier'] - self.check_timestamp_format(self.time_format, group['createdDate']) + assert group["id"] + assert group["name"] + assert group["displayName"] + assert group["description"] + assert group["tier"] + self.check_timestamp_format(self.time_format, group["createdDate"]) @EasmParameterProvider() @recorded_by_proxy def test_get_discovery_group(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) group = client.discovery_groups.get(self.known_existing_group) - assert group['id'] == self.known_existing_group - assert group['name'] == self.known_existing_group - assert group['displayName'] == self.known_existing_group - assert group['description'] - assert group['tier'] - self.check_timestamp_format(self.time_format, group['createdDate']) + assert group["id"] == self.known_existing_group + assert group["name"] == self.known_existing_group + assert group["displayName"] == self.known_existing_group + assert group["description"] + assert group["tier"] + self.check_timestamp_format(self.time_format, group["createdDate"]) @EasmParameterProvider() @recorded_by_proxy def test_list_discovery_runs(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.discovery_groups.list_runs(self.known_existing_group) run = response.next() - assert run['state'] - assert run['tier'] - self.check_timestamp_format(self.time_format, run['submittedDate']) + assert run["state"] + assert run["tier"] + self.check_timestamp_format(self.time_format, run["submittedDate"]) @EasmParameterProvider() @recorded_by_proxy def test_put_discovery_group(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) - request = { - 'description': 'test description', - 'seeds': [{'kind': 'domain', 'name': 'example.org'}] - } + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) + request = {"description": "test description", "seeds": [{"kind": "domain", "name": "example.org"}]} group = client.discovery_groups.put(self.put_discovery_group_name, body=request) - assert group['name'] == self.put_discovery_group_name - assert group['displayName'] == self.put_discovery_group_name - assert group['description'] == request['description'] - assert group['seeds'] == request['seeds'] + assert group["name"] == self.put_discovery_group_name + assert group["displayName"] == self.put_discovery_group_name + assert group["description"] == request["description"] + assert group["seeds"] == request["seeds"] @EasmParameterProvider() @recorded_by_proxy def test_delete_discovery_group(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.discovery_groups.delete(self.delete_discovery_group_name) assert response is None @EasmParameterProvider() @recorded_by_proxy def test_run_discovery_group(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.discovery_groups.run(self.known_existing_group) assert response is None diff --git a/sdk/easm/azure-defender-easm/tests/test_discovery_templates_client.py b/sdk/easm/azure-defender-easm/tests/test_discovery_templates_client.py index bb95b85658b1..3230f55aa25e 100644 --- a/sdk/easm/azure-defender-easm/tests/test_discovery_templates_client.py +++ b/sdk/easm/azure-defender-easm/tests/test_discovery_templates_client.py @@ -7,24 +7,34 @@ from testcase import EasmTest, EasmParameterProvider from devtools_testutils import recorded_by_proxy + class TestEasmDiscoveryTemplateClient(EasmTest): - partial_name = 'taco' - template_id = '44368' + partial_name = "taco" + template_id = "44368" @EasmParameterProvider() @recorded_by_proxy def test_list_discovery_templates(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.discovery_templates.list(filter=self.partial_name) template = response.next() - assert self.partial_name in template['name'].lower() - assert template['id'] + assert self.partial_name in template["name"].lower() + assert template["id"] @EasmParameterProvider() @recorded_by_proxy def test_get_discovery_template(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) template = client.discovery_templates.get(self.template_id) - assert template['name'] - assert template['id'] - + assert template["name"] + assert template["id"] diff --git a/sdk/easm/azure-defender-easm/tests/test_reports_client.py b/sdk/easm/azure-defender-easm/tests/test_reports_client.py index 0c207bff91e4..e2878a6fee3c 100644 --- a/sdk/easm/azure-defender-easm/tests/test_reports_client.py +++ b/sdk/easm/azure-defender-easm/tests/test_reports_client.py @@ -7,31 +7,47 @@ from testcase import EasmTest, EasmParameterProvider from devtools_testutils import recorded_by_proxy + class TestEasmReportClient(EasmTest): - metric = 'savedfilter_metric_40610' - time_format = '%Y-%m-%dT%H:%M:%S.%f%z' + metric = "savedfilter_metric_40610" + time_format = "%Y-%m-%dT%H:%M:%S.%f%z" @EasmParameterProvider() @recorded_by_proxy def test_report_billable(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) report = client.reports.billable() - assert report['assetSummaries'] + assert report["assetSummaries"] @EasmParameterProvider() @recorded_by_proxy def test_report_snapshot(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) - snapshot = client.reports.snapshot(body={'metric': self.metric}) - assert snapshot['displayName'] - assert snapshot['metric'] == self.metric - assert snapshot['description'] - assert snapshot['assets'] - self.check_timestamp_format(self.time_format, snapshot['updatedAt']) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) + snapshot = client.reports.snapshot(body={"metric": self.metric}) + assert snapshot["displayName"] + assert snapshot["metric"] == self.metric + assert snapshot["description"] + assert snapshot["assets"] + self.check_timestamp_format(self.time_format, snapshot["updatedAt"]) @EasmParameterProvider() @recorded_by_proxy def test_report_summarize(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) - summary = client.reports.summary(body={'metrics': [self.metric]}) - assert summary['assetSummaries'] + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) + summary = client.reports.summary(body={"metrics": [self.metric]}) + assert summary["assetSummaries"] diff --git a/sdk/easm/azure-defender-easm/tests/test_saved_filters_client.py b/sdk/easm/azure-defender-easm/tests/test_saved_filters_client.py index f30e29b7082e..0d3bb2c9e5e8 100644 --- a/sdk/easm/azure-defender-easm/tests/test_saved_filters_client.py +++ b/sdk/easm/azure-defender-easm/tests/test_saved_filters_client.py @@ -7,49 +7,70 @@ from testcase import EasmTest, EasmParameterProvider from devtools_testutils import recorded_by_proxy + class TestEasmSavedFilterClient(EasmTest): - delete_saved_filter_name = 'smoke_test_delete_saved_filter' - put_saved_filter_name = 'smoke_test_put_saved_filter' - known_existing_filter = 'sf1' + delete_saved_filter_name = "smoke_test_delete_saved_filter" + put_saved_filter_name = "smoke_test_put_saved_filter" + known_existing_filter = "sf1" @EasmParameterProvider() @recorded_by_proxy def test_list_saved_filters(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.saved_filters.list() saved_filter = response.next() - assert saved_filter['id'] - assert saved_filter['description'] + assert saved_filter["id"] + assert saved_filter["description"] @EasmParameterProvider() @recorded_by_proxy def test_get_saved_filter(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) saved_filter = client.saved_filters.get(self.known_existing_filter) - assert saved_filter['id'] == self.known_existing_filter - assert saved_filter['name'] == self.known_existing_filter - assert saved_filter['displayName'] - assert saved_filter['filter'] - assert saved_filter['description'] + assert saved_filter["id"] == self.known_existing_filter + assert saved_filter["name"] == self.known_existing_filter + assert saved_filter["displayName"] + assert saved_filter["filter"] + assert saved_filter["description"] @EasmParameterProvider() @recorded_by_proxy def test_put_saved_filter(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) request = { - 'filter': 'name = "example.org"', - 'description': 'test saved filter', + "filter": 'name = "example.org"', + "description": "test saved filter", } saved_filter = client.saved_filters.put(self.put_saved_filter_name, body=request) - assert saved_filter['id'] == self.put_saved_filter_name - assert saved_filter['name'] == self.put_saved_filter_name - assert saved_filter['displayName'] == self.put_saved_filter_name - assert saved_filter['filter'] == request['filter'] - assert saved_filter['description'] == request['description'] + assert saved_filter["id"] == self.put_saved_filter_name + assert saved_filter["name"] == self.put_saved_filter_name + assert saved_filter["displayName"] == self.put_saved_filter_name + assert saved_filter["filter"] == request["filter"] + assert saved_filter["description"] == request["description"] @EasmParameterProvider() @recorded_by_proxy def test_delete_saved_filter(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) response = client.saved_filters.delete(self.delete_saved_filter_name) assert response is None diff --git a/sdk/easm/azure-defender-easm/tests/test_tasks_client.py b/sdk/easm/azure-defender-easm/tests/test_tasks_client.py index fb7a1c12a60a..12836a644e7c 100644 --- a/sdk/easm/azure-defender-easm/tests/test_tasks_client.py +++ b/sdk/easm/azure-defender-easm/tests/test_tasks_client.py @@ -7,23 +7,34 @@ from testcase import EasmTest, EasmParameterProvider from devtools_testutils import recorded_by_proxy + class TestEasmTaskClient(EasmTest): - existing_task_id = '7cf2c2d9-8125-4043-a82c-b86baa2c60fd' - time_format = '%Y-%m-%dT%H:%M:%S.%f%z' + existing_task_id = "7cf2c2d9-8125-4043-a82c-b86baa2c60fd" + time_format = "%Y-%m-%dT%H:%M:%S.%f%z" @EasmParameterProvider() @recorded_by_proxy def test_list_tasks(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) tasks = client.tasks.list() task = tasks.next() - self.check_guid_format(task['id']) - self.check_timestamp_format(self.time_format, task['startedAt']) + self.check_guid_format(task["id"]) + self.check_timestamp_format(self.time_format, task["startedAt"]) @EasmParameterProvider() @recorded_by_proxy def test_get_task(self, easm_endpoint, easm_resource_group, easm_subscription_id, easm_workspace): - client = self.create_client(endpoint=easm_endpoint, resource_group=easm_resource_group, subscription_id=easm_subscription_id, workspace=easm_workspace) + client = self.create_client( + endpoint=easm_endpoint, + resource_group=easm_resource_group, + subscription_id=easm_subscription_id, + workspace=easm_workspace, + ) task = client.tasks.get(self.existing_task_id) - self.check_guid_format(task['id']) - self.check_timestamp_format(self.time_format, task['startedAt']) + self.check_guid_format(task["id"]) + self.check_timestamp_format(self.time_format, task["startedAt"]) diff --git a/sdk/easm/azure-defender-easm/tests/testcase.py b/sdk/easm/azure-defender-easm/tests/testcase.py index b4ea18b6b65f..3478be172bf8 100644 --- a/sdk/easm/azure-defender-easm/tests/testcase.py +++ b/sdk/easm/azure-defender-easm/tests/testcase.py @@ -19,19 +19,19 @@ def create_client(self, endpoint, resource_group, subscription_id, workspace): endpoint=endpoint, resource_group_name=resource_group, subscription_id=subscription_id, - workspace_name=workspace + workspace_name=workspace, ) def check_timestamp_format(self, time_format, timestamp): try: datetime.datetime.strptime(timestamp, time_format) except ValueError as e: - assert False, 'invalid timestamp format' + assert False, "invalid timestamp format" def check_guid_format(self, guid): - parts = guid.split('-') + parts = guid.split("-") lengths = [8, 4, 4, 4, 12] - assert all(len(seg) == l for seg, l in zip(parts, lengths)), 'invalid guid' + assert all(len(seg) == l for seg, l in zip(parts, lengths)), "invalid guid" EasmParameterProvider = functools.partial( @@ -40,5 +40,5 @@ def check_guid_format(self, guid): easm_endpoint="fake_endpoint.easm.defender.microsoft.com", easm_resource_group="fake_resource_group", easm_subscription_id="fake-sub-id", - easm_workspace="fakename" + easm_workspace="fakename", ) diff --git a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/_patch.py b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/_patch.py +++ b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/_patch.py b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/_patch.py +++ b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/operations/_patch.py b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/operations/_patch.py +++ b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/models/_patch.py b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/models/_patch.py +++ b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/operations/_patch.py b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/operations/_patch.py +++ b/sdk/edgeactions/azure-mgmt-edgeactions/azure/mgmt/edgeactions/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/__init__.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/__init__.py index 1d780f692926..baaf70e8576b 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/__init__.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/__init__.py @@ -12,7 +12,6 @@ from .data_box_edge_management_client import DataBoxEdgeManagementClient from .version import VERSION -__all__ = ['DataBoxEdgeManagementClient'] +__all__ = ["DataBoxEdgeManagementClient"] __version__ = VERSION - diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/data_box_edge_management_client.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/data_box_edge_management_client.py index a2c1bcda124c..0f751cfbbd4d 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/data_box_edge_management_client.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/data_box_edge_management_client.py @@ -41,20 +41,19 @@ class DataBoxEdgeManagementClientConfiguration(AzureConfiguration): :param str base_url: Service URL """ - def __init__( - self, credentials, subscription_id, base_url=None): + def __init__(self, credentials, subscription_id, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") if not base_url: - base_url = 'https://management.azure.com' + base_url = "https://management.azure.com" super(DataBoxEdgeManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-edgegateway/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') + self.add_user_agent("azure-mgmt-edgegateway/{}".format(VERSION)) + self.add_user_agent("Azure-SDK-For-Python") self.credentials = credentials self.subscription_id = subscription_id @@ -99,38 +98,31 @@ class DataBoxEdgeManagementClient(SDKClient): :param str base_url: Service URL """ - def __init__( - self, credentials, subscription_id, base_url=None): + def __init__(self, credentials, subscription_id, base_url=None): self.config = DataBoxEdgeManagementClientConfiguration(credentials, subscription_id, base_url) super(DataBoxEdgeManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-03-01' + self.api_version = "2019-03-01" self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.devices = DevicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.alerts = AlertsOperations( - self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self.config, self._serialize, self._deserialize) + self.devices = DevicesOperations(self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations(self._client, self.config, self._serialize, self._deserialize) self.bandwidth_schedules = BandwidthSchedulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self.config, self._serialize, self._deserialize + ) + self.jobs = JobsOperations(self._client, self.config, self._serialize, self._deserialize) self.operations_status = OperationsStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.orders = OrdersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.roles = RolesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.shares = SharesOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self.config, self._serialize, self._deserialize + ) + self.orders = OrdersOperations(self._client, self.config, self._serialize, self._deserialize) + self.roles = RolesOperations(self._client, self.config, self._serialize, self._deserialize) + self.shares = SharesOperations(self._client, self.config, self._serialize, self._deserialize) self.storage_account_credentials = StorageAccountCredentialsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.triggers = TriggersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.users = UsersOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self.config, self._serialize, self._deserialize + ) + self.triggers = TriggersOperations(self._client, self.config, self._serialize, self._deserialize) + self.users = UsersOperations(self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/__init__.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/__init__.py index 38bf4d3d1f8f..00b5bfdbf773 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/__init__.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/__init__.py @@ -166,102 +166,102 @@ ) __all__ = [ - 'Address', - 'AlertErrorDetails', - 'Alert', - 'ARMBaseModel', - 'AsymmetricEncryptedSecret', - 'SymmetricKey', - 'Authentication', - 'AzureContainerInfo', - 'BandwidthSchedule', - 'ClientAccessRight', - 'ContactDetails', - 'Sku', - 'DataBoxEdgeDevice', - 'DataBoxEdgeDeviceExtendedInfo', - 'DataBoxEdgeDevicePatch', - 'FileSourceInfo', - 'RoleSinkInfo', - 'FileEventTrigger', - 'IoTDeviceInfo', - 'MountPointMap', - 'IoTRole', - 'Ipv4Config', - 'Ipv6Config', - 'JobErrorItem', - 'JobErrorDetails', - 'UpdateDownloadProgress', - 'UpdateInstallProgress', - 'Job', - 'MetricDimensionV1', - 'MetricSpecificationV1', - 'NetworkAdapterPosition', - 'NetworkAdapter', - 'NetworkSettings', - 'OperationDisplay', - 'ServiceSpecification', - 'Operation', - 'OrderStatus', - 'TrackingInfo', - 'Order', - 'PeriodicTimerSourceInfo', - 'PeriodicTimerEventTrigger', - 'RefreshDetails', - 'Role', - 'SecuritySettings', - 'UserAccessRight', - 'Share', - 'ShareAccessRight', - 'StorageAccountCredential', - 'Trigger', - 'UpdateSummary', - 'UploadCertificateRequest', - 'UploadCertificateResponse', - 'User', - 'OperationPaged', - 'DataBoxEdgeDevicePaged', - 'AlertPaged', - 'BandwidthSchedulePaged', - 'OrderPaged', - 'RolePaged', - 'SharePaged', - 'StorageAccountCredentialPaged', - 'TriggerPaged', - 'UserPaged', - 'AlertSeverity', - 'EncryptionAlgorithm', - 'AzureContainerDataFormat', - 'DayOfWeek', - 'ClientPermissionType', - 'SkuName', - 'SkuTier', - 'DataBoxEdgeDeviceStatus', - 'DeviceType', - 'RoleTypes', - 'PlatformType', - 'RoleStatus', - 'JobStatus', - 'JobType', - 'UpdateOperationStage', - 'DownloadPhase', - 'MetricUnit', - 'MetricAggregationType', - 'MetricCategory', - 'TimeGrain', - 'NetworkGroup', - 'NetworkAdapterStatus', - 'NetworkAdapterRDMAStatus', - 'NetworkAdapterDHCPStatus', - 'OrderState', - 'AuthenticationType', - 'ShareStatus', - 'MonitoringStatus', - 'ShareAccessProtocol', - 'ShareAccessType', - 'DataPolicy', - 'SSLStatus', - 'AccountType', - 'InstallRebootBehavior', - 'UpdateOperation', + "Address", + "AlertErrorDetails", + "Alert", + "ARMBaseModel", + "AsymmetricEncryptedSecret", + "SymmetricKey", + "Authentication", + "AzureContainerInfo", + "BandwidthSchedule", + "ClientAccessRight", + "ContactDetails", + "Sku", + "DataBoxEdgeDevice", + "DataBoxEdgeDeviceExtendedInfo", + "DataBoxEdgeDevicePatch", + "FileSourceInfo", + "RoleSinkInfo", + "FileEventTrigger", + "IoTDeviceInfo", + "MountPointMap", + "IoTRole", + "Ipv4Config", + "Ipv6Config", + "JobErrorItem", + "JobErrorDetails", + "UpdateDownloadProgress", + "UpdateInstallProgress", + "Job", + "MetricDimensionV1", + "MetricSpecificationV1", + "NetworkAdapterPosition", + "NetworkAdapter", + "NetworkSettings", + "OperationDisplay", + "ServiceSpecification", + "Operation", + "OrderStatus", + "TrackingInfo", + "Order", + "PeriodicTimerSourceInfo", + "PeriodicTimerEventTrigger", + "RefreshDetails", + "Role", + "SecuritySettings", + "UserAccessRight", + "Share", + "ShareAccessRight", + "StorageAccountCredential", + "Trigger", + "UpdateSummary", + "UploadCertificateRequest", + "UploadCertificateResponse", + "User", + "OperationPaged", + "DataBoxEdgeDevicePaged", + "AlertPaged", + "BandwidthSchedulePaged", + "OrderPaged", + "RolePaged", + "SharePaged", + "StorageAccountCredentialPaged", + "TriggerPaged", + "UserPaged", + "AlertSeverity", + "EncryptionAlgorithm", + "AzureContainerDataFormat", + "DayOfWeek", + "ClientPermissionType", + "SkuName", + "SkuTier", + "DataBoxEdgeDeviceStatus", + "DeviceType", + "RoleTypes", + "PlatformType", + "RoleStatus", + "JobStatus", + "JobType", + "UpdateOperationStage", + "DownloadPhase", + "MetricUnit", + "MetricAggregationType", + "MetricCategory", + "TimeGrain", + "NetworkGroup", + "NetworkAdapterStatus", + "NetworkAdapterRDMAStatus", + "NetworkAdapterDHCPStatus", + "OrderState", + "AuthenticationType", + "ShareStatus", + "MonitoringStatus", + "ShareAccessProtocol", + "ShareAccessType", + "DataPolicy", + "SSLStatus", + "AccountType", + "InstallRebootBehavior", + "UpdateOperation", ] diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address.py index 6cda35b8704a..e0b43ef01247 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address.py @@ -34,29 +34,29 @@ class Address(Model): """ _validation = { - 'address_line1': {'required': True}, - 'postal_code': {'required': True}, - 'city': {'required': True}, - 'state': {'required': True}, - 'country': {'required': True}, + "address_line1": {"required": True}, + "postal_code": {"required": True}, + "city": {"required": True}, + "state": {"required": True}, + "country": {"required": True}, } _attribute_map = { - 'address_line1': {'key': 'addressLine1', 'type': 'str'}, - 'address_line2': {'key': 'addressLine2', 'type': 'str'}, - 'address_line3': {'key': 'addressLine3', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, + "address_line1": {"key": "addressLine1", "type": "str"}, + "address_line2": {"key": "addressLine2", "type": "str"}, + "address_line3": {"key": "addressLine3", "type": "str"}, + "postal_code": {"key": "postalCode", "type": "str"}, + "city": {"key": "city", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "country": {"key": "country", "type": "str"}, } def __init__(self, **kwargs): super(Address, self).__init__(**kwargs) - self.address_line1 = kwargs.get('address_line1', None) - self.address_line2 = kwargs.get('address_line2', None) - self.address_line3 = kwargs.get('address_line3', None) - self.postal_code = kwargs.get('postal_code', None) - self.city = kwargs.get('city', None) - self.state = kwargs.get('state', None) - self.country = kwargs.get('country', None) + self.address_line1 = kwargs.get("address_line1", None) + self.address_line2 = kwargs.get("address_line2", None) + self.address_line3 = kwargs.get("address_line3", None) + self.postal_code = kwargs.get("postal_code", None) + self.city = kwargs.get("city", None) + self.state = kwargs.get("state", None) + self.country = kwargs.get("country", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address_py3.py index 896b43c36f1a..e42dac3db502 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/address_py3.py @@ -34,24 +34,35 @@ class Address(Model): """ _validation = { - 'address_line1': {'required': True}, - 'postal_code': {'required': True}, - 'city': {'required': True}, - 'state': {'required': True}, - 'country': {'required': True}, + "address_line1": {"required": True}, + "postal_code": {"required": True}, + "city": {"required": True}, + "state": {"required": True}, + "country": {"required": True}, } _attribute_map = { - 'address_line1': {'key': 'addressLine1', 'type': 'str'}, - 'address_line2': {'key': 'addressLine2', 'type': 'str'}, - 'address_line3': {'key': 'addressLine3', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, + "address_line1": {"key": "addressLine1", "type": "str"}, + "address_line2": {"key": "addressLine2", "type": "str"}, + "address_line3": {"key": "addressLine3", "type": "str"}, + "postal_code": {"key": "postalCode", "type": "str"}, + "city": {"key": "city", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "country": {"key": "country", "type": "str"}, } - def __init__(self, *, address_line1: str, postal_code: str, city: str, state: str, country: str, address_line2: str=None, address_line3: str=None, **kwargs) -> None: + def __init__( + self, + *, + address_line1: str, + postal_code: str, + city: str, + state: str, + country: str, + address_line2: str = None, + address_line3: str = None, + **kwargs + ) -> None: super(Address, self).__init__(**kwargs) self.address_line1 = address_line1 self.address_line2 = address_line2 diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert.py index 8de192215904..894c77b3f818 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert.py @@ -42,29 +42,29 @@ class Alert(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'alert_type': {'readonly': True}, - 'appeared_at_date_time': {'readonly': True}, - 'recommendation': {'readonly': True}, - 'severity': {'readonly': True}, - 'error_details': {'readonly': True}, - 'detailed_information': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "title": {"readonly": True}, + "alert_type": {"readonly": True}, + "appeared_at_date_time": {"readonly": True}, + "recommendation": {"readonly": True}, + "severity": {"readonly": True}, + "error_details": {"readonly": True}, + "detailed_information": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, - 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, - 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, - 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "title": {"key": "properties.title", "type": "str"}, + "alert_type": {"key": "properties.alertType", "type": "str"}, + "appeared_at_date_time": {"key": "properties.appearedAtDateTime", "type": "iso-8601"}, + "recommendation": {"key": "properties.recommendation", "type": "str"}, + "severity": {"key": "properties.severity", "type": "str"}, + "error_details": {"key": "properties.errorDetails", "type": "AlertErrorDetails"}, + "detailed_information": {"key": "properties.detailedInformation", "type": "{str}"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details.py index 9d7d9fb0bad0..bd59f2d91a68 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details.py @@ -27,15 +27,15 @@ class AlertErrorDetails(Model): """ _validation = { - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'occurrences': {'readonly': True}, + "error_code": {"readonly": True}, + "error_message": {"readonly": True}, + "occurrences": {"readonly": True}, } _attribute_map = { - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'occurrences': {'key': 'occurrences', 'type': 'int'}, + "error_code": {"key": "errorCode", "type": "str"}, + "error_message": {"key": "errorMessage", "type": "str"}, + "occurrences": {"key": "occurrences", "type": "int"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details_py3.py index 451e7cd4f4b1..f20bab1c6fd2 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_error_details_py3.py @@ -27,15 +27,15 @@ class AlertErrorDetails(Model): """ _validation = { - 'error_code': {'readonly': True}, - 'error_message': {'readonly': True}, - 'occurrences': {'readonly': True}, + "error_code": {"readonly": True}, + "error_message": {"readonly": True}, + "occurrences": {"readonly": True}, } _attribute_map = { - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'occurrences': {'key': 'occurrences', 'type': 'int'}, + "error_code": {"key": "errorCode", "type": "str"}, + "error_message": {"key": "errorMessage", "type": "str"}, + "occurrences": {"key": "occurrences", "type": "int"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_paged.py index b5ca06c80575..e6796a895f2e 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_paged.py @@ -18,8 +18,8 @@ class AlertPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[Alert]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_py3.py index 4d5385694042..583f3f7769fa 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/alert_py3.py @@ -42,29 +42,29 @@ class Alert(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'readonly': True}, - 'alert_type': {'readonly': True}, - 'appeared_at_date_time': {'readonly': True}, - 'recommendation': {'readonly': True}, - 'severity': {'readonly': True}, - 'error_details': {'readonly': True}, - 'detailed_information': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "title": {"readonly": True}, + "alert_type": {"readonly": True}, + "appeared_at_date_time": {"readonly": True}, + "recommendation": {"readonly": True}, + "severity": {"readonly": True}, + "error_details": {"readonly": True}, + "detailed_information": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, - 'appeared_at_date_time': {'key': 'properties.appearedAtDateTime', 'type': 'iso-8601'}, - 'recommendation': {'key': 'properties.recommendation', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'error_details': {'key': 'properties.errorDetails', 'type': 'AlertErrorDetails'}, - 'detailed_information': {'key': 'properties.detailedInformation', 'type': '{str}'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "title": {"key": "properties.title", "type": "str"}, + "alert_type": {"key": "properties.alertType", "type": "str"}, + "appeared_at_date_time": {"key": "properties.appearedAtDateTime", "type": "iso-8601"}, + "recommendation": {"key": "properties.recommendation", "type": "str"}, + "severity": {"key": "properties.severity", "type": "str"}, + "error_details": {"key": "properties.errorDetails", "type": "AlertErrorDetails"}, + "detailed_information": {"key": "properties.detailedInformation", "type": "{str}"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model.py index f39e1dbb0f14..b4e0ec1fbc60 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model.py @@ -27,15 +27,15 @@ class ARMBaseModel(Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model_py3.py index e71eccdf2fba..26056ee71a6a 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model_py3.py @@ -27,15 +27,15 @@ class ARMBaseModel(Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret.py index 4cf666712147..0b3005fcc67c 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret.py @@ -29,18 +29,18 @@ class AsymmetricEncryptedSecret(Model): """ _validation = { - 'value': {'required': True}, - 'encryption_algorithm': {'required': True}, + "value": {"required": True}, + "encryption_algorithm": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "encryption_cert_thumbprint": {"key": "encryptionCertThumbprint", "type": "str"}, + "encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"}, } def __init__(self, **kwargs): super(AsymmetricEncryptedSecret, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.encryption_cert_thumbprint = kwargs.get('encryption_cert_thumbprint', None) - self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + self.value = kwargs.get("value", None) + self.encryption_cert_thumbprint = kwargs.get("encryption_cert_thumbprint", None) + self.encryption_algorithm = kwargs.get("encryption_algorithm", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret_py3.py index 4ca1f3f2a7b8..c08f961896e7 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/asymmetric_encrypted_secret_py3.py @@ -29,17 +29,17 @@ class AsymmetricEncryptedSecret(Model): """ _validation = { - 'value': {'required': True}, - 'encryption_algorithm': {'required': True}, + "value": {"required": True}, + "encryption_algorithm": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'encryption_cert_thumbprint': {'key': 'encryptionCertThumbprint', 'type': 'str'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "encryption_cert_thumbprint": {"key": "encryptionCertThumbprint", "type": "str"}, + "encryption_algorithm": {"key": "encryptionAlgorithm", "type": "str"}, } - def __init__(self, *, value: str, encryption_algorithm, encryption_cert_thumbprint: str=None, **kwargs) -> None: + def __init__(self, *, value: str, encryption_algorithm, encryption_cert_thumbprint: str = None, **kwargs) -> None: super(AsymmetricEncryptedSecret, self).__init__(**kwargs) self.value = value self.encryption_cert_thumbprint = encryption_cert_thumbprint diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication.py index 8603425122cb..3eaddb09d37b 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication.py @@ -20,9 +20,9 @@ class Authentication(Model): """ _attribute_map = { - 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + "symmetric_key": {"key": "symmetricKey", "type": "SymmetricKey"}, } def __init__(self, **kwargs): super(Authentication, self).__init__(**kwargs) - self.symmetric_key = kwargs.get('symmetric_key', None) + self.symmetric_key = kwargs.get("symmetric_key", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication_py3.py index 72e041f7088c..55b572e6d0c0 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/authentication_py3.py @@ -20,7 +20,7 @@ class Authentication(Model): """ _attribute_map = { - 'symmetric_key': {'key': 'symmetricKey', 'type': 'SymmetricKey'}, + "symmetric_key": {"key": "symmetricKey", "type": "SymmetricKey"}, } def __init__(self, *, symmetric_key=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info.py index 3631d919ab8c..4632f0be2c91 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info.py @@ -31,19 +31,19 @@ class AzureContainerInfo(Model): """ _validation = { - 'storage_account_credential_id': {'required': True}, - 'container_name': {'required': True}, - 'data_format': {'required': True}, + "storage_account_credential_id": {"required": True}, + "container_name": {"required": True}, + "data_format": {"required": True}, } _attribute_map = { - 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'data_format': {'key': 'dataFormat', 'type': 'str'}, + "storage_account_credential_id": {"key": "storageAccountCredentialId", "type": "str"}, + "container_name": {"key": "containerName", "type": "str"}, + "data_format": {"key": "dataFormat", "type": "str"}, } def __init__(self, **kwargs): super(AzureContainerInfo, self).__init__(**kwargs) - self.storage_account_credential_id = kwargs.get('storage_account_credential_id', None) - self.container_name = kwargs.get('container_name', None) - self.data_format = kwargs.get('data_format', None) + self.storage_account_credential_id = kwargs.get("storage_account_credential_id", None) + self.container_name = kwargs.get("container_name", None) + self.data_format = kwargs.get("data_format", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info_py3.py index 1d0ae45ef302..83a6855ff45e 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/azure_container_info_py3.py @@ -31,15 +31,15 @@ class AzureContainerInfo(Model): """ _validation = { - 'storage_account_credential_id': {'required': True}, - 'container_name': {'required': True}, - 'data_format': {'required': True}, + "storage_account_credential_id": {"required": True}, + "container_name": {"required": True}, + "data_format": {"required": True}, } _attribute_map = { - 'storage_account_credential_id': {'key': 'storageAccountCredentialId', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'data_format': {'key': 'dataFormat', 'type': 'str'}, + "storage_account_credential_id": {"key": "storageAccountCredentialId", "type": "str"}, + "container_name": {"key": "containerName", "type": "str"}, + "data_format": {"key": "dataFormat", "type": "str"}, } def __init__(self, *, storage_account_credential_id: str, container_name: str, data_format, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule.py index ea807206d6ac..96a0e93374b4 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule.py @@ -38,28 +38,28 @@ class BandwidthSchedule(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start': {'required': True}, - 'stop': {'required': True}, - 'rate_in_mbps': {'required': True}, - 'days': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "start": {"required": True}, + "stop": {"required": True}, + "rate_in_mbps": {"required": True}, + "days": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start': {'key': 'properties.start', 'type': 'str'}, - 'stop': {'key': 'properties.stop', 'type': 'str'}, - 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, - 'days': {'key': 'properties.days', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "start": {"key": "properties.start", "type": "str"}, + "stop": {"key": "properties.stop", "type": "str"}, + "rate_in_mbps": {"key": "properties.rateInMbps", "type": "int"}, + "days": {"key": "properties.days", "type": "[str]"}, } def __init__(self, **kwargs): super(BandwidthSchedule, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.stop = kwargs.get('stop', None) - self.rate_in_mbps = kwargs.get('rate_in_mbps', None) - self.days = kwargs.get('days', None) + self.start = kwargs.get("start", None) + self.stop = kwargs.get("stop", None) + self.rate_in_mbps = kwargs.get("rate_in_mbps", None) + self.days = kwargs.get("days", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_paged.py index 9cc6eba420e4..1d1378517b4f 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_paged.py @@ -18,8 +18,8 @@ class BandwidthSchedulePaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BandwidthSchedule]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[BandwidthSchedule]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_py3.py index 1dc00b7f45d6..eddd8a4193c3 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/bandwidth_schedule_py3.py @@ -38,23 +38,23 @@ class BandwidthSchedule(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start': {'required': True}, - 'stop': {'required': True}, - 'rate_in_mbps': {'required': True}, - 'days': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "start": {"required": True}, + "stop": {"required": True}, + "rate_in_mbps": {"required": True}, + "days": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start': {'key': 'properties.start', 'type': 'str'}, - 'stop': {'key': 'properties.stop', 'type': 'str'}, - 'rate_in_mbps': {'key': 'properties.rateInMbps', 'type': 'int'}, - 'days': {'key': 'properties.days', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "start": {"key": "properties.start", "type": "str"}, + "stop": {"key": "properties.stop", "type": "str"}, + "rate_in_mbps": {"key": "properties.rateInMbps", "type": "int"}, + "days": {"key": "properties.days", "type": "[str]"}, } def __init__(self, *, start: str, stop: str, rate_in_mbps: int, days, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right.py index 8c85bce72022..64066956d6c7 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right.py @@ -27,16 +27,16 @@ class ClientAccessRight(Model): """ _validation = { - 'client': {'required': True}, - 'access_permission': {'required': True}, + "client": {"required": True}, + "access_permission": {"required": True}, } _attribute_map = { - 'client': {'key': 'client', 'type': 'str'}, - 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + "client": {"key": "client", "type": "str"}, + "access_permission": {"key": "accessPermission", "type": "str"}, } def __init__(self, **kwargs): super(ClientAccessRight, self).__init__(**kwargs) - self.client = kwargs.get('client', None) - self.access_permission = kwargs.get('access_permission', None) + self.client = kwargs.get("client", None) + self.access_permission = kwargs.get("access_permission", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right_py3.py index bb2054758461..bf4efda5351d 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/client_access_right_py3.py @@ -27,13 +27,13 @@ class ClientAccessRight(Model): """ _validation = { - 'client': {'required': True}, - 'access_permission': {'required': True}, + "client": {"required": True}, + "access_permission": {"required": True}, } _attribute_map = { - 'client': {'key': 'client', 'type': 'str'}, - 'access_permission': {'key': 'accessPermission', 'type': 'str'}, + "client": {"key": "client", "type": "str"}, + "access_permission": {"key": "accessPermission", "type": "str"}, } def __init__(self, *, client: str, access_permission, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details.py index 75871a75896a..86c66586f258 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details.py @@ -28,22 +28,22 @@ class ContactDetails(Model): """ _validation = { - 'contact_person': {'required': True}, - 'company_name': {'required': True}, - 'phone': {'required': True}, - 'email_list': {'required': True}, + "contact_person": {"required": True}, + "company_name": {"required": True}, + "phone": {"required": True}, + "email_list": {"required": True}, } _attribute_map = { - 'contact_person': {'key': 'contactPerson', 'type': 'str'}, - 'company_name': {'key': 'companyName', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - 'email_list': {'key': 'emailList', 'type': '[str]'}, + "contact_person": {"key": "contactPerson", "type": "str"}, + "company_name": {"key": "companyName", "type": "str"}, + "phone": {"key": "phone", "type": "str"}, + "email_list": {"key": "emailList", "type": "[str]"}, } def __init__(self, **kwargs): super(ContactDetails, self).__init__(**kwargs) - self.contact_person = kwargs.get('contact_person', None) - self.company_name = kwargs.get('company_name', None) - self.phone = kwargs.get('phone', None) - self.email_list = kwargs.get('email_list', None) + self.contact_person = kwargs.get("contact_person", None) + self.company_name = kwargs.get("company_name", None) + self.phone = kwargs.get("phone", None) + self.email_list = kwargs.get("email_list", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details_py3.py index 7e86471e8358..b424fd4f8988 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/contact_details_py3.py @@ -28,17 +28,17 @@ class ContactDetails(Model): """ _validation = { - 'contact_person': {'required': True}, - 'company_name': {'required': True}, - 'phone': {'required': True}, - 'email_list': {'required': True}, + "contact_person": {"required": True}, + "company_name": {"required": True}, + "phone": {"required": True}, + "email_list": {"required": True}, } _attribute_map = { - 'contact_person': {'key': 'contactPerson', 'type': 'str'}, - 'company_name': {'key': 'companyName', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - 'email_list': {'key': 'emailList', 'type': '[str]'}, + "contact_person": {"key": "contactPerson", "type": "str"}, + "company_name": {"key": "companyName", "type": "str"}, + "phone": {"key": "phone", "type": "str"}, + "email_list": {"key": "emailList", "type": "[str]"}, } def __init__(self, *, contact_person: str, company_name: str, phone: str, email_list, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device.py index ebdbb7a07241..1df7257ff97b 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device.py @@ -77,56 +77,56 @@ class DataBoxEdgeDevice(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'serial_number': {'readonly': True}, - 'device_type': {'readonly': True}, - 'culture': {'readonly': True}, - 'device_model': {'readonly': True}, - 'device_software_version': {'readonly': True}, - 'device_local_capacity': {'readonly': True}, - 'time_zone': {'readonly': True}, - 'device_hcs_version': {'readonly': True}, - 'configured_role_types': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "location": {"required": True}, + "serial_number": {"readonly": True}, + "device_type": {"readonly": True}, + "culture": {"readonly": True}, + "device_model": {"readonly": True}, + "device_software_version": {"readonly": True}, + "device_local_capacity": {"readonly": True}, + "time_zone": {"readonly": True}, + "device_hcs_version": {"readonly": True}, + "configured_role_types": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, - 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, - 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, - 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'culture': {'key': 'properties.culture', 'type': 'str'}, - 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, - 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, - 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, - 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, - 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, - 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "sku": {"key": "sku", "type": "Sku"}, + "etag": {"key": "etag", "type": "str"}, + "data_box_edge_device_status": {"key": "properties.dataBoxEdgeDeviceStatus", "type": "str"}, + "serial_number": {"key": "properties.serialNumber", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "model_description": {"key": "properties.modelDescription", "type": "str"}, + "device_type": {"key": "properties.deviceType", "type": "str"}, + "friendly_name": {"key": "properties.friendlyName", "type": "str"}, + "culture": {"key": "properties.culture", "type": "str"}, + "device_model": {"key": "properties.deviceModel", "type": "str"}, + "device_software_version": {"key": "properties.deviceSoftwareVersion", "type": "str"}, + "device_local_capacity": {"key": "properties.deviceLocalCapacity", "type": "long"}, + "time_zone": {"key": "properties.timeZone", "type": "str"}, + "device_hcs_version": {"key": "properties.deviceHcsVersion", "type": "str"}, + "configured_role_types": {"key": "properties.configuredRoleTypes", "type": "[str]"}, } def __init__(self, **kwargs): super(DataBoxEdgeDevice, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.data_box_edge_device_status = kwargs.get('data_box_edge_device_status', None) + self.location = kwargs.get("location", None) + self.tags = kwargs.get("tags", None) + self.sku = kwargs.get("sku", None) + self.etag = kwargs.get("etag", None) + self.data_box_edge_device_status = kwargs.get("data_box_edge_device_status", None) self.serial_number = None - self.description = kwargs.get('description', None) - self.model_description = kwargs.get('model_description', None) + self.description = kwargs.get("description", None) + self.model_description = kwargs.get("model_description", None) self.device_type = None - self.friendly_name = kwargs.get('friendly_name', None) + self.friendly_name = kwargs.get("friendly_name", None) self.culture = None self.device_model = None self.device_software_version = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info.py index 8d11f43b37e3..e605385dab07 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info.py @@ -35,23 +35,23 @@ class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_key': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource_key": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, - 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, - 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "encryption_key_thumbprint": {"key": "properties.encryptionKeyThumbprint", "type": "str"}, + "encryption_key": {"key": "properties.encryptionKey", "type": "str"}, + "resource_key": {"key": "properties.resourceKey", "type": "str"}, } def __init__(self, **kwargs): super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) - self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None) - self.encryption_key = kwargs.get('encryption_key', None) + self.encryption_key_thumbprint = kwargs.get("encryption_key_thumbprint", None) + self.encryption_key = kwargs.get("encryption_key", None) self.resource_key = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info_py3.py index 1ee1b1a98ed1..785082038be0 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_extended_info_py3.py @@ -35,22 +35,22 @@ class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_key': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "resource_key": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, - 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, - 'resource_key': {'key': 'properties.resourceKey', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "encryption_key_thumbprint": {"key": "properties.encryptionKeyThumbprint", "type": "str"}, + "encryption_key": {"key": "properties.encryptionKey", "type": "str"}, + "resource_key": {"key": "properties.resourceKey", "type": "str"}, } - def __init__(self, *, encryption_key_thumbprint: str=None, encryption_key: str=None, **kwargs) -> None: + def __init__(self, *, encryption_key_thumbprint: str = None, encryption_key: str = None, **kwargs) -> None: super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs) self.encryption_key_thumbprint = encryption_key_thumbprint self.encryption_key = encryption_key diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_paged.py index 7793ec22a75d..3bf9705b8118 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_paged.py @@ -18,8 +18,8 @@ class DataBoxEdgeDevicePaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataBoxEdgeDevice]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[DataBoxEdgeDevice]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch.py index 85881d55e8b8..21083ee24355 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch.py @@ -20,9 +20,9 @@ class DataBoxEdgeDevicePatch(Model): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__(self, **kwargs): super(DataBoxEdgeDevicePatch, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) + self.tags = kwargs.get("tags", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch_py3.py index bd4175f6de7f..eaef76ee4f2d 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_patch_py3.py @@ -20,7 +20,7 @@ class DataBoxEdgeDevicePatch(Model): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__(self, *, tags=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_py3.py index 0ecbff1d8bc8..1d422a11def2 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/data_box_edge_device_py3.py @@ -77,45 +77,57 @@ class DataBoxEdgeDevice(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'serial_number': {'readonly': True}, - 'device_type': {'readonly': True}, - 'culture': {'readonly': True}, - 'device_model': {'readonly': True}, - 'device_software_version': {'readonly': True}, - 'device_local_capacity': {'readonly': True}, - 'time_zone': {'readonly': True}, - 'device_hcs_version': {'readonly': True}, - 'configured_role_types': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "location": {"required": True}, + "serial_number": {"readonly": True}, + "device_type": {"readonly": True}, + "culture": {"readonly": True}, + "device_model": {"readonly": True}, + "device_software_version": {"readonly": True}, + "device_local_capacity": {"readonly": True}, + "time_zone": {"readonly": True}, + "device_hcs_version": {"readonly": True}, + "configured_role_types": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'data_box_edge_device_status': {'key': 'properties.dataBoxEdgeDeviceStatus', 'type': 'str'}, - 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'model_description': {'key': 'properties.modelDescription', 'type': 'str'}, - 'device_type': {'key': 'properties.deviceType', 'type': 'str'}, - 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'culture': {'key': 'properties.culture', 'type': 'str'}, - 'device_model': {'key': 'properties.deviceModel', 'type': 'str'}, - 'device_software_version': {'key': 'properties.deviceSoftwareVersion', 'type': 'str'}, - 'device_local_capacity': {'key': 'properties.deviceLocalCapacity', 'type': 'long'}, - 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, - 'device_hcs_version': {'key': 'properties.deviceHcsVersion', 'type': 'str'}, - 'configured_role_types': {'key': 'properties.configuredRoleTypes', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "sku": {"key": "sku", "type": "Sku"}, + "etag": {"key": "etag", "type": "str"}, + "data_box_edge_device_status": {"key": "properties.dataBoxEdgeDeviceStatus", "type": "str"}, + "serial_number": {"key": "properties.serialNumber", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "model_description": {"key": "properties.modelDescription", "type": "str"}, + "device_type": {"key": "properties.deviceType", "type": "str"}, + "friendly_name": {"key": "properties.friendlyName", "type": "str"}, + "culture": {"key": "properties.culture", "type": "str"}, + "device_model": {"key": "properties.deviceModel", "type": "str"}, + "device_software_version": {"key": "properties.deviceSoftwareVersion", "type": "str"}, + "device_local_capacity": {"key": "properties.deviceLocalCapacity", "type": "long"}, + "time_zone": {"key": "properties.timeZone", "type": "str"}, + "device_hcs_version": {"key": "properties.deviceHcsVersion", "type": "str"}, + "configured_role_types": {"key": "properties.configuredRoleTypes", "type": "[str]"}, } - def __init__(self, *, location: str, tags=None, sku=None, etag: str=None, data_box_edge_device_status=None, description: str=None, model_description: str=None, friendly_name: str=None, **kwargs) -> None: + def __init__( + self, + *, + location: str, + tags=None, + sku=None, + etag: str = None, + data_box_edge_device_status=None, + description: str = None, + model_description: str = None, + friendly_name: str = None, + **kwargs + ) -> None: super(DataBoxEdgeDevice, self).__init__(**kwargs) self.location = location self.tags = tags diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger.py index 6210a7bd0de8..bf3568c19a97 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger.py @@ -40,27 +40,27 @@ class FileEventTrigger(Trigger): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'source_info': {'required': True}, - 'sink_info': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + "source_info": {"required": True}, + "sink_info": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, - 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, - 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "source_info": {"key": "properties.sourceInfo", "type": "FileSourceInfo"}, + "sink_info": {"key": "properties.sinkInfo", "type": "RoleSinkInfo"}, + "custom_context_tag": {"key": "properties.customContextTag", "type": "str"}, } def __init__(self, **kwargs): super(FileEventTrigger, self).__init__(**kwargs) - self.source_info = kwargs.get('source_info', None) - self.sink_info = kwargs.get('sink_info', None) - self.custom_context_tag = kwargs.get('custom_context_tag', None) - self.kind = 'FileEvent' + self.source_info = kwargs.get("source_info", None) + self.sink_info = kwargs.get("sink_info", None) + self.custom_context_tag = kwargs.get("custom_context_tag", None) + self.kind = "FileEvent" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger_py3.py index adc8552d4041..fdae3753f193 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_event_trigger_py3.py @@ -40,27 +40,27 @@ class FileEventTrigger(Trigger): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'source_info': {'required': True}, - 'sink_info': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + "source_info": {"required": True}, + "sink_info": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'source_info': {'key': 'properties.sourceInfo', 'type': 'FileSourceInfo'}, - 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, - 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "source_info": {"key": "properties.sourceInfo", "type": "FileSourceInfo"}, + "sink_info": {"key": "properties.sinkInfo", "type": "RoleSinkInfo"}, + "custom_context_tag": {"key": "properties.customContextTag", "type": "str"}, } - def __init__(self, *, source_info, sink_info, custom_context_tag: str=None, **kwargs) -> None: + def __init__(self, *, source_info, sink_info, custom_context_tag: str = None, **kwargs) -> None: super(FileEventTrigger, self).__init__(**kwargs) self.source_info = source_info self.sink_info = sink_info self.custom_context_tag = custom_context_tag - self.kind = 'FileEvent' + self.kind = "FileEvent" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info.py index a88b1ecdaf64..999c66e60923 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info.py @@ -22,13 +22,13 @@ class FileSourceInfo(Model): """ _validation = { - 'share_id': {'required': True}, + "share_id": {"required": True}, } _attribute_map = { - 'share_id': {'key': 'shareId', 'type': 'str'}, + "share_id": {"key": "shareId", "type": "str"}, } def __init__(self, **kwargs): super(FileSourceInfo, self).__init__(**kwargs) - self.share_id = kwargs.get('share_id', None) + self.share_id = kwargs.get("share_id", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info_py3.py index 9ec92bb1c17f..6345674b35df 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/file_source_info_py3.py @@ -22,11 +22,11 @@ class FileSourceInfo(Model): """ _validation = { - 'share_id': {'required': True}, + "share_id": {"required": True}, } _attribute_map = { - 'share_id': {'key': 'shareId', 'type': 'str'}, + "share_id": {"key": "shareId", "type": "str"}, } def __init__(self, *, share_id: str, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info.py index edaaec972b02..fafdd0357534 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info.py @@ -27,18 +27,18 @@ class IoTDeviceInfo(Model): """ _validation = { - 'device_id': {'required': True}, - 'io_thost_hub': {'required': True}, + "device_id": {"required": True}, + "io_thost_hub": {"required": True}, } _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, - 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + "device_id": {"key": "deviceId", "type": "str"}, + "io_thost_hub": {"key": "ioTHostHub", "type": "str"}, + "authentication": {"key": "authentication", "type": "Authentication"}, } def __init__(self, **kwargs): super(IoTDeviceInfo, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.io_thost_hub = kwargs.get('io_thost_hub', None) - self.authentication = kwargs.get('authentication', None) + self.device_id = kwargs.get("device_id", None) + self.io_thost_hub = kwargs.get("io_thost_hub", None) + self.authentication = kwargs.get("authentication", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info_py3.py index 34617b78a844..34eb12147285 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_tdevice_info_py3.py @@ -27,14 +27,14 @@ class IoTDeviceInfo(Model): """ _validation = { - 'device_id': {'required': True}, - 'io_thost_hub': {'required': True}, + "device_id": {"required": True}, + "io_thost_hub": {"required": True}, } _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'io_thost_hub': {'key': 'ioTHostHub', 'type': 'str'}, - 'authentication': {'key': 'authentication', 'type': 'Authentication'}, + "device_id": {"key": "deviceId", "type": "str"}, + "io_thost_hub": {"key": "ioTHostHub", "type": "str"}, + "authentication": {"key": "authentication", "type": "Authentication"}, } def __init__(self, *, device_id: str, io_thost_hub: str, authentication=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole.py index f31e62c9f985..230b5e0bedf3 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole.py @@ -46,33 +46,33 @@ class IoTRole(Role): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'host_platform': {'required': True}, - 'io_tdevice_details': {'required': True}, - 'io_tedge_device_details': {'required': True}, - 'role_status': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + "host_platform": {"required": True}, + "io_tdevice_details": {"required": True}, + "io_tedge_device_details": {"required": True}, + "role_status": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, - 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, - 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, - 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, - 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "host_platform": {"key": "properties.hostPlatform", "type": "str"}, + "io_tdevice_details": {"key": "properties.ioTDeviceDetails", "type": "IoTDeviceInfo"}, + "io_tedge_device_details": {"key": "properties.ioTEdgeDeviceDetails", "type": "IoTDeviceInfo"}, + "share_mappings": {"key": "properties.shareMappings", "type": "[MountPointMap]"}, + "role_status": {"key": "properties.roleStatus", "type": "str"}, } def __init__(self, **kwargs): super(IoTRole, self).__init__(**kwargs) - self.host_platform = kwargs.get('host_platform', None) - self.io_tdevice_details = kwargs.get('io_tdevice_details', None) - self.io_tedge_device_details = kwargs.get('io_tedge_device_details', None) - self.share_mappings = kwargs.get('share_mappings', None) - self.role_status = kwargs.get('role_status', None) - self.kind = 'IOT' + self.host_platform = kwargs.get("host_platform", None) + self.io_tdevice_details = kwargs.get("io_tdevice_details", None) + self.io_tedge_device_details = kwargs.get("io_tedge_device_details", None) + self.share_mappings = kwargs.get("share_mappings", None) + self.role_status = kwargs.get("role_status", None) + self.kind = "IOT" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole_py3.py index a5c160fff7e0..ce9d2066fbcd 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/io_trole_py3.py @@ -46,33 +46,35 @@ class IoTRole(Role): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'host_platform': {'required': True}, - 'io_tdevice_details': {'required': True}, - 'io_tedge_device_details': {'required': True}, - 'role_status': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + "host_platform": {"required": True}, + "io_tdevice_details": {"required": True}, + "io_tedge_device_details": {"required": True}, + "role_status": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'host_platform': {'key': 'properties.hostPlatform', 'type': 'str'}, - 'io_tdevice_details': {'key': 'properties.ioTDeviceDetails', 'type': 'IoTDeviceInfo'}, - 'io_tedge_device_details': {'key': 'properties.ioTEdgeDeviceDetails', 'type': 'IoTDeviceInfo'}, - 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, - 'role_status': {'key': 'properties.roleStatus', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "host_platform": {"key": "properties.hostPlatform", "type": "str"}, + "io_tdevice_details": {"key": "properties.ioTDeviceDetails", "type": "IoTDeviceInfo"}, + "io_tedge_device_details": {"key": "properties.ioTEdgeDeviceDetails", "type": "IoTDeviceInfo"}, + "share_mappings": {"key": "properties.shareMappings", "type": "[MountPointMap]"}, + "role_status": {"key": "properties.roleStatus", "type": "str"}, } - def __init__(self, *, host_platform, io_tdevice_details, io_tedge_device_details, role_status, share_mappings=None, **kwargs) -> None: + def __init__( + self, *, host_platform, io_tdevice_details, io_tedge_device_details, role_status, share_mappings=None, **kwargs + ) -> None: super(IoTRole, self).__init__(**kwargs) self.host_platform = host_platform self.io_tdevice_details = io_tdevice_details self.io_tedge_device_details = io_tedge_device_details self.share_mappings = share_mappings self.role_status = role_status - self.kind = 'IOT' + self.kind = "IOT" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config.py index 939985a3d639..e6f39fff9bb5 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config.py @@ -27,15 +27,15 @@ class Ipv4Config(Model): """ _validation = { - 'ip_address': {'readonly': True}, - 'subnet': {'readonly': True}, - 'gateway': {'readonly': True}, + "ip_address": {"readonly": True}, + "subnet": {"readonly": True}, + "gateway": {"readonly": True}, } _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'str'}, - 'gateway': {'key': 'gateway', 'type': 'str'}, + "ip_address": {"key": "ipAddress", "type": "str"}, + "subnet": {"key": "subnet", "type": "str"}, + "gateway": {"key": "gateway", "type": "str"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config_py3.py index b1c09fa5e7a7..aa8efc828e9a 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv4_config_py3.py @@ -27,15 +27,15 @@ class Ipv4Config(Model): """ _validation = { - 'ip_address': {'readonly': True}, - 'subnet': {'readonly': True}, - 'gateway': {'readonly': True}, + "ip_address": {"readonly": True}, + "subnet": {"readonly": True}, + "gateway": {"readonly": True}, } _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'str'}, - 'gateway': {'key': 'gateway', 'type': 'str'}, + "ip_address": {"key": "ipAddress", "type": "str"}, + "subnet": {"key": "subnet", "type": "str"}, + "gateway": {"key": "gateway", "type": "str"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config.py index e47bd5829542..d6f4bc4152fd 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config.py @@ -27,15 +27,15 @@ class Ipv6Config(Model): """ _validation = { - 'ip_address': {'readonly': True}, - 'prefix_length': {'readonly': True}, - 'gateway': {'readonly': True}, + "ip_address": {"readonly": True}, + "prefix_length": {"readonly": True}, + "gateway": {"readonly": True}, } _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, - 'gateway': {'key': 'gateway', 'type': 'str'}, + "ip_address": {"key": "ipAddress", "type": "str"}, + "prefix_length": {"key": "prefixLength", "type": "int"}, + "gateway": {"key": "gateway", "type": "str"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config_py3.py index 7dce0b060798..99efb8fd9f98 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/ipv6_config_py3.py @@ -27,15 +27,15 @@ class Ipv6Config(Model): """ _validation = { - 'ip_address': {'readonly': True}, - 'prefix_length': {'readonly': True}, - 'gateway': {'readonly': True}, + "ip_address": {"readonly": True}, + "prefix_length": {"readonly": True}, + "gateway": {"readonly": True}, } _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, - 'gateway': {'key': 'gateway', 'type': 'str'}, + "ip_address": {"key": "ipAddress", "type": "str"}, + "prefix_length": {"key": "prefixLength", "type": "int"}, + "gateway": {"key": "gateway", "type": "str"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job.py index 85f8115ad83d..dba31f12e600 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job.py @@ -66,40 +66,40 @@ class Job(Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'error': {'readonly': True}, - 'job_type': {'readonly': True}, - 'current_stage': {'readonly': True}, - 'download_progress': {'readonly': True}, - 'install_progress': {'readonly': True}, - 'total_refresh_errors': {'readonly': True}, - 'error_manifest_file': {'readonly': True}, - 'share_id': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "status": {"readonly": True}, + "start_time": {"readonly": True}, + "end_time": {"readonly": True}, + "percent_complete": {"readonly": True}, + "error": {"readonly": True}, + "job_type": {"readonly": True}, + "current_stage": {"readonly": True}, + "download_progress": {"readonly": True}, + "install_progress": {"readonly": True}, + "total_refresh_errors": {"readonly": True}, + "error_manifest_file": {"readonly": True}, + "share_id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'error': {'key': 'error', 'type': 'JobErrorDetails'}, - 'job_type': {'key': 'properties.jobType', 'type': 'str'}, - 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, - 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, - 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, - 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, - 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, - 'share_id': {'key': 'properties.shareId', 'type': 'str'}, - 'folder': {'key': 'properties.folder', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "percent_complete": {"key": "percentComplete", "type": "int"}, + "error": {"key": "error", "type": "JobErrorDetails"}, + "job_type": {"key": "properties.jobType", "type": "str"}, + "current_stage": {"key": "properties.currentStage", "type": "str"}, + "download_progress": {"key": "properties.downloadProgress", "type": "UpdateDownloadProgress"}, + "install_progress": {"key": "properties.installProgress", "type": "UpdateInstallProgress"}, + "total_refresh_errors": {"key": "properties.totalRefreshErrors", "type": "int"}, + "error_manifest_file": {"key": "properties.errorManifestFile", "type": "str"}, + "share_id": {"key": "properties.shareId", "type": "str"}, + "folder": {"key": "properties.folder", "type": "str"}, } def __init__(self, **kwargs): @@ -119,4 +119,4 @@ def __init__(self, **kwargs): self.total_refresh_errors = None self.error_manifest_file = None self.share_id = None - self.folder = kwargs.get('folder', None) + self.folder = kwargs.get("folder", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details.py index 4e2b6ca58bec..ddd0fbd5418f 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details.py @@ -27,15 +27,15 @@ class JobErrorDetails(Model): """ _validation = { - 'error_details': {'readonly': True}, - 'code': {'readonly': True}, - 'message': {'readonly': True}, + "error_details": {"readonly": True}, + "code": {"readonly": True}, + "message": {"readonly": True}, } _attribute_map = { - 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "error_details": {"key": "errorDetails", "type": "[JobErrorItem]"}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details_py3.py index cf605155a023..eb3c229c3640 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_details_py3.py @@ -27,15 +27,15 @@ class JobErrorDetails(Model): """ _validation = { - 'error_details': {'readonly': True}, - 'code': {'readonly': True}, - 'message': {'readonly': True}, + "error_details": {"readonly": True}, + "code": {"readonly": True}, + "message": {"readonly": True}, } _attribute_map = { - 'error_details': {'key': 'errorDetails', 'type': '[JobErrorItem]'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "error_details": {"key": "errorDetails", "type": "[JobErrorItem]"}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item.py index 1ed7a3afbb14..78599019d12b 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item.py @@ -27,15 +27,15 @@ class JobErrorItem(Model): """ _validation = { - 'recommendations': {'readonly': True}, - 'code': {'readonly': True}, - 'message': {'readonly': True}, + "recommendations": {"readonly": True}, + "code": {"readonly": True}, + "message": {"readonly": True}, } _attribute_map = { - 'recommendations': {'key': 'recommendations', 'type': '[str]'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "recommendations": {"key": "recommendations", "type": "[str]"}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item_py3.py index c36d5676fed9..4484f0471b4b 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_error_item_py3.py @@ -27,15 +27,15 @@ class JobErrorItem(Model): """ _validation = { - 'recommendations': {'readonly': True}, - 'code': {'readonly': True}, - 'message': {'readonly': True}, + "recommendations": {"readonly": True}, + "code": {"readonly": True}, + "message": {"readonly": True}, } _attribute_map = { - 'recommendations': {'key': 'recommendations', 'type': '[str]'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "recommendations": {"key": "recommendations", "type": "[str]"}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_py3.py index c05227ad5db6..eaaa8ce183a6 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/job_py3.py @@ -66,43 +66,43 @@ class Job(Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'error': {'readonly': True}, - 'job_type': {'readonly': True}, - 'current_stage': {'readonly': True}, - 'download_progress': {'readonly': True}, - 'install_progress': {'readonly': True}, - 'total_refresh_errors': {'readonly': True}, - 'error_manifest_file': {'readonly': True}, - 'share_id': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "status": {"readonly": True}, + "start_time": {"readonly": True}, + "end_time": {"readonly": True}, + "percent_complete": {"readonly": True}, + "error": {"readonly": True}, + "job_type": {"readonly": True}, + "current_stage": {"readonly": True}, + "download_progress": {"readonly": True}, + "install_progress": {"readonly": True}, + "total_refresh_errors": {"readonly": True}, + "error_manifest_file": {"readonly": True}, + "share_id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'error': {'key': 'error', 'type': 'JobErrorDetails'}, - 'job_type': {'key': 'properties.jobType', 'type': 'str'}, - 'current_stage': {'key': 'properties.currentStage', 'type': 'str'}, - 'download_progress': {'key': 'properties.downloadProgress', 'type': 'UpdateDownloadProgress'}, - 'install_progress': {'key': 'properties.installProgress', 'type': 'UpdateInstallProgress'}, - 'total_refresh_errors': {'key': 'properties.totalRefreshErrors', 'type': 'int'}, - 'error_manifest_file': {'key': 'properties.errorManifestFile', 'type': 'str'}, - 'share_id': {'key': 'properties.shareId', 'type': 'str'}, - 'folder': {'key': 'properties.folder', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "percent_complete": {"key": "percentComplete", "type": "int"}, + "error": {"key": "error", "type": "JobErrorDetails"}, + "job_type": {"key": "properties.jobType", "type": "str"}, + "current_stage": {"key": "properties.currentStage", "type": "str"}, + "download_progress": {"key": "properties.downloadProgress", "type": "UpdateDownloadProgress"}, + "install_progress": {"key": "properties.installProgress", "type": "UpdateInstallProgress"}, + "total_refresh_errors": {"key": "properties.totalRefreshErrors", "type": "int"}, + "error_manifest_file": {"key": "properties.errorManifestFile", "type": "str"}, + "share_id": {"key": "properties.shareId", "type": "str"}, + "folder": {"key": "properties.folder", "type": "str"}, } - def __init__(self, *, folder: str=None, **kwargs) -> None: + def __init__(self, *, folder: str = None, **kwargs) -> None: super(Job, self).__init__(**kwargs) self.id = None self.name = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1.py index 4ca1ba83f65f..7bb0eb28643a 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1.py @@ -24,13 +24,13 @@ class MetricDimensionV1(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "to_be_exported_for_shoebox": {"key": "toBeExportedForShoebox", "type": "bool"}, } def __init__(self, **kwargs): super(MetricDimensionV1, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + self.name = kwargs.get("name", None) + self.display_name = kwargs.get("display_name", None) + self.to_be_exported_for_shoebox = kwargs.get("to_be_exported_for_shoebox", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1_py3.py index c86721a825da..46645a51d737 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_dimension_v1_py3.py @@ -24,12 +24,14 @@ class MetricDimensionV1(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "to_be_exported_for_shoebox": {"key": "toBeExportedForShoebox", "type": "bool"}, } - def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + def __init__( + self, *, name: str = None, display_name: str = None, to_be_exported_for_shoebox: bool = None, **kwargs + ) -> None: super(MetricDimensionV1, self).__init__(**kwargs) self.name = name self.display_name = display_name diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1.py index 9b88054f9d22..8028910fe45d 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1.py @@ -48,29 +48,29 @@ class MetricSpecificationV1(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'category': {'key': 'category', 'type': 'str'}, - 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "display_description": {"key": "displayDescription", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "aggregation_type": {"key": "aggregationType", "type": "str"}, + "dimensions": {"key": "dimensions", "type": "[MetricDimensionV1]"}, + "fill_gap_with_zero": {"key": "fillGapWithZero", "type": "bool"}, + "category": {"key": "category", "type": "str"}, + "resource_id_dimension_name_override": {"key": "resourceIdDimensionNameOverride", "type": "str"}, + "supported_time_grain_types": {"key": "supportedTimeGrainTypes", "type": "[str]"}, + "supported_aggregation_types": {"key": "supportedAggregationTypes", "type": "[str]"}, } def __init__(self, **kwargs): super(MetricSpecificationV1, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.display_description = kwargs.get('display_description', None) - self.unit = kwargs.get('unit', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.dimensions = kwargs.get('dimensions', None) - self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) - self.category = kwargs.get('category', None) - self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) - self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) - self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.name = kwargs.get("name", None) + self.display_name = kwargs.get("display_name", None) + self.display_description = kwargs.get("display_description", None) + self.unit = kwargs.get("unit", None) + self.aggregation_type = kwargs.get("aggregation_type", None) + self.dimensions = kwargs.get("dimensions", None) + self.fill_gap_with_zero = kwargs.get("fill_gap_with_zero", None) + self.category = kwargs.get("category", None) + self.resource_id_dimension_name_override = kwargs.get("resource_id_dimension_name_override", None) + self.supported_time_grain_types = kwargs.get("supported_time_grain_types", None) + self.supported_aggregation_types = kwargs.get("supported_aggregation_types", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1_py3.py index cd70322c3b7b..f9bfdd01b2d6 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/metric_specification_v1_py3.py @@ -48,20 +48,35 @@ class MetricSpecificationV1(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimensionV1]'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'category': {'key': 'category', 'type': 'str'}, - 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "display_description": {"key": "displayDescription", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "aggregation_type": {"key": "aggregationType", "type": "str"}, + "dimensions": {"key": "dimensions", "type": "[MetricDimensionV1]"}, + "fill_gap_with_zero": {"key": "fillGapWithZero", "type": "bool"}, + "category": {"key": "category", "type": "str"}, + "resource_id_dimension_name_override": {"key": "resourceIdDimensionNameOverride", "type": "str"}, + "supported_time_grain_types": {"key": "supportedTimeGrainTypes", "type": "[str]"}, + "supported_aggregation_types": {"key": "supportedAggregationTypes", "type": "[str]"}, } - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit=None, aggregation_type=None, dimensions=None, fill_gap_with_zero: bool=None, category=None, resource_id_dimension_name_override: str=None, supported_time_grain_types=None, supported_aggregation_types=None, **kwargs) -> None: + def __init__( + self, + *, + name: str = None, + display_name: str = None, + display_description: str = None, + unit=None, + aggregation_type=None, + dimensions=None, + fill_gap_with_zero: bool = None, + category=None, + resource_id_dimension_name_override: str = None, + supported_time_grain_types=None, + supported_aggregation_types=None, + **kwargs + ) -> None: super(MetricSpecificationV1, self).__init__(**kwargs) self.name = name self.display_name = display_name diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map.py index a195dc60b3df..44a177691cb4 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map.py @@ -32,22 +32,22 @@ class MountPointMap(Model): """ _validation = { - 'share_id': {'required': True}, - 'role_id': {'readonly': True}, - 'mount_point': {'readonly': True}, - 'role_type': {'readonly': True}, + "share_id": {"required": True}, + "role_id": {"readonly": True}, + "mount_point": {"readonly": True}, + "role_type": {"readonly": True}, } _attribute_map = { - 'share_id': {'key': 'shareId', 'type': 'str'}, - 'role_id': {'key': 'roleId', 'type': 'str'}, - 'mount_point': {'key': 'mountPoint', 'type': 'str'}, - 'role_type': {'key': 'roleType', 'type': 'str'}, + "share_id": {"key": "shareId", "type": "str"}, + "role_id": {"key": "roleId", "type": "str"}, + "mount_point": {"key": "mountPoint", "type": "str"}, + "role_type": {"key": "roleType", "type": "str"}, } def __init__(self, **kwargs): super(MountPointMap, self).__init__(**kwargs) - self.share_id = kwargs.get('share_id', None) + self.share_id = kwargs.get("share_id", None) self.role_id = None self.mount_point = None self.role_type = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map_py3.py index fcb7348f02c1..f0e4502ba071 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/mount_point_map_py3.py @@ -32,17 +32,17 @@ class MountPointMap(Model): """ _validation = { - 'share_id': {'required': True}, - 'role_id': {'readonly': True}, - 'mount_point': {'readonly': True}, - 'role_type': {'readonly': True}, + "share_id": {"required": True}, + "role_id": {"readonly": True}, + "mount_point": {"readonly": True}, + "role_type": {"readonly": True}, } _attribute_map = { - 'share_id': {'key': 'shareId', 'type': 'str'}, - 'role_id': {'key': 'roleId', 'type': 'str'}, - 'mount_point': {'key': 'mountPoint', 'type': 'str'}, - 'role_type': {'key': 'roleType', 'type': 'str'}, + "share_id": {"key": "shareId", "type": "str"}, + "role_id": {"key": "roleId", "type": "str"}, + "mount_point": {"key": "mountPoint", "type": "str"}, + "role_type": {"key": "roleType", "type": "str"}, } def __init__(self, *, share_id: str, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter.py index 2d95bf86423b..9219ebb7e593 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter.py @@ -58,37 +58,37 @@ class NetworkAdapter(Model): """ _validation = { - 'adapter_id': {'readonly': True}, - 'adapter_position': {'readonly': True}, - 'index': {'readonly': True}, - 'node_id': {'readonly': True}, - 'network_adapter_name': {'readonly': True}, - 'label': {'readonly': True}, - 'mac_address': {'readonly': True}, - 'link_speed': {'readonly': True}, - 'status': {'readonly': True}, - 'ipv4_configuration': {'readonly': True}, - 'ipv6_configuration': {'readonly': True}, - 'ipv6_link_local_address': {'readonly': True}, - 'dns_servers': {'readonly': True}, + "adapter_id": {"readonly": True}, + "adapter_position": {"readonly": True}, + "index": {"readonly": True}, + "node_id": {"readonly": True}, + "network_adapter_name": {"readonly": True}, + "label": {"readonly": True}, + "mac_address": {"readonly": True}, + "link_speed": {"readonly": True}, + "status": {"readonly": True}, + "ipv4_configuration": {"readonly": True}, + "ipv6_configuration": {"readonly": True}, + "ipv6_link_local_address": {"readonly": True}, + "dns_servers": {"readonly": True}, } _attribute_map = { - 'adapter_id': {'key': 'adapterId', 'type': 'str'}, - 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, - 'index': {'key': 'index', 'type': 'int'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, - 'status': {'key': 'status', 'type': 'str'}, - 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, - 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, - 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, - 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, - 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + "adapter_id": {"key": "adapterId", "type": "str"}, + "adapter_position": {"key": "adapterPosition", "type": "NetworkAdapterPosition"}, + "index": {"key": "index", "type": "int"}, + "node_id": {"key": "nodeId", "type": "str"}, + "network_adapter_name": {"key": "networkAdapterName", "type": "str"}, + "label": {"key": "label", "type": "str"}, + "mac_address": {"key": "macAddress", "type": "str"}, + "link_speed": {"key": "linkSpeed", "type": "long"}, + "status": {"key": "status", "type": "str"}, + "rdma_status": {"key": "rdmaStatus", "type": "str"}, + "dhcp_status": {"key": "dhcpStatus", "type": "str"}, + "ipv4_configuration": {"key": "ipv4Configuration", "type": "Ipv4Config"}, + "ipv6_configuration": {"key": "ipv6Configuration", "type": "Ipv6Config"}, + "ipv6_link_local_address": {"key": "ipv6LinkLocalAddress", "type": "str"}, + "dns_servers": {"key": "dnsServers", "type": "[str]"}, } def __init__(self, **kwargs): @@ -102,8 +102,8 @@ def __init__(self, **kwargs): self.mac_address = None self.link_speed = None self.status = None - self.rdma_status = kwargs.get('rdma_status', None) - self.dhcp_status = kwargs.get('dhcp_status', None) + self.rdma_status = kwargs.get("rdma_status", None) + self.dhcp_status = kwargs.get("dhcp_status", None) self.ipv4_configuration = None self.ipv6_configuration = None self.ipv6_link_local_address = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position.py index a110e740a4b0..13c6cfd9bfe4 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position.py @@ -26,13 +26,13 @@ class NetworkAdapterPosition(Model): """ _validation = { - 'network_group': {'readonly': True}, - 'port': {'readonly': True}, + "network_group": {"readonly": True}, + "port": {"readonly": True}, } _attribute_map = { - 'network_group': {'key': 'networkGroup', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, + "network_group": {"key": "networkGroup", "type": "str"}, + "port": {"key": "port", "type": "int"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position_py3.py index 0ea8fbbd5dd9..897f329fed60 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_position_py3.py @@ -26,13 +26,13 @@ class NetworkAdapterPosition(Model): """ _validation = { - 'network_group': {'readonly': True}, - 'port': {'readonly': True}, + "network_group": {"readonly": True}, + "port": {"readonly": True}, } _attribute_map = { - 'network_group': {'key': 'networkGroup', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, + "network_group": {"key": "networkGroup", "type": "str"}, + "port": {"key": "port", "type": "int"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_py3.py index a2cb756c2827..a57121cbcf94 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_adapter_py3.py @@ -58,37 +58,37 @@ class NetworkAdapter(Model): """ _validation = { - 'adapter_id': {'readonly': True}, - 'adapter_position': {'readonly': True}, - 'index': {'readonly': True}, - 'node_id': {'readonly': True}, - 'network_adapter_name': {'readonly': True}, - 'label': {'readonly': True}, - 'mac_address': {'readonly': True}, - 'link_speed': {'readonly': True}, - 'status': {'readonly': True}, - 'ipv4_configuration': {'readonly': True}, - 'ipv6_configuration': {'readonly': True}, - 'ipv6_link_local_address': {'readonly': True}, - 'dns_servers': {'readonly': True}, + "adapter_id": {"readonly": True}, + "adapter_position": {"readonly": True}, + "index": {"readonly": True}, + "node_id": {"readonly": True}, + "network_adapter_name": {"readonly": True}, + "label": {"readonly": True}, + "mac_address": {"readonly": True}, + "link_speed": {"readonly": True}, + "status": {"readonly": True}, + "ipv4_configuration": {"readonly": True}, + "ipv6_configuration": {"readonly": True}, + "ipv6_link_local_address": {"readonly": True}, + "dns_servers": {"readonly": True}, } _attribute_map = { - 'adapter_id': {'key': 'adapterId', 'type': 'str'}, - 'adapter_position': {'key': 'adapterPosition', 'type': 'NetworkAdapterPosition'}, - 'index': {'key': 'index', 'type': 'int'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'network_adapter_name': {'key': 'networkAdapterName', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - 'link_speed': {'key': 'linkSpeed', 'type': 'long'}, - 'status': {'key': 'status', 'type': 'str'}, - 'rdma_status': {'key': 'rdmaStatus', 'type': 'str'}, - 'dhcp_status': {'key': 'dhcpStatus', 'type': 'str'}, - 'ipv4_configuration': {'key': 'ipv4Configuration', 'type': 'Ipv4Config'}, - 'ipv6_configuration': {'key': 'ipv6Configuration', 'type': 'Ipv6Config'}, - 'ipv6_link_local_address': {'key': 'ipv6LinkLocalAddress', 'type': 'str'}, - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + "adapter_id": {"key": "adapterId", "type": "str"}, + "adapter_position": {"key": "adapterPosition", "type": "NetworkAdapterPosition"}, + "index": {"key": "index", "type": "int"}, + "node_id": {"key": "nodeId", "type": "str"}, + "network_adapter_name": {"key": "networkAdapterName", "type": "str"}, + "label": {"key": "label", "type": "str"}, + "mac_address": {"key": "macAddress", "type": "str"}, + "link_speed": {"key": "linkSpeed", "type": "long"}, + "status": {"key": "status", "type": "str"}, + "rdma_status": {"key": "rdmaStatus", "type": "str"}, + "dhcp_status": {"key": "dhcpStatus", "type": "str"}, + "ipv4_configuration": {"key": "ipv4Configuration", "type": "Ipv4Config"}, + "ipv6_configuration": {"key": "ipv6Configuration", "type": "Ipv6Config"}, + "ipv6_link_local_address": {"key": "ipv6LinkLocalAddress", "type": "str"}, + "dns_servers": {"key": "dnsServers", "type": "[str]"}, } def __init__(self, *, rdma_status=None, dhcp_status=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings.py index c9a9190ad962..57f5da422eb5 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings.py @@ -30,17 +30,17 @@ class NetworkSettings(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_adapters': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "network_adapters": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "network_adapters": {"key": "properties.networkAdapters", "type": "[NetworkAdapter]"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings_py3.py index db9f6c0a98d9..0450d184e021 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/network_settings_py3.py @@ -30,17 +30,17 @@ class NetworkSettings(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_adapters': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "network_adapters": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'network_adapters': {'key': 'properties.networkAdapters', 'type': '[NetworkAdapter]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "network_adapters": {"key": "properties.networkAdapters", "type": "[NetworkAdapter]"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation.py index a65cab2410db..fd8453db40cc 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation.py @@ -27,15 +27,15 @@ class Operation(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "service_specification": {"key": "properties.serviceSpecification", "type": "ServiceSpecification"}, } def __init__(self, **kwargs): super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.service_specification = kwargs.get('service_specification', None) + self.name = kwargs.get("name", None) + self.display = kwargs.get("display", None) + self.origin = kwargs.get("origin", None) + self.service_specification = kwargs.get("service_specification", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display.py index fba5a3b7c012..2aad7cb72f09 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display.py @@ -26,15 +26,15 @@ class OperationDisplay(Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } def __init__(self, **kwargs): super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) + self.provider = kwargs.get("provider", None) + self.resource = kwargs.get("resource", None) + self.operation = kwargs.get("operation", None) + self.description = kwargs.get("description", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display_py3.py index 1f8fa5959863..077d2c11a1d6 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_display_py3.py @@ -26,13 +26,15 @@ class OperationDisplay(Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + def __init__( + self, *, provider: str = None, resource: str = None, operation: str = None, description: str = None, **kwargs + ) -> None: super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.resource = resource diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_paged.py index 2636d65fd6ba..750268b6e359 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_paged.py @@ -18,8 +18,8 @@ class OperationPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[Operation]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_py3.py index 3930c32c6634..031da12017bd 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/operation_py3.py @@ -27,13 +27,15 @@ class Operation(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "service_specification": {"key": "properties.serviceSpecification", "type": "ServiceSpecification"}, } - def __init__(self, *, name: str=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: + def __init__( + self, *, name: str = None, display=None, origin: str = None, service_specification=None, **kwargs + ) -> None: super(Operation, self).__init__(**kwargs) self.name = name self.display = display diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order.py index 4e8404fdad65..ffbd66258684 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order.py @@ -48,35 +48,35 @@ class Order(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_information': {'required': True}, - 'shipping_address': {'required': True}, - 'order_history': {'readonly': True}, - 'serial_number': {'readonly': True}, - 'delivery_tracking_info': {'readonly': True}, - 'return_tracking_info': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "contact_information": {"required": True}, + "shipping_address": {"required": True}, + "order_history": {"readonly": True}, + "serial_number": {"readonly": True}, + "delivery_tracking_info": {"readonly": True}, + "return_tracking_info": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, - 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, - 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, - 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, - 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, - 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, - 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "contact_information": {"key": "properties.contactInformation", "type": "ContactDetails"}, + "shipping_address": {"key": "properties.shippingAddress", "type": "Address"}, + "current_status": {"key": "properties.currentStatus", "type": "OrderStatus"}, + "order_history": {"key": "properties.orderHistory", "type": "[OrderStatus]"}, + "serial_number": {"key": "properties.serialNumber", "type": "str"}, + "delivery_tracking_info": {"key": "properties.deliveryTrackingInfo", "type": "[TrackingInfo]"}, + "return_tracking_info": {"key": "properties.returnTrackingInfo", "type": "[TrackingInfo]"}, } def __init__(self, **kwargs): super(Order, self).__init__(**kwargs) - self.contact_information = kwargs.get('contact_information', None) - self.shipping_address = kwargs.get('shipping_address', None) - self.current_status = kwargs.get('current_status', None) + self.contact_information = kwargs.get("contact_information", None) + self.shipping_address = kwargs.get("shipping_address", None) + self.current_status = kwargs.get("current_status", None) self.order_history = None self.serial_number = None self.delivery_tracking_info = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_paged.py index d2ec5975805d..765444dea7b6 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_paged.py @@ -18,8 +18,8 @@ class OrderPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Order]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[Order]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_py3.py index b81fef5aefb2..37923edcddef 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_py3.py @@ -48,28 +48,28 @@ class Order(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'contact_information': {'required': True}, - 'shipping_address': {'required': True}, - 'order_history': {'readonly': True}, - 'serial_number': {'readonly': True}, - 'delivery_tracking_info': {'readonly': True}, - 'return_tracking_info': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "contact_information": {"required": True}, + "shipping_address": {"required": True}, + "order_history": {"readonly": True}, + "serial_number": {"readonly": True}, + "delivery_tracking_info": {"readonly": True}, + "return_tracking_info": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'contact_information': {'key': 'properties.contactInformation', 'type': 'ContactDetails'}, - 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'Address'}, - 'current_status': {'key': 'properties.currentStatus', 'type': 'OrderStatus'}, - 'order_history': {'key': 'properties.orderHistory', 'type': '[OrderStatus]'}, - 'serial_number': {'key': 'properties.serialNumber', 'type': 'str'}, - 'delivery_tracking_info': {'key': 'properties.deliveryTrackingInfo', 'type': '[TrackingInfo]'}, - 'return_tracking_info': {'key': 'properties.returnTrackingInfo', 'type': '[TrackingInfo]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "contact_information": {"key": "properties.contactInformation", "type": "ContactDetails"}, + "shipping_address": {"key": "properties.shippingAddress", "type": "Address"}, + "current_status": {"key": "properties.currentStatus", "type": "OrderStatus"}, + "order_history": {"key": "properties.orderHistory", "type": "[OrderStatus]"}, + "serial_number": {"key": "properties.serialNumber", "type": "str"}, + "delivery_tracking_info": {"key": "properties.deliveryTrackingInfo", "type": "[TrackingInfo]"}, + "return_tracking_info": {"key": "properties.returnTrackingInfo", "type": "[TrackingInfo]"}, } def __init__(self, *, contact_information, shipping_address, current_status=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status.py index 2fc0438ef81a..acf7d31673fc 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status.py @@ -34,18 +34,18 @@ class OrderStatus(Model): """ _validation = { - 'status': {'required': True}, - 'update_date_time': {'readonly': True}, + "status": {"required": True}, + "update_date_time": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, - 'comments': {'key': 'comments', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "update_date_time": {"key": "updateDateTime", "type": "iso-8601"}, + "comments": {"key": "comments", "type": "str"}, } def __init__(self, **kwargs): super(OrderStatus, self).__init__(**kwargs) - self.status = kwargs.get('status', None) + self.status = kwargs.get("status", None) self.update_date_time = None - self.comments = kwargs.get('comments', None) + self.comments = kwargs.get("comments", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status_py3.py index 9f9d32795d40..4fb6b766b235 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/order_status_py3.py @@ -34,17 +34,17 @@ class OrderStatus(Model): """ _validation = { - 'status': {'required': True}, - 'update_date_time': {'readonly': True}, + "status": {"required": True}, + "update_date_time": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'update_date_time': {'key': 'updateDateTime', 'type': 'iso-8601'}, - 'comments': {'key': 'comments', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "update_date_time": {"key": "updateDateTime", "type": "iso-8601"}, + "comments": {"key": "comments", "type": "str"}, } - def __init__(self, *, status, comments: str=None, **kwargs) -> None: + def __init__(self, *, status, comments: str = None, **kwargs) -> None: super(OrderStatus, self).__init__(**kwargs) self.status = status self.update_date_time = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger.py index 0487a1ce8aa1..9167b976b521 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger.py @@ -40,27 +40,27 @@ class PeriodicTimerEventTrigger(Trigger): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'source_info': {'required': True}, - 'sink_info': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + "source_info": {"required": True}, + "sink_info": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, - 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, - 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "source_info": {"key": "properties.sourceInfo", "type": "PeriodicTimerSourceInfo"}, + "sink_info": {"key": "properties.sinkInfo", "type": "RoleSinkInfo"}, + "custom_context_tag": {"key": "properties.customContextTag", "type": "str"}, } def __init__(self, **kwargs): super(PeriodicTimerEventTrigger, self).__init__(**kwargs) - self.source_info = kwargs.get('source_info', None) - self.sink_info = kwargs.get('sink_info', None) - self.custom_context_tag = kwargs.get('custom_context_tag', None) - self.kind = 'PeriodicTimerEvent' + self.source_info = kwargs.get("source_info", None) + self.sink_info = kwargs.get("sink_info", None) + self.custom_context_tag = kwargs.get("custom_context_tag", None) + self.kind = "PeriodicTimerEvent" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger_py3.py index bb3b9468faf2..aed58da59fb7 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger_py3.py @@ -40,27 +40,27 @@ class PeriodicTimerEventTrigger(Trigger): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'source_info': {'required': True}, - 'sink_info': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, + "source_info": {"required": True}, + "sink_info": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'source_info': {'key': 'properties.sourceInfo', 'type': 'PeriodicTimerSourceInfo'}, - 'sink_info': {'key': 'properties.sinkInfo', 'type': 'RoleSinkInfo'}, - 'custom_context_tag': {'key': 'properties.customContextTag', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "source_info": {"key": "properties.sourceInfo", "type": "PeriodicTimerSourceInfo"}, + "sink_info": {"key": "properties.sinkInfo", "type": "RoleSinkInfo"}, + "custom_context_tag": {"key": "properties.customContextTag", "type": "str"}, } - def __init__(self, *, source_info, sink_info, custom_context_tag: str=None, **kwargs) -> None: + def __init__(self, *, source_info, sink_info, custom_context_tag: str = None, **kwargs) -> None: super(PeriodicTimerEventTrigger, self).__init__(**kwargs) self.source_info = source_info self.sink_info = sink_info self.custom_context_tag = custom_context_tag - self.kind = 'PeriodicTimerEvent' + self.kind = "PeriodicTimerEvent" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info.py index be4619e7436e..a079d07df4f5 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info.py @@ -30,18 +30,18 @@ class PeriodicTimerSourceInfo(Model): """ _validation = { - 'start_time': {'required': True}, - 'schedule': {'required': True}, + "start_time": {"required": True}, + "schedule": {"required": True}, } _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'schedule': {'key': 'schedule', 'type': 'str'}, - 'topic': {'key': 'topic', 'type': 'str'}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "schedule": {"key": "schedule", "type": "str"}, + "topic": {"key": "topic", "type": "str"}, } def __init__(self, **kwargs): super(PeriodicTimerSourceInfo, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.schedule = kwargs.get('schedule', None) - self.topic = kwargs.get('topic', None) + self.start_time = kwargs.get("start_time", None) + self.schedule = kwargs.get("schedule", None) + self.topic = kwargs.get("topic", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info_py3.py index 702286995e38..49b64fee67e8 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_source_info_py3.py @@ -30,17 +30,17 @@ class PeriodicTimerSourceInfo(Model): """ _validation = { - 'start_time': {'required': True}, - 'schedule': {'required': True}, + "start_time": {"required": True}, + "schedule": {"required": True}, } _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'schedule': {'key': 'schedule', 'type': 'str'}, - 'topic': {'key': 'topic', 'type': 'str'}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "schedule": {"key": "schedule", "type": "str"}, + "topic": {"key": "topic", "type": "str"}, } - def __init__(self, *, start_time, schedule: str, topic: str=None, **kwargs) -> None: + def __init__(self, *, start_time, schedule: str, topic: str = None, **kwargs) -> None: super(PeriodicTimerSourceInfo, self).__init__(**kwargs) self.start_time = start_time self.schedule = schedule diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details.py index ba6ea11a663f..3ff5cd77dca0 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details.py @@ -33,15 +33,15 @@ class RefreshDetails(Model): """ _attribute_map = { - 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, - 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, - 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, - 'last_job': {'key': 'lastJob', 'type': 'str'}, + "in_progress_refresh_job_id": {"key": "inProgressRefreshJobId", "type": "str"}, + "last_completed_refresh_job_time_in_utc": {"key": "lastCompletedRefreshJobTimeInUTC", "type": "iso-8601"}, + "error_manifest_file": {"key": "errorManifestFile", "type": "str"}, + "last_job": {"key": "lastJob", "type": "str"}, } def __init__(self, **kwargs): super(RefreshDetails, self).__init__(**kwargs) - self.in_progress_refresh_job_id = kwargs.get('in_progress_refresh_job_id', None) - self.last_completed_refresh_job_time_in_utc = kwargs.get('last_completed_refresh_job_time_in_utc', None) - self.error_manifest_file = kwargs.get('error_manifest_file', None) - self.last_job = kwargs.get('last_job', None) + self.in_progress_refresh_job_id = kwargs.get("in_progress_refresh_job_id", None) + self.last_completed_refresh_job_time_in_utc = kwargs.get("last_completed_refresh_job_time_in_utc", None) + self.error_manifest_file = kwargs.get("error_manifest_file", None) + self.last_job = kwargs.get("last_job", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details_py3.py index 1172a980c661..0eb2be1b0e9d 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/refresh_details_py3.py @@ -33,13 +33,21 @@ class RefreshDetails(Model): """ _attribute_map = { - 'in_progress_refresh_job_id': {'key': 'inProgressRefreshJobId', 'type': 'str'}, - 'last_completed_refresh_job_time_in_utc': {'key': 'lastCompletedRefreshJobTimeInUTC', 'type': 'iso-8601'}, - 'error_manifest_file': {'key': 'errorManifestFile', 'type': 'str'}, - 'last_job': {'key': 'lastJob', 'type': 'str'}, + "in_progress_refresh_job_id": {"key": "inProgressRefreshJobId", "type": "str"}, + "last_completed_refresh_job_time_in_utc": {"key": "lastCompletedRefreshJobTimeInUTC", "type": "iso-8601"}, + "error_manifest_file": {"key": "errorManifestFile", "type": "str"}, + "last_job": {"key": "lastJob", "type": "str"}, } - def __init__(self, *, in_progress_refresh_job_id: str=None, last_completed_refresh_job_time_in_utc=None, error_manifest_file: str=None, last_job: str=None, **kwargs) -> None: + def __init__( + self, + *, + in_progress_refresh_job_id: str = None, + last_completed_refresh_job_time_in_utc=None, + error_manifest_file: str = None, + last_job: str = None, + **kwargs + ) -> None: super(RefreshDetails, self).__init__(**kwargs) self.in_progress_refresh_job_id = in_progress_refresh_job_id self.last_completed_refresh_job_time_in_utc = last_completed_refresh_job_time_in_utc diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role.py index 1d2031bf6389..587b78ca7a5e 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role.py @@ -34,24 +34,22 @@ class Role(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'IOT': 'IoTRole'} - } + _subtype_map = {"kind": {"IOT": "IoTRole"}} def __init__(self, **kwargs): super(Role, self).__init__(**kwargs) self.kind = None - self.kind = 'Role' + self.kind = "Role" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_paged.py index c930165e7fb6..ae35e687f5ae 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_paged.py @@ -18,8 +18,8 @@ class RolePaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Role]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[Role]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_py3.py index d24b70a78316..d9ade66bf95c 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_py3.py @@ -34,24 +34,22 @@ class Role(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'IOT': 'IoTRole'} - } + _subtype_map = {"kind": {"IOT": "IoTRole"}} def __init__(self, **kwargs) -> None: super(Role, self).__init__(**kwargs) self.kind = None - self.kind = 'Role' + self.kind = "Role" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info.py index 4e54c3890606..0be73b5c8eb5 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info.py @@ -22,13 +22,13 @@ class RoleSinkInfo(Model): """ _validation = { - 'role_id': {'required': True}, + "role_id": {"required": True}, } _attribute_map = { - 'role_id': {'key': 'roleId', 'type': 'str'}, + "role_id": {"key": "roleId", "type": "str"}, } def __init__(self, **kwargs): super(RoleSinkInfo, self).__init__(**kwargs) - self.role_id = kwargs.get('role_id', None) + self.role_id = kwargs.get("role_id", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info_py3.py index 54c6eb71abc2..4c2a34d4086d 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/role_sink_info_py3.py @@ -22,11 +22,11 @@ class RoleSinkInfo(Model): """ _validation = { - 'role_id': {'required': True}, + "role_id": {"required": True}, } _attribute_map = { - 'role_id': {'key': 'roleId', 'type': 'str'}, + "role_id": {"key": "roleId", "type": "str"}, } def __init__(self, *, role_id: str, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings.py index 26fb0e70a897..930b153674dd 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings.py @@ -36,19 +36,19 @@ class SecuritySettings(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'device_admin_password': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "device_admin_password": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "device_admin_password": {"key": "properties.deviceAdminPassword", "type": "AsymmetricEncryptedSecret"}, } def __init__(self, **kwargs): super(SecuritySettings, self).__init__(**kwargs) - self.device_admin_password = kwargs.get('device_admin_password', None) + self.device_admin_password = kwargs.get("device_admin_password", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings_py3.py index e67b608b7479..7c4573bea322 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/security_settings_py3.py @@ -36,17 +36,17 @@ class SecuritySettings(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'device_admin_password': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "device_admin_password": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'device_admin_password': {'key': 'properties.deviceAdminPassword', 'type': 'AsymmetricEncryptedSecret'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "device_admin_password": {"key": "properties.deviceAdminPassword", "type": "AsymmetricEncryptedSecret"}, } def __init__(self, *, device_admin_password, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification.py index b859957a7d0f..70f3e869f418 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification.py @@ -21,9 +21,9 @@ class ServiceSpecification(Model): """ _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecificationV1]"}, } def __init__(self, **kwargs): super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_specifications', None) + self.metric_specifications = kwargs.get("metric_specifications", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification_py3.py index c02ddd2c5114..b151c146e4c1 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/service_specification_py3.py @@ -21,7 +21,7 @@ class ServiceSpecification(Model): """ _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecificationV1]'}, + "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecificationV1]"}, } def __init__(self, *, metric_specifications=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share.py index 1a87618bc266..ccbd9bcf57a4 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share.py @@ -61,40 +61,40 @@ class Share(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'share_status': {'required': True}, - 'monitoring_status': {'required': True}, - 'access_protocol': {'required': True}, - 'share_mappings': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "share_status": {"required": True}, + "monitoring_status": {"required": True}, + "access_protocol": {"required": True}, + "share_mappings": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, - 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, - 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, - 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, - 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, - 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, - 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, - 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, - 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "share_status": {"key": "properties.shareStatus", "type": "str"}, + "monitoring_status": {"key": "properties.monitoringStatus", "type": "str"}, + "azure_container_info": {"key": "properties.azureContainerInfo", "type": "AzureContainerInfo"}, + "access_protocol": {"key": "properties.accessProtocol", "type": "str"}, + "user_access_rights": {"key": "properties.userAccessRights", "type": "[UserAccessRight]"}, + "client_access_rights": {"key": "properties.clientAccessRights", "type": "[ClientAccessRight]"}, + "refresh_details": {"key": "properties.refreshDetails", "type": "RefreshDetails"}, + "share_mappings": {"key": "properties.shareMappings", "type": "[MountPointMap]"}, + "data_policy": {"key": "properties.dataPolicy", "type": "str"}, } def __init__(self, **kwargs): super(Share, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.share_status = kwargs.get('share_status', None) - self.monitoring_status = kwargs.get('monitoring_status', None) - self.azure_container_info = kwargs.get('azure_container_info', None) - self.access_protocol = kwargs.get('access_protocol', None) - self.user_access_rights = kwargs.get('user_access_rights', None) - self.client_access_rights = kwargs.get('client_access_rights', None) - self.refresh_details = kwargs.get('refresh_details', None) + self.description = kwargs.get("description", None) + self.share_status = kwargs.get("share_status", None) + self.monitoring_status = kwargs.get("monitoring_status", None) + self.azure_container_info = kwargs.get("azure_container_info", None) + self.access_protocol = kwargs.get("access_protocol", None) + self.user_access_rights = kwargs.get("user_access_rights", None) + self.client_access_rights = kwargs.get("client_access_rights", None) + self.refresh_details = kwargs.get("refresh_details", None) self.share_mappings = None - self.data_policy = kwargs.get('data_policy', None) + self.data_policy = kwargs.get("data_policy", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right.py index 00d087b8f5a3..a09ac8898a17 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right.py @@ -26,16 +26,16 @@ class ShareAccessRight(Model): """ _validation = { - 'share_id': {'required': True}, - 'access_type': {'required': True}, + "share_id": {"required": True}, + "access_type": {"required": True}, } _attribute_map = { - 'share_id': {'key': 'shareId', 'type': 'str'}, - 'access_type': {'key': 'accessType', 'type': 'str'}, + "share_id": {"key": "shareId", "type": "str"}, + "access_type": {"key": "accessType", "type": "str"}, } def __init__(self, **kwargs): super(ShareAccessRight, self).__init__(**kwargs) - self.share_id = kwargs.get('share_id', None) - self.access_type = kwargs.get('access_type', None) + self.share_id = kwargs.get("share_id", None) + self.access_type = kwargs.get("access_type", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right_py3.py index 544b1f6665b8..580c9d15c9e0 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_access_right_py3.py @@ -26,13 +26,13 @@ class ShareAccessRight(Model): """ _validation = { - 'share_id': {'required': True}, - 'access_type': {'required': True}, + "share_id": {"required": True}, + "access_type": {"required": True}, } _attribute_map = { - 'share_id': {'key': 'shareId', 'type': 'str'}, - 'access_type': {'key': 'accessType', 'type': 'str'}, + "share_id": {"key": "shareId", "type": "str"}, + "access_type": {"key": "accessType", "type": "str"}, } def __init__(self, *, share_id: str, access_type, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_paged.py index d1f8cd7ec5bd..172fbacc1eaa 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_paged.py @@ -18,8 +18,8 @@ class SharePaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Share]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[Share]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_py3.py index 872aab6a1b4e..2c2234aeaca5 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/share_py3.py @@ -61,32 +61,45 @@ class Share(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'share_status': {'required': True}, - 'monitoring_status': {'required': True}, - 'access_protocol': {'required': True}, - 'share_mappings': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "share_status": {"required": True}, + "monitoring_status": {"required": True}, + "access_protocol": {"required": True}, + "share_mappings": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'share_status': {'key': 'properties.shareStatus', 'type': 'str'}, - 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, - 'azure_container_info': {'key': 'properties.azureContainerInfo', 'type': 'AzureContainerInfo'}, - 'access_protocol': {'key': 'properties.accessProtocol', 'type': 'str'}, - 'user_access_rights': {'key': 'properties.userAccessRights', 'type': '[UserAccessRight]'}, - 'client_access_rights': {'key': 'properties.clientAccessRights', 'type': '[ClientAccessRight]'}, - 'refresh_details': {'key': 'properties.refreshDetails', 'type': 'RefreshDetails'}, - 'share_mappings': {'key': 'properties.shareMappings', 'type': '[MountPointMap]'}, - 'data_policy': {'key': 'properties.dataPolicy', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "share_status": {"key": "properties.shareStatus", "type": "str"}, + "monitoring_status": {"key": "properties.monitoringStatus", "type": "str"}, + "azure_container_info": {"key": "properties.azureContainerInfo", "type": "AzureContainerInfo"}, + "access_protocol": {"key": "properties.accessProtocol", "type": "str"}, + "user_access_rights": {"key": "properties.userAccessRights", "type": "[UserAccessRight]"}, + "client_access_rights": {"key": "properties.clientAccessRights", "type": "[ClientAccessRight]"}, + "refresh_details": {"key": "properties.refreshDetails", "type": "RefreshDetails"}, + "share_mappings": {"key": "properties.shareMappings", "type": "[MountPointMap]"}, + "data_policy": {"key": "properties.dataPolicy", "type": "str"}, } - def __init__(self, *, share_status, monitoring_status, access_protocol, description: str=None, azure_container_info=None, user_access_rights=None, client_access_rights=None, refresh_details=None, data_policy=None, **kwargs) -> None: + def __init__( + self, + *, + share_status, + monitoring_status, + access_protocol, + description: str = None, + azure_container_info=None, + user_access_rights=None, + client_access_rights=None, + refresh_details=None, + data_policy=None, + **kwargs + ) -> None: super(Share, self).__init__(**kwargs) self.description = description self.share_status = share_status diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku.py index c9fd13e60296..bf1a054ad7aa 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku.py @@ -23,11 +23,11 @@ class Sku(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } def __init__(self, **kwargs): super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) + self.name = kwargs.get("name", None) + self.tier = kwargs.get("tier", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku_py3.py index 206fd6cbaae5..4edf306a6b72 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/sku_py3.py @@ -23,8 +23,8 @@ class Sku(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } def __init__(self, *, name=None, tier=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential.py index dc59d8bca4e4..73bc8bafa96e 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential.py @@ -47,33 +47,33 @@ class StorageAccountCredential(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'alias': {'required': True}, - 'ssl_status': {'required': True}, - 'account_type': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "alias": {"required": True}, + "ssl_status": {"required": True}, + "account_type": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'alias': {'key': 'properties.alias', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, - 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, - 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "alias": {"key": "properties.alias", "type": "str"}, + "user_name": {"key": "properties.userName", "type": "str"}, + "account_key": {"key": "properties.accountKey", "type": "AsymmetricEncryptedSecret"}, + "connection_string": {"key": "properties.connectionString", "type": "str"}, + "ssl_status": {"key": "properties.sslStatus", "type": "str"}, + "blob_domain_name": {"key": "properties.blobDomainName", "type": "str"}, + "account_type": {"key": "properties.accountType", "type": "str"}, } def __init__(self, **kwargs): super(StorageAccountCredential, self).__init__(**kwargs) - self.alias = kwargs.get('alias', None) - self.user_name = kwargs.get('user_name', None) - self.account_key = kwargs.get('account_key', None) - self.connection_string = kwargs.get('connection_string', None) - self.ssl_status = kwargs.get('ssl_status', None) - self.blob_domain_name = kwargs.get('blob_domain_name', None) - self.account_type = kwargs.get('account_type', None) + self.alias = kwargs.get("alias", None) + self.user_name = kwargs.get("user_name", None) + self.account_key = kwargs.get("account_key", None) + self.connection_string = kwargs.get("connection_string", None) + self.ssl_status = kwargs.get("ssl_status", None) + self.blob_domain_name = kwargs.get("blob_domain_name", None) + self.account_type = kwargs.get("account_type", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_paged.py index a1f64d10ab91..07d45dc84100 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_paged.py @@ -18,8 +18,8 @@ class StorageAccountCredentialPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageAccountCredential]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[StorageAccountCredential]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_py3.py index 7772dc2693b7..56c23d8c933e 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/storage_account_credential_py3.py @@ -47,28 +47,39 @@ class StorageAccountCredential(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'alias': {'required': True}, - 'ssl_status': {'required': True}, - 'account_type': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "alias": {"required": True}, + "ssl_status": {"required": True}, + "account_type": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'alias': {'key': 'properties.alias', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'account_key': {'key': 'properties.accountKey', 'type': 'AsymmetricEncryptedSecret'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'ssl_status': {'key': 'properties.sslStatus', 'type': 'str'}, - 'blob_domain_name': {'key': 'properties.blobDomainName', 'type': 'str'}, - 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "alias": {"key": "properties.alias", "type": "str"}, + "user_name": {"key": "properties.userName", "type": "str"}, + "account_key": {"key": "properties.accountKey", "type": "AsymmetricEncryptedSecret"}, + "connection_string": {"key": "properties.connectionString", "type": "str"}, + "ssl_status": {"key": "properties.sslStatus", "type": "str"}, + "blob_domain_name": {"key": "properties.blobDomainName", "type": "str"}, + "account_type": {"key": "properties.accountType", "type": "str"}, } - def __init__(self, *, alias: str, ssl_status, account_type, user_name: str=None, account_key=None, connection_string: str=None, blob_domain_name: str=None, **kwargs) -> None: + def __init__( + self, + *, + alias: str, + ssl_status, + account_type, + user_name: str = None, + account_key=None, + connection_string: str = None, + blob_domain_name: str = None, + **kwargs + ) -> None: super(StorageAccountCredential, self).__init__(**kwargs) self.alias = alias self.user_name = user_name diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key.py index 10a18ec408bd..1043adcdaaaf 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key.py @@ -21,9 +21,9 @@ class SymmetricKey(Model): """ _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + "connection_string": {"key": "connectionString", "type": "AsymmetricEncryptedSecret"}, } def __init__(self, **kwargs): super(SymmetricKey, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) + self.connection_string = kwargs.get("connection_string", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key_py3.py index 5f97e3089746..55e4a40a5862 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/symmetric_key_py3.py @@ -21,7 +21,7 @@ class SymmetricKey(Model): """ _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'AsymmetricEncryptedSecret'}, + "connection_string": {"key": "connectionString", "type": "AsymmetricEncryptedSecret"}, } def __init__(self, *, connection_string=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info.py index bcf38c2e2b98..7b5f92fc105f 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info.py @@ -26,15 +26,15 @@ class TrackingInfo(Model): """ _attribute_map = { - 'serial_number': {'key': 'serialNumber', 'type': 'str'}, - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + "serial_number": {"key": "serialNumber", "type": "str"}, + "carrier_name": {"key": "carrierName", "type": "str"}, + "tracking_id": {"key": "trackingId", "type": "str"}, + "tracking_url": {"key": "trackingUrl", "type": "str"}, } def __init__(self, **kwargs): super(TrackingInfo, self).__init__(**kwargs) - self.serial_number = kwargs.get('serial_number', None) - self.carrier_name = kwargs.get('carrier_name', None) - self.tracking_id = kwargs.get('tracking_id', None) - self.tracking_url = kwargs.get('tracking_url', None) + self.serial_number = kwargs.get("serial_number", None) + self.carrier_name = kwargs.get("carrier_name", None) + self.tracking_id = kwargs.get("tracking_id", None) + self.tracking_url = kwargs.get("tracking_url", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info_py3.py index 16139374f0d5..f627e5babd89 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/tracking_info_py3.py @@ -26,13 +26,21 @@ class TrackingInfo(Model): """ _attribute_map = { - 'serial_number': {'key': 'serialNumber', 'type': 'str'}, - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, + "serial_number": {"key": "serialNumber", "type": "str"}, + "carrier_name": {"key": "carrierName", "type": "str"}, + "tracking_id": {"key": "trackingId", "type": "str"}, + "tracking_url": {"key": "trackingUrl", "type": "str"}, } - def __init__(self, *, serial_number: str=None, carrier_name: str=None, tracking_id: str=None, tracking_url: str=None, **kwargs) -> None: + def __init__( + self, + *, + serial_number: str = None, + carrier_name: str = None, + tracking_id: str = None, + tracking_url: str = None, + **kwargs + ) -> None: super(TrackingInfo, self).__init__(**kwargs) self.serial_number = serial_number self.carrier_name = carrier_name diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger.py index c5126069f522..e9526bf1a82f 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger.py @@ -34,24 +34,22 @@ class Trigger(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} - } + _subtype_map = {"kind": {"FileEvent": "FileEventTrigger", "PeriodicTimerEvent": "PeriodicTimerEventTrigger"}} def __init__(self, **kwargs): super(Trigger, self).__init__(**kwargs) self.kind = None - self.kind = 'Trigger' + self.kind = "Trigger" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_paged.py index 6ec77c2cdd34..788ff07f66fa 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_paged.py @@ -18,8 +18,8 @@ class TriggerPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Trigger]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[Trigger]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_py3.py index d674eac911e4..bc0c7a36cd65 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/trigger_py3.py @@ -34,24 +34,22 @@ class Trigger(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'FileEvent': 'FileEventTrigger', 'PeriodicTimerEvent': 'PeriodicTimerEventTrigger'} - } + _subtype_map = {"kind": {"FileEvent": "FileEventTrigger", "PeriodicTimerEvent": "PeriodicTimerEventTrigger"}} def __init__(self, **kwargs) -> None: super(Trigger, self).__init__(**kwargs) self.kind = None - self.kind = 'Trigger' + self.kind = "Trigger" diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress.py index f818320b8a5d..0a7b9ffb1a15 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress.py @@ -35,21 +35,21 @@ class UpdateDownloadProgress(Model): """ _validation = { - 'download_phase': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'total_bytes_to_download': {'readonly': True}, - 'total_bytes_downloaded': {'readonly': True}, - 'number_of_updates_to_download': {'readonly': True}, - 'number_of_updates_downloaded': {'readonly': True}, + "download_phase": {"readonly": True}, + "percent_complete": {"readonly": True}, + "total_bytes_to_download": {"readonly": True}, + "total_bytes_downloaded": {"readonly": True}, + "number_of_updates_to_download": {"readonly": True}, + "number_of_updates_downloaded": {"readonly": True}, } _attribute_map = { - 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, - 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, - 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, - 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + "download_phase": {"key": "downloadPhase", "type": "str"}, + "percent_complete": {"key": "percentComplete", "type": "int"}, + "total_bytes_to_download": {"key": "totalBytesToDownload", "type": "float"}, + "total_bytes_downloaded": {"key": "totalBytesDownloaded", "type": "float"}, + "number_of_updates_to_download": {"key": "numberOfUpdatesToDownload", "type": "int"}, + "number_of_updates_downloaded": {"key": "numberOfUpdatesDownloaded", "type": "int"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress_py3.py index 03b16dcfc240..dbc70ce92d9e 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_download_progress_py3.py @@ -35,21 +35,21 @@ class UpdateDownloadProgress(Model): """ _validation = { - 'download_phase': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'total_bytes_to_download': {'readonly': True}, - 'total_bytes_downloaded': {'readonly': True}, - 'number_of_updates_to_download': {'readonly': True}, - 'number_of_updates_downloaded': {'readonly': True}, + "download_phase": {"readonly": True}, + "percent_complete": {"readonly": True}, + "total_bytes_to_download": {"readonly": True}, + "total_bytes_downloaded": {"readonly": True}, + "number_of_updates_to_download": {"readonly": True}, + "number_of_updates_downloaded": {"readonly": True}, } _attribute_map = { - 'download_phase': {'key': 'downloadPhase', 'type': 'str'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'total_bytes_to_download': {'key': 'totalBytesToDownload', 'type': 'float'}, - 'total_bytes_downloaded': {'key': 'totalBytesDownloaded', 'type': 'float'}, - 'number_of_updates_to_download': {'key': 'numberOfUpdatesToDownload', 'type': 'int'}, - 'number_of_updates_downloaded': {'key': 'numberOfUpdatesDownloaded', 'type': 'int'}, + "download_phase": {"key": "downloadPhase", "type": "str"}, + "percent_complete": {"key": "percentComplete", "type": "int"}, + "total_bytes_to_download": {"key": "totalBytesToDownload", "type": "float"}, + "total_bytes_downloaded": {"key": "totalBytesDownloaded", "type": "float"}, + "number_of_updates_to_download": {"key": "numberOfUpdatesToDownload", "type": "int"}, + "number_of_updates_downloaded": {"key": "numberOfUpdatesDownloaded", "type": "int"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress.py index 668b747c222d..20dc34a695da 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress.py @@ -27,15 +27,15 @@ class UpdateInstallProgress(Model): """ _validation = { - 'percent_complete': {'readonly': True}, - 'number_of_updates_to_install': {'readonly': True}, - 'number_of_updates_installed': {'readonly': True}, + "percent_complete": {"readonly": True}, + "number_of_updates_to_install": {"readonly": True}, + "number_of_updates_installed": {"readonly": True}, } _attribute_map = { - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, - 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + "percent_complete": {"key": "percentComplete", "type": "int"}, + "number_of_updates_to_install": {"key": "numberOfUpdatesToInstall", "type": "int"}, + "number_of_updates_installed": {"key": "numberOfUpdatesInstalled", "type": "int"}, } def __init__(self, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress_py3.py index bced5f250455..2db9b674037c 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_install_progress_py3.py @@ -27,15 +27,15 @@ class UpdateInstallProgress(Model): """ _validation = { - 'percent_complete': {'readonly': True}, - 'number_of_updates_to_install': {'readonly': True}, - 'number_of_updates_installed': {'readonly': True}, + "percent_complete": {"readonly": True}, + "number_of_updates_to_install": {"readonly": True}, + "number_of_updates_installed": {"readonly": True}, } _attribute_map = { - 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, - 'number_of_updates_to_install': {'key': 'numberOfUpdatesToInstall', 'type': 'int'}, - 'number_of_updates_installed': {'key': 'numberOfUpdatesInstalled', 'type': 'int'}, + "percent_complete": {"key": "percentComplete", "type": "int"}, + "number_of_updates_to_install": {"key": "numberOfUpdatesToInstall", "type": "int"}, + "number_of_updates_installed": {"key": "numberOfUpdatesInstalled", "type": "int"}, } def __init__(self, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary.py index 616f79438afd..cb25acec68c8 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary.py @@ -80,53 +80,71 @@ class UpdateSummary(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_completed_download_job_date_time': {'readonly': True}, - 'last_completed_install_job_date_time': {'readonly': True}, - 'total_number_of_updates_available': {'readonly': True}, - 'total_number_of_updates_pending_download': {'readonly': True}, - 'total_number_of_updates_pending_install': {'readonly': True}, - 'reboot_behavior': {'readonly': True}, - 'ongoing_update_operation': {'readonly': True}, - 'in_progress_download_job_id': {'readonly': True}, - 'in_progress_install_job_id': {'readonly': True}, - 'in_progress_download_job_started_date_time': {'readonly': True}, - 'in_progress_install_job_started_date_time': {'readonly': True}, - 'update_titles': {'readonly': True}, - 'total_update_size_in_bytes': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "last_completed_download_job_date_time": {"readonly": True}, + "last_completed_install_job_date_time": {"readonly": True}, + "total_number_of_updates_available": {"readonly": True}, + "total_number_of_updates_pending_download": {"readonly": True}, + "total_number_of_updates_pending_install": {"readonly": True}, + "reboot_behavior": {"readonly": True}, + "ongoing_update_operation": {"readonly": True}, + "in_progress_download_job_id": {"readonly": True}, + "in_progress_install_job_id": {"readonly": True}, + "in_progress_download_job_started_date_time": {"readonly": True}, + "in_progress_install_job_started_date_time": {"readonly": True}, + "update_titles": {"readonly": True}, + "total_update_size_in_bytes": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, - 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, - 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, - 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, - 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, - 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, - 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, - 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, - 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, - 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, - 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, - 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, - 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, - 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, - 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, - 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, - 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "device_version_number": {"key": "properties.deviceVersionNumber", "type": "str"}, + "friendly_device_version_name": {"key": "properties.friendlyDeviceVersionName", "type": "str"}, + "device_last_scanned_date_time": {"key": "properties.deviceLastScannedDateTime", "type": "iso-8601"}, + "last_completed_scan_job_date_time": {"key": "properties.lastCompletedScanJobDateTime", "type": "iso-8601"}, + "last_completed_download_job_date_time": { + "key": "properties.lastCompletedDownloadJobDateTime", + "type": "iso-8601", + }, + "last_completed_install_job_date_time": { + "key": "properties.lastCompletedInstallJobDateTime", + "type": "iso-8601", + }, + "total_number_of_updates_available": {"key": "properties.totalNumberOfUpdatesAvailable", "type": "int"}, + "total_number_of_updates_pending_download": { + "key": "properties.totalNumberOfUpdatesPendingDownload", + "type": "int", + }, + "total_number_of_updates_pending_install": { + "key": "properties.totalNumberOfUpdatesPendingInstall", + "type": "int", + }, + "reboot_behavior": {"key": "properties.rebootBehavior", "type": "str"}, + "ongoing_update_operation": {"key": "properties.ongoingUpdateOperation", "type": "str"}, + "in_progress_download_job_id": {"key": "properties.inProgressDownloadJobId", "type": "str"}, + "in_progress_install_job_id": {"key": "properties.inProgressInstallJobId", "type": "str"}, + "in_progress_download_job_started_date_time": { + "key": "properties.inProgressDownloadJobStartedDateTime", + "type": "iso-8601", + }, + "in_progress_install_job_started_date_time": { + "key": "properties.inProgressInstallJobStartedDateTime", + "type": "iso-8601", + }, + "update_titles": {"key": "properties.updateTitles", "type": "[str]"}, + "total_update_size_in_bytes": {"key": "properties.totalUpdateSizeInBytes", "type": "float"}, } def __init__(self, **kwargs): super(UpdateSummary, self).__init__(**kwargs) - self.device_version_number = kwargs.get('device_version_number', None) - self.friendly_device_version_name = kwargs.get('friendly_device_version_name', None) - self.device_last_scanned_date_time = kwargs.get('device_last_scanned_date_time', None) - self.last_completed_scan_job_date_time = kwargs.get('last_completed_scan_job_date_time', None) + self.device_version_number = kwargs.get("device_version_number", None) + self.friendly_device_version_name = kwargs.get("friendly_device_version_name", None) + self.device_last_scanned_date_time = kwargs.get("device_last_scanned_date_time", None) + self.last_completed_scan_job_date_time = kwargs.get("last_completed_scan_job_date_time", None) self.last_completed_download_job_date_time = None self.last_completed_install_job_date_time = None self.total_number_of_updates_available = None diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary_py3.py index 50f7a3533142..3c239918a3b8 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/update_summary_py3.py @@ -80,48 +80,74 @@ class UpdateSummary(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_completed_download_job_date_time': {'readonly': True}, - 'last_completed_install_job_date_time': {'readonly': True}, - 'total_number_of_updates_available': {'readonly': True}, - 'total_number_of_updates_pending_download': {'readonly': True}, - 'total_number_of_updates_pending_install': {'readonly': True}, - 'reboot_behavior': {'readonly': True}, - 'ongoing_update_operation': {'readonly': True}, - 'in_progress_download_job_id': {'readonly': True}, - 'in_progress_install_job_id': {'readonly': True}, - 'in_progress_download_job_started_date_time': {'readonly': True}, - 'in_progress_install_job_started_date_time': {'readonly': True}, - 'update_titles': {'readonly': True}, - 'total_update_size_in_bytes': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "last_completed_download_job_date_time": {"readonly": True}, + "last_completed_install_job_date_time": {"readonly": True}, + "total_number_of_updates_available": {"readonly": True}, + "total_number_of_updates_pending_download": {"readonly": True}, + "total_number_of_updates_pending_install": {"readonly": True}, + "reboot_behavior": {"readonly": True}, + "ongoing_update_operation": {"readonly": True}, + "in_progress_download_job_id": {"readonly": True}, + "in_progress_install_job_id": {"readonly": True}, + "in_progress_download_job_started_date_time": {"readonly": True}, + "in_progress_install_job_started_date_time": {"readonly": True}, + "update_titles": {"readonly": True}, + "total_update_size_in_bytes": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'device_version_number': {'key': 'properties.deviceVersionNumber', 'type': 'str'}, - 'friendly_device_version_name': {'key': 'properties.friendlyDeviceVersionName', 'type': 'str'}, - 'device_last_scanned_date_time': {'key': 'properties.deviceLastScannedDateTime', 'type': 'iso-8601'}, - 'last_completed_scan_job_date_time': {'key': 'properties.lastCompletedScanJobDateTime', 'type': 'iso-8601'}, - 'last_completed_download_job_date_time': {'key': 'properties.lastCompletedDownloadJobDateTime', 'type': 'iso-8601'}, - 'last_completed_install_job_date_time': {'key': 'properties.lastCompletedInstallJobDateTime', 'type': 'iso-8601'}, - 'total_number_of_updates_available': {'key': 'properties.totalNumberOfUpdatesAvailable', 'type': 'int'}, - 'total_number_of_updates_pending_download': {'key': 'properties.totalNumberOfUpdatesPendingDownload', 'type': 'int'}, - 'total_number_of_updates_pending_install': {'key': 'properties.totalNumberOfUpdatesPendingInstall', 'type': 'int'}, - 'reboot_behavior': {'key': 'properties.rebootBehavior', 'type': 'str'}, - 'ongoing_update_operation': {'key': 'properties.ongoingUpdateOperation', 'type': 'str'}, - 'in_progress_download_job_id': {'key': 'properties.inProgressDownloadJobId', 'type': 'str'}, - 'in_progress_install_job_id': {'key': 'properties.inProgressInstallJobId', 'type': 'str'}, - 'in_progress_download_job_started_date_time': {'key': 'properties.inProgressDownloadJobStartedDateTime', 'type': 'iso-8601'}, - 'in_progress_install_job_started_date_time': {'key': 'properties.inProgressInstallJobStartedDateTime', 'type': 'iso-8601'}, - 'update_titles': {'key': 'properties.updateTitles', 'type': '[str]'}, - 'total_update_size_in_bytes': {'key': 'properties.totalUpdateSizeInBytes', 'type': 'float'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "device_version_number": {"key": "properties.deviceVersionNumber", "type": "str"}, + "friendly_device_version_name": {"key": "properties.friendlyDeviceVersionName", "type": "str"}, + "device_last_scanned_date_time": {"key": "properties.deviceLastScannedDateTime", "type": "iso-8601"}, + "last_completed_scan_job_date_time": {"key": "properties.lastCompletedScanJobDateTime", "type": "iso-8601"}, + "last_completed_download_job_date_time": { + "key": "properties.lastCompletedDownloadJobDateTime", + "type": "iso-8601", + }, + "last_completed_install_job_date_time": { + "key": "properties.lastCompletedInstallJobDateTime", + "type": "iso-8601", + }, + "total_number_of_updates_available": {"key": "properties.totalNumberOfUpdatesAvailable", "type": "int"}, + "total_number_of_updates_pending_download": { + "key": "properties.totalNumberOfUpdatesPendingDownload", + "type": "int", + }, + "total_number_of_updates_pending_install": { + "key": "properties.totalNumberOfUpdatesPendingInstall", + "type": "int", + }, + "reboot_behavior": {"key": "properties.rebootBehavior", "type": "str"}, + "ongoing_update_operation": {"key": "properties.ongoingUpdateOperation", "type": "str"}, + "in_progress_download_job_id": {"key": "properties.inProgressDownloadJobId", "type": "str"}, + "in_progress_install_job_id": {"key": "properties.inProgressInstallJobId", "type": "str"}, + "in_progress_download_job_started_date_time": { + "key": "properties.inProgressDownloadJobStartedDateTime", + "type": "iso-8601", + }, + "in_progress_install_job_started_date_time": { + "key": "properties.inProgressInstallJobStartedDateTime", + "type": "iso-8601", + }, + "update_titles": {"key": "properties.updateTitles", "type": "[str]"}, + "total_update_size_in_bytes": {"key": "properties.totalUpdateSizeInBytes", "type": "float"}, } - def __init__(self, *, device_version_number: str=None, friendly_device_version_name: str=None, device_last_scanned_date_time=None, last_completed_scan_job_date_time=None, **kwargs) -> None: + def __init__( + self, + *, + device_version_number: str = None, + friendly_device_version_name: str = None, + device_last_scanned_date_time=None, + last_completed_scan_job_date_time=None, + **kwargs + ) -> None: super(UpdateSummary, self).__init__(**kwargs) self.device_version_number = device_version_number self.friendly_device_version_name = friendly_device_version_name diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request.py index cc14dab31e71..b555afbeafd2 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request.py @@ -26,15 +26,15 @@ class UploadCertificateRequest(Model): """ _validation = { - 'certificate': {'required': True}, + "certificate": {"required": True}, } _attribute_map = { - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, - 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + "authentication_type": {"key": "properties.authenticationType", "type": "str"}, + "certificate": {"key": "properties.certificate", "type": "str"}, } def __init__(self, **kwargs): super(UploadCertificateRequest, self).__init__(**kwargs) - self.authentication_type = kwargs.get('authentication_type', None) - self.certificate = kwargs.get('certificate', None) + self.authentication_type = kwargs.get("authentication_type", None) + self.certificate = kwargs.get("certificate", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request_py3.py index 6cd9961eb131..5b1d855ac4ca 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_request_py3.py @@ -26,12 +26,12 @@ class UploadCertificateRequest(Model): """ _validation = { - 'certificate': {'required': True}, + "certificate": {"required": True}, } _attribute_map = { - 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, - 'certificate': {'key': 'properties.certificate', 'type': 'str'}, + "authentication_type": {"key": "properties.authenticationType", "type": "str"}, + "certificate": {"key": "properties.certificate", "type": "str"}, } def __init__(self, *, certificate: str, authentication_type=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response.py index f59e612bc3e5..10618d4313eb 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response.py @@ -39,30 +39,30 @@ class UploadCertificateResponse(Model): """ _validation = { - 'resource_id': {'required': True}, - 'aad_authority': {'required': True}, - 'aad_tenant_id': {'required': True}, - 'service_principal_client_id': {'required': True}, - 'service_principal_object_id': {'required': True}, - 'azure_management_endpoint_audience': {'required': True}, + "resource_id": {"required": True}, + "aad_authority": {"required": True}, + "aad_tenant_id": {"required": True}, + "service_principal_client_id": {"required": True}, + "service_principal_object_id": {"required": True}, + "azure_management_endpoint_audience": {"required": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, - 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, - 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, - 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, - 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + "auth_type": {"key": "authType", "type": "str"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "aad_authority": {"key": "aadAuthority", "type": "str"}, + "aad_tenant_id": {"key": "aadTenantId", "type": "str"}, + "service_principal_client_id": {"key": "servicePrincipalClientId", "type": "str"}, + "service_principal_object_id": {"key": "servicePrincipalObjectId", "type": "str"}, + "azure_management_endpoint_audience": {"key": "azureManagementEndpointAudience", "type": "str"}, } def __init__(self, **kwargs): super(UploadCertificateResponse, self).__init__(**kwargs) - self.auth_type = kwargs.get('auth_type', None) - self.resource_id = kwargs.get('resource_id', None) - self.aad_authority = kwargs.get('aad_authority', None) - self.aad_tenant_id = kwargs.get('aad_tenant_id', None) - self.service_principal_client_id = kwargs.get('service_principal_client_id', None) - self.service_principal_object_id = kwargs.get('service_principal_object_id', None) - self.azure_management_endpoint_audience = kwargs.get('azure_management_endpoint_audience', None) + self.auth_type = kwargs.get("auth_type", None) + self.resource_id = kwargs.get("resource_id", None) + self.aad_authority = kwargs.get("aad_authority", None) + self.aad_tenant_id = kwargs.get("aad_tenant_id", None) + self.service_principal_client_id = kwargs.get("service_principal_client_id", None) + self.service_principal_object_id = kwargs.get("service_principal_object_id", None) + self.azure_management_endpoint_audience = kwargs.get("azure_management_endpoint_audience", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response_py3.py index 5d2c61d1cd9a..c3ca53ac7280 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/upload_certificate_response_py3.py @@ -39,25 +39,36 @@ class UploadCertificateResponse(Model): """ _validation = { - 'resource_id': {'required': True}, - 'aad_authority': {'required': True}, - 'aad_tenant_id': {'required': True}, - 'service_principal_client_id': {'required': True}, - 'service_principal_object_id': {'required': True}, - 'azure_management_endpoint_audience': {'required': True}, + "resource_id": {"required": True}, + "aad_authority": {"required": True}, + "aad_tenant_id": {"required": True}, + "service_principal_client_id": {"required": True}, + "service_principal_object_id": {"required": True}, + "azure_management_endpoint_audience": {"required": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, - 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, - 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, - 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, - 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + "auth_type": {"key": "authType", "type": "str"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "aad_authority": {"key": "aadAuthority", "type": "str"}, + "aad_tenant_id": {"key": "aadTenantId", "type": "str"}, + "service_principal_client_id": {"key": "servicePrincipalClientId", "type": "str"}, + "service_principal_object_id": {"key": "servicePrincipalObjectId", "type": "str"}, + "azure_management_endpoint_audience": {"key": "azureManagementEndpointAudience", "type": "str"}, } - def __init__(self, *, resource_id: str, aad_authority: str, aad_tenant_id: str, service_principal_client_id: str, service_principal_object_id: str, azure_management_endpoint_audience: str, auth_type=None, **kwargs) -> None: + def __init__( + self, + *, + resource_id: str, + aad_authority: str, + aad_tenant_id: str, + service_principal_client_id: str, + service_principal_object_id: str, + azure_management_endpoint_audience: str, + auth_type=None, + **kwargs + ) -> None: super(UploadCertificateResponse, self).__init__(**kwargs) self.auth_type = auth_type self.resource_id = resource_id diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user.py index 89877d824ed5..43b6c97c75b6 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user.py @@ -35,20 +35,20 @@ class User(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, - 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "encrypted_password": {"key": "properties.encryptedPassword", "type": "AsymmetricEncryptedSecret"}, + "share_access_rights": {"key": "properties.shareAccessRights", "type": "[ShareAccessRight]"}, } def __init__(self, **kwargs): super(User, self).__init__(**kwargs) - self.encrypted_password = kwargs.get('encrypted_password', None) - self.share_access_rights = kwargs.get('share_access_rights', None) + self.encrypted_password = kwargs.get("encrypted_password", None) + self.share_access_rights = kwargs.get("share_access_rights", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right.py index 6c11abcd8459..febcaf3355c2 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right.py @@ -25,16 +25,16 @@ class UserAccessRight(Model): """ _validation = { - 'user_id': {'required': True}, - 'access_type': {'required': True}, + "user_id": {"required": True}, + "access_type": {"required": True}, } _attribute_map = { - 'user_id': {'key': 'userId', 'type': 'str'}, - 'access_type': {'key': 'accessType', 'type': 'str'}, + "user_id": {"key": "userId", "type": "str"}, + "access_type": {"key": "accessType", "type": "str"}, } def __init__(self, **kwargs): super(UserAccessRight, self).__init__(**kwargs) - self.user_id = kwargs.get('user_id', None) - self.access_type = kwargs.get('access_type', None) + self.user_id = kwargs.get("user_id", None) + self.access_type = kwargs.get("access_type", None) diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right_py3.py index b85c7e8329f0..47fdd7a65306 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_access_right_py3.py @@ -25,13 +25,13 @@ class UserAccessRight(Model): """ _validation = { - 'user_id': {'required': True}, - 'access_type': {'required': True}, + "user_id": {"required": True}, + "access_type": {"required": True}, } _attribute_map = { - 'user_id': {'key': 'userId', 'type': 'str'}, - 'access_type': {'key': 'accessType', 'type': 'str'}, + "user_id": {"key": "userId", "type": "str"}, + "access_type": {"key": "accessType", "type": "str"}, } def __init__(self, *, user_id: str, access_type, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_paged.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_paged.py index 3348bf4a6158..da42bfd1e66a 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_paged.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_paged.py @@ -18,8 +18,8 @@ class UserPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[User]'} + "next_link": {"key": "nextLink", "type": "str"}, + "current_page": {"key": "value", "type": "[User]"}, } def __init__(self, *args, **kwargs): diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_py3.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_py3.py index 6d362234f3a5..bda139e449da 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_py3.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/user_py3.py @@ -35,17 +35,17 @@ class User(ARMBaseModel): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'encrypted_password': {'key': 'properties.encryptedPassword', 'type': 'AsymmetricEncryptedSecret'}, - 'share_access_rights': {'key': 'properties.shareAccessRights', 'type': '[ShareAccessRight]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "encrypted_password": {"key": "properties.encryptedPassword", "type": "AsymmetricEncryptedSecret"}, + "share_access_rights": {"key": "properties.shareAccessRights", "type": "[ShareAccessRight]"}, } def __init__(self, *, encrypted_password=None, share_access_rights=None, **kwargs) -> None: diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/__init__.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/__init__.py index 14f1c0cbf000..fcb4824658cb 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/__init__.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/__init__.py @@ -23,16 +23,16 @@ from .users_operations import UsersOperations __all__ = [ - 'Operations', - 'DevicesOperations', - 'AlertsOperations', - 'BandwidthSchedulesOperations', - 'JobsOperations', - 'OperationsStatusOperations', - 'OrdersOperations', - 'RolesOperations', - 'SharesOperations', - 'StorageAccountCredentialsOperations', - 'TriggersOperations', - 'UsersOperations', + "Operations", + "DevicesOperations", + "AlertsOperations", + "BandwidthSchedulesOperations", + "JobsOperations", + "OperationsStatusOperations", + "OrdersOperations", + "RolesOperations", + "SharesOperations", + "StorageAccountCredentialsOperations", + "TriggersOperations", + "UsersOperations", ] diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/alerts_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/alerts_operations.py index 9537b3dc4584..31a47a4443d9 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/alerts_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/alerts_operations.py @@ -38,7 +38,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Gets all the alerts for a data box edge/gateway device. :param device_name: The device name. @@ -55,21 +56,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.AlertPaged[~azure.mgmt.edgegateway.models.Alert] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -77,13 +81,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -91,7 +97,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -105,10 +111,12 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets an alert by name. :param device_name: The device name. @@ -128,28 +136,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -157,17 +167,20 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Alert', response) + deserialized = self._deserialize("Alert", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}'} + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/bandwidth_schedules_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/bandwidth_schedules_operations.py index 78fb14677096..6fc06c77c6c7 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/bandwidth_schedules_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/bandwidth_schedules_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Gets all the bandwidth schedules for a data box edge/gateway device. :param device_name: The device name. @@ -57,21 +58,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.BandwidthSchedulePaged[~azure.mgmt.edgegateway.models.BandwidthSchedule] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -79,13 +83,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -93,7 +99,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -103,14 +109,18 @@ def internal_paging(next_link=None, raw=False): if raw: header_dict = {} - client_raw_response = models.BandwidthSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.BandwidthSchedulePaged( + internal_paging, self._deserialize.dependencies, header_dict + ) return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets the properties of the specified bandwidth schedule. :param device_name: The device name. @@ -130,28 +140,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -159,51 +171,56 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BandwidthSchedule', response) + deserialized = self._deserialize("BandwidthSchedule", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" + } def _create_or_update_initial( - self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(parameters, 'BandwidthSchedule') + body_content = self._serialize.body(parameters, "BandwidthSchedule") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -211,13 +228,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BandwidthSchedule', response) + deserialized = self._deserialize("BandwidthSchedule", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -226,7 +243,16 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, name, parameters, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + name, + parameters, + resource_group_name, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Creates or updates a bandwidth schedule. :param device_name: The device name. @@ -262,7 +288,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('BandwidthSchedule', response) + deserialized = self._deserialize("BandwidthSchedule", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -270,40 +296,46 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" + } def _delete_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -311,7 +343,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -319,7 +351,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the specified bandwidth schedule. :param device_name: The device name. @@ -353,11 +386,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}'} + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/devices_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/devices_operations.py index 86a970638203..89af34f2b1a0 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/devices_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/devices_operations.py @@ -39,8 +39,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list_by_subscription( - self, expand=None, custom_headers=None, raw=False, **operation_config): + def list_by_subscription(self, expand=None, custom_headers=None, raw=False, **operation_config): """Gets all the data box edge/gateway devices in a subscription. :param expand: Specify $expand=details to populate additional fields @@ -57,21 +56,24 @@ def list_by_subscription( ~azure.mgmt.edgegateway.models.DataBoxEdgeDevicePaged[~azure.mgmt.edgegateway.models.DataBoxEdgeDevice] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list_by_subscription.metadata["url"] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters["$expand"] = self._serialize.query("expand", expand, "str") else: url = next_link @@ -79,13 +81,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -93,7 +97,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -103,14 +107,20 @@ def internal_paging(next_link=None, raw=False): if raw: header_dict = {} - client_raw_response = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.DataBoxEdgeDevicePaged( + internal_paging, self._deserialize.dependencies, header_dict + ) return client_raw_response return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} + + list_by_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" + } def list_by_resource_group( - self, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config + ): """Gets all the data box edge/gateway devices in a resource group. :param resource_group_name: The resource group name. @@ -129,22 +139,25 @@ def list_by_resource_group( ~azure.mgmt.edgegateway.models.DataBoxEdgeDevicePaged[~azure.mgmt.edgegateway.models.DataBoxEdgeDevice] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list_by_resource_group.metadata["url"] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters["$expand"] = self._serialize.query("expand", expand, "str") else: url = next_link @@ -152,13 +165,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -166,7 +181,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -176,14 +191,18 @@ def internal_paging(next_link=None, raw=False): if raw: header_dict = {} - client_raw_response = models.DataBoxEdgeDevicePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.DataBoxEdgeDevicePaged( + internal_paging, self._deserialize.dependencies, header_dict + ) return client_raw_response return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices'} - def get( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" + } + + def get(self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets the properties of the data box edge/gateway device. :param device_name: The device name. @@ -201,27 +220,29 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -229,50 +250,55 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DataBoxEdgeDevice', response) + deserialized = self._deserialize("DataBoxEdgeDevice", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + } def _create_or_update_initial( - self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(data_box_edge_device, 'DataBoxEdgeDevice') + body_content = self._serialize.body(data_box_edge_device, "DataBoxEdgeDevice") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -280,13 +306,13 @@ def _create_or_update_initial( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DataBoxEdgeDevice', response) + deserialized = self._deserialize("DataBoxEdgeDevice", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -295,7 +321,15 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, data_box_edge_device, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + data_box_edge_device, + resource_group_name, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Creates or updates a Data Box Edge/Gateway resource. :param device_name: The device name. @@ -328,7 +362,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('DataBoxEdgeDevice', response) + deserialized = self._deserialize("DataBoxEdgeDevice", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -336,39 +370,43 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + } - def _delete_initial( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + def _delete_initial(self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -376,7 +414,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -384,7 +422,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the data box edge/gateway device. :param device_name: The device name. @@ -415,17 +454,20 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} - def update( - self, device_name, resource_group_name, tags=None, custom_headers=None, raw=False, **operation_config): + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + } + + def update(self, device_name, resource_group_name, tags=None, custom_headers=None, raw=False, **operation_config): """Modifies a Data Box Edge/Gateway resource. :param device_name: The device name. @@ -447,31 +489,33 @@ def update( parameters = models.DataBoxEdgeDevicePatch(tags=tags) # Construct URL - url = self.update.metadata['url'] + url = self.update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(parameters, 'DataBoxEdgeDevicePatch') + body_content = self._serialize.body(parameters, "DataBoxEdgeDevicePatch") # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -479,45 +523,50 @@ def update( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DataBoxEdgeDevice', response) + deserialized = self._deserialize("DataBoxEdgeDevice", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}'} + update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + } def _download_updates_initial( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.download_updates.metadata['url'] + url = self.download_updates.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters) @@ -525,7 +574,7 @@ def _download_updates_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -533,7 +582,8 @@ def _download_updates_initial( return client_raw_response def download_updates( - self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Downloads the updates on a data box edge/gateway device. :param device_name: The device name. @@ -564,17 +614,22 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - download_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates'} + + download_updates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates" + } def get_extended_information( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Gets additional information for the specified data box edge/gateway device. @@ -594,27 +649,29 @@ def get_extended_information( :raises: :class:`CloudError` """ # Construct URL - url = self.get_extended_information.metadata['url'] + url = self.get_extended_information.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters) @@ -622,45 +679,50 @@ def get_extended_information( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DataBoxEdgeDeviceExtendedInfo', response) + deserialized = self._deserialize("DataBoxEdgeDeviceExtendedInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_extended_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation'} + get_extended_information.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation" + } def _install_updates_initial( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.install_updates.metadata['url'] + url = self.install_updates.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters) @@ -668,7 +730,7 @@ def _install_updates_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -676,7 +738,8 @@ def _install_updates_initial( return client_raw_response def install_updates( - self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Installs the updates on the data box edge/gateway device. :param device_name: The device name. @@ -707,17 +770,22 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - install_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates'} + + install_updates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates" + } def get_network_settings( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Gets the network settings of the specified data box edge/gateway device. @@ -736,27 +804,29 @@ def get_network_settings( :raises: :class:`CloudError` """ # Construct URL - url = self.get_network_settings.metadata['url'] + url = self.get_network_settings.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -764,45 +834,50 @@ def get_network_settings( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NetworkSettings', response) + deserialized = self._deserialize("NetworkSettings", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_network_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default'} + get_network_settings.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default" + } def _scan_for_updates_initial( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.scan_for_updates.metadata['url'] + url = self.scan_for_updates.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters) @@ -810,7 +885,7 @@ def _scan_for_updates_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -818,7 +893,8 @@ def _scan_for_updates_initial( return client_raw_response def scan_for_updates( - self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Scans for updates on a data box edge/gateway device. :param device_name: The device name. @@ -849,45 +925,57 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - scan_for_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates'} + scan_for_updates.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates" + } def _create_or_update_security_settings_initial( - self, device_name, resource_group_name, device_admin_password, custom_headers=None, raw=False, **operation_config): + self, + device_name, + resource_group_name, + device_admin_password, + custom_headers=None, + raw=False, + **operation_config + ): security_settings = models.SecuritySettings(device_admin_password=device_admin_password) # Construct URL - url = self.create_or_update_security_settings.metadata['url'] + url = self.create_or_update_security_settings.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(security_settings, 'SecuritySettings') + body_content = self._serialize.body(security_settings, "SecuritySettings") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -895,7 +983,7 @@ def _create_or_update_security_settings_initial( if response.status_code not in [202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -903,7 +991,15 @@ def _create_or_update_security_settings_initial( return client_raw_response def create_or_update_security_settings( - self, device_name, resource_group_name, device_admin_password, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + resource_group_name, + device_admin_password, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Updates the security settings on a data box edge/gateway device. :param device_name: The device name. @@ -942,17 +1038,20 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update_security_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update'} - def get_update_summary( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + create_or_update_security_settings.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update" + } + + def get_update_summary(self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets information about the availability of updates based on the last scan of the device. It also gets information about any ongoing download or install jobs on the device. @@ -972,27 +1071,29 @@ def get_update_summary( :raises: :class:`CloudError` """ # Construct URL - url = self.get_update_summary.metadata['url'] + url = self.get_update_summary.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -1000,23 +1101,34 @@ def get_update_summary( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UpdateSummary', response) + deserialized = self._deserialize("UpdateSummary", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_update_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default'} + + get_update_summary.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default" + } def upload_certificate( - self, device_name, resource_group_name, certificate, authentication_type=None, custom_headers=None, raw=False, **operation_config): + self, + device_name, + resource_group_name, + certificate, + authentication_type=None, + custom_headers=None, + raw=False, + **operation_config + ): """Uploads registration certificate for the device. :param device_name: The device name. @@ -1042,31 +1154,33 @@ def upload_certificate( parameters = models.UploadCertificateRequest(authentication_type=authentication_type, certificate=certificate) # Construct URL - url = self.upload_certificate.metadata['url'] + url = self.upload_certificate.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(parameters, 'UploadCertificateRequest') + body_content = self._serialize.body(parameters, "UploadCertificateRequest") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1074,17 +1188,20 @@ def upload_certificate( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UploadCertificateResponse', response) + deserialized = self._deserialize("UploadCertificateResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - upload_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate'} + + upload_certificate.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/jobs_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/jobs_operations.py index 8ec8071d27fb..8159647bc47c 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/jobs_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/jobs_operations.py @@ -37,8 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets the details of a specified job on a data box edge/gateway device. :param device_name: The device name. @@ -58,28 +57,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -87,17 +88,20 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Job', response) + deserialized = self._deserialize("Job", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}'} + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations.py index 9fb389c58c62..7988f4b5ecd9 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations.py @@ -37,8 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def list( - self, custom_headers=None, raw=False, **operation_config): + def list(self, custom_headers=None, raw=False, **operation_config): """List all the supported operations. :param dict custom_headers: headers that will be added to the request @@ -51,15 +50,16 @@ def list( ~azure.mgmt.edgegateway.models.OperationPaged[~azure.mgmt.edgegateway.models.Operation] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -67,13 +67,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -81,7 +83,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -95,4 +97,5 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/providers/Microsoft.DataBoxEdge/operations'} + + list.metadata = {"url": "/providers/Microsoft.DataBoxEdge/operations"} diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations_status_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations_status_operations.py index d99bca1eae46..85ec89c22053 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations_status_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/operations_status_operations.py @@ -37,8 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets the details of a specified job on a data box edge/gateway device. :param device_name: The device name. @@ -58,28 +57,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -87,17 +88,20 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Job', response) + deserialized = self._deserialize("Job", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}'} + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/orders_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/orders_operations.py index f0a1d5053904..f38100d57100 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/orders_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/orders_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Lists all the orders related to a data box edge/gateway device. :param device_name: The device name. @@ -57,21 +58,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.OrderPaged[~azure.mgmt.edgegateway.models.Order] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -79,13 +83,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -93,7 +99,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -107,10 +113,12 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders'} - def get( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders" + } + + def get(self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets a specific order by name. :param device_name: The device name. @@ -128,27 +136,29 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -156,50 +166,55 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Order', response) + deserialized = self._deserialize("Order", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" + } def _create_or_update_initial( - self, device_name, order, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, order, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(order, 'Order') + body_content = self._serialize.body(order, "Order") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -207,13 +222,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Order', response) + deserialized = self._deserialize("Order", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -222,7 +237,8 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, order, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, order, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Creates or updates an order. :param device_name: The device name. @@ -254,7 +270,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('Order', response) + deserialized = self._deserialize("Order", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -262,39 +278,43 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" + } - def _delete_initial( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + def _delete_initial(self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -302,7 +322,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -310,7 +330,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the order related to the device. :param device_name: The device name. @@ -341,11 +362,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default'} + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/roles_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/roles_operations.py index 6e745a900f3f..a4b145f619e6 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/roles_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/roles_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Lists all the roles configured in a data box edge/gateway device. :param device_name: The device name. @@ -57,21 +58,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.RolePaged[~azure.mgmt.edgegateway.models.Role] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -79,13 +83,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -93,7 +99,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -107,10 +113,12 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets a specific role by name. :param device_name: The device name. @@ -130,28 +138,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -159,51 +169,56 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Role', response) + deserialized = self._deserialize("Role", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" + } def _create_or_update_initial( - self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(role, 'Role') + body_content = self._serialize.body(role, "Role") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -211,13 +226,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Role', response) + deserialized = self._deserialize("Role", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -226,7 +241,16 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, name, role, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + name, + role, + resource_group_name, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Create or update a role. :param device_name: The device name. @@ -261,7 +285,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('Role', response) + deserialized = self._deserialize("Role", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -269,40 +293,46 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" + } def _delete_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -310,7 +340,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -318,7 +348,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the role on the data box edge device. :param device_name: The device name. @@ -352,11 +383,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}'} + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/shares_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/shares_operations.py index 48c928dce48f..207b82cdfb1f 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/shares_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/shares_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Lists all the shares in a data box edge/gateway device. :param device_name: The device name. @@ -57,21 +58,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.SharePaged[~azure.mgmt.edgegateway.models.Share] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -79,13 +83,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -93,7 +99,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -107,10 +113,12 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets a share by name. :param device_name: The device name. @@ -130,28 +138,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -159,51 +169,56 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Share', response) + deserialized = self._deserialize("Share", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" + } def _create_or_update_initial( - self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(share, 'Share') + body_content = self._serialize.body(share, "Share") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -211,13 +226,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Share', response) + deserialized = self._deserialize("Share", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -226,7 +241,16 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, name, share, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + name, + share, + resource_group_name, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Creates a new share or updates an existing share on the device. :param device_name: The device name. @@ -261,7 +285,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('Share', response) + deserialized = self._deserialize("Share", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -269,40 +293,46 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" + } def _delete_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -310,7 +340,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -318,7 +348,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the share on the data box edge/gateway device. :param device_name: The device name. @@ -352,40 +383,46 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}'} + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" + } def _refresh_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.refresh.metadata['url'] + url = self.refresh.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters) @@ -393,7 +430,7 @@ def _refresh_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -401,7 +438,8 @@ def _refresh_initial( return client_raw_response def refresh( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Refreshes the share metadata with the data from the cloud. :param device_name: The device name. @@ -435,11 +473,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh'} + + refresh.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/storage_account_credentials_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/storage_account_credentials_operations.py index 60a5e1ab2367..a5b7be88abfc 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/storage_account_credentials_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/storage_account_credentials_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Gets all the storage account credentials in a data box edge/gateway device. @@ -58,21 +59,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.StorageAccountCredentialPaged[~azure.mgmt.edgegateway.models.StorageAccountCredential] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -80,13 +84,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -94,7 +100,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -104,14 +110,18 @@ def internal_paging(next_link=None, raw=False): if raw: header_dict = {} - client_raw_response = models.StorageAccountCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.StorageAccountCredentialPaged( + internal_paging, self._deserialize.dependencies, header_dict + ) return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets the properties of the specified storage account credential. :param device_name: The device name. @@ -131,28 +141,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -160,51 +172,63 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('StorageAccountCredential', response) + deserialized = self._deserialize("StorageAccountCredential", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" + } def _create_or_update_initial( - self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, + device_name, + name, + storage_account_credential, + resource_group_name, + custom_headers=None, + raw=False, + **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(storage_account_credential, 'StorageAccountCredential') + body_content = self._serialize.body(storage_account_credential, "StorageAccountCredential") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -212,13 +236,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('StorageAccountCredential', response) + deserialized = self._deserialize("StorageAccountCredential", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -227,7 +251,16 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, name, storage_account_credential, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + name, + storage_account_credential, + resource_group_name, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Creates or updates the storage account credential. :param device_name: The device name. @@ -264,7 +297,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('StorageAccountCredential', response) + deserialized = self._deserialize("StorageAccountCredential", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -272,40 +305,46 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" + } def _delete_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -313,7 +352,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -321,7 +360,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the storage account credential. :param device_name: The device name. @@ -355,11 +395,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}'} + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/triggers_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/triggers_operations.py index 540261f493d6..37a73e588756 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/triggers_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/triggers_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config + ): """Lists all the triggers configured in the device. :param device_name: The device name. @@ -60,23 +61,26 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.TriggerPaged[~azure.mgmt.edgegateway.models.Trigger] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters["$expand"] = self._serialize.query("expand", expand, "str") else: url = next_link @@ -84,13 +88,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -98,7 +104,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -112,10 +118,12 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Get a specific trigger by name. :param device_name: The device name. @@ -135,28 +143,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -164,51 +174,56 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Trigger', response) + deserialized = self._deserialize("Trigger", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" + } def _create_or_update_initial( - self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(trigger, 'Trigger') + body_content = self._serialize.body(trigger, "Trigger") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -216,13 +231,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Trigger', response) + deserialized = self._deserialize("Trigger", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -231,7 +246,16 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, name, trigger, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + name, + trigger, + resource_group_name, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Creates or updates a trigger. :param device_name: Creates or updates a trigger @@ -266,7 +290,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('Trigger', response) + deserialized = self._deserialize("Trigger", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -274,40 +298,46 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" + } def _delete_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -315,7 +345,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -323,7 +353,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the trigger on the gateway device. :param device_name: The device name. @@ -357,11 +388,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}'} + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/users_operations.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/users_operations.py index 34a966ac969d..7c909faf739f 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/users_operations.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/operations/users_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list_by_data_box_edge_device( - self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): """Gets all the users registered on a data box edge/gateway device. :param device_name: The device name. @@ -57,21 +58,24 @@ def list_by_data_box_edge_device( ~azure.mgmt.edgegateway.models.UserPaged[~azure.mgmt.edgegateway.models.User] :raises: :class:`CloudError` """ + def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_data_box_edge_device.metadata['url'] + url = self.list_by_data_box_edge_device.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "subscriptionId": self._serialize.url( + "self.config.subscription_id", self.config.subscription_id, "str" + ), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") else: url = next_link @@ -79,13 +83,15 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -93,7 +99,7 @@ def internal_paging(next_link=None, raw=False): if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp return response @@ -107,10 +113,12 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_data_box_edge_device.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users'} - def get( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + list_by_data_box_edge_device.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users" + } + + def get(self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): """Gets the properties of the specified user. :param device_name: The device name. @@ -130,28 +138,30 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) @@ -159,53 +169,66 @@ def get( if response.status_code not in [200]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('User', response) + deserialized = self._deserialize("User", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" + } def _create_or_update_initial( - self, device_name, name, resource_group_name, encrypted_password=None, share_access_rights=None, custom_headers=None, raw=False, **operation_config): + self, + device_name, + name, + resource_group_name, + encrypted_password=None, + share_access_rights=None, + custom_headers=None, + raw=False, + **operation_config + ): user = models.User(encrypted_password=encrypted_password, share_access_rights=share_access_rights) # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct body - body_content = self._serialize.body(user, 'User') + body_content = self._serialize.body(user, "User") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -213,13 +236,13 @@ def _create_or_update_initial( if response.status_code not in [200, 202]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('User', response) + deserialized = self._deserialize("User", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -228,7 +251,17 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, device_name, name, resource_group_name, encrypted_password=None, share_access_rights=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, + device_name, + name, + resource_group_name, + encrypted_password=None, + share_access_rights=None, + custom_headers=None, + raw=False, + polling=True, + **operation_config + ): """Creates a new user or updates an existing user's information on a data box edge/gateway device. @@ -270,7 +303,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('User', response) + deserialized = self._deserialize("User", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -278,40 +311,46 @@ def get_long_running_output(response): return deserialized - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + create_or_update.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" + } def _delete_initial( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, **operation_config + ): # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'deviceName': self._serialize.url("device_name", device_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + "deviceName": self._serialize.url("device_name", device_name, "str"), + "name": self._serialize.url("name", name, "str"), + "subscriptionId": self._serialize.url("self.config.subscription_id", self.config.subscription_id, "str"), + "resourceGroupName": self._serialize.url("resource_group_name", resource_group_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + header_parameters["x-ms-client-request-id"] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + header_parameters["accept-language"] = self._serialize.header( + "self.config.accept_language", self.config.accept_language, "str" + ) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) @@ -319,7 +358,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + exp.request_id = response.headers.get("x-ms-request-id") raise exp if raw: @@ -327,7 +366,8 @@ def _delete_initial( return client_raw_response def delete( - self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, device_name, name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config + ): """Deletes the user on a databox edge/gateway device. :param device_name: The device name. @@ -361,11 +401,15 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + lro_delay = operation_config.get("long_running_operation_timeout", self.config.long_running_operation_timeout) + if polling is True: + polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}'} + + delete.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" + } diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/version.py b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/version.py index e0ec669828cb..fb0159ed93d7 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/version.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/version.py @@ -10,4 +10,3 @@ # -------------------------------------------------------------------------- VERSION = "0.1.0" - diff --git a/sdk/edgegateway/azure-mgmt-edgegateway/setup.py b/sdk/edgegateway/azure-mgmt-edgegateway/setup.py index c489cb031d28..8092be5f2026 100644 --- a/sdk/edgegateway/azure-mgmt-edgegateway/setup.py +++ b/sdk/edgegateway/azure-mgmt-edgegateway/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,59 +16,65 @@ PACKAGE_PPRINT_NAME = "Data Box Edge / Data Box Gateway" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), install_requires=[ - 'msrest>=0.6.21', - 'msrestazure>=0.4.32,<2.0.0', - 'azure-common~=1.1', + "msrest>=0.6.21", + "msrestazure>=0.4.32,<2.0.0", + "azure-common~=1.1", ], - python_requires=">=3.6" + python_requires=">=3.6", ) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_patch.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_patch.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/_patch.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_patch.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/_patch.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py +++ b/sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/edgezones/azure-mgmt-edgezones/setup.py b/sdk/edgezones/azure-mgmt-edgezones/setup.py index 7e93515ed9c8..b32a160dbf9d 100644 --- a/sdk/edgezones/azure-mgmt-edgezones/setup.py +++ b/sdk/edgezones/azure-mgmt-edgezones/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/education/azure-mgmt-education/azure/mgmt/education/_patch.py b/sdk/education/azure-mgmt-education/azure/mgmt/education/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/education/azure-mgmt-education/azure/mgmt/education/_patch.py +++ b/sdk/education/azure-mgmt-education/azure/mgmt/education/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/_patch.py b/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/_patch.py +++ b/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/operations/_patch.py b/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/operations/_patch.py +++ b/sdk/education/azure-mgmt-education/azure/mgmt/education/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/education/azure-mgmt-education/azure/mgmt/education/models/_patch.py b/sdk/education/azure-mgmt-education/azure/mgmt/education/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/education/azure-mgmt-education/azure/mgmt/education/models/_patch.py +++ b/sdk/education/azure-mgmt-education/azure/mgmt/education/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/education/azure-mgmt-education/azure/mgmt/education/operations/_patch.py b/sdk/education/azure-mgmt-education/azure/mgmt/education/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/education/azure-mgmt-education/azure/mgmt/education/operations/_patch.py +++ b/sdk/education/azure-mgmt-education/azure/mgmt/education/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/education/azure-mgmt-education/setup.py b/sdk/education/azure-mgmt-education/setup.py index 37fbe1a00cef..f6e762f2266e 100644 --- a/sdk/education/azure-mgmt-education/setup.py +++ b/sdk/education/azure-mgmt-education/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Education Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/_patch.py b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/_patch.py +++ b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/_patch.py b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/_patch.py +++ b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/operations/_patch.py b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/operations/_patch.py +++ b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/models/_patch.py b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/models/_patch.py +++ b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/operations/_patch.py b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/operations/_patch.py +++ b/sdk/elastic/azure-mgmt-elastic/azure/mgmt/elastic/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_patch.py b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_patch.py +++ b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/_patch.py b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/_patch.py +++ b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/operations/_patch.py b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/operations/_patch.py +++ b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/models/_patch.py b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/models/_patch.py +++ b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/operations/_patch.py b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/operations/_patch.py +++ b/sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/__init__.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/__init__.py index 6703b2ca111f..9ed265e0b496 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/__init__.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/__init__.py @@ -50,7 +50,6 @@ from ._aoai.score_model_grader import AzureOpenAIScoreModelGrader from ._aoai.python_grader import AzureOpenAIPythonGrader - _patch_all = [] # The converter from the AI service to the evaluator schema requires a dependency on diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_azure/_clients.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_azure/_clients.py index feba947600ca..e42b56e91f99 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_azure/_clients.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_azure/_clients.py @@ -16,7 +16,6 @@ from azure.ai.evaluation._constants import TokenScope from ._models import BlobStoreInfo, Workspace - API_VERSION: Final[str] = "2024-07-01-preview" QUERY_KEY_API_VERSION: Final[str] = "api-version" PATH_ML_WORKSPACES = ("providers", "Microsoft.MachineLearningServices", "workspaces") diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_vendor.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_vendor.py index 5427bc33d4bb..2c9ac09e581c 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_vendor.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/_vendor.py @@ -10,7 +10,6 @@ from ._model_base import Model, SdkJSONEncoder - # file-like tuple could be `(filename, IO (or bytes))` or `(filename, IO (or bytes), content_type)` FileContent = Union[str, bytes, IO[str], IO[bytes]] diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/models/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/models/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_patch.py index 1bb0db275def..66a489d3b33d 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_patch.py index 1bb0db275def..66a489d3b33d 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_patch.py index 1bb0db275def..66a489d3b33d 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/operations/_patch.py index 1bb0db275def..66a489d3b33d 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/onedp/servicepatterns/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py index c5197e75dea3..45f184711806 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py @@ -40,7 +40,6 @@ ) from .utils import get_harm_severity_level, retrieve_content_type - LOGGER = logging.getLogger(__name__) USER_TEXT_TEMPLATE_DICT: Dict[str, Template] = { diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/models/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/models/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/raiclient/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_batch_run/proxy_client.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_batch_run/proxy_client.py index 013b5622450c..141c2630ae96 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_batch_run/proxy_client.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_batch_run/proxy_client.py @@ -21,7 +21,6 @@ from azure.ai.evaluation._evaluate._batch_run.batch_clients import BatchClientRun, HasAsyncCallable - try: Configuration.get_instance().set_config("trace.destination", "none") except Exception: diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate_aoai.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate_aoai.py index a548fc529ab4..81300972df83 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate_aoai.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate_aoai.py @@ -19,7 +19,6 @@ from azure.ai.evaluation._aoai.aoai_grader import AzureOpenAIGrader from azure.ai.evaluation._common._experimental import experimental - TClient = TypeVar("TClient", ProxyClient, CodeClient) LOGGER = logging.getLogger(__name__) diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_document_retrieval/_document_retrieval.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_document_retrieval/_document_retrieval.py index 1bffacd94362..aae2638f7c07 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_document_retrieval/_document_retrieval.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_document_retrieval/_document_retrieval.py @@ -9,7 +9,6 @@ from azure.ai.evaluation._exceptions import EvaluationException from typing_extensions import override, overload - RetrievalGroundTruthDocument = TypedDict( "RetrievalGroundTruthDocument", {"document_id": str, "query_relevance_label": int} ) diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_check.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_check.py index 684708d23744..03d884715e03 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_check.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_check.py @@ -4,7 +4,6 @@ from typing import Final - _has_legacy = False try: from promptflow._constants import FlowType diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_configuration.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_configuration.py index 978c613cf92d..1046186d84cc 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_configuration.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_configuration.py @@ -6,7 +6,6 @@ from typing import Any, Dict, Final, Optional from typing_extensions import TypeAlias - try: from promptflow._sdk._configuration import Configuration as _Configuration diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_constants.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_constants.py index 9dbd562f3960..6ca77f57fd13 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_constants.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_constants.py @@ -4,7 +4,6 @@ from typing import Final - PF_FLOW_ENTRY_IN_TMP: Final[str] = "PF_FLOW_ENTRY_IN_TMP" PF_FLOW_META_LOAD_IN_SUBPROCESS: Final[str] = "PF_FLOW_META_LOAD_IN_SUBPROCESS" LINE_NUMBER: Final[str] = "line_number" diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_errors.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_errors.py index c199a64d5e8a..15ad68a2f9bc 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_errors.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_errors.py @@ -5,7 +5,6 @@ from typing import Any from typing_extensions import TypeAlias - try: from promptflow.core._errors import MissingRequiredPackage as _MissingRequiredPackage except ImportError: diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_flows.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_flows.py index 43bbba938dd7..da70801acf65 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_flows.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_flows.py @@ -4,7 +4,6 @@ from typing_extensions import TypeAlias - try: from promptflow.core._flow import AsyncPrompty as _AsyncPrompty from promptflow._sdk.entities._flows import FlexFlow as _FlexFlow diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_service.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_service.py index 9192a4213d41..0f59edb2aace 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_service.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/_service.py @@ -4,7 +4,6 @@ from typing import Callable, Final - try: from promptflow._cli._pf._service import stop_service as _stop_service except ImportError: diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/client.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/client.py index d91e05097a39..f0075ea51a40 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/client.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/client.py @@ -12,7 +12,6 @@ from ._configuration import Configuration from .entities import Run - try: from promptflow.client import PFClient as _PFClient except ImportError: diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/entities.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/entities.py index 1b99891e6003..5baa1bef8cdd 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/entities.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/entities.py @@ -4,7 +4,6 @@ from typing_extensions import TypeAlias - try: from promptflow._sdk.entities import Run as _Run except ImportError: diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/tracing.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/tracing.py index 3e23e65723d7..665ef2f8622d 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/tracing.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/tracing.py @@ -5,7 +5,6 @@ from typing import Callable, Dict, Final, Optional from typing_extensions import TypeAlias - try: from promptflow.tracing import ThreadPoolExecutorWithContext as _ThreadPoolExecutorWithContext from promptflow.tracing._integrations._openai_injector import ( diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/utils.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/utils.py index e8093628f911..ff720f922673 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/utils.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_adapters/utils.py @@ -5,7 +5,6 @@ from typing import Final, Optional from typing_extensions import TypeAlias - try: from promptflow._utils.user_agent_utils import ClientUserAgentUtil as _ClientUserAgentUtil from promptflow._utils.async_utils import async_run_allowing_running_loop as _async_run_allowing_running_loop diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_engine.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_engine.py index 56cd60d3d265..729764454fef 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_engine.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_engine.py @@ -58,7 +58,6 @@ ) from ._openai_injector import CaptureOpenAITokenUsage - MAX_WORKER_COUNT: Final[int] = 10 KEYWORD_PATTERN: Final = re.compile(r"^\${([^{}]+)}$") diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_openai_injector.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_openai_injector.py index 9b575174d50b..6cfbdf042347 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_openai_injector.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_openai_injector.py @@ -14,7 +14,6 @@ from azure.ai.evaluation._legacy._adapters._errors import MissingRequiredPackage from azure.ai.evaluation._legacy._batch_engine._result import TokenMetrics - _token_metrics: ContextVar[TokenMetrics] = ContextVar("token_metrics", default=TokenMetrics(0, 0, 0)) KEY_ATTR_ORIGINAL: Final[str] = "_original" diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_run_storage.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_run_storage.py index 4848c3247e4d..e6fa29712509 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_run_storage.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_run_storage.py @@ -13,7 +13,6 @@ from ._result import BatchResult, TokenMetrics, BatchStatus - EVAL_USER_SUBFOLDER: Final[str] = ".evaluation" diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_utils.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_utils.py index 511fb5858fac..c24c45e2f40d 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_utils.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_batch_engine/_utils.py @@ -7,7 +7,6 @@ import re from typing import Any, Final, Mapping, Sequence, Tuple - DEFAULTS_KEY: Final[str] = "$defaults$" diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_common/_logging.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_common/_logging.py index 9851b7e6136a..28f590a14b1a 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_common/_logging.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_legacy/_common/_logging.py @@ -17,7 +17,6 @@ from io import StringIO, TextIOBase from typing import Any, Dict, Final, Mapping, Optional, Set, TextIO, Tuple, Union - valid_logging_level: Final[Set[str]] = {"CRITICAL", "FATAL", "ERROR", "WARN", "WARNING", "INFO", "DEBUG", "NOTSET"} diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenize.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenize.py index 2d0f54e9d91b..cd0b3152179e 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenize.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenize.py @@ -19,7 +19,6 @@ import re - # Pre-compile regexes that are use often NON_ALPHANUM_PATTERN = r"[^a-z0-9]+" NON_ALPHANUM_RE = re.compile(NON_ALPHANUM_PATTERN) diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenizers.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenizers.py index a10a4eb8a8c0..4f5796009104 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenizers.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_vendor/rouge_score/tokenizers.py @@ -19,6 +19,7 @@ tokenizers can be defined by creating a subclass of the Tokenizer abstract class and overriding the tokenize() method. """ + import abc from nltk.stem import porter diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/models/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/models/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/operations/_patch.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/operations/_patch.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/autogen/raiclient/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_agent/_agent_functions.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_agent/_agent_functions.py index b410d6d36d40..2cc95cb83796 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_agent/_agent_functions.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_agent/_agent_functions.py @@ -13,7 +13,6 @@ from azure.identity import DefaultAzureCredential from azure.ai.evaluation.red_team._agent import RedTeamToolProvider - # Initialize the credential and tool provider (will be created when first needed) credential = None tool_provider = None diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py index ffd2d6e8b4ea..943e84e7e5b5 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py @@ -1667,7 +1667,9 @@ async def _process_orchestrator_tasks( ): """Process orchestrator tasks either in parallel or sequentially.""" if parallel_execution and orchestrator_tasks: - tqdm.write(f"⚙️ Processing {len(orchestrator_tasks)} tasks in parallel (max {max_parallel_tasks} at a time)") + tqdm.write( + f"⚙️ Processing {len(orchestrator_tasks)} tasks in parallel (max {max_parallel_tasks} at a time)" + ) # Process tasks in batches for i in range(0, len(orchestrator_tasks), max_parallel_tasks): diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team_result.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team_result.py index c881e15ad3dc..b8463b180886 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team_result.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team_result.py @@ -5,7 +5,6 @@ import json from azure.ai.evaluation._common._experimental import experimental - # NOTE: The RedTeam* TypedDict classes below are being gradually deprecated in favor of # the standard EvalRun* models from azure.ai.evaluation._common.onedp.models._models. # New code should use EvalRunOutputItem instead of RedTeamOutputItem, etc. diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_conversation/_conversation.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_conversation/_conversation.py index 8403c6dffb6a..1c632adbc84c 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_conversation/_conversation.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_conversation/_conversation.py @@ -104,7 +104,7 @@ async def simulate_conversation( session_state = {} # Read the first prompt. - (first_response, request, _, full_response) = await bots[0].generate_response( + first_response, request, _, full_response = await bots[0].generate_response( session=session, conversation_history=[], max_history=history_limit, diff --git a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_utils.py b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_utils.py index 3416cf93e93e..f493767325b8 100644 --- a/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_utils.py +++ b/sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/simulator/_utils.py @@ -4,6 +4,7 @@ """ This module contains a utility class for managing a list of JSON lines. """ + import json diff --git a/sdk/evaluation/azure-ai-evaluation/samples/red_team_skip_upload.py b/sdk/evaluation/azure-ai-evaluation/samples/red_team_skip_upload.py index b2c51284ce5c..ad38704f98bf 100644 --- a/sdk/evaluation/azure-ai-evaluation/samples/red_team_skip_upload.py +++ b/sdk/evaluation/azure-ai-evaluation/samples/red_team_skip_upload.py @@ -3,7 +3,6 @@ import time from typing import Optional, Dict, Any - # Azure imports from azure.identity import DefaultAzureCredential, get_bearer_token_provider from azure.ai.evaluation.red_team import RedTeam, RiskCategory, AttackStrategy @@ -11,7 +10,6 @@ # OpenAI imports from openai import AzureOpenAI - azure_ai_project = os.environ.get("AZURE_PROJECT_ENDPOINT") credential = DefaultAzureCredential() diff --git a/sdk/evaluation/azure-ai-evaluation/tests/converters/ai_agent_converter/serialization_helper.py b/sdk/evaluation/azure-ai-evaluation/tests/converters/ai_agent_converter/serialization_helper.py index a8f18cbc4d24..4c266d18d15b 100644 --- a/sdk/evaluation/azure-ai-evaluation/tests/converters/ai_agent_converter/serialization_helper.py +++ b/sdk/evaluation/azure-ai-evaluation/tests/converters/ai_agent_converter/serialization_helper.py @@ -5,7 +5,6 @@ from azure.ai.evaluation._converters._models import ToolCall - # Breaking changes introduced in newer version of the agents SDK # Models have been moved, so try a few different locations try: diff --git a/sdk/evaluation/azure-ai-evaluation/tests/e2etests/test_prompty_async.py b/sdk/evaluation/azure-ai-evaluation/tests/e2etests/test_prompty_async.py index 2d944def168f..6b1adbf25149 100644 --- a/sdk/evaluation/azure-ai-evaluation/tests/e2etests/test_prompty_async.py +++ b/sdk/evaluation/azure-ai-evaluation/tests/e2etests/test_prompty_async.py @@ -14,7 +14,6 @@ from azure.ai.evaluation._legacy.prompty import AsyncPrompty, InvalidInputError from azure.ai.evaluation import AzureOpenAIModelConfiguration - PROMPTY_TEST_DIR: Final[Path] = Path(path.dirname(__file__), "data").resolve() EVALUATOR_ROOT_DIR: Final[Path] = Path(path.dirname(__file__), "../../azure/ai/evaluation/_evaluators").resolve() BASIC_PROMPTY: Final[Path] = PROMPTY_TEST_DIR / "basic.prompty" diff --git a/sdk/evaluation/azure-ai-evaluation/tests/unittests/test_redteam/test_rai_service_target.py b/sdk/evaluation/azure-ai-evaluation/tests/unittests/test_redteam/test_rai_service_target.py index f8edc6cd7c09..202bce01db04 100644 --- a/sdk/evaluation/azure-ai-evaluation/tests/unittests/test_redteam/test_rai_service_target.py +++ b/sdk/evaluation/azure-ai-evaluation/tests/unittests/test_redteam/test_rai_service_target.py @@ -4,7 +4,6 @@ import uuid import asyncio - try: import pyrit diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_operations/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_operations/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_operations/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_operations/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/models/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/models/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_publisher_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_publisher_client.py index 9250a614c0a6..96f02cd5a4d4 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_publisher_client.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_publisher_client.py @@ -117,8 +117,7 @@ def __init__( @staticmethod def _policies( - credential: Union["AzureKeyCredential", "AzureSasCredential", "TokenCredential"], - **kwargs: Any + credential: Union["AzureKeyCredential", "AzureSasCredential", "TokenCredential"], **kwargs: Any ) -> List[Any]: auth_policy = _get_authentication_policy(credential) sdk_moniker = "eventgrid/{}".format(VERSION) @@ -140,7 +139,9 @@ def _policies( return policies @distributed_trace - def send(self, events: SendType, *, channel_name: Optional[str] = None, **kwargs: Any) -> None: # pylint:disable=docstring-keyword-should-match-keyword-only + def send( + self, events: SendType, *, channel_name: Optional[str] = None, **kwargs: Any + ) -> None: # pylint:disable=docstring-keyword-should-match-keyword-only """Sends events to a topic or a domain specified during the client initialization. A single instance or a list of dictionaries, CloudEvents or EventGridEvents are accepted. diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_signature_credential_policy.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_signature_credential_policy.py index 0e452167bf51..b6342fe789cc 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_signature_credential_policy.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_signature_credential_policy.py @@ -20,7 +20,9 @@ class EventGridSasCredentialPolicy(SansIOHTTPPolicy): :raises: ValueError or TypeError """ - def __init__(self, credential: "AzureSasCredential", name: str, **kwargs: Any) -> None: # pylint: disable=unused-argument + def __init__( + self, credential: "AzureSasCredential", name: str, **kwargs: Any + ) -> None: # pylint: disable=unused-argument super(EventGridSasCredentialPolicy, self).__init__() self._credential = credential if not name: diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/aio/_publisher_client_async.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/aio/_publisher_client_async.py index 3508dcca1ead..ac19eaec5fab 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/aio/_publisher_client_async.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/aio/_publisher_client_async.py @@ -134,7 +134,9 @@ def _policies( return policies @distributed_trace_async - async def send(self, events: SendType, *, channel_name: Optional[str] = None, **kwargs: Any) -> None: # pylint:disable=docstring-keyword-should-match-keyword-only + async def send( + self, events: SendType, *, channel_name: Optional[str] = None, **kwargs: Any + ) -> None: # pylint:disable=docstring-keyword-should-match-keyword-only """Sends events to a topic or a domain specified during the client initialization. A single instance or a list of dictionaries, CloudEvents or EventGridEvents are accepted. diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py index 88a242978912..73e7b6846a8a 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py @@ -5,6 +5,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys from typing import ( Any, diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py index c7508657d16c..cd89731fbb21 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py @@ -21,7 +21,6 @@ ) from ._serialization import Deserializer, Serializer - DEFAULT_STANDARD_API_VERSION = "2024-06-01" DEFAULT_BASIC_API_VERSION = "2018-01-01" @@ -70,8 +69,8 @@ def __init__( endpoint, credential, api_version=api_version or DEFAULT_BASIC_API_VERSION, - ) # type:ignore[assignment] - self._publish = self._client.send # type:ignore[attr-defined] + ) # type: ignore[assignment] + self._publish = self._client.send # type: ignore[attr-defined] else: if isinstance(credential, AzureSasCredential): raise TypeError("SAS token authentication is not supported for Event Grid Namespace.") diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py index 8a42ee601427..aeade53d550f 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py @@ -5,6 +5,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Union, Any, Optional, Callable, Dict, TypeVar, TYPE_CHECKING import sys from azure.core.messaging import CloudEvent diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py index a552fe3c3125..ba9c5016e5be 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, overload, Mapping, Any, Generic, TypeVar from azure.core.messaging import CloudEvent from ._models import ( diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_authentication_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_authentication_async.py index 1ee669f2ad63..38dc1bbc9b22 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_authentication_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_authentication_async.py @@ -15,6 +15,7 @@ "https://..eventgrid.azure.net/api/events". 3) EVENTGRID_SAS - The shared access signature that is to be used to authenticate the client. """ + # [START client_auth_with_key_cred_async] import os from azure.eventgrid.aio import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cloud_event_using_dict_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cloud_event_using_dict_async.py index 2d52d720ac3c..0db237eeff0b 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cloud_event_using_dict_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cloud_event_using_dict_async.py @@ -15,6 +15,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os import asyncio from azure.core.messaging import CloudEvent diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cncf_cloud_events_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cncf_cloud_events_async.py index 1bcd2a92e0c4..d0270954cfeb 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cncf_cloud_events_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_cncf_cloud_events_async.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os import asyncio from azure.eventgrid.aio import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_custom_schema_to_a_topic_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_custom_schema_to_a_topic_async.py index 2d7ccbb8cbcf..d516bb0aed9d 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_custom_schema_to_a_topic_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_custom_schema_to_a_topic_async.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CUSTOM_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os import asyncio from random import randint, sample diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_event_using_dict_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_event_using_dict_async.py index 8909b5717b2b..902b2bb31f5c 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_event_using_dict_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_event_using_dict_async.py @@ -16,6 +16,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os import asyncio from datetime import datetime diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_domain_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_domain_async.py index 48272cb30166..bd53be820336 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_domain_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_domain_async.py @@ -15,6 +15,7 @@ 2) EVENTGRID_DOMAIN_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os import asyncio from azure.eventgrid import EventGridEvent diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_topic_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_topic_async.py index 4ab76f2a81fa..9415f1c7499e 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_topic_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_eg_events_to_a_topic_async.py @@ -14,6 +14,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + # [START publish_eg_event_to_topic_async] import os import asyncio diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py index c70bfd11aef4..a77aca53ec76 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py @@ -14,6 +14,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os import asyncio from azure.eventgrid import EventGridEvent diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py index 1d3ea0337e33..86e65fd3adcf 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + # [START publish_cloud_event_to_topic_async] import os import asyncio diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_to_channel_async.py b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_to_channel_async.py index f12070c35a1e..7f7b6218e780 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_to_channel_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/async_samples/sample_publish_to_channel_async.py @@ -15,6 +15,7 @@ "https://..eventgrid.azure.net/api/events". 3) EVENTGRID_PARTNER_CHANNEL_NAME - The name of the channel to which the event should be published. """ + # [START publish_cloud_event_to_topic] import os import asyncio diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/consume_samples/consume_cloud_events_from_storage_queue.py b/sdk/eventgrid/azure-eventgrid/samples/basic/consume_samples/consume_cloud_events_from_storage_queue.py index 7e3b3827ee7b..43e1d6f352a4 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/consume_samples/consume_cloud_events_from_storage_queue.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/consume_samples/consume_cloud_events_from_storage_queue.py @@ -13,6 +13,7 @@ 1) STORAGE_QUEUE_CONN_STR: The connection string to the Storage account 3) STORAGE_QUEUE_NAME: The name of the storage queue. """ + from typing import List from azure.core.messaging import CloudEvent from azure.storage.queue import QueueServiceClient, BinaryBase64DecodePolicy diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_custom_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_custom_topic_sample.py index fba40a378241..109bfe1a67f1 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_custom_topic_sample.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_custom_topic_sample.py @@ -15,6 +15,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from random import randint, sample import time diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_domain_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_domain_topic_sample.py index ba9182a40beb..4a6e12ff9fcb 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_domain_topic_sample.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_cloud_events_to_domain_topic_sample.py @@ -15,6 +15,7 @@ 2) EVENTGRID_CLOUD_EVENT_DOMAIN_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import sys import os from random import randint, sample diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_custom_schema_events_to_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_custom_schema_events_to_topic_sample.py index 0ab11a428c5a..244061d389fc 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_custom_schema_events_to_topic_sample.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_custom_schema_events_to_topic_sample.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CUSTOM_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from random import randint, sample import time diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_event_grid_events_to_custom_topic_sample.py b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_event_grid_events_to_custom_topic_sample.py index 16247a4763bf..c1230ef8930f 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_event_grid_events_to_custom_topic_sample.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_event_grid_events_to_custom_topic_sample.py @@ -15,6 +15,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from random import randint, sample import time diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_with_shared_access_signature_sample.py b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_with_shared_access_signature_sample.py index fc57050087f3..0f9ca2aaf50c 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_with_shared_access_signature_sample.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/publish_samples/publish_with_shared_access_signature_sample.py @@ -15,6 +15,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from random import randint, sample import time diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_authentication.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_authentication.py index eb54049d0925..6a0bf4ca9a4b 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_authentication.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_authentication.py @@ -15,6 +15,7 @@ "https://..eventgrid.azure.net/api/events". 3) EVENTGRID_SAS - The shared access signature that is to be used to authenticate the client. """ + # [START client_auth_with_key_cred] import os from azure.eventgrid import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_consume_custom_payload.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_consume_custom_payload.py index 925494559fea..981659ac82b7 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_consume_custom_payload.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_consume_custom_payload.py @@ -11,6 +11,7 @@ USAGE: python sample_consume_custom_payload.py """ + from typing import List from azure.core.messaging import CloudEvent import json diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_generate_sas.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_generate_sas.py index deb0d72d6649..a24a91805cc9 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_generate_sas.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_generate_sas.py @@ -14,6 +14,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + # [START generate_sas] import os from azure.eventgrid import generate_sas diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cloud_event_using_dict.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cloud_event_using_dict.py index d9dad90d8e19..f852b5d4781b 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cloud_event_using_dict.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cloud_event_using_dict.py @@ -15,6 +15,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from azure.eventgrid import EventGridPublisherClient, EventGridConsumerClient from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cncf_cloud_events.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cncf_cloud_events.py index b686d9220ed1..a8363d1d2842 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cncf_cloud_events.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_cncf_cloud_events.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from azure.eventgrid import EventGridPublisherClient from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_custom_schema_to_a_topic.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_custom_schema_to_a_topic.py index 4650aae15d61..f5a094fb1853 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_custom_schema_to_a_topic.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_custom_schema_to_a_topic.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CUSTOM_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from random import randint import time diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_event_using_dict.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_event_using_dict.py index b7154a0e07b8..c6c2abc36cb3 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_event_using_dict.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_event_using_dict.py @@ -16,6 +16,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from datetime import datetime from msrest.serialization import UTC diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_domain.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_domain.py index 960f91aeae70..98339fe1afcd 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_domain.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_domain.py @@ -14,6 +14,7 @@ 2) EVENTGRID_DOMAIN_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from azure.eventgrid import EventGridPublisherClient, EventGridEvent from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_topic.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_topic.py index a0e3ab58b6dc..5b11505b0433 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_topic.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_eg_events_to_a_topic.py @@ -14,6 +14,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + # [START publish_eg_event_to_topic] import os from azure.eventgrid import EventGridPublisherClient, EventGridEvent diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py index 6051d883fbd4..b940de1e5925 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py @@ -15,6 +15,7 @@ 2) EVENTGRID_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + import os from azure.eventgrid import EventGridPublisherClient, EventGridEvent, generate_sas from azure.core.credentials import AzureKeyCredential, AzureSasCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py index a0297f9950a3..de684ee6a39d 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py @@ -14,6 +14,7 @@ 2) EVENTGRID_CLOUD_EVENT_TOPIC_ENDPOINT - The topic hostname. Typically it exists in the format "https://..eventgrid.azure.net/api/events". """ + # [START publish_cloud_event_to_topic] import os from azure.eventgrid import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_to_channel.py b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_to_channel.py index 433ce0fefe72..f18c51d2e13c 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_to_channel.py +++ b/sdk/eventgrid/azure-eventgrid/samples/basic/sync_samples/sample_publish_to_channel.py @@ -15,6 +15,7 @@ "https://..eventgrid.azure.net/api/events". 3) EVENTGRID_PARTNER_CHANNEL_NAME - The name of the channel to which the event should be published. """ + # [START publish_cloud_event_to_topic] import os from azure.eventgrid import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_consume_process_events_async.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_consume_process_events_async.py index 9b3d42b051b5..a74cbc16f4d6 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_consume_process_events_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_consume_process_events_async.py @@ -16,6 +16,7 @@ 3) EVENTGRID_TOPIC_NAME - The namespace topic name. 4) EVENTGRID_EVENT_SUBSCRIPTION_NAME - The event subscription name. """ + import os import asyncio from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_namespace_authentication_async.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_namespace_authentication_async.py index d003ce5970f3..f390a93c5b89 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_namespace_authentication_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_namespace_authentication_async.py @@ -16,6 +16,7 @@ 3) EVENTGRID_TOPIC_NAME - The namespace topic name. 4) EVENTGRID_EVENT_SUBSCRIPTION_NAME = The event subscription name. """ + import os from azure.eventgrid.aio import EventGridPublisherClient, EventGridConsumerClient from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cloud_event_async.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cloud_event_async.py index 48f5b46ea7e6..be3ef6a08003 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cloud_event_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cloud_event_async.py @@ -16,6 +16,7 @@ "https://..eventgrid.azure.net". 3) EVENTGRID_TOPIC_NAME - The namespace topic name. """ + import os import asyncio from azure.eventgrid.aio import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py index 24bf463e44a3..a6f5fc1fa864 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/async_samples/sample_publish_cncf_events_async.py @@ -15,6 +15,7 @@ "https://..eventgrid.azure.net". 3) EVENTGRID_TOPIC_NAME - The namespace topic name. """ + import os import asyncio from azure.eventgrid.aio import EventGridPublisherClient diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_consume_process_events.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_consume_process_events.py index c10f8196fcea..e24357ae6624 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_consume_process_events.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_consume_process_events.py @@ -16,6 +16,7 @@ 3) EVENTGRID_TOPIC_NAME - The namespace topic name. 4) EVENTGRID_EVENT_SUBSCRIPTION_NAME - The event subscription name. """ + import os from azure.core.credentials import AzureKeyCredential from azure.eventgrid.models import * diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_namespace_authentication.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_namespace_authentication.py index 6657e82647bc..189a466baab8 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_namespace_authentication.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_namespace_authentication.py @@ -16,6 +16,7 @@ 3) EVENTGRID_TOPIC_NAME - The namespace topic name. 4) EVENTGRID_EVENT_SUBSCRIPTION_NAME = The event subscription name. """ + import os from azure.eventgrid import EventGridPublisherClient, EventGridConsumerClient from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cloud_event.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cloud_event.py index 029abe027e60..98f975b8b938 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cloud_event.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cloud_event.py @@ -16,6 +16,7 @@ "https://..eventgrid.azure.net". 3) EVENTGRID_TOPIC_NAME - The namespace topic name. """ + import os from azure.eventgrid import EventGridPublisherClient from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cncf_events.py b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cncf_events.py index dd8f173c9ae8..af7b9997bb1a 100644 --- a/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cncf_events.py +++ b/sdk/eventgrid/azure-eventgrid/samples/namespace/sync_samples/sample_publish_cncf_events.py @@ -15,6 +15,7 @@ "https://..eventgrid.azure.net". 3) EVENTGRID_TOPIC_NAME - The namespace topic name. """ + import os from azure.eventgrid import EventGridPublisherClient from azure.core.credentials import AzureKeyCredential diff --git a/sdk/eventgrid/azure-eventgrid/setup.py b/sdk/eventgrid/azure-eventgrid/setup.py index b88a566aff72..c9a6e4babb15 100644 --- a/sdk/eventgrid/azure-eventgrid/setup.py +++ b/sdk/eventgrid/azure-eventgrid/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-eventgrid" PACKAGE_PPRINT_NAME = "Azure Event Grid" diff --git a/sdk/eventgrid/azure-eventgrid/tests/_mocks.py b/sdk/eventgrid/azure-eventgrid/tests/_mocks.py index eb4ebc6f19ce..28463b81f603 100644 --- a/sdk/eventgrid/azure-eventgrid/tests/_mocks.py +++ b/sdk/eventgrid/azure-eventgrid/tests/_mocks.py @@ -1,6 +1,5 @@ import json - # storage cloud event cloud_storage_dict = { "id": "a0517898-9fa4-4e70-b4a3-afda1dd68672", diff --git a/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py b/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py index 917325fbd094..ec21de1f5274 100644 --- a/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py +++ b/sdk/eventgrid/azure-eventgrid/tests/eventgrid_preparer.py @@ -3,7 +3,6 @@ from azure.mgmt.eventgrid.models import Topic, InputSchema, JsonInputSchemaMapping, JsonField, JsonFieldWithDefault - EVENTGRID_TOPIC_PARAM = "eventgrid_topic" EVENTGRID_TOPIC_LOCATION = "westus" CLOUD_EVENT_SCHEMA = InputSchema.cloud_event_schema_v1_0 diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_patch.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_patch.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_patch.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_patch.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_patch.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_patch.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/setup.py b/sdk/eventgrid/azure-mgmt-eventgrid/setup.py index 63f21ef172bd..bb0cd6347bf5 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/setup.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_client_base.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_client_base.py index 614accbfbcb5..109b382db77e 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_client_base.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_client_base.py @@ -391,9 +391,7 @@ def _backoff( self._config.backoff_max, retried_times, ) - if backoff <= self._config.backoff_max and ( - timeout_time is None or time.time() + backoff <= timeout_time - ): + if backoff <= self._config.backoff_max and (timeout_time is None or time.time() + backoff <= timeout_time): time.sleep(backoff) _LOGGER.info( "%r has an exception (%r). Retrying...", @@ -419,9 +417,7 @@ def _management_request( # pylint:disable=inconsistent-return-statements self._address, mgmt_auth=mgmt_auth, config=self._config ) try: - conn = self._conn_manager.get_connection( - endpoint=self._address.hostname, auth=mgmt_auth - ) + conn = self._conn_manager.get_connection(endpoint=self._address.hostname, auth=mgmt_auth) mgmt_client.open(connection=conn) while not mgmt_client.client_ready(): time.sleep(0.05) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_constants.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_constants.py index 3289bb1f7554..75c72197e235 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_constants.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_constants.py @@ -4,7 +4,6 @@ # -------------------------------------------------------------------------------------------- from enum import Enum - PROP_SEQ_NUMBER = b"x-opt-sequence-number" PROP_OFFSET = b"x-opt-offset" PROP_PARTITION_KEY = b"x-opt-partition-key" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer.py index c6ef304eaab1..f8e67831bfd6 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer.py @@ -105,8 +105,9 @@ def __init__(self, client: "EventHubConsumerClient", source: str, **kwargs: Any) link_properties: Dict[bytes, int] = {} self._error = None self._timeout = 0 - self._idle_timeout: Optional[float] = \ + self._idle_timeout: Optional[float] = ( (idle_timeout * self._amqp_transport.TIMEOUT_FACTOR) if idle_timeout else None + ) self._partition = self._source.split("/")[-1] self._name = f"EHConsumer-{uuid.uuid4()}-partition{self._partition}" if owner_level is not None: @@ -133,10 +134,9 @@ def _create_handler(self, auth: Union[uamqp_JWTTokenAuth, JWTTokenAuth]) -> None event_position_selector(self._offset, self._offset_inclusive), ) desired_capabilities = ( - [RECEIVER_RUNTIME_METRIC_SYMBOL, - GEOREPLICATION_SYMBOL] - if self._track_last_enqueued_event_properties - else [GEOREPLICATION_SYMBOL] + [RECEIVER_RUNTIME_METRIC_SYMBOL, GEOREPLICATION_SYMBOL] + if self._track_last_enqueued_event_properties + else [GEOREPLICATION_SYMBOL] ) self._handler = self._amqp_transport.create_receive_client( diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py index f9b9412e8103..969eb9a8ee06 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py @@ -14,7 +14,6 @@ from ._eventprocessor.event_processor import EventProcessor from ._eventprocessor.common import LoadBalancingStrategy - if TYPE_CHECKING: from ssl import SSLContext from ._eventprocessor.partition_context import PartitionContext @@ -163,7 +162,8 @@ def __init__( "to use the pure Python AMQP transport. " "If you rely on this, please comment on [this issue]" "(https://github.com/Azure/azure-sdk-for-python/issues/40347) ", - DeprecationWarning, stacklevel=2 + DeprecationWarning, + stacklevel=2, ) self._checkpoint_store = kwargs.pop("checkpoint_store", None) self._load_balancing_interval = kwargs.pop("load_balancing_interval", None) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_eventprocessor/event_processor.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_eventprocessor/event_processor.py index e0382c989d35..f1ee00565f43 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_eventprocessor/event_processor.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_eventprocessor/event_processor.py @@ -237,9 +237,7 @@ def _on_event_received( if isinstance(event, list): is_batch = True - with receive_context_manager( - self._eventhub_client, links=links, start_time=self._last_received_time - ): + with receive_context_manager(self._eventhub_client, links=links, start_time=self._last_received_time): self._last_received_time = time.time_ns() with process_context_manager(self._eventhub_client, links=links, is_batch=is_batch): diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer.py index 5ccff1dd16f2..0ef9a20a9c86 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer.py @@ -211,7 +211,7 @@ def _wrap_eventdata( ) if partition_key and partition_key != event_data._partition_key: # pylint: disable=protected-access raise ValueError("The partition_key does not match the one of the EventDataBatch") - wrapper_event_data = event_data # type:ignore + wrapper_event_data = event_data # type: ignore else: if partition_key: event_data = _set_partition_key(event_data, partition_key, self._amqp_transport) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py index d8f12d816f56..15171eaafc09 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py @@ -209,7 +209,8 @@ def __init__( "to use the pure Python AMQP transport. " "If you rely on this, please comment on [this issue]" "(https://github.com/Azure/azure-sdk-for-python/issues/40347) ", - DeprecationWarning, stacklevel=2 + DeprecationWarning, + stacklevel=2, ) self._auth_uri = f"sb://{self._address.hostname}{self._address.path}" self._keep_alive = kwargs.get("keep_alive", None) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_decode.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_decode.py index afe58f311a0c..674cdc073416 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_decode.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_decode.py @@ -55,7 +55,6 @@ DECIMAL128_BIAS = 6176 - def _decode_null(buffer: memoryview) -> Tuple[memoryview, None]: return buffer, None @@ -153,6 +152,7 @@ def _decode_binary_large(buffer: memoryview) -> Tuple[memoryview, bytes]: length_index = c_unsigned_long.unpack(buffer[:4])[0] + 4 return buffer[length_index:], buffer[4:length_index].tobytes() + def _decode_decimal128(buffer: memoryview) -> Tuple[memoryview, decimal.Decimal]: """ Decode a Decimal128 value from the buffer. @@ -183,8 +183,8 @@ def _decode_decimal128(buffer: memoryview) -> Tuple[memoryview, decimal.Decimal] elif dec_value[0] & 0x78 != 0: # Handle special values (NaN and Infinity) if (dec_value[0] & 0x78) == 0x78: - return buffer[16:], decimal.Decimal('NaN') - return buffer[16:], decimal.Decimal('-Infinity') + return buffer[16:], decimal.Decimal("NaN") + return buffer[16:], decimal.Decimal("-Infinity") else: # If the exponent is zero, return zero return buffer[16:], decimal.Decimal(0) @@ -196,21 +196,22 @@ def _decode_decimal128(buffer: memoryview) -> Tuple[memoryview, decimal.Decimal] hi = c_unsigned_int.unpack(dec_value[4:8])[0] middle = c_unsigned_int.unpack(dec_value[8:12])[0] lo = c_unsigned_int.unpack(dec_value[12:16])[0] - digits = tuple(int(digit) for digit in f"{hi:08}{middle:08}{lo:08}".lstrip('0')) + digits = tuple(int(digit) for digit in f"{hi:08}{middle:08}{lo:08}".lstrip("0")) # Create a decimal context with the appropriate precision and exponent range decimal_ctx = decimal.Context( - prec = DECIMAL128_MAX_DIGITS, - Emin = DECIMAL128_EXPONENT_MIN, - Emax = DECIMAL128_EXPONENT_MAX, - capitals = 1, - clamp = 1, + prec=DECIMAL128_MAX_DIGITS, + Emin=DECIMAL128_EXPONENT_MIN, + Emax=DECIMAL128_EXPONENT_MAX, + capitals=1, + clamp=1, ) # Create the decimal value using the context with decimal.localcontext(decimal_ctx) as ctx: return buffer[16:], ctx.create_decimal((sign, digits, exponent)) + def _decode_list_small(buffer: memoryview) -> Tuple[memoryview, List[Any]]: count = buffer[1] buffer = buffer[2:] diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_encode.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_encode.py index 573e0da32fde..3ab59694f26c 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_encode.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_encode.py @@ -36,7 +36,6 @@ from typing_extensions import Buffer - from .types import ( TYPE, VALUE, @@ -668,7 +667,7 @@ def encode_annotations(value: Optional[Dict[Union[str, bytes], Any]]) -> Dict[st def encode_application_properties( - value: Optional[Dict[Union[str, bytes], AQMPSimpleType]] + value: Optional[Dict[Union[str, bytes], AQMPSimpleType]], ) -> Dict[Union[str, bytes], Any]: """The application-properties section is a part of the bare message used for structured application data. diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py index bfb1f9561066..a840bacad383 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/_transport.py @@ -57,7 +57,6 @@ ) from .error import AuthenticationException, ErrorCondition - try: import fcntl except ImportError: # pragma: no cover @@ -261,7 +260,6 @@ def non_blocking(self): if non_bocking_timeout != prev: sock.settimeout(prev) - def _init_socket(self, socket_settings, socket_timeout): self.sock.settimeout(None) # set socket back to blocking mode self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py index 18085bf2bdb0..4fc3c088faf6 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- # TODO: Check types of kwargs (issue exists for this) -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio import logging import time import queue @@ -733,7 +733,7 @@ async def _client_run_async(self, **kwargs): :rtype: bool """ try: - if self._link.current_link_credit<= 0: + if self._link.current_link_credit <= 0: await self._link.flow(link_credit=self._link_credit) await self._connection.listen(wait=self._socket_timeout, **kwargs) except ValueError: diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py index 681cf72c8082..c8a632bd1b92 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_connection_async.py @@ -10,7 +10,7 @@ from urllib.parse import urlparse import socket from ssl import SSLError -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio from typing import Any, Dict, List, Tuple, Optional, NamedTuple, Type, Union, cast from ._transport_async import AsyncTransport diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_receiver_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_receiver_async.py index af91b3a73144..b98f0f2b1dd9 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_receiver_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_receiver_async.py @@ -18,7 +18,6 @@ from ..outcomes import Received, Accepted, Rejected, Released, Modified from ..error import AMQPException, ErrorCondition - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sasl_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sasl_async.py index c85a017d055a..2111066804b1 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sasl_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sasl_async.py @@ -9,7 +9,6 @@ from .._transport import AMQPS_PORT from ..performatives import SASLInit - _SASL_FRAME_TYPE = b"\x01" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sender_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sender_async.py index abc559154c3a..3f7d34c6bf3e 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sender_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_sender_async.py @@ -7,7 +7,7 @@ import uuid import logging import time -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio from .._encode import encode_payload from ._link_async import Link diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_session_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_session_async.py index 88d4418d39b3..bfa8c09ab3f5 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_session_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_session_async.py @@ -8,7 +8,7 @@ import uuid import logging import time -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio from typing import Optional, Union from ..constants import ConnectionState, SessionState, SessionTransferState, Role diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py index 0478f41324bf..c2322f9b7712 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_transport_async.py @@ -32,7 +32,7 @@ # THE POSSIBILITY OF SUCH DAMAGE. # ------------------------------------------------------------------------- -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio import errno import socket import ssl @@ -63,7 +63,6 @@ ) from ..error import AuthenticationException, ErrorCondition - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py index 657c9bd8a879..9bb6cd3cfb44 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py @@ -46,7 +46,7 @@ OUTGOING_WINDOW, DEFAULT_AUTH_TIMEOUT, MESSAGE_DELIVERY_DONE_STATES, - LINK_MAX_MESSAGE_SIZE + LINK_MAX_MESSAGE_SIZE, ) from .management_operation import ManagementOperation diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/outcomes.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/outcomes.py index 477791ab81fc..b11a6dc2a9f6 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/outcomes.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/outcomes.py @@ -32,7 +32,6 @@ from .constants import FIELD from .performatives import _CAN_ADD_DOCSTRING - Received = namedtuple("Received", ["section_number", "section_offset"]) Received._code = 0x00000023 # type: ignore # pylint:disable=protected-access Received._definition = ( # type: ignore # pylint:disable=protected-access diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/receiver.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/receiver.py index 78db44fe1323..9586f6a79be8 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/receiver.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/receiver.py @@ -15,7 +15,6 @@ from .outcomes import Received, Accepted, Rejected, Released, Modified from .error import AMQPException, ErrorCondition - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/sasl.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/sasl.py index 83b065b59adc..152770585200 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/sasl.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/sasl.py @@ -8,7 +8,6 @@ from .constants import SASLCode, SASL_HEADER_FRAME, WEBSOCKET_PORT from .performatives import SASLInit - _SASL_FRAME_TYPE = b"\x01" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/types.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/types.py index 03b1501dd7cb..134ffd8395bf 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/types.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/types.py @@ -6,7 +6,6 @@ from enum import Enum - TYPE = "TYPE" VALUE = "VALUE" @@ -75,18 +74,18 @@ class ConstructorBytes(object): double = b"\x82" timestamp = b"\x83" uuid = b"\x98" - binary_small = b"\xA0" - binary_large = b"\xB0" - string_small = b"\xA1" - string_large = b"\xB1" - symbol_small = b"\xA3" - symbol_large = b"\xB3" + binary_small = b"\xa0" + binary_large = b"\xb0" + string_small = b"\xa1" + string_large = b"\xb1" + symbol_small = b"\xa3" + symbol_large = b"\xb3" list_0 = b"\x45" - list_small = b"\xC0" - list_large = b"\xD0" - map_small = b"\xC1" - map_large = b"\xD1" - array_small = b"\xE0" - array_large = b"\xF0" + list_small = b"\xc0" + list_large = b"\xd0" + map_small = b"\xc1" + map_large = b"\xd1" + array_small = b"\xe0" + array_large = b"\xf0" descriptor = b"\x00" decimal128 = b"\x94" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/utils.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/utils.py index 2edb14e27cb3..46ee39eeb913 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/utils.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/utils.py @@ -80,14 +80,17 @@ def add_batch(batch, message): encode_payload(output, message) batch[5].append(output) + def set_message_properties(message, properties: list): if not message[3]: message[3] = Properties(*properties) + def set_message_annotations(message, annotations: dict): if not message[2]: message[2] = annotations + def encode_str(data, encoding="utf-8"): try: return data.encode(encoding) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_base.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_base.py index a297c111eef6..4d778ec05712 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_base.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_base.py @@ -191,7 +191,7 @@ def close_connection(connection: Union["uamqp_Connection", "pyamqp_Connection"]) @staticmethod @abstractmethod def get_connection_state( - connection: Union["uamqp_Connection", "pyamqp_Connection"] + connection: Union["uamqp_Connection", "pyamqp_Connection"], ) -> Union["uamqp_ConnectionState", "pyamqp_ConnectionState"]: """ Gets connection state. diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_pyamqp_transport.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_pyamqp_transport.py index d9b8c5211253..d4284a553de9 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_pyamqp_transport.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_pyamqp_transport.py @@ -702,9 +702,7 @@ def _create_eventhub_exception(exception, *, is_consumer=False): return error @staticmethod - def _handle_exception( - exception, closable, *, is_consumer=False - ): + def _handle_exception(exception, closable, *, is_consumer=False): try: # closable is a producer/consumer object name = closable._name # pylint: disable=protected-access except AttributeError: # closable is an client object diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_uamqp_transport.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_uamqp_transport.py index e04aa072686e..196eb0500cb1 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_uamqp_transport.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_transport/_uamqp_transport.py @@ -579,10 +579,7 @@ def check_link_stolen(consumer, exception): :param ~azure.eventhub._consumer.EventHubConsumer consumer: The EventHubConsumer. :param Exception exception: Exception to check. """ - if ( - isinstance(exception, errors.LinkDetach) - and exception.condition == constants.ErrorCodes.LinkStolen - ): + if isinstance(exception, errors.LinkDetach) and exception.condition == constants.ErrorCodes.LinkStolen: raise consumer._handle_exception(exception) # pylint: disable=protected-access @staticmethod @@ -761,9 +758,7 @@ def _create_eventhub_exception(exception): return error @staticmethod - def _handle_exception( - exception, closable, *, is_consumer=False # pylint:disable=unused-argument - ): + def _handle_exception(exception, closable, *, is_consumer=False): # pylint:disable=unused-argument try: # closable is a producer/consumer object name = closable._name # pylint: disable=protected-access except AttributeError: # closable is an client object diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_async_utils.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_async_utils.py index 2a5b5f08ad5e..591602c9e1ee 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_async_utils.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_async_utils.py @@ -6,6 +6,7 @@ import asyncio # pylint:disable=do-not-import-asyncio import sys + def get_dict_with_loop_if_needed(loop): if sys.version_info >= (3, 10): if loop: diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py index 6f7ac4d3958b..99d111207a2a 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- from __future__ import annotations -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio import logging import queue import time diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_client_base_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_client_base_async.py index db72edb00a40..d3cdcd9b0f19 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_client_base_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_client_base_async.py @@ -5,7 +5,7 @@ from __future__ import annotations import logging -import asyncio # pylint: disable=do-not-import-asyncio +import asyncio # pylint: disable=do-not-import-asyncio import time import functools from typing import TYPE_CHECKING, Any, Dict, List, Callable, Optional, Union, cast @@ -303,9 +303,7 @@ async def _backoff_async( self._config.backoff_max, retried_times, ) - if backoff <= self._config.backoff_max and ( - timeout_time is None or time.time() + backoff <= timeout_time - ): + if backoff <= self._config.backoff_max and (timeout_time is None or time.time() + backoff <= timeout_time): await asyncio.sleep(backoff, **self._internal_kwargs) _LOGGER.info( "%r has an exception (%r). Retrying...", diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py index 8cb4de577dcf..60ed9893205c 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py @@ -5,7 +5,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Dict, Optional, Union -from asyncio import Lock # pylint:disable=do-not-import-asyncio +from asyncio import Lock # pylint:disable=do-not-import-asyncio from .._connection_manager import _ConnectionMode from .._constants import TransportType diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_async.py index 784da77fea41..3be787e2dff1 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_async.py @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- from __future__ import annotations import uuid -import asyncio # pylint: disable=do-not-import-asyncio +import asyncio # pylint: disable=do-not-import-asyncio import logging from collections import deque from typing import TYPE_CHECKING, Callable, Awaitable, Dict, Optional, Union, List, Any, Deque @@ -135,8 +135,7 @@ def _create_handler(self, auth: Union["uamqp_JWTTokenAsync", JWTTokenAuthAsync]) event_position_selector(self._offset, self._offset_inclusive), ) desired_capabilities = ( - [RECEIVER_RUNTIME_METRIC_SYMBOL, - GEOREPLICATION_SYMBOL] + [RECEIVER_RUNTIME_METRIC_SYMBOL, GEOREPLICATION_SYMBOL] if self._track_last_enqueued_event_properties else [GEOREPLICATION_SYMBOL] ) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py index e41edb1e0798..302c61ed977d 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- from __future__ import annotations -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio import logging import datetime import warnings @@ -27,7 +27,6 @@ from .._constants import ALL_PARTITIONS, TransportType from .._eventprocessor.common import LoadBalancingStrategy - if TYPE_CHECKING: from ssl import SSLContext from ._client_base_async import CredentialTypes @@ -175,7 +174,8 @@ def __init__( "to use the pure Python AMQP transport. " "If you rely on this, please comment on [this issue]" "(https://github.com/Azure/azure-sdk-for-python/issues/40347) ", - DeprecationWarning, stacklevel=2 + DeprecationWarning, + stacklevel=2, ) self._checkpoint_store = kwargs.pop("checkpoint_store", None) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/event_processor.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/event_processor.py index 81656240c031..fe3f02719b74 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/event_processor.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_eventprocessor/event_processor.py @@ -247,9 +247,7 @@ async def _close_consumer(self, partition_context): if partition_id in self._tasks: del self._tasks[partition_id] - async def _receive( - self, partition_id: str, checkpoint: Optional[Dict[str, Any]] = None - ) -> None: + async def _receive(self, partition_id: str, checkpoint: Optional[Dict[str, Any]] = None) -> None: try: _LOGGER.info("start ownership %r, checkpoint %r", partition_id, checkpoint) ( diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_async.py index 2a270e297186..d38bc806cc2f 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_async.py @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- from __future__ import annotations import uuid -import asyncio # pylint: disable=do-not-import-asyncio +import asyncio # pylint: disable=do-not-import-asyncio import logging from typing import Iterable, Union, Optional, Any, AnyStr, List, TYPE_CHECKING, cast @@ -197,7 +197,7 @@ def _wrap_eventdata( ) if partition_key and partition_key != event_data._partition_key: # pylint: disable=protected-access raise ValueError("The partition_key does not match the one of the EventDataBatch") - wrapper_event_data = event_data # type:ignore + wrapper_event_data = event_data # type: ignore else: if partition_key: event_data = _set_partition_key(event_data, partition_key, self._amqp_transport) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py index 129a396602c7..550564c65187 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio import logging import time import warnings @@ -194,7 +194,8 @@ def __init__( "to use the pure Python AMQP transport. " "If you rely on this, please comment on [this issue]" "(https://github.com/Azure/azure-sdk-for-python/issues/40347) ", - DeprecationWarning, stacklevel=2 + DeprecationWarning, + stacklevel=2, ) self._auth_uri = f"sb://{self._address.hostname}{self._address.path}" diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_base_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_base_async.py index aaad055c7bbd..5891ecb65747 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_base_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_base_async.py @@ -184,7 +184,7 @@ async def close_connection_async(connection: Union[uamqp_Connection, pyamqp_Conn @staticmethod @abstractmethod def get_connection_state( - connection: Union[uamqp_Connection, pyamqp_Connection] + connection: Union[uamqp_Connection, pyamqp_Connection], ) -> Union["uamqp_ConnectionState", pyamqp_ConnectionState]: """ Gets connection state. @@ -349,7 +349,7 @@ def create_mgmt_client( @staticmethod @abstractmethod async def get_updated_token_async( - mgmt_auth: Union["uamqp_JWTTokenAuth", "pyamqp_JWTTokenAuth"] + mgmt_auth: Union["uamqp_JWTTokenAuth", "pyamqp_JWTTokenAuth"], ) -> Union["uamqp_JWTTokenAuth", "pyamqp_JWTTokenAuth"]: """ Return updated auth token. diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_pyamqp_transport_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_pyamqp_transport_async.py index 64c56e0b71d4..4ab467968b49 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_pyamqp_transport_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/aio/_transport/_pyamqp_transport_async.py @@ -20,7 +20,6 @@ from ...exceptions import EventHubError, EventDataSendError, OperationTimeoutError from ..._constants import MAX_BUFFER_LENGTH - if TYPE_CHECKING: from .._client_base_async import ClientBaseAsync, ConsumerProducerMixin from ..._pyamqp.message import Message @@ -481,9 +480,7 @@ async def _handle_exception_async( if isinstance(exception, errors.AuthenticationException): await closable._close_connection_async() # pylint:disable=protected-access elif isinstance(exception, errors.AMQPLinkError): - await cast( - "ConsumerProducerMixin", closable - )._close_handler_async() + await cast("ConsumerProducerMixin", closable)._close_handler_async() elif isinstance(exception, errors.AMQPConnectionError): await closable._close_connection_async() # pylint:disable=protected-access # TODO: add MessageHandlerError in amqp? diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/amqp/__init__.py b/sdk/eventhub/azure-eventhub/azure/eventhub/amqp/__init__.py index b1e758a92b32..a144d8ea3bc5 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/amqp/__init__.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/amqp/__init__.py @@ -11,7 +11,6 @@ AmqpMessageHeader, ) - __all__ = [ "AmqpAnnotatedMessage", "AmqpMessageBodyType", diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py index 5298a1d68483..e07520d1c901 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/authenticate_with_sas_token_async.py @@ -8,6 +8,7 @@ """ Example to demonstrate utilizing SAS (Shared Access Signature) tokens to authenticate with Event Hubs """ + from types import TracebackType from typing import Optional, Type import asyncio diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/client_creation_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/client_creation_async.py index 68e8ad66fc9d..3b47f0fe4d3b 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/client_creation_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/client_creation_async.py @@ -8,12 +8,12 @@ """ Examples to show how to create async EventHubProducerClient/EventHubConsumerClient. """ + import asyncio import os from azure.eventhub import TransportType from azure.eventhub.aio import EventHubProducerClient, EventHubConsumerClient, EventHubSharedKeyCredential - CONNECTION_STRING = os.environ["EVENT_HUB_CONN_STR"] FULLY_QUALIFIED_NAMESPACE = os.environ["EVENT_HUB_HOSTNAME"] EVENTHUB_NAME = os.environ["EVENT_HUB_NAME"] diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/client_identity_authentication_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/client_identity_authentication_async.py index 0c2767f1d2e4..09d03af19b7c 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/client_identity_authentication_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/client_identity_authentication_async.py @@ -38,7 +38,6 @@ from azure.eventhub.aio import EventHubProducerClient from azure.identity.aio import EnvironmentCredential - fully_qualified_namespace = os.environ["EVENT_HUB_HOSTNAME"] eventhub_name = os.environ["EVENT_HUB_NAME"] diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py index 1da6fbd0d88d..06176893ffc0 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py @@ -13,6 +13,7 @@ More information about the built-in messaging endpoint can be found at: https://learn.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin """ + from typing import cast import os import re diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/proxy_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/proxy_async.py index 84fb51d34864..6d2a1ed35a7e 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/proxy_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/proxy_async.py @@ -8,6 +8,7 @@ """ An example to show async sending and receiving events behind a proxy. """ + from typing import Union, Dict import os import asyncio diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_event_count_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_event_count_async.py index d2f86dee8ef0..16768f43f1e2 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_event_count_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_event_count_async.py @@ -12,6 +12,7 @@ If no partition id is specified, the checkpoint_store are used for load-balance and checkpoint. If partition id is specified, the checkpoint_store can only be used for checkpoint. """ + from typing import Dict import asyncio import os diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_time_interval_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_time_interval_async.py index 615b3b8905ad..baa865029119 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_time_interval_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_by_time_interval_async.py @@ -12,6 +12,7 @@ If no partition id is specified, the checkpoint_store are used for load-balance and checkpoint. If partition id is specified, the checkpoint_store can only be used for checkpoint. """ + from typing import Dict import asyncio import os diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_custom_starting_position_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_custom_starting_position_async.py index 463c06032e96..d3da354b1a3b 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_custom_starting_position_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_custom_starting_position_async.py @@ -8,6 +8,7 @@ """ An example to show receiving events from Event Hub partitions with custom starting position asynchronously. """ + import os import asyncio from azure.eventhub.aio import EventHubConsumerClient, EventHubProducerClient diff --git a/sdk/eventhub/azure-eventhub/samples/async_samples/send_async.py b/sdk/eventhub/azure-eventhub/samples/async_samples/send_async.py index 887020f926d7..f80f55adcd95 100644 --- a/sdk/eventhub/azure-eventhub/samples/async_samples/send_async.py +++ b/sdk/eventhub/azure-eventhub/samples/async_samples/send_async.py @@ -90,13 +90,12 @@ async def send_event_data_list(producer): print("Sending error: ", eh_err) - async def send_concurrent_with_shared_client_and_lock(): """ Example showing concurrent sending with a shared client using asyncio.Lock. """ send_lock = asyncio.Lock() - + producer = EventHubProducerClient.from_connection_string( conn_str=CONNECTION_STR, eventhub_name=EVENTHUB_NAME, @@ -138,7 +137,6 @@ async def main(): await run() print("Send messages in {} seconds.".format(time.time() - start_time)) - print("\nDemonstrating concurrent sending with shared client and locks...") await send_concurrent_with_shared_client_and_lock() diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/client_creation.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/client_creation.py index 3bc242aacf57..182c8f94702f 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/client_creation.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/client_creation.py @@ -8,10 +8,10 @@ """ Examples to show how to create EventHubProducerClient/EventHubConsumerClient. """ + import os from azure.eventhub import EventHubProducerClient, EventHubConsumerClient, TransportType, EventHubSharedKeyCredential - CONNECTION_STRING = os.environ["EVENT_HUB_CONN_STR"] FULLY_QUALIFIED_NAMESPACE = os.environ["EVENT_HUB_HOSTNAME"] EVENTHUB_NAME = os.environ["EVENT_HUB_NAME"] diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py index 02f1d6d973c2..294bd57ab49a 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py @@ -39,7 +39,6 @@ from azure.eventhub import EventData, EventHubProducerClient from azure.identity import EnvironmentCredential - fully_qualified_namespace = os.environ["EVENT_HUB_HOSTNAME"] eventhub_name = os.environ["EVENT_HUB_NAME"] diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/proxy.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/proxy.py index 35f97593afb4..8e3f02d0f41d 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/proxy.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/proxy.py @@ -8,6 +8,7 @@ """ An example to show sending and receiving events behind a proxy. """ + import os from typing import Dict, Union from azure.eventhub import EventData, EventHubConsumerClient, EventHubProducerClient diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv.py index cefd5d8a2349..08c2452d99a7 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv.py @@ -8,6 +8,7 @@ """ An example to show receiving events from an Event Hub. """ + import os from azure.eventhub import EventHubConsumerClient from azure.identity import DefaultAzureCredential diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_for_period.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_for_period.py index 34fb22fc755b..35863286292c 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_for_period.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_for_period.py @@ -8,6 +8,7 @@ """ An example to show receiving events from an Event Hub for a period of time. """ + import os import threading import time diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_track_last_enqueued_event_prop.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_track_last_enqueued_event_prop.py index d3ac76d2dafa..c23e38b51121 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_track_last_enqueued_event_prop.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_track_last_enqueued_event_prop.py @@ -9,6 +9,7 @@ An example to show receiving events from an Event Hub partition with EventHubConsumerClient tracking the last enqueued event properties of specific partition. """ + import os from azure.eventhub import EventHubConsumerClient from azure.identity import DefaultAzureCredential diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_event_count.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_event_count.py index 6e42e1ed083a..c29378b34bff 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_event_count.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_event_count.py @@ -12,6 +12,7 @@ If no partition id is specified, the checkpoint_store are used for load-balance and checkpoint. If partition id is specified, the checkpoint_store can only be used for checkpoint. """ + from typing import Dict import os from azure.eventhub import EventHubConsumerClient diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_time_interval.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_time_interval.py index ae047657ce12..55e74d61d596 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_time_interval.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_by_time_interval.py @@ -12,6 +12,7 @@ If no partition id is specified, the checkpoint_store are used for load-balance and checkpoint. If partition id is specified, the checkpoint_store can only be used for checkpoint. """ + from typing import Dict import os import time diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_store.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_store.py index f60b145bd340..d0338a2d7c0f 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_store.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_checkpoint_store.py @@ -11,6 +11,7 @@ If no partition id is specified, the checkpoint_store are used for load-balance and checkpoint. If partition id is specified, the checkpoint_store can only be used for checkpoint. """ + import os from azure.eventhub import EventHubConsumerClient from azure.eventhub.extensions.checkpointstoreblob import BlobCheckpointStore diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_custom_starting_position.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_custom_starting_position.py index e214bd84caac..8e59bacb3161 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_custom_starting_position.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/recv_with_custom_starting_position.py @@ -8,6 +8,7 @@ """ An example to show receiving events from Event Hub partitions with custom starting position. """ + import os from azure.eventhub import EventHubConsumerClient, EventHubProducerClient, EventData from azure.identity import DefaultAzureCredential diff --git a/sdk/eventhub/azure-eventhub/samples/sync_samples/send.py b/sdk/eventhub/azure-eventhub/samples/sync_samples/send.py index e6cbef44aa12..3dc5879ef2a1 100644 --- a/sdk/eventhub/azure-eventhub/samples/sync_samples/send.py +++ b/sdk/eventhub/azure-eventhub/samples/sync_samples/send.py @@ -101,7 +101,7 @@ def send_concurrent_with_shared_client_and_lock(): Note: Native async APIs should be used instead of running in a ThreadPoolExecutor, if possible. """ send_lock = threading.Lock() - + producer = EventHubProducerClient.from_connection_string( conn_str=CONNECTION_STR, eventhub_name=EVENTHUB_NAME, diff --git a/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_async.py b/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_async.py index e175fd9136ff..8b6270aceecc 100644 --- a/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_async.py +++ b/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_async.py @@ -134,7 +134,13 @@ def parse_starting_position(args): log_filename += ".log" logdir = os.environ.get("DEBUG_SHARE") logfilepath = f"{logdir}/{log_filename}" -LOGGER = get_logger(logfilepath, "stress_receive_async", level=debug_level, print_console=args.print_console, rotating_logs=rotating_logs) +LOGGER = get_logger( + logfilepath, + "stress_receive_async", + level=debug_level, + print_console=args.print_console, + rotating_logs=rotating_logs, +) LOG_PER_COUNT = args.output_interval start_time = time.perf_counter() diff --git a/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_sync.py b/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_sync.py index a83709b3e6d5..69016f8e4952 100644 --- a/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_sync.py +++ b/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_consumer_stress_sync.py @@ -131,7 +131,9 @@ def parse_starting_position(args): log_filename += ".log" logdir = os.environ.get("DEBUG_SHARE") logfilepath = f"{logdir}/{log_filename}" -LOGGER = get_logger(logfilepath, "stress_receive_sync", level=debug_level, print_console=print_console, rotating_logs=rotating_logs) +LOGGER = get_logger( + logfilepath, "stress_receive_sync", level=debug_level, print_console=print_console, rotating_logs=rotating_logs +) LOG_PER_COUNT = args.output_interval start_time = time.perf_counter() diff --git a/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_producer_stress.py b/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_producer_stress.py index 1a10deae5d2b..6ae434f26b99 100644 --- a/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_producer_stress.py +++ b/sdk/eventhub/azure-eventhub/stress/scripts/azure_eventhub_producer_stress.py @@ -406,7 +406,13 @@ async def get_partition_ids(self_inner): logdir = os.environ.get("DEBUG_SHARE") logfilepath = f"{logdir}/{log_filename}" - logger = get_logger(logfilepath, method_name, level=self.debug_level, print_console=self.args.print_console, rotating_logs=self.rotating_logs) + logger = get_logger( + logfilepath, + method_name, + level=self.debug_level, + print_console=self.args.print_console, + rotating_logs=self.rotating_logs, + ) test_method = globals()[method_name] self.running = True diff --git a/sdk/eventhub/azure-eventhub/stress/scripts/logger.py b/sdk/eventhub/azure-eventhub/stress/scripts/logger.py index cd1c49dc34e4..87e970390623 100644 --- a/sdk/eventhub/azure-eventhub/stress/scripts/logger.py +++ b/sdk/eventhub/azure-eventhub/stress/scripts/logger.py @@ -11,7 +11,9 @@ from opencensus.ext.azure.log_exporter import AzureLogHandler -def get_base_logger(log_filename, logger_name, level=logging.ERROR, print_console=False, log_format=None, rotating_logs=True): +def get_base_logger( + log_filename, logger_name, level=logging.ERROR, print_console=False, log_format=None, rotating_logs=True +): logger = logging.getLogger(logger_name) logger.setLevel(level) formatter = log_format or logging.Formatter( diff --git a/sdk/eventhub/azure-eventhub/stress/scripts/stress_runner.py b/sdk/eventhub/azure-eventhub/stress/scripts/stress_runner.py index efdec9d75c89..577864791c19 100644 --- a/sdk/eventhub/azure-eventhub/stress/scripts/stress_runner.py +++ b/sdk/eventhub/azure-eventhub/stress/scripts/stress_runner.py @@ -14,7 +14,6 @@ from azure.storage.blob import BlobServiceClient from azure.servicebus.control_client import ServiceBusService, EventHub - SEND_SCRIPT_PATH = "./azure_eventhub_producer_stress.py" RECEIVE_SYNC_SCRIPT_PATH = "./azure_eventhub_consumer_stress_sync.py" RECEIVE_ASYNC_SCRIPT_PATH = "./azure_eventhub_consumer_stress_async.py" diff --git a/sdk/eventhub/azure-eventhub/tests/conftest.py b/sdk/eventhub/azure-eventhub/tests/conftest.py index 87f260a108d4..c97d970523a4 100644 --- a/sdk/eventhub/azure-eventhub/tests/conftest.py +++ b/sdk/eventhub/azure-eventhub/tests/conftest.py @@ -71,9 +71,7 @@ def faultinjector(live_eventhub, request: pytest.FixtureRequest): faultinjector_params = cast(List[str], request.param["faultinjector_args"]) if os.environ.get("USE_FAULTINJECTOR") != "true": - pytest.skip( - "Fault injector not enabled. See conftest.py::faultinjector for requirements." - ) + pytest.skip("Fault injector not enabled. See conftest.py::faultinjector for requirements.") yield return @@ -86,9 +84,7 @@ def faultinjector(live_eventhub, request: pytest.FixtureRequest): print("Setting up fault injector") # Start the faultinjector process - faultinjector_params.extend( - ["--host", live_eventhub["hostname"], "--logs", logs_dir, "--cert", logs_dir] - ) + faultinjector_params.extend(["--host", live_eventhub["hostname"], "--logs", logs_dir, "--cert", logs_dir]) print("fault injector arguments", *faultinjector_params) @@ -121,17 +117,13 @@ def faultinjector(live_eventhub, request: pytest.FixtureRequest): amqpproxy_path = os.environ.get("AMQPPROXY_PATH") AMQPPROXY_PATH = os.path.abspath(amqpproxy_path) if amqpproxy_path else None RECORD_AMQP_PROXY = os.environ.get("RECORD_AMQP_PROXY") == "true" -AMQPPROXY_RECORDINGS_DIR = os.path.join( - os.path.dirname(__file__), "amqpproxy_recordings" -) +AMQPPROXY_RECORDINGS_DIR = os.path.join(os.path.dirname(__file__), "amqpproxy_recordings") if RECORD_AMQP_PROXY: if not os.path.exists(AMQPPROXY_RECORDINGS_DIR): os.makedirs(AMQPPROXY_RECORDINGS_DIR) # Create/overwrite the amqpproxy startup log file - AMQPPROXY_STARTUP_LOG = os.path.join( - AMQPPROXY_RECORDINGS_DIR, "amqpproxy_startup.log" - ) + AMQPPROXY_STARTUP_LOG = os.path.join(AMQPPROXY_RECORDINGS_DIR, "amqpproxy_startup.log") if os.path.exists(AMQPPROXY_STARTUP_LOG): with open(AMQPPROXY_STARTUP_LOG, "w") as log_file: log_file.write("") # Overwrite the file with an empty string @@ -224,9 +216,7 @@ def get_logger(filename, level=logging.INFO): uamqp_logger.addHandler(console_handler) if filename: - file_handler = RotatingFileHandler( - filename, maxBytes=5 * 1024 * 1024, backupCount=2 - ) + file_handler = RotatingFileHandler(filename, maxBytes=5 * 1024 * 1024, backupCount=2) file_handler.setFormatter(formatter) azure_logger.addHandler(file_handler) @@ -284,9 +274,7 @@ def eventhub_namespace(resource_group): except KeyError: pytest.skip("AZURE_SUBSCRIPTION_ID defined") return - base_url = os.environ.get( - "EVENTHUB_RESOURCE_MANAGER_URL", "https://management.azure.com/" - ) + base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", "https://management.azure.com/") credential_scopes = ["{}.default".format(base_url)] resource_client = EventHubManagementClient( get_devtools_credential(), @@ -300,9 +288,7 @@ def eventhub_namespace(resource_group): warnings.warn(UserWarning("EVENT_HUB_NAMESPACE undefined - skipping test")) pytest.skip("EVENT_HUB_NAMESPACE defined") - key = resource_client.namespaces.list_keys( - resource_group, namespace_name, EVENTHUB_DEFAULT_AUTH_RULE_NAME - ) + key = resource_client.namespaces.list_keys(resource_group, namespace_name, EVENTHUB_DEFAULT_AUTH_RULE_NAME) connection_string = key.primary_connection_string key_name = key.key_name primary_key = key.primary_key @@ -310,18 +296,14 @@ def eventhub_namespace(resource_group): @pytest.fixture() -def live_eventhub( - resource_group, eventhub_namespace -): # pylint: disable=redefined-outer-name +def live_eventhub(resource_group, eventhub_namespace): # pylint: disable=redefined-outer-name try: SUBSCRIPTION_ID = os.environ["AZURE_SUBSCRIPTION_ID"] except KeyError: warnings.warn(UserWarning("AZURE_SUBSCRIPTION_ID undefined - skipping test")) pytest.skip("AZURE_SUBSCRIPTION_ID defined") - base_url = os.environ.get( - "EVENTHUB_RESOURCE_MANAGER_URL", "https://management.azure.com/" - ) + base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", "https://management.azure.com/") credential_scopes = ["{}.default".format(base_url)] resource_client = EventHubManagementClient( get_devtools_credential(), @@ -331,9 +313,7 @@ def live_eventhub( ) eventhub_name = EVENTHUB_PREFIX + str(uuid.uuid4()) eventhub_ns_name, connection_string, key_name, primary_key = eventhub_namespace - eventhub_endpoint_suffix = os.environ.get( - "EVENT_HUB_ENDPOINT_SUFFIX", ".servicebus.windows.net" - ) + eventhub_endpoint_suffix = os.environ.get("EVENT_HUB_ENDPOINT_SUFFIX", ".servicebus.windows.net") try: eventhub = resource_client.event_hubs.create_or_update( resource_group, @@ -355,9 +335,7 @@ def live_eventhub( yield live_eventhub_config finally: try: - resource_client.event_hubs.delete( - resource_group, eventhub_ns_name, eventhub_name - ) + resource_client.event_hubs.delete(resource_group, eventhub_ns_name, eventhub_name) except: warnings.warn(UserWarning("eventhub teardown failed")) @@ -370,9 +348,7 @@ def resource_mgmt_client(): warnings.warn(UserWarning("AZURE_SUBSCRIPTION_ID undefined - skipping test")) pytest.skip("AZURE_SUBSCRIPTION_ID defined") - base_url = os.environ.get( - "EVENTHUB_RESOURCE_MANAGER_URL", "https://management.azure.com/" - ) + base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", "https://management.azure.com/") credential_scopes = ["{}.default".format(base_url)] resource_client = EventHubManagementClient( get_devtools_credential(), @@ -424,9 +400,7 @@ def remove_existing_recordings(path, file_name): def stop_existing_amqpproxy(log_file): # Kill any existing process using the AMQP proxy port try: - subprocess.run( - ["fuser", "-k", "5671/tcp"], check=True, stdout=log_file, stderr=log_file - ) + subprocess.run(["fuser", "-k", "5671/tcp"], check=True, stdout=log_file, stderr=log_file) log_file.write("Kill existing process on port 5671.\n") except subprocess.CalledProcessError: log_file.write("No existing process found on port 5671.\n") @@ -446,12 +420,8 @@ def amqpproxy(live_eventhub, skip_amqp_proxy, request): # Use test name as logfile test_name = request.node.name # Mirror relative path in AMQPPROXY_RECORDINGS_PATH for recording files - relative_path = os.path.relpath( - request.node.fspath, start=os.path.dirname(__file__) - ) - recording_dir_path = os.path.join( - AMQPPROXY_RECORDINGS_DIR, os.path.dirname(relative_path) - ) + relative_path = os.path.relpath(request.node.fspath, start=os.path.dirname(__file__)) + recording_dir_path = os.path.join(AMQPPROXY_RECORDINGS_DIR, os.path.dirname(relative_path)) file_name = os.path.splitext(os.path.basename(request.node.fspath))[0] recording_file = f"{file_name}.{test_name}" if not os.path.exists(recording_dir_path): @@ -492,9 +462,7 @@ def amqpproxy(live_eventhub, skip_amqp_proxy, request): if not proxy_process: log_file.write("Failed to start amqpproxy.\n") - raise RuntimeError( - f"Failed to start amqpproxy. Check for errors in {AMQPPROXY_STARTUP_LOG}" - ) + raise RuntimeError(f"Failed to start amqpproxy. Check for errors in {AMQPPROXY_STARTUP_LOG}") try: time.sleep(1) @@ -557,13 +525,9 @@ def connstr_receivers(live_eventhub, uamqp_transport, client_args): sas_auth = uamqp.authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub["key_name"], live_eventhub["access_key"] ) - receiver = uamqp.ReceiveClient( - source, auth=sas_auth, debug=False, timeout=0, prefetch=500 - ) + receiver = uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=0, prefetch=500) else: - sas_auth = SASTokenAuth( - uri, uri, live_eventhub["key_name"], live_eventhub["access_key"] - ) + sas_auth = SASTokenAuth(uri, uri, live_eventhub["key_name"], live_eventhub["access_key"]) receiver = ReceiveClient( live_eventhub["hostname"], source, @@ -616,14 +580,10 @@ def auth_credential_receivers(live_eventhub, uamqp_transport, client_args): sas_auth = uamqp.authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub["key_name"], live_eventhub["access_key"] ) - receiver = uamqp.ReceiveClient( - source, auth=sas_auth, debug=False, timeout=0, prefetch=500 - ) + receiver = uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=0, prefetch=500) else: # TODO: TokenAuth should be fine? - sas_auth = SASTokenAuth( - uri, uri, live_eventhub["key_name"], live_eventhub["access_key"] - ) + sas_auth = SASTokenAuth(uri, uri, live_eventhub["key_name"], live_eventhub["access_key"]) receiver = ReceiveClient( live_eventhub["hostname"], source, @@ -658,14 +618,10 @@ def auth_credential_receivers_async(live_eventhub, uamqp_transport, client_args) sas_auth = uamqp.authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub["key_name"], live_eventhub["access_key"] ) - receiver = uamqp.ReceiveClient( - source, auth=sas_auth, debug=False, timeout=0, prefetch=500 - ) + receiver = uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=0, prefetch=500) else: # TODO: TokenAuth should be fine? - sas_auth = SASTokenAuth( - uri, uri, live_eventhub["key_name"], live_eventhub["access_key"] - ) + sas_auth = SASTokenAuth(uri, uri, live_eventhub["key_name"], live_eventhub["access_key"]) receiver = ReceiveClient( live_eventhub["hostname"], source, @@ -677,9 +633,7 @@ def auth_credential_receivers_async(live_eventhub, uamqp_transport, client_args) ) receiver.open() receivers.append(receiver) - yield fully_qualified_namespace, eventhub_name, partial( - get_devtools_credential, is_async=True - ), receivers + yield fully_qualified_namespace, eventhub_name, partial(get_devtools_credential, is_async=True), receivers for r in receivers: r.close() @@ -724,9 +678,7 @@ def auth_credential_senders_async(live_eventhub, uamqp_transport, client_args): for p in partitions: sender = client._create_producer(partition_id=p) senders.append(sender) - yield fully_qualified_namespace, eventhub_name, partial( - get_devtools_credential, is_async=True - ), senders + yield fully_qualified_namespace, eventhub_name, partial(get_devtools_credential, is_async=True), senders for s in senders: s.close() client.close() @@ -737,6 +689,4 @@ def auth_credential_senders_async(live_eventhub, uamqp_transport, client_args): def pytest_configure(config): # register an additional marker config.addinivalue_line("markers", "liveTest: mark test to be a live test only") - config.addinivalue_line( - "markers", "no_amqpproxy: mark test to opt out of amqp proxy recording" - ) + config.addinivalue_line("markers", "no_amqpproxy: mark test to opt out of amqp proxy recording") diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_auth_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_auth_async.py index ed6171eee713..e3d39b9c3c49 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_auth_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_auth_async.py @@ -102,10 +102,7 @@ async def test_client_sas_credential_async(live_eventhub, uamqp_transport, clien # Finally let's do it with SAS token + conn str token_conn_str = "Endpoint=sb://{}/;SharedAccessSignature={};".format(hostname, token) conn_str_producer_client = EventHubProducerClient.from_connection_string( - token_conn_str, - eventhub_name=live_eventhub["event_hub"], - uamqp_transport=uamqp_transport, - **client_args + token_conn_str, eventhub_name=live_eventhub["event_hub"], uamqp_transport=uamqp_transport, **client_args ) async with conn_str_producer_client: @@ -181,7 +178,7 @@ async def test_client_azure_named_key_credential_async(live_eventhub, uamqp_tran # New feature only for Pure Python AMQP, not uamqp. @pytest.mark.liveTest @pytest.mark.asyncio -@pytest.mark.no_amqpproxy # testing ssl_context +@pytest.mark.no_amqpproxy # testing ssl_context async def test_client_with_ssl_context_async(auth_credentials_async, socket_transport): fully_qualified_namespace, eventhub_name, credential = auth_credentials_async diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_eventprocessor_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_eventprocessor_async.py index fd9de09c43c8..31e5da7ee380 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_eventprocessor_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_eventprocessor_async.py @@ -21,7 +21,6 @@ from azure.eventhub.exceptions import OwnershipLostError, EventHubError from azure.eventhub._client_base import _Address - TEST_NAMESPACE = "test_namespace" TEST_EVENTHUB = "test_eventhub" TEST_CONSUMER_GROUP = "test_consumer_group" diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_negative_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_negative_async.py index 9fc304e37bdc..ea8e2208154d 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_negative_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_negative_async.py @@ -34,7 +34,9 @@ async def test_send_with_invalid_hostname_async(invalid_hostname, uamqp_transpor pytest.skip( "Skipping on OSX - it keeps reporting 'Unable to set external certificates' " "and blocking other tests" ) - client = EventHubProducerClient.from_connection_string(invalid_hostname, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_hostname, uamqp_transport=uamqp_transport, **client_args + ) async with client: with pytest.raises(ConnectError): batch = EventDataBatch() @@ -81,11 +83,7 @@ async def test_receive_with_invalid_param_async(live_eventhub, invalid_place, ua ) client = EventHubConsumerClient.from_connection_string( - conn_str, - consumer_group="$default", - retry_total=0, - uamqp_transport=uamqp_transport, - **client_args + conn_str, consumer_group="$default", retry_total=0, uamqp_transport=uamqp_transport, **client_args ) async def on_event(partition_context, event): @@ -115,7 +113,9 @@ async def test_send_with_invalid_key_async(invalid_key, uamqp_transport, client_ @pytest.mark.liveTest @pytest.mark.asyncio async def test_send_with_invalid_policy_async(invalid_policy, uamqp_transport, client_args): - client = EventHubProducerClient.from_connection_string(invalid_policy, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_policy, uamqp_transport=uamqp_transport, **client_args + ) async with client: with pytest.raises(ConnectError): batch = EventDataBatch() @@ -213,7 +213,9 @@ async def test_create_batch_with_invalid_hostname_async(invalid_hostname, uamqp_ pytest.skip( "Skipping on OSX - it keeps reporting 'Unable to set external certificates' " "and blocking other tests" ) - client = EventHubProducerClient.from_connection_string(invalid_hostname, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_hostname, uamqp_transport=uamqp_transport, **client_args + ) async with client: with pytest.raises(ConnectError): await client.create_batch(max_size_in_bytes=300) diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_properties_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_properties_async.py index 8f01d7e090ef..b9f1d8e7b57a 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_properties_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_properties_async.py @@ -33,7 +33,9 @@ async def test_get_properties(auth_credentials_async, uamqp_transport, client_ar @pytest.mark.liveTest @pytest.mark.asyncio -async def test_get_properties_with_auth_error_async(auth_credentials_async, live_eventhub, uamqp_transport, client_args): +async def test_get_properties_with_auth_error_async( + auth_credentials_async, live_eventhub, uamqp_transport, client_args +): fully_qualified_namespace, eventhub_name, _ = auth_credentials_async client = EventHubConsumerClient( fully_qualified_namespace=fully_qualified_namespace, diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_receive_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_receive_async.py index f234fcffc21f..3f25044427b6 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_receive_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_receive_async.py @@ -201,7 +201,7 @@ async def on_error(partition_context, error): @pytest.mark.liveTest @pytest.mark.asyncio -@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp +@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp async def test_receive_over_websocket_async(auth_credential_senders_async, uamqp_transport, client_args): app_prop = {"raw_prop": "raw_value"} content_type = "text/plain" diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_reconnect_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_reconnect_async.py index 911761f0f29f..abd2b733fed4 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_reconnect_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_reconnect_async.py @@ -177,7 +177,9 @@ async def test_send_connection_idle_timeout_and_reconnect_async( @pytest.mark.liveTest @pytest.mark.asyncio -async def test_receive_connection_idle_timeout_and_reconnect_async(auth_credential_senders_async, uamqp_transport, client_args): +async def test_receive_connection_idle_timeout_and_reconnect_async( + auth_credential_senders_async, uamqp_transport, client_args +): fully_qualified_namespace, eventhub_name, credential, senders = auth_credential_senders_async client = EventHubConsumerClient( fully_qualified_namespace=fully_qualified_namespace, diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.py b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.py index 46692fef7232..6e8270b03b12 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_send_async.py @@ -60,7 +60,7 @@ async def test_send_amqp_annotated_message(auth_credentials_async, uamqp_transpo eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: sequence_body = [b"message", 123.456, True] @@ -169,7 +169,7 @@ async def on_event(partition_context, event): credential=credential(), consumer_group="$default", uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: task = asyncio.ensure_future(client.receive(on_event, starting_position="-1")) @@ -197,7 +197,7 @@ async def test_send_with_partition_key_async( eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: data_val = 0 @@ -264,7 +264,7 @@ async def test_send_and_receive_small_body_async( eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) # with fake_span(name="SendTest") as root_span: async with client: @@ -331,7 +331,7 @@ async def test_send_partition_async(auth_credential_receivers_async, uamqp_trans eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: @@ -382,7 +382,7 @@ async def test_send_non_ascii_async(auth_credential_receivers_async, uamqp_trans eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: batch = await client.create_batch(partition_id="0") @@ -420,7 +420,7 @@ async def test_send_multiple_partition_with_app_prop_async( eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: ed0 = EventData(b"Message 0") @@ -448,7 +448,7 @@ async def test_send_multiple_partition_with_app_prop_async( @pytest.mark.liveTest @pytest.mark.asyncio -@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp +@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp async def test_send_over_websocket_async(auth_credential_receivers_async, uamqp_transport, timeout_factor, client_args): fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers_async client = EventHubProducerClient( @@ -457,7 +457,7 @@ async def test_send_over_websocket_async(auth_credential_receivers_async, uamqp_ credential=credential(), transport_type=uamqp_TransportType.AmqpOverWebsocket, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: @@ -474,8 +474,10 @@ async def test_send_over_websocket_async(auth_credential_receivers_async, uamqp_ @pytest.mark.liveTest @pytest.mark.asyncio -@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp -async def test_send_with_create_event_batch_async(auth_credential_receivers_async, uamqp_transport, timeout_factor, client_args): +@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp +async def test_send_with_create_event_batch_async( + auth_credential_receivers_async, uamqp_transport, timeout_factor, client_args +): fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers_async app_prop_key = "raw_prop" app_prop_value = "raw_value" @@ -486,7 +488,7 @@ async def test_send_with_create_event_batch_async(auth_credential_receivers_asyn credential=credential(), transport_type=TransportType.AmqpOverWebsocket, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: event_data_batch = await client.create_batch(max_size_in_bytes=100000) @@ -514,7 +516,7 @@ async def test_send_list_async(auth_credential_receivers_async, uamqp_transport, eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) payload = "A1" async with client: @@ -536,7 +538,7 @@ async def test_send_list_partition_async(auth_credential_receivers_async, uamqp_ eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) payload = "A1" async with client: @@ -552,14 +554,16 @@ async def test_send_list_partition_async(auth_credential_receivers_async, uamqp_ ) @pytest.mark.liveTest @pytest.mark.asyncio -async def test_send_list_wrong_data_async(auth_credentials_async, to_send, exception_type, uamqp_transport, client_args): +async def test_send_list_wrong_data_async( + auth_credentials_async, to_send, exception_type, uamqp_transport, client_args +): fully_qualified_namespace, eventhub_name, credential = auth_credentials_async client = EventHubProducerClient( fully_qualified_namespace=fully_qualified_namespace, eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: with pytest.raises(exception_type): @@ -571,7 +575,9 @@ async def test_send_list_wrong_data_async(auth_credentials_async, to_send, excep @pytest.mark.asyncio async def test_send_batch_pid_pk_async(invalid_hostname, partition_id, partition_key, uamqp_transport, client_args): # Use invalid_hostname because this is not a live test. - client = EventHubProducerClient.from_connection_string(invalid_hostname, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_hostname, uamqp_transport=uamqp_transport, **client_args + ) batch = EventDataBatch(partition_id=partition_id, partition_key=partition_key) async with client: with pytest.raises(TypeError): @@ -598,7 +604,7 @@ async def on_success(events, pid): on_success=on_success, on_error=on_error, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) async with client: @@ -646,7 +652,7 @@ async def test_send_with_keep_alive_async(auth_credentials_async, keep_alive, ua credential=credential(), keep_alive=keep_alive, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) assert client._producers["all-partitions"]._keep_alive == keep_alive @@ -672,7 +678,7 @@ async def test_send_long_wait_idle_timeout(auth_credentials_async, keep_alive, u idle_timeout=10, retry_total=retry_total, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) sender = client._create_producer(partition_id="0") async with sender: diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_auth.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_auth.py index 77abcb4f17a3..cbb11ccae371 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_auth.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_auth.py @@ -102,10 +102,7 @@ def test_client_sas_credential(live_eventhub, uamqp_transport, client_args): # Finally let's do it with SAS token + conn str token_conn_str = "Endpoint=sb://{}/;SharedAccessSignature={};".format(hostname, token) conn_str_producer_client = EventHubProducerClient.from_connection_string( - token_conn_str, - eventhub_name=live_eventhub["event_hub"], - uamqp_transport=uamqp_transport, - **client_args + token_conn_str, eventhub_name=live_eventhub["event_hub"], uamqp_transport=uamqp_transport, **client_args ) with conn_str_producer_client: @@ -178,7 +175,7 @@ def test_client_azure_named_key_credential(live_eventhub, uamqp_transport, clien # New feature only for Pure Python AMQP, not uamqp. @pytest.mark.liveTest -@pytest.mark.no_amqpproxy # testing ssl_context +@pytest.mark.no_amqpproxy # testing ssl_context def test_client_with_ssl_context(auth_credentials, socket_transport): fully_qualified_namespace, eventhub_name, credential = auth_credentials diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_consumer_client.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_consumer_client.py index 2a108cd4e837..e579669a2a44 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_consumer_client.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_consumer_client.py @@ -226,7 +226,7 @@ def test_receive_batch_no_max_wait_time(auth_credential_senders, uamqp_transport credential=credential(), consumer_group="$default", uamqp_transport=uamqp_transport, - **client_args + **client_args, ) def on_event_batch(partition_context, event_batch): @@ -287,7 +287,7 @@ def test_receive_batch_empty_with_max_wait_time( credential=credential(), consumer_group="$default", uamqp_transport=uamqp_transport, - **client_args + **client_args, ) def on_event_batch(partition_context, event_batch): @@ -317,7 +317,7 @@ def test_receive_batch_early_callback(auth_credential_senders, uamqp_transport, credential=credential(), consumer_group="$default", uamqp_transport=uamqp_transport, - **client_args + **client_args, ) def on_event_batch(partition_context, event_batch): @@ -373,7 +373,7 @@ def on_event_batch(partition_context, event_batch): credential=credential(), consumer_group="$default", uamqp_transport=uamqp_transport, - **client_args + **client_args, ) # with fake_span(name="ReceiveSpan") as root_receive: @@ -419,7 +419,7 @@ def test_receive_batch_large_event(auth_credential_senders, uamqp_transport, cli credential=credential(), consumer_group="$default", uamqp_transport=uamqp_transport, - **client_args + **client_args, ) def on_event(partition_context, event): diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_eventprocessor.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_eventprocessor.py index a4270ea53767..6f74431063f2 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_eventprocessor.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_eventprocessor.py @@ -17,7 +17,6 @@ ) from azure.eventhub._client_base import _Address - TEST_NAMESPACE = "test_namespace" TEST_EVENTHUB = "test_eventhub" TEST_CONSUMER_GROUP = "test_consumer_group" diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_faultinjector.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_faultinjector.py index f81d633a0b39..14f7222244b2 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_faultinjector.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_faultinjector.py @@ -23,15 +23,11 @@ ], indirect=True, ) -def test_receive_partition_using_fault_injector_detach_after_delay( - auth_credential_senders, faultinjector -): +def test_receive_partition_using_fault_injector_detach_after_delay(auth_credential_senders, faultinjector): client_args = faultinjector assert client_args, "client_args is empty, fault injector wasn't started" - fully_qualified_namespace, eventhub_name, credential, senders = ( - auth_credential_senders - ) + fully_qualified_namespace, eventhub_name, credential, senders = auth_credential_senders senders[0].send(EventData("Test EventData")) diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_negative.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_negative.py index 9af344dc9cd2..e1a88bca6f8b 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_negative.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_negative.py @@ -30,7 +30,9 @@ def test_send_batch_with_invalid_hostname(invalid_hostname, uamqp_transport, cli pytest.skip( "Skipping on OSX - it keeps reporting 'Unable to set external certificates' " "and blocking other tests" ) - client = EventHubProducerClient.from_connection_string(invalid_hostname, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_hostname, uamqp_transport=uamqp_transport, **client_args + ) with client: with pytest.raises(ConnectError): batch = EventDataBatch() @@ -158,7 +160,9 @@ def test_create_batch_with_invalid_hostname_sync(invalid_hostname, uamqp_transpo pytest.skip( "Skipping on OSX - it keeps reporting 'Unable to set external certificates' " "and blocking other tests" ) - client = EventHubProducerClient.from_connection_string(invalid_hostname, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_hostname, uamqp_transport=uamqp_transport, **client_args + ) with client: with pytest.raises(ConnectError): client.create_batch(max_size_in_bytes=300) diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_receive.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_receive.py index 9e0513805bae..9791d45bccd2 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_receive.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_receive.py @@ -202,7 +202,7 @@ def on_error(partition_context, error): @pytest.mark.liveTest -@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp +@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp def test_receive_over_websocket_sync(auth_credential_senders, uamqp_transport, client_args): app_prop = {"raw_prop": "raw_value"} content_type = "text/plain" diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_reconnect.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_reconnect.py index 567f18456f9f..0768590bcaf3 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_reconnect.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_reconnect.py @@ -100,7 +100,9 @@ def test_send_with_long_interval_sync(live_eventhub, sleep, uamqp_transport, tim @pytest.mark.liveTest -def test_send_connection_idle_timeout_and_reconnect_sync(auth_credential_receivers, uamqp_transport, timeout_factor, client_args): +def test_send_connection_idle_timeout_and_reconnect_sync( + auth_credential_receivers, uamqp_transport, timeout_factor, client_args +): fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers if uamqp_transport: amqp_transport = UamqpTransport @@ -163,6 +165,7 @@ def test_send_connection_idle_timeout_and_reconnect_sync(auth_credential_receive with pytest.raises(error.AMQPConnectionError): sender._send_event_data() + @pytest.mark.liveTest def test_receive_connection_idle_timeout_and_reconnect_sync(auth_credential_senders, uamqp_transport, client_args): fully_qualified_namespace, eventhub_name, credential, senders = auth_credential_senders diff --git a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_send.py b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_send.py index 6491edc2a582..37c698ed31a9 100644 --- a/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_send.py +++ b/sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_send.py @@ -48,14 +48,16 @@ @pytest.mark.liveTest -def test_send_with_partition_key(auth_credential_receivers, live_eventhub, uamqp_transport, timeout_factor, client_args): +def test_send_with_partition_key( + auth_credential_receivers, live_eventhub, uamqp_transport, timeout_factor, client_args +): fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers client = EventHubProducerClient( fully_qualified_namespace=fully_qualified_namespace, eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: data_val = 0 @@ -108,7 +110,9 @@ def test_send_with_partition_key(auth_credential_receivers, live_eventhub, uamqp @pytest.mark.liveTest -def test_send_and_receive_large_body_size(auth_credential_receivers, uamqp_transport, timeout_factor, live_eventhub, client_args): +def test_send_and_receive_large_body_size( + auth_credential_receivers, uamqp_transport, timeout_factor, live_eventhub, client_args +): if sys.platform.startswith("darwin"): pytest.skip("Skipping on OSX - open issue regarding message size") fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers @@ -123,7 +127,7 @@ def test_send_and_receive_large_body_size(auth_credential_receivers, uamqp_trans eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: payload = 250 * 1024 @@ -150,7 +154,7 @@ def test_send_amqp_annotated_message(auth_credential_receivers, uamqp_transport, eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: sequence_body = [b"message", 123.456, True] @@ -288,7 +292,7 @@ def test_send_and_receive_small_body(auth_credential_receivers, payload, uamqp_t eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) # with fake_span(name="SendTest") as root_span: @@ -357,7 +361,7 @@ def test_send_partition(auth_credential_receivers, uamqp_transport, timeout_fact eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: @@ -410,7 +414,7 @@ def test_send_non_ascii(auth_credential_receivers, uamqp_transport, timeout_fact eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: batch = client.create_batch(partition_id="0") @@ -434,7 +438,9 @@ def test_send_non_ascii(auth_credential_receivers, uamqp_transport, timeout_fact @pytest.mark.liveTest -def test_send_multiple_partitions_with_app_prop(auth_credential_receivers, uamqp_transport, timeout_factor, client_args): +def test_send_multiple_partitions_with_app_prop( + auth_credential_receivers, uamqp_transport, timeout_factor, client_args +): fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers timeout = 5 * timeout_factor app_prop_key = "raw_prop" @@ -445,7 +451,7 @@ def test_send_multiple_partitions_with_app_prop(auth_credential_receivers, uamqp eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: ed0 = EventData(b"Message 0") @@ -473,7 +479,7 @@ def test_send_multiple_partitions_with_app_prop(auth_credential_receivers, uamqp @pytest.mark.liveTest -@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp +@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp def test_send_over_websocket_sync(auth_credential_receivers, uamqp_transport, timeout_factor, client_args): timeout = 10 * timeout_factor fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers @@ -483,7 +489,7 @@ def test_send_over_websocket_sync(auth_credential_receivers, uamqp_transport, ti credential=credential(), transport_type=uamqp_TransportType.AmqpOverWebsocket, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: @@ -499,8 +505,10 @@ def test_send_over_websocket_sync(auth_credential_receivers, uamqp_transport, ti @pytest.mark.liveTest -@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp -def test_send_with_create_event_batch_with_app_prop_sync(auth_credential_receivers, uamqp_transport, timeout_factor, client_args): +@pytest.mark.no_amqpproxy # Proxy requires TransportType.Amqp +def test_send_with_create_event_batch_with_app_prop_sync( + auth_credential_receivers, uamqp_transport, timeout_factor, client_args +): fully_qualified_namespace, eventhub_name, credential, receivers = auth_credential_receivers timeout = 5 * timeout_factor app_prop_key = "raw_prop" @@ -512,7 +520,7 @@ def test_send_with_create_event_batch_with_app_prop_sync(auth_credential_receive credential=credential(), transport_type=TransportType.AmqpOverWebsocket, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: event_data_batch = client.create_batch(max_size_in_bytes=100000) @@ -540,7 +548,7 @@ def test_send_list(auth_credential_receivers, uamqp_transport, timeout_factor, c eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) payload = "A1" with client: @@ -562,7 +570,7 @@ def test_send_list_partition(auth_credential_receivers, uamqp_transport, timeout eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) payload = "A1" with client: @@ -584,7 +592,7 @@ def test_send_list_wrong_data(auth_credentials, to_send, exception_type, uamqp_t eventhub_name=eventhub_name, credential=credential(), uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: with pytest.raises(exception_type): @@ -594,7 +602,9 @@ def test_send_list_wrong_data(auth_credentials, to_send, exception_type, uamqp_t @pytest.mark.parametrize("partition_id, partition_key", [("0", None), (None, "pk")]) def test_send_batch_pid_pk(invalid_hostname, partition_id, partition_key, uamqp_transport, client_args): # Use invalid_hostname because this is not a live test. - client = EventHubProducerClient.from_connection_string(invalid_hostname, uamqp_transport=uamqp_transport, **client_args) + client = EventHubProducerClient.from_connection_string( + invalid_hostname, uamqp_transport=uamqp_transport, **client_args + ) batch = EventDataBatch(partition_id=partition_id, partition_key=partition_key) with client: with pytest.raises(TypeError): @@ -620,7 +630,7 @@ def on_success(events, pid): on_success=on_success, on_error=on_error, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) with client: @@ -667,7 +677,7 @@ def test_send_with_keep_alive(auth_credential_receivers, keep_alive, uamqp_trans credential=credential(), keep_alive=keep_alive, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) assert client._producers["all-partitions"]._keep_alive == keep_alive @@ -692,7 +702,7 @@ def test_send_long_wait_idle_timeout(auth_credential_receivers, keep_alive, uamq idle_timeout=10, retry_total=retry_total, uamqp_transport=uamqp_transport, - **client_args + **client_args, ) sender = client._create_producer(partition_id="0") with sender: diff --git a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_link_async.py b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_link_async.py index 852ebf85a6cc..2b2cad63bc8e 100644 --- a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_link_async.py +++ b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_link_async.py @@ -70,23 +70,31 @@ async def test_link_should_not_detach(state): await link.detach() link._outgoing_detach.assert_not_called() + @pytest.mark.asyncio @pytest.mark.parametrize( "frame", [ - [2, True, [b'amqp:link:detach-forced', b"The link is force detached. Code: publisher(link3006875). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00.", None]], - [2, True, [b'amqp:link:detach-forced', None, b'something random']], - [2, True, [b'amqp:link:detach-forced', None, None]], - [2, True, [b'amqp:link:detach-forced']], - + [ + 2, + True, + [ + b"amqp:link:detach-forced", + b"The link is force detached. Code: publisher(link3006875). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00.", + None, + ], + ], + [2, True, [b"amqp:link:detach-forced", None, b"something random"]], + [2, True, [b"amqp:link:detach-forced", None, None]], + [2, True, [b"amqp:link:detach-forced"]], ], ids=["description and info", "info only", "description only", "no info or description"], ) async def test_detach_with_error(frame): - ''' - A detach can optionally include an description and info field. - https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-error - ''' + """ + A detach can optionally include an description and info field. + https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-error + """ session = None link = Link( session, @@ -104,4 +112,4 @@ async def test_detach_with_error(frame): with pytest.raises(AMQPLinkError) as ae: await link.get_state() assert ae.description == frame[2][1] - assert ae.info == frame[2][2] \ No newline at end of file + assert ae.info == frame[2][2] diff --git a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_websocket_exception_async.py b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_websocket_exception_async.py index da24bc3f7e53..a3f63c9a3460 100644 --- a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_websocket_exception_async.py +++ b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/asynctests/test_websocket_exception_async.py @@ -9,6 +9,7 @@ @pytest.mark.asyncio async def test_websocket_aiohttp_exception_async(): import aiohttp + with patch.object(aiohttp.ClientSession, "ws_connect", side_effect=aiohttp.ClientOSError): transport = WebSocketTransportAsync(host="my_host") with pytest.raises(aiohttp.ClientOSError): diff --git a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_decode.py b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_decode.py index 05b77014c20c..bf9afd7645aa 100644 --- a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_decode.py +++ b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_decode.py @@ -3,18 +3,15 @@ from decimal import Decimal - @pytest.mark.parametrize( "value,expected", [ (b'\x0c>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"\xa1', Decimal("3.4")), - (b'\x0c6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\xb9\xa1', Decimal(".34489")), - (b'\x0c@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\xa1', Decimal("10")), - (b'\x0c8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14%\xd8)\xa1', Decimal("33802.4489")), - ] + (b"\x0c6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\xb9\xa1", Decimal(".34489")), + (b"\x0c@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\xa1", Decimal("10")), + (b"\x0c8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14%\xd8)\xa1", Decimal("33802.4489")), + ], ) def test_decimal_decode(value, expected): output = _decode_decimal128(memoryview(value)) assert output[1] == expected - - diff --git a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_encode.py b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_encode.py index 3f1a9cedab33..c4a8810f0a5c 100644 --- a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_encode.py +++ b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_encode.py @@ -2,6 +2,7 @@ from azure.eventhub._pyamqp._encode import encode_filter_set, encode_unknown from decimal import Decimal + @pytest.mark.parametrize( "value,expected", [ @@ -20,13 +21,13 @@ def test_valid_filter_encode(value, expected): @pytest.mark.parametrize( - "value, expected", - [ - (Decimal("3.14"), b'\x940<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01:'), - (Decimal((1, (3, 1, 4), -2)), b'\x94\xb0<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01:'), - (Decimal("0.1"), b'\x940>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'), - (Decimal("33802.4489"), b'\x9408\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14%\xd8)'), - ] + "value, expected", + [ + (Decimal("3.14"), b"\x940<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01:"), + (Decimal((1, (3, 1, 4), -2)), b"\x94\xb0<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01:"), + (Decimal("0.1"), b"\x940>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"), + (Decimal("33802.4489"), b"\x9408\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14%\xd8)"), + ], ) def test_decimal_encode(value, expected): output = bytearray() diff --git a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_link.py b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_link.py index fec95fef8e22..860db823767e 100644 --- a/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_link.py +++ b/sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_link.py @@ -87,6 +87,7 @@ def test_receive_transfer_frame_multiple(): link._incoming_transfer(transfer_frame_two) assert link.current_link_credit == 1 + def test_max_message_size_negotiation_with_client_unlimited(): """ Test AMQP attach frame negotiation where client sends max_message_size=0 ( unlimited ) @@ -110,36 +111,36 @@ def test_max_message_size_negotiation_with_client_unlimited(): TEST_HANDLE, name=TEST_LINK_NAME, role=False, # Sender role - source_address=TEST_SOURCE_ADDRESS, + source_address=TEST_SOURCE_ADDRESS, target_address=TEST_TARGET_ADDRESS, network_trace=False, network_trace_params={}, - max_message_size=LINK_MAX_MESSAGE_SIZE + max_message_size=LINK_MAX_MESSAGE_SIZE, ) # Verifying that client sends 0 (unlimited) in attach frame assert link.max_message_size == 0, f"Expected client max_message_size=0, got {link.max_message_size}" - + # Simulating server's attach response with 20MB limit, Mock incoming attach frame from server mock_attach_frame = [ - TEST_LINK_NAME, # 0: name - TEST_HANDLE, # 1: handle - False, # 2: role - TEST_SND_SETTLE_MODE, # 3: snd-settle-mode - TEST_RCV_SETTLE_MODE, # 4: rcv-settle-mode - Source(address=TEST_SOURCE_ADDRESS), # 5: source - Target(address=TEST_TARGET_ADDRESS), # 6: target - None, # 7: unsettled - False, # 8: incomplete-unsettled - None, # 9: initial-delivery-count - SERVER_MAX_MESSAGE_SIZE, # 10: max-message-size - None, # 11: offered_capabilities - None, # 12: desired_capabilities - None, # 13: remote_properties + TEST_LINK_NAME, # 0: name + TEST_HANDLE, # 1: handle + False, # 2: role + TEST_SND_SETTLE_MODE, # 3: snd-settle-mode + TEST_RCV_SETTLE_MODE, # 4: rcv-settle-mode + Source(address=TEST_SOURCE_ADDRESS), # 5: source + Target(address=TEST_TARGET_ADDRESS), # 6: target + None, # 7: unsettled + False, # 8: incomplete-unsettled + None, # 9: initial-delivery-count + SERVER_MAX_MESSAGE_SIZE, # 10: max-message-size + None, # 11: offered_capabilities + None, # 12: desired_capabilities + None, # 13: remote_properties ] # Testing _outgoing_attach() - with patch.object(link, '_outgoing_attach') as mock_outgoing_attach: + with patch.object(link, "_outgoing_attach") as mock_outgoing_attach: # Trigger outgoing attach link.attach() @@ -150,17 +151,22 @@ def test_max_message_size_negotiation_with_client_unlimited(): call_args = mock_outgoing_attach.call_args if call_args and call_args[0]: attach_frame = call_args[0][0] - assert attach_frame.max_message_size == 0, f"Expected client to send max_message_size=0, got {attach_frame.max_message_size}" + assert ( + attach_frame.max_message_size == 0 + ), f"Expected client to send max_message_size=0, got {attach_frame.max_message_size}" # Testing _incoming_attach() - with patch.object(link, '_outgoing_attach') as mock_outgoing_response: + with patch.object(link, "_outgoing_attach") as mock_outgoing_response: # Calling _incoming_attach to process server's response link._incoming_attach(mock_attach_frame) expected_final_size = SERVER_MAX_MESSAGE_SIZE # Verifying remote_max_message_size is set correctly - assert link.remote_max_message_size == expected_final_size, f"Expected remote_max_message_size={expected_final_size}, got {link.remote_max_message_size}" + assert ( + link.remote_max_message_size == expected_final_size + ), f"Expected remote_max_message_size={expected_final_size}, got {link.remote_max_message_size}" + def test_receive_transfer_continuation_frame(): session = None @@ -227,22 +233,30 @@ def mock_outgoing(): link._incoming_transfer(transfer_frame_three) assert link.current_link_credit == 98 + @pytest.mark.parametrize( "frame", [ - [2, True, [b'amqp:link:detach-forced', b"The link is force detached. Code: publisher(link3006875). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00.", None]], - [2, True, [b'amqp:link:detach-forced', None, b'something random']], - [2, True, [b'amqp:link:detach-forced', None, None]], - [2, True, [b'amqp:link:detach-forced']], - + [ + 2, + True, + [ + b"amqp:link:detach-forced", + b"The link is force detached. Code: publisher(link3006875). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00.", + None, + ], + ], + [2, True, [b"amqp:link:detach-forced", None, b"something random"]], + [2, True, [b"amqp:link:detach-forced", None, None]], + [2, True, [b"amqp:link:detach-forced"]], ], ids=["description and info", "info only", "description only", "no info or description"], ) def test_detach_with_error(frame): - ''' - A detach can optionally include an description and info field. - https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-error - ''' + """ + A detach can optionally include an description and info field. + https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-error + """ session = None link = Link( session, @@ -261,6 +275,3 @@ def test_detach_with_error(frame): link.get_state() assert ae.description == frame[2][1] assert ae.info == frame[2][2] - - - diff --git a/sdk/eventhub/azure-eventhub/tests/tracing_common.py b/sdk/eventhub/azure-eventhub/tests/tracing_common.py index 677593a9d514..009fc4b33cde 100644 --- a/sdk/eventhub/azure-eventhub/tests/tracing_common.py +++ b/sdk/eventhub/azure-eventhub/tests/tracing_common.py @@ -4,13 +4,13 @@ # ------------------------------------ """Fake implementation of AbstractSpan for tests. Copied from `azure-core/tests`.""" + from contextlib import contextmanager from typing import Union, Sequence, Optional, Dict import uuid from azure.core.tracing import HttpSpanMixin, SpanKind - AttributeValue = Union[ str, bool, diff --git a/sdk/eventhub/azure-eventhub/tests/unittest/asynctests/test_in_memory_checkpointstore.py b/sdk/eventhub/azure-eventhub/tests/unittest/asynctests/test_in_memory_checkpointstore.py index 5ad6c17d6aa4..600b4d013adc 100644 --- a/sdk/eventhub/azure-eventhub/tests/unittest/asynctests/test_in_memory_checkpointstore.py +++ b/sdk/eventhub/azure-eventhub/tests/unittest/asynctests/test_in_memory_checkpointstore.py @@ -2,7 +2,6 @@ import pytest from azure.eventhub.aio._eventprocessor.in_memory_checkpoint_store import InMemoryCheckpointStore - TEST_NAMESPACE = "test_namespace" TEST_EVENTHUB = "test_eventhub" TEST_CONSUMER_GROUP = "test_consumer_group" diff --git a/sdk/eventhub/azure-eventhub/tests/unittest/test_event_data.py b/sdk/eventhub/azure-eventhub/tests/unittest/test_event_data.py index febd2ab48e66..110d1d7b22c7 100644 --- a/sdk/eventhub/azure-eventhub/tests/unittest/test_event_data.py +++ b/sdk/eventhub/azure-eventhub/tests/unittest/test_event_data.py @@ -374,15 +374,16 @@ def test_legacy_message(uamqp_transport): assert event_data_batch.message.on_send_complete is None assert event_data_batch.message.properties is None + def test_from_bytes(uamqp_transport): if uamqp_transport: pytest.skip("This test is only for pyamqp transport") - data = b'\x00Sr\xc1\x87\x08\xa3\x1bx-opt-sequence-number-epochT\xff\xa3\x15x-opt-sequence-numberU\x00\xa3\x0cx-opt-offsetU\x00\xa3\x13x-opt-enqueued-time\x00\xa3\x1dcom.microsoft:datetime-offset\x83\x00\x00\x01\x95\xf3XB\x86\x00St\xc1I\x02\xa1\rDiagnostic-Id\xa1700-1aa201483d464ac3c3d2ab796fbccb36-72e947bb22f404fc-00\x00Su\xa0\x08message1' + data = b"\x00Sr\xc1\x87\x08\xa3\x1bx-opt-sequence-number-epochT\xff\xa3\x15x-opt-sequence-numberU\x00\xa3\x0cx-opt-offsetU\x00\xa3\x13x-opt-enqueued-time\x00\xa3\x1dcom.microsoft:datetime-offset\x83\x00\x00\x01\x95\xf3XB\x86\x00St\xc1I\x02\xa1\rDiagnostic-Id\xa1700-1aa201483d464ac3c3d2ab796fbccb36-72e947bb22f404fc-00\x00Su\xa0\x08message1" event_data = EventData.from_bytes(data) - assert event_data.body_as_str() == 'message1' + assert event_data.body_as_str() == "message1" assert event_data.sequence_number == 0 assert event_data.offset is None - assert event_data.properties == {b'Diagnostic-Id': b'00-1aa201483d464ac3c3d2ab796fbccb36-72e947bb22f404fc-00'} + assert event_data.properties == {b"Diagnostic-Id": b"00-1aa201483d464ac3c3d2ab796fbccb36-72e947bb22f404fc-00"} assert event_data.partition_key is None - assert isinstance(event_data.enqueued_time, datetime.datetime) \ No newline at end of file + assert isinstance(event_data.enqueued_time, datetime.datetime) diff --git a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_patch.py b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_patch.py +++ b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/_patch.py b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/_patch.py +++ b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/operations/_patch.py b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/operations/_patch.py +++ b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/models/_patch.py b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/models/_patch.py +++ b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/operations/_patch.py b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/operations/_patch.py +++ b/sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_patch.py b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_patch.py +++ b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/_patch.py b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/_patch.py +++ b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/operations/_patch.py b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/operations/_patch.py +++ b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/models/_patch.py b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/models/_patch.py +++ b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/operations/_patch.py b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/operations/_patch.py +++ b/sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fabric/azure-mgmt-fabric/setup.py b/sdk/fabric/azure-mgmt-fabric/setup.py index 56b5f718a923..89a1eba7feac 100644 --- a/sdk/fabric/azure-mgmt-fabric/setup.py +++ b/sdk/fabric/azure-mgmt-fabric/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_patch.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_patch.py index 98b897fa68e2..eef64cba415c 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_patch.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, IO, List, Optional, Union, overload from azure.core.tracing.decorator import distributed_trace @@ -289,7 +290,7 @@ def create_liveness_with_verify_session( """ if verify_image is not None: if not isinstance(body, _models.CreateLivenessWithVerifySessionContent): - # Convert body to CreateLivenessWithVerifySessionContent if necessary + # Convert body to CreateLivenessWithVerifySessionContent if necessary body = _models.CreateLivenessWithVerifySessionContent(**body) request_body = ( _models._models.CreateLivenessWithVerifySessionMultipartContent( # pylint: disable=protected-access diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_patch.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_patch.py index 430ddc352d01..63fd04d03d20 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_patch.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, IO, List, Optional, Union, overload from azure.core.tracing.decorator_async import distributed_trace_async @@ -289,7 +290,7 @@ async def create_liveness_with_verify_session( """ if verify_image is not None: if not isinstance(body, _models.CreateLivenessWithVerifySessionContent): - # Convert body to CreateLivenessWithVerifySessionContent if necessary + # Convert body to CreateLivenessWithVerifySessionContent if necessary body = _models.CreateLivenessWithVerifySessionContent(**body) request_body = ( _models._models.CreateLivenessWithVerifySessionMultipartContent( # pylint: disable=protected-access diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/operations/_patch.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/operations/_patch.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py index 620f4d62e728..a46043defb6a 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from enum import Enum from typing import List diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/operations/_patch.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/operations/_patch.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/face/azure-ai-vision-face/samples/sample_authentication.py b/sdk/face/azure-ai-vision-face/samples/sample_authentication.py index 773f1341a1e4..733d931b38e8 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_authentication.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_authentication.py @@ -26,6 +26,7 @@ 4) AZURE_CLIENT_ID - the application (client) ID registered in the AAD tenant 5) AZURE_CLIENT_SECRET - the client secret for the registered application """ + import os from dotenv import find_dotenv, load_dotenv diff --git a/sdk/face/azure-ai-vision-face/samples/sample_authentication_async.py b/sdk/face/azure-ai-vision-face/samples/sample_authentication_async.py index df8834129423..7676550cdb56 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_authentication_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_authentication_async.py @@ -26,6 +26,7 @@ 4) AZURE_CLIENT_ID - the application (client) ID registered in the AAD tenant 5) AZURE_CLIENT_SECRET - the client secret for the registered application """ + import asyncio import os diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_detection.py b/sdk/face/azure-ai-vision-face/samples/sample_face_detection.py index 5ade629d657f..448835d1cbac 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_detection.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_detection.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os from dotenv import find_dotenv, load_dotenv diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_detection_async.py b/sdk/face/azure-ai-vision-face/samples/sample_face_detection_async.py index 47f17d5749b3..6a46d4534786 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_detection_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_detection_async.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_grouping.py b/sdk/face/azure-ai-vision-face/samples/sample_face_grouping.py index 943164d31a7f..8746d5166b4b 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_grouping.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_grouping.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os from dotenv import find_dotenv, load_dotenv diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_grouping_async.py b/sdk/face/azure-ai-vision-face/samples/sample_face_grouping_async.py index e307e0d6186d..08c3f879cf7e 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_grouping_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_grouping_async.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection.py b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection.py index e633fdc51f72..b920a41372d8 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection.py @@ -24,6 +24,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os import uuid diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_async.py b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_async.py index cc8e0d301103..cde4e1e9f063 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_async.py @@ -24,6 +24,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os import uuid diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification.py b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification.py index 3b8396d31b51..74435e6e8561 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification.py @@ -25,6 +25,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os import uuid diff --git a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification_async.py b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification_async.py index 00861e0a05f0..26a642339e6b 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_face_liveness_detection_with_verification_async.py @@ -25,6 +25,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os import uuid diff --git a/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces.py b/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces.py index f457f407fa73..1dd9f9b53615 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os from dotenv import find_dotenv, load_dotenv diff --git a/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces_async.py b/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces_async.py index cb6002fe177e..e596bc9a2cae 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_find_similar_faces_async.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os diff --git a/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification.py b/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification.py index 598c9184d60c..504c4656b56c 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os from dotenv import find_dotenv, load_dotenv diff --git a/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification_async.py b/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification_async.py index 5a3bcccb34d2..f3eaf4f859ba 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_stateless_face_verification_async.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os diff --git a/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group.py b/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group.py index f762b5a3f7c8..f11d6121be17 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import os from dotenv import find_dotenv, load_dotenv diff --git a/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group_async.py b/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group_async.py index 55d3e17b747e..a272188fd4fe 100644 --- a/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group_async.py +++ b/sdk/face/azure-ai-vision-face/samples/sample_verify_and_identify_from_large_person_group_async.py @@ -18,6 +18,7 @@ 1) AZURE_FACE_API_ENDPOINT - the endpoint to your Face resource. 2) AZURE_FACE_API_ACCOUNT_KEY - your Face API key. """ + import asyncio import os diff --git a/sdk/face/azure-ai-vision-face/samples/shared/helpers.py b/sdk/face/azure-ai-vision-face/samples/shared/helpers.py index b3b6e1578271..c18ae48e48c0 100644 --- a/sdk/face/azure-ai-vision-face/samples/shared/helpers.py +++ b/sdk/face/azure-ai-vision-face/samples/shared/helpers.py @@ -11,6 +11,7 @@ DESCRIPTION: This module loads logger and some utility methods required to run the sample codes. """ + from pathlib import Path import json diff --git a/sdk/face/azure-ai-vision-face/setup.py b/sdk/face/azure-ai-vision-face/setup.py index 85c0e4ceb836..cf68ac8ad842 100644 --- a/sdk/face/azure-ai-vision-face/setup.py +++ b/sdk/face/azure-ai-vision-face/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-vision-face" PACKAGE_PPRINT_NAME = "Azure Ai Vision Face" diff --git a/sdk/face/azure-ai-vision-face/tests/_shared/constants.py b/sdk/face/azure-ai-vision-face/tests/_shared/constants.py index d786c787e607..fb6455e0e71e 100644 --- a/sdk/face/azure-ai-vision-face/tests/_shared/constants.py +++ b/sdk/face/azure-ai-vision-face/tests/_shared/constants.py @@ -11,6 +11,7 @@ DESCRIPTION: This module defines constants required to run the test cases. """ + CONFIGURATION_NAME_FACE_API_ENDPOINT = "azure_face_api_endpoint" CONFIGURATION_NAME_FACE_API_ACCOUNT_KEY = "azure_face_api_account_key" diff --git a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/_patch.py b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/_patch.py +++ b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/_patch.py b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/_patch.py +++ b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/operations/_patch.py b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/operations/_patch.py +++ b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/models/_patch.py b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/models/_patch.py +++ b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/operations/_patch.py b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/operations/_patch.py +++ b/sdk/fluidrelay/azure-mgmt-fluidrelay/azure/mgmt/fluidrelay/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py b/sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py index a4b9e06783c6..ce7c4864e232 100644 --- a/sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py +++ b/sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Fluid Relay Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py index 0d1f7edf5dc6..d55ccad1f573 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py index 0d1f7edf5dc6..d55ccad1f573 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py index a68e6e8b23b3..fc21935da700 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py @@ -76,7 +76,6 @@ ) from ._api_versions import FormRecognizerApiVersion, DocumentAnalysisApiVersion - __all__ = [ "FormRecognizerApiVersion", "DocumentAnalysisClient", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py index 65cde839bca7..892d183ea961 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py @@ -121,9 +121,7 @@ def begin_analyze_document( if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: _client_op_path = self._client if kwargs.pop("features", None): - raise ValueError( - "Keyword argument 'features' is only available for API version V2023_07_31 and later." - ) + raise ValueError("Keyword argument 'features' is only available for API version V2023_07_31 and later.") else: _client_op_path = self._client.document_models return _client_op_path.begin_analyze_document( # type: ignore @@ -190,9 +188,7 @@ def begin_analyze_document_from_url( if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: _client_op_path = self._client if kwargs.pop("features", None): - raise ValueError( - "Keyword argument 'features' is only available for API version V2023_07_31 and later." - ) + raise ValueError("Keyword argument 'features' is only available for API version V2023_07_31 and later.") else: _client_op_path = self._client.document_models return _client_op_path.begin_analyze_document( # type: ignore @@ -234,8 +230,9 @@ def begin_classify_document( """ if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'begin_classify_document()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'begin_classify_document()' is only available for API version " "V2023_07_31 and later" + ) cls = kwargs.pop("cls", self._analyze_document_callback) continuation_token = kwargs.pop("continuation_token", None) @@ -284,8 +281,9 @@ def begin_classify_document_from_url( """ if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'begin_classify_document_from_url()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'begin_classify_document_from_url()' is only available for API version " "V2023_07_31 and later" + ) cls = kwargs.pop("cls", self._analyze_document_callback) continuation_token = kwargs.pop("continuation_token", None) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py index 17c4b6875939..7ee7171d0ce3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py @@ -6,14 +6,7 @@ # pylint: disable=protected-access import uuid -from typing import ( - Any, - Union, - List, - overload, - Optional, - Mapping -) +from typing import Any, Union, List, overload, Optional, Mapping from azure.core.credentials import AzureKeyCredential, TokenCredential from azure.core.tracing.decorator import distributed_trace from azure.core.polling.base_polling import LROBasePolling @@ -243,13 +236,11 @@ def callback(raw_response, _, headers): # pylint: disable=unused-argument azure_blob_file_list_source = None if prefix: azure_blob_source = self._generated_models.AzureBlobContentSource( - container_url=blob_container_url, - prefix=prefix + container_url=blob_container_url, prefix=prefix ) if file_list: azure_blob_file_list_source = self._generated_models.AzureBlobFileListContentSource( - container_url=blob_container_url, - file_list=file_list + container_url=blob_container_url, file_list=file_list ) if not azure_blob_source and not azure_blob_file_list_source: azure_blob_source = self._generated_models.AzureBlobContentSource( @@ -337,12 +328,14 @@ def _compose_callback(raw_response, _, headers): # pylint: disable=unused-argum model_id=model_id, description=description, tags=tags, - component_models=[ - self._generated_models.ComponentDocumentModelDetails(model_id=model_id) - for model_id in component_model_ids - ] - if component_model_ids - else [], + component_models=( + [ + self._generated_models.ComponentDocumentModelDetails(model_id=model_id) + for model_id in component_model_ids + ] + if component_model_ids + else [] + ), ), cls=kwargs.pop("cls", _compose_callback), polling=LROBasePolling( @@ -436,16 +429,18 @@ def _copy_callback(raw_response, _, headers): # pylint: disable=unused-argument _client_op_path = self._client.document_models.begin_copy_model_to return _client_op_path( # type: ignore model_id=model_id, - copy_to_request=self._generated_models.CopyAuthorization( - target_resource_id=target["targetResourceId"], - target_resource_region=target["targetResourceRegion"], - target_model_id=target["targetModelId"], - access_token=target["accessToken"], - expiration_date_time=target["expirationDateTime"], - target_model_location=target["targetModelLocation"], - ) - if target - else None, + copy_to_request=( + self._generated_models.CopyAuthorization( + target_resource_id=target["targetResourceId"], + target_resource_region=target["targetResourceRegion"], + target_model_id=target["targetModelId"], + access_token=target["accessToken"], + expiration_date_time=target["expirationDateTime"], + target_model_location=target["targetModelLocation"], + ) + if target + else None + ), cls=kwargs.pop("cls", _copy_callback), polling=LROBasePolling( timeout=polling_interval, lro_algorithms=[DocumentModelAdministrationPolling()], **kwargs @@ -671,15 +666,18 @@ def begin_build_document_classifier( :dedent: 4 :caption: Build a document classifier. """ + def callback(raw_response, _, headers): # pylint: disable=unused-argument - op_response = \ - self._deserialize(self._generated_models.DocumentClassifierBuildOperationDetails, raw_response) + op_response = self._deserialize( + self._generated_models.DocumentClassifierBuildOperationDetails, raw_response + ) model_info = self._deserialize(self._generated_models.DocumentClassifierDetails, op_response.result) return DocumentClassifierDetails._from_generated(model_info) if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'begin_build_document_classifier()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'begin_build_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) cls = kwargs.pop("cls", callback) continuation_token = kwargs.pop("continuation_token", None) polling_interval = kwargs.pop("polling_interval", self._client._config.polling_interval) @@ -728,8 +726,9 @@ def get_document_classifier(self, classifier_id: str, **kwargs: Any) -> Document raise ValueError("classifier_id cannot be None or empty.") if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'get_document_classifier()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'get_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) response = self._client.document_classifiers.get_classifier(classifier_id=classifier_id, **kwargs) return DocumentClassifierDetails._from_generated(response) @@ -756,8 +755,9 @@ def list_document_classifiers(self, **kwargs: Any) -> ItemPaged[DocumentClassifi """ if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'list_document_classifiers()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'list_document_classifiers()' is only available for API version " "V2023_07_31 and later" + ) return self._client.document_classifiers.list_classifiers( # type: ignore cls=kwargs.pop( "cls", @@ -792,8 +792,9 @@ def delete_document_classifier(self, classifier_id: str, **kwargs: Any) -> None: raise ValueError("classifier_id cannot be None or empty.") if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'delete_document_classifier()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'delete_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) return self._client.document_classifiers.delete_classifier(classifier_id=classifier_id, **kwargs) def get_document_analysis_client(self, **kwargs: Any) -> DocumentAnalysisClient: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_base_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_base_client.py index 02fedc988333..77be67edf2f0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_base_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_base_client.py @@ -21,7 +21,6 @@ ) from ._user_agent import USER_AGENT - _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -144,5 +143,9 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs) path_format_arguments = { "endpoint": _SERIALIZER.url("endpoint", self._endpoint, "str", skip_quote=True), } - request_copy.url = self._client._client.format_url(request_copy.url, **path_format_arguments) # pylint:disable=protected-access - return self._client._client.send_request(request_copy, stream=stream, **kwargs) # pylint:disable=protected-access + request_copy.url = self._client._client.format_url( + request_copy.url, **path_format_arguments + ) # pylint:disable=protected-access + return self._client._client.send_request( + request_copy, stream=stream, **kwargs + ) # pylint:disable=protected-access diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py index 1356e35087f7..1d5052fddc7d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py @@ -503,7 +503,9 @@ def begin_recognize_invoices( ) except ValueError as e: if "begin_analyze_invoice_async" in str(e): - raise ValueError("Method 'begin_recognize_invoices' is only available for API version V2_1 and up") # pylint: disable=raise-missing-from + raise ValueError( + "Method 'begin_recognize_invoices' is only available for API version V2_1 and up" + ) # pylint: disable=raise-missing-from raise e @distributed_trace diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py index 93dbcc1e1a20..79d5b88dff16 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py @@ -371,17 +371,19 @@ def _copy_callback(raw_response, _, headers): # pylint: disable=unused-argument return self._client.begin_copy_custom_model( # type: ignore model_id=model_id, - copy_request=self._generated_models.CopyRequest( - target_resource_id=target["resourceId"], - target_resource_region=target["resourceRegion"], - copy_authorization=self._generated_models.CopyAuthorizationResult( - access_token=target["accessToken"], - model_id=target["modelId"], - expiration_date_time_ticks=target["expirationDateTimeTicks"], - ), - ) - if target - else None, + copy_request=( + self._generated_models.CopyRequest( + target_resource_id=target["resourceId"], + target_resource_region=target["resourceRegion"], + copy_authorization=self._generated_models.CopyAuthorizationResult( + access_token=target["accessToken"], + model_id=target["modelId"], + expiration_date_time_ticks=target["expirationDateTimeTicks"], + ), + ) + if target + else None + ), cls=kwargs.pop("cls", _copy_callback), polling=LROBasePolling(timeout=polling_interval, lro_algorithms=[CopyPolling()], **kwargs), continuation_token=continuation_token, @@ -433,7 +435,9 @@ def _compose_callback(raw_response, _, headers): # pylint: disable=unused-argum **kwargs ) except ValueError: - raise ValueError("Method 'begin_create_composed_model' is only available for API version V2_1 and up") # pylint: disable=raise-missing-from + raise ValueError( + "Method 'begin_create_composed_model' is only available for API version V2_1 and up" + ) # pylint: disable=raise-missing-from def get_form_recognizer_client(self, **kwargs: Any) -> FormRecognizerClient: """Get an instance of a FormRecognizerClient from FormTrainingClient. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py index d4be1e681b60..1d8be32fbfe5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- from ._form_recognizer_client import FormRecognizerClient -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py index 6b2e3ca94ca5..c4c23848d33c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py @@ -21,6 +21,7 @@ from azure.core.credentials import TokenCredential + class FormRecognizerClientConfiguration(Configuration): """Configuration for FormRecognizerClient. @@ -48,23 +49,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "azure-ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py index f08c2e76cabc..1b3dd62bba06 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py @@ -26,6 +26,7 @@ from azure.core.credentials import TokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -33,6 +34,7 @@ def __init__(self, *args, **kwargs): """ pass + class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMixin, _SDKClient): """Extracts information from forms and images into structured data. @@ -55,53 +57,52 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2.1' + DEFAULT_API_VERSION = "2.1" _PROFILE_TAG = "azure.ai.formrecognizer.FormRecognizerClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'authorize_copy_document_model': '2022-08-31', - 'begin_analyze_document': '2022-08-31', - 'begin_build_document_model': '2022-08-31', - 'begin_compose_document_model': '2022-08-31', - 'begin_copy_document_model_to': '2022-08-31', - 'delete_document_model': '2022-08-31', - 'document_classifiers': '2023-07-31', - 'document_models': '2023-07-31', - 'get_analyze_document_result': '2022-08-31', - 'get_document_model': '2022-08-31', - 'get_document_models': '2022-08-31', - 'get_operation': '2022-08-31', - 'get_operations': '2022-08-31', - 'get_resource_details': '2022-08-31', - 'miscellaneous': '2023-07-31', - 'train_custom_model_async': '2.0', - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + "authorize_copy_document_model": "2022-08-31", + "begin_analyze_document": "2022-08-31", + "begin_build_document_model": "2022-08-31", + "begin_compose_document_model": "2022-08-31", + "begin_copy_document_model_to": "2022-08-31", + "delete_document_model": "2022-08-31", + "document_classifiers": "2023-07-31", + "document_models": "2023-07-31", + "get_analyze_document_result": "2022-08-31", + "get_document_model": "2022-08-31", + "get_document_models": "2022-08-31", + "get_operation": "2022-08-31", + "get_operations": "2022-08-31", + "get_resource_details": "2022-08-31", + "miscellaneous": "2023-07-31", + "train_custom_model_async": "2.0", + } + }, + _PROFILE_TAG + " latest", ) def __init__( self, credential, # type: "TokenCredential" endpoint, # type: str - api_version=None, # type: Optional[str] - profile=KnownProfiles.default, # type: KnownProfiles + api_version=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - if api_version == '2022-08-31' or api_version == '2023-07-31': - base_url = '{endpoint}/formrecognizer' - elif api_version == '2.0': - base_url = '{endpoint}/formrecognizer/v2.0' - elif api_version == '2.1': - base_url = '{endpoint}/formrecognizer/v2.1' + if api_version == "2022-08-31" or api_version == "2023-07-31": + base_url = "{endpoint}/formrecognizer" + elif api_version == "2.0": + base_url = "{endpoint}/formrecognizer/v2.0" + elif api_version == "2.1": + base_url = "{endpoint}/formrecognizer/v2.1" else: raise ValueError("API version {} is not available".format(api_version)) self._config = FormRecognizerClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) - super(FormRecognizerClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(FormRecognizerClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -111,22 +112,26 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2022-08-31: :mod:`v2022_08_31.models` - * 2023-07-31: :mod:`v2023_07_31.models` - * 2.0: :mod:`v2_0.models` - * 2.1: :mod:`v2_1.models` + * 2022-08-31: :mod:`v2022_08_31.models` + * 2023-07-31: :mod:`v2023_07_31.models` + * 2.0: :mod:`v2_0.models` + * 2.1: :mod:`v2_1.models` """ - if api_version == '2022-08-31': + if api_version == "2022-08-31": from .v2022_08_31 import models + return models - elif api_version == '2023-07-31': + elif api_version == "2023-07-31": from .v2023_07_31 import models + return models - elif api_version == '2.0': + elif api_version == "2.0": from .v2_0 import models + return models - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1 import models + return models raise ValueError("API version {} is not available".format(api_version)) @@ -134,45 +139,62 @@ def models(cls, api_version=DEFAULT_API_VERSION): def document_classifiers(self): """Instance depends on the API version: - * 2023-07-31: :class:`DocumentClassifiersOperations` + * 2023-07-31: :class:`DocumentClassifiersOperations` """ - api_version = self._get_api_version('document_classifiers') - if api_version == '2023-07-31': + api_version = self._get_api_version("document_classifiers") + if api_version == "2023-07-31": from .v2023_07_31.operations import DocumentClassifiersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'document_classifiers'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) @property def document_models(self): """Instance depends on the API version: - * 2023-07-31: :class:`DocumentModelsOperations` + * 2023-07-31: :class:`DocumentModelsOperations` """ - api_version = self._get_api_version('document_models') - if api_version == '2023-07-31': + api_version = self._get_api_version("document_models") + if api_version == "2023-07-31": from .v2023_07_31.operations import DocumentModelsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'document_models'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) @property def miscellaneous(self): """Instance depends on the API version: - * 2023-07-31: :class:`MiscellaneousOperations` + * 2023-07-31: :class:`MiscellaneousOperations` """ - api_version = self._get_api_version('miscellaneous') - if api_version == '2023-07-31': + api_version = self._get_api_version("miscellaneous") + if api_version == "2023-07-31": from .v2023_07_31.operations import MiscellaneousOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'miscellaneous'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) def close(self): self._client.close() + def __enter__(self): self._client.__enter__() return self + def __exit__(self, *exc_details): self._client.__exit__(*exc_details) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py index 8ccc045bcd70..17b4e9483a69 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py @@ -43,11 +43,13 @@ def authorize_copy_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('authorize_copy_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("authorize_copy_document_model") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'authorize_copy_document_model'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'authorize_copy_document_model'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -101,18 +103,22 @@ def begin_analyze_business_card_async( # pylint: disable=inconsistent-return-st :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_business_card_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_analyze_business_card_async") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_business_card_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_business_card_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.begin_analyze_business_card_async(include_text_details, locale, pages, file_stream, **kwargs) + return mixin_instance.begin_analyze_business_card_async( + include_text_details, locale, pages, file_stream, **kwargs + ) def begin_analyze_document( # pylint: disable=inconsistent-return-statements self, @@ -156,8 +162,8 @@ def begin_analyze_document( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_document') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_analyze_document") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_document'".format(api_version)) @@ -167,7 +173,9 @@ def begin_analyze_document( # pylint: disable=inconsistent-return-statements mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.begin_analyze_document(model_id, pages, locale, string_index_type, analyze_request, **kwargs) + return mixin_instance.begin_analyze_document( + model_id, pages, locale, string_index_type, analyze_request, **kwargs + ) def begin_analyze_id_document_async( # pylint: disable=inconsistent-return-statements self, @@ -210,11 +218,13 @@ def begin_analyze_id_document_async( # pylint: disable=inconsistent-return-stat :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_id_document_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_analyze_id_document_async") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_id_document_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_id_document_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -268,8 +278,8 @@ def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-statemen :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_invoice_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_analyze_invoice_async") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_invoice_async'".format(api_version)) @@ -342,10 +352,10 @@ def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statement :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_layout_async') - if api_version == '2.0': + api_version = self._get_api_version("begin_analyze_layout_async") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_layout_async'".format(api_version)) @@ -356,9 +366,9 @@ def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statement mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == '2.0': + if api_version == "2.0": return mixin_instance.begin_analyze_layout_async(file_stream, **kwargs) - elif api_version == '2.1': + elif api_version == "2.1": return mixin_instance.begin_analyze_layout_async(pages, language, reading_order, file_stream, **kwargs) def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statements @@ -406,10 +416,10 @@ def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statemen :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_receipt_async') - if api_version == '2.0': + api_version = self._get_api_version("begin_analyze_receipt_async") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_receipt_async'".format(api_version)) @@ -420,10 +430,12 @@ def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statemen mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == '2.0': + if api_version == "2.0": return mixin_instance.begin_analyze_receipt_async(include_text_details, file_stream, **kwargs) - elif api_version == '2.1': - return mixin_instance.begin_analyze_receipt_async(include_text_details, locale, pages, file_stream, **kwargs) + elif api_version == "2.1": + return mixin_instance.begin_analyze_receipt_async( + include_text_details, locale, pages, file_stream, **kwargs + ) def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-statements self, @@ -469,13 +481,15 @@ def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-stat :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_with_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("begin_analyze_with_custom_model") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_with_custom_model'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_with_custom_model'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -483,10 +497,12 @@ def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-stat mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == '2.0': + if api_version == "2.0": return mixin_instance.begin_analyze_with_custom_model(model_id, include_text_details, file_stream, **kwargs) - elif api_version == '2.1': - return mixin_instance.begin_analyze_with_custom_model(model_id, include_text_details, pages, file_stream, **kwargs) + elif api_version == "2.1": + return mixin_instance.begin_analyze_with_custom_model( + model_id, include_text_details, pages, file_stream, **kwargs + ) def begin_build_document_model( # pylint: disable=inconsistent-return-statements self, @@ -513,8 +529,8 @@ def begin_build_document_model( # pylint: disable=inconsistent-return-statement :rtype: ~...._polling.DocumentModelAdministrationClientLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_build_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_build_document_model") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_build_document_model'".format(api_version)) @@ -552,11 +568,13 @@ def begin_compose_custom_models_async( # pylint: disable=inconsistent-return-st :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_compose_custom_models_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_compose_custom_models_async") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_compose_custom_models_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_compose_custom_models_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -590,11 +608,13 @@ def begin_compose_document_model( # pylint: disable=inconsistent-return-stateme :rtype: ~...._polling.DocumentModelAdministrationClientLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_compose_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_compose_document_model") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_compose_document_model'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_compose_document_model'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -631,10 +651,10 @@ def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_copy_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("begin_copy_custom_model") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_copy_custom_model'".format(api_version)) @@ -674,11 +694,13 @@ def begin_copy_document_model_to( # pylint: disable=inconsistent-return-stateme :rtype: ~...._polling.DocumentModelAdministrationClientLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_copy_document_model_to') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_copy_document_model_to") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_copy_document_model_to'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_copy_document_model_to'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -719,11 +741,13 @@ def begin_train_custom_model_async( # pylint: disable=inconsistent-return-state :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_train_custom_model_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_train_custom_model_async") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_train_custom_model_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_train_custom_model_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -750,10 +774,10 @@ def delete_custom_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('delete_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("delete_custom_model") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'delete_custom_model'".format(api_version)) @@ -782,8 +806,8 @@ def delete_document_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('delete_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("delete_document_model") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'delete_document_model'".format(api_version)) @@ -796,8 +820,7 @@ def delete_document_model( # pylint: disable=inconsistent-return-statements return mixin_instance.delete_document_model(model_id, **kwargs) def generate_model_copy_authorization( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> _models.CopyAuthorizationResult """Generate Copy Authorization. @@ -809,13 +832,15 @@ def generate_model_copy_authorization( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyAuthorizationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('generate_model_copy_authorization') - if api_version == '2.0': + api_version = self._get_api_version("generate_model_copy_authorization") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'generate_model_copy_authorization'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'generate_model_copy_authorization'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -841,11 +866,13 @@ def get_analyze_business_card_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_business_card_result') - if api_version == '2.1': + api_version = self._get_api_version("get_analyze_business_card_result") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'get_analyze_business_card_result'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'get_analyze_business_card_result'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -874,8 +901,8 @@ def get_analyze_document_result( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_document_result') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_analyze_document_result") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_document_result'".format(api_version)) @@ -907,10 +934,10 @@ def get_analyze_form_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_form_result') - if api_version == '2.0': + api_version = self._get_api_version("get_analyze_form_result") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_form_result'".format(api_version)) @@ -939,11 +966,13 @@ def get_analyze_id_document_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_id_document_result') - if api_version == '2.1': + api_version = self._get_api_version("get_analyze_id_document_result") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'get_analyze_id_document_result'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'get_analyze_id_document_result'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -969,8 +998,8 @@ def get_analyze_invoice_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_invoice_result') - if api_version == '2.1': + api_version = self._get_api_version("get_analyze_invoice_result") + if api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_invoice_result'".format(api_version)) @@ -999,10 +1028,10 @@ def get_analyze_layout_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_layout_result') - if api_version == '2.0': + api_version = self._get_api_version("get_analyze_layout_result") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_layout_result'".format(api_version)) @@ -1031,10 +1060,10 @@ def get_analyze_receipt_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_receipt_result') - if api_version == '2.0': + api_version = self._get_api_version("get_analyze_receipt_result") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_receipt_result'".format(api_version)) @@ -1067,10 +1096,10 @@ def get_custom_model( :rtype: ~azure.ai.formrecognizer.v2_1.models.Model :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("get_custom_model") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_custom_model'".format(api_version)) @@ -1102,13 +1131,15 @@ def get_custom_model_copy_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_custom_model_copy_result') - if api_version == '2.0': + api_version = self._get_api_version("get_custom_model_copy_result") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'get_custom_model_copy_result'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'get_custom_model_copy_result'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -1118,8 +1149,7 @@ def get_custom_model_copy_result( return mixin_instance.get_custom_model_copy_result(model_id, result_id, **kwargs) def get_custom_models( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> _models.Models """Get Custom Models. @@ -1134,10 +1164,10 @@ def get_custom_models( :rtype: ~azure.ai.formrecognizer.v2_1.models.Models :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_custom_models') - if api_version == '2.0': + api_version = self._get_api_version("get_custom_models") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_custom_models'".format(api_version)) @@ -1166,8 +1196,8 @@ def get_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_document_model") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_document_model'".format(api_version)) @@ -1180,8 +1210,7 @@ def get_document_model( return mixin_instance.get_document_model(model_id, **kwargs) def get_document_models( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[_models.GetDocumentModelsResponse] """List document models. @@ -1195,8 +1224,8 @@ def get_document_models( ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2022_08_31.models.GetDocumentModelsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_document_models') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_document_models") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_document_models'".format(api_version)) @@ -1225,8 +1254,8 @@ def get_operation( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.OperationDetails :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_operation') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_operation") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operation'".format(api_version)) @@ -1239,8 +1268,7 @@ def get_operation( return mixin_instance.get_operation(operation_id, **kwargs) def get_operations( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[_models.GetOperationsResponse] """List operations. @@ -1254,8 +1282,8 @@ def get_operations( ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2022_08_31.models.GetOperationsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_operations') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_operations") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operations'".format(api_version)) @@ -1268,8 +1296,7 @@ def get_operations( return mixin_instance.get_operations(**kwargs) def get_resource_details( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> _models.ResourceDetails """Get resource info. @@ -1281,8 +1308,8 @@ def get_resource_details( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.ResourceDetails :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_resource_details') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_resource_details") + if api_version == "2022-08-31": from .v2022_08_31.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_resource_details'".format(api_version)) @@ -1295,8 +1322,7 @@ def get_resource_details( return mixin_instance.get_resource_details(**kwargs) def list_custom_models( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[_models.Models] """List Custom Models. @@ -1311,10 +1337,10 @@ def list_custom_models( :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2_1.models.Models] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('list_custom_models') - if api_version == '2.0': + api_version = self._get_api_version("list_custom_models") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from .v2_1.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_custom_models'".format(api_version)) @@ -1351,8 +1377,8 @@ def train_custom_model_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('train_custom_model_async') - if api_version == '2.0': + api_version = self._get_api_version("train_custom_model_async") + if api_version == "2.0": from .v2_0.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'train_custom_model_async'".format(api_version)) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_version.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_version.py index a30a458f8b5b..780a1be7a6ea 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_version.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "0.1.0" \ No newline at end of file +VERSION = "0.1.0" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/__init__.py index 69eccfa9e16e..d2aac624cec9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._form_recognizer_client import FormRecognizerClient -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py index eb07352dd604..e4f81a61d94b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py @@ -19,6 +19,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class FormRecognizerClientConfiguration(Configuration): """Configuration for FormRecognizerClient. @@ -32,10 +33,7 @@ class FormRecognizerClientConfiguration(Configuration): """ def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs # type: Any + self, credential: "AsyncTokenCredential", endpoint: str, **kwargs # type: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -45,22 +43,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "azure-ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py index 67205f7760b5..6314dbc39f83 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py @@ -25,6 +25,7 @@ from azure.core.credentials import TokenCredential from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -32,6 +33,7 @@ def __init__(self, *args, **kwargs): """ pass + class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMixin, _SDKClient): """Extracts information from forms and images into structured data. @@ -54,29 +56,31 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2.1' + DEFAULT_API_VERSION = "2.1" _PROFILE_TAG = "azure.ai.formrecognizer.FormRecognizerClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'authorize_copy_document_model': '2022-08-31', - 'begin_analyze_document': '2022-08-31', - 'begin_build_document_model': '2022-08-31', - 'begin_compose_document_model': '2022-08-31', - 'begin_copy_document_model_to': '2022-08-31', - 'delete_document_model': '2022-08-31', - 'document_classifiers': '2023-07-31', - 'document_models': '2023-07-31', - 'get_analyze_document_result': '2022-08-31', - 'get_document_model': '2022-08-31', - 'get_document_models': '2022-08-31', - 'get_operation': '2022-08-31', - 'get_operations': '2022-08-31', - 'get_resource_details': '2022-08-31', - 'miscellaneous': '2023-07-31', - 'train_custom_model_async': '2.0', - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + "authorize_copy_document_model": "2022-08-31", + "begin_analyze_document": "2022-08-31", + "begin_build_document_model": "2022-08-31", + "begin_compose_document_model": "2022-08-31", + "begin_copy_document_model_to": "2022-08-31", + "delete_document_model": "2022-08-31", + "document_classifiers": "2023-07-31", + "document_models": "2023-07-31", + "get_analyze_document_result": "2022-08-31", + "get_document_model": "2022-08-31", + "get_document_models": "2022-08-31", + "get_operation": "2022-08-31", + "get_operations": "2022-08-31", + "get_resource_details": "2022-08-31", + "miscellaneous": "2023-07-31", + "train_custom_model_async": "2.0", + } + }, + _PROFILE_TAG + " latest", ) def __init__( @@ -87,20 +91,17 @@ def __init__( profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: - if api_version == '2022-08-31' or api_version == '2023-07-31': - base_url = '{endpoint}/formrecognizer' - elif api_version == '2.0': - base_url = '{endpoint}/formrecognizer/v2.0' - elif api_version == '2.1': - base_url = '{endpoint}/formrecognizer/v2.1' + if api_version == "2022-08-31" or api_version == "2023-07-31": + base_url = "{endpoint}/formrecognizer" + elif api_version == "2.0": + base_url = "{endpoint}/formrecognizer/v2.0" + elif api_version == "2.1": + base_url = "{endpoint}/formrecognizer/v2.1" else: raise ValueError("API version {} is not available".format(api_version)) self._config = FormRecognizerClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(FormRecognizerClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(FormRecognizerClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -110,22 +111,26 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2022-08-31: :mod:`v2022_08_31.models` - * 2023-07-31: :mod:`v2023_07_31.models` - * 2.0: :mod:`v2_0.models` - * 2.1: :mod:`v2_1.models` + * 2022-08-31: :mod:`v2022_08_31.models` + * 2023-07-31: :mod:`v2023_07_31.models` + * 2.0: :mod:`v2_0.models` + * 2.1: :mod:`v2_1.models` """ - if api_version == '2022-08-31': + if api_version == "2022-08-31": from ..v2022_08_31 import models + return models - elif api_version == '2023-07-31': + elif api_version == "2023-07-31": from ..v2023_07_31 import models + return models - elif api_version == '2.0': + elif api_version == "2.0": from ..v2_0 import models + return models - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1 import models + return models raise ValueError("API version {} is not available".format(api_version)) @@ -133,45 +138,62 @@ def models(cls, api_version=DEFAULT_API_VERSION): def document_classifiers(self): """Instance depends on the API version: - * 2023-07-31: :class:`DocumentClassifiersOperations` + * 2023-07-31: :class:`DocumentClassifiersOperations` """ - api_version = self._get_api_version('document_classifiers') - if api_version == '2023-07-31': + api_version = self._get_api_version("document_classifiers") + if api_version == "2023-07-31": from ..v2023_07_31.aio.operations import DocumentClassifiersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'document_classifiers'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) @property def document_models(self): """Instance depends on the API version: - * 2023-07-31: :class:`DocumentModelsOperations` + * 2023-07-31: :class:`DocumentModelsOperations` """ - api_version = self._get_api_version('document_models') - if api_version == '2023-07-31': + api_version = self._get_api_version("document_models") + if api_version == "2023-07-31": from ..v2023_07_31.aio.operations import DocumentModelsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'document_models'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) @property def miscellaneous(self): """Instance depends on the API version: - * 2023-07-31: :class:`MiscellaneousOperations` + * 2023-07-31: :class:`MiscellaneousOperations` """ - api_version = self._get_api_version('miscellaneous') - if api_version == '2023-07-31': + api_version = self._get_api_version("miscellaneous") + if api_version == "2023-07-31": from ..v2023_07_31.aio.operations import MiscellaneousOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'miscellaneous'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) async def close(self): await self._client.close() + async def __aenter__(self): await self._client.__aenter__() return self + async def __aexit__(self, *exc_details): await self._client.__aexit__(*exc_details) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py index 403583568fc3..003640bd91db 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py @@ -22,9 +22,7 @@ class FormRecognizerClientOperationsMixin(object): async def authorize_copy_document_model( - self, - authorize_copy_request: _models.AuthorizeCopyRequest, - **kwargs: Any + self, authorize_copy_request: _models.AuthorizeCopyRequest, **kwargs: Any ) -> _models.CopyAuthorization: """Generate copy authorization. @@ -38,11 +36,13 @@ async def authorize_copy_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('authorize_copy_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("authorize_copy_document_model") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'authorize_copy_document_model'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'authorize_copy_document_model'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -97,18 +97,22 @@ async def begin_analyze_business_card_async( # pylint: disable=inconsistent-ret :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_business_card_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_analyze_business_card_async") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_business_card_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_business_card_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.begin_analyze_business_card_async(include_text_details, locale, pages, file_stream, content_type=content_type, **kwargs) + return await mixin_instance.begin_analyze_business_card_async( + include_text_details, locale, pages, file_stream, content_type=content_type, **kwargs + ) async def begin_analyze_document( # pylint: disable=inconsistent-return-statements self, @@ -153,8 +157,8 @@ async def begin_analyze_document( # pylint: disable=inconsistent-return-stateme :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_document') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_analyze_document") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_document'".format(api_version)) @@ -164,7 +168,9 @@ async def begin_analyze_document( # pylint: disable=inconsistent-return-stateme mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.begin_analyze_document(model_id, pages, locale, string_index_type, analyze_request, content_type=content_type, **kwargs) + return await mixin_instance.begin_analyze_document( + model_id, pages, locale, string_index_type, analyze_request, content_type=content_type, **kwargs + ) async def begin_analyze_id_document_async( # pylint: disable=inconsistent-return-statements self, @@ -208,18 +214,22 @@ async def begin_analyze_id_document_async( # pylint: disable=inconsistent-retur :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_id_document_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_analyze_id_document_async") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_id_document_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_id_document_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.begin_analyze_id_document_async(include_text_details, pages, file_stream, content_type=content_type, **kwargs) + return await mixin_instance.begin_analyze_id_document_async( + include_text_details, pages, file_stream, content_type=content_type, **kwargs + ) async def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-statements self, @@ -267,8 +277,8 @@ async def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-st :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_invoice_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_analyze_invoice_async") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_invoice_async'".format(api_version)) @@ -278,7 +288,9 @@ async def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-st mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.begin_analyze_invoice_async(include_text_details, locale, pages, file_stream, content_type=content_type, **kwargs) + return await mixin_instance.begin_analyze_invoice_async( + include_text_details, locale, pages, file_stream, content_type=content_type, **kwargs + ) async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statements self, @@ -342,10 +354,10 @@ async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-sta :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_layout_async') - if api_version == '2.0': + api_version = self._get_api_version("begin_analyze_layout_async") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_layout_async'".format(api_version)) @@ -356,10 +368,12 @@ async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-sta mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == '2.0': + if api_version == "2.0": return await mixin_instance.begin_analyze_layout_async(file_stream, **kwargs) - elif api_version == '2.1': - return await mixin_instance.begin_analyze_layout_async(pages, language, reading_order, file_stream, content_type=content_type, **kwargs) + elif api_version == "2.1": + return await mixin_instance.begin_analyze_layout_async( + pages, language, reading_order, file_stream, content_type=content_type, **kwargs + ) async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statements self, @@ -407,10 +421,10 @@ async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-st :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_receipt_async') - if api_version == '2.0': + api_version = self._get_api_version("begin_analyze_receipt_async") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_receipt_async'".format(api_version)) @@ -421,10 +435,12 @@ async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-st mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == '2.0': + if api_version == "2.0": return await mixin_instance.begin_analyze_receipt_async(include_text_details, file_stream, **kwargs) - elif api_version == '2.1': - return await mixin_instance.begin_analyze_receipt_async(include_text_details, locale, pages, file_stream, content_type=content_type, **kwargs) + elif api_version == "2.1": + return await mixin_instance.begin_analyze_receipt_async( + include_text_details, locale, pages, file_stream, content_type=content_type, **kwargs + ) async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-statements self, @@ -471,13 +487,15 @@ async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-retur :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_analyze_with_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("begin_analyze_with_custom_model") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_with_custom_model'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_with_custom_model'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -485,15 +503,17 @@ async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-retur mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == '2.0': - return await mixin_instance.begin_analyze_with_custom_model(model_id, include_text_details, file_stream, **kwargs) - elif api_version == '2.1': - return await mixin_instance.begin_analyze_with_custom_model(model_id, include_text_details, pages, file_stream, content_type=content_type, **kwargs) + if api_version == "2.0": + return await mixin_instance.begin_analyze_with_custom_model( + model_id, include_text_details, file_stream, **kwargs + ) + elif api_version == "2.1": + return await mixin_instance.begin_analyze_with_custom_model( + model_id, include_text_details, pages, file_stream, content_type=content_type, **kwargs + ) async def begin_build_document_model( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Build document model. @@ -514,8 +534,8 @@ async def begin_build_document_model( # pylint: disable=inconsistent-return-sta :rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationClientLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_build_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_build_document_model") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_build_document_model'".format(api_version)) @@ -528,9 +548,7 @@ async def begin_build_document_model( # pylint: disable=inconsistent-return-sta return await mixin_instance.begin_build_document_model(build_request, **kwargs) async def begin_compose_custom_models_async( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeRequest, - **kwargs: Any + self, compose_request: _models.ComposeRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Compose trained with labels models into one composed model. @@ -552,11 +570,13 @@ async def begin_compose_custom_models_async( # pylint: disable=inconsistent-ret :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_compose_custom_models_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_compose_custom_models_async") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_compose_custom_models_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_compose_custom_models_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -566,9 +586,7 @@ async def begin_compose_custom_models_async( # pylint: disable=inconsistent-ret return await mixin_instance.begin_compose_custom_models_async(compose_request, **kwargs) async def begin_compose_document_model( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Compose document model. @@ -589,11 +607,13 @@ async def begin_compose_document_model( # pylint: disable=inconsistent-return-s :rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationClientLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_compose_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_compose_document_model") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_compose_document_model'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_compose_document_model'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -603,10 +623,7 @@ async def begin_compose_document_model( # pylint: disable=inconsistent-return-s return await mixin_instance.begin_compose_document_model(compose_request, **kwargs) async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Copy Custom Model. @@ -629,10 +646,10 @@ async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statem :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_copy_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("begin_copy_custom_model") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_copy_custom_model'".format(api_version)) @@ -645,10 +662,7 @@ async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statem return await mixin_instance.begin_copy_custom_model(model_id, copy_request, **kwargs) async def begin_copy_document_model_to( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Copy document model. @@ -671,11 +685,13 @@ async def begin_copy_document_model_to( # pylint: disable=inconsistent-return-s :rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationClientLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_copy_document_model_to') - if api_version == '2022-08-31': + api_version = self._get_api_version("begin_copy_document_model_to") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_copy_document_model_to'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_copy_document_model_to'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -685,9 +701,7 @@ async def begin_copy_document_model_to( # pylint: disable=inconsistent-return-s return await mixin_instance.begin_copy_document_model_to(model_id, copy_to_request, **kwargs) async def begin_train_custom_model_async( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Train Custom Model. @@ -715,11 +729,13 @@ async def begin_train_custom_model_async( # pylint: disable=inconsistent-return :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('begin_train_custom_model_async') - if api_version == '2.1': + api_version = self._get_api_version("begin_train_custom_model_async") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_train_custom_model_async'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_train_custom_model_async'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -729,9 +745,7 @@ async def begin_train_custom_model_async( # pylint: disable=inconsistent-return return await mixin_instance.begin_train_custom_model_async(train_request, **kwargs) async def delete_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete Custom Model. @@ -745,10 +759,10 @@ async def delete_custom_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('delete_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("delete_custom_model") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'delete_custom_model'".format(api_version)) @@ -761,9 +775,7 @@ async def delete_custom_model( # pylint: disable=inconsistent-return-statements return await mixin_instance.delete_custom_model(model_id, **kwargs) async def delete_document_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete document model. @@ -776,8 +788,8 @@ async def delete_document_model( # pylint: disable=inconsistent-return-statemen :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('delete_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("delete_document_model") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'delete_document_model'".format(api_version)) @@ -789,10 +801,7 @@ async def delete_document_model( # pylint: disable=inconsistent-return-statemen mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.delete_document_model(model_id, **kwargs) - async def generate_model_copy_authorization( - self, - **kwargs: Any - ) -> _models.CopyAuthorizationResult: + async def generate_model_copy_authorization(self, **kwargs: Any) -> _models.CopyAuthorizationResult: """Generate Copy Authorization. Generate authorization to copy a model into the target Form Recognizer resource. @@ -802,13 +811,15 @@ async def generate_model_copy_authorization( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyAuthorizationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('generate_model_copy_authorization') - if api_version == '2.0': + api_version = self._get_api_version("generate_model_copy_authorization") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'generate_model_copy_authorization'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'generate_model_copy_authorization'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -817,11 +828,7 @@ async def generate_model_copy_authorization( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.generate_model_copy_authorization(**kwargs) - async def get_analyze_business_card_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_business_card_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Business Card Result. Track the progress and obtain the result of the analyze business card operation. @@ -833,11 +840,13 @@ async def get_analyze_business_card_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_business_card_result') - if api_version == '2.1': + api_version = self._get_api_version("get_analyze_business_card_result") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'get_analyze_business_card_result'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'get_analyze_business_card_result'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -847,10 +856,7 @@ async def get_analyze_business_card_result( return await mixin_instance.get_analyze_business_card_result(result_id, **kwargs) async def get_analyze_document_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeResultOperation: """Get analyze result. @@ -865,8 +871,8 @@ async def get_analyze_document_result( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_document_result') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_analyze_document_result") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_document_result'".format(api_version)) @@ -879,10 +885,7 @@ async def get_analyze_document_result( return await mixin_instance.get_analyze_document_result(model_id, result_id, **kwargs) async def get_analyze_form_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeOperationResult: """Get Analyze Form Result. @@ -897,10 +900,10 @@ async def get_analyze_form_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_form_result') - if api_version == '2.0': + api_version = self._get_api_version("get_analyze_form_result") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_form_result'".format(api_version)) @@ -912,11 +915,7 @@ async def get_analyze_form_result( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_analyze_form_result(model_id, result_id, **kwargs) - async def get_analyze_id_document_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_id_document_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze ID Document Result. Track the progress and obtain the result of the analyze ID operation. @@ -928,11 +927,13 @@ async def get_analyze_id_document_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_id_document_result') - if api_version == '2.1': + api_version = self._get_api_version("get_analyze_id_document_result") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'get_analyze_id_document_result'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'get_analyze_id_document_result'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -941,11 +942,7 @@ async def get_analyze_id_document_result( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_analyze_id_document_result(result_id, **kwargs) - async def get_analyze_invoice_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_invoice_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Invoice Result. Track the progress and obtain the result of the analyze invoice operation. @@ -957,8 +954,8 @@ async def get_analyze_invoice_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_invoice_result') - if api_version == '2.1': + api_version = self._get_api_version("get_analyze_invoice_result") + if api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_invoice_result'".format(api_version)) @@ -970,11 +967,7 @@ async def get_analyze_invoice_result( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_analyze_invoice_result(result_id, **kwargs) - async def get_analyze_layout_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_layout_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Layout Result. Track the progress and obtain the result of the analyze layout operation. @@ -986,10 +979,10 @@ async def get_analyze_layout_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_layout_result') - if api_version == '2.0': + api_version = self._get_api_version("get_analyze_layout_result") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_layout_result'".format(api_version)) @@ -1001,11 +994,7 @@ async def get_analyze_layout_result( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_analyze_layout_result(result_id, **kwargs) - async def get_analyze_receipt_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_receipt_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Receipt Result. Track the progress and obtain the result of the analyze receipt operation. @@ -1017,10 +1006,10 @@ async def get_analyze_receipt_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_analyze_receipt_result') - if api_version == '2.0': + api_version = self._get_api_version("get_analyze_receipt_result") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_receipt_result'".format(api_version)) @@ -1033,10 +1022,7 @@ async def get_analyze_receipt_result( return await mixin_instance.get_analyze_receipt_result(result_id, **kwargs) async def get_custom_model( - self, - model_id: str, - include_keys: Optional[bool] = False, - **kwargs: Any + self, model_id: str, include_keys: Optional[bool] = False, **kwargs: Any ) -> _models.Model: """Get Custom Model. @@ -1052,10 +1038,10 @@ async def get_custom_model( :rtype: ~azure.ai.formrecognizer.v2_1.models.Model :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_custom_model') - if api_version == '2.0': + api_version = self._get_api_version("get_custom_model") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_custom_model'".format(api_version)) @@ -1068,10 +1054,7 @@ async def get_custom_model( return await mixin_instance.get_custom_model(model_id, include_keys, **kwargs) async def get_custom_model_copy_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.CopyOperationResult: """Get Custom Model Copy Result. @@ -1086,13 +1069,15 @@ async def get_custom_model_copy_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_custom_model_copy_result') - if api_version == '2.0': + api_version = self._get_api_version("get_custom_model_copy_result") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'get_custom_model_copy_result'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'get_custom_model_copy_result'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -1101,10 +1086,7 @@ async def get_custom_model_copy_result( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_custom_model_copy_result(model_id, result_id, **kwargs) - async def get_custom_models( - self, - **kwargs: Any - ) -> _models.Models: + async def get_custom_models(self, **kwargs: Any) -> _models.Models: """Get Custom Models. Get information about all custom models. @@ -1117,10 +1099,10 @@ async def get_custom_models( :rtype: ~azure.ai.formrecognizer.v2_1.models.Models :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_custom_models') - if api_version == '2.0': + api_version = self._get_api_version("get_custom_models") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_custom_models'".format(api_version)) @@ -1132,11 +1114,7 @@ async def get_custom_models( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_custom_models(**kwargs) - async def get_document_model( - self, - model_id: str, - **kwargs: Any - ) -> _models.DocumentModelDetails: + async def get_document_model(self, model_id: str, **kwargs: Any) -> _models.DocumentModelDetails: """Get document model. Gets detailed document model information. @@ -1148,8 +1126,8 @@ async def get_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_document_model') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_document_model") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_document_model'".format(api_version)) @@ -1161,10 +1139,7 @@ async def get_document_model( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_document_model(model_id, **kwargs) - def get_document_models( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetDocumentModelsResponse]: + def get_document_models(self, **kwargs: Any) -> AsyncIterable[_models.GetDocumentModelsResponse]: """List document models. List all document models. @@ -1176,8 +1151,8 @@ def get_document_models( ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2022_08_31.models.GetDocumentModelsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_document_models') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_document_models") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_document_models'".format(api_version)) @@ -1189,11 +1164,7 @@ def get_document_models( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.get_document_models(**kwargs) - async def get_operation( - self, - operation_id: str, - **kwargs: Any - ) -> _models.OperationDetails: + async def get_operation(self, operation_id: str, **kwargs: Any) -> _models.OperationDetails: """Get operation. Gets operation info. @@ -1205,8 +1176,8 @@ async def get_operation( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.OperationDetails :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_operation') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_operation") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operation'".format(api_version)) @@ -1218,10 +1189,7 @@ async def get_operation( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_operation(operation_id, **kwargs) - def get_operations( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetOperationsResponse]: + def get_operations(self, **kwargs: Any) -> AsyncIterable[_models.GetOperationsResponse]: """List operations. Lists all operations. @@ -1233,8 +1201,8 @@ def get_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2022_08_31.models.GetOperationsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_operations') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_operations") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operations'".format(api_version)) @@ -1246,10 +1214,7 @@ def get_operations( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.get_operations(**kwargs) - async def get_resource_details( - self, - **kwargs: Any - ) -> _models.ResourceDetails: + async def get_resource_details(self, **kwargs: Any) -> _models.ResourceDetails: """Get resource info. Return information about the current resource. @@ -1259,8 +1224,8 @@ async def get_resource_details( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.ResourceDetails :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('get_resource_details') - if api_version == '2022-08-31': + api_version = self._get_api_version("get_resource_details") + if api_version == "2022-08-31": from ..v2022_08_31.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_resource_details'".format(api_version)) @@ -1272,10 +1237,7 @@ async def get_resource_details( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.get_resource_details(**kwargs) - def list_custom_models( - self, - **kwargs: Any - ) -> AsyncIterable[_models.Models]: + def list_custom_models(self, **kwargs: Any) -> AsyncIterable[_models.Models]: """List Custom Models. Get information about all custom models. @@ -1288,10 +1250,10 @@ def list_custom_models( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2_1.models.Models] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('list_custom_models') - if api_version == '2.0': + api_version = self._get_api_version("list_custom_models") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass - elif api_version == '2.1': + elif api_version == "2.1": from ..v2_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'list_custom_models'".format(api_version)) @@ -1304,9 +1266,7 @@ def list_custom_models( return mixin_instance.list_custom_models(**kwargs) async def train_custom_model_async( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> None: """Train Custom Model. @@ -1327,8 +1287,8 @@ async def train_custom_model_async( # pylint: disable=inconsistent-return-state :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = self._get_api_version('train_custom_model_async') - if api_version == '2.0': + api_version = self._get_api_version("train_custom_model_async") + if api_version == "2.0": from ..v2_0.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'train_custom_model_async'".format(api_version)) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_configuration.py index 7ed086913413..f5a08dff49ef 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -33,14 +34,9 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :paramtype api_version: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-08-31") # type: str + api_version = kwargs.pop("api_version", "2022-08-31") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,23 +46,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_form_recognizer_client.py index f91d1283ebfd..a41d66ee618e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class FormRecognizerClient(FormRecognizerClientOperationsMixin): """Extracts content, layout, and structured data from documents. @@ -37,13 +38,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -52,12 +48,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -77,7 +68,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_vendor.py index f5e2b343179d..e435b21c0ea6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/_vendor.py @@ -18,6 +18,7 @@ from azure.core import PipelineClient + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,6 +26,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -32,13 +34,13 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: FormRecognizerClientConfiguration _serialize: "Serializer" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_configuration.py index 352623134ca3..519f62449c7a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -33,14 +34,9 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :paramtype api_version: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-08-31") # type: str + api_version = kwargs.pop("api_version", "2022-08-31") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,22 +46,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_form_recognizer_client.py index 16d523508549..2731c71fcebb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class FormRecognizerClient(FormRecognizerClientOperationsMixin): """Extracts content, layout, and structured data from documents. @@ -37,13 +38,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -52,12 +48,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -77,7 +68,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_vendor.py index f1511f05e326..698f2df8ead8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: FormRecognizerClientConfiguration _serialize: "Serializer" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/__init__.py index ec4780462f6e..8dc4b997e1e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'FormRecognizerClientOperationsMixin', + "FormRecognizerClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_form_recognizer_client_operations.py index 095e225ca2ec..74096243d792 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_form_recognizer_client_operations.py @@ -10,7 +10,13 @@ from .....aio._async_polling import AsyncDocumentModelAdministrationClientLROPoller from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -22,11 +28,26 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._form_recognizer_client_operations import build_analyze_document_request_initial, build_authorize_copy_document_model_request, build_build_document_model_request_initial, build_compose_document_model_request_initial, build_copy_document_model_to_request_initial, build_delete_document_model_request, build_get_analyze_document_result_request, build_get_document_model_request, build_get_document_models_request, build_get_operation_request, build_get_operations_request, build_get_resource_details_request +from ...operations._form_recognizer_client_operations import ( + build_analyze_document_request_initial, + build_authorize_copy_document_model_request, + build_build_document_model_request_initial, + build_compose_document_model_request_initial, + build_copy_document_model_to_request_initial, + build_delete_document_model_request, + build_get_analyze_document_result_request, + build_get_document_model_request, + build_get_document_models_request, + build_get_operation_request, + build_get_operations_request, + build_get_resource_details_request, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class FormRecognizerClientOperationsMixin(MixinABC): async def _analyze_document_initial( # pylint: disable=inconsistent-return-statements @@ -40,29 +61,37 @@ async def _analyze_document_initial( # pylint: disable=inconsistent-return-stat content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if analyze_request is not None: - _json = self._serialize.body(analyze_request, 'AnalyzeDocumentRequest') - elif content_type.split(";")[0] in ['application/octet-stream', 'application/pdf', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(analyze_request, "AnalyzeDocumentRequest") + elif content_type.split(";")[0] in [ + "application/octet-stream", + "application/pdf", + "image/bmp", + "image/heif", + "image/jpeg", + "image/png", + "image/tiff", + ]: _content = analyze_request else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/octet-stream', 'application/pdf', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/octet-stream', 'application/pdf', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_document_request_initial( @@ -74,20 +103,18 @@ async def _analyze_document_initial( # pylint: disable=inconsistent-return-stat pages=pages, locale=locale, string_index_type=string_index_type, - template_url=self._analyze_document_initial.metadata['url'], + template_url=self._analyze_document_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -96,14 +123,12 @@ async def _analyze_document_initial( # pylint: disable=inconsistent-return-stat raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_document_initial.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore - + _analyze_document_initial.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace_async async def begin_analyze_document( # pylint: disable=inconsistent-return-statements @@ -152,14 +177,11 @@ async def begin_analyze_document( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_document_initial( # type: ignore model_id=model_id, @@ -169,48 +191,44 @@ async def begin_analyze_document( # pylint: disable=inconsistent-return-stateme analyze_request=analyze_request, content_type=content_type, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_document.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore + begin_analyze_document.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace_async async def get_analyze_document_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeResultOperation: """Get analyze result. @@ -225,36 +243,31 @@ async def get_analyze_document_result( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeResultOperation] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeResultOperation] - request = build_get_analyze_document_result_request( model_id=model_id, result_id=result_id, api_version=api_version, - template_url=self.get_analyze_document_result.metadata['url'], + template_url=self.get_analyze_document_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -263,53 +276,48 @@ async def get_analyze_document_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeResultOperation', pipeline_response) + deserialized = self._deserialize("AnalyzeResultOperation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_document_result.metadata = {'url': "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_document_result.metadata = {"url": "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore async def _build_document_model_initial( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(build_request, 'BuildDocumentModelRequest') + _json = self._serialize.body(build_request, "BuildDocumentModelRequest") request = build_build_document_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._build_document_model_initial.metadata['url'], + template_url=self._build_document_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -318,20 +326,16 @@ async def _build_document_model_initial( # pylint: disable=inconsistent-return- raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _build_document_model_initial.metadata = {'url': "/documentModels:build"} # type: ignore - + _build_document_model_initial.metadata = {"url": "/documentModels:build"} # type: ignore @distributed_trace_async async def begin_build_document_model( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Build document model. @@ -355,93 +359,89 @@ async def begin_build_document_model( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._build_document_model_initial( # type: ignore build_request=build_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_build_document_model.metadata = {'url': "/documentModels:build"} # type: ignore + begin_build_document_model.metadata = {"url": "/documentModels:build"} # type: ignore async def _compose_document_model_initial( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(compose_request, 'ComposeDocumentModelRequest') + _json = self._serialize.body(compose_request, "ComposeDocumentModelRequest") request = build_compose_document_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._compose_document_model_initial.metadata['url'], + template_url=self._compose_document_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -450,20 +450,16 @@ async def _compose_document_model_initial( # pylint: disable=inconsistent-retur raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _compose_document_model_initial.metadata = {'url': "/documentModels:compose"} # type: ignore - + _compose_document_model_initial.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace_async async def begin_compose_document_model( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Compose document model. @@ -487,61 +483,59 @@ async def begin_compose_document_model( # pylint: disable=inconsistent-return-s _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._compose_document_model_initial( # type: ignore compose_request=compose_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_compose_document_model.metadata = {'url': "/documentModels:compose"} # type: ignore + begin_compose_document_model.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace_async async def authorize_copy_document_model( - self, - authorize_copy_request: _models.AuthorizeCopyRequest, - **kwargs: Any + self, authorize_copy_request: _models.AuthorizeCopyRequest, **kwargs: Any ) -> _models.CopyAuthorization: """Generate copy authorization. @@ -555,38 +549,36 @@ async def authorize_copy_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorization] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorization] - _json = self._serialize.body(authorize_copy_request, 'AuthorizeCopyRequest') + _json = self._serialize.body(authorize_copy_request, "AuthorizeCopyRequest") request = build_authorize_copy_document_model_request( api_version=api_version, content_type=content_type, json=_json, - template_url=self.authorize_copy_document_model.metadata['url'], + template_url=self.authorize_copy_document_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -595,55 +587,49 @@ async def authorize_copy_document_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyAuthorization', pipeline_response) + deserialized = self._deserialize("CopyAuthorization", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - authorize_copy_document_model.metadata = {'url': "/documentModels:authorizeCopy"} # type: ignore - + authorize_copy_document_model.metadata = {"url": "/documentModels:authorizeCopy"} # type: ignore async def _copy_document_model_to_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_to_request, 'CopyAuthorization') + _json = self._serialize.body(copy_to_request, "CopyAuthorization") request = build_copy_document_model_to_request_initial( model_id=model_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._copy_document_model_to_initial.metadata['url'], + template_url=self._copy_document_model_to_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -652,21 +638,16 @@ async def _copy_document_model_to_initial( # pylint: disable=inconsistent-retur raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_document_model_to_initial.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore - + _copy_document_model_to_initial.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace_async async def begin_copy_document_model_to( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Copy document model. @@ -692,62 +673,59 @@ async def begin_copy_document_model_to( # pylint: disable=inconsistent-return-s _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._copy_document_model_to_initial( # type: ignore model_id=model_id, copy_to_request=copy_to_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_copy_document_model_to.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore + begin_copy_document_model_to.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace - def get_operations( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetOperationsResponse]: + def get_operations(self, **kwargs: Any) -> AsyncIterable[_models.GetOperationsResponse]: """List operations. Lists all operations. @@ -762,30 +740,31 @@ def get_operations( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetOperationsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetOperationsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_get_operations_request( api_version=api_version, - template_url=self.get_operations.metadata['url'], + template_url=self.get_operations.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_get_operations_request( api_version=api_version, template_url=next_link, @@ -794,12 +773,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -815,9 +798,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -828,18 +809,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - get_operations.metadata = {'url': "/operations"} # type: ignore + get_operations.metadata = {"url": "/operations"} # type: ignore @distributed_trace_async - async def get_operation( - self, - operation_id: str, - **kwargs: Any - ) -> _models.OperationDetails: + async def get_operation(self, operation_id: str, **kwargs: Any) -> _models.OperationDetails: """Get operation. Gets operation info. @@ -851,35 +826,30 @@ async def get_operation( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.OperationDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.OperationDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationDetails] - request = build_get_operation_request( operation_id=operation_id, api_version=api_version, - template_url=self.get_operation.metadata['url'], + template_url=self.get_operation.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -888,21 +858,17 @@ async def get_operation( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('OperationDetails', pipeline_response) + deserialized = self._deserialize("OperationDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_operation.metadata = {'url': "/operations/{operationId}"} # type: ignore - + get_operation.metadata = {"url": "/operations/{operationId}"} # type: ignore @distributed_trace - def get_document_models( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetDocumentModelsResponse]: + def get_document_models(self, **kwargs: Any) -> AsyncIterable[_models.GetDocumentModelsResponse]: """List document models. List all document models. @@ -917,30 +883,31 @@ def get_document_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetDocumentModelsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetDocumentModelsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_get_document_models_request( api_version=api_version, - template_url=self.get_document_models.metadata['url'], + template_url=self.get_document_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_get_document_models_request( api_version=api_version, template_url=next_link, @@ -949,12 +916,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -970,9 +941,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -983,18 +952,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - get_document_models.metadata = {'url': "/documentModels"} # type: ignore + get_document_models.metadata = {"url": "/documentModels"} # type: ignore @distributed_trace_async - async def get_document_model( - self, - model_id: str, - **kwargs: Any - ) -> _models.DocumentModelDetails: + async def get_document_model(self, model_id: str, **kwargs: Any) -> _models.DocumentModelDetails: """Get document model. Gets detailed document model information. @@ -1006,35 +969,30 @@ async def get_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.DocumentModelDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DocumentModelDetails] - request = build_get_document_model_request( model_id=model_id, api_version=api_version, - template_url=self.get_document_model.metadata['url'], + template_url=self.get_document_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1043,21 +1001,18 @@ async def get_document_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('DocumentModelDetails', pipeline_response) + deserialized = self._deserialize("DocumentModelDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_document_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + get_document_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore @distributed_trace_async async def delete_document_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete document model. @@ -1070,35 +1025,30 @@ async def delete_document_model( # pylint: disable=inconsistent-return-statemen :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_document_model_request( model_id=model_id, api_version=api_version, - template_url=self.delete_document_model.metadata['url'], + template_url=self.delete_document_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1110,14 +1060,10 @@ async def delete_document_model( # pylint: disable=inconsistent-return-statemen if cls: return cls(pipeline_response, None, {}) - delete_document_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + delete_document_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore @distributed_trace_async - async def get_resource_details( - self, - **kwargs: Any - ) -> _models.ResourceDetails: + async def get_resource_details(self, **kwargs: Any) -> _models.ResourceDetails: """Get resource info. Return information about the current resource. @@ -1127,34 +1073,29 @@ async def get_resource_details( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.ResourceDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.ResourceDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ResourceDetails] - request = build_get_resource_details_request( api_version=api_version, - template_url=self.get_resource_details.metadata['url'], + template_url=self.get_resource_details.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1163,12 +1104,11 @@ async def get_resource_details( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('ResourceDetails', pipeline_response) + deserialized = self._deserialize("ResourceDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_resource_details.metadata = {'url': "/info"} # type: ignore - + get_resource_details.metadata = {"url": "/info"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/aio/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/__init__.py index bfa263d19d16..da7b0dfecb99 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/__init__.py @@ -68,62 +68,63 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AddressValue', - 'AnalyzeDocumentRequest', - 'AnalyzeResult', - 'AnalyzeResultOperation', - 'AuthorizeCopyRequest', - 'AzureBlobContentSource', - 'BoundingRegion', - 'BuildDocumentModelRequest', - 'ComponentDocumentModelDetails', - 'ComposeDocumentModelRequest', - 'CopyAuthorization', - 'CurrencyValue', - 'CustomDocumentModelsDetails', - 'Document', - 'DocumentField', - 'DocumentFieldSchema', - 'DocumentKeyValueElement', - 'DocumentKeyValuePair', - 'DocumentLanguage', - 'DocumentLine', - 'DocumentModelBuildOperationDetails', - 'DocumentModelComposeOperationDetails', - 'DocumentModelCopyToOperationDetails', - 'DocumentModelDetails', - 'DocumentModelSummary', - 'DocumentPage', - 'DocumentParagraph', - 'DocumentSelectionMark', - 'DocumentSpan', - 'DocumentStyle', - 'DocumentTable', - 'DocumentTableCell', - 'DocumentTypeDetails', - 'DocumentWord', - 'Error', - 'ErrorResponse', - 'GetDocumentModelsResponse', - 'GetOperationsResponse', - 'InnerError', - 'OperationDetails', - 'OperationSummary', - 'ResourceDetails', - 'AnalyzeResultOperationStatus', - 'ApiVersion', - 'ContentType', - 'DocumentBuildMode', - 'DocumentFieldType', - 'DocumentSignatureType', - 'DocumentTableCellKind', - 'LengthUnit', - 'OperationKind', - 'OperationStatus', - 'ParagraphRole', - 'SelectionMarkState', - 'StringIndexType', + "AddressValue", + "AnalyzeDocumentRequest", + "AnalyzeResult", + "AnalyzeResultOperation", + "AuthorizeCopyRequest", + "AzureBlobContentSource", + "BoundingRegion", + "BuildDocumentModelRequest", + "ComponentDocumentModelDetails", + "ComposeDocumentModelRequest", + "CopyAuthorization", + "CurrencyValue", + "CustomDocumentModelsDetails", + "Document", + "DocumentField", + "DocumentFieldSchema", + "DocumentKeyValueElement", + "DocumentKeyValuePair", + "DocumentLanguage", + "DocumentLine", + "DocumentModelBuildOperationDetails", + "DocumentModelComposeOperationDetails", + "DocumentModelCopyToOperationDetails", + "DocumentModelDetails", + "DocumentModelSummary", + "DocumentPage", + "DocumentParagraph", + "DocumentSelectionMark", + "DocumentSpan", + "DocumentStyle", + "DocumentTable", + "DocumentTableCell", + "DocumentTypeDetails", + "DocumentWord", + "Error", + "ErrorResponse", + "GetDocumentModelsResponse", + "GetOperationsResponse", + "InnerError", + "OperationDetails", + "OperationSummary", + "ResourceDetails", + "AnalyzeResultOperationStatus", + "ApiVersion", + "ContentType", + "DocumentBuildMode", + "DocumentFieldType", + "DocumentSignatureType", + "DocumentTableCellKind", + "LengthUnit", + "OperationKind", + "OperationStatus", + "ParagraphRole", + "SelectionMarkState", + "StringIndexType", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_form_recognizer_client_enums.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_form_recognizer_client_enums.py index cd12789d0847..20dd1cb620ec 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_form_recognizer_client_enums.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_form_recognizer_client_enums.py @@ -11,23 +11,22 @@ class AnalyzeResultOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Operation status. - """ + """Operation status.""" NOT_STARTED = "notStarted" RUNNING = "running" FAILED = "failed" SUCCEEDED = "succeeded" + class ApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """API version. - """ + """API version.""" TWO_THOUSAND_TWENTY_TWO08_31 = "2022-08-31" + class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Content type for upload - """ + """Content type for upload""" #: Content Type 'application/octet-stream'. APPLICATION_OCTET_STREAM = "application/octet-stream" @@ -46,16 +45,16 @@ class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Content Type 'application/json'. APPLICATION_JSON = "application/json" + class DocumentBuildMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Custom document model build mode. - """ + """Custom document model build mode.""" TEMPLATE = "template" NEURAL = "neural" + class DocumentFieldType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic data type of the field value. - """ + """Semantic data type of the field value.""" STRING = "string" DATE = "date" @@ -71,16 +70,16 @@ class DocumentFieldType(str, Enum, metaclass=CaseInsensitiveEnumMeta): CURRENCY = "currency" ADDRESS = "address" + class DocumentSignatureType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Presence of signature. - """ + """Presence of signature.""" SIGNED = "signed" UNSIGNED = "unsigned" + class DocumentTableCellKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Table cell kind. - """ + """Table cell kind.""" CONTENT = "content" ROW_HEADER = "rowHeader" @@ -88,6 +87,7 @@ class DocumentTableCellKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): STUB_HEAD = "stubHead" DESCRIPTION = "description" + class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch". @@ -96,17 +96,17 @@ class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): PIXEL = "pixel" INCH = "inch" + class OperationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of operation. - """ + """Type of operation.""" DOCUMENT_MODEL_BUILD = "documentModelBuild" DOCUMENT_MODEL_COMPOSE = "documentModelCompose" DOCUMENT_MODEL_COPY_TO = "documentModelCopyTo" + class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Operation status. - """ + """Operation status.""" NOT_STARTED = "notStarted" RUNNING = "running" @@ -114,9 +114,9 @@ class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): SUCCEEDED = "succeeded" CANCELED = "canceled" + class ParagraphRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic role of the paragraph. - """ + """Semantic role of the paragraph.""" PAGE_HEADER = "pageHeader" PAGE_FOOTER = "pageFooter" @@ -125,16 +125,16 @@ class ParagraphRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): SECTION_HEADING = "sectionHeading" FOOTNOTE = "footnote" + class SelectionMarkState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State of the selection mark. - """ + """State of the selection mark.""" SELECTED = "selected" UNSELECTED = "unselected" + class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Method used to compute string offset and length. - """ + """Method used to compute string offset and length.""" TEXT_ELEMENTS = "textElements" UNICODE_CODE_POINT = "unicodeCodePoint" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_models_py3.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_models_py3.py index 1d2e784ed245..02035d41689b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_models_py3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_models_py3.py @@ -40,14 +40,14 @@ class AddressValue(msrest.serialization.Model): """ _attribute_map = { - 'house_number': {'key': 'houseNumber', 'type': 'str'}, - 'po_box': {'key': 'poBox', 'type': 'str'}, - 'road': {'key': 'road', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'country_region': {'key': 'countryRegion', 'type': 'str'}, - 'street_address': {'key': 'streetAddress', 'type': 'str'}, + "house_number": {"key": "houseNumber", "type": "str"}, + "po_box": {"key": "poBox", "type": "str"}, + "road": {"key": "road", "type": "str"}, + "city": {"key": "city", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "postal_code": {"key": "postalCode", "type": "str"}, + "country_region": {"key": "countryRegion", "type": "str"}, + "street_address": {"key": "streetAddress", "type": "str"}, } def __init__( @@ -103,17 +103,11 @@ class AnalyzeDocumentRequest(msrest.serialization.Model): """ _attribute_map = { - 'url_source': {'key': 'urlSource', 'type': 'str'}, - 'base64_source': {'key': 'base64Source', 'type': 'bytearray'}, + "url_source": {"key": "urlSource", "type": "str"}, + "base64_source": {"key": "base64Source", "type": "bytearray"}, } - def __init__( - self, - *, - url_source: Optional[str] = None, - base64_source: Optional[bytearray] = None, - **kwargs - ): + def __init__(self, *, url_source: Optional[str] = None, base64_source: Optional[bytearray] = None, **kwargs): """ :keyword url_source: Document URL to analyze. :paramtype url_source: str @@ -159,25 +153,25 @@ class AnalyzeResult(msrest.serialization.Model): """ _validation = { - 'api_version': {'required': True}, - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'string_index_type': {'required': True}, - 'content': {'required': True}, - 'pages': {'required': True}, + "api_version": {"required": True}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "string_index_type": {"required": True}, + "content": {"required": True}, + "pages": {"required": True}, } _attribute_map = { - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - 'pages': {'key': 'pages', 'type': '[DocumentPage]'}, - 'paragraphs': {'key': 'paragraphs', 'type': '[DocumentParagraph]'}, - 'tables': {'key': 'tables', 'type': '[DocumentTable]'}, - 'key_value_pairs': {'key': 'keyValuePairs', 'type': '[DocumentKeyValuePair]'}, - 'styles': {'key': 'styles', 'type': '[DocumentStyle]'}, - 'languages': {'key': 'languages', 'type': '[DocumentLanguage]'}, - 'documents': {'key': 'documents', 'type': '[Document]'}, + "api_version": {"key": "apiVersion", "type": "str"}, + "model_id": {"key": "modelId", "type": "str"}, + "string_index_type": {"key": "stringIndexType", "type": "str"}, + "content": {"key": "content", "type": "str"}, + "pages": {"key": "pages", "type": "[DocumentPage]"}, + "paragraphs": {"key": "paragraphs", "type": "[DocumentParagraph]"}, + "tables": {"key": "tables", "type": "[DocumentTable]"}, + "key_value_pairs": {"key": "keyValuePairs", "type": "[DocumentKeyValuePair]"}, + "styles": {"key": "styles", "type": "[DocumentStyle]"}, + "languages": {"key": "languages", "type": "[DocumentLanguage]"}, + "documents": {"key": "documents", "type": "[Document]"}, } def __init__( @@ -260,17 +254,17 @@ class AnalyzeResultOperation(msrest.serialization.Model): """ _validation = { - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'analyze_result': {'key': 'analyzeResult', 'type': 'AnalyzeResult'}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "error": {"key": "error", "type": "Error"}, + "analyze_result": {"key": "analyzeResult", "type": "AnalyzeResult"}, } def __init__( @@ -321,23 +315,18 @@ class AuthorizeCopyRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'description': {'max_length': 4096, 'min_length': 0}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "description": {"max_length": 4096, "min_length": 0}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( - self, - *, - model_id: str, - description: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs + self, *, model_id: str, description: Optional[str] = None, tags: Optional[Dict[str, str]] = None, **kwargs ): """ :keyword model_id: Required. Unique document model name. @@ -366,21 +355,15 @@ class AzureBlobContentSource(msrest.serialization.Model): """ _validation = { - 'container_url': {'required': True}, + "container_url": {"required": True}, } _attribute_map = { - 'container_url': {'key': 'containerUrl', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, + "container_url": {"key": "containerUrl", "type": "str"}, + "prefix": {"key": "prefix", "type": "str"}, } - def __init__( - self, - *, - container_url: str, - prefix: Optional[str] = None, - **kwargs - ): + def __init__(self, *, container_url: str, prefix: Optional[str] = None, **kwargs): """ :keyword container_url: Required. Azure Blob Storage container URL. :paramtype container_url: str @@ -404,22 +387,16 @@ class BoundingRegion(msrest.serialization.Model): """ _validation = { - 'page_number': {'required': True, 'minimum': 1}, - 'polygon': {'required': True}, + "page_number": {"required": True, "minimum": 1}, + "polygon": {"required": True}, } _attribute_map = { - 'page_number': {'key': 'pageNumber', 'type': 'int'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, + "page_number": {"key": "pageNumber", "type": "int"}, + "polygon": {"key": "polygon", "type": "[float]"}, } - def __init__( - self, - *, - page_number: int, - polygon: List[float], - **kwargs - ): + def __init__(self, *, page_number: int, polygon: List[float], **kwargs): """ :keyword page_number: Required. 1-based page number of page containing the bounding region. :paramtype page_number: int @@ -450,17 +427,17 @@ class BuildDocumentModelRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'build_mode': {'required': True}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "description": {"max_length": 4096, "min_length": 0}, + "build_mode": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'build_mode': {'key': 'buildMode', 'type': 'str'}, - 'azure_blob_source': {'key': 'azureBlobSource', 'type': 'AzureBlobContentSource'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "build_mode": {"key": "buildMode", "type": "str"}, + "azure_blob_source": {"key": "azureBlobSource", "type": "AzureBlobContentSource"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -506,19 +483,14 @@ class ComponentDocumentModelDetails(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, + "model_id": {"key": "modelId", "type": "str"}, } - def __init__( - self, - *, - model_id: str, - **kwargs - ): + def __init__(self, *, model_id: str, **kwargs): """ :keyword model_id: Required. Unique document model name. :paramtype model_id: str @@ -544,16 +516,16 @@ class ComposeDocumentModelRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'component_models': {'required': True}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "description": {"max_length": 4096, "min_length": 0}, + "component_models": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'component_models': {'key': 'componentModels', 'type': '[ComponentDocumentModelDetails]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "component_models": {"key": "componentModels", "type": "[ComponentDocumentModelDetails]"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -606,21 +578,21 @@ class CopyAuthorization(msrest.serialization.Model): """ _validation = { - 'target_resource_id': {'required': True}, - 'target_resource_region': {'required': True}, - 'target_model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'target_model_location': {'required': True}, - 'access_token': {'required': True}, - 'expiration_date_time': {'required': True}, + "target_resource_id": {"required": True}, + "target_resource_region": {"required": True}, + "target_model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "target_model_location": {"required": True}, + "access_token": {"required": True}, + "expiration_date_time": {"required": True}, } _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'target_resource_region': {'key': 'targetResourceRegion', 'type': 'str'}, - 'target_model_id': {'key': 'targetModelId', 'type': 'str'}, - 'target_model_location': {'key': 'targetModelLocation', 'type': 'str'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + "target_resource_id": {"key": "targetResourceId", "type": "str"}, + "target_resource_region": {"key": "targetResourceRegion", "type": "str"}, + "target_model_id": {"key": "targetModelId", "type": "str"}, + "target_model_location": {"key": "targetModelLocation", "type": "str"}, + "access_token": {"key": "accessToken", "type": "str"}, + "expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"}, } def __init__( @@ -672,21 +644,15 @@ class CurrencyValue(msrest.serialization.Model): """ _validation = { - 'amount': {'required': True}, + "amount": {"required": True}, } _attribute_map = { - 'amount': {'key': 'amount', 'type': 'float'}, - 'currency_symbol': {'key': 'currencySymbol', 'type': 'str'}, + "amount": {"key": "amount", "type": "float"}, + "currency_symbol": {"key": "currencySymbol", "type": "str"}, } - def __init__( - self, - *, - amount: float, - currency_symbol: Optional[str] = None, - **kwargs - ): + def __init__(self, *, amount: float, currency_symbol: Optional[str] = None, **kwargs): """ :keyword amount: Required. Currency amount. :paramtype amount: float @@ -711,22 +677,16 @@ class CustomDocumentModelsDetails(msrest.serialization.Model): """ _validation = { - 'count': {'required': True}, - 'limit': {'required': True}, + "count": {"required": True}, + "limit": {"required": True}, } _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, + "count": {"key": "count", "type": "int"}, + "limit": {"key": "limit", "type": "int"}, } - def __init__( - self, - *, - count: int, - limit: int, - **kwargs - ): + def __init__(self, *, count: int, limit: int, **kwargs): """ :keyword count: Required. Number of custom document models in the current resource. :paramtype count: int @@ -757,17 +717,17 @@ class Document(msrest.serialization.Model): """ _validation = { - 'doc_type': {'required': True, 'max_length': 64, 'min_length': 2}, - 'spans': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "doc_type": {"required": True, "max_length": 64, "min_length": 2}, + "spans": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'doc_type': {'key': 'docType', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'fields': {'key': 'fields', 'type': '{DocumentField}'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "doc_type": {"key": "docType", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "fields": {"key": "fields", "type": "{DocumentField}"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -848,29 +808,29 @@ class DocumentField(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'confidence': {'maximum': 1, 'minimum': 0}, + "type": {"required": True}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value_string': {'key': 'valueString', 'type': 'str'}, - 'value_date': {'key': 'valueDate', 'type': 'date'}, - 'value_time': {'key': 'valueTime', 'type': 'time'}, - 'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'}, - 'value_number': {'key': 'valueNumber', 'type': 'float'}, - 'value_integer': {'key': 'valueInteger', 'type': 'long'}, - 'value_selection_mark': {'key': 'valueSelectionMark', 'type': 'str'}, - 'value_signature': {'key': 'valueSignature', 'type': 'str'}, - 'value_country_region': {'key': 'valueCountryRegion', 'type': 'str'}, - 'value_array': {'key': 'valueArray', 'type': '[DocumentField]'}, - 'value_object': {'key': 'valueObject', 'type': '{DocumentField}'}, - 'value_currency': {'key': 'valueCurrency', 'type': 'CurrencyValue'}, - 'value_address': {'key': 'valueAddress', 'type': 'AddressValue'}, - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "type": {"key": "type", "type": "str"}, + "value_string": {"key": "valueString", "type": "str"}, + "value_date": {"key": "valueDate", "type": "date"}, + "value_time": {"key": "valueTime", "type": "time"}, + "value_phone_number": {"key": "valuePhoneNumber", "type": "str"}, + "value_number": {"key": "valueNumber", "type": "float"}, + "value_integer": {"key": "valueInteger", "type": "long"}, + "value_selection_mark": {"key": "valueSelectionMark", "type": "str"}, + "value_signature": {"key": "valueSignature", "type": "str"}, + "value_country_region": {"key": "valueCountryRegion", "type": "str"}, + "value_array": {"key": "valueArray", "type": "[DocumentField]"}, + "value_object": {"key": "valueObject", "type": "{DocumentField}"}, + "value_currency": {"key": "valueCurrency", "type": "CurrencyValue"}, + "value_address": {"key": "valueAddress", "type": "AddressValue"}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -980,15 +940,15 @@ class DocumentFieldSchema(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'example': {'key': 'example', 'type': 'str'}, - 'items': {'key': 'items', 'type': 'DocumentFieldSchema'}, - 'properties': {'key': 'properties', 'type': '{DocumentFieldSchema}'}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "example": {"key": "example", "type": "str"}, + "items": {"key": "items", "type": "DocumentFieldSchema"}, + "properties": {"key": "properties", "type": "{DocumentFieldSchema}"}, } def __init__( @@ -1039,14 +999,14 @@ class DocumentKeyValueElement(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'spans': {'required': True}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -1086,14 +1046,14 @@ class DocumentKeyValuePair(msrest.serialization.Model): """ _validation = { - 'key': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "key": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'key': {'key': 'key', 'type': 'DocumentKeyValueElement'}, - 'value': {'key': 'value', 'type': 'DocumentKeyValueElement'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "key": {"key": "key", "type": "DocumentKeyValueElement"}, + "value": {"key": "value", "type": "DocumentKeyValueElement"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1134,25 +1094,18 @@ class DocumentLanguage(msrest.serialization.Model): """ _validation = { - 'locale': {'required': True}, - 'spans': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "locale": {"required": True}, + "spans": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'locale': {'key': 'locale', 'type': 'str'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "locale": {"key": "locale", "type": "str"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "confidence": {"key": "confidence", "type": "float"}, } - def __init__( - self, - *, - locale: str, - spans: List["_models.DocumentSpan"], - confidence: float, - **kwargs - ): + def __init__(self, *, locale: str, spans: List["_models.DocumentSpan"], confidence: float, **kwargs): """ :keyword locale: Required. Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") or BCP 47 language tag (ex. "zh-Hans"). @@ -1183,23 +1136,18 @@ class DocumentLine(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'spans': {'required': True}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "content": {"key": "content", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( - self, - *, - content: str, - spans: List["_models.DocumentSpan"], - polygon: Optional[List[float]] = None, - **kwargs + self, *, content: str, spans: List["_models.DocumentSpan"], polygon: Optional[List[float]] = None, **kwargs ): """ :keyword content: Required. Concatenated content of the contained elements in reading order. @@ -1247,30 +1195,34 @@ class OperationDetails(msrest.serialization.Model): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, } _subtype_map = { - 'kind': {'documentModelBuild': 'DocumentModelBuildOperationDetails', 'documentModelCompose': 'DocumentModelComposeOperationDetails', 'documentModelCopyTo': 'DocumentModelCopyToOperationDetails'} + "kind": { + "documentModelBuild": "DocumentModelBuildOperationDetails", + "documentModelCompose": "DocumentModelComposeOperationDetails", + "documentModelCopyTo": "DocumentModelCopyToOperationDetails", + } } def __init__( @@ -1354,27 +1306,27 @@ class DocumentModelBuildOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentModelDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentModelDetails"}, } def __init__( @@ -1417,8 +1369,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails """ - super(DocumentModelBuildOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentModelBuild' # type: str + super(DocumentModelBuildOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentModelBuild" # type: str self.result = result @@ -1453,27 +1416,27 @@ class DocumentModelComposeOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentModelDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentModelDetails"}, } def __init__( @@ -1516,8 +1479,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails """ - super(DocumentModelComposeOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentModelCompose' # type: str + super(DocumentModelComposeOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentModelCompose" # type: str self.result = result @@ -1552,27 +1526,27 @@ class DocumentModelCopyToOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentModelDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentModelDetails"}, } def __init__( @@ -1615,8 +1589,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails """ - super(DocumentModelCopyToOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentModelCopyTo' # type: str + super(DocumentModelCopyToOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentModelCopyTo" # type: str self.result = result @@ -1640,18 +1625,18 @@ class DocumentModelDetails(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'created_date_time': {'required': True}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "description": {"max_length": 4096, "min_length": 0}, + "created_date_time": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'doc_types': {'key': 'docTypes', 'type': '{DocumentTypeDetails}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "doc_types": {"key": "docTypes", "type": "{DocumentTypeDetails}"}, } def __init__( @@ -1708,17 +1693,17 @@ class DocumentModelSummary(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'created_date_time': {'required': True}, + "model_id": {"required": True, "pattern": r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"}, + "description": {"max_length": 4096, "min_length": 0}, + "created_date_time": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -1782,23 +1767,23 @@ class DocumentPage(msrest.serialization.Model): """ _validation = { - 'page_number': {'required': True, 'minimum': 1}, - 'angle': {'maximum': 180, 'minimum_ex': -180}, - 'width': {'minimum': 0}, - 'height': {'minimum': 0}, - 'spans': {'required': True}, + "page_number": {"required": True, "minimum": 1}, + "angle": {"maximum": 180, "minimum_ex": -180}, + "width": {"minimum": 0}, + "height": {"minimum": 0}, + "spans": {"required": True}, } _attribute_map = { - 'page_number': {'key': 'pageNumber', 'type': 'int'}, - 'angle': {'key': 'angle', 'type': 'float'}, - 'width': {'key': 'width', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'words': {'key': 'words', 'type': '[DocumentWord]'}, - 'selection_marks': {'key': 'selectionMarks', 'type': '[DocumentSelectionMark]'}, - 'lines': {'key': 'lines', 'type': '[DocumentLine]'}, + "page_number": {"key": "pageNumber", "type": "int"}, + "angle": {"key": "angle", "type": "float"}, + "width": {"key": "width", "type": "float"}, + "height": {"key": "height", "type": "float"}, + "unit": {"key": "unit", "type": "str"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "words": {"key": "words", "type": "[DocumentWord]"}, + "selection_marks": {"key": "selectionMarks", "type": "[DocumentSelectionMark]"}, + "lines": {"key": "lines", "type": "[DocumentLine]"}, } def __init__( @@ -1868,15 +1853,15 @@ class DocumentParagraph(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'spans': {'required': True}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'role': {'key': 'role', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "role": {"key": "role", "type": "str"}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -1922,16 +1907,16 @@ class DocumentSelectionMark(msrest.serialization.Model): """ _validation = { - 'state': {'required': True}, - 'span': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "state": {"required": True}, + "span": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'span': {'key': 'span', 'type': 'DocumentSpan'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "state": {"key": "state", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "span": {"key": "span", "type": "DocumentSpan"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1974,22 +1959,16 @@ class DocumentSpan(msrest.serialization.Model): """ _validation = { - 'offset': {'required': True, 'minimum': 0}, - 'length': {'required': True, 'minimum': 0}, + "offset": {"required": True, "minimum": 0}, + "length": {"required": True, "minimum": 0}, } _attribute_map = { - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, + "offset": {"key": "offset", "type": "int"}, + "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, offset: int, length: int, **kwargs): """ :keyword offset: Required. Zero-based index of the content represented by the span. :paramtype offset: int @@ -2016,23 +1995,18 @@ class DocumentStyle(msrest.serialization.Model): """ _validation = { - 'spans': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "spans": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'is_handwritten': {'key': 'isHandwritten', 'type': 'bool'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "is_handwritten": {"key": "isHandwritten", "type": "bool"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( - self, - *, - spans: List["_models.DocumentSpan"], - confidence: float, - is_handwritten: Optional[bool] = None, - **kwargs + self, *, spans: List["_models.DocumentSpan"], confidence: float, is_handwritten: Optional[bool] = None, **kwargs ): """ :keyword is_handwritten: Is content handwritten?. @@ -2067,18 +2041,18 @@ class DocumentTable(msrest.serialization.Model): """ _validation = { - 'row_count': {'required': True, 'minimum': 1}, - 'column_count': {'required': True, 'minimum': 1}, - 'cells': {'required': True}, - 'spans': {'required': True}, + "row_count": {"required": True, "minimum": 1}, + "column_count": {"required": True, "minimum": 1}, + "cells": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'row_count': {'key': 'rowCount', 'type': 'int'}, - 'column_count': {'key': 'columnCount', 'type': 'int'}, - 'cells': {'key': 'cells', 'type': '[DocumentTableCell]'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "row_count": {"key": "rowCount", "type": "int"}, + "column_count": {"key": "columnCount", "type": "int"}, + "cells": {"key": "cells", "type": "[DocumentTableCell]"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -2136,23 +2110,23 @@ class DocumentTableCell(msrest.serialization.Model): """ _validation = { - 'row_index': {'required': True}, - 'column_index': {'required': True}, - 'row_span': {'minimum': 1}, - 'column_span': {'minimum': 1}, - 'content': {'required': True}, - 'spans': {'required': True}, + "row_index": {"required": True}, + "column_index": {"required": True}, + "row_span": {"minimum": 1}, + "column_span": {"minimum": 1}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'row_index': {'key': 'rowIndex', 'type': 'int'}, - 'column_index': {'key': 'columnIndex', 'type': 'int'}, - 'row_span': {'key': 'rowSpan', 'type': 'int'}, - 'column_span': {'key': 'columnSpan', 'type': 'int'}, - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "kind": {"key": "kind", "type": "str"}, + "row_index": {"key": "rowIndex", "type": "int"}, + "column_index": {"key": "columnIndex", "type": "int"}, + "row_span": {"key": "rowSpan", "type": "int"}, + "column_span": {"key": "columnSpan", "type": "int"}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -2216,15 +2190,15 @@ class DocumentTypeDetails(msrest.serialization.Model): """ _validation = { - 'description': {'max_length': 4096, 'min_length': 0}, - 'field_schema': {'required': True}, + "description": {"max_length": 4096, "min_length": 0}, + "field_schema": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'build_mode': {'key': 'buildMode', 'type': 'str'}, - 'field_schema': {'key': 'fieldSchema', 'type': '{DocumentFieldSchema}'}, - 'field_confidence': {'key': 'fieldConfidence', 'type': '{float}'}, + "description": {"key": "description", "type": "str"}, + "build_mode": {"key": "buildMode", "type": "str"}, + "field_schema": {"key": "fieldSchema", "type": "{DocumentFieldSchema}"}, + "field_confidence": {"key": "fieldConfidence", "type": "{float}"}, } def __init__( @@ -2271,16 +2245,16 @@ class DocumentWord(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'span': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "content": {"required": True}, + "span": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'span': {'key': 'span', 'type': 'DocumentSpan'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "content": {"key": "content", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "span": {"key": "span", "type": "DocumentSpan"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -2327,16 +2301,16 @@ class Error(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[Error]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[Error]"}, + "innererror": {"key": "innererror", "type": "InnerError"}, } def __init__( @@ -2379,19 +2353,14 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, + "error": {"key": "error", "type": "Error"}, } - def __init__( - self, - *, - error: "_models.Error", - **kwargs - ): + def __init__(self, *, error: "_models.Error", **kwargs): """ :keyword error: Required. Error info. :paramtype error: ~azure.ai.formrecognizer.v2022_08_31.models.Error @@ -2412,21 +2381,15 @@ class GetDocumentModelsResponse(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DocumentModelSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[DocumentModelSummary]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["_models.DocumentModelSummary"], - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: List["_models.DocumentModelSummary"], next_link: Optional[str] = None, **kwargs): """ :keyword value: Required. List of document models. :paramtype value: list[~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelSummary] @@ -2450,21 +2413,15 @@ class GetOperationsResponse(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[OperationSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[OperationSummary]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["_models.OperationSummary"], - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: List["_models.OperationSummary"], next_link: Optional[str] = None, **kwargs): """ :keyword value: Required. List of operations. :paramtype value: list[~azure.ai.formrecognizer.v2022_08_31.models.OperationSummary] @@ -2490,22 +2447,17 @@ class InnerError(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, + "code": {"required": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "innererror": {"key": "innererror", "type": "InnerError"}, } def __init__( - self, - *, - code: str, - message: Optional[str] = None, - innererror: Optional["_models.InnerError"] = None, - **kwargs + self, *, code: str, message: Optional[str] = None, innererror: Optional["_models.InnerError"] = None, **kwargs ): """ :keyword code: Required. Error code. @@ -2549,25 +2501,25 @@ class OperationSummary(msrest.serialization.Model): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -2631,19 +2583,14 @@ class ResourceDetails(msrest.serialization.Model): """ _validation = { - 'custom_document_models': {'required': True}, + "custom_document_models": {"required": True}, } _attribute_map = { - 'custom_document_models': {'key': 'customDocumentModels', 'type': 'CustomDocumentModelsDetails'}, + "custom_document_models": {"key": "customDocumentModels", "type": "CustomDocumentModelsDetails"}, } - def __init__( - self, - *, - custom_document_models: "_models.CustomDocumentModelsDetails", - **kwargs - ): + def __init__(self, *, custom_document_models: "_models.CustomDocumentModelsDetails", **kwargs): """ :keyword custom_document_models: Required. Details regarding custom document models. :paramtype custom_document_models: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/models/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/__init__.py index ec4780462f6e..8dc4b997e1e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'FormRecognizerClientOperationsMixin', + "FormRecognizerClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_form_recognizer_client_operations.py index 055a683778ae..a5b8bd7c5fe5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_form_recognizer_client_operations.py @@ -11,7 +11,13 @@ from msrest import Serializer from ...._polling import DocumentModelAdministrationClientLROPoller -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -23,12 +29,14 @@ from .. import models as _models from .._vendor import MixinABC, _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_analyze_document_request_initial( model_id: str, *, @@ -42,402 +50,291 @@ def build_analyze_document_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}:analyze") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), + "modelId": _SERIALIZER.url("model_id", model_id, "str", pattern=r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, 'str', pattern=r'^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$') + _params["pages"] = _SERIALIZER.query("pages", pages, "str", pattern=r"^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$") if locale is not None: - _params['locale'] = _SERIALIZER.query("locale", locale, 'str') + _params["locale"] = _SERIALIZER.query("locale", locale, "str") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_get_analyze_document_result_request( - model_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_analyze_document_result_request(model_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}/analyzeResults/{resultId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str", pattern=r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_build_document_model_request_initial( - *, - json: Optional[_models.BuildDocumentModelRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.BuildDocumentModelRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels:build") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_compose_document_model_request_initial( - *, - json: Optional[_models.ComposeDocumentModelRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.ComposeDocumentModelRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels:compose") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_authorize_copy_document_model_request( - *, - json: Optional[_models.AuthorizeCopyRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.AuthorizeCopyRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels:authorizeCopy") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_copy_document_model_to_request_initial( - model_id: str, - *, - json: Optional[_models.CopyAuthorization] = None, - content: Any = None, - **kwargs: Any + model_id: str, *, json: Optional[_models.CopyAuthorization] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}:copyTo") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), + "modelId": _SERIALIZER.url("model_id", model_id, "str", pattern=r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_get_operations_request( - **kwargs: Any -) -> HttpRequest: +def build_get_operations_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/operations") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_operation_request( - operation_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_operation_request(operation_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/operations/{operationId}") path_format_arguments = { - "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_document_models_request( - **kwargs: Any -) -> HttpRequest: +def build_get_document_models_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_document_model_request( - model_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_document_model_request(model_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), + "modelId": _SERIALIZER.url("model_id", model_id, "str", pattern=r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_document_model_request( - model_id: str, - **kwargs: Any -) -> HttpRequest: +def build_delete_document_model_request(model_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), + "modelId": _SERIALIZER.url("model_id", model_id, "str", pattern=r"[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_resource_details_request( - **kwargs: Any -) -> HttpRequest: +def build_get_resource_details_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/info") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class FormRecognizerClientOperationsMixin(MixinABC): @@ -452,29 +349,37 @@ def _analyze_document_initial( # pylint: disable=inconsistent-return-statements content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if analyze_request is not None: - _json = self._serialize.body(analyze_request, 'AnalyzeDocumentRequest') - elif content_type.split(";")[0] in ['application/octet-stream', 'application/pdf', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(analyze_request, "AnalyzeDocumentRequest") + elif content_type.split(";")[0] in [ + "application/octet-stream", + "application/pdf", + "image/bmp", + "image/heif", + "image/jpeg", + "image/png", + "image/tiff", + ]: _content = analyze_request else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/octet-stream', 'application/pdf', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/octet-stream', 'application/pdf', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_document_request_initial( @@ -486,20 +391,18 @@ def _analyze_document_initial( # pylint: disable=inconsistent-return-statements pages=pages, locale=locale, string_index_type=string_index_type, - template_url=self._analyze_document_initial.metadata['url'], + template_url=self._analyze_document_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -508,14 +411,12 @@ def _analyze_document_initial( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_document_initial.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore - + _analyze_document_initial.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace def begin_analyze_document( # pylint: disable=inconsistent-return-statements @@ -564,14 +465,11 @@ def begin_analyze_document( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_document_initial( # type: ignore model_id=model_id, @@ -581,48 +479,43 @@ def begin_analyze_document( # pylint: disable=inconsistent-return-statements analyze_request=analyze_request, content_type=content_type, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_document.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore + begin_analyze_document.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace def get_analyze_document_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeResultOperation: """Get analyze result. @@ -637,36 +530,31 @@ def get_analyze_document_result( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeResultOperation] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeResultOperation] - request = build_get_analyze_document_result_request( model_id=model_id, result_id=result_id, api_version=api_version, - template_url=self.get_analyze_document_result.metadata['url'], + template_url=self.get_analyze_document_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -675,53 +563,48 @@ def get_analyze_document_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeResultOperation', pipeline_response) + deserialized = self._deserialize("AnalyzeResultOperation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_document_result.metadata = {'url': "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_document_result.metadata = {"url": "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore def _build_document_model_initial( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(build_request, 'BuildDocumentModelRequest') + _json = self._serialize.body(build_request, "BuildDocumentModelRequest") request = build_build_document_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._build_document_model_initial.metadata['url'], + template_url=self._build_document_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -730,20 +613,16 @@ def _build_document_model_initial( # pylint: disable=inconsistent-return-statem raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _build_document_model_initial.metadata = {'url': "/documentModels:build"} # type: ignore - + _build_document_model_initial.metadata = {"url": "/documentModels:build"} # type: ignore @distributed_trace def begin_build_document_model( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Build document model. @@ -767,93 +646,88 @@ def begin_build_document_model( # pylint: disable=inconsistent-return-statement _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._build_document_model_initial( # type: ignore build_request=build_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_build_document_model.metadata = {'url': "/documentModels:build"} # type: ignore + begin_build_document_model.metadata = {"url": "/documentModels:build"} # type: ignore def _compose_document_model_initial( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(compose_request, 'ComposeDocumentModelRequest') + _json = self._serialize.body(compose_request, "ComposeDocumentModelRequest") request = build_compose_document_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._compose_document_model_initial.metadata['url'], + template_url=self._compose_document_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -862,20 +736,16 @@ def _compose_document_model_initial( # pylint: disable=inconsistent-return-stat raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _compose_document_model_initial.metadata = {'url': "/documentModels:compose"} # type: ignore - + _compose_document_model_initial.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace def begin_compose_document_model( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Compose document model. @@ -899,61 +769,58 @@ def begin_compose_document_model( # pylint: disable=inconsistent-return-stateme _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._compose_document_model_initial( # type: ignore compose_request=compose_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_compose_document_model.metadata = {'url': "/documentModels:compose"} # type: ignore + begin_compose_document_model.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace def authorize_copy_document_model( - self, - authorize_copy_request: _models.AuthorizeCopyRequest, - **kwargs: Any + self, authorize_copy_request: _models.AuthorizeCopyRequest, **kwargs: Any ) -> _models.CopyAuthorization: """Generate copy authorization. @@ -967,38 +834,36 @@ def authorize_copy_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorization] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorization] - _json = self._serialize.body(authorize_copy_request, 'AuthorizeCopyRequest') + _json = self._serialize.body(authorize_copy_request, "AuthorizeCopyRequest") request = build_authorize_copy_document_model_request( api_version=api_version, content_type=content_type, json=_json, - template_url=self.authorize_copy_document_model.metadata['url'], + template_url=self.authorize_copy_document_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1007,55 +872,49 @@ def authorize_copy_document_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyAuthorization', pipeline_response) + deserialized = self._deserialize("CopyAuthorization", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - authorize_copy_document_model.metadata = {'url': "/documentModels:authorizeCopy"} # type: ignore - + authorize_copy_document_model.metadata = {"url": "/documentModels:authorizeCopy"} # type: ignore def _copy_document_model_to_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_to_request, 'CopyAuthorization') + _json = self._serialize.body(copy_to_request, "CopyAuthorization") request = build_copy_document_model_to_request_initial( model_id=model_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._copy_document_model_to_initial.metadata['url'], + template_url=self._copy_document_model_to_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1064,21 +923,16 @@ def _copy_document_model_to_initial( # pylint: disable=inconsistent-return-stat raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_document_model_to_initial.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore - + _copy_document_model_to_initial.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace def begin_copy_document_model_to( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Copy document model. @@ -1104,62 +958,58 @@ def begin_copy_document_model_to( # pylint: disable=inconsistent-return-stateme _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._copy_document_model_to_initial( # type: ignore model_id=model_id, copy_to_request=copy_to_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_copy_document_model_to.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore + begin_copy_document_model_to.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace - def get_operations( - self, - **kwargs: Any - ) -> Iterable[_models.GetOperationsResponse]: + def get_operations(self, **kwargs: Any) -> Iterable[_models.GetOperationsResponse]: """List operations. Lists all operations. @@ -1174,30 +1024,31 @@ def get_operations( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetOperationsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetOperationsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_get_operations_request( api_version=api_version, - template_url=self.get_operations.metadata['url'], + template_url=self.get_operations.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_get_operations_request( api_version=api_version, template_url=next_link, @@ -1206,12 +1057,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1227,9 +1082,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1240,18 +1093,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - get_operations.metadata = {'url': "/operations"} # type: ignore + get_operations.metadata = {"url": "/operations"} # type: ignore @distributed_trace - def get_operation( - self, - operation_id: str, - **kwargs: Any - ) -> _models.OperationDetails: + def get_operation(self, operation_id: str, **kwargs: Any) -> _models.OperationDetails: """Get operation. Gets operation info. @@ -1263,35 +1110,30 @@ def get_operation( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.OperationDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.OperationDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationDetails] - request = build_get_operation_request( operation_id=operation_id, api_version=api_version, - template_url=self.get_operation.metadata['url'], + template_url=self.get_operation.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1300,21 +1142,17 @@ def get_operation( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('OperationDetails', pipeline_response) + deserialized = self._deserialize("OperationDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_operation.metadata = {'url': "/operations/{operationId}"} # type: ignore - + get_operation.metadata = {"url": "/operations/{operationId}"} # type: ignore @distributed_trace - def get_document_models( - self, - **kwargs: Any - ) -> Iterable[_models.GetDocumentModelsResponse]: + def get_document_models(self, **kwargs: Any) -> Iterable[_models.GetDocumentModelsResponse]: """List document models. List all document models. @@ -1329,30 +1167,31 @@ def get_document_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetDocumentModelsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetDocumentModelsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_get_document_models_request( api_version=api_version, - template_url=self.get_document_models.metadata['url'], + template_url=self.get_document_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_get_document_models_request( api_version=api_version, template_url=next_link, @@ -1361,12 +1200,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1382,9 +1225,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1395,18 +1236,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - get_document_models.metadata = {'url': "/documentModels"} # type: ignore + get_document_models.metadata = {"url": "/documentModels"} # type: ignore @distributed_trace - def get_document_model( - self, - model_id: str, - **kwargs: Any - ) -> _models.DocumentModelDetails: + def get_document_model(self, model_id: str, **kwargs: Any) -> _models.DocumentModelDetails: """Get document model. Gets detailed document model information. @@ -1418,35 +1253,30 @@ def get_document_model( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.DocumentModelDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.DocumentModelDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DocumentModelDetails] - request = build_get_document_model_request( model_id=model_id, api_version=api_version, - template_url=self.get_document_model.metadata['url'], + template_url=self.get_document_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1455,21 +1285,18 @@ def get_document_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('DocumentModelDetails', pipeline_response) + deserialized = self._deserialize("DocumentModelDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_document_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + get_document_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore @distributed_trace def delete_document_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete document model. @@ -1482,35 +1309,30 @@ def delete_document_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_document_model_request( model_id=model_id, api_version=api_version, - template_url=self.delete_document_model.metadata['url'], + template_url=self.delete_document_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1522,14 +1344,10 @@ def delete_document_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_document_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + delete_document_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore @distributed_trace - def get_resource_details( - self, - **kwargs: Any - ) -> _models.ResourceDetails: + def get_resource_details(self, **kwargs: Any) -> _models.ResourceDetails: """Get resource info. Return information about the current resource. @@ -1539,34 +1357,29 @@ def get_resource_details( :rtype: ~azure.ai.formrecognizer.v2022_08_31.models.ResourceDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-08-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.ResourceDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-08-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ResourceDetails] - request = build_get_resource_details_request( api_version=api_version, - template_url=self.get_resource_details.metadata['url'], + template_url=self.get_resource_details.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1575,12 +1388,11 @@ def get_resource_details( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('ResourceDetails', pipeline_response) + deserialized = self._deserialize("ResourceDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_resource_details.metadata = {'url': "/info"} # type: ignore - + get_resource_details.metadata = {"url": "/info"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2022_08_31/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_configuration.py index 4d5d79b2de37..f1a6af94f960 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -33,14 +34,9 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :paramtype api_version: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2023-07-31") # type: str + api_version = kwargs.pop("api_version", "2023-07-31") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,23 +46,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_form_recognizer_client.py index 4d999b2440c7..93b33721222e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class FormRecognizerClient: """Extracts content, layout, and structured data from documents. @@ -45,13 +46,8 @@ class FormRecognizerClient: Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -59,22 +55,13 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.document_models = DocumentModelsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.miscellaneous = MiscellaneousOperations( - self._client, self._config, self._serialize, self._deserialize - ) + self.document_models = DocumentModelsOperations(self._client, self._config, self._serialize, self._deserialize) + self.miscellaneous = MiscellaneousOperations(self._client, self._config, self._serialize, self._deserialize) self.document_classifiers = DocumentClassifiersOperations( self._client, self._config, self._serialize, self._deserialize ) - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -94,7 +81,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_vendor.py index 138f663c53a4..9aad73fc743e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -14,6 +15,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -21,7 +23,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_configuration.py index 1d7540805390..bc769bdc0b69 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -33,14 +34,9 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :paramtype api_version: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2023-07-31") # type: str + api_version = kwargs.pop("api_version", "2023-07-31") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,22 +46,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_form_recognizer_client.py index 5e3754bf987a..bbaaef527761 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class FormRecognizerClient: """Extracts content, layout, and structured data from documents. @@ -46,13 +47,8 @@ class FormRecognizerClient: Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -60,22 +56,13 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.document_models = DocumentModelsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.miscellaneous = MiscellaneousOperations( - self._client, self._config, self._serialize, self._deserialize - ) + self.document_models = DocumentModelsOperations(self._client, self._config, self._serialize, self._deserialize) + self.miscellaneous = MiscellaneousOperations(self._client, self._config, self._serialize, self._deserialize) self.document_classifiers = DocumentClassifiersOperations( self._client, self._config, self._serialize, self._deserialize ) - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -95,7 +82,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/__init__.py index 3c5c4a502f86..fcdc92b3a832 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/__init__.py @@ -13,10 +13,11 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'DocumentModelsOperations', - 'MiscellaneousOperations', - 'DocumentClassifiersOperations', + "DocumentModelsOperations", + "MiscellaneousOperations", + "DocumentClassifiersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_classifiers_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_classifiers_operations.py index dcf95f9994a4..83bf4e0cde3e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_classifiers_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_classifiers_operations.py @@ -10,7 +10,13 @@ from .....aio._async_polling import AsyncDocumentModelAdministrationClientLROPoller from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -22,10 +28,19 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._document_classifiers_operations import build_build_classifier_request_initial, build_classify_document_request_initial, build_delete_classifier_request, build_get_classifier_request, build_get_classify_result_request, build_list_classifiers_request -T = TypeVar('T') +from ...operations._document_classifiers_operations import ( + build_build_classifier_request_initial, + build_classify_document_request_initial, + build_delete_classifier_request, + build_get_classifier_request, + build_get_classify_result_request, + build_list_classifiers_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class DocumentClassifiersOperations: """ .. warning:: @@ -45,44 +60,39 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _build_classifier_initial( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentClassifierRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentClassifierRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(build_request, 'BuildDocumentClassifierRequest') + _json = self._serialize.body(build_request, "BuildDocumentClassifierRequest") request = build_build_classifier_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._build_classifier_initial.metadata['url'], + template_url=self._build_classifier_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -91,20 +101,16 @@ async def _build_classifier_initial( # pylint: disable=inconsistent-return-stat raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _build_classifier_initial.metadata = {'url': "/documentClassifiers:build"} # type: ignore - + _build_classifier_initial.metadata = {"url": "/documentClassifiers:build"} # type: ignore @distributed_trace_async async def begin_build_classifier( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentClassifierRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentClassifierRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Builds a custom document classifier. @@ -126,61 +132,58 @@ async def begin_build_classifier( # pylint: disable=inconsistent-return-stateme _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._build_classifier_initial( # type: ignore build_request=build_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_build_classifier.metadata = {'url': "/documentClassifiers:build"} # type: ignore + begin_build_classifier.metadata = {"url": "/documentClassifiers:build"} # type: ignore @distributed_trace - def list_classifiers( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetDocumentClassifiersResponse]: + def list_classifiers(self, **kwargs: Any) -> AsyncIterable[_models.GetDocumentClassifiersResponse]: """List all document classifiers. :keyword callable cls: A custom type or function that will be passed the direct response @@ -193,30 +196,31 @@ def list_classifiers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetDocumentClassifiersResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetDocumentClassifiersResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_classifiers_request( api_version=api_version, - template_url=self.list_classifiers.metadata['url'], + template_url=self.list_classifiers.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_classifiers_request( api_version=api_version, template_url=next_link, @@ -225,12 +229,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -246,9 +254,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -259,18 +265,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_classifiers.metadata = {'url': "/documentClassifiers"} # type: ignore + list_classifiers.metadata = {"url": "/documentClassifiers"} # type: ignore @distributed_trace_async - async def get_classifier( - self, - classifier_id: str, - **kwargs: Any - ) -> _models.DocumentClassifierDetails: + async def get_classifier(self, classifier_id: str, **kwargs: Any) -> _models.DocumentClassifierDetails: """Gets detailed document classifier information. :param classifier_id: Unique document classifier name. @@ -280,35 +280,30 @@ async def get_classifier( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentClassifierDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.DocumentClassifierDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DocumentClassifierDetails] - request = build_get_classifier_request( classifier_id=classifier_id, api_version=api_version, - template_url=self.get_classifier.metadata['url'], + template_url=self.get_classifier.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -317,21 +312,18 @@ async def get_classifier( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('DocumentClassifierDetails', pipeline_response) + deserialized = self._deserialize("DocumentClassifierDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_classifier.metadata = {'url': "/documentClassifiers/{classifierId}"} # type: ignore - + get_classifier.metadata = {"url": "/documentClassifiers/{classifierId}"} # type: ignore @distributed_trace_async async def delete_classifier( # pylint: disable=inconsistent-return-statements - self, - classifier_id: str, - **kwargs: Any + self, classifier_id: str, **kwargs: Any ) -> None: """Deletes document classifier. @@ -342,35 +334,30 @@ async def delete_classifier( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_classifier_request( classifier_id=classifier_id, api_version=api_version, - template_url=self.delete_classifier.metadata['url'], + template_url=self.delete_classifier.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -382,8 +369,7 @@ async def delete_classifier( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_classifier.metadata = {'url': "/documentClassifiers/{classifierId}"} # type: ignore - + delete_classifier.metadata = {"url": "/documentClassifiers/{classifierId}"} # type: ignore async def _classify_document_initial( # pylint: disable=inconsistent-return-statements self, @@ -394,28 +380,40 @@ async def _classify_document_initial( # pylint: disable=inconsistent-return-sta content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: _json = classify_request - elif content_type.split(";")[0] in ['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html']: + elif content_type.split(";")[0] in [ + "application/octet-stream", + "application/pdf", + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "image/bmp", + "image/heif", + "image/jpeg", + "image/png", + "image/tiff", + "text/html", + ]: _content = classify_request else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format(content_type) + "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format( + content_type + ) ) request = build_classify_document_request_initial( @@ -425,20 +423,18 @@ async def _classify_document_initial( # pylint: disable=inconsistent-return-sta json=_json, content=_content, string_index_type=string_index_type, - template_url=self._classify_document_initial.metadata['url'], + template_url=self._classify_document_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -447,14 +443,12 @@ async def _classify_document_initial( # pylint: disable=inconsistent-return-sta raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _classify_document_initial.metadata = {'url': "/documentClassifiers/{classifierId}:analyze"} # type: ignore - + _classify_document_initial.metadata = {"url": "/documentClassifiers/{classifierId}:analyze"} # type: ignore @distributed_trace_async async def begin_classify_document( # pylint: disable=inconsistent-return-statements @@ -499,14 +493,11 @@ async def begin_classify_document( # pylint: disable=inconsistent-return-statem _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._classify_document_initial( # type: ignore classifier_id=classifier_id, @@ -514,48 +505,44 @@ async def begin_classify_document( # pylint: disable=inconsistent-return-statem classify_request=classify_request, content_type=content_type, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_classify_document.metadata = {'url': "/documentClassifiers/{classifierId}:analyze"} # type: ignore + begin_classify_document.metadata = {"url": "/documentClassifiers/{classifierId}:analyze"} # type: ignore @distributed_trace_async async def get_classify_result( - self, - classifier_id: str, - result_id: str, - **kwargs: Any + self, classifier_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeResultOperation: """Gets the result of document classifier. @@ -568,36 +555,31 @@ async def get_classify_result( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeResultOperation] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeResultOperation] - request = build_get_classify_result_request( classifier_id=classifier_id, result_id=result_id, api_version=api_version, - template_url=self.get_classify_result.metadata['url'], + template_url=self.get_classify_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -606,12 +588,11 @@ async def get_classify_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeResultOperation', pipeline_response) + deserialized = self._deserialize("AnalyzeResultOperation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_classify_result.metadata = {'url': "/documentClassifiers/{classifierId}/analyzeResults/{resultId}"} # type: ignore - + get_classify_result.metadata = {"url": "/documentClassifiers/{classifierId}/analyzeResults/{resultId}"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_models_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_models_operations.py index 40d094cc0d02..f82527ff1601 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_models_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_document_models_operations.py @@ -10,7 +10,13 @@ from .....aio._async_polling import AsyncDocumentModelAdministrationClientLROPoller from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -22,10 +28,22 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._document_models_operations import build_analyze_document_request_initial, build_authorize_model_copy_request, build_build_model_request_initial, build_compose_model_request_initial, build_copy_model_to_request_initial, build_delete_model_request, build_get_analyze_result_request, build_get_model_request, build_list_models_request -T = TypeVar('T') +from ...operations._document_models_operations import ( + build_analyze_document_request_initial, + build_authorize_model_copy_request, + build_build_model_request_initial, + build_compose_model_request_initial, + build_copy_model_to_request_initial, + build_delete_model_request, + build_get_analyze_result_request, + build_get_model_request, + build_list_models_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class DocumentModelsOperations: """ .. warning:: @@ -45,7 +63,6 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _analyze_document_initial( # pylint: disable=inconsistent-return-statements self, model_id: str, @@ -58,28 +75,40 @@ async def _analyze_document_initial( # pylint: disable=inconsistent-return-stat content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: _json = analyze_request - elif content_type.split(";")[0] in ['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html']: + elif content_type.split(";")[0] in [ + "application/octet-stream", + "application/pdf", + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "image/bmp", + "image/heif", + "image/jpeg", + "image/png", + "image/tiff", + "text/html", + ]: _content = analyze_request else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format(content_type) + "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format( + content_type + ) ) request = build_analyze_document_request_initial( @@ -92,20 +121,18 @@ async def _analyze_document_initial( # pylint: disable=inconsistent-return-stat locale=locale, string_index_type=string_index_type, features=features, - template_url=self._analyze_document_initial.metadata['url'], + template_url=self._analyze_document_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -114,14 +141,12 @@ async def _analyze_document_initial( # pylint: disable=inconsistent-return-stat raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_document_initial.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore - + _analyze_document_initial.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace_async async def begin_analyze_document( # pylint: disable=inconsistent-return-statements @@ -177,14 +202,11 @@ async def begin_analyze_document( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_document_initial( # type: ignore model_id=model_id, @@ -195,49 +217,43 @@ async def begin_analyze_document( # pylint: disable=inconsistent-return-stateme analyze_request=analyze_request, content_type=content_type, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_document.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore + begin_analyze_document.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace_async - async def get_analyze_result( - self, - model_id: str, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeResultOperation: + async def get_analyze_result(self, model_id: str, result_id: str, **kwargs: Any) -> _models.AnalyzeResultOperation: """Gets the result of document analysis. :param model_id: Unique document model name. @@ -249,36 +265,31 @@ async def get_analyze_result( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeResultOperation] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeResultOperation] - request = build_get_analyze_result_request( model_id=model_id, result_id=result_id, api_version=api_version, - template_url=self.get_analyze_result.metadata['url'], + template_url=self.get_analyze_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -287,53 +298,48 @@ async def get_analyze_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeResultOperation', pipeline_response) + deserialized = self._deserialize("AnalyzeResultOperation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_result.metadata = {'url': "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_result.metadata = {"url": "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore async def _build_model_initial( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(build_request, 'BuildDocumentModelRequest') + _json = self._serialize.body(build_request, "BuildDocumentModelRequest") request = build_build_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._build_model_initial.metadata['url'], + template_url=self._build_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -342,20 +348,16 @@ async def _build_model_initial( # pylint: disable=inconsistent-return-statement raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _build_model_initial.metadata = {'url': "/documentModels:build"} # type: ignore - + _build_model_initial.metadata = {"url": "/documentModels:build"} # type: ignore @distributed_trace_async async def begin_build_model( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Builds a custom document analysis model. @@ -377,93 +379,89 @@ async def begin_build_model( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._build_model_initial( # type: ignore build_request=build_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_build_model.metadata = {'url': "/documentModels:build"} # type: ignore + begin_build_model.metadata = {"url": "/documentModels:build"} # type: ignore async def _compose_model_initial( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(compose_request, 'ComposeDocumentModelRequest') + _json = self._serialize.body(compose_request, "ComposeDocumentModelRequest") request = build_compose_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._compose_model_initial.metadata['url'], + template_url=self._compose_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -472,20 +470,16 @@ async def _compose_model_initial( # pylint: disable=inconsistent-return-stateme raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _compose_model_initial.metadata = {'url': "/documentModels:compose"} # type: ignore - + _compose_model_initial.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace_async async def begin_compose_model( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Creates a new document model from document types of existing document models. @@ -507,61 +501,59 @@ async def begin_compose_model( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._compose_model_initial( # type: ignore compose_request=compose_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_compose_model.metadata = {'url': "/documentModels:compose"} # type: ignore + begin_compose_model.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace_async async def authorize_model_copy( - self, - authorize_copy_request: _models.AuthorizeCopyRequest, - **kwargs: Any + self, authorize_copy_request: _models.AuthorizeCopyRequest, **kwargs: Any ) -> _models.CopyAuthorization: """Generates authorization to copy a document model to this location with specified modelId and optional description. @@ -573,38 +565,36 @@ async def authorize_model_copy( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorization] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorization] - _json = self._serialize.body(authorize_copy_request, 'AuthorizeCopyRequest') + _json = self._serialize.body(authorize_copy_request, "AuthorizeCopyRequest") request = build_authorize_model_copy_request( api_version=api_version, content_type=content_type, json=_json, - template_url=self.authorize_model_copy.metadata['url'], + template_url=self.authorize_model_copy.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -613,55 +603,49 @@ async def authorize_model_copy( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyAuthorization', pipeline_response) + deserialized = self._deserialize("CopyAuthorization", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - authorize_model_copy.metadata = {'url': "/documentModels:authorizeCopy"} # type: ignore - + authorize_model_copy.metadata = {"url": "/documentModels:authorizeCopy"} # type: ignore async def _copy_model_to_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_to_request, 'CopyAuthorization') + _json = self._serialize.body(copy_to_request, "CopyAuthorization") request = build_copy_model_to_request_initial( model_id=model_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._copy_model_to_initial.metadata['url'], + template_url=self._copy_model_to_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -670,21 +654,16 @@ async def _copy_model_to_initial( # pylint: disable=inconsistent-return-stateme raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_model_to_initial.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore - + _copy_model_to_initial.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace_async async def begin_copy_model_to( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> AsyncDocumentModelAdministrationClientLROPoller[None]: """Copies document model to the target resource, region, and modelId. @@ -708,62 +687,59 @@ async def begin_copy_model_to( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._copy_model_to_initial( # type: ignore model_id=model_id, copy_to_request=copy_to_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncDocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncDocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncDocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_copy_model_to.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore + begin_copy_model_to.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace - def list_models( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetDocumentModelsResponse]: + def list_models(self, **kwargs: Any) -> AsyncIterable[_models.GetDocumentModelsResponse]: """List all document models. :keyword callable cls: A custom type or function that will be passed the direct response @@ -776,30 +752,31 @@ def list_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetDocumentModelsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetDocumentModelsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_models_request( api_version=api_version, - template_url=self.list_models.metadata['url'], + template_url=self.list_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_models_request( api_version=api_version, template_url=next_link, @@ -808,12 +785,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -829,9 +810,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -842,18 +821,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_models.metadata = {'url': "/documentModels"} # type: ignore + list_models.metadata = {"url": "/documentModels"} # type: ignore @distributed_trace_async - async def get_model( - self, - model_id: str, - **kwargs: Any - ) -> _models.DocumentModelDetails: + async def get_model(self, model_id: str, **kwargs: Any) -> _models.DocumentModelDetails: """Gets detailed document model information. :param model_id: Unique document model name. @@ -863,35 +836,30 @@ async def get_model( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentModelDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.DocumentModelDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DocumentModelDetails] - request = build_get_model_request( model_id=model_id, api_version=api_version, - template_url=self.get_model.metadata['url'], + template_url=self.get_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -900,21 +868,18 @@ async def get_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('DocumentModelDetails', pipeline_response) + deserialized = self._deserialize("DocumentModelDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + get_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore @distributed_trace_async async def delete_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Deletes document model. @@ -925,35 +890,30 @@ async def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_model_request( model_id=model_id, api_version=api_version, - template_url=self.delete_model.metadata['url'], + template_url=self.delete_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -965,5 +925,4 @@ async def delete_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + delete_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_miscellaneous_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_miscellaneous_operations.py index b22d29737367..9da6b711a43f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_miscellaneous_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_miscellaneous_operations.py @@ -9,7 +9,13 @@ from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -19,10 +25,16 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._miscellaneous_operations import build_get_operation_request, build_get_resource_info_request, build_list_operations_request -T = TypeVar('T') +from ...operations._miscellaneous_operations import ( + build_get_operation_request, + build_get_resource_info_request, + build_list_operations_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class MiscellaneousOperations: """ .. warning:: @@ -42,12 +54,8 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def list_operations( - self, - **kwargs: Any - ) -> AsyncIterable[_models.GetOperationsResponse]: + def list_operations(self, **kwargs: Any) -> AsyncIterable[_models.GetOperationsResponse]: """Lists all operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -60,30 +68,31 @@ def list_operations( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetOperationsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetOperationsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_operations_request( api_version=api_version, - template_url=self.list_operations.metadata['url'], + template_url=self.list_operations.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_operations_request( api_version=api_version, template_url=next_link, @@ -92,12 +101,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -113,9 +126,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -126,18 +137,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_operations.metadata = {'url': "/operations"} # type: ignore + list_operations.metadata = {"url": "/operations"} # type: ignore @distributed_trace_async - async def get_operation( - self, - operation_id: str, - **kwargs: Any - ) -> _models.OperationDetails: + async def get_operation(self, operation_id: str, **kwargs: Any) -> _models.OperationDetails: """Gets operation info. :param operation_id: Unique operation ID. @@ -147,35 +152,30 @@ async def get_operation( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.OperationDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.OperationDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationDetails] - request = build_get_operation_request( operation_id=operation_id, api_version=api_version, - template_url=self.get_operation.metadata['url'], + template_url=self.get_operation.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -184,21 +184,17 @@ async def get_operation( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('OperationDetails', pipeline_response) + deserialized = self._deserialize("OperationDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_operation.metadata = {'url': "/operations/{operationId}"} # type: ignore - + get_operation.metadata = {"url": "/operations/{operationId}"} # type: ignore @distributed_trace_async - async def get_resource_info( - self, - **kwargs: Any - ) -> _models.ResourceDetails: + async def get_resource_info(self, **kwargs: Any) -> _models.ResourceDetails: """Return information about the current resource. :keyword callable cls: A custom type or function that will be passed the direct response @@ -206,34 +202,29 @@ async def get_resource_info( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.ResourceDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.ResourceDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ResourceDetails] - request = build_get_resource_info_request( api_version=api_version, - template_url=self.get_resource_info.metadata['url'], + template_url=self.get_resource_info.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -242,12 +233,11 @@ async def get_resource_info( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('ResourceDetails', pipeline_response) + deserialized = self._deserialize("ResourceDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_resource_info.metadata = {'url': "/info"} # type: ignore - + get_resource_info.metadata = {"url": "/info"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/aio/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/__init__.py index d0ddc7350913..f947f5d81e55 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/__init__.py @@ -82,76 +82,77 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AddressValue', - 'AnalyzeDocumentRequest', - 'AnalyzeResult', - 'AnalyzeResultOperation', - 'AuthorizeCopyRequest', - 'AzureBlobContentSource', - 'AzureBlobFileListContentSource', - 'BoundingRegion', - 'BuildDocumentClassifierRequest', - 'BuildDocumentModelRequest', - 'ClassifierDocumentTypeDetails', - 'ClassifyDocumentRequest', - 'ComponentDocumentModelDetails', - 'ComposeDocumentModelRequest', - 'CopyAuthorization', - 'CurrencyValue', - 'CustomDocumentModelsDetails', - 'Document', - 'DocumentBarcode', - 'DocumentClassifierBuildOperationDetails', - 'DocumentClassifierDetails', - 'DocumentField', - 'DocumentFieldSchema', - 'DocumentFormula', - 'DocumentKeyValueElement', - 'DocumentKeyValuePair', - 'DocumentLanguage', - 'DocumentLine', - 'DocumentModelBuildOperationDetails', - 'DocumentModelComposeOperationDetails', - 'DocumentModelCopyToOperationDetails', - 'DocumentModelDetails', - 'DocumentModelSummary', - 'DocumentPage', - 'DocumentParagraph', - 'DocumentSelectionMark', - 'DocumentSpan', - 'DocumentStyle', - 'DocumentTable', - 'DocumentTableCell', - 'DocumentTypeDetails', - 'DocumentWord', - 'Error', - 'ErrorResponse', - 'GetDocumentClassifiersResponse', - 'GetDocumentModelsResponse', - 'GetOperationsResponse', - 'InnerError', - 'OperationDetails', - 'OperationSummary', - 'QuotaDetails', - 'ResourceDetails', - 'AnalyzeResultOperationStatus', - 'ContentType', - 'DocumentAnalysisFeature', - 'DocumentBarcodeKind', - 'DocumentBuildMode', - 'DocumentFieldType', - 'DocumentFormulaKind', - 'DocumentSignatureType', - 'DocumentTableCellKind', - 'FontStyle', - 'FontWeight', - 'LengthUnit', - 'OperationKind', - 'OperationStatus', - 'ParagraphRole', - 'SelectionMarkState', - 'StringIndexType', + "AddressValue", + "AnalyzeDocumentRequest", + "AnalyzeResult", + "AnalyzeResultOperation", + "AuthorizeCopyRequest", + "AzureBlobContentSource", + "AzureBlobFileListContentSource", + "BoundingRegion", + "BuildDocumentClassifierRequest", + "BuildDocumentModelRequest", + "ClassifierDocumentTypeDetails", + "ClassifyDocumentRequest", + "ComponentDocumentModelDetails", + "ComposeDocumentModelRequest", + "CopyAuthorization", + "CurrencyValue", + "CustomDocumentModelsDetails", + "Document", + "DocumentBarcode", + "DocumentClassifierBuildOperationDetails", + "DocumentClassifierDetails", + "DocumentField", + "DocumentFieldSchema", + "DocumentFormula", + "DocumentKeyValueElement", + "DocumentKeyValuePair", + "DocumentLanguage", + "DocumentLine", + "DocumentModelBuildOperationDetails", + "DocumentModelComposeOperationDetails", + "DocumentModelCopyToOperationDetails", + "DocumentModelDetails", + "DocumentModelSummary", + "DocumentPage", + "DocumentParagraph", + "DocumentSelectionMark", + "DocumentSpan", + "DocumentStyle", + "DocumentTable", + "DocumentTableCell", + "DocumentTypeDetails", + "DocumentWord", + "Error", + "ErrorResponse", + "GetDocumentClassifiersResponse", + "GetDocumentModelsResponse", + "GetOperationsResponse", + "InnerError", + "OperationDetails", + "OperationSummary", + "QuotaDetails", + "ResourceDetails", + "AnalyzeResultOperationStatus", + "ContentType", + "DocumentAnalysisFeature", + "DocumentBarcodeKind", + "DocumentBuildMode", + "DocumentFieldType", + "DocumentFormulaKind", + "DocumentSignatureType", + "DocumentTableCellKind", + "FontStyle", + "FontWeight", + "LengthUnit", + "OperationKind", + "OperationStatus", + "ParagraphRole", + "SelectionMarkState", + "StringIndexType", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_form_recognizer_client_enums.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_form_recognizer_client_enums.py index 29d3ebeb4a6d..1564b8365b81 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_form_recognizer_client_enums.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_form_recognizer_client_enums.py @@ -11,8 +11,7 @@ class AnalyzeResultOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Operation status. - """ + """Operation status.""" #: The operation has not started yet. NOT_STARTED = "notStarted" @@ -23,20 +22,26 @@ class AnalyzeResultOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta) #: The operation has succeeded. SUCCEEDED = "succeeded" + class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Content type for upload - """ + """Content type for upload""" #: Content Type 'application/octet-stream'. APPLICATION_OCTET_STREAM = "application/octet-stream" #: Content Type 'application/pdf'. APPLICATION_PDF = "application/pdf" #: Content Type 'application/vnd.openxmlformats-officedocument.presentationml.presentation'. - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION = "application/vnd.openxmlformats-officedocument.presentationml.presentation" + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION = ( + "application/vnd.openxmlformats-officedocument.presentationml.presentation" + ) #: Content Type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'. - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = ( + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + ) #: Content Type 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'. - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = ( + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + ) #: Content Type 'image/bmp'. IMAGE_BMP = "image/bmp" #: Content Type 'image/heif'. @@ -50,6 +55,7 @@ class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Content Type 'text/html'. TEXT_HTML = "text/html" + class DocumentAnalysisFeature(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Perform OCR at a higher resolution to handle documents with fine print. @@ -65,9 +71,9 @@ class DocumentAnalysisFeature(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Enable the recognition of various font styles. STYLE_FONT = "styleFont" + class DocumentBarcodeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Barcode kind. - """ + """Barcode kind.""" #: QR code, as defined in ISO/IEC 18004:2015. QR_CODE = "QRCode" @@ -104,18 +110,18 @@ class DocumentBarcodeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: MaxiCode, as defined in ISO/IEC 16023:2000. MAXI_CODE = "MaxiCode" + class DocumentBuildMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Custom document model build mode. - """ + """Custom document model build mode.""" #: Target documents with similar visual templates. TEMPLATE = "template" #: Support documents with diverse visual templates. NEURAL = "neural" + class DocumentFieldType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic data type of the field value. - """ + """Semantic data type of the field value.""" #: Plain text. STRING = "string" @@ -146,27 +152,27 @@ class DocumentFieldType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Boolean value, normalized to true or false. BOOLEAN = "boolean" + class DocumentFormulaKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Formula kind. - """ + """Formula kind.""" #: A formula embedded within the content of a paragraph. INLINE = "inline" #: A formula in display mode that takes up an entire line. DISPLAY = "display" + class DocumentSignatureType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Presence of signature. - """ + """Presence of signature.""" #: A signature is detected. SIGNED = "signed" #: No signatures are detected. UNSIGNED = "unsigned" + class DocumentTableCellKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Table cell kind. - """ + """Table cell kind.""" #: Contains the main content/data. CONTENT = "content" @@ -179,24 +185,25 @@ class DocumentTableCellKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Describes the content in (parts of) the table. DESCRIPTION = "description" + class FontStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Font style. - """ + """Font style.""" #: Characters are represented normally. NORMAL = "normal" #: Characters are visually slanted to the right. ITALIC = "italic" + class FontWeight(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Font weight. - """ + """Font weight.""" #: Characters are represented normally. NORMAL = "normal" #: Characters are represented with thicker strokes. BOLD = "bold" + class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch". @@ -207,9 +214,9 @@ class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Length unit for PDF files. INCH = "inch" + class OperationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of operation. - """ + """Type of operation.""" #: Build a new custom document model. DOCUMENT_MODEL_BUILD = "documentModelBuild" @@ -220,9 +227,9 @@ class OperationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Build a new custom classifier model. DOCUMENT_CLASSIFIER_BUILD = "documentClassifierBuild" + class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Operation status. - """ + """Operation status.""" #: The operation has not started yet. NOT_STARTED = "notStarted" @@ -235,9 +242,9 @@ class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The operation has been canceled. CANCELED = "canceled" + class ParagraphRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic role of the paragraph. - """ + """Semantic role of the paragraph.""" #: Text near the top edge of the page. PAGE_HEADER = "pageHeader" @@ -254,9 +261,9 @@ class ParagraphRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: A block of formulas, often with shared alignment. FORMULA_BLOCK = "formulaBlock" + class SelectionMarkState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State of the selection mark. - """ + """State of the selection mark.""" #: The selection mark is selected, often indicated by a check ✓ or cross X inside the selection #: mark. @@ -264,9 +271,9 @@ class SelectionMarkState(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The selection mark is not selected. UNSELECTED = "unselected" + class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Method used to compute string offset and length. - """ + """Method used to compute string offset and length.""" #: User-perceived display character, or grapheme cluster, as defined by Unicode 8.0.0. TEXT_ELEMENTS = "textElements" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_models_py3.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_models_py3.py index 998fee37dfd2..e1abcb16dcd8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_models_py3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_models_py3.py @@ -53,20 +53,20 @@ class AddressValue(msrest.serialization.Model): """ _attribute_map = { - 'house_number': {'key': 'houseNumber', 'type': 'str'}, - 'po_box': {'key': 'poBox', 'type': 'str'}, - 'road': {'key': 'road', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'country_region': {'key': 'countryRegion', 'type': 'str'}, - 'street_address': {'key': 'streetAddress', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'city_district': {'key': 'cityDistrict', 'type': 'str'}, - 'state_district': {'key': 'stateDistrict', 'type': 'str'}, - 'suburb': {'key': 'suburb', 'type': 'str'}, - 'house': {'key': 'house', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, + "house_number": {"key": "houseNumber", "type": "str"}, + "po_box": {"key": "poBox", "type": "str"}, + "road": {"key": "road", "type": "str"}, + "city": {"key": "city", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "postal_code": {"key": "postalCode", "type": "str"}, + "country_region": {"key": "countryRegion", "type": "str"}, + "street_address": {"key": "streetAddress", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "city_district": {"key": "cityDistrict", "type": "str"}, + "state_district": {"key": "stateDistrict", "type": "str"}, + "suburb": {"key": "suburb", "type": "str"}, + "house": {"key": "house", "type": "str"}, + "level": {"key": "level", "type": "str"}, } def __init__( @@ -148,17 +148,11 @@ class AnalyzeDocumentRequest(msrest.serialization.Model): """ _attribute_map = { - 'url_source': {'key': 'urlSource', 'type': 'str'}, - 'base64_source': {'key': 'base64Source', 'type': 'bytearray'}, + "url_source": {"key": "urlSource", "type": "str"}, + "base64_source": {"key": "base64Source", "type": "bytearray"}, } - def __init__( - self, - *, - url_source: Optional[str] = None, - base64_source: Optional[bytearray] = None, - **kwargs - ): + def __init__(self, *, url_source: Optional[str] = None, base64_source: Optional[bytearray] = None, **kwargs): """ :keyword url_source: Document URL to analyze. Either urlSource or base64Source must be specified. @@ -205,25 +199,25 @@ class AnalyzeResult(msrest.serialization.Model): """ _validation = { - 'api_version': {'required': True}, - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'string_index_type': {'required': True}, - 'content': {'required': True}, - 'pages': {'required': True}, + "api_version": {"required": True}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "string_index_type": {"required": True}, + "content": {"required": True}, + "pages": {"required": True}, } _attribute_map = { - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - 'pages': {'key': 'pages', 'type': '[DocumentPage]'}, - 'paragraphs': {'key': 'paragraphs', 'type': '[DocumentParagraph]'}, - 'tables': {'key': 'tables', 'type': '[DocumentTable]'}, - 'key_value_pairs': {'key': 'keyValuePairs', 'type': '[DocumentKeyValuePair]'}, - 'styles': {'key': 'styles', 'type': '[DocumentStyle]'}, - 'languages': {'key': 'languages', 'type': '[DocumentLanguage]'}, - 'documents': {'key': 'documents', 'type': '[Document]'}, + "api_version": {"key": "apiVersion", "type": "str"}, + "model_id": {"key": "modelId", "type": "str"}, + "string_index_type": {"key": "stringIndexType", "type": "str"}, + "content": {"key": "content", "type": "str"}, + "pages": {"key": "pages", "type": "[DocumentPage]"}, + "paragraphs": {"key": "paragraphs", "type": "[DocumentParagraph]"}, + "tables": {"key": "tables", "type": "[DocumentTable]"}, + "key_value_pairs": {"key": "keyValuePairs", "type": "[DocumentKeyValuePair]"}, + "styles": {"key": "styles", "type": "[DocumentStyle]"}, + "languages": {"key": "languages", "type": "[DocumentLanguage]"}, + "documents": {"key": "documents", "type": "[Document]"}, } def __init__( @@ -305,17 +299,17 @@ class AnalyzeResultOperation(msrest.serialization.Model): """ _validation = { - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'analyze_result': {'key': 'analyzeResult', 'type': 'AnalyzeResult'}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "error": {"key": "error", "type": "Error"}, + "analyze_result": {"key": "analyzeResult", "type": "AnalyzeResult"}, } def __init__( @@ -366,23 +360,18 @@ class AuthorizeCopyRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( - self, - *, - model_id: str, - description: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs + self, *, model_id: str, description: Optional[str] = None, tags: Optional[Dict[str, str]] = None, **kwargs ): """ :keyword model_id: Required. Unique document model name. @@ -411,21 +400,15 @@ class AzureBlobContentSource(msrest.serialization.Model): """ _validation = { - 'container_url': {'required': True}, + "container_url": {"required": True}, } _attribute_map = { - 'container_url': {'key': 'containerUrl', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, + "container_url": {"key": "containerUrl", "type": "str"}, + "prefix": {"key": "prefix", "type": "str"}, } - def __init__( - self, - *, - container_url: str, - prefix: Optional[str] = None, - **kwargs - ): + def __init__(self, *, container_url: str, prefix: Optional[str] = None, **kwargs): """ :keyword container_url: Required. Azure Blob Storage container URL. :paramtype container_url: str @@ -450,22 +433,16 @@ class AzureBlobFileListContentSource(msrest.serialization.Model): """ _validation = { - 'container_url': {'required': True}, - 'file_list': {'required': True}, + "container_url": {"required": True}, + "file_list": {"required": True}, } _attribute_map = { - 'container_url': {'key': 'containerUrl', 'type': 'str'}, - 'file_list': {'key': 'fileList', 'type': 'str'}, + "container_url": {"key": "containerUrl", "type": "str"}, + "file_list": {"key": "fileList", "type": "str"}, } - def __init__( - self, - *, - container_url: str, - file_list: str, - **kwargs - ): + def __init__(self, *, container_url: str, file_list: str, **kwargs): """ :keyword container_url: Required. Azure Blob Storage container URL. :paramtype container_url: str @@ -490,22 +467,16 @@ class BoundingRegion(msrest.serialization.Model): """ _validation = { - 'page_number': {'required': True, 'minimum': 1}, - 'polygon': {'required': True}, + "page_number": {"required": True, "minimum": 1}, + "polygon": {"required": True}, } _attribute_map = { - 'page_number': {'key': 'pageNumber', 'type': 'int'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, + "page_number": {"key": "pageNumber", "type": "int"}, + "polygon": {"key": "polygon", "type": "[float]"}, } - def __init__( - self, - *, - page_number: int, - polygon: List[float], - **kwargs - ): + def __init__(self, *, page_number: int, polygon: List[float], **kwargs): """ :keyword page_number: Required. 1-based page number of page containing the bounding region. :paramtype page_number: int @@ -532,15 +503,15 @@ class BuildDocumentClassifierRequest(msrest.serialization.Model): """ _validation = { - 'classifier_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'doc_types': {'required': True}, + "classifier_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, + "doc_types": {"required": True}, } _attribute_map = { - 'classifier_id': {'key': 'classifierId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'doc_types': {'key': 'docTypes', 'type': '{ClassifierDocumentTypeDetails}'}, + "classifier_id": {"key": "classifierId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "doc_types": {"key": "docTypes", "type": "{ClassifierDocumentTypeDetails}"}, } def __init__( @@ -590,18 +561,18 @@ class BuildDocumentModelRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'build_mode': {'required': True}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, + "build_mode": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'build_mode': {'key': 'buildMode', 'type': 'str'}, - 'azure_blob_source': {'key': 'azureBlobSource', 'type': 'AzureBlobContentSource'}, - 'azure_blob_file_list_source': {'key': 'azureBlobFileListSource', 'type': 'AzureBlobFileListContentSource'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "build_mode": {"key": "buildMode", "type": "str"}, + "azure_blob_source": {"key": "azureBlobSource", "type": "AzureBlobContentSource"}, + "azure_blob_file_list_source": {"key": "azureBlobFileListSource", "type": "AzureBlobFileListContentSource"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -658,8 +629,8 @@ class ClassifierDocumentTypeDetails(msrest.serialization.Model): """ _attribute_map = { - 'azure_blob_source': {'key': 'azureBlobSource', 'type': 'AzureBlobContentSource'}, - 'azure_blob_file_list_source': {'key': 'azureBlobFileListSource', 'type': 'AzureBlobFileListContentSource'}, + "azure_blob_source": {"key": "azureBlobSource", "type": "AzureBlobContentSource"}, + "azure_blob_file_list_source": {"key": "azureBlobFileListSource", "type": "AzureBlobFileListContentSource"}, } def __init__( @@ -697,17 +668,11 @@ class ClassifyDocumentRequest(msrest.serialization.Model): """ _attribute_map = { - 'url_source': {'key': 'urlSource', 'type': 'str'}, - 'base64_source': {'key': 'base64Source', 'type': 'bytearray'}, + "url_source": {"key": "urlSource", "type": "str"}, + "base64_source": {"key": "base64Source", "type": "bytearray"}, } - def __init__( - self, - *, - url_source: Optional[str] = None, - base64_source: Optional[bytearray] = None, - **kwargs - ): + def __init__(self, *, url_source: Optional[str] = None, base64_source: Optional[bytearray] = None, **kwargs): """ :keyword url_source: Document URL to classify. Either urlSource or base64Source must be specified. @@ -731,19 +696,14 @@ class ComponentDocumentModelDetails(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, + "model_id": {"key": "modelId", "type": "str"}, } - def __init__( - self, - *, - model_id: str, - **kwargs - ): + def __init__(self, *, model_id: str, **kwargs): """ :keyword model_id: Required. Unique document model name. :paramtype model_id: str @@ -769,16 +729,16 @@ class ComposeDocumentModelRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'component_models': {'required': True}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, + "component_models": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'component_models': {'key': 'componentModels', 'type': '[ComponentDocumentModelDetails]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "component_models": {"key": "componentModels", "type": "[ComponentDocumentModelDetails]"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -831,21 +791,21 @@ class CopyAuthorization(msrest.serialization.Model): """ _validation = { - 'target_resource_id': {'required': True}, - 'target_resource_region': {'required': True}, - 'target_model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'target_model_location': {'required': True}, - 'access_token': {'required': True}, - 'expiration_date_time': {'required': True}, + "target_resource_id": {"required": True}, + "target_resource_region": {"required": True}, + "target_model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "target_model_location": {"required": True}, + "access_token": {"required": True}, + "expiration_date_time": {"required": True}, } _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'target_resource_region': {'key': 'targetResourceRegion', 'type': 'str'}, - 'target_model_id': {'key': 'targetModelId', 'type': 'str'}, - 'target_model_location': {'key': 'targetModelLocation', 'type': 'str'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + "target_resource_id": {"key": "targetResourceId", "type": "str"}, + "target_resource_region": {"key": "targetResourceRegion", "type": "str"}, + "target_model_id": {"key": "targetModelId", "type": "str"}, + "target_model_location": {"key": "targetModelLocation", "type": "str"}, + "access_token": {"key": "accessToken", "type": "str"}, + "expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"}, } def __init__( @@ -899,22 +859,17 @@ class CurrencyValue(msrest.serialization.Model): """ _validation = { - 'amount': {'required': True}, + "amount": {"required": True}, } _attribute_map = { - 'amount': {'key': 'amount', 'type': 'float'}, - 'currency_symbol': {'key': 'currencySymbol', 'type': 'str'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + "amount": {"key": "amount", "type": "float"}, + "currency_symbol": {"key": "currencySymbol", "type": "str"}, + "currency_code": {"key": "currencyCode", "type": "str"}, } def __init__( - self, - *, - amount: float, - currency_symbol: Optional[str] = None, - currency_code: Optional[str] = None, - **kwargs + self, *, amount: float, currency_symbol: Optional[str] = None, currency_code: Optional[str] = None, **kwargs ): """ :keyword amount: Required. Currency amount. @@ -943,22 +898,16 @@ class CustomDocumentModelsDetails(msrest.serialization.Model): """ _validation = { - 'count': {'required': True}, - 'limit': {'required': True}, + "count": {"required": True}, + "limit": {"required": True}, } _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, + "count": {"key": "count", "type": "int"}, + "limit": {"key": "limit", "type": "int"}, } - def __init__( - self, - *, - count: int, - limit: int, - **kwargs - ): + def __init__(self, *, count: int, limit: int, **kwargs): """ :keyword count: Required. Number of custom document models in the current resource. :paramtype count: int @@ -989,17 +938,17 @@ class Document(msrest.serialization.Model): """ _validation = { - 'doc_type': {'required': True, 'max_length': 64, 'min_length': 2}, - 'spans': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "doc_type": {"required": True, "max_length": 64, "min_length": 2}, + "spans": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'doc_type': {'key': 'docType', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'fields': {'key': 'fields', 'type': '{DocumentField}'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "doc_type": {"key": "docType", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "fields": {"key": "fields", "type": "{DocumentField}"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1052,18 +1001,18 @@ class DocumentBarcode(msrest.serialization.Model): """ _validation = { - 'kind': {'required': True}, - 'value': {'required': True}, - 'span': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "kind": {"required": True}, + "value": {"required": True}, + "span": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'span': {'key': 'span', 'type': 'DocumentSpan'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "kind": {"key": "kind", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "span": {"key": "span", "type": "DocumentSpan"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1130,30 +1079,35 @@ class OperationDetails(msrest.serialization.Model): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, } _subtype_map = { - 'kind': {'documentClassifierBuild': 'DocumentClassifierBuildOperationDetails', 'documentModelBuild': 'DocumentModelBuildOperationDetails', 'documentModelCompose': 'DocumentModelComposeOperationDetails', 'documentModelCopyTo': 'DocumentModelCopyToOperationDetails'} + "kind": { + "documentClassifierBuild": "DocumentClassifierBuildOperationDetails", + "documentModelBuild": "DocumentModelBuildOperationDetails", + "documentModelCompose": "DocumentModelComposeOperationDetails", + "documentModelCopyTo": "DocumentModelCopyToOperationDetails", + } } def __init__( @@ -1237,27 +1191,27 @@ class DocumentClassifierBuildOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentClassifierDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentClassifierDetails"}, } def __init__( @@ -1300,8 +1254,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentClassifierDetails """ - super(DocumentClassifierBuildOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentClassifierBuild' # type: str + super(DocumentClassifierBuildOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentClassifierBuild" # type: str self.result = result @@ -1327,20 +1292,20 @@ class DocumentClassifierDetails(msrest.serialization.Model): """ _validation = { - 'classifier_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'created_date_time': {'required': True}, - 'api_version': {'required': True}, - 'doc_types': {'required': True}, + "classifier_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, + "created_date_time": {"required": True}, + "api_version": {"required": True}, + "doc_types": {"required": True}, } _attribute_map = { - 'classifier_id': {'key': 'classifierId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'doc_types': {'key': 'docTypes', 'type': '{ClassifierDocumentTypeDetails}'}, + "classifier_id": {"key": "classifierId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "doc_types": {"key": "docTypes", "type": "{ClassifierDocumentTypeDetails}"}, } def __init__( @@ -1429,30 +1394,30 @@ class DocumentField(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'confidence': {'maximum': 1, 'minimum': 0}, + "type": {"required": True}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value_string': {'key': 'valueString', 'type': 'str'}, - 'value_date': {'key': 'valueDate', 'type': 'date'}, - 'value_time': {'key': 'valueTime', 'type': 'time'}, - 'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'}, - 'value_number': {'key': 'valueNumber', 'type': 'float'}, - 'value_integer': {'key': 'valueInteger', 'type': 'long'}, - 'value_selection_mark': {'key': 'valueSelectionMark', 'type': 'str'}, - 'value_signature': {'key': 'valueSignature', 'type': 'str'}, - 'value_country_region': {'key': 'valueCountryRegion', 'type': 'str'}, - 'value_array': {'key': 'valueArray', 'type': '[DocumentField]'}, - 'value_object': {'key': 'valueObject', 'type': '{DocumentField}'}, - 'value_currency': {'key': 'valueCurrency', 'type': 'CurrencyValue'}, - 'value_address': {'key': 'valueAddress', 'type': 'AddressValue'}, - 'value_boolean': {'key': 'valueBoolean', 'type': 'bool'}, - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "type": {"key": "type", "type": "str"}, + "value_string": {"key": "valueString", "type": "str"}, + "value_date": {"key": "valueDate", "type": "date"}, + "value_time": {"key": "valueTime", "type": "time"}, + "value_phone_number": {"key": "valuePhoneNumber", "type": "str"}, + "value_number": {"key": "valueNumber", "type": "float"}, + "value_integer": {"key": "valueInteger", "type": "long"}, + "value_selection_mark": {"key": "valueSelectionMark", "type": "str"}, + "value_signature": {"key": "valueSignature", "type": "str"}, + "value_country_region": {"key": "valueCountryRegion", "type": "str"}, + "value_array": {"key": "valueArray", "type": "[DocumentField]"}, + "value_object": {"key": "valueObject", "type": "{DocumentField}"}, + "value_currency": {"key": "valueCurrency", "type": "CurrencyValue"}, + "value_address": {"key": "valueAddress", "type": "AddressValue"}, + "value_boolean": {"key": "valueBoolean", "type": "bool"}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1566,15 +1531,15 @@ class DocumentFieldSchema(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'example': {'key': 'example', 'type': 'str'}, - 'items': {'key': 'items', 'type': 'DocumentFieldSchema'}, - 'properties': {'key': 'properties', 'type': '{DocumentFieldSchema}'}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "example": {"key": "example", "type": "str"}, + "items": {"key": "items", "type": "DocumentFieldSchema"}, + "properties": {"key": "properties", "type": "{DocumentFieldSchema}"}, } def __init__( @@ -1628,18 +1593,18 @@ class DocumentFormula(msrest.serialization.Model): """ _validation = { - 'kind': {'required': True}, - 'value': {'required': True}, - 'span': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "kind": {"required": True}, + "value": {"required": True}, + "span": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'span': {'key': 'span', 'type': 'DocumentSpan'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "kind": {"key": "kind", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "span": {"key": "span", "type": "DocumentSpan"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1687,14 +1652,14 @@ class DocumentKeyValueElement(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'spans': {'required': True}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -1734,14 +1699,14 @@ class DocumentKeyValuePair(msrest.serialization.Model): """ _validation = { - 'key': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "key": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'key': {'key': 'key', 'type': 'DocumentKeyValueElement'}, - 'value': {'key': 'value', 'type': 'DocumentKeyValueElement'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "key": {"key": "key", "type": "DocumentKeyValueElement"}, + "value": {"key": "value", "type": "DocumentKeyValueElement"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1782,25 +1747,18 @@ class DocumentLanguage(msrest.serialization.Model): """ _validation = { - 'locale': {'required': True}, - 'spans': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "locale": {"required": True}, + "spans": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'locale': {'key': 'locale', 'type': 'str'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "locale": {"key": "locale", "type": "str"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "confidence": {"key": "confidence", "type": "float"}, } - def __init__( - self, - *, - locale: str, - spans: List["_models.DocumentSpan"], - confidence: float, - **kwargs - ): + def __init__(self, *, locale: str, spans: List["_models.DocumentSpan"], confidence: float, **kwargs): """ :keyword locale: Required. Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") or BCP 47 language tag (ex. "zh-Hans"). @@ -1831,23 +1789,18 @@ class DocumentLine(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'spans': {'required': True}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "content": {"key": "content", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( - self, - *, - content: str, - spans: List["_models.DocumentSpan"], - polygon: Optional[List[float]] = None, - **kwargs + self, *, content: str, spans: List["_models.DocumentSpan"], polygon: Optional[List[float]] = None, **kwargs ): """ :keyword content: Required. Concatenated content of the contained elements in reading order. @@ -1894,27 +1847,27 @@ class DocumentModelBuildOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentModelDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentModelDetails"}, } def __init__( @@ -1957,8 +1910,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentModelDetails """ - super(DocumentModelBuildOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentModelBuild' # type: str + super(DocumentModelBuildOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentModelBuild" # type: str self.result = result @@ -1993,27 +1957,27 @@ class DocumentModelComposeOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentModelDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentModelDetails"}, } def __init__( @@ -2056,8 +2020,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentModelDetails """ - super(DocumentModelComposeOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentModelCompose' # type: str + super(DocumentModelComposeOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentModelCompose" # type: str self.result = result @@ -2092,27 +2067,27 @@ class DocumentModelCopyToOperationDetails(OperationDetails): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'error': {'key': 'error', 'type': 'Error'}, - 'result': {'key': 'result', 'type': 'DocumentModelDetails'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "error", "type": "Error"}, + "result": {"key": "result", "type": "DocumentModelDetails"}, } def __init__( @@ -2155,8 +2130,19 @@ def __init__( :keyword result: Operation result upon success. :paramtype result: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentModelDetails """ - super(DocumentModelCopyToOperationDetails, self).__init__(operation_id=operation_id, status=status, percent_completed=percent_completed, created_date_time=created_date_time, last_updated_date_time=last_updated_date_time, resource_location=resource_location, api_version=api_version, tags=tags, error=error, **kwargs) - self.kind = 'documentModelCopyTo' # type: str + super(DocumentModelCopyToOperationDetails, self).__init__( + operation_id=operation_id, + status=status, + percent_completed=percent_completed, + created_date_time=created_date_time, + last_updated_date_time=last_updated_date_time, + resource_location=resource_location, + api_version=api_version, + tags=tags, + error=error, + **kwargs + ) + self.kind = "documentModelCopyTo" # type: str self.result = result @@ -2182,19 +2168,19 @@ class DocumentModelDetails(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'created_date_time': {'required': True}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, + "created_date_time": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'doc_types': {'key': 'docTypes', 'type': '{DocumentTypeDetails}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "doc_types": {"key": "docTypes", "type": "{DocumentTypeDetails}"}, } def __init__( @@ -2257,18 +2243,18 @@ class DocumentModelSummary(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'pattern': r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'}, - 'description': {'max_length': 4096, 'min_length': 0}, - 'created_date_time': {'required': True}, + "model_id": {"required": True, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$"}, + "description": {"max_length": 4096, "min_length": 0}, + "created_date_time": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "model_id": {"key": "modelId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "expiration_date_time": {"key": "expirationDateTime", "type": "iso-8601"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -2340,25 +2326,25 @@ class DocumentPage(msrest.serialization.Model): """ _validation = { - 'page_number': {'required': True, 'minimum': 1}, - 'angle': {'maximum': 180, 'minimum_ex': -180}, - 'width': {'minimum': 0}, - 'height': {'minimum': 0}, - 'spans': {'required': True}, + "page_number": {"required": True, "minimum": 1}, + "angle": {"maximum": 180, "minimum_ex": -180}, + "width": {"minimum": 0}, + "height": {"minimum": 0}, + "spans": {"required": True}, } _attribute_map = { - 'page_number': {'key': 'pageNumber', 'type': 'int'}, - 'angle': {'key': 'angle', 'type': 'float'}, - 'width': {'key': 'width', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'words': {'key': 'words', 'type': '[DocumentWord]'}, - 'selection_marks': {'key': 'selectionMarks', 'type': '[DocumentSelectionMark]'}, - 'lines': {'key': 'lines', 'type': '[DocumentLine]'}, - 'barcodes': {'key': 'barcodes', 'type': '[DocumentBarcode]'}, - 'formulas': {'key': 'formulas', 'type': '[DocumentFormula]'}, + "page_number": {"key": "pageNumber", "type": "int"}, + "angle": {"key": "angle", "type": "float"}, + "width": {"key": "width", "type": "float"}, + "height": {"key": "height", "type": "float"}, + "unit": {"key": "unit", "type": "str"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "words": {"key": "words", "type": "[DocumentWord]"}, + "selection_marks": {"key": "selectionMarks", "type": "[DocumentSelectionMark]"}, + "lines": {"key": "lines", "type": "[DocumentLine]"}, + "barcodes": {"key": "barcodes", "type": "[DocumentBarcode]"}, + "formulas": {"key": "formulas", "type": "[DocumentFormula]"}, } def __init__( @@ -2436,15 +2422,15 @@ class DocumentParagraph(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'spans': {'required': True}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'role': {'key': 'role', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "role": {"key": "role", "type": "str"}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -2490,16 +2476,16 @@ class DocumentSelectionMark(msrest.serialization.Model): """ _validation = { - 'state': {'required': True}, - 'span': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "state": {"required": True}, + "span": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'span': {'key': 'span', 'type': 'DocumentSpan'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "state": {"key": "state", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "span": {"key": "span", "type": "DocumentSpan"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -2542,22 +2528,16 @@ class DocumentSpan(msrest.serialization.Model): """ _validation = { - 'offset': {'required': True, 'minimum': 0}, - 'length': {'required': True, 'minimum': 0}, + "offset": {"required": True, "minimum": 0}, + "length": {"required": True, "minimum": 0}, } _attribute_map = { - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, + "offset": {"key": "offset", "type": "int"}, + "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, offset: int, length: int, **kwargs): """ :keyword offset: Required. Zero-based index of the content represented by the span. :paramtype offset: int @@ -2595,21 +2575,21 @@ class DocumentStyle(msrest.serialization.Model): """ _validation = { - 'color': {'pattern': r'^#[0-9a-f]{6}$'}, - 'background_color': {'pattern': r'^#[0-9a-f]{6}$'}, - 'spans': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "color": {"pattern": r"^#[0-9a-f]{6}$"}, + "background_color": {"pattern": r"^#[0-9a-f]{6}$"}, + "spans": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'is_handwritten': {'key': 'isHandwritten', 'type': 'bool'}, - 'similar_font_family': {'key': 'similarFontFamily', 'type': 'str'}, - 'font_style': {'key': 'fontStyle', 'type': 'str'}, - 'font_weight': {'key': 'fontWeight', 'type': 'str'}, - 'color': {'key': 'color', 'type': 'str'}, - 'background_color': {'key': 'backgroundColor', 'type': 'str'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "is_handwritten": {"key": "isHandwritten", "type": "bool"}, + "similar_font_family": {"key": "similarFontFamily", "type": "str"}, + "font_style": {"key": "fontStyle", "type": "str"}, + "font_weight": {"key": "fontWeight", "type": "str"}, + "color": {"key": "color", "type": "str"}, + "background_color": {"key": "backgroundColor", "type": "str"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -2674,18 +2654,18 @@ class DocumentTable(msrest.serialization.Model): """ _validation = { - 'row_count': {'required': True, 'minimum': 1}, - 'column_count': {'required': True, 'minimum': 1}, - 'cells': {'required': True}, - 'spans': {'required': True}, + "row_count": {"required": True, "minimum": 1}, + "column_count": {"required": True, "minimum": 1}, + "cells": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'row_count': {'key': 'rowCount', 'type': 'int'}, - 'column_count': {'key': 'columnCount', 'type': 'int'}, - 'cells': {'key': 'cells', 'type': '[DocumentTableCell]'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "row_count": {"key": "rowCount", "type": "int"}, + "column_count": {"key": "columnCount", "type": "int"}, + "cells": {"key": "cells", "type": "[DocumentTableCell]"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -2743,23 +2723,23 @@ class DocumentTableCell(msrest.serialization.Model): """ _validation = { - 'row_index': {'required': True}, - 'column_index': {'required': True}, - 'row_span': {'minimum': 1}, - 'column_span': {'minimum': 1}, - 'content': {'required': True}, - 'spans': {'required': True}, + "row_index": {"required": True}, + "column_index": {"required": True}, + "row_span": {"minimum": 1}, + "column_span": {"minimum": 1}, + "content": {"required": True}, + "spans": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'row_index': {'key': 'rowIndex', 'type': 'int'}, - 'column_index': {'key': 'columnIndex', 'type': 'int'}, - 'row_span': {'key': 'rowSpan', 'type': 'int'}, - 'column_span': {'key': 'columnSpan', 'type': 'int'}, - 'content': {'key': 'content', 'type': 'str'}, - 'bounding_regions': {'key': 'boundingRegions', 'type': '[BoundingRegion]'}, - 'spans': {'key': 'spans', 'type': '[DocumentSpan]'}, + "kind": {"key": "kind", "type": "str"}, + "row_index": {"key": "rowIndex", "type": "int"}, + "column_index": {"key": "columnIndex", "type": "int"}, + "row_span": {"key": "rowSpan", "type": "int"}, + "column_span": {"key": "columnSpan", "type": "int"}, + "content": {"key": "content", "type": "str"}, + "bounding_regions": {"key": "boundingRegions", "type": "[BoundingRegion]"}, + "spans": {"key": "spans", "type": "[DocumentSpan]"}, } def __init__( @@ -2823,15 +2803,15 @@ class DocumentTypeDetails(msrest.serialization.Model): """ _validation = { - 'description': {'max_length': 4096, 'min_length': 0}, - 'field_schema': {'required': True}, + "description": {"max_length": 4096, "min_length": 0}, + "field_schema": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'build_mode': {'key': 'buildMode', 'type': 'str'}, - 'field_schema': {'key': 'fieldSchema', 'type': '{DocumentFieldSchema}'}, - 'field_confidence': {'key': 'fieldConfidence', 'type': '{float}'}, + "description": {"key": "description", "type": "str"}, + "build_mode": {"key": "buildMode", "type": "str"}, + "field_schema": {"key": "fieldSchema", "type": "{DocumentFieldSchema}"}, + "field_confidence": {"key": "fieldConfidence", "type": "{float}"}, } def __init__( @@ -2878,16 +2858,16 @@ class DocumentWord(msrest.serialization.Model): """ _validation = { - 'content': {'required': True}, - 'span': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "content": {"required": True}, + "span": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': '[float]'}, - 'span': {'key': 'span', 'type': 'DocumentSpan'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "content": {"key": "content", "type": "str"}, + "polygon": {"key": "polygon", "type": "[float]"}, + "span": {"key": "span", "type": "DocumentSpan"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -2934,16 +2914,16 @@ class Error(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[Error]'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[Error]"}, + "innererror": {"key": "innererror", "type": "InnerError"}, } def __init__( @@ -2986,19 +2966,14 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'Error'}, + "error": {"key": "error", "type": "Error"}, } - def __init__( - self, - *, - error: "_models.Error", - **kwargs - ): + def __init__(self, *, error: "_models.Error", **kwargs): """ :keyword error: Required. Error info. :paramtype error: ~azure.ai.formrecognizer.v2023_07_31.models.Error @@ -3019,21 +2994,15 @@ class GetDocumentClassifiersResponse(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DocumentClassifierDetails]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[DocumentClassifierDetails]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["_models.DocumentClassifierDetails"], - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: List["_models.DocumentClassifierDetails"], next_link: Optional[str] = None, **kwargs): """ :keyword value: Required. List of document classifiers. :paramtype value: list[~azure.ai.formrecognizer.v2023_07_31.models.DocumentClassifierDetails] @@ -3057,21 +3026,15 @@ class GetDocumentModelsResponse(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[DocumentModelSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[DocumentModelSummary]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["_models.DocumentModelSummary"], - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: List["_models.DocumentModelSummary"], next_link: Optional[str] = None, **kwargs): """ :keyword value: Required. List of document models. :paramtype value: list[~azure.ai.formrecognizer.v2023_07_31.models.DocumentModelSummary] @@ -3095,21 +3058,15 @@ class GetOperationsResponse(msrest.serialization.Model): """ _validation = { - 'value': {'required': True}, + "value": {"required": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[OperationSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[OperationSummary]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: List["_models.OperationSummary"], - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: List["_models.OperationSummary"], next_link: Optional[str] = None, **kwargs): """ :keyword value: Required. List of operations. :paramtype value: list[~azure.ai.formrecognizer.v2023_07_31.models.OperationSummary] @@ -3135,22 +3092,17 @@ class InnerError(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, + "code": {"required": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "innererror": {"key": "innererror", "type": "InnerError"}, } def __init__( - self, - *, - code: str, - message: Optional[str] = None, - innererror: Optional["_models.InnerError"] = None, - **kwargs + self, *, code: str, message: Optional[str] = None, innererror: Optional["_models.InnerError"] = None, **kwargs ): """ :keyword code: Required. Error code. @@ -3194,25 +3146,25 @@ class OperationSummary(msrest.serialization.Model): """ _validation = { - 'operation_id': {'required': True}, - 'status': {'required': True}, - 'percent_completed': {'maximum': 100, 'minimum': 0}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, - 'kind': {'required': True}, - 'resource_location': {'required': True}, + "operation_id": {"required": True}, + "status": {"required": True}, + "percent_completed": {"maximum": 100, "minimum": 0}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, + "kind": {"required": True}, + "resource_location": {"required": True}, } _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'percent_completed': {'key': 'percentCompleted', 'type': 'int'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "operation_id": {"key": "operationId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "percent_completed": {"key": "percentCompleted", "type": "int"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "kind": {"key": "kind", "type": "str"}, + "resource_location": {"key": "resourceLocation", "type": "str"}, + "api_version": {"key": "apiVersion", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, } def __init__( @@ -3279,25 +3231,18 @@ class QuotaDetails(msrest.serialization.Model): """ _validation = { - 'used': {'required': True}, - 'quota': {'required': True}, - 'quota_reset_date_time': {'required': True}, + "used": {"required": True}, + "quota": {"required": True}, + "quota_reset_date_time": {"required": True}, } _attribute_map = { - 'used': {'key': 'used', 'type': 'int'}, - 'quota': {'key': 'quota', 'type': 'int'}, - 'quota_reset_date_time': {'key': 'quotaResetDateTime', 'type': 'iso-8601'}, + "used": {"key": "used", "type": "int"}, + "quota": {"key": "quota", "type": "int"}, + "quota_reset_date_time": {"key": "quotaResetDateTime", "type": "iso-8601"}, } - def __init__( - self, - *, - used: int, - quota: int, - quota_reset_date_time: datetime.datetime, - **kwargs - ): + def __init__(self, *, used: int, quota: int, quota_reset_date_time: datetime.datetime, **kwargs): """ :keyword used: Required. Amount of the resource quota used. :paramtype used: int @@ -3328,13 +3273,13 @@ class ResourceDetails(msrest.serialization.Model): """ _validation = { - 'custom_document_models': {'required': True}, - 'custom_neural_document_model_builds': {'required': True}, + "custom_document_models": {"required": True}, + "custom_neural_document_model_builds": {"required": True}, } _attribute_map = { - 'custom_document_models': {'key': 'customDocumentModels', 'type': 'CustomDocumentModelsDetails'}, - 'custom_neural_document_model_builds': {'key': 'customNeuralDocumentModelBuilds', 'type': 'QuotaDetails'}, + "custom_document_models": {"key": "customDocumentModels", "type": "CustomDocumentModelsDetails"}, + "custom_neural_document_model_builds": {"key": "customNeuralDocumentModelBuilds", "type": "QuotaDetails"}, } def __init__( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/models/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/__init__.py index 3c5c4a502f86..fcdc92b3a832 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/__init__.py @@ -13,10 +13,11 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'DocumentModelsOperations', - 'MiscellaneousOperations', - 'DocumentClassifiersOperations', + "DocumentModelsOperations", + "MiscellaneousOperations", + "DocumentClassifiersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_classifiers_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_classifiers_operations.py index 42a00fa94853..9913ac50083e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_classifiers_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_classifiers_operations.py @@ -11,7 +11,13 @@ from msrest import Serializer from ...._polling import DocumentModelAdministrationClientLROPoller -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -23,138 +29,117 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_build_classifier_request_initial( - *, - json: Optional[_models.BuildDocumentClassifierRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.BuildDocumentClassifierRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentClassifiers:build") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_list_classifiers_request( - **kwargs: Any -) -> HttpRequest: +def build_list_classifiers_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentClassifiers") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_classifier_request( - classifier_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_classifier_request(classifier_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentClassifiers/{classifierId}") path_format_arguments = { - "classifierId": _SERIALIZER.url("classifier_id", classifier_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "classifierId": _SERIALIZER.url( + "classifier_id", + classifier_id, + "str", + max_length=64, + min_length=0, + pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_classifier_request( - classifier_id: str, - **kwargs: Any -) -> HttpRequest: +def build_delete_classifier_request(classifier_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentClassifiers/{classifierId}") path_format_arguments = { - "classifierId": _SERIALIZER.url("classifier_id", classifier_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "classifierId": _SERIALIZER.url( + "classifier_id", + classifier_id, + "str", + max_length=64, + min_length=0, + pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_classify_document_request_initial( @@ -168,72 +153,71 @@ def build_classify_document_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentClassifiers/{classifierId}:analyze") path_format_arguments = { - "classifierId": _SERIALIZER.url("classifier_id", classifier_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "classifierId": _SERIALIZER.url( + "classifier_id", + classifier_id, + "str", + max_length=64, + min_length=0, + pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$", + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_get_classify_result_request( - classifier_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_classify_result_request(classifier_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentClassifiers/{classifierId}/analyzeResults/{resultId}") path_format_arguments = { - "classifierId": _SERIALIZER.url("classifier_id", classifier_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "classifierId": _SERIALIZER.url( + "classifier_id", + classifier_id, + "str", + max_length=64, + min_length=0, + pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$", + ), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class DocumentClassifiersOperations: """ @@ -254,44 +238,39 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _build_classifier_initial( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentClassifierRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentClassifierRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(build_request, 'BuildDocumentClassifierRequest') + _json = self._serialize.body(build_request, "BuildDocumentClassifierRequest") request = build_build_classifier_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._build_classifier_initial.metadata['url'], + template_url=self._build_classifier_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -300,20 +279,16 @@ def _build_classifier_initial( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _build_classifier_initial.metadata = {'url': "/documentClassifiers:build"} # type: ignore - + _build_classifier_initial.metadata = {"url": "/documentClassifiers:build"} # type: ignore @distributed_trace def begin_build_classifier( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentClassifierRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentClassifierRequest, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Builds a custom document classifier. @@ -335,61 +310,57 @@ def begin_build_classifier( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._build_classifier_initial( # type: ignore build_request=build_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_build_classifier.metadata = {'url': "/documentClassifiers:build"} # type: ignore + begin_build_classifier.metadata = {"url": "/documentClassifiers:build"} # type: ignore @distributed_trace - def list_classifiers( - self, - **kwargs: Any - ) -> Iterable[_models.GetDocumentClassifiersResponse]: + def list_classifiers(self, **kwargs: Any) -> Iterable[_models.GetDocumentClassifiersResponse]: """List all document classifiers. :keyword callable cls: A custom type or function that will be passed the direct response @@ -402,30 +373,31 @@ def list_classifiers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetDocumentClassifiersResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetDocumentClassifiersResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_classifiers_request( api_version=api_version, - template_url=self.list_classifiers.metadata['url'], + template_url=self.list_classifiers.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_classifiers_request( api_version=api_version, template_url=next_link, @@ -434,12 +406,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -455,9 +431,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -468,18 +442,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_classifiers.metadata = {'url': "/documentClassifiers"} # type: ignore + list_classifiers.metadata = {"url": "/documentClassifiers"} # type: ignore @distributed_trace - def get_classifier( - self, - classifier_id: str, - **kwargs: Any - ) -> _models.DocumentClassifierDetails: + def get_classifier(self, classifier_id: str, **kwargs: Any) -> _models.DocumentClassifierDetails: """Gets detailed document classifier information. :param classifier_id: Unique document classifier name. @@ -489,35 +457,30 @@ def get_classifier( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentClassifierDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.DocumentClassifierDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DocumentClassifierDetails] - request = build_get_classifier_request( classifier_id=classifier_id, api_version=api_version, - template_url=self.get_classifier.metadata['url'], + template_url=self.get_classifier.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -526,21 +489,18 @@ def get_classifier( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('DocumentClassifierDetails', pipeline_response) + deserialized = self._deserialize("DocumentClassifierDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_classifier.metadata = {'url': "/documentClassifiers/{classifierId}"} # type: ignore - + get_classifier.metadata = {"url": "/documentClassifiers/{classifierId}"} # type: ignore @distributed_trace def delete_classifier( # pylint: disable=inconsistent-return-statements - self, - classifier_id: str, - **kwargs: Any + self, classifier_id: str, **kwargs: Any ) -> None: """Deletes document classifier. @@ -551,35 +511,30 @@ def delete_classifier( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_classifier_request( classifier_id=classifier_id, api_version=api_version, - template_url=self.delete_classifier.metadata['url'], + template_url=self.delete_classifier.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -591,8 +546,7 @@ def delete_classifier( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_classifier.metadata = {'url': "/documentClassifiers/{classifierId}"} # type: ignore - + delete_classifier.metadata = {"url": "/documentClassifiers/{classifierId}"} # type: ignore def _classify_document_initial( # pylint: disable=inconsistent-return-statements self, @@ -603,28 +557,40 @@ def _classify_document_initial( # pylint: disable=inconsistent-return-statement content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: _json = classify_request - elif content_type.split(";")[0] in ['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html']: + elif content_type.split(";")[0] in [ + "application/octet-stream", + "application/pdf", + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "image/bmp", + "image/heif", + "image/jpeg", + "image/png", + "image/tiff", + "text/html", + ]: _content = classify_request else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format(content_type) + "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format( + content_type + ) ) request = build_classify_document_request_initial( @@ -634,20 +600,18 @@ def _classify_document_initial( # pylint: disable=inconsistent-return-statement json=_json, content=_content, string_index_type=string_index_type, - template_url=self._classify_document_initial.metadata['url'], + template_url=self._classify_document_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -656,14 +620,12 @@ def _classify_document_initial( # pylint: disable=inconsistent-return-statement raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _classify_document_initial.metadata = {'url': "/documentClassifiers/{classifierId}:analyze"} # type: ignore - + _classify_document_initial.metadata = {"url": "/documentClassifiers/{classifierId}:analyze"} # type: ignore @distributed_trace def begin_classify_document( # pylint: disable=inconsistent-return-statements @@ -708,14 +670,11 @@ def begin_classify_document( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._classify_document_initial( # type: ignore classifier_id=classifier_id, @@ -723,49 +682,42 @@ def begin_classify_document( # pylint: disable=inconsistent-return-statements classify_request=classify_request, content_type=content_type, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_classify_document.metadata = {'url': "/documentClassifiers/{classifierId}:analyze"} # type: ignore + begin_classify_document.metadata = {"url": "/documentClassifiers/{classifierId}:analyze"} # type: ignore @distributed_trace - def get_classify_result( - self, - classifier_id: str, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeResultOperation: + def get_classify_result(self, classifier_id: str, result_id: str, **kwargs: Any) -> _models.AnalyzeResultOperation: """Gets the result of document classifier. :param classifier_id: Unique document classifier name. @@ -777,36 +729,31 @@ def get_classify_result( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeResultOperation] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeResultOperation] - request = build_get_classify_result_request( classifier_id=classifier_id, result_id=result_id, api_version=api_version, - template_url=self.get_classify_result.metadata['url'], + template_url=self.get_classify_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -815,12 +762,11 @@ def get_classify_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeResultOperation', pipeline_response) + deserialized = self._deserialize("AnalyzeResultOperation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_classify_result.metadata = {'url': "/documentClassifiers/{classifierId}/analyzeResults/{resultId}"} # type: ignore - + get_classify_result.metadata = {"url": "/documentClassifiers/{classifierId}/analyzeResults/{resultId}"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_models_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_models_operations.py index 46d7d9129a8f..9a200caf3b5f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_models_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_document_models_operations.py @@ -11,7 +11,13 @@ from msrest import Serializer from ...._polling import DocumentModelAdministrationClientLROPoller -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -23,12 +29,14 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_analyze_document_request_initial( model_id: str, *, @@ -43,317 +51,241 @@ def build_analyze_document_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}:analyze") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "modelId": _SERIALIZER.url( + "model_id", model_id, "str", max_length=64, min_length=0, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, 'str', pattern=r'^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$') + _params["pages"] = _SERIALIZER.query("pages", pages, "str", pattern=r"^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$") if locale is not None: - _params['locale'] = _SERIALIZER.query("locale", locale, 'str') + _params["locale"] = _SERIALIZER.query("locale", locale, "str") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if features is not None: - _params['features'] = _SERIALIZER.query("features", features, '[str]', div=',') + _params["features"] = _SERIALIZER.query("features", features, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_get_analyze_result_request( - model_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_analyze_result_request(model_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}/analyzeResults/{resultId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "modelId": _SERIALIZER.url( + "model_id", model_id, "str", max_length=64, min_length=0, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$" + ), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_build_model_request_initial( - *, - json: Optional[_models.BuildDocumentModelRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.BuildDocumentModelRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels:build") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_compose_model_request_initial( - *, - json: Optional[_models.ComposeDocumentModelRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.ComposeDocumentModelRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels:compose") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_authorize_model_copy_request( - *, - json: Optional[_models.AuthorizeCopyRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.AuthorizeCopyRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels:authorizeCopy") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_copy_model_to_request_initial( - model_id: str, - *, - json: Optional[_models.CopyAuthorization] = None, - content: Any = None, - **kwargs: Any + model_id: str, *, json: Optional[_models.CopyAuthorization] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}:copyTo") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "modelId": _SERIALIZER.url( + "model_id", model_id, "str", max_length=64, min_length=0, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_list_models_request( - **kwargs: Any -) -> HttpRequest: +def build_list_models_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_model_request( - model_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_model_request(model_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "modelId": _SERIALIZER.url( + "model_id", model_id, "str", max_length=64, min_length=0, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_model_request( - model_id: str, - **kwargs: Any -) -> HttpRequest: +def build_delete_model_request(model_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/documentModels/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str', max_length=64, min_length=0, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$'), + "modelId": _SERIALIZER.url( + "model_id", model_id, "str", max_length=64, min_length=0, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$" + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class DocumentModelsOperations: """ @@ -374,7 +306,6 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _analyze_document_initial( # pylint: disable=inconsistent-return-statements self, model_id: str, @@ -387,28 +318,40 @@ def _analyze_document_initial( # pylint: disable=inconsistent-return-statements content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: _json = analyze_request - elif content_type.split(";")[0] in ['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html']: + elif content_type.split(";")[0] in [ + "application/octet-stream", + "application/pdf", + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "image/bmp", + "image/heif", + "image/jpeg", + "image/png", + "image/tiff", + "text/html", + ]: _content = analyze_request else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format(content_type) + "['application/octet-stream', 'application/pdf', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/bmp', 'image/heif', 'image/jpeg', 'image/png', 'image/tiff', 'text/html', 'application/json']".format( + content_type + ) ) request = build_analyze_document_request_initial( @@ -421,20 +364,18 @@ def _analyze_document_initial( # pylint: disable=inconsistent-return-statements locale=locale, string_index_type=string_index_type, features=features, - template_url=self._analyze_document_initial.metadata['url'], + template_url=self._analyze_document_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -443,14 +384,12 @@ def _analyze_document_initial( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_document_initial.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore - + _analyze_document_initial.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace def begin_analyze_document( # pylint: disable=inconsistent-return-statements @@ -506,14 +445,11 @@ def begin_analyze_document( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_document_initial( # type: ignore model_id=model_id, @@ -524,49 +460,42 @@ def begin_analyze_document( # pylint: disable=inconsistent-return-statements analyze_request=analyze_request, content_type=content_type, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_document.metadata = {'url': "/documentModels/{modelId}:analyze"} # type: ignore + begin_analyze_document.metadata = {"url": "/documentModels/{modelId}:analyze"} # type: ignore @distributed_trace - def get_analyze_result( - self, - model_id: str, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeResultOperation: + def get_analyze_result(self, model_id: str, result_id: str, **kwargs: Any) -> _models.AnalyzeResultOperation: """Gets the result of document analysis. :param model_id: Unique document model name. @@ -578,36 +507,31 @@ def get_analyze_result( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeResultOperation] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeResultOperation] - request = build_get_analyze_result_request( model_id=model_id, result_id=result_id, api_version=api_version, - template_url=self.get_analyze_result.metadata['url'], + template_url=self.get_analyze_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -616,53 +540,48 @@ def get_analyze_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeResultOperation', pipeline_response) + deserialized = self._deserialize("AnalyzeResultOperation", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_result.metadata = {'url': "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_result.metadata = {"url": "/documentModels/{modelId}/analyzeResults/{resultId}"} # type: ignore def _build_model_initial( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(build_request, 'BuildDocumentModelRequest') + _json = self._serialize.body(build_request, "BuildDocumentModelRequest") request = build_build_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._build_model_initial.metadata['url'], + template_url=self._build_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -671,20 +590,16 @@ def _build_model_initial( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _build_model_initial.metadata = {'url': "/documentModels:build"} # type: ignore - + _build_model_initial.metadata = {"url": "/documentModels:build"} # type: ignore @distributed_trace def begin_build_model( # pylint: disable=inconsistent-return-statements - self, - build_request: _models.BuildDocumentModelRequest, - **kwargs: Any + self, build_request: _models.BuildDocumentModelRequest, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Builds a custom document analysis model. @@ -706,93 +621,88 @@ def begin_build_model( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._build_model_initial( # type: ignore build_request=build_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_build_model.metadata = {'url': "/documentModels:build"} # type: ignore + begin_build_model.metadata = {"url": "/documentModels:build"} # type: ignore def _compose_model_initial( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(compose_request, 'ComposeDocumentModelRequest') + _json = self._serialize.body(compose_request, "ComposeDocumentModelRequest") request = build_compose_model_request_initial( api_version=api_version, content_type=content_type, json=_json, - template_url=self._compose_model_initial.metadata['url'], + template_url=self._compose_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -801,20 +711,16 @@ def _compose_model_initial( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _compose_model_initial.metadata = {'url': "/documentModels:compose"} # type: ignore - + _compose_model_initial.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace def begin_compose_model( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeDocumentModelRequest, - **kwargs: Any + self, compose_request: _models.ComposeDocumentModelRequest, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Creates a new document model from document types of existing document models. @@ -836,61 +742,58 @@ def begin_compose_model( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._compose_model_initial( # type: ignore compose_request=compose_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_compose_model.metadata = {'url': "/documentModels:compose"} # type: ignore + begin_compose_model.metadata = {"url": "/documentModels:compose"} # type: ignore @distributed_trace def authorize_model_copy( - self, - authorize_copy_request: _models.AuthorizeCopyRequest, - **kwargs: Any + self, authorize_copy_request: _models.AuthorizeCopyRequest, **kwargs: Any ) -> _models.CopyAuthorization: """Generates authorization to copy a document model to this location with specified modelId and optional description. @@ -902,38 +805,36 @@ def authorize_model_copy( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorization] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorization] - _json = self._serialize.body(authorize_copy_request, 'AuthorizeCopyRequest') + _json = self._serialize.body(authorize_copy_request, "AuthorizeCopyRequest") request = build_authorize_model_copy_request( api_version=api_version, content_type=content_type, json=_json, - template_url=self.authorize_model_copy.metadata['url'], + template_url=self.authorize_model_copy.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -942,55 +843,49 @@ def authorize_model_copy( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyAuthorization', pipeline_response) + deserialized = self._deserialize("CopyAuthorization", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - authorize_model_copy.metadata = {'url': "/documentModels:authorizeCopy"} # type: ignore - + authorize_model_copy.metadata = {"url": "/documentModels:authorizeCopy"} # type: ignore def _copy_model_to_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_to_request, 'CopyAuthorization') + _json = self._serialize.body(copy_to_request, "CopyAuthorization") request = build_copy_model_to_request_initial( model_id=model_id, api_version=api_version, content_type=content_type, json=_json, - template_url=self._copy_model_to_initial.metadata['url'], + template_url=self._copy_model_to_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -999,21 +894,16 @@ def _copy_model_to_initial( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_model_to_initial.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore - + _copy_model_to_initial.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace def begin_copy_model_to( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_to_request: _models.CopyAuthorization, - **kwargs: Any + self, model_id: str, copy_to_request: _models.CopyAuthorization, **kwargs: Any ) -> DocumentModelAdministrationClientLROPoller[None]: """Copies document model to the target resource, region, and modelId. @@ -1037,62 +927,58 @@ def begin_copy_model_to( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._copy_model_to_initial( # type: ignore model_id=model_id, copy_to_request=copy_to_request, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return DocumentModelAdministrationClientLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return DocumentModelAdministrationClientLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return DocumentModelAdministrationClientLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_copy_model_to.metadata = {'url': "/documentModels/{modelId}:copyTo"} # type: ignore + begin_copy_model_to.metadata = {"url": "/documentModels/{modelId}:copyTo"} # type: ignore @distributed_trace - def list_models( - self, - **kwargs: Any - ) -> Iterable[_models.GetDocumentModelsResponse]: + def list_models(self, **kwargs: Any) -> Iterable[_models.GetDocumentModelsResponse]: """List all document models. :keyword callable cls: A custom type or function that will be passed the direct response @@ -1105,30 +991,31 @@ def list_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetDocumentModelsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetDocumentModelsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_models_request( api_version=api_version, - template_url=self.list_models.metadata['url'], + template_url=self.list_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_models_request( api_version=api_version, template_url=next_link, @@ -1137,12 +1024,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1158,9 +1049,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1171,18 +1060,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_models.metadata = {'url': "/documentModels"} # type: ignore + list_models.metadata = {"url": "/documentModels"} # type: ignore @distributed_trace - def get_model( - self, - model_id: str, - **kwargs: Any - ) -> _models.DocumentModelDetails: + def get_model(self, model_id: str, **kwargs: Any) -> _models.DocumentModelDetails: """Gets detailed document model information. :param model_id: Unique document model name. @@ -1192,35 +1075,30 @@ def get_model( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.DocumentModelDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.DocumentModelDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.DocumentModelDetails] - request = build_get_model_request( model_id=model_id, api_version=api_version, - template_url=self.get_model.metadata['url'], + template_url=self.get_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1229,22 +1107,17 @@ def get_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('DocumentModelDetails', pipeline_response) + deserialized = self._deserialize("DocumentModelDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + get_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore @distributed_trace - def delete_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any - ) -> None: + def delete_model(self, model_id: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """Deletes document model. :param model_id: Unique document model name. @@ -1254,35 +1127,30 @@ def delete_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_model_request( model_id=model_id, api_version=api_version, - template_url=self.delete_model.metadata['url'], + template_url=self.delete_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1294,5 +1162,4 @@ def delete_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_model.metadata = {'url': "/documentModels/{modelId}"} # type: ignore - + delete_model.metadata = {"url": "/documentModels/{modelId}"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_miscellaneous_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_miscellaneous_operations.py index 721b7b0c6ec7..419346470be4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_miscellaneous_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_miscellaneous_operations.py @@ -10,7 +10,13 @@ from msrest import Serializer -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -20,97 +26,75 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_operations_request( - **kwargs: Any -) -> HttpRequest: + +def build_list_operations_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/operations") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_operation_request( - operation_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_operation_request(operation_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/operations/{operationId}") path_format_arguments = { - "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_resource_info_request( - **kwargs: Any -) -> HttpRequest: +def build_get_resource_info_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/info") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class MiscellaneousOperations: """ @@ -131,12 +115,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def list_operations( - self, - **kwargs: Any - ) -> Iterable[_models.GetOperationsResponse]: + def list_operations(self, **kwargs: Any) -> Iterable[_models.GetOperationsResponse]: """Lists all operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -149,30 +129,31 @@ def list_operations( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.GetOperationsResponse] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.GetOperationsResponse] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_operations_request( api_version=api_version, - template_url=self.list_operations.metadata['url'], + template_url=self.list_operations.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_operations_request( api_version=api_version, template_url=next_link, @@ -181,12 +162,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -202,9 +187,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -215,18 +198,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_operations.metadata = {'url': "/operations"} # type: ignore + list_operations.metadata = {"url": "/operations"} # type: ignore @distributed_trace - def get_operation( - self, - operation_id: str, - **kwargs: Any - ) -> _models.OperationDetails: + def get_operation(self, operation_id: str, **kwargs: Any) -> _models.OperationDetails: """Gets operation info. :param operation_id: Unique operation ID. @@ -236,35 +213,30 @@ def get_operation( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.OperationDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.OperationDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationDetails] - request = build_get_operation_request( operation_id=operation_id, api_version=api_version, - template_url=self.get_operation.metadata['url'], + template_url=self.get_operation.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -273,21 +245,17 @@ def get_operation( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('OperationDetails', pipeline_response) + deserialized = self._deserialize("OperationDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_operation.metadata = {'url': "/operations/{operationId}"} # type: ignore - + get_operation.metadata = {"url": "/operations/{operationId}"} # type: ignore @distributed_trace - def get_resource_info( - self, - **kwargs: Any - ) -> _models.ResourceDetails: + def get_resource_info(self, **kwargs: Any) -> _models.ResourceDetails: """Return information about the current resource. :keyword callable cls: A custom type or function that will be passed the direct response @@ -295,34 +263,29 @@ def get_resource_info( :rtype: ~azure.ai.formrecognizer.v2023_07_31.models.ResourceDetails :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-07-31")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.ResourceDetails] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-07-31")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ResourceDetails] - request = build_get_resource_info_request( api_version=api_version, - template_url=self.get_resource_info.metadata['url'], + template_url=self.get_resource_info.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -331,12 +294,11 @@ def get_resource_info( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('ResourceDetails', pipeline_response) + deserialized = self._deserialize("ResourceDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_resource_info.metadata = {'url': "/info"} # type: ignore - + get_resource_info.metadata = {"url": "/info"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2023_07_31/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_configuration.py index 2cc3fc69115e..d67deaff885c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -30,12 +31,7 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :type endpoint: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,23 +40,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.py index 0350ea8ccd4f..d380cf0e27ec 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class FormRecognizerClient(FormRecognizerClientOperationsMixin): """Extracts information from forms and images into structured data. @@ -34,13 +35,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer/v2.0' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer/v2.0" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -49,12 +45,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -74,7 +65,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_vendor.py index f5e2b343179d..e435b21c0ea6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_vendor.py @@ -18,6 +18,7 @@ from azure.core import PipelineClient + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,6 +26,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -32,13 +34,13 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: FormRecognizerClientConfiguration _serialize: "Serializer" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_configuration.py index 075b0371afef..f8006765b39c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -30,12 +31,7 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_form_recognizer_client.py index 93f0d4735f14..b347c5ef7137 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class FormRecognizerClient(FormRecognizerClientOperationsMixin): """Extracts information from forms and images into structured data. @@ -34,13 +35,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer/v2.0' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer/v2.0" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -49,12 +45,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -74,7 +65,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_vendor.py index f1511f05e326..698f2df8ead8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: FormRecognizerClientConfiguration _serialize: "Serializer" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/__init__.py index ec4780462f6e..8dc4b997e1e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'FormRecognizerClientOperationsMixin', + "FormRecognizerClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_form_recognizer_client_operations.py index 1dafc5e751d7..4253a1efc49b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_form_recognizer_client_operations.py @@ -9,7 +9,13 @@ from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -21,18 +27,33 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._form_recognizer_client_operations import build_analyze_layout_async_request_initial, build_analyze_receipt_async_request_initial, build_analyze_with_custom_model_request_initial, build_copy_custom_model_request_initial, build_delete_custom_model_request, build_generate_model_copy_authorization_request, build_get_analyze_form_result_request, build_get_analyze_layout_result_request, build_get_analyze_receipt_result_request, build_get_custom_model_copy_result_request, build_get_custom_model_request, build_get_custom_models_request, build_list_custom_models_request, build_train_custom_model_async_request +from ...operations._form_recognizer_client_operations import ( + build_analyze_layout_async_request_initial, + build_analyze_receipt_async_request_initial, + build_analyze_with_custom_model_request_initial, + build_copy_custom_model_request_initial, + build_delete_custom_model_request, + build_generate_model_copy_authorization_request, + build_get_analyze_form_result_request, + build_get_analyze_layout_result_request, + build_get_analyze_receipt_result_request, + build_get_custom_model_copy_result_request, + build_get_custom_model_request, + build_get_custom_models_request, + build_list_custom_models_request, + build_train_custom_model_async_request, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class FormRecognizerClientOperationsMixin(MixinABC): @distributed_trace_async async def train_custom_model_async( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> None: """Train Custom Model. @@ -53,36 +74,34 @@ async def train_custom_model_async( # pylint: disable=inconsistent-return-state :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(train_request, 'TrainRequest') + _json = self._serialize.body(train_request, "TrainRequest") request = build_train_custom_model_async_request( content_type=content_type, json=_json, - template_url=self.train_custom_model_async.metadata['url'], + template_url=self.train_custom_model_async.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -92,21 +111,16 @@ async def train_custom_model_async( # pylint: disable=inconsistent-return-state raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) - train_custom_model_async.metadata = {'url': "/custom/models"} # type: ignore - + train_custom_model_async.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace_async async def get_custom_model( - self, - model_id: str, - include_keys: Optional[bool] = False, - **kwargs: Any + self, model_id: str, include_keys: Optional[bool] = False, **kwargs: Any ) -> _models.Model: """Get Custom Model. @@ -122,34 +136,29 @@ async def get_custom_model( :rtype: ~azure.ai.formrecognizer.v2_0.models.Model :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.Model] + cls = kwargs.pop("cls", None) # type: ClsType[_models.Model] - request = build_get_custom_model_request( model_id=model_id, include_keys=include_keys, - template_url=self.get_custom_model.metadata['url'], + template_url=self.get_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -158,21 +167,18 @@ async def get_custom_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Model', pipeline_response) + deserialized = self._deserialize("Model", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + get_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore @distributed_trace_async async def delete_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete Custom Model. @@ -186,33 +192,28 @@ async def delete_custom_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_custom_model_request( model_id=model_id, - template_url=self.delete_custom_model.metadata['url'], + template_url=self.delete_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -224,8 +225,7 @@ async def delete_custom_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + delete_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-statements self, @@ -236,23 +236,21 @@ async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-re content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( @@ -266,20 +264,18 @@ async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-re json=_json, content=_content, include_text_details=include_text_details, - template_url=self._analyze_with_custom_model_initial.metadata['url'], + template_url=self._analyze_with_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -288,14 +284,12 @@ async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-re raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_with_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore - + _analyze_with_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-statements @@ -340,61 +334,54 @@ async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_with_custom_model_initial( # type: ignore model_id=model_id, include_text_details=include_text_details, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_with_custom_model.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore + begin_analyze_with_custom_model.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace_async async def get_analyze_form_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeOperationResult: """Get Analyze Form Result. @@ -409,34 +396,29 @@ async def get_analyze_form_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_form_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_analyze_form_result.metadata['url'], + template_url=self.get_analyze_form_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -445,53 +427,47 @@ async def get_analyze_form_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_form_result.metadata = {'url': "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_form_result.metadata = {"url": "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore async def _copy_custom_model_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_request, 'CopyRequest') + _json = self._serialize.body(copy_request, "CopyRequest") request = build_copy_custom_model_request_initial( model_id=model_id, content_type=content_type, json=_json, - template_url=self._copy_custom_model_initial.metadata['url'], + template_url=self._copy_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -500,21 +476,16 @@ async def _copy_custom_model_initial( # pylint: disable=inconsistent-return-sta raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore - + _copy_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace_async async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Copy Custom Model. @@ -540,61 +511,56 @@ async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._copy_custom_model_initial( # type: ignore model_id=model_id, copy_request=copy_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_custom_model.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore + begin_copy_custom_model.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace_async async def get_custom_model_copy_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.CopyOperationResult: """Get Custom Model Copy Result. @@ -609,34 +575,29 @@ async def get_custom_model_copy_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.CopyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyOperationResult] - request = build_get_custom_model_copy_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_custom_model_copy_result.metadata['url'], + template_url=self.get_custom_model_copy_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -645,21 +606,17 @@ async def get_custom_model_copy_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyOperationResult', pipeline_response) + deserialized = self._deserialize("CopyOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model_copy_result.metadata = {'url': "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore - + get_custom_model_copy_result.metadata = {"url": "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore @distributed_trace_async - async def generate_model_copy_authorization( - self, - **kwargs: Any - ) -> _models.CopyAuthorizationResult: + async def generate_model_copy_authorization(self, **kwargs: Any) -> _models.CopyAuthorizationResult: """Generate Copy Authorization. Generate authorization to copy a model into the target Form Recognizer resource. @@ -669,32 +626,27 @@ async def generate_model_copy_authorization( :rtype: ~azure.ai.formrecognizer.v2_0.models.CopyAuthorizationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorizationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorizationResult] - request = build_generate_model_copy_authorization_request( - template_url=self.generate_model_copy_authorization.metadata['url'], + template_url=self.generate_model_copy_authorization.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -704,17 +656,16 @@ async def generate_model_copy_authorization( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize('CopyAuthorizationResult', pipeline_response) + deserialized = self._deserialize("CopyAuthorizationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - generate_model_copy_authorization.metadata = {'url': "/custom/models/copyAuthorization"} # type: ignore - + generate_model_copy_authorization.metadata = {"url": "/custom/models/copyAuthorization"} # type: ignore async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -724,23 +675,21 @@ async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( @@ -753,20 +702,18 @@ async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return json=_json, content=_content, include_text_details=include_text_details, - template_url=self._analyze_receipt_async_initial.metadata['url'], + template_url=self._analyze_receipt_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -775,14 +722,12 @@ async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_receipt_async_initial.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore - + _analyze_receipt_async_initial.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statements @@ -824,60 +769,52 @@ async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-st _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_receipt_async_initial( # type: ignore include_text_details=include_text_details, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_receipt_async.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore + begin_analyze_receipt_async.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_receipt_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_receipt_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Receipt Result. Track the progress and obtain the result of the analyze receipt operation. @@ -889,33 +826,28 @@ async def get_analyze_receipt_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_receipt_result_request( result_id=result_id, - template_url=self.get_analyze_receipt_result.metadata['url'], + template_url=self.get_analyze_receipt_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -924,15 +856,14 @@ async def get_analyze_receipt_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_receipt_result.metadata = {'url': "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore - + get_analyze_receipt_result.metadata = {"url": "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -941,23 +872,21 @@ async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return- content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( @@ -969,20 +898,18 @@ async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return- content_type=content_type, json=_json, content=_content, - template_url=self._analyze_layout_async_initial.metadata['url'], + template_url=self._analyze_layout_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -991,14 +918,12 @@ async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return- raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_layout_async_initial.metadata = {'url': "/layout/analyze"} # type: ignore - + _analyze_layout_async_initial.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statements @@ -1036,59 +961,51 @@ async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_layout_async_initial( # type: ignore file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_layout_async.metadata = {'url': "/layout/analyze"} # type: ignore + begin_analyze_layout_async.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_layout_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_layout_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Layout Result. Track the progress and obtain the result of the analyze layout operation. @@ -1100,33 +1017,28 @@ async def get_analyze_layout_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_layout_result_request( result_id=result_id, - template_url=self.get_analyze_layout_result.metadata['url'], + template_url=self.get_analyze_layout_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1135,21 +1047,17 @@ async def get_analyze_layout_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_layout_result.metadata = {'url': "/layout/analyzeResults/{resultId}"} # type: ignore - + get_analyze_layout_result.metadata = {"url": "/layout/analyzeResults/{resultId}"} # type: ignore @distributed_trace - def list_custom_models( - self, - **kwargs: Any - ) -> AsyncIterable[_models.Models]: + def list_custom_models(self, **kwargs: Any) -> AsyncIterable[_models.Models]: """List Custom Models. Get information about all custom models. @@ -1165,30 +1073,31 @@ def list_custom_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "full")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "full")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_custom_models_request( op=op, - template_url=self.list_custom_models.metadata['url'], + template_url=self.list_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_custom_models_request( op=op, template_url=next_link, @@ -1197,12 +1106,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1218,9 +1131,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1231,17 +1142,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_custom_models.metadata = {'url': "/custom/models"} # type: ignore + list_custom_models.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace_async - async def get_custom_models( - self, - **kwargs: Any - ) -> _models.Models: + async def get_custom_models(self, **kwargs: Any) -> _models.Models: """Get Custom Models. Get information about all custom models. @@ -1254,34 +1160,29 @@ async def get_custom_models( :rtype: ~azure.ai.formrecognizer.v2_0.models.Models :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "summary")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "summary")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] - request = build_get_custom_models_request( op=op, - template_url=self.get_custom_models.metadata['url'], + template_url=self.get_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1290,12 +1191,11 @@ async def get_custom_models( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Models', pipeline_response) + deserialized = self._deserialize("Models", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_models.metadata = {'url': "/custom/models"} # type: ignore - + get_custom_models.metadata = {"url": "/custom/models"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/__init__.py index d6536dbf4e58..dc1e69aa79bc 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/__init__.py @@ -49,43 +49,44 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AnalyzeOperationResult', - 'AnalyzeResult', - 'CopyAuthorizationResult', - 'CopyOperationResult', - 'CopyRequest', - 'CopyResult', - 'DataTable', - 'DataTableCell', - 'DocumentResult', - 'ErrorInformation', - 'ErrorResponse', - 'FieldValue', - 'FormFieldsReport', - 'KeyValueElement', - 'KeyValuePair', - 'KeysResult', - 'Model', - 'ModelInfo', - 'Models', - 'ModelsSummary', - 'PageResult', - 'ReadResult', - 'SourcePath', - 'TextLine', - 'TextWord', - 'TrainRequest', - 'TrainResult', - 'TrainSourceFilter', - 'TrainingDocumentInfo', - 'ContentType', - 'FieldValueType', - 'Language', - 'LengthUnit', - 'ModelStatus', - 'OperationStatus', - 'TrainStatus', + "AnalyzeOperationResult", + "AnalyzeResult", + "CopyAuthorizationResult", + "CopyOperationResult", + "CopyRequest", + "CopyResult", + "DataTable", + "DataTableCell", + "DocumentResult", + "ErrorInformation", + "ErrorResponse", + "FieldValue", + "FormFieldsReport", + "KeyValueElement", + "KeyValuePair", + "KeysResult", + "Model", + "ModelInfo", + "Models", + "ModelsSummary", + "PageResult", + "ReadResult", + "SourcePath", + "TextLine", + "TextWord", + "TrainRequest", + "TrainResult", + "TrainSourceFilter", + "TrainingDocumentInfo", + "ContentType", + "FieldValueType", + "Language", + "LengthUnit", + "ModelStatus", + "OperationStatus", + "TrainStatus", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_form_recognizer_client_enums.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_form_recognizer_client_enums.py index 0f0d22dc2588..c319e7e93c18 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_form_recognizer_client_enums.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_form_recognizer_client_enums.py @@ -11,8 +11,7 @@ class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Content type for upload - """ + """Content type for upload""" #: Content Type 'application/pdf'. APPLICATION_PDF = "application/pdf" @@ -25,9 +24,9 @@ class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Content Type 'application/json'. APPLICATION_JSON = "application/json" + class FieldValueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic data type of the field value. - """ + """Semantic data type of the field value.""" STRING = "string" DATE = "date" @@ -38,13 +37,14 @@ class FieldValueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): ARRAY = "array" OBJECT = "object" + class Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Language code - """ + """Language code""" EN = "en" ES = "es" + class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The unit used by the width, height and boundingBox properties. For images, the unit is "pixel". For PDF, the unit is "inch". @@ -53,26 +53,26 @@ class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): PIXEL = "pixel" INCH = "inch" + class ModelStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the model. - """ + """Status of the model.""" CREATING = "creating" READY = "ready" INVALID = "invalid" + class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the queued operation. - """ + """Status of the queued operation.""" NOT_STARTED = "notStarted" RUNNING = "running" SUCCEEDED = "succeeded" FAILED = "failed" + class TrainStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the training operation. - """ + """Status of the training operation.""" SUCCEEDED = "succeeded" PARTIALLY_SUCCEEDED = "partiallySucceeded" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_models_py3.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_models_py3.py index b96707bfa83f..0a24ed08ac12 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_models_py3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_models_py3.py @@ -35,16 +35,16 @@ class AnalyzeOperationResult(msrest.serialization.Model): """ _validation = { - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'analyze_result': {'key': 'analyzeResult', 'type': 'AnalyzeResult'}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "analyze_result": {"key": "analyzeResult", "type": "AnalyzeResult"}, } def __init__( @@ -94,16 +94,16 @@ class AnalyzeResult(msrest.serialization.Model): """ _validation = { - 'version': {'required': True}, - 'read_results': {'required': True}, + "version": {"required": True}, + "read_results": {"required": True}, } _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'read_results': {'key': 'readResults', 'type': '[ReadResult]'}, - 'page_results': {'key': 'pageResults', 'type': '[PageResult]'}, - 'document_results': {'key': 'documentResults', 'type': '[DocumentResult]'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, + "version": {"key": "version", "type": "str"}, + "read_results": {"key": "readResults", "type": "[ReadResult]"}, + "page_results": {"key": "pageResults", "type": "[PageResult]"}, + "document_results": {"key": "documentResults", "type": "[DocumentResult]"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, } def __init__( @@ -151,25 +151,18 @@ class CopyAuthorizationResult(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, - 'access_token': {'required': True}, - 'expiration_date_time_ticks': {'required': True}, + "model_id": {"required": True}, + "access_token": {"required": True}, + "expiration_date_time_ticks": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'expiration_date_time_ticks': {'key': 'expirationDateTimeTicks', 'type': 'long'}, + "model_id": {"key": "modelId", "type": "str"}, + "access_token": {"key": "accessToken", "type": "str"}, + "expiration_date_time_ticks": {"key": "expirationDateTimeTicks", "type": "long"}, } - def __init__( - self, - *, - model_id: str, - access_token: str, - expiration_date_time_ticks: int, - **kwargs - ): + def __init__(self, *, model_id: str, access_token: str, expiration_date_time_ticks: int, **kwargs): """ :keyword model_id: Required. Model identifier. :paramtype model_id: str @@ -202,16 +195,16 @@ class CopyOperationResult(msrest.serialization.Model): """ _validation = { - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'copy_result': {'key': 'copyResult', 'type': 'CopyResult'}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "copy_result": {"key": "copyResult", "type": "CopyResult"}, } def __init__( @@ -259,15 +252,20 @@ class CopyRequest(msrest.serialization.Model): """ _validation = { - 'target_resource_id': {'required': True, 'max_length': 1024, 'min_length': 0, 'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.CognitiveServices/accounts/[^/]*$'}, - 'target_resource_region': {'required': True, 'max_length': 24, 'min_length': 1, 'pattern': r'^[a-z0-9]+$'}, - 'copy_authorization': {'required': True}, + "target_resource_id": { + "required": True, + "max_length": 1024, + "min_length": 0, + "pattern": r"^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.CognitiveServices/accounts/[^/]*$", + }, + "target_resource_region": {"required": True, "max_length": 24, "min_length": 1, "pattern": r"^[a-z0-9]+$"}, + "copy_authorization": {"required": True}, } _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'target_resource_region': {'key': 'targetResourceRegion', 'type': 'str'}, - 'copy_authorization': {'key': 'copyAuthorization', 'type': 'CopyAuthorizationResult'}, + "target_resource_id": {"key": "targetResourceId", "type": "str"}, + "target_resource_region": {"key": "targetResourceRegion", "type": "str"}, + "copy_authorization": {"key": "copyAuthorization", "type": "CopyAuthorizationResult"}, } def __init__( @@ -307,21 +305,15 @@ class CopyResult(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + "model_id": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, + "model_id": {"key": "modelId", "type": "str"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, } - def __init__( - self, - *, - model_id: str, - errors: Optional[List["_models.ErrorInformation"]] = None, - **kwargs - ): + def __init__(self, *, model_id: str, errors: Optional[List["_models.ErrorInformation"]] = None, **kwargs): """ :keyword model_id: Required. Identifier of the target model. :paramtype model_id: str @@ -347,25 +339,18 @@ class DataTable(msrest.serialization.Model): """ _validation = { - 'rows': {'required': True, 'minimum': 1}, - 'columns': {'required': True, 'minimum': 1}, - 'cells': {'required': True}, + "rows": {"required": True, "minimum": 1}, + "columns": {"required": True, "minimum": 1}, + "cells": {"required": True}, } _attribute_map = { - 'rows': {'key': 'rows', 'type': 'int'}, - 'columns': {'key': 'columns', 'type': 'int'}, - 'cells': {'key': 'cells', 'type': '[DataTableCell]'}, + "rows": {"key": "rows", "type": "int"}, + "columns": {"key": "columns", "type": "int"}, + "cells": {"key": "cells", "type": "[DataTableCell]"}, } - def __init__( - self, - *, - rows: int, - columns: int, - cells: List["_models.DataTableCell"], - **kwargs - ): + def __init__(self, *, rows: int, columns: int, cells: List["_models.DataTableCell"], **kwargs): """ :keyword rows: Required. Number of rows. :paramtype rows: int @@ -409,26 +394,26 @@ class DataTableCell(msrest.serialization.Model): """ _validation = { - 'row_index': {'required': True, 'minimum': 0}, - 'column_index': {'required': True, 'minimum': 0}, - 'row_span': {'minimum': 1}, - 'column_span': {'minimum': 1}, - 'text': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "row_index": {"required": True, "minimum": 0}, + "column_index": {"required": True, "minimum": 0}, + "row_span": {"minimum": 1}, + "column_span": {"minimum": 1}, + "text": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'row_index': {'key': 'rowIndex', 'type': 'int'}, - 'column_index': {'key': 'columnIndex', 'type': 'int'}, - 'row_span': {'key': 'rowSpan', 'type': 'int'}, - 'column_span': {'key': 'columnSpan', 'type': 'int'}, - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, - 'elements': {'key': 'elements', 'type': '[str]'}, - 'is_header': {'key': 'isHeader', 'type': 'bool'}, - 'is_footer': {'key': 'isFooter', 'type': 'bool'}, + "row_index": {"key": "rowIndex", "type": "int"}, + "column_index": {"key": "columnIndex", "type": "int"}, + "row_span": {"key": "rowSpan", "type": "int"}, + "column_span": {"key": "columnSpan", "type": "int"}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, + "elements": {"key": "elements", "type": "[str]"}, + "is_header": {"key": "isHeader", "type": "bool"}, + "is_footer": {"key": "isFooter", "type": "bool"}, } def __init__( @@ -496,25 +481,18 @@ class DocumentResult(msrest.serialization.Model): """ _validation = { - 'doc_type': {'required': True}, - 'page_range': {'required': True, 'max_items': 2, 'min_items': 2}, - 'fields': {'required': True}, + "doc_type": {"required": True}, + "page_range": {"required": True, "max_items": 2, "min_items": 2}, + "fields": {"required": True}, } _attribute_map = { - 'doc_type': {'key': 'docType', 'type': 'str'}, - 'page_range': {'key': 'pageRange', 'type': '[int]'}, - 'fields': {'key': 'fields', 'type': '{FieldValue}'}, + "doc_type": {"key": "docType", "type": "str"}, + "page_range": {"key": "pageRange", "type": "[int]"}, + "fields": {"key": "fields", "type": "{FieldValue}"}, } - def __init__( - self, - *, - doc_type: str, - page_range: List[int], - fields: Dict[str, "_models.FieldValue"], - **kwargs - ): + def __init__(self, *, doc_type: str, page_range: List[int], fields: Dict[str, "_models.FieldValue"], **kwargs): """ :keyword doc_type: Required. Document type. :paramtype doc_type: str @@ -541,22 +519,16 @@ class ErrorInformation(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - *, - code: str, - message: str, - **kwargs - ): + def __init__(self, *, code: str, message: str, **kwargs): """ :keyword code: Required. :paramtype code: str @@ -578,19 +550,14 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorInformation'}, + "error": {"key": "error", "type": "ErrorInformation"}, } - def __init__( - self, - *, - error: "_models.ErrorInformation", - **kwargs - ): + def __init__(self, *, error: "_models.ErrorInformation", **kwargs): """ :keyword error: Required. :paramtype error: ~azure.ai.formrecognizer.v2_0.models.ErrorInformation @@ -637,27 +604,27 @@ class FieldValue(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'bounding_box': {'max_items': 8, 'min_items': 8}, - 'confidence': {'maximum': 1, 'minimum': 0}, - 'page': {'minimum': 1}, + "type": {"required": True}, + "bounding_box": {"max_items": 8, "min_items": 8}, + "confidence": {"maximum": 1, "minimum": 0}, + "page": {"minimum": 1}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value_string': {'key': 'valueString', 'type': 'str'}, - 'value_date': {'key': 'valueDate', 'type': 'date'}, - 'value_time': {'key': 'valueTime', 'type': 'time'}, - 'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'}, - 'value_number': {'key': 'valueNumber', 'type': 'float'}, - 'value_integer': {'key': 'valueInteger', 'type': 'int'}, - 'value_array': {'key': 'valueArray', 'type': '[FieldValue]'}, - 'value_object': {'key': 'valueObject', 'type': '{FieldValue}'}, - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, - 'elements': {'key': 'elements', 'type': '[str]'}, - 'page': {'key': 'page', 'type': 'int'}, + "type": {"key": "type", "type": "str"}, + "value_string": {"key": "valueString", "type": "str"}, + "value_date": {"key": "valueDate", "type": "date"}, + "value_time": {"key": "valueTime", "type": "time"}, + "value_phone_number": {"key": "valuePhoneNumber", "type": "str"}, + "value_number": {"key": "valueNumber", "type": "float"}, + "value_integer": {"key": "valueInteger", "type": "int"}, + "value_array": {"key": "valueArray", "type": "[FieldValue]"}, + "value_object": {"key": "valueObject", "type": "{FieldValue}"}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, + "elements": {"key": "elements", "type": "[str]"}, + "page": {"key": "page", "type": "int"}, } def __init__( @@ -740,22 +707,16 @@ class FormFieldsReport(msrest.serialization.Model): """ _validation = { - 'field_name': {'required': True}, - 'accuracy': {'required': True}, + "field_name": {"required": True}, + "accuracy": {"required": True}, } _attribute_map = { - 'field_name': {'key': 'fieldName', 'type': 'str'}, - 'accuracy': {'key': 'accuracy', 'type': 'float'}, + "field_name": {"key": "fieldName", "type": "str"}, + "accuracy": {"key": "accuracy", "type": "float"}, } - def __init__( - self, - *, - field_name: str, - accuracy: float, - **kwargs - ): + def __init__(self, *, field_name: str, accuracy: float, **kwargs): """ :keyword field_name: Required. Training field name. :paramtype field_name: str @@ -777,19 +738,14 @@ class KeysResult(msrest.serialization.Model): """ _validation = { - 'clusters': {'required': True}, + "clusters": {"required": True}, } _attribute_map = { - 'clusters': {'key': 'clusters', 'type': '{[str]}'}, + "clusters": {"key": "clusters", "type": "{[str]}"}, } - def __init__( - self, - *, - clusters: Dict[str, List[str]], - **kwargs - ): + def __init__(self, *, clusters: Dict[str, List[str]], **kwargs): """ :keyword clusters: Required. Object mapping clusterIds to a list of keys. :paramtype clusters: dict[str, list[str]] @@ -813,23 +769,18 @@ class KeyValueElement(msrest.serialization.Model): """ _validation = { - 'text': {'required': True}, - 'bounding_box': {'max_items': 8, 'min_items': 8}, + "text": {"required": True}, + "bounding_box": {"max_items": 8, "min_items": 8}, } _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'elements': {'key': 'elements', 'type': '[str]'}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "elements": {"key": "elements", "type": "[str]"}, } def __init__( - self, - *, - text: str, - bounding_box: Optional[List[float]] = None, - elements: Optional[List[str]] = None, - **kwargs + self, *, text: str, bounding_box: Optional[List[float]] = None, elements: Optional[List[str]] = None, **kwargs ): """ :keyword text: Required. The text content of the key or value. @@ -862,16 +813,16 @@ class KeyValuePair(msrest.serialization.Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "key": {"required": True}, + "value": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'KeyValueElement'}, - 'value': {'key': 'value', 'type': 'KeyValueElement'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "label": {"key": "label", "type": "str"}, + "key": {"key": "key", "type": "KeyValueElement"}, + "value": {"key": "value", "type": "KeyValueElement"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -914,13 +865,13 @@ class Model(msrest.serialization.Model): """ _validation = { - 'model_info': {'required': True}, + "model_info": {"required": True}, } _attribute_map = { - 'model_info': {'key': 'modelInfo', 'type': 'ModelInfo'}, - 'keys': {'key': 'keys', 'type': 'KeysResult'}, - 'train_result': {'key': 'trainResult', 'type': 'TrainResult'}, + "model_info": {"key": "modelInfo", "type": "ModelInfo"}, + "keys": {"key": "keys", "type": "KeysResult"}, + "train_result": {"key": "trainResult", "type": "TrainResult"}, } def __init__( @@ -961,17 +912,17 @@ class ModelInfo(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "model_id": {"required": True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, + "model_id": {"key": "modelId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, } def __init__( @@ -1014,9 +965,9 @@ class Models(msrest.serialization.Model): """ _attribute_map = { - 'summary': {'key': 'summary', 'type': 'ModelsSummary'}, - 'model_list': {'key': 'modelList', 'type': '[ModelInfo]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "summary": {"key": "summary", "type": "ModelsSummary"}, + "model_list": {"key": "modelList", "type": "[ModelInfo]"}, + "next_link": {"key": "nextLink", "type": "str"}, } def __init__( @@ -1055,25 +1006,18 @@ class ModelsSummary(msrest.serialization.Model): """ _validation = { - 'count': {'required': True}, - 'limit': {'required': True}, - 'last_updated_date_time': {'required': True}, + "count": {"required": True}, + "limit": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, + "count": {"key": "count", "type": "int"}, + "limit": {"key": "limit", "type": "int"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, } - def __init__( - self, - *, - count: int, - limit: int, - last_updated_date_time: datetime.datetime, - **kwargs - ): + def __init__(self, *, count: int, limit: int, last_updated_date_time: datetime.datetime, **kwargs): """ :keyword count: Required. Current count of trained custom models. :paramtype count: int @@ -1105,15 +1049,15 @@ class PageResult(msrest.serialization.Model): """ _validation = { - 'page': {'required': True, 'minimum': 1}, - 'cluster_id': {'minimum': 0}, + "page": {"required": True, "minimum": 1}, + "cluster_id": {"minimum": 0}, } _attribute_map = { - 'page': {'key': 'page', 'type': 'int'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'key_value_pairs': {'key': 'keyValuePairs', 'type': '[KeyValuePair]'}, - 'tables': {'key': 'tables', 'type': '[DataTable]'}, + "page": {"key": "page", "type": "int"}, + "cluster_id": {"key": "clusterId", "type": "int"}, + "key_value_pairs": {"key": "keyValuePairs", "type": "[KeyValuePair]"}, + "tables": {"key": "tables", "type": "[DataTable]"}, } def __init__( @@ -1170,21 +1114,21 @@ class ReadResult(msrest.serialization.Model): """ _validation = { - 'page': {'required': True, 'minimum': 1}, - 'angle': {'required': True, 'maximum': 180, 'minimum_ex': -180}, - 'width': {'required': True, 'minimum': 0}, - 'height': {'required': True, 'minimum': 0}, - 'unit': {'required': True}, + "page": {"required": True, "minimum": 1}, + "angle": {"required": True, "maximum": 180, "minimum_ex": -180}, + "width": {"required": True, "minimum": 0}, + "height": {"required": True, "minimum": 0}, + "unit": {"required": True}, } _attribute_map = { - 'page': {'key': 'page', 'type': 'int'}, - 'angle': {'key': 'angle', 'type': 'float'}, - 'width': {'key': 'width', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'language': {'key': 'language', 'type': 'str'}, - 'lines': {'key': 'lines', 'type': '[TextLine]'}, + "page": {"key": "page", "type": "int"}, + "angle": {"key": "angle", "type": "float"}, + "width": {"key": "width", "type": "float"}, + "height": {"key": "height", "type": "float"}, + "unit": {"key": "unit", "type": "str"}, + "language": {"key": "language", "type": "str"}, + "lines": {"key": "lines", "type": "[TextLine]"}, } def __init__( @@ -1239,19 +1183,14 @@ class SourcePath(msrest.serialization.Model): """ _validation = { - 'source': {'max_length': 2048, 'min_length': 0}, + "source": {"max_length": 2048, "min_length": 0}, } _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, + "source": {"key": "source", "type": "str"}, } - def __init__( - self, - *, - source: Optional[str] = None, - **kwargs - ): + def __init__(self, *, source: Optional[str] = None, **kwargs): """ :keyword source: File source path. :paramtype source: str @@ -1277,16 +1216,16 @@ class TextLine(msrest.serialization.Model): """ _validation = { - 'text': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'words': {'required': True}, + "text": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "words": {"required": True}, } _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'language': {'key': 'language', 'type': 'str'}, - 'words': {'key': 'words', 'type': '[TextWord]'}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "language": {"key": "language", "type": "str"}, + "words": {"key": "words", "type": "[TextWord]"}, } def __init__( @@ -1330,25 +1269,18 @@ class TextWord(msrest.serialization.Model): """ _validation = { - 'text': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'confidence': {'maximum': 1, 'minimum': 0}, + "text": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, } - def __init__( - self, - *, - text: str, - bounding_box: List[float], - confidence: Optional[float] = None, - **kwargs - ): + def __init__(self, *, text: str, bounding_box: List[float], confidence: Optional[float] = None, **kwargs): """ :keyword text: Required. The text content of the word. :paramtype text: str @@ -1380,17 +1312,17 @@ class TrainingDocumentInfo(msrest.serialization.Model): """ _validation = { - 'document_name': {'required': True}, - 'pages': {'required': True}, - 'errors': {'required': True}, - 'status': {'required': True}, + "document_name": {"required": True}, + "pages": {"required": True}, + "errors": {"required": True}, + "status": {"required": True}, } _attribute_map = { - 'document_name': {'key': 'documentName', 'type': 'str'}, - 'pages': {'key': 'pages', 'type': 'int'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, - 'status': {'key': 'status', 'type': 'str'}, + "document_name": {"key": "documentName", "type": "str"}, + "pages": {"key": "pages", "type": "int"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, + "status": {"key": "status", "type": "str"}, } def __init__( @@ -1434,13 +1366,13 @@ class TrainRequest(msrest.serialization.Model): """ _validation = { - 'source': {'required': True, 'max_length': 2048, 'min_length': 0}, + "source": {"required": True, "max_length": 2048, "min_length": 0}, } _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'source_filter': {'key': 'sourceFilter', 'type': 'TrainSourceFilter'}, - 'use_label_file': {'key': 'useLabelFile', 'type': 'bool'}, + "source": {"key": "source", "type": "str"}, + "source_filter": {"key": "sourceFilter", "type": "TrainSourceFilter"}, + "use_label_file": {"key": "useLabelFile", "type": "bool"}, } def __init__( @@ -1483,14 +1415,14 @@ class TrainResult(msrest.serialization.Model): """ _validation = { - 'training_documents': {'required': True}, + "training_documents": {"required": True}, } _attribute_map = { - 'training_documents': {'key': 'trainingDocuments', 'type': '[TrainingDocumentInfo]'}, - 'fields': {'key': 'fields', 'type': '[FormFieldsReport]'}, - 'average_model_accuracy': {'key': 'averageModelAccuracy', 'type': 'float'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, + "training_documents": {"key": "trainingDocuments", "type": "[TrainingDocumentInfo]"}, + "fields": {"key": "fields", "type": "[FormFieldsReport]"}, + "average_model_accuracy": {"key": "averageModelAccuracy", "type": "float"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, } def __init__( @@ -1534,21 +1466,15 @@ class TrainSourceFilter(msrest.serialization.Model): """ _validation = { - 'prefix': {'max_length': 1024, 'min_length': 0}, + "prefix": {"max_length": 1024, "min_length": 0}, } _attribute_map = { - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'include_sub_folders': {'key': 'includeSubFolders', 'type': 'bool'}, + "prefix": {"key": "prefix", "type": "str"}, + "include_sub_folders": {"key": "includeSubFolders", "type": "bool"}, } - def __init__( - self, - *, - prefix: Optional[str] = None, - include_sub_folders: Optional[bool] = False, - **kwargs - ): + def __init__(self, *, prefix: Optional[str] = None, include_sub_folders: Optional[bool] = False, **kwargs): """ :keyword prefix: A case-sensitive prefix string to filter documents in the source path for training. For example, when using a Azure storage blob Uri, use the prefix to restrict sub diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/__init__.py index ec4780462f6e..8dc4b997e1e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'FormRecognizerClientOperationsMixin', + "FormRecognizerClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_form_recognizer_client_operations.py index 859be4f96e8a..f8641b568d0a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_form_recognizer_client_operations.py @@ -10,7 +10,13 @@ from msrest import Serializer -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -22,101 +28,76 @@ from .. import models as _models from .._vendor import MixinABC, _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_train_custom_model_async_request( - *, - json: Optional[_models.TrainRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.TrainRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_get_custom_model_request( - model_id: str, - *, - include_keys: Optional[bool] = False, - **kwargs: Any + model_id: str, *, include_keys: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_keys is not None: - _params['includeKeys'] = _SERIALIZER.query("include_keys", include_keys, 'bool') + _params["includeKeys"] = _SERIALIZER.query("include_keys", include_keys, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_custom_model_request( - model_id: str, - **kwargs: Any -) -> HttpRequest: +def build_delete_custom_model_request(model_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_analyze_with_custom_model_request_initial( @@ -130,149 +111,107 @@ def build_analyze_with_custom_model_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/analyze") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_get_analyze_form_result_request( - model_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_analyze_form_result_request(model_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/analyzeResults/{resultId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_copy_custom_model_request_initial( - model_id: str, - *, - json: Optional[_models.CopyRequest] = None, - content: Any = None, - **kwargs: Any + model_id: str, *, json: Optional[_models.CopyRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/copy") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_get_custom_model_copy_result_request( - model_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_custom_model_copy_result_request(model_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/copyResults/{resultId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_generate_model_copy_authorization_request( - **kwargs: Any -) -> HttpRequest: +def build_generate_model_copy_authorization_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/copyAuthorization") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) def build_analyze_receipt_async_request_initial( @@ -285,175 +224,128 @@ def build_analyze_receipt_async_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/receipt/analyze") # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) - - -def build_get_analyze_receipt_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) + + +def build_get_analyze_receipt_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/receipt/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_analyze_layout_async_request_initial( - *, - json: Optional[_models.SourcePath] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.SourcePath] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/layout/analyze") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_get_analyze_layout_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_analyze_layout_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/layout/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_list_custom_models_request( - **kwargs: Any -) -> HttpRequest: +def build_list_custom_models_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "full")) # type: str - accept = _headers.pop('Accept', "application/json") + op = kwargs.pop("op", _params.pop("op", "full")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models") # Construct parameters - _params['op'] = _SERIALIZER.query("op", op, 'str') + _params["op"] = _SERIALIZER.query("op", op, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_custom_models_request( - **kwargs: Any -) -> HttpRequest: +def build_get_custom_models_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "summary")) # type: str - accept = _headers.pop('Accept', "application/json") + op = kwargs.pop("op", _params.pop("op", "summary")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models") # Construct parameters - _params['op'] = _SERIALIZER.query("op", op, 'str') + _params["op"] = _SERIALIZER.query("op", op, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class FormRecognizerClientOperationsMixin(MixinABC): @distributed_trace def train_custom_model_async( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> None: """Train Custom Model. @@ -474,36 +366,34 @@ def train_custom_model_async( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(train_request, 'TrainRequest') + _json = self._serialize.body(train_request, "TrainRequest") request = build_train_custom_model_async_request( content_type=content_type, json=_json, - template_url=self.train_custom_model_async.metadata['url'], + template_url=self.train_custom_model_async.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -513,22 +403,15 @@ def train_custom_model_async( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) - train_custom_model_async.metadata = {'url': "/custom/models"} # type: ignore - + train_custom_model_async.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace - def get_custom_model( - self, - model_id: str, - include_keys: Optional[bool] = False, - **kwargs: Any - ) -> _models.Model: + def get_custom_model(self, model_id: str, include_keys: Optional[bool] = False, **kwargs: Any) -> _models.Model: """Get Custom Model. Get detailed information about a custom model. @@ -543,34 +426,29 @@ def get_custom_model( :rtype: ~azure.ai.formrecognizer.v2_0.models.Model :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.Model] + cls = kwargs.pop("cls", None) # type: ClsType[_models.Model] - request = build_get_custom_model_request( model_id=model_id, include_keys=include_keys, - template_url=self.get_custom_model.metadata['url'], + template_url=self.get_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -579,21 +457,18 @@ def get_custom_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Model', pipeline_response) + deserialized = self._deserialize("Model", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + get_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore @distributed_trace def delete_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete Custom Model. @@ -607,33 +482,28 @@ def delete_custom_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_custom_model_request( model_id=model_id, - template_url=self.delete_custom_model.metadata['url'], + template_url=self.delete_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -645,8 +515,7 @@ def delete_custom_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + delete_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-statements self, @@ -657,23 +526,21 @@ def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-s content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( @@ -687,20 +554,18 @@ def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-s json=_json, content=_content, include_text_details=include_text_details, - template_url=self._analyze_with_custom_model_initial.metadata['url'], + template_url=self._analyze_with_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -709,14 +574,12 @@ def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-s raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_with_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore - + _analyze_with_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-statements @@ -761,62 +624,52 @@ def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_with_custom_model_initial( # type: ignore model_id=model_id, include_text_details=include_text_details, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_with_custom_model.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore + begin_analyze_with_custom_model.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace - def get_analyze_form_result( - self, - model_id: str, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_form_result(self, model_id: str, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Form Result. Obtain current status and the result of the analyze form operation. @@ -830,34 +683,29 @@ def get_analyze_form_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_form_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_analyze_form_result.metadata['url'], + template_url=self.get_analyze_form_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -866,53 +714,47 @@ def get_analyze_form_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_form_result.metadata = {'url': "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_form_result.metadata = {"url": "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore def _copy_custom_model_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_request, 'CopyRequest') + _json = self._serialize.body(copy_request, "CopyRequest") request = build_copy_custom_model_request_initial( model_id=model_id, content_type=content_type, json=_json, - template_url=self._copy_custom_model_initial.metadata['url'], + template_url=self._copy_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -921,21 +763,16 @@ def _copy_custom_model_initial( # pylint: disable=inconsistent-return-statement raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore - + _copy_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> LROPoller[None]: """Copy Custom Model. @@ -961,62 +798,54 @@ def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._copy_custom_model_initial( # type: ignore model_id=model_id, copy_request=copy_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_custom_model.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore + begin_copy_custom_model.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace - def get_custom_model_copy_result( - self, - model_id: str, - result_id: str, - **kwargs: Any - ) -> _models.CopyOperationResult: + def get_custom_model_copy_result(self, model_id: str, result_id: str, **kwargs: Any) -> _models.CopyOperationResult: """Get Custom Model Copy Result. Obtain current status and the result of a custom model copy operation. @@ -1030,34 +859,29 @@ def get_custom_model_copy_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.CopyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyOperationResult] - request = build_get_custom_model_copy_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_custom_model_copy_result.metadata['url'], + template_url=self.get_custom_model_copy_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1066,21 +890,17 @@ def get_custom_model_copy_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyOperationResult', pipeline_response) + deserialized = self._deserialize("CopyOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model_copy_result.metadata = {'url': "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore - + get_custom_model_copy_result.metadata = {"url": "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore @distributed_trace - def generate_model_copy_authorization( - self, - **kwargs: Any - ) -> _models.CopyAuthorizationResult: + def generate_model_copy_authorization(self, **kwargs: Any) -> _models.CopyAuthorizationResult: """Generate Copy Authorization. Generate authorization to copy a model into the target Form Recognizer resource. @@ -1090,32 +910,27 @@ def generate_model_copy_authorization( :rtype: ~azure.ai.formrecognizer.v2_0.models.CopyAuthorizationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorizationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorizationResult] - request = build_generate_model_copy_authorization_request( - template_url=self.generate_model_copy_authorization.metadata['url'], + template_url=self.generate_model_copy_authorization.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1125,17 +940,16 @@ def generate_model_copy_authorization( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize('CopyAuthorizationResult', pipeline_response) + deserialized = self._deserialize("CopyAuthorizationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - generate_model_copy_authorization.metadata = {'url': "/custom/models/copyAuthorization"} # type: ignore - + generate_model_copy_authorization.metadata = {"url": "/custom/models/copyAuthorization"} # type: ignore def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1145,23 +959,21 @@ def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-state content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( @@ -1174,20 +986,18 @@ def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-state json=_json, content=_content, include_text_details=include_text_details, - template_url=self._analyze_receipt_async_initial.metadata['url'], + template_url=self._analyze_receipt_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1196,14 +1006,12 @@ def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-state raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_receipt_async_initial.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore - + _analyze_receipt_async_initial.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statements @@ -1245,60 +1053,51 @@ def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statemen _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_receipt_async_initial( # type: ignore include_text_details=include_text_details, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_receipt_async.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore + begin_analyze_receipt_async.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace - def get_analyze_receipt_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_receipt_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Receipt Result. Track the progress and obtain the result of the analyze receipt operation. @@ -1310,33 +1109,28 @@ def get_analyze_receipt_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_receipt_result_request( result_id=result_id, - template_url=self.get_analyze_receipt_result.metadata['url'], + template_url=self.get_analyze_receipt_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1345,15 +1139,14 @@ def get_analyze_receipt_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_receipt_result.metadata = {'url': "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore - + get_analyze_receipt_result.metadata = {"url": "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1362,23 +1155,21 @@ def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statem content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( @@ -1390,20 +1181,18 @@ def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statem content_type=content_type, json=_json, content=_content, - template_url=self._analyze_layout_async_initial.metadata['url'], + template_url=self._analyze_layout_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1412,14 +1201,12 @@ def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statem raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_layout_async_initial.metadata = {'url': "/layout/analyze"} # type: ignore - + _analyze_layout_async_initial.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statements @@ -1457,59 +1244,50 @@ def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_layout_async_initial( # type: ignore file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_layout_async.metadata = {'url': "/layout/analyze"} # type: ignore + begin_analyze_layout_async.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace - def get_analyze_layout_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_layout_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Layout Result. Track the progress and obtain the result of the analyze layout operation. @@ -1521,33 +1299,28 @@ def get_analyze_layout_result( :rtype: ~azure.ai.formrecognizer.v2_0.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_layout_result_request( result_id=result_id, - template_url=self.get_analyze_layout_result.metadata['url'], + template_url=self.get_analyze_layout_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1556,21 +1329,17 @@ def get_analyze_layout_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_layout_result.metadata = {'url': "/layout/analyzeResults/{resultId}"} # type: ignore - + get_analyze_layout_result.metadata = {"url": "/layout/analyzeResults/{resultId}"} # type: ignore @distributed_trace - def list_custom_models( - self, - **kwargs: Any - ) -> Iterable[_models.Models]: + def list_custom_models(self, **kwargs: Any) -> Iterable[_models.Models]: """List Custom Models. Get information about all custom models. @@ -1586,30 +1355,31 @@ def list_custom_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "full")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "full")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_custom_models_request( op=op, - template_url=self.list_custom_models.metadata['url'], + template_url=self.list_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_custom_models_request( op=op, template_url=next_link, @@ -1618,12 +1388,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1639,9 +1413,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1652,17 +1424,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_custom_models.metadata = {'url': "/custom/models"} # type: ignore + list_custom_models.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace - def get_custom_models( - self, - **kwargs: Any - ) -> _models.Models: + def get_custom_models(self, **kwargs: Any) -> _models.Models: """Get Custom Models. Get information about all custom models. @@ -1675,34 +1442,29 @@ def get_custom_models( :rtype: ~azure.ai.formrecognizer.v2_0.models.Models :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "summary")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "summary")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] - request = build_get_custom_models_request( op=op, - template_url=self.get_custom_models.metadata['url'], + template_url=self.get_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1711,12 +1473,11 @@ def get_custom_models( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Models', pipeline_response) + deserialized = self._deserialize("Models", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_models.metadata = {'url': "/custom/models"} # type: ignore - + get_custom_models.metadata = {"url": "/custom/models"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_configuration.py index 2cc3fc69115e..d67deaff885c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -30,12 +31,7 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :type endpoint: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,23 +40,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_form_recognizer_client.py index 73339e264aa8..eaa6a85c72ae 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class FormRecognizerClient(FormRecognizerClientOperationsMixin): """Extracts information from forms and images into structured data. @@ -34,13 +35,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer/v2.1' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer/v2.1" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -49,12 +45,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -74,7 +65,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_vendor.py index f5e2b343179d..e435b21c0ea6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/_vendor.py @@ -18,6 +18,7 @@ from azure.core import PipelineClient + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,6 +26,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -32,13 +34,13 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: FormRecognizerClientConfiguration _serialize: "Serializer" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/__init__.py index 9cb81d0fb6ea..ee44504e6b2b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['FormRecognizerClient'] + +__all__ = ["FormRecognizerClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_configuration.py index 075b0371afef..f8006765b39c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for FormRecognizerClient. @@ -30,12 +31,7 @@ class FormRecognizerClientConfiguration(Configuration): # pylint: disable=too-m :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(FormRecognizerClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-formrecognizer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-formrecognizer/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_form_recognizer_client.py index 26e415f59672..0df0325fe5a8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_form_recognizer_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class FormRecognizerClient(FormRecognizerClientOperationsMixin): """Extracts information from forms and images into structured data. @@ -34,13 +35,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _base_url = '{endpoint}/formrecognizer/v2.1' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _base_url = "{endpoint}/formrecognizer/v2.1" self._config = FormRecognizerClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) @@ -49,12 +45,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -74,7 +65,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_vendor.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_vendor.py index f1511f05e326..698f2df8ead8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_vendor.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: FormRecognizerClientConfiguration _serialize: "Serializer" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/__init__.py index ec4780462f6e..8dc4b997e1e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'FormRecognizerClientOperationsMixin', + "FormRecognizerClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_form_recognizer_client_operations.py index a21e0f544005..3b29e31c9636 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_form_recognizer_client_operations.py @@ -9,7 +9,13 @@ from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, cast from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -21,48 +27,68 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._form_recognizer_client_operations import build_analyze_business_card_async_request_initial, build_analyze_id_document_async_request_initial, build_analyze_invoice_async_request_initial, build_analyze_layout_async_request_initial, build_analyze_receipt_async_request_initial, build_analyze_with_custom_model_request_initial, build_compose_custom_models_async_request_initial, build_copy_custom_model_request_initial, build_delete_custom_model_request, build_generate_model_copy_authorization_request, build_get_analyze_business_card_result_request, build_get_analyze_form_result_request, build_get_analyze_id_document_result_request, build_get_analyze_invoice_result_request, build_get_analyze_layout_result_request, build_get_analyze_receipt_result_request, build_get_custom_model_copy_result_request, build_get_custom_model_request, build_get_custom_models_request, build_list_custom_models_request, build_train_custom_model_async_request_initial +from ...operations._form_recognizer_client_operations import ( + build_analyze_business_card_async_request_initial, + build_analyze_id_document_async_request_initial, + build_analyze_invoice_async_request_initial, + build_analyze_layout_async_request_initial, + build_analyze_receipt_async_request_initial, + build_analyze_with_custom_model_request_initial, + build_compose_custom_models_async_request_initial, + build_copy_custom_model_request_initial, + build_delete_custom_model_request, + build_generate_model_copy_authorization_request, + build_get_analyze_business_card_result_request, + build_get_analyze_form_result_request, + build_get_analyze_id_document_result_request, + build_get_analyze_invoice_result_request, + build_get_analyze_layout_result_request, + build_get_analyze_receipt_result_request, + build_get_custom_model_copy_result_request, + build_get_custom_model_request, + build_get_custom_models_request, + build_list_custom_models_request, + build_train_custom_model_async_request_initial, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class FormRecognizerClientOperationsMixin(MixinABC): # pylint: disable=too-many-public-methods async def _train_custom_model_async_initial( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(train_request, 'TrainRequest') + _json = self._serialize.body(train_request, "TrainRequest") request = build_train_custom_model_async_request_initial( content_type=content_type, json=_json, - template_url=self._train_custom_model_async_initial.metadata['url'], + template_url=self._train_custom_model_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -71,20 +97,16 @@ async def _train_custom_model_async_initial( # pylint: disable=inconsistent-ret raise HttpResponseError(response=response) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) - _train_custom_model_async_initial.metadata = {'url': "/custom/models"} # type: ignore - + _train_custom_model_async_initial.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace_async async def begin_train_custom_model_async( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Train Custom Model. @@ -115,60 +137,55 @@ async def begin_train_custom_model_async( # pylint: disable=inconsistent-return _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._train_custom_model_async_initial( # type: ignore train_request=train_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_train_custom_model_async.metadata = {'url': "/custom/models"} # type: ignore + begin_train_custom_model_async.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace_async async def get_custom_model( - self, - model_id: str, - include_keys: Optional[bool] = False, - **kwargs: Any + self, model_id: str, include_keys: Optional[bool] = False, **kwargs: Any ) -> _models.Model: """Get Custom Model. @@ -184,34 +201,29 @@ async def get_custom_model( :rtype: ~azure.ai.formrecognizer.v2_1.models.Model :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.Model] + cls = kwargs.pop("cls", None) # type: ClsType[_models.Model] - request = build_get_custom_model_request( model_id=model_id, include_keys=include_keys, - template_url=self.get_custom_model.metadata['url'], + template_url=self.get_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -220,21 +232,18 @@ async def get_custom_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Model', pipeline_response) + deserialized = self._deserialize("Model", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + get_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore @distributed_trace_async async def delete_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete Custom Model. @@ -248,33 +257,28 @@ async def delete_custom_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_custom_model_request( model_id=model_id, - template_url=self.delete_custom_model.metadata['url'], + template_url=self.delete_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -286,8 +290,7 @@ async def delete_custom_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + delete_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-statements self, @@ -299,28 +302,28 @@ async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-re content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_with_custom_model_request_initial( @@ -330,20 +333,18 @@ async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-re content=_content, include_text_details=include_text_details, pages=pages, - template_url=self._analyze_with_custom_model_initial.metadata['url'], + template_url=self._analyze_with_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -352,14 +353,12 @@ async def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-re raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_with_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore - + _analyze_with_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-statements @@ -410,13 +409,10 @@ async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_with_custom_model_initial( # type: ignore model_id=model_id, @@ -424,48 +420,44 @@ async def begin_analyze_with_custom_model( # pylint: disable=inconsistent-retur pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_with_custom_model.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore + begin_analyze_with_custom_model.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace_async async def get_analyze_form_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.AnalyzeOperationResult: """Get Analyze Form Result. @@ -480,34 +472,29 @@ async def get_analyze_form_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_form_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_analyze_form_result.metadata['url'], + template_url=self.get_analyze_form_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -516,53 +503,47 @@ async def get_analyze_form_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_form_result.metadata = {'url': "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_form_result.metadata = {"url": "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore async def _copy_custom_model_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_request, 'CopyRequest') + _json = self._serialize.body(copy_request, "CopyRequest") request = build_copy_custom_model_request_initial( model_id=model_id, content_type=content_type, json=_json, - template_url=self._copy_custom_model_initial.metadata['url'], + template_url=self._copy_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -571,21 +552,16 @@ async def _copy_custom_model_initial( # pylint: disable=inconsistent-return-sta raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore - + _copy_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace_async async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Copy Custom Model. @@ -611,61 +587,56 @@ async def begin_copy_custom_model( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._copy_custom_model_initial( # type: ignore model_id=model_id, copy_request=copy_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_custom_model.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore + begin_copy_custom_model.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace_async async def get_custom_model_copy_result( - self, - model_id: str, - result_id: str, - **kwargs: Any + self, model_id: str, result_id: str, **kwargs: Any ) -> _models.CopyOperationResult: """Get Custom Model Copy Result. @@ -680,34 +651,29 @@ async def get_custom_model_copy_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyOperationResult] - request = build_get_custom_model_copy_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_custom_model_copy_result.metadata['url'], + template_url=self.get_custom_model_copy_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -716,21 +682,17 @@ async def get_custom_model_copy_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyOperationResult', pipeline_response) + deserialized = self._deserialize("CopyOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model_copy_result.metadata = {'url': "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore - + get_custom_model_copy_result.metadata = {"url": "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore @distributed_trace_async - async def generate_model_copy_authorization( - self, - **kwargs: Any - ) -> _models.CopyAuthorizationResult: + async def generate_model_copy_authorization(self, **kwargs: Any) -> _models.CopyAuthorizationResult: """Generate Copy Authorization. Generate authorization to copy a model into the target Form Recognizer resource. @@ -740,32 +702,27 @@ async def generate_model_copy_authorization( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyAuthorizationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorizationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorizationResult] - request = build_generate_model_copy_authorization_request( - template_url=self.generate_model_copy_authorization.metadata['url'], + template_url=self.generate_model_copy_authorization.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -775,53 +732,48 @@ async def generate_model_copy_authorization( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize('CopyAuthorizationResult', pipeline_response) + deserialized = self._deserialize("CopyAuthorizationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - generate_model_copy_authorization.metadata = {'url': "/custom/models/copyAuthorization"} # type: ignore - + generate_model_copy_authorization.metadata = {"url": "/custom/models/copyAuthorization"} # type: ignore async def _compose_custom_models_async_initial( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeRequest, - **kwargs: Any + self, compose_request: _models.ComposeRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(compose_request, 'ComposeRequest') + _json = self._serialize.body(compose_request, "ComposeRequest") request = build_compose_custom_models_async_request_initial( content_type=content_type, json=_json, - template_url=self._compose_custom_models_async_initial.metadata['url'], + template_url=self._compose_custom_models_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -830,20 +782,16 @@ async def _compose_custom_models_async_initial( # pylint: disable=inconsistent- raise HttpResponseError(response=response) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) - _compose_custom_models_async_initial.metadata = {'url': "/custom/models/compose"} # type: ignore - + _compose_custom_models_async_initial.metadata = {"url": "/custom/models/compose"} # type: ignore @distributed_trace_async async def begin_compose_custom_models_async( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeRequest, - **kwargs: Any + self, compose_request: _models.ComposeRequest, **kwargs: Any ) -> AsyncLROPoller[None]: """Compose trained with labels models into one composed model. @@ -868,53 +816,51 @@ async def begin_compose_custom_models_async( # pylint: disable=inconsistent-ret _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._compose_custom_models_async_initial( # type: ignore compose_request=compose_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_compose_custom_models_async.metadata = {'url': "/custom/models/compose"} # type: ignore + begin_compose_custom_models_async.metadata = {"url": "/custom/models/compose"} # type: ignore async def _analyze_business_card_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -926,28 +872,28 @@ async def _analyze_business_card_async_initial( # pylint: disable=inconsistent- content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_business_card_async_request_initial( @@ -957,20 +903,18 @@ async def _analyze_business_card_async_initial( # pylint: disable=inconsistent- include_text_details=include_text_details, locale=locale, pages=pages, - template_url=self._analyze_business_card_async_initial.metadata['url'], + template_url=self._analyze_business_card_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -979,14 +923,12 @@ async def _analyze_business_card_async_initial( # pylint: disable=inconsistent- raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_business_card_async_initial.metadata = {'url': "/prebuilt/businessCard/analyze"} # type: ignore - + _analyze_business_card_async_initial.metadata = {"url": "/prebuilt/businessCard/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_business_card_async( # pylint: disable=inconsistent-return-statements @@ -1038,13 +980,10 @@ async def begin_analyze_business_card_async( # pylint: disable=inconsistent-ret _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_business_card_async_initial( # type: ignore include_text_details=include_text_details, @@ -1052,48 +991,43 @@ async def begin_analyze_business_card_async( # pylint: disable=inconsistent-ret pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_business_card_async.metadata = {'url': "/prebuilt/businessCard/analyze"} # type: ignore + begin_analyze_business_card_async.metadata = {"url": "/prebuilt/businessCard/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_business_card_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_business_card_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Business Card Result. Track the progress and obtain the result of the analyze business card operation. @@ -1105,33 +1039,28 @@ async def get_analyze_business_card_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_business_card_result_request( result_id=result_id, - template_url=self.get_analyze_business_card_result.metadata['url'], + template_url=self.get_analyze_business_card_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1140,15 +1069,14 @@ async def get_analyze_business_card_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_business_card_result.metadata = {'url': "/prebuilt/businessCard/analyzeResults/{resultId}"} # type: ignore - + get_analyze_business_card_result.metadata = {"url": "/prebuilt/businessCard/analyzeResults/{resultId}"} # type: ignore async def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1160,28 +1088,28 @@ async def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_invoice_async_request_initial( @@ -1191,20 +1119,18 @@ async def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return include_text_details=include_text_details, locale=locale, pages=pages, - template_url=self._analyze_invoice_async_initial.metadata['url'], + template_url=self._analyze_invoice_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1213,14 +1139,12 @@ async def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_invoice_async_initial.metadata = {'url': "/prebuilt/invoice/analyze"} # type: ignore - + _analyze_invoice_async_initial.metadata = {"url": "/prebuilt/invoice/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-statements @@ -1272,13 +1196,10 @@ async def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-st _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_invoice_async_initial( # type: ignore include_text_details=include_text_details, @@ -1286,48 +1207,43 @@ async def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-st pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_invoice_async.metadata = {'url': "/prebuilt/invoice/analyze"} # type: ignore + begin_analyze_invoice_async.metadata = {"url": "/prebuilt/invoice/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_invoice_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_invoice_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Invoice Result. Track the progress and obtain the result of the analyze invoice operation. @@ -1339,33 +1255,28 @@ async def get_analyze_invoice_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_invoice_result_request( result_id=result_id, - template_url=self.get_analyze_invoice_result.metadata['url'], + template_url=self.get_analyze_invoice_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1374,15 +1285,14 @@ async def get_analyze_invoice_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_invoice_result.metadata = {'url': "/prebuilt/invoice/analyzeResults/{resultId}"} # type: ignore - + get_analyze_invoice_result.metadata = {"url": "/prebuilt/invoice/analyzeResults/{resultId}"} # type: ignore async def _analyze_id_document_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1393,28 +1303,28 @@ async def _analyze_id_document_async_initial( # pylint: disable=inconsistent-re content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_id_document_async_request_initial( @@ -1423,20 +1333,18 @@ async def _analyze_id_document_async_initial( # pylint: disable=inconsistent-re content=_content, include_text_details=include_text_details, pages=pages, - template_url=self._analyze_id_document_async_initial.metadata['url'], + template_url=self._analyze_id_document_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1445,14 +1353,12 @@ async def _analyze_id_document_async_initial( # pylint: disable=inconsistent-re raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_id_document_async_initial.metadata = {'url': "/prebuilt/idDocument/analyze"} # type: ignore - + _analyze_id_document_async_initial.metadata = {"url": "/prebuilt/idDocument/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_id_document_async( # pylint: disable=inconsistent-return-statements @@ -1500,61 +1406,53 @@ async def begin_analyze_id_document_async( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_id_document_async_initial( # type: ignore include_text_details=include_text_details, pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_id_document_async.metadata = {'url': "/prebuilt/idDocument/analyze"} # type: ignore + begin_analyze_id_document_async.metadata = {"url": "/prebuilt/idDocument/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_id_document_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_id_document_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze ID Document Result. Track the progress and obtain the result of the analyze ID operation. @@ -1566,33 +1464,28 @@ async def get_analyze_id_document_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_id_document_result_request( result_id=result_id, - template_url=self.get_analyze_id_document_result.metadata['url'], + template_url=self.get_analyze_id_document_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1601,15 +1494,14 @@ async def get_analyze_id_document_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_id_document_result.metadata = {'url': "/prebuilt/idDocument/analyzeResults/{resultId}"} # type: ignore - + get_analyze_id_document_result.metadata = {"url": "/prebuilt/idDocument/analyzeResults/{resultId}"} # type: ignore async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1621,28 +1513,28 @@ async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_receipt_async_request_initial( @@ -1652,20 +1544,18 @@ async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return include_text_details=include_text_details, locale=locale, pages=pages, - template_url=self._analyze_receipt_async_initial.metadata['url'], + template_url=self._analyze_receipt_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1674,14 +1564,12 @@ async def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_receipt_async_initial.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore - + _analyze_receipt_async_initial.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statements @@ -1733,13 +1621,10 @@ async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-st _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_receipt_async_initial( # type: ignore include_text_details=include_text_details, @@ -1747,48 +1632,43 @@ async def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-st pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_receipt_async.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore + begin_analyze_receipt_async.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_receipt_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_receipt_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Receipt Result. Track the progress and obtain the result of the analyze receipt operation. @@ -1800,33 +1680,28 @@ async def get_analyze_receipt_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_receipt_result_request( result_id=result_id, - template_url=self.get_analyze_receipt_result.metadata['url'], + template_url=self.get_analyze_receipt_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1835,15 +1710,14 @@ async def get_analyze_receipt_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_receipt_result.metadata = {'url': "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore - + get_analyze_receipt_result.metadata = {"url": "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1855,28 +1729,28 @@ async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return- content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_layout_async_request_initial( @@ -1886,20 +1760,18 @@ async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return- pages=pages, language=language, reading_order=reading_order, - template_url=self._analyze_layout_async_initial.metadata['url'], + template_url=self._analyze_layout_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1908,14 +1780,12 @@ async def _analyze_layout_async_initial( # pylint: disable=inconsistent-return- raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_layout_async_initial.metadata = {'url': "/layout/analyze"} # type: ignore - + _analyze_layout_async_initial.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace_async async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statements @@ -1983,13 +1853,10 @@ async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_layout_async_initial( # type: ignore pages=pages, @@ -1997,48 +1864,43 @@ async def begin_analyze_layout_async( # pylint: disable=inconsistent-return-sta reading_order=reading_order, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_layout_async.metadata = {'url': "/layout/analyze"} # type: ignore + begin_analyze_layout_async.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace_async - async def get_analyze_layout_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + async def get_analyze_layout_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Layout Result. Track the progress and obtain the result of the analyze layout operation. @@ -2050,33 +1912,28 @@ async def get_analyze_layout_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_layout_result_request( result_id=result_id, - template_url=self.get_analyze_layout_result.metadata['url'], + template_url=self.get_analyze_layout_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2085,21 +1942,17 @@ async def get_analyze_layout_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_layout_result.metadata = {'url': "/layout/analyzeResults/{resultId}"} # type: ignore - + get_analyze_layout_result.metadata = {"url": "/layout/analyzeResults/{resultId}"} # type: ignore @distributed_trace - def list_custom_models( - self, - **kwargs: Any - ) -> AsyncIterable[_models.Models]: + def list_custom_models(self, **kwargs: Any) -> AsyncIterable[_models.Models]: """List Custom Models. Get information about all custom models. @@ -2115,30 +1968,31 @@ def list_custom_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "full")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "full")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_custom_models_request( op=op, - template_url=self.list_custom_models.metadata['url'], + template_url=self.list_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_custom_models_request( op=op, template_url=next_link, @@ -2147,12 +2001,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2168,9 +2026,7 @@ async def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2181,17 +2037,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_custom_models.metadata = {'url': "/custom/models"} # type: ignore + list_custom_models.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace_async - async def get_custom_models( - self, - **kwargs: Any - ) -> _models.Models: + async def get_custom_models(self, **kwargs: Any) -> _models.Models: """Get Custom Models. Get information about all custom models. @@ -2204,34 +2055,29 @@ async def get_custom_models( :rtype: ~azure.ai.formrecognizer.v2_1.models.Models :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "summary")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "summary")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] - request = build_get_custom_models_request( op=op, - template_url=self.get_custom_models.metadata['url'], + template_url=self.get_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2240,12 +2086,11 @@ async def get_custom_models( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Models', pipeline_response) + deserialized = self._deserialize("Models", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_models.metadata = {'url': "/custom/models"} # type: ignore - + get_custom_models.metadata = {"url": "/custom/models"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/__init__.py index 1f16e3918dbd..269a5c36b02e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/__init__.py @@ -60,54 +60,55 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AnalyzeOperationResult', - 'AnalyzeResult', - 'Appearance', - 'Attributes', - 'ComposeRequest', - 'CopyAuthorizationResult', - 'CopyOperationResult', - 'CopyRequest', - 'CopyResult', - 'DataTable', - 'DataTableCell', - 'DocumentResult', - 'ErrorInformation', - 'ErrorResponse', - 'FieldValue', - 'FormFieldsReport', - 'KeyValueElement', - 'KeyValuePair', - 'KeysResult', - 'Model', - 'ModelInfo', - 'Models', - 'ModelsSummary', - 'PageResult', - 'ReadResult', - 'SelectionMark', - 'SourcePath', - 'Style', - 'TextLine', - 'TextWord', - 'TrainRequest', - 'TrainResult', - 'TrainSourceFilter', - 'TrainingDocumentInfo', - 'ContentType', - 'FieldValueSelectionMark', - 'FieldValueType', - 'KeyValueType', - 'Language', - 'LengthUnit', - 'Locale', - 'ModelStatus', - 'OperationStatus', - 'ReadingOrder', - 'SelectionMarkState', - 'TextStyle', - 'TrainStatus', + "AnalyzeOperationResult", + "AnalyzeResult", + "Appearance", + "Attributes", + "ComposeRequest", + "CopyAuthorizationResult", + "CopyOperationResult", + "CopyRequest", + "CopyResult", + "DataTable", + "DataTableCell", + "DocumentResult", + "ErrorInformation", + "ErrorResponse", + "FieldValue", + "FormFieldsReport", + "KeyValueElement", + "KeyValuePair", + "KeysResult", + "Model", + "ModelInfo", + "Models", + "ModelsSummary", + "PageResult", + "ReadResult", + "SelectionMark", + "SourcePath", + "Style", + "TextLine", + "TextWord", + "TrainRequest", + "TrainResult", + "TrainSourceFilter", + "TrainingDocumentInfo", + "ContentType", + "FieldValueSelectionMark", + "FieldValueType", + "KeyValueType", + "Language", + "LengthUnit", + "Locale", + "ModelStatus", + "OperationStatus", + "ReadingOrder", + "SelectionMarkState", + "TextStyle", + "TrainStatus", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_form_recognizer_client_enums.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_form_recognizer_client_enums.py index e2af6f74aae6..005a26f6ef59 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_form_recognizer_client_enums.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_form_recognizer_client_enums.py @@ -11,8 +11,7 @@ class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Content type for upload - """ + """Content type for upload""" #: Content Type 'application/pdf'. APPLICATION_PDF = "application/pdf" @@ -27,16 +26,16 @@ class ContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Content Type 'application/json'. APPLICATION_JSON = "application/json" + class FieldValueSelectionMark(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Selection mark value. - """ + """Selection mark value.""" SELECTED = "selected" UNSELECTED = "unselected" + class FieldValueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic data type of the field value. - """ + """Semantic data type of the field value.""" STRING = "string" DATE = "date" @@ -49,13 +48,14 @@ class FieldValueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): SELECTION_MARK = "selectionMark" COUNTRY_REGION = "countryRegion" + class KeyValueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Semantic data type of the key value element. - """ + """Semantic data type of the key value element.""" STRING = "string" SELECTION_MARK = "selectionMark" + class Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): AF = "af" @@ -132,6 +132,7 @@ class Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): ZH_HANT = "zh-Hant" ZU = "zu" + class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The unit used by the width, height and boundingBox properties. For images, the unit is "pixel". For PDF, the unit is "inch". @@ -140,6 +141,7 @@ class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): PIXEL = "pixel" INCH = "inch" + class Locale(str, Enum, metaclass=CaseInsensitiveEnumMeta): EN_AU = "en-AU" @@ -148,45 +150,46 @@ class Locale(str, Enum, metaclass=CaseInsensitiveEnumMeta): EN_IN = "en-IN" EN_US = "en-US" + class ModelStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the model. - """ + """Status of the model.""" CREATING = "creating" READY = "ready" INVALID = "invalid" + class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the queued operation. - """ + """Status of the queued operation.""" NOT_STARTED = "notStarted" RUNNING = "running" SUCCEEDED = "succeeded" FAILED = "failed" + class ReadingOrder(str, Enum, metaclass=CaseInsensitiveEnumMeta): BASIC = "basic" NATURAL = "natural" + class SelectionMarkState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State of the selection mark. - """ + """State of the selection mark.""" SELECTED = "selected" UNSELECTED = "unselected" + class TextStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The text line style name, including handwriting and other. - """ + """The text line style name, including handwriting and other.""" OTHER = "other" HANDWRITING = "handwriting" + class TrainStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the training operation. - """ + """Status of the training operation.""" SUCCEEDED = "succeeded" PARTIALLY_SUCCEEDED = "partiallySucceeded" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_models_py3.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_models_py3.py index 97e5ddcdb6e8..6a7652c15e78 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_models_py3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_models_py3.py @@ -35,16 +35,16 @@ class AnalyzeOperationResult(msrest.serialization.Model): """ _validation = { - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'analyze_result': {'key': 'analyzeResult', 'type': 'AnalyzeResult'}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "analyze_result": {"key": "analyzeResult", "type": "AnalyzeResult"}, } def __init__( @@ -94,16 +94,16 @@ class AnalyzeResult(msrest.serialization.Model): """ _validation = { - 'version': {'required': True}, - 'read_results': {'required': True}, + "version": {"required": True}, + "read_results": {"required": True}, } _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - 'read_results': {'key': 'readResults', 'type': '[ReadResult]'}, - 'page_results': {'key': 'pageResults', 'type': '[PageResult]'}, - 'document_results': {'key': 'documentResults', 'type': '[DocumentResult]'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, + "version": {"key": "version", "type": "str"}, + "read_results": {"key": "readResults", "type": "[ReadResult]"}, + "page_results": {"key": "pageResults", "type": "[PageResult]"}, + "document_results": {"key": "documentResults", "type": "[DocumentResult]"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, } def __init__( @@ -146,19 +146,14 @@ class Appearance(msrest.serialization.Model): """ _validation = { - 'style': {'required': True}, + "style": {"required": True}, } _attribute_map = { - 'style': {'key': 'style', 'type': 'Style'}, + "style": {"key": "style", "type": "Style"}, } - def __init__( - self, - *, - style: "_models.Style", - **kwargs - ): + def __init__(self, *, style: "_models.Style", **kwargs): """ :keyword style: Required. An object representing the style of the text line. :paramtype style: ~azure.ai.formrecognizer.v2_1.models.Style @@ -175,15 +170,10 @@ class Attributes(msrest.serialization.Model): """ _attribute_map = { - 'is_composed': {'key': 'isComposed', 'type': 'bool'}, + "is_composed": {"key": "isComposed", "type": "bool"}, } - def __init__( - self, - *, - is_composed: Optional[bool] = False, - **kwargs - ): + def __init__(self, *, is_composed: Optional[bool] = False, **kwargs): """ :keyword is_composed: Is this model composed? (default: false). :paramtype is_composed: bool @@ -204,21 +194,15 @@ class ComposeRequest(msrest.serialization.Model): """ _validation = { - 'model_ids': {'required': True}, + "model_ids": {"required": True}, } _attribute_map = { - 'model_ids': {'key': 'modelIds', 'type': '[str]'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, + "model_ids": {"key": "modelIds", "type": "[str]"}, + "model_name": {"key": "modelName", "type": "str"}, } - def __init__( - self, - *, - model_ids: List[str], - model_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, model_ids: List[str], model_name: Optional[str] = None, **kwargs): """ :keyword model_ids: Required. List of model ids to compose. :paramtype model_ids: list[str] @@ -245,25 +229,18 @@ class CopyAuthorizationResult(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, - 'access_token': {'required': True}, - 'expiration_date_time_ticks': {'required': True}, + "model_id": {"required": True}, + "access_token": {"required": True}, + "expiration_date_time_ticks": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'expiration_date_time_ticks': {'key': 'expirationDateTimeTicks', 'type': 'long'}, + "model_id": {"key": "modelId", "type": "str"}, + "access_token": {"key": "accessToken", "type": "str"}, + "expiration_date_time_ticks": {"key": "expirationDateTimeTicks", "type": "long"}, } - def __init__( - self, - *, - model_id: str, - access_token: str, - expiration_date_time_ticks: int, - **kwargs - ): + def __init__(self, *, model_id: str, access_token: str, expiration_date_time_ticks: int, **kwargs): """ :keyword model_id: Required. Model identifier. :paramtype model_id: str @@ -296,16 +273,16 @@ class CopyOperationResult(msrest.serialization.Model): """ _validation = { - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'copy_result': {'key': 'copyResult', 'type': 'CopyResult'}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "copy_result": {"key": "copyResult", "type": "CopyResult"}, } def __init__( @@ -353,15 +330,20 @@ class CopyRequest(msrest.serialization.Model): """ _validation = { - 'target_resource_id': {'required': True, 'max_length': 1024, 'min_length': 0, 'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.CognitiveServices/accounts/[^/]*$'}, - 'target_resource_region': {'required': True, 'max_length': 24, 'min_length': 1, 'pattern': r'^[a-z0-9]+$'}, - 'copy_authorization': {'required': True}, + "target_resource_id": { + "required": True, + "max_length": 1024, + "min_length": 0, + "pattern": r"^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.CognitiveServices/accounts/[^/]*$", + }, + "target_resource_region": {"required": True, "max_length": 24, "min_length": 1, "pattern": r"^[a-z0-9]+$"}, + "copy_authorization": {"required": True}, } _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'target_resource_region': {'key': 'targetResourceRegion', 'type': 'str'}, - 'copy_authorization': {'key': 'copyAuthorization', 'type': 'CopyAuthorizationResult'}, + "target_resource_id": {"key": "targetResourceId", "type": "str"}, + "target_resource_region": {"key": "targetResourceRegion", "type": "str"}, + "copy_authorization": {"key": "copyAuthorization", "type": "CopyAuthorizationResult"}, } def __init__( @@ -401,21 +383,15 @@ class CopyResult(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + "model_id": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, + "model_id": {"key": "modelId", "type": "str"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, } - def __init__( - self, - *, - model_id: str, - errors: Optional[List["_models.ErrorInformation"]] = None, - **kwargs - ): + def __init__(self, *, model_id: str, errors: Optional[List["_models.ErrorInformation"]] = None, **kwargs): """ :keyword model_id: Required. Identifier of the target model. :paramtype model_id: str @@ -443,27 +419,21 @@ class DataTable(msrest.serialization.Model): """ _validation = { - 'rows': {'required': True, 'minimum': 1}, - 'columns': {'required': True, 'minimum': 1}, - 'cells': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, + "rows": {"required": True, "minimum": 1}, + "columns": {"required": True, "minimum": 1}, + "cells": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, } _attribute_map = { - 'rows': {'key': 'rows', 'type': 'int'}, - 'columns': {'key': 'columns', 'type': 'int'}, - 'cells': {'key': 'cells', 'type': '[DataTableCell]'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, + "rows": {"key": "rows", "type": "int"}, + "columns": {"key": "columns", "type": "int"}, + "cells": {"key": "cells", "type": "[DataTableCell]"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, } def __init__( - self, - *, - rows: int, - columns: int, - cells: List["_models.DataTableCell"], - bounding_box: List[float], - **kwargs + self, *, rows: int, columns: int, cells: List["_models.DataTableCell"], bounding_box: List[float], **kwargs ): """ :keyword rows: Required. Number of rows. @@ -511,26 +481,26 @@ class DataTableCell(msrest.serialization.Model): """ _validation = { - 'row_index': {'required': True, 'minimum': 0}, - 'column_index': {'required': True, 'minimum': 0}, - 'row_span': {'minimum': 1}, - 'column_span': {'minimum': 1}, - 'text': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "row_index": {"required": True, "minimum": 0}, + "column_index": {"required": True, "minimum": 0}, + "row_span": {"minimum": 1}, + "column_span": {"minimum": 1}, + "text": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'row_index': {'key': 'rowIndex', 'type': 'int'}, - 'column_index': {'key': 'columnIndex', 'type': 'int'}, - 'row_span': {'key': 'rowSpan', 'type': 'int'}, - 'column_span': {'key': 'columnSpan', 'type': 'int'}, - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, - 'elements': {'key': 'elements', 'type': '[str]'}, - 'is_header': {'key': 'isHeader', 'type': 'bool'}, - 'is_footer': {'key': 'isFooter', 'type': 'bool'}, + "row_index": {"key": "rowIndex", "type": "int"}, + "column_index": {"key": "columnIndex", "type": "int"}, + "row_span": {"key": "rowSpan", "type": "int"}, + "column_span": {"key": "columnSpan", "type": "int"}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, + "elements": {"key": "elements", "type": "[str]"}, + "is_header": {"key": "isHeader", "type": "bool"}, + "is_footer": {"key": "isFooter", "type": "bool"}, } def __init__( @@ -602,18 +572,18 @@ class DocumentResult(msrest.serialization.Model): """ _validation = { - 'doc_type': {'required': True}, - 'page_range': {'required': True, 'max_items': 2, 'min_items': 2}, - 'doc_type_confidence': {'maximum': 1, 'minimum': 0}, - 'fields': {'required': True}, + "doc_type": {"required": True}, + "page_range": {"required": True, "max_items": 2, "min_items": 2}, + "doc_type_confidence": {"maximum": 1, "minimum": 0}, + "fields": {"required": True}, } _attribute_map = { - 'doc_type': {'key': 'docType', 'type': 'str'}, - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'page_range': {'key': 'pageRange', 'type': '[int]'}, - 'doc_type_confidence': {'key': 'docTypeConfidence', 'type': 'float'}, - 'fields': {'key': 'fields', 'type': '{FieldValue}'}, + "doc_type": {"key": "docType", "type": "str"}, + "model_id": {"key": "modelId", "type": "str"}, + "page_range": {"key": "pageRange", "type": "[int]"}, + "doc_type_confidence": {"key": "docTypeConfidence", "type": "float"}, + "fields": {"key": "fields", "type": "{FieldValue}"}, } def __init__( @@ -658,22 +628,16 @@ class ErrorInformation(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - *, - code: str, - message: str, - **kwargs - ): + def __init__(self, *, code: str, message: str, **kwargs): """ :keyword code: Required. :paramtype code: str @@ -695,19 +659,14 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorInformation'}, + "error": {"key": "error", "type": "ErrorInformation"}, } - def __init__( - self, - *, - error: "_models.ErrorInformation", - **kwargs - ): + def __init__(self, *, error: "_models.ErrorInformation", **kwargs): """ :keyword error: Required. :paramtype error: ~azure.ai.formrecognizer.v2_1.models.ErrorInformation @@ -759,29 +718,29 @@ class FieldValue(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'bounding_box': {'max_items': 8, 'min_items': 8}, - 'confidence': {'maximum': 1, 'minimum': 0}, - 'page': {'minimum': 1}, + "type": {"required": True}, + "bounding_box": {"max_items": 8, "min_items": 8}, + "confidence": {"maximum": 1, "minimum": 0}, + "page": {"minimum": 1}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value_string': {'key': 'valueString', 'type': 'str'}, - 'value_date': {'key': 'valueDate', 'type': 'date'}, - 'value_time': {'key': 'valueTime', 'type': 'time'}, - 'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'}, - 'value_number': {'key': 'valueNumber', 'type': 'float'}, - 'value_integer': {'key': 'valueInteger', 'type': 'int'}, - 'value_array': {'key': 'valueArray', 'type': '[FieldValue]'}, - 'value_object': {'key': 'valueObject', 'type': '{FieldValue}'}, - 'value_selection_mark': {'key': 'valueSelectionMark', 'type': 'str'}, - 'value_country_region': {'key': 'valueCountryRegion', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, - 'elements': {'key': 'elements', 'type': '[str]'}, - 'page': {'key': 'page', 'type': 'int'}, + "type": {"key": "type", "type": "str"}, + "value_string": {"key": "valueString", "type": "str"}, + "value_date": {"key": "valueDate", "type": "date"}, + "value_time": {"key": "valueTime", "type": "time"}, + "value_phone_number": {"key": "valuePhoneNumber", "type": "str"}, + "value_number": {"key": "valueNumber", "type": "float"}, + "value_integer": {"key": "valueInteger", "type": "int"}, + "value_array": {"key": "valueArray", "type": "[FieldValue]"}, + "value_object": {"key": "valueObject", "type": "{FieldValue}"}, + "value_selection_mark": {"key": "valueSelectionMark", "type": "str"}, + "value_country_region": {"key": "valueCountryRegion", "type": "str"}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, + "elements": {"key": "elements", "type": "[str]"}, + "page": {"key": "page", "type": "int"}, } def __init__( @@ -874,22 +833,16 @@ class FormFieldsReport(msrest.serialization.Model): """ _validation = { - 'field_name': {'required': True}, - 'accuracy': {'required': True}, + "field_name": {"required": True}, + "accuracy": {"required": True}, } _attribute_map = { - 'field_name': {'key': 'fieldName', 'type': 'str'}, - 'accuracy': {'key': 'accuracy', 'type': 'float'}, + "field_name": {"key": "fieldName", "type": "str"}, + "accuracy": {"key": "accuracy", "type": "float"}, } - def __init__( - self, - *, - field_name: str, - accuracy: float, - **kwargs - ): + def __init__(self, *, field_name: str, accuracy: float, **kwargs): """ :keyword field_name: Required. Training field name. :paramtype field_name: str @@ -911,19 +864,14 @@ class KeysResult(msrest.serialization.Model): """ _validation = { - 'clusters': {'required': True}, + "clusters": {"required": True}, } _attribute_map = { - 'clusters': {'key': 'clusters', 'type': '{[str]}'}, + "clusters": {"key": "clusters", "type": "{[str]}"}, } - def __init__( - self, - *, - clusters: Dict[str, List[str]], - **kwargs - ): + def __init__(self, *, clusters: Dict[str, List[str]], **kwargs): """ :keyword clusters: Required. Object mapping clusterIds to a list of keys. :paramtype clusters: dict[str, list[str]] @@ -950,15 +898,15 @@ class KeyValueElement(msrest.serialization.Model): """ _validation = { - 'text': {'required': True}, - 'bounding_box': {'max_items': 8, 'min_items': 8}, + "text": {"required": True}, + "bounding_box": {"max_items": 8, "min_items": 8}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'elements': {'key': 'elements', 'type': '[str]'}, + "type": {"key": "type", "type": "str"}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "elements": {"key": "elements", "type": "[str]"}, } def __init__( @@ -1005,16 +953,16 @@ class KeyValuePair(msrest.serialization.Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, + "key": {"required": True}, + "value": {"required": True}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, } _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'KeyValueElement'}, - 'value': {'key': 'value', 'type': 'KeyValueElement'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "label": {"key": "label", "type": "str"}, + "key": {"key": "key", "type": "KeyValueElement"}, + "value": {"key": "value", "type": "KeyValueElement"}, + "confidence": {"key": "confidence", "type": "float"}, } def __init__( @@ -1059,14 +1007,14 @@ class Model(msrest.serialization.Model): """ _validation = { - 'model_info': {'required': True}, + "model_info": {"required": True}, } _attribute_map = { - 'model_info': {'key': 'modelInfo', 'type': 'ModelInfo'}, - 'keys': {'key': 'keys', 'type': 'KeysResult'}, - 'train_result': {'key': 'trainResult', 'type': 'TrainResult'}, - 'composed_train_results': {'key': 'composedTrainResults', 'type': '[TrainResult]'}, + "model_info": {"key": "modelInfo", "type": "ModelInfo"}, + "keys": {"key": "keys", "type": "KeysResult"}, + "train_result": {"key": "trainResult", "type": "TrainResult"}, + "composed_train_results": {"key": "composedTrainResults", "type": "[TrainResult]"}, } def __init__( @@ -1115,19 +1063,19 @@ class ModelInfo(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, - 'status': {'required': True}, - 'created_date_time': {'required': True}, - 'last_updated_date_time': {'required': True}, + "model_id": {"required": True}, + "status": {"required": True}, + "created_date_time": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'Attributes'}, + "model_id": {"key": "modelId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, + "model_name": {"key": "modelName", "type": "str"}, + "attributes": {"key": "attributes", "type": "Attributes"}, } def __init__( @@ -1178,9 +1126,9 @@ class Models(msrest.serialization.Model): """ _attribute_map = { - 'summary': {'key': 'summary', 'type': 'ModelsSummary'}, - 'model_list': {'key': 'modelList', 'type': '[ModelInfo]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "summary": {"key": "summary", "type": "ModelsSummary"}, + "model_list": {"key": "modelList", "type": "[ModelInfo]"}, + "next_link": {"key": "nextLink", "type": "str"}, } def __init__( @@ -1219,25 +1167,18 @@ class ModelsSummary(msrest.serialization.Model): """ _validation = { - 'count': {'required': True}, - 'limit': {'required': True}, - 'last_updated_date_time': {'required': True}, + "count": {"required": True}, + "limit": {"required": True}, + "last_updated_date_time": {"required": True}, } _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'last_updated_date_time': {'key': 'lastUpdatedDateTime', 'type': 'iso-8601'}, + "count": {"key": "count", "type": "int"}, + "limit": {"key": "limit", "type": "int"}, + "last_updated_date_time": {"key": "lastUpdatedDateTime", "type": "iso-8601"}, } - def __init__( - self, - *, - count: int, - limit: int, - last_updated_date_time: datetime.datetime, - **kwargs - ): + def __init__(self, *, count: int, limit: int, last_updated_date_time: datetime.datetime, **kwargs): """ :keyword count: Required. Current count of trained custom models. :paramtype count: int @@ -1269,15 +1210,15 @@ class PageResult(msrest.serialization.Model): """ _validation = { - 'page': {'required': True, 'minimum': 1}, - 'cluster_id': {'minimum': 0}, + "page": {"required": True, "minimum": 1}, + "cluster_id": {"minimum": 0}, } _attribute_map = { - 'page': {'key': 'page', 'type': 'int'}, - 'cluster_id': {'key': 'clusterId', 'type': 'int'}, - 'key_value_pairs': {'key': 'keyValuePairs', 'type': '[KeyValuePair]'}, - 'tables': {'key': 'tables', 'type': '[DataTable]'}, + "page": {"key": "page", "type": "int"}, + "cluster_id": {"key": "clusterId", "type": "int"}, + "key_value_pairs": {"key": "keyValuePairs", "type": "[KeyValuePair]"}, + "tables": {"key": "tables", "type": "[DataTable]"}, } def __init__( @@ -1334,21 +1275,21 @@ class ReadResult(msrest.serialization.Model): """ _validation = { - 'page': {'required': True, 'minimum': 1}, - 'angle': {'required': True, 'maximum': 180, 'minimum_ex': -180}, - 'width': {'required': True, 'minimum': 0}, - 'height': {'required': True, 'minimum': 0}, - 'unit': {'required': True}, + "page": {"required": True, "minimum": 1}, + "angle": {"required": True, "maximum": 180, "minimum_ex": -180}, + "width": {"required": True, "minimum": 0}, + "height": {"required": True, "minimum": 0}, + "unit": {"required": True}, } _attribute_map = { - 'page': {'key': 'page', 'type': 'int'}, - 'angle': {'key': 'angle', 'type': 'float'}, - 'width': {'key': 'width', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'lines': {'key': 'lines', 'type': '[TextLine]'}, - 'selection_marks': {'key': 'selectionMarks', 'type': '[SelectionMark]'}, + "page": {"key": "page", "type": "int"}, + "angle": {"key": "angle", "type": "float"}, + "width": {"key": "width", "type": "float"}, + "height": {"key": "height", "type": "float"}, + "unit": {"key": "unit", "type": "str"}, + "lines": {"key": "lines", "type": "[TextLine]"}, + "selection_marks": {"key": "selectionMarks", "type": "[SelectionMark]"}, } def __init__( @@ -1409,24 +1350,19 @@ class SelectionMark(msrest.serialization.Model): """ _validation = { - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, - 'state': {'required': True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "confidence": {"required": True, "maximum": 1, "minimum": 0}, + "state": {"required": True}, } _attribute_map = { - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, - 'state': {'key': 'state', 'type': 'str'}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, + "state": {"key": "state", "type": "str"}, } def __init__( - self, - *, - bounding_box: List[float], - confidence: float, - state: Union[str, "_models.SelectionMarkState"], - **kwargs + self, *, bounding_box: List[float], confidence: float, state: Union[str, "_models.SelectionMarkState"], **kwargs ): """ :keyword bounding_box: Required. Bounding box of the selection mark. @@ -1451,19 +1387,14 @@ class SourcePath(msrest.serialization.Model): """ _validation = { - 'source': {'max_length': 2048, 'min_length': 0}, + "source": {"max_length": 2048, "min_length": 0}, } _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, + "source": {"key": "source", "type": "str"}, } - def __init__( - self, - *, - source: Optional[str] = None, - **kwargs - ): + def __init__(self, *, source: Optional[str] = None, **kwargs): """ :keyword source: File source path. :paramtype source: str @@ -1485,22 +1416,16 @@ class Style(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'confidence': {'required': True}, + "name": {"required": True}, + "confidence": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "name": {"key": "name", "type": "str"}, + "confidence": {"key": "confidence", "type": "float"}, } - def __init__( - self, - *, - name: Union[str, "_models.TextStyle"], - confidence: float, - **kwargs - ): + def __init__(self, *, name: Union[str, "_models.TextStyle"], confidence: float, **kwargs): """ :keyword name: Required. The text line style name, including handwriting and other. Known values are: "other", "handwriting". @@ -1529,16 +1454,16 @@ class TextLine(msrest.serialization.Model): """ _validation = { - 'text': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'words': {'required': True}, + "text": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "words": {"required": True}, } _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'words': {'key': 'words', 'type': '[TextWord]'}, - 'appearance': {'key': 'appearance', 'type': 'Appearance'}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "words": {"key": "words", "type": "[TextWord]"}, + "appearance": {"key": "appearance", "type": "Appearance"}, } def __init__( @@ -1581,25 +1506,18 @@ class TextWord(msrest.serialization.Model): """ _validation = { - 'text': {'required': True}, - 'bounding_box': {'required': True, 'max_items': 8, 'min_items': 8}, - 'confidence': {'maximum': 1, 'minimum': 0}, + "text": {"required": True}, + "bounding_box": {"required": True, "max_items": 8, "min_items": 8}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': '[float]'}, - 'confidence': {'key': 'confidence', 'type': 'float'}, + "text": {"key": "text", "type": "str"}, + "bounding_box": {"key": "boundingBox", "type": "[float]"}, + "confidence": {"key": "confidence", "type": "float"}, } - def __init__( - self, - *, - text: str, - bounding_box: List[float], - confidence: Optional[float] = None, - **kwargs - ): + def __init__(self, *, text: str, bounding_box: List[float], confidence: Optional[float] = None, **kwargs): """ :keyword text: Required. The text content of the word. :paramtype text: str @@ -1631,17 +1549,17 @@ class TrainingDocumentInfo(msrest.serialization.Model): """ _validation = { - 'document_name': {'required': True}, - 'pages': {'required': True}, - 'errors': {'required': True}, - 'status': {'required': True}, + "document_name": {"required": True}, + "pages": {"required": True}, + "errors": {"required": True}, + "status": {"required": True}, } _attribute_map = { - 'document_name': {'key': 'documentName', 'type': 'str'}, - 'pages': {'key': 'pages', 'type': 'int'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, - 'status': {'key': 'status', 'type': 'str'}, + "document_name": {"key": "documentName", "type": "str"}, + "pages": {"key": "pages", "type": "int"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, + "status": {"key": "status", "type": "str"}, } def __init__( @@ -1687,14 +1605,14 @@ class TrainRequest(msrest.serialization.Model): """ _validation = { - 'source': {'required': True, 'max_length': 2048, 'min_length': 0}, + "source": {"required": True, "max_length": 2048, "min_length": 0}, } _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'source_filter': {'key': 'sourceFilter', 'type': 'TrainSourceFilter'}, - 'use_label_file': {'key': 'useLabelFile', 'type': 'bool'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, + "source": {"key": "source", "type": "str"}, + "source_filter": {"key": "sourceFilter", "type": "TrainSourceFilter"}, + "use_label_file": {"key": "useLabelFile", "type": "bool"}, + "model_name": {"key": "modelName", "type": "str"}, } def __init__( @@ -1743,15 +1661,15 @@ class TrainResult(msrest.serialization.Model): """ _validation = { - 'training_documents': {'required': True}, + "training_documents": {"required": True}, } _attribute_map = { - 'training_documents': {'key': 'trainingDocuments', 'type': '[TrainingDocumentInfo]'}, - 'fields': {'key': 'fields', 'type': '[FormFieldsReport]'}, - 'average_model_accuracy': {'key': 'averageModelAccuracy', 'type': 'float'}, - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ErrorInformation]'}, + "training_documents": {"key": "trainingDocuments", "type": "[TrainingDocumentInfo]"}, + "fields": {"key": "fields", "type": "[FormFieldsReport]"}, + "average_model_accuracy": {"key": "averageModelAccuracy", "type": "float"}, + "model_id": {"key": "modelId", "type": "str"}, + "errors": {"key": "errors", "type": "[ErrorInformation]"}, } def __init__( @@ -1799,21 +1717,15 @@ class TrainSourceFilter(msrest.serialization.Model): """ _validation = { - 'prefix': {'max_length': 1024, 'min_length': 0}, + "prefix": {"max_length": 1024, "min_length": 0}, } _attribute_map = { - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'include_sub_folders': {'key': 'includeSubFolders', 'type': 'bool'}, + "prefix": {"key": "prefix", "type": "str"}, + "include_sub_folders": {"key": "includeSubFolders", "type": "bool"}, } - def __init__( - self, - *, - prefix: Optional[str] = None, - include_sub_folders: Optional[bool] = False, - **kwargs - ): + def __init__(self, *, prefix: Optional[str] = None, include_sub_folders: Optional[bool] = False, **kwargs): """ :keyword prefix: A case-sensitive prefix string to filter documents in the source path for training. For example, when using a Azure storage blob Uri, use the prefix to restrict sub diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/__init__.py index ec4780462f6e..8dc4b997e1e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'FormRecognizerClientOperationsMixin', + "FormRecognizerClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_form_recognizer_client_operations.py index 9f1af974399c..16ec2e105ece 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_form_recognizer_client_operations.py @@ -10,7 +10,13 @@ from msrest import Serializer -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -22,101 +28,76 @@ from .. import models as _models from .._vendor import MixinABC, _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_train_custom_model_async_request_initial( - *, - json: Optional[_models.TrainRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.TrainRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_get_custom_model_request( - model_id: str, - *, - include_keys: Optional[bool] = False, - **kwargs: Any + model_id: str, *, include_keys: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_keys is not None: - _params['includeKeys'] = _SERIALIZER.query("include_keys", include_keys, 'bool') + _params["includeKeys"] = _SERIALIZER.query("include_keys", include_keys, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_delete_custom_model_request( - model_id: str, - **kwargs: Any -) -> HttpRequest: +def build_delete_custom_model_request(model_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_analyze_with_custom_model_request_initial( @@ -131,180 +112,128 @@ def build_analyze_with_custom_model_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/analyze") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, '[str]', div=',') + _params["pages"] = _SERIALIZER.query("pages", pages, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_get_analyze_form_result_request( - model_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_analyze_form_result_request(model_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/analyzeResults/{resultId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_copy_custom_model_request_initial( - model_id: str, - *, - json: Optional[_models.CopyRequest] = None, - content: Any = None, - **kwargs: Any + model_id: str, *, json: Optional[_models.CopyRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/copy") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_get_custom_model_copy_result_request( - model_id: str, - result_id: str, - **kwargs: Any -) -> HttpRequest: +def build_get_custom_model_copy_result_request(model_id: str, result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/{modelId}/copyResults/{resultId}") path_format_arguments = { - "modelId": _SERIALIZER.url("model_id", model_id, 'str'), - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "modelId": _SERIALIZER.url("model_id", model_id, "str"), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_generate_model_copy_authorization_request( - **kwargs: Any -) -> HttpRequest: +def build_generate_model_copy_authorization_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/copyAuthorization") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) def build_compose_custom_models_async_request_initial( - *, - json: Optional[_models.ComposeRequest] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[_models.ComposeRequest] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models/compose") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_analyze_business_card_async_request_initial( @@ -319,61 +248,47 @@ def build_analyze_business_card_async_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/businessCard/analyze") # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") if locale is not None: - _params['locale'] = _SERIALIZER.query("locale", locale, 'str') + _params["locale"] = _SERIALIZER.query("locale", locale, "str") if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, '[str]', div=',') + _params["pages"] = _SERIALIZER.query("pages", pages, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) - - -def build_get_analyze_business_card_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) + + +def build_get_analyze_business_card_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/businessCard/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_analyze_invoice_async_request_initial( @@ -388,61 +303,47 @@ def build_analyze_invoice_async_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/invoice/analyze") # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") if locale is not None: - _params['locale'] = _SERIALIZER.query("locale", locale, 'str') + _params["locale"] = _SERIALIZER.query("locale", locale, "str") if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, '[str]', div=',') + _params["pages"] = _SERIALIZER.query("pages", pages, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) - - -def build_get_analyze_invoice_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) + + +def build_get_analyze_invoice_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/invoice/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_analyze_id_document_async_request_initial( @@ -456,59 +357,45 @@ def build_analyze_id_document_async_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/idDocument/analyze") # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, '[str]', div=',') + _params["pages"] = _SERIALIZER.query("pages", pages, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) - - -def build_get_analyze_id_document_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) + + +def build_get_analyze_id_document_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/idDocument/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_analyze_receipt_async_request_initial( @@ -523,61 +410,47 @@ def build_analyze_receipt_async_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/receipt/analyze") # Construct parameters if include_text_details is not None: - _params['includeTextDetails'] = _SERIALIZER.query("include_text_details", include_text_details, 'bool') + _params["includeTextDetails"] = _SERIALIZER.query("include_text_details", include_text_details, "bool") if locale is not None: - _params['locale'] = _SERIALIZER.query("locale", locale, 'str') + _params["locale"] = _SERIALIZER.query("locale", locale, "str") if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, '[str]', div=',') + _params["pages"] = _SERIALIZER.query("pages", pages, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) - - -def build_get_analyze_receipt_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) + + +def build_get_analyze_receipt_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/prebuilt/receipt/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_analyze_layout_async_request_initial( @@ -592,153 +465,120 @@ def build_analyze_layout_async_request_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[Union[str, "_models.ContentType"]] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", None) + ) # type: Optional[Union[str, "_models.ContentType"]] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/layout/analyze") # Construct parameters if pages is not None: - _params['pages'] = _SERIALIZER.query("pages", pages, '[str]', div=',') + _params["pages"] = _SERIALIZER.query("pages", pages, "[str]", div=",") if language is not None: - _params['language'] = _SERIALIZER.query("language", language, 'str') + _params["language"] = _SERIALIZER.query("language", language, "str") if reading_order is not None: - _params['readingOrder'] = _SERIALIZER.query("reading_order", reading_order, 'str') + _params["readingOrder"] = _SERIALIZER.query("reading_order", reading_order, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) - - -def build_get_analyze_layout_result_request( - result_id: str, - **kwargs: Any -) -> HttpRequest: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) + + +def build_get_analyze_layout_result_request(result_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/layout/analyzeResults/{resultId}") path_format_arguments = { - "resultId": _SERIALIZER.url("result_id", result_id, 'str'), + "resultId": _SERIALIZER.url("result_id", result_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_list_custom_models_request( - **kwargs: Any -) -> HttpRequest: +def build_list_custom_models_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "full")) # type: str - accept = _headers.pop('Accept', "application/json") + op = kwargs.pop("op", _params.pop("op", "full")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models") # Construct parameters - _params['op'] = _SERIALIZER.query("op", op, 'str') + _params["op"] = _SERIALIZER.query("op", op, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_custom_models_request( - **kwargs: Any -) -> HttpRequest: +def build_get_custom_models_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "summary")) # type: str - accept = _headers.pop('Accept', "application/json") + op = kwargs.pop("op", _params.pop("op", "summary")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/custom/models") # Construct parameters - _params['op'] = _SERIALIZER.query("op", op, 'str') + _params["op"] = _SERIALIZER.query("op", op, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class FormRecognizerClientOperationsMixin(MixinABC): # pylint: disable=too-many-public-methods def _train_custom_model_async_initial( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(train_request, 'TrainRequest') + _json = self._serialize.body(train_request, "TrainRequest") request = build_train_custom_model_async_request_initial( content_type=content_type, json=_json, - template_url=self._train_custom_model_async_initial.metadata['url'], + template_url=self._train_custom_model_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -747,20 +587,16 @@ def _train_custom_model_async_initial( # pylint: disable=inconsistent-return-st raise HttpResponseError(response=response) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) - _train_custom_model_async_initial.metadata = {'url': "/custom/models"} # type: ignore - + _train_custom_model_async_initial.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace def begin_train_custom_model_async( # pylint: disable=inconsistent-return-statements - self, - train_request: _models.TrainRequest, - **kwargs: Any + self, train_request: _models.TrainRequest, **kwargs: Any ) -> LROPoller[None]: """Train Custom Model. @@ -791,61 +627,53 @@ def begin_train_custom_model_async( # pylint: disable=inconsistent-return-state _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._train_custom_model_async_initial( # type: ignore train_request=train_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_train_custom_model_async.metadata = {'url': "/custom/models"} # type: ignore + begin_train_custom_model_async.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace - def get_custom_model( - self, - model_id: str, - include_keys: Optional[bool] = False, - **kwargs: Any - ) -> _models.Model: + def get_custom_model(self, model_id: str, include_keys: Optional[bool] = False, **kwargs: Any) -> _models.Model: """Get Custom Model. Get detailed information about a custom model. @@ -860,34 +688,29 @@ def get_custom_model( :rtype: ~azure.ai.formrecognizer.v2_1.models.Model :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.Model] + cls = kwargs.pop("cls", None) # type: ClsType[_models.Model] - request = build_get_custom_model_request( model_id=model_id, include_keys=include_keys, - template_url=self.get_custom_model.metadata['url'], + template_url=self.get_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -896,21 +719,18 @@ def get_custom_model( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Model', pipeline_response) + deserialized = self._deserialize("Model", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + get_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore @distributed_trace def delete_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - **kwargs: Any + self, model_id: str, **kwargs: Any ) -> None: """Delete Custom Model. @@ -924,33 +744,28 @@ def delete_custom_model( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_delete_custom_model_request( model_id=model_id, - template_url=self.delete_custom_model.metadata['url'], + template_url=self.delete_custom_model.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -962,8 +777,7 @@ def delete_custom_model( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete_custom_model.metadata = {'url': "/custom/models/{modelId}"} # type: ignore - + delete_custom_model.metadata = {"url": "/custom/models/{modelId}"} # type: ignore def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-statements self, @@ -975,28 +789,28 @@ def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-s content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_with_custom_model_request_initial( @@ -1006,20 +820,18 @@ def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-s content=_content, include_text_details=include_text_details, pages=pages, - template_url=self._analyze_with_custom_model_initial.metadata['url'], + template_url=self._analyze_with_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1028,14 +840,12 @@ def _analyze_with_custom_model_initial( # pylint: disable=inconsistent-return-s raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_with_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore - + _analyze_with_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-statements @@ -1086,13 +896,10 @@ def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_with_custom_model_initial( # type: ignore model_id=model_id, @@ -1100,49 +907,42 @@ def begin_analyze_with_custom_model( # pylint: disable=inconsistent-return-stat pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_with_custom_model.metadata = {'url': "/custom/models/{modelId}/analyze"} # type: ignore + begin_analyze_with_custom_model.metadata = {"url": "/custom/models/{modelId}/analyze"} # type: ignore @distributed_trace - def get_analyze_form_result( - self, - model_id: str, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_form_result(self, model_id: str, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Form Result. Obtain current status and the result of the analyze form operation. @@ -1156,34 +956,29 @@ def get_analyze_form_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_form_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_analyze_form_result.metadata['url'], + template_url=self.get_analyze_form_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1192,53 +987,47 @@ def get_analyze_form_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_form_result.metadata = {'url': "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore - + get_analyze_form_result.metadata = {"url": "/custom/models/{modelId}/analyzeResults/{resultId}"} # type: ignore def _copy_custom_model_initial( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(copy_request, 'CopyRequest') + _json = self._serialize.body(copy_request, "CopyRequest") request = build_copy_custom_model_request_initial( model_id=model_id, content_type=content_type, json=_json, - template_url=self._copy_custom_model_initial.metadata['url'], + template_url=self._copy_custom_model_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1247,21 +1036,16 @@ def _copy_custom_model_initial( # pylint: disable=inconsistent-return-statement raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _copy_custom_model_initial.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore - + _copy_custom_model_initial.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements - self, - model_id: str, - copy_request: _models.CopyRequest, - **kwargs: Any + self, model_id: str, copy_request: _models.CopyRequest, **kwargs: Any ) -> LROPoller[None]: """Copy Custom Model. @@ -1287,62 +1071,54 @@ def begin_copy_custom_model( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._copy_custom_model_initial( # type: ignore model_id=model_id, copy_request=copy_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_custom_model.metadata = {'url': "/custom/models/{modelId}/copy"} # type: ignore + begin_copy_custom_model.metadata = {"url": "/custom/models/{modelId}/copy"} # type: ignore @distributed_trace - def get_custom_model_copy_result( - self, - model_id: str, - result_id: str, - **kwargs: Any - ) -> _models.CopyOperationResult: + def get_custom_model_copy_result(self, model_id: str, result_id: str, **kwargs: Any) -> _models.CopyOperationResult: """Get Custom Model Copy Result. Obtain current status and the result of a custom model copy operation. @@ -1356,34 +1132,29 @@ def get_custom_model_copy_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyOperationResult] - request = build_get_custom_model_copy_result_request( model_id=model_id, result_id=result_id, - template_url=self.get_custom_model_copy_result.metadata['url'], + template_url=self.get_custom_model_copy_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1392,21 +1163,17 @@ def get_custom_model_copy_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CopyOperationResult', pipeline_response) + deserialized = self._deserialize("CopyOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model_copy_result.metadata = {'url': "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore - + get_custom_model_copy_result.metadata = {"url": "/custom/models/{modelId}/copyResults/{resultId}"} # type: ignore @distributed_trace - def generate_model_copy_authorization( - self, - **kwargs: Any - ) -> _models.CopyAuthorizationResult: + def generate_model_copy_authorization(self, **kwargs: Any) -> _models.CopyAuthorizationResult: """Generate Copy Authorization. Generate authorization to copy a model into the target Form Recognizer resource. @@ -1416,32 +1183,27 @@ def generate_model_copy_authorization( :rtype: ~azure.ai.formrecognizer.v2_1.models.CopyAuthorizationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.CopyAuthorizationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.CopyAuthorizationResult] - request = build_generate_model_copy_authorization_request( - template_url=self.generate_model_copy_authorization.metadata['url'], + template_url=self.generate_model_copy_authorization.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1451,53 +1213,48 @@ def generate_model_copy_authorization( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize('CopyAuthorizationResult', pipeline_response) + deserialized = self._deserialize("CopyAuthorizationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - generate_model_copy_authorization.metadata = {'url': "/custom/models/copyAuthorization"} # type: ignore - + generate_model_copy_authorization.metadata = {"url": "/custom/models/copyAuthorization"} # type: ignore def _compose_custom_models_async_initial( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeRequest, - **kwargs: Any + self, compose_request: _models.ComposeRequest, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] - _json = self._serialize.body(compose_request, 'ComposeRequest') + _json = self._serialize.body(compose_request, "ComposeRequest") request = build_compose_custom_models_async_request_initial( content_type=content_type, json=_json, - template_url=self._compose_custom_models_async_initial.metadata['url'], + template_url=self._compose_custom_models_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1506,20 +1263,16 @@ def _compose_custom_models_async_initial( # pylint: disable=inconsistent-return raise HttpResponseError(response=response) response_headers = {} - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) - _compose_custom_models_async_initial.metadata = {'url': "/custom/models/compose"} # type: ignore - + _compose_custom_models_async_initial.metadata = {"url": "/custom/models/compose"} # type: ignore @distributed_trace def begin_compose_custom_models_async( # pylint: disable=inconsistent-return-statements - self, - compose_request: _models.ComposeRequest, - **kwargs: Any + self, compose_request: _models.ComposeRequest, **kwargs: Any ) -> LROPoller[None]: """Compose trained with labels models into one composed model. @@ -1544,53 +1297,50 @@ def begin_compose_custom_models_async( # pylint: disable=inconsistent-return-st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._compose_custom_models_async_initial( # type: ignore compose_request=compose_request, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_compose_custom_models_async.metadata = {'url': "/custom/models/compose"} # type: ignore + begin_compose_custom_models_async.metadata = {"url": "/custom/models/compose"} # type: ignore def _analyze_business_card_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1602,28 +1352,28 @@ def _analyze_business_card_async_initial( # pylint: disable=inconsistent-return content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_business_card_async_request_initial( @@ -1633,20 +1383,18 @@ def _analyze_business_card_async_initial( # pylint: disable=inconsistent-return include_text_details=include_text_details, locale=locale, pages=pages, - template_url=self._analyze_business_card_async_initial.metadata['url'], + template_url=self._analyze_business_card_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1655,14 +1403,12 @@ def _analyze_business_card_async_initial( # pylint: disable=inconsistent-return raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_business_card_async_initial.metadata = {'url': "/prebuilt/businessCard/analyze"} # type: ignore - + _analyze_business_card_async_initial.metadata = {"url": "/prebuilt/businessCard/analyze"} # type: ignore @distributed_trace def begin_analyze_business_card_async( # pylint: disable=inconsistent-return-statements @@ -1714,13 +1460,10 @@ def begin_analyze_business_card_async( # pylint: disable=inconsistent-return-st _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_business_card_async_initial( # type: ignore include_text_details=include_text_details, @@ -1728,48 +1471,42 @@ def begin_analyze_business_card_async( # pylint: disable=inconsistent-return-st pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_business_card_async.metadata = {'url': "/prebuilt/businessCard/analyze"} # type: ignore + begin_analyze_business_card_async.metadata = {"url": "/prebuilt/businessCard/analyze"} # type: ignore @distributed_trace - def get_analyze_business_card_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_business_card_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Business Card Result. Track the progress and obtain the result of the analyze business card operation. @@ -1781,33 +1518,28 @@ def get_analyze_business_card_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_business_card_result_request( result_id=result_id, - template_url=self.get_analyze_business_card_result.metadata['url'], + template_url=self.get_analyze_business_card_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1816,15 +1548,14 @@ def get_analyze_business_card_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_business_card_result.metadata = {'url': "/prebuilt/businessCard/analyzeResults/{resultId}"} # type: ignore - + get_analyze_business_card_result.metadata = {"url": "/prebuilt/businessCard/analyzeResults/{resultId}"} # type: ignore def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -1836,28 +1567,28 @@ def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return-state content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_invoice_async_request_initial( @@ -1867,20 +1598,18 @@ def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return-state include_text_details=include_text_details, locale=locale, pages=pages, - template_url=self._analyze_invoice_async_initial.metadata['url'], + template_url=self._analyze_invoice_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1889,14 +1618,12 @@ def _analyze_invoice_async_initial( # pylint: disable=inconsistent-return-state raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_invoice_async_initial.metadata = {'url': "/prebuilt/invoice/analyze"} # type: ignore - + _analyze_invoice_async_initial.metadata = {"url": "/prebuilt/invoice/analyze"} # type: ignore @distributed_trace def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-statements @@ -1948,13 +1675,10 @@ def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-statemen _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_invoice_async_initial( # type: ignore include_text_details=include_text_details, @@ -1962,48 +1686,42 @@ def begin_analyze_invoice_async( # pylint: disable=inconsistent-return-statemen pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_invoice_async.metadata = {'url': "/prebuilt/invoice/analyze"} # type: ignore + begin_analyze_invoice_async.metadata = {"url": "/prebuilt/invoice/analyze"} # type: ignore @distributed_trace - def get_analyze_invoice_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_invoice_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Invoice Result. Track the progress and obtain the result of the analyze invoice operation. @@ -2015,33 +1733,28 @@ def get_analyze_invoice_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_invoice_result_request( result_id=result_id, - template_url=self.get_analyze_invoice_result.metadata['url'], + template_url=self.get_analyze_invoice_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2050,15 +1763,14 @@ def get_analyze_invoice_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_invoice_result.metadata = {'url': "/prebuilt/invoice/analyzeResults/{resultId}"} # type: ignore - + get_analyze_invoice_result.metadata = {"url": "/prebuilt/invoice/analyzeResults/{resultId}"} # type: ignore def _analyze_id_document_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -2069,28 +1781,28 @@ def _analyze_id_document_async_initial( # pylint: disable=inconsistent-return-s content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_id_document_async_request_initial( @@ -2099,20 +1811,18 @@ def _analyze_id_document_async_initial( # pylint: disable=inconsistent-return-s content=_content, include_text_details=include_text_details, pages=pages, - template_url=self._analyze_id_document_async_initial.metadata['url'], + template_url=self._analyze_id_document_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2121,14 +1831,12 @@ def _analyze_id_document_async_initial( # pylint: disable=inconsistent-return-s raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_id_document_async_initial.metadata = {'url': "/prebuilt/idDocument/analyze"} # type: ignore - + _analyze_id_document_async_initial.metadata = {"url": "/prebuilt/idDocument/analyze"} # type: ignore @distributed_trace def begin_analyze_id_document_async( # pylint: disable=inconsistent-return-statements @@ -2176,61 +1884,52 @@ def begin_analyze_id_document_async( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_id_document_async_initial( # type: ignore include_text_details=include_text_details, pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_id_document_async.metadata = {'url': "/prebuilt/idDocument/analyze"} # type: ignore + begin_analyze_id_document_async.metadata = {"url": "/prebuilt/idDocument/analyze"} # type: ignore @distributed_trace - def get_analyze_id_document_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_id_document_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze ID Document Result. Track the progress and obtain the result of the analyze ID operation. @@ -2242,33 +1941,28 @@ def get_analyze_id_document_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_id_document_result_request( result_id=result_id, - template_url=self.get_analyze_id_document_result.metadata['url'], + template_url=self.get_analyze_id_document_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2277,15 +1971,14 @@ def get_analyze_id_document_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_id_document_result.metadata = {'url': "/prebuilt/idDocument/analyzeResults/{resultId}"} # type: ignore - + get_analyze_id_document_result.metadata = {"url": "/prebuilt/idDocument/analyzeResults/{resultId}"} # type: ignore def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -2297,28 +1990,28 @@ def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-state content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_receipt_async_request_initial( @@ -2328,20 +2021,18 @@ def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-state include_text_details=include_text_details, locale=locale, pages=pages, - template_url=self._analyze_receipt_async_initial.metadata['url'], + template_url=self._analyze_receipt_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2350,14 +2041,12 @@ def _analyze_receipt_async_initial( # pylint: disable=inconsistent-return-state raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_receipt_async_initial.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore - + _analyze_receipt_async_initial.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statements @@ -2409,13 +2098,10 @@ def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statemen _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_receipt_async_initial( # type: ignore include_text_details=include_text_details, @@ -2423,48 +2109,42 @@ def begin_analyze_receipt_async( # pylint: disable=inconsistent-return-statemen pages=pages, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_receipt_async.metadata = {'url': "/prebuilt/receipt/analyze"} # type: ignore + begin_analyze_receipt_async.metadata = {"url": "/prebuilt/receipt/analyze"} # type: ignore @distributed_trace - def get_analyze_receipt_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_receipt_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Receipt Result. Track the progress and obtain the result of the analyze receipt operation. @@ -2476,33 +2156,28 @@ def get_analyze_receipt_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_receipt_result_request( result_id=result_id, - template_url=self.get_analyze_receipt_result.metadata['url'], + template_url=self.get_analyze_receipt_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2511,15 +2186,14 @@ def get_analyze_receipt_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_receipt_result.metadata = {'url': "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore - + get_analyze_receipt_result.metadata = {"url": "/prebuilt/receipt/analyzeResults/{resultId}"} # type: ignore def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statements self, @@ -2531,28 +2205,28 @@ def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statem content_type: Optional[Union[str, "_models.ContentType"]] = "application/json", **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = None _content = None content_type = content_type or "" - if content_type.split(";")[0] in ['application/json']: + if content_type.split(";")[0] in ["application/json"]: if file_stream is not None: - _json = self._serialize.body(file_stream, 'SourcePath') - elif content_type.split(";")[0] in ['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff']: + _json = self._serialize.body(file_stream, "SourcePath") + elif content_type.split(";")[0] in ["application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff"]: _content = file_stream else: raise ValueError( "The content_type '{}' is not one of the allowed values: " - "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format(content_type) + "['application/pdf', 'image/bmp', 'image/jpeg', 'image/png', 'image/tiff', 'application/json']".format( + content_type + ) ) request = build_analyze_layout_async_request_initial( @@ -2562,20 +2236,18 @@ def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statem pages=pages, language=language, reading_order=reading_order, - template_url=self._analyze_layout_async_initial.metadata['url'], + template_url=self._analyze_layout_async_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2584,14 +2256,12 @@ def _analyze_layout_async_initial( # pylint: disable=inconsistent-return-statem raise HttpResponseError(response=response) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_layout_async_initial.metadata = {'url': "/layout/analyze"} # type: ignore - + _analyze_layout_async_initial.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statements @@ -2659,13 +2329,10 @@ def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_layout_async_initial( # type: ignore pages=pages, @@ -2673,48 +2340,42 @@ def begin_analyze_layout_async( # pylint: disable=inconsistent-return-statement reading_order=reading_order, file_stream=file_stream, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_layout_async.metadata = {'url': "/layout/analyze"} # type: ignore + begin_analyze_layout_async.metadata = {"url": "/layout/analyze"} # type: ignore @distributed_trace - def get_analyze_layout_result( - self, - result_id: str, - **kwargs: Any - ) -> _models.AnalyzeOperationResult: + def get_analyze_layout_result(self, result_id: str, **kwargs: Any) -> _models.AnalyzeOperationResult: """Get Analyze Layout Result. Track the progress and obtain the result of the analyze layout operation. @@ -2726,33 +2387,28 @@ def get_analyze_layout_result( :rtype: ~azure.ai.formrecognizer.v2_1.models.AnalyzeOperationResult :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeOperationResult] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeOperationResult] - request = build_get_analyze_layout_result_request( result_id=result_id, - template_url=self.get_analyze_layout_result.metadata['url'], + template_url=self.get_analyze_layout_result.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2761,21 +2417,17 @@ def get_analyze_layout_result( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeOperationResult', pipeline_response) + deserialized = self._deserialize("AnalyzeOperationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_layout_result.metadata = {'url': "/layout/analyzeResults/{resultId}"} # type: ignore - + get_analyze_layout_result.metadata = {"url": "/layout/analyzeResults/{resultId}"} # type: ignore @distributed_trace - def list_custom_models( - self, - **kwargs: Any - ) -> Iterable[_models.Models]: + def list_custom_models(self, **kwargs: Any) -> Iterable[_models.Models]: """List Custom Models. Get information about all custom models. @@ -2791,30 +2443,31 @@ def list_custom_models( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "full")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "full")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) def prepare_request(next_link=None): if not next_link: - + request = build_list_custom_models_request( op=op, - template_url=self.list_custom_models.metadata['url'], + template_url=self.list_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore else: - + request = build_list_custom_models_request( op=op, template_url=next_link, @@ -2823,12 +2476,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2844,9 +2501,7 @@ def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2857,17 +2512,12 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_custom_models.metadata = {'url': "/custom/models"} # type: ignore + list_custom_models.metadata = {"url": "/custom/models"} # type: ignore @distributed_trace - def get_custom_models( - self, - **kwargs: Any - ) -> _models.Models: + def get_custom_models(self, **kwargs: Any) -> _models.Models: """Get Custom Models. Get information about all custom models. @@ -2880,34 +2530,29 @@ def get_custom_models( :rtype: ~azure.ai.formrecognizer.v2_1.models.Models :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - op = kwargs.pop('op', _params.pop('op', "summary")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.Models] + op = kwargs.pop("op", _params.pop("op", "summary")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.Models] - request = build_get_custom_models_request( op=op, - template_url=self.get_custom_models.metadata['url'], + template_url=self.get_custom_models.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2916,12 +2561,11 @@ def get_custom_models( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('Models', pipeline_response) + deserialized = self._deserialize("Models", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_models.metadata = {'url': "/custom/models"} # type: ignore - + get_custom_models.metadata = {"url": "/custom/models"} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_patch.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_patch.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_1/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py index 9c6ffb2379f3..4839e0b68724 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py @@ -10,7 +10,6 @@ from azure.core.pipeline.transport import HttpTransport from azure.core.exceptions import HttpResponseError - POLLING_INTERVAL = 1 COGNITIVE_KEY_HEADER = "Ocp-Apim-Subscription-Key" @@ -145,13 +144,13 @@ def check_beginning_bytes(form): return "application/pdf" if form[:2] == b"\xff\xd8": return "image/jpeg" - if form[:4] == b"\x89\x50\x4E\x47": + if form[:4] == b"\x89\x50\x4e\x47": return "image/png" - if form[:4] == b"\x49\x49\x2A\x00": # little-endian + if form[:4] == b"\x49\x49\x2a\x00": # little-endian return "image/tiff" - if form[:4] == b"\x4D\x4D\x00\x2A": # big-endian + if form[:4] == b"\x4d\x4d\x00\x2a": # big-endian return "image/tiff" - if form[:2] == b"\x42\x4D": + if form[:2] == b"\x42\x4d": return "image/bmp" raise ValueError("Content type could not be auto-detected. Please pass the content_type keyword argument.") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py index 685f7416bd11..5c377d6297a5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py @@ -17,7 +17,7 @@ AzureBlobFileListContentSource, AzureBlobContentSource, ClassifierDocumentTypeDetails as GeneratedClassifierDocumentTypeDetails, - Error + Error, ) from ._helpers import ( adjust_value_type, @@ -27,19 +27,15 @@ _get_deserialize, ) +TargetAuthorization = NewType("TargetAuthorization", Dict[str, str]) -TargetAuthorization = NewType('TargetAuthorization', Dict[str, str]) def prepare_document_spans(spans): return [DocumentSpan._from_generated(span) for span in spans] if spans else [] def prepare_bounding_regions(regions): - return ( - [BoundingRegion._from_generated(region) for region in regions] - if regions - else [] - ) + return [BoundingRegion._from_generated(region) for region in regions] if regions else [] def get_bounding_box(field): @@ -57,10 +53,7 @@ def get_bounding_box(field): def get_polygon(field): return ( - [ - Point(x=field.polygon[point], y=field.polygon[point+1]) - for point in range(0, len(field.polygon), 2) - ] + [Point(x=field.polygon[point], y=field.polygon[point + 1]) for point in range(0, len(field.polygon), 2)] if field.polygon else [] ) @@ -77,9 +70,7 @@ def resolve_element(element, read_result): raise ValueError("Failed to parse element reference.") -def get_field_value( - field, value, read_result -): # pylint: disable=too-many-return-statements +def get_field_value(field, value, read_result): # pylint: disable=too-many-return-statements if value is None: return value if value.type == "string": @@ -96,19 +87,13 @@ def get_field_value( return value.value_time if value.type == "array": return ( - [ - FormField._from_generated(field, value, read_result) - for value in value.value_array - ] + [FormField._from_generated(field, value, read_result) for value in value.value_array] if value.value_array else [] ) if value.type == "object": return ( - { - key: FormField._from_generated(key, value, read_result) - for key, value in value.value_object.items() - } + {key: FormField._from_generated(key, value, read_result) for key, value in value.value_object.items()} if value.value_object else {} ) @@ -137,29 +122,14 @@ def get_field_value_v3(value): # pylint: disable=too-many-return-statements if value.type == "signature": return value.value_signature if value.type == "array": - return ( - [DocumentField._from_generated(value) for value in value.value_array] - if value.value_array - else [] - ) + return [DocumentField._from_generated(value) for value in value.value_array] if value.value_array else [] if value.type == "currency": - return ( - CurrencyValue._from_generated(value.value_currency) - if value.value_currency - else None - ) + return CurrencyValue._from_generated(value.value_currency) if value.value_currency else None if value.type == "address": - return ( - AddressValue._from_generated(value.value_address) - if value.value_address - else None - ) + return AddressValue._from_generated(value.value_address) if value.value_address else None if value.type == "object": return ( - { - key: DocumentField._from_generated(value) - for key, value in value.value_object.items() - } + {key: DocumentField._from_generated(value) for key, value in value.value_object.items()} if value.value_object else {} ) @@ -263,12 +233,12 @@ class Point(namedtuple("Point", "x y")): .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + x: float """x-coordinate""" y: float """y-coordinate""" - __slots__ = () def __new__(cls, x: float, y: float) -> "Point": @@ -299,6 +269,7 @@ class TextAppearance: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + style_name: str """The text line style name. Possible values include: "other", "handwriting".""" @@ -352,6 +323,7 @@ class FormPageRange(namedtuple("FormPageRange", "first_page_number last_page_num .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + first_page_number: int """The first page number of the form.""" last_page_number: int @@ -360,9 +332,7 @@ class FormPageRange(namedtuple("FormPageRange", "first_page_number last_page_num __slots__ = () def __new__(cls, first_page_number: int, last_page_number: int) -> "FormPageRange": - return super().__new__( - cls, first_page_number, last_page_number - ) + return super().__new__(cls, first_page_number, last_page_number) def to_dict(self) -> Dict: """Returns a dict representation of FormPageRange. @@ -395,6 +365,7 @@ class FormElement: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + text: str """The text content of the element.""" bounding_box: List[Point] @@ -409,7 +380,6 @@ class FormElement: correspond to a :class:`~azure.ai.formrecognizer.FormWord` :class:`~azure.ai.formrecognizer.FormLine`, or :class:`~azure.ai.formrecognizer.FormSelectionMark`, respectively.""" - def __init__(self, **kwargs: Any) -> None: self.bounding_box = kwargs.get("bounding_box", None) self.page_number = kwargs.get("page_number", None) @@ -424,9 +394,7 @@ def to_dict(self) -> Dict: """ return { "text": self.text, - "bounding_box": [f.to_dict() for f in self.bounding_box] - if self.bounding_box - else [], + "bounding_box": [f.to_dict() for f in self.bounding_box] if self.bounding_box else [], "page_number": self.page_number, "kind": self.kind, } @@ -443,9 +411,11 @@ def from_dict(cls, data: Dict) -> "FormElement": text=data.get("text", None), page_number=data.get("page_number", None), kind=data.get("kind", None), - bounding_box=[Point.from_dict(f) for f in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], + bounding_box=( + [Point.from_dict(f) for f in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), ) @@ -455,6 +425,7 @@ class FormWord(FormElement): .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + text: str """The text content of the word.""" bounding_box: List[Point] @@ -469,7 +440,6 @@ class FormWord(FormElement): kind: str """For FormWord, this is "word".""" - def __init__(self, **kwargs: Any) -> None: super().__init__(kind="word", **kwargs) self.confidence = kwargs.get("confidence", None) @@ -497,9 +467,7 @@ def to_dict(self) -> Dict: """ return { "text": self.text, - "bounding_box": [f.to_dict() for f in self.bounding_box] - if self.bounding_box - else [], + "bounding_box": [f.to_dict() for f in self.bounding_box] if self.bounding_box else [], "confidence": self.confidence, "page_number": self.page_number, "kind": self.kind, @@ -516,9 +484,11 @@ def from_dict(cls, data: Dict) -> "FormWord": return cls( text=data.get("text", None), page_number=data.get("page_number", None), - bounding_box=[Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], + bounding_box=( + [Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), confidence=data.get("confidence", None), ) @@ -529,6 +499,7 @@ class FormSelectionMark(FormElement): .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + text: str """The text content - not returned for FormSelectionMark.""" bounding_box: List[Point] @@ -574,9 +545,7 @@ def to_dict(self) -> Dict: """ return { "text": self.text, - "bounding_box": [f.to_dict() for f in self.bounding_box] - if self.bounding_box - else [], + "bounding_box": [f.to_dict() for f in self.bounding_box] if self.bounding_box else [], "confidence": self.confidence, "state": self.state, "page_number": self.page_number, @@ -594,9 +563,11 @@ def from_dict(cls, data: Dict) -> "FormSelectionMark": return cls( text=data.get("text", None), page_number=data.get("page_number", None), - bounding_box=[Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], + bounding_box=( + [Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), confidence=data.get("confidence", None), state=data.get("state", None), ) @@ -608,6 +579,7 @@ class FormLine(FormElement): .. versionadded:: v2.1 *appearance* property, support for *to_dict* and *from_dict* methods """ + text: str """The text content of the line.""" bounding_box: List[Point] @@ -624,7 +596,6 @@ class FormLine(FormElement): appearance: TextAppearance """An object representing the appearance of the line.""" - def __init__(self, **kwargs: Any) -> None: super().__init__(kind="line", **kwargs) self.words = kwargs.get("words", None) @@ -632,18 +603,12 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, line, page): - line_appearance = ( - TextAppearance._from_generated(line.appearance) - if hasattr(line, "appearance") - else None - ) + line_appearance = TextAppearance._from_generated(line.appearance) if hasattr(line, "appearance") else None return cls( text=line.text, bounding_box=get_bounding_box(line), page_number=page, - words=[FormWord._from_generated(word, page) for word in line.words] - if line.words - else None, + words=[FormWord._from_generated(word, page) for word in line.words] if line.words else None, appearance=line_appearance, ) @@ -661,9 +626,7 @@ def to_dict(self) -> Dict: """ return { "text": self.text, - "bounding_box": [f.to_dict() for f in self.bounding_box] - if self.bounding_box - else [], + "bounding_box": [f.to_dict() for f in self.bounding_box] if self.bounding_box else [], "words": [f.to_dict() for f in self.words] if self.words else [], "page_number": self.page_number, "kind": self.kind, @@ -681,15 +644,19 @@ def from_dict(cls, data: Dict) -> "FormLine": return cls( text=data.get("text", None), page_number=data.get("page_number", None), - bounding_box=[Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], - words=[FormWord.from_dict(v) for v in data.get("words")] # type: ignore - if len(data.get("words", [])) > 0 - else [], - appearance=TextAppearance.from_dict(data.get("appearance")) # type: ignore - if data.get("appearance") - else None, + bounding_box=( + [Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), + words=( + [FormWord.from_dict(v) for v in data.get("words")] # type: ignore + if len(data.get("words", [])) > 0 + else [] + ), + appearance=( + TextAppearance.from_dict(data.get("appearance")) if data.get("appearance") else None # type: ignore + ), ) @@ -700,6 +667,7 @@ class FormTableCell: # pylint:disable=too-many-instance-attributes *FormSelectionMark* is added to the types returned in the list of field_elements, support for *to_dict* and *from_dict* methods """ + text: str """Text content of the cell.""" row_index: int @@ -755,11 +723,9 @@ def _from_generated(cls, cell, page, read_result): is_header=cell.is_header or False, is_footer=cell.is_footer or False, page_number=page, - field_elements=[ - resolve_element(element, read_result) for element in cell.elements - ] - if cell.elements - else None, + field_elements=( + [resolve_element(element, read_result) for element in cell.elements] if cell.elements else None + ), ) def __repr__(self) -> str: @@ -786,12 +752,8 @@ def to_dict(self) -> Dict: "is_header": self.is_header, "is_footer": self.is_footer, "page_number": self.page_number, - "bounding_box": [box.to_dict() for box in self.bounding_box] - if self.bounding_box - else [], - "field_elements": [element.to_dict() for element in self.field_elements] - if self.field_elements - else [], + "bounding_box": [box.to_dict() for box in self.bounding_box] if self.bounding_box else [], + "field_elements": [element.to_dict() for element in self.field_elements] if self.field_elements else [], } @classmethod @@ -823,9 +785,11 @@ def from_dict(cls, data: Dict) -> "FormTableCell": is_header=data.get("is_header", None), is_footer=data.get("is_footer", None), page_number=data.get("page_number", None), - bounding_box=[Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], + bounding_box=( + [Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), field_elements=field_elements, ) @@ -836,6 +800,7 @@ class FormTable: .. versionadded:: v2.1 The *bounding_box* property, support for *to_dict* and *from_dict* methods """ + page_number: int """The 1-based number of the page in which this table is present.""" cells: List[FormTableCell] @@ -874,9 +839,7 @@ def to_dict(self) -> Dict: "row_count": self.row_count, "column_count": self.column_count, "cells": [cell.to_dict() for cell in self.cells], - "bounding_box": [box.to_dict() for box in self.bounding_box] - if self.bounding_box - else [], + "bounding_box": [box.to_dict() for box in self.bounding_box] if self.bounding_box else [], } @classmethod @@ -891,12 +854,16 @@ def from_dict(cls, data: Dict) -> "FormTable": row_count=data.get("row_count", None), page_number=data.get("page_number", None), column_count=data.get("column_count", None), - bounding_box=[Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], - cells=[FormTableCell.from_dict(v) for v in data.get("cells")] # type: ignore - if len(data.get("cells", [])) > 0 - else [], + bounding_box=( + [Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), + cells=( + [FormTableCell.from_dict(v) for v in data.get("cells")] # type: ignore + if len(data.get("cells", [])) > 0 + else [] + ), ) @@ -907,6 +874,7 @@ class FormPage: .. versionadded:: v2.1 *selection_marks* property, support for *to_dict* and *from_dict* methods """ + page_number: int """The 1-based number of the page in which this content is present.""" text_angle: float @@ -934,7 +902,6 @@ class FormPage: selection_marks: List[FormSelectionMark] """List of selection marks extracted from the page.""" - def __init__(self, **kwargs: Any) -> None: self.page_number = kwargs.get("page_number", None) self.text_angle = kwargs.get("text_angle", None) @@ -966,9 +933,7 @@ def to_dict(self) -> Dict: "unit": self.unit, "tables": [table.to_dict() for table in self.tables] if self.tables else [], "lines": [line.to_dict() for line in self.lines] if self.lines else [], - "selection_marks": [mark.to_dict() for mark in self.selection_marks] - if self.selection_marks - else [], + "selection_marks": [mark.to_dict() for mark in self.selection_marks] if self.selection_marks else [], } @classmethod @@ -985,17 +950,21 @@ def from_dict(cls, data: Dict) -> "FormPage": height=data.get("height", None), unit=data.get("unit", None), page_number=data.get("page_number", None), - tables=[FormTable.from_dict(v) for v in data.get("tables")] # type: ignore - if len(data.get("tables", [])) > 0 - else [], - lines=[FormLine.from_dict(v) for v in data.get("lines")] # type: ignore - if len(data.get("lines", [])) > 0 - else [], - selection_marks=[ - FormSelectionMark.from_dict(v) for v in data.get("selection_marks") # type: ignore - ] - if len(data.get("selection_marks", [])) > 0 - else [], + tables=( + [FormTable.from_dict(v) for v in data.get("tables")] # type: ignore + if len(data.get("tables", [])) > 0 + else [] + ), + lines=( + [FormLine.from_dict(v) for v in data.get("lines")] # type: ignore + if len(data.get("lines", [])) > 0 + else [] + ), + selection_marks=( + [FormSelectionMark.from_dict(v) for v in data.get("selection_marks")] # type: ignore + if len(data.get("selection_marks", [])) > 0 + else [] + ), ) @@ -1008,6 +977,7 @@ class FieldData: *FormSelectionMark* is added to the types returned in the list of field_elements, support for *to_dict* and *from_dict* methods """ + page_number: int """The 1-based number of the page in which this content is present.""" text: str @@ -1017,13 +987,11 @@ class FieldData: that outlines the text. The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left. Units are in pixels for images and inches for PDF.""" - field_elements: List[Union[FormElement, FormWord, - FormLine, FormSelectionMark]] + field_elements: List[Union[FormElement, FormWord, FormLine, FormSelectionMark]] """When `include_field_elements` is set to true, a list of elements constituting this field or value is returned. The list constitutes of elements such as lines, words, and selection marks.""" - def __init__(self, **kwargs: Any) -> None: self.page_number = kwargs.get("page_number", None) self.text = kwargs.get("text", None) @@ -1032,20 +1000,15 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, field, read_result): - if field is None or all( - field_data is None - for field_data in [field.page, field.text, field.bounding_box] - ): + if field is None or all(field_data is None for field_data in [field.page, field.text, field.bounding_box]): return None return cls( page_number=field.page, text=field.text, bounding_box=get_bounding_box(field), - field_elements=[ - resolve_element(element, read_result) for element in field.elements - ] - if field.elements - else None, + field_elements=( + [resolve_element(element, read_result) for element in field.elements] if field.elements else None + ), ) @classmethod @@ -1054,11 +1017,9 @@ def _from_generated_unlabeled(cls, field, page, read_result): page_number=page, text=field.text, bounding_box=get_bounding_box(field), - field_elements=[ - resolve_element(element, read_result) for element in field.elements - ] - if field.elements - else None, + field_elements=( + [resolve_element(element, read_result) for element in field.elements] if field.elements else None + ), ) def __repr__(self) -> str: @@ -1075,13 +1036,9 @@ def to_dict(self) -> Dict: """ return { "text": self.text, - "bounding_box": [f.to_dict() for f in self.bounding_box] - if self.bounding_box - else [], + "bounding_box": [f.to_dict() for f in self.bounding_box] if self.bounding_box else [], "page_number": self.page_number, - "field_elements": [f.to_dict() for f in self.field_elements] - if self.field_elements - else [], + "field_elements": [f.to_dict() for f in self.field_elements] if self.field_elements else [], } @classmethod @@ -1106,9 +1063,11 @@ def from_dict(cls, data: Dict) -> "FieldData": return cls( text=data.get("text", None), page_number=data.get("page_number", None), - bounding_box=[Point.from_dict(f) for f in data.get("bounding_box")] # type: ignore - if len(data.get("bounding_box", [])) > 0 - else [], + bounding_box=( + [Point.from_dict(f) for f in data.get("bounding_box")] # type: ignore + if len(data.get("bounding_box", [])) > 0 + else [] + ), field_elements=field_elements, ) @@ -1119,7 +1078,8 @@ class FormField: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ - value_type: str + + value_type: str """The type of `value` found on FormField. Described in :class:`~azure.ai.formrecognizer.FieldValueType`, possible types include: 'string', 'date', 'time', 'phoneNumber', 'float', 'integer', 'dictionary', 'list', 'selectionMark', @@ -1132,15 +1092,13 @@ class FormField: name: str """The unique name of the field or the training-time label if analyzed from a custom model that was trained with labels.""" - value: Union[str, int, float, datetime.date, datetime.time, - Dict[str, "FormField"], List["FormField"]] + value: Union[str, int, float, datetime.date, datetime.time, Dict[str, "FormField"], List["FormField"]] """The value for the recognized field. Its semantic data type is described by `value_type`. If the value is extracted from the form, but cannot be normalized to its type, then access the `value_data.text` property for a textual representation of the value.""" confidence: float """Measures the degree of certainty of the recognition result. Value is between [0.0, 1.0].""" - def __init__(self, **kwargs: Any) -> None: self.value_type = kwargs.get("value_type", None) self.label_data = kwargs.get("label_data", None) @@ -1164,12 +1122,8 @@ def _from_generated(cls, field, value, read_result): def _from_generated_unlabeled(cls, field, idx, page, read_result): return cls( value_type="string", # unlabeled only returns string - label_data=FieldData._from_generated_unlabeled( - field.key, page, read_result - ), - value_data=FieldData._from_generated_unlabeled( - field.value, page, read_result - ), + label_data=FieldData._from_generated_unlabeled(field.key, page, read_result), + value_data=FieldData._from_generated_unlabeled(field.value, page, read_result), value=field.value.text, name="field-" + str(idx), confidence=adjust_confidence(field.confidence), @@ -1177,10 +1131,10 @@ def _from_generated_unlabeled(cls, field, idx, page, read_result): def __repr__(self) -> str: return ( - f"FormField(value_type={self.value_type}, label_data={repr(self.label_data)}, " - f"value_data={repr(self.value_data)}, name={self.name}, value={repr(self.value)}, " - f"confidence={self.confidence})" - )[:1024] + f"FormField(value_type={self.value_type}, label_data={repr(self.label_data)}, " + f"value_data={repr(self.value_data)}, name={self.name}, value={repr(self.value)}, " + f"confidence={self.confidence})" + )[:1024] def to_dict(self) -> Dict: """Returns a dict representation of FormField. @@ -1221,12 +1175,8 @@ def from_dict(cls, data: Dict) -> "FormField": name=data.get("name", None), value=value, confidence=data.get("confidence", None), - label_data=FieldData.from_dict(data.get("label_data")) # type: ignore - if data.get("label_data") - else None, - value_data=FieldData.from_dict(data.get("value_data")) # type: ignore - if data.get("value_data") - else None, + label_data=FieldData.from_dict(data.get("label_data")) if data.get("label_data") else None, # type: ignore + value_data=FieldData.from_dict(data.get("value_data")) if data.get("value_data") else None, # type: ignore ) @@ -1240,6 +1190,7 @@ class RecognizedForm: The *form_type_confidence* and *model_id* properties, support for *to_dict* and *from_dict* methods """ + form_type: str """The type of form the model identified the submitted form to be.""" form_type_confidence: int @@ -1258,7 +1209,6 @@ class RecognizedForm: """A list of pages recognized from the input document. Contains lines, words, selection marks, tables and page metadata.""" - def __init__(self, **kwargs: Any) -> None: self.fields = kwargs.get("fields", None) self.form_type = kwargs.get("form_type", None) @@ -1272,7 +1222,7 @@ def __repr__(self) -> str: f"RecognizedForm(form_type={self.form_type}, fields={repr(self.fields)}, " f"page_range={repr(self.page_range)}, pages={repr(self.pages)}, " f"form_type_confidence={self.form_type_confidence}, model_id={self.model_id})" - )[:1024] + )[:1024] def to_dict(self) -> Dict: """Returns a dict representation of RecognizedForm. @@ -1281,9 +1231,7 @@ def to_dict(self) -> Dict: :rtype: dict """ return { - "fields": {k: v.to_dict() for k, v in self.fields.items()} - if self.fields - else {}, + "fields": {k: v.to_dict() for k, v in self.fields.items()} if self.fields else {}, "form_type": self.form_type, "pages": [v.to_dict() for v in self.pages] if self.pages else [], "model_id": self.model_id, @@ -1300,18 +1248,22 @@ def from_dict(cls, data: Dict) -> "RecognizedForm": :rtype: RecognizedForm """ return cls( - fields={k: FormField.from_dict(v) for k, v in data.get("fields").items()} # type: ignore - if data.get("fields") - else {}, + fields=( + {k: FormField.from_dict(v) for k, v in data.get("fields").items()} # type: ignore + if data.get("fields") + else {} + ), form_type=data.get("form_type", None), - pages=[FormPage.from_dict(v) for v in data.get("pages")] # type: ignore - if len(data.get("pages", [])) > 0 - else [], + pages=( + [FormPage.from_dict(v) for v in data.get("pages")] # type: ignore + if len(data.get("pages", [])) > 0 + else [] + ), model_id=data.get("model_id", None), form_type_confidence=data.get("form_type_confidence", None), - page_range=FormPageRange.from_dict(data.get("page_range")) # type: ignore - if data.get("page_range") - else None, + page_range=( + FormPageRange.from_dict(data.get("page_range")) if data.get("page_range") else None # type: ignore + ), ) @@ -1321,6 +1273,7 @@ class FormRecognizerError: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + code: str """Error code.""" message: str @@ -1332,11 +1285,7 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, err): - return ( - [cls(code=error.code, message=error.message) for error in err] - if err - else [] - ) + return [cls(code=error.code, message=error.message) for error in err] if err else [] def __repr__(self) -> str: return f"FormRecognizerError(code={self.code}, message={self.message})"[:1024] @@ -1369,6 +1318,7 @@ class CustomFormModelField: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + label: str """The form fields label on the form.""" name: str @@ -1428,6 +1378,7 @@ class TrainingDocumentInfo: .. versionadded:: v2.1 The *model_id* property, support for *to_dict* and *from_dict* methods """ + name: str """The name of the document.""" status: str @@ -1457,9 +1408,7 @@ def _from_generated(cls, train_result): status=doc.status, page_count=doc.pages, errors=FormRecognizerError._from_generated(doc.errors), - model_id=train_result.model_id - if hasattr(train_result, "model_id") - else None, + model_id=train_result.model_id if hasattr(train_result, "model_id") else None, ) for doc in train_result.training_documents ] @@ -1515,9 +1464,7 @@ def from_dict(cls, data: Dict) -> "TrainingDocumentInfo": name=data.get("name", None), status=data.get("status", None), page_count=data.get("page_count", None), - errors=[ - FormRecognizerError.from_dict(v) for v in data.get("errors") # type: ignore - ], + errors=[FormRecognizerError.from_dict(v) for v in data.get("errors")], # type: ignore model_id=data.get("model_id", None), ) @@ -1528,6 +1475,7 @@ class AccountProperties: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + custom_model_count: int """Current count of trained custom models.""" custom_model_limit: int @@ -1581,6 +1529,7 @@ class CustomFormModelProperties: .. versionadded:: v2.1 Support for *to_dict* and *from_dict* methods """ + is_composed_model: bool """Is this model composed? (default: false).""" @@ -1623,6 +1572,7 @@ class CustomFormModelInfo: .. versionadded:: v2.1 The *model_name* and *properties* properties, support for *to_dict* and *from_dict* methods """ + model_id: str """The unique identifier of the model.""" status: str @@ -1704,9 +1654,11 @@ def from_dict(cls, data: Dict) -> "CustomFormModelInfo": training_started_on=data.get("training_started_on", None), training_completed_on=data.get("training_completed_on", None), model_name=data.get("model_name", None), - properties=CustomFormModelProperties.from_dict(data.get("properties")) # type: ignore - if data.get("properties") - else None, + properties=( + CustomFormModelProperties.from_dict(data.get("properties")) # type: ignore + if data.get("properties") + else None + ), ) @@ -1716,6 +1668,7 @@ class CustomFormSubmodel: .. versionadded:: v2.1 The *model_id* property, support for *to_dict* and *from_dict* methods """ + model_id: str """Model identifier of the submodel.""" accuracy: float @@ -1761,14 +1714,14 @@ def _from_generated_labeled(cls, model, api_version, model_name): cls( model_id=model.model_info.model_id, accuracy=model.train_result.average_model_accuracy, - fields={ - field.field_name: CustomFormModelField._from_generated_labeled( - field - ) - for field in model.train_result.fields - } - if model.train_result.fields - else None, + fields=( + { + field.field_name: CustomFormModelField._from_generated_labeled(field) + for field in model.train_result.fields + } + if model.train_result.fields + else None + ), form_type=form_type, ) ] @@ -1781,14 +1734,14 @@ def _from_generated_composed(cls, model): return [ cls( accuracy=train_result.average_model_accuracy, - fields={ - field.field_name: CustomFormModelField._from_generated_labeled( - field - ) - for field in train_result.fields - } - if train_result.fields - else None, + fields=( + { + field.field_name: CustomFormModelField._from_generated_labeled(field) + for field in train_result.fields + } + if train_result.fields + else None + ), form_type="custom:" + train_result.model_id, model_id=train_result.model_id, ) @@ -1810,9 +1763,7 @@ def to_dict(self) -> Dict: return { "model_id": self.model_id, "accuracy": self.accuracy, - "fields": {k: v.to_dict() for k, v in self.fields.items()} - if self.fields - else {}, + "fields": {k: v.to_dict() for k, v in self.fields.items()} if self.fields else {}, "form_type": self.form_type, } @@ -1827,9 +1778,11 @@ def from_dict(cls, data: Dict) -> "CustomFormSubmodel": return cls( model_id=data.get("model_id", None), accuracy=data.get("accuracy", None), - fields={k: CustomFormModelField.from_dict(v) for k, v in data.get("fields").items()} # type: ignore - if data.get("fields") - else {}, + fields=( + {k: CustomFormModelField.from_dict(v) for k, v in data.get("fields").items()} # type: ignore + if data.get("fields") + else {} + ), form_type=data.get("form_type", None), ) @@ -1840,6 +1793,7 @@ class CustomFormModel: .. versionadded:: v2.1 The *model_name* and *properties* properties, support for *to_dict* and *from_dict* methods """ + model_id: str """The unique identifier of this model.""" status: str @@ -1875,11 +1829,7 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, model, api_version): - model_name = ( - model.model_info.model_name - if hasattr(model.model_info, "model_name") - else None - ) + model_name = model.model_info.model_name if hasattr(model.model_info, "model_name") else None properties = ( CustomFormModelProperties._from_generated(model.model_info) if hasattr(model.model_info, "attributes") @@ -1890,17 +1840,13 @@ def _from_generated(cls, model, api_version): status=model.model_info.status, training_started_on=model.model_info.created_date_time, training_completed_on=model.model_info.last_updated_date_time, - submodels=CustomFormSubmodel._from_generated_unlabeled(model) - if model.keys - else CustomFormSubmodel._from_generated_labeled( - model, api_version, model_name=model_name + submodels=( + CustomFormSubmodel._from_generated_unlabeled(model) + if model.keys + else CustomFormSubmodel._from_generated_labeled(model, api_version, model_name=model_name) ), - errors=FormRecognizerError._from_generated(model.train_result.errors) - if model.train_result - else None, - training_documents=TrainingDocumentInfo._from_generated(model.train_result) - if model.train_result - else None, + errors=FormRecognizerError._from_generated(model.train_result.errors) if model.train_result else None, + training_documents=TrainingDocumentInfo._from_generated(model.train_result) if model.train_result else None, properties=properties, model_name=model_name, ) @@ -1938,13 +1884,9 @@ def to_dict(self) -> Dict: "status": self.status, "training_started_on": self.training_started_on, "training_completed_on": self.training_completed_on, - "submodels": [submodel.to_dict() for submodel in self.submodels] - if self.submodels - else [], + "submodels": [submodel.to_dict() for submodel in self.submodels] if self.submodels else [], "errors": [err.to_dict() for err in self.errors] if self.errors else [], - "training_documents": [doc.to_dict() for doc in self.training_documents] - if self.training_documents - else [], + "training_documents": [doc.to_dict() for doc in self.training_documents] if self.training_documents else [], "model_name": self.model_name, "properties": self.properties.to_dict() if self.properties else None, } @@ -1962,21 +1904,27 @@ def from_dict(cls, data: Dict) -> "CustomFormModel": status=data.get("status", None), training_started_on=data.get("training_started_on", None), training_completed_on=data.get("training_completed_on", None), - submodels=[CustomFormSubmodel.from_dict(v) for v in data.get("submodels")] # type: ignore - if len(data.get("submodels", [])) > 0 - else [], - errors=[FormRecognizerError.from_dict(v) for v in data.get("errors")] # type: ignore - if len(data.get("errors", [])) > 0 - else [], - training_documents=[ - TrainingDocumentInfo.from_dict(v) for v in data.get("training_documents") # type: ignore - ] - if len(data.get("training_documents", [])) > 0 - else [], + submodels=( + [CustomFormSubmodel.from_dict(v) for v in data.get("submodels")] # type: ignore + if len(data.get("submodels", [])) > 0 + else [] + ), + errors=( + [FormRecognizerError.from_dict(v) for v in data.get("errors")] # type: ignore + if len(data.get("errors", [])) > 0 + else [] + ), + training_documents=( + [TrainingDocumentInfo.from_dict(v) for v in data.get("training_documents")] # type: ignore + if len(data.get("training_documents", [])) > 0 + else [] + ), model_name=data.get("model_name", None), - properties=CustomFormModelProperties.from_dict(data.get("properties")) # type: ignore - if data.get("properties") - else None, + properties=( + CustomFormModelProperties.from_dict(data.get("properties")) # type: ignore + if data.get("properties") + else None + ), ) @@ -2063,9 +2011,7 @@ def to_dict(self) -> Dict: """ return { "page_number": self.page_number, - "polygon": [f.to_dict() for f in self.polygon] - if self.polygon - else [], + "polygon": [f.to_dict() for f in self.polygon] if self.polygon else [], } @classmethod @@ -2078,9 +2024,11 @@ def from_dict(cls, data: Dict) -> "BoundingRegion": """ return cls( page_number=data.get("page_number", None), - polygon=[Point.from_dict(v) for v in data.get("polygon")] # type: ignore - if len(data.get("polygon", [])) > 0 - else [], + polygon=( + [Point.from_dict(v) for v in data.get("polygon")] # type: ignore + if len(data.get("polygon", [])) > 0 + else [] + ), ) @@ -2161,7 +2109,7 @@ def _from_generated(cls, data): state_district=state_district, suburb=suburb, house=house, - level=level + level=level, ) def __repr__(self) -> str: @@ -2218,7 +2166,7 @@ def from_dict(cls, data: Dict) -> "AddressValue": state_district=data.get("state_district", None), suburb=data.get("suburb", None), house=data.get("house", None), - level=data.get("level", None) + level=data.get("level", None), ) @@ -2244,11 +2192,7 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, data): currency_code = data.currency_code if hasattr(data, "currency_code") else None - return cls( - amount=data.amount, - symbol=data.currency_symbol, - code=currency_code - ) + return cls(amount=data.amount, symbol=data.currency_symbol, code=currency_code) def __str__(self): if self.symbol is not None: @@ -2321,9 +2265,7 @@ def to_dict(self) -> Dict: """ return { "locale": self.locale, - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], "confidence": self.confidence, } @@ -2337,9 +2279,11 @@ def from_dict(cls, data: Dict) -> "DocumentLanguage": """ return cls( locale=data.get("locale", None), - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), confidence=data.get("confidence", None), ) @@ -2355,8 +2299,20 @@ class DocumentField: """The type of `value` found on DocumentField. Possible types include: "string", "date", "time", "phoneNumber", "float", "integer", "selectionMark", "countryRegion", "signature", "currency", "address", "boolean", "list", "dictionary".""" - value: Optional[Union[str, int, float, bool, datetime.date, datetime.time, - CurrencyValue, AddressValue, Dict[str, "DocumentField"], List["DocumentField"]]] + value: Optional[ + Union[ + str, + int, + float, + bool, + datetime.date, + datetime.time, + CurrencyValue, + AddressValue, + Dict[str, "DocumentField"], + List["DocumentField"], + ] + ] """The value for the recognized field. Its semantic data type is described by `value_type`. If the value is extracted from the document, but cannot be normalized to its type, then access the `content` property for a textual representation of the value.""" @@ -2385,24 +2341,28 @@ def _from_generated(cls, field): value=get_field_value_v3(field), value_type=adjust_value_type(field.type) if field.type else None, content=field.content if field.content else None, - bounding_regions=[ - BoundingRegion( - page_number=region.page_number, - polygon=get_polygon(region), - ) - for region in field.bounding_regions - ] - if field.bounding_regions - else [], - spans=[ - DocumentSpan( - offset=span.offset, - length=span.length, - ) - for span in field.spans - ] - if field.spans - else [], + bounding_regions=( + [ + BoundingRegion( + page_number=region.page_number, + polygon=get_polygon(region), + ) + for region in field.bounding_regions + ] + if field.bounding_regions + else [] + ), + spans=( + [ + DocumentSpan( + offset=span.offset, + length=span.length, + ) + for span in field.spans + ] + if field.spans + else [] + ), confidence=field.confidence if field.confidence else None, ) @@ -2437,12 +2397,8 @@ def to_dict(self) -> Dict: "value_type": self.value_type, "value": value, "content": self.content, - "bounding_regions": [f.to_dict() for f in self.bounding_regions] - if self.bounding_regions - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "bounding_regions": [f.to_dict() for f in self.bounding_regions] if self.bounding_regions else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], "confidence": self.confidence, } @@ -2460,12 +2416,12 @@ def from_dict(cls, data: Dict) -> "DocumentField": # to call the proper from_dict() method. if data.get("value_type", None) == "currency": if value is not None: - value = CurrencyValue.from_dict(data.get("value")) #type: ignore + value = CurrencyValue.from_dict(data.get("value")) # type: ignore # AddressValue objects are interpreted as dict, therefore need to be processed first # to call the proper from_dict() method. elif data.get("value_type", None) == "address": if value is not None: - value = AddressValue.from_dict(data.get("value")) #type: ignore + value = AddressValue.from_dict(data.get("value")) # type: ignore elif isinstance(data.get("value"), dict): value = {k: DocumentField.from_dict(v) for k, v in data.get("value").items()} # type: ignore elif isinstance(data.get("value"), list): @@ -2475,12 +2431,16 @@ def from_dict(cls, data: Dict) -> "DocumentField": value_type=data.get("value_type", None), value=value, content=data.get("content", None), - bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore - if len(data.get("bounding_regions", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + bounding_regions=( + [BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore + if len(data.get("bounding_regions", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), confidence=data.get("confidence", None), ) @@ -2512,12 +2472,11 @@ def _from_generated(cls, document): doc_type=document.doc_type, bounding_regions=prepare_bounding_regions(document.bounding_regions), spans=prepare_document_spans(document.spans), - fields={ - key: DocumentField._from_generated(field) - for key, field in document.fields.items() - } - if document.fields - else {}, + fields=( + {key: DocumentField._from_generated(field) for key, field in document.fields.items()} + if document.fields + else {} + ), confidence=document.confidence, ) @@ -2535,15 +2494,9 @@ def to_dict(self) -> Dict: """ return { "doc_type": self.doc_type, - "bounding_regions": [f.to_dict() for f in self.bounding_regions] - if self.bounding_regions - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], - "fields": {k: v.to_dict() for k, v in self.fields.items()} - if self.fields - else {}, + "bounding_regions": [f.to_dict() for f in self.bounding_regions] if self.bounding_regions else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], + "fields": {k: v.to_dict() for k, v in self.fields.items()} if self.fields else {}, "confidence": self.confidence, } @@ -2557,15 +2510,21 @@ def from_dict(cls, data: Dict) -> "AnalyzedDocument": """ return cls( doc_type=data.get("doc_type", None), - bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore - if len(data.get("bounding_regions", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], - fields={k: DocumentField.from_dict(v) for k, v in data.get("fields").items()} # type: ignore - if data.get("fields") - else {}, + bounding_regions=( + [BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore + if len(data.get("bounding_regions", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), + fields=( + {k: DocumentField.from_dict(v) for k, v in data.get("fields").items()} # type: ignore + if data.get("fields") + else {} + ), confidence=data.get("confidence", None), ) @@ -2590,15 +2549,12 @@ def __init__(self, **kwargs: Any) -> None: def _from_generated(cls, element): return cls( content=element.content, - bounding_regions=[ - BoundingRegion._from_generated(region) - for region in element.bounding_regions - ] - if element.bounding_regions - else [], - spans=[DocumentSpan._from_generated(span) for span in element.spans] - if element.spans - else [], + bounding_regions=( + [BoundingRegion._from_generated(region) for region in element.bounding_regions] + if element.bounding_regions + else [] + ), + spans=[DocumentSpan._from_generated(span) for span in element.spans] if element.spans else [], ) def __repr__(self) -> str: @@ -2615,12 +2571,8 @@ def to_dict(self) -> Dict: """ return { "content": self.content, - "bounding_regions": [f.to_dict() for f in self.bounding_regions] - if self.bounding_regions - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "bounding_regions": [f.to_dict() for f in self.bounding_regions] if self.bounding_regions else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], } @classmethod @@ -2633,12 +2585,16 @@ def from_dict(cls, data: Dict) -> "DocumentKeyValueElement": """ return cls( content=data.get("content", None), - bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore - if len(data.get("bounding_regions", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + bounding_regions=( + [BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore + if len(data.get("bounding_regions", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), ) @@ -2660,20 +2616,13 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, key_value_pair): return cls( - key=DocumentKeyValueElement._from_generated(key_value_pair.key) - if key_value_pair.key - else None, - value=DocumentKeyValueElement._from_generated(key_value_pair.value) - if key_value_pair.value - else None, + key=DocumentKeyValueElement._from_generated(key_value_pair.key) if key_value_pair.key else None, + value=DocumentKeyValueElement._from_generated(key_value_pair.value) if key_value_pair.value else None, confidence=key_value_pair.confidence, ) def __repr__(self) -> str: - return ( - f"DocumentKeyValuePair(key={repr(self.key)}, value={repr(self.value)}, " - f"confidence={self.confidence})" - ) + return f"DocumentKeyValuePair(key={repr(self.key)}, value={repr(self.value)}, " f"confidence={self.confidence})" def to_dict(self) -> Dict: """Returns a dict representation of DocumentKeyValuePair. @@ -2696,12 +2645,8 @@ def from_dict(cls, data: Dict) -> "DocumentKeyValuePair": :rtype: DocumentKeyValuePair """ return cls( - key=DocumentKeyValueElement.from_dict(data.get("key")) # type: ignore - if data.get("key") - else None, - value=DocumentKeyValueElement.from_dict(data.get("value")) # type: ignore - if data.get("value") - else None, + key=DocumentKeyValueElement.from_dict(data.get("key")) if data.get("key") else None, # type: ignore + value=DocumentKeyValueElement.from_dict(data.get("value")) if data.get("value") else None, # type: ignore confidence=data.get("confidence", None), ) @@ -2710,6 +2655,7 @@ class DocumentWord: """A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word. """ + content: str """Text content of the word.""" polygon: Sequence[Point] @@ -2730,9 +2676,7 @@ def _from_generated(cls, word): return cls( content=word.content, polygon=get_polygon(word), - span=DocumentSpan._from_generated(word.span) - if word.span - else None, + span=DocumentSpan._from_generated(word.span) if word.span else None, confidence=word.confidence, ) @@ -2750,9 +2694,7 @@ def to_dict(self) -> Dict: """ return { "content": self.content, - "polygon": [f.to_dict() for f in self.polygon] - if self.polygon - else [], + "polygon": [f.to_dict() for f in self.polygon] if self.polygon else [], "span": self.span.to_dict() if self.span else None, "confidence": self.confidence, } @@ -2767,9 +2709,11 @@ def from_dict(cls, data: Dict) -> "DocumentWord": """ return cls( content=data.get("content", None), - polygon=[Point.from_dict(v) for v in data.get("polygon")] # type: ignore - if len(data.get("polygon", [])) > 0 - else [], + polygon=( + [Point.from_dict(v) for v in data.get("polygon")] # type: ignore + if len(data.get("polygon", [])) > 0 + else [] + ), span=DocumentSpan.from_dict(data.get("span")) if data.get("span") else None, # type: ignore confidence=data.get("confidence", None), ) @@ -2800,9 +2744,7 @@ def _from_generated(cls, mark): return cls( state=mark.state, polygon=get_polygon(mark), - span=DocumentSpan._from_generated(mark.span) - if mark.span - else None, + span=DocumentSpan._from_generated(mark.span) if mark.span else None, confidence=mark.confidence, ) @@ -2820,9 +2762,7 @@ def to_dict(self) -> Dict: """ return { "state": self.state, - "polygon": [f.to_dict() for f in self.polygon] - if self.polygon - else [], + "polygon": [f.to_dict() for f in self.polygon] if self.polygon else [], "span": self.span.to_dict() if self.span else None, "confidence": self.confidence, } @@ -2837,9 +2777,11 @@ def from_dict(cls, data: Dict) -> "DocumentSelectionMark": """ return cls( state=data.get("state", None), - polygon=[Point.from_dict(v) for v in data.get("polygon")] # type: ignore - if len(data.get("polygon", [])) > 0 - else [], + polygon=( + [Point.from_dict(v) for v in data.get("polygon")] # type: ignore + if len(data.get("polygon", [])) > 0 + else [] + ), span=DocumentSpan.from_dict(data.get("span")) if data.get("span") else None, # type: ignore confidence=data.get("confidence", None), ) @@ -2881,12 +2823,8 @@ def to_dict(self) -> Dict: """ return { "content": self.content, - "polygon": [f.to_dict() for f in self.polygon] - if self.polygon - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "polygon": [f.to_dict() for f in self.polygon] if self.polygon else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], } @classmethod @@ -2899,12 +2837,16 @@ def from_dict(cls, data: Dict) -> "DocumentLine": """ return cls( content=data.get("content", None), - polygon=[Point.from_dict(v) for v in data.get("polygon")] # type: ignore - if len(data.get("polygon", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + polygon=( + [Point.from_dict(v) for v in data.get("polygon")] # type: ignore + if len(data.get("polygon", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), ) def get_words(self) -> Iterable["DocumentWord"]: @@ -2917,7 +2859,7 @@ def get_words(self) -> Iterable["DocumentWord"]: raise ValueError( "Cannot use get_words() on a model that has been converted from a dictionary. " "Missing reference to parent element." - ) + ) result = [] for word in self._parent.words: if _in_span(word, self.spans): @@ -2972,12 +2914,8 @@ def to_dict(self) -> Dict: return { "role": self.role, "content": self.content, - "bounding_regions": [f.to_dict() for f in self.bounding_regions] - if self.bounding_regions - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "bounding_regions": [f.to_dict() for f in self.bounding_regions] if self.bounding_regions else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], } @classmethod @@ -2991,21 +2929,41 @@ def from_dict(cls, data: Dict) -> "DocumentParagraph": return cls( role=data.get("role", None), content=data.get("content", None), - bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore - if len(data.get("bounding_regions", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + bounding_regions=( + [BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore + if len(data.get("bounding_regions", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), ) class DocumentBarcode: """A barcode object.""" - kind: Literal["QRCode", "PDF417", "UPCA", "UPCE", "Code39", "Code128", "EAN8", "EAN13", - "DataBar", "Code93", "Codabar", "DataBarExpanded", "ITF", "MicroQRCode", - "Aztec", "DataMatrix", "MaxiCode"] + kind: Literal[ + "QRCode", + "PDF417", + "UPCA", + "UPCE", + "Code39", + "Code128", + "EAN8", + "EAN13", + "DataBar", + "Code93", + "Codabar", + "DataBarExpanded", + "ITF", + "MicroQRCode", + "Aztec", + "DataMatrix", + "MaxiCode", + ] """Barcode kind. Known values are "QRCode", "PDF417", "UPCA", "UPCE", "Code39", "Code128", "EAN8", "EAN13", "DataBar", "Code93", "Codabar", "DataBarExpanded", "ITF", "MicroQRCode", "Aztec", "DataMatrix", "MaxiCode".""" @@ -3018,10 +2976,7 @@ class DocumentBarcode: confidence: float """Confidence of correctly extracting the barcode.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.kind = kwargs.get("kind", None) self.value = kwargs.get("value", None) self.polygon = kwargs.get("polygon", None) @@ -3033,11 +2988,9 @@ def _from_generated(cls, barcode): return cls( kind=barcode.kind, value=barcode.value, - span=DocumentSpan._from_generated(barcode.span) - if barcode.span - else None, + span=DocumentSpan._from_generated(barcode.span) if barcode.span else None, polygon=get_polygon(barcode) if barcode.polygon else [], - confidence=barcode.confidence + confidence=barcode.confidence, ) def __repr__(self) -> str: @@ -3054,9 +3007,7 @@ def to_dict(self) -> Dict[str, Any]: """ return { "kind": self.kind, - "polygon": [f.to_dict() for f in self.polygon] - if self.polygon - else [], + "polygon": [f.to_dict() for f in self.polygon] if self.polygon else [], "confidence": self.confidence, "span": self.span.to_dict() if self.span else None, "value": self.value, @@ -3072,9 +3023,11 @@ def from_dict(cls, data: Dict[str, Any]) -> "DocumentBarcode": """ return cls( kind=data.get("kind", None), - polygon=[Point.from_dict(v) for v in data.get("polygon")] # type: ignore - if len(data.get("polygon", [])) > 0 - else [], + polygon=( + [Point.from_dict(v) for v in data.get("polygon")] # type: ignore + if len(data.get("polygon", [])) > 0 + else [] + ), confidence=data.get("confidence", None), span=DocumentSpan.from_dict(data.get("span")) if data.get("span") else None, # type: ignore value=data.get("value", None), @@ -3095,10 +3048,7 @@ class DocumentFormula: confidence: float """Confidence of correctly extracting the formula.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.kind = kwargs.get("kind", None) self.value = kwargs.get("value", None) self.polygon = kwargs.get("polygon", None) @@ -3110,11 +3060,9 @@ def _from_generated(cls, formula): return cls( kind=formula.kind, value=formula.value, - span=DocumentSpan._from_generated(formula.span) - if formula.span - else None, + span=DocumentSpan._from_generated(formula.span) if formula.span else None, polygon=get_polygon(formula) if formula.polygon else [], - confidence=formula.confidence + confidence=formula.confidence, ) def __repr__(self) -> str: @@ -3131,9 +3079,7 @@ def to_dict(self) -> Dict[str, Any]: """ return { "kind": self.kind, - "polygon": [f.to_dict() for f in self.polygon] - if self.polygon - else [], + "polygon": [f.to_dict() for f in self.polygon] if self.polygon else [], "confidence": self.confidence, "span": self.span.to_dict() if self.span else None, "value": self.value, @@ -3149,9 +3095,11 @@ def from_dict(cls, data: Dict[str, Any]) -> "DocumentFormula": """ return cls( kind=data.get("kind", None), - polygon=[Point.from_dict(v) for v in data.get("polygon")] # type: ignore - if len(data.get("polygon", [])) > 0 - else [], + polygon=( + [Point.from_dict(v) for v in data.get("polygon")] # type: ignore + if len(data.get("polygon", [])) > 0 + else [] + ), confidence=data.get("confidence", None), span=DocumentSpan.from_dict(data.get("span")) if data.get("span") else None, # type: ignore value=data.get("value", None), @@ -3212,36 +3160,20 @@ def _from_generated(cls, page): return cls( page_number=page.page_number, - angle=adjust_text_angle(page.angle) - if page.angle else None, + angle=adjust_text_angle(page.angle) if page.angle else None, width=page.width, height=page.height, unit=page.unit, - lines=[DocumentLine._from_generated(line, page) for line in page.lines] - if page.lines - else [], - words=[DocumentWord._from_generated(word) for word in page.words] - if page.words - else [], - selection_marks=[ - DocumentSelectionMark._from_generated(mark) - for mark in page.selection_marks - ] - if page.selection_marks - else [], + lines=[DocumentLine._from_generated(line, page) for line in page.lines] if page.lines else [], + words=[DocumentWord._from_generated(word) for word in page.words] if page.words else [], + selection_marks=( + [DocumentSelectionMark._from_generated(mark) for mark in page.selection_marks] + if page.selection_marks + else [] + ), spans=prepare_document_spans(page.spans), - barcodes=[ - DocumentBarcode._from_generated(barcode) - for barcode in barcodes - ] - if barcodes - else [], - formulas=[ - DocumentFormula._from_generated(formula) - for formula in formulas - ] - if formulas - else [], + barcodes=[DocumentBarcode._from_generated(barcode) for barcode in barcodes] if barcodes else [], + formulas=[DocumentFormula._from_generated(formula) for formula in formulas] if formulas else [], ) def __repr__(self) -> str: @@ -3264,24 +3196,12 @@ def to_dict(self) -> Dict: "width": self.width, "height": self.height, "unit": self.unit, - "lines": [f.to_dict() for f in self.lines] - if self.lines - else [], - "words": [f.to_dict() for f in self.words] - if self.words - else [], - "selection_marks": [f.to_dict() for f in self.selection_marks] - if self.selection_marks - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], - "barcodes": [f.to_dict() for f in self.barcodes] - if self.barcodes - else [], - "formulas": [f.to_dict() for f in self.formulas] - if self.formulas - else [], + "lines": [f.to_dict() for f in self.lines] if self.lines else [], + "words": [f.to_dict() for f in self.words] if self.words else [], + "selection_marks": [f.to_dict() for f in self.selection_marks] if self.selection_marks else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], + "barcodes": [f.to_dict() for f in self.barcodes] if self.barcodes else [], + "formulas": [f.to_dict() for f in self.formulas] if self.formulas else [], } @classmethod @@ -3298,24 +3218,36 @@ def from_dict(cls, data: Dict) -> "DocumentPage": width=data.get("width", None), height=data.get("height", None), unit=data.get("unit", None), - lines=[DocumentLine.from_dict(v) for v in data.get("lines")] # type: ignore - if len(data.get("lines", [])) > 0 - else [], - words=[DocumentWord.from_dict(v) for v in data.get("words")] # type: ignore - if len(data.get("words", [])) > 0 - else [], - selection_marks=[DocumentSelectionMark.from_dict(v) for v in data.get("selection_marks")] # type: ignore - if len(data.get("selection_marks", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], - barcodes=[DocumentBarcode.from_dict(v) for v in data.get("barcodes")] # type: ignore - if len(data.get("barcodes", [])) > 0 - else [], - formulas=[DocumentFormula.from_dict(v) for v in data.get("formulas")] # type: ignore - if len(data.get("formulas", [])) > 0 - else [], + lines=( + [DocumentLine.from_dict(v) for v in data.get("lines")] # type: ignore + if len(data.get("lines", [])) > 0 + else [] + ), + words=( + [DocumentWord.from_dict(v) for v in data.get("words")] # type: ignore + if len(data.get("words", [])) > 0 + else [] + ), + selection_marks=( + [DocumentSelectionMark.from_dict(v) for v in data.get("selection_marks")] # type: ignore + if len(data.get("selection_marks", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), + barcodes=( + [DocumentBarcode.from_dict(v) for v in data.get("barcodes")] # type: ignore + if len(data.get("barcodes", [])) > 0 + else [] + ), + formulas=( + [DocumentFormula.from_dict(v) for v in data.get("formulas")] # type: ignore + if len(data.get("formulas", [])) > 0 + else [] + ), ) @@ -3371,9 +3303,7 @@ def _from_generated(cls, style): font_weight=font_weight, color=color, background_color=background_color, - spans=[DocumentSpan._from_generated(span) for span in style.spans] - if style.spans - else [], + spans=[DocumentSpan._from_generated(span) for span in style.spans] if style.spans else [], confidence=style.confidence, ) @@ -3398,9 +3328,7 @@ def to_dict(self) -> Dict: "font_weight": self.font_weight, "color": self.color, "background_color": self.background_color, - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], "confidence": self.confidence, } @@ -3419,9 +3347,11 @@ def from_dict(cls, data: Dict) -> "DocumentStyle": font_weight=data.get("font_weight", None), color=data.get("color", None), background_color=data.get("background_color", None), - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), confidence=data.get("confidence", None), ) @@ -3466,15 +3396,12 @@ def _from_generated(cls, cell): row_span=cell.row_span if cell.row_span else 1, column_span=cell.column_span if cell.column_span else 1, content=cell.content, - bounding_regions=[ - BoundingRegion._from_generated(region) - for region in cell.bounding_regions - ] - if cell.bounding_regions - else [], - spans=[DocumentSpan._from_generated(span) for span in cell.spans] - if cell.spans - else [], + bounding_regions=( + [BoundingRegion._from_generated(region) for region in cell.bounding_regions] + if cell.bounding_regions + else [] + ), + spans=[DocumentSpan._from_generated(span) for span in cell.spans] if cell.spans else [], ) def __repr__(self) -> str: @@ -3498,12 +3425,8 @@ def to_dict(self) -> Dict: "row_span": self.row_span, "column_span": self.column_span, "content": self.content, - "bounding_regions": [f.to_dict() for f in self.bounding_regions] - if self.bounding_regions - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "bounding_regions": [f.to_dict() for f in self.bounding_regions] if self.bounding_regions else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], } @classmethod @@ -3521,12 +3444,16 @@ def from_dict(cls, data: Dict) -> "DocumentTableCell": row_span=data.get("row_span", 1), column_span=data.get("column_span", 1), content=data.get("content", None), - bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore - if len(data.get("bounding_regions", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + bounding_regions=( + [BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore + if len(data.get("bounding_regions", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), ) @@ -3556,9 +3483,7 @@ def _from_generated(cls, table): return cls( row_count=table.row_count, column_count=table.column_count, - cells=[DocumentTableCell._from_generated(cell) for cell in table.cells] - if table.cells - else [], + cells=[DocumentTableCell._from_generated(cell) for cell in table.cells] if table.cells else [], bounding_regions=prepare_bounding_regions(table.bounding_regions), spans=prepare_document_spans(table.spans), ) @@ -3579,15 +3504,9 @@ def to_dict(self) -> Dict: return { "row_count": self.row_count, "column_count": self.column_count, - "cells": [f.to_dict() for f in self.cells] - if self.cells - else [], - "bounding_regions": [f.to_dict() for f in self.bounding_regions] - if self.bounding_regions - else [], - "spans": [f.to_dict() for f in self.spans] - if self.spans - else [], + "cells": [f.to_dict() for f in self.cells] if self.cells else [], + "bounding_regions": [f.to_dict() for f in self.bounding_regions] if self.bounding_regions else [], + "spans": [f.to_dict() for f in self.spans] if self.spans else [], } @classmethod @@ -3601,15 +3520,21 @@ def from_dict(cls, data: Dict) -> "DocumentTable": return cls( row_count=data.get("row_count", None), column_count=data.get("column_count", None), - cells=[DocumentTableCell.from_dict(v) for v in data.get("cells")] # type: ignore - if len(data.get("cells", [])) > 0 - else [], - bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore - if len(data.get("bounding_regions", [])) > 0 - else [], - spans=[DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore - if len(data.get("spans", [])) > 0 - else [], + cells=( + [DocumentTableCell.from_dict(v) for v in data.get("cells")] # type: ignore + if len(data.get("cells", [])) > 0 + else [] + ), + bounding_regions=( + [BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore + if len(data.get("bounding_regions", [])) > 0 + else [] + ), + spans=( + [DocumentSpan.from_dict(v) for v in data.get("spans")] # type: ignore + if len(data.get("spans", [])) > 0 + else [] + ), ) @@ -3617,6 +3542,7 @@ class DocumentTypeDetails: """DocumentTypeDetails represents a document type that a model can recognize, including its fields and types, and the confidence for those fields. """ + description: Optional[str] """A description for the model.""" build_mode: Optional[str] @@ -3627,10 +3553,7 @@ class DocumentTypeDetails: field_confidence: Optional[Dict[str, float]] """Estimated confidence for each field.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.description = kwargs.get("description", None) self.build_mode = kwargs.get("build_mode", None) self.field_schema = kwargs.get("field_schema", None) @@ -3647,10 +3570,12 @@ def _from_generated(cls, doc_type): return cls( description=doc_type.description, build_mode=doc_type.build_mode, - field_schema={name: field.serialize() for name, field in doc_type.field_schema.items()} - if doc_type.field_schema else {}, - field_confidence=doc_type.field_confidence - if doc_type.field_confidence else {}, + field_schema=( + {name: field.serialize() for name, field in doc_type.field_schema.items()} + if doc_type.field_schema + else {} + ), + field_confidence=doc_type.field_confidence if doc_type.field_confidence else {}, ) def to_dict(self) -> Dict: @@ -3689,6 +3614,7 @@ class DocumentModelSummary: .. versionadded:: 2023-07-31 The *expires_on* property. """ + model_id: str """Unique model id.""" description: Optional[str] @@ -3702,10 +3628,7 @@ class DocumentModelSummary: tags: Optional[Dict[str, str]] """List of user defined key-value tag attributes associated with the model.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.model_id = kwargs.get("model_id", None) self.description = kwargs.get("description", None) self.created_on = kwargs.get("created_on", None) @@ -3729,7 +3652,7 @@ def _from_generated(cls, model): created_on=model.created_date_time, api_version=model.api_version, tags=model.tags if model.tags else {}, - expires_on=expires_on + expires_on=expires_on, ) def to_dict(self) -> Dict[str, Any]: @@ -3764,6 +3687,7 @@ def from_dict(cls, data: Dict[str, Any]) -> "DocumentModelSummary": expires_on=data.get("expires_on", None), ) + class BlobFileListSource: """Content source for a file list in Azure Blob Storage.""" @@ -3772,26 +3696,17 @@ class BlobFileListSource: file_list: str """Path to a JSONL file within the container specifying a subset of documents for training.""" - def __init__( # pylint: disable=unused-argument - self, - container_url: str, - file_list: str - ) -> None: + def __init__(self, container_url: str, file_list: str) -> None: # pylint: disable=unused-argument self.container_url = container_url self.file_list = file_list self._kind: Literal["azureBlobFileList"] = "azureBlobFileList" def __repr__(self) -> str: - return ( - f"BlobFileListSource(container_url={self.container_url}, file_list={self.file_list})" - ) + return f"BlobFileListSource(container_url={self.container_url}, file_list={self.file_list})" @classmethod def _from_generated(cls, model): - return cls( - container_url=model.container_url, - file_list=model.file_list - ) + return cls(container_url=model.container_url, file_list=model.file_list) def _to_generated(self) -> AzureBlobFileListContentSource: return AzureBlobFileListContentSource(container_url=self.container_url, file_list=self.file_list) @@ -3802,10 +3717,7 @@ def to_dict(self) -> Dict[str, Any]: :return: Dict[str, Any] :rtype: Dict[str, Any] """ - return { - "container_url": self.container_url, - "file_list": self.file_list - } + return {"container_url": self.container_url, "file_list": self.file_list} @classmethod def from_dict(cls, data: Dict[str, Any]) -> "BlobFileListSource": @@ -3829,27 +3741,17 @@ class BlobSource: prefix: Optional[str] """Blob name prefix.""" - def __init__( # pylint: disable=unused-argument - self, - container_url: str, - *, - prefix: Optional[str] = None - ) -> None: + def __init__(self, container_url: str, *, prefix: Optional[str] = None) -> None: # pylint: disable=unused-argument self.container_url = container_url self.prefix = prefix self._kind: Literal["azureBlob"] = "azureBlob" def __repr__(self) -> str: - return ( - f"BlobSource(container_url={self.container_url}, prefix={self.prefix})" - ) + return f"BlobSource(container_url={self.container_url}, prefix={self.prefix})" @classmethod def _from_generated(cls, model): - return cls( - container_url=model.container_url, - prefix=model.prefix - ) + return cls(container_url=model.container_url, prefix=model.prefix) def _to_generated(self) -> AzureBlobContentSource: return AzureBlobContentSource(container_url=self.container_url, prefix=self.prefix) @@ -3860,10 +3762,7 @@ def to_dict(self) -> Dict[str, Any]: :return: Dict[str, Any] :rtype: Dict[str, Any] """ - return { - "container_url": self.container_url, - "prefix": self.prefix - } + return {"container_url": self.container_url, "prefix": self.prefix} @classmethod def from_dict(cls, data: Dict[str, Any]) -> "BlobSource": @@ -3888,17 +3787,12 @@ class ClassifierDocumentTypeDetails: source: Union[BlobSource, BlobFileListSource] """Content source containing the training data.""" - def __init__( # pylint: disable=unused-argument - self, - source: Union[BlobSource, BlobFileListSource] - ) -> None: + def __init__(self, source: Union[BlobSource, BlobFileListSource]) -> None: # pylint: disable=unused-argument self.source_kind = source._kind self.source = source def __repr__(self) -> str: - return ( - f"ClassifierDocumentTypeDetails(source_kind={self.source_kind}, source={repr(self.source)})" - ) + return f"ClassifierDocumentTypeDetails(source_kind={self.source_kind}, source={repr(self.source)})" @classmethod def _from_generated(cls, model): @@ -3906,7 +3800,7 @@ def _from_generated(cls, model): if model.azure_blob_source is not None: source = BlobSource._from_generated(model.azure_blob_source) elif model.azure_blob_file_list_source is not None: - source=BlobFileListSource._from_generated(model.azure_blob_file_list_source) + source = BlobFileListSource._from_generated(model.azure_blob_file_list_source) return cls( source=source, @@ -3964,10 +3858,7 @@ class DocumentClassifierDetails: doc_types: Mapping[str, ClassifierDocumentTypeDetails] """List of document types to classify against.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.classifier_id = kwargs.get("classifier_id", None) self.description = kwargs.get("description", None) self.created_on = kwargs.get("created_on", None) @@ -3990,8 +3881,11 @@ def _from_generated(cls, model): created_on=model.created_date_time, expires_on=model.expiration_date_time, api_version=model.api_version, - doc_types={k: ClassifierDocumentTypeDetails._from_generated(v) for k, v in model.doc_types.items()} - if model.doc_types else {} + doc_types=( + {k: ClassifierDocumentTypeDetails._from_generated(v) for k, v in model.doc_types.items()} + if model.doc_types + else {} + ), ) def to_dict(self) -> Dict[str, Any]: @@ -4006,7 +3900,7 @@ def to_dict(self) -> Dict[str, Any]: "created_on": self.created_on, "expires_on": self.expires_on, "api_version": self.api_version, - "doc_types": {k: v.to_dict() for k, v in self.doc_types.items()} if self.doc_types else {} # type: ignore + "doc_types": {k: v.to_dict() for k, v in self.doc_types.items()} if self.doc_types else {}, # type: ignore } @classmethod @@ -4023,10 +3917,13 @@ def from_dict(cls, data: Dict[str, Any]) -> "DocumentClassifierDetails": created_on=data.get("created_on", None), expires_on=data.get("expires_on", None), api_version=data.get("api_version", None), - doc_types={k: ClassifierDocumentTypeDetails.from_dict(v) - for k, v in data.get("doc_types").items()} # type: ignore - if data.get("doc_types") - else {}, + doc_types=( + { + k: ClassifierDocumentTypeDetails.from_dict(v) for k, v in data.get("doc_types").items() + } # type: ignore + if data.get("doc_types") + else {} + ), ) @@ -4052,10 +3949,7 @@ class DocumentModelDetails(DocumentModelSummary): doc_types: Optional[Dict[str, DocumentTypeDetails]] """Supported document types, including the fields for each document and their types.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) self.doc_types = kwargs.get("doc_types", None) @@ -4075,9 +3969,12 @@ def _from_generated(cls, model): created_on=model.created_date_time, api_version=model.api_version, tags=model.tags if model.tags else {}, - doc_types={k: DocumentTypeDetails._from_generated(v) for k, v in model.doc_types.items()} - if model.doc_types else {}, - expires_on=expires_on + doc_types=( + {k: DocumentTypeDetails._from_generated(v) for k, v in model.doc_types.items()} + if model.doc_types + else {} + ), + expires_on=expires_on, ) def to_dict(self) -> Dict[str, Any]: @@ -4110,9 +4007,11 @@ def from_dict(cls, data: Dict[str, Any]) -> "DocumentModelDetails": created_on=data.get("created_on", None), api_version=data.get("api_version", None), tags=data.get("tags", {}), - doc_types={k: DocumentTypeDetails.from_dict(v) for k, v in data.get("doc_types").items()} # type: ignore - if data.get("doc_types") - else {}, + doc_types=( + {k: DocumentTypeDetails.from_dict(v) for k, v in data.get("doc_types").items()} # type: ignore + if data.get("doc_types") + else {} + ), expires_on=data.get("expires_on", None), ) @@ -4127,10 +4026,7 @@ class DocumentAnalysisInnerError: innererror: Optional["DocumentAnalysisInnerError"] """Detailed error.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.code = kwargs.get("code", None) self.message = kwargs.get("message", None) self.innererror = kwargs.get("innererror", None) @@ -4146,7 +4042,7 @@ def _from_generated(cls, ierr): return cls( code=ierr.code, message=ierr.message, - innererror=DocumentAnalysisInnerError._from_generated(ierr.innererror) if ierr.innererror else None + innererror=DocumentAnalysisInnerError._from_generated(ierr.innererror) if ierr.innererror else None, ) def to_dict(self) -> Dict: @@ -4158,7 +4054,7 @@ def to_dict(self) -> Dict: return { "code": self.code, "message": self.message, - "innererror": self.innererror.to_dict() if self.innererror else None + "innererror": self.innererror.to_dict() if self.innererror else None, } @classmethod @@ -4172,8 +4068,11 @@ def from_dict(cls, data: Dict) -> "DocumentAnalysisInnerError": return cls( code=data.get("code", None), message=data.get("message", None), - innererror=DocumentAnalysisInnerError.from_dict(data.get("innererror")) # type: ignore - if data.get("innererror") else None + innererror=( + DocumentAnalysisInnerError.from_dict(data.get("innererror")) # type: ignore + if data.get("innererror") + else None + ), ) @@ -4191,10 +4090,7 @@ class DocumentAnalysisError: innererror: Optional[DocumentAnalysisInnerError] """Detailed error.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.code = kwargs.get("code", None) self.message = kwargs.get("message", None) self.target = kwargs.get("target", None) @@ -4214,7 +4110,7 @@ def _from_generated(cls, err): message=err.message, target=err.target, details=[DocumentAnalysisError._from_generated(e) for e in err.details] if err.details else [], - innererror=DocumentAnalysisInnerError._from_generated(err.innererror) if err.innererror else None + innererror=DocumentAnalysisInnerError._from_generated(err.innererror) if err.innererror else None, ) def to_dict(self) -> Dict: @@ -4228,7 +4124,7 @@ def to_dict(self) -> Dict: "message": self.message, "target": self.target, "details": [detail.to_dict() for detail in self.details] if self.details else [], - "innererror": self.innererror.to_dict() if self.innererror else None + "innererror": self.innererror.to_dict() if self.innererror else None, } @classmethod @@ -4243,10 +4139,16 @@ def from_dict(cls, data: Dict) -> "DocumentAnalysisError": code=data.get("code", None), message=data.get("message", None), target=data.get("target", None), - details=[DocumentAnalysisError.from_dict(e) for e in data.get("details")] # type: ignore - if data.get("details") else [], - innererror=DocumentAnalysisInnerError.from_dict(data.get("innererror")) # type: ignore - if data.get("innererror") else None + details=( + [DocumentAnalysisError.from_dict(e) for e in data.get("details")] # type: ignore + if data.get("details") + else [] + ), + innererror=( + DocumentAnalysisInnerError.from_dict(data.get("innererror")) # type: ignore + if data.get("innererror") + else None + ), ) @@ -4262,6 +4164,7 @@ class OperationSummary: .. versionadded:: 2023-07-31 The `documentClassifierBuild` kind. """ + operation_id: str """Operation ID.""" status: str @@ -4366,6 +4269,7 @@ class OperationDetails(OperationSummary): .. versionadded:: 2023-07-31 The `documentClassifierBuild` kind and `DocumentClassifierDetails` result. """ + operation_id: str """Operation ID.""" status: str @@ -4438,11 +4342,11 @@ def from_dict(cls, data: Dict) -> "OperationDetails": kind = data.get("kind", None) if kind == "documentClassifierBuild": - result = \ - DocumentClassifierDetails.from_dict(data.get("result")) if data.get("result") else None # type: ignore + result = ( + DocumentClassifierDetails.from_dict(data.get("result")) if data.get("result") else None + ) # type: ignore else: - result = \ - DocumentModelDetails.from_dict(data.get("result")) if data.get("result") else None # type: ignore + result = DocumentModelDetails.from_dict(data.get("result")) if data.get("result") else None # type: ignore return cls( operation_id=data.get("operation_id", None), status=data.get("status", None), @@ -4461,11 +4365,13 @@ def from_dict(cls, data: Dict) -> "OperationDetails": def _from_generated(cls, op, api_version): # pylint: disable=arguments-differ deserialize = _get_deserialize(api_version) if op.kind == "documentClassifierBuild": - result = DocumentClassifierDetails._from_generated(deserialize(ClassifierDetails, op.result)) \ - if op.result else None + result = ( + DocumentClassifierDetails._from_generated(deserialize(ClassifierDetails, op.result)) + if op.result + else None + ) else: - result = DocumentModelDetails._from_generated(deserialize(ModelDetails, op.result)) \ - if op.result else None + result = DocumentModelDetails._from_generated(deserialize(ModelDetails, op.result)) if op.result else None return cls( operation_id=op.operation_id, status=op.status, @@ -4475,8 +4381,7 @@ def _from_generated(cls, op, api_version): # pylint: disable=arguments-differ kind=op.kind, resource_location=op.resource_location, result=result, - error=DocumentAnalysisError._from_generated(deserialize(Error, op.error)) - if op.error else None, + error=DocumentAnalysisError._from_generated(deserialize(Error, op.error)) if op.error else None, api_version=op.api_version, tags=op.tags if op.tags else {}, ) @@ -4525,33 +4430,27 @@ def _from_generated(cls, response): api_version=response.api_version, model_id=response.model_id, content=response.content, - languages=[DocumentLanguage._from_generated(lang) for lang in response.languages] - if response.languages - else [], - pages=[DocumentPage._from_generated(page) for page in response.pages] - if response.pages - else [], - paragraphs=[DocumentParagraph._from_generated(paragraph) for paragraph in response.paragraphs] - if response.paragraphs - else [], - tables=[DocumentTable._from_generated(table) for table in response.tables] - if response.tables - else [], - key_value_pairs=[ - DocumentKeyValuePair._from_generated(kv) - for kv in response.key_value_pairs - ] - if response.key_value_pairs - else [], - styles=[DocumentStyle._from_generated(style) for style in response.styles] - if response.styles - else [], - documents=[ - AnalyzedDocument._from_generated(document) - for document in response.documents - ] - if response.documents - else [], + languages=( + [DocumentLanguage._from_generated(lang) for lang in response.languages] if response.languages else [] + ), + pages=[DocumentPage._from_generated(page) for page in response.pages] if response.pages else [], + paragraphs=( + [DocumentParagraph._from_generated(paragraph) for paragraph in response.paragraphs] + if response.paragraphs + else [] + ), + tables=[DocumentTable._from_generated(table) for table in response.tables] if response.tables else [], + key_value_pairs=( + [DocumentKeyValuePair._from_generated(kv) for kv in response.key_value_pairs] + if response.key_value_pairs + else [] + ), + styles=[DocumentStyle._from_generated(style) for style in response.styles] if response.styles else [], + documents=( + [AnalyzedDocument._from_generated(document) for document in response.documents] + if response.documents + else [] + ), ) def __repr__(self) -> str: @@ -4573,27 +4472,13 @@ def to_dict(self) -> Dict: "api_version": self.api_version, "model_id": self.model_id, "content": self.content, - "languages": [f.to_dict() for f in self.languages] - if self.languages - else [], - "pages": [f.to_dict() for f in self.pages] - if self.pages - else [], - "paragraphs": [f.to_dict() for f in self.paragraphs] - if self.paragraphs - else [], - "tables": [f.to_dict() for f in self.tables] - if self.tables - else [], - "key_value_pairs": [f.to_dict() for f in self.key_value_pairs] - if self.key_value_pairs - else [], - "styles": [f.to_dict() for f in self.styles] - if self.styles - else [], - "documents": [f.to_dict() for f in self.documents] - if self.documents - else [], + "languages": [f.to_dict() for f in self.languages] if self.languages else [], + "pages": [f.to_dict() for f in self.pages] if self.pages else [], + "paragraphs": [f.to_dict() for f in self.paragraphs] if self.paragraphs else [], + "tables": [f.to_dict() for f in self.tables] if self.tables else [], + "key_value_pairs": [f.to_dict() for f in self.key_value_pairs] if self.key_value_pairs else [], + "styles": [f.to_dict() for f in self.styles] if self.styles else [], + "documents": [f.to_dict() for f in self.documents] if self.documents else [], } @classmethod @@ -4608,27 +4493,41 @@ def from_dict(cls, data: Dict) -> "AnalyzeResult": api_version=data.get("api_version", None), model_id=data.get("model_id", None), content=data.get("content", None), - languages=[DocumentLanguage.from_dict(v) for v in data.get("languages")] # type: ignore - if len(data.get("languages", [])) > 0 - else [], - pages=[DocumentPage.from_dict(v) for v in data.get("pages")] # type: ignore - if len(data.get("pages", [])) > 0 - else [], - paragraphs=[DocumentParagraph.from_dict(v) for v in data.get("paragraphs")] # type: ignore - if len(data.get("paragraphs", [])) > 0 - else [], - tables=[DocumentTable.from_dict(v) for v in data.get("tables")] # type: ignore - if len(data.get("tables", [])) > 0 - else [], - key_value_pairs=[DocumentKeyValuePair.from_dict(v) for v in data.get("key_value_pairs")] # type: ignore - if len(data.get("key_value_pairs", [])) > 0 - else [], - styles=[DocumentStyle.from_dict(v) for v in data.get("styles")] # type: ignore - if len(data.get("styles", [])) > 0 - else [], - documents=[AnalyzedDocument.from_dict(v) for v in data.get("documents")] # type: ignore - if len(data.get("documents", [])) > 0 - else [], + languages=( + [DocumentLanguage.from_dict(v) for v in data.get("languages")] # type: ignore + if len(data.get("languages", [])) > 0 + else [] + ), + pages=( + [DocumentPage.from_dict(v) for v in data.get("pages")] # type: ignore + if len(data.get("pages", [])) > 0 + else [] + ), + paragraphs=( + [DocumentParagraph.from_dict(v) for v in data.get("paragraphs")] # type: ignore + if len(data.get("paragraphs", [])) > 0 + else [] + ), + tables=( + [DocumentTable.from_dict(v) for v in data.get("tables")] # type: ignore + if len(data.get("tables", [])) > 0 + else [] + ), + key_value_pairs=( + [DocumentKeyValuePair.from_dict(v) for v in data.get("key_value_pairs")] # type: ignore + if len(data.get("key_value_pairs", [])) > 0 + else [] + ), + styles=( + [DocumentStyle.from_dict(v) for v in data.get("styles")] # type: ignore + if len(data.get("styles", [])) > 0 + else [] + ), + documents=( + [AnalyzedDocument.from_dict(v) for v in data.get("documents")] # type: ignore + if len(data.get("documents", [])) > 0 + else [] + ), ) @@ -4640,10 +4539,7 @@ class CustomDocumentModelsDetails: limit: int """Maximum number of custom models supported in the current resource.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.count = kwargs.get("count", None) self.limit = kwargs.get("limit", None) @@ -4657,7 +4553,6 @@ def _from_generated(cls, info): limit=info.limit, ) - def to_dict(self) -> Dict: """Returns a dict representation of CustomDocumentModelsDetails. @@ -4693,10 +4588,7 @@ class QuotaDetails: quota_resets_on: datetime.datetime """Date/time when the resource quota usage will be reset.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.used = kwargs.get("used", None) self.quota = kwargs.get("quota", None) self.quota_resets_on = kwargs.get("quota_resets_on", None) @@ -4706,11 +4598,7 @@ def __repr__(self) -> str: @classmethod def _from_generated(cls, info): - return cls( - used=info.used, - quota=info.quota, - quota_resets_on=info.quota_reset_date_time - ) + return cls(used=info.used, quota=info.quota, quota_resets_on=info.quota_reset_date_time) def to_dict(self) -> Dict[str, Any]: """Returns a dict representation of QuotaDetails. @@ -4718,11 +4606,7 @@ def to_dict(self) -> Dict[str, Any]: :return: Dict[str, Any] :rtype: Dict[str, Any] """ - return { - "used": self.used, - "quota": self.quota, - "quota_resets_on": self.quota_resets_on - } + return {"used": self.used, "quota": self.quota, "quota_resets_on": self.quota_resets_on} @classmethod def from_dict(cls, data: Dict) -> "QuotaDetails": @@ -4735,7 +4619,7 @@ def from_dict(cls, data: Dict) -> "QuotaDetails": return cls( used=data.get("used", None), quota=data.get("quota", None), - quota_resets_on=data.get("quota_resets_on", None) + quota_resets_on=data.get("quota_resets_on", None), ) @@ -4751,26 +4635,30 @@ class ResourceDetails: neural_document_model_quota: Optional[QuotaDetails] """Quota details regarding the custom neural document model builds under the Form Recognizer resource.""" - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: self.custom_document_models = kwargs.get("custom_document_models", None) self.neural_document_model_quota = kwargs.get("neural_document_model_quota", None) def __repr__(self) -> str: - return f"ResourceDetails(custom_document_models={repr(self.custom_document_models)}, " \ - f"neural_document_model_quota={repr(self.neural_document_model_quota)})" + return ( + f"ResourceDetails(custom_document_models={repr(self.custom_document_models)}, " + f"neural_document_model_quota={repr(self.neural_document_model_quota)})" + ) @classmethod def _from_generated(cls, info): - custom_neural_builds = info.custom_neural_document_model_builds \ - if hasattr(info, "custom_neural_document_model_builds") else None + custom_neural_builds = ( + info.custom_neural_document_model_builds if hasattr(info, "custom_neural_document_model_builds") else None + ) return cls( - custom_document_models=CustomDocumentModelsDetails._from_generated(info.custom_document_models) - if info.custom_document_models else None, - neural_document_model_quota=QuotaDetails._from_generated(custom_neural_builds) - if custom_neural_builds else None, + custom_document_models=( + CustomDocumentModelsDetails._from_generated(info.custom_document_models) + if info.custom_document_models + else None + ), + neural_document_model_quota=( + QuotaDetails._from_generated(custom_neural_builds) if custom_neural_builds else None + ), ) def to_dict(self) -> Dict: @@ -4780,13 +4668,11 @@ def to_dict(self) -> Dict: :rtype: dict """ return { - "custom_document_models": self.custom_document_models.to_dict() - if self.custom_document_models - else None, - "neural_document_model_quota": self.neural_document_model_quota.to_dict() - if self.neural_document_model_quota - else None, - } + "custom_document_models": self.custom_document_models.to_dict() if self.custom_document_models else None, + "neural_document_model_quota": ( + self.neural_document_model_quota.to_dict() if self.neural_document_model_quota else None + ), + } @classmethod def from_dict(cls, data: Dict) -> "ResourceDetails": @@ -4797,19 +4683,23 @@ def from_dict(cls, data: Dict) -> "ResourceDetails": :rtype: ResourceDetails """ return cls( - custom_document_models=CustomDocumentModelsDetails.from_dict( - data.get("custom_document_models") # type: ignore - ) if data.get("custom_document_models") else None, - neural_document_model_quota=QuotaDetails.from_dict( - data.get("neural_document_model_quota") # type: ignore - ) if data.get("neural_document_model_quota") else None, + custom_document_models=( + CustomDocumentModelsDetails.from_dict(data.get("custom_document_models")) # type: ignore + if data.get("custom_document_models") + else None + ), + neural_document_model_quota=( + QuotaDetails.from_dict(data.get("neural_document_model_quota")) # type: ignore + if data.get("neural_document_model_quota") + else None + ), ) def _in_span(element: DocumentWord, spans: List[DocumentSpan]) -> bool: for span in spans: - if element.span.offset >= span.offset and ( - element.span.offset + element.span.length - ) <= (span.offset + span.length): + if element.span.offset >= span.offset and (element.span.offset + element.span.length) <= ( + span.offset + span.length + ): return True return False diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py index 27173d252733..c7572ff9937e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py @@ -43,30 +43,22 @@ class DocumentModelAdministrationLROPoller(Protocol[PollingReturnType_co]): @property def details( # pylint: disable=unused-argument self, - ) -> Mapping[str, Any]: - ... + ) -> Mapping[str, Any]: ... def polling_method( self, - ) -> PollingMethod[PollingReturnType_co]: - ... + ) -> PollingMethod[PollingReturnType_co]: ... - def continuation_token(self) -> str: - ... + def continuation_token(self) -> str: ... - def status(self) -> str: - ... + def status(self) -> str: ... - def result( # pylint: disable=unused-argument - self, timeout: Optional[int] = None - ) -> PollingReturnType_co: - ... + def result(self, timeout: Optional[int] = None) -> PollingReturnType_co: ... # pylint: disable=unused-argument def wait(self, timeout: Optional[float] = None) -> None: # pylint: disable=unused-argument ... - def done(self) -> bool: - ... + def done(self) -> bool: ... def add_done_callback(self, func: Callable) -> None: # pylint: disable=unused-argument ... diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_response_handlers.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_response_handlers.py index c29eb803b276..b4d83e064606 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_response_handlers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_response_handlers.py @@ -35,9 +35,11 @@ def prepare_prebuilt_models(response): ), pages=form_page[page.page_range[0] - 1 : page.page_range[1]], form_type=page.doc_type, - fields={key: FormField._from_generated(key, value, read_result) for key, value in page.fields.items()} - if page.fields - else None, + fields=( + {key: FormField._from_generated(key, value, read_result) for key, value in page.fields.items()} + if page.fields + else None + ), form_type_confidence=doc_type_confidence, model_id=model_id, ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_async_polling.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_async_polling.py index 4e67b26fb3e0..195bcd106ee2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_async_polling.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_async_polling.py @@ -22,33 +22,29 @@ class AsyncDocumentModelAdministrationLROPoller(Protocol[PollingReturnType_co]): @property def details( # pylint: disable=unused-argument self, - ) -> Mapping[str, Any]: - ... + ) -> Mapping[str, Any]: ... def polling_method( self, - ) -> AsyncPollingMethod[PollingReturnType_co]: - ... + ) -> AsyncPollingMethod[PollingReturnType_co]: ... - def continuation_token(self) -> str: - ... + def continuation_token(self) -> str: ... - def status(self) -> str: - ... + def status(self) -> str: ... async def result( # pylint: disable=unused-argument self, - ) -> PollingReturnType_co: - ... + ) -> PollingReturnType_co: ... async def wait(self) -> None: # pylint: disable=unused-argument ... - def done(self) -> bool: - ... + def done(self) -> bool: ... -class AsyncDocumentModelAdministrationClientLROPoller(AsyncLROPoller[PollingReturnType_co]): # pylint: disable=name-too-long +class AsyncDocumentModelAdministrationClientLROPoller( + AsyncLROPoller[PollingReturnType_co] +): # pylint: disable=name-too-long """Custom poller for model build operations. Call `result()` on the poller to return a :class:`~azure.ai.formrecognizer.DocumentModelInfo`. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py index 1de13499efd4..c9040b4548e2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py @@ -124,9 +124,7 @@ async def begin_analyze_document( if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: _client_op_path = self._client if kwargs.pop("features", None): - raise ValueError( - "Keyword argument 'features' is only available for API version V2023_07_31 and later." - ) + raise ValueError("Keyword argument 'features' is only available for API version V2023_07_31 and later.") else: _client_op_path = self._client.document_models return await _client_op_path.begin_analyze_document( # type: ignore @@ -193,9 +191,7 @@ async def begin_analyze_document_from_url( if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: _client_op_path = self._client if kwargs.pop("features", None): - raise ValueError( - "Keyword argument 'features' is only available for API version V2023_07_31 and later." - ) + raise ValueError("Keyword argument 'features' is only available for API version V2023_07_31 and later.") else: _client_op_path = self._client.document_models return await _client_op_path.begin_analyze_document( # type: ignore @@ -237,8 +233,9 @@ async def begin_classify_document( """ if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'begin_classify_document()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'begin_classify_document()' is only available for API version " "V2023_07_31 and later" + ) cls = kwargs.pop("cls", self._analyze_document_callback) continuation_token = kwargs.pop("continuation_token", None) @@ -287,8 +284,9 @@ async def begin_classify_document_from_url( """ if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'begin_classify_document_from_url()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'begin_classify_document_from_url()' is only available for API version " "V2023_07_31 and later" + ) cls = kwargs.pop("cls", self._analyze_document_callback) continuation_token = kwargs.pop("continuation_token", None) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py index 7903014d7fbb..e931e13973de 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py @@ -6,14 +6,7 @@ # pylint: disable=protected-access import uuid -from typing import ( - Any, - Union, - List, - overload, - Optional, - Mapping -) +from typing import Any, Union, List, overload, Optional, Mapping from azure.core.credentials import AzureKeyCredential from azure.core.credentials_async import AsyncTokenCredential from azure.core.polling.async_base_polling import AsyncLROBasePolling @@ -245,13 +238,11 @@ def callback(raw_response, _, headers): # pylint: disable=unused-argument azure_blob_file_list_source = None if prefix: azure_blob_source = self._generated_models.AzureBlobContentSource( - container_url=blob_container_url, - prefix=prefix + container_url=blob_container_url, prefix=prefix ) if file_list: azure_blob_file_list_source = self._generated_models.AzureBlobFileListContentSource( - container_url=blob_container_url, - file_list=file_list + container_url=blob_container_url, file_list=file_list ) if not azure_blob_source and not azure_blob_file_list_source: azure_blob_source = self._generated_models.AzureBlobContentSource( @@ -339,12 +330,14 @@ def _compose_callback(raw_response, _, headers): # pylint: disable=unused-argum model_id=model_id, description=description, tags=tags, - component_models=[ - self._generated_models.ComponentDocumentModelDetails(model_id=model_id) - for model_id in component_model_ids - ] - if component_model_ids - else [], + component_models=( + [ + self._generated_models.ComponentDocumentModelDetails(model_id=model_id) + for model_id in component_model_ids + ] + if component_model_ids + else [] + ), ), cls=kwargs.pop("cls", _compose_callback), polling=AsyncLROBasePolling( @@ -438,16 +431,18 @@ def _copy_callback(raw_response, _, headers): # pylint: disable=unused-argument _client_op_path = self._client.document_models.begin_copy_model_to return await _client_op_path( # type: ignore model_id=model_id, - copy_to_request=self._generated_models.CopyAuthorization( - target_resource_id=target["targetResourceId"], - target_resource_region=target["targetResourceRegion"], - target_model_id=target["targetModelId"], - access_token=target["accessToken"], - expiration_date_time=target["expirationDateTime"], - target_model_location=target["targetModelLocation"], - ) - if target - else None, + copy_to_request=( + self._generated_models.CopyAuthorization( + target_resource_id=target["targetResourceId"], + target_resource_region=target["targetResourceRegion"], + target_model_id=target["targetModelId"], + access_token=target["accessToken"], + expiration_date_time=target["expirationDateTime"], + target_model_location=target["targetModelLocation"], + ) + if target + else None + ), cls=kwargs.pop("cls", _copy_callback), polling=AsyncLROBasePolling( timeout=polling_interval, lro_algorithms=[DocumentModelAdministrationPolling()], **kwargs @@ -673,15 +668,18 @@ async def begin_build_document_classifier( :dedent: 4 :caption: Build a document classifier. """ + def callback(raw_response, _, headers): # pylint: disable=unused-argument - op_response = \ - self._deserialize(self._generated_models.DocumentClassifierBuildOperationDetails, raw_response) + op_response = self._deserialize( + self._generated_models.DocumentClassifierBuildOperationDetails, raw_response + ) model_info = self._deserialize(self._generated_models.DocumentClassifierDetails, op_response.result) return DocumentClassifierDetails._from_generated(model_info) if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'begin_build_document_classifier()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'begin_build_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) cls = kwargs.pop("cls", callback) continuation_token = kwargs.pop("continuation_token", None) polling_interval = kwargs.pop("polling_interval", self._client._config.polling_interval) @@ -730,8 +728,9 @@ async def get_document_classifier(self, classifier_id: str, **kwargs: Any) -> Do raise ValueError("classifier_id cannot be None or empty.") if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'get_document_classifier()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'get_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) response = await self._client.document_classifiers.get_classifier(classifier_id=classifier_id, **kwargs) return DocumentClassifierDetails._from_generated(response) @@ -758,8 +757,9 @@ def list_document_classifiers(self, **kwargs: Any) -> AsyncItemPaged[DocumentCla """ if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'list_document_classifiers()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'list_document_classifiers()' is only available for API version " "V2023_07_31 and later" + ) return self._client.document_classifiers.list_classifiers( # type: ignore cls=kwargs.pop( "cls", @@ -794,8 +794,9 @@ async def delete_document_classifier(self, classifier_id: str, **kwargs: Any) -> raise ValueError("classifier_id cannot be None or empty.") if self._api_version == DocumentAnalysisApiVersion.V2022_08_31: - raise ValueError("Method 'delete_document_classifier()' is only available for API version " - "V2023_07_31 and later") + raise ValueError( + "Method 'delete_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) return await self._client.document_classifiers.delete_classifier(classifier_id=classifier_id, **kwargs) def get_document_analysis_client(self, **kwargs: Any) -> DocumentAnalysisClient: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_base_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_base_client_async.py index bdd422ec9414..4f4d4a7589df 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_base_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_base_client_async.py @@ -116,5 +116,9 @@ async def send_request(self, request: HttpRequest, *, stream: bool = False, **kw path_format_arguments = { "endpoint": _SERIALIZER.url("endpoint", self._endpoint, "str", skip_quote=True), } - request_copy.url = self._client._client.format_url(request_copy.url, **path_format_arguments) # pylint:disable=protected-access - return await self._client._client.send_request(request_copy, stream=stream, **kwargs) # pylint:disable=protected-access + request_copy.url = self._client._client.format_url( + request_copy.url, **path_format_arguments + ) # pylint:disable=protected-access + return await self._client._client.send_request( + request_copy, stream=stream, **kwargs + ) # pylint:disable=protected-access diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py index 209d15e238b1..bf0643a26532 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py @@ -513,7 +513,9 @@ async def begin_recognize_invoices( ) except ValueError as e: if "begin_analyze_invoice_async" in str(e): - raise ValueError("Method 'begin_recognize_invoices' is only available for API version V2_1 and up") # pylint: disable=raise-missing-from + raise ValueError( + "Method 'begin_recognize_invoices' is only available for API version V2_1 and up" + ) # pylint: disable=raise-missing-from raise e @distributed_trace_async diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py index c89f2cb6d812..c045314dcffa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py @@ -375,17 +375,19 @@ def _copy_callback(raw_response, _, headers): # pylint: disable=unused-argument return await self._client.begin_copy_custom_model( # type: ignore model_id=model_id, - copy_request=self._generated_models.CopyRequest( - target_resource_id=target["resourceId"], - target_resource_region=target["resourceRegion"], - copy_authorization=self._generated_models.CopyAuthorizationResult( - access_token=target["accessToken"], - model_id=target["modelId"], - expiration_date_time_ticks=target["expirationDateTimeTicks"], - ), - ) - if target - else None, + copy_request=( + self._generated_models.CopyRequest( + target_resource_id=target["resourceId"], + target_resource_region=target["resourceRegion"], + copy_authorization=self._generated_models.CopyAuthorizationResult( + access_token=target["accessToken"], + model_id=target["modelId"], + expiration_date_time_ticks=target["expirationDateTimeTicks"], + ), + ) + if target + else None + ), cls=kwargs.pop("cls", _copy_callback), polling=AsyncLROBasePolling(timeout=polling_interval, lro_algorithms=[CopyPolling()], **kwargs), continuation_token=continuation_token, @@ -438,7 +440,9 @@ def _compose_callback(raw_response, _, headers): # pylint: disable=unused-argum **kwargs ) except ValueError: - raise ValueError("Method 'begin_create_composed_model' is only available for API version V2_1 and up") # pylint: disable=raise-missing-from + raise ValueError( + "Method 'begin_create_composed_model' is only available for API version V2_1 and up" + ) # pylint: disable=raise-missing-from def get_form_recognizer_client(self, **kwargs: Any) -> FormRecognizerClient: """Get an instance of a FormRecognizerClient from FormTrainingClient. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_authentication_v3_1_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_authentication_v3_1_async.py index 410213ac5be8..0c5466e2cfda 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_authentication_v3_1_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_authentication_v3_1_async.py @@ -42,6 +42,7 @@ async def authentication_with_api_key_credential_form_recognizer_client_async(se # [START create_fr_client_with_key_async] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] @@ -72,6 +73,7 @@ async def authentication_with_api_key_credential_form_training_client_async(self # [START create_ft_client_with_key_async] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormTrainingClient + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] @@ -104,5 +106,6 @@ async def main(): await sample.authentication_with_api_key_credential_form_training_client_async() await sample.authentication_with_azure_active_directory_form_training_client_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_convert_to_and_from_dict_v3_1_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_convert_to_and_from_dict_v3_1_async.py index 15756cd08e14..fff8b2dd6b1b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_convert_to_and_from_dict_v3_1_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_convert_to_and_from_dict_v3_1_async.py @@ -26,6 +26,7 @@ import json import asyncio + async def convert_to_and_from_dict_async(): path_to_sample_forms = os.path.abspath( os.path.join( @@ -45,13 +46,11 @@ async def convert_to_and_from_dict_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_recognizer_client: with open(path_to_sample_forms, "rb") as f: poller = await form_recognizer_client.begin_recognize_identity_documents(identity_document=f) - + id_documents = await poller.result() # convert the received model to a dictionary @@ -60,7 +59,7 @@ async def convert_to_and_from_dict_async(): # save the dictionary as JSON content in a JSON file, use the AzureJSONEncoder # to help make types, such as dates, JSON serializable # NOTE: AzureJSONEncoder is only available with azure.core>=1.18.0. - with open('data.json', 'w') as output_file: + with open("data.json", "w") as output_file: json.dump(recognized_form_dict, output_file, cls=AzureJSONEncoder) # convert the dictionary back to the original model @@ -68,7 +67,7 @@ async def convert_to_and_from_dict_async(): # use the model as normal for idx, id_document in enumerate(model): - print("--------Recognizing converted ID document #{}--------".format(idx+1)) + print("--------Recognizing converted ID document #{}--------".format(idx + 1)) first_name = id_document.fields.get("FirstName") if first_name: print("First Name: {} has confidence: {}".format(first_name.value, first_name.confidence)) @@ -86,5 +85,5 @@ async def main(): await convert_to_and_from_dict_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_copy_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_copy_model_async.py index 8335e0de0911..16e1ff6f303f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_copy_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_copy_model_async.py @@ -56,8 +56,7 @@ async def copy_model_async(self, custom_model_id): async with target_client: target = await target_client.get_copy_authorization( - resource_region=target_region, - resource_id=target_resource_id + resource_region=target_region, resource_id=target_resource_id ) # model ID that target client will use to access the model once copy is complete print("Model ID: {}".format(target["modelId"])) @@ -68,8 +67,7 @@ async def copy_model_async(self, custom_model_id): async with source_client: poller = await source_client.begin_copy_model( - model_id=source_model_id, - target=target # output from target client's call to get_copy_authorization() + model_id=source_model_id, target=target # output from target client's call to get_copy_authorization() ) copied_over_model = await poller.result() @@ -92,18 +90,17 @@ async def main(): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: container_sas_url = os.getenv("CONTAINER_SAS_URL_V2") if container_sas_url is not None: - model = await (await form_training_client.begin_training( - container_sas_url, use_training_labels=True)).result() + model = await ( + await form_training_client.begin_training(container_sas_url, use_training_labels=True) + ).result() model_id = model.model_id await sample.copy_model_async(model_id) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_create_composed_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_create_composed_model_async.py index e6b236ebb301..6e832c7f4830 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_create_composed_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_create_composed_model_async.py @@ -48,10 +48,10 @@ async def create_composed_model_async(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - po_supplies = os.environ['PURCHASE_ORDER_OFFICE_SUPPLIES_SAS_URL_V2'] - po_equipment = os.environ['PURCHASE_ORDER_OFFICE_EQUIPMENT_SAS_URL_V2'] - po_furniture = os.environ['PURCHASE_ORDER_OFFICE_FURNITURE_SAS_URL_V2'] - po_cleaning_supplies = os.environ['PURCHASE_ORDER_OFFICE_CLEANING_SUPPLIES_SAS_URL_V2'] + po_supplies = os.environ["PURCHASE_ORDER_OFFICE_SUPPLIES_SAS_URL_V2"] + po_equipment = os.environ["PURCHASE_ORDER_OFFICE_EQUIPMENT_SAS_URL_V2"] + po_furniture = os.environ["PURCHASE_ORDER_OFFICE_FURNITURE_SAS_URL_V2"] + po_cleaning_supplies = os.environ["PURCHASE_ORDER_OFFICE_CLEANING_SUPPLIES_SAS_URL_V2"] form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: @@ -76,7 +76,7 @@ async def create_composed_model_async(self): supplies_model.model_id, equipment_model.model_id, furniture_model.model_id, - cleaning_supplies_model.model_id + cleaning_supplies_model.model_id, ] poller = await form_training_client.begin_create_composed_model( @@ -97,13 +97,13 @@ async def create_composed_model_async(self): print("Recognized fields:") for submodel in model.submodels: print("The submodel has model ID: {}".format(submodel.model_id)) - print("...The submodel with form type {} has an average accuracy '{}'".format( - submodel.form_type, submodel.accuracy - )) + print( + "...The submodel with form type {} has an average accuracy '{}'".format( + submodel.form_type, submodel.accuracy + ) + ) for name, field in submodel.fields.items(): - print("...The model found the field '{}' with an accuracy of {}".format( - name, field.accuracy - )) + print("...The model found the field '{}' with an accuracy of {}".format(name, field.accuracy)) # Training result information for doc in model.training_documents: @@ -119,5 +119,5 @@ async def main(): await sample.create_composed_model_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_labeled_tables_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_labeled_tables_async.py index caf3af74dc58..4c73735323d3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_labeled_tables_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_labeled_tables_async.py @@ -53,12 +53,13 @@ async def test_recognize_tables_fixed_rows_async(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id_fixed_rows_table = os.getenv("MODEL_ID_FIXED_ROW_TABLES", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/forms/label_table_fixed_rows1.pdf")) + path_to_sample_forms = os.path.abspath( + os.path.join( + os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/label_table_fixed_rows1.pdf" + ) + ) with open(path_to_sample_forms, "rb") as f: form = f.read() @@ -78,15 +79,17 @@ async def test_recognize_tables_fixed_rows_async(self, custom_model_id): for row_name, column in field.value.items(): print("Row '{}' has columns:".format(row_name)) for column_name, column_value in column.value.items(): - print("...Column '{}' with value '{}' and a confidence score of {}".format( - column_name, column_value.value, column_value.confidence - )) + print( + "...Column '{}' with value '{}' and a confidence score of {}".format( + column_name, column_value.value, column_value.confidence + ) + ) else: # non-table tagged FormField - print("...Field '{}' has value '{}' with a confidence score of {}".format( - name, - field.value, - field.confidence - )) + print( + "...Field '{}' has value '{}' with a confidence score of {}".format( + name, field.value, field.confidence + ) + ) async def test_recognize_tables_dynamic_rows_async(self, custom_model_id): from azure.core.credentials import AzureKeyCredential @@ -97,12 +100,13 @@ async def test_recognize_tables_dynamic_rows_async(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id_dynamic_rows_table = os.getenv("MODEL_ID_DYNAMIC_ROW_TABLES", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/forms/label_table_dynamic_rows1.pdf")) + path_to_sample_forms = os.path.abspath( + os.path.join( + os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/label_table_dynamic_rows1.pdf" + ) + ) with open(path_to_sample_forms, "rb") as f: form = f.read() @@ -120,17 +124,19 @@ async def test_recognize_tables_dynamic_rows_async(self, custom_model_id): # (if different than sample training docs) if name == "table": for idx, row in enumerate(field.value): - print("Row {}".format(idx+1)) + print("Row {}".format(idx + 1)) for column_name, row_value in row.value.items(): - print("...Column '{}' with value '{}' and a confidence score of {}".format( - column_name, row_value.value, row_value.confidence - )) + print( + "...Column '{}' with value '{}' and a confidence score of {}".format( + column_name, row_value.value, row_value.confidence + ) + ) else: # non-table tagged FormField - print("...Field '{}' has value '{}' with a confidence score of {}".format( - name, - field.value, - field.confidence - )) + print( + "...Field '{}' has value '{}' with a confidence score of {}".format( + name, field.value, field.confidence + ) + ) async def main(): @@ -150,9 +156,7 @@ async def main(): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: if fixed: @@ -166,5 +170,5 @@ async def main(): await sample.test_recognize_tables_dynamic_rows_async(dynamic_model_id) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_models_trained_with_and_without_labels_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_models_trained_with_and_without_labels_async.py index dbc4c8fe00db..9bc19a809fbd 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_models_trained_with_and_without_labels_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_differentiate_output_models_trained_with_and_without_labels_async.py @@ -57,7 +57,9 @@ async def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): model_trained_with_labels_id = os.getenv("ID_OF_MODEL_TRAINED_WITH_LABELS", labeled_model_id) model_trained_without_labels_id = os.getenv("ID_OF_MODEL_TRAINED_WITHOUT_LABELS", unlabeled_model_id) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/Form_1.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/Form_1.jpg") + ) async with FormRecognizerClient( endpoint=endpoint, credential=AzureKeyCredential(key) ) as form_recognizer_client: @@ -80,12 +82,11 @@ async def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): print("---------Recognizing forms using models trained with labeled data---------") for labeled_form in forms_with_labeled_model: for name, field in labeled_form.fields.items(): - print("...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.value, - format_bounding_box(field.value_data.bounding_box), - field.confidence - )) + print( + "...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( + name, field.value, format_bounding_box(field.value_data.bounding_box), field.confidence + ) + ) # Find a specific labeled field. Substitute "Merchant" with your specific training-time label try: @@ -103,18 +104,19 @@ async def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): print("-------Recognizing forms using models trained with unlabeled data-------") for unlabeled_form in forms_with_unlabeled_model: for name, field in unlabeled_form.fields.items(): - print("...Field '{}' has label '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.label_data.text, - format_bounding_box(field.label_data.bounding_box), - field.confidence - )) - print("...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.value, - format_bounding_box(field.value_data.bounding_box), - field.confidence - )) + print( + "...Field '{}' has label '{}' within bounding box '{}', with a confidence score of {}".format( + name, + field.label_data.text, + format_bounding_box(field.label_data.bounding_box), + field.confidence, + ) + ) + print( + "...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( + name, field.value, format_bounding_box(field.value_data.bounding_box), field.confidence + ) + ) # Find the value of a specific unlabeled field. Will only be found if sample training forms used print("\nValue for a specific unlabeled field:") @@ -142,9 +144,7 @@ async def main(): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: if labeled: @@ -157,5 +157,5 @@ async def main(): await sample.recognize_custom_forms(labeled_model_id, unlabeled_model_id) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_get_bounding_boxes_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_get_bounding_boxes_async.py index 3d3aa1b41435..a5d11f0d9876 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_get_bounding_boxes_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_get_bounding_boxes_async.py @@ -33,8 +33,7 @@ def format_bounding_box(bounding_box): - """The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left. - """ + """The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left.""" if not bounding_box: return "N/A" return ", ".join(["[{}, {}]".format(p.x, p.y) for p in bounding_box]) @@ -50,12 +49,11 @@ async def get_bounding_boxes(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id = os.getenv("CUSTOM_TRAINED_MODEL_ID", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/forms/Form_1.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/Form_1.jpg") + ) async with form_recognizer_client: # Make sure your form's type is included in the list of form types the custom model can recognize with open(path_to_sample_forms, "rb") as f: @@ -65,56 +63,62 @@ async def get_bounding_boxes(self, custom_model_id): forms = await poller.result() for idx, form in enumerate(forms): - print("--------RECOGNIZING FORM #{}--------".format(idx+1)) + print("--------RECOGNIZING FORM #{}--------".format(idx + 1)) print("Form has type: {}".format(form.form_type)) for name, field in form.fields.items(): # each field is of type FormField - print("...Field '{}' has label '{}' with value '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.label_data.text if field.label_data else name, - field.value, - format_bounding_box(field.value_data.bounding_box), - field.confidence - )) + print( + "...Field '{}' has label '{}' with value '{}' within bounding box '{}', with a confidence score of {}".format( + name, + field.label_data.text if field.label_data else name, + field.value, + format_bounding_box(field.value_data.bounding_box), + field.confidence, + ) + ) for page in form.pages: - print("-------Recognizing Page #{} of Form #{}-------".format(page.page_number, idx+1)) - print("Page has width '{}' and height '{}' measure with unit: {}, and has text angle '{}'".format( - page.width, page.height, page.unit, page.text_angle - )) + print("-------Recognizing Page #{} of Form #{}-------".format(page.page_number, idx + 1)) + print( + "Page has width '{}' and height '{}' measure with unit: {}, and has text angle '{}'".format( + page.width, page.height, page.unit, page.text_angle + ) + ) for table in page.tables: print("Table on page has the following cells:") for cell in table.cells: print( "...Cell[{}][{}] has text '{}' with confidence {} based on the following words: ".format( cell.row_index, cell.column_index, cell.text, cell.confidence - )) + ) + ) # field_elements is only populated if you set include_field_elements=True # It is a heterogeneous list of FormWord, FormLine, and FormSelectionMark for element in cell.field_elements: if element.kind == "word": - print("......Word '{}' within bounding box '{}' has a confidence of {}".format( - element.text, - format_bounding_box(element.bounding_box), - element.confidence - )) + print( + "......Word '{}' within bounding box '{}' has a confidence of {}".format( + element.text, format_bounding_box(element.bounding_box), element.confidence + ) + ) elif element.kind == "line": - print("......Line '{}' within bounding box '{}' has the following words: ".format( - element.text, - format_bounding_box(element.bounding_box) - )) + print( + "......Line '{}' within bounding box '{}' has the following words: ".format( + element.text, format_bounding_box(element.bounding_box) + ) + ) for word in element.words: - print(".........Word '{}' within bounding box '{}' has a confidence of {}".format( - word.text, - format_bounding_box(word.bounding_box), - word.confidence - )) + print( + ".........Word '{}' within bounding box '{}' has a confidence of {}".format( + word.text, format_bounding_box(word.bounding_box), word.confidence + ) + ) elif element.kind == "selectionMark": - print("......Selection mark is '{}' within bounding box '{}' " - "and has a confidence of {}".format( - element.state, - format_bounding_box(element.bounding_box), - element.confidence - )) + print( + "......Selection mark is '{}' within bounding box '{}' " + "and has a confidence of {}".format( + element.state, format_bounding_box(element.bounding_box), element.confidence + ) + ) print("---------------------------------------------------") print("-----------------------------------") @@ -134,17 +138,16 @@ async def main(): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: container_sas_url = os.getenv("CONTAINER_SAS_URL_V2") if container_sas_url is not None: - model = await (await form_training_client.begin_training( - container_sas_url, use_training_labels=False)).result() + model = await ( + await form_training_client.begin_training(container_sas_url, use_training_labels=False) + ).result() model_id = model.model_id await sample.get_bounding_boxes(model_id) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_manage_custom_models_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_manage_custom_models_async.py index f66d9a2418df..e6bdee150825 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_manage_custom_models_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_manage_custom_models_async.py @@ -38,14 +38,14 @@ async def manage_custom_models(self): container_sas_url = os.environ["CONTAINER_SAS_URL_V2"] # [START get_account_properties_async] - async with FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) as form_training_client: + async with FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) as form_training_client: # First, we see how many custom models we have, and what our limit is account_properties = await form_training_client.get_account_properties() - print("Our account has {} custom models, and we can have at most {} custom models\n".format( - account_properties.custom_model_count, account_properties.custom_model_limit - )) + print( + "Our account has {} custom models, and we can have at most {} custom models\n".format( + account_properties.custom_model_count, account_properties.custom_model_limit + ) + ) # [END get_account_properties_async] # Next, we get a paged list of all of our custom models @@ -88,5 +88,5 @@ async def main(): await sample.manage_custom_models() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_business_cards_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_business_cards_async.py index 6cf6c53f0249..96e0926d9f4b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_business_cards_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_business_cards_async.py @@ -31,8 +31,11 @@ class RecognizeBusinessCardSampleAsync(object): async def recognize_business_card_async(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/business_cards/business-card-english.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join( + os.path.abspath(__file__), "..", "..", "..", "./sample_forms/business_cards/business-card-english.jpg" + ) + ) # [START recognize_business_cards_async] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient @@ -40,25 +43,27 @@ async def recognize_business_card_async(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_recognizer_client: with open(path_to_sample_forms, "rb") as f: poller = await form_recognizer_client.begin_recognize_business_cards(business_card=f, locale="en-US") business_cards = await poller.result() for idx, business_card in enumerate(business_cards): - print("--------Recognizing business card #{}--------".format(idx+1)) + print("--------Recognizing business card #{}--------".format(idx + 1)) contact_names = business_card.fields.get("ContactNames") if contact_names: for contact_name in contact_names.value: - print("Contact First Name: {} has confidence: {}".format( - contact_name.value["FirstName"].value, contact_name.value["FirstName"].confidence - )) - print("Contact Last Name: {} has confidence: {}".format( - contact_name.value["LastName"].value, contact_name.value["LastName"].confidence - )) + print( + "Contact First Name: {} has confidence: {}".format( + contact_name.value["FirstName"].value, contact_name.value["FirstName"].confidence + ) + ) + print( + "Contact Last Name: {} has confidence: {}".format( + contact_name.value["LastName"].value, contact_name.value["LastName"].confidence + ) + ) company_names = business_card.fields.get("CompanyNames") if company_names: for company_name in company_names.value: @@ -107,5 +112,5 @@ async def main(): await sample.recognize_business_card_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_content_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_content_async.py index 1da1bfe2ef2b..81ad3dec9062 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_content_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_content_async.py @@ -38,15 +38,16 @@ def format_bounding_box(bounding_box): class RecognizeContentSampleAsync(object): async def recognize_content(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/forms/form_selection_mark.png")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/form_selection_mark.png") + ) # [START recognize_content_async] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - + async with FormRecognizerClient( endpoint=endpoint, credential=AzureKeyCredential(key) ) as form_recognizer_client: @@ -57,30 +58,30 @@ async def recognize_content(self): form_pages = await poller.result() for idx, content in enumerate(form_pages): - print("----Recognizing content from page #{}----".format(idx+1)) - print("Page has width: {} and height: {}, measured with unit: {}".format( - content.width, - content.height, - content.unit - )) + print("----Recognizing content from page #{}----".format(idx + 1)) + print( + "Page has width: {} and height: {}, measured with unit: {}".format( + content.width, content.height, content.unit + ) + ) for table_idx, table in enumerate(content.tables): - print("Table # {} has {} rows and {} columns".format(table_idx, table.row_count, table.column_count)) + print( + "Table # {} has {} rows and {} columns".format(table_idx, table.row_count, table.column_count) + ) print("Table # {} location on page: {}".format(table_idx, format_bounding_box(table.bounding_box))) for cell in table.cells: - print("...Cell[{}][{}] has text '{}' within bounding box '{}'".format( - cell.row_index, - cell.column_index, - cell.text, - format_bounding_box(cell.bounding_box) - )) + print( + "...Cell[{}][{}] has text '{}' within bounding box '{}'".format( + cell.row_index, cell.column_index, cell.text, format_bounding_box(cell.bounding_box) + ) + ) for line_idx, line in enumerate(content.lines): - print("Line # {} has word count '{}' and text '{}' within bounding box '{}'".format( - line_idx, - len(line.words), - line.text, - format_bounding_box(line.bounding_box) - )) + print( + "Line # {} has word count '{}' and text '{}' within bounding box '{}'".format( + line_idx, len(line.words), line.text, format_bounding_box(line.bounding_box) + ) + ) if line.appearance: if line.appearance.style_name == "handwriting" and line.appearance.style_confidence > 0.8: print("Text line '{}' is handwritten and might be a signature.".format(line.text)) @@ -88,11 +89,13 @@ async def recognize_content(self): print("...Word '{}' has a confidence of {}".format(word.text, word.confidence)) for selection_mark in content.selection_marks: - print("Selection mark is '{}' within bounding box '{}' and has a confidence of {}".format( - selection_mark.state, - format_bounding_box(selection_mark.bounding_box), - selection_mark.confidence - )) + print( + "Selection mark is '{}' within bounding box '{}' and has a confidence of {}".format( + selection_mark.state, + format_bounding_box(selection_mark.bounding_box), + selection_mark.confidence, + ) + ) print("----------------------------------------") # [END recognize_content_async] @@ -103,5 +106,5 @@ async def main(): await sample.recognize_content() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_custom_forms_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_custom_forms_async.py index da608bea3c21..f279f7bea86c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_custom_forms_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_custom_forms_async.py @@ -37,8 +37,9 @@ class RecognizeCustomFormsSampleAsync(object): async def recognize_custom_forms(self, custom_model_id): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/forms/Form_1.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/Form_1.jpg") + ) # [START recognize_custom_forms_async] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient @@ -59,7 +60,7 @@ async def recognize_custom_forms(self, custom_model_id): forms = await poller.result() for idx, form in enumerate(forms): - print("--------Recognizing Form #{}--------".format(idx+1)) + print("--------Recognizing Form #{}--------".format(idx + 1)) print("Form has type {}".format(form.form_type)) print("Form has form type confidence {}".format(form.form_type_confidence)) print("Form was analyzed with model with ID {}".format(form.model_id)) @@ -68,39 +69,41 @@ async def recognize_custom_forms(self, custom_model_id): # label_data is populated if you are using a model trained without labels, # since the service needs to make predictions for labels if not explicitly given to it. if field.label_data: - print("...Field '{}' has label '{}' with a confidence score of {}".format( - name, - field.label_data.text, - field.confidence - )) - - print("...Label '{}' has value '{}' with a confidence score of {}".format( - field.label_data.text if field.label_data else name, field.value, field.confidence - )) + print( + "...Field '{}' has label '{}' with a confidence score of {}".format( + name, field.label_data.text, field.confidence + ) + ) + + print( + "...Label '{}' has value '{}' with a confidence score of {}".format( + field.label_data.text if field.label_data else name, field.value, field.confidence + ) + ) # iterate over tables, lines, and selection marks on each page for page in form.pages: for i, table in enumerate(page.tables): print("\nTable {} on page {}".format(i + 1, table.page_number)) for cell in table.cells: - print("...Cell[{}][{}] has text '{}' with confidence {}".format( - cell.row_index, cell.column_index, cell.text, cell.confidence - )) + print( + "...Cell[{}][{}] has text '{}' with confidence {}".format( + cell.row_index, cell.column_index, cell.text, cell.confidence + ) + ) print("\nLines found on page {}".format(page.page_number)) for line in page.lines: print("...Line '{}' is made up of the following words: ".format(line.text)) for word in line.words: - print("......Word '{}' has a confidence of {}".format( - word.text, - word.confidence - )) + print("......Word '{}' has a confidence of {}".format(word.text, word.confidence)) if page.selection_marks: print("\nSelection marks found on page {}".format(page.page_number)) for selection_mark in page.selection_marks: - print("......Selection mark is '{}' and has a confidence of {}".format( - selection_mark.state, - selection_mark.confidence - )) + print( + "......Selection mark is '{}' and has a confidence of {}".format( + selection_mark.state, selection_mark.confidence + ) + ) print("-----------------------------------") # [END recognize_custom_forms_async] @@ -120,18 +123,17 @@ async def main(): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: container_sas_url = os.getenv("CONTAINER_SAS_URL_V2") if container_sas_url is not None: - model = await (await form_training_client.begin_training( - container_sas_url, use_training_labels=True)).result() + model = await ( + await form_training_client.begin_training(container_sas_url, use_training_labels=True) + ).result() model_id = model.model_id await sample.recognize_custom_forms(model_id) -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_identity_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_identity_documents_async.py index 2f88cfd0e26a..6f55e1670d6b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_identity_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_identity_documents_async.py @@ -30,8 +30,9 @@ class RecognizeIdDocumentsSampleAsync(object): async def recognize_identity_documents(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/id_documents/license.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/id_documents/license.jpg") + ) # [START recognize_identity_documents_async] from azure.core.credentials import AzureKeyCredential @@ -43,14 +44,14 @@ async def recognize_identity_documents(self): async with FormRecognizerClient( endpoint=endpoint, credential=AzureKeyCredential(key) ) as form_recognizer_client: - + with open(path_to_sample_forms, "rb") as f: poller = await form_recognizer_client.begin_recognize_identity_documents(identity_document=f) - + id_documents = await poller.result() for idx, id_document in enumerate(id_documents): - print("--------Recognizing ID document #{}--------".format(idx+1)) + print("--------Recognizing ID document #{}--------".format(idx + 1)) first_name = id_document.fields.get("FirstName") if first_name: print("First Name: {} has confidence: {}".format(first_name.value, first_name.confidence)) @@ -59,7 +60,11 @@ async def recognize_identity_documents(self): print("Last Name: {} has confidence: {}".format(last_name.value, last_name.confidence)) document_number = id_document.fields.get("DocumentNumber") if document_number: - print("Document Number: {} has confidence: {}".format(document_number.value, document_number.confidence)) + print( + "Document Number: {} has confidence: {}".format( + document_number.value, document_number.confidence + ) + ) dob = id_document.fields.get("DateOfBirth") if dob: print("Date of Birth: {} has confidence: {}".format(dob.value, dob.confidence)) @@ -74,15 +79,19 @@ async def recognize_identity_documents(self): print("Address: {} has confidence: {}".format(address.value, address.confidence)) country_region = id_document.fields.get("CountryRegion") if country_region: - print("Country/Region: {} has confidence: {}".format(country_region.value, country_region.confidence)) + print( + "Country/Region: {} has confidence: {}".format(country_region.value, country_region.confidence) + ) region = id_document.fields.get("Region") if region: print("Region: {} has confidence: {}".format(region.value, region.confidence)) # [END recognize_identity_documents_async] + async def main(): sample = RecognizeIdDocumentsSampleAsync() await sample.recognize_identity_documents() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_invoices_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_invoices_async.py index 51a6bdeed365..52d380192fbc 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_invoices_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_invoices_async.py @@ -30,8 +30,9 @@ class RecognizeInvoiceSampleAsync(object): async def recognize_invoice(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/forms/sample_invoice.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/forms/sample_invoice.jpg") + ) # [START recognize_invoices_async] from azure.core.credentials import AzureKeyCredential @@ -48,16 +49,22 @@ async def recognize_invoice(self): invoices = await poller.result() for idx, invoice in enumerate(invoices): - print("--------Recognizing invoice #{}--------".format(idx+1)) + print("--------Recognizing invoice #{}--------".format(idx + 1)) vendor_name = invoice.fields.get("VendorName") if vendor_name: print("Vendor Name: {} has confidence: {}".format(vendor_name.value, vendor_name.confidence)) vendor_address = invoice.fields.get("VendorAddress") if vendor_address: - print("Vendor Address: {} has confidence: {}".format(vendor_address.value, vendor_address.confidence)) + print( + "Vendor Address: {} has confidence: {}".format(vendor_address.value, vendor_address.confidence) + ) vendor_address_recipient = invoice.fields.get("VendorAddressRecipient") if vendor_address_recipient: - print("Vendor Address Recipient: {} has confidence: {}".format(vendor_address_recipient.value, vendor_address_recipient.confidence)) + print( + "Vendor Address Recipient: {} has confidence: {}".format( + vendor_address_recipient.value, vendor_address_recipient.confidence + ) + ) customer_name = invoice.fields.get("CustomerName") if customer_name: print("Customer Name: {} has confidence: {}".format(customer_name.value, customer_name.confidence)) @@ -66,10 +73,18 @@ async def recognize_invoice(self): print("Customer Id: {} has confidence: {}".format(customer_id.value, customer_id.confidence)) customer_address = invoice.fields.get("CustomerAddress") if customer_address: - print("Customer Address: {} has confidence: {}".format(customer_address.value, customer_address.confidence)) + print( + "Customer Address: {} has confidence: {}".format( + customer_address.value, customer_address.confidence + ) + ) customer_address_recipient = invoice.fields.get("CustomerAddressRecipient") if customer_address_recipient: - print("Customer Address Recipient: {} has confidence: {}".format(customer_address_recipient.value, customer_address_recipient.confidence)) + print( + "Customer Address Recipient: {} has confidence: {}".format( + customer_address_recipient.value, customer_address_recipient.confidence + ) + ) invoice_id = invoice.fields.get("InvoiceId") if invoice_id: print("Invoice Id: {} has confidence: {}".format(invoice_id.value, invoice_id.confidence)) @@ -84,28 +99,54 @@ async def recognize_invoice(self): print("Due Date: {} has confidence: {}".format(due_date.value, due_date.confidence)) purchase_order = invoice.fields.get("PurchaseOrder") if purchase_order: - print("Purchase Order: {} has confidence: {}".format(purchase_order.value, purchase_order.confidence)) + print( + "Purchase Order: {} has confidence: {}".format(purchase_order.value, purchase_order.confidence) + ) billing_address = invoice.fields.get("BillingAddress") if billing_address: - print("Billing Address: {} has confidence: {}".format(billing_address.value, billing_address.confidence)) + print( + "Billing Address: {} has confidence: {}".format( + billing_address.value, billing_address.confidence + ) + ) billing_address_recipient = invoice.fields.get("BillingAddressRecipient") if billing_address_recipient: - print("Billing Address Recipient: {} has confidence: {}".format(billing_address_recipient.value, billing_address_recipient.confidence)) + print( + "Billing Address Recipient: {} has confidence: {}".format( + billing_address_recipient.value, billing_address_recipient.confidence + ) + ) shipping_address = invoice.fields.get("ShippingAddress") if shipping_address: - print("Shipping Address: {} has confidence: {}".format(shipping_address.value, shipping_address.confidence)) + print( + "Shipping Address: {} has confidence: {}".format( + shipping_address.value, shipping_address.confidence + ) + ) shipping_address_recipient = invoice.fields.get("ShippingAddressRecipient") if shipping_address_recipient: - print("Shipping Address Recipient: {} has confidence: {}".format(shipping_address_recipient.value, shipping_address_recipient.confidence)) + print( + "Shipping Address Recipient: {} has confidence: {}".format( + shipping_address_recipient.value, shipping_address_recipient.confidence + ) + ) print("Invoice items:") for idx, item in enumerate(invoice.fields.get("Items").value): - print("...Item #{}".format(idx+1)) + print("...Item #{}".format(idx + 1)) item_description = item.value.get("Description") if item_description: - print("......Description: {} has confidence: {}".format(item_description.value, item_description.confidence)) + print( + "......Description: {} has confidence: {}".format( + item_description.value, item_description.confidence + ) + ) item_quantity = item.value.get("Quantity") if item_quantity: - print("......Quantity: {} has confidence: {}".format(item_quantity.value, item_quantity.confidence)) + print( + "......Quantity: {} has confidence: {}".format( + item_quantity.value, item_quantity.confidence + ) + ) unit = item.value.get("Unit") if unit: print("......Unit: {} has confidence: {}".format(unit.value, unit.confidence)) @@ -114,7 +155,11 @@ async def recognize_invoice(self): print("......Unit Price: {} has confidence: {}".format(unit_price.value, unit_price.confidence)) product_code = item.value.get("ProductCode") if product_code: - print("......Product Code: {} has confidence: {}".format(product_code.value, product_code.confidence)) + print( + "......Product Code: {} has confidence: {}".format( + product_code.value, product_code.confidence + ) + ) item_date = item.value.get("Date") if item_date: print("......Date: {} has confidence: {}".format(item_date.value, item_date.confidence)) @@ -132,34 +177,63 @@ async def recognize_invoice(self): print("Total Tax: {} has confidence: {}".format(total_tax.value, total_tax.confidence)) previous_unpaid_balance = invoice.fields.get("PreviousUnpaidBalance") if previous_unpaid_balance: - print("Previous Unpaid Balance: {} has confidence: {}".format(previous_unpaid_balance.value, previous_unpaid_balance.confidence)) + print( + "Previous Unpaid Balance: {} has confidence: {}".format( + previous_unpaid_balance.value, previous_unpaid_balance.confidence + ) + ) amount_due = invoice.fields.get("AmountDue") if amount_due: print("Amount Due: {} has confidence: {}".format(amount_due.value, amount_due.confidence)) service_start_date = invoice.fields.get("ServiceStartDate") if service_start_date: - print("Service Start Date: {} has confidence: {}".format(service_start_date.value, service_start_date.confidence)) + print( + "Service Start Date: {} has confidence: {}".format( + service_start_date.value, service_start_date.confidence + ) + ) service_end_date = invoice.fields.get("ServiceEndDate") if service_end_date: - print("Service End Date: {} has confidence: {}".format(service_end_date.value, service_end_date.confidence)) + print( + "Service End Date: {} has confidence: {}".format( + service_end_date.value, service_end_date.confidence + ) + ) service_address = invoice.fields.get("ServiceAddress") if service_address: - print("Service Address: {} has confidence: {}".format(service_address.value, service_address.confidence)) + print( + "Service Address: {} has confidence: {}".format( + service_address.value, service_address.confidence + ) + ) service_address_recipient = invoice.fields.get("ServiceAddressRecipient") if service_address_recipient: - print("Service Address Recipient: {} has confidence: {}".format(service_address_recipient.value, service_address_recipient.confidence)) + print( + "Service Address Recipient: {} has confidence: {}".format( + service_address_recipient.value, service_address_recipient.confidence + ) + ) remittance_address = invoice.fields.get("RemittanceAddress") if remittance_address: - print("Remittance Address: {} has confidence: {}".format(remittance_address.value, remittance_address.confidence)) + print( + "Remittance Address: {} has confidence: {}".format( + remittance_address.value, remittance_address.confidence + ) + ) remittance_address_recipient = invoice.fields.get("RemittanceAddressRecipient") if remittance_address_recipient: - print("Remittance Address Recipient: {} has confidence: {}".format(remittance_address_recipient.value, remittance_address_recipient.confidence)) + print( + "Remittance Address Recipient: {} has confidence: {}".format( + remittance_address_recipient.value, remittance_address_recipient.confidence + ) + ) # [END recognize_invoices_async] + async def main(): sample = RecognizeInvoiceSampleAsync() await sample.recognize_invoice() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_async.py index 668a4dd3a803..b04ea7fbf074 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_async.py @@ -32,8 +32,9 @@ class RecognizeReceiptsSampleAsync(object): async def recognize_receipts(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "..", "./sample_forms/receipt/contoso-allinone.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/receipt/contoso-allinone.jpg") + ) # [START recognize_receipts_async] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient @@ -51,7 +52,7 @@ async def recognize_receipts(self): receipts = await poller.result() for idx, receipt in enumerate(receipts): - print("--------Recognizing receipt #{}--------".format(idx+1)) + print("--------Recognizing receipt #{}--------".format(idx + 1)) receipt_type = receipt.fields.get("ReceiptType") if receipt_type: print("Receipt Type: {} has confidence: {}".format(receipt_type.value, receipt_type.confidence)) @@ -60,23 +61,41 @@ async def recognize_receipts(self): print("Merchant Name: {} has confidence: {}".format(merchant_name.value, merchant_name.confidence)) transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print("Transaction Date: {} has confidence: {}".format(transaction_date.value, transaction_date.confidence)) + print( + "Transaction Date: {} has confidence: {}".format( + transaction_date.value, transaction_date.confidence + ) + ) if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): - print("...Item #{}".format(idx+1)) + print("...Item #{}".format(idx + 1)) item_name = item.value.get("Name") if item_name: - print("......Item Name: {} has confidence: {}".format(item_name.value, item_name.confidence)) + print( + "......Item Name: {} has confidence: {}".format(item_name.value, item_name.confidence) + ) item_quantity = item.value.get("Quantity") if item_quantity: - print("......Item Quantity: {} has confidence: {}".format(item_quantity.value, item_quantity.confidence)) + print( + "......Item Quantity: {} has confidence: {}".format( + item_quantity.value, item_quantity.confidence + ) + ) item_price = item.value.get("Price") if item_price: - print("......Individual Item Price: {} has confidence: {}".format(item_price.value, item_price.confidence)) + print( + "......Individual Item Price: {} has confidence: {}".format( + item_price.value, item_price.confidence + ) + ) item_total_price = item.value.get("TotalPrice") if item_total_price: - print("......Total Item Price: {} has confidence: {}".format(item_total_price.value, item_total_price.confidence)) + print( + "......Total Item Price: {} has confidence: {}".format( + item_total_price.value, item_total_price.confidence + ) + ) subtotal = receipt.fields.get("Subtotal") if subtotal: print("Subtotal: {} has confidence: {}".format(subtotal.value, subtotal.confidence)) @@ -98,5 +117,5 @@ async def main(): await sample.recognize_receipts() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_from_url_async.py index e49756578781..964ae2fabd79 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_recognize_receipts_from_url_async.py @@ -47,7 +47,7 @@ async def recognize_receipts_from_url(self): receipts = await poller.result() for idx, receipt in enumerate(receipts): - print("--------Recognizing receipt #{}--------".format(idx+1)) + print("--------Recognizing receipt #{}--------".format(idx + 1)) receipt_type = receipt.fields.get("ReceiptType") if receipt_type: print("Receipt Type: {} has confidence: {}".format(receipt_type.value, receipt_type.confidence)) @@ -56,23 +56,41 @@ async def recognize_receipts_from_url(self): print("Merchant Name: {} has confidence: {}".format(merchant_name.value, merchant_name.confidence)) transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print("Transaction Date: {} has confidence: {}".format(transaction_date.value, transaction_date.confidence)) + print( + "Transaction Date: {} has confidence: {}".format( + transaction_date.value, transaction_date.confidence + ) + ) if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): - print("...Item #{}".format(idx+1)) + print("...Item #{}".format(idx + 1)) item_name = item.value.get("Name") if item_name: - print("......Item Name: {} has confidence: {}".format(item_name.value, item_name.confidence)) + print( + "......Item Name: {} has confidence: {}".format(item_name.value, item_name.confidence) + ) item_quantity = item.value.get("Quantity") if item_quantity: - print("......Item Quantity: {} has confidence: {}".format(item_quantity.value, item_quantity.confidence)) + print( + "......Item Quantity: {} has confidence: {}".format( + item_quantity.value, item_quantity.confidence + ) + ) item_price = item.value.get("Price") if item_price: - print("......Individual Item Price: {} has confidence: {}".format(item_price.value, item_price.confidence)) + print( + "......Individual Item Price: {} has confidence: {}".format( + item_price.value, item_price.confidence + ) + ) item_total_price = item.value.get("TotalPrice") if item_total_price: - print("......Total Item Price: {} has confidence: {}".format(item_total_price.value, item_total_price.confidence)) + print( + "......Total Item Price: {} has confidence: {}".format( + item_total_price.value, item_total_price.confidence + ) + ) subtotal = receipt.fields.get("Subtotal") if subtotal: print("Subtotal: {} has confidence: {}".format(subtotal.value, subtotal.confidence)) @@ -94,5 +112,5 @@ async def main(): await sample.recognize_receipts_from_url() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_strongly_typing_recognized_form_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_strongly_typing_recognized_form_async.py index a83c33a51fa7..03dc7de8697b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_strongly_typing_recognized_form_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_strongly_typing_recognized_form_async.py @@ -41,41 +41,41 @@ class Receipt(object): """ def __init__(self, form: RecognizedForm) -> None: - self.receipt_type: FormField = form.fields.get("ReceiptType", FormField()) - self.merchant_name: FormField = form.fields.get("MerchantName", FormField()) - self.merchant_address: FormField = form.fields.get("MerchantAddress", FormField()) - self.merchant_phone_number: FormField = form.fields.get("MerchantPhoneNumber", FormField()) - self.receipt_items: List[ReceiptItem] = self.convert_to_receipt_item(form.fields.get("Items", FormField())) - self.subtotal: FormField = form.fields.get("Subtotal", FormField()) - self.tax: FormField = form.fields.get("Tax", FormField()) - self.tip: FormField = form.fields.get("Tip", FormField()) - self.total: FormField = form.fields.get("Total", FormField()) - self.transaction_date: FormField = form.fields.get("TransactionDate", FormField()) - self.transaction_time: FormField = form.fields.get("TransactionTime", FormField()) + self.receipt_type: FormField = form.fields.get("ReceiptType", FormField()) + self.merchant_name: FormField = form.fields.get("MerchantName", FormField()) + self.merchant_address: FormField = form.fields.get("MerchantAddress", FormField()) + self.merchant_phone_number: FormField = form.fields.get("MerchantPhoneNumber", FormField()) + self.receipt_items: List[ReceiptItem] = self.convert_to_receipt_item(form.fields.get("Items", FormField())) + self.subtotal: FormField = form.fields.get("Subtotal", FormField()) + self.tax: FormField = form.fields.get("Tax", FormField()) + self.tip: FormField = form.fields.get("Tip", FormField()) + self.total: FormField = form.fields.get("Total", FormField()) + self.transaction_date: FormField = form.fields.get("TransactionDate", FormField()) + self.transaction_time: FormField = form.fields.get("TransactionTime", FormField()) def convert_to_receipt_item(self, items: FormField) -> List["ReceiptItem"]: - """Converts Items in a receipt to a list of strongly-typed ReceiptItem - """ + """Converts Items in a receipt to a list of strongly-typed ReceiptItem""" if items is None: return [] return [ReceiptItem(item) for item in items.value] class ReceiptItem(object): - """Creates a strongly-typed ReceiptItem for every receipt item found in a RecognizedForm - """ + """Creates a strongly-typed ReceiptItem for every receipt item found in a RecognizedForm""" def __init__(self, item: FormField) -> None: - self.name: FormField = item.value.get("Name", FormField()) - self.quantity: FormField = item.value.get("Quantity", FormField()) - self.price: FormField = item.value.get("Price", FormField()) - self.total_price: FormField = item.value.get("TotalPrice", FormField()) + self.name: FormField = item.value.get("Name", FormField()) + self.quantity: FormField = item.value.get("Quantity", FormField()) + self.price: FormField = item.value.get("Price", FormField()) + self.total_price: FormField = item.value.get("TotalPrice", FormField()) class StronglyTypedRecognizedFormSampleAsync(object): async def strongly_typed_receipt_async(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/receipt/contoso-allinone.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "..", "./sample_forms/receipt/contoso-allinone.jpg") + ) from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient @@ -93,15 +93,31 @@ async def strongly_typed_receipt_async(self): for receipt in receipts: my_receipt = Receipt(receipt) - print("Receipt Type: {} has confidence: {}".format(my_receipt.receipt_type.value, my_receipt.receipt_type.confidence)) - print("Merchant Name: {} has confidence: {}".format(my_receipt.merchant_name.value, my_receipt.merchant_name.confidence)) - print("Transaction Date: {} has confidence: {}".format(my_receipt.transaction_date.value, my_receipt.transaction_date.confidence)) + print( + "Receipt Type: {} has confidence: {}".format( + my_receipt.receipt_type.value, my_receipt.receipt_type.confidence + ) + ) + print( + "Merchant Name: {} has confidence: {}".format( + my_receipt.merchant_name.value, my_receipt.merchant_name.confidence + ) + ) + print( + "Transaction Date: {} has confidence: {}".format( + my_receipt.transaction_date.value, my_receipt.transaction_date.confidence + ) + ) print("Receipt items:") for item in my_receipt.receipt_items: print("...Item Name: {} has confidence: {}".format(item.name.value, item.name.confidence)) print("...Item Quantity: {} has confidence: {}".format(item.quantity.value, item.quantity.confidence)) print("...Individual Item Price: {} has confidence: {}".format(item.price.value, item.price.confidence)) - print("...Total Item Price: {} has confidence: {}".format(item.total_price.value, item.total_price.confidence)) + print( + "...Total Item Price: {} has confidence: {}".format( + item.total_price.value, item.total_price.confidence + ) + ) print("Subtotal: {} has confidence: {}".format(my_receipt.subtotal.value, my_receipt.subtotal.confidence)) print("Tax: {} has confidence: {}".format(my_receipt.tax.value, my_receipt.tax.confidence)) print("Tip: {} has confidence: {}".format(my_receipt.tip.value, my_receipt.tip.confidence)) @@ -113,5 +129,5 @@ async def main(): await sample.strongly_typed_receipt_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py index 1dec18e2d926..b64aaf9ca5d6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py @@ -44,9 +44,7 @@ async def train_model_with_labels(self): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] container_sas_url = os.environ["CONTAINER_SAS_URL_V2"] - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with form_training_client: poller = await form_training_client.begin_training( @@ -67,13 +65,13 @@ async def train_model_with_labels(self): # The labels are based on the ones you gave the training document. for submodel in model.submodels: print("...The submodel has model ID: {}".format(submodel.model_id)) - print("...The submodel with form type {} has an average accuracy '{}'".format( - submodel.form_type, submodel.accuracy - )) + print( + "...The submodel with form type {} has an average accuracy '{}'".format( + submodel.form_type, submodel.accuracy + ) + ) for name, field in submodel.fields.items(): - print("...The model found the field '{}' with an accuracy of {}".format( - name, field.accuracy - )) + print("...The model found the field '{}' with an accuracy of {}".format(name, field.accuracy)) # Training result information for doc in model.training_documents: @@ -88,5 +86,5 @@ async def main(): await sample.train_model_with_labels() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_without_labels_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_without_labels_async.py index bf0af862c44d..883ccd926e45 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_without_labels_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_without_labels_async.py @@ -42,9 +42,7 @@ async def train_model_without_labels(self): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] container_sas_url = os.environ["CONTAINER_SAS_URL_V2"] - async with FormTrainingClient( - endpoint, AzureKeyCredential(key) - ) as form_training_client: + async with FormTrainingClient(endpoint, AzureKeyCredential(key)) as form_training_client: poller = await form_training_client.begin_training(container_sas_url, use_training_labels=False) model = await poller.result() @@ -61,10 +59,8 @@ async def train_model_without_labels(self): for submodel in model.submodels: print("...The submodel has form type '{}'".format(submodel.form_type)) for name, field in submodel.fields.items(): - print("...The model found field '{}' to have label '{}'".format( - name, field.label - )) - # [END training_async] + print("...The model found field '{}' to have label '{}'".format(name, field.label)) + # [END training_async] # Training result information for doc in model.training_documents: print("Document name: {}".format(doc.name)) @@ -78,5 +74,5 @@ async def main(): await sample.train_model_without_labels() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_authentication_v3_1.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_authentication_v3_1.py index 1ff6d78935d7..8d0a44755a5e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_authentication_v3_1.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_authentication_v3_1.py @@ -41,6 +41,7 @@ def authentication_with_api_key_credential_form_recognizer_client(self): # [START create_fr_client_with_key] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] @@ -69,6 +70,7 @@ def authentication_with_api_key_credential_form_training_client(self): # [START create_ft_client_with_key] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormTrainingClient + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] @@ -92,7 +94,7 @@ def authentication_with_azure_active_directory_form_training_client(self): properties = form_training_client.get_account_properties() -if __name__ == '__main__': +if __name__ == "__main__": sample = AuthenticationSample() sample.authentication_with_api_key_credential_form_recognizer_client() sample.authentication_with_azure_active_directory_form_recognizer_client() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_convert_to_and_from_dict_v3_1.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_convert_to_and_from_dict_v3_1.py index c5a6e4420769..4eaa29922c38 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_convert_to_and_from_dict_v3_1.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_convert_to_and_from_dict_v3_1.py @@ -25,6 +25,7 @@ import os import json + def convert_to_and_from_dict(): path_to_sample_forms = os.path.abspath( os.path.join( @@ -42,12 +43,10 @@ def convert_to_and_from_dict(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_identity_documents(identity_document=f) - + id_documents = poller.result() # convert the received model to a dictionary @@ -56,7 +55,7 @@ def convert_to_and_from_dict(): # save the dictionary as JSON content in a JSON file, use the AzureJSONEncoder # to help make types, such as dates, JSON serializable # NOTE: AzureJSONEncoder is only available with azure.core>=1.18.0. - with open('data.json', 'w') as output_file: + with open("data.json", "w") as output_file: json.dump(recognized_form_dict, output_file, cls=AzureJSONEncoder) # convert the dictionary back to the original model @@ -64,7 +63,7 @@ def convert_to_and_from_dict(): # use the model as normal for idx, id_document in enumerate(model): - print("--------Recognizing converted ID document #{}--------".format(idx+1)) + print("--------Recognizing converted ID document #{}--------".format(idx + 1)) first_name = id_document.fields.get("FirstName") if first_name: print("First Name: {} has confidence: {}".format(first_name.value, first_name.confidence)) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_copy_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_copy_model.py index ecd22f674f00..b62576d5410a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_copy_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_copy_model.py @@ -53,10 +53,7 @@ def copy_model(self, custom_model_id): # [START get_copy_authorization] target_client = FormTrainingClient(endpoint=target_endpoint, credential=AzureKeyCredential(target_key)) - target = target_client.get_copy_authorization( - resource_region=target_region, - resource_id=target_resource_id - ) + target = target_client.get_copy_authorization(resource_region=target_region, resource_id=target_resource_id) # model ID that target client will use to access the model once copy is complete print("Model ID: {}".format(target["modelId"])) # [END get_copy_authorization] @@ -65,8 +62,7 @@ def copy_model(self, custom_model_id): source_client = FormTrainingClient(endpoint=source_endpoint, credential=AzureKeyCredential(source_key)) poller = source_client.begin_copy_model( - model_id=source_model_id, - target=target # output from target client's call to get_copy_authorization() + model_id=source_model_id, target=target # output from target client's call to get_copy_authorization() ) copied_over_model = poller.result() @@ -75,7 +71,7 @@ def copy_model(self, custom_model_id): # [END begin_copy_model] -if __name__ == '__main__': +if __name__ == "__main__": sample = CopyModelSample() model_id = None if os.getenv("CONTAINER_SAS_URL_V2"): @@ -89,9 +85,7 @@ def copy_model(self, custom_model_id): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) container_sas_url = os.getenv("CONTAINER_SAS_URL_V2") if container_sas_url is not None: model = form_training_client.begin_training(container_sas_url, use_training_labels=True).result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_create_composed_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_create_composed_model.py index f507f4b4cb5f..6f5f27d5f37b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_create_composed_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_create_composed_model.py @@ -47,10 +47,10 @@ def create_composed_model(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - po_supplies = os.environ['PURCHASE_ORDER_OFFICE_SUPPLIES_SAS_URL_V2'] - po_equipment = os.environ['PURCHASE_ORDER_OFFICE_EQUIPMENT_SAS_URL_V2'] - po_furniture = os.environ['PURCHASE_ORDER_OFFICE_FURNITURE_SAS_URL_V2'] - po_cleaning_supplies = os.environ['PURCHASE_ORDER_OFFICE_CLEANING_SUPPLIES_SAS_URL_V2'] + po_supplies = os.environ["PURCHASE_ORDER_OFFICE_SUPPLIES_SAS_URL_V2"] + po_equipment = os.environ["PURCHASE_ORDER_OFFICE_EQUIPMENT_SAS_URL_V2"] + po_furniture = os.environ["PURCHASE_ORDER_OFFICE_FURNITURE_SAS_URL_V2"] + po_cleaning_supplies = os.environ["PURCHASE_ORDER_OFFICE_CLEANING_SUPPLIES_SAS_URL_V2"] form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) supplies_poller = form_training_client.begin_training( @@ -74,7 +74,7 @@ def create_composed_model(self): supplies_model.model_id, equipment_model.model_id, furniture_model.model_id, - cleaning_supplies_model.model_id + cleaning_supplies_model.model_id, ] poller = form_training_client.begin_create_composed_model( @@ -95,13 +95,13 @@ def create_composed_model(self): print("Recognized fields:") for submodel in model.submodels: print("The submodel has model ID: {}".format(submodel.model_id)) - print("...The submodel with form type {} has an average accuracy '{}'".format( - submodel.form_type, submodel.accuracy - )) + print( + "...The submodel with form type {} has an average accuracy '{}'".format( + submodel.form_type, submodel.accuracy + ) + ) for name, field in submodel.fields.items(): - print("...The model found the field '{}' with an accuracy of {}".format( - name, field.accuracy - )) + print("...The model found the field '{}' with an accuracy of {}".format(name, field.accuracy)) # Training result information for doc in model.training_documents: @@ -112,6 +112,6 @@ def create_composed_model(self): print("Document errors: {}".format(doc.errors)) -if __name__ == '__main__': +if __name__ == "__main__": sample = ComposedModelSample() sample.create_composed_model() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_labeled_tables.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_labeled_tables.py index c014cb1dd1ee..baa3cbda92f6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_labeled_tables.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_labeled_tables.py @@ -51,18 +51,15 @@ def test_recognize_tables_fixed_rows(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id_fixed_rows_table = os.getenv("MODEL_ID_FIXED_ROW_TABLES", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/forms/label_table_fixed_rows1.pdf")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/label_table_fixed_rows1.pdf") + ) with open(path_to_sample_forms, "rb") as f: form = f.read() - poller = form_recognizer_client.begin_recognize_custom_forms( - model_id=model_id_fixed_rows_table, form=form - ) + poller = form_recognizer_client.begin_recognize_custom_forms(model_id=model_id_fixed_rows_table, form=form) result: list[RecognizedForm] = poller.result() @@ -75,15 +72,17 @@ def test_recognize_tables_fixed_rows(self, custom_model_id): for row_name, column in field.value.items(): print("Row '{}' has columns:".format(row_name)) for column_name, column_value in column.value.items(): - print("...Column '{}' with value '{}' and a confidence score of {}".format( - column_name, column_value.value, column_value.confidence - )) + print( + "...Column '{}' with value '{}' and a confidence score of {}".format( + column_name, column_value.value, column_value.confidence + ) + ) else: # non-table tagged FormField - print("...Field '{}' has value '{}' with a confidence score of {}".format( - name, - field.value, - field.confidence - )) + print( + "...Field '{}' has value '{}' with a confidence score of {}".format( + name, field.value, field.confidence + ) + ) def test_recognize_tables_dynamic_rows(self, custom_model_id): from azure.core.credentials import AzureKeyCredential @@ -93,18 +92,15 @@ def test_recognize_tables_dynamic_rows(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id_dynamic_rows_table = os.getenv("MODEL_ID_DYNAMIC_ROW_TABLES", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/forms/label_table_dynamic_rows1.pdf")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/label_table_dynamic_rows1.pdf") + ) with open(path_to_sample_forms, "rb") as f: form = f.read() - poller = form_recognizer_client.begin_recognize_custom_forms( - model_id=model_id_dynamic_rows_table, form=form - ) + poller = form_recognizer_client.begin_recognize_custom_forms(model_id=model_id_dynamic_rows_table, form=form) result: list[RecognizedForm] = poller.result() @@ -115,20 +111,22 @@ def test_recognize_tables_dynamic_rows(self, custom_model_id): # (if different than sample training docs) if name == "table": for idx, row in enumerate(field.value): - print("Row {}".format(idx+1)) + print("Row {}".format(idx + 1)) for column_name, row_value in row.value.items(): - print("...Column '{}' with value '{}' and a confidence score of {}".format( - column_name, row_value.value, row_value.confidence - )) + print( + "...Column '{}' with value '{}' and a confidence score of {}".format( + column_name, row_value.value, row_value.confidence + ) + ) else: # non-table tagged FormField - print("...Field '{}' has value '{}' with a confidence score of {}".format( - name, - field.value, - field.confidence - )) + print( + "...Field '{}' has value '{}' with a confidence score of {}".format( + name, field.value, field.confidence + ) + ) -if __name__ == '__main__': +if __name__ == "__main__": sample = TestDifferentiateOutputLabeledTables() fixed_model_id = None dynamic_model_id = None @@ -145,9 +143,7 @@ def test_recognize_tables_dynamic_rows(self, custom_model_id): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) if fixed: model = form_training_client.begin_training(fixed, use_training_labels=True).result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_models_trained_with_and_without_labels.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_models_trained_with_and_without_labels.py index 7fde86da59d1..f95af2185b78 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_models_trained_with_and_without_labels.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_differentiate_output_models_trained_with_and_without_labels.py @@ -44,6 +44,7 @@ def format_bounding_box(bounding_box): return "N/A" return ", ".join(["[{}, {}]".format(p.x, p.y) for p in bounding_box]) + class DifferentiateOutputModelsTrainedWithAndWithoutLabels(object): def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): @@ -55,11 +56,11 @@ def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): model_trained_with_labels_id = os.getenv("ID_OF_MODEL_TRAINED_WITH_LABELS", labeled_model_id) model_trained_without_labels_id = os.getenv("ID_OF_MODEL_TRAINED_WITHOUT_LABELS", unlabeled_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/Form_1.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/Form_1.jpg") + ) with open(path_to_sample_forms, "rb") as f: form = f.read() @@ -80,12 +81,11 @@ def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): print("---------Recognizing forms using models trained with labeled data---------") for labeled_form in forms_with_labeled_model: for name, field in labeled_form.fields.items(): - print("...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.value, - format_bounding_box(field.value_data.bounding_box), - field.confidence - )) + print( + "...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( + name, field.value, format_bounding_box(field.value_data.bounding_box), field.confidence + ) + ) # Find a specific labeled field. Substitute "Merchant" with your specific training-time label try: @@ -103,18 +103,19 @@ def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): print("-------Recognizing forms using models trained with unlabeled data-------") for unlabeled_form in forms_with_unlabeled_model: for name, field in unlabeled_form.fields.items(): - print("...Field '{}' has label '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.label_data.text, - format_bounding_box(field.label_data.bounding_box), - field.confidence - )) - print("...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.value, - format_bounding_box(field.value_data.bounding_box), - field.confidence - )) + print( + "...Field '{}' has label '{}' within bounding box '{}', with a confidence score of {}".format( + name, + field.label_data.text, + format_bounding_box(field.label_data.bounding_box), + field.confidence, + ) + ) + print( + "...Field '{}' has value '{}' within bounding box '{}', with a confidence score of {}".format( + name, field.value, format_bounding_box(field.value_data.bounding_box), field.confidence + ) + ) # Find the value of a specific unlabeled field. Will only be found if sample training forms used print("\nValue for a specific unlabeled field:") @@ -125,7 +126,7 @@ def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): print("The Vendor Name is {}\n".format(field.value)) -if __name__ == '__main__': +if __name__ == "__main__": sample = DifferentiateOutputModelsTrainedWithAndWithoutLabels() labeled_model_id = None unlabeled_model_id = None @@ -142,9 +143,7 @@ def recognize_custom_forms(self, labeled_model_id, unlabeled_model_id): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) if labeled: model = form_training_client.begin_training(labeled, use_training_labels=True).result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_get_bounding_boxes.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_get_bounding_boxes.py index f7e4be3a06c8..96b84c50e8c8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_get_bounding_boxes.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_get_bounding_boxes.py @@ -32,8 +32,7 @@ def format_bounding_box(bounding_box): - """The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left. - """ + """The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left.""" if not bounding_box: return "N/A" return ", ".join(["[{}, {}]".format(p.x, p.y) for p in bounding_box]) @@ -49,12 +48,11 @@ def get_bounding_boxes(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id = os.getenv("CUSTOM_TRAINED_MODEL_ID", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/forms/Form_1.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/Form_1.jpg") + ) # Make sure your form's type is included in the list of form types the custom model can recognize with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_custom_forms( @@ -63,60 +61,67 @@ def get_bounding_boxes(self, custom_model_id): forms = poller.result() for idx, form in enumerate(forms): - print("--------RECOGNIZING FORM #{}--------".format(idx+1)) + print("--------RECOGNIZING FORM #{}--------".format(idx + 1)) print("Form has type: {}".format(form.form_type)) for name, field in form.fields.items(): # each field is of type FormField - print("...Field '{}' has label '{}' with value '{}' within bounding box '{}', with a confidence score of {}".format( - name, - field.label_data.text if field.label_data else name, - field.value, - format_bounding_box(field.value_data.bounding_box), - field.confidence - )) + print( + "...Field '{}' has label '{}' with value '{}' within bounding box '{}', with a confidence score of {}".format( + name, + field.label_data.text if field.label_data else name, + field.value, + format_bounding_box(field.value_data.bounding_box), + field.confidence, + ) + ) for page in form.pages: - print("-------Recognizing Page #{} of Form #{}-------".format(page.page_number, idx+1)) - print("Page has width '{}' and height '{}' measure with unit: {}, and has text angle '{}'".format( - page.width, page.height, page.unit, page.text_angle - )) + print("-------Recognizing Page #{} of Form #{}-------".format(page.page_number, idx + 1)) + print( + "Page has width '{}' and height '{}' measure with unit: {}, and has text angle '{}'".format( + page.width, page.height, page.unit, page.text_angle + ) + ) for table in page.tables: print("Table on page has the following cells:") for cell in table.cells: - print("...Cell[{}][{}] has text '{}' with confidence {} based on the following words: ".format( - cell.row_index, cell.column_index, cell.text, cell.confidence - )) + print( + "...Cell[{}][{}] has text '{}' with confidence {} based on the following words: ".format( + cell.row_index, cell.column_index, cell.text, cell.confidence + ) + ) # field_elements is only populated if you set include_field_elements=True # It is a heterogeneous list of FormWord, FormLine, and FormSelectionMark for element in cell.field_elements: if element.kind == "word": - print("......Word '{}' within bounding box '{}' has a confidence of {}".format( - element.text, - format_bounding_box(element.bounding_box), - element.confidence - )) + print( + "......Word '{}' within bounding box '{}' has a confidence of {}".format( + element.text, format_bounding_box(element.bounding_box), element.confidence + ) + ) elif element.kind == "line": - print("......Line '{}' within bounding box '{}' has the following words: ".format( - element.text, - format_bounding_box(element.bounding_box) - )) + print( + "......Line '{}' within bounding box '{}' has the following words: ".format( + element.text, format_bounding_box(element.bounding_box) + ) + ) for word in element.words: - print(".........Word '{}' within bounding box '{}' has a confidence of {}".format( - word.text, - format_bounding_box(word.bounding_box), - word.confidence - )) + print( + ".........Word '{}' within bounding box '{}' has a confidence of {}".format( + word.text, format_bounding_box(word.bounding_box), word.confidence + ) + ) elif element.kind == "selectionMark": - print("......Selection mark is '{}' within bounding box '{}' " - "and has a confidence of {}".format( - element.state, - format_bounding_box(element.bounding_box), - element.confidence - )) + print( + "......Selection mark is '{}' within bounding box '{}' " + "and has a confidence of {}".format( + element.state, format_bounding_box(element.bounding_box), element.confidence + ) + ) print("---------------------------------------------------") print("-----------------------------------") -if __name__ == '__main__': +if __name__ == "__main__": sample = GetBoundingBoxesSample() model_id = None if os.getenv("CONTAINER_SAS_URL_V2"): @@ -130,9 +135,7 @@ def get_bounding_boxes(self, custom_model_id): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) container_sas_url = os.getenv("CONTAINER_SAS_URL_V2") if container_sas_url is not None: model = form_training_client.begin_training(container_sas_url, use_training_labels=False).result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_manage_custom_models.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_manage_custom_models.py index d9d18f740683..37aa3a20aea8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_manage_custom_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_manage_custom_models.py @@ -40,9 +40,11 @@ def manage_custom_models(self): form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # First, we see how many custom models we have, and what our limit is account_properties = form_training_client.get_account_properties() - print("Our account has {} custom models, and we can have at most {} custom models\n".format( - account_properties.custom_model_count, account_properties.custom_model_limit - )) + print( + "Our account has {} custom models, and we can have at most {} custom models\n".format( + account_properties.custom_model_count, account_properties.custom_model_limit + ) + ) # [END get_account_properties] # Next, we get a paged list of all of our custom models @@ -80,6 +82,6 @@ def manage_custom_models(self): # [END delete_model] -if __name__ == '__main__': +if __name__ == "__main__": sample = ManageCustomModelsSample() sample.manage_custom_models() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_business_cards.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_business_cards.py index 03fcc8f8e7f0..53d28f9e7ef8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_business_cards.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_business_cards.py @@ -29,8 +29,11 @@ class RecognizeBusinessCardSample(object): def recognize_business_card(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/business_cards/business-card-english.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join( + os.path.abspath(__file__), "..", "..", "./sample_forms/business_cards/business-card-english.jpg" + ) + ) # [START recognize_business_cards] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient @@ -38,24 +41,26 @@ def recognize_business_card(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_business_cards(business_card=f, locale="en-US") business_cards = poller.result() for idx, business_card in enumerate(business_cards): - print("--------Recognizing business card #{}--------".format(idx+1)) + print("--------Recognizing business card #{}--------".format(idx + 1)) contact_names = business_card.fields.get("ContactNames") if contact_names: for contact_name in contact_names.value: - print("Contact First Name: {} has confidence: {}".format( - contact_name.value["FirstName"].value, contact_name.value["FirstName"].confidence - )) - print("Contact Last Name: {} has confidence: {}".format( - contact_name.value["LastName"].value, contact_name.value["LastName"].confidence - )) + print( + "Contact First Name: {} has confidence: {}".format( + contact_name.value["FirstName"].value, contact_name.value["FirstName"].confidence + ) + ) + print( + "Contact Last Name: {} has confidence: {}".format( + contact_name.value["LastName"].value, contact_name.value["LastName"].confidence + ) + ) company_names = business_card.fields.get("CompanyNames") if company_names: for company_name in company_names.value: @@ -99,6 +104,6 @@ def recognize_business_card(self): # [END recognize_business_cards] -if __name__ == '__main__': +if __name__ == "__main__": sample = RecognizeBusinessCardSample() sample.recognize_business_card() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_content.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_content.py index 8489b8db20a6..513173b3a89f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_content.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_content.py @@ -37,8 +37,9 @@ def format_bounding_box(bounding_box): class RecognizeContentSample(object): def recognize_content(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/forms/form_selection_mark.png")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/form_selection_mark.png") + ) # [START recognize_content] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient @@ -52,30 +53,28 @@ def recognize_content(self): form_pages = poller.result() for idx, content in enumerate(form_pages): - print("----Recognizing content from page #{}----".format(idx+1)) - print("Page has width: {} and height: {}, measured with unit: {}".format( - content.width, - content.height, - content.unit - )) + print("----Recognizing content from page #{}----".format(idx + 1)) + print( + "Page has width: {} and height: {}, measured with unit: {}".format( + content.width, content.height, content.unit + ) + ) for table_idx, table in enumerate(content.tables): print("Table # {} has {} rows and {} columns".format(table_idx, table.row_count, table.column_count)) print("Table # {} location on page: {}".format(table_idx, format_bounding_box(table.bounding_box))) for cell in table.cells: - print("...Cell[{}][{}] has text '{}' within bounding box '{}'".format( - cell.row_index, - cell.column_index, - cell.text, - format_bounding_box(cell.bounding_box) - )) + print( + "...Cell[{}][{}] has text '{}' within bounding box '{}'".format( + cell.row_index, cell.column_index, cell.text, format_bounding_box(cell.bounding_box) + ) + ) for line_idx, line in enumerate(content.lines): - print("Line # {} has word count '{}' and text '{}' within bounding box '{}'".format( - line_idx, - len(line.words), - line.text, - format_bounding_box(line.bounding_box) - )) + print( + "Line # {} has word count '{}' and text '{}' within bounding box '{}'".format( + line_idx, len(line.words), line.text, format_bounding_box(line.bounding_box) + ) + ) if line.appearance: if line.appearance.style_name == "handwriting" and line.appearance.style_confidence > 0.8: print("Text line '{}' is handwritten and might be a signature.".format(line.text)) @@ -83,16 +82,18 @@ def recognize_content(self): print("...Word '{}' has a confidence of {}".format(word.text, word.confidence)) for selection_mark in content.selection_marks: - print("Selection mark is '{}' within bounding box '{}' and has a confidence of {}".format( - selection_mark.state, - format_bounding_box(selection_mark.bounding_box), - selection_mark.confidence - )) + print( + "Selection mark is '{}' within bounding box '{}' and has a confidence of {}".format( + selection_mark.state, + format_bounding_box(selection_mark.bounding_box), + selection_mark.confidence, + ) + ) print("----------------------------------------") # [END recognize_content] -if __name__ == '__main__': +if __name__ == "__main__": sample = RecognizeContentSample() sample.recognize_content() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_custom_forms.py index 56d4c72bb1f7..a4cb2307c7e8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_custom_forms.py @@ -36,8 +36,9 @@ class RecognizeCustomForms(object): def recognize_custom_forms(self, custom_model_id): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/forms/Form_1.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/Form_1.jpg") + ) # [START recognize_custom_forms] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient @@ -46,9 +47,7 @@ def recognize_custom_forms(self, custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id = os.getenv("CUSTOM_TRAINED_MODEL_ID", custom_model_id) - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Make sure your form's type is included in the list of form types the custom model can recognize with open(path_to_sample_forms, "rb") as f: @@ -58,7 +57,7 @@ def recognize_custom_forms(self, custom_model_id): forms = poller.result() for idx, form in enumerate(forms): - print("--------Recognizing Form #{}--------".format(idx+1)) + print("--------Recognizing Form #{}--------".format(idx + 1)) print("Form has type {}".format(form.form_type)) print("Form has form type confidence {}".format(form.form_type_confidence)) print("Form was analyzed with model with ID {}".format(form.model_id)) @@ -67,45 +66,47 @@ def recognize_custom_forms(self, custom_model_id): # label_data is populated if you are using a model trained without labels, # since the service needs to make predictions for labels if not explicitly given to it. if field.label_data: - print("...Field '{}' has label '{}' with a confidence score of {}".format( - name, - field.label_data.text, - field.confidence - )) - - print("...Label '{}' has value '{}' with a confidence score of {}".format( - field.label_data.text if field.label_data else name, field.value, field.confidence - )) + print( + "...Field '{}' has label '{}' with a confidence score of {}".format( + name, field.label_data.text, field.confidence + ) + ) + + print( + "...Label '{}' has value '{}' with a confidence score of {}".format( + field.label_data.text if field.label_data else name, field.value, field.confidence + ) + ) # iterate over tables, lines, and selection marks on each page for page in form.pages: for i, table in enumerate(page.tables): - print("\nTable {} on page {}".format(i+1, table.page_number)) + print("\nTable {} on page {}".format(i + 1, table.page_number)) for cell in table.cells: - print("...Cell[{}][{}] has text '{}' with confidence {}".format( - cell.row_index, cell.column_index, cell.text, cell.confidence - )) + print( + "...Cell[{}][{}] has text '{}' with confidence {}".format( + cell.row_index, cell.column_index, cell.text, cell.confidence + ) + ) print("\nLines found on page {}".format(page.page_number)) for line in page.lines: print("...Line '{}' is made up of the following words: ".format(line.text)) for word in line.words: - print("......Word '{}' has a confidence of {}".format( - word.text, - word.confidence - )) + print("......Word '{}' has a confidence of {}".format(word.text, word.confidence)) if page.selection_marks: print("\nSelection marks found on page {}".format(page.page_number)) for selection_mark in page.selection_marks: - print("......Selection mark is '{}' and has a confidence of {}".format( - selection_mark.state, - selection_mark.confidence - )) + print( + "......Selection mark is '{}' and has a confidence of {}".format( + selection_mark.state, selection_mark.confidence + ) + ) print("-----------------------------------") # [END recognize_custom_forms] -if __name__ == '__main__': +if __name__ == "__main__": sample = RecognizeCustomForms() model_id = None if os.getenv("CONTAINER_SAS_URL_V2"): @@ -119,9 +120,7 @@ def recognize_custom_forms(self, custom_model_id): if not endpoint or not key: raise ValueError("Please provide endpoint and API key to run the samples.") - form_training_client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_training_client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) container_sas_url = os.getenv("CONTAINER_SAS_URL_V2") if container_sas_url is not None: model = form_training_client.begin_training(container_sas_url, use_training_labels=True).result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_identity_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_identity_documents.py index ac261f16d881..baa6d856ca39 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_identity_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_identity_documents.py @@ -29,8 +29,9 @@ class RecognizeIdDocumentsSample(object): def recognize_identity_documents(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/id_documents/license.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/id_documents/license.jpg") + ) # [START recognize_identity_documents] from azure.core.credentials import AzureKeyCredential @@ -39,15 +40,13 @@ def recognize_identity_documents(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_identity_documents(identity_document=f) id_documents = poller.result() for idx, id_document in enumerate(id_documents): - print("--------Recognizing ID document #{}--------".format(idx+1)) + print("--------Recognizing ID document #{}--------".format(idx + 1)) first_name = id_document.fields.get("FirstName") if first_name: print("First Name: {} has confidence: {}".format(first_name.value, first_name.confidence)) @@ -56,7 +55,9 @@ def recognize_identity_documents(self): print("Last Name: {} has confidence: {}".format(last_name.value, last_name.confidence)) document_number = id_document.fields.get("DocumentNumber") if document_number: - print("Document Number: {} has confidence: {}".format(document_number.value, document_number.confidence)) + print( + "Document Number: {} has confidence: {}".format(document_number.value, document_number.confidence) + ) dob = id_document.fields.get("DateOfBirth") if dob: print("Date of Birth: {} has confidence: {}".format(dob.value, dob.confidence)) @@ -77,6 +78,7 @@ def recognize_identity_documents(self): print("Region: {} has confidence: {}".format(region.value, region.confidence)) # [END recognize_identity_documents] -if __name__ == '__main__': + +if __name__ == "__main__": sample = RecognizeIdDocumentsSample() sample.recognize_identity_documents() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_invoices.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_invoices.py index 89239fa014b0..f1f9cd9b5fbe 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_invoices.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_invoices.py @@ -29,8 +29,9 @@ class RecognizeInvoiceSample(object): def recognize_invoice(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/forms/sample_invoice.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/sample_invoice.jpg") + ) # [START recognize_invoices] from azure.core.credentials import AzureKeyCredential @@ -39,15 +40,13 @@ def recognize_invoice(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_invoices(invoice=f, locale="en-US") invoices = poller.result() for idx, invoice in enumerate(invoices): - print("--------Recognizing invoice #{}--------".format(idx+1)) + print("--------Recognizing invoice #{}--------".format(idx + 1)) vendor_name = invoice.fields.get("VendorName") if vendor_name: print("Vendor Name: {} has confidence: {}".format(vendor_name.value, vendor_name.confidence)) @@ -56,7 +55,11 @@ def recognize_invoice(self): print("Vendor Address: {} has confidence: {}".format(vendor_address.value, vendor_address.confidence)) vendor_address_recipient = invoice.fields.get("VendorAddressRecipient") if vendor_address_recipient: - print("Vendor Address Recipient: {} has confidence: {}".format(vendor_address_recipient.value, vendor_address_recipient.confidence)) + print( + "Vendor Address Recipient: {} has confidence: {}".format( + vendor_address_recipient.value, vendor_address_recipient.confidence + ) + ) customer_name = invoice.fields.get("CustomerName") if customer_name: print("Customer Name: {} has confidence: {}".format(customer_name.value, customer_name.confidence)) @@ -65,10 +68,18 @@ def recognize_invoice(self): print("Customer Id: {} has confidence: {}".format(customer_id.value, customer_id.confidence)) customer_address = invoice.fields.get("CustomerAddress") if customer_address: - print("Customer Address: {} has confidence: {}".format(customer_address.value, customer_address.confidence)) + print( + "Customer Address: {} has confidence: {}".format( + customer_address.value, customer_address.confidence + ) + ) customer_address_recipient = invoice.fields.get("CustomerAddressRecipient") if customer_address_recipient: - print("Customer Address Recipient: {} has confidence: {}".format(customer_address_recipient.value, customer_address_recipient.confidence)) + print( + "Customer Address Recipient: {} has confidence: {}".format( + customer_address_recipient.value, customer_address_recipient.confidence + ) + ) invoice_id = invoice.fields.get("InvoiceId") if invoice_id: print("Invoice Id: {} has confidence: {}".format(invoice_id.value, invoice_id.confidence)) @@ -86,22 +97,40 @@ def recognize_invoice(self): print("Purchase Order: {} has confidence: {}".format(purchase_order.value, purchase_order.confidence)) billing_address = invoice.fields.get("BillingAddress") if billing_address: - print("Billing Address: {} has confidence: {}".format(billing_address.value, billing_address.confidence)) + print( + "Billing Address: {} has confidence: {}".format(billing_address.value, billing_address.confidence) + ) billing_address_recipient = invoice.fields.get("BillingAddressRecipient") if billing_address_recipient: - print("Billing Address Recipient: {} has confidence: {}".format(billing_address_recipient.value, billing_address_recipient.confidence)) + print( + "Billing Address Recipient: {} has confidence: {}".format( + billing_address_recipient.value, billing_address_recipient.confidence + ) + ) shipping_address = invoice.fields.get("ShippingAddress") if shipping_address: - print("Shipping Address: {} has confidence: {}".format(shipping_address.value, shipping_address.confidence)) + print( + "Shipping Address: {} has confidence: {}".format( + shipping_address.value, shipping_address.confidence + ) + ) shipping_address_recipient = invoice.fields.get("ShippingAddressRecipient") if shipping_address_recipient: - print("Shipping Address Recipient: {} has confidence: {}".format(shipping_address_recipient.value, shipping_address_recipient.confidence)) + print( + "Shipping Address Recipient: {} has confidence: {}".format( + shipping_address_recipient.value, shipping_address_recipient.confidence + ) + ) print("Invoice items:") for idx, item in enumerate(invoice.fields.get("Items").value): - print("...Item #{}".format(idx+1)) + print("...Item #{}".format(idx + 1)) item_description = item.value.get("Description") if item_description: - print("......Description: {} has confidence: {}".format(item_description.value, item_description.confidence)) + print( + "......Description: {} has confidence: {}".format( + item_description.value, item_description.confidence + ) + ) item_quantity = item.value.get("Quantity") if item_quantity: print("......Quantity: {} has confidence: {}".format(item_quantity.value, item_quantity.confidence)) @@ -113,7 +142,9 @@ def recognize_invoice(self): print("......Unit Price: {} has confidence: {}".format(unit_price.value, unit_price.confidence)) product_code = item.value.get("ProductCode") if product_code: - print("......Product Code: {} has confidence: {}".format(product_code.value, product_code.confidence)) + print( + "......Product Code: {} has confidence: {}".format(product_code.value, product_code.confidence) + ) item_date = item.value.get("Date") if item_date: print("......Date: {} has confidence: {}".format(item_date.value, item_date.confidence)) @@ -131,30 +162,57 @@ def recognize_invoice(self): print("Total Tax: {} has confidence: {}".format(total_tax.value, total_tax.confidence)) previous_unpaid_balance = invoice.fields.get("PreviousUnpaidBalance") if previous_unpaid_balance: - print("Previous Unpaid Balance: {} has confidence: {}".format(previous_unpaid_balance.value, previous_unpaid_balance.confidence)) + print( + "Previous Unpaid Balance: {} has confidence: {}".format( + previous_unpaid_balance.value, previous_unpaid_balance.confidence + ) + ) amount_due = invoice.fields.get("AmountDue") if amount_due: print("Amount Due: {} has confidence: {}".format(amount_due.value, amount_due.confidence)) service_start_date = invoice.fields.get("ServiceStartDate") if service_start_date: - print("Service Start Date: {} has confidence: {}".format(service_start_date.value, service_start_date.confidence)) + print( + "Service Start Date: {} has confidence: {}".format( + service_start_date.value, service_start_date.confidence + ) + ) service_end_date = invoice.fields.get("ServiceEndDate") if service_end_date: - print("Service End Date: {} has confidence: {}".format(service_end_date.value, service_end_date.confidence)) + print( + "Service End Date: {} has confidence: {}".format( + service_end_date.value, service_end_date.confidence + ) + ) service_address = invoice.fields.get("ServiceAddress") if service_address: - print("Service Address: {} has confidence: {}".format(service_address.value, service_address.confidence)) + print( + "Service Address: {} has confidence: {}".format(service_address.value, service_address.confidence) + ) service_address_recipient = invoice.fields.get("ServiceAddressRecipient") if service_address_recipient: - print("Service Address Recipient: {} has confidence: {}".format(service_address_recipient.value, service_address_recipient.confidence)) + print( + "Service Address Recipient: {} has confidence: {}".format( + service_address_recipient.value, service_address_recipient.confidence + ) + ) remittance_address = invoice.fields.get("RemittanceAddress") if remittance_address: - print("Remittance Address: {} has confidence: {}".format(remittance_address.value, remittance_address.confidence)) + print( + "Remittance Address: {} has confidence: {}".format( + remittance_address.value, remittance_address.confidence + ) + ) remittance_address_recipient = invoice.fields.get("RemittanceAddressRecipient") if remittance_address_recipient: - print("Remittance Address Recipient: {} has confidence: {}".format(remittance_address_recipient.value, remittance_address_recipient.confidence)) + print( + "Remittance Address Recipient: {} has confidence: {}".format( + remittance_address_recipient.value, remittance_address_recipient.confidence + ) + ) # [END recognize_invoices] -if __name__ == '__main__': + +if __name__ == "__main__": sample = RecognizeInvoiceSample() sample.recognize_invoice() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts.py index 7554e86bd62e..e5332af5f1e9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts.py @@ -31,8 +31,9 @@ class RecognizeReceiptsSample(object): def recognize_receipts(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), - "..", "..", "./sample_forms/receipt/contoso-allinone.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/receipt/contoso-allinone.jpg") + ) # [START recognize_receipts] from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient @@ -40,15 +41,13 @@ def recognize_receipts(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_receipts(receipt=f, locale="en-US") receipts = poller.result() for idx, receipt in enumerate(receipts): - print("--------Recognizing receipt #{}--------".format(idx+1)) + print("--------Recognizing receipt #{}--------".format(idx + 1)) receipt_type = receipt.fields.get("ReceiptType") if receipt_type: print("Receipt Type: {} has confidence: {}".format(receipt_type.value, receipt_type.confidence)) @@ -57,23 +56,39 @@ def recognize_receipts(self): print("Merchant Name: {} has confidence: {}".format(merchant_name.value, merchant_name.confidence)) transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print("Transaction Date: {} has confidence: {}".format(transaction_date.value, transaction_date.confidence)) + print( + "Transaction Date: {} has confidence: {}".format( + transaction_date.value, transaction_date.confidence + ) + ) if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): - print("...Item #{}".format(idx+1)) + print("...Item #{}".format(idx + 1)) item_name = item.value.get("Name") if item_name: print("......Item Name: {} has confidence: {}".format(item_name.value, item_name.confidence)) item_quantity = item.value.get("Quantity") if item_quantity: - print("......Item Quantity: {} has confidence: {}".format(item_quantity.value, item_quantity.confidence)) + print( + "......Item Quantity: {} has confidence: {}".format( + item_quantity.value, item_quantity.confidence + ) + ) item_price = item.value.get("Price") if item_price: - print("......Individual Item Price: {} has confidence: {}".format(item_price.value, item_price.confidence)) + print( + "......Individual Item Price: {} has confidence: {}".format( + item_price.value, item_price.confidence + ) + ) item_total_price = item.value.get("TotalPrice") if item_total_price: - print("......Total Item Price: {} has confidence: {}".format(item_total_price.value, item_total_price.confidence)) + print( + "......Total Item Price: {} has confidence: {}".format( + item_total_price.value, item_total_price.confidence + ) + ) subtotal = receipt.fields.get("Subtotal") if subtotal: print("Subtotal: {} has confidence: {}".format(subtotal.value, subtotal.confidence)) @@ -90,6 +105,6 @@ def recognize_receipts(self): # [END recognize_receipts] -if __name__ == '__main__': +if __name__ == "__main__": sample = RecognizeReceiptsSample() sample.recognize_receipts() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts_from_url.py index 6605810e0b24..c85813aae1bf 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_receipts_from_url.py @@ -38,15 +38,13 @@ def recognize_receipts_from_url(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/receipt/contoso-receipt.png" poller = form_recognizer_client.begin_recognize_receipts_from_url(receipt_url=url) receipts = poller.result() for idx, receipt in enumerate(receipts): - print("--------Recognizing receipt #{}--------".format(idx+1)) + print("--------Recognizing receipt #{}--------".format(idx + 1)) receipt_type = receipt.fields.get("ReceiptType") if receipt_type: print("Receipt Type: {} has confidence: {}".format(receipt_type.value, receipt_type.confidence)) @@ -55,23 +53,39 @@ def recognize_receipts_from_url(self): print("Merchant Name: {} has confidence: {}".format(merchant_name.value, merchant_name.confidence)) transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print("Transaction Date: {} has confidence: {}".format(transaction_date.value, transaction_date.confidence)) + print( + "Transaction Date: {} has confidence: {}".format( + transaction_date.value, transaction_date.confidence + ) + ) if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): - print("...Item #{}".format(idx+1)) + print("...Item #{}".format(idx + 1)) item_name = item.value.get("Name") if item_name: print("......Item Name: {} has confidence: {}".format(item_name.value, item_name.confidence)) item_quantity = item.value.get("Quantity") if item_quantity: - print("......Item Quantity: {} has confidence: {}".format(item_quantity.value, item_quantity.confidence)) + print( + "......Item Quantity: {} has confidence: {}".format( + item_quantity.value, item_quantity.confidence + ) + ) item_price = item.value.get("Price") if item_price: - print("......Individual Item Price: {} has confidence: {}".format(item_price.value, item_price.confidence)) + print( + "......Individual Item Price: {} has confidence: {}".format( + item_price.value, item_price.confidence + ) + ) item_total_price = item.value.get("TotalPrice") if item_total_price: - print("......Total Item Price: {} has confidence: {}".format(item_total_price.value, item_total_price.confidence)) + print( + "......Total Item Price: {} has confidence: {}".format( + item_total_price.value, item_total_price.confidence + ) + ) subtotal = receipt.fields.get("Subtotal") if subtotal: print("Subtotal: {} has confidence: {}".format(subtotal.value, subtotal.confidence)) @@ -88,6 +102,6 @@ def recognize_receipts_from_url(self): # [END recognize_receipts_from_url] -if __name__ == '__main__': +if __name__ == "__main__": sample = RecognizeReceiptsFromURLSample() sample.recognize_receipts_from_url() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_strongly_typing_recognized_form.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_strongly_typing_recognized_form.py index ced925a9889a..5a1feb7632de 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_strongly_typing_recognized_form.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_strongly_typing_recognized_form.py @@ -30,6 +30,7 @@ from azure.ai.formrecognizer import FormField, RecognizedForm from typing import List + class Receipt(object): """Creates a strongly-typed Receipt class from the fields returned in a RecognizedForm. If a specific field is not found on the receipt, it will return None. @@ -40,40 +41,40 @@ class Receipt(object): def __init__(self, form: RecognizedForm) -> None: self.receipt_type: FormField = form.fields.get("ReceiptType", FormField()) - self.merchant_name: FormField = form.fields.get("MerchantName", FormField()) - self.merchant_address: FormField = form.fields.get("MerchantAddress", FormField()) - self.merchant_phone_number: FormField = form.fields.get("MerchantPhoneNumber", FormField()) - self.receipt_items: List[ReceiptItem] = self.convert_to_receipt_item(form.fields.get("Items", FormField())) - self.subtotal: FormField = form.fields.get("Subtotal", FormField()) - self.tax: FormField = form.fields.get("Tax", FormField()) - self.tip: FormField = form.fields.get("Tip", FormField()) - self.total: FormField = form.fields.get("Total", FormField()) - self.transaction_date: FormField = form.fields.get("TransactionDate", FormField()) - self.transaction_time: FormField = form.fields.get("TransactionTime", FormField()) + self.merchant_name: FormField = form.fields.get("MerchantName", FormField()) + self.merchant_address: FormField = form.fields.get("MerchantAddress", FormField()) + self.merchant_phone_number: FormField = form.fields.get("MerchantPhoneNumber", FormField()) + self.receipt_items: List[ReceiptItem] = self.convert_to_receipt_item(form.fields.get("Items", FormField())) + self.subtotal: FormField = form.fields.get("Subtotal", FormField()) + self.tax: FormField = form.fields.get("Tax", FormField()) + self.tip: FormField = form.fields.get("Tip", FormField()) + self.total: FormField = form.fields.get("Total", FormField()) + self.transaction_date: FormField = form.fields.get("TransactionDate", FormField()) + self.transaction_time: FormField = form.fields.get("TransactionTime", FormField()) def convert_to_receipt_item(self, items: FormField) -> List["ReceiptItem"]: - """Converts Items in a receipt to a list of strongly-typed ReceiptItem - """ + """Converts Items in a receipt to a list of strongly-typed ReceiptItem""" if items is None: return [] return [ReceiptItem(item) for item in items.value] class ReceiptItem(object): - """Creates a strongly-typed ReceiptItem for every receipt item found in a RecognizedForm - """ + """Creates a strongly-typed ReceiptItem for every receipt item found in a RecognizedForm""" def __init__(self, item: FormField) -> None: - self.name: FormField = item.value.get("Name", FormField()) - self.quantity: FormField = item.value.get("Quantity", FormField()) - self.price: FormField = item.value.get("Price", FormField()) - self.total_price: FormField = item.value.get("TotalPrice", FormField()) + self.name: FormField = item.value.get("Name", FormField()) + self.quantity: FormField = item.value.get("Quantity", FormField()) + self.price: FormField = item.value.get("Price", FormField()) + self.total_price: FormField = item.value.get("TotalPrice", FormField()) class StronglyTypedRecognizedFormSample(object): def strongly_typed_receipt(self): - path_to_sample_forms = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/receipt/contoso-allinone.jpg")) + path_to_sample_forms = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/receipt/contoso-allinone.jpg") + ) from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient @@ -81,30 +82,44 @@ def strongly_typed_receipt(self): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - form_recognizer_client = FormRecognizerClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + form_recognizer_client = FormRecognizerClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_forms, "rb") as f: poller = form_recognizer_client.begin_recognize_receipts(receipt=f) receipts = poller.result() for receipt in receipts: my_receipt = Receipt(receipt) - print("Receipt Type: {} has confidence: {}".format(my_receipt.receipt_type.value, my_receipt.receipt_type.confidence)) - print("Merchant Name: {} has confidence: {}".format(my_receipt.merchant_name.value, my_receipt.merchant_name.confidence)) - print("Transaction Date: {} has confidence: {}".format(my_receipt.transaction_date.value, my_receipt.transaction_date.confidence)) + print( + "Receipt Type: {} has confidence: {}".format( + my_receipt.receipt_type.value, my_receipt.receipt_type.confidence + ) + ) + print( + "Merchant Name: {} has confidence: {}".format( + my_receipt.merchant_name.value, my_receipt.merchant_name.confidence + ) + ) + print( + "Transaction Date: {} has confidence: {}".format( + my_receipt.transaction_date.value, my_receipt.transaction_date.confidence + ) + ) print("Receipt items:") for item in my_receipt.receipt_items: print("...Item Name: {} has confidence: {}".format(item.name.value, item.name.confidence)) print("...Item Quantity: {} has confidence: {}".format(item.quantity.value, item.quantity.confidence)) print("...Individual Item Price: {} has confidence: {}".format(item.price.value, item.price.confidence)) - print("...Total Item Price: {} has confidence: {}".format(item.total_price.value, item.total_price.confidence)) + print( + "...Total Item Price: {} has confidence: {}".format( + item.total_price.value, item.total_price.confidence + ) + ) print("Subtotal: {} has confidence: {}".format(my_receipt.subtotal.value, my_receipt.subtotal.confidence)) print("Tax: {} has confidence: {}".format(my_receipt.tax.value, my_receipt.tax.confidence)) print("Tip: {} has confidence: {}".format(my_receipt.tip.value, my_receipt.tip.confidence)) print("Total: {} has confidence: {}".format(my_receipt.total.value, my_receipt.total.confidence)) -if __name__ == '__main__': +if __name__ == "__main__": sample = StronglyTypedRecognizedFormSample() sample.strongly_typed_receipt() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_with_labels.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_with_labels.py index 763715a0db3d..1c2e837dd460 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_with_labels.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_with_labels.py @@ -44,9 +44,7 @@ def train_model_with_labels(self): container_sas_url = os.environ["CONTAINER_SAS_URL_V2"] form_training_client = FormTrainingClient(endpoint, AzureKeyCredential(key)) - poller = form_training_client.begin_training( - container_sas_url, use_training_labels=True, model_name="mymodel" - ) + poller = form_training_client.begin_training(container_sas_url, use_training_labels=True, model_name="mymodel") model = poller.result() # Custom model information @@ -62,13 +60,13 @@ def train_model_with_labels(self): # The labels are based on the ones you gave the training document. for submodel in model.submodels: print("...The submodel has model ID: {}".format(submodel.model_id)) - print("...The submodel with form type {} has an average accuracy '{}'".format( - submodel.form_type, submodel.accuracy - )) + print( + "...The submodel with form type {} has an average accuracy '{}'".format( + submodel.form_type, submodel.accuracy + ) + ) for name, field in submodel.fields.items(): - print("...The model found the field '{}' with an accuracy of {}".format( - name, field.accuracy - )) + print("...The model found the field '{}' with an accuracy of {}".format(name, field.accuracy)) # Training result information for doc in model.training_documents: @@ -78,6 +76,6 @@ def train_model_with_labels(self): print("Document errors: {}".format(doc.errors)) -if __name__ == '__main__': +if __name__ == "__main__": sample = TrainModelWithLabelsSample() sample.train_model_with_labels() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_without_labels.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_without_labels.py index 2d4ff6a2c887..e203e57280c8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_without_labels.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_train_model_without_labels.py @@ -57,9 +57,7 @@ def train_model_without_labels(self): for submodel in model.submodels: print("...The submodel has form type '{}'".format(submodel.form_type)) for name, field in submodel.fields.items(): - print("...The model found field '{}' to have label '{}'".format( - name, field.label - )) + print("...The model found field '{}' to have label '{}'".format(name, field.label)) # [END training] # Training result information for doc in model.training_documents: @@ -69,6 +67,6 @@ def train_model_without_labels(self): print("Document errors: {}".format(doc.errors)) -if __name__ == '__main__': +if __name__ == "__main__": sample = TrainModelWithoutLabelsSample() sample.train_model_without_labels() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_barcodes_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_barcodes_async.py index a5616221cbf9..bbf28e9cebda 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_barcodes_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_barcodes_async.py @@ -46,10 +46,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -76,9 +73,7 @@ async def analyze_barcodes(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: # Specify which add-on capabilities to enable. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_fonts_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_fonts_async.py index 30891d881071..8b2518504248 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_fonts_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_fonts_async.py @@ -47,10 +47,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -63,7 +60,7 @@ def get_styled_text(styles, content): # Iterate over the styles and merge the spans from each style. spans = [span for style in styles for span in style.spans] spans.sort(key=lambda span: span.offset) - return ','.join([content[span.offset : span.offset + span.length] for span in spans]) + return ",".join([content[span.offset : span.offset + span.length] for span in spans]) async def analyze_fonts(): @@ -84,9 +81,7 @@ async def analyze_fonts(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: # Specify which add-on capabilities to enable. @@ -98,9 +93,9 @@ async def analyze_fonts(): # DocumentStyle has the following font related attributes: similar_font_families = defaultdict(list) # e.g., 'Arial, sans-serif - font_styles = defaultdict(list) # e.g, 'italic' - font_weights = defaultdict(list) # e.g., 'bold' - font_colors = defaultdict(list) # in '#rrggbb' hexadecimal format + font_styles = defaultdict(list) # e.g, 'italic' + font_weights = defaultdict(list) # e.g., 'bold' + font_colors = defaultdict(list) # in '#rrggbb' hexadecimal format font_background_colors = defaultdict(list) # in '#rrggbb' hexadecimal format if any([style.is_handwritten for style in result.styles]): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_formulas_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_formulas_async.py index 79e1cb1d3fb8..a4c496fb09ab 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_formulas_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_formulas_async.py @@ -46,10 +46,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -76,9 +73,7 @@ async def analyze_formulas(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: # Specify which add-on capabilities to enable diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_highres_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_highres_async.py index 3e2687d39e39..17e335c9b4b4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_highres_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_highres_async.py @@ -67,9 +67,7 @@ async def analyze_with_highres(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: # Specify which add-on capabilities to enable. @@ -86,9 +84,7 @@ async def analyze_with_highres(): for page in result.pages: print(f"----Analyzing layout from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -98,9 +94,7 @@ async def analyze_with_highres(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( @@ -109,18 +103,11 @@ async def analyze_with_highres(): ) for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and " - f"{table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and " f"{table.column_count} columns") for region in table.bounding_regions: - print( - f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}" - ) + print(f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") for region in cell.bounding_regions: print( f"...content on page {region.page_number} is within bounding polygon '{format_polygon(region.polygon)}'" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_languages_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_languages_async.py index 6094ee7a761d..01907f1001c3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_languages_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_addon_languages_async.py @@ -46,10 +46,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -76,9 +73,7 @@ async def analyze_languages(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: # Specify which add-on capabilities to enable. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_business_cards_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_business_cards_async.py index 25e973581fc9..5e5db1445b50 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_business_cards_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_business_cards_async.py @@ -44,9 +44,7 @@ async def analyze_business_card_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: poller = await document_analysis_client.begin_analyze_document( @@ -70,21 +68,15 @@ async def analyze_business_card_async(): company_names = business_card.fields.get("CompanyNames") if company_names: for company_name in company_names.value: - print( - f"Company Name: {company_name.value} has confidence: {company_name.confidence}" - ) + print(f"Company Name: {company_name.value} has confidence: {company_name.confidence}") departments = business_card.fields.get("Departments") if departments: for department in departments.value: - print( - f"Department: {department.value} has confidence: {department.confidence}" - ) + print(f"Department: {department.value} has confidence: {department.confidence}") job_titles = business_card.fields.get("JobTitles") if job_titles: for job_title in job_titles.value: - print( - f"Job Title: {job_title.value} has confidence: {job_title.confidence}" - ) + print(f"Job Title: {job_title.value} has confidence: {job_title.confidence}") emails = business_card.fields.get("Emails") if emails: for email in emails.value: @@ -100,9 +92,7 @@ async def analyze_business_card_async(): mobile_phones = business_card.fields.get("MobilePhones") if mobile_phones: for phone in mobile_phones.value: - print( - f"Mobile phone number: {phone.content} has confidence: {phone.confidence}" - ) + print(f"Mobile phone number: {phone.content} has confidence: {phone.confidence}") faxes = business_card.fields.get("Faxes") if faxes: for fax in faxes.value: @@ -110,15 +100,11 @@ async def analyze_business_card_async(): work_phones = business_card.fields.get("WorkPhones") if work_phones: for work_phone in work_phones.value: - print( - f"Work phone number: {work_phone.content} has confidence: {work_phone.confidence}" - ) + print(f"Work phone number: {work_phone.content} has confidence: {work_phone.confidence}") other_phones = business_card.fields.get("OtherPhones") if other_phones: for other_phone in other_phones.value: - print( - f"Other phone number: {other_phone.value} has confidence: {other_phone.confidence}" - ) + print(f"Other phone number: {other_phone.value} has confidence: {other_phone.confidence}") async def main(): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_custom_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_custom_documents_async.py index 896d3caa2fb7..b2252342585c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_custom_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_custom_documents_async.py @@ -52,16 +52,12 @@ async def analyze_custom_documents_async(custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id = os.getenv("CUSTOM_BUILT_MODEL_ID", custom_model_id) - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: # Make sure your document's type is included in the list of document types the custom model can analyze with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - model_id=model_id, document=f - ) + poller = await document_analysis_client.begin_analyze_document(model_id=model_id, document=f) result = await poller.result() for idx, document in enumerate(result.documents): @@ -94,9 +90,7 @@ async def analyze_custom_documents_async(custom_model_id): for region in table.bounding_regions: print(f"...{region.page_number}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") print("-----------------------------------") # [END analyze_custom_documents_async] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_general_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_general_documents_async.py index 9c9f0a83f47c..91d2d7f3bca5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_general_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_general_documents_async.py @@ -28,10 +28,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -57,28 +54,17 @@ async def analyze_general_documents(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = await document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = await poller.result() for style in result.styles: if style.is_handwritten: print("Document contains handwritten content: ") - print( - ",".join( - [ - result.content[span.offset : span.offset + span.length] - for span in style.spans - ] - ) - ) + print(",".join([result.content[span.offset : span.offset + span.length] for span in style.spans])) print("----Key-value pairs found in document----") for kv_pair in result.key_value_pairs: @@ -95,9 +81,7 @@ async def analyze_general_documents(): for page in result.pages: print(f"----Analyzing document from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -107,9 +91,7 @@ async def analyze_general_documents(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( @@ -119,17 +101,11 @@ async def analyze_general_documents(): ) for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns") for region in table.bounding_regions: - print( - f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}" - ) + print(f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") for region in cell.bounding_regions: print( f"...content on page {region.page_number} is within bounding polygon '{format_polygon(region.polygon)}'\n" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_identity_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_identity_documents_async.py index 02a10eb1d41f..b170abf4c002 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_identity_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_identity_documents_async.py @@ -44,33 +44,23 @@ async def analyze_identity_documents_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - "prebuilt-idDocument", document=f - ) + poller = await document_analysis_client.begin_analyze_document("prebuilt-idDocument", document=f) id_documents = await poller.result() for idx, id_document in enumerate(id_documents.documents): print(f"--------Analyzing ID document #{idx + 1}--------") first_name = id_document.fields.get("FirstName") if first_name: - print( - f"First Name: {first_name.value} has confidence: {first_name.confidence}" - ) + print(f"First Name: {first_name.value} has confidence: {first_name.confidence}") last_name = id_document.fields.get("LastName") if last_name: - print( - f"Last Name: {last_name.value} has confidence: {last_name.confidence}" - ) + print(f"Last Name: {last_name.value} has confidence: {last_name.confidence}") document_number = id_document.fields.get("DocumentNumber") if document_number: - print( - f"Document Number: {document_number.value} has confidence: {document_number.confidence}" - ) + print(f"Document Number: {document_number.value} has confidence: {document_number.confidence}") dob = id_document.fields.get("DateOfBirth") if dob: print(f"Date of Birth: {dob.value} has confidence: {dob.confidence}") @@ -85,9 +75,7 @@ async def analyze_identity_documents_async(): print(f"Address: {address.value} has confidence: {address.confidence}") country_region = id_document.fields.get("CountryRegion") if country_region: - print( - f"Country/Region: {country_region.value} has confidence: {country_region.confidence}" - ) + print(f"Country/Region: {country_region.value} has confidence: {country_region.confidence}") region = id_document.fields.get("Region") if region: print(f"Region: {region.value} has confidence: {region.confidence}") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_invoices_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_invoices_async.py index e166bb030dd7..8ef7c991d2fd 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_invoices_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_invoices_async.py @@ -45,9 +45,7 @@ async def analyze_invoice_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: poller = await document_analysis_client.begin_analyze_document( @@ -59,14 +57,10 @@ async def analyze_invoice_async(): print(f"--------Analyzing invoice #{idx + 1}--------") vendor_name = invoice.fields.get("VendorName") if vendor_name: - print( - f"Vendor Name: {vendor_name.value} has confidence: {vendor_name.confidence}" - ) + print(f"Vendor Name: {vendor_name.value} has confidence: {vendor_name.confidence}") vendor_address = invoice.fields.get("VendorAddress") if vendor_address: - print( - f"Vendor Address: {vendor_address.value} has confidence: {vendor_address.confidence}" - ) + print(f"Vendor Address: {vendor_address.value} has confidence: {vendor_address.confidence}") vendor_address_recipient = invoice.fields.get("VendorAddressRecipient") if vendor_address_recipient: print( @@ -74,19 +68,13 @@ async def analyze_invoice_async(): ) customer_name = invoice.fields.get("CustomerName") if customer_name: - print( - f"Customer Name: {customer_name.value} has confidence: {customer_name.confidence}" - ) + print(f"Customer Name: {customer_name.value} has confidence: {customer_name.confidence}") customer_id = invoice.fields.get("CustomerId") if customer_id: - print( - f"Customer Id: {customer_id.value} has confidence: {customer_id.confidence}" - ) + print(f"Customer Id: {customer_id.value} has confidence: {customer_id.confidence}") customer_address = invoice.fields.get("CustomerAddress") if customer_address: - print( - f"Customer Address: {customer_address.value} has confidence: {customer_address.confidence}" - ) + print(f"Customer Address: {customer_address.value} has confidence: {customer_address.confidence}") customer_address_recipient = invoice.fields.get("CustomerAddressRecipient") if customer_address_recipient: print( @@ -94,32 +82,22 @@ async def analyze_invoice_async(): ) invoice_id = invoice.fields.get("InvoiceId") if invoice_id: - print( - f"Invoice Id: {invoice_id.value} has confidence: {invoice_id.confidence}" - ) + print(f"Invoice Id: {invoice_id.value} has confidence: {invoice_id.confidence}") invoice_date = invoice.fields.get("InvoiceDate") if invoice_date: - print( - f"Invoice Date: {invoice_date.value} has confidence: {invoice_date.confidence}" - ) + print(f"Invoice Date: {invoice_date.value} has confidence: {invoice_date.confidence}") invoice_total = invoice.fields.get("InvoiceTotal") if invoice_total: - print( - f"Invoice Total: {invoice_total.value} has confidence: {invoice_total.confidence}" - ) + print(f"Invoice Total: {invoice_total.value} has confidence: {invoice_total.confidence}") due_date = invoice.fields.get("DueDate") if due_date: print(f"Due Date: {due_date.value} has confidence: {due_date.confidence}") purchase_order = invoice.fields.get("PurchaseOrder") if purchase_order: - print( - f"Purchase Order: {purchase_order.value} has confidence: {purchase_order.confidence}" - ) + print(f"Purchase Order: {purchase_order.value} has confidence: {purchase_order.confidence}") billing_address = invoice.fields.get("BillingAddress") if billing_address: - print( - f"Billing Address: {billing_address.value} has confidence: {billing_address.confidence}" - ) + print(f"Billing Address: {billing_address.value} has confidence: {billing_address.confidence}") billing_address_recipient = invoice.fields.get("BillingAddressRecipient") if billing_address_recipient: print( @@ -127,9 +105,7 @@ async def analyze_invoice_async(): ) shipping_address = invoice.fields.get("ShippingAddress") if shipping_address: - print( - f"Shipping Address: {shipping_address.value} has confidence: {shipping_address.confidence}" - ) + print(f"Shipping Address: {shipping_address.value} has confidence: {shipping_address.confidence}") shipping_address_recipient = invoice.fields.get("ShippingAddressRecipient") if shipping_address_recipient: print( @@ -140,49 +116,35 @@ async def analyze_invoice_async(): print(f"...Item #{idx + 1}") item_description = item.value.get("Description") if item_description: - print( - f"......Description: {item_description.value} has confidence: {item_description.confidence}" - ) + print(f"......Description: {item_description.value} has confidence: {item_description.confidence}") item_quantity = item.value.get("Quantity") if item_quantity: - print( - f"......Quantity: {item_quantity.value} has confidence: {item_quantity.confidence}" - ) + print(f"......Quantity: {item_quantity.value} has confidence: {item_quantity.confidence}") unit = item.value.get("Unit") if unit: print(f"......Unit: {unit.value} has confidence: {unit.confidence}") unit_price = item.value.get("UnitPrice") if unit_price: unit_price_code = unit_price.value.code if unit_price.value.code else "" - print( - f"......Unit Price: {unit_price.value}{unit_price_code} has confidence: {unit_price.confidence}" - ) + print(f"......Unit Price: {unit_price.value}{unit_price_code} has confidence: {unit_price.confidence}") product_code = item.value.get("ProductCode") if product_code: - print( - f"......Product Code: {product_code.value} has confidence: {product_code.confidence}" - ) + print(f"......Product Code: {product_code.value} has confidence: {product_code.confidence}") item_date = item.value.get("Date") if item_date: - print( - f"......Date: {item_date.value} has confidence: {item_date.confidence}" - ) + print(f"......Date: {item_date.value} has confidence: {item_date.confidence}") tax = item.value.get("Tax") if tax: print(f"......Tax: {tax.value} has confidence: {tax.confidence}") amount = item.value.get("Amount") if amount: - print( - f"......Amount: {amount.value} has confidence: {amount.confidence}" - ) + print(f"......Amount: {amount.value} has confidence: {amount.confidence}") subtotal = invoice.fields.get("SubTotal") if subtotal: print(f"Subtotal: {subtotal.value} has confidence: {subtotal.confidence}") total_tax = invoice.fields.get("TotalTax") if total_tax: - print( - f"Total Tax: {total_tax.value} has confidence: {total_tax.confidence}" - ) + print(f"Total Tax: {total_tax.value} has confidence: {total_tax.confidence}") previous_unpaid_balance = invoice.fields.get("PreviousUnpaidBalance") if previous_unpaid_balance: print( @@ -190,24 +152,16 @@ async def analyze_invoice_async(): ) amount_due = invoice.fields.get("AmountDue") if amount_due: - print( - f"Amount Due: {amount_due.value} has confidence: {amount_due.confidence}" - ) + print(f"Amount Due: {amount_due.value} has confidence: {amount_due.confidence}") service_start_date = invoice.fields.get("ServiceStartDate") if service_start_date: - print( - f"Service Start Date: {service_start_date.value} has confidence: {service_start_date.confidence}" - ) + print(f"Service Start Date: {service_start_date.value} has confidence: {service_start_date.confidence}") service_end_date = invoice.fields.get("ServiceEndDate") if service_end_date: - print( - f"Service End Date: {service_end_date.value} has confidence: {service_end_date.confidence}" - ) + print(f"Service End Date: {service_end_date.value} has confidence: {service_end_date.confidence}") service_address = invoice.fields.get("ServiceAddress") if service_address: - print( - f"Service Address: {service_address.value} has confidence: {service_address.confidence}" - ) + print(f"Service Address: {service_address.value} has confidence: {service_address.confidence}") service_address_recipient = invoice.fields.get("ServiceAddressRecipient") if service_address_recipient: print( @@ -215,9 +169,7 @@ async def analyze_invoice_async(): ) remittance_address = invoice.fields.get("RemittanceAddress") if remittance_address: - print( - f"Remittance Address: {remittance_address.value} has confidence: {remittance_address.confidence}" - ) + print(f"Remittance Address: {remittance_address.value} has confidence: {remittance_address.confidence}") remittance_address_recipient = invoice.fields.get("RemittanceAddressRecipient") if remittance_address_recipient: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_layout_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_layout_async.py index 8d7bacaebd57..e8b48f987ee6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_layout_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_layout_async.py @@ -52,14 +52,10 @@ async def analyze_layout_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - "prebuilt-layout", document=f - ) + poller = await document_analysis_client.begin_analyze_document("prebuilt-layout", document=f) result = await poller.result() if any([style.is_handwritten for style in result.styles]): @@ -69,9 +65,7 @@ async def analyze_layout_async(): for page in result.pages: print(f"----Analyzing layout from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -81,9 +75,7 @@ async def analyze_layout_async(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( @@ -92,18 +84,11 @@ async def analyze_layout_async(): ) for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and " - f"{table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and " f"{table.column_count} columns") for region in table.bounding_regions: - print( - f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}" - ) + print(f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") for region in cell.bounding_regions: print( f"...content on page {region.page_number} is within bounding polygon '{format_polygon(region.polygon)}'" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_read_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_read_async.py index 8bac3991f536..7dd59af4f40d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_read_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_read_async.py @@ -28,10 +28,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -58,9 +55,7 @@ async def analyze_read(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: @@ -71,40 +66,20 @@ async def analyze_read(): print("----Languages detected in the document----") for language in result.languages: - print( - f"Language code: '{language.locale}' with confidence {language.confidence}" - ) + print(f"Language code: '{language.locale}' with confidence {language.confidence}") print("----Styles detected in the document----") for style in result.styles: if style.is_handwritten: print("Found the following handwritten content: ") - print( - ",".join( - [ - result.content[span.offset : span.offset + span.length] - for span in style.spans - ] - ) - ) + print(",".join([result.content[span.offset : span.offset + span.length] for span in style.spans])) if style.font_style: - print( - f"The document contains '{style.font_style}' font style, applied to the following text: " - ) - print( - ",".join( - [ - result.content[span.offset : span.offset + span.length] - for span in style.spans - ] - ) - ) + print(f"The document contains '{style.font_style}' font style, applied to the following text: ") + print(",".join([result.content[span.offset : span.offset + span.length] for span in style.spans])) for page in result.pages: print(f"----Analyzing document from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -113,9 +88,7 @@ async def analyze_read(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_async.py index dd18b79a51db..af9ccdf558c2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_async.py @@ -45,9 +45,7 @@ async def analyze_receipts_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: poller = await document_analysis_client.begin_analyze_document( @@ -60,16 +58,10 @@ async def analyze_receipts_async(): print(f"Receipt type: {receipt.doc_type if receipt.doc_type else 'N/A'}") merchant_name = receipt.fields.get("MerchantName") if merchant_name: - print( - f"Merchant Name: {merchant_name.value} has confidence: " - f"{merchant_name.confidence}" - ) + print(f"Merchant Name: {merchant_name.value} has confidence: " f"{merchant_name.confidence}") transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print( - f"Transaction Date: {transaction_date.value} has confidence: " - f"{transaction_date.confidence}" - ) + print(f"Transaction Date: {transaction_date.value} has confidence: " f"{transaction_date.confidence}") if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): @@ -82,15 +74,11 @@ async def analyze_receipts_async(): ) item_quantity = item.value.get("Quantity") if item_quantity: - print( - f"......Item Quantity: {item_quantity.value} has confidence: " - f"{item_quantity.confidence}" - ) + print(f"......Item Quantity: {item_quantity.value} has confidence: " f"{item_quantity.confidence}") item_price = item.value.get("Price") if item_price: print( - f"......Individual Item Price: {item_price.value} has confidence: " - f"{item_price.confidence}" + f"......Individual Item Price: {item_price.value} has confidence: " f"{item_price.confidence}" ) item_total_price = item.value.get("TotalPrice") if item_total_price: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_from_url_async.py index fe93cd09df49..eaca936d7fda 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_receipts_from_url_async.py @@ -36,14 +36,10 @@ async def analyze_receipts_from_url_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/receipt/contoso-receipt.png" - poller = await document_analysis_client.begin_analyze_document_from_url( - "prebuilt-receipt", document_url=url - ) + poller = await document_analysis_client.begin_analyze_document_from_url("prebuilt-receipt", document_url=url) receipts = await poller.result() for idx, receipt in enumerate(receipts.documents): @@ -51,16 +47,10 @@ async def analyze_receipts_from_url_async(): print(f"Receipt type: {receipt.doc_type if receipt.doc_type else 'N/A'}") merchant_name = receipt.fields.get("MerchantName") if merchant_name: - print( - f"Merchant Name: {merchant_name.value} has confidence: " - f"{merchant_name.confidence}" - ) + print(f"Merchant Name: {merchant_name.value} has confidence: " f"{merchant_name.confidence}") transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print( - f"Transaction Date: {transaction_date.value} has confidence: " - f"{transaction_date.confidence}" - ) + print(f"Transaction Date: {transaction_date.value} has confidence: " f"{transaction_date.confidence}") if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): @@ -73,15 +63,11 @@ async def analyze_receipts_from_url_async(): ) item_quantity = item.value.get("Quantity") if item_quantity: - print( - f"......Item Quantity: {item_quantity.value} has confidence: " - f"{item_quantity.confidence}" - ) + print(f"......Item Quantity: {item_quantity.value} has confidence: " f"{item_quantity.confidence}") item_price = item.value.get("Price") if item_price: print( - f"......Individual Item Price: {item_price.value} has confidence: " - f"{item_price.confidence}" + f"......Individual Item Price: {item_price.value} has confidence: " f"{item_price.confidence}" ) item_total_price = item.value.get("TotalPrice") if item_total_price: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_tax_us_w2_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_tax_us_w2_async.py index c960fa634664..674c78c273c1 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_tax_us_w2_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_analyze_tax_us_w2_async.py @@ -48,9 +48,7 @@ async def analyze_tax_us_w2_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: poller = await document_analysis_client.begin_analyze_document( @@ -62,10 +60,7 @@ async def analyze_tax_us_w2_async(): print(f"--------Analyzing US Tax W-2 Form #{idx + 1}--------") form_variant = w2.fields.get("W2FormVariant") if form_variant: - print( - f"Form variant: {form_variant.value} has confidence: " - f"{form_variant.confidence}" - ) + print(f"Form variant: {form_variant.value} has confidence: " f"{form_variant.confidence}") tax_year = w2.fields.get("TaxYear") if tax_year: print(f"Tax year: {tax_year.value} has confidence: {tax_year.confidence}") @@ -77,57 +72,40 @@ async def analyze_tax_us_w2_async(): print("Employee data:") employee_name = employee.value.get("Name") if employee_name: - print( - f"...Name: {employee_name.value} has confidence: {employee_name.confidence}" - ) + print(f"...Name: {employee_name.value} has confidence: {employee_name.confidence}") employee_ssn = employee.value.get("SocialSecurityNumber") if employee_ssn: - print( - f"...SSN: {employee_ssn.value} has confidence: {employee_ssn.confidence}" - ) + print(f"...SSN: {employee_ssn.value} has confidence: {employee_ssn.confidence}") employee_address = employee.value.get("Address") if employee_address: print(f"...Address: {format_address_value(employee_address.value)}") print(f"......has confidence: {employee_address.confidence}") employee_zipcode = employee.value.get("ZipCode") if employee_zipcode: - print( - f"...Zipcode: {employee_zipcode.value} has confidence: " - f"{employee_zipcode.confidence}" - ) + print(f"...Zipcode: {employee_zipcode.value} has confidence: " f"{employee_zipcode.confidence}") control_number = w2.fields.get("ControlNumber") if control_number: - print( - f"Control Number: {control_number.value} has confidence: " - f"{control_number.confidence}" - ) + print(f"Control Number: {control_number.value} has confidence: " f"{control_number.confidence}") employer = w2.fields.get("Employer") if employer: print("Employer data:") employer_name = employer.value.get("Name") if employer_name: - print( - f"...Name: {employer_name.value} has confidence: {employer_name.confidence}" - ) + print(f"...Name: {employer_name.value} has confidence: {employer_name.confidence}") employer_id = employer.value.get("IdNumber") if employer_id: - print( - f"...ID Number: {employer_id.value} has confidence: {employer_id.confidence}" - ) + print(f"...ID Number: {employer_id.value} has confidence: {employer_id.confidence}") employer_address = employer.value.get("Address") if employer_address: print(f"...Address: {format_address_value(employer_address.value)}") print(f"\n......has confidence: {employer_address.confidence}") employer_zipcode = employer.value.get("ZipCode") if employer_zipcode: - print( - f"...Zipcode: {employer_zipcode.value} has confidence: {employer_zipcode.confidence}" - ) + print(f"...Zipcode: {employer_zipcode.value} has confidence: {employer_zipcode.confidence}") wages_tips = w2.fields.get("WagesTipsAndOtherCompensation") if wages_tips: print( - f"Wages, tips, and other compensation: {wages_tips.value} " - f"has confidence: {wages_tips.confidence}" + f"Wages, tips, and other compensation: {wages_tips.value} " f"has confidence: {wages_tips.confidence}" ) fed_income_tax_withheld = w2.fields.get("FederalIncomeTaxWithheld") if fed_income_tax_withheld: @@ -167,14 +145,10 @@ async def analyze_tax_us_w2_async(): ) allocated_tips = w2.fields.get("AllocatedTips") if allocated_tips: - print( - f"Allocated tips: {allocated_tips.value} has confidence: {allocated_tips.confidence}" - ) + print(f"Allocated tips: {allocated_tips.value} has confidence: {allocated_tips.confidence}") verification_code = w2.fields.get("VerificationCode") if verification_code: - print( - f"Verification code: {verification_code.value} has confidence: {verification_code.confidence}" - ) + print(f"Verification code: {verification_code.value} has confidence: {verification_code.confidence}") dependent_care_benefits = w2.fields.get("DependentCareBenefits") if dependent_care_benefits: print( @@ -182,23 +156,17 @@ async def analyze_tax_us_w2_async(): ) non_qualified_plans = w2.fields.get("NonQualifiedPlans") if non_qualified_plans: - print( - f"Non-qualified plans: {non_qualified_plans.value} has confidence: {non_qualified_plans.confidence}" - ) + print(f"Non-qualified plans: {non_qualified_plans.value} has confidence: {non_qualified_plans.confidence}") additional_info = w2.fields.get("AdditionalInfo") if additional_info: print("Additional information:") for item in additional_info.value: letter_code = item.value.get("LetterCode") if letter_code: - print( - f"...Letter code: {letter_code.value} has confidence: {letter_code.confidence}" - ) + print(f"...Letter code: {letter_code.value} has confidence: {letter_code.confidence}") amount = item.value.get("Amount") if amount: - print( - f"...Amount: {amount.value} has confidence: {amount.confidence}" - ) + print(f"...Amount: {amount.value} has confidence: {amount.confidence}") is_statutory_employee = w2.fields.get("IsStatutoryEmployee") if is_statutory_employee: print( @@ -206,9 +174,7 @@ async def analyze_tax_us_w2_async(): ) is_retirement_plan = w2.fields.get("IsRetirementPlan") if is_retirement_plan: - print( - f"Is retirement plan: {is_retirement_plan.value} has confidence: {is_retirement_plan.confidence}" - ) + print(f"Is retirement plan: {is_retirement_plan.value} has confidence: {is_retirement_plan.confidence}") third_party_sick_pay = w2.fields.get("IsThirdPartySickPay") if third_party_sick_pay: print( @@ -216,9 +182,7 @@ async def analyze_tax_us_w2_async(): ) other_info = w2.fields.get("Other") if other_info: - print( - f"Other information: {other_info.value} has confidence: {other_info.confidence}" - ) + print(f"Other information: {other_info.value} has confidence: {other_info.confidence}") state_tax_info = w2.fields.get("StateTaxInfos") if state_tax_info: print("State Tax info:") @@ -262,10 +226,7 @@ async def analyze_tax_us_w2_async(): ) locality_name = tax.value.get("LocalityName") if locality_name: - print( - f"...Locality name: {locality_name.value} has confidence: " - f"{locality_name.confidence}" - ) + print(f"...Locality name: {locality_name.value} has confidence: " f"{locality_name.confidence}") async def main(): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_authentication_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_authentication_async.py index c0ed9a310f87..78ab4c1032f5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_authentication_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_authentication_async.py @@ -47,9 +47,7 @@ async def authentication_with_api_key_credential_document_analysis_client_async( document_analysis_client = DocumentAnalysisClient(endpoint, AzureKeyCredential(key)) # [END create_da_client_with_key_async] async with document_analysis_client: - poller = await document_analysis_client.begin_analyze_document_from_url( - "prebuilt-layout", url - ) + poller = await document_analysis_client.begin_analyze_document_from_url("prebuilt-layout", url) result = await poller.result() @@ -67,9 +65,7 @@ async def authentication_with_azure_active_directory_document_analysis_client_as document_analysis_client = DocumentAnalysisClient(endpoint, credential) # [END create_da_client_with_aad_async] async with document_analysis_client: - poller = await document_analysis_client.begin_analyze_document_from_url( - "prebuilt-layout", url - ) + poller = await document_analysis_client.begin_analyze_document_from_url("prebuilt-layout", url) result = await poller.result() @@ -81,9 +77,7 @@ async def authentication_with_api_key_credential_document_model_admin_client_asy endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_model_admin_client = DocumentModelAdministrationClient( - endpoint, AzureKeyCredential(key) - ) + document_model_admin_client = DocumentModelAdministrationClient(endpoint, AzureKeyCredential(key)) # [END create_dt_client_with_key_async] async with document_model_admin_client: info = await document_model_admin_client.get_resource_details() @@ -100,9 +94,7 @@ async def authentication_with_azure_active_directory_document_model_admin_client endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] credential = DefaultAzureCredential() - document_model_admin_client = DocumentModelAdministrationClient( - endpoint, credential - ) + document_model_admin_client = DocumentModelAdministrationClient(endpoint, credential) # [END create_dt_client_with_aad_async] async with document_model_admin_client: info = await document_model_admin_client.get_resource_details() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_classifier_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_classifier_async.py index 34a243c7781c..572c2131935c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_classifier_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_classifier_async.py @@ -51,14 +51,10 @@ async def sample_build_classifier_async(): poller = await document_model_admin_client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=container_sas_url, prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=container_sas_url, prefix="IRS-1040-A/train") ), "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobFileListSource( - container_url=container_sas_url, file_list="IRS-1040-D.jsonl" - ) + source=BlobFileListSource(container_url=container_sas_url, file_list="IRS-1040-D.jsonl") ), }, description="IRS document classifier", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_model_async.py index 0a0626d45205..6ac067bf967a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_build_model_async.py @@ -39,9 +39,7 @@ async def sample_build_model_async(): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] container_sas_url = os.environ["CONTAINER_SAS_URL"] - document_model_admin_client = DocumentModelAdministrationClient( - endpoint, AzureKeyCredential(key) - ) + document_model_admin_client = DocumentModelAdministrationClient(endpoint, AzureKeyCredential(key)) async with document_model_admin_client: poller = await document_model_admin_client.begin_build_document_model( ModelBuildMode.TEMPLATE, @@ -56,9 +54,7 @@ async def sample_build_model_async(): print(f"Model expires on: {model.expires_on}") print("Doc types the model can recognize:") for name, doc_type in model.doc_types.items(): - print( - f"Doc Type: '{name}' built with '{doc_type.build_mode}' mode which has the following fields:" - ) + print(f"Doc Type: '{name}' built with '{doc_type.build_mode}' mode which has the following fields:") for field_name, field in doc_type.field_schema.items(): print( f"Field: '{field_name}' has type '{field['type']}' and confidence score " diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_async.py index 960bf9210351..3b3413993870 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_async.py @@ -51,14 +51,10 @@ async def classify_document_async(classifier_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] classifier_id = os.getenv("CLASSIFIER_ID", classifier_id) - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_classify_document( - classifier_id, document=f - ) + poller = await document_analysis_client.begin_classify_document(classifier_id, document=f) result = await poller.result() print("----Classified documents----") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_from_url_async.py index 092a1bf76220..001a6cfb1426 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_classify_document_from_url_async.py @@ -41,15 +41,11 @@ async def classify_document_from_url_async(classifier_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] classifier_id = os.getenv("CLASSIFIER_ID", classifier_id) - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/forms/IRS-1040.pdf" - poller = await document_analysis_client.begin_classify_document_from_url( - classifier_id, document_url=url - ) + poller = await document_analysis_client.begin_classify_document_from_url(classifier_id, document_url=url) result = await poller.result() print("----Classified documents----") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_compose_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_compose_model_async.py index e49934b36099..3499fca16f39 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_compose_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_compose_model_async.py @@ -71,12 +71,10 @@ async def sample_compose_model_async(): blob_container_url=po_furniture, description="Purchase order-Furniture", ) - cleaning_supplies_poller = ( - await document_model_admin_client.begin_build_document_model( - ModelBuildMode.TEMPLATE, - blob_container_url=po_cleaning_supplies, - description="Purchase order-Cleaning Supplies", - ) + cleaning_supplies_poller = await document_model_admin_client.begin_build_document_model( + ModelBuildMode.TEMPLATE, + blob_container_url=po_cleaning_supplies, + description="Purchase order-Cleaning Supplies", ) supplies_model = await supplies_poller.result() equipment_model = await equipment_poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_convert_to_and_from_dict_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_convert_to_and_from_dict_async.py index 5891f5efb2ba..8493fff0cd74 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_convert_to_and_from_dict_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_convert_to_and_from_dict_async.py @@ -46,14 +46,10 @@ async def convert_to_and_from_dict_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = await document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = await poller.result() # convert the received model to a dictionary diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_copy_model_to_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_copy_model_to_async.py index 17a7908bcdb0..b513ba291e6d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_copy_model_to_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_copy_model_to_async.py @@ -49,9 +49,7 @@ async def sample_copy_model_to_async(custom_model_id): endpoint=target_endpoint, credential=AzureKeyCredential(target_key) ) async with target_client: - target = await target_client.get_copy_authorization( - description="model copied from other resource" - ) + target = await target_client.get_copy_authorization(description="model copied from other resource") source_client = DocumentModelAdministrationClient( endpoint=source_endpoint, credential=AzureKeyCredential(source_key) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_elements_with_spans_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_elements_with_spans_async.py index 7089ecd2f11c..0caa653ca629 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_elements_with_spans_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_elements_with_spans_async.py @@ -12,7 +12,7 @@ DESCRIPTION: This sample demonstrates how to get elements that are contained in the spans of another element. In this sample, the examples attempt to find the lines and styles that have the same spans as the - main search element. The purpose of this sample is to show how to search for document elements + main search element. The purpose of this sample is to show how to search for document elements that are within the same span area as other elements. USAGE: @@ -32,9 +32,9 @@ def get_styles(element_spans, styles): for span in element_spans: for style in styles: for style_span in style.spans: - if style_span.offset >= span.offset and ( - style_span.offset + style_span.length - ) <= (span.offset + span.length): + if style_span.offset >= span.offset and (style_span.offset + style_span.length) <= ( + span.offset + span.length + ): result.append(style) return result @@ -44,9 +44,9 @@ def get_lines(element_spans, document_page): for span in element_spans: for line in document_page.lines: for line_span in line.spans: - if line_span.offset >= span.offset and ( - line_span.offset + line_span.length - ) <= (span.offset + span.length): + if line_span.offset >= span.offset and (line_span.offset + line_span.length) <= ( + span.offset + span.length + ): result.append(line) return result @@ -75,14 +75,10 @@ async def get_elements_with_spans_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = await document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = await poller.result() # Below is a method to search for the lines of a particular element by using spans. @@ -92,26 +88,18 @@ async def get_elements_with_spans_async(): # `sample_get_words_on_document_line.py` under the samples v3.2_and_later directory. if result.tables is not None: for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns") lines = [] if table.bounding_regions is not None: for region in table.bounding_regions: print(f"Table # {table_idx} location on page: {region.page_number}") - lines.extend( - get_lines( - table.spans, get_page(region.page_number, result.pages) - ) - ) + lines.extend(get_lines(table.spans, get_page(region.page_number, result.pages))) print(f"Found # {len(lines)} lines in the table") for line in lines: - print( - f"...Line '{line.content}' is within bounding polygon: '{line.polygon}'" - ) + print(f"...Line '{line.content}' is within bounding polygon: '{line.polygon}'") # Below is a method to search for the style of a particular element by using spans. # This example uses DocumentLine, but other elements that also have a `spans` or `span` diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_operations_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_operations_async.py index dbc64f403c78..4d24cf48cdcc 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_operations_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_operations_async.py @@ -50,9 +50,7 @@ async def sample_get_operations_async(): print(f"Operation percent completed: {operation.percent_completed}") print(f"Operation created on: {operation.created_on}") print(f"Operation last updated on: {operation.last_updated_on}") - print( - f"Resource location of successful operation: {operation.resource_location}" - ) + print(f"Resource location of successful operation: {operation.resource_location}") # [END list_operations_async] # [START get_operation_async] @@ -61,9 +59,7 @@ async def sample_get_operations_async(): first_operation = await operations.__anext__() print(f"\nGetting operation info by ID: {first_operation.operation_id}") - operation_info = await document_model_admin_client.get_operation( - first_operation.operation_id - ) + operation_info = await document_model_admin_client.get_operation(first_operation.operation_id) if operation_info.status == "succeeded": print(f"My {operation_info.kind} operation is completed.") result = operation_info.result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_words_on_document_line_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_words_on_document_line_async.py index ca3f4fc50476..ad6d4dfc9211 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_words_on_document_line_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_get_words_on_document_line_async.py @@ -29,10 +29,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -58,21 +55,15 @@ async def get_words_on_document_line_async(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with document_analysis_client: with open(path_to_sample_documents, "rb") as f: - poller = await document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = await document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = await poller.result() for page in result.pages: print(f"----Analyzing lines and words from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") if page.lines is not None: for line_idx, line in enumerate(page.lines): @@ -83,9 +74,7 @@ async def get_words_on_document_line_async(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") print("----------------------------------------") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_classifiers_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_classifiers_async.py index a2cb2c298731..7d582ce99ba8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_classifiers_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_classifiers_async.py @@ -48,14 +48,10 @@ async def sample_manage_classifiers_async(): poller = await document_model_admin_client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=container_sas_url, prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=container_sas_url, prefix="IRS-1040-A/train") ), "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=container_sas_url, prefix="IRS-1040-D/train" - ) + source=BlobSource(container_url=container_sas_url, prefix="IRS-1040-D/train") ), }, ) @@ -82,18 +78,12 @@ async def sample_manage_classifiers_async(): # Finally, we will delete this classifier by ID # [START delete_document_classifier_async] - await document_model_admin_client.delete_document_classifier( - classifier_id=my_classifier.classifier_id - ) + await document_model_admin_client.delete_document_classifier(classifier_id=my_classifier.classifier_id) try: - await document_model_admin_client.get_document_classifier( - classifier_id=my_classifier.classifier_id - ) + await document_model_admin_client.get_document_classifier(classifier_id=my_classifier.classifier_id) except ResourceNotFoundError: - print( - f"Successfully deleted classifier with ID {my_classifier.classifier_id}" - ) + print(f"Successfully deleted classifier with ID {my_classifier.classifier_id}") # [END delete_document_classifier_async] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_models_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_models_async.py index 92ef363fe5bf..bc3127d0bc7f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_models_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_manage_models_async.py @@ -72,9 +72,7 @@ async def sample_manage_models_async(): model = await poller.result() # [START get_document_model_async] - my_model = await document_model_admin_client.get_document_model( - model_id=model.model_id - ) + my_model = await document_model_admin_client.get_document_model(model_id=model.model_id) print(f"\nModel ID: {my_model.model_id}") print(f"Description: {my_model.description}") print(f"Model created on: {my_model.created_on}") @@ -83,14 +81,10 @@ async def sample_manage_models_async(): # Finally, we will delete this model by ID # [START delete_document_model_async] - await document_model_admin_client.delete_document_model( - model_id=my_model.model_id - ) + await document_model_admin_client.delete_document_model(model_id=my_model.model_id) try: - await document_model_admin_client.get_document_model( - model_id=my_model.model_id - ) + await document_model_admin_client.get_document_model(model_id=my_model.model_id) except ResourceNotFoundError: print(f"Successfully deleted model with ID {my_model.model_id}") # [END delete_document_model_async] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_send_request_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_send_request_async.py index 88eec8f27491..d54fbe6c5ea8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_send_request_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/async_samples/sample_send_request_async.py @@ -31,10 +31,8 @@ async def sample_send_request(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - client = DocumentModelAdministrationClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) - + client = DocumentModelAdministrationClient(endpoint=endpoint, credential=AzureKeyCredential(key)) + async with client: # The `send_request` method can send custom HTTP requests that share the client's existing pipeline, # while adding convenience for endpoint construction and service API versioning. @@ -51,7 +49,7 @@ async def sample_send_request(): f"The quota limit for custom neural document models is {response_body['customNeuralDocumentModelBuilds']['quota']} and the resource has" f"used {response_body['customNeuralDocumentModelBuilds']['used']}. The resource quota will reset on {response_body['customNeuralDocumentModelBuilds']['quotaResetDateTime']}" ) - + # pass with absolute url and override the API version request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/info?api-version=2022-08-31") response = await client.send_request(request) @@ -61,7 +59,7 @@ async def sample_send_request(): f"Our resource has {response_body['customDocumentModels']['count']} custom models, " f"and we can have at most {response_body['customDocumentModels']['limit']} custom models." ) - + # override the API version to v2.1 request = HttpRequest(method="GET", url="v2.1/custom/models?op=summary") response = await client.send_request(request) @@ -71,7 +69,7 @@ async def sample_send_request(): f"Our account has {response_body['summary']['count']} custom models, " f"and we can have at most {response_body['summary']['limit']} custom models." ) - + # pass with absolute url and override the API version to v2.1 request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/v2.1/custom/models?op=summary") response = await client.send_request(request) @@ -88,9 +86,7 @@ async def sample_send_request_v2(): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] # The default FormTrainingClient API version is v2.1 - client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) async with client: # The `send_request` method can send custom HTTP requests that share the client's existing pipeline, @@ -106,7 +102,7 @@ async def sample_send_request_v2(): f"Our account has {response_body['summary']['count']} custom models, " f"and we can have at most {response_body['summary']['limit']} custom models." ) - + # pass with absolute url and override the API version request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/v2.0/custom/models?op=summary") response = await client.send_request(request) @@ -116,7 +112,7 @@ async def sample_send_request_v2(): f"Our account has {response_body['summary']['count']} custom models, " f"and we can have at most {response_body['summary']['limit']} custom models." ) - + # override the API version to 2023-07-31 # can only override the API version to 2022-08-31 or later with absolute url request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/info?api-version=2023-07-31") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_barcodes.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_barcodes.py index 88ef4eb575b9..3356c05096aa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_barcodes.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_barcodes.py @@ -45,10 +45,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -73,9 +70,7 @@ def analyze_barcodes(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Specify which add-on capabilities to enable. with open(path_to_sample_documents, "rb") as f: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_fonts.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_fonts.py index aad45700fdc7..2104baf1b586 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_fonts.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_fonts.py @@ -46,10 +46,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -62,7 +59,7 @@ def get_styled_text(styles, content): # Iterate over the styles and merge the spans from each style. spans = [span for style in styles for span in style.spans] spans.sort(key=lambda span: span.offset) - return ','.join([content[span.offset : span.offset + span.length] for span in spans]) + return ",".join([content[span.offset : span.offset + span.length] for span in spans]) def analyze_fonts(): @@ -81,9 +78,7 @@ def analyze_fonts(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Specify which add-on capabilities to enable. with open(path_to_sample_documents, "rb") as f: poller = document_analysis_client.begin_analyze_document( @@ -93,9 +88,9 @@ def analyze_fonts(): # DocumentStyle has the following font related attributes: similar_font_families = defaultdict(list) # e.g., 'Arial, sans-serif - font_styles = defaultdict(list) # e.g, 'italic' - font_weights = defaultdict(list) # e.g., 'bold' - font_colors = defaultdict(list) # in '#rrggbb' hexadecimal format + font_styles = defaultdict(list) # e.g, 'italic' + font_weights = defaultdict(list) # e.g., 'bold' + font_colors = defaultdict(list) # in '#rrggbb' hexadecimal format font_background_colors = defaultdict(list) # in '#rrggbb' hexadecimal format if any([style.is_handwritten for style in result.styles]): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_formulas.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_formulas.py index 53ceb3cc7537..d288e4450d16 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_formulas.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_formulas.py @@ -47,10 +47,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -75,9 +72,7 @@ def analyze_formulas(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Specify which add-on capabilities to enable with open(path_to_sample_documents, "rb") as f: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_highres.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_highres.py index aeea2a286b3b..d36a6480845a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_highres.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_highres.py @@ -64,9 +64,7 @@ def analyze_with_highres(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Specify which add-on capabilities to enable. with open(path_to_sample_documents, "rb") as f: @@ -82,9 +80,7 @@ def analyze_with_highres(): for page in result.pages: print(f"----Analyzing layout from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -94,9 +90,7 @@ def analyze_with_highres(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( @@ -105,18 +99,11 @@ def analyze_with_highres(): ) for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and " - f"{table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and " f"{table.column_count} columns") for region in table.bounding_regions: - print( - f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}" - ) + print(f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") for region in cell.bounding_regions: print( f"...content on page {region.page_number} is within bounding polygon '{format_polygon(region.polygon)}'" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_languages.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_languages.py index a6a3781f4b3d..446ef71a5459 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_languages.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_addon_languages.py @@ -45,10 +45,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -73,9 +70,7 @@ def analyze_languages(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Specify which add-on capabilities to enable. with open(path_to_sample_documents, "rb") as f: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_business_cards.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_business_cards.py index 7680471ee735..0d2f7799f93f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_business_cards.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_business_cards.py @@ -42,13 +42,9 @@ def analyze_business_card(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-businessCard", document=f, locale="en-US" - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-businessCard", document=f, locale="en-US") business_cards = poller.result() for idx, business_card in enumerate(business_cards.documents): @@ -67,21 +63,15 @@ def analyze_business_card(): company_names = business_card.fields.get("CompanyNames") if company_names: for company_name in company_names.value: - print( - f"Company Name: {company_name.value} has confidence: {company_name.confidence}" - ) + print(f"Company Name: {company_name.value} has confidence: {company_name.confidence}") departments = business_card.fields.get("Departments") if departments: for department in departments.value: - print( - f"Department: {department.value} has confidence: {department.confidence}" - ) + print(f"Department: {department.value} has confidence: {department.confidence}") job_titles = business_card.fields.get("JobTitles") if job_titles: for job_title in job_titles.value: - print( - f"Job Title: {job_title.value} has confidence: {job_title.confidence}" - ) + print(f"Job Title: {job_title.value} has confidence: {job_title.confidence}") emails = business_card.fields.get("Emails") if emails: for email in emails.value: @@ -97,9 +87,7 @@ def analyze_business_card(): mobile_phones = business_card.fields.get("MobilePhones") if mobile_phones: for phone in mobile_phones.value: - print( - f"Mobile phone number: {phone.content} has confidence: {phone.confidence}" - ) + print(f"Mobile phone number: {phone.content} has confidence: {phone.confidence}") faxes = business_card.fields.get("Faxes") if faxes: for fax in faxes.value: @@ -107,15 +95,11 @@ def analyze_business_card(): work_phones = business_card.fields.get("WorkPhones") if work_phones: for work_phone in work_phones.value: - print( - f"Work phone number: {work_phone.content} has confidence: {work_phone.confidence}" - ) + print(f"Work phone number: {work_phone.content} has confidence: {work_phone.confidence}") other_phones = business_card.fields.get("OtherPhones") if other_phones: for other_phone in other_phones.value: - print( - f"Other phone number: {other_phone.value} has confidence: {other_phone.confidence}" - ) + print(f"Other phone number: {other_phone.value} has confidence: {other_phone.confidence}") if __name__ == "__main__": diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_custom_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_custom_documents.py index a6f9fdf74317..c783ee047887 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_custom_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_custom_documents.py @@ -35,9 +35,7 @@ def analyze_custom_documents(custom_model_id): path_to_sample_documents = os.path.abspath( - os.path.join( - os.path.abspath(__file__), "..", "..", "./sample_forms/forms/Form_1.jpg" - ) + os.path.join(os.path.abspath(__file__), "..", "..", "./sample_forms/forms/Form_1.jpg") ) # [START analyze_custom_documents] from azure.core.credentials import AzureKeyCredential @@ -47,15 +45,11 @@ def analyze_custom_documents(custom_model_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] model_id = os.getenv("CUSTOM_BUILT_MODEL_ID", custom_model_id) - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Make sure your document's type is included in the list of document types the custom model can analyze with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - model_id=model_id, document=f - ) + poller = document_analysis_client.begin_analyze_document(model_id=model_id, document=f) result = poller.result() for idx, document in enumerate(result.documents): @@ -88,9 +82,7 @@ def analyze_custom_documents(custom_model_id): for region in table.bounding_regions: print(f"...{region.page_number}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") print("-----------------------------------") # [END analyze_custom_documents] @@ -112,9 +104,7 @@ def analyze_custom_documents(custom_model_id): key = os.getenv("AZURE_FORM_RECOGNIZER_KEY") if not endpoint or not key: - raise ValueError( - "Please provide endpoint and API key to run the samples." - ) + raise ValueError("Please provide endpoint and API key to run the samples.") document_model_admin_client = DocumentModelAdministrationClient( endpoint=endpoint, credential=AzureKeyCredential(key) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_general_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_general_documents.py index 1128a7e41a2c..dbe6d1e7c229 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_general_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_general_documents.py @@ -27,10 +27,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -56,26 +53,15 @@ def analyze_general_documents(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = poller.result() for style in result.styles: if style.is_handwritten: print("Document contains handwritten content: ") - print( - ",".join( - [ - result.content[span.offset : span.offset + span.length] - for span in style.spans - ] - ) - ) + print(",".join([result.content[span.offset : span.offset + span.length] for span in style.spans])) print("----Key-value pairs found in document----") for kv_pair in result.key_value_pairs: @@ -92,9 +78,7 @@ def analyze_general_documents(): for page in result.pages: print(f"----Analyzing document from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -104,9 +88,7 @@ def analyze_general_documents(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( @@ -116,17 +98,11 @@ def analyze_general_documents(): ) for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns") for region in table.bounding_regions: - print( - f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}" - ) + print(f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") for region in cell.bounding_regions: print( f"...content on page {region.page_number} is within bounding polygon '{format_polygon(region.polygon)}'\n" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_identity_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_identity_documents.py index 08b6857aaf30..fc626ef133a8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_identity_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_identity_documents.py @@ -42,32 +42,22 @@ def analyze_identity_documents(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-idDocument", document=f - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-idDocument", document=f) id_documents = poller.result() for idx, id_document in enumerate(id_documents.documents): print(f"--------Analyzing ID document #{idx + 1}--------") first_name = id_document.fields.get("FirstName") if first_name: - print( - f"First Name: {first_name.value} has confidence: {first_name.confidence}" - ) + print(f"First Name: {first_name.value} has confidence: {first_name.confidence}") last_name = id_document.fields.get("LastName") if last_name: - print( - f"Last Name: {last_name.value} has confidence: {last_name.confidence}" - ) + print(f"Last Name: {last_name.value} has confidence: {last_name.confidence}") document_number = id_document.fields.get("DocumentNumber") if document_number: - print( - f"Document Number: {document_number.value} has confidence: {document_number.confidence}" - ) + print(f"Document Number: {document_number.value} has confidence: {document_number.confidence}") dob = id_document.fields.get("DateOfBirth") if dob: print(f"Date of Birth: {dob.value} has confidence: {dob.confidence}") @@ -82,9 +72,7 @@ def analyze_identity_documents(): print(f"Address: {address.value} has confidence: {address.confidence}") country_region = id_document.fields.get("CountryRegion") if country_region: - print( - f"Country/Region: {country_region.value} has confidence: {country_region.confidence}" - ) + print(f"Country/Region: {country_region.value} has confidence: {country_region.confidence}") region = id_document.fields.get("Region") if region: print(f"Region: {region.value} has confidence: {region.confidence}") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_invoices.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_invoices.py index 7d07064e0d5b..6a9489df01c0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_invoices.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_invoices.py @@ -43,27 +43,19 @@ def analyze_invoice(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-invoice", document=f, locale="en-US" - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-invoice", document=f, locale="en-US") invoices = poller.result() for idx, invoice in enumerate(invoices.documents): print(f"--------Analyzing invoice #{idx + 1}--------") vendor_name = invoice.fields.get("VendorName") if vendor_name: - print( - f"Vendor Name: {vendor_name.value} has confidence: {vendor_name.confidence}" - ) + print(f"Vendor Name: {vendor_name.value} has confidence: {vendor_name.confidence}") vendor_address = invoice.fields.get("VendorAddress") if vendor_address: - print( - f"Vendor Address: {vendor_address.value} has confidence: {vendor_address.confidence}" - ) + print(f"Vendor Address: {vendor_address.value} has confidence: {vendor_address.confidence}") vendor_address_recipient = invoice.fields.get("VendorAddressRecipient") if vendor_address_recipient: print( @@ -71,19 +63,13 @@ def analyze_invoice(): ) customer_name = invoice.fields.get("CustomerName") if customer_name: - print( - f"Customer Name: {customer_name.value} has confidence: {customer_name.confidence}" - ) + print(f"Customer Name: {customer_name.value} has confidence: {customer_name.confidence}") customer_id = invoice.fields.get("CustomerId") if customer_id: - print( - f"Customer Id: {customer_id.value} has confidence: {customer_id.confidence}" - ) + print(f"Customer Id: {customer_id.value} has confidence: {customer_id.confidence}") customer_address = invoice.fields.get("CustomerAddress") if customer_address: - print( - f"Customer Address: {customer_address.value} has confidence: {customer_address.confidence}" - ) + print(f"Customer Address: {customer_address.value} has confidence: {customer_address.confidence}") customer_address_recipient = invoice.fields.get("CustomerAddressRecipient") if customer_address_recipient: print( @@ -91,32 +77,22 @@ def analyze_invoice(): ) invoice_id = invoice.fields.get("InvoiceId") if invoice_id: - print( - f"Invoice Id: {invoice_id.value} has confidence: {invoice_id.confidence}" - ) + print(f"Invoice Id: {invoice_id.value} has confidence: {invoice_id.confidence}") invoice_date = invoice.fields.get("InvoiceDate") if invoice_date: - print( - f"Invoice Date: {invoice_date.value} has confidence: {invoice_date.confidence}" - ) + print(f"Invoice Date: {invoice_date.value} has confidence: {invoice_date.confidence}") invoice_total = invoice.fields.get("InvoiceTotal") if invoice_total: - print( - f"Invoice Total: {invoice_total.value} has confidence: {invoice_total.confidence}" - ) + print(f"Invoice Total: {invoice_total.value} has confidence: {invoice_total.confidence}") due_date = invoice.fields.get("DueDate") if due_date: print(f"Due Date: {due_date.value} has confidence: {due_date.confidence}") purchase_order = invoice.fields.get("PurchaseOrder") if purchase_order: - print( - f"Purchase Order: {purchase_order.value} has confidence: {purchase_order.confidence}" - ) + print(f"Purchase Order: {purchase_order.value} has confidence: {purchase_order.confidence}") billing_address = invoice.fields.get("BillingAddress") if billing_address: - print( - f"Billing Address: {billing_address.value} has confidence: {billing_address.confidence}" - ) + print(f"Billing Address: {billing_address.value} has confidence: {billing_address.confidence}") billing_address_recipient = invoice.fields.get("BillingAddressRecipient") if billing_address_recipient: print( @@ -124,9 +100,7 @@ def analyze_invoice(): ) shipping_address = invoice.fields.get("ShippingAddress") if shipping_address: - print( - f"Shipping Address: {shipping_address.value} has confidence: {shipping_address.confidence}" - ) + print(f"Shipping Address: {shipping_address.value} has confidence: {shipping_address.confidence}") shipping_address_recipient = invoice.fields.get("ShippingAddressRecipient") if shipping_address_recipient: print( @@ -137,49 +111,35 @@ def analyze_invoice(): print(f"...Item #{idx + 1}") item_description = item.value.get("Description") if item_description: - print( - f"......Description: {item_description.value} has confidence: {item_description.confidence}" - ) + print(f"......Description: {item_description.value} has confidence: {item_description.confidence}") item_quantity = item.value.get("Quantity") if item_quantity: - print( - f"......Quantity: {item_quantity.value} has confidence: {item_quantity.confidence}" - ) + print(f"......Quantity: {item_quantity.value} has confidence: {item_quantity.confidence}") unit = item.value.get("Unit") if unit: print(f"......Unit: {unit.value} has confidence: {unit.confidence}") unit_price = item.value.get("UnitPrice") if unit_price: unit_price_code = unit_price.value.code if unit_price.value.code else "" - print( - f"......Unit Price: {unit_price.value}{unit_price_code} has confidence: {unit_price.confidence}" - ) + print(f"......Unit Price: {unit_price.value}{unit_price_code} has confidence: {unit_price.confidence}") product_code = item.value.get("ProductCode") if product_code: - print( - f"......Product Code: {product_code.value} has confidence: {product_code.confidence}" - ) + print(f"......Product Code: {product_code.value} has confidence: {product_code.confidence}") item_date = item.value.get("Date") if item_date: - print( - f"......Date: {item_date.value} has confidence: {item_date.confidence}" - ) + print(f"......Date: {item_date.value} has confidence: {item_date.confidence}") tax = item.value.get("Tax") if tax: print(f"......Tax: {tax.value} has confidence: {tax.confidence}") amount = item.value.get("Amount") if amount: - print( - f"......Amount: {amount.value} has confidence: {amount.confidence}" - ) + print(f"......Amount: {amount.value} has confidence: {amount.confidence}") subtotal = invoice.fields.get("SubTotal") if subtotal: print(f"Subtotal: {subtotal.value} has confidence: {subtotal.confidence}") total_tax = invoice.fields.get("TotalTax") if total_tax: - print( - f"Total Tax: {total_tax.value} has confidence: {total_tax.confidence}" - ) + print(f"Total Tax: {total_tax.value} has confidence: {total_tax.confidence}") previous_unpaid_balance = invoice.fields.get("PreviousUnpaidBalance") if previous_unpaid_balance: print( @@ -187,24 +147,16 @@ def analyze_invoice(): ) amount_due = invoice.fields.get("AmountDue") if amount_due: - print( - f"Amount Due: {amount_due.value} has confidence: {amount_due.confidence}" - ) + print(f"Amount Due: {amount_due.value} has confidence: {amount_due.confidence}") service_start_date = invoice.fields.get("ServiceStartDate") if service_start_date: - print( - f"Service Start Date: {service_start_date.value} has confidence: {service_start_date.confidence}" - ) + print(f"Service Start Date: {service_start_date.value} has confidence: {service_start_date.confidence}") service_end_date = invoice.fields.get("ServiceEndDate") if service_end_date: - print( - f"Service End Date: {service_end_date.value} has confidence: {service_end_date.confidence}" - ) + print(f"Service End Date: {service_end_date.value} has confidence: {service_end_date.confidence}") service_address = invoice.fields.get("ServiceAddress") if service_address: - print( - f"Service Address: {service_address.value} has confidence: {service_address.confidence}" - ) + print(f"Service Address: {service_address.value} has confidence: {service_address.confidence}") service_address_recipient = invoice.fields.get("ServiceAddressRecipient") if service_address_recipient: print( @@ -212,9 +164,7 @@ def analyze_invoice(): ) remittance_address = invoice.fields.get("RemittanceAddress") if remittance_address: - print( - f"Remittance Address: {remittance_address.value} has confidence: {remittance_address.confidence}" - ) + print(f"Remittance Address: {remittance_address.value} has confidence: {remittance_address.confidence}") remittance_address_recipient = invoice.fields.get("RemittanceAddressRecipient") if remittance_address_recipient: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_layout.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_layout.py index cabfce88931c..afbf8f5e87b4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_layout.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_layout.py @@ -51,13 +51,9 @@ def analyze_layout(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-layout", document=f - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-layout", document=f) result = poller.result() if any([style.is_handwritten for style in result.styles]): @@ -67,9 +63,7 @@ def analyze_layout(): for page in result.pages: print(f"----Analyzing layout from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -79,9 +73,7 @@ def analyze_layout(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( @@ -90,18 +82,11 @@ def analyze_layout(): ) for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and " - f"{table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and " f"{table.column_count} columns") for region in table.bounding_regions: - print( - f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}" - ) + print(f"Table # {table_idx} location on page: {region.page_number} is {format_polygon(region.polygon)}") for cell in table.cells: - print( - f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'" - ) + print(f"...Cell[{cell.row_index}][{cell.column_index}] has text '{cell.content}'") for region in cell.bounding_regions: print( f"...content on page {region.page_number} is within bounding polygon '{format_polygon(region.polygon)}'" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_read.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_read.py index 83f9a8b68932..bdc43eb93ebb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_read.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_read.py @@ -27,10 +27,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -55,9 +52,7 @@ def analyze_read(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: poller = document_analysis_client.begin_analyze_document( "prebuilt-read", document=f, features=[AnalysisFeature.STYLE_FONT] @@ -66,40 +61,20 @@ def analyze_read(): print("----Languages detected in the document----") for language in result.languages: - print( - f"Language code: '{language.locale}' with confidence {language.confidence}" - ) + print(f"Language code: '{language.locale}' with confidence {language.confidence}") print("----Styles detected in the document----") for style in result.styles: if style.is_handwritten: print("Found the following handwritten content: ") - print( - ",".join( - [ - result.content[span.offset : span.offset + span.length] - for span in style.spans - ] - ) - ) + print(",".join([result.content[span.offset : span.offset + span.length] for span in style.spans])) if style.font_style: - print( - f"The document contains '{style.font_style}' font style, applied to the following text: " - ) - print( - ",".join( - [ - result.content[span.offset : span.offset + span.length] - for span in style.spans - ] - ) - ) + print(f"The document contains '{style.font_style}' font style, applied to the following text: ") + print(",".join([result.content[span.offset : span.offset + span.length] for span in style.spans])) for page in result.pages: print(f"----Analyzing document from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") for line_idx, line in enumerate(page.lines): words = line.get_words() @@ -108,9 +83,7 @@ def analyze_read(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") for selection_mark in page.selection_marks: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts.py index 69da3a02f316..825f95c95a89 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts.py @@ -44,13 +44,9 @@ def analyze_receipts(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-receipt", document=f, locale="en-US" - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-receipt", document=f, locale="en-US") receipts = poller.result() for idx, receipt in enumerate(receipts.documents): @@ -58,16 +54,10 @@ def analyze_receipts(): print(f"Receipt type: {receipt.doc_type if receipt.doc_type else 'N/A'}") merchant_name = receipt.fields.get("MerchantName") if merchant_name: - print( - f"Merchant Name: {merchant_name.value} has confidence: " - f"{merchant_name.confidence}" - ) + print(f"Merchant Name: {merchant_name.value} has confidence: " f"{merchant_name.confidence}") transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print( - f"Transaction Date: {transaction_date.value} has confidence: " - f"{transaction_date.confidence}" - ) + print(f"Transaction Date: {transaction_date.value} has confidence: " f"{transaction_date.confidence}") if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): @@ -80,15 +70,11 @@ def analyze_receipts(): ) item_quantity = item.value.get("Quantity") if item_quantity: - print( - f"......Item Quantity: {item_quantity.value} has confidence: " - f"{item_quantity.confidence}" - ) + print(f"......Item Quantity: {item_quantity.value} has confidence: " f"{item_quantity.confidence}") item_price = item.value.get("Price") if item_price: print( - f"......Individual Item Price: {item_price.value} has confidence: " - f"{item_price.confidence}" + f"......Individual Item Price: {item_price.value} has confidence: " f"{item_price.confidence}" ) item_total_price = item.value.get("TotalPrice") if item_total_price: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts_from_url.py index b9502396e044..1f436a342ca9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_receipts_from_url.py @@ -35,13 +35,9 @@ def analyze_receipts_from_url(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/receipt/contoso-receipt.png" - poller = document_analysis_client.begin_analyze_document_from_url( - "prebuilt-receipt", document_url=url - ) + poller = document_analysis_client.begin_analyze_document_from_url("prebuilt-receipt", document_url=url) receipts = poller.result() for idx, receipt in enumerate(receipts.documents): @@ -49,16 +45,10 @@ def analyze_receipts_from_url(): print(f"Receipt type: {receipt.doc_type if receipt.doc_type else 'N/A'}") merchant_name = receipt.fields.get("MerchantName") if merchant_name: - print( - f"Merchant Name: {merchant_name.value} has confidence: " - f"{merchant_name.confidence}" - ) + print(f"Merchant Name: {merchant_name.value} has confidence: " f"{merchant_name.confidence}") transaction_date = receipt.fields.get("TransactionDate") if transaction_date: - print( - f"Transaction Date: {transaction_date.value} has confidence: " - f"{transaction_date.confidence}" - ) + print(f"Transaction Date: {transaction_date.value} has confidence: " f"{transaction_date.confidence}") if receipt.fields.get("Items"): print("Receipt items:") for idx, item in enumerate(receipt.fields.get("Items").value): @@ -71,15 +61,11 @@ def analyze_receipts_from_url(): ) item_quantity = item.value.get("Quantity") if item_quantity: - print( - f"......Item Quantity: {item_quantity.value} has confidence: " - f"{item_quantity.confidence}" - ) + print(f"......Item Quantity: {item_quantity.value} has confidence: " f"{item_quantity.confidence}") item_price = item.value.get("Price") if item_price: print( - f"......Individual Item Price: {item_price.value} has confidence: " - f"{item_price.confidence}" + f"......Individual Item Price: {item_price.value} has confidence: " f"{item_price.confidence}" ) item_total_price = item.value.get("TotalPrice") if item_total_price: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_tax_us_w2.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_tax_us_w2.py index dc15358cae11..4cad11439606 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_tax_us_w2.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_analyze_tax_us_w2.py @@ -46,23 +46,16 @@ def analyze_tax_us_w2(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-tax.us.w2", document=f, locale="en-US" - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-tax.us.w2", document=f, locale="en-US") w2s = poller.result() for idx, w2 in enumerate(w2s.documents): print(f"--------Analyzing US Tax W-2 Form #{idx + 1}--------") form_variant = w2.fields.get("W2FormVariant") if form_variant: - print( - f"Form variant: {form_variant.value} has confidence: " - f"{form_variant.confidence}" - ) + print(f"Form variant: {form_variant.value} has confidence: " f"{form_variant.confidence}") tax_year = w2.fields.get("TaxYear") if tax_year: print(f"Tax year: {tax_year.value} has confidence: {tax_year.confidence}") @@ -74,57 +67,40 @@ def analyze_tax_us_w2(): print("Employee data:") employee_name = employee.value.get("Name") if employee_name: - print( - f"...Name: {employee_name.value} has confidence: {employee_name.confidence}" - ) + print(f"...Name: {employee_name.value} has confidence: {employee_name.confidence}") employee_ssn = employee.value.get("SocialSecurityNumber") if employee_ssn: - print( - f"...SSN: {employee_ssn.value} has confidence: {employee_ssn.confidence}" - ) + print(f"...SSN: {employee_ssn.value} has confidence: {employee_ssn.confidence}") employee_address = employee.value.get("Address") if employee_address: print(f"...Address: {format_address_value(employee_address.value)}") print(f"......has confidence: {employee_address.confidence}") employee_zipcode = employee.value.get("ZipCode") if employee_zipcode: - print( - f"...Zipcode: {employee_zipcode.value} has confidence: " - f"{employee_zipcode.confidence}" - ) + print(f"...Zipcode: {employee_zipcode.value} has confidence: " f"{employee_zipcode.confidence}") control_number = w2.fields.get("ControlNumber") if control_number: - print( - f"Control Number: {control_number.value} has confidence: " - f"{control_number.confidence}" - ) + print(f"Control Number: {control_number.value} has confidence: " f"{control_number.confidence}") employer = w2.fields.get("Employer") if employer: print("Employer data:") employer_name = employer.value.get("Name") if employer_name: - print( - f"...Name: {employer_name.value} has confidence: {employer_name.confidence}" - ) + print(f"...Name: {employer_name.value} has confidence: {employer_name.confidence}") employer_id = employer.value.get("IdNumber") if employer_id: - print( - f"...ID Number: {employer_id.value} has confidence: {employer_id.confidence}" - ) + print(f"...ID Number: {employer_id.value} has confidence: {employer_id.confidence}") employer_address = employer.value.get("Address") if employer_address: print(f"...Address: {format_address_value(employer_address.value)}") print(f"\n......has confidence: {employer_address.confidence}") employer_zipcode = employer.value.get("ZipCode") if employer_zipcode: - print( - f"...Zipcode: {employer_zipcode.value} has confidence: {employer_zipcode.confidence}" - ) + print(f"...Zipcode: {employer_zipcode.value} has confidence: {employer_zipcode.confidence}") wages_tips = w2.fields.get("WagesTipsAndOtherCompensation") if wages_tips: print( - f"Wages, tips, and other compensation: {wages_tips.value} " - f"has confidence: {wages_tips.confidence}" + f"Wages, tips, and other compensation: {wages_tips.value} " f"has confidence: {wages_tips.confidence}" ) fed_income_tax_withheld = w2.fields.get("FederalIncomeTaxWithheld") if fed_income_tax_withheld: @@ -164,14 +140,10 @@ def analyze_tax_us_w2(): ) allocated_tips = w2.fields.get("AllocatedTips") if allocated_tips: - print( - f"Allocated tips: {allocated_tips.value} has confidence: {allocated_tips.confidence}" - ) + print(f"Allocated tips: {allocated_tips.value} has confidence: {allocated_tips.confidence}") verification_code = w2.fields.get("VerificationCode") if verification_code: - print( - f"Verification code: {verification_code.value} has confidence: {verification_code.confidence}" - ) + print(f"Verification code: {verification_code.value} has confidence: {verification_code.confidence}") dependent_care_benefits = w2.fields.get("DependentCareBenefits") if dependent_care_benefits: print( @@ -179,23 +151,17 @@ def analyze_tax_us_w2(): ) non_qualified_plans = w2.fields.get("NonQualifiedPlans") if non_qualified_plans: - print( - f"Non-qualified plans: {non_qualified_plans.value} has confidence: {non_qualified_plans.confidence}" - ) + print(f"Non-qualified plans: {non_qualified_plans.value} has confidence: {non_qualified_plans.confidence}") additional_info = w2.fields.get("AdditionalInfo") if additional_info: print("Additional information:") for item in additional_info.value: letter_code = item.value.get("LetterCode") if letter_code: - print( - f"...Letter code: {letter_code.value} has confidence: {letter_code.confidence}" - ) + print(f"...Letter code: {letter_code.value} has confidence: {letter_code.confidence}") amount = item.value.get("Amount") if amount: - print( - f"...Amount: {amount.value} has confidence: {amount.confidence}" - ) + print(f"...Amount: {amount.value} has confidence: {amount.confidence}") is_statutory_employee = w2.fields.get("IsStatutoryEmployee") if is_statutory_employee: print( @@ -203,9 +169,7 @@ def analyze_tax_us_w2(): ) is_retirement_plan = w2.fields.get("IsRetirementPlan") if is_retirement_plan: - print( - f"Is retirement plan: {is_retirement_plan.value} has confidence: {is_retirement_plan.confidence}" - ) + print(f"Is retirement plan: {is_retirement_plan.value} has confidence: {is_retirement_plan.confidence}") third_party_sick_pay = w2.fields.get("IsThirdPartySickPay") if third_party_sick_pay: print( @@ -213,9 +177,7 @@ def analyze_tax_us_w2(): ) other_info = w2.fields.get("Other") if other_info: - print( - f"Other information: {other_info.value} has confidence: {other_info.confidence}" - ) + print(f"Other information: {other_info.value} has confidence: {other_info.confidence}") state_tax_info = w2.fields.get("StateTaxInfos") if state_tax_info: print("State Tax info:") @@ -259,10 +221,7 @@ def analyze_tax_us_w2(): ) locality_name = tax.value.get("LocalityName") if locality_name: - print( - f"...Locality name: {locality_name.value} has confidence: " - f"{locality_name.confidence}" - ) + print(f"...Locality name: {locality_name.value} has confidence: " f"{locality_name.confidence}") if __name__ == "__main__": diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_authentication.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_authentication.py index b9dff863ceca..45493698cd22 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_authentication.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_authentication.py @@ -45,9 +45,7 @@ def authentication_with_api_key_credential_document_analysis_client(): document_analysis_client = DocumentAnalysisClient(endpoint, AzureKeyCredential(key)) # [END create_da_client_with_key] - poller = document_analysis_client.begin_analyze_document_from_url( - "prebuilt-layout", url - ) + poller = document_analysis_client.begin_analyze_document_from_url("prebuilt-layout", url) result = poller.result() @@ -64,9 +62,7 @@ def authentication_with_azure_active_directory_document_analysis_client(): document_analysis_client = DocumentAnalysisClient(endpoint, credential) # [END create_da_client_with_aad] - poller = document_analysis_client.begin_analyze_document_from_url( - "prebuilt-layout", url - ) + poller = document_analysis_client.begin_analyze_document_from_url("prebuilt-layout", url) result = poller.result() @@ -78,9 +74,7 @@ def authentication_with_api_key_credential_document_model_admin_client(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_model_admin_client = DocumentModelAdministrationClient( - endpoint, AzureKeyCredential(key) - ) + document_model_admin_client = DocumentModelAdministrationClient(endpoint, AzureKeyCredential(key)) # [END create_dt_client_with_key] info = document_model_admin_client.get_resource_details() @@ -96,9 +90,7 @@ def authentication_with_azure_active_directory_document_model_admin_client(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] credential = DefaultAzureCredential() - document_model_admin_client = DocumentModelAdministrationClient( - endpoint, credential - ) + document_model_admin_client = DocumentModelAdministrationClient(endpoint, credential) # [END create_dt_client_with_aad] info = document_model_admin_client.get_resource_details() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_classifier.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_classifier.py index 31125c1edfe9..bb00884466ab 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_classifier.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_classifier.py @@ -48,14 +48,10 @@ def sample_build_classifier(): poller = document_model_admin_client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=container_sas_url, prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=container_sas_url, prefix="IRS-1040-A/train") ), "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobFileListSource( - container_url=container_sas_url, file_list="IRS-1040-D.jsonl" - ) + source=BlobFileListSource(container_url=container_sas_url, file_list="IRS-1040-D.jsonl") ), }, description="IRS document classifier", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_model.py index 681f7cf5c0b3..54a998a1cf31 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_build_model.py @@ -40,9 +40,7 @@ def sample_build_model(): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] container_sas_url = os.environ["CONTAINER_SAS_URL"] - document_model_admin_client = DocumentModelAdministrationClient( - endpoint, AzureKeyCredential(key) - ) + document_model_admin_client = DocumentModelAdministrationClient(endpoint, AzureKeyCredential(key)) poller = document_model_admin_client.begin_build_document_model( ModelBuildMode.TEMPLATE, blob_container_url=container_sas_url, @@ -56,9 +54,7 @@ def sample_build_model(): print(f"Model expires on: {model.expires_on}") print("Doc types the model can recognize:") for name, doc_type in model.doc_types.items(): - print( - f"Doc Type: '{name}' built with '{doc_type.build_mode}' mode which has the following fields:" - ) + print(f"Doc Type: '{name}' built with '{doc_type.build_mode}' mode which has the following fields:") for field_name, field in doc_type.field_schema.items(): print( f"Field: '{field_name}' has type '{field['type']}' and confidence score " diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document.py index 55b81e1eb4a1..54a4b53598c3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document.py @@ -49,13 +49,9 @@ def classify_document(classifier_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] classifier_id = os.getenv("CLASSIFIER_ID", classifier_id) - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_classify_document( - classifier_id, document=f - ) + poller = document_analysis_client.begin_classify_document(classifier_id, document=f) result = poller.result() print("----Classified documents----") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document_from_url.py index 72c9a6e4be6f..b882fd84138b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_classify_document_from_url.py @@ -40,15 +40,11 @@ def classify_document_from_url(classifier_id): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] classifier_id = os.getenv("CLASSIFIER_ID", classifier_id) - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/forms/IRS-1040.pdf" - poller = document_analysis_client.begin_classify_document_from_url( - classifier_id, document_url=url - ) + poller = document_analysis_client.begin_classify_document_from_url(classifier_id, document_url=url) result = poller.result() print("----Classified documents----") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_convert_to_and_from_dict.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_convert_to_and_from_dict.py index dbfd9745daba..9efd6bf3ec1c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_convert_to_and_from_dict.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_convert_to_and_from_dict.py @@ -43,13 +43,9 @@ def convert_to_and_from_dict(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = poller.result() # convert the received model to a dictionary diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_copy_model_to.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_copy_model_to.py index 29d6f4b9acc9..24733029e66b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_copy_model_to.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_copy_model_to.py @@ -48,9 +48,7 @@ def sample_copy_model_to(custom_model_id): endpoint=target_endpoint, credential=AzureKeyCredential(target_key) ) - target = target_client.get_copy_authorization( - description="model copied from other resource" - ) + target = target_client.get_copy_authorization(description="model copied from other resource") source_client = DocumentModelAdministrationClient( endpoint=source_endpoint, credential=AzureKeyCredential(source_key) @@ -93,9 +91,7 @@ def sample_copy_model_to(custom_model_id): key = os.getenv("AZURE_FORM_RECOGNIZER_SOURCE_KEY") if not endpoint or not key: - raise ValueError( - "Please provide endpoint and API key to run the samples." - ) + raise ValueError("Please provide endpoint and API key to run the samples.") document_model_admin_client = DocumentModelAdministrationClient( endpoint=endpoint, credential=AzureKeyCredential(key) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_elements_with_spans.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_elements_with_spans.py index 5536d86e48f3..6e66296addec 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_elements_with_spans.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_elements_with_spans.py @@ -12,7 +12,7 @@ DESCRIPTION: This sample demonstrates how to get elements that are contained in the spans of another element. In this sample, the examples attempt to find the lines and styles that have the same spans as the - main search element. The purpose of this sample is to show how to search for document elements + main search element. The purpose of this sample is to show how to search for document elements that are within the same span area as other elements. USAGE: @@ -31,9 +31,9 @@ def get_styles(element_spans, styles): for span in element_spans: for style in styles: for style_span in style.spans: - if style_span.offset >= span.offset and ( - style_span.offset + style_span.length - ) <= (span.offset + span.length): + if style_span.offset >= span.offset and (style_span.offset + style_span.length) <= ( + span.offset + span.length + ): result.append(style) return result @@ -43,9 +43,9 @@ def get_lines(element_spans, document_page): for span in element_spans: for line in document_page.lines: for line_span in line.spans: - if line_span.offset >= span.offset and ( - line_span.offset + line_span.length - ) <= (span.offset + span.length): + if line_span.offset >= span.offset and (line_span.offset + line_span.length) <= ( + span.offset + span.length + ): result.append(line) return result @@ -73,13 +73,9 @@ def get_elements_with_spans(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = poller.result() # Below is a method to search for the lines of a particular element by using spans. @@ -89,26 +85,18 @@ def get_elements_with_spans(): # `sample_get_words_on_document_line.py` under the samples v3.2_and_later directory. if result.tables is not None: for table_idx, table in enumerate(result.tables): - print( - f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns" - ) + print(f"Table # {table_idx} has {table.row_count} rows and {table.column_count} columns") lines = [] if table.bounding_regions is not None: for region in table.bounding_regions: print(f"Table # {table_idx} location on page: {region.page_number}") - lines.extend( - get_lines( - table.spans, get_page(region.page_number, result.pages) - ) - ) + lines.extend(get_lines(table.spans, get_page(region.page_number, result.pages))) print(f"Found # {len(lines)} lines in the table") for line in lines: - print( - f"...Line '{line.content}' is within bounding polygon: '{line.polygon}'" - ) + print(f"...Line '{line.content}' is within bounding polygon: '{line.polygon}'") # Below is a method to search for the style of a particular element by using spans. # This example uses DocumentLine, but other elements that also have a `spans` or `span` diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_operations.py index 1cecb014b731..81e1e9d426b3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_operations.py @@ -48,18 +48,14 @@ def sample_get_operations(): print(f"Operation percent completed: {operation.percent_completed}") print(f"Operation created on: {operation.created_on}") print(f"Operation last updated on: {operation.last_updated_on}") - print( - f"Resource location of successful operation: {operation.resource_location}" - ) + print(f"Resource location of successful operation: {operation.resource_location}") # [END list_operations] # [START get_operation] # Get an operation by ID if operations: print(f"\nGetting operation info by ID: {operations[0].operation_id}") - operation_info = document_model_admin_client.get_operation( - operations[0].operation_id - ) + operation_info = document_model_admin_client.get_operation(operations[0].operation_id) if operation_info.status == "succeeded": print(f"My {operation_info.kind} operation is completed.") result = operation_info.result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_words_on_document_line.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_words_on_document_line.py index fe33fb74a7b8..c87bde1e5e50 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_words_on_document_line.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_get_words_on_document_line.py @@ -28,10 +28,7 @@ def format_bounding_region(bounding_regions): if not bounding_regions: return "N/A" - return ", ".join( - f"Page #{region.page_number}: {format_polygon(region.polygon)}" - for region in bounding_regions - ) + return ", ".join(f"Page #{region.page_number}: {format_polygon(region.polygon)}" for region in bounding_regions) def format_polygon(polygon): @@ -56,20 +53,14 @@ def get_words_on_document_line(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - document_analysis_client = DocumentAnalysisClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) + document_analysis_client = DocumentAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) with open(path_to_sample_documents, "rb") as f: - poller = document_analysis_client.begin_analyze_document( - "prebuilt-document", document=f - ) + poller = document_analysis_client.begin_analyze_document("prebuilt-document", document=f) result = poller.result() for page in result.pages: print(f"----Analyzing lines and words from page #{page.page_number}----") - print( - f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}" - ) + print(f"Page has width: {page.width} and height: {page.height}, measured with unit: {page.unit}") if page.lines is not None: for line_idx, line in enumerate(page.lines): @@ -80,9 +71,7 @@ def get_words_on_document_line(): ) for word in words: - print( - f"......Word '{word.content}' has a confidence of {word.confidence}" - ) + print(f"......Word '{word.content}' has a confidence of {word.confidence}") print("----------------------------------------") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_manage_classifiers.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_manage_classifiers.py index f7e240652ea6..cfc94177d8c0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_manage_classifiers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_manage_classifiers.py @@ -46,14 +46,10 @@ def sample_manage_classifiers(): poller = document_model_admin_client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=container_sas_url, prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=container_sas_url, prefix="IRS-1040-A/train") ), "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=container_sas_url, prefix="IRS-1040-D/train" - ) + source=BlobSource(container_url=container_sas_url, prefix="IRS-1040-D/train") ), }, ) @@ -70,9 +66,7 @@ def sample_manage_classifiers(): # [END list_document_classifiers] # [START get_document_classifier] - my_classifier = document_model_admin_client.get_document_classifier( - classifier_id=classifier_model.classifier_id - ) + my_classifier = document_model_admin_client.get_document_classifier(classifier_id=classifier_model.classifier_id) print(f"\nClassifier ID: {my_classifier.classifier_id}") print(f"Description: {my_classifier.description}") print(f"Classifier created on: {my_classifier.created_on}") @@ -80,14 +74,10 @@ def sample_manage_classifiers(): # Finally, we will delete this classifier by ID # [START delete_document_classifier] - document_model_admin_client.delete_document_classifier( - classifier_id=my_classifier.classifier_id - ) + document_model_admin_client.delete_document_classifier(classifier_id=my_classifier.classifier_id) try: - document_model_admin_client.get_document_classifier( - classifier_id=my_classifier.classifier_id - ) + document_model_admin_client.get_document_classifier(classifier_id=my_classifier.classifier_id) except ResourceNotFoundError: print(f"Successfully deleted classifier with ID {my_classifier.classifier_id}") # [END delete_document_classifier] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_send_request.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_send_request.py index 2fd54ca24f13..51bc1ee53947 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_send_request.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2_and_later/sample_send_request.py @@ -30,10 +30,8 @@ def sample_send_request(): endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] - client = DocumentModelAdministrationClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) - + client = DocumentModelAdministrationClient(endpoint=endpoint, credential=AzureKeyCredential(key)) + # The `send_request` method can send custom HTTP requests that share the client's existing pipeline, # while adding convenience for endpoint construction and service API versioning. # Now let's use the `send_request` method to make a resource details fetching request. @@ -49,7 +47,7 @@ def sample_send_request(): f"The quota limit for custom neural document models is {response_body['customNeuralDocumentModelBuilds']['quota']} and the resource has" f"used {response_body['customNeuralDocumentModelBuilds']['used']}. The resource quota will reset on {response_body['customNeuralDocumentModelBuilds']['quotaResetDateTime']}" ) - + # pass with absolute url and override the API version request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/info?api-version=2022-08-31") response = client.send_request(request) @@ -59,7 +57,7 @@ def sample_send_request(): f"Our resource has {response_body['customDocumentModels']['count']} custom models, " f"and we can have at most {response_body['customDocumentModels']['limit']} custom models." ) - + # override the API version to v2.1 request = HttpRequest(method="GET", url="v2.1/custom/models?op=summary") response = client.send_request(request) @@ -69,7 +67,7 @@ def sample_send_request(): f"Our account has {response_body['summary']['count']} custom models, " f"and we can have at most {response_body['summary']['limit']} custom models." ) - + # pass with absolute url and override the API version to v2.1 request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/v2.1/custom/models?op=summary") response = client.send_request(request) @@ -86,10 +84,8 @@ def sample_send_request_v2(): key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] # The default FormTrainingClient API version is v2.1 - client = FormTrainingClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) - + client = FormTrainingClient(endpoint=endpoint, credential=AzureKeyCredential(key)) + # The `send_request` method can send custom HTTP requests that share the client's existing pipeline, # while adding convenience for endpoint construction and service API versioning. # Now let's use the `send_request` method to make a resource details fetching request. @@ -103,7 +99,7 @@ def sample_send_request_v2(): f"Our account has {response_body['summary']['count']} custom models, " f"and we can have at most {response_body['summary']['limit']} custom models." ) - + # pass with absolute url and override the API version request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/v2.0/custom/models?op=summary") response = client.send_request(request) @@ -113,7 +109,7 @@ def sample_send_request_v2(): f"Our account has {response_body['summary']['count']} custom models, " f"and we can have at most {response_body['summary']['limit']} custom models." ) - + # override the API version to 2023-07-31 request = HttpRequest(method="GET", url=f"{endpoint}/formrecognizer/info?api-version=2023-07-31") response = client.send_request(request) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/setup.py b/sdk/formrecognizer/azure-ai-formrecognizer/setup.py index ca595a58b1a3..f78f59bfa64b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/setup.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,62 +16,63 @@ PACKAGE_PPRINT_NAME = "Azure Form Recognizer" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, include_package_data=True, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, form recognizer, cognitive services, document analyzer, document analysis, applied ai, azure sdk", classifiers=[ "Development Status :: 5 - Production/Stable", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.ai', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.ai", + ] + ), package_data={ - 'azure.ai.formrecognizer': ['py.typed'], + "azure.ai.formrecognizer": ["py.typed"], }, python_requires=">=3.8", install_requires=[ "azure-core>=1.30.0", "msrest>=0.6.21", - 'azure-common>=1.1', + "azure-common>=1.1", "typing-extensions>=4.0.1", - ] + ], ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/asynctestcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/asynctestcase.py index aab4082bd72a..c521c9987710 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/asynctestcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/asynctestcase.py @@ -1,4 +1,3 @@ - # coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,6 +15,7 @@ class AsyncFakeTokenCredential(object): """Protocol for classes able to provide OAuth tokens. :param str scopes: Lets you specify the type of access needed. """ + def __init__(self): self.token = AccessToken("YOU SHALL NOT PASS", 0) @@ -28,6 +28,7 @@ class AsyncFormRecognizerTest(FormRecognizerTest): def generate_oauth_token(self): if self.is_live: from azure.identity.aio import ClientSecretCredential + return ClientSecretCredential( os.getenv("FORMRECOGNIZER_TENANT_ID"), os.getenv("FORMRECOGNIZER_CLIENT_ID"), diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/conftest.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/conftest.py index da14e3096622..5951ac14d649 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/conftest.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/conftest.py @@ -1,4 +1,3 @@ - # coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -20,13 +19,11 @@ remove_batch_sanitizers, ) + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): add_remove_header_sanitizer(headers="Ocp-Apim-Subscription-Key") - add_general_regex_sanitizer( - value="fakeendpoint", - regex="(?<=\\/\\/)[a-z-]+(?=\\.cognitiveservices\\.azure\\.com)" - ) + add_general_regex_sanitizer(value="fakeendpoint", regex="(?<=\\/\\/)[a-z-]+(?=\\.cognitiveservices\\.azure\\.com)") add_oauth_response_sanitizer() add_body_key_sanitizer( json_path="targetResourceId", @@ -48,6 +45,7 @@ def add_sanitizers(test_proxy): # - AZSDK2003: Location remove_batch_sanitizers(["AZSDK3447", "AZSDK2003"]) + def skip_flaky_test(f): @wraps(f) def wrapper(*args, **kwargs): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_custom_forms.py index 0108760ae8ef..fef175c3fcb4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_custom_forms.py @@ -12,34 +12,45 @@ from devtools_testutils.perfstress_tests import PerfStressTest from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient, FormContentType -from azure.ai.formrecognizer.aio import FormRecognizerClient as AsyncFormRecognizerClient, FormTrainingClient as AsyncFormTrainingClient +from azure.ai.formrecognizer.aio import ( + FormRecognizerClient as AsyncFormRecognizerClient, + FormTrainingClient as AsyncFormTrainingClient, +) -class RecognizeCustomForms(PerfStressTest): + +class RecognizeCustomForms(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) - with open(os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./../sample_forms/forms/Form_1.jpg")), "rb") as fd: + with open( + os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./../sample_forms/forms/Form_1.jpg")), "rb" + ) as fd: self.custom_form_jpg = fd.read() - + # read test related env vars self.formrecognizer_storage_container_sas_url = os.environ["FORMRECOGNIZER_TRAINING_DATA_CONTAINER_SAS_URL"] formrecognizer_test_endpoint = os.environ["FORMRECOGNIZER_TEST_ENDPOINT"] form_recognizer_account_key = os.environ["FORMRECOGNIZER_TEST_API_KEY"] # assign the clients that will be used in the perf tests - self.service_client = FormRecognizerClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) - self.async_service_client = AsyncFormRecognizerClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) + self.service_client = FormRecognizerClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) + self.async_service_client = AsyncFormRecognizerClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) # training client will be used for model training in set up - self.async_training_client = AsyncFormTrainingClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) + self.async_training_client = AsyncFormTrainingClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) async def global_setup(self): """The global setup is run only once.""" poller = await self.async_training_client.begin_training( - self.formrecognizer_storage_container_sas_url, - use_training_labels=True, - model_name="labeled") + self.formrecognizer_storage_container_sas_url, use_training_labels=True, model_name="labeled" + ) model = await poller.result() self.model_id = model.model_id @@ -57,17 +68,15 @@ async def close(self): def run_sync(self): """The synchronous perf test.""" poller = self.service_client.begin_recognize_custom_forms( - self.model_id, - self.custom_form_jpg, - content_type=FormContentType.IMAGE_JPEG) + self.model_id, self.custom_form_jpg, content_type=FormContentType.IMAGE_JPEG + ) result = poller.result() assert result async def run_async(self): """The asynchronous perf test.""" poller = await self.async_service_client.begin_recognize_custom_forms( - self.model_id, - self.custom_form_jpg, - content_type=FormContentType.IMAGE_JPEG) + self.model_id, self.custom_form_jpg, content_type=FormContentType.IMAGE_JPEG + ) result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_from_url_requests.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_from_url_requests.py index c125c5538b12..ee35bb1dfcda 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_from_url_requests.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_from_url_requests.py @@ -10,20 +10,25 @@ from azure.ai.formrecognizer import DocumentAnalysisClient from azure.ai.formrecognizer.aio import DocumentAnalysisClient as AsyncDocumentAnalysisClient -class AnalyzeDocumentFromUrlRequestPreparation(PerfStressTest): + +class AnalyzeDocumentFromUrlRequestPreparation(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) self.document_jpg_url = "https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/forms/Form_1.jpg" - + # read test related env vars formrecognizer_test_endpoint = os.environ["FORMRECOGNIZER_TEST_ENDPOINT"] form_recognizer_account_key = os.environ["FORMRECOGNIZER_TEST_API_KEY"] # assign the clients that will be used in the perf tests - self.service_client = DocumentAnalysisClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) - self.async_service_client = AsyncDocumentAnalysisClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) + self.service_client = DocumentAnalysisClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) + self.async_service_client = AsyncDocumentAnalysisClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) async def close(self): """This is run after cleanup.""" @@ -33,14 +38,12 @@ async def close(self): def run_sync(self): """The synchronous perf test.""" - poller = self.service_client.begin_analyze_document_from_url( - "prebuilt-document", - self.document_jpg_url) + poller = self.service_client.begin_analyze_document_from_url("prebuilt-document", self.document_jpg_url) assert poller async def run_async(self): """The asynchronous perf test.""" poller = await self.async_service_client.begin_analyze_document_from_url( - "prebuilt-document", - self.document_jpg_url) + "prebuilt-document", self.document_jpg_url + ) assert poller diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_requests.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_requests.py index d63f63bf06a9..52a836c47ac4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_requests.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dac_analyze_document_requests.py @@ -10,21 +10,28 @@ from azure.ai.formrecognizer import DocumentAnalysisClient from azure.ai.formrecognizer.aio import DocumentAnalysisClient as AsyncDocumentAnalysisClient -class AnalyzeDocumentRequestPreparation(PerfStressTest): + +class AnalyzeDocumentRequestPreparation(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) - with open(os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./../sample_forms/forms/Form_1.jpg")), "rb") as fd: + with open( + os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./../sample_forms/forms/Form_1.jpg")), "rb" + ) as fd: self.document_jpg = fd.read() - + # read test related env vars formrecognizer_test_endpoint = os.environ["FORMRECOGNIZER_TEST_ENDPOINT"] form_recognizer_account_key = os.environ["FORMRECOGNIZER_TEST_API_KEY"] # assign the clients that will be used in the perf tests - self.service_client = DocumentAnalysisClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) - self.async_service_client = AsyncDocumentAnalysisClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) + self.service_client = DocumentAnalysisClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) + self.async_service_client = AsyncDocumentAnalysisClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) async def close(self): """This is run after cleanup.""" @@ -34,14 +41,10 @@ async def close(self): def run_sync(self): """The synchronous perf test.""" - poller = self.service_client.begin_analyze_document( - "prebuilt-document", - self.document_jpg) + poller = self.service_client.begin_analyze_document("prebuilt-document", self.document_jpg) assert poller async def run_async(self): """The asynchronous perf test.""" - poller = await self.async_service_client.begin_analyze_document( - "prebuilt-document", - self.document_jpg) + poller = await self.async_service_client.begin_analyze_document("prebuilt-document", self.document_jpg) assert poller diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dmac_build_model_requests.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dmac_build_model_requests.py index 93385907d6b1..7a6e55722597 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dmac_build_model_requests.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/perfstress_tests/perf_dmac_build_model_requests.py @@ -10,7 +10,8 @@ from azure.ai.formrecognizer import DocumentModelAdministrationClient from azure.ai.formrecognizer.aio import DocumentModelAdministrationClient as AsyncDocumentModelAdministrationClient -class BuildModelRequestPreparation(PerfStressTest): + +class BuildModelRequestPreparation(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) @@ -21,8 +22,12 @@ def __init__(self, arguments): form_recognizer_account_key = os.environ["FORMRECOGNIZER_TEST_API_KEY"] # assign the clients that will be used in the perf tests - self.admin_client = DocumentModelAdministrationClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) - self.async_admin_client = AsyncDocumentModelAdministrationClient(formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key)) + self.admin_client = DocumentModelAdministrationClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) + self.async_admin_client = AsyncDocumentModelAdministrationClient( + formrecognizer_test_endpoint, AzureKeyCredential(form_recognizer_account_key) + ) async def close(self): """This is run after cleanup.""" @@ -32,10 +37,14 @@ async def close(self): def run_sync(self): """The synchronous perf test.""" - poller = self.admin_client.begin_build_document_model("template", blob_container_url=self.formrecognizer_storage_container_sas_url) + poller = self.admin_client.begin_build_document_model( + "template", blob_container_url=self.formrecognizer_storage_container_sas_url + ) assert poller async def run_async(self): """The asynchronous perf test.""" - poller = await self.async_admin_client.begin_build_document_model("template", blob_container_url=self.formrecognizer_storage_container_sas_url) + poller = await self.async_admin_client.begin_build_document_model( + "template", blob_container_url=self.formrecognizer_storage_container_sas_url + ) assert poller diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py index 384ee95ef469..cc5533a31ba4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/preparers.py @@ -1,4 +1,3 @@ - # coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -11,13 +10,13 @@ from devtools_testutils import PowerShellPreparer, AzureMgmtPreparer, is_live, get_credential from azure.core.credentials import AzureKeyCredential -ENABLE_LOGGER = os.getenv('ENABLE_LOGGER', "False") -REGION = os.getenv('FORMRECOGNIZER_LOCATION', None) +ENABLE_LOGGER = os.getenv("ENABLE_LOGGER", "False") +REGION = os.getenv("FORMRECOGNIZER_LOCATION", None) FormRecognizerPreparer = functools.partial( PowerShellPreparer, - 'formrecognizer', + "formrecognizer", formrecognizer_test_endpoint="https://fakeendpoint.cognitiveservices.azure.com", formrecognizer_storage_container_sas_url="https://blob_sas_url", formrecognizer_testing_data_container_sas_url="https://blob_sas_url", @@ -34,11 +33,12 @@ formrecognizer_table_fixed_rows_container_sas_url_v2="https://blob_sas_url", formrecognizer_training_data_classifier="https://blob_sas_url", formrecognizer_resource_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.CognitiveServices/accounts/formrecognizername", - formrecognizer_region="region" + formrecognizer_region="region", ) + def get_sync_client(client_cls, **kwargs): - ENABLE_LOGGER = os.getenv('ENABLE_LOGGER', "False") + ENABLE_LOGGER = os.getenv("ENABLE_LOGGER", "False") polling_interval = kwargs.pop("polling_interval", None) if is_live(): form_recognizer_account = os.environ["FORMRECOGNIZER_TEST_ENDPOINT"] @@ -65,8 +65,9 @@ def get_sync_client(client_cls, **kwargs): **kwargs ) + def get_async_client(client_cls, **kwargs): - ENABLE_LOGGER = os.getenv('ENABLE_LOGGER', "False") + ENABLE_LOGGER = os.getenv("ENABLE_LOGGER", "False") polling_interval = kwargs.pop("polling_interval", None) if is_live(): form_recognizer_account = os.environ["FORMRECOGNIZER_TEST_ENDPOINT"] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_type.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_type.py index a45b44ecbead..a99aca659f4c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_type.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_type.py @@ -56,9 +56,9 @@ def test_tiff_little_endian_bytes(self): assert content_type == "image/tiff" def test_tiff_big_endian(self): - content_type = get_content_type(b"\x4D\x4D\x00\x2A") + content_type = get_content_type(b"\x4d\x4d\x00\x2a") assert content_type == "image/tiff" def test_bmp(self): - content_type = get_content_type(b"\x42\x4D\x00\x00") + content_type = get_content_type(b"\x42\x4d\x00\x00") assert content_type == "image/bmp" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model.py index e0cf7193008f..f9d8d65352c6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model.py @@ -16,6 +16,7 @@ get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) + class TestDACAnalyzeCustomModel(FormRecognizerTest): @FormRecognizerPreparer() @@ -40,7 +41,9 @@ def test_custom_document_transform(self, formrecognizer_storage_container_sas_ur set_bodiless_matcher() da_client = client.get_document_analysis_client() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() responses = [] @@ -54,11 +57,7 @@ def callback(raw_response, _, headers): with open(self.form_jpg, "rb") as fd: my_file = fd.read() - poller = da_client.begin_analyze_document( - model.model_id, - my_file, - cls=callback - ) + poller = da_client.begin_analyze_document(model.model_id, my_file, cls=callback) document = poller.result() raw_analyze_result = responses[0].analyze_result @@ -72,7 +71,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -86,7 +87,9 @@ def test_custom_document_multipage_transform(self, formrecognizer_multipage_stor set_bodiless_matcher() da_client = client.get_document_analysis_client() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_multipage_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_multipage_storage_container_sas_url + ) model = poller.result() responses = [] @@ -100,11 +103,7 @@ def callback(raw_response, _, headers): with open(self.multipage_invoice_pdf, "rb") as fd: my_file = fd.read() - poller = da_client.begin_analyze_document( - model.model_id, - my_file, - cls=callback - ) + poller = da_client.begin_analyze_document(model.model_id, my_file, cls=callback) document = poller.result() raw_analyze_result = responses[0].analyze_result @@ -118,7 +117,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -132,7 +133,9 @@ def test_custom_document_selection_mark(self, formrecognizer_selection_mark_stor set_bodiless_matcher() da_client = client.get_document_analysis_client() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url + ) model = poller.result() with open(self.selection_form_pdf, "rb") as fd: @@ -146,11 +149,7 @@ def callback(raw_response, _, headers): responses.append(analyze_result) responses.append(document) - poller = da_client.begin_analyze_document( - model.model_id, - my_file, - cls=callback - ) + poller = da_client.begin_analyze_document(model.model_id, my_file, cls=callback) document = poller.result() raw_analyze_result = responses[0].analyze_result @@ -164,7 +163,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -181,11 +182,13 @@ def test_pages_kwarg_specified(self, formrecognizer_storage_container_sas_url, * with open(self.form_jpg, "rb") as fd: my_file = fd.read() - build_poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + build_poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = build_poller.result() poller = da_client.begin_analyze_document(model.model_id, my_file, pages="1") - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result @@ -200,7 +203,9 @@ def test_custom_document_signature_field(self, formrecognizer_storage_container_ with open(self.form_jpg, "rb") as fd: my_file = fd.read() - build_polling = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + build_polling = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = build_polling.result() poller = da_client.begin_analyze_document( @@ -225,7 +230,9 @@ def test_custom_document_blank_pdf(self, formrecognizer_storage_container_sas_ur with open(self.blank_pdf, "rb") as fd: my_file = fd.read() - build_polling = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + build_polling = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = build_polling.result() poller = da_client.begin_analyze_document( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py index 4e65b3a13d50..15d3500cc55f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_async.py @@ -18,6 +18,7 @@ get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) + class TestDACAnalyzeCustomModelAsync(AsyncFormRecognizerTest): @FormRecognizerPreparer() @@ -56,15 +57,13 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - build_polling = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + build_polling = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await build_polling.result() async with da_client: - poller = await da_client.begin_analyze_document( - model.model_id, - my_file, - cls=callback - ) + poller = await da_client.begin_analyze_document(model.model_id, my_file, cls=callback) document = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -78,7 +77,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -87,7 +88,9 @@ def callback(raw_response, _, headers): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_document_multipage_transform(self, formrecognizer_multipage_storage_container_sas_url, **kwargs): + async def test_custom_document_multipage_transform( + self, formrecognizer_multipage_storage_container_sas_url, **kwargs + ): client = get_dma_client() set_bodiless_matcher() da_client = client.get_document_analysis_client() @@ -104,15 +107,13 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - build_poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_multipage_storage_container_sas_url) + build_poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_multipage_storage_container_sas_url + ) model = await build_poller.result() async with da_client: - poller = await da_client.begin_analyze_document( - model.model_id, - my_file, - cls=callback - ) + poller = await da_client.begin_analyze_document(model.model_id, my_file, cls=callback) document = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -126,7 +127,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -135,7 +138,9 @@ def callback(raw_response, _, headers): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_document_selection_mark(self, formrecognizer_selection_mark_storage_container_sas_url, **kwargs): + async def test_custom_document_selection_mark( + self, formrecognizer_selection_mark_storage_container_sas_url, **kwargs + ): client = get_dma_client() set_bodiless_matcher() da_client = client.get_document_analysis_client() @@ -151,14 +156,12 @@ def callback(raw_response, _, headers): responses.append(document) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url + ) model = await poller.result() - poller = await da_client.begin_analyze_document( - model.model_id, - my_file, - cls=callback - ) + poller = await da_client.begin_analyze_document(model.model_id, my_file, cls=callback) document = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -172,7 +175,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -190,12 +195,14 @@ async def test_pages_kwarg_specified(self, formrecognizer_storage_container_sas_ my_file = fd.read() async with client: - build_poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + build_poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await build_poller.result() async with da_client: poller = await da_client.begin_analyze_document(model.model_id, my_file, pages="1") - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result @@ -211,7 +218,10 @@ async def test_custom_document_signature_field(self, formrecognizer_storage_cont my_file = fd.read() async with client: - build_polling = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, ) + build_polling = await client.begin_build_document_model( + "template", + blob_container_url=formrecognizer_storage_container_sas_url, + ) model = await build_polling.result() async with da_client: @@ -238,7 +248,9 @@ async def test_custom_document_blank_pdf(self, formrecognizer_storage_container_ my_file = fd.read() async with client: - build_polling = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + build_polling = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await build_polling.result() async with da_client: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url.py index b52e1102f542..de7c3baa52b7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url.py @@ -16,6 +16,7 @@ get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) + class TestDACAnalyzeCustomModelFromUrl(FormRecognizerTest): @FormRecognizerPreparer() @@ -40,7 +41,9 @@ def test_custom_document_selection_mark(self, formrecognizer_selection_mark_stor set_bodiless_matcher() da_client = client.get_document_analysis_client() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url + ) model = poller.result() responses = [] @@ -52,9 +55,7 @@ def callback(raw_response, _, headers): responses.append(document) poller = da_client.begin_analyze_document_from_url( - model_id=model.model_id, - document_url=self.selection_mark_url_pdf, - cls=callback + model_id=model.model_id, document_url=self.selection_mark_url_pdf, cls=callback ) document = poller.result() @@ -69,7 +70,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -83,7 +86,9 @@ def test_label_tables_variable_rows(self, formrecognizer_table_variable_rows_con set_bodiless_matcher() da_client = client.get_document_analysis_client() - build_poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url) + build_poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url + ) model = build_poller.result() responses = [] @@ -95,9 +100,7 @@ def callback(raw_response, _, headers): responses.append(document) poller = da_client.begin_analyze_document_from_url( - model.model_id, - self.label_table_variable_row_url_pdf, - cls=callback + model.model_id, self.label_table_variable_row_url_pdf, cls=callback ) document = poller.result() raw_analyze_result = responses[0].analyze_result @@ -111,7 +114,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -125,7 +130,9 @@ def test_label_tables_fixed_rows(self, formrecognizer_table_fixed_rows_container set_bodiless_matcher() da_client = client.get_document_analysis_client() - build_poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_table_fixed_rows_container_sas_url) + build_poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_fixed_rows_container_sas_url + ) model = build_poller.result() responses = [] @@ -137,9 +144,7 @@ def callback(raw_response, _, headers): responses.append(document) poller = da_client.begin_analyze_document_from_url( - model.model_id, - self.label_table_fixed_row_url_pdf, - cls=callback + model.model_id, self.label_table_fixed_row_url_pdf, cls=callback ) document = poller.result() raw_analyze_result = responses[0].analyze_result @@ -153,7 +158,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url_async.py index bf164807821c..ce29dc187d11 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_custom_model_from_url_async.py @@ -18,6 +18,7 @@ get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) + class TestDACAnalyzeCustomModelFromUrlAsync(AsyncFormRecognizerTest): @FormRecognizerPreparer() @@ -39,7 +40,9 @@ async def test_document_analysis_empty_model_id(self, **kwargs): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_document_selection_mark(self, formrecognizer_selection_mark_storage_container_sas_url, **kwargs): + async def test_custom_document_selection_mark( + self, formrecognizer_selection_mark_storage_container_sas_url, **kwargs + ): client = get_dma_client() set_bodiless_matcher() da_client = client.get_document_analysis_client() @@ -53,12 +56,12 @@ def callback(raw_response, _, headers): responses.append(document) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url + ) model = await poller.result() poller = await da_client.begin_analyze_document_from_url( - model_id=model.model_id, - document_url=self.selection_mark_url_pdf, - cls=callback + model_id=model.model_id, document_url=self.selection_mark_url_pdf, cls=callback ) document = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -72,7 +75,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -96,13 +101,12 @@ def callback(raw_response, _, headers): async with client: build_poller = await client.begin_build_document_model( - "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url) + "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url + ) model = await build_poller.result() poller = await da_client.begin_analyze_document_from_url( - model.model_id, - self.label_table_variable_row_url_pdf, - cls=callback + model.model_id, self.label_table_variable_row_url_pdf, cls=callback ) document = await poller.result() @@ -117,7 +121,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -140,13 +146,13 @@ def callback(raw_response, _, headers): responses.append(document) async with client: - build_poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_table_fixed_rows_container_sas_url) + build_poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_fixed_rows_container_sas_url + ) model = await build_poller.result() poller = await da_client.begin_analyze_document_from_url( - model.model_id, - self.label_table_fixed_row_url_pdf, - cls=callback + model.model_id, self.label_table_fixed_row_url_pdf, cls=callback ) form = await poller.result() @@ -161,7 +167,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document.py index 62423f81bb47..09886920cd62 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document.py @@ -15,7 +15,6 @@ from testcase import FormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) @@ -46,11 +45,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -81,11 +82,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -116,11 +119,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document_async.py index 63ad9eb15a6c..5f8682cac14f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_general_document_async.py @@ -15,7 +15,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) @@ -47,11 +46,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -83,11 +84,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -119,11 +122,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout.py index 149cd7ce85fe..cbdfdace6a9f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout.py @@ -14,7 +14,6 @@ from testcase import FormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) @@ -29,11 +28,7 @@ def test_layout_incorrect_feature_format(self): document = fd.read() with pytest.raises(HttpResponseError): - poller = client.begin_analyze_document( - "prebuilt-layout", - document, - features=AnalysisFeature.STYLE_FONT - ) + poller = client.begin_analyze_document("prebuilt-layout", document, features=AnalysisFeature.STYLE_FONT) @skip_flaky_test @FormRecognizerPreparer() @@ -52,10 +47,8 @@ def callback(raw_response, _, headers): responses.append(extracted_layout) poller = client.begin_analyze_document( - "prebuilt-layout", - document, - features=[AnalysisFeature.STYLE_FONT], - cls=callback) + "prebuilt-layout", document, features=[AnalysisFeature.STYLE_FONT], cls=callback + ) result = poller.result() raw_analyze_result = responses[0].analyze_result returned_model = responses[1] @@ -64,11 +57,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -99,11 +94,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -134,11 +131,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -168,7 +167,9 @@ def test_layout_multipage_table_span_pdf(self): @recorded_by_proxy def test_layout_url_barcode(self): client = get_da_client() - poller = client.begin_analyze_document_from_url("prebuilt-layout", self.barcode_url_tif, features=[AnalysisFeature.BARCODES]) + poller = client.begin_analyze_document_from_url( + "prebuilt-layout", self.barcode_url_tif, features=[AnalysisFeature.BARCODES] + ) layout = poller.result() assert len(layout.pages) > 0 assert len(layout.pages[0].barcodes) == 2 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout_async.py index a36725666f6d..193d19a6c6d8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_layout_async.py @@ -15,7 +15,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) @@ -31,9 +30,7 @@ async def test_layout_incorrect_feature_format(self): async with client: with pytest.raises(HttpResponseError): poller = await client.begin_analyze_document( - "prebuilt-layout", - document, - features=AnalysisFeature.STYLE_FONT + "prebuilt-layout", document, features=AnalysisFeature.STYLE_FONT ) @skip_flaky_test @@ -54,10 +51,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_analyze_document( - "prebuilt-layout", - document, - features=[AnalysisFeature.STYLE_FONT], - cls=callback + "prebuilt-layout", document, features=[AnalysisFeature.STYLE_FONT], cls=callback ) result = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -67,11 +61,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -103,11 +99,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -139,11 +137,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -175,7 +175,9 @@ async def test_layout_multipage_table_span_pdf(self): async def test_layout_url_barcodes(self): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-layout", self.barcode_url_tif, features=[AnalysisFeature.BARCODES]) + poller = await client.begin_analyze_document_from_url( + "prebuilt-layout", self.barcode_url_tif, features=[AnalysisFeature.BARCODES] + ) layout = await poller.result() assert len(layout.pages) > 0 assert len(layout.pages[0].barcodes) == 2 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read.py index cf4d9f0814a8..6ba15f2770ec 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read.py @@ -14,7 +14,6 @@ from testcase import FormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) @@ -26,7 +25,9 @@ class TestDACAnalyzeRead(FormRecognizerTest): @recorded_by_proxy def test_document_read_url_features_formulas(self): client = get_da_client() - poller = client.begin_analyze_document_from_url("prebuilt-read", self.formula_url_jpg, features=[AnalysisFeature.FORMULAS]) + poller = client.begin_analyze_document_from_url( + "prebuilt-read", self.formula_url_jpg, features=[AnalysisFeature.FORMULAS] + ) result = poller.result() assert len(result.pages) > 0 assert len(result.pages[0].formulas) == 2 @@ -57,7 +58,9 @@ def callback(raw_response, _, headers): responses.append(analyze_result) responses.append(extracted_document) - poller = client.begin_analyze_document("prebuilt-read", document, features=[AnalysisFeature.LANGUAGES], cls=callback) + poller = client.begin_analyze_document( + "prebuilt-read", document, features=[AnalysisFeature.LANGUAGES], cls=callback + ) result = poller.result() raw_analyze_result = responses[0].analyze_result returned_model = responses[1] @@ -66,7 +69,7 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) @@ -78,7 +81,6 @@ def callback(raw_response, _, headers): self.assertDocumentParagraphsTransformCorrect(returned_model.paragraphs, raw_analyze_result.paragraphs) - @pytest.mark.live_test_only @skip_flaky_test @FormRecognizerPreparer() @@ -104,7 +106,7 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read_async.py index 50cee37e64a5..0b6593e3eef6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilt_read_async.py @@ -14,7 +14,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) @@ -27,7 +26,9 @@ class TestDACAnalyzeReadAsync(AsyncFormRecognizerTest): async def test_document_read_url_features_formulas(self): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-read", self.formula_url_jpg, features=[AnalysisFeature.FORMULAS]) + poller = await client.begin_analyze_document_from_url( + "prebuilt-read", self.formula_url_jpg, features=[AnalysisFeature.FORMULAS] + ) result = await poller.result() assert len(result.pages) > 0 assert len(result.pages[0].formulas) == 2 @@ -59,7 +60,9 @@ def callback(raw_response, _, headers): responses.append(extracted_document) async with client: - poller = await client.begin_analyze_document("prebuilt-read", document, features=[AnalysisFeature.LANGUAGES], cls=callback) + poller = await client.begin_analyze_document( + "prebuilt-read", document, features=[AnalysisFeature.LANGUAGES], cls=callback + ) result = await poller.result() raw_analyze_result = responses[0].analyze_result returned_model = responses[1] @@ -68,7 +71,7 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) @@ -80,7 +83,6 @@ def callback(raw_response, _, headers): self.assertDocumentParagraphsTransformCorrect(returned_model.paragraphs, raw_analyze_result.paragraphs) - @pytest.mark.live_test_only @skip_flaky_test @FormRecognizerPreparer() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts.py index c5c5d01588cc..42d4a9ac7e93 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts.py @@ -19,7 +19,6 @@ from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test - get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) @@ -38,8 +37,8 @@ def test_business_card_multipage_pdf(self): assert len(result.documents) == 2 business_card = result.documents[0] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'JOHN' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'SINGER' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "JOHN" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "SINGER" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Software Engineer" @@ -56,8 +55,8 @@ def test_business_card_multipage_pdf(self): business_card = result.documents[1] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -118,7 +117,9 @@ def test_w2_png_value_address(self): # assert w2_document.fields.get("Employee").value.get("Address").value.postal_code == "98631-5293" assert w2_document.fields.get("Employee").value.get("Address").value.city == "KATHRYNMOUTH" assert w2_document.fields.get("Employee").value.get("Address").value.state == "NE" - assert w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + assert ( + w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + ) assert w2_document.fields.get("Employee").value.get("Address").value.country_region == None assert w2_document.fields.get("Employee").value.get("Address").value.po_box == None @@ -135,7 +136,9 @@ def test_w2_png_value_address(self): # assert w2_document.fields.get("Employee").value.get("Address").value.postal_code == "98631-5293" assert w2_document.fields.get("Employee").value.get("Address").value.city == "KATHRYNMOUTH" assert w2_document.fields.get("Employee").value.get("Address").value.state == "NE" - assert w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + assert ( + w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + ) assert w2_document.fields.get("Employee").value.get("Address").value.country_region == None assert w2_document.fields.get("Employee").value.get("Address").value.po_box == None @@ -158,8 +161,8 @@ def test_identity_document_jpg_passport(self): assert passport["LastName"].value == "MARTIN" assert passport["FirstName"].value == "SARAH" assert passport["DocumentNumber"].value == "ZE000509" - assert passport["DateOfBirth"].value == date(1985,1,1) - assert passport["DateOfExpiration"].value == date(2023,1,14) + assert passport["DateOfBirth"].value == date(1985, 1, 1) + assert passport["DateOfExpiration"].value == date(2023, 1, 14) assert passport["Sex"].value == "F" assert passport["CountryRegion"].value == "CAN" @@ -180,8 +183,8 @@ def test_identity_document_jpg(self): assert id_document.fields.get("LastName").value == "TALBOT" assert id_document.fields.get("FirstName").value == "LIAM R." assert id_document.fields.get("DocumentNumber").value == "WDLABCD456DG" - assert id_document.fields.get("DateOfBirth").value == date(1958,1,6) - assert id_document.fields.get("DateOfExpiration").value == date(2020,8,12) + assert id_document.fields.get("DateOfBirth").value == date(1958, 1, 6) + assert id_document.fields.get("DateOfExpiration").value == date(2020, 8, 12) assert id_document.fields.get("Sex").value == "M" assert id_document.fields.get("Address").value.house_number == None assert id_document.fields.get("Address").value.po_box == None @@ -211,11 +214,7 @@ def callback(raw_response, _, headers): with open(self.invoice_tiff, "rb") as fd: my_file = fd.read() - poller = client.begin_analyze_document( - model_id="prebuilt-invoice", - document=my_file, - cls=callback - ) + poller = client.begin_analyze_document(model_id="prebuilt-invoice", document=my_file, cls=callback) result = poller.result() raw_analyze_result = responses[0].analyze_result @@ -225,11 +224,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -255,43 +256,43 @@ def test_invoice_jpg(self, **kwargs): assert result.pages # check dict values - assert invoice.fields.get("AmountDue").value.amount == 610.0 - assert invoice.fields.get("AmountDue").value.symbol == "$" + assert invoice.fields.get("AmountDue").value.amount == 610.0 + assert invoice.fields.get("AmountDue").value.symbol == "$" assert invoice.fields.get("BillingAddress").value, "123 Bill St, Redmond WA == 98052" - assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" + assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" assert invoice.fields.get("CustomerAddress").value, "123 Other St, Redmond WA == 98052" - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" - assert invoice.fields.get("CustomerId").value == "CID-12345" - assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" - assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) - assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) - assert invoice.fields.get("InvoiceId").value == "INV-100" - assert invoice.fields.get("InvoiceTotal").value.amount == 110.0 - assert invoice.fields.get("PreviousUnpaidBalance").value.amount == 500.0 - assert invoice.fields.get("PurchaseOrder").value == "PO-3333" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" + assert invoice.fields.get("CustomerId").value == "CID-12345" + assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" + assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) + assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) + assert invoice.fields.get("InvoiceId").value == "INV-100" + assert invoice.fields.get("InvoiceTotal").value.amount == 110.0 + assert invoice.fields.get("PreviousUnpaidBalance").value.amount == 500.0 + assert invoice.fields.get("PurchaseOrder").value == "PO-3333" assert invoice.fields.get("RemittanceAddress").value, "123 Remit St New York, NY == 10001" - assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" + assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" assert invoice.fields.get("ServiceAddress").value, "123 Service St, Redmond WA == 98052" - assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" - assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) - assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) + assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" + assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) + assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) assert invoice.fields.get("ShippingAddress").value, "123 Ship St, Redmond WA == 98052" - assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" - assert invoice.fields.get("SubTotal").value.amount == 100.0 - assert invoice.fields.get("SubTotal").value.symbol == "$" - assert invoice.fields.get("SubTotal").value.code == "USD" - assert invoice.fields.get("TotalTax").value.amount == 10.0 - assert invoice.fields.get("TotalTax").value.symbol == "$" - assert invoice.fields.get("TotalTax").value.code == "USD" - assert invoice.fields.get("VendorName").value == "CONTOSO LTD." + assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" + assert invoice.fields.get("SubTotal").value.amount == 100.0 + assert invoice.fields.get("SubTotal").value.symbol == "$" + assert invoice.fields.get("SubTotal").value.code == "USD" + assert invoice.fields.get("TotalTax").value.amount == 10.0 + assert invoice.fields.get("TotalTax").value.symbol == "$" + assert invoice.fields.get("TotalTax").value.code == "USD" + assert invoice.fields.get("VendorName").value == "CONTOSO LTD." assert invoice.fields.get("VendorAddress").value, "123 456th St New York, NY == 10001" - assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" - assert invoice.fields.get("Items").value[0].value["Amount"].value.amount == 100.0 - assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" - assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" - assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 - assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.amount == 1.0 - assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.symbol == None + assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" + assert invoice.fields.get("Items").value[0].value["Amount"].value.amount == 100.0 + assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" + assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" + assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 + assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.amount == 1.0 + assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.symbol == None @FormRecognizerPreparer() def test_fail_passing_content_type(self, **kwargs): @@ -299,11 +300,7 @@ def test_fail_passing_content_type(self, **kwargs): with open(self.receipt_png, "rb") as fd: my_file = fd.read() with pytest.raises(TypeError): - poller = client.begin_analyze_document( - "prebuilt-receipt", - my_file, - content_type=FormContentType.IMAGE_PNG - ) + poller = client.begin_analyze_document("prebuilt-receipt", my_file, content_type=FormContentType.IMAGE_PNG) @FormRecognizerPreparer() def test_receipt_bad_endpoint(self, **kwargs): @@ -327,10 +324,7 @@ def test_damaged_file_passed_as_bytes(self): client = get_da_client() damaged_pdf = b"\x25\x50\x44\x46\x55\x55\x55" # still has correct bytes to be recognized as PDF with pytest.raises(HttpResponseError): - poller = client.begin_analyze_document( - "prebuilt-receipt", - damaged_pdf - ) + poller = client.begin_analyze_document("prebuilt-receipt", damaged_pdf) @FormRecognizerPreparer() @recorded_by_proxy @@ -338,10 +332,7 @@ def test_damaged_file_passed_as_bytes_io(self): client = get_da_client() damaged_pdf = BytesIO(b"\x25\x50\x44\x46\x55\x55\x55") # still has correct bytes to be recognized as PDF with pytest.raises(HttpResponseError): - poller = client.begin_analyze_document( - "prebuilt-receipt", - damaged_pdf - ) + poller = client.begin_analyze_document("prebuilt-receipt", damaged_pdf) @skip_flaky_test @FormRecognizerPreparer() @@ -350,10 +341,7 @@ def test_blank_page(self): client = get_da_client() with open(self.blank_pdf, "rb") as fd: blank = fd.read() - poller = client.begin_analyze_document( - "prebuilt-receipt", - blank - ) + poller = client.begin_analyze_document("prebuilt-receipt", blank) result = poller.result() assert result is not None @@ -365,10 +353,7 @@ def test_auto_detect_unsupported_stream_content(self): my_file = fd.read() with pytest.raises(HttpResponseError): - poller = client.begin_analyze_document( - "prebuilt-receipt", - my_file - ) + poller = client.begin_analyze_document("prebuilt-receipt", my_file) @pytest.mark.live_test_only @skip_flaky_test @@ -387,11 +372,7 @@ def callback(raw_response, _, headers): with open(self.receipt_png, "rb") as fd: my_file = fd.read() - poller = client.begin_analyze_document( - "prebuilt-receipt", - document=my_file, - cls=callback - ) + poller = client.begin_analyze_document("prebuilt-receipt", document=my_file, cls=callback) result = poller.result() raw_analyze_result = responses[0].analyze_result @@ -401,11 +382,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -427,11 +410,7 @@ def callback(raw_response, _, headers): with open(self.receipt_jpg, "rb") as fd: my_file = fd.read() - poller = client.begin_analyze_document( - "prebuilt-receipt", - document=my_file, - cls=callback - ) + poller = client.begin_analyze_document("prebuilt-receipt", document=my_file, cls=callback) result = poller.result() raw_analyze_result = responses[0].analyze_result @@ -441,11 +420,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -463,14 +444,14 @@ def test_receipt_png(self): result = poller.result() assert len(result.documents) == 1 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) - assert receipt.doc_type == 'receipt.retailMeal' + assert receipt.doc_type == "receipt.retailMeal" assert len(result.pages) == 1 @@ -491,22 +472,22 @@ def test_receipt_multipage(self): assert len(result.documents) == 2 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("TotalTax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("TotalTax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" receipt = result.documents[1] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -529,11 +510,7 @@ def callback(raw_response, _, headers): with open(self.multipage_receipt_pdf, "rb") as fd: my_file = fd.read() - poller = client.begin_analyze_document( - "prebuilt-receipt", - document=my_file, - cls=callback - ) + poller = client.begin_analyze_document("prebuilt-receipt", document=my_file, cls=callback) result = poller.result() raw_analyze_result = responses[0].analyze_result @@ -548,7 +525,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -577,7 +556,7 @@ def test_receipt_locale_specified(self): with open(self.receipt_jpg, "rb") as fd: receipt = fd.read() poller = client.begin_analyze_document("prebuilt-receipt", receipt, locale="en-IN") - assert 'en-IN' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-IN" == poller._polling_method._initial_response.http_response.request.query["locale"] result = poller.result() assert result @@ -600,6 +579,6 @@ def test_pages_kwarg_specified(self): receipt = fd.read() poller = client.begin_analyze_document("prebuilt-receipt", receipt, pages="1") - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_async.py index 03ce7f8acfae..3f81e190e2b9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_async.py @@ -19,7 +19,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) @@ -71,7 +70,9 @@ async def test_passing_unsupported_url_content_type(self, **kwargs): client = get_da_client() with pytest.raises(TypeError): async with client: - poller = await client.begin_analyze_document("prebuilt-receipt", "https://badurl.jpg", content_type="application/json") + poller = await client.begin_analyze_document( + "prebuilt-receipt", "https://badurl.jpg", content_type="application/json" + ) result = await poller.result() @FormRecognizerPreparer() @@ -107,11 +108,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_analyze_document( - "prebuilt-receipt", - document=my_file, - cls=callback - ) + poller = await client.begin_analyze_document("prebuilt-receipt", document=my_file, cls=callback) result = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -121,11 +118,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -148,11 +147,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_analyze_document( - "prebuilt-receipt", - document=my_file, - cls=callback - ) + poller = await client.begin_analyze_document("prebuilt-receipt", document=my_file, cls=callback) result = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -162,11 +157,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -186,11 +183,11 @@ async def test_receipt_png(self): result = await poller.result() assert len(result.documents) == 1 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -215,22 +212,22 @@ async def test_receipt_multipage(self): assert len(result.documents) == 2 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("TotalTax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 - assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) - assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("TotalTax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) + assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" receipt = result.documents[1] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -253,11 +250,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_analyze_document( - "prebuilt-receipt", - document=my_file, - cls=callback - ) + poller = await client.begin_analyze_document("prebuilt-receipt", document=my_file, cls=callback) result = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -272,7 +265,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -303,7 +298,7 @@ async def test_receipt_locale_specified(self): receipt = fd.read() async with client: poller = await client.begin_analyze_document("prebuilt-receipt", receipt, locale="en-IN") - assert 'en-IN' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-IN" == poller._polling_method._initial_response.http_response.request.query["locale"] result = await poller.result() assert result @@ -327,7 +322,7 @@ async def test_pages_kwarg_specified(self): receipt = fd.read() async with client: poller = await client.begin_analyze_document("prebuilt-receipt", receipt, pages="1") - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result @@ -345,8 +340,8 @@ async def test_business_card_multipage_pdf(self): assert len(result.documents) == 2 business_card = result.documents[0] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'JOHN' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'SINGER' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "JOHN" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "SINGER" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Software Engineer" @@ -363,8 +358,8 @@ async def test_business_card_multipage_pdf(self): business_card = result.documents[1] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -414,15 +409,15 @@ async def test_identity_document_jpg_passport(self): result = await poller.result() assert len(result.documents) == 1 - + id_document = result.documents[0] passport = id_document.fields.get("MachineReadableZone").value assert passport["LastName"].value == "MARTIN" assert passport["FirstName"].value == "SARAH" assert passport["DocumentNumber"].value == "ZE000509" - assert passport["DateOfBirth"].value == date(1985,1,1) - assert passport["DateOfExpiration"].value == date(2023,1,14) + assert passport["DateOfBirth"].value == date(1985, 1, 1) + assert passport["DateOfExpiration"].value == date(2023, 1, 14) assert passport["Sex"].value == "F" assert passport["CountryRegion"].value == "CAN" @@ -444,8 +439,8 @@ async def test_identity_document_jpg(self): assert id_document.fields.get("LastName").value == "TALBOT" assert id_document.fields.get("FirstName").value == "LIAM R." assert id_document.fields.get("DocumentNumber").value == "WDLABCD456DG" - assert id_document.fields.get("DateOfBirth").value == date(1958,1,6) - assert id_document.fields.get("DateOfExpiration").value == date(2020,8,12) + assert id_document.fields.get("DateOfBirth").value == date(1958, 1, 6) + assert id_document.fields.get("DateOfExpiration").value == date(2020, 8, 12) assert id_document.fields.get("Sex").value == "M" assert id_document.fields.get("Address").value.house_number == None assert id_document.fields.get("Address").value.po_box == None @@ -476,11 +471,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_analyze_document( - model_id="prebuilt-invoice", - document=my_file, - cls=callback - ) + poller = await client.begin_analyze_document(model_id="prebuilt-invoice", document=my_file, cls=callback) result = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -490,11 +481,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -525,7 +518,9 @@ async def test_w2_png_value_address(self): # assert w2_document.fields.get("Employee").value.get("Address").value.postal_code == "98631-5293" assert w2_document.fields.get("Employee").value.get("Address").value.city == "KATHRYNMOUTH" assert w2_document.fields.get("Employee").value.get("Address").value.state == "NE" - assert w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + assert ( + w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + ) assert w2_document.fields.get("Employee").value.get("Address").value.country_region == None assert w2_document.fields.get("Employee").value.get("Address").value.po_box == None @@ -542,7 +537,9 @@ async def test_w2_png_value_address(self): # assert w2_document.fields.get("Employee").value.get("Address").value.postal_code == "98631-5293" assert w2_document.fields.get("Employee").value.get("Address").value.city == "KATHRYNMOUTH" assert w2_document.fields.get("Employee").value.get("Address").value.state == "NE" - assert w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + assert ( + w2_document.fields.get("Employee").value.get("Address").value.street_address == "96541 MOLLY HOLLOW STREET" + ) assert w2_document.fields.get("Employee").value.get("Address").value.country_region == None assert w2_document.fields.get("Employee").value.get("Address").value.po_box == None @@ -566,43 +563,43 @@ async def test_invoice_jpg(self, **kwargs): invoice = result.documents[0] assert result.pages - - assert invoice.fields.get("AmountDue").value.amount == 610.0 - assert invoice.fields.get("AmountDue").value.symbol == "$" + + assert invoice.fields.get("AmountDue").value.amount == 610.0 + assert invoice.fields.get("AmountDue").value.symbol == "$" assert invoice.fields.get("BillingAddress").value, "123 Bill St, Redmond WA == 98052" - assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" + assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" assert invoice.fields.get("CustomerAddress").value, "123 Other St, Redmond WA == 98052" - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" - assert invoice.fields.get("CustomerId").value == "CID-12345" - assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" - assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) - assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) - assert invoice.fields.get("InvoiceId").value == "INV-100" - assert invoice.fields.get("InvoiceTotal").value.amount == 110.0 - assert invoice.fields.get("InvoiceTotal").value.symbol == "$" - assert invoice.fields.get("PreviousUnpaidBalance").value.amount == 500.0 - assert invoice.fields.get("PreviousUnpaidBalance").value.symbol == "$" - assert invoice.fields.get("PurchaseOrder").value == "PO-3333" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" + assert invoice.fields.get("CustomerId").value == "CID-12345" + assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" + assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) + assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) + assert invoice.fields.get("InvoiceId").value == "INV-100" + assert invoice.fields.get("InvoiceTotal").value.amount == 110.0 + assert invoice.fields.get("InvoiceTotal").value.symbol == "$" + assert invoice.fields.get("PreviousUnpaidBalance").value.amount == 500.0 + assert invoice.fields.get("PreviousUnpaidBalance").value.symbol == "$" + assert invoice.fields.get("PurchaseOrder").value == "PO-3333" assert invoice.fields.get("RemittanceAddress").value, "123 Remit St New York, NY == 10001" - assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" + assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" assert invoice.fields.get("ServiceAddress").value, "123 Service St, Redmond WA == 98052" - assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" - assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) - assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) + assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" + assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) + assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) assert invoice.fields.get("ShippingAddress").value, "123 Ship St, Redmond WA == 98052" - assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" - assert invoice.fields.get("SubTotal").value.amount == 100.0 - assert invoice.fields.get("SubTotal").value.symbol == "$" - assert invoice.fields.get("SubTotal").value.code == "USD" - assert invoice.fields.get("TotalTax").value.amount == 10.0 - assert invoice.fields.get("TotalTax").value.symbol == "$" - assert invoice.fields.get("TotalTax").value.code == "USD" - assert invoice.fields.get("VendorName").value == "CONTOSO LTD." + assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" + assert invoice.fields.get("SubTotal").value.amount == 100.0 + assert invoice.fields.get("SubTotal").value.symbol == "$" + assert invoice.fields.get("SubTotal").value.code == "USD" + assert invoice.fields.get("TotalTax").value.amount == 10.0 + assert invoice.fields.get("TotalTax").value.symbol == "$" + assert invoice.fields.get("TotalTax").value.code == "USD" + assert invoice.fields.get("VendorName").value == "CONTOSO LTD." assert invoice.fields.get("VendorAddress").value, "123 456th St New York, NY == 10001" - assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" - assert invoice.fields.get("Items").value[0].value["Amount"].value.amount == 100.0 - assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" - assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" - assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 - assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.amount == 1.0 - assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.symbol == None + assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" + assert invoice.fields.get("Items").value[0].value["Amount"].value.amount == 100.0 + assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" + assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" + assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 + assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.amount == 1.0 + assert invoice.fields.get("Items").value[0].value["UnitPrice"].value.symbol == None diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url.py index 8cb1ed520b12..c936a2623029 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url.py @@ -16,7 +16,6 @@ from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test - get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) @@ -33,8 +32,8 @@ def test_business_card_multipage_pdf(self): assert len(result.documents) == 2 business_card = result.documents[0] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'JOHN' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'SINGER' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "JOHN" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "SINGER" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Software Engineer" @@ -51,8 +50,8 @@ def test_business_card_multipage_pdf(self): business_card = result.documents[1] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -98,7 +97,7 @@ def test_identity_document_jpg_passport(self): result = poller.result() assert len(result.documents) == 1 - + id_document = result.documents[0] # check dict values @@ -106,8 +105,8 @@ def test_identity_document_jpg_passport(self): assert passport["LastName"].value == "MARTIN" assert passport["FirstName"].value == "SARAH" assert passport["DocumentNumber"].value == "ZE000509" - assert passport["DateOfBirth"].value == date(1985,1,1) - assert passport["DateOfExpiration"].value == date(2023,1,14) + assert passport["DateOfBirth"].value == date(1985, 1, 1) + assert passport["DateOfExpiration"].value == date(2023, 1, 14) assert passport["Sex"].value == "F" assert passport["CountryRegion"].value == "CAN" @@ -126,8 +125,8 @@ def test_identity_document_jpg(self): assert id_document.fields.get("LastName").value == "TALBOT" assert id_document.fields.get("FirstName").value == "LIAM R." assert id_document.fields.get("DocumentNumber").value == "WDLABCD456DG" - assert id_document.fields.get("DateOfBirth").value == date(1958,1,6) - assert id_document.fields.get("DateOfExpiration").value == date(2020,8,12) + assert id_document.fields.get("DateOfBirth").value == date(1958, 1, 6) + assert id_document.fields.get("DateOfExpiration").value == date(2020, 8, 12) assert id_document.fields.get("Sex").value == "M" assert id_document.fields.get("Address").value.house_number == None assert id_document.fields.get("Address").value.po_box == None @@ -152,31 +151,31 @@ def test_invoice_tiff(self, **kwargs): invoice = result.documents[0] # check dict values - assert invoice.fields.get("VendorName").value == "Contoso" - assert invoice.fields.get("VendorAddress").value, '1 Redmond way Suite 6000 Redmond == WA 99243' - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" - assert invoice.fields.get("CustomerAddress").value, '1020 Enterprise Way Sunnayvale == CA 87659' - assert invoice.fields.get("CustomerName").value == "Microsoft" - assert invoice.fields.get("InvoiceId").value == '34278587' - assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) + assert invoice.fields.get("VendorName").value == "Contoso" + assert invoice.fields.get("VendorAddress").value, "1 Redmond way Suite 6000 Redmond == WA 99243" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" + assert invoice.fields.get("CustomerAddress").value, "1020 Enterprise Way Sunnayvale == CA 87659" + assert invoice.fields.get("CustomerName").value == "Microsoft" + assert invoice.fields.get("InvoiceId").value == "34278587" + assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) # FIXME: regression in recognition algorithm # assert invoice.fields.get("Items").value[0].value["Amount"].value.amount == 56651.49 - assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" - assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) + assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" + assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy def test_polling_interval(self, **kwargs): client = get_da_client(polling_interval=7) - assert client._client._config.polling_interval == 7 + assert client._client._config.polling_interval == 7 poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, polling_interval=6) poller.wait() - assert poller._polling_method._timeout == 6 + assert poller._polling_method._timeout == 6 poller2 = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) poller2.wait() - assert poller2._polling_method._timeout == 7 # goes back to client default + assert poller2._polling_method._timeout == 7 # goes back to client default @pytest.mark.live_test_only @skip_flaky_test @@ -193,7 +192,7 @@ def test_receipts_encoded_url(self): try: poller = client.begin_analyze_document_from_url("prebuilt-receipt", "https://fakeuri.com/blank%20space") except HttpResponseError as e: - assert "https://fakeuri.com/blank%20space" in e.response.request.body + assert "https://fakeuri.com/blank%20space" in e.response.request.body @FormRecognizerPreparer() def test_receipt_url_bad_endpoint(self, **kwargs): @@ -222,7 +221,10 @@ def test_receipt_url_pass_stream(self, **kwargs): with open(self.receipt_png, "rb") as receipt: with pytest.raises(ValueError) as e: poller = client.begin_analyze_document_from_url("prebuilt-receipt", receipt) - assert str(e.value) == "'document_url' needs to be of type 'str'. Please see `begin_analyze_document()` to pass a byte stream." + assert ( + str(e.value) + == "'document_url' needs to be of type 'str'. Please see `begin_analyze_document()` to pass a byte stream." + ) @skip_flaky_test @FormRecognizerPreparer() @@ -238,9 +240,7 @@ def callback(raw_response, _, headers): responses.append(extracted_receipt) poller = client.begin_analyze_document_from_url( - "prebuilt-receipt", - document_url=self.receipt_url_jpg, - cls=callback + "prebuilt-receipt", document_url=self.receipt_url_jpg, cls=callback ) result = poller.result() @@ -255,7 +255,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -271,11 +273,11 @@ def test_receipt_url_png(self): result = poller.result() assert len(result.documents) == 1 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -292,23 +294,23 @@ def test_receipt_multipage_url(self): assert len(result.documents) == 2 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("TotalTax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("TotalTax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" receipt = result.documents[1] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -329,9 +331,7 @@ def callback(raw_response, _, headers): responses.append(extracted_receipt) poller = client.begin_analyze_document_from_url( - "prebuilt-receipt", - self.multipage_receipt_url_pdf, - cls=callback + "prebuilt-receipt", self.multipage_receipt_url_pdf, cls=callback ) result = poller.result() @@ -342,11 +342,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -370,7 +372,7 @@ def test_receipt_continuation_token(self, **kwargs): def test_receipt_locale_specified(self): client = get_da_client() poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, locale="en-IN") - assert 'en-IN' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-IN" == poller._polling_method._initial_response.http_response.request.query["locale"] result = poller.result() assert result @@ -389,6 +391,6 @@ def test_receipt_locale_error(self): def test_pages_kwarg_specified(self): client = get_da_client() poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, pages="1") - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url_async.py index 088801c002ea..018ee782f56f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_analyze_prebuilts_from_url_async.py @@ -17,7 +17,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_async_client, DocumentAnalysisClient) @@ -29,14 +28,16 @@ class TestDACAnalyzePrebuiltsFromUrlAsync(AsyncFormRecognizerTest): async def test_business_card_multipage_pdf(self): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-businessCard", self.business_card_multipage_url_pdf) + poller = await client.begin_analyze_document_from_url( + "prebuilt-businessCard", self.business_card_multipage_url_pdf + ) result = await poller.result() assert len(result.documents) == 2 business_card = result.documents[0] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'JOHN' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'SINGER' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "JOHN" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "SINGER" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Software Engineer" @@ -53,8 +54,8 @@ async def test_business_card_multipage_pdf(self): business_card = result.documents[1] assert len(business_card.fields.get("ContactNames").value) == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -97,11 +98,13 @@ async def test_business_card_multipage_pdf(self): async def test_identity_document_jpg_passport(self): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-idDocument", self.identity_document_url_jpg_passport) + poller = await client.begin_analyze_document_from_url( + "prebuilt-idDocument", self.identity_document_url_jpg_passport + ) result = await poller.result() assert len(result.documents) == 1 - + id_document = result.documents[0] # check dict values @@ -109,8 +112,8 @@ async def test_identity_document_jpg_passport(self): assert passport["LastName"].value == "MARTIN" assert passport["FirstName"].value == "SARAH" assert passport["DocumentNumber"].value == "ZE000509" - assert passport["DateOfBirth"].value == date(1985,1,1) - assert passport["DateOfExpiration"].value == date(2023,1,14) + assert passport["DateOfBirth"].value == date(1985, 1, 1) + assert passport["DateOfExpiration"].value == date(2023, 1, 14) assert passport["Sex"].value == "F" assert passport["CountryRegion"].value == "CAN" @@ -130,8 +133,8 @@ async def test_identity_document_jpg(self): assert id_document.fields.get("LastName").value == "TALBOT" assert id_document.fields.get("FirstName").value == "LIAM R." assert id_document.fields.get("DocumentNumber").value == "WDLABCD456DG" - assert id_document.fields.get("DateOfBirth").value == date(1958,1,6) - assert id_document.fields.get("DateOfExpiration").value == date(2020,8,12) + assert id_document.fields.get("DateOfBirth").value == date(1958, 1, 6) + assert id_document.fields.get("DateOfExpiration").value == date(2020, 8, 12) assert id_document.fields.get("Sex").value == "M" assert id_document.fields.get("Address").value.house_number == None assert id_document.fields.get("Address").value.po_box == None @@ -150,39 +153,43 @@ async def test_identity_document_jpg(self): async def test_invoice_tiff(self, **kwargs): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url(model_id="prebuilt-invoice", document_url=self.invoice_url_tiff) + poller = await client.begin_analyze_document_from_url( + model_id="prebuilt-invoice", document_url=self.invoice_url_tiff + ) result = await poller.result() assert len(result.documents) == 1 invoice = result.documents[0] # check dict values - assert invoice.fields.get("VendorName").value == "Contoso" - assert invoice.fields.get("VendorAddress").value, '1 Redmond way Suite 6000 Redmond == WA 99243' - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" - assert invoice.fields.get("CustomerAddress").value, '1020 Enterprise Way Sunnayvale == CA 87659' - assert invoice.fields.get("CustomerName").value == "Microsoft" - assert invoice.fields.get("InvoiceId").value == '34278587' - assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) + assert invoice.fields.get("VendorName").value == "Contoso" + assert invoice.fields.get("VendorAddress").value, "1 Redmond way Suite 6000 Redmond == WA 99243" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" + assert invoice.fields.get("CustomerAddress").value, "1020 Enterprise Way Sunnayvale == CA 87659" + assert invoice.fields.get("CustomerName").value == "Microsoft" + assert invoice.fields.get("InvoiceId").value == "34278587" + assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) # FIXME: regression in recognition algorithm # assert invoice.fields.get("Items").value[0].value["Amount"].value.amount == 56651.49 - assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" - assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) + assert invoice.fields.get("Items").value[0].value["Amount"].value.symbol == "$" + assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async async def test_polling_interval(self, **kwargs): client = get_da_client(polling_interval=7) - assert client._client._config.polling_interval == 7 + assert client._client._config.polling_interval == 7 async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, polling_interval=6) + poller = await client.begin_analyze_document_from_url( + "prebuilt-receipt", self.receipt_url_jpg, polling_interval=6 + ) await poller.wait() - assert poller._polling_method._timeout == 6 + assert poller._polling_method._timeout == 6 poller2 = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) await poller2.wait() - assert poller2._polling_method._timeout == 7 # goes back to client default + assert poller2._polling_method._timeout == 7 # goes back to client default @pytest.mark.live_test_only @skip_flaky_test @@ -190,10 +197,7 @@ async def test_polling_interval(self, **kwargs): async def test_active_directory_auth_async(self): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url( - "prebuilt-receipt", - self.receipt_url_jpg - ) + poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) result = await poller.result() assert result is not None @@ -203,8 +207,10 @@ async def test_receipts_encoded_url(self): client = get_da_client() with pytest.raises(HttpResponseError) as e: async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-receipt", "https://fakeuri.com/blank%20space") - assert "https://fakeuri.com/blank%20space" in e.value.response.request.body + poller = await client.begin_analyze_document_from_url( + "prebuilt-receipt", "https://fakeuri.com/blank%20space" + ) + assert "https://fakeuri.com/blank%20space" in e.value.response.request.body @FormRecognizerPreparer() async def test_receipt_url_bad_endpoint(self, **kwargs): @@ -212,10 +218,7 @@ async def test_receipt_url_bad_endpoint(self, **kwargs): with pytest.raises(ServiceRequestError): client = DocumentAnalysisClient("http://notreal.azure.com", AzureKeyCredential(formrecognizer_test_api_key)) async with client: - poller = await client.begin_analyze_document_from_url( - "prebuilt-receipt", - self.receipt_url_jpg - ) + poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) result = await poller.result() @FormRecognizerPreparer() @@ -224,10 +227,7 @@ async def test_receipt_url_auth_bad_key(self, **kwargs): client = get_da_client(api_key="xxxx") with pytest.raises(ClientAuthenticationError): async with client: - poller = await client.begin_analyze_document_from_url( - "prebuilt-receipt", - self.receipt_url_jpg - ) + poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) result = await poller.result() @FormRecognizerPreparer() @@ -241,20 +241,23 @@ async def test_receipt_bad_url(self): @FormRecognizerPreparer() async def test_receipt_url_pass_stream(self, **kwargs): - client = get_da_client() + client = get_da_client() with open(self.receipt_png, "rb") as fd: receipt = fd.read(4) # makes the recording smaller with pytest.raises(ValueError) as e: async with client: poller = await client.begin_analyze_document_from_url("prebuilt-receipt", receipt) - assert str(e.value) == "'document_url' needs to be of type 'str'. Please see `begin_analyze_document()` to pass a byte stream." + assert ( + str(e.value) + == "'document_url' needs to be of type 'str'. Please see `begin_analyze_document()` to pass a byte stream." + ) @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async async def test_receipt_url_transform_jpg(self): - client = get_da_client() + client = get_da_client() responses = [] def callback(raw_response, _, headers): @@ -265,9 +268,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_analyze_document_from_url( - "prebuilt-receipt", - self.receipt_url_jpg, - cls=callback + "prebuilt-receipt", self.receipt_url_jpg, cls=callback ) result = await poller.result() @@ -282,7 +283,9 @@ def callback(raw_response, _, headers): self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -292,18 +295,18 @@ def callback(raw_response, _, headers): @FormRecognizerPreparer() @recorded_by_proxy_async async def test_receipt_url_png(self): - client = get_da_client() + client = get_da_client() async with client: poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_png) result = await poller.result() assert len(result.documents) == 1 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -314,29 +317,29 @@ async def test_receipt_url_png(self): @FormRecognizerPreparer() @recorded_by_proxy_async async def test_receipt_multipage_url(self): - client = get_da_client() + client = get_da_client() async with client: poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.multipage_receipt_url_pdf) result = await poller.result() assert len(result.documents) == 2 receipt = result.documents[0] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("TotalTax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("TotalTax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" receipt = result.documents[1] - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("Subtotal").value == 1098.99 - assert receipt.fields.get("TotalTax").value == 104.4 - assert receipt.fields.get("Total").value == 1203.39 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("Subtotal").value == 1098.99 + assert receipt.fields.get("TotalTax").value == 104.4 + assert receipt.fields.get("Total").value == 1203.39 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) assert receipt.doc_type == "receipt.retailMeal" @@ -347,7 +350,7 @@ async def test_receipt_multipage_url(self): @FormRecognizerPreparer() @recorded_by_proxy_async async def test_receipt_multipage_transform_url(self): - client = get_da_client() + client = get_da_client() responses = [] def callback(raw_response, _, headers): @@ -358,9 +361,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_analyze_document_from_url( - "prebuilt-receipt", - self.multipage_receipt_url_pdf, - cls=callback + "prebuilt-receipt", self.multipage_receipt_url_pdf, cls=callback ) result = await poller.result() @@ -371,11 +372,13 @@ def callback(raw_response, _, headers): assert returned_model.model_id == raw_analyze_result.model_id assert returned_model.api_version == raw_analyze_result.api_version assert returned_model.content == raw_analyze_result.content - + self.assertDocumentPagesTransformCorrect(returned_model.pages, raw_analyze_result.pages) self.assertDocumentTransformCorrect(returned_model.documents, raw_analyze_result.documents) self.assertDocumentTablesTransformCorrect(returned_model.tables, raw_analyze_result.tables) - self.assertDocumentKeyValuePairsTransformCorrect(returned_model.key_value_pairs, raw_analyze_result.key_value_pairs) + self.assertDocumentKeyValuePairsTransformCorrect( + returned_model.key_value_pairs, raw_analyze_result.key_value_pairs + ) self.assertDocumentStylesTransformCorrect(returned_model.styles, raw_analyze_result.styles) # check page range @@ -389,7 +392,9 @@ async def test_receipt_continuation_token(self, **kwargs): async with client: initial_poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) cont_token = initial_poller.continuation_token() - poller = await client.begin_analyze_document_from_url("prebuilt-receipt", None, continuation_token=cont_token) + poller = await client.begin_analyze_document_from_url( + "prebuilt-receipt", None, continuation_token=cont_token + ) result = await poller.result() assert result is not None await initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error @@ -400,8 +405,10 @@ async def test_receipt_continuation_token(self, **kwargs): async def test_receipt_locale_specified(self): client = get_da_client() async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, locale="en-IN") - assert 'en-IN' == poller._polling_method._initial_response.http_response.request.query['locale'] + poller = await client.begin_analyze_document_from_url( + "prebuilt-receipt", self.receipt_url_jpg, locale="en-IN" + ) + assert "en-IN" == poller._polling_method._initial_response.http_response.request.query["locale"] result = await poller.result() assert result @@ -412,7 +419,9 @@ async def test_receipt_locale_error(self): client = get_da_client() with pytest.raises(HttpResponseError) as e: async with client: - await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, locale="not a locale") + await client.begin_analyze_document_from_url( + "prebuilt-receipt", self.receipt_url_jpg, locale="not a locale" + ) assert "InvalidArgument" == e.value.error.code @skip_flaky_test @@ -422,6 +431,6 @@ async def test_pages_kwarg_specified(self): client = get_da_client() async with client: poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, pages="1") - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document.py index cb6744ceb924..96e9b26a3c22 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document.py @@ -14,7 +14,6 @@ from testcase import FormRecognizerTest from conftest import skip_flaky_test - get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) @@ -31,23 +30,14 @@ def test_classify_document(self, formrecognizer_training_data_classifier, **kwar poller = client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train") ), "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train") ), "IRS-1040-C": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" - ) - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train") + ), }, ) classifier = poller.result() @@ -63,11 +53,7 @@ def callback(raw_response, _, headers): with open(self.irs_classifier_document, "rb") as fd: my_file = fd.read() - poller = da_client.begin_classify_document( - classifier.classifier_id, - my_file, - cls=callback - ) + poller = da_client.begin_classify_document(classifier.classifier_id, my_file, cls=callback) document = poller.result() raw_analyze_result = responses[0].analyze_result @@ -97,23 +83,14 @@ def test_classify_document_from_url(self, formrecognizer_training_data_classifie poller = client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train") ), "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train") ), "IRS-1040-C": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" - ) - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train") + ), }, ) classifier = poller.result() @@ -127,9 +104,7 @@ def callback(raw_response, _, headers): responses.append(document) poller = da_client.begin_classify_document_from_url( - classifier_id=classifier.classifier_id, - document_url=self.irs_classifier_document_url, - cls=callback + classifier_id=classifier.classifier_id, document_url=self.irs_classifier_document_url, cls=callback ) document = poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document_async.py index 0e25de9501d5..dbb393d65592 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dac_classify_document_async.py @@ -15,7 +15,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) @@ -40,22 +39,19 @@ def callback(raw_response, _, headers): doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" ) ), "IRS-1040-C": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train" ) - ) + ), }, ) classifier = await poller.result() @@ -66,11 +62,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with da_client: - poller = await da_client.begin_classify_document( - classifier.classifier_id, - my_file, - cls=callback - ) + poller = await da_client.begin_classify_document(classifier.classifier_id, my_file, cls=callback) document = await poller.result() raw_analyze_result = responses[0].analyze_result @@ -108,22 +100,19 @@ def callback(raw_response, _, headers): doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" ) ), "IRS-1040-C": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train" ) - ) + ), }, ) classifier = await poller.result() @@ -132,9 +121,7 @@ def callback(raw_response, _, headers): async with da_client: poller = await da_client.begin_classify_document_from_url( - classifier_id=classifier.classifier_id, - document_url=self.irs_classifier_document_url, - cls=callback + classifier_id=classifier.classifier_id, document_url=self.irs_classifier_document_url, cls=callback ) document = await poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers.py index 24c7ff2ab811..cebc97bc030d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers.py @@ -13,7 +13,12 @@ from testcase import FormRecognizerTest from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test -from azure.ai.formrecognizer import ClassifierDocumentTypeDetails, BlobSource, BlobFileListSource, DocumentClassifierDetails +from azure.ai.formrecognizer import ( + ClassifierDocumentTypeDetails, + BlobSource, + BlobFileListSource, + DocumentClassifierDetails, +) get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) @@ -28,37 +33,22 @@ def test_build_classifier(self, formrecognizer_training_data_classifier, **kwarg poller = client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train") ), "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train") ), "IRS-1040-C": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train") ), "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-D/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-D/train") ), "IRS-1040-E": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-E/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-E/train") ), }, - description="IRS document classifier" + description="IRS document classifier", ) result = poller.result() assert result.api_version @@ -81,36 +71,31 @@ def test_build_classifier_file_list(self, formrecognizer_training_data_classifie doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-A.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-A.jsonl" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-B.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-B.jsonl" ) ), "IRS-1040-C": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-C.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-C.jsonl" ) ), "IRS-1040-D": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-D.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-D.jsonl" ) ), "IRS-1040-E": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-E.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-E.jsonl" ) ), }, - classifier_id=classifier_id + classifier_id=classifier_id, ) result = poller.result() if self.is_live: @@ -134,17 +119,11 @@ def test_poller_metadata(self, formrecognizer_training_data_classifier, **kwargs poller = client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train") ), "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train") + ), }, ) result = poller.result() @@ -167,19 +146,13 @@ def test_mgmt_classifiers(self, formrecognizer_training_data_classifier, **kwarg poller = client.begin_build_document_classifier( doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train") ), "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) - ) + source=BlobSource(container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train") + ), }, - description="IRS document classifier" + description="IRS document classifier", ) result = poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers_async.py index 27beb6b22115..64a41c960b72 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_classifiers_async.py @@ -14,7 +14,12 @@ from preparers import FormRecognizerPreparer, get_async_client from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test -from azure.ai.formrecognizer import ClassifierDocumentTypeDetails, BlobSource, BlobFileListSource, DocumentClassifierDetails +from azure.ai.formrecognizer import ( + ClassifierDocumentTypeDetails, + BlobSource, + BlobFileListSource, + DocumentClassifierDetails, +) get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) @@ -31,36 +36,31 @@ async def test_build_classifier(self, formrecognizer_training_data_classifier, * doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" ) ), "IRS-1040-C": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train" ) ), "IRS-1040-D": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-D/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-D/train" ) ), "IRS-1040-E": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-E/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-E/train" ) ), }, - description="IRS document classifier" + description="IRS document classifier", ) result = await poller.result() assert result.api_version @@ -84,36 +84,31 @@ async def test_build_classifier_file_list(self, formrecognizer_training_data_cla doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-A.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-A.jsonl" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-B.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-B.jsonl" ) ), "IRS-1040-C": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-C.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-C.jsonl" ) ), "IRS-1040-D": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-D.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-D.jsonl" ) ), "IRS-1040-E": ClassifierDocumentTypeDetails( source=BlobFileListSource( - container_url=formrecognizer_training_data_classifier, - file_list="IRS-1040-E.jsonl" + container_url=formrecognizer_training_data_classifier, file_list="IRS-1040-E.jsonl" ) ), }, - classifier_id=classifier_id + classifier_id=classifier_id, ) result = await poller.result() if self.is_live: @@ -139,16 +134,14 @@ async def test_poller_metadata(self, formrecognizer_training_data_classifier, ** doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" ) - ) + ), }, ) result = await poller.result() @@ -173,18 +166,16 @@ async def test_mgmt_classifiers(self, formrecognizer_training_data_classifier, * doc_types={ "IRS-1040-A": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" ) ), "IRS-1040-B": ClassifierDocumentTypeDetails( source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" ) - ) + ), }, - description="IRS document classifier" + description="IRS document classifier", ) result = await poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model.py index 1a7aad9719d7..c8a94e1514c4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model.py @@ -8,15 +8,22 @@ import uuid import functools from devtools_testutils import recorded_by_proxy, set_bodiless_matcher -from azure.ai.formrecognizer import DocumentModelAdministrationClient, DocumentModelDetails, DocumentModelAdministrationLROPoller -from azure.ai.formrecognizer._generated.v2023_07_31.models import DocumentModelComposeOperationDetails, DocumentModelDetails as ModelDetails +from azure.ai.formrecognizer import ( + DocumentModelAdministrationClient, + DocumentModelDetails, + DocumentModelAdministrationLROPoller, +) +from azure.ai.formrecognizer._generated.v2023_07_31.models import ( + DocumentModelComposeOperationDetails, + DocumentModelDetails as ModelDetails, +) from testcase import FormRecognizerTest from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test - get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) + class TestTraining(FormRecognizerTest): @skip_flaky_test @@ -28,13 +35,28 @@ def test_compose_model(self, formrecognizer_storage_container_sas_url, **kwargs) model_id_1 = str(uuid.uuid4()) model_id_2 = str(uuid.uuid4()) composed_id = str(uuid.uuid4()) - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id_1, description="model1") + poller = client.begin_build_document_model( + "template", + blob_container_url=formrecognizer_storage_container_sas_url, + model_id=model_id_1, + description="model1", + ) model_1 = poller.result() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id_2, description="model2") + poller = client.begin_build_document_model( + "template", + blob_container_url=formrecognizer_storage_container_sas_url, + model_id=model_id_2, + description="model2", + ) model_2 = poller.result() - poller = client.begin_compose_document_model([model_1.model_id, model_2.model_id], model_id=composed_id, description="my composed model", tags={"testkey": "testvalue"}) + poller = client.begin_compose_document_model( + [model_1.model_id, model_2.model_id], + model_id=composed_id, + description="my composed model", + tags={"testkey": "testvalue"}, + ) composed_model = poller.result() if self.is_live: @@ -57,10 +79,14 @@ def test_compose_model(self, formrecognizer_storage_container_sas_url, **kwargs) def test_compose_model_transform(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, description="model1") + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, description="model1" + ) model_1 = poller.result() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, description="model2") + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, description="model2" + ) model_2 = poller.result() raw_response = [] @@ -72,7 +98,9 @@ def callback(response, _, headers): raw_response.append(model_info) raw_response.append(document_model) - poller = client.begin_compose_document_model([model_1.model_id, model_2.model_id], description="my composed model", cls=callback) + poller = client.begin_compose_document_model( + [model_1.model_id, model_2.model_id], description="my composed model", cls=callback + ) model = poller.result() generated = raw_response[0] @@ -89,10 +117,14 @@ def callback(response, _, headers): def test_compose_continuation_token(self, **kwargs): client = get_dma_client() formrecognizer_storage_container_sas_url = kwargs.pop("formrecognizer_storage_container_sas_url") - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_1 = poller.result() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_2 = poller.result() initial_poller = client.begin_compose_document_model([model_1.model_id, model_2.model_id]) @@ -110,10 +142,14 @@ def test_compose_continuation_token(self, **kwargs): def test_poller_metadata(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_1 = poller.result() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_2 = poller.result() poller = client.begin_compose_document_model([model_1.model_id, model_2.model_id]) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model_async.py index db0b4cddbf72..c11e630d5a65 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_compose_model_async.py @@ -11,13 +11,17 @@ from devtools_testutils import set_bodiless_matcher from azure.ai.formrecognizer.aio import DocumentModelAdministrationClient, AsyncDocumentModelAdministrationLROPoller from azure.ai.formrecognizer import DocumentModelDetails -from azure.ai.formrecognizer._generated.v2023_07_31.models import DocumentModelComposeOperationDetails, DocumentModelDetails as ModelDetails +from azure.ai.formrecognizer._generated.v2023_07_31.models import ( + DocumentModelComposeOperationDetails, + DocumentModelDetails as ModelDetails, +) from preparers import FormRecognizerPreparer, get_async_client from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) + class TestTrainingAsync(AsyncFormRecognizerTest): @skip_flaky_test @@ -30,13 +34,28 @@ async def test_compose_model(self, formrecognizer_storage_container_sas_url, **k model_id_2 = str(uuid.uuid4()) composed_id = str(uuid.uuid4()) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id_1, description="model1") + poller = await client.begin_build_document_model( + "template", + blob_container_url=formrecognizer_storage_container_sas_url, + model_id=model_id_1, + description="model1", + ) model_1 = await poller.result() - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id_2, description="model2") + poller = await client.begin_build_document_model( + "template", + blob_container_url=formrecognizer_storage_container_sas_url, + model_id=model_id_2, + description="model2", + ) model_2 = await poller.result() - poller = await client.begin_compose_document_model([model_1.model_id, model_2.model_id], model_id=composed_id, description="my composed model", tags={"testkey": "testvalue"}) + poller = await client.begin_compose_document_model( + [model_1.model_id, model_2.model_id], + model_id=composed_id, + description="my composed model", + tags={"testkey": "testvalue"}, + ) composed_model = await poller.result() if self.is_live: @@ -69,13 +88,19 @@ def callback(response, _, headers): raw_response.append(document_model) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, description="model1") + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, description="model1" + ) model_1 = await poller.result() - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, description="model2") + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, description="model2" + ) model_2 = await poller.result() - poller = await client.begin_compose_document_model([model_1.model_id, model_2.model_id], description="my composed model", cls=callback) + poller = await client.begin_compose_document_model( + [model_1.model_id, model_2.model_id], description="my composed model", cls=callback + ) model = await poller.result() generated = raw_response[0] @@ -93,10 +118,14 @@ async def test_compose_continuation_token(self, **kwargs): client = get_dma_client() formrecognizer_storage_container_sas_url = kwargs.pop("formrecognizer_storage_container_sas_url") async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_1 = await poller.result() - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_2 = await poller.result() initial_poller = await client.begin_compose_document_model([model_1.model_id, model_2.model_id]) @@ -115,10 +144,14 @@ async def test_poller_metadata(self, formrecognizer_storage_container_sas_url, * client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_1 = await poller.result() - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_2 = await poller.result() poller = await client.begin_compose_document_model([model_1.model_id, model_2.model_id]) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model.py index b9ee1d4159fd..71782ca43111 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model.py @@ -9,13 +9,19 @@ import functools from devtools_testutils import recorded_by_proxy, set_bodiless_matcher from azure.core.exceptions import HttpResponseError -from azure.ai.formrecognizer._generated.v2023_07_31.models import DocumentModelCopyToOperationDetails, DocumentModelDetails as ModelDetails -from azure.ai.formrecognizer import DocumentModelDetails, DocumentModelAdministrationClient, DocumentModelAdministrationLROPoller +from azure.ai.formrecognizer._generated.v2023_07_31.models import ( + DocumentModelCopyToOperationDetails, + DocumentModelDetails as ModelDetails, +) +from azure.ai.formrecognizer import ( + DocumentModelDetails, + DocumentModelAdministrationClient, + DocumentModelAdministrationLROPoller, +) from testcase import FormRecognizerTest from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test - get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) @@ -29,7 +35,7 @@ def test_copy_model_none_model_id(self, **kwargs): assert "model_id cannot be None or empty." in str(e.value) @FormRecognizerPreparer() - def test_copy_model_empty_model_id(self,**kwargs): + def test_copy_model_empty_model_id(self, **kwargs): client = get_dma_client() with pytest.raises(ValueError) as e: client.begin_copy_document_model_to(model_id="", target={}) @@ -41,7 +47,9 @@ def test_copy_model_empty_model_id(self,**kwargs): def test_copy_model_successful(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() target = client.get_copy_authorization(tags={"testkey": "testvalue"}) @@ -67,7 +75,9 @@ def test_copy_model_successful(self, formrecognizer_storage_container_sas_url, * def test_copy_model_with_model_id_and_desc(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() model_id = str(uuid.uuid4()) @@ -83,8 +93,8 @@ def test_copy_model_with_model_id_and_desc(self, formrecognizer_storage_containe assert copy.created_on for name, doc_type in copy.doc_types.items(): # if self.is_live: - # FIXME: tracking issue #24916 - # assert name == target["targetModelId"] + # FIXME: tracking issue #24916 + # assert name == target["targetModelId"] for key, field in doc_type.field_schema.items(): assert key assert field["type"] @@ -96,7 +106,9 @@ def test_copy_model_with_model_id_and_desc(self, formrecognizer_storage_containe def test_copy_model_fail_bad_model_id(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() target = client.get_copy_authorization() @@ -112,7 +124,9 @@ def test_copy_model_fail_bad_model_id(self, formrecognizer_storage_container_sas def test_copy_model_transform(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() target = client.get_copy_authorization() @@ -154,10 +168,14 @@ def test_copy_authorization(self, formrecognizer_region, formrecognizer_resource def test_copy_model_with_composed_model(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller_1 = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller_1 = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_1 = poller_1.result() - poller_2 = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller_2 = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_2 = poller_2.result() composed_poller = client.begin_compose_document_model([model_1.model_id, model_2.model_id]) @@ -186,7 +204,9 @@ def test_copy_model_with_composed_model(self, formrecognizer_storage_container_s def test_copy_continuation_token(self, **kwargs): client = get_dma_client() formrecognizer_storage_container_sas_url = kwargs.pop("formrecognizer_storage_container_sas_url") - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() target = client.get_copy_authorization() @@ -205,7 +225,9 @@ def test_copy_continuation_token(self, **kwargs): def test_poller_metadata(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() target = client.get_copy_authorization() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model_async.py index 6e35ed73bca3..7d7acb49113c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_copy_model_async.py @@ -10,14 +10,16 @@ from devtools_testutils import set_bodiless_matcher from devtools_testutils.aio import recorded_by_proxy_async from azure.core.exceptions import HttpResponseError -from azure.ai.formrecognizer._generated.v2023_07_31.models import DocumentModelCopyToOperationDetails, DocumentModelDetails as ModelDetails +from azure.ai.formrecognizer._generated.v2023_07_31.models import ( + DocumentModelCopyToOperationDetails, + DocumentModelDetails as ModelDetails, +) from azure.ai.formrecognizer import DocumentModelDetails from azure.ai.formrecognizer.aio import DocumentModelAdministrationClient, AsyncDocumentModelAdministrationLROPoller from preparers import FormRecognizerPreparer, get_async_client from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) @@ -46,7 +48,9 @@ async def test_copy_model_successful(self, formrecognizer_storage_container_sas_ client = get_dma_client() set_bodiless_matcher() async with client: - training_poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + training_poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await training_poller.result() target = await client.get_copy_authorization(tags={"testkey": "testvalue"}) @@ -73,7 +77,9 @@ async def test_copy_model_with_model_id_and_desc(self, formrecognizer_storage_co client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await poller.result() model_id = str(uuid.uuid4()) @@ -89,8 +95,8 @@ async def test_copy_model_with_model_id_and_desc(self, formrecognizer_storage_co assert copy.created_on for name, doc_type in copy.doc_types.items(): # if self.is_live: - # FIXME: tracking issue #24916 - # assert name == target["targetModelId"] + # FIXME: tracking issue #24916 + # assert name == target["targetModelId"] for key, field in doc_type.field_schema.items(): assert key assert field["type"] @@ -103,14 +109,18 @@ async def test_copy_model_fail_bad_model_id(self, formrecognizer_storage_contain client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await poller.result() target = await client.get_copy_authorization() with pytest.raises(HttpResponseError): # give bad model_id - poller = await client.begin_copy_document_model_to("00000000-0000-0000-0000-000000000000", target=target) + poller = await client.begin_copy_document_model_to( + "00000000-0000-0000-0000-000000000000", target=target + ) copy = await poller.result() @skip_flaky_test @@ -129,7 +139,9 @@ def callback(response, _, headers): raw_response.append(document_model) async with client: - training_poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + training_poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await training_poller.result() target = await client.get_copy_authorization() @@ -163,10 +175,14 @@ async def test_copy_model_with_composed_model(self, formrecognizer_storage_conta client = get_dma_client() set_bodiless_matcher() async with client: - poller_1 = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller_1 = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_1 = await poller_1.result() - poller_2 = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller_2 = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model_2 = await poller_2.result() composed_poller = await client.begin_compose_document_model([model_1.model_id, model_2.model_id]) @@ -196,7 +212,9 @@ async def test_copy_continuation_token(self, **kwargs): client = get_dma_client() formrecognizer_storage_container_sas_url = kwargs.pop("formrecognizer_storage_container_sas_url") async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await poller.result() target = await client.get_copy_authorization() @@ -216,7 +234,9 @@ async def test_poller_metadata(self, formrecognizer_storage_container_sas_url, * client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await poller.result() target = await client.get_copy_authorization() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt.py index 4dfce21146a6..25b32fb7341d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt.py @@ -10,16 +10,11 @@ from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ResourceNotFoundError, ClientAuthenticationError from azure.core.pipeline.transport import RequestsTransport -from azure.ai.formrecognizer import ( - DocumentModelAdministrationClient, - DocumentAnalysisApiVersion, - OperationDetails -) +from azure.ai.formrecognizer import DocumentModelAdministrationClient, DocumentAnalysisApiVersion, OperationDetails from testcase import FormRecognizerTest from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test - get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) @@ -106,7 +101,9 @@ def test_get_model_prebuilt(self, **kwargs): def test_mgmt_model(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, description="mgmt model") + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, description="mgmt model" + ) model = poller.result() model_from_get = client.get_document_model(model.model_id) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt_async.py index 905f8b392ad7..592657af38d5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_mgmt_async.py @@ -11,17 +11,12 @@ from azure.core.pipeline.transport import AioHttpTransport from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ResourceNotFoundError, ClientAuthenticationError -from azure.ai.formrecognizer import ( - DocumentModelAdministrationClient, - DocumentAnalysisApiVersion, - OperationDetails -) +from azure.ai.formrecognizer import DocumentModelAdministrationClient, DocumentAnalysisApiVersion, OperationDetails from azure.ai.formrecognizer.aio import DocumentModelAdministrationClient from preparers import FormRecognizerPreparer, get_async_client from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_dma_client = functools.partial(get_async_client, DocumentModelAdministrationClient) @@ -113,9 +108,11 @@ async def test_get_model_prebuilt(self): async def test_mgmt_model(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - + async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, description="mgmt model") + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, description="mgmt model" + ) model = await poller.result() model_from_get = await client.get_document_model(model.model_id) @@ -233,7 +230,7 @@ async def test_get_document_analysis_client(self, **kwargs): # this can be reverted to set_bodiless_matcher() after tests are re-recorded and don't contain these headers set_custom_default_matcher( compare_bodies=False, excluded_headers="Authorization,Content-Length,x-ms-client-request-id,x-ms-request-id" - ) + ) transport = AioHttpTransport() dtc = get_dma_client(transport=transport) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training.py index 5b8c21eb4716..03d5e041ebe6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training.py @@ -10,14 +10,22 @@ from devtools_testutils import recorded_by_proxy, set_bodiless_matcher from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ClientAuthenticationError, HttpResponseError -from azure.ai.formrecognizer._generated.v2023_07_31.models import DocumentModelBuildOperationDetails, DocumentModelDetails as ModelDetails -from azure.ai.formrecognizer import DocumentModelAdministrationClient, DocumentModelDetails, DocumentModelAdministrationLROPoller +from azure.ai.formrecognizer._generated.v2023_07_31.models import ( + DocumentModelBuildOperationDetails, + DocumentModelDetails as ModelDetails, +) +from azure.ai.formrecognizer import ( + DocumentModelAdministrationClient, + DocumentModelDetails, + DocumentModelAdministrationLROPoller, +) from testcase import FormRecognizerTest from conftest import skip_flaky_test from preparers import FormRecognizerPreparer, get_sync_client get_dma_client = functools.partial(get_sync_client, DocumentModelAdministrationClient) + class TestDMACTraining(FormRecognizerTest): @skip_flaky_test @@ -26,16 +34,22 @@ class TestDMACTraining(FormRecognizerTest): def test_build_model_polling_interval(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() + def check_poll_value(poll): if self.is_live: assert poll == 1 else: assert poll == 0 + check_poll_value(client._client._config.polling_interval) - poller = client.begin_build_document_model(blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template", polling_interval=6) + poller = client.begin_build_document_model( + blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template", polling_interval=6 + ) poller.wait() assert poller._polling_method._timeout == 6 - poller2 = client.begin_build_document_model(blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template") + poller2 = client.begin_build_document_model( + blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template" + ) poller2.wait() check_poll_value(poller2._polling_method._timeout) # goes back to client default client.close() @@ -72,7 +86,7 @@ def test_build_model(self, formrecognizer_storage_container_sas_url, **kwargs): blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id, description="a v3 model", - tags={"testkey": "testvalue"} + tags={"testkey": "testvalue"}, ) model = poller.result() @@ -103,7 +117,7 @@ def test_build_model_neural(self, formrecognizer_storage_container_sas_url, **kw blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id, description="a v3 model", - tags={"testkey": "testvalue"} + tags={"testkey": "testvalue"}, ) model = poller.result() @@ -130,7 +144,9 @@ def test_build_model_multipage(self, formrecognizer_multipage_storage_container_ client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_multipage_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_multipage_storage_container_sas_url + ) model = poller.result() assert model.model_id @@ -154,7 +170,9 @@ def test_build_model_nested_schema(self, formrecognizer_table_variable_rows_cont client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url + ) model = poller.result() assert model.model_id @@ -184,7 +202,9 @@ def callback(response, _, headers): raw_response.append(model_info) raw_response.append(document_model) - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, cls=callback) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, cls=callback + ) model = poller.result() raw_model = raw_response[0] @@ -212,7 +232,9 @@ def callback(response, _, headers): raw_response.append(model_info) raw_response.append(document_model) - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_multipage_storage_container_sas_url, cls=callback) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_multipage_storage_container_sas_url, cls=callback + ) model = poller.result() raw_model = raw_response[0] @@ -235,7 +257,9 @@ def callback(response, _, headers): raw_response.append(model_info) raw_response.append(document_model) - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url, cls=callback) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url, cls=callback + ) model = poller.result() raw_model = raw_response[0] @@ -254,7 +278,9 @@ def test_build_model_azure_blob_path_filter(self, formrecognizer_storage_contain client = get_dma_client() set_bodiless_matcher() with pytest.raises(HttpResponseError) as e: - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, prefix="testfolder") + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, prefix="testfolder" + ) model = poller.result() @pytest.mark.live_test_only @@ -263,7 +289,9 @@ def test_build_model_azure_blob_path_filter(self, formrecognizer_storage_contain def test_build_model_continuation_token(self, **kwargs): client = get_dma_client() formrecognizer_storage_container_sas_url = kwargs.pop("formrecognizer_storage_container_sas_url") - initial_poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + initial_poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) cont_token = initial_poller.continuation_token() poller = client.begin_build_document_model("template", blob_container_url=None, continuation_token=cont_token) result = poller.result() @@ -276,7 +304,9 @@ def test_build_model_continuation_token(self, **kwargs): def test_build_model_poller_metadata(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) poller.result() assert isinstance(poller, DocumentModelAdministrationLROPoller) details = poller.details @@ -296,7 +326,7 @@ def test_build_model_file_list_source(self, formrecognizer_selection_mark_storag poller = client.begin_build_document_model( build_mode="template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url, - file_list="filelist.jsonl" + file_list="filelist.jsonl", ) model = poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training_async.py index 42676c44a314..4d30e0f2e104 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_dmac_training_async.py @@ -11,7 +11,10 @@ from devtools_testutils import set_bodiless_matcher from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ClientAuthenticationError, HttpResponseError -from azure.ai.formrecognizer._generated.v2023_07_31.models import DocumentModelBuildOperationDetails, DocumentModelDetails as ModelDetails +from azure.ai.formrecognizer._generated.v2023_07_31.models import ( + DocumentModelBuildOperationDetails, + DocumentModelDetails as ModelDetails, +) from azure.ai.formrecognizer.aio import DocumentModelAdministrationClient, AsyncDocumentModelAdministrationLROPoller from azure.ai.formrecognizer import DocumentModelDetails from preparers import FormRecognizerPreparer, get_async_client @@ -29,16 +32,22 @@ class TestDMACTrainingAsync(AsyncFormRecognizerTest): async def test_build_model_polling_interval(self, formrecognizer_storage_container_sas_url, **kwargs): client = get_dma_client() set_bodiless_matcher() + def check_poll_value(poll): if self.is_live: assert poll == 1 else: assert poll == 0 + check_poll_value(client._client._config.polling_interval) - poller = await client.begin_build_document_model(blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template", polling_interval=6) + poller = await client.begin_build_document_model( + blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template", polling_interval=6 + ) await poller.wait() assert poller._polling_method._timeout == 6 - poller2 = await client.begin_build_document_model(blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template") + poller2 = await client.begin_build_document_model( + blob_container_url=formrecognizer_storage_container_sas_url, build_mode="template" + ) await poller2.wait() check_poll_value(poller2._polling_method._timeout) # goes back to client default await client.close() @@ -50,9 +59,9 @@ async def test_build_model_encoded_url(self): with pytest.raises(HttpResponseError): async with client: poller = await client.begin_build_document_model( - blob_container_url="https://fakeuri.com/blank%20space", - build_mode="template", - ) + blob_container_url="https://fakeuri.com/blank%20space", + build_mode="template", + ) assert "https://fakeuri.com/blank%20space" in poller._polling_method._initial_response.http_request.body await poller.wait() @@ -80,7 +89,7 @@ async def test_build_model(self, formrecognizer_storage_container_sas_url, **kwa blob_container_url=formrecognizer_storage_container_sas_url, model_id=model_id, description="a v3 model", - tags={"testkey": "testvalue"} + tags={"testkey": "testvalue"}, ) model = await poller.result() @@ -106,7 +115,9 @@ async def test_build_model_multipage(self, formrecognizer_multipage_storage_cont client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_multipage_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_multipage_storage_container_sas_url + ) model = await poller.result() assert model.model_id @@ -130,7 +141,9 @@ async def test_build_model_nested_schema(self, formrecognizer_table_variable_row client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url + ) model = await poller.result() assert model.model_id @@ -161,7 +174,9 @@ def callback(response, _, headers): raw_response.append(document_model) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, cls=callback) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, cls=callback + ) model = await poller.result() raw_model = raw_response[0] @@ -190,7 +205,9 @@ def callback(response, _, headers): raw_response.append(document_model) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_multipage_storage_container_sas_url, cls=callback) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_multipage_storage_container_sas_url, cls=callback + ) model = await poller.result() raw_model = raw_response[0] @@ -200,7 +217,9 @@ def callback(response, _, headers): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_build_model_nested_schema_transform(self, formrecognizer_table_variable_rows_container_sas_url, **kwargs): + async def test_build_model_nested_schema_transform( + self, formrecognizer_table_variable_rows_container_sas_url, **kwargs + ): client = get_dma_client() set_bodiless_matcher() raw_response = [] @@ -213,7 +232,9 @@ def callback(response, _, headers): raw_response.append(document_model) async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url, cls=callback) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_table_variable_rows_container_sas_url, cls=callback + ) model = await poller.result() raw_model = raw_response[0] @@ -233,7 +254,9 @@ async def test_build_model_azure_blob_path_filter(self, formrecognizer_storage_c set_bodiless_matcher() with pytest.raises(HttpResponseError) as e: async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url, prefix="testfolder") + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url, prefix="testfolder" + ) model = await poller.result() @pytest.mark.live_test_only @@ -243,9 +266,13 @@ async def test_build_model_continuation_token(self, **kwargs): client = get_dma_client() formrecognizer_storage_container_sas_url = kwargs.pop("formrecognizer_storage_container_sas_url") async with client: - initial_poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + initial_poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) cont_token = initial_poller.continuation_token() - poller = await client.begin_build_document_model("template", blob_container_url=None, continuation_token=cont_token) + poller = await client.begin_build_document_model( + "template", blob_container_url=None, continuation_token=cont_token + ) result = await poller.result() assert result await initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error @@ -257,7 +284,9 @@ async def test_build_model_poller_metadata(self, formrecognizer_storage_containe client = get_dma_client() set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) await poller.result() assert isinstance(poller, AsyncDocumentModelAdministrationLROPoller) details = poller.details @@ -271,14 +300,16 @@ async def test_build_model_poller_metadata(self, formrecognizer_storage_containe @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_build_model_file_list_source(self, formrecognizer_selection_mark_storage_container_sas_url, **kwargs): + async def test_build_model_file_list_source( + self, formrecognizer_selection_mark_storage_container_sas_url, **kwargs + ): client = get_dma_client() set_bodiless_matcher() async with client: poller = await client.begin_build_document_model( build_mode="template", blob_container_url=formrecognizer_selection_mark_storage_container_sas_url, - file_list="filelist.jsonl" + file_list="filelist.jsonl", ) model = await poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card.py index 0c47f34ad4e9..f20f6f6cd439 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card.py @@ -13,7 +13,6 @@ from conftest import skip_flaky_test from preparers import FormRecognizerPreparer, get_sync_client - get_fr_client = functools.partial(get_sync_client, FormRecognizerClient) @@ -27,10 +26,7 @@ def test_passing_enum_content_type(self): client = get_fr_client() with open(self.business_card_png, "rb") as fd: my_file = fd.read() - poller = client.begin_recognize_business_cards( - my_file, - content_type=FormContentType.IMAGE_PNG - ) + poller = client.begin_recognize_business_cards(my_file, content_type=FormContentType.IMAGE_PNG) result = poller.result() assert result is not None @@ -39,18 +35,14 @@ def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): client = get_fr_client() damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_business_cards( - damaged_pdf - ) + poller = client.begin_recognize_business_cards(damaged_pdf) @FormRecognizerPreparer() def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): client = get_fr_client() damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_business_cards( - damaged_pdf - ) + poller = client.begin_recognize_business_cards(damaged_pdf) @FormRecognizerPreparer() def test_passing_bad_content_type_param_passed(self, **kwargs): @@ -58,10 +50,7 @@ def test_passing_bad_content_type_param_passed(self, **kwargs): with open(self.business_card_jpg, "rb") as fd: my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_business_cards( - my_file, - content_type="application/jpeg" - ) + poller = client.begin_recognize_business_cards(my_file, content_type="application/jpeg") @skip_flaky_test @FormRecognizerPreparer() @@ -77,8 +66,8 @@ def test_business_card_multipage_pdf(self): business_card = result[0] assert len(business_card.fields.get("ContactNames").value) == 1 assert business_card.fields.get("ContactNames").value[0].value_data.page_number == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'JOHN' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'SINGER' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "JOHN" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "SINGER" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Software Engineer" @@ -95,8 +84,8 @@ def test_business_card_multipage_pdf(self): business_card = result[1] assert len(business_card.fields.get("ContactNames").value) == 1 assert business_card.fields.get("ContactNames").value[0].value_data.page_number == 2 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -143,13 +132,15 @@ def test_business_card_jpg_include_field_elements(self): for name, field in business_card.fields.items(): for f in field.value: - self.assertFieldElementsHasValues(f.value_data.field_elements, business_card.page_range.first_page_number) - + self.assertFieldElementsHasValues( + f.value_data.field_elements, business_card.page_range.first_page_number + ) + # check dict values assert len(business_card.fields.get("ContactNames").value) == 1 assert business_card.fields.get("ContactNames").value[0].value_data.page_number == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -181,7 +172,7 @@ def test_business_card_jpg_include_field_elements(self): @FormRecognizerPreparer() def test_business_card_v2(self, **kwargs): - client = get_fr_client(api_version=FormRecognizerApiVersion.V2_0) + client = get_fr_client(api_version=FormRecognizerApiVersion.V2_0) with open(self.business_card_jpg, "rb") as fd: business_card = fd.read() with pytest.raises(ValueError) as e: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_async.py index b524fed5de7a..fc9d91d961ec 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_async.py @@ -28,10 +28,7 @@ async def test_passing_enum_content_type(self): with open(self.business_card_png, "rb") as fd: my_file = fd.read() async with client: - poller = await client.begin_recognize_business_cards( - my_file, - content_type=FormContentType.IMAGE_PNG - ) + poller = await client.begin_recognize_business_cards(my_file, content_type=FormContentType.IMAGE_PNG) result = await poller.result() assert result is not None @@ -41,9 +38,7 @@ async def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_business_cards( - damaged_pdf - ) + poller = await client.begin_recognize_business_cards(damaged_pdf) @FormRecognizerPreparer() async def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): @@ -51,9 +46,7 @@ async def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_business_cards( - damaged_pdf - ) + poller = await client.begin_recognize_business_cards(damaged_pdf) result = await poller.result() @FormRecognizerPreparer() @@ -63,10 +56,7 @@ async def test_passing_bad_content_type_param_passed(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_business_cards( - my_file, - content_type="application/jpeg" - ) + poller = await client.begin_recognize_business_cards(my_file, content_type="application/jpeg") @pytest.mark.live_test_only @skip_flaky_test @@ -86,13 +76,15 @@ async def test_business_card_jpg_include_field_elements(self): for name, field in business_card.fields.items(): for f in field.value: - self.assertFieldElementsHasValues(f.value_data.field_elements, business_card.page_range.first_page_number) + self.assertFieldElementsHasValues( + f.value_data.field_elements, business_card.page_range.first_page_number + ) # check dict values assert len(business_card.fields.get("ContactNames").value) == 1 assert business_card.fields.get("ContactNames").value[0].value_data.page_number == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url.py index e073dbfd0303..b127f186849f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url.py @@ -12,7 +12,6 @@ from conftest import skip_flaky_test from preparers import FormRecognizerPreparer, get_sync_client - get_fr_client = functools.partial(get_sync_client, FormRecognizerClient) @@ -33,13 +32,15 @@ def test_business_card_jpg_include_field_elements(self): for name, field in business_card.fields.items(): for f in field.value: - self.assertFieldElementsHasValues(f.value_data.field_elements, business_card.page_range.first_page_number) - + self.assertFieldElementsHasValues( + f.value_data.field_elements, business_card.page_range.first_page_number + ) + # check dict values assert len(business_card.fields.get("ContactNames").value) == 1 assert business_card.fields.get("ContactNames").value[0].value_data.page_number == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -74,4 +75,6 @@ def test_business_card_v2(self, **kwargs): client = get_fr_client(api_version=FormRecognizerApiVersion.V2_0) with pytest.raises(ValueError) as e: client.begin_recognize_business_cards_from_url(self.business_card_url_jpg) - assert "Method 'begin_recognize_business_cards_from_url' is only available for API version V2_1 and up" in str(e.value) + assert "Method 'begin_recognize_business_cards_from_url' is only available for API version V2_1 and up" in str( + e.value + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py index 850d9311c5ba..3db9e9e0dc0f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py @@ -24,7 +24,9 @@ class TestBusinessCardFromUrlAsync(AsyncFormRecognizerTest): async def test_business_card_jpg_include_field_elements(self): client = get_fr_client() async with client: - poller = await client.begin_recognize_business_cards_from_url(self.business_card_url_jpg, include_field_elements=True) + poller = await client.begin_recognize_business_cards_from_url( + self.business_card_url_jpg, include_field_elements=True + ) result = await poller.result() assert len(result) == 1 @@ -34,13 +36,15 @@ async def test_business_card_jpg_include_field_elements(self): for name, field in business_card.fields.items(): for f in field.value: - self.assertFieldElementsHasValues(f.value_data.field_elements, business_card.page_range.first_page_number) + self.assertFieldElementsHasValues( + f.value_data.field_elements, business_card.page_range.first_page_number + ) # check dict values assert len(business_card.fields.get("ContactNames").value) == 1 assert business_card.fields.get("ContactNames").value[0].value_data.page_number == 1 - assert business_card.fields.get("ContactNames").value[0].value['FirstName'].value == 'Avery' - assert business_card.fields.get("ContactNames").value[0].value['LastName'].value == 'Smith' + assert business_card.fields.get("ContactNames").value[0].value["FirstName"].value == "Avery" + assert business_card.fields.get("ContactNames").value[0].value["LastName"].value == "Smith" assert len(business_card.fields.get("JobTitles").value) == 1 assert business_card.fields.get("JobTitles").value[0].value == "Senior Researcher" @@ -76,4 +80,6 @@ async def test_business_card_v2(self, **kwargs): with pytest.raises(ValueError) as e: async with client: await client.begin_recognize_business_cards_from_url(self.business_card_url_jpg) - assert "Method 'begin_recognize_business_cards_from_url' is only available for API version V2_1 and up" in str(e.value) + assert "Method 'begin_recognize_business_cards_from_url' is only available for API version V2_1 and up" in str( + e.value + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content.py index 030201d1bd8d..a901168cf2c3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content.py @@ -44,10 +44,7 @@ def test_passing_enum_content_type(self): client = get_fr_client() with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() - poller = client.begin_recognize_content( - my_file, - content_type=FormContentType.APPLICATION_PDF - ) + poller = client.begin_recognize_content(my_file, content_type=FormContentType.APPLICATION_PDF) result = poller.result() assert result is not None @@ -67,10 +64,7 @@ def test_passing_bad_content_type_param_passed(self, **kwargs): with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_content( - my_file, - content_type="application/jpeg" - ) + poller = client.begin_recognize_content(my_file, content_type="application/jpeg") @FormRecognizerPreparer() def test_auto_detect_unsupported_stream_content(self, **kwargs): @@ -79,9 +73,7 @@ def test_auto_detect_unsupported_stream_content(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_content( - my_file - ) + poller = client.begin_recognize_content(my_file) @skip_flaky_test @FormRecognizerPreparer() @@ -119,7 +111,7 @@ def test_content_reading_order(self): poller = client.begin_recognize_content(form, reading_order="natural") - assert 'natural' == poller._polling_method._initial_response.http_response.request.query['readingOrder'] + assert "natural" == poller._polling_method._initial_response.http_response.request.query["readingOrder"] result = poller.result() assert result @@ -162,11 +154,11 @@ def test_content_stream_jpg(self): assert layout.page_number == 1 self.assertFormPagesHasValues(result) assert layout.tables[0].row_count == 5 - assert layout.tables[0].column_count== 4 + assert layout.tables[0].column_count == 4 assert layout.tables[1].row_count == 4 - assert layout.tables[1].column_count== 2 + assert layout.tables[1].column_count == 2 assert layout.tables[0].page_number == 1 - assert layout.tables[1].page_number== 1 + assert layout.tables[1].page_number == 1 @skip_flaky_test @FormRecognizerPreparer() @@ -311,7 +303,7 @@ def test_content_language_specified(self): with open(self.form_jpg, "rb") as fd: my_file = fd.read() poller = client.begin_recognize_content(my_file, language="de") - assert 'de' == poller._polling_method._initial_response.http_response.request.query['language'] + assert "de" == poller._polling_method._initial_response.http_response.request.query["language"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_async.py index 94fe01a3107f..f88ab17e770a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_async.py @@ -51,10 +51,7 @@ async def test_passing_enum_content_type(self): with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() async with client: - poller = await client.begin_recognize_content( - my_file, - content_type=FormContentType.APPLICATION_PDF - ) + poller = await client.begin_recognize_content(my_file, content_type=FormContentType.APPLICATION_PDF) result = await poller.result() assert result is not None @@ -78,10 +75,7 @@ async def test_passing_bad_content_type_param_passed(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_content( - my_file, - content_type="application/jpeg" - ) + poller = await client.begin_recognize_content(my_file, content_type="application/jpeg") result = await poller.result() @FormRecognizerPreparer() @@ -92,9 +86,7 @@ async def test_auto_detect_unsupported_stream_content(self, **kwargs): with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_content( - my_file - ) + poller = await client.begin_recognize_content(my_file) result = await poller.result() @pytest.mark.live_test_only @@ -170,11 +162,11 @@ async def test_content_stream_jpg(self): assert layout.page_number == 1 self.assertFormPagesHasValues(result) assert layout.tables[0].row_count == 5 - assert layout.tables[0].column_count== 4 + assert layout.tables[0].column_count == 4 assert layout.tables[1].row_count == 4 - assert layout.tables[1].column_count== 2 + assert layout.tables[1].column_count == 2 assert layout.tables[0].page_number == 1 - assert layout.tables[1].page_number== 1 + assert layout.tables[1].page_number == 1 @pytest.mark.live_test_only @skip_flaky_test @@ -234,7 +226,6 @@ async def test_content_continuation_token(self, **kwargs): assert result is not None await initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error - @pytest.mark.live_test_only @skip_flaky_test @FormRecognizerPreparer() @@ -251,16 +242,16 @@ async def test_content_multipage_table_span_pdf(self): assert layout.page_number == 1 assert len(layout.tables) == 2 assert layout.tables[0].row_count == 29 - assert layout.tables[0].column_count== 4 + assert layout.tables[0].column_count == 4 assert layout.tables[0].page_number == 1 assert layout.tables[1].row_count == 6 - assert layout.tables[1].column_count== 5 - assert layout.tables[1].page_number== 1 + assert layout.tables[1].column_count == 5 + assert layout.tables[1].page_number == 1 layout = result[1] assert len(layout.tables) == 1 assert layout.page_number == 2 assert layout.tables[0].row_count == 23 - assert layout.tables[0].column_count== 5 + assert layout.tables[0].column_count == 5 assert layout.tables[0].page_number == 2 self.assertFormPagesHasValues(result) @@ -337,7 +328,7 @@ async def test_content_reading_order(self): async with client: poller = await client.begin_recognize_content(form, reading_order="natural") - assert 'natural' == poller._polling_method._initial_response.http_response.request.query['readingOrder'] + assert "natural" == poller._polling_method._initial_response.http_response.request.query["readingOrder"] result = await poller.result() assert result @@ -351,7 +342,7 @@ async def test_content_language_specified(self): my_file = fd.read() async with client: poller = await client.begin_recognize_content(my_file, language="de") - assert 'de' == poller._polling_method._initial_response.http_response.request.query['language'] + assert "de" == poller._polling_method._initial_response.http_response.request.query["language"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url.py index 6395676b6c3e..75a1b2dbecc2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url.py @@ -71,7 +71,7 @@ def test_content_url_pdf(self): assert layout.page_number == 1 self.assertFormPagesHasValues(result) assert layout.tables[0].row_count == 3 - assert layout.tables[0].column_count== 5 + assert layout.tables[0].column_count == 5 assert layout.tables[0].page_number == 1 @skip_flaky_test @@ -109,11 +109,11 @@ def test_content_url_jpg(self): assert layout.page_number == 1 self.assertFormPagesHasValues(result) assert layout.tables[0].row_count == 5 - assert layout.tables[0].column_count== 4 + assert layout.tables[0].column_count == 4 assert layout.tables[1].row_count == 4 - assert layout.tables[1].column_count== 2 + assert layout.tables[1].column_count == 2 assert layout.tables[0].page_number == 1 - assert layout.tables[1].page_number== 1 + assert layout.tables[1].page_number == 1 @skip_flaky_test @FormRecognizerPreparer() @@ -174,16 +174,16 @@ def test_content_multipage_table_span_pdf(self): assert layout.page_number == 1 assert len(layout.tables) == 2 assert layout.tables[0].row_count == 29 - assert layout.tables[0].column_count== 4 + assert layout.tables[0].column_count == 4 assert layout.tables[0].page_number == 1 assert layout.tables[1].row_count == 6 - assert layout.tables[1].column_count== 5 - assert layout.tables[1].page_number== 1 + assert layout.tables[1].column_count == 5 + assert layout.tables[1].page_number == 1 layout = result[1] assert len(layout.tables) == 1 assert layout.page_number == 2 assert layout.tables[0].row_count == 23 - assert layout.tables[0].column_count== 5 + assert layout.tables[0].column_count == 5 assert layout.tables[0].page_number == 2 self.assertFormPagesHasValues(result) @@ -239,7 +239,7 @@ def test_content_reading_order(self): client = get_fr_client() poller = client.begin_recognize_content_from_url(self.form_url_jpg, reading_order="natural") - assert 'natural' == poller._polling_method._initial_response.http_response.request.query['readingOrder'] + assert "natural" == poller._polling_method._initial_response.http_response.request.query["readingOrder"] result = poller.result() assert result @@ -249,7 +249,7 @@ def test_content_reading_order(self): def test_content_language_specified(self): client = get_fr_client() poller = client.begin_recognize_content_from_url(self.form_url_jpg, language="de") - assert 'de' == poller._polling_method._initial_response.http_response.request.query['language'] + assert "de" == poller._polling_method._initial_response.http_response.request.query["language"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url_async.py index 493f3c0c0067..d876d0bd7efd 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_content_from_url_async.py @@ -80,7 +80,7 @@ async def test_content_url_pdf(self): assert layout.page_number == 1 self.assertFormPagesHasValues(result) assert layout.tables[0].row_count == 3 - assert layout.tables[0].column_count== 5 + assert layout.tables[0].column_count == 5 assert layout.tables[0].page_number == 1 @skip_flaky_test @@ -145,16 +145,16 @@ async def test_content_multipage_table_span_pdf(self): assert layout.page_number == 1 assert len(layout.tables) == 2 assert layout.tables[0].row_count == 29 - assert layout.tables[0].column_count== 4 + assert layout.tables[0].column_count == 4 assert layout.tables[0].page_number == 1 assert layout.tables[1].row_count == 6 - assert layout.tables[1].column_count== 5 - assert layout.tables[1].page_number== 1 + assert layout.tables[1].column_count == 5 + assert layout.tables[1].page_number == 1 layout = result[1] assert len(layout.tables) == 1 assert layout.page_number == 2 assert layout.tables[0].row_count == 23 - assert layout.tables[0].column_count== 5 + assert layout.tables[0].column_count == 5 assert layout.tables[0].page_number == 2 self.assertFormPagesHasValues(result) @@ -214,7 +214,7 @@ async def test_content_reading_order(self): async with client: poller = await client.begin_recognize_content_from_url(self.form_url_jpg, reading_order="natural") - assert 'natural' == poller._polling_method._initial_response.http_response.request.query['readingOrder'] + assert "natural" == poller._polling_method._initial_response.http_response.request.query["readingOrder"] result = await poller.result() assert result @@ -225,7 +225,7 @@ async def test_content_language_specified(self): client = get_fr_client() async with client: poller = await client.begin_recognize_content_from_url(self.form_url_jpg, language="de") - assert 'de' == poller._polling_method._initial_response.http_response.request.query['language'] + assert "de" == poller._polling_method._initial_response.http_response.request.query["language"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py index eb4a058d746c..59b9b093690c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms.py @@ -31,13 +31,11 @@ def test_custom_form_unlabeled(self, formrecognizer_storage_container_sas_url_v2 with open(self.form_jpg, "rb") as stream: poller = fr_client.begin_recognize_custom_forms( - model.model_id, - stream, - content_type=FormContentType.IMAGE_JPEG + model.model_id, stream, content_type=FormContentType.IMAGE_JPEG ) form = poller.result() - assert form[0].form_type == "form-0" + assert form[0].form_type == "form-0" self.assertUnlabeledRecognizedFormHasValues(form[0], model) @pytest.mark.skip("Test is flaky and hangs") @@ -52,9 +50,7 @@ def test_custom_form_multipage_unlabeled(self, formrecognizer_multipage_storage_ with open(self.multipage_invoice_pdf, "rb") as stream: poller = fr_client.begin_recognize_custom_forms( - model.model_id, - stream, - content_type=FormContentType.APPLICATION_PDF + model.model_id, stream, content_type=FormContentType.APPLICATION_PDF ) forms = poller.result() @@ -72,19 +68,19 @@ def test_custom_form_labeled(self, formrecognizer_storage_container_sas_url_v2, fr_client = client.get_form_recognizer_client() poller = client.begin_training( - formrecognizer_storage_container_sas_url_v2, - use_training_labels=True, - model_name="labeled" + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="labeled" ) model = poller.result() with open(self.form_jpg, "rb") as fd: my_file = fd.read() - poller = fr_client.begin_recognize_custom_forms(model.model_id, my_file, content_type=FormContentType.IMAGE_JPEG) + poller = fr_client.begin_recognize_custom_forms( + model.model_id, my_file, content_type=FormContentType.IMAGE_JPEG + ) form = poller.result() - assert form[0].form_type == "custom:labeled" + assert form[0].form_type == "custom:labeled" self.assertLabeledRecognizedFormHasValues(form[0], model) @pytest.mark.skip("Test is flaky and hangs") @@ -94,24 +90,19 @@ def test_custom_form_multipage_labeled(self, formrecognizer_multipage_storage_co client = get_ft_client() fr_client = client.get_form_recognizer_client() - poller = client.begin_training( - formrecognizer_multipage_storage_container_sas_url_v2, - use_training_labels=True - ) + poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = poller.result() with open(self.multipage_invoice_pdf, "rb") as fd: my_file = fd.read() poller = fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - content_type=FormContentType.APPLICATION_PDF + model.model_id, my_file, content_type=FormContentType.APPLICATION_PDF ) forms = poller.result() for form in forms: - assert form.form_type == "custom:"+model.model_id + assert form.form_type == "custom:" + model.model_id self.assertLabeledRecognizedFormHasValues(form, model) @pytest.mark.skip("Test is flaky and hangs") @@ -136,10 +127,7 @@ def callback(raw_response, _, headers): my_file = fd.read() poller = fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -149,8 +137,8 @@ def callback(raw_response, _, headers): actual_fields = actual.analyze_result.page_results[0].key_value_pairs self.assertFormPagesTransformCorrect(recognized_form[0].pages, read_results, page_results) - assert recognized_form[0].page_range.first_page_number == page_results[0].page - assert recognized_form[0].page_range.last_page_number == page_results[0].page + assert recognized_form[0].page_range.first_page_number == page_results[0].page + assert recognized_form[0].page_range.last_page_number == page_results[0].page assert recognized_form[0].form_type_confidence is None assert recognized_form[0].model_id is not None self.assertUnlabeledFormFieldDictTransformCorrect(recognized_form[0].fields, actual_fields, read_results) @@ -158,13 +146,13 @@ def callback(raw_response, _, headers): recognized_form_dict = [v.to_dict() for v in recognized_form] assert recognized_form_dict[0].get("form_type_confidence") is None assert recognized_form_dict[0].get("model_id") is not None - assert recognized_form_dict[0].get("form_type") == "form-0" + assert recognized_form_dict[0].get("form_type") == "form-0" recognized_form = _models.RecognizedForm.from_dict(recognized_form_dict[0]) self.assertFormPagesTransformCorrect(recognized_form.pages, read_results, page_results) - assert recognized_form.page_range.first_page_number == page_results[0].page - assert recognized_form.page_range.last_page_number == page_results[0].page + assert recognized_form.page_range.first_page_number == page_results[0].page + assert recognized_form.page_range.last_page_number == page_results[0].page assert recognized_form.form_type_confidence is None assert recognized_form.model_id is not None self.assertUnlabeledFormFieldDictTransformCorrect(recognized_form.fields, actual_fields, read_results) @@ -172,7 +160,9 @@ def callback(raw_response, _, headers): @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + def test_custom_form_multipage_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() @@ -191,10 +181,7 @@ def callback(raw_response, _, headers): my_file = fd.read() poller = fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -205,10 +192,10 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @@ -224,16 +211,9 @@ def test_custom_form_continuation_token(self, **kwargs): with open(self.form_jpg, "rb") as fd: my_file = fd.read() - initial_poller = fr_client.begin_recognize_custom_forms( - model.model_id, - my_file - ) + initial_poller = fr_client.begin_recognize_custom_forms(model.model_id, my_file) cont_token = initial_poller.continuation_token() - poller = fr_client.begin_recognize_custom_forms( - model.model_id, - None, - continuation_token=cont_token - ) + poller = fr_client.begin_recognize_custom_forms(model.model_id, None, continuation_token=cont_token) result = poller.result() assert result is not None initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error @@ -242,11 +222,15 @@ def test_custom_form_continuation_token(self, **kwargs): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_vendor_set_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + def test_custom_form_multipage_vendor_set_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False) + poller = client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False + ) model = poller.result() responses = [] @@ -261,10 +245,7 @@ def callback(raw_response, _, headers): my_file = fd.read() poller = fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -274,21 +255,25 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_vendor_set_labeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + def test_custom_form_multipage_vendor_set_labeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True) + poller = client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True + ) model = poller.result() responses = [] @@ -303,10 +288,7 @@ def callback(raw_response, _, headers): my_file = fd.read() poller = fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -317,9 +299,9 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, document_results): - assert form.page_range.first_page_number == actual.page_range[0] - assert form.page_range.last_page_number == actual.page_range[1] - assert form.form_type == "custom:"+model.model_id + assert form.page_range.first_page_number == actual.page_range[0] + assert form.page_range.last_page_number == actual.page_range[1] + assert form.form_type == "custom:" + model.model_id assert form.form_type_confidence is not None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_async.py index 74e6b43cb4bd..804f6fcb8a41 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_async.py @@ -31,33 +31,39 @@ async def test_custom_form_unlabeled(self, formrecognizer_storage_container_sas_ my_file = fd.read() async with client: - training_poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) + training_poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=False + ) model = await training_poller.result() async with fr_client: - poller = await fr_client.begin_recognize_custom_forms(model.model_id, my_file, content_type=FormContentType.IMAGE_JPEG) + poller = await fr_client.begin_recognize_custom_forms( + model.model_id, my_file, content_type=FormContentType.IMAGE_JPEG + ) form = await poller.result() - assert form[0].form_type == "form-0" + assert form[0].form_type == "form-0" self.assertUnlabeledRecognizedFormHasValues(form[0], model) @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_form_multipage_unlabeled(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_custom_form_multipage_unlabeled( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() with open(self.multipage_invoice_pdf, "rb") as fd: my_file = fd.read() async with client: - training_poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False) + training_poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False + ) model = await training_poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - content_type=FormContentType.APPLICATION_PDF + model.model_id, my_file, content_type=FormContentType.APPLICATION_PDF ) forms = await poller.result() @@ -78,27 +84,26 @@ async def test_custom_form_multipage_labeled(self, formrecognizer_multipage_stor async with client: training_poller = await client.begin_training( - formrecognizer_multipage_storage_container_sas_url_v2, - use_training_labels=True + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True ) model = await training_poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - content_type=FormContentType.APPLICATION_PDF + model.model_id, my_file, content_type=FormContentType.APPLICATION_PDF ) forms = await poller.result() for form in forms: - assert form.form_type == "custom:"+model.model_id + assert form.form_type == "custom:" + model.model_id self.assertLabeledRecognizedFormHasValues(form, model) @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_forms_multipage_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_custom_forms_multipage_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() @@ -114,15 +119,14 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - training_poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False) + training_poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False + ) model = await training_poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = await poller.result() actual = responses[0] @@ -133,13 +137,12 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) - @pytest.mark.skip("Test is flaky and hangs") @skip_flaky_test @FormRecognizerPreparer() @@ -155,16 +158,11 @@ async def test_custom_form_continuation_token(self, **kwargs): model = await poller.result() async with fr_client: - initial_poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - my_file - ) + initial_poller = await fr_client.begin_recognize_custom_forms(model.model_id, my_file) cont_token = initial_poller.continuation_token() poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - None, - continuation_token=cont_token + model.model_id, None, continuation_token=cont_token ) result = await poller.result() assert result is not None @@ -174,7 +172,9 @@ async def test_custom_form_continuation_token(self, **kwargs): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_form_multipage_vendor_set_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + async def test_custom_form_multipage_vendor_set_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() @@ -190,15 +190,14 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False + ) model = await poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = await poller.result() actual = responses[0] @@ -208,17 +207,19 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_form_multipage_vendor_set_labeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + async def test_custom_form_multipage_vendor_set_labeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() @@ -234,15 +235,14 @@ def callback(raw_response, _, headers): responses.append(form) async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True + ) model = await poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms( - model.model_id, - my_file, - include_field_elements=True, - cls=callback + model.model_id, my_file, include_field_elements=True, cls=callback ) form = await poller.result() actual = responses[0] @@ -253,9 +253,9 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, document_results): - assert form.page_range.first_page_number == actual.page_range[0] - assert form.page_range.last_page_number == actual.page_range[1] - assert form.form_type == "custom:"+model.model_id + assert form.page_range.first_page_number == actual.page_range[0] + assert form.page_range.last_page_number == actual.page_range[1] + assert form.form_type == "custom:" + model.model_id assert form.form_type_confidence is not None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url.py index 54a52bd42005..5a5c4e2dd848 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url.py @@ -24,16 +24,15 @@ class TestCustomFormsFromUrl(FormRecognizerTest): @recorded_by_proxy def test_form_multipage_unlabeled(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): client = get_ft_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) fr_client = client.get_form_recognizer_client() poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False) model = poller.result() - poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url - ) + poller = fr_client.begin_recognize_custom_forms_from_url(model.model_id, blob_sas_url) forms = poller.result() for form in forms: @@ -47,32 +46,32 @@ def test_form_multipage_unlabeled(self, formrecognizer_multipage_storage_contain @recorded_by_proxy def test_form_multipage_labeled(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): client = get_ft_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) fr_client = client.get_form_recognizer_client() - poller = client.begin_training( - formrecognizer_multipage_storage_container_sas_url_v2, - use_training_labels=True - ) + poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = poller.result() - poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url - ) + poller = fr_client.begin_recognize_custom_forms_from_url(model.model_id, blob_sas_url) forms = poller.result() for form in forms: - assert form.form_type == "custom:"+model.model_id + assert form.form_type == "custom:" + model.model_id self.assertLabeledRecognizedFormHasValues(form, model) @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + def test_custom_form_multipage_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False) model = poller.result() @@ -85,10 +84,7 @@ def callback(raw_response, _, headers): responses.append(form) poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -99,19 +95,23 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_labeled_transform(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + def test_custom_form_multipage_labeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = poller.result() @@ -124,10 +124,7 @@ def callback(raw_response, _, headers): responses.append(form) poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -138,11 +135,11 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, document_results): - assert form.page_range.first_page_number == actual.page_range[0] - assert form.page_range.last_page_number == actual.page_range[1] - assert form.form_type == "custom:"+model.model_id + assert form.page_range.first_page_number == actual.page_range[0] + assert form.page_range.last_page_number == actual.page_range[1] + assert form.form_type == "custom:" + model.model_id assert form.form_type_confidence is not None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) @pytest.mark.skip("Test is flaky and hangs") @@ -155,17 +152,10 @@ def test_custom_form_continuation_token(self, **kwargs): training_poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = training_poller.result() - initial_poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - self.form_url_jpg - ) + initial_poller = fr_client.begin_recognize_custom_forms_from_url(model.model_id, self.form_url_jpg) cont_token = initial_poller.continuation_token() - poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - None, - continuation_token=cont_token - ) + poller = fr_client.begin_recognize_custom_forms_from_url(model.model_id, None, continuation_token=cont_token) result = poller.result() assert result is not None initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error @@ -173,11 +163,17 @@ def test_custom_form_continuation_token(self, **kwargs): @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_vendor_set_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + def test_custom_form_multipage_vendor_set_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf") - poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False) + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf" + ) + poller = client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False + ) model = poller.result() responses = [] @@ -189,10 +185,7 @@ def callback(raw_response, _, headers): responses.append(form) poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -203,20 +196,26 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_custom_form_multipage_vendor_set_labeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + def test_custom_form_multipage_vendor_set_labeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf") - poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True) + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf" + ) + poller = client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True + ) model = poller.result() responses = [] @@ -228,10 +227,7 @@ def callback(raw_response, _, headers): responses.append(form) poller = fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = poller.result() actual = responses[0] @@ -242,11 +238,11 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, document_results): - assert form.page_range.first_page_number == actual.page_range[0] - assert form.page_range.last_page_number == actual.page_range[1] - assert form.form_type == "custom:"+model.model_id + assert form.page_range.first_page_number == actual.page_range[0] + assert form.page_range.last_page_number == actual.page_range[1] + assert form.form_type == "custom:" + model.model_id assert form.form_type_confidence is not None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) @pytest.mark.skip("Test is flaky and hangs") @@ -257,10 +253,12 @@ def test_pages_kwarg_specified(self, formrecognizer_testing_data_container_sas_u fr_client = client.get_form_recognizer_client() blob_sas_url = _get_blob_url(formrecognizer_testing_data_container_sas_url, "testingdata", "multi1.pdf") - training_poller = client.begin_training(formrecognizer_testing_data_container_sas_url, use_training_labels=False) + training_poller = client.begin_training( + formrecognizer_testing_data_container_sas_url, use_training_labels=False + ) model = training_poller.result() poller = fr_client.begin_recognize_custom_forms_from_url(model.model_id, blob_sas_url, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url_async.py index 468ae0d7d29d..f164d7aabaa9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_custom_forms_from_url_async.py @@ -14,6 +14,7 @@ from asynctestcase import AsyncFormRecognizerTest from testcase import _get_blob_url from conftest import skip_flaky_test + get_ft_client = functools.partial(get_async_client, FormTrainingClient) @@ -22,12 +23,18 @@ class TestCustomFormsFromUrlAsync(AsyncFormRecognizerTest): @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_form_multipage_unlabeled(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_custom_form_multipage_unlabeled( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) async with client: - training_poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False) + training_poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False + ) model = await training_poller.result() async with fr_client: @@ -49,23 +56,21 @@ async def test_custom_form_multipage_unlabeled(self, formrecognizer_multipage_st async def test_form_multipage_labeled(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) async with client: training_poller = await client.begin_training( - formrecognizer_multipage_storage_container_sas_url_v2, - use_training_labels=True + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True ) model = await training_poller.result() async with fr_client: - poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url - ) + poller = await fr_client.begin_recognize_custom_forms_from_url(model.model_id, blob_sas_url) forms = await poller.result() for form in forms: - assert form.form_type == "custom:"+model.model_id + assert form.form_type == "custom:" + model.model_id self.assertLabeledRecognizedFormHasValues(form, model) @pytest.mark.skip("Test is flaky and hangs") @@ -74,7 +79,9 @@ async def test_form_multipage_labeled(self, formrecognizer_multipage_storage_con async def test_multipage_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) responses = [] def callback(raw_response, _, headers): @@ -84,15 +91,14 @@ def callback(raw_response, _, headers): responses.append(form) async with client: - training_poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False) + training_poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=False + ) model = await training_poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = await poller.result() @@ -104,10 +110,10 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @@ -116,7 +122,9 @@ def callback(raw_response, _, headers): async def test_multipage_labeled_transform(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_v2, "multipage-training-data", "multipage_invoice1.pdf" + ) responses = [] def callback(raw_response, _, headers): @@ -126,15 +134,14 @@ def callback(raw_response, _, headers): responses.append(form) async with client: - training_poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) + training_poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True + ) model = await training_poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = await poller.result() @@ -146,11 +153,11 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, document_results): - assert form.page_range.first_page_number == actual.page_range[0] - assert form.page_range.last_page_number == actual.page_range[1] - assert form.form_type == "custom:"+model.model_id + assert form.page_range.first_page_number == actual.page_range[0] + assert form.page_range.last_page_number == actual.page_range[1] + assert form.form_type == "custom:" + model.model_id assert form.form_type_confidence is not None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) @pytest.mark.skip("Test is flaky and hangs") @@ -167,14 +174,11 @@ async def test_custom_form_continuation_token(self, **kwargs): async with fr_client: initial_poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - self.form_url_jpg + model.model_id, self.form_url_jpg ) cont_token = initial_poller.continuation_token() poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - None, - continuation_token=cont_token + model.model_id, None, continuation_token=cont_token ) result = await poller.result() assert result is not None @@ -183,10 +187,14 @@ async def test_custom_form_continuation_token(self, **kwargs): @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_form_multipage_vendor_set_unlabeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + async def test_custom_form_multipage_vendor_set_unlabeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf" + ) responses = [] def callback(raw_response, _, headers): @@ -196,15 +204,14 @@ def callback(raw_response, _, headers): responses.append(form) async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=False + ) model = await poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = await poller.result() actual = responses[0] @@ -214,19 +221,23 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, page_results): - assert form.page_range.first_page_number == actual.page - assert form.page_range.last_page_number == actual.page + assert form.page_range.first_page_number == actual.page + assert form.page_range.last_page_number == actual.page assert form.form_type_confidence is None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertUnlabeledFormFieldDictTransformCorrect(form.fields, actual.key_value_pairs, read_results) @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_custom_form_multipage_vendor_set_labeled_transform(self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs): + async def test_custom_form_multipage_vendor_set_labeled_transform( + self, formrecognizer_multipage_storage_container_sas_url_2_v2, **kwargs + ): client = get_ft_client() fr_client = client.get_form_recognizer_client() - blob_sas_url = _get_blob_url(formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf") + blob_sas_url = _get_blob_url( + formrecognizer_multipage_storage_container_sas_url_2_v2, "multipage-vendor-forms", "multi1.pdf" + ) responses = [] def callback(raw_response, _, headers): @@ -236,15 +247,14 @@ def callback(raw_response, _, headers): responses.append(form) async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_2_v2, use_training_labels=True + ) model = await poller.result() async with fr_client: poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - include_field_elements=True, - cls=callback + model.model_id, blob_sas_url, include_field_elements=True, cls=callback ) form = await poller.result() actual = responses[0] @@ -255,11 +265,11 @@ def callback(raw_response, _, headers): self.assertFormPagesTransformCorrect(recognized_form, read_results, page_results) for form, actual in zip(recognized_form, document_results): - assert form.page_range.first_page_number == actual.page_range[0] - assert form.page_range.last_page_number == actual.page_range[1] - assert form.form_type == "custom:"+model.model_id + assert form.page_range.first_page_number == actual.page_range[0] + assert form.page_range.last_page_number == actual.page_range[1] + assert form.form_type == "custom:" + model.model_id assert form.form_type_confidence is not None - assert form.model_id == model.model_id + assert form.model_id == model.model_id self.assertFormFieldsTransformCorrect(form.fields, actual.fields, read_results) @pytest.mark.skip("Test is flaky and hangs") @@ -271,14 +281,13 @@ async def test_pages_kwarg_specified(self, formrecognizer_testing_data_container blob_sas_url = _get_blob_url(formrecognizer_testing_data_container_sas_url, "testingdata", "multi1.pdf") async with fr_client: - training_poller = await client.begin_training(formrecognizer_testing_data_container_sas_url, use_training_labels=False) + training_poller = await client.begin_training( + formrecognizer_testing_data_container_sas_url, use_training_labels=False + ) model = await training_poller.result() - poller = await fr_client.begin_recognize_custom_forms_from_url( - model.model_id, - blob_sas_url, - pages=["1"]) - - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + poller = await fr_client.begin_recognize_custom_forms_from_url(model.model_id, blob_sas_url, pages=["1"]) + + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents.py index 3518a22fa38b..72373d3c64a2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents.py @@ -36,18 +36,14 @@ def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): client = get_fr_client() damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_identity_documents( - damaged_pdf - ) + poller = client.begin_recognize_identity_documents(damaged_pdf) @FormRecognizerPreparer() def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): client = get_fr_client() damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_identity_documents( - damaged_pdf - ) + poller = client.begin_recognize_identity_documents(damaged_pdf) @FormRecognizerPreparer() def test_passing_bad_content_type_param_passed(self, **kwargs): @@ -55,10 +51,7 @@ def test_passing_bad_content_type_param_passed(self, **kwargs): with open(self.identity_document_license_jpg, "rb") as fd: my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_identity_documents( - my_file, - content_type="application/jpeg" - ) + poller = client.begin_recognize_identity_documents(my_file, content_type="application/jpeg") @FormRecognizerPreparer() def test_auto_detect_unsupported_stream_content(self, **kwargs): @@ -67,9 +60,7 @@ def test_auto_detect_unsupported_stream_content(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_identity_documents( - my_file - ) + poller = client.begin_recognize_identity_documents(my_file) @skip_flaky_test @FormRecognizerPreparer() @@ -88,9 +79,7 @@ def callback(raw_response, _, headers): my_file = fd.read() poller = client.begin_recognize_identity_documents( - identity_document=my_file, - include_field_elements=True, - cls=callback + identity_document=my_file, include_field_elements=True, cls=callback ) result = poller.result() @@ -105,8 +94,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(id_document.fields, actual, read_results) # check page range - assert id_document.page_range.first_page_number == document_results[0].page_range[0] - assert id_document.page_range.last_page_number == document_results[0].page_range[1] + assert id_document.page_range.first_page_number == document_results[0].page_range[0] + assert id_document.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(id_document.pages, read_results, page_results) @@ -128,12 +117,14 @@ def test_identity_document_jpg_include_field_elements(self): for field in id_document.fields.values(): if field.name == "CountryRegion": - assert field.value == "USA" + assert field.value == "USA" continue elif field.name == "Region": - assert field.value == "Washington" + assert field.value == "Washington" else: - self.assertFieldElementsHasValues(field.value_data.field_elements, id_document.page_range.first_page_number) + self.assertFieldElementsHasValues( + field.value_data.field_elements, id_document.page_range.first_page_number + ) @pytest.mark.live_test_only @skip_flaky_test @@ -157,7 +148,9 @@ def test_identity_document_v2(self, **kwargs): id_document = fd.read() with pytest.raises(ValueError) as e: client.begin_recognize_identity_documents(id_document) - assert "Method 'begin_recognize_identity_documents' is only available for API version V2_1 and up" in str(e.value) + assert "Method 'begin_recognize_identity_documents' is only available for API version V2_1 and up" in str( + e.value + ) @skip_flaky_test @FormRecognizerPreparer() @@ -167,6 +160,6 @@ def test_pages_kwarg_specified(self): with open(self.identity_document_license_jpg, "rb") as fd: id_document = fd.read() poller = client.begin_recognize_identity_documents(id_document, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_async.py index 7d679ea5448e..c515f60f6cd0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_async.py @@ -39,9 +39,7 @@ async def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_identity_documents( - damaged_pdf - ) + poller = await client.begin_recognize_identity_documents(damaged_pdf) @FormRecognizerPreparer() async def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): @@ -49,9 +47,7 @@ async def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_identity_documents( - damaged_pdf - ) + poller = await client.begin_recognize_identity_documents(damaged_pdf) @FormRecognizerPreparer() async def test_passing_bad_content_type_param_passed(self, **kwargs): @@ -60,10 +56,7 @@ async def test_passing_bad_content_type_param_passed(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_identity_documents( - my_file, - content_type="application/jpeg" - ) + poller = await client.begin_recognize_identity_documents(my_file, content_type="application/jpeg") @FormRecognizerPreparer() async def test_auto_detect_unsupported_stream_content(self, **kwargs): @@ -73,9 +66,7 @@ async def test_auto_detect_unsupported_stream_content(self, **kwargs): with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_identity_documents( - my_file - ) + poller = await client.begin_recognize_identity_documents(my_file) @skip_flaky_test @FormRecognizerPreparer() @@ -95,9 +86,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_recognize_identity_documents( - identity_document=my_file, - include_field_elements=True, - cls=callback + identity_document=my_file, include_field_elements=True, cls=callback ) result = await poller.result() @@ -112,8 +101,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(id_document.fields, actual, read_results) # check page range - assert id_document.page_range.first_page_number == document_results[0].page_range[0] - assert id_document.page_range.last_page_number == document_results[0].page_range[1] + assert id_document.page_range.first_page_number == document_results[0].page_range[0] + assert id_document.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(id_document.pages, read_results, page_results) @@ -136,12 +125,14 @@ async def test_identity_document_jpg_include_field_elements(self): for field in id_document.fields.values(): if field.name == "CountryRegion": - assert field.value == "USA" + assert field.value == "USA" continue elif field.name == "Region": - assert field.value == "Washington" + assert field.value == "Washington" else: - self.assertFieldElementsHasValues(field.value_data.field_elements, id_document.page_range.first_page_number) + self.assertFieldElementsHasValues( + field.value_data.field_elements, id_document.page_range.first_page_number + ) @pytest.mark.live_test_only @skip_flaky_test @@ -166,7 +157,9 @@ async def test_identity_document_v2(self, **kwargs): with pytest.raises(ValueError) as e: async with client: await client.begin_recognize_identity_documents(id_document) - assert "Method 'begin_recognize_identity_documents' is only available for API version V2_1 and up" in str(e.value) + assert "Method 'begin_recognize_identity_documents' is only available for API version V2_1 and up" in str( + e.value + ) @skip_flaky_test @FormRecognizerPreparer() @@ -177,6 +170,6 @@ async def test_pages_kwarg_specified(self): id_document = fd.read() async with client: poller = await client.begin_recognize_identity_documents(id_document, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url.py index eaa966f00ad0..973428a3ddfa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url.py @@ -26,14 +26,14 @@ class TestIdDocumentsFromUrl(FormRecognizerTest): @recorded_by_proxy def test_polling_interval(self, **kwargs): client = get_fr_client(polling_interval=7) - assert client._client._config.polling_interval == 7 + assert client._client._config.polling_interval == 7 poller = client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg, polling_interval=6) poller.wait() - assert poller._polling_method._timeout == 6 + assert poller._polling_method._timeout == 6 poller2 = client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg) poller2.wait() - assert poller2._polling_method._timeout == 7 # goes back to client default + assert poller2._polling_method._timeout == 7 # goes back to client default @skip_flaky_test @FormRecognizerPreparer() @@ -49,9 +49,7 @@ def callback(raw_response, _, headers): responses.append(extracted_id_document) poller = client.begin_recognize_identity_documents_from_url( - identity_document_url=self.identity_document_url_jpg, - include_field_elements=True, - cls=callback + identity_document_url=self.identity_document_url_jpg, include_field_elements=True, cls=callback ) result = poller.result() @@ -66,8 +64,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(id_document.fields, actual, read_results) # check page range - assert id_document.page_range.first_page_number == document_results[0].page_range[0] - assert id_document.page_range.last_page_number == document_results[0].page_range[1] + assert id_document.page_range.first_page_number == document_results[0].page_range[0] + assert id_document.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(id_document.pages, read_results, page_results) @@ -77,7 +75,9 @@ def callback(raw_response, _, headers): @recorded_by_proxy def test_identity_document_jpg_include_field_elements(self): client = get_fr_client() - poller = client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg, include_field_elements=True) + poller = client.begin_recognize_identity_documents_from_url( + self.identity_document_url_jpg, include_field_elements=True + ) result = poller.result() assert len(result) == 1 @@ -87,12 +87,14 @@ def test_identity_document_jpg_include_field_elements(self): for field in id_document.fields.values(): if field.name == "CountryRegion": - assert field.value == "USA" + assert field.value == "USA" continue elif field.name == "Region": - assert field.value == "Washington" + assert field.value == "Washington" else: - self.assertFieldElementsHasValues(field.value_data.field_elements, id_document.page_range.first_page_number) + self.assertFieldElementsHasValues( + field.value_data.field_elements, id_document.page_range.first_page_number + ) @pytest.mark.live_test_only @skip_flaky_test @@ -111,7 +113,10 @@ def test_identity_document_v2(self, **kwargs): client = get_fr_client(api_version=FormRecognizerApiVersion.V2_0) with pytest.raises(ValueError) as e: client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg) - assert "Method 'begin_recognize_identity_documents_from_url' is only available for API version V2_1 and up" in str(e.value) + assert ( + "Method 'begin_recognize_identity_documents_from_url' is only available for API version V2_1 and up" + in str(e.value) + ) @skip_flaky_test @FormRecognizerPreparer() @@ -119,6 +124,6 @@ def test_identity_document_v2(self, **kwargs): def test_pages_kwarg_specified(self): client = get_fr_client() poller = client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url_async.py index 48c11cff3a76..7f2ec2a5a718 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_identity_documents_from_url_async.py @@ -26,15 +26,17 @@ class TestIdDocumentsFromUrlAsync(AsyncFormRecognizerTest): @recorded_by_proxy_async async def test_polling_interval(self, **kwargs): client = get_fr_client(polling_interval=7) - assert client._client._config.polling_interval == 7 + assert client._client._config.polling_interval == 7 async with client: - poller = await client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg, polling_interval=6) + poller = await client.begin_recognize_identity_documents_from_url( + self.identity_document_url_jpg, polling_interval=6 + ) await poller.wait() - assert poller._polling_method._timeout == 6 + assert poller._polling_method._timeout == 6 poller2 = await client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg) await poller2.wait() - assert poller2._polling_method._timeout == 7 # goes back to client default + assert poller2._polling_method._timeout == 7 # goes back to client default @skip_flaky_test @FormRecognizerPreparer() @@ -51,9 +53,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_recognize_identity_documents_from_url( - identity_document_url=self.identity_document_url_jpg, - include_field_elements=True, - cls=callback + identity_document_url=self.identity_document_url_jpg, include_field_elements=True, cls=callback ) result = await poller.result() @@ -68,8 +68,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(id_document.fields, actual, read_results) # check page range - assert id_document.page_range.first_page_number == document_results[0].page_range[0] - assert id_document.page_range.last_page_number == document_results[0].page_range[1] + assert id_document.page_range.first_page_number == document_results[0].page_range[0] + assert id_document.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(id_document.pages, read_results, page_results) @@ -80,7 +80,9 @@ def callback(raw_response, _, headers): async def test_identity_document_jpg_include_field_elements(self): client = get_fr_client() async with client: - poller = await client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg, include_field_elements=True) + poller = await client.begin_recognize_identity_documents_from_url( + self.identity_document_url_jpg, include_field_elements=True + ) result = await poller.result() assert len(result) == 1 @@ -90,12 +92,14 @@ async def test_identity_document_jpg_include_field_elements(self): for field in id_document.fields.values(): if field.name == "CountryRegion": - assert field.value == "USA" + assert field.value == "USA" continue elif field.name == "Region": - assert field.value == "Washington" + assert field.value == "Washington" else: - self.assertFieldElementsHasValues(field.value_data.field_elements, id_document.page_range.first_page_number) + self.assertFieldElementsHasValues( + field.value_data.field_elements, id_document.page_range.first_page_number + ) @pytest.mark.live_test_only @skip_flaky_test @@ -116,7 +120,10 @@ async def test_identity_document_v2(self, **kwargs): with pytest.raises(ValueError) as e: async with client: await client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg) - assert "Method 'begin_recognize_identity_documents_from_url' is only available for API version V2_1 and up" in str(e.value) + assert ( + "Method 'begin_recognize_identity_documents_from_url' is only available for API version V2_1 and up" + in str(e.value) + ) @skip_flaky_test @FormRecognizerPreparer() @@ -124,7 +131,9 @@ async def test_identity_document_v2(self, **kwargs): async def test_pages_kwarg_specified(self): client = get_fr_client() async with client: - poller = await client.begin_recognize_identity_documents_from_url(self.identity_document_url_jpg, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + poller = await client.begin_recognize_identity_documents_from_url( + self.identity_document_url_jpg, pages=["1"] + ) + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice.py index 39533c252fe7..bc834962420c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice.py @@ -39,10 +39,7 @@ def test_passing_enum_content_type(self): client = get_fr_client() with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() - poller = client.begin_recognize_invoices( - my_file, - content_type=FormContentType.APPLICATION_PDF - ) + poller = client.begin_recognize_invoices(my_file, content_type=FormContentType.APPLICATION_PDF) result = poller.result() assert result is not None @@ -51,18 +48,14 @@ def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): client = get_fr_client() damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_invoices( - damaged_pdf - ) + poller = client.begin_recognize_invoices(damaged_pdf) @FormRecognizerPreparer() def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): client = get_fr_client() damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_invoices( - damaged_pdf - ) + poller = client.begin_recognize_invoices(damaged_pdf) @FormRecognizerPreparer() def test_passing_bad_content_type_param_passed(self, **kwargs): @@ -70,10 +63,7 @@ def test_passing_bad_content_type_param_passed(self, **kwargs): with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_invoices( - my_file, - content_type="application/jpeg" - ) + poller = client.begin_recognize_invoices(my_file, content_type="application/jpeg") @FormRecognizerPreparer() def test_auto_detect_unsupported_stream_content(self, **kwargs): @@ -82,9 +72,7 @@ def test_auto_detect_unsupported_stream_content(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_invoices( - my_file - ) + poller = client.begin_recognize_invoices(my_file) @skip_flaky_test @FormRecognizerPreparer() @@ -102,11 +90,7 @@ def callback(raw_response, _, headers): with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() - poller = client.begin_recognize_invoices( - invoice=my_file, - include_field_elements=True, - cls=callback - ) + poller = client.begin_recognize_invoices(invoice=my_file, include_field_elements=True, cls=callback) result = poller.result() raw_response = responses[0] @@ -120,8 +104,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(invoice.fields, actual, read_results) # check page range - assert invoice.page_range.first_page_number == document_results[0].page_range[0] - assert invoice.page_range.last_page_number == document_results[0].page_range[1] + assert invoice.page_range.first_page_number == document_results[0].page_range[0] + assert invoice.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(invoice.pages, read_results, page_results) @@ -143,11 +127,7 @@ def callback(raw_response, _, headers): with open(self.multipage_vendor_pdf, "rb") as fd: my_file = fd.read() - poller = client.begin_recognize_invoices( - invoice=my_file, - include_field_elements=True, - cls=callback - ) + poller = client.begin_recognize_invoices(invoice=my_file, include_field_elements=True, cls=callback) result = poller.result() raw_response = responses[0] @@ -156,16 +136,16 @@ def callback(raw_response, _, headers): document_results = raw_response.analyze_result.document_results page_results = raw_response.analyze_result.page_results - assert 1 == len(returned_models) + assert 1 == len(returned_models) returned_model = returned_models[0] - assert 2 == len(returned_model.pages) - assert 1 == returned_model.page_range.first_page_number - assert 2 == returned_model.page_range.last_page_number + assert 2 == len(returned_model.pages) + assert 1 == returned_model.page_range.first_page_number + assert 2 == returned_model.page_range.last_page_number - assert 1 == len(document_results) + assert 1 == len(document_results) document_result = document_results[0] - assert 1 == document_result.page_range[0] # checking first page number - assert 2 == document_result.page_range[1] # checking last page number + assert 1 == document_result.page_range[0] # checking first page number + assert 2 == document_result.page_range[1] # checking last page number for invoice, document_result in zip(returned_models, document_results): self.assertFormFieldsTransformCorrect(invoice.fields, document_result.fields, read_results) @@ -185,15 +165,15 @@ def test_invoice_tiff(self): invoice = result[0] # check dict values - assert invoice.fields.get("VendorName").value == "Contoso" - assert invoice.fields.get("VendorAddress").value, '1 Redmond way Suite 6000 Redmond == WA 99243' - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" - assert invoice.fields.get("CustomerAddress").value, '1020 Enterprise Way Sunnayvale == CA 87659' - assert invoice.fields.get("CustomerName").value == "Microsoft" - assert invoice.fields.get("InvoiceId").value == '34278587' - assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) - assert invoice.fields.get("Items").value[0].value["Amount"].value == 56651.49 - assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) + assert invoice.fields.get("VendorName").value == "Contoso" + assert invoice.fields.get("VendorAddress").value, "1 Redmond way Suite 6000 Redmond == WA 99243" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" + assert invoice.fields.get("CustomerAddress").value, "1020 Enterprise Way Sunnayvale == CA 87659" + assert invoice.fields.get("CustomerName").value == "Microsoft" + assert invoice.fields.get("InvoiceId").value == "34278587" + assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) + assert invoice.fields.get("Items").value[0].value["Amount"].value == 56651.49 + assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) @pytest.mark.live_test_only @skip_flaky_test @@ -208,21 +188,21 @@ def test_invoice_multipage_pdf(self): assert len(result) == 1 invoice = result[0] - assert "prebuilt:invoice" == invoice.form_type - assert 1 == invoice.page_range.first_page_number - assert 2 == invoice.page_range.last_page_number + assert "prebuilt:invoice" == invoice.form_type + assert 1 == invoice.page_range.first_page_number + assert 2 == invoice.page_range.last_page_number vendor_name = invoice.fields["VendorName"] - assert vendor_name.value == 'Southridge Video' - assert vendor_name.value_data.page_number == 2 + assert vendor_name.value == "Southridge Video" + assert vendor_name.value_data.page_number == 2 remittance_address_recipient = invoice.fields["RemittanceAddressRecipient"] - assert remittance_address_recipient.value == "Contoso Ltd." - assert remittance_address_recipient.value_data.page_number == 1 + assert remittance_address_recipient.value == "Contoso Ltd." + assert remittance_address_recipient.value_data.page_number == 1 remittance_address = invoice.fields["RemittanceAddress"] - assert remittance_address.value, '2345 Dogwood Lane Birch == Kansas 98123' - assert remittance_address.value_data.page_number == 1 + assert remittance_address.value, "2345 Dogwood Lane Birch == Kansas 98123" + assert remittance_address.value_data.page_number == 1 @skip_flaky_test @FormRecognizerPreparer() @@ -246,36 +226,36 @@ def test_invoice_jpg_include_field_elements(self): self.assertInvoiceItemsHasValues(invoice.fields["Items"].value, invoice.page_range.first_page_number, True) # check dict values - assert invoice.fields.get("AmountDue").value == 610.0 + assert invoice.fields.get("AmountDue").value == 610.0 assert invoice.fields.get("BillingAddress").value, "123 Bill St, Redmond WA == 98052" - assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" + assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" assert invoice.fields.get("CustomerAddress").value, "123 Other St, Redmond WA == 98052" - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" - assert invoice.fields.get("CustomerId").value == "CID-12345" - assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" - assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) - assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) - assert invoice.fields.get("InvoiceId").value == "INV-100" - assert invoice.fields.get("InvoiceTotal").value == 110.0 - assert invoice.fields.get("PreviousUnpaidBalance").value == 500.0 - assert invoice.fields.get("PurchaseOrder").value == "PO-3333" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" + assert invoice.fields.get("CustomerId").value == "CID-12345" + assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" + assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) + assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) + assert invoice.fields.get("InvoiceId").value == "INV-100" + assert invoice.fields.get("InvoiceTotal").value == 110.0 + assert invoice.fields.get("PreviousUnpaidBalance").value == 500.0 + assert invoice.fields.get("PurchaseOrder").value == "PO-3333" assert invoice.fields.get("RemittanceAddress").value, "123 Remit St New York, NY == 10001" - assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" + assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" assert invoice.fields.get("ServiceAddress").value, "123 Service St, Redmond WA == 98052" - assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" - assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) - assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) + assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" + assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) + assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) assert invoice.fields.get("ShippingAddress").value, "123 Ship St, Redmond WA == 98052" - assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" - assert invoice.fields.get("SubTotal").value == 100.0 - assert invoice.fields.get("TotalTax").value == 10.0 - assert invoice.fields.get("VendorName").value == "CONTOSO LTD." + assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" + assert invoice.fields.get("SubTotal").value == 100.0 + assert invoice.fields.get("TotalTax").value == 10.0 + assert invoice.fields.get("VendorName").value == "CONTOSO LTD." assert invoice.fields.get("VendorAddress").value, "123 456th St New York, NY == 10001" - assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" - assert invoice.fields.get("Items").value[0].value["Amount"].value == 100.0 - assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" - assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 - assert invoice.fields.get("Items").value[0].value["UnitPrice"].value == 1.0 + assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" + assert invoice.fields.get("Items").value[0].value["Amount"].value == 100.0 + assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" + assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 + assert invoice.fields.get("Items").value[0].value["UnitPrice"].value == 1.0 @pytest.mark.live_test_only @skip_flaky_test @@ -309,7 +289,7 @@ def test_invoice_locale_specified(self): with open(self.invoice_tiff, "rb") as fd: invoice = fd.read() poller = client.begin_recognize_invoices(invoice, locale="en-US") - assert 'en-US' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-US" == poller._polling_method._initial_response.http_response.request.query["locale"] result = poller.result() assert result @@ -332,6 +312,6 @@ def test_pages_kwarg_specified(self): invoice = fd.read() poller = client.begin_recognize_invoices(invoice, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_async.py index 5e4536e55b16..471fc3dc4b42 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_async.py @@ -19,7 +19,6 @@ from preparers import FormRecognizerPreparer, get_async_client from conftest import skip_flaky_test - get_fr_client = functools.partial(get_async_client, FormRecognizerClient) @@ -43,10 +42,7 @@ async def test_passing_enum_content_type(self): with open(self.invoice_pdf, "rb") as fd: my_file = fd.read() async with client: - poller = await client.begin_recognize_invoices( - my_file, - content_type=FormContentType.APPLICATION_PDF - ) + poller = await client.begin_recognize_invoices(my_file, content_type=FormContentType.APPLICATION_PDF) result = await poller.result() assert result is not None @@ -56,9 +52,7 @@ async def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_invoices( - damaged_pdf - ) + poller = await client.begin_recognize_invoices(damaged_pdf) @FormRecognizerPreparer() async def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): @@ -66,9 +60,7 @@ async def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_invoices( - damaged_pdf - ) + poller = await client.begin_recognize_invoices(damaged_pdf) @FormRecognizerPreparer() async def test_passing_bad_content_type_param_passed(self, **kwargs): @@ -77,10 +69,7 @@ async def test_passing_bad_content_type_param_passed(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_invoices( - my_file, - content_type="application/jpeg" - ) + poller = await client.begin_recognize_invoices(my_file, content_type="application/jpeg") @FormRecognizerPreparer() async def test_auto_detect_unsupported_stream_content(self, **kwargs): @@ -90,9 +79,7 @@ async def test_auto_detect_unsupported_stream_content(self, **kwargs): with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_invoices( - my_file - ) + poller = await client.begin_recognize_invoices(my_file) @skip_flaky_test @FormRecognizerPreparer() @@ -111,11 +98,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_recognize_invoices( - invoice=my_file, - include_field_elements=True, - cls=callback - ) + poller = await client.begin_recognize_invoices(invoice=my_file, include_field_elements=True, cls=callback) result = await poller.result() raw_response = responses[0] @@ -129,8 +112,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(invoice.fields, actual, read_results) # check page range - assert invoice.page_range.first_page_number == document_results[0].page_range[0] - assert invoice.page_range.last_page_number == document_results[0].page_range[1] + assert invoice.page_range.first_page_number == document_results[0].page_range[0] + assert invoice.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(invoice.pages, read_results, page_results) @@ -153,11 +136,7 @@ def callback(raw_response, _, headers): my_file = fd.read() async with client: - poller = await client.begin_recognize_invoices( - invoice=my_file, - include_field_elements=True, - cls=callback - ) + poller = await client.begin_recognize_invoices(invoice=my_file, include_field_elements=True, cls=callback) result = await poller.result() raw_response = responses[0] @@ -166,16 +145,16 @@ def callback(raw_response, _, headers): document_results = raw_response.analyze_result.document_results page_results = raw_response.analyze_result.page_results - assert 1 == len(returned_models) + assert 1 == len(returned_models) returned_model = returned_models[0] - assert 2 == len(returned_model.pages) - assert 1 == returned_model.page_range.first_page_number - assert 2 == returned_model.page_range.last_page_number + assert 2 == len(returned_model.pages) + assert 1 == returned_model.page_range.first_page_number + assert 2 == returned_model.page_range.last_page_number - assert 1 == len(document_results) + assert 1 == len(document_results) document_result = document_results[0] - assert 1 == document_result.page_range[0] # checking first page number - assert 2 == document_result.page_range[1] # checking last page number + assert 1 == document_result.page_range[0] # checking first page number + assert 2 == document_result.page_range[1] # checking last page number for invoice, document_result in zip(returned_models, document_results): self.assertFormFieldsTransformCorrect(invoice.fields, document_result.fields, read_results) @@ -197,15 +176,15 @@ async def test_invoice_tiff(self): invoice = result[0] # check dict values - assert invoice.fields.get("VendorName").value == "Contoso" - assert invoice.fields.get("VendorAddress").value, '1 Redmond way Suite 6000 Redmond == WA 99243' - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" - assert invoice.fields.get("CustomerAddress").value, '1020 Enterprise Way Sunnayvale == CA 87659' - assert invoice.fields.get("CustomerName").value == "Microsoft" - assert invoice.fields.get("InvoiceId").value == '34278587' - assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) - assert invoice.fields.get("Items").value[0].value["Amount"].value == 56651.49 - assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) + assert invoice.fields.get("VendorName").value == "Contoso" + assert invoice.fields.get("VendorAddress").value, "1 Redmond way Suite 6000 Redmond == WA 99243" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft" + assert invoice.fields.get("CustomerAddress").value, "1020 Enterprise Way Sunnayvale == CA 87659" + assert invoice.fields.get("CustomerName").value == "Microsoft" + assert invoice.fields.get("InvoiceId").value == "34278587" + assert invoice.fields.get("InvoiceDate").value, date(2017, 6 == 18) + assert invoice.fields.get("Items").value[0].value["Amount"].value == 56651.49 + assert invoice.fields.get("DueDate").value, date(2017, 6 == 24) @pytest.mark.live_test_only @skip_flaky_test @@ -222,21 +201,21 @@ async def test_invoice_multipage_pdf(self): assert len(result) == 1 invoice = result[0] - assert "prebuilt:invoice" == invoice.form_type - assert 1 == invoice.page_range.first_page_number - assert 2 == invoice.page_range.last_page_number + assert "prebuilt:invoice" == invoice.form_type + assert 1 == invoice.page_range.first_page_number + assert 2 == invoice.page_range.last_page_number vendor_name = invoice.fields["VendorName"] - assert vendor_name.value == 'Southridge Video' - assert vendor_name.value_data.page_number == 2 + assert vendor_name.value == "Southridge Video" + assert vendor_name.value_data.page_number == 2 remittance_address_recipient = invoice.fields["RemittanceAddressRecipient"] - assert remittance_address_recipient.value == "Contoso Ltd." - assert remittance_address_recipient.value_data.page_number == 1 + assert remittance_address_recipient.value == "Contoso Ltd." + assert remittance_address_recipient.value_data.page_number == 1 remittance_address = invoice.fields["RemittanceAddress"] - assert remittance_address.value, '2345 Dogwood Lane Birch == Kansas 98123' - assert remittance_address.value_data.page_number == 1 + assert remittance_address.value, "2345 Dogwood Lane Birch == Kansas 98123" + assert remittance_address.value_data.page_number == 1 @skip_flaky_test @FormRecognizerPreparer() @@ -261,36 +240,36 @@ async def test_invoice_jpg_include_field_elements(self): self.assertFieldElementsHasValues(field.value_data.field_elements, invoice.page_range.first_page_number) self.assertInvoiceItemsHasValues(invoice.fields["Items"].value, invoice.page_range.first_page_number, True) - assert invoice.fields.get("AmountDue").value == 610.0 + assert invoice.fields.get("AmountDue").value == 610.0 assert invoice.fields.get("BillingAddress").value, "123 Bill St, Redmond WA == 98052" - assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" + assert invoice.fields.get("BillingAddressRecipient").value == "Microsoft Finance" assert invoice.fields.get("CustomerAddress").value, "123 Other St, Redmond WA == 98052" - assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" - assert invoice.fields.get("CustomerId").value == "CID-12345" - assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" - assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) - assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) - assert invoice.fields.get("InvoiceId").value == "INV-100" - assert invoice.fields.get("InvoiceTotal").value == 110.0 - assert invoice.fields.get("PreviousUnpaidBalance").value == 500.0 - assert invoice.fields.get("PurchaseOrder").value == "PO-3333" + assert invoice.fields.get("CustomerAddressRecipient").value == "Microsoft Corp" + assert invoice.fields.get("CustomerId").value == "CID-12345" + assert invoice.fields.get("CustomerName").value == "MICROSOFT CORPORATION" + assert invoice.fields.get("DueDate").value, date(2019, 12 == 15) + assert invoice.fields.get("InvoiceDate").value, date(2019, 11 == 15) + assert invoice.fields.get("InvoiceId").value == "INV-100" + assert invoice.fields.get("InvoiceTotal").value == 110.0 + assert invoice.fields.get("PreviousUnpaidBalance").value == 500.0 + assert invoice.fields.get("PurchaseOrder").value == "PO-3333" assert invoice.fields.get("RemittanceAddress").value, "123 Remit St New York, NY == 10001" - assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" + assert invoice.fields.get("RemittanceAddressRecipient").value == "Contoso Billing" assert invoice.fields.get("ServiceAddress").value, "123 Service St, Redmond WA == 98052" - assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" - assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) - assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) + assert invoice.fields.get("ServiceAddressRecipient").value == "Microsoft Services" + assert invoice.fields.get("ServiceEndDate").value, date(2019, 11 == 14) + assert invoice.fields.get("ServiceStartDate").value, date(2019, 10 == 14) assert invoice.fields.get("ShippingAddress").value, "123 Ship St, Redmond WA == 98052" - assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" - assert invoice.fields.get("SubTotal").value == 100.0 - assert invoice.fields.get("TotalTax").value == 10.0 - assert invoice.fields.get("VendorName").value == "CONTOSO LTD." + assert invoice.fields.get("ShippingAddressRecipient").value == "Microsoft Delivery" + assert invoice.fields.get("SubTotal").value == 100.0 + assert invoice.fields.get("TotalTax").value == 10.0 + assert invoice.fields.get("VendorName").value == "CONTOSO LTD." assert invoice.fields.get("VendorAddress").value, "123 456th St New York, NY == 10001" - assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" - assert invoice.fields.get("Items").value[0].value["Amount"].value == 100.0 - assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" - assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 - assert invoice.fields.get("Items").value[0].value["UnitPrice"].value == 1.0 + assert invoice.fields.get("VendorAddressRecipient").value == "Contoso Headquarters" + assert invoice.fields.get("Items").value[0].value["Amount"].value == 100.0 + assert invoice.fields.get("Items").value[0].value["Description"].value == "Consulting service" + assert invoice.fields.get("Items").value[0].value["Quantity"].value == 1.0 + assert invoice.fields.get("Items").value[0].value["UnitPrice"].value == 1.0 @pytest.mark.live_test_only @skip_flaky_test @@ -326,7 +305,7 @@ async def test_invoice_locale_specified(self): invoice = fd.read() async with client: poller = await client.begin_recognize_invoices(invoice, locale="en-US") - assert 'en-US' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-US" == poller._polling_method._initial_response.http_response.request.query["locale"] result = await poller.result() assert result @@ -350,6 +329,6 @@ async def test_pages_kwarg_specified(self): invoice = fd.read() async with client: poller = await client.begin_recognize_invoices(invoice, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url.py index 88a975036443..95f0226cb107 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url.py @@ -26,14 +26,14 @@ class TestInvoiceFromUrl(FormRecognizerTest): @recorded_by_proxy def test_polling_interval(self, **kwargs): client = get_fr_client(polling_interval=7) - assert client._client._config.polling_interval == 7 + assert client._client._config.polling_interval == 7 poller = client.begin_recognize_invoices_from_url(self.invoice_url_pdf, polling_interval=6) poller.wait() - assert poller._polling_method._timeout == 6 + assert poller._polling_method._timeout == 6 poller2 = client.begin_recognize_invoices_from_url(self.invoice_url_pdf) poller2.wait() - assert poller2._polling_method._timeout == 7 # goes back to client default + assert poller2._polling_method._timeout == 7 # goes back to client default @FormRecognizerPreparer() @recorded_by_proxy @@ -56,9 +56,7 @@ def callback(raw_response, _, headers): responses.append(extracted_invoice) poller = client.begin_recognize_invoices_from_url( - invoice_url=self.multipage_vendor_url_pdf, - include_field_elements=True, - cls=callback + invoice_url=self.multipage_vendor_url_pdf, include_field_elements=True, cls=callback ) result = poller.result() @@ -68,16 +66,16 @@ def callback(raw_response, _, headers): document_results = raw_response.analyze_result.document_results page_results = raw_response.analyze_result.page_results - assert 1 == len(returned_models) + assert 1 == len(returned_models) returned_model = returned_models[0] - assert 2 == len(returned_model.pages) - assert 1 == returned_model.page_range.first_page_number - assert 2 == returned_model.page_range.last_page_number + assert 2 == len(returned_model.pages) + assert 1 == returned_model.page_range.first_page_number + assert 2 == returned_model.page_range.last_page_number - assert 1 == len(document_results) + assert 1 == len(document_results) document_result = document_results[0] - assert 1 == document_result.page_range[0] # checking first page number - assert 2 == document_result.page_range[1] # checking last page number + assert 1 == document_result.page_range[0] # checking first page number + assert 2 == document_result.page_range[1] # checking last page number for invoice, document_result in zip(returned_models, document_results): self.assertFormFieldsTransformCorrect(invoice.fields, document_result.fields, read_results) @@ -101,7 +99,9 @@ def test_invoice_v2(self, **kwargs): client = get_fr_client(api_version=FormRecognizerApiVersion.V2_0) with pytest.raises(ValueError) as e: client.begin_recognize_invoices_from_url(self.invoice_url_tiff) - assert "Method 'begin_recognize_invoices_from_url' is only available for API version V2_1 and up" in str(e.value) + assert "Method 'begin_recognize_invoices_from_url' is only available for API version V2_1 and up" in str( + e.value + ) @skip_flaky_test @FormRecognizerPreparer() @@ -109,7 +109,7 @@ def test_invoice_v2(self, **kwargs): def test_invoice_locale_specified(self): client = get_fr_client() poller = client.begin_recognize_invoices_from_url(self.invoice_url_pdf, locale="en-US") - assert 'en-US' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-US" == poller._polling_method._initial_response.http_response.request.query["locale"] result = poller.result() assert result @@ -127,7 +127,7 @@ def test_invoice_locale_error(self): def test_pages_kwarg_specified(self): client = get_fr_client() poller = client.begin_recognize_invoices_from_url(self.invoice_url_pdf, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = poller.result() assert result @@ -135,7 +135,7 @@ def test_pages_kwarg_specified(self): @FormRecognizerPreparer() @recorded_by_proxy def test_invoice_no_sub_line_items(self): - client = get_fr_client() + client = get_fr_client() poller = client.begin_recognize_invoices_from_url( invoice_url=self.invoice_no_sub_line_item, ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url_async.py index 7e41f4075a56..eaa18bdd490e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_invoice_from_url_async.py @@ -17,7 +17,6 @@ from preparers import FormRecognizerPreparer, get_async_client from conftest import skip_flaky_test - get_fr_client = functools.partial(get_async_client, FormRecognizerClient) @@ -28,15 +27,15 @@ class TestInvoiceFromUrlAsync(AsyncFormRecognizerTest): @recorded_by_proxy_async async def test_polling_interval(self, **kwargs): client = get_fr_client(polling_interval=7) - assert client._client._config.polling_interval == 7 + assert client._client._config.polling_interval == 7 async with client: poller = await client.begin_recognize_invoices_from_url(self.invoice_url_pdf, polling_interval=6) await poller.wait() - assert poller._polling_method._timeout == 6 + assert poller._polling_method._timeout == 6 poller2 = await client.begin_recognize_invoices_from_url(self.invoice_url_pdf) await poller2.wait() - assert poller2._polling_method._timeout == 7 # goes back to client default + assert poller2._polling_method._timeout == 7 # goes back to client default @FormRecognizerPreparer() @recorded_by_proxy_async @@ -61,9 +60,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_recognize_invoices_from_url( - invoice_url=self.multipage_vendor_url_pdf, - include_field_elements=True, - cls=callback + invoice_url=self.multipage_vendor_url_pdf, include_field_elements=True, cls=callback ) result = await poller.result() @@ -73,16 +70,16 @@ def callback(raw_response, _, headers): document_results = raw_response.analyze_result.document_results page_results = raw_response.analyze_result.page_results - assert 1 == len(returned_models) + assert 1 == len(returned_models) returned_model = returned_models[0] - assert 2 == len(returned_model.pages) - assert 1 == returned_model.page_range.first_page_number - assert 2 == returned_model.page_range.last_page_number + assert 2 == len(returned_model.pages) + assert 1 == returned_model.page_range.first_page_number + assert 2 == returned_model.page_range.last_page_number - assert 1 == len(document_results) + assert 1 == len(document_results) document_result = document_results[0] - assert 1 == document_result.page_range[0] # checking first page number - assert 2 == document_result.page_range[1] # checking last page number + assert 1 == document_result.page_range[0] # checking first page number + assert 2 == document_result.page_range[1] # checking last page number for invoice, document_result in zip(returned_models, document_results): self.assertFormFieldsTransformCorrect(invoice.fields, document_result.fields, read_results) @@ -108,7 +105,9 @@ async def test_invoice_v2(self, **kwargs): with pytest.raises(ValueError) as e: async with client: await client.begin_recognize_invoices_from_url(self.invoice_url_tiff) - assert "Method 'begin_recognize_invoices_from_url' is only available for API version V2_1 and up" in str(e.value) + assert "Method 'begin_recognize_invoices_from_url' is only available for API version V2_1 and up" in str( + e.value + ) @skip_flaky_test @FormRecognizerPreparer() @@ -117,7 +116,7 @@ async def test_invoice_locale_specified(self): client = get_fr_client() async with client: poller = await client.begin_recognize_invoices_from_url(self.invoice_url_pdf, locale="en-US") - assert 'en-US' == poller._polling_method._initial_response.http_response.request.query['locale'] + assert "en-US" == poller._polling_method._initial_response.http_response.request.query["locale"] result = await poller.result() assert result @@ -137,6 +136,6 @@ async def test_pages_kwarg_specified(self): client = get_fr_client() async with client: poller = await client.begin_recognize_invoices_from_url(self.invoice_url_pdf, pages=["1"]) - assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + assert "1" == poller._polling_method._initial_response.http_response.request.query["pages"] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt.py index 613c124cff85..e8d05161574f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt.py @@ -16,6 +16,7 @@ get_fr_client = functools.partial(get_sync_client, FormRecognizerClient) + class TestReceiptFromStream(FormRecognizerTest): @pytest.mark.live_test_only @@ -26,10 +27,7 @@ def test_passing_enum_content_type_v2(self): client = get_fr_client() with open(self.receipt_png, "rb") as fd: my_file = fd.read() - poller = client.begin_recognize_receipts( - my_file, - content_type=FormContentType.IMAGE_PNG - ) + poller = client.begin_recognize_receipts(my_file, content_type=FormContentType.IMAGE_PNG) result = poller.result() assert result is not None @@ -38,9 +36,7 @@ def test_damaged_file_bytes_fails_autodetect_content_type(self, **kwargs): client = get_fr_client() damaged_pdf = b"\x50\x44\x46\x55\x55\x55" # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_receipts( - damaged_pdf - ) + poller = client.begin_recognize_receipts(damaged_pdf) @FormRecognizerPreparer() # TODO should there be a v3 version of this test? @@ -48,9 +44,7 @@ def test_damaged_file_bytes_io_fails_autodetect(self, **kwargs): client = get_fr_client() damaged_pdf = BytesIO(b"\x50\x44\x46\x55\x55\x55") # doesn't match any magic file numbers with pytest.raises(ValueError): - poller = client.begin_recognize_receipts( - damaged_pdf - ) + poller = client.begin_recognize_receipts(damaged_pdf) @FormRecognizerPreparer() def test_passing_bad_content_type_param_passed(self, **kwargs): @@ -58,19 +52,13 @@ def test_passing_bad_content_type_param_passed(self, **kwargs): with open(self.receipt_jpg, "rb") as fd: my_file = fd.read() with pytest.raises(ValueError): - poller = client.begin_recognize_receipts( - my_file, - content_type="application/jpeg" - ) + poller = client.begin_recognize_receipts(my_file, content_type="application/jpeg") @FormRecognizerPreparer() def test_passing_unsupported_url_content_type(self, **kwargs): client = get_fr_client() with pytest.raises(TypeError): - poller = client.begin_recognize_receipts( - "https://badurl.jpg", - content_type="application/json" - ) + poller = client.begin_recognize_receipts("https://badurl.jpg", content_type="application/json") @skip_flaky_test @FormRecognizerPreparer() @@ -88,24 +76,26 @@ def test_receipt_jpg_include_field_elements(self): self.assertFormPagesHasValues(receipt.pages) for name, field in receipt.fields.items(): - if field.value_type not in ["list", "dictionary"] and name != "ReceiptType": # receipt cases where value_data is None + if ( + field.value_type not in ["list", "dictionary"] and name != "ReceiptType" + ): # receipt cases where value_data is None self.assertFieldElementsHasValues(field.value_data.field_elements, receipt.page_range.first_page_number) - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("Tax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("Tax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) - assert receipt.page_range.first_page_number == 1 - assert receipt.page_range.last_page_number == 1 + assert receipt.page_range.first_page_number == 1 + assert receipt.page_range.last_page_number == 1 self.assertFormPagesHasValues(receipt.pages) receipt_type = receipt.fields.get("ReceiptType") assert receipt_type.confidence is not None - assert receipt_type.value == 'Itemized' + assert receipt_type.value == "Itemized" @FormRecognizerPreparer() def test_receipt_locale_v2(self, **kwargs): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_async.py index d71b8fe4b7b2..04c1bfe75db8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_async.py @@ -16,9 +16,9 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_fr_client = functools.partial(get_async_client, FormRecognizerClient) + class TestReceiptFromStreamAsync(AsyncFormRecognizerTest): @pytest.mark.live_test_only @@ -30,10 +30,7 @@ async def test_passing_enum_content_type(self): with open(self.receipt_png, "rb") as fd: my_file = fd.read() async with client: - poller = await client.begin_recognize_receipts( - my_file, - content_type=FormContentType.IMAGE_PNG - ) + poller = await client.begin_recognize_receipts(my_file, content_type=FormContentType.IMAGE_PNG) result = await poller.result() assert result is not None @@ -66,10 +63,7 @@ async def test_passing_bad_content_type_param_passed(self, **kwargs): my_file = fd.read() with pytest.raises(ValueError): async with client: - poller = await client.begin_recognize_receipts( - my_file, - content_type="application/jpeg" - ) + poller = await client.begin_recognize_receipts(my_file, content_type="application/jpeg") result = await poller.result() @skip_flaky_test @@ -89,24 +83,26 @@ async def test_receipt_jpg_include_field_elements(self): self.assertFormPagesHasValues(receipt.pages) for name, field in receipt.fields.items(): - if field.value_type not in ["list", "dictionary"] and name != "ReceiptType": # receipt cases where value_data is None + if ( + field.value_type not in ["list", "dictionary"] and name != "ReceiptType" + ): # receipt cases where value_data is None self.assertFieldElementsHasValues(field.value_data.field_elements, receipt.page_range.first_page_number) - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("Tax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 - assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) - assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) - assert receipt.page_range.first_page_number == 1 - assert receipt.page_range.last_page_number == 1 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("Tax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) + assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) + assert receipt.page_range.first_page_number == 1 + assert receipt.page_range.last_page_number == 1 self.assertFormPagesHasValues(receipt.pages) receipt_type = receipt.fields.get("ReceiptType") assert receipt_type.confidence is not None - assert receipt_type.value == 'Itemized' + assert receipt_type.value == "Itemized" @FormRecognizerPreparer() async def test_receipt_locale_v2(self, **kwargs): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url.py index 1b3cb7031162..b7487413d0d5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url.py @@ -17,13 +17,14 @@ get_fr_client = functools.partial(get_sync_client, FormRecognizerClient) + class TestReceiptFromUrl(FormRecognizerTest): @skip_flaky_test @FormRecognizerPreparer() @recorded_by_proxy def test_receipt_url_transform_png(self): - client = get_fr_client() + client = get_fr_client() responses = [] def callback(raw_response, _, headers): @@ -33,9 +34,7 @@ def callback(raw_response, _, headers): responses.append(extracted_receipt) poller = client.begin_recognize_receipts_from_url( - receipt_url=self.receipt_url_png, - include_field_elements=True, - cls=callback + receipt_url=self.receipt_url_png, include_field_elements=True, cls=callback ) result = poller.result() @@ -50,8 +49,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(receipt.fields, actual, read_results) # check page range - assert receipt.page_range.first_page_number == document_results[0].page_range[0] - assert receipt.page_range.last_page_number == document_results[0].page_range[1] + assert receipt.page_range.first_page_number == document_results[0].page_range[0] + assert receipt.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(receipt.pages, read_results) @@ -60,11 +59,8 @@ def callback(raw_response, _, headers): @FormRecognizerPreparer() @recorded_by_proxy def test_receipt_url_include_field_elements(self): - client = get_fr_client() - poller = client.begin_recognize_receipts_from_url( - self.receipt_url_jpg, - include_field_elements=True - ) + client = get_fr_client() + poller = client.begin_recognize_receipts_from_url(self.receipt_url_jpg, include_field_elements=True) result = poller.result() assert len(result) == 1 @@ -73,23 +69,25 @@ def test_receipt_url_include_field_elements(self): self.assertFormPagesHasValues(receipt.pages) for name, field in receipt.fields.items(): - if field.value_type not in ["list", "dictionary"] and name != "ReceiptType": # receipt cases where value_data is None + if ( + field.value_type not in ["list", "dictionary"] and name != "ReceiptType" + ): # receipt cases where value_data is None self.assertFieldElementsHasValues(field.value_data.field_elements, receipt.page_range.first_page_number) - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("Tax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("Tax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) - assert receipt.page_range.first_page_number == 1 - assert receipt.page_range.last_page_number == 1 + assert receipt.page_range.first_page_number == 1 + assert receipt.page_range.last_page_number == 1 receipt_type = receipt.fields.get("ReceiptType") assert receipt_type.confidence is not None - assert receipt_type.value == 'Itemized' + assert receipt_type.value == "Itemized" self.assertReceiptItemsHasValues(receipt.fields["Items"].value, receipt.page_range.first_page_number, True) @FormRecognizerPreparer() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url_async.py index d04cd387dca2..0bf6bf14e6cf 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_receipt_from_url_async.py @@ -18,6 +18,7 @@ get_fr_client = functools.partial(get_async_client, FormRecognizerClient) + class TestReceiptFromUrlAsync(AsyncFormRecognizerTest): @skip_flaky_test @@ -35,9 +36,7 @@ def callback(raw_response, _, headers): async with client: poller = await client.begin_recognize_receipts_from_url( - self.receipt_url_png, - include_field_elements=True, - cls=callback + self.receipt_url_png, include_field_elements=True, cls=callback ) result = await poller.result() @@ -52,8 +51,8 @@ def callback(raw_response, _, headers): self.assertFormFieldsTransformCorrect(receipt.fields, actual, read_results) # check page range - assert receipt.page_range.first_page_number == document_results[0].page_range[0] - assert receipt.page_range.last_page_number == document_results[0].page_range[1] + assert receipt.page_range.first_page_number == document_results[0].page_range[0] + assert receipt.page_range.last_page_number == document_results[0].page_range[1] # Check page metadata self.assertFormPagesTransformCorrect(receipt.pages, read_results) @@ -62,12 +61,9 @@ def callback(raw_response, _, headers): @FormRecognizerPreparer() @recorded_by_proxy_async async def test_receipt_url_include_field_elements(self): - client = get_fr_client() + client = get_fr_client() async with client: - poller = await client.begin_recognize_receipts_from_url( - self.receipt_url_jpg, - include_field_elements=True - ) + poller = await client.begin_recognize_receipts_from_url(self.receipt_url_jpg, include_field_elements=True) result = await poller.result() assert len(result) == 1 @@ -76,23 +72,25 @@ async def test_receipt_url_include_field_elements(self): self.assertFormPagesHasValues(receipt.pages) for name, field in receipt.fields.items(): - if field.value_type not in ["list", "dictionary"] and name != "ReceiptType": # receipt cases where value_data is None + if ( + field.value_type not in ["list", "dictionary"] and name != "ReceiptType" + ): # receipt cases where value_data is None self.assertFieldElementsHasValues(field.value_data.field_elements, receipt.page_range.first_page_number) - - assert receipt.fields.get("MerchantAddress").value, '123 Main Street Redmond == WA 98052' - assert receipt.fields.get("MerchantName").value == 'Contoso' - assert receipt.fields.get("MerchantPhoneNumber").value == '+19876543210' - assert receipt.fields.get("Subtotal").value == 11.7 - assert receipt.fields.get("Tax").value == 1.17 - assert receipt.fields.get("Tip").value == 1.63 - assert receipt.fields.get("Total").value == 14.5 + + assert receipt.fields.get("MerchantAddress").value, "123 Main Street Redmond == WA 98052" + assert receipt.fields.get("MerchantName").value == "Contoso" + assert receipt.fields.get("MerchantPhoneNumber").value == "+19876543210" + assert receipt.fields.get("Subtotal").value == 11.7 + assert receipt.fields.get("Tax").value == 1.17 + assert receipt.fields.get("Tip").value == 1.63 + assert receipt.fields.get("Total").value == 14.5 assert receipt.fields.get("TransactionDate").value == date(year=2019, month=6, day=10) - assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) - assert receipt.page_range.first_page_number == 1 - assert receipt.page_range.last_page_number == 1 + assert receipt.fields.get("TransactionTime").value == time(hour=13, minute=59, second=0) + assert receipt.page_range.first_page_number == 1 + assert receipt.page_range.last_page_number == 1 receipt_type = receipt.fields.get("ReceiptType") assert receipt_type.confidence is not None - assert receipt_type.value == 'Itemized' + assert receipt_type.value == "Itemized" self.assertReceiptItemsHasValues(receipt.fields["Items"].value, receipt.page_range.first_page_number, True) @FormRecognizerPreparer() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model.py index bd6237c1402f..6a283883fabf 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model.py @@ -13,7 +13,6 @@ from preparers import FormRecognizerPreparer, get_sync_client from conftest import skip_flaky_test - get_ft_client = functools.partial(get_sync_client, FormTrainingClient) @@ -23,14 +22,18 @@ class TestTraining(FormRecognizerTest): @FormRecognizerPreparer() @recorded_by_proxy def test_compose_model_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): - client = get_ft_client(api_version="2.1") + client = get_ft_client(api_version="2.1") poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True) model_1 = poller.result() - poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="second-labeled-model") + poller = client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="second-labeled-model" + ) model_2 = poller.result() - poller = client.begin_create_composed_model([model_1.model_id, model_2.model_id], model_name="my composed model") + poller = client.begin_create_composed_model( + [model_1.model_id, model_2.model_id], model_name="my composed model" + ) composed_model = poller.result() @@ -59,6 +62,10 @@ def test_compose_model_invalid_unlabeled_models_v21(self, formrecognizer_storage def test_compose_model_bad_api_version(self, **kwargs): client = get_ft_client(api_version="2.0") with pytest.raises(ValueError) as excinfo: - poller = client.begin_create_composed_model(["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"]) + poller = client.begin_create_composed_model( + ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"] + ) result = poller.result() - assert "Method 'begin_create_composed_model' is only available for API version V2_1 and up" in str(excinfo.value) + assert "Method 'begin_create_composed_model' is only available for API version V2_1 and up" in str( + excinfo.value + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model_async.py index a1f56ccbefdd..1109c91ffb75 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_compose_model_async.py @@ -14,7 +14,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_ft_client = functools.partial(get_async_client, FormTrainingClient) @@ -29,10 +28,14 @@ async def test_compose_model_v21(self, formrecognizer_storage_container_sas_url_ poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True) model_1 = await poller.result() - poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="second-labeled-model") + poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="second-labeled-model" + ) model_2 = await poller.result() - poller = await client.begin_create_composed_model([model_1.model_id, model_2.model_id], model_name="my composed model") + poller = await client.begin_create_composed_model( + [model_1.model_id, model_2.model_id], model_name="my composed model" + ) composed_model = await poller.result() @@ -43,7 +46,9 @@ async def test_compose_model_v21(self, formrecognizer_storage_container_sas_url_ @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_compose_model_invalid_unlabeled_models_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): + async def test_compose_model_invalid_unlabeled_models_v21( + self, formrecognizer_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) @@ -63,6 +68,10 @@ async def test_compose_model_bad_api_version(self, **kwargs): client = get_ft_client(api_version="2.0") async with client: with pytest.raises(ValueError) as excinfo: - poller = await client.begin_create_composed_model(["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"]) + poller = await client.begin_create_composed_model( + ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"] + ) result = await poller.result() - assert "Method 'begin_create_composed_model' is only available for API version V2_1 and up" in str(excinfo.value) + assert "Method 'begin_create_composed_model' is only available for API version V2_1 and up" in str( + excinfo.value + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model.py index dcb89d6ad42e..1c20b1217de4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model.py @@ -22,12 +22,16 @@ class TestCopyModel(FormRecognizerTest): @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_copy_model_successful_v2(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): - client = get_ft_client(api_version="2.0") + def test_copy_model_successful_v2( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): + client = get_ft_client(api_version="2.0") poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = poller.result() - target = client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = client.begin_copy_model(model.model_id, target=target) copy = poller.result() @@ -44,19 +48,25 @@ def test_copy_model_successful_v2(self, formrecognizer_storage_container_sas_url @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_copy_model_with_labeled_model_name_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + def test_copy_model_with_labeled_model_name_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") - poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="mymodel") + poller = client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="mymodel" + ) model = poller.result() - target = client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = client.begin_copy_model(model.model_id, target=target) copy = poller.result() copied_model = client.get_custom_model(copy.model_id) - assert copy.status =="ready" + assert copy.status == "ready" assert copy.training_started_on assert copy.training_completed_on assert target["modelId"] == copy.model_id @@ -67,12 +77,18 @@ def test_copy_model_with_labeled_model_name_v21(self, formrecognizer_storage_con @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_copy_model_with_unlabeled_model_name_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + def test_copy_model_with_unlabeled_model_name_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") - poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, model_name="mymodel") + poller = client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=False, model_name="mymodel" + ) model = poller.result() - target = client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = client.begin_copy_model(model.model_id, target=target) copy = poller.result() @@ -90,7 +106,9 @@ def test_copy_model_with_unlabeled_model_name_v21(self, formrecognizer_storage_c @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_copy_model_fail_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + def test_copy_model_fail_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = poller.result() @@ -107,13 +125,17 @@ def test_copy_model_fail_v21(self, formrecognizer_storage_container_sas_url_v2, @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_copy_model_case_insensitive_region_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + def test_copy_model_case_insensitive_region_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = poller.result() # give region all uppercase - target = client.get_copy_authorization(resource_region=formrecognizer_region.upper(), resource_id=formrecognizer_resource_id) + target = client.get_copy_authorization( + resource_region=formrecognizer_region.upper(), resource_id=formrecognizer_resource_id + ) poller = client.begin_copy_model(model.model_id, target=target) copy = poller.result() @@ -153,18 +175,28 @@ def test_copy_authorization_v21(self, formrecognizer_region, formrecognizer_reso @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_copy_model_with_composed_model_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + def test_copy_model_with_composed_model_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") - poller_1 = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model1") + poller_1 = client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model1" + ) model_1 = poller_1.result() - poller_2 = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model2") + poller_2 = client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model2" + ) model_2 = poller_2.result() - composed_poller = client.begin_create_composed_model([model_1.model_id, model_2.model_id], model_name="composedmodel") + composed_poller = client.begin_create_composed_model( + [model_1.model_id, model_2.model_id], model_name="composedmodel" + ) composed_model = composed_poller.result() - target = client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = client.begin_copy_model(composed_model.model_id, target=target) copy = poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model_async.py index 1cee9bf2cba5..adc889b9e2c2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_copy_model_async.py @@ -14,7 +14,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_ft_client = functools.partial(get_async_client, FormTrainingClient) @@ -23,13 +22,17 @@ class TestCopyModelAsync(AsyncFormRecognizerTest): @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_copy_model_successful_v2(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + async def test_copy_model_successful_v2( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.0") async with client: poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = await poller.result() - target = await client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = await client.begin_copy_model(model.model_id, target=target) copy = await poller.result() @@ -46,20 +49,26 @@ async def test_copy_model_successful_v2(self, formrecognizer_storage_container_s @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_copy_model_with_labeled_model_name_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + async def test_copy_model_with_labeled_model_name_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="mymodel") + poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="mymodel" + ) model = await poller.result() - target = await client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = await client.begin_copy_model(model.model_id, target=target) copy = await poller.result() copied_model = await client.get_custom_model(copy.model_id) - assert copy.status =="ready" + assert copy.status == "ready" assert copy.training_started_on assert copy.training_completed_on assert target["modelId"] == copy.model_id @@ -70,13 +79,19 @@ async def test_copy_model_with_labeled_model_name_v21(self, formrecognizer_stora @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_copy_model_with_unlabeled_model_name_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + async def test_copy_model_with_unlabeled_model_name_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, model_name="mymodel") + poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=False, model_name="mymodel" + ) model = await poller.result() - target = await client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = await client.begin_copy_model(model.model_id, target=target) copy = await poller.result() @@ -94,14 +109,18 @@ async def test_copy_model_with_unlabeled_model_name_v21(self, formrecognizer_sto @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_copy_model_fail_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + async def test_copy_model_fail_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = await poller.result() # give an incorrect region - target = await client.get_copy_authorization(resource_region="eastus2", resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region="eastus2", resource_id=formrecognizer_resource_id + ) with pytest.raises(HttpResponseError) as e: poller = await client.begin_copy_model(model.model_id, target=target) @@ -112,14 +131,18 @@ async def test_copy_model_fail_v21(self, formrecognizer_storage_container_sas_ur @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_copy_model_case_insensitive_region_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + async def test_copy_model_case_insensitive_region_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) model = await poller.result() # give region all uppercase - target = await client.get_copy_authorization(resource_region=formrecognizer_region.upper(), resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region=formrecognizer_region.upper(), resource_id=formrecognizer_resource_id + ) poller = await client.begin_copy_model(model.model_id, target=target) copy = await poller.result() @@ -136,7 +159,9 @@ async def test_copy_model_case_insensitive_region_v21(self, formrecognizer_stora async def test_copy_authorization_v2(self, formrecognizer_region, formrecognizer_resource_id, **kwargs): client = get_ft_client(api_version="2.0") async with client: - target = await client.get_copy_authorization(resource_region="eastus", resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region="eastus", resource_id=formrecognizer_resource_id + ) assert target["modelId"] assert target["accessToken"] @@ -150,7 +175,9 @@ async def test_copy_authorization_v2(self, formrecognizer_region, formrecognizer async def test_copy_authorization_v21(self, formrecognizer_region, formrecognizer_resource_id, **kwargs): client = get_ft_client(api_version="2.1") async with client: - target = await client.get_copy_authorization(resource_region="eastus", resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region="eastus", resource_id=formrecognizer_resource_id + ) assert target["modelId"] assert target["accessToken"] @@ -161,19 +188,29 @@ async def test_copy_authorization_v21(self, formrecognizer_region, formrecognize @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_copy_model_with_composed_model_v21(self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs): + async def test_copy_model_with_composed_model_v21( + self, formrecognizer_storage_container_sas_url_v2, formrecognizer_region, formrecognizer_resource_id, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: - poller_1 = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model1") + poller_1 = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model1" + ) model_1 = await poller_1.result() - poller_2 = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model2") + poller_2 = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="model2" + ) model_2 = await poller_2.result() - composed_poller = await client.begin_create_composed_model([model_1.model_id, model_2.model_id], model_name="composedmodel") + composed_poller = await client.begin_create_composed_model( + [model_1.model_id, model_2.model_id], model_name="composedmodel" + ) composed_model = await composed_poller.result() - target = await client.get_copy_authorization(resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id) + target = await client.get_copy_authorization( + resource_region=formrecognizer_region, resource_id=formrecognizer_resource_id + ) poller = await client.begin_copy_model(composed_model.model_id, target=target) copy = await poller.result() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt.py index 43b3555aaa27..20aa164cdbc7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt.py @@ -115,7 +115,7 @@ def test_get_form_recognizer_client_v2(self, **kwargs): # this can be reverted to set_bodiless_matcher() after tests are re-recorded and don't contain these headers set_custom_default_matcher( compare_bodies=False, excluded_headers="Authorization,Content-Length,x-ms-client-request-id,x-ms-request-id" - ) + ) transport = RequestsTransport() ftc = get_ft_client(transport=transport, api_version="2.1") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt_async.py index dac80be4b8de..a1afda3a2a8f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_mgmt_async.py @@ -17,7 +17,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_ft_client = functools.partial(get_async_client, FormTrainingClient) @@ -118,7 +117,7 @@ async def test_get_form_recognizer_client(self, **kwargs): # this can be reverted to set_bodiless_matcher() after tests are re-recorded and don't contain these headers set_custom_default_matcher( compare_bodies=False, excluded_headers="Authorization,Content-Length,x-ms-client-request-id,x-ms-request-id" - ) + ) transport = AioHttpTransport() ftc = get_ft_client(transport=transport, api_version="2.1") diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training.py index 058fab8393ac..3594c15084f5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training.py @@ -16,6 +16,7 @@ get_ft_client = functools.partial(get_sync_client, FormTrainingClient) + class TestTraining(FormRecognizerTest): @pytest.mark.skip("Test is flaky and hangs") @@ -23,7 +24,9 @@ class TestTraining(FormRecognizerTest): @recorded_by_proxy def test_training_with_labels_v2(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.0") - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True) + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True + ) model = poller.result() model_dict = model.to_dict() @@ -71,13 +74,14 @@ def test_training_multipage_with_labels_v2(self, formrecognizer_multipage_storag assert field.accuracy is not None assert field.name - @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy def test_training_without_labels_v2(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.0") - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True) + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True + ) model = poller.result() model_dict = model.to_dict() @@ -103,7 +107,9 @@ def test_training_without_labels_v2(self, formrecognizer_storage_container_sas_u @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_training_multipage_without_labels_v2(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + def test_training_multipage_without_labels_v2( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.0") poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = poller.result() @@ -130,18 +136,29 @@ def test_training_multipage_without_labels_v2(self, formrecognizer_multipage_sto @recorded_by_proxy def test_training_with_files_filter_v2(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.0") - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, include_subfolders=True) + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + include_subfolders=True, + ) model = poller.result() assert len(model.training_documents) == 6 assert model.training_documents[-1].name == "subfolder/Form_6.jpg" # we traversed subfolders - poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="subfolder", include_subfolders=True) + poller = client.begin_training( + formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + prefix="subfolder", + include_subfolders=True, + ) model = poller.result() assert len(model.training_documents) == 1 assert model.training_documents[0].name == "subfolder/Form_6.jpg" # we filtered for only subfolders with pytest.raises(HttpResponseError) as e: - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx") + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx" + ) model = poller.result() assert e.value.error.code assert e.value.error.message @@ -151,7 +168,11 @@ def test_training_with_files_filter_v2(self, formrecognizer_storage_container_sa @recorded_by_proxy def test_training_with_labels_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.1") - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="my labeled model") + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=True, + model_name="my labeled model", + ) model = poller.result() model_dict = model.to_dict() @@ -205,7 +226,11 @@ def test_training_multipage_with_labels_v21(self, formrecognizer_multipage_stora @recorded_by_proxy def test_training_without_labels_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.1") - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="my labeled model") + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=True, + model_name="my labeled model", + ) model = poller.result() model_dict = model.to_dict() @@ -232,7 +257,9 @@ def test_training_without_labels_v21(self, formrecognizer_storage_container_sas_ @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy - def test_training_multipage_without_labels_v21(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + def test_training_multipage_without_labels_v21( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.1") poller = client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = poller.result() @@ -259,18 +286,29 @@ def test_training_multipage_without_labels_v21(self, formrecognizer_multipage_st @recorded_by_proxy def test_training_with_files_filter_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.1") - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, include_subfolders=True) + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + include_subfolders=True, + ) model = poller.result() assert len(model.training_documents) == 6 assert model.training_documents[-1].name == "subfolder/Form_6.jpg" # we traversed subfolders - poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="subfolder", include_subfolders=True) + poller = client.begin_training( + formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + prefix="subfolder", + include_subfolders=True, + ) model = poller.result() assert len(model.training_documents) == 1 assert model.training_documents[0].name == "subfolder/Form_6.jpg" # we filtered for only subfolders with pytest.raises(HttpResponseError) as e: - poller = client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx") + poller = client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx" + ) model = poller.result() assert e.value.error.code assert e.value.error.message @@ -279,6 +317,8 @@ def test_training_with_files_filter_v21(self, formrecognizer_storage_container_s def test_training_with_model_name_bad_api_version(self, **kwargs): client = get_ft_client(api_version="2.0") with pytest.raises(ValueError) as excinfo: - poller = client.begin_training(training_files_url="url", use_training_labels=True, model_name="not supported in v2.0") + poller = client.begin_training( + training_files_url="url", use_training_labels=True, model_name="not supported in v2.0" + ) result = poller.result() assert "'model_name' is only available for API version V2_1 and up" in str(excinfo.value) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training_async.py index f75ecb3b2b18..cb78480bf3f5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_ftc_training_async.py @@ -14,7 +14,6 @@ from asynctestcase import AsyncFormRecognizerTest from conftest import skip_flaky_test - get_ft_client = functools.partial(get_async_client, FormTrainingClient) @@ -26,7 +25,9 @@ class TestTrainingAsync(AsyncFormRecognizerTest): async def test_training_with_labels_v2(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.0") async with client: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True) + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True + ) model = await poller.result() model_dict = model.to_dict() @@ -52,10 +53,14 @@ async def test_training_with_labels_v2(self, formrecognizer_storage_container_sa @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_training_multipage_with_labels_v2(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_training_multipage_with_labels_v2( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.0") async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True + ) model = await poller.result() assert model.model_id @@ -75,14 +80,15 @@ async def test_training_multipage_with_labels_v2(self, formrecognizer_multipage_ assert field.accuracy is not None assert field.name - @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async async def test_training_without_labels_v2(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.0") async with client: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True) + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True + ) model = await poller.result() model_dict = model.to_dict() @@ -108,10 +114,14 @@ async def test_training_without_labels_v2(self, formrecognizer_storage_container @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_training_multipage_without_labels_v2(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_training_multipage_without_labels_v2( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.0") async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True + ) model = await poller.result() assert model.model_id @@ -137,18 +147,31 @@ async def test_training_multipage_without_labels_v2(self, formrecognizer_multipa async def test_training_with_files_filter_v2(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.0") async with client: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, include_subfolders=True) + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + include_subfolders=True, + ) model = await poller.result() assert len(model.training_documents) == 6 assert model.training_documents[-1].name == "subfolder/Form_6.jpg" # we traversed subfolders - poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="subfolder", include_subfolders=True) + poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + prefix="subfolder", + include_subfolders=True, + ) model = await poller.result() assert len(model.training_documents) == 1 assert model.training_documents[0].name == "subfolder/Form_6.jpg" # we filtered for only subfolders with pytest.raises(HttpResponseError) as e: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx") + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + prefix="xxx", + ) model = await poller.result() assert e.value.error.code assert e.value.error.message @@ -159,7 +182,11 @@ async def test_training_with_files_filter_v2(self, formrecognizer_storage_contai async def test_training_with_labels_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="my labeled model") + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=True, + model_name="my labeled model", + ) model = await poller.result() model_dict = model.to_dict() @@ -186,10 +213,14 @@ async def test_training_with_labels_v21(self, formrecognizer_storage_container_s @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_training_multipage_with_labels_v21(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_training_multipage_with_labels_v21( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True + ) model = await poller.result() assert model.model_id @@ -215,7 +246,11 @@ async def test_training_multipage_with_labels_v21(self, formrecognizer_multipage async def test_training_without_labels_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="my labeled model") + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=True, + model_name="my labeled model", + ) model = await poller.result() model_dict = model.to_dict() @@ -242,10 +277,14 @@ async def test_training_without_labels_v21(self, formrecognizer_storage_containe @pytest.mark.skip("Test is flaky and hangs") @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_training_multipage_without_labels_v21(self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs): + async def test_training_multipage_without_labels_v21( + self, formrecognizer_multipage_storage_container_sas_url_v2, **kwargs + ): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) + poller = await client.begin_training( + formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True + ) model = await poller.result() assert model.model_id @@ -271,18 +310,31 @@ async def test_training_multipage_without_labels_v21(self, formrecognizer_multip async def test_training_with_files_filter_v21(self, formrecognizer_storage_container_sas_url_v2, **kwargs): client = get_ft_client(api_version="2.1") async with client: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, include_subfolders=True) + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + include_subfolders=True, + ) model = await poller.result() assert len(model.training_documents) == 6 assert model.training_documents[-1].name == "subfolder/Form_6.jpg" # we traversed subfolders - poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="subfolder", include_subfolders=True) + poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + prefix="subfolder", + include_subfolders=True, + ) model = await poller.result() assert len(model.training_documents) == 1 assert model.training_documents[0].name == "subfolder/Form_6.jpg" # we filtered for only subfolders with pytest.raises(HttpResponseError) as e: - poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx") + poller = await client.begin_training( + training_files_url=formrecognizer_storage_container_sas_url_v2, + use_training_labels=False, + prefix="xxx", + ) model = await poller.result() assert e.value.error.code assert e.value.error.message @@ -292,6 +344,8 @@ async def test_training_with_model_name_bad_api_version(self, **kwargs): client = get_ft_client(api_version="2.0") with pytest.raises(ValueError) as excinfo: async with client: - poller = await client.begin_training(training_files_url="url", use_training_labels=True, model_name="not supported in v2.0") + poller = await client.begin_training( + training_files_url="url", use_training_labels=True, model_name="not supported in v2.0" + ) result = await poller.result() assert "'model_name' is only available for API version V2_1 and up" in str(excinfo.value) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py index c912e8f62ff0..b1799c978d42 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py @@ -12,7 +12,6 @@ from testcase import FormRecognizerTest from conftest import skip_flaky_test - get_da_client = functools.partial(get_sync_client, DocumentAnalysisClient) @@ -28,7 +27,7 @@ def test_document_line_get_words(self, **kwargs): poller = client.begin_analyze_document("prebuilt-document", document) result = poller.result() - + elements = result.pages[0].lines[0].get_words() assert len(elements) == 1 assert elements[0].content == "Contoso" @@ -43,7 +42,7 @@ def test_document_line_get_words_error(self, **kwargs): poller = client.begin_analyze_document("prebuilt-document", document) result = poller.result() - + # check the error occurs when converting a larger element that encompasses a document line d = result.to_dict() analyze_result = AnalyzeResult.from_dict(d) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging.py index 3d14cc54791e..733cd7718c5e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging.py @@ -8,6 +8,7 @@ import logging import pytest import json + try: from unittest import mock except ImportError: # python < 3.3 @@ -19,6 +20,7 @@ from testcase import FormRecognizerTest from preparers import FormRecognizerPreparer, get_sync_client + class MockHandler(logging.Handler): def __init__(self): super(MockHandler, self).__init__() @@ -33,13 +35,16 @@ class TestLogging(FormRecognizerTest): @FormRecognizerPreparer() def test_mock_quota_exceeded_403(self, **kwargs): response = mock.Mock( - status_code=403, - headers={"Retry-After": 186688, "Content-Type": "application/json"}, - reason="Bad Request" + status_code=403, headers={"Retry-After": 186688, "Content-Type": "application/json"}, reason="Bad Request" ) response.text = lambda encoding=None: json.dumps( - {"error": {"code": "403", "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " - "Please retry after 1 day. To increase your call volume switch to a paid tier."}} + { + "error": { + "code": "403", + "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " + "Please retry after 1 day. To increase your call volume switch to a paid tier.", + } + } ) response.content_type = "application/json" transport = mock.Mock(send=lambda request, **kwargs: response) @@ -49,18 +54,24 @@ def test_mock_quota_exceeded_403(self, **kwargs): with pytest.raises(HttpResponseError) as e: poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) assert e.value.status_code == 403 - assert e.value.error.message == 'Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier.' + assert ( + e.value.error.message + == "Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier." + ) @FormRecognizerPreparer() def test_mock_quota_exceeded_429(self, **kwargs): response = mock.Mock( - status_code=429, - headers={"Retry-After": 186688, "Content-Type": "application/json"}, - reason="Bad Request" + status_code=429, headers={"Retry-After": 186688, "Content-Type": "application/json"}, reason="Bad Request" ) response.text = lambda encoding=None: json.dumps( - {"error": {"code": "429", "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " - "Please retry after 1 day. To increase your call volume switch to a paid tier."}} + { + "error": { + "code": "429", + "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " + "Please retry after 1 day. To increase your call volume switch to a paid tier.", + } + } ) response.content_type = "application/json" transport = mock.Mock(send=lambda request, **kwargs: response) @@ -70,4 +81,7 @@ def test_mock_quota_exceeded_429(self, **kwargs): with pytest.raises(HttpResponseError) as e: poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) assert e.value.status_code == 429 - assert e.value.error.message == 'Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier.' + assert ( + e.value.error.message + == "Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier." + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging_async.py index e170406d56a2..40da376eda75 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_logging_async.py @@ -43,6 +43,7 @@ def wrap_in_future(fn): def wrapper(*args, **kwargs): result = fn(*args, **kwargs) return get_completed_future(result) + return wrapper @@ -65,13 +66,16 @@ class TestLogging(AsyncFormRecognizerTest): @FormRecognizerPreparer() async def test_mock_quota_exceeded_403(self, **kwargs): response = mock.Mock( - status_code=403, - headers={"Retry-After": 186688, "Content-Type": "application/json"}, - reason="Bad Request" + status_code=403, headers={"Retry-After": 186688, "Content-Type": "application/json"}, reason="Bad Request" ) response.text = lambda encoding=None: json.dumps( - {"error": {"code": "403", "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " - "Please retry after 1 day. To increase your call volume switch to a paid tier."}} + { + "error": { + "code": "403", + "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " + "Please retry after 1 day. To increase your call volume switch to a paid tier.", + } + } ) response.content_type = "application/json" transport = AsyncMockTransport(send=wrap_in_future(lambda request, **kwargs: response)) @@ -81,18 +85,24 @@ async def test_mock_quota_exceeded_403(self, **kwargs): with pytest.raises(HttpResponseError) as e: poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) assert e.value.status_code == 403 - assert e.value.error.message == 'Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier.' + assert ( + e.value.error.message + == "Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier." + ) @FormRecognizerPreparer() async def test_mock_quota_exceeded_429(self, **kwargs): response = mock.Mock( - status_code=429, - headers={"Retry-After": 186688, "Content-Type": "application/json"}, - reason="Bad Request" + status_code=429, headers={"Retry-After": 186688, "Content-Type": "application/json"}, reason="Bad Request" ) response.text = lambda encoding=None: json.dumps( - {"error": {"code": "429", "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " - "Please retry after 1 day. To increase your call volume switch to a paid tier."}} + { + "error": { + "code": "429", + "message": "Out of call volume quota for FormRecognizer F0 pricing tier. " + "Please retry after 1 day. To increase your call volume switch to a paid tier.", + } + } ) response.content_type = "application/json" transport = AsyncMockTransport(send=wrap_in_future(lambda request, **kwargs: response)) @@ -101,4 +111,7 @@ async def test_mock_quota_exceeded_429(self, **kwargs): with pytest.raises(HttpResponseError) as e: poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg) assert e.value.status_code == 429 - assert e.value.error.message == 'Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier.' + assert ( + e.value.error.message + == "Out of call volume quota for FormRecognizer F0 pricing tier. Please retry after 1 day. To increase your call volume switch to a paid tier." + ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py index ed6ba08bf9f4..527eb1eb70a3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py @@ -1,4 +1,3 @@ - # coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. @@ -18,7 +17,7 @@ DocumentAnalysisClient, DocumentModelAdministrationClient, ClassifierDocumentTypeDetails, - BlobSource + BlobSource, ) get_fr_client = functools.partial(get_sync_client, FormRecognizerClient) @@ -64,31 +63,41 @@ def test_bad_api_version_form_recognizer_client(self): with pytest.raises(ValueError) as excinfo: client = FormRecognizerClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in FormRecognizerApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_bad_api_version_form_training_client(self): with pytest.raises(ValueError) as excinfo: client = FormTrainingClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in FormRecognizerApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_document_api_version_form_recognizer_client(self): with pytest.raises(ValueError) as excinfo: client = FormRecognizerClient("url", "key", api_version="2023-07-31") - assert "Unsupported API version '2023-07-31'. Please select from: {}\n" \ - "API version '2023-07-31' is " \ - "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2023-07-31'. Please select from: {}\n" + "API version '2023-07-31' is " + "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( + ", ".join(v.value for v in FormRecognizerApiVersion) + ) + == str(excinfo.value) + ) @FormRecognizerPreparer() def test_document_api_version_form_training_client(self): with pytest.raises(ValueError) as excinfo: client = FormTrainingClient("url", "key", api_version="2023-07-31") - assert "Unsupported API version '2023-07-31'. Please select from: {}\nAPI version '2023-07-31' is " \ - "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2023-07-31'. Please select from: {}\nAPI version '2023-07-31' is " + "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( + ", ".join(v.value for v in FormRecognizerApiVersion) + ) + == str(excinfo.value) + ) @FormRecognizerPreparer() def test_default_api_version_document_analysis_client(self, **kwargs): @@ -100,15 +109,20 @@ def test_bad_api_version_document_analysis_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentAnalysisClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_form_api_version_document_analysis_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentModelAdministrationClient("url", "key", api_version="2.1") - assert "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " \ - "only available for FormRecognizerClient and FormTrainingClient.".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " + "only available for FormRecognizerClient and FormTrainingClient.".format( + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) + == str(excinfo.value) + ) @FormRecognizerPreparer() def test_default_api_version_document_model_admin_client(self, **kwargs): @@ -120,15 +134,20 @@ def test_bad_api_version_document_model_admin_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentModelAdministrationClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_form_api_version_document_model_admin_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentModelAdministrationClient("url", "key", api_version="2.1") - assert "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " \ - "only available for FormRecognizerClient and FormTrainingClient.".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " + "only available for FormRecognizerClient and FormTrainingClient.".format( + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) + == str(excinfo.value) + ) @pytest.mark.skip() @FormRecognizerPreparer() @@ -140,7 +159,9 @@ def test_v2_0_compatibility(self, formrecognizer_storage_container_sas_url_v2, * label_poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True) label_result = label_poller.result() - unlabelled_poller = client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) + unlabelled_poller = client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=False + ) unlabelled_result = unlabelled_poller.result() assert label_result.properties is None @@ -151,9 +172,12 @@ def test_v2_0_compatibility(self, formrecognizer_storage_container_sas_url_v2, * assert unlabelled_result.training_documents[0].model_id is None form_client = client.get_form_recognizer_client() - label_poller = form_client.begin_recognize_custom_forms_from_url(label_result.model_id, self.form_url_jpg, include_field_elements=True) - unlabelled_poller = form_client.begin_recognize_custom_forms_from_url(unlabelled_result.model_id, self.form_url_jpg, include_field_elements=True) - + label_poller = form_client.begin_recognize_custom_forms_from_url( + label_result.model_id, self.form_url_jpg, include_field_elements=True + ) + unlabelled_poller = form_client.begin_recognize_custom_forms_from_url( + unlabelled_result.model_id, self.form_url_jpg, include_field_elements=True + ) label_form_result = label_poller.result() unlabelled_form_result = unlabelled_poller.result() @@ -193,29 +217,33 @@ def test_v2022_08_31_dac_compatibility(self, **kwargs): with pytest.raises(ValueError) as excinfo: client.begin_analyze_document("prebuilt-layout", my_file, features=[AnalysisFeature.STYLE_FONT]) - assert "Keyword argument 'features' is only available for API version V2023_07_31 and later." == str(excinfo.value) + assert "Keyword argument 'features' is only available for API version V2023_07_31 and later." == str( + excinfo.value + ) # test that the addition of new methods in v2023-07-31 does not break v2022-08-31 with pytest.raises(ValueError) as excinfo: client.begin_classify_document("foo", my_file) - assert ( - "Method 'begin_classify_document()' is only available for API version " - "V2023_07_31 and later" - ) == str(excinfo.value) + assert ("Method 'begin_classify_document()' is only available for API version " "V2023_07_31 and later") == str( + excinfo.value + ) with pytest.raises(ValueError) as excinfo: client.begin_classify_document_from_url("foo", self.form_url_jpg) assert ( - "Method 'begin_classify_document_from_url()' is only available for API version " - "V2023_07_31 and later" + "Method 'begin_classify_document_from_url()' is only available for API version " "V2023_07_31 and later" ) == str(excinfo.value) @FormRecognizerPreparer() @recorded_by_proxy - def test_v2022_08_31_dmac_compatibility(self, formrecognizer_storage_container_sas_url, formrecognizer_training_data_classifier, **kwargs): + def test_v2022_08_31_dmac_compatibility( + self, formrecognizer_storage_container_sas_url, formrecognizer_training_data_classifier, **kwargs + ): client = get_dma_client(api_version=DocumentAnalysisApiVersion.V2022_08_31) set_bodiless_matcher() - poller = client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = poller.result() assert model.model_id @@ -233,60 +261,53 @@ def test_v2022_08_31_dmac_compatibility(self, formrecognizer_storage_container_s with pytest.raises(ValueError) as excinfo: client.list_document_classifiers() assert ( - "Method 'list_document_classifiers()' is only available for API version " - "V2023_07_31 and later") == str(excinfo.value) + "Method 'list_document_classifiers()' is only available for API version " "V2023_07_31 and later" + ) == str(excinfo.value) with pytest.raises(ValueError) as excinfo: client.begin_build_document_classifier( - doc_types={ - "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) - ), - "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) - ), - "IRS-1040-C": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" - ) - ), - "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-D/train" - ) - ), - "IRS-1040-E": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-E/train" - ) - ), - }, - description="IRS document classifier" - ) + doc_types={ + "IRS-1040-A": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" + ) + ), + "IRS-1040-B": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" + ) + ), + "IRS-1040-C": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train" + ) + ), + "IRS-1040-D": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-D/train" + ) + ), + "IRS-1040-E": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-E/train" + ) + ), + }, + description="IRS document classifier", + ) assert ( - "Method 'begin_build_document_classifier()' is only available for API version " - "V2023_07_31 and later") == str(excinfo.value) + "Method 'begin_build_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) == str(excinfo.value) # test that the addition of new methods in v2023-07-31 does not break v2022-08-31 with pytest.raises(ValueError) as excinfo: client.get_document_classifier("foo") - assert ( - "Method 'get_document_classifier()' is only available for API version " - "V2023_07_31 and later" - ) == str(excinfo.value) + assert ("Method 'get_document_classifier()' is only available for API version " "V2023_07_31 and later") == str( + excinfo.value + ) with pytest.raises(ValueError) as excinfo: client.delete_document_classifier("foo") assert ( - "Method 'delete_document_classifier()' is only available for API version " - "V2023_07_31 and later" + "Method 'delete_document_classifier()' is only available for API version " "V2023_07_31 and later" ) == str(excinfo.value) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi_async.py index 01cff87b4cab..af28dca020a3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi_async.py @@ -1,4 +1,3 @@ - # coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. @@ -14,14 +13,14 @@ FormRecognizerClient, FormTrainingClient, DocumentAnalysisClient, - DocumentModelAdministrationClient + DocumentModelAdministrationClient, ) from azure.ai.formrecognizer import ( FormRecognizerApiVersion, DocumentAnalysisApiVersion, AnalysisFeature, ClassifierDocumentTypeDetails, - BlobSource + BlobSource, ) get_fr_client = functools.partial(get_async_client, FormRecognizerClient) @@ -67,30 +66,40 @@ def test_bad_api_version_form_recognizer_client(self): with pytest.raises(ValueError) as excinfo: client = FormRecognizerClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in FormRecognizerApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_bad_api_version_form_training_client(self): with pytest.raises(ValueError) as excinfo: client = FormTrainingClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in FormRecognizerApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_document_api_version_form_recognizer_client(self): with pytest.raises(ValueError) as excinfo: client = FormRecognizerClient("url", "key", api_version="2023-07-31") - assert "Unsupported API version '2023-07-31'. Please select from: {}\nAPI version '2023-07-31' is " \ - "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2023-07-31'. Please select from: {}\nAPI version '2023-07-31' is " + "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( + ", ".join(v.value for v in FormRecognizerApiVersion) + ) + == str(excinfo.value) + ) @FormRecognizerPreparer() def test_document_api_version_form_training_client(self): with pytest.raises(ValueError) as excinfo: client = FormTrainingClient("url", "key", api_version="2023-07-31") - assert "Unsupported API version '2023-07-31'. Please select from: {}\nAPI version '2023-07-31' is " \ - "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( - ", ".join(v.value for v in FormRecognizerApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2023-07-31'. Please select from: {}\nAPI version '2023-07-31' is " + "only available for DocumentAnalysisClient and DocumentModelAdministrationClient.".format( + ", ".join(v.value for v in FormRecognizerApiVersion) + ) + == str(excinfo.value) + ) @FormRecognizerPreparer() def test_default_api_version_document_analysis_client(self, **kwargs): @@ -102,15 +111,20 @@ def test_bad_api_version_document_analysis_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentAnalysisClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_form_api_version_document_analysis_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentAnalysisClient("url", "key", api_version="2.1") - assert "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " \ - "only available for FormRecognizerClient and FormTrainingClient.".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " + "only available for FormRecognizerClient and FormTrainingClient.".format( + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) + == str(excinfo.value) + ) @FormRecognizerPreparer() def test_default_api_version_document_model_admin_client(self, **kwargs): @@ -122,15 +136,20 @@ def test_bad_api_version_document_model_admin_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentModelAdministrationClient("url", "key", api_version="9") assert "Unsupported API version '9'. Please select from: {}".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) == str(excinfo.value) @FormRecognizerPreparer() def test_form_api_version_document_model_admin_client(self): with pytest.raises(ValueError) as excinfo: client = DocumentModelAdministrationClient("url", "key", api_version="2.1") - assert "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " \ - "only available for FormRecognizerClient and FormTrainingClient.".format( - ", ".join(v.value for v in DocumentAnalysisApiVersion)) == str(excinfo.value) + assert ( + "Unsupported API version '2.1'. Please select from: {}\nAPI version '2.1' is " + "only available for FormRecognizerClient and FormTrainingClient.".format( + ", ".join(v.value for v in DocumentAnalysisApiVersion) + ) + == str(excinfo.value) + ) @pytest.mark.skip() @FormRecognizerPreparer() @@ -139,10 +158,14 @@ async def test_v2_0_compatibility(self, formrecognizer_storage_container_sas_url client = get_ft_client(api_version=FormRecognizerApiVersion.V2_0) # test that the addition of new attributes in v2.1 does not break v2.0 async with client: - label_poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=True) + label_poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=True + ) label_result = await label_poller.result() - unlabelled_poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False) + unlabelled_poller = await client.begin_training( + formrecognizer_storage_container_sas_url_v2, use_training_labels=False + ) unlabelled_result = await unlabelled_poller.result() assert label_result.properties is None @@ -154,8 +177,12 @@ async def test_v2_0_compatibility(self, formrecognizer_storage_container_sas_url form_client = client.get_form_recognizer_client() async with form_client: - label_poller = await form_client.begin_recognize_custom_forms_from_url(label_result.model_id, self.form_url_jpg, include_field_elements=True) - unlabelled_poller = await form_client.begin_recognize_custom_forms_from_url(unlabelled_result.model_id, self.form_url_jpg, include_field_elements=True) + label_poller = await form_client.begin_recognize_custom_forms_from_url( + label_result.model_id, self.form_url_jpg, include_field_elements=True + ) + unlabelled_poller = await form_client.begin_recognize_custom_forms_from_url( + unlabelled_result.model_id, self.form_url_jpg, include_field_elements=True + ) label_form_result = await label_poller.result() unlabelled_form_result = await unlabelled_poller.result() @@ -197,15 +224,16 @@ async def test_v2022_08_31_dac_compatibility(self, **kwargs): with pytest.raises(ValueError) as excinfo: await client.begin_analyze_document("prebuilt-layout", my_file, features=[AnalysisFeature.STYLE_FONT]) - assert "Keyword argument 'features' is only available for API version V2023_07_31 and later." == str(excinfo.value) + assert "Keyword argument 'features' is only available for API version V2023_07_31 and later." == str( + excinfo.value + ) # test that the addition of new methods in v2023-07-31 does not break v2022-08-31 with pytest.raises(ValueError) as excinfo: await client.begin_classify_document("foo", my_file) assert ( - "Method 'begin_classify_document()' is only available for API version " - "V2023_07_31 and later" - ) == str(excinfo.value) + "Method 'begin_classify_document()' is only available for API version " "V2023_07_31 and later" + ) == str(excinfo.value) with pytest.raises(ValueError) as excinfo: await client.begin_classify_document_from_url("foo", self.form_url_jpg) @@ -216,11 +244,15 @@ async def test_v2022_08_31_dac_compatibility(self, **kwargs): @FormRecognizerPreparer() @recorded_by_proxy_async - async def test_v2022_08_31_dmac_compatibility(self, formrecognizer_storage_container_sas_url, formrecognizer_training_data_classifier, **kwargs): + async def test_v2022_08_31_dmac_compatibility( + self, formrecognizer_storage_container_sas_url, formrecognizer_training_data_classifier, **kwargs + ): client = get_dma_client(api_version=DocumentAnalysisApiVersion.V2022_08_31) set_bodiless_matcher() async with client: - poller = await client.begin_build_document_model("template", blob_container_url=formrecognizer_storage_container_sas_url) + poller = await client.begin_build_document_model( + "template", blob_container_url=formrecognizer_storage_container_sas_url + ) model = await poller.result() assert model.model_id @@ -238,60 +270,53 @@ async def test_v2022_08_31_dmac_compatibility(self, formrecognizer_storage_conta with pytest.raises(ValueError) as excinfo: await client.list_document_classifiers() assert ( - "Method 'list_document_classifiers()' is only available for API version " - "V2023_07_31 and later") == str(excinfo.value) + "Method 'list_document_classifiers()' is only available for API version " "V2023_07_31 and later" + ) == str(excinfo.value) with pytest.raises(ValueError) as excinfo: await client.begin_build_document_classifier( - doc_types={ - "IRS-1040-A": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-A/train" - ) - ), - "IRS-1040-B": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-B/train" - ) - ), - "IRS-1040-C": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-C/train" - ) - ), - "IRS-1040-D": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-D/train" - ) - ), - "IRS-1040-E": ClassifierDocumentTypeDetails( - source=BlobSource( - container_url=formrecognizer_training_data_classifier, - prefix="IRS-1040-E/train" - ) - ), - }, - description="IRS document classifier" - ) + doc_types={ + "IRS-1040-A": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-A/train" + ) + ), + "IRS-1040-B": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-B/train" + ) + ), + "IRS-1040-C": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-C/train" + ) + ), + "IRS-1040-D": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-D/train" + ) + ), + "IRS-1040-E": ClassifierDocumentTypeDetails( + source=BlobSource( + container_url=formrecognizer_training_data_classifier, prefix="IRS-1040-E/train" + ) + ), + }, + description="IRS document classifier", + ) assert ( - "Method 'begin_build_document_classifier()' is only available for API version " - "V2023_07_31 and later") == str(excinfo.value) + "Method 'begin_build_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) == str(excinfo.value) # test that the addition of new methods in v2023-07-31 does not break v2022-08-31 with pytest.raises(ValueError) as excinfo: await client.get_document_classifier("foo") assert ( - "Method 'get_document_classifier()' is only available for API version " - "V2023_07_31 and later" - ) == str(excinfo.value) + "Method 'get_document_classifier()' is only available for API version " "V2023_07_31 and later" + ) == str(excinfo.value) with pytest.raises(ValueError) as excinfo: await client.delete_document_classifier("foo") assert ( - "Method 'delete_document_classifier()' is only available for API version " - "V2023_07_31 and later" + "Method 'delete_document_classifier()' is only available for API version " "V2023_07_31 and later" ) == str(excinfo.value) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py index 875f6cc9504f..a2fbde757314 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py @@ -14,22 +14,21 @@ # Adding in assert for each pytest fixture so it's easier to narrow down where the problem is + @pytest.fixture def bounding_box(): - model = [ - _models.Point(1, 2), - _models.Point(3, 4), - _models.Point(5, 6), - _models.Point(7, 8) - ] - model_repr = '[Point(x=1, y=2), Point(x=3, y=4), Point(x=5, y=6), Point(x=7, y=8)]' + model = [_models.Point(1, 2), _models.Point(3, 4), _models.Point(5, 6), _models.Point(7, 8)] + model_repr = "[Point(x=1, y=2), Point(x=3, y=4), Point(x=5, y=6), Point(x=7, y=8)]" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_word(bounding_box): model = _models.FormWord(text="Word", bounding_box=bounding_box[0], confidence=0.5, page_number=1) - model_repr = "FormWord(text=Word, bounding_box={}, confidence=0.5, page_number=1, kind=word)".format(bounding_box[1])[:1024] + model_repr = "FormWord(text=Word, bounding_box={}, confidence=0.5, page_number=1, kind=word)".format( + bounding_box[1] + )[:1024] assert repr(model) == model_repr return model, model_repr @@ -37,50 +36,113 @@ def form_word(bounding_box): @pytest.fixture def form_line(bounding_box, form_word): appearance = _models.TextAppearance(style_name="other", style_confidence=1.0) - model = _models.FormLine(text="Word Word", bounding_box=bounding_box[0], words=[form_word[0], form_word[0]], page_number=1, appearance=appearance) - model_repr = "FormLine(text=Word Word, bounding_box={}, words=[{}, {}], page_number=1, kind=line, appearance={})".format(bounding_box[1], form_word[1], form_word[1], appearance)[:1024] + model = _models.FormLine( + text="Word Word", + bounding_box=bounding_box[0], + words=[form_word[0], form_word[0]], + page_number=1, + appearance=appearance, + ) + model_repr = ( + "FormLine(text=Word Word, bounding_box={}, words=[{}, {}], page_number=1, kind=line, appearance={})".format( + bounding_box[1], form_word[1], form_word[1], appearance + )[:1024] + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_table_cell(bounding_box, form_word): model = _models.FormTableCell( - text="Cell", row_index=3, column_index=4, row_span=2, column_span=3, bounding_box=bounding_box[0], - confidence=0.7, is_header=True, is_footer=False, page_number=3, field_elements=[form_word[0]] + text="Cell", + row_index=3, + column_index=4, + row_span=2, + column_span=3, + bounding_box=bounding_box[0], + confidence=0.7, + is_header=True, + is_footer=False, + page_number=3, + field_elements=[form_word[0]], + ) + model_repr = ( + "FormTableCell(text=Cell, row_index=3, column_index=4, row_span=2, column_span=3, bounding_box={}, confidence=0.7, " + "is_header=True, is_footer=False, page_number=3, field_elements=[{}])".format(bounding_box[1], form_word[1])[ + :1024 + ] ) - model_repr = "FormTableCell(text=Cell, row_index=3, column_index=4, row_span=2, column_span=3, bounding_box={}, confidence=0.7, " \ - "is_header=True, is_footer=False, page_number=3, field_elements=[{}])".format(bounding_box[1], form_word[1])[:1024] assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_table(form_table_cell, bounding_box): - model = _models.FormTable(page_number=1, cells=[form_table_cell[0], form_table_cell[0]], row_count=3, column_count=4, bounding_box=bounding_box[0]) - model_repr = "FormTable(page_number=1, cells=[{}, {}], row_count=3, column_count=4, bounding_box={})".format(form_table_cell[1], form_table_cell[1], bounding_box[1])[:1024] + model = _models.FormTable( + page_number=1, + cells=[form_table_cell[0], form_table_cell[0]], + row_count=3, + column_count=4, + bounding_box=bounding_box[0], + ) + model_repr = "FormTable(page_number=1, cells=[{}, {}], row_count=3, column_count=4, bounding_box={})".format( + form_table_cell[1], form_table_cell[1], bounding_box[1] + )[:1024] assert repr(model) == model_repr return model, model_repr + @pytest.fixture def field_data(bounding_box, form_word, form_line): - model = _models.FieldData(page_number=1, text="This is text.", bounding_box=bounding_box[0], field_elements=[form_word[0], form_line[0]]) - model_repr = "FieldData(page_number=1, text=This is text., bounding_box={}, field_elements=[{}, {}])".format(bounding_box[1], form_word[1], form_line[1])[:1024] + model = _models.FieldData( + page_number=1, text="This is text.", bounding_box=bounding_box[0], field_elements=[form_word[0], form_line[0]] + ) + model_repr = "FieldData(page_number=1, text=This is text., bounding_box={}, field_elements=[{}, {}])".format( + bounding_box[1], form_word[1], form_line[1] + )[:1024] assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_field_two(field_data): - model = _models.FormField(value_type="string", label_data=field_data[0], value_data=field_data[0], name="form_field_two", value="value", confidence=0) - model_repr = "FormField(value_type=string, label_data={}, value_data={}, name=form_field_two, value='value', confidence=0)".format(field_data[1], field_data[1])[:1024] + model = _models.FormField( + value_type="string", + label_data=field_data[0], + value_data=field_data[0], + name="form_field_two", + value="value", + confidence=0, + ) + model_repr = "FormField(value_type=string, label_data={}, value_data={}, name=form_field_two, value='value', confidence=0)".format( + field_data[1], field_data[1] + )[ + :1024 + ] assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_field_one(field_data, form_field_two): - model = _models.FormField(value_type="string", label_data=field_data[0], value_data=field_data[0], name="form_field_one", value=form_field_two[0], confidence=1.0) - model_repr = "FormField(value_type=string, label_data={}, value_data={}, name=form_field_one, value={}, confidence=1.0)".format(field_data[1], field_data[1], form_field_two[1])[:1024] + model = _models.FormField( + value_type="string", + label_data=field_data[0], + value_data=field_data[0], + name="form_field_one", + value=form_field_two[0], + confidence=1.0, + ) + model_repr = "FormField(value_type=string, label_data={}, value_data={}, name=form_field_one, value={}, confidence=1.0)".format( + field_data[1], field_data[1], form_field_two[1] + )[ + :1024 + ] assert repr(model) == model_repr return model, model_repr + @pytest.fixture def page_range(): model = _models.FormPageRange(first_page_number=1, last_page_number=100) @@ -88,15 +150,21 @@ def page_range(): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_page(form_table, form_line): - model = _models.FormPage(page_number=1, text_angle=180, width=5, height=5.5, unit="pixel", tables=[form_table[0]], lines=[form_line[0]]) - model_repr = "FormPage(page_number=1, text_angle=180, width=5, height=5.5, unit=pixel, tables=[{}], lines=[{}])".format( + model = _models.FormPage( + page_number=1, text_angle=180, width=5, height=5.5, unit="pixel", tables=[form_table[0]], lines=[form_line[0]] + ) + model_repr = ( + "FormPage(page_number=1, text_angle=180, width=5, height=5.5, unit=pixel, tables=[{}], lines=[{}])".format( form_table[1], form_line[1] )[:1024] + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def custom_form_model_field(): model = _models.CustomFormModelField(label="label", name="name", accuracy=0.99) @@ -104,13 +172,19 @@ def custom_form_model_field(): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def custom_form_sub_model(custom_form_model_field): - model = _models.CustomFormSubmodel(accuracy=0.99, model_id=1, fields={"name": custom_form_model_field[0]}, form_type="Itemized") - model_repr = "CustomFormSubmodel(accuracy=0.99, model_id=1, fields={{'name': {}}}, form_type=Itemized)".format(custom_form_model_field[1])[:1024] + model = _models.CustomFormSubmodel( + accuracy=0.99, model_id=1, fields={"name": custom_form_model_field[0]}, form_type="Itemized" + ) + model_repr = "CustomFormSubmodel(accuracy=0.99, model_id=1, fields={{'name': {}}}, form_type=Itemized)".format( + custom_form_model_field[1] + )[:1024] assert repr(model) == model_repr return model, model_repr + @pytest.fixture def form_recognizer_error(): model = _models.FormRecognizerError(code=404, message="Resource Not Found") @@ -118,13 +192,21 @@ def form_recognizer_error(): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def training_document_info(form_recognizer_error): - model = _models.TrainingDocumentInfo(name="name", status="partiallySucceeded", page_count=5, errors=[form_recognizer_error[0]], model_id=1) - model_repr = "TrainingDocumentInfo(name=name, status=partiallySucceeded, page_count=5, errors=[{}], model_id=1)".format(form_recognizer_error[1])[:1024] + model = _models.TrainingDocumentInfo( + name="name", status="partiallySucceeded", page_count=5, errors=[form_recognizer_error[0]], model_id=1 + ) + model_repr = ( + "TrainingDocumentInfo(name=name, status=partiallySucceeded, page_count=5, errors=[{}], model_id=1)".format( + form_recognizer_error[1] + )[:1024] + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def custom_form_model_properties(): model = _models.CustomFormModelProperties(is_composed_model=True) @@ -132,6 +214,7 @@ def custom_form_model_properties(): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_span(): model = _models.DocumentSpan(offset=2, length=5) @@ -139,6 +222,7 @@ def document_span(): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def bounding_region(bounding_box): model = _models.BoundingRegion(polygon=bounding_box[0], page_number=2) @@ -146,6 +230,7 @@ def bounding_region(bounding_box): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def address_value(): model = _models.AddressValue( @@ -162,24 +247,26 @@ def address_value(): state_district="state_district", suburb="suburb", house="house", - level="level" + level="level", ) - model_repr = "AddressValue(house_number={}, po_box={}, road={}, city={}, state={}, postal_code={}, country_region={}, street_address={}, " \ - "unit={}, city_district={}, state_district={}, suburb={}, house={}, level={})".format( - "123", - "4567", - "Contoso Ave", - "Redmond", - "WA", - "98052", - "USA", - "123 Contoso Ave", - "unit", - "city_district", - "state_district", - "suburb", - "house", - "level" + model_repr = ( + "AddressValue(house_number={}, po_box={}, road={}, city={}, state={}, postal_code={}, country_region={}, street_address={}, " + "unit={}, city_district={}, state_district={}, suburb={}, house={}, level={})".format( + "123", + "4567", + "Contoso Ave", + "Redmond", + "WA", + "98052", + "USA", + "123 Contoso Ave", + "unit", + "city_district", + "state_district", + "suburb", + "house", + "level", + ) ) assert repr(model) == model_repr return model, model_repr @@ -187,156 +274,197 @@ def address_value(): @pytest.fixture def address_document_field(bounding_region, document_span, address_value): - model = _models.DocumentField(value_type="address", value=address_value[0], content="123 Contoso Ave, Redmond, WA 98052 P.O. 4567", bounding_regions=[bounding_region[0]], spans=[document_span[0]], confidence=0.98) - model_repr = "DocumentField(value_type={}, value={}, content={}, bounding_regions=[{}], spans=[{}], confidence={})".format( - "address", - address_value[1], - "123 Contoso Ave, Redmond, WA 98052 P.O. 4567", - bounding_region[1], - document_span[1], - 0.98, - ) + model = _models.DocumentField( + value_type="address", + value=address_value[0], + content="123 Contoso Ave, Redmond, WA 98052 P.O. 4567", + bounding_regions=[bounding_region[0]], + spans=[document_span[0]], + confidence=0.98, + ) + model_repr = ( + "DocumentField(value_type={}, value={}, content={}, bounding_regions=[{}], spans=[{}], confidence={})".format( + "address", + address_value[1], + "123 Contoso Ave, Redmond, WA 98052 P.O. 4567", + bounding_region[1], + document_span[1], + 0.98, + ) + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_field(bounding_region, document_span): - model = _models.DocumentField(value_type="number", value=0.30, content="my content", bounding_regions=[bounding_region[0]], spans=[document_span[0]], confidence=0.98) - model_repr = "DocumentField(value_type={}, value={}, content={}, bounding_regions=[{}], spans=[{}], confidence={})".format( - "number", - 0.30, - "my content", - bounding_region[1], - document_span[1], - 0.98, - ) + model = _models.DocumentField( + value_type="number", + value=0.30, + content="my content", + bounding_regions=[bounding_region[0]], + spans=[document_span[0]], + confidence=0.98, + ) + model_repr = ( + "DocumentField(value_type={}, value={}, content={}, bounding_regions=[{}], spans=[{}], confidence={})".format( + "number", + 0.30, + "my content", + bounding_region[1], + document_span[1], + 0.98, + ) + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def analyzed_document(bounding_region, document_span, document_field, address_document_field): - model = _models.AnalyzedDocument(doc_type="prebuilt:invoice", bounding_regions=[bounding_region[0]], spans=[document_span[0]], fields={"key": document_field[0], "address": address_document_field[0]}, confidence=0.98) + model = _models.AnalyzedDocument( + doc_type="prebuilt:invoice", + bounding_regions=[bounding_region[0]], + spans=[document_span[0]], + fields={"key": document_field[0], "address": address_document_field[0]}, + confidence=0.98, + ) model_repr = "AnalyzedDocument(doc_type=prebuilt:invoice, bounding_regions=[{}], spans=[{}], fields={{'key': {}, 'address': {}}}, confidence={})".format( - bounding_region[1], document_span[1], document_field[1], address_document_field[1], 0.98) + bounding_region[1], document_span[1], document_field[1], address_document_field[1], 0.98 + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_key_value_element(bounding_region, document_span): - model = _models.DocumentKeyValueElement(content="my content", bounding_regions=[bounding_region[0]], spans=[document_span[0]]) + model = _models.DocumentKeyValueElement( + content="my content", bounding_regions=[bounding_region[0]], spans=[document_span[0]] + ) model_repr = "DocumentKeyValueElement(content={}, bounding_regions=[{}], spans=[{}])".format( - "my content", - bounding_region[1], - document_span[1], - ) + "my content", + bounding_region[1], + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_key_value_pair(document_key_value_element): - model = _models.DocumentKeyValuePair(key=document_key_value_element[0], value=document_key_value_element[0], confidence=0.98) - model_repr = "DocumentKeyValuePair(key={}, value={}, confidence={})".format(document_key_value_element[1], document_key_value_element[1], 0.98) + model = _models.DocumentKeyValuePair( + key=document_key_value_element[0], value=document_key_value_element[0], confidence=0.98 + ) + model_repr = "DocumentKeyValuePair(key={}, value={}, confidence={})".format( + document_key_value_element[1], document_key_value_element[1], 0.98 + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_word(bounding_box, document_span): model = _models.DocumentWord(content="word", polygon=bounding_box[0], span=document_span[0], confidence=0.92) model_repr = "DocumentWord(content={}, polygon={}, span={}, confidence={})".format( - "word", - bounding_box[1], - document_span[1], - 0.92, - ) + "word", + bounding_box[1], + document_span[1], + 0.92, + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_line(bounding_box, document_span): model = _models.DocumentLine(content="line content", polygon=bounding_box[0], spans=[document_span[0]]) model_repr = "DocumentLine(content={}, polygon={}, spans=[{}])".format( - "line content", - bounding_box[1], - document_span[1], - ) + "line content", + bounding_box[1], + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_paragraph(bounding_region, document_span): - model = _models.DocumentParagraph(role="role", content="paragraph content", bounding_regions=[bounding_region[0]], spans=[document_span[0]]) + model = _models.DocumentParagraph( + role="role", content="paragraph content", bounding_regions=[bounding_region[0]], spans=[document_span[0]] + ) model_repr = "DocumentParagraph(role={}, content={}, bounding_regions=[{}], spans=[{}])".format( - "role", - "paragraph content", - bounding_region[1], - document_span[1], - ) + "role", + "paragraph content", + bounding_region[1], + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_language(document_span): model = _models.DocumentLanguage(locale="en", spans=[document_span[0]], confidence=0.99) model_repr = "DocumentLanguage(locale={}, spans=[{}], confidence={})".format( - "en", - document_span[1], - 0.99, - ) + "en", + document_span[1], + 0.99, + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_selection_mark(bounding_box, document_span): - model = _models.DocumentSelectionMark(state="selected", polygon=bounding_box[0], span=document_span[0], confidence=0.89) + model = _models.DocumentSelectionMark( + state="selected", polygon=bounding_box[0], span=document_span[0], confidence=0.89 + ) model_repr = "DocumentSelectionMark(state={}, span={}, confidence={}, polygon={})".format( - "selected", - document_span[1], - 0.89, - bounding_box[1], - ) + "selected", + document_span[1], + 0.89, + bounding_box[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_barcode(bounding_box, document_span): model = _models.DocumentBarcode( - kind="QRCode", - value="15", - polygon=bounding_box[0], - span=document_span[0], - confidence=0.8 - ) + kind="QRCode", value="15", polygon=bounding_box[0], span=document_span[0], confidence=0.8 + ) model_repr = "DocumentBarcode(kind={}, polygon={}, confidence={}, value={}, span={})".format( - "QRCode", - bounding_box[1], - 0.8, - "15", - document_span[1], - ) + "QRCode", + bounding_box[1], + 0.8, + "15", + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_formula(bounding_box, document_span): model = _models.DocumentFormula( - kind="inline", - value="2+2=4", - polygon=bounding_box[0], - span=document_span[0], - confidence=0.8 - ) + kind="inline", value="2+2=4", polygon=bounding_box[0], span=document_span[0], confidence=0.8 + ) model_repr = "DocumentFormula(kind={}, polygon={}, confidence={}, value={}, span={})".format( - "inline", - bounding_box[1], - 0.8, - "2+2=4", - document_span[1], - ) + "inline", + bounding_box[1], + 0.8, + "2+2=4", + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture -def document_page(document_span, document_word, document_selection_mark, document_line, document_formula, document_barcode): +def document_page( + document_span, document_word, document_selection_mark, document_line, document_formula, document_barcode +): model = _models.DocumentPage( page_number=1, angle=120.0, @@ -350,23 +478,26 @@ def document_page(document_span, document_word, document_selection_mark, documen formulas=[document_formula[0]], barcodes=[document_barcode[0]], ) - model_repr = "DocumentPage(page_number={}, angle={}, width={}, height={}, unit={}, lines=[{}], words=[{}], selection_marks=[{}], spans=[{}], " \ - "barcodes=[{}], formulas=[{}])".format( - 1, - 120.0, - 8.0, - 11.0, - "inch", - document_line[1], - document_word[1], - document_selection_mark[1], - document_span[1], - document_barcode[1], - document_formula[1], - ) + model_repr = ( + "DocumentPage(page_number={}, angle={}, width={}, height={}, unit={}, lines=[{}], words=[{}], selection_marks=[{}], spans=[{}], " + "barcodes=[{}], formulas=[{}])".format( + 1, + 120.0, + 8.0, + 11.0, + "inch", + document_line[1], + document_word[1], + document_selection_mark[1], + document_span[1], + document_barcode[1], + document_formula[1], + ) + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_style(document_span): model = _models.DocumentStyle( @@ -377,65 +508,75 @@ def document_style(document_span): font_style="italic", font_weight="bold", color="#FF0000", - background_color="#FFFFFF" + background_color="#FFFFFF", + ) + model_repr = ( + "DocumentStyle(is_handwritten={}, spans=[{}], confidence={}, similar_font_family={}, font_style={}, " + "font_weight={}, color={}, background_color={})".format( + True, document_span[1], 0.98, "Arial", "italic", "bold", "#FF0000", "#FFFFFF" + ) ) - model_repr = "DocumentStyle(is_handwritten={}, spans=[{}], confidence={}, similar_font_family={}, font_style={}, " \ - "font_weight={}, color={}, background_color={})".format( - True, - document_span[1], - 0.98, - "Arial", - "italic", - "bold", - "#FF0000", - "#FFFFFF" - ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_table_cell(bounding_region, document_span): - model = _models.DocumentTableCell(kind="rowHeader", row_index=1, column_index=2, row_span=2, column_span=3, content="header", bounding_regions=[bounding_region[0]], spans=[document_span[0]]) + model = _models.DocumentTableCell( + kind="rowHeader", + row_index=1, + column_index=2, + row_span=2, + column_span=3, + content="header", + bounding_regions=[bounding_region[0]], + spans=[document_span[0]], + ) model_repr = "DocumentTableCell(kind={}, row_index={}, column_index={}, row_span={}, column_span={}, content={}, bounding_regions=[{}], spans=[{}])".format( - "rowHeader", - 1, - 2, - 2, - 3, - "header", - bounding_region[1], - document_span[1], - ) + "rowHeader", + 1, + 2, + 2, + 3, + "header", + bounding_region[1], + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def document_table(bounding_region, document_span, document_table_cell): - model = _models.DocumentTable(row_count=3, column_count=4, cells=[document_table_cell[0]], bounding_regions=[bounding_region[0]], spans=[document_span[0]]) + model = _models.DocumentTable( + row_count=3, + column_count=4, + cells=[document_table_cell[0]], + bounding_regions=[bounding_region[0]], + spans=[document_span[0]], + ) model_repr = "DocumentTable(row_count={}, column_count={}, cells=[{}], bounding_regions=[{}], spans=[{}])".format( - 3, - 4, - document_table_cell[1], - bounding_region[1], - document_span[1], - ) + 3, + 4, + document_table_cell[1], + bounding_region[1], + document_span[1], + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def doc_type_info(): model = _models.DocumentTypeDetails( - description="my description", - build_mode="neural", - field_confidence={"CustomerName": 95}, - field_schema={"prebuilt-invoice": {"CustomerName": {"type": "string"}}} + description="my description", + build_mode="neural", + field_confidence={"CustomerName": 95}, + field_schema={"prebuilt-invoice": {"CustomerName": {"type": "string"}}}, ) model_repr = "DocumentTypeDetails(description={}, build_mode={}, field_schema={{'prebuilt-invoice': {}}}, field_confidence={{'CustomerName': {}}})".format( - "my description", - "neural", - {"CustomerName": {"type": "string"}}, - 95 - ) + "my description", "neural", {"CustomerName": {"type": "string"}}, 95 + ) assert repr(model) == model_repr return model, model_repr @@ -443,10 +584,12 @@ def doc_type_info(): @pytest.fixture def blob_file_list_source(): model = _models.BlobFileListSource( - container_url="https://test.blob.core.windows.net/blob-sas-url", - file_list="filelist.jsonl", + container_url="https://test.blob.core.windows.net/blob-sas-url", + file_list="filelist.jsonl", + ) + model_repr = ( + f"BlobFileListSource(container_url=https://test.blob.core.windows.net/blob-sas-url, file_list=filelist.jsonl)" ) - model_repr = f"BlobFileListSource(container_url=https://test.blob.core.windows.net/blob-sas-url, file_list=filelist.jsonl)" assert repr(model) == model_repr return model, model_repr @@ -455,8 +598,8 @@ def blob_file_list_source(): @pytest.fixture def blob_source(): model = _models.BlobSource( - container_url="https://test.blob.core.windows.net/blob-sas-url", - prefix="prefix", + container_url="https://test.blob.core.windows.net/blob-sas-url", + prefix="prefix", ) model_repr = f"BlobSource(container_url=https://test.blob.core.windows.net/blob-sas-url, prefix=prefix)" @@ -467,7 +610,7 @@ def blob_source(): @pytest.fixture def classifier_document_type_details(blob_source): model = _models.ClassifierDocumentTypeDetails( - source=blob_source[0], + source=blob_source[0], ) model_repr = f"ClassifierDocumentTypeDetails(source_kind=azureBlob, source={blob_source[1]})" @@ -478,7 +621,7 @@ def classifier_document_type_details(blob_source): @pytest.fixture def classifier_document_type_details_file_list(blob_file_list_source): model = _models.ClassifierDocumentTypeDetails( - source=blob_file_list_source[0], + source=blob_file_list_source[0], ) model_repr = f"ClassifierDocumentTypeDetails(source_kind=azureBlobFileList, source={blob_file_list_source[1]})" @@ -489,23 +632,23 @@ def classifier_document_type_details_file_list(blob_file_list_source): @pytest.fixture def document_model(doc_type_info): model = _models.DocumentModelDetails( - api_version="2022-08-31", - tags={"awesome": "tag"}, - description="my description", - created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - expires_on=datetime.datetime(2024, 9, 16, 10, 10, 59, 342380), - model_id="prebuilt-invoice", - doc_types={"prebuilt-invoice": doc_type_info[0]} + api_version="2022-08-31", + tags={"awesome": "tag"}, + description="my description", + created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + expires_on=datetime.datetime(2024, 9, 16, 10, 10, 59, 342380), + model_id="prebuilt-invoice", + doc_types={"prebuilt-invoice": doc_type_info[0]}, ) model_repr = "DocumentModelDetails(model_id={}, description={}, created_on={}, api_version={}, tags={}, doc_types={{'prebuilt-invoice': {}}}, expires_on={})".format( - "prebuilt-invoice", - "my description", - datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - "2022-08-31", - {"awesome": "tag"}, - doc_type_info[1], - datetime.datetime(2024, 9, 16, 10, 10, 59, 342380), - ) + "prebuilt-invoice", + "my description", + datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + "2022-08-31", + {"awesome": "tag"}, + doc_type_info[1], + datetime.datetime(2024, 9, 16, 10, 10, 59, 342380), + ) assert repr(model) == model_repr return model, model_repr @@ -513,20 +656,21 @@ def document_model(doc_type_info): @pytest.fixture def document_analysis_inner_error(): model = _models.DocumentAnalysisInnerError( + code="ResourceNotFound", + message="Resource was not found", + innererror=_models.DocumentAnalysisInnerError( code="ResourceNotFound", message="Resource was not found", - innererror=_models.DocumentAnalysisInnerError( - code="ResourceNotFound", - message="Resource was not found", - ) + ), ) model_repr = "DocumentAnalysisInnerError(code={}, message={}, innererror={})".format( - "ResourceNotFound", - "Resource was not found", - _models.DocumentAnalysisInnerError( - code="ResourceNotFound", - message="Resource was not found", - )) + "ResourceNotFound", + "Resource was not found", + _models.DocumentAnalysisInnerError( + code="ResourceNotFound", + message="Resource was not found", + ), + ) assert repr(model) == model_repr return model, model_repr @@ -534,42 +678,45 @@ def document_analysis_inner_error(): @pytest.fixture def document_analysis_error(document_analysis_inner_error): model = _models.DocumentAnalysisError( - code="ResourceNotFound", - message="Resource was not found", - target="resource", - details=[ - _models.DocumentAnalysisError( - code="ResourceNotFound", - message="Resource was not found" - ) - ], - innererror=document_analysis_inner_error[0] + code="ResourceNotFound", + message="Resource was not found", + target="resource", + details=[_models.DocumentAnalysisError(code="ResourceNotFound", message="Resource was not found")], + innererror=document_analysis_inner_error[0], ) model_repr = "DocumentAnalysisError(code={}, message={}, target={}, details={}, innererror={})".format( - "ResourceNotFound", - "Resource was not found", - "resource", - [_models.DocumentAnalysisError( - code="ResourceNotFound", - message="Resource was not found" - )], - document_analysis_inner_error[1] - ) + "ResourceNotFound", + "Resource was not found", + "resource", + [_models.DocumentAnalysisError(code="ResourceNotFound", message="Resource was not found")], + document_analysis_inner_error[1], + ) assert repr(model) == model_repr return model, model_repr -class TestRepr(): +class TestRepr: # Not inheriting form FormRecognizerTest because that doesn't allow me to define pytest fixtures in the same file # Not worth moving pytest fixture definitions to conftest since all I would use is assertEqual and I can just use assert def test_recognized_form(self, form_field_one, page_range, form_page): - model = _models.RecognizedForm(form_type="receipt", form_type_confidence=1.0, model_id=1, fields={"one": form_field_one[0]}, page_range=page_range[0], pages=[form_page[0]]) + model = _models.RecognizedForm( + form_type="receipt", + form_type_confidence=1.0, + model_id=1, + fields={"one": form_field_one[0]}, + page_range=page_range[0], + pages=[form_page[0]], + ) model_repr = "RecognizedForm(form_type=receipt, fields={{'one': {}}}, page_range={}, pages=[{}], form_type_confidence=1.0, model_id=1)".format( form_field_one[1], page_range[1], form_page[1] - )[:1024] + )[ + :1024 + ] assert repr(model) == model_repr - def test_custom_form_model(self, custom_form_sub_model, custom_form_model_properties, form_recognizer_error, training_document_info): + def test_custom_form_model( + self, custom_form_sub_model, custom_form_model_properties, form_recognizer_error, training_document_info + ): model = _models.CustomFormModel( model_id=1, status="creating", @@ -579,24 +726,38 @@ def test_custom_form_model(self, custom_form_sub_model, custom_form_model_proper errors=[form_recognizer_error[0]], training_documents=[training_document_info[0], training_document_info[0]], properties=custom_form_model_properties[0], - model_name="my model" + model_name="my model", ) - model_repr = "CustomFormModel(model_id=1, status=creating, training_started_on=0001-01-01 00:00:00, " \ - "training_completed_on=0001-01-01 00:00:00, submodels=[{}, {}], errors=[{}], training_documents=[{}, {}], " \ + model_repr = ( + "CustomFormModel(model_id=1, status=creating, training_started_on=0001-01-01 00:00:00, " + "training_completed_on=0001-01-01 00:00:00, submodels=[{}, {}], errors=[{}], training_documents=[{}, {}], " "model_name=my model, properties={})".format( - custom_form_sub_model[1], custom_form_sub_model[1], form_recognizer_error[1], training_document_info[1], training_document_info[1], - custom_form_model_properties[1] + custom_form_sub_model[1], + custom_form_sub_model[1], + form_recognizer_error[1], + training_document_info[1], + training_document_info[1], + custom_form_model_properties[1], )[:1024] + ) assert repr(model) == model_repr def test_custom_form_model_info(self, custom_form_model_properties): model = _models.CustomFormModelInfo( - model_id=1, status="ready", training_started_on=datetime.datetime(1, 1, 1), training_completed_on=datetime.datetime(1, 1, 1), - properties=custom_form_model_properties[0], model_name="my model" + model_id=1, + status="ready", + training_started_on=datetime.datetime(1, 1, 1), + training_completed_on=datetime.datetime(1, 1, 1), + properties=custom_form_model_properties[0], + model_name="my model", ) - model_repr = "CustomFormModelInfo(model_id=1, status=ready, training_started_on=0001-01-01 00:00:00, training_completed_on=0001-01-01 00:00:00, properties={}, model_name=my model)".format(custom_form_model_properties[1])[:1024] + model_repr = "CustomFormModelInfo(model_id=1, status=ready, training_started_on=0001-01-01 00:00:00, training_completed_on=0001-01-01 00:00:00, properties={}, model_name=my model)".format( + custom_form_model_properties[1] + )[ + :1024 + ] assert repr(model) == model_repr def test_account_properties(self): @@ -604,91 +765,111 @@ def test_account_properties(self): model_repr = "AccountProperties(custom_model_count=100, custom_model_limit=1000)" assert repr(model) == model_repr - def test_analyze_result(self, document_page, document_table, document_key_value_pair, document_style, analyzed_document, document_language, document_paragraph): - model = _models.AnalyzeResult(api_version="2022-08-31", model_id="mymodel", content="document content", languages=[document_language[0]], pages=[document_page[0]], tables=[document_table[0]], key_value_pairs=[document_key_value_pair[0]], styles=[document_style[0]], documents=[analyzed_document[0]], paragraphs=[document_paragraph[0]]) + def test_analyze_result( + self, + document_page, + document_table, + document_key_value_pair, + document_style, + analyzed_document, + document_language, + document_paragraph, + ): + model = _models.AnalyzeResult( + api_version="2022-08-31", + model_id="mymodel", + content="document content", + languages=[document_language[0]], + pages=[document_page[0]], + tables=[document_table[0]], + key_value_pairs=[document_key_value_pair[0]], + styles=[document_style[0]], + documents=[analyzed_document[0]], + paragraphs=[document_paragraph[0]], + ) model_repr = "AnalyzeResult(api_version={}, model_id={}, content={}, languages=[{}], pages=[{}], paragraphs=[{}], tables=[{}], key_value_pairs=[{}], styles=[{}], documents=[{}])".format( - "2022-08-31", - "mymodel", - "document content", - document_language[1], - document_page[1], - document_paragraph[1], - document_table[1], - document_key_value_pair[1], - document_style[1], - analyzed_document[1], - ) + "2022-08-31", + "mymodel", + "document content", + document_language[1], + document_page[1], + document_paragraph[1], + document_table[1], + document_key_value_pair[1], + document_style[1], + analyzed_document[1], + ) assert repr(model) == model_repr - - def test_document_classifier_details(self, classifier_document_type_details, classifier_document_type_details_file_list): + def test_document_classifier_details( + self, classifier_document_type_details, classifier_document_type_details_file_list + ): model = _models.DocumentClassifierDetails( - api_version="2023-07-31", - description="my description", - created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - expires_on=datetime.datetime(2024, 9, 16, 10, 10, 59, 342380), - classifier_id="custom-classifier", - doc_types={ - "form-A": classifier_document_type_details[0], - "form-B": classifier_document_type_details_file_list[0], - } + api_version="2023-07-31", + description="my description", + created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + expires_on=datetime.datetime(2024, 9, 16, 10, 10, 59, 342380), + classifier_id="custom-classifier", + doc_types={ + "form-A": classifier_document_type_details[0], + "form-B": classifier_document_type_details_file_list[0], + }, ) model_repr = f"DocumentClassifierDetails(classifier_id=custom-classifier, description=my description, created_on={datetime.datetime(2021, 9, 16, 10, 10, 59, 342380)}, expires_on={datetime.datetime(2024, 9, 16, 10, 10, 59, 342380)}, api_version=2023-07-31, doc_types={{'form-A': {classifier_document_type_details[1]}, 'form-B': {classifier_document_type_details_file_list[1]}}})" assert repr(model) == model_repr - def test_model_operation(self, document_analysis_error, document_model): model = _models.OperationDetails( - api_version="2022-08-31", - tags={"awesome": "tag"}, - operation_id="id", - status="succeeded", - percent_completed=99, - created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - last_updated_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - kind="documentModelCopyTo", - resource_location="westus2", - error=document_analysis_error[0], - result=document_model[0], - ) + api_version="2022-08-31", + tags={"awesome": "tag"}, + operation_id="id", + status="succeeded", + percent_completed=99, + created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + last_updated_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + kind="documentModelCopyTo", + resource_location="westus2", + error=document_analysis_error[0], + result=document_model[0], + ) model_repr = "OperationDetails(operation_id={}, status={}, percent_completed={}, created_on={}, last_updated_on={}, kind={}, resource_location={}, result={}, error={}, api_version={}, tags={})".format( - "id", - "succeeded", - 99, - datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - "documentModelCopyTo", - "westus2", - document_model[1], - document_analysis_error[1], - "2022-08-31", - {"awesome": "tag"}, - ) + "id", + "succeeded", + 99, + datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + "documentModelCopyTo", + "westus2", + document_model[1], + document_analysis_error[1], + "2022-08-31", + {"awesome": "tag"}, + ) assert repr(model) == model_repr def test_model_operation_info(self): model = _models.OperationSummary( - operation_id="id", - status="succeeded", - percent_completed=100, - created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - last_updated_on=datetime.datetime(2021, 9, 16, 10, 30, 15, 342380), - kind="documentModelCompose", - resource_location="westus", - api_version="2022-08-31", - tags={"test": "value"}, - ) + operation_id="id", + status="succeeded", + percent_completed=100, + created_on=datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + last_updated_on=datetime.datetime(2021, 9, 16, 10, 30, 15, 342380), + kind="documentModelCompose", + resource_location="westus", + api_version="2022-08-31", + tags={"test": "value"}, + ) model_repr = "OperationSummary(operation_id={}, status={}, percent_completed={}, created_on={}, last_updated_on={}, kind={}, resource_location={}, api_version={}, tags={})".format( - "id", - "succeeded", - 100, - datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), - datetime.datetime(2021, 9, 16, 10, 30, 15, 342380), - "documentModelCompose", - "westus", - "2022-08-31", - {"test": "value"}, - ) + "id", + "succeeded", + 100, + datetime.datetime(2021, 9, 16, 10, 10, 59, 342380), + datetime.datetime(2021, 9, 16, 10, 30, 15, 342380), + "documentModelCompose", + "westus", + "2022-08-31", + {"test": "value"}, + ) assert repr(model) == model_repr def test_document_model(self, doc_type_info): @@ -701,7 +882,7 @@ def test_document_model(self, doc_type_info): tags={"test": "value"}, doc_types={ "prebuilt-invoice": doc_type_info[0], - } + }, ) model_repr = "DocumentModelDetails(model_id={}, description={}, created_on={}, api_version={}, tags={}, doc_types={{'prebuilt-invoice': {}}}, expires_on={})".format( "prebuilt-invoice", @@ -735,40 +916,24 @@ def test_document_model_info(self): def test_resource_details(self): model = _models.ResourceDetails( - custom_document_models=_models.CustomDocumentModelsDetails( - limit=5000, count=10 - ), + custom_document_models=_models.CustomDocumentModelsDetails(limit=5000, count=10), neural_document_model_quota=_models.QuotaDetails( - used=0, - quota=20, - quota_resets_on=datetime.datetime(2024, 9, 16, 10, 10, 59, 342380) - ) + used=0, quota=20, quota_resets_on=datetime.datetime(2024, 9, 16, 10, 10, 59, 342380) + ), ) model_repr = "ResourceDetails(custom_document_models={}, neural_document_model_quota={})".format( "CustomDocumentModelsDetails(count=10, limit=5000)", - "QuotaDetails(used=0, quota=20, quota_resets_on=2024-09-16 10:10:59.342380)" + "QuotaDetails(used=0, quota=20, quota_resets_on=2024-09-16 10:10:59.342380)", ) assert repr(model) == model_repr def test_currency_value(self): - model = _models.CurrencyValue( - amount=10.5, - symbol="$", - code="USD" - ) - model_repr = "CurrencyValue(amount={}, symbol={}, code={})".format( - 10.5, - "$", - "USD" - ) + model = _models.CurrencyValue(amount=10.5, symbol="$", code="USD") + model_repr = "CurrencyValue(amount={}, symbol={}, code={})".format(10.5, "$", "USD") assert repr(model) == model_repr def test_currency_value_str(self): - model = _models.CurrencyValue( - amount=10.5, - symbol="$", - code="USD" - ) + model = _models.CurrencyValue(amount=10.5, symbol="$", code="USD") assert str(model) == "$10.5" model = _models.CurrencyValue( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v2.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v2.py index fa46c16dad7c..55c1300a887f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v2.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v2.py @@ -85,9 +85,7 @@ def test_form_line_to_dict(self): ), ], page_number=2, - appearance=_models.TextAppearance( - style_name="other", style_confidence=0.90 - ), + appearance=_models.TextAppearance(style_name="other", style_confidence=0.90), ) d = form_line.to_dict() @@ -189,9 +187,7 @@ def test_form_element_to_dict(self): assert d == final def test_text_appearance_to_dict(self): - model = _models.TextAppearance( - style_name="other", style_confidence=0.98 - ) + model = _models.TextAppearance(style_name="other", style_confidence=0.98) d = model.to_dict() final = {"style_name": "other", "style_confidence": 0.98} @@ -289,7 +285,7 @@ def test_form_field_to_dict(self): {"x": 1427.0, "y": 1698.0}, ], "page_number": 1, - "field_elements": [] + "field_elements": [], }, "value_data": { "text": "55554444", @@ -300,7 +296,7 @@ def test_form_field_to_dict(self): {"x": 1427.0, "y": 1698.0}, ], "page_number": 1, - "field_elements": [] + "field_elements": [], }, "name": "phone", "value": "55554444", @@ -342,51 +338,52 @@ def test_recognized_form_to_dict(self): confidence=0.99, ) }, - pages=[_models.FormPage( - page_number=1, - text_angle=180.0, - width=5.5, - height=8.0, - unit="pixel", - lines=[_models.FormLine( - text="sample line", - bounding_box=[ - _models.Point(1427.0, 1669.0), - _models.Point(1527.0, 1669.0), - _models.Point(1527.0, 1698.0), - _models.Point(1427.0, 1698.0), - ], - words=[ - _models.FormWord( - text="sample", - confidence=0.92, - page_number=1, - bounding_box=[ - _models.Point(1427.0, 1669.0), - _models.Point(1527.0, 1669.0), - _models.Point(1527.0, 1698.0), - _models.Point(1427.0, 1698.0), - ], - ), - _models.FormWord( - text="line", - confidence=0.92, - page_number=1, - bounding_box=[ - _models.Point(1427.0, 1669.0), - _models.Point(1527.0, 1669.0), - _models.Point(1527.0, 1698.0), - _models.Point(1427.0, 1698.0), - ], - ), - ], - page_number=2, - appearance=_models.TextAppearance( - style_name="other", style_confidence=0.90 - ), - )], + pages=[ + _models.FormPage( + page_number=1, + text_angle=180.0, + width=5.5, + height=8.0, + unit="pixel", + lines=[ + _models.FormLine( + text="sample line", + bounding_box=[ + _models.Point(1427.0, 1669.0), + _models.Point(1527.0, 1669.0), + _models.Point(1527.0, 1698.0), + _models.Point(1427.0, 1698.0), + ], + words=[ + _models.FormWord( + text="sample", + confidence=0.92, + page_number=1, + bounding_box=[ + _models.Point(1427.0, 1669.0), + _models.Point(1527.0, 1669.0), + _models.Point(1527.0, 1698.0), + _models.Point(1427.0, 1698.0), + ], + ), + _models.FormWord( + text="line", + confidence=0.92, + page_number=1, + bounding_box=[ + _models.Point(1427.0, 1669.0), + _models.Point(1527.0, 1669.0), + _models.Point(1527.0, 1698.0), + _models.Point(1427.0, 1698.0), + ], + ), + ], + page_number=2, + appearance=_models.TextAppearance(style_name="other", style_confidence=0.90), + ) + ], ) - ] + ], ) d = form.to_dict() @@ -395,7 +392,7 @@ def test_recognized_form_to_dict(self): "form_type_confidence": "0.84", "model_id": "examplemodel123", "page_range": {"first_page_number": 1, "last_page_number": 1}, - "fields": { + "fields": { "example": { "value_type": "phoneNumber", "label_data": { @@ -407,7 +404,7 @@ def test_recognized_form_to_dict(self): {"x": 1427.0, "y": 1698.0}, ], "page_number": 1, - "field_elements": [] + "field_elements": [], }, "value_data": { "text": "55554444", @@ -418,60 +415,64 @@ def test_recognized_form_to_dict(self): {"x": 1427.0, "y": 1698.0}, ], "page_number": 1, - "field_elements": [] + "field_elements": [], }, "name": "phone", "value": "55554444", "confidence": 0.99, } }, - "pages": [{ - "page_number": 1, - "text_angle": 180.0, - "width": 5.5, - "height": 8.0, - "unit": "pixel", - "lines": [{ - "text": "sample line", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "words": [ + "pages": [ + { + "page_number": 1, + "text_angle": 180.0, + "width": 5.5, + "height": 8.0, + "unit": "pixel", + "lines": [ { - "text": "sample", + "text": "sample line", "bounding_box": [ {"x": 1427.0, "y": 1669.0}, {"x": 1527.0, "y": 1669.0}, {"x": 1527.0, "y": 1698.0}, {"x": 1427.0, "y": 1698.0}, ], - "confidence": 0.92, - "page_number": 1, - "kind": "word", - }, - { - "text": "line", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, + "words": [ + { + "text": "sample", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "confidence": 0.92, + "page_number": 1, + "kind": "word", + }, + { + "text": "line", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "confidence": 0.92, + "page_number": 1, + "kind": "word", + }, ], - "confidence": 0.92, - "page_number": 1, - "kind": "word", - }, + "page_number": 2, + "kind": "line", + "appearance": {"style_name": "other", "style_confidence": 0.90}, + } ], - "page_number": 2, - "kind": "line", - "appearance": {"style_name": "other", "style_confidence": 0.90}, - }], - "selection_marks": [], - "tables": [], - }], + "selection_marks": [], + "tables": [], + } + ], } assert d == final @@ -482,7 +483,7 @@ def test_form_page_to_dict(self): width=5.5, height=8.0, unit="pixel", - tables= [ + tables=[ _models.FormTable( page_number=2, cells=[ @@ -493,11 +494,11 @@ def test_form_page_to_dict(self): row_span=1, column_span=2, bounding_box=[ - _models.Point(1427.0, 1669.0), - _models.Point(1527.0, 1669.0), - _models.Point(1527.0, 1698.0), - _models.Point(1427.0, 1698.0), - ], + _models.Point(1427.0, 1669.0), + _models.Point(1527.0, 1669.0), + _models.Point(1527.0, 1698.0), + _models.Point(1427.0, 1698.0), + ], confidence=0.87, is_header=False, is_footer=True, @@ -514,7 +515,7 @@ def test_form_page_to_dict(self): _models.Point(1427.0, 1698.0), ], ), - ] + ], ) ], row_count=10, @@ -527,7 +528,8 @@ def test_form_page_to_dict(self): ], ), ], - lines=[_models.FormLine( + lines=[ + _models.FormLine( text="sample line", bounding_box=[ _models.Point(1427.0, 1669.0), @@ -560,12 +562,11 @@ def test_form_page_to_dict(self): ), ], page_number=2, - appearance=_models.TextAppearance( - style_name="other", style_confidence=0.90 - ), + appearance=_models.TextAppearance(style_name="other", style_confidence=0.90), ), ], - selection_marks=[_models.FormSelectionMark( + selection_marks=[ + _models.FormSelectionMark( text="checkbox", state="selected", confidence=0.92, @@ -578,7 +579,7 @@ def test_form_page_to_dict(self): ], ), ], - ) + ) d = form_page.to_dict() final = { "page_number": 1, @@ -587,101 +588,106 @@ def test_form_page_to_dict(self): "height": 8.0, "unit": "pixel", "tables": [ - {"cells": [ - { - "text": "info", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "row_index": 1, - "column_index": 3, - "row_span": 1, - "column_span": 2, - "confidence": 0.87, - "is_header": False, - "is_footer": True, - "page_number": 1, - "field_elements": [ - { - "text": "word", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "confidence": 0.92, - "page_number": 1, - "kind": "word", - } - ], - }, - ], - "page_number": 2, - "row_count": 10, - "column_count": 5, - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - }, + { + "cells": [ + { + "text": "info", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "row_index": 1, + "column_index": 3, + "row_span": 1, + "column_span": 2, + "confidence": 0.87, + "is_header": False, + "is_footer": True, + "page_number": 1, + "field_elements": [ + { + "text": "word", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "confidence": 0.92, + "page_number": 1, + "kind": "word", + } + ], + }, + ], + "page_number": 2, + "row_count": 10, + "column_count": 5, + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + }, + ], + "lines": [ + { + "text": "sample line", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "words": [ + { + "text": "sample", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "confidence": 0.92, + "page_number": 1, + "kind": "word", + }, + { + "text": "line", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "confidence": 0.92, + "page_number": 1, + "kind": "word", + }, + ], + "page_number": 2, + "kind": "line", + "appearance": {"style_name": "other", "style_confidence": 0.90}, + } + ], + "selection_marks": [ + { + "text": "checkbox", + "state": "selected", + "bounding_box": [ + {"x": 1427.0, "y": 1669.0}, + {"x": 1527.0, "y": 1669.0}, + {"x": 1527.0, "y": 1698.0}, + {"x": 1427.0, "y": 1698.0}, + ], + "confidence": 0.92, + "page_number": 1, + "kind": "selectionMark", + } ], - "lines": [{ - "text": "sample line", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "words": [ - { - "text": "sample", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "confidence": 0.92, - "page_number": 1, - "kind": "word", - }, - { - "text": "line", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "confidence": 0.92, - "page_number": 1, - "kind": "word", - }, - ], - "page_number": 2, - "kind": "line", - "appearance": {"style_name": "other", "style_confidence": 0.90}, - }], - "selection_marks": [{ - "text": "checkbox", - "state": "selected", - "bounding_box": [ - {"x": 1427.0, "y": 1669.0}, - {"x": 1527.0, "y": 1669.0}, - {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0}, - ], - "confidence": 0.92, - "page_number": 1, - "kind": "selectionMark", - }], } assert d == final @@ -693,11 +699,11 @@ def test_form_table_cell_to_dict(self): row_span=1, column_span=2, bounding_box=[ - _models.Point(1427.0, 1669.0), - _models.Point(1527.0, 1669.0), - _models.Point(1527.0, 1698.0), - _models.Point(1427.0, 1698.0), - ], + _models.Point(1427.0, 1669.0), + _models.Point(1527.0, 1669.0), + _models.Point(1527.0, 1698.0), + _models.Point(1427.0, 1698.0), + ], confidence=0.87, is_header=False, is_footer=True, @@ -714,7 +720,7 @@ def test_form_table_cell_to_dict(self): _models.Point(1427.0, 1698.0), ], ), - ] + ], ) d = table_cell.to_dict() @@ -762,11 +768,11 @@ def test_form_table_to_dict(self): row_span=1, column_span=2, bounding_box=[ - _models.Point(1427.0, 1669.0), - _models.Point(1527.0, 1669.0), - _models.Point(1527.0, 1698.0), - _models.Point(1427.0, 1698.0), - ], + _models.Point(1427.0, 1669.0), + _models.Point(1527.0, 1669.0), + _models.Point(1527.0, 1698.0), + _models.Point(1427.0, 1698.0), + ], confidence=0.87, is_header=False, is_footer=True, @@ -783,7 +789,7 @@ def test_form_table_to_dict(self): _models.Point(1427.0, 1698.0), ], ), - ] + ], ) ], row_count=10, @@ -874,7 +880,7 @@ def test_custom_form_model_info_to_dict(self): model_name="sample_model", properties=_models.CustomFormModelProperties( is_composed_model=False, - ) + ), ) d = model.to_dict() final = { @@ -885,7 +891,7 @@ def test_custom_form_model_info_to_dict(self): "model_name": "sample_model", "properties": { "is_composed_model": False, - } + }, } assert d == final @@ -954,20 +960,20 @@ def test_custom_form_submodel_to_dict(self): name="field", accuracy=0.98, ) - } + }, ) d = model.to_dict() final = { "model_id": "1234", "form_type": "submodel", "accuracy": 0.98, - "fields": { + "fields": { "example": { "label": "field_label", "name": "field", "accuracy": 0.98, } - } + }, } assert d == final @@ -982,13 +988,13 @@ def test_custom_form_model_to_dict(self): model_id="1234", form_type="submodel", accuracy=0.98, - fields={ + fields={ "example": _models.CustomFormModelField( label="field_label", name="field", accuracy=0.98, ) - } + }, ) ], errors=[ @@ -1013,8 +1019,8 @@ def test_custom_form_model_to_dict(self): ], model_name="sample model", properties=_models.CustomFormModelProperties( - is_composed_model=True, - ) + is_composed_model=True, + ), ) d = model.to_dict() final = { @@ -1022,19 +1028,20 @@ def test_custom_form_model_to_dict(self): "status": "ready", "training_started_on": datetime(2021, 1, 10, 23, 55, 59, 342380), "training_completed_on": datetime(2021, 1, 10, 23, 55, 59, 342380), - "submodels": [{ - "model_id": "1234", - "form_type": "submodel", - "accuracy": 0.98, - "fields": { - "example": - { - "label": "field_label", - "name": "field", - "accuracy": 0.98, - } + "submodels": [ + { + "model_id": "1234", + "form_type": "submodel", + "accuracy": 0.98, + "fields": { + "example": { + "label": "field_label", + "name": "field", + "accuracy": 0.98, + } + }, } - }], + ], "errors": [ { "code": 404, @@ -1058,6 +1065,6 @@ def test_custom_form_model_to_dict(self): "model_name": "sample model", "properties": { "is_composed_model": True, - } + }, } assert d == final diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py index 27c59bffe900..86d0fea70d74 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py @@ -11,9 +11,7 @@ class TestToDict(FormRecognizerTest): def test_bounding_region_to_dict(self): - model = _models.BoundingRegion( - polygon=[_models.Point(1, 2), _models.Point(3, 4)], page_number=1 - ) + model = _models.BoundingRegion(polygon=[_models.Point(1, 2), _models.Point(3, 4)], page_number=1) # d = [p.to_dict() for p in model] d = model.to_dict() final = { @@ -56,7 +54,7 @@ def test_address_value_to_dict(self): state_district="state_district", suburb="suburb", house="house", - level="level" + level="level", ) d = model.to_dict() @@ -74,23 +72,15 @@ def test_address_value_to_dict(self): "state_district": "state_district", "suburb": "suburb", "house": "house", - "level": "level" + "level": "level", } assert d == final def test_currency_value_to_dict(self): - model = _models.CurrencyValue( - amount=5.01, - symbol="$", - code="USD" - ) + model = _models.CurrencyValue(amount=5.01, symbol="$", code="USD") d = model.to_dict() - final = { - "amount": 5.01, - "symbol": "$", - "code": "USD" - } + final = {"amount": 5.01, "symbol": "$", "code": "USD"} assert d == final def test_analyzed_document_to_dict(self): @@ -545,7 +535,7 @@ def test_document_key_value_pair_to_dict(self): ), ], ), - confidence=0.89 + confidence=0.89, ) d = model.to_dict() @@ -593,7 +583,7 @@ def test_document_key_value_pair_to_dict(self): }, ], }, - "confidence": 0.89 + "confidence": 0.89, } assert d == final @@ -706,7 +696,7 @@ def test_document_page_to_dict(self): _models.Point(1427.0, 1698.0), ], span=_models.DocumentSpan(offset=5, length=2), - confidence=0.8 + confidence=0.8, ) ], formulas=[ @@ -720,9 +710,9 @@ def test_document_page_to_dict(self): _models.Point(1427.0, 1698.0), ], span=_models.DocumentSpan(offset=5, length=2), - confidence=0.8 + confidence=0.8, ) - ] + ], ) d = model.to_dict() @@ -795,14 +785,11 @@ def test_document_page_to_dict(self): {"x": 1427.0, "y": 1669.0}, {"x": 1527.0, "y": 1669.0}, {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0} + {"x": 1427.0, "y": 1698.0}, ], "confidence": 0.8, - "span": { - "offset": 5, - "length": 2 - }, - "value": "15" + "span": {"offset": 5, "length": 2}, + "value": "15", } ], "formulas": [ @@ -812,16 +799,13 @@ def test_document_page_to_dict(self): {"x": 1427.0, "y": 1669.0}, {"x": 1527.0, "y": 1669.0}, {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0} + {"x": 1427.0, "y": 1698.0}, ], "confidence": 0.8, - "span": { - "offset": 5, - "length": 2 - }, - "value": "2+2=4" + "span": {"offset": 5, "length": 2}, + "value": "2+2=4", } - ] + ], } assert d == final @@ -875,7 +859,7 @@ def test_document_style_to_dict(self): font_style="italic", font_weight="bold", color="#FF0000", - background_color="#FFFFFF" + background_color="#FFFFFF", ) d = model.to_dict() @@ -889,11 +873,11 @@ def test_document_style_to_dict(self): } ], "confidence": 1.0, - 'similar_font_family': 'Arial', - 'font_style': 'italic', - 'font_weight': 'bold', - 'color': '#FF0000', - 'background_color': '#FFFFFF', + "similar_font_family": "Arial", + "font_style": "italic", + "font_weight": "bold", + "color": "#FF0000", + "background_color": "#FFFFFF", } assert d == final @@ -1252,7 +1236,7 @@ def test_analyze_result_to_dict(self): _models.Point(1427.0, 1698.0), ], span=_models.DocumentSpan(offset=5, length=2), - confidence=0.8 + confidence=0.8, ) ], formulas=[ @@ -1266,9 +1250,9 @@ def test_analyze_result_to_dict(self): _models.Point(1427.0, 1698.0), ], span=_models.DocumentSpan(offset=5, length=2), - confidence=0.8 + confidence=0.8, ) - ] + ], ), ], tables=[ @@ -1353,8 +1337,7 @@ def test_analyze_result_to_dict(self): font_style="italic", font_weight="bold", color="#FF0000", - background_color="#FFFFFF" - + background_color="#FFFFFF", ), ], documents=[ @@ -1506,14 +1489,11 @@ def test_analyze_result_to_dict(self): {"x": 1427.0, "y": 1669.0}, {"x": 1527.0, "y": 1669.0}, {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0} + {"x": 1427.0, "y": 1698.0}, ], "confidence": 0.8, - "span": { - "offset": 5, - "length": 2 - }, - "value": "15" + "span": {"offset": 5, "length": 2}, + "value": "15", } ], "formulas": [ @@ -1523,16 +1503,13 @@ def test_analyze_result_to_dict(self): {"x": 1427.0, "y": 1669.0}, {"x": 1527.0, "y": 1669.0}, {"x": 1527.0, "y": 1698.0}, - {"x": 1427.0, "y": 1698.0} + {"x": 1427.0, "y": 1698.0}, ], "confidence": 0.8, - "span": { - "offset": 5, - "length": 2 - }, - "value": "2+2=4" + "span": {"offset": 5, "length": 2}, + "value": "2+2=4", } - ] + ], }, ], "paragraphs": [ @@ -1655,7 +1632,7 @@ def test_analyze_result_to_dict(self): }, ], }, - "confidence": 0.89 + "confidence": 0.89, }, ], "styles": [ @@ -1668,11 +1645,11 @@ def test_analyze_result_to_dict(self): } ], "confidence": 1.0, - 'similar_font_family': 'Arial', - 'font_style': 'italic', - 'font_weight': 'bold', - 'color': '#FF0000', - 'background_color': '#FFFFFF', + "similar_font_family": "Arial", + "font_style": "italic", + "font_weight": "bold", + "color": "#FF0000", + "background_color": "#FFFFFF", }, ], "documents": [ @@ -1833,11 +1810,7 @@ def test_model_operation_to_dict(self): code="ResourceNotFound", message="Resource was not found", target="resource", - details=[ - _models.DocumentAnalysisError( - code="ResourceNotFound", message="Resource was not found" - ) - ], + details=[_models.DocumentAnalysisError(code="ResourceNotFound", message="Resource was not found")], innererror=_models.DocumentAnalysisInnerError( code="ResourceNotFound", message="Resource was not found", @@ -2196,14 +2169,11 @@ def test_document_classifier_details_to_dict(self): api_version="2023-07-31", doc_types={ "form-A": _models.ClassifierDocumentTypeDetails( - source=_models.BlobSource( - container_url="https://myaccount.blob.core.windows.net/blob-sas-url" - ) + source=_models.BlobSource(container_url="https://myaccount.blob.core.windows.net/blob-sas-url") ), "form-B": _models.ClassifierDocumentTypeDetails( source=_models.BlobFileListSource( - container_url="https://myaccount.blob.core.windows.net/blob-sas-url", - file_list="filelist.jsonl" + container_url="https://myaccount.blob.core.windows.net/blob-sas-url", file_list="filelist.jsonl" ) ), }, @@ -2263,16 +2233,15 @@ def test_document_model_info_to_dict(self): def test_resource_details_to_dict(self): model = _models.ResourceDetails( custom_document_models=_models.CustomDocumentModelsDetails(limit=5000, count=10), - neural_document_model_quota=_models.QuotaDetails( - used=0, - quota=20, - quota_resets_on="1994-11-05T13:15:30Z" - ) + neural_document_model_quota=_models.QuotaDetails(used=0, quota=20, quota_resets_on="1994-11-05T13:15:30Z"), ) d = model.to_dict() - final = {'custom_document_models': {'count': 10, 'limit': 5000}, 'neural_document_model_quota': {'used': 0, 'quota': 20, 'quota_resets_on': '1994-11-05T13:15:30Z'}} + final = { + "custom_document_models": {"count": 10, "limit": 5000}, + "neural_document_model_quota": {"used": 0, "quota": 20, "quota_resets_on": "1994-11-05T13:15:30Z"}, + } assert d == final def test_document_analysis_inner_error_to_dict(self): @@ -2303,11 +2272,7 @@ def test_document_analysis_error_to_dict(self): code="ResourceNotFound", message="Resource was not found", target="resource", - details=[ - _models.DocumentAnalysisError( - code="ResourceNotFound", message="Resource was not found" - ) - ], + details=[_models.DocumentAnalysisError(code="ResourceNotFound", message="Resource was not found")], innererror=_models.DocumentAnalysisInnerError( code="ResourceNotFound", message="Resource was not found", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py index 546005ffb571..3a0e5e81bb01 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py @@ -1,4 +1,3 @@ - # coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,16 +8,12 @@ import os import logging from azure.core.credentials import AccessToken -from azure.ai.formrecognizer._helpers import ( - adjust_value_type, - get_element, - adjust_confidence, - adjust_text_angle -) +from azure.ai.formrecognizer._helpers import adjust_value_type, get_element, adjust_confidence, adjust_text_angle from devtools_testutils import AzureRecordedTestCase, set_custom_default_matcher -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' -ENABLE_LOGGER = os.getenv('ENABLE_LOGGER', "False") +LOGGING_FORMAT = "%(asctime)s %(name)-20s %(levelname)-5s %(message)s" +ENABLE_LOGGER = os.getenv("ENABLE_LOGGER", "False") + def _get_blob_url(container_sas_url, container, file_name): if container_sas_url == "https://blob_sas_url": @@ -28,16 +23,19 @@ def _get_blob_url(container_sas_url, container, file_name): blob_sas_url = url[0] + url[1] return blob_sas_url + class FakeTokenCredential(object): """Protocol for classes able to provide OAuth tokens. :param str scopes: Lets you specify the type of access needed. """ + def __init__(self): self.token = AccessToken("YOU SHALL NOT PASS", 0) def get_token(self, *args, **kwargs): return self.token + class FormRecognizerTest(AzureRecordedTestCase): testing_container_sas_url = os.getenv("FORMRECOGNIZER_TESTING_DATA_CONTAINER_SAS_URL", "https://blob_sas_url") @@ -47,7 +45,9 @@ class FormRecognizerTest(AzureRecordedTestCase): receipt_url_png = _get_blob_url(testing_container_sas_url, "testingdata", "contoso-receipt.png") business_card_url_jpg = _get_blob_url(testing_container_sas_url, "testingdata", "businessCard.jpg") business_card_url_png = _get_blob_url(testing_container_sas_url, "testingdata", "businessCard.png") - business_card_multipage_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "business-card-multipage.pdf") + business_card_multipage_url_pdf = _get_blob_url( + testing_container_sas_url, "testingdata", "business-card-multipage.pdf" + ) identity_document_url_jpg = _get_blob_url(testing_container_sas_url, "testingdata", "license.jpg") identity_document_url_jpg_passport = _get_blob_url(testing_container_sas_url, "testingdata", "passport_1.jpg") invoice_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "Invoice_1.pdf") @@ -58,36 +58,70 @@ class FormRecognizerTest(AzureRecordedTestCase): multipage_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "multipage_invoice1.pdf") multipage_table_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "multipagelayout.pdf") selection_mark_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "selection_mark_form.pdf") - label_table_variable_row_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "label_table_variable_rows1.pdf") - label_table_fixed_row_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "label_table_fixed_rows1.pdf") + label_table_variable_row_url_pdf = _get_blob_url( + testing_container_sas_url, "testingdata", "label_table_variable_rows1.pdf" + ) + label_table_fixed_row_url_pdf = _get_blob_url( + testing_container_sas_url, "testingdata", "label_table_fixed_rows1.pdf" + ) multipage_receipt_url_pdf = _get_blob_url(testing_container_sas_url, "testingdata", "multipage_receipt.pdf") invoice_no_sub_line_item = _get_blob_url(testing_container_sas_url, "testingdata", "ErrorImage.tiff") irs_classifier_document_url = _get_blob_url(testing_container_sas_url, "testingdata", "IRS-1040_2.pdf") # file stream samples - receipt_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/contoso-allinone.jpg")) - receipt_png = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/contoso-receipt.png")) - business_card_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/business_cards/business-card-english.jpg")) - business_card_png = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/business_cards/business-card-english.png")) - business_card_multipage_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/business_cards/business-card-multipage.pdf")) - identity_document_license_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/identity_documents/license.jpg")) - identity_document_passport_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/identity_documents/passport_1.jpg")) + receipt_jpg = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/contoso-allinone.jpg") + ) + receipt_png = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/contoso-receipt.png") + ) + business_card_jpg = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/business_cards/business-card-english.jpg") + ) + business_card_png = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/business_cards/business-card-english.png") + ) + business_card_multipage_pdf = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/business_cards/business-card-multipage.pdf") + ) + identity_document_license_jpg = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/identity_documents/license.jpg") + ) + identity_document_passport_jpg = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/identity_documents/passport_1.jpg") + ) invoice_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/Invoice_1.pdf")) invoice_tiff = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/Invoice_1.tiff")) - invoice_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/sample_invoice.jpg")) + invoice_jpg = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/sample_invoice.jpg") + ) form_jpg = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/Form_1.jpg")) blank_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/blank.pdf")) - multipage_invoice_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/multipage_invoice1.pdf")) + multipage_invoice_pdf = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/multipage_invoice1.pdf") + ) unsupported_content_py = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./conftest.py")) - multipage_table_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/multipagelayout.pdf")) - multipage_vendor_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/multi1.pdf")) - selection_form_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/selection_mark_form.pdf")) - multipage_receipt_pdf = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/multipage_receipt.pdf")) + multipage_table_pdf = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/multipagelayout.pdf") + ) + multipage_vendor_pdf = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/multi1.pdf") + ) + selection_form_pdf = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/selection_mark_form.pdf") + ) + multipage_receipt_pdf = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/receipt/multipage_receipt.pdf") + ) invoice_docx = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/invoice.docx")) w2_png = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/tax/sample_w2.png")) html_file = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/simple_html.html")) - spreadsheet = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/spreadsheet_example.xlsx")) - irs_classifier_document = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/IRS-1040.pdf")) + spreadsheet = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/spreadsheet_example.xlsx") + ) + irs_classifier_document = os.path.abspath( + os.path.join(os.path.abspath(__file__), "..", "./sample_forms/forms/IRS-1040.pdf") + ) def get_oauth_endpoint(self): return os.getenv("FORMRECOGNIZER_TEST_ENDPOINT") @@ -95,6 +129,7 @@ def get_oauth_endpoint(self): def generate_oauth_token(self): if self.is_live: from azure.identity import ClientSecretCredential + return ClientSecretCredential( os.getenv("FORMRECOGNIZER_TENANT_ID"), os.getenv("FORMRECOGNIZER_CLIENT_ID"), @@ -109,7 +144,7 @@ def configure_logging(self): self.enable_logging() if ENABLE_LOGGER == "True" else self.disable_logging() def enable_logging(self): - self.logger = logging.getLogger('azure') + self.logger = logging.getLogger("azure") handler = logging.StreamHandler() handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) self.logger.handlers = [handler] @@ -148,7 +183,9 @@ def assertFormPagesTransformCorrect(self, form_pages, read_result, page_result=N for line, expected_line in zip(page.lines or [], expected_page.lines or []): self.assertFormLineTransformCorrect(line, expected_line) - for selection_mark, expected_selection_mark in zip(page.selection_marks or [], expected_page.selection_marks or []): + for selection_mark, expected_selection_mark in zip( + page.selection_marks or [], expected_page.selection_marks or [] + ): self.assertFormSelectionMarkHasValues(selection_mark, expected_page.page) if page_result: @@ -177,13 +214,13 @@ def assertBoundingPolygonTransformCorrect(self, polygon, expected): count = 0 for point in polygon: assert point.x == expected[count] - assert point.y == expected[count+1] + assert point.y == expected[count + 1] count = count + 2 def assertFormWordTransformCorrect(self, word, expected): assert word.text == expected.text assert word.confidence == adjust_confidence(expected.confidence) - assert word.kind == "word" + assert word.kind == "word" self.assertBoundingBoxTransformCorrect(word.bounding_box, expected.bounding_box) def assertFormLineTransformCorrect(self, line, expected): @@ -240,9 +277,7 @@ def assertFormFieldValueTransformCorrect(self, form_field, expected, read_result assert expected.page == form_field.value_data.page_number if read_results: self.assertFieldElementsTransFormCorrect( - form_field.value_data.field_elements, - expected.elements, - read_results + form_field.value_data.field_elements, expected.elements, read_results ) def assertFormFieldsTransformCorrect(self, form_fields, generated_fields, read_results=None): @@ -262,22 +297,22 @@ def assertUnlabeledFormFieldDictTransformCorrect(self, form_fields, generated_fi if generated_fields is None: return for idx, expected in enumerate(generated_fields): - assert adjust_confidence(expected.confidence) == form_fields["field-"+str(idx)].confidence - assert expected.key.text == form_fields["field-"+str(idx)].label_data.text - self.assertBoundingBoxTransformCorrect(form_fields["field-"+str(idx)].label_data.bounding_box, expected.key.bounding_box) + assert adjust_confidence(expected.confidence) == form_fields["field-" + str(idx)].confidence + assert expected.key.text == form_fields["field-" + str(idx)].label_data.text + self.assertBoundingBoxTransformCorrect( + form_fields["field-" + str(idx)].label_data.bounding_box, expected.key.bounding_box + ) if read_results: self.assertFieldElementsTransFormCorrect( - form_fields["field-"+str(idx)].label_data.field_elements, - expected.key.elements, - read_results + form_fields["field-" + str(idx)].label_data.field_elements, expected.key.elements, read_results ) assert expected.value.text == form_fields["field-" + str(idx)].value_data.text - self.assertBoundingBoxTransformCorrect(form_fields["field-" + str(idx)].value_data.bounding_box, expected.value.bounding_box) + self.assertBoundingBoxTransformCorrect( + form_fields["field-" + str(idx)].value_data.bounding_box, expected.value.bounding_box + ) if read_results: self.assertFieldElementsTransFormCorrect( - form_fields["field-"+str(idx)].value_data.field_elements, - expected.value.elements, - read_results + form_fields["field-" + str(idx)].value_data.field_elements, expected.value.elements, read_results ) def assertTablesTransformCorrect(self, layout, expected_layout, read_results=None, **kwargs): @@ -328,7 +363,9 @@ def assertReceiptItemsHasValues(self, items, page_number, include_field_elements if item.value.get("Quantity", None): self.assertFieldElementsHasValues(item.value.get("Quantity").value_data.field_elements, page_number) if item.value.get("TotalPrice", None): - self.assertFieldElementsHasValues(item.value.get("TotalPrice").value_data.field_elements, page_number) + self.assertFieldElementsHasValues( + item.value.get("TotalPrice").value_data.field_elements, page_number + ) if item.value.get("Price", None): self.assertFieldElementsHasValues(item.value.get("Price").value_data.field_elements, page_number) @@ -382,11 +419,17 @@ def assertInvoiceItemsHasValues(self, items, page_number, include_field_elements if item.value.get("Quantity", None): self.assertFieldElementsHasValues(item.value.get("Quantity").value_data.field_elements, page_number) if item.value.get("Description", None): - self.assertFieldElementsHasValues(item.value.get("Description").value_data.field_elements, page_number) + self.assertFieldElementsHasValues( + item.value.get("Description").value_data.field_elements, page_number + ) if item.value.get("UnitPrice", None): - self.assertFieldElementsHasValues(item.value.get("UnitPrice").value_data.field_elements, page_number) + self.assertFieldElementsHasValues( + item.value.get("UnitPrice").value_data.field_elements, page_number + ) if item.value.get("ProductCode", None): - self.assertFieldElementsHasValues(item.value.get("ProductCode").value_data.field_elements, page_number) + self.assertFieldElementsHasValues( + item.value.get("ProductCode").value_data.field_elements, page_number + ) if item.value.get("Unit", None): self.assertFieldElementsHasValues(item.value.get("Unit").value_data.field_elements, page_number) if item.value.get("Date", None): @@ -578,7 +621,7 @@ def assertDocumentStylesTransformCorrect(self, transformed_styles, raw_styles, * assert style.confidence == expected.confidence for span, expected_span in zip(style.spans or [], expected.spans or []): - self.assertSpanTransformCorrect(span, expected_span) + self.assertSpanTransformCorrect(span, expected_span) def assertDocumentKeyValueElementTransformCorrect(self, element, expected, *kwargs): if not element or not expected: @@ -586,7 +629,7 @@ def assertDocumentKeyValueElementTransformCorrect(self, element, expected, *kwar assert element.content == expected.content for span, expected_span in zip(element.spans or [], expected.spans or []): - self.assertSpanTransformCorrect(span, expected_span) + self.assertSpanTransformCorrect(span, expected_span) self.assertBoundingRegionsTransformCorrect(element.bounding_regions, expected.bounding_regions) @@ -635,7 +678,7 @@ def assertDocumentTableCellTransformCorrect(self, transformed_cell, raw_cell, ** assert transformed_cell.content == raw_cell.content for span, expected_span in zip(transformed_cell.spans or [], raw_cell.spans or []): - self.assertSpanTransformCorrect(span, expected_span) + self.assertSpanTransformCorrect(span, expected_span) self.assertBoundingRegionsTransformCorrect(transformed_cell.bounding_regions, raw_cell.bounding_regions) @@ -654,7 +697,9 @@ def assertDocumentPagesTransformCorrect(self, transformed_pages, raw_pages, **kw for word, expected_word in zip(page.words or [], expected_page.words or []): self.assertDocumentWordTransformCorrect(word, expected_word) - for selection_mark, expected_selection_mark in zip(page.selection_marks or [], expected_page.selection_marks or []): + for selection_mark, expected_selection_mark in zip( + page.selection_marks or [], expected_page.selection_marks or [] + ): self.assertDocumentSelectionMarkTransformCorrect(selection_mark, expected_selection_mark) for span, expected_span in zip(page.spans or [], expected_page.spans or []): @@ -694,13 +739,17 @@ def assertDocumentFieldsTransformCorrect(self, document_fields, generated_fields assert expected.confidence == document_fields[label].confidence # In the case of content for a signature type field we get '' in expected.content # vs. None for document_fields[label].content - assert (expected.content == document_fields[label].content) or (expected.content == '' and not document_fields[label].content) + assert (expected.content == document_fields[label].content) or ( + expected.content == "" and not document_fields[label].content + ) self.assertDocumentFieldValueTransformCorrect(document_fields[label], expected) for span, expected_span in zip(document_fields[label].spans or [], expected.spans or []): self.assertSpanTransformCorrect(span, expected_span) - self.assertBoundingRegionsTransformCorrect(document_fields[label].bounding_regions, expected.bounding_regions) + self.assertBoundingRegionsTransformCorrect( + document_fields[label].bounding_regions, expected.bounding_regions + ) def assertBoundingRegionsTransformCorrect(self, bounding_regions, expected): if bounding_regions == [] and not expected: @@ -709,7 +758,6 @@ def assertBoundingRegionsTransformCorrect(self, bounding_regions, expected): assert region.page_number == expected_region.page_number self.assertBoundingPolygonTransformCorrect(region.polygon, expected_region.polygon) - def assertDocumentFieldValueTransformCorrect(self, document_field, expected): if expected is None: return diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_patch.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_patch.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_patch.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_patch.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_patch.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_patch.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/models/_patch.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/models/_patch.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_patch.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_patch.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/graphservices/azure-mgmt-graphservices/setup.py b/sdk/graphservices/azure-mgmt-graphservices/setup.py index a95d225b369f..105b8e5101c2 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/setup.py +++ b/sdk/graphservices/azure-mgmt-graphservices/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_patch.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_patch.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/_patch.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/_patch.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/operations/_patch.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/operations/_patch.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_patch.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_patch.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_patch.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_patch.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py index 8a6c46050b52..59165d591353 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,59 +16,65 @@ PACKAGE_PPRINT_NAME = "SAP Hana on Azure Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), install_requires=[ - 'msrest>=0.6.21', - 'azure-common~=1.1', - 'azure-mgmt-core>=1.3.0,<2.0.0', + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-mgmt-core>=1.3.0,<2.0.0", ], - python_requires=">=3.6" + python_requires=">=3.6", ) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/tests/test_azure_mgmt_hanaonazure.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/tests/test_azure_mgmt_hanaonazure.py index 582a90352263..780020fd753f 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/tests/test_azure_mgmt_hanaonazure.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/tests/test_azure_mgmt_hanaonazure.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest @@ -12,32 +12,31 @@ from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer + class TestMgmtHanaOnAzure(AzureMgmtRecordedTestCase): def setUp(self): super(TestMgmtHanaOnAzure, self).setUp() - self.hanaonazure_client = self.create_mgmt_client( - azure.mgmt.hanaonazure.HanaManagementClient - ) + self.hanaonazure_client = self.create_mgmt_client(azure.mgmt.hanaonazure.HanaManagementClient) def process(self, result): pass - #def test_hanainstance_list(self): + # def test_hanainstance_list(self): # hanainstances = list(self.hanaonazure_client.hana_instances.list()) # self.assertEqual(len(hanainstances), 3) # - #@ResourceGroupPreparer() - #def test_hanainstance_list_by_resource_group(self, resource_group): + # @ResourceGroupPreparer() + # def test_hanainstance_list_by_resource_group(self, resource_group): # # resource_group_name = resource_group.name # # hanainstances = list(self.hanaonazure_client.hana_instances.list_by_resource_group(resource_group_name)) # self.assertEqual(len(hanainstances), 3) - #@ResourceGroupPreparer() - #def test_hanainstance_get(self, resource_group): + # @ResourceGroupPreparer() + # def test_hanainstance_get(self, resource_group): # resource_group_name = resource_group.name # resource_name = "testhanainstanceresourcename" @@ -45,6 +44,7 @@ def process(self, result): # hanainstance = self.hanaonazure_client.hana_instances.get(resource_group_name, resource_name) # self.assertEqual(hanainstance.name, resource_name) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/_patch.py b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/_patch.py +++ b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/_patch.py b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/_patch.py +++ b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/operations/_patch.py b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/operations/_patch.py +++ b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/models/_patch.py b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/models/_patch.py +++ b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/operations/_patch.py b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/operations/_patch.py +++ b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/azure/mgmt/hardwaresecuritymodules/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/setup.py b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/setup.py index 84d9f3f9ccae..e27651f6748a 100644 --- a/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/setup.py +++ b/sdk/hardwaresecuritymodules/azure-mgmt-hardwaresecuritymodules/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/_patch.py b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/_patch.py +++ b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/_patch.py b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/_patch.py +++ b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/operations/_patch.py b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/operations/_patch.py +++ b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/models/_patch.py b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/models/_patch.py +++ b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/operations/_patch.py b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/operations/_patch.py +++ b/sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_patch.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_patch.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_patch.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_patch.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_patch.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_patch.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_patch.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_patch.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_patch.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_patch.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py index 0fb88ebc1513..5c387325a69e 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/tests/disable_test_cli_mgmt_healthcareapis.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/tests/disable_test_cli_mgmt_healthcareapis.py index 2deca9bba9c9..ee216038c1fa 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/tests/disable_test_cli_mgmt_healthcareapis.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/tests/disable_test_cli_mgmt_healthcareapis.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,16 +21,15 @@ import azure.mgmt.healthcareapis from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtHealthcareApisTest(AzureMgmtTestCase): def setUp(self): super(MgmtHealthcareApisTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.healthcareapis.HealthcareApisManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.healthcareapis.HealthcareApisManagementClient) + @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_healthcareapis(self, resource_group): @@ -41,44 +40,27 @@ def test_healthcareapis(self, resource_group): # ServicePut[put] BODY = { - "location": "eastus", - "kind": "fhir", - "properties": { - "access_policies": [ - { - "object_id": "c487e7d1-3210-41a3-8ccc-e9372b78da47" - }, - { - "object_id": "5b307da8-43d4-492b-8b66-b0294ade872f" - } - ], - "cosmos_db_configuration": { - "offer_throughput": "1000" + "location": "eastus", + "kind": "fhir", + "properties": { + "access_policies": [ + {"object_id": "c487e7d1-3210-41a3-8ccc-e9372b78da47"}, + {"object_id": "5b307da8-43d4-492b-8b66-b0294ade872f"}, + ], + "cosmos_db_configuration": {"offer_throughput": "1000"}, + "authentication_configuration": { + "authority": "https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc", + "audience": "https://azurehealthcareapis.com", + "smart_proxy_enabled": True, + }, + "cors_configuration": { + "origins": ["*"], + "headers": ["*"], + "methods": ["DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT"], + "max_age": "1440", + "allow_credentials": False, + }, }, - "authentication_configuration": { - "authority": "https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc", - "audience": "https://azurehealthcareapis.com", - "smart_proxy_enabled": True - }, - "cors_configuration": { - "origins": [ - "*" - ], - "headers": [ - "*" - ], - "methods": [ - "DELETE", - "GET", - "OPTIONS", - "PATCH", - "POST", - "PUT" - ], - "max_age": "1440", - "allow_credentials": False - } - } } result = self.mgmt_client.services.create_or_update(resource_group.name, SERVICE_NAME, BODY) result = result.result() @@ -99,21 +81,13 @@ def test_healthcareapis(self, resource_group): result = self.mgmt_client.operations.list() # ServicePatch[patch] - BODY = { - "tags": { - "tag1": "value1", - "tag2": "value2" - } - } + BODY = {"tags": {"tag1": "value1", "tag2": "value2"}} result = self.mgmt_client.services.update(resource_group.name, SERVICE_NAME, BODY) result = result.result() # CheckNameAvailabilityPost[post] - BODY = { - "type": "Microsoft.HealthcareApis/services", - "name": "serviceName" - } - NAME = SERVICE_NAME + 'ABC' + BODY = {"type": "Microsoft.HealthcareApis/services", "name": "serviceName"} + NAME = SERVICE_NAME + "ABC" TYPE = "Microsoft.HealthcareApis/services" result = self.mgmt_client.services.check_name_availability(NAME, TYPE) @@ -122,6 +96,6 @@ def test_healthcareapis(self, resource_group): result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_operations/_patch.py b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_operations/_patch.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_patch.py b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_patch.py index bb09ee2cbf77..5314b15196db 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_patch.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Iterable, List from azure.core.tracing.decorator import distributed_trace from azure.health.deidentification.models import DeidentificationDocumentDetails, DeidentificationJob diff --git a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_operations/_patch.py b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_operations/_patch.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_patch.py b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_patch.py index 62b77226c9f1..16392044334f 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_patch.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, AsyncIterable, List from azure.core.tracing.decorator import distributed_trace diff --git a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/models/_patch.py b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/models/_patch.py index 36869c12d74a..ec7b743a5c7e 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/models/_patch.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/azure/health/deidentification/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import TYPE_CHECKING, List if TYPE_CHECKING: diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_documents_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_documents_async.py index fe065600659e..cd81e7e910c4 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_documents_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_documents_async.py @@ -8,7 +8,7 @@ FILE: deidentify_documents_async.py DESCRIPTION: - This sample demonstrates a basic scenario of de-identifying documents in Azure Storage. + This sample demonstrates a basic scenario of de-identifying documents in Azure Storage. Taking a container URI and an input prefix, the sample will create a job and wait for the job to complete. USAGE: @@ -21,7 +21,6 @@ For example, providing "folder1" would create a job that would process documents like "https://.blob.core.windows.net//folder1/document1.txt". """ - import asyncio from azure.core.polling import AsyncLROPoller from azure.health.deidentification.aio import DeidentificationClient diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_redact_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_redact_async.py index 2563e8d8c69e..17105499e319 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_redact_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_redact_async.py @@ -17,7 +17,6 @@ 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. """ - import asyncio from azure.health.deidentification.aio import DeidentificationClient from azure.health.deidentification.models import ( diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_async.py index aefa7eea4f63..603aca2b756a 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_async.py @@ -17,7 +17,6 @@ 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. """ - import asyncio from azure.health.deidentification.aio import DeidentificationClient from azure.health.deidentification.models import ( diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_only_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_only_async.py index 62008166d747..bc752ab0a5ac 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_only_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_surrogate_only_async.py @@ -17,7 +17,6 @@ 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. """ - import asyncio from azure.health.deidentification.aio import DeidentificationClient from azure.health.deidentification.models import ( diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_tag_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_tag_async.py index 49b19ae181e4..70a347bdac8b 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_tag_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/deidentify_text_tag_async.py @@ -17,7 +17,6 @@ 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. """ - import asyncio from azure.health.deidentification.aio import DeidentificationClient from azure.health.deidentification.models import ( diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_job_documents_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_job_documents_async.py index 54ea3ec0464c..d75c8b8476e4 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_job_documents_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_job_documents_async.py @@ -20,7 +20,6 @@ For example, providing "folder1" would create a job that would process documents like "https://.blob.core.windows.net//folder1/document1.txt". """ - import asyncio from azure.core.polling import AsyncLROPoller from azure.health.deidentification.aio import DeidentificationClient diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_jobs_async.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_jobs_async.py index caed2ca594e5..48888017cc3e 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_jobs_async.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/async_samples/list_jobs_async.py @@ -16,7 +16,6 @@ 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. """ - import asyncio from azure.health.deidentification.aio import DeidentificationClient from azure.identity.aio import DefaultAzureCredential diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/deidentify_documents.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/deidentify_documents.py index ac6e2c05026d..d8e06d9c4539 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/deidentify_documents.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/deidentify_documents.py @@ -8,7 +8,7 @@ FILE: deidentify_documents.py DESCRIPTION: - This sample demonstrates a basic scenario of de-identifying documents in Azure Storage. + This sample demonstrates a basic scenario of de-identifying documents in Azure Storage. Taking a container URI and an input prefix, the sample will create a job and wait for the job to complete. USAGE: @@ -17,7 +17,7 @@ Set the environment variables with your own values before running the sample: 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. 2) HEALTHDATAAISERVICES_STORAGE_ACCOUNT_LOCATION - an Azure Storage container endpoint, like "https://.blob.core.windows.net/". - 3) INPUT_PREFIX - the prefix of the input document name(s) in the container. + 3) INPUT_PREFIX - the prefix of the input document name(s) in the container. For example, providing "folder1" would create a job that would process documents like "https://.blob.core.windows.net//folder1/document1.txt". 4) OUTPUT_PREFIX - the prefix of the output document name(s) in the container. This will appear as a folder which will be created if it does not exist, and defaults to "_output" if not provided. For example, providing "_output1" would output documents like "https://.blob.core.windows.net//_output1/document1.txt". diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/examples.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/examples.py index 5bf55a218ee9..c4fded414a8b 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/examples.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/examples.py @@ -3,7 +3,6 @@ from azure.identity import DefaultAzureCredential import os - endpoint = os.environ["HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT"] credential = DefaultAzureCredential() client = DeidentificationClient(endpoint, credential) @@ -15,7 +14,6 @@ DeidentificationContent, ) - error_client = DeidentificationClient("https://contoso.deid.azure.com", credential) body = DeidentificationContent(input_text="Hello, I'm Dr. John Smith.") diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/list_job_documents.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/list_job_documents.py index 1322e0a75285..e7e52a80f540 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/list_job_documents.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/list_job_documents.py @@ -22,7 +22,6 @@ For example, providing "_output1" would output documents like "https://.blob.core.windows.net//_output1/document1.txt". """ - from azure.health.deidentification import DeidentificationClient from azure.health.deidentification.models import ( DeidentificationJob, diff --git a/sdk/healthdataaiservices/azure-health-deidentification/samples/list_jobs.py b/sdk/healthdataaiservices/azure-health-deidentification/samples/list_jobs.py index 2de4081b8139..8a16d7efa7b3 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/samples/list_jobs.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/samples/list_jobs.py @@ -16,7 +16,6 @@ 1) HEALTHDATAAISERVICES_DEID_SERVICE_ENDPOINT - the service URL endpoint for a de-identification service. """ - from azure.health.deidentification import DeidentificationClient from azure.identity import DefaultAzureCredential import os diff --git a/sdk/healthdataaiservices/azure-health-deidentification/setup.py b/sdk/healthdataaiservices/azure-health-deidentification/setup.py index 1fd15892a972..1b8951f7682b 100644 --- a/sdk/healthdataaiservices/azure-health-deidentification/setup.py +++ b/sdk/healthdataaiservices/azure-health-deidentification/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-health-deidentification" PACKAGE_PPRINT_NAME = "Azure Health Deidentification" diff --git a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/_patch.py b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/_patch.py +++ b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/_patch.py b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/_patch.py +++ b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/operations/_patch.py b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/operations/_patch.py +++ b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/models/_patch.py b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/models/_patch.py +++ b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/operations/_patch.py b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/operations/_patch.py +++ b/sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py index 4ac3aa0699a5..692697cfacf2 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py @@ -18,9 +18,7 @@ from ._serialization import Deserializer, Serializer -class CancerProfilingClient( - CancerProfilingClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword +class CancerProfilingClient(CancerProfilingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """CancerProfilingClient. :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py index c6fcd9a18c25..7037c32f1597 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py @@ -329,8 +329,7 @@ def pop(self, key: str) -> typing.Any: # pylint: disable=no-member ... @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: - ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -347,12 +346,10 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: self._data.update(*args, **kwargs) @typing.overload # type: ignore - def setdefault(self, key: str) -> typing.Any: - ... + def setdefault(self, key: str) -> typing.Any: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: - ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -709,6 +706,8 @@ def rest_field( def rest_discriminator( - *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py index f91de6cc4e79..aa922bca7c34 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py @@ -50,8 +50,7 @@ def __init__( code: str, name: Optional[str] = None, value: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -96,8 +95,7 @@ def __init__( offset: int, length: int, text: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -139,8 +137,7 @@ def __init__( *, source_type: Union[str, "_models.DocumentContentSourceType"], value: str, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -192,8 +189,7 @@ def __init__( details: List["_models.Error"], target: Optional[str] = None, innererror: Optional["_models.InnerError"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -236,8 +232,7 @@ def __init__( patient_data_evidence: Optional["_models.ClinicalNoteEvidence"] = None, patient_info_evidence: Optional["_models.ClinicalCodedElement"] = None, importance: Optional[float] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -274,8 +269,7 @@ def __init__( *, code: str, innererror: Optional["_models.InnerError"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -311,8 +305,7 @@ def __init__( *, patients: List["_models.PatientRecord"], configuration: Optional["_models.OncoPhenotypeModelConfiguration"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -347,7 +340,7 @@ class OncoPhenotypeInference(_model_base.Model): :vartype case_id: str """ - type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() # pylint: disable=redefined-builtin """The type of the Onco Phenotype inference. Required. Known values are: \"tumorSite\", \"histology\", \"clinicalStageT\", \"clinicalStageN\", \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", and \"pathologicStageM\". """ @@ -366,14 +359,13 @@ class OncoPhenotypeInference(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.OncoPhenotypeInferenceType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.OncoPhenotypeInferenceType"], # pylint: disable=redefined-builtin value: str, description: Optional[str] = None, confidence_score: Optional[float] = None, evidence: Optional[List["_models.InferenceEvidence"]] = None, case_id: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -426,8 +418,7 @@ def __init__( include_evidence: bool = True, inference_types: Optional[List[Union[str, "_models.OncoPhenotypeInferenceType"]]] = None, check_for_cancer_case: bool = False, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -462,8 +453,7 @@ def __init__( *, id: str, # pylint: disable=redefined-builtin inferences: List["_models.OncoPhenotypeInference"], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -543,8 +533,7 @@ def __init__( *, patients: List["_models.OncoPhenotypePatientResult"], model_version: str, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -583,7 +572,7 @@ class PatientDocument(_model_base.Model): :vartype content: ~azure.healthinsights.cancerprofiling.models.DocumentContent """ - type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") @@ -602,14 +591,13 @@ class PatientDocument(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin id: str, # pylint: disable=redefined-builtin content: "_models.DocumentContent", clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, language: Optional[str] = None, created_date_time: Optional[datetime.datetime] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -648,8 +636,7 @@ def __init__( sex: Optional[Union[str, "_models.PatientInfoSex"]] = None, birth_date: Optional[datetime.date] = None, clinical_info: Optional[List["_models.ClinicalCodedElement"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -691,8 +678,7 @@ def __init__( id: str, # pylint: disable=redefined-builtin info: Optional["_models.PatientInfo"] = None, data: Optional[List["_models.PatientDocument"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py index c8724d108f71..4c0c27bec1b9 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py @@ -37,8 +37,7 @@ async def infer_cancer_profiling_async(self) -> None: # Create an Onco Phenotype client # - cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Construct patient @@ -70,14 +69,14 @@ async def infer_cancer_profiling_async(self) -> None: Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks.""" - patient_document1 = models.PatientDocument(type=models.DocumentType.NOTE, - id="doc1", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=doc_content1), - clinical_type=models.ClinicalDocumentType.IMAGING, - language="en", - created_date_time=datetime.datetime(2021, 8, 15)) + patient_document1 = models.PatientDocument( + type=models.DocumentType.NOTE, + id="doc1", + content=models.DocumentContent(source_type=models.DocumentContentSourceType.INLINE, value=doc_content1), + clinical_type=models.ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15), + ) doc_content2 = """ Oncology Clinic @@ -107,14 +106,14 @@ async def infer_cancer_profiling_async(self) -> None: Could benefit from biological therapy. Different treatment options were explained- the patient wants to get a second opinion.""" - patient_document2 = models.PatientDocument(type=models.DocumentType.NOTE, - id="doc2", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=doc_content2), - clinical_type=models.ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2021, 10, 20)) + patient_document2 = models.PatientDocument( + type=models.DocumentType.NOTE, + id="doc2", + content=models.DocumentContent(source_type=models.DocumentContentSourceType.INLINE, value=doc_content2), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20), + ) doc_content3 = """ PATHOLOGY REPORT @@ -138,14 +137,14 @@ async def infer_cancer_profiling_async(self) -> None: Blocks with invasive carcinoma: A1 Special studies: Pending""" - patient_document3 = models.PatientDocument(type=models.DocumentType.NOTE, - id="doc3", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=doc_content3), - clinical_type=models.ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2022, 1, 1)) + patient_document3 = models.PatientDocument( + type=models.DocumentType.NOTE, + id="doc3", + content=models.DocumentContent(source_type=models.DocumentContentSourceType.INLINE, value=doc_content3), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1), + ) patient_doc_list = [patient_document1, patient_document2, patient_document3] patient1.data = patient_doc_list @@ -174,13 +173,11 @@ def print_inferences(cancer_profiling_result): for patient_result in results.patients: print(f"\n==== Inferences of Patient {patient_result.id} ====") for inference in patient_result.inferences: - print( - f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ + print(f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ ConfidenceScore: {inference.confidence_score} ===") for evidence in inference.evidence: data_evidence = evidence.patient_data_evidence - print( - f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ + print(f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ {data_evidence.text}") else: errors = cancer_profiling_result.errors diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py index 27c38ade5906..369c02f53c41 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -67,14 +67,14 @@ def infer_cancer_profiling(self) -> None: Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks.""" - patient_document1 = models.PatientDocument(type=models.DocumentType.NOTE, - id="doc1", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=doc_content1), - clinical_type=models.ClinicalDocumentType.IMAGING, - language="en", - created_date_time=datetime.datetime(2021, 8, 15)) + patient_document1 = models.PatientDocument( + type=models.DocumentType.NOTE, + id="doc1", + content=models.DocumentContent(source_type=models.DocumentContentSourceType.INLINE, value=doc_content1), + clinical_type=models.ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15), + ) doc_content2 = """ Oncology Clinic @@ -104,14 +104,14 @@ def infer_cancer_profiling(self) -> None: Could benefit from biological therapy. Different treatment options were explained- the patient wants to get a second opinion.""" - patient_document2 = models.PatientDocument(type=models.DocumentType.NOTE, - id="doc2", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=doc_content2), - clinical_type=models.ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2021, 10, 20)) + patient_document2 = models.PatientDocument( + type=models.DocumentType.NOTE, + id="doc2", + content=models.DocumentContent(source_type=models.DocumentContentSourceType.INLINE, value=doc_content2), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20), + ) doc_content3 = """ PATHOLOGY REPORT @@ -135,14 +135,14 @@ def infer_cancer_profiling(self) -> None: Blocks with invasive carcinoma: A1 Special studies: Pending""" - patient_document3 = models.PatientDocument(type=models.DocumentType.NOTE, - id="doc3", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=doc_content3), - clinical_type=models.ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2022, 1, 1)) + patient_document3 = models.PatientDocument( + type=models.DocumentType.NOTE, + id="doc3", + content=models.DocumentContent(source_type=models.DocumentContentSourceType.INLINE, value=doc_content3), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1), + ) patient_doc_list = [patient_document1, patient_document2, patient_document3] patient1.data = patient_doc_list @@ -171,16 +171,12 @@ def print_inferences(cancer_profiling_result): for patient_result in results.patients: print(f"\n==== Inferences of Patient {patient_result.id} ====") for inference in patient_result.inferences: - print( - f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ - ConfidenceScore: {inference.confidence_score} ===" - ) + print(f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ + ConfidenceScore: {inference.confidence_score} ===") for evidence in inference.evidence: data_evidence = evidence.patient_data_evidence - print( - f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ - {data_evidence.text}" - ) + print(f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ + {data_evidence.text}") else: errors = cancer_profiling_result.errors if errors is not None: diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py index 661aee6d571a..31c7df38fa4f 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-healthinsights-cancerprofiling" PACKAGE_PPRINT_NAME = "Cognitive Services Health Insights Cancer Profilings" @@ -29,7 +28,7 @@ setup( name=PACKAGE_NAME, version=version, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=open("README.md", "r").read(), long_description_content_type="text/markdown", license="MIT License", diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py index ce09206dd299..1c59fd964e90 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py @@ -47,6 +47,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer( regex=healthinsights_endpoint, value="https://fake_ad_resource.cognitiveservices.azure.com/" ) - add_general_regex_sanitizer( - regex=healthinsights_key, value="00000000000000000000000000000000" - ) + add_general_regex_sanitizer(regex=healthinsights_key, value="00000000000000000000000000000000") diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py index ca5d27e50044..ff4cdda73ba1 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py @@ -30,34 +30,28 @@ def test_cancer_profiling(self, healthinsights_endpoint, healthinsights_key): assert cancer_profiling_client is not None data = { - "configuration": { - "checkForCancerCase": True, - "verbose": False, - "includeEvidence": True - }, - "patients": [ - { - "id": "patient1", - "data": [ + "configuration": {"checkForCancerCase": True, "verbose": False, "includeEvidence": True}, + "patients": [ { - "kind": "note", - "clinicalType": "pathology", - "id": "document1", - "language": "en", - "createdDateTime": "2022-01-01T00:00:00", - "content": { - "sourceType": "inline", - "value": "Laterality: Left \n Tumor type present: Invasive duct carcinoma; duct carcinoma in situ \n Tumor site: Upper inner quadrant \n Invasive carcinoma \n Histologic type: Ductal \n Size of invasive component: 0.9 cm \n Histologic Grade - Nottingham combined histologic score: 1 out of 3 \n In situ carcinoma (DCIS) \n Histologic type of DCIS: Cribriform and solid \n Necrosis in DCIS: Yes \n DCIS component of invasive carcinoma: Extensive \n" - } + "id": "patient1", + "data": [ + { + "kind": "note", + "clinicalType": "pathology", + "id": "document1", + "language": "en", + "createdDateTime": "2022-01-01T00:00:00", + "content": { + "sourceType": "inline", + "value": "Laterality: Left \n Tumor type present: Invasive duct carcinoma; duct carcinoma in situ \n Tumor site: Upper inner quadrant \n Invasive carcinoma \n Histologic type: Ductal \n Size of invasive component: 0.9 cm \n Histologic Grade - Nottingham combined histologic score: 1 out of 3 \n In situ carcinoma (DCIS) \n Histologic type of DCIS: Cribriform and solid \n Necrosis in DCIS: Yes \n DCIS component of invasive carcinoma: Extensive \n", + }, + } + ], } - ] - } - ] + ], } poller = cancer_profiling_client.begin_infer_cancer_profile(data) results = poller.result() assert len(results.results.patients[0].inferences) is not 0 - - diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py index cedbc25ec4df..66b24b16b64e 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py @@ -329,8 +329,7 @@ def pop(self, key: str) -> typing.Any: # pylint: disable=no-member ... @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: - ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -347,12 +346,10 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: self._data.update(*args, **kwargs) @typing.overload # type: ignore - def setdefault(self, key: str) -> typing.Any: - ... + def setdefault(self, key: str) -> typing.Any: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: - ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: if default is _UNSET: @@ -635,7 +632,7 @@ def _deserialize_with_callable( # for unknown value, return raw value return value if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value) # type: ignore + return deserializer._deserialize(value) # type: ignore return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) except Exception as e: raise DeserializationError() from e @@ -653,7 +650,7 @@ def __init__( self, *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin is_discriminator: bool = False, readonly: bool = False, default: typing.Any = _UNSET, @@ -672,7 +669,7 @@ def _rest_name(self) -> str: raise ValueError("Rest name was never set") return self._rest_name_input - def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class item = obj.get(self._rest_name) @@ -701,7 +698,7 @@ def _get_deserialize_callable_from_annotation( def rest_field( *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin readonly: bool = False, default: typing.Any = _UNSET, ) -> typing.Any: @@ -709,6 +706,8 @@ def rest_field( def rest_discriminator( - *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py index c9627ce32ad3..e4b8bff26406 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py @@ -41,8 +41,7 @@ def __init__( *, unit: Union[str, "_models.AgeUnit"], value: float, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -76,8 +75,7 @@ def __init__( *, minimum_age: Optional["_models.AcceptedAge"] = None, maximum_age: Optional["_models.AcceptedAge"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -114,10 +112,9 @@ class AreaGeometry(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.GeoJsonGeometryType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.GeoJsonGeometryType"], # pylint: disable=redefined-builtin coordinates: List[float], - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -153,8 +150,7 @@ def __init__( *, sub_type: Union[str, "_models.GeoJsonPropertiesSubType"], radius: float, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -199,8 +195,7 @@ def __init__( code: str, name: Optional[str] = None, value: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -245,8 +240,7 @@ def __init__( offset: int, length: int, text: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -283,8 +277,7 @@ def __init__( *, accepted_sex: Optional[Union[str, "_models.ClinicalTrialAcceptedSex"]] = None, accepted_age_range: Optional["_models.AcceptedAgeRange"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -331,8 +324,7 @@ def __init__( metadata: "_models.ClinicalTrialMetadata", eligibility_criteria_text: Optional[str] = None, demographics: Optional["_models.ClinicalTrialDemographics"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -405,8 +397,7 @@ def __init__( sponsors: Optional[List[str]] = None, contacts: Optional[List["_models.ContactDetails"]] = None, facilities: Optional[List["_models.ClinicalTrialResearchFacility"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -525,8 +516,7 @@ def __init__( facility_names: Optional[List[str]] = None, facility_locations: Optional[List["_models.GeographicLocation"]] = None, facility_areas: Optional[List["_models.GeographicArea"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -571,8 +561,7 @@ def __init__( country_or_region: str, city: Optional[str] = None, state: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -612,8 +601,7 @@ def __init__( *, custom_trials: Optional[List["_models.ClinicalTrialDetails"]] = None, registry_filters: Optional[List["_models.ClinicalTrialRegistryFilter"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -651,8 +639,7 @@ def __init__( name: Optional[str] = None, email: Optional[str] = None, phone: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -694,8 +681,7 @@ def __init__( *, source_type: Union[str, "_models.DocumentContentSourceType"], value: str, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -747,8 +733,7 @@ def __init__( details: List["_models.Error"], target: Optional[str] = None, innererror: Optional["_models.InnerError"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -808,8 +793,7 @@ def __init__( value: Optional[str] = None, semantic_type: Optional[str] = None, category: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -836,7 +820,7 @@ class GeographicArea(_model_base.Model): :vartype properties: ~azure.healthinsights.clinicalmatching.models.AreaProperties """ - type: Union[str, "_models.GeoJsonType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.GeoJsonType"] = rest_field() # pylint: disable=redefined-builtin """``GeoJSON`` type. Required. \"Feature\"""" geometry: "_models.AreaGeometry" = rest_field() """``GeoJSON`` geometry, representing the area circle's center. Required. """ @@ -847,11 +831,10 @@ class GeographicArea(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.GeoJsonType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.GeoJsonType"], # pylint: disable=redefined-builtin geometry: "_models.AreaGeometry", properties: "_models.AreaProperties", - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -895,8 +878,7 @@ def __init__( country_or_region: str, city: Optional[str] = None, state: Optional[str] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -933,8 +915,7 @@ def __init__( *, code: str, innererror: Optional["_models.InnerError"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -973,7 +954,7 @@ class PatientDocument(_model_base.Model): :vartype content: ~azure.healthinsights.clinicalmatching.models.DocumentContent """ - type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") @@ -992,14 +973,13 @@ class PatientDocument(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin id: str, # pylint: disable=redefined-builtin content: "_models.DocumentContent", clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, language: Optional[str] = None, created_date_time: Optional[datetime.datetime] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1039,8 +1019,7 @@ def __init__( sex: Optional[Union[str, "_models.PatientInfoSex"]] = None, birth_date: Optional[datetime.date] = None, clinical_info: Optional[List["_models.ClinicalCodedElement"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1082,8 +1061,7 @@ def __init__( id: str, # pylint: disable=redefined-builtin info: Optional["_models.PatientInfo"] = None, data: Optional[List["_models.PatientDocument"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1119,8 +1097,7 @@ def __init__( *, patients: List["_models.PatientRecord"], configuration: Optional["_models.TrialMatcherModelConfiguration"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1158,7 +1135,7 @@ class TrialMatcherInference(_model_base.Model): :vartype metadata: ~azure.healthinsights.clinicalmatching.models.ClinicalTrialMetadata """ - type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() # pylint: disable=redefined-builtin """The type of the Trial Matcher inference. Required. \"trialEligibility\"""" value: str = rest_field() """The value of the inference, as relevant for the given inference type. Required. """ @@ -1179,7 +1156,7 @@ class TrialMatcherInference(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.TrialMatcherInferenceType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.TrialMatcherInferenceType"], # pylint: disable=redefined-builtin value: str, description: Optional[str] = None, confidence_score: Optional[float] = None, @@ -1187,8 +1164,7 @@ def __init__( id: Optional[str] = None, # pylint: disable=redefined-builtin source: Optional[Union[str, "_models.ClinicalTrialSource"]] = None, metadata: Optional["_models.ClinicalTrialMetadata"] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1237,8 +1213,7 @@ def __init__( patient_data_evidence: Optional["_models.ClinicalNoteEvidence"] = None, patient_info_evidence: Optional["_models.ClinicalCodedElement"] = None, importance: Optional[float] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1286,8 +1261,7 @@ def __init__( clinical_trials: "_models.ClinicalTrials", verbose: bool = False, include_evidence: bool = True, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1331,8 +1305,7 @@ def __init__( id: str, # pylint: disable=redefined-builtin inferences: List["_models.TrialMatcherInference"], needed_clinical_info: Optional[List["_models.ExtendedClinicalCodedElement"]] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): @@ -1418,8 +1391,7 @@ def __init__( patients: List["_models.TrialMatcherPatientResult"], model_version: str, knowledge_graph_last_update_date: Optional[datetime.date] = None, - ): - ... + ): ... @overload def __init__(self, mapping: Mapping[str, Any]): diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py index b58c06ef5729..29b1925c14c6 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py @@ -41,8 +41,7 @@ async def match_trials_async(self) -> None: # Create aTrial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Construct Patient @@ -59,9 +58,9 @@ async def match_trials_async(self) -> None: # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [models.GeographicLocation(country_or_region="United States", - city="Gilbert", - state="Arizona")] + registry_filters.facility_locations = [ + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific study type, interventional registry_filters.study_types = [models.ClinicalTrialStudyType.INTERVENTIONAL] @@ -100,19 +99,21 @@ def print_results(trial_matcher_result): def get_patient_from_fhir_patient(self) -> models.PatientRecord: patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) - patient_data = models.PatientDocument(type=models.DocumentType.FHIR_BUNDLE, - id="Consultation-14-Demo", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=self.get_patient_doc_content()), - clinical_type=models.ClinicalDocumentType.CONSULTATION) + patient_data = models.PatientDocument( + type=models.DocumentType.FHIR_BUNDLE, + id="Consultation-14-Demo", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, value=self.get_patient_doc_content() + ), + clinical_type=models.ClinicalDocumentType.CONSULTATION, + ) return models.PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) @staticmethod def get_patient_doc_content() -> str: samples_dir = os.path.dirname(os.path.realpath(__file__)) data_location = os.path.join(samples_dir, "../sample_data/match_trial_fhir_data.json") - with open(data_location, 'r', encoding='utf-8-sig') as f: + with open(data_location, "r", encoding="utf-8-sig") as f: content = f.read() return content diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py index 5347b105c4cc..836e4df9fc32 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py @@ -38,59 +38,63 @@ async def match_trials_async(self) -> None: # Create a Trial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Create clinical info list # - clinical_info_list = [models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="METASTATIC", - name="metastatic", - value="true"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019163", - name="Hepatitis B", - value="false"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0018802", - name="Congestive heart failure", - value="true"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019196", - name="Hepatitis C", - value="false"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0220650", - name="Metastatic malignant neoplasm to brain", - value="true")] + clinical_info_list = [ + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0006826", name="Malignant Neoplasms", value="true" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true", + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="METASTATIC", name="metastatic", value="true" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1", + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0019693", name="HIV Infections", value="false" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C1300072", name="Tumor stage", value="2" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0019163", name="Hepatitis B", value="false" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0018802", + name="Congestive heart failure", + value="true", + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0019196", name="Hepatitis C", value="false" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0220650", + name="Metastatic malignant neoplasm to brain", + value="true", + ), + ] # # Construct Patient # - patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), - clinical_info=clinical_info_list) + patient_info = models.PatientInfo( + sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), clinical_info=clinical_info_list + ) patient1 = models.PatientRecord(id="patient_id", info=patient_info) # @@ -103,9 +107,9 @@ async def match_trials_async(self) -> None: # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [models.GeographicLocation(country_or_region="United States", - city="Gilbert", - state="Arizona")] + registry_filters.facility_locations = [ + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific study type, interventional registry_filters.study_types = [models.ClinicalTrialStudyType.INTERVENTIONAL] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py index 7cf643015e18..af14ec3fc323 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -57,7 +57,8 @@ def match_trials(self) -> None: registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA registry_filters.facility_locations = [ - models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific study type, interventional registry_filters.study_types = [models.ClinicalTrialStudyType.INTERVENTIONAL] @@ -96,19 +97,21 @@ def print_results(trial_matcher_result): def get_patient_from_fhir_patient(self) -> models.PatientRecord: patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) - patient_data = models.PatientDocument(type=models.DocumentType.FHIR_BUNDLE, - id="Consultation-14-Demo", - content=models.DocumentContent( - source_type=models.DocumentContentSourceType.INLINE, - value=self.get_patient_doc_content()), - clinical_type=models.ClinicalDocumentType.CONSULTATION) + patient_data = models.PatientDocument( + type=models.DocumentType.FHIR_BUNDLE, + id="Consultation-14-Demo", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, value=self.get_patient_doc_content() + ), + clinical_type=models.ClinicalDocumentType.CONSULTATION, + ) return models.PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) @staticmethod def get_patient_doc_content() -> str: samples_dir = os.path.dirname(os.path.realpath(__file__)) data_location = os.path.join(samples_dir, "sample_data/match_trial_fhir_data.json") - with open(data_location, 'r', encoding='utf-8-sig') as f: + with open(data_location, "r", encoding="utf-8-sig") as f: content = f.read() return content diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py index 7f7310135d91..ba39ee2b8fc6 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py @@ -38,39 +38,39 @@ def match_trials(self): # Create a Trial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Create clinical info list # - clinical_info_list = [models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0032181", - name="Platelet count", - value="250000"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0002965", - name="Unstable Angina", - value="true"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Radiotherapy", - value="false"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0242957", - name="GeneOrProtein-Expression", - value="Negative;EntityType:GENEORPROTEIN-EXPRESSION"), - models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="cancer stage", - value="2")] + clinical_info_list = [ + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0032181", name="Platelet count", value="250000" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0002965", name="Unstable Angina", value="true" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C1522449", name="Radiotherapy", value="false" + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0242957", + name="GeneOrProtein-Expression", + value="Negative;EntityType:GENEORPROTEIN-EXPRESSION", + ), + models.ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C1300072", name="cancer stage", value="2" + ), + ] # # Construct Patient # - patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), - clinical_info=clinical_info_list) + patient_info = models.PatientInfo( + sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), clinical_info=clinical_info_list + ) patient1 = models.PatientRecord(id="patient_id", info=patient_info) # @@ -82,7 +82,8 @@ def match_trials(self): registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA registry_filters.facility_locations = [ - models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific recruitment status registry_filters.recruitment_statuses = [models.ClinicalTrialRecruitmentStatus.RECRUITING] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py index dcd818c0a978..6f632bed5227 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-healthinsights-clinicalmatching" PACKAGE_PPRINT_NAME = "Cognitive Services Health Insights Clinical Matching" @@ -29,7 +28,7 @@ setup( name=PACKAGE_NAME, version=version, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=open("README.md", "r").read(), long_description_content_type="text/markdown", license="MIT License", diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py index 068f1b873303..d2b633de7864 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py @@ -47,6 +47,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer( regex=healthinsights_endpoint, value="https://fake_ad_resource.cognitiveservices.azure.com/" ) - add_general_regex_sanitizer( - regex=healthinsights_key, value="00000000000000000000000000000000" - ) + add_general_regex_sanitizer(regex=healthinsights_key, value="00000000000000000000000000000000") diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py index 88e1b323409c..9aeb2ce4bb77 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py @@ -25,8 +25,9 @@ class TestMatchTrials(AzureRecordedTestCase): @HealthInsightsEnvPreparer() @recorded_by_proxy def test_match_trials(self, healthinsights_endpoint, healthinsights_key): - clinical_matching_client = ClinicalMatchingClient(healthinsights_endpoint, - AzureKeyCredential(healthinsights_key)) + clinical_matching_client = ClinicalMatchingClient( + healthinsights_endpoint, AzureKeyCredential(healthinsights_key) + ) assert clinical_matching_client is not None @@ -35,26 +36,16 @@ def test_match_trials(self, healthinsights_endpoint, healthinsights_key): "clinicalTrials": { "registryFilters": [ { - "conditions": [ - "non small cell lung cancer (nsclc)" - ], - "sources": [ - "clinicaltrials_gov" - ], - "recruitmentStatuses": [ - "recruiting" - ], + "conditions": ["non small cell lung cancer (nsclc)"], + "sources": ["clinicaltrials_gov"], + "recruitmentStatuses": ["recruiting"], "facilityLocations": [ - { - "city": "gilbert", - "state": "arizona", - "countryOrRegion": "United States" - } - ] + {"city": "gilbert", "state": "arizona", "countryOrRegion": "United States"} + ], } ] }, - "includeEvidence": True + "includeEvidence": True, }, "patients": [ { @@ -62,39 +53,41 @@ def test_match_trials(self, healthinsights_endpoint, healthinsights_key): "info": { "sex": "male", "birthDate": "1961-04-25T09:54:29.5210127+00:00", - "clinicalInfo": [{ - "system": "http://www.nlm.nih.gov/research/umls", - "code": "C0032181", - "name": "Platelet count", - "value": "250000" - }, + "clinicalInfo": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032181", + "name": "Platelet count", + "value": "250000", + }, { "system": "http://www.nlm.nih.gov/research/umls", "code": "C0002965", "name": "Unstable Angina", - "value": "true" + "value": "true", }, { "system": "http://www.nlm.nih.gov/research/umls", "code": "C1522449", "name": "Radiotherapy", - "value": "false" + "value": "false", }, { "system": "http://www.nlm.nih.gov/research/umls", "code": "C0242957", "name": "GeneOrProtein-Expression", - "value": "Negative;EntityType:GENEORPROTEIN-EXPRESSION" + "value": "Negative;EntityType:GENEORPROTEIN-EXPRESSION", }, { "system": "http://www.nlm.nih.gov/research/umls", "code": "C1300072", "name": "cancer stage", - "value": "2" - }] - } + "value": "2", + }, + ], + }, } - ] + ], } poller = clinical_matching_client.begin_match_trials(data) diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py index c717904eb91d..723926471686 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import ( Any, IO, @@ -33,7 +34,6 @@ from ._model_base import _deserialize from ._client import RadiologyInsightsClient as _RadiologyInsightsClient - JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py index bce7120c092c..8b31ece5f19e 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import ( Any, Callable, @@ -35,7 +36,6 @@ from .._model_base import _deserialize from .. import models as _models - JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_patch.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_patch.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/azure/healthinsights/radiologyinsights/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference.py index d80a78afdb5e..24b44146ce06 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference.py @@ -13,7 +13,7 @@ -the Age Mismatch url extension, -the Age Mismatch offset extension, -the Age Mismatch length extension, and --the Age Mismatch evidence +-the Age Mismatch evidence USAGE: @@ -23,8 +23,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_age_mismatch_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference_async.py index 5d5405655dd6..0ec4c710d2fe 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_age_mismatch_inference_async.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_age_mismatch_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display -the Age Mismatch patient ID, -the Age Mismatch url extension, -the Age Mismatch offset extension, diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference.py index 1d97f0db13d6..7738bd196789 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference.py @@ -12,7 +12,7 @@ submit it to the client, RadiologyInsightsClient, and display -the Complete Order Discrepancy order type, -the missing body parts, and --the missing body part measurements +-the missing body part measurements USAGE: @@ -22,8 +22,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_complete_order_discrepancy_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference_async.py index 97c8f0d89880..189ef1c1e677 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_complete_order_discrepancy_inference_async.py @@ -12,7 +12,7 @@ submit it to the client, RadiologyInsightsClient, and display -the Complete Order Discrepancy order type, -the missing body parts, and --the missing body part measurements +-the missing body part measurements USAGE: @@ -22,7 +22,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_complete_order_discrepancy_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference.py index 460bf09456e8..a4eb10574466 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_critical_result_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Critical Results description. +submit it to the client, RadiologyInsightsClient, and display the Critical Results description. USAGE: @@ -18,8 +18,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_critical_result_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference_async.py index e0b9eaa9bbb3..a3a2bae54acd 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_critical_result_inference_async.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_critical_result_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Critical Result description. +submit it to the client, RadiologyInsightsClient, and display the Critical Result description. USAGE: @@ -18,7 +18,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_critical_result_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference.py index be729f47e247..d1552ad11298 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_finding_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display -the Finding resource type, -the Finding ID, -the Finding status, @@ -24,7 +24,7 @@ -the Inference extensions, -the Inference extension URL, -the Inference extension value string, --the Inference extension section +-the Inference extension section USAGE: @@ -34,7 +34,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_finding_inference.py - + """ import datetime diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference_async.py index 717e4df130a2..951c2c70e2b9 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_finding_inference_async.py @@ -24,7 +24,7 @@ -the Inference extensions, -the Inference extension URL, -the Inference extension value string, --the Inference extension section +-the Inference extension section USAGE: @@ -34,7 +34,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_finding_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference.py index ff03c7257245..b34ddeb13a9d 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference.py @@ -11,7 +11,7 @@ submit it to the client, RadiologyInsightsClient, and display -the date and time of the follow-up communication, -the recipient of the follow-up communication, and --whether the follow-up communication was acknowledged +-whether the follow-up communication was acknowledged USAGE: @@ -21,8 +21,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_followup_communication_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference_async.py index 2928d2248d3b..da6d2a67a1dd 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_communication_inference_async.py @@ -12,7 +12,7 @@ submit it to the client, RadiologyInsightsClient, and display -the date and time of the follow-up communication, -the recipient of the follow-up communication, and --whether the follow-up communication was acknowledged +-whether the follow-up communication was acknowledged USAGE: @@ -22,7 +22,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_followup_communication_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference.py index 4ed5dc6afa50..2ddd02a695bf 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference.py @@ -27,7 +27,7 @@ - the Imaging procedure modality extension url - the Imaging procedure modality extension reference - the Imaging procedure modality extension offset -- the Imaging procedure modality extension length +- the Imaging procedure modality extension length USAGE: @@ -37,8 +37,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_followup_recommendation_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference_async.py index fa4c13bba300..ea68abacdb32 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_followup_recommendation_inference_async.py @@ -37,7 +37,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_followup_recommendation_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference.py index d862900154ab..f45517256b56 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference.py @@ -8,11 +8,11 @@ DESCRIPTION: The sample_guidance_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display - the Guidance Identifier - the Guidance Missing Information - the Guidance Present Information -- the Guidance Ranking +- the Guidance Ranking USAGE: @@ -22,7 +22,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_guidance_inference.py - + """ import datetime diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference_async.py index ac051f66d165..f5037224f6b4 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_guidance_inference_async.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_guidance_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display - the Guidance Identifier - the Guidance Missing Information - the Guidance Present Information @@ -22,7 +22,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_guidance_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference.py index a78adb6aefe6..d44ec6b957b4 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_laterality_discrepancy_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Laterality Mismatch indication and discrepancy type. +submit it to the client, RadiologyInsightsClient, and display the Laterality Mismatch indication and discrepancy type. USAGE: @@ -18,8 +18,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_laterality_discrepancy_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference_async.py index e23db9011819..8011550645de 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_laterality_discrepancy_inference_async.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_laterality_discrepancy_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Laterality Mismatch indication and discrepancy type. +submit it to the client, RadiologyInsightsClient, and display the Laterality Mismatch indication and discrepancy type. USAGE: @@ -18,8 +18,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_laterality_discrepancy_inference_async.py - + """ + import asyncio import datetime import os diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference.py index b790909d23ae..f2e04837a55d 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference.py @@ -8,8 +8,8 @@ DESCRIPTION: The sample_limited_order_discrepancy_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Order Type code, Present Body Part code and measurement. - +submit it to the client, RadiologyInsightsClient, and display the Order Type code, Present Body Part code and measurement. + USAGE: @@ -19,8 +19,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_limited_order_discrepancy_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference_async.py index 013228eaf396..016d69b232cf 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_limited_order_discrepancy_inference_async.py @@ -8,8 +8,8 @@ DESCRIPTION: The sample_limited_order_discrepancy_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Order Type code, Present Body Part code and measurement. - +submit it to the client, RadiologyInsightsClient, and display the Order Type code, Present Body Part code and measurement. + USAGE: @@ -18,7 +18,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_limited_order_discrepancy_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference.py index cbdf06bbcd0a..ea89303c6e1f 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference.py @@ -8,11 +8,11 @@ DESCRIPTION: The sample_quality_measure_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display - the Quality Measure Inference - the Quality Measure Denominator - the Compliance Type -- the Quality Criteria +- the Quality Criteria USAGE: @@ -22,7 +22,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_quality_measure_inference.py - + """ import datetime diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference_async.py index ca2fbe3c9efd..99daa83e1a9d 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_quality_measure_inference_async.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_quality_measure_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize a asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display - the Quality Measure Inference - the Quality Measure Denominator - the Compliance Type @@ -22,8 +22,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_quality_measure_inference_async.py - + """ + import asyncio import datetime import os diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference.py index 82757072f9db..2ff1924e8af3 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference.py @@ -9,9 +9,9 @@ The sample_radiology_procedure_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, submit it to the client, RadiologyInsightsClient, and display -- the Procedure code, -- the Imaging Procedure anatomy and modality, -- Ordered Procedure code and description +- the Procedure code, +- the Imaging Procedure anatomy and modality, +- Ordered Procedure code and description USAGE: @@ -21,8 +21,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_radiology_procedure_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference_async.py index 8b79ec5e477d..90c56a9491b7 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_radiology_procedure_inference_async.py @@ -9,9 +9,9 @@ The sample_radiology_procedure_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, submit it to the client, RadiologyInsightsClient, and display -- the Procedure code, -- the Imaging Procedure anatomy and modality, -- Ordered Procedure code and description +- the Procedure code, +- the Imaging Procedure anatomy and modality, +- Ordered Procedure code and description USAGE: @@ -21,8 +21,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_radiology_procedure_inference_async.py - + """ + import asyncio import datetime import os diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference.py index 5613877ca95b..3dd16d68430c 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference.py @@ -8,12 +8,12 @@ DESCRIPTION: The sample_scoring_and_assessment_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display - the Scoring and Assessment Inference - the Category - the Category Description - the value as a Single Value or -- the value a Range Value +- the value a Range Value USAGE: @@ -23,7 +23,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_scoring_and_assessment_inference.py - + """ import datetime diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference_async.py index 9f7715c08d7c..ca85305b462f 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_scoring_and_assessment_inference_async.py @@ -8,12 +8,12 @@ DESCRIPTION: The sample_scoring_and_assessment_inference_async.py module processes a sample radiology document with the Radiology Insights service. It will initialize an asynchronous RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display +submit it to the client, RadiologyInsightsClient, and display - the Scoring and Assessment Inference - the Category - the Category Description - the value as a Single Value or -- the value a Range Value +- the value a Range Value USAGE: @@ -23,7 +23,7 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_scoring_and_assessment_inference_async.py - + """ import asyncio diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference.py index f1c3232ecfee..b32b96ca80ef 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference.py @@ -8,7 +8,7 @@ DESCRIPTION: The sample_sex_mismatch_inference.py module processes a sample radiology document with the Radiology Insights service. It will initialize a RadiologyInsightsClient, build a Radiology Insights request with the sample document, -submit it to the client, RadiologyInsightsClient, and display the Sex Mismatch indication. +submit it to the client, RadiologyInsightsClient, and display the Sex Mismatch indication. USAGE: @@ -18,8 +18,9 @@ - For more details how to use DefaultAzureCredential, please take a look at https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential 2. python sample_sex_mismatch_inference.py - + """ + import datetime import os import uuid diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference_async.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference_async.py index 5518e721d8c7..a7de8a4845f8 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference_async.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples/sample_sex_mismatch_inference_async.py @@ -20,6 +20,7 @@ 2. python sample_sex_mismatch_inference_async.py """ + import asyncio import datetime import os diff --git a/sdk/healthinsights/azure-healthinsights-radiologyinsights/setup.py b/sdk/healthinsights/azure-healthinsights-radiologyinsights/setup.py index 7776e6ff7ab2..72e8aba5ec95 100644 --- a/sdk/healthinsights/azure-healthinsights-radiologyinsights/setup.py +++ b/sdk/healthinsights/azure-healthinsights-radiologyinsights/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-healthinsights-radiologyinsights" PACKAGE_PPRINT_NAME = "Azure Health Insights - Radiology Insights" diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_patch.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_patch.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_patch.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_patch.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_patch.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_patch.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_patch.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_patch.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_patch.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_patch.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py index 8051a1c71e22..fd90b77bc5b8 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/azure/mgmt/hybridconnectivity/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py index 2903ec83b38d..ae43f6bc1014 100644 --- a/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py +++ b/sdk/hybridconnectivity/azure-mgmt-hybridconnectivity/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/_patch.py b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/_patch.py +++ b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/_patch.py b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/_patch.py +++ b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/operations/_patch.py b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/operations/_patch.py +++ b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/models/_patch.py b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/models/_patch.py +++ b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/operations/_patch.py b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/operations/_patch.py +++ b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/azure/mgmt/hybridcontainerservice/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/setup.py b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/setup.py index 458f47010ff5..2b5370e9d184 100644 --- a/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/setup.py +++ b/sdk/hybridcontainerservice/azure-mgmt-hybridcontainerservice/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_patch.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_patch.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_patch.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_patch.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_patch.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_patch.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_patch.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_patch.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_patch.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_patch.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/setup.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/setup.py index c866e548806d..e8e5a37d7217 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/setup.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_patch.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_patch.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/_patch.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/_patch.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/operations/_patch.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/operations/_patch.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_patch.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_patch.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/operations/_patch.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/operations/_patch.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/setup.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/setup.py index 79ba55ad4e35..02d7b55e017b 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/setup.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/conftest.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/conftest.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/disable_test_cli_mgmt_hybridnetwork.py b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/disable_test_cli_mgmt_hybridnetwork.py index 1fb22c43ee58..2d99de2dd809 100644 --- a/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/disable_test_cli_mgmt_hybridnetwork.py +++ b/sdk/hybridnetwork/azure-mgmt-hybridnetwork/tests/disable_test_cli_mgmt_hybridnetwork.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import pytest @@ -12,15 +12,14 @@ import azure.mgmt.hybridnetwork from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtHybridnetwork(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.hybridnetwork.HybridNetworkManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.hybridnetwork.HybridNetworkManagementClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_hybridnetwork(self, resource_group): @@ -29,6 +28,7 @@ def test_hybridnetwork(self, resource_group): assert list(self.mgmt_client.operations.list()) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/identity/azure-identity-broker/azure/identity/broker/__init__.py b/sdk/identity/azure-identity-broker/azure/identity/broker/__init__.py index ca5c967fd263..51a2ef2bb1bb 100644 --- a/sdk/identity/azure-identity-broker/azure/identity/broker/__init__.py +++ b/sdk/identity/azure-identity-broker/azure/identity/broker/__init__.py @@ -4,7 +4,6 @@ # ------------------------------------ from ._browser import InteractiveBrowserBrokerCredential, PopTokenRequestOptions - __all__ = [ "InteractiveBrowserBrokerCredential", "PopTokenRequestOptions", diff --git a/sdk/identity/azure-identity-broker/azure/identity/broker/_utils.py b/sdk/identity/azure-identity-broker/azure/identity/broker/_utils.py index fe8f99732404..3ae6ff0f6069 100644 --- a/sdk/identity/azure-identity-broker/azure/identity/broker/_utils.py +++ b/sdk/identity/azure-identity-broker/azure/identity/broker/_utils.py @@ -9,7 +9,6 @@ import platform from azure.core.exceptions import ClientAuthenticationError - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/__init__.py b/sdk/identity/azure-identity/azure/identity/__init__.py index f21e763c7625..94fe089b717c 100644 --- a/sdk/identity/azure-identity/azure/identity/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/__init__.py @@ -31,7 +31,6 @@ from ._persistent_cache import TokenCachePersistenceOptions from ._bearer_token_provider import get_bearer_token_provider - __all__ = [ "AuthenticationRecord", "AuthenticationRequiredError", diff --git a/sdk/identity/azure-identity/azure/identity/_auth_record.py b/sdk/identity/azure-identity/azure/identity/_auth_record.py index 1c1222ad6e02..005d3fed958d 100644 --- a/sdk/identity/azure-identity/azure/identity/_auth_record.py +++ b/sdk/identity/azure-identity/azure/identity/_auth_record.py @@ -4,7 +4,6 @@ # ------------------------------------ import json - SUPPORTED_VERSIONS = {"1.0"} diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/__init__.py b/sdk/identity/azure-identity/azure/identity/_credentials/__init__.py index c560459b5e6d..e26263c4c3a8 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/__init__.py @@ -22,7 +22,6 @@ from .workload_identity import WorkloadIdentityCredential from .azure_pipelines import AzurePipelinesCredential - __all__ = [ "AuthorizationCodeCredential", "AzureCliCredential", diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/azd_cli.py b/sdk/identity/azure-identity/azure/identity/_credentials/azd_cli.py index ee90e55ca17c..70c47d12404a 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/azd_cli.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/azd_cli.py @@ -20,7 +20,6 @@ from .._internal import encode_base64, resolve_tenant, within_dac, validate_tenant_id, validate_scope from .._internal.decorators import log_get_token - _LOGGER = logging.getLogger(__name__) CLI_NOT_FOUND = ( diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/azure_cli.py b/sdk/identity/azure-identity/azure/identity/_credentials/azure_cli.py index b78c228d9ec7..43f087bd2b03 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/azure_cli.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/azure_cli.py @@ -27,7 +27,6 @@ ) from .._internal.decorators import log_get_token - _LOGGER = logging.getLogger(__name__) CLI_NOT_FOUND = "Azure CLI not found on path" diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/azure_pipelines.py b/sdk/identity/azure-identity/azure/identity/_credentials/azure_pipelines.py index 8223267453a7..afd08afbf10b 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/azure_pipelines.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/azure_pipelines.py @@ -15,7 +15,6 @@ from .._internal import validate_tenant_id from .._internal.pipeline import build_pipeline - SYSTEM_OIDCREQUESTURI = "SYSTEM_OIDCREQUESTURI" OIDC_API_VERSION = "7.1" TROUBLESHOOTING_GUIDE = "https://aka.ms/azsdk/python/identity/azurepipelinescredential/troubleshoot" diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/azure_powershell.py b/sdk/identity/azure-identity/azure/identity/_credentials/azure_powershell.py index ff1a9d94d1f3..ef9a8692c377 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/azure_powershell.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/azure_powershell.py @@ -23,7 +23,6 @@ ) from .._internal.decorators import log_get_token - _LOGGER = logging.getLogger(__name__) AZ_ACCOUNT_NOT_INSTALLED = "Az.Account module >= 2.2.0 is not installed" diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/chained.py b/sdk/identity/azure-identity/azure/identity/_credentials/chained.py index cc27042dc41b..fe495f857df1 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/chained.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/chained.py @@ -34,9 +34,7 @@ def _get_error_message(history): else: attempts.append(credential_name) return """ -Attempted credentials:\n\t{}""".format( - "\n\t".join(attempts) - ) +Attempted credentials:\n\t{}""".format("\n\t".join(attempts)) class ChainedTokenCredential: diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/imds.py b/sdk/identity/azure-identity/azure/identity/_credentials/imds.py index ece23fbc4419..6140e3cfab22 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/imds.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/imds.py @@ -18,7 +18,6 @@ from .._internal.managed_identity_client import ManagedIdentityClient from .._internal.msal_managed_identity_client import MsalManagedIdentityClient - IMDS_AUTHORITY = "http://169.254.169.254" IMDS_TOKEN_PATH = "/metadata/identity/oauth2/token" diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py b/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py index ea314648fdc9..93cfa85fc2a2 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/managed_identity.py @@ -11,7 +11,6 @@ from .._constants import EnvironmentVariables from .._internal.decorators import log_get_token - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/service_fabric.py b/sdk/identity/azure-identity/azure/identity/_credentials/service_fabric.py index b79234ee4adf..3e8b3457e425 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/service_fabric.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/service_fabric.py @@ -13,7 +13,6 @@ from .._constants import EnvironmentVariables from .._internal.msal_managed_identity_client import MsalManagedIdentityClient - SERVICE_FABRIC_ERROR_MESSAGE = ( "Specifying a client_id or identity_config is not supported by the Service Fabric managed identity environment. " "The managed identity configuration is determined by the Service Fabric cluster resource configuration. " diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py b/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py index 4ee7aa187ee7..894b8d7e11f0 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/shared_cache.py @@ -12,7 +12,6 @@ from .._internal.decorators import log_get_token from .._internal.shared_token_cache import NO_TOKEN, SharedTokenCacheBase - T = TypeVar("T", bound="_SharedTokenCacheCredential") diff --git a/sdk/identity/azure-identity/azure/identity/_credentials/workload_identity.py b/sdk/identity/azure-identity/azure/identity/_credentials/workload_identity.py index d1b49c6d2233..cec9b7b1185d 100644 --- a/sdk/identity/azure-identity/azure/identity/_credentials/workload_identity.py +++ b/sdk/identity/azure-identity/azure/identity/_credentials/workload_identity.py @@ -11,7 +11,6 @@ from .._constants import EnvironmentVariables from .._internal import within_credential_chain - WORKLOAD_CONFIG_ERROR = ( "WorkloadIdentityCredential authentication unavailable. The workload options are not fully " "configured. See the troubleshooting guide for more information: " diff --git a/sdk/identity/azure-identity/azure/identity/_internal/aad_client_base.py b/sdk/identity/azure-identity/azure/identity/_internal/aad_client_base.py index 43ee3ce62945..cebd0614515c 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/aad_client_base.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/aad_client_base.py @@ -21,7 +21,6 @@ from .aadclient_certificate import AadClientCertificate from .._persistent_cache import _load_persistent_cache - if TYPE_CHECKING: from azure.core.pipeline import AsyncPipeline, Pipeline from azure.core.pipeline.policies import AsyncHTTPPolicy, HTTPPolicy, SansIOHTTPPolicy diff --git a/sdk/identity/azure-identity/azure/identity/_internal/decorators.py b/sdk/identity/azure-identity/azure/identity/_internal/decorators.py index 67cffd0b7518..56b4eb492d98 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/decorators.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/decorators.py @@ -11,7 +11,6 @@ from .utils import within_credential_chain - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/_internal/token_binding_transport_requests.py b/sdk/identity/azure-identity/azure/identity/_internal/token_binding_transport_requests.py index 19d15abae1d9..3c63a68bb102 100644 --- a/sdk/identity/azure-identity/azure/identity/_internal/token_binding_transport_requests.py +++ b/sdk/identity/azure-identity/azure/identity/_internal/token_binding_transport_requests.py @@ -5,6 +5,7 @@ """ Requests transport class for WorkloadIdentityCredential with token proxy support. """ + import ssl from typing import Any, Optional diff --git a/sdk/identity/azure-identity/azure/identity/aio/__init__.py b/sdk/identity/azure-identity/azure/identity/aio/__init__.py index e21f985650d3..3834c1f371a4 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/aio/__init__.py @@ -24,7 +24,6 @@ ) from ._bearer_token_provider import get_bearer_token_provider - __all__ = [ "AuthorizationCodeCredential", "AzureDeveloperCliCredential", diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/__init__.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/__init__.py index 2b51197f0953..cd8684c73ed4 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/__init__.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/__init__.py @@ -19,7 +19,6 @@ from .workload_identity import WorkloadIdentityCredential from .azure_pipelines import AzurePipelinesCredential - __all__ = [ "AuthorizationCodeCredential", "AzureCliCredential", diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/azd_cli.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/azd_cli.py index dbd4882cfd13..678de903e829 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/azd_cli.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/azd_cli.py @@ -28,7 +28,6 @@ ) from ..._internal import encode_base64, resolve_tenant, within_dac, validate_tenant_id, validate_scope - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py index 3c01d5fdbf8e..c7d93c4da50b 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py @@ -35,7 +35,6 @@ validate_subscription, ) - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py index f9a377d7c452..9d26a435836f 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py @@ -21,7 +21,6 @@ from .vscode import VisualStudioCodeCredential from .workload_identity import WorkloadIdentityCredential - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py b/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py index f944f7261e54..8e5b27d5effa 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_credentials/managed_identity.py @@ -14,7 +14,6 @@ from ..._constants import EnvironmentVariables from ..._credentials.managed_identity import validate_identity_config - _LOGGER = logging.getLogger(__name__) diff --git a/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_aiohttp.py b/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_aiohttp.py index 1a21c5b13d54..287b67b64766 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_aiohttp.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_aiohttp.py @@ -5,6 +5,7 @@ """ Aiohttp transport class for the asynchronous WorkloadIdentityCredential with token proxy support. """ + import ssl from typing import Any diff --git a/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_asyncio.py b/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_asyncio.py index fa236c2e4d4f..f89bfb1415fa 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_asyncio.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_internal/token_binding_transport_asyncio.py @@ -5,6 +5,7 @@ """ Asyncio Requests transport class for the asynchronous WorkloadIdentityCredential with token proxy support. """ + from typing import Any, Optional from requests import Session diff --git a/sdk/identity/azure-identity/samples/control_interactive_prompts.py b/sdk/identity/azure-identity/samples/control_interactive_prompts.py index 584be63de237..f9636145f7ad 100644 --- a/sdk/identity/azure-identity/samples/control_interactive_prompts.py +++ b/sdk/identity/azure-identity/samples/control_interactive_prompts.py @@ -12,7 +12,6 @@ from azure.identity import AuthenticationRequiredError, InteractiveBrowserCredential from azure.keyvault.secrets import SecretClient - # This sample uses Key Vault only for demonstration. Any client accepting azure-identity credentials will work the same. VAULT_URL = os.environ.get("VAULT_URL") if not VAULT_URL: diff --git a/sdk/identity/azure-identity/samples/key_vault_cert.py b/sdk/identity/azure-identity/samples/key_vault_cert.py index 9eb345cd5cc5..ce042213aece 100644 --- a/sdk/identity/azure-identity/samples/key_vault_cert.py +++ b/sdk/identity/azure-identity/samples/key_vault_cert.py @@ -9,6 +9,7 @@ Vault, retrieves their private keys, and constructs an instance of CertificateCredential with each. """ + import base64 import os diff --git a/sdk/identity/azure-identity/samples/on_behalf_of_client_assertion.py b/sdk/identity/azure-identity/samples/on_behalf_of_client_assertion.py index 03fe4c3b1d4a..eafaf544e752 100644 --- a/sdk/identity/azure-identity/samples/on_behalf_of_client_assertion.py +++ b/sdk/identity/azure-identity/samples/on_behalf_of_client_assertion.py @@ -13,11 +13,11 @@ **Note** - This sample requires the `azure-keyvault-secrets` package. """ + # [START obo_client_assertion] from azure.identity import OnBehalfOfCredential, ManagedIdentityCredential from azure.keyvault.secrets import SecretClient - # Replace the following variables with your own values. tenant_id = "" client_id = "" diff --git a/sdk/identity/azure-identity/samples/user_authentication.py b/sdk/identity/azure-identity/samples/user_authentication.py index e74d965b4d87..a7af91e25fa6 100644 --- a/sdk/identity/azure-identity/samples/user_authentication.py +++ b/sdk/identity/azure-identity/samples/user_authentication.py @@ -9,7 +9,6 @@ from azure.identity import AuthenticationRecord, InteractiveBrowserCredential, TokenCachePersistenceOptions from azure.keyvault.secrets import SecretClient - # This sample uses Key Vault only for demonstration. Any client accepting azure-identity credentials will work the same. VAULT_URL = os.environ.get("VAULT_URL") if not VAULT_URL: diff --git a/sdk/identity/azure-identity/tests/helpers.py b/sdk/identity/azure-identity/tests/helpers.py index 58d25cac73fd..9cd949a30759 100644 --- a/sdk/identity/azure-identity/tests/helpers.py +++ b/sdk/identity/azure-identity/tests/helpers.py @@ -10,7 +10,6 @@ from azure.core.credentials import AccessToken, AccessTokenInfo - FAKE_CLIENT_ID = "fake-client-id" INVALID_CHARACTERS = "|\\`;{&' " INVALID_SUBSCRIPTION_CHARACTERS = "|\\`;{&'" diff --git a/sdk/identity/azure-identity/tests/integration/azure-functions/RunAsyncTest/__init__.py b/sdk/identity/azure-identity/tests/integration/azure-functions/RunAsyncTest/__init__.py index 19888a029faa..77850bc57bd5 100644 --- a/sdk/identity/azure-identity/tests/integration/azure-functions/RunAsyncTest/__init__.py +++ b/sdk/identity/azure-identity/tests/integration/azure-functions/RunAsyncTest/__init__.py @@ -8,7 +8,6 @@ from azure.identity.aio import ManagedIdentityCredential from azure.storage.blob.aio import BlobServiceClient - EXPECTED_VARIABLES = ( "IDENTITY_USER_DEFINED_IDENTITY_CLIENT_ID", "IDENTITY_STORAGE_NAME_1", diff --git a/sdk/identity/azure-identity/tests/integration/azure-web-apps/app.py b/sdk/identity/azure-identity/tests/integration/azure-web-apps/app.py index 3943b456369d..8153ad65c2ae 100644 --- a/sdk/identity/azure-identity/tests/integration/azure-web-apps/app.py +++ b/sdk/identity/azure-identity/tests/integration/azure-web-apps/app.py @@ -10,7 +10,6 @@ from azure.storage.blob.aio import BlobServiceClient as AsyncBlobServiceClient from flask import Flask - app = Flask(__name__) EXPECTED_VARIABLES = ( diff --git a/sdk/identity/azure-identity/tests/test_aad_client.py b/sdk/identity/azure-identity/tests/test_aad_client.py index 3f660e43dc55..ccee7482447f 100644 --- a/sdk/identity/azure-identity/tests/test_aad_client.py +++ b/sdk/identity/azure-identity/tests/test_aad_client.py @@ -17,7 +17,6 @@ from helpers import build_aad_response, mock_response from test_certificate_credential import PEM_CERT_PATH - BASE_CLASS_METHODS = [ ("_get_auth_code_request", ("code", "redirect_uri")), ("_get_client_secret_request", ("secret",)), diff --git a/sdk/identity/azure-identity/tests/test_browser_credential.py b/sdk/identity/azure-identity/tests/test_browser_credential.py index 760af0a2a8d2..d832838a65fe 100644 --- a/sdk/identity/azure-identity/tests/test_browser_credential.py +++ b/sdk/identity/azure-identity/tests/test_browser_credential.py @@ -24,7 +24,6 @@ GET_TOKEN_METHODS, ) - WEBBROWSER_OPEN = InteractiveBrowserCredential.__module__ + ".webbrowser.open" diff --git a/sdk/identity/azure-identity/tests/test_environment_credential.py b/sdk/identity/azure-identity/tests/test_environment_credential.py index 945b1099f7c5..5121ac510a8f 100644 --- a/sdk/identity/azure-identity/tests/test_environment_credential.py +++ b/sdk/identity/azure-identity/tests/test_environment_credential.py @@ -11,7 +11,6 @@ from helpers import mock, GET_TOKEN_METHODS - ALL_VARIABLES = { _ for _ in EnvironmentVariables.CLIENT_SECRET_VARS diff --git a/sdk/identity/azure-identity/tests/test_interactive_credential.py b/sdk/identity/azure-identity/tests/test_interactive_credential.py index 4234bbbd250d..b9344754d53f 100644 --- a/sdk/identity/azure-identity/tests/test_interactive_credential.py +++ b/sdk/identity/azure-identity/tests/test_interactive_credential.py @@ -19,7 +19,6 @@ from helpers import build_aad_response, get_discovery_response, id_token_claims, GET_TOKEN_METHODS - # fake object for tests which need to exercise request_token but don't care about its return value REQUEST_TOKEN_RESULT = build_aad_response( access_token="***", diff --git a/sdk/identity/azure-identity/tests/test_managed_identity_async.py b/sdk/identity/azure-identity/tests/test_managed_identity_async.py index 838a8914c6e4..c1c2d1420ebe 100644 --- a/sdk/identity/azure-identity/tests/test_managed_identity_async.py +++ b/sdk/identity/azure-identity/tests/test_managed_identity_async.py @@ -22,7 +22,6 @@ from helpers_async import async_validating_transport, AsyncMockTransport from test_managed_identity import ALL_ENVIRONMENTS - MANAGED_IDENTITY_ENVIRON = "azure.identity.aio._credentials.managed_identity.os.environ" diff --git a/sdk/identity/azure-identity/tests/test_powershell_credential.py b/sdk/identity/azure-identity/tests/test_powershell_credential.py index 694506ff888b..a860838225ad 100644 --- a/sdk/identity/azure-identity/tests/test_powershell_credential.py +++ b/sdk/identity/azure-identity/tests/test_powershell_credential.py @@ -29,7 +29,6 @@ ) from helpers import INVALID_CHARACTERS, GET_TOKEN_METHODS - POPEN = AzurePowerShellCredential.__module__ + ".subprocess.Popen" # an example of harmless stderr output diff --git a/sdk/identity/azure-identity/tests/test_workload_identity_credential.py b/sdk/identity/azure-identity/tests/test_workload_identity_credential.py index f4d940300acb..a2747f500108 100644 --- a/sdk/identity/azure-identity/tests/test_workload_identity_credential.py +++ b/sdk/identity/azure-identity/tests/test_workload_identity_credential.py @@ -17,7 +17,6 @@ from helpers import mock_response, build_aad_response, GET_TOKEN_METHODS from proxy_server import TokenProxyTestServer - PEM_CERT_PATH = os.path.join(os.path.dirname(__file__), "certificate.pem") diff --git a/sdk/identity/azure-identity/tests/test_workload_identity_credential_async.py b/sdk/identity/azure-identity/tests/test_workload_identity_credential_async.py index b3b77c4bdde9..34e7845cad42 100644 --- a/sdk/identity/azure-identity/tests/test_workload_identity_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_workload_identity_credential_async.py @@ -21,7 +21,6 @@ from helpers import mock_response, build_aad_response, GET_TOKEN_METHODS from proxy_server import TokenProxyTestServer - PEM_CERT_PATH = os.path.join(os.path.dirname(__file__), "certificate.pem") diff --git a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_patch.py b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_patch.py +++ b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/_patch.py b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/_patch.py +++ b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/operations/_patch.py b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/operations/_patch.py +++ b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/models/_patch.py b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/models/_patch.py +++ b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/operations/_patch.py b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/operations/_patch.py +++ b/sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/impactreporting/azure-mgmt-impactreporting/setup.py b/sdk/impactreporting/azure-mgmt-impactreporting/setup.py index fe9648afa0df..f3adca2e12ce 100644 --- a/sdk/impactreporting/azure-mgmt-impactreporting/setup.py +++ b/sdk/impactreporting/azure-mgmt-impactreporting/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/_patch.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/_patch.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/_patch.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/_patch.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/operations/_patch.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/operations/_patch.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/models/_patch.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/models/_patch.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/operations/_patch.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/operations/_patch.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/azure/mgmt/informaticadatamanagement/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/setup.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/setup.py index e9caf49a0cb7..fcdbfec390c7 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/setup.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/tests/test_informatica_data_mgmt_organizations_operations_test.py b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/tests/test_informatica_data_mgmt_organizations_operations_test.py index 9c7e7c0dc264..da230a419a66 100644 --- a/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/tests/test_informatica_data_mgmt_organizations_operations_test.py +++ b/sdk/informaticadatamanagement/azure-mgmt-informaticadatamanagement/tests/test_informatica_data_mgmt_organizations_operations_test.py @@ -25,4 +25,4 @@ def test_list_by_resource_group(self, resource_group): api_version="2024-05-08", ) result = [r for r in response] - assert result == [] \ No newline at end of file + assert result == [] diff --git a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/_patch.py b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/_patch.py +++ b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/_patch.py b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/_patch.py +++ b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/operations/_patch.py b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/operations/_patch.py +++ b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/models/_patch.py b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/models/_patch.py +++ b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/operations/_patch.py b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/operations/_patch.py +++ b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/azure/mgmt/iotfirmwaredefense/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/setup.py b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/setup.py index 59f563f8b3aa..c71f63845736 100644 --- a/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/setup.py +++ b/sdk/iotfirmwaredefense/azure-mgmt-iotfirmwaredefense/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_auth.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_auth.py index 9e033183a469..b69c553b0ffd 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_auth.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_auth.py @@ -31,9 +31,7 @@ def generate_sas_token(audience: str, policy: str, key: str, expiry: int = 3600) ttl = int(time() + expiry) sign_key = f"{encoded_uri}\n{ttl}" - signature = b64encode( - HMAC(b64decode(key), sign_key.encode("utf-8"), sha256).digest() - ) + signature = b64encode(HMAC(b64decode(key), sign_key.encode("utf-8"), sha256).digest()) result = {"sr": audience, "sig": signature, "se": str(ttl)} if policy: result["skn"] = policy @@ -49,9 +47,7 @@ def __init__(self, endpoint: str, policy_name: str, key: str) -> None: def _add_authorization_header(self, request: PipelineRequest) -> None: try: - auth_string = generate_sas_token( - audience=self.endpoint, policy=self.policy_name, key=self.key - ) + auth_string = generate_sas_token(audience=self.endpoint, policy=self.policy_name, key=self.key) request.http_request.headers["Authorization"] = auth_string except Exception as ex: # TODO - Wrap error as a signing error? @@ -67,9 +63,7 @@ class SasCredentialPolicy(SansIOHTTPPolicy): :type credential: ~azure.core.credentials.AzureSasCredential """ - def __init__( - self, credential: AzureSasCredential, **kwargs - ): # pylint: disable=unused-argument + def __init__(self, credential: AzureSasCredential, **kwargs): # pylint: disable=unused-argument super(SasCredentialPolicy, self).__init__() self._credential = credential diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_client.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_client.py index 6aa310eec4b2..05e1aada6af6 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_client.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_client.py @@ -55,9 +55,7 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.enrollment = EnrollmentOperations( - self._client, self._config, self._serialize, self._deserialize - ) + self.enrollment = EnrollmentOperations(self._client, self._config, self._serialize, self._deserialize) self.enrollment_group = EnrollmentGroupOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_patch.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_patch.py index 4b2a664a4187..0aead46a3caf 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_patch.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/_patch.py @@ -33,9 +33,7 @@ from azure.core.credentials import TokenCredential -class DeviceProvisioningClient( - GeneratedDeviceProvisioningClient -): # pylint: disable=client-accepts-api-version-keyword +class DeviceProvisioningClient(GeneratedDeviceProvisioningClient): # pylint: disable=client-accepts-api-version-keyword """ API for connecting to, and conducting operations on a Device Provisioning Service instance @@ -63,16 +61,12 @@ class DeviceProvisioningClient( def __init__( self, endpoint: str, - credential: Union[ - "TokenCredential", "AzureNamedKeyCredential", "AzureSasCredential" - ], + credential: Union["TokenCredential", "AzureNamedKeyCredential", "AzureSasCredential"], *, api_version: Union[str, ApiVersion] = DEFAULT_VERSION, **kwargs, ) -> None: - self._pipeline = self._create_pipeline( - credential=credential, base_url=endpoint, **kwargs - ) + self._pipeline = self._create_pipeline(credential=credential, base_url=endpoint, **kwargs) # Validate endpoint try: @@ -131,17 +125,13 @@ def from_connection_string( ) # Create credential from keys - credential = AzureNamedKeyCredential( - name=shared_access_key_name, key=shared_access_key - ) + credential = AzureNamedKeyCredential(name=shared_access_key_name, key=shared_access_key) return cls(endpoint=host_name, credential=credential, api_version=api_version, **kwargs) # type: ignore def _create_pipeline( self, - credential: Union[ - "TokenCredential", "AzureNamedKeyCredential", "AzureSasCredential" - ], + credential: Union["TokenCredential", "AzureNamedKeyCredential", "AzureSasCredential"], base_url: str, **kwargs, ) -> Pipeline: @@ -184,6 +174,7 @@ def _create_pipeline( return Pipeline(transport, policies=policies) # type: ignore + __all__ = ["DeviceProvisioningClient"] diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/_patch.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/_patch.py index 711d7830dae2..91ef221fcf58 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/_patch.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/_patch.py @@ -33,9 +33,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class DeviceProvisioningClient( - GeneratedDeviceProvisioningClient -): # pylint: disable=client-accepts-api-version-keyword +class DeviceProvisioningClient(GeneratedDeviceProvisioningClient): # pylint: disable=client-accepts-api-version-keyword """ API for connecting to, and conducting operations on a Device Provisioning Service instance @@ -72,9 +70,7 @@ def __init__( api_version: Union[str, ApiVersion] = DEFAULT_VERSION, **kwargs: Any, ) -> None: - self._pipeline = self._create_pipeline( - credential=credential, base_url=endpoint, **kwargs - ) + self._pipeline = self._create_pipeline(credential=credential, base_url=endpoint, **kwargs) # Validate endpoint try: @@ -133,9 +129,7 @@ def from_connection_string( ) # Create credential from keys - credential = AzureNamedKeyCredential( - name=shared_access_key_name, key=shared_access_key - ) + credential = AzureNamedKeyCredential(name=shared_access_key_name, key=shared_access_key) return cls(endpoint=host_name, credential=credential, api_version=api_version, **kwargs) # type: ignore @@ -176,9 +170,7 @@ def _create_pipeline( try: from azure.core.pipeline.transport import AioHttpTransport except ImportError: - raise ImportError( - "Unable to create async transport. Please check aiohttp is installed." - ) + raise ImportError("Unable to create async transport. Please check aiohttp is installed.") transport = AioHttpTransport(**kwargs) policies = [ @@ -198,6 +190,7 @@ def _create_pipeline( return AsyncPipeline(transport, policies=policies) # type: ignore + __all__: List[str] = [ "DeviceProvisioningClient" ] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_operations.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_operations.py index de46f810a2db..ba53cf7b6200 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_operations.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_operations.py @@ -1675,8 +1675,7 @@ async def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @overload async def _query( @@ -1687,8 +1686,7 @@ async def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @distributed_trace_async async def _query( @@ -4221,8 +4219,7 @@ async def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @overload async def _query( @@ -4233,8 +4230,7 @@ async def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @distributed_trace_async async def _query( diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_patch.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_patch.py index 857f19ba7ea4..c3acb831f4e8 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_patch.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/aio/operations/_patch.py @@ -44,9 +44,7 @@ JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") -ClsType = Optional[ - Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any] -] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] def _extract_data_default(pipeline_response, **kwargs): @@ -360,9 +358,7 @@ async def query( # type: ignore[override] _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) content_type = content_type or "application/json" _json = None diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_operations.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_operations.py index 8cbf46ebaac0..771010241d70 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_operations.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_operations.py @@ -2053,8 +2053,7 @@ def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @overload def _query( @@ -2065,8 +2064,7 @@ def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @distributed_trace def _query( @@ -4597,8 +4595,7 @@ def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @overload def _query( @@ -4609,8 +4606,7 @@ def _query( x_ms_continuation: Optional[str] = None, content_type: str = "application/json", **kwargs: Any - ) -> List[JSON]: - ... + ) -> List[JSON]: ... @distributed_trace def _query( diff --git a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_patch.py b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_patch.py index c11751daef03..20df8f85c1c1 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_patch.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/azure/iot/deviceprovisioning/operations/_patch.py @@ -44,9 +44,7 @@ JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") -ClsType = Optional[ - Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any] -] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] def _extract_data_default(pipeline_response, **kwargs): @@ -360,9 +358,7 @@ def query( # type: ignore[override] _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop( - "content_type", _headers.pop("Content-Type", None) - ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) content_type = content_type or "application/json" _json = None diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication.py index 6b02ea86b5ac..70445eb86f61 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication.py @@ -13,8 +13,8 @@ shared access key, or by generating a sas token with which the returned signature can be used with the credential parameter of any DeviceProvisioningClient PREREQUISITES: - In order to use certain Azure Identity credential objects in this sample, - you will need to install the azure-identity package: + In order to use certain Azure Identity credential objects in this sample, + you will need to install the azure-identity package: `pip install azure-identity` USAGE: python dps_service_sample_client_authentication.py @@ -43,9 +43,7 @@ def auth_connection_string(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) def auth_named_key(self): # Instantiate a DPS Service Client using a named key credential @@ -59,9 +57,7 @@ def auth_named_key(self): # Create AzureNamedKeyCredential object credential = AzureNamedKeyCredential(name=policy_name, key=policy) - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) def auth_active_directory(self): # Instantiate a DPS Service Client using a named key credential @@ -75,9 +71,7 @@ def auth_active_directory(self): self.active_directory_application_secret, ) - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) def auth_sas_token(self): # Instantiate a DPS Service Client using a generated SAS token @@ -97,9 +91,7 @@ def auth_sas_token(self): # Create AzureSasCredential object credential = AzureSasCredential(signature=sas_token) - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) def auth_default_azure_credential(self): # Default Azure Credentials attempt a chained set of authentication methods, per documentation here: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity @@ -112,9 +104,7 @@ def auth_default_azure_credential(self): # Instantiate a DefaultAzureCredential credential = DefaultAzureCredential() - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) if __name__ == "__main__": diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication_async.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication_async.py index 8c5ce6628722..8e14692d885b 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_client_authentication_async.py @@ -40,9 +40,7 @@ async def auth_connection_string_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) async def auth_named_key_async(self): # Instantiate a DPS Service Client using a named key credential @@ -56,9 +54,7 @@ async def auth_named_key_async(self): # Create AzureNamedKeyCredential object credential = AzureNamedKeyCredential(name=policy_name, key=policy) - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) async def auth_active_directory_async(self): # Instantiate a DPS Service Client using a named key credential @@ -72,9 +68,7 @@ async def auth_active_directory_async(self): self.active_directory_application_secret, ) - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential # type: ignore - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) # type: ignore async def auth_sas_token_async(self): # Instantiate a DPS Service Client using a generated SAS token @@ -92,9 +86,7 @@ async def auth_sas_token_async(self): # Create AzureSasCredential object credential = AzureSasCredential(signature=sas_token) - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) async def auth_default_azure_credential_async(self): # Default Azure Credentials attempt a chained set of authentication methods, per documentation here: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity @@ -107,9 +99,7 @@ async def auth_default_azure_credential_async(self): # Instantiate a DefaultAzureCredential credential = DefaultAzureCredential() - dps_service_client = DeviceProvisioningClient( - endpoint=self.endpoint, credential=credential # type: ignore - ) + dps_service_client = DeviceProvisioningClient(endpoint=self.endpoint, credential=credential) # type: ignore async def main(): diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration.py index 49bc6c853273..f9c35ae4e990 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration.py @@ -37,9 +37,7 @@ def create_enrollment_group_and_register_device(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create enrollment group object enrollment_group = { @@ -55,9 +53,7 @@ def create_enrollment_group_and_register_device(self): ) # Get Enrollment Attestation with Symmetric Key - attestation = dps_service_client.enrollment_group.get_attestation_mechanism( - id=self.enrollment_group_id - ) + attestation = dps_service_client.enrollment_group.get_attestation_mechanism(id=self.enrollment_group_id) # Get Primary Key of Enrollment Attestation enrollment_group_key = attestation["symmetricKey"]["primaryKey"] @@ -73,9 +69,7 @@ def query_registration_state_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Query all device registrations for enrollment_group_id registrations = dps_service_client.device_registration_state.query(id=self.enrollment_group_id) @@ -87,9 +81,7 @@ def get_device_registration_state_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get Device Registration State by Device ID dps_service_client.device_registration_state.get(id=self.device_id) @@ -98,14 +90,10 @@ def delete_device_registration_state_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get Device Registration State by Device ID - registration_response = dps_service_client.device_registration_state.get( - id=self.device_id - ) + registration_response = dps_service_client.device_registration_state.get(id=self.device_id) # Parse Registration ID registration_id = registration_response["registrationId"] @@ -117,17 +105,13 @@ def cleanup_enrollment_group(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Delete our created enrollment group dps_service_client.enrollment_group.delete(id=self.enrollment_group_id) -def _register_device_with_symmetric_key( - id_scope: str, enrollment_group_key: str, device_id: str -): +def _register_device_with_symmetric_key(id_scope: str, enrollment_group_key: str, device_id: str): """ Helper method to register a device using the IoT Device SDK Args: @@ -139,9 +123,7 @@ def _register_device_with_symmetric_key( # Register device using Provisioning Device Client from Device SDK from azure.iot.device import ProvisioningDeviceClient # type: ignore - symmetric_key = _compute_device_symmetric_key( - key=enrollment_group_key, string_to_sign=device_id - ) + symmetric_key = _compute_device_symmetric_key(key=enrollment_group_key, string_to_sign=device_id) device_sdk = ProvisioningDeviceClient.create_from_symmetric_key( provisioning_host=GLOBAL_PROVISIONING_HOST, diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration_async.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration_async.py index 0f37d72fc41a..a7cd9977b62b 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_device_registration_async.py @@ -38,9 +38,7 @@ async def create_enrollment_group_and_register_device_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create enrollment group object enrollment_group = { @@ -56,11 +54,7 @@ async def create_enrollment_group_and_register_device_async(self): ) # Get Enrollment Attestation with Symmetric Key - attestation = ( - await dps_service_client.enrollment_group.get_attestation_mechanism( - id=self.enrollment_group_id - ) - ) + attestation = await dps_service_client.enrollment_group.get_attestation_mechanism(id=self.enrollment_group_id) # Get Primary Key of Enrollment Attestation enrollment_group_key = attestation["symmetricKey"]["primaryKey"] @@ -76,14 +70,10 @@ async def query_registration_state_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Query all device registrations for enrollment_group_id - registrations = await dps_service_client.device_registration_state.query( - id=self.enrollment_group_id - ) + registrations = await dps_service_client.device_registration_state.query(id=self.enrollment_group_id) # Iterate through query results [registration async for registration in registrations] @@ -92,9 +82,7 @@ async def get_device_registration_state_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get Device Registration State by Device ID await dps_service_client.device_registration_state.get(id=self.device_id) @@ -103,14 +91,10 @@ async def delete_device_registration_state_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get Device Registration State by Device ID - registration_response = await dps_service_client.device_registration_state.get( - id=self.device_id - ) + registration_response = await dps_service_client.device_registration_state.get(id=self.device_id) # Parse Registration ID registration_id = registration_response["registrationId"] @@ -122,17 +106,13 @@ async def cleanup_enrollment_group(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Delete our created enrollment group await dps_service_client.enrollment_group.delete(id=self.enrollment_group_id) -def _register_device_with_symmetric_key( - id_scope: str, enrollment_group_key: str, device_id: str -): +def _register_device_with_symmetric_key(id_scope: str, enrollment_group_key: str, device_id: str): """ Helper method to register a device using the IoT Device SDK Args: @@ -144,9 +124,7 @@ def _register_device_with_symmetric_key( # Register device using Provisioning Device Client from Device SDK from azure.iot.device import ProvisioningDeviceClient # type: ignore - symmetric_key = _compute_device_symmetric_key( - key=enrollment_group_key, string_to_sign=device_id - ) + symmetric_key = _compute_device_symmetric_key(key=enrollment_group_key, string_to_sign=device_id) device_sdk = ProvisioningDeviceClient.create_from_symmetric_key( provisioning_host=GLOBAL_PROVISIONING_HOST, diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups.py index 56bc8b2a39d6..46af11322f32 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups.py @@ -34,9 +34,7 @@ def create_symmetric_key_enrollment_group_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create an enrollment group object with "SymmetricKey" attestation mechanism enrollment_group = { @@ -54,9 +52,7 @@ def create_x590_enrollment_group_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Load certificate contents from file certificate = open(self.x509_cert_path, "rt", encoding="utf-8") @@ -84,9 +80,7 @@ def get_enrollment_group_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get enrollment groups dps_service_client.enrollment_group.get(id=self.symmetric_enrollment_group_id) @@ -97,31 +91,21 @@ def get_enrollment_group_attestation_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get attestations for enrollment groups - dps_service_client.enrollment_group.get_attestation_mechanism( - id=self.x509_enrollment_group_id - ) + dps_service_client.enrollment_group.get_attestation_mechanism(id=self.x509_enrollment_group_id) - dps_service_client.enrollment_group.get_attestation_mechanism( - id=self.symmetric_enrollment_group_id - ) + dps_service_client.enrollment_group.get_attestation_mechanism(id=self.symmetric_enrollment_group_id) def update_enrollment_group_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get enrollment group - sym_enrollment = dps_service_client.enrollment_group.get( - id=self.symmetric_enrollment_group_id - ) + sym_enrollment = dps_service_client.enrollment_group.get(id=self.symmetric_enrollment_group_id) # Parse eTag to ensure update eTag = sym_enrollment["etag"] @@ -141,9 +125,7 @@ def bulk_enrollment_group_operations_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create a few more enrollment groups in bulk enrollment_group_id = "bulk_enrollment_group_1" @@ -168,31 +150,23 @@ def bulk_enrollment_group_operations_sample(self): bulk_operation = {"mode": "create", "enrollmentGroups": enrollment_groups} # Send create operation - dps_service_client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_operation - ) + dps_service_client.enrollment_group.run_bulk_operation(bulk_operation=bulk_operation) # Modify bulk operation properties bulk_operation["mode"] = "delete" # Send delete operation - dps_service_client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_operation - ) + dps_service_client.enrollment_group.run_bulk_operation(bulk_operation=bulk_operation) def delete_enrollment_groups_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Delete enrollment groups dps_service_client.enrollment_group.delete(id=self.x509_enrollment_group_id) - dps_service_client.enrollment_group.delete( - id=self.symmetric_enrollment_group_id - ) + dps_service_client.enrollment_group.delete(id=self.symmetric_enrollment_group_id) if __name__ == "__main__": diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups_async.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups_async.py index 6318431a194b..addbb4175050 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_enrollment_groups_async.py @@ -35,9 +35,7 @@ async def create_symmetric_key_enrollment_group_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create an enrollment group object with "SymmetricKey" attestation mechanism enrollment_group = { @@ -55,9 +53,7 @@ async def create_x590_enrollment_group_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Load certificate contents from file certificate = open(self.x509_cert_path, "rt", encoding="utf-8") @@ -85,14 +81,10 @@ async def get_enrollment_group_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get enrollment groups - await dps_service_client.enrollment_group.get( - id=self.symmetric_enrollment_group_id - ) + await dps_service_client.enrollment_group.get(id=self.symmetric_enrollment_group_id) await dps_service_client.enrollment_group.get(id=self.x509_enrollment_group_id) @@ -100,31 +92,21 @@ async def get_enrollment_group_attestation_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get attestations for enrollment groups - await dps_service_client.enrollment_group.get_attestation_mechanism( - id=self.x509_enrollment_group_id - ) + await dps_service_client.enrollment_group.get_attestation_mechanism(id=self.x509_enrollment_group_id) - await dps_service_client.enrollment_group.get_attestation_mechanism( - id=self.symmetric_enrollment_group_id - ) + await dps_service_client.enrollment_group.get_attestation_mechanism(id=self.symmetric_enrollment_group_id) async def update_enrollment_group_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get enrollment group - sym_enrollment = await dps_service_client.enrollment_group.get( - id=self.symmetric_enrollment_group_id - ) + sym_enrollment = await dps_service_client.enrollment_group.get(id=self.symmetric_enrollment_group_id) # Parse eTag to ensure update eTag = sym_enrollment["etag"] @@ -144,9 +126,7 @@ async def bulk_enrollment_group_operations_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create a few more enrollment groups in bulk enrollment_group_id = "bulk_enrollment_group_1" @@ -171,33 +151,23 @@ async def bulk_enrollment_group_operations_sample_async(self): bulk_operation = {"mode": "create", "enrollmentGroups": enrollment_groups} # Send create operation - await dps_service_client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_operation - ) + await dps_service_client.enrollment_group.run_bulk_operation(bulk_operation=bulk_operation) # Modify bulk operation properties bulk_operation["mode"] = "delete" # Send delete operation - await dps_service_client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_operation - ) + await dps_service_client.enrollment_group.run_bulk_operation(bulk_operation=bulk_operation) async def delete_enrollment_groups_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Delete enrollment groups - await dps_service_client.enrollment_group.delete( - id=self.x509_enrollment_group_id - ) - await dps_service_client.enrollment_group.delete( - id=self.symmetric_enrollment_group_id - ) + await dps_service_client.enrollment_group.delete(id=self.x509_enrollment_group_id) + await dps_service_client.enrollment_group.delete(id=self.symmetric_enrollment_group_id) async def main(): diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments.py index 9005481a0e3a..f4c39b113698 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments.py @@ -44,18 +44,10 @@ def create_symmetric_key_enrollment_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Set initial twin properties - initial_twin = { - "properties": { - "desired": { - "property": "value" - } - } - } + initial_twin = {"properties": {"desired": {"property": "value"}}} # Create an individual enrollment object with "SymmetricKey" attestation mechanism enrollment = { @@ -63,20 +55,16 @@ def create_symmetric_key_enrollment_sample(self): "attestation": { "type": "symmetricKey", }, - "initialTwin": initial_twin + "initialTwin": initial_twin, } - dps_service_client.enrollment.create_or_update( - id=self.symmetric_enrollment_id, enrollment=enrollment - ) + dps_service_client.enrollment.create_or_update(id=self.symmetric_enrollment_id, enrollment=enrollment) def create_x590_enrollment_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Load certificate contents from file certificate = open(self.x509_cert_path, "rt", encoding="utf-8") @@ -96,17 +84,13 @@ def create_x590_enrollment_sample(self): }, } - dps_service_client.enrollment.create_or_update( - id=self.x509_enrollment_id, enrollment=enrollment - ) + dps_service_client.enrollment.create_or_update(id=self.x509_enrollment_id, enrollment=enrollment) def create_tpm_enrollment_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create an individual enrollment object with "TPM" attestation mechanism enrollment = { @@ -117,17 +101,13 @@ def create_tpm_enrollment_sample(self): }, } - dps_service_client.enrollment.create_or_update( - id=self.tpm_enrollment_id, enrollment=enrollment - ) + dps_service_client.enrollment.create_or_update(id=self.tpm_enrollment_id, enrollment=enrollment) def get_enrollment_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get individual enrollments dps_service_client.enrollment.get(id=self.symmetric_enrollment_id) @@ -140,35 +120,23 @@ def get_enrollment_attestation_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get attestations for individual enrollments - dps_service_client.enrollment.get_attestation_mechanism( - id=self.x509_enrollment_id - ) + dps_service_client.enrollment.get_attestation_mechanism(id=self.x509_enrollment_id) - dps_service_client.enrollment.get_attestation_mechanism( - id=self.symmetric_enrollment_id - ) + dps_service_client.enrollment.get_attestation_mechanism(id=self.symmetric_enrollment_id) - dps_service_client.enrollment.get_attestation_mechanism( - id=self.tpm_enrollment_id - ) + dps_service_client.enrollment.get_attestation_mechanism(id=self.tpm_enrollment_id) def update_enrollment_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get individual enrollment - sym_enrollment = dps_service_client.enrollment.get( - id=self.symmetric_enrollment_id - ) + sym_enrollment = dps_service_client.enrollment.get(id=self.symmetric_enrollment_id) # Parse eTag to ensure update eTag = sym_enrollment["etag"] @@ -188,20 +156,16 @@ def update_enrollment_reprovisioning_policy_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get individual enrollment - sym_enrollment = dps_service_client.enrollment.get( - id=self.symmetric_enrollment_id - ) + sym_enrollment = dps_service_client.enrollment.get(id=self.symmetric_enrollment_id) # Parse eTag to ensure update eTag = sym_enrollment["etag"] # Create a new reprovisioning policy - sym_enrollment['reprovisionPolicy'] = { + sym_enrollment["reprovisionPolicy"] = { # update device's hub assignment "updateHubAssignment": True, # don't migrate device data to a new hub @@ -219,9 +183,7 @@ def bulk_enrollment_operations_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create a few more individual enrollments in bulk enrollment_id = "bulk_enrollment_1" @@ -246,25 +208,19 @@ def bulk_enrollment_operations_sample(self): bulk_operation = {"mode": "create", "enrollments": enrollments} # Send create operation - dps_service_client.enrollment.run_bulk_operation( - bulk_operation=bulk_operation - ) + dps_service_client.enrollment.run_bulk_operation(bulk_operation=bulk_operation) # Modify bulk operation properties bulk_operation["mode"] = "delete" # Send delete operation - dps_service_client.enrollment.run_bulk_operation( - bulk_operation=bulk_operation - ) + dps_service_client.enrollment.run_bulk_operation(bulk_operation=bulk_operation) def delete_enrollments_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Delete individual enrollments dps_service_client.enrollment.delete(id=self.x509_enrollment_id) diff --git a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments_async.py b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments_async.py index c917741721e3..1c3e6bd2b304 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/samples/dps_service_sample_individual_enrollments_async.py @@ -45,18 +45,10 @@ async def create_symmetric_key_enrollment_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Set initial twin properties - initial_twin = { - "properties": { - "desired": { - "property": "value" - } - } - } + initial_twin = {"properties": {"desired": {"property": "value"}}} # Create an individual enrollment object with "SymmetricKey" attestation mechanism enrollment = { @@ -64,20 +56,16 @@ async def create_symmetric_key_enrollment_sample_async(self): "attestation": { "type": "symmetricKey", }, - "initialTwin": initial_twin + "initialTwin": initial_twin, } - await dps_service_client.enrollment.create_or_update( - id=self.symmetric_enrollment_id, enrollment=enrollment - ) + await dps_service_client.enrollment.create_or_update(id=self.symmetric_enrollment_id, enrollment=enrollment) async def create_x590_enrollment_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Load certificate contents from file certificate = open(self.x509_cert_path, "rt", encoding="utf-8") @@ -97,17 +85,13 @@ async def create_x590_enrollment_sample_async(self): }, } - await dps_service_client.enrollment.create_or_update( - id=self.x509_enrollment_id, enrollment=enrollment - ) + await dps_service_client.enrollment.create_or_update(id=self.x509_enrollment_id, enrollment=enrollment) async def create_tpm_enrollment_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create an individual enrollment object with "TPM" attestation mechanism enrollment = { @@ -118,22 +102,16 @@ async def create_tpm_enrollment_sample_async(self): }, } - await dps_service_client.enrollment.create_or_update( - id=self.tpm_enrollment_id, enrollment=enrollment - ) + await dps_service_client.enrollment.create_or_update(id=self.tpm_enrollment_id, enrollment=enrollment) async def get_enrollment_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get individual enrollments - await dps_service_client.enrollment.get( - id=self.symmetric_enrollment_id - ) + await dps_service_client.enrollment.get(id=self.symmetric_enrollment_id) await dps_service_client.enrollment.get(id=self.x509_enrollment_id) @@ -143,35 +121,23 @@ async def get_enrollment_attestation_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get attestations for individual enrollments - await dps_service_client.enrollment.get_attestation_mechanism( - id=self.x509_enrollment_id - ) + await dps_service_client.enrollment.get_attestation_mechanism(id=self.x509_enrollment_id) - await dps_service_client.enrollment.get_attestation_mechanism( - id=self.symmetric_enrollment_id - ) + await dps_service_client.enrollment.get_attestation_mechanism(id=self.symmetric_enrollment_id) - await dps_service_client.enrollment.get_attestation_mechanism( - id=self.tpm_enrollment_id - ) + await dps_service_client.enrollment.get_attestation_mechanism(id=self.tpm_enrollment_id) async def update_enrollment_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get individual enrollment - sym_enrollment = await dps_service_client.enrollment.get( - id=self.symmetric_enrollment_id - ) + sym_enrollment = await dps_service_client.enrollment.get(id=self.symmetric_enrollment_id) # Parse eTag to ensure update eTag = sym_enrollment["etag"] @@ -191,20 +157,16 @@ async def update_enrollment_reprovisioning_policy_sample(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Get individual enrollment - sym_enrollment = await dps_service_client.enrollment.get( - id=self.symmetric_enrollment_id - ) + sym_enrollment = await dps_service_client.enrollment.get(id=self.symmetric_enrollment_id) # Parse eTag to ensure update eTag = sym_enrollment["etag"] # Create a new reprovisioning policy - sym_enrollment['reprovisionPolicy'] = { + sym_enrollment["reprovisionPolicy"] = { # update device's hub assignment "updateHubAssignment": True, # don't migrate device data to a new hub @@ -222,9 +184,7 @@ async def bulk_enrollment_operations_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Create a few more individual enrollments in bulk enrollment_id = "bulk_enrollment_1" @@ -249,33 +209,23 @@ async def bulk_enrollment_operations_sample_async(self): bulk_operation = {"mode": "create", "enrollments": enrollments} # Send create operation - await dps_service_client.enrollment.run_bulk_operation( - bulk_operation=bulk_operation - ) + await dps_service_client.enrollment.run_bulk_operation(bulk_operation=bulk_operation) # Modify bulk operation properties bulk_operation["mode"] = "delete" # Send delete operation - await dps_service_client.enrollment.run_bulk_operation( - bulk_operation=bulk_operation - ) + await dps_service_client.enrollment.run_bulk_operation(bulk_operation=bulk_operation) async def delete_enrollments_sample_async(self): # Instantiate a DPS Service Client using a connection string from azure.iot.deviceprovisioning.aio import DeviceProvisioningClient - dps_service_client = DeviceProvisioningClient.from_connection_string( - self.connection_string - ) + dps_service_client = DeviceProvisioningClient.from_connection_string(self.connection_string) # Delete individual enrollments - await dps_service_client.enrollment.delete( - id=self.x509_enrollment_id - ) - await dps_service_client.enrollment.delete( - id=self.symmetric_enrollment_id - ) + await dps_service_client.enrollment.delete(id=self.x509_enrollment_id) + await dps_service_client.enrollment.delete(id=self.symmetric_enrollment_id) await dps_service_client.enrollment.delete(id=self.tpm_enrollment_id) diff --git a/sdk/iothub/azure-iot-deviceprovisioning/setup.py b/sdk/iothub/azure-iot-deviceprovisioning/setup.py index b8b4e7e635a6..8ad202f5cf11 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/setup.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "IoT Device Provisioning" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk, iot, dps, device, provisioning", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.iot', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.iot", + ] + ), python_requires=">=3.7", include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "azure-core<2.0.0,>=1.24.0", diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/conftest.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/conftest.py index 3bfdc81b5d62..8d6f7f22e994 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/conftest.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/conftest.py @@ -17,7 +17,6 @@ from urllib3.util.retry import Retry - # cSpell:disable mock_dps_target = {} mock_dps_target["cs"] = "HostName=mydps;SharedAccessKeyName=name;SharedAccessKey=value" @@ -55,30 +54,14 @@ @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): - subscription_id = os.environ.get( - "AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" - ) - tenant_id = os.environ.get( - "AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000" - ) - client_id = os.environ.get( - "AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000" - ) - client_secret = os.environ.get( - "AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=subscription_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=tenant_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=client_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=client_secret, value="00000000-0000-0000-0000-000000000000" - ) + subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_general_regex_sanitizer( regex=r"-----BEGIN CERTIFICATE-----.*-----END CERTIFICATE-----", value="certificate", @@ -119,9 +102,7 @@ def sdk_client() -> DeviceProvisioningClient: mock_dps_target["primarykey"], ) creds = AzureNamedKeyCredential(policy_name, key) - client = DeviceProvisioningClient( - endpoint=f"https://{host_name}", credential=creds, authentication_policy=creds - ) + client = DeviceProvisioningClient(endpoint=f"https://{host_name}", credential=creds, authentication_policy=creds) return client diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init.py index 1716bea60adf..d92c0a7879d4 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init.py @@ -25,54 +25,38 @@ def create_provisioning_service_client_sas(self, endpoint, sas_token): @ProvisioningServicePreparer() @recorded_by_proxy def test_default_credentials(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client_default_credentials( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client_default_credentials(iothub_dps_endpoint) - enrollments = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollments = client.enrollment.query(query_specification={"query": "SELECT *"}) with pytest.raises(StopIteration): enrollments.next() @ProvisioningServicePreparer() @recorded_by_proxy - def test_named_key( - self, iothub_dps_endpoint, iothub_dps_conn_str - ): + def test_named_key(self, iothub_dps_endpoint, iothub_dps_conn_str): # get name and key from token cs_parts = parse_connection_string(iothub_dps_conn_str) name = cs_parts["sharedaccesskeyname"] key = cs_parts["sharedaccesskey"] - client = self.create_provisioning_service_client_namedkey( - iothub_dps_endpoint, name, key - ) + client = self.create_provisioning_service_client_namedkey(iothub_dps_endpoint, name, key) - enrollments = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollments = client.enrollment.query(query_specification={"query": "SELECT *"}) with pytest.raises(StopIteration): enrollments.next() @ProvisioningServicePreparer() @recorded_by_proxy - def test_sas_creds( - self, iothub_dps_endpoint, iothub_dps_conn_str - ): + def test_sas_creds(self, iothub_dps_endpoint, iothub_dps_conn_str): cs_parts = parse_connection_string(iothub_dps_conn_str) name = cs_parts["sharedaccesskeyname"] key = cs_parts["sharedaccesskey"] sas = generate_sas_token(iothub_dps_endpoint, name, key) - client = self.create_provisioning_service_client_sas( - iothub_dps_endpoint, sas - ) + client = self.create_provisioning_service_client_sas(iothub_dps_endpoint, sas) - enrollments = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollments = client.enrollment.query(query_specification={"query": "SELECT *"}) with pytest.raises(StopIteration): enrollments.next() diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init_async.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init_async.py index 0ddd26f313ca..53ced0182d62 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_client_init_async.py @@ -28,53 +28,37 @@ def create_provisioning_service_client_sas(self, endpoint, sas_token): @ProvisioningServicePreparer() @recorded_by_proxy_async async def test_default_credentials(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client_default_credentials( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client_default_credentials(iothub_dps_endpoint) - enrollments = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollments = await client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([enrollment async for enrollment in enrollments]) == 0 @pytest.mark.asyncio @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_named_key( - self, iothub_dps_endpoint, iothub_dps_conn_str - ): + async def test_named_key(self, iothub_dps_endpoint, iothub_dps_conn_str): # get name and key from token cs_parts = parse_connection_string(iothub_dps_conn_str) name = cs_parts["sharedaccesskeyname"] key = cs_parts["sharedaccesskey"] - client = self.create_provisioning_service_client_namedkey( - iothub_dps_endpoint, name, key - ) + client = self.create_provisioning_service_client_namedkey(iothub_dps_endpoint, name, key) - enrollments = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollments = await client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([enrollment async for enrollment in enrollments]) == 0 @pytest.mark.asyncio @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_sas_creds( - self, iothub_dps_endpoint, iothub_dps_conn_str - ): + async def test_sas_creds(self, iothub_dps_endpoint, iothub_dps_conn_str): cs_parts = parse_connection_string(iothub_dps_conn_str) name = cs_parts["sharedaccesskeyname"] key = cs_parts["sharedaccesskey"] sas = generate_sas_token(iothub_dps_endpoint, name, key) - client = self.create_provisioning_service_client_sas( - iothub_dps_endpoint, sas - ) + client = self.create_provisioning_service_client_sas(iothub_dps_endpoint, sas) - enrollments = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollments = await client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([enrollment async for enrollment in enrollments]) == 0 diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration.py index a2e36e98a761..03908af8ff1d 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration.py @@ -10,17 +10,13 @@ def create_provisioning_service_client(self, endpoint): client = DeviceProvisioningClient(endpoint=endpoint, credential=credential) return client - def create_symmetric_device_registration( - self, endpoint, id_scope, group_id, device_id - ): + def create_symmetric_device_registration(self, endpoint, id_scope, group_id, device_id): from azure.iot.device import ProvisioningDeviceClient client = self.create_provisioning_service_client(endpoint) # get enrollment key - enrollment_group_attestation = ( - client.enrollment_group.get_attestation_mechanism(id=group_id) - ) + enrollment_group_attestation = client.enrollment_group.get_attestation_mechanism(id=group_id) primary_key = enrollment_group_attestation["symmetricKey"]["primaryKey"] symmetric_key = sign_string(primary_key, device_id) @@ -35,12 +31,8 @@ def create_symmetric_device_registration( @ProvisioningServicePreparer() @recorded_by_proxy - def test_device_registration_lifecycle( - self, iothub_dps_endpoint, iothub_dps_idscope - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + def test_device_registration_lifecycle(self, iothub_dps_endpoint, iothub_dps_idscope): + client = self.create_provisioning_service_client(iothub_dps_endpoint) # create new enrollment group enrollment_group_id = self.create_random_name("reg_enroll_grp_") device_id = self.create_random_name("device-") @@ -54,9 +46,7 @@ def test_device_registration_lifecycle( ) # query - should have zero registrations - device_registrations = client.device_registration_state.query( - id=enrollment_group_id - ) + device_registrations = client.device_registration_state.query(id=enrollment_group_id) assert len([d for d in device_registrations]) == 0 # create device registration @@ -75,9 +65,7 @@ def test_device_registration_lifecycle( registration_id = registration_response["registrationId"] # query registration - registration_query_response: list = client.device_registration_state.query( - id=enrollment_group_id - ) + registration_query_response: list = client.device_registration_state.query(id=enrollment_group_id) registrations = [reg for reg in registration_query_response] assert len(registrations) == 1 assert registrations[0]["registrationId"] == registration_id @@ -86,9 +74,7 @@ def test_device_registration_lifecycle( client.device_registration_state.delete(id=registration_id) # confirm delete - registration_query_response: list = client.device_registration_state.query( - id=enrollment_group_id - ) + registration_query_response: list = client.device_registration_state.query(id=enrollment_group_id) assert len([reg for reg in registration_query_response]) == 0 # delete enrollment group diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration_async.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration_async.py index 0240d822f1a8..f2cd427803f3 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_device_registration_async.py @@ -12,17 +12,13 @@ def create_provisioning_service_client(self, endpoint): client = DeviceProvisioningClient(endpoint=endpoint, credential=credential) return client - async def create_symmetric_device_registration( - self, endpoint, id_scope, group_id, device_id - ): + async def create_symmetric_device_registration(self, endpoint, id_scope, group_id, device_id): from azure.iot.device import ProvisioningDeviceClient client = self.create_provisioning_service_client(endpoint) # get enrollment key - enrollment_group_attestation = ( - await client.enrollment_group.get_attestation_mechanism(id=group_id) - ) + enrollment_group_attestation = await client.enrollment_group.get_attestation_mechanism(id=group_id) primary_key = enrollment_group_attestation["symmetricKey"]["primaryKey"] symmetric_key = sign_string(primary_key, device_id) @@ -37,12 +33,8 @@ async def create_symmetric_device_registration( @pytest.mark.asyncio @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_device_registration_lifecycle( - self, iothub_dps_endpoint, iothub_dps_idscope - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + async def test_device_registration_lifecycle(self, iothub_dps_endpoint, iothub_dps_idscope): + client = self.create_provisioning_service_client(iothub_dps_endpoint) # create new enrollment group enrollment_group_id = self.create_random_name("reg_enroll_grp_") device_id = self.create_random_name("device-") @@ -56,9 +48,7 @@ async def test_device_registration_lifecycle( ) # query - should have zero registrations - device_registrations = await client.device_registration_state.query( - id=enrollment_group_id - ) + device_registrations = await client.device_registration_state.query(id=enrollment_group_id) assert len([r async for r in device_registrations]) == 0 # create device registration @@ -77,9 +67,7 @@ async def test_device_registration_lifecycle( registration_id = registration_response["registrationId"] # query registration - registration_query_response = await client.device_registration_state.query( - id=enrollment_group_id - ) + registration_query_response = await client.device_registration_state.query(id=enrollment_group_id) registrations = [reg async for reg in registration_query_response] assert len(registrations) == 1 assert registrations[0]["registrationId"] == registration_id @@ -88,9 +76,7 @@ async def test_device_registration_lifecycle( await client.device_registration_state.delete(id=registration_id) # confirm delete - registration_query_response = await client.device_registration_state.query( - id=enrollment_group_id - ) + registration_query_response = await client.device_registration_state.query(id=enrollment_group_id) assert len([reg async for reg in registration_query_response]) == 0 # delete enrollment group diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups.py index b6967b090f3e..e6267b5523e6 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups.py @@ -19,9 +19,7 @@ def create_provisioning_service_client(self, endpoint): @ProvisioningServicePreparer() @recorded_by_proxy def test_enrollment_group_x509_lifecycle(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client(iothub_dps_endpoint) enrollment_group_id = self.create_random_name("x509_enroll_grp_") attestation_type = "x509" @@ -50,16 +48,14 @@ def test_enrollment_group_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_group_response["attestation"]["x509"] assert enrollment_group_response["attestation"]["type"] == "x509" assert ( - enrollment_group_response["attestation"]["x509"]["signingCertificates"][ - "primary" - ]["info"]["subjectName"] + enrollment_group_response["attestation"]["x509"]["signingCertificates"]["primary"]["info"]["subjectName"] == f"CN={cert_name}" ) if self.is_live: assert ( - enrollment_group_response["attestation"]["x509"]["signingCertificates"][ - "primary" - ]["info"]["sha256Thumbprint"] + enrollment_group_response["attestation"]["x509"]["signingCertificates"]["primary"]["info"][ + "sha256Thumbprint" + ] == thumb ) @@ -69,9 +65,7 @@ def test_enrollment_group_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_group_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_group_list = client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = client.enrollment_group.query(query_specification={"query": "SELECT *"}) enrollments = [eg for eg in enrollment_group_list] assert len(enrollments) == 1 assert enrollments[0]["enrollmentGroupId"] == enrollment_group_id @@ -93,32 +87,20 @@ def test_enrollment_group_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id assert enrollment_group_response["provisioningStatus"] == "disabled" - assert ( - enrollment_group_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_group_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_group_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_group_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # delete enrollment client.enrollment_group.delete(id=enrollment_group_id) # ensure deletion - enrollment_group_list = client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = client.enrollment_group.query(query_specification={"query": "SELECT *"}) assert len([eg for eg in enrollment_group_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy - def test_enrollment_group_symmetrickey_lifecycle( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + def test_enrollment_group_symmetrickey_lifecycle(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "symmetricKey" enrollment_group_id = self.create_random_name("sym_enroll_grp_") primary_key = generate_key() @@ -144,23 +126,15 @@ def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id assert enrollment_group_response["attestation"]["symmetricKey"] if self.is_live: - assert ( - enrollment_group_response["attestation"]["symmetricKey"]["primaryKey"] - == primary_key - ) - assert ( - enrollment_group_response["attestation"]["symmetricKey"]["secondaryKey"] - == secondary_key - ) + assert enrollment_group_response["attestation"]["symmetricKey"]["primaryKey"] == primary_key + assert enrollment_group_response["attestation"]["symmetricKey"]["secondaryKey"] == secondary_key # reprovision migrate true assert enrollment_group_response["reprovisionPolicy"]["migrateDeviceData"] # reprovision update true assert enrollment_group_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_group_list = client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = client.enrollment_group.query(query_specification={"query": "SELECT *"}) enrollments = [eg for eg in enrollment_group_list] assert len(enrollments) == 1 assert enrollments[0]["enrollmentGroupId"] == enrollment_group_id @@ -171,9 +145,7 @@ def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id # check attestation - attestation_response = client.enrollment_group.get_attestation_mechanism( - id=enrollment_group_id - ) + attestation_response = client.enrollment_group.get_attestation_mechanism(id=enrollment_group_id) if self.is_live: assert attestation_response["symmetricKey"]["primaryKey"] == primary_key assert attestation_response["symmetricKey"]["secondaryKey"] == secondary_key @@ -190,14 +162,8 @@ def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id assert enrollment_group_response["provisioningStatus"] == "disabled" - assert ( - enrollment_group_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_group_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_group_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_group_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # reprovision migrate true assert enrollment_group_response["reprovisionPolicy"]["migrateDeviceData"] @@ -219,9 +185,7 @@ def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_2 # check both enrollments - enrollment_group_list = client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = client.enrollment_group.query(query_specification={"query": "SELECT *"}) enrollments = [eg for eg in enrollment_group_list] assert len(enrollments) == 2 assert enrollment_group_id in [e["enrollmentGroupId"] for e in enrollments] @@ -232,19 +196,13 @@ def test_enrollment_group_symmetrickey_lifecycle( client.enrollment_group.delete(id=enrollment_group_id2) # ensure deletion - enrollment_group_list = client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = client.enrollment_group.query(query_specification={"query": "SELECT *"}) assert len([eg for eg in enrollment_group_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy - def test_enrollment_group_bulk_operations( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + def test_enrollment_group_bulk_operations(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) eg1_id = self.create_random_name("x509_enroll_grp_") attestation_type = "x509" @@ -282,26 +240,16 @@ def test_enrollment_group_bulk_operations( "mode": "create", } - bulk_enrollment_response = client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) + bulk_enrollment_response = client.enrollment_group.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response - bulk_enrollment_operation["enrollmentGroups"][0][ - "provisioningStatus" - ] == "disabled" - bulk_enrollment_operation["enrollmentGroups"][1][ - "provisioningStatus" - ] == "disabled" + bulk_enrollment_operation["enrollmentGroups"][0]["provisioningStatus"] == "disabled" + bulk_enrollment_operation["enrollmentGroups"][1]["provisioningStatus"] == "disabled" bulk_enrollment_operation["mode"] = "update" - bulk_enrollment_response = client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) + bulk_enrollment_response = client.enrollment_group.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response bulk_enrollment_operation["mode"] = "delete" - bulk_enrollment_response = client.enrollment_group.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) + bulk_enrollment_response = client.enrollment_group.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups_async.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups_async.py index 95685ab6d64e..f97133c7ae9f 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_enrollment_groups_async.py @@ -19,12 +19,8 @@ def create_provisioning_service_client(self, endpoint): @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_enrollment_group_x509_lifecycle( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + async def test_enrollment_group_x509_lifecycle(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) enrollment_group_id = self.create_random_name("x509_enroll_grp_") attestation_type = "x509" @@ -53,16 +49,14 @@ async def test_enrollment_group_x509_lifecycle( assert enrollment_group_response["attestation"]["x509"] assert enrollment_group_response["attestation"]["type"] == "x509" assert ( - enrollment_group_response["attestation"]["x509"]["signingCertificates"][ - "primary" - ]["info"]["subjectName"] + enrollment_group_response["attestation"]["x509"]["signingCertificates"]["primary"]["info"]["subjectName"] == f"CN={cert_name}" ) if self.is_live: assert ( - enrollment_group_response["attestation"]["x509"]["signingCertificates"][ - "primary" - ]["info"]["sha256Thumbprint"] + enrollment_group_response["attestation"]["x509"]["signingCertificates"]["primary"]["info"][ + "sha256Thumbprint" + ] == thumb ) @@ -72,17 +66,13 @@ async def test_enrollment_group_x509_lifecycle( assert enrollment_group_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_group_list = await client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = await client.enrollment_group.query(query_specification={"query": "SELECT *"}) enrollments = [eg async for eg in enrollment_group_list] assert len(enrollments) == 1 assert enrollments[0]["enrollmentGroupId"] == enrollment_group_id # check enrollment get - enrollment_group_response = await client.enrollment_group.get( - id=enrollment_group_id - ) + enrollment_group_response = await client.enrollment_group.get(id=enrollment_group_id) assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id @@ -98,32 +88,20 @@ async def test_enrollment_group_x509_lifecycle( assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id assert enrollment_group_response["provisioningStatus"] == "disabled" - assert ( - enrollment_group_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_group_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_group_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_group_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # delete enrollment await client.enrollment_group.delete(id=enrollment_group_id) # ensure deletion - enrollment_group_list = await client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = await client.enrollment_group.query(query_specification={"query": "SELECT *"}) assert len([eg async for eg in enrollment_group_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_enrollment_group_symmetrickey_lifecycle( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + async def test_enrollment_group_symmetrickey_lifecycle(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "symmetricKey" enrollment_group_id = self.create_random_name("sym_enroll_grp_") primary_key = generate_key() @@ -150,38 +128,26 @@ async def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_response["attestation"]["symmetricKey"] if self.is_live: - assert ( - enrollment_group_response["attestation"]["symmetricKey"]["primaryKey"] - == primary_key - ) - assert ( - enrollment_group_response["attestation"]["symmetricKey"]["secondaryKey"] - == secondary_key - ) + assert enrollment_group_response["attestation"]["symmetricKey"]["primaryKey"] == primary_key + assert enrollment_group_response["attestation"]["symmetricKey"]["secondaryKey"] == secondary_key # reprovision migrate true assert enrollment_group_response["reprovisionPolicy"]["migrateDeviceData"] # reprovision update true assert enrollment_group_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_group_list = await client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = await client.enrollment_group.query(query_specification={"query": "SELECT *"}) enrollment_groups = [eg async for eg in enrollment_group_list] assert len(enrollment_groups) == 1 assert enrollment_groups[0]["enrollmentGroupId"] == enrollment_group_id # check enrollment get - enrollment_group_response = await client.enrollment_group.get( - id=enrollment_group_id - ) + enrollment_group_response = await client.enrollment_group.get(id=enrollment_group_id) assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id # check attestation - attestation_response = await client.enrollment_group.get_attestation_mechanism( - id=enrollment_group_id - ) + attestation_response = await client.enrollment_group.get_attestation_mechanism(id=enrollment_group_id) if self.is_live: assert attestation_response["symmetricKey"]["primaryKey"] == primary_key assert attestation_response["symmetricKey"]["secondaryKey"] == secondary_key @@ -198,14 +164,8 @@ async def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_response["enrollmentGroupId"] == enrollment_group_id assert enrollment_group_response["provisioningStatus"] == "disabled" - assert ( - enrollment_group_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_group_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_group_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_group_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # reprovision migrate true assert enrollment_group_response["reprovisionPolicy"]["migrateDeviceData"] @@ -227,36 +187,24 @@ async def test_enrollment_group_symmetrickey_lifecycle( assert enrollment_group_2 # check both enrollments - enrollment_group_list = await client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = await client.enrollment_group.query(query_specification={"query": "SELECT *"}) enrollment_groups = [eg async for eg in enrollment_group_list] assert len(enrollment_groups) == 2 - assert enrollment_group_id in [ - e["enrollmentGroupId"] for e in enrollment_groups - ] - assert enrollment_group_id2 in [ - e["enrollmentGroupId"] for e in enrollment_groups - ] + assert enrollment_group_id in [e["enrollmentGroupId"] for e in enrollment_groups] + assert enrollment_group_id2 in [e["enrollmentGroupId"] for e in enrollment_groups] # delete both enrollments await client.enrollment_group.delete(id=enrollment_group_id) await client.enrollment_group.delete(id=enrollment_group_id2) # ensure deletion - enrollment_group_list = await client.enrollment_group.query( - query_specification={"query": "SELECT *"} - ) + enrollment_group_list = await client.enrollment_group.query(query_specification={"query": "SELECT *"}) assert len([eg async for eg in enrollment_group_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_enrollment_group_bulk_operations( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + async def test_enrollment_group_bulk_operations(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) eg1_id = self.create_random_name("x509_enroll_grp_") attestation_type = "x509" @@ -299,12 +247,8 @@ async def test_enrollment_group_bulk_operations( ) assert bulk_enrollment_response - bulk_enrollment_operation["enrollmentGroups"][0][ - "provisioningStatus" - ] == "disabled" - bulk_enrollment_operation["enrollmentGroups"][1][ - "provisioningStatus" - ] == "disabled" + bulk_enrollment_operation["enrollmentGroups"][0]["provisioningStatus"] == "disabled" + bulk_enrollment_operation["enrollmentGroups"][1]["provisioningStatus"] == "disabled" bulk_enrollment_operation["mode"] = "update" bulk_enrollment_response = await client.enrollment_group.run_bulk_operation( diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments.py index 88b85c14ec8f..9ff583a532ac 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments.py @@ -23,9 +23,7 @@ def create_provisioning_service_client(self, endpoint): @ProvisioningServicePreparer() @recorded_by_proxy def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "tpm" enrollment_id = self.create_random_name("ind_enroll_tpm_") @@ -39,24 +37,17 @@ def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): allocation_policy="static", ) - enrollment_response = client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + enrollment_response = client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["attestation"]["tpm"] - assert ( - enrollment_response["attestation"]["tpm"]["endorsementKey"] - == TEST_ENDORSEMENT_KEY - ) + assert enrollment_response["attestation"]["tpm"]["endorsementKey"] == TEST_ENDORSEMENT_KEY assert enrollment_response["allocationPolicy"] == "static" assert enrollment_response["deviceId"] == device_id assert enrollment_response["provisioningStatus"] == "enabled" # check for enrollment in query response - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e for e in enrollment_list] assert len(enrollments) == 1 assert enrollments[0]["registrationId"] == enrollment_id @@ -67,9 +58,7 @@ def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["registrationId"] == enrollment_id # check attestation - attestation_response = client.enrollment.get_attestation_mechanism( - id=enrollment_id - ) + attestation_response = client.enrollment.get_attestation_mechanism(id=enrollment_id) assert attestation_response["tpm"]["endorsementKey"] == TEST_ENDORSEMENT_KEY @@ -84,26 +73,19 @@ def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["provisioningStatus"] == "disabled" - assert ( - enrollment_response["optionalDeviceInformation"]["additionalProperties"] - == TEST_DICT - ) + assert enrollment_response["optionalDeviceInformation"]["additionalProperties"] == TEST_DICT # delete enrollment client.enrollment.delete(id=enrollment_id) # ensure deletion - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([e for e in enrollment_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client(iothub_dps_endpoint) enrollment_id = self.create_random_name("x509_enrollment_") device_id = self.create_random_name("x509_device_") attestation_type = "x509" @@ -136,16 +118,12 @@ def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["attestation"]["x509"] assert enrollment_response["attestation"]["type"] == "x509" assert ( - enrollment_response["attestation"]["x509"]["clientCertificates"]["primary"][ - "info" - ]["subjectName"] + enrollment_response["attestation"]["x509"]["clientCertificates"]["primary"]["info"]["subjectName"] == f"CN={cert_name}" ) if self.is_live: assert ( - enrollment_response["attestation"]["x509"]["clientCertificates"][ - "primary" - ]["info"]["sha256Thumbprint"] + enrollment_response["attestation"]["x509"]["clientCertificates"]["primary"]["info"]["sha256Thumbprint"] == thumb ) @@ -155,9 +133,7 @@ def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e for e in enrollment_list] assert len(enrollments) == 1 assert enrollments[0]["registrationId"] == enrollment_id @@ -179,32 +155,20 @@ def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["provisioningStatus"] == "disabled" - assert ( - enrollment_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # delete enrollment client.enrollment.delete(id=enrollment_id) # ensure deletion - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([e for e in enrollment_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy - def test_enrollment_symmetrickey_lifecycle( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + def test_enrollment_symmetrickey_lifecycle(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "symmetricKey" enrollment_id = self.create_random_name("sym_enrollment_") primary_key = generate_key() @@ -226,9 +190,7 @@ def test_enrollment_symmetrickey_lifecycle( enrollment_id2 = self.create_random_name("sym_enrollment2_") # Use provided keys - enrollment_response = client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + enrollment_response = client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["deviceId"] == device_id @@ -236,23 +198,15 @@ def test_enrollment_symmetrickey_lifecycle( assert enrollment_response["initialTwin"] == INITIAL_TWIN_PROPERTIES if self.is_live: - assert ( - enrollment_response["attestation"]["symmetricKey"]["primaryKey"] - == primary_key - ) - assert ( - enrollment_response["attestation"]["symmetricKey"]["secondaryKey"] - == secondary_key - ) + assert enrollment_response["attestation"]["symmetricKey"]["primaryKey"] == primary_key + assert enrollment_response["attestation"]["symmetricKey"]["secondaryKey"] == secondary_key # reprovision migrate true assert enrollment_response["reprovisionPolicy"]["migrateDeviceData"] # reprovision update true assert enrollment_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e for e in enrollment_list] assert len(enrollments) == 1 assert enrollments[0]["registrationId"] == enrollment_id @@ -262,9 +216,7 @@ def test_enrollment_symmetrickey_lifecycle( assert enrollment_response["registrationId"] == enrollment_id # check attestation - attestation_response = client.enrollment.get_attestation_mechanism( - id=enrollment_id - ) + attestation_response = client.enrollment.get_attestation_mechanism(id=enrollment_id) if self.is_live: assert attestation_response["symmetricKey"]["primaryKey"] == primary_key @@ -283,14 +235,8 @@ def test_enrollment_symmetrickey_lifecycle( assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["provisioningStatus"] == "disabled" - assert ( - enrollment_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # reprovision migrate true assert enrollment_response["reprovisionPolicy"]["migrateDeviceData"] @@ -305,16 +251,12 @@ def test_enrollment_symmetrickey_lifecycle( webhook_url=WEBHOOK_URL, api_version=API_VERSION, ) - enrollment_2 = client.enrollment.create_or_update( - id=enrollment_id2, enrollment=enrollment2 - ) + enrollment_2 = client.enrollment.create_or_update(id=enrollment_id2, enrollment=enrollment2) assert enrollment_2 # check both enrollments - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e["registrationId"] for e in enrollment_list] assert len(enrollments) == 2 assert enrollment_id in enrollments @@ -325,19 +267,13 @@ def test_enrollment_symmetrickey_lifecycle( client.enrollment.delete(id=enrollment_id2) # ensure deletion - enrollment_list = client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([e for e in enrollment_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy - def test_individual_enrollment_bulk_operations( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + def test_individual_enrollment_bulk_operations(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "tpm" enrollment_id = self.create_random_name("ind_enroll_tpm_") device_id = self.create_random_name("device_") @@ -372,24 +308,18 @@ def test_individual_enrollment_bulk_operations( "mode": "create", } - bulk_enrollment_response = client.enrollment.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) + bulk_enrollment_response = client.enrollment.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response bulk_enrollment_operation["enrollments"][0]["provisioningStatus"] == "disabled" bulk_enrollment_operation["enrollments"][1]["provisioningStatus"] == "disabled" bulk_enrollment_operation["mode"] = "update" - bulk_enrollment_response = client.enrollment.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) + bulk_enrollment_response = client.enrollment.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response bulk_enrollment_operation["mode"] = "delete" - bulk_enrollment_response = client.enrollment.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) + bulk_enrollment_response = client.enrollment.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response @ProvisioningServicePreparer() @@ -399,9 +329,7 @@ def test_individual_enrollment_paging(self, iothub_dps_endpoint): total_enrollments = 150 page_size = 50 - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "tpm" enrollments = [] for x in range(total_enrollments): @@ -415,24 +343,18 @@ def test_individual_enrollment_paging(self, iothub_dps_endpoint): device_id=device_id, allocation_policy="static", ) - client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) enrollments.append(enrollment_id) query_results = [] - query = client.enrollment.query( - query_specification={"query": "select *"} - ) + query = client.enrollment.query(query_specification={"query": "select *"}) for enrollment in query: query_results.append(enrollment["registrationId"]) assert len(query_results) == len(enrollments) query_results = [] # Should page `page_size` items at a time - query = client.enrollment.query( - query_specification={"query": "select *"}, top=page_size - ) + query = client.enrollment.query(query_specification={"query": "select *"}, top=page_size) for enrollment_page in query.by_page(): assert length_hint(enrollment_page) == page_size for enrollment in enrollment_page: diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments_async.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments_async.py index a4328722ec8b..b60a338fd079 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments_async.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/test_individual_enrollments_async.py @@ -24,9 +24,7 @@ def create_provisioning_service_client(self, endpoint): @ProvisioningServicePreparer() @recorded_by_proxy_async async def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "tpm" enrollment_id = self.create_random_name("ind_enroll_tpm_") @@ -40,24 +38,17 @@ async def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): allocation_policy="static", ) - enrollment_response = await client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + enrollment_response = await client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["attestation"]["tpm"] - assert ( - enrollment_response["attestation"]["tpm"]["endorsementKey"] - == TEST_ENDORSEMENT_KEY - ) + assert enrollment_response["attestation"]["tpm"]["endorsementKey"] == TEST_ENDORSEMENT_KEY assert enrollment_response["allocationPolicy"] == "static" assert enrollment_response["deviceId"] == device_id assert enrollment_response["provisioningStatus"] == "enabled" # check for enrollment in query response - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e async for e in enrollment_list] assert len(enrollments) == 1 assert enrollments[0]["registrationId"] == enrollment_id @@ -68,11 +59,7 @@ async def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["registrationId"] == enrollment_id # check attestation - attestation_response = ( - await client.enrollment.get_attestation_mechanism( - id=enrollment_id - ) - ) + attestation_response = await client.enrollment.get_attestation_mechanism(id=enrollment_id) assert attestation_response["tpm"]["endorsementKey"] == TEST_ENDORSEMENT_KEY @@ -87,26 +74,19 @@ async def test_enrollment_tpm_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["provisioningStatus"] == "disabled" - assert ( - enrollment_response["optionalDeviceInformation"]["additionalProperties"] - == TEST_DICT - ) + assert enrollment_response["optionalDeviceInformation"]["additionalProperties"] == TEST_DICT # delete enrollment await client.enrollment.delete(id=enrollment_id) # ensure deletion - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([e async for e in enrollment_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy_async async def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + client = self.create_provisioning_service_client(iothub_dps_endpoint) enrollment_id = self.create_random_name("x509_enrollment_") device_id = self.create_random_name("x509_device_") attestation_type = "x509" @@ -139,16 +119,12 @@ async def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["attestation"]["x509"] assert enrollment_response["attestation"]["type"] == "x509" assert ( - enrollment_response["attestation"]["x509"]["clientCertificates"]["primary"][ - "info" - ]["subjectName"] + enrollment_response["attestation"]["x509"]["clientCertificates"]["primary"]["info"]["subjectName"] == f"CN={cert_name}" ) if self.is_live: assert ( - enrollment_response["attestation"]["x509"]["clientCertificates"][ - "primary" - ]["info"]["sha256Thumbprint"] + enrollment_response["attestation"]["x509"]["clientCertificates"]["primary"]["info"]["sha256Thumbprint"] == thumb ) @@ -158,9 +134,7 @@ async def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e async for e in enrollment_list] assert len(enrollments) == 1 assert enrollments[0]["registrationId"] == enrollment_id @@ -182,32 +156,20 @@ async def test_enrollment_x509_lifecycle(self, iothub_dps_endpoint): assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["provisioningStatus"] == "disabled" - assert ( - enrollment_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # delete enrollment await client.enrollment.delete(id=enrollment_id) # ensure deletion - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([e async for e in enrollment_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_enrollment_symmetrickey_lifecycle( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + async def test_enrollment_symmetrickey_lifecycle(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "symmetricKey" enrollment_id = self.create_random_name("sym_enrollment_") primary_key = generate_key() @@ -229,9 +191,7 @@ async def test_enrollment_symmetrickey_lifecycle( enrollment_id2 = self.create_random_name("sym_enrollment2_") # Use provided keys - enrollment_response = await client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + enrollment_response = await client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["deviceId"] == device_id @@ -239,23 +199,15 @@ async def test_enrollment_symmetrickey_lifecycle( assert enrollment_response["initialTwin"] == INITIAL_TWIN_PROPERTIES if self.is_live: - assert ( - enrollment_response["attestation"]["symmetricKey"]["primaryKey"] - == primary_key - ) - assert ( - enrollment_response["attestation"]["symmetricKey"]["secondaryKey"] - == secondary_key - ) + assert enrollment_response["attestation"]["symmetricKey"]["primaryKey"] == primary_key + assert enrollment_response["attestation"]["symmetricKey"]["secondaryKey"] == secondary_key # reprovision migrate true assert enrollment_response["reprovisionPolicy"]["migrateDeviceData"] # reprovision update true assert enrollment_response["reprovisionPolicy"]["updateHubAssignment"] # check for enrollment in query response - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e async for e in enrollment_list] assert len(enrollments) == 1 assert enrollments[0]["registrationId"] == enrollment_id @@ -265,11 +217,7 @@ async def test_enrollment_symmetrickey_lifecycle( assert enrollment_response["registrationId"] == enrollment_id # check attestation - attestation_response = ( - await client.enrollment.get_attestation_mechanism( - id=enrollment_id - ) - ) + attestation_response = await client.enrollment.get_attestation_mechanism(id=enrollment_id) if self.is_live: assert attestation_response["symmetricKey"]["primaryKey"] == primary_key assert attestation_response["symmetricKey"]["secondaryKey"] == secondary_key @@ -287,14 +235,8 @@ async def test_enrollment_symmetrickey_lifecycle( assert enrollment_response["registrationId"] == enrollment_id assert enrollment_response["provisioningStatus"] == "disabled" - assert ( - enrollment_response["customAllocationDefinition"]["webhookUrl"] - == WEBHOOK_URL - ) - assert ( - enrollment_response["customAllocationDefinition"]["apiVersion"] - == API_VERSION - ) + assert enrollment_response["customAllocationDefinition"]["webhookUrl"] == WEBHOOK_URL + assert enrollment_response["customAllocationDefinition"]["apiVersion"] == API_VERSION # reprovision migrate true assert enrollment_response["reprovisionPolicy"]["migrateDeviceData"] @@ -309,16 +251,12 @@ async def test_enrollment_symmetrickey_lifecycle( webhook_url=WEBHOOK_URL, api_version=API_VERSION, ) - enrollment_2 = await client.enrollment.create_or_update( - id=enrollment_id2, enrollment=enrollment2 - ) + enrollment_2 = await client.enrollment.create_or_update(id=enrollment_id2, enrollment=enrollment2) assert enrollment_2 # check both enrollments - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) enrollments = [e["registrationId"] async for e in enrollment_list] assert len(enrollments) == 2 assert enrollment_id in enrollments @@ -329,19 +267,13 @@ async def test_enrollment_symmetrickey_lifecycle( await client.enrollment.delete(id=enrollment_id2) # ensure deletion - enrollment_list = await client.enrollment.query( - query_specification={"query": "SELECT *"} - ) + enrollment_list = await client.enrollment.query(query_specification={"query": "SELECT *"}) assert len([e async for e in enrollment_list]) == 0 @ProvisioningServicePreparer() @recorded_by_proxy_async - async def test_individual_enrollment_bulk_operations( - self, iothub_dps_endpoint - ): - client = self.create_provisioning_service_client( - iothub_dps_endpoint - ) + async def test_individual_enrollment_bulk_operations(self, iothub_dps_endpoint): + client = self.create_provisioning_service_client(iothub_dps_endpoint) attestation_type = "tpm" enrollment_id = self.create_random_name("ind_enroll_tpm_") device_id = self.create_random_name("device_") @@ -376,28 +308,16 @@ async def test_individual_enrollment_bulk_operations( "mode": "create", } - bulk_enrollment_response = ( - await client.enrollment.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) - ) + bulk_enrollment_response = await client.enrollment.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response bulk_enrollment_operation["enrollments"][0]["provisioningStatus"] == "disabled" bulk_enrollment_operation["enrollments"][1]["provisioningStatus"] == "disabled" bulk_enrollment_operation["mode"] = "update" - bulk_enrollment_response = ( - await client.enrollment.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) - ) + bulk_enrollment_response = await client.enrollment.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response bulk_enrollment_operation["mode"] = "delete" - bulk_enrollment_response = ( - await client.enrollment.run_bulk_operation( - bulk_operation=bulk_enrollment_operation - ) - ) + bulk_enrollment_response = await client.enrollment.run_bulk_operation(bulk_operation=bulk_enrollment_operation) assert bulk_enrollment_response diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/device_registration_state/test_device_registration_state_unit.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/device_registration_state/test_device_registration_state_unit.py index 0b83c25f9a27..5c9f9b07ddbb 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/device_registration_state/test_device_registration_state_unit.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/device_registration_state/test_device_registration_state_unit.py @@ -39,9 +39,7 @@ def service_client_get_error(self, mocked_response, request): def test_device_registration_state_get(self, service_client_get, sdk_client): sdk_client.device_registration_state.get(id=registration_id) - def test_device_registration_state_get_error( - self, service_client_get_error, sdk_client - ): + def test_device_registration_state_get_error(self, service_client_get_error, sdk_client): with pytest.raises(HttpResponseError): sdk_client.device_registration_state.get(id=registration_id) @@ -71,9 +69,7 @@ def test_device_registration_state_delete(self, service_client_delete, sdk_clien result = sdk_client.device_registration_state.delete(id=registration_id) assert not result - def test_device_registration_state_get_error( - self, service_client_delete_error, sdk_client - ): + def test_device_registration_state_get_error(self, service_client_delete_error, sdk_client): with pytest.raises(HttpResponseError): sdk_client.device_registration_state.delete(id=registration_id) @@ -103,9 +99,7 @@ def test_device_registration_state_query(self, service_client_query, sdk_client) query = sdk_client.device_registration_state.query(id=enrollment_group_id) assert [state for state in query] - def test_device_registration_state_query_error( - self, service_client_query_error, sdk_client - ): + def test_device_registration_state_query_error(self, service_client_query_error, sdk_client): with pytest.raises(HttpResponseError): query = sdk_client.device_registration_state.query(id=enrollment_group_id) assert [state for state in query] diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_enrollment_groups_unit.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_enrollment_groups_unit.py index 2c64386b21d2..0debcf43d7de 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_enrollment_groups_unit.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_enrollment_groups_unit.py @@ -17,9 +17,7 @@ enrollment_group_url = re.compile("{}/.+".format(enrollment_group_endpoint)) query_url = "{}/query?".format(enrollment_group_endpoint) enrollment_group_id = "test_enrollment_group_id" -attestation_url = "{}/{}/attestationmechanism".format( - enrollment_group_endpoint, enrollment_group_id -) +attestation_url = "{}/{}/attestationmechanism".format(enrollment_group_endpoint, enrollment_group_id) enrollment_group_list = [ @@ -175,9 +173,7 @@ def service_client_get_error(self, mocked_response, request): match_querystring=False, ) - @pytest.mark.parametrize( - "id, expected", [(enrollment_group_id, {"registrationId": enrollment_group_id})] - ) + @pytest.mark.parametrize("id, expected", [(enrollment_group_id, {"registrationId": enrollment_group_id})]) def test_group_enrollment_get(self, service_client_get, sdk_client, id, expected): sdk_client.enrollment_group.get(id=id) @@ -210,21 +206,13 @@ def service_client_generic_error(self, mocked_response, request): yield mocked_response @pytest.mark.parametrize("enrollment_group", enrollment_group_list) - def test_group_enrollment_create_or_update( - self, service_client, sdk_client, enrollment_group - ): - sdk_client.enrollment_group.create_or_update( - id=enrollment_group_id, enrollment_group=enrollment_group - ) + def test_group_enrollment_create_or_update(self, service_client, sdk_client, enrollment_group): + sdk_client.enrollment_group.create_or_update(id=enrollment_group_id, enrollment_group=enrollment_group) @pytest.mark.parametrize("enrollment_group", enrollment_group_list[:3]) - def test_group_enrollment_create_or_update_error( - self, service_client_generic_error, sdk_client, enrollment_group - ): + def test_group_enrollment_create_or_update_error(self, service_client_generic_error, sdk_client, enrollment_group): with pytest.raises(HttpResponseError): - sdk_client.enrollment_group.create_or_update( - id=enrollment_group_id, enrollment_group=enrollment_group - ) + sdk_client.enrollment_group.create_or_update(id=enrollment_group_id, enrollment_group=enrollment_group) class TestGroupEnrollmentDelete(object): @@ -286,9 +274,7 @@ def test_group_enrollment_query(self, service_client, sdk_client, query): query = sdk_client.enrollment_group.query(query_specification=query) assert [enrollment for enrollment in query] - def test_group_enrollment_query_error( - self, service_client_generic_error, sdk_client - ): + def test_group_enrollment_query_error(self, service_client_generic_error, sdk_client): with pytest.raises(HttpResponseError): query = sdk_client.enrollment_group.query(query_specification="select *") assert [enrollment for enrollment in query] @@ -317,18 +303,12 @@ def service_client_generic_error(self, mocked_response, request): ) yield mocked_response - def test_group_enrollment_get_attestation_mechanism( - self, service_client, sdk_client - ): + def test_group_enrollment_get_attestation_mechanism(self, service_client, sdk_client): sdk_client.enrollment_group.get_attestation_mechanism(id=enrollment_group_id) - def test_group_enrollment_get_attestation_mechanism_error( - self, service_client_generic_error, sdk_client - ): + def test_group_enrollment_get_attestation_mechanism_error(self, service_client_generic_error, sdk_client): with pytest.raises(HttpResponseError): - sdk_client.enrollment_group.get_attestation_mechanism( - id=enrollment_group_id - ) + sdk_client.enrollment_group.get_attestation_mechanism(id=enrollment_group_id) class TestGroupEnrollmentBulk(object): @@ -369,12 +349,8 @@ def service_client_generic_error(self, mocked_response, request): (enrollment_group_list, "delete"), ], ) - def test_group_enrollment_run_bulk_operation( - self, service_client, groups, mode, sdk_client - ): - sdk_client.enrollment_group.run_bulk_operation( - bulk_operation={"enrollment_groups": groups, "mode": mode} - ) + def test_group_enrollment_run_bulk_operation(self, service_client, groups, mode, sdk_client): + sdk_client.enrollment_group.run_bulk_operation(bulk_operation={"enrollment_groups": groups, "mode": mode}) @pytest.mark.parametrize( "groups, mode", @@ -391,10 +367,6 @@ def test_group_enrollment_run_bulk_operation( (enrollment_group_list, "delete"), ], ) - def test_group_enrollment_run_bulk_operation_error( - self, service_client_generic_error, sdk_client, groups, mode - ): + def test_group_enrollment_run_bulk_operation_error(self, service_client_generic_error, sdk_client, groups, mode): with pytest.raises(HttpResponseError): - sdk_client.enrollment_group.run_bulk_operation( - bulk_operation={"enrollment_groups": groups, "mode": mode} - ) + sdk_client.enrollment_group.run_bulk_operation(bulk_operation={"enrollment_groups": groups, "mode": mode}) diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_individual_enrollments_unit.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_individual_enrollments_unit.py index 6e3f85f1ded3..47ce0a666dfe 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_individual_enrollments_unit.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/unit/enrollments/test_individual_enrollments_unit.py @@ -187,9 +187,7 @@ def test_individual_enrollment_get(self, service_client_get, sdk_client): enrollment_id = create_random_name() sdk_client.enrollment.get(id=enrollment_id) - def test_individual_enrollment_get_error( - self, service_client_get_error, sdk_client - ): + def test_individual_enrollment_get_error(self, service_client_get_error, sdk_client): with pytest.raises(HttpResponseError): sdk_client.enrollment.get(id=create_random_name()) @@ -218,23 +216,15 @@ def service_client_generic_error(self, mocked_response, request): yield mocked_response @pytest.mark.parametrize("enrollment", enrollment_list) - def test_individual_enrollment_create_or_update( - self, service_client, sdk_client, enrollment - ): + def test_individual_enrollment_create_or_update(self, service_client, sdk_client, enrollment): enrollment_id = create_random_name() - sdk_client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + sdk_client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) @pytest.mark.parametrize("enrollment", enrollment_list[:3]) - def test_individual_enrollment_create_or_update_error( - self, service_client_generic_error, sdk_client, enrollment - ): + def test_individual_enrollment_create_or_update_error(self, service_client_generic_error, sdk_client, enrollment): enrollment_id = create_random_name() with pytest.raises(HttpResponseError): - sdk_client.enrollment.create_or_update( - id=enrollment_id, enrollment=enrollment - ) + sdk_client.enrollment.create_or_update(id=enrollment_id, enrollment=enrollment) class TestIndividualEnrollmentDelete(object): @@ -298,13 +288,9 @@ def test_individual_enrollment_query(self, service_client, sdk_client, query): query = sdk_client.enrollment.query(query_specification=query) assert [enrollment for enrollment in query] - def test_individual_enrollment_query_error( - self, service_client_generic_error, sdk_client - ): + def test_individual_enrollment_query_error(self, service_client_generic_error, sdk_client): with pytest.raises(HttpResponseError): - query = sdk_client.enrollment.query( - query_specification="select *" - ) + query = sdk_client.enrollment.query(query_specification="select *") assert [enrollment for enrollment in query] @@ -331,15 +317,11 @@ def service_client_generic_error(self, mocked_response, request): ) yield mocked_response - def test_individual_enrollment_get_attestation_mechanism( - self, service_client, sdk_client - ): + def test_individual_enrollment_get_attestation_mechanism(self, service_client, sdk_client): enrollment_id = create_random_name() sdk_client.enrollment.get_attestation_mechanism(id=enrollment_id) - def test_individual_enrollment_get_attestation_mechanism_error( - self, service_client_generic_error, sdk_client - ): + def test_individual_enrollment_get_attestation_mechanism_error(self, service_client_generic_error, sdk_client): enrollment_id = create_random_name() with pytest.raises(HttpResponseError): sdk_client.enrollment.get_attestation_mechanism(id=enrollment_id) @@ -380,12 +362,8 @@ def service_client_generic_error(self, mocked_response, request): (enrollment_list, "delete"), ], ) - def test_individual_enrollment_run_bulk_operation( - self, service_client, sdk_client, enrollments, mode - ): - sdk_client.enrollment.run_bulk_operation( - bulk_operation={"enrollments": enrollments, "mode": mode} - ) + def test_individual_enrollment_run_bulk_operation(self, service_client, sdk_client, enrollments, mode): + sdk_client.enrollment.run_bulk_operation(bulk_operation={"enrollments": enrollments, "mode": mode}) @pytest.mark.parametrize( "enrollments, mode", @@ -403,6 +381,4 @@ def test_individual_enrollment_run_bulk_operation_error( self, service_client_generic_error, sdk_client, enrollments, mode ): with pytest.raises(HttpResponseError): - sdk_client.enrollment.run_bulk_operation( - bulk_operation={"enrollments": enrollments, "mode": mode} - ) + sdk_client.enrollment.run_bulk_operation(bulk_operation={"enrollments": enrollments, "mode": mode}) diff --git a/sdk/iothub/azure-iot-deviceprovisioning/tests/utility/common.py b/sdk/iothub/azure-iot-deviceprovisioning/tests/utility/common.py index c3d24ab7b254..62e37e398815 100644 --- a/sdk/iothub/azure-iot-deviceprovisioning/tests/utility/common.py +++ b/sdk/iothub/azure-iot-deviceprovisioning/tests/utility/common.py @@ -10,15 +10,12 @@ def create_random_name(prefix="dps_sdk_test", length=24): if len(prefix) > length: - raise ValueError( - "The length of the prefix must not be longer than random name length" - ) + raise ValueError("The length of the prefix must not be longer than random name length") padding_size = length - len(prefix) if padding_size < 4: raise ValueError( - "The randomized part of the name is shorter than 4, which may not be able to offer enough " - "randomness" + "The randomized part of the name is shorter than 4, which may not be able to offer enough " "randomness" ) random_bytes = urandom(int(ceil(float(padding_size) / 8) * 5)) @@ -49,16 +46,8 @@ def generate_attestation( primary_cert = {"certificate": primary_cert} if secondary_cert: secondary_cert = {"certificate": secondary_cert} - certs = ( - {"primary": primary_cert, "secondary": secondary_cert} - if (primary_cert or secondary_cert) - else None - ) - attestation["x509"] = ( - {"signingCertificates": certs} - if signing_certs - else {"clientCertificates": certs} - ) + certs = {"primary": primary_cert, "secondary": secondary_cert} if (primary_cert or secondary_cert) else None + attestation["x509"] = {"signingCertificates": certs} if signing_certs else {"clientCertificates": certs} return attestation @@ -91,9 +80,7 @@ def generate_enrollment( secondary_cert=secondary_cert, ) custom_allocation = ( - {"webhookUrl": webhook_url, "apiVersion": api_version} - if allocation_policy == "custom" - else None + {"webhookUrl": webhook_url, "apiVersion": api_version} if allocation_policy == "custom" else None ) enrollment = { "registrationId": id or create_random_name(), @@ -140,9 +127,7 @@ def generate_enrollment_group( signing_certs=True, ) custom_allocation = ( - {"webhookUrl": webhook_url, "apiVersion": api_version} - if allocation_policy == "custom" - else None + {"webhookUrl": webhook_url, "apiVersion": api_version} if allocation_policy == "custom" else None ) return { @@ -222,9 +207,7 @@ def create_self_signed_certificate( .public_key(key.public_key()) .serial_number(serial) .not_valid_before(datetime.datetime.utcnow()) - .not_valid_after( - datetime.datetime.utcnow() + datetime.timedelta(days=valid_days) - ) + .not_valid_after(datetime.datetime.utcnow() + datetime.timedelta(days=valid_days)) ) # sign diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_patch.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_patch.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_patch.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_patch.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_patch.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_patch.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_patch.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_patch.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iotcentral/setup.py b/sdk/iothub/azure-mgmt-iotcentral/setup.py index 1fe958db09b5..18ede1cd4826 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/setup.py +++ b/sdk/iothub/azure-mgmt-iotcentral/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Iot Central Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_patch.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_patch.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/_patch.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/_patch.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/operations/_patch.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_patch.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_patch.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_patch.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_patch.py b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_patch.py +++ b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/_patch.py b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/_patch.py +++ b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/operations/_patch.py b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/operations/_patch.py +++ b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/models/_patch.py b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/models/_patch.py +++ b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/operations/_patch.py b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/operations/_patch.py +++ b/sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/iotoperations/azure-mgmt-iotoperations/setup.py b/sdk/iotoperations/azure-mgmt-iotoperations/setup.py index 87e5dc487a7e..30048bcf4441 100644 --- a/sdk/iotoperations/azure-mgmt-iotoperations/setup.py +++ b/sdk/iotoperations/azure-mgmt-iotoperations/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py index 5e6b3233b362..954c452ae3bb 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/__init__.py @@ -16,7 +16,6 @@ ) from ._settings_client import KeyVaultSettingsClient - __all__ = [ "ApiVersion", "KeyVaultBackupResult", @@ -34,4 +33,5 @@ ] from ._version import VERSION + __version__ = VERSION diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py index f41733a1a07a..390fcaf0c4ad 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_access_control_client.py @@ -67,15 +67,10 @@ def create_role_assignment( assignment_name = name or uuid4() create_parameters = RoleAssignmentCreateParameters( - properties=RoleAssignmentProperties( - principal_id=principal_id, role_definition_id=str(definition_id) - ) + properties=RoleAssignmentProperties(principal_id=principal_id, role_definition_id=str(definition_id)) ) assignment = self._client.role_assignments.create( - scope=scope, - role_assignment_name=str(assignment_name), - parameters=create_parameters, - **kwargs + scope=scope, role_assignment_name=str(assignment_name), parameters=create_parameters, **kwargs ) return KeyVaultRoleAssignment._from_generated(assignment) @@ -95,9 +90,7 @@ def delete_role_assignment( :rtype: None """ try: - self._client.role_assignments.delete( - scope=scope, role_assignment_name=str(name), **kwargs - ) + self._client.role_assignments.delete(scope=scope, role_assignment_name=str(name), **kwargs) except ResourceNotFoundError: pass @@ -116,9 +109,7 @@ def get_role_assignment( :returns: The fetched role assignment. :rtype: ~azure.keyvault.administration.KeyVaultRoleAssignment """ - assignment = self._client.role_assignments.get( - scope=scope, role_assignment_name=str(name), **kwargs - ) + assignment = self._client.role_assignments.get(scope=scope, role_assignment_name=str(name), **kwargs) return KeyVaultRoleAssignment._from_generated(assignment) @distributed_trace @@ -135,9 +126,7 @@ def list_role_assignments( :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.administration.KeyVaultRoleAssignment] """ return self._client.role_assignments.list_for_scope( - scope=scope, - cls=lambda result: [KeyVaultRoleAssignment._from_generated(a) for a in result], - **kwargs + scope=scope, cls=lambda result: [KeyVaultRoleAssignment._from_generated(a) for a in result], **kwargs ) @distributed_trace @@ -198,10 +187,7 @@ def set_role_definition( parameters = RoleDefinitionCreateParameters(properties=properties) definition = self._client.role_definitions.create_or_update( - scope=scope, - role_definition_name=str(name or uuid4()), - parameters=parameters, - **kwargs + scope=scope, role_definition_name=str(name or uuid4()), parameters=parameters, **kwargs ) return KeyVaultRoleDefinition._from_generated(definition) @@ -220,9 +206,7 @@ def get_role_definition( :returns: The fetched role definition. :rtype: ~azure.keyvault.administration.KeyVaultRoleDefinition """ - definition = self._client.role_definitions.get( - scope=scope, role_definition_name=str(name), **kwargs - ) + definition = self._client.role_definitions.get(scope=scope, role_definition_name=str(name), **kwargs) return KeyVaultRoleDefinition._from_generated(definition) @distributed_trace @@ -241,9 +225,7 @@ def delete_role_definition( :rtype: None """ try: - self._client.role_definitions.delete( - scope=scope, role_definition_name=str(name), **kwargs - ) + self._client.role_definitions.delete(scope=scope, role_definition_name=str(name), **kwargs) except ResourceNotFoundError: pass @@ -261,9 +243,7 @@ def list_role_definitions( :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.administration.KeyVaultRoleDefinition] """ return self._client.role_definitions.list( - scope=scope, - cls=lambda result: [KeyVaultRoleDefinition._from_generated(d) for d in result], - **kwargs + scope=scope, cls=lambda result: [KeyVaultRoleDefinition._from_generated(d) for d in result], **kwargs ) def __enter__(self) -> "KeyVaultAccessControlClient": diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py index b6b5a9ecf04e..898770ae2647 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py @@ -101,9 +101,7 @@ def _use_continuation_token(self, continuation_token: str, status_method: Callab + "operation poller's continuation_token() method" ) from ex - pipeline_response = status_method( - job_id=job_id, cls=lambda pipeline_response, _, __: pipeline_response - ) + pipeline_response = status_method(job_id=job_id, cls=lambda pipeline_response, _, __: pipeline_response) if "azure-asyncoperation" not in pipeline_response.http_response.headers: pipeline_response.http_response.headers["azure-asyncoperation"] = status_url return _get_continuation_token(pipeline_response) @@ -116,8 +114,7 @@ def begin_backup( use_managed_identity: Literal[True], continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[KeyVaultBackupResult]: - ... + ) -> LROPoller[KeyVaultBackupResult]: ... @overload def begin_backup( @@ -127,8 +124,7 @@ def begin_backup( sas_token: str, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[KeyVaultBackupResult]: - ... + ) -> LROPoller[KeyVaultBackupResult]: ... # Disabling pylint checks because they don't correctly handle overloads @distributed_trace @@ -195,8 +191,7 @@ def begin_restore( key_name: Optional[str] = None, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[None]: - ... + ) -> LROPoller[None]: ... @overload def begin_restore( @@ -207,8 +202,7 @@ def begin_restore( key_name: Optional[str] = None, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[None]: - ... + ) -> LROPoller[None]: ... # Disabling pylint checks because they don't correctly handle overloads @distributed_trace @@ -300,8 +294,7 @@ def begin_pre_backup( use_managed_identity: Literal[True], continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[None]: - ... + ) -> LROPoller[None]: ... @overload def begin_pre_backup( @@ -311,8 +304,7 @@ def begin_pre_backup( sas_token: str, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[None]: - ... + ) -> LROPoller[None]: ... @distributed_trace def begin_pre_backup( # pylint: disable=docstring-keyword-should-match-keyword-only @@ -368,8 +360,7 @@ def begin_pre_restore( use_managed_identity: Literal[True], continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[None]: - ... + ) -> LROPoller[None]: ... @overload def begin_pre_restore( @@ -379,8 +370,7 @@ def begin_pre_restore( sas_token: str, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> LROPoller[None]: - ... + ) -> LROPoller[None]: ... @distributed_trace def begin_pre_restore( # pylint: disable=docstring-keyword-should-match-keyword-only diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_patch.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_patch.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_patch.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_patch.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/operations/_patch.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models/_patch.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models/_patch.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/operations/_patch.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_generated/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py index dad851f8f58c..3e3ac1855178 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py @@ -82,9 +82,7 @@ def __init__(self, credential: AsyncTokenProvider, *scopes: str, **kwargs: Any) self._verify_challenge_resource = kwargs.pop("verify_challenge_resource", True) self._request_copy: Optional[HttpRequest] = None - async def send( - self, request: PipelineRequest[HttpRequest] - ) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: + async def send(self, request: PipelineRequest[HttpRequest]) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: """Authorize request with a bearer token and send it to the next policy. We implement this method to account for the valid scenario where a Key Vault authentication challenge is @@ -155,7 +153,6 @@ async def handle_challenge_flow( await await_result(self.on_response, request, response) return response - async def on_request(self, request: PipelineRequest) -> None: _enforce_tls(request) challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) @@ -184,7 +181,6 @@ async def on_request(self, request: PipelineRequest) -> None: bodiless_request.headers["Content-Length"] = "0" request.http_request = bodiless_request - async def on_challenge(self, request: PipelineRequest, response: PipelineResponse) -> bool: try: # CAE challenges may not include a scope or tenant; cache from the previous challenge to use if necessary @@ -227,9 +223,7 @@ async def on_challenge(self, request: PipelineRequest, response: PipelineRespons if challenge.tenant_id and challenge.tenant_id.lower().endswith("adfs"): await self.authorize_request(request, scope, claims=challenge.claims) else: - await self.authorize_request( - request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id - ) + await self.authorize_request(request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id) return True diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py index 367a99fae45b..f47722f72f97 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_client_base.py @@ -44,11 +44,7 @@ def __init__(self, vault_url: str, credential: AsyncTokenCredential, **kwargs: A http_logging_policy = HttpLoggingPolicy(**kwargs) http_logging_policy.allowed_header_names.update( - { - "x-ms-keyvault-network-info", - "x-ms-keyvault-region", - "x-ms-keyvault-service-version" - } + {"x-ms-keyvault-network-info", "x-ms-keyvault-region", "x-ms-keyvault-service-version"} ) verify_challenge = kwargs.pop("verify_challenge_resource", True) @@ -59,7 +55,7 @@ def __init__(self, vault_url: str, credential: AsyncTokenCredential, **kwargs: A authentication_policy=AsyncChallengeAuthPolicy(credential, verify_challenge_resource=verify_challenge), sdk_moniker=SDK_MONIKER, http_logging_policy=http_logging_policy, - **kwargs + **kwargs, ) self._models = _models except ValueError as exc: diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py index d0efb46a1ebd..77401fd15ba6 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/client_base.py @@ -103,7 +103,7 @@ def __init__(self, vault_url: str, credential: TokenCredential, **kwargs: Any) - authentication_policy=ChallengeAuthPolicy(credential, verify_challenge_resource=verify_challenge), sdk_moniker=SDK_MONIKER, http_logging_policy=http_logging_policy, - **kwargs + **kwargs, ) self._models = _models except ValueError as exc: diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py index 0320df5a868b..8b14b999de78 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py @@ -148,7 +148,9 @@ def supports_message_protection(self) -> bool: """ return self.supports_pop() and self.server_encryption_key and self.server_signature_key # type: ignore - def _validate_challenge(self, challenge: str) -> str: # pylint:disable=bad-option-value,useless-option-value,no-self-use + def _validate_challenge( + self, challenge: str + ) -> str: # pylint:disable=bad-option-value,useless-option-value,no-self-use """Verifies that the challenge is a valid auth challenge and returns the key=value pairs. :param str challenge: The WWW-Authenticate header of the challenge response. @@ -161,7 +163,9 @@ def _validate_challenge(self, challenge: str) -> str: # pylint:disable=bad-opti return challenge.strip() - def _validate_request_uri(self, uri: str) -> str: # pylint:disable=bad-option-value,useless-option-value,no-self-use + def _validate_request_uri( + self, uri: str + ) -> str: # pylint:disable=bad-option-value,useless-option-value,no-self-use """Extracts the host authority from the given URI. :param str uri: The URI of the HTTP request that prompted the challenge. diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py index 99f32091e24b..1048710eed2f 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge_cache.py @@ -8,7 +8,6 @@ from .http_challenge import HttpChallenge - _cache: "Dict[str, HttpChallenge]" = {} _lock = threading.Lock() diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/polling.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/polling.py index 955c6a9ea6a6..1493f00e2792 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/polling.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/polling.py @@ -36,7 +36,7 @@ class KeyVaultBackupClientPollingMethod(LROBasePolling): def get_continuation_token(self) -> str: """ Get a continuation token to resume the polling later. - + :return: A continuation token. :rtype: str """ diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py index b944ed0c3e91..d92c517b7510 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_models.py @@ -70,9 +70,11 @@ def _from_generated(cls, role_assignment: RoleAssignment) -> "KeyVaultRoleAssign role_assignment_id=role_assignment.id, name=role_assignment.name, assignment_type=role_assignment.type, - properties=KeyVaultRoleAssignmentProperties._from_generated(role_assignment.properties) - if role_assignment.properties - else KeyVaultRoleAssignmentProperties(), + properties=( + KeyVaultRoleAssignmentProperties._from_generated(role_assignment.properties) + if role_assignment.properties + else KeyVaultRoleAssignmentProperties() + ), ) @@ -144,9 +146,11 @@ def _from_generated(cls, definition: RoleDefinition) -> "KeyVaultRoleDefinition" description=definition.properties.description if definition.properties else None, id=definition.id, name=definition.name, - permissions=[KeyVaultPermission._from_generated(p) for p in definition.properties.permissions or []] - if definition.properties - else None, + permissions=( + [KeyVaultPermission._from_generated(p) for p in definition.properties.permissions or []] + if definition.properties + else None + ), role_name=definition.properties.role_name if definition.properties else None, role_type=definition.properties.role_type if definition.properties else None, type=definition.type, diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_settings_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_settings_client.py index ab4b5ffdbbff..67dad85e648e 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_settings_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_settings_client.py @@ -27,6 +27,7 @@ class KeyVaultSettingsClient(KeyVaultClientBase): :keyword bool verify_challenge_resource: Whether to verify the authentication challenge resource matches the Key Vault or Managed HSM domain. Defaults to True. """ + # pylint:disable=protected-access @distributed_trace @@ -75,11 +76,7 @@ def update_setting(self, setting: KeyVaultSetting, **kwargs: Any) -> KeyVaultSet :raises ~azure.core.exceptions.HttpResponseError: """ parameters = UpdateSettingRequest(value=setting.value) - result = self._client.update_setting( - setting_name=setting.name, - parameters=parameters, - **kwargs - ) + result = self._client.update_setting(setting_name=setting.name, parameters=parameters, **kwargs) return KeyVaultSetting._from_generated(result) def __enter__(self) -> "KeyVaultSettingsClient": diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py index b6ce9fe5cae8..56fc0bb2c3f3 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_access_control_client.py @@ -68,15 +68,10 @@ async def create_role_assignment( assignment_name = name or uuid4() create_parameters = RoleAssignmentCreateParameters( - properties=RoleAssignmentProperties( - principal_id=principal_id, role_definition_id=str(definition_id) - ) + properties=RoleAssignmentProperties(principal_id=principal_id, role_definition_id=str(definition_id)) ) assignment = await self._client.role_assignments.create( - scope=scope, - role_assignment_name=str(assignment_name), - parameters=create_parameters, - **kwargs + scope=scope, role_assignment_name=str(assignment_name), parameters=create_parameters, **kwargs ) return KeyVaultRoleAssignment._from_generated(assignment) @@ -96,9 +91,7 @@ async def delete_role_assignment( :rtype: None """ try: - await self._client.role_assignments.delete( - scope=scope, role_assignment_name=str(name), **kwargs - ) + await self._client.role_assignments.delete(scope=scope, role_assignment_name=str(name), **kwargs) except ResourceNotFoundError: pass @@ -117,9 +110,7 @@ async def get_role_assignment( :returns: The fetched role assignment. :rtype: ~azure.keyvault.administration.KeyVaultRoleAssignment """ - assignment = await self._client.role_assignments.get( - scope=scope, role_assignment_name=str(name), **kwargs - ) + assignment = await self._client.role_assignments.get(scope=scope, role_assignment_name=str(name), **kwargs) return KeyVaultRoleAssignment._from_generated(assignment) @distributed_trace @@ -136,9 +127,7 @@ def list_role_assignments( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.administration.KeyVaultRoleAssignment] """ return self._client.role_assignments.list_for_scope( - scope=scope, - cls=lambda result: [KeyVaultRoleAssignment._from_generated(a) for a in result], - **kwargs + scope=scope, cls=lambda result: [KeyVaultRoleAssignment._from_generated(a) for a in result], **kwargs ) @distributed_trace_async @@ -199,10 +188,7 @@ async def set_role_definition( parameters = RoleDefinitionCreateParameters(properties=properties) definition = await self._client.role_definitions.create_or_update( - scope=scope, - role_definition_name=str(name or uuid4()), - parameters=parameters, - **kwargs + scope=scope, role_definition_name=str(name or uuid4()), parameters=parameters, **kwargs ) return KeyVaultRoleDefinition._from_generated(definition) @@ -221,9 +207,7 @@ async def get_role_definition( :returns: The fetched role definition. :rtype: ~azure.keyvault.administration.KeyVaultRoleDefinition """ - definition = await self._client.role_definitions.get( - scope=scope, role_definition_name=str(name), **kwargs - ) + definition = await self._client.role_definitions.get(scope=scope, role_definition_name=str(name), **kwargs) return KeyVaultRoleDefinition._from_generated(definition) @distributed_trace_async @@ -242,9 +226,7 @@ async def delete_role_definition( :rtype: None """ try: - await self._client.role_definitions.delete( - scope=scope, role_definition_name=str(name), **kwargs - ) + await self._client.role_definitions.delete(scope=scope, role_definition_name=str(name), **kwargs) except ResourceNotFoundError: pass @@ -262,9 +244,7 @@ def list_role_definitions( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.keyvault.administration.KeyVaultRoleDefinition] """ return self._client.role_definitions.list( - scope=scope, - cls=lambda result: [KeyVaultRoleDefinition._from_generated(d) for d in result], - **kwargs + scope=scope, cls=lambda result: [KeyVaultRoleDefinition._from_generated(d) for d in result], **kwargs ) async def __aenter__(self) -> "KeyVaultAccessControlClient": diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py index f3dc496572bb..64fe36525472 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_backup_client.py @@ -45,9 +45,7 @@ async def _use_continuation_token(self, continuation_token: str, status_method: + "poller's continuation_token() method" ) from ex - pipeline_response = await status_method( - job_id=job_id, cls=lambda pipeline_response, _, __: pipeline_response - ) + pipeline_response = await status_method(job_id=job_id, cls=lambda pipeline_response, _, __: pipeline_response) if "azure-asyncoperation" not in pipeline_response.http_response.headers: pipeline_response.http_response.headers["azure-asyncoperation"] = status_url return _get_continuation_token(pipeline_response) @@ -60,8 +58,7 @@ async def begin_backup( use_managed_identity: Literal[True], continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[KeyVaultBackupResult]: - ... + ) -> AsyncLROPoller[KeyVaultBackupResult]: ... @overload async def begin_backup( @@ -71,8 +68,7 @@ async def begin_backup( sas_token: str, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[KeyVaultBackupResult]: - ... + ) -> AsyncLROPoller[KeyVaultBackupResult]: ... # Disabling pylint checks because they don't correctly handle overloads @distributed_trace_async @@ -138,8 +134,7 @@ async def begin_restore( key_name: Optional[str] = None, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[None]: - ... + ) -> AsyncLROPoller[None]: ... @overload async def begin_restore( @@ -150,8 +145,7 @@ async def begin_restore( key_name: Optional[str] = None, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[None]: - ... + ) -> AsyncLROPoller[None]: ... # Disabling pylint checks because they don't correctly handle overloads @distributed_trace_async @@ -244,8 +238,7 @@ async def begin_pre_backup( use_managed_identity: Literal[True], continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[None]: - ... + ) -> AsyncLROPoller[None]: ... @overload async def begin_pre_backup( @@ -255,8 +248,7 @@ async def begin_pre_backup( sas_token: str, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[None]: - ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async async def begin_pre_backup( # pylint: disable=docstring-keyword-should-match-keyword-only @@ -312,8 +304,7 @@ async def begin_pre_restore( use_managed_identity: Literal[True], continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[None]: - ... + ) -> AsyncLROPoller[None]: ... @overload async def begin_pre_restore( @@ -323,8 +314,7 @@ async def begin_pre_restore( sas_token: str, continuation_token: Optional[str] = None, **kwargs: Any, - ) -> AsyncLROPoller[None]: - ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async async def begin_pre_restore( # pylint: disable=docstring-keyword-should-match-keyword-only diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_settings_client.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_settings_client.py index d1a96bb0bc66..3a6eba9acd30 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_settings_client.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/aio/_settings_client.py @@ -28,6 +28,7 @@ class KeyVaultSettingsClient(AsyncKeyVaultClientBase): :keyword bool verify_challenge_resource: Whether to verify the authentication challenge resource matches the Key Vault or Managed HSM domain. Defaults to True. """ + # pylint:disable=protected-access @distributed_trace_async @@ -78,11 +79,7 @@ async def update_setting(self, setting: KeyVaultSetting, **kwargs: Any) -> KeyVa :raises ~azure.core.exceptions.HttpResponseError: """ parameters = UpdateSettingRequest(value=setting.value) - result = await self._client.update_setting( - setting_name=setting.name, - parameters=parameters, - **kwargs - ) + result = await self._client.update_setting(setting_name=setting.name, parameters=parameters, **kwargs) return KeyVaultSetting._from_generated(result) async def __aenter__(self) -> "KeyVaultSettingsClient": diff --git a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py index 4a88c14046d9..39d3192ccb73 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations.py @@ -12,7 +12,7 @@ # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM and AZURE_CLIENT_ID with the ID of a # service principal -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -79,8 +79,7 @@ # [START update_a_role_definition] new_permissions = [ KeyVaultPermission( - data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] + data_actions=[KeyVaultDataAction.READ_HSM_KEY], not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] ) ] unique_definition_name = role_definition.name diff --git a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py index 4238ea22245d..48f74e078481 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/access_control_operations_async.py @@ -16,7 +16,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -34,6 +34,7 @@ # 5. Delete a role definition (delete_role_definition) # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): MANAGED_HSM_URL = os.environ["MANAGED_HSM_URL"] @@ -41,7 +42,7 @@ async def run_sample(): # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. credential = DefaultAzureCredential() client = KeyVaultAccessControlClient(vault_url=MANAGED_HSM_URL, credential=credential) - + # Let's first create a custom role definition. This role permits creating keys in a Managed HSM. # We'll provide a friendly role name, and let a unique role definition name (a GUID) be generated for us. print("\n.. Create a role definition") @@ -57,8 +58,7 @@ async def run_sample(): print("\n.. Update a role definition") new_permissions = [ KeyVaultPermission( - data_actions=[KeyVaultDataAction.READ_HSM_KEY], - not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] + data_actions=[KeyVaultDataAction.READ_HSM_KEY], not_data_actions=[KeyVaultDataAction.CREATE_HSM_KEY] ) ] unique_definition_name = role_definition.name diff --git a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py index a36305134280..582b250e5f5f 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations.py @@ -17,7 +17,7 @@ # 4. A user-assigned managed identity that has access to your managed HSM. For more information about how to create a # user-assigned managed identity, refer to # https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview -# +# # 5. A storage account, that your managed identity has access to, containing a blob storage container # (See https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) # diff --git a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py index 1cba4d1b11ae..5d5318769300 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/backup_restore_operations_async.py @@ -19,7 +19,7 @@ # 4. A user-assigned managed identity that has access to your managed HSM. For more information about how to create a # user-assigned managed identity, refer to # https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview -# +# # 5. A storage account, that your managed identity has access to, containing a blob storage container # (See https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction) # @@ -36,6 +36,7 @@ # 2. Perform a full restore (begin_restore) # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): MANAGED_HSM_URL = os.environ["MANAGED_HSM_URL"] CONTAINER_URL = os.environ["CONTAINER_URL"] @@ -45,7 +46,7 @@ async def run_sample(): # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. credential = ManagedIdentityCredential(client_id=MANAGED_IDENTITY_CLIENT_ID) client = KeyVaultBackupClient(vault_url=MANAGED_HSM_URL, credential=credential) - + # Let's back up the vault with begin_backup, which returns a poller. Calling result() on the poller will return # a KeyVaultBackupResult that contains the URL of the backup after the operation completes. Calling wait() on # the poller will wait until the operation is complete. diff --git a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py index 390e0d7b4e00..e3b134d2b532 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations.py @@ -13,7 +13,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py index 77a7070a7f44..a7101d5f6bdd 100644 --- a/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py +++ b/sdk/keyvault/azure-keyvault-administration/samples/settings_operations_async.py @@ -16,7 +16,7 @@ # 2. azure-keyvault-administration and azure-identity libraries (pip install these) # # 3. Set environment variable MANAGED_HSM_URL with the URL of your managed HSM -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -28,6 +28,7 @@ # 2. Update a setting (update_setting) # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): MANAGED_HSM_URL = os.environ["MANAGED_HSM_URL"] diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py index 0edb70640803..a3a29b4b8a22 100644 --- a/sdk/keyvault/azure-keyvault-administration/setup.py +++ b/sdk/keyvault/azure-keyvault-administration/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-keyvault-administration" PACKAGE_PPRINT_NAME = "Key Vault Administration" diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_async_test_case.py b/sdk/keyvault/azure-keyvault-administration/tests/_async_test_case.py index c7aa19e75988..ab9fac0ebe9d 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/_async_test_case.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/_async_test_case.py @@ -60,6 +60,7 @@ async def _preparer(test_class, api_version, **kwargs): async with client: await fn(test_class, client, **kwargs) + return _preparer def create_backup_client(self, **kwargs): @@ -82,6 +83,7 @@ async def _preparer(test_class, api_version, **kwargs): async with client: await fn(test_class, client, **kwargs) + return _preparer def create_backup_client(self, **kwargs): @@ -101,11 +103,11 @@ async def _preparer(test_class, api_version, **kwargs): async with client: await fn(test_class, client, **kwargs) + return _preparer def create_access_control_client(self, **kwargs): - from azure.keyvault.administration.aio import \ - KeyVaultAccessControlClient + from azure.keyvault.administration.aio import KeyVaultAccessControlClient credential = self.get_credential(KeyVaultAccessControlClient, is_async=True) return self.create_client_from_credential( @@ -121,11 +123,11 @@ async def _preparer(test_class, api_version, **kwargs): async with client: await fn(test_class, client, **kwargs) + return _preparer def create_access_control_client(self, **kwargs): - from azure.keyvault.administration.aio import \ - KeyVaultSettingsClient + from azure.keyvault.administration.aio import KeyVaultSettingsClient credential = self.get_credential(KeyVaultSettingsClient, is_async=True) return self.create_client_from_credential( diff --git a/sdk/keyvault/azure-keyvault-administration/tests/_test_case.py b/sdk/keyvault/azure-keyvault-administration/tests/_test_case.py index cb9d2edc39e7..fbeca4fd8ec7 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/_test_case.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/_test_case.py @@ -54,7 +54,7 @@ def _set_mgmt_settings_real_values(self): class KeyVaultBackupClientPreparer(BaseClientPreparer): def __init__(self, **kwargs) -> None: - super().__init__(**kwargs) + super().__init__(**kwargs) def __call__(self, fn): def _preparer(test_class, api_version, **kwargs): @@ -65,6 +65,7 @@ def _preparer(test_class, api_version, **kwargs): with client: fn(test_class, client, **kwargs) + return _preparer def create_backup_client(self, **kwargs): @@ -78,7 +79,7 @@ def create_backup_client(self, **kwargs): class KeyVaultBackupClientSasPreparer(BaseClientPreparer): def __init__(self, **kwargs) -> None: - super().__init__(**kwargs) + super().__init__(**kwargs) def __call__(self, fn): def _preparer(test_class, api_version, **kwargs): @@ -90,6 +91,7 @@ def _preparer(test_class, api_version, **kwargs): with client: fn(test_class, client, **kwargs) + return _preparer def create_backup_client(self, **kwargs): @@ -112,6 +114,7 @@ def _preparer(test_class, api_version, **kwargs): with client: fn(test_class, client, **kwargs) + return _preparer def create_access_control_client(self, **kwargs): @@ -134,6 +137,7 @@ def _preparer(test_class, api_version, **kwargs): with client: fn(test_class, client, **kwargs) + return _preparer def create_settings_client(self, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-administration/tests/conftest.py b/sdk/keyvault/azure-keyvault-administration/tests/conftest.py index 66f14f669a46..872fdb9d38f7 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/conftest.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/conftest.py @@ -16,7 +16,8 @@ remove_batch_sanitizers, ) -os.environ['PYTHONHASHSEED'] = '0' +os.environ["PYTHONHASHSEED"] = "0" + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): @@ -24,22 +25,22 @@ def add_sanitizers(test_proxy): azure_keyvault_url = azure_keyvault_url.rstrip("/") keyvault_tenant_id = os.getenv("KEYVAULT_TENANT_ID", "keyvault_tenant_id") keyvault_subscription_id = os.getenv("KEYVAULT_SUBSCRIPTION_ID", "keyvault_subscription_id") - azure_managedhsm_url = os.environ.get("AZURE_MANAGEDHSM_URL","https://Sanitized.managedhsm.azure.net") + azure_managedhsm_url = os.environ.get("AZURE_MANAGEDHSM_URL", "https://Sanitized.managedhsm.azure.net") azure_managedhsm_url = azure_managedhsm_url.rstrip("/") - azure_attestation_uri = os.environ.get("AZURE_KEYVAULT_ATTESTATION_URL","https://Sanitized.azurewebsites.net") - azure_attestation_uri = azure_attestation_uri.rstrip('/') + azure_attestation_uri = os.environ.get("AZURE_KEYVAULT_ATTESTATION_URL", "https://Sanitized.azurewebsites.net") + azure_attestation_uri = azure_attestation_uri.rstrip("/") storage_url = os.environ.get("BLOB_STORAGE_URL", "https://Sanitized.blob.core.windows.net") client_id = os.environ.get("KEYVAULT_CLIENT_ID", "service-principal-id") - sas_token = os.environ.get("BLOB_STORAGE_SAS_TOKEN","fake-sas") + sas_token = os.environ.get("BLOB_STORAGE_SAS_TOKEN", "fake-sas") add_general_string_sanitizer(target=azure_keyvault_url, value="https://Sanitized.vault.azure.net") add_general_string_sanitizer(target=keyvault_tenant_id, value="00000000-0000-0000-0000-000000000000") add_general_string_sanitizer(target=keyvault_subscription_id, value="00000000-0000-0000-0000-000000000000") - add_general_string_sanitizer(target=azure_managedhsm_url,value="https://Sanitized.managedhsm.azure.net") - add_general_string_sanitizer(target=azure_attestation_uri,value="https://Sanitized.azurewebsites.net") + add_general_string_sanitizer(target=azure_managedhsm_url, value="https://Sanitized.managedhsm.azure.net") + add_general_string_sanitizer(target=azure_attestation_uri, value="https://Sanitized.azurewebsites.net") add_general_string_sanitizer(target=storage_url, value="https://Sanitized.blob.core.windows.net") add_general_string_sanitizer(target=sas_token, value="fake-sas") - add_general_string_sanitizer(target=client_id, value = "service-principal-id") + add_general_string_sanitizer(target=client_id, value="service-principal-id") # Sanitize API versions of `azure-keyvault-keys` requests add_uri_regex_sanitizer( regex="keys/([^/]*)/create\\?api-version=(\\S*)", value="keys/$1/create?api-version=sanitized" diff --git a/sdk/keyvault/azure-keyvault-administration/tests/perfstress_tests/get_role_definition.py b/sdk/keyvault/azure-keyvault-administration/tests/perfstress_tests/get_role_definition.py index 80730f6ae7d8..dd5dfb5a2add 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/perfstress_tests/get_role_definition.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/perfstress_tests/get_role_definition.py @@ -8,10 +8,10 @@ from azure.identity import DefaultAzureCredential from azure.identity.aio import DefaultAzureCredential as AsyncDefaultAzureCredential from azure.keyvault.administration import ( - KeyVaultAccessControlClient, + KeyVaultAccessControlClient, KeyVaultDataAction, KeyVaultPermission, - KeyVaultRoleScope, + KeyVaultRoleScope, ) from azure.keyvault.administration.aio import KeyVaultAccessControlClient as AsyncKeyVaultAccessControlClient @@ -32,7 +32,7 @@ def __init__(self, arguments): self.role_name = uuid.uuid4() self.scope = KeyVaultRoleScope.GLOBAL self.permissions = [KeyVaultPermission(data_actions=[KeyVaultDataAction.CREATE_HSM_KEY])] - + async def global_setup(self): """The global setup is run only once.""" await super().global_setup() @@ -42,7 +42,7 @@ async def global_cleanup(self): """The global cleanup is run only once.""" await self.async_client.delete_role_definition(scope=self.scope, name=self.role_name) await super().global_cleanup() - + async def close(self): """This is run after cleanup.""" await self.async_client.close() diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py index eae2f81bb7ab..55c4d4619a9c 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control.py @@ -47,11 +47,7 @@ def test_role_definitions(self, client, **kwargs): permissions = [KeyVaultPermission(data_actions=[KeyVaultDataAction.READ_HSM_KEY])] created_definition = client.set_role_definition( - scope=scope, - name=definition_name, - role_name=role_name, - description="test", - permissions=permissions + scope=scope, name=definition_name, role_name=role_name, description="test", permissions=permissions ) assert "/" in created_definition.assignable_scopes assert created_definition.role_name == role_name @@ -61,9 +57,7 @@ def test_role_definitions(self, client, **kwargs): assert created_definition.permissions[0].data_actions == [KeyVaultDataAction.READ_HSM_KEY] assert created_definition.assignable_scopes == [KeyVaultRoleScope.GLOBAL] # update custom role definition - permissions = [ - KeyVaultPermission(data_actions=[], not_data_actions=[KeyVaultDataAction.READ_HSM_KEY]) - ] + permissions = [KeyVaultPermission(data_actions=[], not_data_actions=[KeyVaultDataAction.READ_HSM_KEY])] role_name2 = self.get_resource_name("role-name2") updated_definition = client.set_role_definition( scope=scope, name=definition_name, role_name=role_name2, permissions=permissions @@ -106,14 +100,14 @@ def test_role_assignment(self, client, **kwargs): created = client.create_role_assignment(scope, definition.id, principal_id, name=name) assert created.name == name - #assert created.properties.principal_id == principal_id + # assert created.properties.principal_id == principal_id assert created.properties.role_definition_id == definition.id assert created.properties.scope == scope # should be able to get the new assignment got = client.get_role_assignment(scope, name) assert got.name == name - #assert got.properties.principal_id == principal_id + # assert got.properties.principal_id == principal_id assert got.properties.role_definition_id == definition.id assert got.properties.scope == scope diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py index cb7ae8428a68..3aa89f8d793e 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_access_control_async.py @@ -7,7 +7,7 @@ import uuid import pytest -from azure.keyvault.administration import KeyVaultDataAction, KeyVaultPermission,KeyVaultRoleScope +from azure.keyvault.administration import KeyVaultDataAction, KeyVaultPermission, KeyVaultRoleScope from devtools_testutils import add_general_regex_sanitizer, set_bodiless_matcher from devtools_testutils.aio import recorded_by_proxy_async @@ -52,11 +52,7 @@ async def test_role_definitions(self, client, **kwargs): add_general_regex_sanitizer(function_scoped=True, regex=definition_name, value="definition-name") permissions = [KeyVaultPermission(data_actions=[KeyVaultDataAction.READ_HSM_KEY])] created_definition = await client.set_role_definition( - scope=scope, - name=definition_name, - role_name=role_name, - description="test", - permissions=permissions + scope=scope, name=definition_name, role_name=role_name, description="test", permissions=permissions ) assert "/" in created_definition.assignable_scopes assert created_definition.role_name == role_name @@ -67,9 +63,7 @@ async def test_role_definitions(self, client, **kwargs): assert created_definition.assignable_scopes == [KeyVaultRoleScope.GLOBAL] # update custom role definition - permissions = [ - KeyVaultPermission(data_actions=[], not_data_actions=[KeyVaultDataAction.READ_HSM_KEY]) - ] + permissions = [KeyVaultPermission(data_actions=[], not_data_actions=[KeyVaultDataAction.READ_HSM_KEY])] role_name2 = self.get_resource_name("role-name2") updated_definition = await client.set_role_definition( scope=scope, name=definition_name, role_name=role_name2, permissions=permissions @@ -96,11 +90,10 @@ async def test_role_definitions(self, client, **kwargs): await client.delete_role_definition(scope, definition_name) async for d in client.list_role_definitions(scope): - assert (d.id != definition.id), "the role definition should have been deleted" + assert d.id != definition.id, "the role definition should have been deleted" if self.is_live: await asyncio.sleep(60) # additional waiting to avoid conflicts with resources in other tests - @pytest.mark.asyncio @pytest.mark.parametrize("api_version", all_api_versions) @KeyVaultAccessControlClientPreparer() @@ -120,14 +113,14 @@ async def test_role_assignment(self, client, **kwargs): created = await client.create_role_assignment(scope, definition.id, principal_id, name=name) assert created.name == name - #assert created.properties.principal_id == principal_id + # assert created.properties.principal_id == principal_id assert created.properties.role_definition_id == definition.id assert created.properties.scope == scope # should be able to get the new assignment got = await client.get_role_assignment(scope, name) assert got.name == name - #assert got.properties.principal_id == principal_id + # assert got.properties.principal_id == principal_id assert got.properties.role_definition_id == definition.id assert got.properties.scope == scope diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client.py b/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client.py index d5bd21ee0dfa..6f8f20155dc6 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client.py @@ -23,8 +23,9 @@ class TestBackupClientTests(KeyVaultTestCase): def create_key_client(self, vault_uri, **kwargs): from azure.keyvault.keys import KeyClient + credential = self.get_credential(KeyClient) - return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs ) + return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs) @pytest.mark.parametrize("api_version", only_default) @KeyVaultBackupClientPreparer() @@ -99,7 +100,6 @@ def test_selective_key_restore(self, client, **kwargs): key_name = self.get_resource_name("selective-restore-test-key") key_client.create_rsa_key(key_name) - # backup the vault container_uri = kwargs.pop("container_uri") backup_poller = client.begin_backup(container_uri, use_managed_identity=True) @@ -188,7 +188,9 @@ def test_backup_restore_sas(self, client: KeyVaultBackupClient, **kwargs): sas_token = kwargs.pop("sas_token") if self.is_live and not sas_token: - pytest.skip("SAS token is required for live tests. Please set the BLOB_STORAGE_SAS_TOKEN environment variable.") + pytest.skip( + "SAS token is required for live tests. Please set the BLOB_STORAGE_SAS_TOKEN environment variable." + ) client.begin_pre_backup(container_uri, sas_token=sas_token).wait() backup_poller = client.begin_backup(container_uri, sas_token) # Test positional SAS token for backwards compat diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client_async.py b/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client_async.py index 7f6e6084500a..c35dd17a3863 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client_async.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_backup_client_async.py @@ -20,9 +20,10 @@ class TestBackupClientTests(KeyVaultTestCase): def create_key_client(self, vault_uri, **kwargs): - from azure.keyvault.keys.aio import KeyClient - credential = self.get_credential(KeyClient, is_async=True) - return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs ) + from azure.keyvault.keys.aio import KeyClient + + credential = self.get_credential(KeyClient, is_async=True) + return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs) @pytest.mark.asyncio @pytest.mark.parametrize("api_version", only_default) @@ -139,7 +140,7 @@ async def test_backup_client_polling(self, client, **kwargs): if self.is_live: assert backup_poller.status() == "InProgress" assert not backup_poller.done() or backup_poller.polling_method().finished() - #assert rehydrated.status() == "InProgress" + # assert rehydrated.status() == "InProgress" assert not rehydrated.done() or rehydrated.polling_method().finished() backup_operation = await backup_poller.result() @@ -169,7 +170,7 @@ async def test_backup_client_polling(self, client, **kwargs): if self.is_live: assert restore_poller.status() == "InProgress" assert not restore_poller.done() or restore_poller.polling_method().finished() - #assert rehydrated.status() == "InProgress" + # assert rehydrated.status() == "InProgress" assert not rehydrated.done() or rehydrated.polling_method().finished() await rehydrated.wait() @@ -190,7 +191,9 @@ async def test_backup_restore_sas(self, client, **kwargs): sas_token = kwargs.pop("sas_token") if self.is_live and not sas_token: - pytest.skip("SAS token is required for live tests. Please set the BLOB_STORAGE_SAS_TOKEN environment variable.") + pytest.skip( + "SAS token is required for live tests. Please set the BLOB_STORAGE_SAS_TOKEN environment variable." + ) check_poller = await client.begin_pre_backup(container_uri, sas_token=sas_token) await check_poller.wait() diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration.py b/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration.py index ddcb3d8876d1..4bb463ad28be 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration.py @@ -18,8 +18,9 @@ class TestExamplesTests(KeyVaultTestCase): def create_key_client(self, vault_uri, **kwargs): from azure.keyvault.keys import KeyClient + credential = self.get_credential(KeyClient) - return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs ) + return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs) @pytest.mark.parametrize("api_version", only_default) @KeyVaultBackupClientPreparer() @@ -63,7 +64,7 @@ def test_example_backup_and_restore(self, client, **kwargs): @pytest.mark.parametrize("api_version", only_default) @KeyVaultBackupClientPreparer() @recorded_by_proxy - def test_example_selective_key_restore(self, client,**kwargs): + def test_example_selective_key_restore(self, client, **kwargs): set_bodiless_matcher() # create a key to selectively restore managed_hsm_url = kwargs.pop("managed_hsm_url") diff --git a/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration_async.py b/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration_async.py index 1268425b5ea6..c601e60c38fa 100644 --- a/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration_async.py +++ b/sdk/keyvault/azure-keyvault-administration/tests/test_examples_administration_async.py @@ -20,8 +20,9 @@ class TestExamplesTests(KeyVaultTestCase): def create_key_client(self, vault_uri, **kwargs): from azure.keyvault.keys.aio import KeyClient + credential = self.get_credential(KeyClient, is_async=True) - return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs ) + return self.create_client_from_credential(KeyClient, credential=credential, vault_url=vault_uri, **kwargs) @pytest.mark.asyncio @pytest.mark.parametrize("api_version", only_default) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/__init__.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/__init__.py index 3e8da4143494..bcfe703f7183 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/__init__.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/__init__.py @@ -3,15 +3,15 @@ # Licensed under the MIT License. # ------------------------------------ from ._client import CertificateClient -from ._enums import( +from ._enums import ( CertificatePolicyAction, KeyCurveName, KeyType, CertificateContentType, KeyUsageType, - WellKnownIssuerNames + WellKnownIssuerNames, ) -from ._models import( +from ._models import ( AdministratorContact, CertificateContact, CertificateIssuer, @@ -23,7 +23,7 @@ IssuerProperties, LifetimeAction, KeyVaultCertificate, - KeyVaultCertificateIdentifier + KeyVaultCertificateIdentifier, ) from ._shared.client_base import ApiVersion @@ -49,8 +49,9 @@ "CertificateContentType", "WellKnownIssuerNames", "CertificateIssuer", - "IssuerProperties" + "IssuerProperties", ] from ._version import VERSION + __version__ = VERSION diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py index d0f4f65fea02..a79af2de6383 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py @@ -26,7 +26,6 @@ ) from ._polling import CreateCertificatePoller - NO_SAN_OR_SUBJECT = "You need to set either subject or one of the subject alternative names parameters in the policy" @@ -135,7 +134,7 @@ def begin_create_certificate( create_certificate_polling = CreateCertificatePoller( pipeline_response=pipeline_response, get_certificate_command=get_certificate_command, - interval=polling_interval + interval=polling_interval, ) def no_op(*_, **__) -> Any: # The deserialization callback is ignored based on polling implementation @@ -166,9 +165,7 @@ def get_certificate(self, certificate_name: str, **kwargs: Any) -> KeyVaultCerti :caption: Get a certificate :dedent: 8 """ - bundle = self._client.get_certificate( - certificate_name=certificate_name, certificate_version="", **kwargs - ) + bundle = self._client.get_certificate(certificate_name=certificate_name, certificate_version="", **kwargs) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace @@ -195,9 +192,7 @@ def get_certificate_version(self, certificate_name: str, version: str, **kwargs: :caption: Get a certificate with a specific version :dedent: 8 """ - bundle = self._client.get_certificate( - certificate_name=certificate_name, certificate_version=version, **kwargs - ) + bundle = self._client.get_certificate(certificate_name=certificate_name, certificate_version=version, **kwargs) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace @@ -272,9 +267,7 @@ def get_deleted_certificate(self, certificate_name: str, **kwargs: Any) -> Delet :caption: Get a deleted certificate :dedent: 8 """ - bundle = self._client.get_deleted_certificate( - certificate_name=certificate_name, **kwargs - ) + bundle = self._client.get_deleted_certificate(certificate_name=certificate_name, **kwargs) return DeletedCertificate._from_deleted_certificate_bundle(deleted_certificate_bundle=bundle) @distributed_trace @@ -294,9 +287,7 @@ def purge_deleted_certificate(self, certificate_name: str, **kwargs: Any) -> Non :raises ~azure.core.exceptions.HttpResponseError: """ - self._client.purge_deleted_certificate( - certificate_name=certificate_name, **kwargs - ) + self._client.purge_deleted_certificate(certificate_name=certificate_name, **kwargs) @distributed_trace def begin_recover_deleted_certificate(self, certificate_name: str, **kwargs: Any) -> LROPoller[KeyVaultCertificate]: @@ -341,7 +332,7 @@ def begin_recover_deleted_certificate(self, certificate_name: str, **kwargs: Any pipeline_response=pipeline_response, command=command, final_resource=recovered_certificate, - interval=polling_interval + interval=polling_interval, ) return KeyVaultOperationPoller(polling_method) @@ -403,9 +394,7 @@ def import_certificate( preserve_cert_order=preserve_order, ) - bundle = self._client.import_certificate( - certificate_name=certificate_name, parameters=parameters, **kwargs - ) + bundle = self._client.import_certificate(certificate_name=certificate_name, parameters=parameters, **kwargs) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace @@ -421,9 +410,7 @@ def get_certificate_policy(self, certificate_name: str, **kwargs: Any) -> Certif :raises ~azure.core.exceptions.HttpResponseError: """ - bundle = self._client.get_certificate_policy( - certificate_name=certificate_name, **kwargs - ) + bundle = self._client.get_certificate_policy(certificate_name=certificate_name, **kwargs) return CertificatePolicy._from_certificate_policy_bundle(certificate_policy_bundle=bundle) @distributed_trace @@ -444,9 +431,7 @@ def update_certificate_policy( :raises ~azure.core.exceptions.HttpResponseError: """ bundle = self._client.update_certificate_policy( - certificate_name=certificate_name, - certificate_policy=policy._to_certificate_policy_bundle(), - **kwargs + certificate_name=certificate_name, certificate_policy=policy._to_certificate_policy_bundle(), **kwargs ) return CertificatePolicy._from_certificate_policy_bundle(certificate_policy_bundle=bundle) @@ -488,15 +473,10 @@ def update_certificate_properties( else: attributes = None - parameters = self._models.CertificateUpdateParameters( - certificate_attributes=attributes, tags=tags - ) + parameters = self._models.CertificateUpdateParameters(certificate_attributes=attributes, tags=tags) bundle = self._client.update_certificate( - certificate_name=certificate_name, - certificate_version=version or "", - parameters=parameters, - **kwargs + certificate_name=certificate_name, certificate_version=version or "", parameters=parameters, **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -525,9 +505,7 @@ def backup_certificate(self, certificate_name: str, **kwargs: Any) -> bytes: :caption: Get a certificate backup :dedent: 8 """ - backup_result = self._client.backup_certificate( - certificate_name=certificate_name, **kwargs - ) + backup_result = self._client.backup_certificate(certificate_name=certificate_name, **kwargs) return backup_result.value @distributed_trace @@ -554,8 +532,7 @@ def restore_certificate_backup(self, backup: bytes, **kwargs: Any) -> KeyVaultCe :dedent: 8 """ bundle = self._client.restore_certificate( - parameters=self._models.CertificateRestoreParameters(certificate_bundle_backup=backup), - **kwargs + parameters=self._models.CertificateRestoreParameters(certificate_bundle_backup=backup), **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -601,7 +578,7 @@ def list_deleted_certificates( cls=lambda objs: [ DeletedCertificate._from_deleted_certificate_item(deleted_certificate_item=x) for x in objs ], - **kwargs + **kwargs, ) @distributed_trace @@ -643,7 +620,7 @@ def list_properties_of_certificates( return self._client.get_certificates( maxresults=max_page_size, cls=lambda objs: [CertificateProperties._from_certificate_item(certificate_item=x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -674,7 +651,7 @@ def list_properties_of_certificate_versions( certificate_name=certificate_name, maxresults=max_page_size, cls=lambda objs: [CertificateProperties._from_certificate_item(certificate_item=x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -698,8 +675,7 @@ def set_contacts(self, contacts: "List[CertificateContact]", **kwargs: Any) -> " :dedent: 8 """ new_contacts = self._client.set_certificate_contacts( - contacts=self._models.Contacts(contact_list=[c._to_certificate_contacts_item() for c in contacts]), - **kwargs + contacts=self._models.Contacts(contact_list=[c._to_certificate_contacts_item() for c in contacts]), **kwargs ) return [ CertificateContact._from_certificate_contacts_item(contact_item=item) for item in new_contacts.contact_list @@ -758,9 +734,7 @@ def get_certificate_operation(self, certificate_name: str, **kwargs: Any) -> Cer the former if the certificate doesn't exist; the latter for other errors """ - bundle = self._client.get_certificate_operation( - certificate_name=certificate_name, **kwargs - ) + bundle = self._client.get_certificate_operation(certificate_name=certificate_name, **kwargs) return CertificateOperation._from_certificate_operation_bundle(certificate_operation_bundle=bundle) @distributed_trace @@ -776,9 +750,7 @@ def delete_certificate_operation(self, certificate_name: str, **kwargs: Any) -> :raises ~azure.core.exceptions.HttpResponseError: """ - bundle = self._client.delete_certificate_operation( - certificate_name=certificate_name, **kwargs - ) + bundle = self._client.delete_certificate_operation(certificate_name=certificate_name, **kwargs) return CertificateOperation._from_certificate_operation_bundle(certificate_operation_bundle=bundle) @distributed_trace @@ -795,7 +767,7 @@ def cancel_certificate_operation(self, certificate_name: str, **kwargs: Any) -> bundle = self._client.update_certificate_operation( certificate_name=certificate_name, certificate_operation=self._models.CertificateOperationUpdateParameter(cancellation_requested=True), - **kwargs + **kwargs, ) return CertificateOperation._from_certificate_operation_bundle(certificate_operation_bundle=bundle) @@ -840,9 +812,7 @@ def merge_certificate( x509_certificates=x509_certificates, certificate_attributes=attributes, tags=tags ) - bundle = self._client.merge_certificate( - certificate_name=certificate_name, parameters=parameters, **kwargs - ) + bundle = self._client.merge_certificate(certificate_name=certificate_name, parameters=parameters, **kwargs) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace @@ -865,9 +835,7 @@ def get_issuer(self, issuer_name: str, **kwargs: Any) -> CertificateIssuer: :caption: Get an issuer :dedent: 8 """ - issuer_bundle = self._client.get_certificate_issuer( - issuer_name=issuer_name, **kwargs - ) + issuer_bundle = self._client.get_certificate_issuer(issuer_name=issuer_name, **kwargs) return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace @@ -942,9 +910,7 @@ def create_issuer( attributes=issuer_attributes, ) - issuer_bundle = self._client.set_certificate_issuer( - issuer_name=issuer_name, parameter=parameters, **kwargs - ) + issuer_bundle = self._client.set_certificate_issuer(issuer_name=issuer_name, parameter=parameters, **kwargs) return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace @@ -1010,9 +976,7 @@ def update_issuer( attributes=issuer_attributes, ) - issuer_bundle = self._client.update_certificate_issuer( - issuer_name=issuer_name, parameter=parameters, **kwargs - ) + issuer_bundle = self._client.update_certificate_issuer(issuer_name=issuer_name, parameter=parameters, **kwargs) return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace @@ -1036,9 +1000,7 @@ def delete_issuer(self, issuer_name: str, **kwargs: Any) -> CertificateIssuer: :caption: Delete an issuer :dedent: 8 """ - issuer_bundle = self._client.delete_certificate_issuer( - issuer_name=issuer_name, **kwargs - ) + issuer_bundle = self._client.delete_certificate_issuer(issuer_name=issuer_name, **kwargs) return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace @@ -1064,7 +1026,7 @@ def list_properties_of_issuers(self, **kwargs: Any) -> ItemPaged[IssuerPropertie return self._client.get_certificate_issuers( maxresults=max_page_size, cls=lambda objs: [IssuerProperties._from_issuer_item(issuer_item=x) for x in objs], - **kwargs + **kwargs, ) def __enter__(self) -> "CertificateClient": diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations/_patch.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_patch.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_patch.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations/_patch.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_patch.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_patch.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models/_patch.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models/_patch.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py index ad50d3fd72af..e460f12051c6 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_models.py @@ -312,7 +312,7 @@ def version(self) -> Optional[str]: def preserve_order(self) -> Optional[bool]: """Whether the certificate order should be preserved. - :returns: Specifies whether the certificate chain preserves its original order. The default value is False, + :returns: Specifies whether the certificate chain preserves its original order. The default value is False, which sets the leaf certificate at index 0. :rtype: bool or None """ diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py index 0f84607e3ccd..3e3ac1855178 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py @@ -66,7 +66,6 @@ async def await_result(func: Callable[P, Union[T, Awaitable[T]]], *args: P.args, return result - class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """Policy for handling HTTP authentication challenges. @@ -83,9 +82,7 @@ def __init__(self, credential: AsyncTokenProvider, *scopes: str, **kwargs: Any) self._verify_challenge_resource = kwargs.pop("verify_challenge_resource", True) self._request_copy: Optional[HttpRequest] = None - async def send( - self, request: PipelineRequest[HttpRequest] - ) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: + async def send(self, request: PipelineRequest[HttpRequest]) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: """Authorize request with a bearer token and send it to the next policy. We implement this method to account for the valid scenario where a Key Vault authentication challenge is @@ -156,7 +153,6 @@ async def handle_challenge_flow( await await_result(self.on_response, request, response) return response - async def on_request(self, request: PipelineRequest) -> None: _enforce_tls(request) challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) @@ -227,9 +223,7 @@ async def on_challenge(self, request: PipelineRequest, response: PipelineRespons if challenge.tenant_id and challenge.tenant_id.lower().endswith("adfs"): await self.authorize_request(request, scope, claims=challenge.claims) else: - await self.authorize_request( - request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id - ) + await self.authorize_request(request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id) return True diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge_cache.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge_cache.py index 99f32091e24b..1048710eed2f 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge_cache.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge_cache.py @@ -8,7 +8,6 @@ from .http_challenge import HttpChallenge - _cache: "Dict[str, HttpChallenge]" = {} _lock = threading.Lock() diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py index bd6288a39369..2790d67d0e00 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py @@ -119,7 +119,7 @@ async def create_certificate( certificate_name=certificate_name, parameters=parameters, cls=lambda pipeline_response, deserialized, _: (pipeline_response, deserialized), - **kwargs + **kwargs, ) create_certificate_operation = CertificateOperation._from_certificate_operation_bundle(cert_bundle) @@ -133,8 +133,10 @@ async def create_certificate( get_certificate_command=get_certificate_command, interval=polling_interval, ) + def no_op(*_, **__) -> Any: # The deserialization callback is ignored based on polling implementation pass + return await AsyncLROPoller(command, create_certificate_operation, no_op, create_certificate_polling) @distributed_trace_async @@ -160,17 +162,11 @@ async def get_certificate(self, certificate_name: str, **kwargs: Any) -> KeyVaul :caption: Get a certificate :dedent: 8 """ - bundle = await self._client.get_certificate( - certificate_name=certificate_name, - certificate_version="", - **kwargs - ) + bundle = await self._client.get_certificate(certificate_name=certificate_name, certificate_version="", **kwargs) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace_async - async def get_certificate_version( - self, certificate_name: str, version: str, **kwargs: Any - ) -> KeyVaultCertificate: + async def get_certificate_version(self, certificate_name: str, version: str, **kwargs: Any) -> KeyVaultCertificate: """Gets a specific version of a certificate without returning its management policy. Requires certificates/get permission. To get the latest version of the certificate, or to get the certificate's @@ -194,9 +190,7 @@ async def get_certificate_version( :dedent: 8 """ bundle = await self._client.get_certificate( - certificate_name=certificate_name, - certificate_version=version, - **kwargs + certificate_name=certificate_name, certificate_version=version, **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -267,9 +261,7 @@ async def get_deleted_certificate(self, certificate_name: str, **kwargs: Any) -> :caption: Get a deleted certificate :dedent: 8 """ - bundle = await self._client.get_deleted_certificate( - certificate_name=certificate_name, **kwargs - ) + bundle = await self._client.get_deleted_certificate(certificate_name=certificate_name, **kwargs) return DeletedCertificate._from_deleted_certificate_bundle(deleted_certificate_bundle=bundle) @distributed_trace_async @@ -289,9 +281,7 @@ async def purge_deleted_certificate(self, certificate_name: str, **kwargs: Any) :raises ~azure.core.exceptions.HttpResponseError: """ - await self._client.purge_deleted_certificate( - certificate_name=certificate_name, **kwargs - ) + await self._client.purge_deleted_certificate(certificate_name=certificate_name, **kwargs) @distributed_trace_async async def recover_deleted_certificate(self, certificate_name: str, **kwargs: Any) -> KeyVaultCertificate: @@ -332,7 +322,7 @@ async def recover_deleted_certificate(self, certificate_name: str, **kwargs: Any command=command, final_resource=recovered_certificate, finished=False, - interval=polling_interval + interval=polling_interval, ) await polling_method.run() @@ -396,9 +386,7 @@ async def import_certificate( ) bundle = await self._client.import_certificate( - certificate_name=certificate_name, - parameters=parameters, - **kwargs + certificate_name=certificate_name, parameters=parameters, **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -415,9 +403,7 @@ async def get_certificate_policy(self, certificate_name: str, **kwargs: Any) -> :raises ~azure.core.exceptions.HttpResponseError: """ - bundle = await self._client.get_certificate_policy( - certificate_name=certificate_name, **kwargs - ) + bundle = await self._client.get_certificate_policy(certificate_name=certificate_name, **kwargs) return CertificatePolicy._from_certificate_policy_bundle(certificate_policy_bundle=bundle) @distributed_trace_async @@ -438,9 +424,7 @@ async def update_certificate_policy( :raises ~azure.core.exceptions.HttpResponseError: """ bundle = await self._client.update_certificate_policy( - certificate_name=certificate_name, - certificate_policy=policy._to_certificate_policy_bundle(), - **kwargs + certificate_name=certificate_name, certificate_policy=policy._to_certificate_policy_bundle(), **kwargs ) return CertificatePolicy._from_certificate_policy_bundle(certificate_policy_bundle=bundle) @@ -482,15 +466,10 @@ async def update_certificate_properties( else: attributes = None - parameters = self._models.CertificateUpdateParameters( - certificate_attributes=attributes, tags=tags - ) + parameters = self._models.CertificateUpdateParameters(certificate_attributes=attributes, tags=tags) bundle = await self._client.update_certificate( - certificate_name=certificate_name, - certificate_version=version or "", - parameters=parameters, - **kwargs + certificate_name=certificate_name, certificate_version=version or "", parameters=parameters, **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -519,9 +498,7 @@ async def backup_certificate(self, certificate_name: str, **kwargs: Any) -> byte :caption: Get a certificate backup :dedent: 8 """ - backup_result = await self._client.backup_certificate( - certificate_name=certificate_name, **kwargs - ) + backup_result = await self._client.backup_certificate(certificate_name=certificate_name, **kwargs) return backup_result.value @distributed_trace_async @@ -548,8 +525,7 @@ async def restore_certificate_backup(self, backup: bytes, **kwargs: Any) -> KeyV :dedent: 8 """ bundle = await self._client.restore_certificate( - parameters=self._models.CertificateRestoreParameters(certificate_bundle_backup=backup), - **kwargs + parameters=self._models.CertificateRestoreParameters(certificate_bundle_backup=backup), **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -593,7 +569,7 @@ def list_deleted_certificates( return self._client.get_deleted_certificates( maxresults=max_page_size, cls=lambda objs: [DeletedCertificate._from_deleted_certificate_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -635,7 +611,7 @@ def list_properties_of_certificates( return self._client.get_certificates( maxresults=max_page_size, cls=lambda objs: [CertificateProperties._from_certificate_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -666,7 +642,7 @@ def list_properties_of_certificate_versions( certificate_name=certificate_name, maxresults=max_page_size, cls=lambda objs: [CertificateProperties._from_certificate_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace_async @@ -690,8 +666,7 @@ async def set_contacts(self, contacts: List[CertificateContact], **kwargs: Any) :dedent: 8 """ new_contacts = await self._client.set_certificate_contacts( - contacts=self._models.Contacts(contact_list=[c._to_certificate_contacts_item() for c in contacts]), - **kwargs + contacts=self._models.Contacts(contact_list=[c._to_certificate_contacts_item() for c in contacts]), **kwargs ) return [ CertificateContact._from_certificate_contacts_item(contact_item=item) for item in new_contacts.contact_list @@ -714,8 +689,7 @@ async def get_contacts(self, **kwargs: Any) -> List[CertificateContact]: :caption: Get contacts :dedent: 8 """ - contacts = await self._client.get_certificate_contacts( **kwargs - ) + contacts = await self._client.get_certificate_contacts(**kwargs) return [CertificateContact._from_certificate_contacts_item(contact_item=item) for item in contacts.contact_list] @distributed_trace_async @@ -735,9 +709,7 @@ async def delete_contacts(self, **kwargs: Any) -> List[CertificateContact]: :caption: Delete contacts :dedent: 8 """ - contacts = await self._client.delete_certificate_contacts( - **kwargs - ) + contacts = await self._client.delete_certificate_contacts(**kwargs) return [CertificateContact._from_certificate_contacts_item(contact_item=item) for item in contacts.contact_list] @distributed_trace_async @@ -753,9 +725,7 @@ async def get_certificate_operation(self, certificate_name: str, **kwargs: Any) the former if the certificate doesn't exist; the latter for other errors """ - bundle = await self._client.get_certificate_operation( - certificate_name=certificate_name, **kwargs - ) + bundle = await self._client.get_certificate_operation(certificate_name=certificate_name, **kwargs) return CertificateOperation._from_certificate_operation_bundle(certificate_operation_bundle=bundle) @distributed_trace_async @@ -772,9 +742,7 @@ async def delete_certificate_operation(self, certificate_name: str, **kwargs: An :raises ~azure.core.exceptions.ResourceNotFoundError or ~azure.core.exceptions.HttpResponseError: the former if the operation doesn't exist; the latter for other errors """ - bundle = await self._client.delete_certificate_operation( - certificate_name=certificate_name, **kwargs - ) + bundle = await self._client.delete_certificate_operation(certificate_name=certificate_name, **kwargs) return CertificateOperation._from_certificate_operation_bundle(certificate_operation_bundle=bundle) @distributed_trace_async @@ -791,7 +759,7 @@ async def cancel_certificate_operation(self, certificate_name: str, **kwargs: An bundle = await self._client.update_certificate_operation( certificate_name=certificate_name, certificate_operation=self._models.CertificateOperationUpdateParameter(cancellation_requested=True), - **kwargs + **kwargs, ) return CertificateOperation._from_certificate_operation_bundle(certificate_operation_bundle=bundle) @@ -836,9 +804,7 @@ async def merge_certificate( ) bundle = await self._client.merge_certificate( - certificate_name=certificate_name, - parameters=parameters, - **kwargs + certificate_name=certificate_name, parameters=parameters, **kwargs ) return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @@ -862,9 +828,7 @@ async def get_issuer(self, issuer_name: str, **kwargs: Any) -> CertificateIssuer :caption: Get an issuer :dedent: 8 """ - issuer_bundle = await self._client.get_certificate_issuer( - issuer_name=issuer_name, **kwargs - ) + issuer_bundle = await self._client.get_certificate_issuer(issuer_name=issuer_name, **kwargs) return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace_async @@ -1034,9 +998,7 @@ async def delete_issuer(self, issuer_name: str, **kwargs: Any) -> CertificateIss :caption: Delete an issuer :dedent: 8 """ - issuer_bundle = await self._client.delete_certificate_issuer( - issuer_name=issuer_name, **kwargs - ) + issuer_bundle = await self._client.delete_certificate_issuer(issuer_name=issuer_name, **kwargs) return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace @@ -1060,9 +1022,7 @@ def list_properties_of_issuers(self, **kwargs: Any) -> AsyncItemPaged[IssuerProp """ max_page_size = kwargs.pop("max_page_size", None) return self._client.get_certificate_issuers( - maxresults=max_page_size, - cls=lambda objs: [IssuerProperties._from_issuer_item(x) for x in objs], - **kwargs + maxresults=max_page_size, cls=lambda objs: [IssuerProperties._from_issuer_item(x) for x in objs], **kwargs ) async def __aenter__(self) -> "CertificateClient": diff --git a/sdk/keyvault/azure-keyvault-certificates/setup.py b/sdk/keyvault/azure-keyvault-certificates/setup.py index b9ea86ee01d9..5829a17ff29d 100644 --- a/sdk/keyvault/azure-keyvault-certificates/setup.py +++ b/sdk/keyvault/azure-keyvault-certificates/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-keyvault-certificates" PACKAGE_PPRINT_NAME = "Key Vault Certificates" diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py index 74932f3cffa8..01f6caf3f6ee 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py @@ -42,7 +42,6 @@ from _test_case import get_decorator, CertificatesClientPreparer from certs import CERT_CONTENT_PASSWORD_ENCODED, CERT_CONTENT_NOT_PASSWORD_ENCODED - all_api_versions = get_decorator() only_latest = get_decorator(api_versions=[DEFAULT_VERSION]) logging_enabled = get_decorator(logging_enable=True) @@ -782,9 +781,7 @@ def test_unknown_issuer_response(self, client, **kwargs): content_type=CertificateContentType.pkcs12, validity_in_months=24, ) - create_certificate_poller = client.begin_create_certificate( - certificate_name=cert_name, policy=cert_policy - ) + create_certificate_poller = client.begin_create_certificate(certificate_name=cert_name, policy=cert_policy) result = create_certificate_poller.result() # The operation should indicate that certificate creation is in progress and requires a merge to complete assert isinstance(result, CertificateOperation) diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py index b7265a59b4f7..905176f3557e 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py @@ -39,7 +39,6 @@ from _test_case import get_decorator from certs import CERT_CONTENT_PASSWORD_ENCODED, CERT_CONTENT_NOT_PASSWORD_ENCODED - all_api_versions = get_decorator() only_latest = get_decorator(api_versions=[DEFAULT_VERSION]) logging_enabled = get_decorator(logging_enable=True) diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py index 821e3091c614..1a16fdd92723 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py @@ -12,7 +12,6 @@ from _test_case import get_decorator from devtools_testutils.aio import recorded_by_proxy_async - all_api_versions = get_decorator(is_async=True) exclude_2016_10_01 = get_decorator(is_async=True, api_versions=[v for v in ApiVersion if v != ApiVersion.V2016_10_01]) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index 6ab95a316bd7..a18cb7b3586e 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -78,12 +78,12 @@ def _get_attributes( return None def get_cryptography_client( - self, - key_name: str, - *, - key_version: Optional[str] = None, - **kwargs, # pylint: disable=unused-argument - ) -> CryptographyClient: + self, + key_name: str, + *, + key_version: Optional[str] = None, + **kwargs, # pylint: disable=unused-argument + ) -> CryptographyClient: """Gets a :class:`~azure.keyvault.keys.crypto.CryptographyClient` for the given key. :param str key_name: The name of the key used to perform cryptographic operations. @@ -398,7 +398,9 @@ def create_oct_key( ) @distributed_trace - def begin_delete_key(self, name: str, **kwargs: Any) -> LROPoller[DeletedKey]: # pylint:disable=bad-option-value,delete-operation-wrong-return-type + def begin_delete_key( + self, name: str, **kwargs: Any + ) -> LROPoller[DeletedKey]: # pylint:disable=bad-option-value,delete-operation-wrong-return-type """Delete all versions of a key and its cryptographic material. Requires keys/delete permission. When this method returns Key Vault has begun deleting the key. Deletion may @@ -519,7 +521,7 @@ def list_deleted_keys(self, **kwargs: Any) -> ItemPaged[DeletedKey]: return self._client.get_deleted_keys( maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [DeletedKey._from_deleted_key_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -542,7 +544,7 @@ def list_properties_of_keys(self, **kwargs: Any) -> ItemPaged[KeyProperties]: return self._client.get_keys( maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [KeyProperties._from_key_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -568,7 +570,7 @@ def list_properties_of_key_versions(self, name: str, **kwargs: Any) -> ItemPaged name, maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [KeyProperties._from_key_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -709,9 +711,7 @@ def update_key_properties( release_policy=policy, ) - bundle = self._client.update_key( - name, key_version=version or "", parameters=parameters, **kwargs - ) + bundle = self._client.update_key(name, key_version=version or "", parameters=parameters, **kwargs) return KeyVaultKey._from_key_bundle(bundle) @distributed_trace @@ -770,8 +770,7 @@ def restore_key_backup(self, backup: bytes, **kwargs: Any) -> KeyVaultKey: :dedent: 8 """ bundle = self._client.restore_key( - parameters=self._models.KeyRestoreParameters(key_bundle_backup=backup), - **kwargs + parameters=self._models.KeyRestoreParameters(key_bundle_backup=backup), **kwargs ) return KeyVaultKey._from_key_bundle(bundle) @@ -877,7 +876,7 @@ def release_key( nonce=nonce, enc=algorithm, ), - **kwargs + **kwargs, ) return ReleaseKeyResult(result.value) @@ -988,7 +987,7 @@ def update_key_rotation_policy( # pylint: disable=unused-argument @distributed_trace def get_key_attestation(self, name: str, version: Optional[str] = None, **kwargs: Any) -> KeyVaultKey: """Get a key and its attestation blob. - + This method is applicable to any key stored in Azure Key Vault Managed HSM. This operation requires the keys/get permission. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_operations/_patch.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_patch.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_patch.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_operations/_patch.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_patch.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_patch.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/models/_patch.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/models/_patch.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py index b0c6b4138afd..655e95db36f3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py @@ -312,7 +312,9 @@ def attestation(self) -> Optional[KeyAttestation]: # attestation was added in 7.6-preview.2 if self._attributes: attestation = getattr(self._attributes, "attestation", None) - return KeyAttestation._from_generated(attestation=attestation) if attestation else None # pylint:disable=protected-access + return ( + KeyAttestation._from_generated(attestation=attestation) if attestation else None + ) # pylint:disable=protected-access return None @@ -411,7 +413,8 @@ def _from_generated(cls, policy: "_models.KeyRotationPolicy") -> "KeyRotationPol [] if policy.lifetime_actions is None else [ - KeyRotationLifetimeAction._from_generated(action) for action in policy.lifetime_actions # pylint:disable=protected-access + KeyRotationLifetimeAction._from_generated(action) + for action in policy.lifetime_actions # pylint:disable=protected-access ] ) if policy.attributes: diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py index 0f84607e3ccd..3e3ac1855178 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py @@ -66,7 +66,6 @@ async def await_result(func: Callable[P, Union[T, Awaitable[T]]], *args: P.args, return result - class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """Policy for handling HTTP authentication challenges. @@ -83,9 +82,7 @@ def __init__(self, credential: AsyncTokenProvider, *scopes: str, **kwargs: Any) self._verify_challenge_resource = kwargs.pop("verify_challenge_resource", True) self._request_copy: Optional[HttpRequest] = None - async def send( - self, request: PipelineRequest[HttpRequest] - ) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: + async def send(self, request: PipelineRequest[HttpRequest]) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: """Authorize request with a bearer token and send it to the next policy. We implement this method to account for the valid scenario where a Key Vault authentication challenge is @@ -156,7 +153,6 @@ async def handle_challenge_flow( await await_result(self.on_response, request, response) return response - async def on_request(self, request: PipelineRequest) -> None: _enforce_tls(request) challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) @@ -227,9 +223,7 @@ async def on_challenge(self, request: PipelineRequest, response: PipelineRespons if challenge.tenant_id and challenge.tenant_id.lower().endswith("adfs"): await self.authorize_request(request, scope, claims=challenge.claims) else: - await self.authorize_request( - request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id - ) + await self.authorize_request(request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id) return True diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge_cache.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge_cache.py index 99f32091e24b..1048710eed2f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge_cache.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge_cache.py @@ -8,7 +8,6 @@ from .http_challenge import HttpChallenge - _cache: "Dict[str, HttpChallenge]" = {} _lock = threading.Lock() diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index 2f1c30a96b01..84c3026d68b3 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -84,12 +84,12 @@ def _get_attributes( return None def get_cryptography_client( - self, - key_name: str, - *, - key_version: Optional[str] = None, - **kwargs, # pylint: disable=unused-argument - ) -> CryptographyClient: + self, + key_name: str, + *, + key_version: Optional[str] = None, + **kwargs, # pylint: disable=unused-argument + ) -> CryptographyClient: """Gets a :class:`~azure.keyvault.keys.crypto.aio.CryptographyClient` for the given key. :param str key_name: The name of the key used to perform cryptographic operations. @@ -647,7 +647,7 @@ async def recover_deleted_key(self, name: str, **kwargs: Any) -> KeyVaultKey: command=command, final_resource=recovered_key, finished=False, - interval=polling_interval + interval=polling_interval, ) await polling_method.run() @@ -841,9 +841,7 @@ async def import_key( release_policy=policy, ) - bundle = await self._client.import_key( - name, parameters=parameters, **kwargs - ) + bundle = await self._client.import_key(name, parameters=parameters, **kwargs) return KeyVaultKey._from_key_bundle(bundle) @distributed_trace_async @@ -996,7 +994,7 @@ async def update_key_rotation_policy( # pylint: disable=unused-argument @distributed_trace_async async def get_key_attestation(self, name: str, version: Optional[str] = None, **kwargs: Any) -> KeyVaultKey: """Get a key and its attestation blob. - + This method is applicable to any key stored in Azure Key Vault Managed HSM. This operation requires the keys/get permission. diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/__init__.py index 9e931898fc8e..77047d425a7f 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/__init__.py @@ -15,7 +15,6 @@ from ._enums import EncryptionAlgorithm, KeyWrapAlgorithm, SignatureAlgorithm from ._client import CryptographyClient - __all__ = [ "CryptographyClient", "DecryptResult", diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py index d3a27fee66df..51f273d8f858 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py @@ -32,13 +32,13 @@ def _validate_arguments( - operation: KeyOperation, - algorithm: EncryptionAlgorithm, - *, - iv: Optional[bytes] = None, - tag: Optional[bytes] = None, - aad: Optional[bytes] = None, - ) -> None: + operation: KeyOperation, + algorithm: EncryptionAlgorithm, + *, + iv: Optional[bytes] = None, + tag: Optional[bytes] = None, + aad: Optional[bytes] = None, +) -> None: """Validates the arguments passed to perform an operation with a provided algorithm. :param KeyOperation operation: the type of operation being requested @@ -55,9 +55,7 @@ def _validate_arguments( """ if operation == KeyOperation.encrypt: if iv and "CBC" not in algorithm: - raise ValueError( - f"iv should only be provided with AES-CBC algorithms; {algorithm} does not accept an iv" - ) + raise ValueError(f"iv should only be provided with AES-CBC algorithms; {algorithm} does not accept an iv") if iv is None and "CBC" in algorithm: raise ValueError("iv is a required parameter for encryption with AES-CBC algorithms.") if aad and not ("CBC" in algorithm or "GCM" in algorithm): @@ -68,9 +66,7 @@ def _validate_arguments( if operation == KeyOperation.decrypt: if iv and not ("CBC" in algorithm or "GCM" in algorithm): - raise ValueError( - f"iv should only be provided with AES algorithms; {algorithm} does not accept an iv" - ) + raise ValueError(f"iv should only be provided with AES algorithms; {algorithm} does not accept an iv") if iv is None and ("CBC" in algorithm or "GCM" in algorithm): raise ValueError("iv is a required parameter for decryption with AES algorithms.") if tag and "GCM" not in algorithm: @@ -203,7 +199,7 @@ def _initialize(self, **kwargs: Any) -> None: key_bundle = self._client.get_key( self._key_id.name if self._key_id else None, self._key_id.version if self._key_id else None, - **kwargs + **kwargs, ) key = KeyVaultKey._from_key_bundle(key_bundle) self._key = key.key @@ -310,7 +306,7 @@ def encrypt( parameters=self._models.KeyOperationsParameters( algorithm=algorithm, value=plaintext, iv=iv, aad=additional_authenticated_data ), - **kwargs + **kwargs, ) result_iv = operation_result.iv if hasattr(operation_result, "iv") else None @@ -400,7 +396,7 @@ def decrypt( parameters=self._models.KeyOperationsParameters( algorithm=algorithm, value=ciphertext, iv=iv, tag=authentication_tag, aad=additional_authenticated_data ), - **kwargs + **kwargs, ) return DecryptResult(key_id=self.key_id, algorithm=algorithm, plaintext=operation_result.result) @@ -443,7 +439,7 @@ def wrap_key(self, algorithm: KeyWrapAlgorithm, key: bytes, **kwargs: Any) -> Wr key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeyOperationsParameters(algorithm=algorithm, value=key), - **kwargs + **kwargs, ) return WrapResult(key_id=self.key_id, algorithm=algorithm, encrypted_key=operation_result.result) @@ -485,7 +481,7 @@ def unwrap_key(self, algorithm: KeyWrapAlgorithm, encrypted_key: bytes, **kwargs key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeyOperationsParameters(algorithm=algorithm, value=encrypted_key), - **kwargs + **kwargs, ) return UnwrapResult(key_id=self.key_id, algorithm=algorithm, key=operation_result.result) @@ -527,7 +523,7 @@ def sign(self, algorithm: SignatureAlgorithm, digest: bytes, **kwargs: Any) -> S key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeySignParameters(algorithm=algorithm, value=digest), - **kwargs + **kwargs, ) return SignResult(key_id=self.key_id, algorithm=algorithm, signature=operation_result.result) @@ -571,7 +567,7 @@ def verify(self, algorithm: SignatureAlgorithm, digest: bytes, signature: bytes, key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeyVerifyParameters(algorithm=algorithm, digest=digest, signature=signature), - **kwargs + **kwargs, ) return VerifyResult(key_id=self.key_id, algorithm=algorithm, is_valid=operation_result.value) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_enums.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_enums.py index fcce8d0929e7..356b72b5edc5 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_enums.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_enums.py @@ -5,6 +5,7 @@ from enum import Enum from azure.core import CaseInsensitiveEnumMeta + # pylint: disable=enum-must-be-uppercase class KeyWrapAlgorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Key wrapping algorithms""" diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/algorithms/aes_cbc.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/algorithms/aes_cbc.py index 618ffaf370ae..d8fd1c2b0872 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/algorithms/aes_cbc.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/algorithms/aes_cbc.py @@ -9,7 +9,6 @@ from ..algorithm import SymmetricEncryptionAlgorithm from ..transform import BlockCryptoTransform - # pylint: disable=W0223 _CBC_BLOCK_SIZE = 128 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/rsa_key.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/rsa_key.py index e1325894bccc..0d3f21df4257 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/rsa_key.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/rsa_key.py @@ -33,7 +33,14 @@ class RsaKey(Key): # pylint:disable=too-many-public-methods _supported_encryption_algorithms = frozenset((Rsa1_5.name(), RsaOaep.name(), RsaOaep256.name())) _supported_key_wrap_algorithms = frozenset((Rsa1_5.name(), RsaOaep.name(), RsaOaep256.name())) _supported_signature_algorithms = frozenset( - (Ps256.name(), Ps384.name(), Ps512.name(), Rs256.name(), Rs384.name(), Rs512.name(),) + ( + Ps256.name(), + Ps384.name(), + Ps512.name(), + Rs256.name(), + Rs384.name(), + Rs512.name(), + ) ) def __init__(self, kid=None): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/__init__.py index 3a8c0f5ee127..ec7a1b484a2b 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/__init__.py @@ -6,7 +6,6 @@ from ._client import CryptographyClient - __all__ = [ "CryptographyClient", ] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py index 9f7e370e983f..13111932ebbe 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py @@ -146,7 +146,7 @@ async def _initialize(self, **kwargs: Any) -> None: key_bundle = await self._client.get_key( self._key_id.name if self._key_id else None, self._key_id.version if self._key_id else None, - **kwargs + **kwargs, ) key = KeyVaultKey._from_key_bundle(key_bundle) self._key = key.key @@ -229,7 +229,7 @@ async def encrypt( parameters=self._models.KeyOperationsParameters( algorithm=algorithm, value=plaintext, iv=iv, aad=additional_authenticated_data ), - **kwargs + **kwargs, ) result_iv = operation_result.iv if hasattr(operation_result, "iv") else None @@ -319,7 +319,7 @@ async def decrypt( parameters=self._models.KeyOperationsParameters( algorithm=algorithm, value=ciphertext, iv=iv, tag=authentication_tag, aad=additional_authenticated_data ), - **kwargs + **kwargs, ) return DecryptResult(key_id=self.key_id, algorithm=algorithm, plaintext=operation_result.result) @@ -362,7 +362,7 @@ async def wrap_key(self, algorithm: KeyWrapAlgorithm, key: bytes, **kwargs: Any) key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeyOperationsParameters(algorithm=algorithm, value=key), - **kwargs + **kwargs, ) return WrapResult(key_id=self.key_id, algorithm=algorithm, encrypted_key=operation_result.result) @@ -404,7 +404,7 @@ async def unwrap_key(self, algorithm: KeyWrapAlgorithm, encrypted_key: bytes, ** key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeyOperationsParameters(algorithm=algorithm, value=encrypted_key), - **kwargs + **kwargs, ) return UnwrapResult(key_id=self.key_id, algorithm=algorithm, key=operation_result.result) @@ -447,7 +447,7 @@ async def sign(self, algorithm: SignatureAlgorithm, digest: bytes, **kwargs: Any key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeySignParameters(algorithm=algorithm, value=digest), - **kwargs + **kwargs, ) return SignResult(key_id=self.key_id, algorithm=algorithm, signature=operation_result.result) @@ -493,7 +493,7 @@ async def verify( key_name=self._key_id.name if self._key_id else None, key_version=self._key_id.version if self._key_id else None, parameters=self._models.KeyVerifyParameters(algorithm=algorithm, digest=digest, signature=signature), - **kwargs + **kwargs, ) return VerifyResult(key_id=self.key_id, algorithm=algorithm, is_valid=operation_result.value) diff --git a/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations.py b/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations.py index bdf7d1305fd3..5f409d76eeb1 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations.py @@ -14,7 +14,7 @@ # 2. azure-keyvault-keys and azure-identity libraries (pip install these) # # 3. Set environment variable VAULT_URL with the URL of your key vault -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations_async.py b/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations_async.py index f6990ab87997..b5420526eb04 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/backup_restore_operations_async.py @@ -34,13 +34,14 @@ # 5. Restore a key (restore_key_backup) # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): # Instantiate a key client that will be used to call the service. # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. VAULT_URL = os.environ["VAULT_URL"] credential = DefaultAzureCredential() client = KeyClient(vault_url=VAULT_URL, credential=credential) - + # Let's create a Key of type RSA. # if the key already exists in the Key Vault, then a new version of the key is created. print("\n.. Create Key") diff --git a/sdk/keyvault/azure-keyvault-keys/samples/hello_world.py b/sdk/keyvault/azure-keyvault-keys/samples/hello_world.py index afb096383708..c6226066f8df 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/hello_world.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/hello_world.py @@ -12,7 +12,7 @@ # 2. azure-keyvault-keys and azure-identity libraries (pip install these) # # 3. Set environment variable VAULT_URL with the URL of your key vault -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -70,9 +70,7 @@ # associated with a key previously stored within Key Vault. print("\n.. Update a Key by name") expires = datetime.datetime.utcnow() + datetime.timedelta(days=365) -updated_ec_key = client.update_key_properties( - ec_key.name, ec_key.properties.version, expires_on=expires, enabled=False -) +updated_ec_key = client.update_key_properties(ec_key.name, ec_key.properties.version, expires_on=expires, enabled=False) print(f"Key with name '{updated_ec_key.name}' was updated on date '{updated_ec_key.properties.updated_on}'") print(f"Key with name '{updated_ec_key.name}' was updated to expire on '{updated_ec_key.properties.expires_on}'") diff --git a/sdk/keyvault/azure-keyvault-keys/samples/hello_world_async.py b/sdk/keyvault/azure-keyvault-keys/samples/hello_world_async.py index 864f14750aaa..600b48ef0038 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/hello_world_async.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/hello_world_async.py @@ -35,6 +35,7 @@ # 5. Delete a key (delete_key) # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): # Instantiate a key client that will be used to call the service. # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. diff --git a/sdk/keyvault/azure-keyvault-keys/samples/key_rotation.py b/sdk/keyvault/azure-keyvault-keys/samples/key_rotation.py index 248ac051899e..eeff6ab5b212 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/key_rotation.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/key_rotation.py @@ -14,7 +14,7 @@ # 2. azure-keyvault-keys and azure-identity libraries (pip install these) # # 3. Set environment variable VAULT_URL with the URL of your key vault -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-keys/samples/key_rotation_async.py b/sdk/keyvault/azure-keyvault-keys/samples/key_rotation_async.py index c20f614943a7..bb9b646d1c03 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/key_rotation_async.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/key_rotation_async.py @@ -36,6 +36,7 @@ # 5. Delete a key (delete_key) # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): # Instantiate a key client that will be used to call the service. # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. @@ -108,4 +109,4 @@ async def run_sample(): if __name__ == "__main__": - asyncio.run(run_sample()) \ No newline at end of file + asyncio.run(run_sample()) diff --git a/sdk/keyvault/azure-keyvault-keys/samples/list_operations.py b/sdk/keyvault/azure-keyvault-keys/samples/list_operations.py index f8b01807efc4..75fbf1174f73 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/list_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/list_operations.py @@ -13,7 +13,7 @@ # 2. azure-keyvault-keys and azure-identity libraries (pip install these) # # 3. Set environment variable VAULT_URL with the URL of your key vault -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-keys/samples/list_operations_async.py b/sdk/keyvault/azure-keyvault-keys/samples/list_operations_async.py index 757017e45e00..6b25d1767c90 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/list_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/list_operations_async.py @@ -35,6 +35,7 @@ # # ---------------------------------------------------------------------------------------------------------- + async def run_sample(): # Instantiate a key client that will be used to call the service. # Here we use the DefaultAzureCredential, but any azure-identity credential can be used. diff --git a/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations.py b/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations.py index 9b5b45985c97..9dbf73de874f 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations.py @@ -13,7 +13,7 @@ # 2. azure-keyvault-keys and azure-identity libraries (pip install these) # # 3. Set environment variable VAULT_URL with the URL of your key vault -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # diff --git a/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations_async.py b/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations_async.py index bcb8eb588df3..f8afd828acae 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations_async.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/recover_purge_operations_async.py @@ -7,6 +7,7 @@ from azure.identity.aio import DefaultAzureCredential from azure.keyvault.keys.aio import KeyClient + # ---------------------------------------------------------------------------------------------------------- # Prerequisites: # 1. An Azure Key Vault (https://learn.microsoft.com/azure/key-vault/quick-create-cli) diff --git a/sdk/keyvault/azure-keyvault-keys/samples/send_request.py b/sdk/keyvault/azure-keyvault-keys/samples/send_request.py index 78d35dc3c8f2..f9fd32e62129 100644 --- a/sdk/keyvault/azure-keyvault-keys/samples/send_request.py +++ b/sdk/keyvault/azure-keyvault-keys/samples/send_request.py @@ -14,7 +14,7 @@ # 2. azure-keyvault-keys and azure-identity libraries (pip install these) # # 3. Set environment variable VAULT_URL with the URL of your key vault -# +# # 4. Set up your environment to use azure-identity's DefaultAzureCredential. For more information about how to configure # the DefaultAzureCredential, refer to https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential # @@ -55,7 +55,7 @@ response = client.send_request(request) # The return value is an azure.core.rest.HttpResponse -- the key information is in the response body. -# We can get a dictionary of the body content with the `json` method. +# We can get a dictionary of the body content with the `json` method. response_body = response.json() print(f"\n.. Key with ID {response_body['key']['kid']} was found.") diff --git a/sdk/keyvault/azure-keyvault-keys/tests/_keys_test_case.py b/sdk/keyvault/azure-keyvault-keys/tests/_keys_test_case.py index d1e99ba811e3..d23ab5e15853 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/_keys_test_case.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/_keys_test_case.py @@ -13,7 +13,7 @@ def _get_attestation_uri(self): playback_uri = "https://fakeattestation.azurewebsites.net" if self.is_live: real_uri = os.environ.get("AZURE_KEYVAULT_ATTESTATION_URL") - real_uri = real_uri.rstrip('/') + real_uri = real_uri.rstrip("/") if real_uri is None: pytest.skip("No AZURE_KEYVAULT_ATTESTATION_URL environment variable") return real_uri @@ -22,9 +22,11 @@ def _get_attestation_uri(self): def create_crypto_client(self, key, **kwargs): if kwargs.pop("is_async", False): from azure.keyvault.keys.crypto.aio import CryptographyClient - credential = self.get_credential(CryptographyClient,is_async=True) + + credential = self.get_credential(CryptographyClient, is_async=True) else: from azure.keyvault.keys.crypto import CryptographyClient + credential = self.get_credential(CryptographyClient) return self.create_client_from_credential(CryptographyClient, credential=credential, key=key, **kwargs) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case.py b/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case.py index a67376fd53e1..87a1198ea5de 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case.py @@ -8,8 +8,6 @@ from devtools_testutils import AzureRecordedTestCase - - class KeyVaultTestCase(AzureRecordedTestCase): def get_resource_name(self, name): """helper to create resources with a consistent, test-indicative prefix""" diff --git a/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case_async.py b/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case_async.py index 6059c528f1a3..fb26f89f3ab3 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/_shared/test_case_async.py @@ -36,7 +36,7 @@ async def _poll_until_exception(self, fn, expected_exception, max_retries=20, re except expected_exception: return self.fail("expected exception {expected_exception} was not raised") - + def teardown_method(self, method): HttpChallengeCache.clear() assert len(HttpChallengeCache._cache) == 0 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/_test_case.py b/sdk/keyvault/azure-keyvault-keys/tests/_test_case.py index 4cc9668b3b8b..6663690fc1ca 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/_test_case.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/_test_case.py @@ -12,7 +12,6 @@ from azure.keyvault.keys._shared.client_base import ApiVersion from devtools_testutils import AzureRecordedTestCase - HSM_UNSUPPORTED_VERSIONS = {ApiVersion.V2016_10_01, ApiVersion.V7_0, ApiVersion.V7_1} diff --git a/sdk/keyvault/azure-keyvault-keys/tests/conftest.py b/sdk/keyvault/azure-keyvault-keys/tests/conftest.py index bfcd18356825..3db4bb782e44 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/conftest.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/conftest.py @@ -13,16 +13,22 @@ add_oauth_response_sanitizer, is_live, remove_batch_sanitizers, - set_custom_default_matcher + set_custom_default_matcher, ) from azure.keyvault.keys._shared.client_base import DEFAULT_VERSION, ApiVersion -os.environ['PYTHONHASHSEED'] = '0' +os.environ["PYTHONHASHSEED"] = "0" ALL_API_VERSIONS = "--all-api-versions" + def pytest_addoption(parser): - parser.addoption(ALL_API_VERSIONS, action="store_true", default=False, - help="Test all api version in live mode. Not applicable in playback mode.") + parser.addoption( + ALL_API_VERSIONS, + action="store_true", + default=False, + help="Test all api version in live mode. Not applicable in playback mode.", + ) + def pytest_configure(config): if is_live() and not config.getoption(ALL_API_VERSIONS): @@ -30,16 +36,19 @@ def pytest_configure(config): else: pytest.api_version = ApiVersion + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): azure_keyvault_url = os.getenv("AZURE_KEYVAULT_URL", "https://vaultname.vault.azure.net") azure_keyvault_url = azure_keyvault_url.rstrip("/") keyvault_tenant_id = os.getenv("KEYVAULT_TENANT_ID", "keyvault_tenant_id") keyvault_subscription_id = os.getenv("KEYVAULT_SUBSCRIPTION_ID", "keyvault_subscription_id") - azure_managedhsm_url = os.environ.get("AZURE_MANAGEDHSM_URL","https://managedhsmvaultname.managedhsm.azure.net") + azure_managedhsm_url = os.environ.get("AZURE_MANAGEDHSM_URL", "https://managedhsmvaultname.managedhsm.azure.net") azure_managedhsm_url = azure_managedhsm_url.rstrip("/") - azure_attestation_uri = os.environ.get("AZURE_KEYVAULT_ATTESTATION_URL","https://fakeattestation.azurewebsites.net") - azure_attestation_uri = azure_attestation_uri.rstrip('/') + azure_attestation_uri = os.environ.get( + "AZURE_KEYVAULT_ATTESTATION_URL", "https://fakeattestation.azurewebsites.net" + ) + azure_attestation_uri = azure_attestation_uri.rstrip("/") add_general_string_sanitizer(target=azure_keyvault_url, value="https://vaultname.vault.azure.net") add_general_string_sanitizer(target=keyvault_tenant_id, value="00000000-0000-0000-0000-000000000000") @@ -52,7 +61,12 @@ def add_sanitizers(test_proxy): # Remove the following sanitizers since certain fields are needed in tests and are non-sensitive: # - AZSDK3430: $..id # - AZSDK3447: $.key - remove_batch_sanitizers(["AZSDK3430", "AZSDK3447",]) + remove_batch_sanitizers( + [ + "AZSDK3430", + "AZSDK3447", + ] + ) @pytest.fixture(scope="session", autouse=True) @@ -80,6 +94,7 @@ def immediate_return(_): else: yield + @pytest.fixture(scope="session") def event_loop(request): loop = asyncio.get_event_loop() diff --git a/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/decrypt.py b/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/decrypt.py index 5f987a254b83..89a32415e45a 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/decrypt.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/decrypt.py @@ -13,7 +13,6 @@ from azure.keyvault.keys.crypto.aio import CryptographyClient as AsyncCryptographyClient from azure.mgmt.keyvault.models import KeyPermissions, Permissions - # without keys/get, a CryptographyClient created with a key ID performs all ops remotely NO_GET = Permissions(keys=[p.value for p in KeyPermissions if p.value != "get"]) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/sign.py b/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/sign.py index e98cbd1ce11c..36676296424d 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/sign.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/sign.py @@ -14,7 +14,6 @@ from azure.keyvault.keys.crypto.aio import CryptographyClient as AsyncCryptographyClient from azure.mgmt.keyvault.models import KeyPermissions, Permissions - # without keys/get, a CryptographyClient created with a key ID performs all ops remotely NO_GET = Permissions(keys=[p.value for p in KeyPermissions if p.value != "get"]) @@ -25,6 +24,7 @@ def __init__(self, arguments): super().__init__(arguments) from dotenv import load_dotenv + load_dotenv() # Auth configuration diff --git a/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/unwrap.py b/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/unwrap.py index 2b09561f154b..9df7fc252c22 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/unwrap.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/perfstress_tests/unwrap.py @@ -13,7 +13,6 @@ from azure.keyvault.keys.crypto.aio import CryptographyClient as AsyncCryptographyClient from azure.mgmt.keyvault.models import KeyPermissions, Permissions - # without keys/get, a CryptographyClient created with a key ID performs all ops remotely NO_GET = Permissions(keys=[p.value for p in KeyPermissions if p.value != "get"]) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index 35d27d63b297..f5a680f27674 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -6,6 +6,7 @@ Tests for the HTTP challenge authentication implementation. These tests aren't parallelizable, because the challenge cache is global to the process. """ + import base64 import functools from itertools import product @@ -36,6 +37,7 @@ TOKEN_TYPES = [AccessToken, AccessTokenInfo] + class TestChallengeAuth(KeyVaultTestCase, KeysTestCase): @pytest.mark.parametrize("api_version,is_hsm", only_default_version) @KeysClientPreparer() @@ -125,7 +127,6 @@ def test_enforces_tls(): pipeline.run(HttpRequest("GET", url)) - def test_challenge_cache(): url_a = get_random_url() challenge_a = HttpChallenge(url_a, "Bearer authorization=authority A, resource=resource A") @@ -148,9 +149,7 @@ def test_challenge_parsing(): tenant = "tenant" authority = f"https://login.authority.net/{tenant}" resource = "https://challenge.resource" - challenge = HttpChallenge( - "https://request.uri", challenge=f"Bearer authorization={authority}, resource={resource}" - ) + challenge = HttpChallenge("https://request.uri", challenge=f"Bearer authorization={authority}, resource={resource}") assert challenge.get_authorization_server() == authority assert challenge.get_resource() == resource @@ -580,8 +579,8 @@ def get_token(*_, **__): mock_response( status_code=401, headers={"WWW-Authenticate": f'Bearer authorization="{url}", resource={resource}'} ), - mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}) - ] + mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}), + ], ) transport_2 = validating_transport( requests=[Request(), Request(required_headers={"Authorization": f"Bearer {token}"})], @@ -589,8 +588,8 @@ def get_token(*_, **__): mock_response( status_code=401, headers={"WWW-Authenticate": f'Bearer authorization="{url}", resource={resource}'} ), - mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}) - ] + mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}), + ], ) client = KeyClient(url, credential, transport=transport, verify_challenge_resource=verify_challenge_resource) @@ -635,8 +634,8 @@ def get_token(*_, **__): mock_response( status_code=401, headers={"WWW-Authenticate": f'Bearer authorization="{url}", resource={resource}'} ), - mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}) - ] + mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}), + ], ) client = KeyClient(url, credential, transport=transport, verify_challenge_resource=verify_challenge_resource) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index bfec049a17c8..fa19f8e175e0 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -6,6 +6,7 @@ Tests for the HTTP challenge authentication implementation. These tests aren't parallelizable, because the challenge cache is global to the process. """ + import asyncio from itertools import product import os @@ -19,7 +20,7 @@ from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import SansIOHTTPPolicy from azure.core.rest import HttpRequest -from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy,HttpChallenge, HttpChallengeCache +from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache from azure.keyvault.keys._shared.client_base import DEFAULT_VERSION from azure.keyvault.keys.aio import KeyClient from devtools_testutils.aio import recorded_by_proxy_async @@ -46,7 +47,7 @@ class TestChallengeAuth(KeyVaultTestCase): @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_default_version) + @pytest.mark.parametrize("api_version,is_hsm", only_default_version) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_multitenant_authentication(self, client, is_hsm, **kwargs): @@ -132,9 +133,7 @@ async def get_token(*scopes, **_): credential = Mock(spec_set=["get_token"], get_token=Mock(wraps=get_token)) else: credential = Mock(spec_set=["get_token_info"], get_token_info=Mock(wraps=get_token)) - pipeline = AsyncPipeline( - policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send) - ) + pipeline = AsyncPipeline(policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send)) request = HttpRequest("POST", get_random_url()) request.set_bytes_body(expected_content) await pipeline.run(request) @@ -201,9 +200,7 @@ async def get_token(*_, options=None, **kwargs): credential = Mock(spec_set=["get_token"], get_token=Mock(wraps=get_token)) else: credential = Mock(spec_set=["get_token_info"], get_token_info=Mock(wraps=get_token)) - pipeline = AsyncPipeline( - policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send) - ) + pipeline = AsyncPipeline(policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send)) request = HttpRequest("POST", get_random_url()) request.set_bytes_body(expected_content) await pipeline.run(request) @@ -496,8 +493,8 @@ async def get_token(*_, **__): mock_response( status_code=401, headers={"WWW-Authenticate": f'Bearer authorization="{url}", resource={resource}'} ), - mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}) - ] + mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}), + ], ) transport_2 = async_validating_transport( requests=[Request(), Request(required_headers={"Authorization": f"Bearer {token}"})], @@ -505,8 +502,8 @@ async def get_token(*_, **__): mock_response( status_code=401, headers={"WWW-Authenticate": f'Bearer authorization="{url}", resource={resource}'} ), - mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}) - ] + mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}), + ], ) client = KeyClient(url, credential, transport=transport, verify_challenge_resource=verify_challenge_resource) @@ -551,8 +548,8 @@ async def get_token(*_, **__): mock_response( status_code=401, headers={"WWW-Authenticate": f'Bearer authorization="{url}", resource={resource}'} ), - mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}) - ] + mock_response(status_code=200, json_payload={"key": {"kid": f"{url}/key-name"}}), + ], ) client = KeyClient(url, credential, transport=transport, verify_challenge_resource=verify_challenge_resource) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client.py b/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client.py index 45cb23d5b84b..bb1dd65e56b2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client.py @@ -20,7 +20,7 @@ rsa_crt_dmq1, rsa_crt_iqmp, RSAPrivateNumbers, - RSAPublicNumbers + RSAPublicNumbers, ) from cryptography.hazmat.primitives.serialization import Encoding, NoEncryption, PrivateFormat, PublicFormat import pytest @@ -45,7 +45,6 @@ from _test_case import KeysClientPreparer, get_decorator from _keys_test_case import KeysTestCase - all_api_versions = get_decorator() only_hsm = get_decorator(only_hsm=True) only_vault_default = get_decorator(only_vault=True, api_versions=[DEFAULT_VERSION]) @@ -60,21 +59,21 @@ def _to_bytes(hex): # RSA key with private components so that the JWK can be used for private operations TEST_JWK = { - "kty":"RSA", - "key_ops":["decrypt", "verify", "unwrapKey"], - "n":_to_bytes( + "kty": "RSA", + "key_ops": ["decrypt", "verify", "unwrapKey"], + "n": _to_bytes( "00a0914d00234ac683b21b4c15d5bed887bdc959c2e57af54ae734e8f00720d775d275e455207e3784ceeb60a50a4655dd72a7a94d271e8ee8f7959a669ca6e775bf0e23badae991b4529d978528b4bd90521d32dd2656796ba82b6bbfc7668c8f5eeb5053747fd199319d29a8440d08f4412d527ff9311eda71825920b47b1c46b11ab3e91d7316407e89c7f340f7b85a34042ce51743b27d4718403d34c7b438af6181be05e4d11eb985d38253d7fe9bf53fc2f1b002d22d2d793fa79a504b6ab42d0492804d7071d727a06cf3a8893aa542b1503f832b296371b6707d4dc6e372f8fe67d8ded1c908fde45ce03bc086a71487fa75e43aa0e0679aa0d20efe35" ), - "e":_to_bytes("10001"), - "p":_to_bytes( + "e": _to_bytes("10001"), + "p": _to_bytes( "00d1deac8d68ddd2c1fd52d5999655b2cf1565260de5269e43fd2a85f39280e1708ffff0682166cb6106ee5ea5e9ffd9f98d0becc9ff2cda2febc97259215ad84b9051e563e14a051dce438bc6541a24ac4f014cf9732d36ebfc1e61a00d82cbe412090f7793cfbd4b7605be133dfc3991f7e1bed5786f337de5036fc1e2df4cf3" ), - "q":_to_bytes( + "q": _to_bytes( "00c3dc66b641a9b73cd833bc439cd34fc6574465ab5b7e8a92d32595a224d56d911e74624225b48c15a670282a51c40d1dad4bc2e9a3c8dab0c76f10052dfb053bc6ed42c65288a8e8bace7a8881184323f94d7db17ea6dfba651218f931a93b8f738f3d8fd3f6ba218d35b96861a0f584b0ab88ddcf446b9815f4d287d83a3237" ), - "d":_to_bytes( + "d": _to_bytes( "627c7d24668148fe2252c7fa649ea8a5a9ed44d75c766cda42b29b660e99404f0e862d4561a6c95af6a83d213e0a2244b03cd28576473215073785fb067f015da19084ade9f475e08b040a9a2c7ba00253bb8125508c9df140b75161d266be347a5e0f6900fe1d8bbf78ccc25eeb37e0c9d188d6e1fc15169ba4fe12276193d77790d2326928bd60d0d01d6ead8d6ac4861abadceec95358fd6689c50a1671a4a936d2376440a41445501da4e74bfb98f823bd19c45b94eb01d98fc0d2f284507f018ebd929b8180dbe6381fdd434bffb7800aaabdd973d55f9eaf9bb88a6ea7b28c2a80231e72de1ad244826d665582c2362761019de2e9f10cb8bcc2625649" - ) + ), } @@ -111,9 +110,10 @@ def _validate_rsa_key_bundle(self, key_attributes, vault, key_name, kty, key_ops assert key.kty == kty, f"kty should by '{key}', but is '{key.kty}'" assert key.n and key.e, "Bad RSA public material." assert sorted(key_ops) == sorted(key.key_ops), f"keyOps should be '{key_ops}', but is '{key.key_ops}'" - - assert key_attributes.properties.created_on and key_attributes.properties.updated_on, "Missing required date attributes." - + + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." def _validate_ec_key_bundle(self, key_curve, key_attributes, vault, key_name, kty): prefix = "/".join(s.strip("/") for s in [vault, "keys", key_name]) @@ -122,7 +122,9 @@ def _validate_ec_key_bundle(self, key_curve, key_attributes, vault, key_name, kt assert key_curve == key.crv assert kid.index(prefix) == 0, f"Key Id should start with '{prefix}', but value is '{kid}'" assert key.kty == kty, f"kty should by '{key}', but is '{key.kty}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on,"Missing required date attributes." + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." def _import_test_key(self, client, name, hardware_protected=False): key = JsonWebKey( @@ -169,7 +171,7 @@ def _import_symmetric_test_key(self, client, name): assert key_vault_key.key.kid == imported_key.id == key_vault_key.id return key_vault_key - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_ec_key_id(self, key_client, is_hsm, **kwargs): @@ -185,7 +187,7 @@ def test_ec_key_id(self, key_client, is_hsm, **kwargs): crypto_client.verify(SignatureAlgorithm.es256_k, hashlib.sha256(self.plaintext).digest(), self.plaintext) - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_rsa_key_id(self, key_client, is_hsm, **kwargs): @@ -399,7 +401,7 @@ def test_symmetric_encrypt_and_decrypt(self, key_client, **kwargs): encrypt_result.ciphertext, iv=encrypt_result.iv, authentication_tag=encrypt_result.tag, - additional_authenticated_data=self.aad + additional_authenticated_data=self.aad, ) else: encrypt_result = crypto_client.encrypt( @@ -410,13 +412,15 @@ def test_symmetric_encrypt_and_decrypt(self, key_client, **kwargs): encrypt_result.algorithm, encrypt_result.ciphertext, iv=encrypt_result.iv, - additional_authenticated_data=None if "CBC" in algorithm else self.aad + additional_authenticated_data=None if "CBC" in algorithm else self.aad, ) assert decrypt_result.key_id == imported_key.id assert decrypt_result.algorithm == algorithm if algorithm.endswith("CBC"): - assert decrypt_result.plaintext.startswith(self.plaintext) # AES-CBC returns a zero-padded plaintext + assert decrypt_result.plaintext.startswith( + self.plaintext + ) # AES-CBC returns a zero-padded plaintext else: assert decrypt_result.plaintext == self.plaintext @@ -436,7 +440,7 @@ def test_symmetric_wrap_and_unwrap(self, key_client, **kwargs): result = crypto_client.unwrap_key(result.algorithm, result.encrypted_key) assert result.key == self.plaintext - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_encrypt_local(self, key_client, is_hsm, **kwargs): @@ -453,7 +457,7 @@ def test_encrypt_local(self, key_client, is_hsm, **kwargs): result = crypto_client.decrypt(result.algorithm, result.ciphertext) assert result.plaintext == self.plaintext - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_encrypt_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -470,8 +474,8 @@ def test_encrypt_local_from_jwk(self, key_client, is_hsm, **kwargs): result = crypto_client.decrypt(result.algorithm, result.ciphertext) assert result.plaintext == self.plaintext - - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @KeysClientPreparer() @recorded_by_proxy def test_symmetric_encrypt_local(self, key_client, **kwargs): @@ -499,7 +503,7 @@ def test_symmetric_encrypt_local(self, key_client, **kwargs): assert decrypt_result.key_id == imported_key.id assert decrypt_result.algorithm == algorithm assert decrypt_result.plaintext == self.plaintext - + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @KeysClientPreparer() @recorded_by_proxy @@ -524,14 +528,14 @@ def test_symmetric_decrypt_local(self, key_client, **kwargs): encrypt_result.algorithm, encrypt_result.ciphertext, iv=encrypt_result.iv, - additional_authenticated_data=self.aad + additional_authenticated_data=self.aad, ) assert decrypt_result.key_id == imported_key.id assert decrypt_result.algorithm == algorithm assert decrypt_result.plaintext == self.plaintext - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_wrap_local(self, key_client, is_hsm, **kwargs): @@ -547,7 +551,7 @@ def test_wrap_local(self, key_client, is_hsm, **kwargs): result = crypto_client.unwrap_key(result.algorithm, result.encrypted_key) assert result.key == self.plaintext - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_wrap_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -564,7 +568,7 @@ def test_wrap_local_from_jwk(self, key_client, is_hsm, **kwargs): result = crypto_client.unwrap_key(result.algorithm, result.encrypted_key) assert result.key == self.plaintext - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_rsa_verify_local(self, key_client, is_hsm, **kwargs): @@ -589,7 +593,7 @@ def test_rsa_verify_local(self, key_client, is_hsm, **kwargs): result = crypto_client.verify(result.algorithm, digest, result.signature) assert result.is_valid - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_rsa_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -600,12 +604,12 @@ def test_rsa_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): crypto_client = self.create_crypto_client(key, api_version=key_client.api_version) local_client = CryptographyClient.from_jwk(key.key) for signature_algorithm, hash_function in ( - (SignatureAlgorithm.ps256, hashlib.sha256), - (SignatureAlgorithm.ps384, hashlib.sha384), - (SignatureAlgorithm.ps512, hashlib.sha512), - (SignatureAlgorithm.rs256, hashlib.sha256), - (SignatureAlgorithm.rs384, hashlib.sha384), - (SignatureAlgorithm.rs512, hashlib.sha512), + (SignatureAlgorithm.ps256, hashlib.sha256), + (SignatureAlgorithm.ps384, hashlib.sha384), + (SignatureAlgorithm.ps512, hashlib.sha512), + (SignatureAlgorithm.rs256, hashlib.sha256), + (SignatureAlgorithm.rs384, hashlib.sha384), + (SignatureAlgorithm.rs512, hashlib.sha512), ): digest = hash_function(self.plaintext).digest() @@ -615,7 +619,7 @@ def test_rsa_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): result = local_client.verify(result.algorithm, digest, result.signature) assert result.is_valid - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_ec_verify_local(self, key_client, is_hsm, **kwargs): @@ -640,7 +644,7 @@ def test_ec_verify_local(self, key_client, is_hsm, **kwargs): result = crypto_client.verify(result.algorithm, digest, result.signature) assert result.is_valid - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_ec_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -666,11 +670,12 @@ def test_ec_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): result = local_client.verify(result.algorithm, digest, result.signature) assert result.is_valid - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_local_validity_period_enforcement(self, key_client, is_hsm, **kwargs): """Local crypto operations should respect a key's nbf and exp properties""" + def test_operations(key, expected_error_substrings, encrypt_algorithms, wrap_algorithms): crypto_client = self.create_crypto_client(key, api_version=key_client.api_version) for algorithm in encrypt_algorithms: @@ -713,7 +718,7 @@ def test_operations(key, expected_error_substrings, encrypt_algorithms, wrap_alg valid_key, (str(the_year_3000), str(the_year_3001)), rsa_encryption_algorithms, rsa_wrap_algorithms ) - @pytest.mark.parametrize("api_version,is_hsm",only_vault_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_vault_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_send_request(self, key_client, is_hsm, **kwargs): @@ -734,7 +739,7 @@ def test_send_request(self, key_client, is_hsm, **kwargs): method="POST", url=f"keys/{key_name}/{imported_key.properties.version}/sign", headers={"Accept": "application/json"}, - json=json + json=json, ) response = crypto_client.send_request(request) response.raise_for_status() @@ -1081,7 +1086,7 @@ def test_rsa_public_key_public_bytes(): public_numbers = public_key.public_numbers() crypto_public_numbers = RSAPublicNumbers(e=public_numbers.e, n=public_numbers.n) crypto_public_bytes = crypto_public_numbers.public_key().public_bytes(Encoding.PEM, PublicFormat.PKCS1) - assert public_bytes == crypto_public_bytes + assert public_bytes == crypto_public_bytes def test_rsa_public_key_private_key_size(): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client_async.py index 6b043c430710..6d119010ac60 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_crypto_client_async.py @@ -31,7 +31,6 @@ from _shared.test_case_async import KeyVaultTestCase from _keys_test_case import KeysTestCase - all_api_versions = get_decorator(is_async=True) only_hsm = get_decorator(only_hsm=True, is_async=True) only_vault_7_4_plus = get_decorator(only_vault=True, is_async=True, api_versions=[ApiVersion.V7_4, ApiVersion.V7_5]) @@ -70,8 +69,9 @@ def _validate_rsa_key_bundle(self, key_attributes, vault, key_name, kty, key_ops assert key.kty == kty, f"kty should by '{key}', but is '{key.kty}'" assert key.n and key.e, "Bad RSA public material." assert sorted(key_ops) == sorted(key.key_ops), f"keyOps should be '{key_ops}', but is '{key.key_ops}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on,"Missing required date attributes." - + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." def _validate_ec_key_bundle(self, key_curve, key_attributes, vault, key_name, kty): prefix = "/".join(s.strip("/") for s in [vault, "keys", key_name]) @@ -80,7 +80,9 @@ def _validate_ec_key_bundle(self, key_curve, key_attributes, vault, key_name, kt assert key_curve == key.crv assert kid.index(prefix) == 0, f"Key Id should start with '{prefix}', but value is '{kid}'" assert key.kty == kty, f"kty should by '{key}', but is '{key.kty}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on,"Missing required date attributes." + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." async def _import_test_key(self, client, name, hardware_protected=False): def _to_bytes(hex): @@ -133,7 +135,7 @@ async def _import_symmetric_test_key(self, client, name): return key_vault_key @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_ec_key_id(self, key_client, is_hsm, **kwargs): @@ -150,7 +152,7 @@ async def test_ec_key_id(self, key_client, is_hsm, **kwargs): await crypto_client.verify(SignatureAlgorithm.es256, hashlib.sha256(self.plaintext).digest(), self.plaintext) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_rsa_key_id(self, key_client, is_hsm, **kwargs): @@ -169,7 +171,7 @@ async def test_rsa_key_id(self, key_client, is_hsm, **kwargs): await crypto_client.wrap_key(KeyWrapAlgorithm.rsa_oaep, self.plaintext) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_encrypt_and_decrypt(self, key_client, is_hsm, **kwargs): @@ -188,7 +190,7 @@ async def test_encrypt_and_decrypt(self, key_client, is_hsm, **kwargs): assert self.plaintext == result.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_sign_and_verify(self, key_client, is_hsm, **kwargs): @@ -211,7 +213,7 @@ async def test_sign_and_verify(self, key_client, is_hsm, **kwargs): assert verified.is_valid @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_wrap_and_unwrap(self, key_client, is_hsm, **kwargs): @@ -231,7 +233,7 @@ async def test_wrap_and_unwrap(self, key_client, is_hsm, **kwargs): assert key_bytes == result.key @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_symmetric_encrypt_and_decrypt(self, key_client, **kwargs): @@ -257,7 +259,7 @@ async def test_symmetric_encrypt_and_decrypt(self, key_client, **kwargs): result.ciphertext, iv=result.iv, authentication_tag=result.tag, - additional_authenticated_data=self.aad + additional_authenticated_data=self.aad, ) else: result = await crypto_client.encrypt( @@ -268,7 +270,7 @@ async def test_symmetric_encrypt_and_decrypt(self, key_client, **kwargs): result.algorithm, result.ciphertext, iv=self.iv, - additional_authenticated_data=None if "CBC" in algorithm else self.aad + additional_authenticated_data=None if "CBC" in algorithm else self.aad, ) assert result.key_id == imported_key.id @@ -279,7 +281,7 @@ async def test_symmetric_encrypt_and_decrypt(self, key_client, **kwargs): assert result.plaintext == self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_symmetric_wrap_and_unwrap(self, key_client, **kwargs): @@ -296,7 +298,7 @@ async def test_symmetric_wrap_and_unwrap(self, key_client, **kwargs): assert result.key == self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_encrypt_local(self, key_client, is_hsm, **kwargs): @@ -333,7 +335,7 @@ async def test_encrypt_local_from_jwk(self, key_client, is_hsm, **kwargs): assert result.plaintext, self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_symmetric_encrypt_local(self, key_client, **kwargs): @@ -363,7 +365,7 @@ async def test_symmetric_encrypt_local(self, key_client, **kwargs): assert decrypt_result.plaintext == self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_symmetric_decrypt_local(self, key_client, **kwargs): @@ -387,7 +389,7 @@ async def test_symmetric_decrypt_local(self, key_client, **kwargs): encrypt_result.algorithm, encrypt_result.ciphertext, iv=encrypt_result.iv, - additional_authenticated_data=self.aad + additional_authenticated_data=self.aad, ) assert decrypt_result.key_id == imported_key.id @@ -395,7 +397,7 @@ async def test_symmetric_decrypt_local(self, key_client, **kwargs): assert decrypt_result.plaintext == self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_wrap_local(self, key_client, is_hsm, **kwargs): @@ -412,7 +414,7 @@ async def test_wrap_local(self, key_client, is_hsm, **kwargs): assert result.key, self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_wrap_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -430,7 +432,7 @@ async def test_wrap_local_from_jwk(self, key_client, is_hsm, **kwargs): assert result.key, self.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_rsa_verify_local(self, key_client, is_hsm, **kwargs): @@ -456,7 +458,7 @@ async def test_rsa_verify_local(self, key_client, is_hsm, **kwargs): assert result.is_valid @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_rsa_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -467,12 +469,12 @@ async def test_rsa_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): crypto_client = self.create_crypto_client(key, is_async=True, api_version=key_client.api_version) local_client = CryptographyClient.from_jwk(key.key) for signature_algorithm, hash_function in ( - (SignatureAlgorithm.ps256, hashlib.sha256), - (SignatureAlgorithm.ps384, hashlib.sha384), - (SignatureAlgorithm.ps512, hashlib.sha512), - (SignatureAlgorithm.rs256, hashlib.sha256), - (SignatureAlgorithm.rs384, hashlib.sha384), - (SignatureAlgorithm.rs512, hashlib.sha512), + (SignatureAlgorithm.ps256, hashlib.sha256), + (SignatureAlgorithm.ps384, hashlib.sha384), + (SignatureAlgorithm.ps512, hashlib.sha512), + (SignatureAlgorithm.rs256, hashlib.sha256), + (SignatureAlgorithm.rs384, hashlib.sha384), + (SignatureAlgorithm.rs512, hashlib.sha512), ): digest = hash_function(self.plaintext).digest() @@ -483,7 +485,7 @@ async def test_rsa_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): assert result.is_valid @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_ec_verify_local(self, key_client, is_hsm, **kwargs): @@ -509,7 +511,7 @@ async def test_ec_verify_local(self, key_client, is_hsm, **kwargs): assert result.is_valid @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_ec_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): @@ -536,11 +538,12 @@ async def test_ec_verify_local_from_jwk(self, key_client, is_hsm, **kwargs): assert result.is_valid @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_local_validity_period_enforcement(self, key_client, is_hsm, **kwargs): """Local crypto operations should respect a key's nbf and exp properties""" + async def test_operations(key, expected_error_substrings, encrypt_algorithms, wrap_algorithms): crypto_client = self.create_crypto_client(key, is_async=True, api_version=key_client.api_version) crypto_client._keys_get_forbidden = True # Prevent caching key material locally, to force remote ops @@ -587,7 +590,7 @@ async def test_operations(key, expected_error_substrings, encrypt_algorithms, wr ) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_vault_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_vault_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_send_request(self, key_client, is_hsm, **kwargs): @@ -608,7 +611,7 @@ async def test_send_request(self, key_client, is_hsm, **kwargs): method="POST", url=f"keys/{key_name}/{imported_key.properties.version}/sign", headers={"Accept": "application/json"}, - json=json + json=json, ) response = await crypto_client.send_request(request) response.raise_for_status() @@ -632,7 +635,10 @@ class CustomHookPolicy(SansIOHTTPPolicy): @pytest.mark.asyncio async def test_symmetric_wrap_and_unwrap_local(): key = KeyVaultKey( - key_id="http://localhost/keys/key/version", k=os.urandom(32), kty="oct", key_ops=["unwrapKey", "wrapKey"], + key_id="http://localhost/keys/key/version", + k=os.urandom(32), + kty="oct", + key_ops=["unwrapKey", "wrapKey"], ) crypto_client = CryptographyClient(key, credential=lambda *_: None) @@ -795,7 +801,7 @@ async def test_local_only_mode_no_service_calls(): async def test_local_only_mode_raise(): """A local-only CryptographyClient should raise an exception if an operation can't be performed locally""" - jwk = {"kty":"RSA", "key_ops":["decrypt", "verify", "unwrapKey"], "n":b"10011", "e":b"10001"} + jwk = {"kty": "RSA", "key_ops": ["decrypt", "verify", "unwrapKey"], "n": b"10011", "e": b"10001"} client = CryptographyClient.from_jwk(jwk=jwk) # Algorithm not supported locally @@ -908,7 +914,7 @@ async def test_aes_cbc_iv_validation(): @pytest.mark.asyncio async def test_encrypt_argument_validation(): """The client should raise an error when arguments don't work with the specified algorithm""" - + mock_client = mock.Mock() key = mock.Mock( spec=KeyVaultKey, diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto.py b/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto.py index a1cdd20eeb4d..82f3aef073b2 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto.py @@ -12,6 +12,7 @@ all_api_versions = get_decorator(only_vault=True) + class TestCryptoExamples(KeyVaultTestCase, KeysTestCase): @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @@ -59,7 +60,9 @@ def test_wrap_unwrap(self, key_client, **kwargs): key = key_client.create_rsa_key(key_name) client = CryptographyClient(key, credential, api_version=key_client.api_version) - key_bytes = b'\xc5\xb0\xfc\xf1C\x8a\x88pj\x11\x8d\xe5\x94\xe8\xff\x04\x0eY\xfeu\x8a\xe9<\x06(\xdb\x7f\xa9~\x85\x02\x04' + key_bytes = ( + b"\xc5\xb0\xfc\xf1C\x8a\x88pj\x11\x8d\xe5\x94\xe8\xff\x04\x0eY\xfeu\x8a\xe9<\x06(\xdb\x7f\xa9~\x85\x02\x04" + ) # [START wrap_key] from azure.keyvault.keys.crypto import KeyWrapAlgorithm diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py index cd5d9716d87c..a25ad3d18181 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_examples_crypto_async.py @@ -16,7 +16,7 @@ class TestCryptoExamples(KeyVaultTestCase): @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_encrypt_decrypt_async(self, key_client, **kwargs): @@ -59,7 +59,7 @@ async def test_encrypt_decrypt_async(self, key_client, **kwargs): # [END decrypt] @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_wrap_unwrap_async(self, key_client, **kwargs): @@ -68,7 +68,9 @@ async def test_wrap_unwrap_async(self, key_client, **kwargs): key = await key_client.create_rsa_key(key_name) client = CryptographyClient(key, credential, api_version=key_client.api_version) - key_bytes = b'\xc5\xb0\xfc\xf1C\x8a\x88pj\x11\x8d\xe5\x94\xe8\xff\x04\x0eY\xfeu\x8a\xe9<\x06(\xdb\x7f\xa9~\x85\x02\x04' + key_bytes = ( + b"\xc5\xb0\xfc\xf1C\x8a\x88pj\x11\x8d\xe5\x94\xe8\xff\x04\x0eY\xfeu\x8a\xe9<\x06(\xdb\x7f\xa9~\x85\x02\x04" + ) # [START wrap_key] from azure.keyvault.keys.crypto import KeyWrapAlgorithm @@ -87,7 +89,7 @@ async def test_wrap_unwrap_async(self, key_client, **kwargs): # [END unwrap_key] @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_sign_verify_async(self, key_client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py b/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py index 9fe97370442c..7499c5f557f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py @@ -23,7 +23,7 @@ KeyRotationLifetimeAction, KeyRotationPolicy, KeyRotationPolicyAction, - KeyType + KeyType, ) from azure.keyvault.keys._generated.models import KeyRotationPolicy as _KeyRotationPolicy from azure.keyvault.keys._shared.client_base import DEFAULT_VERSION @@ -54,6 +54,7 @@ def _assert_rotation_policies_equal(p1, p2): assert p1.updated_on == p2.updated_on assert len(p1.lifetime_actions) == len(p2.lifetime_actions) + def _assert_lifetime_actions_equal(a1, a2): assert a1.action == a2.action assert a1.time_after_create == a2.time_after_create @@ -115,8 +116,9 @@ def _validate_ec_key_bundle(self, key_curve, key_attributes, vault, key_name, kt assert key_curve == key.crv assert kid.index(prefix) == 0, f"Key Id should start with '{prefix}', but value is '{kid}'" assert key.kty == kty, f"kty should be '{kty}', but is '{key.kty}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on,"Missing required date attributes." - + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." def _validate_rsa_key_bundle(self, key_attributes, vault, key_name, kty, key_ops): prefix = "/".join(s.strip("/") for s in [vault, "keys", key_name]) @@ -126,7 +128,9 @@ def _validate_rsa_key_bundle(self, key_attributes, vault, key_name, kty, key_ops assert key.kty == kty, f"kty should be '{kty}', but is '{key.kty}'" assert key.n and key.e, "Bad RSA public material." assert sorted(key_ops) == sorted(key.key_ops), f"keyOps should be '{key_ops}', but is '{key.key_ops}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on, "Missing required date attributes." + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." def _update_key_properties(self, client, key, release_policy=None): expires = date_parse.parse("2050-01-02T08:00:00.000Z") @@ -184,7 +188,7 @@ def _to_bytes(hex): self._validate_rsa_key_bundle(imported_key, client.vault_url, name, key.kty, key.key_ops) return imported_key - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_key_crud_operations(self, client, is_hsm, **kwargs): @@ -210,7 +214,7 @@ def test_key_crud_operations(self, client, is_hsm, **kwargs): # create rsa key rsa_key_name = self.get_resource_name("crud-rsa-key") tags = {"purpose": "unit test", "test name ": "CreateRSAKeyTest"} - key_ops = ["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"] + key_ops = ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"] rsa_key = self._create_rsa_key( client, key_name=rsa_key_name, key_operations=key_ops, size=2048, tags=tags, hardware_protected=is_hsm ) @@ -239,8 +243,10 @@ def test_key_crud_operations(self, client, is_hsm, **kwargs): # aside from key_ops, the original updated keys should have the same JWKs self._assert_jwks_equal(rsa_key.key, deleted_key.key) assert deleted_key.id == rsa_key.id - assert deleted_key.recovery_id and deleted_key.deleted_date and deleted_key.scheduled_purge_date, "Missing required deleted key attributes." - + assert ( + deleted_key.recovery_id and deleted_key.deleted_date and deleted_key.scheduled_purge_date + ), "Missing required deleted key attributes." + deleted_key_poller.wait() # get the deleted key when soft deleted enabled @@ -248,7 +254,7 @@ def test_key_crud_operations(self, client, is_hsm, **kwargs): assert deleted_key is not None assert rsa_key.id == deleted_key.id - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @KeysClientPreparer() @recorded_by_proxy def test_rsa_public_exponent(self, client, **kwargs): @@ -260,7 +266,7 @@ def test_rsa_public_exponent(self, client, **kwargs): public_exponent = key.key.e[0] assert public_exponent == 17 - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_backup_restore(self, client, is_hsm, **kwargs): @@ -286,7 +292,7 @@ def test_backup_restore(self, client, is_hsm, **kwargs): restored_key = self._poll_until_no_exception(restore_function, ResourceExistsError) self._assert_key_attributes_equal(created_bundle.properties, restored_key.properties) - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_key_list(self, client, is_hsm, **kwargs): @@ -309,7 +315,7 @@ def test_key_list(self, client, is_hsm, **kwargs): del expected[key.name] assert len(expected) == 0 - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_list_versions(self, client, is_hsm, **kwargs): @@ -336,7 +342,7 @@ def test_list_versions(self, client, is_hsm, **kwargs): assert 0 == len(expected) @pytest.mark.skip("Temporarily disabled due to service issue") - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_list_deleted_keys(self, client, is_hsm, **kwargs): @@ -367,7 +373,7 @@ def test_list_deleted_keys(self, client, is_hsm, **kwargs): del expected[key.name] @pytest.mark.skip("Temporarily disabled due to service issue") - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_recover(self, client, is_hsm, **kwargs): @@ -393,7 +399,7 @@ def test_recover(self, client, is_hsm, **kwargs): expected_key = keys[key_name] self._assert_key_attributes_equal(expected_key.properties, recovered_key.properties) - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_purge(self, client, is_hsm, **kwargs): @@ -424,8 +430,8 @@ def test_purge(self, client, is_hsm, **kwargs): deleted = [s.name for s in client.list_deleted_keys()] assert not any(s in deleted for s in key_names) - @pytest.mark.parametrize("api_version,is_hsm",logging_enabled) - @KeysClientPreparer(logging_enable = True) + @pytest.mark.parametrize("api_version,is_hsm", logging_enabled) + @KeysClientPreparer(logging_enable=True) @recorded_by_proxy def test_logging_enabled(self, client, is_hsm, **kwargs): mock_handler = MockHandler() @@ -459,8 +465,8 @@ def test_logging_enabled(self, client, is_hsm, **kwargs): mock_handler.close() assert False, "Expected request body wasn't logged" - @pytest.mark.parametrize("api_version,is_hsm",logging_enabled) - @KeysClientPreparer(logging_enable = False) + @pytest.mark.parametrize("api_version,is_hsm", logging_enabled) + @KeysClientPreparer(logging_enable=False) @recorded_by_proxy def test_logging_disabled(self, client, is_hsm, **kwargs): mock_handler = MockHandler() @@ -493,7 +499,7 @@ def test_logging_disabled(self, client, is_hsm, **kwargs): mock_handler.close() - @pytest.mark.parametrize("api_version,is_hsm",only_hsm_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_get_random_bytes(self, client, **kwargs): @@ -509,11 +515,11 @@ def test_get_random_bytes(self, client, **kwargs): assert all(random_bytes != rb for rb in generated_random_bytes) generated_random_bytes.append(random_bytes) - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_key_release(self, client, is_hsm, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") if is_hsm and client.api_version == ApiVersion.V7_5: pytest.skip("Currently failing on 7.5-preview.1; skipping for now") @@ -538,7 +544,7 @@ def test_key_release(self, client, is_hsm, **kwargs): if self.is_live and "Target environment attestation statement cannot be verified" in ex.message: pytest.skip("Target environment attestation statement cannot be verified. Likely transient failure.") - @pytest.mark.parametrize("api_version,is_hsm",only_hsm_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_imported_key_release(self, client, **kwargs): @@ -560,11 +566,11 @@ def test_imported_key_release(self, client, **kwargs): release_result = client.release_key(imported_key_name, attestation) assert release_result.value - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_update_release_policy(self, client, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") if client.api_version == ApiVersion.V7_5: pytest.skip("Currently failing on 7.5-preview.1; skipping for now") @@ -584,17 +590,9 @@ def test_update_release_policy(self, client, **kwargs): new_release_policy_json = { "anyOf": [ - { - "anyOf": [ - { - "claim": "sdk-test", - "equals": False - } - ], - "authority": attestation_uri.rstrip("/") + "/" - } + {"anyOf": [{"claim": "sdk-test", "equals": False}], "authority": attestation_uri.rstrip("/") + "/"} ], - "version": "1.0.0" + "version": "1.0.0", } policy_string = json.dumps(new_release_policy_json).encode() new_release_policy = KeyReleasePolicy(policy_string) @@ -605,12 +603,12 @@ def test_update_release_policy(self, client, **kwargs): claim_condition = claim_condition if isinstance(claim_condition, bool) else json.loads(claim_condition) assert claim_condition is False - #Immutable policies aren't currently supported on Managed HSM - @pytest.mark.parametrize("api_version,is_hsm",only_vault_7_4_plus) + # Immutable policies aren't currently supported on Managed HSM + @pytest.mark.parametrize("api_version,is_hsm", only_vault_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_immutable_release_policy(self, client, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") attestation_uri = self._get_attestation_uri() @@ -624,17 +622,9 @@ def test_immutable_release_policy(self, client, **kwargs): new_release_policy_json = { "anyOf": [ - { - "anyOf": [ - { - "claim": "sdk-test", - "equals": False - } - ], - "authority": attestation_uri.rstrip("/") + "/" - } + {"anyOf": [{"claim": "sdk-test", "equals": False}], "authority": attestation_uri.rstrip("/") + "/"} ], - "version": "1.0.0" + "version": "1.0.0", } policy_string = json.dumps(new_release_policy_json).encode() new_release_policy = KeyReleasePolicy(policy_string, immutable=True) @@ -642,11 +632,11 @@ def test_immutable_release_policy(self, client, **kwargs): with pytest.raises(HttpResponseError): self._update_key_properties(client, key, new_release_policy) - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_key_rotation(self, client, is_hsm, **kwargs): - if (not is_public_cloud() and self.is_live): + if not is_public_cloud() and self.is_live: pytest.skip("This test is not supported in usgov/china region. Follow up with service team.") key_name = self.get_resource_name("rotation-key") @@ -663,11 +653,11 @@ def test_key_rotation(self, client, is_hsm, **kwargs): assert key.properties.version != rotated_key.properties.version assert key.key.n != rotated_key.key.n - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_key_rotation_policy(self, client, is_hsm, **kwargs): - if (not is_public_cloud() and self.is_live): + if not is_public_cloud() and self.is_live: pytest.skip("This test is not supported in usgov/china region. Follow up with service team.") key_name = self.get_resource_name("rotation-key") @@ -720,7 +710,9 @@ def test_key_rotation_policy(self, client, is_hsm, **kwargs): if not is_hsm: # updating with a round-tripped policy and overriding lifetime_actions newest_actions = [KeyRotationLifetimeAction(KeyRotationPolicyAction.notify, time_before_expiry="P60D")] - newest_policy = client.update_key_rotation_policy(key_name, policy=new_policy, lifetime_actions=newest_actions) + newest_policy = client.update_key_rotation_policy( + key_name, policy=new_policy, lifetime_actions=newest_actions + ) newest_fetched_policy = client.get_key_rotation_policy(key_name) assert newest_policy.expires_in == "P90D" _assert_rotation_policies_equal(newest_policy, newest_fetched_policy) @@ -738,7 +730,7 @@ def test_key_rotation_policy(self, client, is_hsm, **kwargs): newest_fetched_policy_actions = newest_fetched_policy.lifetime_actions[i] _assert_lifetime_actions_equal(newest_policy_actions, newest_fetched_policy_actions) - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_get_cryptography_client(self, client, is_hsm, **kwargs): @@ -774,7 +766,7 @@ def test_get_cryptography_client(self, client, is_hsm, **kwargs): assert "RSA-OAEP" == result.algorithm assert plaintext == result.plaintext - @pytest.mark.parametrize("api_version,is_hsm",only_vault_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_vault_7_4_plus) @KeysClientPreparer() @recorded_by_proxy def test_send_request(self, client, is_hsm, **kwargs): @@ -790,7 +782,7 @@ def test_send_request(self, client, is_hsm, **kwargs): response = client.send_request(request) assert response.json()["key"]["kid"] == key.id - @pytest.mark.parametrize("api_version,is_hsm",only_hsm_default) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm_default) @KeysClientPreparer() @recorded_by_proxy def test_get_key_attestation(self, client, **kwargs): @@ -834,6 +826,7 @@ def test_40x_handling(self, client, **kwargs): # Test that 409 is raised correctly (`create_key` shouldn't actually trigger this, but for raising behavior) def run(*_, **__): return Mock(http_response=Mock(status_code=409)) + with patch.object(client._client._client._pipeline, "run", run): with pytest.raises(ResourceExistsError): client.create_key("...", "RSA") diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py index c1ec2e7a2e43..00e217d64cd6 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py @@ -34,16 +34,11 @@ from devtools_testutils.aio import recorded_by_proxy_async from _keys_test_case import KeysTestCase - all_api_versions = get_decorator(is_async=True) only_hsm = get_decorator(only_hsm=True, is_async=True) only_hsm_default = get_decorator(only_hsm=True, is_async=True, api_versions=[DEFAULT_VERSION]) -only_hsm_7_4_plus = get_decorator( - only_hsm=True, is_async=True, api_versions=[ApiVersion.V7_4, ApiVersion.V7_5] -) -only_vault_7_4_plus = get_decorator( - only_vault=True, is_async=True, api_versions=[ApiVersion.V7_4, ApiVersion.V7_5] -) +only_hsm_7_4_plus = get_decorator(only_hsm=True, is_async=True, api_versions=[ApiVersion.V7_4, ApiVersion.V7_5]) +only_vault_7_4_plus = get_decorator(only_vault=True, is_async=True, api_versions=[ApiVersion.V7_4, ApiVersion.V7_5]) only_7_4_plus = get_decorator(is_async=True, api_versions=[ApiVersion.V7_4, ApiVersion.V7_5]) logging_enabled = get_decorator(is_async=True, logging_enable=True) logging_disabled = get_decorator(is_async=True, logging_enable=False) @@ -69,15 +64,15 @@ def _assert_jwks_equal(self, jwk1, jwk2): assert getattr(jwk1, field) == getattr(jwk2, field) def _assert_key_attributes_equal(self, k1: KeyProperties, k2: KeyProperties) -> None: - assert k1.name== k2.name - assert k1.vault_url== k2.vault_url - assert k1.enabled== k2.enabled - assert k1.not_before== k2.not_before - assert k1.expires_on== k2.expires_on - assert k1.created_on== k2.created_on - assert k1.updated_on== k2.updated_on - assert k1.tags== k2.tags - assert k1.recovery_level== k2.recovery_level + assert k1.name == k2.name + assert k1.vault_url == k2.vault_url + assert k1.enabled == k2.enabled + assert k1.not_before == k2.not_before + assert k1.expires_on == k2.expires_on + assert k1.created_on == k2.created_on + assert k1.updated_on == k2.updated_on + assert k1.tags == k2.tags + assert k1.recovery_level == k2.recovery_level assert k1.hsm_platform == k2.hsm_platform async def _create_rsa_key(self, client, key_name, **kwargs): @@ -107,7 +102,9 @@ def _validate_ec_key_bundle(self, key_curve, key_attributes, vault, key_name, kt assert key_curve == key.crv assert kid.index(prefix) == 0, f"Key Id should start with '{prefix}', but value is '{kid}'" assert key.kty == kty, f"kty should be '{kty}', but is '{key.kty}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on,"Missing required date attributes." + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." def _validate_rsa_key_bundle(self, key_attributes, vault, key_name, kty, key_ops): prefix = "/".join(s.strip("/") for s in [vault, "keys", key_name]) @@ -117,7 +114,9 @@ def _validate_rsa_key_bundle(self, key_attributes, vault, key_name, kty, key_ops assert key.kty == kty, f"kty should be '{kty}', but is '{key.kty}'" assert key.n and key.e, "Bad RSA public material." assert sorted(key_ops) == sorted(key.key_ops), f"keyOps should be '{key_ops}', but is '{key.key_ops}'" - assert key_attributes.properties.created_on and key_attributes.properties.updated_on,"Missing required date attributes." + assert ( + key_attributes.properties.created_on and key_attributes.properties.updated_on + ), "Missing required date attributes." async def _update_key_properties(self, client, key, release_policy=None): expires = date_parse.parse("2050-01-02T08:00:00.000Z") @@ -183,7 +182,7 @@ def _to_bytes(hex): return imported_key @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_key_crud_operations(self, client, is_hsm, **kwargs): @@ -224,9 +223,7 @@ async def test_key_crud_operations(self, client, is_hsm, **kwargs): self._assert_key_attributes_equal(rsa_key.properties, key.properties) # get key without version - self._assert_key_attributes_equal( - rsa_key.properties, (await client.get_key(rsa_key.name)).properties - ) + self._assert_key_attributes_equal(rsa_key.properties, (await client.get_key(rsa_key.name)).properties) # update key with version if self.is_live: @@ -242,7 +239,9 @@ async def test_key_crud_operations(self, client, is_hsm, **kwargs): # aside from key_ops, the original updated keys should have the same JWKs self._assert_jwks_equal(rsa_key.key, deleted_key.key) assert deleted_key.id == rsa_key.id - assert deleted_key.recovery_id and deleted_key.deleted_date and deleted_key.scheduled_purge_date,"Missing required deleted key attributes." + assert ( + deleted_key.recovery_id and deleted_key.deleted_date and deleted_key.scheduled_purge_date + ), "Missing required deleted key attributes." # get the deleted key when soft deleted enabled deleted_key = await client.get_deleted_key(rsa_key.name) @@ -250,7 +249,7 @@ async def test_key_crud_operations(self, client, is_hsm, **kwargs): assert rsa_key.id == deleted_key.id @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_rsa_public_exponent(self, client, **kwargs): @@ -263,7 +262,7 @@ async def test_rsa_public_exponent(self, client, **kwargs): assert public_exponent == 17 @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_backup_restore(self, client, is_hsm, **kwargs): @@ -276,7 +275,7 @@ async def test_backup_restore(self, client, is_hsm, **kwargs): # backup key key_backup = await client.backup_key(created_bundle.name) - #self.assertIsNotNone(key_backup, "key_backup") + # self.assertIsNotNone(key_backup, "key_backup") assert key_backup is not None # delete key @@ -291,7 +290,7 @@ async def test_backup_restore(self, client, is_hsm, **kwargs): self._assert_key_attributes_equal(created_bundle.properties, restored_key.properties) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_key_list(self, client, is_hsm, **kwargs): @@ -315,7 +314,7 @@ async def test_key_list(self, client, is_hsm, **kwargs): assert len(expected) == 0 @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_list_versions(self, client, is_hsm, **kwargs): @@ -343,7 +342,7 @@ async def test_list_versions(self, client, is_hsm, **kwargs): @pytest.mark.asyncio @pytest.mark.skip("Temporarily disabled due to service issue") - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_list_deleted_keys(self, client, is_hsm, **kwargs): @@ -376,7 +375,7 @@ async def test_list_deleted_keys(self, client, is_hsm, **kwargs): @pytest.mark.asyncio @pytest.mark.skip("Temporarily disabled due to service issue") - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_recover(self, client, is_hsm, **kwargs): @@ -407,7 +406,7 @@ async def test_recover(self, client, is_hsm, **kwargs): assert len(set(expected.keys()) & set(actual.keys())) == len(expected) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_purge(self, client, is_hsm, **kwargs): @@ -435,8 +434,8 @@ async def test_purge(self, client, is_hsm, **kwargs): assert deleted_key.name not in key_names @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",logging_enabled) - @AsyncKeysClientPreparer(logging_enable = True) + @pytest.mark.parametrize("api_version,is_hsm", logging_enabled) + @AsyncKeysClientPreparer(logging_enable=True) @recorded_by_proxy_async async def test_logging_enabled(self, client, is_hsm, **kwargs): mock_handler = MockHandler() @@ -471,8 +470,8 @@ async def test_logging_enabled(self, client, is_hsm, **kwargs): assert False, "Expected request body wasn't logged" @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",logging_disabled) - @AsyncKeysClientPreparer(logging_enable = False) + @pytest.mark.parametrize("api_version,is_hsm", logging_disabled) + @AsyncKeysClientPreparer(logging_enable=False) @recorded_by_proxy_async async def test_logging_disabled(self, client, is_hsm, **kwargs): mock_handler = MockHandler() @@ -506,7 +505,7 @@ async def test_logging_disabled(self, client, is_hsm, **kwargs): mock_handler.close() @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_get_random_bytes(self, client, **kwargs): @@ -523,11 +522,11 @@ async def test_get_random_bytes(self, client, **kwargs): generated_random_bytes.append(random_bytes) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_key_release(self, client, is_hsm, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") if is_hsm and client.api_version == ApiVersion.V7_5: pytest.skip("Currently failing on 7.5-preview.1; skipping for now") @@ -553,7 +552,7 @@ async def test_key_release(self, client, is_hsm, **kwargs): pytest.skip("Target environment attestation statement cannot be verified. Likely transient failure.") @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_imported_key_release(self, client, **kwargs): @@ -576,11 +575,11 @@ async def test_imported_key_release(self, client, **kwargs): assert release_result.value @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_update_release_policy(self, client, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") if client.api_version == ApiVersion.V7_5: pytest.skip("Currently failing on 7.5-preview.1; skipping for now") @@ -600,17 +599,9 @@ async def test_update_release_policy(self, client, **kwargs): new_release_policy_json = { "anyOf": [ - { - "anyOf": [ - { - "claim": "sdk-test", - "equals": False - } - ], - "authority": attestation_uri.rstrip("/") + "/" - } + {"anyOf": [{"claim": "sdk-test", "equals": False}], "authority": attestation_uri.rstrip("/") + "/"} ], - "version": "1.0.0" + "version": "1.0.0", } policy_string = json.dumps(new_release_policy_json).encode() new_release_policy = KeyReleasePolicy(policy_string) @@ -623,11 +614,11 @@ async def test_update_release_policy(self, client, **kwargs): # Immutable policies aren't currently supported on Managed HSM @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_vault_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_vault_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_immutable_release_policy(self, client, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") attestation_uri = self._get_attestation_uri() @@ -641,17 +632,9 @@ async def test_immutable_release_policy(self, client, **kwargs): new_release_policy_json = { "anyOf": [ - { - "anyOf": [ - { - "claim": "sdk-test", - "equals": False - } - ], - "authority": attestation_uri.rstrip("/") + "/" - } + {"anyOf": [{"claim": "sdk-test", "equals": False}], "authority": attestation_uri.rstrip("/") + "/"} ], - "version": "1.0.0" + "version": "1.0.0", } policy_string = json.dumps(new_release_policy_json).encode() new_release_policy = KeyReleasePolicy(policy_string, immutable=True) @@ -660,11 +643,11 @@ async def test_immutable_release_policy(self, client, **kwargs): await self._update_key_properties(client, key, new_release_policy) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_key_rotation(self, client, is_hsm, **kwargs): - if (not is_public_cloud() and self.is_live): + if not is_public_cloud() and self.is_live: pytest.skip("This test is not supported in usgov/china region. Follow up with service team.") key_name = self.get_resource_name("rotation-key") @@ -684,11 +667,11 @@ async def test_key_rotation(self, client, is_hsm, **kwargs): assert key.key.n != rotated_key.key.n @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_key_rotation_policy(self, client, is_hsm, **kwargs): - if (not is_public_cloud() and self.is_live): + if not is_public_cloud() and self.is_live: pytest.skip("This test is not supported in usgov/china region. Follow up with service team.") key_name = self.get_resource_name("rotation-key") @@ -763,7 +746,7 @@ async def test_key_rotation_policy(self, client, is_hsm, **kwargs): _assert_lifetime_actions_equal(newest_policy_actions, newest_fetched_policy_actions) @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_get_cryptography_client(self, client, is_hsm, **kwargs): @@ -800,7 +783,7 @@ async def test_get_cryptography_client(self, client, is_hsm, **kwargs): assert plaintext == result.plaintext @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_vault_7_4_plus) + @pytest.mark.parametrize("api_version,is_hsm", only_vault_7_4_plus) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_send_request(self, client, is_hsm, **kwargs): @@ -817,7 +800,7 @@ async def test_send_request(self, client, is_hsm, **kwargs): assert response.json()["key"]["kid"] == key.id @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm_default) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm_default) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_get_key_attestation(self, client, **kwargs): @@ -864,6 +847,7 @@ async def test_40x_handling(self, client, **kwargs): # Test that 409 is raised correctly (`create_key` shouldn't actually trigger this, but for raising behavior) async def run(*_, **__): return Mock(http_response=Mock(status_code=409)) + with patch.object(client._client._client._pipeline, "run", run): with pytest.raises(ResourceExistsError): await client.create_key("...", "RSA") diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_local_crypto.py b/sdk/keyvault/azure-keyvault-keys/tests/test_local_crypto.py index 52ec32992543..e9b2867fc08d 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_local_crypto.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_local_crypto.py @@ -7,10 +7,8 @@ import pytest from azure.keyvault.keys import KeyCurveName, KeyVaultKey -from azure.keyvault.keys.crypto import (EncryptionAlgorithm, KeyWrapAlgorithm, - SignatureAlgorithm) -from azure.keyvault.keys.crypto._providers import \ - get_local_cryptography_provider +from azure.keyvault.keys.crypto import EncryptionAlgorithm, KeyWrapAlgorithm, SignatureAlgorithm +from azure.keyvault.keys.crypto._providers import get_local_cryptography_provider from keys import EC_KEYS, RSA_KEYS @@ -48,14 +46,14 @@ def test_rsa_encrypt_decrypt(key, algorithm): (EncryptionAlgorithm.a256_cbcpad, 32), (EncryptionAlgorithm.a192_cbcpad, 24), (EncryptionAlgorithm.a128_cbcpad, 16), - ) + ), ) def test_symmetric_encrypt_decrypt(algorithm, key_size): jwk = { "k": os.urandom(key_size), - "kid":"http://localhost/keys/key/version", + "kid": "http://localhost/keys/key/version", "kty": "oct-HSM", - "key_ops": ("encrypt", "decrypt") + "key_ops": ("encrypt", "decrypt"), } key = KeyVaultKey(key_id="http://localhost/keys/key/version", jwk=jwk) provider = get_local_cryptography_provider(key.key) @@ -119,9 +117,9 @@ def test_rsa_wrap_unwrap(key, algorithm): def test_symmetric_wrap_unwrap(algorithm): jwk = { "k": os.urandom(32), - "kid":"http://localhost/keys/key/version", + "kid": "http://localhost/keys/key/version", "kty": "oct", - "key_ops": ("unwrapKey", "wrapKey") + "key_ops": ("unwrapKey", "wrapKey"), } key = KeyVaultKey(key_id="http://localhost/keys/key/version", jwk=jwk) provider = get_local_cryptography_provider(key.key) diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_parse_id.py b/sdk/keyvault/azure-keyvault-keys/tests/test_parse_id.py index 3f72b8cb9556..eb33db5f2860 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_parse_id.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_parse_id.py @@ -15,7 +15,7 @@ class TestParseId(KeyVaultTestCase, KeysTestCase): - @pytest.mark.parametrize("api_version,is_hsm",only_vault) + @pytest.mark.parametrize("api_version,is_hsm", only_vault) @KeysClientPreparer() @recorded_by_proxy def test_parse_key_id_with_version(self, client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys.py b/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys.py index 68e2b6496d64..be044fe64650 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys.py @@ -36,11 +36,11 @@ def test_create_key_client(): class TestExamplesKeyVault(KeyVaultTestCase, KeysTestCase): - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_example_key_crud_operations(self, key_client, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") key_name = self.get_resource_name("key-name") @@ -131,7 +131,7 @@ def test_example_key_crud_operations(self, key_client, **kwargs): deleted_key_poller.wait() # [END delete_key] - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @KeysClientPreparer() @recorded_by_proxy def test_example_create_oct_key(self, key_client, **kwargs): @@ -145,7 +145,7 @@ def test_example_create_oct_key(self, key_client, **kwargs): print(key.key_type) # [END create_oct_key] - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_example_key_list_operations(self, key_client, **kwargs): @@ -186,7 +186,7 @@ def test_example_key_list_operations(self, key_client, **kwargs): print(key.deleted_date) # [END list_deleted_keys] - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_example_keys_backup_restore(self, key_client, **kwargs): @@ -219,7 +219,7 @@ def test_example_keys_backup_restore(self, key_client, **kwargs): print(restored_key.properties.version) # [END restore_key_backup] - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @KeysClientPreparer() @recorded_by_proxy def test_example_keys_recover(self, key_client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys_async.py index 1a3425ffc03e..f93cbe624798 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_samples_keys_async.py @@ -43,11 +43,11 @@ async def test_create_key_client(): class TestExamplesKeyVault(KeyVaultTestCase): @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_example_key_crud_operations(self, key_client, **kwargs): - if (self.is_live and os.environ["KEYVAULT_SKU"] != "premium"): + if self.is_live and os.environ["KEYVAULT_SKU"] != "premium": pytest.skip("This test is not supported on standard SKU vaults. Follow up with service team") key_name = self.get_resource_name("key-name") @@ -133,7 +133,7 @@ async def test_example_key_crud_operations(self, key_client, **kwargs): # [END delete_key] @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",only_hsm) + @pytest.mark.parametrize("api_version,is_hsm", only_hsm) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_example_create_oct_key(self, key_client, **kwargs): @@ -148,7 +148,7 @@ async def test_example_create_oct_key(self, key_client, **kwargs): # [END create_oct_key] @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_example_key_list_operations(self, key_client, **kwargs): @@ -195,7 +195,7 @@ async def test_example_key_list_operations(self, key_client, **kwargs): # [END list_deleted_keys] @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_example_keys_backup_restore(self, key_client, **kwargs): @@ -230,7 +230,7 @@ async def test_example_keys_backup_restore(self, key_client, **kwargs): # [END restore_key_backup] @pytest.mark.asyncio - @pytest.mark.parametrize("api_version,is_hsm",all_api_versions) + @pytest.mark.parametrize("api_version,is_hsm", all_api_versions) @AsyncKeysClientPreparer() @recorded_by_proxy_async async def test_example_keys_recover(self, key_client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py index ec1b5aaa0651..eb1f87b51803 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/__init__.py @@ -12,8 +12,9 @@ "KeyVaultSecret", "KeyVaultSecretIdentifier", "SecretProperties", - "DeletedSecret" + "DeletedSecret", ] from ._version import VERSION + __version__ = VERSION diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py index 7a64848801dd..e0eaca55c576 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py @@ -62,11 +62,7 @@ def get_secret(self, name: str, version: Optional[str] = None, **kwargs: Any) -> :caption: Get a secret :dedent: 8 """ - bundle = self._client.get_secret( - secret_name=name, - secret_version=version or "", - **kwargs - ) + bundle = self._client.get_secret(secret_name=name, secret_version=version or "", **kwargs) return KeyVaultSecret._from_secret_bundle(bundle) @distributed_trace @@ -111,24 +107,15 @@ def set_secret( """ if enabled is not None or not_before is not None or expires_on is not None: - attributes = self._models.SecretAttributes( - enabled=enabled, not_before=not_before, expires=expires_on - ) + attributes = self._models.SecretAttributes(enabled=enabled, not_before=not_before, expires=expires_on) else: attributes = None parameters = self._models.SecretSetParameters( - value=value, - tags=tags, - content_type=content_type, - secret_attributes=attributes + value=value, tags=tags, content_type=content_type, secret_attributes=attributes ) - bundle = self._client.set_secret( - secret_name=name, - parameters=parameters, - **kwargs - ) + bundle = self._client.set_secret(secret_name=name, parameters=parameters, **kwargs) return KeyVaultSecret._from_secret_bundle(bundle) @distributed_trace @@ -175,9 +162,7 @@ def update_secret_properties( """ if enabled is not None or not_before is not None or expires_on is not None: - attributes = self._models.SecretAttributes( - enabled=enabled, not_before=not_before, expires=expires_on - ) + attributes = self._models.SecretAttributes(enabled=enabled, not_before=not_before, expires=expires_on) else: attributes = None @@ -187,12 +172,7 @@ def update_secret_properties( tags=tags, ) - bundle = self._client.update_secret( - name, - secret_version=version or "", - parameters=parameters, - **kwargs - ) + bundle = self._client.update_secret(name, secret_version=version or "", parameters=parameters, **kwargs) return SecretProperties._from_secret_bundle(bundle) # pylint: disable=protected-access @distributed_trace @@ -216,7 +196,7 @@ def list_properties_of_secrets(self, **kwargs: Any) -> ItemPaged[SecretPropertie return self._client.get_secrets( maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [SecretProperties._from_secret_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -243,7 +223,7 @@ def list_properties_of_secret_versions(self, name: str, **kwargs: Any) -> ItemPa name, maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [SecretProperties._from_secret_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -292,13 +272,14 @@ def restore_secret_backup(self, backup: bytes, **kwargs: Any) -> SecretPropertie """ bundle = self._client.restore_secret( - parameters=self._models.SecretRestoreParameters(secret_bundle_backup=backup), - **kwargs + parameters=self._models.SecretRestoreParameters(secret_bundle_backup=backup), **kwargs ) return SecretProperties._from_secret_bundle(bundle) @distributed_trace - def begin_delete_secret(self, name: str, **kwargs: Any) -> LROPoller[DeletedSecret]: # pylint:disable=bad-option-value,delete-operation-wrong-return-type + def begin_delete_secret( + self, name: str, **kwargs: Any + ) -> LROPoller[DeletedSecret]: # pylint:disable=bad-option-value,delete-operation-wrong-return-type """Delete all versions of a secret. Requires secrets/delete permission. When this method returns Key Vault has begun deleting the secret. Deletion may take several seconds in a vault @@ -392,7 +373,7 @@ def list_deleted_secrets(self, **kwargs: Any) -> ItemPaged[DeletedSecret]: return self._client.get_deleted_secrets( maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/_patch.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_patch.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_patch.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/_patch.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_patch.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_patch.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_patch.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_patch.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py index 0f84607e3ccd..3e3ac1855178 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py @@ -66,7 +66,6 @@ async def await_result(func: Callable[P, Union[T, Awaitable[T]]], *args: P.args, return result - class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """Policy for handling HTTP authentication challenges. @@ -83,9 +82,7 @@ def __init__(self, credential: AsyncTokenProvider, *scopes: str, **kwargs: Any) self._verify_challenge_resource = kwargs.pop("verify_challenge_resource", True) self._request_copy: Optional[HttpRequest] = None - async def send( - self, request: PipelineRequest[HttpRequest] - ) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: + async def send(self, request: PipelineRequest[HttpRequest]) -> PipelineResponse[HttpRequest, AsyncHttpResponse]: """Authorize request with a bearer token and send it to the next policy. We implement this method to account for the valid scenario where a Key Vault authentication challenge is @@ -156,7 +153,6 @@ async def handle_challenge_flow( await await_result(self.on_response, request, response) return response - async def on_request(self, request: PipelineRequest) -> None: _enforce_tls(request) challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) @@ -227,9 +223,7 @@ async def on_challenge(self, request: PipelineRequest, response: PipelineRespons if challenge.tenant_id and challenge.tenant_id.lower().endswith("adfs"): await self.authorize_request(request, scope, claims=challenge.claims) else: - await self.authorize_request( - request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id - ) + await self.authorize_request(request, scope, claims=challenge.claims, tenant_id=challenge.tenant_id) return True diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge_cache.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge_cache.py index 99f32091e24b..1048710eed2f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge_cache.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge_cache.py @@ -8,7 +8,6 @@ from .http_challenge import HttpChallenge - _cache: "Dict[str, HttpChallenge]" = {} _lock = threading.Lock() diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 20904cf11646..d61c0d545c1e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -111,17 +111,10 @@ async def set_secret( attributes = None parameters = self._models.SecretSetParameters( - value=value, - tags=tags, - content_type=content_type, - secret_attributes=attributes + value=value, tags=tags, content_type=content_type, secret_attributes=attributes ) - bundle = await self._client.set_secret( - name, - parameters=parameters, - **kwargs - ) + bundle = await self._client.set_secret(name, parameters=parameters, **kwargs) return KeyVaultSecret._from_secret_bundle(bundle) @distributed_trace_async @@ -177,12 +170,7 @@ async def update_secret_properties( tags=tags, ) - bundle = await self._client.update_secret( - name, - secret_version=version or "", - parameters=parameters, - **kwargs - ) + bundle = await self._client.update_secret(name, secret_version=version or "", parameters=parameters, **kwargs) return SecretProperties._from_secret_bundle(bundle) # pylint: disable=protected-access @distributed_trace @@ -205,7 +193,7 @@ def list_properties_of_secrets(self, **kwargs: Any) -> AsyncItemPaged[SecretProp return self._client.get_secrets( maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [SecretProperties._from_secret_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace @@ -231,7 +219,7 @@ def list_properties_of_secret_versions(self, name: str, **kwargs: Any) -> AsyncI name, maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [SecretProperties._from_secret_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace_async @@ -278,8 +266,7 @@ async def restore_secret_backup(self, backup: bytes, **kwargs: Any) -> SecretPro :dedent: 8 """ bundle = await self._client.restore_secret( - parameters=self._models.SecretRestoreParameters(secret_bundle_backup=backup), - **kwargs + parameters=self._models.SecretRestoreParameters(secret_bundle_backup=backup), **kwargs ) return SecretProperties._from_secret_bundle(bundle) @@ -371,7 +358,7 @@ def list_deleted_secrets(self, **kwargs: Any) -> AsyncItemPaged[DeletedSecret]: return self._client.get_deleted_secrets( maxresults=kwargs.pop("max_page_size", None), cls=lambda objs: [DeletedSecret._from_deleted_secret_item(x) for x in objs], - **kwargs + **kwargs, ) @distributed_trace_async @@ -441,7 +428,7 @@ async def recover_deleted_secret(self, name: str, **kwargs: Any) -> SecretProper command=command, final_resource=recovered_secret, finished=False, - interval=polling_interval + interval=polling_interval, ) await polling_method.run() diff --git a/sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py index 3412407cee50..61892b5f66c6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py @@ -8,6 +8,7 @@ from azure.keyvault.secrets.aio import SecretClient from azure.identity.aio import DefaultAzureCredential + # ---------------------------------------------------------------------------------------------------------- # Prerequisites: # 1. An Azure Key Vault (https://learn.microsoft.com/azure/key-vault/quick-create-cli) @@ -74,4 +75,4 @@ async def run_sample(): if __name__ == "__main__": - asyncio.run(run_sample()) \ No newline at end of file + asyncio.run(run_sample()) diff --git a/sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py b/sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py index ff1e1de91d97..d930e0788d74 100644 --- a/sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py @@ -9,6 +9,7 @@ from azure.keyvault.secrets.aio import SecretClient from azure.identity.aio import DefaultAzureCredential + # ---------------------------------------------------------------------------------------------------------- # Prerequisites: # 1. An Azure Key Vault (https://learn.microsoft.com/azure/key-vault/quick-create-cli) diff --git a/sdk/keyvault/azure-keyvault-secrets/samples/list_operations.py b/sdk/keyvault/azure-keyvault-secrets/samples/list_operations.py index bf31a8a86fc5..86aa8d7a0f68 100644 --- a/sdk/keyvault/azure-keyvault-secrets/samples/list_operations.py +++ b/sdk/keyvault/azure-keyvault-secrets/samples/list_operations.py @@ -58,17 +58,13 @@ for secret in secrets: assert secret.name retrieved_secret = client.get_secret(secret.name) - print( - f"Secret with name '{retrieved_secret.name}' and value {retrieved_secret.name} was found." - ) + print(f"Secret with name '{retrieved_secret.name}' and value {retrieved_secret.name} was found.") # The bank account password got updated, so you want to update the secret in Key Vault to ensure it reflects the # new password. Calling set_secret on an existing secret creates a new version of the secret in the Key Vault # with the new value. updated_secret = client.set_secret(bank_secret.name, "newSecretValue") -print( - f"Secret with name '{updated_secret.name}' was updated with new value '{updated_secret.value}'" -) +print(f"Secret with name '{updated_secret.name}' was updated with new value '{updated_secret.value}'") # You need to check all the different values your bank account password secret had previously. Lets print all # the versions of this secret. @@ -89,6 +85,4 @@ print("\n.. List deleted secrets from the Key Vault") deleted_secrets = client.list_deleted_secrets() for deleted_secret in deleted_secrets: - print( - f"Secret with name '{deleted_secret.name}' has recovery id '{deleted_secret.recovery_id}'" - ) + print(f"Secret with name '{deleted_secret.name}' has recovery id '{deleted_secret.recovery_id}'") diff --git a/sdk/keyvault/azure-keyvault-secrets/samples/list_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/samples/list_operations_async.py index 7a591519b0a0..34634f0bb139 100644 --- a/sdk/keyvault/azure-keyvault-secrets/samples/list_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/samples/list_operations_async.py @@ -8,6 +8,7 @@ from azure.keyvault.secrets.aio import SecretClient from azure.identity.aio import DefaultAzureCredential + # ---------------------------------------------------------------------------------------------------------- # Prerequisites: # 1. An Azure Key Vault (https://learn.microsoft.com/azure/key-vault/quick-create-cli) @@ -64,9 +65,7 @@ async def run_sample(): # new password. Calling set_secret on an existing secret creates a new version of the secret in the Key Vault # with the new value. updated_secret = await client.set_secret(bank_secret.name, "newSecretValue") - print( - f"Secret with name '{updated_secret.name}' was updated with new value '{updated_secret.value}'" - ) + print(f"Secret with name '{updated_secret.name}' was updated with new value '{updated_secret.value}'") # You need to check all the different values your bank account password secret had previously. Lets print all # the versions of this secret. @@ -84,9 +83,7 @@ async def run_sample(): print("\n.. List deleted secrets from the Key Vault") deleted_secrets = client.list_deleted_secrets() async for deleted_secret in deleted_secrets: - print( - f"Secret with name '{deleted_secret.name}' has recovery id '{deleted_secret.recovery_id}'" - ) + print(f"Secret with name '{deleted_secret.name}' has recovery id '{deleted_secret.recovery_id}'") print("\nrun_sample done") await credential.close() diff --git a/sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations_async.py b/sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations_async.py index b69b0bcfb4ef..f44b0139d79e 100644 --- a/sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations_async.py @@ -8,6 +8,7 @@ from azure.keyvault.secrets.aio import SecretClient from azure.identity.aio import DefaultAzureCredential + # ---------------------------------------------------------------------------------------------------------- # Prerequisites: # 1. An Azure Key Vault (https://learn.microsoft.com/azure/key-vault/quick-create-cli) diff --git a/sdk/keyvault/azure-keyvault-secrets/setup.py b/sdk/keyvault/azure-keyvault-secrets/setup.py index 62f8b4627517..fc7de798d3e3 100644 --- a/sdk/keyvault/azure-keyvault-secrets/setup.py +++ b/sdk/keyvault/azure-keyvault-secrets/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-keyvault-secrets" PACKAGE_PPRINT_NAME = "Key Vault Secrets" diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/conftest.py b/sdk/keyvault/azure-keyvault-secrets/tests/conftest.py index 96ff292c3f2c..e630f5c4ab81 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/conftest.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/conftest.py @@ -31,7 +31,7 @@ test_proxy, add_oauth_response_sanitizer, add_general_regex_sanitizer, - remove_batch_sanitizers + remove_batch_sanitizers, ) diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/test_parse_id.py b/sdk/keyvault/azure-keyvault-secrets/tests/test_parse_id.py index de7c2e08a806..eeff11fc2b82 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/test_parse_id.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/test_parse_id.py @@ -13,7 +13,7 @@ class TestParseId(KeyVaultTestCase): - @pytest.mark.parametrize("api_version", [(DEFAULT_VERSION)]) + @pytest.mark.parametrize("api_version", [DEFAULT_VERSION]) @SecretsClientPreparer() @recorded_by_proxy def test_parse_secret_id_with_version(self, client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/test_polling_method.py b/sdk/keyvault/azure-keyvault-secrets/tests/test_polling_method.py index fded987db56c..22189629419d 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/test_polling_method.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/test_polling_method.py @@ -74,7 +74,9 @@ def command(): _command.operation_complete = True resource = object() - polling_method = DeleteRecoverPollingMethod(mock_pipeline_response, command, final_resource=resource, finished=False) + polling_method = DeleteRecoverPollingMethod( + mock_pipeline_response, command, final_resource=resource, finished=False + ) assert not polling_method.finished() with mock.patch(SLEEP) as sleep: @@ -102,7 +104,9 @@ def test_final_resource(): assert final_resource is resource command = mock.Mock() - polling_method = DeleteRecoverPollingMethod(mock_pipeline_response, command, final_resource=resource, finished=False) + polling_method = DeleteRecoverPollingMethod( + mock_pipeline_response, command, final_resource=resource, finished=False + ) assert polling_method.resource() is resource polling_method.run() diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py index 435d6c6d04b1..8408e6e35890 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py @@ -390,6 +390,7 @@ async def test_40x_handling(self, client, **kwargs): # Test that 409 is raised correctly (`set_secret` shouldn't actually trigger this, but for raising behavior) async def run(*_, **__): return Mock(http_response=Mock(status_code=409)) + with patch.object(client._client._client._pipeline, "run", run): with pytest.raises(ResourceExistsError): await client.set_secret("...", "...") diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py index ed09c2759c48..d92537cc0f19 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py @@ -379,6 +379,7 @@ def test_40x_handling(self, client, **kwargs): # Test that 409 is raised correctly (`set_secret` shouldn't actually trigger this, but for raising behavior) def run(*_, **__): return Mock(http_response=Mock(status_code=409)) + with patch.object(client._client._client._pipeline, "run", run): with pytest.raises(ResourceExistsError): client.set_secret("...", "...") diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/async_polling.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/async_polling.py index 9387493e73cb..415528b44926 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/async_polling.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/async_polling.py @@ -15,7 +15,6 @@ from ..models import SecurityDomain, SecurityDomainOperationStatus from .._utils.model_base import _deserialize - PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/http_challenge_cache.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/http_challenge_cache.py index 6034ff09d5ca..1048710eed2f 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/http_challenge_cache.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/http_challenge_cache.py @@ -8,7 +8,6 @@ from .http_challenge import HttpChallenge - _cache: "Dict[str, HttpChallenge]" = {} _lock = threading.Lock() @@ -63,6 +62,7 @@ def remove_challenge_for_url(url: str) -> None: with _lock: del _cache[key.lower()] + def set_challenge_for_url(url: str, challenge: "HttpChallenge") -> None: """Caches the challenge for the specified URL. diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/polling.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/polling.py index c796bb7175dc..8a6f9241834a 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/polling.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_internal/polling.py @@ -13,7 +13,6 @@ from ..models import SecurityDomain, SecurityDomainOperationStatus from .._utils.model_base import _deserialize - PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) # Correct success response should be "Succeeded", but this has already shipped. Still, handle "Succeeded" just in case. diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_operations/_patch.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_patch.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_patch.py index 328611823d0c..86cb220477c3 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_patch.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from copy import deepcopy from enum import Enum from typing import Any, IO, List, MutableMapping, overload, Union diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_operations/_patch.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_operations/_patch.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_patch.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_patch.py index 90e38f70716d..b8fe518e282f 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_patch.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Awaitable, IO, List, MutableMapping, overload, Union from azure.core.credentials_async import AsyncTokenCredential @@ -28,7 +29,6 @@ from ..models import CertificateInfo, SecurityDomain from .._patch import DEFAULT_VERSION, _format_api_version, _SERIALIZER - JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object __all__: List[str] = [ diff --git a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/models/_patch.py b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/models/_patch.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/azure/keyvault/securitydomain/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-keyvault-securitydomain/setup.py b/sdk/keyvault/azure-keyvault-securitydomain/setup.py index 227484eaaeda..2049af4b13a0 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/setup.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-keyvault-securitydomain" PACKAGE_PPRINT_NAME = "Azure Keyvault Securitydomain" diff --git a/sdk/keyvault/azure-keyvault-securitydomain/tests/jwe.py b/sdk/keyvault/azure-keyvault-securitydomain/tests/jwe.py index f756fa9ca0d9..8348a8c388c3 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/tests/jwe.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/tests/jwe.py @@ -42,15 +42,15 @@ def to_big_endian_64bits(value): @staticmethod def test_sp800_108(): - label = 'label' - context = 'context' + label = "label" + context = "context" bit_length = 256 - hex_result = 'f0ca51f6308791404bf68b56024ee7c64d6c737716f81d47e1e68b5c4e399575' + hex_result = "f0ca51f6308791404bf68b56024ee7c64d6c737716f81d47e1e68b5c4e399575" key = bytearray() key.extend([0x41] * 32) new_key = KDF.sp800_108(key, label, context, bit_length) - hex_value = new_key.hex().replace('-', '') # type: ignore + hex_value = new_key.hex().replace("-", "") # type: ignore return hex_value.lower() == hex_result @staticmethod @@ -88,9 +88,9 @@ def sp800_108(key_in: bytearray, label: str, context: str, bit_length): n += 1 hmac_data_suffix = bytearray() - hmac_data_suffix.extend(label.encode('UTF-8')) + hmac_data_suffix.extend(label.encode("UTF-8")) hmac_data_suffix.append(0) - hmac_data_suffix.extend(context.encode('UTF-8')) + hmac_data_suffix.extend(context.encode("UTF-8")) hmac_data_suffix.extend(KDF.to_big_endian_32bits(bit_length)) out_value = bytearray() @@ -105,18 +105,31 @@ def sp800_108(key_in: bytearray, label: str, context: str, bit_length): out_value.extend(hash_value) bytes_needed -= len(hash_value) else: - out_value.extend(hash_value[len(out_value): len(out_value) + bytes_needed]) + out_value.extend(hash_value[len(out_value) : len(out_value) + bytes_needed]) return out_value return None class JWEHeader: # pylint: disable=too-many-instance-attributes - _fields = ['alg', 'enc', 'zip', 'jku', 'jwk', 'kid', 'x5u', 'x5c', 'x5t', 'x5t_S256', 'typ', 'cty', 'crit'] - - def __init__(self, alg=None, enc=None, zip=None, # pylint: disable=redefined-builtin - jku=None, jwk=None, kid=None, x5u=None, x5c=None, x5t=None, - x5t_S256=None, typ=None, cty=None, crit=None): + _fields = ["alg", "enc", "zip", "jku", "jwk", "kid", "x5u", "x5c", "x5t", "x5t_S256", "typ", "cty", "crit"] + + def __init__( + self, + alg=None, + enc=None, + zip=None, # pylint: disable=redefined-builtin + jku=None, + jwk=None, + kid=None, + x5u=None, + x5c=None, + x5t=None, + x5t_S256=None, + typ=None, + cty=None, + crit=None, + ): """ JWE header @@ -153,8 +166,8 @@ def from_json_str(json_str): json_dict = json.loads(json_str) jwe_header = JWEHeader() for k in jwe_header._fields: - if k == 'x5t_S256': - v = json_dict.get('x5t#S256', None) + if k == "x5t_S256": + v = json_dict.get("x5t#S256", None) else: v = json_dict.get(k, None) if v is not None: @@ -166,8 +179,8 @@ def to_json_str(self): for k in self._fields: v = getattr(self, k, None) if v is not None: - if k == 'x5t_S256': - json_dict['x5t#S256'] = v + if k == "x5t_S256": + json_dict["x5t#S256"] = v else: json_dict[k] = v return json.dumps(json_dict) @@ -176,46 +189,46 @@ def to_json_str(self): class JWEDecode: def __init__(self, compact_jwe=None): if compact_jwe is None: - self.encoded_header = '' + self.encoded_header = "" self.encrypted_key = None self.init_vector = None self.ciphertext = None self.auth_tag = None self.protected_header = JWEHeader() else: - parts = compact_jwe.split('.') + parts = compact_jwe.split(".") self.encoded_header = parts[0] - header = base64.urlsafe_b64decode(self.encoded_header + '===').decode('ascii') # Fix incorrect padding + header = base64.urlsafe_b64decode(self.encoded_header + "===").decode("ascii") # Fix incorrect padding self.protected_header = JWEHeader.from_json_str(header) - self.encrypted_key = base64.urlsafe_b64decode(parts[1] + '===') - self.init_vector = base64.urlsafe_b64decode(parts[2] + '===') - self.ciphertext = base64.urlsafe_b64decode(parts[3] + '===') - self.auth_tag = base64.urlsafe_b64decode(parts[4] + '===') + self.encrypted_key = base64.urlsafe_b64decode(parts[1] + "===") + self.init_vector = base64.urlsafe_b64decode(parts[2] + "===") + self.ciphertext = base64.urlsafe_b64decode(parts[3] + "===") + self.auth_tag = base64.urlsafe_b64decode(parts[4] + "===") def encode_header(self): header_json = self.protected_header.to_json_str().replace('": ', '":').replace('", ', '",') - self.encoded_header = Utils.security_domain_b64_url_encode(header_json.encode('ascii')) + self.encoded_header = Utils.security_domain_b64_url_encode(header_json.encode("ascii")) def encode_compact(self): - ret = [self.encoded_header + '.'] + ret = [self.encoded_header + "."] if self.encrypted_key is not None: ret.append(Utils.security_domain_b64_url_encode(self.encrypted_key)) - ret.append('.') + ret.append(".") if self.init_vector is not None: ret.append(Utils.security_domain_b64_url_encode(self.init_vector)) - ret.append('.') + ret.append(".") if self.ciphertext is not None: ret.append(Utils.security_domain_b64_url_encode(self.ciphertext)) - ret.append('.') + ret.append(".") if self.auth_tag is not None: ret.append(Utils.security_domain_b64_url_encode(self.auth_tag)) - return ''.join(ret) + return "".join(ret) class JWE: @@ -228,26 +241,25 @@ def encode_compact(self): def get_padding_mode(self): alg = self.jwe_decode.protected_header.alg - if alg == 'RSA-OAEP-256': + if alg == "RSA-OAEP-256": algorithm = hashes.SHA256() return asymmetric_padding.OAEP( - mgf=asymmetric_padding.MGF1(algorithm=algorithm), algorithm=algorithm, label=None) + mgf=asymmetric_padding.MGF1(algorithm=algorithm), algorithm=algorithm, label=None + ) - if alg == 'RSA-OAEP': + if alg == "RSA-OAEP": algorithm = hashes.SHA1() return asymmetric_padding.OAEP( - mgf=asymmetric_padding.MGF1(algorithm=algorithm), algorithm=algorithm, label=None) + mgf=asymmetric_padding.MGF1(algorithm=algorithm), algorithm=algorithm, label=None + ) - if alg == 'RSA1_5': + if alg == "RSA1_5": return asymmetric_padding.PKCS1v15() return None def get_cek(self, private_key): - return private_key.decrypt( - self.jwe_decode.encrypted_key, - self.get_padding_mode() - ) + return private_key.decrypt(self.jwe_decode.encrypted_key, self.get_padding_mode()) def set_cek(self, cert, cek): public_key = cert.public_key() @@ -269,7 +281,7 @@ def hmac_key_from_cek(cek): def get_mac(self, hk): header_bytes = bytearray() - header_bytes.extend(self.jwe_decode.encoded_header.encode('ascii')) + header_bytes.extend(self.jwe_decode.encoded_header.encode("ascii")) auth_bits = len(header_bytes) * 8 hash_data = bytearray() @@ -289,7 +301,7 @@ def Aes256HmacSha512Decrypt(self, cek): test = 0 i = 0 while i < len(self.jwe_decode.auth_tag) == 32: # type: ignore - test |= (self.jwe_decode.auth_tag[i] ^ mac_value[i]) # type: ignore + test |= self.jwe_decode.auth_tag[i] ^ mac_value[i] # type: ignore i += 1 if test != 0: @@ -326,7 +338,7 @@ def Aes256HmacSha512Encrypt(self, cek, plaintext): self.jwe_decode.auth_tag.append(mac_value[i]) # type: ignore def decrypt_using_bytes(self, cek): - if self.jwe_decode.protected_header.enc == 'A256CBC-HS512': + if self.jwe_decode.protected_header.enc == "A256CBC-HS512": return self.Aes256HmacSha512Decrypt(cek) return None @@ -339,17 +351,17 @@ def decrypt_using_private_key(self, private_key): def encrypt_using_bytes(self, cek, plaintext, alg_id, kid=None): if kid is not None: - self.jwe_decode.protected_header.alg = 'dir' + self.jwe_decode.protected_header.alg = "dir" self.jwe_decode.protected_header.kid = kid - if alg_id == 'A256CBC-HS512': + if alg_id == "A256CBC-HS512": self.jwe_decode.protected_header.enc = alg_id self.jwe_decode.encode_header() self.Aes256HmacSha512Encrypt(cek, plaintext) def encrypt_using_cert(self, cert, plaintext): - self.jwe_decode.protected_header.alg = 'RSA-OAEP-256' - self.jwe_decode.protected_header.kid = 'not used' + self.jwe_decode.protected_header.alg = "RSA-OAEP-256" + self.jwe_decode.protected_header.kid = "not used" cek = Utils.get_random(64) self.set_cek(cert, cek) - self.encrypt_using_bytes(cek, plaintext, alg_id='A256CBC-HS512') + self.encrypt_using_bytes(cek, plaintext, alg_id="A256CBC-HS512") diff --git a/sdk/keyvault/azure-keyvault-securitydomain/tests/utils.py b/sdk/keyvault/azure-keyvault-securitydomain/tests/utils.py index edcfc3713701..0ab62b4b20e3 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/tests/utils.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/tests/utils.py @@ -14,7 +14,6 @@ from cryptography.hazmat.primitives.serialization import Encoding from cryptography.x509 import load_pem_x509_certificate - PATH_PREFIX = os.path.abspath(os.path.join(os.path.abspath(__file__), os.pardir, "resources")) CERT_PATH_PREFIX = f"{PATH_PREFIX}/certificate" SECURITY_DOMAIN_PATH = f"{PATH_PREFIX}/security-domain.json" diff --git a/sdk/keyvault/azure-keyvault-securitydomain/tests/wrapping.py b/sdk/keyvault/azure-keyvault-securitydomain/tests/wrapping.py index 871f4e7c0511..1b02b16b26ad 100644 --- a/sdk/keyvault/azure-keyvault-securitydomain/tests/wrapping.py +++ b/sdk/keyvault/azure-keyvault-securitydomain/tests/wrapping.py @@ -17,7 +17,6 @@ from jwe import JWE, KDF from utils import Utils - PATH_PREFIX = os.path.abspath(os.path.join(os.path.abspath(__file__), os.pardir, "resources")) CERT_PATH_PREFIX = f"{PATH_PREFIX}/certificate" SECURITY_DOMAIN_PATH = f"{PATH_PREFIX}/security-domain.json" @@ -27,7 +26,7 @@ class ModMath: @staticmethod def reduce(x): - t = (x & 0xff) - (x >> 8) + t = (x & 0xFF) - (x >> 8) t += (t >> 31) & 257 return t @@ -64,7 +63,7 @@ def __init__(self, x, v): @staticmethod def from_uint16(w): x = w >> 9 - v = w & 0x1ff + v = w & 0x1FF return Share(x, v) def to_uint16(self): @@ -77,7 +76,7 @@ def __init__(self, required, secret_byte): @staticmethod def init_coefficients(required, secret_byte): - coefficients = array.array('H') + coefficients = array.array("H") for _ in range(required - 1): coefficients.append(ModMath.get_random()) coefficients.append(secret_byte) @@ -125,7 +124,7 @@ def __init__(self, shares=None, required=0): shares = 0 else: if shares > SharedSecret.max_shares or required > shares: - raise ValueError('Incorrect share or required count.') + raise ValueError("Incorrect share or required count.") self.shares = shares self.required = required @@ -147,7 +146,7 @@ def make_shares(self, plaintext): share_array = self.make_byte_shares(p) for sa in share_array: if i == 0: - share_arrays.append(array.array('H')) + share_arrays.append(array.array("H")) current_share_array = sa current_share_array.append(sa) return share_arrays @@ -162,7 +161,7 @@ def get_plaintext(share_arrays, required): plaintext_len = len(share_arrays[0]) for j in range(plaintext_len): - sv = array.array('H') + sv = array.array("H") for i in range(required): sa = share_arrays[i] sv.append(sa[j]) @@ -179,10 +178,7 @@ def __init__(self, enc_key=None, x5t_256=None): self.x5t_256 = x5t_256 def to_json(self): - return { - 'enc_key': self.enc_key if self.enc_key else '', - 'x5t_256': self.x5t_256 if self.x5t_256 else '' - } + return {"enc_key": self.enc_key if self.enc_key else "", "x5t_256": self.x5t_256 if self.x5t_256 else ""} class EncData: @@ -191,10 +187,7 @@ def __init__(self): self.kdf = None def to_json(self): - return { - 'data': [x.to_json() for x in self.data], - 'kdf': self.kdf if self.kdf else '' - } + return {"data": [x.to_json() for x in self.data], "kdf": self.kdf if self.kdf else ""} class Datum: @@ -203,10 +196,7 @@ def __init__(self, compact_jwe=None, tag=None): self.tag = tag def to_json(self): - return { - 'compact_jwe': self.compact_jwe if self.compact_jwe else '', - 'tag': self.tag if self.tag else '' - } + return {"compact_jwe": self.compact_jwe if self.compact_jwe else "", "tag": self.tag if self.tag else ""} class SecurityDomainRestoreData: @@ -215,10 +205,7 @@ def __init__(self): self.wrapped_key = Key() def to_json(self): - return { - 'EncData': self.enc_data.to_json(), - 'WrappedKey': self.wrapped_key.to_json() - } + return {"EncData": self.enc_data.to_json(), "WrappedKey": self.wrapped_key.to_json()} def _security_domain_gen_share_arrays(sd_wrapping_keys, shared_keys, required): @@ -230,21 +217,21 @@ def _security_domain_gen_share_arrays(sd_wrapping_keys, shared_keys, required): if ok: break - prefix = '.'.join(private_key_path.split('.')[:-1]) - cert_path = prefix + '.cer' + prefix = ".".join(private_key_path.split(".")[:-1]) + cert_path = prefix + ".cer" - with open(private_key_path, 'rb') as f: + with open(private_key_path, "rb") as f: pem_data = f.read() private_key = load_pem_private_key(pem_data, password=None, backend=default_backend()) - with open(cert_path, 'rb') as f: + with open(cert_path, "rb") as f: pem_data = f.read() cert = load_pem_x509_certificate(pem_data, backend=default_backend()) public_bytes = cert.public_bytes(Encoding.DER) x5tS256 = Utils.security_domain_b64_url_encode(hashlib.sha256(public_bytes).digest()) - for item in shared_keys['enc_shares']: - if x5tS256 == item['x5t_256']: - jwe = JWE(compact_jwe=item['enc_key']) + for item in shared_keys["enc_shares"]: + if x5tS256 == item["x5t_256"]: + jwe = JWE(compact_jwe=item["enc_key"]) share = jwe.decrypt_using_private_key(private_key) if not share: continue @@ -262,27 +249,27 @@ def _security_domain_gen_blob(transfer_key, share_arrays, enc_data, required): master_key = SharedSecret.get_plaintext(share_arrays, required=required) plaintext_list = [] - for item in enc_data['data']: - compact_jwe = item['compact_jwe'] - tag = item['tag'] - enc_key = KDF.sp800_108(master_key, label=tag, context='', bit_length=512) + for item in enc_data["data"]: + compact_jwe = item["compact_jwe"] + tag = item["tag"] + enc_key = KDF.sp800_108(master_key, label=tag, context="", bit_length=512) jwe_data = JWE(compact_jwe) plaintext = jwe_data.decrypt_using_bytes(enc_key) plaintext_list.append((plaintext, tag)) # encrypt security_domain_restore_data = SecurityDomainRestoreData() - security_domain_restore_data.enc_data.kdf = 'sp108_kdf' # type: ignore + security_domain_restore_data.enc_data.kdf = "sp108_kdf" # type: ignore master_key = Utils.get_random(32) for plaintext, tag in plaintext_list: - enc_key = KDF.sp800_108(master_key, label=tag, context='', bit_length=512) + enc_key = KDF.sp800_108(master_key, label=tag, context="", bit_length=512) jwe = JWE() - jwe.encrypt_using_bytes(enc_key, plaintext, alg_id='A256CBC-HS512', kid=tag) + jwe.encrypt_using_bytes(enc_key, plaintext, alg_id="A256CBC-HS512", kid=tag) datum = Datum(compact_jwe=jwe.encode_compact(), tag=tag) security_domain_restore_data.enc_data.data.append(datum) - with open(transfer_key, 'rb') as f: + with open(transfer_key, "rb") as f: pem_data = f.read() exchange_cert = load_pem_x509_certificate(pem_data, backend=default_backend()) @@ -304,22 +291,23 @@ def _security_domain_restore_blob(sd_file, transfer_key, sd_wrapping_keys): """Using the wrapping keys, prepare the security domain for upload.""" with open(sd_file) as f: sd_data = json.load(f) - if not sd_data or 'EncData' not in sd_data or 'SharedKeys' not in sd_data: - raise ValueError('Invalid SD file.') - enc_data = sd_data['EncData'] - shared_keys = sd_data['SharedKeys'] - required = shared_keys['required'] + if not sd_data or "EncData" not in sd_data or "SharedKeys" not in sd_data: + raise ValueError("Invalid SD file.") + enc_data = sd_data["EncData"] + shared_keys = sd_data["SharedKeys"] + required = shared_keys["required"] restore_blob_value = _security_domain_make_restore_blob( sd_wrapping_keys=sd_wrapping_keys, transfer_key=transfer_key, enc_data=enc_data, shared_keys=shared_keys, - required=required + required=required, ) return restore_blob_value + def use_wrapping_keys() -> dict: key_paths = [f"{CERT_PATH_PREFIX}0.pem", f"{CERT_PATH_PREFIX}1.pem"] blob_value = _security_domain_restore_blob(SECURITY_DOMAIN_PATH, TRANSFER_KEY_PATH, key_paths) - return {'value': blob_value} + return {"value": blob_value} diff --git a/sdk/keyvault/azure-keyvault/setup.py b/sdk/keyvault/azure-keyvault/setup.py index d847a08ecbaa..c4cf374727dc 100644 --- a/sdk/keyvault/azure-keyvault/setup.py +++ b/sdk/keyvault/azure-keyvault/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from setuptools import setup from io import open @@ -15,32 +15,32 @@ CHANGELOG = f.read() setup( - name='azure-keyvault', - version='4.2.0', - description='Microsoft Azure Key Vault Client Libraries for Python', + name="azure-keyvault", + version="4.2.0", + description="Microsoft Azure Key Vault Client Libraries for Python", long_description=README + "\n\n" + CHANGELOG, long_description_content_type="text/markdown", - license='MIT License', - author='Microsoft Corporation', + license="MIT License", + author="Microsoft Corporation", author_email="azurekeyvault@microsoft.com", url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/keyvault/azure-keyvault", keywords="azure, azure sdk", classifiers=[ "Development Status :: 5 - Production/Stable", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", ], zip_safe=False, install_requires=[ - 'azure-keyvault-certificates~=4.4', - 'azure-keyvault-secrets~=4.4', - 'azure-keyvault-keys~=4.5', + "azure-keyvault-certificates~=4.4", + "azure-keyvault-secrets~=4.4", + "azure-keyvault-keys~=4.5", ], ) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_patch.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_patch.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_patch.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_patch.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_patch.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_patch.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_patch.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_patch.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_patch.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_patch.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/setup.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/setup.py index ba737eaa55b7..9a4ba7d5574a 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/setup.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/azure/mgmt/kubernetesconfiguration/extensiontypes/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/setup.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/setup.py index 408532c9dbdf..e24e1a4a6d71 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/setup.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensiontypes/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/azure/mgmt/kubernetesconfiguration/fluxconfigurations/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/setup.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/setup.py index d1b19cf1a1db..1579ddde9660 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/setup.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-fluxconfigurations/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/azure/mgmt/kubernetesconfiguration/privatelinkscopes/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/setup.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/setup.py index a6a24cc6936b..ca60267d547a 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/setup.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-privatelinkscopes/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/__init__.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/__init__.py index 05bac22d8ecf..87be23cd0d43 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/__init__.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- from ._source_control_configuration_client import SourceControlConfigurationClient -__all__ = ['SourceControlConfigurationClient'] + +__all__ = ["SourceControlConfigurationClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_configuration.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_configuration.py index ece4e8f4f3ec..df3888169f20 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_configuration.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_configuration.py @@ -20,6 +20,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class SourceControlConfigurationClientConfiguration(Configuration): """Configuration for SourceControlConfigurationClient. @@ -32,12 +33,7 @@ class SourceControlConfigurationClientConfiguration(Configuration): :type subscription_id: str """ - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - **kwargs: Any - ): + def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any): if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -46,22 +42,21 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-mgmt-kubernetesconfiguration/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "azure-mgmt-kubernetesconfiguration/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ): - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any): + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_serialization.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_serialization.py index a00658b1fc19..4bae2292227b 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_serialization.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_serialization.py @@ -356,9 +356,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[ - [str, Dict[str, Any], Any], Any - ] = attribute_transformer, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -547,7 +545,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]]=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -754,7 +752,7 @@ def query(self, name, data, data_type, **kwargs): # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - do_quote = not kwargs.get('skip_quote', False) + do_quote = not kwargs.get("skip_quote", False) return str(self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs)) # Not a list, regular serialization @@ -913,12 +911,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): raise serialized.append(None) - if kwargs.get('do_quote', False): - serialized = [ - '' if s is None else quote(str(s), safe='') - for s - in serialized - ] + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] if div: serialized = ["" if s is None else str(s) for s in serialized] @@ -1377,7 +1371,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]]=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py index fc4b01f2b29e..2a1350db74fb 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -29,6 +30,7 @@ def __init__(self, *args, **kwargs): """ pass + class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient): """KubernetesConfiguration Client. @@ -53,39 +55,38 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2023-05-01' + DEFAULT_API_VERSION = "2023-05-01" _PROFILE_TAG = "azure.mgmt.kubernetesconfiguration.SourceControlConfigurationClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'cluster_extension_type': '2022-01-15-preview', - 'cluster_extension_types': '2022-01-15-preview', - 'extension_type_versions': '2022-01-15-preview', - 'location_extension_types': '2022-01-15-preview', - 'private_endpoint_connections': '2022-04-02-preview', - 'private_link_resources': '2022-04-02-preview', - 'private_link_scopes': '2022-04-02-preview', - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + "cluster_extension_type": "2022-01-15-preview", + "cluster_extension_types": "2022-01-15-preview", + "extension_type_versions": "2022-01-15-preview", + "location_extension_types": "2022-01-15-preview", + "private_endpoint_connections": "2022-04-02-preview", + "private_link_resources": "2022-04-02-preview", + "private_link_scopes": "2022-04-02-preview", + } + }, + _PROFILE_TAG + " latest", ) def __init__( self, credential: "TokenCredential", subscription_id: str, - api_version: Optional[str]=None, + api_version: Optional[str] = None, base_url: str = "https://management.azure.com", - profile: KnownProfiles=KnownProfiles.default, + profile: KnownProfiles = KnownProfiles.default, **kwargs: Any ): if api_version: - kwargs.setdefault('api_version', api_version) + kwargs.setdefault("api_version", api_version) self._config = SourceControlConfigurationClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(SourceControlConfigurationClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(SourceControlConfigurationClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -95,58 +96,71 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2020-07-01-preview: :mod:`v2020_07_01_preview.models` - * 2020-10-01-preview: :mod:`v2020_10_01_preview.models` - * 2021-03-01: :mod:`v2021_03_01.models` - * 2021-05-01-preview: :mod:`v2021_05_01_preview.models` - * 2021-09-01: :mod:`v2021_09_01.models` - * 2021-11-01-preview: :mod:`v2021_11_01_preview.models` - * 2022-01-01-preview: :mod:`v2022_01_01_preview.models` - * 2022-01-15-preview: :mod:`v2022_01_15_preview.models` - * 2022-03-01: :mod:`v2022_03_01.models` - * 2022-04-02-preview: :mod:`v2022_04_02_preview.models` - * 2022-07-01: :mod:`v2022_07_01.models` - * 2022-11-01: :mod:`v2022_11_01.models` - * 2023-05-01: :mod:`v2023_05_01.models` + * 2020-07-01-preview: :mod:`v2020_07_01_preview.models` + * 2020-10-01-preview: :mod:`v2020_10_01_preview.models` + * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-05-01-preview: :mod:`v2021_05_01_preview.models` + * 2021-09-01: :mod:`v2021_09_01.models` + * 2021-11-01-preview: :mod:`v2021_11_01_preview.models` + * 2022-01-01-preview: :mod:`v2022_01_01_preview.models` + * 2022-01-15-preview: :mod:`v2022_01_15_preview.models` + * 2022-03-01: :mod:`v2022_03_01.models` + * 2022-04-02-preview: :mod:`v2022_04_02_preview.models` + * 2022-07-01: :mod:`v2022_07_01.models` + * 2022-11-01: :mod:`v2022_11_01.models` + * 2023-05-01: :mod:`v2023_05_01.models` """ - if api_version == '2020-07-01-preview': + if api_version == "2020-07-01-preview": from .v2020_07_01_preview import models + return models - elif api_version == '2020-10-01-preview': + elif api_version == "2020-10-01-preview": from .v2020_10_01_preview import models + return models - elif api_version == '2021-03-01': + elif api_version == "2021-03-01": from .v2021_03_01 import models + return models - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from .v2021_05_01_preview import models + return models - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from .v2021_09_01 import models + return models - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview import models + return models - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview import models + return models - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from .v2022_01_15_preview import models + return models - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01 import models + return models - elif api_version == '2022-04-02-preview': + elif api_version == "2022-04-02-preview": from .v2022_04_02_preview import models + return models - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01 import models + return models - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01 import models + return models - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @@ -154,362 +168,458 @@ def models(cls, api_version=DEFAULT_API_VERSION): def cluster_extension_type(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`ClusterExtensionTypeOperations` - * 2021-11-01-preview: :class:`ClusterExtensionTypeOperations` - * 2022-01-01-preview: :class:`ClusterExtensionTypeOperations` - * 2022-01-15-preview: :class:`ClusterExtensionTypeOperations` + * 2021-05-01-preview: :class:`ClusterExtensionTypeOperations` + * 2021-11-01-preview: :class:`ClusterExtensionTypeOperations` + * 2022-01-01-preview: :class:`ClusterExtensionTypeOperations` + * 2022-01-15-preview: :class:`ClusterExtensionTypeOperations` """ - api_version = self._get_api_version('cluster_extension_type') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("cluster_extension_type") + if api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import ClusterExtensionTypeOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import ClusterExtensionTypeOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import ClusterExtensionTypeOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from .v2022_01_15_preview.operations import ClusterExtensionTypeOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'cluster_extension_type'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'cluster_extension_type'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def cluster_extension_types(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`ClusterExtensionTypesOperations` - * 2021-11-01-preview: :class:`ClusterExtensionTypesOperations` - * 2022-01-01-preview: :class:`ClusterExtensionTypesOperations` - * 2022-01-15-preview: :class:`ClusterExtensionTypesOperations` + * 2021-05-01-preview: :class:`ClusterExtensionTypesOperations` + * 2021-11-01-preview: :class:`ClusterExtensionTypesOperations` + * 2022-01-01-preview: :class:`ClusterExtensionTypesOperations` + * 2022-01-15-preview: :class:`ClusterExtensionTypesOperations` """ - api_version = self._get_api_version('cluster_extension_types') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("cluster_extension_types") + if api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import ClusterExtensionTypesOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import ClusterExtensionTypesOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import ClusterExtensionTypesOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from .v2022_01_15_preview.operations import ClusterExtensionTypesOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'cluster_extension_types'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'cluster_extension_types'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def extension_type_versions(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`ExtensionTypeVersionsOperations` - * 2021-11-01-preview: :class:`ExtensionTypeVersionsOperations` - * 2022-01-01-preview: :class:`ExtensionTypeVersionsOperations` - * 2022-01-15-preview: :class:`ExtensionTypeVersionsOperations` + * 2021-05-01-preview: :class:`ExtensionTypeVersionsOperations` + * 2021-11-01-preview: :class:`ExtensionTypeVersionsOperations` + * 2022-01-01-preview: :class:`ExtensionTypeVersionsOperations` + * 2022-01-15-preview: :class:`ExtensionTypeVersionsOperations` """ - api_version = self._get_api_version('extension_type_versions') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("extension_type_versions") + if api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import ExtensionTypeVersionsOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import ExtensionTypeVersionsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import ExtensionTypeVersionsOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from .v2022_01_15_preview.operations import ExtensionTypeVersionsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'extension_type_versions'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'extension_type_versions'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def extensions(self): """Instance depends on the API version: - * 2020-07-01-preview: :class:`ExtensionsOperations` - * 2021-05-01-preview: :class:`ExtensionsOperations` - * 2021-09-01: :class:`ExtensionsOperations` - * 2021-11-01-preview: :class:`ExtensionsOperations` - * 2022-01-01-preview: :class:`ExtensionsOperations` - * 2022-03-01: :class:`ExtensionsOperations` - * 2022-04-02-preview: :class:`ExtensionsOperations` - * 2022-07-01: :class:`ExtensionsOperations` - * 2022-11-01: :class:`ExtensionsOperations` - * 2023-05-01: :class:`ExtensionsOperations` + * 2020-07-01-preview: :class:`ExtensionsOperations` + * 2021-05-01-preview: :class:`ExtensionsOperations` + * 2021-09-01: :class:`ExtensionsOperations` + * 2021-11-01-preview: :class:`ExtensionsOperations` + * 2022-01-01-preview: :class:`ExtensionsOperations` + * 2022-03-01: :class:`ExtensionsOperations` + * 2022-04-02-preview: :class:`ExtensionsOperations` + * 2022-07-01: :class:`ExtensionsOperations` + * 2022-11-01: :class:`ExtensionsOperations` + * 2023-05-01: :class:`ExtensionsOperations` """ - api_version = self._get_api_version('extensions') - if api_version == '2020-07-01-preview': + api_version = self._get_api_version("extensions") + if api_version == "2020-07-01-preview": from .v2020_07_01_preview.operations import ExtensionsOperations as OperationClass - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import ExtensionsOperations as OperationClass - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from .v2021_09_01.operations import ExtensionsOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-04-02-preview': + elif api_version == "2022-04-02-preview": from .v2022_04_02_preview.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01.operations import ExtensionsOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01.operations import ExtensionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'extensions'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def flux_config_operation_status(self): """Instance depends on the API version: - * 2021-11-01-preview: :class:`FluxConfigOperationStatusOperations` - * 2022-01-01-preview: :class:`FluxConfigOperationStatusOperations` - * 2022-03-01: :class:`FluxConfigOperationStatusOperations` - * 2022-07-01: :class:`FluxConfigOperationStatusOperations` - * 2022-11-01: :class:`FluxConfigOperationStatusOperations` - * 2023-05-01: :class:`FluxConfigOperationStatusOperations` + * 2021-11-01-preview: :class:`FluxConfigOperationStatusOperations` + * 2022-01-01-preview: :class:`FluxConfigOperationStatusOperations` + * 2022-03-01: :class:`FluxConfigOperationStatusOperations` + * 2022-07-01: :class:`FluxConfigOperationStatusOperations` + * 2022-11-01: :class:`FluxConfigOperationStatusOperations` + * 2023-05-01: :class:`FluxConfigOperationStatusOperations` """ - api_version = self._get_api_version('flux_config_operation_status') - if api_version == '2021-11-01-preview': + api_version = self._get_api_version("flux_config_operation_status") + if api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01.operations import FluxConfigOperationStatusOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'flux_config_operation_status'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'flux_config_operation_status'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def flux_configurations(self): """Instance depends on the API version: - * 2021-11-01-preview: :class:`FluxConfigurationsOperations` - * 2022-01-01-preview: :class:`FluxConfigurationsOperations` - * 2022-03-01: :class:`FluxConfigurationsOperations` - * 2022-07-01: :class:`FluxConfigurationsOperations` - * 2022-11-01: :class:`FluxConfigurationsOperations` - * 2023-05-01: :class:`FluxConfigurationsOperations` + * 2021-11-01-preview: :class:`FluxConfigurationsOperations` + * 2022-01-01-preview: :class:`FluxConfigurationsOperations` + * 2022-03-01: :class:`FluxConfigurationsOperations` + * 2022-07-01: :class:`FluxConfigurationsOperations` + * 2022-11-01: :class:`FluxConfigurationsOperations` + * 2023-05-01: :class:`FluxConfigurationsOperations` """ - api_version = self._get_api_version('flux_configurations') - if api_version == '2021-11-01-preview': + api_version = self._get_api_version("flux_configurations") + if api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01.operations import FluxConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'flux_configurations'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def location_extension_types(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`LocationExtensionTypesOperations` - * 2021-11-01-preview: :class:`LocationExtensionTypesOperations` - * 2022-01-01-preview: :class:`LocationExtensionTypesOperations` - * 2022-01-15-preview: :class:`LocationExtensionTypesOperations` + * 2021-05-01-preview: :class:`LocationExtensionTypesOperations` + * 2021-11-01-preview: :class:`LocationExtensionTypesOperations` + * 2022-01-01-preview: :class:`LocationExtensionTypesOperations` + * 2022-01-15-preview: :class:`LocationExtensionTypesOperations` """ - api_version = self._get_api_version('location_extension_types') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("location_extension_types") + if api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import LocationExtensionTypesOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import LocationExtensionTypesOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import LocationExtensionTypesOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from .v2022_01_15_preview.operations import LocationExtensionTypesOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'location_extension_types'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'location_extension_types'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def operation_status(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`OperationStatusOperations` - * 2021-09-01: :class:`OperationStatusOperations` - * 2021-11-01-preview: :class:`OperationStatusOperations` - * 2022-01-01-preview: :class:`OperationStatusOperations` - * 2022-03-01: :class:`OperationStatusOperations` - * 2022-04-02-preview: :class:`OperationStatusOperations` - * 2022-07-01: :class:`OperationStatusOperations` - * 2022-11-01: :class:`OperationStatusOperations` - * 2023-05-01: :class:`OperationStatusOperations` + * 2021-05-01-preview: :class:`OperationStatusOperations` + * 2021-09-01: :class:`OperationStatusOperations` + * 2021-11-01-preview: :class:`OperationStatusOperations` + * 2022-01-01-preview: :class:`OperationStatusOperations` + * 2022-03-01: :class:`OperationStatusOperations` + * 2022-04-02-preview: :class:`OperationStatusOperations` + * 2022-07-01: :class:`OperationStatusOperations` + * 2022-11-01: :class:`OperationStatusOperations` + * 2023-05-01: :class:`OperationStatusOperations` """ - api_version = self._get_api_version('operation_status') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("operation_status") + if api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import OperationStatusOperations as OperationClass - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from .v2021_09_01.operations import OperationStatusOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-04-02-preview': + elif api_version == "2022-04-02-preview": from .v2022_04_02_preview.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01.operations import OperationStatusOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01.operations import OperationStatusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'operation_status'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def operations(self): """Instance depends on the API version: - * 2020-07-01-preview: :class:`Operations` - * 2020-10-01-preview: :class:`Operations` - * 2021-03-01: :class:`Operations` - * 2021-05-01-preview: :class:`Operations` - * 2021-09-01: :class:`Operations` - * 2021-11-01-preview: :class:`Operations` - * 2022-01-01-preview: :class:`Operations` - * 2022-03-01: :class:`Operations` - * 2022-07-01: :class:`Operations` - * 2022-11-01: :class:`Operations` - * 2023-05-01: :class:`Operations` + * 2020-07-01-preview: :class:`Operations` + * 2020-10-01-preview: :class:`Operations` + * 2021-03-01: :class:`Operations` + * 2021-05-01-preview: :class:`Operations` + * 2021-09-01: :class:`Operations` + * 2021-11-01-preview: :class:`Operations` + * 2022-01-01-preview: :class:`Operations` + * 2022-03-01: :class:`Operations` + * 2022-07-01: :class:`Operations` + * 2022-11-01: :class:`Operations` + * 2023-05-01: :class:`Operations` """ - api_version = self._get_api_version('operations') - if api_version == '2020-07-01-preview': + api_version = self._get_api_version("operations") + if api_version == "2020-07-01-preview": from .v2020_07_01_preview.operations import Operations as OperationClass - elif api_version == '2020-10-01-preview': + elif api_version == "2020-10-01-preview": from .v2020_10_01_preview.operations import Operations as OperationClass - elif api_version == '2021-03-01': + elif api_version == "2021-03-01": from .v2021_03_01.operations import Operations as OperationClass - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import Operations as OperationClass - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from .v2021_09_01.operations import Operations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import Operations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import Operations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01.operations import Operations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01.operations import Operations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01.operations import Operations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def private_endpoint_connections(self): """Instance depends on the API version: - * 2022-04-02-preview: :class:`PrivateEndpointConnectionsOperations` + * 2022-04-02-preview: :class:`PrivateEndpointConnectionsOperations` """ - api_version = self._get_api_version('private_endpoint_connections') - if api_version == '2022-04-02-preview': + api_version = self._get_api_version("private_endpoint_connections") + if api_version == "2022-04-02-preview": from .v2022_04_02_preview.operations import PrivateEndpointConnectionsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'private_endpoint_connections'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def private_link_resources(self): """Instance depends on the API version: - * 2022-04-02-preview: :class:`PrivateLinkResourcesOperations` + * 2022-04-02-preview: :class:`PrivateLinkResourcesOperations` """ - api_version = self._get_api_version('private_link_resources') - if api_version == '2022-04-02-preview': + api_version = self._get_api_version("private_link_resources") + if api_version == "2022-04-02-preview": from .v2022_04_02_preview.operations import PrivateLinkResourcesOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'private_link_resources'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def private_link_scopes(self): """Instance depends on the API version: - * 2022-04-02-preview: :class:`PrivateLinkScopesOperations` + * 2022-04-02-preview: :class:`PrivateLinkScopesOperations` """ - api_version = self._get_api_version('private_link_scopes') - if api_version == '2022-04-02-preview': + api_version = self._get_api_version("private_link_scopes") + if api_version == "2022-04-02-preview": from .v2022_04_02_preview.operations import PrivateLinkScopesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_scopes'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def source_control_configurations(self): """Instance depends on the API version: - * 2020-07-01-preview: :class:`SourceControlConfigurationsOperations` - * 2020-10-01-preview: :class:`SourceControlConfigurationsOperations` - * 2021-03-01: :class:`SourceControlConfigurationsOperations` - * 2021-05-01-preview: :class:`SourceControlConfigurationsOperations` - * 2021-11-01-preview: :class:`SourceControlConfigurationsOperations` - * 2022-01-01-preview: :class:`SourceControlConfigurationsOperations` - * 2022-03-01: :class:`SourceControlConfigurationsOperations` - * 2022-07-01: :class:`SourceControlConfigurationsOperations` - * 2022-11-01: :class:`SourceControlConfigurationsOperations` - * 2023-05-01: :class:`SourceControlConfigurationsOperations` + * 2020-07-01-preview: :class:`SourceControlConfigurationsOperations` + * 2020-10-01-preview: :class:`SourceControlConfigurationsOperations` + * 2021-03-01: :class:`SourceControlConfigurationsOperations` + * 2021-05-01-preview: :class:`SourceControlConfigurationsOperations` + * 2021-11-01-preview: :class:`SourceControlConfigurationsOperations` + * 2022-01-01-preview: :class:`SourceControlConfigurationsOperations` + * 2022-03-01: :class:`SourceControlConfigurationsOperations` + * 2022-07-01: :class:`SourceControlConfigurationsOperations` + * 2022-11-01: :class:`SourceControlConfigurationsOperations` + * 2023-05-01: :class:`SourceControlConfigurationsOperations` """ - api_version = self._get_api_version('source_control_configurations') - if api_version == '2020-07-01-preview': + api_version = self._get_api_version("source_control_configurations") + if api_version == "2020-07-01-preview": from .v2020_07_01_preview.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2020-10-01-preview': + elif api_version == "2020-10-01-preview": from .v2020_10_01_preview.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': + elif api_version == "2021-03-01": from .v2021_03_01.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from .v2021_05_01_preview.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from .v2021_11_01_preview.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from .v2022_01_01_preview.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from .v2022_03_01.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from .v2022_07_01.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from .v2022_11_01.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from .v2023_05_01.operations import SourceControlConfigurationsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'source_control_configurations'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'source_control_configurations'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) def close(self): self._client.close() + def __enter__(self): self._client.__enter__() return self + def __exit__(self, *exc_details): self._client.__exit__(*exc_details) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/__init__.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/__init__.py index ba52c91a7ba1..4d5787a81f91 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/__init__.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._source_control_configuration_client import SourceControlConfigurationClient -__all__ = ['SourceControlConfigurationClient'] + +__all__ = ["SourceControlConfigurationClient"] diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_configuration.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_configuration.py index f1676e683a70..55d4a7a9c87d 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_configuration.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_configuration.py @@ -20,6 +20,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class SourceControlConfigurationClientConfiguration(Configuration): """Configuration for SourceControlConfigurationClient. @@ -32,12 +33,7 @@ class SourceControlConfigurationClientConfiguration(Configuration): :type subscription_id: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -46,22 +42,21 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-mgmt-kubernetesconfiguration/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "azure-mgmt-kubernetesconfiguration/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_source_control_configuration_client.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_source_control_configuration_client.py index 26722aeb3d63..04a28f93e7a0 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_source_control_configuration_client.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/aio/_source_control_configuration_client.py @@ -22,6 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -29,6 +30,7 @@ def __init__(self, *args, **kwargs): """ pass + class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient): """KubernetesConfiguration Client. @@ -53,20 +55,22 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2023-05-01' + DEFAULT_API_VERSION = "2023-05-01" _PROFILE_TAG = "azure.mgmt.kubernetesconfiguration.SourceControlConfigurationClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'cluster_extension_type': '2022-01-15-preview', - 'cluster_extension_types': '2022-01-15-preview', - 'extension_type_versions': '2022-01-15-preview', - 'location_extension_types': '2022-01-15-preview', - 'private_endpoint_connections': '2022-04-02-preview', - 'private_link_resources': '2022-04-02-preview', - 'private_link_scopes': '2022-04-02-preview', - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + "cluster_extension_type": "2022-01-15-preview", + "cluster_extension_types": "2022-01-15-preview", + "extension_type_versions": "2022-01-15-preview", + "location_extension_types": "2022-01-15-preview", + "private_endpoint_connections": "2022-04-02-preview", + "private_link_resources": "2022-04-02-preview", + "private_link_scopes": "2022-04-02-preview", + } + }, + _PROFILE_TAG + " latest", ) def __init__( @@ -79,13 +83,10 @@ def __init__( **kwargs: Any ) -> None: if api_version: - kwargs.setdefault('api_version', api_version) + kwargs.setdefault("api_version", api_version) self._config = SourceControlConfigurationClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(SourceControlConfigurationClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(SourceControlConfigurationClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -95,58 +96,71 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2020-07-01-preview: :mod:`v2020_07_01_preview.models` - * 2020-10-01-preview: :mod:`v2020_10_01_preview.models` - * 2021-03-01: :mod:`v2021_03_01.models` - * 2021-05-01-preview: :mod:`v2021_05_01_preview.models` - * 2021-09-01: :mod:`v2021_09_01.models` - * 2021-11-01-preview: :mod:`v2021_11_01_preview.models` - * 2022-01-01-preview: :mod:`v2022_01_01_preview.models` - * 2022-01-15-preview: :mod:`v2022_01_15_preview.models` - * 2022-03-01: :mod:`v2022_03_01.models` - * 2022-04-02-preview: :mod:`v2022_04_02_preview.models` - * 2022-07-01: :mod:`v2022_07_01.models` - * 2022-11-01: :mod:`v2022_11_01.models` - * 2023-05-01: :mod:`v2023_05_01.models` + * 2020-07-01-preview: :mod:`v2020_07_01_preview.models` + * 2020-10-01-preview: :mod:`v2020_10_01_preview.models` + * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-05-01-preview: :mod:`v2021_05_01_preview.models` + * 2021-09-01: :mod:`v2021_09_01.models` + * 2021-11-01-preview: :mod:`v2021_11_01_preview.models` + * 2022-01-01-preview: :mod:`v2022_01_01_preview.models` + * 2022-01-15-preview: :mod:`v2022_01_15_preview.models` + * 2022-03-01: :mod:`v2022_03_01.models` + * 2022-04-02-preview: :mod:`v2022_04_02_preview.models` + * 2022-07-01: :mod:`v2022_07_01.models` + * 2022-11-01: :mod:`v2022_11_01.models` + * 2023-05-01: :mod:`v2023_05_01.models` """ - if api_version == '2020-07-01-preview': + if api_version == "2020-07-01-preview": from ..v2020_07_01_preview import models + return models - elif api_version == '2020-10-01-preview': + elif api_version == "2020-10-01-preview": from ..v2020_10_01_preview import models + return models - elif api_version == '2021-03-01': + elif api_version == "2021-03-01": from ..v2021_03_01 import models + return models - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from ..v2021_05_01_preview import models + return models - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from ..v2021_09_01 import models + return models - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview import models + return models - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview import models + return models - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from ..v2022_01_15_preview import models + return models - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01 import models + return models - elif api_version == '2022-04-02-preview': + elif api_version == "2022-04-02-preview": from ..v2022_04_02_preview import models + return models - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01 import models + return models - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01 import models + return models - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @@ -154,362 +168,458 @@ def models(cls, api_version=DEFAULT_API_VERSION): def cluster_extension_type(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`ClusterExtensionTypeOperations` - * 2021-11-01-preview: :class:`ClusterExtensionTypeOperations` - * 2022-01-01-preview: :class:`ClusterExtensionTypeOperations` - * 2022-01-15-preview: :class:`ClusterExtensionTypeOperations` + * 2021-05-01-preview: :class:`ClusterExtensionTypeOperations` + * 2021-11-01-preview: :class:`ClusterExtensionTypeOperations` + * 2022-01-01-preview: :class:`ClusterExtensionTypeOperations` + * 2022-01-15-preview: :class:`ClusterExtensionTypeOperations` """ - api_version = self._get_api_version('cluster_extension_type') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("cluster_extension_type") + if api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import ClusterExtensionTypeOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import ClusterExtensionTypeOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import ClusterExtensionTypeOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from ..v2022_01_15_preview.aio.operations import ClusterExtensionTypeOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'cluster_extension_type'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'cluster_extension_type'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def cluster_extension_types(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`ClusterExtensionTypesOperations` - * 2021-11-01-preview: :class:`ClusterExtensionTypesOperations` - * 2022-01-01-preview: :class:`ClusterExtensionTypesOperations` - * 2022-01-15-preview: :class:`ClusterExtensionTypesOperations` + * 2021-05-01-preview: :class:`ClusterExtensionTypesOperations` + * 2021-11-01-preview: :class:`ClusterExtensionTypesOperations` + * 2022-01-01-preview: :class:`ClusterExtensionTypesOperations` + * 2022-01-15-preview: :class:`ClusterExtensionTypesOperations` """ - api_version = self._get_api_version('cluster_extension_types') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("cluster_extension_types") + if api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import ClusterExtensionTypesOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import ClusterExtensionTypesOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import ClusterExtensionTypesOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from ..v2022_01_15_preview.aio.operations import ClusterExtensionTypesOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'cluster_extension_types'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'cluster_extension_types'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def extension_type_versions(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`ExtensionTypeVersionsOperations` - * 2021-11-01-preview: :class:`ExtensionTypeVersionsOperations` - * 2022-01-01-preview: :class:`ExtensionTypeVersionsOperations` - * 2022-01-15-preview: :class:`ExtensionTypeVersionsOperations` + * 2021-05-01-preview: :class:`ExtensionTypeVersionsOperations` + * 2021-11-01-preview: :class:`ExtensionTypeVersionsOperations` + * 2022-01-01-preview: :class:`ExtensionTypeVersionsOperations` + * 2022-01-15-preview: :class:`ExtensionTypeVersionsOperations` """ - api_version = self._get_api_version('extension_type_versions') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("extension_type_versions") + if api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import ExtensionTypeVersionsOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import ExtensionTypeVersionsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import ExtensionTypeVersionsOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from ..v2022_01_15_preview.aio.operations import ExtensionTypeVersionsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'extension_type_versions'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'extension_type_versions'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def extensions(self): """Instance depends on the API version: - * 2020-07-01-preview: :class:`ExtensionsOperations` - * 2021-05-01-preview: :class:`ExtensionsOperations` - * 2021-09-01: :class:`ExtensionsOperations` - * 2021-11-01-preview: :class:`ExtensionsOperations` - * 2022-01-01-preview: :class:`ExtensionsOperations` - * 2022-03-01: :class:`ExtensionsOperations` - * 2022-04-02-preview: :class:`ExtensionsOperations` - * 2022-07-01: :class:`ExtensionsOperations` - * 2022-11-01: :class:`ExtensionsOperations` - * 2023-05-01: :class:`ExtensionsOperations` + * 2020-07-01-preview: :class:`ExtensionsOperations` + * 2021-05-01-preview: :class:`ExtensionsOperations` + * 2021-09-01: :class:`ExtensionsOperations` + * 2021-11-01-preview: :class:`ExtensionsOperations` + * 2022-01-01-preview: :class:`ExtensionsOperations` + * 2022-03-01: :class:`ExtensionsOperations` + * 2022-04-02-preview: :class:`ExtensionsOperations` + * 2022-07-01: :class:`ExtensionsOperations` + * 2022-11-01: :class:`ExtensionsOperations` + * 2023-05-01: :class:`ExtensionsOperations` """ - api_version = self._get_api_version('extensions') - if api_version == '2020-07-01-preview': + api_version = self._get_api_version("extensions") + if api_version == "2020-07-01-preview": from ..v2020_07_01_preview.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from ..v2021_09_01.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-04-02-preview': + elif api_version == "2022-04-02-preview": from ..v2022_04_02_preview.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01.aio.operations import ExtensionsOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01.aio.operations import ExtensionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'extensions'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def flux_config_operation_status(self): """Instance depends on the API version: - * 2021-11-01-preview: :class:`FluxConfigOperationStatusOperations` - * 2022-01-01-preview: :class:`FluxConfigOperationStatusOperations` - * 2022-03-01: :class:`FluxConfigOperationStatusOperations` - * 2022-07-01: :class:`FluxConfigOperationStatusOperations` - * 2022-11-01: :class:`FluxConfigOperationStatusOperations` - * 2023-05-01: :class:`FluxConfigOperationStatusOperations` + * 2021-11-01-preview: :class:`FluxConfigOperationStatusOperations` + * 2022-01-01-preview: :class:`FluxConfigOperationStatusOperations` + * 2022-03-01: :class:`FluxConfigOperationStatusOperations` + * 2022-07-01: :class:`FluxConfigOperationStatusOperations` + * 2022-11-01: :class:`FluxConfigOperationStatusOperations` + * 2023-05-01: :class:`FluxConfigOperationStatusOperations` """ - api_version = self._get_api_version('flux_config_operation_status') - if api_version == '2021-11-01-preview': + api_version = self._get_api_version("flux_config_operation_status") + if api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'flux_config_operation_status'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'flux_config_operation_status'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def flux_configurations(self): """Instance depends on the API version: - * 2021-11-01-preview: :class:`FluxConfigurationsOperations` - * 2022-01-01-preview: :class:`FluxConfigurationsOperations` - * 2022-03-01: :class:`FluxConfigurationsOperations` - * 2022-07-01: :class:`FluxConfigurationsOperations` - * 2022-11-01: :class:`FluxConfigurationsOperations` - * 2023-05-01: :class:`FluxConfigurationsOperations` + * 2021-11-01-preview: :class:`FluxConfigurationsOperations` + * 2022-01-01-preview: :class:`FluxConfigurationsOperations` + * 2022-03-01: :class:`FluxConfigurationsOperations` + * 2022-07-01: :class:`FluxConfigurationsOperations` + * 2022-11-01: :class:`FluxConfigurationsOperations` + * 2023-05-01: :class:`FluxConfigurationsOperations` """ - api_version = self._get_api_version('flux_configurations') - if api_version == '2021-11-01-preview': + api_version = self._get_api_version("flux_configurations") + if api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01.aio.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01.aio.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01.aio.operations import FluxConfigurationsOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01.aio.operations import FluxConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'flux_configurations'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def location_extension_types(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`LocationExtensionTypesOperations` - * 2021-11-01-preview: :class:`LocationExtensionTypesOperations` - * 2022-01-01-preview: :class:`LocationExtensionTypesOperations` - * 2022-01-15-preview: :class:`LocationExtensionTypesOperations` + * 2021-05-01-preview: :class:`LocationExtensionTypesOperations` + * 2021-11-01-preview: :class:`LocationExtensionTypesOperations` + * 2022-01-01-preview: :class:`LocationExtensionTypesOperations` + * 2022-01-15-preview: :class:`LocationExtensionTypesOperations` """ - api_version = self._get_api_version('location_extension_types') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("location_extension_types") + if api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import LocationExtensionTypesOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import LocationExtensionTypesOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import LocationExtensionTypesOperations as OperationClass - elif api_version == '2022-01-15-preview': + elif api_version == "2022-01-15-preview": from ..v2022_01_15_preview.aio.operations import LocationExtensionTypesOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'location_extension_types'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'location_extension_types'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def operation_status(self): """Instance depends on the API version: - * 2021-05-01-preview: :class:`OperationStatusOperations` - * 2021-09-01: :class:`OperationStatusOperations` - * 2021-11-01-preview: :class:`OperationStatusOperations` - * 2022-01-01-preview: :class:`OperationStatusOperations` - * 2022-03-01: :class:`OperationStatusOperations` - * 2022-04-02-preview: :class:`OperationStatusOperations` - * 2022-07-01: :class:`OperationStatusOperations` - * 2022-11-01: :class:`OperationStatusOperations` - * 2023-05-01: :class:`OperationStatusOperations` + * 2021-05-01-preview: :class:`OperationStatusOperations` + * 2021-09-01: :class:`OperationStatusOperations` + * 2021-11-01-preview: :class:`OperationStatusOperations` + * 2022-01-01-preview: :class:`OperationStatusOperations` + * 2022-03-01: :class:`OperationStatusOperations` + * 2022-04-02-preview: :class:`OperationStatusOperations` + * 2022-07-01: :class:`OperationStatusOperations` + * 2022-11-01: :class:`OperationStatusOperations` + * 2023-05-01: :class:`OperationStatusOperations` """ - api_version = self._get_api_version('operation_status') - if api_version == '2021-05-01-preview': + api_version = self._get_api_version("operation_status") + if api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from ..v2021_09_01.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-04-02-preview': + elif api_version == "2022-04-02-preview": from ..v2022_04_02_preview.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01.aio.operations import OperationStatusOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01.aio.operations import OperationStatusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'operation_status'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def operations(self): """Instance depends on the API version: - * 2020-07-01-preview: :class:`Operations` - * 2020-10-01-preview: :class:`Operations` - * 2021-03-01: :class:`Operations` - * 2021-05-01-preview: :class:`Operations` - * 2021-09-01: :class:`Operations` - * 2021-11-01-preview: :class:`Operations` - * 2022-01-01-preview: :class:`Operations` - * 2022-03-01: :class:`Operations` - * 2022-07-01: :class:`Operations` - * 2022-11-01: :class:`Operations` - * 2023-05-01: :class:`Operations` + * 2020-07-01-preview: :class:`Operations` + * 2020-10-01-preview: :class:`Operations` + * 2021-03-01: :class:`Operations` + * 2021-05-01-preview: :class:`Operations` + * 2021-09-01: :class:`Operations` + * 2021-11-01-preview: :class:`Operations` + * 2022-01-01-preview: :class:`Operations` + * 2022-03-01: :class:`Operations` + * 2022-07-01: :class:`Operations` + * 2022-11-01: :class:`Operations` + * 2023-05-01: :class:`Operations` """ - api_version = self._get_api_version('operations') - if api_version == '2020-07-01-preview': + api_version = self._get_api_version("operations") + if api_version == "2020-07-01-preview": from ..v2020_07_01_preview.aio.operations import Operations as OperationClass - elif api_version == '2020-10-01-preview': + elif api_version == "2020-10-01-preview": from ..v2020_10_01_preview.aio.operations import Operations as OperationClass - elif api_version == '2021-03-01': + elif api_version == "2021-03-01": from ..v2021_03_01.aio.operations import Operations as OperationClass - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import Operations as OperationClass - elif api_version == '2021-09-01': + elif api_version == "2021-09-01": from ..v2021_09_01.aio.operations import Operations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import Operations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import Operations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01.aio.operations import Operations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01.aio.operations import Operations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01.aio.operations import Operations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def private_endpoint_connections(self): """Instance depends on the API version: - * 2022-04-02-preview: :class:`PrivateEndpointConnectionsOperations` + * 2022-04-02-preview: :class:`PrivateEndpointConnectionsOperations` """ - api_version = self._get_api_version('private_endpoint_connections') - if api_version == '2022-04-02-preview': + api_version = self._get_api_version("private_endpoint_connections") + if api_version == "2022-04-02-preview": from ..v2022_04_02_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'private_endpoint_connections'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def private_link_resources(self): """Instance depends on the API version: - * 2022-04-02-preview: :class:`PrivateLinkResourcesOperations` + * 2022-04-02-preview: :class:`PrivateLinkResourcesOperations` """ - api_version = self._get_api_version('private_link_resources') - if api_version == '2022-04-02-preview': + api_version = self._get_api_version("private_link_resources") + if api_version == "2022-04-02-preview": from ..v2022_04_02_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'private_link_resources'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def private_link_scopes(self): """Instance depends on the API version: - * 2022-04-02-preview: :class:`PrivateLinkScopesOperations` + * 2022-04-02-preview: :class:`PrivateLinkScopesOperations` """ - api_version = self._get_api_version('private_link_scopes') - if api_version == '2022-04-02-preview': + api_version = self._get_api_version("private_link_scopes") + if api_version == "2022-04-02-preview": from ..v2022_04_02_preview.aio.operations import PrivateLinkScopesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_scopes'".format(api_version)) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) @property def source_control_configurations(self): """Instance depends on the API version: - * 2020-07-01-preview: :class:`SourceControlConfigurationsOperations` - * 2020-10-01-preview: :class:`SourceControlConfigurationsOperations` - * 2021-03-01: :class:`SourceControlConfigurationsOperations` - * 2021-05-01-preview: :class:`SourceControlConfigurationsOperations` - * 2021-11-01-preview: :class:`SourceControlConfigurationsOperations` - * 2022-01-01-preview: :class:`SourceControlConfigurationsOperations` - * 2022-03-01: :class:`SourceControlConfigurationsOperations` - * 2022-07-01: :class:`SourceControlConfigurationsOperations` - * 2022-11-01: :class:`SourceControlConfigurationsOperations` - * 2023-05-01: :class:`SourceControlConfigurationsOperations` + * 2020-07-01-preview: :class:`SourceControlConfigurationsOperations` + * 2020-10-01-preview: :class:`SourceControlConfigurationsOperations` + * 2021-03-01: :class:`SourceControlConfigurationsOperations` + * 2021-05-01-preview: :class:`SourceControlConfigurationsOperations` + * 2021-11-01-preview: :class:`SourceControlConfigurationsOperations` + * 2022-01-01-preview: :class:`SourceControlConfigurationsOperations` + * 2022-03-01: :class:`SourceControlConfigurationsOperations` + * 2022-07-01: :class:`SourceControlConfigurationsOperations` + * 2022-11-01: :class:`SourceControlConfigurationsOperations` + * 2023-05-01: :class:`SourceControlConfigurationsOperations` """ - api_version = self._get_api_version('source_control_configurations') - if api_version == '2020-07-01-preview': + api_version = self._get_api_version("source_control_configurations") + if api_version == "2020-07-01-preview": from ..v2020_07_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2020-10-01-preview': + elif api_version == "2020-10-01-preview": from ..v2020_10_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': + elif api_version == "2021-03-01": from ..v2021_03_01.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2021-05-01-preview': + elif api_version == "2021-05-01-preview": from ..v2021_05_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2021-11-01-preview': + elif api_version == "2021-11-01-preview": from ..v2021_11_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-01-01-preview': + elif api_version == "2022-01-01-preview": from ..v2022_01_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-03-01': + elif api_version == "2022-03-01": from ..v2022_03_01.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-07-01': + elif api_version == "2022-07-01": from ..v2022_07_01.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2022-11-01': + elif api_version == "2022-11-01": from ..v2022_11_01.aio.operations import SourceControlConfigurationsOperations as OperationClass - elif api_version == '2023-05-01': + elif api_version == "2023-05-01": from ..v2023_05_01.aio.operations import SourceControlConfigurationsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'source_control_configurations'".format(api_version)) + raise ValueError( + "API version {} does not have operation group 'source_control_configurations'".format(api_version) + ) self._config.api_version = api_version - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + api_version, + ) async def close(self): await self._client.close() + async def __aenter__(self): await self._client.__aenter__() return self + async def __aexit__(self, *exc_details): await self._client.__aexit__(*exc_details) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_07_01_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2020_10_01_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_03_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_05_01_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_09_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2021_11_01_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_15_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_03_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_04_02_preview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_07_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_11_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/models/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/models/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/operations/_patch.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/operations/_patch.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2023_05_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/setup.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/setup.py index a15a937f2162..94aae8e248c0 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/setup.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/disable_test_cli_mgmt_kubernetesconfiguration.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/disable_test_cli_mgmt_kubernetesconfiguration.py index bb9856399b4a..648cfb71243b 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/disable_test_cli_mgmt_kubernetesconfiguration.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/disable_test_cli_mgmt_kubernetesconfiguration.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -19,6 +19,7 @@ import unittest import azure.mgmt.kubernetesconfiguration + # from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer # AZURE_LOCATION = 'eastus' @@ -96,6 +97,6 @@ # result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/kusto/azure-mgmt-kusto/setup.py b/sdk/kusto/azure-mgmt-kusto/setup.py index 8cb66a3f57c9..5f7e9ba929a8 100644 --- a/sdk/kusto/azure-mgmt-kusto/setup.py +++ b/sdk/kusto/azure-mgmt-kusto/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_patch.py b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_patch.py +++ b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/_patch.py b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/_patch.py +++ b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/operations/_patch.py b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/operations/_patch.py +++ b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_patch.py b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_patch.py +++ b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/operations/_patch.py b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/operations/_patch.py +++ b/sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/labservices/azure-mgmt-labservices/setup.py b/sdk/labservices/azure-mgmt-labservices/setup.py index f88511fd8445..a78964a68d5e 100644 --- a/sdk/labservices/azure-mgmt-labservices/setup.py +++ b/sdk/labservices/azure-mgmt-labservices/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Lab Services" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/_patch.py b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/_patch.py +++ b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/_patch.py b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/_patch.py +++ b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/operations/_patch.py b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/operations/_patch.py +++ b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/models/_patch.py b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/models/_patch.py +++ b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/operations/_patch.py b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/operations/_patch.py +++ b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/azure/mgmt/lambdatesthyperexecute/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/setup.py b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/setup.py index 7a2f44c0716c..0d7d42f8c997 100644 --- a/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/setup.py +++ b/sdk/lambdatesthyperexecute/azure-mgmt-lambdatesthyperexecute/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/_patch.py b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/_patch.py +++ b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/_patch.py b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/_patch.py +++ b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/operations/_patch.py b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/operations/_patch.py +++ b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/models/_patch.py b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/models/_patch.py +++ b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/operations/_patch.py b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/operations/_patch.py +++ b/sdk/largeinstance/azure-mgmt-largeinstance/azure/mgmt/largeinstance/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/largeinstance/azure-mgmt-largeinstance/setup.py b/sdk/largeinstance/azure-mgmt-largeinstance/setup.py index 93d0bc156e6f..f37845e603ab 100644 --- a/sdk/largeinstance/azure-mgmt-largeinstance/setup.py +++ b/sdk/largeinstance/azure-mgmt-largeinstance/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_operations/_patch.py b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_operations/_patch.py index 66d355fc7cdc..040b84732453 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_operations/_patch.py +++ b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import logging import time from functools import partial @@ -121,14 +122,10 @@ def _update_status(self): self._status = self._resource["status"] -class LoadTestAdministrationClientOperationsMixin( - GeneratedAdministrationClientOperations -): +class LoadTestAdministrationClientOperationsMixin(GeneratedAdministrationClientOperations): def __init__(self, *args, **kwargs): - super(LoadTestAdministrationClientOperationsMixin, self).__init__( - *args, **kwargs - ) + super(LoadTestAdministrationClientOperationsMixin, self).__init__(*args, **kwargs) @overload def begin_upload_test_file( @@ -236,17 +233,11 @@ def begin_upload_test_file( if polling_interval is None: polling_interval = 5 upload_test_file_operation = super()._begin_upload_test_file( - test_id=test_id, - file_name=file_name, - file_type=file_type, - body=body, # type: ignore[arg-type] - **kwargs + test_id=test_id, file_name=file_name, file_type=file_type, body=body, **kwargs # type: ignore[arg-type] ) command = partial(self.get_test_file, test_id=test_id, file_name=file_name) - file_validation_status_polling = ValidationCheckPoller( - interval=polling_interval - ) + file_validation_status_polling = ValidationCheckPoller(interval=polling_interval) return LROPoller( command, upload_test_file_operation, @@ -434,12 +425,7 @@ def begin_test_profile_run( @overload def begin_test_profile_run( - self, - test_profile_run_id: str, - body: JSON, - *, - content_type: str = "application/merge-patch+json", - **kwargs: Any + self, test_profile_run_id: str, body: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any ) -> LROPoller[_models.TestProfileRun]: """Create and start a new test profile run. @@ -486,10 +472,7 @@ def begin_test_profile_run( @distributed_trace def begin_test_profile_run( - self, - test_profile_run_id: str, - body: Union[_models.TestProfileRun, JSON, IO[bytes]], - **kwargs: Any + self, test_profile_run_id: str, body: Union[_models.TestProfileRun, JSON, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.TestProfileRun]: """Create and start a new test profile run. @@ -511,13 +494,9 @@ def begin_test_profile_run( create_or_update_test_profile_run_operation = super()._begin_test_profile_run( test_profile_run_id, body, **kwargs ) - command = partial( - self.get_test_profile_run, test_profile_run_id=test_profile_run_id - ) + command = partial(self.get_test_profile_run, test_profile_run_id=test_profile_run_id) - test_profile_run_status_polling = TestProfileRunStatusPoller( - interval=polling_interval - ) + test_profile_run_status_polling = TestProfileRunStatusPoller(interval=polling_interval) return LROPoller( command, create_or_update_test_profile_run_operation, diff --git a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_patch.py b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_patch.py +++ b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_operations/_patch.py b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_operations/_patch.py index 7dd0eb726c2e..e9f517406168 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_operations/_patch.py +++ b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import asyncio import logging import time @@ -47,13 +48,13 @@ def initialize(self, client, initial_response, deserialization_callback) -> None self._resource = initial_response def status(self) -> str: - return self._status # type: ignore[return-value] + return self._status # type: ignore[return-value] def finished(self) -> bool: return self._status in self._termination_statuses def resource(self) -> JSON: - return self._resource # type: ignore[return-value] + return self._resource # type: ignore[return-value] async def run(self) -> None: try: diff --git a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_patch.py b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_patch.py +++ b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/models/_patch.py b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/models/_patch.py +++ b/sdk/loadtesting/azure-developer-loadtesting/azure/developer/loadtesting/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/begin_test_run.py b/sdk/loadtesting/azure-developer-loadtesting/samples/begin_test_run.py index b3fcde39bf42..5c3e6120cb70 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/begin_test_run.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/begin_test_run.py @@ -19,6 +19,7 @@ 3) AZURE_TENANT_ID - tenant id for your Azure 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + from azure.developer.loadtesting import LoadTestRunClient # for details refer: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/loadtestservice/azure-developer diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/clone_test.py b/sdk/loadtesting/azure-developer-loadtesting/samples/clone_test.py index 64010ae9db7f..cdd0eba47a62 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/clone_test.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/clone_test.py @@ -21,6 +21,7 @@ 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice 5) SOURCE_TEST_ID - The ID of the existing load test to be cloned """ + from azure.developer.loadtesting import LoadTestAdministrationClient from azure.identity import DefaultAzureCredential @@ -30,9 +31,7 @@ load_dotenv() LOADTESTSERVICE_ENDPOINT = os.environ["LOADTESTSERVICE_ENDPOINT"] -client = LoadTestAdministrationClient( - credential=DefaultAzureCredential(), endpoint=LOADTESTSERVICE_ENDPOINT -) +client = LoadTestAdministrationClient(credential=DefaultAzureCredential(), endpoint=LOADTESTSERVICE_ENDPOINT) SOURCE_TEST_ID = os.environ["LOADTESTSERVICE_SOURCE_TEST_ID"] NEW_TEST_ID = "my-cloned-test-id" diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_app_components_test.py b/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_app_components_test.py index 8cfc28a1de29..21413dbdbd2a 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_app_components_test.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_app_components_test.py @@ -21,6 +21,7 @@ 4) RESOURCE_ID - resource id of resource that will be added as the app component 5) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + from azure.developer.loadtesting import LoadTestAdministrationClient # for details refer: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/loadtesting/azure-developer-loadtesting/README.md @@ -29,7 +30,6 @@ import os from dotenv import load_dotenv - load_dotenv() LOADTESTSERVICE_ENDPOINT = os.environ["LOADTESTSERVICE_ENDPOINT"] RESOURCE_ID = os.environ["RESOURCE_ID"] diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_test.py b/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_test.py index 402294d5b89d..8d9bbc592eb4 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_test.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/create_or_update_test.py @@ -20,6 +20,7 @@ 3) AZURE_TENANT_ID - tenant id for your Azure 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + from azure.developer.loadtesting import LoadTestAdministrationClient # for details refer: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/loadtesting/azure-developer-loadtesting/README.md diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test.py b/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test.py index 2ff339560bde..8c5fe681f48f 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test.py @@ -19,6 +19,7 @@ 3) AZURE_TENANT_ID - tenant id for your Azure 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + # main library import from azure.developer.loadtesting import LoadTestAdministrationClient diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test_run.py b/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test_run.py index 825a1bbd76ad..89111ff2425c 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test_run.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/delete_load_test_run.py @@ -19,6 +19,7 @@ 3) AZURE_TENANT_ID - tenant id for your Azure 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + from azure.developer.loadtesting import LoadTestRunClient # for details refer: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/loadtestservice/azure-developer diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_plan_recommendations.py b/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_plan_recommendations.py index 2aeda6f9683e..87b6ffec6570 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_plan_recommendations.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_plan_recommendations.py @@ -21,6 +21,7 @@ 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice 5) LOADTESTSERVICE_TEST_ID - The ID of the load test for which to generate recommendations, it should have browser recording file before generating recommendations. """ + from azure.developer.loadtesting import LoadTestAdministrationClient from azure.identity import DefaultAzureCredential @@ -31,9 +32,7 @@ LOADTESTSERVICE_ENDPOINT = os.environ["LOADTESTSERVICE_ENDPOINT"] TEST_ID = os.environ["LOADTESTSERVICE_TEST_ID"] -client = LoadTestAdministrationClient( - credential=DefaultAzureCredential(), endpoint=LOADTESTSERVICE_ENDPOINT -) +client = LoadTestAdministrationClient(credential=DefaultAzureCredential(), endpoint=LOADTESTSERVICE_ENDPOINT) # Generate test plan recommendations print("Generating test plan recommendations...") diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_run_inisghts.py b/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_run_inisghts.py index ecaf80abd4f7..83caa25090b9 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_run_inisghts.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/generate_test_run_inisghts.py @@ -21,6 +21,7 @@ 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice 5) LOADTESTSERVICE_COMPLETED_TEST_RUN_ID - The ID of a completed test run for which we need to generate insights """ + from azure.developer.loadtesting import LoadTestRunClient from azure.identity import DefaultAzureCredential @@ -31,9 +32,7 @@ LOADTESTSERVICE_ENDPOINT = os.environ["LOADTESTSERVICE_ENDPOINT"] COMPLETED_TEST_RUN_ID = os.environ["LOADTESTSERVICE_COMPLETED_TEST_RUN_ID"] -client = LoadTestRunClient( - credential=DefaultAzureCredential(), endpoint=LOADTESTSERVICE_ENDPOINT -) +client = LoadTestRunClient(credential=DefaultAzureCredential(), endpoint=LOADTESTSERVICE_ENDPOINT) # Generate test run insights print(f"Generating insights for test run '{COMPLETED_TEST_RUN_ID}'...") @@ -47,4 +46,4 @@ # Fetch the latest insights print(f"\nFetching latest insights for test run '{COMPLETED_TEST_RUN_ID}'...") insights = client.get_latest_test_run_insights(COMPLETED_TEST_RUN_ID) -print(f"Latest insights: {insights}") \ No newline at end of file +print(f"Latest insights: {insights}") diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/get_metrics.py b/sdk/loadtesting/azure-developer-loadtesting/samples/get_metrics.py index 9d4a905ddbfd..bdda17a5d68e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/get_metrics.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/get_metrics.py @@ -19,6 +19,7 @@ 3) AZURE_TENANT_ID - tenant id for your Azure 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + from azure.developer.loadtesting import LoadTestRunClient # for details refer: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/loadtestservice/azure-developer diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/notification_rule_operation.py b/sdk/loadtesting/azure-developer-loadtesting/samples/notification_rule_operation.py index 4f8d13718c75..2500015c6b37 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/notification_rule_operation.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/notification_rule_operation.py @@ -22,6 +22,7 @@ 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice 5) ACTION_GROUP_ID - Resource ID of the Azure Monitor action group for notifications """ + from azure.developer.loadtesting import LoadTestAdministrationClient from azure.identity import DefaultAzureCredential @@ -74,4 +75,4 @@ # Delete a notification rule print("\nDeleting notification rule...") client.delete_notification_rule(NOTIFICATION_RULE_ID) -print("Notification rule deleted successfully") \ No newline at end of file +print("Notification rule deleted successfully") diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/trigger_operations.py b/sdk/loadtesting/azure-developer-loadtesting/samples/trigger_operations.py index 5648bfc08738..acb6c8d577af 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/trigger_operations.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/trigger_operations.py @@ -21,6 +21,7 @@ 3) AZURE_TENANT_ID - tenant id for your Azure 4) LOADTESTSERVICE_ENDPOINT - Data Plane endpoint for Loadtestservice """ + from azure.developer.loadtesting import LoadTestAdministrationClient from azure.identity import DefaultAzureCredential @@ -68,4 +69,4 @@ # Delete a trigger print("\nDeleting trigger...") client.delete_trigger(TRIGGER_ID) -print("Trigger deleted successfully") \ No newline at end of file +print("Trigger deleted successfully") diff --git a/sdk/loadtesting/azure-developer-loadtesting/samples/upload_test_file.py b/sdk/loadtesting/azure-developer-loadtesting/samples/upload_test_file.py index 1c8c7fbe5d0e..2c70cd9356a9 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/samples/upload_test_file.py +++ b/sdk/loadtesting/azure-developer-loadtesting/samples/upload_test_file.py @@ -21,6 +21,7 @@ Please ensure that correct file and path is used """ + from azure.developer.loadtesting import LoadTestAdministrationClient # for details refer: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/loadtesting/azure-developer-loadtesting/README.md diff --git a/sdk/loadtesting/azure-developer-loadtesting/tests/conftest.py b/sdk/loadtesting/azure-developer-loadtesting/tests/conftest.py index cee2adb6d599..7777265a6c9d 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/tests/conftest.py +++ b/sdk/loadtesting/azure-developer-loadtesting/tests/conftest.py @@ -48,9 +48,9 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000") add_general_regex_sanitizer(regex=client_id, value="00000000-0000-0000-0000-000000000000") add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") - + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") add_body_key_sanitizer(json_path="$..access_token", value="access_token") add_body_key_sanitizer(json_path="$..url", value="url") - add_header_regex_sanitizer(key="Location", regex=r"https://example\.com", value="") \ No newline at end of file + add_header_regex_sanitizer(key="Location", regex=r"https://example\.com", value="") diff --git a/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_administration_ops.py b/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_administration_ops.py index 158476d80b5e..55dd44c7fdf3 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_administration_ops.py +++ b/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_administration_ops.py @@ -22,9 +22,7 @@ class TestLoadTestAdministrationOperations(LoadTestingAsyncTest): @LoadTestingPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_create_or_update_load_test( - self, loadtesting_endpoint, loadtesting_test_id - ): + async def test_create_or_update_load_test(self, loadtesting_endpoint, loadtesting_test_id): set_bodiless_matcher() client = self.create_administration_client(loadtesting_endpoint) @@ -229,9 +227,7 @@ async def test_create_or_update_server_metrics_config( @LoadTestingPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_get_server_metrics_config( - self, loadtesting_endpoint, loadtesting_test_id - ): + async def test_get_server_metrics_config(self, loadtesting_endpoint, loadtesting_test_id): set_bodiless_matcher() client = self.create_administration_client(loadtesting_endpoint) result = await client.get_server_metrics_config(loadtesting_test_id) @@ -243,9 +239,7 @@ async def test_get_server_metrics_config( @LoadTestingPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_create_or_update_trigger( - self, loadtesting_endpoint, loadtesting_test_id - ): + async def test_create_or_update_trigger(self, loadtesting_endpoint, loadtesting_test_id): set_bodiless_matcher() client = self.create_administration_client(loadtesting_endpoint) @@ -390,15 +384,11 @@ async def test_delete_notification_rule(self, loadtesting_endpoint): @LoadTestingPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_begin_generate_test_plan_recommendations( - self, loadtesting_endpoint, loadtesting_recording_test_id - ): + async def test_begin_generate_test_plan_recommendations(self, loadtesting_endpoint, loadtesting_recording_test_id): set_bodiless_matcher() client = self.create_administration_client(loadtesting_endpoint) - result = await client.begin_generate_test_plan_recommendations( - loadtesting_recording_test_id - ) + result = await client.begin_generate_test_plan_recommendations(loadtesting_recording_test_id) assert result is not None await self.close_admin_client() @@ -411,14 +401,14 @@ async def test_begin_clone_test(self, loadtesting_endpoint, loadtesting_test_id) client = self.create_administration_client(loadtesting_endpoint) new_test_id = "new-cloned-test-id-async" - + poller = await client.begin_clone_test( loadtesting_test_id, new_test_id=new_test_id, display_name="Cloned Test", description="Cloned test for pytest", ) - + result = await poller.result() assert result is not None assert poller.done() is True @@ -431,7 +421,7 @@ async def test_begin_clone_test(self, loadtesting_endpoint, loadtesting_test_id) # Clean up cloned test result = await client.delete_test(new_test_id) await self.close_admin_client() - + @LoadTestingPreparer() @recorded_by_proxy_async @pytest.mark.asyncio diff --git a/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_run_ops.py b/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_run_ops.py index 2e4585e4260c..12213abb1451 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_run_ops.py +++ b/sdk/loadtesting/azure-developer-loadtesting/tests/test_async_load_test_run_ops.py @@ -23,9 +23,7 @@ class TestLoadTestRunOperations(LoadTestingAsyncTest): # Pre-requisite: Test creation is needed for test run related tests @LoadTestingPreparer() @recorded_by_proxy_async - async def test_create_or_update_load_test( - self, loadtesting_endpoint, loadtesting_test_id - ): + async def test_create_or_update_load_test(self, loadtesting_endpoint, loadtesting_test_id): set_bodiless_matcher() client = self.create_administration_client(loadtesting_endpoint) @@ -121,9 +119,7 @@ async def test_get_test_file(self, loadtesting_endpoint, loadtesting_test_id): @LoadTestingPreparer() @recorded_by_proxy_async - async def test_begin_test_run( - self, loadtesting_endpoint, loadtesting_test_id, loadtesting_test_run_id - ): + async def test_begin_test_run(self, loadtesting_endpoint, loadtesting_test_id, loadtesting_test_run_id): set_bodiless_matcher() run_client = self.create_run_client(loadtesting_endpoint) @@ -158,9 +154,7 @@ async def test_get_test_run(self, loadtesting_endpoint, loadtesting_test_run_id) @LoadTestingPreparer() @recorded_by_proxy_async - async def test_get_test_run_file( - self, loadtesting_endpoint, loadtesting_test_run_id - ): + async def test_get_test_run_file(self, loadtesting_endpoint, loadtesting_test_run_id): set_bodiless_matcher() run_client = self.create_run_client(loadtesting_endpoint) @@ -197,9 +191,7 @@ async def test_get_metrics(self, loadtesting_endpoint, loadtesting_test_run_id): test_run_response = await run_client.get_test_run(loadtesting_test_run_id) assert test_run_response is not None - metric_namespaces = await run_client.get_metric_namespaces( - loadtesting_test_run_id - ) + metric_namespaces = await run_client.get_metric_namespaces(loadtesting_test_run_id) assert metric_namespaces is not None metric_definitions = await run_client.get_metric_definitions( @@ -212,9 +204,7 @@ async def test_get_metrics(self, loadtesting_endpoint, loadtesting_test_run_id): test_run_id=loadtesting_test_run_id, metric_name=metric_definitions["value"][0]["name"], metric_namespace=metric_namespaces["value"][0]["name"], - time_interval=test_run_response["startDateTime"] - + "/" - + test_run_response["executionEndDateTime"], + time_interval=test_run_response["startDateTime"] + "/" + test_run_response["executionEndDateTime"], ) assert metrics is not None @@ -251,9 +241,7 @@ async def test_create_or_update_app_component( @LoadTestingPreparer() @recorded_by_proxy_async - async def test_get_app_component( - self, loadtesting_endpoint, loadtesting_test_run_id - ): + async def test_get_app_component(self, loadtesting_endpoint, loadtesting_test_run_id): set_bodiless_matcher() run_client = self.create_run_client(loadtesting_endpoint) @@ -297,9 +285,7 @@ async def test_create_or_update_server_metrics_config( @LoadTestingPreparer() @recorded_by_proxy_async - async def test_get_server_metrics_config( - self, loadtesting_endpoint, loadtesting_test_run_id - ): + async def test_get_server_metrics_config(self, loadtesting_endpoint, loadtesting_test_run_id): set_bodiless_matcher() run_client = self.create_run_client(loadtesting_endpoint) @@ -330,16 +316,12 @@ async def test_stop_test_run(self, loadtesting_endpoint, loadtesting_test_id): @LoadTestingPreparer() @recorded_by_proxy_async - async def test_begin_generate_test_run_insights( - self, loadtesting_endpoint, loadtesting_completed_test_run_id - ): + async def test_begin_generate_test_run_insights(self, loadtesting_endpoint, loadtesting_completed_test_run_id): set_bodiless_matcher() run_client = self.create_run_client(loadtesting_endpoint) - poller = await run_client.begin_generate_test_run_insights( - loadtesting_completed_test_run_id - ) + poller = await run_client.begin_generate_test_run_insights(loadtesting_completed_test_run_id) await poller.result() assert poller.done() is True @@ -347,17 +329,13 @@ async def test_begin_generate_test_run_insights( @LoadTestingPreparer() @recorded_by_proxy_async - async def test_get_latest_test_run_insights( - self, loadtesting_endpoint, loadtesting_completed_test_run_id - ): + async def test_get_latest_test_run_insights(self, loadtesting_endpoint, loadtesting_completed_test_run_id): set_bodiless_matcher() run_client = self.create_run_client(loadtesting_endpoint) # Get insights only if test run completed successfully - insights = await run_client.get_latest_test_run_insights( - loadtesting_completed_test_run_id - ) + insights = await run_client.get_latest_test_run_insights(loadtesting_completed_test_run_id) assert insights is not None await self.close_run_client() diff --git a/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_administration_ops.py b/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_administration_ops.py index ebf4829b59be..4ea0d6b1373f 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_administration_ops.py +++ b/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_administration_ops.py @@ -195,7 +195,7 @@ def test_delete_test_file(self, loadtesting_endpoint, loadtesting_test_id): result = client.delete_test_file(loadtesting_test_id, "sample.jmx") assert result is None -# Trigger CRUD Tests + # Trigger CRUD Tests @LoadTestingPreparer() @recorded_by_proxy def test_create_or_update_trigger(self, loadtesting_endpoint, loadtesting_test_id): @@ -254,7 +254,9 @@ def test_delete_trigger(self, loadtesting_endpoint): # Notification Rule CRUD Tests @LoadTestingPreparer() @recorded_by_proxy - def test_create_or_update_notification_rule(self, loadtesting_endpoint, loadtesting_test_id, loadtesting_action_group_id): + def test_create_or_update_notification_rule( + self, loadtesting_endpoint, loadtesting_test_id, loadtesting_action_group_id + ): set_bodiless_matcher() client = self.create_administration_client(loadtesting_endpoint) @@ -320,7 +322,7 @@ def test_begin_generate_test_plan_recommendations(self, loadtesting_endpoint, lo client = self.create_administration_client(loadtesting_endpoint) result = client.begin_generate_test_plan_recommendations(loadtesting_recording_test_id) assert result is not None - + @LoadTestingPreparer() @recorded_by_proxy def test_begin_clone_test(self, loadtesting_endpoint, loadtesting_test_id): @@ -328,14 +330,14 @@ def test_begin_clone_test(self, loadtesting_endpoint, loadtesting_test_id): client = self.create_administration_client(loadtesting_endpoint) new_test_id = "new-cloned-test-id-sync" - + poller = client.begin_clone_test( loadtesting_test_id, new_test_id=new_test_id, display_name="Cloned Test", description="Cloned test for pytest", ) - + result = poller.result() assert result is not None assert poller.done() is True @@ -356,4 +358,4 @@ def test_delete_load_test(self, loadtesting_endpoint, loadtesting_test_id): client = self.create_administration_client(loadtesting_endpoint) result = client.delete_test(loadtesting_test_id) - assert result is None \ No newline at end of file + assert result is None diff --git a/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_run_ops.py b/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_run_ops.py index dc5f083f1e99..7c5b37242946 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_run_ops.py +++ b/sdk/loadtesting/azure-developer-loadtesting/tests/test_load_test_run_ops.py @@ -132,8 +132,8 @@ def test_get_test_run(self, loadtesting_endpoint, loadtesting_test_run_id): run_client = self.create_run_client(loadtesting_endpoint) result = run_client.get_test_run(loadtesting_test_run_id) - - # wait for test run to complete before closing the client + + # wait for test run to complete before closing the client while result.status not in ["DONE", "FAILED", "CANCELLED"]: result = run_client.get_test_run(loadtesting_test_run_id) @@ -280,7 +280,7 @@ def test_stop_test_run(self, loadtesting_endpoint, loadtesting_test_id): # Clean-up run_client.delete_test_run(test_run_id) - + @LoadTestingPreparer() @recorded_by_proxy def test_begin_generate_test_run_insights(self, loadtesting_endpoint, loadtesting_completed_test_run_id): diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_patch.py b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_patch.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/_patch.py b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/_patch.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/operations/_patch.py b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/operations/_patch.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_patch.py b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_patch.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/operations/_patch.py b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/operations/_patch.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/azure/mgmt/loadtesting/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/setup.py b/sdk/loadtesting/azure-mgmt-loadtesting/setup.py index 37cf466b6090..237c87fe3ad0 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/setup.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Loadtesting Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/tests/conftest.py b/sdk/loadtesting/azure-mgmt-loadtesting/tests/conftest.py index 53ab436af88a..7c6799fed2fe 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/tests/conftest.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/tests/conftest.py @@ -40,37 +40,17 @@ @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): - subscription_id = os.environ.get( - "AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" - ) - tenant_id = os.environ.get( - "AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000" - ) + subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") object_id = os.environ.get("CLIENT_OID", "00000000-0000-0000-0000-000000000000") - client_id = os.environ.get( - "AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000" - ) - client_secret = os.environ.get( - "AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=subscription_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=object_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=tenant_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=client_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=client_secret, value="00000000-0000-0000-0000-000000000000" - ) + client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=object_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") add_body_key_sanitizer(json_path="$..access_token", value="access_token") - add_body_key_sanitizer( - json_path="$..object_id", value="00000000-0000-0000-0000-000000000000" - ) + add_body_key_sanitizer(json_path="$..object_id", value="00000000-0000-0000-0000-000000000000") diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/tests/mgmt_test_helper.py b/sdk/loadtesting/azure-mgmt-loadtesting/tests/mgmt_test_helper.py index 1ae6cea28ff7..d767b5041e68 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/tests/mgmt_test_helper.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/tests/mgmt_test_helper.py @@ -3,12 +3,8 @@ from azure.keyvault.keys import KeyClient -def create_managed_identity( - msi_client: ManagedServiceIdentityClient, msi_name, rg_name, location -): - msi = msi_client.user_assigned_identities.create_or_update( - rg_name, msi_name, {"location": location} - ) +def create_managed_identity(msi_client: ManagedServiceIdentityClient, msi_name, rg_name, location): + msi = msi_client.user_assigned_identities.create_or_update(rg_name, msi_name, {"location": location}) return msi diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_quotaoperations.py b/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_quotaoperations.py index 311192029002..8740d524e21b 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_quotaoperations.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_quotaoperations.py @@ -36,9 +36,7 @@ def test_list_quota(self): def test_get_quota(self): quotaBucket = "maxEngineInstancesPerTestRun" - loadtest_quota_bucket = self.loadtestservice_client.quotas.get( - AZURE_LOCATION, quotaBucket - ) + loadtest_quota_bucket = self.loadtestservice_client.quotas.get(AZURE_LOCATION, quotaBucket) assert loadtest_quota_bucket assert loadtest_quota_bucket.name == quotaBucket assert loadtest_quota_bucket.id @@ -50,9 +48,7 @@ def test_get_quota(self): def test_check_quota_availability(self): quotaBucket = "maxEngineInstancesPerTestRun" - loadtest_quota_bucket = self.loadtestservice_client.quotas.get( - AZURE_LOCATION, quotaBucket - ) + loadtest_quota_bucket = self.loadtestservice_client.quotas.get(AZURE_LOCATION, quotaBucket) assert loadtest_quota_bucket assert loadtest_quota_bucket.name == quotaBucket assert loadtest_quota_bucket.id @@ -60,13 +56,9 @@ def test_check_quota_availability(self): assert loadtest_quota_bucket.limit != None assert loadtest_quota_bucket.usage != None - check_availability_payload = QuotaBucketRequest( - new_quota=loadtest_quota_bucket.limit - ) - loadtest_quota_check_availability = ( - self.loadtestservice_client.quotas.check_availability( - AZURE_LOCATION, quotaBucket, check_availability_payload - ) + check_availability_payload = QuotaBucketRequest(new_quota=loadtest_quota_bucket.limit) + loadtest_quota_check_availability = self.loadtestservice_client.quotas.check_availability( + AZURE_LOCATION, quotaBucket, check_availability_payload ) assert loadtest_quota_check_availability assert loadtest_quota_check_availability.name == quotaBucket diff --git a/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_resourceoperations.py b/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_resourceoperations.py index 6284c798ec86..abf640e623bd 100644 --- a/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_resourceoperations.py +++ b/sdk/loadtesting/azure-mgmt-loadtesting/tests/test_resourceoperations.py @@ -40,14 +40,8 @@ def setup_method(self, method): self.msi_client = self.create_mgmt_client(ManagedServiceIdentityClient) self.akv_client = self.create_mgmt_client(KeyVaultManagementClient) self.credential = self.get_credential(KeyClient) - self.tenant_id = ( - os.environ.get("AZURE_TENANT_ID", None) - if self.is_live - else DEFAULT_SANITIZER - ) - self.object_id = ( - os.environ.get("CLIENT_OID", None) if self.is_live else DEFAULT_SANITIZER - ) + self.tenant_id = os.environ.get("AZURE_TENANT_ID", None) if self.is_live else DEFAULT_SANITIZER + self.object_id = os.environ.get("CLIENT_OID", None) if self.is_live else DEFAULT_SANITIZER @ResourceGroupPreparer(name_prefix="altpysdk") @recorded_by_proxy @@ -88,20 +82,16 @@ def test_load_test_resource_operations(self, resource_group): }, ), encryption=EncryptionProperties( - identity=EncryptionPropertiesIdentity( - type="UserAssigned", resource_id=self.msi1.id - ), + identity=EncryptionPropertiesIdentity(type="UserAssigned", resource_id=self.msi1.id), key_url=self.key.id, ), ) # Create a load test resource create begin - returns a poller - loadtest_resource_poller = ( - self.loadtestservice_client.load_tests.begin_create_or_update( - resource_group.name, - resource_group.name + "resource", - loadtestresource_create_payload, - ) + loadtest_resource_poller = self.loadtestservice_client.load_tests.begin_create_or_update( + resource_group.name, + resource_group.name + "resource", + loadtestresource_create_payload, ) # Get the result of the poller @@ -149,12 +139,10 @@ def test_load_test_resource_operations(self, resource_group): ) # load test resource update begin - returns a poller - loadtest_resource_patch_poller = ( - self.loadtestservice_client.load_tests.begin_update( - resource_group.name, - resource_group.name + "resource", - loadtestresourcePatchdata, - ) + loadtest_resource_patch_poller = self.loadtestservice_client.load_tests.begin_update( + resource_group.name, + resource_group.name + "resource", + loadtestresourcePatchdata, ) # Get the result of the poller @@ -166,29 +154,17 @@ def test_load_test_resource_operations(self, resource_group): assert loadtest_resource_patch_response.name == resource_group.name + "resource" assert loadtest_resource_patch_response.location == self.AZURE_LOCATION assert loadtest_resource_patch_response.identity - assert ( - loadtest_resource_patch_response.identity.type - == "SystemAssigned, UserAssigned" - ) - assert ( - len(loadtest_resource_patch_response.identity.user_assigned_identities) == 1 - ) + assert loadtest_resource_patch_response.identity.type == "SystemAssigned, UserAssigned" + assert len(loadtest_resource_patch_response.identity.user_assigned_identities) == 1 assert loadtest_resource_patch_response.encryption assert loadtest_resource_patch_response.encryption.key_url == self.key.id assert loadtest_resource_patch_response.encryption.identity - assert ( - loadtest_resource_patch_response.encryption.identity.type == "UserAssigned" - ) - assert ( - loadtest_resource_patch_response.encryption.identity.resource_id - == self.msi1.id - ) + assert loadtest_resource_patch_response.encryption.identity.type == "UserAssigned" + assert loadtest_resource_patch_response.encryption.identity.resource_id == self.msi1.id # Delete the load test resource - returns a poller - loadtest_resource_delete_poller = ( - self.loadtestservice_client.load_tests.begin_delete( - resource_group.name, resource_group.name + "resource" - ) + loadtest_resource_delete_poller = self.loadtestservice_client.load_tests.begin_delete( + resource_group.name, resource_group.name + "resource" ) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_patch.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_patch.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_patch.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_patch.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_patch.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_patch.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_patch.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_patch.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_patch.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_patch.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_patch.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/logic/azure-mgmt-logic/setup.py b/sdk/logic/azure-mgmt-logic/setup.py index afbbb8a53c5b..8fa0f6fc0c8d 100644 --- a/sdk/logic/azure-mgmt-logic/setup.py +++ b/sdk/logic/azure-mgmt-logic/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Logic Apps Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/logic/azure-mgmt-logic/tests/conftest.py b/sdk/logic/azure-mgmt-logic/tests/conftest.py index e7981d635f56..8c0bebb9a45c 100644 --- a/sdk/logic/azure-mgmt-logic/tests/conftest.py +++ b/sdk/logic/azure-mgmt-logic/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -52,4 +53,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/logic/azure-mgmt-logic/tests/test_mgmt_apps.py b/sdk/logic/azure-mgmt-logic/tests/test_mgmt_apps.py index a605aa3a5cd1..48a3ab6b96ad 100644 --- a/sdk/logic/azure-mgmt-logic/tests/test_mgmt_apps.py +++ b/sdk/logic/azure-mgmt-logic/tests/test_mgmt_apps.py @@ -14,27 +14,25 @@ class TestMgmtApps(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.logic_client = self.create_mgmt_client( - azure.mgmt.logic.LogicManagementClient - ) + self.logic_client = self.create_mgmt_client(azure.mgmt.logic.LogicManagementClient) @ResourceGroupPreparer(location="West US") @recorded_by_proxy def test_logic(self, resource_group, location): - workflow_name = '12HourHeartBeat' + workflow_name = "12HourHeartBeat" # workflow_name1 = workflow_name+'1' - workflow=azure.mgmt.logic.models.Workflow( - location=location, - definition={ - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "triggers": {}, - "actions": {}, - "outputs": {} - } - ) - self.logic_client.workflows.create_or_update(resource_group.name,workflow_name,workflow) + workflow = azure.mgmt.logic.models.Workflow( + location=location, + definition={ + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "triggers": {}, + "actions": {}, + "outputs": {}, + }, + ) + self.logic_client.workflows.create_or_update(resource_group.name, workflow_name, workflow) self.logic_client.workflows.get(resource_group.name, workflow_name) @@ -44,5 +42,5 @@ def test_logic(self, resource_group, location): # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/_patch.py b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/_patch.py +++ b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/_patch.py b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/_patch.py +++ b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/operations/_patch.py b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/operations/_patch.py +++ b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/models/_patch.py b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/models/_patch.py +++ b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/operations/_patch.py b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/operations/_patch.py +++ b/sdk/machinelearning/azure-mgmt-guestconfig/azure/mgmt/guestconfig/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-guestconfig/setup.py b/sdk/machinelearning/azure-mgmt-guestconfig/setup.py index 68d96f700861..06a37c3c7686 100644 --- a/sdk/machinelearning/azure-mgmt-guestconfig/setup.py +++ b/sdk/machinelearning/azure-mgmt-guestconfig/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Guest Config Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py index 63886b14cd64..1ff254f1a8b7 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Machine Learning Compute Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_patch.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py index 4be603c34618..0c6c5ff87770 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Machine Learning Services Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "isodate<1.0.0,>=0.6.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_patch.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_patch.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_patch.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_patch.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_patch.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_patch.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_patch.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_patch.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_patch.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_patch.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maintenance/azure-mgmt-maintenance/setup.py b/sdk/maintenance/azure-mgmt-maintenance/setup.py index 46d4da6d0554..9af8e2e7409b 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/setup.py +++ b/sdk/maintenance/azure-mgmt-maintenance/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/_patch.py b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/_patch.py +++ b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/_patch.py b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/_patch.py +++ b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/operations/_patch.py b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/operations/_patch.py +++ b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/models/_patch.py b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/models/_patch.py +++ b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/operations/_patch.py b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/operations/_patch.py +++ b/sdk/managedapplications/azure-mgmt-managedapplications/azure/mgmt/managedapplications/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedapplications/azure-mgmt-managedapplications/setup.py b/sdk/managedapplications/azure-mgmt-managedapplications/setup.py index 1e220d76611c..affebc51a39f 100644 --- a/sdk/managedapplications/azure-mgmt-managedapplications/setup.py +++ b/sdk/managedapplications/azure-mgmt-managedapplications/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py index a222ce417493..3951db0b0f09 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/_patch.py b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/_patch.py +++ b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/_patch.py b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/_patch.py +++ b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/operations/_patch.py b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/operations/_patch.py +++ b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/models/_patch.py b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/models/_patch.py +++ b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/operations/_patch.py b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/operations/_patch.py +++ b/sdk/managedops/azure-mgmt-managedops/azure/mgmt/managedops/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_patch.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_patch.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_patch.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_patch.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_patch.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_patch.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_patch.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_patch.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_patch.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_patch.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_patch.py b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_patch.py +++ b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/_patch.py b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/_patch.py +++ b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/operations/_patch.py b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/operations/_patch.py +++ b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/_patch.py b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/_patch.py +++ b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/_patch.py b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/_patch.py +++ b/sdk/managementgroups/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_patch.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_patch.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/_patch.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/_patch.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/operations/_patch.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/operations/_patch.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_patch.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_patch.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_patch.py b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_patch.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/azure/mgmt/managementpartner/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/setup.py b/sdk/managementpartner/azure-mgmt-managementpartner/setup.py index a2dc6e959d23..2c6f97bdb1e8 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/setup.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Management Partner Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/managementpartner/azure-mgmt-managementpartner/tests/test_mgmt_managementpartner.py b/sdk/managementpartner/azure-mgmt-managementpartner/tests/test_mgmt_managementpartner.py index 40289a43f410..d6987f8362a3 100644 --- a/sdk/managementpartner/azure-mgmt-managementpartner/tests/test_mgmt_managementpartner.py +++ b/sdk/managementpartner/azure-mgmt-managementpartner/tests/test_mgmt_managementpartner.py @@ -24,27 +24,28 @@ def setUp(self): self.managementpartner_client = self.create_basic_client(ACEProvisioningManagementPartnerAPI) def test_managementpartner_get(self): - self.partner_id="123456" + self.partner_id = "123456" managment_partner = self.managementpartner_client.partner.get(self.partner_id) self.assertIsNotNone(managment_partner) self._validate_partner(managment_partner) def test_managementpartner_create(self): - self.partner_id="123456" + self.partner_id = "123456" managment_partner = self.managementpartner_client.partner.create(self.partner_id) self.assertIsNotNone(managment_partner) self._validate_partner(managment_partner) def test_managementpartner_update(self): - self.partner_id="123457" + self.partner_id = "123457" managment_partner = self.managementpartner_client.partner.update(self.partner_id) self.assertIsNotNone(managment_partner) self._validate_partner(managment_partner) def test_managementpartner_delete(self): - self.partner_id="123456" + self.partner_id = "123456" self.managementpartner_client.partner.delete(self.partner_id) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_base_client.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_base_client.py index e73f2c1d38f8..26a8ae843bdd 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_base_client.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_base_client.py @@ -29,9 +29,7 @@ def _authentication_policy(credential): class MapsGeolocationClientBase: def __init__( - self, - credential: Union[AzureKeyCredential, AzureSasCredential, TokenCredential], - **kwargs: Any + self, credential: Union[AzureKeyCredential, AzureSasCredential, TokenCredential], **kwargs: Any ) -> None: self._maps_client = _GeolocationClient( credential=credential, # type: ignore diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_patch.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_patch.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/_patch.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/_patch.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/operations/_patch.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/operations/_patch.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/models/_patch.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/models/_patch.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/operations/_patch.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/operations/_patch.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/aio/_base_client_async.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/aio/_base_client_async.py index c224835c686e..dfc5a8ad29b8 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/aio/_base_client_async.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/aio/_base_client_async.py @@ -29,9 +29,7 @@ def _authentication_policy(credential): class AsyncMapsGeolocationClientBase: def __init__( - self, - credential: Union[AzureKeyCredential, AzureSasCredential, AsyncTokenCredential], - **kwargs: Any + self, credential: Union[AzureKeyCredential, AzureSasCredential, AsyncTokenCredential], **kwargs: Any ) -> None: self._maps_client = _MapsGeolocationClient( credential=credential, # type: ignore diff --git a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/models/__init__.py b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/models/__init__.py index 375339909f89..75d1dba88bf3 100644 --- a/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/models/__init__.py +++ b/sdk/maps/azure-maps-geolocation/azure/maps/geolocation/models/__init__.py @@ -1,4 +1,3 @@ from ._models import CountryRegionResult - __all__ = ["CountryRegionResult"] diff --git a/sdk/maps/azure-maps-geolocation/samples/async_samples/sample_get_country_code_async.py b/sdk/maps/azure-maps-geolocation/samples/async_samples/sample_get_country_code_async.py index ccf7ad9409a4..fd484a738215 100644 --- a/sdk/maps/azure-maps-geolocation/samples/async_samples/sample_get_country_code_async.py +++ b/sdk/maps/azure-maps-geolocation/samples/async_samples/sample_get_country_code_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-render/azure/maps/render/__init__.py b/sdk/maps/azure-maps-render/azure/maps/render/__init__.py index 1db76f54815a..f060df8028a9 100644 --- a/sdk/maps/azure-maps-render/azure/maps/render/__init__.py +++ b/sdk/maps/azure-maps-render/azure/maps/render/__init__.py @@ -25,7 +25,6 @@ _patch_all = [] from ._patch import patch_sdk as _patch_sdk - __all__ = [ "TilesetID", "StaticMapLayer", diff --git a/sdk/maps/azure-maps-render/azure/maps/render/_patch.py b/sdk/maps/azure-maps-render/azure/maps/render/_patch.py index fb60e23d3ba2..8f2959c2d09c 100644 --- a/sdk/maps/azure-maps-render/azure/maps/render/_patch.py +++ b/sdk/maps/azure-maps-render/azure/maps/render/_patch.py @@ -48,9 +48,7 @@ def _authentication_policy(credential): # pylint: disable=C4748 class MapsRenderClient(MapsRenderClientGenerated): def __init__( - self, - credential: Union[AzureKeyCredential, AzureSasCredential, TokenCredential], - **kwargs: Any + self, credential: Union[AzureKeyCredential, AzureSasCredential, TokenCredential], **kwargs: Any ) -> None: super().__init__( credential=credential, # type: ignore diff --git a/sdk/maps/azure-maps-render/azure/maps/render/aio/_patch.py b/sdk/maps/azure-maps-render/azure/maps/render/aio/_patch.py index 5e25dc92dd9d..b47eaaebdeb8 100644 --- a/sdk/maps/azure-maps-render/azure/maps/render/aio/_patch.py +++ b/sdk/maps/azure-maps-render/azure/maps/render/aio/_patch.py @@ -48,9 +48,7 @@ def _authentication_policy(credential): # pylint: disable=C4748 class MapsRenderClient(MapsRenderClientGenerated): def __init__( - self, - credential: Union[AzureKeyCredential, AzureSasCredential, AsyncTokenCredential], - **kwargs: Any + self, credential: Union[AzureKeyCredential, AzureSasCredential, AsyncTokenCredential], **kwargs: Any ) -> None: super().__init__( credential=credential, # type: ignore diff --git a/sdk/maps/azure-maps-render/azure/maps/render/aio/operations/_patch.py b/sdk/maps/azure-maps-render/azure/maps/render/aio/operations/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/maps/azure-maps-render/azure/maps/render/aio/operations/_patch.py +++ b/sdk/maps/azure-maps-render/azure/maps/render/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-render/azure/maps/render/operations/_patch.py b/sdk/maps/azure-maps-render/azure/maps/render/operations/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/maps/azure-maps-render/azure/maps/render/operations/_patch.py +++ b/sdk/maps/azure-maps-render/azure/maps/render/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_tile_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_tile_async.py index dc436186f30f..98e13f6195ad 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_tile_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_tile_async.py @@ -19,6 +19,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_world_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_world_async.py index 2ca542f5a1b6..ae63e4c4dd9a 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_world_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_copyright_for_world_async.py @@ -20,6 +20,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_attribution_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_attribution_async.py index 5d8797ab483c..614515ddcc8d 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_attribution_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_attribution_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_static_image_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_static_image_async.py index dfeeea6af8a3..26006d729d58 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_static_image_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_static_image_async.py @@ -15,6 +15,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tile_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tile_async.py index 19c6616235f4..e660fa57e1f3 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tile_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tile_async.py @@ -18,6 +18,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py index 05ebb564b3b1..611f357ddba8 100644 --- a/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py +++ b/sdk/maps/azure-maps-render/samples/async_samples/sample_get_map_tileset_async.py @@ -15,6 +15,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-route/azure/maps/route/_patch.py b/sdk/maps/azure-maps-route/azure/maps/route/_patch.py index f62216492ea8..d0cf31dd119a 100644 --- a/sdk/maps/azure-maps-route/azure/maps/route/_patch.py +++ b/sdk/maps/azure-maps-route/azure/maps/route/_patch.py @@ -46,9 +46,7 @@ def _authentication_policy(credential): # pylint: disable=C4748 class MapsRouteClient(MapsRouteClientGenerated): def __init__( - self, - credential: Union[AzureKeyCredential, AzureSasCredential, TokenCredential], - **kwargs: Any + self, credential: Union[AzureKeyCredential, AzureSasCredential, TokenCredential], **kwargs: Any ) -> None: super().__init__( credential=credential, # type: ignore diff --git a/sdk/maps/azure-maps-route/azure/maps/route/aio/_patch.py b/sdk/maps/azure-maps-route/azure/maps/route/aio/_patch.py index 23fb59d77551..b73cd14ab47f 100644 --- a/sdk/maps/azure-maps-route/azure/maps/route/aio/_patch.py +++ b/sdk/maps/azure-maps-route/azure/maps/route/aio/_patch.py @@ -47,9 +47,7 @@ def _authentication_policy(credential): # pylint: disable=C4748 class MapsRouteClient(MapsRouteClientGenerated): def __init__( - self, - credential: Union[AzureKeyCredential, AzureSasCredential, AsyncTokenCredential], - **kwargs: Any + self, credential: Union[AzureKeyCredential, AzureSasCredential, AsyncTokenCredential], **kwargs: Any ) -> None: super().__init__( credential=credential, # type: ignore diff --git a/sdk/maps/azure-maps-route/azure/maps/route/aio/operations/_patch.py b/sdk/maps/azure-maps-route/azure/maps/route/aio/operations/_patch.py index f2718a9b0ca2..bdccdc7d6482 100644 --- a/sdk/maps/azure-maps-route/azure/maps/route/aio/operations/_patch.py +++ b/sdk/maps/azure-maps-route/azure/maps/route/aio/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Union, Any, Tuple from azure.core.tracing.decorator_async import distributed_trace_async diff --git a/sdk/maps/azure-maps-route/azure/maps/route/models/_patch.py b/sdk/maps/azure-maps-route/azure/maps/route/models/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/maps/azure-maps-route/azure/maps/route/models/_patch.py +++ b/sdk/maps/azure-maps-route/azure/maps/route/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-route/azure/maps/route/operations/_patch.py b/sdk/maps/azure-maps-route/azure/maps/route/operations/_patch.py index fecfc7c7ce5b..56fc76caed03 100644 --- a/sdk/maps/azure-maps-route/azure/maps/route/operations/_patch.py +++ b/sdk/maps/azure-maps-route/azure/maps/route/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Union, Any, Tuple from azure.core.tracing.decorator import distributed_trace diff --git a/sdk/maps/azure-maps-route/samples/async_samples/sample_begin_get_route_directions_batch_async.py b/sdk/maps/azure-maps-route/samples/async_samples/sample_begin_get_route_directions_batch_async.py index c5b569acf44f..a685c82583ff 100644 --- a/sdk/maps/azure-maps-route/samples/async_samples/sample_begin_get_route_directions_batch_async.py +++ b/sdk/maps/azure-maps-route/samples/async_samples/sample_begin_get_route_directions_batch_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_async.py b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_async.py index 73ac0be3110c..572c964600d2 100644 --- a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_async.py +++ b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_batch_sync_async.py b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_batch_sync_async.py index 51e90cfd15ae..4cedff42766d 100644 --- a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_batch_sync_async.py +++ b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_directions_batch_sync_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os from re import M diff --git a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_matrix_async.py b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_matrix_async.py index 8aea0bc3d3ec..176283ac7322 100644 --- a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_matrix_async.py +++ b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_matrix_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_range_async.py b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_range_async.py index bb04373079a1..e573bbe75f9a 100644 --- a/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_range_async.py +++ b/sdk/maps/azure-maps-route/samples/async_samples/sample_get_route_range_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-route/samples/sample_begin_get_route_directions_batch.py b/sdk/maps/azure-maps-route/samples/sample_begin_get_route_directions_batch.py index 1c2a6ca239c6..215952e359d6 100644 --- a/sdk/maps/azure-maps-route/samples/sample_begin_get_route_directions_batch.py +++ b/sdk/maps/azure-maps-route/samples/sample_begin_get_route_directions_batch.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY", "your subscription key") diff --git a/sdk/maps/azure-maps-route/samples/sample_get_route_directions.py b/sdk/maps/azure-maps-route/samples/sample_get_route_directions.py index f67580146629..97912069fb49 100644 --- a/sdk/maps/azure-maps-route/samples/sample_get_route_directions.py +++ b/sdk/maps/azure-maps-route/samples/sample_get_route_directions.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY", "your subscription key") diff --git a/sdk/maps/azure-maps-route/samples/sample_get_route_directions_batch_sync.py b/sdk/maps/azure-maps-route/samples/sample_get_route_directions_batch_sync.py index 85a9c96a2aca..2fbff70e3d36 100644 --- a/sdk/maps/azure-maps-route/samples/sample_get_route_directions_batch_sync.py +++ b/sdk/maps/azure-maps-route/samples/sample_get_route_directions_batch_sync.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY", "your subscription key") diff --git a/sdk/maps/azure-maps-route/samples/sample_get_route_matrix.py b/sdk/maps/azure-maps-route/samples/sample_get_route_matrix.py index 1bd086187a58..2806e2cb8f5f 100644 --- a/sdk/maps/azure-maps-route/samples/sample_get_route_matrix.py +++ b/sdk/maps/azure-maps-route/samples/sample_get_route_matrix.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY", "your subscription key") diff --git a/sdk/maps/azure-maps-route/samples/sample_get_route_range.py b/sdk/maps/azure-maps-route/samples/sample_get_route_range.py index f07f1b1a003f..ef3634986ed0 100644 --- a/sdk/maps/azure-maps-route/samples/sample_get_route_range.py +++ b/sdk/maps/azure-maps-route/samples/sample_get_route_range.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY", "your subscription key") diff --git a/sdk/maps/azure-maps-search/azure/maps/search/_patch.py b/sdk/maps/azure-maps-search/azure/maps/search/_patch.py index 3717834878a1..993a99ae6bc8 100644 --- a/sdk/maps/azure-maps-search/azure/maps/search/_patch.py +++ b/sdk/maps/azure-maps-search/azure/maps/search/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=unused-import,ungrouped-imports, R0904, C0302 from typing import Union, Any, MutableMapping, List, Optional diff --git a/sdk/maps/azure-maps-search/azure/maps/search/aio/_patch.py b/sdk/maps/azure-maps-search/azure/maps/search/aio/_patch.py index fec1bf787fee..4764b759d157 100644 --- a/sdk/maps/azure-maps-search/azure/maps/search/aio/_patch.py +++ b/sdk/maps/azure-maps-search/azure/maps/search/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=unused-import,ungrouped-imports, R0904, C0302 from typing import Union, Any, MutableMapping, List, Optional diff --git a/sdk/maps/azure-maps-search/azure/maps/search/aio/operations/_patch.py b/sdk/maps/azure-maps-search/azure/maps/search/aio/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/maps/azure-maps-search/azure/maps/search/aio/operations/_patch.py +++ b/sdk/maps/azure-maps-search/azure/maps/search/aio/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-search/azure/maps/search/operations/_patch.py b/sdk/maps/azure-maps-search/azure/maps/search/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/maps/azure-maps-search/azure/maps/search/operations/_patch.py +++ b/sdk/maps/azure-maps-search/azure/maps/search/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_async.py b/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_async.py index e76d6a19ebe5..b96d7031981a 100644 --- a/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_async.py +++ b/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_batch_async.py b/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_batch_async.py index 4dce0744c1b7..3d330f6fdae5 100644 --- a/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_batch_async.py +++ b/sdk/maps/azure-maps-search/samples/async_samples/sample_geocode_batch_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-search/samples/async_samples/sample_get_polygon_async.py b/sdk/maps/azure-maps-search/samples/async_samples/sample_get_polygon_async.py index 2c69f8bb086c..ae74ed2245a7 100644 --- a/sdk/maps/azure-maps-search/samples/async_samples/sample_get_polygon_async.py +++ b/sdk/maps/azure-maps-search/samples/async_samples/sample_get_polygon_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_async.py b/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_async.py index 503cd659c62c..7fe2f7352c32 100644 --- a/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_async.py +++ b/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_batch_async.py b/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_batch_async.py index 40221c238084..4bc5146823a8 100644 --- a/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_batch_async.py +++ b/sdk/maps/azure-maps-search/samples/async_samples/sample_reverse_geocode_batch_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-search/samples/sample_geocode.py b/sdk/maps/azure-maps-search/samples/sample_geocode.py index 32b23f215eb3..b797edac9c70 100644 --- a/sdk/maps/azure-maps-search/samples/sample_geocode.py +++ b/sdk/maps/azure-maps-search/samples/sample_geocode.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-search/samples/sample_geocode_batch.py b/sdk/maps/azure-maps-search/samples/sample_geocode_batch.py index 9fddc80a6982..4ada9ea29923 100644 --- a/sdk/maps/azure-maps-search/samples/sample_geocode_batch.py +++ b/sdk/maps/azure-maps-search/samples/sample_geocode_batch.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-search/samples/sample_get_polygon.py b/sdk/maps/azure-maps-search/samples/sample_get_polygon.py index 847882c04821..ab6d3ddfce09 100644 --- a/sdk/maps/azure-maps-search/samples/sample_get_polygon.py +++ b/sdk/maps/azure-maps-search/samples/sample_get_polygon.py @@ -16,13 +16,13 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError from azure.maps.search import Resolution from azure.maps.search import BoundaryResultType - subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY", "your subscription key") diff --git a/sdk/maps/azure-maps-timezone/azure/maps/timezone/_patch.py b/sdk/maps/azure-maps-timezone/azure/maps/timezone/_patch.py index 81c15f488e1f..8e1bd1ba70ae 100644 --- a/sdk/maps/azure-maps-timezone/azure/maps/timezone/_patch.py +++ b/sdk/maps/azure-maps-timezone/azure/maps/timezone/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=unused-import import datetime import sys diff --git a/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/_patch.py b/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/_patch.py index 408ff679a13d..446db0be2a42 100644 --- a/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/_patch.py +++ b/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=unused-import import datetime import sys diff --git a/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/operations/_patch.py b/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/operations/_patch.py +++ b/sdk/maps/azure-maps-timezone/azure/maps/timezone/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-timezone/azure/maps/timezone/operations/_patch.py b/sdk/maps/azure-maps-timezone/azure/maps/timezone/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-maps-timezone/azure/maps/timezone/operations/_patch.py +++ b/sdk/maps/azure-maps-timezone/azure/maps/timezone/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-maps-timezone/samples/async_samples/convert_windows_timezone_to_iana_async.py b/sdk/maps/azure-maps-timezone/samples/async_samples/convert_windows_timezone_to_iana_async.py index c21b59696f7d..23b20c80e53d 100644 --- a/sdk/maps/azure-maps-timezone/samples/async_samples/convert_windows_timezone_to_iana_async.py +++ b/sdk/maps/azure-maps-timezone/samples/async_samples/convert_windows_timezone_to_iana_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_timezone_ids_async.py b/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_timezone_ids_async.py index dc5e8bed617b..0a384abf582d 100644 --- a/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_timezone_ids_async.py +++ b/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_timezone_ids_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_version_async.py b/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_version_async.py index 21e094e37b1a..2f7e245035be 100644 --- a/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_version_async.py +++ b/sdk/maps/azure-maps-timezone/samples/async_samples/get_iana_version_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_coordinates_async.py b/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_coordinates_async.py index 46df5688093f..8103fb1eb20c 100644 --- a/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_coordinates_async.py +++ b/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_coordinates_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_id_async.py b/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_id_async.py index ca21e9bbffde..188d8e1de310 100644 --- a/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_id_async.py +++ b/sdk/maps/azure-maps-timezone/samples/async_samples/get_timezone_by_id_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-timezone/samples/async_samples/get_windows_timezone_ids_async.py b/sdk/maps/azure-maps-timezone/samples/async_samples/get_windows_timezone_ids_async.py index 176b4ae9c2f5..c768653fb6ee 100644 --- a/sdk/maps/azure-maps-timezone/samples/async_samples/get_windows_timezone_ids_async.py +++ b/sdk/maps/azure-maps-timezone/samples/async_samples/get_windows_timezone_ids_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os diff --git a/sdk/maps/azure-maps-timezone/samples/convert_windows_timezone_to_iana.py b/sdk/maps/azure-maps-timezone/samples/convert_windows_timezone_to_iana.py index bf83d4059c3e..cb9e8550edba 100644 --- a/sdk/maps/azure-maps-timezone/samples/convert_windows_timezone_to_iana.py +++ b/sdk/maps/azure-maps-timezone/samples/convert_windows_timezone_to_iana.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-timezone/samples/get_iana_timezone_ids.py b/sdk/maps/azure-maps-timezone/samples/get_iana_timezone_ids.py index d61cc1410a19..a9fb558113ac 100644 --- a/sdk/maps/azure-maps-timezone/samples/get_iana_timezone_ids.py +++ b/sdk/maps/azure-maps-timezone/samples/get_iana_timezone_ids.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-timezone/samples/get_iana_version.py b/sdk/maps/azure-maps-timezone/samples/get_iana_version.py index c29f3e0666cc..05a12f253ed0 100644 --- a/sdk/maps/azure-maps-timezone/samples/get_iana_version.py +++ b/sdk/maps/azure-maps-timezone/samples/get_iana_version.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-timezone/samples/get_timezone_by_coordinates.py b/sdk/maps/azure-maps-timezone/samples/get_timezone_by_coordinates.py index 135342d1c488..b3b2eea4e51c 100644 --- a/sdk/maps/azure-maps-timezone/samples/get_timezone_by_coordinates.py +++ b/sdk/maps/azure-maps-timezone/samples/get_timezone_by_coordinates.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-timezone/samples/get_timezone_by_id.py b/sdk/maps/azure-maps-timezone/samples/get_timezone_by_id.py index 055be82c7313..b9334764c737 100644 --- a/sdk/maps/azure-maps-timezone/samples/get_timezone_by_id.py +++ b/sdk/maps/azure-maps-timezone/samples/get_timezone_by_id.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-timezone/samples/get_windows_timezone_ids.py b/sdk/maps/azure-maps-timezone/samples/get_windows_timezone_ids.py index 30577bbc1dee..7c115fcb4ca9 100644 --- a/sdk/maps/azure-maps-timezone/samples/get_windows_timezone_ids.py +++ b/sdk/maps/azure-maps-timezone/samples/get_windows_timezone_ids.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os from azure.core.exceptions import HttpResponseError diff --git a/sdk/maps/azure-maps-weather/azure/maps/weather/_patch.py b/sdk/maps/azure-maps-weather/azure/maps/weather/_patch.py index 1b97468ccbfd..2ad0db4795a9 100644 --- a/sdk/maps/azure-maps-weather/azure/maps/weather/_patch.py +++ b/sdk/maps/azure-maps-weather/azure/maps/weather/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=unused-import from typing import Union, Any, List diff --git a/sdk/maps/azure-maps-weather/azure/maps/weather/aio/_patch.py b/sdk/maps/azure-maps-weather/azure/maps/weather/aio/_patch.py index 94623491c87e..ed2b3cf6f8c2 100644 --- a/sdk/maps/azure-maps-weather/azure/maps/weather/aio/_patch.py +++ b/sdk/maps/azure-maps-weather/azure/maps/weather/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Union, Any, List from azure.core.credentials import AzureKeyCredential diff --git a/sdk/maps/azure-maps-weather/azure/maps/weather/aio/operations/_patch.py b/sdk/maps/azure-maps-weather/azure/maps/weather/aio/operations/_patch.py index 96fcab25106e..0358161749fa 100644 --- a/sdk/maps/azure-maps-weather/azure/maps/weather/aio/operations/_patch.py +++ b/sdk/maps/azure-maps-weather/azure/maps/weather/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Optional import sys diff --git a/sdk/maps/azure-maps-weather/azure/maps/weather/operations/_patch.py b/sdk/maps/azure-maps-weather/azure/maps/weather/operations/_patch.py index 99d93eccb3b6..23f55d4c7bbd 100644 --- a/sdk/maps/azure-maps-weather/azure/maps/weather/operations/_patch.py +++ b/sdk/maps/azure-maps-weather/azure/maps/weather/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Optional import sys diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_daily_forecasts_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_daily_forecasts_async.py index ef167920e96c..961f68e15805 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_daily_forecasts_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_daily_forecasts_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_hourly_forecasts_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_hourly_forecasts_async.py index 7d0b472785d3..5a6f6d36e64a 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_hourly_forecasts_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_air_quality_hourly_forecasts_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_current_air_quality_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_current_air_quality_async.py index b7a20c59db96..a5ecf8e93779 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_current_air_quality_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_current_air_quality_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_current_conditions_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_current_conditions_async.py index 18e89d34007e..7a1a23639b8d 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_current_conditions_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_current_conditions_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_forecast_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_forecast_async.py index 5de8ca047541..e7478c8d5045 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_forecast_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_forecast_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_actuals_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_actuals_async.py index 2463806f82ef..51cad5ab8f5e 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_actuals_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_actuals_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_normals_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_normals_async.py index 13ecf212ed26..23afa6a653ca 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_normals_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_normals_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_records_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_records_async.py index 95ea5c525272..931f16461240 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_records_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_historical_records_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_indices_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_indices_async.py index 4a01bd2e1d14..26447e6a4c4c 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_indices_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_daily_indices_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_hourly_forecast_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_hourly_forecast_async.py index 3e3cd44bb464..127482c20121 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_hourly_forecast_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_hourly_forecast_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_minute_forecast_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_minute_forecast_async.py index d063859e5348..c656c03711de 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_minute_forecast_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_minute_forecast_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_quarter_day_forecast_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_quarter_day_forecast_async.py index 9ae55b422073..80f5c3da9ec0 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_quarter_day_forecast_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_quarter_day_forecast_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_severe_weather_alerts_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_severe_weather_alerts_async.py index 6a850d2a1428..34a74b712550 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_severe_weather_alerts_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_severe_weather_alerts_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_active_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_active_async.py index e506bc619fec..8228044ec210 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_active_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_active_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_forecast_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_forecast_async.py index 7c2bb2f3c529..6ae77dcc6388 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_forecast_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_forecast_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_locations_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_locations_async.py index 3a202599e27b..734d006b8ce7 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_locations_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_locations_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_search_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_search_async.py index 0eeacb78afd1..2c9150a69f57 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_search_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_tropical_storm_search_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/async_samples/get_weather_along_route_async.py b/sdk/maps/azure-maps-weather/samples/async_samples/get_weather_along_route_async.py index 2fdcf333cacd..9156eb738f14 100644 --- a/sdk/maps/azure-maps-weather/samples/async_samples/get_weather_along_route_async.py +++ b/sdk/maps/azure-maps-weather/samples/async_samples/get_weather_along_route_async.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import asyncio import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_air_quality_daily_forecasts.py b/sdk/maps/azure-maps-weather/samples/get_air_quality_daily_forecasts.py index 0d1158f32d18..dd1dadebd331 100644 --- a/sdk/maps/azure-maps-weather/samples/get_air_quality_daily_forecasts.py +++ b/sdk/maps/azure-maps-weather/samples/get_air_quality_daily_forecasts.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_air_quality_hourly_forecasts.py b/sdk/maps/azure-maps-weather/samples/get_air_quality_hourly_forecasts.py index 66cda72ee091..049e9070c4ea 100644 --- a/sdk/maps/azure-maps-weather/samples/get_air_quality_hourly_forecasts.py +++ b/sdk/maps/azure-maps-weather/samples/get_air_quality_hourly_forecasts.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_current_air_quality.py b/sdk/maps/azure-maps-weather/samples/get_current_air_quality.py index d7d0bcf55a6e..0b6a57e5821a 100644 --- a/sdk/maps/azure-maps-weather/samples/get_current_air_quality.py +++ b/sdk/maps/azure-maps-weather/samples/get_current_air_quality.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_current_conditions.py b/sdk/maps/azure-maps-weather/samples/get_current_conditions.py index fbf7e19c1bff..d56777251e67 100644 --- a/sdk/maps/azure-maps-weather/samples/get_current_conditions.py +++ b/sdk/maps/azure-maps-weather/samples/get_current_conditions.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_daily_forecast.py b/sdk/maps/azure-maps-weather/samples/get_daily_forecast.py index 0c6c8becfce3..6dbcac3df833 100644 --- a/sdk/maps/azure-maps-weather/samples/get_daily_forecast.py +++ b/sdk/maps/azure-maps-weather/samples/get_daily_forecast.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_daily_historical_actuals.py b/sdk/maps/azure-maps-weather/samples/get_daily_historical_actuals.py index e98ea7facda9..de4c6ba72c6b 100644 --- a/sdk/maps/azure-maps-weather/samples/get_daily_historical_actuals.py +++ b/sdk/maps/azure-maps-weather/samples/get_daily_historical_actuals.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json import datetime diff --git a/sdk/maps/azure-maps-weather/samples/get_daily_historical_normals.py b/sdk/maps/azure-maps-weather/samples/get_daily_historical_normals.py index e52fd83639ba..dd250f3d7a74 100644 --- a/sdk/maps/azure-maps-weather/samples/get_daily_historical_normals.py +++ b/sdk/maps/azure-maps-weather/samples/get_daily_historical_normals.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json import datetime diff --git a/sdk/maps/azure-maps-weather/samples/get_daily_historical_records.py b/sdk/maps/azure-maps-weather/samples/get_daily_historical_records.py index fd566cf17458..bd4ce53bd4c1 100644 --- a/sdk/maps/azure-maps-weather/samples/get_daily_historical_records.py +++ b/sdk/maps/azure-maps-weather/samples/get_daily_historical_records.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json import datetime diff --git a/sdk/maps/azure-maps-weather/samples/get_daily_indices.py b/sdk/maps/azure-maps-weather/samples/get_daily_indices.py index a878159e38c7..5256f035f822 100644 --- a/sdk/maps/azure-maps-weather/samples/get_daily_indices.py +++ b/sdk/maps/azure-maps-weather/samples/get_daily_indices.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_hourly_forecast.py b/sdk/maps/azure-maps-weather/samples/get_hourly_forecast.py index c027e3fdf3f6..3f4c4d09ad17 100644 --- a/sdk/maps/azure-maps-weather/samples/get_hourly_forecast.py +++ b/sdk/maps/azure-maps-weather/samples/get_hourly_forecast.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_minute_forecast.py b/sdk/maps/azure-maps-weather/samples/get_minute_forecast.py index e66956559a2a..766ae17f0c23 100644 --- a/sdk/maps/azure-maps-weather/samples/get_minute_forecast.py +++ b/sdk/maps/azure-maps-weather/samples/get_minute_forecast.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_quarter_day_forecast.py b/sdk/maps/azure-maps-weather/samples/get_quarter_day_forecast.py index f073ed366e99..c5fc49b19e33 100644 --- a/sdk/maps/azure-maps-weather/samples/get_quarter_day_forecast.py +++ b/sdk/maps/azure-maps-weather/samples/get_quarter_day_forecast.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_severe_weather_alerts.py b/sdk/maps/azure-maps-weather/samples/get_severe_weather_alerts.py index 57a358129145..d471724d428a 100644 --- a/sdk/maps/azure-maps-weather/samples/get_severe_weather_alerts.py +++ b/sdk/maps/azure-maps-weather/samples/get_severe_weather_alerts.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_active.py b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_active.py index 5058ee55dd03..3b0b990e2eae 100644 --- a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_active.py +++ b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_active.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_forecast.py b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_forecast.py index e189bdc46983..5708c5cee87c 100644 --- a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_forecast.py +++ b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_forecast.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_locations.py b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_locations.py index 7e0d2d55d9ef..fb424e2d0ebf 100644 --- a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_locations.py +++ b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_locations.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_search.py b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_search.py index 127ff12355bc..1a37be70a611 100644 --- a/sdk/maps/azure-maps-weather/samples/get_tropical_storm_search.py +++ b/sdk/maps/azure-maps-weather/samples/get_tropical_storm_search.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-maps-weather/samples/get_weather_along_route.py b/sdk/maps/azure-maps-weather/samples/get_weather_along_route.py index a0de29bf3245..39c918910f69 100644 --- a/sdk/maps/azure-maps-weather/samples/get_weather_along_route.py +++ b/sdk/maps/azure-maps-weather/samples/get_weather_along_route.py @@ -16,6 +16,7 @@ Set the environment variables with your own values before running the sample: - AZURE_SUBSCRIPTION_KEY - your subscription key """ + import os import json diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_patch.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_patch.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_patch.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_patch.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_patch.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_patch.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_patch.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_patch.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_patch.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_patch.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/_patch.py b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/_patch.py +++ b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/_patch.py b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/_patch.py +++ b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/operations/_patch.py b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/operations/_patch.py +++ b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/_patch.py b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/_patch.py +++ b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/_patch.py b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/_patch.py +++ b/sdk/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/_patch.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/_patch.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_patch.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_patch.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_patch.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_patch.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_patch.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_patch.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_patch.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_patch.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/media/azure-mgmt-media/setup.py b/sdk/media/azure-mgmt-media/setup.py index 19e87628844d..eaf0a73b508d 100644 --- a/sdk/media/azure-mgmt-media/setup.py +++ b/sdk/media/azure-mgmt-media/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Media Services" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 7 - Inactive', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 7 - Inactive", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/media/azure-mgmt-media/tests/test_mgmt_media.py b/sdk/media/azure-mgmt-media/tests/test_mgmt_media.py index e9878ed052f8..4ccb320d2692 100644 --- a/sdk/media/azure-mgmt-media/tests/test_mgmt_media.py +++ b/sdk/media/azure-mgmt-media/tests/test_mgmt_media.py @@ -1,87 +1,76 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import azure.mgmt.media import azure.mgmt.storage from devtools_testutils import ( - AzureMgmtRecordedTestCase, ResourceGroupPreparer, - StorageAccountPreparer, FakeStorageAccount, + AzureMgmtRecordedTestCase, + ResourceGroupPreparer, + StorageAccountPreparer, + FakeStorageAccount, ) - PLAYBACK_STORAGE_ID = ( - '/subscriptions/00000000-0000-0000-0000-000000000000/' - 'resourceGroups/test_mgmt_media_test_media8fdd0a81/' - 'providers/Microsoft.Storage/storageAccounts/msmediapttest' + "/subscriptions/00000000-0000-0000-0000-000000000000/" + "resourceGroups/test_mgmt_media_test_media8fdd0a81/" + "providers/Microsoft.Storage/storageAccounts/msmediapttest" ) FAKE_STORAGE = FakeStorageAccount( - name='msmediapttest', + name="msmediapttest", id=PLAYBACK_STORAGE_ID, ) raise unittest.SkipTest("Skipping all tests") + + class TestMgmtMedia(AzureMgmtRecordedTestCase): def setUp(self): super(MgmtMediaTest, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.media.AzureMediaServices - ) + self.client = self.create_mgmt_client(azure.mgmt.media.AzureMediaServices) @ResourceGroupPreparer() - @StorageAccountPreparer(name_prefix='msmediapttest', playback_fake_resource=FAKE_STORAGE) + @StorageAccountPreparer(name_prefix="msmediapttest", playback_fake_resource=FAKE_STORAGE) def test_media(self, resource_group, location, storage_account): - media_name = self.get_resource_name('pymedia') + media_name = self.get_resource_name("pymedia") - available = self.client.locations.check_name_availability( - media_name - ) + available = self.client.locations.check_name_availability(media_name) self.assertTrue(available.name_available) media_obj = self.client.mediaservices.create( resource_group.name, media_name, { - 'location': location, - 'storage_accounts': [{ - 'id': storage_account.id, - 'is_primary': True, - }] - } + "location": location, + "storage_accounts": [ + { + "id": storage_account.id, + "is_primary": True, + } + ], + }, ) - media_obj = self.client.mediaservices.get( - resource_group.name, - media_name - ) + media_obj = self.client.mediaservices.get(resource_group.name, media_name) self.assertEqual(media_obj.name, media_name) medias = list(self.client.mediaservices.list_by_resource_group(resource_group.name)) self.assertEqual(len(medias), 1) self.assertEqual(medias[0].name, media_name) - self.client.mediaservices.sync_storage_keys( - resource_group.name, - media_name, - storage_account.id - ) - - media_obj = self.client.mediaservices.delete( - resource_group.name, - media_name - ) - + self.client.mediaservices.sync_storage_keys(resource_group.name, media_name, storage_account.id) + media_obj = self.client.mediaservices.delete(resource_group.name, media_name) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/_patch.py b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/_patch.py +++ b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/_patch.py b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/_patch.py +++ b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/operations/_patch.py b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/operations/_patch.py +++ b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/models/_patch.py b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/models/_patch.py +++ b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/operations/_patch.py b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/operations/_patch.py +++ b/sdk/migrate/azure-mgmt-migrationassessment/azure/mgmt/migrationassessment/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrate/azure-mgmt-migrationassessment/setup.py b/sdk/migrate/azure-mgmt-migrationassessment/setup.py index 5d9750a2057d..9c8428cd4491 100644 --- a/sdk/migrate/azure-mgmt-migrationassessment/setup.py +++ b/sdk/migrate/azure-mgmt-migrationassessment/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/_patch.py b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/_patch.py +++ b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/_patch.py b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/_patch.py +++ b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/operations/_patch.py b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/operations/_patch.py +++ b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/models/_patch.py b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/models/_patch.py +++ b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/operations/_patch.py b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/operations/_patch.py +++ b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/azure/mgmt/migrationdiscoverysap/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/setup.py b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/setup.py index 217800d882c3..080eae7739f1 100644 --- a/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/setup.py +++ b/sdk/migrationdiscovery/azure-mgmt-migrationdiscoverysap/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_patch.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_patch.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/_patch.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/_patch.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/operations/_patch.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/operations/_patch.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_patch.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_patch.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_patch.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_patch.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/setup.py b/sdk/mixedreality/azure-mgmt-mixedreality/setup.py index 55b302e00ab2..b0c5170cac48 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/setup.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Mixed Reality Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 7 - Inactive', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 7 - Inactive", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/__init__.py index 431ed648086a..04b2d15468fe 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/__init__.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/__init__.py index 431ed648086a..04b2d15468fe 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/__init__.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/__init__.py index 2996cdaaeb4c..8467dcecae10 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/__init__.py @@ -8,4 +8,4 @@ from ._client import MixedRealityStsClient __version__ = VERSION -__all__ = ['MixedRealityStsClient'] +__all__ = ["MixedRealityStsClient"] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_client.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_client.py index fbbe3ac3a9af..65b16b46167d 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_client.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_client.py @@ -8,7 +8,7 @@ try: from urllib.parse import urlparse except ImportError: - from urlparse import urlparse # type: ignore + from urlparse import urlparse # type: ignore from azure.core.credentials import AzureKeyCredential from azure.core.tracing.decorator import distributed_trace @@ -28,8 +28,8 @@ from azure.core.credentials import AccessToken -class MixedRealityStsClient(object): # pylint: disable=client-accepts-api-version-keyword - """ A client to interact with the Mixed Reality STS service. +class MixedRealityStsClient(object): # pylint: disable=client-accepts-api-version-keyword + """A client to interact with the Mixed Reality STS service. :param str account_id: The Mixed Reality service account identifier. @@ -60,27 +60,25 @@ def __init__(self, account_id, account_domain, credential, **kwargs): self._credential = credential - endpoint_url = kwargs.pop('custom_endpoint_url', construct_endpoint_url(account_domain)) + endpoint_url = kwargs.pop("custom_endpoint_url", construct_endpoint_url(account_domain)) try: - if not endpoint_url.lower().startswith('http'): + if not endpoint_url.lower().startswith("http"): endpoint_url = "https://" + endpoint_url except AttributeError as e: raise ValueError("Host URL must be a string.") from e - parsed_url = urlparse(endpoint_url.rstrip('/')) + parsed_url = urlparse(endpoint_url.rstrip("/")) if not parsed_url.netloc: raise ValueError("Invalid URL: {}".format(endpoint_url)) self._endpoint_url = endpoint_url - authentication_policy = BearerTokenCredentialPolicy(credential, endpoint_url + '/.default') + authentication_policy = BearerTokenCredentialPolicy(credential, endpoint_url + "/.default") self._client = MixedRealityStsRestClient( - base_url=endpoint_url, - authentication_policy=authentication_policy, - sdk_moniker=SDK_MONIKER, - **kwargs) + base_url=endpoint_url, authentication_policy=authentication_policy, sdk_moniker=SDK_MONIKER, **kwargs + ) @distributed_trace def get_token(self, **kwargs): @@ -93,10 +91,7 @@ def get_token(self, **kwargs): token_request_options = TokenRequestOptions() token_request_options.client_request_id = generate_cv_base() - response = self._client.get_token( - self._account_id, - token_request_options=token_request_options, - **kwargs) + response = self._client.get_token(self._account_id, token_request_options=token_request_options, **kwargs) return convert_to_access_token(response) def close(self): diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/__init__.py index 86838c6b621e..22a7740a8658 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- from ._mixed_reality_sts_rest_client import MixedRealityStsRestClient -__all__ = ['MixedRealityStsRestClient'] + +__all__ = ["MixedRealityStsRestClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_configuration.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_configuration.py index 9a762cc1fa5c..e9659d348550 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_configuration.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class MixedRealityStsRestClientConfiguration(Configuration): """Configuration for MixedRealityStsRestClient. @@ -26,26 +27,24 @@ class MixedRealityStsRestClientConfiguration(Configuration): """ def __init__( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None super(MixedRealityStsRestClientConfiguration, self).__init__(**kwargs) - kwargs.setdefault('sdk_moniker', 'mixedrealitystsrestclient/{}'.format(VERSION)) + kwargs.setdefault("sdk_moniker", "mixedrealitystsrestclient/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_mixed_reality_sts_rest_client.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_mixed_reality_sts_rest_client.py index 53973ea0933f..3666b6aadbe9 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_mixed_reality_sts_rest_client.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/_mixed_reality_sts_rest_client.py @@ -33,7 +33,7 @@ def __init__( ): # type: (...) -> None if not base_url: - base_url = 'https://sts.mixedreality.azure.com' + base_url = "https://sts.mixedreality.azure.com" self._config = MixedRealityStsRestClientConfiguration(**kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -42,7 +42,6 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - def close(self): # type: () -> None self._client.close() diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/__init__.py index 17251fcb2dbf..e758195dcefb 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._mixed_reality_sts_rest_client import MixedRealityStsRestClient -__all__ = ['MixedRealityStsRestClient'] + +__all__ = ["MixedRealityStsRestClient"] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_configuration.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_configuration.py index 6045303ca6c1..94eaaa25a368 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_configuration.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_configuration.py @@ -13,6 +13,7 @@ VERSION = "unknown" + class MixedRealityStsRestClientConfiguration(Configuration): """Configuration for MixedRealityStsRestClient. @@ -21,25 +22,19 @@ class MixedRealityStsRestClientConfiguration(Configuration): """ - def __init__( - self, - **kwargs: Any - ) -> None: + def __init__(self, **kwargs: Any) -> None: super(MixedRealityStsRestClientConfiguration, self).__init__(**kwargs) - kwargs.setdefault('sdk_moniker', 'mixedrealitystsrestclient/{}'.format(VERSION)) + kwargs.setdefault("sdk_moniker", "mixedrealitystsrestclient/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_mixed_reality_sts_rest_client.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_mixed_reality_sts_rest_client.py index 593e47542967..9e8b6a5789f2 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_mixed_reality_sts_rest_client.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/_mixed_reality_sts_rest_client.py @@ -22,13 +22,9 @@ class MixedRealityStsRestClient(MixedRealityStsRestClientOperationsMixin): :param str base_url: Service URL """ - def __init__( - self, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: + def __init__(self, base_url: Optional[str] = None, **kwargs: Any) -> None: if not base_url: - base_url = 'https://sts.mixedreality.azure.com' + base_url = "https://sts.mixedreality.azure.com" self._config = MixedRealityStsRestClientConfiguration(**kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -37,7 +33,6 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - async def close(self) -> None: await self._client.close() diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/__init__.py index 56b55f918c06..7cfa97b4eedc 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/__init__.py @@ -9,5 +9,5 @@ from ._mixed_reality_sts_rest_client_operations import MixedRealityStsRestClientOperationsMixin __all__ = [ - 'MixedRealityStsRestClientOperationsMixin', + "MixedRealityStsRestClientOperationsMixin", ] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/_mixed_reality_sts_rest_client_operations.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/_mixed_reality_sts_rest_client_operations.py index 90031d443396..bfe133323690 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/_mixed_reality_sts_rest_client_operations.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/aio/operations/_mixed_reality_sts_rest_client_operations.py @@ -8,15 +8,22 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class MixedRealityStsRestClientOperationsMixin: async def get_token( @@ -41,34 +48,32 @@ async def get_token( :rtype: ~azure.mixedreality.authentication._generated.models.StsTokenResponseMessage :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.StsTokenResponseMessage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - + cls = kwargs.pop("cls", None) # type: ClsType["_models.StsTokenResponseMessage"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + _client_request_id = None if token_request_options is not None: _client_request_id = token_request_options.client_request_id accept = "application/json" # Construct URL - url = self.get_token.metadata['url'] # type: ignore + url = self.get_token.metadata["url"] # type: ignore path_format_arguments = { - 'accountId': self._serialize.url("account_id", account_id, 'str'), + "accountId": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if api_version is not None: - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if _client_request_id is not None: - header_parameters['X-MRC-CV'] = self._serialize.header("client_request_id", _client_request_id, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["X-MRC-CV"] = self._serialize.header("client_request_id", _client_request_id, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -79,11 +84,12 @@ async def get_token( raise HttpResponseError(response=response) response_headers = {} - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('StsTokenResponseMessage', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("StsTokenResponseMessage", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - get_token.metadata = {'url': '/Accounts/{accountId}/token'} # type: ignore + + get_token.metadata = {"url": "/Accounts/{accountId}/token"} # type: ignore diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/__init__.py index 6e706bc24cdc..695e3dc79b7c 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/__init__.py @@ -14,6 +14,6 @@ from ._models import TokenRequestOptions # type: ignore __all__ = [ - 'StsTokenResponseMessage', - 'TokenRequestOptions', + "StsTokenResponseMessage", + "TokenRequestOptions", ] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models.py index 2b8d812be323..9e3818da6927 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models.py @@ -19,19 +19,16 @@ class StsTokenResponseMessage(msrest.serialization.Model): """ _validation = { - 'access_token': {'required': True}, + "access_token": {"required": True}, } _attribute_map = { - 'access_token': {'key': 'AccessToken', 'type': 'str'}, + "access_token": {"key": "AccessToken", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(StsTokenResponseMessage, self).__init__(**kwargs) - self.access_token = kwargs['access_token'] + self.access_token = kwargs["access_token"] class TokenRequestOptions(msrest.serialization.Model): @@ -43,12 +40,9 @@ class TokenRequestOptions(msrest.serialization.Model): """ _attribute_map = { - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + "client_request_id": {"key": "clientRequestId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TokenRequestOptions, self).__init__(**kwargs) - self.client_request_id = kwargs.get('client_request_id', None) + self.client_request_id = kwargs.get("client_request_id", None) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models_py3.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models_py3.py index 5ecff28c8992..071f133fbc48 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models_py3.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/models/_models_py3.py @@ -21,19 +21,14 @@ class StsTokenResponseMessage(msrest.serialization.Model): """ _validation = { - 'access_token': {'required': True}, + "access_token": {"required": True}, } _attribute_map = { - 'access_token': {'key': 'AccessToken', 'type': 'str'}, + "access_token": {"key": "AccessToken", "type": "str"}, } - def __init__( - self, - *, - access_token: str, - **kwargs - ): + def __init__(self, *, access_token: str, **kwargs): super(StsTokenResponseMessage, self).__init__(**kwargs) self.access_token = access_token @@ -47,14 +42,9 @@ class TokenRequestOptions(msrest.serialization.Model): """ _attribute_map = { - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + "client_request_id": {"key": "clientRequestId", "type": "str"}, } - def __init__( - self, - *, - client_request_id: Optional[str] = None, - **kwargs - ): + def __init__(self, *, client_request_id: Optional[str] = None, **kwargs): super(TokenRequestOptions, self).__init__(**kwargs) self.client_request_id = client_request_id diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/__init__.py index 56b55f918c06..7cfa97b4eedc 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/__init__.py @@ -9,5 +9,5 @@ from ._mixed_reality_sts_rest_client_operations import MixedRealityStsRestClientOperationsMixin __all__ = [ - 'MixedRealityStsRestClientOperationsMixin', + "MixedRealityStsRestClientOperationsMixin", ] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/_mixed_reality_sts_rest_client_operations.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/_mixed_reality_sts_rest_client_operations.py index 8b8628e0c285..f45bd9fc3f1f 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/_mixed_reality_sts_rest_client_operations.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_generated/operations/_mixed_reality_sts_rest_client_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,9 +24,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class MixedRealityStsRestClientOperationsMixin(object): def get_token( @@ -46,34 +53,32 @@ def get_token( :rtype: ~azure.mixedreality.authentication._generated.models.StsTokenResponseMessage :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.StsTokenResponseMessage"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - + cls = kwargs.pop("cls", None) # type: ClsType["_models.StsTokenResponseMessage"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + _client_request_id = None if token_request_options is not None: _client_request_id = token_request_options.client_request_id accept = "application/json" # Construct URL - url = self.get_token.metadata['url'] # type: ignore + url = self.get_token.metadata["url"] # type: ignore path_format_arguments = { - 'accountId': self._serialize.url("account_id", account_id, 'str'), + "accountId": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if api_version is not None: - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if _client_request_id is not None: - header_parameters['X-MRC-CV'] = self._serialize.header("client_request_id", _client_request_id, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["X-MRC-CV"] = self._serialize.header("client_request_id", _client_request_id, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -84,11 +89,12 @@ def get_token( raise HttpResponseError(response=response) response_headers = {} - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('StsTokenResponseMessage', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("StsTokenResponseMessage", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - get_token.metadata = {'url': '/Accounts/{accountId}/token'} # type: ignore + + get_token.metadata = {"url": "/Accounts/{accountId}/token"} # type: ignore diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixed_reality_token_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixed_reality_token_credential.py index 7cc4e98d8bc6..133da730b5c3 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixed_reality_token_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixed_reality_token_credential.py @@ -13,25 +13,20 @@ from azure.core.credentials import AccessToken from azure.core.credentials_async import AsyncTokenCredential + def get_mixedreality_credential( - account_id: str, - account_domain: str, - endpoint_url: str, - credential: "AsyncTokenCredential", - **kwargs): + account_id: str, account_domain: str, endpoint_url: str, credential: "AsyncTokenCredential", **kwargs +): if isinstance(credential, StaticAccessTokenCredential): return credential return MixedRealityTokenCredential( - account_id=account_id, - account_domain=account_domain, - endpoint_url=endpoint_url, - credential=credential, - **kwargs) + account_id=account_id, account_domain=account_domain, endpoint_url=endpoint_url, credential=credential, **kwargs + ) class MixedRealityTokenCredential(object): - """ Represents a token credential that can be used to access a Mixed Reality service. + """Represents a token credential that can be used to access a Mixed Reality service. This implements the TokenCredential protocol. :param str account_id: The Mixed Reality service account identifier. @@ -40,20 +35,17 @@ class MixedRealityTokenCredential(object): """ def __init__( - self, - account_id: str, - account_domain: str, - endpoint_url: str, - credential: "AsyncTokenCredential", - **kwargs): + self, account_id: str, account_domain: str, endpoint_url: str, credential: "AsyncTokenCredential", **kwargs + ): self.stsClient = MixedRealityStsClient( account_id=account_id, account_domain=account_domain, endpoint_url=endpoint_url, credential=credential, - **kwargs) + **kwargs + ) - async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": #pylint: disable=unused-argument + async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": # pylint: disable=unused-argument return await self.stsClient.get_token(**kwargs) async def close(self) -> None: diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixedreality_account_key_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixedreality_account_key_credential.py index 2f9efb559a53..f151cea4f777 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixedreality_account_key_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/mixedreality_account_key_credential.py @@ -16,8 +16,9 @@ ACCOUNT_KEY_VALID_YEARS = 10 + class MixedRealityAccountKeyCredential(object): - """ Represents an object used for Mixed Reality account key authentication. + """Represents an object used for Mixed Reality account key authentication. :param str account_id: The Mixed Reality service account identifier. :param AzureKeyCredential account_key: The Mixed Reality service account primary or secondary key credential. @@ -28,7 +29,7 @@ def __init__(self, account_id, account_key): self.account_id = account_id self.account_key = account_key - async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": #pylint: disable=unused-argument + async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": # pylint: disable=unused-argument token = self.account_id + ":" + self.account_key.key # No way to know when an account key might expire, so we'll set the @@ -47,6 +48,7 @@ async def __aenter__(self): async def __aexit__(self, exc_type, exc_value, traceback) -> None: pass + def _add_years(date_to_update, years): try: return date_to_update.replace(year=date_to_update.year + years) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/static_access_token_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/static_access_token_credential.py index fccbd6f1a2b0..e6a758337e2b 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/static_access_token_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/aio/static_access_token_credential.py @@ -11,8 +11,9 @@ from azure.core.credentials_async import AsyncTokenCredential from azure.core.credentials import AccessToken + class StaticAccessTokenCredential(object): - """ Represents a static access token credential. + """Represents a static access token credential. This implements the AsyncTokenCredential protocol. :param AccessToken access_token: An access token. @@ -23,9 +24,10 @@ def __init__(self, access_token: "AccessToken"): async def get_token( self, - #pylint: disable=unused-argument + # pylint: disable=unused-argument *scopes: str, - **kwargs: "Any") -> "AccessToken": + **kwargs: "Any" + ) -> "AccessToken": return self._access_token async def close(self) -> None: diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/authentication_endpoint.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/authentication_endpoint.py index 72bdcc70fd96..6542a30e26ec 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/authentication_endpoint.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/authentication_endpoint.py @@ -4,6 +4,7 @@ # license information. # -------------------------------------------------------------------------- + def construct_endpoint_url(account_domain): # type: (str) -> str - return 'https://sts.' + account_domain + return "https://sts." + account_domain diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixed_reality_token_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixed_reality_token_credential.py index e0bb1dda3627..e0178879d6e3 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixed_reality_token_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixed_reality_token_credential.py @@ -20,15 +20,12 @@ def get_mixedreality_credential(account_id, account_domain, endpoint_url, creden return credential return MixedRealityTokenCredential( - account_id=account_id, - account_domain=account_domain, - endpoint_url=endpoint_url, - credential=credential, - **kwargs) + account_id=account_id, account_domain=account_domain, endpoint_url=endpoint_url, credential=credential, **kwargs + ) class MixedRealityTokenCredential(object): - """ Represents a token credential that can be used to access a Mixed Reality service. + """Represents a token credential that can be used to access a Mixed Reality service. This implements the TokenCredential protocol. :param str account_id: The Mixed Reality service account identifier. @@ -43,8 +40,9 @@ def __init__(self, account_id, account_domain, endpoint_url, credential, **kwarg account_domain=account_domain, endpoint_url=endpoint_url, credential=credential, - **kwargs) + **kwargs + ) - def get_token(self, *scopes, **kwargs): #pylint: disable=unused-argument + def get_token(self, *scopes, **kwargs): # pylint: disable=unused-argument # type: (*str, **Any) -> AccessToken return self.stsClient.get_token(**kwargs) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixedreality_account_key_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixedreality_account_key_credential.py index 75ac965d9c6f..52324032968a 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixedreality_account_key_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/mixedreality_account_key_credential.py @@ -9,15 +9,15 @@ from azure.core.credentials import AzureKeyCredential, AccessToken - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any ACCOUNT_KEY_VALID_YEARS = 10 + class MixedRealityAccountKeyCredential(object): - """ Represents an object used for Mixed Reality account key authentication. + """Represents an object used for Mixed Reality account key authentication. :param str account_id: The Mixed Reality service account identifier. :param AzureKeyCredential account_key: The Mixed Reality service account primary or secondary key credential. @@ -28,7 +28,7 @@ def __init__(self, account_id, account_key): self.account_id = account_id self.account_key = account_key - def get_token(self, *scopes, **kwargs): #pylint: disable=unused-argument + def get_token(self, *scopes, **kwargs): # pylint: disable=unused-argument # type: (*str, **Any) -> AccessToken token = self.account_id + ":" + self.account_key.key @@ -40,6 +40,7 @@ def get_token(self, *scopes, **kwargs): #pylint: disable=unused-argument return AccessToken(token, expiration_timestamp) + def _add_years(date_to_update, years): try: return date_to_update.replace(year=date_to_update.year + years) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/static_access_token_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/static_access_token_credential.py index 712f4e20738f..31ef8604e823 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/static_access_token_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_shared/static_access_token_credential.py @@ -11,8 +11,9 @@ from azure.core.credentials import TokenCredential from azure.core.credentials import AccessToken + class StaticAccessTokenCredential(object): - """ Represents a static access token credential. + """Represents a static access token credential. This implements the TokenCredential protocol. :param AccessToken access_token: An access token. @@ -22,6 +23,6 @@ def __init__(self, access_token): # type: (AccessToken) -> None self._access_token = access_token - def get_token(self, *scopes, **kwargs): #pylint: disable=unused-argument + def get_token(self, *scopes, **kwargs): # pylint: disable=unused-argument # type: (*str, **Any) -> AccessToken return self._access_token diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_utils.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_utils.py index 8cf512736233..993e77a3dd82 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_utils.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/_utils.py @@ -29,6 +29,7 @@ def convert_to_access_token(token_response_message): return AccessToken(token_response_message.access_token, expiration_timestamp) + def retrieve_jwt_expiration_timestamp(jwt_value): # type: (str) -> int """ @@ -51,21 +52,23 @@ def retrieve_jwt_expiration_timestamp(jwt_value): # We pad the value with the max padding of === to keep our logic simple and allow the base64 decoder to handle # the value properly. b64decode will properly trim the padding appropriately, but apparently doesn't want to # handle the addition of padding. - padded_base64_payload = base64.b64decode(parts[1] + "===").decode('utf-8') + padded_base64_payload = base64.b64decode(parts[1] + "===").decode("utf-8") payload = json.loads(padded_base64_payload) except ValueError as e: raise ValueError("Unable to decode the JWT.") from e try: - exp = payload['exp'] + exp = payload["exp"] except KeyError as e: raise ValueError("Invalid JWT payload structure. No expiration.") from e return int(exp) + BASE_64_CHAR_SET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" CV_BASE_LENGTH = 22 + def generate_cv_base(): # type: () -> str """ @@ -75,9 +78,9 @@ def generate_cv_base(): :returns: str :rtype: str """ - result = '' + result = "" - #pylint: disable=unused-variable + # pylint: disable=unused-variable for i in range(CV_BASE_LENGTH): random_index = random.randint(0, len(BASE_64_CHAR_SET) - 1) result += BASE_64_CHAR_SET[random_index] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/__init__.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/__init__.py index 736dc1c08fe4..ef1cb2c8d52d 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/__init__.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/__init__.py @@ -6,6 +6,4 @@ from ._client_async import MixedRealityStsClient -__all__ = [ - 'MixedRealityStsClient' -] +__all__ = ["MixedRealityStsClient"] diff --git a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/_client_async.py b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/_client_async.py index c73aa1b341e7..4b584e15ef8e 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/_client_async.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/azure/mixedreality/authentication/aio/_client_async.py @@ -10,7 +10,7 @@ try: from urllib.parse import urlparse except ImportError: - from urlparse import urlparse # type: ignore + from urlparse import urlparse # type: ignore from azure.core.credentials import AzureKeyCredential from azure.core.tracing.decorator_async import distributed_trace_async @@ -28,8 +28,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MixedRealityStsClient(object): # pylint: disable=client-accepts-api-version-keyword - """ A client to interact with the Mixed Reality STS service. +class MixedRealityStsClient(object): # pylint: disable=client-accepts-api-version-keyword + """A client to interact with the Mixed Reality STS service. :param str account_id: The Mixed Reality service account identifier. @@ -41,11 +41,13 @@ class MixedRealityStsClient(object): # pylint: disable=client-accepts-api-versio Override the Mixed Reality STS service endpoint. """ - def __init__(self, + def __init__( + self, account_id: str, account_domain: str, - credential: Union[AzureKeyCredential, "AsyncTokenCredential"], #pylint: disable=unsubscriptable-object - **kwargs) -> None: + credential: Union[AzureKeyCredential, "AsyncTokenCredential"], # pylint: disable=unsubscriptable-object + **kwargs + ) -> None: if not account_id: raise ValueError("account_id must be a non-empty string.") @@ -63,27 +65,25 @@ def __init__(self, self._credential = credential - endpoint_url = kwargs.pop('custom_endpoint_url', construct_endpoint_url(account_domain)) + endpoint_url = kwargs.pop("custom_endpoint_url", construct_endpoint_url(account_domain)) try: - if not endpoint_url.lower().startswith('http'): + if not endpoint_url.lower().startswith("http"): endpoint_url = "https://" + endpoint_url except AttributeError as ex: raise ValueError("Host URL must be a string.") from ex - parsed_url = urlparse(endpoint_url.rstrip('/')) + parsed_url = urlparse(endpoint_url.rstrip("/")) if not parsed_url.netloc: raise ValueError("Invalid URL: {}".format(endpoint_url)) self._endpoint_url = endpoint_url - authentication_policy = AsyncBearerTokenCredentialPolicy(credential, [endpoint_url + '/.default']) + authentication_policy = AsyncBearerTokenCredentialPolicy(credential, [endpoint_url + "/.default"]) self._client = MixedRealityStsRestClient( - base_url=endpoint_url, - authentication_policy=authentication_policy, - sdk_moniker=SDK_MONIKER, - **kwargs) + base_url=endpoint_url, authentication_policy=authentication_policy, sdk_moniker=SDK_MONIKER, **kwargs + ) @distributed_trace_async async def get_token(self, **kwargs) -> "AccessToken": @@ -95,10 +95,7 @@ async def get_token(self, **kwargs) -> "AccessToken": token_request_options = TokenRequestOptions() token_request_options.client_request_id = generate_cv_base() - response = await self._client.get_token( - self._account_id, - token_request_options=token_request_options, - **kwargs) + response = await self._client.get_token(self._account_id, token_request_options=token_request_options, **kwargs) return convert_to_access_token(response) async def close(self) -> None: diff --git a/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample async.py b/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample async.py index 52ff3dddf0a4..67f396921aa7 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample async.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample async.py @@ -1,4 +1,3 @@ - # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for @@ -18,7 +17,6 @@ 3) MIXEDREALITY_ACCOUNT_KEY - the Mixed Reality account primary or secondary key. """ - import os import asyncio @@ -43,6 +41,7 @@ class ClientSamplesAsync(object): def create_client(self): # [START create_client] from azure.mixedreality.authentication.aio import MixedRealityStsClient + client = MixedRealityStsClient(self.account_id, self.account_domain, self.key_credential) # [END create_client] @@ -50,6 +49,7 @@ def create_client(self): async def get_token(self): from azure.mixedreality.authentication.aio import MixedRealityStsClient + client = MixedRealityStsClient(self.account_id, self.account_domain, self.key_credential) async with client: @@ -65,5 +65,6 @@ async def main(): sample.create_client() await sample.get_token() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample.py b/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample.py index 0de0e21a39de..dbeffc17aedf 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/samples/client_sample.py @@ -1,4 +1,3 @@ - # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for @@ -18,7 +17,6 @@ 3) MIXEDREALITY_ACCOUNT_KEY - the Mixed Reality account primary or secondary key. """ - import os @@ -42,6 +40,7 @@ class ClientSamples(object): def create_client(self): # [START create_client] from azure.mixedreality.authentication import MixedRealityStsClient + client = MixedRealityStsClient(self.account_id, self.account_domain, self.key_credential) # [END create_client] @@ -50,6 +49,7 @@ def create_client(self): def get_token(self): # [START get_token] from azure.mixedreality.authentication import MixedRealityStsClient + client = MixedRealityStsClient(self.account_id, self.account_domain, self.key_credential) access_token = client.get_token() # [END get_token] @@ -57,7 +57,7 @@ def get_token(self): print("token retrieved: " + access_token.token) -if __name__ == '__main__': +if __name__ == "__main__": sample = ClientSamples() sample.create_client() sample.get_token() diff --git a/sdk/mixedreality/azure-mixedreality-authentication/setup.py b/sdk/mixedreality/azure-mixedreality-authentication/setup.py index a69b7914d14e..bf2417be3c57 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/setup.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/setup.py @@ -11,66 +11,62 @@ PACKAGE_PPRINT_NAME = "Mixed Reality Authentication" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), # ensure that these are updated to reflect the package owners' information long_description=readme + "\n\n" + changelog, - long_description_content_type='text/markdown', - url='https://github.com/Azure/azure-sdk-for-python', + long_description_content_type="text/markdown", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", - author='Microsoft Corporation', - author_email='azuresdkengsysadmins@microsoft.com', - - license='MIT License', + author="Microsoft Corporation", + author_email="azuresdkengsysadmins@microsoft.com", + license="MIT License", # ensure that the development status reflects the status of your package classifiers=[ - 'Development Status :: 7 - Inactive', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 7 - Inactive", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mixedreality' - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mixedreality", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.7", - install_requires=[ - 'azure-core<2.0.0,>=1.4.0', - 'msrest>=0.6.21' - ], + install_requires=["azure-core<2.0.0,>=1.4.0", "msrest>=0.6.21"], project_urls={ - 'Bug Reports': 'https://github.com/Azure/azure-sdk-for-python/issues', - 'Source': 'https://github.com/Azure/azure-sdk-for-python', - } + "Bug Reports": "https://github.com/Azure/azure-sdk-for-python/issues", + "Source": "https://github.com/Azure/azure-sdk-for-python", + }, ) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/conftest.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/conftest.py index 256d20a1365c..9f22f1d33e93 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/conftest.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/conftest.py @@ -8,7 +8,6 @@ from azure.core.credentials import AzureKeyCredential from devtools_testutils.sanitizers import add_body_key_sanitizer, add_remove_header_sanitizer - # Environment variable keys ENV_ACCOUNT_DOMAIN = "MIXEDREALITY_ACCOUNT_DOMAIN" ENV_ACCOUNT_ID = "MIXEDREALITY_ACCOUNT_ID" @@ -25,7 +24,7 @@ def add_sanitizers(test_proxy, environment_variables): sanitization_mapping = { ENV_ACCOUNT_DOMAIN: TEST_ACCOUNT_DOMAIN, ENV_ACCOUNT_ID: TEST_ACCOUNT_ID, - ENV_ACCOUNT_KEY: TEST_ACCOUNT_KEY + ENV_ACCOUNT_KEY: TEST_ACCOUNT_KEY, } environment_variables.sanitize_batch(sanitization_mapping) add_remove_header_sanitizer(headers="X-MRC-CV") @@ -38,5 +37,5 @@ def account_info(environment_variables): yield { "account_domain": environment_variables.get(ENV_ACCOUNT_DOMAIN), "account_id": environment_variables.get(ENV_ACCOUNT_ID), - "key_credential": AzureKeyCredential(environment_variables.get(ENV_ACCOUNT_KEY)) + "key_credential": AzureKeyCredential(environment_variables.get(ENV_ACCOUNT_KEY)), } diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client.py index 8aa9859d6666..4368e4df157d 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client.py @@ -8,7 +8,10 @@ from devtools_testutils import AzureRecordedTestCase from azure.mixedreality.authentication import MixedRealityStsClient -from azure.mixedreality.authentication._shared.mixedreality_account_key_credential import MixedRealityAccountKeyCredential +from azure.mixedreality.authentication._shared.mixedreality_account_key_credential import ( + MixedRealityAccountKeyCredential, +) + class TestClient(AzureRecordedTestCase): @@ -16,7 +19,8 @@ def test_create_client(self, account_info): client = MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) assert client is not None @@ -26,17 +30,18 @@ def test_create_client_custom_with_endpoint(self, account_info): account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - custom_endpoint_url=custom_endpoint_url) + custom_endpoint_url=custom_endpoint_url, + ) assert client._endpoint_url == custom_endpoint_url def test_create_client_with_credential(self, account_info): - token_credential = MixedRealityAccountKeyCredential( - account_info["account_id"], account_info["key_credential"]) + token_credential = MixedRealityAccountKeyCredential(account_info["account_id"], account_info["key_credential"]) client = MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=token_credential) + credential=token_credential, + ) assert client._credential == token_credential @@ -45,32 +50,33 @@ def test_create_client_with_invalid_arguments(self, account_info): MixedRealityStsClient( account_id=None, account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): MixedRealityStsClient( - account_id=account_info["account_id"], - account_domain=None, - credential=account_info["key_credential"]) + account_id=account_info["account_id"], account_domain=None, credential=account_info["key_credential"] + ) with pytest.raises(ValueError): MixedRealityStsClient( - account_id=account_info["account_id"], - account_domain=account_info["account_domain"], - credential=None) + account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=None + ) with pytest.raises(ValueError): MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - custom_endpoint_url="#") + custom_endpoint_url="#", + ) def test_get_token(self, recorded_test, account_info): client = MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) token = client.get_token() diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client_async.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client_async.py index 888166c8669b..d7cc08d3836d 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client_async.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_client_async.py @@ -8,7 +8,9 @@ from devtools_testutils import AzureRecordedTestCase from azure.mixedreality.authentication.aio import MixedRealityStsClient -from azure.mixedreality.authentication._shared.aio.mixedreality_account_key_credential import MixedRealityAccountKeyCredential +from azure.mixedreality.authentication._shared.aio.mixedreality_account_key_credential import ( + MixedRealityAccountKeyCredential, +) class TestAsyncClient(AzureRecordedTestCase): @@ -17,7 +19,8 @@ def test_create_client(self, account_info): client = MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) assert client is not None @@ -27,17 +30,18 @@ def test_create_client_custom_with_endpoint(self, account_info): account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - custom_endpoint_url=custom_endpoint_url) + custom_endpoint_url=custom_endpoint_url, + ) assert client._endpoint_url == custom_endpoint_url def test_create_client_with_credential(self, account_info): - token_credential = MixedRealityAccountKeyCredential( - account_info["account_id"], account_info["key_credential"]) + token_credential = MixedRealityAccountKeyCredential(account_info["account_id"], account_info["key_credential"]) client = MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=token_credential) + credential=token_credential, + ) assert client._credential == token_credential @@ -46,33 +50,34 @@ def test_create_client_with_invalid_arguments(self, account_info): MixedRealityStsClient( account_id=None, account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): MixedRealityStsClient( - account_id=account_info["account_id"], - account_domain=None, - credential=account_info["key_credential"]) + account_id=account_info["account_id"], account_domain=None, credential=account_info["key_credential"] + ) with pytest.raises(ValueError): MixedRealityStsClient( - account_id=account_info["account_id"], - account_domain=account_info["account_domain"], - credential=None) + account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=None + ) with pytest.raises(ValueError): MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - custom_endpoint_url="#") + custom_endpoint_url="#", + ) @pytest.mark.asyncio async def test_get_token(self, recorded_test, account_info): client = MixedRealityStsClient( account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) token = await client.get_token() diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential.py index 65cd309b33b9..875c8c418c93 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential.py @@ -6,9 +6,15 @@ from azure.core.credentials import AccessToken, AzureKeyCredential -from azure.mixedreality.authentication._shared.mixed_reality_token_credential import get_mixedreality_credential, MixedRealityTokenCredential +from azure.mixedreality.authentication._shared.mixed_reality_token_credential import ( + get_mixedreality_credential, + MixedRealityTokenCredential, +) from azure.mixedreality.authentication._shared.static_access_token_credential import StaticAccessTokenCredential -from azure.mixedreality.authentication._shared.mixedreality_account_key_credential import MixedRealityAccountKeyCredential +from azure.mixedreality.authentication._shared.mixedreality_account_key_credential import ( + MixedRealityAccountKeyCredential, +) + class TestMixedRealityTokenCredential: def test_get_mixedreality_credential_static_credential(self): @@ -19,7 +25,8 @@ def test_get_mixedreality_credential_static_credential(self): account_id="account_id", account_domain="account_domain", endpoint_url="http://my.endpoint.url", - credential=credential) + credential=credential, + ) assert credential == actual_credential @@ -31,7 +38,8 @@ def test_get_mixedreality_credential_other_credential(self): account_id="account_id", account_domain="account_domain", endpoint_url="http://my.endpoint.url", - credential=credential) + credential=credential, + ) assert credential != actual_credential assert isinstance(actual_credential, MixedRealityTokenCredential) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential_async.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential_async.py index f38218a23938..42a040d88134 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential_async.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_mixed_reality_token_credential_async.py @@ -6,9 +6,15 @@ from azure.core.credentials import AccessToken, AzureKeyCredential -from azure.mixedreality.authentication._shared.aio.mixed_reality_token_credential import get_mixedreality_credential, MixedRealityTokenCredential +from azure.mixedreality.authentication._shared.aio.mixed_reality_token_credential import ( + get_mixedreality_credential, + MixedRealityTokenCredential, +) from azure.mixedreality.authentication._shared.aio.static_access_token_credential import StaticAccessTokenCredential -from azure.mixedreality.authentication._shared.aio.mixedreality_account_key_credential import MixedRealityAccountKeyCredential +from azure.mixedreality.authentication._shared.aio.mixedreality_account_key_credential import ( + MixedRealityAccountKeyCredential, +) + class TestMixedRealityTokenCredential: def test_get_mixedreality_credential_static_credential(self): @@ -19,7 +25,8 @@ def test_get_mixedreality_credential_static_credential(self): account_id="account_id", account_domain="account_domain", endpoint_url="http://my.endpoint.url", - credential=credential) + credential=credential, + ) assert credential == actual_credential @@ -31,7 +38,8 @@ def test_get_mixedreality_credential_other_credential(self): account_id="account_id", account_domain="account_domain", endpoint_url="http://my.endpoint.url", - credential=credential) + credential=credential, + ) assert credential != actual_credential assert isinstance(actual_credential, MixedRealityTokenCredential) diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential.py index 45b8c702fcfe..ba7dd5828cb8 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential.py @@ -8,6 +8,7 @@ from azure.mixedreality.authentication._shared.static_access_token_credential import StaticAccessTokenCredential + class TestStaticAccessTokenCredential: def test_get_token(self): token = "My access token" diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential_async.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential_async.py index 38c2a5bb9110..bb4090be25aa 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential_async.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_static_access_token_credential_async.py @@ -9,6 +9,7 @@ from azure.mixedreality.authentication._shared.aio.static_access_token_credential import StaticAccessTokenCredential + class TestAsyncStaticAccessTokenCredential: @pytest.mark.asyncio diff --git a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_utils.py b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_utils.py index 223bc7873433..6e6a7f535377 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/tests/test_utils.py +++ b/sdk/mixedreality/azure-mixedreality-authentication/tests/test_utils.py @@ -27,7 +27,7 @@ def test_generate_cv_base_are_random(self): def test_retrieve_jwt_expiration_timestamp_with_padding(self): # Note: The trailing "." on the end indicates an empty signature indicating that this JWT is not signed. jwt_value = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJlbWFpbCI6IkJvYkBjb250b3NvLmNvbSIsImdpdmVuX25hbWUiOiJCb2IiLCJpc3MiOiJodHRwOi8vRGVmYXVsdC5Jc3N1ZXIuY29tIiwiYXVkIjoiaHR0cDovL0RlZmF1bHQuQXVkaWVuY2UuY29tIiwiaWF0IjoiMTYxMDgxMjI1MCIsIm5iZiI6IjE2MTA4MTI1NTAiLCJleHAiOiIxNjEwODk4NjUwIn0=." - expected_expiration_timestamp = 1610898650 # 1/17/2021 3:50:50 PM UTC + expected_expiration_timestamp = 1610898650 # 1/17/2021 3:50:50 PM UTC actual = retrieve_jwt_expiration_timestamp(jwt_value) @@ -38,7 +38,7 @@ def test_retrieve_jwt_expiration_timestamp_no_padding(self): # Note: The trailing "." on the end indicates an empty signature indicating that this JWT is not signed. # The trailing "=" has been removed to test without base64 padding, which is apparently expected for JWT. jwt_value = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJlbWFpbCI6IkJvYkBjb250b3NvLmNvbSIsImdpdmVuX25hbWUiOiJCb2IiLCJpc3MiOiJodHRwOi8vRGVmYXVsdC5Jc3N1ZXIuY29tIiwiYXVkIjoiaHR0cDovL0RlZmF1bHQuQXVkaWVuY2UuY29tIiwiaWF0IjoiMTYxMDgxMjI1MCIsIm5iZiI6IjE2MTA4MTI1NTAiLCJleHAiOiIxNjEwODk4NjUwIn0." - expected_expiration_timestamp = 1610898650 # 1/17/2021 3:50:50 PM UTC + expected_expiration_timestamp = 1610898650 # 1/17/2021 3:50:50 PM UTC actual = retrieve_jwt_expiration_timestamp(jwt_value) diff --git a/sdk/ml/azure-ai-ml/azure/__init__.py b/sdk/ml/azure-ai-ml/azure/__init__.py index aed413035fde..e98ad89ebae4 100644 --- a/sdk/ml/azure-ai-ml/azure/__init__.py +++ b/sdk/ml/azure-ai-ml/azure/__init__.py @@ -9,4 +9,5 @@ * Autorest objects. * SDK v2 support the new YAML file format. """ + __path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_logging/compliant_logger.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_logging/compliant_logger.py index bd7977907c6b..dbefa71eb07a 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_logging/compliant_logger.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_logging/compliant_logger.py @@ -2,15 +2,15 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -""" This is logger utility which will work with allowed logged filter AML policy - https://github.com/Azure/azure-policy/blob/master/built-in-policies/policyDefinitions/Machine%20Learning/AllowedLogFilter_EnforceSetting.json - You have to define the same "logFilters" while initializing the logger using "enable_compliant_logging" method - e.g. - log filters: ["^SystemLog:.*$"] - initialize : enable_compliant_logging(format_key="prefix", - format_key_value="SystemLog", - format=f"%(prefix)s{logging.BASIC_FORMAT}") - By default log message will not compliant e.g. not modified +"""This is logger utility which will work with allowed logged filter AML policy +https://github.com/Azure/azure-policy/blob/master/built-in-policies/policyDefinitions/Machine%20Learning/AllowedLogFilter_EnforceSetting.json +You have to define the same "logFilters" while initializing the logger using "enable_compliant_logging" method +e.g. + log filters: ["^SystemLog:.*$"] + initialize : enable_compliant_logging(format_key="prefix", + format_key_value="SystemLog", + format=f"%(prefix)s{logging.BASIC_FORMAT}") +By default log message will not compliant e.g. not modified """ import logging diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/batch_deployment.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/batch_deployment.py index 7a69176b4ac6..f5469800f984 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/batch_deployment.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/batch_deployment.py @@ -32,21 +32,17 @@ class BatchDeploymentSchema(DeploymentSchema): compute = ComputeField(required=False) error_threshold = fields.Int( - metadata={ - "description": """Error threshold, if the error count for the entire input goes above this value,\r\n + metadata={"description": """Error threshold, if the error count for the entire input goes above this value,\r\n the batch inference will be aborted. Range is [-1, int.MaxValue].\r\n For FileDataset, this value is the count of file failures.\r\n For TabularDataset, this value is the count of record failures.\r\n - If set to -1 (the lower bound), all failures during batch inference will be ignored.""" - } + If set to -1 (the lower bound), all failures during batch inference will be ignored."""} ) retry_settings = NestedField(BatchRetrySettingsSchema) mini_batch_size = fields.Int() logging_level = fields.Str( - metadata={ - "description": """A string of the logging level name, which is defined in 'logging'. - Possible values are 'warning', 'info', and 'debug'.""" - } + metadata={"description": """A string of the logging level name, which is defined in 'logging'. + Possible values are 'warning', 'info', and 'debug'."""} ) output_action = StringTransformedEnum( allowed_values=[ diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment.py index 301d7b08a696..80ff48e73205 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment.py @@ -23,13 +23,11 @@ class ModelBatchDeploymentSchema(DeploymentSchema): compute = ComputeField(required=True) error_threshold = fields.Int( - metadata={ - "description": """Error threshold, if the error count for the entire input goes above this value,\r\n + metadata={"description": """Error threshold, if the error count for the entire input goes above this value,\r\n the batch inference will be aborted. Range is [-1, int.MaxValue].\r\n For FileDataset, this value is the count of file failures.\r\n For TabularDataset, this value is the count of record failures.\r\n - If set to -1 (the lower bound), all failures during batch inference will be ignored.""" - } + If set to -1 (the lower bound), all failures during batch inference will be ignored."""} ) resources = NestedField(JobResourceConfigurationSchema) type = StringTransformedEnum( diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment_settings.py index e19457519f5e..b23e9fd2d037 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_deployment/batch/model_batch_deployment_settings.py @@ -18,22 +18,18 @@ class ModelBatchDeploymentSettingsSchema(metaclass=PatchedSchemaMeta): error_threshold = fields.Int( - metadata={ - "description": """Error threshold, if the error count for the entire input goes above this value,\r\n + metadata={"description": """Error threshold, if the error count for the entire input goes above this value,\r\n the batch inference will be aborted. Range is [-1, int.MaxValue].\r\n For FileDataset, this value is the count of file failures.\r\n For TabularDataset, this value is the count of record failures.\r\n - If set to -1 (the lower bound), all failures during batch inference will be ignored.""" - } + If set to -1 (the lower bound), all failures during batch inference will be ignored."""} ) instance_count = fields.Int() retry_settings = NestedField(BatchRetrySettingsSchema) mini_batch_size = fields.Int() logging_level = fields.Str( - metadata={ - "description": """A string of the logging level name, which is defined in 'logging'. - Possible values are 'warning', 'info', and 'debug'.""" - } + metadata={"description": """A string of the logging level name, which is defined in 'logging'. + Possible values are 'warning', 'info', and 'debug'."""} ) output_action = StringTransformedEnum( allowed_values=[ diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/batch/batch_endpoint_defaults.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/batch/batch_endpoint_defaults.py index 49699bb04416..842785586ace 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/batch/batch_endpoint_defaults.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/batch/batch_endpoint_defaults.py @@ -17,10 +17,8 @@ class BatchEndpointsDefaultsSchema(metaclass=PatchedSchemaMeta): deployment_name = fields.Str( - metadata={ - "description": """Name of the deployment that will be default for the endpoint. - This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked.""" - } + metadata={"description": """Name of the deployment that will be default for the endpoint. + This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked."""} ) @post_load diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/endpoint.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/endpoint.py index 1ff43338bc74..9a220037c146 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/endpoint.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/endpoint.py @@ -30,10 +30,8 @@ class EndpointSchema(PathAwareSchema): EndpointAuthMode.AAD_TOKEN, ], casing_transform=camel_to_snake, - metadata={ - "description": """authentication method: no auth, key based or azure ml token based. - aad_token is only valid for batch endpoint.""" - }, + metadata={"description": """authentication method: no auth, key based or azure ml token based. + aad_token is only valid for batch endpoint."""}, ) scoring_uri = fields.Str(metadata={"description": "The endpoint uri that can be used for scoring"}) location = fields.Str() diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/online/online_endpoint.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/online/online_endpoint.py index 84b34636d8aa..3ca67d71a223 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/online/online_endpoint.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_endpoint/online/online_endpoint.py @@ -20,20 +20,16 @@ class OnlineEndpointSchema(EndpointSchema): traffic = fields.Dict( keys=fields.Str(), values=fields.Int(), - metadata={ - "description": """a dict with key as deployment name and value as traffic percentage. - The values need to sum to 100 """ - }, + metadata={"description": """a dict with key as deployment name and value as traffic percentage. + The values need to sum to 100 """}, ) kind = fields.Str(dump_only=True) mirror_traffic = fields.Dict( keys=fields.Str(), values=fields.Int(), - metadata={ - "description": """a dict with key as deployment name and value as traffic percentage. - Only one key will be accepted and value needs to be less than or equal to 50%""" - }, + metadata={"description": """a dict with key as deployment name and value as traffic percentage. + Only one key will be accepted and value needs to be less than or equal to 50%"""}, ) @validates("traffic") diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_finetuning/finetuning_vertical.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_finetuning/finetuning_vertical.py index 10ac51ff81b5..69b2df58eded 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_finetuning/finetuning_vertical.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_finetuning/finetuning_vertical.py @@ -20,7 +20,6 @@ from azure.ai.ml._utils._experimental import experimental from azure.ai.ml.constants._common import AzureMLResourceType - # This is meant to match the yaml definition NOT the models defined in _restclient diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/base_environment_source.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/base_environment_source.py index 09e0a56ce931..60c6740700f3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/base_environment_source.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/base_environment_source.py @@ -8,7 +8,6 @@ from marshmallow import fields, post_load from azure.ai.ml._schema.core.schema import PathAwareSchema - module_logger = logging.getLogger(__name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/inference_server.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/inference_server.py index c6e38331f9fc..753304b93bb7 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/inference_server.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/inference_server.py @@ -13,7 +13,6 @@ from azure.ai.ml.constants._common import InferenceServerType from .online_inference_configuration import OnlineInferenceConfigurationSchema - module_logger = logging.getLogger(__name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/model_configuration.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/model_configuration.py index 0e5a54a5c8b3..4481b76e39c1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/model_configuration.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/model_configuration.py @@ -10,7 +10,6 @@ from azure.ai.ml._schema.core.schema import PathAwareSchema from azure.ai.ml._schema.core.fields import StringTransformedEnum - module_logger = logging.getLogger(__name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/online_inference_configuration.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/online_inference_configuration.py index b5c313ed19b9..23d9628dea6e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/online_inference_configuration.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/assets/package/online_inference_configuration.py @@ -10,7 +10,6 @@ from azure.ai.ml._schema.core.schema import PathAwareSchema from .route import RouteSchema - module_logger = logging.getLogger(__name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/component/parallel_component.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/component/parallel_component.py index 70f286a99d62..f371e2fb660b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/component/parallel_component.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/component/parallel_component.py @@ -25,10 +25,8 @@ class ParallelComponentSchema(ComponentSchema): logging_level = DumpableEnumField( allowed_values=[LoggingLevel.DEBUG, LoggingLevel.INFO, LoggingLevel.WARN], dump_default=LoggingLevel.INFO, - metadata={ - "description": "A string of the logging level name, which is defined in 'logging'. \ - Possible values are 'WARNING', 'INFO', and 'DEBUG'." - }, + metadata={"description": "A string of the logging level name, which is defined in 'logging'. \ + Possible values are 'WARNING', 'INFO', and 'DEBUG'."}, ) task = NestedField(ComponentParallelTaskSchema, unknown=INCLUDE) mini_batch_size = fields.Str( @@ -46,22 +44,18 @@ class ParallelComponentSchema(ComponentSchema): ) error_threshold = fields.Integer( dump_default=-1, - metadata={ - "description": "The number of item processing failures should be ignored. \ + metadata={"description": "The number of item processing failures should be ignored. \ If the error_threshold is reached, the job terminates. \ For a list of files as inputs, one item means one file reference. \ - This setting doesn't apply to command parallelization." - }, + This setting doesn't apply to command parallelization."}, ) mini_batch_error_threshold = fields.Integer( dump_default=-1, - metadata={ - "description": "The number of mini batch processing failures should be ignored. \ + metadata={"description": "The number of mini batch processing failures should be ignored. \ If the mini_batch_error_threshold is reached, the job terminates. \ For a list of files as inputs, one item means one file reference. \ This setting can be used by either command or python function parallelization. \ - Only one error_threshold setting can be used in one job." - }, + Only one error_threshold setting can be used in one job."}, ) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/pipeline/component_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/pipeline/component_job.py index 8f179479d79e..8e6aed19df92 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/pipeline/component_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/pipeline/component_job.py @@ -164,10 +164,8 @@ class CommandSchema(BaseNodeSchema, ParameterizedCommandSchema): limits = NestedField(CommandJobLimitsSchema) # Change required fields to optional command = fields.Str( - metadata={ - "description": "The command run and the parameters passed. \ - This string may contain place holders of inputs in {}. " - }, + metadata={"description": "The command run and the parameters passed. \ + This string may contain place holders of inputs in {}. "}, load_only=True, ) environment = EnvironmentField() diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_telemetry/activity.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_telemetry/activity.py index 169fa5efd352..835cde66e984 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_telemetry/activity.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_telemetry/activity.py @@ -11,6 +11,7 @@ ``log_activity()`` method or use the ``@monitor_with_activity`` decorator. """ + import contextlib import functools import inspect diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py index 01abea543dfa..e5417ae7edd1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py @@ -1122,7 +1122,7 @@ def _validate_workspace_managed_datastore(path: Optional[Union[str, PathLike]]) def _validate_auto_delete_setting_in_data_output( - auto_delete_setting: Optional[Union[Dict, "AutoDeleteSetting"]] + auto_delete_setting: Optional[Union[Dict, "AutoDeleteSetting"]], ) -> None: # avoid specifying auto_delete_setting in job output now if auto_delete_setting: diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_html_utils.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_html_utils.py index faf6a406d1de..25be14fce67e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_html_utils.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_html_utils.py @@ -136,20 +136,12 @@ def to_formatted_html_table(rows, header): html = [""""""] if header is not None: html_row = """".format( - html_row - ) - ) + html.append("""""".format(html_row)) for row in rows: html_row = """".format( - html_row - ) - ) + html.append("""""".format(html_row)) html.append("
".join(column for column in header) - html.append( - """
{}
{}
".join(str(value) for value in row) - html.append( - """
{}
{}
") return "".join(html) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_pathspec.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_pathspec.py index a9a1823909ed..b479b8b0d540 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_pathspec.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_pathspec.py @@ -7,6 +7,7 @@ This file code has been vendored from pathspec repo. Please do not edit it, unless really necessary """ + import dataclasses import os import posixpath diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_vendor/azure_resources/flatten_json/__init__.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_vendor/azure_resources/flatten_json/__init__.py index 3a620a923078..383d63822ca6 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_vendor/azure_resources/flatten_json/__init__.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_vendor/azure_resources/flatten_json/__init__.py @@ -12,7 +12,6 @@ import sys from math import isnan - try: # 3.8 and up from collections.abc import Iterable diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/automl/__init__.py b/sdk/ml/azure-ai-ml/azure/ai/ml/automl/__init__.py index d34e30a8b32d..0fd33d07a2f6 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/automl/__init__.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/automl/__init__.py @@ -6,6 +6,7 @@ Main areas include managing AutoML tasks. """ + from azure.ai.ml.entities._job.automl import TrainingSettings from azure.ai.ml.entities._job.automl.image import ( LogTrainingMetrics, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_tabular.py b/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_tabular.py index 9c45e5f1c938..11696a7998dd 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_tabular.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_tabular.py @@ -3,6 +3,7 @@ # --------------------------------------------------------- """Entrypoints for creating AutoML tasks.""" + from typing import List, Optional, Union from azure.ai.ml.entities._builders.base_node import pipeline_node_decorator diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_assets.py b/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_assets.py index aadfae7ef8d3..506bf0f17a65 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_assets.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_assets.py @@ -11,5 +11,6 @@ @experimental class IPProtectionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): "Intellectual property protection level." + ALL = "all" NONE = "none" diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_monitoring.py b/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_monitoring.py index 224102ca4ee7..4d4e8a4fd686 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_monitoring.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/constants/_monitoring.py @@ -8,7 +8,6 @@ from azure.ai.ml._utils._experimental import experimental - ALL_FEATURES = "all_features" diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/dsl/_mldesigner/_constants.py b/sdk/ml/azure-ai-ml/azure/ai/ml/dsl/_mldesigner/_constants.py index f770c97d69dd..a60d46666170 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/dsl/_mldesigner/_constants.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/dsl/_mldesigner/_constants.py @@ -3,6 +3,7 @@ # --------------------------------------------------------- """This file stores constants that will be used in mldesigner package.""" + from azure.ai.ml._internal._schema.component import NodeType as V1NodeType from azure.ai.ml._internal.entities import ( Ae365exepool, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py index 8abc7ddb31f4..d44443a8a11b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py @@ -6,6 +6,7 @@ Main areas include managing compute targets, creating/managing workspaces and jobs, and submitting/accessing model, runs and run output/logging etc. """ + # pylint: disable=naming-mismatch __path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/_patch.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/_patch.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/models/_patch.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/models/_patch.py index da29aeb3012a..b0457eb728a3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/models/_patch.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_autogen_entities/models/_patch.py @@ -9,6 +9,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import json from typing import Any, Dict, List, Optional @@ -111,13 +112,10 @@ def as_dict(self, *, exclude_readonly: bool = False) -> Dict[str, Any]: return d -AzureOpenAIDeployment.__doc__ += ( - _AzureOpenAIDeployment.__doc__.strip() # type: ignore - + """ +AzureOpenAIDeployment.__doc__ += _AzureOpenAIDeployment.__doc__.strip() + """ :ivar system_data: System data of the deployment. :vartype system_data: ~azure.ai.ml.entities.SystemData -""" -) +""" # type: ignore @experimental @@ -163,13 +161,10 @@ def as_dict(self, *, exclude_readonly: bool = False) -> Dict[str, Any]: return d -ServerlessEndpoint.__doc__ += ( - _ServerlessEndpoint.__doc__.strip() # type: ignore - + """ +ServerlessEndpoint.__doc__ += _ServerlessEndpoint.__doc__.strip() + """ :ivar system_data: System data of the endpoint. :vartype system_data: ~azure.ai.ml.entities.SystemData -""" -) +""" # type: ignore @experimental @@ -205,13 +200,10 @@ def as_dict(self, *, exclude_readonly: bool = False) -> Dict[str, Any]: return d -MarketplaceSubscription.__doc__ = ( - _MarketplaceSubscription.__doc__.strip() # type: ignore - + """ +MarketplaceSubscription.__doc__ = _MarketplaceSubscription.__doc__.strip() + """ :ivar system_data: System data of the marketplace subscription. :vartype system_data: ~azure.ai.ml.entities.SystemData -""" -) +""" # type: ignore def patch_sdk(): diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/input/_index_data_source.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/input/_index_data_source.py index 92b62b6bf9ff..1825389c2ce2 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/input/_index_data_source.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/input/_index_data_source.py @@ -7,7 +7,6 @@ from azure.ai.ml.entities._inputs_outputs import Input from azure.ai.ml.constants._common import IndexInputType - # General todo: need to determine which args are required or optional when parsed out into groups like this. # General todo: move these to more permanent locations? diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/utils/_models.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/utils/_models.py index d3e8c9520e90..a4def30e5354 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/utils/_models.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_indexes/utils/_models.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """DataIndex embedding model helpers.""" + import re from typing import Optional diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_inputs_outputs/utils.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_inputs_outputs/utils.py index bd7525711635..0dfa0c523b91 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_inputs_outputs/utils.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_inputs_outputs/utils.py @@ -267,7 +267,7 @@ class Group(SubGroup): """ def _split( - _fields: Dict[str, Union[Annotation, Input, Output]] + _fields: Dict[str, Union[Annotation, Input, Output]], ) -> Tuple[Dict[str, Union[Annotation, Input, Output]], Dict[str, Union[Annotation, Input, Output]]]: """Split fields to two parts from the first default field. diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/base.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/base.py index 2efcb0c7eea4..8eca6df48e29 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/base.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/base.py @@ -47,7 +47,7 @@ def _build_data_binding(data: Union[str, "PipelineInput", "Output"]) -> Union[st def _resolve_builders_2_data_bindings( - data: Union[list, dict, str, "PipelineInput", "Output"] + data: Union[list, dict, str, "PipelineInput", "Output"], ) -> Union[dict, list, str, Output]: """Traverse data and build input builders inside it to data bindings. diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_monitoring/signals.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_monitoring/signals.py index 5a9e1df7c004..7ff99bd3c096 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_monitoring/signals.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_monitoring/signals.py @@ -1304,7 +1304,7 @@ def _from_rest_features( def _to_rest_features( - features: Union[List[str], MonitorFeatureFilter, Literal["all_features"]] + features: Union[List[str], MonitorFeatureFilter, Literal["all_features"]], ) -> RestMonitoringFeatureFilterBase: rest_features = None if isinstance(features, list): diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py index 96f6764a2718..acadea557f87 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py @@ -357,7 +357,7 @@ def get_rest_dict_for_node_attrs( from azure.ai.ml.entities._job.pipeline._io import PipelineInput if target_obj is None: - return None # type:ignore + return None # type: ignore if isinstance(target_obj, dict): result_dict: dict = {} for key, value in target_obj.items(): diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/connections/workspace_connection.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/connections/workspace_connection.py index ab1ee9f88cd2..43df7d82339a 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/connections/workspace_connection.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/connections/workspace_connection.py @@ -46,7 +46,6 @@ from azure.ai.ml.entities._system_data import SystemData from azure.ai.ml.entities._util import load_from_dict - CONNECTION_CATEGORY_TO_CREDENTIAL_MAP = { ConnectionCategory.AZURE_BLOB: [AccessKeyConfiguration, SasTokenConfiguration, AadCredentialConfiguration], ConnectionTypes.AZURE_DATA_LAKE_GEN_2: [ diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/exceptions.py b/sdk/ml/azure-ai-ml/azure/ai/ml/exceptions.py index 71b2097e9c01..219232307bb6 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/exceptions.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/exceptions.py @@ -5,6 +5,7 @@ This includes enums and classes for exceptions. """ + import logging from enum import Enum from typing import Optional, Union diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/finetuning/__init__.py b/sdk/ml/azure-ai-ml/azure/ai/ml/finetuning/__init__.py index 6b9dda885fe1..d673e884d205 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/finetuning/__init__.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/finetuning/__init__.py @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -"""Contains custom model finetuning classes for AzureML SDK V2. -""" +"""Contains custom model finetuning classes for AzureML SDK V2.""" + from azure.ai.ml.constants._finetuning import FineTuningTaskType from azure.ai.ml.finetuning._create_job import create_finetuning_job diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/model_customization/_distillation.py b/sdk/ml/azure-ai-ml/azure/ai/ml/model_customization/_distillation.py index 4227100aac55..9c06c17b2af4 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/model_customization/_distillation.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/model_customization/_distillation.py @@ -3,6 +3,7 @@ # --------------------------------------------------------- """Entrypoint for creating Distillation task.""" + from typing import Any, Dict, Optional, Union from azure.ai.ml._utils._experimental import experimental diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/__init__.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/__init__.py index 46a67bcd77fe..c6fadc512bfe 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/__init__.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/__init__.py @@ -6,6 +6,7 @@ Operations are classes contain logic to interact with backend services, usually auto generated operations call. """ + __path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_local_job_invoker.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_local_job_invoker.py index b7436d307902..f48276cac1df 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_local_job_invoker.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_local_job_invoker.py @@ -142,7 +142,7 @@ def get_execution_service_response( try: local = job_definition.properties.services.get("Local", None) - (url, encodedBody) = local.endpoint.split(EXECUTION_SERVICE_URL_KEY) + url, encodedBody = local.endpoint.split(EXECUTION_SERVICE_URL_KEY) body = urllib.parse.unquote_plus(encodedBody) body_dict: Dict = json.loads(body) response = requests_pipeline.post(url, json=body_dict, headers={"Authorization": "Bearer " + token}) @@ -408,7 +408,7 @@ def start_run_if_local( :rtype: str """ token = credential.get_token(ws_base_url + "/.default").token - (zip_content, snapshot_id) = get_execution_service_response(job_definition, token, requests_pipeline) + zip_content, snapshot_id = get_execution_service_response(job_definition, token, requests_pipeline) try: temp_dir = unzip_to_temporary_file(job_definition, zip_content) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_model_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_model_operations.py index 1ec64fbc4f4e..bf029eed3a2b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_model_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_model_operations.py @@ -453,10 +453,10 @@ def download(self, name: str, version: str, download_path: Union[PathLike, str] from azure.identity import ClientSecretCredential token_credential = ClientSecretCredential( - tenant_id=ds.credentials["tenant_id"], # type:ignore - client_id=ds.credentials["client_id"], # type:ignore - client_secret=ds.credentials["client_secret"], # type:ignore - authority=ds.credentials["authority_url"], # type:ignore + tenant_id=ds.credentials["tenant_id"], # type: ignore + client_id=ds.credentials["client_id"], # type: ignore + client_secret=ds.credentials["client_secret"], # type: ignore + authority=ds.credentials["authority_url"], # type: ignore ) credential = token_credential except (KeyError, TypeError): diff --git a/sdk/ml/azure-ai-ml/samples/ml_sample_compliant_logger.py b/sdk/ml/azure-ai-ml/samples/ml_sample_compliant_logger.py index c3434925f043..891dd641f819 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_sample_compliant_logger.py +++ b/sdk/ml/azure-ai-ml/samples/ml_sample_compliant_logger.py @@ -11,7 +11,7 @@ DESCRIPTION: These samples demonstrate how to migrate from shrike logger to SDK V2 compliant logger. - + USAGE: python ml_sample_compliant_logger.py diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_authentication.py b/sdk/ml/azure-ai-ml/samples/ml_samples_authentication.py index fc33c7a178ae..320e11cd4435 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_authentication.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_authentication.py @@ -11,7 +11,7 @@ DESCRIPTION: These samples demonstrate authenticating a client for multiple clouds. - + USAGE: python ml_samples_authentication.py diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_capability_host.py b/sdk/ml/azure-ai-ml/samples/ml_samples_capability_host.py index 6b5230971886..bfe5429ed12e 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_capability_host.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_capability_host.py @@ -167,7 +167,7 @@ def ml_capability_host_config(self): resource_group, workspace_name=hub_name, ) - capability_hosts = ml_client.capability_hosts.list() # type:ignore + capability_hosts = ml_client.capability_hosts.list() # type: ignore # List CapabilityHosts created in Project ml_client = MLClient( @@ -176,7 +176,7 @@ def ml_capability_host_config(self): resource_group, workspace_name=project_name, ) - capability_hosts = ml_client.capability_hosts.list() # type:ignore + capability_hosts = ml_client.capability_hosts.list() # type: ignore # [END capability_host_list_operation] diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_cloud_configurations.py b/sdk/ml/azure-ai-ml/samples/ml_samples_cloud_configurations.py index c047284483d1..7aba6d36fc70 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_cloud_configurations.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_cloud_configurations.py @@ -71,7 +71,7 @@ def ml_cloud_config_from_keyword_args(self): subscription_id=subscription_id, resource_group_name=resource_group, workspace_name="test-ws1", - **kwargs, # type:ignore + **kwargs, # type: ignore ) # The client will use the cloud that we passed in print("Client is using cloud:", ml_client._cloud) diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_compute.py b/sdk/ml/azure-ai-ml/samples/ml_samples_compute.py index 76dc59cd7d83..0b0515bdba6d 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_compute.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_compute.py @@ -156,7 +156,7 @@ def ml_compute_config_setup_3(self): # [START compute_instance_ssh_settings] from azure.ai.ml.entities import ComputeInstanceSshSettings - ssh_settings = ComputeInstanceSshSettings( # type:ignore + ssh_settings = ComputeInstanceSshSettings( # type: ignore ssh_key_value="ssh-rsa ABCDEFGHIJKLMNOPQRSTUVWXYZ administrator@MININT-2023" ) # [END compute_instance_ssh_settings] @@ -178,7 +178,7 @@ def ml_compute_config_setup_3(self): # [START vm_ssh_settings] from azure.ai.ml.entities import VirtualMachineSshSettings - ssh_settings = VirtualMachineSshSettings( # type:ignore + ssh_settings = VirtualMachineSshSettings( # type: ignore admin_username="azureuser", admin_password="azureuserpassword", ssh_port=8888, @@ -192,7 +192,7 @@ def ml_compute_config_setup_3(self): vm_compute = VirtualMachineCompute( name="vm-compute", resource_id="/subscriptions/123456-1234-1234-1234-123456789/resourceGroups/my-rg/providers/Microsoft.Compute/virtualMachines/my-vm", - ssh_settings=ssh_settings, # type:ignore + ssh_settings=ssh_settings, # type: ignore ) # [END vm_compute] diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_genAI_monitors_configuration.py b/sdk/ml/azure-ai-ml/samples/ml_samples_genAI_monitors_configuration.py index d4babd3dadec..8de27cbb4fd4 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_genAI_monitors_configuration.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_genAI_monitors_configuration.py @@ -14,6 +14,7 @@ python ml_samples_genAI_monitors_configuration.py """ + import os from azure.ai.ml import MLClient from azure.ai.ml.entities import ( @@ -122,7 +123,7 @@ def ml_gen_ai_monitor_advance(self): monitor_settings = MonitorDefinition( compute=spark_compute, monitoring_target=monitoring_target, - monitoring_signals=monitoring_signals, # type:ignore + monitoring_signals=monitoring_signals, # type: ignore alert_notification=alert_notification, ) diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_misc.py b/sdk/ml/azure-ai-ml/samples/ml_samples_misc.py index c57b07984214..1d691b5eabdd 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_misc.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_misc.py @@ -66,7 +66,7 @@ def ml_misc_config_0(self): from azure.ai.ml import load_job from azure.ai.ml.entities import PipelineJob - pipeline_job: PipelineJob = load_job( # type:ignore + pipeline_job: PipelineJob = load_job( # type: ignore "./sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/invalid/combo.yml", params_override=[{"name": job_name}, {"compute": "cpucluster"}], ) @@ -168,7 +168,7 @@ def ml_misc_config_0(self): # [START model_package_entity_create] from azure.ai.ml.entities import AzureMLOnlineInferencingServer, CodeConfiguration, ModelPackage - modelPackage = ModelPackage( # type:ignore + modelPackage = ModelPackage( # type: ignore inferencing_server=AzureMLOnlineInferencingServer( code_configuration=CodeConfiguration(code="../model-1/foo/", scoring_script="score.py") ), @@ -340,7 +340,7 @@ def ml_misc_config_0(self): pipeline_job = load_job( "./sdk/ml/azure-ai-ml/tests/test_configs/command_job/command_job_test_local_env.yml" - ) # type:ignore + ) # type: ignore trigger = RecurrenceTrigger( frequency="week", interval=4, @@ -356,7 +356,7 @@ def ml_misc_config_0(self): from azure.ai.ml.constants import TimeZone from azure.ai.ml.entities import CronTrigger - trigger = CronTrigger( # type:ignore + trigger = CronTrigger( # type: ignore expression="15 10 * * 1", start_time=datetime(year=2022, month=3, day=10, hour=10, minute=15), end_time=datetime(year=2022, month=6, day=10, hour=10, minute=15), diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_pipeline_job_configurations.py b/sdk/ml/azure-ai-ml/samples/ml_samples_pipeline_job_configurations.py index b6c270f260a4..573489c39344 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_pipeline_job_configurations.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_pipeline_job_configurations.py @@ -50,7 +50,7 @@ def ml_pipeline_config(self): ) # Define a pipeline with decorator - @pipeline(name="sample_pipeline", description="pipeline description") # type:ignore + @pipeline(name="sample_pipeline", description="pipeline description") # type: ignore def sample_pipeline_func(pipeline_input1, pipeline_input2): # component1 and component2 will be added into the current pipeline component1 = component_func(component_in_number=pipeline_input1, component_in_path=uri_file_input) diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_spark_configurations.py b/sdk/ml/azure-ai-ml/samples/ml_samples_spark_configurations.py index c7b8d10b30d9..d3897bd7099b 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_spark_configurations.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_spark_configurations.py @@ -40,7 +40,7 @@ def ml_spark_config(self): ) monitor_definition = MonitorDefinition( - compute=SparkResourceConfiguration(instance_type="standard_e4s_v3", runtime_version="3.4"), # type:ignore + compute=SparkResourceConfiguration(instance_type="standard_e4s_v3", runtime_version="3.4"), # type: ignore monitoring_target=MonitoringTarget( ml_task="Classification", endpoint_deployment_id="azureml:fraud_detection_endpoint:fraud_detection_deployment", @@ -170,7 +170,7 @@ def ml_spark_config(self): dynamic_allocation_enabled=True, dynamic_allocation_min_executors=1, dynamic_allocation_max_executors=3, - identity=ManagedIdentityConfiguration(), # type:ignore + identity=ManagedIdentityConfiguration(), # type: ignore inputs={ "input1": Input( type="uri_file", path="azureml://datastores/workspaceblobstore/paths/python/data.csv", mode="direct" @@ -252,11 +252,11 @@ def ml_spark_config(self): ) # Define pipeline - @dsl.pipeline(description="submit a pipeline with spark job") # type:ignore + @dsl.pipeline(description="submit a pipeline with spark job") # type: ignore def spark_pipeline_from_builder(data): add_greeting_column = first_step(file_input=data) count_by_row = second_step(file_input=data) - return {"output": count_by_row.outputs.output} # type:ignore + return {"output": count_by_row.outputs.output} # type: ignore pipeline = spark_pipeline_from_builder( data=Input(path="/dataset/iris.csv", type=AssetTypes.URI_FILE, mode=InputOutputModes.DIRECT), diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_sweep_configurations.py b/sdk/ml/azure-ai-ml/samples/ml_samples_sweep_configurations.py index da37ced4e7dc..3825614a368c 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_sweep_configurations.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_sweep_configurations.py @@ -161,7 +161,7 @@ def ml_sweep_config(self): sampling_algorithm=BayesianSamplingAlgorithm(), trial=command_job, search_space={"ss": Choice(type="choice", values=[{"space1": True}, {"space2": True}])}, - inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}}, # type:ignore + inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}}, # type: ignore compute="top_level", limits=SweepJobLimits(trial_timeout=600), objective=Objective(goal="maximize", primary_metric="accuracy"), @@ -185,7 +185,7 @@ def ml_sweep_config(self): sampling_algorithm=GridSamplingAlgorithm(), trial=command_job, search_space={"ss": Choice(type="choice", values=[{"space1": True}, {"space2": True}])}, - inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}}, # type:ignore + inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}}, # type: ignore compute="top_level", limits=SweepJobLimits(trial_timeout=600), ) @@ -208,7 +208,7 @@ def ml_sweep_config(self): sampling_algorithm=RandomSamplingAlgorithm(seed=999, rule="sobol", logbase="e"), trial=command_job, search_space={"ss": Choice(type="choice", values=[{"space1": True}, {"space2": True}])}, - inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}}, # type:ignore + inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}}, # type: ignore compute="top_level", limits=SweepJobLimits(trial_timeout=600), ) diff --git a/sdk/ml/azure-ai-ml/samples/ml_samples_workspace.py b/sdk/ml/azure-ai-ml/samples/ml_samples_workspace.py index 8107838ad964..e4fa37ac399e 100644 --- a/sdk/ml/azure-ai-ml/samples/ml_samples_workspace.py +++ b/sdk/ml/azure-ai-ml/samples/ml_samples_workspace.py @@ -293,15 +293,15 @@ def ml_workspace_config_sample_snippets_operations(self): from azure.ai.ml.constants import Scope # list workspaces in the resource group set in ml_client - hubs = ml_client.workspace_hubs.list() # type:ignore - hubs = ml_client.workspace_hubs.list(scope=Scope.RESOURCE_GROUP) # type:ignore + hubs = ml_client.workspace_hubs.list() # type: ignore + hubs = ml_client.workspace_hubs.list(scope=Scope.RESOURCE_GROUP) # type: ignore # list workspaces in the subscription set in ml_client - hubs = ml_client.workspace_hubs.list(scope=Scope.SUBSCRIPTION) # type:ignore + hubs = ml_client.workspace_hubs.list(scope=Scope.SUBSCRIPTION) # type: ignore # [END hub_list] # [START hub_get] - workspace = ml_client.workspace_hubs.get(name="test-hub1") # type:ignore + workspace = ml_client.workspace_hubs.get(name="test-hub1") # type: ignore # [END hub_get] # [START hub_begin_create] @@ -314,17 +314,17 @@ def ml_workspace_config_sample_snippets_operations(self): location="eastus", resource_group=resource_group, ) - hub = ml_client.workspace_hubs.begin_create(workspace_hub=hub).result() # type:ignore + hub = ml_client.workspace_hubs.begin_create(workspace_hub=hub).result() # type: ignore # [END hub_begin_create] # [START hub_begin_update] - hub = ml_client.workspace_hubs.get(name="test-hub1") # type:ignore + hub = ml_client.workspace_hubs.get(name="test-hub1") # type: ignore hub.description = "a different description" - hub = ml_client.workspace_hubs.begin_update(workspace_hub=hub).result() # type:ignore + hub = ml_client.workspace_hubs.begin_update(workspace_hub=hub).result() # type: ignore # [END hub_begin_update] # [START hub_begin_delete] - ml_client.workspace_hubs.begin_delete( # type:ignore + ml_client.workspace_hubs.begin_delete( # type: ignore name="test-hub1", delete_dependent_resources=True, permanently_delete=True ) # [END hub_begin_delete] diff --git a/sdk/ml/azure-ai-ml/tests/code_asset/unittests/test_code_operations.py b/sdk/ml/azure-ai-ml/tests/code_asset/unittests/test_code_operations.py index b6d687490933..de402541b6eb 100644 --- a/sdk/ml/azure-ai-ml/tests/code_asset/unittests/test_code_operations.py +++ b/sdk/ml/azure-ai-ml/tests/code_asset/unittests/test_code_operations.py @@ -55,12 +55,10 @@ def test_create( p = tmp_path / "code.yml" code_path = tmp_path / "code_asset.txt" code_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {code_name} path: code_asset.txt - version: 3""" - ) + version: 3""") with patch( "azure.ai.ml._artifacts._artifact_utilities._upload_to_datastore", return_value=ArtifactStorageInfo(code_name, "3", "path", "datastore_id", "containerName"), diff --git a/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py b/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py index 4bf572b6ad1d..9481e854e4fa 100644 --- a/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py +++ b/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py @@ -508,12 +508,10 @@ def test_component_update_code(self, client: MLClient, randstr: Callable[[str], # create again with different code and check error msg code_path = tmp_path / "code.yml" - code_path.write_text( - f""" + code_path.write_text(f""" name: {component_name} version: 1 - path: .""" - ) + path: .""") new_code = load_code(source=code_path) code_resource = client._code.create_or_update(new_code) params_override = [{"name": component_name, "code": ARM_ID_PREFIX + code_resource.id}] diff --git a/sdk/ml/azure-ai-ml/tests/dataset/e2etests/test_data.py b/sdk/ml/azure-ai-ml/tests/dataset/e2etests/test_data.py index 859416515de3..1c07632a45c9 100644 --- a/sdk/ml/azure-ai-ml/tests/dataset/e2etests/test_data.py +++ b/sdk/ml/azure-ai-ml/tests/dataset/e2etests/test_data.py @@ -24,14 +24,12 @@ def test_data_upload_file(self, client: MLClient, tmp_path: Path, randstr: Calla data_path.write_text("hello world") name = randstr("name") version = 4 - f.write_text( - f""" + f.write_text(f""" name: {name} version: {version} path: {data_path} type: uri_file - """ - ) + """) data_asset = load_data(source=f) client.data.create_or_update(data_asset) @@ -49,15 +47,13 @@ def test_create_uri_folder(self, client: MLClient, tmp_path: Path, randstr: Call tmp_file = tmp_folder / "tmp_file.csv" tmp_file.write_text("hello world") name = randstr("name") - data_path.write_text( - f""" + data_path.write_text(f""" name: {name} version: 1 description: "this is a test dataset" path: {tmp_folder} type: uri_folder - """ - ) + """) with open(data_path, "r") as f: config = yaml.safe_load(f) @@ -85,15 +81,13 @@ def test_create_uri_file( tmp_file = tmp_folder / "tmp_file.csv" tmp_file.write_text("hello world") name = randstr("name") - data_yaml.write_text( - f""" + data_yaml.write_text(f""" name: {name} version: 2 description: "this is a test dataset" path: {tmp_file} type: uri_file - """ - ) + """) with open(data_yaml, "r") as f: config = yaml.safe_load(f) @@ -118,8 +112,7 @@ def test_create_mltable(self, client: MLClient, tmp_path: Path, randstr: Callabl tmp_folder = tmp_path / "tmp_folder" tmp_folder.mkdir() tmp_metadata_file = tmp_folder / "MLTable" - tmp_metadata_file.write_text( - """ + tmp_metadata_file.write_text(""" paths: - file: ./tmp_file.csv transformations: @@ -127,11 +120,9 @@ def test_create_mltable(self, client: MLClient, tmp_path: Path, randstr: Callabl delimiter: "," encoding: ascii header: all_files_same_headers -""" - ) +""") tmp_file = tmp_folder / "tmp_file.csv" - tmp_file.write_text( - """ + tmp_file.write_text(""" sepal_length,sepal_width,petal_length,petal_width,species 101,152,123,187,Iris-setosa 4.9,3,1.4,0.2,Iris-setosa @@ -145,18 +136,15 @@ def test_create_mltable(self, client: MLClient, tmp_path: Path, randstr: Callabl 4.9,3.1,1.5,0.1,Iris-setosa 5.4,3.7,1.5,0.2,Iris-setosa 4.8,3.4,1.6,0.2,Iris-setosa -""" - ) +""") name = randstr("name") - data_path.write_text( - f""" + data_path.write_text(f""" name: {name} version: 1 description: "this is an mltable dataset" path: {tmp_folder} type: mltable - """ - ) + """) with open(data_path, "r") as f: config = yaml.safe_load(f) @@ -297,15 +285,13 @@ def test_data_unsupported_datastore(self, client: MLClient, tmp_path: Path, rand data_path.write_text("hello world") name = randstr("name") version = 4 - f.write_text( - f""" + f.write_text(f""" name: {name} version: {version} path: {data_path} type: uri_file datastore: workspacefilestore - """ - ) + """) data_asset = load_data(f) assert data_asset.datastore == "workspacefilestore" @@ -325,8 +311,7 @@ def test_data_auto_delete_setting(self, client: MLClient, tmp_path: Path, randst tmp_file = tmp_folder / "tmp_file_with_auto_delete_setting.csv" tmp_file.write_text("hello world") name = randstr("name") - data_path.write_text( - f""" + data_path.write_text(f""" name: {name} version: 1 description: "this is a test dataset with auto delete setting" @@ -335,8 +320,7 @@ def test_data_auto_delete_setting(self, client: MLClient, tmp_path: Path, randst auto_delete_setting: condition: created_greater_than value: "30d" - """ - ) + """) data_asset = load_data(source=data_path) client.data.create_or_update(data_asset) diff --git a/sdk/ml/azure-ai-ml/tests/index/unittests/test_index_schema.py b/sdk/ml/azure-ai-ml/tests/index/unittests/test_index_schema.py index f88d6bdd8c32..361515c1f9e2 100644 --- a/sdk/ml/azure-ai-ml/tests/index/unittests/test_index_schema.py +++ b/sdk/ml/azure-ai-ml/tests/index/unittests/test_index_schema.py @@ -18,8 +18,7 @@ class TestIndexSchema: def test_deserialize(self) -> None: """Validate that load_index can deserialize a YAML file.""" - yaml_file = io.StringIO( - f""" + yaml_file = io.StringIO(f""" name: "foo" version: "2" stage: "Development" @@ -27,8 +26,7 @@ def test_deserialize(self) -> None: tags: {{"tag1": "foo", "tag2": "bar"}} properties: {{"prop1": "foo", "prop2": "bar"}} path: {MOCK_STORAGE_PATH!r} - """ - ) + """) index = load_index(source=yaml_file) @@ -45,11 +43,9 @@ def test_deserialize(self) -> None: def test_missing_name(self) -> None: """Validate that load_index fails when no name is provided.""" - yaml_file = io.StringIO( - f""" + yaml_file = io.StringIO(f""" path: {MOCK_STORAGE_PATH!r} - """ - ) + """) with pytest.raises( ValidationError, match=re.compile(r'"name"[^\n]+\n\s+"Missing data for required field."', re.MULTILINE) @@ -58,11 +54,9 @@ def test_missing_name(self) -> None: def test_missing_path(self) -> None: """Validate that load_index fails when no path is provided.""" - yaml_file = io.StringIO( - """ + yaml_file = io.StringIO(""" name: "foo" - """ - ) + """) with pytest.raises( ValidationError, match=re.compile(r'"path"[^\n]+\n\s+"Missing data for required field."', re.MULTILINE) @@ -71,12 +65,10 @@ def test_missing_path(self) -> None: def test_minimal(self) -> None: """Validate that load_index succeeds when only provided the required fields.""" - yaml_file = io.StringIO( - f""" + yaml_file = io.StringIO(f""" name: "foo" path: {MOCK_STORAGE_PATH!r} - """ - ) + """) index = load_index(source=yaml_file) diff --git a/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_fields.py b/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_fields.py index 4d75d2056738..94257615c6f7 100644 --- a/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_fields.py +++ b/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_fields.py @@ -160,31 +160,25 @@ def test_arm_versioned_str_failed(self, mock_workspace_scope: OperationScope) -> def test_version_types(self, tmp_path): data_name = f"version_rand_name" p = tmp_path / "version_float.yml" - p.write_text( - f""" + p.write_text(f""" name: {data_name} version: 3.12 -path: ./bla""" - ) +path: ./bla""") asset = load_data(source=p) assert asset.version == "3.12" p = tmp_path / "version_int.yml" - p.write_text( - f""" + p.write_text(f""" name: {data_name} version: 3 -path: ./bla""" - ) +path: ./bla""") asset = load_data(source=p) assert asset.version == "3" p = tmp_path / "version_str.yml" - p.write_text( - f""" + p.write_text(f""" name: {data_name} version: foobar -path: ./bla""" - ) +path: ./bla""") asset = load_data(source=p) assert asset.version == "foobar" diff --git a/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_local_job_invoker.py b/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_local_job_invoker.py index 53f1ab6db677..c7ba205b1027 100644 --- a/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_local_job_invoker.py +++ b/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_local_job_invoker.py @@ -20,13 +20,9 @@ def test_serialize_patch(self): in_text += '[{"Id": "abc-123"}]' in_text += """' Everything after is ignored""" - expected_out = ( - """unread strings + expected_out = """unread strings everythng before are ignored - continue to ignore --snapshots""" - + ' "[{\\"Id\\": \\"abc-123\\"}]" ' - + """Everything after is ignored""" - ) + continue to ignore --snapshots""" + ' "[{\\"Id\\": \\"abc-123\\"}]" ' + """Everything after is ignored""" with tempfile.TemporaryDirectory() as temp_dir: with tempfile.NamedTemporaryFile(mode="w", delete=False, dir=temp_dir) as f: @@ -38,13 +34,9 @@ def test_serialize_patch(self): def test_serialize_patch_no_op(self): # Validate that the previously escaped string does not modify if funciton is run dummy_file = Path("./dummy_file2.txt").resolve() - expected_out = ( - """unread strings + expected_out = """unread strings everythng before are ignored - continue to ignore --snapshots""" - + ' "[{\\"Id\\": \\"abc-123\\"}]" ' - + """Everything after is ignored""" - ) + continue to ignore --snapshots""" + ' "[{\\"Id\\": \\"abc-123\\"}]" ' + """Everything after is ignored""" dummy_file.write_text(expected_out) # Should change nothing if correctly serialized patch_invocation_script_serialization(dummy_file) diff --git a/sdk/ml/azure-ai-ml/tests/local_endpoint/unittests/test_local_endpoint_validator.py b/sdk/ml/azure-ai-ml/tests/local_endpoint/unittests/test_local_endpoint_validator.py index 0c3fdeac4068..e49420278624 100644 --- a/sdk/ml/azure-ai-ml/tests/local_endpoint/unittests/test_local_endpoint_validator.py +++ b/sdk/ml/azure-ai-ml/tests/local_endpoint/unittests/test_local_endpoint_validator.py @@ -52,7 +52,7 @@ def test_environment_does_not_contain_local_docker_fails(self): def test_environment_contains_base_image_succeeds(self): environment = Environment(docker_image="ubuntu:latest") deployment = ManagedOnlineDeployment(name="deployment", environment=environment) - (base_image, dockerfile) = get_local_environment_artifacts(endpoint_name="test-endpoint", deployment=deployment) + base_image, dockerfile = get_local_environment_artifacts(endpoint_name="test-endpoint", deployment=deployment) assert "ubuntu:latest" == base_image assert dockerfile is None @@ -62,7 +62,7 @@ def test_environment_contains_dockerfile_succeeds(self): name="deployment", environment=environment, ) - (base_image, dockerfile) = get_local_environment_artifacts(endpoint_name="test-endpoint", deployment=deployment) + base_image, dockerfile = get_local_environment_artifacts(endpoint_name="test-endpoint", deployment=deployment) assert base_image is None assert "file:./Dockerfile" == dockerfile diff --git a/sdk/ml/azure-ai-ml/tests/model/unittests/test_model_operations.py b/sdk/ml/azure-ai-ml/tests/model/unittests/test_model_operations.py index 2a6879078545..1d34b145f886 100644 --- a/sdk/ml/azure-ai-ml/tests/model/unittests/test_model_operations.py +++ b/sdk/ml/azure-ai-ml/tests/model/unittests/test_model_operations.py @@ -77,12 +77,10 @@ def test_create_with_spec_file( p = tmp_path / "model_full.yml" model_path = tmp_path / "model.pkl" model_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {model_name} path: ./model.pkl -version: 3""" - ) +version: 3""") with patch( "azure.ai.ml._artifacts._artifact_utilities._upload_to_datastore", @@ -127,11 +125,9 @@ def test_create_autoincrement( p = tmp_path / "model_full.yml" model_path = tmp_path / "model.pkl" model_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {model_name} -path: ./model.pkl""" - ) +path: ./model.pkl""") model = load_model(source=p) assert model._auto_increment_version model.version = None @@ -409,12 +405,10 @@ def test_create_success( p = tmp_path / "model_full.yml" model_path = tmp_path / "model.pkl" model_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {model_name} path: ./model.pkl -version: 3""" - ) +version: 3""") with patch( "azure.ai.ml._artifacts._artifact_utilities._upload_to_datastore", @@ -480,11 +474,9 @@ def test_create_raises_if_wrong_type( p = tmp_path / "model_full.yml" model_path = tmp_path / "model.pkl" model_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {model_name} -path: ./model.pkl""" - ) +path: ./model.pkl""") new_model = load_model(source=p) new_model.properties = new_properties with patch( @@ -522,11 +514,9 @@ def test_return_properties( p = tmp_path / "model_full.yml" model_path = tmp_path / "model.pkl" model_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {model_name} -path: ./model.pkl""" - ) +path: ./model.pkl""") get_model = load_model(source=p) get_model.properties = {"model": "from_get"} latest_model = load_model(source=p) @@ -546,11 +536,9 @@ def test_model_operation_raises_on_evaluators(self, mock_model_operation: ModelO p = tmp_path / "model_full.yml" model_path = tmp_path / "model.pkl" model_path.write_text("hello world") - p.write_text( - f""" + p.write_text(f""" name: {model_name} -path: ./model.pkl""" - ) +path: ./model.pkl""") model = load_model(source=p) model.properties = {"is-promptflow": "true", "is-evaluator": "true"} with pytest.raises(ValidationException) as cm: diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/copy_data/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/copy_data/pipeline.py index 7c11b0abf41d..086b391411a1 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/copy_data/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/copy_data/pipeline.py @@ -6,7 +6,6 @@ from azure.ai.ml.constants._component import DataTransferTaskType, DataCopyMode from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_database/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_database/pipeline.py index 254f0932b918..8500370f83cb 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_database/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_database/pipeline.py @@ -5,7 +5,6 @@ from azure.ai.ml.constants._common import AssetTypes, SERVERLESS_COMPUTE from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_file_system/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_file_system/pipeline.py index 61d4b60da9d3..368255cb96fc 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_file_system/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/export_file_system/pipeline.py @@ -6,7 +6,6 @@ from azure.ai.ml.constants._component import DataTransferTaskType from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_database/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_database/pipeline.py index 06bab4fce8bb..fd5196ac7b3b 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_database/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_database/pipeline.py @@ -5,7 +5,6 @@ from azure.ai.ml.constants._common import AssetTypes, SERVERLESS_COMPUTE from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_file_system/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_file_system/pipeline.py index d7ea1e6aa7fa..095d892f6931 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_file_system/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_file_system/pipeline.py @@ -5,7 +5,6 @@ from azure.ai.ml.constants._common import AssetTypes, SERVERLESS_COMPUTE from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_stored_database/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_stored_database/pipeline.py index 478c39601fb7..a148dc896872 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_stored_database/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_stored_database/pipeline.py @@ -6,7 +6,6 @@ from azure.ai.ml.constants._component import DataTransferTaskType from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/pipeline.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/pipeline.py index 0872dd9d6a8f..bc65109d43e6 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/pipeline.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/pipeline.py @@ -6,7 +6,6 @@ from azure.ai.ml.constants._common import AssetTypes, SERVERLESS_COMPUTE from azure.ai.ml.entities import PipelineJob - parent_dir = str(Path(__file__).parent) diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component/src/file_batch_inference.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component/src/file_batch_inference.py index 2a02618ca397..57ad33ed80ab 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component/src/file_batch_inference.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component/src/file_batch_inference.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """This module simulate run() which can specify succeed every n items from argument.""" + import argparse from pathlib import Path diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component_with_file_input/src/score.py b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component_with_file_input/src/score.py index 2a02618ca397..57ad33ed80ab 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component_with_file_input/src/score.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/parallel_component_with_file_input/src/score.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """This module simulate run() which can specify succeed every n items from argument.""" + import argparse from pathlib import Path diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/all_types/sweep/src/greet.py b/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/all_types/sweep/src/greet.py index 5ffac1173b0a..ca77271aa187 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/all_types/sweep/src/greet.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/all_types/sweep/src/greet.py @@ -1,6 +1,5 @@ import argparse - if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--whom", type=str, default="World") diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/job_tier/sweep_in_pipeline/src/greet.py b/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/job_tier/sweep_in_pipeline/src/greet.py index 5ffac1173b0a..ca77271aa187 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/job_tier/sweep_in_pipeline/src/greet.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/pipeline_jobs/serverless_compute/job_tier/sweep_in_pipeline/src/greet.py @@ -1,6 +1,5 @@ import argparse - if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--whom", type=str, default="World") diff --git a/sdk/ml/azure-ai-ml/tests/test_configs/script_parallel/pass_through.py b/sdk/ml/azure-ai-ml/tests/test_configs/script_parallel/pass_through.py index 2a02618ca397..57ad33ed80ab 100644 --- a/sdk/ml/azure-ai-ml/tests/test_configs/script_parallel/pass_through.py +++ b/sdk/ml/azure-ai-ml/tests/test_configs/script_parallel/pass_through.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """This module simulate run() which can specify succeed every n items from argument.""" + import argparse from pathlib import Path diff --git a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py index 9470ebf82cc9..09ba33f49d7e 100644 --- a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py @@ -221,7 +221,7 @@ def test_create_workspace_with_serverless_custom_vnet( mock_workspace_operation_aug_2023_preview._operation.get = MagicMock(return_value=None) mocker.patch("azure.ai.ml._arm_deployments.ArmDeploymentExecutor.deploy_resource", return_value=LROPoller) mock_workspace_operation_aug_2023_preview.begin_create(ws) - (_, param, _) = spy.spy_return + _, param, _ = spy.spy_return settings = param["serverless_compute_settings"]["value"] if serverless_compute_settings is None: # Will return empty dict if serverless_compute_settings is None diff --git a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations_base.py b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations_base.py index 07254188f348..06bd87f51f39 100644 --- a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations_base.py +++ b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations_base.py @@ -588,7 +588,7 @@ def test_create_workspace_with_serverless_custom_vnet( mock_workspace_operation_base._operation.get = MagicMock(return_value=None) mocker.patch("azure.ai.ml._arm_deployments.ArmDeploymentExecutor.deploy_resource", return_value=LROPoller) mock_workspace_operation_base.begin_create(ws) - (_, param, _) = spy.spy_return + _, param, _ = spy.spy_return settings = param["serverless_compute_settings"]["value"] if serverless_compute_settings is None: # settings is an empty JSON REST object at this point diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_patch.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_patch.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_patch.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_patch.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/operations/_patch.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/operations/_patch.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_patch.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_patch.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_patch.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_patch.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/_patch.py b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/_patch.py +++ b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/_patch.py b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/_patch.py +++ b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/operations/_patch.py b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/operations/_patch.py +++ b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/models/_patch.py b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/models/_patch.py +++ b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/operations/_patch.py b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/operations/_patch.py +++ b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/setup.py b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/setup.py index 9797161b4a50..fe1a2c1ea099 100644 --- a/sdk/mongodbatlas/azure-mgmt-mongodbatlas/setup.py +++ b/sdk/mongodbatlas/azure-mgmt-mongodbatlas/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_patch.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_patch.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/operations/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/operations/_patch.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models/_patch.py index 1f25eae6795f..321f7fbfc7e5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models/_patch.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models/_patch.py @@ -5,6 +5,7 @@ """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/operations/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/operations/_patch.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-mgmt-monitor/tests/disable_test_cli_mgmt_monitor_async.py b/sdk/monitor/azure-mgmt-monitor/tests/disable_test_cli_mgmt_monitor_async.py index 03e4c26fabf5..dd6cdea7b8be 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/disable_test_cli_mgmt_monitor_async.py +++ b/sdk/monitor/azure-mgmt-monitor/tests/disable_test_cli_mgmt_monitor_async.py @@ -15,7 +15,6 @@ from _aio_testcase import AzureMgmtAsyncTestCase - AZURE_LOCATION = "eastus" diff --git a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_operations/_patch.py b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_operations/_patch.py index a997f12d70a5..ac30bd85695a 100644 --- a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import Sequence from io import IOBase import logging diff --git a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_patch.py b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_patch.py index 58b4613e07f5..9e330604da80 100644 --- a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_patch.py +++ b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, TYPE_CHECKING from ._client import LogsIngestionClient as GeneratedClient diff --git a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_operations/_patch.py b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_operations/_patch.py index 16c5ecfe6b23..d9a5fbfda2d2 100644 --- a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import Sequence from io import IOBase import logging diff --git a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_patch.py b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_patch.py index 75f07408cc2e..a8d325185a1f 100644 --- a/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_patch.py +++ b/sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, TYPE_CHECKING from ._client import LogsIngestionClient as GeneratedClient from .._version import SDK_MONIKER diff --git a/sdk/monitor/azure-monitor-ingestion/samples/sample_custom_error_callback.py b/sdk/monitor/azure-monitor-ingestion/samples/sample_custom_error_callback.py index 66187edbc297..9f861c4ee262 100644 --- a/sdk/monitor/azure-monitor-ingestion/samples/sample_custom_error_callback.py +++ b/sdk/monitor/azure-monitor-ingestion/samples/sample_custom_error_callback.py @@ -33,7 +33,6 @@ from azure.identity import DefaultAzureCredential from azure.monitor.ingestion import LogsIngestionClient, LogsUploadError - endpoint = os.environ["DATA_COLLECTION_ENDPOINT"] credential = DefaultAzureCredential() diff --git a/sdk/monitor/azure-monitor-ingestion/samples/sample_send_small_logs.py b/sdk/monitor/azure-monitor-ingestion/samples/sample_send_small_logs.py index 484999f5da54..bb93ee24bc96 100644 --- a/sdk/monitor/azure-monitor-ingestion/samples/sample_send_small_logs.py +++ b/sdk/monitor/azure-monitor-ingestion/samples/sample_send_small_logs.py @@ -33,7 +33,6 @@ from azure.identity import DefaultAzureCredential from azure.monitor.ingestion import LogsIngestionClient - endpoint = os.environ["DATA_COLLECTION_ENDPOINT"] credential = DefaultAzureCredential() diff --git a/sdk/monitor/azure-monitor-ingestion/tests/base_testcase.py b/sdk/monitor/azure-monitor-ingestion/tests/base_testcase.py index cde9b62b753f..5b4d6f3a2707 100644 --- a/sdk/monitor/azure-monitor-ingestion/tests/base_testcase.py +++ b/sdk/monitor/azure-monitor-ingestion/tests/base_testcase.py @@ -7,7 +7,6 @@ from devtools_testutils import AzureRecordedTestCase - ENV_MONITOR_ENVIRONMENT = "MONITOR_ENVIRONMENT" AUDIENCE_MAP = { "AzureCloud": "https://monitor.azure.com", diff --git a/sdk/monitor/azure-monitor-ingestion/tests/conftest.py b/sdk/monitor/azure-monitor-ingestion/tests/conftest.py index 560052fcbbcc..439713bbcfc0 100644 --- a/sdk/monitor/azure-monitor-ingestion/tests/conftest.py +++ b/sdk/monitor/azure-monitor-ingestion/tests/conftest.py @@ -35,7 +35,6 @@ add_oauth_response_sanitizer, ) - # Environment variable keys ENV_SUBSCRIPTION_ID = "AZURE_SUBSCRIPTION_ID" ENV_DCE = "AZURE_MONITOR_DCE" diff --git a/sdk/monitor/azure-monitor-ingestion/tests/perf_tests/upload_logs.py b/sdk/monitor/azure-monitor-ingestion/tests/perf_tests/upload_logs.py index 176665f16b84..e70f6f97fd2c 100644 --- a/sdk/monitor/azure-monitor-ingestion/tests/perf_tests/upload_logs.py +++ b/sdk/monitor/azure-monitor-ingestion/tests/perf_tests/upload_logs.py @@ -14,7 +14,6 @@ from azure.monitor.ingestion import LogsIngestionClient from azure.monitor.ingestion.aio import LogsIngestionClient as AsyncLogsIngestionClient - ALPHANUMERIC_CHARACTERS = string.ascii_letters + string.digits diff --git a/sdk/monitor/azure-monitor-ingestion/tests/test_helpers.py b/sdk/monitor/azure-monitor-ingestion/tests/test_helpers.py index 89e0d3cd9313..0edfb9a1088b 100644 --- a/sdk/monitor/azure-monitor-ingestion/tests/test_helpers.py +++ b/sdk/monitor/azure-monitor-ingestion/tests/test_helpers.py @@ -18,7 +18,6 @@ GZIP_MAGIC_NUMBER, ) - ALPHANUMERIC_CHARACTERS = string.ascii_letters + string.digits random.seed(42) # For repeatability diff --git a/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion.py b/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion.py index 40414068ed6c..34732a1d655b 100644 --- a/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion.py +++ b/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion.py @@ -17,7 +17,6 @@ from base_testcase import LogsIngestionClientTestCase - LOGS_BODY = [ { "Time": "2021-12-08T23:51:14.1104269Z", diff --git a/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion_async.py b/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion_async.py index de0c5f982f98..9155d37cb73f 100644 --- a/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion_async.py +++ b/sdk/monitor/azure-monitor-ingestion/tests/test_logs_ingestion_async.py @@ -17,7 +17,6 @@ from base_testcase import LogsIngestionClientTestCase - LOGS_BODY = [ { "Time": "2021-12-08T23:51:14.1104269Z", diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/__init__.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/__init__.py index 999928856779..ee3e44dee228 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/__init__.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/__init__.py @@ -16,7 +16,6 @@ from azure.monitor.opentelemetry.exporter._configuration._utils import make_onesettings_request from azure.monitor.opentelemetry.exporter._utils import Singleton - # Set up logger logger = logging.getLogger(__name__) diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_state.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_state.py index 6e2ff3e2e928..16e0ab1876e7 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_state.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_state.py @@ -4,6 +4,7 @@ This module provides global access functions for the Configuration Manager singleton. """ + import os from typing import Optional, TYPE_CHECKING diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_utils.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_utils.py index ce23568be464..4c44e62274f7 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_utils.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/_utils.py @@ -13,7 +13,6 @@ _ONE_SETTINGS_CHANGE_VERSION_KEY, ) - logger = logging.getLogger(__name__) diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_constants.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_constants.py index 6ebf38321c64..57b208045dc6 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_constants.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_constants.py @@ -11,7 +11,6 @@ ) from azure.core import CaseInsensitiveEnumMeta - _EXPORTER_DOMAIN_SCHEMA_VERSION = 2 # Environment variables diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_operations/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_operations/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/models/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/models/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/exporter/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_exporter.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_exporter.py index d5631885fed2..01b60f61f486 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_exporter.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_exporter.py @@ -57,7 +57,6 @@ PeriodicTask, ) - _logger = logging.getLogger(__name__) diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_operations/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_operations/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/models/_patch.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/models/_patch.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_generated/livemetrics/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/_base.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/_base.py index 9055c41fc3ce..5e241d015582 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/_base.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/_base.py @@ -70,7 +70,6 @@ get_customer_stats_manager, ) - logger = logging.getLogger(__name__) _AZURE_TEMPDIR_PREFIX = "Microsoft-AzureMonitor-" diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py index 95ba832c219e..077c59293656 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py @@ -60,7 +60,6 @@ ) from . import _utils as trace_utils - _logger = logging.getLogger(__name__) __all__ = ["AzureMonitorTraceExporter"] diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_managed_credential.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_managed_credential.py index 6f16544c7474..fc1db91bc2cf 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_managed_credential.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_managed_credential.py @@ -5,6 +5,7 @@ Credential. Credentials are used for Azure Active Directory Authentication. Custom dependencies are tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter. """ + # mypy: disable-error-code="attr-defined" import os @@ -17,7 +18,6 @@ from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter - credential = ManagedIdentityCredential(client_id="") exporter = AzureMonitorTraceExporter.from_connection_string( os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"], credential=credential diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_secret_credential.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_secret_credential.py index 352299db5fcd..79dbdeb0a537 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_secret_credential.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/samples/authentication/sample_secret_credential.py @@ -5,6 +5,7 @@ Credential. Credentials are used for Azure Active Directory Authentication. Custom dependencies are tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter. """ + # mypy: disable-error-code="attr-defined" import os @@ -17,7 +18,6 @@ from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter - credential = ClientSecretCredential( tenant_id=" + return HttpResponse(""" @@ -35,8 +34,7 @@ def index(_request):

Refresh this page and inspect the HTML source for injected browser SDK snippet.

-""" - ) +""") urlpatterns = [ diff --git a/sdk/monitor/azure-monitor-opentelemetry/tests/diagnostics/test_diagnostic_logging.py b/sdk/monitor/azure-monitor-opentelemetry/tests/diagnostics/test_diagnostic_logging.py index a0e7088339da..ec68fb75237e 100644 --- a/sdk/monitor/azure-monitor-opentelemetry/tests/diagnostics/test_diagnostic_logging.py +++ b/sdk/monitor/azure-monitor-opentelemetry/tests/diagnostics/test_diagnostic_logging.py @@ -11,7 +11,6 @@ import azure.monitor.opentelemetry._diagnostics.diagnostic_logging as diagnostic_logger - TEST_SITE_NAME = "TEST_SITE_NAME" TEST_CUSTOMER_IKEY = "TEST_CUSTOMER_IKEY" TEST_EXTENSION_VERSION = "TEST_EXTENSION_VERSION" diff --git a/sdk/monitor/azure-monitor-opentelemetry/tests/test_configure.py b/sdk/monitor/azure-monitor-opentelemetry/tests/test_configure.py index 7adfbeb5b33f..25639998a78f 100644 --- a/sdk/monitor/azure-monitor-opentelemetry/tests/test_configure.py +++ b/sdk/monitor/azure-monitor-opentelemetry/tests/test_configure.py @@ -27,7 +27,6 @@ ) from azure.monitor.opentelemetry._diagnostics.diagnostic_logging import _DISTRO_DETECTS_ATTACH - TEST_RESOURCE = Resource({"foo": "bar"}) diff --git a/sdk/monitor/azure-monitor-opentelemetry/tests/utils/test_configurations.py b/sdk/monitor/azure-monitor-opentelemetry/tests/utils/test_configurations.py index 81caeeda6faf..e57888d70e9e 100644 --- a/sdk/monitor/azure-monitor-opentelemetry/tests/utils/test_configurations.py +++ b/sdk/monitor/azure-monitor-opentelemetry/tests/utils/test_configurations.py @@ -52,7 +52,6 @@ from azure.monitor.opentelemetry._version import VERSION - TEST_DEFAULT_RESOURCE = Resource({"test.attributes.1": "test_value_1", "test.attributes.2": "test_value_2"}) TEST_CUSTOM_RESOURCE = Resource({"test.attributes.2": "test_value_4", "test.attributes.3": "test_value_3"}) TEST_MERGED_RESOURCE = Resource( diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index 8ac497467e01..1451835e801b 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -14,7 +14,6 @@ from ._exceptions import LogsQueryError from ._helpers import construct_iso8601, process_row - JSON = Mapping[str, Any] # pylint: disable=unsubscriptable-object diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_operations/_patch.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_patch.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_patch.py index 82d8fd346164..9464ab877dd7 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_patch.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from datetime import timedelta, datetime from typing import Any, Union, Sequence, Dict, List, cast, Tuple, Optional, MutableMapping, TYPE_CHECKING from urllib.parse import urlparse diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_operations/_patch.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_patch.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_patch.py index 053ae7f2dee3..5f931464c1aa 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_patch.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from datetime import datetime, timedelta from typing import Any, cast, Tuple, Union, Sequence, Dict, List, Optional, MutableMapping, TYPE_CHECKING from urllib.parse import urlparse diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/models/_patch.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/models/_patch.py index 0413c691f7f6..fb187459c851 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/models/_patch.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List from . import _models # pylint: disable=unused-import diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_authentication_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_authentication_async.py index 23cd4fe32acc..7e1317508bce 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_authentication_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_authentication_async.py @@ -11,6 +11,7 @@ This example uses DefaultAzureCredential, which requests a token from Microsoft Entra ID. For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import asyncio diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_batch_query_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_batch_query_async.py index 1106e7c1234d..758e7d39f165 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_batch_query_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_batch_query_async.py @@ -16,6 +16,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + import asyncio # [START send_query_batch_async] diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py index ef71057e79fd..def9c1abe939 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py @@ -17,6 +17,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + import asyncio # [START send_logs_query_async] diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_logs_query_visualization_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_logs_query_visualization_async.py index 0161f4fc5a37..d5ecc156e6c8 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_logs_query_visualization_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_logs_query_visualization_async.py @@ -24,6 +24,7 @@ This example uses DefaultAzureCredential, which requests a token from Microsoft Entra ID. For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import asyncio from datetime import timedelta import os diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_resource_logs_query_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_resource_logs_query_async.py index 8abef3358c57..d79591c0f50e 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_resource_logs_query_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_resource_logs_query_async.py @@ -18,6 +18,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + import asyncio # [START resource_logs_query_async] diff --git a/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py b/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py index 3bac327a2129..a37f0f03a375 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py @@ -26,7 +26,6 @@ from azure.monitor.query import LogsQueryClient, LogsBatchQuery, LogsQueryStatus import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py b/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py index 78d42c33a50b..f27f9a9ddab9 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py @@ -18,6 +18,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + from datetime import timedelta import os @@ -26,7 +27,6 @@ from azure.monitor.query import LogsQueryClient import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py index 4b5dbc343809..e6f1fe44755e 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py @@ -17,6 +17,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + from datetime import timedelta import os from pprint import pprint @@ -26,7 +27,6 @@ from azure.monitor.query import LogsQueryClient, LogsQueryStatus import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_query_visualization.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_query_visualization.py index 7917e2aa4292..428c2592ade6 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_query_visualization.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_query_visualization.py @@ -24,6 +24,7 @@ This example uses DefaultAzureCredential, which requests a token from Microsoft Entra ID. For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + from datetime import timedelta import os @@ -32,7 +33,6 @@ from azure.monitor.query import LogsQueryClient, LogsQueryStatus import plotly.express as px - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py index ed23df207fdc..746876a3e029 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py @@ -16,6 +16,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + # [START send_logs_query] from datetime import timedelta import os @@ -25,7 +26,6 @@ from azure.monitor.query import LogsQueryClient, LogsQueryStatus import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py index b5b9eded89eb..8212c63ac284 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py @@ -17,6 +17,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + from datetime import timedelta import os @@ -25,7 +26,6 @@ from azure.monitor.query import LogsQueryClient, LogsQueryStatus import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_resource_logs_query.py b/sdk/monitor/azure-monitor-query/samples/sample_resource_logs_query.py index 0bb2e6ef35e2..ff0acfca5339 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_resource_logs_query.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_resource_logs_query.py @@ -18,6 +18,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + # [START resource_logs_query] from datetime import timedelta import os @@ -27,7 +28,6 @@ from azure.monitor.query import LogsQueryClient, LogsQueryStatus import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py b/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py index ab80e959ac9d..1e22e1ba684c 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py @@ -16,6 +16,7 @@ **Note** - Although this example uses pandas to print the response, it's optional and isn't a required package for querying. Alternatively, native Python can be used as well. """ + from datetime import timedelta import os @@ -24,7 +25,6 @@ from azure.monitor.query import LogsQueryClient, LogsQueryStatus import pandas as pd - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py b/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py index 4969e8590343..b540118c2fe5 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py @@ -14,6 +14,7 @@ This example uses DefaultAzureCredential, which requests a token from Microsoft Entra ID. For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + from datetime import timedelta import os @@ -21,7 +22,6 @@ from azure.identity import DefaultAzureCredential from azure.monitor.query import LogsQueryClient, LogsQueryStatus - credential = DefaultAzureCredential() client = LogsQueryClient(credential) diff --git a/sdk/monitor/azure-monitor-query/setup.py b/sdk/monitor/azure-monitor-query/setup.py index 7b75d47ded79..072e26479092 100644 --- a/sdk/monitor/azure-monitor-query/setup.py +++ b/sdk/monitor/azure-monitor-query/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-monitor-query" PACKAGE_PPRINT_NAME = "Azure Monitor Query" PACKAGE_NAMESPACE = "azure.monitor.query" diff --git a/sdk/monitor/azure-monitor-query/tests/base_testcase.py b/sdk/monitor/azure-monitor-query/tests/base_testcase.py index 1ab2c346e469..326ce8f6aa88 100644 --- a/sdk/monitor/azure-monitor-query/tests/base_testcase.py +++ b/sdk/monitor/azure-monitor-query/tests/base_testcase.py @@ -7,7 +7,6 @@ from devtools_testutils import AzureRecordedTestCase - ENV_MONITOR_ENVIRONMENT = "MONITOR_ENVIRONMENT" ENV_MONITOR_RESOURCE_MANAGER_URL = "MONITOR_RESOURCE_MANAGER_URL" ENV_MONITOR_LOCATION = "MONITOR_LOCATION" diff --git a/sdk/monitor/azure-monitor-query/tests/conftest.py b/sdk/monitor/azure-monitor-query/tests/conftest.py index 2100a6dc10c9..0358cc95358d 100644 --- a/sdk/monitor/azure-monitor-query/tests/conftest.py +++ b/sdk/monitor/azure-monitor-query/tests/conftest.py @@ -7,7 +7,6 @@ from devtools_testutils.sanitizers import add_header_regex_sanitizer - # Environment variable keys ENV_METRICS_RESOURCE_ID = "METRICS_RESOURCE_ID" ENV_SUBSCRIPTION_ID = "MONITOR_SUBSCRIPTION_ID" diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_helpers.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_helpers.py index 5db1166f42e7..36d52794ffee 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_helpers.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_helpers.py @@ -11,7 +11,7 @@ def get_timespan_iso8601_endpoints( - timespan: Optional[Union[timedelta, Tuple[datetime, timedelta], Tuple[datetime, datetime]]] = None + timespan: Optional[Union[timedelta, Tuple[datetime, timedelta], Tuple[datetime, datetime]]] = None, ) -> Tuple[Optional[str], Optional[str]]: if not timespan: diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_models.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_models.py index 0df3bffe42da..7d6d4e7fd191 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_models.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_models.py @@ -10,7 +10,6 @@ from ._utils.serialization import Deserializer - JSON = Mapping[str, Any] diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_operations/_patch.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_patch.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_patch.py index 0d4e7eb92c7c..484c090f15ff 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_patch.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from datetime import timedelta, datetime from json import loads from typing import Any, List, MutableMapping, Sequence, Optional, Union, Tuple, TYPE_CHECKING diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_operations/_patch.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_operations/_patch.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_patch.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_patch.py index d286dd55a22e..02a46b73cec0 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_patch.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from datetime import timedelta, datetime from json import loads from typing import Any, List, MutableMapping, Sequence, Optional, Union, Tuple, TYPE_CHECKING diff --git a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/models/_patch.py b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/models/_patch.py index a401ff0e4189..e36b73ab86b8 100644 --- a/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/models/_patch.py +++ b/sdk/monitor/azure-monitor-querymetrics/azure/monitor/querymetrics/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List from . import _models diff --git a/sdk/monitor/azure-monitor-querymetrics/samples/sample_authentication_async.py b/sdk/monitor/azure-monitor-querymetrics/samples/sample_authentication_async.py index 5ab6f3d8bb95..3be34a8b33fd 100644 --- a/sdk/monitor/azure-monitor-querymetrics/samples/sample_authentication_async.py +++ b/sdk/monitor/azure-monitor-querymetrics/samples/sample_authentication_async.py @@ -10,6 +10,7 @@ This example uses DefaultAzureCredential, which requests a token from Microsoft Entra ID. For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import asyncio diff --git a/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query.py b/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query.py index 3bab98675c6c..009d65aceb5d 100644 --- a/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query.py +++ b/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query.py @@ -24,7 +24,6 @@ from azure.identity import DefaultAzureCredential from azure.monitor.querymetrics import MetricsClient, MetricAggregationType - endpoint = os.environ["AZURE_METRICS_ENDPOINT"] credential = DefaultAzureCredential() diff --git a/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query_async.py b/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query_async.py index 5b1bf227dcc0..f4bfb1fd6be2 100644 --- a/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query_async.py +++ b/sdk/monitor/azure-monitor-querymetrics/samples/sample_metrics_query_async.py @@ -15,6 +15,7 @@ In this example, storage account resources are queried for metrics. """ + import asyncio # [START send_metrics_batch_query_async] diff --git a/sdk/monitor/azure-monitor-querymetrics/setup.py b/sdk/monitor/azure-monitor-querymetrics/setup.py index e163a49b1615..1669cc30e497 100644 --- a/sdk/monitor/azure-monitor-querymetrics/setup.py +++ b/sdk/monitor/azure-monitor-querymetrics/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-monitor-querymetrics" PACKAGE_PPRINT_NAME = "Azure Monitor Query Metrics" PACKAGE_NAMESPACE = "azure.monitor.querymetrics" diff --git a/sdk/monitor/azure-monitor-querymetrics/tests/base_testcase.py b/sdk/monitor/azure-monitor-querymetrics/tests/base_testcase.py index db11fe248185..3cb0700ef138 100644 --- a/sdk/monitor/azure-monitor-querymetrics/tests/base_testcase.py +++ b/sdk/monitor/azure-monitor-querymetrics/tests/base_testcase.py @@ -7,7 +7,6 @@ from devtools_testutils import AzureRecordedTestCase - ENV_MONITOR_ENVIRONMENT = "MONITOR_ENVIRONMENT" ENV_MONITOR_RESOURCE_MANAGER_URL = "MONITOR_RESOURCE_MANAGER_URL" ENV_MONITOR_LOCATION = "MONITOR_LOCATION" diff --git a/sdk/monitor/azure-monitor-querymetrics/tests/conftest.py b/sdk/monitor/azure-monitor-querymetrics/tests/conftest.py index 4ebfc747d9d4..3a7bf06459d8 100644 --- a/sdk/monitor/azure-monitor-querymetrics/tests/conftest.py +++ b/sdk/monitor/azure-monitor-querymetrics/tests/conftest.py @@ -7,7 +7,6 @@ from devtools_testutils.sanitizers import add_header_regex_sanitizer - # Environment variable keys ENV_METRICS_RESOURCE_ID = "METRICS_RESOURCE_ID" ENV_SUBSCRIPTION_ID = "MONITOR_SUBSCRIPTION_ID" diff --git a/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client.py b/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client.py index 54c6ac10908a..5e704ab919ca 100644 --- a/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client.py +++ b/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client.py @@ -10,7 +10,6 @@ from base_testcase import MetricsClientTestCase - METRIC_NAME = "requests/count" METRIC_RESOURCE_PROVIDER = "Microsoft.Insights/components" diff --git a/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client_async.py b/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client_async.py index f398614fbdd6..7f9670b370e5 100644 --- a/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client_async.py +++ b/sdk/monitor/azure-monitor-querymetrics/tests/test_metrics_client_async.py @@ -14,7 +14,6 @@ from base_testcase import MetricsClientTestCase - METRIC_NAME = "requests/count" METRIC_RESOURCE_PROVIDER = "Microsoft.Insights/components" diff --git a/sdk/monitor/azure-monitor/setup.py b/sdk/monitor/azure-monitor/setup.py index 187d160bff46..164cf793917f 100644 --- a/sdk/monitor/azure-monitor/setup.py +++ b/sdk/monitor/azure-monitor/setup.py @@ -1,15 +1,14 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from setuptools import setup import sys - message = """ Starting with v0.4.0, this package cannot be installed anymore, please use [azure-mgmt-monitor](https://pypi.org/project/azure-mgmt-monitor/) instead. @@ -17,27 +16,27 @@ if "sdist" in sys.argv: setup( - name='azure-monitor', - version='0.4.0', - description='Microsoft Azure Monitor library for Python', - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-monitor", + version="0.4.0", + description="Microsoft Azure Monitor library for Python", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 7 - Inactive', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', + "Development Status :: 7 - Inactive", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License", ], zip_safe=False, ) diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/_patch.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/_patch.py +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/_patch.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/_patch.py +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/operations/_patch.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/operations/_patch.py +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/models/_patch.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/models/_patch.py +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/operations/_patch.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/operations/_patch.py +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/azure/mgmt/mysqlflexibleservers/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/tests/test_unit_compatibility.py b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/tests/test_unit_compatibility.py index 5f18e20e6eff..e88ed1e715e0 100644 --- a/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/tests/test_unit_compatibility.py +++ b/sdk/mysqlflexibleservers/azure-mgmt-mysqlflexibleservers/tests/test_unit_compatibility.py @@ -74,9 +74,7 @@ def test_azure_ad_administrators_begin_delete(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.azure_ad_administrators, "_delete_initial", return_value=mock_response - ) + mocker.patch.object(client.azure_ad_administrators, "_delete_initial", return_value=mock_response) poller = client.azure_ad_administrators.begin_delete( resource_group_name="test-rg", @@ -99,9 +97,7 @@ def test_backup_and_export_begin_create(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.backup_and_export, "_create_initial", return_value=mock_response - ) + mocker.patch.object(client.backup_and_export, "_create_initial", return_value=mock_response) poller = client.backup_and_export.begin_create( resource_group_name="test-rg", @@ -124,9 +120,7 @@ def test_configurations_begin_batch_update(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.configurations, "_batch_update_initial", return_value=mock_response - ) + mocker.patch.object(client.configurations, "_batch_update_initial", return_value=mock_response) poller = client.configurations.begin_batch_update( resource_group_name="test-rg", @@ -134,9 +128,7 @@ def test_configurations_begin_batch_update(mocker): parameters={}, ) - assert poller._polling_method._lro_options == { - "final-state-via": "azure-async-operation" - } + assert poller._polling_method._lro_options == {"final-state-via": "azure-async-operation"} def test_long_running_backup_begin_create(mocker): @@ -151,9 +143,7 @@ def test_long_running_backup_begin_create(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.long_running_backup, "_create_initial", return_value=mock_response - ) + mocker.patch.object(client.long_running_backup, "_create_initial", return_value=mock_response) poller = client.long_running_backup.begin_create( resource_group_name="test-rg", @@ -162,9 +152,7 @@ def test_long_running_backup_begin_create(mocker): parameters={}, ) - assert poller._polling_method._lro_options == { - "final-state-via": "azure-async-operation" - } + assert poller._polling_method._lro_options == {"final-state-via": "azure-async-operation"} def test_servers_migration_begin_cutover_migration(mocker): @@ -191,9 +179,7 @@ def test_servers_migration_begin_cutover_migration(mocker): parameters={}, ) - assert poller._polling_method._lro_options == { - "final-state-via": "azure-async-operation" - } + assert poller._polling_method._lro_options == {"final-state-via": "azure-async-operation"} def test_servers_begin_delete(mocker): @@ -215,9 +201,7 @@ def test_servers_begin_delete(mocker): server_name="test-server", ) - assert poller._polling_method._lro_options == { - "final-state-via": "azure-async-operation" - } + assert poller._polling_method._lro_options == {"final-state-via": "azure-async-operation"} def test_servers_begin_detach_v_net(mocker): @@ -232,9 +216,7 @@ def test_servers_begin_detach_v_net(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.servers, "_detach_v_net_initial", return_value=mock_response - ) + mocker.patch.object(client.servers, "_detach_v_net_initial", return_value=mock_response) poller = client.servers.begin_detach_v_net( resource_group_name="test-rg", @@ -242,9 +224,7 @@ def test_servers_begin_detach_v_net(mocker): parameters={}, ) - assert poller._polling_method._lro_options == { - "final-state-via": "azure-async-operation" - } + assert poller._polling_method._lro_options == {"final-state-via": "azure-async-operation"} def test_servers_begin_reset_gtid(mocker): @@ -259,9 +239,7 @@ def test_servers_begin_reset_gtid(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.servers, "_reset_gtid_initial", return_value=mock_response - ) + mocker.patch.object(client.servers, "_reset_gtid_initial", return_value=mock_response) poller = client.servers.begin_reset_gtid( resource_group_name="test-rg", @@ -269,9 +247,7 @@ def test_servers_begin_reset_gtid(mocker): parameters={}, ) - assert poller._polling_method._lro_options == { - "final-state-via": "azure-async-operation" - } + assert poller._polling_method._lro_options == {"final-state-via": "azure-async-operation"} def test_azure_ad_administrators_begin_create_or_update(mocker): @@ -314,9 +290,7 @@ def test_configurations_begin_create_or_update(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.configurations, "_create_or_update_initial", return_value=mock_response - ) + mocker.patch.object(client.configurations, "_create_or_update_initial", return_value=mock_response) poller = client.configurations.begin_create_or_update( resource_group_name="test-rg", @@ -340,9 +314,7 @@ def test_configurations_begin_update(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.configurations, "_update_initial", return_value=mock_response - ) + mocker.patch.object(client.configurations, "_update_initial", return_value=mock_response) poller = client.configurations.begin_update( resource_group_name="test-rg", @@ -366,9 +338,7 @@ def test_databases_begin_create_or_update(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.databases, "_create_or_update_initial", return_value=mock_response - ) + mocker.patch.object(client.databases, "_create_or_update_initial", return_value=mock_response) poller = client.databases.begin_create_or_update( resource_group_name="test-rg", @@ -415,9 +385,7 @@ def test_firewall_rules_begin_create_or_update(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.firewall_rules, "_create_or_update_initial", return_value=mock_response - ) + mocker.patch.object(client.firewall_rules, "_create_or_update_initial", return_value=mock_response) poller = client.firewall_rules.begin_create_or_update( resource_group_name="test-rg", @@ -441,9 +409,7 @@ def test_firewall_rules_begin_delete(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.firewall_rules, "_delete_initial", return_value=mock_response - ) + mocker.patch.object(client.firewall_rules, "_delete_initial", return_value=mock_response) poller = client.firewall_rules.begin_delete( resource_group_name="test-rg", @@ -466,9 +432,7 @@ def test_maintenances_begin_update(mocker): mock_response.http_response.status_code = 200 mock_response.http_response.headers = {} - mocker.patch.object( - client.maintenances, "_update_initial", return_value=mock_response - ) + mocker.patch.object(client.maintenances, "_update_initial", return_value=mock_response) poller = client.maintenances.begin_update( resource_group_name="test-rg", diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_patch.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_patch.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_patch.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_patch.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_patch.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_patch.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_patch.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_patch.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_patch.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_patch.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py index 090dc2220bcc..0400f381e819 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_patch.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_patch.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_patch.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_patch.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_patch.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_patch.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_patch.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_patch.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_patch.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_patch.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/_patch.py b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/_patch.py +++ b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/_patch.py b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/_patch.py +++ b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/operations/_patch.py b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/operations/_patch.py +++ b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/models/_patch.py b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/models/_patch.py +++ b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/operations/_patch.py b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/network/azure-mgmt-dns/azure/mgmt/dns/operations/_patch.py +++ b/sdk/network/azure-mgmt-dns/azure/mgmt/dns/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-dns/setup.py b/sdk/network/azure-mgmt-dns/setup.py index 63989f123e98..3ddb43d5e48e 100644 --- a/sdk/network/azure-mgmt-dns/setup.py +++ b/sdk/network/azure-mgmt-dns/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_patch.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_patch.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/_patch.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/_patch.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/operations/_patch.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/operations/_patch.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/_patch.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/_patch.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/_patch.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/_patch.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-frontdoor/setup.py b/sdk/network/azure-mgmt-frontdoor/setup.py index aed570f34b33..ab6c71e30756 100644 --- a/sdk/network/azure-mgmt-frontdoor/setup.py +++ b/sdk/network/azure-mgmt-frontdoor/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_patch.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_patch.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_patch.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_patch.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_patch.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_patch.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_patch.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_patch.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_patch.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_patch.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses_test.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses_test.py index b2a70284870c..02dbd6744b62 100644 --- a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses_test.py +++ b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_ip_addresses_test.py @@ -25,7 +25,6 @@ from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy import pytest - AZURE_LOCATION = "eastus" diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_patch.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_patch.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/_patch.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/_patch.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/operations/_patch.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/operations/_patch.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_patch.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_patch.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_patch.py b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_patch.py +++ b/sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/network/azure-mgmt-privatedns/setup.py b/sdk/network/azure-mgmt-privatedns/setup.py index 974aeb2e1b47..85a1628033d6 100644 --- a/sdk/network/azure-mgmt-privatedns/setup.py +++ b/sdk/network/azure-mgmt-privatedns/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_async_test.py b/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_async_test.py index d28a43dd4285..81cf000b184e 100644 --- a/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_async_test.py +++ b/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_async_test.py @@ -27,4 +27,3 @@ async def test_list_by_resource_group(self, resource_group): ) result = [r async for r in response] assert result == [] - diff --git a/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_test.py b/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_test.py index 2a9a09e66ed1..2e23d1c75f3b 100644 --- a/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_test.py +++ b/sdk/network/azure-mgmt-privatedns/tests/test_private_dns_management_private_zones_operations_test.py @@ -26,4 +26,3 @@ def test_list_by_resource_group(self, resource_group): ) result = [r for r in response] assert result == [] - diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/_patch.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/_patch.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/_patch.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/_patch.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/operations/_patch.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/operations/_patch.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/models/_patch.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/models/_patch.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/operations/_patch.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/operations/_patch.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/azure/mgmt/networkanalytics/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/setup.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/setup.py index 7a26fec2bd3a..6d1bb041f04e 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/setup.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/conftest.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/conftest.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/test_cli_mgmt_networkanalytics.py b/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/test_cli_mgmt_networkanalytics.py index 9e00ab21b112..2dabb8a26800 100644 --- a/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/test_cli_mgmt_networkanalytics.py +++ b/sdk/networkanalytics/azure-mgmt-networkanalytics/tests/test_cli_mgmt_networkanalytics.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import pytest @@ -12,15 +12,14 @@ import azure.mgmt.networkanalytics from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtNetworkanalytics(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.networkanalytics.NetworkAnalyticsMgmtClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.networkanalytics.NetworkAnalyticsMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_networkanalytics(self, resource_group): @@ -29,6 +28,7 @@ def test_networkanalytics(self, resource_group): assert list(self.mgmt_client.operations.list()) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/_patch.py b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/_patch.py +++ b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/_patch.py b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/_patch.py +++ b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/operations/_patch.py b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/operations/_patch.py +++ b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/models/_patch.py b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/models/_patch.py +++ b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/operations/_patch.py b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/operations/_patch.py +++ b/sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/_patch.py b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/_patch.py +++ b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/_patch.py b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/_patch.py +++ b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/operations/_patch.py b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/operations/_patch.py +++ b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/models/_patch.py b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/models/_patch.py +++ b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/operations/_patch.py b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/operations/_patch.py +++ b/sdk/networkfunction/azure-mgmt-networkfunction/azure/mgmt/networkfunction/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/networkfunction/azure-mgmt-networkfunction/setup.py b/sdk/networkfunction/azure-mgmt-networkfunction/setup.py index d5f048090884..be46e55e8ae7 100644 --- a/sdk/networkfunction/azure-mgmt-networkfunction/setup.py +++ b/sdk/networkfunction/azure-mgmt-networkfunction/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Networkfunction Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/_patch.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/_patch.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/_patch.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/_patch.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/operations/_patch.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/operations/_patch.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/models/_patch.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/models/_patch.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/operations/_patch.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/operations/_patch.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/azure/mgmt/newrelicobservability/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_cli_mgmt_newrelicobservability_test.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_cli_mgmt_newrelicobservability_test.py index 58d958ab3709..ff1c96f1b088 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_cli_mgmt_newrelicobservability_test.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_cli_mgmt_newrelicobservability_test.py @@ -1,16 +1,17 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.newrelicobservability import NewRelicObservabilityMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy import pytest -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestMgmtNewRelicObservability(AzureMgmtRecordedTestCase): diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_async_test.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_async_test.py index c6f2efed1eff..19f31cdcd51c 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_async_test.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_async_test.py @@ -22,19 +22,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_monitors_list_by_subscription(self, resource_group): - response = self.client.monitors.list_by_subscription( - - ) + response = self.client.monitors.list_by_subscription() result = [r async for r in response] assert response - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_monitors_list_by_resource_group(self, resource_group): response = self.client.monitors.list_by_resource_group( resource_group_name=resource_group.name, - ) result = [r async for r in response] assert result == [] diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_test.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_test.py index 7c959ab4c37c..9643896fa65a 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_test.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_monitors_operations_test.py @@ -21,19 +21,15 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_monitors_list_by_subscription(self, resource_group): - response = self.client.monitors.list_by_subscription( - - ) + response = self.client.monitors.list_by_subscription() result = [r for r in response] assert response - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_monitors_list_by_resource_group(self, resource_group): response = self.client.monitors.list_by_resource_group( resource_group_name=resource_group.name, - ) result = [r for r in response] assert result == [] diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_async_test.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_async_test.py index 88c348563723..446b6499211d 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_async_test.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_async_test.py @@ -22,9 +22,6 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - - ) + response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_test.py b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_test.py index 780b0bec1f30..d6f96c3c3208 100644 --- a/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_test.py +++ b/sdk/newrelicobservability/azure-mgmt-newrelicobservability/tests/test_new_relic_observability_mgmt_operations_test.py @@ -21,9 +21,6 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - - ) + response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_patch.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_patch.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_patch.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_patch.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_patch.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_patch.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_patch.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_patch.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_patch.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_patch.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_patch.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_patch.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_patch.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_patch.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_patch.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_patch.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_patch.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_patch.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_patch.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_patch.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py index e40ff58d7a90..1d1b37d1d341 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/conftest.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/conftest.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/disable_test_mgmt_notificationhubs.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/disable_test_mgmt_notificationhubs.py index 094eeeb2a978..5fbafa54a302 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/disable_test_mgmt_notificationhubs.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/disable_test_mgmt_notificationhubs.py @@ -1,19 +1,19 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import time import unittest import azure.mgmt.notificationhubs from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy - AZURE_LOCATION = "eastus" + class TestMgmtNotificationHubs(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -29,45 +29,21 @@ def test_notification_hubs(self, resource_group): notification_hub_name = "notificationhubxxzx" self.notificationhubs_client.namespaces.create_or_update( - GROUP_NAME, - namespace_name, - { - "location": AZURE_LOCATION - } + GROUP_NAME, namespace_name, {"location": AZURE_LOCATION} ) - - namespace = self.notificationhubs_client.namespaces.get( - GROUP_NAME, - namespace_name - ) + namespace = self.notificationhubs_client.namespaces.get(GROUP_NAME, namespace_name) while namespace.status == "Created": time.sleep(30) - namespace = self.notificationhubs_client.namespaces.get( - GROUP_NAME, - namespace_name - ) - + namespace = self.notificationhubs_client.namespaces.get(GROUP_NAME, namespace_name) + self.notificationhubs_client.notification_hubs.create_or_update( - GROUP_NAME, - namespace_name, - notification_hub_name, - { - "location": AZURE_LOCATION - } + GROUP_NAME, namespace_name, notification_hub_name, {"location": AZURE_LOCATION} ) - self.notificationhubs_client.notification_hubs.get( - GROUP_NAME, - namespace_name, - notification_hub_name - ) + self.notificationhubs_client.notification_hubs.get(GROUP_NAME, namespace_name, notification_hub_name) - self.notificationhubs_client.notification_hubs.delete( - GROUP_NAME, - namespace_name, - notification_hub_name - ) + self.notificationhubs_client.notification_hubs.delete(GROUP_NAME, namespace_name, notification_hub_name) @ResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy @@ -76,39 +52,19 @@ def test_namespaces(self, resource_group): namespace_name = "namespacexxx" self.notificationhubs_client.namespaces.create_or_update( - GROUP_NAME, - namespace_name, - { - "location": AZURE_LOCATION - } + GROUP_NAME, namespace_name, {"location": AZURE_LOCATION} ) - - namespace = self.notificationhubs_client.namespaces.get( - GROUP_NAME, - namespace_name - ) + namespace = self.notificationhubs_client.namespaces.get(GROUP_NAME, namespace_name) while namespace.status == "Created": time.sleep(30) - namespace = self.notificationhubs_client.namespaces.get( - GROUP_NAME, - namespace_name - ) - - self.notificationhubs_client.namespaces.patch( - GROUP_NAME, - namespace_name, - { - "enabled": True - } - ) + namespace = self.notificationhubs_client.namespaces.get(GROUP_NAME, namespace_name) + + self.notificationhubs_client.namespaces.patch(GROUP_NAME, namespace_name, {"enabled": True}) - self.notificationhubs_client.namespaces.begin_delete( - GROUP_NAME, - namespace_name - ).result() + self.notificationhubs_client.namespaces.begin_delete(GROUP_NAME, namespace_name).result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/test_cli_mgmt_notificationhubs.py b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/test_cli_mgmt_notificationhubs.py index c4f190af1c0c..9f5e7f9a0c50 100644 --- a/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/test_cli_mgmt_notificationhubs.py +++ b/sdk/notificationhubs/azure-mgmt-notificationhubs/tests/test_cli_mgmt_notificationhubs.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.notificationhubs import NotificationHubsManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtNotificationHubs(AzureMgmtRecordedTestCase): @@ -23,4 +24,4 @@ def test_list_by_resource_group(self, resource_group): @recorded_by_proxy def test_list_operations(self): - assert list(self.client.operations.list()) \ No newline at end of file + assert list(self.client.operations.list()) diff --git a/sdk/nspkg/azure-agrifood-nspkg/azure/__init__.py b/sdk/nspkg/azure-agrifood-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-agrifood-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-agrifood-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-agrifood-nspkg/setup.py b/sdk/nspkg/azure-agrifood-nspkg/setup.py index d68d2f642cc0..9afa323ede16 100644 --- a/sdk/nspkg/azure-agrifood-nspkg/setup.py +++ b/sdk/nspkg/azure-agrifood-nspkg/setup.py @@ -9,32 +9,32 @@ from setuptools import setup setup( - name='azure-agrifood-nspkg', - version='1.0.0', - description='Microsoft Azure AgriFood Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azurepysdk@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/', + name="azure-agrifood-nspkg", + version="1.0.0", + description="Microsoft Azure AgriFood Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azurepysdk@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.agrifood', + "azure.agrifood", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] + "azure-nspkg>=2.0.0", + ], ) diff --git a/sdk/nspkg/azure-ai-language-nspkg/azure/__init__.py b/sdk/nspkg/azure-ai-language-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-language-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-ai-language-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-language-nspkg/azure/ai/__init__.py b/sdk/nspkg/azure-ai-language-nspkg/azure/ai/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-language-nspkg/azure/ai/__init__.py +++ b/sdk/nspkg/azure-ai-language-nspkg/azure/ai/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-language-nspkg/azure/ai/language/__init__.py b/sdk/nspkg/azure-ai-language-nspkg/azure/ai/language/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-language-nspkg/azure/ai/language/__init__.py +++ b/sdk/nspkg/azure-ai-language-nspkg/azure/ai/language/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-language-nspkg/setup.py b/sdk/nspkg/azure-ai-language-nspkg/setup.py index bfa36bb72e25..eafcd64f5aef 100644 --- a/sdk/nspkg/azure-ai-language-nspkg/setup.py +++ b/sdk/nspkg/azure-ai-language-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,31 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.ai.language'] + PACKAGES = ["azure.ai.language"] setup( - name='azure-ai-language-nspkg', - version='1.1.0b1', - description='Microsoft Azure ai-language Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-ai-language-nspkg", + version="1.1.0b1", + description="Microsoft Azure ai-language Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, - install_requires=[ - 'azure-ai-nspkg>=1.0.0' - ] + install_requires=["azure-ai-nspkg>=1.0.0"], ) diff --git a/sdk/nspkg/azure-ai-nspkg/azure/__init__.py b/sdk/nspkg/azure-ai-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-ai-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-nspkg/azure/ai/__init__.py b/sdk/nspkg/azure-ai-nspkg/azure/ai/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-nspkg/azure/ai/__init__.py +++ b/sdk/nspkg/azure-ai-nspkg/azure/ai/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-nspkg/setup.py b/sdk/nspkg/azure-ai-nspkg/setup.py index ca48076b5b69..a129f511d4ab 100644 --- a/sdk/nspkg/azure-ai-nspkg/setup.py +++ b/sdk/nspkg/azure-ai-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,33 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.ai'] + PACKAGES = ["azure.ai"] setup( - name='azure-ai-nspkg', - version='1.1.0b1', - description='Microsoft Azure ai Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-ai-nspkg", + version="1.1.0b1", + description="Microsoft Azure ai Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-ai-translation-nspkg/azure/__init__.py b/sdk/nspkg/azure-ai-translation-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-translation-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-ai-translation-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/__init__.py b/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/__init__.py +++ b/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/translation/__init__.py b/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/translation/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/translation/__init__.py +++ b/sdk/nspkg/azure-ai-translation-nspkg/azure/ai/translation/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-ai-translation-nspkg/setup.py b/sdk/nspkg/azure-ai-translation-nspkg/setup.py index 83b392ff0bb4..9fbbe2720831 100644 --- a/sdk/nspkg/azure-ai-translation-nspkg/setup.py +++ b/sdk/nspkg/azure-ai-translation-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,31 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.ai.translation'] + PACKAGES = ["azure.ai.translation"] setup( - name='azure-ai-translation-nspkg', - version='1.1.0b1', - description='Microsoft Azure ai-translation Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-ai-translation-nspkg", + version="1.1.0b1", + description="Microsoft Azure ai-translation Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, - install_requires=[ - 'azure-ai-nspkg>=1.0.0' - ] + install_requires=["azure-ai-nspkg>=1.0.0"], ) diff --git a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/__init__.py b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/__init__.py b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/knowledge/__init__.py b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/knowledge/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/knowledge/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/azure/cognitiveservices/knowledge/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/setup.py b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/setup.py index 574d56bb71cf..3970655347ad 100644 --- a/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/setup.py +++ b/sdk/nspkg/azure-cognitiveservices-knowledge-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,33 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.cognitiveservices.knowledge'] + PACKAGES = ["azure.cognitiveservices.knowledge"] setup( - name='azure-cognitiveservices-knowledge-nspkg', - version='3.0.0', - description='Microsoft Azure Cognitive Services Knowledge Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-cognitiveservices-knowledge-nspkg", + version="3.0.0", + description="Microsoft Azure Cognitive Services Knowledge Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-cognitiveservices-nspkg>=3.0.0', - ] + "azure-cognitiveservices-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/__init__.py b/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py b/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py b/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-language-nspkg/setup.py b/sdk/nspkg/azure-cognitiveservices-language-nspkg/setup.py index b073be9dfcf3..a6f72206f45c 100644 --- a/sdk/nspkg/azure-cognitiveservices-language-nspkg/setup.py +++ b/sdk/nspkg/azure-cognitiveservices-language-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,33 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.cognitiveservices.language'] + PACKAGES = ["azure.cognitiveservices.language"] setup( - name='azure-cognitiveservices-language-nspkg', - version='3.1.0b1', - description='Microsoft Azure Cognitive Services Language Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-cognitiveservices-language-nspkg", + version="3.1.0b1", + description="Microsoft Azure Cognitive Services Language Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-cognitiveservices-nspkg>=3.0.0', - ] + "azure-cognitiveservices-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-cognitiveservices-nspkg/azure/__init__.py b/sdk/nspkg/azure-cognitiveservices-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py b/sdk/nspkg/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-nspkg/setup.py b/sdk/nspkg/azure-cognitiveservices-nspkg/setup.py index d875dfe9b0c2..536b48f48a67 100644 --- a/sdk/nspkg/azure-cognitiveservices-nspkg/setup.py +++ b/sdk/nspkg/azure-cognitiveservices-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,33 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.cognitiveservices'] + PACKAGES = ["azure.cognitiveservices"] setup( - name='azure-cognitiveservices-nspkg', - version='3.1.0b1', - description='Microsoft Azure Cognitive Services Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-cognitiveservices-nspkg", + version="3.1.0b1", + description="Microsoft Azure Cognitive Services Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/__init__.py b/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py b/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py b/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-search-nspkg/setup.py b/sdk/nspkg/azure-cognitiveservices-search-nspkg/setup.py index 867938b340b4..bed323a04d6b 100644 --- a/sdk/nspkg/azure-cognitiveservices-search-nspkg/setup.py +++ b/sdk/nspkg/azure-cognitiveservices-search-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,33 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.cognitiveservices.search'] + PACKAGES = ["azure.cognitiveservices.search"] setup( - name='azure-cognitiveservices-search-nspkg', - version='3.0.1', - description='Microsoft Azure Cognitive Services Search Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-cognitiveservices-search-nspkg", + version="3.0.1", + description="Microsoft Azure Cognitive Services Search Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-cognitiveservices-nspkg>=3.0.0', - ] + "azure-cognitiveservices-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/__init__.py b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py +++ b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/setup.py b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/setup.py index a883512f25a7..a53ac0878721 100644 --- a/sdk/nspkg/azure-cognitiveservices-vision-nspkg/setup.py +++ b/sdk/nspkg/azure-cognitiveservices-vision-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,33 +28,33 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.cognitiveservices.vision'] + PACKAGES = ["azure.cognitiveservices.vision"] setup( - name='azure-cognitiveservices-vision-nspkg', - version='3.0.1', - description='Microsoft Azure Cognitive Services Vision Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-cognitiveservices-vision-nspkg", + version="3.0.1", + description="Microsoft Azure Cognitive Services Vision Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-cognitiveservices-nspkg>=3.0.0', - ] + "azure-cognitiveservices-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-communication-nspkg/azure/__init__.py b/sdk/nspkg/azure-communication-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-communication-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-communication-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-communication-nspkg/setup.py b/sdk/nspkg/azure-communication-nspkg/setup.py index 7465d569a319..0b5fef7e4b13 100644 --- a/sdk/nspkg/azure-communication-nspkg/setup.py +++ b/sdk/nspkg/azure-communication-nspkg/setup.py @@ -9,32 +9,31 @@ from setuptools import setup setup( - name='azure-communication-nspkg', - version='0.0.0b1', - description='Microsoft Azure Communication Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azurepysdk@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/', + name="azure-communication-nspkg", + version="0.0.0b1", + description="Microsoft Azure Communication Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azurepysdk@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 3 - Alpha', - - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', + "Development Status :: 3 - Alpha", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.communication', + "azure.communication", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] -) \ No newline at end of file + "azure-nspkg>=2.0.0", + ], +) diff --git a/sdk/nspkg/azure-data-nspkg/azure/__init__.py b/sdk/nspkg/azure-data-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-data-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-data-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-data-nspkg/azure/data/__init__.py b/sdk/nspkg/azure-data-nspkg/azure/data/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-data-nspkg/azure/data/__init__.py +++ b/sdk/nspkg/azure-data-nspkg/azure/data/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-data-nspkg/setup.py b/sdk/nspkg/azure-data-nspkg/setup.py index db1dd5e5d85a..5986f1388e36 100644 --- a/sdk/nspkg/azure-data-nspkg/setup.py +++ b/sdk/nspkg/azure-data-nspkg/setup.py @@ -9,12 +9,12 @@ from setuptools import setup setup( - name='azure-data-nspkg', - version='1.0.0', + name="azure-data-nspkg", + version="1.0.0", description="Microsoft Azure Data Namespace Package [Internal]", long_description=open("README.md", "r").read(), long_description_content_type="text/markdown", - license='MIT License', + license="MIT License", author="Microsoft Corporation", author_email="azpysdkhelp@microsoft.com", url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables", @@ -32,8 +32,8 @@ "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=['azure.data'], + packages=["azure.data"], install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-digitaltwins-nspkg/setup.py b/sdk/nspkg/azure-digitaltwins-nspkg/setup.py index 49c2a8847e59..c234dde4ec5f 100644 --- a/sdk/nspkg/azure-digitaltwins-nspkg/setup.py +++ b/sdk/nspkg/azure-digitaltwins-nspkg/setup.py @@ -9,33 +9,33 @@ from setuptools import setup setup( - name='azure-digitaltwins-nspkg', - version='1.1.0b1', - description='Microsoft Azure DigitalTwins Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azurepysdk@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/', + name="azure-digitaltwins-nspkg", + version="1.1.0b1", + description="Microsoft Azure DigitalTwins Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azurepysdk@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.digitaltwins', + "azure.digitaltwins", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] + "azure-nspkg>=2.0.0", + ], ) diff --git a/sdk/nspkg/azure-iot-nspkg/azure/__init__.py b/sdk/nspkg/azure-iot-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-iot-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-iot-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-iot-nspkg/setup.py b/sdk/nspkg/azure-iot-nspkg/setup.py index 8b5dab61e3e6..a44bc510b0f9 100644 --- a/sdk/nspkg/azure-iot-nspkg/setup.py +++ b/sdk/nspkg/azure-iot-nspkg/setup.py @@ -9,33 +9,33 @@ from setuptools import setup setup( - name='azure-iot-nspkg', - version='2.0.0', - description='Microsoft Azure IoT Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azurepysdk@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/', + name="azure-iot-nspkg", + version="2.0.0", + description="Microsoft Azure IoT Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azurepysdk@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.iot', + "azure.iot", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] + "azure-nspkg>=2.0.0", + ], ) diff --git a/sdk/nspkg/azure-media-nspkg/azure/__init__.py b/sdk/nspkg/azure-media-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-media-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-media-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-media-nspkg/azure/media/__init__.py b/sdk/nspkg/azure-media-nspkg/azure/media/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-media-nspkg/azure/media/__init__.py +++ b/sdk/nspkg/azure-media-nspkg/azure/media/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-media-nspkg/setup.py b/sdk/nspkg/azure-media-nspkg/setup.py index c1df17a7a732..13ba49ffd12e 100644 --- a/sdk/nspkg/azure-media-nspkg/setup.py +++ b/sdk/nspkg/azure-media-nspkg/setup.py @@ -1,40 +1,38 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from setuptools import setup setup( - name='azure-media-nspkg', - version='1.0.0', - description='Microsoft Azure Media Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-media-nspkg", + version="1.0.0", + description="Microsoft Azure Media Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=[ - 'azure.media' - ], + packages=["azure.media"], install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-messaging-nspkg/azure/__init__.py b/sdk/nspkg/azure-messaging-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-messaging-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-messaging-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-messaging-nspkg/azure/messaging/__init__.py b/sdk/nspkg/azure-messaging-nspkg/azure/messaging/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-messaging-nspkg/azure/messaging/__init__.py +++ b/sdk/nspkg/azure-messaging-nspkg/azure/messaging/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-messaging-nspkg/setup.py b/sdk/nspkg/azure-messaging-nspkg/setup.py index 82463254f12e..6302c17cc869 100644 --- a/sdk/nspkg/azure-messaging-nspkg/setup.py +++ b/sdk/nspkg/azure-messaging-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,34 +28,34 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.messaging'] + PACKAGES = ["azure.messaging"] setup( - name='azure-messaging-nspkg', - version='1.0.0', - description='Microsoft Messaging Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-messaging-nspkg", + version="1.0.0", + description="Microsoft Messaging Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/__init__.py b/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/__init__.py b/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/__init__.py +++ b/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py b/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py +++ b/sdk/nspkg/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-mgmt-datalake-nspkg/setup.py b/sdk/nspkg/azure-mgmt-datalake-nspkg/setup.py index 3d3237cc00af..c279561ea643 100644 --- a/sdk/nspkg/azure-mgmt-datalake-nspkg/setup.py +++ b/sdk/nspkg/azure-mgmt-datalake-nspkg/setup.py @@ -1,44 +1,43 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup - PACKAGES = [] # Do an empty package on Python 3 and not python_requires, since not everybody is ready # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.mgmt.datalake'] + PACKAGES = ["azure.mgmt.datalake"] setup( - name='azure-mgmt-datalake-nspkg', - version='3.0.1', - description='Microsoft Azure Data Lake Management Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-mgmt-datalake-nspkg", + version="3.0.1", + description="Microsoft Azure Data Lake Management Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-mgmt-nspkg>=3.0.0', + "azure-mgmt-nspkg>=3.0.0", ], ) diff --git a/sdk/nspkg/azure-mgmt-nspkg/azure/__init__.py b/sdk/nspkg/azure-mgmt-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-mgmt-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-mgmt-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-mgmt-nspkg/azure/mgmt/__init__.py b/sdk/nspkg/azure-mgmt-nspkg/azure/mgmt/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-mgmt-nspkg/azure/mgmt/__init__.py +++ b/sdk/nspkg/azure-mgmt-nspkg/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-mgmt-nspkg/setup.py b/sdk/nspkg/azure-mgmt-nspkg/setup.py index 07b51d55a968..f39f92dc77b0 100644 --- a/sdk/nspkg/azure-mgmt-nspkg/setup.py +++ b/sdk/nspkg/azure-mgmt-nspkg/setup.py @@ -1,46 +1,45 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup - PACKAGES = [] # Do an empty package on Python 3 and not python_requires, since not everybody is ready # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.mgmt'] + PACKAGES = ["azure.mgmt"] setup( - name='azure-mgmt-nspkg', - version='3.0.2', - description='Microsoft Azure Resource Management Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-mgmt-nspkg", + version="3.0.2", + description="Microsoft Azure Resource Management Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=PACKAGES, install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-nspkg/azure/__init__.py b/sdk/nspkg/azure-nspkg/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-nspkg/setup.py b/sdk/nspkg/azure-nspkg/setup.py index ebff36db1b51..1844f012d6cc 100644 --- a/sdk/nspkg/azure-nspkg/setup.py +++ b/sdk/nspkg/azure-nspkg/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import sys from setuptools import setup @@ -12,11 +12,11 @@ # azure v0.x used to have a __version__ attribute (newer versions don't) try: import azure + try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -28,30 +28,30 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure'] + PACKAGES = ["azure"] setup( - name='azure-nspkg', - version='3.0.2', - description='Microsoft Azure Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-nspkg", + version="3.0.2", + description="Microsoft Azure Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=PACKAGES + packages=PACKAGES, ) diff --git a/sdk/nspkg/azure-purview-nspkg/azure/__init__.py b/sdk/nspkg/azure-purview-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-purview-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-purview-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-purview-nspkg/setup.py b/sdk/nspkg/azure-purview-nspkg/setup.py index fecdfeb67e43..680166b222cf 100644 --- a/sdk/nspkg/azure-purview-nspkg/setup.py +++ b/sdk/nspkg/azure-purview-nspkg/setup.py @@ -9,32 +9,32 @@ from setuptools import setup setup( - name='azure-purview-nspkg', - version='2.0.0', - description='Microsoft Azure Purview Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azurepysdk@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/', + name="azure-purview-nspkg", + version="2.0.0", + description="Microsoft Azure Purview Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azurepysdk@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.purview', + "azure.purview", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] + "azure-nspkg>=2.0.0", + ], ) diff --git a/sdk/nspkg/azure-search-nspkg/setup.py b/sdk/nspkg/azure-search-nspkg/setup.py index 2d6538ed6161..61e8625a42a9 100644 --- a/sdk/nspkg/azure-search-nspkg/setup.py +++ b/sdk/nspkg/azure-search-nspkg/setup.py @@ -12,7 +12,7 @@ # https://github.com/Azure/azure-sdk-for-python/issues/3447 # https://github.com/Azure/azure-sdk-for-python/issues/3481 if sys.version_info[0] < 3: - PACKAGES = ['azure.search'] + PACKAGES = ["azure.search"] setup( name="azure-search-nspkg", diff --git a/sdk/nspkg/azure-security-nspkg/azure/__init__.py b/sdk/nspkg/azure-security-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-security-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-security-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-security-nspkg/azure/security/__init__.py b/sdk/nspkg/azure-security-nspkg/azure/security/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-security-nspkg/azure/security/__init__.py +++ b/sdk/nspkg/azure-security-nspkg/azure/security/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-security-nspkg/setup.py b/sdk/nspkg/azure-security-nspkg/setup.py index 2b7427573a19..33b62d975b03 100644 --- a/sdk/nspkg/azure-security-nspkg/setup.py +++ b/sdk/nspkg/azure-security-nspkg/setup.py @@ -1,40 +1,38 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from setuptools import setup setup( - name='azure-security-nspkg', - version='1.1.0b1', - description='Microsoft Azure Security Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-security-nspkg", + version="1.1.0b1", + description="Microsoft Azure Security Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=[ - 'azure.security' - ], + packages=["azure.security"], install_requires=[ - 'azure-nspkg>=3.0.0', - ] + "azure-nspkg>=3.0.0", + ], ) diff --git a/sdk/nspkg/azure-storage-nspkg/azure/__init__.py b/sdk/nspkg/azure-storage-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-storage-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-storage-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-storage-nspkg/azure/storage/__init__.py b/sdk/nspkg/azure-storage-nspkg/azure/storage/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-storage-nspkg/azure/storage/__init__.py +++ b/sdk/nspkg/azure-storage-nspkg/azure/storage/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-storage-nspkg/setup.py b/sdk/nspkg/azure-storage-nspkg/setup.py index 175cea4a9732..94b688b36f50 100644 --- a/sdk/nspkg/azure-storage-nspkg/setup.py +++ b/sdk/nspkg/azure-storage-nspkg/setup.py @@ -16,8 +16,7 @@ try: ver = azure.__version__ raise Exception( - 'This package is incompatible with azure=={}. '.format(ver) + - 'Uninstall it with "pip uninstall azure".' + "This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".' ) except AttributeError: pass @@ -25,33 +24,33 @@ pass setup( - name='azure-storage-nspkg', - version='3.1.0', - description='Microsoft Azure Storage Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='ascl@microsoft.com', - url='https://github.com/Azure/azure-storage-python', + name="azure-storage-nspkg", + version="3.1.0", + description="Microsoft Azure Storage Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="ascl@microsoft.com", + url="https://github.com/Azure/azure-storage-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.storage', + "azure.storage", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] + "azure-nspkg>=2.0.0", + ], ) diff --git a/sdk/nspkg/azure-synapse-nspkg/azure/__init__.py b/sdk/nspkg/azure-synapse-nspkg/azure/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/nspkg/azure-synapse-nspkg/azure/__init__.py +++ b/sdk/nspkg/azure-synapse-nspkg/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/nspkg/azure-synapse-nspkg/setup.py b/sdk/nspkg/azure-synapse-nspkg/setup.py index ab59a7f4f195..88d265505522 100644 --- a/sdk/nspkg/azure-synapse-nspkg/setup.py +++ b/sdk/nspkg/azure-synapse-nspkg/setup.py @@ -9,33 +9,33 @@ from setuptools import setup setup( - name='azure-synapse-nspkg', - version='1.0.0', - description='Microsoft Azure Synapse Namespace Package [Internal]', - long_description=open('README.md', 'r').read(), - license='MIT License', - author='Microsoft Corporation', - author_email='azurepysdk@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/', + name="azure-synapse-nspkg", + version="1.0.0", + description="Microsoft Azure Synapse Namespace Package [Internal]", + long_description=open("README.md", "r").read(), + license="MIT License", + author="Microsoft Corporation", + author_email="azurepysdk@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=[ - 'azure.synapse', + "azure.synapse", ], install_requires=[ - 'azure-nspkg>=2.0.0', - ] + "azure-nspkg>=2.0.0", + ], ) diff --git a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/_patch.py b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/_patch.py +++ b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/_patch.py b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/_patch.py +++ b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_patch.py b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_patch.py +++ b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/models/_patch.py b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/models/_patch.py +++ b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/operations/_patch.py b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/operations/_patch.py +++ b/sdk/oep/azure-mgmt-oep/azure/mgmt/oep/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oep/azure-mgmt-oep/setup.py b/sdk/oep/azure-mgmt-oep/setup.py index 312f9cdf1bd2..873ce271a122 100644 --- a/sdk/oep/azure-mgmt-oep/setup.py +++ b/sdk/oep/azure-mgmt-oep/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Oep Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/_patch.py b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/_patch.py +++ b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/_patch.py b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/_patch.py +++ b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/operations/_patch.py b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/operations/_patch.py +++ b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/models/_patch.py b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/models/_patch.py +++ b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/operations/_patch.py b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/operations/_patch.py +++ b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/azure/mgmt/onlineexperimentation/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/setup.py b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/setup.py index 181e483e4be1..b8dff8ac0fc5 100644 --- a/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/setup.py +++ b/sdk/onlineexperimentation/azure-mgmt-onlineexperimentation/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_operations/_patch.py b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_operations/_patch.py +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_patch.py b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_patch.py +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_operations/_patch.py b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_operations/_patch.py +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_patch.py b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_patch.py +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/models/_patch.py b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/models/_patch.py +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/azure/onlineexperimentation/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/onlineexperimentation/azure-onlineexperimentation/setup.py b/sdk/onlineexperimentation/azure-onlineexperimentation/setup.py index 0ae144b3bb0e..a370c809fa79 100644 --- a/sdk/onlineexperimentation/azure-onlineexperimentation/setup.py +++ b/sdk/onlineexperimentation/azure-onlineexperimentation/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-onlineexperimentation" PACKAGE_PPRINT_NAME = "Azure Onlineexperimentation" diff --git a/sdk/openai/azure-openai/samples/chat_completions_aoai_quickstart.py b/sdk/openai/azure-openai/samples/chat_completions_aoai_quickstart.py index 3f27481957d6..0ff79c1dfb45 100644 --- a/sdk/openai/azure-openai/samples/chat_completions_aoai_quickstart.py +++ b/sdk/openai/azure-openai/samples/chat_completions_aoai_quickstart.py @@ -25,17 +25,17 @@ # These lines are intentionally excluded from the sample code, we use them to configure any vars # or to tweak usage in ways that keep samples looking consistent when rendered in docs and tools import os + os.environ["AZURE_OPENAI_ENDPOINT"] = os.environ["AZ_OPENAI_ENDPOINT"] + def chat_completions_aoai_quickstart() -> None: - #[START chat_completions_aoai_quickstart] + # [START chat_completions_aoai_quickstart] import os from openai import AzureOpenAI from azure.identity import DefaultAzureCredential, get_bearer_token_provider - token_provider = get_bearer_token_provider( - DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default" - ) + token_provider = get_bearer_token_provider(DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default") client = AzureOpenAI( azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], @@ -60,7 +60,7 @@ def chat_completions_aoai_quickstart() -> None: ) print(response.to_json()) - #[END chat_completions_aoai_quickstart] + # [END chat_completions_aoai_quickstart] if __name__ == "__main__": diff --git a/sdk/openai/azure-openai/samples/chat_completions_oyd.py b/sdk/openai/azure-openai/samples/chat_completions_oyd.py index 90fef9b31799..9d4b354065fd 100644 --- a/sdk/openai/azure-openai/samples/chat_completions_oyd.py +++ b/sdk/openai/azure-openai/samples/chat_completions_oyd.py @@ -27,8 +27,10 @@ # These lines are intentionally excluded from the sample code, we use them to configure any vars # or to tweak usage in ways that keep samples looking consistent when rendered in docs and tools import os + os.environ["AZURE_OPENAI_ENDPOINT"] = os.environ["AZ_OPENAI_ENDPOINT"] + def chat_completion_oyd_studio_viewcode() -> None: import os from openai import AzureOpenAI @@ -37,9 +39,7 @@ def chat_completion_oyd_studio_viewcode() -> None: endpoint = os.environ["AZURE_OPENAI_ENDPOINT"] deployment = os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT"] - token_provider = get_bearer_token_provider( - DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default" - ) + token_provider = get_bearer_token_provider(DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default") client = AzureOpenAI( azure_endpoint=endpoint, diff --git a/sdk/openai/azure-openai/samples/completions_aoai_quickstart.py b/sdk/openai/azure-openai/samples/completions_aoai_quickstart.py index cb1ffcbb77a7..7edecff9786d 100644 --- a/sdk/openai/azure-openai/samples/completions_aoai_quickstart.py +++ b/sdk/openai/azure-openai/samples/completions_aoai_quickstart.py @@ -26,32 +26,33 @@ # These lines are intentionally excluded from the sample code, we use them to configure any vars # or to tweak usage in ways that keep samples looking consistent when rendered in docs and tools import os + os.environ["AZURE_OPENAI_ENDPOINT"] = os.environ["AZ_OPENAI_ENDPOINT"] os.environ["AZURE_OPENAI_COMPLETIONS_DEPLOYMENT"] = "gpt-35-turbo-instruct" + def completions_aoai_quickstart() -> None: import os from openai import AzureOpenAI from azure.identity import DefaultAzureCredential, get_bearer_token_provider - token_provider = get_bearer_token_provider( - DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default" - ) + token_provider = get_bearer_token_provider(DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default") client = AzureOpenAI( azure_ad_token_provider=token_provider, azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], - api_version=os.environ["API_VERSION_GA"] - ) + api_version=os.environ["API_VERSION_GA"], + ) - #This will correspond to the custom name you chose for your deployment when you deployed a model. + # This will correspond to the custom name you chose for your deployment when you deployed a model. # Use a gpt-35-turbo-instruct deployment. - deployment_name=os.environ["AZURE_OPENAI_COMPLETIONS_DEPLOYMENT"] + deployment_name = os.environ["AZURE_OPENAI_COMPLETIONS_DEPLOYMENT"] # Send a completion call to generate an answer - prompt = 'Write a tagline for an ice cream shop.' + prompt = "Write a tagline for an ice cream shop." response = client.completions.create(model=deployment_name, prompt=prompt, max_tokens=10) print(prompt + response.choices[0].text) -if __name__ == '__main__': - completions_aoai_quickstart() \ No newline at end of file + +if __name__ == "__main__": + completions_aoai_quickstart() diff --git a/sdk/openai/azure-openai/samples/images_aoai_quickstart.py b/sdk/openai/azure-openai/samples/images_aoai_quickstart.py index 73558748b313..a381ce6e19e3 100644 --- a/sdk/openai/azure-openai/samples/images_aoai_quickstart.py +++ b/sdk/openai/azure-openai/samples/images_aoai_quickstart.py @@ -25,9 +25,11 @@ """ import os + os.environ["AZURE_OPENAI_ENDPOINT"] = os.environ["AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT"] os.environ["AZURE_OPENAI_IMAGE_DEPLOYMENT"] = "dall-e-3" + def images_aoai_quickstart() -> None: import os import httpx @@ -35,31 +37,27 @@ def images_aoai_quickstart() -> None: from PIL import Image from azure.identity import DefaultAzureCredential, get_bearer_token_provider - token_provider = get_bearer_token_provider( - DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default" - ) + token_provider = get_bearer_token_provider(DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default") client = AzureOpenAI( azure_ad_token_provider=token_provider, azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], - api_version=os.environ["API_VERSION_GA"] + api_version=os.environ["API_VERSION_GA"], ) result = client.images.generate( - model=os.environ["AZURE_OPENAI_IMAGE_DEPLOYMENT"], - prompt="a close-up of a bear walking through the forest", - n=1 + model=os.environ["AZURE_OPENAI_IMAGE_DEPLOYMENT"], prompt="a close-up of a bear walking through the forest", n=1 ) # Set the directory for the stored image - image_dir = os.path.join(os.curdir, 'images') + image_dir = os.path.join(os.curdir, "images") # If the directory doesn't exist, create it if not os.path.isdir(image_dir): os.mkdir(image_dir) # Initialize the image path (note the filetype should be png) - image_path = os.path.join(image_dir, 'generated_image.png') + image_path = os.path.join(image_dir, "generated_image.png") # Retrieve the generated image image_url = result.data[0].url # extract image URL from response @@ -73,5 +71,6 @@ def images_aoai_quickstart() -> None: image = Image.open(image_path) image.show() + if __name__ == "__main__": - images_aoai_quickstart() \ No newline at end of file + images_aoai_quickstart() diff --git a/sdk/openai/azure-openai/setup.py b/sdk/openai/azure-openai/setup.py index c111c60387bb..3c5ae34ef3fd 100644 --- a/sdk/openai/azure-openai/setup.py +++ b/sdk/openai/azure-openai/setup.py @@ -59,11 +59,9 @@ ), include_package_data=True, package_data={ - 'azure.openai': ['py.typed'], + "azure.openai": ["py.typed"], }, - install_requires=[ - "azure-identity<2.0.0,>=1.15.0" - ], + install_requires=["azure-identity<2.0.0,>=1.15.0"], python_requires=">=3.7", project_urls={ "Bug Reports": "https://github.com/Azure/azure-sdk-for-python/issues", diff --git a/sdk/openai/azure-openai/tests/conftest.py b/sdk/openai/azure-openai/tests/conftest.py index 34303144a111..c9023e2e8b32 100644 --- a/sdk/openai/azure-openai/tests/conftest.py +++ b/sdk/openai/azure-openai/tests/conftest.py @@ -18,7 +18,6 @@ from ci_tools.variables import in_ci from devtools_testutils import get_credential - # for pytest.parametrize GA = "2024-10-21" PREVIEW = "2025-03-01-preview" @@ -76,7 +75,9 @@ def client(api_type, api_version): if api_type == "azure": client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=api_version, ) elif api_type == "azure_key": @@ -86,19 +87,21 @@ def client(api_type, api_version): api_version=api_version, ) elif api_type in ["openai", "gpt_4_openai", "tts_openai"]: - client = openai.OpenAI( - api_key=os.getenv(ENV_OPENAI_KEY) - ) + client = openai.OpenAI(api_key=os.getenv(ENV_OPENAI_KEY)) elif api_type in ["whisper_azure", "tts_azure"]: client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_NORTHCENTRALUS_ENDPOINT), - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=api_version, ) elif api_type in ["dalle_azure", "gpt_4_azure", "asst_azure"]: client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT), - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=api_version, ) return client @@ -112,7 +115,9 @@ def client_async(api_type, api_version): if api_type == "azure": client = openai.AsyncAzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), - azure_ad_token_provider=get_bearer_token_provider_async(get_credential(is_async=True), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider_async( + get_credential(is_async=True), "https://cognitiveservices.azure.com/.default" + ), api_version=api_version, ) elif api_type == "azure_key": @@ -122,19 +127,21 @@ def client_async(api_type, api_version): api_version=api_version, ) elif api_type in ["openai", "gpt_4_openai", "tts_openai"]: - client = openai.AsyncOpenAI( - api_key=os.getenv(ENV_OPENAI_KEY) - ) + client = openai.AsyncOpenAI(api_key=os.getenv(ENV_OPENAI_KEY)) elif api_type in ["whisper_azure", "tts_azure"]: client = openai.AsyncAzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_NORTHCENTRALUS_ENDPOINT), - azure_ad_token_provider=get_bearer_token_provider_async(get_credential(is_async=True), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider_async( + get_credential(is_async=True), "https://cognitiveservices.azure.com/.default" + ), api_version=api_version, ) elif api_type in ["dalle_azure", "gpt_4_azure", "asst_azure"]: client = openai.AsyncAzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT), - azure_ad_token_provider=get_bearer_token_provider_async(get_credential(is_async=True), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider_async( + get_credential(is_async=True), "https://cognitiveservices.azure.com/.default" + ), api_version=api_version, ) return client @@ -152,8 +159,14 @@ def build_kwargs(args, api_type): elif api_type in ["tts_azure"]: return {"model": ENV_AZURE_OPENAI_TTS_NAME} if test_feature.startswith( - ("test_client", "test_models", "test_chat_completions", - "test_assistants", "test_responses", "test_vector_stores") + ( + "test_client", + "test_models", + "test_chat_completions", + "test_assistants", + "test_responses", + "test_vector_stores", + ) ): if api_type in ["azure", "azure_key", "asst_azure"]: return {"model": ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME} @@ -226,7 +239,6 @@ def wrapper(*args, **kwargs): return wrapper - @contextlib.contextmanager def reload(): try: diff --git a/sdk/openai/azure-openai/tests/test_assistants.py b/sdk/openai/azure-openai/tests/test_assistants.py index 989ed1c99f56..3fe8395333b6 100644 --- a/sdk/openai/azure-openai/tests/test_assistants.py +++ b/sdk/openai/azure-openai/tests/test_assistants.py @@ -101,7 +101,6 @@ def on_message_delta(self, delta: MessageDelta, snapshot: Message): assert content.index is not None assert content.image_file.file_id - def on_message_done(self, message: Message): for msg in message.content: if msg.type == "image_file": @@ -191,10 +190,7 @@ def handle_run_failure(self, run: Run): raise openai.OpenAIError(f"Run in unexpected status: {run.status}") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(ASST_AZURE, PREVIEW)] - ) + @pytest.mark.parametrize("api_type, api_version", [(ASST_AZURE, PREVIEW)]) def test_assistants_crud(self, client, api_type, api_version, **kwargs): try: @@ -221,15 +217,10 @@ def test_assistants_crud(self, client, api_type, api_version, **kwargs): for asst in list_assistants: assert asst.id - modify_assistant = client.beta.assistants.update( - assistant_id=assistant.id, - metadata={"key": "value"} - ) + modify_assistant = client.beta.assistants.update(assistant_id=assistant.id, metadata={"key": "value"}) assert modify_assistant.metadata == {"key": "value"} finally: - delete_assistant = client.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = client.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True @@ -254,16 +245,11 @@ def test_assistants_threads_crud(self, client, api_type, api_version, **kwargs): assert retrieved_thread.created_at == thread.created_at assert retrieved_thread.metadata == thread.metadata - updated_thread = client.beta.threads.update( - thread_id=thread.id, - metadata={"key": "updated"} - ) + updated_thread = client.beta.threads.update(thread_id=thread.id, metadata={"key": "updated"}) assert updated_thread.metadata == {"key": "updated"} finally: - delete_thread = client.beta.threads.delete( - thread_id=thread.id - ) + delete_thread = client.beta.threads.delete(thread_id=thread.id) assert delete_thread.id == thread.id assert delete_thread.deleted is True @@ -276,10 +262,7 @@ def test_assistants_messages_crud(self, client, api_type, api_version, **kwargs) path = pathlib.Path(file_name) - file = client.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file = client.files.create(file=open(path, "rb"), purpose="assistants") try: thread = client.beta.threads.create( @@ -297,17 +280,9 @@ def test_assistants_messages_crud(self, client, api_type, api_version, **kwargs) role="user", content="what is 2+2?", metadata={"math": "addition"}, - attachments=[ - { - "file_id": file.id, - "tools": [{"type": "code_interpreter"}] - } - ] - ) - retrieved_message = client.beta.threads.messages.retrieve( - thread_id=thread.id, - message_id=message.id + attachments=[{"file_id": file.id, "tools": [{"type": "code_interpreter"}]}], ) + retrieved_message = client.beta.threads.messages.retrieve(thread_id=thread.id, message_id=message.id) assert retrieved_message.id == message.id assert retrieved_message.created_at == message.created_at assert retrieved_message.metadata == message.metadata @@ -316,30 +291,23 @@ def test_assistants_messages_crud(self, client, api_type, api_version, **kwargs) assert retrieved_message.role == message.role assert retrieved_message.content == message.content - list_messages = client.beta.threads.messages.list( - thread_id=thread.id - ) + list_messages = client.beta.threads.messages.list(thread_id=thread.id) for msg in list_messages: assert msg.id modify_message = client.beta.threads.messages.update( - thread_id=thread.id, - message_id=message.id, - metadata={"math": "updated"} + thread_id=thread.id, message_id=message.id, metadata={"math": "updated"} ) assert modify_message.metadata == {"math": "updated"} finally: os.remove(path) - delete_thread = client.beta.threads.delete( - thread_id=thread.id - ) + delete_thread = client.beta.threads.delete(thread_id=thread.id) assert delete_thread.id == thread.id assert delete_thread.deleted is True delete_file = client.files.delete(file.id) assert delete_file.deleted is True - @configure @pytest.mark.parametrize("api_type, api_version", [(ASST_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_assistants_runs_code(self, client, api_type, api_version, **kwargs): @@ -373,23 +341,15 @@ def test_assistants_runs_code(self, client, api_type, api_version, **kwargs): assert message.content[0].type == "text" assert message.content[0].text.value - run = client.beta.threads.runs.update( - thread_id=thread.id, - run_id=run.id, - metadata={"user": "user123"} - ) + run = client.beta.threads.runs.update(thread_id=thread.id, run_id=run.id, metadata={"user": "user123"}) assert run.metadata == {"user": "user123"} finally: - delete_assistant = client.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = client.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True - delete_thread = client.beta.threads.delete( - thread_id=thread.id - ) + delete_thread = client.beta.threads.delete(thread_id=thread.id) assert delete_thread.id == thread.id assert delete_thread.deleted is True @@ -403,23 +363,14 @@ def test_assistants_runs_file_search(self, client, api_type, api_version, **kwar path = pathlib.Path(file_name) try: - vector_store = client.vector_stores.create( - name="Support FAQ" - ) - client.vector_stores.files.upload_and_poll( - vector_store_id=vector_store.id, - file=path - ) + vector_store = client.vector_stores.create(name="Support FAQ") + client.vector_stores.files.upload_and_poll(vector_store_id=vector_store.id, file=path) assistant = client.beta.assistants.create( name="python test", instructions="You help answer questions about Contoso company policy.", tools=[{"type": "file_search"}], - tool_resources={ - "file_search": { - "vector_store_ids": [vector_store.id] - } - }, - model="gpt-4-1106-preview" + tool_resources={"file_search": {"vector_store_ids": [vector_store.id]}}, + model="gpt-4-1106-preview", ) thread = client.beta.threads.create( @@ -437,7 +388,7 @@ def test_assistants_runs_file_search(self, client, api_type, api_version, **kwar run_steps = client.beta.threads.runs.steps.list( thread_id=thread.id, run_id=run.id, - include=["step_details.tool_calls[*].file_search.results[*].content"] + include=["step_details.tool_calls[*].file_search.results[*].content"], ) for step in run_steps: assert step @@ -454,20 +405,14 @@ def test_assistants_runs_file_search(self, client, api_type, api_version, **kwar finally: os.remove(path) - delete_assistant = client.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = client.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True - delete_thread = client.beta.threads.delete( - thread_id=run.thread_id - ) + delete_thread = client.beta.threads.delete(thread_id=run.thread_id) assert delete_thread.id assert delete_thread.deleted is True - deleted_vector_store = client.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = client.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True @configure @@ -497,8 +442,8 @@ def test_assistants_runs_functions(self, client, api_type, api_version, **kwargs }, }, "required": ["location"], - } - } + }, + }, } ], model="gpt-4-1106-preview", @@ -506,11 +451,7 @@ def test_assistants_runs_functions(self, client, api_type, api_version, **kwargs run = client.beta.threads.create_and_run_poll( assistant_id=assistant.id, - thread={ - "messages": [ - {"role": "user", "content": "How's the weather in Seattle?"} - ] - } + thread={"messages": [{"role": "user", "content": "How's the weather in Seattle?"}]}, ) self.handle_run_failure(run) if run.status == "requires_action": @@ -520,9 +461,9 @@ def test_assistants_runs_functions(self, client, api_type, api_version, **kwargs tool_outputs=[ { "tool_call_id": run.required_action.submit_tool_outputs.tool_calls[0].id, - "output": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "output": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } - ] + ], ) self.handle_run_failure(run) if run.status == "completed": @@ -542,17 +483,12 @@ def test_assistants_runs_functions(self, client, api_type, api_version, **kwargs assert r.tools == run.tools assert r.metadata == run.metadata - run_steps = client.beta.threads.runs.steps.list( - thread_id=run.thread_id, - run_id=r.id - ) + run_steps = client.beta.threads.runs.steps.list(thread_id=run.thread_id, run_id=r.id) for step in run_steps: assert step.id retrieved_step = client.beta.threads.runs.steps.retrieve( - thread_id=run.thread_id, - run_id=r.id, - step_id=step.id + thread_id=run.thread_id, run_id=r.id, step_id=step.id ) assert retrieved_step.id assert retrieved_step.created_at @@ -563,15 +499,11 @@ def test_assistants_runs_functions(self, client, api_type, api_version, **kwargs assert retrieved_step.step_details finally: - delete_assistant = client.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = client.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True - delete_thread = client.beta.threads.delete( - thread_id=run.thread_id - ) + delete_thread = client.beta.threads.delete(thread_id=run.thread_id) assert delete_thread.id assert delete_thread.deleted is True @@ -610,7 +542,7 @@ def test_assistants_stream_event_handler(self, client, api_type, api_version, ** name="Math Tutor", instructions="You are a personal math tutor. Write and run code to answer math questions.", tools=[{"type": "code_interpreter"}], - model="gpt-4-1106-preview" + model="gpt-4-1106-preview", ) try: diff --git a/sdk/openai/azure-openai/tests/test_assistants_async.py b/sdk/openai/azure-openai/tests/test_assistants_async.py index 203a20a7399e..570eb4a61b9e 100644 --- a/sdk/openai/azure-openai/tests/test_assistants_async.py +++ b/sdk/openai/azure-openai/tests/test_assistants_async.py @@ -125,7 +125,7 @@ async def on_text_created(self, text: Text): assert text.value is not None async def on_text_done(self, text: Text): - assert text.value is not None + assert text.value is not None for annotation in text.annotations: if annotation.type == "file_citation": assert annotation.end_index is not None @@ -191,10 +191,7 @@ def handle_run_failure(self, run: Run): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(ASST_AZURE, PREVIEW)] - ) + @pytest.mark.parametrize("api_type, api_version", [(ASST_AZURE, PREVIEW)]) async def test_assistants_crud(self, client_async, api_type, api_version, **kwargs): try: assistant = await client_async.beta.assistants.create( @@ -221,14 +218,11 @@ async def test_assistants_crud(self, client_async, api_type, api_version, **kwar assert asst.id modify_assistant = await client_async.beta.assistants.update( - assistant_id=assistant.id, - metadata={"key": "value"} + assistant_id=assistant.id, metadata={"key": "value"} ) assert modify_assistant.metadata == {"key": "value"} finally: - delete_assistant = await client_async.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = await client_async.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True @@ -254,16 +248,11 @@ async def test_assistants_threads_crud(self, client_async, api_type, api_version assert retrieved_thread.created_at == thread.created_at assert retrieved_thread.metadata == thread.metadata - updated_thread = await client_async.beta.threads.update( - thread_id=thread.id, - metadata={"key": "updated"} - ) + updated_thread = await client_async.beta.threads.update(thread_id=thread.id, metadata={"key": "updated"}) assert updated_thread.metadata == {"key": "updated"} finally: - delete_thread = await client_async.beta.threads.delete( - thread_id=thread.id - ) + delete_thread = await client_async.beta.threads.delete(thread_id=thread.id) assert delete_thread.id == thread.id assert delete_thread.deleted is True @@ -277,10 +266,7 @@ async def test_assistants_messages_crud(self, client_async, api_type, api_versio path = pathlib.Path(file_name) - file = await client_async.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file = await client_async.files.create(file=open(path, "rb"), purpose="assistants") try: thread = await client_async.beta.threads.create( @@ -298,16 +284,10 @@ async def test_assistants_messages_crud(self, client_async, api_type, api_versio role="user", content="what is 2+2?", metadata={"math": "addition"}, - attachments=[ - { - "file_id": file.id, - "tools": [{"type": "code_interpreter"}] - } - ] + attachments=[{"file_id": file.id, "tools": [{"type": "code_interpreter"}]}], ) retrieved_message = await client_async.beta.threads.messages.retrieve( - thread_id=thread.id, - message_id=message.id + thread_id=thread.id, message_id=message.id ) assert retrieved_message.id == message.id assert retrieved_message.created_at == message.created_at @@ -317,24 +297,18 @@ async def test_assistants_messages_crud(self, client_async, api_type, api_versio assert retrieved_message.role == message.role assert retrieved_message.content == message.content - list_messages = client_async.beta.threads.messages.list( - thread_id=thread.id - ) + list_messages = client_async.beta.threads.messages.list(thread_id=thread.id) async for msg in list_messages: assert msg.id modify_message = await client_async.beta.threads.messages.update( - thread_id=thread.id, - message_id=message.id, - metadata={"math": "updated"} + thread_id=thread.id, message_id=message.id, metadata={"math": "updated"} ) assert modify_message.metadata == {"math": "updated"} finally: os.remove(path) - delete_thread = await client_async.beta.threads.delete( - thread_id=thread.id - ) + delete_thread = await client_async.beta.threads.delete(thread_id=thread.id) assert delete_thread.id == thread.id assert delete_thread.deleted is True delete_file = await client_async.files.delete(file.id) @@ -374,22 +348,16 @@ async def test_assistants_runs_code(self, client_async, api_type, api_version, * assert message.content[0].text.value run = await client_async.beta.threads.runs.update( - thread_id=thread.id, - run_id=run.id, - metadata={"user": "user123"} + thread_id=thread.id, run_id=run.id, metadata={"user": "user123"} ) assert run.metadata == {"user": "user123"} finally: - delete_assistant = await client_async.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = await client_async.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True - delete_thread = await client_async.beta.threads.delete( - thread_id=thread.id - ) + delete_thread = await client_async.beta.threads.delete(thread_id=thread.id) assert delete_thread.id == thread.id assert delete_thread.deleted is True @@ -407,20 +375,13 @@ async def test_assistants_runs_file_search(self, client_async, api_type, api_ver vector_store = await client_async.vector_stores.create( name="Support FAQ", ) - await client_async.vector_stores.files.upload_and_poll( - vector_store_id=vector_store.id, - file=path - ) + await client_async.vector_stores.files.upload_and_poll(vector_store_id=vector_store.id, file=path) assistant = await client_async.beta.assistants.create( name="python test", instructions="You help answer questions about Contoso company policy.", tools=[{"type": "file_search"}], - tool_resources={ - "file_search": { - "vector_store_ids": [vector_store.id] - } - }, - model="gpt-4-1106-preview" + tool_resources={"file_search": {"vector_store_ids": [vector_store.id]}}, + model="gpt-4-1106-preview", ) thread = await client_async.beta.threads.create( messages=[ @@ -437,7 +398,7 @@ async def test_assistants_runs_file_search(self, client_async, api_type, api_ver run_steps = client_async.beta.threads.runs.steps.list( thread_id=thread.id, run_id=run.id, - include=["step_details.tool_calls[*].file_search.results[*].content"] + include=["step_details.tool_calls[*].file_search.results[*].content"], ) async for step in run_steps: assert step @@ -453,20 +414,14 @@ async def test_assistants_runs_file_search(self, client_async, api_type, api_ver finally: os.remove(path) - delete_assistant = await client_async.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = await client_async.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True - delete_thread = await client_async.beta.threads.delete( - thread_id=run.thread_id - ) + delete_thread = await client_async.beta.threads.delete(thread_id=run.thread_id) assert delete_thread.id assert delete_thread.deleted is True - deleted_vector_store = await client_async.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = await client_async.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True @configure_async @@ -497,8 +452,8 @@ async def test_assistants_runs_functions(self, client_async, api_type, api_versi }, }, "required": ["location"], - } - } + }, + }, } ], model="gpt-4-1106-preview", @@ -506,11 +461,7 @@ async def test_assistants_runs_functions(self, client_async, api_type, api_versi run = await client_async.beta.threads.create_and_run_poll( assistant_id=assistant.id, - thread={ - "messages": [ - {"role": "user", "content": "How's the weather in Seattle?"} - ] - } + thread={"messages": [{"role": "user", "content": "How's the weather in Seattle?"}]}, ) self.handle_run_failure(run) if run.status == "requires_action": @@ -520,9 +471,9 @@ async def test_assistants_runs_functions(self, client_async, api_type, api_versi tool_outputs=[ { "tool_call_id": run.required_action.submit_tool_outputs.tool_calls[0].id, - "output": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "output": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } - ] + ], ) self.handle_run_failure(run) if run.status == "completed": @@ -532,7 +483,6 @@ async def test_assistants_runs_functions(self, client_async, api_type, api_versi assert message.content[0].type == "text" assert message.content[0].text.value - runs = client_async.beta.threads.runs.list(thread_id=run.thread_id) async for r in runs: assert r.id == run.id @@ -543,17 +493,12 @@ async def test_assistants_runs_functions(self, client_async, api_type, api_versi assert r.tools == run.tools assert r.metadata == run.metadata - run_steps = client_async.beta.threads.runs.steps.list( - thread_id=run.thread_id, - run_id=r.id - ) + run_steps = client_async.beta.threads.runs.steps.list(thread_id=run.thread_id, run_id=r.id) async for step in run_steps: assert step.id retrieved_step = await client_async.beta.threads.runs.steps.retrieve( - thread_id=run.thread_id, - run_id=r.id, - step_id=step.id + thread_id=run.thread_id, run_id=r.id, step_id=step.id ) assert retrieved_step.id assert retrieved_step.created_at @@ -564,15 +509,11 @@ async def test_assistants_runs_functions(self, client_async, api_type, api_versi assert retrieved_step.step_details finally: - delete_assistant = await client_async.beta.assistants.delete( - assistant_id=assistant.id - ) + delete_assistant = await client_async.beta.assistants.delete(assistant_id=assistant.id) assert delete_assistant.id == assistant.id assert delete_assistant.deleted is True - delete_thread = await client_async.beta.threads.delete( - thread_id=run.thread_id - ) + delete_thread = await client_async.beta.threads.delete(thread_id=run.thread_id) assert delete_thread.id assert delete_thread.deleted is True @@ -613,7 +554,7 @@ async def test_assistants_stream_event_handler(self, client_async, api_type, api name="Math Tutor", instructions="You are a personal math tutor. Write and run code to answer math questions.", tools=[{"type": "code_interpreter"}], - model="gpt-4-1106-preview" + model="gpt-4-1106-preview", ) try: diff --git a/sdk/openai/azure-openai/tests/test_audio.py b/sdk/openai/azure-openai/tests/test_audio.py index a3388aa7693e..ef1744fb1fd7 100644 --- a/sdk/openai/azure-openai/tests/test_audio.py +++ b/sdk/openai/azure-openai/tests/test_audio.py @@ -18,10 +18,7 @@ class TestAudio(AzureRecordedTestCase): @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")]) def test_transcribe(self, client, api_type, api_version, **kwargs): result = client.audio.transcriptions.create( @@ -43,10 +40,7 @@ def test_transcribe_raw(self, client, api_type, api_version, **kwargs): assert result.text == "Hello." @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")]) def test_translate(self, client, api_type, api_version, **kwargs): result = client.audio.translations.create( @@ -76,14 +70,16 @@ def test_transcribe_verbose(self, client, api_type, api_version, **kwargs): response_format="verbose_json", **kwargs, ) - assert result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " \ - "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " \ - "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " \ - "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " \ - "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " \ - "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " \ - "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " \ + assert ( + result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " + "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " + "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " + "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " + "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " + "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " + "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " "terrestrial mammals such as armadillo, opossum, and lagomorphs." + ) assert result.task == "transcribe" assert result.language == "english" assert result.duration == 56.25 @@ -141,14 +137,16 @@ def test_translate_verbose(self, client, api_type, api_version, **kwargs): response_format="verbose_json", **kwargs, ) - assert result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " \ - "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " \ - "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " \ - "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " \ - "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " \ - "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " \ - "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " \ + assert ( + result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " + "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " + "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " + "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " + "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " + "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " + "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " "terrestrial mammals such as armadillo, opossum, and lagomorphs." + ) assert result.task == "translate" assert result.language == "english" assert result.duration == 56.25 @@ -223,10 +221,7 @@ def test_translate_options(self, client, api_type, api_version, **kwargs): assert result.text == "Hello" @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(TTS_AZURE, PREVIEW), (TTS_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(TTS_AZURE, PREVIEW), (TTS_OPENAI, "v1")]) def test_tts(self, client, api_type, api_version, **kwargs): speech_file_path = pathlib.Path(__file__).parent / f"{uuid.uuid4()}.mp3" @@ -248,13 +243,10 @@ def test_tts(self, client, api_type, api_version, **kwargs): def test_tts_hd_streaming(self, client, api_type, api_version, **kwargs): with client.audio.speech.with_streaming_response.create( - voice="echo", - input="The quick brown fox jumped over the lazy dog.", - model="tts-1-hd" + voice="echo", input="The quick brown fox jumped over the lazy dog.", model="tts-1-hd" ) as response: response.read() - @configure @pytest.mark.parametrize("api_type, api_version", [(TTS_AZURE, PREVIEW), (TTS_OPENAI, "v1")]) def test_tts_response_format(self, client, api_type, api_version, **kwargs): @@ -262,10 +254,7 @@ def test_tts_response_format(self, client, api_type, api_version, **kwargs): speech_file_path = pathlib.Path(__file__).parent / f"{uuid.uuid4()}.flac" try: response = client.audio.speech.create( - voice="fable", - input="The quick brown fox jumped over the lazy dog.", - response_format="flac", - **kwargs + voice="fable", input="The quick brown fox jumped over the lazy dog.", response_format="flac", **kwargs ) assert response.encoding assert response.content @@ -281,10 +270,7 @@ def test_tts_speed(self, client, api_type, api_version, **kwargs): speech_file_path = pathlib.Path(__file__).parent / f"{uuid.uuid4()}.mp3" try: response = client.audio.speech.create( - voice="onyx", - input="The quick brown fox jumped over the lazy dog.", - speed=3.0, - **kwargs + voice="onyx", input="The quick brown fox jumped over the lazy dog.", speed=3.0, **kwargs ) assert response.encoding assert response.content diff --git a/sdk/openai/azure-openai/tests/test_audio_async.py b/sdk/openai/azure-openai/tests/test_audio_async.py index da60991bec89..25d9358b1505 100644 --- a/sdk/openai/azure-openai/tests/test_audio_async.py +++ b/sdk/openai/azure-openai/tests/test_audio_async.py @@ -19,10 +19,7 @@ class TestAudioAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")]) async def test_transcribe(self, client_async, api_type, api_version, **kwargs): result = await client_async.audio.transcriptions.create( @@ -46,10 +43,7 @@ async def test_transcribe_raw(self, client_async, api_type, api_version, **kwarg @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(WHISPER_AZURE, GA), (WHISPER_AZURE, PREVIEW), (OPENAI, "v1")]) async def test_translate(self, client_async, api_type, api_version, **kwargs): result = await client_async.audio.translations.create( @@ -81,14 +75,16 @@ async def test_transcribe_verbose(self, client_async, api_type, api_version, **k response_format="verbose_json", **kwargs, ) - assert result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " \ - "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " \ - "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " \ - "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " \ - "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " \ - "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " \ - "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " \ + assert ( + result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " + "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " + "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " + "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " + "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " + "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " + "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " "terrestrial mammals such as armadillo, opossum, and lagomorphs." + ) assert result.task == "transcribe" assert result.language == "english" assert result.duration == 56.25 @@ -150,14 +146,16 @@ async def test_translate_verbose(self, client_async, api_type, api_version, **kw response_format="verbose_json", **kwargs, ) - assert result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " \ - "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " \ - "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " \ - "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " \ - "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " \ - "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " \ - "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " \ + assert ( + result.text == "The ocelot, Lepardus paradalis, is a small wild cat native to the southwestern " + "United States, Mexico, and Central and South America. This medium-sized cat is characterized by " + "solid black spots and streaks on its coat, round ears, and white neck and undersides. It weighs " + "between 8 and 15.5 kilograms, 18 and 34 pounds, and reaches 40 to 50 centimeters – 16 to 20 inches " + "– at the shoulders. It was first described by Carl Linnaeus in 1758. Two subspecies are recognized, " + "L. p. paradalis and L. p. mitis. Typically active during twilight and at night, the ocelot tends to " + "be solitary and territorial. It is efficient at climbing, leaping, and swimming. It preys on small " "terrestrial mammals such as armadillo, opossum, and lagomorphs." + ) assert result.task == "translate" assert result.language == "english" assert result.duration == 56.25 @@ -238,10 +236,7 @@ async def test_translate_options(self, client_async, api_type, api_version, **kw @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(TTS_AZURE, PREVIEW), (TTS_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(TTS_AZURE, PREVIEW), (TTS_OPENAI, "v1")]) async def test_tts(self, client_async, api_type, api_version, **kwargs): speech_file_path = pathlib.Path(__file__).parent / f"{uuid.uuid4()}.mp3" @@ -264,9 +259,7 @@ async def test_tts(self, client_async, api_type, api_version, **kwargs): async def test_tts_hd(self, client_async, api_type, api_version, **kwargs): async with client_async.audio.speech.with_streaming_response.create( - voice="echo", - input="The quick brown fox jumped over the lazy dog.", - model="tts-1-hd" + voice="echo", input="The quick brown fox jumped over the lazy dog.", model="tts-1-hd" ) as response: await response.read() @@ -278,10 +271,7 @@ async def test_tts_response_format(self, client_async, api_type, api_version, ** speech_file_path = pathlib.Path(__file__).parent / f"{uuid.uuid4()}.flac" try: response = await client_async.audio.speech.create( - voice="fable", - input="The quick brown fox jumped over the lazy dog.", - response_format="flac", - **kwargs + voice="fable", input="The quick brown fox jumped over the lazy dog.", response_format="flac", **kwargs ) assert response.encoding assert response.content @@ -298,10 +288,7 @@ async def test_tts_speed(self, client_async, api_type, api_version, **kwargs): speech_file_path = pathlib.Path(__file__).parent / f"{uuid.uuid4()}.mp3" try: response = await client_async.audio.speech.create( - voice="onyx", - input="The quick brown fox jumped over the lazy dog.", - speed=3.0, - **kwargs + voice="onyx", input="The quick brown fox jumped over the lazy dog.", speed=3.0, **kwargs ) assert response.encoding assert response.content diff --git a/sdk/openai/azure-openai/tests/test_chat_completions.py b/sdk/openai/azure-openai/tests/test_chat_completions.py index 3cc3f9df52fe..ad04ec2eca3f 100644 --- a/sdk/openai/azure-openai/tests/test_chat_completions.py +++ b/sdk/openai/azure-openai/tests/test_chat_completions.py @@ -22,7 +22,7 @@ GA, PREVIEW, ENV_AZURE_OPENAI_SEARCH_ENDPOINT, - ENV_AZURE_OPENAI_SEARCH_INDEX + ENV_AZURE_OPENAI_SEARCH_INDEX, ) @@ -30,14 +30,11 @@ class TestChatCompletions(AzureRecordedTestCase): @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE_KEY, GA), (AZURE_KEY, PREVIEW)] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE_KEY, GA), (AZURE_KEY, PREVIEW)]) def test_azure_api_key(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, **kwargs) @@ -55,14 +52,11 @@ def test_azure_api_key(self, client, api_type, api_version, **kwargs): assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, **kwargs) @@ -80,17 +74,16 @@ def test_chat_completion(self, client, api_type, api_version, **kwargs): assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (OPENAI, "v1")]) def test_streamed_chat_completions(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "How do I bake a chocolate cake?"} + {"role": "user", "content": "How do I bake a chocolate cake?"}, ] - response = client.chat.completions.create(messages=messages, stream=True, stream_options={"include_usage": True}, **kwargs) + response = client.chat.completions.create( + messages=messages, stream=True, stream_options={"include_usage": True}, **kwargs + ) for completion in response: # API versions after 2023-05-15 send an empty first completion with RAI @@ -105,17 +98,16 @@ def test_streamed_chat_completions(self, client, api_type, api_version, **kwargs if completion.usage: assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_max_tokens(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, max_tokens=50, **kwargs) @@ -134,14 +126,11 @@ def test_chat_completion_max_tokens(self, client, api_type, api_version, **kwarg assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_temperature(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, temperature=0.8, **kwargs) @@ -160,14 +149,11 @@ def test_chat_completion_temperature(self, client, api_type, api_version, **kwar assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_top_p(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, top_p=0.1, **kwargs) @@ -186,14 +172,11 @@ def test_chat_completion_top_p(self, client, api_type, api_version, **kwargs): assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_n(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, n=2, **kwargs) @@ -213,14 +196,11 @@ def test_chat_completion_n(self, client, api_type, api_version, **kwargs): assert c.message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_stop(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, stop=" ", **kwargs) @@ -238,21 +218,15 @@ def test_chat_completion_stop(self, client, api_type, api_version, **kwargs): assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_token_penalty(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create( - messages=messages, - presence_penalty=2, - frequency_penalty=2, - **kwargs + messages=messages, presence_penalty=2, frequency_penalty=2, **kwargs ) assert completion.id @@ -269,21 +243,14 @@ def test_chat_completion_token_penalty(self, client, api_type, api_version, **kw assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_user(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] - completion = client.chat.completions.create( - messages=messages, - user="krista", - **kwargs - ) + completion = client.chat.completions.create(messages=messages, user="krista", **kwargs) assert completion.id assert completion.object == "chat.completion" @@ -299,21 +266,14 @@ def test_chat_completion_user(self, client, api_type, api_version, **kwargs): assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_logit_bias(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What color is the ocean?"} + {"role": "user", "content": "What color is the ocean?"}, ] - completion = client.chat.completions.create( - messages=messages, - logit_bias={17585: -100, 14573: -100}, - **kwargs - ) + completion = client.chat.completions.create(messages=messages, logit_bias={17585: -100, 14573: -100}, **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -332,15 +292,12 @@ def test_chat_completion_logit_bias(self, client, api_type, api_version, **kwarg def test_chat_completion_rai_annotations(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "how do I rob a bank with violence?"} + {"role": "user", "content": "how do I rob a bank with violence?"}, ] # prompt filtered with pytest.raises(openai.BadRequestError) as e: - completion = client.chat.completions.create( - messages=messages, - **kwargs - ) + completion = client.chat.completions.create(messages=messages, **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -361,10 +318,7 @@ def test_chat_completion_rai_annotations(self, client, api_type, api_version, ** # not filtered messages[1]["content"] = "What color is the ocean?" - completion = client.chat.completions.create( - messages=messages, - **kwargs - ) + completion = client.chat.completions.create(messages=messages, **kwargs) # prompt filter results prompt_filter_result = completion.prompt_filter_results[0]["content_filter_results"] @@ -389,17 +343,17 @@ def test_chat_completion_rai_annotations(self, client, api_type, api_version, ** assert output_filter_result["violence"]["severity"] == "safe" @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_functions(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -421,11 +375,7 @@ def test_chat_completion_functions(self, client, api_type, api_version, **kwargs } ] - completion = client.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + completion = client.chat.completions.create(messages=messages, functions=functions, **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -437,7 +387,7 @@ def test_chat_completion_functions(self, client, api_type, api_version, **kwargs assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.role - function_call = completion.choices[0].message.function_call + function_call = completion.choices[0].message.function_call assert function_call.name == "get_current_weather" assert "Seattle" in function_call.arguments @@ -456,14 +406,10 @@ def test_chat_completion_functions(self, client, api_type, api_version, **kwargs { "role": "function", "name": "get_current_weather", - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) - function_completion = client.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + function_completion = client.chat.completions.create(messages=messages, functions=functions, **kwargs) assert function_completion assert "sunny" in function_completion.choices[0].message.content.lower() assert "22" in function_completion.choices[0].message.content @@ -482,17 +428,17 @@ def test_chat_completion_functions(self, client, api_type, api_version, **kwargs assert output_filter_result["violence"]["severity"] == "safe" @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_functions_stream(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -514,12 +460,7 @@ def test_chat_completion_functions_stream(self, client, api_type, api_version, * } ] - response = client.chat.completions.create( - messages=messages, - functions=functions, - stream=True, - **kwargs - ) + response = client.chat.completions.create(messages=messages, functions=functions, stream=True, **kwargs) args = "" for completion in response: for c in completion.choices: @@ -535,14 +476,11 @@ def test_chat_completion_functions_stream(self, client, api_type, api_version, * { "role": "function", "name": "get_current_weather", - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) function_completion = client.chat.completions.create( - messages=messages, - functions=functions, - stream=True, - **kwargs + messages=messages, functions=functions, stream=True, **kwargs ) content = "" for completion in function_completion: @@ -556,17 +494,17 @@ def test_chat_completion_functions_stream(self, client, api_type, api_version, * assert "22" in content @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_chat_completion_given_function(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -604,14 +542,11 @@ def test_chat_completion_given_function(self, client, api_type, api_version, **k }, "required": ["location"], }, - } + }, ] completion = client.chat.completions.create( - messages=messages, - functions=functions, - function_call={"name": "get_current_temperature"}, - **kwargs + messages=messages, functions=functions, function_call={"name": "get_current_temperature"}, **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -624,7 +559,7 @@ def test_chat_completion_given_function(self, client, api_type, api_version, **k assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.role - function_call = completion.choices[0].message.function_call + function_call = completion.choices[0].message.function_call assert function_call.name == "get_current_temperature" assert "Seattle" in function_call.arguments @@ -632,14 +567,10 @@ def test_chat_completion_given_function(self, client, api_type, api_version, **k { "role": "function", "name": "get_current_temperature", - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\"}" + "content": '{"temperature": "22", "unit": "celsius"}', } ) - function_completion = client.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + function_completion = client.chat.completions.create(messages=messages, functions=functions, **kwargs) assert function_completion assert "22" in function_completion.choices[0].message.content assert function_completion.choices[0].message.role == "assistant" @@ -648,11 +579,14 @@ def test_chat_completion_given_function(self, client, api_type, api_version, **k @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW)]) def test_chat_completion_functions_rai(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "how do I rob a bank with violence?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "how do I rob a bank with violence?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -675,11 +609,7 @@ def test_chat_completion_functions_rai(self, client, api_type, api_version, **kw ] with pytest.raises(openai.BadRequestError) as e: - response = client.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + response = client.chat.completions.create(messages=messages, functions=functions, **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -702,15 +632,11 @@ def test_chat_completion_functions_rai(self, client, api_type, api_version, **kw { "role": "function", "name": "get_current_temperature", - "content": "{\"temperature\": \"you can rob a bank by asking for the money\", \"unit\": \"celsius\"}" + "content": '{"temperature": "you can rob a bank by asking for the money", "unit": "celsius"}', } ) with pytest.raises(openai.BadRequestError) as e: - function_completion = client.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + function_completion = client.chat.completions.create(messages=messages, functions=functions, **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -734,26 +660,24 @@ def test_chat_completion_functions_rai(self, client, api_type, api_version, **kw def test_chat_completion_byod(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"} + {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"}, ] completion = client.chat.completions.create( messages=messages, extra_body={ - "data_sources":[ + "data_sources": [ { "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], - "authentication": { - "type": "system_assigned_managed_identity" - } - } + "authentication": {"type": "system_assigned_managed_identity"}, + }, } ], }, - model="gpt-4-0613" + model="gpt-4-0613", ) assert completion.id assert completion.object == "extensions.chat.completion" @@ -772,27 +696,25 @@ def test_chat_completion_byod(self, client, api_type, api_version, **kwargs): def test_streamed_chat_completions_byod(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"} + {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"}, ] response = client.chat.completions.create( messages=messages, extra_body={ - "data_sources":[ + "data_sources": [ { "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], - "authentication": { - "type": "system_assigned_managed_identity" - } - } + "authentication": {"type": "system_assigned_managed_identity"}, + }, } ], }, stream=True, - model="gpt-4-0613" + model="gpt-4-0613", ) for chunk in response: assert chunk.id @@ -815,7 +737,7 @@ def test_streamed_chat_completions_byod(self, client, api_type, api_version, **k def test_chat_completion_seed(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Why is the sky blue?"} + {"role": "user", "content": "Why is the sky blue?"}, ] completion = client.chat.completions.create(messages=messages, seed=42, **kwargs) @@ -827,10 +749,12 @@ def test_chat_completion_seed(self, client, api_type, api_version, **kwargs): def test_chat_completion_json_response(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."} + {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."}, ] - completion = client.chat.completions.create(messages=messages, response_format={ "type": "json_object" }, **kwargs) + completion = client.chat.completions.create( + messages=messages, response_format={"type": "json_object"}, **kwargs + ) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -849,7 +773,7 @@ def test_chat_completion_json_response(self, client, api_type, api_version, **kw def test_chat_completion_block_list_term(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What is the best time of year to pick pineapple?"} + {"role": "user", "content": "What is the best time of year to pick pineapple?"}, ] with pytest.raises(openai.BadRequestError) as e: client.chat.completions.create(messages=messages, model="gpt-4-1106-preview") @@ -875,8 +799,11 @@ def test_chat_completion_block_list_term(self, client, api_type, api_version, ** @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_tools(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] tools = [ { @@ -887,24 +814,19 @@ def test_chat_completion_tools(self, client, api_type, api_version, **kwargs): "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] - completion = client.chat.completions.create( - messages=messages, - tools=tools, - tool_choice="auto", - **kwargs - ) + completion = client.chat.completions.create(messages=messages, tools=tools, tool_choice="auto", **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -916,7 +838,7 @@ def test_chat_completion_tools(self, client, api_type, api_version, **kwargs): assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.role - function_call = completion.choices[0].message.tool_calls[0].function + function_call = completion.choices[0].message.tool_calls[0].function assert function_call.name == "get_current_weather" assert "Seattle" in function_call.arguments messages.append(completion.choices[0].message) @@ -926,14 +848,10 @@ def test_chat_completion_tools(self, client, api_type, api_version, **kwargs): { "role": "tool", "tool_call_id": tool_call_id, - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) - tool_completion = client.chat.completions.create( - messages=messages, - tools=tools, - **kwargs - ) + tool_completion = client.chat.completions.create(messages=messages, tools=tools, **kwargs) assert tool_completion assert "sunny" in tool_completion.choices[0].message.content.lower() assert "22" in tool_completion.choices[0].message.content @@ -943,8 +861,11 @@ def test_chat_completion_tools(self, client, api_type, api_version, **kwargs): @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_tools_stream(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] tools = [ @@ -956,23 +877,18 @@ def test_chat_completion_tools_stream(self, client, api_type, api_version, **kwa "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] - response = client.chat.completions.create( - messages=messages, - tools=tools, - stream=True, - **kwargs - ) + response = client.chat.completions.create(messages=messages, tools=tools, stream=True, **kwargs) args = "" for completion in response: for c in completion.choices: @@ -992,32 +908,18 @@ def test_chat_completion_tools_stream(self, client, api_type, api_version, **kwa assistant_message = { "role": assistant, - "tool_calls": [ - { - "id": tool_id, - "type": tool_type, - "function": { - "name": function_name, - "arguments": args - } - } - ], - "content": None + "tool_calls": [{"id": tool_id, "type": tool_type, "function": {"name": function_name, "arguments": args}}], + "content": None, } messages.append(assistant_message) messages.append( { "role": "tool", "tool_call_id": tool_id, - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) - function_completion = client.chat.completions.create( - messages=messages, - tools=tools, - stream=True, - **kwargs - ) + function_completion = client.chat.completions.create(messages=messages, tools=tools, stream=True, **kwargs) content = "" for func in function_completion: for c in func.choices: @@ -1033,8 +935,11 @@ def test_chat_completion_tools_stream(self, client, api_type, api_version, **kwa @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_tools_parallel_func(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"}, ] tools = [ { @@ -1045,24 +950,19 @@ def test_chat_completion_tools_parallel_func(self, client, api_type, api_version "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] - completion = client.chat.completions.create( - messages=messages, - tools=tools, - tool_choice="auto", - **kwargs - ) + completion = client.chat.completions.create(messages=messages, tools=tools, tool_choice="auto", **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -1091,21 +991,17 @@ def test_chat_completion_tools_parallel_func(self, client, api_type, api_version { "role": "tool", "tool_call_id": tool_call_id_0, - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Cloudy\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Cloudy"}', } ) messages.append( { "role": "tool", "tool_call_id": tool_call_id_1, - "content": "{\"temperature\": \"80\", \"unit\": \"fahrenheit\", \"description\": \"Sunny\"}" + "content": '{"temperature": "80", "unit": "fahrenheit", "description": "Sunny"}', } ) - tool_completion = client.chat.completions.create( - messages=messages, - tools=tools, - **kwargs - ) + tool_completion = client.chat.completions.create(messages=messages, tools=tools, **kwargs) assert tool_completion assert "sunny" in tool_completion.choices[0].message.content.lower() assert "cloudy" in tool_completion.choices[0].message.content.lower() @@ -1125,7 +1021,9 @@ def test_chat_completion_vision(self, client, api_type, api_version, **kwargs): {"type": "text", "text": "What's in this image?"}, { "type": "image_url", - "image_url": {"url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg"} + "image_url": { + "url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg" + }, }, ], } @@ -1142,15 +1040,10 @@ def test_chat_completion_vision(self, client, api_type, api_version, **kwargs): def test_chat_completion_logprobs(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] - completion = client.chat.completions.create( - messages=messages, - logprobs=True, - top_logprobs=3, - **kwargs - ) + completion = client.chat.completions.create(messages=messages, logprobs=True, top_logprobs=3, **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -1213,8 +1106,11 @@ class MathResponse(BaseModel): @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_parallel_tool_calls_disable(self, client, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles in Fahrenheit?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles in Fahrenheit?"}, ] tools = [ { @@ -1225,24 +1121,19 @@ def test_chat_completion_parallel_tool_calls_disable(self, client, api_type, api "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] - completion = client.chat.completions.create( - messages=messages, - tools=tools, - parallel_tool_calls=False, - **kwargs - ) + completion = client.chat.completions.create(messages=messages, tools=tools, parallel_tool_calls=False, **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -1257,21 +1148,14 @@ def test_chat_completion_parallel_tool_calls_disable(self, client, api_type, api assert len(completion.choices[0].message.tool_calls) == 1 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_token_details(self, client, api_type, api_version, **kwargs): messages = [ {"role": "developer", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What is the meaning of life?"} + {"role": "user", "content": "What is the meaning of life?"}, ] - completion = client.chat.completions.create( - messages=messages, - model="o1", - reasoning_effort="low" - ) + completion = client.chat.completions.create(messages=messages, model="o1", reasoning_effort="low") assert completion.id assert completion.object == "chat.completion" @@ -1295,10 +1179,7 @@ def test_chat_completion_token_details(self, client, api_type, api_version, **kw assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_audio_input(self, client, api_type, api_version, **kwargs): path = pathlib.Path(__file__) wav_file = path.parent / "assets" / "cat.wav" @@ -1313,20 +1194,11 @@ def test_chat_completion_audio_input(self, client, api_type, api_version, **kwar { "role": "user", "content": [ - { - "type": "text", - "text": "What is in this recording?" - }, - { - "type": "input_audio", - "input_audio": { - "data": encoded_string, - "format": "wav" - } - } - ] + {"type": "text", "text": "What is in this recording?"}, + {"type": "input_audio", "input_audio": {"data": encoded_string, "format": "wav"}}, + ], }, - ] + ], ) assert completion.choices[0] @@ -1335,21 +1207,13 @@ def test_chat_completion_audio_input(self, client, api_type, api_version, **kwar assert completion.usage.completion_tokens_details.audio_tokens is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_audio_output(self, client, api_type, api_version, **kwargs): completion = client.chat.completions.create( model="gpt-4o-audio-preview", modalities=["text", "audio"], audio={"voice": "alloy", "format": "wav"}, - messages=[ - { - "role": "user", - "content": "Are bengals good cats? Keep it short." - } - ] + messages=[{"role": "user", "content": "Are bengals good cats? Keep it short."}], ) assert completion.choices[0] @@ -1360,10 +1224,7 @@ def test_chat_completion_audio_output(self, client, api_type, api_version, **kwa assert wav_bytes.startswith(b"RIFF") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_predicted_outputs(self, client, api_type, api_version, **kwargs): code = """ @@ -1383,20 +1244,8 @@ class User { completion = client.chat.completions.create( model="gpt-4o", - messages=[ - { - "role": "user", - "content": refactor_prompt - }, - { - "role": "user", - "content": code - } - ], - prediction={ - "type": "content", - "content": code - } + messages=[{"role": "user", "content": refactor_prompt}, {"role": "user", "content": code}], + prediction={"type": "content", "content": code}, ) assert completion.id @@ -1421,10 +1270,7 @@ class User { assert completion.choices[0].message.role @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_chat_completion_predicted_outputs_stream(self, client, api_type, api_version, **kwargs): code = """ @@ -1444,22 +1290,10 @@ class User { response = client.chat.completions.create( model="gpt-4o", - messages=[ - { - "role": "user", - "content": refactor_prompt - }, - { - "role": "user", - "content": code - } - ], - prediction={ - "type": "content", - "content": code - }, + messages=[{"role": "user", "content": refactor_prompt}, {"role": "user", "content": code}], + prediction={"type": "content", "content": code}, stream=True, - stream_options={"include_usage": True} + stream_options={"include_usage": True}, ) for completion in response: if len(completion.choices) > 0: @@ -1471,7 +1305,9 @@ class User { assert c.index is not None assert c.delta is not None if completion.usage: - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert completion.usage.completion_tokens_details assert completion.usage.completion_tokens_details.accepted_prediction_tokens is not None assert completion.usage.completion_tokens_details.audio_tokens is not None diff --git a/sdk/openai/azure-openai/tests/test_chat_completions_async.py b/sdk/openai/azure-openai/tests/test_chat_completions_async.py index 4628481335a1..cc6b93d3aeeb 100644 --- a/sdk/openai/azure-openai/tests/test_chat_completions_async.py +++ b/sdk/openai/azure-openai/tests/test_chat_completions_async.py @@ -22,7 +22,7 @@ GA, PREVIEW, ENV_AZURE_OPENAI_SEARCH_ENDPOINT, - ENV_AZURE_OPENAI_SEARCH_INDEX + ENV_AZURE_OPENAI_SEARCH_INDEX, ) @@ -31,14 +31,11 @@ class TestChatCompletionsAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE_KEY, GA), (AZURE_KEY, PREVIEW)] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE_KEY, GA), (AZURE_KEY, PREVIEW)]) async def test_azure_api_key(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, **kwargs) @@ -57,14 +54,11 @@ async def test_azure_api_key(self, client_async, api_type, api_version, **kwargs @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, **kwargs) @@ -83,17 +77,16 @@ async def test_chat_completion(self, client_async, api_type, api_version, **kwar @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (OPENAI, "v1")]) async def test_streamed_chat_completions(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "How do I bake a chocolate cake?"} + {"role": "user", "content": "How do I bake a chocolate cake?"}, ] - response = await client_async.chat.completions.create(messages=messages, stream=True, stream_options={"include_usage": True}, **kwargs) + response = await client_async.chat.completions.create( + messages=messages, stream=True, stream_options={"include_usage": True}, **kwargs + ) async for completion in response: # API versions after 2023-05-15 send an empty first completion with RAI @@ -108,18 +101,17 @@ async def test_streamed_chat_completions(self, client_async, api_type, api_versi if completion.usage: assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_max_tokens(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, max_tokens=50, **kwargs) @@ -139,14 +131,11 @@ async def test_chat_completion_max_tokens(self, client_async, api_type, api_vers @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_temperature(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, temperature=0.8, **kwargs) @@ -166,14 +155,11 @@ async def test_chat_completion_temperature(self, client_async, api_type, api_ver @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_top_p(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, top_p=0.1, **kwargs) @@ -193,14 +179,11 @@ async def test_chat_completion_top_p(self, client_async, api_type, api_version, @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_n(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, n=2, **kwargs) @@ -221,14 +204,11 @@ async def test_chat_completion_n(self, client_async, api_type, api_version, **kw @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_stop(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create(messages=messages, stop=" ", **kwargs) @@ -247,21 +227,15 @@ async def test_chat_completion_stop(self, client_async, api_type, api_version, * @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_token_penalty(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create( - messages=messages, - presence_penalty=2, - frequency_penalty=2, - **kwargs + messages=messages, presence_penalty=2, frequency_penalty=2, **kwargs ) assert completion.id @@ -279,21 +253,14 @@ async def test_chat_completion_token_penalty(self, client_async, api_type, api_v @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_user(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] - completion = await client_async.chat.completions.create( - messages=messages, - user="krista", - **kwargs - ) + completion = await client_async.chat.completions.create(messages=messages, user="krista", **kwargs) assert completion.id assert completion.object == "chat.completion" @@ -310,20 +277,15 @@ async def test_chat_completion_user(self, client_async, api_type, api_version, * @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_logit_bias(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What color is the ocean?"} + {"role": "user", "content": "What color is the ocean?"}, ] completion = await client_async.chat.completions.create( - messages=messages, - logit_bias={17585: -100, 14573: -100}, - **kwargs + messages=messages, logit_bias={17585: -100, 14573: -100}, **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -344,15 +306,12 @@ async def test_chat_completion_logit_bias(self, client_async, api_type, api_vers async def test_chat_completion_rai_annotations(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "how do I rob a bank with violence?"} + {"role": "user", "content": "how do I rob a bank with violence?"}, ] # prompt filtered with pytest.raises(openai.BadRequestError) as e: - completion = await client_async.chat.completions.create( - messages=messages, - **kwargs - ) + completion = await client_async.chat.completions.create(messages=messages, **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -373,10 +332,7 @@ async def test_chat_completion_rai_annotations(self, client_async, api_type, api # not filtered messages[1]["content"] = "What color is the ocean?" - completion = await client_async.chat.completions.create( - messages=messages, - **kwargs - ) + completion = await client_async.chat.completions.create(messages=messages, **kwargs) # prompt filter results prompt_filter_result = completion.prompt_filter_results[0]["content_filter_results"] @@ -402,17 +358,17 @@ async def test_chat_completion_rai_annotations(self, client_async, api_type, api @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_functions(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -434,11 +390,7 @@ async def test_chat_completion_functions(self, client_async, api_type, api_versi } ] - completion = await client_async.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + completion = await client_async.chat.completions.create(messages=messages, functions=functions, **kwargs) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -450,7 +402,7 @@ async def test_chat_completion_functions(self, client_async, api_type, api_versi assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.role - function_call = completion.choices[0].message.function_call + function_call = completion.choices[0].message.function_call assert function_call.name == "get_current_weather" assert "Seattle" in function_call.arguments @@ -469,13 +421,11 @@ async def test_chat_completion_functions(self, client_async, api_type, api_versi { "role": "function", "name": "get_current_weather", - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) function_completion = await client_async.chat.completions.create( - messages=messages, - functions=functions, - **kwargs + messages=messages, functions=functions, **kwargs ) assert function_completion assert "sunny" in function_completion.choices[0].message.content.lower() @@ -496,17 +446,17 @@ async def test_chat_completion_functions(self, client_async, api_type, api_versi @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_functions_stream(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -529,10 +479,7 @@ async def test_chat_completion_functions_stream(self, client_async, api_type, ap ] response = await client_async.chat.completions.create( - messages=messages, - functions=functions, - stream=True, - **kwargs + messages=messages, functions=functions, stream=True, **kwargs ) args = "" async for completion in response: @@ -549,14 +496,11 @@ async def test_chat_completion_functions_stream(self, client_async, api_type, ap { "role": "function", "name": "get_current_weather", - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) function_completion = await client_async.chat.completions.create( - messages=messages, - functions=functions, - stream=True, - **kwargs + messages=messages, functions=functions, stream=True, **kwargs ) content = "" async for completion in function_completion: @@ -571,17 +515,17 @@ async def test_chat_completion_functions_stream(self, client_async, api_type, ap @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_chat_completion_given_function(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -619,14 +563,11 @@ async def test_chat_completion_given_function(self, client_async, api_type, api_ }, "required": ["location"], }, - } + }, ] completion = await client_async.chat.completions.create( - messages=messages, - functions=functions, - function_call={"name": "get_current_temperature"}, - **kwargs + messages=messages, functions=functions, function_call={"name": "get_current_temperature"}, **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -639,7 +580,7 @@ async def test_chat_completion_given_function(self, client_async, api_type, api_ assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.role - function_call = completion.choices[0].message.function_call + function_call = completion.choices[0].message.function_call assert function_call.name == "get_current_temperature" assert "Seattle" in function_call.arguments @@ -647,13 +588,11 @@ async def test_chat_completion_given_function(self, client_async, api_type, api_ { "role": "function", "name": "get_current_temperature", - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\"}" + "content": '{"temperature": "22", "unit": "celsius"}', } ) function_completion = await client_async.chat.completions.create( - messages=messages, - functions=functions, - **kwargs + messages=messages, functions=functions, **kwargs ) assert function_completion assert "22" in function_completion.choices[0].message.content @@ -664,11 +603,14 @@ async def test_chat_completion_given_function(self, client_async, api_type, api_ @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW)]) async def test_chat_completion_functions_rai(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "how do I rob a bank with violence?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "how do I rob a bank with violence?"}, ] - functions=[ + functions = [ { "name": "get_current_weather", "description": "Get the current weather", @@ -691,11 +633,7 @@ async def test_chat_completion_functions_rai(self, client_async, api_type, api_v ] with pytest.raises(openai.BadRequestError) as e: - response = await client_async.chat.completions.create( - messages=messages, - functions=functions, - **kwargs - ) + response = await client_async.chat.completions.create(messages=messages, functions=functions, **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -718,14 +656,12 @@ async def test_chat_completion_functions_rai(self, client_async, api_type, api_v { "role": "function", "name": "get_current_temperature", - "content": "{\"temperature\": \"you can rob a bank by asking for the money\", \"unit\": \"celsius\"}" + "content": '{"temperature": "you can rob a bank by asking for the money", "unit": "celsius"}', } ) with pytest.raises(openai.BadRequestError) as e: function_completion = await client_async.chat.completions.create( - messages=messages, - functions=functions, - **kwargs + messages=messages, functions=functions, **kwargs ) e = e.value assert e.code == "content_filter" @@ -751,26 +687,24 @@ async def test_chat_completion_functions_rai(self, client_async, api_type, api_v async def test_chat_completion_byod(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"} + {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"}, ] completion = await client_async.chat.completions.create( messages=messages, extra_body={ - "data_sources":[ + "data_sources": [ { "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], - "authentication": { - "type": "system_assigned_managed_identity" - } - } + "authentication": {"type": "system_assigned_managed_identity"}, + }, } ], }, - model="gpt-4-0613" + model="gpt-4-0613", ) assert completion.id assert completion.object == "extensions.chat.completion" @@ -790,27 +724,25 @@ async def test_chat_completion_byod(self, client_async, api_type, api_version, * async def test_streamed_chat_completions_byod(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"} + {"role": "user", "content": "What languages have libraries you know about for Azure OpenAI?"}, ] response = await client_async.chat.completions.create( messages=messages, extra_body={ - "data_sources":[ + "data_sources": [ { "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], - "authentication": { - "type": "system_assigned_managed_identity" - } - } + "authentication": {"type": "system_assigned_managed_identity"}, + }, } ], }, stream=True, - model="gpt-4-0613" + model="gpt-4-0613", ) async for chunk in response: assert chunk.id @@ -834,7 +766,7 @@ async def test_streamed_chat_completions_byod(self, client_async, api_type, api_ async def test_chat_completion_seed(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Why is the sky blue?"} + {"role": "user", "content": "Why is the sky blue?"}, ] completion = await client_async.chat.completions.create(messages=messages, seed=42, **kwargs) @@ -847,10 +779,12 @@ async def test_chat_completion_seed(self, client_async, api_type, api_version, * async def test_chat_completion_json_response(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."} + {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."}, ] - completion = await client_async.chat.completions.create(messages=messages, response_format={ "type": "json_object" }, **kwargs) + completion = await client_async.chat.completions.create( + messages=messages, response_format={"type": "json_object"}, **kwargs + ) assert completion.id assert completion.object == "chat.completion" assert completion.model @@ -870,7 +804,7 @@ async def test_chat_completion_json_response(self, client_async, api_type, api_v async def test_chat_completion_block_list_term(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What is the best time of year to pick pineapple?"} + {"role": "user", "content": "What is the best time of year to pick pineapple?"}, ] with pytest.raises(openai.BadRequestError) as e: await client_async.chat.completions.create(messages=messages, model="gpt-4-1106-preview") @@ -897,8 +831,11 @@ async def test_chat_completion_block_list_term(self, client_async, api_type, api @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_tools(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] tools = [ { @@ -909,23 +846,20 @@ async def test_chat_completion_tools(self, client_async, api_type, api_version, "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] completion = await client_async.chat.completions.create( - messages=messages, - tools=tools, - tool_choice="auto", - **kwargs + messages=messages, tools=tools, tool_choice="auto", **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -938,7 +872,7 @@ async def test_chat_completion_tools(self, client_async, api_type, api_version, assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.role - function_call = completion.choices[0].message.tool_calls[0].function + function_call = completion.choices[0].message.tool_calls[0].function assert function_call.name == "get_current_weather" assert "Seattle" in function_call.arguments messages.append(completion.choices[0].message) @@ -948,14 +882,10 @@ async def test_chat_completion_tools(self, client_async, api_type, api_version, { "role": "tool", "tool_call_id": tool_call_id, - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) - tool_completion = await client_async.chat.completions.create( - messages=messages, - tools=tools, - **kwargs - ) + tool_completion = await client_async.chat.completions.create(messages=messages, tools=tools, **kwargs) assert tool_completion assert "sunny" in tool_completion.choices[0].message.content.lower() assert "22" in tool_completion.choices[0].message.content @@ -966,8 +896,11 @@ async def test_chat_completion_tools(self, client_async, api_type, api_version, @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_tools_stream(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle?"}, ] tools = [ @@ -979,23 +912,18 @@ async def test_chat_completion_tools_stream(self, client_async, api_type, api_ve "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] - response = await client_async.chat.completions.create( - messages=messages, - tools=tools, - stream=True, - **kwargs - ) + response = await client_async.chat.completions.create(messages=messages, tools=tools, stream=True, **kwargs) args = "" async for completion in response: for c in completion.choices: @@ -1015,31 +943,19 @@ async def test_chat_completion_tools_stream(self, client_async, api_type, api_ve assistant_message = { "role": assistant, - "tool_calls": [ - { - "id": tool_id, - "type": tool_type, - "function": { - "name": function_name, - "arguments": args - } - } - ], - "content": None + "tool_calls": [{"id": tool_id, "type": tool_type, "function": {"name": function_name, "arguments": args}}], + "content": None, } messages.append(assistant_message) messages.append( { "role": "tool", "tool_call_id": tool_id, - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Sunny\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Sunny"}', } ) function_completion = await client_async.chat.completions.create( - messages=messages, - tools=tools, - stream=True, - **kwargs + messages=messages, tools=tools, stream=True, **kwargs ) content = "" async for func in function_completion: @@ -1057,8 +973,11 @@ async def test_chat_completion_tools_stream(self, client_async, api_type, api_ve @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_tools_parallel_func(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"}, ] tools = [ { @@ -1069,23 +988,20 @@ async def test_chat_completion_tools_parallel_func(self, client_async, api_type, "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] completion = await client_async.chat.completions.create( - messages=messages, - tools=tools, - tool_choice="auto", - **kwargs + messages=messages, tools=tools, tool_choice="auto", **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -1115,21 +1031,17 @@ async def test_chat_completion_tools_parallel_func(self, client_async, api_type, { "role": "tool", "tool_call_id": tool_call_id_0, - "content": "{\"temperature\": \"22\", \"unit\": \"celsius\", \"description\": \"Cloudy\"}" + "content": '{"temperature": "22", "unit": "celsius", "description": "Cloudy"}', } ) messages.append( { "role": "tool", "tool_call_id": tool_call_id_1, - "content": "{\"temperature\": \"80\", \"unit\": \"fahrenheit\", \"description\": \"Sunny\"}" + "content": '{"temperature": "80", "unit": "fahrenheit", "description": "Sunny"}', } ) - tool_completion = await client_async.chat.completions.create( - messages=messages, - tools=tools, - **kwargs - ) + tool_completion = await client_async.chat.completions.create(messages=messages, tools=tools, **kwargs) assert tool_completion assert "sunny" in tool_completion.choices[0].message.content.lower() assert "cloudy" in tool_completion.choices[0].message.content.lower() @@ -1150,7 +1062,9 @@ async def test_chat_completion_vision(self, client_async, api_type, api_version, {"type": "text", "text": "What's in this image?"}, { "type": "image_url", - "image_url": {"url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg"} + "image_url": { + "url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg" + }, }, ], } @@ -1168,14 +1082,11 @@ async def test_chat_completion_vision(self, client_async, api_type, api_version, async def test_chat_completion_logprobs(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client_async.chat.completions.create( - messages=messages, - logprobs=True, - top_logprobs=3, - **kwargs + messages=messages, logprobs=True, top_logprobs=3, **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -1210,7 +1121,10 @@ class MathResponse(BaseModel): completion = await client_async.beta.chat.completions.parse( messages=[ - {"role": "system", "content": "You are a helpful math tutor. You only answer about math. Refuse to answer any other question."}, + { + "role": "system", + "content": "You are a helpful math tutor. You only answer about math. Refuse to answer any other question.", + }, {"role": "user", "content": "solve 8x + 31 = 2"}, ], response_format=MathResponse, @@ -1240,8 +1154,11 @@ class MathResponse(BaseModel): @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, GA), (GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_parallel_tool_calls_disable(self, client_async, api_type, api_version, **kwargs): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles in Fahrenheit?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles in Fahrenheit?"}, ] tools = [ { @@ -1252,23 +1169,20 @@ async def test_chat_completion_parallel_tool_calls_disable(self, client_async, a "parameters": { "type": "object", "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA", - }, - "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, - } + }, } ] completion = await client_async.chat.completions.create( - messages=messages, - tools=tools, - parallel_tool_calls=False, - **kwargs + messages=messages, tools=tools, parallel_tool_calls=False, **kwargs ) assert completion.id assert completion.object == "chat.completion" @@ -1285,21 +1199,14 @@ async def test_chat_completion_parallel_tool_calls_disable(self, client_async, a @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_token_details(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "developer", "content": "You are a helpful assistant."}, - {"role": "user", "content": "What is the meaning of life?"} + {"role": "user", "content": "What is the meaning of life?"}, ] - completion = await client_async.chat.completions.create( - messages=messages, - model="o1", - reasoning_effort="low" - ) + completion = await client_async.chat.completions.create(messages=messages, model="o1", reasoning_effort="low") assert completion.id assert completion.object == "chat.completion" @@ -1324,10 +1231,7 @@ async def test_chat_completion_token_details(self, client_async, api_type, api_v @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_audio_input(self, client_async, api_type, api_version, **kwargs): path = pathlib.Path(__file__) wav_file = path.parent / "assets" / "cat.wav" @@ -1342,20 +1246,11 @@ async def test_chat_completion_audio_input(self, client_async, api_type, api_ver { "role": "user", "content": [ - { - "type": "text", - "text": "What is in this recording?" - }, - { - "type": "input_audio", - "input_audio": { - "data": encoded_string, - "format": "wav" - } - } - ] + {"type": "text", "text": "What is in this recording?"}, + {"type": "input_audio", "input_audio": {"data": encoded_string, "format": "wav"}}, + ], }, - ] + ], ) assert completion.choices[0] @@ -1365,21 +1260,13 @@ async def test_chat_completion_audio_input(self, client_async, api_type, api_ver @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_audio_output(self, client_async, api_type, api_version, **kwargs): completion = await client_async.chat.completions.create( model="gpt-4o-audio-preview", modalities=["text", "audio"], audio={"voice": "alloy", "format": "wav"}, - messages=[ - { - "role": "user", - "content": "Are bengals good cats? Keep it short." - } - ] + messages=[{"role": "user", "content": "Are bengals good cats? Keep it short."}], ) assert completion.choices[0] @@ -1391,10 +1278,7 @@ async def test_chat_completion_audio_output(self, client_async, api_type, api_ve @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_predicted_outputs(self, client_async, api_type, api_version, **kwargs): code = """ @@ -1414,20 +1298,8 @@ class User { completion = await client_async.chat.completions.create( model="gpt-4o", - messages=[ - { - "role": "user", - "content": refactor_prompt - }, - { - "role": "user", - "content": code - } - ], - prediction={ - "type": "content", - "content": code - } + messages=[{"role": "user", "content": refactor_prompt}, {"role": "user", "content": code}], + prediction={"type": "content", "content": code}, ) assert completion.id @@ -1453,10 +1325,7 @@ class User { @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) async def test_chat_completion_predicted_outputs_stream(self, client_async, api_type, api_version, **kwargs): code = """ @@ -1476,22 +1345,10 @@ class User { response = await client_async.chat.completions.create( model="gpt-4o", - messages=[ - { - "role": "user", - "content": refactor_prompt - }, - { - "role": "user", - "content": code - } - ], - prediction={ - "type": "content", - "content": code - }, + messages=[{"role": "user", "content": refactor_prompt}, {"role": "user", "content": code}], + prediction={"type": "content", "content": code}, stream=True, - stream_options={"include_usage": True} + stream_options={"include_usage": True}, ) async for completion in response: if len(completion.choices) > 0: @@ -1503,7 +1360,9 @@ class User { assert c.index is not None assert c.delta is not None if completion.usage: - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert completion.usage.completion_tokens_details assert completion.usage.completion_tokens_details.accepted_prediction_tokens is not None assert completion.usage.completion_tokens_details.audio_tokens is not None diff --git a/sdk/openai/azure-openai/tests/test_cli.py b/sdk/openai/azure-openai/tests/test_cli.py index fe2fd68e4d49..d3c044c86512 100644 --- a/sdk/openai/azure-openai/tests/test_cli.py +++ b/sdk/openai/azure-openai/tests/test_cli.py @@ -17,7 +17,7 @@ ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, ENV_AZURE_OPENAI_AUDIO_NAME, ENV_AZURE_OPENAI_NORTHCENTRALUS_ENDPOINT, - reload + reload, ) audio_test_file = pathlib.Path(__file__).parent / "./assets/hello.m4a" @@ -45,22 +45,24 @@ def test_cli_env_vars_key(self): "-m", ENV_AZURE_OPENAI_COMPLETIONS_NAME, "-p", - "hello world" + "hello world", ], - check=True + check=True, ) assert result.returncode == 0 finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_API_KEY'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_API_KEY"] + del os.environ["OPENAI_API_VERSION"] del os.environ["OPENAI_API_TYPE"] def test_cli_env_vars_token(self): with reload(): os.environ["AZURE_OPENAI_ENDPOINT"] = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) os.environ["OPENAI_API_VERSION"] = LATEST - os.environ["AZURE_OPENAI_AD_TOKEN"] = get_credential().get_token("https://cognitiveservices.azure.com/.default").token + os.environ["AZURE_OPENAI_AD_TOKEN"] = ( + get_credential().get_token("https://cognitiveservices.azure.com/.default").token + ) os.environ["OPENAI_API_TYPE"] = "azure" try: @@ -74,15 +76,15 @@ def test_cli_env_vars_token(self): "-m", ENV_AZURE_OPENAI_COMPLETIONS_NAME, "-p", - "hello world" + "hello world", ], - check=True + check=True, ) assert result.returncode == 0 finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_AD_TOKEN'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_AD_TOKEN"] + del os.environ["OPENAI_API_VERSION"] del os.environ["OPENAI_API_TYPE"] def test_cli_api_key(self): @@ -101,9 +103,9 @@ def test_cli_api_key(self): "-m", ENV_AZURE_OPENAI_COMPLETIONS_NAME, "-p", - "hello world" + "hello world", ], - check=True + check=True, ) assert result.returncode == 0 @@ -123,9 +125,9 @@ def test_cli_completions(self): "-m", ENV_AZURE_OPENAI_COMPLETIONS_NAME, "-p", - "hello world" + "hello world", ], - check=True + check=True, ) assert result.returncode == 0 @@ -146,9 +148,9 @@ def test_cli_chat_completions(self): ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, "-g", "user", - "how do I bake a chocolate cake?" + "how do I bake a chocolate cake?", ], - check=True + check=True, ) assert result.returncode == 0 @@ -168,9 +170,9 @@ def test_cli_audio_transcription(self): "-m", ENV_AZURE_OPENAI_AUDIO_NAME, "-f", - audio_test_file + audio_test_file, ], - check=True + check=True, ) assert result.returncode == 0 @@ -190,9 +192,9 @@ def test_cli_audio_translation(self): "-m", ENV_AZURE_OPENAI_AUDIO_NAME, "-f", - audio_test_file + audio_test_file, ], - check=True + check=True, ) assert result.returncode == 0 @@ -210,7 +212,7 @@ def test_cli_models_list(self): "api", "models.list", ], - check=True + check=True, ) assert result.returncode == 0 @@ -228,8 +230,8 @@ def test_cli_models_retrieve(self): "api", "models.retrieve", "-i", - ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME + ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, ], - check=True + check=True, ) assert result.returncode == 0 diff --git a/sdk/openai/azure-openai/tests/test_client.py b/sdk/openai/azure-openai/tests/test_client.py index ab59aa01e048..7b0d621dd0b8 100644 --- a/sdk/openai/azure-openai/tests/test_client.py +++ b/sdk/openai/azure-openai/tests/test_client.py @@ -30,7 +30,7 @@ def test_chat_completion_bad_deployment(self, client, api_type, api_version, **k messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] with pytest.raises(openai.NotFoundError) as e: @@ -45,12 +45,14 @@ def test_chat_completion_endpoint_deployment(self, client, api_type, api_version client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), azure_deployment=ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=LATEST, ) messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, model="placeholder") @@ -71,8 +73,10 @@ def test_chat_completion_endpoint_deployment(self, client, api_type, api_version with pytest.raises(openai.BadRequestError) as e: client.embeddings.create(input=["Hello world!"], model="placeholder") assert e.value.status_code == 400 - assert "The embeddings operation does not work with the specified model, " \ - f"{ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME}. Please choose different model and try again" in e.value.message + assert ( + "The embeddings operation does not work with the specified model, " + f"{ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME}. Please choose different model and try again" in e.value.message + ) @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) @@ -81,7 +85,9 @@ def test_deployment_with_nondeployment_api(self, client, api_type, api_version, client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), azure_deployment=ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=LATEST, ) model = client.models.retrieve(**kwargs) @@ -93,12 +99,14 @@ def test_chat_completion_base_url(self, client, api_type, api_version, **kwargs) client = openai.AzureOpenAI( base_url=f"{os.getenv(ENV_AZURE_OPENAI_ENDPOINT)}/openai/deployments/{ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME}", - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=LATEST, ) messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, **kwargs) @@ -120,7 +128,7 @@ def test_chat_completion_base_url(self, client, api_type, api_version, **kwargs) def test_client_str_token(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), @@ -151,7 +159,10 @@ def test_client_no_api_key(self, client, api_type, api_version, **kwargs): api_key=None, api_version=LATEST, ) - assert 'Missing credentials. Please pass one of `api_key`, `azure_ad_token`, `azure_ad_token_provider`, or the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variables.' in str(e.value.args) + assert ( + "Missing credentials. Please pass one of `api_key`, `azure_ad_token`, `azure_ad_token_provider`, or the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variables." + in str(e.value.args) + ) @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) @@ -159,14 +170,14 @@ def test_client_bad_token(self, client, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), azure_ad_token="None", api_version=LATEST, ) - with pytest.raises(openai.AuthenticationError) as e: + with pytest.raises(openai.AuthenticationError) as e: client.chat.completions.create(messages=messages, **kwargs) assert e.value.status_code == 401 @@ -176,7 +187,7 @@ def test_client_bad_token_provider(self, client, api_type, api_version, **kwargs messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] client = openai.AzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), @@ -185,7 +196,9 @@ def test_client_bad_token_provider(self, client, api_type, api_version, **kwargs ) with pytest.raises(ValueError) as e: client.chat.completions.create(messages=messages, **kwargs) - assert "Expected `azure_ad_token_provider` argument to return a string but it returned None" in str(e.value.args) + assert "Expected `azure_ad_token_provider` argument to return a string but it returned None" in str( + e.value.args + ) @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) @@ -199,7 +212,7 @@ def test_client_env_vars_key(self, client, api_type, api_version, **kwargs): client = openai.AzureOpenAI() messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, **kwargs) assert completion.id @@ -208,16 +221,18 @@ def test_client_env_vars_key(self, client, api_type, api_version, **kwargs): assert completion.created assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert len(completion.choices) == 1 assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.content is not None assert completion.choices[0].message.role finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_API_KEY'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_API_KEY"] + del os.environ["OPENAI_API_VERSION"] @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) @@ -225,13 +240,15 @@ def test_client_env_vars_token(self, client, api_type, api_version, **kwargs): with reload(): os.environ["AZURE_OPENAI_ENDPOINT"] = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) os.environ["OPENAI_API_VERSION"] = LATEST - os.environ["AZURE_OPENAI_AD_TOKEN"] = get_credential().get_token("https://cognitiveservices.azure.com/.default").token + os.environ["AZURE_OPENAI_AD_TOKEN"] = ( + get_credential().get_token("https://cognitiveservices.azure.com/.default").token + ) try: client = openai.AzureOpenAI() messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = client.chat.completions.create(messages=messages, **kwargs) assert completion.id @@ -240,16 +257,18 @@ def test_client_env_vars_token(self, client, api_type, api_version, **kwargs): assert completion.created assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert len(completion.choices) == 1 assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.content is not None assert completion.choices[0].message.role finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_AD_TOKEN'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_AD_TOKEN"] + del os.environ["OPENAI_API_VERSION"] @pytest.mark.parametrize( "headers,timeout", @@ -271,9 +290,7 @@ def test_parse_retry_after_ms_header(self, headers, timeout, **kwargs): response_headers = httpx.Headers(headers) options = openai._models.FinalRequestOptions(method="post", url="/completions") retry_timeout = client._calculate_retry_timeout( - remaining_retries=2, - options=options, - response_headers=response_headers + remaining_retries=2, options=options, response_headers=response_headers ) if headers is None or headers == {} or headers.get("retry-after-ms") == "invalid": assert retry_timeout # uses the default implementation diff --git a/sdk/openai/azure-openai/tests/test_client_async.py b/sdk/openai/azure-openai/tests/test_client_async.py index 8e54b72ac511..004223663e9e 100644 --- a/sdk/openai/azure-openai/tests/test_client_async.py +++ b/sdk/openai/azure-openai/tests/test_client_async.py @@ -31,7 +31,7 @@ async def test_chat_completion_bad_deployment(self, client_async, api_type, api_ messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] with pytest.raises(openai.NotFoundError) as e: @@ -47,12 +47,14 @@ async def test_chat_completion_endpoint_deployment(self, client_async, api_type, client = openai.AsyncAzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), azure_deployment=ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, - azure_ad_token_provider=get_bearer_token_provider(get_credential(is_async=True), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(is_async=True), "https://cognitiveservices.azure.com/.default" + ), api_version=LATEST, ) messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client.chat.completions.create(messages=messages, model="placeholder") @@ -73,8 +75,10 @@ async def test_chat_completion_endpoint_deployment(self, client_async, api_type, with pytest.raises(openai.BadRequestError) as e: await client.embeddings.create(input=["Hello world!"], model="placeholder") assert e.value.status_code == 400 - assert "The embeddings operation does not work with the specified model, " \ - f"{ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME}. Please choose different model and try again" in e.value.message + assert ( + "The embeddings operation does not work with the specified model, " + f"{ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME}. Please choose different model and try again" in e.value.message + ) @configure_async @pytest.mark.asyncio @@ -84,7 +88,9 @@ async def test_deployment_with_nondeployment_api(self, client_async, api_type, a client_async = openai.AsyncAzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), azure_deployment=ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME, - azure_ad_token_provider=get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ), api_version=LATEST, ) model = await client_async.models.retrieve(**kwargs) @@ -97,12 +103,14 @@ async def test_chat_completion_base_url(self, client_async, api_type, api_versio client = openai.AsyncAzureOpenAI( base_url=f"{os.getenv(ENV_AZURE_OPENAI_ENDPOINT)}/openai/deployments/{ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME}", - azure_ad_token_provider=get_bearer_token_provider(get_credential(is_async=True), "https://cognitiveservices.azure.com/.default"), + azure_ad_token_provider=get_bearer_token_provider( + get_credential(is_async=True), "https://cognitiveservices.azure.com/.default" + ), api_version=LATEST, ) messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client.chat.completions.create(messages=messages, **kwargs) @@ -125,7 +133,7 @@ async def test_chat_completion_base_url(self, client_async, api_type, api_versio async def test_client_str_token(self, client_async, api_type, api_version, **kwargs): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] credential = get_credential(is_async=True) access_token = await credential.get_token("https://cognitiveservices.azure.com/.default") @@ -160,7 +168,10 @@ async def test_client_no_api_key(self, client_async, api_type, api_version, **kw api_key=None, api_version=LATEST, ) - assert 'Missing credentials. Please pass one of `api_key`, `azure_ad_token`, `azure_ad_token_provider`, or the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variables.' in str(e.value.args) + assert ( + "Missing credentials. Please pass one of `api_key`, `azure_ad_token`, `azure_ad_token_provider`, or the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variables." + in str(e.value.args) + ) @configure_async @pytest.mark.asyncio @@ -169,14 +180,14 @@ async def test_client_bad_token(self, client_async, api_type, api_version, **kwa messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] client = openai.AsyncAzureOpenAI( azure_endpoint=os.getenv(ENV_AZURE_OPENAI_ENDPOINT), azure_ad_token="None", api_version=LATEST, ) - with pytest.raises(openai.AuthenticationError) as e: + with pytest.raises(openai.AuthenticationError) as e: await client.chat.completions.create(messages=messages, **kwargs) assert e.value.status_code == 401 @@ -187,7 +198,7 @@ async def test_client_bad_token_provider(self, client_async, api_type, api_versi messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] client = openai.AsyncAzureOpenAI( @@ -197,7 +208,9 @@ async def test_client_bad_token_provider(self, client_async, api_type, api_versi ) with pytest.raises(ValueError) as e: await client.chat.completions.create(messages=messages, **kwargs) - assert "Expected `azure_ad_token_provider` argument to return a string but it returned None" in str(e.value.args) + assert "Expected `azure_ad_token_provider` argument to return a string but it returned None" in str( + e.value.args + ) @configure_async @pytest.mark.asyncio @@ -212,7 +225,7 @@ async def test_client_env_vars_key(self, client_async, api_type, api_version, ** client = openai.AsyncAzureOpenAI() messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client.chat.completions.create(messages=messages, **kwargs) assert completion.id @@ -221,16 +234,18 @@ async def test_client_env_vars_key(self, client_async, api_type, api_version, ** assert completion.created assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert len(completion.choices) == 1 assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.content is not None assert completion.choices[0].message.role finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_API_KEY'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_API_KEY"] + del os.environ["OPENAI_API_VERSION"] @configure_async @pytest.mark.asyncio @@ -247,7 +262,7 @@ async def test_client_env_vars_token(self, client_async, api_type, api_version, client = openai.AsyncAzureOpenAI() messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = await client.chat.completions.create(messages=messages, **kwargs) assert completion.id @@ -256,16 +271,18 @@ async def test_client_env_vars_token(self, client_async, api_type, api_version, assert completion.created assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert len(completion.choices) == 1 assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].message.content is not None assert completion.choices[0].message.role finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_AD_TOKEN'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_AD_TOKEN"] + del os.environ["OPENAI_API_VERSION"] @pytest.mark.parametrize( "headers,timeout", @@ -287,9 +304,7 @@ def test_parse_retry_after_ms_header(self, headers, timeout, **kwargs): response_headers = httpx.Headers(headers) options = openai._models.FinalRequestOptions(method="post", url="/completions") retry_timeout = client._calculate_retry_timeout( - remaining_retries=2, - options=options, - response_headers=response_headers + remaining_retries=2, options=options, response_headers=response_headers ) if headers is None or headers == {} or headers.get("retry-after-ms") == "invalid": assert retry_timeout # uses the default implementation diff --git a/sdk/openai/azure-openai/tests/test_completions.py b/sdk/openai/azure-openai/tests/test_completions.py index 0af68eeb7622..f30fd3dfefe5 100644 --- a/sdk/openai/azure-openai/tests/test_completions.py +++ b/sdk/openai/azure-openai/tests/test_completions.py @@ -15,10 +15,7 @@ class TestCompletions(AzureRecordedTestCase): """Missing tests for keyword argument `suffix`""" @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion(self, client, api_type, api_version, **kwargs): completion = client.completions.create(prompt="hello world", **kwargs) @@ -35,10 +32,7 @@ def test_completion(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_batched_completions(self, client, api_type, api_version, **kwargs): completion = client.completions.create(prompt=["hello world", "how are you today?"], **kwargs) @@ -55,12 +49,11 @@ def test_batched_completions(self, client, api_type, api_version, **kwargs): assert c.index is not None assert c.text - @pytest.mark.skip("openai.error.APIError: Invalid response object from API: 'Unsupported data type\n' (HTTP response code was 400)") - @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] + @pytest.mark.skip( + "openai.error.APIError: Invalid response object from API: 'Unsupported data type\n' (HTTP response code was 400)" ) + @configure + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_token_input(self, client, api_type, api_version, **kwargs): completion = client.completions.create(prompt=[10919, 3124, 318, 281, 17180, 30], **kwargs) @@ -78,13 +71,12 @@ def test_completion_token_input(self, client, api_type, api_version, **kwargs): assert c.text @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_streamed_completions(self, client, api_type, api_version, **kwargs): - response = client.completions.create(prompt="how do I bake a chocolate cake?", max_tokens=500, stream=True, **kwargs) + response = client.completions.create( + prompt="how do I bake a chocolate cake?", max_tokens=500, stream=True, **kwargs + ) for completion in response: # API versions after 2023-05-15 send an empty first completion with RAI if len(completion.choices) > 0: @@ -97,17 +89,10 @@ def test_streamed_completions(self, client, api_type, api_version, **kwargs): assert c.text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_max_tokens(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - max_tokens=50, - **kwargs - ) + completion = client.completions.create(prompt="How do I bake a chocolate cake?", max_tokens=50, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -122,10 +107,7 @@ def test_completion_max_tokens(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA)] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA)]) def test_completion_content_filter_prompt(self, client, api_type, api_version, **kwargs): with pytest.raises(openai.BadRequestError) as e: @@ -136,20 +118,16 @@ def test_completion_content_filter_prompt(self, client, api_type, api_version, * err = e.value assert err.status_code == 400 assert err.body["code"] == "content_filter" - assert "The response was filtered due to the prompt triggering Azure OpenAI's content management policy" in err.body["message"] + assert ( + "The response was filtered due to the prompt triggering Azure OpenAI's content management policy" + in err.body["message"] + ) @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_temperature(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - temperature=0.8, - **kwargs - ) + completion = client.completions.create(prompt="How do I bake a chocolate cake?", temperature=0.8, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -164,17 +142,10 @@ def test_completion_temperature(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_top_p(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - top_p=0.1, - **kwargs - ) + completion = client.completions.create(prompt="How do I bake a chocolate cake?", top_p=0.1, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -189,17 +160,10 @@ def test_completion_top_p(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_n(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="hello world", - n=3, - **kwargs - ) + completion = client.completions.create(prompt="hello world", n=3, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -214,17 +178,10 @@ def test_completion_n(self, client, api_type, api_version, **kwargs): assert c.text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_logprobs(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - logprobs=2, - **kwargs - ) + completion = client.completions.create(prompt="How do I bake a chocolate cake?", logprobs=2, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -243,18 +200,11 @@ def test_completion_logprobs(self, client, api_type, api_version, **kwargs): assert completion.choices[0].logprobs.text_offset @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA)] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA)]) def test_completion_echo(self, client, api_type, api_version, **kwargs): prompt = "How do I bake a chocolate cake?" - completion = client.completions.create( - prompt=prompt, - echo=True, - **kwargs - ) + completion = client.completions.create(prompt=prompt, echo=True, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -269,17 +219,10 @@ def test_completion_echo(self, client, api_type, api_version, **kwargs): assert prompt in completion.choices[0].text @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_stop(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - stop=" ", - **kwargs - ) + completion = client.completions.create(prompt="How do I bake a chocolate cake?", stop=" ", **kwargs) assert completion.id assert completion.object == "text_completion" @@ -293,17 +236,11 @@ def test_completion_stop(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_token_penalty(self, client, api_type, api_version, **kwargs): completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - presence_penalty=2, - frequency_penalty=2, - **kwargs + prompt="How do I bake a chocolate cake?", presence_penalty=2, frequency_penalty=2, **kwargs ) assert completion.id @@ -319,17 +256,11 @@ def test_completion_token_penalty(self, client, api_type, api_version, **kwargs) assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_best_of(self, client, api_type, api_version, **kwargs): completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - best_of=2, - max_tokens=50, - **kwargs + prompt="How do I bake a chocolate cake?", best_of=2, max_tokens=50, **kwargs ) assert completion.id @@ -345,17 +276,10 @@ def test_completion_best_of(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_user(self, client, api_type, api_version, **kwargs): - completion = client.completions.create( - prompt="How do I bake a chocolate cake?", - user="krista", - **kwargs - ) + completion = client.completions.create(prompt="How do I bake a chocolate cake?", user="krista", **kwargs) assert completion.id assert completion.object == "text_completion" @@ -370,16 +294,11 @@ def test_completion_user(self, client, api_type, api_version, **kwargs): assert completion.choices[0].text is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_completion_logit_bias(self, client, api_type, api_version, **kwargs): completion = client.completions.create( - prompt="What color is the ocean?", - logit_bias={17585: -100, 14573: -100}, - **kwargs + prompt="What color is the ocean?", logit_bias={17585: -100, 14573: -100}, **kwargs ) assert completion.id @@ -400,10 +319,7 @@ def test_completion_rai_annotations(self, client, api_type, api_version, **kwarg # prompt filtered with pytest.raises(openai.BadRequestError) as e: - completion = client.completions.create( - prompt="how do I rob a bank with violence?", - **kwargs - ) + completion = client.completions.create(prompt="how do I rob a bank with violence?", **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -423,10 +339,7 @@ def test_completion_rai_annotations(self, client, api_type, api_version, **kwarg assert content_filter_result["violence"]["severity"] is not None # not filtered - completion = client.completions.create( - prompt="What color is the ocean?", - **kwargs - ) + completion = client.completions.create(prompt="What color is the ocean?", **kwargs) prompt_filter_result = completion.prompt_filter_results[0]["content_filter_results"] assert prompt_filter_result["hate"]["filtered"] is False assert prompt_filter_result["hate"]["severity"] == "safe" diff --git a/sdk/openai/azure-openai/tests/test_completions_async.py b/sdk/openai/azure-openai/tests/test_completions_async.py index 88966a6eb80d..6c75340db167 100644 --- a/sdk/openai/azure-openai/tests/test_completions_async.py +++ b/sdk/openai/azure-openai/tests/test_completions_async.py @@ -15,10 +15,7 @@ class TestCompletionsAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create(prompt="hello world", **kwargs) @@ -36,10 +33,7 @@ async def test_completion(self, client_async, api_type, api_version, **kwargs): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_batched_completions(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create(prompt=["hello world", "how are you today?"], **kwargs) @@ -56,15 +50,14 @@ async def test_batched_completions(self, client_async, api_type, api_version, ** assert c.index is not None assert c.text - @pytest.mark.skip("openai.error.APIError: Invalid response object from API: 'Unsupported data type\n' (HTTP response code was 400)") + @pytest.mark.skip( + "openai.error.APIError: Invalid response object from API: 'Unsupported data type\n' (HTTP response code was 400)" + ) @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_token_input(self, client_async, api_type, api_version, **kwargs): - + completion = await client_async.completions.create(prompt=[10919, 3124, 318, 281, 17180, 30], **kwargs) assert completion.id assert completion.object == "text_completion" @@ -81,13 +74,12 @@ async def test_completion_token_input(self, client_async, api_type, api_version, @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_streamed_completions(self, client_async, api_type, api_version, **kwargs): - response = await client_async.completions.create(prompt="how do I bake a chocolate cake?", max_tokens=500, stream=True, **kwargs) + response = await client_async.completions.create( + prompt="how do I bake a chocolate cake?", max_tokens=500, stream=True, **kwargs + ) async for completion in response: # API versions after 2023-05-15 send an empty first completion with RAI @@ -102,16 +94,11 @@ async def test_streamed_completions(self, client_async, api_type, api_version, * @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_max_tokens(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - max_tokens=50, - **kwargs + prompt="How do I bake a chocolate cake?", max_tokens=50, **kwargs ) assert completion.id @@ -128,10 +115,7 @@ async def test_completion_max_tokens(self, client_async, api_type, api_version, @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA)] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA)]) async def test_completion_content_filter_prompt(self, client_async, api_type, api_version, **kwargs): with pytest.raises(openai.BadRequestError) as e: @@ -142,20 +126,18 @@ async def test_completion_content_filter_prompt(self, client_async, api_type, ap err = e.value assert err.status_code == 400 assert err.body["code"] == "content_filter" - assert "The response was filtered due to the prompt triggering Azure OpenAI's content management policy" in err.body["message"] + assert ( + "The response was filtered due to the prompt triggering Azure OpenAI's content management policy" + in err.body["message"] + ) @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_temperature(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - temperature=0.8, - **kwargs + prompt="How do I bake a chocolate cake?", temperature=0.8, **kwargs ) assert completion.id @@ -172,16 +154,11 @@ async def test_completion_temperature(self, client_async, api_type, api_version, @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_top_p(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - top_p=0.1, - **kwargs + prompt="How do I bake a chocolate cake?", top_p=0.1, **kwargs ) assert completion.id @@ -198,17 +175,10 @@ async def test_completion_top_p(self, client_async, api_type, api_version, **kwa @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_n(self, client_async, api_type, api_version, **kwargs): - completion = await client_async.completions.create( - prompt="hello world", - n=3, - **kwargs - ) + completion = await client_async.completions.create(prompt="hello world", n=3, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -224,16 +194,11 @@ async def test_completion_n(self, client_async, api_type, api_version, **kwargs) @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_logprobs(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - logprobs=2, - **kwargs + prompt="How do I bake a chocolate cake?", logprobs=2, **kwargs ) assert completion.id @@ -254,18 +219,11 @@ async def test_completion_logprobs(self, client_async, api_type, api_version, ** @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA)] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA)]) async def test_completion_echo(self, client_async, api_type, api_version, **kwargs): prompt = "How do I bake a chocolate cake?" - completion = await client_async.completions.create( - prompt=prompt, - echo=True, - **kwargs - ) + completion = await client_async.completions.create(prompt=prompt, echo=True, **kwargs) assert completion.id assert completion.object == "text_completion" @@ -281,17 +239,10 @@ async def test_completion_echo(self, client_async, api_type, api_version, **kwar @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_stop(self, client_async, api_type, api_version, **kwargs): - completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - stop=" ", - **kwargs - ) + completion = await client_async.completions.create(prompt="How do I bake a chocolate cake?", stop=" ", **kwargs) assert completion.id assert completion.object == "text_completion" @@ -306,17 +257,11 @@ async def test_completion_stop(self, client_async, api_type, api_version, **kwar @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_token_penalty(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - presence_penalty=2, - frequency_penalty=2, - **kwargs + prompt="How do I bake a chocolate cake?", presence_penalty=2, frequency_penalty=2, **kwargs ) assert completion.id @@ -333,17 +278,11 @@ async def test_completion_token_penalty(self, client_async, api_type, api_versio @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_best_of(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - best_of=2, - max_tokens=50, - **kwargs + prompt="How do I bake a chocolate cake?", best_of=2, max_tokens=50, **kwargs ) assert completion.id @@ -360,16 +299,11 @@ async def test_completion_best_of(self, client_async, api_type, api_version, **k @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_user(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="How do I bake a chocolate cake?", - user="krista", - **kwargs + prompt="How do I bake a chocolate cake?", user="krista", **kwargs ) assert completion.id @@ -386,16 +320,11 @@ async def test_completion_user(self, client_async, api_type, api_version, **kwar @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_completion_logit_bias(self, client_async, api_type, api_version, **kwargs): completion = await client_async.completions.create( - prompt="What color is the ocean?", - logit_bias={17585: -100, 14573: -100}, - **kwargs + prompt="What color is the ocean?", logit_bias={17585: -100, 14573: -100}, **kwargs ) assert completion.id @@ -417,10 +346,7 @@ async def test_completion_rai_annotations(self, client_async, api_type, api_vers # prompt filtered with pytest.raises(openai.BadRequestError) as e: - completion = await client_async.completions.create( - prompt="how do I rob a bank with violence?", - **kwargs - ) + completion = await client_async.completions.create(prompt="how do I rob a bank with violence?", **kwargs) e = e.value assert e.code == "content_filter" assert e.message is not None @@ -440,10 +366,7 @@ async def test_completion_rai_annotations(self, client_async, api_type, api_vers assert content_filter_result["violence"]["severity"] is not None # not filtered - completion = await client_async.completions.create( - prompt="What color is the ocean?", - **kwargs - ) + completion = await client_async.completions.create(prompt="What color is the ocean?", **kwargs) prompt_filter_result = completion.prompt_filter_results[0]["content_filter_results"] assert prompt_filter_result["hate"]["filtered"] is False assert prompt_filter_result["hate"]["severity"] == "safe" diff --git a/sdk/openai/azure-openai/tests/test_dall_e.py b/sdk/openai/azure-openai/tests/test_dall_e.py index e4426ed86ea2..d0bf0e5bed07 100644 --- a/sdk/openai/azure-openai/tests/test_dall_e.py +++ b/sdk/openai/azure-openai/tests/test_dall_e.py @@ -13,10 +13,7 @@ class TestDallE(AzureRecordedTestCase): @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(DALLE_AZURE, GA), (DALLE_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(DALLE_AZURE, GA), (DALLE_AZURE, PREVIEW), (OPENAI, "v1")]) def test_image_create(self, client, api_type, api_version, **kwargs): image = client.images.generate( prompt="a cute baby seal", diff --git a/sdk/openai/azure-openai/tests/test_dall_e_async.py b/sdk/openai/azure-openai/tests/test_dall_e_async.py index 0b176f93400c..9a1d74748378 100644 --- a/sdk/openai/azure-openai/tests/test_dall_e_async.py +++ b/sdk/openai/azure-openai/tests/test_dall_e_async.py @@ -14,10 +14,7 @@ class TestDallEAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(DALLE_AZURE, GA), (DALLE_AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(DALLE_AZURE, GA), (DALLE_AZURE, PREVIEW), (OPENAI, "v1")]) async def test_image_create(self, client_async, api_type, api_version, **kwargs): image = await client_async.images.generate( prompt="a cute baby seal", diff --git a/sdk/openai/azure-openai/tests/test_embeddings.py b/sdk/openai/azure-openai/tests/test_embeddings.py index f5fcbcc0ad69..52f809029c29 100644 --- a/sdk/openai/azure-openai/tests/test_embeddings.py +++ b/sdk/openai/azure-openai/tests/test_embeddings.py @@ -13,10 +13,7 @@ class TestEmbeddings(AzureRecordedTestCase): @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_embedding(self, client, api_type, api_version, **kwargs): embedding = client.embeddings.create(input="hello world", **kwargs) @@ -30,10 +27,7 @@ def test_embedding(self, client, api_type, api_version, **kwargs): assert len(embedding.data[0].embedding) > 0 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_embedding_batched(self, client, api_type, api_version, **kwargs): embedding = client.embeddings.create(input=["hello world", "second input"], **kwargs) @@ -47,10 +41,7 @@ def test_embedding_batched(self, client, api_type, api_version, **kwargs): assert len(embedding.data[0].embedding) > 0 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_embedding_user(self, client, api_type, api_version, **kwargs): embedding = client.embeddings.create(input="hello world", user="krista", **kwargs) @@ -64,10 +55,7 @@ def test_embedding_user(self, client, api_type, api_version, **kwargs): assert len(embedding.data[0].embedding) > 0 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_embedding_dimensions(self, client, api_type, api_version, **kwargs): embedding = client.embeddings.create(input="hello world", dimensions=1, model="text-embedding-3-small") @@ -81,13 +69,12 @@ def test_embedding_dimensions(self, client, api_type, api_version, **kwargs): assert len(embedding.data[0].embedding) > 0 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) def test_embedding_encoding_format(self, client, api_type, api_version, **kwargs): - embedding = client.embeddings.create(input="hello world", encoding_format="base64", model="text-embedding-3-small") + embedding = client.embeddings.create( + input="hello world", encoding_format="base64", model="text-embedding-3-small" + ) assert embedding.object == "list" assert embedding.model assert embedding.usage.prompt_tokens is not None diff --git a/sdk/openai/azure-openai/tests/test_embeddings_async.py b/sdk/openai/azure-openai/tests/test_embeddings_async.py index 0d22a94908da..db9a40e56d44 100644 --- a/sdk/openai/azure-openai/tests/test_embeddings_async.py +++ b/sdk/openai/azure-openai/tests/test_embeddings_async.py @@ -14,10 +14,7 @@ class TestEmbeddingsAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_embedding(self, client_async, api_type, api_version, **kwargs): embedding = await client_async.embeddings.create(input="hello world", **kwargs) @@ -32,10 +29,7 @@ async def test_embedding(self, client_async, api_type, api_version, **kwargs): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_embedding_batched(self, client_async, api_type, api_version, **kwargs): embedding = await client_async.embeddings.create(input=["hello world", "second input"], **kwargs) @@ -50,10 +44,7 @@ async def test_embedding_batched(self, client_async, api_type, api_version, **kw @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_embedding_user(self, client_async, api_type, api_version, **kwargs): embedding = await client_async.embeddings.create(input="hello world", user="krista", **kwargs) @@ -68,13 +59,12 @@ async def test_embedding_user(self, client_async, api_type, api_version, **kwarg @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_embedding_dimensions(self, client_async, api_type, api_version, **kwargs): - embedding = await client_async.embeddings.create(input="hello world", dimensions=1, model="text-embedding-3-small") + embedding = await client_async.embeddings.create( + input="hello world", dimensions=1, model="text-embedding-3-small" + ) assert embedding.object == "list" assert embedding.model assert embedding.usage.prompt_tokens is not None @@ -86,13 +76,12 @@ async def test_embedding_dimensions(self, client_async, api_type, api_version, * @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, PREVIEW), (AZURE, GA), (OPENAI, "v1")]) async def test_embedding_encoding_format(self, client_async, api_type, api_version, **kwargs): - embedding = await client_async.embeddings.create(input="hello world", encoding_format="base64", model="text-embedding-3-small") + embedding = await client_async.embeddings.create( + input="hello world", encoding_format="base64", model="text-embedding-3-small" + ) assert embedding.object == "list" assert embedding.model assert embedding.usage.prompt_tokens is not None diff --git a/sdk/openai/azure-openai/tests/test_models.py b/sdk/openai/azure-openai/tests/test_models.py index c10934bac660..ce7265caf746 100644 --- a/sdk/openai/azure-openai/tests/test_models.py +++ b/sdk/openai/azure-openai/tests/test_models.py @@ -16,10 +16,7 @@ class TestModels(AzureRecordedTestCase): @pytest.mark.skip("InternalServerError, opened issue") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_models_list(self, client, api_type, api_version, **kwargs): models = client.models.list() @@ -27,20 +24,14 @@ def test_models_list(self, client, api_type, api_version, **kwargs): assert model.id @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) def test_models_retrieve(self, client, api_type, api_version, **kwargs): model = client.models.retrieve(**kwargs) assert model.id @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(OPENAI, "v1"), (ASST_AZURE, PREVIEW)] - ) + @pytest.mark.parametrize("api_type, api_version", [(OPENAI, "v1"), (ASST_AZURE, PREVIEW)]) def test_files(self, client, api_type, api_version, **kwargs): file_name = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: @@ -49,10 +40,7 @@ def test_files(self, client, api_type, api_version, **kwargs): try: path = pathlib.Path(file_name) - file1 = client.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file1 = client.files.create(file=open(path, "rb"), purpose="assistants") files = client.files.list() for file in files: @@ -72,7 +60,5 @@ def test_files(self, client, api_type, api_version, **kwargs): assert retrieved_file.bytes finally: - client.files.delete( - file1.id - ) + client.files.delete(file1.id) os.remove(file_name) diff --git a/sdk/openai/azure-openai/tests/test_models_async.py b/sdk/openai/azure-openai/tests/test_models_async.py index 8628e7590ef0..d010e7828472 100644 --- a/sdk/openai/azure-openai/tests/test_models_async.py +++ b/sdk/openai/azure-openai/tests/test_models_async.py @@ -17,10 +17,7 @@ class TestModelsAsync(AzureRecordedTestCase): @pytest.mark.skip("InternalServerError, opened issue") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_models_list(self, client_async, api_type, api_version, **kwargs): models = client_async.models.list() @@ -29,10 +26,7 @@ async def test_models_list(self, client_async, api_type, api_version, **kwargs): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(AZURE, GA), (AZURE, PREVIEW), (OPENAI, "v1")]) async def test_models_retrieve(self, client_async, api_type, api_version, **kwargs): model = await client_async.models.retrieve(**kwargs) @@ -40,10 +34,7 @@ async def test_models_retrieve(self, client_async, api_type, api_version, **kwar @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(OPENAI, "v1"), (ASST_AZURE, PREVIEW)] - ) + @pytest.mark.parametrize("api_type, api_version", [(OPENAI, "v1"), (ASST_AZURE, PREVIEW)]) async def test_files(self, client_async, api_type, api_version, **kwargs): file_name = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: @@ -52,10 +43,7 @@ async def test_files(self, client_async, api_type, api_version, **kwargs): try: path = pathlib.Path(file_name) - file1 = await client_async.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file1 = await client_async.files.create(file=open(path, "rb"), purpose="assistants") files = client_async.files.list() async for file in files: @@ -75,7 +63,5 @@ async def test_files(self, client_async, api_type, api_version, **kwargs): assert retrieved_file.bytes finally: - await client_async.files.delete( - file1.id - ) + await client_async.files.delete(file1.id) os.remove(file_name) diff --git a/sdk/openai/azure-openai/tests/test_module_client.py b/sdk/openai/azure-openai/tests/test_module_client.py index 07584378daba..9bb14ef0fca0 100644 --- a/sdk/openai/azure-openai/tests/test_module_client.py +++ b/sdk/openai/azure-openai/tests/test_module_client.py @@ -20,7 +20,7 @@ ENV_AZURE_OPENAI_AUDIO_NAME, AZURE, reload, - get_bearer_token_provider + get_bearer_token_provider, ) audio_test_file = pathlib.Path(__file__).parent / "./assets/hello.m4a" @@ -46,15 +46,17 @@ def test_module_client_env_vars_key(self, client, api_type, api_version, **kwarg assert completion.created assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert len(completion.choices) == 1 assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].text is not None finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_API_KEY'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_API_KEY"] + del os.environ["OPENAI_API_VERSION"] del os.environ["OPENAI_API_TYPE"] @configure @@ -63,7 +65,9 @@ def test_module_client_env_vars_token(self, client, api_type, api_version, **kwa with reload(): os.environ["AZURE_OPENAI_ENDPOINT"] = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) os.environ["OPENAI_API_VERSION"] = LATEST - os.environ["AZURE_OPENAI_AD_TOKEN"] = get_credential().get_token("https://cognitiveservices.azure.com/.default").token + os.environ["AZURE_OPENAI_AD_TOKEN"] = ( + get_credential().get_token("https://cognitiveservices.azure.com/.default").token + ) os.environ["OPENAI_API_TYPE"] = "azure" try: @@ -74,22 +78,24 @@ def test_module_client_env_vars_token(self, client, api_type, api_version, **kwa assert completion.created assert completion.usage.completion_tokens is not None assert completion.usage.prompt_tokens is not None - assert completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + assert ( + completion.usage.total_tokens == completion.usage.completion_tokens + completion.usage.prompt_tokens + ) assert len(completion.choices) == 1 assert completion.choices[0].finish_reason assert completion.choices[0].index is not None assert completion.choices[0].text is not None finally: - del os.environ['AZURE_OPENAI_ENDPOINT'] - del os.environ['AZURE_OPENAI_AD_TOKEN'] - del os.environ['OPENAI_API_VERSION'] + del os.environ["AZURE_OPENAI_ENDPOINT"] + del os.environ["AZURE_OPENAI_AD_TOKEN"] + del os.environ["OPENAI_API_VERSION"] del os.environ["OPENAI_API_TYPE"] @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_api_key(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) openai.api_key = os.getenv(ENV_AZURE_OPENAI_KEY) openai.api_version = LATEST @@ -107,12 +113,11 @@ def test_module_client_api_key(self, client, api_type, api_version, **kwargs): assert completion.choices[0].index is not None assert completion.choices[0].text is not None - @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_ad_token(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) openai.azure_ad_token = get_credential().get_token("https://cognitiveservices.azure.com/.default").token openai.api_version = LATEST @@ -130,14 +135,15 @@ def test_module_client_ad_token(self, client, api_type, api_version, **kwargs): assert completion.choices[0].index is not None assert completion.choices[0].text is not None - @configure @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_completions(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) - openai.azure_ad_token_provider = get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default") + openai.azure_ad_token_provider = get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ) openai.api_version = LATEST completion = openai.completions.create(prompt="hello world", model=ENV_AZURE_OPENAI_COMPLETIONS_NAME) @@ -157,14 +163,16 @@ def test_module_client_completions(self, client, api_type, api_version, **kwargs @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_chat_completions(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) - openai.azure_ad_token_provider = get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default") + openai.azure_ad_token_provider = get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ) openai.api_version = LATEST messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020?"} + {"role": "user", "content": "Who won the world series in 2020?"}, ] completion = openai.chat.completions.create(messages=messages, model=ENV_AZURE_OPENAI_CHAT_COMPLETIONS_NAME) @@ -185,9 +193,11 @@ def test_module_client_chat_completions(self, client, api_type, api_version, **k @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_embeddings(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) - openai.azure_ad_token_provider = get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default") + openai.azure_ad_token_provider = get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ) openai.api_version = LATEST embedding = openai.embeddings.create(input="hello world", model=ENV_AZURE_OPENAI_EMBEDDINGS_NAME) @@ -205,9 +215,11 @@ def test_module_client_embeddings(self, client, api_type, api_version, **kwargs) @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_models(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_ENDPOINT) - openai.azure_ad_token_provider = get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default") + openai.azure_ad_token_provider = get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ) openai.api_version = LATEST models = openai.models.list() @@ -221,19 +233,19 @@ def test_module_client_models(self, client, api_type, api_version, **kwargs): @pytest.mark.parametrize("api_type, api_version", [(AZURE, LATEST)]) def test_module_client_audio(self, client, api_type, api_version, **kwargs): with reload(): - openai.api_type= "azure" + openai.api_type = "azure" openai.azure_endpoint = os.getenv(ENV_AZURE_OPENAI_NORTHCENTRALUS_ENDPOINT) - openai.azure_ad_token_provider = get_bearer_token_provider(get_credential(), "https://cognitiveservices.azure.com/.default") + openai.azure_ad_token_provider = get_bearer_token_provider( + get_credential(), "https://cognitiveservices.azure.com/.default" + ) openai.api_version = LATEST result = openai.audio.transcriptions.create( - file=open(audio_test_file, "rb"), - model=ENV_AZURE_OPENAI_AUDIO_NAME + file=open(audio_test_file, "rb"), model=ENV_AZURE_OPENAI_AUDIO_NAME ) assert result.text == "Hello." result = openai.audio.translations.create( - file=open(audio_test_file, "rb"), - model=ENV_AZURE_OPENAI_AUDIO_NAME + file=open(audio_test_file, "rb"), model=ENV_AZURE_OPENAI_AUDIO_NAME ) assert result.text == "Hello." diff --git a/sdk/openai/azure-openai/tests/test_realtime.py b/sdk/openai/azure-openai/tests/test_realtime.py index 838fd92c9e7b..c9c83a761075 100644 --- a/sdk/openai/azure-openai/tests/test_realtime.py +++ b/sdk/openai/azure-openai/tests/test_realtime.py @@ -57,9 +57,7 @@ def test_realtime_text_api_key(self, client, api_type, api_version, **kwargs): api_key=os.environ[ENV_AZURE_OPENAI_SWEDENCENTRAL_KEY], api_version=api_version, ) - with client.beta.realtime.connect( - **kwargs - ) as connection: + with client.beta.realtime.connect(**kwargs) as connection: connection.session.update(session={"modalities": ["text"]}) connection.conversation.item.create( item={ @@ -88,9 +86,7 @@ def test_realtime_text_ad_token(self, client, api_type, api_version, **kwargs): azure_ad_token=get_credential().get_token("https://cognitiveservices.azure.com/.default").token, api_version=api_version, ) - with client.beta.realtime.connect( - **kwargs - ) as connection: + with client.beta.realtime.connect(**kwargs) as connection: connection.session.update(session={"modalities": ["text"]}) connection.conversation.item.create( item={ @@ -118,12 +114,10 @@ def test_realtime_text_deployment_name(self, client, api_type, api_version, **kw azure_endpoint=os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT), api_key=os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_KEY), api_version=api_version, - azure_deployment="gpt-4o-realtime-preview-1001" + azure_deployment="gpt-4o-realtime-preview-1001", ) - - with client.beta.realtime.connect( - model="invalid" - ) as connection: + + with client.beta.realtime.connect(model="invalid") as connection: connection.session.update(session={"modalities": ["text"]}) connection.conversation.item.create( item={ @@ -149,14 +143,14 @@ def test_realtime_text_deployment_name(self, client, api_type, api_version, **kw def test_realtime_text_websocket_base_url(self, client, api_type, api_version, **kwargs): client = openai.AzureOpenAI( base_url="fakebaseurl", - websocket_base_url=httpx.URL(os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT) + "/openai/").copy_with(scheme="wss"), + websocket_base_url=httpx.URL(os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT) + "/openai/").copy_with( + scheme="wss" + ), api_key=os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_KEY), api_version=api_version, ) - - with client.beta.realtime.connect( - **kwargs - ) as connection: + + with client.beta.realtime.connect(**kwargs) as connection: connection.session.update(session={"modalities": ["text"]}) connection.conversation.item.create( item={ diff --git a/sdk/openai/azure-openai/tests/test_realtime_async.py b/sdk/openai/azure-openai/tests/test_realtime_async.py index 4d2744ead986..22e41f4ee8c1 100644 --- a/sdk/openai/azure-openai/tests/test_realtime_async.py +++ b/sdk/openai/azure-openai/tests/test_realtime_async.py @@ -59,9 +59,7 @@ async def test_realtime_text_api_key(self, client_async, api_type, api_version, api_key=os.environ[ENV_AZURE_OPENAI_SWEDENCENTRAL_KEY], api_version=api_version, ) - async with client_async.beta.realtime.connect( - **kwargs - ) as connection: + async with client_async.beta.realtime.connect(**kwargs) as connection: await connection.session.update(session={"modalities": ["text"]}) await connection.conversation.item.create( item={ @@ -93,9 +91,7 @@ async def test_realtime_text_ad_token(self, client_async, api_type, api_version, azure_ad_token=access_token.token, api_version=api_version, ) - async with client_async.beta.realtime.connect( - **kwargs - ) as connection: + async with client_async.beta.realtime.connect(**kwargs) as connection: await connection.session.update(session={"modalities": ["text"]}) await connection.conversation.item.create( item={ @@ -126,9 +122,7 @@ async def test_realtime_text_deployment_name(self, client_async, api_type, api_v api_version=api_version, azure_deployment="gpt-4o-realtime-preview-1001", ) - async with client_async.beta.realtime.connect( - model="invalid" - ) as connection: + async with client_async.beta.realtime.connect(model="invalid") as connection: await connection.session.update(session={"modalities": ["text"]}) await connection.conversation.item.create( item={ @@ -155,14 +149,14 @@ async def test_realtime_text_deployment_name(self, client_async, api_type, api_v async def test_realtime_text_websocket_base_url(self, client_async, api_type, api_version, **kwargs): client_async = openai.AsyncAzureOpenAI( base_url="fakebaseurl", - websocket_base_url=httpx.URL(os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT) + "/openai/").copy_with(scheme="wss"), + websocket_base_url=httpx.URL(os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_ENDPOINT) + "/openai/").copy_with( + scheme="wss" + ), api_key=os.getenv(ENV_AZURE_OPENAI_SWEDENCENTRAL_KEY), api_version=api_version, ) - - async with client_async.beta.realtime.connect( - **kwargs - ) as connection: + + async with client_async.beta.realtime.connect(**kwargs) as connection: await connection.session.update(session={"modalities": ["text"]}) await connection.conversation.item.create( item={ diff --git a/sdk/openai/azure-openai/tests/test_responses.py b/sdk/openai/azure-openai/tests/test_responses.py index f7d2a0f236ef..789fc3bfa7d9 100644 --- a/sdk/openai/azure-openai/tests/test_responses.py +++ b/sdk/openai/azure-openai/tests/test_responses.py @@ -49,10 +49,7 @@ def assert_required(response: openai.types.responses.Response): class TestResponses(AzureRecordedTestCase): @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): response = client.responses.create( input="Hello, how are you?", @@ -77,10 +74,7 @@ def test_responses(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, a client.responses.delete(response.id) @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_streaming(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): stream = client.responses.create( input="Count from 1 to 5", @@ -136,15 +130,17 @@ def test_responses_streaming(self, client: openai.AzureOpenAI | openai.OpenAI, a assert chunk.response.status == "completed" assert chunk.response.usage.input_tokens is not None assert chunk.response.usage.output_tokens is not None - assert chunk.response.usage.total_tokens == chunk.response.usage.input_tokens + chunk.response.usage.output_tokens + assert ( + chunk.response.usage.total_tokens + == chunk.response.usage.input_tokens + chunk.response.usage.output_tokens + ) assert chunk.response.usage.output_tokens_details is not None @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_with_computer_use_tool(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_with_computer_use_tool( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): path = pathlib.Path(__file__).parent / "assets" / "browser_github_screenshot.png" with open(str(path), "rb") as f: @@ -158,8 +154,8 @@ def test_responses_with_computer_use_tool(self, client: openai.AzureOpenAI | ope "role": "user", "content": [ {"type": "input_text", "text": "Where should I click to see Issues?"}, - {"type": "input_image", "image_url": f"data:image/png;base64,{base64_string}"} - ] + {"type": "input_image", "image_url": f"data:image/png;base64,{base64_string}"}, + ], } ], tools=[ @@ -172,7 +168,7 @@ def test_responses_with_computer_use_tool(self, client: openai.AzureOpenAI | ope ], model="computer-use-preview", truncation="auto", - include=["computer_call_output.output.image_url"] + include=["computer_call_output.output.image_url"], ) assert response.id is not None @@ -201,11 +197,10 @@ def test_responses_with_computer_use_tool(self, client: openai.AzureOpenAI | ope assert tools.environment == "browser" @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_with_file_search_tool(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_with_file_search_tool( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): try: file_name = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: @@ -213,21 +208,14 @@ def test_responses_with_file_search_tool(self, client: openai.AzureOpenAI | open path = pathlib.Path(file_name) - vector_store = client.vector_stores.create( - name="Support FAQ" - ) - client.vector_stores.files.upload_and_poll( - vector_store_id=vector_store.id, - file=path - ) - + vector_store = client.vector_stores.create(name="Support FAQ") + client.vector_stores.files.upload_and_poll(vector_store_id=vector_store.id, file=path) + response = client.responses.create( input="How many vacation days am I required to take as a Contoso employee?", - tools=[{ - "type": "file_search", - "vector_store_ids": [vector_store.id]}], + tools=[{"type": "file_search", "vector_store_ids": [vector_store.id]}], include=["file_search_call.results"], - **kwargs + **kwargs, ) assert response.id is not None @@ -267,17 +255,14 @@ def test_responses_with_file_search_tool(self, client: openai.AzureOpenAI | open finally: os.remove(path) - deleted_vector_store = client.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = client.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_with_function_tool(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_with_function_tool( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): messages = [{"role": "user", "content": "What is the weather like in seattle today? search for weather data."}] tools = [ { @@ -298,14 +283,13 @@ def test_responses_with_function_tool(self, client: openai.AzureOpenAI | openai. }, "required": ["location"], }, - } ] response = client.responses.create( input=messages, tools=tools, # tool_choice={"type": "function", "name": "weather_search"} # TODO - **kwargs + **kwargs, ) assert response.id is not None assert response.created_at is not None @@ -332,11 +316,9 @@ def test_responses_with_function_tool(self, client: openai.AzureOpenAI | openai. assert tools_response.description == "Search for weather data" assert tools_response.parameters is not None messages.append(response.output[0]) - messages.append({ - "type": "function_call_output", - "call_id": response.output[0].call_id, - "output": "80 degrees F" - }) + messages.append( + {"type": "function_call_output", "call_id": response.output[0].call_id, "output": "80 degrees F"} + ) response_2 = client.responses.create( input=messages, tools=tools, @@ -346,14 +328,16 @@ def test_responses_with_function_tool(self, client: openai.AzureOpenAI | openai. assert "80" in response_2.output_text @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_with_parallel_tool_calls(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_with_parallel_tool_calls( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"}, ] tools = [ { @@ -374,7 +358,6 @@ def test_responses_with_parallel_tool_calls(self, client: openai.AzureOpenAI | o }, "required": ["location"], }, - } ] response = client.responses.create( @@ -407,23 +390,15 @@ def test_responses_with_parallel_tool_calls(self, client: openai.AzureOpenAI | o assert tools_response.description == "Search for weather data" assert tools_response.parameters is not None - @pytest.mark.skip("Not working for Azure yet") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_OPENAI, "v1")] - ) - def test_responses_with_web_search_tool(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_OPENAI, "v1")]) + def test_responses_with_web_search_tool( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): response = client.responses.create( input="What is the weather like in seattle today? search for weather data.", - tools=[ - { - "type": "web_search_preview", - "search_context_size": "medium" - - } - ], + tools=[{"type": "web_search_preview", "search_context_size": "medium"}], **kwargs, ) assert_required(response) @@ -434,10 +409,7 @@ def test_responses_with_web_search_tool(self, client: openai.AzureOpenAI | opena assert tools_response.search_context_size == "medium" @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_metadata(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): metadata = {"session_id": "test-123", "user_id": "user-456"} response = client.responses.create( @@ -449,10 +421,7 @@ def test_responses_metadata(self, client: openai.AzureOpenAI | openai.OpenAI, ap assert response.metadata == metadata @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_temperature(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): response = client.responses.create( input="hello there!", @@ -463,10 +432,7 @@ def test_responses_temperature(self, client: openai.AzureOpenAI | openai.OpenAI, assert response.temperature == 0.1 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_top_p(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): response = client.responses.create( input="hello there!", @@ -477,10 +443,7 @@ def test_responses_top_p(self, client: openai.AzureOpenAI | openai.OpenAI, api_t assert response.top_p == 0.1 @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_user(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): user = str(uuid.uuid4()) response = client.responses.create( @@ -492,11 +455,10 @@ def test_responses_user(self, client: openai.AzureOpenAI | openai.OpenAI, api_ty assert response.user == user @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_previous_response_id(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_previous_response_id( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): initial_response = client.responses.create( input="tell me a joke", **kwargs, @@ -511,10 +473,7 @@ def test_responses_previous_response_id(self, client: openai.AzureOpenAI | opena assert_required(response) @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_store(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): response = client.responses.create( @@ -526,10 +485,7 @@ def test_responses_store(self, client: openai.AzureOpenAI | openai.OpenAI, api_t assert_required(response) @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_instructions(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): response = client.responses.create( @@ -542,11 +498,10 @@ def test_responses_instructions(self, client: openai.AzureOpenAI | openai.OpenAI assert_required(response) @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_max_output_tokens(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_max_output_tokens( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): response = client.responses.create( input=[{"role": "user", "content": "write me an original happy birthday song. keep it short."}], @@ -559,10 +514,7 @@ def test_responses_max_output_tokens(self, client: openai.AzureOpenAI | openai.O @pytest.mark.skip("Not working for Azure yet") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_input_url(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): response = client.responses.create( @@ -571,8 +523,11 @@ def test_responses_input_url(self, client: openai.AzureOpenAI | openai.OpenAI, a "role": "user", "content": [ {"type": "input_text", "text": "what's in this image?"}, - {"type": "input_image", "image_url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg"} - ] + { + "type": "input_image", + "image_url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg", + }, + ], } ], include=["message.input_image.image_url"], @@ -583,18 +538,12 @@ def test_responses_input_url(self, client: openai.AzureOpenAI | openai.OpenAI, a @pytest.mark.skip("Not working for Azure yet") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) def test_responses_input_file(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): try: hello_pdf = pathlib.Path(__file__).parent / "assets" / "hello_world.pdf" - file = client.files.create( - file=open(str(hello_pdf), "rb"), - purpose="assistants" # should be user_data - ) + file = client.files.create(file=open(str(hello_pdf), "rb"), purpose="assistants") # should be user_data response = client.responses.create( input=[ @@ -602,8 +551,8 @@ def test_responses_input_file(self, client: openai.AzureOpenAI | openai.OpenAI, "role": "user", "content": [ {"type": "input_text", "text": "what's in this file?"}, - {"type": "input_file", "file_id": file.id} - ] + {"type": "input_file", "file_id": file.id}, + ], } ], **kwargs, @@ -615,11 +564,10 @@ def test_responses_input_file(self, client: openai.AzureOpenAI | openai.OpenAI, @pytest.mark.skip("Not working for Azure yet") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_input_file_base64(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_input_file_base64( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): hello_pdf = pathlib.Path(__file__).parent / "assets" / "hello_world.pdf" with open(str(hello_pdf), "rb") as f: data = f.read() @@ -636,8 +584,8 @@ def test_responses_input_file_base64(self, client: openai.AzureOpenAI | openai.O "type": "input_file", "filename": "hello_world.pdf", "file_data": f"data:application/pdf;base64,{base64_string}", - } - ] + }, + ], } ], **kwargs, @@ -647,16 +595,15 @@ def test_responses_input_file_base64(self, client: openai.AzureOpenAI | openai.O @pytest.mark.skip("Not working for Azure yet") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_structured_outputs(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_structured_outputs( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): response = client.responses.create( input=[ {"role": "system", "content": "Extract the event information."}, - {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."} + {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."}, ], text={ "format": { @@ -665,23 +612,14 @@ def test_responses_structured_outputs(self, client: openai.AzureOpenAI | openai. "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "date": { - "type": "string" - }, - "participants": { - "type": "array", - "items": { - "type": "string" - } - }, + "name": {"type": "string"}, + "date": {"type": "string"}, + "participants": {"type": "array", "items": {"type": "string"}}, }, "required": ["name", "date", "participants"], - "additionalProperties": False + "additionalProperties": False, }, - "strict": True + "strict": True, } }, **kwargs, @@ -697,14 +635,13 @@ def test_responses_structured_outputs(self, client: openai.AzureOpenAI | openai. @pytest.mark.skip("Not working for Azure yet") @configure - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - def test_responses_json_object_outputs(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + def test_responses_json_object_outputs( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."} + {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."}, ] response = client.responses.create(input=messages, text={"format": {"type": "json_object"}}, **kwargs) diff --git a/sdk/openai/azure-openai/tests/test_responses_async.py b/sdk/openai/azure-openai/tests/test_responses_async.py index 204fd7236c51..8ac184d0299f 100644 --- a/sdk/openai/azure-openai/tests/test_responses_async.py +++ b/sdk/openai/azure-openai/tests/test_responses_async.py @@ -22,6 +22,7 @@ PREVIEW, ) + def assert_required(response: openai.types.responses.Response): assert response.id is not None assert response.created_at is not None @@ -49,11 +50,10 @@ class TestResponsesAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input="Hello, how are you?", **kwargs, @@ -78,11 +78,10 @@ async def test_responses(self, client_async: openai.AsyncAzureOpenAI | openai.As @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_streaming(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_streaming( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): stream = await client_async.responses.create( input="Count from 1 to 5", stream=True, @@ -137,16 +136,18 @@ async def test_responses_streaming(self, client_async: openai.AsyncAzureOpenAI | assert chunk.response.status == "completed" assert chunk.response.usage.input_tokens is not None assert chunk.response.usage.output_tokens is not None - assert chunk.response.usage.total_tokens == chunk.response.usage.input_tokens + chunk.response.usage.output_tokens + assert ( + chunk.response.usage.total_tokens + == chunk.response.usage.input_tokens + chunk.response.usage.output_tokens + ) assert chunk.response.usage.output_tokens_details is not None @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_with_computer_use_tool(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_with_computer_use_tool( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): path = pathlib.Path(__file__).parent / "assets" / "browser_github_screenshot.png" with open(str(path), "rb") as f: @@ -160,8 +161,8 @@ async def test_responses_with_computer_use_tool(self, client_async: openai.Async "role": "user", "content": [ {"type": "input_text", "text": "Where should I click to see Issues?"}, - {"type": "input_image", "image_url": f"data:image/png;base64,{base64_string}"} - ] + {"type": "input_image", "image_url": f"data:image/png;base64,{base64_string}"}, + ], } ], tools=[ @@ -174,7 +175,7 @@ async def test_responses_with_computer_use_tool(self, client_async: openai.Async ], model="computer-use-preview", truncation="auto", - include=["computer_call_output.output.image_url"] + include=["computer_call_output.output.image_url"], ) assert response.id is not None @@ -204,11 +205,10 @@ async def test_responses_with_computer_use_tool(self, client_async: openai.Async @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_with_file_search_tool(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_with_file_search_tool( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): try: file_name = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: @@ -216,21 +216,14 @@ async def test_responses_with_file_search_tool(self, client_async: openai.AsyncA path = pathlib.Path(file_name) - vector_store = await client_async.vector_stores.create( - name="Support FAQ" - ) - await client_async.vector_stores.files.upload_and_poll( - vector_store_id=vector_store.id, - file=path - ) - + vector_store = await client_async.vector_stores.create(name="Support FAQ") + await client_async.vector_stores.files.upload_and_poll(vector_store_id=vector_store.id, file=path) + response = await client_async.responses.create( input="How many vacation days am I required to take as a Contoso employee?", - tools=[{ - "type": "file_search", - "vector_store_ids": [vector_store.id]}], + tools=[{"type": "file_search", "vector_store_ids": [vector_store.id]}], include=["file_search_call.results"], - **kwargs + **kwargs, ) assert response.id is not None @@ -270,18 +263,15 @@ async def test_responses_with_file_search_tool(self, client_async: openai.AsyncA finally: os.remove(path) - deleted_vector_store = await client_async.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = await client_async.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_with_function_tool(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_with_function_tool( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): messages = [{"role": "user", "content": "What is the weather like in seattle today? search for weather data."}] tools = [ { @@ -302,7 +292,6 @@ async def test_responses_with_function_tool(self, client_async: openai.AsyncAzur }, "required": ["location"], }, - } ] response = await client_async.responses.create( @@ -336,11 +325,9 @@ async def test_responses_with_function_tool(self, client_async: openai.AsyncAzur assert tools_response.description == "Search for weather data" assert tools_response.parameters is not None messages.append(response.output[0]) - messages.append({ - "type": "function_call_output", - "call_id": response.output[0].call_id, - "output": "80 degrees F" - }) + messages.append( + {"type": "function_call_output", "call_id": response.output[0].call_id, "output": "80 degrees F"} + ) response_2 = await client_async.responses.create( input=messages, tools=tools, @@ -351,14 +338,16 @@ async def test_responses_with_function_tool(self, client_async: openai.AsyncAzur @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_with_parallel_tool_calls(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_with_parallel_tool_calls( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): messages = [ - {"role": "system", "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous."}, - {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"} + { + "role": "system", + "content": "Don't make assumptions about what values to plug into tools. Ask for clarification if a user request is ambiguous.", + }, + {"role": "user", "content": "What's the weather like today in Seattle and Los Angeles?"}, ] tools = [ { @@ -379,7 +368,6 @@ async def test_responses_with_parallel_tool_calls(self, client_async: openai.Asy }, "required": ["location"], }, - } ] response = await client_async.responses.create( @@ -412,24 +400,16 @@ async def test_responses_with_parallel_tool_calls(self, client_async: openai.Asy assert tools_response.description == "Search for weather data" assert tools_response.parameters is not None - @pytest.mark.skip("Not working for Azure yet") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_OPENAI, "v1")] - ) - async def test_responses_with_web_search_tool(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_OPENAI, "v1")]) + async def test_responses_with_web_search_tool( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input="What is the weather like in seattle today? search for weather data.", - tools=[ - { - "type": "web_search_preview", - "search_context_size": "medium" - - } - ], + tools=[{"type": "web_search_preview", "search_context_size": "medium"}], **kwargs, ) assert_required(response) @@ -441,11 +421,10 @@ async def test_responses_with_web_search_tool(self, client_async: openai.AsyncAz @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_metadata(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_metadata( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): metadata = {"session_id": "test-123", "user_id": "user-456"} response = await client_async.responses.create( input="Test with metadata", @@ -457,11 +436,10 @@ async def test_responses_metadata(self, client_async: openai.AsyncAzureOpenAI | @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_temperature(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_temperature( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input="hello there!", temperature=0.1, @@ -472,11 +450,10 @@ async def test_responses_temperature(self, client_async: openai.AsyncAzureOpenAI @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_top_p(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_top_p( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input="hello there!", top_p=0.1, @@ -487,11 +464,10 @@ async def test_responses_top_p(self, client_async: openai.AsyncAzureOpenAI | ope @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_user(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_user( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): user = str(uuid.uuid4()) response = await client_async.responses.create( input="hello there!", @@ -503,11 +479,10 @@ async def test_responses_user(self, client_async: openai.AsyncAzureOpenAI | open @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_previous_response_id(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_previous_response_id( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): initial_response = await client_async.responses.create( input="tell me a joke", **kwargs, @@ -523,11 +498,10 @@ async def test_responses_previous_response_id(self, client_async: openai.AsyncAz @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_store(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_store( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input=[{"role": "user", "content": "write me an original happy birthday song"}], @@ -539,11 +513,10 @@ async def test_responses_store(self, client_async: openai.AsyncAzureOpenAI | ope @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_instructions(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_instructions( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input=[{"role": "user", "content": "write me an original happy birthday song"}], @@ -556,11 +529,10 @@ async def test_responses_instructions(self, client_async: openai.AsyncAzureOpenA @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_max_output_tokens(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_max_output_tokens( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input=[{"role": "user", "content": "write me an original happy birthday song. keep it short."}], @@ -574,11 +546,10 @@ async def test_responses_max_output_tokens(self, client_async: openai.AsyncAzure @pytest.mark.skip("Not working for Azure yet") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_input_url(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_input_url( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input=[ @@ -586,8 +557,11 @@ async def test_responses_input_url(self, client_async: openai.AsyncAzureOpenAI | "role": "user", "content": [ {"type": "input_text", "text": "what's in this image?"}, - {"type": "input_image", "image_url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg"} - ] + { + "type": "input_image", + "image_url": "https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/images/handwritten-note.jpg", + }, + ], } ], include=["message.input_image.image_url"], @@ -599,17 +573,15 @@ async def test_responses_input_url(self, client_async: openai.AsyncAzureOpenAI | @pytest.mark.skip("Not working for Azure yet") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_input_file(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_input_file( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): try: hello_pdf = pathlib.Path(__file__).parent / "assets" / "hello_world.pdf" file = await client_async.files.create( - file=open(str(hello_pdf), "rb"), - purpose="assistants" # should be user_data + file=open(str(hello_pdf), "rb"), purpose="assistants" # should be user_data ) response = await client_async.responses.create( @@ -618,8 +590,8 @@ async def test_responses_input_file(self, client_async: openai.AsyncAzureOpenAI "role": "user", "content": [ {"type": "input_text", "text": "what's in this file?"}, - {"type": "input_file", "file_id": file.id} - ] + {"type": "input_file", "file_id": file.id}, + ], } ], **kwargs, @@ -632,11 +604,10 @@ async def test_responses_input_file(self, client_async: openai.AsyncAzureOpenAI @pytest.mark.skip("Not working for Azure yet") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_input_file_base64(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_input_file_base64( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): hello_pdf = pathlib.Path(__file__).parent / "assets" / "hello_world.pdf" with open(str(hello_pdf), "rb") as f: data = f.read() @@ -653,8 +624,8 @@ async def test_responses_input_file_base64(self, client_async: openai.AsyncAzure "type": "input_file", "filename": "hello_world.pdf", "file_data": f"data:application/pdf;base64,{base64_string}", - } - ] + }, + ], } ], **kwargs, @@ -665,16 +636,15 @@ async def test_responses_input_file_base64(self, client_async: openai.AsyncAzure @pytest.mark.skip("Not working for Azure yet") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_structured_outputs(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_structured_outputs( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): response = await client_async.responses.create( input=[ {"role": "system", "content": "Extract the event information."}, - {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."} + {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."}, ], text={ "format": { @@ -683,23 +653,14 @@ async def test_responses_structured_outputs(self, client_async: openai.AsyncAzur "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "date": { - "type": "string" - }, - "participants": { - "type": "array", - "items": { - "type": "string" - } - }, + "name": {"type": "string"}, + "date": {"type": "string"}, + "participants": {"type": "array", "items": {"type": "string"}}, }, "required": ["name", "date", "participants"], - "additionalProperties": False + "additionalProperties": False, }, - "strict": True + "strict": True, } }, **kwargs, @@ -716,16 +677,17 @@ async def test_responses_structured_outputs(self, client_async: openai.AsyncAzur @pytest.mark.skip("Not working for Azure yet") @configure_async @pytest.mark.asyncio - @pytest.mark.parametrize( - "api_type, api_version", - [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")] - ) - async def test_responses_json_object_outputs(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + @pytest.mark.parametrize("api_type, api_version", [(GPT_4_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) + async def test_responses_json_object_outputs( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): messages = [ {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."} + {"role": "user", "content": "Who won the world series in 2020? Return in json with answer as the key."}, ] - response = await client_async.responses.create(input=messages, text={"format": {"type": "json_object"}}, **kwargs) + response = await client_async.responses.create( + input=messages, text={"format": {"type": "json_object"}}, **kwargs + ) assert_required(response) assert json.loads(response.output_text) diff --git a/sdk/openai/azure-openai/tests/test_vector_stores.py b/sdk/openai/azure-openai/tests/test_vector_stores.py index 5e9dc01fdccd..fe9486e94c5e 100644 --- a/sdk/openai/azure-openai/tests/test_vector_stores.py +++ b/sdk/openai/azure-openai/tests/test_vector_stores.py @@ -13,7 +13,6 @@ from conftest import ASST_AZURE, PREVIEW, GPT_4_OPENAI, configure, AZURE - @pytest.mark.live_test_only class TestVectorStores(AzureRecordedTestCase): @@ -26,15 +25,10 @@ def test_vector_stores_crud(self, client: openai.AzureOpenAI | openai.OpenAI, ap path = pathlib.Path(file_name) - file = client.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file = client.files.create(file=open(path, "rb"), purpose="assistants") try: - vector_store = client.vector_stores.create( - name="Support FAQ" - ) + vector_store = client.vector_stores.create(name="Support FAQ") assert vector_store.name == "Support FAQ" assert vector_store.id assert vector_store.object == "vector_store" @@ -48,31 +42,22 @@ def test_vector_stores_crud(self, client: openai.AzureOpenAI | openai.OpenAI, ap assert vector_store.created_at vector_store = client.vector_stores.update( - vector_store_id=vector_store.id, - name="Support FAQ and more", - metadata={"Q": "A"} + vector_store_id=vector_store.id, name="Support FAQ and more", metadata={"Q": "A"} ) assert vector_store.name == "Support FAQ and more" assert vector_store.metadata == {"Q": "A"} - retrieved_vector = client.vector_stores.retrieve( - vector_store_id=vector_store.id - ) + retrieved_vector = client.vector_stores.retrieve(vector_store_id=vector_store.id) assert retrieved_vector.id == vector_store.id - vector_store_file = client.vector_stores.files.create( - vector_store_id=vector_store.id, - file_id=file.id - ) + vector_store_file = client.vector_stores.files.create(vector_store_id=vector_store.id, file_id=file.id) assert vector_store_file.id assert vector_store_file.object == "vector_store.file" assert vector_store_file.created_at assert vector_store_file.vector_store_id == vector_store.id - vector_store_files = client.vector_stores.files.list( - vector_store_id=vector_store.id - ) + vector_store_files = client.vector_stores.files.list(vector_store_id=vector_store.id) for vector_file in vector_store_files: assert vector_file.id assert vector_file.object == "vector_store.file" @@ -80,8 +65,7 @@ def test_vector_stores_crud(self, client: openai.AzureOpenAI | openai.OpenAI, ap assert vector_store_file.vector_store_id == vector_store.id vector_store_file_2 = client.vector_stores.files.retrieve( - vector_store_id=vector_store.id, - file_id=vector_store_file.id + vector_store_id=vector_store.id, file_id=vector_store_file.id ) assert vector_store_file_2.id == vector_store_file.id assert vector_store_file.vector_store_id == vector_store.id @@ -110,18 +94,17 @@ def test_vector_stores_crud(self, client: openai.AzureOpenAI | openai.OpenAI, ap finally: os.remove(path) deleted_vector_store_file = client.vector_stores.files.delete( - vector_store_id=vector_store.id, - file_id=vector_store_file.id + vector_store_id=vector_store.id, file_id=vector_store_file.id ) assert deleted_vector_store_file.deleted is True - deleted_vector_store = client.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = client.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True @configure @pytest.mark.parametrize("api_type, api_version", [(ASST_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) - def test_vector_stores_batch_crud(self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs): + def test_vector_stores_batch_crud( + self, client: openai.AzureOpenAI | openai.OpenAI, api_type, api_version, **kwargs + ): file_name = f"test{uuid.uuid4()}.txt" file_name_2 = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: @@ -129,25 +112,16 @@ def test_vector_stores_batch_crud(self, client: openai.AzureOpenAI | openai.Open path = pathlib.Path(file_name) - file = client.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file = client.files.create(file=open(path, "rb"), purpose="assistants") with open(file_name_2, "w") as f: f.write("test") path_2 = pathlib.Path(file_name_2) - file_2 = client.files.create( - file=open(path_2, "rb"), - purpose="assistants" - ) + file_2 = client.files.create(file=open(path_2, "rb"), purpose="assistants") try: - vector_store = client.vector_stores.create( - name="Support FAQ" - ) + vector_store = client.vector_stores.create(name="Support FAQ") vector_store_file_batch = client.vector_stores.file_batches.create( - vector_store_id=vector_store.id, - file_ids=[file.id, file_2.id] + vector_store_id=vector_store.id, file_ids=[file.id, file_2.id] ) assert vector_store_file_batch.id assert vector_store_file_batch.object == "vector_store.file_batch" @@ -155,8 +129,7 @@ def test_vector_stores_batch_crud(self, client: openai.AzureOpenAI | openai.Open assert vector_store_file_batch.status vectors = client.vector_stores.file_batches.list_files( - vector_store_id=vector_store.id, - batch_id=vector_store_file_batch.id + vector_store_id=vector_store.id, batch_id=vector_store_file_batch.id ) for vector in vectors: assert vector.id @@ -164,8 +137,7 @@ def test_vector_stores_batch_crud(self, client: openai.AzureOpenAI | openai.Open assert vector.created_at is not None retrieved_vector_store_file_batch = client.vector_stores.file_batches.retrieve( - vector_store_id=vector_store.id, - batch_id=vector_store_file_batch.id + vector_store_id=vector_store.id, batch_id=vector_store_file_batch.id ) assert retrieved_vector_store_file_batch.id == vector_store_file_batch.id @@ -176,7 +148,5 @@ def test_vector_stores_batch_crud(self, client: openai.AzureOpenAI | openai.Open assert delete_file.deleted is True delete_file = client.files.delete(file_2.id) assert delete_file.deleted is True - deleted_vector_store = client.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = client.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True diff --git a/sdk/openai/azure-openai/tests/test_vector_stores_async.py b/sdk/openai/azure-openai/tests/test_vector_stores_async.py index a8b319e00326..a53729208c39 100644 --- a/sdk/openai/azure-openai/tests/test_vector_stores_async.py +++ b/sdk/openai/azure-openai/tests/test_vector_stores_async.py @@ -19,22 +19,19 @@ class TestVectorStoresAsync(AzureRecordedTestCase): @configure_async @pytest.mark.asyncio @pytest.mark.parametrize("api_type, api_version", [(ASST_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) - async def test_vector_stores_crud(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + async def test_vector_stores_crud( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): file_name = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: f.write("Contoso company policy requires that all employees take at least 10 vacation days a year.") path = pathlib.Path(file_name) - file = await client_async.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file = await client_async.files.create(file=open(path, "rb"), purpose="assistants") try: - vector_store = await client_async.vector_stores.create( - name="Support FAQ" - ) + vector_store = await client_async.vector_stores.create(name="Support FAQ") assert vector_store.name == "Support FAQ" assert vector_store.id assert vector_store.object == "vector_store" @@ -48,29 +45,22 @@ async def test_vector_stores_crud(self, client_async: openai.AsyncAzureOpenAI | assert vector_store.created_at vector_store = await client_async.vector_stores.update( - vector_store_id=vector_store.id, - name="Support FAQ and more", - metadata={"Q": "A"} + vector_store_id=vector_store.id, name="Support FAQ and more", metadata={"Q": "A"} ) assert vector_store.name == "Support FAQ and more" assert vector_store.metadata == {"Q": "A"} - retrieved_vector = await client_async.vector_stores.retrieve( - vector_store_id=vector_store.id - ) + retrieved_vector = await client_async.vector_stores.retrieve(vector_store_id=vector_store.id) assert retrieved_vector.id == vector_store.id vector_store_file = await client_async.vector_stores.files.create( - vector_store_id=vector_store.id, - file_id=file.id + vector_store_id=vector_store.id, file_id=file.id ) assert vector_store_file.id assert vector_store_file.object == "vector_store.file" assert vector_store_file.created_at assert vector_store_file.vector_store_id == vector_store.id - vector_store_files = client_async.vector_stores.files.list( - vector_store_id=vector_store.id - ) + vector_store_files = client_async.vector_stores.files.list(vector_store_id=vector_store.id) async for vector_file in vector_store_files: assert vector_file.id assert vector_file.object == "vector_store.file" @@ -78,8 +68,7 @@ async def test_vector_stores_crud(self, client_async: openai.AsyncAzureOpenAI | assert vector_store_file.vector_store_id == vector_store.id vector_store_file_2 = await client_async.vector_stores.files.retrieve( - vector_store_id=vector_store.id, - file_id=vector_store_file.id + vector_store_id=vector_store.id, file_id=vector_store_file.id ) assert vector_store_file_2.id == vector_store_file.id assert vector_store_file.vector_store_id == vector_store.id @@ -108,19 +97,18 @@ async def test_vector_stores_crud(self, client_async: openai.AsyncAzureOpenAI | finally: os.remove(path) deleted_vector_store_file = await client_async.vector_stores.files.delete( - vector_store_id=vector_store.id, - file_id=vector_store_file.id + vector_store_id=vector_store.id, file_id=vector_store_file.id ) assert deleted_vector_store_file.deleted is True - deleted_vector_store = await client_async.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = await client_async.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True @configure_async @pytest.mark.asyncio @pytest.mark.parametrize("api_type, api_version", [(ASST_AZURE, PREVIEW), (GPT_4_OPENAI, "v1")]) - async def test_vector_stores_batch_crud(self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs): + async def test_vector_stores_batch_crud( + self, client_async: openai.AsyncAzureOpenAI | openai.AsyncOpenAI, api_type, api_version, **kwargs + ): file_name = f"test{uuid.uuid4()}.txt" file_name_2 = f"test{uuid.uuid4()}.txt" with open(file_name, "w") as f: @@ -128,25 +116,16 @@ async def test_vector_stores_batch_crud(self, client_async: openai.AsyncAzureOpe path = pathlib.Path(file_name) - file = await client_async.files.create( - file=open(path, "rb"), - purpose="assistants" - ) + file = await client_async.files.create(file=open(path, "rb"), purpose="assistants") with open(file_name_2, "w") as f: f.write("test") path_2 = pathlib.Path(file_name_2) - file_2 = await client_async.files.create( - file=open(path_2, "rb"), - purpose="assistants" - ) + file_2 = await client_async.files.create(file=open(path_2, "rb"), purpose="assistants") try: - vector_store = await client_async.vector_stores.create( - name="Support FAQ" - ) + vector_store = await client_async.vector_stores.create(name="Support FAQ") vector_store_file_batch = await client_async.vector_stores.file_batches.create( - vector_store_id=vector_store.id, - file_ids=[file.id, file_2.id] + vector_store_id=vector_store.id, file_ids=[file.id, file_2.id] ) assert vector_store_file_batch.id assert vector_store_file_batch.object == "vector_store.file_batch" @@ -154,8 +133,7 @@ async def test_vector_stores_batch_crud(self, client_async: openai.AsyncAzureOpe assert vector_store_file_batch.status vectors = await client_async.vector_stores.file_batches.list_files( - vector_store_id=vector_store.id, - batch_id=vector_store_file_batch.id + vector_store_id=vector_store.id, batch_id=vector_store_file_batch.id ) async for vector in vectors: assert vector.id @@ -163,8 +141,7 @@ async def test_vector_stores_batch_crud(self, client_async: openai.AsyncAzureOpe assert vector.created_at is not None retrieved_vector_store_file_batch = await client_async.vector_stores.file_batches.retrieve( - vector_store_id=vector_store.id, - batch_id=vector_store_file_batch.id + vector_store_id=vector_store.id, batch_id=vector_store_file_batch.id ) assert retrieved_vector_store_file_batch.id == vector_store_file_batch.id @@ -175,7 +152,5 @@ async def test_vector_stores_batch_crud(self, client_async: openai.AsyncAzureOpe assert delete_file.deleted is True delete_file = await client_async.files.delete(file_2.id) assert delete_file.deleted is True - deleted_vector_store = await client_async.vector_stores.delete( - vector_store_id=vector_store.id - ) + deleted_vector_store = await client_async.vector_stores.delete(vector_store_id=vector_store.id) assert deleted_vector_store.deleted is True diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_patch.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_patch.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_patch.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_patch.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_patch.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_patch.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_patch.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_patch.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_patch.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_patch.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/setup.py b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/setup.py index 865531745f2a..f3af07361810 100644 --- a/sdk/operationsmanagement/azure-mgmt-operationsmanagement/setup.py +++ b/sdk/operationsmanagement/azure-mgmt-operationsmanagement/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Operationsmanagement Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/_patch.py b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/_patch.py +++ b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/_patch.py b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/_patch.py +++ b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/operations/_patch.py b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/operations/_patch.py +++ b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/models/_patch.py b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/models/_patch.py +++ b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/operations/_patch.py b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/operations/_patch.py +++ b/sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/_patch.py b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/_patch.py +++ b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/_patch.py b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/_patch.py +++ b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/operations/_patch.py b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/operations/_patch.py +++ b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/models/_patch.py b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/models/_patch.py +++ b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/operations/_patch.py b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/operations/_patch.py +++ b/sdk/orbital/azure-mgmt-orbital/azure/mgmt/orbital/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/orbital/azure-mgmt-orbital/setup.py b/sdk/orbital/azure-mgmt-orbital/setup.py index f2bba6a81634..451a912257e1 100644 --- a/sdk/orbital/azure-mgmt-orbital/setup.py +++ b/sdk/orbital/azure-mgmt-orbital/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Orbital Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/_patch.py b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/_patch.py +++ b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/_patch.py b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/_patch.py +++ b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/operations/_patch.py b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/operations/_patch.py +++ b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/models/_patch.py b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/models/_patch.py +++ b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/operations/_patch.py b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/operations/_patch.py +++ b/sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/azure/mgmt/paloaltonetworksngfw/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_patch.py b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_patch.py +++ b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/_patch.py b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/_patch.py +++ b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/operations/_patch.py b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/operations/_patch.py +++ b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_patch.py b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_patch.py +++ b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/operations/_patch.py b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/operations/_patch.py +++ b/sdk/peering/azure-mgmt-peering/azure/mgmt/peering/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/peering/azure-mgmt-peering/setup.py b/sdk/peering/azure-mgmt-peering/setup.py index 9ddde0eb9244..666eeadef59e 100644 --- a/sdk/peering/azure-mgmt-peering/setup.py +++ b/sdk/peering/azure-mgmt-peering/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Peering Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/peering/azure-mgmt-peering/tests/disable_test_cli_mgmt_peering.py b/sdk/peering/azure-mgmt-peering/tests/disable_test_cli_mgmt_peering.py index 34cefc9512bd..7e3fd43c9ca7 100644 --- a/sdk/peering/azure-mgmt-peering/tests/disable_test_cli_mgmt_peering.py +++ b/sdk/peering/azure-mgmt-peering/tests/disable_test_cli_mgmt_peering.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,17 +21,16 @@ import azure.mgmt.peering from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + @unittest.skip("skip test") class MgmtPeeringTest(AzureMgmtTestCase): def setUp(self): super(MgmtPeeringTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.peering.PeeringManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.peering.PeeringManagementClient) + @ResourceGroupPreparer(location=AZURE_LOCATION) def test_peering(self, resource_group): @@ -46,162 +45,154 @@ def test_peering(self, resource_group): # /PeerAsns/put/Create a peer ASN[put] BODY = { - "peer_asn": "65001", - "peer_contact_detail": [ - { - "role": "Noc", - "email": "noc@contoso.com", - "phone": "+1 (234) 567-8999" - }, - { - "role": "Policy", - "email": "abc@contoso.com", - "phone": "+1 (234) 567-8900" - }, - { - "role": "Technical", - "email": "xyz@contoso.com", - "phone": "+1 (234) 567-8900" - } - ], - "peer_name": "Contoso" + "peer_asn": "65001", + "peer_contact_detail": [ + {"role": "Noc", "email": "noc@contoso.com", "phone": "+1 (234) 567-8999"}, + {"role": "Policy", "email": "abc@contoso.com", "phone": "+1 (234) 567-8900"}, + {"role": "Technical", "email": "xyz@contoso.com", "phone": "+1 (234) 567-8900"}, + ], + "peer_name": "Contoso", } # result = self.mgmt_client.peer_asns.create_or_update(peer_asn_name=PEER_ASN_NAME, peer_asn=BODY) # /Peerings/put/Create an exchange peering[put] BODY = { - "sku": { - "name": "Basic_Exchange_Free" - }, - "kind": "Exchange", - "location": "eastus", - "exchange": { - "connections": [ - { - "peering_dbfacility_id": "99999", - "bgp_session": { - "peer_session_ipv4address": "192.168.2.1", - "peer_session_ipv6address": "fd00::1", - "max_prefixes_advertised_v4": "1000", - "max_prefixes_advertised_v6": "100", - "md5authentication_key": "test-md5-auth-key" + "sku": {"name": "Basic_Exchange_Free"}, + "kind": "Exchange", + "location": "eastus", + "exchange": { + "connections": [ + { + "peering_dbfacility_id": "99999", + "bgp_session": { + "peer_session_ipv4address": "192.168.2.1", + "peer_session_ipv6address": "fd00::1", + "max_prefixes_advertised_v4": "1000", + "max_prefixes_advertised_v6": "100", + "md5authentication_key": "test-md5-auth-key", + }, + "connection_identifier": "CE495334-0E94-4E51-8164-8116D6CD284D", + }, + { + "peering_dbfacility_id": "99999", + "bgp_session": { + "peer_session_ipv4address": "192.168.2.2", + "peer_session_ipv6address": "fd00::2", + "max_prefixes_advertised_v4": "1000", + "max_prefixes_advertised_v6": "100", + "md5authentication_key": "test-md5-auth-key", + }, + "connection_identifier": "CDD8E673-CB07-47E6-84DE-3739F778762B", + }, + ], + "peer_asn": { + "id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/providers/Microsoft.Peering/peerAsns/" + + PEER_ASN_NAME + + "" }, - "connection_identifier": "CE495334-0E94-4E51-8164-8116D6CD284D" - }, - { - "peering_dbfacility_id": "99999", - "bgp_session": { - "peer_session_ipv4address": "192.168.2.2", - "peer_session_ipv6address": "fd00::2", - "max_prefixes_advertised_v4": "1000", - "max_prefixes_advertised_v6": "100", - "md5authentication_key": "test-md5-auth-key" - }, - "connection_identifier": "CDD8E673-CB07-47E6-84DE-3739F778762B" - } - ], - "peer_asn": { - "id": "/subscriptions/" + SUBSCRIPTION_ID + "/providers/Microsoft.Peering/peerAsns/" + PEER_ASN_NAME + "" - } - }, - "peering_location": "peeringLocation0" + }, + "peering_location": "peeringLocation0", } # result = self.mgmt_client.peerings.create_or_update(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, peering=BODY) # /Peerings/put/Create a peering with exchange route server[put] BODY = { - "sku": { - "name": "Premium_Direct_Free" - }, - "kind": "Direct", - "location": "eastus", - "direct": { - "connections": [ - { - "bandwidth_in_mbps": "10000", - "session_address_provider": "Peer", - "use_for_peering_service": True, - "peering_dbfacility_id": "99999", - "bgp_session": { - "session_prefix_v4": "192.168.0.0/24", - "microsoft_session_ipv4address": "192.168.0.123", - "peer_session_ipv4address": "192.168.0.234", - "max_prefixes_advertised_v4": "1000", - "max_prefixes_advertised_v6": "100" + "sku": {"name": "Premium_Direct_Free"}, + "kind": "Direct", + "location": "eastus", + "direct": { + "connections": [ + { + "bandwidth_in_mbps": "10000", + "session_address_provider": "Peer", + "use_for_peering_service": True, + "peering_dbfacility_id": "99999", + "bgp_session": { + "session_prefix_v4": "192.168.0.0/24", + "microsoft_session_ipv4address": "192.168.0.123", + "peer_session_ipv4address": "192.168.0.234", + "max_prefixes_advertised_v4": "1000", + "max_prefixes_advertised_v6": "100", + }, + "connection_identifier": "5F4CB5C7-6B43-4444-9338-9ABC72606C16", + } + ], + "peer_asn": { + "id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/providers/Microsoft.Peering/peerAsns/" + + PEER_ASN_NAME + + "" }, - "connection_identifier": "5F4CB5C7-6B43-4444-9338-9ABC72606C16" - } - ], - "peer_asn": { - "id": "/subscriptions/" + SUBSCRIPTION_ID + "/providers/Microsoft.Peering/peerAsns/" + PEER_ASN_NAME + "" + "direct_peering_type": "IxRs", }, - "direct_peering_type": "IxRs" - }, - "peering_location": "peeringLocation0" + "peering_location": "peeringLocation0", } # result = self.mgmt_client.peerings.create_or_update(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, peering=BODY) # /Peerings/put/Create a direct peering[put] BODY = { - "sku": { - "name": "Basic_Direct_Free" - }, - "kind": "Direct", - "location": "eastus", - "direct": { - "connections": [ - { - "bandwidth_in_mbps": "10000", - "session_address_provider": "Peer", - "use_for_peering_service": False, - "peering_dbfacility_id": "99999", - "bgp_session": { - "session_prefix_v4": "192.168.0.0/31", - "session_prefix_v6": "fd00::0/127", - "max_prefixes_advertised_v4": "1000", - "max_prefixes_advertised_v6": "100", - "md5authentication_key": "test-md5-auth-key" + "sku": {"name": "Basic_Direct_Free"}, + "kind": "Direct", + "location": "eastus", + "direct": { + "connections": [ + { + "bandwidth_in_mbps": "10000", + "session_address_provider": "Peer", + "use_for_peering_service": False, + "peering_dbfacility_id": "99999", + "bgp_session": { + "session_prefix_v4": "192.168.0.0/31", + "session_prefix_v6": "fd00::0/127", + "max_prefixes_advertised_v4": "1000", + "max_prefixes_advertised_v6": "100", + "md5authentication_key": "test-md5-auth-key", + }, + "connection_identifier": "5F4CB5C7-6B43-4444-9338-9ABC72606C16", + }, + { + "bandwidth_in_mbps": "10000", + "session_address_provider": "Microsoft", + "use_for_peering_service": True, + "peering_dbfacility_id": "99999", + "connection_identifier": "8AB00818-D533-4504-A25A-03A17F61201C", + }, + ], + "peer_asn": { + "id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/providers/Microsoft.Peering/peerAsns/" + + PEER_ASN_NAME + + "" }, - "connection_identifier": "5F4CB5C7-6B43-4444-9338-9ABC72606C16" - }, - { - "bandwidth_in_mbps": "10000", - "session_address_provider": "Microsoft", - "use_for_peering_service": True, - "peering_dbfacility_id": "99999", - "connection_identifier": "8AB00818-D533-4504-A25A-03A17F61201C" - } - ], - "peer_asn": { - "id": "/subscriptions/" + SUBSCRIPTION_ID + "/providers/Microsoft.Peering/peerAsns/" + PEER_ASN_NAME + "" + "direct_peering_type": "Edge", }, - "direct_peering_type": "Edge" - }, - "peering_location": "peeringLocation0" + "peering_location": "peeringLocation0", } # result = self.mgmt_client.peerings.create_or_update(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, peering=BODY) # /PeeringServices/put/Create a peering service[put] BODY = { - "location": "eastus", - "peering_service_location": "California", - "peering_service_provider": "Kordia Limited" + "location": "eastus", + "peering_service_location": "California", + "peering_service_provider": "Kordia Limited", } - result = self.mgmt_client.peering_services.create_or_update(resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME, peering_service=BODY) + result = self.mgmt_client.peering_services.create_or_update( + resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME, peering_service=BODY + ) # /RegisteredAsns/put/Create or update a registered ASN for the peering[put] - BODY = { - "asn": "65000" - } + BODY = {"asn": "65000"} # result = self.mgmt_client.registered_asns.create_or_update(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, registered_asn_name=REGISTERED_ASN_NAME, registered_asn=BODY) # /Prefixes/put/Create or update a prefix for the peering service[put] # result = self.mgmt_client.prefixes.create_or_update(resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME, prefix_name=PREFIX_NAME, prefix="192.168.1.0/24") # /RegisteredPrefixes/put/Create or update a registered prefix for the peering[put] - BODY = { - "prefix": "10.22.20.0/24" - } + BODY = {"prefix": "10.22.20.0/24"} # result = self.mgmt_client.registered_prefixes.create_or_update(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, registered_prefix_name=REGISTERED_PREFIX_NAME, registered_prefix=BODY) # /RegisteredPrefixes/get/Get a registered prefix associated with the peering[get] @@ -214,13 +205,17 @@ def test_peering(self, resource_group): # result = self.mgmt_client.registered_asns.get(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, registered_asn_name=REGISTERED_ASN_NAME) # /Prefixes/get/List all the prefixes associated with the peering service[get] - result = self.mgmt_client.prefixes.list_by_peering_service(resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME) + result = self.mgmt_client.prefixes.list_by_peering_service( + resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME + ) # /RegisteredPrefixes/get/List all the registered prefixes associated with the peering[get] # result = self.mgmt_client.registered_prefixes.list_by_peering(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME) # /PeeringServices/get/Get a peering service[get] - result = self.mgmt_client.peering_services.get(resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME) + result = self.mgmt_client.peering_services.get( + resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME + ) # /RegisteredAsns/get/List all the registered ASNs associated with the peering[get] # result = self.mgmt_client.registered_asns.list_by_peering(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME) @@ -256,7 +251,9 @@ def test_peering(self, resource_group): result = self.mgmt_client.peering_services.list_by_subscription() # /LegacyPeerings/get/List legacy peerings[get] - result = self.mgmt_client.legacy_peerings.list(peering_location="peeringLocation0", kind="Exchange", asn="65000") + result = self.mgmt_client.legacy_peerings.list( + peering_location="peeringLocation0", kind="Exchange", asn="65000" + ) # /PeerAsns/get/List peer ASNs in a subscription[get] result = self.mgmt_client.peer_asns.list_by_subscription() @@ -268,17 +265,11 @@ def test_peering(self, resource_group): result = self.mgmt_client.operations.list() # /PeeringServices/patch/Update peering service tags[patch] - TAGS = { - "tag0": "value0", - "tag1": "value1" - } + TAGS = {"tag0": "value0", "tag1": "value1"} # result = self.mgmt_client.peering_services.update(resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME, tags= + ToSnakeCase(k).toUpperCase() + ) # /Peerings/patch/Update peering tags[patch] - TAGS = { - "tag0": "value0", - "tag1": "value1" - } + TAGS = {"tag0": "value0", "tag1": "value1"} # result = self.mgmt_client.peerings.update(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, tags= + ToSnakeCase(k).toUpperCase() + ) # //post/Check if peering service provider is available in customer location[post] @@ -294,7 +285,9 @@ def test_peering(self, resource_group): # result = self.mgmt_client.registered_asns.delete(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME, registered_asn_name=REGISTERED_ASN_NAME) # /PeeringServices/delete/Delete a peering service[delete] - result = self.mgmt_client.peering_services.delete(resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME) + result = self.mgmt_client.peering_services.delete( + resource_group_name=RESOURCE_GROUP, peering_service_name=PEERING_SERVICE_NAME + ) # /Peerings/delete/Delete a peering[delete] # result = self.mgmt_client.peerings.delete(resource_group_name=RESOURCE_GROUP, peering_name=PEERING_NAME) @@ -303,6 +296,6 @@ def test_peering(self, resource_group): result = self.mgmt_client.peer_asns.delete(peer_asn_name=PEER_ASN_NAME) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_operations/_patch.py b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_operations/_patch.py +++ b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_patch.py b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_patch.py index c56eacc553c8..966f163a2cec 100644 --- a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_patch.py +++ b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=too-many-lines import datetime import sys diff --git a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_operations/_patch.py b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_operations/_patch.py +++ b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_patch.py b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_patch.py index 45bf0e5833f8..eb8fb7d7c5f6 100644 --- a/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_patch.py +++ b/sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + # pylint: disable=too-many-lines import sys import datetime diff --git a/sdk/personalizer/azure-ai-personalizer/samples/async_samples/multi_slot_rank_actions_and_reward_events_async.py b/sdk/personalizer/azure-ai-personalizer/samples/async_samples/multi_slot_rank_actions_and_reward_events_async.py index faf9af3dab27..b080dc7e07a1 100644 --- a/sdk/personalizer/azure-ai-personalizer/samples/async_samples/multi_slot_rank_actions_and_reward_events_async.py +++ b/sdk/personalizer/azure-ai-personalizer/samples/async_samples/multi_slot_rank_actions_and_reward_events_async.py @@ -13,6 +13,7 @@ USAGE: python multi_slot_rank_actions_and_reward_events_async.py Environment variables PERSONALIZER_ENDPOINT and PERSONALIZER_API_KEY must be set as per your personalizer instance. """ + import asyncio import os import sys diff --git a/sdk/personalizer/azure-ai-personalizer/samples/async_samples/rank_actions_and_reward_events_async.py b/sdk/personalizer/azure-ai-personalizer/samples/async_samples/rank_actions_and_reward_events_async.py index 09929abcca23..6020949be254 100644 --- a/sdk/personalizer/azure-ai-personalizer/samples/async_samples/rank_actions_and_reward_events_async.py +++ b/sdk/personalizer/azure-ai-personalizer/samples/async_samples/rank_actions_and_reward_events_async.py @@ -13,6 +13,7 @@ USAGE: python rank_actions_and_reward_events_async.py Environment variables PERSONALIZER_ENDPOINT and PERSONALIZER_API_KEY must be set as per your personalizer instance. """ + import asyncio import os import sys diff --git a/sdk/personalizer/azure-ai-personalizer/samples/rank_actions_and_reward_events.py b/sdk/personalizer/azure-ai-personalizer/samples/rank_actions_and_reward_events.py index 878cc5f2886e..f84a86ce807e 100644 --- a/sdk/personalizer/azure-ai-personalizer/samples/rank_actions_and_reward_events.py +++ b/sdk/personalizer/azure-ai-personalizer/samples/rank_actions_and_reward_events.py @@ -13,6 +13,7 @@ USAGE: python rank_actions_and_reward_events.py Environment variables PERSONALIZER_ENDPOINT and PERSONALIZER_API_KEY must be set as per your personalizer instance. """ + import os import sys from azure.ai.personalizer import PersonalizerClient diff --git a/sdk/personalizer/azure-ai-personalizer/setup.py b/sdk/personalizer/azure-ai-personalizer/setup.py index 340c4742be0d..7942c59d2998 100644 --- a/sdk/personalizer/azure-ai-personalizer/setup.py +++ b/sdk/personalizer/azure-ai-personalizer/setup.py @@ -35,7 +35,14 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/Azure/azure-sdk-for-python", - keywords=["azure", "personalizer", "cognitive services", "reinforcement learning", "contextual bandit", "azure sdk"], + keywords=[ + "azure", + "personalizer", + "cognitive services", + "reinforcement learning", + "contextual bandit", + "azure sdk", + ], author="Microsoft Corporation", author_email="azuresdkengsysadmins@microsoft.com", license="MIT License", diff --git a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/_patch.py b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/_patch.py +++ b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/_patch.py b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/_patch.py +++ b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/operations/_patch.py b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/operations/_patch.py +++ b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/models/_patch.py b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/models/_patch.py +++ b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/operations/_patch.py b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/operations/_patch.py +++ b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/azure/mgmt/pineconevectordb/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/setup.py b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/setup.py index 204fbf6a3474..28b4c02f2ff0 100644 --- a/sdk/pineconevectordb/azure-mgmt-pineconevectordb/setup.py +++ b/sdk/pineconevectordb/azure-mgmt-pineconevectordb/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/_patch.py b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/_patch.py +++ b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/_patch.py b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/_patch.py +++ b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/operations/_patch.py b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/operations/_patch.py +++ b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/models/_patch.py b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/models/_patch.py +++ b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/operations/_patch.py b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/operations/_patch.py +++ b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/azure/mgmt/planetarycomputer/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/setup.py b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/setup.py index c00d9dbd5a83..5ff71af8afbb 100644 --- a/sdk/planetarycomputer/azure-mgmt-planetarycomputer/setup.py +++ b/sdk/planetarycomputer/azure-mgmt-planetarycomputer/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_patch.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_patch.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_utils/utils.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_utils/utils.py index bd821750f4c6..707b7d8fac75 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_utils/utils.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/_utils/utils.py @@ -10,7 +10,6 @@ from .._utils.model_base import Model, SdkJSONEncoder - # file-like tuple could be `(filename, IO (or bytes))` or `(filename, IO (or bytes), content_type)` FileContent = Union[str, bytes, IO[str], IO[bytes]] diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/_patch.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/_patch.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_operations.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_operations.py index 54bc3f1903ec..2ee41d9d9721 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_operations.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_operations.py @@ -33,7 +33,12 @@ from azure.core.utils import case_insensitive_dict from ... import models as _models -from ..._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _deserialize_xml # pylint: disable=unused-import +from ..._utils.model_base import ( + Model as _Model, + SdkJSONEncoder, + _deserialize, + _deserialize_xml, +) # pylint: disable=unused-import from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import prepare_multipart_form_data from ...operations._operations import ( diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_patch.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_patch.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/models/_patch.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/models/_patch.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_operations.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_operations.py index 682ae83d26a2..c73414c7d51f 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_operations.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_operations.py @@ -33,8 +33,14 @@ from .. import models as _models from .._configuration import PlanetaryComputerProClientConfiguration -from .._utils.model_base import Model as _Model, SdkJSONEncoder, _deserialize, _deserialize_xml # pylint: disable=unused-import - # pylint: disable=unused-import +from .._utils.model_base import ( + Model as _Model, + SdkJSONEncoder, + _deserialize, + _deserialize_xml, +) # pylint: disable=unused-import + +# pylint: disable=unused-import from .._utils.serialization import Deserializer, Serializer from .._utils.utils import prepare_multipart_form_data diff --git a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_patch.py b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_patch.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/azure/planetarycomputer/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_00_stac_collection_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_00_stac_collection_async.py index 38fa9538ece3..d24887173375 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_00_stac_collection_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_00_stac_collection_async.py @@ -49,9 +49,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -63,16 +61,12 @@ async def create_collection(client: PlanetaryComputerProClient, collection_id): if any(c.id == collection_id for c in get_all_collections_response["collections"]): logging.info(f"Collection '{collection_id}' already exists, deleting it...") - collection_delete_operation = await client.stac.begin_delete_collection( - collection_id, polling=True - ) + collection_delete_operation = await client.stac.begin_delete_collection(collection_id, polling=True) await collection_delete_operation.result() logging.info(f"Deleted collection '{collection_id}'") # Define collection spatial and temporal extents (Georgia state bounds) - spatial_extent = StacExtensionSpatialExtent( - bounding_box=[[-85.605165, 30.357851, -80.839729, 35.000659]] - ) + spatial_extent = StacExtensionSpatialExtent(bounding_box=[[-85.605165, 30.357851, -80.839729, 35.000659]]) temporal_extent = StacCollectionTemporalExtent( interval=[ [ @@ -150,9 +144,7 @@ async def create_collection(client: PlanetaryComputerProClient, collection_id): # Create the collection logging.info(f"Creating collection '{collection_id}'...") - collection_create_operation = await client.stac.begin_create_collection( - body=collection_data, polling=False - ) + collection_create_operation = await client.stac.begin_create_collection(body=collection_data, polling=False) await collection_create_operation.result() logging.info(f"Collection '{collection_id}' created successfully") @@ -177,9 +169,7 @@ async def update_collection(client: PlanetaryComputerProClient, collection_id): # Update the collection logging.info("Updating collection...") - await client.stac.create_or_replace_collection( - collection_id=collection_id, body=collection - ) + await client.stac.create_or_replace_collection(collection_id=collection_id, body=collection) # Verify the update updated_collection = await client.stac.get_collection(collection_id=collection_id) @@ -200,9 +190,7 @@ async def manage_partition_type(client: PlanetaryComputerProClient, collection_i logging.info("Collection is not empty, skipping partition type update") else: logging.info("Updating partition type to YEAR scheme...") - await client.stac.replace_partition_type( - collection_id, body=PartitionType(scheme=PartitionTypeScheme.YEAR) - ) + await client.stac.replace_partition_type(collection_id, body=PartitionType(scheme=PartitionTypeScheme.YEAR)) logging.info("Partition type updated successfully") @@ -219,20 +207,12 @@ async def manage_render_options(client: PlanetaryComputerProClient, collection_i ) # Check if render option already exists - stac_collection_mosaics_get_all_response = await client.stac.list_render_options( - collection_id=collection_id - ) + stac_collection_mosaics_get_all_response = await client.stac.list_render_options(collection_id=collection_id) - if any( - ro.id == render_option.id for ro in stac_collection_mosaics_get_all_response - ): + if any(ro.id == render_option.id for ro in stac_collection_mosaics_get_all_response): logging.info("Render option 'natural-color' already exists.") - await client.stac.delete_render_option( - collection_id=collection_id, render_option_id=render_option.id - ) - logging.info( - "Deleted existing render option 'natural-color'. Proceeding to create a new one." - ) + await client.stac.delete_render_option(collection_id=collection_id, render_option_id=render_option.id) + logging.info("Deleted existing render option 'natural-color'. Proceeding to create a new one.") # Create render option without description initially render_option = RenderOption( @@ -244,9 +224,7 @@ async def manage_render_options(client: PlanetaryComputerProClient, collection_i ) logging.info(f"Creating render option '{render_option.id}'...") - await client.stac.create_render_option( - collection_id=collection_id, body=render_option - ) + await client.stac.create_render_option(collection_id=collection_id, body=render_option) # List render options await client.stac.list_render_options(collection_id=collection_id) @@ -277,17 +255,11 @@ async def manage_mosaics(client: PlanetaryComputerProClient, collection_id): ) # Check existing mosaics - stac_collection_mosaics_get_all_response = await client.stac.list_mosaics( - collection_id=collection_id - ) + stac_collection_mosaics_get_all_response = await client.stac.list_mosaics(collection_id=collection_id) if any(m.id == mosaic.id for m in stac_collection_mosaics_get_all_response): - logging.info( - f"Mosaic {mosaic.id} already exists. Deleting it before creating a new one." - ) - await client.stac.delete_mosaic( - collection_id=collection_id, mosaic_id=mosaic.id - ) + logging.info(f"Mosaic {mosaic.id} already exists. Deleting it before creating a new one.") + await client.stac.delete_mosaic(collection_id=collection_id, mosaic_id=mosaic.id) # Create Mosaic stac_collection_mosaics_add_response = await client.stac.add_mosaic( @@ -299,19 +271,15 @@ async def manage_mosaics(client: PlanetaryComputerProClient, collection_id): # Update with description mosaic.description = "Most recent available imagery in this collection" - stac_collection_mosaics_create_or_replace_response = ( - await client.stac.replace_mosaic( - collection_id=collection_id, - mosaic_id=mosaic.id, - body=mosaic, - ) + stac_collection_mosaics_create_or_replace_response = await client.stac.replace_mosaic( + collection_id=collection_id, + mosaic_id=mosaic.id, + body=mosaic, ) logging.info(stac_collection_mosaics_create_or_replace_response) # Get the mosaic - retrieved_mosaic = await client.stac.get_mosaic( - collection_id=collection_id, mosaic_id=mosaic.id - ) + retrieved_mosaic = await client.stac.get_mosaic(collection_id=collection_id, mosaic_id=mosaic.id) logging.info(retrieved_mosaic) @@ -349,9 +317,7 @@ async def get_landing_page(client: "PlanetaryComputerProClient"): async def manage_queryables(client: PlanetaryComputerProClient, collection_id): """Create and manage queryables for a collection.""" - stac_queryables_get_all_response = await client.stac.get_collection_queryables( - collection_id=collection_id - ) + stac_queryables_get_all_response = await client.stac.get_collection_queryables(collection_id=collection_id) queryable = StacQueryable( name="eo:cloud_cover", @@ -362,13 +328,8 @@ async def manage_queryables(client: PlanetaryComputerProClient, collection_id): }, ) - if any( - q == queryable.name - for q in stac_queryables_get_all_response["properties"].keys() - ): - await client.stac.delete_queryable( - collection_id=collection_id, queryable_name=queryable.name - ) + if any(q == queryable.name for q in stac_queryables_get_all_response["properties"].keys()): + await client.stac.delete_queryable(collection_id=collection_id, queryable_name=queryable.name) logging.info(f"Deleted existing '{queryable.name}' queryable.") stac_queryables_create_response = await client.stac.create_queryables( @@ -391,9 +352,7 @@ async def manage_queryables(client: PlanetaryComputerProClient, collection_id): await client.stac.list_queryables() -async def get_collection_configuration( - client: PlanetaryComputerProClient, collection_id -): +async def get_collection_configuration(client: PlanetaryComputerProClient, collection_id): """Get collection configuration.""" result = await client.stac.get_collection_configuration(collection_id=collection_id) logging.info(result) @@ -419,17 +378,13 @@ async def manage_collection_assets(client: PlanetaryComputerProClient, collectio thumbnail_tuple = ("thumbnail.png", thumbnail_bytes) try: - await client.stac.delete_collection_asset( - collection_id=collection_id, asset_id="thumbnail" - ) + await client.stac.delete_collection_asset(collection_id=collection_id, asset_id="thumbnail") logging.info("Deleted existing thumbnail asset.") except Exception: logging.info("No existing thumbnail asset to delete.") # Create Collection Asset - await client.stac.create_collection_asset( - collection_id=collection_id, body={"data": data, "file": thumbnail_tuple} - ) + await client.stac.create_collection_asset(collection_id=collection_id, body={"data": data, "file": thumbnail_tuple}) # Create or replace Collection Asset thumbnail_bytes.seek(0) # Reset BytesIO position @@ -448,9 +403,7 @@ async def manage_collection_assets(client: PlanetaryComputerProClient, collectio ) # Get the thumbnail as bytes - thumbnail_response = await client.stac.get_collection_thumbnail( - collection_id=collection_id - ) + thumbnail_response = await client.stac.get_collection_thumbnail(collection_id=collection_id) # Convert the generator to bytes # Collect the async iterator into a list @@ -472,9 +425,7 @@ async def main(): # Create client credential = DefaultAzureCredential() - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=credential, logging_enable=True - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=credential, logging_enable=True) logging.info(f"Connected to: {endpoint}") logging.info(f"Collection ID: {collection_id}\n") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_01_ingestion_management_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_01_ingestion_management_async.py index 8a2a3535fa17..e4364cdb88e4 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_01_ingestion_management_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_01_ingestion_management_async.py @@ -53,9 +53,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -84,15 +82,11 @@ async def create_managed_identity_ingestion_sources( logging.info(f"Deleted existing source: {source.id}") # Create connection info with managed identity - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) # Create ingestion source with unique ID source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = await client.ingestion.create_source(body=ingestion_source) logging.info(f"Created managed identity ingestion source: {created_source.id}") @@ -123,9 +117,7 @@ async def create_or_replace_source( "AZURE_INGESTION_SAS_CONTAINER_URI environment variable must be set for create_or_replace_source" ) if not sas_token: - raise ValueError( - "AZURE_INGESTION_SAS_TOKEN environment variable must be set for create_or_replace_source" - ) + raise ValueError("AZURE_INGESTION_SAS_TOKEN environment variable must be set for create_or_replace_source") # Create connection info with SAS token connection_info = SharedAccessSignatureTokenConnection( @@ -133,21 +125,17 @@ async def create_or_replace_source( ) # Create ingestion source - ingestion_source = SharedAccessSignatureTokenIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = SharedAccessSignatureTokenIngestionSource(id=source_id, connection_info=connection_info) # First call - replaces the existing source with original token - logging.info( - f"First call to create_or_replace_source with existing source ID: {source_id}" - ) - first_result = await client.ingestion.replace_source( - id=source_id, body=ingestion_source - ) + logging.info(f"First call to create_or_replace_source with existing source ID: {source_id}") + first_result = await client.ingestion.replace_source(id=source_id, body=ingestion_source) logging.info(f"First call result: {first_result.id}") # Second call - replaces again with modified token (demonstrates update capability) - updated_token = "sp=rl&st=2024-01-01T00:00:00Z&se=2024-12-31T23:59:59Z&sv=2023-01-03&sr=c&sig=UpdatedRandomSignature123456" + updated_token = ( + "sp=rl&st=2024-01-01T00:00:00Z&se=2024-12-31T23:59:59Z&sv=2023-01-03&sr=c&sig=UpdatedRandomSignature123456" + ) updated_connection_info = SharedAccessSignatureTokenConnection( container_uri=sas_container_uri, shared_access_signature_token=updated_token @@ -157,9 +145,7 @@ async def create_or_replace_source( ) logging.info("Second call to create_or_replace_source with updated SAS token") - second_result = await client.ingestion.replace_source( - id=source_id, body=updated_ingestion_source - ) + second_result = await client.ingestion.replace_source(id=source_id, body=updated_ingestion_source) logging.info(f"Second call result: {second_result.id}") return second_result.id @@ -190,9 +176,7 @@ async def create_github_public_ingestion( # Delete all existing ingestions logging.info("Deleting all existing ingestions...") async for ingestion in client.ingestion.list(collection_id=collection_id): - await client.ingestion.begin_delete( - collection_id=collection_id, ingestion_id=ingestion.id, polling=True - ) + await client.ingestion.begin_delete(collection_id=collection_id, ingestion_id=ingestion.id, polling=True) logging.info(f"Deleted existing ingestion: {ingestion.id}") # Create ingestion definition @@ -206,9 +190,7 @@ async def create_github_public_ingestion( # Create the ingestion logging.info("Creating ingestion for sample catalog...") - ingestion_response = await client.ingestion.create( - collection_id=collection_id, body=ingestion_definition - ) + ingestion_response = await client.ingestion.create(collection_id=collection_id, body=ingestion_definition) ingestion_id = ingestion_response.id logging.info(f"Created ingestion: {ingestion_id}") @@ -221,29 +203,21 @@ async def create_github_public_ingestion( ingestion = await client.ingestion.update( collection_id=collection_id, ingestion_id=ingestion_id, body=updated_definition ) - logging.info( - f"Updated ingestion display name to: {updated_definition.display_name}" - ) + logging.info(f"Updated ingestion display name to: {updated_definition.display_name}") return ingestion_id -async def get_ingestion_by_id( - client: PlanetaryComputerProClient, collection_id: str, ingestion_id: str -): +async def get_ingestion_by_id(client: PlanetaryComputerProClient, collection_id: str, ingestion_id: str): """Retrieve a specific ingestion by ID. This demonstrates using get to fetch a specific ingestion directly instead of listing all ingestions. """ - logging.info( - f"Retrieving ingestion: {ingestion_id} from collection: {collection_id}" - ) + logging.info(f"Retrieving ingestion: {ingestion_id} from collection: {collection_id}") try: - ingestion = await client.ingestion.get( - collection_id=collection_id, ingestion_id=ingestion_id - ) + ingestion = await client.ingestion.get(collection_id=collection_id, ingestion_id=ingestion_id) logging.info(f"Successfully retrieved ingestion: {ingestion.id}") logging.info(f" Display name: {ingestion.display_name}") @@ -257,9 +231,7 @@ async def get_ingestion_by_id( return None -async def list_ingestion_runs( - client: PlanetaryComputerProClient, collection_id: str, ingestion_id: str -): +async def list_ingestion_runs(client: PlanetaryComputerProClient, collection_id: str, ingestion_id: str): """List all runs for a specific ingestion. This demonstrates using list_runs to get all execution runs for an ingestion, @@ -268,9 +240,7 @@ async def list_ingestion_runs( logging.info(f"Listing runs for ingestion: {ingestion_id}") try: - async for run in client.ingestion.list_runs( - collection_id=collection_id, ingestion_id=ingestion_id - ): + async for run in client.ingestion.list_runs(collection_id=collection_id, ingestion_id=ingestion_id): operation = run.operation logging.info(f" Run ID: {run.id}") logging.info(f" Status: {operation.status}") @@ -284,16 +254,12 @@ async def list_ingestion_runs( if operation.status_history: for status_item in operation.status_history: if status_item.error_code: - logging.info( - f" Error: {status_item.error_code} - {status_item.error_message}" - ) + logging.info(f" Error: {status_item.error_code} - {status_item.error_message}") except Exception as e: logging.error(f"Failed to list runs for ingestion {ingestion_id}: {str(e)}") -async def create_sas_token_ingestion_source( - client: PlanetaryComputerProClient, sas_container_uri: str, sas_token: str -): +async def create_sas_token_ingestion_source(client: PlanetaryComputerProClient, sas_container_uri: str, sas_token: str): """Create a SAS token ingestion source with example values.""" # Validate required parameters @@ -327,15 +293,11 @@ async def create_sas_token_ingestion_source( return created_sas_source.id -async def create_ingestion_run( - client: PlanetaryComputerProClient, collection_id: str, ingestion_id: str -): +async def create_ingestion_run(client: PlanetaryComputerProClient, collection_id: str, ingestion_id: str): """Create an ingestion run.""" # Create ingestion run - run_response = await client.ingestion.create_run( - collection_id=collection_id, ingestion_id=ingestion_id - ) + run_response = await client.ingestion.create_run(collection_id=collection_id, ingestion_id=ingestion_id) logging.info(f"Created ingestion run: {run_response.id}") return run_response.id @@ -375,9 +337,7 @@ async def main(): # Get optional ingestion-specific configuration (for examples) container_uri = os.environ.get("PLANETARYCOMPUTER_INGESTION_CONTAINER_URI") source_catalog_url = os.environ.get("PLANETARYCOMPUTER_INGESTION_CATALOG_URL") - managed_identity_object_id = os.environ.get( - "PLANETARYCOMPUTER_MANAGED_IDENTITY_OBJECT_ID" - ) + managed_identity_object_id = os.environ.get("PLANETARYCOMPUTER_MANAGED_IDENTITY_OBJECT_ID") sas_container_uri = os.environ.get("AZURE_INGESTION_SAS_CONTAINER_URI") sas_token = os.environ.get("AZURE_INGESTION_SAS_TOKEN") @@ -405,23 +365,15 @@ async def main(): # Execute ingestion management workflow # 1. Create managed identity and SAS token ingestion sources - await create_managed_identity_ingestion_sources( - client, container_uri, managed_identity_object_id - ) - sas_source_id = await create_sas_token_ingestion_source( - client, sas_container_uri, sas_token - ) + await create_managed_identity_ingestion_sources(client, container_uri, managed_identity_object_id) + sas_source_id = await create_sas_token_ingestion_source(client, sas_container_uri, sas_token) # 2. Demonstrate advanced source operations (idempotent) - updated_source_id = await create_or_replace_source( - client, sas_container_uri, sas_token, sas_source_id - ) + updated_source_id = await create_or_replace_source(client, sas_container_uri, sas_token, sas_source_id) await get_source_by_id(client, updated_source_id) # 3. Run actual ingestion hosted on GitHub - public_ingestion_id = await create_github_public_ingestion( - client, collection_id, source_catalog_url - ) + public_ingestion_id = await create_github_public_ingestion(client, collection_id, source_catalog_url) # 4. Demonstrate advanced ingestion operations await get_ingestion_by_id(client, collection_id, public_ingestion_id) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_02_stac_specification_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_02_stac_specification_async.py index 808223554c38..72ed0e5528a4 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_02_stac_specification_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_02_stac_specification_async.py @@ -48,9 +48,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -69,11 +67,7 @@ async def search_collections(client: "PlanetaryComputerProClient"): # Show first few collections for collection in collections.collections[:3]: if collection.description: - desc = ( - collection.description[:100] + "..." - if len(collection.description) > 100 - else collection.description - ) + desc = collection.description[:100] + "..." if len(collection.description) > 100 else collection.description logging.info(f" - {collection.id}: {desc}") @@ -103,11 +97,7 @@ async def search_items(client: PlanetaryComputerProClient, collection_id): ], }, date_time="2021-01-01T00:00:00Z/2022-12-31T00:00:00Z", - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.DESC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.DESC)], limit=50, ) @@ -232,16 +222,12 @@ def get_sample_stac_item(collection_id: str, item_id: str) -> StacItem: async def create_stac_item(client: PlanetaryComputerProClient, collection_id, item_id): """Create a STAC item.""" stac_item = get_sample_stac_item(collection_id, item_id) - stac_item_get_items_response = await client.stac.get_item_collection( - collection_id=collection_id - ) + stac_item_get_items_response = await client.stac.get_item_collection(collection_id=collection_id) for item in stac_item_get_items_response.features: logging.error(item.id) if any(item.id == stac_item.id for item in stac_item_get_items_response.features): - logging.info( - f"Item {stac_item.id} already exists. Deleting it before creating a new one." - ) + logging.info(f"Item {stac_item.id} already exists. Deleting it before creating a new one.") delete_poller = await client.stac.begin_delete_item( collection_id=collection_id, item_id=stac_item.id, polling=True ) @@ -273,14 +259,10 @@ async def update_stac_item(client: PlanetaryComputerProClient, collection_id, it ) await stac_item_create_or_update_response.result() - logging.info( - f"Updated item {stac_item.id}, platform: {stac_item.properties['platform']}" - ) + logging.info(f"Updated item {stac_item.id}, platform: {stac_item.properties['platform']}") -async def create_or_replace_stac_item( - client: PlanetaryComputerProClient, collection_id, item_id -): +async def create_or_replace_stac_item(client: PlanetaryComputerProClient, collection_id, item_id): """Create or replace a STAC item (idempotent operation). This demonstrates using begin_create_or_replace_item which is idempotent: @@ -292,18 +274,14 @@ async def create_or_replace_stac_item( stac_item = get_sample_stac_item(collection_id, item_id) try: - create_poller = await client.stac.begin_create_item( - collection_id=collection_id, body=stac_item, polling=True - ) + create_poller = await client.stac.begin_create_item(collection_id=collection_id, body=stac_item, polling=True) await create_poller.result() logging.info(f"Created item {item_id}") except ResourceExistsError: logging.info(f"Item {item_id} already exists, continuing...") # Verify creation - created_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + created_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) logging.info(f"Verified item {created_item.id}") # Now demonstrate create_or_replace (replace since item exists) @@ -317,12 +295,8 @@ async def create_or_replace_stac_item( logging.info(f"Replaced item {item_id} using create_or_replace") # Verify replacement - replaced_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) - logging.info( - f"Verified replaced item, platform: {replaced_item.properties.get('platform', 'N/A')}" - ) + replaced_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) + logging.info(f"Verified replaced item, platform: {replaced_item.properties.get('platform', 'N/A')}") async def delete_stac_item(client: PlanetaryComputerProClient, collection_id, item_id): @@ -333,24 +307,18 @@ async def delete_stac_item(client: PlanetaryComputerProClient, collection_id, it """ try: # Check if item exists before attempting deletion - existing_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + existing_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) logging.info(f"Found item {existing_item.id} to delete") # Delete the item using begin_delete_item - delete_poller = await client.stac.begin_delete_item( - collection_id=collection_id, item_id=item_id, polling=True - ) + delete_poller = await client.stac.begin_delete_item(collection_id=collection_id, item_id=item_id, polling=True) await delete_poller.result() logging.info(f"Successfully deleted item {item_id}") # Verify deletion by attempting to retrieve the item try: await client.stac.get_item(collection_id=collection_id, item_id=item_id) - logging.warning( - f"Item {item_id} still exists after deletion (may take time to propagate)" - ) + logging.warning(f"Item {item_id} still exists after deletion (may take time to propagate)") except ResourceNotFoundError: logging.info(f"Verified item {item_id} was successfully deleted") @@ -386,11 +354,7 @@ async def query_items(client: PlanetaryComputerProClient, collection_id): # Sorted query sorted_options = StacSearchParameters( collections=[collection_id], - sort_by=[ - StacSortExtension( - field="eo:cloud_cover", direction=StacSearchSortingDirection.ASC - ) - ], + sort_by=[StacSortExtension(field="eo:cloud_cover", direction=StacSearchSortingDirection.ASC)], limit=3, ) @@ -404,16 +368,12 @@ async def query_items(client: PlanetaryComputerProClient, collection_id): async def get_queryables(client: PlanetaryComputerProClient, collection_id): """Get queryable properties for a collection.""" - queryables = await client.stac.get_collection_queryables( - collection_id=collection_id - ) + queryables = await client.stac.get_collection_queryables(collection_id=collection_id) properties = queryables.get("properties") if properties: for prop_name in list(properties.keys())[:10]: # Show first 10 - logging.info( - f" - {prop_name}: {properties[prop_name].get('description', '')}" - ) + logging.info(f" - {prop_name}: {properties[prop_name].get('description', '')}") async def main(): @@ -427,9 +387,7 @@ async def main(): # Create client credential = DefaultAzureCredential() - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=credential, logging_enable=False - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=credential, logging_enable=False) # Execute STAC specification operations await get_landing_page(client) @@ -442,9 +400,7 @@ async def main(): await create_stac_item(client, collection_id, item_id) await update_stac_item(client, collection_id, item_id) await create_or_replace_stac_item(client, collection_id, f"{item_id}_replace_demo") - await delete_stac_item( - client, collection_id, f"{item_id}_replace_demo" - ) # Clean up the item created above + await delete_stac_item(client, collection_id, f"{item_id}_replace_demo") # Clean up the item created above await get_collection(client, collection_id) await client.close() diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_03_shared_access_signature_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_03_shared_access_signature_async.py index 84d2a5b64bc6..a7e5a2c65e24 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_03_shared_access_signature_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_03_shared_access_signature_async.py @@ -30,9 +30,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -59,9 +57,7 @@ async def sign_asset_href(client: PlanetaryComputerProClient, collection_id: str else: raise Exception("No thumbnail found in collection assets.") - get_sign_response = await client.shared_access_signature.get_sign( - href=href, duration_in_minutes=60 - ) + get_sign_response = await client.shared_access_signature.get_sign(href=href, duration_in_minutes=60) return get_sign_response.href, href # Return both signed and unsigned hrefs @@ -82,9 +78,7 @@ async def download_asset(signed_href: str): # Check that it's a PNG by verifying the PNG magic bytes (89 50 4E 47) is_png = content[:8] == b"\x89PNG\r\n\x1a\n" if not is_png: - raise Exception( - f"Downloaded content is not a valid PNG file (magic bytes: {content[:8].hex()})" - ) + raise Exception(f"Downloaded content is not a valid PNG file (magic bytes: {content[:8].hex()})") async def revoke_token(client: "PlanetaryComputerProClient") -> None: diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_04_stac_item_tiler_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_04_stac_item_tiler_async.py index 6b1267aecb4a..770d13978b9f 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_04_stac_item_tiler_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_04_stac_item_tiler_async.py @@ -32,9 +32,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -52,9 +50,7 @@ async def display_response(response, filename): async def get_tile_matrix_definitions(client: "PlanetaryComputerProClient"): """Get tile matrix definitions for WebMercatorQuad.""" - result = await client.data.get_tile_matrix_definitions( - tile_matrix_set_id="WebMercatorQuad" - ) + result = await client.data.get_tile_matrix_definitions(tile_matrix_set_id="WebMercatorQuad") logging.info(result) @@ -64,29 +60,19 @@ async def list_tile_matrices(client: "PlanetaryComputerProClient"): logging.info(result) -async def get_asset_statistics( - client: PlanetaryComputerProClient, collection_id, item_id -): +async def get_asset_statistics(client: PlanetaryComputerProClient, collection_id, item_id): """Get asset statistics for an item.""" - result = await client.data.get_asset_statistics( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result = await client.data.get_asset_statistics(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info(result) -async def list_available_assets( - client: PlanetaryComputerProClient, collection_id, item_id -): +async def list_available_assets(client: PlanetaryComputerProClient, collection_id, item_id): """List available assets for an item.""" - result = client.data.list_available_assets( - collection_id=collection_id, item_id=item_id - ) + result = client.data.list_available_assets(collection_id=collection_id, item_id=item_id) logging.info(result) -async def get_item_asset_details( - client: PlanetaryComputerProClient, collection_id, item_id -): +async def get_item_asset_details(client: PlanetaryComputerProClient, collection_id, item_id): """Get basic info for dataset's assets. Returns dataset's basic information including data types, bounds, and other metadata @@ -107,9 +93,7 @@ async def get_bounds(client: PlanetaryComputerProClient, collection_id, item_id) logging.info(result) -async def crop_geo_json( - client: PlanetaryComputerProClient, collection_id, item_id, geojson -): +async def crop_geo_json(client: PlanetaryComputerProClient, collection_id, item_id, geojson): """Crop an item using GeoJSON geometry.""" crop_geo_json_response = await client.data.crop_geo_json( collection_id=collection_id, @@ -123,30 +107,22 @@ async def crop_geo_json( await display_response(crop_geo_json_response, f"crop_geojson_{item_id}.png") -async def crop_geo_json_with_dimensions( - client: PlanetaryComputerProClient, collection_id, item_id, geojson -): +async def crop_geo_json_with_dimensions(client: PlanetaryComputerProClient, collection_id, item_id, geojson): """Crop an item using GeoJSON geometry with specific dimensions.""" - crop_geo_json_with_dimensions_response = ( - await client.data.crop_geo_json_with_dimensions( - collection_id=collection_id, - item_id=item_id, - format=TilerImageFormat.PNG, - width=512, - height=512, - assets=["image"], - asset_band_indices="image|1,2,3", - body=geojson, - ) - ) - await display_response( - crop_geo_json_with_dimensions_response, f"crop_geojson_dims_{item_id}.png" + crop_geo_json_with_dimensions_response = await client.data.crop_geo_json_with_dimensions( + collection_id=collection_id, + item_id=item_id, + format=TilerImageFormat.PNG, + width=512, + height=512, + assets=["image"], + asset_band_indices="image|1,2,3", + body=geojson, ) + await display_response(crop_geo_json_with_dimensions_response, f"crop_geojson_dims_{item_id}.png") -async def get_geo_json_statistics( - client: PlanetaryComputerProClient, collection_id, item_id, geojson -): +async def get_geo_json_statistics(client: PlanetaryComputerProClient, collection_id, item_id, geojson): """Get statistics for a GeoJSON area.""" result = await client.data.get_geo_json_statistics( collection_id=collection_id, item_id=item_id, body=geojson, assets=["image"] @@ -156,9 +132,7 @@ async def get_geo_json_statistics( async def get_info_geo_json(client: PlanetaryComputerProClient, collection_id, item_id): """Get info for GeoJSON.""" - result = await client.data.get_info_geo_json( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result = await client.data.get_info_geo_json(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info(result) @@ -180,9 +154,7 @@ async def get_part(client: PlanetaryComputerProClient, collection_id, item_id, b await display_response(get_part_response, f"part_{item_id}.png") -async def get_part_with_dimensions( - client: PlanetaryComputerProClient, collection_id, item_id, bounds -): +async def get_part_with_dimensions(client: PlanetaryComputerProClient, collection_id, item_id, bounds): """Get a part of an item with specific bounds and dimensions.""" get_part_with_dimensions_response = await client.data.get_part_with_dimensions( collection_id=collection_id, @@ -197,9 +169,7 @@ async def get_part_with_dimensions( assets=["image"], asset_band_indices="image|1,2,3", ) - await display_response( - get_part_with_dimensions_response, f"part_dims_{item_id}.png" - ) + await display_response(get_part_with_dimensions_response, f"part_dims_{item_id}.png") async def get_point(client: PlanetaryComputerProClient, collection_id, item_id, point): @@ -229,9 +199,7 @@ async def get_preview(client: PlanetaryComputerProClient, collection_id, item_id await display_response(get_preview_response, f"preview_{item_id}.png") -async def get_preview_with_format( - client: PlanetaryComputerProClient, collection_id, item_id -): +async def get_preview_with_format(client: PlanetaryComputerProClient, collection_id, item_id): """Get a preview of an item with specific format.""" get_preview_with_format_response = await client.data.get_preview_with_format( collection_id=collection_id, @@ -242,16 +210,12 @@ async def get_preview_with_format( assets=["image"], asset_band_indices="image|1,2,3", ) - await display_response( - get_preview_with_format_response, f"preview_format_{item_id}.png" - ) + await display_response(get_preview_with_format_response, f"preview_format_{item_id}.png") async def list_statistics(client: PlanetaryComputerProClient, collection_id, item_id): """List statistics for an item.""" - result = client.data.list_statistics( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result = client.data.list_statistics(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info(result) @@ -285,14 +249,10 @@ async def get_tile(client: PlanetaryComputerProClient, collection_id, item_id): assets=["image"], asset_band_indices="image|1,2,3", ) - await display_response( - get_tile_with_matrix_set_response, f"tile_{item_id}_z14_x4349_y6564.png" - ) + await display_response(get_tile_with_matrix_set_response, f"tile_{item_id}_z14_x4349_y6564.png") -async def get_wmts_capabilities( - client: PlanetaryComputerProClient, collection_id, item_id -): +async def get_wmts_capabilities(client: PlanetaryComputerProClient, collection_id, item_id): """Get WMTS capabilities and save it locally.""" get_wmts_capabilities_response = await client.data.get_wmts_capabilities( collection_id=collection_id, diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_05_mosaics_tiler_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_05_mosaics_tiler_async.py index 2cc4d7916119..dbab8027e34c 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_05_mosaics_tiler_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_05_mosaics_tiler_async.py @@ -33,9 +33,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -57,31 +55,21 @@ async def register_mosaics_search(client: PlanetaryComputerProClient, collection ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_search_response = await client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_search_response = await client.data.register_mosaics_search(register_search_request) logging.info(register_search_response) return register_search_response async def get_mosaics_search_info(client: PlanetaryComputerProClient, search_id): """Get mosaics search info.""" - mosaics_info_search_response = await client.data.get_mosaics_search_info( - search_id=search_id - ) + mosaics_info_search_response = await client.data.get_mosaics_search_info(search_id=search_id) search = mosaics_info_search_response.search return search -async def get_mosaics_tile_json( - client: PlanetaryComputerProClient, search_id, collection_id -): +async def get_mosaics_tile_json(client: PlanetaryComputerProClient, search_id, collection_id): """Get mosaics tile JSON.""" get_mosaics_tile_json_response = await client.data.get_mosaics_tile_json( search_id=search_id, @@ -96,9 +84,7 @@ async def get_mosaics_tile_json( logging.info(get_mosaics_tile_json_response.as_dict()) -async def get_mosaics_tile( - client: PlanetaryComputerProClient, search_id, collection_id -): +async def get_mosaics_tile(client: PlanetaryComputerProClient, search_id, collection_id): """Get a mosaic tile and save it locally.""" mosaics_tile_matrix_sets_response = await client.data.get_mosaics_tile( search_id=search_id, @@ -122,9 +108,7 @@ async def get_mosaics_tile( filename = f"mosaic_tile_{search_id}_z13_x2174_y3282.png" with open(filename, "wb") as f: f.write(mosaics_tile_matrix_sets_bytes) - logging.info( - f"Tile saved as: {filename} ({len(mosaics_tile_matrix_sets_bytes)} bytes)" - ) + logging.info(f"Tile saved as: {filename} ({len(mosaics_tile_matrix_sets_bytes)} bytes)") async def get_mosaics_wmts_capabilities(client: PlanetaryComputerProClient, search_id): @@ -170,9 +154,7 @@ async def get_mosaics_assets_for_point(client: PlanetaryComputerProClient, searc logging.info(f"Assets for point: {get_lon_lat_assets_response[0]['id']}") -async def get_mosaics_assets_for_tile( - client: PlanetaryComputerProClient, search_id, collection_id -): +async def get_mosaics_assets_for_tile(client: PlanetaryComputerProClient, search_id, collection_id): """Get mosaic assets for a specific tile.""" result = await client.data.get_mosaics_assets_for_tile( search_id=search_id, @@ -232,9 +214,7 @@ async def create_static_image(client: PlanetaryComputerProClient, collection_id) ) # Create static image - image_response = await client.data.create_static_image( - collection_id=collection_id, body=image_request - ) + image_response = await client.data.create_static_image(collection_id=collection_id, body=image_request) # Extract image ID from the response URL image_id = image_response.url.split("?")[0].split("/")[-1] @@ -251,9 +231,7 @@ async def get_static_image(client: PlanetaryComputerProClient, collection_id, im The image data is returned as an iterator of bytes. """ # Get static image data - image_data = await client.data.get_static_image( - collection_id=collection_id, id=image_id - ) + image_data = await client.data.get_static_image(collection_id=collection_id, id=image_id) # Join the generator to get bytes # Collect the async iterator into a list diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_06_map_legends_async.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_06_map_legends_async.py index 95d19941f5e0..cb716e754128 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_06_map_legends_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/async/planetary_computer_06_map_legends_async.py @@ -25,9 +25,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -41,9 +39,7 @@ async def get_class_map_legend(client: "PlanetaryComputerProClient"): async def get_interval_legend(client: "PlanetaryComputerProClient"): """Get an interval legend (continuous color map).""" - result = await client.data.get_interval_legend( - classmap_name=ColorMapNames.MODIS64_A1 - ) + result = await client.data.get_interval_legend(classmap_name=ColorMapNames.MODIS64_A1) logging.info(result) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_00_stac_collection.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_00_stac_collection.py index 30214826b636..a6c3595a5320 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_00_stac_collection.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_00_stac_collection.py @@ -48,9 +48,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -62,16 +60,12 @@ def create_collection(client: PlanetaryComputerProClient, collection_id): if any(c.id == collection_id for c in get_all_collections_response["collections"]): logging.info(f"Collection '{collection_id}' already exists, deleting it...") - collection_delete_operation = client.stac.begin_delete_collection( - collection_id, polling=True - ) + collection_delete_operation = client.stac.begin_delete_collection(collection_id, polling=True) collection_delete_operation.result() logging.info(f"Deleted collection '{collection_id}'") # Define collection spatial and temporal extents (Georgia state bounds) - spatial_extent = StacExtensionSpatialExtent( - bounding_box=[[-85.605165, 30.357851, -80.839729, 35.000659]] - ) + spatial_extent = StacExtensionSpatialExtent(bounding_box=[[-85.605165, 30.357851, -80.839729, 35.000659]]) temporal_extent = StacCollectionTemporalExtent( interval=[ [ @@ -149,9 +143,7 @@ def create_collection(client: PlanetaryComputerProClient, collection_id): # Create the collection logging.info(f"Creating collection '{collection_id}'...") - collection_create_operation = client.stac.begin_create_collection( - body=collection_data, polling=False - ) + collection_create_operation = client.stac.begin_create_collection(body=collection_data, polling=False) collection_create_operation.result() logging.info(f"Collection '{collection_id}' created successfully") @@ -176,9 +168,7 @@ def update_collection(client: PlanetaryComputerProClient, collection_id): # Update the collection logging.info("Updating collection...") - client.stac.create_or_replace_collection( - collection_id=collection_id, body=collection - ) + client.stac.create_or_replace_collection(collection_id=collection_id, body=collection) # Verify the update updated_collection = client.stac.get_collection(collection_id=collection_id) @@ -199,9 +189,7 @@ def manage_partition_type(client: PlanetaryComputerProClient, collection_id): logging.info("Collection is not empty, skipping partition type update") else: logging.info("Updating partition type to YEAR scheme...") - client.stac.replace_partition_type( - collection_id, body=PartitionType(scheme=PartitionTypeScheme.YEAR) - ) + client.stac.replace_partition_type(collection_id, body=PartitionType(scheme=PartitionTypeScheme.YEAR)) logging.info("Partition type updated successfully") @@ -218,20 +206,12 @@ def manage_render_options(client: PlanetaryComputerProClient, collection_id): ) # Check if render option already exists - stac_collection_mosaics_get_all_response = client.stac.list_render_options( - collection_id=collection_id - ) + stac_collection_mosaics_get_all_response = client.stac.list_render_options(collection_id=collection_id) - if any( - ro.id == render_option.id for ro in stac_collection_mosaics_get_all_response - ): + if any(ro.id == render_option.id for ro in stac_collection_mosaics_get_all_response): logging.info("Render option 'natural-color' already exists.") - client.stac.delete_render_option( - collection_id=collection_id, render_option_id=render_option.id - ) - logging.info( - "Deleted existing render option 'natural-color'. Proceeding to create a new one." - ) + client.stac.delete_render_option(collection_id=collection_id, render_option_id=render_option.id) + logging.info("Deleted existing render option 'natural-color'. Proceeding to create a new one.") # Create render option without description initially render_option = RenderOption( @@ -258,9 +238,7 @@ def manage_render_options(client: PlanetaryComputerProClient, collection_id): ) # Get the created render option - retrieved_option = client.stac.get_render_option( - collection_id=collection_id, render_option_id=render_option.id - ) + retrieved_option = client.stac.get_render_option(collection_id=collection_id, render_option_id=render_option.id) logging.info(f"Retrieved: {retrieved_option.name}") @@ -274,14 +252,10 @@ def manage_mosaics(client: PlanetaryComputerProClient, collection_id): ) # Check existing mosaics - stac_collection_mosaics_get_all_response = client.stac.list_mosaics( - collection_id=collection_id - ) + stac_collection_mosaics_get_all_response = client.stac.list_mosaics(collection_id=collection_id) if any(m.id == mosaic.id for m in stac_collection_mosaics_get_all_response): - logging.info( - f"Mosaic {mosaic.id} already exists. Deleting it before creating a new one." - ) + logging.info(f"Mosaic {mosaic.id} already exists. Deleting it before creating a new one.") client.stac.delete_mosaic(collection_id=collection_id, mosaic_id=mosaic.id) # Create Mosaic @@ -302,9 +276,7 @@ def manage_mosaics(client: PlanetaryComputerProClient, collection_id): logging.info(stac_collection_mosaics_create_or_replace_response) # Get the mosaic - retrieved_mosaic = client.stac.get_mosaic( - collection_id=collection_id, mosaic_id=mosaic.id - ) + retrieved_mosaic = client.stac.get_mosaic(collection_id=collection_id, mosaic_id=mosaic.id) logging.info(retrieved_mosaic) @@ -342,9 +314,7 @@ def get_landing_page(client: PlanetaryComputerProClient): def manage_queryables(client: PlanetaryComputerProClient, collection_id): """Create and manage queryables for a collection.""" - stac_queryables_get_all_response = client.stac.get_collection_queryables( - collection_id=collection_id - ) + stac_queryables_get_all_response = client.stac.get_collection_queryables(collection_id=collection_id) queryable = StacQueryable( name="eo:cloud_cover", @@ -355,13 +325,8 @@ def manage_queryables(client: PlanetaryComputerProClient, collection_id): }, ) - if any( - q == queryable.name - for q in stac_queryables_get_all_response["properties"].keys() - ): - client.stac.delete_queryable( - collection_id=collection_id, queryable_name=queryable.name - ) + if any(q == queryable.name for q in stac_queryables_get_all_response["properties"].keys()): + client.stac.delete_queryable(collection_id=collection_id, queryable_name=queryable.name) logging.info(f"Deleted existing '{queryable.name}' queryable.") stac_queryables_create_response = client.stac.create_queryables( @@ -410,17 +375,13 @@ def manage_collection_assets(client: PlanetaryComputerProClient, collection_id): thumbnail_tuple = ("thumbnail.png", thumbnail_bytes) try: - client.stac.delete_collection_asset( - collection_id=collection_id, asset_id="thumbnail" - ) + client.stac.delete_collection_asset(collection_id=collection_id, asset_id="thumbnail") logging.info("Deleted existing thumbnail asset.") except Exception: logging.info("No existing thumbnail asset to delete.") # Create Collection Asset - client.stac.create_collection_asset( - collection_id=collection_id, body={"data": data, "file": thumbnail_tuple} - ) + client.stac.create_collection_asset(collection_id=collection_id, body={"data": data, "file": thumbnail_tuple}) # Create or replace Collection Asset thumbnail_bytes.seek(0) # Reset BytesIO position @@ -439,9 +400,7 @@ def manage_collection_assets(client: PlanetaryComputerProClient, collection_id): ) # Get the thumbnail as bytes - thumbnail_response = client.stac.get_collection_thumbnail( - collection_id=collection_id - ) + thumbnail_response = client.stac.get_collection_thumbnail(collection_id=collection_id) # Convert the generator to bytes thumbnail_bytes_result = b"".join(thumbnail_response) @@ -459,9 +418,7 @@ def main(): # Create client credential = DefaultAzureCredential() - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=credential, logging_enable=True - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=credential, logging_enable=True) logging.info(f"Connected to: {endpoint}") logging.info(f"Collection ID: {collection_id}\n") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_01_ingestion_management.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_01_ingestion_management.py index f207d51dce88..15e7e7502952 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_01_ingestion_management.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_01_ingestion_management.py @@ -24,12 +24,12 @@ Set the environment variable PLANETARYCOMPUTER_ENDPOINT with your endpoint URL. Set the environment variable PLANETARYCOMPUTER_COLLECTION_ID with your collection ID. - + Optional (for managed identity examples): Set the environment variable PLANETARYCOMPUTER_INGESTION_CONTAINER_URI with your container URI. Set the environment variable PLANETARYCOMPUTER_INGESTION_CATALOG_URL with your source catalog URL. Set the environment variable PLANETARYCOMPUTER_MANAGED_IDENTITY_OBJECT_ID with your managed identity object ID. - + Optional (for SAS token examples): Set the environment variable AZURE_INGESTION_SAS_CONTAINER_URI with your SAS container URI. Set the environment variable AZURE_INGESTION_SAS_TOKEN with your SAS token. @@ -129,7 +129,9 @@ def create_or_replace_source( logging.info(f"First call result: {first_result.id}") # Second call - replaces again with modified token (demonstrates update capability) - updated_token = "sp=rl&st=2024-01-01T00:00:00Z&se=2024-12-31T23:59:59Z&sv=2023-01-03&sr=c&sig=UpdatedRandomSignature123456" + updated_token = ( + "sp=rl&st=2024-01-01T00:00:00Z&se=2024-12-31T23:59:59Z&sv=2023-01-03&sr=c&sig=UpdatedRandomSignature123456" + ) updated_connection_info = SharedAccessSignatureTokenConnection( container_uri=sas_container_uri, shared_access_signature_token=updated_token diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_02_stac_specification.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_02_stac_specification.py index a0cfb9f890f5..e05cad319c6d 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_02_stac_specification.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_02_stac_specification.py @@ -47,9 +47,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -68,11 +66,7 @@ def search_collections(client: PlanetaryComputerProClient): # Show first few collections for collection in collections.collections[:3]: if collection.description: - desc = ( - collection.description[:100] + "..." - if len(collection.description) > 100 - else collection.description - ) + desc = collection.description[:100] + "..." if len(collection.description) > 100 else collection.description logging.info(f" - {collection.id}: {desc}") @@ -102,11 +96,7 @@ def search_items(client: PlanetaryComputerProClient, collection_id): ], }, date_time="2021-01-01T00:00:00Z/2022-12-31T00:00:00Z", - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.DESC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.DESC)], limit=50, ) @@ -231,19 +221,13 @@ def get_sample_stac_item(collection_id: str, item_id: str) -> StacItem: def create_stac_item(client: PlanetaryComputerProClient, collection_id, item_id): """Create a STAC item.""" stac_item = get_sample_stac_item(collection_id, item_id) - stac_item_get_items_response = client.stac.get_item_collection( - collection_id=collection_id - ) + stac_item_get_items_response = client.stac.get_item_collection(collection_id=collection_id) for item in stac_item_get_items_response.features: logging.error(item.id) if any(item.id == stac_item.id for item in stac_item_get_items_response.features): - logging.info( - f"Item {stac_item.id} already exists. Deleting it before creating a new one." - ) - client.stac.begin_delete_item( - collection_id=collection_id, item_id=stac_item.id, polling=True - ).result() + logging.info(f"Item {stac_item.id} already exists. Deleting it before creating a new one.") + client.stac.begin_delete_item(collection_id=collection_id, item_id=stac_item.id, polling=True).result() logging.info(f"Deleted item {stac_item.id}. Proceeding to create a new one.") else: logging.info(f"Item {stac_item.id} does not exist. Proceeding to create it.") @@ -271,14 +255,10 @@ def update_stac_item(client: PlanetaryComputerProClient, collection_id, item_id) ) stac_item_create_or_update_response.result() - logging.info( - f"Updated item {stac_item.id}, platform: {stac_item.properties['platform']}" - ) + logging.info(f"Updated item {stac_item.id}, platform: {stac_item.properties['platform']}") -def create_or_replace_stac_item( - client: PlanetaryComputerProClient, collection_id, item_id -): +def create_or_replace_stac_item(client: PlanetaryComputerProClient, collection_id, item_id): """Create or replace a STAC item (idempotent operation). This demonstrates using begin_create_or_replace_item which is idempotent: @@ -290,9 +270,7 @@ def create_or_replace_stac_item( stac_item = get_sample_stac_item(collection_id, item_id) try: - create_poller = client.stac.begin_create_item( - collection_id=collection_id, body=stac_item, polling=True - ) + create_poller = client.stac.begin_create_item(collection_id=collection_id, body=stac_item, polling=True) create_poller.result() logging.info(f"Created item {item_id}") except ResourceExistsError: @@ -314,9 +292,7 @@ def create_or_replace_stac_item( # Verify replacement replaced_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) - logging.info( - f"Verified replaced item, platform: {replaced_item.properties.get('platform', 'N/A')}" - ) + logging.info(f"Verified replaced item, platform: {replaced_item.properties.get('platform', 'N/A')}") def delete_stac_item(client: PlanetaryComputerProClient, collection_id, item_id): @@ -327,24 +303,18 @@ def delete_stac_item(client: PlanetaryComputerProClient, collection_id, item_id) """ try: # Check if item exists before attempting deletion - existing_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + existing_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) logging.info(f"Found item {existing_item.id} to delete") # Delete the item using begin_delete_item - delete_poller = client.stac.begin_delete_item( - collection_id=collection_id, item_id=item_id, polling=True - ) + delete_poller = client.stac.begin_delete_item(collection_id=collection_id, item_id=item_id, polling=True) delete_poller.result() logging.info(f"Successfully deleted item {item_id}") # Verify deletion by attempting to retrieve the item try: client.stac.get_item(collection_id=collection_id, item_id=item_id) - logging.warning( - f"Item {item_id} still exists after deletion (may take time to propagate)" - ) + logging.warning(f"Item {item_id} still exists after deletion (may take time to propagate)") except ResourceNotFoundError: logging.info(f"Verified item {item_id} was successfully deleted") @@ -380,11 +350,7 @@ def query_items(client: PlanetaryComputerProClient, collection_id): # Sorted query sorted_options = StacSearchParameters( collections=[collection_id], - sort_by=[ - StacSortExtension( - field="eo:cloud_cover", direction=StacSearchSortingDirection.ASC - ) - ], + sort_by=[StacSortExtension(field="eo:cloud_cover", direction=StacSearchSortingDirection.ASC)], limit=3, ) @@ -403,9 +369,7 @@ def get_queryables(client: PlanetaryComputerProClient, collection_id): if properties: for prop_name in list(properties.keys())[:10]: # Show first 10 - logging.info( - f" - {prop_name}: {properties[prop_name].get('description', '')}" - ) + logging.info(f" - {prop_name}: {properties[prop_name].get('description', '')}") def main(): @@ -419,9 +383,7 @@ def main(): # Create client credential = DefaultAzureCredential() - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=credential, logging_enable=False - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=credential, logging_enable=False) # Execute STAC specification operations get_landing_page(client) @@ -434,9 +396,7 @@ def main(): create_stac_item(client, collection_id, item_id) update_stac_item(client, collection_id, item_id) create_or_replace_stac_item(client, collection_id, f"{item_id}_replace_demo") - delete_stac_item( - client, collection_id, f"{item_id}_replace_demo" - ) # Clean up the item created above + delete_stac_item(client, collection_id, f"{item_id}_replace_demo") # Clean up the item created above get_collection(client, collection_id) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_04_stac_item_tiler.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_04_stac_item_tiler.py index c224d90aac58..9968bec34b4b 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_04_stac_item_tiler.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_04_stac_item_tiler.py @@ -31,9 +31,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -47,9 +45,7 @@ def display_response(response, filename): def get_tile_matrix_definitions(client: PlanetaryComputerProClient): """Get tile matrix definitions for WebMercatorQuad.""" - result = client.data.get_tile_matrix_definitions( - tile_matrix_set_id="WebMercatorQuad" - ) + result = client.data.get_tile_matrix_definitions(tile_matrix_set_id="WebMercatorQuad") logging.info(result) @@ -61,17 +57,13 @@ def list_tile_matrices(client: PlanetaryComputerProClient): def get_asset_statistics(client: PlanetaryComputerProClient, collection_id, item_id): """Get asset statistics for an item.""" - result = client.data.get_asset_statistics( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result = client.data.get_asset_statistics(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info(result) def list_available_assets(client: PlanetaryComputerProClient, collection_id, item_id): """List available assets for an item.""" - result = client.data.list_available_assets( - collection_id=collection_id, item_id=item_id - ) + result = client.data.list_available_assets(collection_id=collection_id, item_id=item_id) logging.info(result) @@ -83,9 +75,7 @@ def get_item_asset_details(client: PlanetaryComputerProClient, collection_id, it """ # Get info for specific assets - result_specific = client.data.get_item_asset_details( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result_specific = client.data.get_item_asset_details(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info("Assets info (image asset only):") logging.info(f" Dataset: {result_specific}") @@ -110,9 +100,7 @@ def crop_geo_json(client: PlanetaryComputerProClient, collection_id, item_id, ge display_response(crop_geo_json_response, f"crop_geojson_{item_id}.png") -def crop_geo_json_with_dimensions( - client: PlanetaryComputerProClient, collection_id, item_id, geojson -): +def crop_geo_json_with_dimensions(client: PlanetaryComputerProClient, collection_id, item_id, geojson): """Crop an item using GeoJSON geometry with specific dimensions.""" crop_geo_json_with_dimensions_response = client.data.crop_geo_json_with_dimensions( collection_id=collection_id, @@ -124,14 +112,10 @@ def crop_geo_json_with_dimensions( asset_band_indices="image|1,2,3", body=geojson, ) - display_response( - crop_geo_json_with_dimensions_response, f"crop_geojson_dims_{item_id}.png" - ) + display_response(crop_geo_json_with_dimensions_response, f"crop_geojson_dims_{item_id}.png") -def get_geo_json_statistics( - client: PlanetaryComputerProClient, collection_id, item_id, geojson -): +def get_geo_json_statistics(client: PlanetaryComputerProClient, collection_id, item_id, geojson): """Get statistics for a GeoJSON area.""" result = client.data.get_geo_json_statistics( collection_id=collection_id, item_id=item_id, body=geojson, assets=["image"] @@ -141,9 +125,7 @@ def get_geo_json_statistics( def get_info_geo_json(client: PlanetaryComputerProClient, collection_id, item_id): """Get info for GeoJSON.""" - result = client.data.get_info_geo_json( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result = client.data.get_info_geo_json(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info(result) @@ -165,9 +147,7 @@ def get_part(client: PlanetaryComputerProClient, collection_id, item_id, bounds) display_response(get_part_response, f"part_{item_id}.png") -def get_part_with_dimensions( - client: PlanetaryComputerProClient, collection_id, item_id, bounds -): +def get_part_with_dimensions(client: PlanetaryComputerProClient, collection_id, item_id, bounds): """Get a part of an item with specific bounds and dimensions.""" get_part_with_dimensions_response = client.data.get_part_with_dimensions( collection_id=collection_id, @@ -228,9 +208,7 @@ def get_preview_with_format(client: PlanetaryComputerProClient, collection_id, i def list_statistics(client: PlanetaryComputerProClient, collection_id, item_id): """List statistics for an item.""" - result = client.data.list_statistics( - collection_id=collection_id, item_id=item_id, assets=["image"] - ) + result = client.data.list_statistics(collection_id=collection_id, item_id=item_id, assets=["image"]) logging.info(result) @@ -264,9 +242,7 @@ def get_tile(client: PlanetaryComputerProClient, collection_id, item_id): assets=["image"], asset_band_indices="image|1,2,3", ) - display_response( - get_tile_with_matrix_set_response, f"tile_{item_id}_z14_x4349_y6564.png" - ) + display_response(get_tile_with_matrix_set_response, f"tile_{item_id}_z14_x4349_y6564.png") def get_wmts_capabilities(client: PlanetaryComputerProClient, collection_id, item_id): @@ -300,9 +276,7 @@ def main(): collection_id = os.environ.get("PLANETARYCOMPUTER_COLLECTION_ID") item_id = "ga_m_3308421_se_16_060_20211114" - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=DefaultAzureCredential() - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=DefaultAzureCredential()) # Define geometry for operations geometry = Polygon( diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_05_mosaics_tiler.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_05_mosaics_tiler.py index 1f615ff2314a..9fefa3d69b05 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_05_mosaics_tiler.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_05_mosaics_tiler.py @@ -32,9 +32,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -56,24 +54,16 @@ def register_mosaics_search(client: PlanetaryComputerProClient, collection_id): ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_search_response = client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_search_response = client.data.register_mosaics_search(register_search_request) logging.info(register_search_response) return register_search_response def get_mosaics_search_info(client: PlanetaryComputerProClient, search_id): """Get mosaics search info.""" - mosaics_info_search_response = client.data.get_mosaics_search_info( - search_id=search_id - ) + mosaics_info_search_response = client.data.get_mosaics_search_info(search_id=search_id) search = mosaics_info_search_response.search return search @@ -113,9 +103,7 @@ def get_mosaics_tile(client: PlanetaryComputerProClient, search_id, collection_i filename = f"mosaic_tile_{search_id}_z13_x2174_y3282.png" with open(filename, "wb") as f: f.write(mosaics_tile_matrix_sets_bytes) - logging.info( - f"Tile saved as: {filename} ({len(mosaics_tile_matrix_sets_bytes)} bytes)" - ) + logging.info(f"Tile saved as: {filename} ({len(mosaics_tile_matrix_sets_bytes)} bytes)") def get_mosaics_wmts_capabilities(client: PlanetaryComputerProClient, search_id): @@ -157,9 +145,7 @@ def get_mosaics_assets_for_point(client: PlanetaryComputerProClient, search_id): logging.info(f"Assets for point: {get_lon_lat_assets_response[0]['id']}") -def get_mosaics_assets_for_tile( - client: PlanetaryComputerProClient, search_id, collection_id -): +def get_mosaics_assets_for_tile(client: PlanetaryComputerProClient, search_id, collection_id): """Get mosaic assets for a specific tile.""" result = client.data.get_mosaics_assets_for_tile( search_id=search_id, @@ -219,9 +205,7 @@ def create_static_image(client: PlanetaryComputerProClient, collection_id): ) # Create static image - image_response = client.data.create_static_image( - collection_id=collection_id, body=image_request - ) + image_response = client.data.create_static_image(collection_id=collection_id, body=image_request) # Extract image ID from the response URL image_id = image_response.url.split("?")[0].split("/")[-1] @@ -258,9 +242,7 @@ def main(): assert endpoint is not None assert collection_id is not None - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=DefaultAzureCredential() - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=DefaultAzureCredential()) # Execute mosaic tiler operations register_search_response = register_mosaics_search(client, collection_id) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_06_map_legends.py b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_06_map_legends.py index 484ea7b65915..c2ede393ceb1 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_06_map_legends.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/samples/planetary_computer_06_map_legends.py @@ -24,9 +24,7 @@ import logging # Enable HTTP request/response logging -logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( - logging.ERROR -) +logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR) logging.basicConfig(level=logging.INFO) @@ -63,9 +61,7 @@ def main(): if not endpoint: raise ValueError("PLANETARYCOMPUTER_ENDPOINT environment variable must be set") - client = PlanetaryComputerProClient( - endpoint=endpoint, credential=DefaultAzureCredential() - ) + client = PlanetaryComputerProClient(endpoint=endpoint, credential=DefaultAzureCredential()) get_class_map_legend(client) get_interval_legend(client) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/conftest.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/conftest.py index 42570444fe5d..c2532a93b240 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/conftest.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/conftest.py @@ -42,12 +42,8 @@ def add_sanitizers(test_proxy): planetarycomputer_subscription_id = os.environ.get( "PLANETARYCOMPUTER_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" ) - planetarycomputer_tenant_id = os.environ.get( - "PLANETARYCOMPUTER_TENANT_ID", "00000000-0000-0000-0000-000000000000" - ) - planetarycomputer_client_id = os.environ.get( - "PLANETARYCOMPUTER_CLIENT_ID", "00000000-0000-0000-0000-000000000000" - ) + planetarycomputer_tenant_id = os.environ.get("PLANETARYCOMPUTER_TENANT_ID", "00000000-0000-0000-0000-000000000000") + planetarycomputer_client_id = os.environ.get("PLANETARYCOMPUTER_CLIENT_ID", "00000000-0000-0000-0000-000000000000") planetarycomputer_client_secret = os.environ.get( "PLANETARYCOMPUTER_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" ) @@ -55,12 +51,8 @@ def add_sanitizers(test_proxy): regex=planetarycomputer_subscription_id, value="00000000-0000-0000-0000-000000000000", ) - add_general_regex_sanitizer( - regex=planetarycomputer_tenant_id, value="00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer( - regex=planetarycomputer_client_id, value="00000000-0000-0000-0000-000000000000" - ) + add_general_regex_sanitizer(regex=planetarycomputer_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=planetarycomputer_client_id, value="00000000-0000-0000-0000-000000000000") add_general_regex_sanitizer( regex=planetarycomputer_client_secret, value="00000000-0000-0000-0000-000000000000", @@ -71,9 +63,7 @@ def add_sanitizers(test_proxy): add_body_key_sanitizer(json_path="$..access_token", value="access_token") # Sanitize request tracking headers - add_header_regex_sanitizer( - key="X-Request-ID", value="00000000000000000000000000000000" - ) + add_header_regex_sanitizer(key="X-Request-ID", value="00000000000000000000000000000000") add_header_regex_sanitizer(key="Date", value="Mon, 01 Jan 2024 00:00:00 GMT") add_header_regex_sanitizer(key="Server-Timing", value="total;dur=0.0") add_header_regex_sanitizer( @@ -82,9 +72,7 @@ def add_sanitizers(test_proxy): ) # Note: Removed Content-Length sanitizer as it was causing matching issues with DELETE requests # add_header_regex_sanitizer(key="Content-Length", value="100000") - add_header_regex_sanitizer( - key="mise-correlation-id", value="00000000-0000-0000-0000-000000000000" - ) + add_header_regex_sanitizer(key="mise-correlation-id", value="00000000-0000-0000-0000-000000000000") # Sanitize the endpoint hostname to match the test proxy's format from devtools_testutils import add_uri_regex_sanitizer, add_general_string_sanitizer @@ -98,9 +86,7 @@ def add_sanitizers(test_proxy): regex=r"https?://[a-zA-Z0-9\-\.]+\.geocatalog\.[a-zA-Z0-9\-\.]+\.azure\.com", value=fake_endpoint, ) - add_uri_regex_sanitizer( - regex=r"https?://[a-zA-Z0-9\-\.]+\.geocatalog\.azure\.com", value=fake_endpoint - ) + add_uri_regex_sanitizer(regex=r"https?://[a-zA-Z0-9\-\.]+\.geocatalog\.azure\.com", value=fake_endpoint) # In live mode, also add a string sanitizer for the real endpoint value # This ensures that the EnvironmentVariableLoader's auto-sanitizer uses our fake value @@ -137,9 +123,7 @@ def add_sanitizers(test_proxy): ]: real_container_url = os.environ.get(env_var, "") if real_container_url: - add_general_string_sanitizer( - target=real_container_url, value=fake_container_url - ) + add_general_string_sanitizer(target=real_container_url, value=fake_container_url) # Sanitize storage account URLs WITH URL-encoded protocol prefix (e.g., in query parameters) # Matches: https%3A%2F%2Fcontosdatasa.blob.core.windows.net → https%3A%2F%2FSANITIZED.blob.core.windows.net @@ -256,17 +240,13 @@ def add_sanitizers(test_proxy): # Pattern: naip-atl-bde3e846 -> naip-atl-00000000 # The service appends a random 8-character hex hash to collection IDs at runtime # The env var may be "naip-atl" but the service will return "naip-atl-bde3e846" - planetarycomputer_collection_id = os.environ.get( - "PLANETARYCOMPUTER_COLLECTION_ID", "naip-atl" - ) + planetarycomputer_collection_id = os.environ.get("PLANETARYCOMPUTER_COLLECTION_ID", "naip-atl") # ALWAYS sanitize any collection ID with hash suffix pattern # We use the base collection name from env var (which may or may not already have a hash) import re - collection_base_match = re.match( - r"^(.+)-[a-f0-9]{8}$", planetarycomputer_collection_id - ) + collection_base_match = re.match(r"^(.+)-[a-f0-9]{8}$", planetarycomputer_collection_id) if collection_base_match: # Env var already has hash: use the base part collection_base = collection_base_match.group(1) diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection.py index a3f89ed363e5..023ceeae838d 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection.py @@ -63,14 +63,10 @@ def test_01_list_collections(self, planetarycomputer_endpoint): # Validate response structure assert response is not None, "Response should not be None" - assert hasattr( - response, "collections" - ), "Response should have 'collections' attribute" + assert hasattr(response, "collections"), "Response should have 'collections' attribute" collections = response.collections - assert isinstance( - collections, list - ), f"Collections should be a list, got {type(collections)}" + assert isinstance(collections, list), f"Collections should be a list, got {type(collections)}" test_logger.info(f"Number of collections: {len(collections)}") @@ -108,14 +104,10 @@ def test_02_get_conformance_class(self, planetarycomputer_endpoint): # Validate response structure assert response is not None, "Response should not be None" - assert hasattr( - response, "conforms_to" - ), "Response should have 'conforms_to' attribute" + assert hasattr(response, "conforms_to"), "Response should have 'conforms_to' attribute" conforms_to = response.conforms_to - assert isinstance( - conforms_to, list - ), f"conformsTo should be a list, got {type(conforms_to)}" + assert isinstance(conforms_to, list), f"conformsTo should be a list, got {type(conforms_to)}" assert len(conforms_to) > 0, "Should have at least one conformance class" test_logger.info(f"Number of conformance classes: {len(conforms_to)}") @@ -126,9 +118,7 @@ def test_02_get_conformance_class(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy - def test_03_get_collection( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_03_get_collection(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific STAC collection. @@ -144,12 +134,8 @@ def test_03_get_collection( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_collection(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.get_collection(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Collection ID: {response.id}") @@ -158,12 +144,8 @@ def test_03_get_collection( # Validate response structure assert response is not None, "Response should not be None" - assert ( - response.id == planetarycomputer_collection_id - ), "Collection ID should match requested ID" - assert ( - response.title is not None and len(response.title) > 0 - ), "Collection should have a title" + assert response.id == planetarycomputer_collection_id, "Collection ID should match requested ID" + assert response.title is not None and len(response.title) > 0, "Collection should have a title" assert response.description is not None, "Collection should have a description" assert response.extent is not None, "Collection should have extent" assert response.license is not None, "Collection should have license" @@ -172,9 +154,7 @@ def test_03_get_collection( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_04_get_partition_type( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_04_get_partition_type(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting partition type for a collection. @@ -190,9 +170,7 @@ def test_04_get_partition_type( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_partition_type(collection_id='{planetarycomputer_collection_id}')" - ) + test_logger.info(f"Calling: get_partition_type(collection_id='{planetarycomputer_collection_id}')") response = client.stac.get_partition_type(planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") @@ -205,17 +183,13 @@ def test_04_get_partition_type( # Validate scheme is a valid PartitionTypeScheme valid_schemes = [s.value for s in PartitionTypeScheme] - assert ( - response.scheme in valid_schemes - ), f"Partition scheme should be one of {valid_schemes}" + assert response.scheme in valid_schemes, f"Partition scheme should be one of {valid_schemes}" test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_05_list_render_options( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_05_list_render_options(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test listing render options for a collection. @@ -231,20 +205,14 @@ def test_05_list_render_options( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: list_render_options(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.list_render_options( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: list_render_options(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.list_render_options(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Number of render options: {len(response)}") # Validate response structure - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" if len(response) > 0: first_option = response[0] @@ -260,9 +228,7 @@ def test_05_list_render_options( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_06_get_tile_settings( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_06_get_tile_settings(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting tile settings for a collection. @@ -278,12 +244,8 @@ def test_06_get_tile_settings( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_tile_settings(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.get_tile_settings( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_tile_settings(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.get_tile_settings(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") if hasattr(response, "as_dict"): @@ -305,9 +267,7 @@ def test_06_get_tile_settings( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_07_list_mosaics( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_07_list_mosaics(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test listing mosaics for a collection. @@ -323,20 +283,14 @@ def test_07_list_mosaics( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: list_mosaics(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.list_mosaics( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: list_mosaics(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.list_mosaics(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Number of mosaics: {len(response)}") # Validate response structure - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" if len(response) > 0: first_mosaic = response[0] @@ -350,9 +304,7 @@ def test_07_list_mosaics( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_08_get_collection_queryables( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_08_get_collection_queryables(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting queryables for a collection. @@ -368,17 +320,11 @@ def test_08_get_collection_queryables( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_collection_queryables(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection_queryables(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") - test_logger.info( - f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}" - ) + test_logger.info(f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}") # Validate response structure assert isinstance(response, MutableMapping), f"Response should be a dict, got {type(response)}" @@ -415,9 +361,7 @@ def test_09_list_queryables(self, planetarycomputer_endpoint): response = client.stac.list_queryables() test_logger.info(f"Response type: {type(response)}") - test_logger.info( - f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}" - ) + test_logger.info(f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}") # Validate response structure assert isinstance(response, MutableMapping), f"Response should be a dict, got {type(response)}" @@ -430,9 +374,7 @@ def test_09_list_queryables(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy - def test_10_get_collection_configuration( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_10_get_collection_configuration(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting collection configuration. @@ -448,12 +390,8 @@ def test_10_get_collection_configuration( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_collection_configuration(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.get_collection_configuration( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection_configuration(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.get_collection_configuration(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") if hasattr(response, "as_dict"): @@ -467,9 +405,7 @@ def test_10_get_collection_configuration( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_10a_create_thumbnail_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_10a_create_thumbnail_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a thumbnail collection asset. This ensures the collection has a thumbnail for subsequent tests. @@ -487,22 +423,12 @@ def test_10a_create_thumbnail_asset( # Delete the thumbnail asset if it already exists try: - test_logger.info( - "Checking if asset 'thumbnail' already exists and deleting if found..." - ) - client.stac.delete_collection_asset( - collection_id=planetarycomputer_collection_id, asset_id="thumbnail" - ) + test_logger.info("Checking if asset 'thumbnail' already exists and deleting if found...") + client.stac.delete_collection_asset(collection_id=planetarycomputer_collection_id, asset_id="thumbnail") test_logger.info("Deleted existing 'thumbnail'") except Exception as e: - if ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ): - test_logger.info( - "Asset 'thumbnail' does not exist, proceeding with creation" - ) + if "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower(): + test_logger.info("Asset 'thumbnail' does not exist, proceeding with creation") else: test_logger.warning(f"Error checking/deleting asset: {e}") @@ -516,8 +442,7 @@ def test_10a_create_thumbnail_asset( # Minimal valid 16x9 RGB PNG image png_bytes = base64.b64decode( - "iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAIAAAC0SDtlAAAAEklEQVR4nGNg" - "aGAgDY1qGBQaAAlbSAENQjjgAAAAAElFTkSuQmCC" + "iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAIAAAC0SDtlAAAAEklEQVR4nGNg" "aGAgDY1qGBQaAAlbSAENQjjgAAAAAElFTkSuQmCC" ) file_content = BytesIO(png_bytes) @@ -535,18 +460,14 @@ def test_10a_create_thumbnail_asset( assert response is not None # Verify the thumbnail asset now exists on the collection - collection = client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = client.stac.get_collection(collection_id=planetarycomputer_collection_id) assert "thumbnail" in collection.assets, "Collection should now have a thumbnail asset" test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_11_get_collection_thumbnail( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_11_get_collection_thumbnail(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting collection thumbnail. @@ -563,23 +484,13 @@ def test_11_get_collection_thumbnail( client = self.create_client(endpoint=planetarycomputer_endpoint) # First check if collection has thumbnail asset - collection = client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = client.stac.get_collection(collection_id=planetarycomputer_collection_id) - if ( - not hasattr(collection, "assets") - or collection.assets is None - or "thumbnail" not in collection.assets - ): + if not hasattr(collection, "assets") or collection.assets is None or "thumbnail" not in collection.assets: assert False, "Collection does not have a thumbnail asset" - test_logger.info( - f"Calling: get_collection_thumbnail(collection_id='{planetarycomputer_collection_id}')" - ) - response = client.stac.get_collection_thumbnail( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection_thumbnail(collection_id='{planetarycomputer_collection_id}')") + response = client.stac.get_collection_thumbnail(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") @@ -590,9 +501,7 @@ def test_11_get_collection_thumbnail( # Validate image data assert len(thumbnail_bytes) > 0, "Thumbnail bytes should not be empty" - assert ( - len(thumbnail_bytes) > 50 - ), f"Thumbnail should be substantial, got only {len(thumbnail_bytes)} bytes" + assert len(thumbnail_bytes) > 50, f"Thumbnail should be substantial, got only {len(thumbnail_bytes)} bytes" # Check for common image format magic bytes # PNG: 89 50 4E 47 @@ -611,9 +520,7 @@ def test_11_get_collection_thumbnail( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_12_create_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_12_create_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a render option for a collection. """ @@ -631,9 +538,7 @@ def test_12_create_render_option( collection_id=planetarycomputer_collection_id, render_option_id="test-natural-color", ) - test_logger.info( - "Render option 'test-natural-color' already exists, deleting it first" - ) + test_logger.info("Render option 'test-natural-color' already exists, deleting it first") client.stac.delete_render_option( collection_id=planetarycomputer_collection_id, render_option_id="test-natural-color", @@ -653,9 +558,7 @@ def test_12_create_render_option( test_logger.info( f"Calling: create_render_option(collection_id='{planetarycomputer_collection_id}', body={render_option})" ) - response = client.stac.create_render_option( - collection_id=planetarycomputer_collection_id, body=render_option - ) + response = client.stac.create_render_option(collection_id=planetarycomputer_collection_id, body=render_option) test_logger.info(f"Response: {response}") assert response is not None @@ -666,9 +569,7 @@ def test_12_create_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_13_get_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_13_get_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific render option. """ @@ -695,9 +596,7 @@ def test_13_get_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_14_replace_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_14_replace_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a render option. """ @@ -736,9 +635,7 @@ def test_14_replace_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_14a_delete_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_14a_delete_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a render option. First creates a render option specifically for deletion. @@ -761,9 +658,7 @@ def test_14a_delete_render_option( ) test_logger.info(f"Creating render option for deletion: {render_option.id}") - client.stac.create_render_option( - collection_id=planetarycomputer_collection_id, body=render_option - ) + client.stac.create_render_option(collection_id=planetarycomputer_collection_id, body=render_option) # Verify it exists retrieved = client.stac.get_render_option( @@ -793,19 +688,13 @@ def test_14a_delete_render_option( assert False, "Render option should have been deleted" except Exception as e: test_logger.info(f"Confirmed deletion (404 expected): {e}") - assert ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ) + assert "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower() test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_15_add_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_15_add_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test adding a mosaic to a collection. """ @@ -819,13 +708,9 @@ def test_15_add_mosaic( # Check if mosaic already exists and delete it try: - client.stac.get_mosaic( - collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1" - ) + client.stac.get_mosaic(collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1") test_logger.info("Mosaic 'test-mosaic-1' already exists, deleting it first") - client.stac.delete_mosaic( - collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1" - ) + client.stac.delete_mosaic(collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1") test_logger.info("Existing mosaic deleted") except Exception as e: test_logger.info(f"Mosaic does not exist (expected): {e}") @@ -836,12 +721,8 @@ def test_15_add_mosaic( cql=[], ) - test_logger.info( - f"Calling: add_mosaic(collection_id='{planetarycomputer_collection_id}', body={mosaic})" - ) - response = client.stac.add_mosaic( - collection_id=planetarycomputer_collection_id, body=mosaic - ) + test_logger.info(f"Calling: add_mosaic(collection_id='{planetarycomputer_collection_id}', body={mosaic})") + response = client.stac.add_mosaic(collection_id=planetarycomputer_collection_id, body=mosaic) test_logger.info(f"Response: {response}") assert response is not None @@ -852,9 +733,7 @@ def test_15_add_mosaic( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_16_get_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_16_get_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific mosaic. """ @@ -867,9 +746,7 @@ def test_16_get_mosaic( test_logger.info( f"Calling: get_mosaic(collection_id='{planetarycomputer_collection_id}', mosaic_id='test-mosaic-1')" ) - response = client.stac.get_mosaic( - collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1" - ) + response = client.stac.get_mosaic(collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1") test_logger.info(f"Response: {response}") assert response is not None @@ -880,9 +757,7 @@ def test_16_get_mosaic( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_17_replace_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_17_replace_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a mosaic. """ @@ -919,9 +794,7 @@ def test_17_replace_mosaic( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_17a_delete_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_17a_delete_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a mosaic. First creates a mosaic specifically for deletion. @@ -942,9 +815,7 @@ def test_17a_delete_mosaic( ) test_logger.info(f"Creating mosaic for deletion: {mosaic.id}") - client.stac.add_mosaic( - collection_id=planetarycomputer_collection_id, body=mosaic - ) + client.stac.add_mosaic(collection_id=planetarycomputer_collection_id, body=mosaic) # Verify it exists retrieved = client.stac.get_mosaic( @@ -974,11 +845,7 @@ def test_17a_delete_mosaic( assert False, "Mosaic should have been deleted" except Exception as e: test_logger.info(f"Confirmed deletion (404 expected): {e}") - assert ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ) + assert "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower() test_logger.info("Test PASSED\n") @@ -1008,22 +875,14 @@ def test_18_replace_partition_type(self, planetarycomputer_endpoint): # Check if collection exists and delete it first try: - existing_collection = client.stac.get_collection( - collection_id=test_collection_id - ) + existing_collection = client.stac.get_collection(collection_id=test_collection_id) if existing_collection: - test_logger.info( - f"Collection '{test_collection_id}' already exists, deleting first..." - ) - delete_poller = client.stac.begin_delete_collection( - collection_id=test_collection_id, polling=True - ) + test_logger.info(f"Collection '{test_collection_id}' already exists, deleting first...") + delete_poller = client.stac.begin_delete_collection(collection_id=test_collection_id, polling=True) delete_poller.result() test_logger.info(f"Deleted existing collection '{test_collection_id}'") except Exception: - test_logger.info( - f"Collection '{test_collection_id}' does not exist, proceeding with creation" - ) + test_logger.info(f"Collection '{test_collection_id}' does not exist, proceeding with creation") # Define collection extents spatial_extent = StacExtensionSpatialExtent(bounding_box=[[-180, -90, 180, 90]]) @@ -1052,9 +911,7 @@ def test_18_replace_partition_type(self, planetarycomputer_endpoint): # Create the collection using the correct API test_logger.info("Creating collection using begin_create_collection") - create_poller = client.stac.begin_create_collection( - body=collection_data, polling=True - ) + create_poller = client.stac.begin_create_collection(body=collection_data, polling=True) create_poller.result() test_logger.info("Temporary collection created") @@ -1065,9 +922,7 @@ def test_18_replace_partition_type(self, planetarycomputer_endpoint): test_logger.info( f"Calling: replace_partition_type(collection_id='{test_collection_id}', body={partition_type})" ) - client.stac.replace_partition_type( - collection_id=test_collection_id, body=partition_type - ) + client.stac.replace_partition_type(collection_id=test_collection_id, body=partition_type) # Verify the change updated_partition = client.stac.get_partition_type(test_collection_id) @@ -1079,9 +934,7 @@ def test_18_replace_partition_type(self, planetarycomputer_endpoint): # Clean up: delete the temporary collection test_logger.info(f"Deleting temporary collection: {test_collection_id}") try: - delete_poller = client.stac.begin_delete_collection( - collection_id=test_collection_id, polling=True - ) + delete_poller = client.stac.begin_delete_collection(collection_id=test_collection_id, polling=True) delete_poller.result() test_logger.info("Temporary collection deleted") except Exception as e: @@ -1091,9 +944,7 @@ def test_18_replace_partition_type(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy - def test_19_replace_tile_settings( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_19_replace_tile_settings(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test replacing tile settings for a collection. """ @@ -1114,9 +965,7 @@ def test_19_replace_tile_settings( test_logger.info( f"Calling: replace_tile_settings(collection_id='{planetarycomputer_collection_id}', body={tile_settings})" ) - response = client.stac.replace_tile_settings( - collection_id=planetarycomputer_collection_id, body=tile_settings - ) + response = client.stac.replace_tile_settings(collection_id=planetarycomputer_collection_id, body=tile_settings) test_logger.info(f"Response: {response}") assert response is not None @@ -1127,9 +976,7 @@ def test_19_replace_tile_settings( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_20_create_queryables( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_20_create_queryables(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating queryables for a collection. """ @@ -1146,13 +993,9 @@ def test_20_create_queryables( # Check if queryable already exists and delete it try: - queryables = client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) + queryables = client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) if "test:property" in queryables.get("properties", {}): - test_logger.info( - "Queryable 'test:property' already exists, deleting it first" - ) + test_logger.info("Queryable 'test:property' already exists, deleting it first") client.stac.delete_queryable( collection_id=planetarycomputer_collection_id, queryable_name="test:property", @@ -1175,34 +1018,24 @@ def test_20_create_queryables( test_logger.info( f"Calling: create_queryables(collection_id='{planetarycomputer_collection_id}', body=[queryable])" ) - response = client.stac.create_queryables( - collection_id=planetarycomputer_collection_id, body=[queryable] - ) + response = client.stac.create_queryables(collection_id=planetarycomputer_collection_id, body=[queryable]) test_logger.info(f"Response: {response}") assert response is not None # Response is a list of queryables - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Response should contain at least one queryable" # Verify our queryable was created - queryable_names = [ - q.get("name") if isinstance(q, MutableMapping) else q.name for q in response - ] - assert ( - "test:property" in queryable_names - ), "Created queryable 'test:property' should be in response" + queryable_names = [q.get("name") if isinstance(q, MutableMapping) else q.name for q in response] + assert "test:property" in queryable_names, "Created queryable 'test:property' should be in response" test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_21_replace_queryable( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_21_replace_queryable(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a queryable. """ @@ -1242,9 +1075,7 @@ def test_21_replace_queryable( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_21a_delete_queryable( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_21a_delete_queryable(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a queryable. First creates a queryable specifically for deletion. @@ -1271,14 +1102,10 @@ def test_21a_delete_queryable( ) test_logger.info(f"Creating queryable for deletion: {queryable.name}") - client.stac.create_queryables( - collection_id=planetarycomputer_collection_id, body=[queryable] - ) + client.stac.create_queryables(collection_id=planetarycomputer_collection_id, body=[queryable]) # Verify it exists - queryables = client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) + queryables = client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) assert "test:property_to_be_deleted" in queryables["properties"] test_logger.info("Queryable created successfully") @@ -1294,11 +1121,7 @@ def test_21a_delete_queryable( test_logger.info("Queryable deleted successfully") # Verify deletion - queryables_after = client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) - assert ( - "test:property_to_be_deleted" not in queryables_after["properties"] - ), "Queryable should have been deleted" + queryables_after = client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) + assert "test:property_to_be_deleted" not in queryables_after["properties"], "Queryable should have been deleted" test_logger.info("Test PASSED\n") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection_async.py index 77011a186057..55f9cc766851 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_00_stac_collection_async.py @@ -65,14 +65,10 @@ async def test_01_list_collections(self, planetarycomputer_endpoint): # Validate response structure assert response is not None, "Response should not be None" - assert hasattr( - response, "collections" - ), "Response should have 'collections' attribute" + assert hasattr(response, "collections"), "Response should have 'collections' attribute" collections = response.collections - assert isinstance( - collections, list - ), f"Collections should be a list, got {type(collections)}" + assert isinstance(collections, list), f"Collections should be a list, got {type(collections)}" test_logger.info(f"Number of collections: {len(collections)}") @@ -112,14 +108,10 @@ async def test_02_get_conformance_class(self, planetarycomputer_endpoint): # Validate response structure assert response is not None, "Response should not be None" - assert hasattr( - response, "conforms_to" - ), "Response should have 'conforms_to' attribute" + assert hasattr(response, "conforms_to"), "Response should have 'conforms_to' attribute" conforms_to = response.conforms_to - assert isinstance( - conforms_to, list - ), f"conformsTo should be a list, got {type(conforms_to)}" + assert isinstance(conforms_to, list), f"conformsTo should be a list, got {type(conforms_to)}" assert len(conforms_to) > 0, "Should have at least one conformance class" test_logger.info(f"Number of conformance classes: {len(conforms_to)}") @@ -132,9 +124,7 @@ async def test_02_get_conformance_class(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_03_get_collection( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_03_get_collection(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific STAC collection. @@ -150,12 +140,8 @@ async def test_03_get_collection( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_collection(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.get_collection(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Collection ID: {response.id}") @@ -164,12 +150,8 @@ async def test_03_get_collection( # Validate response structure assert response is not None, "Response should not be None" - assert ( - response.id == planetarycomputer_collection_id - ), "Collection ID should match requested ID" - assert ( - response.title is not None and len(response.title) > 0 - ), "Collection should have a title" + assert response.id == planetarycomputer_collection_id, "Collection ID should match requested ID" + assert response.title is not None and len(response.title) > 0, "Collection should have a title" assert response.description is not None, "Collection should have a description" assert response.extent is not None, "Collection should have extent" assert response.license is not None, "Collection should have license" @@ -180,9 +162,7 @@ async def test_03_get_collection( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_04_get_partition_type( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_04_get_partition_type(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting partition type for a collection. @@ -198,9 +178,7 @@ async def test_04_get_partition_type( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_partition_type(collection_id='{planetarycomputer_collection_id}')" - ) + test_logger.info(f"Calling: get_partition_type(collection_id='{planetarycomputer_collection_id}')") response = await client.stac.get_partition_type(planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") @@ -213,9 +191,7 @@ async def test_04_get_partition_type( # Validate scheme is a valid PartitionTypeScheme valid_schemes = [s.value for s in PartitionTypeScheme] - assert ( - response.scheme in valid_schemes - ), f"Partition scheme should be one of {valid_schemes}" + assert response.scheme in valid_schemes, f"Partition scheme should be one of {valid_schemes}" test_logger.info("Test PASSED\n") @@ -223,9 +199,7 @@ async def test_04_get_partition_type( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_05_list_render_options( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_05_list_render_options(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test listing render options for a collection. @@ -241,20 +215,14 @@ async def test_05_list_render_options( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: list_render_options(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.list_render_options( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: list_render_options(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.list_render_options(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Number of render options: {len(response)}") # Validate response structure - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" if len(response) > 0: first_option = response[0] @@ -272,9 +240,7 @@ async def test_05_list_render_options( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_06_get_tile_settings( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_06_get_tile_settings(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting tile settings for a collection. @@ -290,12 +256,8 @@ async def test_06_get_tile_settings( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_tile_settings(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.get_tile_settings( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_tile_settings(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.get_tile_settings(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") if hasattr(response, "as_dict"): @@ -319,9 +281,7 @@ async def test_06_get_tile_settings( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_07_list_mosaics( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_07_list_mosaics(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test listing mosaics for a collection. @@ -337,20 +297,14 @@ async def test_07_list_mosaics( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: list_mosaics(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.list_mosaics( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: list_mosaics(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.list_mosaics(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Number of mosaics: {len(response)}") # Validate response structure - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" if len(response) > 0: first_mosaic = response[0] @@ -366,9 +320,7 @@ async def test_07_list_mosaics( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_08_get_collection_queryables( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_08_get_collection_queryables(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting queryables for a collection. @@ -384,17 +336,11 @@ async def test_08_get_collection_queryables( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_collection_queryables(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection_queryables(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") - test_logger.info( - f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}" - ) + test_logger.info(f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}") # Validate response structure assert isinstance(response, MutableMapping), f"Response should be a dict, got {type(response)}" @@ -433,9 +379,7 @@ async def test_09_list_queryables(self, planetarycomputer_endpoint): response = await client.stac.list_queryables() test_logger.info(f"Response type: {type(response)}") - test_logger.info( - f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}" - ) + test_logger.info(f"Response keys: {list(response.keys()) if isinstance(response, MutableMapping) else 'N/A'}") # Validate response structure assert isinstance(response, MutableMapping), f"Response should be a dict, got {type(response)}" @@ -450,9 +394,7 @@ async def test_09_list_queryables(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_10_get_collection_configuration( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_10_get_collection_configuration(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting collection configuration. @@ -468,12 +410,8 @@ async def test_10_get_collection_configuration( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_collection_configuration(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.get_collection_configuration( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection_configuration(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.get_collection_configuration(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") if hasattr(response, "as_dict"): @@ -489,9 +427,7 @@ async def test_10_get_collection_configuration( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_10a_create_thumbnail_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_10a_create_thumbnail_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a thumbnail collection asset. This ensures the collection has a thumbnail for subsequent tests. @@ -509,22 +445,14 @@ async def test_10a_create_thumbnail_asset( # Delete the thumbnail asset if it already exists try: - test_logger.info( - "Checking if asset 'thumbnail' already exists and deleting if found..." - ) + test_logger.info("Checking if asset 'thumbnail' already exists and deleting if found...") await client.stac.delete_collection_asset( collection_id=planetarycomputer_collection_id, asset_id="thumbnail" ) test_logger.info("Deleted existing 'thumbnail'") except Exception as e: - if ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ): - test_logger.info( - "Asset 'thumbnail' does not exist, proceeding with creation" - ) + if "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower(): + test_logger.info("Asset 'thumbnail' does not exist, proceeding with creation") else: test_logger.warning(f"Error checking/deleting asset: {e}") @@ -538,8 +466,7 @@ async def test_10a_create_thumbnail_asset( # Minimal valid 16x9 RGB PNG image png_bytes = base64.b64decode( - "iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAIAAAC0SDtlAAAAEklEQVR4nGNg" - "aGAgDY1qGBQaAAlbSAENQjjgAAAAAElFTkSuQmCC" + "iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAIAAAC0SDtlAAAAEklEQVR4nGNg" "aGAgDY1qGBQaAAlbSAENQjjgAAAAAElFTkSuQmCC" ) file_content = BytesIO(png_bytes) @@ -557,9 +484,7 @@ async def test_10a_create_thumbnail_asset( assert response is not None # Verify the thumbnail asset now exists on the collection - collection = await client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = await client.stac.get_collection(collection_id=planetarycomputer_collection_id) assert "thumbnail" in collection.assets, "Collection should now have a thumbnail asset" test_logger.info("Test PASSED\n") @@ -568,9 +493,7 @@ async def test_10a_create_thumbnail_asset( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_11_get_collection_thumbnail( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_11_get_collection_thumbnail(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting collection thumbnail. @@ -587,23 +510,13 @@ async def test_11_get_collection_thumbnail( client = self.create_client(endpoint=planetarycomputer_endpoint) # First check if collection has thumbnail asset - collection = await client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = await client.stac.get_collection(collection_id=planetarycomputer_collection_id) - if ( - not hasattr(collection, "assets") - or collection.assets is None - or "thumbnail" not in collection.assets - ): + if not hasattr(collection, "assets") or collection.assets is None or "thumbnail" not in collection.assets: assert False, "Collection does not have a thumbnail asset" - test_logger.info( - f"Calling: get_collection_thumbnail(collection_id='{planetarycomputer_collection_id}')" - ) - response = await client.stac.get_collection_thumbnail( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_collection_thumbnail(collection_id='{planetarycomputer_collection_id}')") + response = await client.stac.get_collection_thumbnail(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") @@ -614,9 +527,7 @@ async def test_11_get_collection_thumbnail( # Validate image data assert len(thumbnail_bytes) > 0, "Thumbnail bytes should not be empty" - assert ( - len(thumbnail_bytes) > 50 - ), f"Thumbnail should be substantial, got only {len(thumbnail_bytes)} bytes" + assert len(thumbnail_bytes) > 50, f"Thumbnail should be substantial, got only {len(thumbnail_bytes)} bytes" # Check for common image format magic bytes # PNG: 89 50 4E 47 @@ -637,9 +548,7 @@ async def test_11_get_collection_thumbnail( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_12_create_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_12_create_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a render option for a collection. """ @@ -657,9 +566,7 @@ async def test_12_create_render_option( collection_id=planetarycomputer_collection_id, render_option_id="test-natural-color", ) - test_logger.info( - "Render option 'test-natural-color' already exists, deleting it first" - ) + test_logger.info("Render option 'test-natural-color' already exists, deleting it first") await client.stac.delete_render_option( collection_id=planetarycomputer_collection_id, render_option_id="test-natural-color", @@ -694,9 +601,7 @@ async def test_12_create_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_13_get_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_13_get_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific render option. """ @@ -725,9 +630,7 @@ async def test_13_get_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_14_replace_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_14_replace_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a render option. """ @@ -768,9 +671,7 @@ async def test_14_replace_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_14a_delete_render_option( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_14a_delete_render_option(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a render option. First creates a render option specifically for deletion. @@ -793,9 +694,7 @@ async def test_14a_delete_render_option( ) test_logger.info(f"Creating render option for deletion: {render_option.id}") - await client.stac.create_render_option( - collection_id=planetarycomputer_collection_id, body=render_option - ) + await client.stac.create_render_option(collection_id=planetarycomputer_collection_id, body=render_option) # Verify it exists retrieved = await client.stac.get_render_option( @@ -825,11 +724,7 @@ async def test_14a_delete_render_option( assert False, "Render option should have been deleted" except Exception as e: test_logger.info(f"Confirmed deletion (404 expected): {e}") - assert ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ) + assert "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower() test_logger.info("Test PASSED\n") @@ -837,9 +732,7 @@ async def test_14a_delete_render_option( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_15_add_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_15_add_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test adding a mosaic to a collection. """ @@ -853,13 +746,9 @@ async def test_15_add_mosaic( # Check if mosaic already exists and delete it try: - await client.stac.get_mosaic( - collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1" - ) + await client.stac.get_mosaic(collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1") test_logger.info("Mosaic 'test-mosaic-1' already exists, deleting it first") - await client.stac.delete_mosaic( - collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1" - ) + await client.stac.delete_mosaic(collection_id=planetarycomputer_collection_id, mosaic_id="test-mosaic-1") test_logger.info("Existing mosaic deleted") except Exception as e: test_logger.info(f"Mosaic does not exist (expected): {e}") @@ -870,12 +759,8 @@ async def test_15_add_mosaic( cql=[], ) - test_logger.info( - f"Calling: add_mosaic(collection_id='{planetarycomputer_collection_id}', body={mosaic})" - ) - response = await client.stac.add_mosaic( - collection_id=planetarycomputer_collection_id, body=mosaic - ) + test_logger.info(f"Calling: add_mosaic(collection_id='{planetarycomputer_collection_id}', body={mosaic})") + response = await client.stac.add_mosaic(collection_id=planetarycomputer_collection_id, body=mosaic) test_logger.info(f"Response: {response}") assert response is not None @@ -888,9 +773,7 @@ async def test_15_add_mosaic( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_16_get_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_16_get_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific mosaic. """ @@ -918,9 +801,7 @@ async def test_16_get_mosaic( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_17_replace_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_17_replace_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a mosaic. """ @@ -959,9 +840,7 @@ async def test_17_replace_mosaic( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_17a_delete_mosaic( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_17a_delete_mosaic(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a mosaic. First creates a mosaic specifically for deletion. @@ -982,9 +861,7 @@ async def test_17a_delete_mosaic( ) test_logger.info(f"Creating mosaic for deletion: {mosaic.id}") - await client.stac.add_mosaic( - collection_id=planetarycomputer_collection_id, body=mosaic - ) + await client.stac.add_mosaic(collection_id=planetarycomputer_collection_id, body=mosaic) # Verify it exists retrieved = await client.stac.get_mosaic( @@ -1014,11 +891,7 @@ async def test_17a_delete_mosaic( assert False, "Mosaic should have been deleted" except Exception as e: test_logger.info(f"Confirmed deletion (404 expected): {e}") - assert ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ) + assert "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower() test_logger.info("Test PASSED\n") @@ -1050,22 +923,16 @@ async def test_18_replace_partition_type(self, planetarycomputer_endpoint): # Check if collection exists and delete it first try: - existing_collection = await client.stac.get_collection( - collection_id=test_collection_id - ) + existing_collection = await client.stac.get_collection(collection_id=test_collection_id) if existing_collection: - test_logger.info( - f"Collection '{test_collection_id}' already exists, deleting first..." - ) + test_logger.info(f"Collection '{test_collection_id}' already exists, deleting first...") delete_poller = await client.stac.begin_delete_collection( collection_id=test_collection_id, polling=True ) delete_poller.result() test_logger.info(f"Deleted existing collection '{test_collection_id}'") except Exception: - test_logger.info( - f"Collection '{test_collection_id}' does not exist, proceeding with creation" - ) + test_logger.info(f"Collection '{test_collection_id}' does not exist, proceeding with creation") # Define collection extents spatial_extent = StacExtensionSpatialExtent(bounding_box=[[-180, -90, 180, 90]]) @@ -1094,9 +961,7 @@ async def test_18_replace_partition_type(self, planetarycomputer_endpoint): # Create the collection using the correct API test_logger.info("Creating collection using begin_create_collection") - create_poller = await client.stac.begin_create_collection( - body=collection_data, polling=True - ) + create_poller = await client.stac.begin_create_collection(body=collection_data, polling=True) await create_poller.result() test_logger.info("Temporary collection created") @@ -1107,9 +972,7 @@ async def test_18_replace_partition_type(self, planetarycomputer_endpoint): test_logger.info( f"Calling: replace_partition_type(collection_id='{test_collection_id}', body={partition_type})" ) - await client.stac.replace_partition_type( - collection_id=test_collection_id, body=partition_type - ) + await client.stac.replace_partition_type(collection_id=test_collection_id, body=partition_type) # Verify the change updated_partition = await client.stac.get_partition_type(test_collection_id) @@ -1135,9 +998,7 @@ async def test_18_replace_partition_type(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_19_replace_tile_settings( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_19_replace_tile_settings(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test replacing tile settings for a collection. """ @@ -1173,9 +1034,7 @@ async def test_19_replace_tile_settings( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_20_create_queryables( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_20_create_queryables(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating queryables for a collection. """ @@ -1192,13 +1051,9 @@ async def test_20_create_queryables( # Check if queryable already exists and delete it try: - queryables = await client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) + queryables = await client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) if "test:property" in queryables.get("properties", {}): - test_logger.info( - "Queryable 'test:property' already exists, deleting it first" - ) + test_logger.info("Queryable 'test:property' already exists, deleting it first") await client.stac.delete_queryable( collection_id=planetarycomputer_collection_id, queryable_name="test:property", @@ -1221,26 +1076,18 @@ async def test_20_create_queryables( test_logger.info( f"Calling: create_queryables(collection_id='{planetarycomputer_collection_id}', body=[queryable])" ) - response = await client.stac.create_queryables( - collection_id=planetarycomputer_collection_id, body=[queryable] - ) + response = await client.stac.create_queryables(collection_id=planetarycomputer_collection_id, body=[queryable]) test_logger.info(f"Response: {response}") assert response is not None # Response is a list of queryables - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Response should contain at least one queryable" # Verify our queryable was created - queryable_names = [ - q.get("name") if isinstance(q, MutableMapping) else q.name for q in response - ] - assert ( - "test:property" in queryable_names - ), "Created queryable 'test:property' should be in response" + queryable_names = [q.get("name") if isinstance(q, MutableMapping) else q.name for q in response] + assert "test:property" in queryable_names, "Created queryable 'test:property' should be in response" test_logger.info("Test PASSED\n") @@ -1248,9 +1095,7 @@ async def test_20_create_queryables( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_21_replace_queryable( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_21_replace_queryable(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a queryable. """ @@ -1292,9 +1137,7 @@ async def test_21_replace_queryable( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_21a_delete_queryable( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_21a_delete_queryable(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a queryable. First creates a queryable specifically for deletion. @@ -1321,14 +1164,10 @@ async def test_21a_delete_queryable( ) test_logger.info(f"Creating queryable for deletion: {queryable.name}") - await client.stac.create_queryables( - collection_id=planetarycomputer_collection_id, body=[queryable] - ) + await client.stac.create_queryables(collection_id=planetarycomputer_collection_id, body=[queryable]) # Verify it exists - queryables = await client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) + queryables = await client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) assert "test:property_to_be_deleted" in queryables["properties"] test_logger.info("Queryable created successfully") @@ -1344,12 +1183,8 @@ async def test_21a_delete_queryable( test_logger.info("Queryable deleted successfully") # Verify deletion - queryables_after = await client.stac.get_collection_queryables( - collection_id=planetarycomputer_collection_id - ) - assert ( - "test:property_to_be_deleted" not in queryables_after["properties"] - ), "Queryable should have been deleted" + queryables_after = await client.stac.get_collection_queryables(collection_id=planetarycomputer_collection_id) + assert "test:property_to_be_deleted" not in queryables_after["properties"], "Queryable should have been deleted" test_logger.info("Test PASSED\n") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management.py index 56e895dcb23d..d3df7e8a3f83 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management.py @@ -7,6 +7,7 @@ """ Unit tests for Planetary Computer ingestion management operations. """ + import logging import os import uuid @@ -35,9 +36,7 @@ log_file = log_dir / "ingestion_test_results.log" file_handler = logging.FileHandler(log_file, mode="w") file_handler.setLevel(logging.INFO) -file_handler.setFormatter( - logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") -) +file_handler.setFormatter(logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")) logger.addHandler(file_handler) @@ -64,12 +63,8 @@ def test_01_list_managed_identities(self, planetarycomputer_endpoint): logger.info(f" - Resource ID: {identity.resource_id}") # Assertions - assert ( - managed_identities is not None - ), "Managed identities list should not be None" - assert isinstance( - managed_identities, list - ), "Managed identities should be a list" + assert managed_identities is not None, "Managed identities list should not be None" + assert isinstance(managed_identities, list), "Managed identities should be a list" @PlanetaryComputerPreparer() @recorded_by_proxy @@ -107,15 +102,11 @@ def test_02_create_and_list_ingestion_sources(self, planetarycomputer_endpoint): logger.info(f" Deleted source: {source_id}") # Create connection info with managed identity - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) # Create ingestion source (id must be a valid GUID) source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = client.ingestion.create_source(body=ingestion_source) logger.info("Created ingestion source:") @@ -153,9 +144,7 @@ def test_02a_create_sas_token_ingestion_source(self, planetarycomputer_endpoint) ) logger.info(f"SAS Container URI: {sas_container_uri}") - logger.info( - f"SAS Token: {sas_token[:20]}..." - ) # Log only first 20 chars for security + logger.info(f"SAS Token: {sas_token[:20]}...") # Log only first 20 chars for security # Create connection info with SAS token sas_connection_info = SharedAccessSignatureTokenConnection( @@ -188,9 +177,7 @@ def test_02a_create_sas_token_ingestion_source(self, planetarycomputer_endpoint) @PlanetaryComputerPreparer() @recorded_by_proxy - def test_03_create_ingestion_definition( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_03_create_ingestion_definition(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test creating an ingestion definition.""" logger.info("\n" + "=" * 80) logger.info("TEST: Create Ingestion Definition") @@ -209,9 +196,7 @@ def test_03_create_ingestion_definition( # Delete all existing ingestions first logger.info("Deleting all existing ingestions...") - existing_ingestions = list( - client.ingestion.list(collection_id=planetarycomputer_collection_id) - ) + existing_ingestions = list(client.ingestion.list(collection_id=planetarycomputer_collection_id)) for ingestion in existing_ingestions: client.ingestion.begin_delete( collection_id=planetarycomputer_collection_id, @@ -232,15 +217,9 @@ def test_03_create_ingestion_definition( logger.info("Ingestion definition created:") logger.info(f" - Import Type: {ingestion_definition.import_type}") logger.info(f" - Display Name: {ingestion_definition.display_name}") - logger.info( - f" - Source Catalog URL: {ingestion_definition.source_catalog_url}" - ) - logger.info( - f" - Keep Original Assets: {ingestion_definition.keep_original_assets}" - ) - logger.info( - f" - Skip Existing Items: {ingestion_definition.skip_existing_items}" - ) + logger.info(f" - Source Catalog URL: {ingestion_definition.source_catalog_url}") + logger.info(f" - Keep Original Assets: {ingestion_definition.keep_original_assets}") + logger.info(f" - Skip Existing Items: {ingestion_definition.skip_existing_items}") # Create the ingestion ingestion_response = client.ingestion.create( @@ -261,9 +240,7 @@ def test_03_create_ingestion_definition( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_04_update_ingestion_definition( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_04_update_ingestion_definition(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test updating an existing ingestion definition.""" logger.info("\n" + "=" * 80) logger.info("TEST: Update Ingestion Definition") @@ -317,18 +294,12 @@ def test_04_update_ingestion_definition( # Assertions assert updated_ingestion is not None, "Updated ingestion should not be None" - assert ( - updated_ingestion.id == ingestion_id - ), "Ingestion ID should remain the same" - assert ( - updated_ingestion.display_name == "Updated Ingestion Name" - ), "Display name should be updated" + assert updated_ingestion.id == ingestion_id, "Ingestion ID should remain the same" + assert updated_ingestion.display_name == "Updated Ingestion Name", "Display name should be updated" @PlanetaryComputerPreparer() @recorded_by_proxy - def test_05_create_ingestion_run( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_05_create_ingestion_run(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test creating an ingestion run.""" logger.info("\n" + "=" * 80) logger.info("TEST: Create Ingestion Run") @@ -379,9 +350,7 @@ def test_05_create_ingestion_run( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_06_get_ingestion_run_status( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_06_get_ingestion_run_status(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting the status of an ingestion run.""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Ingestion Run Status") @@ -439,12 +408,8 @@ def test_06_get_ingestion_run_status( # Log status history if available if run.operation.status_history: - logger.info( - f" - Status History Entries: {len(run.operation.status_history)}" - ) - for i, status_item in enumerate( - run.operation.status_history[:5] - ): # Log first 5 + logger.info(f" - Status History Entries: {len(run.operation.status_history)}") + for i, status_item in enumerate(run.operation.status_history[:5]): # Log first 5 logger.info(f" Entry {i+1}:") if hasattr(status_item, "error_code") and status_item.error_code: logger.info(f" Error Code: {status_item.error_code}") @@ -478,15 +443,9 @@ def test_07_list_operations(self, planetarycomputer_endpoint): logger.info(f" - Type: {operation.type}") if hasattr(operation, "total_items") and operation.total_items is not None: logger.info(f" - Total Items: {operation.total_items}") - if ( - hasattr(operation, "total_successful_items") - and operation.total_successful_items is not None - ): + if hasattr(operation, "total_successful_items") and operation.total_successful_items is not None: logger.info(f" - Successful: {operation.total_successful_items}") - if ( - hasattr(operation, "total_failed_items") - and operation.total_failed_items is not None - ): + if hasattr(operation, "total_failed_items") and operation.total_failed_items is not None: logger.info(f" - Failed: {operation.total_failed_items}") # Assertions @@ -495,9 +454,7 @@ def test_07_list_operations(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy - def test_08_get_operation_by_id( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_08_get_operation_by_id(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting a specific operation by ID.""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Operation by ID") @@ -564,9 +521,7 @@ def test_09_delete_ingestion_source(self, planetarycomputer_endpoint): # Get test configuration - must use real managed identity from the environment # Use a unique container URI to avoid conflicts test_container_id = str(uuid.uuid4()) - container_uri = ( - f"https://test.blob.core.windows.net/test-container-{test_container_id}" - ) + container_uri = f"https://test.blob.core.windows.net/test-container-{test_container_id}" # Get a valid managed identity object ID from the service managed_identities = list(client.ingestion.list_managed_identities()) @@ -579,14 +534,10 @@ def test_09_delete_ingestion_source(self, planetarycomputer_endpoint): logger.info(f"Using unique container URI: {container_uri}") # Create a source to delete - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = client.ingestion.create_source(body=ingestion_source) source_id = created_source.id @@ -606,15 +557,11 @@ def test_09_delete_ingestion_source(self, planetarycomputer_endpoint): from devtools_testutils import is_live if is_live(): - assert ( - source_id not in source_ids - ), "Deleted source should not be in the list" + assert source_id not in source_ids, "Deleted source should not be in the list" @PlanetaryComputerPreparer() @recorded_by_proxy - def test_10_cancel_operation( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_10_cancel_operation(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test canceling an operation.""" logger.info("\n" + "=" * 80) logger.info("TEST: Cancel Operation") @@ -660,9 +607,7 @@ def test_10_cancel_operation( # Try to cancel the operation try: client.ingestion.cancel_operation(operation_id) - logger.info( - f"Successfully requested cancellation for operation: {operation_id}" - ) + logger.info(f"Successfully requested cancellation for operation: {operation_id}") cancel_succeeded = True except HttpResponseError as e: logger.info(f"Failed to cancel operation {operation_id}: {e.message}") @@ -721,18 +666,12 @@ def test_12_get_source(self, planetarycomputer_endpoint): # Create a source test_container_id = str(uuid.uuid4()) - container_uri = ( - f"https://test.blob.core.windows.net/test-container-{test_container_id}" - ) + container_uri = f"https://test.blob.core.windows.net/test-container-{test_container_id}" - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = client.ingestion.create_source(body=ingestion_source) logger.info(f"Created source with ID: {created_source.id}") @@ -764,52 +703,38 @@ def test_13_replace_source(self, planetarycomputer_endpoint): # Generate test SAS token data test_container_id = str(uuid.uuid4()) - sas_container_uri = ( - f"https://test.blob.core.windows.net/test-container-{test_container_id}" - ) + sas_container_uri = f"https://test.blob.core.windows.net/test-container-{test_container_id}" # Generate a valid SAS token format with required fields start_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") - expiry_time = (datetime.now(timezone.utc) + timedelta(days=7)).strftime( - "%Y-%m-%dT%H:%M:%SZ" - ) + expiry_time = (datetime.now(timezone.utc) + timedelta(days=7)).strftime("%Y-%m-%dT%H:%M:%SZ") sas_token = f"sp=rl&st={start_time}&se={expiry_time}&sv=2023-01-03&sr=c&sig=InitialRandomSignature123456" # Step 1: Create initial source using create_source (like create_sas_token_ingestion_source in sample) - logger.info( - "Step 1: Creating initial SAS token ingestion source with create_source..." - ) + logger.info("Step 1: Creating initial SAS token ingestion source with create_source...") sas_connection_info = SharedAccessSignatureTokenConnection( container_uri=sas_container_uri, shared_access_signature_token=sas_token ) - sas_ingestion_source = SharedAccessSignatureTokenIngestionSource( - connection_info=sas_connection_info - ) + sas_ingestion_source = SharedAccessSignatureTokenIngestionSource(connection_info=sas_connection_info) created_source = client.ingestion.create_source(body=sas_ingestion_source) source_id = created_source.id logger.info(f"Created SAS token ingestion source: {source_id}") # Step 2: First call to create_or_replace_source - replaces the existing source with original token - logger.info( - f"Step 2: First call to create_or_replace_source with existing source ID: {source_id}" - ) + logger.info(f"Step 2: First call to create_or_replace_source with existing source ID: {source_id}") # Update the ingestion_source object with the actual ID sas_ingestion_source_for_replace = SharedAccessSignatureTokenIngestionSource( id=source_id, connection_info=sas_connection_info ) - first_result = client.ingestion.replace_source( - id=source_id, body=sas_ingestion_source_for_replace - ) + first_result = client.ingestion.replace_source(id=source_id, body=sas_ingestion_source_for_replace) logger.info(f"First call result: {first_result.id}") # Step 3: Second call to create_or_replace_source - replaces again with updated token - logger.info( - "Step 3: Second call to create_or_replace_source with updated SAS token" - ) + logger.info("Step 3: Second call to create_or_replace_source with updated SAS token") updated_token = f"sp=rl&st={start_time}&se={expiry_time}&sv=2023-01-03&sr=c&sig=UpdatedRandomSignature123456" updated_connection_info = SharedAccessSignatureTokenConnection( @@ -819,9 +744,7 @@ def test_13_replace_source(self, planetarycomputer_endpoint): id=source_id, connection_info=updated_connection_info ) - second_result = client.ingestion.replace_source( - id=source_id, body=updated_ingestion_source - ) + second_result = client.ingestion.replace_source(id=source_id, body=updated_ingestion_source) logger.info("Second create_or_replace result (replacement):") logger.info(f" - Response type: {type(second_result)}") @@ -832,9 +755,7 @@ def test_13_replace_source(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy - def test_14_lists_ingestions( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_14_lists_ingestions(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test listing ingestions for a collection.""" logger.info("\n" + "=" * 80) logger.info("TEST: Lists Ingestions") @@ -857,16 +778,12 @@ def test_14_lists_ingestions( skip_existing_items=True, ) - client.ingestion.create( - collection_id=planetarycomputer_collection_id, body=ingestion_definition - ) + client.ingestion.create(collection_id=planetarycomputer_collection_id, body=ingestion_definition) logger.info("Created ingestion") # List ingestions - ingestions = list( - client.ingestion.list(collection_id=planetarycomputer_collection_id) - ) + ingestions = list(client.ingestion.list(collection_id=planetarycomputer_collection_id)) logger.info(f"Found {len(ingestions)} ingestions") for i, ingestion in enumerate(ingestions[:5]): @@ -877,9 +794,7 @@ def test_14_lists_ingestions( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_15_get_ingestion( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_15_get_ingestion(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting a specific ingestion by ID.""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Ingestion") @@ -927,9 +842,7 @@ def test_15_get_ingestion( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_16_list_runs( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_16_list_runs(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test listing runs for an ingestion.""" logger.info("\n" + "=" * 80) logger.info("TEST: List Runs") @@ -973,9 +886,7 @@ def test_16_list_runs( # List runs runs = list( - client.ingestion.list_runs( - collection_id=planetarycomputer_collection_id, ingestion_id=ingestion_id - ) + client.ingestion.list_runs(collection_id=planetarycomputer_collection_id, ingestion_id=ingestion_id) ) logger.info(f"Found {len(runs)} runs") @@ -987,9 +898,7 @@ def test_16_list_runs( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_17_get_operation( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_17_get_operation(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting a specific operation (duplicate of test_08 but for completeness).""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Operation (Additional Coverage)") @@ -1016,10 +925,7 @@ def test_17_get_operation( logger.info(f" - Type: {operation.type}") if hasattr(operation, "total_items") and operation.total_items is not None: logger.info(f" - Total Items: {operation.total_items}") - if ( - hasattr(operation, "total_successful_items") - and operation.total_successful_items is not None - ): + if hasattr(operation, "total_successful_items") and operation.total_successful_items is not None: logger.info(f" - Successful Items: {operation.total_successful_items}") @PlanetaryComputerPreparer() diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management_async.py index c0954cc878ed..5685ffedb023 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_01_ingestion_management_async.py @@ -7,6 +7,7 @@ """ Unit tests for Planetary Computer ingestion management operations. """ + import logging import os import uuid @@ -37,15 +38,11 @@ log_file = log_dir / "ingestion_test_results.log" file_handler = logging.FileHandler(log_file, mode="w") file_handler.setLevel(logging.INFO) -file_handler.setFormatter( - logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") -) +file_handler.setFormatter(logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")) logger.addHandler(file_handler) -class TestPlanetaryComputerIngestionManagementAsync( - PlanetaryComputerProClientTestBaseAsync -): +class TestPlanetaryComputerIngestionManagementAsync(PlanetaryComputerProClientTestBaseAsync): """Test class for Planetary Computer ingestion management operations.""" @PlanetaryComputerPreparer() @@ -68,9 +65,7 @@ async def test_01_list_managed_identities(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_02_create_and_list_ingestion_sources( - self, planetarycomputer_endpoint - ): + async def test_02_create_and_list_ingestion_sources(self, planetarycomputer_endpoint): """Test creating and listing ingestion sources.""" logger.info("\n" + "=" * 80) logger.info("TEST: Create and List Ingestion Sources") @@ -104,15 +99,11 @@ async def test_02_create_and_list_ingestion_sources( logger.info(f" Deleted source: {source_id}") # Create connection info with managed identity - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) # Create ingestion source (id must be a valid GUID) source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = await client.ingestion.create_source(body=ingestion_source) logger.info("Created ingestion source:") @@ -134,9 +125,7 @@ async def test_02_create_and_list_ingestion_sources( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_02a_create_sas_token_ingestion_source( - self, planetarycomputer_endpoint - ): + async def test_02a_create_sas_token_ingestion_source(self, planetarycomputer_endpoint): """Test creating a SAS token ingestion source.""" logger.info("\n" + "=" * 80) logger.info("TEST: Create SAS Token Ingestion Source") @@ -156,9 +145,7 @@ async def test_02a_create_sas_token_ingestion_source( ) logger.info(f"SAS Container URI: {sas_container_uri}") - logger.info( - f"SAS Token: {sas_token[:20]}..." - ) # Log only first 20 chars for security + logger.info(f"SAS Token: {sas_token[:20]}...") # Log only first 20 chars for security # Create connection info with SAS token sas_connection_info = SharedAccessSignatureTokenConnection( @@ -172,9 +159,7 @@ async def test_02a_create_sas_token_ingestion_source( ) # Register the SAS token source - created_sas_source = await client.ingestion.create_source( - body=sas_ingestion_source - ) + created_sas_source = await client.ingestion.create_source(body=sas_ingestion_source) logger.info("Created SAS token ingestion source:") logger.info(f" - ID: {created_sas_source.id}") @@ -195,9 +180,7 @@ async def test_02a_create_sas_token_ingestion_source( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_03_create_ingestion_definition( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_03_create_ingestion_definition(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test creating an ingestion definition.""" logger.info("\n" + "=" * 80) logger.info("TEST: Create Ingestion Definition") @@ -216,9 +199,7 @@ async def test_03_create_ingestion_definition( # Delete all existing ingestions first logger.info("Deleting all existing ingestions...") - async for ingestion in client.ingestion.list( - collection_id=planetarycomputer_collection_id - ): + async for ingestion in client.ingestion.list(collection_id=planetarycomputer_collection_id): await client.ingestion.begin_delete( collection_id=planetarycomputer_collection_id, ingestion_id=ingestion.id, @@ -238,15 +219,9 @@ async def test_03_create_ingestion_definition( logger.info("Ingestion definition created:") logger.info(f" - Import Type: {ingestion_definition.import_type}") logger.info(f" - Display Name: {ingestion_definition.display_name}") - logger.info( - f" - Source Catalog URL: {ingestion_definition.source_catalog_url}" - ) - logger.info( - f" - Keep Original Assets: {ingestion_definition.keep_original_assets}" - ) - logger.info( - f" - Skip Existing Items: {ingestion_definition.skip_existing_items}" - ) + logger.info(f" - Source Catalog URL: {ingestion_definition.source_catalog_url}") + logger.info(f" - Keep Original Assets: {ingestion_definition.keep_original_assets}") + logger.info(f" - Skip Existing Items: {ingestion_definition.skip_existing_items}") # Create the ingestion ingestion_response = await client.ingestion.create( @@ -269,9 +244,7 @@ async def test_03_create_ingestion_definition( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_04_update_ingestion_definition( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_04_update_ingestion_definition(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test updating an existing ingestion definition.""" logger.info("\n" + "=" * 80) logger.info("TEST: Update Ingestion Definition") @@ -325,20 +298,14 @@ async def test_04_update_ingestion_definition( # Assertions assert updated_ingestion is not None, "Updated ingestion should not be None" - assert ( - updated_ingestion.id == ingestion_id - ), "Ingestion ID should remain the same" - assert ( - updated_ingestion.display_name == "Updated Ingestion Name" - ), "Display name should be updated" + assert updated_ingestion.id == ingestion_id, "Ingestion ID should remain the same" + assert updated_ingestion.display_name == "Updated Ingestion Name", "Display name should be updated" await self.close_client() @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_05_create_ingestion_run( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_05_create_ingestion_run(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test creating an ingestion run.""" logger.info("\n" + "=" * 80) logger.info("TEST: Create Ingestion Run") @@ -391,9 +358,7 @@ async def test_05_create_ingestion_run( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_06_get_ingestion_run_status( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_06_get_ingestion_run_status(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting the status of an ingestion run.""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Ingestion Run Status") @@ -451,12 +416,8 @@ async def test_06_get_ingestion_run_status( # Log status history if available if run.operation.status_history: - logger.info( - f" - Status History Entries: {len(run.operation.status_history)}" - ) - for i, status_item in enumerate( - run.operation.status_history[:5] - ): # Log first 5 + logger.info(f" - Status History Entries: {len(run.operation.status_history)}") + for i, status_item in enumerate(run.operation.status_history[:5]): # Log first 5 logger.info(f" Entry {i+1}:") if hasattr(status_item, "error_code") and status_item.error_code: logger.info(f" Error Code: {status_item.error_code}") @@ -489,24 +450,16 @@ async def test_07_list_operations(self, planetarycomputer_endpoint): logger.info(f" - Type: {operation.type}") if hasattr(operation, "total_items") and operation.total_items is not None: logger.info(f" - Total Items: {operation.total_items}") - if ( - hasattr(operation, "total_successful_items") - and operation.total_successful_items is not None - ): + if hasattr(operation, "total_successful_items") and operation.total_successful_items is not None: logger.info(f" - Successful: {operation.total_successful_items}") - if ( - hasattr(operation, "total_failed_items") - and operation.total_failed_items is not None - ): + if hasattr(operation, "total_failed_items") and operation.total_failed_items is not None: logger.info(f" - Failed: {operation.total_failed_items}") await self.close_client() @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_08_get_operation_by_id( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_08_get_operation_by_id(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting a specific operation by ID.""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Operation by ID") @@ -575,9 +528,7 @@ async def test_09_delete_ingestion_source(self, planetarycomputer_endpoint): # Get test configuration - must use real managed identity from the environment # Use a unique container URI to avoid conflicts test_container_id = str(uuid.uuid4()) - container_uri = ( - f"https://test.blob.core.windows.net/test-container-{test_container_id}" - ) + container_uri = f"https://test.blob.core.windows.net/test-container-{test_container_id}" # Get a valid managed identity object ID from the service managed_identity_object_id = None @@ -592,14 +543,10 @@ async def test_09_delete_ingestion_source(self, planetarycomputer_endpoint): logger.info(f"Using unique container URI: {container_uri}") # Create a source to delete - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = await client.ingestion.create_source(body=ingestion_source) source_id = created_source.id @@ -618,17 +565,13 @@ async def test_09_delete_ingestion_source(self, planetarycomputer_endpoint): from devtools_testutils import is_live if is_live(): - assert ( - source_id not in source_ids - ), "Deleted source should not be in the list" + assert source_id not in source_ids, "Deleted source should not be in the list" await self.close_client() @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_10_cancel_operation( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_10_cancel_operation(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test canceling an operation.""" logger.info("\n" + "=" * 80) logger.info("TEST: Cancel Operation") @@ -674,9 +617,7 @@ async def test_10_cancel_operation( # Try to cancel the operation try: await client.ingestion.cancel_operation(operation_id) - logger.info( - f"Successfully requested cancellation for operation: {operation_id}" - ) + logger.info(f"Successfully requested cancellation for operation: {operation_id}") cancel_succeeded = True except HttpResponseError as e: logger.info(f"Failed to cancel operation {operation_id}: {e.message}") @@ -741,18 +682,12 @@ async def test_12_get_source(self, planetarycomputer_endpoint): # Create a source test_container_id = str(uuid.uuid4()) - container_uri = ( - f"https://test.blob.core.windows.net/test-container-{test_container_id}" - ) + container_uri = f"https://test.blob.core.windows.net/test-container-{test_container_id}" - connection_info = ManagedIdentityConnection( - container_uri=container_uri, object_id=managed_identity_object_id - ) + connection_info = ManagedIdentityConnection(container_uri=container_uri, object_id=managed_identity_object_id) source_id = str(uuid.uuid4()) - ingestion_source = ManagedIdentityIngestionSource( - id=source_id, connection_info=connection_info - ) + ingestion_source = ManagedIdentityIngestionSource(id=source_id, connection_info=connection_info) created_source = await client.ingestion.create_source(body=ingestion_source) logger.info(f"Created source with ID: {created_source.id}") @@ -786,52 +721,38 @@ async def test_13_replace_source(self, planetarycomputer_endpoint): # Generate test SAS token data test_container_id = str(uuid.uuid4()) - sas_container_uri = ( - f"https://test.blob.core.windows.net/test-container-{test_container_id}" - ) + sas_container_uri = f"https://test.blob.core.windows.net/test-container-{test_container_id}" # Generate a valid SAS token format with required fields start_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") - expiry_time = (datetime.now(timezone.utc) + timedelta(days=7)).strftime( - "%Y-%m-%dT%H:%M:%SZ" - ) + expiry_time = (datetime.now(timezone.utc) + timedelta(days=7)).strftime("%Y-%m-%dT%H:%M:%SZ") sas_token = f"sp=rl&st={start_time}&se={expiry_time}&sv=2023-01-03&sr=c&sig=InitialRandomSignature123456" # Step 1: Create initial source using create_source (like create_sas_token_ingestion_source in sample) - logger.info( - "Step 1: Creating initial SAS token ingestion source with create_source..." - ) + logger.info("Step 1: Creating initial SAS token ingestion source with create_source...") sas_connection_info = SharedAccessSignatureTokenConnection( container_uri=sas_container_uri, shared_access_signature_token=sas_token ) - sas_ingestion_source = SharedAccessSignatureTokenIngestionSource( - connection_info=sas_connection_info - ) + sas_ingestion_source = SharedAccessSignatureTokenIngestionSource(connection_info=sas_connection_info) created_source = await client.ingestion.create_source(body=sas_ingestion_source) source_id = created_source.id logger.info(f"Created SAS token ingestion source: {source_id}") # Step 2: First call to create_or_replace_source - replaces the existing source with original token - logger.info( - f"Step 2: First call to create_or_replace_source with existing source ID: {source_id}" - ) + logger.info(f"Step 2: First call to create_or_replace_source with existing source ID: {source_id}") # Update the ingestion_source object with the actual ID sas_ingestion_source_for_replace = SharedAccessSignatureTokenIngestionSource( id=source_id, connection_info=sas_connection_info ) - first_result = await client.ingestion.replace_source( - id=source_id, body=sas_ingestion_source_for_replace - ) + first_result = await client.ingestion.replace_source(id=source_id, body=sas_ingestion_source_for_replace) logger.info(f"First call result: {first_result.id}") # Step 3: Second call to create_or_replace_source - replaces again with updated token - logger.info( - "Step 3: Second call to create_or_replace_source with updated SAS token" - ) + logger.info("Step 3: Second call to create_or_replace_source with updated SAS token") updated_token = f"sp=rl&st={start_time}&se={expiry_time}&sv=2023-01-03&sr=c&sig=UpdatedRandomSignature123456" updated_connection_info = SharedAccessSignatureTokenConnection( @@ -841,9 +762,7 @@ async def test_13_replace_source(self, planetarycomputer_endpoint): id=source_id, connection_info=updated_connection_info ) - second_result = await client.ingestion.replace_source( - id=source_id, body=updated_ingestion_source - ) + second_result = await client.ingestion.replace_source(id=source_id, body=updated_ingestion_source) logger.info("Second create_or_replace result (replacement):") logger.info(f" - Response type: {type(second_result)}") @@ -856,9 +775,7 @@ async def test_13_replace_source(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_14_lists_ingestions( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_14_lists_ingestions(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test listing ingestions for a collection.""" logger.info("\n" + "=" * 80) logger.info("TEST: Lists Ingestions") @@ -881,16 +798,12 @@ async def test_14_lists_ingestions( skip_existing_items=True, ) - await client.ingestion.create( - collection_id=planetarycomputer_collection_id, body=ingestion_definition - ) + await client.ingestion.create(collection_id=planetarycomputer_collection_id, body=ingestion_definition) logger.info("Created ingestion") # List ingestions - async for ingestion in client.ingestion.list( - collection_id=planetarycomputer_collection_id - ): + async for ingestion in client.ingestion.list(collection_id=planetarycomputer_collection_id): logger.info(f" Ingestion:") logger.info(f" - ID: {ingestion.id}") logger.info(f" - Display Name: {ingestion.display_name}") @@ -900,9 +813,7 @@ async def test_14_lists_ingestions( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_15_get_ingestion( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_15_get_ingestion(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting a specific ingestion by ID.""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Ingestion") @@ -952,9 +863,7 @@ async def test_15_get_ingestion( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_16_list_runs( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_16_list_runs(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test listing runs for an ingestion.""" logger.info("\n" + "=" * 80) logger.info("TEST: List Runs") @@ -1009,9 +918,7 @@ async def test_16_list_runs( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_17_get_operation( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_17_get_operation(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test getting a specific operation (duplicate of test_08 but for completeness).""" logger.info("\n" + "=" * 80) logger.info("TEST: Get Operation (Additional Coverage)") @@ -1040,19 +947,14 @@ async def test_17_get_operation( logger.info(f" - Type: {operation.type}") if hasattr(operation, "total_items") and operation.total_items is not None: logger.info(f" - Total Items: {operation.total_items}") - if ( - hasattr(operation, "total_successful_items") - and operation.total_successful_items is not None - ): + if hasattr(operation, "total_successful_items") and operation.total_successful_items is not None: logger.info(f" - Successful Items: {operation.total_successful_items}") await self.close_client() @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_18_cancel_all_operations_additional( - self, planetarycomputer_endpoint - ): + async def test_18_cancel_all_operations_additional(self, planetarycomputer_endpoint): """Test cancel_all_operations (duplicate of test_11 but for completeness).""" logger.info("\n" + "=" * 80) logger.info("TEST: Cancel All Operations (Additional Coverage)") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification.py index 7b521f0c5470..e5e2b937a33d 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification.py @@ -37,9 +37,7 @@ log_file = log_dir / "stac_specification_test_results.log" file_handler = logging.FileHandler(log_file, mode="w") file_handler.setLevel(logging.INFO) -file_formatter = logging.Formatter( - "%(asctime)s - %(name)s - %(levelname)s - %(message)s" -) +file_formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") file_handler.setFormatter(file_formatter) logger.addHandler(file_handler) @@ -60,12 +58,8 @@ def test_01_get_conformance_class(self, planetarycomputer_endpoint): # Validate conformance response assert conformance is not None, "Conformance should not be None" - assert hasattr( - conformance, "conforms_to" - ), "Conformance should have conforms_to property" - assert ( - len(conformance.conforms_to) > 0 - ), "Conformance should have at least one URI" + assert hasattr(conformance, "conforms_to"), "Conformance should have conforms_to property" + assert len(conformance.conforms_to) > 0, "Conformance should have at least one URI" # Based on log: Retrieved 15 conformance classes assert ( @@ -114,15 +108,11 @@ def test_03_list_collections(self, planetarycomputer_endpoint, planetarycomputer # Validate collections response assert collections is not None, "Collections should not be None" - assert hasattr( - collections, "collections" - ), "Response should have collections property" + assert hasattr(collections, "collections"), "Response should have collections property" assert len(collections.collections) > 0, "Should have at least one collection" # Based on log: Retrieved 10 collections - assert ( - len(collections.collections) >= 5 - ), f"Expected at least 5 collections, got {len(collections.collections)}" + assert len(collections.collections) >= 5, f"Expected at least 5 collections, got {len(collections.collections)}" logger.info(f"Retrieved {len(collections.collections)} collections") @@ -145,16 +135,12 @@ def test_03_list_collections(self, planetarycomputer_endpoint, planetarycomputer # Validate collection structure first_collection = collections.collections[0] assert hasattr(first_collection, "id"), "Collection should have id" - assert ( - first_collection.id is not None and len(first_collection.id) > 0 - ), "Collection ID should not be empty" + assert first_collection.id is not None and len(first_collection.id) > 0, "Collection ID should not be empty" assert hasattr(first_collection, "extent"), "Collection should have extent" # Validate that the collection is in the list collection_ids = [c.id for c in collections.collections] - assert ( - collection_id in collection_ids - ), f"{collection_id} collection should be present" + assert collection_id in collection_ids, f"{collection_id} collection should be present" @PlanetaryComputerPreparer() @recorded_by_proxy @@ -177,9 +163,7 @@ def test_04_get_collection(self, planetarycomputer_endpoint, planetarycomputer_c # Validate title is present assert hasattr(collection, "title"), "Collection should have title" - assert ( - collection.title is not None and len(collection.title) > 0 - ), "Collection title should not be empty" + assert collection.title is not None and len(collection.title) > 0, "Collection title should not be empty" logger.info(f"Retrieved collection: {collection.id}") if hasattr(collection, "title") and collection.title: @@ -197,25 +181,17 @@ def test_04_get_collection(self, planetarycomputer_endpoint, planetarycomputer_c logger.info(" Extent:") if hasattr(collection.extent, "spatial") and collection.extent.spatial: # Log available attributes instead of assuming bbox exists - spatial_attrs = [ - attr - for attr in dir(collection.extent.spatial) - if not attr.startswith("_") - ] + spatial_attrs = [attr for attr in dir(collection.extent.spatial) if not attr.startswith("_")] logger.info(f" Spatial attributes: {spatial_attrs}") # Try to access bbox if it exists if hasattr(collection.extent.spatial, "bbox"): logger.info(f" Spatial bbox: {collection.extent.spatial.bbox}") if hasattr(collection.extent, "temporal") and collection.extent.temporal: - logger.info( - f" Temporal interval: {collection.extent.temporal.interval}" - ) + logger.info(f" Temporal interval: {collection.extent.temporal.interval}") # Validate links assert hasattr(collection, "links"), "Collection should have links" - assert ( - collection.links is not None and len(collection.links) > 0 - ), "Collection should have at least one link" + assert collection.links is not None and len(collection.links) > 0, "Collection should have at least one link" if hasattr(collection, "links") and collection.links: logger.info(f" Links count: {len(collection.links)}") @@ -256,11 +232,7 @@ def test_05_search_items_with_spatial_filter(self, planetarycomputer_endpoint, p ], }, date_time="2021-01-01T00:00:00Z/2022-12-31T00:00:00Z", - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.DESC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.DESC)], limit=50, ) @@ -296,9 +268,7 @@ def test_05_search_items_with_spatial_filter(self, planetarycomputer_endpoint, p first_item = search_response.features[0] assert hasattr(first_item, "id"), "Item should have id" assert hasattr(first_item, "collection"), "Item should have collection" - assert ( - first_item.collection == collection_id - ), "Item collection should match search collection" + assert first_item.collection == collection_id, "Item collection should match search collection" @PlanetaryComputerPreparer() @recorded_by_proxy @@ -310,22 +280,16 @@ def test_06_get_item_collection(self, planetarycomputer_endpoint, planetarycompu client = self.create_client(endpoint=planetarycomputer_endpoint) collection_id = planetarycomputer_collection_id - items_response = client.stac.get_item_collection( - collection_id=collection_id, limit=10 - ) + items_response = client.stac.get_item_collection(collection_id=collection_id, limit=10) # Validate response assert items_response is not None, "Items response should not be None" assert hasattr(items_response, "features"), "Response should have features" # Based on log: Retrieved 10 items with 4 asset types each - assert ( - len(items_response.features) >= 5 - ), f"Expected at least 5 items, got {len(items_response.features)}" + assert len(items_response.features) >= 5, f"Expected at least 5 items, got {len(items_response.features)}" - logger.info( - f"Retrieved {len(items_response.features)} items from collection {collection_id}" - ) + logger.info(f"Retrieved {len(items_response.features)} items from collection {collection_id}") # Log first few items for i, item in enumerate(items_response.features[:5]): @@ -341,15 +305,11 @@ def test_06_get_item_collection(self, planetarycomputer_endpoint, planetarycompu first_item = items_response.features[0] assert hasattr(first_item, "assets"), "Item should have assets" asset_keys = list(first_item.assets.keys()) - assert ( - len(asset_keys) >= 2 - ), f"Expected at least 2 assets, got {len(asset_keys)}" + assert len(asset_keys) >= 2, f"Expected at least 2 assets, got {len(asset_keys)}" # Check for common assets common_assets = ["image", "tilejson", "thumbnail", "rendered_preview"] found_assets = [asset for asset in common_assets if asset in asset_keys] - assert ( - len(found_assets) >= 1 - ), f"Expected at least one common asset type, found: {found_assets}" + assert len(found_assets) >= 1, f"Expected at least one common asset type, found: {found_assets}" @PlanetaryComputerPreparer() @recorded_by_proxy @@ -373,18 +333,14 @@ def test_07_get_collection_queryables(self, planetarycomputer_endpoint, planetar properties = queryables["properties"] # Based on log: Found 4 queryable properties (id, datetime, geometry, eo:cloud_cover) - assert ( - len(properties) >= 3 - ), f"Expected at least 3 queryable properties, got {len(properties)}" + assert len(properties) >= 3, f"Expected at least 3 queryable properties, got {len(properties)}" logger.info(f"Found {len(properties)} queryable properties") # Validate common STAC queryables are present common_queryables = ["id", "datetime", "geometry"] for queryable in common_queryables: - assert ( - queryable in properties - ), f"Expected queryable '{queryable}' not found" + assert queryable in properties, f"Expected queryable '{queryable}' not found" # Log first 15 queryable properties for i, (prop_name, prop_info) in enumerate(list(properties.items())[:15]): @@ -441,9 +397,7 @@ def test_08_search_items_with_temporal_filter(self, planetarycomputer_endpoint, # Properties is a dictionary properties = item.properties if isinstance(properties, dict): - assert ( - "datetime" in properties - ), "Item should have datetime property in dict" + assert "datetime" in properties, "Item should have datetime property in dict" logger.info(f" Datetime: {properties['datetime']}") elif hasattr(properties, "__getitem__"): # It's a dict-like object @@ -451,9 +405,7 @@ def test_08_search_items_with_temporal_filter(self, planetarycomputer_endpoint, logger.info(f" Datetime: {properties['datetime']}") else: # It's an object with attributes - assert hasattr( - properties, "datetime" - ), "Item should have datetime attribute" + assert hasattr(properties, "datetime"), "Item should have datetime attribute" logger.info(f" Datetime: {properties.datetime}") @PlanetaryComputerPreparer() @@ -470,29 +422,21 @@ def test_09_search_items_with_sorting(self, planetarycomputer_endpoint, planetar # Search with descending sort by datetime search_params_desc = StacSearchParameters( collections=[collection_id], - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.DESC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.DESC)], limit=5, ) search_response_desc = client.stac.search(body=search_params_desc) assert search_response_desc is not None, "Search response should not be None" - assert hasattr( - search_response_desc, "features" - ), "Response should have features" + assert hasattr(search_response_desc, "features"), "Response should have features" # Based on log: DESC sorting returned 5 items assert ( len(search_response_desc.features) >= 3 ), f"Expected at least 3 items in DESC sort, got {len(search_response_desc.features)}" - logger.info( - f"Search with DESC sorting returned {len(search_response_desc.features)} items" - ) + logger.info(f"Search with DESC sorting returned {len(search_response_desc.features)} items") # Log sorted results for i, item in enumerate(search_response_desc.features): @@ -504,29 +448,21 @@ def test_09_search_items_with_sorting(self, planetarycomputer_endpoint, planetar # Search with ascending sort search_params_asc = StacSearchParameters( collections=[collection_id], - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.ASC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.ASC)], limit=5, ) search_response_asc = client.stac.search(body=search_params_asc) assert search_response_asc is not None, "ASC search response should not be None" - assert hasattr( - search_response_asc, "features" - ), "ASC response should have features" + assert hasattr(search_response_asc, "features"), "ASC response should have features" # Based on log: ASC sorting returned 5 items assert ( len(search_response_asc.features) >= 3 ), f"Expected at least 3 items in ASC sort, got {len(search_response_asc.features)}" - logger.info( - f"\nSearch with ASC sorting returned {len(search_response_asc.features)} items" - ) + logger.info(f"\nSearch with ASC sorting returned {len(search_response_asc.features)} items") for i, item in enumerate(search_response_asc.features): logger.info(f"Item {i+1}: {item.id}") @@ -601,9 +537,7 @@ def test_10_create_stac_item(self, planetarycomputer_endpoint, planetarycomputer "title": "RGBIR COG tile", } }, - "stac_extensions": [ - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" - ], + "stac_extensions": ["https://stac-extensions.github.io/projection/v1.0.0/schema.json"], } ) @@ -611,9 +545,7 @@ def test_10_create_stac_item(self, planetarycomputer_endpoint, planetarycomputer # Check if item already exists and delete if necessary try: - items_response = client.stac.get_item_collection( - collection_id=collection_id - ) + items_response = client.stac.get_item_collection(collection_id=collection_id) if any(item.id == item_id for item in items_response.features): logger.info(f"Item {item_id} already exists. Deleting it first...") delete_poller = client.stac.begin_delete_item( @@ -626,33 +558,23 @@ def test_10_create_stac_item(self, planetarycomputer_endpoint, planetarycomputer # Create the item try: - create_poller = client.stac.begin_create_item( - collection_id=collection_id, body=stac_item, polling=True - ) + create_poller = client.stac.begin_create_item(collection_id=collection_id, body=stac_item, polling=True) create_result = create_poller.result() logger.info(f"Successfully created item {item_id}") logger.info(f"Create operation result: {create_result}") # Verify the item was created - created_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + created_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) assert created_item is not None, "Created item should be retrievable" assert created_item.id == item_id, "Created item ID should match" # Validate structure of created item - assert hasattr( - created_item, "geometry" - ), "Created item should have geometry" - assert hasattr( - created_item, "properties" - ), "Created item should have properties" + assert hasattr(created_item, "geometry"), "Created item should have geometry" + assert hasattr(created_item, "properties"), "Created item should have properties" assert hasattr(created_item, "assets"), "Created item should have assets" # Based on log: item has image asset - assert ( - "image" in created_item.assets - ), "Created item should have image asset" + assert "image" in created_item.assets, "Created item should have image asset" logger.info(f"Verified item creation: {created_item.id}") logger.info(f"Created item has {len(created_item.assets)} assets") @@ -676,15 +598,11 @@ def test_11_update_stac_item(self, planetarycomputer_endpoint, planetarycomputer try: # Get existing item first - stac_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + stac_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) logger.info(f"Retrieved item for update: {item_id}") # Update properties - use the item as-is and modify it - stac_item_dict = ( - stac_item.as_dict() if hasattr(stac_item, "as_dict") else stac_item - ) + stac_item_dict = stac_item.as_dict() if hasattr(stac_item, "as_dict") else stac_item if "properties" not in stac_item_dict: stac_item_dict["properties"] = {} @@ -707,9 +625,7 @@ def test_11_update_stac_item(self, planetarycomputer_endpoint, planetarycomputer logger.info(f"Update operation result: {update_result}") # Verify the update - updated_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + updated_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) logger.info(f"Verified item update: {updated_item.id}") # Based on log: Update actually failed due to PublicAccessRestricted @@ -719,12 +635,8 @@ def test_11_update_stac_item(self, planetarycomputer_endpoint, planetarycomputer logger.error(f"Failed to update item: {str(e)}") # Based on log: Update fails with "PublicAccessRestricted: Public access is not permitted on this storage account" # This is expected in the test environment - logger.info( - "Item update may not be supported in this environment or item doesn't exist" - ) - logger.info( - "This is expected if public access is restricted on the storage account" - ) + logger.info("Item update may not be supported in this environment or item doesn't exist") + logger.info("This is expected if public access is restricted on the storage account") @PlanetaryComputerPreparer() @recorded_by_proxy @@ -738,9 +650,7 @@ def test_12_get_item(self, planetarycomputer_endpoint, planetarycomputer_collect collection_id = planetarycomputer_collection_id # First, get an item ID from the collection - items_response = client.stac.get_item_collection( - collection_id=collection_id, limit=1 - ) + items_response = client.stac.get_item_collection(collection_id=collection_id, limit=1) if len(items_response.features) > 0: item_id = items_response.features[0].id @@ -760,9 +670,7 @@ def test_12_get_item(self, planetarycomputer_endpoint, planetarycomputer_collect assert hasattr(item, "assets"), "Item should have assets" # Based on log: items have 4 asset types (image, tilejson, thumbnail, rendered_preview) - assert ( - len(item.assets) >= 2 - ), f"Expected at least 2 assets, got {len(item.assets)}" + assert len(item.assets) >= 2, f"Expected at least 2 assets, got {len(item.assets)}" logger.info(f"Retrieved item: {item.id}") logger.info(f" Collection: {item.collection}") @@ -859,9 +767,7 @@ def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetarycompute "title": "RGBIR COG tile", } }, - "stac_extensions": [ - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" - ], + "stac_extensions": ["https://stac-extensions.github.io/projection/v1.0.0/schema.json"], } ) @@ -871,25 +777,19 @@ def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetarycompute try: client.stac.get_item(collection_id=collection_id, item_id=item_id) logger.info(f"Item {item_id} already exists, deleting it first...") - delete_poller = client.stac.begin_delete_item( - collection_id=collection_id, item_id=item_id, polling=True - ) + delete_poller = client.stac.begin_delete_item(collection_id=collection_id, item_id=item_id, polling=True) delete_poller.result() logger.info(f"Deleted existing item {item_id}") except ResourceNotFoundError: logger.info(f"Item {item_id} does not exist, proceeding with creation") # Step 1: Create the item using begin_create_item - create_poller = client.stac.begin_create_item( - collection_id=collection_id, body=stac_item, polling=True - ) + create_poller = client.stac.begin_create_item(collection_id=collection_id, body=stac_item, polling=True) create_poller.result() logger.info(f"Created item {item_id}") # Verify creation - created_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + created_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) assert created_item is not None, "Created item should be retrievable" assert created_item.id == item_id, "Created item ID should match" logger.info(f"Verified item {created_item.id}") @@ -906,9 +806,7 @@ def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetarycompute logger.info(f"Replaced item {item_id} using create_or_replace") # Verify replacement - replaced_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + replaced_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) assert replaced_item is not None, "Replaced item should be retrievable" assert replaced_item.id == item_id, "Replaced item ID should match" @@ -916,23 +814,15 @@ def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetarycompute if hasattr(replaced_item, "properties") and replaced_item.properties: platform = replaced_item.properties.get("platform", "N/A") processing_level = replaced_item.properties.get("processing_level", "N/A") - logger.info( - f"Verified replaced item, platform: {platform}, processing_level: {processing_level}" - ) + logger.info(f"Verified replaced item, platform: {platform}, processing_level: {processing_level}") # Assert the properties were updated - assert ( - platform == "Imagery Updated" - ), f"Expected platform 'Imagery Updated', got '{platform}'" - assert ( - processing_level == "L2" - ), f"Expected processing_level 'L2', got '{processing_level}'" + assert platform == "Imagery Updated", f"Expected platform 'Imagery Updated', got '{platform}'" + assert processing_level == "L2", f"Expected processing_level 'L2', got '{processing_level}'" else: logger.warning("Replaced item has no properties to verify") - logger.info( - f"Successfully verified create_or_replace operation for item {item_id}" - ) + logger.info(f"Successfully verified create_or_replace operation for item {item_id}") @PlanetaryComputerPreparer() @recorded_by_proxy @@ -1005,9 +895,7 @@ def test_14_delete_stac_item(self, planetarycomputer_endpoint, planetarycomputer "title": "RGBIR COG tile", } }, - "stac_extensions": [ - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" - ], + "stac_extensions": ["https://stac-extensions.github.io/projection/v1.0.0/schema.json"], } ) @@ -1015,27 +903,21 @@ def test_14_delete_stac_item(self, planetarycomputer_endpoint, planetarycomputer try: # First, create an item to delete - create_poller = client.stac.begin_create_item( - collection_id=collection_id, body=stac_item, polling=True - ) + create_poller = client.stac.begin_create_item(collection_id=collection_id, body=stac_item, polling=True) create_poller.result() logger.info(f"Created item {item_id}") except ResourceExistsError: logger.info(f"Item {item_id} already exists, will proceed to delete it") # Verify the item exists - existing_item = client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + existing_item = client.stac.get_item(collection_id=collection_id, item_id=item_id) assert existing_item is not None, "Item should exist before deletion" assert existing_item.id == item_id, "Item ID should match" logger.info(f"Verified item {item_id} exists") # Delete the item logger.info(f"Deleting item {item_id}...") - delete_poller = client.stac.begin_delete_item( - collection_id=collection_id, item_id=item_id, polling=True - ) + delete_poller = client.stac.begin_delete_item(collection_id=collection_id, item_id=item_id, polling=True) delete_poller.result() logger.info(f"Delete operation completed for item {item_id}") @@ -1043,9 +925,7 @@ def test_14_delete_stac_item(self, planetarycomputer_endpoint, planetarycomputer logger.info(f"Verifying item {item_id} was deleted...") try: client.stac.get_item(collection_id=collection_id, item_id=item_id) - logger.warning( - f"Item {item_id} still exists after deletion (may take time to propagate)" - ) + logger.warning(f"Item {item_id} still exists after deletion (may take time to propagate)") # In some cases, deletion may take time to propagate, so we don't fail the test except ResourceNotFoundError: logger.info(f"Verified item {item_id} was successfully deleted") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification_async.py index d962d1912e81..d10bdd06080d 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_02_stac_specification_async.py @@ -35,16 +35,12 @@ log_file = log_dir / "stac_specification_test_results.log" file_handler = logging.FileHandler(log_file, mode="w") file_handler.setLevel(logging.INFO) -file_formatter = logging.Formatter( - "%(asctime)s - %(name)s - %(levelname)s - %(message)s" -) +file_formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") file_handler.setFormatter(file_formatter) logger.addHandler(file_handler) -class TestPlanetaryComputerStacSpecificationAsync( - PlanetaryComputerProClientTestBaseAsync -): +class TestPlanetaryComputerStacSpecificationAsync(PlanetaryComputerProClientTestBaseAsync): """Test class for STAC API specification operations.""" @PlanetaryComputerPreparer() @@ -60,12 +56,8 @@ async def test_01_get_conformance_class(self, planetarycomputer_endpoint): # Validate conformance response assert conformance is not None, "Conformance should not be None" - assert hasattr( - conformance, "conforms_to" - ), "Conformance should have conforms_to property" - assert ( - len(conformance.conforms_to) > 0 - ), "Conformance should have at least one URI" + assert hasattr(conformance, "conforms_to"), "Conformance should have conforms_to property" + assert len(conformance.conforms_to) > 0, "Conformance should have at least one URI" # Based on log: Retrieved 15 conformance classes assert ( @@ -116,15 +108,11 @@ async def test_03_list_collections(self, planetarycomputer_endpoint, planetaryco # Validate collections response assert collections is not None, "Collections should not be None" - assert hasattr( - collections, "collections" - ), "Response should have collections property" + assert hasattr(collections, "collections"), "Response should have collections property" assert len(collections.collections) > 0, "Should have at least one collection" # Based on log: Retrieved 10 collections - assert ( - len(collections.collections) >= 5 - ), f"Expected at least 5 collections, got {len(collections.collections)}" + assert len(collections.collections) >= 5, f"Expected at least 5 collections, got {len(collections.collections)}" logger.info(f"Retrieved {len(collections.collections)} collections") @@ -147,16 +135,12 @@ async def test_03_list_collections(self, planetarycomputer_endpoint, planetaryco # Validate collection structure first_collection = collections.collections[0] assert hasattr(first_collection, "id"), "Collection should have id" - assert ( - first_collection.id is not None and len(first_collection.id) > 0 - ), "Collection ID should not be empty" + assert first_collection.id is not None and len(first_collection.id) > 0, "Collection ID should not be empty" assert hasattr(first_collection, "extent"), "Collection should have extent" # Validate that the collection is in the list collection_ids = [c.id for c in collections.collections] - assert ( - collection_id in collection_ids - ), f"{collection_id} collection should be present" + assert collection_id in collection_ids, f"{collection_id} collection should be present" await self.close_client() @@ -181,9 +165,7 @@ async def test_04_get_collection(self, planetarycomputer_endpoint, planetarycomp # Validate title is present assert hasattr(collection, "title"), "Collection should have title" - assert ( - collection.title is not None and len(collection.title) > 0 - ), "Collection title should not be empty" + assert collection.title is not None and len(collection.title) > 0, "Collection title should not be empty" logger.info(f"Retrieved collection: {collection.id}") if hasattr(collection, "title") and collection.title: @@ -201,25 +183,17 @@ async def test_04_get_collection(self, planetarycomputer_endpoint, planetarycomp logger.info(" Extent:") if hasattr(collection.extent, "spatial") and collection.extent.spatial: # Log available attributes instead of assuming bbox exists - spatial_attrs = [ - attr - for attr in dir(collection.extent.spatial) - if not attr.startswith("_") - ] + spatial_attrs = [attr for attr in dir(collection.extent.spatial) if not attr.startswith("_")] logger.info(f" Spatial attributes: {spatial_attrs}") # Try to access bbox if it exists if hasattr(collection.extent.spatial, "bbox"): logger.info(f" Spatial bbox: {collection.extent.spatial.bbox}") if hasattr(collection.extent, "temporal") and collection.extent.temporal: - logger.info( - f" Temporal interval: {collection.extent.temporal.interval}" - ) + logger.info(f" Temporal interval: {collection.extent.temporal.interval}") # Validate links assert hasattr(collection, "links"), "Collection should have links" - assert ( - collection.links is not None and len(collection.links) > 0 - ), "Collection should have at least one link" + assert collection.links is not None and len(collection.links) > 0, "Collection should have at least one link" if hasattr(collection, "links") and collection.links: logger.info(f" Links count: {len(collection.links)}") @@ -264,11 +238,7 @@ async def test_05_search_items_with_spatial_filter( ], }, date_time="2021-01-01T00:00:00Z/2022-12-31T00:00:00Z", - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.DESC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.DESC)], limit=50, ) @@ -304,9 +274,7 @@ async def test_05_search_items_with_spatial_filter( first_item = search_response.features[0] assert hasattr(first_item, "id"), "Item should have id" assert hasattr(first_item, "collection"), "Item should have collection" - assert ( - first_item.collection == collection_id - ), "Item collection should match search collection" + assert first_item.collection == collection_id, "Item collection should match search collection" await self.close_client() @@ -320,22 +288,16 @@ async def test_06_get_item_collection(self, planetarycomputer_endpoint, planetar client = self.create_client(endpoint=planetarycomputer_endpoint) collection_id = planetarycomputer_collection_id - items_response = await client.stac.get_item_collection( - collection_id=collection_id, limit=10 - ) + items_response = await client.stac.get_item_collection(collection_id=collection_id, limit=10) # Validate response assert items_response is not None, "Items response should not be None" assert hasattr(items_response, "features"), "Response should have features" # Based on log: Retrieved 10 items with 4 asset types each - assert ( - len(items_response.features) >= 5 - ), f"Expected at least 5 items, got {len(items_response.features)}" + assert len(items_response.features) >= 5, f"Expected at least 5 items, got {len(items_response.features)}" - logger.info( - f"Retrieved {len(items_response.features)} items from collection {collection_id}" - ) + logger.info(f"Retrieved {len(items_response.features)} items from collection {collection_id}") # Log first few items for i, item in enumerate(items_response.features[:5]): @@ -351,15 +313,11 @@ async def test_06_get_item_collection(self, planetarycomputer_endpoint, planetar first_item = items_response.features[0] assert hasattr(first_item, "assets"), "Item should have assets" asset_keys = list(first_item.assets.keys()) - assert ( - len(asset_keys) >= 2 - ), f"Expected at least 2 assets, got {len(asset_keys)}" + assert len(asset_keys) >= 2, f"Expected at least 2 assets, got {len(asset_keys)}" # Check for common assets common_assets = ["image", "tilejson", "thumbnail", "rendered_preview"] found_assets = [asset for asset in common_assets if asset in asset_keys] - assert ( - len(found_assets) >= 1 - ), f"Expected at least one common asset type, found: {found_assets}" + assert len(found_assets) >= 1, f"Expected at least one common asset type, found: {found_assets}" await self.close_client() @@ -373,9 +331,7 @@ async def test_07_get_collection_queryables(self, planetarycomputer_endpoint, pl client = self.create_client(endpoint=planetarycomputer_endpoint) collection_id = planetarycomputer_collection_id - queryables = await client.stac.get_collection_queryables( - collection_id=collection_id - ) + queryables = await client.stac.get_collection_queryables(collection_id=collection_id) # Validate queryables assert queryables is not None, "Queryables should not be None" @@ -387,18 +343,14 @@ async def test_07_get_collection_queryables(self, planetarycomputer_endpoint, pl properties = queryables["properties"] # Based on log: Found 4 queryable properties (id, datetime, geometry, eo:cloud_cover) - assert ( - len(properties) >= 3 - ), f"Expected at least 3 queryable properties, got {len(properties)}" + assert len(properties) >= 3, f"Expected at least 3 queryable properties, got {len(properties)}" logger.info(f"Found {len(properties)} queryable properties") # Validate common STAC queryables are present common_queryables = ["id", "datetime", "geometry"] for queryable in common_queryables: - assert ( - queryable in properties - ), f"Expected queryable '{queryable}' not found" + assert queryable in properties, f"Expected queryable '{queryable}' not found" # Log first 15 queryable properties for i, (prop_name, prop_info) in enumerate(list(properties.items())[:15]): @@ -459,9 +411,7 @@ async def test_08_search_items_with_temporal_filter( # Properties is a dictionary properties = item.properties if isinstance(properties, dict): - assert ( - "datetime" in properties - ), "Item should have datetime property in dict" + assert "datetime" in properties, "Item should have datetime property in dict" logger.info(f" Datetime: {properties['datetime']}") elif hasattr(properties, "__getitem__"): # It's a dict-like object @@ -469,9 +419,7 @@ async def test_08_search_items_with_temporal_filter( logger.info(f" Datetime: {properties['datetime']}") else: # It's an object with attributes - assert hasattr( - properties, "datetime" - ), "Item should have datetime attribute" + assert hasattr(properties, "datetime"), "Item should have datetime attribute" logger.info(f" Datetime: {properties.datetime}") await self.close_client() @@ -490,29 +438,21 @@ async def test_09_search_items_with_sorting(self, planetarycomputer_endpoint, pl # Search with descending sort by datetime search_params_desc = StacSearchParameters( collections=[collection_id], - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.DESC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.DESC)], limit=5, ) search_response_desc = await client.stac.search(body=search_params_desc) assert search_response_desc is not None, "Search response should not be None" - assert hasattr( - search_response_desc, "features" - ), "Response should have features" + assert hasattr(search_response_desc, "features"), "Response should have features" # Based on log: DESC sorting returned 5 items assert ( len(search_response_desc.features) >= 3 ), f"Expected at least 3 items in DESC sort, got {len(search_response_desc.features)}" - logger.info( - f"Search with DESC sorting returned {len(search_response_desc.features)} items" - ) + logger.info(f"Search with DESC sorting returned {len(search_response_desc.features)} items") # Log sorted results for i, item in enumerate(search_response_desc.features): @@ -524,29 +464,21 @@ async def test_09_search_items_with_sorting(self, planetarycomputer_endpoint, pl # Search with ascending sort search_params_asc = StacSearchParameters( collections=[collection_id], - sort_by=[ - StacSortExtension( - field="datetime", direction=StacSearchSortingDirection.ASC - ) - ], + sort_by=[StacSortExtension(field="datetime", direction=StacSearchSortingDirection.ASC)], limit=5, ) search_response_asc = await client.stac.search(body=search_params_asc) assert search_response_asc is not None, "ASC search response should not be None" - assert hasattr( - search_response_asc, "features" - ), "ASC response should have features" + assert hasattr(search_response_asc, "features"), "ASC response should have features" # Based on log: ASC sorting returned 5 items assert ( len(search_response_asc.features) >= 3 ), f"Expected at least 3 items in ASC sort, got {len(search_response_asc.features)}" - logger.info( - f"\nSearch with ASC sorting returned {len(search_response_asc.features)} items" - ) + logger.info(f"\nSearch with ASC sorting returned {len(search_response_asc.features)} items") for i, item in enumerate(search_response_asc.features): logger.info(f"Item {i+1}: {item.id}") @@ -623,9 +555,7 @@ async def test_10_create_stac_item(self, planetarycomputer_endpoint, planetaryco "title": "RGBIR COG tile", } }, - "stac_extensions": [ - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" - ], + "stac_extensions": ["https://stac-extensions.github.io/projection/v1.0.0/schema.json"], } ) @@ -633,9 +563,7 @@ async def test_10_create_stac_item(self, planetarycomputer_endpoint, planetaryco # Check if item already exists and delete if necessary try: - items_response = await client.stac.get_item_collection( - collection_id=collection_id - ) + items_response = await client.stac.get_item_collection(collection_id=collection_id) if any(item.id == item_id for item in items_response.features): logger.info(f"Item {item_id} already exists. Deleting it first...") delete_poller = await client.stac.begin_delete_item( @@ -656,25 +584,17 @@ async def test_10_create_stac_item(self, planetarycomputer_endpoint, planetaryco logger.info(f"Create operation result: {create_result}") # Verify the item was created - created_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + created_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) assert created_item is not None, "Created item should be retrievable" assert created_item.id == item_id, "Created item ID should match" # Validate structure of created item - assert hasattr( - created_item, "geometry" - ), "Created item should have geometry" - assert hasattr( - created_item, "properties" - ), "Created item should have properties" + assert hasattr(created_item, "geometry"), "Created item should have geometry" + assert hasattr(created_item, "properties"), "Created item should have properties" assert hasattr(created_item, "assets"), "Created item should have assets" # Based on log: item has image asset - assert ( - "image" in created_item.assets - ), "Created item should have image asset" + assert "image" in created_item.assets, "Created item should have image asset" logger.info(f"Verified item creation: {created_item.id}") logger.info(f"Created item has {len(created_item.assets)} assets") @@ -700,15 +620,11 @@ async def test_11_update_stac_item(self, planetarycomputer_endpoint, planetaryco try: # Get existing item first - stac_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + stac_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) logger.info(f"Retrieved item for update: {item_id}") # Update properties - use the item as-is and modify it - stac_item_dict = ( - stac_item.as_dict() if hasattr(stac_item, "as_dict") else stac_item - ) + stac_item_dict = stac_item.as_dict() if hasattr(stac_item, "as_dict") else stac_item if "properties" not in stac_item_dict: stac_item_dict["properties"] = {} @@ -731,9 +647,7 @@ async def test_11_update_stac_item(self, planetarycomputer_endpoint, planetaryco logger.info(f"Update operation result: {update_result}") # Verify the update - updated_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + updated_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) logger.info(f"Verified item update: {updated_item.id}") # Based on log: Update actually failed due to PublicAccessRestricted @@ -743,12 +657,8 @@ async def test_11_update_stac_item(self, planetarycomputer_endpoint, planetaryco logger.error(f"Failed to update item: {str(e)}") # Based on log: Update fails with "PublicAccessRestricted: Public access is not permitted on this storage account" # This is expected in the test environment - logger.info( - "Item update may not be supported in this environment or item doesn't exist" - ) - logger.info( - "This is expected if public access is restricted on the storage account" - ) + logger.info("Item update may not be supported in this environment or item doesn't exist") + logger.info("This is expected if public access is restricted on the storage account") await self.close_client() @@ -764,18 +674,14 @@ async def test_12_get_item(self, planetarycomputer_endpoint, planetarycomputer_c collection_id = planetarycomputer_collection_id # First, get an item ID from the collection - items_response = await client.stac.get_item_collection( - collection_id=collection_id, limit=1 - ) + items_response = await client.stac.get_item_collection(collection_id=collection_id, limit=1) if len(items_response.features) > 0: item_id = items_response.features[0].id logger.info(f"Getting item: {item_id}") # Get the specific item - item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) # Validate item assert item is not None, "Item should not be None" @@ -788,9 +694,7 @@ async def test_12_get_item(self, planetarycomputer_endpoint, planetarycomputer_c assert hasattr(item, "assets"), "Item should have assets" # Based on log: items have 4 asset types (image, tilejson, thumbnail, rendered_preview) - assert ( - len(item.assets) >= 2 - ), f"Expected at least 2 assets, got {len(item.assets)}" + assert len(item.assets) >= 2, f"Expected at least 2 assets, got {len(item.assets)}" logger.info(f"Retrieved item: {item.id}") logger.info(f" Collection: {item.collection}") @@ -889,9 +793,7 @@ async def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetaryc "title": "RGBIR COG tile", } }, - "stac_extensions": [ - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" - ], + "stac_extensions": ["https://stac-extensions.github.io/projection/v1.0.0/schema.json"], } ) @@ -910,16 +812,12 @@ async def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetaryc logger.info(f"Item {item_id} does not exist, proceeding with creation") # Step 1: Create the item using begin_create_item - create_poller = await client.stac.begin_create_item( - collection_id=collection_id, body=stac_item, polling=True - ) + create_poller = await client.stac.begin_create_item(collection_id=collection_id, body=stac_item, polling=True) await create_poller.result() logger.info(f"Created item {item_id}") # Verify creation - created_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + created_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) assert created_item is not None, "Created item should be retrievable" assert created_item.id == item_id, "Created item ID should match" logger.info(f"Verified item {created_item.id}") @@ -936,9 +834,7 @@ async def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetaryc logger.info(f"Replaced item {item_id} using create_or_replace") # Verify replacement - replaced_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + replaced_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) assert replaced_item is not None, "Replaced item should be retrievable" assert replaced_item.id == item_id, "Replaced item ID should match" @@ -946,23 +842,15 @@ async def test_13_replace_stac_item(self, planetarycomputer_endpoint, planetaryc if hasattr(replaced_item, "properties") and replaced_item.properties: platform = replaced_item.properties.get("platform", "N/A") processing_level = replaced_item.properties.get("processing_level", "N/A") - logger.info( - f"Verified replaced item, platform: {platform}, processing_level: {processing_level}" - ) + logger.info(f"Verified replaced item, platform: {platform}, processing_level: {processing_level}") # Assert the properties were updated - assert ( - platform == "Imagery Updated" - ), f"Expected platform 'Imagery Updated', got '{platform}'" - assert ( - processing_level == "L2" - ), f"Expected processing_level 'L2', got '{processing_level}'" + assert platform == "Imagery Updated", f"Expected platform 'Imagery Updated', got '{platform}'" + assert processing_level == "L2", f"Expected processing_level 'L2', got '{processing_level}'" else: logger.warning("Replaced item has no properties to verify") - logger.info( - f"Successfully verified create_or_replace operation for item {item_id}" - ) + logger.info(f"Successfully verified create_or_replace operation for item {item_id}") await self.close_client() @@ -1037,9 +925,7 @@ async def test_14_delete_stac_item(self, planetarycomputer_endpoint, planetaryco "title": "RGBIR COG tile", } }, - "stac_extensions": [ - "https://stac-extensions.github.io/projection/v1.0.0/schema.json" - ], + "stac_extensions": ["https://stac-extensions.github.io/projection/v1.0.0/schema.json"], } ) @@ -1056,18 +942,14 @@ async def test_14_delete_stac_item(self, planetarycomputer_endpoint, planetaryco logger.info(f"Item {item_id} already exists, will proceed to delete it") # Verify the item exists - existing_item = await client.stac.get_item( - collection_id=collection_id, item_id=item_id - ) + existing_item = await client.stac.get_item(collection_id=collection_id, item_id=item_id) assert existing_item is not None, "Item should exist before deletion" assert existing_item.id == item_id, "Item ID should match" logger.info(f"Verified item {item_id} exists") # Delete the item logger.info(f"Deleting item {item_id}...") - delete_poller = await client.stac.begin_delete_item( - collection_id=collection_id, item_id=item_id, polling=True - ) + delete_poller = await client.stac.begin_delete_item(collection_id=collection_id, item_id=item_id, polling=True) await delete_poller.result() logger.info(f"Delete operation completed for item {item_id}") @@ -1075,9 +957,7 @@ async def test_14_delete_stac_item(self, planetarycomputer_endpoint, planetaryco logger.info(f"Verifying item {item_id} was deleted...") try: await client.stac.get_item(collection_id=collection_id, item_id=item_id) - logger.warning( - f"Item {item_id} still exists after deletion (may take time to propagate)" - ) + logger.warning(f"Item {item_id} still exists after deletion (may take time to propagate)") # In some cases, deletion may take time to propagate, so we don't fail the test except ResourceNotFoundError: logger.info(f"Verified item {item_id} was successfully deleted") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas.py index a360d6f72431..872435644072 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas.py @@ -6,6 +6,7 @@ """ Unit tests for Shared Access Signature (SAS) operations. """ + import logging from pathlib import Path from urllib.request import urlopen @@ -40,9 +41,7 @@ class TestPlanetaryComputerSas(PlanetaryComputerProClientTestBase): @PlanetaryComputerPreparer() @recorded_by_proxy - def test_01_get_token_with_default_duration( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_01_get_token_with_default_duration(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test generating a SAS token with default duration.""" test_logger.info("=" * 80) test_logger.info("TEST: test_01_get_token_with_default_duration") @@ -52,12 +51,8 @@ def test_01_get_token_with_default_duration( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_token(collection_id={planetarycomputer_collection_id})" - ) - response = client.shared_access_signature.get_token( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_token(collection_id={planetarycomputer_collection_id})") + response = client.shared_access_signature.get_token(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") @@ -73,9 +68,7 @@ def test_01_get_token_with_default_duration( # Verify token format - in playback mode, entire token is sanitized to "Sanitized" if is_live(): # In live mode, verify SAS token format with regex - sas_token_pattern = ( - r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" - ) + sas_token_pattern = r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" assert re.search( sas_token_pattern, response.token ), "Token should match SAS token format (st, se, sp, sv, sr, sig)" @@ -85,31 +78,23 @@ def test_01_get_token_with_default_duration( assert len(response.token) > 0, "Token should not be empty" # Verify expires_on is a datetime in the future - assert isinstance( - response.expires_on, datetime - ), "expires_on should be a datetime object" + assert isinstance(response.expires_on, datetime), "expires_on should be a datetime object" if is_live(): - assert response.expires_on > datetime.now( - timezone.utc - ), "Token expiry should be in the future" + assert response.expires_on > datetime.now(timezone.utc), "Token expiry should be in the future" # Verify default duration is approximately 24 hours (allow 5 minute tolerance for clock skew) if is_live(): now = datetime.now(timezone.utc) expected_expiry = now + timedelta(hours=24) time_diff = abs((response.expires_on - expected_expiry).total_seconds()) - assert ( - time_diff < 300 - ), f"Expiry should be ~24 hours from now (diff: {time_diff}s)" + assert time_diff < 300, f"Expiry should be ~24 hours from now (diff: {time_diff}s)" test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_02_get_token_with_custom_duration( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_02_get_token_with_custom_duration(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test generating a SAS token with custom duration.""" test_logger.info("=" * 80) test_logger.info("TEST: test_02_get_token_with_custom_duration") @@ -120,9 +105,7 @@ def test_02_get_token_with_custom_duration( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_token(collection_id={planetarycomputer_collection_id}, duration_in_minutes=60)" - ) + test_logger.info(f"Calling: get_token(collection_id={planetarycomputer_collection_id}, duration_in_minutes=60)") response = client.shared_access_signature.get_token( collection_id=planetarycomputer_collection_id, duration_in_minutes=60 ) @@ -141,9 +124,7 @@ def test_02_get_token_with_custom_duration( # Verify token format - in playback mode, entire token is sanitized to "Sanitized" if is_live(): # In live mode, verify SAS token format with regex - sas_token_pattern = ( - r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" - ) + sas_token_pattern = r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" assert re.search( sas_token_pattern, response.token ), "Token should match SAS token format (st, se, sp, sv, sr, sig)" @@ -153,31 +134,23 @@ def test_02_get_token_with_custom_duration( assert len(response.token) > 0, "Token should not be empty" # Verify expires_on is a datetime in the future - assert isinstance( - response.expires_on, datetime - ), "expires_on should be a datetime object" + assert isinstance(response.expires_on, datetime), "expires_on should be a datetime object" if is_live(): - assert response.expires_on > datetime.now( - timezone.utc - ), "Token expiry should be in the future" + assert response.expires_on > datetime.now(timezone.utc), "Token expiry should be in the future" # Verify custom duration is approximately 60 minutes (allow 5 minute tolerance for clock skew) if is_live(): now = datetime.now(timezone.utc) expected_expiry = now + timedelta(minutes=60) time_diff = abs((response.expires_on - expected_expiry).total_seconds()) - assert ( - time_diff < 300 - ), f"Expiry should be ~60 minutes from now (diff: {time_diff}s)" + assert time_diff < 300, f"Expiry should be ~60 minutes from now (diff: {time_diff}s)" test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_03_get_sign_with_collection_thumbnail( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_03_get_sign_with_collection_thumbnail(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test signing an asset HREF using collection thumbnail.""" test_logger.info("=" * 80) test_logger.info("TEST: test_03_get_sign_with_collection_thumbnail") @@ -188,9 +161,7 @@ def test_03_get_sign_with_collection_thumbnail( client = self.create_client(endpoint=planetarycomputer_endpoint) test_logger.info("Getting collection...") - collection = client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = client.stac.get_collection(collection_id=planetarycomputer_collection_id) assert collection is not None assert collection.assets is not None @@ -221,51 +192,37 @@ def test_03_get_sign_with_collection_thumbnail( test_logger.info(f"Has sig param: {'sig=' in signed_href.lower()}") # Verify signed HREF is different and contains SAS parameters - assert ( - signed_href != original_href - ), "Signed HREF should differ from original HREF" + assert signed_href != original_href, "Signed HREF should differ from original HREF" # Verify SAS parameters in HREF - skip regex in playback due to sanitization variations if is_live(): # In live mode, verify SAS HREF format with regex - sas_href_pattern = ( - r"\?.*st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" - ) + sas_href_pattern = r"\?.*st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" assert re.search( sas_href_pattern, signed_href ), "Signed HREF should contain SAS parameters (st, se, sp, sv, sr, sig)" else: # In playback mode, just verify basic SAS structure exists assert "?" in signed_href, "Signed HREF should have query parameters" - assert ( - "sig=" in signed_href.lower() - ), "Signed HREF should contain signature parameter" + assert "sig=" in signed_href.lower(), "Signed HREF should contain signature parameter" # Verify expires_on is a datetime in the future (if present) if response.expires_on is not None: - assert isinstance( - response.expires_on, datetime - ), "expires_on should be a datetime object" + assert isinstance(response.expires_on, datetime), "expires_on should be a datetime object" if is_live(): - assert response.expires_on > datetime.now( - timezone.utc - ), "Token expiry should be in the future" + assert response.expires_on > datetime.now(timezone.utc), "Token expiry should be in the future" # Verify the signed HREF starts with the original base URL (strip query params first) original_base = original_href.split("?")[0] signed_base = signed_href.split("?")[0] - assert ( - signed_base == original_base - ), "Signed HREF should have the same base URL as original" + assert signed_base == original_base, "Signed HREF should have the same base URL as original" test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_04_signed_href_can_download_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_04_signed_href_can_download_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test that a signed HREF can be used to download an asset. """ @@ -278,9 +235,7 @@ def test_04_signed_href_can_download_asset( client = self.create_client(endpoint=planetarycomputer_endpoint) test_logger.info("Getting collection...") - collection = client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = client.stac.get_collection(collection_id=planetarycomputer_collection_id) assert "thumbnail" in collection.assets, "Collection does not have a thumbnail asset" thumbnail_href = collection.assets["thumbnail"].href test_logger.info(f"Thumbnail HREF: {thumbnail_href}") @@ -307,15 +262,11 @@ def test_04_signed_href_can_download_asset( test_logger.info(f"Content-Type: {content_type}") # Verify successful download - assert ( - download_response.status == 200 - ), f"Expected 200, got {download_response.status}" + assert download_response.status == 200, f"Expected 200, got {download_response.status}" assert len(content) > 0, "Downloaded content should not be empty" # Verify it's actually binary image data by checking PNG magic bytes - assert ( - content[:4] == b"\x89PNG" - ), "Downloaded content should be a PNG image" + assert content[:4] == b"\x89PNG", "Downloaded content should be a PNG image" break except Exception as e: if attempt < max_retries - 1: @@ -330,9 +281,7 @@ def test_04_signed_href_can_download_asset( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_05_revoke_token( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_05_revoke_token(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test revoking a SAS token. This test runs LAST to avoid breaking other tests.""" test_logger.info("=" * 80) test_logger.info("TEST: test_05_revoke_token") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas_async.py index 846d61991b89..79ac7e87e595 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_03_sas_async.py @@ -6,6 +6,7 @@ """ Unit tests for Shared Access Signature (SAS) operations. """ + import logging from pathlib import Path from urllib.request import urlopen @@ -54,12 +55,8 @@ async def test_01_get_token_with_default_duration( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_token(collection_id={planetarycomputer_collection_id})" - ) - response = await client.shared_access_signature.get_token( - collection_id=planetarycomputer_collection_id - ) + test_logger.info(f"Calling: get_token(collection_id={planetarycomputer_collection_id})") + response = await client.shared_access_signature.get_token(collection_id=planetarycomputer_collection_id) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") @@ -75,9 +72,7 @@ async def test_01_get_token_with_default_duration( # Verify token format - in playback mode, entire token is sanitized to "Sanitized" if is_live(): # In live mode, verify SAS token format with regex - sas_token_pattern = ( - r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" - ) + sas_token_pattern = r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" assert re.search( sas_token_pattern, response.token ), "Token should match SAS token format (st, se, sp, sv, sr, sig)" @@ -87,23 +82,17 @@ async def test_01_get_token_with_default_duration( assert len(response.token) > 0, "Token should not be empty" # Verify expires_on is a datetime in the future - assert isinstance( - response.expires_on, datetime - ), "expires_on should be a datetime object" + assert isinstance(response.expires_on, datetime), "expires_on should be a datetime object" if is_live(): - assert response.expires_on > datetime.now( - timezone.utc - ), "Token expiry should be in the future" + assert response.expires_on > datetime.now(timezone.utc), "Token expiry should be in the future" # Verify default duration is approximately 24 hours (allow 5 minute tolerance for clock skew) if is_live(): now = datetime.now(timezone.utc) expected_expiry = now + timedelta(hours=24) time_diff = abs((response.expires_on - expected_expiry).total_seconds()) - assert ( - time_diff < 300 - ), f"Expiry should be ~24 hours from now (diff: {time_diff}s)" + assert time_diff < 300, f"Expiry should be ~24 hours from now (diff: {time_diff}s)" test_logger.info("Test PASSED\n") @@ -111,9 +100,7 @@ async def test_01_get_token_with_default_duration( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_02_get_token_with_custom_duration( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_02_get_token_with_custom_duration(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test generating a SAS token with custom duration.""" test_logger.info("=" * 80) test_logger.info("TEST: test_02_get_token_with_custom_duration") @@ -124,9 +111,7 @@ async def test_02_get_token_with_custom_duration( client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_token(collection_id={planetarycomputer_collection_id}, duration_in_minutes=60)" - ) + test_logger.info(f"Calling: get_token(collection_id={planetarycomputer_collection_id}, duration_in_minutes=60)") response = await client.shared_access_signature.get_token( collection_id=planetarycomputer_collection_id, duration_in_minutes=60 ) @@ -145,9 +130,7 @@ async def test_02_get_token_with_custom_duration( # Verify token format - in playback mode, entire token is sanitized to "Sanitized" if is_live(): # In live mode, verify SAS token format with regex - sas_token_pattern = ( - r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" - ) + sas_token_pattern = r"st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" assert re.search( sas_token_pattern, response.token ), "Token should match SAS token format (st, se, sp, sv, sr, sig)" @@ -157,23 +140,17 @@ async def test_02_get_token_with_custom_duration( assert len(response.token) > 0, "Token should not be empty" # Verify expires_on is a datetime in the future - assert isinstance( - response.expires_on, datetime - ), "expires_on should be a datetime object" + assert isinstance(response.expires_on, datetime), "expires_on should be a datetime object" if is_live(): - assert response.expires_on > datetime.now( - timezone.utc - ), "Token expiry should be in the future" + assert response.expires_on > datetime.now(timezone.utc), "Token expiry should be in the future" # Verify custom duration is approximately 60 minutes (allow 5 minute tolerance for clock skew) if is_live(): now = datetime.now(timezone.utc) expected_expiry = now + timedelta(minutes=60) time_diff = abs((response.expires_on - expected_expiry).total_seconds()) - assert ( - time_diff < 300 - ), f"Expiry should be ~60 minutes from now (diff: {time_diff}s)" + assert time_diff < 300, f"Expiry should be ~60 minutes from now (diff: {time_diff}s)" test_logger.info("Test PASSED\n") @@ -194,9 +171,7 @@ async def test_03_get_sign_with_collection_thumbnail( client = self.create_client(endpoint=planetarycomputer_endpoint) test_logger.info("Getting collection...") - collection = await client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = await client.stac.get_collection(collection_id=planetarycomputer_collection_id) assert collection is not None assert collection.assets is not None @@ -227,43 +202,31 @@ async def test_03_get_sign_with_collection_thumbnail( test_logger.info(f"Has sig param: {'sig=' in signed_href.lower()}") # Verify signed HREF is different and contains SAS parameters - assert ( - signed_href != original_href - ), "Signed HREF should differ from original HREF" + assert signed_href != original_href, "Signed HREF should differ from original HREF" # Verify SAS parameters in HREF - skip regex in playback due to sanitization variations if is_live(): # In live mode, verify SAS HREF format with regex - sas_href_pattern = ( - r"\?.*st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" - ) + sas_href_pattern = r"\?.*st=[^&]+&se=[^&]+&sp=[^&]+&sv=[^&]+&sr=[^&]+&.*sig=[^&]+" assert re.search( sas_href_pattern, signed_href ), "Signed HREF should contain SAS parameters (st, se, sp, sv, sr, sig)" else: # In playback mode, just verify basic SAS structure exists assert "?" in signed_href, "Signed HREF should have query parameters" - assert ( - "sig=" in signed_href.lower() - ), "Signed HREF should contain signature parameter" + assert "sig=" in signed_href.lower(), "Signed HREF should contain signature parameter" # Verify expires_on is a datetime in the future (if present) if response.expires_on is not None: - assert isinstance( - response.expires_on, datetime - ), "expires_on should be a datetime object" + assert isinstance(response.expires_on, datetime), "expires_on should be a datetime object" if is_live(): - assert response.expires_on > datetime.now( - timezone.utc - ), "Token expiry should be in the future" + assert response.expires_on > datetime.now(timezone.utc), "Token expiry should be in the future" # Verify the signed HREF starts with the original base URL (strip query params first) original_base = original_href.split("?")[0] signed_base = signed_href.split("?")[0] - assert ( - signed_base == original_base - ), "Signed HREF should have the same base URL as original" + assert signed_base == original_base, "Signed HREF should have the same base URL as original" test_logger.info("Test PASSED\n") @@ -271,9 +234,7 @@ async def test_03_get_sign_with_collection_thumbnail( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_04_signed_href_can_download_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_04_signed_href_can_download_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test that a signed HREF can be used to download an asset. """ @@ -286,17 +247,13 @@ async def test_04_signed_href_can_download_asset( client = self.create_client(endpoint=planetarycomputer_endpoint) test_logger.info("Getting collection...") - collection = await client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = await client.stac.get_collection(collection_id=planetarycomputer_collection_id) assert "thumbnail" in collection.assets, "Collection does not have a thumbnail asset" thumbnail_href = collection.assets["thumbnail"].href test_logger.info(f"Thumbnail HREF: {thumbnail_href}") test_logger.info(f"Calling: get_sign(href={thumbnail_href})") - sign_response = await client.shared_access_signature.get_sign( - href=thumbnail_href - ) + sign_response = await client.shared_access_signature.get_sign(href=thumbnail_href) signed_href = sign_response.href test_logger.info(f"Signed HREF: {signed_href}") @@ -317,15 +274,11 @@ async def test_04_signed_href_can_download_asset( test_logger.info(f"Content-Type: {content_type}") # Verify successful download - assert ( - download_response.status == 200 - ), f"Expected 200, got {download_response.status}" + assert download_response.status == 200, f"Expected 200, got {download_response.status}" assert len(content) > 0, "Downloaded content should not be empty" # Verify it's actually binary image data by checking PNG magic bytes - assert ( - content[:4] == b"\x89PNG" - ), "Downloaded content should be a PNG image" + assert content[:4] == b"\x89PNG", "Downloaded content should be a PNG image" break except Exception as e: if attempt < max_retries - 1: @@ -342,9 +295,7 @@ async def test_04_signed_href_can_download_asset( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_05_revoke_token( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_05_revoke_token(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """Test revoking a SAS token. This test runs LAST to avoid breaking other tests.""" test_logger.info("=" * 80) test_logger.info("TEST: test_05_revoke_token") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_04_stac_item_tiler.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_04_stac_item_tiler.py index cca89f2bce67..52260f539a7f 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_04_stac_item_tiler.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_04_stac_item_tiler.py @@ -7,6 +7,7 @@ """ Unit tests for STAC Item Tiler operations. """ + import io import logging from pathlib import Path @@ -58,27 +59,19 @@ def test_01_get_tile_matrix_definitions(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - "Calling: get_tile_matrix_definitions(tile_matrix_set_id='WebMercatorQuad')" - ) - response = client.data.get_tile_matrix_definitions( - tile_matrix_set_id="WebMercatorQuad" - ) + test_logger.info("Calling: get_tile_matrix_definitions(tile_matrix_set_id='WebMercatorQuad')") + response = client.data.get_tile_matrix_definitions(tile_matrix_set_id="WebMercatorQuad") test_logger.info(f"Response type: {type(response)}") if hasattr(response, "as_dict"): response_dict = response.as_dict() test_logger.info(f"Response keys: {list(response_dict.keys())}") - test_logger.info( - f"Number of tile matrices: {len(response_dict.get('tileMatrices', []))}" - ) + test_logger.info(f"Number of tile matrices: {len(response_dict.get('tileMatrices', []))}") # Assert basic structure assert response is not None, "Response should not be None" assert hasattr(response, "id"), "Response should have id attribute" - assert ( - response.id is not None and len(response.id) > 0 - ), f"ID should not be empty, got {response.id}" + assert response.id is not None and len(response.id) > 0, f"ID should not be empty, got {response.id}" # Note: In playback mode, ID may be "Sanitized" due to test proxy sanitization assert hasattr(response, "tile_matrices"), "Response should have tile_matrices" assert len(response.tile_matrices) > 0, "Should have at least one tile matrix" @@ -86,13 +79,9 @@ def test_01_get_tile_matrix_definitions(self, planetarycomputer_endpoint): # Validate tile matrix structure first_matrix = response.tile_matrices[0] assert hasattr(first_matrix, "id"), "Tile matrix should have id" - assert hasattr( - first_matrix, "scale_denominator" - ), "Tile matrix should have scale_denominator" + assert hasattr(first_matrix, "scale_denominator"), "Tile matrix should have scale_denominator" assert hasattr(first_matrix, "tile_width"), "Tile matrix should have tile_width" - assert hasattr( - first_matrix, "tile_height" - ), "Tile matrix should have tile_height" + assert hasattr(first_matrix, "tile_height"), "Tile matrix should have tile_height" assert first_matrix.tile_width == 256, "Standard tile width should be 256" assert first_matrix.tile_height == 256, "Standard tile height should be 256" @@ -123,9 +112,7 @@ def test_02_list_tile_matrices(self, planetarycomputer_endpoint): test_logger.info(f"Number of tile matrices: {len(response)}") # Assert response is a list - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Should have at least one tile matrix" # Check for expected tile matrix sets @@ -134,9 +121,7 @@ def test_02_list_tile_matrices(self, planetarycomputer_endpoint): # All items should be strings for item in response: - assert isinstance( - item, str - ), f"Each item should be a string, got {type(item)}" + assert isinstance(item, str), f"Each item should be a string, got {type(item)}" test_logger.info("Test PASSED\n") @@ -174,21 +159,15 @@ def test_03_list_available_assets( test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") - test_logger.info( - f"Number of assets: {len(response) if isinstance(response, list) else 'N/A'}" - ) + test_logger.info(f"Number of assets: {len(response) if isinstance(response, list) else 'N/A'}") # Assert response is a list - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Should have at least one asset" # All items should be strings for asset in response: - assert isinstance( - asset, str - ), f"Each asset should be a string, got {type(asset)}" + assert isinstance(asset, str), f"Each asset should be a string, got {type(asset)}" assert len(asset) > 0, "Asset name should not be empty" test_logger.info("Test PASSED\n") @@ -237,16 +216,12 @@ def test_04_get_bounds( # Assert bounds is a list with 4 coordinates assert isinstance(bounds, list), f"Bounds should be a list, got {type(bounds)}" - assert ( - len(bounds) == 4 - ), f"Bounds should have 4 coordinates [minx, miny, maxx, maxy], got {len(bounds)}" + assert len(bounds) == 4, f"Bounds should have 4 coordinates [minx, miny, maxx, maxy], got {len(bounds)}" # Validate coordinate structure: [minx, miny, maxx, maxy] minx, miny, maxx, maxy = bounds for coord in bounds: - assert isinstance( - coord, (int, float) - ), f"Each coordinate should be numeric, got {type(coord)}" + assert isinstance(coord, (int, float)), f"Each coordinate should be numeric, got {type(coord)}" # Validate bounds logic assert minx < maxx, f"minx ({minx}) should be less than maxx ({maxx})" @@ -301,12 +276,8 @@ def test_05_get_preview( # Verify PNG magic bytes png_magic = b"\x89PNG\r\n\x1a\n" assert len(image_bytes) > 0, "Image bytes should not be empty" - assert ( - len(image_bytes) > 100 - ), f"Image should be substantial, got only {len(image_bytes)} bytes" - assert ( - image_bytes[:8] == png_magic - ), "Response should be a valid PNG image (magic bytes mismatch)" + assert len(image_bytes) > 100, f"Image should be substantial, got only {len(image_bytes)} bytes" + assert image_bytes[:8] == png_magic, "Response should be a valid PNG image (magic bytes mismatch)" # Parse and validate the PNG image try: @@ -318,13 +289,9 @@ def test_05_get_preview( test_logger.info(f"PIL Image mode: {image.mode}") # Validate image properties - assert ( - image.format == "PNG" - ), f"Image format should be PNG, got {image.format}" + assert image.format == "PNG", f"Image format should be PNG, got {image.format}" width, height = image.size - assert ( - width > 0 and height > 0 - ), f"Image should have non-zero dimensions, got {width}x{height}" + assert width > 0 and height > 0, f"Image should have non-zero dimensions, got {width}x{height}" # Note: Actual dimensions may differ slightly from requested due to aspect ratio preservation except ImportError: @@ -468,15 +435,9 @@ def test_08_get_wmts_capabilities( # Validate XML structure assert len(xml_bytes) > 0, "XML bytes should not be empty" # Note: WMTS Capabilities XML may not have 0 - ), f"ID should not be empty, got {response.id}" + assert response.id is not None and len(response.id) > 0, f"ID should not be empty, got {response.id}" # Note: In playback mode, ID may be "Sanitized" due to test proxy sanitization assert hasattr(response, "tile_matrices"), "Response should have tile_matrices" assert len(response.tile_matrices) > 0, "Should have at least one tile matrix" @@ -88,13 +81,9 @@ async def test_01_get_tile_matrix_definitions(self, planetarycomputer_endpoint): # Validate tile matrix structure first_matrix = response.tile_matrices[0] assert hasattr(first_matrix, "id"), "Tile matrix should have id" - assert hasattr( - first_matrix, "scale_denominator" - ), "Tile matrix should have scale_denominator" + assert hasattr(first_matrix, "scale_denominator"), "Tile matrix should have scale_denominator" assert hasattr(first_matrix, "tile_width"), "Tile matrix should have tile_width" - assert hasattr( - first_matrix, "tile_height" - ), "Tile matrix should have tile_height" + assert hasattr(first_matrix, "tile_height"), "Tile matrix should have tile_height" assert first_matrix.tile_width == 256, "Standard tile width should be 256" assert first_matrix.tile_height == 256, "Standard tile height should be 256" @@ -127,9 +116,7 @@ async def test_02_list_tile_matrices(self, planetarycomputer_endpoint): test_logger.info(f"Number of tile matrices: {len(response)}") # Assert response is a list - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Should have at least one tile matrix" # Check for expected tile matrix sets @@ -138,9 +125,7 @@ async def test_02_list_tile_matrices(self, planetarycomputer_endpoint): # All items should be strings for item in response: - assert isinstance( - item, str - ), f"Each item should be a string, got {type(item)}" + assert isinstance(item, str), f"Each item should be a string, got {type(item)}" test_logger.info("Test PASSED\n") @@ -180,21 +165,15 @@ async def test_03_list_available_assets( test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") - test_logger.info( - f"Number of assets: {len(response) if isinstance(response, list) else 'N/A'}" - ) + test_logger.info(f"Number of assets: {len(response) if isinstance(response, list) else 'N/A'}") # Assert response is a list - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Should have at least one asset" # All items should be strings for asset in response: - assert isinstance( - asset, str - ), f"Each asset should be a string, got {type(asset)}" + assert isinstance(asset, str), f"Each asset should be a string, got {type(asset)}" assert len(asset) > 0, "Asset name should not be empty" test_logger.info("Test PASSED\n") @@ -245,16 +224,12 @@ async def test_04_get_bounds( # Assert bounds is a list with 4 coordinates assert isinstance(bounds, list), f"Bounds should be a list, got {type(bounds)}" - assert ( - len(bounds) == 4 - ), f"Bounds should have 4 coordinates [minx, miny, maxx, maxy], got {len(bounds)}" + assert len(bounds) == 4, f"Bounds should have 4 coordinates [minx, miny, maxx, maxy], got {len(bounds)}" # Validate coordinate structure: [minx, miny, maxx, maxy] minx, miny, maxx, maxy = bounds for coord in bounds: - assert isinstance( - coord, (int, float) - ), f"Each coordinate should be numeric, got {type(coord)}" + assert isinstance(coord, (int, float)), f"Each coordinate should be numeric, got {type(coord)}" # Validate bounds logic assert minx < maxx, f"minx ({minx}) should be less than maxx ({maxx})" @@ -311,12 +286,8 @@ async def test_05_get_preview( # Verify PNG magic bytes png_magic = b"\x89PNG\r\n\x1a\n" assert len(image_bytes) > 0, "Image bytes should not be empty" - assert ( - len(image_bytes) > 100 - ), f"Image should be substantial, got only {len(image_bytes)} bytes" - assert ( - image_bytes[:8] == png_magic - ), "Response should be a valid PNG image (magic bytes mismatch)" + assert len(image_bytes) > 100, f"Image should be substantial, got only {len(image_bytes)} bytes" + assert image_bytes[:8] == png_magic, "Response should be a valid PNG image (magic bytes mismatch)" # Parse and validate the PNG image try: @@ -328,13 +299,9 @@ async def test_05_get_preview( test_logger.info(f"PIL Image mode: {image.mode}") # Validate image properties - assert ( - image.format == "PNG" - ), f"Image format should be PNG, got {image.format}" + assert image.format == "PNG", f"Image format should be PNG, got {image.format}" width, height = image.size - assert ( - width > 0 and height > 0 - ), f"Image should have non-zero dimensions, got {width}x{height}" + assert width > 0 and height > 0, f"Image should have non-zero dimensions, got {width}x{height}" # Note: Actual dimensions may differ slightly from requested due to aspect ratio preservation except ImportError: @@ -484,15 +451,9 @@ async def test_08_get_wmts_capabilities( # Validate XML structure assert len(xml_bytes) > 0, "XML bytes should not be empty" # Note: WMTS Capabilities XML may not have 0, "Search ID should not be empty" test_logger.info(f"Search ID: {search_id}") @@ -113,9 +104,7 @@ def test_01_register_mosaics_search( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_02_get_mosaics_search_info( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_02_get_mosaics_search_info(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting mosaics search info. @@ -154,11 +143,7 @@ def test_02_get_mosaics_search_info( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) register_response = client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id @@ -182,9 +167,7 @@ def test_02_get_mosaics_search_info( assert hasattr(search, "hash"), "Search should have 'hash' attribute" search_hash = search.hash - assert isinstance( - search_hash, str - ), f"Search hash should be a string, got {type(search_hash)}" + assert isinstance(search_hash, str), f"Search hash should be a string, got {type(search_hash)}" assert len(search_hash) > 0, "Search hash should not be empty" test_logger.info(f"Search hash: {search_hash}") @@ -192,9 +175,7 @@ def test_02_get_mosaics_search_info( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_03_get_mosaics_tile_json( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_03_get_mosaics_tile_json(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting mosaics tile JSON. @@ -233,11 +214,7 @@ def test_03_get_mosaics_tile_json( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) register_response = client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id @@ -278,9 +255,7 @@ def test_03_get_mosaics_tile_json( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_04_get_mosaics_tile( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_04_get_mosaics_tile(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific mosaic tile. @@ -320,11 +295,7 @@ def test_04_get_mosaics_tile( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) register_response = client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id @@ -354,12 +325,8 @@ def test_04_get_mosaics_tile( # Verify PNG magic bytes png_magic = b"\x89PNG\r\n\x1a\n" assert len(image_bytes) > 0, "Image bytes should not be empty" - assert ( - len(image_bytes) > 100 - ), f"Image should be substantial, got only {len(image_bytes)} bytes" - assert ( - image_bytes[:8] == png_magic - ), "Response should be a valid PNG image (magic bytes mismatch)" + assert len(image_bytes) > 100, f"Image should be substantial, got only {len(image_bytes)} bytes" + assert image_bytes[:8] == png_magic, "Response should be a valid PNG image (magic bytes mismatch)" # Parse and validate the PNG image try: @@ -371,13 +338,9 @@ def test_04_get_mosaics_tile( test_logger.info(f"PIL Image mode: {image.mode}") # Validate image properties - assert ( - image.format == "PNG" - ), f"Image format should be PNG, got {image.format}" + assert image.format == "PNG", f"Image format should be PNG, got {image.format}" width, height = image.size - assert ( - width > 0 and height > 0 - ), f"Image should have non-zero dimensions, got {width}x{height}" + assert width > 0 and height > 0, f"Image should have non-zero dimensions, got {width}x{height}" except ImportError: test_logger.warning("PIL not available, skipping detailed image validation") @@ -386,9 +349,7 @@ def test_04_get_mosaics_tile( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_05_get_mosaics_wmts_capabilities( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_05_get_mosaics_wmts_capabilities(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting WMTS capabilities XML for mosaics. @@ -427,11 +388,7 @@ def test_05_get_mosaics_wmts_capabilities( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) register_response = client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id @@ -462,23 +419,15 @@ def test_05_get_mosaics_wmts_capabilities( # Validate XML structure assert len(xml_bytes) > 0, "XML bytes should not be empty" # Note: WMTS Capabilities XML may not have 0: @@ -562,20 +501,12 @@ def test_06_get_mosaics_assets_for_point( assert first_asset is not None, "First asset should not be None" # StacAsset behaves like a dict - access via key - asset_dict = ( - first_asset.as_dict() - if hasattr(first_asset, "as_dict") - else first_asset - ) - assert ( - "id" in asset_dict - ), f"Asset should have 'id' key, got keys: {list(asset_dict.keys())}" + asset_dict = first_asset.as_dict() if hasattr(first_asset, "as_dict") else first_asset + assert "id" in asset_dict, f"Asset should have 'id' key, got keys: {list(asset_dict.keys())}" asset_id = asset_dict["id"] test_logger.info(f"First asset ID: {asset_id}") - assert isinstance( - asset_id, str - ), f"Asset ID should be a string, got {type(asset_id)}" + assert isinstance(asset_id, str), f"Asset ID should be a string, got {type(asset_id)}" assert len(asset_id) > 0, "Asset ID should not be empty" else: test_logger.info("No assets returned for this point") @@ -584,9 +515,7 @@ def test_06_get_mosaics_assets_for_point( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_07_get_mosaics_assets_for_tile( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_07_get_mosaics_assets_for_tile(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting mosaic assets for a specific tile. @@ -626,11 +555,7 @@ def test_07_get_mosaics_assets_for_tile( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) register_response = client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id @@ -660,9 +585,7 @@ def test_07_get_mosaics_assets_for_tile( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_08_create_static_image( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_08_create_static_image(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a static image from a mosaic search. @@ -735,9 +658,7 @@ def test_08_create_static_image( ) test_logger.info("Calling: create_static_image(...)") - response = client.data.create_static_image( - collection_id=planetarycomputer_collection_id, body=image_request - ) + response = client.data.create_static_image(collection_id=planetarycomputer_collection_id, body=image_request) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") @@ -750,9 +671,7 @@ def test_08_create_static_image( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_09_get_static_image( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_09_get_static_image(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test retrieving a static image by ID. @@ -837,9 +756,7 @@ def test_09_get_static_image( test_logger.info( f"Calling: get_static_image(collection_id='{planetarycomputer_collection_id}', id='{image_id}')" ) - image_data = client.data.get_static_image( - collection_id=planetarycomputer_collection_id, id=image_id - ) + image_data = client.data.get_static_image(collection_id=planetarycomputer_collection_id, id=image_id) test_logger.info(f"Image data type: {type(image_data)}") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_05_mosaics_tiler_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_05_mosaics_tiler_async.py index d508d397071f..258d15f0b07f 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_05_mosaics_tiler_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_05_mosaics_tiler_async.py @@ -6,6 +6,7 @@ """ Unit tests for Mosaics Tiler operations. """ + import io import logging from pathlib import Path @@ -43,9 +44,7 @@ class TestPlanetaryComputerMosaicsTilerAsync(PlanetaryComputerProClientTestBaseA @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_01_register_mosaics_search( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_01_register_mosaics_search(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test registering a mosaics search. @@ -84,11 +83,7 @@ async def test_01_register_mosaics_search( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) test_logger.info(f"Search request: {register_search_request}") @@ -100,14 +95,10 @@ async def test_01_register_mosaics_search( # Validate response structure assert response is not None, "Response should not be None" - assert hasattr( - response, "search_id" - ), "Response should have 'search_id' attribute" + assert hasattr(response, "search_id"), "Response should have 'search_id' attribute" search_id = response.search_id - assert isinstance( - search_id, str - ), f"Search ID should be a string, got {type(search_id)}" + assert isinstance(search_id, str), f"Search ID should be a string, got {type(search_id)}" assert len(search_id) > 0, "Search ID should not be empty" test_logger.info(f"Search ID: {search_id}") @@ -117,9 +108,7 @@ async def test_01_register_mosaics_search( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_02_get_mosaics_search_info( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_02_get_mosaics_search_info(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting mosaics search info. @@ -158,15 +147,9 @@ async def test_02_get_mosaics_search_info( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_response = await client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_response = await client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id test_logger.info(f"Registered search ID: {search_id}") @@ -188,9 +171,7 @@ async def test_02_get_mosaics_search_info( assert hasattr(search, "hash"), "Search should have 'hash' attribute" search_hash = search.hash - assert isinstance( - search_hash, str - ), f"Search hash should be a string, got {type(search_hash)}" + assert isinstance(search_hash, str), f"Search hash should be a string, got {type(search_hash)}" assert len(search_hash) > 0, "Search hash should not be empty" test_logger.info(f"Search hash: {search_hash}") @@ -200,9 +181,7 @@ async def test_02_get_mosaics_search_info( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_03_get_mosaics_tile_json( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_03_get_mosaics_tile_json(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting mosaics tile JSON. @@ -241,15 +220,9 @@ async def test_03_get_mosaics_tile_json( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_response = await client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_response = await client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id test_logger.info(f"Using search ID: {search_id}") @@ -290,9 +263,7 @@ async def test_03_get_mosaics_tile_json( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_04_get_mosaics_tile( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_04_get_mosaics_tile(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting a specific mosaic tile. @@ -332,15 +303,9 @@ async def test_04_get_mosaics_tile( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_response = await client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_response = await client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id test_logger.info(f"Using search ID: {search_id}") @@ -368,12 +333,8 @@ async def test_04_get_mosaics_tile( # Verify PNG magic bytes png_magic = b"\x89PNG\r\n\x1a\n" assert len(image_bytes) > 0, "Image bytes should not be empty" - assert ( - len(image_bytes) > 100 - ), f"Image should be substantial, got only {len(image_bytes)} bytes" - assert ( - image_bytes[:8] == png_magic - ), "Response should be a valid PNG image (magic bytes mismatch)" + assert len(image_bytes) > 100, f"Image should be substantial, got only {len(image_bytes)} bytes" + assert image_bytes[:8] == png_magic, "Response should be a valid PNG image (magic bytes mismatch)" # Parse and validate the PNG image try: @@ -385,13 +346,9 @@ async def test_04_get_mosaics_tile( test_logger.info(f"PIL Image mode: {image.mode}") # Validate image properties - assert ( - image.format == "PNG" - ), f"Image format should be PNG, got {image.format}" + assert image.format == "PNG", f"Image format should be PNG, got {image.format}" width, height = image.size - assert ( - width > 0 and height > 0 - ), f"Image should have non-zero dimensions, got {width}x{height}" + assert width > 0 and height > 0, f"Image should have non-zero dimensions, got {width}x{height}" except ImportError: test_logger.warning("PIL not available, skipping detailed image validation") @@ -402,9 +359,7 @@ async def test_04_get_mosaics_tile( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_05_get_mosaics_wmts_capabilities( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_05_get_mosaics_wmts_capabilities(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting WMTS capabilities XML for mosaics. @@ -443,15 +398,9 @@ async def test_05_get_mosaics_wmts_capabilities( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_response = await client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_response = await client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id test_logger.info(f"Using search ID: {search_id}") @@ -480,15 +429,9 @@ async def test_05_get_mosaics_wmts_capabilities( # Validate XML structure assert len(xml_bytes) > 0, "XML bytes should not be empty" # Note: WMTS Capabilities XML may not have 0: @@ -584,20 +513,12 @@ async def test_06_get_mosaics_assets_for_point( assert first_asset is not None, "First asset should not be None" # StacAsset behaves like a dict - access via key - asset_dict = ( - first_asset.as_dict() - if hasattr(first_asset, "as_dict") - else first_asset - ) - assert ( - "id" in asset_dict - ), f"Asset should have 'id' key, got keys: {list(asset_dict.keys())}" + asset_dict = first_asset.as_dict() if hasattr(first_asset, "as_dict") else first_asset + assert "id" in asset_dict, f"Asset should have 'id' key, got keys: {list(asset_dict.keys())}" asset_id = asset_dict["id"] test_logger.info(f"First asset ID: {asset_id}") - assert isinstance( - asset_id, str - ), f"Asset ID should be a string, got {type(asset_id)}" + assert isinstance(asset_id, str), f"Asset ID should be a string, got {type(asset_id)}" assert len(asset_id) > 0, "Asset ID should not be empty" else: test_logger.info("No assets returned for this point") @@ -608,9 +529,7 @@ async def test_06_get_mosaics_assets_for_point( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_07_get_mosaics_assets_for_tile( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_07_get_mosaics_assets_for_tile(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test getting mosaic assets for a specific tile. @@ -650,15 +569,9 @@ async def test_07_get_mosaics_assets_for_tile( ], }, filter_lang=FilterLanguage.CQL2_JSON, - sort_by=[ - StacSortExtension( - direction=StacSearchSortingDirection.DESC, field="datetime" - ) - ], - ) - register_response = await client.data.register_mosaics_search( - register_search_request + sort_by=[StacSortExtension(direction=StacSearchSortingDirection.DESC, field="datetime")], ) + register_response = await client.data.register_mosaics_search(register_search_request) search_id = register_response.search_id test_logger.info(f"Using search ID: {search_id}") @@ -688,9 +601,7 @@ async def test_07_get_mosaics_assets_for_tile( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_08_create_static_image( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_08_create_static_image(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a static image from a mosaic search. @@ -780,9 +691,7 @@ async def test_08_create_static_image( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_09_get_static_image( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_09_get_static_image(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test retrieving a static image by ID. @@ -867,9 +776,7 @@ async def test_09_get_static_image( test_logger.info( f"Calling: get_static_image(collection_id='{planetarycomputer_collection_id}', id='{image_id}')" ) - image_data = await client.data.get_static_image( - collection_id=planetarycomputer_collection_id, id=image_id - ) + image_data = await client.data.get_static_image(collection_id=planetarycomputer_collection_id, id=image_id) test_logger.info(f"Image data type: {type(image_data)}") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends.py index f658b36aafac..99417a0dd178 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends.py @@ -6,6 +6,7 @@ """ Unit tests for Map Legend operations. """ + from collections.abc import MutableMapping import io import logging @@ -53,9 +54,7 @@ def test_01_get_class_map_legend(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})" - ) + test_logger.info(f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})") response = client.data.get_class_map_legend( classmap_name=ColorMapNames.MTBS_SEVERITY, ) @@ -70,26 +69,18 @@ def test_01_get_class_map_legend(self, planetarycomputer_endpoint): # Assert MTBS Severity classes are present (0-6) expected_classes = ["0", "1", "2", "3", "4", "5", "6"] for class_value in expected_classes: - assert ( - class_value in response - ), f"Class '{class_value}' should be in response" + assert class_value in response, f"Class '{class_value}' should be in response" # Validate color structure for each class for class_value, color in response.items(): # Each color should be a list/array of 4 RGBA values - assert isinstance( - color, (list, tuple) - ), f"Color for class '{class_value}' should be a list/tuple" - assert ( - len(color) == 4 - ), f"Color for class '{class_value}' should have 4 RGBA values, got {len(color)}" + assert isinstance(color, (list, tuple)), f"Color for class '{class_value}' should be a list/tuple" + assert len(color) == 4, f"Color for class '{class_value}' should have 4 RGBA values, got {len(color)}" # Each RGBA component should be an integer 0-255 for i, component in enumerate(color): component_name = ["R", "G", "B", "A"][i] - assert isinstance( - component, int - ), f"{component_name} for class '{class_value}' should be int" + assert isinstance(component, int), f"{component_name} for class '{class_value}' should be int" assert ( 0 <= component <= 255 ), f"{component_name} for class '{class_value}' should be 0-255, got {component}" @@ -99,9 +90,7 @@ def test_01_get_class_map_legend(self, planetarycomputer_endpoint): assert response["0"] == [0, 0, 0, 0], "Class 0 should be transparent black" # Class 4: Red (high severity) - assert ( - response["4"][0] == 255 - ), "Class 4 (high severity) should have high red component" + assert response["4"][0] == 255, "Class 4 (high severity) should have high red component" test_logger.info("Test PASSED\n") @@ -124,46 +113,30 @@ def test_02_get_interval_legend(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_interval_legend(classmap_name={ColorMapNames.MODIS64_A1})" - ) - response = client.data.get_interval_legend( - classmap_name=ColorMapNames.MODIS64_A1 - ) + test_logger.info(f"Calling: get_interval_legend(classmap_name={ColorMapNames.MODIS64_A1})") + response = client.data.get_interval_legend(classmap_name=ColorMapNames.MODIS64_A1) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") # Assert response is a list - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Response should not be empty" # Validate each interval structure for idx, interval in enumerate(response): # Each interval should be a list with 2 elements: [range, color] assert isinstance(interval, list), f"Interval {idx} should be a list" - assert ( - len(interval) == 2 - ), f"Interval {idx} should have 2 elements: [[min, max], [R, G, B, A]]" + assert len(interval) == 2, f"Interval {idx} should have 2 elements: [[min, max], [R, G, B, A]]" # Validate range component value_range = interval[0] - assert isinstance( - value_range, list - ), f"Interval {idx} range should be a list" + assert isinstance(value_range, list), f"Interval {idx} range should be a list" assert len(value_range) == 2, f"Interval {idx} range should have [min, max]" min_val, max_val = value_range - assert isinstance( - min_val, (int, float) - ), f"Interval {idx} min should be numeric" - assert isinstance( - max_val, (int, float) - ), f"Interval {idx} max should be numeric" - assert ( - min_val <= max_val - ), f"Interval {idx} min ({min_val}) should be <= max ({max_val})" + assert isinstance(min_val, (int, float)), f"Interval {idx} min should be numeric" + assert isinstance(max_val, (int, float)), f"Interval {idx} max should be numeric" + assert min_val <= max_val, f"Interval {idx} min ({min_val}) should be <= max ({max_val})" # Validate color component color = interval[1] @@ -171,12 +144,8 @@ def test_02_get_interval_legend(self, planetarycomputer_endpoint): assert len(color) == 4, f"Interval {idx} color should have 4 RGBA values" for i, component in enumerate(color): component_name = ["R", "G", "B", "A"][i] - assert isinstance( - component, int - ), f"Interval {idx} {component_name} should be int" - assert ( - 0 <= component <= 255 - ), f"Interval {idx} {component_name} should be 0-255" + assert isinstance(component, int), f"Interval {idx} {component_name} should be int" + assert 0 <= component <= 255, f"Interval {idx} {component_name} should be 0-255" # Validate intervals are sequential (each max should connect to next min) for i in range(len(response) - 1): @@ -223,18 +192,12 @@ def test_03_get_legend_as_png(self, planetarycomputer_endpoint): # Verify PNG magic bytes (89 50 4E 47 0D 0A 1A 0A) png_magic = b"\x89PNG\r\n\x1a\n" test_logger.info(f"PNG magic bytes: {png_magic.hex()}") - test_logger.info( - f"Response starts with PNG magic: {legend_bytes[:8] == png_magic}" - ) + test_logger.info(f"Response starts with PNG magic: {legend_bytes[:8] == png_magic}") # Assert response is valid PNG assert len(legend_bytes) > 0, "Legend bytes should not be empty" - assert ( - len(legend_bytes) > 100 - ), f"Legend should be substantial image, got only {len(legend_bytes)} bytes" - assert ( - legend_bytes[:8] == png_magic - ), "Response should be a valid PNG image (magic bytes mismatch)" + assert len(legend_bytes) > 100, f"Legend should be substantial image, got only {len(legend_bytes)} bytes" + assert legend_bytes[:8] == png_magic, "Response should be a valid PNG image (magic bytes mismatch)" # Parse and validate the PNG image try: @@ -250,19 +213,13 @@ def test_03_get_legend_as_png(self, planetarycomputer_endpoint): # Image dimensions should be non-zero width, height = legend_image.size - assert ( - width > 0 and height > 0 - ), f"Image should have non-zero dimensions, got {width}x{height}" + assert width > 0 and height > 0, f"Image should have non-zero dimensions, got {width}x{height}" # Typical legend is horizontal (width >> height) - assert ( - width > height - ), f"Legend should be horizontal (width > height), got {width}x{height}" + assert width > height, f"Legend should be horizontal (width > height), got {width}x{height}" # Color mode should be RGBA (with alpha channel) - assert ( - legend_image.mode == "RGBA" - ), f"Image mode should be RGBA, got {legend_image.mode}" + assert legend_image.mode == "RGBA", f"Image mode should be RGBA, got {legend_image.mode}" except ImportError: test_logger.warning("PIL not available, skipping image parsing") @@ -297,9 +254,7 @@ def test_04_get_legend_with_different_colormap(self, planetarycomputer_endpoint) # Verify PNG magic bytes png_magic = b"\x89PNG\r\n\x1a\n" assert len(legend_bytes) > 0, "Legend bytes should not be empty" - assert ( - len(legend_bytes) > 100 - ), f"Legend should be substantial image, got only {len(legend_bytes)} bytes" + assert len(legend_bytes) > 100, f"Legend should be substantial image, got only {len(legend_bytes)} bytes" assert legend_bytes[:8] == png_magic, "Response should be a valid PNG image" # Parse and validate the PNG image @@ -338,9 +293,7 @@ def test_05_class_map_legend_structure(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})" - ) + test_logger.info(f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})") response = client.data.get_class_map_legend( classmap_name=ColorMapNames.MTBS_SEVERITY, ) @@ -364,16 +317,10 @@ def test_05_class_map_legend_structure(self, planetarycomputer_endpoint): ), "All color components should be integers 0-255" # Validate that different classes have different colors (except transparent) - non_transparent_colors = [ - tuple(c) for c in all_colors if c[3] != 0 - ] # Exclude transparent + non_transparent_colors = [tuple(c) for c in all_colors if c[3] != 0] # Exclude transparent # Convert to set to check uniqueness unique_colors = set(non_transparent_colors) - assert ( - len(unique_colors) > 1 - ), "Non-transparent classes should have different colors" + assert len(unique_colors) > 1, "Non-transparent classes should have different colors" - test_logger.info( - f"Found {len(response)} classes with {len(unique_colors)} unique non-transparent colors" - ) + test_logger.info(f"Found {len(response)} classes with {len(unique_colors)} unique non-transparent colors") test_logger.info("Test PASSED\n") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends_async.py index 4a6738ba7256..2adf9344670f 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_06_map_legends_async.py @@ -6,6 +6,7 @@ """ Unit tests for Map Legend operations. """ + from collections.abc import MutableMapping import io import logging @@ -55,9 +56,7 @@ async def test_01_get_class_map_legend(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})" - ) + test_logger.info(f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})") response = await client.data.get_class_map_legend( classmap_name=ColorMapNames.MTBS_SEVERITY, ) @@ -72,26 +71,18 @@ async def test_01_get_class_map_legend(self, planetarycomputer_endpoint): # Assert MTBS Severity classes are present (0-6) expected_classes = ["0", "1", "2", "3", "4", "5", "6"] for class_value in expected_classes: - assert ( - class_value in response - ), f"Class '{class_value}' should be in response" + assert class_value in response, f"Class '{class_value}' should be in response" # Validate color structure for each class for class_value, color in response.items(): # Each color should be a list/array of 4 RGBA values - assert isinstance( - color, (list, tuple) - ), f"Color for class '{class_value}' should be a list/tuple" - assert ( - len(color) == 4 - ), f"Color for class '{class_value}' should have 4 RGBA values, got {len(color)}" + assert isinstance(color, (list, tuple)), f"Color for class '{class_value}' should be a list/tuple" + assert len(color) == 4, f"Color for class '{class_value}' should have 4 RGBA values, got {len(color)}" # Each RGBA component should be an integer 0-255 for i, component in enumerate(color): component_name = ["R", "G", "B", "A"][i] - assert isinstance( - component, int - ), f"{component_name} for class '{class_value}' should be int" + assert isinstance(component, int), f"{component_name} for class '{class_value}' should be int" assert ( 0 <= component <= 255 ), f"{component_name} for class '{class_value}' should be 0-255, got {component}" @@ -101,9 +92,7 @@ async def test_01_get_class_map_legend(self, planetarycomputer_endpoint): assert response["0"] == [0, 0, 0, 0], "Class 0 should be transparent black" # Class 4: Red (high severity) - assert ( - response["4"][0] == 255 - ), "Class 4 (high severity) should have high red component" + assert response["4"][0] == 255, "Class 4 (high severity) should have high red component" test_logger.info("Test PASSED\n") @@ -128,46 +117,30 @@ async def test_02_get_interval_legend(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_interval_legend(classmap_name={ColorMapNames.MODIS64_A1})" - ) - response = await client.data.get_interval_legend( - classmap_name=ColorMapNames.MODIS64_A1 - ) + test_logger.info(f"Calling: get_interval_legend(classmap_name={ColorMapNames.MODIS64_A1})") + response = await client.data.get_interval_legend(classmap_name=ColorMapNames.MODIS64_A1) test_logger.info(f"Response type: {type(response)}") test_logger.info(f"Response: {response}") # Assert response is a list - assert isinstance( - response, list - ), f"Response should be a list, got {type(response)}" + assert isinstance(response, list), f"Response should be a list, got {type(response)}" assert len(response) > 0, "Response should not be empty" # Validate each interval structure for idx, interval in enumerate(response): # Each interval should be a list with 2 elements: [range, color] assert isinstance(interval, list), f"Interval {idx} should be a list" - assert ( - len(interval) == 2 - ), f"Interval {idx} should have 2 elements: [[min, max], [R, G, B, A]]" + assert len(interval) == 2, f"Interval {idx} should have 2 elements: [[min, max], [R, G, B, A]]" # Validate range component value_range = interval[0] - assert isinstance( - value_range, list - ), f"Interval {idx} range should be a list" + assert isinstance(value_range, list), f"Interval {idx} range should be a list" assert len(value_range) == 2, f"Interval {idx} range should have [min, max]" min_val, max_val = value_range - assert isinstance( - min_val, (int, float) - ), f"Interval {idx} min should be numeric" - assert isinstance( - max_val, (int, float) - ), f"Interval {idx} max should be numeric" - assert ( - min_val <= max_val - ), f"Interval {idx} min ({min_val}) should be <= max ({max_val})" + assert isinstance(min_val, (int, float)), f"Interval {idx} min should be numeric" + assert isinstance(max_val, (int, float)), f"Interval {idx} max should be numeric" + assert min_val <= max_val, f"Interval {idx} min ({min_val}) should be <= max ({max_val})" # Validate color component color = interval[1] @@ -175,12 +148,8 @@ async def test_02_get_interval_legend(self, planetarycomputer_endpoint): assert len(color) == 4, f"Interval {idx} color should have 4 RGBA values" for i, component in enumerate(color): component_name = ["R", "G", "B", "A"][i] - assert isinstance( - component, int - ), f"Interval {idx} {component_name} should be int" - assert ( - 0 <= component <= 255 - ), f"Interval {idx} {component_name} should be 0-255" + assert isinstance(component, int), f"Interval {idx} {component_name} should be int" + assert 0 <= component <= 255, f"Interval {idx} {component_name} should be 0-255" # Validate intervals are sequential (each max should connect to next min) for i in range(len(response) - 1): @@ -229,18 +198,12 @@ async def test_03_get_legend_as_png(self, planetarycomputer_endpoint): # Verify PNG magic bytes (89 50 4E 47 0D 0A 1A 0A) png_magic = b"\x89PNG\r\n\x1a\n" test_logger.info(f"PNG magic bytes: {png_magic.hex()}") - test_logger.info( - f"Response starts with PNG magic: {legend_bytes[:8] == png_magic}" - ) + test_logger.info(f"Response starts with PNG magic: {legend_bytes[:8] == png_magic}") # Assert response is valid PNG assert len(legend_bytes) > 0, "Legend bytes should not be empty" - assert ( - len(legend_bytes) > 100 - ), f"Legend should be substantial image, got only {len(legend_bytes)} bytes" - assert ( - legend_bytes[:8] == png_magic - ), "Response should be a valid PNG image (magic bytes mismatch)" + assert len(legend_bytes) > 100, f"Legend should be substantial image, got only {len(legend_bytes)} bytes" + assert legend_bytes[:8] == png_magic, "Response should be a valid PNG image (magic bytes mismatch)" # Parse and validate the PNG image try: @@ -256,19 +219,13 @@ async def test_03_get_legend_as_png(self, planetarycomputer_endpoint): # Image dimensions should be non-zero width, height = legend_image.size - assert ( - width > 0 and height > 0 - ), f"Image should have non-zero dimensions, got {width}x{height}" + assert width > 0 and height > 0, f"Image should have non-zero dimensions, got {width}x{height}" # Typical legend is horizontal (width >> height) - assert ( - width > height - ), f"Legend should be horizontal (width > height), got {width}x{height}" + assert width > height, f"Legend should be horizontal (width > height), got {width}x{height}" # Color mode should be RGBA (with alpha channel) - assert ( - legend_image.mode == "RGBA" - ), f"Image mode should be RGBA, got {legend_image.mode}" + assert legend_image.mode == "RGBA", f"Image mode should be RGBA, got {legend_image.mode}" except ImportError: test_logger.warning("PIL not available, skipping image parsing") @@ -279,9 +236,7 @@ async def test_03_get_legend_as_png(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_04_get_legend_with_different_colormap( - self, planetarycomputer_endpoint - ): + async def test_04_get_legend_with_different_colormap(self, planetarycomputer_endpoint): """ Test getting a legend with a different color map (viridis). @@ -307,9 +262,7 @@ async def test_04_get_legend_with_different_colormap( # Verify PNG magic bytes png_magic = b"\x89PNG\r\n\x1a\n" assert len(legend_bytes) > 0, "Legend bytes should not be empty" - assert ( - len(legend_bytes) > 100 - ), f"Legend should be substantial image, got only {len(legend_bytes)} bytes" + assert len(legend_bytes) > 100, f"Legend should be substantial image, got only {len(legend_bytes)} bytes" assert legend_bytes[:8] == png_magic, "Response should be a valid PNG image" # Parse and validate the PNG image @@ -350,9 +303,7 @@ async def test_05_class_map_legend_structure(self, planetarycomputer_endpoint): client = self.create_client(endpoint=planetarycomputer_endpoint) - test_logger.info( - f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})" - ) + test_logger.info(f"Calling: get_class_map_legend(classmap_name={ColorMapNames.MTBS_SEVERITY})") response = await client.data.get_class_map_legend( classmap_name=ColorMapNames.MTBS_SEVERITY, ) @@ -376,18 +327,12 @@ async def test_05_class_map_legend_structure(self, planetarycomputer_endpoint): ), "All color components should be integers 0-255" # Validate that different classes have different colors (except transparent) - non_transparent_colors = [ - tuple(c) for c in all_colors if c[3] != 0 - ] # Exclude transparent + non_transparent_colors = [tuple(c) for c in all_colors if c[3] != 0] # Exclude transparent # Convert to set to check uniqueness unique_colors = set(non_transparent_colors) - assert ( - len(unique_colors) > 1 - ), "Non-transparent classes should have different colors" + assert len(unique_colors) > 1, "Non-transparent classes should have different colors" - test_logger.info( - f"Found {len(response)} classes with {len(unique_colors)} unique non-transparent colors" - ) + test_logger.info(f"Found {len(response)} classes with {len(unique_colors)} unique non-transparent colors") test_logger.info("Test PASSED\n") await self.close_client() diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle.py index c1d9d80d48a9..faa1f936007d 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle.py @@ -8,6 +8,7 @@ Unit tests for STAC Collection lifecycle operations (create, update, delete). Note: These tests are marked with pytest.mark.live_test_only as they modify collections. """ + import logging import time import pytest @@ -56,28 +57,18 @@ def test_01_begin_create_collection(self, planetarycomputer_endpoint): # Check if collection exists and delete it first try: - existing_collection = client.stac.get_collection( - collection_id=test_collection_id - ) + existing_collection = client.stac.get_collection(collection_id=test_collection_id) if existing_collection: - test_logger.info( - f"Collection '{test_collection_id}' already exists, deleting first..." - ) - delete_poller = client.stac.begin_delete_collection( - collection_id=test_collection_id, polling=True - ) + test_logger.info(f"Collection '{test_collection_id}' already exists, deleting first...") + delete_poller = client.stac.begin_delete_collection(collection_id=test_collection_id, polling=True) delete_poller.result() test_logger.info(f"Deleted existing collection '{test_collection_id}'") except Exception: - test_logger.info( - f"Collection '{test_collection_id}' does not exist, proceeding with creation" - ) + test_logger.info(f"Collection '{test_collection_id}' does not exist, proceeding with creation") # Define collection extents spatial_extent = StacExtensionSpatialExtent(bounding_box=[[-180, -90, 180, 90]]) - temporal_extent = StacCollectionTemporalExtent( - interval=[["2020-01-01T00:00:00Z", "2024-12-31T23:59:59Z"]] - ) + temporal_extent = StacCollectionTemporalExtent(interval=[["2020-01-01T00:00:00Z", "2024-12-31T23:59:59Z"]]) extent = StacExtensionExtent(spatial=spatial_extent, temporal=temporal_extent) # Create collection payload @@ -93,15 +84,11 @@ def test_01_begin_create_collection(self, planetarycomputer_endpoint): } test_logger.info("Calling: begin_create_collection(body=collection_data)") - create_poller = client.stac.begin_create_collection( - body=collection_data, polling=True - ) + create_poller = client.stac.begin_create_collection(body=collection_data, polling=True) result = create_poller.result() test_logger.info(f"Collection created: {result}") - created_collection = client.stac.get_collection( - collection_id=test_collection_id - ) + created_collection = client.stac.get_collection(collection_id=test_collection_id) assert created_collection is not None assert created_collection.id == test_collection_id assert created_collection.title == "Test Collection Lifecycle" @@ -131,18 +118,11 @@ def test_02_create_or_replace_collection(self, planetarycomputer_endpoint): test_logger.info( f"Calling: create_or_replace_collection(collection_id='{test_collection_id}', body=collection)" ) - updated_collection = client.stac.create_or_replace_collection( - collection_id=test_collection_id, body=collection - ) + updated_collection = client.stac.create_or_replace_collection(collection_id=test_collection_id, body=collection) test_logger.info(f"Collection updated: {updated_collection}") - updated_collection = client.stac.get_collection( - collection_id=test_collection_id - ) - assert ( - updated_collection.description - == "Test collection for lifecycle operations - UPDATED" - ) + updated_collection = client.stac.get_collection(collection_id=test_collection_id) + assert updated_collection.description == "Test collection for lifecycle operations - UPDATED" test_logger.info("Test PASSED\n") @@ -160,12 +140,8 @@ def test_03_begin_delete_collection(self, planetarycomputer_endpoint): test_collection_id = "test-collection-lifecycle" - test_logger.info( - f"Calling: begin_delete_collection(collection_id='{test_collection_id}')" - ) - delete_poller = client.stac.begin_delete_collection( - collection_id=test_collection_id, polling=True - ) + test_logger.info(f"Calling: begin_delete_collection(collection_id='{test_collection_id}')") + delete_poller = client.stac.begin_delete_collection(collection_id=test_collection_id, polling=True) result = delete_poller.result() test_logger.info(f"Delete operation completed: {result}") @@ -175,17 +151,13 @@ def test_03_begin_delete_collection(self, planetarycomputer_endpoint): assert False, "Collection should have been deleted" except Exception as e: test_logger.info(f"Collection successfully deleted (404 expected): {e}") - assert ( - "404" in str(e) or "Not Found" in str(e) or "ResourceNotFound" in str(e) - ) + assert "404" in str(e) or "Not Found" in str(e) or "ResourceNotFound" in str(e) test_logger.info("Test PASSED\n") @PlanetaryComputerPreparer() @recorded_by_proxy - def test_04_create_collection_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_04_create_collection_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a collection asset. Note: This test uses the existing test collection. @@ -201,22 +173,12 @@ def test_04_create_collection_asset( # Delete the asset if it already exists try: - test_logger.info( - "Checking if asset 'test-asset' already exists and deleting if found..." - ) - client.stac.delete_collection_asset( - collection_id=planetarycomputer_collection_id, asset_id="test-asset" - ) + test_logger.info("Checking if asset 'test-asset' already exists and deleting if found...") + client.stac.delete_collection_asset(collection_id=planetarycomputer_collection_id, asset_id="test-asset") test_logger.info("Deleted existing 'test-asset'") except Exception as e: - if ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ): - test_logger.info( - "Asset 'test-asset' does not exist, proceeding with creation" - ) + if "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower(): + test_logger.info("Asset 'test-asset' does not exist, proceeding with creation") else: test_logger.warning(f"Error checking/deleting asset: {e}") @@ -246,9 +208,7 @@ def test_04_create_collection_asset( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_05_replace_collection_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_05_replace_collection_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a collection asset. """ @@ -287,9 +247,7 @@ def test_05_replace_collection_asset( @PlanetaryComputerPreparer() @recorded_by_proxy - def test_06_delete_collection_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + def test_06_delete_collection_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a collection asset. First creates an asset specifically for deletion. @@ -336,12 +294,8 @@ def test_06_delete_collection_asset( test_logger.info("Asset deleted successfully") # Verify deletion by checking collection assets - collection = client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = client.stac.get_collection(collection_id=planetarycomputer_collection_id) if hasattr(collection, "assets") and collection.assets: - assert ( - "test-asset-to-be-deleted" not in collection.assets - ), "Asset should have been deleted" + assert "test-asset-to-be-deleted" not in collection.assets, "Asset should have been deleted" test_logger.info("Test PASSED\n") diff --git a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle_async.py b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle_async.py index 428f562e07d2..966ee39b2654 100644 --- a/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle_async.py +++ b/sdk/planetarycomputer/azure-planetarycomputer/tests/test_planetary_computer_07_collection_lifecycle_async.py @@ -8,6 +8,7 @@ Unit tests for STAC Collection lifecycle operations (create, update, delete). Note: These tests are marked with pytest.mark.live_test_only as they modify collections. """ + import logging import time import pytest @@ -39,9 +40,7 @@ test_logger.addHandler(file_handler) -class TestPlanetaryComputerCollectionLifecycleAsync( - PlanetaryComputerProClientTestBaseAsync -): +class TestPlanetaryComputerCollectionLifecycleAsync(PlanetaryComputerProClientTestBaseAsync): """Test suite for STAC Collection lifecycle operations.""" @PlanetaryComputerPreparer() @@ -60,28 +59,20 @@ async def test_01_begin_create_collection(self, planetarycomputer_endpoint): # Check if collection exists and delete it first try: - existing_collection = await client.stac.get_collection( - collection_id=test_collection_id - ) + existing_collection = await client.stac.get_collection(collection_id=test_collection_id) if existing_collection: - test_logger.info( - f"Collection '{test_collection_id}' already exists, deleting first..." - ) + test_logger.info(f"Collection '{test_collection_id}' already exists, deleting first...") delete_poller = await client.stac.begin_delete_collection( collection_id=test_collection_id, polling=True ) await delete_poller.result() test_logger.info(f"Deleted existing collection '{test_collection_id}'") except Exception: - test_logger.info( - f"Collection '{test_collection_id}' does not exist, proceeding with creation" - ) + test_logger.info(f"Collection '{test_collection_id}' does not exist, proceeding with creation") # Define collection extents spatial_extent = StacExtensionSpatialExtent(bounding_box=[[-180, -90, 180, 90]]) - temporal_extent = StacCollectionTemporalExtent( - interval=[["2020-01-01T00:00:00Z", "2024-12-31T23:59:59Z"]] - ) + temporal_extent = StacCollectionTemporalExtent(interval=[["2020-01-01T00:00:00Z", "2024-12-31T23:59:59Z"]]) extent = StacExtensionExtent(spatial=spatial_extent, temporal=temporal_extent) # Create collection payload @@ -97,15 +88,11 @@ async def test_01_begin_create_collection(self, planetarycomputer_endpoint): } test_logger.info("Calling: begin_create_collection(body=collection_data)") - create_poller = await client.stac.begin_create_collection( - body=collection_data, polling=True - ) + create_poller = await client.stac.begin_create_collection(body=collection_data, polling=True) result = await create_poller.result() test_logger.info(f"Collection created: {result}") - created_collection = await client.stac.get_collection( - collection_id=test_collection_id - ) + created_collection = await client.stac.get_collection(collection_id=test_collection_id) assert created_collection is not None assert created_collection.id == test_collection_id assert created_collection.title == "Test Collection Lifecycle" @@ -142,13 +129,8 @@ async def test_02_create_or_replace_collection(self, planetarycomputer_endpoint) ) test_logger.info(f"Collection updated: {updated_collection}") - updated_collection = await client.stac.get_collection( - collection_id=test_collection_id - ) - assert ( - updated_collection.description - == "Test collection for lifecycle operations - UPDATED" - ) + updated_collection = await client.stac.get_collection(collection_id=test_collection_id) + assert updated_collection.description == "Test collection for lifecycle operations - UPDATED" test_logger.info("Test PASSED\n") @@ -168,12 +150,8 @@ async def test_03_begin_delete_collection(self, planetarycomputer_endpoint): test_collection_id = "test-collection-lifecycle" - test_logger.info( - f"Calling: begin_delete_collection(collection_id='{test_collection_id}')" - ) - delete_poller = await client.stac.begin_delete_collection( - collection_id=test_collection_id, polling=True - ) + test_logger.info(f"Calling: begin_delete_collection(collection_id='{test_collection_id}')") + delete_poller = await client.stac.begin_delete_collection(collection_id=test_collection_id, polling=True) result = await delete_poller.result() test_logger.info(f"Delete operation completed: {result}") @@ -183,9 +161,7 @@ async def test_03_begin_delete_collection(self, planetarycomputer_endpoint): assert False, "Collection should have been deleted" except Exception as e: test_logger.info(f"Collection successfully deleted (404 expected): {e}") - assert ( - "404" in str(e) or "Not Found" in str(e) or "ResourceNotFound" in str(e) - ) + assert "404" in str(e) or "Not Found" in str(e) or "ResourceNotFound" in str(e) test_logger.info("Test PASSED\n") @@ -193,9 +169,7 @@ async def test_03_begin_delete_collection(self, planetarycomputer_endpoint): @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_04_create_collection_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_04_create_collection_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating a collection asset. Note: This test uses the existing test collection. @@ -211,22 +185,14 @@ async def test_04_create_collection_asset( # Delete the asset if it already exists try: - test_logger.info( - "Checking if asset 'test-asset' already exists and deleting if found..." - ) + test_logger.info("Checking if asset 'test-asset' already exists and deleting if found...") await client.stac.delete_collection_asset( collection_id=planetarycomputer_collection_id, asset_id="test-asset" ) test_logger.info("Deleted existing 'test-asset'") except Exception as e: - if ( - "404" in str(e) - or "Not Found" in str(e) - or "not found" in str(e).lower() - ): - test_logger.info( - "Asset 'test-asset' does not exist, proceeding with creation" - ) + if "404" in str(e) or "Not Found" in str(e) or "not found" in str(e).lower(): + test_logger.info("Asset 'test-asset' does not exist, proceeding with creation") else: test_logger.warning(f"Error checking/deleting asset: {e}") @@ -258,9 +224,7 @@ async def test_04_create_collection_asset( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_05_replace_collection_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_05_replace_collection_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test creating or replacing a collection asset. """ @@ -301,9 +265,7 @@ async def test_05_replace_collection_asset( @PlanetaryComputerPreparer() @recorded_by_proxy_async - async def test_06_delete_collection_asset( - self, planetarycomputer_endpoint, planetarycomputer_collection_id - ): + async def test_06_delete_collection_asset(self, planetarycomputer_endpoint, planetarycomputer_collection_id): """ Test deleting a collection asset. First creates an asset specifically for deletion. @@ -350,13 +312,9 @@ async def test_06_delete_collection_asset( test_logger.info("Asset deleted successfully") # Verify deletion by checking collection assets - collection = await client.stac.get_collection( - collection_id=planetarycomputer_collection_id - ) + collection = await client.stac.get_collection(collection_id=planetarycomputer_collection_id) if hasattr(collection, "assets") and collection.assets: - assert ( - "test-asset-to-be-deleted" not in collection.assets - ), "Asset should have been deleted" + assert "test-asset-to-be-deleted" not in collection.assets, "Asset should have been deleted" test_logger.info("Test PASSED\n") diff --git a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/_patch.py b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/_patch.py +++ b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/_patch.py b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/_patch.py +++ b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/operations/_patch.py b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/operations/_patch.py +++ b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/models/_patch.py b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/models/_patch.py +++ b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/operations/_patch.py b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/operations/_patch.py +++ b/sdk/playwright/azure-mgmt-playwright/azure/mgmt/playwright/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwright/azure-mgmt-playwright/setup.py b/sdk/playwright/azure-mgmt-playwright/setup.py index 678c83b04c77..afc2183bd200 100644 --- a/sdk/playwright/azure-mgmt-playwright/setup.py +++ b/sdk/playwright/azure-mgmt-playwright/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/_patch.py b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/_patch.py +++ b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/_patch.py b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/_patch.py +++ b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/operations/_patch.py b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/operations/_patch.py +++ b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/models/_patch.py b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/models/_patch.py +++ b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/operations/_patch.py b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/operations/_patch.py +++ b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/setup.py b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/setup.py index 9fc70e013fff..50dc418fea5c 100644 --- a/sdk/playwrighttesting/azure-mgmt-playwrighttesting/setup.py +++ b/sdk/playwrighttesting/azure-mgmt-playwrighttesting/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_patch.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_patch.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/_patch.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/_patch.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_patch.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_patch.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_patch.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_patch.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_patch.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_patch.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/setup.py b/sdk/policyinsights/azure-mgmt-policyinsights/setup.py index dcf631fd3553..23eab0e22807 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/setup.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/_patch.py b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/_patch.py +++ b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/_patch.py b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/_patch.py +++ b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_patch.py b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_patch.py +++ b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/models/_patch.py b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/models/_patch.py +++ b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/operations/_patch.py b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/operations/_patch.py +++ b/sdk/portal/azure-mgmt-portal/azure/mgmt/portal/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portal/azure-mgmt-portal/setup.py b/sdk/portal/azure-mgmt-portal/setup.py index e44bfe691b32..8130b0be0a14 100644 --- a/sdk/portal/azure-mgmt-portal/setup.py +++ b/sdk/portal/azure-mgmt-portal/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Portal Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/_patch.py b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/_patch.py +++ b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/_patch.py b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/_patch.py +++ b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/operations/_patch.py b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/operations/_patch.py +++ b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/models/_patch.py b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/models/_patch.py +++ b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/operations/_patch.py b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/operations/_patch.py +++ b/sdk/portalservices/azure-mgmt-portalservicescopilot/azure/mgmt/portalservicescopilot/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/portalservices/azure-mgmt-portalservicescopilot/setup.py b/sdk/portalservices/azure-mgmt-portalservicescopilot/setup.py index 4399f1480435..0805b885ce31 100644 --- a/sdk/portalservices/azure-mgmt-portalservicescopilot/setup.py +++ b/sdk/portalservices/azure-mgmt-portalservicescopilot/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/_patch.py b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/_patch.py +++ b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/_patch.py b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/_patch.py +++ b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/operations/_patch.py b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/operations/_patch.py +++ b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/models/_patch.py b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/models/_patch.py +++ b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/operations/_patch.py b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/operations/_patch.py +++ b/sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/_patch.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/_patch.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/_patch.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/_patch.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_patch.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_patch.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/models/_patch.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/models/_patch.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/operations/_patch.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/operations/_patch.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py index 97103c0454cd..7493c88b16e3 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Power BI Dedicated Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/tests/disable_test_cli_mgmt_powerbidedicated.py b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/tests/disable_test_cli_mgmt_powerbidedicated.py index 77266382f8fe..bb3d904317e3 100644 --- a/sdk/powerbidedicated/azure-mgmt-powerbidedicated/tests/disable_test_cli_mgmt_powerbidedicated.py +++ b/sdk/powerbidedicated/azure-mgmt-powerbidedicated/tests/disable_test_cli_mgmt_powerbidedicated.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,16 +21,15 @@ import azure.mgmt.powerbidedicated from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtPowerBIDedicatedTest(AzureMgmtTestCase): def setUp(self): super(MgmtPowerBIDedicatedTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.powerbidedicated.PowerBIDedicatedManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.powerbidedicated.PowerBIDedicatedManagementClient) + @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_powerbidedicated(self, resource_group): @@ -43,74 +42,76 @@ def test_powerbidedicated(self, resource_group): # /Capacities/put/Create capacity[put]i BODY = { - "sku": { - "name": "A1", - "tier": "PBIE_Azure" - }, - "tags": { - "test_key": "testValue" - }, - "administration": { - "members": [ - "user1@microsoft.com", - "user2@microsoft.com" - ] - }, - "location": "eastus" + "sku": {"name": "A1", "tier": "PBIE_Azure"}, + "tags": {"test_key": "testValue"}, + "administration": {"members": ["user1@microsoft.com", "user2@microsoft.com"]}, + "location": "eastus", } - result = self.mgmt_client.capacities.create(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME, capacity_parameters=BODY) + result = self.mgmt_client.capacities.create( + resource_group_name=RESOURCE_GROUP, + dedicated_capacity_name=DEDICATED_CAPACITY_NAME, + capacity_parameters=BODY, + ) result = result.result() # /Capacities/get/List eligible SKUs for an existing capacity[get] - result = self.mgmt_client.capacities.list_skus_for_capacity(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME) + result = self.mgmt_client.capacities.list_skus_for_capacity( + resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME + ) # /Capacities/get/Get details of a capacity[get] - result = self.mgmt_client.capacities.get_details(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME) + result = self.mgmt_client.capacities.get_details( + resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME + ) # /Capacities/get/List capacities in resource group[get] result = self.mgmt_client.capacities.list_by_resource_group(resource_group_name=RESOURCE_GROUP) # /Capacities/get/Get details of a capacity[get] - result = self.mgmt_client.capacities.get_details(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME) + result = self.mgmt_client.capacities.get_details( + resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME + ) # /Capacities/get/List eligible SKUs for a new capacity[get] result = self.mgmt_client.capacities.list_skus() # /Capacities/post/Suspend capacity[post] - result = self.mgmt_client.capacities.suspend(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME) + result = self.mgmt_client.capacities.suspend( + resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME + ) result = result.result() # /Capacities/post/Get details of a capacity[post] - result = self.mgmt_client.capacities.resume(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME) + result = self.mgmt_client.capacities.resume( + resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME + ) result = result.result() # /Capacities/patch/Update capacity parameters[patch] BODY = { - "sku": { - "name": "A1", - "tier": "PBIE_Azure" - }, - "tags": { - "test_key": "testValue" - }, - "administration": { - "members": [ - "user1@microsoft.com", - "user2@microsoft.com" - ] - } + "sku": {"name": "A1", "tier": "PBIE_Azure"}, + "tags": {"test_key": "testValue"}, + "administration": {"members": ["user1@microsoft.com", "user2@microsoft.com"]}, } - result = self.mgmt_client.capacities.update(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME, capacity_update_parameters=BODY) + result = self.mgmt_client.capacities.update( + resource_group_name=RESOURCE_GROUP, + dedicated_capacity_name=DEDICATED_CAPACITY_NAME, + capacity_update_parameters=BODY, + ) result = result.result() # /Capacities/post/Check name availability of a capacity[post] - result = self.mgmt_client.capacities.check_name_availability(location="eastus", name="azsdktest", type="Microsoft.PowerBIDedicated/capacities") + result = self.mgmt_client.capacities.check_name_availability( + location="eastus", name="azsdktest", type="Microsoft.PowerBIDedicated/capacities" + ) # /Capacities/delete/Get details of a capacity[delete] - result = self.mgmt_client.capacities.delete(resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME) + result = self.mgmt_client.capacities.delete( + resource_group_name=RESOURCE_GROUP, dedicated_capacity_name=DEDICATED_CAPACITY_NAME + ) result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/_patch.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/_patch.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/_patch.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/_patch.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/operations/_patch.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/operations/_patch.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/_patch.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/_patch.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/_patch.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/_patch.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/setup.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/setup.py index 54229b720455..4f3bd81b326c 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/setup.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/conftest.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/conftest.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/test_cli_mgmt_powerbiembedded.py b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/test_cli_mgmt_powerbiembedded.py index 2ea1dbf3ae1e..ae04b4157743 100644 --- a/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/test_cli_mgmt_powerbiembedded.py +++ b/sdk/powerbiembedded/azure-mgmt-powerbiembedded/tests/test_cli_mgmt_powerbiembedded.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.powerbiembedded import PowerBIEmbeddedManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtPowerBIEmbedded(AzureMgmtRecordedTestCase): diff --git a/sdk/projects/azure-projects/azure/projects/__init__.py b/sdk/projects/azure-projects/azure/projects/__init__.py index d2232212d891..019ae2e45ec0 100644 --- a/sdk/projects/azure-projects/azure/projects/__init__.py +++ b/sdk/projects/azure-projects/azure/projects/__init__.py @@ -10,7 +10,6 @@ from ._bicep.expressions import Parameter, MISSING from ._version import VERSION - __version__ = VERSION __all__ = [ "provision", diff --git a/sdk/projects/azure-projects/azure/projects/_parameters.py b/sdk/projects/azure-projects/azure/projects/_parameters.py index 9116c0299fc0..73a95710d8a8 100644 --- a/sdk/projects/azure-projects/azure/projects/_parameters.py +++ b/sdk/projects/azure-projects/azure/projects/_parameters.py @@ -8,7 +8,6 @@ from ._bicep.expressions import Parameter, UniqueString, Subscription, Variable, PlaceholderParameter - LOCATION = Parameter( "location", description="Primary location for all resources", min_length=1, env_var="AZURE_LOCATION", type="string" ) diff --git a/sdk/projects/azure-projects/azure/projects/_provision.py b/sdk/projects/azure-projects/azure/projects/_provision.py index cc000e283f1d..8a49f1c34e24 100644 --- a/sdk/projects/azure-projects/azure/projects/_provision.py +++ b/sdk/projects/azure-projects/azure/projects/_provision.py @@ -35,7 +35,6 @@ from .resources.appconfig.setting import ConfigSetting from .resources.appservice.site import AppSite - _BICEP_PARAMS = { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", diff --git a/sdk/projects/azure-projects/azure/projects/resources/_extension/roles/types.py b/sdk/projects/azure-projects/azure/projects/resources/_extension/roles/types.py index d0d71c138d52..5cd46924b363 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/_extension/roles/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/_extension/roles/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Expression - VERSION = "2022-04-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/ai/deployment/types.py b/sdk/projects/azure-projects/azure/projects/resources/ai/deployment/types.py index d0c46af5baea..01b466190696 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/ai/deployment/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/ai/deployment/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Parameter, ResourceSymbol - VERSION = "2024-10-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/ai/types.py b/sdk/projects/azure-projects/azure/projects/resources/ai/types.py index 02b228f39804..e2622c7a0e2e 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/ai/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/ai/types.py @@ -10,7 +10,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2024-10-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/_resource.py b/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/_resource.py index 9c5b1222435a..346dc73e9c51 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/_resource.py +++ b/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/_resource.py @@ -25,7 +25,6 @@ from ...._resource import Resource, ExtensionResources, ResourceReference from .. import ConfigStore - if TYPE_CHECKING: from ...resourcegroup import ResourceGroup from .types import ConfigSettingResource diff --git a/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/types.py b/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/types.py index e0cfc97f983c..1bb74e61f478 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/appconfig/setting/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Parameter, ResourceSymbol - VERSION = "2024-05-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/appconfig/types.py b/sdk/projects/azure-projects/azure/projects/resources/appconfig/types.py index e6f657972d93..e6ecc8d41bbb 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/appconfig/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/appconfig/types.py @@ -10,7 +10,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2024-05-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/appservice/site/_config/types.py b/sdk/projects/azure-projects/azure/projects/resources/appservice/site/_config/types.py index 716049e70bef..f75dc4105dfe 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/appservice/site/_config/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/appservice/site/_config/types.py @@ -10,7 +10,6 @@ from ....._bicep.expressions import ResourceSymbol, Expression - VERSION = "2024-04-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/appservice/site/types.py b/sdk/projects/azure-projects/azure/projects/resources/appservice/site/types.py index 000ce684e79e..134882e2ad65 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/appservice/site/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/appservice/site/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Parameter - VERSION = "2024-04-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/appservice/types.py b/sdk/projects/azure-projects/azure/projects/resources/appservice/types.py index 0f8cb819975b..59d1171a6414 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/appservice/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/appservice/types.py @@ -10,7 +10,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2024-04-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/foundry/_connection/types.py b/sdk/projects/azure-projects/azure/projects/resources/foundry/_connection/types.py index 3cd170d7c11f..913125770f54 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/foundry/_connection/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/foundry/_connection/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Expression, ResourceSymbol, Parameter - VERSION = "2025-01-01-preview" diff --git a/sdk/projects/azure-projects/azure/projects/resources/foundry/types.py b/sdk/projects/azure-projects/azure/projects/resources/foundry/types.py index 0e1ac6653004..11ca8da6cdb6 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/foundry/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/foundry/types.py @@ -10,7 +10,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2024-04-01-preview" diff --git a/sdk/projects/azure-projects/azure/projects/resources/keyvault/types.py b/sdk/projects/azure-projects/azure/projects/resources/keyvault/types.py index 77d2bbbad152..1ebcf7d9ac82 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/keyvault/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/keyvault/types.py @@ -10,7 +10,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2024-12-01-preview" diff --git a/sdk/projects/azure-projects/azure/projects/resources/managedidentity/types.py b/sdk/projects/azure-projects/azure/projects/resources/managedidentity/types.py index 26fab05c3b39..dc7cecd1ac14 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/managedidentity/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/managedidentity/types.py @@ -9,7 +9,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2023-07-31-preview" diff --git a/sdk/projects/azure-projects/azure/projects/resources/resourcegroup/types.py b/sdk/projects/azure-projects/azure/projects/resources/resourcegroup/types.py index dc32794c86eb..c1143531f7bb 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/resourcegroup/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/resourcegroup/types.py @@ -9,7 +9,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2021-04-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/search/types.py b/sdk/projects/azure-projects/azure/projects/resources/search/types.py index 19058f7e5f83..01233186b54a 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/search/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/search/types.py @@ -10,7 +10,6 @@ from ..._bicep.expressions import Parameter - VERSION = "2024-06-01-Preview" diff --git a/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/_resource.py b/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/_resource.py index b15e4cbb9b95..46b563a8ce49 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/_resource.py +++ b/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/_resource.py @@ -31,7 +31,6 @@ from ....._resource import _ClientResource, ExtensionResources, ResourceReference from .. import BlobStorage - if TYPE_CHECKING: from ...._extension import RoleAssignment from ....resourcegroup import ResourceGroup diff --git a/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/types.py b/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/types.py index 625d4284a3d1..3b727c2deb1c 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/container/types.py @@ -10,7 +10,6 @@ from ....._bicep.expressions import Parameter - VERSION = "2022-09-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/types.py b/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/types.py index f6e6847534f4..938711fa41fb 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/storage/blobs/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Parameter - VERSION = "2024-01-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/_resource.py b/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/_resource.py index 96ef390c8517..f67f61f1f96b 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/_resource.py +++ b/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/_resource.py @@ -31,7 +31,6 @@ from ....._resource import _ClientResource, ExtensionResources, ResourceReference from .. import TableStorage - if TYPE_CHECKING: from ...._extension import RoleAssignment from ....resourcegroup import ResourceGroup diff --git a/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/types.py b/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/types.py index 5cbf6d7456ef..324b8960a43a 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/storage/tables/table/types.py @@ -10,7 +10,6 @@ from ....._bicep.expressions import Parameter - VERSION = "2024-01-01" diff --git a/sdk/projects/azure-projects/azure/projects/resources/storage/tables/types.py b/sdk/projects/azure-projects/azure/projects/resources/storage/tables/types.py index a12ce4c600d8..9da449f839a0 100644 --- a/sdk/projects/azure-projects/azure/projects/resources/storage/tables/types.py +++ b/sdk/projects/azure-projects/azure/projects/resources/storage/tables/types.py @@ -10,7 +10,6 @@ from ...._bicep.expressions import Parameter - VERSION = "2024-01-01" diff --git a/sdk/projects/azure-projects/samples/restaurant_reviews/app.py b/sdk/projects/azure-projects/samples/restaurant_reviews/app.py index fc6740e3ecfc..de2069232a3c 100644 --- a/sdk/projects/azure-projects/samples/restaurant_reviews/app.py +++ b/sdk/projects/azure-projects/samples/restaurant_reviews/app.py @@ -14,7 +14,6 @@ from models import Restaurant, Review - app = Flask(__name__, template_folder="templates", static_folder="static") diff --git a/sdk/projects/azure-projects/samples/sample_ai.py b/sdk/projects/azure-projects/samples/sample_ai.py index f5ec871afcff..be6e36a8cd91 100644 --- a/sdk/projects/azure-projects/samples/sample_ai.py +++ b/sdk/projects/azure-projects/samples/sample_ai.py @@ -30,6 +30,7 @@ Running the samples requires that Azure Developer CLI be installed and authenticated: For more information: https://learn.microsoft.com/azure/developer/azure-developer-cli/ """ + import asyncio import time diff --git a/sdk/projects/azure-projects/samples/sample_config.py b/sdk/projects/azure-projects/samples/sample_config.py index a4a19f29a9ff..1ea265c5365b 100644 --- a/sdk/projects/azure-projects/samples/sample_config.py +++ b/sdk/projects/azure-projects/samples/sample_config.py @@ -27,6 +27,7 @@ Running the samples requires that Azure Developer CLI be installed and authenticated: For more information: https://learn.microsoft.com/azure/developer/azure-developer-cli/ """ + import asyncio import time import logging diff --git a/sdk/projects/azure-projects/samples/sample_helloworld.py b/sdk/projects/azure-projects/samples/sample_helloworld.py index bbabf58133a5..7d4392cecaa6 100644 --- a/sdk/projects/azure-projects/samples/sample_helloworld.py +++ b/sdk/projects/azure-projects/samples/sample_helloworld.py @@ -27,6 +27,7 @@ Running the samples requires that Azure Developer CLI be installed and authenticated: For more information: https://learn.microsoft.com/azure/developer/azure-developer-cli/ """ + import asyncio import time diff --git a/sdk/projects/azure-projects/setup.py b/sdk/projects/azure-projects/setup.py index b7bda7624f6a..4d18868cdff0 100644 --- a/sdk/projects/azure-projects/setup.py +++ b/sdk/projects/azure-projects/setup.py @@ -11,7 +11,6 @@ from io import open import re - PACKAGE_NAME = "azure-projects" PACKAGE_PPRINT_NAME = "Projects" diff --git a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/_patch.py b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/_patch.py +++ b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/_patch.py b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/_patch.py +++ b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/operations/_patch.py b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/operations/_patch.py +++ b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/models/_patch.py b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/models/_patch.py +++ b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/operations/_patch.py b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/operations/_patch.py +++ b/sdk/purestorageblock/azure-mgmt-purestorageblock/azure/mgmt/purestorageblock/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purestorageblock/azure-mgmt-purestorageblock/setup.py b/sdk/purestorageblock/azure-mgmt-purestorageblock/setup.py index eb3f6d5c79af..4f4ba228bd5b 100644 --- a/sdk/purestorageblock/azure-mgmt-purestorageblock/setup.py +++ b/sdk/purestorageblock/azure-mgmt-purestorageblock/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_patch.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_patch.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_patch.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_patch.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_patch.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_patch.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_patch.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_patch.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_patch.py b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_patch.py +++ b/sdk/purview/azure-mgmt-purview/azure/mgmt/purview/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-mgmt-purview/setup.py b/sdk/purview/azure-mgmt-purview/setup.py index 52e6fa48b4ca..324123e5ebef 100644 --- a/sdk/purview/azure-mgmt-purview/setup.py +++ b/sdk/purview/azure-mgmt-purview/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Purview Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/purview/azure-purview-administration/azure/__init__.py b/sdk/purview/azure-purview-administration/azure/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-administration/azure/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py index d5c53ba7d43e..047d4fef1c93 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['PurviewAccountClient'] +__all__ = ["PurviewAccountClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py index 09e0ba82e54d..e0f10d15bd6e 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = "2019-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-administration/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py index a5520853c3e6..1dc4da41677c 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py @@ -22,6 +22,7 @@ from azure.core.credentials import TokenCredential from azure.core.rest import HttpRequest, HttpResponse + class PurviewAccountClient(object): """Creates a Microsoft.Purview data plane account client. @@ -46,7 +47,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - _endpoint = '{endpoint}' + _endpoint = "{endpoint}" self._config = PurviewAccountClientConfiguration(endpoint, credential, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -55,8 +56,9 @@ def __init__( self._serialize.client_side_validation = False self.accounts = AccountsOperations(self._client, self._config, self._serialize, self._deserialize) self.collections = CollectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.resource_set_rules = ResourceSetRulesOperations(self._client, self._config, self._serialize, self._deserialize) - + self.resource_set_rules = ResourceSetRulesOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, @@ -83,7 +85,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py index 138f663c53a4..9aad73fc743e 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -14,6 +15,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -21,7 +23,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py index 1e668f62d8c2..43c87ae80502 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._purview_account_client import PurviewAccountClient -__all__ = ['PurviewAccountClient'] + +__all__ = ["PurviewAccountClient"] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py index b24a81bfaa07..84c7643c5460 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py @@ -30,12 +30,7 @@ class PurviewAccountClientConfiguration(Configuration): :type credential: ~azure.core.credentials_async.AsyncTokenCredential """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") if credential is None: @@ -45,22 +40,21 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = "2019-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-administration/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py index 612425f842a5..e394139971bc 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py @@ -22,6 +22,7 @@ from azure.core.credentials_async import AsyncTokenCredential + class PurviewAccountClient: """Creates a Microsoft.Purview data plane account client. @@ -39,13 +40,8 @@ class PurviewAccountClient: :type credential: ~azure.core.credentials_async.AsyncTokenCredential """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: - _endpoint = '{endpoint}' + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + _endpoint = "{endpoint}" self._config = PurviewAccountClientConfiguration(endpoint, credential, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -54,14 +50,11 @@ def __init__( self._serialize.client_side_validation = False self.accounts = AccountsOperations(self._client, self._config, self._serialize, self._deserialize) self.collections = CollectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.resource_set_rules = ResourceSetRulesOperations(self._client, self._config, self._serialize, self._deserialize) - + self.resource_set_rules = ResourceSetRulesOperations( + self._client, self._config, self._serialize, self._deserialize + ) - def send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -81,7 +74,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py index ae7fd0373d9b..f8b0df685c4e 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py @@ -11,7 +11,7 @@ from ._operations import ResourceSetRulesOperations __all__ = [ - 'AccountsOperations', - 'CollectionsOperations', - 'ResourceSetRulesOperations', + "AccountsOperations", + "CollectionsOperations", + "ResourceSetRulesOperations", ] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py index 0e8eb5c31a36..5715da11cfbb 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py @@ -11,7 +11,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -19,11 +25,27 @@ from azure.core.tracing.decorator_async import distributed_trace_async from ..._vendor import _convert_request -from ...operations._operations import build_accounts_get_access_keys_request, build_accounts_get_account_properties_request, build_accounts_regenerate_access_key_request, build_accounts_update_account_properties_request, build_collections_create_or_update_collection_request, build_collections_delete_collection_request, build_collections_get_collection_path_request, build_collections_get_collection_request, build_collections_list_child_collection_names_request, build_collections_list_collections_request, build_resource_set_rules_create_or_update_resource_set_rule_request, build_resource_set_rules_delete_resource_set_rule_request, build_resource_set_rules_get_resource_set_rule_request, build_resource_set_rules_list_resource_set_rules_request - -T = TypeVar('T') +from ...operations._operations import ( + build_accounts_get_access_keys_request, + build_accounts_get_account_properties_request, + build_accounts_regenerate_access_key_request, + build_accounts_update_account_properties_request, + build_collections_create_or_update_collection_request, + build_collections_delete_collection_request, + build_collections_get_collection_path_request, + build_collections_get_collection_request, + build_collections_list_child_collection_names_request, + build_collections_list_collections_request, + build_resource_set_rules_create_or_update_resource_set_rule_request, + build_resource_set_rules_delete_resource_set_rule_request, + build_resource_set_rules_get_resource_set_rule_request, + build_resource_set_rules_list_resource_set_rules_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class AccountsOperations: """AccountsOperations async operations. @@ -43,10 +65,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get_account_properties( - self, - **kwargs: Any - ) -> Any: + async def get_account_properties(self, **kwargs: Any) -> Any: """Get an account. :return: JSON object @@ -124,22 +143,21 @@ async def get_account_properties( "type": "str" # Optional. Gets or sets the type. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_accounts_get_account_properties_request( - template_url=self.get_account_properties.metadata['url'], + template_url=self.get_account_properties.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -156,15 +174,10 @@ async def get_account_properties( return deserialized - get_account_properties.metadata = {'url': '/'} # type: ignore - + get_account_properties.metadata = {"url": "/"} # type: ignore @distributed_trace_async - async def update_account_properties( - self, - account_update_parameters: Any, - **kwargs: Any - ) -> Any: + async def update_account_properties(self, account_update_parameters: Any, **kwargs: Any) -> Any: """Updates an account. :param account_update_parameters: @@ -249,27 +262,27 @@ async def update_account_properties( "type": "str" # Optional. Gets or sets the type. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = account_update_parameters request = build_accounts_update_account_properties_request( content_type=content_type, json=json, - template_url=self.update_account_properties.metadata['url'], + template_url=self.update_account_properties.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -286,14 +299,10 @@ async def update_account_properties( return deserialized - update_account_properties.metadata = {'url': '/'} # type: ignore - + update_account_properties.metadata = {"url": "/"} # type: ignore @distributed_trace_async - async def get_access_keys( - self, - **kwargs: Any - ) -> Any: + async def get_access_keys(self, **kwargs: Any) -> Any: """List the authorization keys associated with this account. :return: JSON object @@ -309,22 +318,21 @@ async def get_access_keys( "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_accounts_get_access_keys_request( - template_url=self.get_access_keys.metadata['url'], + template_url=self.get_access_keys.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -341,15 +349,10 @@ async def get_access_keys( return deserialized - get_access_keys.metadata = {'url': '/listkeys'} # type: ignore - + get_access_keys.metadata = {"url": "/listkeys"} # type: ignore @distributed_trace_async - async def regenerate_access_key( - self, - key_options: Any, - **kwargs: Any - ) -> Any: + async def regenerate_access_key(self, key_options: Any, **kwargs: Any) -> Any: """Regenerate the authorization keys associated with this data catalog. :param key_options: @@ -372,27 +375,27 @@ async def regenerate_access_key( "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = key_options request = build_accounts_regenerate_access_key_request( content_type=content_type, json=json, - template_url=self.regenerate_access_key.metadata['url'], + template_url=self.regenerate_access_key.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -409,7 +412,8 @@ async def regenerate_access_key( return deserialized - regenerate_access_key.metadata = {'url': '/regeneratekeys'} # type: ignore + regenerate_access_key.metadata = {"url": "/regeneratekeys"} # type: ignore + class CollectionsOperations: """CollectionsOperations async operations. @@ -430,11 +434,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get_collection( - self, - collection_name: str, - **kwargs: Any - ) -> Any: + async def get_collection(self, collection_name: str, **kwargs: Any) -> Any: """Get a collection. :param collection_name: @@ -466,23 +466,22 @@ async def get_collection( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_collections_get_collection_request( collection_name=collection_name, - template_url=self.get_collection.metadata['url'], + template_url=self.get_collection.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -499,16 +498,10 @@ async def get_collection( return deserialized - get_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore - + get_collection.metadata = {"url": "/collections/{collectionName}"} # type: ignore @distributed_trace_async - async def create_or_update_collection( - self, - collection_name: str, - collection: Any, - **kwargs: Any - ) -> Any: + async def create_or_update_collection(self, collection_name: str, collection: Any, **kwargs: Any) -> Any: """Creates or updates a collection entity. :param collection_name: @@ -562,13 +555,11 @@ async def create_or_update_collection( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = collection @@ -576,14 +567,16 @@ async def create_or_update_collection( collection_name=collection_name, content_type=content_type, json=json, - template_url=self.create_or_update_collection.metadata['url'], + template_url=self.create_or_update_collection.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -600,15 +593,10 @@ async def create_or_update_collection( return deserialized - create_or_update_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore - + create_or_update_collection.metadata = {"url": "/collections/{collectionName}"} # type: ignore @distributed_trace_async - async def delete_collection( - self, - collection_name: str, - **kwargs: Any - ) -> None: + async def delete_collection(self, collection_name: str, **kwargs: Any) -> None: """Deletes a Collection entity. :param collection_name: @@ -617,23 +605,22 @@ async def delete_collection( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_collections_delete_collection_request( collection_name=collection_name, - template_url=self.delete_collection.metadata['url'], + template_url=self.delete_collection.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -643,16 +630,10 @@ async def delete_collection( if cls: return cls(pipeline_response, None, {}) - delete_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore - + delete_collection.metadata = {"url": "/collections/{collectionName}"} # type: ignore @distributed_trace - def list_collections( - self, - *, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_collections(self, *, skip_token: Optional[str] = None, **kwargs: Any) -> AsyncIterable[Any]: """List the collections in the account. :keyword skip_token: @@ -690,38 +671,43 @@ def list_collections( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_collections_list_collections_request( skip_token=skip_token, - template_url=self.list_collections.metadata['url'], + template_url=self.list_collections.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_collections_list_collections_request( skip_token=skip_token, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -745,19 +731,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_collections.metadata = {'url': '/collections'} # type: ignore + list_collections.metadata = {"url": "/collections"} # type: ignore @distributed_trace def list_child_collection_names( - self, - collection_name: str, - *, - skip_token: Optional[str] = None, - **kwargs: Any + self, collection_name: str, *, skip_token: Optional[str] = None, **kwargs: Any ) -> AsyncIterable[Any]: """Lists the child collections names in the collection. @@ -784,27 +764,28 @@ def list_child_collection_names( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_collections_list_child_collection_names_request( collection_name=collection_name, skip_token=skip_token, - template_url=self.list_child_collection_names.metadata['url'], + template_url=self.list_child_collection_names.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_collections_list_child_collection_names_request( collection_name=collection_name, skip_token=skip_token, @@ -812,12 +793,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -841,18 +826,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_child_collection_names.metadata = {'url': '/collections/{collectionName}/getChildCollectionNames'} # type: ignore + list_child_collection_names.metadata = {"url": "/collections/{collectionName}/getChildCollectionNames"} # type: ignore @distributed_trace_async - async def get_collection_path( - self, - collection_name: str, - **kwargs: Any - ) -> Any: + async def get_collection_path(self, collection_name: str, **kwargs: Any) -> Any: """Gets the parent name and parent friendly name chains that represent the collection path. :param collection_name: @@ -874,23 +853,22 @@ async def get_collection_path( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_collections_get_collection_path_request( collection_name=collection_name, - template_url=self.get_collection_path.metadata['url'], + template_url=self.get_collection_path.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -907,7 +885,8 @@ async def get_collection_path( return deserialized - get_collection_path.metadata = {'url': '/collections/{collectionName}/getCollectionPath'} # type: ignore + get_collection_path.metadata = {"url": "/collections/{collectionName}/getCollectionPath"} # type: ignore + class ResourceSetRulesOperations: """ResourceSetRulesOperations async operations. @@ -928,10 +907,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get_resource_set_rule( - self, - **kwargs: Any - ) -> Any: + async def get_resource_set_rule(self, **kwargs: Any) -> Any: """Get a resource set config service model. :return: JSON object @@ -955,8 +931,8 @@ async def get_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -971,8 +947,8 @@ async def get_resource_set_rule( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1008,7 +984,7 @@ async def get_resource_set_rule( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1024,7 +1000,7 @@ async def get_resource_set_rule( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1047,45 +1023,44 @@ async def get_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_resource_set_rules_get_resource_set_rule_request( - template_url=self.get_resource_set_rule.metadata['url'], + template_url=self.get_resource_set_rule.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1102,15 +1077,10 @@ async def get_resource_set_rule( return deserialized - get_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore - + get_resource_set_rule.metadata = {"url": "/resourceSetRuleConfigs/defaultResourceSetRuleConfig"} # type: ignore @distributed_trace_async - async def create_or_update_resource_set_rule( - self, - resource_set_rule_config: Any, - **kwargs: Any - ) -> Any: + async def create_or_update_resource_set_rule(self, resource_set_rule_config: Any, **kwargs: Any) -> Any: """Creates or updates an resource set config. :param resource_set_rule_config: @@ -1136,8 +1106,8 @@ async def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1152,8 +1122,8 @@ async def create_or_update_resource_set_rule( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1189,7 +1159,7 @@ async def create_or_update_resource_set_rule( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1205,7 +1175,7 @@ async def create_or_update_resource_set_rule( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1228,23 +1198,23 @@ async def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. @@ -1265,8 +1235,8 @@ async def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1281,8 +1251,8 @@ async def create_or_update_resource_set_rule( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1318,7 +1288,7 @@ async def create_or_update_resource_set_rule( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1334,7 +1304,7 @@ async def create_or_update_resource_set_rule( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1357,50 +1327,50 @@ async def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = resource_set_rule_config request = build_resource_set_rules_create_or_update_resource_set_rule_request( content_type=content_type, json=json, - template_url=self.create_or_update_resource_set_rule.metadata['url'], + template_url=self.create_or_update_resource_set_rule.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1417,36 +1387,31 @@ async def create_or_update_resource_set_rule( return deserialized - create_or_update_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore - + create_or_update_resource_set_rule.metadata = {"url": "/resourceSetRuleConfigs/defaultResourceSetRuleConfig"} # type: ignore @distributed_trace_async - async def delete_resource_set_rule( - self, - **kwargs: Any - ) -> None: + async def delete_resource_set_rule(self, **kwargs: Any) -> None: """Deletes a ResourceSetRuleConfig resource. :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_resource_set_rules_delete_resource_set_rule_request( - template_url=self.delete_resource_set_rule.metadata['url'], + template_url=self.delete_resource_set_rule.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1456,16 +1421,10 @@ async def delete_resource_set_rule( if cls: return cls(pipeline_response, None, {}) - delete_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore - + delete_resource_set_rule.metadata = {"url": "/resourceSetRuleConfigs/defaultResourceSetRuleConfig"} # type: ignore @distributed_trace - def list_resource_set_rules( - self, - *, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_resource_set_rules(self, *, skip_token: Optional[str] = None, **kwargs: Any) -> AsyncIterable[Any]: """Get a resource set config service model. :keyword skip_token: @@ -1495,8 +1454,8 @@ def list_resource_set_rules( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1511,8 +1470,8 @@ def list_resource_set_rules( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1548,7 +1507,7 @@ def list_resource_set_rules( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1564,7 +1523,7 @@ def list_resource_set_rules( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1587,23 +1546,23 @@ def list_resource_set_rules( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. @@ -1612,38 +1571,43 @@ def list_resource_set_rules( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_resource_set_rules_list_resource_set_rules_request( skip_token=skip_token, - template_url=self.list_resource_set_rules.metadata['url'], + template_url=self.list_resource_set_rules.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_resource_set_rules_list_resource_set_rules_request( skip_token=skip_token, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1667,8 +1631,6 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_resource_set_rules.metadata = {'url': '/resourceSetRuleConfigs'} # type: ignore + list_resource_set_rules.metadata = {"url": "/resourceSetRuleConfigs"} # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py index ae7fd0373d9b..f8b0df685c4e 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py @@ -11,7 +11,7 @@ from ._operations import ResourceSetRulesOperations __all__ = [ - 'AccountsOperations', - 'CollectionsOperations', - 'ResourceSetRulesOperations', + "AccountsOperations", + "CollectionsOperations", + "ResourceSetRulesOperations", ] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py index 9a08329942ea..04a41971903e 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py @@ -10,7 +10,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -24,7 +30,7 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() @@ -451,6 +457,7 @@ def build_resource_set_rules_list_resource_set_rules_request( **kwargs ) + # fmt: on class AccountsOperations(object): """AccountsOperations operations. @@ -472,8 +479,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get_account_properties( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Any """Get an account. @@ -553,18 +559,15 @@ def get_account_properties( "type": "str" # Optional. Gets or sets the type. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_accounts_get_account_properties_request( - template_url=self.get_account_properties.metadata['url'], + template_url=self.get_account_properties.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -585,8 +588,7 @@ def get_account_properties( return deserialized - get_account_properties.metadata = {'url': '/'} # type: ignore - + get_account_properties.metadata = {"url": "/"} # type: ignore @distributed_trace def update_account_properties( @@ -679,23 +681,21 @@ def update_account_properties( "type": "str" # Optional. Gets or sets the type. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = account_update_parameters request = build_accounts_update_account_properties_request( content_type=content_type, json=json, - template_url=self.update_account_properties.metadata['url'], + template_url=self.update_account_properties.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -716,13 +716,11 @@ def update_account_properties( return deserialized - update_account_properties.metadata = {'url': '/'} # type: ignore - + update_account_properties.metadata = {"url": "/"} # type: ignore @distributed_trace def get_access_keys( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Any """List the authorization keys associated with this account. @@ -740,18 +738,15 @@ def get_access_keys( "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_accounts_get_access_keys_request( - template_url=self.get_access_keys.metadata['url'], + template_url=self.get_access_keys.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -772,8 +767,7 @@ def get_access_keys( return deserialized - get_access_keys.metadata = {'url': '/listkeys'} # type: ignore - + get_access_keys.metadata = {"url": "/listkeys"} # type: ignore @distributed_trace def regenerate_access_key( @@ -804,23 +798,21 @@ def regenerate_access_key( "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = key_options request = build_accounts_regenerate_access_key_request( content_type=content_type, json=json, - template_url=self.regenerate_access_key.metadata['url'], + template_url=self.regenerate_access_key.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -841,7 +833,8 @@ def regenerate_access_key( return deserialized - regenerate_access_key.metadata = {'url': '/regeneratekeys'} # type: ignore + regenerate_access_key.metadata = {"url": "/regeneratekeys"} # type: ignore + class CollectionsOperations(object): """CollectionsOperations operations. @@ -899,19 +892,16 @@ def get_collection( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_collections_get_collection_request( collection_name=collection_name, - template_url=self.get_collection.metadata['url'], + template_url=self.get_collection.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -932,8 +922,7 @@ def get_collection( return deserialized - get_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore - + get_collection.metadata = {"url": "/collections/{collectionName}"} # type: ignore @distributed_trace def create_or_update_collection( @@ -996,13 +985,11 @@ def create_or_update_collection( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = collection @@ -1010,10 +997,10 @@ def create_or_update_collection( collection_name=collection_name, content_type=content_type, json=json, - template_url=self.create_or_update_collection.metadata['url'], + template_url=self.create_or_update_collection.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1034,8 +1021,7 @@ def create_or_update_collection( return deserialized - create_or_update_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore - + create_or_update_collection.metadata = {"url": "/collections/{collectionName}"} # type: ignore @distributed_trace def delete_collection( @@ -1052,19 +1038,16 @@ def delete_collection( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_collections_delete_collection_request( collection_name=collection_name, - template_url=self.delete_collection.metadata['url'], + template_url=self.delete_collection.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1078,13 +1061,11 @@ def delete_collection( if cls: return cls(pipeline_response, None, {}) - delete_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore - + delete_collection.metadata = {"url": "/collections/{collectionName}"} # type: ignore @distributed_trace def list_collections( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List the collections in the account. @@ -1124,40 +1105,45 @@ def list_collections( ] } """ - skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + skip_token = kwargs.pop("skip_token", None) # type: Optional[str] + + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) def prepare_request(next_link=None): if not next_link: - + request = build_collections_list_collections_request( skip_token=skip_token, - template_url=self.list_collections.metadata['url'], + template_url=self.list_collections.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_collections_list_collections_request( skip_token=skip_token, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1181,11 +1167,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_collections.metadata = {'url': '/collections'} # type: ignore + list_collections.metadata = {"url": "/collections"} # type: ignore @distributed_trace def list_child_collection_names( @@ -1219,29 +1203,30 @@ def list_child_collection_names( ] } """ - skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + skip_token = kwargs.pop("skip_token", None) # type: Optional[str] + + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) def prepare_request(next_link=None): if not next_link: - + request = build_collections_list_child_collection_names_request( collection_name=collection_name, skip_token=skip_token, - template_url=self.list_child_collection_names.metadata['url'], + template_url=self.list_child_collection_names.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_collections_list_child_collection_names_request( collection_name=collection_name, skip_token=skip_token, @@ -1249,12 +1234,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1278,11 +1267,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_child_collection_names.metadata = {'url': '/collections/{collectionName}/getChildCollectionNames'} # type: ignore + list_child_collection_names.metadata = {"url": "/collections/{collectionName}/getChildCollectionNames"} # type: ignore @distributed_trace def get_collection_path( @@ -1312,19 +1299,16 @@ def get_collection_path( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_collections_get_collection_path_request( collection_name=collection_name, - template_url=self.get_collection_path.metadata['url'], + template_url=self.get_collection_path.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1345,7 +1329,8 @@ def get_collection_path( return deserialized - get_collection_path.metadata = {'url': '/collections/{collectionName}/getCollectionPath'} # type: ignore + get_collection_path.metadata = {"url": "/collections/{collectionName}/getCollectionPath"} # type: ignore + class ResourceSetRulesOperations(object): """ResourceSetRulesOperations operations. @@ -1367,8 +1352,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def get_resource_set_rule( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Any """Get a resource set config service model. @@ -1394,8 +1378,8 @@ def get_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1410,8 +1394,8 @@ def get_resource_set_rule( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1447,7 +1431,7 @@ def get_resource_set_rule( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1463,7 +1447,7 @@ def get_resource_set_rule( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1486,41 +1470,38 @@ def get_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_resource_set_rules_get_resource_set_rule_request( - template_url=self.get_resource_set_rule.metadata['url'], + template_url=self.get_resource_set_rule.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1541,8 +1522,7 @@ def get_resource_set_rule( return deserialized - get_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore - + get_resource_set_rule.metadata = {"url": "/resourceSetRuleConfigs/defaultResourceSetRuleConfig"} # type: ignore @distributed_trace def create_or_update_resource_set_rule( @@ -1576,8 +1556,8 @@ def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1592,8 +1572,8 @@ def create_or_update_resource_set_rule( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1629,7 +1609,7 @@ def create_or_update_resource_set_rule( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1645,7 +1625,7 @@ def create_or_update_resource_set_rule( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1668,23 +1648,23 @@ def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. @@ -1705,8 +1685,8 @@ def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1721,8 +1701,8 @@ def create_or_update_resource_set_rule( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1758,7 +1738,7 @@ def create_or_update_resource_set_rule( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1774,7 +1754,7 @@ def create_or_update_resource_set_rule( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -1797,46 +1777,44 @@ def create_or_update_resource_set_rule( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = resource_set_rule_config request = build_resource_set_rules_create_or_update_resource_set_rule_request( content_type=content_type, json=json, - template_url=self.create_or_update_resource_set_rule.metadata['url'], + template_url=self.create_or_update_resource_set_rule.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1857,13 +1835,11 @@ def create_or_update_resource_set_rule( return deserialized - create_or_update_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore - + create_or_update_resource_set_rule.metadata = {"url": "/resourceSetRuleConfigs/defaultResourceSetRuleConfig"} # type: ignore @distributed_trace def delete_resource_set_rule( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None """Deletes a ResourceSetRuleConfig resource. @@ -1872,18 +1848,15 @@ def delete_resource_set_rule( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_resource_set_rules_delete_resource_set_rule_request( - template_url=self.delete_resource_set_rule.metadata['url'], + template_url=self.delete_resource_set_rule.metadata["url"], ) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1897,13 +1870,11 @@ def delete_resource_set_rule( if cls: return cls(pipeline_response, None, {}) - delete_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore - + delete_resource_set_rule.metadata = {"url": "/resourceSetRuleConfigs/defaultResourceSetRuleConfig"} # type: ignore @distributed_trace def list_resource_set_rules( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """Get a resource set config service model. @@ -1935,8 +1906,8 @@ def list_resource_set_rules( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "complexReplacers": [ @@ -1951,8 +1922,8 @@ def list_resource_set_rules( "typeName": "str" # Optional. The configuration rules for path pattern extraction. } ], - "createdBy": "str", # Required. - "enableDefaultPatterns": bool, # Required. + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "normalizationRules": [ @@ -1988,7 +1959,7 @@ def list_resource_set_rules( "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. "description": "str", # Optional. The configuration rules for path pattern extraction. "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. - "disabled": bool, # Required. + "disabled": bool, # Required. "doNotReplaceRegex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -2004,7 +1975,7 @@ def list_resource_set_rules( }, "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. + "name": "str", # Required. "regex": { "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. @@ -2027,23 +1998,23 @@ def list_resource_set_rules( "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. - "name": "str", # Required. - "path": "str" # Required. + "name": "str", # Required. + "path": "str" # Required. } ], "scopedRules": [ { - "bindingUrl": "str", # Required. + "bindingUrl": "str", # Required. "rules": [ { "displayName": "str", # Optional. The configuration rules for path pattern extraction. "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. "name": "str", # Optional. The configuration rules for path pattern extraction. - "qualifiedName": "str" # Required. + "qualifiedName": "str" # Required. } ], - "storeType": "str" # Required. + "storeType": "str" # Required. } ], "version": 0 # Optional. The configuration rules for path pattern extraction. @@ -2052,40 +2023,45 @@ def list_resource_set_rules( ] } """ - skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + skip_token = kwargs.pop("skip_token", None) # type: Optional[str] + + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) def prepare_request(next_link=None): if not next_link: - + request = build_resource_set_rules_list_resource_set_rules_request( skip_token=skip_token, - template_url=self.list_resource_set_rules.metadata['url'], + template_url=self.list_resource_set_rules.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_resource_set_rules_list_resource_set_rules_request( skip_token=skip_token, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2109,8 +2085,6 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_resource_set_rules.metadata = {'url': '/resourceSetRuleConfigs'} # type: ignore + list_resource_set_rules.metadata = {"url": "/resourceSetRuleConfigs"} # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py index 354f986dae6d..f321d23a1fa2 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['PurviewMetadataPoliciesClient'] +__all__ = ["PurviewMetadataPoliciesClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py index 4e9cf8fe48ec..e49956b46fd3 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = "2021-07-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-administration/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py index c6d5dff382dd..f0172ba15eee 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py @@ -22,6 +22,7 @@ from azure.core.credentials import TokenCredential from azure.core.rest import HttpRequest, HttpResponse + class PurviewMetadataPoliciesClient(object): """PurviewMetadataPoliciesClient. @@ -45,7 +46,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - _endpoint = '{Endpoint}/policyStore' + _endpoint = "{Endpoint}/policyStore" self._config = PurviewMetadataPoliciesClientConfiguration(endpoint, credential, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -55,7 +56,6 @@ def __init__( self.metadata_roles = MetadataRolesOperations(self._client, self._config, self._serialize, self._deserialize) self.metadata_policy = MetadataPolicyOperations(self._client, self._config, self._serialize, self._deserialize) - def send_request( self, request, # type: HttpRequest @@ -81,7 +81,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py index 138f663c53a4..9aad73fc743e 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -14,6 +15,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -21,7 +23,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py index 3afd8b91b730..6d28e3404381 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._purview_metadata_policies_client import PurviewMetadataPoliciesClient -__all__ = ['PurviewMetadataPoliciesClient'] + +__all__ = ["PurviewMetadataPoliciesClient"] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py index c1de758cd465..f6bbee40462c 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py @@ -30,12 +30,7 @@ class PurviewMetadataPoliciesClientConfiguration(Configuration): :type credential: ~azure.core.credentials_async.AsyncTokenCredential """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") if credential is None: @@ -45,22 +40,21 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = "2021-07-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-administration/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py index ff807921b6a8..d8814d1ceee3 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py @@ -22,6 +22,7 @@ from azure.core.credentials_async import AsyncTokenCredential + class PurviewMetadataPoliciesClient: """PurviewMetadataPoliciesClient. @@ -38,13 +39,8 @@ class PurviewMetadataPoliciesClient: :type credential: ~azure.core.credentials_async.AsyncTokenCredential """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/policyStore' + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + _endpoint = "{Endpoint}/policyStore" self._config = PurviewMetadataPoliciesClientConfiguration(endpoint, credential, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -54,12 +50,7 @@ def __init__( self.metadata_roles = MetadataRolesOperations(self._client, self._config, self._serialize, self._deserialize) self.metadata_policy = MetadataPolicyOperations(self._client, self._config, self._serialize, self._deserialize) - - def send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -79,7 +70,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py index 2e16550e3e30..959cbf7bd19f 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py @@ -10,6 +10,6 @@ from ._operations import MetadataPolicyOperations __all__ = [ - 'MetadataRolesOperations', - 'MetadataPolicyOperations', + "MetadataRolesOperations", + "MetadataPolicyOperations", ] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py index dbeb3d8bff36..0f1f906519b1 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py @@ -11,7 +11,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -19,11 +25,17 @@ from azure.core.tracing.decorator_async import distributed_trace_async from ..._vendor import _convert_request -from ...operations._operations import build_metadata_policy_get_request, build_metadata_policy_list_all_request, build_metadata_policy_update_request, build_metadata_roles_list_request - -T = TypeVar('T') +from ...operations._operations import ( + build_metadata_policy_get_request, + build_metadata_policy_list_all_request, + build_metadata_policy_update_request, + build_metadata_roles_list_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class MetadataRolesOperations: """MetadataRolesOperations async operations. @@ -43,10 +55,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace - def list( - self, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list(self, **kwargs: Any) -> AsyncIterable[Any]: """Lists roles for Purview Account. :return: An iterator like instance of JSON object @@ -105,36 +114,41 @@ def list( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_metadata_roles_list_request( - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_metadata_roles_list_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -158,11 +172,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/metadataRoles"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/metadataRoles'} # type: ignore class MetadataPolicyOperations: """MetadataPolicyOperations async operations. @@ -182,12 +196,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace - def list_all( - self, - *, - collection_name: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_all(self, *, collection_name: Optional[str] = None, **kwargs: Any) -> AsyncIterable[Any]: """List or Get metadata policies. :keyword collection_name: The name of an existing collection for which one policy needs to be @@ -263,38 +272,43 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_metadata_policy_list_all_request( collection_name=collection_name, - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_metadata_policy_list_all_request( collection_name=collection_name, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -318,19 +332,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/metadataPolicies'} # type: ignore + list_all.metadata = {"url": "/metadataPolicies"} # type: ignore @distributed_trace_async - async def update( - self, - policy_id: str, - body: Any = None, - **kwargs: Any - ) -> Any: + async def update(self, policy_id: str, body: Any = None, **kwargs: Any) -> Any: """Updates a metadata policy. :param policy_id: Unique policy id. @@ -460,13 +467,11 @@ async def update( "version": 0 # Optional. The version of policy. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -477,14 +482,16 @@ async def update( policy_id=policy_id, content_type=content_type, json=json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -501,15 +508,10 @@ async def update( return deserialized - update.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore - + update.metadata = {"url": "/metadataPolicies/{policyId}"} # type: ignore @distributed_trace_async - async def get( - self, - policy_id: str, - **kwargs: Any - ) -> Any: + async def get(self, policy_id: str, **kwargs: Any) -> Any: """Gets a metadata policy. :param policy_id: Id of an existing policy that needs to be fetched. @@ -579,23 +581,22 @@ async def get( "version": 0 # Optional. The version of policy. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_metadata_policy_get_request( policy_id=policy_id, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,5 +613,4 @@ async def get( return deserialized - get.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore - + get.metadata = {"url": "/metadataPolicies/{policyId}"} # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py index 2e16550e3e30..959cbf7bd19f 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py @@ -10,6 +10,6 @@ from ._operations import MetadataPolicyOperations __all__ = [ - 'MetadataRolesOperations', - 'MetadataPolicyOperations', + "MetadataRolesOperations", + "MetadataPolicyOperations", ] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py index 2b11961f4278..8a8f56f17d86 100644 --- a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py @@ -10,7 +10,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -24,7 +30,7 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() @@ -153,6 +159,7 @@ def build_metadata_policy_get_request( **kwargs ) + # fmt: on class MetadataRolesOperations(object): """MetadataRolesOperations operations. @@ -174,8 +181,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """Lists roles for Purview Account. @@ -236,36 +242,41 @@ def list( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_metadata_roles_list_request( - template_url=self.list.metadata['url'], + template_url=self.list.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_metadata_roles_list_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -289,11 +300,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/metadataRoles"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/metadataRoles'} # type: ignore class MetadataPolicyOperations(object): """MetadataPolicyOperations operations. @@ -314,8 +325,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_all( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List or Get metadata policies. @@ -393,40 +403,45 @@ def list_all( ] } """ - collection_name = kwargs.pop('collection_name', None) # type: Optional[str] + collection_name = kwargs.pop("collection_name", None) # type: Optional[str] + + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) def prepare_request(next_link=None): if not next_link: - + request = build_metadata_policy_list_all_request( collection_name=collection_name, - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_metadata_policy_list_all_request( collection_name=collection_name, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -450,11 +465,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/metadataPolicies'} # type: ignore + list_all.metadata = {"url": "/metadataPolicies"} # type: ignore @distributed_trace def update( @@ -593,13 +606,11 @@ def update( "version": 0 # Optional. The version of policy. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -610,10 +621,10 @@ def update( policy_id=policy_id, content_type=content_type, json=json, - template_url=self.update.metadata['url'], + template_url=self.update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -634,8 +645,7 @@ def update( return deserialized - update.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore - + update.metadata = {"url": "/metadataPolicies/{policyId}"} # type: ignore @distributed_trace def get( @@ -713,19 +723,16 @@ def get( "version": 0 # Optional. The version of policy. } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_metadata_policy_get_request( policy_id=policy_id, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -746,5 +753,4 @@ def get( return deserialized - get.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore - + get.metadata = {"url": "/metadataPolicies/{policyId}"} # type: ignore diff --git a/sdk/purview/azure-purview-administration/setup.py b/sdk/purview/azure-purview-administration/setup.py index 636984c3d021..0fdd8d9d7f57 100644 --- a/sdk/purview/azure-purview-administration/setup.py +++ b/sdk/purview/azure-purview-administration/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,61 +16,62 @@ PACKAGE_PPRINT_NAME = "Azure Purview Administration" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=readme + "\n\n" + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ "Development Status :: 4 - Beta", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.purview', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.purview", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.6", install_requires=[ "azure-core<2.0.0,>=1.23.0", "msrest>=0.6.21", - 'six>=1.11.0', + "six>=1.11.0", ], ) diff --git a/sdk/purview/azure-purview-administration/tests/_aio_testcase.py b/sdk/purview/azure-purview-administration/tests/_aio_testcase.py index c7906e8533aa..3b558fc97279 100644 --- a/sdk/purview/azure-purview-administration/tests/_aio_testcase.py +++ b/sdk/purview/azure-purview-administration/tests/_aio_testcase.py @@ -14,13 +14,11 @@ def event_loop(self): def create_aio_client(self, client, **kwargs): if self.is_live: from azure.identity.aio import DefaultAzureCredential + credential = DefaultAzureCredential() else: credential = Mock(get_token=asyncio.coroutine(lambda _: AccessToken("fake-token", 0))) - return client( - credential=credential, - subscription_id=self.get_settings_value("SUBSCRIPTION_ID") - ) + return client(credential=credential, subscription_id=self.get_settings_value("SUBSCRIPTION_ID")) def to_list(self, ait): async def lst(): diff --git a/sdk/purview/azure-purview-administration/tests/conftest.py b/sdk/purview/azure-purview-administration/tests/conftest.py index 8437d18fddc7..b5536dcaf16d 100644 --- a/sdk/purview/azure-purview-administration/tests/conftest.py +++ b/sdk/purview/azure-purview-administration/tests/conftest.py @@ -30,7 +30,12 @@ from dotenv import load_dotenv -from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer, add_header_regex_sanitizer +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) # Ignore async tests for Python < 3.5 collect_ignore_glob = [] @@ -39,6 +44,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("PURVIEWACCOUNT_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/purview/azure-purview-administration/tests/test_smoke.py b/sdk/purview/azure-purview-administration/tests/test_smoke.py index 3ca36725d5a4..9e954fe0a6d3 100644 --- a/sdk/purview/azure-purview-administration/tests/test_smoke.py +++ b/sdk/purview/azure-purview-administration/tests/test_smoke.py @@ -16,7 +16,7 @@ class TestPurviewAccountSmoke(PurviewAccountTest): def test_basic_smoke_test(self, purviewaccount_endpoint): client = self.create_client(endpoint=purviewaccount_endpoint) response = client.accounts.get_access_keys() - assert set(response.keys()) == set(['atlasKafkaPrimaryEndpoint', 'atlasKafkaSecondaryEndpoint']) + assert set(response.keys()) == set(["atlasKafkaPrimaryEndpoint", "atlasKafkaSecondaryEndpoint"]) @PurviewAccountPowerShellPreparer() @recorded_by_proxy @@ -25,7 +25,9 @@ def test_collections_list(self, purviewaccount_endpoint): response = client.collections.list_collections() result = [item for item in response] for item in result: - assert set(item.keys()) == set(['name', 'friendlyName', 'description', 'systemData', 'collectionProvisioningState']) + assert set(item.keys()) == set( + ["name", "friendlyName", "description", "systemData", "collectionProvisioningState"] + ) class TestPurviewMetaPolicySmoke(PurviewMetaPolicyTest): diff --git a/sdk/purview/azure-purview-administration/tests/test_smoke_async.py b/sdk/purview/azure-purview-administration/tests/test_smoke_async.py index 5bd71b2f36aa..db9c83396ee4 100644 --- a/sdk/purview/azure-purview-administration/tests/test_smoke_async.py +++ b/sdk/purview/azure-purview-administration/tests/test_smoke_async.py @@ -16,7 +16,7 @@ class TestPurviewAccountSmokeAsync(PurviewAccountTestAsync): async def test_basic_smoke_test(self, purviewaccount_endpoint): client = self.create_async_client(endpoint=purviewaccount_endpoint) response = await client.accounts.get_access_keys() - assert set(response.keys()) == set(['atlasKafkaPrimaryEndpoint', 'atlasKafkaSecondaryEndpoint']) + assert set(response.keys()) == set(["atlasKafkaPrimaryEndpoint", "atlasKafkaSecondaryEndpoint"]) @PurviewAccountPowerShellPreparer() @recorded_by_proxy_async @@ -25,7 +25,9 @@ async def test_collections_list(self, purviewaccount_endpoint): response = client.collections.list_collections() result = [item async for item in response] for item in result: - assert set(item.keys()) == set(['name', 'friendlyName', 'description', 'systemData', 'collectionProvisioningState']) + assert set(item.keys()) == set( + ["name", "friendlyName", "description", "systemData", "collectionProvisioningState"] + ) class TestPurviewMetaDataPolicySmokeAsync(PurviewMetaPolicyTestAsync): diff --git a/sdk/purview/azure-purview-administration/tests/testcase.py b/sdk/purview/azure-purview-administration/tests/testcase.py index 2c7ef8150a85..5da5ba7f6ed3 100644 --- a/sdk/purview/azure-purview-administration/tests/testcase.py +++ b/sdk/purview/azure-purview-administration/tests/testcase.py @@ -22,9 +22,7 @@ def create_client(self, endpoint): PurviewAccountPowerShellPreparer = functools.partial( - PowerShellPreparer, - "purviewaccount", - purviewaccount_endpoint="https://fake_account.account.purview.azure.com" + PowerShellPreparer, "purviewaccount", purviewaccount_endpoint="https://fake_account.account.purview.azure.com" ) @@ -40,7 +38,5 @@ def create_client(self, endpoint): PurviewMetaPolicyPowerShellPreparer = functools.partial( - PowerShellPreparer, - "purviewmetapolicy", - purviewmetapolicy_endpoint="https://fake_account.account.purview.azure.com" + PowerShellPreparer, "purviewmetapolicy", purviewmetapolicy_endpoint="https://fake_account.account.purview.azure.com" ) diff --git a/sdk/purview/azure-purview-administration/tests/testcase_async.py b/sdk/purview/azure-purview-administration/tests/testcase_async.py index 6e8c7abab6c5..d8e3a51911f7 100644 --- a/sdk/purview/azure-purview-administration/tests/testcase_async.py +++ b/sdk/purview/azure-purview-administration/tests/testcase_async.py @@ -7,7 +7,9 @@ from _aio_testcase import AzureRecordedAsyncTestCase from devtools_testutils import AzureRecordedTestCase from azure.purview.administration.account.aio import PurviewAccountClient as AsyncPurviewAccountClient -from azure.purview.administration.metadatapolicies.aio import PurviewMetadataPoliciesClient as AsyncPurviewMetadataPoliciesClient +from azure.purview.administration.metadatapolicies.aio import ( + PurviewMetadataPoliciesClient as AsyncPurviewMetadataPoliciesClient, +) class PurviewAccountTestAsync(AzureRecordedTestCase): diff --git a/sdk/purview/azure-purview-catalog/azure/__init__.py b/sdk/purview/azure-purview-catalog/azure/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-catalog/azure/__init__.py +++ b/sdk/purview/azure-purview-catalog/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-catalog/azure/purview/__init__.py b/sdk/purview/azure-purview-catalog/azure/purview/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/__init__.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/__init__.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/__init__.py index 1394d2cccb37..3fe97a37738d 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/__init__.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/__init__.py @@ -17,7 +17,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['PurviewCatalogClient'] + +__all__ = ["PurviewCatalogClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_client.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_client.py index 7c40b465ca5c..76c4e7a2570a 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_client.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_client.py @@ -15,7 +15,15 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import PurviewCatalogClientConfiguration -from .operations import CollectionOperations, DiscoveryOperations, EntityOperations, GlossaryOperations, LineageOperations, RelationshipOperations, TypesOperations +from .operations import ( + CollectionOperations, + DiscoveryOperations, + EntityOperations, + GlossaryOperations, + LineageOperations, + RelationshipOperations, + TypesOperations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -23,7 +31,8 @@ from azure.core.credentials import TokenCredential -class PurviewCatalogClient: # pylint: disable=too-many-instance-attributes + +class PurviewCatalogClient: # pylint: disable=too-many-instance-attributes """Purview Catalog Service is a fully managed cloud service whose users can discover the data sources they need and understand the data sources they find. At the same time, Data Catalog helps organizations get more value from their existing investments. This spec defines REST API @@ -55,13 +64,8 @@ class PurviewCatalogClient: # pylint: disable=too-many-instance-attributes Retry-After header is present. """ - def __init__( - self, - endpoint: str, - credential: "TokenCredential", - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/catalog/api' + def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None: + _endpoint = "{Endpoint}/catalog/api" self._config = PurviewCatalogClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -74,28 +78,13 @@ def __init__( self.glossary = GlossaryOperations( # type: ignore # pylint: disable=abstract-class-instantiated self._client, self._config, self._serialize, self._deserialize ) - self.discovery = DiscoveryOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.lineage = LineageOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.relationship = RelationshipOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.types = TypesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.collection = CollectionOperations( - self._client, self._config, self._serialize, self._deserialize - ) - + self.discovery = DiscoveryOperations(self._client, self._config, self._serialize, self._deserialize) + self.lineage = LineageOperations(self._client, self._config, self._serialize, self._deserialize) + self.relationship = RelationshipOperations(self._client, self._config, self._serialize, self._deserialize) + self.types = TypesOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection = CollectionOperations(self._client, self._config, self._serialize, self._deserialize) - def send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -115,7 +104,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py index 3f4687f4e7b6..b559821efd77 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py @@ -34,14 +34,9 @@ class PurviewCatalogClientConfiguration(Configuration): # pylint: disable=too-m :paramtype api_version: str """ - def __init__( - self, - endpoint: str, - credential: "TokenCredential", - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None: super(PurviewCatalogClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") @@ -51,23 +46,24 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-catalog/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-catalog/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_patch.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_patch.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_vendor.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_vendor.py index e12b61dea670..54f238858ed8 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_vendor.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_vendor.py @@ -6,8 +6,6 @@ # -------------------------------------------------------------------------- - - def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -15,7 +13,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/__init__.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/__init__.py index 27122246f72e..c09cd53d8c0b 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/__init__.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['PurviewCatalogClient'] + +__all__ = ["PurviewCatalogClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_client.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_client.py index 9bc2b060779e..5c76d9a14017 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_client.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_client.py @@ -15,7 +15,15 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from ._configuration import PurviewCatalogClientConfiguration -from .operations import CollectionOperations, DiscoveryOperations, EntityOperations, GlossaryOperations, LineageOperations, RelationshipOperations, TypesOperations +from .operations import ( + CollectionOperations, + DiscoveryOperations, + EntityOperations, + GlossaryOperations, + LineageOperations, + RelationshipOperations, + TypesOperations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -23,7 +31,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class PurviewCatalogClient: # pylint: disable=too-many-instance-attributes + +class PurviewCatalogClient: # pylint: disable=too-many-instance-attributes """Purview Catalog Service is a fully managed cloud service whose users can discover the data sources they need and understand the data sources they find. At the same time, Data Catalog helps organizations get more value from their existing investments. This spec defines REST API @@ -55,13 +64,8 @@ class PurviewCatalogClient: # pylint: disable=too-many-instance-attributes Retry-After header is present. """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/catalog/api' + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + _endpoint = "{Endpoint}/catalog/api" self._config = PurviewCatalogClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -74,28 +78,13 @@ def __init__( self.glossary = GlossaryOperations( # type: ignore # pylint: disable=abstract-class-instantiated self._client, self._config, self._serialize, self._deserialize ) - self.discovery = DiscoveryOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.lineage = LineageOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.relationship = RelationshipOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.types = TypesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.collection = CollectionOperations( - self._client, self._config, self._serialize, self._deserialize - ) - + self.discovery = DiscoveryOperations(self._client, self._config, self._serialize, self._deserialize) + self.lineage = LineageOperations(self._client, self._config, self._serialize, self._deserialize) + self.relationship = RelationshipOperations(self._client, self._config, self._serialize, self._deserialize) + self.types = TypesOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection = CollectionOperations(self._client, self._config, self._serialize, self._deserialize) - def send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -115,7 +104,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py index de8062676b79..1a87c5f1f817 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py @@ -34,14 +34,9 @@ class PurviewCatalogClientConfiguration(Configuration): # pylint: disable=too-m :paramtype api_version: str """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(PurviewCatalogClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") @@ -51,22 +46,21 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-catalog/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-catalog/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_patch.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_patch.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/__init__.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/__init__.py index 43979b856f2d..b4fffa9d3ba5 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/__init__.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/__init__.py @@ -17,14 +17,15 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'EntityOperations', - 'GlossaryOperations', - 'DiscoveryOperations', - 'LineageOperations', - 'RelationshipOperations', - 'TypesOperations', - 'CollectionOperations', + "EntityOperations", + "GlossaryOperations", + "DiscoveryOperations", + "LineageOperations", + "RelationshipOperations", + "TypesOperations", + "CollectionOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_operations.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_operations.py index ca80de699138..ecff9ec51dea 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_operations.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_operations.py @@ -10,7 +10,13 @@ import sys from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -19,15 +25,120 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict -from ...operations._operations import build_collection_create_or_update_bulk_request, build_collection_create_or_update_request, build_collection_move_entities_to_collection_request, build_discovery_auto_complete_request, build_discovery_browse_request, build_discovery_query_request, build_discovery_suggest_request, build_entity_add_classification_request, build_entity_add_classifications_by_unique_attribute_request, build_entity_add_classifications_request, build_entity_add_label_request, build_entity_add_labels_by_unique_attribute_request, build_entity_add_or_update_business_metadata_attributes_request, build_entity_add_or_update_business_metadata_request, build_entity_create_or_update_entities_request, build_entity_create_or_update_request, build_entity_delete_business_metadata_attributes_request, build_entity_delete_business_metadata_request, build_entity_delete_by_guid_request, build_entity_delete_by_guids_request, build_entity_delete_by_unique_attribute_request, build_entity_delete_classification_by_unique_attribute_request, build_entity_delete_classification_request, build_entity_delete_labels_by_unique_attribute_request, build_entity_delete_labels_request, build_entity_get_by_guid_request, build_entity_get_by_unique_attributes_request, build_entity_get_classification_request, build_entity_get_classifications_request, build_entity_get_entities_by_unique_attributes_request, build_entity_get_header_request, build_entity_get_sample_business_metadata_template_request, build_entity_list_by_guids_request, build_entity_partial_update_entity_attribute_by_guid_request, build_entity_partial_update_entity_by_unique_attributes_request, build_entity_set_classifications_request, build_entity_set_labels_by_unique_attribute_request, build_entity_set_labels_request, build_entity_update_classifications_by_unique_attribute_request, build_entity_update_classifications_request, build_glossary_assign_term_to_entities_request, build_glossary_create_glossary_categories_request, build_glossary_create_glossary_category_request, build_glossary_create_glossary_request, build_glossary_create_glossary_term_request, build_glossary_create_glossary_terms_request, build_glossary_delete_glossary_category_request, build_glossary_delete_glossary_request, build_glossary_delete_glossary_term_request, build_glossary_delete_term_assignment_from_entities_request, build_glossary_export_glossary_terms_as_csv_request, build_glossary_get_detailed_glossary_request, build_glossary_get_entities_assigned_with_term_request, build_glossary_get_glossary_category_request, build_glossary_get_glossary_request, build_glossary_get_glossary_term_request, build_glossary_get_import_csv_operation_status_request, build_glossary_list_category_terms_request, build_glossary_list_glossaries_request, build_glossary_list_glossary_categories_headers_request, build_glossary_list_glossary_categories_request, build_glossary_list_glossary_term_headers_request, build_glossary_list_glossary_terms_request, build_glossary_list_related_categories_request, build_glossary_list_related_terms_request, build_glossary_list_terms_by_glossary_name_request, build_glossary_partial_update_glossary_category_request, build_glossary_partial_update_glossary_request, build_glossary_partial_update_glossary_term_request, build_glossary_remove_term_assignment_from_entities_request, build_glossary_update_glossary_category_request, build_glossary_update_glossary_request, build_glossary_update_glossary_term_request, build_lineage_get_lineage_by_unique_attribute_request, build_lineage_get_lineage_graph_request, build_lineage_next_page_lineage_request, build_relationship_create_request, build_relationship_delete_request, build_relationship_get_request, build_relationship_update_request, build_types_create_type_definitions_request, build_types_delete_type_by_name_request, build_types_delete_type_definitions_request, build_types_get_all_type_definitions_request, build_types_get_business_metadata_def_by_guid_request, build_types_get_business_metadata_def_by_name_request, build_types_get_classification_def_by_guid_request, build_types_get_classification_def_by_name_request, build_types_get_entity_definition_by_guid_request, build_types_get_entity_definition_by_name_request, build_types_get_enum_def_by_guid_request, build_types_get_enum_def_by_name_request, build_types_get_relationship_def_by_guid_request, build_types_get_relationship_def_by_name_request, build_types_get_struct_def_by_guid_request, build_types_get_struct_def_by_name_request, build_types_get_term_template_def_by_guid_request, build_types_get_term_template_def_by_name_request, build_types_get_type_definition_by_guid_request, build_types_get_type_definition_by_name_request, build_types_list_type_definition_headers_request, build_types_update_atlas_type_definitions_request +from ...operations._operations import ( + build_collection_create_or_update_bulk_request, + build_collection_create_or_update_request, + build_collection_move_entities_to_collection_request, + build_discovery_auto_complete_request, + build_discovery_browse_request, + build_discovery_query_request, + build_discovery_suggest_request, + build_entity_add_classification_request, + build_entity_add_classifications_by_unique_attribute_request, + build_entity_add_classifications_request, + build_entity_add_label_request, + build_entity_add_labels_by_unique_attribute_request, + build_entity_add_or_update_business_metadata_attributes_request, + build_entity_add_or_update_business_metadata_request, + build_entity_create_or_update_entities_request, + build_entity_create_or_update_request, + build_entity_delete_business_metadata_attributes_request, + build_entity_delete_business_metadata_request, + build_entity_delete_by_guid_request, + build_entity_delete_by_guids_request, + build_entity_delete_by_unique_attribute_request, + build_entity_delete_classification_by_unique_attribute_request, + build_entity_delete_classification_request, + build_entity_delete_labels_by_unique_attribute_request, + build_entity_delete_labels_request, + build_entity_get_by_guid_request, + build_entity_get_by_unique_attributes_request, + build_entity_get_classification_request, + build_entity_get_classifications_request, + build_entity_get_entities_by_unique_attributes_request, + build_entity_get_header_request, + build_entity_get_sample_business_metadata_template_request, + build_entity_list_by_guids_request, + build_entity_partial_update_entity_attribute_by_guid_request, + build_entity_partial_update_entity_by_unique_attributes_request, + build_entity_set_classifications_request, + build_entity_set_labels_by_unique_attribute_request, + build_entity_set_labels_request, + build_entity_update_classifications_by_unique_attribute_request, + build_entity_update_classifications_request, + build_glossary_assign_term_to_entities_request, + build_glossary_create_glossary_categories_request, + build_glossary_create_glossary_category_request, + build_glossary_create_glossary_request, + build_glossary_create_glossary_term_request, + build_glossary_create_glossary_terms_request, + build_glossary_delete_glossary_category_request, + build_glossary_delete_glossary_request, + build_glossary_delete_glossary_term_request, + build_glossary_delete_term_assignment_from_entities_request, + build_glossary_export_glossary_terms_as_csv_request, + build_glossary_get_detailed_glossary_request, + build_glossary_get_entities_assigned_with_term_request, + build_glossary_get_glossary_category_request, + build_glossary_get_glossary_request, + build_glossary_get_glossary_term_request, + build_glossary_get_import_csv_operation_status_request, + build_glossary_list_category_terms_request, + build_glossary_list_glossaries_request, + build_glossary_list_glossary_categories_headers_request, + build_glossary_list_glossary_categories_request, + build_glossary_list_glossary_term_headers_request, + build_glossary_list_glossary_terms_request, + build_glossary_list_related_categories_request, + build_glossary_list_related_terms_request, + build_glossary_list_terms_by_glossary_name_request, + build_glossary_partial_update_glossary_category_request, + build_glossary_partial_update_glossary_request, + build_glossary_partial_update_glossary_term_request, + build_glossary_remove_term_assignment_from_entities_request, + build_glossary_update_glossary_category_request, + build_glossary_update_glossary_request, + build_glossary_update_glossary_term_request, + build_lineage_get_lineage_by_unique_attribute_request, + build_lineage_get_lineage_graph_request, + build_lineage_next_page_lineage_request, + build_relationship_create_request, + build_relationship_delete_request, + build_relationship_get_request, + build_relationship_update_request, + build_types_create_type_definitions_request, + build_types_delete_type_by_name_request, + build_types_delete_type_definitions_request, + build_types_get_all_type_definitions_request, + build_types_get_business_metadata_def_by_guid_request, + build_types_get_business_metadata_def_by_name_request, + build_types_get_classification_def_by_guid_request, + build_types_get_classification_def_by_name_request, + build_types_get_entity_definition_by_guid_request, + build_types_get_entity_definition_by_name_request, + build_types_get_enum_def_by_guid_request, + build_types_get_enum_def_by_name_request, + build_types_get_relationship_def_by_guid_request, + build_types_get_relationship_def_by_name_request, + build_types_get_struct_def_by_guid_request, + build_types_get_struct_def_by_name_request, + build_types_get_term_template_def_by_guid_request, + build_types_get_term_template_def_by_name_request, + build_types_get_type_definition_by_guid_request, + build_types_get_type_definition_by_name_request, + build_types_list_type_definition_headers_request, + build_types_update_atlas_type_definitions_request, +) + if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object -T = TypeVar('T') +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class EntityOperations(abc.ABC): # pylint: disable=too-many-public-methods """ .. warning:: @@ -45,13 +156,8 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def create_or_update( - self, - entity: JSON, - **kwargs: Any - ) -> JSON: + async def create_or_update(self, entity: JSON, **kwargs: Any) -> JSON: """Create or update an entity in Atlas. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -482,16 +588,16 @@ async def create_or_update( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entity @@ -502,14 +608,12 @@ async def create_or_update( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -527,8 +631,6 @@ async def create_or_update( return cast(JSON, deserialized) - - @distributed_trace_async async def list_by_guids( self, @@ -801,17 +903,14 @@ async def list_by_guids( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_list_by_guids_request( guids=guids, min_ext_info=min_ext_info, @@ -821,14 +920,12 @@ async def list_by_guids( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -846,14 +943,8 @@ async def list_by_guids( return cast(JSON, deserialized) - - @distributed_trace_async - async def create_or_update_entities( - self, - entities: JSON, - **kwargs: Any - ) -> JSON: + async def create_or_update_entities(self, entities: JSON, **kwargs: Any) -> JSON: """Create or update entities in Atlas in bulk. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -1298,16 +1389,16 @@ async def create_or_update_entities( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entities @@ -1318,14 +1409,12 @@ async def create_or_update_entities( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1343,15 +1432,8 @@ async def create_or_update_entities( return cast(JSON, deserialized) - - @distributed_trace_async - async def delete_by_guids( - self, - *, - guids: List[str], - **kwargs: Any - ) -> JSON: + async def delete_by_guids(self, *, guids: List[str], **kwargs: Any) -> JSON: """Delete a list of entities in bulk identified by their GUIDs or unique attributes. :keyword guids: An array of GUIDs of entities to delete. @@ -1550,31 +1632,26 @@ async def delete_by_guids( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_delete_by_guids_request( guids=guids, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1592,13 +1669,9 @@ async def delete_by_guids( return cast(JSON, deserialized) - - @distributed_trace_async async def add_classification( # pylint: disable=inconsistent-return-statements - self, - request: JSON, - **kwargs: Any + self, request: JSON, **kwargs: Any ) -> None: """Associate a classification to multiple entities in bulk. @@ -1646,16 +1719,16 @@ async def add_classification( # pylint: disable=inconsistent-return-statements ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = request @@ -1666,14 +1739,12 @@ async def add_classification( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1684,8 +1755,6 @@ async def add_classification( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def get_by_guid( self, @@ -1940,17 +2009,14 @@ async def get_by_guid( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_by_guid_request( guid=guid, min_ext_info=min_ext_info, @@ -1959,14 +2025,12 @@ async def get_by_guid( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1984,17 +2048,8 @@ async def get_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def partial_update_entity_attribute_by_guid( - self, - guid: str, - body: Any, - *, - name: str, - **kwargs: Any - ) -> JSON: + async def partial_update_entity_attribute_by_guid(self, guid: str, body: Any, *, name: str, **kwargs: Any) -> JSON: """Update entity partially - create or update entity attribute identified by its GUID. Supports only primitive attribute type and entity references. It does not support updating complex types like arrays, and maps. @@ -2010,16 +2065,16 @@ async def partial_update_entity_attribute_by_guid( :rtype: JSON :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = body @@ -2032,14 +2087,12 @@ async def partial_update_entity_attribute_by_guid( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2057,14 +2110,8 @@ async def partial_update_entity_attribute_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def delete_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def delete_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Delete an entity identified by its GUID. :param guid: The globally unique identifier of the entity. @@ -2263,31 +2310,26 @@ async def delete_by_guid( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_delete_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2305,15 +2347,8 @@ async def delete_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_classification( - self, - guid: str, - classification_name: str, - **kwargs: Any - ) -> JSON: + async def get_classification(self, guid: str, classification_name: str, **kwargs: Any) -> JSON: """List classifications for a given entity represented by a GUID. :param guid: The globally unique identifier of the entity. @@ -2356,17 +2391,14 @@ async def get_classification( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_classification_request( guid=guid, classification_name=classification_name, @@ -2374,14 +2406,12 @@ async def get_classification( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2399,14 +2429,9 @@ async def get_classification( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_classification( # pylint: disable=inconsistent-return-statements - self, - guid: str, - classification_name: str, - **kwargs: Any + self, guid: str, classification_name: str, **kwargs: Any ) -> None: """Delete a given classification from an existing entity represented by a GUID. @@ -2418,17 +2443,14 @@ async def delete_classification( # pylint: disable=inconsistent-return-statemen :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_entity_delete_classification_request( guid=guid, classification_name=classification_name, @@ -2436,14 +2458,12 @@ async def delete_classification( # pylint: disable=inconsistent-return-statemen params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2454,14 +2474,8 @@ async def delete_classification( # pylint: disable=inconsistent-return-statemen if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async - async def get_classifications( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_classifications(self, guid: str, **kwargs: Any) -> JSON: """List classifications for a given entity represented by a GUID. :param guid: The globally unique identifier of the entity. @@ -2486,31 +2500,26 @@ async def get_classifications( "totalCount": 0.0 # Optional. The total count of items. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_classifications_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2528,14 +2537,9 @@ async def get_classifications( return cast(JSON, deserialized) - - @distributed_trace_async async def add_classifications( # pylint: disable=inconsistent-return-statements - self, - guid: str, - classifications: List[JSON], - **kwargs: Any + self, guid: str, classifications: List[JSON], **kwargs: Any ) -> None: """Add classifications to an existing entity represented by a GUID. @@ -2582,16 +2586,16 @@ async def add_classifications( # pylint: disable=inconsistent-return-statements } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = classifications @@ -2603,14 +2607,12 @@ async def add_classifications( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2621,14 +2623,9 @@ async def add_classifications( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def update_classifications( # pylint: disable=inconsistent-return-statements - self, - guid: str, - classifications: List[JSON], - **kwargs: Any + self, guid: str, classifications: List[JSON], **kwargs: Any ) -> None: """Update classifications to an existing entity represented by a guid. @@ -2675,16 +2672,16 @@ async def update_classifications( # pylint: disable=inconsistent-return-stateme } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = classifications @@ -2696,14 +2693,12 @@ async def update_classifications( # pylint: disable=inconsistent-return-stateme params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -2714,8 +2709,6 @@ async def update_classifications( # pylint: disable=inconsistent-return-stateme if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def get_by_unique_attributes( self, @@ -2979,17 +2972,14 @@ async def get_by_unique_attributes( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_by_unique_attributes_request( type_name=type_name, min_ext_info=min_ext_info, @@ -2999,14 +2989,12 @@ async def get_by_unique_attributes( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3024,8 +3012,6 @@ async def get_by_unique_attributes( return cast(JSON, deserialized) - - @distributed_trace_async async def partial_update_entity_by_unique_attributes( self, @@ -3474,16 +3460,16 @@ async def partial_update_entity_by_unique_attributes( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = atlas_entity_with_ext_info @@ -3496,14 +3482,12 @@ async def partial_update_entity_by_unique_attributes( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3521,15 +3505,9 @@ async def partial_update_entity_by_unique_attributes( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_by_unique_attribute( - self, - type_name: str, - *, - attr_qualified_name: Optional[str] = None, - **kwargs: Any + self, type_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> JSON: """Delete an entity identified by its type and unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the @@ -3737,17 +3715,14 @@ async def delete_by_unique_attribute( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_delete_by_unique_attribute_request( type_name=type_name, attr_qualified_name=attr_qualified_name, @@ -3755,14 +3730,12 @@ async def delete_by_unique_attribute( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3780,16 +3753,9 @@ async def delete_by_unique_attribute( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_classification_by_unique_attribute( # pylint: disable=inconsistent-return-statements - self, - type_name: str, - classification_name: str, - *, - attr_qualified_name: Optional[str] = None, - **kwargs: Any + self, type_name: str, classification_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> None: """Delete a given classification from an entity identified by its type and unique attributes. @@ -3803,17 +3769,14 @@ async def delete_classification_by_unique_attribute( # pylint: disable=inconsis :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_entity_delete_classification_by_unique_attribute_request( type_name=type_name, classification_name=classification_name, @@ -3822,14 +3785,12 @@ async def delete_classification_by_unique_attribute( # pylint: disable=inconsis params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3840,8 +3801,6 @@ async def delete_classification_by_unique_attribute( # pylint: disable=inconsis if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def add_classifications_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -3898,16 +3857,16 @@ async def add_classifications_by_unique_attribute( # pylint: disable=inconsiste } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = atlas_classification_array @@ -3920,14 +3879,12 @@ async def add_classifications_by_unique_attribute( # pylint: disable=inconsiste params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -3938,8 +3895,6 @@ async def add_classifications_by_unique_attribute( # pylint: disable=inconsiste if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def update_classifications_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -3996,16 +3951,16 @@ async def update_classifications_by_unique_attribute( # pylint: disable=inconsi } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = atlas_classification_array @@ -4018,14 +3973,12 @@ async def update_classifications_by_unique_attribute( # pylint: disable=inconsi params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4036,14 +3989,8 @@ async def update_classifications_by_unique_attribute( # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async - async def set_classifications( - self, - entity_headers: JSON, - **kwargs: Any - ) -> List[str]: + async def set_classifications(self, entity_headers: JSON, **kwargs: Any) -> List[str]: """Set classifications on entities in bulk. :param entity_headers: Atlas entity headers. @@ -4151,16 +4098,16 @@ async def set_classifications( "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[str]] _json = entity_headers @@ -4171,14 +4118,12 @@ async def set_classifications( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4196,8 +4141,6 @@ async def set_classifications( return cast(List[str], deserialized) - - @distributed_trace_async async def get_entities_by_unique_attributes( self, @@ -4482,17 +4425,14 @@ async def get_entities_by_unique_attributes( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_entities_by_unique_attributes_request( type_name=type_name, min_ext_info=min_ext_info, @@ -4502,14 +4442,12 @@ async def get_entities_by_unique_attributes( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4527,14 +4465,8 @@ async def get_entities_by_unique_attributes( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_header( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_header(self, guid: str, **kwargs: Any) -> JSON: """Get entity header given its GUID. :param guid: The globally unique identifier of the entity. @@ -4623,31 +4555,26 @@ async def get_header( "typeName": "str" # Optional. The name of the type. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_header_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4665,14 +4592,9 @@ async def get_header( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_business_metadata( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[Dict[str, Any]] = None, - **kwargs: Any + self, guid: str, body: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> None: """Remove business metadata from an entity. @@ -4692,16 +4614,16 @@ async def delete_business_metadata( # pylint: disable=inconsistent-return-state "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -4716,14 +4638,12 @@ async def delete_business_metadata( # pylint: disable=inconsistent-return-state params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4734,16 +4654,9 @@ async def delete_business_metadata( # pylint: disable=inconsistent-return-state if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def add_or_update_business_metadata( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[Dict[str, Any]] = None, - *, - is_overwrite: Optional[bool] = None, - **kwargs: Any + self, guid: str, body: Optional[Dict[str, Any]] = None, *, is_overwrite: Optional[bool] = None, **kwargs: Any ) -> None: """Add business metadata to an entity. @@ -4766,16 +4679,16 @@ async def add_or_update_business_metadata( # pylint: disable=inconsistent-retur "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -4791,14 +4704,12 @@ async def add_or_update_business_metadata( # pylint: disable=inconsistent-retur params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4809,15 +4720,9 @@ async def add_or_update_business_metadata( # pylint: disable=inconsistent-retur if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def delete_business_metadata_attributes( # pylint: disable=inconsistent-return-statements - self, - bm_name: str, - guid: str, - body: Optional[Dict[str, Any]] = None, - **kwargs: Any + self, bm_name: str, guid: str, body: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> None: """Delete business metadata attributes from an entity. @@ -4839,16 +4744,16 @@ async def delete_business_metadata_attributes( # pylint: disable=inconsistent-r "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -4864,14 +4769,12 @@ async def delete_business_metadata_attributes( # pylint: disable=inconsistent-r params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4882,15 +4785,9 @@ async def delete_business_metadata_attributes( # pylint: disable=inconsistent-r if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def add_or_update_business_metadata_attributes( # pylint: disable=inconsistent-return-statements - self, - bm_name: str, - guid: str, - body: Optional[Dict[str, Any]] = None, - **kwargs: Any + self, bm_name: str, guid: str, body: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> None: """Add or update business metadata attributes. @@ -4912,16 +4809,16 @@ async def add_or_update_business_metadata_attributes( # pylint: disable=inconsi "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -4937,14 +4834,12 @@ async def add_or_update_business_metadata_attributes( # pylint: disable=inconsi params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4955,43 +4850,33 @@ async def add_or_update_business_metadata_attributes( # pylint: disable=inconsi if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async - async def get_sample_business_metadata_template( - self, - **kwargs: Any - ) -> IO: + async def get_sample_business_metadata_template(self, **kwargs: Any) -> IO: """Get the sample Template for uploading/creating bulk BusinessMetaData. :return: IO :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop("cls", None) # type: ClsType[IO] - request = build_entity_get_sample_business_metadata_template_request( headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=True, - **kwargs + request, stream=True, **kwargs ) response = pipeline_response.http_response @@ -5006,27 +4891,17 @@ async def get_sample_business_metadata_template( return cast(IO, deserialized) - - @distributed_trace_async @abc.abstractmethod - async def import_business_metadata( - self, - *args, - **kwargs - ) -> JSON: + async def import_business_metadata(self, *args, **kwargs) -> JSON: """You need to write a custom operation for "import_business_metadata". Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize. """ - @distributed_trace_async async def delete_labels( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[List[str]] = None, - **kwargs: Any + self, guid: str, body: Optional[List[str]] = None, **kwargs: Any ) -> None: """delete given labels to a given entity. @@ -5046,16 +4921,16 @@ async def delete_labels( # pylint: disable=inconsistent-return-statements "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -5070,14 +4945,12 @@ async def delete_labels( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5088,14 +4961,9 @@ async def delete_labels( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def set_labels( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[List[str]] = None, - **kwargs: Any + self, guid: str, body: Optional[List[str]] = None, **kwargs: Any ) -> None: """Set labels to a given entity. @@ -5115,16 +4983,16 @@ async def set_labels( # pylint: disable=inconsistent-return-statements "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -5139,14 +5007,12 @@ async def set_labels( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5157,14 +5023,9 @@ async def set_labels( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def add_label( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[List[str]] = None, - **kwargs: Any + self, guid: str, body: Optional[List[str]] = None, **kwargs: Any ) -> None: """add given labels to a given entity. @@ -5184,16 +5045,16 @@ async def add_label( # pylint: disable=inconsistent-return-statements "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -5208,14 +5069,12 @@ async def add_label( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5226,8 +5085,6 @@ async def add_label( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -5263,16 +5120,16 @@ async def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-ret "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -5288,14 +5145,12 @@ async def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-ret params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5306,8 +5161,6 @@ async def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-ret if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -5342,16 +5195,16 @@ async def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -5367,14 +5220,12 @@ async def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5385,8 +5236,6 @@ async def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -5421,16 +5270,16 @@ async def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -5446,14 +5295,12 @@ async def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5482,7 +5329,6 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async async def list_glossaries( self, @@ -5593,17 +5439,14 @@ async def list_glossaries( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossaries_request( limit=limit, offset=offset, @@ -5613,14 +5456,12 @@ async def list_glossaries( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5638,14 +5479,8 @@ async def list_glossaries( return cast(List[JSON], deserialized) - - @distributed_trace_async - async def create_glossary( - self, - atlas_glossary: JSON, - **kwargs: Any - ) -> JSON: + async def create_glossary(self, atlas_glossary: JSON, **kwargs: Any) -> JSON: """Create a glossary. :param atlas_glossary: Glossary definition, terms & categories can be anchored to a glossary. @@ -5804,16 +5639,16 @@ async def create_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = atlas_glossary @@ -5824,14 +5659,12 @@ async def create_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5849,14 +5682,8 @@ async def create_glossary( return cast(JSON, deserialized) - - @distributed_trace_async - async def create_glossary_categories( - self, - glossary_category: List[JSON], - **kwargs: Any - ) -> List[JSON]: + async def create_glossary_categories(self, glossary_category: List[JSON], **kwargs: Any) -> List[JSON]: """Create glossary category in bulk. :param glossary_category: An array of glossary category definitions to be created. @@ -6060,16 +5887,16 @@ async def create_glossary_categories( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] _json = glossary_category @@ -6080,14 +5907,12 @@ async def create_glossary_categories( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6105,14 +5930,8 @@ async def create_glossary_categories( return cast(List[JSON], deserialized) - - @distributed_trace_async - async def create_glossary_category( - self, - glossary_category: JSON, - **kwargs: Any - ) -> JSON: + async def create_glossary_category(self, glossary_category: JSON, **kwargs: Any) -> JSON: """Create a glossary category. :param glossary_category: The glossary category definition. A category must be anchored to a @@ -6297,16 +6116,16 @@ async def create_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_category @@ -6317,14 +6136,12 @@ async def create_glossary_category( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6342,14 +6159,8 @@ async def create_glossary_category( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_glossary_category( - self, - category_guid: str, - **kwargs: Any - ) -> JSON: + async def get_glossary_category(self, category_guid: str, **kwargs: Any) -> JSON: """Get specific glossary category by its GUID. :param category_guid: The globally unique identifier of the category. @@ -6446,31 +6257,26 @@ async def get_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_glossary_category_request( category_guid=category_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6488,15 +6294,8 @@ async def get_glossary_category( return cast(JSON, deserialized) - - @distributed_trace_async - async def update_glossary_category( - self, - category_guid: str, - glossary_category: JSON, - **kwargs: Any - ) -> JSON: + async def update_glossary_category(self, category_guid: str, glossary_category: JSON, **kwargs: Any) -> JSON: """Update the given glossary category by its GUID. :param category_guid: The globally unique identifier of the category. @@ -6680,16 +6479,16 @@ async def update_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_category @@ -6701,14 +6500,12 @@ async def update_glossary_category( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6726,13 +6523,9 @@ async def update_glossary_category( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_glossary_category( # pylint: disable=inconsistent-return-statements - self, - category_guid: str, - **kwargs: Any + self, category_guid: str, **kwargs: Any ) -> None: """Delete a glossary category. @@ -6742,31 +6535,26 @@ async def delete_glossary_category( # pylint: disable=inconsistent-return-state :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_glossary_delete_glossary_category_request( category_guid=category_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6777,14 +6565,9 @@ async def delete_glossary_category( # pylint: disable=inconsistent-return-state if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def partial_update_glossary_category( - self, - category_guid: str, - partial_updates: Dict[str, str], - **kwargs: Any + self, category_guid: str, partial_updates: Dict[str, str], **kwargs: Any ) -> JSON: """Update the glossary category partially. @@ -6890,16 +6673,16 @@ async def partial_update_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = partial_updates @@ -6911,14 +6694,12 @@ async def partial_update_glossary_category( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6936,8 +6717,6 @@ async def partial_update_glossary_category( return cast(JSON, deserialized) - - @distributed_trace_async async def list_related_categories( self, @@ -6982,17 +6761,14 @@ async def list_related_categories( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, List[JSON]]] + cls = kwargs.pop("cls", None) # type: ClsType[Dict[str, List[JSON]]] - request = build_glossary_list_related_categories_request( category_guid=category_guid, limit=limit, @@ -7002,14 +6778,12 @@ async def list_related_categories( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7027,8 +6801,6 @@ async def list_related_categories( return cast(Dict[str, List[JSON]], deserialized) - - @distributed_trace_async async def list_category_terms( self, @@ -7072,17 +6844,14 @@ async def list_category_terms( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_category_terms_request( category_guid=category_guid, limit=limit, @@ -7092,14 +6861,12 @@ async def list_category_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7117,15 +6884,9 @@ async def list_category_terms( return cast(List[JSON], deserialized) - - @distributed_trace_async async def create_glossary_term( - self, - glossary_term: JSON, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_term: JSON, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: """Create a glossary term. @@ -7810,16 +7571,16 @@ async def create_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_term @@ -7831,14 +7592,12 @@ async def create_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7856,8 +7615,6 @@ async def create_glossary_term( return cast(JSON, deserialized) - - @distributed_trace_async async def get_glossary_term( self, @@ -8217,17 +7974,14 @@ async def get_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_glossary_term_request( term_guid=term_guid, include_term_hierarchy=include_term_hierarchy, @@ -8236,14 +7990,12 @@ async def get_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8261,16 +8013,9 @@ async def get_glossary_term( return cast(JSON, deserialized) - - @distributed_trace_async async def update_glossary_term( - self, - term_guid: str, - glossary_term: JSON, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, term_guid: str, glossary_term: JSON, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: """Update the given glossary term by its GUID. @@ -8955,16 +8700,16 @@ async def update_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_term @@ -8977,14 +8722,12 @@ async def update_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9002,13 +8745,9 @@ async def update_glossary_term( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_glossary_term( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - **kwargs: Any + self, term_guid: str, **kwargs: Any ) -> None: """Delete a glossary term. @@ -9018,31 +8757,26 @@ async def delete_glossary_term( # pylint: disable=inconsistent-return-statement :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_glossary_delete_glossary_term_request( term_guid=term_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9053,8 +8787,6 @@ async def delete_glossary_term( # pylint: disable=inconsistent-return-statement if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def partial_update_glossary_term( self, @@ -9419,16 +9151,16 @@ async def partial_update_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = partial_updates @@ -9441,14 +9173,12 @@ async def partial_update_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9466,15 +9196,9 @@ async def partial_update_glossary_term( return cast(JSON, deserialized) - - @distributed_trace_async async def create_glossary_terms( - self, - glossary_term: List[JSON], - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_term: List[JSON], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> List[JSON]: """Create glossary terms in bulk. @@ -10231,16 +9955,16 @@ async def create_glossary_terms( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] _json = glossary_term @@ -10252,14 +9976,12 @@ async def create_glossary_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10277,8 +9999,6 @@ async def create_glossary_terms( return cast(List[JSON], deserialized) - - @distributed_trace_async async def get_entities_assigned_with_term( self, @@ -10333,17 +10053,14 @@ async def get_entities_assigned_with_term( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_get_entities_assigned_with_term_request( term_guid=term_guid, limit=limit, @@ -10353,14 +10070,12 @@ async def get_entities_assigned_with_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10378,14 +10093,9 @@ async def get_entities_assigned_with_term( return cast(List[JSON], deserialized) - - @distributed_trace_async async def assign_term_to_entities( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - related_object_ids: List[JSON], - **kwargs: Any + self, term_guid: str, related_object_ids: List[JSON], **kwargs: Any ) -> None: """Assign the given term to the provided list of related objects. @@ -10428,16 +10138,16 @@ async def assign_term_to_entities( # pylint: disable=inconsistent-return-statem } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = related_object_ids @@ -10449,14 +10159,12 @@ async def assign_term_to_entities( # pylint: disable=inconsistent-return-statem params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10467,14 +10175,9 @@ async def assign_term_to_entities( # pylint: disable=inconsistent-return-statem if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def remove_term_assignment_from_entities( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - related_object_ids: List[JSON], - **kwargs: Any + self, term_guid: str, related_object_ids: List[JSON], **kwargs: Any ) -> None: """Delete the term assignment for the given list of related objects. @@ -10517,16 +10220,16 @@ async def remove_term_assignment_from_entities( # pylint: disable=inconsistent- } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = related_object_ids @@ -10538,14 +10241,12 @@ async def remove_term_assignment_from_entities( # pylint: disable=inconsistent- params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10556,14 +10257,9 @@ async def remove_term_assignment_from_entities( # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def delete_term_assignment_from_entities( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - related_object_ids: List[JSON], - **kwargs: Any + self, term_guid: str, related_object_ids: List[JSON], **kwargs: Any ) -> None: """Delete the term assignment for the given list of related objects. @@ -10606,16 +10302,16 @@ async def delete_term_assignment_from_entities( # pylint: disable=inconsistent- } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = related_object_ids @@ -10627,14 +10323,12 @@ async def delete_term_assignment_from_entities( # pylint: disable=inconsistent- params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10645,8 +10339,6 @@ async def delete_term_assignment_from_entities( # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def list_related_terms( self, @@ -10695,17 +10387,14 @@ async def list_related_terms( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, List[JSON]]] + cls = kwargs.pop("cls", None) # type: ClsType[Dict[str, List[JSON]]] - request = build_glossary_list_related_terms_request( term_guid=term_guid, limit=limit, @@ -10715,14 +10404,12 @@ async def list_related_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10740,14 +10427,8 @@ async def list_related_terms( return cast(Dict[str, List[JSON]], deserialized) - - @distributed_trace_async - async def get_glossary( - self, - glossary_guid: str, - **kwargs: Any - ) -> JSON: + async def get_glossary(self, glossary_guid: str, **kwargs: Any) -> JSON: """Get a specific Glossary by its GUID. :param glossary_guid: The globally unique identifier for glossary. @@ -10832,31 +10513,26 @@ async def get_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_glossary_request( glossary_guid=glossary_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10874,15 +10550,8 @@ async def get_glossary( return cast(JSON, deserialized) - - @distributed_trace_async - async def update_glossary( - self, - glossary_guid: str, - updated_glossary: JSON, - **kwargs: Any - ) -> JSON: + async def update_glossary(self, glossary_guid: str, updated_glossary: JSON, **kwargs: Any) -> JSON: """Update the given glossary. :param glossary_guid: The globally unique identifier for glossary. @@ -11042,16 +10711,16 @@ async def update_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = updated_glossary @@ -11063,14 +10732,12 @@ async def update_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -11088,13 +10755,9 @@ async def update_glossary( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_glossary( # pylint: disable=inconsistent-return-statements - self, - glossary_guid: str, - **kwargs: Any + self, glossary_guid: str, **kwargs: Any ) -> None: """Delete a glossary. @@ -11104,31 +10767,26 @@ async def delete_glossary( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_glossary_delete_glossary_request( glossary_guid=glossary_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -11139,8 +10797,6 @@ async def delete_glossary( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def list_glossary_categories( self, @@ -11264,17 +10920,14 @@ async def list_glossary_categories( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_categories_request( glossary_guid=glossary_guid, limit=limit, @@ -11284,14 +10937,12 @@ async def list_glossary_categories( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -11309,8 +10960,6 @@ async def list_glossary_categories( return cast(List[JSON], deserialized) - - @distributed_trace_async async def list_glossary_categories_headers( self, @@ -11351,17 +11000,14 @@ async def list_glossary_categories_headers( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_categories_headers_request( glossary_guid=glossary_guid, limit=limit, @@ -11371,14 +11017,12 @@ async def list_glossary_categories_headers( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -11396,15 +11040,9 @@ async def list_glossary_categories_headers( return cast(List[JSON], deserialized) - - @distributed_trace_async - async def get_detailed_glossary( - self, - glossary_guid: str, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + async def get_detailed_glossary( + self, glossary_guid: str, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: """Get a specific glossary with detailed information. @@ -12019,17 +11657,14 @@ async def get_detailed_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_detailed_glossary_request( glossary_guid=glossary_guid, include_term_hierarchy=include_term_hierarchy, @@ -12037,14 +11672,12 @@ async def get_detailed_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12062,8 +11695,6 @@ async def get_detailed_glossary( return cast(JSON, deserialized) - - @distributed_trace_async async def partial_update_glossary( self, @@ -12168,16 +11799,16 @@ async def partial_update_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = partial_updates @@ -12190,14 +11821,12 @@ async def partial_update_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12215,8 +11844,6 @@ async def partial_update_glossary( return cast(JSON, deserialized) - - @distributed_trace_async async def list_glossary_terms( self, @@ -12618,17 +12245,14 @@ async def list_glossary_terms( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_terms_request( glossary_guid=glossary_guid, include_term_hierarchy=include_term_hierarchy, @@ -12639,14 +12263,12 @@ async def list_glossary_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12664,8 +12286,6 @@ async def list_glossary_terms( return cast(List[JSON], deserialized) - - @distributed_trace_async async def list_glossary_term_headers( self, @@ -12709,17 +12329,14 @@ async def list_glossary_term_headers( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_term_headers_request( glossary_guid=glossary_guid, limit=limit, @@ -12729,14 +12346,12 @@ async def list_glossary_term_headers( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12754,29 +12369,19 @@ async def list_glossary_term_headers( return cast(List[JSON], deserialized) - - async def _import_glossary_terms_via_csv_initial( - self, - glossary_guid: str, - file: IO, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_guid: str, file: IO, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_import_glossary_terms_via_csv_request_initial( glossary_guid=glossary_guid, api_version=api_version, @@ -12786,14 +12391,12 @@ async def _import_glossary_terms_via_csv_initial( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12811,42 +12414,27 @@ async def _import_glossary_terms_via_csv_initial( return cast(JSON, deserialized) - - @distributed_trace_async @abc.abstractmethod - async def begin_import_glossary_terms_via_csv( - self, - *args, - **kwargs - ) -> AsyncLROPoller[JSON]: + async def begin_import_glossary_terms_via_csv(self, *args, **kwargs) -> AsyncLROPoller[JSON]: """You need to write a custom operation for "begin_import_glossary_terms_via_csv". Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize. """ - async def _import_glossary_terms_via_csv_by_glossary_name_initial( - self, - glossary_name: str, - file: IO, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_name: str, file: IO, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial( glossary_name=glossary_name, api_version=api_version, @@ -12856,14 +12444,12 @@ async def _import_glossary_terms_via_csv_by_glossary_name_initial( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12881,28 +12467,17 @@ async def _import_glossary_terms_via_csv_by_glossary_name_initial( return cast(JSON, deserialized) - - @distributed_trace_async @abc.abstractmethod - async def begin_import_glossary_terms_via_csv_by_glossary_name( - self, - *args, - **kwargs - ) -> AsyncLROPoller[JSON]: + async def begin_import_glossary_terms_via_csv_by_glossary_name(self, *args, **kwargs) -> AsyncLROPoller[JSON]: """You need to write a custom operation for "begin_import_glossary_terms_via_csv_by_glossary_name". Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize. """ - @distributed_trace_async - async def get_import_csv_operation_status( - self, - operation_guid: str, - **kwargs: Any - ) -> JSON: + async def get_import_csv_operation_status(self, operation_guid: str, **kwargs: Any) -> JSON: """Get the status of import csv operation. :param operation_guid: The globally unique identifier for async operation/job. @@ -12935,18 +12510,15 @@ async def get_import_csv_operation_status( Known values are: "NotStarted", "Succeeded", "Failed", "Running". } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_import_csv_operation_status_request( operation_guid=operation_guid, api_version=api_version, @@ -12954,14 +12526,12 @@ async def get_import_csv_operation_status( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12979,8 +12549,6 @@ async def get_import_csv_operation_status( return cast(JSON, deserialized) - - @distributed_trace_async async def export_glossary_terms_as_csv( self, @@ -13010,17 +12578,17 @@ async def export_glossary_terms_as_csv( "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[IO] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[IO] _json = term_guids @@ -13034,14 +12602,12 @@ async def export_glossary_terms_as_csv( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13059,8 +12625,6 @@ async def export_glossary_terms_as_csv( return cast(IO, deserialized) - - @distributed_trace_async async def list_terms_by_glossary_name( self, @@ -13459,18 +13023,15 @@ async def list_terms_by_glossary_name( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_terms_by_glossary_name_request( glossary_name=glossary_name, api_version=api_version, @@ -13481,14 +13042,12 @@ async def list_terms_by_glossary_name( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13524,13 +13083,8 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def query( - self, - search_request: JSON, - **kwargs: Any - ) -> JSON: + async def query(self, search_request: JSON, **kwargs: Any) -> JSON: """Gets data using search. :param search_request: An object specifying the search criteria. @@ -13715,17 +13269,17 @@ async def query( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = search_request @@ -13737,14 +13291,12 @@ async def query( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13762,14 +13314,8 @@ async def query( return cast(JSON, deserialized) - - @distributed_trace_async - async def suggest( - self, - suggest_request: JSON, - **kwargs: Any - ) -> JSON: + async def suggest(self, suggest_request: JSON, **kwargs: Any) -> JSON: """Get search suggestions by query criteria. :param suggest_request: An object specifying the suggest criteria. @@ -13846,17 +13392,17 @@ async def suggest( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = suggest_request @@ -13868,14 +13414,12 @@ async def suggest( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13893,14 +13437,8 @@ async def suggest( return cast(JSON, deserialized) - - @distributed_trace_async - async def browse( - self, - browse_request: JSON, - **kwargs: Any - ) -> JSON: + async def browse(self, browse_request: JSON, **kwargs: Any) -> JSON: """Browse entities by path or entity type. :param browse_request: An object specifying the browse criteria. @@ -13952,17 +13490,17 @@ async def browse( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = browse_request @@ -13974,14 +13512,12 @@ async def browse( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13999,14 +13535,8 @@ async def browse( return cast(JSON, deserialized) - - @distributed_trace_async - async def auto_complete( - self, - auto_complete_request: JSON, - **kwargs: Any - ) -> JSON: + async def auto_complete(self, auto_complete_request: JSON, **kwargs: Any) -> JSON: """Get auto complete options. :param auto_complete_request: An object specifying the autocomplete criteria. @@ -14039,17 +13569,17 @@ async def auto_complete( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = auto_complete_request @@ -14061,14 +13591,12 @@ async def auto_complete( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14104,7 +13632,6 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async async def get_lineage_graph( self, @@ -14264,17 +13791,14 @@ async def get_lineage_graph( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_lineage_get_lineage_graph_request( guid=guid, direction=direction, @@ -14286,14 +13810,12 @@ async def get_lineage_graph( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14311,8 +13833,6 @@ async def get_lineage_graph( return cast(JSON, deserialized) - - @distributed_trace_async async def next_page_lineage( self, @@ -14468,18 +13988,15 @@ async def next_page_lineage( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_lineage_next_page_lineage_request( guid=guid, api_version=api_version, @@ -14491,14 +14008,12 @@ async def next_page_lineage( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14516,8 +14031,6 @@ async def next_page_lineage( return cast(JSON, deserialized) - - @distributed_trace_async async def get_lineage_by_unique_attribute( self, @@ -14684,17 +14197,14 @@ async def get_lineage_by_unique_attribute( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_lineage_get_lineage_by_unique_attribute_request( type_name=type_name, direction=direction, @@ -14706,14 +14216,12 @@ async def get_lineage_by_unique_attribute( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14749,13 +14257,8 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def create( - self, - relationship: JSON, - **kwargs: Any - ) -> JSON: + async def create(self, relationship: JSON, **kwargs: Any) -> JSON: """Create a new relationship between entities. :param relationship: The AtlasRelationship object containing the information for the @@ -14838,16 +14341,16 @@ async def create( "version": 0.0 # Optional. The version of the relationship. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = relationship @@ -14858,14 +14361,12 @@ async def create( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14883,14 +14384,8 @@ async def create( return cast(JSON, deserialized) - - @distributed_trace_async - async def update( - self, - relationship: JSON, - **kwargs: Any - ) -> JSON: + async def update(self, relationship: JSON, **kwargs: Any) -> JSON: """Update an existing relationship between entities. :param relationship: The AtlasRelationship object containing the information for the @@ -14973,16 +14468,16 @@ async def update( "version": 0.0 # Optional. The version of the relationship. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = relationship @@ -14993,14 +14488,12 @@ async def update( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15018,16 +14511,8 @@ async def update( return cast(JSON, deserialized) - - @distributed_trace_async - async def get( - self, - guid: str, - *, - extended_info: Optional[bool] = None, - **kwargs: Any - ) -> JSON: + async def get(self, guid: str, *, extended_info: Optional[bool] = None, **kwargs: Any) -> JSON: """Get relationship information between entities by its GUID. :param guid: The globally unique identifier of the relationship. @@ -15167,17 +14652,14 @@ async def get( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_relationship_get_request( guid=guid, extended_info=extended_info, @@ -15185,14 +14667,12 @@ async def get( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15210,14 +14690,8 @@ async def get( return cast(JSON, deserialized) - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - guid: str, - **kwargs: Any - ) -> None: + async def delete(self, guid: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """Delete a relationship between entities by its GUID. :param guid: The globally unique identifier of the relationship. @@ -15226,31 +14700,26 @@ async def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_relationship_delete_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15279,13 +14748,8 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def get_business_metadata_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_business_metadata_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the businessMetadata definition for the given guid. :param guid: businessMetadata guid. @@ -15405,31 +14869,26 @@ async def get_business_metadata_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_business_metadata_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15447,14 +14906,8 @@ async def get_business_metadata_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_business_metadata_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_business_metadata_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the businessMetadata definition by it's name (unique). :param name: businessMetadata name. @@ -15574,31 +15027,26 @@ async def get_business_metadata_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_business_metadata_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15616,14 +15064,8 @@ async def get_business_metadata_def_by_name( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_classification_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_classification_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the classification definition for the given GUID. :param guid: The globally unique identifier of the classification. @@ -15764,31 +15206,26 @@ async def get_classification_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_classification_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15806,14 +15243,8 @@ async def get_classification_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_classification_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_classification_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the classification definition by its name (unique). :param name: The name of the classification. @@ -15954,31 +15385,26 @@ async def get_classification_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_classification_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15996,14 +15422,8 @@ async def get_classification_def_by_name( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_entity_definition_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_entity_definition_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the Entity definition for the given GUID. :param guid: The globally unique identifier of the entity. @@ -16170,31 +15590,26 @@ async def get_entity_definition_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_entity_definition_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16212,14 +15627,8 @@ async def get_entity_definition_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_entity_definition_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_entity_definition_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the entity definition by its name (unique). :param name: The name of the entity. @@ -16386,31 +15795,26 @@ async def get_entity_definition_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_entity_definition_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16428,14 +15832,8 @@ async def get_entity_definition_by_name( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_enum_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_enum_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the enum definition for the given GUID. :param guid: The globally unique identifier of the enum. @@ -16529,31 +15927,26 @@ async def get_enum_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_enum_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16571,14 +15964,8 @@ async def get_enum_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_enum_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_enum_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the enum definition by its name (unique). :param name: The name of the enum. @@ -16672,31 +16059,26 @@ async def get_enum_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_enum_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16714,14 +16096,8 @@ async def get_enum_def_by_name( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_relationship_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_relationship_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the relationship definition for the given GUID. :param guid: The globally unique identifier of the relationship. @@ -16875,31 +16251,26 @@ async def get_relationship_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_relationship_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16917,14 +16288,8 @@ async def get_relationship_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_relationship_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_relationship_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the relationship definition by its name (unique). :param name: The name of the relationship. @@ -17078,31 +16443,26 @@ async def get_relationship_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_relationship_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17120,14 +16480,8 @@ async def get_relationship_def_by_name( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_struct_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_struct_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the struct definition for the given GUID. :param guid: The globally unique identifier of the struct. @@ -17247,31 +16601,26 @@ async def get_struct_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_struct_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17289,14 +16638,8 @@ async def get_struct_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_struct_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_struct_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the struct definition by its name (unique). :param name: The name of the struct. @@ -17416,31 +16759,26 @@ async def get_struct_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_struct_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17458,14 +16796,8 @@ async def get_struct_def_by_name( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_type_definition_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_type_definition_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the type definition for the given GUID. :param guid: The globally unique identifier of the type. @@ -17692,31 +17024,26 @@ async def get_type_definition_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_type_definition_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17734,14 +17061,8 @@ async def get_type_definition_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_type_definition_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_type_definition_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the type definition by its name (unique). :param name: The name of the type. @@ -17968,31 +17289,26 @@ async def get_type_definition_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_type_definition_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18010,13 +17326,9 @@ async def get_type_definition_by_name( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_type_by_name( # pylint: disable=inconsistent-return-statements - self, - name: str, - **kwargs: Any + self, name: str, **kwargs: Any ) -> None: """Delete API for type identified by its name. @@ -18026,31 +17338,26 @@ async def delete_type_by_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_types_delete_type_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18061,15 +17368,9 @@ async def delete_type_by_name( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def get_all_type_definitions( - self, - *, - include_term_template: Optional[bool] = False, - type: Optional[str] = None, - **kwargs: Any + self, *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> JSON: """Get all type definitions in Atlas in bulk. @@ -19051,17 +18352,14 @@ async def get_all_type_definitions( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_all_type_definitions_request( include_term_template=include_term_template, type=type, @@ -19069,14 +18367,12 @@ async def get_all_type_definitions( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -19094,14 +18390,8 @@ async def get_all_type_definitions( return cast(JSON, deserialized) - - @distributed_trace_async - async def create_type_definitions( - self, - types_def: JSON, - **kwargs: Any - ) -> JSON: + async def create_type_definitions(self, types_def: JSON, **kwargs: Any) -> JSON: """Create all atlas type definitions in bulk, only new definitions will be created. Any changes to the existing definitions will be discarded. @@ -21042,16 +20332,16 @@ async def create_type_definitions( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = types_def @@ -21062,14 +20352,12 @@ async def create_type_definitions( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -21087,14 +20375,8 @@ async def create_type_definitions( return cast(JSON, deserialized) - - @distributed_trace_async - async def update_atlas_type_definitions( - self, - types_def: JSON, - **kwargs: Any - ) -> JSON: + async def update_atlas_type_definitions(self, types_def: JSON, **kwargs: Any) -> JSON: """Update all types in bulk, changes detected in the type definitions would be persisted. :param types_def: A composite object that captures all type definition changes. @@ -23034,16 +22316,16 @@ async def update_atlas_type_definitions( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = types_def @@ -23054,14 +22336,12 @@ async def update_atlas_type_definitions( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -23079,13 +22359,9 @@ async def update_atlas_type_definitions( return cast(JSON, deserialized) - - @distributed_trace_async async def delete_type_definitions( # pylint: disable=inconsistent-return-statements - self, - types_def: JSON, - **kwargs: Any + self, types_def: JSON, **kwargs: Any ) -> None: """Delete API for all types in bulk. @@ -24062,16 +23338,16 @@ async def delete_type_definitions( # pylint: disable=inconsistent-return-statem ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = types_def @@ -24082,14 +23358,12 @@ async def delete_type_definitions( # pylint: disable=inconsistent-return-statem params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -24100,15 +23374,9 @@ async def delete_type_definitions( # pylint: disable=inconsistent-return-statem if cls: return cls(pipeline_response, None, {}) - - @distributed_trace_async async def list_type_definition_headers( - self, - *, - include_term_template: Optional[bool] = False, - type: Optional[str] = None, - **kwargs: Any + self, *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> List[JSON]: """List all type definitions returned as a list of minimal information header. @@ -24137,17 +23405,14 @@ async def list_type_definition_headers( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_types_list_type_definition_headers_request( include_term_template=include_term_template, type=type, @@ -24155,14 +23420,12 @@ async def list_type_definition_headers( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -24180,14 +23443,8 @@ async def list_type_definition_headers( return cast(List[JSON], deserialized) - - @distributed_trace_async - async def get_term_template_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + async def get_term_template_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the term template definition for the given GUID. :param guid: The globally unique identifier of the term template. @@ -24307,18 +23564,15 @@ async def get_term_template_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_term_template_def_by_guid_request( guid=guid, api_version=api_version, @@ -24326,14 +23580,12 @@ async def get_term_template_def_by_guid( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -24351,14 +23603,8 @@ async def get_term_template_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace_async - async def get_term_template_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + async def get_term_template_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the term template definition by its name (unique). :param name: The name of the term template. @@ -24478,18 +23724,15 @@ async def get_term_template_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_term_template_def_by_name_request( name=name, api_version=api_version, @@ -24497,14 +23740,12 @@ async def get_term_template_def_by_name( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -24540,14 +23781,8 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - async def create_or_update( - self, - collection: str, - entity: JSON, - **kwargs: Any - ) -> JSON: + async def create_or_update(self, collection: str, entity: JSON, **kwargs: Any) -> JSON: """Creates or updates an entity to a collection. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -24980,17 +24215,17 @@ async def create_or_update( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entity @@ -25003,14 +24238,12 @@ async def create_or_update( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -25028,15 +24261,8 @@ async def create_or_update( return cast(JSON, deserialized) - - @distributed_trace_async - async def create_or_update_bulk( - self, - collection: str, - entities: JSON, - **kwargs: Any - ) -> JSON: + async def create_or_update_bulk(self, collection: str, entities: JSON, **kwargs: Any) -> JSON: """Creates or updates entities in bulk to a collection. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -25483,17 +24709,17 @@ async def create_or_update_bulk( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entities @@ -25506,14 +24732,12 @@ async def create_or_update_bulk( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -25531,15 +24755,8 @@ async def create_or_update_bulk( return cast(JSON, deserialized) - - @distributed_trace_async - async def move_entities_to_collection( - self, - collection: str, - move_entities_request: JSON, - **kwargs: Any - ) -> JSON: + async def move_entities_to_collection(self, collection: str, move_entities_request: JSON, **kwargs: Any) -> JSON: """Move existing entities to the target collection. :param collection: the collection unique name. @@ -25748,17 +24965,17 @@ async def move_entities_to_collection( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = move_entities_request @@ -25771,14 +24988,12 @@ async def move_entities_to_collection( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -25795,5 +25010,3 @@ async def move_entities_to_collection( return cls(pipeline_response, cast(JSON, deserialized), {}) return cast(JSON, deserialized) - - diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_patch.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_patch.py index 95d4f5d9109a..a86dd5d0e2a2 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_patch.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import abc import sys from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast @@ -14,7 +15,13 @@ from ._operations import EntityOperations as EntityOperationsGenerated from ._operations import GlossaryOperations as GlossaryOperationsGenerated -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -27,22 +34,21 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object -T = TypeVar('T') +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def patch_sdk(): pass def build_entity_import_business_metadata_request( - files: Optional[Dict[str, Any]] = None, - content: Any = None, - **kwargs: Any + files: Optional[Dict[str, Any]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] accept = "application/json" # Construct URL @@ -51,17 +57,10 @@ def build_entity_import_business_metadata_request( # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_header_parameters, - files=files, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_header_parameters, files=files, content=content, **kwargs) def build_glossary_import_glossary_terms_via_csv_request_initial( @@ -72,14 +71,14 @@ def build_glossary_import_glossary_terms_via_csv_request_initial( include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] accept = "application/json" # Construct URL _url = "/glossary/{glossaryGuid}/terms/import" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) @@ -87,14 +86,16 @@ def build_glossary_import_glossary_terms_via_csv_request_initial( # Construct parameters _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_term_hierarchy is not None: - _query_parameters['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters["includeTermHierarchy"] = _SERIALIZER.query( + "include_term_hierarchy", include_term_hierarchy, "bool" + ) + _query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="POST", @@ -106,22 +107,23 @@ def build_glossary_import_glossary_terms_via_csv_request_initial( **kwargs ) + def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial( - glossary_name: str, + glossary_name: str, *, files: Optional[Dict[str, Any]] = None, content: Any = None, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] accept = "application/json" # Construct URL _url = "/glossary/name/{glossaryName}/terms/import" path_format_arguments = { - "glossaryName": _SERIALIZER.url("glossary_name", glossary_name, 'str', max_length=4096, min_length=1), + "glossaryName": _SERIALIZER.url("glossary_name", glossary_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) @@ -129,14 +131,16 @@ def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initia # Construct parameters _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_term_hierarchy is not None: - _query_parameters['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters["includeTermHierarchy"] = _SERIALIZER.query( + "include_term_hierarchy", include_term_hierarchy, "bool" + ) + _query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="POST", @@ -150,12 +154,8 @@ def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initia class EntityOperations(EntityOperationsGenerated): - - async def import_business_metadata( - self, - *args, - **kwargs - ) -> JSON: + + async def import_business_metadata(self, *args, **kwargs) -> JSON: _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} @@ -164,27 +164,24 @@ async def import_business_metadata( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=True, - **kwargs + request, stream=True, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - + deserialized = response return deserialized - -class GlossaryOperations(GlossaryOperationsGenerated): +class GlossaryOperations(GlossaryOperationsGenerated): async def begin_import_glossary_terms_via_csv( self, @@ -193,16 +190,13 @@ async def begin_import_glossary_terms_via_csv( *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any - ) -> AsyncLROPoller[JSON]: - api_version = kwargs.pop('api_version', "2022-03-01-preview") #type: str - content_type = kwargs.pop('content_type', None) #type: Optional[str] - polling = kwargs.pop('polling', True) #type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None)# type: ClsType[JSONType] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + ) -> AsyncLROPoller[JSON]: + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[JSONType] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._import_glossary_terms_via_csv_initial( glossary_guid=glossary_guid, @@ -210,10 +204,10 @@ async def begin_import_glossary_terms_via_csv( include_term_hierarchy=include_term_hierarchy, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response @@ -225,24 +219,30 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = LROBasePolling( + lro_delay, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=path_format_arguments, + **kwargs + ) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output - ) + deserialization_callback=get_long_running_output, + ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - async def begin_import_glossary_terms_via_csv_by_glossary_name( self, glossary_name: str, @@ -300,15 +300,12 @@ async def begin_import_glossary_terms_via_csv_by_glossary_name( Possible values include: "NotStarted", "Succeeded", "Failed", "Running". } """ - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[JSONType] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[JSONType] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._import_glossary_terms_via_csv_by_glossary_name_initial( glossary_name=glossary_name, @@ -316,10 +313,10 @@ async def begin_import_glossary_terms_via_csv_by_glossary_name( include_term_hierarchy=include_term_hierarchy, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response @@ -331,25 +328,29 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = LROBasePolling( + lro_delay, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=path_format_arguments, + **kwargs + ) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - - - -__all__= ['EntityOperations','GlossaryOperations'] +__all__ = ["EntityOperations", "GlossaryOperations"] diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/__init__.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/__init__.py index 43979b856f2d..b4fffa9d3ba5 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/__init__.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/__init__.py @@ -17,14 +17,15 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'EntityOperations', - 'GlossaryOperations', - 'DiscoveryOperations', - 'LineageOperations', - 'RelationshipOperations', - 'TypesOperations', - 'CollectionOperations', + "EntityOperations", + "GlossaryOperations", + "DiscoveryOperations", + "LineageOperations", + "RelationshipOperations", + "TypesOperations", + "CollectionOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py index 6d3185951833..0656895ec680 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py @@ -12,7 +12,13 @@ from msrest import Serializer -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod @@ -22,44 +28,36 @@ from azure.core.utils import case_insensitive_dict from .._vendor import _format_url_section + if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object -T = TypeVar('T') +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_entity_create_or_update_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_list_by_guids_request( @@ -73,377 +71,269 @@ def build_entity_list_by_guids_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/bulk" # Construct parameters - _params['guid'] = [_SERIALIZER.query("guids", q, 'str') if q is not None else '' for q in guids] + _params["guid"] = [_SERIALIZER.query("guids", q, "str") if q is not None else "" for q in guids] if min_ext_info is not None: - _params['minExtInfo'] = _SERIALIZER.query("min_ext_info", min_ext_info, 'bool') + _params["minExtInfo"] = _SERIALIZER.query("min_ext_info", min_ext_info, "bool") if ignore_relationships is not None: - _params['ignoreRelationships'] = _SERIALIZER.query("ignore_relationships", ignore_relationships, 'bool') + _params["ignoreRelationships"] = _SERIALIZER.query("ignore_relationships", ignore_relationships, "bool") if exclude_relationship_types is not None: - _params['excludeRelationshipTypes'] = [_SERIALIZER.query("exclude_relationship_types", q, 'str') if q is not None else '' for q in exclude_relationship_types] + _params["excludeRelationshipTypes"] = [ + _SERIALIZER.query("exclude_relationship_types", q, "str") if q is not None else "" + for q in exclude_relationship_types + ] # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_entity_create_or_update_entities_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/bulk" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_entity_delete_by_guids_request( - *, - guids: List[str], - **kwargs: Any -) -> HttpRequest: +def build_entity_delete_by_guids_request(*, guids: List[str], **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/bulk" # Construct parameters - _params['guid'] = [_SERIALIZER.query("guids", q, 'str') if q is not None else '' for q in guids] + _params["guid"] = [_SERIALIZER.query("guids", q, "str") if q is not None else "" for q in guids] # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_entity_add_classification_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/bulk/classification" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_get_by_guid_request( - guid: str, - *, - min_ext_info: Optional[bool] = False, - ignore_relationships: Optional[bool] = False, - **kwargs: Any + guid: str, *, min_ext_info: Optional[bool] = False, ignore_relationships: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if min_ext_info is not None: - _params['minExtInfo'] = _SERIALIZER.query("min_ext_info", min_ext_info, 'bool') + _params["minExtInfo"] = _SERIALIZER.query("min_ext_info", min_ext_info, "bool") if ignore_relationships is not None: - _params['ignoreRelationships'] = _SERIALIZER.query("ignore_relationships", ignore_relationships, 'bool') + _params["ignoreRelationships"] = _SERIALIZER.query("ignore_relationships", ignore_relationships, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_entity_partial_update_entity_attribute_by_guid_request( - guid: str, - *, - name: str, - json: Any = None, - content: Any = None, - **kwargs: Any + guid: str, *, name: str, json: Any = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['name'] = _SERIALIZER.query("name", name, 'str') + _params["name"] = _SERIALIZER.query("name", name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_entity_delete_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_entity_delete_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) -def build_entity_get_classification_request( - guid: str, - classification_name: str, - **kwargs: Any -) -> HttpRequest: +def build_entity_get_classification_request(guid: str, classification_name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}/classification/{classificationName}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), - "classificationName": _SERIALIZER.url("classification_name", classification_name, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), + "classificationName": _SERIALIZER.url( + "classification_name", classification_name, "str", max_length=4096, min_length=1 + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_entity_delete_classification_request( - guid: str, - classification_name: str, - **kwargs: Any -) -> HttpRequest: +def build_entity_delete_classification_request(guid: str, classification_name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}/classification/{classificationName}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), - "classificationName": _SERIALIZER.url("classification_name", classification_name, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), + "classificationName": _SERIALIZER.url( + "classification_name", classification_name, "str", max_length=4096, min_length=1 + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) -def build_entity_get_classifications_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_entity_get_classifications_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}/classifications" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_entity_add_classifications_request( - guid: str, - *, - json: Optional[List[JSON]] = None, - content: Any = None, - **kwargs: Any + guid: str, *, json: Optional[List[JSON]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}/classifications" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_update_classifications_request( - guid: str, - *, - json: Optional[List[JSON]] = None, - content: Any = None, - **kwargs: Any + guid: str, *, json: Optional[List[JSON]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}/classifications" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_get_by_unique_attributes_request( @@ -457,34 +347,28 @@ def build_entity_get_by_unique_attributes_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if min_ext_info is not None: - _params['minExtInfo'] = _SERIALIZER.query("min_ext_info", min_ext_info, 'bool') + _params["minExtInfo"] = _SERIALIZER.query("min_ext_info", min_ext_info, "bool") if ignore_relationships is not None: - _params['ignoreRelationships'] = _SERIALIZER.query("ignore_relationships", ignore_relationships, 'bool') + _params["ignoreRelationships"] = _SERIALIZER.query("ignore_relationships", ignore_relationships, "bool") if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_entity_partial_update_entity_by_unique_attributes_request( @@ -498,107 +382,82 @@ def build_entity_partial_update_entity_by_unique_attributes_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_entity_delete_by_unique_attribute_request( - type_name: str, - *, - attr_qualified_name: Optional[str] = None, - **kwargs: Any + type_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_entity_delete_classification_by_unique_attribute_request( - type_name: str, - classification_name: str, - *, - attr_qualified_name: Optional[str] = None, - **kwargs: Any + type_name: str, classification_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}/classification/{classificationName}" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), - "classificationName": _SERIALIZER.url("classification_name", classification_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), + "classificationName": _SERIALIZER.url( + "classification_name", classification_name, "str", max_length=4096, min_length=1 + ), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) def build_entity_add_classifications_by_unique_attribute_request( @@ -612,35 +471,27 @@ def build_entity_add_classifications_by_unique_attribute_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}/classifications" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_entity_update_classifications_by_unique_attribute_request( @@ -654,64 +505,46 @@ def build_entity_update_classifications_by_unique_attribute_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}/classifications" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_entity_set_classifications_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/bulk/setClassifications" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_get_entities_by_unique_attributes_request( @@ -725,93 +558,68 @@ def build_entity_get_entities_by_unique_attributes_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/bulk/uniqueAttribute/type/{typeName}" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if min_ext_info is not None: - _params['minExtInfo'] = _SERIALIZER.query("min_ext_info", min_ext_info, 'bool') + _params["minExtInfo"] = _SERIALIZER.query("min_ext_info", min_ext_info, "bool") if ignore_relationships is not None: - _params['ignoreRelationships'] = _SERIALIZER.query("ignore_relationships", ignore_relationships, 'bool') + _params["ignoreRelationships"] = _SERIALIZER.query("ignore_relationships", ignore_relationships, "bool") if attr_n_qualified_name is not None: - _params['attr_N:qualifiedName'] = _SERIALIZER.query("attr_n_qualified_name", attr_n_qualified_name, 'str') + _params["attr_N:qualifiedName"] = _SERIALIZER.query("attr_n_qualified_name", attr_n_qualified_name, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_entity_get_header_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_entity_get_header_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/entity/guid/{guid}/header" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_entity_delete_business_metadata_request( - guid: str, - *, - json: Optional[Dict[str, Any]] = None, - content: Any = None, - **kwargs: Any + guid: str, *, json: Optional[Dict[str, Any]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/businessmetadata" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_add_or_update_business_metadata_request( @@ -825,226 +633,152 @@ def build_entity_add_or_update_business_metadata_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/businessmetadata" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if is_overwrite is not None: - _params['isOverwrite'] = _SERIALIZER.query("is_overwrite", is_overwrite, 'bool') + _params["isOverwrite"] = _SERIALIZER.query("is_overwrite", is_overwrite, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_entity_delete_business_metadata_attributes_request( - bm_name: str, - guid: str, - *, - json: Optional[Dict[str, Any]] = None, - content: Any = None, - **kwargs: Any + bm_name: str, guid: str, *, json: Optional[Dict[str, Any]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/businessmetadata/{bmName}" path_format_arguments = { - "bmName": _SERIALIZER.url("bm_name", bm_name, 'str'), - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "bmName": _SERIALIZER.url("bm_name", bm_name, "str"), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_add_or_update_business_metadata_attributes_request( - bm_name: str, - guid: str, - *, - json: Optional[Dict[str, Any]] = None, - content: Any = None, - **kwargs: Any + bm_name: str, guid: str, *, json: Optional[Dict[str, Any]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/businessmetadata/{bmName}" path_format_arguments = { - "bmName": _SERIALIZER.url("bm_name", bm_name, 'str'), - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "bmName": _SERIALIZER.url("bm_name", bm_name, "str"), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_entity_get_sample_business_metadata_template_request( - **kwargs: Any -) -> HttpRequest: +def build_entity_get_sample_business_metadata_template_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/octet-stream") + accept = _headers.pop("Accept", "application/octet-stream") # Construct URL _url = "/atlas/v2/entity/businessmetadata/import/template" # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_entity_import_business_metadata_request( - *args, - **kwargs -) -> HttpRequest: +def build_entity_import_business_metadata_request(*args, **kwargs) -> HttpRequest: raise NotImplementedError( "You need to write a custom operation for 'build_entity_import_business_metadata_request'. " "Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize." ) + def build_entity_delete_labels_request( - guid: str, - *, - json: Optional[List[str]] = None, - content: Any = None, - **kwargs: Any + guid: str, *, json: Optional[List[str]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/labels" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_set_labels_request( - guid: str, - *, - json: Optional[List[str]] = None, - content: Any = None, - **kwargs: Any + guid: str, *, json: Optional[List[str]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/labels" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_add_label_request( - guid: str, - *, - json: Optional[List[str]] = None, - content: Any = None, - **kwargs: Any + guid: str, *, json: Optional[List[str]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/guid/{guid}/labels" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_entity_delete_labels_by_unique_attribute_request( @@ -1058,31 +792,25 @@ def build_entity_delete_labels_by_unique_attribute_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") return HttpRequest( - method="DELETE", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs + method="DELETE", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs ) @@ -1097,32 +825,24 @@ def build_entity_set_labels_by_unique_attribute_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_entity_add_labels_by_unique_attribute_request( @@ -1136,32 +856,24 @@ def build_entity_add_labels_by_unique_attribute_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] # Construct URL _url = "/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if attr_qualified_name is not None: - _params['attr:qualifiedName'] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, 'str') + _params["attr:qualifiedName"] = _SERIALIZER.query("attr_qualified_name", attr_qualified_name, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_glossary_list_glossaries_request( @@ -1175,242 +887,170 @@ def build_glossary_list_glossaries_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary" # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") if ignore_terms_and_categories is not None: - _params['ignoreTermsAndCategories'] = _SERIALIZER.query("ignore_terms_and_categories", ignore_terms_and_categories, 'bool') + _params["ignoreTermsAndCategories"] = _SERIALIZER.query( + "ignore_terms_and_categories", ignore_terms_and_categories, "bool" + ) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_create_glossary_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_glossary_create_glossary_categories_request( - *, - json: Optional[List[JSON]] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[List[JSON]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/categories" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_glossary_create_glossary_category_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_glossary_get_glossary_category_request( - category_guid: str, - **kwargs: Any -) -> HttpRequest: +def build_glossary_get_glossary_category_request(category_guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category/{categoryGuid}" path_format_arguments = { - "categoryGuid": _SERIALIZER.url("category_guid", category_guid, 'str', max_length=4096, min_length=1), + "categoryGuid": _SERIALIZER.url("category_guid", category_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_glossary_update_glossary_category_request( - category_guid: str, - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + category_guid: str, *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category/{categoryGuid}" path_format_arguments = { - "categoryGuid": _SERIALIZER.url("category_guid", category_guid, 'str', max_length=4096, min_length=1), + "categoryGuid": _SERIALIZER.url("category_guid", category_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_glossary_delete_glossary_category_request( - category_guid: str, - **kwargs: Any -) -> HttpRequest: +def build_glossary_delete_glossary_category_request(category_guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category/{categoryGuid}" path_format_arguments = { - "categoryGuid": _SERIALIZER.url("category_guid", category_guid, 'str', max_length=4096, min_length=1), + "categoryGuid": _SERIALIZER.url("category_guid", category_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_glossary_partial_update_glossary_category_request( - category_guid: str, - *, - json: Optional[Dict[str, str]] = None, - content: Any = None, - **kwargs: Any + category_guid: str, *, json: Optional[Dict[str, str]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category/{categoryGuid}/partial" path_format_arguments = { - "categoryGuid": _SERIALIZER.url("category_guid", category_guid, 'str', max_length=4096, min_length=1), + "categoryGuid": _SERIALIZER.url("category_guid", category_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_glossary_list_related_categories_request( @@ -1424,34 +1064,28 @@ def build_glossary_list_related_categories_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category/{categoryGuid}/related" path_format_arguments = { - "categoryGuid": _SERIALIZER.url("category_guid", category_guid, 'str', max_length=4096, min_length=1), + "categoryGuid": _SERIALIZER.url("category_guid", category_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_list_category_terms_request( @@ -1465,70 +1099,52 @@ def build_glossary_list_category_terms_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/category/{categoryGuid}/terms" path_format_arguments = { - "categoryGuid": _SERIALIZER.url("category_guid", category_guid, 'str', max_length=4096, min_length=1), + "categoryGuid": _SERIALIZER.url("category_guid", category_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_create_glossary_term_request( - *, - json: Optional[JSON] = None, - content: Any = None, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/term" # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_glossary_get_glossary_term_request( @@ -1541,32 +1157,29 @@ def build_glossary_get_glossary_term_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/term/{termGuid}" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") if exclude_relationship_type_list is not None: - _params['excludeRelationshipTypes'] = [_SERIALIZER.query("exclude_relationship_type_list", q, 'str') if q is not None else '' for q in exclude_relationship_type_list] + _params["excludeRelationshipTypes"] = [ + _SERIALIZER.query("exclude_relationship_type_list", q, "str") if q is not None else "" + for q in exclude_relationship_type_list + ] # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_update_glossary_term_request( @@ -1580,62 +1193,46 @@ def build_glossary_update_glossary_term_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/term/{termGuid}" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_glossary_delete_glossary_term_request( - term_guid: str, - **kwargs: Any -) -> HttpRequest: +def build_glossary_delete_glossary_term_request(term_guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/term/{termGuid}" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_glossary_partial_update_glossary_term_request( @@ -1649,35 +1246,27 @@ def build_glossary_partial_update_glossary_term_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/term/{termGuid}/partial" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_glossary_create_glossary_terms_request( @@ -1690,30 +1279,22 @@ def build_glossary_create_glossary_terms_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/terms" # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_glossary_get_entities_assigned_with_term_request( @@ -1727,139 +1308,100 @@ def build_glossary_get_entities_assigned_with_term_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/terms/{termGuid}/assignedEntities" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_assign_term_to_entities_request( - term_guid: str, - *, - json: Optional[List[JSON]] = None, - content: Any = None, - **kwargs: Any + term_guid: str, *, json: Optional[List[JSON]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/terms/{termGuid}/assignedEntities" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_glossary_remove_term_assignment_from_entities_request( - term_guid: str, - *, - json: Optional[List[JSON]] = None, - content: Any = None, - **kwargs: Any + term_guid: str, *, json: Optional[List[JSON]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/terms/{termGuid}/assignedEntities" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_glossary_delete_term_assignment_from_entities_request( - term_guid: str, - *, - json: Optional[List[JSON]] = None, - content: Any = None, - **kwargs: Any + term_guid: str, *, json: Optional[List[JSON]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/terms/{termGuid}/assignedEntities" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_glossary_list_related_terms_request( @@ -1873,123 +1415,90 @@ def build_glossary_list_related_terms_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/terms/{termGuid}/related" path_format_arguments = { - "termGuid": _SERIALIZER.url("term_guid", term_guid, 'str', max_length=4096, min_length=1), + "termGuid": _SERIALIZER.url("term_guid", term_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_glossary_get_glossary_request( - glossary_guid: str, - **kwargs: Any -) -> HttpRequest: +def build_glossary_get_glossary_request(glossary_guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) def build_glossary_update_glossary_request( - glossary_guid: str, - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + glossary_guid: str, *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_glossary_delete_glossary_request( - glossary_guid: str, - **kwargs: Any -) -> HttpRequest: +def build_glossary_delete_glossary_request(glossary_guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_glossary_list_glossary_categories_request( @@ -2003,34 +1512,28 @@ def build_glossary_list_glossary_categories_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}/categories" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_list_glossary_categories_headers_request( @@ -2044,69 +1547,54 @@ def build_glossary_list_glossary_categories_headers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}/categories/headers" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_get_detailed_glossary_request( - glossary_guid: str, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + glossary_guid: str, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}/detailed" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_partial_update_glossary_request( @@ -2120,35 +1608,27 @@ def build_glossary_partial_update_glossary_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}/partial" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_glossary_list_glossary_terms_request( @@ -2163,36 +1643,30 @@ def build_glossary_list_glossary_terms_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}/terms" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_list_glossary_term_headers_request( @@ -2206,85 +1680,66 @@ def build_glossary_list_glossary_term_headers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/glossary/{glossaryGuid}/terms/headers" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if sort is not None: - _params['sort'] = _SERIALIZER.query("sort", sort, 'str') + _params["sort"] = _SERIALIZER.query("sort", sort, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_glossary_import_glossary_terms_via_csv_request_initial( - *args, - **kwargs -) -> HttpRequest: +def build_glossary_import_glossary_terms_via_csv_request_initial(*args, **kwargs) -> HttpRequest: raise NotImplementedError( "You need to write a custom operation for 'build_glossary_import_glossary_terms_via_csv_request_initial'. " "Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize." ) -def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial( - *args, - **kwargs -) -> HttpRequest: + +def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial(*args, **kwargs) -> HttpRequest: raise NotImplementedError( "You need to write a custom operation for 'build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial'. " "Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize." ) -def build_glossary_get_import_csv_operation_status_request( - operation_guid: str, - **kwargs: Any -) -> HttpRequest: + +def build_glossary_get_import_csv_operation_status_request(operation_guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/glossary/terms/import/{operationGuid}" path_format_arguments = { - "operationGuid": _SERIALIZER.url("operation_guid", operation_guid, 'str', max_length=4096, min_length=1), + "operationGuid": _SERIALIZER.url("operation_guid", operation_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_glossary_export_glossary_terms_as_csv_request( @@ -2298,37 +1753,29 @@ def build_glossary_export_glossary_terms_as_csv_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "text/csv") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "text/csv") # Construct URL _url = "/glossary/{glossaryGuid}/terms/export" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_glossary_list_terms_by_glossary_name_request( @@ -2342,176 +1789,120 @@ def build_glossary_list_terms_by_glossary_name_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/glossary/name/{glossaryName}/terms" path_format_arguments = { - "glossaryName": _SERIALIZER.url("glossary_name", glossary_name, 'str', max_length=4096, min_length=1), + "glossaryName": _SERIALIZER.url("glossary_name", glossary_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if include_term_hierarchy is not None: - _params['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["includeTermHierarchy"] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, "bool") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_discovery_query_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: +def build_discovery_query_request(*, json: Optional[JSON] = None, content: Any = None, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/search/query" # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_discovery_suggest_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: +def build_discovery_suggest_request(*, json: Optional[JSON] = None, content: Any = None, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/search/suggest" # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) -def build_discovery_browse_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: +def build_discovery_browse_request(*, json: Optional[JSON] = None, content: Any = None, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/browse" # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_discovery_auto_complete_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/search/autocomplete" # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_lineage_get_lineage_graph_request( @@ -2527,37 +1918,31 @@ def build_lineage_get_lineage_graph_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/lineage/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if depth is not None: - _params['depth'] = _SERIALIZER.query("depth", depth, 'int') + _params["depth"] = _SERIALIZER.query("depth", depth, "int") if width is not None: - _params['width'] = _SERIALIZER.query("width", width, 'int') - _params['direction'] = _SERIALIZER.query("direction", direction, 'str') + _params["width"] = _SERIALIZER.query("width", width, "int") + _params["direction"] = _SERIALIZER.query("direction", direction, "str") if include_parent is not None: - _params['includeParent'] = _SERIALIZER.query("include_parent", include_parent, 'bool') + _params["includeParent"] = _SERIALIZER.query("include_parent", include_parent, "bool") if get_derived_lineage is not None: - _params['getDerivedLineage'] = _SERIALIZER.query("get_derived_lineage", get_derived_lineage, 'bool') + _params["getDerivedLineage"] = _SERIALIZER.query("get_derived_lineage", get_derived_lineage, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_lineage_next_page_lineage_request( @@ -2572,37 +1957,31 @@ def build_lineage_next_page_lineage_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/lineage/{guid}/next/" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['direction'] = _SERIALIZER.query("direction", direction, 'str') + _params["direction"] = _SERIALIZER.query("direction", direction, "str") if get_derived_lineage is not None: - _params['getDerivedLineage'] = _SERIALIZER.query("get_derived_lineage", get_derived_lineage, 'bool') + _params["getDerivedLineage"] = _SERIALIZER.query("get_derived_lineage", get_derived_lineage, "bool") if offset is not None: - _params['offset'] = _SERIALIZER.query("offset", offset, 'int') + _params["offset"] = _SERIALIZER.query("offset", offset, "int") if limit is not None: - _params['limit'] = _SERIALIZER.query("limit", limit, 'int') - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["limit"] = _SERIALIZER.query("limit", limit, "int") + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_lineage_get_lineage_by_unique_attribute_request( @@ -2618,902 +1997,636 @@ def build_lineage_get_lineage_by_unique_attribute_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/lineage/uniqueAttribute/type/{typeName}" path_format_arguments = { - "typeName": _SERIALIZER.url("type_name", type_name, 'str', max_length=4096, min_length=1), + "typeName": _SERIALIZER.url("type_name", type_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if depth is not None: - _params['depth'] = _SERIALIZER.query("depth", depth, 'int') + _params["depth"] = _SERIALIZER.query("depth", depth, "int") if width is not None: - _params['width'] = _SERIALIZER.query("width", width, 'int') - _params['direction'] = _SERIALIZER.query("direction", direction, 'str') + _params["width"] = _SERIALIZER.query("width", width, "int") + _params["direction"] = _SERIALIZER.query("direction", direction, "str") if include_parent is not None: - _params['includeParent'] = _SERIALIZER.query("include_parent", include_parent, 'bool') + _params["includeParent"] = _SERIALIZER.query("include_parent", include_parent, "bool") if get_derived_lineage is not None: - _params['getDerivedLineage'] = _SERIALIZER.query("get_derived_lineage", get_derived_lineage, 'bool') + _params["getDerivedLineage"] = _SERIALIZER.query("get_derived_lineage", get_derived_lineage, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_relationship_create_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/relationship" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_relationship_update_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/relationship" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) -def build_relationship_get_request( - guid: str, - *, - extended_info: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: +def build_relationship_get_request(guid: str, *, extended_info: Optional[bool] = None, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/relationship/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if extended_info is not None: - _params['extendedInfo'] = _SERIALIZER.query("extended_info", extended_info, 'bool') + _params["extendedInfo"] = _SERIALIZER.query("extended_info", extended_info, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_relationship_delete_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_relationship_delete_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/relationship/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) -def build_types_get_business_metadata_def_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_business_metadata_def_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/businessmetadatadef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str'), + "guid": _SERIALIZER.url("guid", guid, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_business_metadata_def_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_business_metadata_def_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/businessmetadatadef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str'), + "name": _SERIALIZER.url("name", name, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_classification_def_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_classification_def_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/classificationdef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_classification_def_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_classification_def_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/classificationdef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_entity_definition_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_entity_definition_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/entitydef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_entity_definition_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_entity_definition_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/entitydef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_enum_def_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_enum_def_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/enumdef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_enum_def_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_enum_def_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/enumdef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_relationship_def_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_relationship_def_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/relationshipdef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_relationship_def_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_relationship_def_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/relationshipdef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_struct_def_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_struct_def_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/structdef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_struct_def_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_struct_def_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/structdef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_type_definition_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_type_definition_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_get_type_definition_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_type_definition_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_types_delete_type_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_delete_type_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_types_get_all_type_definitions_request( - *, - include_term_template: Optional[bool] = False, - type: Optional[str] = None, - **kwargs: Any + *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedefs" # Construct parameters if include_term_template is not None: - _params['includeTermTemplate'] = _SERIALIZER.query("include_term_template", include_term_template, 'bool') + _params["includeTermTemplate"] = _SERIALIZER.query("include_term_template", include_term_template, "bool") if type is not None: - _params['type'] = _SERIALIZER.query("type", type, 'str') + _params["type"] = _SERIALIZER.query("type", type, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_types_create_type_definitions_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedefs" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_types_update_atlas_type_definitions_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedefs" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="PUT", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="PUT", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_types_delete_type_definitions_request( - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedefs" # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, json=json, content=content, **kwargs) def build_types_list_type_definition_headers_request( - *, - include_term_template: Optional[bool] = False, - type: Optional[str] = None, - **kwargs: Any + *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json") + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/atlas/v2/types/typedefs/headers" # Construct parameters if include_term_template is not None: - _params['includeTermTemplate'] = _SERIALIZER.query("include_term_template", include_term_template, 'bool') + _params["includeTermTemplate"] = _SERIALIZER.query("include_term_template", include_term_template, "bool") if type is not None: - _params['type'] = _SERIALIZER.query("type", type, 'str') + _params["type"] = _SERIALIZER.query("type", type, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_types_get_term_template_def_by_guid_request( - guid: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_term_template_def_by_guid_request(guid: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/types/termtemplatedef/guid/{guid}" path_format_arguments = { - "guid": _SERIALIZER.url("guid", guid, 'str', max_length=4096, min_length=1), + "guid": _SERIALIZER.url("guid", guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_types_get_term_template_def_by_name_request( - name: str, - **kwargs: Any -) -> HttpRequest: +def build_types_get_term_template_def_by_name_request(name: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/types/termtemplatedef/name/{name}" path_format_arguments = { - "name": _SERIALIZER.url("name", name, 'str', max_length=4096, min_length=1), + "name": _SERIALIZER.url("name", name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_collection_create_or_update_request( - collection: str, - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + collection: str, *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/collections/{collection}/entity" path_format_arguments = { - "collection": _SERIALIZER.url("collection", collection, 'str'), + "collection": _SERIALIZER.url("collection", collection, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_collection_create_or_update_bulk_request( - collection: str, - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + collection: str, *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/collections/{collection}/entity/bulk" path_format_arguments = { - "collection": _SERIALIZER.url("collection", collection, 'str'), + "collection": _SERIALIZER.url("collection", collection, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) def build_collection_move_entities_to_collection_request( - collection: str, - *, - json: Optional[JSON] = None, - content: Any = None, - **kwargs: Any + collection: str, *, json: Optional[JSON] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = "/collections/{collection}/entity/moveHere" path_format_arguments = { - "collection": _SERIALIZER.url("collection", collection, 'str'), + "collection": _SERIALIZER.url("collection", collection, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, json=json, content=content, **kwargs) - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - json=json, - content=content, - **kwargs - ) class EntityOperations(abc.ABC): # pylint: disable=too-many-public-methods """ @@ -3532,13 +2645,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def create_or_update( - self, - entity: JSON, - **kwargs: Any - ) -> JSON: + def create_or_update(self, entity: JSON, **kwargs: Any) -> JSON: """Create or update an entity in Atlas. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -3969,16 +3077,16 @@ def create_or_update( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entity @@ -3989,14 +3097,12 @@ def create_or_update( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4014,8 +3120,6 @@ def create_or_update( return cast(JSON, deserialized) - - @distributed_trace def list_by_guids( self, @@ -4288,17 +3392,14 @@ def list_by_guids( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_list_by_guids_request( guids=guids, min_ext_info=min_ext_info, @@ -4308,14 +3409,12 @@ def list_by_guids( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4333,14 +3432,8 @@ def list_by_guids( return cast(JSON, deserialized) - - @distributed_trace - def create_or_update_entities( - self, - entities: JSON, - **kwargs: Any - ) -> JSON: + def create_or_update_entities(self, entities: JSON, **kwargs: Any) -> JSON: """Create or update entities in Atlas in bulk. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -4785,16 +3878,16 @@ def create_or_update_entities( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entities @@ -4805,14 +3898,12 @@ def create_or_update_entities( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -4830,15 +3921,8 @@ def create_or_update_entities( return cast(JSON, deserialized) - - @distributed_trace - def delete_by_guids( - self, - *, - guids: List[str], - **kwargs: Any - ) -> JSON: + def delete_by_guids(self, *, guids: List[str], **kwargs: Any) -> JSON: """Delete a list of entities in bulk identified by their GUIDs or unique attributes. :keyword guids: An array of GUIDs of entities to delete. @@ -5037,31 +4121,26 @@ def delete_by_guids( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_delete_by_guids_request( guids=guids, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5079,13 +4158,9 @@ def delete_by_guids( return cast(JSON, deserialized) - - @distributed_trace def add_classification( # pylint: disable=inconsistent-return-statements - self, - request: JSON, - **kwargs: Any + self, request: JSON, **kwargs: Any ) -> None: """Associate a classification to multiple entities in bulk. @@ -5133,16 +4208,16 @@ def add_classification( # pylint: disable=inconsistent-return-statements ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = request @@ -5153,14 +4228,12 @@ def add_classification( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5171,8 +4244,6 @@ def add_classification( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def get_by_guid( self, @@ -5427,17 +4498,14 @@ def get_by_guid( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_by_guid_request( guid=guid, min_ext_info=min_ext_info, @@ -5446,14 +4514,12 @@ def get_by_guid( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5471,17 +4537,8 @@ def get_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def partial_update_entity_attribute_by_guid( - self, - guid: str, - body: Any, - *, - name: str, - **kwargs: Any - ) -> JSON: + def partial_update_entity_attribute_by_guid(self, guid: str, body: Any, *, name: str, **kwargs: Any) -> JSON: """Update entity partially - create or update entity attribute identified by its GUID. Supports only primitive attribute type and entity references. It does not support updating complex types like arrays, and maps. @@ -5497,16 +4554,16 @@ def partial_update_entity_attribute_by_guid( :rtype: JSON :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = body @@ -5519,14 +4576,12 @@ def partial_update_entity_attribute_by_guid( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5544,14 +4599,8 @@ def partial_update_entity_attribute_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def delete_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def delete_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Delete an entity identified by its GUID. :param guid: The globally unique identifier of the entity. @@ -5750,31 +4799,26 @@ def delete_by_guid( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_delete_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5792,15 +4836,8 @@ def delete_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_classification( - self, - guid: str, - classification_name: str, - **kwargs: Any - ) -> JSON: + def get_classification(self, guid: str, classification_name: str, **kwargs: Any) -> JSON: """List classifications for a given entity represented by a GUID. :param guid: The globally unique identifier of the entity. @@ -5843,17 +4880,14 @@ def get_classification( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_classification_request( guid=guid, classification_name=classification_name, @@ -5861,14 +4895,12 @@ def get_classification( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5886,14 +4918,9 @@ def get_classification( return cast(JSON, deserialized) - - @distributed_trace def delete_classification( # pylint: disable=inconsistent-return-statements - self, - guid: str, - classification_name: str, - **kwargs: Any + self, guid: str, classification_name: str, **kwargs: Any ) -> None: """Delete a given classification from an existing entity represented by a GUID. @@ -5905,17 +4932,14 @@ def delete_classification( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_entity_delete_classification_request( guid=guid, classification_name=classification_name, @@ -5923,14 +4947,12 @@ def delete_classification( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -5941,14 +4963,8 @@ def delete_classification( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace - def get_classifications( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_classifications(self, guid: str, **kwargs: Any) -> JSON: """List classifications for a given entity represented by a GUID. :param guid: The globally unique identifier of the entity. @@ -5973,31 +4989,26 @@ def get_classifications( "totalCount": 0.0 # Optional. The total count of items. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_classifications_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6015,14 +5026,9 @@ def get_classifications( return cast(JSON, deserialized) - - @distributed_trace def add_classifications( # pylint: disable=inconsistent-return-statements - self, - guid: str, - classifications: List[JSON], - **kwargs: Any + self, guid: str, classifications: List[JSON], **kwargs: Any ) -> None: """Add classifications to an existing entity represented by a GUID. @@ -6069,16 +5075,16 @@ def add_classifications( # pylint: disable=inconsistent-return-statements } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = classifications @@ -6090,14 +5096,12 @@ def add_classifications( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6106,16 +5110,11 @@ def add_classifications( # pylint: disable=inconsistent-return-statements raise HttpResponseError(response=response) if cls: - return cls(pipeline_response, None, {}) - - + return cls(pipeline_response, None, {}) @distributed_trace def update_classifications( # pylint: disable=inconsistent-return-statements - self, - guid: str, - classifications: List[JSON], - **kwargs: Any + self, guid: str, classifications: List[JSON], **kwargs: Any ) -> None: """Update classifications to an existing entity represented by a guid. @@ -6162,16 +5161,16 @@ def update_classifications( # pylint: disable=inconsistent-return-statements } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = classifications @@ -6183,14 +5182,12 @@ def update_classifications( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6201,8 +5198,6 @@ def update_classifications( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def get_by_unique_attributes( self, @@ -6466,17 +5461,14 @@ def get_by_unique_attributes( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_by_unique_attributes_request( type_name=type_name, min_ext_info=min_ext_info, @@ -6486,14 +5478,12 @@ def get_by_unique_attributes( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -6511,8 +5501,6 @@ def get_by_unique_attributes( return cast(JSON, deserialized) - - @distributed_trace def partial_update_entity_by_unique_attributes( self, @@ -6961,16 +5949,16 @@ def partial_update_entity_by_unique_attributes( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = atlas_entity_with_ext_info @@ -6983,14 +5971,12 @@ def partial_update_entity_by_unique_attributes( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7008,15 +5994,9 @@ def partial_update_entity_by_unique_attributes( return cast(JSON, deserialized) - - @distributed_trace def delete_by_unique_attribute( - self, - type_name: str, - *, - attr_qualified_name: Optional[str] = None, - **kwargs: Any + self, type_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> JSON: """Delete an entity identified by its type and unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the @@ -7224,17 +6204,14 @@ def delete_by_unique_attribute( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_delete_by_unique_attribute_request( type_name=type_name, attr_qualified_name=attr_qualified_name, @@ -7242,14 +6219,12 @@ def delete_by_unique_attribute( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7267,16 +6242,9 @@ def delete_by_unique_attribute( return cast(JSON, deserialized) - - @distributed_trace def delete_classification_by_unique_attribute( # pylint: disable=inconsistent-return-statements - self, - type_name: str, - classification_name: str, - *, - attr_qualified_name: Optional[str] = None, - **kwargs: Any + self, type_name: str, classification_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> None: """Delete a given classification from an entity identified by its type and unique attributes. @@ -7290,17 +6258,14 @@ def delete_classification_by_unique_attribute( # pylint: disable=inconsistent-r :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_entity_delete_classification_by_unique_attribute_request( type_name=type_name, classification_name=classification_name, @@ -7309,14 +6274,12 @@ def delete_classification_by_unique_attribute( # pylint: disable=inconsistent-r params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7327,8 +6290,6 @@ def delete_classification_by_unique_attribute( # pylint: disable=inconsistent-r if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def add_classifications_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -7385,16 +6346,16 @@ def add_classifications_by_unique_attribute( # pylint: disable=inconsistent-ret } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = atlas_classification_array @@ -7407,14 +6368,12 @@ def add_classifications_by_unique_attribute( # pylint: disable=inconsistent-ret params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7425,8 +6384,6 @@ def add_classifications_by_unique_attribute( # pylint: disable=inconsistent-ret if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def update_classifications_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -7483,16 +6440,16 @@ def update_classifications_by_unique_attribute( # pylint: disable=inconsistent- } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = atlas_classification_array @@ -7505,14 +6462,12 @@ def update_classifications_by_unique_attribute( # pylint: disable=inconsistent- params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7523,14 +6478,8 @@ def update_classifications_by_unique_attribute( # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, {}) - - @distributed_trace - def set_classifications( - self, - entity_headers: JSON, - **kwargs: Any - ) -> List[str]: + def set_classifications(self, entity_headers: JSON, **kwargs: Any) -> List[str]: """Set classifications on entities in bulk. :param entity_headers: Atlas entity headers. @@ -7638,16 +6587,16 @@ def set_classifications( "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[str]] _json = entity_headers @@ -7658,14 +6607,12 @@ def set_classifications( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -7683,8 +6630,6 @@ def set_classifications( return cast(List[str], deserialized) - - @distributed_trace def get_entities_by_unique_attributes( self, @@ -7969,17 +6914,14 @@ def get_entities_by_unique_attributes( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_entities_by_unique_attributes_request( type_name=type_name, min_ext_info=min_ext_info, @@ -7989,14 +6931,12 @@ def get_entities_by_unique_attributes( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8014,14 +6954,8 @@ def get_entities_by_unique_attributes( return cast(JSON, deserialized) - - @distributed_trace - def get_header( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_header(self, guid: str, **kwargs: Any) -> JSON: """Get entity header given its GUID. :param guid: The globally unique identifier of the entity. @@ -8110,31 +7044,26 @@ def get_header( "typeName": "str" # Optional. The name of the type. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_entity_get_header_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8152,14 +7081,9 @@ def get_header( return cast(JSON, deserialized) - - @distributed_trace def delete_business_metadata( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[Dict[str, Any]] = None, - **kwargs: Any + self, guid: str, body: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> None: """Remove business metadata from an entity. @@ -8179,16 +7103,16 @@ def delete_business_metadata( # pylint: disable=inconsistent-return-statements "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8203,14 +7127,12 @@ def delete_business_metadata( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8221,16 +7143,9 @@ def delete_business_metadata( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def add_or_update_business_metadata( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[Dict[str, Any]] = None, - *, - is_overwrite: Optional[bool] = None, - **kwargs: Any + self, guid: str, body: Optional[Dict[str, Any]] = None, *, is_overwrite: Optional[bool] = None, **kwargs: Any ) -> None: """Add business metadata to an entity. @@ -8253,16 +7168,16 @@ def add_or_update_business_metadata( # pylint: disable=inconsistent-return-stat "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8278,14 +7193,12 @@ def add_or_update_business_metadata( # pylint: disable=inconsistent-return-stat params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8296,15 +7209,9 @@ def add_or_update_business_metadata( # pylint: disable=inconsistent-return-stat if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def delete_business_metadata_attributes( # pylint: disable=inconsistent-return-statements - self, - bm_name: str, - guid: str, - body: Optional[Dict[str, Any]] = None, - **kwargs: Any + self, bm_name: str, guid: str, body: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> None: """Delete business metadata attributes from an entity. @@ -8326,16 +7233,16 @@ def delete_business_metadata_attributes( # pylint: disable=inconsistent-return- "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8351,14 +7258,12 @@ def delete_business_metadata_attributes( # pylint: disable=inconsistent-return- params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8369,15 +7274,9 @@ def delete_business_metadata_attributes( # pylint: disable=inconsistent-return- if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def add_or_update_business_metadata_attributes( # pylint: disable=inconsistent-return-statements - self, - bm_name: str, - guid: str, - body: Optional[Dict[str, Any]] = None, - **kwargs: Any + self, bm_name: str, guid: str, body: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> None: """Add or update business metadata attributes. @@ -8399,16 +7298,16 @@ def add_or_update_business_metadata_attributes( # pylint: disable=inconsistent- "str": {} # Optional. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8424,14 +7323,12 @@ def add_or_update_business_metadata_attributes( # pylint: disable=inconsistent- params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8442,43 +7339,33 @@ def add_or_update_business_metadata_attributes( # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, {}) - - @distributed_trace - def get_sample_business_metadata_template( - self, - **kwargs: Any - ) -> IO: + def get_sample_business_metadata_template(self, **kwargs: Any) -> IO: """Get the sample Template for uploading/creating bulk BusinessMetaData. :return: IO :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[IO] + cls = kwargs.pop("cls", None) # type: ClsType[IO] - request = build_entity_get_sample_business_metadata_template_request( headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=True, - **kwargs + request, stream=True, **kwargs ) response = pipeline_response.http_response @@ -8493,27 +7380,17 @@ def get_sample_business_metadata_template( return cast(IO, deserialized) - - @distributed_trace @abc.abstractmethod - def import_business_metadata( - self, - *args, - **kwargs - ) -> JSON: + def import_business_metadata(self, *args, **kwargs) -> JSON: """You need to write a custom operation for "import_business_metadata". Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize. """ - @distributed_trace def delete_labels( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[List[str]] = None, - **kwargs: Any + self, guid: str, body: Optional[List[str]] = None, **kwargs: Any ) -> None: """delete given labels to a given entity. @@ -8533,16 +7410,16 @@ def delete_labels( # pylint: disable=inconsistent-return-statements "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8557,14 +7434,12 @@ def delete_labels( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8575,14 +7450,9 @@ def delete_labels( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def set_labels( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[List[str]] = None, - **kwargs: Any + self, guid: str, body: Optional[List[str]] = None, **kwargs: Any ) -> None: """Set labels to a given entity. @@ -8602,16 +7472,16 @@ def set_labels( # pylint: disable=inconsistent-return-statements "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8626,14 +7496,12 @@ def set_labels( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8644,14 +7512,9 @@ def set_labels( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def add_label( # pylint: disable=inconsistent-return-statements - self, - guid: str, - body: Optional[List[str]] = None, - **kwargs: Any + self, guid: str, body: Optional[List[str]] = None, **kwargs: Any ) -> None: """add given labels to a given entity. @@ -8671,16 +7534,16 @@ def add_label( # pylint: disable=inconsistent-return-statements "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8695,14 +7558,12 @@ def add_label( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8713,8 +7574,6 @@ def add_label( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -8750,16 +7609,16 @@ def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-return-st "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8775,14 +7634,12 @@ def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-return-st params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8793,8 +7650,6 @@ def delete_labels_by_unique_attribute( # pylint: disable=inconsistent-return-st if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -8829,16 +7684,16 @@ def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8854,14 +7709,12 @@ def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8872,8 +7725,6 @@ def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, @@ -8908,16 +7759,16 @@ def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] if body is not None: _json = body @@ -8933,14 +7784,12 @@ def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -8969,7 +7818,6 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace def list_glossaries( self, @@ -9080,17 +7928,14 @@ def list_glossaries( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossaries_request( limit=limit, offset=offset, @@ -9100,14 +7945,12 @@ def list_glossaries( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9125,14 +7968,8 @@ def list_glossaries( return cast(List[JSON], deserialized) - - @distributed_trace - def create_glossary( - self, - atlas_glossary: JSON, - **kwargs: Any - ) -> JSON: + def create_glossary(self, atlas_glossary: JSON, **kwargs: Any) -> JSON: """Create a glossary. :param atlas_glossary: Glossary definition, terms & categories can be anchored to a glossary. @@ -9291,16 +8128,16 @@ def create_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = atlas_glossary @@ -9311,14 +8148,12 @@ def create_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9336,14 +8171,8 @@ def create_glossary( return cast(JSON, deserialized) - - @distributed_trace - def create_glossary_categories( - self, - glossary_category: List[JSON], - **kwargs: Any - ) -> List[JSON]: + def create_glossary_categories(self, glossary_category: List[JSON], **kwargs: Any) -> List[JSON]: """Create glossary category in bulk. :param glossary_category: An array of glossary category definitions to be created. @@ -9547,16 +8376,16 @@ def create_glossary_categories( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] _json = glossary_category @@ -9567,14 +8396,12 @@ def create_glossary_categories( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9592,14 +8419,8 @@ def create_glossary_categories( return cast(List[JSON], deserialized) - - @distributed_trace - def create_glossary_category( - self, - glossary_category: JSON, - **kwargs: Any - ) -> JSON: + def create_glossary_category(self, glossary_category: JSON, **kwargs: Any) -> JSON: """Create a glossary category. :param glossary_category: The glossary category definition. A category must be anchored to a @@ -9784,16 +8605,16 @@ def create_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_category @@ -9804,14 +8625,12 @@ def create_glossary_category( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9829,14 +8648,8 @@ def create_glossary_category( return cast(JSON, deserialized) - - @distributed_trace - def get_glossary_category( - self, - category_guid: str, - **kwargs: Any - ) -> JSON: + def get_glossary_category(self, category_guid: str, **kwargs: Any) -> JSON: """Get specific glossary category by its GUID. :param category_guid: The globally unique identifier of the category. @@ -9933,31 +8746,26 @@ def get_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_glossary_category_request( category_guid=category_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -9975,15 +8783,8 @@ def get_glossary_category( return cast(JSON, deserialized) - - @distributed_trace - def update_glossary_category( - self, - category_guid: str, - glossary_category: JSON, - **kwargs: Any - ) -> JSON: + def update_glossary_category(self, category_guid: str, glossary_category: JSON, **kwargs: Any) -> JSON: """Update the given glossary category by its GUID. :param category_guid: The globally unique identifier of the category. @@ -10167,16 +8968,16 @@ def update_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_category @@ -10188,14 +8989,12 @@ def update_glossary_category( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10213,13 +9012,9 @@ def update_glossary_category( return cast(JSON, deserialized) - - @distributed_trace def delete_glossary_category( # pylint: disable=inconsistent-return-statements - self, - category_guid: str, - **kwargs: Any + self, category_guid: str, **kwargs: Any ) -> None: """Delete a glossary category. @@ -10229,31 +9024,26 @@ def delete_glossary_category( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_glossary_delete_glossary_category_request( category_guid=category_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10264,14 +9054,9 @@ def delete_glossary_category( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def partial_update_glossary_category( - self, - category_guid: str, - partial_updates: Dict[str, str], - **kwargs: Any + self, category_guid: str, partial_updates: Dict[str, str], **kwargs: Any ) -> JSON: """Update the glossary category partially. @@ -10377,16 +9162,16 @@ def partial_update_glossary_category( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = partial_updates @@ -10398,14 +9183,12 @@ def partial_update_glossary_category( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10423,8 +9206,6 @@ def partial_update_glossary_category( return cast(JSON, deserialized) - - @distributed_trace def list_related_categories( self, @@ -10469,17 +9250,14 @@ def list_related_categories( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, List[JSON]]] + cls = kwargs.pop("cls", None) # type: ClsType[Dict[str, List[JSON]]] - request = build_glossary_list_related_categories_request( category_guid=category_guid, limit=limit, @@ -10489,14 +9267,12 @@ def list_related_categories( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10514,8 +9290,6 @@ def list_related_categories( return cast(Dict[str, List[JSON]], deserialized) - - @distributed_trace def list_category_terms( self, @@ -10559,17 +9333,14 @@ def list_category_terms( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_category_terms_request( category_guid=category_guid, limit=limit, @@ -10579,14 +9350,12 @@ def list_category_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -10604,15 +9373,9 @@ def list_category_terms( return cast(List[JSON], deserialized) - - @distributed_trace def create_glossary_term( - self, - glossary_term: JSON, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_term: JSON, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: """Create a glossary term. @@ -11297,16 +10060,16 @@ def create_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_term @@ -11318,14 +10081,12 @@ def create_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -11343,8 +10104,6 @@ def create_glossary_term( return cast(JSON, deserialized) - - @distributed_trace def get_glossary_term( self, @@ -11704,17 +10463,14 @@ def get_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_glossary_term_request( term_guid=term_guid, include_term_hierarchy=include_term_hierarchy, @@ -11723,14 +10479,12 @@ def get_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -11748,16 +10502,9 @@ def get_glossary_term( return cast(JSON, deserialized) - - @distributed_trace def update_glossary_term( - self, - term_guid: str, - glossary_term: JSON, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, term_guid: str, glossary_term: JSON, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: """Update the given glossary term by its GUID. @@ -12442,16 +11189,16 @@ def update_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = glossary_term @@ -12464,14 +11211,12 @@ def update_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12489,13 +11234,9 @@ def update_glossary_term( return cast(JSON, deserialized) - - @distributed_trace def delete_glossary_term( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - **kwargs: Any + self, term_guid: str, **kwargs: Any ) -> None: """Delete a glossary term. @@ -12505,31 +11246,26 @@ def delete_glossary_term( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_glossary_delete_glossary_term_request( term_guid=term_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12540,8 +11276,6 @@ def delete_glossary_term( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def partial_update_glossary_term( self, @@ -12906,16 +11640,16 @@ def partial_update_glossary_term( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = partial_updates @@ -12928,14 +11662,12 @@ def partial_update_glossary_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -12953,15 +11685,9 @@ def partial_update_glossary_term( return cast(JSON, deserialized) - - @distributed_trace def create_glossary_terms( - self, - glossary_term: List[JSON], - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_term: List[JSON], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> List[JSON]: """Create glossary terms in bulk. @@ -13718,16 +12444,16 @@ def create_glossary_terms( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] _json = glossary_term @@ -13739,14 +12465,12 @@ def create_glossary_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13764,8 +12488,6 @@ def create_glossary_terms( return cast(List[JSON], deserialized) - - @distributed_trace def get_entities_assigned_with_term( self, @@ -13820,17 +12542,14 @@ def get_entities_assigned_with_term( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_get_entities_assigned_with_term_request( term_guid=term_guid, limit=limit, @@ -13840,14 +12559,12 @@ def get_entities_assigned_with_term( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13865,14 +12582,9 @@ def get_entities_assigned_with_term( return cast(List[JSON], deserialized) - - @distributed_trace def assign_term_to_entities( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - related_object_ids: List[JSON], - **kwargs: Any + self, term_guid: str, related_object_ids: List[JSON], **kwargs: Any ) -> None: """Assign the given term to the provided list of related objects. @@ -13915,16 +12627,16 @@ def assign_term_to_entities( # pylint: disable=inconsistent-return-statements } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = related_object_ids @@ -13936,14 +12648,12 @@ def assign_term_to_entities( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -13954,14 +12664,9 @@ def assign_term_to_entities( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def remove_term_assignment_from_entities( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - related_object_ids: List[JSON], - **kwargs: Any + self, term_guid: str, related_object_ids: List[JSON], **kwargs: Any ) -> None: """Delete the term assignment for the given list of related objects. @@ -14004,16 +12709,16 @@ def remove_term_assignment_from_entities( # pylint: disable=inconsistent-return } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = related_object_ids @@ -14025,14 +12730,12 @@ def remove_term_assignment_from_entities( # pylint: disable=inconsistent-return params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14043,14 +12746,9 @@ def remove_term_assignment_from_entities( # pylint: disable=inconsistent-return if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def delete_term_assignment_from_entities( # pylint: disable=inconsistent-return-statements - self, - term_guid: str, - related_object_ids: List[JSON], - **kwargs: Any + self, term_guid: str, related_object_ids: List[JSON], **kwargs: Any ) -> None: """Delete the term assignment for the given list of related objects. @@ -14093,16 +12791,16 @@ def delete_term_assignment_from_entities( # pylint: disable=inconsistent-return } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = related_object_ids @@ -14114,14 +12812,12 @@ def delete_term_assignment_from_entities( # pylint: disable=inconsistent-return params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14132,8 +12828,6 @@ def delete_term_assignment_from_entities( # pylint: disable=inconsistent-return if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def list_related_terms( self, @@ -14182,17 +12876,14 @@ def list_related_terms( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, List[JSON]]] + cls = kwargs.pop("cls", None) # type: ClsType[Dict[str, List[JSON]]] - request = build_glossary_list_related_terms_request( term_guid=term_guid, limit=limit, @@ -14202,14 +12893,12 @@ def list_related_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14227,14 +12916,8 @@ def list_related_terms( return cast(Dict[str, List[JSON]], deserialized) - - @distributed_trace - def get_glossary( - self, - glossary_guid: str, - **kwargs: Any - ) -> JSON: + def get_glossary(self, glossary_guid: str, **kwargs: Any) -> JSON: """Get a specific Glossary by its GUID. :param glossary_guid: The globally unique identifier for glossary. @@ -14319,31 +13002,26 @@ def get_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_glossary_request( glossary_guid=glossary_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14361,15 +13039,8 @@ def get_glossary( return cast(JSON, deserialized) - - @distributed_trace - def update_glossary( - self, - glossary_guid: str, - updated_glossary: JSON, - **kwargs: Any - ) -> JSON: + def update_glossary(self, glossary_guid: str, updated_glossary: JSON, **kwargs: Any) -> JSON: """Update the given glossary. :param glossary_guid: The globally unique identifier for glossary. @@ -14529,16 +13200,16 @@ def update_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = updated_glossary @@ -14550,14 +13221,12 @@ def update_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14575,13 +13244,9 @@ def update_glossary( return cast(JSON, deserialized) - - @distributed_trace def delete_glossary( # pylint: disable=inconsistent-return-statements - self, - glossary_guid: str, - **kwargs: Any + self, glossary_guid: str, **kwargs: Any ) -> None: """Delete a glossary. @@ -14591,31 +13256,26 @@ def delete_glossary( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_glossary_delete_glossary_request( glossary_guid=glossary_guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14626,8 +13286,6 @@ def delete_glossary( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def list_glossary_categories( self, @@ -14751,17 +13409,14 @@ def list_glossary_categories( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_categories_request( glossary_guid=glossary_guid, limit=limit, @@ -14771,14 +13426,12 @@ def list_glossary_categories( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14796,8 +13449,6 @@ def list_glossary_categories( return cast(List[JSON], deserialized) - - @distributed_trace def list_glossary_categories_headers( self, @@ -14838,17 +13489,14 @@ def list_glossary_categories_headers( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_categories_headers_request( glossary_guid=glossary_guid, limit=limit, @@ -14858,14 +13506,12 @@ def list_glossary_categories_headers( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -14883,15 +13529,9 @@ def list_glossary_categories_headers( return cast(List[JSON], deserialized) - - @distributed_trace def get_detailed_glossary( - self, - glossary_guid: str, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_guid: str, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: """Get a specific glossary with detailed information. @@ -15506,17 +14146,14 @@ def get_detailed_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_detailed_glossary_request( glossary_guid=glossary_guid, include_term_hierarchy=include_term_hierarchy, @@ -15524,14 +14161,12 @@ def get_detailed_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15549,8 +14184,6 @@ def get_detailed_glossary( return cast(JSON, deserialized) - - @distributed_trace def partial_update_glossary( self, @@ -15655,16 +14288,16 @@ def partial_update_glossary( "usage": "str" # Optional. The usage of the glossary. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = partial_updates @@ -15677,14 +14310,12 @@ def partial_update_glossary( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -15702,8 +14333,6 @@ def partial_update_glossary( return cast(JSON, deserialized) - - @distributed_trace def list_glossary_terms( self, @@ -16105,17 +14734,14 @@ def list_glossary_terms( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_terms_request( glossary_guid=glossary_guid, include_term_hierarchy=include_term_hierarchy, @@ -16126,14 +14752,12 @@ def list_glossary_terms( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16151,8 +14775,6 @@ def list_glossary_terms( return cast(List[JSON], deserialized) - - @distributed_trace def list_glossary_term_headers( self, @@ -16196,17 +14818,14 @@ def list_glossary_term_headers( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_glossary_term_headers_request( glossary_guid=glossary_guid, limit=limit, @@ -16216,14 +14835,12 @@ def list_glossary_term_headers( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16241,29 +14858,19 @@ def list_glossary_term_headers( return cast(List[JSON], deserialized) - - def _import_glossary_terms_via_csv_initial( - self, - glossary_guid: str, - file: IO, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_guid: str, file: IO, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_import_glossary_terms_via_csv_request_initial( glossary_guid=glossary_guid, api_version=api_version, @@ -16273,14 +14880,12 @@ def _import_glossary_terms_via_csv_initial( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16298,42 +14903,27 @@ def _import_glossary_terms_via_csv_initial( return cast(JSON, deserialized) - - @distributed_trace @abc.abstractmethod - def begin_import_glossary_terms_via_csv( - self, - *args, - **kwargs - ) -> LROPoller[JSON]: + def begin_import_glossary_terms_via_csv(self, *args, **kwargs) -> LROPoller[JSON]: """You need to write a custom operation for "begin_import_glossary_terms_via_csv". Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize. """ - def _import_glossary_terms_via_csv_by_glossary_name_initial( - self, - glossary_name: str, - file: IO, - *, - include_term_hierarchy: Optional[bool] = False, - **kwargs: Any + self, glossary_name: str, file: IO, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSON: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial( glossary_name=glossary_name, api_version=api_version, @@ -16343,14 +14933,12 @@ def _import_glossary_terms_via_csv_by_glossary_name_initial( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16368,28 +14956,17 @@ def _import_glossary_terms_via_csv_by_glossary_name_initial( return cast(JSON, deserialized) - - @distributed_trace @abc.abstractmethod - def begin_import_glossary_terms_via_csv_by_glossary_name( - self, - *args, - **kwargs - ) -> LROPoller[JSON]: + def begin_import_glossary_terms_via_csv_by_glossary_name(self, *args, **kwargs) -> LROPoller[JSON]: """You need to write a custom operation for "begin_import_glossary_terms_via_csv_by_glossary_name". Please refer to https://aka.ms/azsdk/python/dpcodegen/python/customize to learn how to customize. """ - @distributed_trace - def get_import_csv_operation_status( - self, - operation_guid: str, - **kwargs: Any - ) -> JSON: + def get_import_csv_operation_status(self, operation_guid: str, **kwargs: Any) -> JSON: """Get the status of import csv operation. :param operation_guid: The globally unique identifier for async operation/job. @@ -16422,18 +14999,15 @@ def get_import_csv_operation_status( Known values are: "NotStarted", "Succeeded", "Failed", "Running". } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_glossary_get_import_csv_operation_status_request( operation_guid=operation_guid, api_version=api_version, @@ -16441,14 +15015,12 @@ def get_import_csv_operation_status( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16466,8 +15038,6 @@ def get_import_csv_operation_status( return cast(JSON, deserialized) - - @distributed_trace def export_glossary_terms_as_csv( self, @@ -16497,17 +15067,17 @@ def export_glossary_terms_as_csv( "str" # Optional. ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[IO] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[IO] _json = term_guids @@ -16521,14 +15091,12 @@ def export_glossary_terms_as_csv( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -16546,8 +15114,6 @@ def export_glossary_terms_as_csv( return cast(IO, deserialized) - - @distributed_trace def list_terms_by_glossary_name( self, @@ -16946,18 +15512,15 @@ def list_terms_by_glossary_name( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_glossary_list_terms_by_glossary_name_request( glossary_name=glossary_name, api_version=api_version, @@ -16968,14 +15531,12 @@ def list_terms_by_glossary_name( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17011,13 +15572,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def query( - self, - search_request: JSON, - **kwargs: Any - ) -> JSON: + def query(self, search_request: JSON, **kwargs: Any) -> JSON: """Gets data using search. :param search_request: An object specifying the search criteria. @@ -17202,17 +15758,17 @@ def query( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = search_request @@ -17224,14 +15780,12 @@ def query( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17249,14 +15803,8 @@ def query( return cast(JSON, deserialized) - - @distributed_trace - def suggest( - self, - suggest_request: JSON, - **kwargs: Any - ) -> JSON: + def suggest(self, suggest_request: JSON, **kwargs: Any) -> JSON: """Get search suggestions by query criteria. :param suggest_request: An object specifying the suggest criteria. @@ -17333,17 +15881,17 @@ def suggest( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = suggest_request @@ -17355,14 +15903,12 @@ def suggest( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17380,14 +15926,8 @@ def suggest( return cast(JSON, deserialized) - - @distributed_trace - def browse( - self, - browse_request: JSON, - **kwargs: Any - ) -> JSON: + def browse(self, browse_request: JSON, **kwargs: Any) -> JSON: """Browse entities by path or entity type. :param browse_request: An object specifying the browse criteria. @@ -17439,17 +15979,17 @@ def browse( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = browse_request @@ -17461,14 +16001,12 @@ def browse( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17486,14 +16024,8 @@ def browse( return cast(JSON, deserialized) - - @distributed_trace - def auto_complete( - self, - auto_complete_request: JSON, - **kwargs: Any - ) -> JSON: + def auto_complete(self, auto_complete_request: JSON, **kwargs: Any) -> JSON: """Get auto complete options. :param auto_complete_request: An object specifying the autocomplete criteria. @@ -17526,17 +16058,17 @@ def auto_complete( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = auto_complete_request @@ -17548,14 +16080,12 @@ def auto_complete( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17591,7 +16121,6 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace def get_lineage_graph( self, @@ -17751,17 +16280,14 @@ def get_lineage_graph( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_lineage_get_lineage_graph_request( guid=guid, direction=direction, @@ -17773,14 +16299,12 @@ def get_lineage_graph( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -17798,8 +16322,6 @@ def get_lineage_graph( return cast(JSON, deserialized) - - @distributed_trace def next_page_lineage( self, @@ -17955,18 +16477,15 @@ def next_page_lineage( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_lineage_next_page_lineage_request( guid=guid, api_version=api_version, @@ -17978,14 +16497,12 @@ def next_page_lineage( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18003,8 +16520,6 @@ def next_page_lineage( return cast(JSON, deserialized) - - @distributed_trace def get_lineage_by_unique_attribute( self, @@ -18171,17 +16686,14 @@ def get_lineage_by_unique_attribute( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_lineage_get_lineage_by_unique_attribute_request( type_name=type_name, direction=direction, @@ -18193,14 +16705,12 @@ def get_lineage_by_unique_attribute( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18236,13 +16746,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def create( - self, - relationship: JSON, - **kwargs: Any - ) -> JSON: + def create(self, relationship: JSON, **kwargs: Any) -> JSON: """Create a new relationship between entities. :param relationship: The AtlasRelationship object containing the information for the @@ -18325,16 +16830,16 @@ def create( "version": 0.0 # Optional. The version of the relationship. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = relationship @@ -18345,14 +16850,12 @@ def create( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18370,14 +16873,8 @@ def create( return cast(JSON, deserialized) - - @distributed_trace - def update( - self, - relationship: JSON, - **kwargs: Any - ) -> JSON: + def update(self, relationship: JSON, **kwargs: Any) -> JSON: """Update an existing relationship between entities. :param relationship: The AtlasRelationship object containing the information for the @@ -18460,16 +16957,16 @@ def update( "version": 0.0 # Optional. The version of the relationship. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = relationship @@ -18480,14 +16977,12 @@ def update( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18505,16 +17000,8 @@ def update( return cast(JSON, deserialized) - - @distributed_trace - def get( - self, - guid: str, - *, - extended_info: Optional[bool] = None, - **kwargs: Any - ) -> JSON: + def get(self, guid: str, *, extended_info: Optional[bool] = None, **kwargs: Any) -> JSON: """Get relationship information between entities by its GUID. :param guid: The globally unique identifier of the relationship. @@ -18654,17 +17141,14 @@ def get( } } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_relationship_get_request( guid=guid, extended_info=extended_info, @@ -18672,14 +17156,12 @@ def get( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18697,14 +17179,8 @@ def get( return cast(JSON, deserialized) - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - guid: str, - **kwargs: Any - ) -> None: + def delete(self, guid: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """Delete a relationship between entities by its GUID. :param guid: The globally unique identifier of the relationship. @@ -18713,31 +17189,26 @@ def delete( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_relationship_delete_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18766,13 +17237,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def get_business_metadata_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_business_metadata_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the businessMetadata definition for the given guid. :param guid: businessMetadata guid. @@ -18892,31 +17358,26 @@ def get_business_metadata_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_business_metadata_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -18934,14 +17395,8 @@ def get_business_metadata_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_business_metadata_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_business_metadata_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the businessMetadata definition by it's name (unique). :param name: businessMetadata name. @@ -19061,31 +17516,26 @@ def get_business_metadata_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_business_metadata_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -19103,14 +17553,8 @@ def get_business_metadata_def_by_name( return cast(JSON, deserialized) - - @distributed_trace - def get_classification_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_classification_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the classification definition for the given GUID. :param guid: The globally unique identifier of the classification. @@ -19251,31 +17695,26 @@ def get_classification_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_classification_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -19293,14 +17732,8 @@ def get_classification_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_classification_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_classification_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the classification definition by its name (unique). :param name: The name of the classification. @@ -19441,31 +17874,26 @@ def get_classification_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_classification_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -19483,14 +17911,8 @@ def get_classification_def_by_name( return cast(JSON, deserialized) - - @distributed_trace - def get_entity_definition_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_entity_definition_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the Entity definition for the given GUID. :param guid: The globally unique identifier of the entity. @@ -19657,31 +18079,26 @@ def get_entity_definition_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_entity_definition_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -19699,14 +18116,8 @@ def get_entity_definition_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_entity_definition_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_entity_definition_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the entity definition by its name (unique). :param name: The name of the entity. @@ -19873,31 +18284,26 @@ def get_entity_definition_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_entity_definition_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -19915,14 +18321,8 @@ def get_entity_definition_by_name( return cast(JSON, deserialized) - - @distributed_trace - def get_enum_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_enum_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the enum definition for the given GUID. :param guid: The globally unique identifier of the enum. @@ -20016,31 +18416,26 @@ def get_enum_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_enum_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -20058,14 +18453,8 @@ def get_enum_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_enum_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_enum_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the enum definition by its name (unique). :param name: The name of the enum. @@ -20159,31 +18548,26 @@ def get_enum_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_enum_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -20201,14 +18585,8 @@ def get_enum_def_by_name( return cast(JSON, deserialized) - - @distributed_trace - def get_relationship_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_relationship_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the relationship definition for the given GUID. :param guid: The globally unique identifier of the relationship. @@ -20362,31 +18740,26 @@ def get_relationship_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_relationship_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -20404,14 +18777,8 @@ def get_relationship_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_relationship_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_relationship_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the relationship definition by its name (unique). :param name: The name of the relationship. @@ -20565,31 +18932,26 @@ def get_relationship_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_relationship_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -20607,14 +18969,8 @@ def get_relationship_def_by_name( return cast(JSON, deserialized) - - @distributed_trace - def get_struct_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_struct_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the struct definition for the given GUID. :param guid: The globally unique identifier of the struct. @@ -20734,31 +19090,26 @@ def get_struct_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_struct_def_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -20776,14 +19127,8 @@ def get_struct_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_struct_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_struct_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the struct definition by its name (unique). :param name: The name of the struct. @@ -20903,31 +19248,26 @@ def get_struct_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_struct_def_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -20945,14 +19285,8 @@ def get_struct_def_by_name( return cast(JSON, deserialized) - - @distributed_trace - def get_type_definition_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_type_definition_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the type definition for the given GUID. :param guid: The globally unique identifier of the type. @@ -21179,31 +19513,26 @@ def get_type_definition_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_type_definition_by_guid_request( guid=guid, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -21221,14 +19550,8 @@ def get_type_definition_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_type_definition_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_type_definition_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the type definition by its name (unique). :param name: The name of the type. @@ -21455,31 +19778,26 @@ def get_type_definition_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_type_definition_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -21497,14 +19815,8 @@ def get_type_definition_by_name( return cast(JSON, deserialized) - - @distributed_trace - def delete_type_by_name( # pylint: disable=inconsistent-return-statements - self, - name: str, - **kwargs: Any - ) -> None: + def delete_type_by_name(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements """Delete API for type identified by its name. :param name: The name of the type. @@ -21513,31 +19825,26 @@ def delete_type_by_name( # pylint: disable=inconsistent-return-statements :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_types_delete_type_by_name_request( name=name, headers=_headers, params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -21548,15 +19855,9 @@ def delete_type_by_name( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def get_all_type_definitions( - self, - *, - include_term_template: Optional[bool] = False, - type: Optional[str] = None, - **kwargs: Any + self, *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> JSON: """Get all type definitions in Atlas in bulk. @@ -22538,17 +20839,14 @@ def get_all_type_definitions( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_all_type_definitions_request( include_term_template=include_term_template, type=type, @@ -22556,14 +20854,12 @@ def get_all_type_definitions( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -22581,14 +20877,8 @@ def get_all_type_definitions( return cast(JSON, deserialized) - - @distributed_trace - def create_type_definitions( - self, - types_def: JSON, - **kwargs: Any - ) -> JSON: + def create_type_definitions(self, types_def: JSON, **kwargs: Any) -> JSON: """Create all atlas type definitions in bulk, only new definitions will be created. Any changes to the existing definitions will be discarded. @@ -24529,16 +22819,16 @@ def create_type_definitions( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = types_def @@ -24549,14 +22839,12 @@ def create_type_definitions( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -24574,14 +22862,8 @@ def create_type_definitions( return cast(JSON, deserialized) - - @distributed_trace - def update_atlas_type_definitions( - self, - types_def: JSON, - **kwargs: Any - ) -> JSON: + def update_atlas_type_definitions(self, types_def: JSON, **kwargs: Any) -> JSON: """Update all types in bulk, changes detected in the type definitions would be persisted. :param types_def: A composite object that captures all type definition changes. @@ -26521,16 +24803,16 @@ def update_atlas_type_definitions( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = types_def @@ -26541,14 +24823,12 @@ def update_atlas_type_definitions( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -26566,13 +24846,9 @@ def update_atlas_type_definitions( return cast(JSON, deserialized) - - @distributed_trace def delete_type_definitions( # pylint: disable=inconsistent-return-statements - self, - types_def: JSON, - **kwargs: Any + self, types_def: JSON, **kwargs: Any ) -> None: """Delete API for all types in bulk. @@ -27549,16 +25825,16 @@ def delete_type_definitions( # pylint: disable=inconsistent-return-statements ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[None] + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] _json = types_def @@ -27569,14 +25845,12 @@ def delete_type_definitions( # pylint: disable=inconsistent-return-statements params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -27587,15 +25861,9 @@ def delete_type_definitions( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - - @distributed_trace def list_type_definition_headers( - self, - *, - include_term_template: Optional[bool] = False, - type: Optional[str] = None, - **kwargs: Any + self, *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> List[JSON]: """List all type definitions returned as a list of minimal information header. @@ -27624,17 +25892,14 @@ def list_type_definition_headers( } ] """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + cls = kwargs.pop("cls", None) # type: ClsType[List[JSON]] - request = build_types_list_type_definition_headers_request( include_term_template=include_term_template, type=type, @@ -27642,14 +25907,12 @@ def list_type_definition_headers( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -27667,14 +25930,8 @@ def list_type_definition_headers( return cast(List[JSON], deserialized) - - @distributed_trace - def get_term_template_def_by_guid( - self, - guid: str, - **kwargs: Any - ) -> JSON: + def get_term_template_def_by_guid(self, guid: str, **kwargs: Any) -> JSON: """Get the term template definition for the given GUID. :param guid: The globally unique identifier of the term template. @@ -27794,18 +26051,15 @@ def get_term_template_def_by_guid( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_term_template_def_by_guid_request( guid=guid, api_version=api_version, @@ -27813,14 +26067,12 @@ def get_term_template_def_by_guid( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -27838,14 +26090,8 @@ def get_term_template_def_by_guid( return cast(JSON, deserialized) - - @distributed_trace - def get_term_template_def_by_name( - self, - name: str, - **kwargs: Any - ) -> JSON: + def get_term_template_def_by_name(self, name: str, **kwargs: Any) -> JSON: """Get the term template definition by its name (unique). :param name: The name of the term template. @@ -27965,18 +26211,15 @@ def get_term_template_def_by_name( "version": 0.0 # Optional. The version of the record. } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[JSON] - request = build_types_get_term_template_def_by_name_request( name=name, api_version=api_version, @@ -27984,14 +26227,12 @@ def get_term_template_def_by_name( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -28027,14 +26268,8 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def create_or_update( - self, - collection: str, - entity: JSON, - **kwargs: Any - ) -> JSON: + def create_or_update(self, collection: str, entity: JSON, **kwargs: Any) -> JSON: """Creates or updates an entity to a collection. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -28467,17 +26702,17 @@ def create_or_update( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entity @@ -28490,14 +26725,12 @@ def create_or_update( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -28515,15 +26748,8 @@ def create_or_update( return cast(JSON, deserialized) - - @distributed_trace - def create_or_update_bulk( - self, - collection: str, - entities: JSON, - **kwargs: Any - ) -> JSON: + def create_or_update_bulk(self, collection: str, entities: JSON, **kwargs: Any) -> JSON: """Creates or updates entities in bulk to a collection. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. @@ -28970,17 +27196,17 @@ def create_or_update_bulk( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = entities @@ -28993,14 +27219,12 @@ def create_or_update_bulk( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -29018,15 +27242,8 @@ def create_or_update_bulk( return cast(JSON, deserialized) - - @distributed_trace - def move_entities_to_collection( - self, - collection: str, - move_entities_request: JSON, - **kwargs: Any - ) -> JSON: + def move_entities_to_collection(self, collection: str, move_entities_request: JSON, **kwargs: Any) -> JSON: """Move existing entities to the target collection. :param collection: the collection unique name. @@ -29235,17 +27452,17 @@ def move_entities_to_collection( ] } """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-03-01-preview")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[JSON] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-03-01-preview")) # type: str + content_type = kwargs.pop( + "content_type", _headers.pop("Content-Type", "application/json") + ) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] _json = move_entities_request @@ -29258,14 +27475,12 @@ def move_entities_to_collection( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -29282,5 +27497,3 @@ def move_entities_to_collection( return cls(pipeline_response, cast(JSON, deserialized), {}) return cast(JSON, deserialized) - - diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_patch.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_patch.py index 94d9fa127ca3..efb99f6c2181 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_patch.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from ._operations import EntityOperations as EntityOperationsGenerated from ._operations import GlossaryOperations as GlossaryOperationsGenerated from typing import overload @@ -15,7 +16,13 @@ from msrest import Serializer -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod @@ -25,22 +32,24 @@ from azure.core.utils import case_insensitive_dict from .._vendor import _format_url_section + if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + + def patch_sdk(): pass + def build_entity_import_business_metadata_request( - files: Optional[Dict[str, Any]] = None, - content: Any = None, - **kwargs: Any + files: Optional[Dict[str, Any]] = None, content: Any = None, **kwargs: Any ) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] + content_type = kwargs.pop("content_type", None) # type: Optional[str] accept = "application/json" # Construct URL @@ -49,17 +58,11 @@ def build_entity_import_business_metadata_request( # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_header_parameters, files=files, content=content, **kwargs) - return HttpRequest( - method="POST", - url=_url, - headers=_header_parameters, - files=files, - content=content, - **kwargs - ) def build_glossary_import_glossary_terms_via_csv_request_initial( glossary_guid: str, @@ -69,14 +72,14 @@ def build_glossary_import_glossary_terms_via_csv_request_initial( include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] accept = "application/json" # Construct URL _url = "/glossary/{glossaryGuid}/terms/import" path_format_arguments = { - "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, 'str', max_length=4096, min_length=1), + "glossaryGuid": _SERIALIZER.url("glossary_guid", glossary_guid, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) @@ -84,14 +87,16 @@ def build_glossary_import_glossary_terms_via_csv_request_initial( # Construct parameters _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_term_hierarchy is not None: - _query_parameters['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters["includeTermHierarchy"] = _SERIALIZER.query( + "include_term_hierarchy", include_term_hierarchy, "bool" + ) + _query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="POST", @@ -112,14 +117,14 @@ def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initia include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> HttpRequest: - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] accept = "application/json" # Construct URL _url = "/glossary/name/{glossaryName}/terms/import" path_format_arguments = { - "glossaryName": _SERIALIZER.url("glossary_name", glossary_name, 'str', max_length=4096, min_length=1), + "glossaryName": _SERIALIZER.url("glossary_name", glossary_name, "str", max_length=4096, min_length=1), } _url = _format_url_section(_url, **path_format_arguments) @@ -127,14 +132,16 @@ def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initia # Construct parameters _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_term_hierarchy is not None: - _query_parameters['includeTermHierarchy'] = _SERIALIZER.query("include_term_hierarchy", include_term_hierarchy, 'bool') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters["includeTermHierarchy"] = _SERIALIZER.query( + "include_term_hierarchy", include_term_hierarchy, "bool" + ) + _query_parameters["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _header_parameters["Accept"] = _SERIALIZER.header("accept", accept, "str") return HttpRequest( method="POST", @@ -148,12 +155,8 @@ def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initia class EntityOperations(EntityOperationsGenerated): - - def import_business_metadata( - self, - *args, - **kwargs - ) -> JSON: + + def import_business_metadata(self, *args, **kwargs) -> JSON: _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} @@ -162,24 +165,22 @@ def import_business_metadata( params=_params, ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=True, - **kwargs + request, stream=True, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - + deserialized = response return deserialized - + class GlossaryOperations(GlossaryOperationsGenerated): @@ -190,16 +191,13 @@ def begin_import_glossary_terms_via_csv( *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any - ) -> LROPoller[JSON]: - api_version = kwargs.pop('api_version', "2022-03-01-preview") #type: str - content_type = kwargs.pop('content_type', None) #type: Optional[str] - polling = kwargs.pop('polling', True) #type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None)# type: ClsType[JSONType] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + ) -> LROPoller[JSON]: + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[JSONType] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._import_glossary_terms_via_csv_initial( glossary_guid=glossary_guid, @@ -207,10 +205,10 @@ def begin_import_glossary_terms_via_csv( include_term_hierarchy=include_term_hierarchy, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response @@ -222,21 +220,28 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = LROBasePolling( + lro_delay, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=path_format_arguments, + **kwargs + ) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output - ) + deserialization_callback=get_long_running_output, + ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) def begin_import_glossary_terms_via_csv_by_glossary_name( @@ -296,15 +301,12 @@ def begin_import_glossary_terms_via_csv_by_glossary_name( Possible values include: "NotStarted", "Succeeded", "Failed", "Running". } """ - api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[JSONType] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", "2022-03-01-preview") # type: str + content_type = kwargs.pop("content_type", None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[JSONType] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._import_glossary_terms_via_csv_by_glossary_name_initial( glossary_name=glossary_name, @@ -312,10 +314,10 @@ def begin_import_glossary_terms_via_csv_by_glossary_name( include_term_hierarchy=include_term_hierarchy, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response @@ -327,27 +329,32 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } - if polling is True: polling_method = LROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = LROBasePolling( + lro_delay, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=path_format_arguments, + **kwargs + ) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - - - -__all__= ['EntityOperations','GlossaryOperations'] # Add all objects you want publicly available to users at this package level - - +__all__ = [ + "EntityOperations", + "GlossaryOperations", +] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-catalog/setup.py b/sdk/purview/azure-purview-catalog/setup.py index 5cb4354bfa68..4bde2ec0187a 100644 --- a/sdk/purview/azure-purview-catalog/setup.py +++ b/sdk/purview/azure-purview-catalog/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,62 +16,68 @@ PACKAGE_PPRINT_NAME = "Azure Purview Catalog" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ "Development Status :: 7 - Inactive", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.purview', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.purview", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ - 'msrest>=0.6.21', - 'azure-core>=1.23.0,<2.0.0', + "msrest>=0.6.21", + "azure-core>=1.23.0,<2.0.0", ], - python_requires=">=3.6" + python_requires=">=3.6", ) diff --git a/sdk/purview/azure-purview-catalog/tests/conftest.py b/sdk/purview/azure-purview-catalog/tests/conftest.py index 17c760a2fcc6..dc232f107a24 100644 --- a/sdk/purview/azure-purview-catalog/tests/conftest.py +++ b/sdk/purview/azure-purview-catalog/tests/conftest.py @@ -30,7 +30,12 @@ from dotenv import load_dotenv -from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer, add_header_regex_sanitizer +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) # Ignore async tests for Python < 3.5 collect_ignore_glob = [] @@ -39,6 +44,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("PURVIEWCATALOG_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/purview/azure-purview-catalog/tests/test_smoke.py b/sdk/purview/azure-purview-catalog/tests/test_smoke.py index 4139dbb97ebb..2d9fd5c31bce 100644 --- a/sdk/purview/azure-purview-catalog/tests/test_smoke.py +++ b/sdk/purview/azure-purview-catalog/tests/test_smoke.py @@ -6,10 +6,17 @@ # -------------------------------------------------------------------------- from testcase import PurviewCatalogTest, PurviewCatalogPowerShellPreparer from urllib.parse import urlparse -from azure.purview.catalog.operations._operations import build_entity_delete_by_guids_request, build_entity_list_by_guids_request -from azure.purview.catalog.operations._patch import build_glossary_import_glossary_terms_via_csv_request_initial, build_entity_import_business_metadata_request +from azure.purview.catalog.operations._operations import ( + build_entity_delete_by_guids_request, + build_entity_list_by_guids_request, +) +from azure.purview.catalog.operations._patch import ( + build_glossary_import_glossary_terms_via_csv_request_initial, + build_entity_import_business_metadata_request, +) from devtools_testutils import recorded_by_proxy + class TestPurviewCatalogSmoke(PurviewCatalogTest): @PurviewCatalogPowerShellPreparer() @recorded_by_proxy @@ -17,7 +24,9 @@ def test_basic_smoke_test(self, purviewcatalog_endpoint): client = self.create_client(endpoint=purviewcatalog_endpoint) response = client.types.get_all_type_definitions() # cspell: disable-next-line - assert set(response.keys()) == set(['enumDefs', 'structDefs', 'classificationDefs', 'entityDefs', 'relationshipDefs','businessMetadataDefs']) + assert set(response.keys()) == set( + ["enumDefs", "structDefs", "classificationDefs", "entityDefs", "relationshipDefs", "businessMetadataDefs"] + ) @recorded_by_proxy def test_delete_by_guids(self): @@ -31,7 +40,9 @@ def test_list_by_guids(self): @recorded_by_proxy def test_glossary_import(self): - request = build_glossary_import_glossary_terms_via_csv_request_initial(glossary_guid="111",api_version="2022-03-01-preview",files={},include_term_hierarchy=False) + request = build_glossary_import_glossary_terms_via_csv_request_initial( + glossary_guid="111", api_version="2022-03-01-preview", files={}, include_term_hierarchy=False + ) assert "/glossary/111/terms/import" in urlparse(request.url) @recorded_by_proxy diff --git a/sdk/purview/azure-purview-catalog/tests/test_smoke_async.py b/sdk/purview/azure-purview-catalog/tests/test_smoke_async.py index bd97124b680b..803efc03108f 100644 --- a/sdk/purview/azure-purview-catalog/tests/test_smoke_async.py +++ b/sdk/purview/azure-purview-catalog/tests/test_smoke_async.py @@ -16,6 +16,8 @@ class TestPurviewCatalogSmokeAsync(PurviewCatalogTestAsync): async def test_basic_smoke_test(self, purviewcatalog_endpoint): client = self.create_async_client(endpoint=purviewcatalog_endpoint) response = await client.types.get_all_type_definitions() - + # cspell: disable-next-line - assert set(response.keys()) == set(['enumDefs', 'structDefs', 'classificationDefs', 'entityDefs', 'relationshipDefs','businessMetadataDefs']) + assert set(response.keys()) == set( + ["enumDefs", "structDefs", "classificationDefs", "entityDefs", "relationshipDefs", "businessMetadataDefs"] + ) diff --git a/sdk/purview/azure-purview-catalog/tests/testcase.py b/sdk/purview/azure-purview-catalog/tests/testcase.py index c2869612345a..9f378c9781cf 100644 --- a/sdk/purview/azure-purview-catalog/tests/testcase.py +++ b/sdk/purview/azure-purview-catalog/tests/testcase.py @@ -21,7 +21,5 @@ def create_client(self, endpoint): PurviewCatalogPowerShellPreparer = functools.partial( - PowerShellPreparer, - "purviewcatalog", - purviewcatalog_endpoint="https://fake_account.purview.azure.com" + PowerShellPreparer, "purviewcatalog", purviewcatalog_endpoint="https://fake_account.purview.azure.com" ) diff --git a/sdk/purview/azure-purview-catalog/tests/testcase_async.py b/sdk/purview/azure-purview-catalog/tests/testcase_async.py index fe839c2fb026..e12fe5484eba 100644 --- a/sdk/purview/azure-purview-catalog/tests/testcase_async.py +++ b/sdk/purview/azure-purview-catalog/tests/testcase_async.py @@ -8,6 +8,7 @@ from azure.purview.catalog import PurviewCatalogClient from azure.purview.catalog.aio import PurviewCatalogClient as AsyncPurviewCatalogClient + class PurviewCatalogTestAsync(AzureRecordedTestCase): def create_async_client(self, endpoint): @@ -16,4 +17,4 @@ def create_async_client(self, endpoint): AsyncPurviewCatalogClient, credential=credential, endpoint=endpoint, - ) \ No newline at end of file + ) diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_patch.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_patch.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_vendor.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_vendor.py index e6f010934827..d5edf05a53b8 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_vendor.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_vendor.py @@ -10,7 +10,6 @@ from ._model_base import Model, SdkJSONEncoder - # file-like tuple could be `(filename, IO (or bytes))` or `(filename, IO (or bytes), content_type)` FileContent = Union[str, bytes, IO[str], IO[bytes]] diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/_patch.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/_patch.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_patch.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_patch.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_patch.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_patch.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_patch.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_patch.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-datamap/setup.py b/sdk/purview/azure-purview-datamap/setup.py index 2f897189a3b7..05cb22ad4325 100644 --- a/sdk/purview/azure-purview-datamap/setup.py +++ b/sdk/purview/azure-purview-datamap/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-purview-datamap" PACKAGE_PPRINT_NAME = "Azure Purview Datamap" diff --git a/sdk/purview/azure-purview-scanning/azure/__init__.py b/sdk/purview/azure-purview-scanning/azure/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-scanning/azure/__init__.py +++ b/sdk/purview/azure-purview-scanning/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-scanning/azure/purview/__init__.py b/sdk/purview/azure-purview-scanning/azure/purview/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/__init__.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/__init__.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/__init__.py index d19c0b8bd063..13c0a4f5c1c6 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/__init__.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['PurviewScanningClient'] +__all__ = ["PurviewScanningClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_configuration.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_configuration.py index e38efe391ef1..9eb867fef48b 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_configuration.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = "2018-12-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-scanning/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-scanning/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_purview_scanning_client.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_purview_scanning_client.py index 87f7f40de987..bf86db38fbac 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_purview_scanning_client.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_purview_scanning_client.py @@ -13,7 +13,17 @@ from msrest import Deserializer, Serializer from ._configuration import PurviewScanningClientConfiguration -from .operations import ClassificationRulesOperations, DataSourcesOperations, FiltersOperations, KeyVaultConnectionsOperations, ScanResultOperations, ScanRulesetsOperations, ScansOperations, SystemScanRulesetsOperations, TriggersOperations +from .operations import ( + ClassificationRulesOperations, + DataSourcesOperations, + FiltersOperations, + KeyVaultConnectionsOperations, + ScanResultOperations, + ScanRulesetsOperations, + ScansOperations, + SystemScanRulesetsOperations, + TriggersOperations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -22,6 +32,7 @@ from azure.core.credentials import TokenCredential from azure.core.rest import HttpRequest, HttpResponse + class PurviewScanningClient(object): """Creates a Microsoft.Scanning management client. @@ -57,24 +68,29 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - _endpoint = '{Endpoint}' + _endpoint = "{Endpoint}" self._config = PurviewScanningClientConfiguration(endpoint, credential, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.key_vault_connections = KeyVaultConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.classification_rules = ClassificationRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.key_vault_connections = KeyVaultConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.classification_rules = ClassificationRulesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.data_sources = DataSourcesOperations(self._client, self._config, self._serialize, self._deserialize) self.filters = FiltersOperations(self._client, self._config, self._serialize, self._deserialize) self.scans = ScansOperations(self._client, self._config, self._serialize, self._deserialize) self.scan_result = ScanResultOperations(self._client, self._config, self._serialize, self._deserialize) self.scan_rulesets = ScanRulesetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.system_scan_rulesets = SystemScanRulesetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.system_scan_rulesets = SystemScanRulesetsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.triggers = TriggersOperations(self._client, self._config, self._serialize, self._deserialize) - def send_request( self, request, # type: HttpRequest @@ -100,7 +116,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_vendor.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_vendor.py index 138f663c53a4..9aad73fc743e 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_vendor.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -14,6 +15,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -21,7 +23,5 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/__init__.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/__init__.py index 05881913d621..43d6c620838b 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/__init__.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._purview_scanning_client import PurviewScanningClient -__all__ = ['PurviewScanningClient'] + +__all__ = ["PurviewScanningClient"] diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_configuration.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_configuration.py index 72a4bac216fe..25b7de992ca0 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_configuration.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_configuration.py @@ -30,12 +30,7 @@ class PurviewScanningClientConfiguration(Configuration): :type credential: ~azure.core.credentials_async.AsyncTokenCredential """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") if credential is None: @@ -45,22 +40,21 @@ def __init__( self.endpoint = endpoint self.credential = credential self.api_version = "2018-12-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) - kwargs.setdefault('sdk_moniker', 'purview-scanning/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://purview.azure.net/.default"]) + kwargs.setdefault("sdk_moniker", "purview-scanning/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_purview_scanning_client.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_purview_scanning_client.py index 3e8e7f3987a7..4a4ad7f4e34b 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_purview_scanning_client.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_purview_scanning_client.py @@ -14,7 +14,17 @@ from msrest import Deserializer, Serializer from ._configuration import PurviewScanningClientConfiguration -from .operations import ClassificationRulesOperations, DataSourcesOperations, FiltersOperations, KeyVaultConnectionsOperations, ScanResultOperations, ScanRulesetsOperations, ScansOperations, SystemScanRulesetsOperations, TriggersOperations +from .operations import ( + ClassificationRulesOperations, + DataSourcesOperations, + FiltersOperations, + KeyVaultConnectionsOperations, + ScanResultOperations, + ScanRulesetsOperations, + ScansOperations, + SystemScanRulesetsOperations, + TriggersOperations, +) if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -22,6 +32,7 @@ from azure.core.credentials_async import AsyncTokenCredential + class PurviewScanningClient: """Creates a Microsoft.Scanning management client. @@ -53,35 +64,31 @@ class PurviewScanningClient: :type credential: ~azure.core.credentials_async.AsyncTokenCredential """ - def __init__( - self, - endpoint: str, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}' + def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + _endpoint = "{Endpoint}" self._config = PurviewScanningClientConfiguration(endpoint, credential, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.key_vault_connections = KeyVaultConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) - self.classification_rules = ClassificationRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.key_vault_connections = KeyVaultConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.classification_rules = ClassificationRulesOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.data_sources = DataSourcesOperations(self._client, self._config, self._serialize, self._deserialize) self.filters = FiltersOperations(self._client, self._config, self._serialize, self._deserialize) self.scans = ScansOperations(self._client, self._config, self._serialize, self._deserialize) self.scan_result = ScanResultOperations(self._client, self._config, self._serialize, self._deserialize) self.scan_rulesets = ScanRulesetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.system_scan_rulesets = SystemScanRulesetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.system_scan_rulesets = SystemScanRulesetsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.triggers = TriggersOperations(self._client, self._config, self._serialize, self._deserialize) - - def send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -101,7 +108,7 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/__init__.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/__init__.py index 949a0417fbfd..9992e2805182 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/__init__.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/__init__.py @@ -17,13 +17,13 @@ from ._operations import TriggersOperations __all__ = [ - 'KeyVaultConnectionsOperations', - 'ClassificationRulesOperations', - 'DataSourcesOperations', - 'FiltersOperations', - 'ScansOperations', - 'ScanResultOperations', - 'ScanRulesetsOperations', - 'SystemScanRulesetsOperations', - 'TriggersOperations', + "KeyVaultConnectionsOperations", + "ClassificationRulesOperations", + "DataSourcesOperations", + "FiltersOperations", + "ScansOperations", + "ScanResultOperations", + "ScanRulesetsOperations", + "SystemScanRulesetsOperations", + "TriggersOperations", ] diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/_operations.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/_operations.py index b716a34e9864..e4c09f047a90 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/_operations.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/operations/_operations.py @@ -11,7 +11,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -19,11 +25,48 @@ from azure.core.tracing.decorator_async import distributed_trace_async from ..._vendor import _convert_request -from ...operations._operations import build_classification_rules_create_or_update_request, build_classification_rules_delete_request, build_classification_rules_get_request, build_classification_rules_list_all_request, build_classification_rules_list_versions_by_classification_rule_name_request, build_classification_rules_tag_classification_version_request, build_data_sources_create_or_update_request, build_data_sources_delete_request, build_data_sources_get_request, build_data_sources_list_all_request, build_filters_create_or_update_request, build_filters_get_request, build_key_vault_connections_create_request, build_key_vault_connections_delete_request, build_key_vault_connections_get_request, build_key_vault_connections_list_all_request, build_scan_result_cancel_scan_request, build_scan_result_list_scan_history_request, build_scan_result_run_scan_request, build_scan_rulesets_create_or_update_request, build_scan_rulesets_delete_request, build_scan_rulesets_get_request, build_scan_rulesets_list_all_request, build_scans_create_or_update_request, build_scans_delete_request, build_scans_get_request, build_scans_list_by_data_source_request, build_system_scan_rulesets_get_by_version_request, build_system_scan_rulesets_get_latest_request, build_system_scan_rulesets_get_request, build_system_scan_rulesets_list_all_request, build_system_scan_rulesets_list_versions_by_data_source_request, build_triggers_create_trigger_request, build_triggers_delete_trigger_request, build_triggers_get_trigger_request - -T = TypeVar('T') +from ...operations._operations import ( + build_classification_rules_create_or_update_request, + build_classification_rules_delete_request, + build_classification_rules_get_request, + build_classification_rules_list_all_request, + build_classification_rules_list_versions_by_classification_rule_name_request, + build_classification_rules_tag_classification_version_request, + build_data_sources_create_or_update_request, + build_data_sources_delete_request, + build_data_sources_get_request, + build_data_sources_list_all_request, + build_filters_create_or_update_request, + build_filters_get_request, + build_key_vault_connections_create_request, + build_key_vault_connections_delete_request, + build_key_vault_connections_get_request, + build_key_vault_connections_list_all_request, + build_scan_result_cancel_scan_request, + build_scan_result_list_scan_history_request, + build_scan_result_run_scan_request, + build_scan_rulesets_create_or_update_request, + build_scan_rulesets_delete_request, + build_scan_rulesets_get_request, + build_scan_rulesets_list_all_request, + build_scans_create_or_update_request, + build_scans_delete_request, + build_scans_get_request, + build_scans_list_by_data_source_request, + build_system_scan_rulesets_get_by_version_request, + build_system_scan_rulesets_get_latest_request, + build_system_scan_rulesets_get_request, + build_system_scan_rulesets_list_all_request, + build_system_scan_rulesets_list_versions_by_data_source_request, + build_triggers_create_trigger_request, + build_triggers_delete_trigger_request, + build_triggers_get_trigger_request, +) + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class KeyVaultConnectionsOperations: """KeyVaultConnectionsOperations async operations. @@ -43,11 +86,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get( - self, - key_vault_name: str, - **kwargs: Any - ) -> Any: + async def get(self, key_vault_name: str, **kwargs: Any) -> Any: """Gets key vault information. :param key_vault_name: @@ -69,23 +108,22 @@ async def get( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_key_vault_connections_get_request( key_vault_name=key_vault_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -102,16 +140,10 @@ async def get( return deserialized - get.metadata = {'url': '/azureKeyVaults/{keyVaultName}'} # type: ignore - + get.metadata = {"url": "/azureKeyVaults/{keyVaultName}"} # type: ignore @distributed_trace_async - async def create( - self, - key_vault_name: str, - body: Any, - **kwargs: Any - ) -> Any: + async def create(self, key_vault_name: str, body: Any, **kwargs: Any) -> Any: """Creates an instance of a key vault connection. :param key_vault_name: @@ -145,13 +177,11 @@ async def create( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = body @@ -159,14 +189,16 @@ async def create( key_vault_name=key_vault_name, content_type=content_type, json=json, - template_url=self.create.metadata['url'], + template_url=self.create.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -183,15 +215,10 @@ async def create( return deserialized - create.metadata = {'url': '/azureKeyVaults/{keyVaultName}'} # type: ignore - + create.metadata = {"url": "/azureKeyVaults/{keyVaultName}"} # type: ignore @distributed_trace_async - async def delete( - self, - key_vault_name: str, - **kwargs: Any - ) -> Optional[Any]: + async def delete(self, key_vault_name: str, **kwargs: Any) -> Optional[Any]: """Deletes the key vault connection associated with the account. :param key_vault_name: @@ -213,23 +240,22 @@ async def delete( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_key_vault_connections_delete_request( key_vault_name=key_vault_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -248,14 +274,10 @@ async def delete( return deserialized - delete.metadata = {'url': '/azureKeyVaults/{keyVaultName}'} # type: ignore - + delete.metadata = {"url": "/azureKeyVaults/{keyVaultName}"} # type: ignore @distributed_trace - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_all(self, **kwargs: Any) -> AsyncIterable[Any]: """List key vault connections in account. :return: An iterator like instance of JSON object @@ -281,36 +303,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_key_vault_connections_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_key_vault_connections_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -334,11 +361,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/azureKeyVaults"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/azureKeyVaults'} # type: ignore class ClassificationRulesOperations: """ClassificationRulesOperations async operations. @@ -358,11 +385,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get( - self, - classification_rule_name: str, - **kwargs: Any - ) -> Any: + async def get(self, classification_rule_name: str, **kwargs: Any) -> Any: """Get a classification rule. :param classification_rule_name: @@ -381,23 +404,22 @@ async def get( kind: ClassificationRule } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_classification_rules_get_request( classification_rule_name=classification_rule_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -414,16 +436,10 @@ async def get( return deserialized - get.metadata = {'url': '/classificationrules/{classificationRuleName}'} # type: ignore - + get.metadata = {"url": "/classificationrules/{classificationRuleName}"} # type: ignore @distributed_trace_async - async def create_or_update( - self, - classification_rule_name: str, - body: Any = None, - **kwargs: Any - ) -> Any: + async def create_or_update(self, classification_rule_name: str, body: Any = None, **kwargs: Any) -> Any: """Creates or Updates a classification rule. :param classification_rule_name: @@ -453,13 +469,11 @@ async def create_or_update( kind: ClassificationRule } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -470,14 +484,16 @@ async def create_or_update( classification_rule_name=classification_rule_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -501,15 +517,10 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/classificationrules/{classificationRuleName}'} # type: ignore - + create_or_update.metadata = {"url": "/classificationrules/{classificationRuleName}"} # type: ignore @distributed_trace_async - async def delete( - self, - classification_rule_name: str, - **kwargs: Any - ) -> Optional[Any]: + async def delete(self, classification_rule_name: str, **kwargs: Any) -> Optional[Any]: """Deletes a classification rule. :param classification_rule_name: @@ -528,23 +539,22 @@ async def delete( kind: ClassificationRule } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_classification_rules_delete_request( classification_rule_name=classification_rule_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -563,14 +573,10 @@ async def delete( return deserialized - delete.metadata = {'url': '/classificationrules/{classificationRuleName}'} # type: ignore - + delete.metadata = {"url": "/classificationrules/{classificationRuleName}"} # type: ignore @distributed_trace - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_all(self, **kwargs: Any) -> AsyncIterable[Any]: """List classification rules in Account. :return: An iterator like instance of JSON object @@ -593,36 +599,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_classification_rules_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_classification_rules_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -646,17 +657,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/classificationrules'} # type: ignore + list_all.metadata = {"url": "/classificationrules"} # type: ignore @distributed_trace def list_versions_by_classification_rule_name( - self, - classification_rule_name: str, - **kwargs: Any + self, classification_rule_name: str, **kwargs: Any ) -> AsyncIterable[Any]: """Lists the rule versions of a classification rule. @@ -682,38 +689,43 @@ def list_versions_by_classification_rule_name( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_classification_rules_list_versions_by_classification_rule_name_request( classification_rule_name=classification_rule_name, - template_url=self.list_versions_by_classification_rule_name.metadata['url'], + template_url=self.list_versions_by_classification_rule_name.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_classification_rules_list_versions_by_classification_rule_name_request( classification_rule_name=classification_rule_name, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -737,20 +749,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_versions_by_classification_rule_name.metadata = {'url': '/classificationrules/{classificationRuleName}/versions'} # type: ignore + list_versions_by_classification_rule_name.metadata = {"url": "/classificationrules/{classificationRuleName}/versions"} # type: ignore @distributed_trace_async async def tag_classification_version( - self, - classification_rule_name: str, - classification_rule_version: int, - *, - action: str, - **kwargs: Any + self, classification_rule_name: str, classification_rule_version: int, *, action: str, **kwargs: Any ) -> Any: """Sets Classification Action on a specific classification rule version. @@ -790,25 +795,24 @@ async def tag_classification_version( "status": "str" # Optional. Possible values include: "Accepted", "InProgress", "TransientFailure", "Succeeded", "Failed", "Canceled". } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_classification_rules_tag_classification_version_request( classification_rule_name=classification_rule_name, classification_rule_version=classification_rule_version, action=action, - template_url=self.tag_classification_version.metadata['url'], + template_url=self.tag_classification_version.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -825,7 +829,8 @@ async def tag_classification_version( return deserialized - tag_classification_version.metadata = {'url': '/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag'} # type: ignore + tag_classification_version.metadata = {"url": "/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag"} # type: ignore + class DataSourcesOperations: """DataSourcesOperations async operations. @@ -846,12 +851,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def create_or_update( - self, - data_source_name: str, - body: Any = None, - **kwargs: Any - ) -> Any: + async def create_or_update(self, data_source_name: str, body: Any = None, **kwargs: Any) -> Any: """Creates or Updates a data source. :param data_source_name: @@ -987,13 +987,11 @@ async def create_or_update( kind: DataSource } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -1004,14 +1002,16 @@ async def create_or_update( data_source_name=data_source_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1035,15 +1035,10 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/datasources/{dataSourceName}'} # type: ignore - + create_or_update.metadata = {"url": "/datasources/{dataSourceName}"} # type: ignore @distributed_trace_async - async def get( - self, - data_source_name: str, - **kwargs: Any - ) -> Any: + async def get(self, data_source_name: str, **kwargs: Any) -> Any: """Get a data source. :param data_source_name: @@ -1115,23 +1110,22 @@ async def get( kind: DataSource } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_data_sources_get_request( data_source_name=data_source_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1148,15 +1142,10 @@ async def get( return deserialized - get.metadata = {'url': '/datasources/{dataSourceName}'} # type: ignore - + get.metadata = {"url": "/datasources/{dataSourceName}"} # type: ignore @distributed_trace_async - async def delete( - self, - data_source_name: str, - **kwargs: Any - ) -> Optional[Any]: + async def delete(self, data_source_name: str, **kwargs: Any) -> Optional[Any]: """Deletes a data source. :param data_source_name: @@ -1228,23 +1217,22 @@ async def delete( kind: DataSource } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_data_sources_delete_request( data_source_name=data_source_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1263,14 +1251,10 @@ async def delete( return deserialized - delete.metadata = {'url': '/datasources/{dataSourceName}'} # type: ignore - + delete.metadata = {"url": "/datasources/{dataSourceName}"} # type: ignore @distributed_trace - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_all(self, **kwargs: Any) -> AsyncIterable[Any]: """List data sources in Data catalog. :return: An iterator like instance of JSON object @@ -1346,36 +1330,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_data_sources_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_data_sources_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1399,11 +1388,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/datasources"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/datasources'} # type: ignore class FiltersOperations: """FiltersOperations async operations. @@ -1423,12 +1412,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get( - self, - data_source_name: str, - scan_name: str, - **kwargs: Any - ) -> Any: + async def get(self, data_source_name: str, scan_name: str, **kwargs: Any) -> Any: """Get a filter. :param data_source_name: @@ -1456,24 +1440,23 @@ async def get( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_filters_get_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1490,17 +1473,10 @@ async def get( return deserialized - get.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/filters/custom'} # type: ignore - + get.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/filters/custom"} # type: ignore @distributed_trace_async - async def create_or_update( - self, - data_source_name: str, - scan_name: str, - body: Any = None, - **kwargs: Any - ) -> Any: + async def create_or_update(self, data_source_name: str, scan_name: str, body: Any = None, **kwargs: Any) -> Any: """Creates or updates a filter. :param data_source_name: @@ -1544,13 +1520,11 @@ async def create_or_update( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -1562,14 +1536,16 @@ async def create_or_update( scan_name=scan_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1593,7 +1569,8 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/filters/custom'} # type: ignore + create_or_update.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/filters/custom"} # type: ignore + class ScansOperations: """ScansOperations async operations. @@ -1614,13 +1591,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def create_or_update( - self, - data_source_name: str, - scan_name: str, - body: Any, - **kwargs: Any - ) -> Any: + async def create_or_update(self, data_source_name: str, scan_name: str, body: Any, **kwargs: Any) -> Any: """Creates an instance of a scan. :param data_source_name: @@ -1744,13 +1715,11 @@ async def create_or_update( kind: Scan } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = body @@ -1759,14 +1728,16 @@ async def create_or_update( scan_name=scan_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1790,16 +1761,10 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}'} # type: ignore - + create_or_update.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}"} # type: ignore @distributed_trace_async - async def get( - self, - data_source_name: str, - scan_name: str, - **kwargs: Any - ) -> Any: + async def get(self, data_source_name: str, scan_name: str, **kwargs: Any) -> Any: """Gets a scan information. :param data_source_name: @@ -1866,24 +1831,23 @@ async def get( kind: Scan } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scans_get_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1900,16 +1864,10 @@ async def get( return deserialized - get.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}'} # type: ignore - + get.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}"} # type: ignore @distributed_trace_async - async def delete( - self, - data_source_name: str, - scan_name: str, - **kwargs: Any - ) -> Optional[Any]: + async def delete(self, data_source_name: str, scan_name: str, **kwargs: Any) -> Optional[Any]: """Deletes the scan associated with the data source. :param data_source_name: @@ -1976,24 +1934,23 @@ async def delete( kind: Scan } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scans_delete_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2012,15 +1969,10 @@ async def delete( return deserialized - delete.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}'} # type: ignore - + delete.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}"} # type: ignore @distributed_trace - def list_by_data_source( - self, - data_source_name: str, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_by_data_source(self, data_source_name: str, **kwargs: Any) -> AsyncIterable[Any]: """List scans in data source. :param data_source_name: @@ -2091,38 +2043,43 @@ def list_by_data_source( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_scans_list_by_data_source_request( data_source_name=data_source_name, - template_url=self.list_by_data_source.metadata['url'], + template_url=self.list_by_data_source.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_scans_list_by_data_source_request( data_source_name=data_source_name, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2146,11 +2103,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list_by_data_source.metadata = {"url": "/datasources/{dataSourceName}/scans"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list_by_data_source.metadata = {'url': '/datasources/{dataSourceName}/scans'} # type: ignore class ScanResultOperations: """ScanResultOperations async operations. @@ -2171,13 +2128,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: @distributed_trace_async async def run_scan( - self, - data_source_name: str, - scan_name: str, - run_id: str, - *, - scan_level: Optional[str] = None, - **kwargs: Any + self, data_source_name: str, scan_name: str, run_id: str, *, scan_level: Optional[str] = None, **kwargs: Any ) -> Any: """Runs the scan. @@ -2219,26 +2170,25 @@ async def run_scan( "status": "str" # Optional. Possible values include: "Accepted", "InProgress", "TransientFailure", "Succeeded", "Failed", "Canceled". } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_result_run_scan_request( data_source_name=data_source_name, scan_name=scan_name, run_id=run_id, scan_level=scan_level, - template_url=self.run_scan.metadata['url'], + template_url=self.run_scan.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -2255,17 +2205,10 @@ async def run_scan( return deserialized - run_scan.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}'} # type: ignore - + run_scan.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}"} # type: ignore @distributed_trace_async - async def cancel_scan( - self, - data_source_name: str, - scan_name: str, - run_id: str, - **kwargs: Any - ) -> Any: + async def cancel_scan(self, data_source_name: str, scan_name: str, run_id: str, **kwargs: Any) -> Any: """Cancels a scan. :param data_source_name: @@ -2304,25 +2247,24 @@ async def cancel_scan( "status": "str" # Optional. Possible values include: "Accepted", "InProgress", "TransientFailure", "Succeeded", "Failed", "Canceled". } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_result_cancel_scan_request( data_source_name=data_source_name, scan_name=scan_name, run_id=run_id, - template_url=self.cancel_scan.metadata['url'], + template_url=self.cancel_scan.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -2339,16 +2281,10 @@ async def cancel_scan( return deserialized - cancel_scan.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel'} # type: ignore - + cancel_scan.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel"} # type: ignore @distributed_trace - def list_scan_history( - self, - data_source_name: str, - scan_name: str, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_scan_history(self, data_source_name: str, scan_name: str, **kwargs: Any) -> AsyncIterable[Any]: """Lists the scan history of a scan. :param data_source_name: @@ -2414,27 +2350,28 @@ def list_scan_history( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_scan_result_list_scan_history_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.list_scan_history.metadata['url'], + template_url=self.list_scan_history.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_scan_result_list_scan_history_request( data_source_name=data_source_name, scan_name=scan_name, @@ -2442,12 +2379,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2471,11 +2412,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list_scan_history.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/runs"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list_scan_history.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/runs'} # type: ignore class ScanRulesetsOperations: """ScanRulesetsOperations async operations. @@ -2495,11 +2436,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get( - self, - scan_ruleset_name: str, - **kwargs: Any - ) -> Any: + async def get(self, scan_ruleset_name: str, **kwargs: Any) -> Any: """Get a scan ruleset. :param scan_ruleset_name: @@ -2521,23 +2458,22 @@ async def get( kind: ScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_rulesets_get_request( scan_ruleset_name=scan_ruleset_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2554,16 +2490,10 @@ async def get( return deserialized - get.metadata = {'url': '/scanrulesets/{scanRulesetName}'} # type: ignore - + get.metadata = {"url": "/scanrulesets/{scanRulesetName}"} # type: ignore @distributed_trace_async - async def create_or_update( - self, - scan_ruleset_name: str, - body: Any = None, - **kwargs: Any - ) -> Any: + async def create_or_update(self, scan_ruleset_name: str, body: Any = None, **kwargs: Any) -> Any: """Creates or Updates a scan ruleset. :param scan_ruleset_name: @@ -2599,13 +2529,11 @@ async def create_or_update( kind: ScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -2616,14 +2544,16 @@ async def create_or_update( scan_ruleset_name=scan_ruleset_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -2647,15 +2577,10 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/scanrulesets/{scanRulesetName}'} # type: ignore - + create_or_update.metadata = {"url": "/scanrulesets/{scanRulesetName}"} # type: ignore @distributed_trace_async - async def delete( - self, - scan_ruleset_name: str, - **kwargs: Any - ) -> Optional[Any]: + async def delete(self, scan_ruleset_name: str, **kwargs: Any) -> Optional[Any]: """Deletes a scan ruleset. :param scan_ruleset_name: @@ -2677,23 +2602,22 @@ async def delete( kind: ScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_rulesets_delete_request( scan_ruleset_name=scan_ruleset_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2712,14 +2636,10 @@ async def delete( return deserialized - delete.metadata = {'url': '/scanrulesets/{scanRulesetName}'} # type: ignore - + delete.metadata = {"url": "/scanrulesets/{scanRulesetName}"} # type: ignore @distributed_trace - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_all(self, **kwargs: Any) -> AsyncIterable[Any]: """List scan rulesets in Data catalog. :return: An iterator like instance of JSON object @@ -2745,36 +2665,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_scan_rulesets_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_scan_rulesets_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2798,11 +2723,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/scanrulesets"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/scanrulesets'} # type: ignore class SystemScanRulesetsOperations: """SystemScanRulesetsOperations async operations. @@ -2822,10 +2747,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable[Any]: + def list_all(self, **kwargs: Any) -> AsyncIterable[Any]: """List all system scan rulesets for an account. :return: An iterator like instance of JSON object @@ -2851,36 +2773,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_system_scan_rulesets_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_system_scan_rulesets_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2904,18 +2831,12 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/systemScanRulesets'} # type: ignore + list_all.metadata = {"url": "/systemScanRulesets"} # type: ignore @distributed_trace_async - async def get( - self, - data_source_type: str, - **kwargs: Any - ) -> Any: + async def get(self, data_source_type: str, **kwargs: Any) -> Any: """Get a system scan ruleset for a data source. :param data_source_type: Possible values are: "None", "AzureSubscription", @@ -2942,23 +2863,22 @@ async def get( kind: SystemScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_system_scan_rulesets_get_request( data_source_type=data_source_type, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2975,17 +2895,10 @@ async def get( return deserialized - get.metadata = {'url': '/systemScanRulesets/datasources/{dataSourceType}'} # type: ignore - + get.metadata = {"url": "/systemScanRulesets/datasources/{dataSourceType}"} # type: ignore @distributed_trace_async - async def get_by_version( - self, - version: int, - *, - data_source_type: Optional[str] = None, - **kwargs: Any - ) -> Any: + async def get_by_version(self, version: int, *, data_source_type: Optional[str] = None, **kwargs: Any) -> Any: """Get a scan ruleset by version. :param version: @@ -3014,24 +2927,23 @@ async def get_by_version( kind: SystemScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_system_scan_rulesets_get_by_version_request( version=version, data_source_type=data_source_type, - template_url=self.get_by_version.metadata['url'], + template_url=self.get_by_version.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3048,16 +2960,10 @@ async def get_by_version( return deserialized - get_by_version.metadata = {'url': '/systemScanRulesets/versions/{version}'} # type: ignore - + get_by_version.metadata = {"url": "/systemScanRulesets/versions/{version}"} # type: ignore @distributed_trace_async - async def get_latest( - self, - *, - data_source_type: Optional[str] = None, - **kwargs: Any - ) -> Any: + async def get_latest(self, *, data_source_type: Optional[str] = None, **kwargs: Any) -> Any: """Get the latest version of a system scan ruleset. :keyword data_source_type: Possible values are: "None", "AzureSubscription", @@ -3084,23 +2990,22 @@ async def get_latest( kind: SystemScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_system_scan_rulesets_get_latest_request( data_source_type=data_source_type, - template_url=self.get_latest.metadata['url'], + template_url=self.get_latest.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3117,15 +3022,11 @@ async def get_latest( return deserialized - get_latest.metadata = {'url': '/systemScanRulesets/versions/latest'} # type: ignore - + get_latest.metadata = {"url": "/systemScanRulesets/versions/latest"} # type: ignore @distributed_trace def list_versions_by_data_source( - self, - *, - data_source_type: Optional[str] = None, - **kwargs: Any + self, *, data_source_type: Optional[str] = None, **kwargs: Any ) -> AsyncIterable[Any]: """List system scan ruleset versions in Data catalog. @@ -3159,38 +3060,43 @@ def list_versions_by_data_source( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_system_scan_rulesets_list_versions_by_data_source_request( data_source_type=data_source_type, - template_url=self.list_versions_by_data_source.metadata['url'], + template_url=self.list_versions_by_data_source.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_system_scan_rulesets_list_versions_by_data_source_request( data_source_type=data_source_type, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -3214,11 +3120,11 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged(get_next, extract_data) + + list_versions_by_data_source.metadata = {"url": "/systemScanRulesets/versions"} # type: ignore + - return AsyncItemPaged( - get_next, extract_data - ) - list_versions_by_data_source.metadata = {'url': '/systemScanRulesets/versions'} # type: ignore class TriggersOperations: """TriggersOperations async operations. @@ -3238,12 +3144,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config @distributed_trace_async - async def get_trigger( - self, - data_source_name: str, - scan_name: str, - **kwargs: Any - ) -> Any: + async def get_trigger(self, data_source_name: str, scan_name: str, **kwargs: Any) -> Any: """Gets trigger information. :param data_source_name: @@ -3298,24 +3199,23 @@ async def get_trigger( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_triggers_get_trigger_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.get_trigger.metadata['url'], + template_url=self.get_trigger.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3332,17 +3232,10 @@ async def get_trigger( return deserialized - get_trigger.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/triggers/default'} # type: ignore - + get_trigger.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/triggers/default"} # type: ignore @distributed_trace_async - async def create_trigger( - self, - data_source_name: str, - scan_name: str, - body: Any, - **kwargs: Any - ) -> Any: + async def create_trigger(self, data_source_name: str, scan_name: str, body: Any, **kwargs: Any) -> Any: """Creates an instance of a trigger. :param data_source_name: @@ -3440,13 +3333,11 @@ async def create_trigger( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = body @@ -3455,14 +3346,16 @@ async def create_trigger( scan_name=scan_name, content_type=content_type, json=json, - template_url=self.create_trigger.metadata['url'], + template_url=self.create_trigger.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -3486,16 +3379,10 @@ async def create_trigger( return deserialized - create_trigger.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/triggers/default'} # type: ignore - + create_trigger.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/triggers/default"} # type: ignore @distributed_trace_async - async def delete_trigger( - self, - data_source_name: str, - scan_name: str, - **kwargs: Any - ) -> Optional[Any]: + async def delete_trigger(self, data_source_name: str, scan_name: str, **kwargs: Any) -> Optional[Any]: """Deletes the trigger associated with the scan. :param data_source_name: @@ -3550,24 +3437,23 @@ async def delete_trigger( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_triggers_delete_trigger_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.delete_trigger.metadata['url'], + template_url=self.delete_trigger.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) - pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + pipeline_response = await self._client.send_request( + request, stream=False, _return_pipeline_response=True, **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3586,5 +3472,4 @@ async def delete_trigger( return deserialized - delete_trigger.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/triggers/default'} # type: ignore - + delete_trigger.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/triggers/default"} # type: ignore diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/__init__.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/__init__.py index 949a0417fbfd..9992e2805182 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/__init__.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/__init__.py @@ -17,13 +17,13 @@ from ._operations import TriggersOperations __all__ = [ - 'KeyVaultConnectionsOperations', - 'ClassificationRulesOperations', - 'DataSourcesOperations', - 'FiltersOperations', - 'ScansOperations', - 'ScanResultOperations', - 'ScanRulesetsOperations', - 'SystemScanRulesetsOperations', - 'TriggersOperations', + "KeyVaultConnectionsOperations", + "ClassificationRulesOperations", + "DataSourcesOperations", + "FiltersOperations", + "ScansOperations", + "ScanResultOperations", + "ScanRulesetsOperations", + "SystemScanRulesetsOperations", + "TriggersOperations", ] diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/_operations.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/_operations.py index a5907eba8648..363faedfdaa2 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/_operations.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/operations/_operations.py @@ -10,7 +10,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse @@ -24,7 +30,7 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() @@ -1182,6 +1188,7 @@ def build_triggers_delete_trigger_request( **kwargs ) + # fmt: on class KeyVaultConnectionsOperations(object): """KeyVaultConnectionsOperations operations. @@ -1229,19 +1236,16 @@ def get( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_key_vault_connections_get_request( key_vault_name=key_vault_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1262,8 +1266,7 @@ def get( return deserialized - get.metadata = {'url': '/azureKeyVaults/{keyVaultName}'} # type: ignore - + get.metadata = {"url": "/azureKeyVaults/{keyVaultName}"} # type: ignore @distributed_trace def create( @@ -1306,13 +1309,11 @@ def create( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = body @@ -1320,10 +1321,10 @@ def create( key_vault_name=key_vault_name, content_type=content_type, json=json, - template_url=self.create.metadata['url'], + template_url=self.create.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1344,8 +1345,7 @@ def create( return deserialized - create.metadata = {'url': '/azureKeyVaults/{keyVaultName}'} # type: ignore - + create.metadata = {"url": "/azureKeyVaults/{keyVaultName}"} # type: ignore @distributed_trace def delete( @@ -1375,19 +1375,16 @@ def delete( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_key_vault_connections_delete_request( key_vault_name=key_vault_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1410,13 +1407,11 @@ def delete( return deserialized - delete.metadata = {'url': '/azureKeyVaults/{keyVaultName}'} # type: ignore - + delete.metadata = {"url": "/azureKeyVaults/{keyVaultName}"} # type: ignore @distributed_trace def list_all( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List key vault connections in account. @@ -1444,36 +1439,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_key_vault_connections_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_key_vault_connections_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1497,11 +1497,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/azureKeyVaults"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/azureKeyVaults'} # type: ignore class ClassificationRulesOperations(object): """ClassificationRulesOperations operations. @@ -1545,19 +1545,16 @@ def get( kind: ClassificationRule } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_classification_rules_get_request( classification_rule_name=classification_rule_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1578,8 +1575,7 @@ def get( return deserialized - get.metadata = {'url': '/classificationrules/{classificationRuleName}'} # type: ignore - + get.metadata = {"url": "/classificationrules/{classificationRuleName}"} # type: ignore @distributed_trace def create_or_update( @@ -1618,13 +1614,11 @@ def create_or_update( kind: ClassificationRule } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -1635,10 +1629,10 @@ def create_or_update( classification_rule_name=classification_rule_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1666,8 +1660,7 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/classificationrules/{classificationRuleName}'} # type: ignore - + create_or_update.metadata = {"url": "/classificationrules/{classificationRuleName}"} # type: ignore @distributed_trace def delete( @@ -1694,19 +1687,16 @@ def delete( kind: ClassificationRule } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_classification_rules_delete_request( classification_rule_name=classification_rule_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1729,13 +1719,11 @@ def delete( return deserialized - delete.metadata = {'url': '/classificationrules/{classificationRuleName}'} # type: ignore - + delete.metadata = {"url": "/classificationrules/{classificationRuleName}"} # type: ignore @distributed_trace def list_all( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List classification rules in Account. @@ -1760,36 +1748,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_classification_rules_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_classification_rules_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1813,11 +1806,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/classificationrules'} # type: ignore + list_all.metadata = {"url": "/classificationrules"} # type: ignore @distributed_trace def list_versions_by_classification_rule_name( @@ -1850,38 +1841,43 @@ def list_versions_by_classification_rule_name( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_classification_rules_list_versions_by_classification_rule_name_request( classification_rule_name=classification_rule_name, - template_url=self.list_versions_by_classification_rule_name.metadata['url'], + template_url=self.list_versions_by_classification_rule_name.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_classification_rules_list_versions_by_classification_rule_name_request( classification_rule_name=classification_rule_name, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -1905,11 +1901,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_versions_by_classification_rule_name.metadata = {'url': '/classificationrules/{classificationRuleName}/versions'} # type: ignore + list_versions_by_classification_rule_name.metadata = {"url": "/classificationrules/{classificationRuleName}/versions"} # type: ignore @distributed_trace def tag_classification_version( @@ -1957,23 +1951,20 @@ def tag_classification_version( "status": "str" # Optional. Possible values include: "Accepted", "InProgress", "TransientFailure", "Succeeded", "Failed", "Canceled". } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - action = kwargs.pop('action') # type: str + action = kwargs.pop("action") # type: str - request = build_classification_rules_tag_classification_version_request( classification_rule_name=classification_rule_name, classification_rule_version=classification_rule_version, action=action, - template_url=self.tag_classification_version.metadata['url'], + template_url=self.tag_classification_version.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -1994,7 +1985,8 @@ def tag_classification_version( return deserialized - tag_classification_version.metadata = {'url': '/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag'} # type: ignore + tag_classification_version.metadata = {"url": "/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag"} # type: ignore + class DataSourcesOperations(object): """DataSourcesOperations operations. @@ -2157,13 +2149,11 @@ def create_or_update( kind: DataSource } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -2174,10 +2164,10 @@ def create_or_update( data_source_name=data_source_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -2205,8 +2195,7 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/datasources/{dataSourceName}'} # type: ignore - + create_or_update.metadata = {"url": "/datasources/{dataSourceName}"} # type: ignore @distributed_trace def get( @@ -2286,19 +2275,16 @@ def get( kind: DataSource } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_data_sources_get_request( data_source_name=data_source_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -2319,8 +2305,7 @@ def get( return deserialized - get.metadata = {'url': '/datasources/{dataSourceName}'} # type: ignore - + get.metadata = {"url": "/datasources/{dataSourceName}"} # type: ignore @distributed_trace def delete( @@ -2400,19 +2385,16 @@ def delete( kind: DataSource } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_data_sources_delete_request( data_source_name=data_source_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -2435,13 +2417,11 @@ def delete( return deserialized - delete.metadata = {'url': '/datasources/{dataSourceName}'} # type: ignore - + delete.metadata = {"url": "/datasources/{dataSourceName}"} # type: ignore @distributed_trace def list_all( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List data sources in Data catalog. @@ -2519,36 +2499,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_data_sources_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_data_sources_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -2572,11 +2557,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/datasources"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/datasources'} # type: ignore class FiltersOperations(object): """FiltersOperations operations. @@ -2630,20 +2615,17 @@ def get( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_filters_get_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -2664,8 +2646,7 @@ def get( return deserialized - get.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/filters/custom'} # type: ignore - + get.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/filters/custom"} # type: ignore @distributed_trace def create_or_update( @@ -2719,13 +2700,11 @@ def create_or_update( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -2737,10 +2716,10 @@ def create_or_update( scan_name=scan_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -2768,7 +2747,8 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/filters/custom'} # type: ignore + create_or_update.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/filters/custom"} # type: ignore + class ScansOperations(object): """ScansOperations operations. @@ -2920,13 +2900,11 @@ def create_or_update( kind: Scan } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = body @@ -2935,10 +2913,10 @@ def create_or_update( scan_name=scan_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -2966,8 +2944,7 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}'} # type: ignore - + create_or_update.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}"} # type: ignore @distributed_trace def get( @@ -3043,20 +3020,17 @@ def get( kind: Scan } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scans_get_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3077,8 +3051,7 @@ def get( return deserialized - get.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}'} # type: ignore - + get.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}"} # type: ignore @distributed_trace def delete( @@ -3154,20 +3127,17 @@ def delete( kind: Scan } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scans_delete_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3190,8 +3160,7 @@ def delete( return deserialized - delete.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}'} # type: ignore - + delete.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}"} # type: ignore @distributed_trace def list_by_data_source( @@ -3270,38 +3239,43 @@ def list_by_data_source( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_scans_list_by_data_source_request( data_source_name=data_source_name, - template_url=self.list_by_data_source.metadata['url'], + template_url=self.list_by_data_source.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_scans_list_by_data_source_request( data_source_name=data_source_name, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -3325,11 +3299,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list_by_data_source.metadata = {"url": "/datasources/{dataSourceName}/scans"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list_by_data_source.metadata = {'url': '/datasources/{dataSourceName}/scans'} # type: ignore class ScanResultOperations(object): """ScanResultOperations operations. @@ -3397,24 +3371,21 @@ def run_scan( "status": "str" # Optional. Possible values include: "Accepted", "InProgress", "TransientFailure", "Succeeded", "Failed", "Canceled". } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - scan_level = kwargs.pop('scan_level', None) # type: Optional[str] + scan_level = kwargs.pop("scan_level", None) # type: Optional[str] - request = build_scan_result_run_scan_request( data_source_name=data_source_name, scan_name=scan_name, run_id=run_id, scan_level=scan_level, - template_url=self.run_scan.metadata['url'], + template_url=self.run_scan.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3435,8 +3406,7 @@ def run_scan( return deserialized - run_scan.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}'} # type: ignore - + run_scan.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}"} # type: ignore @distributed_trace def cancel_scan( @@ -3485,21 +3455,18 @@ def cancel_scan( "status": "str" # Optional. Possible values include: "Accepted", "InProgress", "TransientFailure", "Succeeded", "Failed", "Canceled". } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_result_cancel_scan_request( data_source_name=data_source_name, scan_name=scan_name, run_id=run_id, - template_url=self.cancel_scan.metadata['url'], + template_url=self.cancel_scan.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3520,8 +3487,7 @@ def cancel_scan( return deserialized - cancel_scan.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel'} # type: ignore - + cancel_scan.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel"} # type: ignore @distributed_trace def list_scan_history( @@ -3596,27 +3562,28 @@ def list_scan_history( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_scan_result_list_scan_history_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.list_scan_history.metadata['url'], + template_url=self.list_scan_history.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_scan_result_list_scan_history_request( data_source_name=data_source_name, scan_name=scan_name, @@ -3624,12 +3591,16 @@ def prepare_request(next_link=None): ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -3653,11 +3624,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list_scan_history.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/runs"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list_scan_history.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/runs'} # type: ignore class ScanRulesetsOperations(object): """ScanRulesetsOperations operations. @@ -3704,19 +3675,16 @@ def get( kind: ScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_rulesets_get_request( scan_ruleset_name=scan_ruleset_name, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3737,8 +3705,7 @@ def get( return deserialized - get.metadata = {'url': '/scanrulesets/{scanRulesetName}'} # type: ignore - + get.metadata = {"url": "/scanrulesets/{scanRulesetName}"} # type: ignore @distributed_trace def create_or_update( @@ -3783,13 +3750,11 @@ def create_or_update( kind: ScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] if body is not None: json = body @@ -3800,10 +3765,10 @@ def create_or_update( scan_ruleset_name=scan_ruleset_name, content_type=content_type, json=json, - template_url=self.create_or_update.metadata['url'], + template_url=self.create_or_update.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3831,8 +3796,7 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/scanrulesets/{scanRulesetName}'} # type: ignore - + create_or_update.metadata = {"url": "/scanrulesets/{scanRulesetName}"} # type: ignore @distributed_trace def delete( @@ -3862,19 +3826,16 @@ def delete( kind: ScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_scan_rulesets_delete_request( scan_ruleset_name=scan_ruleset_name, - template_url=self.delete.metadata['url'], + template_url=self.delete.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -3897,13 +3858,11 @@ def delete( return deserialized - delete.metadata = {'url': '/scanrulesets/{scanRulesetName}'} # type: ignore - + delete.metadata = {"url": "/scanrulesets/{scanRulesetName}"} # type: ignore @distributed_trace def list_all( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List scan rulesets in Data catalog. @@ -3931,36 +3890,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_scan_rulesets_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_scan_rulesets_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -3984,11 +3948,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list_all.metadata = {"url": "/scanrulesets"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/scanrulesets'} # type: ignore class SystemScanRulesetsOperations(object): """SystemScanRulesetsOperations operations. @@ -4009,8 +3973,7 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_all( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List all system scan rulesets for an account. @@ -4038,36 +4001,41 @@ def list_all( ] } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + def prepare_request(next_link=None): if not next_link: - + request = build_system_scan_rulesets_list_all_request( - template_url=self.list_all.metadata['url'], + template_url=self.list_all.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_system_scan_rulesets_list_all_request( template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -4091,11 +4059,9 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/systemScanRulesets'} # type: ignore + list_all.metadata = {"url": "/systemScanRulesets"} # type: ignore @distributed_trace def get( @@ -4130,19 +4096,16 @@ def get( kind: SystemScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_system_scan_rulesets_get_request( data_source_type=data_source_type, - template_url=self.get.metadata['url'], + template_url=self.get.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -4163,8 +4126,7 @@ def get( return deserialized - get.metadata = {'url': '/systemScanRulesets/datasources/{dataSourceType}'} # type: ignore - + get.metadata = {"url": "/systemScanRulesets/datasources/{dataSourceType}"} # type: ignore @distributed_trace def get_by_version( @@ -4201,22 +4163,19 @@ def get_by_version( kind: SystemScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - data_source_type = kwargs.pop('data_source_type', None) # type: Optional[str] + data_source_type = kwargs.pop("data_source_type", None) # type: Optional[str] - request = build_system_scan_rulesets_get_by_version_request( version=version, data_source_type=data_source_type, - template_url=self.get_by_version.metadata['url'], + template_url=self.get_by_version.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -4237,13 +4196,11 @@ def get_by_version( return deserialized - get_by_version.metadata = {'url': '/systemScanRulesets/versions/{version}'} # type: ignore - + get_by_version.metadata = {"url": "/systemScanRulesets/versions/{version}"} # type: ignore @distributed_trace def get_latest( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Any """Get the latest version of a system scan ruleset. @@ -4272,21 +4229,18 @@ def get_latest( kind: SystemScanRuleset } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - data_source_type = kwargs.pop('data_source_type', None) # type: Optional[str] + data_source_type = kwargs.pop("data_source_type", None) # type: Optional[str] - request = build_system_scan_rulesets_get_latest_request( data_source_type=data_source_type, - template_url=self.get_latest.metadata['url'], + template_url=self.get_latest.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -4307,13 +4261,11 @@ def get_latest( return deserialized - get_latest.metadata = {'url': '/systemScanRulesets/versions/latest'} # type: ignore - + get_latest.metadata = {"url": "/systemScanRulesets/versions/latest"} # type: ignore @distributed_trace def list_versions_by_data_source( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable[Any] """List system scan ruleset versions in Data catalog. @@ -4348,40 +4300,45 @@ def list_versions_by_data_source( ] } """ - data_source_type = kwargs.pop('data_source_type', None) # type: Optional[str] + data_source_type = kwargs.pop("data_source_type", None) # type: Optional[str] + + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) def prepare_request(next_link=None): if not next_link: - + request = build_system_scan_rulesets_list_versions_by_data_source_request( data_source_type=data_source_type, - template_url=self.list_versions_by_data_source.metadata['url'], + template_url=self.list_versions_by_data_source.metadata["url"], ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) else: - + request = build_system_scan_rulesets_list_versions_by_data_source_request( data_source_type=data_source_type, template_url=next_link, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.url = self._client.format_url(request.url, **path_format_arguments) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } request.method = "GET" return request @@ -4405,11 +4362,11 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged(get_next, extract_data) + + list_versions_by_data_source.metadata = {"url": "/systemScanRulesets/versions"} # type: ignore + - return ItemPaged( - get_next, extract_data - ) - list_versions_by_data_source.metadata = {'url': '/systemScanRulesets/versions'} # type: ignore class TriggersOperations(object): """TriggersOperations operations. @@ -4490,20 +4447,17 @@ def get_trigger( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_triggers_get_trigger_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.get_trigger.metadata['url'], + template_url=self.get_trigger.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -4524,8 +4478,7 @@ def get_trigger( return deserialized - get_trigger.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/triggers/default'} # type: ignore - + get_trigger.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/triggers/default"} # type: ignore @distributed_trace def create_trigger( @@ -4633,13 +4586,11 @@ def create_trigger( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Any] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Any] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] json = body @@ -4648,10 +4599,10 @@ def create_trigger( scan_name=scan_name, content_type=content_type, json=json, - template_url=self.create_trigger.metadata['url'], + template_url=self.create_trigger.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -4679,8 +4630,7 @@ def create_trigger( return deserialized - create_trigger.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/triggers/default'} # type: ignore - + create_trigger.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/triggers/default"} # type: ignore @distributed_trace def delete_trigger( @@ -4744,20 +4694,17 @@ def delete_trigger( } } """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional[Any]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - request = build_triggers_delete_trigger_request( data_source_name=data_source_name, scan_name=scan_name, - template_url=self.delete_trigger.metadata['url'], + template_url=self.delete_trigger.metadata["url"], ) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) @@ -4780,5 +4727,4 @@ def delete_trigger( return deserialized - delete_trigger.metadata = {'url': '/datasources/{dataSourceName}/scans/{scanName}/triggers/default'} # type: ignore - + delete_trigger.metadata = {"url": "/datasources/{dataSourceName}/scans/{scanName}/triggers/default"} # type: ignore diff --git a/sdk/purview/azure-purview-scanning/setup.py b/sdk/purview/azure-purview-scanning/setup.py index 2c25b1cddd41..49fccd3dd4b2 100644 --- a/sdk/purview/azure-purview-scanning/setup.py +++ b/sdk/purview/azure-purview-scanning/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,61 +16,62 @@ PACKAGE_PPRINT_NAME = "Azure Purview Scanning" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=readme + "\n\n" + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ "Development Status :: 4 - Beta", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.purview', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.purview", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.6", install_requires=[ "azure-core<2.0.0,>=1.23.0", "msrest>=0.6.21", - 'six>=1.11.0', + "six>=1.11.0", ], ) diff --git a/sdk/purview/azure-purview-scanning/tests/conftest.py b/sdk/purview/azure-purview-scanning/tests/conftest.py index 964abaec642b..5044d6755395 100644 --- a/sdk/purview/azure-purview-scanning/tests/conftest.py +++ b/sdk/purview/azure-purview-scanning/tests/conftest.py @@ -30,7 +30,12 @@ from dotenv import load_dotenv -from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer, add_header_regex_sanitizer +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) # Ignore async tests for Python < 3.5 collect_ignore_glob = [] @@ -39,6 +44,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("PURVIEWSCANNING_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/purview/azure-purview-scanning/tests/test_smoke.py b/sdk/purview/azure-purview-scanning/tests/test_smoke.py index cccf9d71ecc1..963d6e3e1354 100644 --- a/sdk/purview/azure-purview-scanning/tests/test_smoke.py +++ b/sdk/purview/azure-purview-scanning/tests/test_smoke.py @@ -7,6 +7,7 @@ from testcase import PurviewScanningTest, PurviewScanningPowerShellPreparer from devtools_testutils import recorded_by_proxy + class TestPurviewScanningSmoke(PurviewScanningTest): @PurviewScanningPowerShellPreparer() diff --git a/sdk/purview/azure-purview-scanning/tests/test_smoke_async.py b/sdk/purview/azure-purview-scanning/tests/test_smoke_async.py index b534d9f652f6..ca2475334407 100644 --- a/sdk/purview/azure-purview-scanning/tests/test_smoke_async.py +++ b/sdk/purview/azure-purview-scanning/tests/test_smoke_async.py @@ -8,6 +8,7 @@ from testcase_async import PurviewScanningTestAsync from devtools_testutils.aio import recorded_by_proxy_async + class TestPurviewScanningSmokeAsync(PurviewScanningTestAsync): @PurviewScanningPowerShellPreparer() diff --git a/sdk/purview/azure-purview-scanning/tests/testcase.py b/sdk/purview/azure-purview-scanning/tests/testcase.py index 2e11e1c682de..f81fa75980b7 100644 --- a/sdk/purview/azure-purview-scanning/tests/testcase.py +++ b/sdk/purview/azure-purview-scanning/tests/testcase.py @@ -21,7 +21,5 @@ def create_client(self, endpoint): PurviewScanningPowerShellPreparer = functools.partial( - PowerShellPreparer, - "purviewscanning", - purviewscanning_endpoint="https://fake_account.scan.purview.azure.com" + PowerShellPreparer, "purviewscanning", purviewscanning_endpoint="https://fake_account.scan.purview.azure.com" ) diff --git a/sdk/purview/azure-purview-sharing/azure/purview/sharing/_patch.py b/sdk/purview/azure-purview-sharing/azure/purview/sharing/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-sharing/azure/purview/sharing/_patch.py +++ b/sdk/purview/azure-purview-sharing/azure/purview/sharing/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/_patch.py b/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/_patch.py +++ b/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/operations/_patch.py b/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/operations/_patch.py +++ b/sdk/purview/azure-purview-sharing/azure/purview/sharing/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-sharing/azure/purview/sharing/operations/_patch.py b/sdk/purview/azure-purview-sharing/azure/purview/sharing/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/purview/azure-purview-sharing/azure/purview/sharing/operations/_patch.py +++ b/sdk/purview/azure-purview-sharing/azure/purview/sharing/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-sharing/samples/received_shares_examples.py b/sdk/purview/azure-purview-sharing/samples/received_shares_examples.py index 868a4016ba7a..2eb630e5d155 100644 --- a/sdk/purview/azure-purview-sharing/samples/received_shares_examples.py +++ b/sdk/purview/azure-purview-sharing/samples/received_shares_examples.py @@ -19,7 +19,7 @@ endpoint = os.environ["ENDPOINT"] credential = DefaultAzureCredential() -client = PurviewSharingClient(endpoint=endpoint,credential=credential) +client = PurviewSharingClient(endpoint=endpoint, credential=credential) # [END create_a_received_share_client] # Get all detached received shares @@ -32,10 +32,7 @@ consumer_storage_account_resource_id = "/subscriptions/{subscription-id}/resourceGroups/consumer-storage-rg/providers/Microsoft.Storage/storageAccounts/consumerstorage" received_share = next(x for x in list_detached_response) -store_reference = { - "referenceName": consumer_storage_account_resource_id, - "type": "ArmResourceReference" -} +store_reference = {"referenceName": consumer_storage_account_resource_id, "type": "ArmResourceReference"} sink = { "properties": { @@ -44,29 +41,29 @@ "mountPath": "mountPath-test", }, "storeKind": "AdlsGen2Account", - "storeReference": store_reference + "storeReference": store_reference, } -received_share['properties']['sink'] = sink +received_share["properties"]["sink"] = sink update_response = client.received_shares.begin_create_or_replace( - str(received_share['id']), - received_share=received_share) + str(received_share["id"]), received_share=received_share +) # [END attach_a_received_share] # Get a received share # [START get_a_received_share] -get_share_response = client.received_shares.get(received_share_id=received_share['id']) +get_share_response = client.received_shares.get(received_share_id=received_share["id"]) # [END get_a_received_share] # List attached received shares # [START list_attached_received_shares] list_attached_response = client.received_shares.list_attached( - reference_name=consumer_storage_account_resource_id, - order_by="properties/createdAt desc") + reference_name=consumer_storage_account_resource_id, order_by="properties/createdAt desc" +) # [END list_attached_received_shares] # Delete a received share # [START delete_a_received_share] -delete_received_share_response = client.received_shares.begin_delete(received_share_id=received_share['id']) -# [END delete_a_received_share] \ No newline at end of file +delete_received_share_response = client.received_shares.begin_delete(received_share_id=received_share["id"]) +# [END delete_a_received_share] diff --git a/sdk/purview/azure-purview-sharing/samples/sent_shares_examples.py b/sdk/purview/azure-purview-sharing/samples/sent_shares_examples.py index 9ca47e73ca33..5a0d66502d8b 100644 --- a/sdk/purview/azure-purview-sharing/samples/sent_shares_examples.py +++ b/sdk/purview/azure-purview-sharing/samples/sent_shares_examples.py @@ -34,29 +34,23 @@ { "containerName": "container-name", "receiverPath": "shared-file-name.txt", - "senderPath": "original/file-name.txt" + "senderPath": "original/file-name.txt", } ] }, "storeKind": "AdlsGen2Account", "storeReference": { "referenceName": "/subscriptions/{subscription-id}/resourceGroups/provider-storage-rg/providers/Microsoft.Storage/storageAccounts/providerstorage", - "type": "ArmResourceReference" - } + "type": "ArmResourceReference", + }, } sent_share = { - "properties": { - "artifact": artifact, - "displayName": "sampleShare", - "description": "A sample share" - }, - "shareKind": "InPlace" + "properties": {"artifact": artifact, "displayName": "sampleShare", "description": "A sample share"}, + "shareKind": "InPlace", } -request = client.sent_shares.begin_create_or_replace( - str(sent_share_id), - sent_share=sent_share) +request = client.sent_shares.begin_create_or_replace(str(sent_share_id), sent_share=sent_share) response = request.result() # [END create_a_sent_share] @@ -73,14 +67,15 @@ "properties": { "targetEmail": consumerEmail, "notify": "true", - "expirationDate": date(today.year+1,today.month,today.day).strftime("%Y-%m-%d") + " 00:00:00" - } + "expirationDate": date(today.year + 1, today.month, today.day).strftime("%Y-%m-%d") + " 00:00:00", + }, } invitation_response = client.sent_shares.create_invitation( sent_share_id=str(sent_share_id), sent_share_invitation_id=str(sent_share_invitation_id), - sent_share_invitation=invitation) + sent_share_invitation=invitation, +) # [END send_a_user_invitation] # Send a service invitation @@ -90,16 +85,14 @@ sent_share_invitation = { "invitationKind": "Service", - "properties": { - "targetActiveDirectoryId": targetActiverDirectoryId, - "targetObjectId": targetObjectId - } + "properties": {"targetActiveDirectoryId": targetActiverDirectoryId, "targetObjectId": targetObjectId}, } invitation_response = client.sent_shares.create_invitation( sent_share_id=str(sent_share_id), sent_share_invitation_id=str(sent_share_invitation_id), - sent_share_invitation=sent_share_invitation) + sent_share_invitation=sent_share_invitation, +) # [END send_a_service_invitation] # Get a sent share @@ -111,7 +104,8 @@ # [START get_all_sent_shares] list_request = client.sent_shares.list( reference_name=str(sent_share["properties.artifact.storeReference.referenceName"]), - order_by="properties/createdAt desc") + order_by="properties/createdAt desc", +) # [END get_all_sent_shares] # Delete a sent share @@ -123,9 +117,9 @@ # Get a sent share invitation (new) # [START get_a_sent_share_invitation] get_invitation_request = client.sent_shares.get_invitation( - sent_share_id=str(sent_share_id), - sent_share_invitation_id=str(sent_share_invitation_id)) -#[END get_a_sent_share_invitation] + sent_share_id=str(sent_share_id), sent_share_invitation_id=str(sent_share_invitation_id) +) +# [END get_a_sent_share_invitation] # View sent invitations # [START view_sent_invitations] @@ -135,7 +129,7 @@ # Delete a sent share invitation (new) # [START delete_a_sent_share_invitation] delete_invitation_request = client.sent_shares.begin_delete_invitation( - sent_share_id=str(sent_share_id), - sent_share_invitation_id=str(sent_share_invitation_id)) + sent_share_id=str(sent_share_id), sent_share_invitation_id=str(sent_share_invitation_id) +) delete_invitation_response = delete_invitation_request.result() -# [END delete_a_sent_share_invitation] \ No newline at end of file +# [END delete_a_sent_share_invitation] diff --git a/sdk/purview/azure-purview-sharing/samples/share_resources_examples.py b/sdk/purview/azure-purview-sharing/samples/share_resources_examples.py index 20ebc7cc6e96..1136497eb39e 100644 --- a/sdk/purview/azure-purview-sharing/samples/share_resources_examples.py +++ b/sdk/purview/azure-purview-sharing/samples/share_resources_examples.py @@ -25,9 +25,9 @@ # List share resources # [START list_share_resources] list_request = client.share_resources.list( - filter="properties/storeKind eq 'AdlsGen2Account'", - order_by="properties/createdAt desc") + filter="properties/storeKind eq 'AdlsGen2Account'", order_by="properties/createdAt desc" +) for list_response in list_request: print(list_response) -#[END list_share_resources] \ No newline at end of file +# [END list_share_resources] diff --git a/sdk/purview/azure-purview-sharing/setup.py b/sdk/purview/azure-purview-sharing/setup.py index cdc351addf4b..5a20b943feeb 100644 --- a/sdk/purview/azure-purview-sharing/setup.py +++ b/sdk/purview/azure-purview-sharing/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-purview-sharing" PACKAGE_PPRINT_NAME = "Azure Purview Sharing" diff --git a/sdk/purview/azure-purview-sharing/tests/conftest.py b/sdk/purview/azure-purview-sharing/tests/conftest.py index 17bb94764f0d..f52601b3d22d 100644 --- a/sdk/purview/azure-purview-sharing/tests/conftest.py +++ b/sdk/purview/azure-purview-sharing/tests/conftest.py @@ -38,7 +38,6 @@ remove_batch_sanitizers, ) - # Ignore async tests for Python < 3.5 collect_ignore_glob = [] if sys.version_info < (3, 5) or platform.python_implementation() == "PyPy": @@ -46,6 +45,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("PURVIEWSHARING_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/purview/azure-purview-sharing/tests/test_received_shares.py b/sdk/purview/azure-purview-sharing/tests/test_received_shares.py index 6333f7ed5d70..1582cc6e581a 100644 --- a/sdk/purview/azure-purview-sharing/tests/test_received_shares.py +++ b/sdk/purview/azure-purview-sharing/tests/test_received_shares.py @@ -17,24 +17,24 @@ build_received_shares_get_request, build_received_shares_delete_request, build_received_shares_create_or_replace_request, - build_received_shares_list_attached_request + build_received_shares_list_attached_request, ) + class TestReceivedShares(TestPurviewSharing): @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_get_all_detached_shares(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "4556ccb7-5d6a-45d4-8568-e1faa236e037" # uuid4() - sent_share_invitation_id = "554696cf-ddc7-46c0-b915-45face229cd3" # uuid4() + sent_share_id = "4556ccb7-5d6a-45d4-8568-e1faa236e037" # uuid4() + sent_share_invitation_id = "554696cf-ddc7-46c0-b915-45face229cd3" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -44,19 +44,16 @@ def test_get_all_detached_shares(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-01-01 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-01-01 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -65,8 +62,8 @@ def test_get_all_detached_shares(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail list_detached_request = build_received_shares_list_detached_request(order_by="properties/createdAt desc") list_detached_response = client.send_request(list_detached_request) @@ -76,23 +73,24 @@ def test_get_all_detached_shares(self, purviewsharing_endpoint): list_detached = json.loads(list_detached_response.content) assert list_detached is not None - assert len(list_detached['value']) > 0 + assert len(list_detached["value"]) > 0 # is the number of items that has shareStatus "Detached" equal to the number of all results - assert len([x for x in list_detached['value'] if x['properties']['shareStatus'] == "Detached"]) == len(list_detached['value']) + assert len([x for x in list_detached["value"] if x["properties"]["shareStatus"] == "Detached"]) == len( + list_detached["value"] + ) @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_get_received_share(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "34ede054-d6fc-49a1-a4e2-996433ed4b53" #uuid4() - sent_share_invitation_id = "b8307b9f-db8d-4023-b406-2e7f9f6d88c5" #uuid4() + sent_share_id = "34ede054-d6fc-49a1-a4e2-996433ed4b53" # uuid4() + sent_share_invitation_id = "b8307b9f-db8d-4023-b406-2e7f9f6d88c5" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -102,19 +100,16 @@ def test_get_received_share(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-01-01 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-01-01 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -123,8 +118,8 @@ def test_get_received_share(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail list_detached_request = build_received_shares_list_detached_request(order_by="properties/createdAt desc") list_detached_response = client.send_request(list_detached_request) @@ -133,29 +128,28 @@ def test_get_received_share(self, purviewsharing_endpoint): list_detached = json.loads(list_detached_response.content) - received_share = list_detached['value'][0] + received_share = list_detached["value"][0] - get_share_request = build_received_shares_get_request(received_share_id=received_share['id']) + get_share_request = build_received_shares_get_request(received_share_id=received_share["id"]) get_share_response = client.send_request(get_share_request) - + retrieved_share = json.loads(get_share_response.content) print(retrieved_share) assert retrieved_share is not None - assert retrieved_share['id'] == received_share['id'] + assert retrieved_share["id"] == received_share["id"] @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_delete_received_share(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "2a7268a0-85d9-4c13-ba7b-a25ebba5faf3" #uuid4() - sent_share_invitation_id = "9a672068-d620-4492-9e20-3f686f768f29" #uuid4() + sent_share_id = "2a7268a0-85d9-4c13-ba7b-a25ebba5faf3" # uuid4() + sent_share_invitation_id = "9a672068-d620-4492-9e20-3f686f768f29" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -165,19 +159,16 @@ def test_delete_received_share(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-01-01 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-01-01 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -186,8 +177,8 @@ def test_delete_received_share(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail list_detached_request = build_received_shares_list_detached_request(order_by="properties/createdAt desc") list_detached_response = client.send_request(list_detached_request) @@ -196,9 +187,9 @@ def test_delete_received_share(self, purviewsharing_endpoint): list_detached = json.loads(list_detached_response.content) - received_share = list_detached['value'][0] + received_share = list_detached["value"][0] - delete_received_share_request = build_received_shares_delete_request(received_share_id=received_share['id']) + delete_received_share_request = build_received_shares_delete_request(received_share_id=received_share["id"]) delete_received_share_response = client.send_request(delete_received_share_request) try: @@ -211,18 +202,17 @@ def test_delete_received_share(self, purviewsharing_endpoint): @recorded_by_proxy def test_attach_received_share(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "b9d374c2-30d7-4e91-a750-a53238002652" # uuid4() - sent_share_invitation_id = "242f81b5-fe36-402b-9a27-5d2af7f33308" #uuid4() + sent_share_id = "b9d374c2-30d7-4e91-a750-a53238002652" # uuid4() + sent_share_invitation_id = "242f81b5-fe36-402b-9a27-5d2af7f33308" # uuid4() sent_share = self.prepare_sent_share() # cspell:disable-next-line consumer_storage_account_resource_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fakeResourceGroup/providers/Microsoft.Storage/storageAccounts/fakeStorageAccountR" request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -232,19 +222,16 @@ def test_attach_received_share(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-01-01 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-01-01 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -253,8 +240,8 @@ def test_attach_received_share(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail list_detached_request = build_received_shares_list_detached_request(order_by="properties/createdAt desc") list_detached_response = client.send_request(list_detached_request) @@ -262,12 +249,9 @@ def test_attach_received_share(self, purviewsharing_endpoint): assert list_detached_response is not None list_detached = json.loads(list_detached_response.content) - received_share = list_detached['value'][0] + received_share = list_detached["value"][0] - store_reference = { - "referenceName": consumer_storage_account_resource_id, - "type": "ArmResourceReference" - } + store_reference = {"referenceName": consumer_storage_account_resource_id, "type": "ArmResourceReference"} # cspell:disable sink = { @@ -277,17 +261,16 @@ def test_attach_received_share(self, purviewsharing_endpoint): "mountPath": "mountPathciynxouybsqvfgmcfwtt", }, "storeKind": "AdlsGen2Account", - "storeReference": store_reference + "storeReference": store_reference, } # cspell:enable - received_share['properties']['sink'] = sink + received_share["properties"]["sink"] = sink update_request = build_received_shares_create_or_replace_request( - received_share['id'], - content_type="application/json", - content=json.dumps(received_share)) - + received_share["id"], content_type="application/json", content=json.dumps(received_share) + ) + update_response = client.send_request(update_request) assert update_response is not None @@ -306,18 +289,17 @@ def test_attach_received_share(self, purviewsharing_endpoint): @recorded_by_proxy def test_get_all_attached_shares(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "6143851f-930b-4050-a437-00b6bfbf2b4e" #uuid4() - sent_share_invitation_id = "4430cf68-61db-4e05-af7b-297bad6d362b" #uuid4() + sent_share_id = "6143851f-930b-4050-a437-00b6bfbf2b4e" # uuid4() + sent_share_invitation_id = "4430cf68-61db-4e05-af7b-297bad6d362b" # uuid4() sent_share = self.prepare_sent_share() # cspell:disable-next-line consumer_storage_account_resource_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fakeResourceGroup/providers/Microsoft.Storage/storageAccounts/fakeStorageAccountR" request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -327,19 +309,16 @@ def test_get_all_attached_shares(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-01-01 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-01-01 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -348,8 +327,8 @@ def test_get_all_attached_shares(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail list_detached_request = build_received_shares_list_detached_request(order_by="properties/createdAt desc") list_detached_response = client.send_request(list_detached_request) @@ -357,12 +336,9 @@ def test_get_all_attached_shares(self, purviewsharing_endpoint): assert list_detached_response is not None list_detached = json.loads(list_detached_response.content) - received_share = list_detached['value'][0] + received_share = list_detached["value"][0] - store_reference = { - "referenceName": consumer_storage_account_resource_id, - "type": "ArmResourceReference" - } + store_reference = {"referenceName": consumer_storage_account_resource_id, "type": "ArmResourceReference"} # cspell:disable sink = { @@ -372,25 +348,24 @@ def test_get_all_attached_shares(self, purviewsharing_endpoint): "mountPath": "mountPathciynxouybsqvfgmcfwtt", }, "storeKind": "AdlsGen2Account", - "storeReference": store_reference + "storeReference": store_reference, } # cspell:enable - received_share['properties']['sink'] = sink + received_share["properties"]["sink"] = sink update_request = build_received_shares_create_or_replace_request( - received_share['id'], - content_type="application/json", - content=json.dumps(received_share)) - + received_share["id"], content_type="application/json", content=json.dumps(received_share) + ) + update_response = client.send_request(update_request) assert update_response is not None assert update_response.status_code == 201, "Invalid Status Code " + str(update_response.status_code) list_attached_request = build_received_shares_list_attached_request( - reference_name=consumer_storage_account_resource_id, - order_by="properties/createdAt desc") + reference_name=consumer_storage_account_resource_id, order_by="properties/createdAt desc" + ) list_attached_response = client.send_request(list_attached_request) assert list_attached_response is not None @@ -398,6 +373,8 @@ def test_get_all_attached_shares(self, purviewsharing_endpoint): list_attached = json.loads(list_attached_response.content) assert list_attached is not None - assert len(list_attached['value']) > 0 + assert len(list_attached["value"]) > 0 # is the number of items that has shareStatus "Attached" equal to the number of all results - assert len([x for x in list_attached['value'] if x['properties']['shareStatus'] == "Attached"]) == len(list_attached['value']) \ No newline at end of file + assert len([x for x in list_attached["value"] if x["properties"]["shareStatus"] == "Attached"]) == len( + list_attached["value"] + ) diff --git a/sdk/purview/azure-purview-sharing/tests/test_sent_shares.py b/sdk/purview/azure-purview-sharing/tests/test_sent_shares.py index 9b7dcfb61209..df7300d4b674 100644 --- a/sdk/purview/azure-purview-sharing/tests/test_sent_shares.py +++ b/sdk/purview/azure-purview-sharing/tests/test_sent_shares.py @@ -18,24 +18,24 @@ build_sent_shares_delete_request, build_sent_shares_delete_invitation_request, build_sent_shares_list_invitations_request, - build_sent_shares_get_invitation_request + build_sent_shares_get_invitation_request, ) + class TestSentShares(TestPurviewSharing): @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_create_sent_share(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "541fd873-afa4-4d41-8b67-70d2302154c4" # uuid4() + sent_share_id = "541fd873-afa4-4d41-8b67-70d2302154c4" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) - + assert response is not None assert response.status_code == 201, "Invalid Status Code " + str(response.status_code) assert response.content is not None @@ -43,21 +43,20 @@ def test_create_sent_share(self, purviewsharing_endpoint): created_sent_share = json.loads(response.content) assert created_sent_share is not None - assert created_sent_share['id'] == str(sent_share_id) + assert created_sent_share["id"] == str(sent_share_id) @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_create_sent_share_user_invitation(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "37061299-7990-4edd-b14c-2edf02edf162" # uuid4() - sent_share_invitation_id = "f3275be4-b54d-4620-bf50-ec478f8c12a6" #uuid4() + sent_share_id = "37061299-7990-4edd-b14c-2edf02edf162" # uuid4() + sent_share_invitation_id = "f3275be4-b54d-4620-bf50-ec478f8c12a6" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -67,19 +66,16 @@ def test_create_sent_share_user_invitation(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-03-02 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-03-02 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -88,21 +84,20 @@ def test_create_sent_share_user_invitation(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_get_sent_share(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "41211a38-0125-45a0-b748-b6008cf107c7" # uuid4() + sent_share_id = "41211a38-0125-45a0-b748-b6008cf107c7" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -116,20 +111,19 @@ def test_get_sent_share(self, purviewsharing_endpoint): retrieved_sent_share = json.loads(get_response.content) - assert retrieved_sent_share['id'] == str(sent_share_id) + assert retrieved_sent_share["id"] == str(sent_share_id) @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_get_all_sent_shares(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "25fb1b10-8131-4610-84c4-181236fdd062" # uuid4() + sent_share_id = "25fb1b10-8131-4610-84c4-181236fdd062" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -137,14 +131,15 @@ def test_get_all_sent_shares(self, purviewsharing_endpoint): list_request = build_sent_shares_list_request( reference_name=sent_share["properties"]["artifact"]["storeReference"]["referenceName"], - order_by="properties/createdAt desc") - + order_by="properties/createdAt desc", + ) + list_response = client.send_request(list_request) assert list_response is not None assert list_response.content is not None - - list = json.loads(list_response.content)['value'] + + list = json.loads(list_response.content)["value"] assert len(list) > 0, "Invalid number of shares " + str(len(list)) assert len([x for x in list if x["id"] == str(sent_share_id)]) == 1 @@ -153,14 +148,13 @@ def test_get_all_sent_shares(self, purviewsharing_endpoint): @recorded_by_proxy def test_delete_sent_share(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "d857d382-b535-4b6e-bb5a-db59c42ed333" # uuid4() + sent_share_id = "d857d382-b535-4b6e-bb5a-db59c42ed333" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -182,37 +176,37 @@ def test_delete_sent_share(self, purviewsharing_endpoint): @recorded_by_proxy def test_create_sent_share_service_invitation(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "c0a51c4e-6951-4fb6-a501-98034ab5b741" # uuid4() - sent_share_invitation_id = "840faa15-db43-46b5-9de0-842c0aa2db35" # uuid4() + sent_share_id = "c0a51c4e-6951-4fb6-a501-98034ab5b741" # uuid4() + sent_share_invitation_id = "840faa15-db43-46b5-9de0-842c0aa2db35" # uuid4() sent_share = self.prepare_sent_share() - + request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None assert response.status_code == 201, "Invalid Status Code 1 " + str(response.status_code) - targetActiveDirectoryId = "b73a405f-f2e4-40f9-a606-5562778074c6" # uuid4() - targetObjectId = "7cbeb37b-95ea-4a7a-8cb3-becc797b3b8d" # uuid4() + targetActiveDirectoryId = "b73a405f-f2e4-40f9-a606-5562778074c6" # uuid4() + targetObjectId = "7cbeb37b-95ea-4a7a-8cb3-becc797b3b8d" # uuid4() invitation = { "invitationKind": "Service", "properties": { "targetActiveDirectoryId": str(targetActiveDirectoryId), - "targetObjectId": str(targetObjectId) - } + "targetObjectId": str(targetObjectId), + }, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -221,45 +215,45 @@ def test_create_sent_share_service_invitation(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetActiveDirectoryId'] == str(targetActiveDirectoryId) - assert created_invitation['properties']['targetObjectId'] == str(targetObjectId) + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetActiveDirectoryId"] == str(targetActiveDirectoryId) + assert created_invitation["properties"]["targetObjectId"] == str(targetObjectId) @PurviewSharingPowerShellPreparer() @recorded_by_proxy def test_get_all_sent_share_service_invitation(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "df189706-d347-4659-b7d9-62f8b7b974d2" # uuid4() - sent_share_invitation_id = "2d423d1e-b1b1-4b33-9960-2fd2dd3fe90c" #uuid4() + sent_share_id = "df189706-d347-4659-b7d9-62f8b7b974d2" # uuid4() + sent_share_invitation_id = "2d423d1e-b1b1-4b33-9960-2fd2dd3fe90c" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None assert response.status_code == 201, "Invalid Status Code 1 " + str(response.status_code) - targetActiveDirectoryId = "2a040521-5776-4569-a788-bc9b66160f6b" # uuid4() - targetObjectId = "e86fe185-1f23-4518-ab7b-e887cca44933" #uuid4() + targetActiveDirectoryId = "2a040521-5776-4569-a788-bc9b66160f6b" # uuid4() + targetObjectId = "e86fe185-1f23-4518-ab7b-e887cca44933" # uuid4() sent_share_invitation = { "invitationKind": "Service", "properties": { "targetActiveDirectoryId": str(targetActiveDirectoryId), - "targetObjectId": str(targetObjectId) - } + "targetObjectId": str(targetObjectId), + }, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(sent_share_invitation)) - + content=json.dumps(sent_share_invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -268,18 +262,19 @@ def test_get_all_sent_share_service_invitation(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetActiveDirectoryId'] == str(targetActiveDirectoryId) - assert created_invitation['properties']['targetObjectId'] == str(targetObjectId) + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetActiveDirectoryId"] == str(targetActiveDirectoryId) + assert created_invitation["properties"]["targetObjectId"] == str(targetObjectId) list_request = build_sent_shares_list_invitations_request(sent_share_id=sent_share_id) list_response = client.send_request(list_request) assert list_response is not None assert list_response.content is not None - - list = json.loads(list_response.content)['value'] - assert len([x for x in list if x['id'] == str(sent_share_invitation_id)]) == 1 + + list = json.loads(list_response.content)["value"] + assert len([x for x in list if x["id"] == str(sent_share_invitation_id)]) == 1 + ### ### ### NEW ### ### ### @@ -287,37 +282,37 @@ def test_get_all_sent_share_service_invitation(self, purviewsharing_endpoint): @recorded_by_proxy def test_delete_sent_share_service_invitation(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "03a166c3-f68d-41fe-9af1-83f5dcc8b83e" # uuid4() - sent_share_invitation_id = "0bea71cd-428b-4989-91e9-92f19b9e165c" # uuid4() + sent_share_id = "03a166c3-f68d-41fe-9af1-83f5dcc8b83e" # uuid4() + sent_share_invitation_id = "0bea71cd-428b-4989-91e9-92f19b9e165c" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) response = client.send_request(request) assert response is not None assert response.status_code == 201, "Invalid Status Code " + str(response.status_code) - targetActiveDirectoryId = "746a6b35-6571-4688-9e52-d29451add6ed" # uuid4() - targetObjectId = "fb5b839c-1401-4a58-b956-2d42f5641039" #uuid4() + targetActiveDirectoryId = "746a6b35-6571-4688-9e52-d29451add6ed" # uuid4() + targetObjectId = "fb5b839c-1401-4a58-b956-2d42f5641039" # uuid4() sent_share_invitation = { "invitationKind": "Service", "properties": { "targetActiveDirectoryId": str(targetActiveDirectoryId), - "targetObjectId": str(targetObjectId) - } + "targetObjectId": str(targetObjectId), + }, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(sent_share_invitation)) - + content=json.dumps(sent_share_invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -325,9 +320,9 @@ def test_delete_sent_share_service_invitation(self, purviewsharing_endpoint): assert invitation_response.content is not None delete_request = build_sent_shares_delete_invitation_request( - sent_share_id=sent_share_id, - sent_share_invitation_id=sent_share_invitation_id) - + sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id + ) + delete_response = client.send_request(delete_request) assert delete_response is not None @@ -343,15 +338,14 @@ def test_delete_sent_share_service_invitation(self, purviewsharing_endpoint): @recorded_by_proxy def test_get_sent_share_invitation(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) - sent_share_id = "1a82d02a-033c-4624-b8f2-243c0df06a9b" # uuid4() - sent_share_invitation_id = "23006055-336a-437d-9808-3793af9fc6a8" # uuid4() + sent_share_id = "1a82d02a-033c-4624-b8f2-243c0df06a9b" # uuid4() + sent_share_invitation_id = "23006055-336a-437d-9808-3793af9fc6a8" # uuid4() sent_share = self.prepare_sent_share() request = build_sent_shares_create_or_replace_request( - sent_share_id, - content_type="application/json", - content=json.dumps(sent_share)) - + sent_share_id, content_type="application/json", content=json.dumps(sent_share) + ) + response = client.send_request(request) assert response is not None @@ -361,19 +355,16 @@ def test_get_sent_share_invitation(self, purviewsharing_endpoint): invitation = { "invitationKind": "User", - "properties": { - "targetEmail": consumerEmail, - "notify": "true", - "expirationDate": "2024-03-02 00:00:00" - } + "properties": {"targetEmail": consumerEmail, "notify": "true", "expirationDate": "2024-03-02 00:00:00"}, } invitation_request = build_sent_shares_create_invitation_request( sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id, content_type="application/json", - content=json.dumps(invitation)) - + content=json.dumps(invitation), + ) + invitation_response = client.send_request(invitation_request) assert invitation_response is not None @@ -382,17 +373,17 @@ def test_get_sent_share_invitation(self, purviewsharing_endpoint): created_invitation = json.loads(invitation_response.content) - assert created_invitation['id'] == str(sent_share_invitation_id) - assert created_invitation['properties']['targetEmail'] == consumerEmail + assert created_invitation["id"] == str(sent_share_invitation_id) + assert created_invitation["properties"]["targetEmail"] == consumerEmail - get_request = build_sent_shares_get_invitation_request(sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id) + get_request = build_sent_shares_get_invitation_request( + sent_share_id=sent_share_id, sent_share_invitation_id=sent_share_invitation_id + ) get_response = client.send_request(get_request) assert get_response is not None assert get_response.content is not None - - retrieved_sent_share_invitation = json.loads(get_response.content) - assert retrieved_sent_share_invitation['id'] == str(sent_share_invitation_id) + retrieved_sent_share_invitation = json.loads(get_response.content) - \ No newline at end of file + assert retrieved_sent_share_invitation["id"] == str(sent_share_invitation_id) diff --git a/sdk/purview/azure-purview-sharing/tests/test_share_resources.py b/sdk/purview/azure-purview-sharing/tests/test_share_resources.py index 040c3cef9052..52620b0c6748 100644 --- a/sdk/purview/azure-purview-sharing/tests/test_share_resources.py +++ b/sdk/purview/azure-purview-sharing/tests/test_share_resources.py @@ -12,6 +12,7 @@ build_share_resources_list_request, ) + class TestShareResources(TestPurviewSharing): @PurviewSharingPowerShellPreparer() @recorded_by_proxy @@ -19,16 +20,15 @@ def test_list_share_resources(self, purviewsharing_endpoint): client = self.create_client(endpoint=purviewsharing_endpoint) list_request = build_share_resources_list_request( - filter="properties/storeKind eq 'AdlsGen2Account'", - order_by="properties/createdAt desc") - + filter="properties/storeKind eq 'AdlsGen2Account'", order_by="properties/createdAt desc" + ) + list_response = client.send_request(list_request) assert list_response is not None assert list_response.content is not None - - list = json.loads(list_response.content)['value'] + + list = json.loads(list_response.content)["value"] assert len(list) > 0, "Invalid number of share resources " + str(len(list)) assert all(x["storeKind"] == "AdlsGen2Account" for x in list) - diff --git a/sdk/purview/azure-purview-sharing/tests/testcase.py b/sdk/purview/azure-purview-sharing/tests/testcase.py index eff9f96f868f..17ecc127aa64 100644 --- a/sdk/purview/azure-purview-sharing/tests/testcase.py +++ b/sdk/purview/azure-purview-sharing/tests/testcase.py @@ -8,6 +8,7 @@ from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer from azure.purview.sharing import PurviewSharingClient + class TestPurviewSharing(AzureRecordedTestCase): def create_client(self, endpoint): @@ -17,39 +18,28 @@ def create_client(self, endpoint): credential=credential, endpoint=endpoint, ) - + def prepare_sent_share(self): artifact = { "properties": { - "paths": [ - { - "containerName": "container1", - "receiverPath": "folder1", - "senderPath": "folder1" - } - ] + "paths": [{"containerName": "container1", "receiverPath": "folder1", "senderPath": "folder1"}] }, "storeKind": "AdlsGen2Account", "storeReference": { # cspell:disable-next-line "referenceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fakeResourceGroup/providers/Microsoft.Storage/storageAccounts/fakeStorageAccount", - "type": "ArmResourceReference" - } + "type": "ArmResourceReference", + }, } sent_share = { - "properties": { - "artifact": artifact, - "displayName": "sentShare-Test", - "description": "A sample share" - }, - "shareKind": "InPlace" + "properties": {"artifact": artifact, "displayName": "sentShare-Test", "description": "A sample share"}, + "shareKind": "InPlace", } return sent_share + PurviewSharingPowerShellPreparer = functools.partial( - PowerShellPreparer, - "purviewsharing", - purviewsharing_endpoint="https://fake_account.share.purview.azure.com" -) \ No newline at end of file + PowerShellPreparer, "purviewsharing", purviewsharing_endpoint="https://fake_account.share.purview.azure.com" +) diff --git a/sdk/purview/azure-purview-workflow/azure/purview/workflow/_patch.py b/sdk/purview/azure-purview-workflow/azure/purview/workflow/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/purview/azure-purview-workflow/azure/purview/workflow/_patch.py +++ b/sdk/purview/azure-purview-workflow/azure/purview/workflow/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/_patch.py b/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/_patch.py +++ b/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/operations/_patch.py b/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/operations/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/operations/_patch.py +++ b/sdk/purview/azure-purview-workflow/azure/purview/workflow/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-workflow/azure/purview/workflow/operations/_patch.py b/sdk/purview/azure-purview-workflow/azure/purview/workflow/operations/_patch.py index 49900f6ab120..47e75e87874f 100644 --- a/sdk/purview/azure-purview-workflow/azure/purview/workflow/operations/_patch.py +++ b/sdk/purview/azure-purview-workflow/azure/purview/workflow/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/purview/azure-purview-workflow/samples/approve_workflow_task.py b/sdk/purview/azure-purview-workflow/samples/approve_workflow_task.py index bfc7a49f6906..e8d628fd0633 100644 --- a/sdk/purview/azure-purview-workflow/samples/approve_workflow_task.py +++ b/sdk/purview/azure-purview-workflow/samples/approve_workflow_task.py @@ -47,21 +47,20 @@ username = str(os.getenv("USERNAME")) password = str(os.getenv("PASSWORD")) except KeyError: - LOG.error("Missing environment variable 'WORKFLOW_ENDPOINT' or 'AZURE_CLIENT_ID' or 'AZURE_TENANT_ID' or " - "'USERNAME' or 'PASSWORD' - please set if before running the example") + LOG.error( + "Missing environment variable 'WORKFLOW_ENDPOINT' or 'AZURE_CLIENT_ID' or 'AZURE_TENANT_ID' or " + "'USERNAME' or 'PASSWORD' - please set if before running the example" + ) exit() -credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, - tenant_id=tenant_id) +credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id) # Build a client through AAD -client = PurviewWorkflowClient(endpoint= endpoint, credential=credential) +client = PurviewWorkflowClient(endpoint=endpoint, credential=credential) try: - approve_response = { - "comment": "Thanks for raising this!" - } + approve_response = {"comment": "Thanks for raising this!"} task_id = "6785028c-1348-4415-b6b7-f723be6c8c31" client.approval.approve(task_id, approve_response) - print('Successfully approve a workflow task.') + print("Successfully approve a workflow task.") except HttpResponseError as e: print(f"Failed to send JSON message: {e}") diff --git a/sdk/purview/azure-purview-workflow/samples/create_client.py b/sdk/purview/azure-purview-workflow/samples/create_client.py index 3a537c156d2a..dd2a83604648 100644 --- a/sdk/purview/azure-purview-workflow/samples/create_client.py +++ b/sdk/purview/azure-purview-workflow/samples/create_client.py @@ -48,9 +48,9 @@ except KeyError: LOG.error( "Missing environment variable 'WORKFLOW_ENDPOINT' or 'AZURE_CLIENT_ID' or 'AZURE_TENANT_ID' or 'USERNAME' or " - "'PASSWORD' - please set if before running the example") + "'PASSWORD' - please set if before running the example" + ) exit() -credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, - tenant_id=tenant_id) +credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id) # Build a client through AAD client = PurviewWorkflowClient(endpoint=endpoint, credential=credential) diff --git a/sdk/purview/azure-purview-workflow/samples/create_workflow.py b/sdk/purview/azure-purview-workflow/samples/create_workflow.py index b33b7ab0670b..4763c6149cf6 100644 --- a/sdk/purview/azure-purview-workflow/samples/create_workflow.py +++ b/sdk/purview/azure-purview-workflow/samples/create_workflow.py @@ -52,100 +52,76 @@ except KeyError: LOG.error( "Missing environment variable 'WORKFLOW_ENDPOINT' or 'AZURE_CLIENT_ID' or 'AZURE_TENANT_ID' or 'USERNAME' or " - "'PASSWORD' - please set if before running the example") + "'PASSWORD' - please set if before running the example" + ) exit() -credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, - tenant_id=tenant_id) +credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id) # Build a client through AAD client = PurviewWorkflowClient(endpoint=endpoint, credential=credential) try: workflow_id = str(uuid.uuid4()) workflow = { - "name": "Create glossary term workflow", - "description": "", - "triggers": [ - { - "type": "when_term_creation_is_requested", - "underGlossaryHierarchy": "/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48" - } - ], - "isEnabled": True, - "actionDag": { - "actions": { - "Start and wait for an approval": { - "type": "Approval", - "inputs": { - "parameters": { - "approvalType": "PendingOnAll", - "title": "Approval Request for Create Glossary Term", - "assignedTo": [ - "eece94d9-0619-4669-bb8a-d6ecec5220bc" - ] - } - }, - "runAfter": {} - }, - "Condition": { - "type": "If", - "expression": { - "and": [ - { - "equals": [ - "@outputs('Start and wait for an approval')['body/outcome']", - "Approved" - ] - } - ] - }, + "name": "Create glossary term workflow", + "description": "", + "triggers": [ + { + "type": "when_term_creation_is_requested", + "underGlossaryHierarchy": "/glossaries/20031e20-b4df-4a66-a61d-1b0716f3fa48", + } + ], + "isEnabled": True, + "actionDag": { "actions": { - "Create glossary term": { - "type": "CreateTerm", - "runAfter": {} - }, - "Send email notification": { - "type": "EmailNotification", - "inputs": { - "parameters": { - "emailSubject": "Glossary Term Create - APPROVED", - "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.", - "emailRecipients": [ - "@{triggerBody()['request']['requestor']}" - ] - } + "Start and wait for an approval": { + "type": "Approval", + "inputs": { + "parameters": { + "approvalType": "PendingOnAll", + "title": "Approval Request for Create Glossary Term", + "assignedTo": ["eece94d9-0619-4669-bb8a-d6ecec5220bc"], + } + }, + "runAfter": {}, + }, + "Condition": { + "type": "If", + "expression": { + "and": [{"equals": ["@outputs('Start and wait for an approval')['body/outcome']", "Approved"]}] + }, + "actions": { + "Create glossary term": {"type": "CreateTerm", "runAfter": {}}, + "Send email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - APPROVED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is approved.", + "emailRecipients": ["@{triggerBody()['request']['requestor']}"], + } + }, + "runAfter": {"Create glossary term": ["Succeeded"]}, + }, + }, + "else": { + "actions": { + "Send reject email notification": { + "type": "EmailNotification", + "inputs": { + "parameters": { + "emailSubject": "Glossary Term Create - REJECTED", + "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.", + "emailRecipients": ["@{triggerBody()['request']['requestor']}"], + } + }, + "runAfter": {}, + } + } + }, + "runAfter": {"Start and wait for an approval": ["Succeeded"]}, }, - "runAfter": { - "Create glossary term": [ - "Succeeded" - ] - } - } - }, - "else": { - "actions": { - "Send reject email notification": { - "type": "EmailNotification", - "inputs": { - "parameters": { - "emailSubject": "Glossary Term Create - REJECTED", - "emailMessage": "Your request for Glossary Term @{triggerBody()['request']['term']['name']} is rejected.", - "emailRecipients": [ - "@{triggerBody()['request']['requestor']}" - ] - } - }, - "runAfter": {} - } - } - }, - "runAfter": { - "Start and wait for an approval": [ - "Succeeded" - ] } - } - } - } + }, } result = client.workflow.create_or_replace(workflow_id=workflow_id, workflow_create_or_update_command=workflow) print(result) diff --git a/sdk/purview/azure-purview-workflow/samples/submit_userrequests.py b/sdk/purview/azure-purview-workflow/samples/submit_userrequests.py index e4f07810ea6d..a1775dfffe2a 100644 --- a/sdk/purview/azure-purview-workflow/samples/submit_userrequests.py +++ b/sdk/purview/azure-purview-workflow/samples/submit_userrequests.py @@ -49,11 +49,11 @@ except KeyError: LOG.error( "Missing environment variable 'WORKFLOW_ENDPOINT' or 'AZURE_CLIENT_ID' or 'AZURE_TENANT_ID' or 'USERNAME' or " - "'PASSWORD' - please set if before running the example") + "'PASSWORD' - please set if before running the example" + ) exit() -credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, - tenant_id=tenant_id) +credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id) # Build a client through AAD client = PurviewWorkflowClient(endpoint=endpoint, credential=credential) @@ -65,16 +65,14 @@ "payload": { "glossaryTerm": { "name": "term", - "anchor": { - "glossaryGuid": "5dae5e5b-5aa6-48f1-9e46-26fe7328de71" - }, + "anchor": {"glossaryGuid": "5dae5e5b-5aa6-48f1-9e46-26fe7328de71"}, "status": "Approved", - "nickName": "term" + "nickName": "term", } - } + }, } ], - "comment": "Thanks!" + "comment": "Thanks!", } result = client.user_requests.submit(user_requests_payload) print(result) diff --git a/sdk/purview/azure-purview-workflow/setup.py b/sdk/purview/azure-purview-workflow/setup.py index bdca833e7925..6d6f2c0d1e82 100644 --- a/sdk/purview/azure-purview-workflow/setup.py +++ b/sdk/purview/azure-purview-workflow/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-purview-workflow" PACKAGE_PPRINT_NAME = "Azure Purview Workflow Service" diff --git a/sdk/purview/azure-purview-workflow/tests/conftest.py b/sdk/purview/azure-purview-workflow/tests/conftest.py index 090ebb9bb94d..b8d30fc489fe 100644 --- a/sdk/purview/azure-purview-workflow/tests/conftest.py +++ b/sdk/purview/azure-purview-workflow/tests/conftest.py @@ -30,7 +30,12 @@ from dotenv import load_dotenv -from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer, add_header_regex_sanitizer +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) # Ignore async tests for Python < 3.5 collect_ignore_glob = [] @@ -39,6 +44,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): tenant_id = os.environ.get("WORKFLOW_TENANT_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/purview/azure-purview-workflow/tests/testcase.py b/sdk/purview/azure-purview-workflow/tests/testcase.py index f24b79e55dba..846441d72228 100644 --- a/sdk/purview/azure-purview-workflow/tests/testcase.py +++ b/sdk/purview/azure-purview-workflow/tests/testcase.py @@ -23,7 +23,5 @@ def create_client(self, endpoint): WorkflowPowerShellPreparer = functools.partial( - PowerShellPreparer, - "workflow", - workflow_endpoint="https://test-create-account.purview.azure.com" + PowerShellPreparer, "workflow", workflow_endpoint="https://test-create-account.purview.azure.com" ) diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_patch.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_patch.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_patch.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_patch.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_patch.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_patch.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_patch.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_patch.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_patch.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_patch.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quantum/azure-mgmt-quantum/setup.py b/sdk/quantum/azure-mgmt-quantum/setup.py index 61eba21c923e..dd49113db939 100644 --- a/sdk/quantum/azure-mgmt-quantum/setup.py +++ b/sdk/quantum/azure-mgmt-quantum/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/quantum/azure-mgmt-quantum/tests/conftest.py b/sdk/quantum/azure-mgmt-quantum/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/quantum/azure-mgmt-quantum/tests/conftest.py +++ b/sdk/quantum/azure-mgmt-quantum/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/quantum/azure-mgmt-quantum/tests/test_cli_mgmt_quantum.py b/sdk/quantum/azure-mgmt-quantum/tests/test_cli_mgmt_quantum.py index 41a12ef6d3eb..ef2e6446dc1a 100644 --- a/sdk/quantum/azure-mgmt-quantum/tests/test_cli_mgmt_quantum.py +++ b/sdk/quantum/azure-mgmt-quantum/tests/test_cli_mgmt_quantum.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.quantum import AzureQuantumMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtAzureQuantum(AzureMgmtRecordedTestCase): diff --git a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/_patch.py b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/_patch.py +++ b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/_patch.py b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/_patch.py +++ b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/operations/_patch.py b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/operations/_patch.py +++ b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/models/_patch.py b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/models/_patch.py +++ b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/operations/_patch.py b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/operations/_patch.py +++ b/sdk/qumulo/azure-mgmt-qumulo/azure/mgmt/qumulo/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/qumulo/azure-mgmt-qumulo/setup.py b/sdk/qumulo/azure-mgmt-qumulo/setup.py index 23a2d50177f8..e83e89d61725 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/setup.py +++ b/sdk/qumulo/azure-mgmt-qumulo/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_async_test.py b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_async_test.py index 081de28b8682..4d31653d804c 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_async_test.py +++ b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_async_test.py @@ -13,6 +13,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestQumuloMgmtFileSystemsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -26,4 +27,3 @@ async def test_list_by_resource_group(self, resource_group): ) result = [r async for r in response] assert result == [] - \ No newline at end of file diff --git a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_test.py b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_test.py index 6abcf1db00b3..755b6afe8409 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_test.py +++ b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_file_systems_operations_test.py @@ -12,6 +12,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestQumuloMgmtFileSystemsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_async_test.py b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_async_test.py index ceaa3d2fccfa..75aec77cbb03 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_async_test.py +++ b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_async_test.py @@ -13,6 +13,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestQumuloMgmtOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_test.py b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_test.py index d88477cd7ae1..4ed817d2f6a9 100644 --- a/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_test.py +++ b/sdk/qumulo/azure-mgmt-qumulo/tests/test_qumulo_mgmt_operations_test.py @@ -12,6 +12,7 @@ AZURE_LOCATION = "eastus" + @pytest.mark.live_test_only class TestQumuloMgmtOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_patch.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_patch.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_patch.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_patch.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_patch.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_patch.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_patch.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_patch.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_patch.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_patch.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_patch.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_patch.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/rdbms/azure-mgmt-rdbms/setup.py b/sdk/rdbms/azure-mgmt-rdbms/setup.py index 26b793d7384d..3008e7035099 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/setup.py +++ b/sdk/rdbms/azure-mgmt-rdbms/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mariadb.py b/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mariadb.py index 34d2cb2e32d8..afc63b598f3e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mariadb.py +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mariadb.py @@ -22,7 +22,7 @@ import azure.mgmt.rdbms.mariadb from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" ZERO = dt.timedelta(0) @@ -43,11 +43,9 @@ class MgmtMariaDBTest(AzureMgmtTestCase): def setUp(self): super(MgmtMariaDBTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.rdbms.mariadb.MariaDBManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.rdbms.mariadb.MariaDBManagementClient) - @unittest.skip('hard to test') + @unittest.skip("hard to test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_mariadb(self, resource_group): SERVER_NAME = "testserver21827" @@ -74,19 +72,12 @@ def test_mariadb(self, resource_group): "storage_profile": { "storage_mb": "128000", "backup_retention_days": "7", - "geo_redundant_backup": "Enabled" + "geo_redundant_backup": "Enabled", }, - "create_mode": "Default" - }, - "sku": { - "name": "GP_Gen5_2", - "tier": "GeneralPurpose", - "capacity": "2", - "family": "Gen5" + "create_mode": "Default", }, - "tags": { - "elastic_server": "1" - } + "sku": {"name": "GP_Gen5_2", "tier": "GeneralPurpose", "capacity": "2", "family": "Gen5"}, + "tags": {"elastic_server": "1"}, } result = self.mgmt_client.servers.begin_create(resource_group.name, SERVER_NAME, BODY) result = result.result() @@ -96,8 +87,14 @@ def test_mariadb(self, resource_group): "location": "eastus", "properties": { "create_mode": "Replica", - "source_server_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.DBforMariaDB/servers/" + SERVER_NAME + "" - } + "source_server_id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/resourceGroups/" + + RESOURCE_GROUP + + "/providers/Microsoft.DBforMariaDB/servers/" + + SERVER_NAME + + "", + }, } result = self.mgmt_client.servers.begin_create(resource_group.name, SERVER_REPLICA_NAME, BODY) result = result.result() @@ -145,13 +142,10 @@ def test_mariadb(self, resource_group): # result = result.result() # DatabaseCreate[put] - BODY = { - "properties": { - "charset": "utf8", - "collation": "utf8_general_ci" - } - } - result = self.mgmt_client.databases.begin_create_or_update(resource_group.name, SERVER_NAME, DATABASE_NAME, BODY) + BODY = {"properties": {"charset": "utf8", "collation": "utf8_general_ci"}} + result = self.mgmt_client.databases.begin_create_or_update( + resource_group.name, SERVER_NAME, DATABASE_NAME, BODY + ) result = result.result() # FirewallRuleCreate[put] @@ -162,8 +156,11 @@ def test_mariadb(self, resource_group): # } # } from azure.mgmt.rdbms.mariadb.models import FirewallRule - firewall_rule = FirewallRule(start_ip_address='0.0.0.0', end_ip_address='255.255.255.255') - result = self.mgmt_client.firewall_rules.begin_create_or_update(resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule) + + firewall_rule = FirewallRule(start_ip_address="0.0.0.0", end_ip_address="255.255.255.255") + result = self.mgmt_client.firewall_rules.begin_create_or_update( + resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule + ) result = result.result() # ConfigurationCreateOrUpdate[put] @@ -193,35 +190,23 @@ def test_mariadb(self, resource_group): "properties": { "state": "Enabled", "email_account_admins": True, - "email_addresses": [ - "testSecurityAlert@microsoft.com" - ], - "disabled_alerts": [ - "Access_Anomaly", - "Usage_Anomaly" - ], + "email_addresses": ["testSecurityAlert@microsoft.com"], + "disabled_alerts": ["Access_Anomaly", "Usage_Anomaly"], "retention_days": "5", "storage_account_access_key": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storage_endpoint": "https://mystorage.blob.core.windows.net" + "storage_endpoint": "https://mystorage.blob.core.windows.net", } } - result = self.mgmt_client.server_security_alert_policies.begin_create_or_update(resource_group.name, - SERVER_NAME, - SECURITY_ALERT_POLICY_NAME, - BODY) + result = self.mgmt_client.server_security_alert_policies.begin_create_or_update( + resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME, BODY + ) result = result.result() # Update a server's threat detection policy with minimal parameters[put] - BODY = { - "properties": { - "state": "Disabled", - "email_account_admins": True - } - } - result = self.mgmt_client.server_security_alert_policies.begin_create_or_update(resource_group.name, - SERVER_NAME, - SECURITY_ALERT_POLICY_NAME, - BODY) + BODY = {"properties": {"state": "Disabled", "email_account_admins": True}} + result = self.mgmt_client.server_security_alert_policies.begin_create_or_update( + resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME, BODY + ) result = result.result() # # Approve or reject a private endpoint connection with a given name.[put] @@ -252,7 +237,9 @@ def test_mariadb(self, resource_group): # result = self.mgmt_client.location_based_recommended_action_sessions_result.list(LOCATION_NAME, RECOMMENDED_ACTION_SESSIONS_OPERATION_RESULT_NAME) # Get a server's threat detection policy[get] - result = self.mgmt_client.server_security_alert_policies.get(resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME) + result = self.mgmt_client.server_security_alert_policies.get( + resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME + ) # # Gets a private link resource for MariaDB.[get] # TODO: private_link_resources is not exist. @@ -369,12 +356,7 @@ def test_mariadb(self, resource_group): result = result.result() # ServerUpdate[patch] - BODY = { - "properties": { - "administrator_login_password": "newpa$$w0rd", - "ssl_enforcement": "Disabled" - } - } + BODY = {"properties": {"administrator_login_password": "newpa$$w0rd", "ssl_enforcement": "Disabled"}} result = self.mgmt_client.servers.begin_update(resource_group.name, SERVER_NAME, BODY) result = result.result() @@ -385,6 +367,7 @@ def test_mariadb(self, resource_group): # } NAME = self.create_random_name("name1") from azure.mgmt.rdbms.mariadb.models import NameAvailabilityRequest + nameAvailabilityRequest = NameAvailabilityRequest(name=NAME, type="Microsoft.DBforMariaDB") result = self.mgmt_client.check_name_availability.execute(nameAvailabilityRequest) @@ -411,5 +394,5 @@ def test_mariadb(self, resource_group): # ------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mysql.py b/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mysql.py index 196dadb6241a..f143f73f7b5a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mysql.py +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_mysql.py @@ -22,7 +22,7 @@ import azure.mgmt.rdbms.mysql from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" ZERO = dt.timedelta(0) @@ -43,11 +43,9 @@ class MgmtMySQLTest(AzureMgmtTestCase): def setUp(self): super(MgmtMySQLTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.rdbms.mysql.MySQLManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.rdbms.mysql.MySQLManagementClient) - @unittest.skip('hard to test') + @unittest.skip("hard to test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_mysql(self, resource_group): SERVER_NAME = "testserver21341" @@ -73,19 +71,12 @@ def test_mysql(self, resource_group): "storage_profile": { "storage_mb": "128000", "backup_retention_days": "7", - "geo_redundant_backup": "Enabled" + "geo_redundant_backup": "Enabled", }, - "create_mode": "Default" - }, - "sku": { - "name": "GP_Gen5_2", - "tier": "GeneralPurpose", - "capacity": "2", - "family": "Gen5" + "create_mode": "Default", }, - "tags": { - "elastic_server": "1" - } + "sku": {"name": "GP_Gen5_2", "tier": "GeneralPurpose", "capacity": "2", "family": "Gen5"}, + "tags": {"elastic_server": "1"}, } result = self.mgmt_client.servers.begin_create(resource_group.name, SERVER_NAME, BODY) result = result.result() @@ -115,8 +106,14 @@ def test_mysql(self, resource_group): "location": "eastus", "properties": { "create_mode": "Replica", - "source_server_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.DBforMySQL/servers/" + SERVER_NAME + "" - } + "source_server_id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/resourceGroups/" + + RESOURCE_GROUP + + "/providers/Microsoft.DBforMySQL/servers/" + + SERVER_NAME + + "", + }, } result = self.mgmt_client.servers.begin_create(resource_group.name, SERVER_REPLICA_NAME, BODY) result = result.result() @@ -144,13 +141,10 @@ def test_mysql(self, resource_group): # result = result.result() # DatabaseCreate[put] - BODY = { - "properties": { - "charset": "utf8", - "collation": "utf8_general_ci" - } - } - result = self.mgmt_client.databases.begin_create_or_update(resource_group.name, SERVER_NAME, DATABASE_NAME, BODY) + BODY = {"properties": {"charset": "utf8", "collation": "utf8_general_ci"}} + result = self.mgmt_client.databases.begin_create_or_update( + resource_group.name, SERVER_NAME, DATABASE_NAME, BODY + ) result = result.result() # FirewallRuleCreate[put] @@ -161,8 +155,11 @@ def test_mysql(self, resource_group): # } # } from azure.mgmt.rdbms.mysql.models import FirewallRule - firewall_rule = FirewallRule(start_ip_address='0.0.0.0', end_ip_address='255.255.255.255') - result = self.mgmt_client.firewall_rules.begin_create_or_update(resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule) + + firewall_rule = FirewallRule(start_ip_address="0.0.0.0", end_ip_address="255.255.255.255") + result = self.mgmt_client.firewall_rules.begin_create_or_update( + resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule + ) result = result.result() # ConfigurationCreateOrUpdate[put] @@ -193,40 +190,29 @@ def test_mysql(self, resource_group): "properties": { "state": "Enabled", "email_account_admins": True, - "email_addresses": [ - "testSecurityAlert@microsoft.com" - ], - "disabled_alerts": [ - "Access_Anomaly", - "Usage_Anomaly" - ], + "email_addresses": ["testSecurityAlert@microsoft.com"], + "disabled_alerts": ["Access_Anomaly", "Usage_Anomaly"], "retention_days": "5", "storage_account_access_key": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storage_endpoint": "https://mystorage.blob.core.windows.net" + "storage_endpoint": "https://mystorage.blob.core.windows.net", } } - result = self.mgmt_client.server_security_alert_policies.begin_create_or_update(resource_group.name, - SERVER_NAME, - SECURITY_ALERT_POLICY_NAME, - BODY) + result = self.mgmt_client.server_security_alert_policies.begin_create_or_update( + resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME, BODY + ) result = result.result() # Update a server's threat detection policy with minimal parameters[put] - BODY = { - "properties": { - "state": "Disabled", - "email_account_admins": True - } - } - result = self.mgmt_client.server_security_alert_policies.begin_create_or_update(resource_group.name, - SERVER_NAME, - SECURITY_ALERT_POLICY_NAME, - BODY) + BODY = {"properties": {"state": "Disabled", "email_account_admins": True}} + result = self.mgmt_client.server_security_alert_policies.begin_create_or_update( + resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME, BODY + ) result = result.result() # Get a server's threat detection policy[get] - result = self.mgmt_client.server_security_alert_policies.get(resource_group.name, SERVER_NAME, - SECURITY_ALERT_POLICY_NAME) + result = self.mgmt_client.server_security_alert_policies.get( + resource_group.name, SERVER_NAME, SECURITY_ALERT_POLICY_NAME + ) # # Gets a virtual network rule[get] # result = self.mgmt_client.virtual_network_rules.get(resource_group.name, SERVER_NAME, VIRTUAL_NETWORK_RULE_NAME) @@ -278,12 +264,7 @@ def test_mysql(self, resource_group): result = result.result() # ServerUpdate[patch] - BODY = { - "properties": { - "administrator_login_password": "newpa$$w0rd", - "ssl_enforcement": "Disabled" - } - } + BODY = {"properties": {"administrator_login_password": "newpa$$w0rd", "ssl_enforcement": "Disabled"}} result = self.mgmt_client.servers.begin_update(resource_group.name, SERVER_NAME, BODY) result = result.result() @@ -294,6 +275,7 @@ def test_mysql(self, resource_group): # } NAME = self.create_random_name("name1") from azure.mgmt.rdbms.mysql.models import NameAvailabilityRequest + nameAvailabilityRequest = NameAvailabilityRequest(name=NAME, type="Microsoft.DBforMySQL") result = self.mgmt_client.check_name_availability.execute(nameAvailabilityRequest) @@ -315,5 +297,5 @@ def test_mysql(self, resource_group): # ------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_postgresql.py b/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_postgresql.py index 2b2a1794d7a5..150d97213c4a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_postgresql.py +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/disable_test_cli_mgmt_postgresql.py @@ -22,7 +22,7 @@ import azure.mgmt.rdbms.postgresql from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" ZERO = dt.timedelta(0) @@ -43,9 +43,7 @@ class MgmtPostgreSQLTest(AzureMgmtTestCase): def setUp(self): super(MgmtPostgreSQLTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.rdbms.postgresql.PostgreSQLManagementClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.rdbms.postgresql.PostgreSQLManagementClient) @unittest.skip("hard to test") @ResourceGroupPreparer(location=AZURE_LOCATION) @@ -74,19 +72,12 @@ def test_postgresql(self, resource_group): "storage_profile": { "storage_mb": "128000", "backup_retention_days": "7", - "geo_redundant_backup": "Disabled" + "geo_redundant_backup": "Disabled", }, - "create_mode": "Default" - }, - "sku": { - "name": "B_Gen5_2", - "tier": "Basic", - "capacity": "2", - "family": "Gen5" + "create_mode": "Default", }, - "tags": { - "elastic_server": "1" - } + "sku": {"name": "B_Gen5_2", "tier": "Basic", "capacity": "2", "family": "Gen5"}, + "tags": {"elastic_server": "1"}, } result = self.mgmt_client.servers.begin_create(resource_group.name, SERVER_NAME, BODY) result = result.result() @@ -140,9 +131,11 @@ def test_postgresql(self, resource_group): # } # } from azure.mgmt.rdbms.postgresql.models import Database - database = Database(charset='UTF8', collation='English_United States.1252') - result = self.mgmt_client.databases.begin_create_or_update(resource_group.name, SERVER_NAME, DATABASE_NAME, - database) + + database = Database(charset="UTF8", collation="English_United States.1252") + result = self.mgmt_client.databases.begin_create_or_update( + resource_group.name, SERVER_NAME, DATABASE_NAME, database + ) result = result.result() # FirewallRuleCreate[put] @@ -153,9 +146,11 @@ def test_postgresql(self, resource_group): # } # } from azure.mgmt.rdbms.postgresql.models import FirewallRule - firewall_rule = FirewallRule(start_ip_address='0.0.0.0', end_ip_address='255.255.255.255') - result = self.mgmt_client.firewall_rules.begin_create_or_update(resource_group.name, SERVER_NAME, - FIREWALL_RULE_NAME, firewall_rule) + + firewall_rule = FirewallRule(start_ip_address="0.0.0.0", end_ip_address="255.255.255.255") + result = self.mgmt_client.firewall_rules.begin_create_or_update( + resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule + ) result = result.result() # # ConfigurationCreateOrUpdate[put] @@ -262,10 +257,12 @@ def test_postgresql(self, resource_group): # ServerUpdate[patch] from azure.mgmt.rdbms.postgresql.models import ServerPropertiesForDefaultCreate - serverPropertiesForDefaultCreate = ServerPropertiesForDefaultCreate(ssl_enforcement="Enabled", - administrator_login='cloudsa', - administrator_login_password='newpa$$w0rd') + + serverPropertiesForDefaultCreate = ServerPropertiesForDefaultCreate( + ssl_enforcement="Enabled", administrator_login="cloudsa", administrator_login_password="newpa$$w0rd" + ) from azure.mgmt.rdbms.postgresql.models import ServerForCreate + server_for_create = ServerForCreate(properties=serverPropertiesForDefaultCreate, location=LOCATION_NAME) result = self.mgmt_client.servers.begin_update(resource_group.name, SERVER_NAME, server_for_create) result = result.result() @@ -277,6 +274,7 @@ def test_postgresql(self, resource_group): # } NAME = self.create_random_name("name1") from azure.mgmt.rdbms.postgresql.models import NameAvailabilityRequest + name_availability_request = NameAvailabilityRequest(name=NAME, type="Microsoft.DBforMariaDB") result = self.mgmt_client.check_name_availability.execute(name_availability_request) @@ -298,5 +296,5 @@ def test_postgresql(self, resource_group): # ------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/models/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/models/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup-passivestamp/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_patch.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/setup.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/setup.py index 0229e7056e16..9e0689c6ae0f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/setup.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/_patch.py b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/_patch.py +++ b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/_patch.py b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/_patch.py +++ b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/operations/_patch.py b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/operations/_patch.py +++ b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/models/_patch.py b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/models/_patch.py +++ b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/operations/_patch.py b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/operations/_patch.py +++ b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/azure/mgmt/recoveryservicesdatareplication/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/setup.py b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/setup.py index 2747ff8c9424..37b1536a66a4 100644 --- a/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/setup.py +++ b/sdk/recoveryservicesdatareplication/azure-mgmt-recoveryservicesdatareplication/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_patch.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_patch.py +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/_patch.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/_patch.py +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/operations/_patch.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/operations/_patch.py +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/models/_patch.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/models/_patch.py +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/operations/_patch.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/operations/_patch.py +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_patch.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_patch.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/_patch.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/_patch.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_patch.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_patch.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_patch.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_patch.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redis/azure-mgmt-redis/setup.py b/sdk/redis/azure-mgmt-redis/setup.py index e673ef0b9339..481edc62e5c9 100644 --- a/sdk/redis/azure-mgmt-redis/setup.py +++ b/sdk/redis/azure-mgmt-redis/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_patch.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_patch.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_patch.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_patch.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_patch.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_patch.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_patch.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_patch.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/_patch.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/_patch.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/operations/_patch.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/operations/_patch.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_patch.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_patch.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_patch.py b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_patch.py +++ b/sdk/relay/azure-mgmt-relay/azure/mgmt/relay/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/relay/azure-mgmt-relay/setup.py b/sdk/relay/azure-mgmt-relay/setup.py index 389416686962..c13ee9e28a41 100644 --- a/sdk/relay/azure-mgmt-relay/setup.py +++ b/sdk/relay/azure-mgmt-relay/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Relay" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/relay/azure-mgmt-relay/tests/conftest.py b/sdk/relay/azure-mgmt-relay/tests/conftest.py index 87acda807946..142c7a4913f2 100644 --- a/sdk/relay/azure-mgmt-relay/tests/conftest.py +++ b/sdk/relay/azure-mgmt-relay/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -55,4 +56,4 @@ def add_sanitizers(test_proxy): add_body_key_sanitizer(json_path="$..access_token", value="access_token") add_body_key_sanitizer(json_path="$..primaryKey", value="primaryKey") add_body_key_sanitizer(json_path="$..secondaryKey", value="secondaryKey") - add_body_key_sanitizer(json_path="$..secondaryConnectionString", value="secondaryConnectionString") \ No newline at end of file + add_body_key_sanitizer(json_path="$..secondaryConnectionString", value="secondaryConnectionString") diff --git a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_hybridconnection.py b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_hybridconnection.py index d0e440512c65..75ea6404488d 100644 --- a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_hybridconnection.py +++ b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_hybridconnection.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import time @@ -17,9 +17,7 @@ class TestMgmtHybridConnection(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.relay_client = self.create_mgmt_client( - azure.mgmt.relay.RelayAPI - ) + self.relay_client = self.create_mgmt_client(azure.mgmt.relay.RelayAPI) @ResourceGroupPreparer() @recorded_by_proxy @@ -27,11 +25,15 @@ def test_hybridconnetion_curd(self, resource_group, location): resource_group_name = resource_group.name - #Create a Namespace + # Create a Namespace namespace_name = "testingpythontestcasenamespacehybridconnection" - namespaceparameter = RelayNamespace(location=location, tags={'tag1': 'value1', 'tag2': 'value2'}, sku=Sku(tier="standard")) - creatednamespace = self.relay_client.namespaces.begin_create_or_update(resource_group_name, namespace_name, namespaceparameter).result() + namespaceparameter = RelayNamespace( + location=location, tags={"tag1": "value1", "tag2": "value2"}, sku=Sku(tier="standard") + ) + creatednamespace = self.relay_client.namespaces.begin_create_or_update( + resource_group_name, namespace_name, namespaceparameter + ).result() assert creatednamespace.name == namespace_name # @@ -43,26 +45,35 @@ def test_hybridconnetion_curd(self, resource_group, location): # Create a HybridConnection hybridconnection_name = "testingpythontestcasehybridconnection" - createdhybridconnectionresponse = self.relay_client.hybrid_connections.create_or_update(resource_group_name, namespace_name, hybridconnection_name, { - "requires_client_authorization": True, - "user_metadata": "User data for HybridConnection" - }) + createdhybridconnectionresponse = self.relay_client.hybrid_connections.create_or_update( + resource_group_name, + namespace_name, + hybridconnection_name, + {"requires_client_authorization": True, "user_metadata": "User data for HybridConnection"}, + ) assert createdhybridconnectionresponse.name == hybridconnection_name assert createdhybridconnectionresponse.requires_client_authorization == True - #Get the created Hybridconnection - gethybridconnectionresponse = self.relay_client.hybrid_connections.get(resource_group_name, namespace_name, hybridconnection_name) + # Get the created Hybridconnection + gethybridconnectionresponse = self.relay_client.hybrid_connections.get( + resource_group_name, namespace_name, hybridconnection_name + ) assert gethybridconnectionresponse.name == hybridconnection_name assert gethybridconnectionresponse.user_metadata == "User data for HybridConnection" - #Get the List of Hybridconnection by namespaces - getlistbynamespacehybridconnectionresponse = list(self.relay_client.hybrid_connections.list_by_namespace(resource_group_name, namespace_name)) + # Get the List of Hybridconnection by namespaces + getlistbynamespacehybridconnectionresponse = list( + self.relay_client.hybrid_connections.list_by_namespace(resource_group_name, namespace_name) + ) assert len(getlistbynamespacehybridconnectionresponse) > 0 - updatehybridconnectionresponse = self.relay_client.hybrid_connections.create_or_update(resource_group_name, namespace_name, hybridconnection_name, { - "user_metadata": "User data for HybridConnection updated" - }) + updatehybridconnectionresponse = self.relay_client.hybrid_connections.create_or_update( + resource_group_name, + namespace_name, + hybridconnection_name, + {"user_metadata": "User data for HybridConnection updated"}, + ) assert updatehybridconnectionresponse.name == hybridconnection_name assert updatehybridconnectionresponse.requires_client_authorization == True @@ -70,53 +81,84 @@ def test_hybridconnetion_curd(self, resource_group, location): # Create a new authorizationrule authoRule_name = "testingauthrulepy" - createhybridconnectionauthorule = self.relay_client.hybrid_connections.create_or_update_authorization_rule(resource_group_name, namespace_name, hybridconnection_name, authoRule_name,{ - "rights": [AccessRights('Send'),AccessRights('Listen')] - }) - assert createhybridconnectionauthorule.name, authoRule_name == "Authorization rule name not as created - create_or_update_authorization_rule " + createhybridconnectionauthorule = self.relay_client.hybrid_connections.create_or_update_authorization_rule( + resource_group_name, + namespace_name, + hybridconnection_name, + authoRule_name, + {"rights": [AccessRights("Send"), AccessRights("Listen")]}, + ) + assert createhybridconnectionauthorule.name, ( + authoRule_name == "Authorization rule name not as created - create_or_update_authorization_rule " + ) assert len(createhybridconnectionauthorule.rights) == 2 # Get the created authorizationrule - gethybridconnectionauthorule = self.relay_client.hybrid_connections.get_authorization_rule(resource_group_name, namespace_name, hybridconnection_name, authoRule_name) - assert gethybridconnectionauthorule.name, authoRule_name == "Authorization rule name not as passed as parameter - get_authorization_rule " - assert len(gethybridconnectionauthorule.rights), 2 == "Access rights mis match as created - get_authorization_rule " + gethybridconnectionauthorule = self.relay_client.hybrid_connections.get_authorization_rule( + resource_group_name, namespace_name, hybridconnection_name, authoRule_name + ) + assert gethybridconnectionauthorule.name, ( + authoRule_name == "Authorization rule name not as passed as parameter - get_authorization_rule " + ) + assert len(gethybridconnectionauthorule.rights), ( + 2 == "Access rights mis match as created - get_authorization_rule " + ) # update the rights of the authorizatiorule - gethybridconnectionauthorule.rights.append('Manage') - updatehybridconnectionauthorule = self.relay_client.hybrid_connections.create_or_update_authorization_rule(resource_group_name, namespace_name, hybridconnection_name, authoRule_name, gethybridconnectionauthorule) - assert updatehybridconnectionauthorule.name, authoRule_name == "Authorization rule name not as passed as parameter for update call - create_or_update_authorization_rule " - assert len(updatehybridconnectionauthorule.rights), 3 == "Access rights mis match as updated - create_or_update_authorization_rule " + gethybridconnectionauthorule.rights.append("Manage") + updatehybridconnectionauthorule = self.relay_client.hybrid_connections.create_or_update_authorization_rule( + resource_group_name, namespace_name, hybridconnection_name, authoRule_name, gethybridconnectionauthorule + ) + assert updatehybridconnectionauthorule.name, ( + authoRule_name + == "Authorization rule name not as passed as parameter for update call - create_or_update_authorization_rule " + ) + assert len(updatehybridconnectionauthorule.rights), ( + 3 == "Access rights mis match as updated - create_or_update_authorization_rule " + ) - #list all the authorization ruels for the given namespace - hybridconnectionauthorulelist = list(self.relay_client.hybrid_connections.list_authorization_rules(resource_group_name, namespace_name, hybridconnection_name)) - assert len(hybridconnectionauthorulelist), 1 == "number of authorization rule mismatch with the created + default = 2 - list_authorization_rules" + # list all the authorization ruels for the given namespace + hybridconnectionauthorulelist = list( + self.relay_client.hybrid_connections.list_authorization_rules( + resource_group_name, namespace_name, hybridconnection_name + ) + ) + assert len(hybridconnectionauthorulelist), ( + 1 == "number of authorization rule mismatch with the created + default = 2 - list_authorization_rules" + ) - #List keys for the authorization rule - listkeysauthorizationrule = self.relay_client.hybrid_connections.list_keys(resource_group_name, namespace_name, hybridconnection_name, authoRule_name) + # List keys for the authorization rule + listkeysauthorizationrule = self.relay_client.hybrid_connections.list_keys( + resource_group_name, namespace_name, hybridconnection_name, authoRule_name + ) assert listkeysauthorizationrule is not None # regenerate Keys for authorizationrule - Primary - regenratePrimarykeyauthorizationrule = self.relay_client.hybrid_connections.regenerate_keys(resource_group_name, namespace_name, hybridconnection_name, authoRule_name, { - "key_type": 'PrimaryKey' - }) - assert listkeysauthorizationrule.primary_key !=regenratePrimarykeyauthorizationrule.primary_key + regenratePrimarykeyauthorizationrule = self.relay_client.hybrid_connections.regenerate_keys( + resource_group_name, namespace_name, hybridconnection_name, authoRule_name, {"key_type": "PrimaryKey"} + ) + assert listkeysauthorizationrule.primary_key != regenratePrimarykeyauthorizationrule.primary_key # regenerate Keys for authorizationrule - Primary - regenrateSecondarykeyauthorizationrule = self.relay_client.hybrid_connections.regenerate_keys(resource_group_name,namespace_name, hybridconnection_name, authoRule_name, { - "key_type": 'SecondaryKey' - }) + regenrateSecondarykeyauthorizationrule = self.relay_client.hybrid_connections.regenerate_keys( + resource_group_name, namespace_name, hybridconnection_name, authoRule_name, {"key_type": "SecondaryKey"} + ) assert listkeysauthorizationrule.secondary_key != regenrateSecondarykeyauthorizationrule.secondary_key # delete the authorizationrule - self.relay_client.hybrid_connections.delete_authorization_rule(resource_group_name, namespace_name, hybridconnection_name, authoRule_name) + self.relay_client.hybrid_connections.delete_authorization_rule( + resource_group_name, namespace_name, hybridconnection_name, authoRule_name + ) # Delete the created HybridConnection - gethybridconnectionresponse = self.relay_client.hybrid_connections.delete(resource_group_name, namespace_name, hybridconnection_name) + gethybridconnectionresponse = self.relay_client.hybrid_connections.delete( + resource_group_name, namespace_name, hybridconnection_name + ) # Delete the create namespace self.relay_client.namespaces.begin_delete(resource_group_name, namespace_name).result() # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_operations.py b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_operations.py index 9ae17d3f2e13..a0d0d1a59236 100644 --- a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_operations.py +++ b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_operations.py @@ -14,9 +14,7 @@ class TestMgmtRelay(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.relay_client = self.create_mgmt_client( - azure.mgmt.relay.RelayAPI - ) + self.relay_client = self.create_mgmt_client(azure.mgmt.relay.RelayAPI) @recorded_by_proxy def test_operations_list(self): @@ -25,5 +23,5 @@ def test_operations_list(self): # ------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_check_name_availability.py b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_check_name_availability.py index a085517cf674..6060175b84bc 100644 --- a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_check_name_availability.py +++ b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_check_name_availability.py @@ -14,9 +14,7 @@ class TestMgmtRelay(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.relay_client = self.create_mgmt_client( - azure.mgmt.relay.RelayAPI - ) + self.relay_client = self.create_mgmt_client(azure.mgmt.relay.RelayAPI) def process(self, result): pass @@ -24,12 +22,12 @@ def process(self, result): @recorded_by_proxy def test_eh_namespace_available(self): # Check the namespace availability - availabilityresult = self.relay_client.namespaces.check_name_availability({ - "name": "Testingehnamespaceavailabilityforpython" - }) + availabilityresult = self.relay_client.namespaces.check_name_availability( + {"name": "Testingehnamespaceavailabilityforpython"} + ) assert availabilityresult.name_available == True # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_namespace.py b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_namespace.py index 5f321f48829b..abc6bbaa5b9c 100644 --- a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_namespace.py +++ b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_relay_namespace.py @@ -16,9 +16,7 @@ class TestMgmtRelayNamespace(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.relay_client = self.create_mgmt_client( - azure.mgmt.relay.RelayAPI - ) + self.relay_client = self.create_mgmt_client(azure.mgmt.relay.RelayAPI) @ResourceGroupPreparer() @recorded_by_proxy @@ -28,8 +26,12 @@ def test_relay_namespace_curd(self, resource_group, location): # Create a Namespace namespace_name = "testingpythontestcasenamespace" - namespaceparameter=RelayNamespace(location=location, tags={'tag1':'value1', 'tag2':'value2'}, sku=Sku(tier="standard")) - creatednamespace = self.relay_client.namespaces.begin_create_or_update(resource_group_name, namespace_name, namespaceparameter).result() + namespaceparameter = RelayNamespace( + location=location, tags={"tag1": "value1", "tag2": "value2"}, sku=Sku(tier="standard") + ) + creatednamespace = self.relay_client.namespaces.begin_create_or_update( + resource_group_name, namespace_name, namespaceparameter + ).result() assert creatednamespace.name == namespace_name # # # Get created Namespace @@ -38,7 +40,7 @@ def test_relay_namespace_curd(self, resource_group, location): assert getnamespaceresponse.name == namespace_name # Update a Namespace - namespaceparameter={'tags': {'tag1':'value1', 'tag2':'value2'}} + namespaceparameter = {"tags": {"tag1": "value1", "tag2": "value2"}} updatenamespace = self.relay_client.namespaces.update(resource_group_name, namespace_name, namespaceparameter) # Get the List of Namespaces under the resourceGroup - list_by_resource_group @@ -51,54 +53,84 @@ def test_relay_namespace_curd(self, resource_group, location): assert len(listbysubscriptionresponse) > 0, "No Namespace returned > List is empty" # get the default authorizationrule defaultauthorule_name = "RootManageSharedAccessKey" - defaultamespaceauthorule = self.relay_client.namespaces.get_authorization_rule(resource_group_name, namespace_name, defaultauthorule_name) - assert defaultamespaceauthorule.name == defaultauthorule_name, "Default Authorization rule not returned - RootManageSharedAccessKey" - assert len(defaultamespaceauthorule.rights) == 3, "rights for deafult not as required - send == listen and manage " + defaultamespaceauthorule = self.relay_client.namespaces.get_authorization_rule( + resource_group_name, namespace_name, defaultauthorule_name + ) + assert ( + defaultamespaceauthorule.name == defaultauthorule_name + ), "Default Authorization rule not returned - RootManageSharedAccessKey" + assert ( + len(defaultamespaceauthorule.rights) == 3 + ), "rights for deafult not as required - send == listen and manage " # Create a new authorizationrule authoRule_name = "testingauthrulepy" - createnamespaceauthorule = self.relay_client.namespaces.create_or_update_authorization_rule(resource_group_name,namespace_name,authoRule_name, { - "rights": [AccessRights('Send'),AccessRights('Listen')] - }) - assert createnamespaceauthorule.name,authoRule_name == "Authorization rule name not as created - create_or_update_authorization_rule " - assert len(createnamespaceauthorule.rights) ==2 + createnamespaceauthorule = self.relay_client.namespaces.create_or_update_authorization_rule( + resource_group_name, + namespace_name, + authoRule_name, + {"rights": [AccessRights("Send"), AccessRights("Listen")]}, + ) + assert createnamespaceauthorule.name, ( + authoRule_name == "Authorization rule name not as created - create_or_update_authorization_rule " + ) + assert len(createnamespaceauthorule.rights) == 2 # Get the created authorizationrule - getnamespaceauthorule = self.relay_client.namespaces.get_authorization_rule(resource_group_name, namespace_name, authoRule_name) - assert getnamespaceauthorule.name, authoRule_name == "Authorization rule name not as passed as parameter - get_authorization_rule " + getnamespaceauthorule = self.relay_client.namespaces.get_authorization_rule( + resource_group_name, namespace_name, authoRule_name + ) + assert getnamespaceauthorule.name, ( + authoRule_name == "Authorization rule name not as passed as parameter - get_authorization_rule " + ) assert len(getnamespaceauthorule.rights), 2 == "Access rights mis match as created - get_authorization_rule " # update the rights of the authorizatiorule - getnamespaceauthorule.rights.append('Manage') - updatenamespaceauthorule = self.relay_client.namespaces.create_or_update_authorization_rule(resource_group_name, namespace_name, authoRule_name, getnamespaceauthorule) - assert updatenamespaceauthorule.name, authoRule_name == "Authorization rule name not as passed as parameter for update call - create_or_update_authorization_rule " - assert len(updatenamespaceauthorule.rights), 3 == "Access rights mis match as updated - create_or_update_authorization_rule " + getnamespaceauthorule.rights.append("Manage") + updatenamespaceauthorule = self.relay_client.namespaces.create_or_update_authorization_rule( + resource_group_name, namespace_name, authoRule_name, getnamespaceauthorule + ) + assert updatenamespaceauthorule.name, ( + authoRule_name + == "Authorization rule name not as passed as parameter for update call - create_or_update_authorization_rule " + ) + assert len(updatenamespaceauthorule.rights), ( + 3 == "Access rights mis match as updated - create_or_update_authorization_rule " + ) # list all the authorization ruels for the given namespace - createnamespaceauthorule = list(self.relay_client.namespaces.list_authorization_rules(resource_group_name, namespace_name)) - assert len(createnamespaceauthorule),2 == "number of authorization rule mismatch with the created + default = 2 - list_authorization_rules" + createnamespaceauthorule = list( + self.relay_client.namespaces.list_authorization_rules(resource_group_name, namespace_name) + ) + assert len(createnamespaceauthorule), ( + 2 == "number of authorization rule mismatch with the created + default = 2 - list_authorization_rules" + ) # List keys for the authorization rule - listkeysauthorizationrule = self.relay_client.namespaces.list_keys(resource_group_name, namespace_name, authoRule_name) + listkeysauthorizationrule = self.relay_client.namespaces.list_keys( + resource_group_name, namespace_name, authoRule_name + ) assert listkeysauthorizationrule is not None # regenerate Keys for authorizationrule - Primary - regenratePrimarykeyauthorizationrule = self.relay_client.namespaces.regenerate_keys(resource_group_name, namespace_name,authoRule_name,{ - "key_type": 'PrimaryKey' - }) - assert listkeysauthorizationrule.primary_key !=regenratePrimarykeyauthorizationrule.primary_key + regenratePrimarykeyauthorizationrule = self.relay_client.namespaces.regenerate_keys( + resource_group_name, namespace_name, authoRule_name, {"key_type": "PrimaryKey"} + ) + assert listkeysauthorizationrule.primary_key != regenratePrimarykeyauthorizationrule.primary_key # regenerate Keys for authorizationrule - Primary - regenrateSecondarykeyauthorizationrule = self.relay_client.namespaces.regenerate_keys(resource_group_name,namespace_name,authoRule_name, { - "key_type": 'SecondaryKey' - }) + regenrateSecondarykeyauthorizationrule = self.relay_client.namespaces.regenerate_keys( + resource_group_name, namespace_name, authoRule_name, {"key_type": "SecondaryKey"} + ) assert listkeysauthorizationrule.secondary_key != regenrateSecondarykeyauthorizationrule.secondary_key # delete the authorizationrule self.relay_client.namespaces.delete_authorization_rule(resource_group_name, namespace_name, authoRule_name) # list all the authorization ruels for the given namespace - createnamespaceauthorule = list(self.relay_client.namespaces.list_authorization_rules(resource_group_name, namespace_name)) + createnamespaceauthorule = list( + self.relay_client.namespaces.list_authorization_rules(resource_group_name, namespace_name) + ) assert len(createnamespaceauthorule) == 1 assert createnamespaceauthorule[0].name == defaultauthorule_name @@ -107,5 +139,5 @@ def test_relay_namespace_curd(self, resource_group, location): # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_wcfrelay.py b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_wcfrelay.py index 88033eca56f0..5be8293eae40 100644 --- a/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_wcfrelay.py +++ b/sdk/relay/azure-mgmt-relay/tests/disable_test_azure_mgmt_wcfrelay.py @@ -1,15 +1,24 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import time import azure.mgmt.relay.models -from azure.mgmt.relay.models import RelayNamespace, Sku, Relaytype, AuthorizationRule, AccessRights, AccessKeys, WcfRelay, ErrorResponse +from azure.mgmt.relay.models import ( + RelayNamespace, + Sku, + Relaytype, + AuthorizationRule, + AccessRights, + AccessKeys, + WcfRelay, + ErrorResponse, +) from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy @@ -17,9 +26,7 @@ class TestMgmtWcfRelay(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.relay_client = self.create_mgmt_client( - azure.mgmt.relay.RelayAPI - ) + self.relay_client = self.create_mgmt_client(azure.mgmt.relay.RelayAPI) @ResourceGroupPreparer() @recorded_by_proxy @@ -27,11 +34,15 @@ def test_wcfrelay_curd(self, resource_group, location): resource_group_name = resource_group.name - #Create a Namespace + # Create a Namespace namespace_name = "testingpythontestcaseeventhubnamespaceEventhub" - namespaceparameter = RelayNamespace(location=location, tags={'tag1': 'value1', 'tag2': 'value2'}, sku=Sku(tier="standard")) - creatednamespace = self.relay_client.namespaces.begin_create_or_update(resource_group_name, namespace_name, namespaceparameter).result() + namespaceparameter = RelayNamespace( + location=location, tags={"tag1": "value1", "tag2": "value2"}, sku=Sku(tier="standard") + ) + creatednamespace = self.relay_client.namespaces.begin_create_or_update( + resource_group_name, namespace_name, namespaceparameter + ).result() assert creatednamespace.name == namespace_name # @@ -46,34 +57,32 @@ def test_wcfrelay_curd(self, resource_group, location): relay_type=Relaytype.net_tcp, requires_client_authorization=True, requires_transport_security=True, - user_metadata="User data for WcfRelay" - ) + user_metadata="User data for WcfRelay", + ) - createdwcfrelayresponse = self.relay_client.wcf_relays.create_or_update(resource_group_name, namespace_name, wcfrelay_name, wcfrelayparameter) + createdwcfrelayresponse = self.relay_client.wcf_relays.create_or_update( + resource_group_name, namespace_name, wcfrelay_name, wcfrelayparameter + ) assert createdwcfrelayresponse.name == wcfrelay_name assert createdwcfrelayresponse.requires_client_authorization == True - #Get the created wcfRelay + # Get the created wcfRelay geteventhubresponse = self.relay_client.wcf_relays.get(resource_group_name, namespace_name, wcfrelay_name) assert geteventhubresponse.name == wcfrelay_name assert geteventhubresponse.requires_transport_security == True assert geteventhubresponse.user_metadata == "User data for WcfRelay" - #Get the List of wcfRealy by namespaces - getlistbynamespacewcfrelayresponse = list(self.relay_client.wcf_relays.list_by_namespace(resource_group_name, namespace_name)) + # Get the List of wcfRealy by namespaces + getlistbynamespacewcfrelayresponse = list( + self.relay_client.wcf_relays.list_by_namespace(resource_group_name, namespace_name) + ) assert len(getlistbynamespacewcfrelayresponse) > 0 # update the Created eventhub - wcfrelayupdateparameter = WcfRelay( - relay_type=Relaytype.net_tcp, - user_metadata="User data for WcfRelay updated" - ) + wcfrelayupdateparameter = WcfRelay(relay_type=Relaytype.net_tcp, user_metadata="User data for WcfRelay updated") updatewcfrelayresponse = self.relay_client.wcf_relays.create_or_update( - resource_group_name, - namespace_name, - wcfrelay_name, - wcfrelayupdateparameter + resource_group_name, namespace_name, wcfrelay_name, wcfrelayupdateparameter ) assert updatewcfrelayresponse.name == wcfrelay_name assert updatewcfrelayresponse.requires_transport_security == True @@ -82,45 +91,70 @@ def test_wcfrelay_curd(self, resource_group, location): # Create a new authorizationrule authoRule_name = "testingauthrulepy" - createwcfrelayauthorule = self.relay_client.wcf_relays.create_or_update_authorization_rule(resource_group_name, namespace_name, wcfrelay_name, authoRule_name, { - "rights": [AccessRights('Send'),AccessRights('Listen')] - }) - assert createwcfrelayauthorule.name, authoRule_name == "Authorization rule name not as created - create_or_update_authorization_rule " + createwcfrelayauthorule = self.relay_client.wcf_relays.create_or_update_authorization_rule( + resource_group_name, + namespace_name, + wcfrelay_name, + authoRule_name, + {"rights": [AccessRights("Send"), AccessRights("Listen")]}, + ) + assert createwcfrelayauthorule.name, ( + authoRule_name == "Authorization rule name not as created - create_or_update_authorization_rule " + ) assert len(createwcfrelayauthorule.rights) == 2 # Get the created authorizationrule - getwcfrelayauthorule = self.relay_client.wcf_relays.get_authorization_rule(resource_group_name, namespace_name, wcfrelay_name, authoRule_name) - assert getwcfrelayauthorule.name, authoRule_name == "Authorization rule name not as passed as parameter - get_authorization_rule " + getwcfrelayauthorule = self.relay_client.wcf_relays.get_authorization_rule( + resource_group_name, namespace_name, wcfrelay_name, authoRule_name + ) + assert getwcfrelayauthorule.name, ( + authoRule_name == "Authorization rule name not as passed as parameter - get_authorization_rule " + ) assert len(getwcfrelayauthorule.rights), 2 == "Access rights mis match as created - get_authorization_rule " # update the rights of the authorizatiorule - getwcfrelayauthorule.rights.append('Manage') - updatewcfrelayauthorule = self.relay_client.wcf_relays.create_or_update_authorization_rule(resource_group_name, namespace_name, wcfrelay_name, authoRule_name, getwcfrelayauthorule) - assert updatewcfrelayauthorule.name, authoRule_name == "Authorization rule name not as passed as parameter for update call - create_or_update_authorization_rule " - assert len(updatewcfrelayauthorule.rights), 3 == "Access rights mis match as updated - create_or_update_authorization_rule " + getwcfrelayauthorule.rights.append("Manage") + updatewcfrelayauthorule = self.relay_client.wcf_relays.create_or_update_authorization_rule( + resource_group_name, namespace_name, wcfrelay_name, authoRule_name, getwcfrelayauthorule + ) + assert updatewcfrelayauthorule.name, ( + authoRule_name + == "Authorization rule name not as passed as parameter for update call - create_or_update_authorization_rule " + ) + assert len(updatewcfrelayauthorule.rights), ( + 3 == "Access rights mis match as updated - create_or_update_authorization_rule " + ) - #list all the authorization ruels for the given namespace - wcfrelayauthorulelist = list(self.relay_client.wcf_relays.list_authorization_rules(resource_group_name, namespace_name, wcfrelay_name)) - assert len(wcfrelayauthorulelist), 1 == "number of authorization rule mismatch with the created + default = 2 - list_authorization_rules" + # list all the authorization ruels for the given namespace + wcfrelayauthorulelist = list( + self.relay_client.wcf_relays.list_authorization_rules(resource_group_name, namespace_name, wcfrelay_name) + ) + assert len(wcfrelayauthorulelist), ( + 1 == "number of authorization rule mismatch with the created + default = 2 - list_authorization_rules" + ) - #List keys for the authorization rule - listkeysauthorizationrule = self.relay_client.wcf_relays.list_keys(resource_group_name, namespace_name, wcfrelay_name, authoRule_name) + # List keys for the authorization rule + listkeysauthorizationrule = self.relay_client.wcf_relays.list_keys( + resource_group_name, namespace_name, wcfrelay_name, authoRule_name + ) assert listkeysauthorizationrule is not None # regenerate Keys for authorizationrule - Primary - regenratePrimarykeyauthorizationrule = self.relay_client.wcf_relays.regenerate_keys(resource_group_name, namespace_name, wcfrelay_name, authoRule_name, { - "key_type": 'PrimaryKey' - }) - assert listkeysauthorizationrule.primary_key !=regenratePrimarykeyauthorizationrule.primary_key + regenratePrimarykeyauthorizationrule = self.relay_client.wcf_relays.regenerate_keys( + resource_group_name, namespace_name, wcfrelay_name, authoRule_name, {"key_type": "PrimaryKey"} + ) + assert listkeysauthorizationrule.primary_key != regenratePrimarykeyauthorizationrule.primary_key # regenerate Keys for authorizationrule - Primary - regenrateSecondarykeyauthorizationrule = self.relay_client.wcf_relays.regenerate_keys(resource_group_name,namespace_name, wcfrelay_name, authoRule_name, { - "key_type": 'SecondaryKey' - }) + regenrateSecondarykeyauthorizationrule = self.relay_client.wcf_relays.regenerate_keys( + resource_group_name, namespace_name, wcfrelay_name, authoRule_name, {"key_type": "SecondaryKey"} + ) assert listkeysauthorizationrule.secondary_key != regenrateSecondarykeyauthorizationrule.secondary_key # delete the authorizationrule - self.relay_client.wcf_relays.delete_authorization_rule(resource_group_name, namespace_name, wcfrelay_name, authoRule_name) + self.relay_client.wcf_relays.delete_authorization_rule( + resource_group_name, namespace_name, wcfrelay_name, authoRule_name + ) # Delete the created WcfRelay getwcfrelayresponse = self.relay_client.wcf_relays.delete(resource_group_name, namespace_name, wcfrelay_name) @@ -130,5 +164,5 @@ def test_wcfrelay_curd(self, resource_group, location): # ------------------------------------------------------------------------------ -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py index fd0c3846b033..35e3a4536773 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py @@ -4,5 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- -__path__ = __import__('pkgutil').extend_path( - __path__, __name__) # type: ignore +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py index fd0c3846b033..35e3a4536773 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py @@ -4,5 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- -__path__ = __import__('pkgutil').extend_path( - __path__, __name__) # type: ignore +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py index e7f330b6ef57..7979d348d442 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py @@ -7,10 +7,18 @@ from ._remote_rendering_client import RemoteRenderingClient from ._version import VERSION -from ._generated.models import (AssetConversion, AssetConversionInputSettings, - AssetConversionOutput, AssetConversionOutputSettings, - AssetConversionSettings, AssetConversionStatus, RemoteRenderingError, - RenderingSession, RenderingSessionSize, RenderingSessionStatus) +from ._generated.models import ( + AssetConversion, + AssetConversionInputSettings, + AssetConversionOutput, + AssetConversionOutputSettings, + AssetConversionSettings, + AssetConversionStatus, + RemoteRenderingError, + RenderingSession, + RenderingSessionSize, + RenderingSessionStatus, +) __all__ = [ "RemoteRenderingClient", @@ -23,7 +31,7 @@ "RenderingSession", "RenderingSessionSize", "RenderingSessionStatus", - "RemoteRenderingError" + "RemoteRenderingError", ] __version__ = VERSION diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py index 14e9ad16b56c..f56306016201 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py @@ -8,6 +8,7 @@ from azure.core import CaseInsensitiveEnumMeta + class RemoteRenderingApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Remote Rendering API versions supported by this package""" @@ -17,6 +18,7 @@ class RemoteRenderingApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): DEFAULT_VERSION = RemoteRenderingApiVersion.V2021_01_01 + def validate_api_version(api_version): # type: (str) -> None """Raise ValueError if api_version is invalid diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py index 0aa283066ae0..6f6f368ddff5 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- from ._remote_rendering_rest_client import RemoteRenderingRestClient -__all__ = ['RemoteRenderingRestClient'] + +__all__ = ["RemoteRenderingRestClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py index 64d03c4681ff..99b72f896acd 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class RemoteRenderingRestClientConfiguration(Configuration): """Configuration for RemoteRenderingRestClient. @@ -39,20 +40,19 @@ def __init__( self.endpoint = endpoint self.api_version = "2021-01-01" - kwargs.setdefault('sdk_moniker', 'remoterenderingrestclient/{}'.format(VERSION)) + kwargs.setdefault("sdk_moniker", "remoterenderingrestclient/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py index 98b3b278f7e1..dc1854cee0a0 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py @@ -21,14 +21,14 @@ class RemoteRenderingRestClient(object): - """Describing the `Azure Remote Rendering `_ REST API for rendering sessions and asset conversions. + """Describing the `Azure Remote Rendering `_ REST API for rendering sessions and asset conversions. -All requests to these APIs must be authenticated using the Secure Token Service as described in the `Azure Remote rendering documentation chapter about authentication `_. + All requests to these APIs must be authenticated using the Secure Token Service as described in the `Azure Remote rendering documentation chapter about authentication `_. - :ivar remote_rendering: RemoteRenderingOperations operations - :vartype remote_rendering: azure.mixedreality.remoterendering._generated.operations.RemoteRenderingOperations - :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. - :type endpoint: str + :ivar remote_rendering: RemoteRenderingOperations operations + :vartype remote_rendering: azure.mixedreality.remoterendering._generated.operations.RemoteRenderingOperations + :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. + :type endpoint: str """ def __init__( @@ -37,7 +37,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = RemoteRenderingRestClientConfiguration(endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -46,7 +46,8 @@ def __init__( self._deserialize = Deserializer(client_models) self.remote_rendering = RemoteRenderingOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) def close(self): # type: () -> None diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py index 4e2cceac54f5..31afebc58fcf 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._remote_rendering_rest_client_async import RemoteRenderingRestClient -__all__ = ['RemoteRenderingRestClient'] + +__all__ = ["RemoteRenderingRestClient"] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py index f2a43ad51f82..597b7949db60 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py @@ -13,6 +13,7 @@ VERSION = "unknown" + class RemoteRenderingRestClientConfiguration(Configuration): """Configuration for RemoteRenderingRestClient. @@ -23,30 +24,23 @@ class RemoteRenderingRestClientConfiguration(Configuration): :type endpoint: str """ - def __init__( - self, - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, endpoint: str, **kwargs: Any) -> None: if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") super(RemoteRenderingRestClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint self.api_version = "2021-01-01" - kwargs.setdefault('sdk_moniker', 'remoterenderingrestclient/{}'.format(VERSION)) + kwargs.setdefault("sdk_moniker", "remoterenderingrestclient/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py index 1c14b1e231d9..de7ba2ea58e4 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py @@ -17,22 +17,18 @@ class RemoteRenderingRestClient(object): - """Describing the `Azure Remote Rendering `_ REST API for rendering sessions and asset conversions. + """Describing the `Azure Remote Rendering `_ REST API for rendering sessions and asset conversions. -All requests to these APIs must be authenticated using the Secure Token Service as described in the `Azure Remote rendering documentation chapter about authentication `_. + All requests to these APIs must be authenticated using the Secure Token Service as described in the `Azure Remote rendering documentation chapter about authentication `_. - :ivar remote_rendering: RemoteRenderingOperations operations - :vartype remote_rendering: azure.mixedreality.remoterendering._generated.aio.operations_async.RemoteRenderingOperations - :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. - :type endpoint: str + :ivar remote_rendering: RemoteRenderingOperations operations + :vartype remote_rendering: azure.mixedreality.remoterendering._generated.aio.operations_async.RemoteRenderingOperations + :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. + :type endpoint: str """ - def __init__( - self, - endpoint: str, - **kwargs: Any - ) -> None: - base_url = '{endpoint}' + def __init__(self, endpoint: str, **kwargs: Any) -> None: + base_url = "{endpoint}" self._config = RemoteRenderingRestClientConfiguration(endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -41,7 +37,8 @@ def __init__( self._deserialize = Deserializer(client_models) self.remote_rendering = RemoteRenderingOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) async def close(self) -> None: await self._client.close() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py index 95b63f50c90d..5bdec54c53aa 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py @@ -9,5 +9,5 @@ from ._remote_rendering_operations_async import RemoteRenderingOperations __all__ = [ - 'RemoteRenderingOperations', + "RemoteRenderingOperations", ] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py index 348e32d320ae..cf432c3b23cd 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py @@ -15,9 +15,10 @@ from ... import models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class RemoteRenderingOperations: """RemoteRenderingOperations async operations. @@ -41,11 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def create_conversion( - self, - account_id: str, - conversion_id: str, - body: "models.CreateAssetConversionSettings", - **kwargs + self, account_id: str, conversion_id: str, body: "models.CreateAssetConversionSettings", **kwargs ) -> "models.AssetConversion": """Creates a conversion using an asset stored in an Azure Blob Storage account. @@ -64,38 +61,44 @@ async def create_conversion( :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + cls = kwargs.pop("cls", None) # type: ClsType["models.AssetConversion"] error_map = { 404: ResourceNotFoundError, - 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 400: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 409: lambda response: ResourceExistsError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_conversion.metadata['url'] # type: ignore + url = self.create_conversion.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "conversion_id": self._serialize.url("conversion_id", conversion_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = "application/json" body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'CreateAssetConversionSettings') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(body, "CreateAssetConversionSettings") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -107,25 +110,21 @@ async def create_conversion( response_headers = {} if response.status_code == 200: - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('AssetConversion', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("AssetConversion", pipeline_response) if response.status_code == 201: - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('AssetConversion', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("AssetConversion", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - create_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore - async def get_conversion( - self, - account_id: str, - conversion_id: str, - **kwargs - ) -> "models.AssetConversion": + create_conversion.metadata = {"url": "/accounts/{account_id}/conversions/{conversion_id}"} # type: ignore + + async def get_conversion(self, account_id: str, conversion_id: str, **kwargs) -> "models.AssetConversion": """Gets the status of a particular conversion. Gets the status of a particular conversion. @@ -141,31 +140,33 @@ async def get_conversion( :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + cls = kwargs.pop("cls", None) # type: ClsType["models.AssetConversion"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" # Construct URL - url = self.get_conversion.metadata['url'] # type: ignore + url = self.get_conversion.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "conversion_id": self._serialize.url("conversion_id", conversion_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -176,21 +177,18 @@ async def get_conversion( raise HttpResponseError(response=response) response_headers = {} - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - deserialized = self._deserialize('AssetConversion', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + deserialized = self._deserialize("AssetConversion", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - get_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore - def list_conversions( - self, - account_id: str, - **kwargs - ) -> AsyncIterable["models.ConversionList"]: + get_conversion.metadata = {"url": "/accounts/{account_id}/conversions/{conversion_id}"} # type: ignore + + def list_conversions(self, account_id: str, **kwargs) -> AsyncIterable["models.ConversionList"]: """Gets a list of all conversions. Gets a list of all conversions. @@ -202,46 +200,52 @@ def list_conversions( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mixedreality.remoterendering._generated.models.ConversionList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConversionList"] + cls = kwargs.pop("cls", None) # type: ClsType["models.ConversionList"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if not next_link: # Construct URL - url = self.list_conversions.metadata['url'] # type: ignore + url = self.list_conversions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ConversionList', pipeline_response) + deserialized = self._deserialize("ConversionList", pipeline_response) list_of_elem = deserialized.conversions if cls: list_of_elem = cls(list_of_elem) @@ -259,17 +263,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list_conversions.metadata = {'url': '/accounts/{account_id}/conversions'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list_conversions.metadata = {"url": "/accounts/{account_id}/conversions"} # type: ignore async def create_session( - self, - account_id: str, - session_id: str, - body: "models.CreateRenderingSessionSettings", - **kwargs + self, account_id: str, session_id: str, body: "models.CreateRenderingSessionSettings", **kwargs ) -> "models.RenderingSession": """Creates a new rendering session. @@ -288,38 +287,44 @@ async def create_session( :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + cls = kwargs.pop("cls", None) # type: ClsType["models.RenderingSession"] error_map = { 404: ResourceNotFoundError, - 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 400: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 409: lambda response: ResourceExistsError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_session.metadata['url'] # type: ignore + url = self.create_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = "application/json" body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'CreateRenderingSessionSettings') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(body, "CreateRenderingSessionSettings") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -331,24 +336,20 @@ async def create_session( response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('RenderingSession', pipeline_response) + deserialized = self._deserialize("RenderingSession", pipeline_response) if response.status_code == 201: - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('RenderingSession', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("RenderingSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - create_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore - async def get_session( - self, - account_id: str, - session_id: str, - **kwargs - ) -> "models.RenderingSession": + create_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}"} # type: ignore + + async def get_session(self, account_id: str, session_id: str, **kwargs) -> "models.RenderingSession": """Gets the properties of a particular rendering session. Gets the properties of a particular rendering session. @@ -364,31 +365,33 @@ async def get_session( :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + cls = kwargs.pop("cls", None) # type: ClsType["models.RenderingSession"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" # Construct URL - url = self.get_session.metadata['url'] # type: ignore + url = self.get_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -398,20 +401,17 @@ async def get_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('RenderingSession', pipeline_response) + deserialized = self._deserialize("RenderingSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + get_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}"} # type: ignore async def update_session( - self, - account_id: str, - session_id: str, - body: "models.UpdateSessionSettings", - **kwargs + self, account_id: str, session_id: str, body: "models.UpdateSessionSettings", **kwargs ) -> "models.RenderingSession": """Updates the max lease time of a particular rendering session. @@ -430,38 +430,42 @@ async def update_session( :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + cls = kwargs.pop("cls", None) # type: ClsType["models.RenderingSession"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 422: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 422: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.update_session.metadata['url'] # type: ignore + url = self.update_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = "application/json" body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'UpdateSessionSettings') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(body, "UpdateSessionSettings") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -471,20 +475,16 @@ async def update_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('RenderingSession', pipeline_response) + deserialized = self._deserialize("RenderingSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore - - async def stop_session( - self, - account_id: str, - session_id: str, - **kwargs - ) -> None: + + update_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}"} # type: ignore + + async def stop_session(self, account_id: str, session_id: str, **kwargs) -> None: """Stops a particular rendering session. Stops a particular rendering session. @@ -500,27 +500,29 @@ async def stop_session( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" # Construct URL - url = self.stop_session.metadata['url'] # type: ignore + url = self.stop_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -534,18 +536,14 @@ async def stop_session( raise HttpResponseError(response=response) response_headers = {} - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) if cls: return cls(pipeline_response, None, response_headers) - stop_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}/:stop'} # type: ignore + stop_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}/:stop"} # type: ignore - def list_sessions( - self, - account_id: str, - **kwargs - ) -> AsyncIterable["models.SessionsList"]: + def list_sessions(self, account_id: str, **kwargs) -> AsyncIterable["models.SessionsList"]: """Gets a list of all rendering sessions. Gets a list of all rendering sessions. @@ -557,46 +555,52 @@ def list_sessions( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mixedreality.remoterendering._generated.models.SessionsList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.SessionsList"] + cls = kwargs.pop("cls", None) # type: ClsType["models.SessionsList"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if not next_link: # Construct URL - url = self.list_sessions.metadata['url'] # type: ignore + url = self.list_sessions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SessionsList', pipeline_response) + deserialized = self._deserialize("SessionsList", pipeline_response) list_of_elem = deserialized.sessions if cls: list_of_elem = cls(list_of_elem) @@ -614,7 +618,6 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list_sessions.metadata = {'url': '/accounts/{account_id}/sessions'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list_sessions.metadata = {"url": "/accounts/{account_id}/sessions"} # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py index 231006f9c25b..1b3f983ccf1c 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py @@ -42,20 +42,20 @@ ) __all__ = [ - 'AssetConversion', - 'AssetConversionInputSettings', - 'AssetConversionOutput', - 'AssetConversionOutputSettings', - 'AssetConversionSettings', - 'ConversionList', - 'CreateAssetConversionSettings', - 'CreateRenderingSessionSettings', - 'ErrorResponse', - 'RemoteRenderingError', - 'RenderingSession', - 'SessionsList', - 'UpdateSessionSettings', - 'AssetConversionStatus', - 'RenderingSessionSize', - 'RenderingSessionStatus', + "AssetConversion", + "AssetConversionInputSettings", + "AssetConversionOutput", + "AssetConversionOutputSettings", + "AssetConversionSettings", + "ConversionList", + "CreateAssetConversionSettings", + "CreateRenderingSessionSettings", + "ErrorResponse", + "RemoteRenderingError", + "RenderingSession", + "SessionsList", + "UpdateSessionSettings", + "AssetConversionStatus", + "RenderingSessionSize", + "RenderingSessionStatus", ] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py index a70239a592ae..564e3afe6879 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py @@ -38,34 +38,31 @@ class AssetConversion(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'settings': {'required': True}, - 'output': {'readonly': True}, - 'error': {'required': True}, - 'status': {'required': True}, - 'created_on': {'required': True}, + "id": {"required": True}, + "settings": {"required": True}, + "output": {"readonly": True}, + "error": {"required": True}, + "status": {"required": True}, + "created_on": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, - 'output': {'key': 'output', 'type': 'AssetConversionOutput'}, - 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, - 'status': {'key': 'status', 'type': 'str'}, - 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + "id": {"key": "id", "type": "str"}, + "settings": {"key": "settings", "type": "AssetConversionSettings"}, + "output": {"key": "output", "type": "AssetConversionOutput"}, + "error": {"key": "error", "type": "RemoteRenderingError"}, + "status": {"key": "status", "type": "str"}, + "created_on": {"key": "creationTime", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AssetConversion, self).__init__(**kwargs) - self.id = kwargs['id'] - self.settings = kwargs['settings'] + self.id = kwargs["id"] + self.settings = kwargs["settings"] self.output = None - self.error = kwargs['error'] - self.status = kwargs['status'] - self.created_on = kwargs['created_on'] + self.error = kwargs["error"] + self.status = kwargs["status"] + self.created_on = kwargs["created_on"] class AssetConversionInputSettings(msrest.serialization.Model): @@ -94,26 +91,23 @@ class AssetConversionInputSettings(msrest.serialization.Model): """ _validation = { - 'storage_container_uri': {'required': True}, - 'relative_input_asset_path': {'required': True}, + "storage_container_uri": {"required": True}, + "relative_input_asset_path": {"required": True}, } _attribute_map = { - 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, - 'storage_container_read_list_sas': {'key': 'storageContainerReadListSas', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'relative_input_asset_path': {'key': 'relativeInputAssetPath', 'type': 'str'}, + "storage_container_uri": {"key": "storageContainerUri", "type": "str"}, + "storage_container_read_list_sas": {"key": "storageContainerReadListSas", "type": "str"}, + "blob_prefix": {"key": "blobPrefix", "type": "str"}, + "relative_input_asset_path": {"key": "relativeInputAssetPath", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AssetConversionInputSettings, self).__init__(**kwargs) - self.storage_container_uri = kwargs['storage_container_uri'] - self.storage_container_read_list_sas = kwargs.get('storage_container_read_list_sas', None) - self.blob_prefix = kwargs.get('blob_prefix', None) - self.relative_input_asset_path = kwargs['relative_input_asset_path'] + self.storage_container_uri = kwargs["storage_container_uri"] + self.storage_container_read_list_sas = kwargs.get("storage_container_read_list_sas", None) + self.blob_prefix = kwargs.get("blob_prefix", None) + self.relative_input_asset_path = kwargs["relative_input_asset_path"] class AssetConversionOutput(msrest.serialization.Model): @@ -126,17 +120,14 @@ class AssetConversionOutput(msrest.serialization.Model): """ _validation = { - 'asset_uri': {'readonly': True}, + "asset_uri": {"readonly": True}, } _attribute_map = { - 'asset_uri': {'key': 'outputAssetUri', 'type': 'str'}, + "asset_uri": {"key": "outputAssetUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AssetConversionOutput, self).__init__(**kwargs) self.asset_uri = None @@ -167,25 +158,22 @@ class AssetConversionOutputSettings(msrest.serialization.Model): """ _validation = { - 'storage_container_uri': {'required': True}, + "storage_container_uri": {"required": True}, } _attribute_map = { - 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, - 'storage_container_write_sas': {'key': 'storageContainerWriteSas', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'output_asset_filename': {'key': 'outputAssetFilename', 'type': 'str'}, + "storage_container_uri": {"key": "storageContainerUri", "type": "str"}, + "storage_container_write_sas": {"key": "storageContainerWriteSas", "type": "str"}, + "blob_prefix": {"key": "blobPrefix", "type": "str"}, + "output_asset_filename": {"key": "outputAssetFilename", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AssetConversionOutputSettings, self).__init__(**kwargs) - self.storage_container_uri = kwargs['storage_container_uri'] - self.storage_container_write_sas = kwargs.get('storage_container_write_sas', None) - self.blob_prefix = kwargs.get('blob_prefix', None) - self.output_asset_filename = kwargs.get('output_asset_filename', None) + self.storage_container_uri = kwargs["storage_container_uri"] + self.storage_container_write_sas = kwargs.get("storage_container_write_sas", None) + self.blob_prefix = kwargs.get("blob_prefix", None) + self.output_asset_filename = kwargs.get("output_asset_filename", None) class AssetConversionSettings(msrest.serialization.Model): @@ -204,22 +192,19 @@ class AssetConversionSettings(msrest.serialization.Model): """ _validation = { - 'input_settings': {'required': True}, - 'output_settings': {'required': True}, + "input_settings": {"required": True}, + "output_settings": {"required": True}, } _attribute_map = { - 'input_settings': {'key': 'inputLocation', 'type': 'AssetConversionInputSettings'}, - 'output_settings': {'key': 'outputLocation', 'type': 'AssetConversionOutputSettings'}, + "input_settings": {"key": "inputLocation", "type": "AssetConversionInputSettings"}, + "output_settings": {"key": "outputLocation", "type": "AssetConversionOutputSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AssetConversionSettings, self).__init__(**kwargs) - self.input_settings = kwargs['input_settings'] - self.output_settings = kwargs['output_settings'] + self.input_settings = kwargs["input_settings"] + self.output_settings = kwargs["output_settings"] class ConversionList(msrest.serialization.Model): @@ -238,21 +223,18 @@ class ConversionList(msrest.serialization.Model): """ _validation = { - 'conversions': {'required': True}, - 'next_link': {'readonly': True}, + "conversions": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'conversions': {'key': 'conversions', 'type': '[AssetConversion]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "conversions": {"key": "conversions", "type": "[AssetConversion]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ConversionList, self).__init__(**kwargs) - self.conversions = kwargs['conversions'] + self.conversions = kwargs["conversions"] self.next_link = None @@ -267,19 +249,16 @@ class CreateAssetConversionSettings(msrest.serialization.Model): """ _validation = { - 'settings': {'required': True}, + "settings": {"required": True}, } _attribute_map = { - 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, + "settings": {"key": "settings", "type": "AssetConversionSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CreateAssetConversionSettings, self).__init__(**kwargs) - self.settings = kwargs['settings'] + self.settings = kwargs["settings"] class CreateRenderingSessionSettings(msrest.serialization.Model): @@ -297,22 +276,19 @@ class CreateRenderingSessionSettings(msrest.serialization.Model): """ _validation = { - 'lease_time_minutes': {'required': True}, - 'size': {'required': True}, + "lease_time_minutes": {"required": True}, + "size": {"required": True}, } _attribute_map = { - 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, + "lease_time_minutes": {"key": "maxLeaseTimeMinutes", "type": "int"}, + "size": {"key": "size", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CreateRenderingSessionSettings, self).__init__(**kwargs) - self.lease_time_minutes = kwargs['lease_time_minutes'] - self.size = kwargs['size'] + self.lease_time_minutes = kwargs["lease_time_minutes"] + self.size = kwargs["size"] class ErrorResponse(msrest.serialization.Model): @@ -325,19 +301,16 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + "error": {"key": "error", "type": "RemoteRenderingError"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs['error'] + self.error = kwargs["error"] class RemoteRenderingError(msrest.serialization.Model): @@ -363,28 +336,25 @@ class RemoteRenderingError(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - 'details': {'readonly': True}, - 'target': {'readonly': True}, - 'inner_error': {'readonly': True}, + "code": {"required": True}, + "message": {"required": True}, + "details": {"readonly": True}, + "target": {"readonly": True}, + "inner_error": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[RemoteRenderingError]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'inner_error': {'key': 'innerError', 'type': 'RemoteRenderingError'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "details": {"key": "details", "type": "[RemoteRenderingError]"}, + "target": {"key": "target", "type": "str"}, + "inner_error": {"key": "innerError", "type": "RemoteRenderingError"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RemoteRenderingError, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs['message'] + self.code = kwargs["code"] + self.message = kwargs["message"] self.details = None self.target = None self.inner_error = None @@ -431,46 +401,43 @@ class RenderingSession(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'arr_inspector_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, - 'handshake_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, - 'elapsed_time_minutes': {'readonly': True}, - 'hostname': {'readonly': True}, - 'lease_time_minutes': {'readonly': True}, - 'size': {'required': True}, - 'status': {'required': True}, - 'teraflops': {'readonly': True}, - 'error': {'readonly': True}, - 'created_on': {'readonly': True}, + "id": {"required": True}, + "arr_inspector_port": {"readonly": True, "maximum": 65534, "minimum": 49152}, + "handshake_port": {"readonly": True, "maximum": 65534, "minimum": 49152}, + "elapsed_time_minutes": {"readonly": True}, + "hostname": {"readonly": True}, + "lease_time_minutes": {"readonly": True}, + "size": {"required": True}, + "status": {"required": True}, + "teraflops": {"readonly": True}, + "error": {"readonly": True}, + "created_on": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'arr_inspector_port': {'key': 'arrInspectorPort', 'type': 'int'}, - 'handshake_port': {'key': 'handshakePort', 'type': 'int'}, - 'elapsed_time_minutes': {'key': 'elapsedTimeMinutes', 'type': 'int'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'teraflops': {'key': 'teraflops', 'type': 'float'}, - 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, - 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + "id": {"key": "id", "type": "str"}, + "arr_inspector_port": {"key": "arrInspectorPort", "type": "int"}, + "handshake_port": {"key": "handshakePort", "type": "int"}, + "elapsed_time_minutes": {"key": "elapsedTimeMinutes", "type": "int"}, + "hostname": {"key": "hostname", "type": "str"}, + "lease_time_minutes": {"key": "maxLeaseTimeMinutes", "type": "int"}, + "size": {"key": "size", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "teraflops": {"key": "teraflops", "type": "float"}, + "error": {"key": "error", "type": "RemoteRenderingError"}, + "created_on": {"key": "creationTime", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RenderingSession, self).__init__(**kwargs) - self.id = kwargs['id'] + self.id = kwargs["id"] self.arr_inspector_port = None self.handshake_port = None self.elapsed_time_minutes = None self.hostname = None self.lease_time_minutes = None - self.size = kwargs['size'] - self.status = kwargs['status'] + self.size = kwargs["size"] + self.status = kwargs["status"] self.teraflops = None self.error = None self.created_on = None @@ -493,21 +460,18 @@ class SessionsList(msrest.serialization.Model): """ _validation = { - 'sessions': {'required': True}, - 'next_link': {'readonly': True}, + "sessions": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'sessions': {'key': 'sessions', 'type': '[RenderingSession]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "sessions": {"key": "sessions", "type": "[RenderingSession]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SessionsList, self).__init__(**kwargs) - self.sessions = kwargs['sessions'] + self.sessions = kwargs["sessions"] self.next_link = None @@ -523,16 +487,13 @@ class UpdateSessionSettings(msrest.serialization.Model): """ _validation = { - 'lease_time_minutes': {'required': True}, + "lease_time_minutes": {"required": True}, } _attribute_map = { - 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + "lease_time_minutes": {"key": "maxLeaseTimeMinutes", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(UpdateSessionSettings, self).__init__(**kwargs) - self.lease_time_minutes = kwargs['lease_time_minutes'] + self.lease_time_minutes = kwargs["lease_time_minutes"] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py index 1603b2006645..d2d88952e271 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py @@ -43,21 +43,21 @@ class AssetConversion(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'settings': {'required': True}, - 'output': {'readonly': True}, - 'error': {'required': True}, - 'status': {'required': True}, - 'created_on': {'required': True}, + "id": {"required": True}, + "settings": {"required": True}, + "output": {"readonly": True}, + "error": {"required": True}, + "status": {"required": True}, + "created_on": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, - 'output': {'key': 'output', 'type': 'AssetConversionOutput'}, - 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, - 'status': {'key': 'status', 'type': 'str'}, - 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + "id": {"key": "id", "type": "str"}, + "settings": {"key": "settings", "type": "AssetConversionSettings"}, + "output": {"key": "output", "type": "AssetConversionOutput"}, + "error": {"key": "error", "type": "RemoteRenderingError"}, + "status": {"key": "status", "type": "str"}, + "created_on": {"key": "creationTime", "type": "iso-8601"}, } def __init__( @@ -105,15 +105,15 @@ class AssetConversionInputSettings(msrest.serialization.Model): """ _validation = { - 'storage_container_uri': {'required': True}, - 'relative_input_asset_path': {'required': True}, + "storage_container_uri": {"required": True}, + "relative_input_asset_path": {"required": True}, } _attribute_map = { - 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, - 'storage_container_read_list_sas': {'key': 'storageContainerReadListSas', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'relative_input_asset_path': {'key': 'relativeInputAssetPath', 'type': 'str'}, + "storage_container_uri": {"key": "storageContainerUri", "type": "str"}, + "storage_container_read_list_sas": {"key": "storageContainerReadListSas", "type": "str"}, + "blob_prefix": {"key": "blobPrefix", "type": "str"}, + "relative_input_asset_path": {"key": "relativeInputAssetPath", "type": "str"}, } def __init__( @@ -142,17 +142,14 @@ class AssetConversionOutput(msrest.serialization.Model): """ _validation = { - 'asset_uri': {'readonly': True}, + "asset_uri": {"readonly": True}, } _attribute_map = { - 'asset_uri': {'key': 'outputAssetUri', 'type': 'str'}, + "asset_uri": {"key": "outputAssetUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AssetConversionOutput, self).__init__(**kwargs) self.asset_uri = None @@ -183,14 +180,14 @@ class AssetConversionOutputSettings(msrest.serialization.Model): """ _validation = { - 'storage_container_uri': {'required': True}, + "storage_container_uri": {"required": True}, } _attribute_map = { - 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, - 'storage_container_write_sas': {'key': 'storageContainerWriteSas', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'output_asset_filename': {'key': 'outputAssetFilename', 'type': 'str'}, + "storage_container_uri": {"key": "storageContainerUri", "type": "str"}, + "storage_container_write_sas": {"key": "storageContainerWriteSas", "type": "str"}, + "blob_prefix": {"key": "blobPrefix", "type": "str"}, + "output_asset_filename": {"key": "outputAssetFilename", "type": "str"}, } def __init__( @@ -225,13 +222,13 @@ class AssetConversionSettings(msrest.serialization.Model): """ _validation = { - 'input_settings': {'required': True}, - 'output_settings': {'required': True}, + "input_settings": {"required": True}, + "output_settings": {"required": True}, } _attribute_map = { - 'input_settings': {'key': 'inputLocation', 'type': 'AssetConversionInputSettings'}, - 'output_settings': {'key': 'outputLocation', 'type': 'AssetConversionOutputSettings'}, + "input_settings": {"key": "inputLocation", "type": "AssetConversionInputSettings"}, + "output_settings": {"key": "outputLocation", "type": "AssetConversionOutputSettings"}, } def __init__( @@ -262,21 +259,16 @@ class ConversionList(msrest.serialization.Model): """ _validation = { - 'conversions': {'required': True}, - 'next_link': {'readonly': True}, + "conversions": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'conversions': {'key': 'conversions', 'type': '[AssetConversion]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "conversions": {"key": "conversions", "type": "[AssetConversion]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - conversions: List["AssetConversion"], - **kwargs - ): + def __init__(self, *, conversions: List["AssetConversion"], **kwargs): super(ConversionList, self).__init__(**kwargs) self.conversions = conversions self.next_link = None @@ -293,19 +285,14 @@ class CreateAssetConversionSettings(msrest.serialization.Model): """ _validation = { - 'settings': {'required': True}, + "settings": {"required": True}, } _attribute_map = { - 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, + "settings": {"key": "settings", "type": "AssetConversionSettings"}, } - def __init__( - self, - *, - settings: "AssetConversionSettings", - **kwargs - ): + def __init__(self, *, settings: "AssetConversionSettings", **kwargs): super(CreateAssetConversionSettings, self).__init__(**kwargs) self.settings = settings @@ -325,22 +312,16 @@ class CreateRenderingSessionSettings(msrest.serialization.Model): """ _validation = { - 'lease_time_minutes': {'required': True}, - 'size': {'required': True}, + "lease_time_minutes": {"required": True}, + "size": {"required": True}, } _attribute_map = { - 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, + "lease_time_minutes": {"key": "maxLeaseTimeMinutes", "type": "int"}, + "size": {"key": "size", "type": "str"}, } - def __init__( - self, - *, - lease_time_minutes: int, - size: Union[str, "RenderingSessionSize"], - **kwargs - ): + def __init__(self, *, lease_time_minutes: int, size: Union[str, "RenderingSessionSize"], **kwargs): super(CreateRenderingSessionSettings, self).__init__(**kwargs) self.lease_time_minutes = lease_time_minutes self.size = size @@ -356,19 +337,14 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + "error": {"key": "error", "type": "RemoteRenderingError"}, } - def __init__( - self, - *, - error: "RemoteRenderingError", - **kwargs - ): + def __init__(self, *, error: "RemoteRenderingError", **kwargs): super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -396,28 +372,22 @@ class RemoteRenderingError(msrest.serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - 'details': {'readonly': True}, - 'target': {'readonly': True}, - 'inner_error': {'readonly': True}, + "code": {"required": True}, + "message": {"required": True}, + "details": {"readonly": True}, + "target": {"readonly": True}, + "inner_error": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[RemoteRenderingError]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'inner_error': {'key': 'innerError', 'type': 'RemoteRenderingError'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "details": {"key": "details", "type": "[RemoteRenderingError]"}, + "target": {"key": "target", "type": "str"}, + "inner_error": {"key": "innerError", "type": "RemoteRenderingError"}, } - def __init__( - self, - *, - code: str, - message: str, - **kwargs - ): + def __init__(self, *, code: str, message: str, **kwargs): super(RemoteRenderingError, self).__init__(**kwargs) self.code = code self.message = message @@ -467,31 +437,31 @@ class RenderingSession(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'arr_inspector_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, - 'handshake_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, - 'elapsed_time_minutes': {'readonly': True}, - 'hostname': {'readonly': True}, - 'lease_time_minutes': {'readonly': True}, - 'size': {'required': True}, - 'status': {'required': True}, - 'teraflops': {'readonly': True}, - 'error': {'readonly': True}, - 'created_on': {'readonly': True}, + "id": {"required": True}, + "arr_inspector_port": {"readonly": True, "maximum": 65534, "minimum": 49152}, + "handshake_port": {"readonly": True, "maximum": 65534, "minimum": 49152}, + "elapsed_time_minutes": {"readonly": True}, + "hostname": {"readonly": True}, + "lease_time_minutes": {"readonly": True}, + "size": {"required": True}, + "status": {"required": True}, + "teraflops": {"readonly": True}, + "error": {"readonly": True}, + "created_on": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'arr_inspector_port': {'key': 'arrInspectorPort', 'type': 'int'}, - 'handshake_port': {'key': 'handshakePort', 'type': 'int'}, - 'elapsed_time_minutes': {'key': 'elapsedTimeMinutes', 'type': 'int'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, - 'size': {'key': 'size', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'teraflops': {'key': 'teraflops', 'type': 'float'}, - 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, - 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + "id": {"key": "id", "type": "str"}, + "arr_inspector_port": {"key": "arrInspectorPort", "type": "int"}, + "handshake_port": {"key": "handshakePort", "type": "int"}, + "elapsed_time_minutes": {"key": "elapsedTimeMinutes", "type": "int"}, + "hostname": {"key": "hostname", "type": "str"}, + "lease_time_minutes": {"key": "maxLeaseTimeMinutes", "type": "int"}, + "size": {"key": "size", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "teraflops": {"key": "teraflops", "type": "float"}, + "error": {"key": "error", "type": "RemoteRenderingError"}, + "created_on": {"key": "creationTime", "type": "iso-8601"}, } def __init__( @@ -533,21 +503,16 @@ class SessionsList(msrest.serialization.Model): """ _validation = { - 'sessions': {'required': True}, - 'next_link': {'readonly': True}, + "sessions": {"required": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'sessions': {'key': 'sessions', 'type': '[RenderingSession]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "sessions": {"key": "sessions", "type": "[RenderingSession]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - sessions: List["RenderingSession"], - **kwargs - ): + def __init__(self, *, sessions: List["RenderingSession"], **kwargs): super(SessionsList, self).__init__(**kwargs) self.sessions = sessions self.next_link = None @@ -565,18 +530,13 @@ class UpdateSessionSettings(msrest.serialization.Model): """ _validation = { - 'lease_time_minutes': {'required': True}, + "lease_time_minutes": {"required": True}, } _attribute_map = { - 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + "lease_time_minutes": {"key": "maxLeaseTimeMinutes", "type": "int"}, } - def __init__( - self, - *, - lease_time_minutes: int, - **kwargs - ): + def __init__(self, *, lease_time_minutes: int, **kwargs): super(UpdateSessionSettings, self).__init__(**kwargs) self.lease_time_minutes = lease_time_minutes diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py index dc98ad743f46..dce191653eda 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py @@ -9,6 +9,7 @@ from enum import Enum, EnumMeta from six import with_metaclass + class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(self, name): return super().__getitem__(name.upper()) @@ -27,8 +28,7 @@ def __getattr__(cls, name): class AssetConversionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. - """ + """The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'.""" NOT_STARTED = "NotStarted" #: The conversion was created but hasn't started. RUNNING = "Running" #: The conversion is running. @@ -36,6 +36,7 @@ class AssetConversionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) FAILED = "Failed" #: The conversion has failed. Check the 'error' field for more details. This is a terminal state. SUCCEEDED = "Succeeded" #: The conversion has succeeded. Check the 'output' field for output asset location. This is a terminal state. + class RenderingSessionSize(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm- @@ -45,9 +46,9 @@ class RenderingSessionSize(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STANDARD = "Standard" #: Standard rendering session size. PREMIUM = "Premium" #: Premium rendering session size. + class RenderingSessionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. - """ + """The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'.""" ERROR = "Error" #: The rendering session has encountered an error, and is unusable. This is a terminal state. EXPIRED = "Expired" #: The rendering session enters the 'Expired' state when it has been in the 'Ready' state longer than its lease time. This is a terminal state. diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py index dd0822aab99b..b40cd27c1733 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py @@ -9,5 +9,5 @@ from ._remote_rendering_operations import RemoteRenderingOperations __all__ = [ - 'RemoteRenderingOperations', + "RemoteRenderingOperations", ] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py index 3badd06cebba..c3568752c3b6 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py @@ -19,9 +19,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class RemoteRenderingOperations(object): """RemoteRenderingOperations operations. @@ -69,38 +70,44 @@ def create_conversion( :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + cls = kwargs.pop("cls", None) # type: ClsType["models.AssetConversion"] error_map = { 404: ResourceNotFoundError, - 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 400: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 409: lambda response: ResourceExistsError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_conversion.metadata['url'] # type: ignore + url = self.create_conversion.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "conversion_id": self._serialize.url("conversion_id", conversion_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = "application/json" body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'CreateAssetConversionSettings') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(body, "CreateAssetConversionSettings") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -112,18 +119,19 @@ def create_conversion( response_headers = {} if response.status_code == 200: - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('AssetConversion', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("AssetConversion", pipeline_response) if response.status_code == 201: - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('AssetConversion', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("AssetConversion", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - create_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore + + create_conversion.metadata = {"url": "/accounts/{account_id}/conversions/{conversion_id}"} # type: ignore def get_conversion( self, @@ -147,31 +155,33 @@ def get_conversion( :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + cls = kwargs.pop("cls", None) # type: ClsType["models.AssetConversion"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" # Construct URL - url = self.get_conversion.metadata['url'] # type: ignore + url = self.get_conversion.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "conversion_id": self._serialize.url("conversion_id", conversion_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -182,15 +192,16 @@ def get_conversion( raise HttpResponseError(response=response) response_headers = {} - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - deserialized = self._deserialize('AssetConversion', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + deserialized = self._deserialize("AssetConversion", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - get_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore + + get_conversion.metadata = {"url": "/accounts/{account_id}/conversions/{conversion_id}"} # type: ignore def list_conversions( self, @@ -209,46 +220,52 @@ def list_conversions( :rtype: ~azure.core.paging.ItemPaged[~azure.mixedreality.remoterendering._generated.models.ConversionList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConversionList"] + cls = kwargs.pop("cls", None) # type: ClsType["models.ConversionList"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if not next_link: # Construct URL - url = self.list_conversions.metadata['url'] # type: ignore + url = self.list_conversions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): - deserialized = self._deserialize('ConversionList', pipeline_response) + deserialized = self._deserialize("ConversionList", pipeline_response) list_of_elem = deserialized.conversions if cls: list_of_elem = cls(list_of_elem) @@ -266,10 +283,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list_conversions.metadata = {'url': '/accounts/{account_id}/conversions'} # type: ignore + return ItemPaged(get_next, extract_data) + + list_conversions.metadata = {"url": "/accounts/{account_id}/conversions"} # type: ignore def create_session( self, @@ -296,38 +312,44 @@ def create_session( :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + cls = kwargs.pop("cls", None) # type: ClsType["models.RenderingSession"] error_map = { 404: ResourceNotFoundError, - 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 400: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 409: lambda response: ResourceExistsError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.create_session.metadata['url'] # type: ignore + url = self.create_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = "application/json" body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'CreateRenderingSessionSettings') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(body, "CreateRenderingSessionSettings") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -339,17 +361,18 @@ def create_session( response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('RenderingSession', pipeline_response) + deserialized = self._deserialize("RenderingSession", pipeline_response) if response.status_code == 201: - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) - deserialized = self._deserialize('RenderingSession', pipeline_response) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) + deserialized = self._deserialize("RenderingSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - create_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + create_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}"} # type: ignore def get_session( self, @@ -373,31 +396,33 @@ def get_session( :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + cls = kwargs.pop("cls", None) # type: ClsType["models.RenderingSession"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" # Construct URL - url = self.get_session.metadata['url'] # type: ignore + url = self.get_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -407,13 +432,14 @@ def get_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('RenderingSession', pipeline_response) + deserialized = self._deserialize("RenderingSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + get_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}"} # type: ignore def update_session( self, @@ -440,38 +466,42 @@ def update_session( :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + cls = kwargs.pop("cls", None) # type: ClsType["models.RenderingSession"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 422: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 422: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.update_session.metadata['url'] # type: ignore + url = self.update_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = "application/json" body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'UpdateSessionSettings') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(body, "UpdateSessionSettings") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -481,13 +511,14 @@ def update_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('RenderingSession', pipeline_response) + deserialized = self._deserialize("RenderingSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + update_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}"} # type: ignore def stop_session( self, @@ -511,27 +542,29 @@ def stop_session( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" # Construct URL - url = self.stop_session.metadata['url'] # type: ignore + url = self.stop_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), - 'session_id': self._serialize.url("session_id", session_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "account_id": self._serialize.url("account_id", account_id, "str"), + "session_id": self._serialize.url("session_id", session_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -545,12 +578,12 @@ def stop_session( raise HttpResponseError(response=response) response_headers = {} - response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + response_headers["MS-CV"] = self._deserialize("str", response.headers.get("MS-CV")) if cls: return cls(pipeline_response, None, response_headers) - stop_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}/:stop'} # type: ignore + stop_session.metadata = {"url": "/accounts/{account_id}/sessions/{session_id}/:stop"} # type: ignore def list_sessions( self, @@ -569,46 +602,52 @@ def list_sessions( :rtype: ~azure.core.paging.ItemPaged[~azure.mixedreality.remoterendering._generated.models.SessionsList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.SessionsList"] + cls = kwargs.pop("cls", None) # type: ClsType["models.SessionsList"] error_map = { 404: ResourceNotFoundError, 409: ResourceExistsError, - 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError( + response=response, model=self._deserialize(models.ErrorResponse, response) + ), } - error_map.update(kwargs.pop('error_map', {})) + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-01-01" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if not next_link: # Construct URL - url = self.list_sessions.metadata['url'] # type: ignore + url = self.list_sessions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'account_id': self._serialize.url("account_id", account_id, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "account_id": self._serialize.url("account_id", account_id, "str"), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): - deserialized = self._deserialize('SessionsList', pipeline_response) + deserialized = self._deserialize("SessionsList", pipeline_response) list_of_elem = deserialized.sessions if cls: list_of_elem = cls(list_of_elem) @@ -626,7 +665,6 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list_sessions.metadata = {'url': '/accounts/{account_id}/sessions'} # type: ignore + return ItemPaged(get_next, extract_data) + + list_sessions.metadata = {"url": "/accounts/{account_id}/sessions"} # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py index 505cef078c09..d4b619226d28 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py @@ -11,17 +11,15 @@ from azure.core.polling import PollingMethod from azure.core.exceptions import HttpResponseError, ODataV4Format -from ._generated.models import (AssetConversion, AssetConversionStatus, - RenderingSession, RenderingSessionStatus) +from ._generated.models import AssetConversion, AssetConversionStatus, RenderingSession, RenderingSessionStatus from ._generated import RemoteRenderingRestClient class RemoteRenderingPolling(PollingMethod): - """ Abstract base class for polling. - """ + """Abstract base class for polling.""" - def __init__(self, account_id: str, is_terminated: Callable, polling_interval: int=5) -> None: + def __init__(self, account_id: str, is_terminated: Callable, polling_interval: int = 5) -> None: self._account_id = account_id self._response: Union[AssetConversion, RenderingSession, None] = None self._client: Union[RemoteRenderingRestClient, None] = None @@ -33,9 +31,9 @@ def _update_status(self) -> None: if self._query_status is None: raise RuntimeError("this poller has not been initialized") self._response = self._query_status() # pylint: disable=E1102 - if self._response.error is not None: # type: ignore + if self._response.error is not None: # type: ignore error = HttpResponseError("Polling returned a status indicating an error state.", model=self._response) - error.error = ODataV4Format(self._response.error.serialize()) # type: ignore + error.error = ODataV4Format(self._response.error.serialize()) # type: ignore raise error def initialize(self, client: Any, initial_response: Any, deserialization_callback: Callable) -> None: @@ -65,32 +63,30 @@ def resource(self) -> Union[AssetConversion, RenderingSession, None]: def get_continuation_token(self) -> str: # returns a Base64 encoded string of "::" - token_str = "1:"+self._account_id+":"+self._response.id # type: ignore - encoded = token_str.encode('ascii') + token_str = "1:" + self._account_id + ":" + self._response.id # type: ignore + encoded = token_str.encode("ascii") base64_endcoded = base64.b64encode(encoded) - return base64_endcoded.decode('ascii') + return base64_endcoded.decode("ascii") class ConversionPolling(RemoteRenderingPolling): - def __init__(self, account_id: str, polling_interval: int=5) -> None: + def __init__(self, account_id: str, polling_interval: int = 5) -> None: def is_terminated(status): - return status in [ - AssetConversionStatus.FAILED, - AssetConversionStatus.SUCCEEDED - ] + return status in [AssetConversionStatus.FAILED, AssetConversionStatus.SUCCEEDED] - super(ConversionPolling, self).__init__(account_id=account_id, - is_terminated=is_terminated, - polling_interval=polling_interval) + super(ConversionPolling, self).__init__( + account_id=account_id, is_terminated=is_terminated, polling_interval=polling_interval + ) def initialize(self, client: Any, initial_response: Any, deserialization_callback: Callable) -> None: - super(ConversionPolling, self).initialize(client=client, - initial_response=initial_response, - deserialization_callback=deserialization_callback) + super(ConversionPolling, self).initialize( + client=client, initial_response=initial_response, deserialization_callback=deserialization_callback + ) self._query_status = partial( - self._client.remote_rendering.get_conversion, # type: ignore + self._client.remote_rendering.get_conversion, # type: ignore account_id=self._account_id, - conversion_id=initial_response.id) # type: ignore + conversion_id=initial_response.id, + ) # type: ignore def status(self) -> str: if self._response is None: @@ -100,39 +96,41 @@ def status(self) -> str: @classmethod def from_continuation_token(cls, continuation_token, client, **kwargs): # pylint: disable=W0221 # type(str, RemoteRenderingRestClient, Any) -> Tuple - version, account_id, conversion_id = base64.b64decode( - continuation_token.encode('ascii')).decode('ascii').split(":") + version, account_id, conversion_id = ( + base64.b64decode(continuation_token.encode("ascii")).decode("ascii").split(":") + ) if version != "1": raise ValueError("Cannot continue from continuation token from a different/newer client version.") initial_response = client.remote_rendering.get_conversion( - account_id=account_id, - conversion_id=conversion_id, - **kwargs) + account_id=account_id, conversion_id=conversion_id, **kwargs + ) return client, initial_response, None class SessionPolling(RemoteRenderingPolling): - def __init__(self, account_id: str, polling_interval: int=2) -> None: + def __init__(self, account_id: str, polling_interval: int = 2) -> None: def is_terminated(status): return status in [ RenderingSessionStatus.EXPIRED, RenderingSessionStatus.ERROR, RenderingSessionStatus.STOPPED, - RenderingSessionStatus.READY + RenderingSessionStatus.READY, ] - super(SessionPolling, self).__init__(account_id=account_id, - is_terminated=is_terminated, - polling_interval=polling_interval) + + super(SessionPolling, self).__init__( + account_id=account_id, is_terminated=is_terminated, polling_interval=polling_interval + ) def initialize(self, client: Any, initial_response: Any, deserialization_callback: Callable) -> None: super(SessionPolling, self).initialize(client, initial_response, deserialization_callback) self._query_status = partial( - self._client.remote_rendering.get_session, # type: ignore + self._client.remote_rendering.get_session, # type: ignore account_id=self._account_id, - session_id=initial_response.id) # type: ignore + session_id=initial_response.id, + ) # type: ignore def status(self) -> str: if self._response is None: @@ -142,15 +140,13 @@ def status(self) -> str: @classmethod def from_continuation_token(cls, continuation_token, client, **kwargs): # pylint: disable=W0221 # type(str, RemoteRenderingRestClient, Any) -> Tuple - version, account_id, session_id = base64.b64decode( - continuation_token.encode('ascii')).decode('ascii').split(":") + version, account_id, session_id = ( + base64.b64decode(continuation_token.encode("ascii")).decode("ascii").split(":") + ) if version != "1": raise ValueError("Cannot continue from continuation token from a different/newer client version.") - initial_response = client.remote_rendering.get_session( - account_id=account_id, - session_id=session_id, - **kwargs) + initial_response = client.remote_rendering.get_session(account_id=account_id, session_id=session_id, **kwargs) return client, initial_response, None diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py index 397e66a35ed8..22b9c87b2f3b 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py @@ -18,21 +18,25 @@ from ._api_version import validate_api_version, DEFAULT_VERSION from ._generated import RemoteRenderingRestClient -from ._generated.models import (AssetConversion, AssetConversionInputSettings, - AssetConversionOutputSettings, - AssetConversionSettings, - CreateAssetConversionSettings, - CreateRenderingSessionSettings, - RenderingSession, RenderingSessionSize, - UpdateSessionSettings) +from ._generated.models import ( + AssetConversion, + AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionSettings, + CreateAssetConversionSettings, + CreateRenderingSessionSettings, + RenderingSession, + RenderingSessionSize, + UpdateSessionSettings, +) from ._polling import ConversionPolling, SessionPolling from ._shared.authentication_endpoint import construct_endpoint_url from ._shared.mixed_reality_token_credential import get_mixedreality_credential -from ._shared.mixedreality_account_key_credential import \ - MixedRealityAccountKeyCredential +from ._shared.mixedreality_account_key_credential import MixedRealityAccountKeyCredential from ._shared.static_access_token_credential import StaticAccessTokenCredential from ._version import SDK_MONIKER + class RemoteRenderingClient: """A client for the Azure Remote Rendering Service. @@ -63,16 +67,16 @@ class RemoteRenderingClient: :type authentication_endpoint_url: str """ - def __init__(self, - endpoint: str, - account_id: str, - account_domain: str, - credential: Union[AzureKeyCredential, 'TokenCredential', AccessToken], - **kwargs) -> None: + def __init__( + self, + endpoint: str, + account_id: str, + account_domain: str, + credential: Union[AzureKeyCredential, "TokenCredential", AccessToken], + **kwargs + ) -> None: - self._api_version = kwargs.pop( - "api_version", DEFAULT_VERSION - ) + self._api_version = kwargs.pop("api_version", DEFAULT_VERSION) validate_api_version(self._api_version) if not endpoint: @@ -88,7 +92,7 @@ def __init__(self, raise ValueError("credential cannot be None") self.polling_interval = kwargs.pop("polling_interval", 5) - endpoint_url = kwargs.pop('authentication_endpoint_url', construct_endpoint_url(account_domain)) + endpoint_url = kwargs.pop("authentication_endpoint_url", construct_endpoint_url(account_domain)) cred: Any @@ -100,16 +104,13 @@ def __init__(self, cred = credential pipeline_credential = get_mixedreality_credential( - account_id=account_id, - account_domain=account_domain, - credential=cred, - endpoint_url=endpoint_url) + account_id=account_id, account_domain=account_domain, credential=cred, endpoint_url=endpoint_url + ) if pipeline_credential is None: raise ValueError("credential is not of type TokenCredential, AzureKeyCredential or AccessToken") - authentication_policy = BearerTokenCredentialPolicy( - pipeline_credential, endpoint_url + '/.default') + authentication_policy = BearerTokenCredentialPolicy(pipeline_credential, endpoint_url + "/.default") self._account_id = account_id @@ -118,14 +119,17 @@ def __init__(self, authentication_policy=authentication_policy, sdk_moniker=SDK_MONIKER, api_version=self._api_version, - **kwargs) + **kwargs + ) @distributed_trace - def begin_asset_conversion(self, - conversion_id: str, - input_settings: AssetConversionInputSettings, - output_settings: AssetConversionOutputSettings, - **kwargs) -> LROPoller[AssetConversion]: + def begin_asset_conversion( + self, + conversion_id: str, + input_settings: AssetConversionInputSettings, + output_settings: AssetConversionOutputSettings, + **kwargs + ) -> LROPoller[AssetConversion]: """Start a new asset conversion with the given options. :param str conversion_id: @@ -146,17 +150,21 @@ def begin_asset_conversion(self, initial_state = self._client.remote_rendering.create_conversion( account_id=self._account_id, conversion_id=conversion_id, - body=CreateAssetConversionSettings(settings=AssetConversionSettings( - input_settings=input_settings, output_settings=output_settings)), - **kwargs) + body=CreateAssetConversionSettings( + settings=AssetConversionSettings(input_settings=input_settings, output_settings=output_settings) + ), + **kwargs + ) polling_method = ConversionPolling(account_id=self._account_id, polling_interval=polling_interval) deserialization_method: Callable[[Any], Any] = lambda _: None - return LROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return LROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace def get_asset_conversion(self, conversion_id: str, **kwargs) -> AssetConversion: @@ -169,11 +177,14 @@ def get_asset_conversion(self, conversion_id: str, **kwargs) -> AssetConversion: :raises ~azure.core.exceptions.HttpResponseError: """ return self._client.remote_rendering.get_conversion( - account_id=self._account_id, conversion_id=conversion_id, **kwargs) + account_id=self._account_id, conversion_id=conversion_id, **kwargs + ) @distributed_trace - def get_asset_conversion_poller(self, **kwargs) -> LROPoller[AssetConversion]: # pylint:disable=docstring-keyword-should-match-keyword-only - """Returns a poller for an existing conversion by conversion id or a continuation + def get_asset_conversion_poller( + self, **kwargs + ) -> LROPoller[AssetConversion]: # pylint:disable=docstring-keyword-should-match-keyword-only + """Returns a poller for an existing conversion by conversion id or a continuation token retrieved from a previous poller. :keyword str conversion_id: The conversion_id of a previously created conversion. @@ -183,36 +194,37 @@ def get_asset_conversion_poller(self, **kwargs) -> LROPoller[AssetConversion]: # :raises ~azure.core.exceptions.HttpResponseError: """ - conversion_id: Union[str,None] = kwargs.pop("conversion_id", None) - continuation_token: Union[str,None] = kwargs.pop("continuation_token", None) + conversion_id: Union[str, None] = kwargs.pop("conversion_id", None) + continuation_token: Union[str, None] = kwargs.pop("continuation_token", None) if conversion_id is None and continuation_token is None: - raise ValueError( - "Either conversion_id or continuation_token needs to be supplied.") + raise ValueError("Either conversion_id or continuation_token needs to be supplied.") if conversion_id is not None and continuation_token is not None: raise ValueError( - "Parameters conversion_id and continuation_token are mutual exclusive. Supply only one of the two.") + "Parameters conversion_id and continuation_token are mutual exclusive. Supply only one of the two." + ) polling_interval = kwargs.pop("polling_interval", self.polling_interval) polling_method = ConversionPolling(account_id=self._account_id, polling_interval=polling_interval) if continuation_token is not None: - return LROPoller.from_continuation_token(continuation_token=continuation_token, - polling_method=polling_method, - client=self._client) + return LROPoller.from_continuation_token( + continuation_token=continuation_token, polling_method=polling_method, client=self._client + ) if conversion_id is not None: initial_state = self._client.remote_rendering.get_conversion( - account_id=self._account_id, - conversion_id=conversion_id, - **kwargs) + account_id=self._account_id, conversion_id=conversion_id, **kwargs + ) deserialization_method: Callable[[Any], Any] = lambda _: None - return LROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return LROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace def list_asset_conversions(self, **kwargs) -> ItemPaged[AssetConversion]: @@ -222,14 +234,12 @@ def list_asset_conversions(self, **kwargs) -> ItemPaged[AssetConversion]: :raises ~azure.core.exceptions.HttpResponseError: :return: List of conversion for the remote rendering account. """ - return self._client.remote_rendering.list_conversions(account_id=self._account_id, **kwargs) # type: ignore + return self._client.remote_rendering.list_conversions(account_id=self._account_id, **kwargs) # type: ignore @distributed_trace - def begin_rendering_session(self, - session_id: str, - size: Union[str, RenderingSessionSize], - lease_time_minutes: int, - **kwargs) -> LROPoller[RenderingSession]: + def begin_rendering_session( + self, session_id: str, size: Union[str, RenderingSessionSize], lease_time_minutes: int, **kwargs + ) -> LROPoller[RenderingSession]: """ :param str session_id: An ID uniquely identifying the rendering session for the given account. The ID is case @@ -244,37 +254,35 @@ def begin_rendering_session(self, :rtype: LROPoller[RenderingSession] :raises ~azure.core.exceptions.HttpResponseError: """ - settings = CreateRenderingSessionSettings( - size=size, lease_time_minutes=lease_time_minutes) + settings = CreateRenderingSessionSettings(size=size, lease_time_minutes=lease_time_minutes) initial_state = self._client.remote_rendering.create_session( - account_id=self._account_id, - session_id=session_id, - body=settings, - **kwargs) + account_id=self._account_id, session_id=session_id, body=settings, **kwargs + ) polling_interval = kwargs.pop("polling_interval", self.polling_interval) polling_method = SessionPolling(account_id=self._account_id, polling_interval=polling_interval) deserialization_method: Callable[[Any], Any] = lambda _: None - return LROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return LROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace def get_rendering_session(self, session_id: str, **kwargs) -> RenderingSession: - '''Returns the properties of a previously generated rendering session. + """Returns the properties of a previously generated rendering session. :param str session_id: The identifier of the rendering session. :return: Properties of the rendering session :rtype: ~azure.mixedreality.remoterendering.models.RenderingSession :raises ~azure.core.exceptions.HttpResponseError: - ''' - return self._client.remote_rendering.get_session( - account_id=self._account_id, - session_id=session_id, - **kwargs) + """ + return self._client.remote_rendering.get_session(account_id=self._account_id, session_id=session_id, **kwargs) @distributed_trace - def get_rendering_session_poller(self, **kwargs) -> LROPoller[RenderingSession]: # pylint:disable=docstring-keyword-should-match-keyword-only + def get_rendering_session_poller( + self, **kwargs + ) -> LROPoller[RenderingSession]: # pylint:disable=docstring-keyword-should-match-keyword-only """Returns a poller for an existing rendering session by session id or a continuation token retrieved from a previous poller. @@ -285,36 +293,37 @@ def get_rendering_session_poller(self, **kwargs) -> LROPoller[RenderingSession]: :raises ~azure.core.exceptions.HttpResponseError: """ - session_id: Union[str,None] = kwargs.pop("session_id", None) - continuation_token: Union[str,None] = kwargs.pop("continuation_token", None) + session_id: Union[str, None] = kwargs.pop("session_id", None) + continuation_token: Union[str, None] = kwargs.pop("continuation_token", None) if session_id is None and continuation_token is None: - raise ValueError( - "Either session_id or continuation_token needs to be supplied.") + raise ValueError("Either session_id or continuation_token needs to be supplied.") if session_id is not None and continuation_token is not None: raise ValueError( - "Parameters session_id and continuation_token are mutual exclusive. Supply only one of the two.") + "Parameters session_id and continuation_token are mutual exclusive. Supply only one of the two." + ) polling_interval = kwargs.pop("polling_interval", self.polling_interval) if continuation_token is not None: polling_method = SessionPolling(account_id=self._account_id, polling_interval=polling_interval) - return LROPoller.from_continuation_token(continuation_token=continuation_token, - polling_method=polling_method, - client=self._client) + return LROPoller.from_continuation_token( + continuation_token=continuation_token, polling_method=polling_method, client=self._client + ) if session_id is not None: initial_state = self._client.remote_rendering.get_session( - account_id=self._account_id, - session_id=session_id, - **kwargs) + account_id=self._account_id, session_id=session_id, **kwargs + ) polling_method = SessionPolling(account_id=self._account_id, polling_interval=polling_interval) deserialization_method: Callable[[Any], Any] = lambda _: None - return LROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return LROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace def stop_rendering_session(self, session_id: str, **kwargs) -> None: @@ -325,11 +334,12 @@ def stop_rendering_session(self, session_id: str, **kwargs) -> None: :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - self._client.remote_rendering.stop_session( - account_id=self._account_id, session_id=session_id, **kwargs) + self._client.remote_rendering.stop_session(account_id=self._account_id, session_id=session_id, **kwargs) @distributed_trace - def update_rendering_session(self, session_id: str, **kwargs) -> RenderingSession: # pylint:disable=docstring-keyword-should-match-keyword-only + def update_rendering_session( + self, session_id: str, **kwargs + ) -> RenderingSession: # pylint:disable=docstring-keyword-should-match-keyword-only """Updates an already existing rendering session. :param str session_id: The identifier of the session to be updated. @@ -340,18 +350,17 @@ def update_rendering_session(self, session_id: str, **kwargs) -> RenderingSessio :raises ~azure.core.exceptions.HttpResponseError: """ - lease_time_minutes: Union[int,None] = kwargs.pop("lease_time_minutes", None) + lease_time_minutes: Union[int, None] = kwargs.pop("lease_time_minutes", None) if lease_time_minutes is not None: - return self._client.remote_rendering.update_session(account_id=self._account_id, - session_id=session_id, - body=UpdateSessionSettings( - lease_time_minutes=lease_time_minutes), - **kwargs) + return self._client.remote_rendering.update_session( + account_id=self._account_id, + session_id=session_id, + body=UpdateSessionSettings(lease_time_minutes=lease_time_minutes), + **kwargs + ) # if no param to update has been provided the unchanged session is returned - return self._client.remote_rendering.get_session(account_id=self._account_id, - session_id=session_id, - **kwargs) + return self._client.remote_rendering.get_session(account_id=self._account_id, session_id=session_id, **kwargs) @distributed_trace def list_rendering_sessions(self, **kwargs) -> ItemPaged[RenderingSession]: diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py index 3bf340e7caad..94d4bd5e9670 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py @@ -12,25 +12,20 @@ from .static_access_token_credential import StaticAccessTokenCredential + def get_mixedreality_credential( - account_id: str, - account_domain: str, - endpoint_url: str, - credential: AsyncTokenCredential, - **kwargs): + account_id: str, account_domain: str, endpoint_url: str, credential: AsyncTokenCredential, **kwargs +): if isinstance(credential, StaticAccessTokenCredential): return credential return MixedRealityTokenCredential( - account_id=account_id, - account_domain=account_domain, - endpoint_url=endpoint_url, - credential=credential, - **kwargs) + account_id=account_id, account_domain=account_domain, endpoint_url=endpoint_url, credential=credential, **kwargs + ) class MixedRealityTokenCredential(object): - """ Represents a token credential that can be used to access a Mixed Reality service. + """Represents a token credential that can be used to access a Mixed Reality service. This implements the TokenCredential protocol. :param str account_id: The Mixed Reality service account identifier. @@ -39,18 +34,15 @@ class MixedRealityTokenCredential(object): """ def __init__( - self, - account_id: str, - account_domain: str, - endpoint_url: str, - credential: AsyncTokenCredential, - **kwargs): + self, account_id: str, account_domain: str, endpoint_url: str, credential: AsyncTokenCredential, **kwargs + ): self.stsClient = MixedRealityStsClient( account_id=account_id, account_domain=account_domain, custom_endpoint_url=endpoint_url, credential=credential, - **kwargs) + **kwargs + ) async def get_token(self, *scopes: str, **kwargs: Any) -> AccessToken: # pylint: disable=unused-argument return await self.stsClient.get_token(**kwargs) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py index 21ab82a61b14..1e19ec360cad 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py @@ -9,12 +9,11 @@ from azure.core.credentials import AzureKeyCredential, AccessToken - ACCOUNT_KEY_VALID_YEARS = 10 class MixedRealityAccountKeyCredential(object): - """ Represents an object used for Mixed Reality account key authentication. + """Represents an object used for Mixed Reality account key authentication. :param str account_id: The Mixed Reality service account identifier. :param AzureKeyCredential account_key: The Mixed Reality service account primary or secondary key credential. diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py index 90de97090959..de44916d0bfb 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py @@ -7,8 +7,9 @@ from typing import Any from azure.core.credentials import AccessToken + class StaticAccessTokenCredential(object): - """ Represents a static access token credential. + """Represents a static access token credential. This implements the AsyncTokenCredential protocol. :param AccessToken access_token: An access token. @@ -19,9 +20,10 @@ def __init__(self, access_token: AccessToken): async def get_token( self, - #pylint: disable=unused-argument + # pylint: disable=unused-argument *scopes: str, - **kwargs: Any) -> AccessToken: + **kwargs: Any + ) -> AccessToken: return self._access_token async def close(self) -> None: diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py index e9374595a680..e096f330fcf2 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py @@ -4,5 +4,6 @@ # license information. # -------------------------------------------------------------------------- + def construct_endpoint_url(account_domain: str) -> str: - return 'https://sts.' + account_domain + return "https://sts." + account_domain diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py index 45ea040ea3f6..e8c7f19357fa 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py @@ -9,24 +9,20 @@ from azure.mixedreality.authentication import MixedRealityStsClient from .static_access_token_credential import StaticAccessTokenCredential -def get_mixedreality_credential(account_id: str, - account_domain: str, - endpoint_url: str, - credential: TokenCredential, - **kwargs) -> TokenCredential: + +def get_mixedreality_credential( + account_id: str, account_domain: str, endpoint_url: str, credential: TokenCredential, **kwargs +) -> TokenCredential: if isinstance(credential, StaticAccessTokenCredential): return credential return MixedRealityTokenCredential( - account_id=account_id, - account_domain=account_domain, - endpoint_url=endpoint_url, - credential=credential, - **kwargs) + account_id=account_id, account_domain=account_domain, endpoint_url=endpoint_url, credential=credential, **kwargs + ) class MixedRealityTokenCredential(object): - """ Represents a token credential that can be used to access a Mixed Reality service. + """Represents a token credential that can be used to access a Mixed Reality service. This implements the TokenCredential protocol. :param str account_id: The Mixed Reality service account identifier. @@ -34,17 +30,16 @@ class MixedRealityTokenCredential(object): :param TokenCredential credential: The credential used to access the Mixed Reality service. """ - def __init__(self, account_id: str, - account_domain: str, - endpoint_url: str, - credential: TokenCredential, - **kwargs) -> None: + def __init__( + self, account_id: str, account_domain: str, endpoint_url: str, credential: TokenCredential, **kwargs + ) -> None: self.stsClient = MixedRealityStsClient( account_id=account_id, account_domain=account_domain, custom_endpoint_url=endpoint_url, credential=credential, - **kwargs) + **kwargs + ) def get_token(self, *scopes: str, **kwargs) -> AccessToken: # pylint: disable=unused-argument return self.stsClient.get_token(**kwargs) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py index 99db94cccfd9..0a0053142ff7 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py @@ -10,8 +10,9 @@ ACCOUNT_KEY_VALID_YEARS = 10 + class MixedRealityAccountKeyCredential(object): - """ Represents an object used for Mixed Reality account key authentication. + """Represents an object used for Mixed Reality account key authentication. :param str account_id: The Mixed Reality service account identifier. :param AzureKeyCredential account_key: The Mixed Reality service account primary or secondary key credential. @@ -21,7 +22,7 @@ def __init__(self, account_id: str, account_key: AzureKeyCredential) -> None: self.account_id = account_id self.account_key = account_key - def get_token(self, *scopes: str, **kwargs) -> AccessToken: #pylint: disable=unused-argument + def get_token(self, *scopes: str, **kwargs) -> AccessToken: # pylint: disable=unused-argument token = self.account_id + ":" + self.account_key.key # No way to know when an account key might expire, so we'll set the @@ -31,6 +32,7 @@ def get_token(self, *scopes: str, **kwargs) -> AccessToken: #pylint: disable=unu return AccessToken(token, expiration_timestamp) + def _add_years(date_to_update, years): try: return date_to_update.replace(year=date_to_update.year + years) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py index 995f124e53a7..9b8794168d18 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py @@ -5,8 +5,9 @@ # -------------------------------------------------------------------------- from azure.core.credentials import AccessToken + class StaticAccessTokenCredential(object): - """ Represents a static access token credential. + """Represents a static access token credential. This implements the TokenCredential protocol. :param AccessToken access_token: An access token. @@ -15,5 +16,5 @@ class StaticAccessTokenCredential(object): def __init__(self, access_token: AccessToken) -> None: self._access_token = access_token - def get_token(self, *scopes: str, **kwargs) -> AccessToken: #pylint: disable=unused-argument + def get_token(self, *scopes: str, **kwargs) -> AccessToken: # pylint: disable=unused-argument return self._access_token diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py index 1f5e515d93c8..b34c04377aac 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py @@ -6,6 +6,4 @@ from ._remote_rendering_client_async import RemoteRenderingClient -__all__ = [ - 'RemoteRenderingClient' -] +__all__ = ["RemoteRenderingClient"] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py index 76d3685ed82b..9626cae94bb7 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py @@ -12,16 +12,13 @@ from azure.core.exceptions import HttpResponseError, ODataV4Format from .._generated.aio import RemoteRenderingRestClient -from .._generated.models import (AssetConversion, - AssetConversionStatus, - RenderingSession, - RenderingSessionStatus) +from .._generated.models import AssetConversion, AssetConversionStatus, RenderingSession, RenderingSessionStatus + class RemoteRenderingPollingAsync(AsyncPollingMethod): - """ABC class for remote rendering operations. - """ + """ABC class for remote rendering operations.""" - def __init__(self, account_id: str, is_terminated: Callable, polling_interval: int=5) -> None: + def __init__(self, account_id: str, is_terminated: Callable, polling_interval: int = 5) -> None: self._account_id = account_id self._response: Union[AssetConversion, RenderingSession, None] = None self._client: Union[RemoteRenderingRestClient, None] = None @@ -65,33 +62,31 @@ def resource(self) -> Union[AssetConversion, RenderingSession, None]: def get_continuation_token(self) -> str: # returns a Base64 encoded string of "::" - token_str = "1:"+self._account_id+":"+self._response.id # type: ignore - encoded = token_str.encode('ascii') + token_str = "1:" + self._account_id + ":" + self._response.id # type: ignore + encoded = token_str.encode("ascii") base64_endcoded = base64.b64encode(encoded) - return base64_endcoded.decode('ascii') + return base64_endcoded.decode("ascii") class ConversionPollingAsync(RemoteRenderingPollingAsync): - def __init__(self, account_id: str, polling_interval: int=5) -> None: + def __init__(self, account_id: str, polling_interval: int = 5) -> None: def is_terminated(status): - return status in [ - AssetConversionStatus.FAILED, - AssetConversionStatus.SUCCEEDED - ] - super(ConversionPollingAsync, self).__init__(account_id=account_id, - is_terminated=is_terminated, - polling_interval=polling_interval) - - def initialize(self, - client: RemoteRenderingRestClient, - initial_response: AssetConversion, - deserialization_callback: Callable) -> None: + return status in [AssetConversionStatus.FAILED, AssetConversionStatus.SUCCEEDED] + + super(ConversionPollingAsync, self).__init__( + account_id=account_id, is_terminated=is_terminated, polling_interval=polling_interval + ) + + def initialize( + self, client: RemoteRenderingRestClient, initial_response: AssetConversion, deserialization_callback: Callable + ) -> None: super().initialize(client, initial_response, deserialization_callback) if self._client is not None: self._query_status = partial( self._client.remote_rendering.get_conversion, account_id=self._account_id, - conversion_id=initial_response.id) + conversion_id=initial_response.id, + ) def status(self) -> str: if self._response is None: @@ -99,46 +94,46 @@ def status(self) -> str: return self._response.status @classmethod - async def initial_response_from_continuation_token(cls, - continuation_token: str, - client: RemoteRenderingRestClient, - **kwargs) -> AssetConversion: + async def initial_response_from_continuation_token( + cls, continuation_token: str, client: RemoteRenderingRestClient, **kwargs + ) -> AssetConversion: - version, account_id, conversion_id = base64.b64decode( - continuation_token.encode('ascii')).decode('ascii').split(":") + version, account_id, conversion_id = ( + base64.b64decode(continuation_token.encode("ascii")).decode("ascii").split(":") + ) if version != "1": raise ValueError("Cannot continue from continuation token from a different/newer client version.") initial_response = await client.remote_rendering.get_conversion( - account_id=account_id, - conversion_id=conversion_id, - **kwargs) + account_id=account_id, conversion_id=conversion_id, **kwargs + ) return initial_response class SessionPollingAsync(RemoteRenderingPollingAsync): - def __init__(self, account_id: str, polling_interval: int=2) -> None: + def __init__(self, account_id: str, polling_interval: int = 2) -> None: def is_terminated(status): return status in [ RenderingSessionStatus.EXPIRED, RenderingSessionStatus.ERROR, RenderingSessionStatus.STOPPED, - RenderingSessionStatus.READY + RenderingSessionStatus.READY, ] - super(SessionPollingAsync, self).__init__(account_id=account_id, - is_terminated=is_terminated, - polling_interval=polling_interval) - - def initialize(self, - client: RemoteRenderingRestClient, - initial_response: RenderingSession, - deserialization_callback: Callable) -> None: + + super(SessionPollingAsync, self).__init__( + account_id=account_id, is_terminated=is_terminated, polling_interval=polling_interval + ) + + def initialize( + self, client: RemoteRenderingRestClient, initial_response: RenderingSession, deserialization_callback: Callable + ) -> None: super().initialize(client, initial_response, deserialization_callback) if self._client is not None: self._query_status = partial( - self._client.remote_rendering.get_session, account_id=self._account_id, session_id=initial_response.id) + self._client.remote_rendering.get_session, account_id=self._account_id, session_id=initial_response.id + ) def status(self) -> str: if self._response is None: @@ -146,20 +141,19 @@ def status(self) -> str: return self._response.status @classmethod - async def initial_response_from_continuation_token(cls, - continuation_token: str, - client: RemoteRenderingRestClient, - **kwargs) -> RenderingSession: + async def initial_response_from_continuation_token( + cls, continuation_token: str, client: RemoteRenderingRestClient, **kwargs + ) -> RenderingSession: - version, account_id, session_id = base64.b64decode( - continuation_token.encode('ascii')).decode('ascii').split(":") + version, account_id, session_id = ( + base64.b64decode(continuation_token.encode("ascii")).decode("ascii").split(":") + ) if version != "1": raise ValueError("Cannot continue from continuation token from a different/newer client version.") initial_response = await client.remote_rendering.get_session( - account_id=account_id, - session_id=session_id, - **kwargs) + account_id=account_id, session_id=session_id, **kwargs + ) return initial_response diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py index fb271850caf0..7a4b3543c87f 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py @@ -17,23 +17,25 @@ from .._api_version import validate_api_version, DEFAULT_VERSION from .._generated.aio import RemoteRenderingRestClient -from .._generated.models import (AssetConversion, AssetConversionInputSettings, - AssetConversionOutputSettings, - AssetConversionSettings, - CreateAssetConversionSettings, - CreateRenderingSessionSettings, - RenderingSession, RenderingSessionSize, - UpdateSessionSettings) -from .._shared.aio.mixed_reality_token_credential import \ - get_mixedreality_credential -from .._shared.aio.mixedreality_account_key_credential import \ - MixedRealityAccountKeyCredential -from .._shared.aio.static_access_token_credential import \ - StaticAccessTokenCredential +from .._generated.models import ( + AssetConversion, + AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionSettings, + CreateAssetConversionSettings, + CreateRenderingSessionSettings, + RenderingSession, + RenderingSessionSize, + UpdateSessionSettings, +) +from .._shared.aio.mixed_reality_token_credential import get_mixedreality_credential +from .._shared.aio.mixedreality_account_key_credential import MixedRealityAccountKeyCredential +from .._shared.aio.static_access_token_credential import StaticAccessTokenCredential from .._shared.authentication_endpoint import construct_endpoint_url from .._version import SDK_MONIKER from ._polling_async import ConversionPollingAsync, SessionPollingAsync + class RemoteRenderingClient(object): """A client for the Azure Remote Rendering Service. @@ -67,16 +69,16 @@ class RemoteRenderingClient(object): :type authentication_endpoint_url: str """ - def __init__(self, - endpoint: str, - account_id: str, - account_domain: str, - credential: Union[AzureKeyCredential, 'AsyncTokenCredential', AccessToken], - **kwargs) -> None: + def __init__( + self, + endpoint: str, + account_id: str, + account_domain: str, + credential: Union[AzureKeyCredential, "AsyncTokenCredential", AccessToken], + **kwargs + ) -> None: - self._api_version = kwargs.pop( - "api_version", DEFAULT_VERSION - ) + self._api_version = kwargs.pop("api_version", DEFAULT_VERSION) validate_api_version(self._api_version) if not endpoint: @@ -92,7 +94,7 @@ def __init__(self, raise ValueError("credential cannot be None") self.polling_interval = kwargs.pop("polling_interval", 5) - endpoint_url = kwargs.pop('authentication_endpoint_url', construct_endpoint_url(account_domain)) + endpoint_url = kwargs.pop("authentication_endpoint_url", construct_endpoint_url(account_domain)) cred: Any @@ -104,16 +106,13 @@ def __init__(self, cred = credential pipeline_credential = get_mixedreality_credential( - account_id=account_id, - account_domain=account_domain, - credential=cred, - endpoint_url=endpoint_url) + account_id=account_id, account_domain=account_domain, credential=cred, endpoint_url=endpoint_url + ) if pipeline_credential is None: raise ValueError("credential is not of type TokenCredential, AzureKeyCredential or AccessToken") - authentication_policy = AsyncBearerTokenCredentialPolicy( - pipeline_credential, endpoint_url + '/.default') + authentication_policy = AsyncBearerTokenCredentialPolicy(pipeline_credential, endpoint_url + "/.default") self._account_id = account_id @@ -122,14 +121,17 @@ def __init__(self, authentication_policy=authentication_policy, sdk_moniker=SDK_MONIKER, api_version=self._api_version, - **kwargs) + **kwargs + ) @distributed_trace_async - async def begin_asset_conversion(self, - conversion_id: str, - input_settings: AssetConversionInputSettings, - output_settings: AssetConversionOutputSettings, - **kwargs) -> AsyncLROPoller[AssetConversion]: + async def begin_asset_conversion( + self, + conversion_id: str, + input_settings: AssetConversionInputSettings, + output_settings: AssetConversionOutputSettings, + **kwargs + ) -> AsyncLROPoller[AssetConversion]: """Start a new asset conversion with the given options. :param str conversion_id: @@ -146,17 +148,20 @@ async def begin_asset_conversion(self, polling_interval = kwargs.pop("polling_interval", self.polling_interval) polling_method = ConversionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) settings = AssetConversionSettings(input_settings=input_settings, output_settings=output_settings) - initial_state = await self._client.remote_rendering.create_conversion(account_id=self._account_id, - conversion_id=conversion_id, - body=CreateAssetConversionSettings( - settings=settings), - **kwargs) + initial_state = await self._client.remote_rendering.create_conversion( + account_id=self._account_id, + conversion_id=conversion_id, + body=CreateAssetConversionSettings(settings=settings), + **kwargs + ) deserialization_method: Callable[[Any], Any] = lambda _: None - return AsyncLROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return AsyncLROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace_async async def get_asset_conversion(self, conversion_id: str, **kwargs) -> AssetConversion: @@ -167,12 +172,14 @@ async def get_asset_conversion(self, conversion_id: str, **kwargs) -> AssetConve :return: Information about the ongoing conversion process. :rtype: ~azure.mixedreality.remoterendering.AssetConversion """ - return await self._client.remote_rendering.get_conversion(account_id=self._account_id, - conversion_id=conversion_id, - **kwargs) + return await self._client.remote_rendering.get_conversion( + account_id=self._account_id, conversion_id=conversion_id, **kwargs + ) @distributed_trace_async - async def get_asset_conversion_poller(self, **kwargs) -> AsyncLROPoller[AssetConversion]: # pylint:disable=docstring-keyword-should-match-keyword-only + async def get_asset_conversion_poller( + self, **kwargs + ) -> AsyncLROPoller[AssetConversion]: # pylint:disable=docstring-keyword-should-match-keyword-only """Returns a poller for an existing conversion by conversion id or a continuation token retrieved from a previous poller. @@ -182,36 +189,36 @@ async def get_asset_conversion_poller(self, **kwargs) -> AsyncLROPoller[AssetCon :rtype: ~azure.core.polling.AsyncLROPoller[AssetConversion] """ - conversion_id: Union[str,None] = kwargs.pop("conversion_id", None) - continuation_token: Union[str,None] = kwargs.pop("continuation_token", None) + conversion_id: Union[str, None] = kwargs.pop("conversion_id", None) + continuation_token: Union[str, None] = kwargs.pop("continuation_token", None) if conversion_id is None and continuation_token is None: - raise ValueError( - "Either conversion_id or continuation_token needs to be supplied.") + raise ValueError("Either conversion_id or continuation_token needs to be supplied.") if conversion_id is not None and continuation_token is not None: raise ValueError( - "Parameters conversion_id and continuation_token are mutual exclusive. Supply only one of the two.") + "Parameters conversion_id and continuation_token are mutual exclusive. Supply only one of the two." + ) polling_interval = kwargs.pop("polling_interval", self.polling_interval) polling_method = ConversionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) if continuation_token is not None: initial_state = await ConversionPollingAsync.initial_response_from_continuation_token( - continuation_token, - client=self._client, - **kwargs) + continuation_token, client=self._client, **kwargs + ) if conversion_id is not None: initial_state = await self._client.remote_rendering.get_conversion( - account_id=self._account_id, - conversion_id=conversion_id, - **kwargs) + account_id=self._account_id, conversion_id=conversion_id, **kwargs + ) deserialization_method: Callable[[Any], Any] = lambda _: None - return AsyncLROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return AsyncLROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace_async async def list_asset_conversions(self, **kwargs) -> AsyncItemPaged[AssetConversion]: @@ -220,14 +227,12 @@ async def list_asset_conversions(self, **kwargs) -> AsyncItemPaged[AssetConversi :rtype: AsyncItemPaged[AssetConversion] :return: List of conversions for the remote rendering account. """ - return self._client.remote_rendering.list_conversions(account_id=self._account_id, **kwargs) # type: ignore + return self._client.remote_rendering.list_conversions(account_id=self._account_id, **kwargs) # type: ignore @distributed_trace_async - async def begin_rendering_session(self, - session_id: str, - size: Union[str, RenderingSessionSize], - lease_time_minutes: int, - **kwargs) -> AsyncLROPoller[RenderingSession]: + async def begin_rendering_session( + self, session_id: str, size: Union[str, RenderingSessionSize], lease_time_minutes: int, **kwargs + ) -> AsyncLROPoller[RenderingSession]: """ :param session_id: An ID uniquely identifying the rendering session for the given account. The ID is case @@ -245,32 +250,34 @@ async def begin_rendering_session(self, """ polling_interval = kwargs.pop("polling_interval", self.polling_interval) polling_method = SessionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) - settings = CreateRenderingSessionSettings( - size=size, lease_time_minutes=lease_time_minutes) - initial_state = await self._client.remote_rendering.create_session(account_id=self._account_id, - session_id=session_id, - body=settings, - **kwargs) + settings = CreateRenderingSessionSettings(size=size, lease_time_minutes=lease_time_minutes) + initial_state = await self._client.remote_rendering.create_session( + account_id=self._account_id, session_id=session_id, body=settings, **kwargs + ) deserialization_method: Callable[[Any], Any] = lambda _: None - return AsyncLROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return AsyncLROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace_async async def get_rendering_session(self, session_id: str, **kwargs) -> RenderingSession: - '''Returns the properties of a previously generated rendering session. + """Returns the properties of a previously generated rendering session. :param str session_id: The identifier of the rendering session. :return: Properties of the rendering session :rtype: ~azure.mixedreality.remoterendering.RenderingSession - ''' + """ return await self._client.remote_rendering.get_session(self._account_id, session_id=session_id, **kwargs) @distributed_trace_async - async def get_rendering_session_poller(self, **kwargs) -> AsyncLROPoller[RenderingSession]: # pylint:disable=docstring-keyword-should-match-keyword-only + async def get_rendering_session_poller( + self, **kwargs + ) -> AsyncLROPoller[RenderingSession]: # pylint:disable=docstring-keyword-should-match-keyword-only """Returns a poller for an existing rendering session by session id or a continuation token retrieved from a previous poller. @@ -280,38 +287,41 @@ async def get_rendering_session_poller(self, **kwargs) -> AsyncLROPoller[Renderi :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mixedreality.remoterendering.RenderingSession] """ - session_id: Union[str,None] = kwargs.pop("session_id", None) - continuation_token: Union[str,None] = kwargs.pop("continuation_token", None) + session_id: Union[str, None] = kwargs.pop("session_id", None) + continuation_token: Union[str, None] = kwargs.pop("continuation_token", None) if session_id is None and continuation_token is None: - raise ValueError( - "Either session_id or continuation_token needs to be supplied.") + raise ValueError("Either session_id or continuation_token needs to be supplied.") if session_id is not None and continuation_token is not None: raise ValueError( - "Parameters session_id and continuation_token are mutual exclusive. Supply only one of the two.") + "Parameters session_id and continuation_token are mutual exclusive. Supply only one of the two." + ) polling_interval = kwargs.pop("polling_interval", self.polling_interval) polling_method = SessionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) if continuation_token is not None: initial_state = await SessionPollingAsync.initial_response_from_continuation_token( - continuation_token=continuation_token, - client=self._client, **kwargs) + continuation_token=continuation_token, client=self._client, **kwargs + ) if session_id is not None: initial_state = await self._client.remote_rendering.get_session( - account_id=self._account_id, - session_id=session_id, - **kwargs) + account_id=self._account_id, session_id=session_id, **kwargs + ) deserialization_method: Callable[[Any], Any] = lambda _: None - return AsyncLROPoller(client=self._client, - initial_response=initial_state, - deserialization_callback=deserialization_method, - polling_method=polling_method) + return AsyncLROPoller( + client=self._client, + initial_response=initial_state, + deserialization_callback=deserialization_method, + polling_method=polling_method, + ) @distributed_trace_async - async def update_rendering_session(self, session_id: str, **kwargs) -> RenderingSession: # pylint:disable=docstring-keyword-should-match-keyword-only + async def update_rendering_session( + self, session_id: str, **kwargs + ) -> RenderingSession: # pylint:disable=docstring-keyword-should-match-keyword-only """Updates an already existing rendering session. :param str session_id: The identifier of the session to be updated. @@ -321,13 +331,14 @@ async def update_rendering_session(self, session_id: str, **kwargs) -> Rendering :rtype: ~azure.mixedreality.remoterendering.models.RenderingSession :raises ~azure.core.exceptions.HttpResponseError: """ - lease_time_minutes: Union[int,None] = kwargs.pop("lease_time_minutes", None) + lease_time_minutes: Union[int, None] = kwargs.pop("lease_time_minutes", None) if lease_time_minutes is not None: - return await self._client.remote_rendering.update_session(account_id=self._account_id, - session_id=session_id, - body=UpdateSessionSettings( - lease_time_minutes=lease_time_minutes), - **kwargs) + return await self._client.remote_rendering.update_session( + account_id=self._account_id, + session_id=session_id, + body=UpdateSessionSettings(lease_time_minutes=lease_time_minutes), + **kwargs + ) # if no param to update has been provided the unchanged session is returned return await self._client.remote_rendering.get_session(self._account_id, session_id=session_id, **kwargs) @@ -340,21 +351,19 @@ async def stop_rendering_session(self, session_id: str, **kwargs) -> None: :return: None :rtype: None """ - return await self._client.remote_rendering.stop_session(account_id=self._account_id, - session_id=session_id, - **kwargs) + return await self._client.remote_rendering.stop_session( + account_id=self._account_id, session_id=session_id, **kwargs + ) @distributed_trace_async - async def list_rendering_sessions( - self, - **kwargs) -> AsyncItemPaged[RenderingSession]: + async def list_rendering_sessions(self, **kwargs) -> AsyncItemPaged[RenderingSession]: """Returns list of rendering sessions in the 'Ready' or 'Starting' state. Does not return stopped or failed rendering sessions. :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mixedreality.remoterendering.RenderingSession] :return: List of rendering sessions in the 'Ready' or 'Starting' state. """ - return self._client.remote_rendering.list_sessions(account_id=self._account_id, **kwargs) # type: ignore + return self._client.remote_rendering.list_sessions(account_id=self._account_id, **kwargs) # type: ignore async def close(self) -> None: await self._client.close() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py index 20cc52d96d0b..53368a43032e 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py @@ -32,14 +32,16 @@ from azure.core.credentials import AzureKeyCredential, AccessToken, TokenCredential from azure.core.pipeline.policies import NetworkTraceLoggingPolicy from azure.mixedreality.authentication import MixedRealityStsClient -from azure.mixedreality.remoterendering import (AssetConversion, - AssetConversionInputSettings, - AssetConversionOutputSettings, - AssetConversionStatus, - RemoteRenderingClient, - RenderingSessionSize, - RenderingSessionStatus, - AssetConversionOutput) +from azure.mixedreality.remoterendering import ( + AssetConversion, + AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + RemoteRenderingClient, + RenderingSessionSize, + RenderingSessionStatus, + AssetConversionOutput, +) # Create a logger for the 'azure' SDK logger = logging.getLogger("azure") @@ -97,7 +99,7 @@ account_id=account_id, account_domain=account_domain, credential=key_credential, - logging_policy=logging_policy + logging_policy=logging_policy, ) @@ -120,14 +122,14 @@ def perform_asset_conversion(): output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, # Note: different input/output containers can be specified - blob_prefix="output/"+conversion_id, + blob_prefix="output/" + conversion_id, # output_asset_filename= convertedAsset.arrAsset # if not specified the output will be ".arrAsset". # container_write_sas #if storage is not linked with the ARR account provide a SAS here to grant access. ) - conversion_poller = client.begin_asset_conversion(conversion_id=conversion_id, - input_settings=input_settings, - output_settings=output_settings) + conversion_poller = client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) print("conversion with id:", conversion_id, "created. Waiting for completion.") conversion = conversion_poller.result() @@ -170,11 +172,21 @@ def demonstrate_rendering_session_lifecycle(): session_id = str(uuid.uuid4()) print("starting rendering session with id:", session_id) session_poller = client.begin_rendering_session( - session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=5) - print("rendering session with id:", session_id, "created. Waiting for session to be ready.",) + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=5 + ) + print( + "rendering session with id:", + session_id, + "created. Waiting for session to be ready.", + ) session = session_poller.result() - print("session with id:", session.id, "is ready. lease_time_minutes:", session.lease_time_minutes,) + print( + "session with id:", + session.id, + "is ready. lease_time_minutes:", + session.lease_time_minutes, + ) # a poller can also be acquired by a id if a session already exists # id_poller = client.get_rendering_session_poller(session_id=session_id) @@ -191,8 +203,15 @@ def demonstrate_rendering_session_lifecycle(): session = client.get_rendering_session(session_id) if cast(int, session.lease_time_minutes) - cast(int, session.elapsed_time_minutes) < 2: session = client.update_rendering_session( - session_id=session_id, lease_time_minutes=cast(int, session.lease_time_minutes) + 10) - print("session with id:", session.id, "updated. New lease time:", session.lease_time_minutes, "minutes",) + session_id=session_id, lease_time_minutes=cast(int, session.lease_time_minutes) + 10 + ) + print( + "session with id:", + session.id, + "updated. New lease time:", + session.lease_time_minutes, + "minutes", + ) # once we do not need the session anymore we can stop the session client.stop_rendering_session(session_id) @@ -207,7 +226,14 @@ def list_all_rendering_sessions(): rendering_sessions = client.list_rendering_sessions() for session in rendering_sessions: created_on = cast(datetime, session.created_on).strftime("%m/%d/%Y, %H:%M:%S") - print("\t session: id:", session.id, "status:", session.status, "created on:", created_on,) + print( + "\t session: id:", + session.id, + "status:", + session.status, + "created on:", + created_on, + ) if __name__ == "__main__": diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py index a30ec141f1c6..f3a54131bf4b 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py @@ -8,7 +8,7 @@ FILE: remote_rendering_client_sample_async.py DESCRIPTION: These samples demonstrate creating a remote rendering client, converting an asset into the format used in rendering - sessions, listing created asset conversions, starting a rendering session, extending the lifetime of a rendering + sessions, listing created asset conversions, starting a rendering session, extending the lifetime of a rendering session, stopping a rendering session and listing rendering sessions. USAGE: @@ -33,13 +33,15 @@ from azure.core.async_paging import AsyncItemPaged from azure.core.credentials import AzureKeyCredential from azure.core.pipeline import policies -from azure.mixedreality.remoterendering import (AssetConversionInputSettings, - AssetConversionOutputSettings, - AssetConversionStatus, - AssetConversionOutput, - RenderingSession, - RenderingSessionSize, - RenderingSessionStatus) +from azure.mixedreality.remoterendering import ( + AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + AssetConversionOutput, + RenderingSession, + RenderingSessionSize, + RenderingSessionStatus, +) from azure.mixedreality.remoterendering.aio import RemoteRenderingClient # Create a logger for the 'azure' SDK @@ -98,7 +100,7 @@ account_id=account_id, account_domain=account_domain, credential=key_credential, - logging_policy=logging_policy + logging_policy=logging_policy, ) @@ -121,14 +123,14 @@ async def perform_asset_conversion(): output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, # Note: different input/output containers can be specified - blob_prefix="output/"+conversion_id, + blob_prefix="output/" + conversion_id, # output_asset_filename= convertedAsset.arrAsset # if not specified the output will be ".arrAsset". # container_write_sas #if storage is not linked with the ARR account provide a SAS here to grant access. ) - conversion_poller = await client.begin_asset_conversion(conversion_id=conversion_id, - input_settings=input_settings, - output_settings=output_settings) + conversion_poller = await client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) print("conversion with id:", conversion_id, "created. Waiting for completion.") conversion = await conversion_poller.result() @@ -171,7 +173,8 @@ async def demonstrate_rendering_session_lifecycle(): session_id = str(uuid.uuid4()) print("starting rendering session with id:", session_id) session_poller = await client.begin_rendering_session( - session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=5) + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=5 + ) print("rendering session with id:", session_id, "created. Waiting for session to be ready.") session = await session_poller.result() @@ -192,7 +195,8 @@ async def demonstrate_rendering_session_lifecycle(): session = await client.get_rendering_session(session_id) if cast(int, session.lease_time_minutes) - cast(int, session.elapsed_time_minutes) < 2: session = await client.update_rendering_session( - session_id=session_id, lease_time_minutes=cast(int, session.lease_time_minutes) + 10) + session_id=session_id, lease_time_minutes=cast(int, session.lease_time_minutes) + 10 + ) print("session with id:", session.id, "updated. New lease time:", session.lease_time_minutes, "minutes") # once we do not need the session anymore we can stop the session @@ -207,8 +211,14 @@ async def list_all_rendering_sessions(): print("sessions:") rendering_sessions = await client.list_rendering_sessions() async for session in rendering_sessions: - print("\t session: id:", session.id, "status:", session.status, - "created on:", cast(datetime, session.created_on).strftime("%m/%d/%Y, %H:%M:%S")) + print( + "\t session: id:", + session.id, + "status:", + session.status, + "created on:", + cast(datetime, session.created_on).strftime("%m/%d/%Y, %H:%M:%S"), + ) async def main(): @@ -218,5 +228,6 @@ async def main(): await demonstrate_rendering_session_lifecycle() await list_all_rendering_sessions() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py b/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py index ac72a896b9a2..bea6a012b97c 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py @@ -7,18 +7,17 @@ PACKAGE_PPRINT_NAME = "Azure Remote Rendering" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: long_description = f.read() with open("CHANGELOG.md", encoding="utf-8") as f: @@ -27,48 +26,43 @@ setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format( - PACKAGE_PPRINT_NAME), - + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), # ensure that these are updated to reflect the package owners' information long_description=long_description, - long_description_content_type='text/markdown', - url='https://github.com/Azure/azure-sdk-for-python', + long_description_content_type="text/markdown", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", - author='Microsoft Corporation', - author_email='azuresdkengsysadmins@microsoft.com', - - license='MIT License', + author="Microsoft Corporation", + author_email="azuresdkengsysadmins@microsoft.com", + license="MIT License", # ensure that the development status reflects the status of your package classifiers=[ "Development Status :: 7 - Inactive", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mixedreality' - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mixedreality", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.7", - install_requires=[ - 'azure-core<2.0.0,>=1.26.0', - 'azure-mixedreality-authentication>=1.0.0b1', - 'msrest>=0.6.21' - ], + install_requires=["azure-core<2.0.0,>=1.26.0", "azure-mixedreality-authentication>=1.0.0b1", "msrest>=0.6.21"], project_urls={ - 'Bug Reports': 'https://github.com/Azure/azure-sdk-for-python/issues', - 'Source': 'https://github.com/Azure/azure-sdk-for-python', - } + "Bug Reports": "https://github.com/Azure/azure-sdk-for-python/issues", + "Source": "https://github.com/Azure/azure-sdk-for-python", + }, ) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py index 0a85f14d4b50..1cc621eb4dc3 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py @@ -49,15 +49,12 @@ def add_sanitizers(test_proxy, environment_variables): ENV_ARR_STORAGE_ACCOUNT_NAME: TEST_ARR_STORAGE_ACCOUNT_NAME, ENV_ARR_SAS_TOKEN: TEST_ARR_SAS_TOKEN, ENV_ARR_BLOB_CONTAINER_NAME: TEST_ARR_BLOB_CONTAINER_NAME, - ENV_STORAGE_ENDPOINT_SUFFIX: TEST_STORAGE_ENDPOINT_SUFFIX + ENV_STORAGE_ENDPOINT_SUFFIX: TEST_STORAGE_ENDPOINT_SUFFIX, } environment_variables.sanitize_batch(sanitization_mapping) add_remove_header_sanitizer(headers="X-MRC-CV") add_body_key_sanitizer(json_path="AccessToken", value="fake.eyJleHAiOjIxNDc0ODM2NDd9.fake") - add_general_regex_sanitizer( - regex=f"{TEST_ID_PLACEHOLDER}[a-z0-9-]+", - value=TEST_ID_PLACEHOLDER - ) + add_general_regex_sanitizer(regex=f"{TEST_ID_PLACEHOLDER}[a-z0-9-]+", value=TEST_ID_PLACEHOLDER) # Remove the following sanitizers since certain fields are needed in tests and are non-sensitive: # - AZSDK3430: $..id @@ -76,7 +73,7 @@ def account_info(environment_variables): "blob_container_name": environment_variables.get(ENV_ARR_BLOB_CONTAINER_NAME), "storage_endpoint_suffix": environment_variables.get(ENV_STORAGE_ENDPOINT_SUFFIX), "key_credential": AzureKeyCredential(environment_variables.get(ENV_ARR_ACCOUNT_KEY)), - "id_placeholder": TEST_ID_PLACEHOLDER + "id_placeholder": TEST_ID_PLACEHOLDER, } @@ -91,7 +88,7 @@ def arr_client(account_info): account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - polling_interval=polling_interval + polling_interval=polling_interval, ) yield client client.close() @@ -105,7 +102,7 @@ async def async_arr_client(account_info): account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - polling_interval=polling_interval + polling_interval=polling_interval, ) yield client await client.close() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py index 51ef104c5794..70f6ad0058ee 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py @@ -9,12 +9,14 @@ from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import HttpResponseError -from azure.mixedreality.remoterendering import (AssetConversionInputSettings, - AssetConversionOutputSettings, - AssetConversionStatus, - RemoteRenderingClient, - RenderingSessionSize, - RenderingSessionStatus) +from azure.mixedreality.remoterendering import ( + AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + RemoteRenderingClient, + RenderingSessionSize, + RenderingSessionStatus, +) from devtools_testutils import AzureRecordedTestCase @@ -25,7 +27,7 @@ def test_create_client(self, account_info): endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"] + credential=account_info["key_credential"], ) assert client is not None @@ -35,28 +37,32 @@ def test_create_client_with_invalid_arguments(self, account_info): endpoint=None, account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): RemoteRenderingClient( endpoint=account_info["service_endpoint"], account_id=None, account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): RemoteRenderingClient( endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=None, - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): RemoteRenderingClient( endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=None) + credential=None, + ) with pytest.raises(ValueError): RemoteRenderingClient( @@ -64,32 +70,39 @@ def test_create_client_with_invalid_arguments(self, account_info): account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - authentication_endpoint_url="#") + authentication_endpoint_url="#", + ) def test_simple_conversion(self, recorded_test, account_info, arr_client): conversion_id = account_info["id_placeholder"] if self.is_live: conversion_id += str(uuid.uuid4()) - + print("Using conversion id: {}".format(conversion_id)) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBox.fbx", blob_prefix="Input", - storage_container_read_list_sas="?"+account_info["sas_token"] + storage_container_read_list_sas="?" + account_info["sas_token"], ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, blob_prefix=conversion_id, - storage_container_write_sas="?"+account_info["sas_token"] + storage_container_write_sas="?" + account_info["sas_token"], ) conversion_poller = arr_client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) conversion = arr_client.get_asset_conversion(conversion_id) @@ -100,14 +113,17 @@ def test_simple_conversion(self, recorded_test, account_info, arr_client): finished_conversion = conversion_poller.result() assert finished_conversion.id == conversion_id - assert finished_conversion.settings.input_settings.relative_input_asset_path == input_settings.relative_input_asset_path + assert ( + finished_conversion.settings.input_settings.relative_input_asset_path + == input_settings.relative_input_asset_path + ) assert finished_conversion.status == AssetConversionStatus.SUCCEEDED - finished_conversion.output.asset_uri.endswith(conversion_id+"/testBox.arrAsset") + finished_conversion.output.asset_uri.endswith(conversion_id + "/testBox.arrAsset") foundConversion = False conversions = arr_client.list_asset_conversions() for c in conversions: - if(c.id == conversion_id): + if c.id == conversion_id: foundConversion = True break assert foundConversion == True @@ -117,34 +133,40 @@ def test_failed_conversion_unauthorized(self, recorded_test, account_info): endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=AzureKeyCredential("wrong_key") + credential=AzureKeyCredential("wrong_key"), ) conversion_id = account_info["id_placeholder"] if self.is_live: conversion_id += str(uuid.uuid4()) - + print("Using conversion id: {}".format(conversion_id)) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBox.fbx", - blob_prefix="Input" + blob_prefix="Input", # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, - blob_prefix=conversion_id + blob_prefix=conversion_id, # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) with pytest.raises(HttpResponseError) as excinfo: # make the request which cannot access the storage account conversion_poller = client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) exception = excinfo.value @@ -156,25 +178,31 @@ def test_failed_conversion_no_access(self, recorded_test, account_info, arr_clie if self.is_live: conversion_id += str(uuid.uuid4()) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBox.fbx", - blob_prefix="Input" + blob_prefix="Input", # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, - blob_prefix=conversion_id + blob_prefix=conversion_id, # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) with pytest.raises(HttpResponseError) as excinfo: # make the request which cannot access the storage account conversion_poller = arr_client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) assert excinfo.value.status_code == 403 @@ -189,25 +217,32 @@ def test_failed_conversion_missing_asset(self, recorded_test, account_info, arr_ print("Using conversion id: {}".format(conversion_id)) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBoxWhichDoesNotExist.fbx", blob_prefix="Input", - storage_container_read_list_sas="?"+account_info["sas_token"] + storage_container_read_list_sas="?" + account_info["sas_token"], ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, blob_prefix=conversion_id, - storage_container_write_sas="?"+account_info["sas_token"] + storage_container_write_sas="?" + account_info["sas_token"], ) with pytest.raises(HttpResponseError) as excinfo: # make the request which fails in polling because of the missing asset conversion_poller = arr_client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings) + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) conversion_poller.result() error_details = excinfo.value @@ -227,7 +262,8 @@ def test_simple_session(self, recorded_test, account_info, arr_client): print("Using session id: {}".format(session_id)) session_poller = arr_client.begin_rendering_session( - session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=15) + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=15 + ) session = arr_client.get_rendering_session(session_id) assert session.id == session_id @@ -244,7 +280,7 @@ def test_simple_session(self, recorded_test, account_info, arr_client): assert ready_session.arr_inspector_port is not None assert ready_session.handshake_port is not None - extended_session = arr_client.update_rendering_session(session_id=session_id, lease_time_minutes=20) + extended_session = arr_client.update_rendering_session(session_id=session_id, lease_time_minutes=20) assert extended_session.id == session_id assert extended_session.lease_time_minutes == 15 or extended_session.lease_time_minutes == 20 assert extended_session.status == RenderingSessionStatus.READY @@ -264,13 +300,14 @@ def test_failed_session_request(self, recorded_test, account_info, arr_client): session_id = account_info["id_placeholder"] if self.is_live: session_id += str(uuid.uuid4()) - + print("Using session id: {}".format(session_id)) with pytest.raises(HttpResponseError) as excinfo: # Make an invalid request (negative lease time). session_poller = arr_client.begin_rendering_session( - session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=-4) + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=-4 + ) assert excinfo.value.status_code == 400 exception = excinfo.value diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py index d65d2c38a444..fc304128d5f3 100644 --- a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py @@ -14,7 +14,7 @@ AssetConversionOutputSettings, AssetConversionStatus, RenderingSessionSize, - RenderingSessionStatus + RenderingSessionStatus, ) from devtools_testutils import AzureRecordedTestCase @@ -27,7 +27,7 @@ def test_create_client(self, account_info): endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"] + credential=account_info["key_credential"], ) assert client is not None @@ -37,28 +37,32 @@ def test_create_client_with_invalid_arguments(self, account_info): endpoint=None, account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): RemoteRenderingClient( endpoint=account_info["service_endpoint"], account_id=None, account_domain=account_info["account_domain"], - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): RemoteRenderingClient( endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=None, - credential=account_info["key_credential"]) + credential=account_info["key_credential"], + ) with pytest.raises(ValueError): RemoteRenderingClient( endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=None) + credential=None, + ) with pytest.raises(ValueError): RemoteRenderingClient( @@ -66,7 +70,8 @@ def test_create_client_with_invalid_arguments(self, account_info): account_id=account_info["account_id"], account_domain=account_info["account_domain"], credential=account_info["key_credential"], - authentication_endpoint_url="#") + authentication_endpoint_url="#", + ) @pytest.mark.asyncio async def test_simple_conversion(self, recorded_test, account_info, async_arr_client): @@ -74,23 +79,29 @@ async def test_simple_conversion(self, recorded_test, account_info, async_arr_cl if self.is_live: conversion_id += str(uuid.uuid4()) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBox.fbx", blob_prefix="Input", - storage_container_read_list_sas="?"+account_info["sas_token"] + storage_container_read_list_sas="?" + account_info["sas_token"], ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, blob_prefix=conversion_id, - storage_container_write_sas="?"+account_info["sas_token"] + storage_container_write_sas="?" + account_info["sas_token"], ) conversion_poller = await async_arr_client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) conversion = await async_arr_client.get_asset_conversion(conversion_id) @@ -101,14 +112,17 @@ async def test_simple_conversion(self, recorded_test, account_info, async_arr_cl finished_conversion = await conversion_poller.result() assert finished_conversion.id == conversion_id - assert finished_conversion.settings.input_settings.relative_input_asset_path == input_settings.relative_input_asset_path + assert ( + finished_conversion.settings.input_settings.relative_input_asset_path + == input_settings.relative_input_asset_path + ) assert finished_conversion.status == AssetConversionStatus.SUCCEEDED - finished_conversion.output.asset_uri.endswith(conversion_id+"/testBox.arrAsset") + finished_conversion.output.asset_uri.endswith(conversion_id + "/testBox.arrAsset") foundConversion = False conversions = await async_arr_client.list_asset_conversions() async for c in conversions: - if(c.id == conversion_id): + if c.id == conversion_id: foundConversion = True break assert foundConversion == True @@ -119,32 +133,38 @@ async def test_failed_conversion_unauthorized(self, recorded_test, account_info) endpoint=account_info["service_endpoint"], account_id=account_info["account_id"], account_domain=account_info["account_domain"], - credential=AzureKeyCredential("wrong_key") + credential=AzureKeyCredential("wrong_key"), ) conversion_id = account_info["id_placeholder"] if self.is_live: conversion_id += str(uuid.uuid4()) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBox.fbx", - blob_prefix="Input" + blob_prefix="Input", # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, - blob_prefix=conversion_id + blob_prefix=conversion_id, # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) with pytest.raises(HttpResponseError) as excinfo: # make the request which cannot access the storage account conversion_poller = await client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) exception = excinfo.value @@ -157,25 +177,31 @@ async def test_failed_conversion_no_access(self, recorded_test, account_info, as if self.is_live: conversion_id += str(uuid.uuid4()) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBox.fbx", - blob_prefix="Input" + blob_prefix="Input", # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, - blob_prefix=conversion_id + blob_prefix=conversion_id, # Do not provide SAS access to the container, and assume the test account is not linked to the storage. ) with pytest.raises(HttpResponseError) as excinfo: # make the request which cannot access the storage account conversion_poller = await async_arr_client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) assert excinfo.value.status_code == 403 @@ -189,23 +215,29 @@ async def test_failed_conversion_missing_asset(self, recorded_test, account_info if self.is_live: conversion_id += str(uuid.uuid4()) - storage_container_uri = "https://"+account_info["storage_account_name"] + \ - ".blob."+account_info["storage_endpoint_suffix"]+"/"+account_info["blob_container_name"] + storage_container_uri = ( + "https://" + + account_info["storage_account_name"] + + ".blob." + + account_info["storage_endpoint_suffix"] + + "/" + + account_info["blob_container_name"] + ) input_settings = AssetConversionInputSettings( storage_container_uri=storage_container_uri, relative_input_asset_path="testBoxWhichDoesNotExist.fbx", blob_prefix="Input", - storage_container_read_list_sas="?"+account_info["sas_token"] + storage_container_read_list_sas="?" + account_info["sas_token"], ) output_settings = AssetConversionOutputSettings( storage_container_uri=storage_container_uri, blob_prefix=conversion_id, - storage_container_write_sas="?"+account_info["sas_token"] + storage_container_write_sas="?" + account_info["sas_token"], ) with pytest.raises(HttpResponseError) as excinfo: conversion_poller = await async_arr_client.begin_asset_conversion( - conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings ) await conversion_poller.result() @@ -222,7 +254,8 @@ async def test_simple_session(self, recorded_test, account_info, async_arr_clien session_id += str(uuid.uuid4()) session_poller = await async_arr_client.begin_rendering_session( - session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=15) + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=15 + ) session = await async_arr_client.get_rendering_session(session_id) assert session.id == session_id @@ -264,7 +297,8 @@ async def test_failed_session_request(self, recorded_test, account_info, async_a with pytest.raises(HttpResponseError) as excinfo: # Make an invalid request (negative lease time). session_poller = await async_arr_client.begin_rendering_session( - session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=-4) + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=-4 + ) assert excinfo.value.status_code == 400 exception = excinfo.value diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_patch.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_patch.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/_patch.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/_patch.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/operations/_patch.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/operations/_patch.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_patch.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_patch.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_patch.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_patch.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/reservations/azure-mgmt-reservations/setup.py b/sdk/reservations/azure-mgmt-reservations/setup.py index 7aaa79b31161..4c90d3d22453 100644 --- a/sdk/reservations/azure-mgmt-reservations/setup.py +++ b/sdk/reservations/azure-mgmt-reservations/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Reservations" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/reservations/azure-mgmt-reservations/tests/test_mgmt_reservations.py b/sdk/reservations/azure-mgmt-reservations/tests/test_mgmt_reservations.py index 6d2f7835f487..1f1ca82af642 100644 --- a/sdk/reservations/azure-mgmt-reservations/tests/test_mgmt_reservations.py +++ b/sdk/reservations/azure-mgmt-reservations/tests/test_mgmt_reservations.py @@ -3,17 +3,13 @@ from azure.mgmt.reservations import AzureReservationAPI from azure.mgmt.reservations.models import * from devtools_testutils import AzureMgmtRecordedTestCase -from azure.mgmt.reservations.models import ( - ReservedResourceType, - InstanceFlexibility, - AppliedScopeType -) +from azure.mgmt.reservations.models import ReservedResourceType, InstanceFlexibility, AppliedScopeType import unittest - # change the custom endpoint to set the environment _CUSTOM_ENDPOINT = "https://api-dogfood.resources.windows-int.net/" + @pytest.mark.skip("skip test") class TestMgmtReservations(AzureMgmtRecordedTestCase): @@ -55,7 +51,8 @@ def _create_purchase_request(self): display_name="TestPythonPurchase", applied_scope_type="Single", applied_scopes=["/subscriptions/{}".format(self.settings.SUBSCRIPTION_ID)], - reserved_resource_properties=PurchaseRequestPropertiesReservedResourceProperties(instance_flexibility="On")) + reserved_resource_properties=PurchaseRequestPropertiesReservedResourceProperties(instance_flexibility="On"), + ) def _calculate_reservation_order(self): purchase_request = self._create_purchase_request() @@ -78,13 +75,19 @@ def _test_reservation_get(self, reservation_order_id, reservation_id): self._validate_reservation(reservation) def _test_update_reservation_to_shared(self, reservation_order_id, reservation_id): - patch = Patch(applied_scope_type=AppliedScopeType.shared, applied_scopes=None, instance_flexibility=InstanceFlexibility.on) + patch = Patch( + applied_scope_type=AppliedScopeType.shared, applied_scopes=None, instance_flexibility=InstanceFlexibility.on + ) reservation = self.reservation_client.reservation.update(reservation_order_id, reservation_id, patch).result() self._validate_reservation(reservation) def _test_update_reservation_to_single(self, reservation_order_id, reservation_id): scope = ["/subscriptions/{}".format(self.settings.SUBSCRIPTION_ID)] - patch = Patch(applied_scope_type=AppliedScopeType.single, applied_scopes=scope, instance_flexibility=InstanceFlexibility.on) + patch = Patch( + applied_scope_type=AppliedScopeType.single, + applied_scopes=scope, + instance_flexibility=InstanceFlexibility.on, + ) reservation = self.reservation_client.reservation.update(reservation_order_id, reservation_id, patch).result() self._validate_reservation(reservation) @@ -93,9 +96,13 @@ def _test_split(self, reservation_order_id, reservation_id): for reservation in reservation_list: if "Succeeded" in reservation.properties.provisioning_state: reservation_to_update = reservation - split_reservation_id = reservation_to_update.id.split('/')[6] - reservation_id = "/providers/Microsoft.Capacity/reservationOrders/{}/reservations/{}".format(reservation_order_id, split_reservation_id) - split_response = self.reservation_client.reservation.split(reservation_order_id, [1, 1], reservation_id).result() + split_reservation_id = reservation_to_update.id.split("/")[6] + reservation_id = "/providers/Microsoft.Capacity/reservationOrders/{}/reservations/{}".format( + reservation_order_id, split_reservation_id + ) + split_response = self.reservation_client.reservation.split( + reservation_order_id, [1, 1], reservation_id + ).result() split_quantity = 0 for reservation in split_response: @@ -111,13 +118,19 @@ def _test_merge(self, reservation_order_id): for reservation in reservation_list: if "Succeeded" in reservation.properties.provisioning_state: if split_id1 is None: - split_id1 = reservation.id.split('/')[6] + split_id1 = reservation.id.split("/")[6] else: - split_id2 = reservation.id.split('/')[6] - merge_id1 = "/providers/Microsoft.Capacity/reservationOrders/{}/reservations/{}".format(reservation_order_id, split_id1) - merge_id2 = "/providers/Microsoft.Capacity/reservationOrders/{}/reservations/{}".format(reservation_order_id, split_id2) - merge_response = self.reservation_client.reservation.merge(reservation_order_id, [merge_id1, merge_id2]).result() - + split_id2 = reservation.id.split("/")[6] + merge_id1 = "/providers/Microsoft.Capacity/reservationOrders/{}/reservations/{}".format( + reservation_order_id, split_id1 + ) + merge_id2 = "/providers/Microsoft.Capacity/reservationOrders/{}/reservations/{}".format( + reservation_order_id, split_id2 + ) + merge_response = self.reservation_client.reservation.merge( + reservation_order_id, [merge_id1, merge_id2] + ).result() + merge_quantity = 0 for reservation in merge_response: self._validate_reservation(reservation) @@ -155,26 +168,32 @@ def test_reservation_operations(self): def test_reservation_order_list(self): reservation_order_list = self.reservation_client.reservation_order.list() self.assertIsNotNone(reservation_order_list) - self.assertTrue(len(reservation_order_list._attribute_map['current_page']) > 0) + self.assertTrue(len(reservation_order_list._attribute_map["current_page"]) > 0) for reservation_order in reservation_order_list: self._validate_reservation_order(reservation_order) def test_get_catalog(self): - catalog_items = self.reservation_client.get_catalog(self.settings.SUBSCRIPTION_ID, ReservedResourceType.virtual_machines, "westus") + catalog_items = self.reservation_client.get_catalog( + self.settings.SUBSCRIPTION_ID, ReservedResourceType.virtual_machines, "westus" + ) for item in catalog_items: self.assertIsNotNone(item.resource_type) self.assertIsNotNone(item.name) self.assertTrue(len(item.terms) > 0) self.assertTrue(len(item.locations) > 0) self.assertTrue(len(item.sku_properties) > 0) - catalog_items = self.reservation_client.get_catalog(self.settings.SUBSCRIPTION_ID, ReservedResourceType.sql_databases, "southeastasia") + catalog_items = self.reservation_client.get_catalog( + self.settings.SUBSCRIPTION_ID, ReservedResourceType.sql_databases, "southeastasia" + ) for item in catalog_items: self.assertIsNotNone(item.resource_type) self.assertIsNotNone(item.name) self.assertTrue(len(item.terms) > 0) self.assertTrue(len(item.locations) > 0) self.assertTrue(len(item.sku_properties) > 0) - catalog_items = self.reservation_client.get_catalog(self.settings.SUBSCRIPTION_ID, ReservedResourceType.suse_linux) + catalog_items = self.reservation_client.get_catalog( + self.settings.SUBSCRIPTION_ID, ReservedResourceType.suse_linux + ) for item in catalog_items: self.assertIsNotNone(item.resource_type) self.assertIsNotNone(item.name) @@ -183,7 +202,9 @@ def test_get_catalog(self): def test_applied_reservation(self): applied_reservation = self.reservation_client.get_applied_reservation_list(self.settings.SUBSCRIPTION_ID) - expected_id = "/subscriptions/{}/providers/microsoft.capacity/AppliedReservations/default".format(self.settings.SUBSCRIPTION_ID) + expected_id = "/subscriptions/{}/providers/microsoft.capacity/AppliedReservations/default".format( + self.settings.SUBSCRIPTION_ID + ) self.assertEqual(expected_id, applied_reservation.id) self.assertEqual("default", applied_reservation.name) self.assertEqual("Microsoft.Capacity/AppliedReservations", applied_reservation.type) @@ -196,6 +217,7 @@ def test_get_operation(self): self.assertIsNotNone(operation.name) self.assertIsNotNone(operation.display) -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_patch.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_patch.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_patch.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_patch.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_patch.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_patch.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_patch.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_patch.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_patch.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_patch.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_async_test.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_async_test.py index 47c0f9cd4cea..d9ed5d739d6e 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_async_test.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_async_test.py @@ -27,15 +27,14 @@ async def test_appliances_list_by_resource_group(self, resource_group): ) result = [r async for r in response] assert result == [] - + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_appliances_list_by_subscription(self, resource_group): response = self.client.appliances.list_by_subscription() result = [r async for r in response] assert response - - + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_appliances_list_operations(self, resource_group): diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_test.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_test.py index 23964dba945e..2baa8b33f750 100644 --- a/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_test.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/tests/test_resource_connector_mgmt_appliances_operations_test.py @@ -26,7 +26,7 @@ def test_appliances_list_by_resource_group(self, resource_group): ) result = [r for r in response] assert result == [] - + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_appliances_list_by_subscription(self, resource_group): @@ -40,5 +40,3 @@ def test_appliances_list_operations(self, resource_group): response = self.client.appliances.list_operations() result = [r for r in response] assert response - - \ No newline at end of file diff --git a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_patch.py b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_patch.py +++ b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/_patch.py b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/_patch.py +++ b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/operations/_patch.py b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/operations/_patch.py +++ b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/models/_patch.py b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/models/_patch.py +++ b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/operations/_patch.py b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/operations/_patch.py +++ b/sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/_patch.py b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/_patch.py +++ b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/_patch.py b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/_patch.py +++ b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/operations/_patch.py b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/operations/_patch.py +++ b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/models/_patch.py b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/models/_patch.py +++ b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/operations/_patch.py b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/operations/_patch.py +++ b/sdk/resourcemover/azure-mgmt-resourcemover/azure/mgmt/resourcemover/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resourcemover/azure-mgmt-resourcemover/setup.py b/sdk/resourcemover/azure-mgmt-resourcemover/setup.py index 0c2ca07e7770..df0bbc91f587 100644 --- a/sdk/resourcemover/azure-mgmt-resourcemover/setup.py +++ b/sdk/resourcemover/azure-mgmt-resourcemover/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/_patch.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/_patch.py +++ b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/operations/_patch.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/_patch.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/_patch.py +++ b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/_patch.py b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/_patch.py +++ b/sdk/resources/azure-mgmt-msi/azure/mgmt/msi/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-msi/setup.py b/sdk/resources/azure-mgmt-msi/setup.py index e01101889e9a..952bfa4c00b6 100644 --- a/sdk/resources/azure-mgmt-msi/setup.py +++ b/sdk/resources/azure-mgmt-msi/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/_patch.py b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/_patch.py +++ b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/_patch.py b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/models/_patch.py b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/operations/_patch.py b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-bicep/azure/mgmt/resource/bicep/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-bicep/setup.py b/sdk/resources/azure-mgmt-resource-bicep/setup.py index e03d4658d77e..57b8bfaea4c1 100644 --- a/sdk/resources/azure-mgmt-resource-bicep/setup.py +++ b/sdk/resources/azure-mgmt-resource-bicep/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/_patch.py b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/_patch.py +++ b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/_patch.py b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/models/_patch.py b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/operations/_patch.py b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-changes/azure/mgmt/resource/changes/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/_patch.py b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/_patch.py +++ b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/_patch.py b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/models/_patch.py b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/operations/_patch.py b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-databoundaries/azure/mgmt/resource/databoundaries/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/_patch.py b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/_patch.py b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/models/_patch.py b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/operations/_patch.py b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deployments/azure/mgmt/resource/deployments/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deployments/setup.py b/sdk/resources/azure-mgmt-resource-deployments/setup.py index 34363cc6a401..0c187d3e01ae 100644 --- a/sdk/resources/azure-mgmt-resource-deployments/setup.py +++ b/sdk/resources/azure-mgmt-resource-deployments/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/models/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/operations/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentscripts/azure/mgmt/resource/deploymentscripts/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentscripts/setup.py b/sdk/resources/azure-mgmt-resource-deploymentscripts/setup.py index e58f93a51fea..bf31b853d20a 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentscripts/setup.py +++ b/sdk/resources/azure-mgmt-resource-deploymentscripts/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/models/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/operations/_patch.py b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-deploymentstacks/azure/mgmt/resource/deploymentstacks/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/_patch.py b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/_patch.py +++ b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/_patch.py b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/models/_patch.py b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/operations/_patch.py b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-features/azure/mgmt/resource/features/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/_patch.py b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/_patch.py +++ b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/_patch.py b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/models/_patch.py b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/operations/_patch.py b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-links/azure/mgmt/resource/links/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/_patch.py b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/_patch.py +++ b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/_patch.py b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/models/_patch.py b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/operations/_patch.py b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-locks/azure/mgmt/resource/locks/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/_patch.py b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/_patch.py +++ b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/_patch.py b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/models/_patch.py b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/operations/_patch.py b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-managedapplications/azure/mgmt/resource/managedapplications/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/_patch.py b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/_patch.py +++ b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/_patch.py b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/models/_patch.py b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/operations/_patch.py b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-policy/azure/mgmt/resource/policy/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/_patch.py b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/_patch.py +++ b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/_patch.py b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/models/_patch.py b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/operations/_patch.py b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-privatelinks/azure/mgmt/resource/privatelinks/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/_patch.py b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/_patch.py +++ b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/_patch.py b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/models/_patch.py b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/operations/_patch.py b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-subscriptions/azure/mgmt/resource/subscriptions/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/_patch.py b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/_patch.py +++ b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/_patch.py b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/models/_patch.py b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/operations/_patch.py b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource-templatespecs/azure/mgmt/resource/templatespecs/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource-templatespecs/setup.py b/sdk/resources/azure-mgmt-resource-templatespecs/setup.py index 216a6d9643ed..eefd398065b7 100644 --- a/sdk/resources/azure-mgmt-resource-templatespecs/setup.py +++ b/sdk/resources/azure-mgmt-resource-templatespecs/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_patch.py index 2be8919280c2..1a94499bcc67 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_patch.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/_patch.py index 2be8919280c2..1a94499bcc67 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/operations/_patch.py index 2be8919280c2..1a94499bcc67 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/aio/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/models/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/models/_patch.py index 2be8919280c2..1a94499bcc67 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/models/_patch.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/operations/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/operations/_patch.py index 2be8919280c2..1a94499bcc67 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/_patch.py b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/_patch.py +++ b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/_patch.py b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/_patch.py +++ b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/_patch.py b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/_patch.py +++ b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/_patch.py b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/_patch.py +++ b/sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/resources/azure-mgmt-resourcegraph/tests/test_mgmt_resourcegraph.py b/sdk/resources/azure-mgmt-resourcegraph/tests/test_mgmt_resourcegraph.py index 9118355fbe54..b3238d3d50f6 100644 --- a/sdk/resources/azure-mgmt-resourcegraph/tests/test_mgmt_resourcegraph.py +++ b/sdk/resources/azure-mgmt-resourcegraph/tests/test_mgmt_resourcegraph.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import pytest import unittest @@ -12,19 +12,17 @@ from azure.mgmt.resourcegraph.models import * from devtools_testutils import AzureMgmtRecordedTestCase + @pytest.mark.skip("The test doesn't work.") class TestMgmtResourceGraph(AzureMgmtRecordedTestCase): def setUp(self): super(TestMgmtResourceGraph, self).setUp() - self.resourcegraph_client = self.create_basic_client( - ResourceGraphClient - ) + self.resourcegraph_client = self.create_basic_client(ResourceGraphClient) def test_resources_basic_query(self): query = QueryRequest( - query='project id, tags, properties | limit 2', - subscriptions=[self.settings.SUBSCRIPTION_ID] + query="project id, tags, properties | limit 2", subscriptions=[self.settings.SUBSCRIPTION_ID] ) query_response = self.resourcegraph_client.resources(query) @@ -39,8 +37,8 @@ def test_resources_basic_query(self): self.assertEqual(len(query_response.facets), 0) # Data columns - self.assertIsNotNone(query_response.data['columns']) - self.assertEqual(len(query_response.data['columns']), 3) + self.assertIsNotNone(query_response.data["columns"]) + self.assertEqual(len(query_response.data["columns"]), 3) self.assertIsNotNone(query_response.data["columns"][0]["name"]) self.assertIsNotNone(query_response.data["columns"][1]["name"]) self.assertIsNotNone(query_response.data["columns"][2]["name"]) @@ -58,11 +56,9 @@ def test_resources_basic_query(self): def test_resources_basic_query_object_array(self): query = QueryRequest( - query='project id, tags, properties | limit 2', + query="project id, tags, properties | limit 2", subscriptions=[self.settings.SUBSCRIPTION_ID], - options=QueryRequestOptions( - result_format=ResultFormat.object_array - ) + options=QueryRequestOptions(result_format=ResultFormat.object_array), ) query_response = self.resourcegraph_client.resources(query) @@ -80,21 +76,21 @@ def test_resources_basic_query_object_array(self): self.assertIsNotNone(query_response.data) self.assertEqual(len(query_response.data), 2) self.assertEqual(len(query_response.data[0]), 3) - self.assertIsInstance(query_response.data[0]['id'], str) - if query_response.data[0]['tags']: - self.assertIsInstance(query_response.data[0]['tags'], dict) - self.assertIsInstance(query_response.data[0]['properties'], dict) + self.assertIsInstance(query_response.data[0]["id"], str) + if query_response.data[0]["tags"]: + self.assertIsInstance(query_response.data[0]["tags"], dict) + self.assertIsInstance(query_response.data[0]["properties"], dict) def test_resources_query_options(self): raise unittest.SkipTest("Skipping resources_query_options") query = QueryRequest( - query='project id', + query="project id", subscriptions=[self.settings.SUBSCRIPTION_ID], options=QueryRequestOptions( - skip_token='82aw3vQlArEastJ24LABY8oPgQLesIyAyzYs2g6/aOOOmJHSYFj39fODurJV5e2tTFFebWcfxn7n5edicA8u6HgSJe1GCEk5HjxwLkeJiye2LVZDC7TaValkJbsk9JqY4yv5c7iRiLqgO34RbHEeVfLJpa56u4RZu0K+GpQvnBRPyAhy3KbwhZWpU5Nnqnud2whGb5WKdlL8xF7wnQaUnUN2lns8WwqwM4rc0VK4BbQt/WfWWcYJivSAyB3m4Z5g73df1KiU4C+K8auvUMpLPYVxxnKC/YZz42YslVAWXXUmuGOaM2SfLHRO6o4O9DgXlUgYjeFWqIbAkmMiVEqU', + skip_token="82aw3vQlArEastJ24LABY8oPgQLesIyAyzYs2g6/aOOOmJHSYFj39fODurJV5e2tTFFebWcfxn7n5edicA8u6HgSJe1GCEk5HjxwLkeJiye2LVZDC7TaValkJbsk9JqY4yv5c7iRiLqgO34RbHEeVfLJpa56u4RZu0K+GpQvnBRPyAhy3KbwhZWpU5Nnqnud2whGb5WKdlL8xF7wnQaUnUN2lns8WwqwM4rc0VK4BbQt/WfWWcYJivSAyB3m4Z5g73df1KiU4C+K8auvUMpLPYVxxnKC/YZz42YslVAWXXUmuGOaM2SfLHRO6o4O9DgXlUgYjeFWqIbAkmMiVEqU", top=4, - skip=8 - ) + skip=8, + ), ) query_response = self.resourcegraph_client.resources(query) @@ -121,28 +117,16 @@ def test_resources_query_options(self): self.assertIsInstance(query_response.data["rows"][0][0], str) def test_resources_facet_query(self): - facet_expression0 = 'location' - facet_expression1 = 'nonExistingColumn' + facet_expression0 = "location" + facet_expression1 = "nonExistingColumn" query = QueryRequest( - query='project id, location | limit 10', + query="project id, location | limit 10", subscriptions=[self.settings.SUBSCRIPTION_ID], facets=[ - FacetRequest( - expression=facet_expression0, - options=FacetRequestOptions( - sort_order='desc', - top=1 - ) - ), - FacetRequest( - expression=facet_expression1, - options=FacetRequestOptions( - sort_order='desc', - top=1 - ) - ) - ] + FacetRequest(expression=facet_expression0, options=FacetRequestOptions(sort_order="desc", top=1)), + FacetRequest(expression=facet_expression1, options=FacetRequestOptions(sort_order="desc", top=1)), + ], ) query_response = self.resourcegraph_client.resources(query) @@ -186,10 +170,7 @@ def test_resources_facet_query(self): self.assertIsNotNone(query_response.facets[1].errors[0].message) def test_resources_malformed_query(self): - query = QueryRequest( - query='project id, location | where where', - subscriptions=[self.settings.SUBSCRIPTION_ID] - ) + query = QueryRequest(query="project id, location | where where", subscriptions=[self.settings.SUBSCRIPTION_ID]) with self.assertRaises(Exception) as cm: self.resourcegraph_client.resources(query) @@ -201,10 +182,10 @@ def test_resources_malformed_query(self): self.assertGreater(len(error.details), 0) self.assertIsNotNone(error.details[0].code) self.assertIsNotNone(error.details[0].message) - #self.assertIsNotNone(error.details[0].additional_properties) - #self.assertEqual(len(error.details[0].additional_properties), 4) + # self.assertIsNotNone(error.details[0].additional_properties) + # self.assertEqual(len(error.details[0].additional_properties), 4) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/__init__.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/__init__.py index 44cd1286e524..4a9d0dcfdea0 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/__init__.py @@ -23,19 +23,12 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from ._version import VERSION # pylint: disable=import-error +from ._version import VERSION # pylint: disable=import-error __version__ = VERSION from ._schema_registry_avro_encoder import AvroEncoder # pylint: disable=import-error from ._message_protocol import MessageType, MessageContent # pylint: disable=import-error -from ._exceptions import InvalidContentError, InvalidSchemaError # pylint: disable=import-error +from ._exceptions import InvalidContentError, InvalidSchemaError # pylint: disable=import-error - -__all__ = [ - "AvroEncoder", - "MessageType", - "MessageContent", - "InvalidContentError", - "InvalidSchemaError" -] +__all__ = ["AvroEncoder", "MessageType", "MessageContent", "InvalidContentError", "InvalidSchemaError"] diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_abstract_avro_encoder.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_abstract_avro_encoder.py index fedcfda8ae5c..bd77c249b098 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_abstract_avro_encoder.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_abstract_avro_encoder.py @@ -7,10 +7,12 @@ from typing import BinaryIO, Dict, Union, Any, Mapping from typing_extensions import Protocol + class AvroDataReader(Protocol): """ An Avro Data Reader. """ + def __init__(self, writers_schema: Any, readers_schema: Any) -> None: """ Data reader used as defined in the Avro specification. @@ -27,6 +29,7 @@ def read(self, decoder: Any, **kwargs: Any) -> object: :type decoder: any """ + class AbstractAvroObjectEncoder(object): """ An Avro encoder used for encoding/decoding an Avro RecordSchema. diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_apache_avro_encoder.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_apache_avro_encoder.py index 81ecb74e77b7..160ac5bf54b7 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_apache_avro_encoder.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_apache_avro_encoder.py @@ -8,10 +8,7 @@ from io import BytesIO import avro # type: ignore from avro.io import DatumWriter, DatumReader, BinaryDecoder, BinaryEncoder # type: ignore -from ._abstract_avro_encoder import ( # pylint: disable=import-error - AbstractAvroObjectEncoder, - AvroDataReader -) +from ._abstract_avro_encoder import AbstractAvroObjectEncoder, AvroDataReader # pylint: disable=import-error if TYPE_CHECKING: from avro import schema @@ -38,9 +35,7 @@ def get_schema_writer(self, schema): return DatumWriter(schema) @lru_cache(maxsize=128) - def get_schema_reader( - self, schema, readers_schema=None - ): + def get_schema_reader(self, schema, readers_schema=None): schema = self.parse_schema(schema) if readers_schema: readers_schema = self.parse_schema(readers_schema) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_exceptions.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_exceptions.py index 6296982c7a35..7bb50a060b75 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_exceptions.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_exceptions.py @@ -25,6 +25,7 @@ # -------------------------------------------------------------------------- from typing import Any, Optional, Dict + class InvalidSchemaError(ValueError): """Error during schema validation. @@ -36,12 +37,7 @@ class InvalidSchemaError(ValueError): this may include information like: `schema_id`, `schema_definition`, `message_content`. """ - def __init__( - self, - message: str, - *args: Any, - details: Optional[Dict[str, str]] = None - ) -> None: + def __init__(self, message: str, *args: Any, details: Optional[Dict[str, str]] = None) -> None: self.message: str = str(message) self.details: Dict[str, str] = details or {} super(InvalidSchemaError, self).__init__(self.message, *args) @@ -58,12 +54,7 @@ class InvalidContentError(ValueError): information like: `schema_id`, `schema_definition`, `message_content`. """ - def __init__( - self, - message: str, - *args: Any, - details: Optional[Dict[str, str]] = None - ) -> None: + def __init__(self, message: str, *args: Any, details: Optional[Dict[str, str]] = None) -> None: self.message: str = str(message) self.details: Dict[str, str] = details or {} super(InvalidContentError, self).__init__(self.message, *args) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_message_protocol.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_message_protocol.py index 2bcf9f8a2530..1156fab72d9d 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_message_protocol.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_message_protocol.py @@ -21,9 +21,7 @@ class MessageType(Protocol): """Message Types that set and get content and content type values internally.""" @classmethod - def from_message_content( - cls, content: bytes, content_type: str, **kwargs: Any - ) -> "MessageType": + def from_message_content(cls, content: bytes, content_type: str, **kwargs: Any) -> "MessageType": """Creates an object that is a subtype of MessageType, given content type and a content value to be set on the object. diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_schema_registry_avro_encoder.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_schema_registry_avro_encoder.py index 25a923635448..9c6f755cfbdc 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_schema_registry_avro_encoder.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_schema_registry_avro_encoder.py @@ -78,7 +78,7 @@ def __init__( client: "azure.schemaregistry.SchemaRegistryClient", group_name: Optional[str] = None, auto_register: bool = False, - **kwargs: Any + **kwargs: Any, ) -> None: self._schema_registry_client = client self._avro_encoder = AvroObjectEncoder(codec=kwargs.get("codec")) @@ -130,9 +130,7 @@ def _get_schema(self, schema_id: str, **kwargs: Any) -> str: :return: Schema content :rtype: str """ - schema_str = self._schema_registry_client.get_schema( - schema_id, **kwargs - ).definition + schema_str = self._schema_registry_client.get_schema(schema_id, **kwargs).definition return schema_str @overload @@ -144,8 +142,7 @@ def encode( message_type: Type[MessageType], request_options: Optional[Dict[str, Any]] = None, **kwargs: Any, - ) -> MessageType: - ... + ) -> MessageType: ... @overload def encode( @@ -156,8 +153,7 @@ def encode( message_type: None = None, request_options: Optional[Dict[str, Any]] = None, **kwargs: Any, - ) -> MessageContent: - ... + ) -> MessageContent: ... def encode( self, @@ -202,20 +198,12 @@ def encode( raise TypeError("'group_name' in constructor cannot be None, if encoding.") schema_fullname = validate_schema(self._avro_encoder, raw_input_schema) - cache_misses = ( - self._get_schema_id.cache_info().misses # pylint: disable=no-value-for-parameter - ) + cache_misses = self._get_schema_id.cache_info().misses # pylint: disable=no-value-for-parameter request_options = request_options or {} - schema_id = self._get_schema_id( - schema_fullname, raw_input_schema, **request_options - ) - new_cache_misses = ( - self._get_schema_id.cache_info().misses # pylint: disable=no-value-for-parameter - ) + schema_id = self._get_schema_id(schema_fullname, raw_input_schema, **request_options) + new_cache_misses = self._get_schema_id.cache_info().misses # pylint: disable=no-value-for-parameter if new_cache_misses > cache_misses: - cache_info = ( - self._get_schema_id.cache_info() # pylint: disable=no-value-for-parameter - ) + cache_info = self._get_schema_id.cache_info() # pylint: disable=no-value-for-parameter _LOGGER.info( "New entry has been added to schema ID cache. Cache info: %s", str(cache_info), @@ -261,18 +249,12 @@ def decode( """ schema_id, content = validate_message(message) - cache_misses = ( - self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter - ) + cache_misses = self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter request_options = request_options or {} schema_definition = self._get_schema(schema_id, **request_options) - new_cache_misses = ( - self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter - ) + new_cache_misses = self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter if new_cache_misses > cache_misses: - cache_info = ( - self._get_schema.cache_info() # pylint: disable=no-value-for-parameter - ) + cache_info = self._get_schema.cache_info() # pylint: disable=no-value-for-parameter _LOGGER.info( "New entry has been added to schema cache. Cache info: %s", str(cache_info), diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_utils.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_utils.py index 5b8d574c4fc7..dc5f8adddf56 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_utils.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/_utils.py @@ -101,11 +101,9 @@ def validate_message(message: Union[MessageType, MessageContent]): content = message["content"] content_type = message["content_type"] except (KeyError, TypeError) as exc: - raise TypeError( - f"""The content model {str(message)} must be a subtype of the MessageType protocol or type + raise TypeError(f"""The content model {str(message)} must be a subtype of the MessageType protocol or type MessageContent. If using an Azure SDK model class, please check the README.md - for the full list of supported Azure SDK models and their corresponding versions.""" - ) from exc + for the full list of supported Azure SDK models and their corresponding versions.""") from exc try: content_type_parts = content_type.split("+") @@ -147,7 +145,7 @@ def decode_content( ) from exc try: - dict_value: Dict[str, Any]= avro_encoder.decode(content, reader) + dict_value: Dict[str, Any] = avro_encoder.decode(content, reader) except SchemaResolutionException as exc: raise InvalidSchemaError( f"Incompatible schemas.\nWriter's Schema: {schema_definition}\nReader's Schema: {readers_schema}", diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/__init__.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/__init__.py index 84a9db669926..f811f4bfe3c4 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/__init__.py @@ -25,6 +25,4 @@ # -------------------------------------------------------------------------- from ._schema_registry_avro_encoder_async import AvroEncoder # pylint: disable=import-error -__all__ = [ - "AvroEncoder" -] +__all__ = ["AvroEncoder"] diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_async_lru.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_async_lru.py index bb6347fc0328..2e341cad2111 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_async_lru.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_async_lru.py @@ -29,11 +29,10 @@ # 2. The last update to the library was a year ago, so it seems the library is # not being actively maintained. -import asyncio # pylint:disable=do-not-import-asyncio +import asyncio # pylint:disable=do-not-import-asyncio from collections import OrderedDict from functools import _CacheInfo, _make_key, partial, wraps - __version__ = "1.0.2" __all__ = ("alru_cache",) @@ -83,9 +82,7 @@ def _open(wrapped): raise RuntimeError("alru_cache is not closed") # pylint: disable=protected-access - was_closed = ( - wrapped.hits == wrapped.misses == len(wrapped.tasks) == len(wrapped._cache) == 0 - ) + was_closed = wrapped.hits == wrapped.misses == len(wrapped.tasks) == len(wrapped._cache) == 0 if not was_closed: raise RuntimeError("alru_cache was not closed correctly") diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_schema_registry_avro_encoder_async.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_schema_registry_avro_encoder_async.py index 3d9aa87ed120..3a77b5809880 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_schema_registry_avro_encoder_async.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/azure/schemaregistry/encoder/avroencoder/aio/_schema_registry_avro_encoder_async.py @@ -67,7 +67,7 @@ def __init__( client: "SchemaRegistryClient", group_name: Optional[str] = None, auto_register: bool = False, - **kwargs: Any + **kwargs: Any, ) -> None: self._schema_registry_client = client self._avro_encoder = AvroObjectEncoder(codec=kwargs.get("codec")) @@ -131,8 +131,7 @@ async def encode( message_type: Type[MessageType], request_options: Optional[Dict[str, Any]] = None, **kwargs: Any, - ) -> MessageType: - ... + ) -> MessageType: ... @overload async def encode( @@ -143,8 +142,7 @@ async def encode( message_type: None = None, request_options: Optional[Dict[str, Any]] = None, **kwargs: Any, - ) -> MessageContent: - ... + ) -> MessageContent: ... async def encode( self, @@ -155,7 +153,6 @@ async def encode( request_options: Optional[Dict[str, Any]] = None, **kwargs: Any, ) -> Union[MessageType, MessageContent]: - """Encode content with the given schema. Create content type value, which consists of the Avro Mime Type string and the schema ID corresponding to given schema. If provided with a MessageType subtype, encoded content and content type will be passed to create message object. If not provided, the following dict will be returned: @@ -193,16 +190,12 @@ async def encode( self._get_schema_id.cache_info().misses # pylint: disable=no-value-for-parameter disable=no-member ) request_options = request_options or {} - schema_id = await self._get_schema_id( - schema_fullname, raw_input_schema, **request_options - ) + schema_id = await self._get_schema_id(schema_fullname, raw_input_schema, **request_options) new_cache_misses = ( self._get_schema_id.cache_info().misses # pylint: disable=no-value-for-parameter disable=no-member ) if new_cache_misses > cache_misses: - cache_info = ( - self._get_schema_id.cache_info() # pylint: disable=no-value-for-parameter disable=no-member - ) + cache_info = self._get_schema_id.cache_info() # pylint: disable=no-value-for-parameter disable=no-member _LOGGER.info( "New entry has been added to schema ID cache. Cache info: %s", str(cache_info), @@ -247,18 +240,14 @@ async def decode( """ schema_id, content = validate_message(message) - cache_misses = ( - self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter disable=no-member - ) + cache_misses = self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter disable=no-member request_options = request_options or {} schema_definition = await self._get_schema(schema_id, **request_options) new_cache_misses = ( self._get_schema.cache_info().misses # pylint: disable=no-value-for-parameter disable=no-member ) if new_cache_misses > cache_misses: - cache_info = ( - self._get_schema.cache_info() # pylint: disable=no-value-for-parameter disable=no-member - ) + cache_info = self._get_schema.cache_info() # pylint: disable=no-value-for-parameter disable=no-member _LOGGER.info( "New entry has been added to schema cache. Cache info: %s", str(cache_info), diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/conftest.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/conftest.py index f89809aa17d6..56c1717cd444 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/conftest.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/conftest.py @@ -7,6 +7,7 @@ remove_batch_sanitizers, ) + # autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): @@ -21,6 +22,7 @@ def add_sanitizers(test_proxy): # - AZSDK3493: $..name remove_batch_sanitizers(["AZSDK3493"]) + # autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy): diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_event_data_message_async.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_event_data_message_async.py index 6b9d20195f8a..197d6e87be8a 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_event_data_message_async.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_event_data_message_async.py @@ -46,6 +46,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python """ + import os import asyncio @@ -54,12 +55,12 @@ from azure.schemaregistry.encoder.avroencoder.aio import AvroEncoder from azure.eventhub import EventData -TENANT_ID=os.environ['AZURE_TENANT_ID'] -CLIENT_ID=os.environ['AZURE_CLIENT_ID'] -CLIENT_SECRET=os.environ['AZURE_CLIENT_SECRET'] +TENANT_ID = os.environ["AZURE_TENANT_ID"] +CLIENT_ID = os.environ["AZURE_CLIENT_ID"] +CLIENT_SECRET = os.environ["AZURE_CLIENT_SECRET"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE=os.environ['SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME=os.environ['SCHEMAREGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] SCHEMA_STRING = """ {"namespace": "example.avro", "type": "record", @@ -72,11 +73,7 @@ }""" -token_credential = ClientSecretCredential( - tenant_id=TENANT_ID, - client_id=CLIENT_ID, - client_secret=CLIENT_SECRET -) +token_credential = ClientSecretCredential(tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET) async def encode_to_event_data_message(encoder): @@ -84,14 +81,10 @@ async def encode_to_event_data_message(encoder): dict_content_alice = {"name": "Alice", "favorite_number": 15, "favorite_color": "green"} # Schema would be automatically registered into Schema Registry and cached locally. - event_data_ben = await encoder.encode( - dict_content_ben, schema=SCHEMA_STRING, message_type=EventData - ) + event_data_ben = await encoder.encode(dict_content_ben, schema=SCHEMA_STRING, message_type=EventData) # The second call won't trigger a service call. - event_data_alice = await encoder.encode( - dict_content_alice, schema=SCHEMA_STRING, message_type=EventData - ) + event_data_alice = await encoder.encode(dict_content_alice, schema=SCHEMA_STRING, message_type=EventData) print("Encoded content is: ", next(event_data_ben.body)) print("Encoded content is: ", next(event_data_alice.body)) @@ -116,14 +109,13 @@ async def main(): fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential, ) - encoder = AvroEncoder( - client=schema_registry, group_name=GROUP_NAME, auto_register=True - ) + encoder = AvroEncoder(client=schema_registry, group_name=GROUP_NAME, auto_register=True) event_data_ben, event_data_alice = await encode_to_event_data_message(encoder) decoded_content_ben = await decode_event_data_message(encoder, event_data_ben) decoded_content_alice = await decode_event_data_message(encoder, event_data_alice) await encoder.close() await token_credential.close() + if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_with_message_content_async.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_with_message_content_async.py index d72a6f34f633..61c0920a1a8e 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_with_message_content_async.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/encode_and_decode_with_message_content_async.py @@ -46,6 +46,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python """ + import os import asyncio @@ -59,9 +60,7 @@ CLIENT_ID = os.environ["AZURE_CLIENT_ID"] CLIENT_SECRET = os.environ["AZURE_CLIENT_SECRET"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ[ - "SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE" -] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] SCHEMA_STRING = """ {"namespace": "example.avro", @@ -75,9 +74,7 @@ }""" -token_credential = ClientSecretCredential( - tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET -) +token_credential = ClientSecretCredential(tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET) async def encode_message_content_dict(encoder): @@ -90,6 +87,7 @@ async def encode_message_content_dict(encoder): encoded_message_content_ben["content_type"], ) + async def decode_with_content_and_content_type(encoder, event_data): # get content as bytes content = bytearray() @@ -108,13 +106,12 @@ async def main(): fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential, ) - encoder = AvroEncoder( - client=schema_registry, group_name=GROUP_NAME, auto_register=True - ) + encoder = AvroEncoder(client=schema_registry, group_name=GROUP_NAME, auto_register=True) event_data = await encode_message_content_dict(encoder) decoded_content = await decode_with_content_and_content_type(encoder, event_data) await encoder.close() await token_credential.close() + if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_receive_integration_async.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_receive_integration_async.py index 23a54ae6f621..50370f0c550a 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_receive_integration_async.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_receive_integration_async.py @@ -27,6 +27,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os import asyncio from azure.eventhub.aio import EventHubConsumerClient @@ -34,41 +35,41 @@ from azure.schemaregistry.aio import SchemaRegistryClient from azure.schemaregistry.encoder.avroencoder.aio import AvroEncoder -EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] -EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] +EVENTHUB_CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ["EVENT_HUB_NAME"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] # create an EventHubConsumerClient instance eventhub_consumer = EventHubConsumerClient.from_connection_string( conn_str=EVENTHUB_CONNECTION_STR, - consumer_group='$Default', + consumer_group="$Default", eventhub_name=EVENTHUB_NAME, ) # create a AvroEncoder instance azure_credential = DefaultAzureCredential() avro_encoder = AvroEncoder( client=SchemaRegistryClient( - fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, - credential=azure_credential + fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=azure_credential ), group_name=GROUP_NAME, - auto_register=True + auto_register=True, ) + async def on_event(partition_context, event): print(f"Received event from partition: {partition_context.partition_id}.") bytes_payload = b"".join(b for b in event.body) - print(f'The received bytes of the EventData is {bytes_payload!r}.') + print(f"The received bytes of the EventData is {bytes_payload!r}.") # Use the decode method to decode the payload of the event. # The decode method will extract the schema id from the content_type, and automatically retrieve the Avro Schema # from the Schema Registry Service. The schema will be cached locally for future usage. - decoded_content= await avro_encoder.decode(event) - print(f'The dict content after decoding is {decoded_content}') + decoded_content = await avro_encoder.decode(event) + print(f"The dict content after decoding is {decoded_content}") async def main(): @@ -79,11 +80,12 @@ async def main(): starting_position="-1", # "-1" is from the beginning of the partition. ) except KeyboardInterrupt: - print('Stopped receiving.') + print("Stopped receiving.") finally: await avro_encoder.close() await azure_credential.close() await eventhub_consumer.close() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_send_integration_async.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_send_integration_async.py index f6e70562d8a5..b0a9a3bc9d3e 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_send_integration_async.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/async_samples/eventhub_send_integration_async.py @@ -27,6 +27,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os import asyncio from azure.eventhub import EventData @@ -35,11 +36,11 @@ from azure.schemaregistry.aio import SchemaRegistryClient from azure.schemaregistry.encoder.avroencoder.aio import AvroEncoder -EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] -EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] +EVENTHUB_CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ["EVENT_HUB_NAME"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] SCHEMA_STRING = """ {"namespace": "example.avro", @@ -54,21 +55,20 @@ # create an EventHubProducerClient instance eventhub_producer = EventHubProducerClient.from_connection_string( - conn_str=EVENTHUB_CONNECTION_STR, - eventhub_name=EVENTHUB_NAME + conn_str=EVENTHUB_CONNECTION_STR, eventhub_name=EVENTHUB_NAME ) # create a AvroEncoder instance azure_credential = DefaultAzureCredential() # create a AvroEncoder instance avro_encoder = AvroEncoder( client=SchemaRegistryClient( - fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, - credential=azure_credential + fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=azure_credential ), group_name=GROUP_NAME, - auto_register=True + auto_register=True, ) + async def send_event_data_batch(producer, encoder): event_data_batch = await producer.create_batch() dict_content = {"name": "Bob", "favorite_number": 7, "favorite_color": "red"} @@ -76,11 +76,11 @@ async def send_event_data_batch(producer, encoder): # The encode method will automatically register the schema into the Schema Registry Service and # schema will be cached locally for future usage. event_data = await encoder.encode(content=dict_content, schema=SCHEMA_STRING, message_type=EventData) - print(f'The bytes of encoded dict content is {next(event_data.body)}.') + print(f"The bytes of encoded dict content is {next(event_data.body)}.") event_data_batch.add(event_data) await producer.send_batch(event_data_batch) - print('Send is done.') + print("Send is done.") async def main(): @@ -90,5 +90,6 @@ async def main(): await azure_credential.close() await eventhub_producer.close() + if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_event_data_message.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_event_data_message.py index f4b76c99827c..85938b746cc9 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_event_data_message.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_event_data_message.py @@ -46,6 +46,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python """ + import os from azure.identity import ClientSecretCredential @@ -57,9 +58,7 @@ CLIENT_ID = os.environ["AZURE_CLIENT_ID"] CLIENT_SECRET = os.environ["AZURE_CLIENT_SECRET"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ[ - "SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE" -] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] SCHEMA_STRING = """ {"namespace": "example.avro", @@ -73,9 +72,7 @@ }""" -token_credential = ClientSecretCredential( - tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET -) +token_credential = ClientSecretCredential(tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET) def encode_to_event_data_message(encoder): @@ -83,14 +80,10 @@ def encode_to_event_data_message(encoder): dict_content_alice = {"name": "Alice", "favorite_number": 15, "favorite_color": "green"} # Schema would be automatically registered into Schema Registry and cached locally. - event_data_ben = encoder.encode( - dict_content_ben, schema=SCHEMA_STRING, message_type=EventData - ) + event_data_ben = encoder.encode(dict_content_ben, schema=SCHEMA_STRING, message_type=EventData) # The second call won't trigger a service call. - event_data_alice = encoder.encode( - dict_content_alice, schema=SCHEMA_STRING, message_type=EventData - ) + event_data_alice = encoder.encode(dict_content_alice, schema=SCHEMA_STRING, message_type=EventData) print("Encoded content is: ", next(event_data_ben.body)) print("Encoded content is: ", next(event_data_alice.body)) @@ -115,9 +108,7 @@ def decode_event_data_message(encoder, event_data): fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential, ) - encoder = AvroEncoder( - client=schema_registry, group_name=GROUP_NAME, auto_register=True - ) + encoder = AvroEncoder(client=schema_registry, group_name=GROUP_NAME, auto_register=True) event_data_ben, event_data_alice = encode_to_event_data_message(encoder) decoded_content_ben = decode_event_data_message(encoder, event_data_ben) decoded_content_alice = decode_event_data_message(encoder, event_data_alice) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_with_message_content.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_with_message_content.py index a371d272b3ba..3a9904db83ba 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_with_message_content.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/encode_and_decode_with_message_content.py @@ -46,6 +46,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python """ + import os from azure.identity import ClientSecretCredential @@ -57,9 +58,7 @@ CLIENT_ID = os.environ["AZURE_CLIENT_ID"] CLIENT_SECRET = os.environ["AZURE_CLIENT_SECRET"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ[ - "SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE" -] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] SCHEMA_STRING = """ {"namespace": "example.avro", @@ -73,9 +72,7 @@ }""" -token_credential = ClientSecretCredential( - tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET -) +token_credential = ClientSecretCredential(tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET) def encode_message_content_dict(encoder): @@ -88,6 +85,7 @@ def encode_message_content_dict(encoder): encoded_message_content_ben["content_type"], ) + def decode_with_content_and_content_type(encoder, event_data): # get content as bytes content = bytearray() @@ -106,9 +104,7 @@ def decode_with_content_and_content_type(encoder, event_data): fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential, ) - encoder = AvroEncoder( - client=schema_registry, group_name=GROUP_NAME, auto_register=True - ) + encoder = AvroEncoder(client=schema_registry, group_name=GROUP_NAME, auto_register=True) event_data = encode_message_content_dict(encoder) decoded_content = decode_with_content_and_content_type(encoder, event_data) encoder.close() diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_receive_integration.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_receive_integration.py index a25f1ab3b248..1e8c99f6a67c 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_receive_integration.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_receive_integration.py @@ -27,36 +27,37 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os from azure.eventhub import EventHubConsumerClient from azure.identity import DefaultAzureCredential from azure.schemaregistry import SchemaRegistryClient from azure.schemaregistry.encoder.avroencoder import AvroEncoder -EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] -EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] +EVENTHUB_CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ["EVENT_HUB_NAME"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] def on_event(partition_context, event): print(f"Received event from partition: {partition_context.partition_id}.") bytes_payload = b"".join(b for b in event.body) - print(f'The received bytes of the EventData is {bytes_payload!r}.') + print(f"The received bytes of the EventData is {bytes_payload!r}.") # Use the decode method to decode the payload of the event. # The decode method will extract the schema id from the content_type, and automatically retrieve the Avro Schema # from the Schema Registry Service. The schema will be cached locally for future usage. decoded_content = avro_encoder.decode(event) - print(f'The dict content after decoding is {decoded_content}') + print(f"The dict content after decoding is {decoded_content}") # create an EventHubConsumerClient instance eventhub_consumer = EventHubConsumerClient.from_connection_string( conn_str=EVENTHUB_CONNECTION_STR, - consumer_group='$Default', + consumer_group="$Default", eventhub_name=EVENTHUB_NAME, ) @@ -64,11 +65,10 @@ def on_event(partition_context, event): # create a AvroEncoder instance avro_encoder = AvroEncoder( client=SchemaRegistryClient( - fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, - credential=DefaultAzureCredential() + fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=DefaultAzureCredential() ), group_name=GROUP_NAME, - auto_register=True + auto_register=True, ) @@ -79,4 +79,4 @@ def on_event(partition_context, event): starting_position="-1", # "-1" is from the beginning of the partition. ) except KeyboardInterrupt: - print('Stopped receiving.') + print("Stopped receiving.") diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_send_integration.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_send_integration.py index e7d1a0ec8a27..8123ca93cd4d 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_send_integration.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/samples/sync_samples/eventhub_send_integration.py @@ -27,17 +27,18 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os from azure.eventhub import EventHubProducerClient, EventData from azure.identity import DefaultAzureCredential from azure.schemaregistry import SchemaRegistryClient from azure.schemaregistry.encoder.avroencoder import AvroEncoder -EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] -EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] +EVENTHUB_CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"] +EVENTHUB_NAME = os.environ["EVENT_HUB_NAME"] -SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ["SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] SCHEMA_STRING = """ {"namespace": "example.avro", @@ -58,28 +59,26 @@ def send_event_data_batch(producer, encoder): # The encode method will automatically register the schema into the Schema Registry Service and # schema will be cached locally for future usage. event_data = encoder.encode(content=dict_content, schema=SCHEMA_STRING, message_type=EventData) - print(f'The bytes of encoded dict content is {next(event_data.body)}.') + print(f"The bytes of encoded dict content is {next(event_data.body)}.") event_data_batch.add(event_data) producer.send_batch(event_data_batch) - print('Send is done.') + print("Send is done.") # create an EventHubProducerClient instance eventhub_producer = EventHubProducerClient.from_connection_string( - conn_str=EVENTHUB_CONNECTION_STR, - eventhub_name=EVENTHUB_NAME + conn_str=EVENTHUB_CONNECTION_STR, eventhub_name=EVENTHUB_NAME ) # create a AvroEncoder instance avro_encoder = AvroEncoder( client=SchemaRegistryClient( - fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, - credential=DefaultAzureCredential() + fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=DefaultAzureCredential() ), group_name=GROUP_NAME, - auto_register=True + auto_register=True, ) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/setup.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/setup.py index f159bd638c1f..f7ddc9666f30 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/setup.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/setup.py @@ -20,55 +20,54 @@ namespace_name = "azure.schemaregistry.encoder.avroencoder" # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() install_packages = [ - 'azure-schemaregistry>=1.0.0', - 'avro>=1.11.0', + "azure-schemaregistry>=1.0.0", + "avro>=1.11.0", "typing-extensions>=4.0.1", ] setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ "Development Status :: 5 - Production/Stable", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", ], python_requires=">=3.8", zip_safe=False, packages=find_namespace_packages( - include=['azure.schemaregistry.encoder.*'] # Exclude packages that will be covered by PEP420 or nspkg + include=["azure.schemaregistry.encoder.*"] # Exclude packages that will be covered by PEP420 or nspkg ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, - install_requires=install_packages + install_requires=install_packages, ) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/__init__.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/__init__.py index 66794229797f..34913fb394d7 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/__init__.py @@ -1,4 +1,4 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- \ No newline at end of file +# -------------------------------------------------------------------------------------------- diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/_test_base.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/_test_base.py index e500a7046a4f..c5d70e6a5679 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/_test_base.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/perfstress_tests/_test_base.py @@ -21,9 +21,7 @@ class _SchemaRegistryAvroTest(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) - self.fully_qualified_namespace = self.get_from_env( - "SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE" - ) + self.fully_qualified_namespace = self.get_from_env("SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE") self.group_name = self.get_from_env("SCHEMAREGISTRY_GROUP") self.definition, num_fields = self._create_schema_definition() self.content = self._create_content(num_fields) @@ -33,7 +31,7 @@ def _create_schema_definition(self): # random string to avoid conflicting requests letters = string.ascii_lowercase - randletters = ''.join(random.choice(letters) for i in range(10)) + randletters = "".join(random.choice(letters) for i in range(10)) fields = [] schema = { @@ -94,9 +92,7 @@ def __init__(self, arguments): fully_qualified_namespace=self.fully_qualified_namespace, credential=self.sync_credential, ) - self.sync_encoder = AvroEncoder( - client=self.sync_client, group_name=self.group_name, auto_register_schemas=True - ) + self.sync_encoder = AvroEncoder(client=self.sync_client, group_name=self.group_name, auto_register_schemas=True) self.async_credential = AsyncDefaultAzureCredential() self.async_client = AsyncSchemaRegistryClient( fully_qualified_namespace=self.fully_qualified_namespace, @@ -127,9 +123,7 @@ def __init__(self, arguments): fully_qualified_namespace=self.fully_qualified_namespace, credential=self.sync_credential, ) - self.sync_encoder = AvroEncoder( - client=self.sync_client, group_name=self.group_name, auto_register_schemas=True - ) + self.sync_encoder = AvroEncoder(client=self.sync_client, group_name=self.group_name, auto_register_schemas=True) self.async_credential = AsyncDefaultAzureCredential() self.async_client = AsyncSchemaRegistryClient( fully_qualified_namespace=self.fully_qualified_namespace, diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder.py index 74e17e10a2d7..eaaa8fb55558 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder.py @@ -40,20 +40,23 @@ EnvironmentVariableLoader, "schemaregistry", schemaregistry_avro_fully_qualified_namespace="fake_resource_avro.servicebus.windows.net", - schemaregistry_group="fakegroup" + schemaregistry_group="fakegroup", ) + class TestAvroEncoder(AzureRecordedTestCase): def create_client(self, **kwargs): fully_qualified_namespace = kwargs.pop("fully_qualified_namespace") credential = self.get_credential(SchemaRegistryClient) - return self.create_client_from_credential(SchemaRegistryClient, credential, fully_qualified_namespace=fully_qualified_namespace) + return self.create_client_from_credential( + SchemaRegistryClient, credential, fully_qualified_namespace=fully_qualified_namespace + ) def test_raw_avro_encoder(self): schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" schema = avro.schema.parse(schema_str) - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} raw_avro_object_encoder = AvroObjectEncoder() @@ -64,16 +67,16 @@ def test_raw_avro_encoder(self): reader = raw_avro_object_encoder.get_schema_reader(schema_str) decoded_content = raw_avro_object_encoder.decode(encoded_payload, reader) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" - dict_content_missing_optional_fields = {"name": u"Alice"} + dict_content_missing_optional_fields = {"name": "Alice"} encoded_payload = raw_avro_object_encoder.encode(dict_content_missing_optional_fields, schema_str) reader = raw_avro_object_encoder.get_schema_reader(schema_str) decoded_content = raw_avro_object_encoder.decode(encoded_payload, reader) - assert decoded_content["name"] == u"Alice" + assert decoded_content["name"] == "Alice" assert not decoded_content["favorite_number"] assert not decoded_content["favorite_color"] @@ -82,12 +85,12 @@ def test_raw_avro_encoder_negative(self): schema = avro.schema.parse(schema_str) raw_avro_object_encoder = AvroObjectEncoder() - dict_content_wrong_type = {"name": u"Ben", "favorite_number": u"something", "favorite_color": u"red"} - with pytest.raises(AvroTypeException): # avro.io.AvroTypeException + dict_content_wrong_type = {"name": "Ben", "favorite_number": "something", "favorite_color": "red"} + with pytest.raises(AvroTypeException): # avro.io.AvroTypeException raw_avro_object_encoder.encode(dict_content_wrong_type, schema_str) - dict_content_missing_required_field = {"favorite_number": 7, "favorite_color": u"red"} - with pytest.raises(AvroTypeException): # avro.io.AvroTypeException + dict_content_missing_required_field = {"favorite_number": 7, "favorite_color": "red"} + with pytest.raises(AvroTypeException): # avro.io.AvroTypeException raw_avro_object_encoder.encode(dict_content_missing_required_field, schema_str) @SchemaRegistryEnvironmentVariableLoader() @@ -101,26 +104,26 @@ def test_basic_sr_avro_encoder_with_auto_register_schemas(self, **kwargs): schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" schema = avro.schema.parse(schema_str) - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} encoded_message_content = sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] # wrong data type - dict_content_bad = {"name": u"Ben", "favorite_number": 7, "favorite_color": 7} + dict_content_bad = {"name": "Ben", "favorite_number": 7, "favorite_color": 7} with pytest.raises(InvalidContentError) as e: encoded_message_content = sr_avro_encoder.encode(dict_content_bad, schema=schema_str) assert "schema_id" in e.value.details - assert content_type.split("+")[0] == 'avro/binary' + assert content_type.split("+")[0] == "avro/binary" schema_id = sr_client.get_schema_properties(schemaregistry_group, schema.fullname, str(schema), "Avro").id assert content_type.split("+")[1] == schema_id encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = sr_avro_encoder.decode(encoded_content_dict) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" # bad content type mime_type, schema_id = encoded_content_dict["content_type"].split("+") @@ -128,7 +131,7 @@ def test_basic_sr_avro_encoder_with_auto_register_schemas(self, **kwargs): with pytest.raises(InvalidContentError) as e: decoded_content = sr_avro_encoder.decode(encoded_content_dict) - encoded_content_dict["content_type"] = 'a+b+c' + encoded_content_dict["content_type"] = "a+b+c" with pytest.raises(InvalidContentError) as e: decoded_content = sr_avro_encoder.decode(encoded_content_dict) @@ -138,12 +141,12 @@ def __init__(self, not_content): self.not_content = not_content with pytest.raises(TypeError) as e: - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_str, message_type=BadExample) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_str, message_type=BadExample) assert "subtype of the MessageType" in (str(e.value)) - bad_ex = BadExample('fake') - with pytest.raises(TypeError) as e: # caught TypeError - sr_avro_encoder.decode(message=bad_ex) + bad_ex = BadExample("fake") + with pytest.raises(TypeError) as e: # caught TypeError + sr_avro_encoder.decode(message=bad_ex) assert "subtype of the MessageType" in (str(e.value)) # check that AvroEncoder will work with message types that follow protocols @@ -151,8 +154,8 @@ class GoodExample: def __init__(self, content, **kwargs): self.content = content self.content_type = None - self.extra = kwargs.pop('extra', None) - + self.extra = kwargs.pop("extra", None) + @classmethod def from_message_content(cls, content: bytes, content_type: str, **kwargs): ge = cls(content) @@ -162,12 +165,12 @@ def from_message_content(cls, content: bytes, content_type: str, **kwargs): def __message_content__(self): return {"content": self.content, "content_type": self.content_type} - good_ex_obj = sr_avro_encoder.encode(dict_content, schema=schema_str, message_type=GoodExample, extra='val') + good_ex_obj = sr_avro_encoder.encode(dict_content, schema=schema_str, message_type=GoodExample, extra="val") decoded_content_obj = sr_avro_encoder.decode(message=good_ex_obj) - assert decoded_content_obj["name"] == u"Ben" + assert decoded_content_obj["name"] == "Ben" assert decoded_content_obj["favorite_number"] == 7 - assert decoded_content_obj["favorite_color"] == u"red" + assert decoded_content_obj["favorite_color"] == "red" sr_client.close() sr_avro_encoder.close() @@ -175,15 +178,14 @@ def __message_content__(self): extra_sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder_no_group = AvroEncoder(client=extra_sr_client, auto_register=True) decoded_content = sr_avro_encoder_no_group.decode(encoded_message_content) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" with pytest.raises(TypeError): encoded_message_content = sr_avro_encoder_no_group.encode(dict_content, schema=schema_str) sr_avro_encoder_no_group.close() extra_sr_client.close() - @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy def test_basic_sr_avro_encoder_without_auto_register_schemas(self, **kwargs): @@ -195,23 +197,23 @@ def test_basic_sr_avro_encoder_without_auto_register_schemas(self, **kwargs): schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" schema = avro.schema.parse(schema_str) - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} encoded_message_content = sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] - assert content_type.split("+")[0] == 'avro/binary' + assert content_type.split("+")[0] == "avro/binary" schema_id = sr_client.get_schema_properties(schemaregistry_group, schema.fullname, str(schema), "Avro").id assert content_type.split("+")[1] == schema_id encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = sr_avro_encoder.decode(encoded_content_dict) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" sr_avro_encoder.close() - + @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy def test_basic_sr_avro_encoder_decode_readers_schema(self, **kwargs): @@ -222,7 +224,7 @@ def test_basic_sr_avro_encoder_decode_readers_schema(self, **kwargs): schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} encoded_message_content = sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] @@ -231,13 +233,13 @@ def test_basic_sr_avro_encoder_decode_readers_schema(self, **kwargs): readers_schema_remove_field = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]}]}""" encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = sr_avro_encoder.decode(encoded_content_dict, readers_schema=readers_schema_remove_field) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 # readers_schema with extra field with default readers_schema_extra_field = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}, {"name":"favorite_city","type":["string","null"], "default": "Redmond"}]}""" decoded_content = sr_avro_encoder.decode(encoded_content_dict, readers_schema=readers_schema_extra_field) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 assert decoded_content["favorite_color"] == "red" assert decoded_content["favorite_city"] == "Redmond" @@ -252,10 +254,10 @@ def test_basic_sr_avro_encoder_decode_readers_schema(self, **kwargs): # invalid readers_schema invalid_schema = { - "name":"User", - "type":"record", - "namespace":"example.avro", - "fields":[{"name":"name","type":"string"}] + "name": "User", + "type": "record", + "namespace": "example.avro", + "fields": [{"name": "name", "type": "string"}], } invalid_schema_string = "{}".format(invalid_schema) with pytest.raises(InvalidSchemaError) as e: @@ -263,7 +265,7 @@ def test_basic_sr_avro_encoder_decode_readers_schema(self, **kwargs): assert "Invalid schema" in e.value.message assert "schema_id" in e.value.details assert "schema_definition" in e.value.details - + @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy def test_basic_sr_avro_encoder_with_request_options(self, **kwargs): @@ -274,22 +276,25 @@ def test_basic_sr_avro_encoder_with_request_options(self, **kwargs): schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} # if fake kwargs/incorrectly formatted request keyword passed in, should raise TypeError with pytest.raises(TypeError) as e: - encoded_message_content = sr_avro_encoder.encode(dict_content, schema=schema_str, request_options={"fake_kwarg": True, "files": frozenset({'a': False})}) + encoded_message_content = sr_avro_encoder.encode( + dict_content, schema=schema_str, request_options={"fake_kwarg": True, "files": frozenset({"a": False})} + ) encoded_message_content = sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] encoded_content_dict = {"content": encoded_content, "content_type": content_type} with pytest.raises(TypeError) as e: - decoded_content = sr_avro_encoder.decode(encoded_content_dict, request_options={"fake_kwarg": True, "files": (False)}) - + decoded_content = sr_avro_encoder.decode( + encoded_content_dict, request_options={"fake_kwarg": True, "files": (False)} + ) - ################################################################# + ################################################################# ######################### PARSE SCHEMAS ######################### - ################################################################# + ################################################################# @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy @@ -299,14 +304,14 @@ def test_parse_invalid_json_string(self, **kwargs): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) invalid_schema = { - "name":"User", - "type":"record", - "namespace":"example.avro", - "fields":[{"name":"name","type":"string"}] + "name": "User", + "type": "record", + "namespace": "example.avro", + "fields": [{"name": "name", "type": "string"}], } invalid_schema_string = "{}".format(invalid_schema) - with pytest.raises(InvalidSchemaError): # caught avro InvalidSchemaError - sr_avro_encoder.encode({"name": u"Ben"}, schema=invalid_schema_string) + with pytest.raises(InvalidSchemaError): # caught avro InvalidSchemaError + sr_avro_encoder.encode({"name": "Ben"}, schema=invalid_schema_string) ######################### PRIMITIVES ######################### @@ -320,7 +325,7 @@ def test_parse_primitive_types(self, **kwargs): primitive_string = "string" with pytest.raises(InvalidSchemaError) as e: - sr_avro_encoder.encode("hello", schema=primitive_string) + sr_avro_encoder.encode("hello", schema=primitive_string) ######################### type fixed ######################### @@ -333,24 +338,24 @@ def test_parse_fixed_types(self, **kwargs): sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) # avro bug: should give warning from IgnoredLogicalType error since precision < 0 - #fixed_type_ignore_logical_type_error = """{"type": "fixed", "size": 4, "namespace":"example.avro", "name":"User", "precision": -1}""" - #sr_avro_encoder.encode({}, schema=fixed_type_ignore_logical_type_error) + # fixed_type_ignore_logical_type_error = """{"type": "fixed", "size": 4, "namespace":"example.avro", "name":"User", "precision": -1}""" + # sr_avro_encoder.encode({}, schema=fixed_type_ignore_logical_type_error) schema_no_size = """{"type": "fixed", "name":"User"}""" - with pytest.raises(InvalidSchemaError): # caught AvroException - sr_avro_encoder.encode({}, schema=schema_no_size) + with pytest.raises(InvalidSchemaError): # caught AvroException + sr_avro_encoder.encode({}, schema=schema_no_size) schema_no_name = """{"type": "fixed", "size": 3}""" - with pytest.raises(InvalidSchemaError): # caught InvalidSchemaError - sr_avro_encoder.encode({}, schema=schema_no_name) + with pytest.raises(InvalidSchemaError): # caught InvalidSchemaError + sr_avro_encoder.encode({}, schema=schema_no_name) schema_wrong_name = """{"type": "fixed", "name": 1, "size": 3}""" - with pytest.raises(InvalidSchemaError): # caught InvalidSchemaError - sr_avro_encoder.encode({}, schema=schema_wrong_name) + with pytest.raises(InvalidSchemaError): # caught InvalidSchemaError + sr_avro_encoder.encode({}, schema=schema_wrong_name) schema_wrong_namespace = """{"type": "fixed", "name": "User", "size": 3, "namespace": 1}""" - with pytest.raises(InvalidSchemaError): # caught InvalidSchemaError - sr_avro_encoder.encode({}, schema=schema_wrong_namespace) + with pytest.raises(InvalidSchemaError): # caught InvalidSchemaError + sr_avro_encoder.encode({}, schema=schema_wrong_namespace) ######################### type unspecified ######################### @@ -367,8 +372,8 @@ def test_parse_invalid_type(self, **kwargs): "namespace":"example.avro", "fields":[{"name":"name","type":"string"}] }""" - with pytest.raises(InvalidSchemaError): # caught avro InvalidSchemaError - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_no_type) + with pytest.raises(InvalidSchemaError): # caught avro InvalidSchemaError + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_no_type) schema_wrong_type_type = """{ "name":"User", @@ -377,7 +382,7 @@ def test_parse_invalid_type(self, **kwargs): "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_type_type) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_type_type) ######################### RECORD SCHEMA ######################### @@ -395,7 +400,7 @@ def test_parse_record_name(self, **kwargs): "type":"record", "fields":[{"name":"name","type":"string"}] }""" - encoded_schema = sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_name_has_dot) + encoded_schema = sr_avro_encoder.encode({"name": "Ben"}, schema=schema_name_has_dot) schema_id = encoded_schema["content_type"].split("+")[1] registered_schema = sr_client.get_schema(schema_id) decoded_registered_schema = json.loads(registered_schema.definition) @@ -409,7 +414,7 @@ def test_parse_record_name(self, **kwargs): "type":"record", "fields":[{"name":"name","type":"string"}] }""" - encoded_schema = sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_name_no_namespace) + encoded_schema = sr_avro_encoder.encode({"name": "Ben"}, schema=schema_name_no_namespace) schema_id = encoded_schema["content_type"].split("+")[1] registered_schema = sr_client.get_schema(schema_id) decoded_registered_schema = json.loads(registered_schema.definition) @@ -424,7 +429,7 @@ def test_parse_record_name(self, **kwargs): "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_invalid_fullname) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_invalid_fullname) schema_invalid_name_in_fullname = """{ "name":"1abc", @@ -432,7 +437,7 @@ def test_parse_record_name(self, **kwargs): "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_invalid_name_in_fullname) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_invalid_name_in_fullname) schema_invalid_name_reserved_type = """{ "name":"long", @@ -440,7 +445,7 @@ def test_parse_record_name(self, **kwargs): "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_invalid_name_reserved_type) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_invalid_name_reserved_type) schema_wrong_type_name = """{ "name":1, @@ -449,7 +454,7 @@ def test_parse_record_name(self, **kwargs): "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_type_name) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_type_name) schema_no_name = """{ "namespace":"example.avro", @@ -457,7 +462,7 @@ def test_parse_record_name(self, **kwargs): "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_no_name) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_no_name) @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy @@ -473,7 +478,7 @@ def test_parse_error_schema_as_record(self, **kwargs): "type":"error", "fields":[{"name":"name","type":"string"}] }""" - encoded_message_content = sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_error_type) + encoded_message_content = sr_avro_encoder.encode({"name": "Ben"}, schema=schema_error_type) schema_id = encoded_message_content["content_type"].split("+")[1] registered_schema = sr_client.get_schema(schema_id) decoded_registered_schema = json.loads(registered_schema.definition) @@ -493,7 +498,7 @@ def test_parse_record_fields(self, **kwargs): "type":"record" }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_no_fields) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_no_fields) schema_wrong_type_fields = """{ "name":"User", @@ -502,7 +507,7 @@ def test_parse_record_fields(self, **kwargs): "fields": "hello" }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_type_fields) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_type_fields) schema_wrong_field_item_type = """{ "name":"User", @@ -511,25 +516,25 @@ def test_parse_record_fields(self, **kwargs): "fields": ["hello"] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_field_item_type) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_field_item_type) - schema_record_field_no_name= """{ + schema_record_field_no_name = """{ "name":"User", "namespace":"example.avro", "type":"record", "fields":[{"type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_field_no_name) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_field_no_name) - schema_record_field_wrong_type_name= """{ + schema_record_field_wrong_type_name = """{ "name":"User", "namespace":"example.avro", "type":"record", "fields":[{"name": 1, "type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_field_wrong_type_name) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_field_wrong_type_name) schema_record_field_with_invalid_order = """{ "name":"User", @@ -538,7 +543,7 @@ def test_parse_record_fields(self, **kwargs): "fields":[{"name":"name","type":"string","order":"fake_order"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_field_with_invalid_order) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_field_with_invalid_order) schema_record_duplicate_fields = """{ "name":"User", @@ -547,7 +552,7 @@ def test_parse_record_fields(self, **kwargs): "fields":[{"name":"name","type":"string"}, {"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_duplicate_fields) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_duplicate_fields) schema_field_type_invalid = """{ "name":"User", @@ -556,11 +561,11 @@ def test_parse_record_fields(self, **kwargs): "fields":[{"name":"name","type":1}] }""" with pytest.raises(InvalidSchemaError): - sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_field_type_invalid) + sr_avro_encoder.encode({"name": "Ben"}, schema=schema_field_type_invalid) - ################################################################# + ################################################################# #################### SERIALIZE AND DESERIALIZE ################## - ################################################################# + ################################################################# @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy @@ -571,8 +576,8 @@ def test_encode_primitive(self, **kwargs): sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) null_type = """{"type": "null"}""" - encoded_message_content = sr_avro_encoder.encode(None, schema=null_type) - assert len(encoded_message_content["content"]) == 0 # assert no content encoded + encoded_message_content = sr_avro_encoder.encode(None, schema=null_type) + assert len(encoded_message_content["content"]) == 0 # assert no content encoded @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy @@ -600,6 +605,7 @@ def test_encode_record(self, **kwargs): {"name":"randb","type":"bytes"} ] }""" + # fmt: off content = { "name": u"Ben", "age": 3, @@ -607,7 +613,8 @@ def test_encode_record(self, **kwargs): "height": 13.5, "randb": b"\u00FF" } + # fmt: on encoded_message_content = sr_avro_encoder.encode(content, schema=schema_record) decoded_content = sr_avro_encoder.decode(encoded_message_content) - assert decoded_content == content + assert decoded_content == content diff --git a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder_async.py b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder_async.py index f5749280a2e9..b729733f8405 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder_async.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroencoder/tests/test_avro_encoder_async.py @@ -46,49 +46,56 @@ EnvironmentVariableLoader, "schemaregistry", schemaregistry_avro_fully_qualified_namespace="fake_resource_avro.servicebus.windows.net", - schemaregistry_group="fakegroup" + schemaregistry_group="fakegroup", ) + class TestAvroEncoderAsync(AzureRecordedTestCase): def create_client(self, **kwargs): fully_qualified_namespace = kwargs.pop("fully_qualified_namespace") credential = self.get_credential(SchemaRegistryClient, is_async=True) - return self.create_client_from_credential(SchemaRegistryClient, credential, fully_qualified_namespace=fully_qualified_namespace, is_async=True) + return self.create_client_from_credential( + SchemaRegistryClient, credential, fully_qualified_namespace=fully_qualified_namespace, is_async=True + ) @pytest.mark.asyncio @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_basic_sr_avro_encoder_with_auto_register_schemas(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_basic_sr_avro_encoder_with_auto_register_schemas( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) async with sr_client: schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - schema_str = "{\"type\": \"record\", \"name\": \"User\", \"namespace\": \"example.avro\", \"fields\": [{\"type\": \"string\", \"name\": \"name\"}, {\"type\": [\"int\", \"null\"], \"name\": \"favorite_number\"}, {\"type\": [\"string\", \"null\"], \"name\": \"favorite_color\"}]}" + schema_str = '{"type": "record", "name": "User", "namespace": "example.avro", "fields": [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, {"type": ["string", "null"], "name": "favorite_color"}]}' schema = avro.schema.parse(schema_str) - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} encoded_message_content = await sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] # wrong data type - dict_content_bad = {"name": u"Ben", "favorite_number": 7, "favorite_color": 7} + dict_content_bad = {"name": "Ben", "favorite_number": 7, "favorite_color": 7} with pytest.raises(InvalidContentError) as e: encoded_message_content = await sr_avro_encoder.encode(dict_content_bad, schema=schema_str) assert "schema_id" in e.value.details - assert content_type.split("+")[0] == 'avro/binary' - schema_properties = await sr_client.get_schema_properties(schemaregistry_group, schema.fullname, str(schema), "Avro") + assert content_type.split("+")[0] == "avro/binary" + schema_properties = await sr_client.get_schema_properties( + schemaregistry_group, schema.fullname, str(schema), "Avro" + ) schema_id = schema_properties.id assert content_type.split("+")[1] == schema_id encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = await sr_avro_encoder.decode(encoded_content_dict) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" # bad content type mime_type, schema_id = encoded_content_dict["content_type"].split("+") @@ -96,7 +103,7 @@ async def test_basic_sr_avro_encoder_with_auto_register_schemas(self, schemaregi with pytest.raises(InvalidContentError) as e: decoded_content = await sr_avro_encoder.decode(encoded_content_dict) - encoded_content_dict["content_type"] = 'a+b+c' + encoded_content_dict["content_type"] = "a+b+c" with pytest.raises(InvalidContentError) as e: decoded_content = await sr_avro_encoder.decode(encoded_content_dict) @@ -106,12 +113,12 @@ def __init__(self, not_content): self.not_content = not_content with pytest.raises(TypeError) as e: - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_str, message_type=BadExample) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_str, message_type=BadExample) assert "subtype of the MessageType" in (str(e.value)) - bad_ex = BadExample('fake') + bad_ex = BadExample("fake") with pytest.raises(TypeError) as e: - await sr_avro_encoder.decode(message=bad_ex) + await sr_avro_encoder.decode(message=bad_ex) assert "subtype of the MessageType" in (str(e.value)) # check that AvroEncoder will work with message types that follow protocols @@ -119,8 +126,8 @@ class GoodExample: def __init__(self, content, **kwargs): self.content = content self.content_type = None - self.extra = kwargs.pop('extra', None) - + self.extra = kwargs.pop("extra", None) + @classmethod def from_message_content(cls, content: bytes, content_type: str, **kwargs): ge = cls(content) @@ -130,20 +137,22 @@ def from_message_content(cls, content: bytes, content_type: str, **kwargs): def __message_content__(self): return {"content": self.content, "content_type": self.content_type} - good_ex_obj = await sr_avro_encoder.encode(dict_content, schema=schema_str, message_type=GoodExample, extra='val') + good_ex_obj = await sr_avro_encoder.encode( + dict_content, schema=schema_str, message_type=GoodExample, extra="val" + ) decoded_content_obj = await sr_avro_encoder.decode(message=good_ex_obj) - assert decoded_content_obj["name"] == u"Ben" + assert decoded_content_obj["name"] == "Ben" assert decoded_content_obj["favorite_number"] == 7 - assert decoded_content_obj["favorite_color"] == u"red" + assert decoded_content_obj["favorite_color"] == "red" # no group_name passed into constructor, check encode fails, but decode works extra_sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder_no_group = AvroEncoder(client=extra_sr_client, auto_register=True) decoded_content = await sr_avro_encoder_no_group.decode(encoded_message_content) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" with pytest.raises(TypeError): encoded_message_content = await sr_avro_encoder_no_group.encode(dict_content, schema=schema_str) await sr_avro_encoder_no_group.close() @@ -152,41 +161,47 @@ def __message_content__(self): @pytest.mark.asyncio @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_basic_sr_avro_encoder_without_auto_register_schemas(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_basic_sr_avro_encoder_without_auto_register_schemas( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) async with sr_client: schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - schema_str = "{\"type\": \"record\", \"name\": \"User\", \"namespace\": \"example.avro\", \"fields\": [{\"type\": \"string\", \"name\": \"name\"}, {\"type\": [\"int\", \"null\"], \"name\": \"favorite_number\"}, {\"type\": [\"string\", \"null\"], \"name\": \"favorite_color\"}]}" + schema_str = '{"type": "record", "name": "User", "namespace": "example.avro", "fields": [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, {"type": ["string", "null"], "name": "favorite_color"}]}' schema = avro.schema.parse(schema_str) - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} encoded_message_content = await sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] - assert content_type.split("+")[0] == 'avro/binary' - schema_properties = await sr_client.get_schema_properties(schemaregistry_group, schema.fullname, str(schema), "Avro") + assert content_type.split("+")[0] == "avro/binary" + schema_properties = await sr_client.get_schema_properties( + schemaregistry_group, schema.fullname, str(schema), "Avro" + ) schema_id = schema_properties.id assert content_type.split("+")[1] == schema_id encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = await sr_avro_encoder.decode(encoded_content_dict) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 - assert decoded_content["favorite_color"] == u"red" + assert decoded_content["favorite_color"] == "red" @pytest.mark.asyncio @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_basic_sr_avro_encoder_decode_readers_schema(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_basic_sr_avro_encoder_decode_readers_schema( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} encoded_message_content = await sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] @@ -195,14 +210,14 @@ async def test_basic_sr_avro_encoder_decode_readers_schema(self, schemaregistry_ readers_schema_remove_field = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]}]}""" encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = await sr_avro_encoder.decode(encoded_content_dict, readers_schema=readers_schema_remove_field) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 # readers_schema with extra field with default readers_schema_extra_field = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}, {"name":"favorite_city","type":["string","null"], "default": "Redmond"}]}""" encoded_content_dict = {"content": encoded_content, "content_type": content_type} decoded_content = await sr_avro_encoder.decode(encoded_content_dict, readers_schema=readers_schema_extra_field) - assert decoded_content["name"] == u"Ben" + assert decoded_content["name"] == "Ben" assert decoded_content["favorite_number"] == 7 assert decoded_content["favorite_color"] == "red" assert decoded_content["favorite_city"] == "Redmond" @@ -210,17 +225,19 @@ async def test_basic_sr_avro_encoder_decode_readers_schema(self, schemaregistry_ # readers_schema with changed name results in error readers_schema_change_name = """{"namespace":"fakeexample.avro","type":"record","name":"fake_user","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" with pytest.raises(InvalidSchemaError) as e: - decoded_content = await sr_avro_encoder.decode(encoded_content_dict, readers_schema=readers_schema_change_name) + decoded_content = await sr_avro_encoder.decode( + encoded_content_dict, readers_schema=readers_schema_change_name + ) assert "Incompatible schemas" in e.value.message assert "schema_id" in e.value.details assert "schema_definition" in e.value.details # invalid readers_schema invalid_schema = { - "name":"User", - "type":"record", - "namespace":"example.avro", - "fields":[{"name":"name","type":"string"}] + "name": "User", + "type": "record", + "namespace": "example.avro", + "fields": [{"name": "name", "type": "string"}], } invalid_schema_string = "{}".format(invalid_schema) with pytest.raises(InvalidSchemaError) as e: @@ -228,7 +245,7 @@ async def test_basic_sr_avro_encoder_decode_readers_schema(self, schemaregistry_ assert "Invalid schema" in e.value.message assert "schema_id" in e.value.details assert "schema_definition" in e.value.details - + @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async async def test_basic_sr_avro_encoder_with_request_options(self, **kwargs): @@ -239,82 +256,94 @@ async def test_basic_sr_avro_encoder_with_request_options(self, **kwargs): schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - dict_content = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_content = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} # if fake kwargs/incorrectly formatted request keyword passed in, should raise TypeError with pytest.raises(TypeError) as e: - encoded_message_content = await sr_avro_encoder.encode(dict_content, schema=schema_str, request_options={"fake_kwarg": True, "files": (False)}) + encoded_message_content = await sr_avro_encoder.encode( + dict_content, schema=schema_str, request_options={"fake_kwarg": True, "files": (False)} + ) encoded_message_content = await sr_avro_encoder.encode(dict_content, schema=schema_str) content_type = encoded_message_content["content_type"] encoded_content = encoded_message_content["content"] encoded_content_dict = {"content": encoded_content, "content_type": content_type} with pytest.raises(TypeError) as e: - decoded_content = await sr_avro_encoder.decode(encoded_content_dict, request_options={"fake_kwarg": True, "files": (False)}) + decoded_content = await sr_avro_encoder.decode( + encoded_content_dict, request_options={"fake_kwarg": True, "files": (False)} + ) - ################################################################# + ################################################################# ######################### PARSE SCHEMAS ######################### - ################################################################# + ################################################################# @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_invalid_json_string(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_invalid_json_string( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) invalid_schema = { - "name":"User", - "type":"record", - "namespace":"example.avro", - "fields":[{"name":"name","type":"string"}] + "name": "User", + "type": "record", + "namespace": "example.avro", + "fields": [{"name": "name", "type": "string"}], } invalid_schema_string = "{}".format(invalid_schema) with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=invalid_schema_string) + await sr_avro_encoder.encode({"name": "Ben"}, schema=invalid_schema_string) ######################### PRIMITIVES ######################### @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_primitive_types(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_primitive_types( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) primitive_string = "string" with pytest.raises(InvalidSchemaError) as e: - await sr_avro_encoder.encode("hello", schema=primitive_string) + await sr_avro_encoder.encode("hello", schema=primitive_string) ######################### type fixed ######################### @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_fixed_types(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_fixed_types( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) # avro bug: should give warning from IgnoredLogicalType error since precision < 0 - #fixed_type_ignore_logical_type_error = """{"type": "fixed", "size": 4, "namespace":"example.avro", "name":"User", "precision": -1}""" - #await sr_avro_encoder.encode({}, schema=fixed_type_ignore_logical_type_error) + # fixed_type_ignore_logical_type_error = """{"type": "fixed", "size": 4, "namespace":"example.avro", "name":"User", "precision": -1}""" + # await sr_avro_encoder.encode({}, schema=fixed_type_ignore_logical_type_error) schema_no_size = """{"type": "fixed", "name":"User"}""" - with pytest.raises(InvalidSchemaError): # caught AvroException - await sr_avro_encoder.encode({}, schema=schema_no_size) + with pytest.raises(InvalidSchemaError): # caught AvroException + await sr_avro_encoder.encode({}, schema=schema_no_size) schema_no_name = """{"type": "fixed", "size": 3}""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({}, schema=schema_no_name) + await sr_avro_encoder.encode({}, schema=schema_no_name) schema_wrong_name = """{"type": "fixed", "name": 1, "size": 3}""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({}, schema=schema_wrong_name) + await sr_avro_encoder.encode({}, schema=schema_wrong_name) schema_wrong_namespace = """{"type": "fixed", "name": "User", "size": 3, "namespace": 1}""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({}, schema=schema_wrong_namespace) + await sr_avro_encoder.encode({}, schema=schema_wrong_namespace) ######################### type unspecified ######################### @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_invalid_type(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_invalid_type( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) @@ -324,7 +353,7 @@ async def test_parse_invalid_type(self, schemaregistry_avro_fully_qualified_name "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_no_type) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_no_type) schema_wrong_type_type = """{ "name":"User", @@ -333,13 +362,15 @@ async def test_parse_invalid_type(self, schemaregistry_avro_fully_qualified_name "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_type_type) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_type_type) ######################### RECORD SCHEMA ######################### @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_record_name( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) @@ -349,7 +380,7 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "type":"record", "fields":[{"name":"name","type":"string"}] }""" - encoded_schema = await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_name_has_dot) + encoded_schema = await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_name_has_dot) schema_id = encoded_schema["content_type"].split("+")[1] registered_schema = await sr_client.get_schema(schema_id) decoded_registered_schema = json.loads(registered_schema.definition) @@ -362,7 +393,7 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "type":"record", "fields":[{"name":"name","type":"string"}] }""" - encoded_schema = await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_name_no_namespace) + encoded_schema = await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_name_no_namespace) schema_id = encoded_schema["content_type"].split("+")[1] registered_schema = await sr_client.get_schema(schema_id) decoded_registered_schema = json.loads(registered_schema.definition) @@ -377,7 +408,7 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_invalid_fullname) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_invalid_fullname) schema_invalid_name_in_fullname = """{ "name":"1abc", @@ -385,7 +416,7 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_invalid_name_in_fullname) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_invalid_name_in_fullname) schema_invalid_name_reserved_type = """{ "name":"long", @@ -393,7 +424,7 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_invalid_name_reserved_type) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_invalid_name_reserved_type) schema_wrong_type_name = """{ "name":1, @@ -402,7 +433,7 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_type_name) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_type_name) schema_no_name = """{ "namespace":"example.avro", @@ -410,11 +441,13 @@ async def test_parse_record_name(self, schemaregistry_avro_fully_qualified_names "fields":[{"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_no_name) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_no_name) @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_error_schema_as_record(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_error_schema_as_record( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) @@ -424,7 +457,7 @@ async def test_parse_error_schema_as_record(self, schemaregistry_avro_fully_qual "type":"error", "fields":[{"name":"name","type":"string"}] }""" - encoded_message_content = await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_error_type) + encoded_message_content = await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_error_type) schema_id = encoded_message_content["content_type"].split("+")[1] registered_schema = await sr_client.get_schema(schema_id) decoded_registered_schema = json.loads(registered_schema.definition) @@ -432,7 +465,9 @@ async def test_parse_error_schema_as_record(self, schemaregistry_avro_fully_qual @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_parse_record_fields( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) @@ -442,7 +477,7 @@ async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_nam "type":"record" }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_no_fields) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_no_fields) schema_wrong_type_fields = """{ "name":"User", @@ -451,7 +486,7 @@ async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_nam "fields": "hello" }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_type_fields) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_type_fields) schema_wrong_field_item_type = """{ "name":"User", @@ -460,25 +495,25 @@ async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_nam "fields": ["hello"] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_wrong_field_item_type) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_wrong_field_item_type) - schema_record_field_no_name= """{ + schema_record_field_no_name = """{ "name":"User", "namespace":"example.avro", "type":"record", "fields":[{"type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_field_no_name) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_field_no_name) - schema_record_field_wrong_type_name= """{ + schema_record_field_wrong_type_name = """{ "name":"User", "namespace":"example.avro", "type":"record", "fields":[{"name": 1, "type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_field_wrong_type_name) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_field_wrong_type_name) schema_record_field_with_invalid_order = """{ "name":"User", @@ -487,7 +522,7 @@ async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_nam "fields":[{"name":"name","type":"string","order":"fake_order"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_field_with_invalid_order) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_field_with_invalid_order) schema_record_duplicate_fields = """{ "name":"User", @@ -496,7 +531,7 @@ async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_nam "fields":[{"name":"name","type":"string"}, {"name":"name","type":"string"}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_record_duplicate_fields) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_record_duplicate_fields) schema_field_type_invalid = """{ "name":"User", @@ -505,21 +540,23 @@ async def test_parse_record_fields(self, schemaregistry_avro_fully_qualified_nam "fields":[{"name":"name","type":1}] }""" with pytest.raises(InvalidSchemaError): - await sr_avro_encoder.encode({"name": u"Ben"}, schema=schema_field_type_invalid) + await sr_avro_encoder.encode({"name": "Ben"}, schema=schema_field_type_invalid) - ################################################################# + ################################################################# #################### ENCODE AND DECODE ########################## - ################################################################# + ################################################################# @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async - async def test_encode_primitive(self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs): + async def test_encode_primitive( + self, schemaregistry_avro_fully_qualified_namespace, schemaregistry_group, **kwargs + ): sr_client = self.create_client(fully_qualified_namespace=schemaregistry_avro_fully_qualified_namespace) sr_avro_encoder = AvroEncoder(client=sr_client, group_name=schemaregistry_group, auto_register=True) null_type = """{"type": "null"}""" - encoded_message_content = await sr_avro_encoder.encode(None, schema=null_type) - assert len(encoded_message_content["content"]) == 0 # assert no content encoded + encoded_message_content = await sr_avro_encoder.encode(None, schema=null_type) + assert len(encoded_message_content["content"]) == 0 # assert no content encoded @SchemaRegistryEnvironmentVariableLoader() @recorded_by_proxy_async @@ -545,6 +582,7 @@ async def test_encode_record(self, schemaregistry_avro_fully_qualified_namespace {"name":"randb","type":"bytes"} ] }""" + # fmt: off content = { "name": u"Ben", "age": 3, @@ -552,6 +590,7 @@ async def test_encode_record(self, schemaregistry_avro_fully_qualified_namespace "height": 13.5, "randb": b"\u00FF" } + # fmt: on encoded_message_content = await sr_avro_encoder.encode(content, schema=schema_record) decoded_content = await sr_avro_encoder.decode(encoded_message_content) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_operations/_patch.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_operations/_patch.py index 340148056507..fd455510c14f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_operations/_patch.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, IO, Any, TYPE_CHECKING, Optional from azure.core.exceptions import ( diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_patch.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_patch.py index bcb9b25f98f6..847a26def1ce 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_patch.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from __future__ import annotations from functools import partial from typing import ( @@ -213,7 +214,7 @@ def register_schema( http_request_kwargs = get_http_request_kwargs(kwargs) # ignoring return type because the generated client operations are not annotated w/ cls return type schema_properties: Dict[str, Union[int, str]] = ( - self._generated_client._register_schema( # type:ignore # pylint:disable=protected-access + self._generated_client._register_schema( # type: ignore # pylint:disable=protected-access group_name=group_name, schema_name=name, schema_content=cast(IO[Any], definition), @@ -339,7 +340,7 @@ def get_schema( # pylint: disable=docstring-missing-param,docstring-should-be-k ( http_response, schema_properties, - ) = self._generated_client._get_schema_by_id( # type:ignore # pylint:disable=protected-access + ) = self._generated_client._get_schema_by_id( # type: ignore # pylint:disable=protected-access id=schema_id, cls=prepare_schema_result, headers={ # TODO: remove when multiple content types in response are supported @@ -372,7 +373,7 @@ def get_schema( # pylint: disable=docstring-missing-param,docstring-should-be-k }, stream=True, **http_request_kwargs, - ) # type:ignore + ) # type: ignore http_response.read() properties = cast("SchemaPropertiesDict", schema_properties) return Schema( @@ -424,7 +425,7 @@ def get_schema_properties( cls=partial(prepare_schema_properties_result, format), **http_request_kwargs, ) - ) # type:ignore + ) # type: ignore properties = cast("SchemaPropertiesDict", schema_properties) return SchemaProperties(**properties) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_operations/_patch.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_operations/_patch.py index d48354e0c7be..b970b8740155 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_operations/_patch.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, IO, Any, TYPE_CHECKING, Optional from azure.core.tracing.decorator_async import distributed_trace_async diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_patch.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_patch.py index 0bd20e6137e5..c4553ed3dd20 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_patch.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from __future__ import annotations from typing import ( List, diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/__init__.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/__init__.py index 6a3cd6679330..9ee646013afd 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/__init__.py @@ -32,5 +32,4 @@ ) from ._exceptions import InvalidContentError - __all__ = ["JsonSchemaEncoder", "InvalidContentError"] diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/aio/_async_lru.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/aio/_async_lru.py index cf1f84db4ca1..2e341cad2111 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/aio/_async_lru.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/encoder/jsonencoder/aio/_async_lru.py @@ -33,7 +33,6 @@ from collections import OrderedDict from functools import _CacheInfo, _make_key, partial, wraps - __version__ = "1.0.2" __all__ = ("alru_cache",) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/models/_patch.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/models/_patch.py index b3745335d600..b609e70792d4 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/models/_patch.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List from enum import Enum diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_event_data_message_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_event_data_message_async.py index 313934779c55..75db155e3bde 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_event_data_message_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_event_data_message_async.py @@ -47,6 +47,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.aio.clientsecretcredential?view=azure-python """ + import os import asyncio import json diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_with_message_content_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_with_message_content_async.py index ec98e9084e10..d24cbc0f680f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_with_message_content_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/encode_and_decode_with_message_content_async.py @@ -47,6 +47,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.aio.clientsecretcredential?view=azure-python """ + import os import asyncio import json diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_receive_integration_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_receive_integration_async.py index a28b6abca68b..88833083dcdd 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_receive_integration_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_receive_integration_async.py @@ -28,6 +28,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/azure-identity/azure.identity.aio.defaultazurecredential?view=azure-python """ + import os import asyncio from azure.eventhub.aio import EventHubConsumerClient diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_send_integration_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_send_integration_async.py index 9aa9d70ac91c..6cfb753e5707 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_send_integration_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/jsonencoder/eventhub_send_integration_async.py @@ -27,6 +27,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/azure-identity/azure.identity.aio.defaultazurecredential?view=azure-python """ + import os import asyncio import json diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py index 3081601ddcb0..a8bba9711008 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py @@ -39,6 +39,7 @@ For more information on the async DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os import asyncio import json diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py index ac35e6dd8454..757c53b91fd7 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py @@ -22,6 +22,7 @@ For more information on the async DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os import asyncio import json diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_event_data_message.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_event_data_message.py index 42eff0c9bbfe..1cf55ef09796 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_event_data_message.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_event_data_message.py @@ -47,6 +47,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python """ + import os import json from typing import cast, Iterator diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_with_message_content.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_with_message_content.py index fc563200e1fc..18ce17fe11c3 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_with_message_content.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/encode_and_decode_with_message_content.py @@ -47,6 +47,7 @@ For more information on ClientSecretCredential, see: https://learn.microsoft.com/python/api/azure-identity/azure.identity.clientsecretcredential?view=azure-python """ + import os import json from typing import List, cast diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_receive_integration.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_receive_integration.py index a7c01bfe4421..5b47a04dda01 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_receive_integration.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_receive_integration.py @@ -28,6 +28,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python """ + import os from azure.eventhub import EventHubConsumerClient from azure.identity import DefaultAzureCredential diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_send_integration.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_send_integration.py index fe9bcad0f29f..3e7f97310eab 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_send_integration.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/jsonencoder/eventhub_send_integration.py @@ -27,6 +27,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python """ + import os import json from typing import cast, Iterator diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py index 9b0fe4c1a345..274ed9388cb7 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py @@ -39,6 +39,7 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os import json diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py index 5ae5781d4d32..7162ef372149 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py @@ -42,13 +42,13 @@ For more information on DefaultAzureCredential, see https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ + import os import json from azure.identity import DefaultAzureCredential from azure.schemaregistry import SchemaRegistryClient, SchemaFormat - SCHEMAREGISTRY_FQN = os.environ["SCHEMAREGISTRY_JSON_FULLY_QUALIFIED_NAMESPACE"] GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] NAME = "your-schema-name" diff --git a/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/aio/operations/_patch.py b/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/aio/operations/_patch.py +++ b/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/models/_patch.py b/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/models/_patch.py +++ b/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/operations/_patch.py b/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/operations/_patch.py +++ b/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/scvmm/azure-mgmt-scvmm/setup.py b/sdk/scvmm/azure-mgmt-scvmm/setup.py index 9c259fcef964..a01b1d489035 100644 --- a/sdk/scvmm/azure-mgmt-scvmm/setup.py +++ b/sdk/scvmm/azure-mgmt-scvmm/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/scvmm/azure-mgmt-scvmm/tests/conftest.py b/sdk/scvmm/azure-mgmt-scvmm/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/scvmm/azure-mgmt-scvmm/tests/conftest.py +++ b/sdk/scvmm/azure-mgmt-scvmm/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/scvmm/azure-mgmt-scvmm/tests/test_cli_mgmt_scvmm.py b/sdk/scvmm/azure-mgmt-scvmm/tests/test_cli_mgmt_scvmm.py index 8f7b12f138ef..b8ac104af03d 100644 --- a/sdk/scvmm/azure-mgmt-scvmm/tests/test_cli_mgmt_scvmm.py +++ b/sdk/scvmm/azure-mgmt-scvmm/tests/test_cli_mgmt_scvmm.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.scvmm import ScVmmMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtScVmm(AzureMgmtRecordedTestCase): diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_patch.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_patch.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_patch.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_patch.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_patch.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_patch.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_patch.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_patch.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_patch.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_patch.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-mgmt-search/setup.py b/sdk/search/azure-mgmt-search/setup.py index 31b5a197654f..036c1e256353 100644 --- a/sdk/search/azure-mgmt-search/setup.py +++ b/sdk/search/azure-mgmt-search/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_operations/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/_operations/_patch.py index 95ae9f41edb2..663a259c0be3 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_operations/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Dict, List, Optional, Union, cast import base64 import itertools diff --git a/sdk/search/azure-search-documents/azure/search/documents/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/_patch.py index 32228f20cf50..dc9364507c7a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Union, List, Dict, Optional, cast from enum import Enum import time diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_patch.py index 3ac022a67b93..e3f715f27758 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Dict, List, Optional, Union, cast from azure.core.async_paging import AsyncItemPaged, AsyncPageIterator, ReturnType diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/aio/_patch.py index 3eed18136470..f8752e910019 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Union, List, Dict, Optional, cast import asyncio # pylint: disable=do-not-import-asyncio diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_operations/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_operations/_patch.py index 139fb1ad179b..e63871636ed5 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_operations/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, cast, List, Sequence, Union, Optional, TYPE_CHECKING from azure.core import MatchConditions diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_operations/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_operations/_patch.py index 3a0b6b321e96..69f3dbe7f6ed 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_operations/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, cast, List, Sequence, Union, Optional, TYPE_CHECKING from azure.core import MatchConditions diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_operations/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_operations/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_operations/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_operations/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/knowledgebases/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/search/azure-search-documents/azure/search/documents/models/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/models/_patch.py index 1a047214579e..a02798852a47 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/models/_patch.py +++ b/sdk/search/azure-search-documents/azure/search/documents/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Dict, List, Tuple, Union, cast, Optional from azure.core.exceptions import HttpResponseError diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_index_alias_crud_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_index_alias_crud_async.py index 3bc3fe353d30..5b192c742638 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_index_alias_crud_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_index_alias_crud_async.py @@ -19,7 +19,6 @@ 3) AZURE_SEARCH_INDEX_NAME - target search index name (e.g., "hotels-sample-index") """ - import asyncio import os diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_index_crud_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_index_crud_async.py index f01c2f21bf02..a95aaffd9b5c 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_index_crud_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_index_crud_async.py @@ -18,7 +18,6 @@ 2) AZURE_SEARCH_API_KEY - the admin key for your search service """ - import os import asyncio from typing import List diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_query_autocomplete_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_query_autocomplete_async.py index 454d19538e74..8235906e7d78 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_query_autocomplete_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_query_autocomplete_async.py @@ -22,7 +22,6 @@ import os import asyncio - service_endpoint = os.environ["AZURE_SEARCH_SERVICE_ENDPOINT"] index_name = os.environ["AZURE_SEARCH_INDEX_NAME"] key = os.environ["AZURE_SEARCH_API_KEY"] diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_query_facets_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_query_facets_async.py index 39a98cc94f0b..7baa17ae97be 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_query_facets_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_query_facets_async.py @@ -22,7 +22,6 @@ import os import asyncio - service_endpoint = os.environ["AZURE_SEARCH_SERVICE_ENDPOINT"] index_name = os.environ["AZURE_SEARCH_INDEX_NAME"] key = os.environ["AZURE_SEARCH_API_KEY"] diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_query_filter_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_query_filter_async.py index 4083b2446be1..6e48d0b0b599 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_query_filter_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_query_filter_async.py @@ -22,7 +22,6 @@ import os import asyncio - service_endpoint = os.environ["AZURE_SEARCH_SERVICE_ENDPOINT"] index_name = os.environ["AZURE_SEARCH_INDEX_NAME"] key = os.environ["AZURE_SEARCH_API_KEY"] diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_query_simple_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_query_simple_async.py index 8bc4efba8373..be949499ed27 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_query_simple_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_query_simple_async.py @@ -20,7 +20,6 @@ import os import asyncio - service_endpoint = os.environ["AZURE_SEARCH_SERVICE_ENDPOINT"] index_name = os.environ["AZURE_SEARCH_INDEX_NAME"] key = os.environ["AZURE_SEARCH_API_KEY"] diff --git a/sdk/search/azure-search-documents/samples/async_samples/sample_query_suggestions_async.py b/sdk/search/azure-search-documents/samples/async_samples/sample_query_suggestions_async.py index cc70c799b77c..7a67ed9141aa 100644 --- a/sdk/search/azure-search-documents/samples/async_samples/sample_query_suggestions_async.py +++ b/sdk/search/azure-search-documents/samples/async_samples/sample_query_suggestions_async.py @@ -20,7 +20,6 @@ import os import asyncio - service_endpoint = os.environ["AZURE_SEARCH_SERVICE_ENDPOINT"] index_name = os.environ["AZURE_SEARCH_INDEX_NAME"] key = os.environ["AZURE_SEARCH_API_KEY"] diff --git a/sdk/search/azure-search-documents/samples/sample_index_alias_crud.py b/sdk/search/azure-search-documents/samples/sample_index_alias_crud.py index af53ed7c37d4..22e958785215 100644 --- a/sdk/search/azure-search-documents/samples/sample_index_alias_crud.py +++ b/sdk/search/azure-search-documents/samples/sample_index_alias_crud.py @@ -19,7 +19,6 @@ 3) AZURE_SEARCH_INDEX_NAME - target search index name (e.g., "hotels-sample-index") """ - import os service_endpoint = os.environ["AZURE_SEARCH_SERVICE_ENDPOINT"] diff --git a/sdk/search/azure-search-documents/samples/sample_index_crud.py b/sdk/search/azure-search-documents/samples/sample_index_crud.py index f918dd4771bd..7fe26fb5f54b 100644 --- a/sdk/search/azure-search-documents/samples/sample_index_crud.py +++ b/sdk/search/azure-search-documents/samples/sample_index_crud.py @@ -18,7 +18,6 @@ 2) AZURE_SEARCH_API_KEY - the admin key for your search service """ - import os from typing import List diff --git a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/_patch.py b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/_patch.py +++ b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/_patch.py b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/_patch.py +++ b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/operations/_patch.py b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/operations/_patch.py +++ b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/models/_patch.py b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/models/_patch.py +++ b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/operations/_patch.py b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/operations/_patch.py +++ b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/azure/mgmt/secretsstoreextension/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/setup.py b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/setup.py index 35afe5cc900f..a0aba465c612 100644 --- a/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/setup.py +++ b/sdk/secretsstoreextension/azure-mgmt-secretsstoreextension/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_patch.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/_patch.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/_patch.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/_patch.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_patch.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_patch.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_patch.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_patch.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_patch.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_patch.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/security/azure-mgmt-security/setup.py b/sdk/security/azure-mgmt-security/setup.py index c5ee608bdd56..4f79618d6bc9 100644 --- a/sdk/security/azure-mgmt-security/setup.py +++ b/sdk/security/azure-mgmt-security/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/_patch.py b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/_patch.py +++ b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/_patch.py b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/_patch.py +++ b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/operations/_patch.py b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/operations/_patch.py +++ b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/models/_patch.py b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/models/_patch.py +++ b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/operations/_patch.py b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/operations/_patch.py +++ b/sdk/securitydevops/azure-mgmt-securitydevops/azure/mgmt/securitydevops/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securitydevops/azure-mgmt-securitydevops/setup.py b/sdk/securitydevops/azure-mgmt-securitydevops/setup.py index 86736b692a46..77623bf87e21 100644 --- a/sdk/securitydevops/azure-mgmt-securitydevops/setup.py +++ b/sdk/securitydevops/azure-mgmt-securitydevops/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Securitydevops Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_patch.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_patch.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_patch.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_patch.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_patch.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_patch.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_patch.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_patch.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_patch.py b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_patch.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/securityinsight/azure-mgmt-securityinsight/setup.py b/sdk/securityinsight/azure-mgmt-securityinsight/setup.py index 73a9001cd3fd..be9b763f3b34 100644 --- a/sdk/securityinsight/azure-mgmt-securityinsight/setup.py +++ b/sdk/securityinsight/azure-mgmt-securityinsight/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Security Insight Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/_patch.py b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/_patch.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/_patch.py b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/_patch.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/operations/_patch.py b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/operations/_patch.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/models/_patch.py b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/models/_patch.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/operations/_patch.py b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/operations/_patch.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/azure/mgmt/selfhelp/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/setup.py b/sdk/selfhelp/azure-mgmt-selfhelp/setup.py index 831c7b6b977a..4eea083da90b 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/setup.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/tests/conftest.py b/sdk/selfhelp/azure-mgmt-selfhelp/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/tests/conftest.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/selfhelp/azure-mgmt-selfhelp/tests/test_cli_mgmt_selfhelp.py b/sdk/selfhelp/azure-mgmt-selfhelp/tests/test_cli_mgmt_selfhelp.py index d104d245b5be..8a4ea3a8f437 100644 --- a/sdk/selfhelp/azure-mgmt-selfhelp/tests/test_cli_mgmt_selfhelp.py +++ b/sdk/selfhelp/azure-mgmt-selfhelp/tests/test_cli_mgmt_selfhelp.py @@ -1,14 +1,15 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.selfhelp import SelfHelpMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy + class TestMgmtSelfHelp(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -16,4 +17,4 @@ def setup_method(self, method): @recorded_by_proxy def test_list_operations(self): - assert list(self.client.operations.list()) \ No newline at end of file + assert list(self.client.operations.list()) diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/_patch.py b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/_patch.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/_patch.py b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/_patch.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/operations/_patch.py b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/operations/_patch.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/models/_patch.py b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/models/_patch.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/operations/_patch.py b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/operations/_patch.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/azure/mgmt/serialconsole/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/setup.py b/sdk/serialconsole/azure-mgmt-serialconsole/setup.py index 0bc2347d0653..21843551e4a0 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/setup.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Serial Console" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/serialconsole/azure-mgmt-serialconsole/tests/disable_test_cli_mgmt_serialconsole.py b/sdk/serialconsole/azure-mgmt-serialconsole/tests/disable_test_cli_mgmt_serialconsole.py index c3528c15fc94..5cb6611c9fba 100644 --- a/sdk/serialconsole/azure-mgmt-serialconsole/tests/disable_test_cli_mgmt_serialconsole.py +++ b/sdk/serialconsole/azure-mgmt-serialconsole/tests/disable_test_cli_mgmt_serialconsole.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,17 +21,16 @@ import azure.mgmt.serialconsole from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + @unittest.skip("skip test") class MgmtMicrosoftSerialConsoleClientTest(AzureMgmtTestCase): def setUp(self): super(MgmtMicrosoftSerialConsoleClientTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.serialconsole.MicrosoftSerialConsoleClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.serialconsole.MicrosoftSerialConsoleClient) + @ResourceGroupPreparer(location=AZURE_LOCATION) def test_serialconsole(self, resource_group): @@ -47,6 +46,7 @@ def test_serialconsole(self, resource_group): # Disable Serial Console for a subscription[post] result = self.mgmt_client.console.disable_console() -#------------------------------------------------------------------------------ -if __name__ == '__main__': + +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_patch.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_patch.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/_patch.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/_patch.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/operations/_patch.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/operations/_patch.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_patch.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_patch.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_patch.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_patch.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicebus/azure-mgmt-servicebus/setup.py b/sdk/servicebus/azure-mgmt-servicebus/setup.py index dd1da66bd85f..6aa41dc70311 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/setup.py +++ b/sdk/servicebus/azure-mgmt-servicebus/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_patch.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_patch.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/_patch.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/_patch.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/operations/_patch.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/operations/_patch.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_patch.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_patch.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_patch.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_patch.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/setup.py b/sdk/servicefabric/azure-mgmt-servicefabric/setup.py index 1e4baeaad63d..18850bb75496 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/setup.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/tests/conftest.py b/sdk/servicefabric/azure-mgmt-servicefabric/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/tests/conftest.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/tests/disable_test_cli_mgmt_servicefabric.py b/sdk/servicefabric/azure-mgmt-servicefabric/tests/disable_test_cli_mgmt_servicefabric.py index db8eeef46fd5..732fa4d719ea 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/tests/disable_test_cli_mgmt_servicefabric.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/tests/disable_test_cli_mgmt_servicefabric.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -22,16 +22,15 @@ import azure.mgmt.servicefabric from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtServiceFabricTest(AzureMgmtTestCase): def setUp(self): super(MgmtServiceFabricTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.servicefabric.ServiceFabricManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.servicefabric.ServiceFabricManagementClient) + @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_servicefabric(self, resource_group): @@ -51,49 +50,41 @@ def test_servicefabric(self, resource_group): # Put a cluster with minimum parameters[put] BODY = { - "type": "Microsoft.ServiceFabric/clusters", - "location": "eastus", - "id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.ServiceFabric/clusters/" + CLUSTER_NAME + "", - "name": "myCluster", - "management_endpoint": "http://myCluster.eastus.cloudapp.azure.com:19080", - "fabric_settings": [ - { - "name": "UpgradeService", - "parameters": [ + "type": "Microsoft.ServiceFabric/clusters", + "location": "eastus", + "id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/resourceGroups/" + + RESOURCE_GROUP + + "/providers/Microsoft.ServiceFabric/clusters/" + + CLUSTER_NAME + + "", + "name": "myCluster", + "management_endpoint": "http://myCluster.eastus.cloudapp.azure.com:19080", + "fabric_settings": [ + {"name": "UpgradeService", "parameters": [{"name": "AppPollIntervalInSeconds", "value": "60"}]} + ], + "diagnostics_storage_account_config": { + "storage_account_name": "diag", + "protected_account_key_name": "StorageAccountKey1", + "blob_endpoint": "https://diag.blob.core.windows.net/", + "queue_endpoint": "https://diag.queue.core.windows.net/", + "table_endpoint": "https://diag.table.core.windows.net/", + }, + "node_types": [ { - "name": "AppPollIntervalInSeconds", - "value": "60" + "name": "nt1vm", + "client_connection_endpoint_port": "19000", + "http_gateway_endpoint_port": "19007", + "application_ports": {"start_port": "20000", "end_port": "30000"}, + "ephemeral_ports": {"start_port": "49000", "end_port": "64000"}, + "is_primary": True, + "vm_instance_count": "5", + "durability_level": "Bronze", } - ] - } - ], - "diagnostics_storage_account_config": { - "storage_account_name": "diag", - "protected_account_key_name": "StorageAccountKey1", - "blob_endpoint": "https://diag.blob.core.windows.net/", - "queue_endpoint": "https://diag.queue.core.windows.net/", - "table_endpoint": "https://diag.table.core.windows.net/" - }, - "node_types": [ - { - "name": "nt1vm", - "client_connection_endpoint_port": "19000", - "http_gateway_endpoint_port": "19007", - "application_ports": { - "start_port": "20000", - "end_port": "30000" - }, - "ephemeral_ports": { - "start_port": "49000", - "end_port": "64000" - }, - "is_primary": True, - "vm_instance_count": "5", - "durability_level": "Bronze" - } - ], - "reliability_level": "Silver", - "upgrade_mode": "Automatic" + ], + "reliability_level": "Silver", + "upgrade_mode": "Automatic", } result = self.mgmt_client.clusters.create_or_update(resource_group.name, CLUSTER_NAME, BODY) result = result.result() @@ -527,6 +518,6 @@ def test_servicefabric(self, resource_group): result = self.mgmt_client.clusters.delete(resource_group.name, CLUSTER_NAME) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/tests/test_cli_mgmt_servicefabric.py b/sdk/servicefabric/azure-mgmt-servicefabric/tests/test_cli_mgmt_servicefabric.py index 29b955955874..90c1621dcf41 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/tests/test_cli_mgmt_servicefabric.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/tests/test_cli_mgmt_servicefabric.py @@ -1,14 +1,15 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.servicefabric import ServiceFabricManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, ResourceGroupPreparer, recorded_by_proxy + class TestMgmtServiceFabric(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -21,4 +22,4 @@ def test_list_by_resource_group(self, resource_group): @recorded_by_proxy def test_list_operations(self): - assert list(self.client.operations.list()) \ No newline at end of file + assert list(self.client.operations.list()) diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/__init__.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/__init__.py index 4fb9457e85d0..fae0e7eba0c0 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/__init__.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/__init__.py @@ -11,9 +11,9 @@ from ._configuration import ServiceFabricClientAPIsConfiguration from ._service_fabric_client_ap_is import ServiceFabricClientAPIs -__all__ = ['ServiceFabricClientAPIs', 'ServiceFabricClientAPIsConfiguration'] + +__all__ = ["ServiceFabricClientAPIs", "ServiceFabricClientAPIsConfiguration"] from .version import VERSION __version__ = VERSION - diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py index f742cea0cdb9..2d7bb50a2cd9 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_configuration.py @@ -25,19 +25,18 @@ class ServiceFabricClientAPIsConfiguration(Configuration): :param str base_url: Service URL """ - def __init__( - self, credentials, base_url=None): + def __init__(self, credentials, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if not base_url: - base_url = 'http://localhost:19080' + base_url = "http://localhost:19080" super(ServiceFabricClientAPIsConfiguration, self).__init__(base_url) # Starting Autorest.Python 4.0.64, make connection pool activated by default self.keep_alive = True - self.add_user_agent('azure-servicefabric/{}'.format(VERSION)) + self.add_user_agent("azure-servicefabric/{}".format(VERSION)) self.credentials = credentials diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py index 420ccd342c06..5474158a02c1 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py @@ -57,32 +57,28 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin, SDKClient) :param str base_url: Service URL """ - def __init__( - self, credentials, base_url=None): + def __init__(self, credentials, base_url=None): self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url) super(ServiceFabricClientAPIs, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '8.2' + self.api_version = "8.2" self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.mesh_secret = MeshSecretOperations( - self._client, self.config, self._serialize, self._deserialize) + self.mesh_secret = MeshSecretOperations(self._client, self.config, self._serialize, self._deserialize) self.mesh_secret_value = MeshSecretValueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_volume = MeshVolumeOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_network = MeshNetworkOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_application = MeshApplicationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service = MeshServiceOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self.config, self._serialize, self._deserialize + ) + self.mesh_volume = MeshVolumeOperations(self._client, self.config, self._serialize, self._deserialize) + self.mesh_network = MeshNetworkOperations(self._client, self.config, self._serialize, self._deserialize) + self.mesh_application = MeshApplicationOperations(self._client, self.config, self._serialize, self._deserialize) + self.mesh_service = MeshServiceOperations(self._client, self.config, self._serialize, self._deserialize) self.mesh_code_package = MeshCodePackageOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self.config, self._serialize, self._deserialize + ) self.mesh_service_replica = MeshServiceReplicaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_gateway = MeshGatewayOperations( - self._client, self.config, self._serialize, self._deserialize) + self._client, self.config, self._serialize, self._deserialize + ) + self.mesh_gateway = MeshGatewayOperations(self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py index e5c88abd6886..4a692e67f879 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py @@ -1171,639 +1171,640 @@ ) __all__ = [ - 'AadMetadata', - 'AadMetadataObject', - 'AddRemoveIncrementalNamedPartitionScalingMechanism', - 'AddRemoveReplicaScalingMechanism', - 'AnalysisEventMetadata', - 'ApplicationBackupConfigurationInfo', - 'ApplicationBackupEntity', - 'ApplicationCapacityDescription', - 'ApplicationContainerInstanceExitedEvent', - 'ApplicationCreatedEvent', - 'ApplicationDeletedEvent', - 'ApplicationDescription', - 'ApplicationEvent', - 'ApplicationHealth', - 'ApplicationHealthEvaluation', - 'ApplicationHealthPolicies', - 'ApplicationHealthPolicy', - 'ApplicationHealthPolicyMapItem', - 'ApplicationHealthPolicyMapObject', - 'ApplicationHealthReportExpiredEvent', - 'ApplicationHealthState', - 'ApplicationHealthStateChunk', - 'ApplicationHealthStateChunkList', - 'ApplicationHealthStateFilter', - 'ApplicationInfo', - 'ApplicationLoadInfo', - 'ApplicationLoadMetricInformation', - 'ApplicationMetricDescription', - 'ApplicationNameInfo', - 'ApplicationNewHealthReportEvent', - 'ApplicationParameter', - 'ApplicationProcessExitedEvent', - 'ApplicationResourceDescription', - 'ApplicationResourceUpgradeProgressInfo', - 'ApplicationScopedVolume', - 'ApplicationScopedVolumeCreationParameters', - 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', - 'ApplicationsHealthEvaluation', - 'ApplicationTypeApplicationsHealthEvaluation', - 'ApplicationTypeHealthPolicyMapItem', - 'ApplicationTypeImageStorePath', - 'ApplicationTypeInfo', - 'ApplicationTypeManifest', - 'ApplicationUpdateDescription', - 'ApplicationUpgradeCompletedEvent', - 'ApplicationUpgradeDescription', - 'ApplicationUpgradeDomainCompletedEvent', - 'ApplicationUpgradeProgressInfo', - 'ApplicationUpgradeRollbackCompletedEvent', - 'ApplicationUpgradeRollbackStartedEvent', - 'ApplicationUpgradeStartedEvent', - 'ApplicationUpgradeUpdateDescription', - 'AutoScalingMechanism', - 'AutoScalingMetric', - 'AutoScalingPolicy', - 'AutoScalingResourceMetric', - 'AutoScalingTrigger', - 'AverageLoadScalingTrigger', - 'AveragePartitionLoadScalingTrigger', - 'AverageServiceLoadScalingTrigger', - 'AzureBlobBackupStorageDescription', - 'AzureInternalMonitoringPipelineSinkDescription', - 'BackupConfigurationInfo', - 'BackupEntity', - 'BackupInfo', - 'BackupPartitionDescription', - 'BackupPolicyDescription', - 'BackupProgressInfo', - 'BackupScheduleDescription', - 'BackupStorageDescription', - 'BackupSuspensionInfo', - 'BasicRetentionPolicyDescription', - 'BinaryPropertyValue', - 'Chaos', - 'ChaosCodePackageRestartScheduledEvent', - 'ChaosContext', - 'ChaosEvent', - 'ChaosEventsSegment', - 'ChaosEventWrapper', - 'ChaosNodeRestartScheduledEvent', - 'ChaosParameters', - 'ChaosParametersDictionaryItem', - 'ChaosPartitionPrimaryMoveScheduledEvent', - 'ChaosPartitionSecondaryMoveScheduledEvent', - 'ChaosReplicaRemovalScheduledEvent', - 'ChaosReplicaRestartScheduledEvent', - 'ChaosSchedule', - 'ChaosScheduleDescription', - 'ChaosScheduleJob', - 'ChaosScheduleJobActiveDaysOfWeek', - 'ChaosStartedEvent', - 'ChaosStoppedEvent', - 'ChaosTargetFilter', - 'CheckExistsPropertyBatchOperation', - 'CheckSequencePropertyBatchOperation', - 'CheckValuePropertyBatchOperation', - 'ClusterConfiguration', - 'ClusterConfigurationUpgradeDescription', - 'ClusterConfigurationUpgradeStatusInfo', - 'ClusterEvent', - 'ClusterHealth', - 'ClusterHealthChunk', - 'ClusterHealthChunkQueryDescription', - 'ClusterHealthPolicies', - 'ClusterHealthPolicy', - 'ClusterHealthReportExpiredEvent', - 'ClusterLoadInfo', - 'ClusterManifest', - 'ClusterNewHealthReportEvent', - 'ClusterUpgradeCompletedEvent', - 'ClusterUpgradeDescriptionObject', - 'ClusterUpgradeDomainCompletedEvent', - 'ClusterUpgradeHealthPolicyObject', - 'ClusterUpgradeProgressObject', - 'ClusterUpgradeRollbackCompletedEvent', - 'ClusterUpgradeRollbackStartedEvent', - 'ClusterUpgradeStartedEvent', - 'ClusterVersion', - 'CodePackageEntryPoint', - 'CodePackageEntryPointStatistics', - 'ComposeDeploymentStatusInfo', - 'ComposeDeploymentUpgradeDescription', - 'ComposeDeploymentUpgradeProgressInfo', - 'ConfigParameterOverride', - 'ContainerApiRequestBody', - 'ContainerApiResponse', - 'ContainerApiResult', - 'ContainerCodePackageProperties', - 'ContainerEvent', - 'ContainerInstanceEvent', - 'ContainerInstanceView', - 'ContainerLabel', - 'ContainerLogs', - 'ContainerState', - 'CreateComposeDeploymentDescription', - 'CurrentUpgradeDomainProgressInfo', - 'CurrentUpgradeUnitsProgressInfo', - 'DeactivationIntentDescription', - 'DefaultExecutionPolicy', - 'DeletePropertyBatchOperation', - 'DeltaNodesCheckHealthEvaluation', - 'DeployedApplicationHealth', - 'DeployedApplicationHealthEvaluation', - 'DeployedApplicationHealthReportExpiredEvent', - 'DeployedApplicationHealthState', - 'DeployedApplicationHealthStateChunk', - 'DeployedApplicationHealthStateChunkList', - 'DeployedApplicationHealthStateFilter', - 'DeployedApplicationInfo', - 'DeployedApplicationNewHealthReportEvent', - 'DeployedApplicationsHealthEvaluation', - 'DeployedCodePackageInfo', - 'DeployedServicePackageHealth', - 'DeployedServicePackageHealthEvaluation', - 'DeployedServicePackageHealthReportExpiredEvent', - 'DeployedServicePackageHealthState', - 'DeployedServicePackageHealthStateChunk', - 'DeployedServicePackageHealthStateChunkList', - 'DeployedServicePackageHealthStateFilter', - 'DeployedServicePackageInfo', - 'DeployedServicePackageNewHealthReportEvent', - 'DeployedServicePackagesHealthEvaluation', - 'DeployedServiceReplicaDetailInfo', - 'DeployedServiceReplicaInfo', - 'DeployedServiceTypeInfo', - 'DeployedStatefulServiceReplicaDetailInfo', - 'DeployedStatefulServiceReplicaInfo', - 'DeployedStatelessServiceInstanceDetailInfo', - 'DeployedStatelessServiceInstanceInfo', - 'DeployServicePackageToNodeDescription', - 'DiagnosticsDescription', - 'DiagnosticsRef', - 'DiagnosticsSinkProperties', - 'DisableBackupDescription', - 'DiskInfo', - 'DoublePropertyValue', - 'DsmsAzureBlobBackupStorageDescription', - 'EnableBackupDescription', - 'EndpointProperties', - 'EndpointRef', - 'EnsureAvailabilitySafetyCheck', - 'EnsurePartitionQuorumSafetyCheck', - 'EntityHealth', - 'EntityHealthState', - 'EntityHealthStateChunk', - 'EntityHealthStateChunkList', - 'EntityKindHealthStateCount', - 'EnvironmentVariable', - 'Epoch', - 'EventHealthEvaluation', - 'ExecutingFaultsChaosEvent', - 'ExecutionPolicy', - 'ExternalStoreProvisionApplicationTypeDescription', - 'FabricCodeVersionInfo', - 'FabricConfigVersionInfo', - 'FabricError', 'FabricErrorException', - 'FabricErrorError', - 'FabricEvent', - 'FailedPropertyBatchInfo', - 'FailedUpgradeDomainProgressObject', - 'FailureUpgradeDomainProgressInfo', - 'FileInfo', - 'FileShareBackupStorageDescription', - 'FileVersion', - 'FolderInfo', - 'FolderSizeInfo', - 'FrequencyBasedBackupScheduleDescription', - 'GatewayDestination', - 'GatewayResourceDescription', - 'GetBackupByStorageQueryDescription', - 'GetPropertyBatchOperation', - 'GuidPropertyValue', - 'HealthEvaluation', - 'HealthEvaluationWrapper', - 'HealthEvent', - 'HealthInformation', - 'HealthStateCount', - 'HealthStatistics', - 'HttpConfig', - 'HttpHostConfig', - 'HttpRouteConfig', - 'HttpRouteMatchHeader', - 'HttpRouteMatchPath', - 'HttpRouteMatchRule', - 'IdentityDescription', - 'IdentityItemDescription', - 'ImageRegistryCredential', - 'ImageStoreContent', - 'ImageStoreCopyDescription', - 'ImageStoreInfo', - 'InlinedValueSecretResourceProperties', - 'InstanceLifecycleDescription', - 'Int64PropertyValue', - 'Int64RangePartitionInformation', - 'InvokeDataLossResult', - 'InvokeQuorumLossResult', - 'KeyValueStoreReplicaStatus', - 'LoadedPartitionInformationQueryDescription', - 'LoadedPartitionInformationResult', - 'LoadedPartitionInformationResultList', - 'LoadMetricInformation', - 'LoadMetricReport', - 'LoadMetricReportInfo', - 'LocalNetworkResourceProperties', - 'ManagedApplicationIdentity', - 'ManagedApplicationIdentityDescription', - 'ManagedIdentityAzureBlobBackupStorageDescription', - 'MetricLoadDescription', - 'MonitoringPolicyDescription', - 'NameDescription', - 'NamedPartitionInformation', - 'NamedPartitionSchemeDescription', - 'NetworkRef', - 'NetworkResourceDescription', - 'NetworkResourceProperties', - 'NetworkResourcePropertiesBase', - 'NodeAbortedEvent', - 'NodeAddedToClusterEvent', - 'NodeClosedEvent', - 'NodeDeactivateCompletedEvent', - 'NodeDeactivateStartedEvent', - 'NodeDeactivationInfo', - 'NodeDeactivationTask', - 'NodeDeactivationTaskId', - 'NodeDownEvent', - 'NodeEvent', - 'NodeHealth', - 'NodeHealthEvaluation', - 'NodeHealthReportExpiredEvent', - 'NodeHealthState', - 'NodeHealthStateChunk', - 'NodeHealthStateChunkList', - 'NodeHealthStateFilter', - 'NodeId', - 'NodeImpact', - 'NodeInfo', - 'NodeLoadInfo', - 'NodeLoadMetricInformation', - 'NodeNewHealthReportEvent', - 'NodeOpenFailedEvent', - 'NodeOpenSucceededEvent', - 'NodeRemovedFromClusterEvent', - 'NodeRepairImpactDescription', - 'NodeRepairTargetDescription', - 'NodeResult', - 'NodesHealthEvaluation', - 'NodeTagsDescription', - 'NodeTransitionProgress', - 'NodeTransitionResult', - 'NodeTypeHealthPolicyMapItem', - 'NodeTypeNodesHealthEvaluation', - 'NodeUpEvent', - 'NodeUpgradeProgressInfo', - 'OperationStatus', - 'PackageSharingPolicyInfo', - 'PagedApplicationInfoList', - 'PagedApplicationResourceDescriptionList', - 'PagedApplicationTypeInfoList', - 'PagedBackupConfigurationInfoList', - 'PagedBackupEntityList', - 'PagedBackupInfoList', - 'PagedBackupPolicyDescriptionList', - 'PagedComposeDeploymentStatusInfoList', - 'PagedDeployedApplicationInfoList', - 'PagedGatewayResourceDescriptionList', - 'PagedNetworkResourceDescriptionList', - 'PagedNodeInfoList', - 'PagedPropertyInfoList', - 'PagedReplicaInfoList', - 'PagedSecretResourceDescriptionList', - 'PagedSecretValueResourceDescriptionList', - 'PagedServiceInfoList', - 'PagedServicePartitionInfoList', - 'PagedServiceReplicaDescriptionList', - 'PagedServiceResourceDescriptionList', - 'PagedSubNameInfoList', - 'PagedUpdatePartitionLoadResultList', - 'PagedVolumeResourceDescriptionList', - 'PartitionAnalysisEvent', - 'PartitionBackupConfigurationInfo', - 'PartitionBackupEntity', - 'PartitionDataLossProgress', - 'PartitionEvent', - 'PartitionHealth', - 'PartitionHealthEvaluation', - 'PartitionHealthReportExpiredEvent', - 'PartitionHealthState', - 'PartitionHealthStateChunk', - 'PartitionHealthStateChunkList', - 'PartitionHealthStateFilter', - 'PartitionInformation', - 'PartitionInstanceCountScaleMechanism', - 'PartitionLoadInformation', - 'PartitionMetricLoadDescription', - 'PartitionNewHealthReportEvent', - 'PartitionPrimaryMoveAnalysisEvent', - 'PartitionQuorumLossProgress', - 'PartitionReconfiguredEvent', - 'PartitionRestartProgress', - 'PartitionSafetyCheck', - 'PartitionSchemeDescription', - 'PartitionsHealthEvaluation', - 'PrimaryReplicatorStatus', - 'Probe', - 'ProbeExec', - 'ProbeHttpGet', - 'ProbeHttpGetHeaders', - 'ProbeTcpSocket', - 'PropertyBatchDescriptionList', - 'PropertyBatchInfo', - 'PropertyBatchOperation', - 'PropertyDescription', - 'PropertyInfo', - 'PropertyMetadata', - 'PropertyValue', - 'ProvisionApplicationTypeDescription', - 'ProvisionApplicationTypeDescriptionBase', - 'ProvisionFabricDescription', - 'PutPropertyBatchOperation', - 'ReconfigurationInformation', - 'RegistryCredential', - 'ReliableCollectionsRef', - 'RemoteReplicatorAcknowledgementDetail', - 'RemoteReplicatorAcknowledgementStatus', - 'RemoteReplicatorStatus', - 'RepairImpactDescriptionBase', - 'RepairTargetDescriptionBase', - 'RepairTask', - 'RepairTaskApproveDescription', - 'RepairTaskCancelDescription', - 'RepairTaskDeleteDescription', - 'RepairTaskHistory', - 'RepairTaskUpdateHealthPolicyDescription', - 'RepairTaskUpdateInfo', - 'ReplicaEvent', - 'ReplicaHealth', - 'ReplicaHealthEvaluation', - 'ReplicaHealthState', - 'ReplicaHealthStateChunk', - 'ReplicaHealthStateChunkList', - 'ReplicaHealthStateFilter', - 'ReplicaInfo', - 'ReplicaLifecycleDescription', - 'ReplicaMetricLoadDescription', - 'ReplicasHealthEvaluation', - 'ReplicaStatusBase', - 'ReplicatorQueueStatus', - 'ReplicatorStatus', - 'ResolvedServiceEndpoint', - 'ResolvedServicePartition', - 'ResourceLimits', - 'ResourceRequests', - 'ResourceRequirements', - 'RestartDeployedCodePackageDescription', - 'RestartNodeDescription', - 'RestartPartitionResult', - 'RestorePartitionDescription', - 'RestoreProgressInfo', - 'ResumeApplicationUpgradeDescription', - 'ResumeClusterUpgradeDescription', - 'RetentionPolicyDescription', - 'RollingUpgradeUpdateDescription', - 'RunToCompletionExecutionPolicy', - 'SafetyCheck', - 'SafetyCheckWrapper', - 'ScalingMechanismDescription', - 'ScalingPolicyDescription', - 'ScalingTriggerDescription', - 'SecondaryActiveReplicatorStatus', - 'SecondaryIdleReplicatorStatus', - 'SecondaryReplicatorStatus', - 'SecretResourceDescription', - 'SecretResourceProperties', - 'SecretResourcePropertiesBase', - 'SecretValue', - 'SecretValueProperties', - 'SecretValueResourceDescription', - 'SeedNodeSafetyCheck', - 'SelectedPartition', - 'ServiceBackupConfigurationInfo', - 'ServiceBackupEntity', - 'ServiceCorrelationDescription', - 'ServiceCreatedEvent', - 'ServiceDeletedEvent', - 'ServiceDescription', - 'ServiceEvent', - 'ServiceFromTemplateDescription', - 'ServiceHealth', - 'ServiceHealthEvaluation', - 'ServiceHealthReportExpiredEvent', - 'ServiceHealthState', - 'ServiceHealthStateChunk', - 'ServiceHealthStateChunkList', - 'ServiceHealthStateFilter', - 'ServiceIdentity', - 'ServiceInfo', - 'ServiceLoadMetricDescription', - 'ServiceNameInfo', - 'ServiceNewHealthReportEvent', - 'ServicePartitionInfo', - 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', - 'ServicePlacementInvalidDomainPolicyDescription', - 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', - 'ServicePlacementPolicyDescription', - 'ServicePlacementPreferPrimaryDomainPolicyDescription', - 'ServicePlacementRequiredDomainPolicyDescription', - 'ServicePlacementRequireDomainDistributionPolicyDescription', - 'ServiceProperties', - 'ServiceReplicaDescription', - 'ServiceReplicaProperties', - 'ServiceResourceDescription', - 'ServicesHealthEvaluation', - 'ServiceTypeDescription', - 'ServiceTypeExtensionDescription', - 'ServiceTypeHealthPolicy', - 'ServiceTypeHealthPolicyMapItem', - 'ServiceTypeInfo', - 'ServiceTypeManifest', - 'ServiceUpdateDescription', - 'ServiceUpgradeProgress', - 'Setting', - 'SingletonPartitionInformation', - 'SingletonPartitionSchemeDescription', - 'StartClusterUpgradeDescription', - 'StartedChaosEvent', - 'StatefulReplicaHealthReportExpiredEvent', - 'StatefulReplicaNewHealthReportEvent', - 'StatefulServiceDescription', - 'StatefulServiceInfo', - 'StatefulServicePartitionInfo', - 'StatefulServiceReplicaHealth', - 'StatefulServiceReplicaHealthState', - 'StatefulServiceReplicaInfo', - 'StatefulServiceTypeDescription', - 'StatefulServiceUpdateDescription', - 'StatelessReplicaHealthReportExpiredEvent', - 'StatelessReplicaNewHealthReportEvent', - 'StatelessServiceDescription', - 'StatelessServiceInfo', - 'StatelessServiceInstanceHealth', - 'StatelessServiceInstanceHealthState', - 'StatelessServiceInstanceInfo', - 'StatelessServicePartitionInfo', - 'StatelessServiceTypeDescription', - 'StatelessServiceUpdateDescription', - 'StoppedChaosEvent', - 'StringPropertyValue', - 'SuccessfulPropertyBatchInfo', - 'SystemApplicationHealthEvaluation', - 'TcpConfig', - 'TestErrorChaosEvent', - 'TimeBasedBackupScheduleDescription', - 'TimeOfDay', - 'TimeRange', - 'UniformInt64RangePartitionSchemeDescription', - 'UnplacedReplicaInformation', - 'UnprovisionApplicationTypeDescriptionInfo', - 'UnprovisionFabricDescription', - 'UpdateClusterUpgradeDescription', - 'UpdatePartitionLoadResult', - 'UpgradeDomainDeltaNodesCheckHealthEvaluation', - 'UpgradeDomainDeployedApplicationsHealthEvaluation', - 'UpgradeDomainInfo', - 'UpgradeDomainNodesHealthEvaluation', - 'UpgradeOrchestrationServiceState', - 'UpgradeOrchestrationServiceStateSummary', - 'UpgradeUnitInfo', - 'UploadChunkRange', - 'UploadSession', - 'UploadSessionInfo', - 'UsageInfo', - 'ValidateClusterUpgradeResult', - 'ValidationFailedChaosEvent', - 'VolumeProviderParametersAzureFile', - 'VolumeReference', - 'VolumeResourceDescription', - 'WaitForInbuildReplicaSafetyCheck', - 'WaitForPrimaryPlacementSafetyCheck', - 'WaitForPrimarySwapSafetyCheck', - 'WaitForReconfigurationSafetyCheck', - 'WaitingChaosEvent', - 'HealthState', - 'FabricErrorCodes', - 'ApplicationDefinitionKind', - 'ApplicationStatus', - 'ApplicationPackageCleanupPolicy', - 'ApplicationTypeDefinitionKind', - 'ApplicationTypeStatus', - 'UpgradeKind', - 'UpgradeMode', - 'UpgradeSortOrder', - 'FailureAction', - 'UpgradeDomainState', - 'UpgradeUnitState', - 'UpgradeState', - 'NodeUpgradePhase', - 'FailureReason', - 'DeactivationIntent', - 'DeployedApplicationStatus', - 'ReplicaStatus', - 'ReplicaRole', - 'ReconfigurationPhase', - 'ReconfigurationType', - 'EntityKind', - 'FabricEventKind', - 'HealthEvaluationKind', - 'Ordering', - 'NodeDeactivationIntent', - 'NodeDeactivationStatus', - 'NodeDeactivationTaskType', - 'NodeStatus', - 'ServicePartitionStatus', - 'ServiceStatus', - 'ProvisionApplicationTypeKind', - 'UpgradeType', - 'SafetyCheckKind', - 'CreateFabricDump', - 'ServicePackageActivationMode', - 'ServiceKind', - 'ServicePartitionKind', - 'ServicePlacementPolicyType', - 'ServiceLoadMetricWeight', - 'HostType', - 'HostIsolationMode', - 'DeploymentStatus', - 'EntryPointStatus', - 'ChaosStatus', - 'ChaosScheduleStatus', - 'ChaosEventKind', - 'ComposeDeploymentStatus', - 'ComposeDeploymentUpgradeState', - 'ServiceCorrelationScheme', - 'MoveCost', - 'PartitionScheme', - 'ServiceOperationName', - 'ReplicatorOperationName', - 'PartitionAccessStatus', - 'FabricReplicaStatus', - 'ReplicaKind', - 'ServiceTypeRegistrationStatus', - 'ServiceEndpointRole', - 'OperationState', - 'OperationType', - 'PackageSharingPolicyScope', - 'PropertyValueKind', - 'PropertyBatchOperationKind', - 'PropertyBatchInfoKind', - 'RetentionPolicyType', - 'BackupStorageKind', - 'BackupScheduleKind', - 'BackupPolicyScope', - 'BackupSuspensionScope', - 'RestoreState', - 'BackupType', - 'ManagedIdentityType', - 'BackupScheduleFrequencyType', - 'DayOfWeek', - 'BackupState', - 'BackupEntityKind', - 'ImpactLevel', - 'RepairImpactKind', - 'RepairTargetKind', - 'State', - 'ResultStatus', - 'RepairTaskHealthCheckState', - 'ScalingTriggerKind', - 'ScalingMechanismKind', - 'ServiceHostUpgradeImpact', - 'ResourceStatus', - 'SecretKind', - 'VolumeProvider', - 'SizeTypes', - 'ApplicationScopedVolumeKind', - 'NetworkKind', - 'HeaderMatchType', - 'OperatingSystemType', - 'ImageRegistryPasswordType', - 'EnvironmentVariableType', - 'SettingType', - 'Scheme', - 'ApplicationResourceUpgradeState', - 'RollingUpgradeMode', - 'DiagnosticsSinkKind', - 'AutoScalingMechanismKind', - 'AutoScalingMetricKind', - 'AutoScalingResourceMetricName', - 'AutoScalingTriggerKind', - 'ExecutionPolicyType', - 'RestartPolicy', - 'NodeStatusFilter', - 'ReplicaHealthReportServiceKind', - 'DataLossMode', - 'NodeTransitionType', - 'QuorumLossMode', - 'RestartPartitionMode', + "AadMetadata", + "AadMetadataObject", + "AddRemoveIncrementalNamedPartitionScalingMechanism", + "AddRemoveReplicaScalingMechanism", + "AnalysisEventMetadata", + "ApplicationBackupConfigurationInfo", + "ApplicationBackupEntity", + "ApplicationCapacityDescription", + "ApplicationContainerInstanceExitedEvent", + "ApplicationCreatedEvent", + "ApplicationDeletedEvent", + "ApplicationDescription", + "ApplicationEvent", + "ApplicationHealth", + "ApplicationHealthEvaluation", + "ApplicationHealthPolicies", + "ApplicationHealthPolicy", + "ApplicationHealthPolicyMapItem", + "ApplicationHealthPolicyMapObject", + "ApplicationHealthReportExpiredEvent", + "ApplicationHealthState", + "ApplicationHealthStateChunk", + "ApplicationHealthStateChunkList", + "ApplicationHealthStateFilter", + "ApplicationInfo", + "ApplicationLoadInfo", + "ApplicationLoadMetricInformation", + "ApplicationMetricDescription", + "ApplicationNameInfo", + "ApplicationNewHealthReportEvent", + "ApplicationParameter", + "ApplicationProcessExitedEvent", + "ApplicationResourceDescription", + "ApplicationResourceUpgradeProgressInfo", + "ApplicationScopedVolume", + "ApplicationScopedVolumeCreationParameters", + "ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk", + "ApplicationsHealthEvaluation", + "ApplicationTypeApplicationsHealthEvaluation", + "ApplicationTypeHealthPolicyMapItem", + "ApplicationTypeImageStorePath", + "ApplicationTypeInfo", + "ApplicationTypeManifest", + "ApplicationUpdateDescription", + "ApplicationUpgradeCompletedEvent", + "ApplicationUpgradeDescription", + "ApplicationUpgradeDomainCompletedEvent", + "ApplicationUpgradeProgressInfo", + "ApplicationUpgradeRollbackCompletedEvent", + "ApplicationUpgradeRollbackStartedEvent", + "ApplicationUpgradeStartedEvent", + "ApplicationUpgradeUpdateDescription", + "AutoScalingMechanism", + "AutoScalingMetric", + "AutoScalingPolicy", + "AutoScalingResourceMetric", + "AutoScalingTrigger", + "AverageLoadScalingTrigger", + "AveragePartitionLoadScalingTrigger", + "AverageServiceLoadScalingTrigger", + "AzureBlobBackupStorageDescription", + "AzureInternalMonitoringPipelineSinkDescription", + "BackupConfigurationInfo", + "BackupEntity", + "BackupInfo", + "BackupPartitionDescription", + "BackupPolicyDescription", + "BackupProgressInfo", + "BackupScheduleDescription", + "BackupStorageDescription", + "BackupSuspensionInfo", + "BasicRetentionPolicyDescription", + "BinaryPropertyValue", + "Chaos", + "ChaosCodePackageRestartScheduledEvent", + "ChaosContext", + "ChaosEvent", + "ChaosEventsSegment", + "ChaosEventWrapper", + "ChaosNodeRestartScheduledEvent", + "ChaosParameters", + "ChaosParametersDictionaryItem", + "ChaosPartitionPrimaryMoveScheduledEvent", + "ChaosPartitionSecondaryMoveScheduledEvent", + "ChaosReplicaRemovalScheduledEvent", + "ChaosReplicaRestartScheduledEvent", + "ChaosSchedule", + "ChaosScheduleDescription", + "ChaosScheduleJob", + "ChaosScheduleJobActiveDaysOfWeek", + "ChaosStartedEvent", + "ChaosStoppedEvent", + "ChaosTargetFilter", + "CheckExistsPropertyBatchOperation", + "CheckSequencePropertyBatchOperation", + "CheckValuePropertyBatchOperation", + "ClusterConfiguration", + "ClusterConfigurationUpgradeDescription", + "ClusterConfigurationUpgradeStatusInfo", + "ClusterEvent", + "ClusterHealth", + "ClusterHealthChunk", + "ClusterHealthChunkQueryDescription", + "ClusterHealthPolicies", + "ClusterHealthPolicy", + "ClusterHealthReportExpiredEvent", + "ClusterLoadInfo", + "ClusterManifest", + "ClusterNewHealthReportEvent", + "ClusterUpgradeCompletedEvent", + "ClusterUpgradeDescriptionObject", + "ClusterUpgradeDomainCompletedEvent", + "ClusterUpgradeHealthPolicyObject", + "ClusterUpgradeProgressObject", + "ClusterUpgradeRollbackCompletedEvent", + "ClusterUpgradeRollbackStartedEvent", + "ClusterUpgradeStartedEvent", + "ClusterVersion", + "CodePackageEntryPoint", + "CodePackageEntryPointStatistics", + "ComposeDeploymentStatusInfo", + "ComposeDeploymentUpgradeDescription", + "ComposeDeploymentUpgradeProgressInfo", + "ConfigParameterOverride", + "ContainerApiRequestBody", + "ContainerApiResponse", + "ContainerApiResult", + "ContainerCodePackageProperties", + "ContainerEvent", + "ContainerInstanceEvent", + "ContainerInstanceView", + "ContainerLabel", + "ContainerLogs", + "ContainerState", + "CreateComposeDeploymentDescription", + "CurrentUpgradeDomainProgressInfo", + "CurrentUpgradeUnitsProgressInfo", + "DeactivationIntentDescription", + "DefaultExecutionPolicy", + "DeletePropertyBatchOperation", + "DeltaNodesCheckHealthEvaluation", + "DeployedApplicationHealth", + "DeployedApplicationHealthEvaluation", + "DeployedApplicationHealthReportExpiredEvent", + "DeployedApplicationHealthState", + "DeployedApplicationHealthStateChunk", + "DeployedApplicationHealthStateChunkList", + "DeployedApplicationHealthStateFilter", + "DeployedApplicationInfo", + "DeployedApplicationNewHealthReportEvent", + "DeployedApplicationsHealthEvaluation", + "DeployedCodePackageInfo", + "DeployedServicePackageHealth", + "DeployedServicePackageHealthEvaluation", + "DeployedServicePackageHealthReportExpiredEvent", + "DeployedServicePackageHealthState", + "DeployedServicePackageHealthStateChunk", + "DeployedServicePackageHealthStateChunkList", + "DeployedServicePackageHealthStateFilter", + "DeployedServicePackageInfo", + "DeployedServicePackageNewHealthReportEvent", + "DeployedServicePackagesHealthEvaluation", + "DeployedServiceReplicaDetailInfo", + "DeployedServiceReplicaInfo", + "DeployedServiceTypeInfo", + "DeployedStatefulServiceReplicaDetailInfo", + "DeployedStatefulServiceReplicaInfo", + "DeployedStatelessServiceInstanceDetailInfo", + "DeployedStatelessServiceInstanceInfo", + "DeployServicePackageToNodeDescription", + "DiagnosticsDescription", + "DiagnosticsRef", + "DiagnosticsSinkProperties", + "DisableBackupDescription", + "DiskInfo", + "DoublePropertyValue", + "DsmsAzureBlobBackupStorageDescription", + "EnableBackupDescription", + "EndpointProperties", + "EndpointRef", + "EnsureAvailabilitySafetyCheck", + "EnsurePartitionQuorumSafetyCheck", + "EntityHealth", + "EntityHealthState", + "EntityHealthStateChunk", + "EntityHealthStateChunkList", + "EntityKindHealthStateCount", + "EnvironmentVariable", + "Epoch", + "EventHealthEvaluation", + "ExecutingFaultsChaosEvent", + "ExecutionPolicy", + "ExternalStoreProvisionApplicationTypeDescription", + "FabricCodeVersionInfo", + "FabricConfigVersionInfo", + "FabricError", + "FabricErrorException", + "FabricErrorError", + "FabricEvent", + "FailedPropertyBatchInfo", + "FailedUpgradeDomainProgressObject", + "FailureUpgradeDomainProgressInfo", + "FileInfo", + "FileShareBackupStorageDescription", + "FileVersion", + "FolderInfo", + "FolderSizeInfo", + "FrequencyBasedBackupScheduleDescription", + "GatewayDestination", + "GatewayResourceDescription", + "GetBackupByStorageQueryDescription", + "GetPropertyBatchOperation", + "GuidPropertyValue", + "HealthEvaluation", + "HealthEvaluationWrapper", + "HealthEvent", + "HealthInformation", + "HealthStateCount", + "HealthStatistics", + "HttpConfig", + "HttpHostConfig", + "HttpRouteConfig", + "HttpRouteMatchHeader", + "HttpRouteMatchPath", + "HttpRouteMatchRule", + "IdentityDescription", + "IdentityItemDescription", + "ImageRegistryCredential", + "ImageStoreContent", + "ImageStoreCopyDescription", + "ImageStoreInfo", + "InlinedValueSecretResourceProperties", + "InstanceLifecycleDescription", + "Int64PropertyValue", + "Int64RangePartitionInformation", + "InvokeDataLossResult", + "InvokeQuorumLossResult", + "KeyValueStoreReplicaStatus", + "LoadedPartitionInformationQueryDescription", + "LoadedPartitionInformationResult", + "LoadedPartitionInformationResultList", + "LoadMetricInformation", + "LoadMetricReport", + "LoadMetricReportInfo", + "LocalNetworkResourceProperties", + "ManagedApplicationIdentity", + "ManagedApplicationIdentityDescription", + "ManagedIdentityAzureBlobBackupStorageDescription", + "MetricLoadDescription", + "MonitoringPolicyDescription", + "NameDescription", + "NamedPartitionInformation", + "NamedPartitionSchemeDescription", + "NetworkRef", + "NetworkResourceDescription", + "NetworkResourceProperties", + "NetworkResourcePropertiesBase", + "NodeAbortedEvent", + "NodeAddedToClusterEvent", + "NodeClosedEvent", + "NodeDeactivateCompletedEvent", + "NodeDeactivateStartedEvent", + "NodeDeactivationInfo", + "NodeDeactivationTask", + "NodeDeactivationTaskId", + "NodeDownEvent", + "NodeEvent", + "NodeHealth", + "NodeHealthEvaluation", + "NodeHealthReportExpiredEvent", + "NodeHealthState", + "NodeHealthStateChunk", + "NodeHealthStateChunkList", + "NodeHealthStateFilter", + "NodeId", + "NodeImpact", + "NodeInfo", + "NodeLoadInfo", + "NodeLoadMetricInformation", + "NodeNewHealthReportEvent", + "NodeOpenFailedEvent", + "NodeOpenSucceededEvent", + "NodeRemovedFromClusterEvent", + "NodeRepairImpactDescription", + "NodeRepairTargetDescription", + "NodeResult", + "NodesHealthEvaluation", + "NodeTagsDescription", + "NodeTransitionProgress", + "NodeTransitionResult", + "NodeTypeHealthPolicyMapItem", + "NodeTypeNodesHealthEvaluation", + "NodeUpEvent", + "NodeUpgradeProgressInfo", + "OperationStatus", + "PackageSharingPolicyInfo", + "PagedApplicationInfoList", + "PagedApplicationResourceDescriptionList", + "PagedApplicationTypeInfoList", + "PagedBackupConfigurationInfoList", + "PagedBackupEntityList", + "PagedBackupInfoList", + "PagedBackupPolicyDescriptionList", + "PagedComposeDeploymentStatusInfoList", + "PagedDeployedApplicationInfoList", + "PagedGatewayResourceDescriptionList", + "PagedNetworkResourceDescriptionList", + "PagedNodeInfoList", + "PagedPropertyInfoList", + "PagedReplicaInfoList", + "PagedSecretResourceDescriptionList", + "PagedSecretValueResourceDescriptionList", + "PagedServiceInfoList", + "PagedServicePartitionInfoList", + "PagedServiceReplicaDescriptionList", + "PagedServiceResourceDescriptionList", + "PagedSubNameInfoList", + "PagedUpdatePartitionLoadResultList", + "PagedVolumeResourceDescriptionList", + "PartitionAnalysisEvent", + "PartitionBackupConfigurationInfo", + "PartitionBackupEntity", + "PartitionDataLossProgress", + "PartitionEvent", + "PartitionHealth", + "PartitionHealthEvaluation", + "PartitionHealthReportExpiredEvent", + "PartitionHealthState", + "PartitionHealthStateChunk", + "PartitionHealthStateChunkList", + "PartitionHealthStateFilter", + "PartitionInformation", + "PartitionInstanceCountScaleMechanism", + "PartitionLoadInformation", + "PartitionMetricLoadDescription", + "PartitionNewHealthReportEvent", + "PartitionPrimaryMoveAnalysisEvent", + "PartitionQuorumLossProgress", + "PartitionReconfiguredEvent", + "PartitionRestartProgress", + "PartitionSafetyCheck", + "PartitionSchemeDescription", + "PartitionsHealthEvaluation", + "PrimaryReplicatorStatus", + "Probe", + "ProbeExec", + "ProbeHttpGet", + "ProbeHttpGetHeaders", + "ProbeTcpSocket", + "PropertyBatchDescriptionList", + "PropertyBatchInfo", + "PropertyBatchOperation", + "PropertyDescription", + "PropertyInfo", + "PropertyMetadata", + "PropertyValue", + "ProvisionApplicationTypeDescription", + "ProvisionApplicationTypeDescriptionBase", + "ProvisionFabricDescription", + "PutPropertyBatchOperation", + "ReconfigurationInformation", + "RegistryCredential", + "ReliableCollectionsRef", + "RemoteReplicatorAcknowledgementDetail", + "RemoteReplicatorAcknowledgementStatus", + "RemoteReplicatorStatus", + "RepairImpactDescriptionBase", + "RepairTargetDescriptionBase", + "RepairTask", + "RepairTaskApproveDescription", + "RepairTaskCancelDescription", + "RepairTaskDeleteDescription", + "RepairTaskHistory", + "RepairTaskUpdateHealthPolicyDescription", + "RepairTaskUpdateInfo", + "ReplicaEvent", + "ReplicaHealth", + "ReplicaHealthEvaluation", + "ReplicaHealthState", + "ReplicaHealthStateChunk", + "ReplicaHealthStateChunkList", + "ReplicaHealthStateFilter", + "ReplicaInfo", + "ReplicaLifecycleDescription", + "ReplicaMetricLoadDescription", + "ReplicasHealthEvaluation", + "ReplicaStatusBase", + "ReplicatorQueueStatus", + "ReplicatorStatus", + "ResolvedServiceEndpoint", + "ResolvedServicePartition", + "ResourceLimits", + "ResourceRequests", + "ResourceRequirements", + "RestartDeployedCodePackageDescription", + "RestartNodeDescription", + "RestartPartitionResult", + "RestorePartitionDescription", + "RestoreProgressInfo", + "ResumeApplicationUpgradeDescription", + "ResumeClusterUpgradeDescription", + "RetentionPolicyDescription", + "RollingUpgradeUpdateDescription", + "RunToCompletionExecutionPolicy", + "SafetyCheck", + "SafetyCheckWrapper", + "ScalingMechanismDescription", + "ScalingPolicyDescription", + "ScalingTriggerDescription", + "SecondaryActiveReplicatorStatus", + "SecondaryIdleReplicatorStatus", + "SecondaryReplicatorStatus", + "SecretResourceDescription", + "SecretResourceProperties", + "SecretResourcePropertiesBase", + "SecretValue", + "SecretValueProperties", + "SecretValueResourceDescription", + "SeedNodeSafetyCheck", + "SelectedPartition", + "ServiceBackupConfigurationInfo", + "ServiceBackupEntity", + "ServiceCorrelationDescription", + "ServiceCreatedEvent", + "ServiceDeletedEvent", + "ServiceDescription", + "ServiceEvent", + "ServiceFromTemplateDescription", + "ServiceHealth", + "ServiceHealthEvaluation", + "ServiceHealthReportExpiredEvent", + "ServiceHealthState", + "ServiceHealthStateChunk", + "ServiceHealthStateChunkList", + "ServiceHealthStateFilter", + "ServiceIdentity", + "ServiceInfo", + "ServiceLoadMetricDescription", + "ServiceNameInfo", + "ServiceNewHealthReportEvent", + "ServicePartitionInfo", + "ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription", + "ServicePlacementInvalidDomainPolicyDescription", + "ServicePlacementNonPartiallyPlaceServicePolicyDescription", + "ServicePlacementPolicyDescription", + "ServicePlacementPreferPrimaryDomainPolicyDescription", + "ServicePlacementRequiredDomainPolicyDescription", + "ServicePlacementRequireDomainDistributionPolicyDescription", + "ServiceProperties", + "ServiceReplicaDescription", + "ServiceReplicaProperties", + "ServiceResourceDescription", + "ServicesHealthEvaluation", + "ServiceTypeDescription", + "ServiceTypeExtensionDescription", + "ServiceTypeHealthPolicy", + "ServiceTypeHealthPolicyMapItem", + "ServiceTypeInfo", + "ServiceTypeManifest", + "ServiceUpdateDescription", + "ServiceUpgradeProgress", + "Setting", + "SingletonPartitionInformation", + "SingletonPartitionSchemeDescription", + "StartClusterUpgradeDescription", + "StartedChaosEvent", + "StatefulReplicaHealthReportExpiredEvent", + "StatefulReplicaNewHealthReportEvent", + "StatefulServiceDescription", + "StatefulServiceInfo", + "StatefulServicePartitionInfo", + "StatefulServiceReplicaHealth", + "StatefulServiceReplicaHealthState", + "StatefulServiceReplicaInfo", + "StatefulServiceTypeDescription", + "StatefulServiceUpdateDescription", + "StatelessReplicaHealthReportExpiredEvent", + "StatelessReplicaNewHealthReportEvent", + "StatelessServiceDescription", + "StatelessServiceInfo", + "StatelessServiceInstanceHealth", + "StatelessServiceInstanceHealthState", + "StatelessServiceInstanceInfo", + "StatelessServicePartitionInfo", + "StatelessServiceTypeDescription", + "StatelessServiceUpdateDescription", + "StoppedChaosEvent", + "StringPropertyValue", + "SuccessfulPropertyBatchInfo", + "SystemApplicationHealthEvaluation", + "TcpConfig", + "TestErrorChaosEvent", + "TimeBasedBackupScheduleDescription", + "TimeOfDay", + "TimeRange", + "UniformInt64RangePartitionSchemeDescription", + "UnplacedReplicaInformation", + "UnprovisionApplicationTypeDescriptionInfo", + "UnprovisionFabricDescription", + "UpdateClusterUpgradeDescription", + "UpdatePartitionLoadResult", + "UpgradeDomainDeltaNodesCheckHealthEvaluation", + "UpgradeDomainDeployedApplicationsHealthEvaluation", + "UpgradeDomainInfo", + "UpgradeDomainNodesHealthEvaluation", + "UpgradeOrchestrationServiceState", + "UpgradeOrchestrationServiceStateSummary", + "UpgradeUnitInfo", + "UploadChunkRange", + "UploadSession", + "UploadSessionInfo", + "UsageInfo", + "ValidateClusterUpgradeResult", + "ValidationFailedChaosEvent", + "VolumeProviderParametersAzureFile", + "VolumeReference", + "VolumeResourceDescription", + "WaitForInbuildReplicaSafetyCheck", + "WaitForPrimaryPlacementSafetyCheck", + "WaitForPrimarySwapSafetyCheck", + "WaitForReconfigurationSafetyCheck", + "WaitingChaosEvent", + "HealthState", + "FabricErrorCodes", + "ApplicationDefinitionKind", + "ApplicationStatus", + "ApplicationPackageCleanupPolicy", + "ApplicationTypeDefinitionKind", + "ApplicationTypeStatus", + "UpgradeKind", + "UpgradeMode", + "UpgradeSortOrder", + "FailureAction", + "UpgradeDomainState", + "UpgradeUnitState", + "UpgradeState", + "NodeUpgradePhase", + "FailureReason", + "DeactivationIntent", + "DeployedApplicationStatus", + "ReplicaStatus", + "ReplicaRole", + "ReconfigurationPhase", + "ReconfigurationType", + "EntityKind", + "FabricEventKind", + "HealthEvaluationKind", + "Ordering", + "NodeDeactivationIntent", + "NodeDeactivationStatus", + "NodeDeactivationTaskType", + "NodeStatus", + "ServicePartitionStatus", + "ServiceStatus", + "ProvisionApplicationTypeKind", + "UpgradeType", + "SafetyCheckKind", + "CreateFabricDump", + "ServicePackageActivationMode", + "ServiceKind", + "ServicePartitionKind", + "ServicePlacementPolicyType", + "ServiceLoadMetricWeight", + "HostType", + "HostIsolationMode", + "DeploymentStatus", + "EntryPointStatus", + "ChaosStatus", + "ChaosScheduleStatus", + "ChaosEventKind", + "ComposeDeploymentStatus", + "ComposeDeploymentUpgradeState", + "ServiceCorrelationScheme", + "MoveCost", + "PartitionScheme", + "ServiceOperationName", + "ReplicatorOperationName", + "PartitionAccessStatus", + "FabricReplicaStatus", + "ReplicaKind", + "ServiceTypeRegistrationStatus", + "ServiceEndpointRole", + "OperationState", + "OperationType", + "PackageSharingPolicyScope", + "PropertyValueKind", + "PropertyBatchOperationKind", + "PropertyBatchInfoKind", + "RetentionPolicyType", + "BackupStorageKind", + "BackupScheduleKind", + "BackupPolicyScope", + "BackupSuspensionScope", + "RestoreState", + "BackupType", + "ManagedIdentityType", + "BackupScheduleFrequencyType", + "DayOfWeek", + "BackupState", + "BackupEntityKind", + "ImpactLevel", + "RepairImpactKind", + "RepairTargetKind", + "State", + "ResultStatus", + "RepairTaskHealthCheckState", + "ScalingTriggerKind", + "ScalingMechanismKind", + "ServiceHostUpgradeImpact", + "ResourceStatus", + "SecretKind", + "VolumeProvider", + "SizeTypes", + "ApplicationScopedVolumeKind", + "NetworkKind", + "HeaderMatchType", + "OperatingSystemType", + "ImageRegistryPasswordType", + "EnvironmentVariableType", + "SettingType", + "Scheme", + "ApplicationResourceUpgradeState", + "RollingUpgradeMode", + "DiagnosticsSinkKind", + "AutoScalingMechanismKind", + "AutoScalingMetricKind", + "AutoScalingResourceMetricName", + "AutoScalingTriggerKind", + "ExecutionPolicyType", + "RestartPolicy", + "NodeStatusFilter", + "ReplicaHealthReportServiceKind", + "DataLossMode", + "NodeTransitionType", + "QuorumLossMode", + "RestartPartitionMode", ] diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py index 348f5df3bdde..9fd9f903a0f0 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py @@ -31,22 +31,22 @@ class AadMetadata(Model): """ _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, + "authority": {"key": "authority", "type": "str"}, + "client": {"key": "client", "type": "str"}, + "cluster": {"key": "cluster", "type": "str"}, + "login": {"key": "login", "type": "str"}, + "redirect": {"key": "redirect", "type": "str"}, + "tenant": {"key": "tenant", "type": "str"}, } def __init__(self, **kwargs): super(AadMetadata, self).__init__(**kwargs) - self.authority = kwargs.get('authority', None) - self.client = kwargs.get('client', None) - self.cluster = kwargs.get('cluster', None) - self.login = kwargs.get('login', None) - self.redirect = kwargs.get('redirect', None) - self.tenant = kwargs.get('tenant', None) + self.authority = kwargs.get("authority", None) + self.client = kwargs.get("client", None) + self.cluster = kwargs.get("cluster", None) + self.login = kwargs.get("login", None) + self.redirect = kwargs.get("redirect", None) + self.tenant = kwargs.get("tenant", None) class AadMetadataObject(Model): @@ -61,14 +61,14 @@ class AadMetadataObject(Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + "type": {"key": "type", "type": "str"}, + "metadata": {"key": "metadata", "type": "AadMetadata"}, } def __init__(self, **kwargs): super(AadMetadataObject, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.metadata = kwargs.get('metadata', None) + self.type = kwargs.get("type", None) + self.metadata = kwargs.get("metadata", None) class ScalingMechanismDescription(Model): @@ -85,15 +85,18 @@ class ScalingMechanismDescription(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} + "kind": { + "PartitionInstanceCount": "PartitionInstanceCountScaleMechanism", + "AddRemoveIncrementalNamedPartition": "AddRemoveIncrementalNamedPartitionScalingMechanism", + } } def __init__(self, **kwargs): @@ -121,25 +124,25 @@ class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescrip """ _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, + "kind": {"required": True}, + "min_partition_count": {"required": True}, + "max_partition_count": {"required": True}, + "scale_increment": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + "kind": {"key": "Kind", "type": "str"}, + "min_partition_count": {"key": "MinPartitionCount", "type": "int"}, + "max_partition_count": {"key": "MaxPartitionCount", "type": "int"}, + "scale_increment": {"key": "ScaleIncrement", "type": "int"}, } def __init__(self, **kwargs): super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.min_partition_count = kwargs.get('min_partition_count', None) - self.max_partition_count = kwargs.get('max_partition_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'AddRemoveIncrementalNamedPartition' + self.min_partition_count = kwargs.get("min_partition_count", None) + self.max_partition_count = kwargs.get("max_partition_count", None) + self.scale_increment = kwargs.get("scale_increment", None) + self.kind = "AddRemoveIncrementalNamedPartition" class AutoScalingMechanism(Model): @@ -156,16 +159,14 @@ class AutoScalingMechanism(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } + _subtype_map = {"kind": {"AddRemoveReplica": "AddRemoveReplicaScalingMechanism"}} def __init__(self, **kwargs): super(AutoScalingMechanism, self).__init__(**kwargs) @@ -192,25 +193,25 @@ class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): """ _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, + "kind": {"required": True}, + "min_count": {"required": True}, + "max_count": {"required": True}, + "scale_increment": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + "kind": {"key": "kind", "type": "str"}, + "min_count": {"key": "minCount", "type": "int"}, + "max_count": {"key": "maxCount", "type": "int"}, + "scale_increment": {"key": "scaleIncrement", "type": "int"}, } def __init__(self, **kwargs): super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.min_count = kwargs.get('min_count', None) - self.max_count = kwargs.get('max_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'AddRemoveReplica' + self.min_count = kwargs.get("min_count", None) + self.max_count = kwargs.get("max_count", None) + self.scale_increment = kwargs.get("scale_increment", None) + self.kind = "AddRemoveReplica" class AnalysisEventMetadata(Model): @@ -223,14 +224,14 @@ class AnalysisEventMetadata(Model): """ _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, + "delay": {"key": "Delay", "type": "duration"}, + "duration": {"key": "Duration", "type": "duration"}, } def __init__(self, **kwargs): super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = kwargs.get('delay', None) - self.duration = kwargs.get('duration', None) + self.delay = kwargs.get("delay", None) + self.duration = kwargs.get("duration", None) class BackupConfigurationInfo(Model): @@ -257,25 +258,29 @@ class BackupConfigurationInfo(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} + "kind": { + "Application": "ApplicationBackupConfigurationInfo", + "Service": "ServiceBackupConfigurationInfo", + "Partition": "PartitionBackupConfigurationInfo", + } } def __init__(self, **kwargs): super(BackupConfigurationInfo, self).__init__(**kwargs) - self.policy_name = kwargs.get('policy_name', None) - self.policy_inherited_from = kwargs.get('policy_inherited_from', None) - self.suspension_info = kwargs.get('suspension_info', None) + self.policy_name = kwargs.get("policy_name", None) + self.policy_inherited_from = kwargs.get("policy_inherited_from", None) + self.suspension_info = kwargs.get("suspension_info", None) self.kind = None @@ -304,21 +309,21 @@ class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.kind = 'Application' + self.application_name = kwargs.get("application_name", None) + self.kind = "Application" class BackupEntity(Model): @@ -335,15 +340,19 @@ class BackupEntity(Model): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, } _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} + "entity_kind": { + "Application": "ApplicationBackupEntity", + "Service": "ServiceBackupEntity", + "Partition": "PartitionBackupEntity", + } } def __init__(self, **kwargs): @@ -364,18 +373,18 @@ class ApplicationBackupEntity(BackupEntity): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationBackupEntity, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.entity_kind = 'Application' + self.application_name = kwargs.get("application_name", None) + self.entity_kind = "Application" class ApplicationCapacityDescription(Model): @@ -407,21 +416,21 @@ class ApplicationCapacityDescription(Model): """ _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, + "minimum_nodes": {"minimum": 0}, + "maximum_nodes": {"minimum": 0}, } _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + "minimum_nodes": {"key": "MinimumNodes", "type": "long"}, + "maximum_nodes": {"key": "MaximumNodes", "type": "long"}, + "application_metrics": {"key": "ApplicationMetrics", "type": "[ApplicationMetricDescription]"}, } def __init__(self, **kwargs): super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) + self.minimum_nodes = kwargs.get("minimum_nodes", None) + self.maximum_nodes = kwargs.get("maximum_nodes", 0) + self.application_metrics = kwargs.get("application_metrics", None) class FabricEvent(Model): @@ -448,29 +457,37 @@ class FabricEvent(Model): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + "kind": { + "ApplicationEvent": "ApplicationEvent", + "ClusterEvent": "ClusterEvent", + "ContainerInstanceEvent": "ContainerInstanceEvent", + "NodeEvent": "NodeEvent", + "PartitionEvent": "PartitionEvent", + "ReplicaEvent": "ReplicaEvent", + "ServiceEvent": "ServiceEvent", + } } def __init__(self, **kwargs): super(FabricEvent, self).__init__(**kwargs) - self.event_instance_id = kwargs.get('event_instance_id', None) - self.category = kwargs.get('category', None) - self.time_stamp = kwargs.get('time_stamp', None) - self.has_correlated_events = kwargs.get('has_correlated_events', None) + self.event_instance_id = kwargs.get("event_instance_id", None) + self.category = kwargs.get("category", None) + self.time_stamp = kwargs.get("time_stamp", None) + self.has_correlated_events = kwargs.get("has_correlated_events", None) self.kind = None @@ -515,29 +532,46 @@ class ApplicationEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, } _subtype_map = { - 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} + "kind": { + "ApplicationCreated": "ApplicationCreatedEvent", + "ApplicationDeleted": "ApplicationDeletedEvent", + "ApplicationNewHealthReport": "ApplicationNewHealthReportEvent", + "ApplicationHealthReportExpired": "ApplicationHealthReportExpiredEvent", + "ApplicationUpgradeCompleted": "ApplicationUpgradeCompletedEvent", + "ApplicationUpgradeDomainCompleted": "ApplicationUpgradeDomainCompletedEvent", + "ApplicationUpgradeRollbackCompleted": "ApplicationUpgradeRollbackCompletedEvent", + "ApplicationUpgradeRollbackStarted": "ApplicationUpgradeRollbackStartedEvent", + "ApplicationUpgradeStarted": "ApplicationUpgradeStartedEvent", + "DeployedApplicationNewHealthReport": "DeployedApplicationNewHealthReportEvent", + "DeployedApplicationHealthReportExpired": "DeployedApplicationHealthReportExpiredEvent", + "ApplicationProcessExited": "ApplicationProcessExitedEvent", + "ApplicationContainerInstanceExited": "ApplicationContainerInstanceExitedEvent", + "DeployedServicePackageNewHealthReport": "DeployedServicePackageNewHealthReportEvent", + "DeployedServicePackageHealthReportExpired": "DeployedServicePackageHealthReportExpiredEvent", + "ChaosCodePackageRestartScheduled": "ChaosCodePackageRestartScheduledEvent", + } } def __init__(self, **kwargs): super(ApplicationEvent, self).__init__(**kwargs) - self.application_id = kwargs.get('application_id', None) - self.kind = 'ApplicationEvent' + self.application_id = kwargs.get("application_id", None) + self.kind = "ApplicationEvent" class ApplicationContainerInstanceExitedEvent(ApplicationEvent): @@ -594,60 +628,60 @@ class ApplicationContainerInstanceExitedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_name": {"required": True}, + "service_package_name": {"required": True}, + "service_package_activation_id": {"required": True}, + "is_exclusive": {"required": True}, + "code_package_name": {"required": True}, + "entry_point_type": {"required": True}, + "image_name": {"required": True}, + "container_name": {"required": True}, + "host_id": {"required": True}, + "exit_code": {"required": True}, + "unexpected_termination": {"required": True}, + "start_time": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_package_name": {"key": "ServicePackageName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "is_exclusive": {"key": "IsExclusive", "type": "bool"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "entry_point_type": {"key": "EntryPointType", "type": "str"}, + "image_name": {"key": "ImageName", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, + "host_id": {"key": "HostId", "type": "str"}, + "exit_code": {"key": "ExitCode", "type": "long"}, + "unexpected_termination": {"key": "UnexpectedTermination", "type": "bool"}, + "start_time": {"key": "StartTime", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_package_name = kwargs.get('service_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.is_exclusive = kwargs.get('is_exclusive', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.entry_point_type = kwargs.get('entry_point_type', None) - self.image_name = kwargs.get('image_name', None) - self.container_name = kwargs.get('container_name', None) - self.host_id = kwargs.get('host_id', None) - self.exit_code = kwargs.get('exit_code', None) - self.unexpected_termination = kwargs.get('unexpected_termination', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'ApplicationContainerInstanceExited' + self.service_name = kwargs.get("service_name", None) + self.service_package_name = kwargs.get("service_package_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.is_exclusive = kwargs.get("is_exclusive", None) + self.code_package_name = kwargs.get("code_package_name", None) + self.entry_point_type = kwargs.get("entry_point_type", None) + self.image_name = kwargs.get("image_name", None) + self.container_name = kwargs.get("container_name", None) + self.host_id = kwargs.get("host_id", None) + self.exit_code = kwargs.get("exit_code", None) + self.unexpected_termination = kwargs.get("unexpected_termination", None) + self.start_time = kwargs.get("start_time", None) + self.kind = "ApplicationContainerInstanceExited" class ApplicationCreatedEvent(ApplicationEvent): @@ -684,33 +718,33 @@ class ApplicationCreatedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "application_definition_kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "application_definition_kind": {"key": "ApplicationDefinitionKind", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationCreatedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.kind = 'ApplicationCreated' + self.application_type_name = kwargs.get("application_type_name", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.application_definition_kind = kwargs.get("application_definition_kind", None) + self.kind = "ApplicationCreated" class ApplicationDeletedEvent(ApplicationEvent): @@ -745,30 +779,30 @@ class ApplicationDeletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationDeletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.kind = 'ApplicationDeleted' + self.application_type_name = kwargs.get("application_type_name", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.kind = "ApplicationDeleted" class ApplicationDescription(Model): @@ -806,28 +840,31 @@ class ApplicationDescription(Model): """ _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, + "name": {"required": True}, + "type_name": {"required": True}, + "type_version": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "type_version": {"key": "TypeVersion", "type": "str"}, + "parameter_list": {"key": "ParameterList", "type": "[ApplicationParameter]"}, + "application_capacity": {"key": "ApplicationCapacity", "type": "ApplicationCapacityDescription"}, + "managed_application_identity": { + "key": "ManagedApplicationIdentity", + "type": "ManagedApplicationIdentityDescription", + }, } def __init__(self, **kwargs): super(ApplicationDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.parameter_list = kwargs.get('parameter_list', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) + self.name = kwargs.get("name", None) + self.type_name = kwargs.get("type_name", None) + self.type_version = kwargs.get("type_version", None) + self.parameter_list = kwargs.get("parameter_list", None) + self.application_capacity = kwargs.get("application_capacity", None) + self.managed_application_identity = kwargs.get("managed_application_identity", None) class EntityHealth(Model): @@ -854,18 +891,18 @@ class EntityHealth(Model): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, } def __init__(self, **kwargs): super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.health_events = kwargs.get('health_events', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.health_statistics = kwargs.get('health_statistics', None) + self.aggregated_health_state = kwargs.get("aggregated_health_state", None) + self.health_events = kwargs.get("health_events", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.health_statistics = kwargs.get("health_statistics", None) class ApplicationHealth(EntityHealth): @@ -904,20 +941,23 @@ class ApplicationHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + "service_health_states": {"key": "ServiceHealthStates", "type": "[ServiceHealthState]"}, + "deployed_application_health_states": { + "key": "DeployedApplicationHealthStates", + "type": "[DeployedApplicationHealthState]", + }, } def __init__(self, **kwargs): super(ApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_health_states = kwargs.get('service_health_states', None) - self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) + self.name = kwargs.get("name", None) + self.service_health_states = kwargs.get("service_health_states", None) + self.deployed_application_health_states = kwargs.get("deployed_application_health_states", None) class HealthEvaluation(Model): @@ -955,23 +995,46 @@ class HealthEvaluation(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} + "kind": { + "Application": "ApplicationHealthEvaluation", + "Applications": "ApplicationsHealthEvaluation", + "ApplicationTypeApplications": "ApplicationTypeApplicationsHealthEvaluation", + "DeltaNodesCheck": "DeltaNodesCheckHealthEvaluation", + "DeployedApplication": "DeployedApplicationHealthEvaluation", + "DeployedApplications": "DeployedApplicationsHealthEvaluation", + "DeployedServicePackage": "DeployedServicePackageHealthEvaluation", + "DeployedServicePackages": "DeployedServicePackagesHealthEvaluation", + "Event": "EventHealthEvaluation", + "Node": "NodeHealthEvaluation", + "Nodes": "NodesHealthEvaluation", + "Partition": "PartitionHealthEvaluation", + "Partitions": "PartitionsHealthEvaluation", + "Replica": "ReplicaHealthEvaluation", + "Replicas": "ReplicasHealthEvaluation", + "Service": "ServiceHealthEvaluation", + "Services": "ServicesHealthEvaluation", + "SystemApplication": "SystemApplicationHealthEvaluation", + "UpgradeDomainDeltaNodesCheck": "UpgradeDomainDeltaNodesCheckHealthEvaluation", + "UpgradeDomainDeployedApplications": "UpgradeDomainDeployedApplicationsHealthEvaluation", + "UpgradeDomainNodes": "UpgradeDomainNodesHealthEvaluation", + "NodeTypeNodes": "NodeTypeNodesHealthEvaluation", + } } def __init__(self, **kwargs): super(HealthEvaluation, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.description = kwargs.get('description', None) + self.aggregated_health_state = kwargs.get("aggregated_health_state", None) + self.description = kwargs.get("description", None) self.kind = None @@ -1005,22 +1068,22 @@ class ApplicationHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ApplicationHealthEvaluation, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Application' + self.application_name = kwargs.get("application_name", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Application" class ApplicationHealthPolicies(Model): @@ -1035,12 +1098,15 @@ class ApplicationHealthPolicies(Model): """ _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "[ApplicationHealthPolicyMapItem]", + }, } def __init__(self, **kwargs): super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.application_health_policy_map = kwargs.get("application_health_policy_map", None) class ApplicationHealthPolicy(Model): @@ -1073,18 +1139,27 @@ class ApplicationHealthPolicy(Model): """ _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + "consider_warning_as_error": {"key": "ConsiderWarningAsError", "type": "bool"}, + "max_percent_unhealthy_deployed_applications": { + "key": "MaxPercentUnhealthyDeployedApplications", + "type": "int", + }, + "default_service_type_health_policy": { + "key": "DefaultServiceTypeHealthPolicy", + "type": "ServiceTypeHealthPolicy", + }, + "service_type_health_policy_map": { + "key": "ServiceTypeHealthPolicyMap", + "type": "[ServiceTypeHealthPolicyMapItem]", + }, } def __init__(self, **kwargs): super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) - self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) - self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) + self.consider_warning_as_error = kwargs.get("consider_warning_as_error", False) + self.max_percent_unhealthy_deployed_applications = kwargs.get("max_percent_unhealthy_deployed_applications", 0) + self.default_service_type_health_policy = kwargs.get("default_service_type_health_policy", None) + self.service_type_health_policy_map = kwargs.get("service_type_health_policy_map", None) class ApplicationHealthPolicyMapItem(Model): @@ -1101,19 +1176,19 @@ class ApplicationHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "ApplicationHealthPolicy"}, } def __init__(self, **kwargs): super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class ApplicationHealthPolicyMapObject(Model): @@ -1134,12 +1209,15 @@ class ApplicationHealthPolicyMapObject(Model): """ _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "[ApplicationHealthPolicyMapItem]", + }, } def __init__(self, **kwargs): super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.application_health_policy_map = kwargs.get("application_health_policy_map", None) class ApplicationHealthReportExpiredEvent(ApplicationEvent): @@ -1189,51 +1267,51 @@ class ApplicationHealthReportExpiredEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ApplicationHealthReportExpired' + self.application_instance_id = kwargs.get("application_instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "ApplicationHealthReportExpired" class EntityHealthState(Model): @@ -1249,12 +1327,12 @@ class EntityHealthState(Model): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, } def __init__(self, **kwargs): super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.aggregated_health_state = kwargs.get("aggregated_health_state", None) class ApplicationHealthState(EntityHealthState): @@ -1273,13 +1351,13 @@ class ApplicationHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs.get("name", None) class EntityHealthStateChunk(Model): @@ -1293,12 +1371,12 @@ class EntityHealthStateChunk(Model): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, } def __init__(self, **kwargs): super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) + self.health_state = kwargs.get("health_state", None) class ApplicationHealthStateChunk(EntityHealthStateChunk): @@ -1330,19 +1408,22 @@ class ApplicationHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "service_health_state_chunks": {"key": "ServiceHealthStateChunks", "type": "ServiceHealthStateChunkList"}, + "deployed_application_health_state_chunks": { + "key": "DeployedApplicationHealthStateChunks", + "type": "DeployedApplicationHealthStateChunkList", + }, } def __init__(self, **kwargs): super(ApplicationHealthStateChunk, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) - self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) + self.application_name = kwargs.get("application_name", None) + self.application_type_name = kwargs.get("application_type_name", None) + self.service_health_state_chunks = kwargs.get("service_health_state_chunks", None) + self.deployed_application_health_state_chunks = kwargs.get("deployed_application_health_state_chunks", None) class EntityHealthStateChunkList(Model): @@ -1355,12 +1436,12 @@ class EntityHealthStateChunkList(Model): """ _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, + "total_count": {"key": "TotalCount", "type": "long"}, } def __init__(self, **kwargs): super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) + self.total_count = kwargs.get("total_count", None) class ApplicationHealthStateChunkList(EntityHealthStateChunkList): @@ -1377,13 +1458,13 @@ class ApplicationHealthStateChunkList(EntityHealthStateChunkList): """ _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + "total_count": {"key": "TotalCount", "type": "long"}, + "items": {"key": "Items", "type": "[ApplicationHealthStateChunk]"}, } def __init__(self, **kwargs): super(ApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class ApplicationHealthStateFilter(Model): @@ -1467,20 +1548,23 @@ class ApplicationHealthStateFilter(Model): """ _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + "application_name_filter": {"key": "ApplicationNameFilter", "type": "str"}, + "application_type_name_filter": {"key": "ApplicationTypeNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "service_filters": {"key": "ServiceFilters", "type": "[ServiceHealthStateFilter]"}, + "deployed_application_filters": { + "key": "DeployedApplicationFilters", + "type": "[DeployedApplicationHealthStateFilter]", + }, } def __init__(self, **kwargs): super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = kwargs.get('application_name_filter', None) - self.application_type_name_filter = kwargs.get('application_type_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.service_filters = kwargs.get('service_filters', None) - self.deployed_application_filters = kwargs.get('deployed_application_filters', None) + self.application_name_filter = kwargs.get("application_name_filter", None) + self.application_type_name_filter = kwargs.get("application_type_name_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) + self.service_filters = kwargs.get("service_filters", None) + self.deployed_application_filters = kwargs.get("deployed_application_filters", None) class ApplicationInfo(Model): @@ -1525,28 +1609,31 @@ class ApplicationInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "type_version": {"key": "TypeVersion", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "parameters": {"key": "Parameters", "type": "[ApplicationParameter]"}, + "health_state": {"key": "HealthState", "type": "str"}, + "application_definition_kind": {"key": "ApplicationDefinitionKind", "type": "str"}, + "managed_application_identity": { + "key": "ManagedApplicationIdentity", + "type": "ManagedApplicationIdentityDescription", + }, } def __init__(self, **kwargs): super(ApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.parameters = kwargs.get('parameters', None) - self.health_state = kwargs.get('health_state', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) + self.id = kwargs.get("id", None) + self.name = kwargs.get("name", None) + self.type_name = kwargs.get("type_name", None) + self.type_version = kwargs.get("type_version", None) + self.status = kwargs.get("status", None) + self.parameters = kwargs.get("parameters", None) + self.health_state = kwargs.get("health_state", None) + self.application_definition_kind = kwargs.get("application_definition_kind", None) + self.managed_application_identity = kwargs.get("managed_application_identity", None) class ApplicationLoadInfo(Model): @@ -1585,20 +1672,23 @@ class ApplicationLoadInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + "id": {"key": "Id", "type": "str"}, + "minimum_nodes": {"key": "MinimumNodes", "type": "long"}, + "maximum_nodes": {"key": "MaximumNodes", "type": "long"}, + "node_count": {"key": "NodeCount", "type": "long"}, + "application_load_metric_information": { + "key": "ApplicationLoadMetricInformation", + "type": "[ApplicationLoadMetricInformation]", + }, } def __init__(self, **kwargs): super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', None) - self.node_count = kwargs.get('node_count', None) - self.application_load_metric_information = kwargs.get('application_load_metric_information', None) + self.id = kwargs.get("id", None) + self.minimum_nodes = kwargs.get("minimum_nodes", None) + self.maximum_nodes = kwargs.get("maximum_nodes", None) + self.node_count = kwargs.get("node_count", None) + self.application_load_metric_information = kwargs.get("application_load_metric_information", None) class ApplicationLoadMetricInformation(Model): @@ -1625,18 +1715,18 @@ class ApplicationLoadMetricInformation(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + "name": {"key": "Name", "type": "str"}, + "reservation_capacity": {"key": "ReservationCapacity", "type": "long"}, + "application_capacity": {"key": "ApplicationCapacity", "type": "long"}, + "application_load": {"key": "ApplicationLoad", "type": "long"}, } def __init__(self, **kwargs): super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.application_load = kwargs.get('application_load', None) + self.name = kwargs.get("name", None) + self.reservation_capacity = kwargs.get("reservation_capacity", None) + self.application_capacity = kwargs.get("application_capacity", None) + self.application_load = kwargs.get("application_load", None) class ApplicationMetricDescription(Model): @@ -1683,18 +1773,18 @@ class ApplicationMetricDescription(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + "name": {"key": "Name", "type": "str"}, + "maximum_capacity": {"key": "MaximumCapacity", "type": "long"}, + "reservation_capacity": {"key": "ReservationCapacity", "type": "long"}, + "total_application_capacity": {"key": "TotalApplicationCapacity", "type": "long"}, } def __init__(self, **kwargs): super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.maximum_capacity = kwargs.get('maximum_capacity', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.total_application_capacity = kwargs.get('total_application_capacity', None) + self.name = kwargs.get("name", None) + self.maximum_capacity = kwargs.get("maximum_capacity", None) + self.reservation_capacity = kwargs.get("reservation_capacity", None) + self.total_application_capacity = kwargs.get("total_application_capacity", None) class ApplicationNameInfo(Model): @@ -1714,14 +1804,14 @@ class ApplicationNameInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) + self.id = kwargs.get("id", None) + self.name = kwargs.get("name", None) class ApplicationNewHealthReportEvent(ApplicationEvent): @@ -1771,51 +1861,51 @@ class ApplicationNewHealthReportEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ApplicationNewHealthReport' + self.application_instance_id = kwargs.get("application_instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "ApplicationNewHealthReport" class ApplicationParameter(Model): @@ -1831,19 +1921,19 @@ class ApplicationParameter(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationParameter, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class ApplicationProcessExitedEvent(ApplicationEvent): @@ -1900,60 +1990,60 @@ class ApplicationProcessExitedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_name": {"required": True}, + "service_package_name": {"required": True}, + "service_package_activation_id": {"required": True}, + "is_exclusive": {"required": True}, + "code_package_name": {"required": True}, + "entry_point_type": {"required": True}, + "exe_name": {"required": True}, + "process_id": {"required": True}, + "host_id": {"required": True}, + "exit_code": {"required": True}, + "unexpected_termination": {"required": True}, + "start_time": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_package_name": {"key": "ServicePackageName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "is_exclusive": {"key": "IsExclusive", "type": "bool"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "entry_point_type": {"key": "EntryPointType", "type": "str"}, + "exe_name": {"key": "ExeName", "type": "str"}, + "process_id": {"key": "ProcessId", "type": "long"}, + "host_id": {"key": "HostId", "type": "str"}, + "exit_code": {"key": "ExitCode", "type": "long"}, + "unexpected_termination": {"key": "UnexpectedTermination", "type": "bool"}, + "start_time": {"key": "StartTime", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ApplicationProcessExitedEvent, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_package_name = kwargs.get('service_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.is_exclusive = kwargs.get('is_exclusive', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.entry_point_type = kwargs.get('entry_point_type', None) - self.exe_name = kwargs.get('exe_name', None) - self.process_id = kwargs.get('process_id', None) - self.host_id = kwargs.get('host_id', None) - self.exit_code = kwargs.get('exit_code', None) - self.unexpected_termination = kwargs.get('unexpected_termination', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'ApplicationProcessExited' + self.service_name = kwargs.get("service_name", None) + self.service_package_name = kwargs.get("service_package_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.is_exclusive = kwargs.get("is_exclusive", None) + self.code_package_name = kwargs.get("code_package_name", None) + self.entry_point_type = kwargs.get("entry_point_type", None) + self.exe_name = kwargs.get("exe_name", None) + self.process_id = kwargs.get("process_id", None) + self.host_id = kwargs.get("host_id", None) + self.exit_code = kwargs.get("exit_code", None) + self.unexpected_termination = kwargs.get("unexpected_termination", None) + self.start_time = kwargs.get("start_time", None) + self.kind = "ApplicationProcessExited" class ApplicationResourceDescription(Model): @@ -2000,41 +2090,41 @@ class ApplicationResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, + "name": {"required": True}, + "service_names": {"readonly": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "health_state": {"readonly": True}, + "unhealthy_evaluation": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "services": {"key": "properties.services", "type": "[ServiceResourceDescription]"}, + "diagnostics": {"key": "properties.diagnostics", "type": "DiagnosticsDescription"}, + "debug_params": {"key": "properties.debugParams", "type": "str"}, + "service_names": {"key": "properties.serviceNames", "type": "[str]"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "health_state": {"key": "properties.healthState", "type": "str"}, + "unhealthy_evaluation": {"key": "properties.unhealthyEvaluation", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityDescription"}, } def __init__(self, **kwargs): super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.services = kwargs.get('services', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.debug_params = kwargs.get('debug_params', None) + self.name = kwargs.get("name", None) + self.description = kwargs.get("description", None) + self.services = kwargs.get("services", None) + self.diagnostics = kwargs.get("diagnostics", None) + self.debug_params = kwargs.get("debug_params", None) self.service_names = None self.status = None self.status_details = None self.health_state = None self.unhealthy_evaluation = None - self.identity = kwargs.get('identity', None) + self.identity = kwargs.get("identity", None) class ApplicationResourceUpgradeProgressInfo(Model): @@ -2088,32 +2178,37 @@ class ApplicationResourceUpgradeProgressInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "percent_completed": {"key": "PercentCompleted", "type": "str"}, + "service_upgrade_progress": {"key": "ServiceUpgradeProgress", "type": "[ServiceUpgradeProgress]"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_duration": {"key": "UpgradeDuration", "type": "str"}, + "application_upgrade_status_details": {"key": "ApplicationUpgradeStatusDetails", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.percent_completed = kwargs.get('percent_completed', None) - self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") - self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.name = kwargs.get("name", None) + self.target_application_type_version = kwargs.get("target_application_type_version", None) + self.start_timestamp_utc = kwargs.get("start_timestamp_utc", None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.percent_completed = kwargs.get("percent_completed", None) + self.service_upgrade_progress = kwargs.get("service_upgrade_progress", None) + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "Monitored") + self.upgrade_duration = kwargs.get("upgrade_duration", "PT0H2M0S") + self.application_upgrade_status_details = kwargs.get("application_upgrade_status_details", None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get( + "upgrade_replica_set_check_timeout_in_seconds", 42949672925 + ) + self.failure_timestamp_utc = kwargs.get("failure_timestamp_utc", None) class VolumeReference(Model): @@ -2132,21 +2227,21 @@ class VolumeReference(Model): """ _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, + "name": {"required": True}, + "destination_path": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "read_only": {"key": "readOnly", "type": "bool"}, + "destination_path": {"key": "destinationPath", "type": "str"}, } def __init__(self, **kwargs): super(VolumeReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.read_only = kwargs.get('read_only', None) - self.destination_path = kwargs.get('destination_path', None) + self.name = kwargs.get("name", None) + self.read_only = kwargs.get("read_only", None) + self.destination_path = kwargs.get("destination_path", None) class ApplicationScopedVolume(VolumeReference): @@ -2169,21 +2264,21 @@ class ApplicationScopedVolume(VolumeReference): """ _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, + "name": {"required": True}, + "destination_path": {"required": True}, + "creation_parameters": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + "name": {"key": "name", "type": "str"}, + "read_only": {"key": "readOnly", "type": "bool"}, + "destination_path": {"key": "destinationPath", "type": "str"}, + "creation_parameters": {"key": "creationParameters", "type": "ApplicationScopedVolumeCreationParameters"}, } def __init__(self, **kwargs): super(ApplicationScopedVolume, self).__init__(**kwargs) - self.creation_parameters = kwargs.get('creation_parameters', None) + self.creation_parameters = kwargs.get("creation_parameters", None) class ApplicationScopedVolumeCreationParameters(Model): @@ -2202,21 +2297,21 @@ class ApplicationScopedVolumeCreationParameters(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + "kind": {"ServiceFabricVolumeDisk": "ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk"} } def __init__(self, **kwargs): super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.kind = None @@ -2236,20 +2331,20 @@ class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(Applicati """ _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, + "kind": {"required": True}, + "size_disk": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "size_disk": {"key": "sizeDisk", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) - self.size_disk = kwargs.get('size_disk', None) - self.kind = 'ServiceFabricVolumeDisk' + self.size_disk = kwargs.get("size_disk", None) + self.kind = "ServiceFabricVolumeDisk" class ApplicationsHealthEvaluation(HealthEvaluation): @@ -2283,24 +2378,24 @@ class ApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ApplicationsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Applications' + self.max_percent_unhealthy_applications = kwargs.get("max_percent_unhealthy_applications", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Applications" class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): @@ -2343,26 +2438,26 @@ class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'ApplicationTypeApplications' + self.application_type_name = kwargs.get("application_type_name", None) + self.max_percent_unhealthy_applications = kwargs.get("max_percent_unhealthy_applications", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "ApplicationTypeApplications" class ApplicationTypeHealthPolicyMapItem(Model): @@ -2381,19 +2476,19 @@ class ApplicationTypeHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "int"}, } def __init__(self, **kwargs): super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class ApplicationTypeImageStorePath(Model): @@ -2408,16 +2503,16 @@ class ApplicationTypeImageStorePath(Model): """ _validation = { - 'application_type_build_path': {'required': True}, + "application_type_build_path": {"required": True}, } _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + "application_type_build_path": {"key": "ApplicationTypeBuildPath", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = kwargs.get('application_type_build_path', None) + self.application_type_build_path = kwargs.get("application_type_build_path", None) class ApplicationTypeInfo(Model): @@ -2448,22 +2543,22 @@ class ApplicationTypeInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "default_parameter_list": {"key": "DefaultParameterList", "type": "[ApplicationParameter]"}, + "status": {"key": "Status", "type": "str"}, + "status_details": {"key": "StatusDetails", "type": "str"}, + "application_type_definition_kind": {"key": "ApplicationTypeDefinitionKind", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.default_parameter_list = kwargs.get('default_parameter_list', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) - self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) + self.name = kwargs.get("name", None) + self.version = kwargs.get("version", None) + self.default_parameter_list = kwargs.get("default_parameter_list", None) + self.status = kwargs.get("status", None) + self.status_details = kwargs.get("status_details", None) + self.application_type_definition_kind = kwargs.get("application_type_definition_kind", None) class ApplicationTypeManifest(Model): @@ -2475,12 +2570,12 @@ class ApplicationTypeManifest(Model): """ _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, + "manifest": {"key": "Manifest", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) + self.manifest = kwargs.get("manifest", None) class ApplicationUpdateDescription(Model): @@ -2529,25 +2624,25 @@ class ApplicationUpdateDescription(Model): """ _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, + "minimum_nodes": {"minimum": 0}, + "maximum_nodes": {"minimum": 0}, } _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + "flags": {"key": "Flags", "type": "str"}, + "remove_application_capacity": {"key": "RemoveApplicationCapacity", "type": "bool"}, + "minimum_nodes": {"key": "MinimumNodes", "type": "long"}, + "maximum_nodes": {"key": "MaximumNodes", "type": "long"}, + "application_metrics": {"key": "ApplicationMetrics", "type": "[ApplicationMetricDescription]"}, } def __init__(self, **kwargs): super(ApplicationUpdateDescription, self).__init__(**kwargs) - self.flags = kwargs.get('flags', None) - self.remove_application_capacity = kwargs.get('remove_application_capacity', False) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) + self.flags = kwargs.get("flags", None) + self.remove_application_capacity = kwargs.get("remove_application_capacity", False) + self.minimum_nodes = kwargs.get("minimum_nodes", None) + self.maximum_nodes = kwargs.get("maximum_nodes", 0) + self.application_metrics = kwargs.get("application_metrics", None) class ApplicationUpgradeCompletedEvent(ApplicationEvent): @@ -2585,33 +2680,33 @@ class ApplicationUpgradeCompletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeCompleted' + self.application_type_name = kwargs.get("application_type_name", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get("overall_upgrade_elapsed_time_in_ms", None) + self.kind = "ApplicationUpgradeCompleted" class ApplicationUpgradeDescription(Model): @@ -2691,40 +2786,48 @@ class ApplicationUpgradeDescription(Model): """ _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, + "name": {"required": True}, + "target_application_type_version": {"required": True}, + "upgrade_kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + "name": {"key": "Name", "type": "str"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "parameters": {"key": "Parameters", "type": "[ApplicationParameter]"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "sort_order": {"key": "SortOrder", "type": "str"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + "instance_close_delay_duration_in_seconds": {"key": "InstanceCloseDelayDurationInSeconds", "type": "long"}, + "managed_application_identity": { + "key": "ManagedApplicationIdentity", + "type": "ManagedApplicationIdentityDescription", + }, } def __init__(self, **kwargs): super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.parameters = kwargs.get('parameters', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) + self.name = kwargs.get("name", None) + self.target_application_type_version = kwargs.get("target_application_type_version", None) + self.parameters = kwargs.get("parameters", None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get( + "upgrade_replica_set_check_timeout_in_seconds", None + ) + self.force_restart = kwargs.get("force_restart", None) + self.sort_order = kwargs.get("sort_order", "Default") + self.monitoring_policy = kwargs.get("monitoring_policy", None) + self.application_health_policy = kwargs.get("application_health_policy", None) + self.instance_close_delay_duration_in_seconds = kwargs.get("instance_close_delay_duration_in_seconds", None) + self.managed_application_identity = kwargs.get("managed_application_identity", None) class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): @@ -2770,42 +2873,42 @@ class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "current_application_type_version": {"required": True}, + "application_type_version": {"required": True}, + "upgrade_state": {"required": True}, + "upgrade_domains": {"required": True}, + "upgrade_domain_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "current_application_type_version": {"key": "CurrentApplicationTypeVersion", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "str"}, + "upgrade_domain_elapsed_time_in_ms": {"key": "UpgradeDomainElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeDomainCompleted' + self.application_type_name = kwargs.get("application_type_name", None) + self.current_application_type_version = kwargs.get("current_application_type_version", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.upgrade_domains = kwargs.get("upgrade_domains", None) + self.upgrade_domain_elapsed_time_in_ms = kwargs.get("upgrade_domain_elapsed_time_in_ms", None) + self.kind = "ApplicationUpgradeDomainCompleted" class ApplicationUpgradeProgressInfo(Model): @@ -2892,50 +2995,59 @@ class ApplicationUpgradeProgressInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "[UpgradeDomainInfo]"}, + "upgrade_units": {"key": "UpgradeUnits", "type": "[UpgradeUnitInfo]"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "next_upgrade_domain": {"key": "NextUpgradeDomain", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_description": {"key": "UpgradeDescription", "type": "ApplicationUpgradeDescription"}, + "upgrade_duration_in_milliseconds": {"key": "UpgradeDurationInMilliseconds", "type": "str"}, + "upgrade_domain_duration_in_milliseconds": {"key": "UpgradeDomainDurationInMilliseconds", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "current_upgrade_domain_progress": { + "key": "CurrentUpgradeDomainProgress", + "type": "CurrentUpgradeDomainProgressInfo", + }, + "current_upgrade_units_progress": { + "key": "CurrentUpgradeUnitsProgress", + "type": "CurrentUpgradeUnitsProgressInfo", + }, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "upgrade_domain_progress_at_failure": { + "key": "UpgradeDomainProgressAtFailure", + "type": "FailureUpgradeDomainProgressInfo", + }, + "upgrade_status_details": {"key": "UpgradeStatusDetails", "type": "str"}, + "is_node_by_node": {"key": "IsNodeByNode", "type": "bool"}, } def __init__(self, **kwargs): super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_units = kwargs.get('upgrade_units', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.is_node_by_node = kwargs.get('is_node_by_node', False) + self.name = kwargs.get("name", None) + self.type_name = kwargs.get("type_name", None) + self.target_application_type_version = kwargs.get("target_application_type_version", None) + self.upgrade_domains = kwargs.get("upgrade_domains", None) + self.upgrade_units = kwargs.get("upgrade_units", None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.next_upgrade_domain = kwargs.get("next_upgrade_domain", None) + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.upgrade_description = kwargs.get("upgrade_description", None) + self.upgrade_duration_in_milliseconds = kwargs.get("upgrade_duration_in_milliseconds", None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get("upgrade_domain_duration_in_milliseconds", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.current_upgrade_domain_progress = kwargs.get("current_upgrade_domain_progress", None) + self.current_upgrade_units_progress = kwargs.get("current_upgrade_units_progress", None) + self.start_timestamp_utc = kwargs.get("start_timestamp_utc", None) + self.failure_timestamp_utc = kwargs.get("failure_timestamp_utc", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.upgrade_domain_progress_at_failure = kwargs.get("upgrade_domain_progress_at_failure", None) + self.upgrade_status_details = kwargs.get("upgrade_status_details", None) + self.is_node_by_node = kwargs.get("is_node_by_node", False) class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): @@ -2975,36 +3087,36 @@ class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeRollbackCompleted' + self.application_type_name = kwargs.get("application_type_name", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get("overall_upgrade_elapsed_time_in_ms", None) + self.kind = "ApplicationUpgradeRollbackCompleted" class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): @@ -3048,39 +3160,39 @@ class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "current_application_type_version": {"required": True}, + "application_type_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "current_application_type_version": {"key": "CurrentApplicationTypeVersion", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeRollbackStarted' + self.application_type_name = kwargs.get("application_type_name", None) + self.current_application_type_version = kwargs.get("current_application_type_version", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get("overall_upgrade_elapsed_time_in_ms", None) + self.kind = "ApplicationUpgradeRollbackStarted" class ApplicationUpgradeStartedEvent(ApplicationEvent): @@ -3125,42 +3237,42 @@ class ApplicationUpgradeStartedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "current_application_type_version": {"required": True}, + "application_type_version": {"required": True}, + "upgrade_type": {"required": True}, + "rolling_upgrade_mode": {"required": True}, + "failure_action": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "current_application_type_version": {"key": "CurrentApplicationTypeVersion", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "upgrade_type": {"key": "UpgradeType", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "failure_action": {"key": "FailureAction", "type": "str"}, } def __init__(self, **kwargs): super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.upgrade_type = kwargs.get('upgrade_type', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) - self.failure_action = kwargs.get('failure_action', None) - self.kind = 'ApplicationUpgradeStarted' + self.application_type_name = kwargs.get("application_type_name", None) + self.current_application_type_version = kwargs.get("current_application_type_version", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.upgrade_type = kwargs.get("upgrade_type", None) + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", None) + self.failure_action = kwargs.get("failure_action", None) + self.kind = "ApplicationUpgradeStarted" class ApplicationUpgradeUpdateDescription(Model): @@ -3186,23 +3298,23 @@ class ApplicationUpgradeUpdateDescription(Model): """ _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, + "name": {"required": True}, + "upgrade_kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + "name": {"key": "Name", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + "update_description": {"key": "UpdateDescription", "type": "RollingUpgradeUpdateDescription"}, } def __init__(self, **kwargs): super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.application_health_policy = kwargs.get('application_health_policy', None) - self.update_description = kwargs.get('update_description', None) + self.name = kwargs.get("name", None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.application_health_policy = kwargs.get("application_health_policy", None) + self.update_description = kwargs.get("update_description", None) class AutoScalingMetric(Model): @@ -3219,16 +3331,14 @@ class AutoScalingMetric(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } + _subtype_map = {"kind": {"Resource": "AutoScalingResourceMetric"}} def __init__(self, **kwargs): super(AutoScalingMetric, self).__init__(**kwargs) @@ -3251,22 +3361,22 @@ class AutoScalingPolicy(Model): """ _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, + "name": {"required": True}, + "trigger": {"required": True}, + "mechanism": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + "name": {"key": "name", "type": "str"}, + "trigger": {"key": "trigger", "type": "AutoScalingTrigger"}, + "mechanism": {"key": "mechanism", "type": "AutoScalingMechanism"}, } def __init__(self, **kwargs): super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.trigger = kwargs.get('trigger', None) - self.mechanism = kwargs.get('mechanism', None) + self.name = kwargs.get("name", None) + self.trigger = kwargs.get("trigger", None) + self.mechanism = kwargs.get("mechanism", None) class AutoScalingResourceMetric(AutoScalingMetric): @@ -3283,19 +3393,19 @@ class AutoScalingResourceMetric(AutoScalingMetric): """ _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, + "kind": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "name": {"key": "name", "type": "str"}, } def __init__(self, **kwargs): super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.kind = 'Resource' + self.name = kwargs.get("name", None) + self.kind = "Resource" class AutoScalingTrigger(Model): @@ -3311,16 +3421,14 @@ class AutoScalingTrigger(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } + _subtype_map = {"kind": {"AverageLoad": "AverageLoadScalingTrigger"}} def __init__(self, **kwargs): super(AutoScalingTrigger, self).__init__(**kwargs) @@ -3349,28 +3457,28 @@ class AverageLoadScalingTrigger(AutoScalingTrigger): """ _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + "kind": {"required": True}, + "metric": {"required": True}, + "lower_load_threshold": {"required": True}, + "upper_load_threshold": {"required": True}, + "scale_interval_in_seconds": {"required": True, "minimum": 60}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + "kind": {"key": "kind", "type": "str"}, + "metric": {"key": "metric", "type": "AutoScalingMetric"}, + "lower_load_threshold": {"key": "lowerLoadThreshold", "type": "float"}, + "upper_load_threshold": {"key": "upperLoadThreshold", "type": "float"}, + "scale_interval_in_seconds": {"key": "scaleIntervalInSeconds", "type": "int"}, } def __init__(self, **kwargs): super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.metric = kwargs.get('metric', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.kind = 'AverageLoad' + self.metric = kwargs.get("metric", None) + self.lower_load_threshold = kwargs.get("lower_load_threshold", None) + self.upper_load_threshold = kwargs.get("upper_load_threshold", None) + self.scale_interval_in_seconds = kwargs.get("scale_interval_in_seconds", None) + self.kind = "AverageLoad" class ScalingTriggerDescription(Model): @@ -3387,15 +3495,18 @@ class ScalingTriggerDescription(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + "kind": { + "AveragePartitionLoad": "AveragePartitionLoadScalingTrigger", + "AverageServiceLoad": "AverageServiceLoadScalingTrigger", + } } def __init__(self, **kwargs): @@ -3426,28 +3537,28 @@ class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): """ _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + "kind": {"required": True}, + "metric_name": {"required": True}, + "lower_load_threshold": {"required": True}, + "upper_load_threshold": {"required": True}, + "scale_interval_in_seconds": {"required": True, "maximum": 4294967295, "minimum": 0}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + "kind": {"key": "Kind", "type": "str"}, + "metric_name": {"key": "MetricName", "type": "str"}, + "lower_load_threshold": {"key": "LowerLoadThreshold", "type": "str"}, + "upper_load_threshold": {"key": "UpperLoadThreshold", "type": "str"}, + "scale_interval_in_seconds": {"key": "ScaleIntervalInSeconds", "type": "long"}, } def __init__(self, **kwargs): super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.kind = 'AveragePartitionLoad' + self.metric_name = kwargs.get("metric_name", None) + self.lower_load_threshold = kwargs.get("lower_load_threshold", None) + self.upper_load_threshold = kwargs.get("upper_load_threshold", None) + self.scale_interval_in_seconds = kwargs.get("scale_interval_in_seconds", None) + self.kind = "AveragePartitionLoad" class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): @@ -3480,31 +3591,31 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): """ _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, + "kind": {"required": True}, + "metric_name": {"required": True}, + "lower_load_threshold": {"required": True}, + "upper_load_threshold": {"required": True}, + "scale_interval_in_seconds": {"required": True, "maximum": 4294967295, "minimum": 0}, + "use_only_primary_load": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + "kind": {"key": "Kind", "type": "str"}, + "metric_name": {"key": "MetricName", "type": "str"}, + "lower_load_threshold": {"key": "LowerLoadThreshold", "type": "str"}, + "upper_load_threshold": {"key": "UpperLoadThreshold", "type": "str"}, + "scale_interval_in_seconds": {"key": "ScaleIntervalInSeconds", "type": "long"}, + "use_only_primary_load": {"key": "UseOnlyPrimaryLoad", "type": "bool"}, } def __init__(self, **kwargs): super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.use_only_primary_load = kwargs.get('use_only_primary_load', None) - self.kind = 'AverageServiceLoad' + self.metric_name = kwargs.get("metric_name", None) + self.lower_load_threshold = kwargs.get("lower_load_threshold", None) + self.upper_load_threshold = kwargs.get("upper_load_threshold", None) + self.scale_interval_in_seconds = kwargs.get("scale_interval_in_seconds", None) + self.use_only_primary_load = kwargs.get("use_only_primary_load", None) + self.kind = "AverageServiceLoad" class BackupStorageDescription(Model): @@ -3524,21 +3635,26 @@ class BackupStorageDescription(Model): """ _validation = { - 'storage_kind': {'required': True}, + "storage_kind": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, } _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + "storage_kind": { + "AzureBlobStore": "AzureBlobBackupStorageDescription", + "FileShare": "FileShareBackupStorageDescription", + "DsmsAzureBlobStore": "DsmsAzureBlobBackupStorageDescription", + "ManagedIdentityAzureBlobStore": "ManagedIdentityAzureBlobBackupStorageDescription", + } } def __init__(self, **kwargs): super(BackupStorageDescription, self).__init__(**kwargs) - self.friendly_name = kwargs.get('friendly_name', None) + self.friendly_name = kwargs.get("friendly_name", None) self.storage_kind = None @@ -3561,23 +3677,23 @@ class AzureBlobBackupStorageDescription(BackupStorageDescription): """ _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, + "storage_kind": {"required": True}, + "connection_string": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "connection_string": {"key": "ConnectionString", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, } def __init__(self, **kwargs): super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'AzureBlobStore' + self.connection_string = kwargs.get("connection_string", None) + self.container_name = kwargs.get("container_name", None) + self.storage_kind = "AzureBlobStore" class DiagnosticsSinkProperties(Model): @@ -3598,23 +3714,21 @@ class DiagnosticsSinkProperties(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } + _subtype_map = {"kind": {"AzureInternalMonitoringPipeline": "AzureInternalMonitoringPipelineSinkDescription"}} def __init__(self, **kwargs): super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) + self.name = kwargs.get("name", None) + self.description = kwargs.get("description", None) self.kind = None @@ -3645,28 +3759,28 @@ class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "account_name": {"key": "accountName", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "ma_config_url": {"key": "maConfigUrl", "type": "str"}, + "fluentd_config_url": {"key": "fluentdConfigUrl", "type": "str"}, + "auto_key_config_url": {"key": "autoKeyConfigUrl", "type": "str"}, } def __init__(self, **kwargs): super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.namespace = kwargs.get('namespace', None) - self.ma_config_url = kwargs.get('ma_config_url', None) - self.fluentd_config_url = kwargs.get('fluentd_config_url', None) - self.auto_key_config_url = kwargs.get('auto_key_config_url', None) - self.kind = 'AzureInternalMonitoringPipeline' + self.account_name = kwargs.get("account_name", None) + self.namespace = kwargs.get("namespace", None) + self.ma_config_url = kwargs.get("ma_config_url", None) + self.fluentd_config_url = kwargs.get("fluentd_config_url", None) + self.auto_key_config_url = kwargs.get("auto_key_config_url", None) + self.kind = "AzureInternalMonitoringPipeline" class BackupInfo(Model): @@ -3710,34 +3824,34 @@ class BackupInfo(Model): """ _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + "backup_id": {"key": "BackupId", "type": "str"}, + "backup_chain_id": {"key": "BackupChainId", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "backup_location": {"key": "BackupLocation", "type": "str"}, + "backup_type": {"key": "BackupType", "type": "str"}, + "epoch_of_last_backup_record": {"key": "EpochOfLastBackupRecord", "type": "Epoch"}, + "lsn_of_last_backup_record": {"key": "LsnOfLastBackupRecord", "type": "str"}, + "creation_time_utc": {"key": "CreationTimeUtc", "type": "iso-8601"}, + "service_manifest_version": {"key": "ServiceManifestVersion", "type": "str"}, + "failure_error": {"key": "FailureError", "type": "FabricErrorError"}, } def __init__(self, **kwargs): super(BackupInfo, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_chain_id = kwargs.get('backup_chain_id', None) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.partition_information = kwargs.get('partition_information', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_type = kwargs.get('backup_type', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.creation_time_utc = kwargs.get('creation_time_utc', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.failure_error = kwargs.get('failure_error', None) + self.backup_id = kwargs.get("backup_id", None) + self.backup_chain_id = kwargs.get("backup_chain_id", None) + self.application_name = kwargs.get("application_name", None) + self.service_name = kwargs.get("service_name", None) + self.partition_information = kwargs.get("partition_information", None) + self.backup_location = kwargs.get("backup_location", None) + self.backup_type = kwargs.get("backup_type", None) + self.epoch_of_last_backup_record = kwargs.get("epoch_of_last_backup_record", None) + self.lsn_of_last_backup_record = kwargs.get("lsn_of_last_backup_record", None) + self.creation_time_utc = kwargs.get("creation_time_utc", None) + self.service_manifest_version = kwargs.get("service_manifest_version", None) + self.failure_error = kwargs.get("failure_error", None) class BackupPartitionDescription(Model): @@ -3749,12 +3863,12 @@ class BackupPartitionDescription(Model): """ _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + "backup_storage": {"key": "BackupStorage", "type": "BackupStorageDescription"}, } def __init__(self, **kwargs): super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = kwargs.get('backup_storage', None) + self.backup_storage = kwargs.get("backup_storage", None) class BackupPolicyDescription(Model): @@ -3788,30 +3902,30 @@ class BackupPolicyDescription(Model): """ _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, + "name": {"required": True}, + "auto_restore_on_data_loss": {"required": True}, + "max_incremental_backups": {"required": True, "maximum": 255, "minimum": 0}, + "schedule": {"required": True}, + "storage": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + "name": {"key": "Name", "type": "str"}, + "auto_restore_on_data_loss": {"key": "AutoRestoreOnDataLoss", "type": "bool"}, + "max_incremental_backups": {"key": "MaxIncrementalBackups", "type": "int"}, + "schedule": {"key": "Schedule", "type": "BackupScheduleDescription"}, + "storage": {"key": "Storage", "type": "BackupStorageDescription"}, + "retention_policy": {"key": "RetentionPolicy", "type": "RetentionPolicyDescription"}, } def __init__(self, **kwargs): super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.auto_restore_on_data_loss = kwargs.get('auto_restore_on_data_loss', None) - self.max_incremental_backups = kwargs.get('max_incremental_backups', None) - self.schedule = kwargs.get('schedule', None) - self.storage = kwargs.get('storage', None) - self.retention_policy = kwargs.get('retention_policy', None) + self.name = kwargs.get("name", None) + self.auto_restore_on_data_loss = kwargs.get("auto_restore_on_data_loss", None) + self.max_incremental_backups = kwargs.get("max_incremental_backups", None) + self.schedule = kwargs.get("schedule", None) + self.storage = kwargs.get("storage", None) + self.retention_policy = kwargs.get("retention_policy", None) class BackupProgressInfo(Model): @@ -3841,24 +3955,24 @@ class BackupProgressInfo(Model): """ _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + "backup_state": {"key": "BackupState", "type": "str"}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "backup_id": {"key": "BackupId", "type": "str"}, + "backup_location": {"key": "BackupLocation", "type": "str"}, + "epoch_of_last_backup_record": {"key": "EpochOfLastBackupRecord", "type": "Epoch"}, + "lsn_of_last_backup_record": {"key": "LsnOfLastBackupRecord", "type": "str"}, + "failure_error": {"key": "FailureError", "type": "FabricErrorError"}, } def __init__(self, **kwargs): super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = kwargs.get('backup_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.failure_error = kwargs.get('failure_error', None) + self.backup_state = kwargs.get("backup_state", None) + self.time_stamp_utc = kwargs.get("time_stamp_utc", None) + self.backup_id = kwargs.get("backup_id", None) + self.backup_location = kwargs.get("backup_location", None) + self.epoch_of_last_backup_record = kwargs.get("epoch_of_last_backup_record", None) + self.lsn_of_last_backup_record = kwargs.get("lsn_of_last_backup_record", None) + self.failure_error = kwargs.get("failure_error", None) class BackupScheduleDescription(Model): @@ -3875,15 +3989,18 @@ class BackupScheduleDescription(Model): """ _validation = { - 'schedule_kind': {'required': True}, + "schedule_kind": {"required": True}, } _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + "schedule_kind": {"key": "ScheduleKind", "type": "str"}, } _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + "schedule_kind": { + "FrequencyBased": "FrequencyBasedBackupScheduleDescription", + "TimeBased": "TimeBasedBackupScheduleDescription", + } } def __init__(self, **kwargs): @@ -3905,14 +4022,14 @@ class BackupSuspensionInfo(Model): """ _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + "is_suspended": {"key": "IsSuspended", "type": "bool"}, + "suspension_inherited_from": {"key": "SuspensionInheritedFrom", "type": "str"}, } def __init__(self, **kwargs): super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = kwargs.get('is_suspended', None) - self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) + self.is_suspended = kwargs.get("is_suspended", None) + self.suspension_inherited_from = kwargs.get("suspension_inherited_from", None) class RetentionPolicyDescription(Model): @@ -3928,16 +4045,14 @@ class RetentionPolicyDescription(Model): """ _validation = { - 'retention_policy_type': {'required': True}, + "retention_policy_type": {"required": True}, } _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + "retention_policy_type": {"key": "RetentionPolicyType", "type": "str"}, } - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } + _subtype_map = {"retention_policy_type": {"Basic": "BasicRetentionPolicyDescription"}} def __init__(self, **kwargs): super(RetentionPolicyDescription, self).__init__(**kwargs) @@ -3963,22 +4078,22 @@ class BasicRetentionPolicyDescription(RetentionPolicyDescription): """ _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, + "retention_policy_type": {"required": True}, + "retention_duration": {"required": True}, + "minimum_number_of_backups": {"minimum": 0}, } _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + "retention_policy_type": {"key": "RetentionPolicyType", "type": "str"}, + "retention_duration": {"key": "RetentionDuration", "type": "duration"}, + "minimum_number_of_backups": {"key": "MinimumNumberOfBackups", "type": "int"}, } def __init__(self, **kwargs): super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_duration = kwargs.get('retention_duration', None) - self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) - self.retention_policy_type = 'Basic' + self.retention_duration = kwargs.get("retention_duration", None) + self.minimum_number_of_backups = kwargs.get("minimum_number_of_backups", None) + self.retention_policy_type = "Basic" class PropertyValue(Model): @@ -3995,15 +4110,21 @@ class PropertyValue(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} + "kind": { + "Binary": "BinaryPropertyValue", + "Int64": "Int64PropertyValue", + "Double": "DoublePropertyValue", + "String": "StringPropertyValue", + "Guid": "GuidPropertyValue", + } } def __init__(self, **kwargs): @@ -4024,19 +4145,19 @@ class BinaryPropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "[int]"}, } def __init__(self, **kwargs): super(BinaryPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Binary' + self.data = kwargs.get("data", None) + self.kind = "Binary" class Chaos(Model): @@ -4055,16 +4176,16 @@ class Chaos(Model): """ _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + "chaos_parameters": {"key": "ChaosParameters", "type": "ChaosParameters"}, + "status": {"key": "Status", "type": "str"}, + "schedule_status": {"key": "ScheduleStatus", "type": "str"}, } def __init__(self, **kwargs): super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.status = kwargs.get('status', None) - self.schedule_status = kwargs.get('schedule_status', None) + self.chaos_parameters = kwargs.get("chaos_parameters", None) + self.status = kwargs.get("status", None) + self.schedule_status = kwargs.get("schedule_status", None) class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): @@ -4108,42 +4229,42 @@ class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "node_name": {"required": True}, + "service_manifest_name": {"required": True}, + "code_package_name": {"required": True}, + "service_package_activation_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } def __init__(self, **kwargs): super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.node_name = kwargs.get('node_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.kind = 'ChaosCodePackageRestartScheduled' + self.fault_group_id = kwargs.get("fault_group_id", None) + self.fault_id = kwargs.get("fault_id", None) + self.node_name = kwargs.get("node_name", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.code_package_name = kwargs.get("code_package_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.kind = "ChaosCodePackageRestartScheduled" class ChaosContext(Model): @@ -4160,12 +4281,12 @@ class ChaosContext(Model): """ _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, + "map": {"key": "Map", "type": "{str}"}, } def __init__(self, **kwargs): super(ChaosContext, self).__init__(**kwargs) - self.map = kwargs.get('map', None) + self.map = kwargs.get("map", None) class ChaosEvent(Model): @@ -4186,22 +4307,29 @@ class ChaosEvent(Model): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + "kind": { + "ExecutingFaults": "ExecutingFaultsChaosEvent", + "Started": "StartedChaosEvent", + "Stopped": "StoppedChaosEvent", + "TestError": "TestErrorChaosEvent", + "ValidationFailed": "ValidationFailedChaosEvent", + "Waiting": "WaitingChaosEvent", + } } def __init__(self, **kwargs): super(ChaosEvent, self).__init__(**kwargs) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.time_stamp_utc = kwargs.get("time_stamp_utc", None) self.kind = None @@ -4221,14 +4349,14 @@ class ChaosEventsSegment(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "history": {"key": "History", "type": "[ChaosEventWrapper]"}, } def __init__(self, **kwargs): super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.history = kwargs.get('history', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.history = kwargs.get("history", None) class ChaosEventWrapper(Model): @@ -4239,12 +4367,12 @@ class ChaosEventWrapper(Model): """ _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + "chaos_event": {"key": "ChaosEvent", "type": "ChaosEvent"}, } def __init__(self, **kwargs): super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = kwargs.get('chaos_event', None) + self.chaos_event = kwargs.get("chaos_event", None) class NodeEvent(FabricEvent): @@ -4276,29 +4404,43 @@ class NodeEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, } _subtype_map = { - 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} + "kind": { + "NodeAborted": "NodeAbortedEvent", + "NodeAddedToCluster": "NodeAddedToClusterEvent", + "NodeClosed": "NodeClosedEvent", + "NodeDeactivateCompleted": "NodeDeactivateCompletedEvent", + "NodeDeactivateStarted": "NodeDeactivateStartedEvent", + "NodeDown": "NodeDownEvent", + "NodeNewHealthReport": "NodeNewHealthReportEvent", + "NodeHealthReportExpired": "NodeHealthReportExpiredEvent", + "NodeOpenSucceeded": "NodeOpenSucceededEvent", + "NodeOpenFailed": "NodeOpenFailedEvent", + "NodeRemovedFromCluster": "NodeRemovedFromClusterEvent", + "NodeUp": "NodeUpEvent", + "ChaosNodeRestartScheduled": "ChaosNodeRestartScheduledEvent", + } } def __init__(self, **kwargs): super(NodeEvent, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.kind = 'NodeEvent' + self.node_name = kwargs.get("node_name", None) + self.kind = "NodeEvent" class ChaosNodeRestartScheduledEvent(NodeEvent): @@ -4329,33 +4471,33 @@ class ChaosNodeRestartScheduledEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "long"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, } def __init__(self, **kwargs): super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.kind = 'ChaosNodeRestartScheduled' + self.node_instance_id = kwargs.get("node_instance_id", None) + self.fault_group_id = kwargs.get("fault_group_id", None) + self.fault_id = kwargs.get("fault_id", None) + self.kind = "ChaosNodeRestartScheduled" class ChaosParameters(Model): @@ -4422,35 +4564,40 @@ class ChaosParameters(Model): """ _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + "max_cluster_stabilization_timeout_in_seconds": {"maximum": 4294967295, "minimum": 0}, + "max_concurrent_faults": {"maximum": 4294967295, "minimum": 0}, + "wait_time_between_faults_in_seconds": {"maximum": 4294967295, "minimum": 0}, + "wait_time_between_iterations_in_seconds": {"maximum": 4294967295, "minimum": 0}, } _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + "time_to_run_in_seconds": {"key": "TimeToRunInSeconds", "type": "str"}, + "max_cluster_stabilization_timeout_in_seconds": { + "key": "MaxClusterStabilizationTimeoutInSeconds", + "type": "long", + }, + "max_concurrent_faults": {"key": "MaxConcurrentFaults", "type": "long"}, + "enable_move_replica_faults": {"key": "EnableMoveReplicaFaults", "type": "bool"}, + "wait_time_between_faults_in_seconds": {"key": "WaitTimeBetweenFaultsInSeconds", "type": "long"}, + "wait_time_between_iterations_in_seconds": {"key": "WaitTimeBetweenIterationsInSeconds", "type": "long"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "context": {"key": "Context", "type": "ChaosContext"}, + "chaos_target_filter": {"key": "ChaosTargetFilter", "type": "ChaosTargetFilter"}, } def __init__(self, **kwargs): super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) - self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.context = kwargs.get('context', None) - self.chaos_target_filter = kwargs.get('chaos_target_filter', None) + self.time_to_run_in_seconds = kwargs.get("time_to_run_in_seconds", "4294967295") + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get( + "max_cluster_stabilization_timeout_in_seconds", 60 + ) + self.max_concurrent_faults = kwargs.get("max_concurrent_faults", 1) + self.enable_move_replica_faults = kwargs.get("enable_move_replica_faults", True) + self.wait_time_between_faults_in_seconds = kwargs.get("wait_time_between_faults_in_seconds", 20) + self.wait_time_between_iterations_in_seconds = kwargs.get("wait_time_between_iterations_in_seconds", 30) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) + self.context = kwargs.get("context", None) + self.chaos_target_filter = kwargs.get("chaos_target_filter", None) class ChaosParametersDictionaryItem(Model): @@ -4467,19 +4614,19 @@ class ChaosParametersDictionaryItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "ChaosParameters"}, } def __init__(self, **kwargs): super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class PartitionEvent(FabricEvent): @@ -4514,29 +4661,36 @@ class PartitionEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } _subtype_map = { - 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} + "kind": { + "PartitionAnalysisEvent": "PartitionAnalysisEvent", + "PartitionNewHealthReport": "PartitionNewHealthReportEvent", + "PartitionHealthReportExpired": "PartitionHealthReportExpiredEvent", + "PartitionReconfigured": "PartitionReconfiguredEvent", + "ChaosPartitionSecondaryMoveScheduled": "ChaosPartitionSecondaryMoveScheduledEvent", + "ChaosPartitionPrimaryMoveScheduled": "ChaosPartitionPrimaryMoveScheduledEvent", + } } def __init__(self, **kwargs): super(PartitionEvent, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'PartitionEvent' + self.partition_id = kwargs.get("partition_id", None) + self.kind = "PartitionEvent" class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): @@ -4575,39 +4729,39 @@ class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_name": {"required": True}, + "node_to": {"required": True}, + "forced_move": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "node_to": {"key": "NodeTo", "type": "str"}, + "forced_move": {"key": "ForcedMove", "type": "bool"}, } def __init__(self, **kwargs): super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_name = kwargs.get('service_name', None) - self.node_to = kwargs.get('node_to', None) - self.forced_move = kwargs.get('forced_move', None) - self.kind = 'ChaosPartitionPrimaryMoveScheduled' + self.fault_group_id = kwargs.get("fault_group_id", None) + self.fault_id = kwargs.get("fault_id", None) + self.service_name = kwargs.get("service_name", None) + self.node_to = kwargs.get("node_to", None) + self.forced_move = kwargs.get("forced_move", None) + self.kind = "ChaosPartitionPrimaryMoveScheduled" class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): @@ -4648,42 +4802,42 @@ class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_name": {"required": True}, + "source_node": {"required": True}, + "destination_node": {"required": True}, + "forced_move": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "source_node": {"key": "SourceNode", "type": "str"}, + "destination_node": {"key": "DestinationNode", "type": "str"}, + "forced_move": {"key": "ForcedMove", "type": "bool"}, } def __init__(self, **kwargs): super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_name = kwargs.get('service_name', None) - self.source_node = kwargs.get('source_node', None) - self.destination_node = kwargs.get('destination_node', None) - self.forced_move = kwargs.get('forced_move', None) - self.kind = 'ChaosPartitionSecondaryMoveScheduled' + self.fault_group_id = kwargs.get("fault_group_id", None) + self.fault_id = kwargs.get("fault_id", None) + self.service_name = kwargs.get("service_name", None) + self.source_node = kwargs.get("source_node", None) + self.destination_node = kwargs.get("destination_node", None) + self.forced_move = kwargs.get("forced_move", None) + self.kind = "ChaosPartitionSecondaryMoveScheduled" class ReplicaEvent(FabricEvent): @@ -4727,32 +4881,39 @@ class ReplicaEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, } _subtype_map = { - 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} + "kind": { + "StatefulReplicaNewHealthReport": "StatefulReplicaNewHealthReportEvent", + "StatefulReplicaHealthReportExpired": "StatefulReplicaHealthReportExpiredEvent", + "StatelessReplicaNewHealthReport": "StatelessReplicaNewHealthReportEvent", + "StatelessReplicaHealthReportExpired": "StatelessReplicaHealthReportExpiredEvent", + "ChaosReplicaRemovalScheduled": "ChaosReplicaRemovalScheduledEvent", + "ChaosReplicaRestartScheduled": "ChaosReplicaRestartScheduledEvent", + } } def __init__(self, **kwargs): super(ReplicaEvent, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_id = kwargs.get('replica_id', None) - self.kind = 'ReplicaEvent' + self.partition_id = kwargs.get("partition_id", None) + self.replica_id = kwargs.get("replica_id", None) + self.kind = "ReplicaEvent" class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): @@ -4795,35 +4956,35 @@ class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_uri": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_uri": {"key": "ServiceUri", "type": "str"}, } def __init__(self, **kwargs): super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_uri = kwargs.get('service_uri', None) - self.kind = 'ChaosReplicaRemovalScheduled' + self.fault_group_id = kwargs.get("fault_group_id", None) + self.fault_id = kwargs.get("fault_id", None) + self.service_uri = kwargs.get("service_uri", None) + self.kind = "ChaosReplicaRemovalScheduled" class ChaosReplicaRestartScheduledEvent(ReplicaEvent): @@ -4866,35 +5027,35 @@ class ChaosReplicaRestartScheduledEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_uri": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_uri": {"key": "ServiceUri", "type": "str"}, } def __init__(self, **kwargs): super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_uri = kwargs.get('service_uri', None) - self.kind = 'ChaosReplicaRestartScheduled' + self.fault_group_id = kwargs.get("fault_group_id", None) + self.fault_id = kwargs.get("fault_id", None) + self.service_uri = kwargs.get("service_uri", None) + self.kind = "ChaosReplicaRestartScheduled" class ChaosSchedule(Model): @@ -4916,18 +5077,18 @@ class ChaosSchedule(Model): """ _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + "start_date": {"key": "StartDate", "type": "iso-8601"}, + "expiry_date": {"key": "ExpiryDate", "type": "iso-8601"}, + "chaos_parameters_dictionary": {"key": "ChaosParametersDictionary", "type": "[ChaosParametersDictionaryItem]"}, + "jobs": {"key": "Jobs", "type": "[ChaosScheduleJob]"}, } def __init__(self, **kwargs): super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") - self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") - self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) - self.jobs = kwargs.get('jobs', None) + self.start_date = kwargs.get("start_date", "1601-01-01T00:00:00Z") + self.expiry_date = kwargs.get("expiry_date", "9999-12-31T23:59:59.999Z") + self.chaos_parameters_dictionary = kwargs.get("chaos_parameters_dictionary", None) + self.jobs = kwargs.get("jobs", None) class ChaosScheduleDescription(Model): @@ -4941,18 +5102,18 @@ class ChaosScheduleDescription(Model): """ _validation = { - 'version': {'minimum': 0}, + "version": {"minimum": 0}, } _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + "version": {"key": "Version", "type": "int"}, + "schedule": {"key": "Schedule", "type": "ChaosSchedule"}, } def __init__(self, **kwargs): super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.schedule = kwargs.get('schedule', None) + self.version = kwargs.get("version", None) + self.schedule = kwargs.get("schedule", None) class ChaosScheduleJob(Model): @@ -4971,16 +5132,16 @@ class ChaosScheduleJob(Model): """ _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, + "chaos_parameters": {"key": "ChaosParameters", "type": "str"}, + "days": {"key": "Days", "type": "ChaosScheduleJobActiveDaysOfWeek"}, + "times": {"key": "Times", "type": "[TimeRange]"}, } def __init__(self, **kwargs): super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.days = kwargs.get('days', None) - self.times = kwargs.get('times', None) + self.chaos_parameters = kwargs.get("chaos_parameters", None) + self.days = kwargs.get("days", None) + self.times = kwargs.get("times", None) class ChaosScheduleJobActiveDaysOfWeek(Model): @@ -5010,24 +5171,24 @@ class ChaosScheduleJobActiveDaysOfWeek(Model): """ _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, + "sunday": {"key": "Sunday", "type": "bool"}, + "monday": {"key": "Monday", "type": "bool"}, + "tuesday": {"key": "Tuesday", "type": "bool"}, + "wednesday": {"key": "Wednesday", "type": "bool"}, + "thursday": {"key": "Thursday", "type": "bool"}, + "friday": {"key": "Friday", "type": "bool"}, + "saturday": {"key": "Saturday", "type": "bool"}, } def __init__(self, **kwargs): super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = kwargs.get('sunday', False) - self.monday = kwargs.get('monday', False) - self.tuesday = kwargs.get('tuesday', False) - self.wednesday = kwargs.get('wednesday', False) - self.thursday = kwargs.get('thursday', False) - self.friday = kwargs.get('friday', False) - self.saturday = kwargs.get('saturday', False) + self.sunday = kwargs.get("sunday", False) + self.monday = kwargs.get("monday", False) + self.tuesday = kwargs.get("tuesday", False) + self.wednesday = kwargs.get("wednesday", False) + self.thursday = kwargs.get("thursday", False) + self.friday = kwargs.get("friday", False) + self.saturday = kwargs.get("saturday", False) class ClusterEvent(FabricEvent): @@ -5057,26 +5218,36 @@ class ClusterEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} + "kind": { + "ClusterNewHealthReport": "ClusterNewHealthReportEvent", + "ClusterHealthReportExpired": "ClusterHealthReportExpiredEvent", + "ClusterUpgradeCompleted": "ClusterUpgradeCompletedEvent", + "ClusterUpgradeDomainCompleted": "ClusterUpgradeDomainCompletedEvent", + "ClusterUpgradeRollbackCompleted": "ClusterUpgradeRollbackCompletedEvent", + "ClusterUpgradeRollbackStarted": "ClusterUpgradeRollbackStartedEvent", + "ClusterUpgradeStarted": "ClusterUpgradeStartedEvent", + "ChaosStopped": "ChaosStoppedEvent", + "ChaosStarted": "ChaosStartedEvent", + } } def __init__(self, **kwargs): super(ClusterEvent, self).__init__(**kwargs) - self.kind = 'ClusterEvent' + self.kind = "ClusterEvent" class ChaosStartedEvent(ClusterEvent): @@ -5124,52 +5295,57 @@ class ChaosStartedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "max_concurrent_faults": {"required": True}, + "time_to_run_in_seconds": {"required": True}, + "max_cluster_stabilization_timeout_in_seconds": {"required": True}, + "wait_time_between_iterations_in_seconds": {"required": True}, + "wait_time_between_faults_in_seconds": {"required": True}, + "move_replica_fault_enabled": {"required": True}, + "included_node_type_list": {"required": True}, + "included_application_list": {"required": True}, + "cluster_health_policy": {"required": True}, + "chaos_context": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "max_concurrent_faults": {"key": "MaxConcurrentFaults", "type": "long"}, + "time_to_run_in_seconds": {"key": "TimeToRunInSeconds", "type": "float"}, + "max_cluster_stabilization_timeout_in_seconds": { + "key": "MaxClusterStabilizationTimeoutInSeconds", + "type": "float", + }, + "wait_time_between_iterations_in_seconds": {"key": "WaitTimeBetweenIterationsInSeconds", "type": "float"}, + "wait_time_between_faults_in_seconds": {"key": "WaitTimeBetweenFaultsInSeconds", "type": "float"}, + "move_replica_fault_enabled": {"key": "MoveReplicaFaultEnabled", "type": "bool"}, + "included_node_type_list": {"key": "IncludedNodeTypeList", "type": "str"}, + "included_application_list": {"key": "IncludedApplicationList", "type": "str"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "str"}, + "chaos_context": {"key": "ChaosContext", "type": "str"}, } def __init__(self, **kwargs): super(ChaosStartedEvent, self).__init__(**kwargs) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', None) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', None) - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', None) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', None) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', None) - self.move_replica_fault_enabled = kwargs.get('move_replica_fault_enabled', None) - self.included_node_type_list = kwargs.get('included_node_type_list', None) - self.included_application_list = kwargs.get('included_application_list', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.chaos_context = kwargs.get('chaos_context', None) - self.kind = 'ChaosStarted' + self.max_concurrent_faults = kwargs.get("max_concurrent_faults", None) + self.time_to_run_in_seconds = kwargs.get("time_to_run_in_seconds", None) + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get( + "max_cluster_stabilization_timeout_in_seconds", None + ) + self.wait_time_between_iterations_in_seconds = kwargs.get("wait_time_between_iterations_in_seconds", None) + self.wait_time_between_faults_in_seconds = kwargs.get("wait_time_between_faults_in_seconds", None) + self.move_replica_fault_enabled = kwargs.get("move_replica_fault_enabled", None) + self.included_node_type_list = kwargs.get("included_node_type_list", None) + self.included_application_list = kwargs.get("included_application_list", None) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) + self.chaos_context = kwargs.get("chaos_context", None) + self.kind = "ChaosStarted" class ChaosStoppedEvent(ClusterEvent): @@ -5194,25 +5370,25 @@ class ChaosStoppedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'reason': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "reason": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } def __init__(self, **kwargs): super(ChaosStoppedEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'ChaosStopped' + self.reason = kwargs.get("reason", None) + self.kind = "ChaosStopped" class ChaosTargetFilter(Model): @@ -5271,14 +5447,14 @@ class ChaosTargetFilter(Model): """ _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + "node_type_inclusion_list": {"key": "NodeTypeInclusionList", "type": "[str]"}, + "application_inclusion_list": {"key": "ApplicationInclusionList", "type": "[str]"}, } def __init__(self, **kwargs): super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) - self.application_inclusion_list = kwargs.get('application_inclusion_list', None) + self.node_type_inclusion_list = kwargs.get("node_type_inclusion_list", None) + self.application_inclusion_list = kwargs.get("application_inclusion_list", None) class PropertyBatchOperation(Model): @@ -5300,22 +5476,29 @@ class PropertyBatchOperation(Model): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + "kind": { + "CheckExists": "CheckExistsPropertyBatchOperation", + "CheckSequence": "CheckSequencePropertyBatchOperation", + "CheckValue": "CheckValuePropertyBatchOperation", + "Delete": "DeletePropertyBatchOperation", + "Get": "GetPropertyBatchOperation", + "Put": "PutPropertyBatchOperation", + } } def __init__(self, **kwargs): super(PropertyBatchOperation, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) + self.property_name = kwargs.get("property_name", None) self.kind = None @@ -5341,21 +5524,21 @@ class CheckExistsPropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'exists': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "exists": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "exists": {"key": "Exists", "type": "bool"}, } def __init__(self, **kwargs): super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) - self.exists = kwargs.get('exists', None) - self.kind = 'CheckExists' + self.exists = kwargs.get("exists", None) + self.kind = "CheckExists" class CheckSequencePropertyBatchOperation(PropertyBatchOperation): @@ -5381,21 +5564,21 @@ class CheckSequencePropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'sequence_number': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "sequence_number": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, } def __init__(self, **kwargs): super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) - self.sequence_number = kwargs.get('sequence_number', None) - self.kind = 'CheckSequence' + self.sequence_number = kwargs.get("sequence_number", None) + self.kind = "CheckSequence" class CheckValuePropertyBatchOperation(PropertyBatchOperation): @@ -5417,21 +5600,21 @@ class CheckValuePropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, } def __init__(self, **kwargs): super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.kind = 'CheckValue' + self.value = kwargs.get("value", None) + self.kind = "CheckValue" class ClusterConfiguration(Model): @@ -5443,12 +5626,12 @@ class ClusterConfiguration(Model): """ _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + "cluster_configuration": {"key": "ClusterConfiguration", "type": "str"}, } def __init__(self, **kwargs): super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = kwargs.get('cluster_configuration', None) + self.cluster_configuration = kwargs.get("cluster_configuration", None) class ClusterConfigurationUpgradeDescription(Model): @@ -5505,36 +5688,41 @@ class ClusterConfigurationUpgradeDescription(Model): """ _validation = { - 'cluster_config': {'required': True}, + "cluster_config": {"required": True}, } _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + "cluster_config": {"key": "ClusterConfig", "type": "str"}, + "health_check_retry_timeout": {"key": "HealthCheckRetryTimeout", "type": "duration"}, + "health_check_wait_duration_in_seconds": {"key": "HealthCheckWaitDurationInSeconds", "type": "duration"}, + "health_check_stable_duration_in_seconds": {"key": "HealthCheckStableDurationInSeconds", "type": "duration"}, + "upgrade_domain_timeout_in_seconds": {"key": "UpgradeDomainTimeoutInSeconds", "type": "duration"}, + "upgrade_timeout_in_seconds": {"key": "UpgradeTimeoutInSeconds", "type": "duration"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "max_percent_upgrade_domain_delta_unhealthy_nodes": { + "key": "MaxPercentUpgradeDomainDeltaUnhealthyNodes", + "type": "int", + }, + "application_health_policies": {"key": "ApplicationHealthPolicies", "type": "ApplicationHealthPolicies"}, } def __init__(self, **kwargs): super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = kwargs.get('cluster_config', None) - self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") - self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") - self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") - self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") - self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) - self.application_health_policies = kwargs.get('application_health_policies', None) + self.cluster_config = kwargs.get("cluster_config", None) + self.health_check_retry_timeout = kwargs.get("health_check_retry_timeout", "PT0H0M0S") + self.health_check_wait_duration_in_seconds = kwargs.get("health_check_wait_duration_in_seconds", "PT0H0M0S") + self.health_check_stable_duration_in_seconds = kwargs.get("health_check_stable_duration_in_seconds", "PT0H0M0S") + self.upgrade_domain_timeout_in_seconds = kwargs.get("upgrade_domain_timeout_in_seconds", "PT0H0M0S") + self.upgrade_timeout_in_seconds = kwargs.get("upgrade_timeout_in_seconds", "PT0H0M0S") + self.max_percent_unhealthy_applications = kwargs.get("max_percent_unhealthy_applications", 0) + self.max_percent_unhealthy_nodes = kwargs.get("max_percent_unhealthy_nodes", 0) + self.max_percent_delta_unhealthy_nodes = kwargs.get("max_percent_delta_unhealthy_nodes", 0) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get( + "max_percent_upgrade_domain_delta_unhealthy_nodes", 0 + ) + self.application_health_policies = kwargs.get("application_health_policies", None) class ClusterConfigurationUpgradeStatusInfo(Model): @@ -5554,18 +5742,18 @@ class ClusterConfigurationUpgradeStatusInfo(Model): """ _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "progress_status": {"key": "ProgressStatus", "type": "int"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "details": {"key": "Details", "type": "str"}, } def __init__(self, **kwargs): super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.progress_status = kwargs.get('progress_status', None) - self.config_version = kwargs.get('config_version', None) - self.details = kwargs.get('details', None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.progress_status = kwargs.get("progress_status", None) + self.config_version = kwargs.get("config_version", None) + self.details = kwargs.get("details", None) class ClusterHealth(EntityHealth): @@ -5602,18 +5790,18 @@ class ClusterHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "node_health_states": {"key": "NodeHealthStates", "type": "[NodeHealthState]"}, + "application_health_states": {"key": "ApplicationHealthStates", "type": "[ApplicationHealthState]"}, } def __init__(self, **kwargs): super(ClusterHealth, self).__init__(**kwargs) - self.node_health_states = kwargs.get('node_health_states', None) - self.application_health_states = kwargs.get('application_health_states', None) + self.node_health_states = kwargs.get("node_health_states", None) + self.application_health_states = kwargs.get("application_health_states", None) class ClusterHealthChunk(Model): @@ -5642,16 +5830,19 @@ class ClusterHealthChunk(Model): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_health_state_chunks": {"key": "NodeHealthStateChunks", "type": "NodeHealthStateChunkList"}, + "application_health_state_chunks": { + "key": "ApplicationHealthStateChunks", + "type": "ApplicationHealthStateChunkList", + }, } def __init__(self, **kwargs): super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) - self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) + self.health_state = kwargs.get("health_state", None) + self.node_health_state_chunks = kwargs.get("node_health_state_chunks", None) + self.application_health_state_chunks = kwargs.get("application_health_state_chunks", None) class ClusterHealthChunkQueryDescription(Model): @@ -5693,18 +5884,18 @@ class ClusterHealthChunkQueryDescription(Model): """ _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + "node_filters": {"key": "NodeFilters", "type": "[NodeHealthStateFilter]"}, + "application_filters": {"key": "ApplicationFilters", "type": "[ApplicationHealthStateFilter]"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "application_health_policies": {"key": "ApplicationHealthPolicies", "type": "ApplicationHealthPolicies"}, } def __init__(self, **kwargs): super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = kwargs.get('node_filters', None) - self.application_filters = kwargs.get('application_filters', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.application_health_policies = kwargs.get('application_health_policies', None) + self.node_filters = kwargs.get("node_filters", None) + self.application_filters = kwargs.get("application_filters", None) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) + self.application_health_policies = kwargs.get("application_health_policies", None) class ClusterHealthPolicies(Model): @@ -5728,14 +5919,17 @@ class ClusterHealthPolicies(Model): """ _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "[ApplicationHealthPolicyMapItem]", + }, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, } def __init__(self, **kwargs): super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.application_health_policy_map = kwargs.get("application_health_policy_map", None) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) class ClusterHealthPolicy(Model): @@ -5839,20 +6033,23 @@ class ClusterHealthPolicy(Model): """ _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + "consider_warning_as_error": {"key": "ConsiderWarningAsError", "type": "bool"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "application_type_health_policy_map": { + "key": "ApplicationTypeHealthPolicyMap", + "type": "[ApplicationTypeHealthPolicyMapItem]", + }, + "node_type_health_policy_map": {"key": "NodeTypeHealthPolicyMap", "type": "[NodeTypeHealthPolicyMapItem]"}, } def __init__(self, **kwargs): super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) - self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) + self.consider_warning_as_error = kwargs.get("consider_warning_as_error", False) + self.max_percent_unhealthy_nodes = kwargs.get("max_percent_unhealthy_nodes", 0) + self.max_percent_unhealthy_applications = kwargs.get("max_percent_unhealthy_applications", 0) + self.application_type_health_policy_map = kwargs.get("application_type_health_policy_map", None) + self.node_type_health_policy_map = kwargs.get("node_type_health_policy_map", None) class ClusterHealthReportExpiredEvent(ClusterEvent): @@ -5892,46 +6089,46 @@ class ClusterHealthReportExpiredEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ClusterHealthReportExpired' + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "ClusterHealthReportExpired" class ClusterLoadInfo(Model): @@ -5951,16 +6148,16 @@ class ClusterLoadInfo(Model): """ _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + "last_balancing_start_time_utc": {"key": "LastBalancingStartTimeUtc", "type": "iso-8601"}, + "last_balancing_end_time_utc": {"key": "LastBalancingEndTimeUtc", "type": "iso-8601"}, + "load_metric_information": {"key": "LoadMetricInformation", "type": "[LoadMetricInformation]"}, } def __init__(self, **kwargs): super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) - self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) - self.load_metric_information = kwargs.get('load_metric_information', None) + self.last_balancing_start_time_utc = kwargs.get("last_balancing_start_time_utc", None) + self.last_balancing_end_time_utc = kwargs.get("last_balancing_end_time_utc", None) + self.load_metric_information = kwargs.get("load_metric_information", None) class ClusterManifest(Model): @@ -5971,12 +6168,12 @@ class ClusterManifest(Model): """ _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, + "manifest": {"key": "Manifest", "type": "str"}, } def __init__(self, **kwargs): super(ClusterManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) + self.manifest = kwargs.get("manifest", None) class ClusterNewHealthReportEvent(ClusterEvent): @@ -6016,46 +6213,46 @@ class ClusterNewHealthReportEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ClusterNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ClusterNewHealthReport' + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "ClusterNewHealthReport" class ClusterUpgradeCompletedEvent(ClusterEvent): @@ -6083,28 +6280,28 @@ class ClusterUpgradeCompletedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeCompleted' + self.target_cluster_version = kwargs.get("target_cluster_version", None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get("overall_upgrade_elapsed_time_in_ms", None) + self.kind = "ClusterUpgradeCompleted" class ClusterUpgradeDescriptionObject(Model): @@ -6165,34 +6362,45 @@ class ClusterUpgradeDescriptionObject(Model): """ _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "sort_order": {"key": "SortOrder", "type": "str"}, + "enable_delta_health_evaluation": {"key": "EnableDeltaHealthEvaluation", "type": "bool"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "cluster_upgrade_health_policy": { + "key": "ClusterUpgradeHealthPolicy", + "type": "ClusterUpgradeHealthPolicyObject", + }, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "ApplicationHealthPolicyMapObject", + }, } def __init__(self, **kwargs): super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) - self.code_version = kwargs.get('code_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.config_version = kwargs.get("config_version", None) + self.code_version = kwargs.get("code_version", None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get( + "upgrade_replica_set_check_timeout_in_seconds", None + ) + self.force_restart = kwargs.get("force_restart", None) + self.sort_order = kwargs.get("sort_order", "Default") + self.enable_delta_health_evaluation = kwargs.get("enable_delta_health_evaluation", None) + self.monitoring_policy = kwargs.get("monitoring_policy", None) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) + self.cluster_upgrade_health_policy = kwargs.get("cluster_upgrade_health_policy", None) + self.application_health_policy_map = kwargs.get("application_health_policy_map", None) class ClusterUpgradeDomainCompletedEvent(ClusterEvent): @@ -6224,34 +6432,34 @@ class ClusterUpgradeDomainCompletedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "upgrade_state": {"required": True}, + "upgrade_domains": {"required": True}, + "upgrade_domain_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "str"}, + "upgrade_domain_elapsed_time_in_ms": {"key": "UpgradeDomainElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeDomainCompleted' + self.target_cluster_version = kwargs.get("target_cluster_version", None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.upgrade_domains = kwargs.get("upgrade_domains", None) + self.upgrade_domain_elapsed_time_in_ms = kwargs.get("upgrade_domain_elapsed_time_in_ms", None) + self.kind = "ClusterUpgradeDomainCompleted" class ClusterUpgradeHealthPolicyObject(Model): @@ -6278,19 +6486,24 @@ class ClusterUpgradeHealthPolicyObject(Model): """ _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + "max_percent_delta_unhealthy_nodes": {"maximum": 100, "minimum": 0}, + "max_percent_upgrade_domain_delta_unhealthy_nodes": {"maximum": 100, "minimum": 0}, } _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "max_percent_upgrade_domain_delta_unhealthy_nodes": { + "key": "MaxPercentUpgradeDomainDeltaUnhealthyNodes", + "type": "int", + }, } def __init__(self, **kwargs): super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get("max_percent_delta_unhealthy_nodes", None) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get( + "max_percent_upgrade_domain_delta_unhealthy_nodes", None + ) class ClusterUpgradeProgressObject(Model): @@ -6362,46 +6575,55 @@ class ClusterUpgradeProgressObject(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "[UpgradeDomainInfo]"}, + "upgrade_units": {"key": "UpgradeUnits", "type": "[UpgradeUnitInfo]"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "next_upgrade_domain": {"key": "NextUpgradeDomain", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_description": {"key": "UpgradeDescription", "type": "ClusterUpgradeDescriptionObject"}, + "upgrade_duration_in_milliseconds": {"key": "UpgradeDurationInMilliseconds", "type": "str"}, + "upgrade_domain_duration_in_milliseconds": {"key": "UpgradeDomainDurationInMilliseconds", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "current_upgrade_domain_progress": { + "key": "CurrentUpgradeDomainProgress", + "type": "CurrentUpgradeDomainProgressInfo", + }, + "current_upgrade_units_progress": { + "key": "CurrentUpgradeUnitsProgress", + "type": "CurrentUpgradeUnitsProgressInfo", + }, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "upgrade_domain_progress_at_failure": { + "key": "UpgradeDomainProgressAtFailure", + "type": "FailedUpgradeDomainProgressObject", + }, + "is_node_by_node": {"key": "IsNodeByNode", "type": "bool"}, } def __init__(self, **kwargs): super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_units = kwargs.get('upgrade_units', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.is_node_by_node = kwargs.get('is_node_by_node', False) + self.code_version = kwargs.get("code_version", None) + self.config_version = kwargs.get("config_version", None) + self.upgrade_domains = kwargs.get("upgrade_domains", None) + self.upgrade_units = kwargs.get("upgrade_units", None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.next_upgrade_domain = kwargs.get("next_upgrade_domain", None) + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.upgrade_description = kwargs.get("upgrade_description", None) + self.upgrade_duration_in_milliseconds = kwargs.get("upgrade_duration_in_milliseconds", None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get("upgrade_domain_duration_in_milliseconds", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.current_upgrade_domain_progress = kwargs.get("current_upgrade_domain_progress", None) + self.current_upgrade_units_progress = kwargs.get("current_upgrade_units_progress", None) + self.start_timestamp_utc = kwargs.get("start_timestamp_utc", None) + self.failure_timestamp_utc = kwargs.get("failure_timestamp_utc", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.upgrade_domain_progress_at_failure = kwargs.get("upgrade_domain_progress_at_failure", None) + self.is_node_by_node = kwargs.get("is_node_by_node", False) class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): @@ -6431,31 +6653,31 @@ class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeRollbackCompleted' + self.target_cluster_version = kwargs.get("target_cluster_version", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get("overall_upgrade_elapsed_time_in_ms", None) + self.kind = "ClusterUpgradeRollbackCompleted" class ClusterUpgradeRollbackStartedEvent(ClusterEvent): @@ -6485,31 +6707,31 @@ class ClusterUpgradeRollbackStartedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, } def __init__(self, **kwargs): super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeRollbackStarted' + self.target_cluster_version = kwargs.get("target_cluster_version", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get("overall_upgrade_elapsed_time_in_ms", None) + self.kind = "ClusterUpgradeRollbackStarted" class ClusterUpgradeStartedEvent(ClusterEvent): @@ -6542,37 +6764,37 @@ class ClusterUpgradeStartedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "current_cluster_version": {"required": True}, + "target_cluster_version": {"required": True}, + "upgrade_type": {"required": True}, + "rolling_upgrade_mode": {"required": True}, + "failure_action": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "current_cluster_version": {"key": "CurrentClusterVersion", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "upgrade_type": {"key": "UpgradeType", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "failure_action": {"key": "FailureAction", "type": "str"}, } def __init__(self, **kwargs): super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) - self.current_cluster_version = kwargs.get('current_cluster_version', None) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.upgrade_type = kwargs.get('upgrade_type', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) - self.failure_action = kwargs.get('failure_action', None) - self.kind = 'ClusterUpgradeStarted' + self.current_cluster_version = kwargs.get("current_cluster_version", None) + self.target_cluster_version = kwargs.get("target_cluster_version", None) + self.upgrade_type = kwargs.get("upgrade_type", None) + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", None) + self.failure_action = kwargs.get("failure_action", None) + self.kind = "ClusterUpgradeStarted" class ClusterVersion(Model): @@ -6583,12 +6805,12 @@ class ClusterVersion(Model): """ _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, **kwargs): super(ClusterVersion, self).__init__(**kwargs) - self.version = kwargs.get('version', None) + self.version = kwargs.get("version", None) class CodePackageEntryPoint(Model): @@ -6622,24 +6844,27 @@ class CodePackageEntryPoint(Model): """ _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + "entry_point_location": {"key": "EntryPointLocation", "type": "str"}, + "process_id": {"key": "ProcessId", "type": "str"}, + "run_as_user_name": {"key": "RunAsUserName", "type": "str"}, + "code_package_entry_point_statistics": { + "key": "CodePackageEntryPointStatistics", + "type": "CodePackageEntryPointStatistics", + }, + "status": {"key": "Status", "type": "str"}, + "next_activation_time": {"key": "NextActivationTime", "type": "iso-8601"}, + "instance_id": {"key": "InstanceId", "type": "str"}, } def __init__(self, **kwargs): super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = kwargs.get('entry_point_location', None) - self.process_id = kwargs.get('process_id', None) - self.run_as_user_name = kwargs.get('run_as_user_name', None) - self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) - self.status = kwargs.get('status', None) - self.next_activation_time = kwargs.get('next_activation_time', None) - self.instance_id = kwargs.get('instance_id', None) + self.entry_point_location = kwargs.get("entry_point_location", None) + self.process_id = kwargs.get("process_id", None) + self.run_as_user_name = kwargs.get("run_as_user_name", None) + self.code_package_entry_point_statistics = kwargs.get("code_package_entry_point_statistics", None) + self.status = kwargs.get("status", None) + self.next_activation_time = kwargs.get("next_activation_time", None) + self.instance_id = kwargs.get("instance_id", None) class CodePackageEntryPointStatistics(Model): @@ -6679,32 +6904,32 @@ class CodePackageEntryPointStatistics(Model): """ _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + "last_exit_code": {"key": "LastExitCode", "type": "str"}, + "last_activation_time": {"key": "LastActivationTime", "type": "iso-8601"}, + "last_exit_time": {"key": "LastExitTime", "type": "iso-8601"}, + "last_successful_activation_time": {"key": "LastSuccessfulActivationTime", "type": "iso-8601"}, + "last_successful_exit_time": {"key": "LastSuccessfulExitTime", "type": "iso-8601"}, + "activation_count": {"key": "ActivationCount", "type": "str"}, + "activation_failure_count": {"key": "ActivationFailureCount", "type": "str"}, + "continuous_activation_failure_count": {"key": "ContinuousActivationFailureCount", "type": "str"}, + "exit_count": {"key": "ExitCount", "type": "str"}, + "exit_failure_count": {"key": "ExitFailureCount", "type": "str"}, + "continuous_exit_failure_count": {"key": "ContinuousExitFailureCount", "type": "str"}, } def __init__(self, **kwargs): super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = kwargs.get('last_exit_code', None) - self.last_activation_time = kwargs.get('last_activation_time', None) - self.last_exit_time = kwargs.get('last_exit_time', None) - self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) - self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) - self.activation_count = kwargs.get('activation_count', None) - self.activation_failure_count = kwargs.get('activation_failure_count', None) - self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) - self.exit_count = kwargs.get('exit_count', None) - self.exit_failure_count = kwargs.get('exit_failure_count', None) - self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) + self.last_exit_code = kwargs.get("last_exit_code", None) + self.last_activation_time = kwargs.get("last_activation_time", None) + self.last_exit_time = kwargs.get("last_exit_time", None) + self.last_successful_activation_time = kwargs.get("last_successful_activation_time", None) + self.last_successful_exit_time = kwargs.get("last_successful_exit_time", None) + self.activation_count = kwargs.get("activation_count", None) + self.activation_failure_count = kwargs.get("activation_failure_count", None) + self.continuous_activation_failure_count = kwargs.get("continuous_activation_failure_count", None) + self.exit_count = kwargs.get("exit_count", None) + self.exit_failure_count = kwargs.get("exit_failure_count", None) + self.continuous_exit_failure_count = kwargs.get("continuous_exit_failure_count", None) class ComposeDeploymentStatusInfo(Model): @@ -6725,18 +6950,18 @@ class ComposeDeploymentStatusInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "status_details": {"key": "StatusDetails", "type": "str"}, } def __init__(self, **kwargs): super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.application_name = kwargs.get('application_name', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) + self.name = kwargs.get("name", None) + self.application_name = kwargs.get("application_name", None) + self.status = kwargs.get("status", None) + self.status_details = kwargs.get("status_details", None) class ComposeDeploymentUpgradeDescription(Model): @@ -6785,34 +7010,39 @@ class ComposeDeploymentUpgradeDescription(Model): """ _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, + "deployment_name": {"required": True}, + "compose_file_content": {"required": True}, + "upgrade_kind": {"required": True}, } _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + "deployment_name": {"key": "DeploymentName", "type": "str"}, + "compose_file_content": {"key": "ComposeFileContent", "type": "str"}, + "registry_credential": {"key": "RegistryCredential", "type": "RegistryCredential"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, } def __init__(self, **kwargs): super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.compose_file_content = kwargs.get('compose_file_content', None) - self.registry_credential = kwargs.get('registry_credential', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) + self.deployment_name = kwargs.get("deployment_name", None) + self.compose_file_content = kwargs.get("compose_file_content", None) + self.registry_credential = kwargs.get("registry_credential", None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get( + "upgrade_replica_set_check_timeout_in_seconds", None + ) + self.force_restart = kwargs.get("force_restart", None) + self.monitoring_policy = kwargs.get("monitoring_policy", None) + self.application_health_policy = kwargs.get("application_health_policy", None) class ComposeDeploymentUpgradeProgressInfo(Model): @@ -6906,50 +7136,64 @@ class ComposeDeploymentUpgradeProgressInfo(Model): """ _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + "deployment_name": {"key": "DeploymentName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "upgrade_status_details": {"key": "UpgradeStatusDetails", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "upgrade_duration": {"key": "UpgradeDuration", "type": "str"}, + "current_upgrade_domain_duration": {"key": "CurrentUpgradeDomainDuration", "type": "str"}, + "application_unhealthy_evaluations": { + "key": "ApplicationUnhealthyEvaluations", + "type": "[HealthEvaluationWrapper]", + }, + "current_upgrade_domain_progress": { + "key": "CurrentUpgradeDomainProgress", + "type": "CurrentUpgradeDomainProgressInfo", + }, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "upgrade_domain_progress_at_failure": { + "key": "UpgradeDomainProgressAtFailure", + "type": "FailureUpgradeDomainProgressInfo", + }, + "application_upgrade_status_details": {"key": "ApplicationUpgradeStatusDetails", "type": "str"}, } def __init__(self, **kwargs): super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.application_name = kwargs.get('application_name', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_duration = kwargs.get('upgrade_duration', None) - self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', None) - self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) + self.deployment_name = kwargs.get("deployment_name", None) + self.application_name = kwargs.get("application_name", None) + self.upgrade_state = kwargs.get("upgrade_state", None) + self.upgrade_status_details = kwargs.get("upgrade_status_details", None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.force_restart = kwargs.get("force_restart", None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get( + "upgrade_replica_set_check_timeout_in_seconds", None + ) + self.monitoring_policy = kwargs.get("monitoring_policy", None) + self.application_health_policy = kwargs.get("application_health_policy", None) + self.target_application_type_version = kwargs.get("target_application_type_version", None) + self.upgrade_duration = kwargs.get("upgrade_duration", None) + self.current_upgrade_domain_duration = kwargs.get("current_upgrade_domain_duration", None) + self.application_unhealthy_evaluations = kwargs.get("application_unhealthy_evaluations", None) + self.current_upgrade_domain_progress = kwargs.get("current_upgrade_domain_progress", None) + self.start_timestamp_utc = kwargs.get("start_timestamp_utc", None) + self.failure_timestamp_utc = kwargs.get("failure_timestamp_utc", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.upgrade_domain_progress_at_failure = kwargs.get("upgrade_domain_progress_at_failure", None) + self.application_upgrade_status_details = kwargs.get("application_upgrade_status_details", None) class ConfigParameterOverride(Model): @@ -6973,26 +7217,26 @@ class ConfigParameterOverride(Model): """ _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, + "section_name": {"required": True}, + "parameter_name": {"required": True}, + "parameter_value": {"required": True}, } _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + "section_name": {"key": "SectionName", "type": "str"}, + "parameter_name": {"key": "ParameterName", "type": "str"}, + "parameter_value": {"key": "ParameterValue", "type": "str"}, + "timeout": {"key": "Timeout", "type": "duration"}, + "persist_across_upgrade": {"key": "PersistAcrossUpgrade", "type": "bool"}, } def __init__(self, **kwargs): super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = kwargs.get('section_name', None) - self.parameter_name = kwargs.get('parameter_name', None) - self.parameter_value = kwargs.get('parameter_value', None) - self.timeout = kwargs.get('timeout', None) - self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) + self.section_name = kwargs.get("section_name", None) + self.parameter_name = kwargs.get("parameter_name", None) + self.parameter_value = kwargs.get("parameter_value", None) + self.timeout = kwargs.get("timeout", None) + self.persist_across_upgrade = kwargs.get("persist_across_upgrade", None) class ContainerApiRequestBody(Model): @@ -7012,22 +7256,22 @@ class ContainerApiRequestBody(Model): """ _validation = { - 'uri_path': {'required': True}, + "uri_path": {"required": True}, } _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, + "http_verb": {"key": "HttpVerb", "type": "str"}, + "uri_path": {"key": "UriPath", "type": "str"}, + "content_type": {"key": "Content-Type", "type": "str"}, + "body": {"key": "Body", "type": "str"}, } def __init__(self, **kwargs): super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = kwargs.get('http_verb', None) - self.uri_path = kwargs.get('uri_path', None) - self.content_type = kwargs.get('content_type', None) - self.body = kwargs.get('body', None) + self.http_verb = kwargs.get("http_verb", None) + self.uri_path = kwargs.get("uri_path", None) + self.content_type = kwargs.get("content_type", None) + self.body = kwargs.get("body", None) class ContainerApiResponse(Model): @@ -7040,16 +7284,16 @@ class ContainerApiResponse(Model): """ _validation = { - 'container_api_result': {'required': True}, + "container_api_result": {"required": True}, } _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + "container_api_result": {"key": "ContainerApiResult", "type": "ContainerApiResult"}, } def __init__(self, **kwargs): super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = kwargs.get('container_api_result', None) + self.container_api_result = kwargs.get("container_api_result", None) class ContainerApiResult(Model): @@ -7069,22 +7313,22 @@ class ContainerApiResult(Model): """ _validation = { - 'status': {'required': True}, + "status": {"required": True}, } _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, + "status": {"key": "Status", "type": "int"}, + "content_type": {"key": "Content-Type", "type": "str"}, + "content_encoding": {"key": "Content-Encoding", "type": "str"}, + "body": {"key": "Body", "type": "str"}, } def __init__(self, **kwargs): super(ContainerApiResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.content_type = kwargs.get('content_type', None) - self.content_encoding = kwargs.get('content_encoding', None) - self.body = kwargs.get('body', None) + self.status = kwargs.get("status", None) + self.content_type = kwargs.get("content_type", None) + self.content_encoding = kwargs.get("content_encoding", None) + self.body = kwargs.get("body", None) class ContainerCodePackageProperties(Model): @@ -7146,51 +7390,51 @@ class ContainerCodePackageProperties(Model): """ _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, + "name": {"required": True}, + "image": {"required": True}, + "resources": {"required": True}, + "instance_view": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + "name": {"key": "name", "type": "str"}, + "image": {"key": "image", "type": "str"}, + "image_registry_credential": {"key": "imageRegistryCredential", "type": "ImageRegistryCredential"}, + "entry_point": {"key": "entryPoint", "type": "str"}, + "commands": {"key": "commands", "type": "[str]"}, + "environment_variables": {"key": "environmentVariables", "type": "[EnvironmentVariable]"}, + "settings": {"key": "settings", "type": "[Setting]"}, + "labels": {"key": "labels", "type": "[ContainerLabel]"}, + "endpoints": {"key": "endpoints", "type": "[EndpointProperties]"}, + "resources": {"key": "resources", "type": "ResourceRequirements"}, + "volume_refs": {"key": "volumeRefs", "type": "[VolumeReference]"}, + "volumes": {"key": "volumes", "type": "[ApplicationScopedVolume]"}, + "diagnostics": {"key": "diagnostics", "type": "DiagnosticsRef"}, + "reliable_collections_refs": {"key": "reliableCollectionsRefs", "type": "[ReliableCollectionsRef]"}, + "instance_view": {"key": "instanceView", "type": "ContainerInstanceView"}, + "liveness_probe": {"key": "livenessProbe", "type": "[Probe]"}, + "readiness_probe": {"key": "readinessProbe", "type": "[Probe]"}, } def __init__(self, **kwargs): super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.image = kwargs.get('image', None) - self.image_registry_credential = kwargs.get('image_registry_credential', None) - self.entry_point = kwargs.get('entry_point', None) - self.commands = kwargs.get('commands', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.settings = kwargs.get('settings', None) - self.labels = kwargs.get('labels', None) - self.endpoints = kwargs.get('endpoints', None) - self.resources = kwargs.get('resources', None) - self.volume_refs = kwargs.get('volume_refs', None) - self.volumes = kwargs.get('volumes', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) + self.name = kwargs.get("name", None) + self.image = kwargs.get("image", None) + self.image_registry_credential = kwargs.get("image_registry_credential", None) + self.entry_point = kwargs.get("entry_point", None) + self.commands = kwargs.get("commands", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.settings = kwargs.get("settings", None) + self.labels = kwargs.get("labels", None) + self.endpoints = kwargs.get("endpoints", None) + self.resources = kwargs.get("resources", None) + self.volume_refs = kwargs.get("volume_refs", None) + self.volumes = kwargs.get("volumes", None) + self.diagnostics = kwargs.get("diagnostics", None) + self.reliable_collections_refs = kwargs.get("reliable_collections_refs", None) self.instance_view = None - self.liveness_probe = kwargs.get('liveness_probe', None) - self.readiness_probe = kwargs.get('readiness_probe', None) + self.liveness_probe = kwargs.get("liveness_probe", None) + self.readiness_probe = kwargs.get("readiness_probe", None) class ContainerEvent(Model): @@ -7211,22 +7455,22 @@ class ContainerEvent(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "count": {"key": "count", "type": "int"}, + "first_timestamp": {"key": "firstTimestamp", "type": "str"}, + "last_timestamp": {"key": "lastTimestamp", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs): super(ContainerEvent, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.first_timestamp = kwargs.get('first_timestamp', None) - self.last_timestamp = kwargs.get('last_timestamp', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) + self.name = kwargs.get("name", None) + self.count = kwargs.get("count", None) + self.first_timestamp = kwargs.get("first_timestamp", None) + self.last_timestamp = kwargs.get("last_timestamp", None) + self.message = kwargs.get("message", None) + self.type = kwargs.get("type", None) class ContainerInstanceEvent(FabricEvent): @@ -7249,22 +7493,22 @@ class ContainerInstanceEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } def __init__(self, **kwargs): super(ContainerInstanceEvent, self).__init__(**kwargs) - self.kind = 'ContainerInstanceEvent' + self.kind = "ContainerInstanceEvent" class ContainerInstanceView(Model): @@ -7282,18 +7526,18 @@ class ContainerInstanceView(Model): """ _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + "restart_count": {"key": "restartCount", "type": "int"}, + "current_state": {"key": "currentState", "type": "ContainerState"}, + "previous_state": {"key": "previousState", "type": "ContainerState"}, + "events": {"key": "events", "type": "[ContainerEvent]"}, } def __init__(self, **kwargs): super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = kwargs.get('restart_count', None) - self.current_state = kwargs.get('current_state', None) - self.previous_state = kwargs.get('previous_state', None) - self.events = kwargs.get('events', None) + self.restart_count = kwargs.get("restart_count", None) + self.current_state = kwargs.get("current_state", None) + self.previous_state = kwargs.get("previous_state", None) + self.events = kwargs.get("events", None) class ContainerLabel(Model): @@ -7308,19 +7552,19 @@ class ContainerLabel(Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__(self, **kwargs): super(ContainerLabel, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) class ContainerLogs(Model): @@ -7331,12 +7575,12 @@ class ContainerLogs(Model): """ _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, + "content": {"key": "Content", "type": "str"}, } def __init__(self, **kwargs): super(ContainerLogs, self).__init__(**kwargs) - self.content = kwargs.get('content', None) + self.content = kwargs.get("content", None) class ContainerState(Model): @@ -7355,20 +7599,20 @@ class ContainerState(Model): """ _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + "state": {"key": "state", "type": "str"}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "exit_code": {"key": "exitCode", "type": "str"}, + "finish_time": {"key": "finishTime", "type": "iso-8601"}, + "detail_status": {"key": "detailStatus", "type": "str"}, } def __init__(self, **kwargs): super(ContainerState, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.start_time = kwargs.get('start_time', None) - self.exit_code = kwargs.get('exit_code', None) - self.finish_time = kwargs.get('finish_time', None) - self.detail_status = kwargs.get('detail_status', None) + self.state = kwargs.get("state", None) + self.start_time = kwargs.get("start_time", None) + self.exit_code = kwargs.get("exit_code", None) + self.finish_time = kwargs.get("finish_time", None) + self.detail_status = kwargs.get("detail_status", None) class CreateComposeDeploymentDescription(Model): @@ -7387,21 +7631,21 @@ class CreateComposeDeploymentDescription(Model): """ _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, + "deployment_name": {"required": True}, + "compose_file_content": {"required": True}, } _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + "deployment_name": {"key": "DeploymentName", "type": "str"}, + "compose_file_content": {"key": "ComposeFileContent", "type": "str"}, + "registry_credential": {"key": "RegistryCredential", "type": "RegistryCredential"}, } def __init__(self, **kwargs): super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.compose_file_content = kwargs.get('compose_file_content', None) - self.registry_credential = kwargs.get('registry_credential', None) + self.deployment_name = kwargs.get("deployment_name", None) + self.compose_file_content = kwargs.get("compose_file_content", None) + self.registry_credential = kwargs.get("registry_credential", None) class CurrentUpgradeDomainProgressInfo(Model): @@ -7417,14 +7661,14 @@ class CurrentUpgradeDomainProgressInfo(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } def __init__(self, **kwargs): super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + self.domain_name = kwargs.get("domain_name", None) + self.node_upgrade_progress_list = kwargs.get("node_upgrade_progress_list", None) class CurrentUpgradeUnitsProgressInfo(Model): @@ -7440,14 +7684,14 @@ class CurrentUpgradeUnitsProgressInfo(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } def __init__(self, **kwargs): super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + self.domain_name = kwargs.get("domain_name", None) + self.node_upgrade_progress_list = kwargs.get("node_upgrade_progress_list", None) class DeactivationIntentDescription(Model): @@ -7461,12 +7705,12 @@ class DeactivationIntentDescription(Model): """ _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + "deactivation_intent": {"key": "DeactivationIntent", "type": "str"}, } def __init__(self, **kwargs): super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = kwargs.get('deactivation_intent', None) + self.deactivation_intent = kwargs.get("deactivation_intent", None) class ExecutionPolicy(Model): @@ -7482,16 +7726,14 @@ class ExecutionPolicy(Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, } - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } + _subtype_map = {"type": {"Default": "DefaultExecutionPolicy", "RunToCompletion": "RunToCompletionExecutionPolicy"}} def __init__(self, **kwargs): super(ExecutionPolicy, self).__init__(**kwargs) @@ -7508,16 +7750,16 @@ class DefaultExecutionPolicy(ExecutionPolicy): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs): super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' + self.type = "Default" class DeletePropertyBatchOperation(PropertyBatchOperation): @@ -7535,18 +7777,18 @@ class DeletePropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, } def __init__(self, **kwargs): super(DeletePropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'Delete' + self.kind = "Delete" class DeltaNodesCheckHealthEvaluation(HealthEvaluation): @@ -7588,28 +7830,28 @@ class DeltaNodesCheckHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "baseline_error_count": {"key": "BaselineErrorCount", "type": "long"}, + "baseline_total_count": {"key": "BaselineTotalCount", "type": "long"}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeltaNodesCheck' + self.baseline_error_count = kwargs.get("baseline_error_count", None) + self.baseline_total_count = kwargs.get("baseline_total_count", None) + self.max_percent_delta_unhealthy_nodes = kwargs.get("max_percent_delta_unhealthy_nodes", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "DeltaNodesCheck" class DeployedApplicationHealth(EntityHealth): @@ -7646,20 +7888,23 @@ class DeployedApplicationHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "deployed_service_package_health_states": { + "key": "DeployedServicePackageHealthStates", + "type": "[DeployedServicePackageHealthState]", + }, } def __init__(self, **kwargs): super(DeployedApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) + self.name = kwargs.get("name", None) + self.node_name = kwargs.get("node_name", None) + self.deployed_service_package_health_states = kwargs.get("deployed_service_package_health_states", None) class DeployedApplicationHealthEvaluation(HealthEvaluation): @@ -7694,24 +7939,24 @@ class DeployedApplicationHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedApplication' + self.node_name = kwargs.get("node_name", None) + self.application_name = kwargs.get("application_name", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "DeployedApplication" class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): @@ -7763,54 +8008,54 @@ class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedApplicationHealthReportExpired' + self.application_instance_id = kwargs.get("application_instance_id", None) + self.node_name = kwargs.get("node_name", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "DeployedApplicationHealthReportExpired" class DeployedApplicationHealthState(EntityHealthState): @@ -7832,15 +8077,15 @@ class DeployedApplicationHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, } def __init__(self, **kwargs): super(DeployedApplicationHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) + self.node_name = kwargs.get("node_name", None) + self.application_name = kwargs.get("application_name", None) class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): @@ -7863,15 +8108,20 @@ class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "deployed_service_package_health_state_chunks": { + "key": "DeployedServicePackageHealthStateChunks", + "type": "DeployedServicePackageHealthStateChunkList", + }, } def __init__(self, **kwargs): super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) + self.node_name = kwargs.get("node_name", None) + self.deployed_service_package_health_state_chunks = kwargs.get( + "deployed_service_package_health_state_chunks", None + ) class DeployedApplicationHealthStateChunkList(Model): @@ -7886,12 +8136,12 @@ class DeployedApplicationHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + "items": {"key": "Items", "type": "[DeployedApplicationHealthStateChunk]"}, } def __init__(self, **kwargs): super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class DeployedApplicationHealthStateFilter(Model): @@ -7960,16 +8210,19 @@ class DeployedApplicationHealthStateFilter(Model): """ _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + "node_name_filter": {"key": "NodeNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "deployed_service_package_filters": { + "key": "DeployedServicePackageFilters", + "type": "[DeployedServicePackageHealthStateFilter]", + }, } def __init__(self, **kwargs): super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) + self.node_name_filter = kwargs.get("node_name_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) + self.deployed_service_package_filters = kwargs.get("deployed_service_package_filters", None) class DeployedApplicationInfo(Model): @@ -8013,28 +8266,28 @@ class DeployedApplicationInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "type_version": {"key": "TypeVersion", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "work_directory": {"key": "WorkDirectory", "type": "str"}, + "log_directory": {"key": "LogDirectory", "type": "str"}, + "temp_directory": {"key": "TempDirectory", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, } def __init__(self, **kwargs): super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.work_directory = kwargs.get('work_directory', None) - self.log_directory = kwargs.get('log_directory', None) - self.temp_directory = kwargs.get('temp_directory', None) - self.health_state = kwargs.get('health_state', None) + self.id = kwargs.get("id", None) + self.name = kwargs.get("name", None) + self.type_name = kwargs.get("type_name", None) + self.type_version = kwargs.get("type_version", None) + self.status = kwargs.get("status", None) + self.work_directory = kwargs.get("work_directory", None) + self.log_directory = kwargs.get("log_directory", None) + self.temp_directory = kwargs.get("temp_directory", None) + self.health_state = kwargs.get("health_state", None) class DeployedApplicationNewHealthReportEvent(ApplicationEvent): @@ -8086,54 +8339,54 @@ class DeployedApplicationNewHealthReportEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedApplicationNewHealthReport' + self.application_instance_id = kwargs.get("application_instance_id", None) + self.node_name = kwargs.get("node_name", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "DeployedApplicationNewHealthReport" class DeployedApplicationsHealthEvaluation(HealthEvaluation): @@ -8171,24 +8424,29 @@ class DeployedApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_deployed_applications": { + "key": "MaxPercentUnhealthyDeployedApplications", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedApplications' + self.max_percent_unhealthy_deployed_applications = kwargs.get( + "max_percent_unhealthy_deployed_applications", None + ) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "DeployedApplications" class DeployedCodePackageInfo(Model): @@ -8237,30 +8495,30 @@ class DeployedCodePackageInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + "name": {"key": "Name", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_type": {"key": "HostType", "type": "str"}, + "host_isolation_mode": {"key": "HostIsolationMode", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "run_frequency_interval": {"key": "RunFrequencyInterval", "type": "str"}, + "setup_entry_point": {"key": "SetupEntryPoint", "type": "CodePackageEntryPoint"}, + "main_entry_point": {"key": "MainEntryPoint", "type": "CodePackageEntryPoint"}, } def __init__(self, **kwargs): super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_type = kwargs.get('host_type', None) - self.host_isolation_mode = kwargs.get('host_isolation_mode', None) - self.status = kwargs.get('status', None) - self.run_frequency_interval = kwargs.get('run_frequency_interval', None) - self.setup_entry_point = kwargs.get('setup_entry_point', None) - self.main_entry_point = kwargs.get('main_entry_point', None) + self.name = kwargs.get("name", None) + self.version = kwargs.get("version", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.host_type = kwargs.get("host_type", None) + self.host_isolation_mode = kwargs.get("host_isolation_mode", None) + self.status = kwargs.get("status", None) + self.run_frequency_interval = kwargs.get("run_frequency_interval", None) + self.setup_entry_point = kwargs.get("setup_entry_point", None) + self.main_entry_point = kwargs.get("main_entry_point", None) class DeployedServicePackageHealth(EntityHealth): @@ -8294,20 +8552,20 @@ class DeployedServicePackageHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealth, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get("application_name", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.node_name = kwargs.get("node_name", None) class DeployedServicePackageHealthEvaluation(HealthEvaluation): @@ -8344,26 +8602,26 @@ class DeployedServicePackageHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedServicePackage' + self.node_name = kwargs.get("node_name", None) + self.application_name = kwargs.get("application_name", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "DeployedServicePackage" class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): @@ -8421,60 +8679,60 @@ class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_manifest": {"required": True}, + "service_package_instance_id": {"required": True}, + "service_package_activation_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_manifest": {"key": "ServiceManifest", "type": "str"}, + "service_package_instance_id": {"key": "ServicePackageInstanceId", "type": "long"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) - self.service_manifest = kwargs.get('service_manifest', None) - self.service_package_instance_id = kwargs.get('service_package_instance_id', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedServicePackageHealthReportExpired' + self.service_manifest = kwargs.get("service_manifest", None) + self.service_package_instance_id = kwargs.get("service_package_instance_id", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.node_name = kwargs.get("node_name", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "DeployedServicePackageHealthReportExpired" class DeployedServicePackageHealthState(EntityHealthState): @@ -8506,19 +8764,19 @@ class DeployedServicePackageHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.node_name = kwargs.get("node_name", None) + self.application_name = kwargs.get("application_name", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): @@ -8542,15 +8800,15 @@ class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) class DeployedServicePackageHealthStateChunkList(Model): @@ -8565,12 +8823,12 @@ class DeployedServicePackageHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + "items": {"key": "Items", "type": "[DeployedServicePackageHealthStateChunk]"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class DeployedServicePackageHealthStateFilter(Model): @@ -8633,16 +8891,16 @@ class DeployedServicePackageHealthStateFilter(Model): """ _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + "service_manifest_name_filter": {"key": "ServiceManifestNameFilter", "type": "str"}, + "service_package_activation_id_filter": {"key": "ServicePackageActivationIdFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, } def __init__(self, **kwargs): super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) - self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) + self.service_manifest_name_filter = kwargs.get("service_manifest_name_filter", None) + self.service_package_activation_id_filter = kwargs.get("service_package_activation_id_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) class DeployedServicePackageInfo(Model): @@ -8669,18 +8927,18 @@ class DeployedServicePackageInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } def __init__(self, **kwargs): super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.name = kwargs.get("name", None) + self.version = kwargs.get("version", None) + self.status = kwargs.get("status", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): @@ -8738,60 +8996,60 @@ class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_manifest_name": {"required": True}, + "service_package_instance_id": {"required": True}, + "service_package_activation_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_instance_id": {"key": "ServicePackageInstanceId", "type": "long"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_instance_id = kwargs.get('service_package_instance_id', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedServicePackageNewHealthReport' + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.service_package_instance_id = kwargs.get("service_package_instance_id", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.node_name = kwargs.get("node_name", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "DeployedServicePackageNewHealthReport" class DeployedServicePackagesHealthEvaluation(HealthEvaluation): @@ -8826,22 +9084,22 @@ class DeployedServicePackagesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedServicePackages' + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "DeployedServicePackages" class DeployedServiceReplicaDetailInfo(Model): @@ -8879,29 +9137,32 @@ class DeployedServiceReplicaDetailInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "current_service_operation": {"key": "CurrentServiceOperation", "type": "str"}, + "current_service_operation_start_time_utc": {"key": "CurrentServiceOperationStartTimeUtc", "type": "iso-8601"}, + "reported_load": {"key": "ReportedLoad", "type": "[LoadMetricReportInfo]"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + "service_kind": { + "Stateful": "DeployedStatefulServiceReplicaDetailInfo", + "Stateless": "DeployedStatelessServiceInstanceDetailInfo", + } } def __init__(self, **kwargs): super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.current_service_operation = kwargs.get('current_service_operation', None) - self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) - self.reported_load = kwargs.get('reported_load', None) + self.service_name = kwargs.get("service_name", None) + self.partition_id = kwargs.get("partition_id", None) + self.current_service_operation = kwargs.get("current_service_operation", None) + self.current_service_operation_start_time_utc = kwargs.get("current_service_operation_start_time_utc", None) + self.reported_load = kwargs.get("reported_load", None) self.service_kind = None @@ -8955,37 +9216,40 @@ class DeployedServiceReplicaInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_process_id": {"key": "HostProcessId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + "service_kind": { + "Stateful": "DeployedStatefulServiceReplicaInfo", + "Stateless": "DeployedStatelessServiceInstanceInfo", + } } def __init__(self, **kwargs): super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.replica_status = kwargs.get('replica_status', None) - self.address = kwargs.get('address', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_process_id = kwargs.get('host_process_id', None) + self.service_name = kwargs.get("service_name", None) + self.service_type_name = kwargs.get("service_type_name", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.code_package_name = kwargs.get("code_package_name", None) + self.partition_id = kwargs.get("partition_id", None) + self.replica_status = kwargs.get("replica_status", None) + self.address = kwargs.get("address", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.host_process_id = kwargs.get("host_process_id", None) self.service_kind = None @@ -9016,20 +9280,20 @@ class DeployedServiceTypeInfo(Model): """ _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } def __init__(self, **kwargs): super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.service_type_name = kwargs.get("service_type_name", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.code_package_name = kwargs.get("code_package_name", None) + self.status = kwargs.get("status", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): @@ -9103,35 +9367,38 @@ class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo) """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "current_service_operation": {"key": "CurrentServiceOperation", "type": "str"}, + "current_service_operation_start_time_utc": {"key": "CurrentServiceOperationStartTimeUtc", "type": "iso-8601"}, + "reported_load": {"key": "ReportedLoad", "type": "[LoadMetricReportInfo]"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, + "current_replicator_operation": {"key": "CurrentReplicatorOperation", "type": "str"}, + "read_status": {"key": "ReadStatus", "type": "str"}, + "write_status": {"key": "WriteStatus", "type": "str"}, + "replicator_status": {"key": "ReplicatorStatus", "type": "ReplicatorStatus"}, + "replica_status": {"key": "ReplicaStatus", "type": "KeyValueStoreReplicaStatus"}, + "deployed_service_replica_query_result": { + "key": "DeployedServiceReplicaQueryResult", + "type": "DeployedStatefulServiceReplicaInfo", + }, } def __init__(self, **kwargs): super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.current_replicator_operation = kwargs.get('current_replicator_operation', None) - self.read_status = kwargs.get('read_status', None) - self.write_status = kwargs.get('write_status', None) - self.replicator_status = kwargs.get('replicator_status', None) - self.replica_status = kwargs.get('replica_status', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - self.service_kind = 'Stateful' + self.replica_id = kwargs.get("replica_id", None) + self.current_replicator_operation = kwargs.get("current_replicator_operation", None) + self.read_status = kwargs.get("read_status", None) + self.write_status = kwargs.get("write_status", None) + self.replicator_status = kwargs.get("replicator_status", None) + self.replica_status = kwargs.get("replica_status", None) + self.deployed_service_replica_query_result = kwargs.get("deployed_service_replica_query_result", None) + self.service_kind = "Stateful" class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): @@ -9197,31 +9464,31 @@ class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_process_id": {"key": "HostProcessId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, + "replica_role": {"key": "ReplicaRole", "type": "str"}, + "reconfiguration_information": {"key": "ReconfigurationInformation", "type": "ReconfigurationInformation"}, } def __init__(self, **kwargs): super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.replica_role = kwargs.get('replica_role', None) - self.reconfiguration_information = kwargs.get('reconfiguration_information', None) - self.service_kind = 'Stateful' + self.replica_id = kwargs.get("replica_id", None) + self.replica_role = kwargs.get("replica_role", None) + self.reconfiguration_information = kwargs.get("reconfiguration_information", None) + self.service_kind = "Stateful" class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): @@ -9267,25 +9534,28 @@ class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInf """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "current_service_operation": {"key": "CurrentServiceOperation", "type": "str"}, + "current_service_operation_start_time_utc": {"key": "CurrentServiceOperationStartTimeUtc", "type": "iso-8601"}, + "reported_load": {"key": "ReportedLoad", "type": "[LoadMetricReportInfo]"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, + "deployed_service_replica_query_result": { + "key": "DeployedServiceReplicaQueryResult", + "type": "DeployedStatelessServiceInstanceInfo", + }, } def __init__(self, **kwargs): super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - self.service_kind = 'Stateless' + self.instance_id = kwargs.get("instance_id", None) + self.deployed_service_replica_query_result = kwargs.get("deployed_service_replica_query_result", None) + self.service_kind = "Stateless" class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): @@ -9340,27 +9610,27 @@ class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_process_id": {"key": "HostProcessId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, } def __init__(self, **kwargs): super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' + self.instance_id = kwargs.get("instance_id", None) + self.service_kind = "Stateless" class DeployServicePackageToNodeDescription(Model): @@ -9386,27 +9656,27 @@ class DeployServicePackageToNodeDescription(Model): """ _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, + "service_manifest_name": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "node_name": {"required": True}, } _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "package_sharing_policy": {"key": "PackageSharingPolicy", "type": "[PackageSharingPolicyInfo]"}, } def __init__(self, **kwargs): super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.node_name = kwargs.get('node_name', None) - self.package_sharing_policy = kwargs.get('package_sharing_policy', None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.application_type_name = kwargs.get("application_type_name", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.node_name = kwargs.get("node_name", None) + self.package_sharing_policy = kwargs.get("package_sharing_policy", None) class DiagnosticsDescription(Model): @@ -9422,16 +9692,16 @@ class DiagnosticsDescription(Model): """ _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + "sinks": {"key": "sinks", "type": "[DiagnosticsSinkProperties]"}, + "enabled": {"key": "enabled", "type": "bool"}, + "default_sink_refs": {"key": "defaultSinkRefs", "type": "[str]"}, } def __init__(self, **kwargs): super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = kwargs.get('sinks', None) - self.enabled = kwargs.get('enabled', None) - self.default_sink_refs = kwargs.get('default_sink_refs', None) + self.sinks = kwargs.get("sinks", None) + self.enabled = kwargs.get("enabled", None) + self.default_sink_refs = kwargs.get("default_sink_refs", None) class DiagnosticsRef(Model): @@ -9445,14 +9715,14 @@ class DiagnosticsRef(Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + "enabled": {"key": "enabled", "type": "bool"}, + "sink_refs": {"key": "sinkRefs", "type": "[str]"}, } def __init__(self, **kwargs): super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.sink_refs = kwargs.get('sink_refs', None) + self.enabled = kwargs.get("enabled", None) + self.sink_refs = kwargs.get("sink_refs", None) class DisableBackupDescription(Model): @@ -9468,16 +9738,16 @@ class DisableBackupDescription(Model): """ _validation = { - 'clean_backup': {'required': True}, + "clean_backup": {"required": True}, } _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + "clean_backup": {"key": "CleanBackup", "type": "bool"}, } def __init__(self, **kwargs): super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = kwargs.get('clean_backup', None) + self.clean_backup = kwargs.get("clean_backup", None) class DiskInfo(Model): @@ -9490,14 +9760,14 @@ class DiskInfo(Model): """ _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + "capacity": {"key": "Capacity", "type": "str"}, + "available_space": {"key": "AvailableSpace", "type": "str"}, } def __init__(self, **kwargs): super(DiskInfo, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) - self.available_space = kwargs.get('available_space', None) + self.capacity = kwargs.get("capacity", None) + self.available_space = kwargs.get("available_space", None) class DoublePropertyValue(PropertyValue): @@ -9512,19 +9782,19 @@ class DoublePropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "float"}, } def __init__(self, **kwargs): super(DoublePropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Double' + self.data = kwargs.get("data", None) + self.kind = "Double" class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): @@ -9546,23 +9816,23 @@ class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): """ _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, + "storage_kind": {"required": True}, + "storage_credentials_source_location": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "storage_credentials_source_location": {"key": "StorageCredentialsSourceLocation", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, } def __init__(self, **kwargs): super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.storage_credentials_source_location = kwargs.get('storage_credentials_source_location', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'DsmsAzureBlobStore' + self.storage_credentials_source_location = kwargs.get("storage_credentials_source_location", None) + self.container_name = kwargs.get("container_name", None) + self.storage_kind = "DsmsAzureBlobStore" class EnableBackupDescription(Model): @@ -9576,16 +9846,16 @@ class EnableBackupDescription(Model): """ _validation = { - 'backup_policy_name': {'required': True}, + "backup_policy_name": {"required": True}, } _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + "backup_policy_name": {"key": "BackupPolicyName", "type": "str"}, } def __init__(self, **kwargs): super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = kwargs.get('backup_policy_name', None) + self.backup_policy_name = kwargs.get("backup_policy_name", None) class EndpointProperties(Model): @@ -9600,18 +9870,18 @@ class EndpointProperties(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, + "name": {"key": "name", "type": "str"}, + "port": {"key": "port", "type": "int"}, } def __init__(self, **kwargs): super(EndpointProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) + self.name = kwargs.get("name", None) + self.port = kwargs.get("port", None) class EndpointRef(Model): @@ -9622,12 +9892,12 @@ class EndpointRef(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, } def __init__(self, **kwargs): super(EndpointRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs.get("name", None) class SafetyCheck(Model): @@ -9645,15 +9915,15 @@ class SafetyCheck(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} + "kind": {"PartitionSafetyCheck": "PartitionSafetyCheck", "EnsureSeedNodeQuorum": "SeedNodeSafetyCheck"} } def __init__(self, **kwargs): @@ -9681,22 +9951,29 @@ class PartitionSafetyCheck(SafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + "kind": { + "EnsureAvailability": "EnsureAvailabilitySafetyCheck", + "EnsurePartitionQuorum": "EnsurePartitionQuorumSafetyCheck", + "WaitForInbuildReplica": "WaitForInbuildReplicaSafetyCheck", + "WaitForPrimaryPlacement": "WaitForPrimaryPlacementSafetyCheck", + "WaitForPrimarySwap": "WaitForPrimarySwapSafetyCheck", + "WaitForReconfiguration": "WaitForReconfigurationSafetyCheck", + } } def __init__(self, **kwargs): super(PartitionSafetyCheck, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'PartitionSafetyCheck' + self.partition_id = kwargs.get("partition_id", None) + self.kind = "PartitionSafetyCheck" class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): @@ -9714,17 +9991,17 @@ class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureAvailability' + self.kind = "EnsureAvailability" class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): @@ -9741,17 +10018,17 @@ class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsurePartitionQuorum' + self.kind = "EnsurePartitionQuorum" class EntityKindHealthStateCount(Model): @@ -9768,14 +10045,14 @@ class EntityKindHealthStateCount(Model): """ _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "health_state_count": {"key": "HealthStateCount", "type": "HealthStateCount"}, } def __init__(self, **kwargs): super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = kwargs.get('entity_kind', None) - self.health_state_count = kwargs.get('health_state_count', None) + self.entity_kind = kwargs.get("entity_kind", None) + self.health_state_count = kwargs.get("health_state_count", None) class EnvironmentVariable(Model): @@ -9793,16 +10070,16 @@ class EnvironmentVariable(Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__(self, **kwargs): super(EnvironmentVariable, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) + self.type = kwargs.get("type", "ClearText") + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) class Epoch(Model): @@ -9824,14 +10101,14 @@ class Epoch(Model): """ _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + "configuration_version": {"key": "ConfigurationVersion", "type": "str"}, + "data_loss_version": {"key": "DataLossVersion", "type": "str"}, } def __init__(self, **kwargs): super(Epoch, self).__init__(**kwargs) - self.configuration_version = kwargs.get('configuration_version', None) - self.data_loss_version = kwargs.get('data_loss_version', None) + self.configuration_version = kwargs.get("configuration_version", None) + self.data_loss_version = kwargs.get("data_loss_version", None) class EventHealthEvaluation(HealthEvaluation): @@ -9864,22 +10141,22 @@ class EventHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "consider_warning_as_error": {"key": "ConsiderWarningAsError", "type": "bool"}, + "unhealthy_event": {"key": "UnhealthyEvent", "type": "HealthEvent"}, } def __init__(self, **kwargs): super(EventHealthEvaluation, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) - self.unhealthy_event = kwargs.get('unhealthy_event', None) - self.kind = 'Event' + self.consider_warning_as_error = kwargs.get("consider_warning_as_error", None) + self.unhealthy_event = kwargs.get("unhealthy_event", None) + self.kind = "Event" class ExecutingFaultsChaosEvent(ChaosEvent): @@ -9900,20 +10177,20 @@ class ExecutingFaultsChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "faults": {"key": "Faults", "type": "[str]"}, } def __init__(self, **kwargs): super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) - self.faults = kwargs.get('faults', None) - self.kind = 'ExecutingFaults' + self.faults = kwargs.get("faults", None) + self.kind = "ExecutingFaults" class ProvisionApplicationTypeDescriptionBase(Model): @@ -9938,22 +10215,25 @@ class ProvisionApplicationTypeDescriptionBase(Model): """ _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, + "async_property": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "async_property": {"key": "Async", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} + "kind": { + "ImageStorePath": "ProvisionApplicationTypeDescription", + "ExternalStore": "ExternalStoreProvisionApplicationTypeDescription", + } } def __init__(self, **kwargs): super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.async_property = kwargs.get('async_property', None) + self.async_property = kwargs.get("async_property", None) self.kind = None @@ -9990,27 +10270,27 @@ class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeD """ _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, + "async_property": {"required": True}, + "kind": {"required": True}, + "application_package_download_uri": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, } _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + "async_property": {"key": "Async", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_package_download_uri": {"key": "ApplicationPackageDownloadUri", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, } def __init__(self, **kwargs): super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.application_package_download_uri = kwargs.get('application_package_download_uri', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.kind = 'ExternalStore' + self.application_package_download_uri = kwargs.get("application_package_download_uri", None) + self.application_type_name = kwargs.get("application_type_name", None) + self.application_type_version = kwargs.get("application_type_version", None) + self.kind = "ExternalStore" class FabricCodeVersionInfo(Model): @@ -10021,12 +10301,12 @@ class FabricCodeVersionInfo(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + "code_version": {"key": "CodeVersion", "type": "str"}, } def __init__(self, **kwargs): super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) + self.code_version = kwargs.get("code_version", None) class FabricConfigVersionInfo(Model): @@ -10037,12 +10317,12 @@ class FabricConfigVersionInfo(Model): """ _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + "config_version": {"key": "ConfigVersion", "type": "str"}, } def __init__(self, **kwargs): super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) + self.config_version = kwargs.get("config_version", None) class FabricError(Model): @@ -10058,16 +10338,16 @@ class FabricError(Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + "error": {"key": "Error", "type": "FabricErrorError"}, } def __init__(self, **kwargs): super(FabricError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.error = kwargs.get("error", None) class FabricErrorException(HttpOperationError): @@ -10079,7 +10359,7 @@ class FabricErrorException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) + super(FabricErrorException, self).__init__(deserialize, response, "FabricError", *args) class FabricErrorError(Model): @@ -10249,18 +10529,18 @@ class FabricErrorError(Model): """ _validation = { - 'code': {'required': True}, + "code": {"required": True}, } _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, + "code": {"key": "Code", "type": "str"}, + "message": {"key": "Message", "type": "str"}, } def __init__(self, **kwargs): super(FabricErrorError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + self.code = kwargs.get("code", None) + self.message = kwargs.get("message", None) class PropertyBatchInfo(Model): @@ -10276,16 +10556,14 @@ class PropertyBatchInfo(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} - } + _subtype_map = {"kind": {"Successful": "SuccessfulPropertyBatchInfo", "Failed": "FailedPropertyBatchInfo"}} def __init__(self, **kwargs): super(PropertyBatchInfo, self).__init__(**kwargs) @@ -10310,20 +10588,20 @@ class FailedPropertyBatchInfo(PropertyBatchInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + "kind": {"key": "Kind", "type": "str"}, + "error_message": {"key": "ErrorMessage", "type": "str"}, + "operation_index": {"key": "OperationIndex", "type": "int"}, } def __init__(self, **kwargs): super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.error_message = kwargs.get('error_message', None) - self.operation_index = kwargs.get('operation_index', None) - self.kind = 'Failed' + self.error_message = kwargs.get("error_message", None) + self.operation_index = kwargs.get("operation_index", None) + self.kind = "Failed" class FailedUpgradeDomainProgressObject(Model): @@ -10339,14 +10617,14 @@ class FailedUpgradeDomainProgressObject(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } def __init__(self, **kwargs): super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + self.domain_name = kwargs.get("domain_name", None) + self.node_upgrade_progress_list = kwargs.get("node_upgrade_progress_list", None) class FailureUpgradeDomainProgressInfo(Model): @@ -10362,14 +10640,14 @@ class FailureUpgradeDomainProgressInfo(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } def __init__(self, **kwargs): super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + self.domain_name = kwargs.get("domain_name", None) + self.node_upgrade_progress_list = kwargs.get("node_upgrade_progress_list", None) class FileInfo(Model): @@ -10388,18 +10666,18 @@ class FileInfo(Model): """ _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + "file_size": {"key": "FileSize", "type": "str"}, + "file_version": {"key": "FileVersion", "type": "FileVersion"}, + "modified_date": {"key": "ModifiedDate", "type": "iso-8601"}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, } def __init__(self, **kwargs): super(FileInfo, self).__init__(**kwargs) - self.file_size = kwargs.get('file_size', None) - self.file_version = kwargs.get('file_version', None) - self.modified_date = kwargs.get('modified_date', None) - self.store_relative_path = kwargs.get('store_relative_path', None) + self.file_size = kwargs.get("file_size", None) + self.file_version = kwargs.get("file_version", None) + self.modified_date = kwargs.get("modified_date", None) + self.store_relative_path = kwargs.get("store_relative_path", None) class FileShareBackupStorageDescription(BackupStorageDescription): @@ -10426,28 +10704,28 @@ class FileShareBackupStorageDescription(BackupStorageDescription): """ _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, + "storage_kind": {"required": True}, + "path": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "path": {"key": "Path", "type": "str"}, + "primary_user_name": {"key": "PrimaryUserName", "type": "str"}, + "primary_password": {"key": "PrimaryPassword", "type": "str"}, + "secondary_user_name": {"key": "SecondaryUserName", "type": "str"}, + "secondary_password": {"key": "SecondaryPassword", "type": "str"}, } def __init__(self, **kwargs): super(FileShareBackupStorageDescription, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.primary_user_name = kwargs.get('primary_user_name', None) - self.primary_password = kwargs.get('primary_password', None) - self.secondary_user_name = kwargs.get('secondary_user_name', None) - self.secondary_password = kwargs.get('secondary_password', None) - self.storage_kind = 'FileShare' + self.path = kwargs.get("path", None) + self.primary_user_name = kwargs.get("primary_user_name", None) + self.primary_password = kwargs.get("primary_password", None) + self.secondary_user_name = kwargs.get("secondary_user_name", None) + self.secondary_password = kwargs.get("secondary_password", None) + self.storage_kind = "FileShare" class FileVersion(Model): @@ -10465,16 +10743,16 @@ class FileVersion(Model): """ _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + "version_number": {"key": "VersionNumber", "type": "str"}, + "epoch_data_loss_number": {"key": "EpochDataLossNumber", "type": "str"}, + "epoch_configuration_number": {"key": "EpochConfigurationNumber", "type": "str"}, } def __init__(self, **kwargs): super(FileVersion, self).__init__(**kwargs) - self.version_number = kwargs.get('version_number', None) - self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) - self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) + self.version_number = kwargs.get("version_number", None) + self.epoch_data_loss_number = kwargs.get("epoch_data_loss_number", None) + self.epoch_configuration_number = kwargs.get("epoch_configuration_number", None) class FolderInfo(Model): @@ -10489,14 +10767,14 @@ class FolderInfo(Model): """ _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, + "file_count": {"key": "FileCount", "type": "str"}, } def __init__(self, **kwargs): super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.file_count = kwargs.get('file_count', None) + self.store_relative_path = kwargs.get("store_relative_path", None) + self.file_count = kwargs.get("file_count", None) class FolderSizeInfo(Model): @@ -10510,14 +10788,14 @@ class FolderSizeInfo(Model): """ _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, + "folder_size": {"key": "FolderSize", "type": "str"}, } def __init__(self, **kwargs): super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.folder_size = kwargs.get('folder_size', None) + self.store_relative_path = kwargs.get("store_relative_path", None) + self.folder_size = kwargs.get("folder_size", None) class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): @@ -10534,19 +10812,19 @@ class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): """ _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, + "schedule_kind": {"required": True}, + "interval": {"required": True}, } _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, + "schedule_kind": {"key": "ScheduleKind", "type": "str"}, + "interval": {"key": "Interval", "type": "duration"}, } def __init__(self, **kwargs): super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.schedule_kind = 'FrequencyBased' + self.interval = kwargs.get("interval", None) + self.schedule_kind = "FrequencyBased" class GatewayDestination(Model): @@ -10564,22 +10842,22 @@ class GatewayDestination(Model): """ _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, + "application_name": {"required": True}, + "service_name": {"required": True}, + "endpoint_name": {"required": True}, } _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + "application_name": {"key": "applicationName", "type": "str"}, + "service_name": {"key": "serviceName", "type": "str"}, + "endpoint_name": {"key": "endpointName", "type": "str"}, } def __init__(self, **kwargs): super(GatewayDestination, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.endpoint_name = kwargs.get('endpoint_name', None) + self.application_name = kwargs.get("application_name", None) + self.service_name = kwargs.get("service_name", None) + self.endpoint_name = kwargs.get("endpoint_name", None) class GatewayResourceDescription(Model): @@ -10616,34 +10894,34 @@ class GatewayResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, + "name": {"required": True}, + "source_network": {"required": True}, + "destination_network": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "ip_address": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "source_network": {"key": "properties.sourceNetwork", "type": "NetworkRef"}, + "destination_network": {"key": "properties.destinationNetwork", "type": "NetworkRef"}, + "tcp": {"key": "properties.tcp", "type": "[TcpConfig]"}, + "http": {"key": "properties.http", "type": "[HttpConfig]"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "ip_address": {"key": "properties.ipAddress", "type": "str"}, } def __init__(self, **kwargs): super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.source_network = kwargs.get('source_network', None) - self.destination_network = kwargs.get('destination_network', None) - self.tcp = kwargs.get('tcp', None) - self.http = kwargs.get('http', None) + self.name = kwargs.get("name", None) + self.description = kwargs.get("description", None) + self.source_network = kwargs.get("source_network", None) + self.destination_network = kwargs.get("destination_network", None) + self.tcp = kwargs.get("tcp", None) + self.http = kwargs.get("http", None) self.status = None self.status_details = None self.ip_address = None @@ -10680,25 +10958,25 @@ class GetBackupByStorageQueryDescription(Model): """ _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, + "storage": {"required": True}, + "backup_entity": {"required": True}, } _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + "start_date_time_filter": {"key": "StartDateTimeFilter", "type": "iso-8601"}, + "end_date_time_filter": {"key": "EndDateTimeFilter", "type": "iso-8601"}, + "latest": {"key": "Latest", "type": "bool"}, + "storage": {"key": "Storage", "type": "BackupStorageDescription"}, + "backup_entity": {"key": "BackupEntity", "type": "BackupEntity"}, } def __init__(self, **kwargs): super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = kwargs.get('start_date_time_filter', None) - self.end_date_time_filter = kwargs.get('end_date_time_filter', None) - self.latest = kwargs.get('latest', False) - self.storage = kwargs.get('storage', None) - self.backup_entity = kwargs.get('backup_entity', None) + self.start_date_time_filter = kwargs.get("start_date_time_filter", None) + self.end_date_time_filter = kwargs.get("end_date_time_filter", None) + self.latest = kwargs.get("latest", False) + self.storage = kwargs.get("storage", None) + self.backup_entity = kwargs.get("backup_entity", None) class GetPropertyBatchOperation(PropertyBatchOperation): @@ -10721,20 +10999,20 @@ class GetPropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "include_value": {"key": "IncludeValue", "type": "bool"}, } def __init__(self, **kwargs): super(GetPropertyBatchOperation, self).__init__(**kwargs) - self.include_value = kwargs.get('include_value', False) - self.kind = 'Get' + self.include_value = kwargs.get("include_value", False) + self.kind = "Get" class GuidPropertyValue(PropertyValue): @@ -10749,19 +11027,19 @@ class GuidPropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "str"}, } def __init__(self, **kwargs): super(GuidPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Guid' + self.data = kwargs.get("data", None) + self.kind = "Guid" class HealthEvaluationWrapper(Model): @@ -10774,12 +11052,12 @@ class HealthEvaluationWrapper(Model): """ _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + "health_evaluation": {"key": "HealthEvaluation", "type": "HealthEvaluation"}, } def __init__(self, **kwargs): super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = kwargs.get('health_evaluation', None) + self.health_evaluation = kwargs.get("health_evaluation", None) class HealthInformation(Model): @@ -10861,32 +11139,32 @@ class HealthInformation(Model): """ _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, } _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_in_milli_seconds": {"key": "TimeToLiveInMilliSeconds", "type": "duration"}, + "description": {"key": "Description", "type": "str"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "health_report_id": {"key": "HealthReportId", "type": "str"}, } def __init__(self, **kwargs): super(HealthInformation, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) - self.description = kwargs.get('description', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.health_report_id = kwargs.get('health_report_id', None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_in_milli_seconds = kwargs.get("time_to_live_in_milli_seconds", None) + self.description = kwargs.get("description", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.health_report_id = kwargs.get("health_report_id", None) class HealthEvent(HealthInformation): @@ -11008,36 +11286,36 @@ class HealthEvent(HealthInformation): """ _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, } _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_in_milli_seconds": {"key": "TimeToLiveInMilliSeconds", "type": "duration"}, + "description": {"key": "Description", "type": "str"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "health_report_id": {"key": "HealthReportId", "type": "str"}, + "is_expired": {"key": "IsExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + "last_modified_utc_timestamp": {"key": "LastModifiedUtcTimestamp", "type": "iso-8601"}, + "last_ok_transition_at": {"key": "LastOkTransitionAt", "type": "iso-8601"}, + "last_warning_transition_at": {"key": "LastWarningTransitionAt", "type": "iso-8601"}, + "last_error_transition_at": {"key": "LastErrorTransitionAt", "type": "iso-8601"}, } def __init__(self, **kwargs): super(HealthEvent, self).__init__(**kwargs) - self.is_expired = kwargs.get('is_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) - self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) - self.last_error_transition_at = kwargs.get('last_error_transition_at', None) + self.is_expired = kwargs.get("is_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.last_modified_utc_timestamp = kwargs.get("last_modified_utc_timestamp", None) + self.last_ok_transition_at = kwargs.get("last_ok_transition_at", None) + self.last_warning_transition_at = kwargs.get("last_warning_transition_at", None) + self.last_error_transition_at = kwargs.get("last_error_transition_at", None) class HealthStateCount(Model): @@ -11056,22 +11334,22 @@ class HealthStateCount(Model): """ _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, + "ok_count": {"minimum": 0}, + "warning_count": {"minimum": 0}, + "error_count": {"minimum": 0}, } _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + "ok_count": {"key": "OkCount", "type": "long"}, + "warning_count": {"key": "WarningCount", "type": "long"}, + "error_count": {"key": "ErrorCount", "type": "long"}, } def __init__(self, **kwargs): super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = kwargs.get('ok_count', None) - self.warning_count = kwargs.get('warning_count', None) - self.error_count = kwargs.get('error_count', None) + self.ok_count = kwargs.get("ok_count", None) + self.warning_count = kwargs.get("warning_count", None) + self.error_count = kwargs.get("error_count", None) class HealthStatistics(Model): @@ -11092,12 +11370,12 @@ class HealthStatistics(Model): """ _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + "health_state_count_list": {"key": "HealthStateCountList", "type": "[EntityKindHealthStateCount]"}, } def __init__(self, **kwargs): super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = kwargs.get('health_state_count_list', None) + self.health_state_count_list = kwargs.get("health_state_count_list", None) class HttpConfig(Model): @@ -11116,22 +11394,22 @@ class HttpConfig(Model): """ _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, + "name": {"required": True}, + "port": {"required": True}, + "hosts": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + "name": {"key": "name", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "hosts": {"key": "hosts", "type": "[HttpHostConfig]"}, } def __init__(self, **kwargs): super(HttpConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - self.hosts = kwargs.get('hosts', None) + self.name = kwargs.get("name", None) + self.port = kwargs.get("port", None) + self.hosts = kwargs.get("hosts", None) class HttpHostConfig(Model): @@ -11148,19 +11426,19 @@ class HttpHostConfig(Model): """ _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, + "name": {"required": True}, + "routes": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + "name": {"key": "name", "type": "str"}, + "routes": {"key": "routes", "type": "[HttpRouteConfig]"}, } def __init__(self, **kwargs): super(HttpHostConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.routes = kwargs.get('routes', None) + self.name = kwargs.get("name", None) + self.routes = kwargs.get("routes", None) class HttpRouteConfig(Model): @@ -11178,22 +11456,22 @@ class HttpRouteConfig(Model): """ _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, + "name": {"required": True}, + "match": {"required": True}, + "destination": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + "name": {"key": "name", "type": "str"}, + "match": {"key": "match", "type": "HttpRouteMatchRule"}, + "destination": {"key": "destination", "type": "GatewayDestination"}, } def __init__(self, **kwargs): super(HttpRouteConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.match = kwargs.get('match', None) - self.destination = kwargs.get('destination', None) + self.name = kwargs.get("name", None) + self.match = kwargs.get("match", None) + self.destination = kwargs.get("destination", None) class HttpRouteMatchHeader(Model): @@ -11210,20 +11488,20 @@ class HttpRouteMatchHeader(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs): super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) + self.type = kwargs.get("type", None) class HttpRouteMatchPath(Model): @@ -11244,22 +11522,22 @@ class HttpRouteMatchPath(Model): """ _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, + "value": {"required": True}, + "type": {"required": True, "constant": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "rewrite": {"key": "rewrite", "type": "str"}, + "type": {"key": "type", "type": "str"}, } type = "prefix" def __init__(self, **kwargs): super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.rewrite = kwargs.get('rewrite', None) + self.value = kwargs.get("value", None) + self.rewrite = kwargs.get("rewrite", None) class HttpRouteMatchRule(Model): @@ -11274,18 +11552,18 @@ class HttpRouteMatchRule(Model): """ _validation = { - 'path': {'required': True}, + "path": {"required": True}, } _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + "path": {"key": "path", "type": "HttpRouteMatchPath"}, + "headers": {"key": "headers", "type": "[HttpRouteMatchHeader]"}, } def __init__(self, **kwargs): super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.headers = kwargs.get('headers', None) + self.path = kwargs.get("path", None) + self.headers = kwargs.get("headers", None) class IdentityDescription(Model): @@ -11311,24 +11589,24 @@ class IdentityDescription(Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + "token_service_endpoint": {"key": "tokenServiceEndpoint", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{IdentityItemDescription}"}, } def __init__(self, **kwargs): super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.type = kwargs.get('type', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.principal_id = kwargs.get('principal_id', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + self.token_service_endpoint = kwargs.get("token_service_endpoint", None) + self.type = kwargs.get("type", None) + self.tenant_id = kwargs.get("tenant_id", None) + self.principal_id = kwargs.get("principal_id", None) + self.user_assigned_identities = kwargs.get("user_assigned_identities", None) class IdentityItemDescription(Model): @@ -11343,14 +11621,14 @@ class IdentityItemDescription(Model): """ _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, } def __init__(self, **kwargs): super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.client_id = kwargs.get('client_id', None) + self.principal_id = kwargs.get("principal_id", None) + self.client_id = kwargs.get("client_id", None) class ImageRegistryCredential(Model): @@ -11375,23 +11653,23 @@ class ImageRegistryCredential(Model): """ _validation = { - 'server': {'required': True}, - 'username': {'required': True}, + "server": {"required": True}, + "username": {"required": True}, } _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, + "server": {"key": "server", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password_type": {"key": "passwordType", "type": "str"}, + "password": {"key": "password", "type": "str"}, } def __init__(self, **kwargs): super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.username = kwargs.get('username', None) - self.password_type = kwargs.get('password_type', "ClearText") - self.password = kwargs.get('password', None) + self.server = kwargs.get("server", None) + self.username = kwargs.get("username", None) + self.password_type = kwargs.get("password_type", "ClearText") + self.password = kwargs.get("password", None) class ImageStoreContent(Model): @@ -11406,14 +11684,14 @@ class ImageStoreContent(Model): """ _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + "store_files": {"key": "StoreFiles", "type": "[FileInfo]"}, + "store_folders": {"key": "StoreFolders", "type": "[FolderInfo]"}, } def __init__(self, **kwargs): super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = kwargs.get('store_files', None) - self.store_folders = kwargs.get('store_folders', None) + self.store_files = kwargs.get("store_files", None) + self.store_folders = kwargs.get("store_folders", None) class ImageStoreCopyDescription(Model): @@ -11439,23 +11717,23 @@ class ImageStoreCopyDescription(Model): """ _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, + "remote_source": {"required": True}, + "remote_destination": {"required": True}, } _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + "remote_source": {"key": "RemoteSource", "type": "str"}, + "remote_destination": {"key": "RemoteDestination", "type": "str"}, + "skip_files": {"key": "SkipFiles", "type": "[str]"}, + "check_mark_file": {"key": "CheckMarkFile", "type": "bool"}, } def __init__(self, **kwargs): super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = kwargs.get('remote_source', None) - self.remote_destination = kwargs.get('remote_destination', None) - self.skip_files = kwargs.get('skip_files', None) - self.check_mark_file = kwargs.get('check_mark_file', None) + self.remote_source = kwargs.get("remote_source", None) + self.remote_destination = kwargs.get("remote_destination", None) + self.skip_files = kwargs.get("skip_files", None) + self.check_mark_file = kwargs.get("check_mark_file", None) class ImageStoreInfo(Model): @@ -11484,20 +11762,20 @@ class ImageStoreInfo(Model): """ _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + "disk_info": {"key": "DiskInfo", "type": "DiskInfo"}, + "used_by_metadata": {"key": "UsedByMetadata", "type": "UsageInfo"}, + "used_by_staging": {"key": "UsedByStaging", "type": "UsageInfo"}, + "used_by_copy": {"key": "UsedByCopy", "type": "UsageInfo"}, + "used_by_register": {"key": "UsedByRegister", "type": "UsageInfo"}, } def __init__(self, **kwargs): super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = kwargs.get('disk_info', None) - self.used_by_metadata = kwargs.get('used_by_metadata', None) - self.used_by_staging = kwargs.get('used_by_staging', None) - self.used_by_copy = kwargs.get('used_by_copy', None) - self.used_by_register = kwargs.get('used_by_register', None) + self.disk_info = kwargs.get("disk_info", None) + self.used_by_metadata = kwargs.get("used_by_metadata", None) + self.used_by_staging = kwargs.get("used_by_staging", None) + self.used_by_copy = kwargs.get("used_by_copy", None) + self.used_by_register = kwargs.get("used_by_register", None) class SecretResourcePropertiesBase(Model): @@ -11514,16 +11792,14 @@ class SecretResourcePropertiesBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } + _subtype_map = {"kind": {"SecretResourceProperties": "SecretResourceProperties"}} def __init__(self, **kwargs): super(SecretResourcePropertiesBase, self).__init__(**kwargs) @@ -11558,30 +11834,28 @@ class SecretResourceProperties(SecretResourcePropertiesBase): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "content_type": {"key": "contentType", "type": "str"}, } - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } + _subtype_map = {"kind": {"inlinedValue": "InlinedValueSecretResourceProperties"}} def __init__(self, **kwargs): super(SecretResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.status = None self.status_details = None - self.content_type = kwargs.get('content_type', None) - self.kind = 'SecretResourceProperties' + self.content_type = kwargs.get("content_type", None) + self.kind = "SecretResourceProperties" class InlinedValueSecretResourceProperties(SecretResourceProperties): @@ -11613,22 +11887,22 @@ class InlinedValueSecretResourceProperties(SecretResourceProperties): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "content_type": {"key": "contentType", "type": "str"}, } def __init__(self, **kwargs): super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) - self.kind = 'inlinedValue' + self.kind = "inlinedValue" class InstanceLifecycleDescription(Model): @@ -11640,12 +11914,12 @@ class InstanceLifecycleDescription(Model): """ _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + "restore_replica_location_after_upgrade": {"key": "RestoreReplicaLocationAfterUpgrade", "type": "bool"}, } def __init__(self, **kwargs): super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) + self.restore_replica_location_after_upgrade = kwargs.get("restore_replica_location_after_upgrade", None) class Int64PropertyValue(PropertyValue): @@ -11660,19 +11934,19 @@ class Int64PropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "str"}, } def __init__(self, **kwargs): super(Int64PropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Int64' + self.data = kwargs.get("data", None) + self.kind = "Int64" class PartitionInformation(Model): @@ -11696,21 +11970,25 @@ class PartitionInformation(Model): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, } _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + "service_partition_kind": { + "Int64Range": "Int64RangePartitionInformation", + "Named": "NamedPartitionInformation", + "Singleton": "SingletonPartitionInformation", + } } def __init__(self, **kwargs): super(PartitionInformation, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.id = kwargs.get("id", None) self.service_partition_kind = None @@ -11736,21 +12014,21 @@ class Int64RangePartitionInformation(PartitionInformation): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, + "low_key": {"key": "LowKey", "type": "str"}, + "high_key": {"key": "HighKey", "type": "str"}, } def __init__(self, **kwargs): super(Int64RangePartitionInformation, self).__init__(**kwargs) - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - self.service_partition_kind = 'Int64Range' + self.low_key = kwargs.get("low_key", None) + self.high_key = kwargs.get("high_key", None) + self.service_partition_kind = "Int64Range" class InvokeDataLossResult(Model): @@ -11766,14 +12044,14 @@ class InvokeDataLossResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "selected_partition": {"key": "SelectedPartition", "type": "SelectedPartition"}, } def __init__(self, **kwargs): super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) + self.error_code = kwargs.get("error_code", None) + self.selected_partition = kwargs.get("selected_partition", None) class InvokeQuorumLossResult(Model): @@ -11789,14 +12067,14 @@ class InvokeQuorumLossResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "selected_partition": {"key": "SelectedPartition", "type": "SelectedPartition"}, } def __init__(self, **kwargs): super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) + self.error_code = kwargs.get("error_code", None) + self.selected_partition = kwargs.get("selected_partition", None) class ReplicaStatusBase(Model): @@ -11812,16 +12090,14 @@ class ReplicaStatusBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } + _subtype_map = {"kind": {"KeyValueStore": "KeyValueStoreReplicaStatus"}} def __init__(self, **kwargs): super(ReplicaStatusBase, self).__init__(**kwargs) @@ -11855,26 +12131,26 @@ class KeyValueStoreReplicaStatus(ReplicaStatusBase): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "database_row_count_estimate": {"key": "DatabaseRowCountEstimate", "type": "str"}, + "database_logical_size_estimate": {"key": "DatabaseLogicalSizeEstimate", "type": "str"}, + "copy_notification_current_key_filter": {"key": "CopyNotificationCurrentKeyFilter", "type": "str"}, + "copy_notification_current_progress": {"key": "CopyNotificationCurrentProgress", "type": "str"}, + "status_details": {"key": "StatusDetails", "type": "str"}, } def __init__(self, **kwargs): super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) - self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) - self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) - self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) - self.status_details = kwargs.get('status_details', None) - self.kind = 'KeyValueStore' + self.database_row_count_estimate = kwargs.get("database_row_count_estimate", None) + self.database_logical_size_estimate = kwargs.get("database_logical_size_estimate", None) + self.copy_notification_current_key_filter = kwargs.get("copy_notification_current_key_filter", None) + self.copy_notification_current_progress = kwargs.get("copy_notification_current_progress", None) + self.status_details = kwargs.get("status_details", None) + self.kind = "KeyValueStore" class LoadedPartitionInformationQueryDescription(Model): @@ -11906,20 +12182,20 @@ class LoadedPartitionInformationQueryDescription(Model): """ _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + "metric_name": {"key": "MetricName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "ordering": {"key": "Ordering", "type": "str"}, + "max_results": {"key": "MaxResults", "type": "long"}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, } def __init__(self, **kwargs): super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.service_name = kwargs.get('service_name', None) - self.ordering = kwargs.get('ordering', "Desc") - self.max_results = kwargs.get('max_results', None) - self.continuation_token = kwargs.get('continuation_token', None) + self.metric_name = kwargs.get("metric_name", None) + self.service_name = kwargs.get("service_name", None) + self.ordering = kwargs.get("ordering", "Desc") + self.max_results = kwargs.get("max_results", None) + self.continuation_token = kwargs.get("continuation_token", None) class LoadedPartitionInformationResult(Model): @@ -11940,25 +12216,25 @@ class LoadedPartitionInformationResult(Model): """ _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, + "service_name": {"required": True}, + "partition_id": {"required": True}, + "metric_name": {"required": True}, + "load": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "metric_name": {"key": "MetricName", "type": "str"}, + "load": {"key": "Load", "type": "long"}, } def __init__(self, **kwargs): super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.metric_name = kwargs.get('metric_name', None) - self.load = kwargs.get('load', None) + self.service_name = kwargs.get("service_name", None) + self.partition_id = kwargs.get("partition_id", None) + self.metric_name = kwargs.get("metric_name", None) + self.load = kwargs.get("load", None) class LoadedPartitionInformationResultList(Model): @@ -11978,14 +12254,14 @@ class LoadedPartitionInformationResultList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[LoadedPartitionInformationResult]"}, } def __init__(self, **kwargs): super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class LoadMetricInformation(Model): @@ -12071,60 +12347,60 @@ class LoadMetricInformation(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "is_balanced_before": {"key": "IsBalancedBefore", "type": "bool"}, + "is_balanced_after": {"key": "IsBalancedAfter", "type": "bool"}, + "deviation_before": {"key": "DeviationBefore", "type": "str"}, + "deviation_after": {"key": "DeviationAfter", "type": "str"}, + "balancing_threshold": {"key": "BalancingThreshold", "type": "str"}, + "action": {"key": "Action", "type": "str"}, + "activity_threshold": {"key": "ActivityThreshold", "type": "str"}, + "cluster_capacity": {"key": "ClusterCapacity", "type": "str"}, + "cluster_load": {"key": "ClusterLoad", "type": "str"}, + "current_cluster_load": {"key": "CurrentClusterLoad", "type": "str"}, + "cluster_remaining_capacity": {"key": "ClusterRemainingCapacity", "type": "str"}, + "cluster_capacity_remaining": {"key": "ClusterCapacityRemaining", "type": "str"}, + "is_cluster_capacity_violation": {"key": "IsClusterCapacityViolation", "type": "bool"}, + "node_buffer_percentage": {"key": "NodeBufferPercentage", "type": "str"}, + "cluster_buffered_capacity": {"key": "ClusterBufferedCapacity", "type": "str"}, + "buffered_cluster_capacity_remaining": {"key": "BufferedClusterCapacityRemaining", "type": "str"}, + "cluster_remaining_buffered_capacity": {"key": "ClusterRemainingBufferedCapacity", "type": "str"}, + "min_node_load_value": {"key": "MinNodeLoadValue", "type": "str"}, + "minimum_node_load": {"key": "MinimumNodeLoad", "type": "str"}, + "min_node_load_node_id": {"key": "MinNodeLoadNodeId", "type": "NodeId"}, + "max_node_load_value": {"key": "MaxNodeLoadValue", "type": "str"}, + "maximum_node_load": {"key": "MaximumNodeLoad", "type": "str"}, + "max_node_load_node_id": {"key": "MaxNodeLoadNodeId", "type": "NodeId"}, + "planned_load_removal": {"key": "PlannedLoadRemoval", "type": "str"}, } def __init__(self, **kwargs): super(LoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.is_balanced_before = kwargs.get('is_balanced_before', None) - self.is_balanced_after = kwargs.get('is_balanced_after', None) - self.deviation_before = kwargs.get('deviation_before', None) - self.deviation_after = kwargs.get('deviation_after', None) - self.balancing_threshold = kwargs.get('balancing_threshold', None) - self.action = kwargs.get('action', None) - self.activity_threshold = kwargs.get('activity_threshold', None) - self.cluster_capacity = kwargs.get('cluster_capacity', None) - self.cluster_load = kwargs.get('cluster_load', None) - self.current_cluster_load = kwargs.get('current_cluster_load', None) - self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) - self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) - self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) - self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) - self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) - self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) - self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) - self.min_node_load_value = kwargs.get('min_node_load_value', None) - self.minimum_node_load = kwargs.get('minimum_node_load', None) - self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) - self.max_node_load_value = kwargs.get('max_node_load_value', None) - self.maximum_node_load = kwargs.get('maximum_node_load', None) - self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) - self.planned_load_removal = kwargs.get('planned_load_removal', None) + self.name = kwargs.get("name", None) + self.is_balanced_before = kwargs.get("is_balanced_before", None) + self.is_balanced_after = kwargs.get("is_balanced_after", None) + self.deviation_before = kwargs.get("deviation_before", None) + self.deviation_after = kwargs.get("deviation_after", None) + self.balancing_threshold = kwargs.get("balancing_threshold", None) + self.action = kwargs.get("action", None) + self.activity_threshold = kwargs.get("activity_threshold", None) + self.cluster_capacity = kwargs.get("cluster_capacity", None) + self.cluster_load = kwargs.get("cluster_load", None) + self.current_cluster_load = kwargs.get("current_cluster_load", None) + self.cluster_remaining_capacity = kwargs.get("cluster_remaining_capacity", None) + self.cluster_capacity_remaining = kwargs.get("cluster_capacity_remaining", None) + self.is_cluster_capacity_violation = kwargs.get("is_cluster_capacity_violation", None) + self.node_buffer_percentage = kwargs.get("node_buffer_percentage", None) + self.cluster_buffered_capacity = kwargs.get("cluster_buffered_capacity", None) + self.buffered_cluster_capacity_remaining = kwargs.get("buffered_cluster_capacity_remaining", None) + self.cluster_remaining_buffered_capacity = kwargs.get("cluster_remaining_buffered_capacity", None) + self.min_node_load_value = kwargs.get("min_node_load_value", None) + self.minimum_node_load = kwargs.get("minimum_node_load", None) + self.min_node_load_node_id = kwargs.get("min_node_load_node_id", None) + self.max_node_load_value = kwargs.get("max_node_load_value", None) + self.maximum_node_load = kwargs.get("maximum_node_load", None) + self.max_node_load_node_id = kwargs.get("max_node_load_node_id", None) + self.planned_load_removal = kwargs.get("planned_load_removal", None) class LoadMetricReport(Model): @@ -12143,18 +12419,18 @@ class LoadMetricReport(Model): """ _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + "last_reported_utc": {"key": "LastReportedUtc", "type": "iso-8601"}, + "name": {"key": "Name", "type": "str"}, + "value": {"key": "Value", "type": "str"}, + "current_value": {"key": "CurrentValue", "type": "str"}, } def __init__(self, **kwargs): super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = kwargs.get('last_reported_utc', None) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) + self.last_reported_utc = kwargs.get("last_reported_utc", None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) + self.current_value = kwargs.get("current_value", None) class LoadMetricReportInfo(Model): @@ -12172,18 +12448,18 @@ class LoadMetricReportInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + "name": {"key": "Name", "type": "str"}, + "value": {"key": "Value", "type": "int"}, + "current_value": {"key": "CurrentValue", "type": "str"}, + "last_reported_utc": {"key": "LastReportedUtc", "type": "iso-8601"}, } def __init__(self, **kwargs): super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) - self.last_reported_utc = kwargs.get('last_reported_utc', None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) + self.current_value = kwargs.get("current_value", None) + self.last_reported_utc = kwargs.get("last_reported_utc", None) class NetworkResourcePropertiesBase(Model): @@ -12200,16 +12476,14 @@ class NetworkResourcePropertiesBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } + _subtype_map = {"kind": {"NetworkResourceProperties": "NetworkResourceProperties"}} def __init__(self, **kwargs): super(NetworkResourcePropertiesBase, self).__init__(**kwargs) @@ -12240,28 +12514,26 @@ class NetworkResourceProperties(NetworkResourcePropertiesBase): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, } - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } + _subtype_map = {"kind": {"Local": "LocalNetworkResourceProperties"}} def __init__(self, **kwargs): super(NetworkResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.status = None self.status_details = None - self.kind = 'NetworkResourceProperties' + self.kind = "NetworkResourceProperties" class LocalNetworkResourceProperties(NetworkResourceProperties): @@ -12289,23 +12561,23 @@ class LocalNetworkResourceProperties(NetworkResourceProperties): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "network_address_prefix": {"key": "networkAddressPrefix", "type": "str"}, } def __init__(self, **kwargs): super(LocalNetworkResourceProperties, self).__init__(**kwargs) - self.network_address_prefix = kwargs.get('network_address_prefix', None) - self.kind = 'Local' + self.network_address_prefix = kwargs.get("network_address_prefix", None) + self.kind = "Local" class ManagedApplicationIdentity(Model): @@ -12320,18 +12592,18 @@ class ManagedApplicationIdentity(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "principal_id": {"key": "PrincipalId", "type": "str"}, } def __init__(self, **kwargs): super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.principal_id = kwargs.get('principal_id', None) + self.name = kwargs.get("name", None) + self.principal_id = kwargs.get("principal_id", None) class ManagedApplicationIdentityDescription(Model): @@ -12345,14 +12617,14 @@ class ManagedApplicationIdentityDescription(Model): """ _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + "token_service_endpoint": {"key": "TokenServiceEndpoint", "type": "str"}, + "managed_identities": {"key": "ManagedIdentities", "type": "[ManagedApplicationIdentity]"}, } def __init__(self, **kwargs): super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.managed_identities = kwargs.get('managed_identities', None) + self.token_service_endpoint = kwargs.get("token_service_endpoint", None) + self.managed_identities = kwargs.get("managed_identities", None) class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): @@ -12379,26 +12651,26 @@ class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription) """ _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, + "storage_kind": {"required": True}, + "managed_identity_type": {"required": True}, + "blob_service_uri": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "managed_identity_type": {"key": "ManagedIdentityType", "type": "str"}, + "blob_service_uri": {"key": "BlobServiceUri", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, } def __init__(self, **kwargs): super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.managed_identity_type = kwargs.get('managed_identity_type', None) - self.blob_service_uri = kwargs.get('blob_service_uri', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'ManagedIdentityAzureBlobStore' + self.managed_identity_type = kwargs.get("managed_identity_type", None) + self.blob_service_uri = kwargs.get("blob_service_uri", None) + self.container_name = kwargs.get("container_name", None) + self.storage_kind = "ManagedIdentityAzureBlobStore" class MetricLoadDescription(Model): @@ -12416,16 +12688,16 @@ class MetricLoadDescription(Model): """ _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + "metric_name": {"key": "MetricName", "type": "str"}, + "current_load": {"key": "CurrentLoad", "type": "long"}, + "predicted_load": {"key": "PredictedLoad", "type": "long"}, } def __init__(self, **kwargs): super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.current_load = kwargs.get('current_load', None) - self.predicted_load = kwargs.get('predicted_load', None) + self.metric_name = kwargs.get("metric_name", None) + self.current_load = kwargs.get("current_load", None) + self.predicted_load = kwargs.get("predicted_load", None) class MonitoringPolicyDescription(Model): @@ -12471,22 +12743,27 @@ class MonitoringPolicyDescription(Model): """ _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + "failure_action": {"key": "FailureAction", "type": "str"}, + "health_check_wait_duration_in_milliseconds": {"key": "HealthCheckWaitDurationInMilliseconds", "type": "str"}, + "health_check_stable_duration_in_milliseconds": { + "key": "HealthCheckStableDurationInMilliseconds", + "type": "str", + }, + "health_check_retry_timeout_in_milliseconds": {"key": "HealthCheckRetryTimeoutInMilliseconds", "type": "str"}, + "upgrade_timeout_in_milliseconds": {"key": "UpgradeTimeoutInMilliseconds", "type": "str"}, + "upgrade_domain_timeout_in_milliseconds": {"key": "UpgradeDomainTimeoutInMilliseconds", "type": "str"}, } def __init__(self, **kwargs): super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) + self.failure_action = kwargs.get("failure_action", None) + self.health_check_wait_duration_in_milliseconds = kwargs.get("health_check_wait_duration_in_milliseconds", None) + self.health_check_stable_duration_in_milliseconds = kwargs.get( + "health_check_stable_duration_in_milliseconds", None + ) + self.health_check_retry_timeout_in_milliseconds = kwargs.get("health_check_retry_timeout_in_milliseconds", None) + self.upgrade_timeout_in_milliseconds = kwargs.get("upgrade_timeout_in_milliseconds", None) + self.upgrade_domain_timeout_in_milliseconds = kwargs.get("upgrade_domain_timeout_in_milliseconds", None) class NameDescription(Model): @@ -12500,16 +12777,16 @@ class NameDescription(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, **kwargs): super(NameDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs.get("name", None) class NamedPartitionInformation(PartitionInformation): @@ -12531,19 +12808,19 @@ class NamedPartitionInformation(PartitionInformation): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, **kwargs): super(NamedPartitionInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_partition_kind = 'Named' + self.name = kwargs.get("name", None) + self.service_partition_kind = "Named" class PartitionSchemeDescription(Model): @@ -12561,15 +12838,19 @@ class PartitionSchemeDescription(Model): """ _validation = { - 'partition_scheme': {'required': True}, + "partition_scheme": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, } _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + "partition_scheme": { + "Named": "NamedPartitionSchemeDescription", + "Singleton": "SingletonPartitionSchemeDescription", + "UniformInt64Range": "UniformInt64RangePartitionSchemeDescription", + } } def __init__(self, **kwargs): @@ -12592,22 +12873,22 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription): """ _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, + "partition_scheme": {"required": True}, + "count": {"required": True}, + "names": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, + "count": {"key": "Count", "type": "int"}, + "names": {"key": "Names", "type": "[str]"}, } def __init__(self, **kwargs): super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.names = kwargs.get('names', None) - self.partition_scheme = 'Named' + self.count = kwargs.get("count", None) + self.names = kwargs.get("names", None) + self.partition_scheme = "Named" class NetworkRef(Model): @@ -12621,14 +12902,14 @@ class NetworkRef(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + "name": {"key": "name", "type": "str"}, + "endpoint_refs": {"key": "endpointRefs", "type": "[EndpointRef]"}, } def __init__(self, **kwargs): super(NetworkRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.endpoint_refs = kwargs.get('endpoint_refs', None) + self.name = kwargs.get("name", None) + self.endpoint_refs = kwargs.get("endpoint_refs", None) class NetworkResourceDescription(Model): @@ -12643,19 +12924,19 @@ class NetworkResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, + "name": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "NetworkResourceProperties"}, } def __init__(self, **kwargs): super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.properties = kwargs.get('properties', None) + self.name = kwargs.get("name", None) + self.properties = kwargs.get("properties", None) class NodeAbortedEvent(NodeEvent): @@ -12696,48 +12977,48 @@ class NodeAbortedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "node_id": {"required": True}, + "upgrade_domain": {"required": True}, + "fault_domain": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "hostname": {"required": True}, + "is_seed_node": {"required": True}, + "node_version": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_id": {"key": "NodeId", "type": "str"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "hostname": {"key": "Hostname", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "node_version": {"key": "NodeVersion", "type": "str"}, } def __init__(self, **kwargs): super(NodeAbortedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.kind = 'NodeAborted' + self.node_instance = kwargs.get("node_instance", None) + self.node_id = kwargs.get("node_id", None) + self.upgrade_domain = kwargs.get("upgrade_domain", None) + self.fault_domain = kwargs.get("fault_domain", None) + self.ip_address_or_fqdn = kwargs.get("ip_address_or_fqdn", None) + self.hostname = kwargs.get("hostname", None) + self.is_seed_node = kwargs.get("is_seed_node", None) + self.node_version = kwargs.get("node_version", None) + self.kind = "NodeAborted" class NodeAddedToClusterEvent(NodeEvent): @@ -12774,42 +13055,42 @@ class NodeAddedToClusterEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_id": {"required": True}, + "node_instance": {"required": True}, + "node_type": {"required": True}, + "fabric_version": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "node_capacities": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_id": {"key": "NodeId", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_type": {"key": "NodeType", "type": "str"}, + "fabric_version": {"key": "FabricVersion", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "node_capacities": {"key": "NodeCapacities", "type": "str"}, } def __init__(self, **kwargs): super(NodeAddedToClusterEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.node_type = kwargs.get('node_type', None) - self.fabric_version = kwargs.get('fabric_version', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.node_capacities = kwargs.get('node_capacities', None) - self.kind = 'NodeAddedToCluster' + self.node_id = kwargs.get("node_id", None) + self.node_instance = kwargs.get("node_instance", None) + self.node_type = kwargs.get("node_type", None) + self.fabric_version = kwargs.get("fabric_version", None) + self.ip_address_or_fqdn = kwargs.get("ip_address_or_fqdn", None) + self.node_capacities = kwargs.get("node_capacities", None) + self.kind = "NodeAddedToCluster" class NodeClosedEvent(NodeEvent): @@ -12840,33 +13121,33 @@ class NodeClosedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_id": {"required": True}, + "node_instance": {"required": True}, + "error": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_id": {"key": "NodeId", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "error": {"key": "Error", "type": "str"}, } def __init__(self, **kwargs): super(NodeClosedEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.error = kwargs.get('error', None) - self.kind = 'NodeClosed' + self.node_id = kwargs.get("node_id", None) + self.node_instance = kwargs.get("node_instance", None) + self.error = kwargs.get("error", None) + self.kind = "NodeClosed" class NodeDeactivateCompletedEvent(NodeEvent): @@ -12899,36 +13180,36 @@ class NodeDeactivateCompletedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "effective_deactivate_intent": {"required": True}, + "batch_ids_with_deactivate_intent": {"required": True}, + "start_time": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "effective_deactivate_intent": {"key": "EffectiveDeactivateIntent", "type": "str"}, + "batch_ids_with_deactivate_intent": {"key": "BatchIdsWithDeactivateIntent", "type": "str"}, + "start_time": {"key": "StartTime", "type": "iso-8601"}, } def __init__(self, **kwargs): super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.effective_deactivate_intent = kwargs.get('effective_deactivate_intent', None) - self.batch_ids_with_deactivate_intent = kwargs.get('batch_ids_with_deactivate_intent', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'NodeDeactivateCompleted' + self.node_instance = kwargs.get("node_instance", None) + self.effective_deactivate_intent = kwargs.get("effective_deactivate_intent", None) + self.batch_ids_with_deactivate_intent = kwargs.get("batch_ids_with_deactivate_intent", None) + self.start_time = kwargs.get("start_time", None) + self.kind = "NodeDeactivateCompleted" class NodeDeactivateStartedEvent(NodeEvent): @@ -12959,33 +13240,33 @@ class NodeDeactivateStartedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "batch_id": {"required": True}, + "deactivate_intent": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "batch_id": {"key": "BatchId", "type": "str"}, + "deactivate_intent": {"key": "DeactivateIntent", "type": "str"}, } def __init__(self, **kwargs): super(NodeDeactivateStartedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.batch_id = kwargs.get('batch_id', None) - self.deactivate_intent = kwargs.get('deactivate_intent', None) - self.kind = 'NodeDeactivateStarted' + self.node_instance = kwargs.get("node_instance", None) + self.batch_id = kwargs.get("batch_id", None) + self.deactivate_intent = kwargs.get("deactivate_intent", None) + self.kind = "NodeDeactivateStarted" class NodeDeactivationInfo(Model): @@ -13012,18 +13293,18 @@ class NodeDeactivationInfo(Model): """ _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + "node_deactivation_intent": {"key": "NodeDeactivationIntent", "type": "str"}, + "node_deactivation_status": {"key": "NodeDeactivationStatus", "type": "str"}, + "node_deactivation_task": {"key": "NodeDeactivationTask", "type": "[NodeDeactivationTask]"}, + "pending_safety_checks": {"key": "PendingSafetyChecks", "type": "[SafetyCheckWrapper]"}, } def __init__(self, **kwargs): super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) - self.node_deactivation_status = kwargs.get('node_deactivation_status', None) - self.node_deactivation_task = kwargs.get('node_deactivation_task', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) + self.node_deactivation_intent = kwargs.get("node_deactivation_intent", None) + self.node_deactivation_status = kwargs.get("node_deactivation_status", None) + self.node_deactivation_task = kwargs.get("node_deactivation_task", None) + self.pending_safety_checks = kwargs.get("pending_safety_checks", None) class NodeDeactivationTask(Model): @@ -13041,14 +13322,14 @@ class NodeDeactivationTask(Model): """ _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + "node_deactivation_task_id": {"key": "NodeDeactivationTaskId", "type": "NodeDeactivationTaskId"}, + "node_deactivation_intent": {"key": "NodeDeactivationIntent", "type": "str"}, } def __init__(self, **kwargs): super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) + self.node_deactivation_task_id = kwargs.get("node_deactivation_task_id", None) + self.node_deactivation_intent = kwargs.get("node_deactivation_intent", None) class NodeDeactivationTaskId(Model): @@ -13064,14 +13345,14 @@ class NodeDeactivationTaskId(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "node_deactivation_task_type": {"key": "NodeDeactivationTaskType", "type": "str"}, } def __init__(self, **kwargs): super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) + self.id = kwargs.get("id", None) + self.node_deactivation_task_type = kwargs.get("node_deactivation_task_type", None) class NodeDownEvent(NodeEvent): @@ -13100,30 +13381,30 @@ class NodeDownEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "last_node_up_at": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "last_node_up_at": {"key": "LastNodeUpAt", "type": "iso-8601"}, } def __init__(self, **kwargs): super(NodeDownEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.last_node_up_at = kwargs.get('last_node_up_at', None) - self.kind = 'NodeDown' + self.node_instance = kwargs.get("node_instance", None) + self.last_node_up_at = kwargs.get("last_node_up_at", None) + self.kind = "NodeDown" class NodeHealth(EntityHealth): @@ -13152,16 +13433,16 @@ class NodeHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, **kwargs): super(NodeHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + self.name = kwargs.get("name", None) class NodeHealthEvaluation(HealthEvaluation): @@ -13193,22 +13474,22 @@ class NodeHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(NodeHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Node' + self.node_name = kwargs.get("node_name", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Node" class NodeHealthReportExpiredEvent(NodeEvent): @@ -13252,51 +13533,51 @@ class NodeHealthReportExpiredEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'NodeHealthReportExpired' + self.node_instance_id = kwargs.get("node_instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "NodeHealthReportExpired" class NodeHealthState(EntityHealthState): @@ -13317,15 +13598,15 @@ class NodeHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "id": {"key": "Id", "type": "NodeId"}, } def __init__(self, **kwargs): super(NodeHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) + self.name = kwargs.get("name", None) + self.id = kwargs.get("id", None) class NodeHealthStateChunk(EntityHealthStateChunk): @@ -13341,13 +13622,13 @@ class NodeHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, } def __init__(self, **kwargs): super(NodeHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) + self.node_name = kwargs.get("node_name", None) class NodeHealthStateChunkList(EntityHealthStateChunkList): @@ -13364,13 +13645,13 @@ class NodeHealthStateChunkList(EntityHealthStateChunkList): """ _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + "total_count": {"key": "TotalCount", "type": "long"}, + "items": {"key": "Items", "type": "[NodeHealthStateChunk]"}, } def __init__(self, **kwargs): super(NodeHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class NodeHealthStateFilter(Model): @@ -13417,14 +13698,14 @@ class NodeHealthStateFilter(Model): """ _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + "node_name_filter": {"key": "NodeNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, } def __init__(self, **kwargs): super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) + self.node_name_filter = kwargs.get("node_name_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) class NodeId(Model): @@ -13436,12 +13717,12 @@ class NodeId(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, } def __init__(self, **kwargs): super(NodeId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.id = kwargs.get("id", None) class NodeImpact(Model): @@ -13459,18 +13740,18 @@ class NodeImpact(Model): """ _validation = { - 'node_name': {'required': True}, + "node_name": {"required": True}, } _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + "node_name": {"key": "NodeName", "type": "str"}, + "impact_level": {"key": "ImpactLevel", "type": "str"}, } def __init__(self, **kwargs): super(NodeImpact, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.impact_level = kwargs.get('impact_level', None) + self.node_name = kwargs.get("node_name", None) + self.impact_level = kwargs.get("impact_level", None) class NodeInfo(Model): @@ -13544,52 +13825,52 @@ class NodeInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, - 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "type": {"key": "Type", "type": "str"}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "node_status": {"key": "NodeStatus", "type": "str"}, + "node_up_time_in_seconds": {"key": "NodeUpTimeInSeconds", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "id": {"key": "Id", "type": "NodeId"}, + "instance_id": {"key": "InstanceId", "type": "str"}, + "node_deactivation_info": {"key": "NodeDeactivationInfo", "type": "NodeDeactivationInfo"}, + "is_stopped": {"key": "IsStopped", "type": "bool"}, + "node_down_time_in_seconds": {"key": "NodeDownTimeInSeconds", "type": "str"}, + "node_up_at": {"key": "NodeUpAt", "type": "iso-8601"}, + "node_down_at": {"key": "NodeDownAt", "type": "iso-8601"}, + "node_tags": {"key": "NodeTags", "type": "[str]"}, + "is_node_by_node_upgrade_in_progress": {"key": "IsNodeByNodeUpgradeInProgress", "type": "bool"}, + "infrastructure_placement_id": {"key": "InfrastructurePlacementID", "type": "str"}, } def __init__(self, **kwargs): super(NodeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.type = kwargs.get('type', None) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.node_status = kwargs.get('node_status', None) - self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) - self.health_state = kwargs.get('health_state', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.id = kwargs.get('id', None) - self.instance_id = kwargs.get('instance_id', None) - self.node_deactivation_info = kwargs.get('node_deactivation_info', None) - self.is_stopped = kwargs.get('is_stopped', None) - self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) - self.node_up_at = kwargs.get('node_up_at', None) - self.node_down_at = kwargs.get('node_down_at', None) - self.node_tags = kwargs.get('node_tags', None) - self.is_node_by_node_upgrade_in_progress = kwargs.get('is_node_by_node_upgrade_in_progress', None) - self.infrastructure_placement_id = kwargs.get('infrastructure_placement_id', None) + self.name = kwargs.get("name", None) + self.ip_address_or_fqdn = kwargs.get("ip_address_or_fqdn", None) + self.type = kwargs.get("type", None) + self.code_version = kwargs.get("code_version", None) + self.config_version = kwargs.get("config_version", None) + self.node_status = kwargs.get("node_status", None) + self.node_up_time_in_seconds = kwargs.get("node_up_time_in_seconds", None) + self.health_state = kwargs.get("health_state", None) + self.is_seed_node = kwargs.get("is_seed_node", None) + self.upgrade_domain = kwargs.get("upgrade_domain", None) + self.fault_domain = kwargs.get("fault_domain", None) + self.id = kwargs.get("id", None) + self.instance_id = kwargs.get("instance_id", None) + self.node_deactivation_info = kwargs.get("node_deactivation_info", None) + self.is_stopped = kwargs.get("is_stopped", None) + self.node_down_time_in_seconds = kwargs.get("node_down_time_in_seconds", None) + self.node_up_at = kwargs.get("node_up_at", None) + self.node_down_at = kwargs.get("node_down_at", None) + self.node_tags = kwargs.get("node_tags", None) + self.is_node_by_node_upgrade_in_progress = kwargs.get("is_node_by_node_upgrade_in_progress", None) + self.infrastructure_placement_id = kwargs.get("infrastructure_placement_id", None) class NodeLoadInfo(Model): @@ -13606,14 +13887,14 @@ class NodeLoadInfo(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_load_metric_information": {"key": "NodeLoadMetricInformation", "type": "[NodeLoadMetricInformation]"}, } def __init__(self, **kwargs): super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_load_metric_information = kwargs.get('node_load_metric_information', None) + self.node_name = kwargs.get("node_name", None) + self.node_load_metric_information = kwargs.get("node_load_metric_information", None) class NodeLoadMetricInformation(Model): @@ -13660,32 +13941,32 @@ class NodeLoadMetricInformation(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "node_capacity": {"key": "NodeCapacity", "type": "str"}, + "node_load": {"key": "NodeLoad", "type": "str"}, + "node_remaining_capacity": {"key": "NodeRemainingCapacity", "type": "str"}, + "is_capacity_violation": {"key": "IsCapacityViolation", "type": "bool"}, + "node_buffered_capacity": {"key": "NodeBufferedCapacity", "type": "str"}, + "node_remaining_buffered_capacity": {"key": "NodeRemainingBufferedCapacity", "type": "str"}, + "current_node_load": {"key": "CurrentNodeLoad", "type": "str"}, + "node_capacity_remaining": {"key": "NodeCapacityRemaining", "type": "str"}, + "buffered_node_capacity_remaining": {"key": "BufferedNodeCapacityRemaining", "type": "str"}, + "planned_node_load_removal": {"key": "PlannedNodeLoadRemoval", "type": "str"}, } def __init__(self, **kwargs): super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_capacity = kwargs.get('node_capacity', None) - self.node_load = kwargs.get('node_load', None) - self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) - self.is_capacity_violation = kwargs.get('is_capacity_violation', None) - self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) - self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) - self.current_node_load = kwargs.get('current_node_load', None) - self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) - self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) - self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) + self.name = kwargs.get("name", None) + self.node_capacity = kwargs.get("node_capacity", None) + self.node_load = kwargs.get("node_load", None) + self.node_remaining_capacity = kwargs.get("node_remaining_capacity", None) + self.is_capacity_violation = kwargs.get("is_capacity_violation", None) + self.node_buffered_capacity = kwargs.get("node_buffered_capacity", None) + self.node_remaining_buffered_capacity = kwargs.get("node_remaining_buffered_capacity", None) + self.current_node_load = kwargs.get("current_node_load", None) + self.node_capacity_remaining = kwargs.get("node_capacity_remaining", None) + self.buffered_node_capacity_remaining = kwargs.get("buffered_node_capacity_remaining", None) + self.planned_node_load_removal = kwargs.get("planned_node_load_removal", None) class NodeNewHealthReportEvent(NodeEvent): @@ -13729,51 +14010,51 @@ class NodeNewHealthReportEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(NodeNewHealthReportEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'NodeNewHealthReport' + self.node_instance_id = kwargs.get("node_instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "NodeNewHealthReport" class NodeOpenFailedEvent(NodeEvent): @@ -13816,51 +14097,51 @@ class NodeOpenFailedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "node_id": {"required": True}, + "upgrade_domain": {"required": True}, + "fault_domain": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "hostname": {"required": True}, + "is_seed_node": {"required": True}, + "node_version": {"required": True}, + "error": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_id": {"key": "NodeId", "type": "str"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "hostname": {"key": "Hostname", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "node_version": {"key": "NodeVersion", "type": "str"}, + "error": {"key": "Error", "type": "str"}, } def __init__(self, **kwargs): super(NodeOpenFailedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.error = kwargs.get('error', None) - self.kind = 'NodeOpenFailed' + self.node_instance = kwargs.get("node_instance", None) + self.node_id = kwargs.get("node_id", None) + self.upgrade_domain = kwargs.get("upgrade_domain", None) + self.fault_domain = kwargs.get("fault_domain", None) + self.ip_address_or_fqdn = kwargs.get("ip_address_or_fqdn", None) + self.hostname = kwargs.get("hostname", None) + self.is_seed_node = kwargs.get("is_seed_node", None) + self.node_version = kwargs.get("node_version", None) + self.error = kwargs.get("error", None) + self.kind = "NodeOpenFailed" class NodeOpenSucceededEvent(NodeEvent): @@ -13901,48 +14182,48 @@ class NodeOpenSucceededEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "node_id": {"required": True}, + "upgrade_domain": {"required": True}, + "fault_domain": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "hostname": {"required": True}, + "is_seed_node": {"required": True}, + "node_version": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_id": {"key": "NodeId", "type": "str"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "hostname": {"key": "Hostname", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "node_version": {"key": "NodeVersion", "type": "str"}, } def __init__(self, **kwargs): super(NodeOpenSucceededEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.kind = 'NodeOpenSucceeded' + self.node_instance = kwargs.get("node_instance", None) + self.node_id = kwargs.get("node_id", None) + self.upgrade_domain = kwargs.get("upgrade_domain", None) + self.fault_domain = kwargs.get("fault_domain", None) + self.ip_address_or_fqdn = kwargs.get("ip_address_or_fqdn", None) + self.hostname = kwargs.get("hostname", None) + self.is_seed_node = kwargs.get("is_seed_node", None) + self.node_version = kwargs.get("node_version", None) + self.kind = "NodeOpenSucceeded" class NodeRemovedFromClusterEvent(NodeEvent): @@ -13979,42 +14260,42 @@ class NodeRemovedFromClusterEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_id": {"required": True}, + "node_instance": {"required": True}, + "node_type": {"required": True}, + "fabric_version": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "node_capacities": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_id": {"key": "NodeId", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_type": {"key": "NodeType", "type": "str"}, + "fabric_version": {"key": "FabricVersion", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "node_capacities": {"key": "NodeCapacities", "type": "str"}, } def __init__(self, **kwargs): super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.node_type = kwargs.get('node_type', None) - self.fabric_version = kwargs.get('fabric_version', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.node_capacities = kwargs.get('node_capacities', None) - self.kind = 'NodeRemovedFromCluster' + self.node_id = kwargs.get("node_id", None) + self.node_instance = kwargs.get("node_instance", None) + self.node_type = kwargs.get("node_type", None) + self.fabric_version = kwargs.get("fabric_version", None) + self.ip_address_or_fqdn = kwargs.get("ip_address_or_fqdn", None) + self.node_capacities = kwargs.get("node_capacities", None) + self.kind = "NodeRemovedFromCluster" class RepairImpactDescriptionBase(Model): @@ -14032,16 +14313,14 @@ class RepairImpactDescriptionBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } + _subtype_map = {"kind": {"Node": "NodeRepairImpactDescription"}} def __init__(self, **kwargs): super(RepairImpactDescriptionBase, self).__init__(**kwargs) @@ -14063,18 +14342,18 @@ class NodeRepairImpactDescription(RepairImpactDescriptionBase): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + "kind": {"key": "Kind", "type": "str"}, + "node_impact_list": {"key": "NodeImpactList", "type": "[NodeImpact]"}, } def __init__(self, **kwargs): super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.node_impact_list = kwargs.get('node_impact_list', None) - self.kind = 'Node' + self.node_impact_list = kwargs.get("node_impact_list", None) + self.kind = "Node" class RepairTargetDescriptionBase(Model): @@ -14092,16 +14371,14 @@ class RepairTargetDescriptionBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } + _subtype_map = {"kind": {"Node": "NodeRepairTargetDescription"}} def __init__(self, **kwargs): super(RepairTargetDescriptionBase, self).__init__(**kwargs) @@ -14122,18 +14399,18 @@ class NodeRepairTargetDescription(RepairTargetDescriptionBase): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + "kind": {"key": "Kind", "type": "str"}, + "node_names": {"key": "NodeNames", "type": "[str]"}, } def __init__(self, **kwargs): super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.node_names = kwargs.get('node_names', None) - self.kind = 'Node' + self.node_names = kwargs.get("node_names", None) + self.kind = "Node" class NodeResult(Model): @@ -14147,14 +14424,14 @@ class NodeResult(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "str"}, } def __init__(self, **kwargs): super(NodeResult, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) + self.node_name = kwargs.get("node_name", None) + self.node_instance_id = kwargs.get("node_instance_id", None) class NodesHealthEvaluation(HealthEvaluation): @@ -14189,24 +14466,24 @@ class NodesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(NodesHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Nodes' + self.max_percent_unhealthy_nodes = kwargs.get("max_percent_unhealthy_nodes", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Nodes" class NodeTagsDescription(Model): @@ -14222,19 +14499,19 @@ class NodeTagsDescription(Model): """ _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, + "count": {"required": True}, + "tags": {"required": True}, } _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, + "count": {"key": "Count", "type": "int"}, + "tags": {"key": "Tags", "type": "[str]"}, } def __init__(self, **kwargs): super(NodeTagsDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.tags = kwargs.get('tags', None) + self.count = kwargs.get("count", None) + self.tags = kwargs.get("tags", None) class NodeTransitionProgress(Model): @@ -14254,14 +14531,14 @@ class NodeTransitionProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + "state": {"key": "State", "type": "str"}, + "node_transition_result": {"key": "NodeTransitionResult", "type": "NodeTransitionResult"}, } def __init__(self, **kwargs): super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.node_transition_result = kwargs.get('node_transition_result', None) + self.state = kwargs.get("state", None) + self.node_transition_result = kwargs.get("node_transition_result", None) class NodeTransitionResult(Model): @@ -14277,14 +14554,14 @@ class NodeTransitionResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "node_result": {"key": "NodeResult", "type": "NodeResult"}, } def __init__(self, **kwargs): super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.node_result = kwargs.get('node_result', None) + self.error_code = kwargs.get("error_code", None) + self.node_result = kwargs.get("node_result", None) class NodeTypeHealthPolicyMapItem(Model): @@ -14308,19 +14585,19 @@ class NodeTypeHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "int"}, } def __init__(self, **kwargs): super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class NodeTypeNodesHealthEvaluation(HealthEvaluation): @@ -14362,26 +14639,26 @@ class NodeTypeNodesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_type_name": {"key": "NodeTypeName", "type": "str"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) - self.node_type_name = kwargs.get('node_type_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'NodeTypeNodes' + self.node_type_name = kwargs.get("node_type_name", None) + self.max_percent_unhealthy_nodes = kwargs.get("max_percent_unhealthy_nodes", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "NodeTypeNodes" class NodeUpEvent(NodeEvent): @@ -14410,30 +14687,30 @@ class NodeUpEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "last_node_down_at": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "last_node_down_at": {"key": "LastNodeDownAt", "type": "iso-8601"}, } def __init__(self, **kwargs): super(NodeUpEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.last_node_down_at = kwargs.get('last_node_down_at', None) - self.kind = 'NodeUp' + self.node_instance = kwargs.get("node_instance", None) + self.last_node_down_at = kwargs.get("last_node_down_at", None) + self.kind = "NodeUp" class NodeUpgradeProgressInfo(Model): @@ -14454,18 +14731,18 @@ class NodeUpgradeProgressInfo(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + "node_name": {"key": "NodeName", "type": "str"}, + "upgrade_phase": {"key": "UpgradePhase", "type": "str"}, + "pending_safety_checks": {"key": "PendingSafetyChecks", "type": "[SafetyCheckWrapper]"}, + "upgrade_duration": {"key": "UpgradeDuration", "type": "str"}, } def __init__(self, **kwargs): super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.upgrade_phase = kwargs.get('upgrade_phase', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) - self.upgrade_duration = kwargs.get('upgrade_duration', None) + self.node_name = kwargs.get("node_name", None) + self.upgrade_phase = kwargs.get("upgrade_phase", None) + self.pending_safety_checks = kwargs.get("pending_safety_checks", None) + self.upgrade_duration = kwargs.get("upgrade_duration", None) class OperationStatus(Model): @@ -14486,16 +14763,16 @@ class OperationStatus(Model): """ _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, + "operation_id": {"key": "OperationId", "type": "str"}, + "state": {"key": "State", "type": "str"}, + "type": {"key": "Type", "type": "str"}, } def __init__(self, **kwargs): super(OperationStatus, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.state = kwargs.get('state', None) - self.type = kwargs.get('type', None) + self.operation_id = kwargs.get("operation_id", None) + self.state = kwargs.get("state", None) + self.type = kwargs.get("type", None) class PackageSharingPolicyInfo(Model): @@ -14513,14 +14790,14 @@ class PackageSharingPolicyInfo(Model): """ _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + "shared_package_name": {"key": "SharedPackageName", "type": "str"}, + "package_sharing_scope": {"key": "PackageSharingScope", "type": "str"}, } def __init__(self, **kwargs): super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = kwargs.get('shared_package_name', None) - self.package_sharing_scope = kwargs.get('package_sharing_scope', None) + self.shared_package_name = kwargs.get("shared_package_name", None) + self.package_sharing_scope = kwargs.get("package_sharing_scope", None) class PagedApplicationInfoList(Model): @@ -14541,14 +14818,14 @@ class PagedApplicationInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ApplicationInfo]"}, } def __init__(self, **kwargs): super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedApplicationResourceDescriptionList(Model): @@ -14570,14 +14847,14 @@ class PagedApplicationResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ApplicationResourceDescription]"}, } def __init__(self, **kwargs): super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedApplicationTypeInfoList(Model): @@ -14598,14 +14875,14 @@ class PagedApplicationTypeInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ApplicationTypeInfo]"}, } def __init__(self, **kwargs): super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedBackupConfigurationInfoList(Model): @@ -14626,14 +14903,14 @@ class PagedBackupConfigurationInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupConfigurationInfo]"}, } def __init__(self, **kwargs): super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedBackupEntityList(Model): @@ -14654,14 +14931,14 @@ class PagedBackupEntityList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupEntity]"}, } def __init__(self, **kwargs): super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedBackupInfoList(Model): @@ -14681,14 +14958,14 @@ class PagedBackupInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupInfo]"}, } def __init__(self, **kwargs): super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedBackupPolicyDescriptionList(Model): @@ -14709,14 +14986,14 @@ class PagedBackupPolicyDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupPolicyDescription]"}, } def __init__(self, **kwargs): super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedComposeDeploymentStatusInfoList(Model): @@ -14737,14 +15014,14 @@ class PagedComposeDeploymentStatusInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ComposeDeploymentStatusInfo]"}, } def __init__(self, **kwargs): super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedDeployedApplicationInfoList(Model): @@ -14766,14 +15043,14 @@ class PagedDeployedApplicationInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[DeployedApplicationInfo]"}, } def __init__(self, **kwargs): super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedGatewayResourceDescriptionList(Model): @@ -14793,14 +15070,14 @@ class PagedGatewayResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[GatewayResourceDescription]"}, } def __init__(self, **kwargs): super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedNetworkResourceDescriptionList(Model): @@ -14820,14 +15097,14 @@ class PagedNetworkResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[NetworkResourceDescription]"}, } def __init__(self, **kwargs): super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedNodeInfoList(Model): @@ -14847,14 +15124,14 @@ class PagedNodeInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[NodeInfo]"}, } def __init__(self, **kwargs): super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedPropertyInfoList(Model): @@ -14879,16 +15156,16 @@ class PagedPropertyInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "is_consistent": {"key": "IsConsistent", "type": "bool"}, + "properties": {"key": "Properties", "type": "[PropertyInfo]"}, } def __init__(self, **kwargs): super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.properties = kwargs.get('properties', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.is_consistent = kwargs.get("is_consistent", None) + self.properties = kwargs.get("properties", None) class PagedReplicaInfoList(Model): @@ -14909,14 +15186,14 @@ class PagedReplicaInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ReplicaInfo]"}, } def __init__(self, **kwargs): super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedSecretResourceDescriptionList(Model): @@ -14936,14 +15213,14 @@ class PagedSecretResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[SecretResourceDescription]"}, } def __init__(self, **kwargs): super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedSecretValueResourceDescriptionList(Model): @@ -14965,14 +15242,14 @@ class PagedSecretValueResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[SecretValueResourceDescription]"}, } def __init__(self, **kwargs): super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedServiceInfoList(Model): @@ -14993,14 +15270,14 @@ class PagedServiceInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServiceInfo]"}, } def __init__(self, **kwargs): super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedServicePartitionInfoList(Model): @@ -15021,14 +15298,14 @@ class PagedServicePartitionInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServicePartitionInfo]"}, } def __init__(self, **kwargs): super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedServiceReplicaDescriptionList(Model): @@ -15049,14 +15326,14 @@ class PagedServiceReplicaDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServiceReplicaDescription]"}, } def __init__(self, **kwargs): super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedServiceResourceDescriptionList(Model): @@ -15076,14 +15353,14 @@ class PagedServiceResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServiceResourceDescription]"}, } def __init__(self, **kwargs): super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedSubNameInfoList(Model): @@ -15108,16 +15385,16 @@ class PagedSubNameInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "is_consistent": {"key": "IsConsistent", "type": "bool"}, + "sub_names": {"key": "SubNames", "type": "[str]"}, } def __init__(self, **kwargs): super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.sub_names = kwargs.get('sub_names', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.is_consistent = kwargs.get("is_consistent", None) + self.sub_names = kwargs.get("sub_names", None) class PagedUpdatePartitionLoadResultList(Model): @@ -15138,14 +15415,14 @@ class PagedUpdatePartitionLoadResultList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[UpdatePartitionLoadResult]"}, } def __init__(self, **kwargs): super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PagedVolumeResourceDescriptionList(Model): @@ -15165,14 +15442,14 @@ class PagedVolumeResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[VolumeResourceDescription]"}, } def __init__(self, **kwargs): super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) + self.continuation_token = kwargs.get("continuation_token", None) + self.items = kwargs.get("items", None) class PartitionAnalysisEvent(PartitionEvent): @@ -15206,31 +15483,29 @@ class PartitionAnalysisEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "metadata": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "metadata": {"key": "Metadata", "type": "AnalysisEventMetadata"}, } - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } + _subtype_map = {"kind": {"PartitionPrimaryMoveAnalysis": "PartitionPrimaryMoveAnalysisEvent"}} def __init__(self, **kwargs): super(PartitionAnalysisEvent, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.kind = 'PartitionAnalysisEvent' + self.metadata = kwargs.get("metadata", None) + self.kind = "PartitionAnalysisEvent" class PartitionBackupConfigurationInfo(BackupConfigurationInfo): @@ -15259,23 +15534,23 @@ class PartitionBackupConfigurationInfo(BackupConfigurationInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'Partition' + self.service_name = kwargs.get("service_name", None) + self.partition_id = kwargs.get("partition_id", None) + self.kind = "Partition" class PartitionBackupEntity(BackupEntity): @@ -15293,20 +15568,20 @@ class PartitionBackupEntity(BackupEntity): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(PartitionBackupEntity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.entity_kind = 'Partition' + self.service_name = kwargs.get("service_name", None) + self.partition_id = kwargs.get("partition_id", None) + self.entity_kind = "Partition" class PartitionDataLossProgress(Model): @@ -15323,14 +15598,14 @@ class PartitionDataLossProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + "state": {"key": "State", "type": "str"}, + "invoke_data_loss_result": {"key": "InvokeDataLossResult", "type": "InvokeDataLossResult"}, } def __init__(self, **kwargs): super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) + self.state = kwargs.get("state", None) + self.invoke_data_loss_result = kwargs.get("invoke_data_loss_result", None) class PartitionHealth(EntityHealth): @@ -15363,18 +15638,18 @@ class PartitionHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_health_states": {"key": "ReplicaHealthStates", "type": "[ReplicaHealthState]"}, } def __init__(self, **kwargs): super(PartitionHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_states = kwargs.get('replica_health_states', None) + self.partition_id = kwargs.get("partition_id", None) + self.replica_health_states = kwargs.get("replica_health_states", None) class PartitionHealthEvaluation(HealthEvaluation): @@ -15408,22 +15683,22 @@ class PartitionHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(PartitionHealthEvaluation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Partition' + self.partition_id = kwargs.get("partition_id", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Partition" class PartitionHealthReportExpiredEvent(PartitionEvent): @@ -15469,48 +15744,48 @@ class PartitionHealthReportExpiredEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'PartitionHealthReportExpired' + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "PartitionHealthReportExpired" class PartitionHealthState(EntityHealthState): @@ -15529,13 +15804,13 @@ class PartitionHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(PartitionHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) + self.partition_id = kwargs.get("partition_id", None) class PartitionHealthStateChunk(EntityHealthStateChunk): @@ -15557,15 +15832,15 @@ class PartitionHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_health_state_chunks": {"key": "ReplicaHealthStateChunks", "type": "ReplicaHealthStateChunkList"}, } def __init__(self, **kwargs): super(PartitionHealthStateChunk, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) + self.partition_id = kwargs.get("partition_id", None) + self.replica_health_state_chunks = kwargs.get("replica_health_state_chunks", None) class PartitionHealthStateChunkList(Model): @@ -15580,12 +15855,12 @@ class PartitionHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + "items": {"key": "Items", "type": "[PartitionHealthStateChunk]"}, } def __init__(self, **kwargs): super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class PartitionHealthStateFilter(Model): @@ -15648,16 +15923,16 @@ class PartitionHealthStateFilter(Model): """ _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + "partition_id_filter": {"key": "PartitionIdFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "replica_filters": {"key": "ReplicaFilters", "type": "[ReplicaHealthStateFilter]"}, } def __init__(self, **kwargs): super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = kwargs.get('partition_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.replica_filters = kwargs.get('replica_filters', None) + self.partition_id_filter = kwargs.get("partition_id_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) + self.replica_filters = kwargs.get("replica_filters", None) class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): @@ -15680,25 +15955,25 @@ class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): """ _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, + "kind": {"required": True}, + "min_instance_count": {"required": True}, + "max_instance_count": {"required": True}, + "scale_increment": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + "kind": {"key": "Kind", "type": "str"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "max_instance_count": {"key": "MaxInstanceCount", "type": "int"}, + "scale_increment": {"key": "ScaleIncrement", "type": "int"}, } def __init__(self, **kwargs): super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.max_instance_count = kwargs.get('max_instance_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'PartitionInstanceCount' + self.min_instance_count = kwargs.get("min_instance_count", None) + self.max_instance_count = kwargs.get("max_instance_count", None) + self.scale_increment = kwargs.get("scale_increment", None) + self.kind = "PartitionInstanceCount" class PartitionLoadInformation(Model): @@ -15727,18 +16002,18 @@ class PartitionLoadInformation(Model): """ _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "primary_load_metric_reports": {"key": "PrimaryLoadMetricReports", "type": "[LoadMetricReport]"}, + "secondary_load_metric_reports": {"key": "SecondaryLoadMetricReports", "type": "[LoadMetricReport]"}, + "auxiliary_load_metric_reports": {"key": "AuxiliaryLoadMetricReports", "type": "[LoadMetricReport]"}, } def __init__(self, **kwargs): super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) - self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) - self.auxiliary_load_metric_reports = kwargs.get('auxiliary_load_metric_reports', None) + self.partition_id = kwargs.get("partition_id", None) + self.primary_load_metric_reports = kwargs.get("primary_load_metric_reports", None) + self.secondary_load_metric_reports = kwargs.get("secondary_load_metric_reports", None) + self.auxiliary_load_metric_reports = kwargs.get("auxiliary_load_metric_reports", None) class PartitionMetricLoadDescription(Model): @@ -15773,22 +16048,35 @@ class PartitionMetricLoadDescription(Model): """ _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, - 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "primary_replica_load_entries": {"key": "PrimaryReplicaLoadEntries", "type": "[MetricLoadDescription]"}, + "secondary_replicas_or_instances_load_entries": { + "key": "SecondaryReplicasOrInstancesLoadEntries", + "type": "[MetricLoadDescription]", + }, + "secondary_replica_or_instance_load_entries_per_node": { + "key": "SecondaryReplicaOrInstanceLoadEntriesPerNode", + "type": "[ReplicaMetricLoadDescription]", + }, + "auxiliary_replicas_load_entries": {"key": "AuxiliaryReplicasLoadEntries", "type": "[MetricLoadDescription]"}, + "auxiliary_replica_load_entries_per_node": { + "key": "AuxiliaryReplicaLoadEntriesPerNode", + "type": "[ReplicaMetricLoadDescription]", + }, } def __init__(self, **kwargs): super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) - self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) - self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) - self.auxiliary_replicas_load_entries = kwargs.get('auxiliary_replicas_load_entries', None) - self.auxiliary_replica_load_entries_per_node = kwargs.get('auxiliary_replica_load_entries_per_node', None) + self.partition_id = kwargs.get("partition_id", None) + self.primary_replica_load_entries = kwargs.get("primary_replica_load_entries", None) + self.secondary_replicas_or_instances_load_entries = kwargs.get( + "secondary_replicas_or_instances_load_entries", None + ) + self.secondary_replica_or_instance_load_entries_per_node = kwargs.get( + "secondary_replica_or_instance_load_entries_per_node", None + ) + self.auxiliary_replicas_load_entries = kwargs.get("auxiliary_replicas_load_entries", None) + self.auxiliary_replica_load_entries_per_node = kwargs.get("auxiliary_replica_load_entries_per_node", None) class PartitionNewHealthReportEvent(PartitionEvent): @@ -15834,48 +16122,48 @@ class PartitionNewHealthReportEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(PartitionNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'PartitionNewHealthReport' + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "PartitionNewHealthReport" class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): @@ -15916,41 +16204,41 @@ class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "metadata": {"required": True}, + "when_move_completed": {"required": True}, + "previous_node": {"required": True}, + "current_node": {"required": True}, + "move_reason": {"required": True}, + "relevant_traces": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "metadata": {"key": "Metadata", "type": "AnalysisEventMetadata"}, + "when_move_completed": {"key": "WhenMoveCompleted", "type": "iso-8601"}, + "previous_node": {"key": "PreviousNode", "type": "str"}, + "current_node": {"key": "CurrentNode", "type": "str"}, + "move_reason": {"key": "MoveReason", "type": "str"}, + "relevant_traces": {"key": "RelevantTraces", "type": "str"}, } def __init__(self, **kwargs): super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) - self.when_move_completed = kwargs.get('when_move_completed', None) - self.previous_node = kwargs.get('previous_node', None) - self.current_node = kwargs.get('current_node', None) - self.move_reason = kwargs.get('move_reason', None) - self.relevant_traces = kwargs.get('relevant_traces', None) - self.kind = 'PartitionPrimaryMoveAnalysis' + self.when_move_completed = kwargs.get("when_move_completed", None) + self.previous_node = kwargs.get("previous_node", None) + self.current_node = kwargs.get("current_node", None) + self.move_reason = kwargs.get("move_reason", None) + self.relevant_traces = kwargs.get("relevant_traces", None) + self.kind = "PartitionPrimaryMoveAnalysis" class PartitionQuorumLossProgress(Model): @@ -15967,14 +16255,14 @@ class PartitionQuorumLossProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + "state": {"key": "State", "type": "str"}, + "invoke_quorum_loss_result": {"key": "InvokeQuorumLossResult", "type": "InvokeQuorumLossResult"}, } def __init__(self, **kwargs): super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) + self.state = kwargs.get("state", None) + self.invoke_quorum_loss_result = kwargs.get("invoke_quorum_loss_result", None) class PartitionReconfiguredEvent(PartitionEvent): @@ -16029,63 +16317,63 @@ class PartitionReconfiguredEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "service_type": {"required": True}, + "cc_epoch_data_loss_version": {"required": True}, + "cc_epoch_config_version": {"required": True}, + "reconfig_type": {"required": True}, + "result": {"required": True}, + "phase0_duration_ms": {"required": True}, + "phase1_duration_ms": {"required": True}, + "phase2_duration_ms": {"required": True}, + "phase3_duration_ms": {"required": True}, + "phase4_duration_ms": {"required": True}, + "total_duration_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "str"}, + "service_type": {"key": "ServiceType", "type": "str"}, + "cc_epoch_data_loss_version": {"key": "CcEpochDataLossVersion", "type": "long"}, + "cc_epoch_config_version": {"key": "CcEpochConfigVersion", "type": "long"}, + "reconfig_type": {"key": "ReconfigType", "type": "str"}, + "result": {"key": "Result", "type": "str"}, + "phase0_duration_ms": {"key": "Phase0DurationMs", "type": "float"}, + "phase1_duration_ms": {"key": "Phase1DurationMs", "type": "float"}, + "phase2_duration_ms": {"key": "Phase2DurationMs", "type": "float"}, + "phase3_duration_ms": {"key": "Phase3DurationMs", "type": "float"}, + "phase4_duration_ms": {"key": "Phase4DurationMs", "type": "float"}, + "total_duration_ms": {"key": "TotalDurationMs", "type": "float"}, } def __init__(self, **kwargs): super(PartitionReconfiguredEvent, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.service_type = kwargs.get('service_type', None) - self.cc_epoch_data_loss_version = kwargs.get('cc_epoch_data_loss_version', None) - self.cc_epoch_config_version = kwargs.get('cc_epoch_config_version', None) - self.reconfig_type = kwargs.get('reconfig_type', None) - self.result = kwargs.get('result', None) - self.phase0_duration_ms = kwargs.get('phase0_duration_ms', None) - self.phase1_duration_ms = kwargs.get('phase1_duration_ms', None) - self.phase2_duration_ms = kwargs.get('phase2_duration_ms', None) - self.phase3_duration_ms = kwargs.get('phase3_duration_ms', None) - self.phase4_duration_ms = kwargs.get('phase4_duration_ms', None) - self.total_duration_ms = kwargs.get('total_duration_ms', None) - self.kind = 'PartitionReconfigured' + self.node_name = kwargs.get("node_name", None) + self.node_instance_id = kwargs.get("node_instance_id", None) + self.service_type = kwargs.get("service_type", None) + self.cc_epoch_data_loss_version = kwargs.get("cc_epoch_data_loss_version", None) + self.cc_epoch_config_version = kwargs.get("cc_epoch_config_version", None) + self.reconfig_type = kwargs.get("reconfig_type", None) + self.result = kwargs.get("result", None) + self.phase0_duration_ms = kwargs.get("phase0_duration_ms", None) + self.phase1_duration_ms = kwargs.get("phase1_duration_ms", None) + self.phase2_duration_ms = kwargs.get("phase2_duration_ms", None) + self.phase3_duration_ms = kwargs.get("phase3_duration_ms", None) + self.phase4_duration_ms = kwargs.get("phase4_duration_ms", None) + self.total_duration_ms = kwargs.get("total_duration_ms", None) + self.kind = "PartitionReconfigured" class PartitionRestartProgress(Model): @@ -16102,14 +16390,14 @@ class PartitionRestartProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + "state": {"key": "State", "type": "str"}, + "restart_partition_result": {"key": "RestartPartitionResult", "type": "RestartPartitionResult"}, } def __init__(self, **kwargs): super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.restart_partition_result = kwargs.get('restart_partition_result', None) + self.state = kwargs.get("state", None) + self.restart_partition_result = kwargs.get("restart_partition_result", None) class PartitionsHealthEvaluation(HealthEvaluation): @@ -16146,24 +16434,29 @@ class PartitionsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_partitions_per_service": { + "key": "MaxPercentUnhealthyPartitionsPerService", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(PartitionsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Partitions' + self.max_percent_unhealthy_partitions_per_service = kwargs.get( + "max_percent_unhealthy_partitions_per_service", None + ) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Partitions" class ReplicatorStatus(Model): @@ -16182,15 +16475,15 @@ class ReplicatorStatus(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + "kind": {"Primary": "PrimaryReplicatorStatus", "SecondaryReplicatorStatus": "SecondaryReplicatorStatus"} } def __init__(self, **kwargs): @@ -16217,20 +16510,20 @@ class PrimaryReplicatorStatus(ReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "remote_replicators": {"key": "RemoteReplicators", "type": "[RemoteReplicatorStatus]"}, } def __init__(self, **kwargs): super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.remote_replicators = kwargs.get('remote_replicators', None) - self.kind = 'Primary' + self.replication_queue_status = kwargs.get("replication_queue_status", None) + self.remote_replicators = kwargs.get("remote_replicators", None) + self.kind = "Primary" class Probe(Model): @@ -16260,26 +16553,26 @@ class Probe(Model): """ _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + "initial_delay_seconds": {"key": "initialDelaySeconds", "type": "int"}, + "period_seconds": {"key": "periodSeconds", "type": "int"}, + "timeout_seconds": {"key": "timeoutSeconds", "type": "int"}, + "success_threshold": {"key": "successThreshold", "type": "int"}, + "failure_threshold": {"key": "failureThreshold", "type": "int"}, + "exec_property": {"key": "exec", "type": "ProbeExec"}, + "http_get": {"key": "httpGet", "type": "ProbeHttpGet"}, + "tcp_socket": {"key": "tcpSocket", "type": "ProbeTcpSocket"}, } def __init__(self, **kwargs): super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) - self.period_seconds = kwargs.get('period_seconds', 10) - self.timeout_seconds = kwargs.get('timeout_seconds', 1) - self.success_threshold = kwargs.get('success_threshold', 1) - self.failure_threshold = kwargs.get('failure_threshold', 3) - self.exec_property = kwargs.get('exec_property', None) - self.http_get = kwargs.get('http_get', None) - self.tcp_socket = kwargs.get('tcp_socket', None) + self.initial_delay_seconds = kwargs.get("initial_delay_seconds", 0) + self.period_seconds = kwargs.get("period_seconds", 10) + self.timeout_seconds = kwargs.get("timeout_seconds", 1) + self.success_threshold = kwargs.get("success_threshold", 1) + self.failure_threshold = kwargs.get("failure_threshold", 3) + self.exec_property = kwargs.get("exec_property", None) + self.http_get = kwargs.get("http_get", None) + self.tcp_socket = kwargs.get("tcp_socket", None) class ProbeExec(Model): @@ -16293,16 +16586,16 @@ class ProbeExec(Model): """ _validation = { - 'command': {'required': True}, + "command": {"required": True}, } _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, + "command": {"key": "command", "type": "str"}, } def __init__(self, **kwargs): super(ProbeExec, self).__init__(**kwargs) - self.command = kwargs.get('command', None) + self.command = kwargs.get("command", None) class ProbeHttpGet(Model): @@ -16324,24 +16617,24 @@ class ProbeHttpGet(Model): """ _validation = { - 'port': {'required': True}, + "port": {"required": True}, } _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, + "port": {"key": "port", "type": "int"}, + "path": {"key": "path", "type": "str"}, + "host": {"key": "host", "type": "str"}, + "http_headers": {"key": "httpHeaders", "type": "[ProbeHttpGetHeaders]"}, + "scheme": {"key": "scheme", "type": "str"}, } def __init__(self, **kwargs): super(ProbeHttpGet, self).__init__(**kwargs) - self.port = kwargs.get('port', None) - self.path = kwargs.get('path', None) - self.host = kwargs.get('host', None) - self.http_headers = kwargs.get('http_headers', None) - self.scheme = kwargs.get('scheme', None) + self.port = kwargs.get("port", None) + self.path = kwargs.get("path", None) + self.host = kwargs.get("host", None) + self.http_headers = kwargs.get("http_headers", None) + self.scheme = kwargs.get("scheme", None) class ProbeHttpGetHeaders(Model): @@ -16356,19 +16649,19 @@ class ProbeHttpGetHeaders(Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__(self, **kwargs): super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) class ProbeTcpSocket(Model): @@ -16381,16 +16674,16 @@ class ProbeTcpSocket(Model): """ _validation = { - 'port': {'required': True}, + "port": {"required": True}, } _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, + "port": {"key": "port", "type": "int"}, } def __init__(self, **kwargs): super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = kwargs.get('port', None) + self.port = kwargs.get("port", None) class PropertyBatchDescriptionList(Model): @@ -16402,12 +16695,12 @@ class PropertyBatchDescriptionList(Model): """ _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + "operations": {"key": "Operations", "type": "[PropertyBatchOperation]"}, } def __init__(self, **kwargs): super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = kwargs.get('operations', None) + self.operations = kwargs.get("operations", None) class PropertyDescription(Model): @@ -16425,21 +16718,21 @@ class PropertyDescription(Model): """ _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, + "property_name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "custom_type_id": {"key": "CustomTypeId", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, } def __init__(self, **kwargs): super(PropertyDescription, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.value = kwargs.get('value', None) + self.property_name = kwargs.get("property_name", None) + self.custom_type_id = kwargs.get("custom_type_id", None) + self.value = kwargs.get("value", None) class PropertyInfo(Model): @@ -16457,21 +16750,21 @@ class PropertyInfo(Model): """ _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, + "name": {"required": True}, + "metadata": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + "name": {"key": "Name", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, + "metadata": {"key": "Metadata", "type": "PropertyMetadata"}, } def __init__(self, **kwargs): super(PropertyInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.metadata = kwargs.get('metadata', None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) + self.metadata = kwargs.get("metadata", None) class PropertyMetadata(Model): @@ -16498,22 +16791,22 @@ class PropertyMetadata(Model): """ _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + "type_id": {"key": "TypeId", "type": "str"}, + "custom_type_id": {"key": "CustomTypeId", "type": "str"}, + "parent": {"key": "Parent", "type": "str"}, + "size_in_bytes": {"key": "SizeInBytes", "type": "int"}, + "last_modified_utc_timestamp": {"key": "LastModifiedUtcTimestamp", "type": "iso-8601"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, } def __init__(self, **kwargs): super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = kwargs.get('type_id', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.parent = kwargs.get('parent', None) - self.size_in_bytes = kwargs.get('size_in_bytes', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.sequence_number = kwargs.get('sequence_number', None) + self.type_id = kwargs.get("type_id", None) + self.custom_type_id = kwargs.get("custom_type_id", None) + self.parent = kwargs.get("parent", None) + self.size_in_bytes = kwargs.get("size_in_bytes", None) + self.last_modified_utc_timestamp = kwargs.get("last_modified_utc_timestamp", None) + self.sequence_number = kwargs.get("sequence_number", None) class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): @@ -16543,23 +16836,23 @@ class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBas """ _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_type_build_path': {'required': True}, + "async_property": {"required": True}, + "kind": {"required": True}, + "application_type_build_path": {"required": True}, } _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + "async_property": {"key": "Async", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_type_build_path": {"key": "ApplicationTypeBuildPath", "type": "str"}, + "application_package_cleanup_policy": {"key": "ApplicationPackageCleanupPolicy", "type": "str"}, } def __init__(self, **kwargs): super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.application_type_build_path = kwargs.get('application_type_build_path', None) - self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) - self.kind = 'ImageStorePath' + self.application_type_build_path = kwargs.get("application_type_build_path", None) + self.application_package_cleanup_policy = kwargs.get("application_package_cleanup_policy", None) + self.kind = "ImageStorePath" class ProvisionFabricDescription(Model): @@ -16572,14 +16865,14 @@ class ProvisionFabricDescription(Model): """ _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + "code_file_path": {"key": "CodeFilePath", "type": "str"}, + "cluster_manifest_file_path": {"key": "ClusterManifestFilePath", "type": "str"}, } def __init__(self, **kwargs): super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = kwargs.get('code_file_path', None) - self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) + self.code_file_path = kwargs.get("code_file_path", None) + self.cluster_manifest_file_path = kwargs.get("cluster_manifest_file_path", None) class PutPropertyBatchOperation(PropertyBatchOperation): @@ -16601,23 +16894,23 @@ class PutPropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, + "custom_type_id": {"key": "CustomTypeId", "type": "str"}, } def __init__(self, **kwargs): super(PutPropertyBatchOperation, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.kind = 'Put' + self.value = kwargs.get("value", None) + self.custom_type_id = kwargs.get("custom_type_id", None) + self.kind = "Put" class ReconfigurationInformation(Model): @@ -16648,18 +16941,18 @@ class ReconfigurationInformation(Model): """ _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + "previous_configuration_role": {"key": "PreviousConfigurationRole", "type": "str"}, + "reconfiguration_phase": {"key": "ReconfigurationPhase", "type": "str"}, + "reconfiguration_type": {"key": "ReconfigurationType", "type": "str"}, + "reconfiguration_start_time_utc": {"key": "ReconfigurationStartTimeUtc", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = kwargs.get('previous_configuration_role', None) - self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) - self.reconfiguration_type = kwargs.get('reconfiguration_type', None) - self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) + self.previous_configuration_role = kwargs.get("previous_configuration_role", None) + self.reconfiguration_phase = kwargs.get("reconfiguration_phase", None) + self.reconfiguration_type = kwargs.get("reconfiguration_type", None) + self.reconfiguration_start_time_utc = kwargs.get("reconfiguration_start_time_utc", None) class RegistryCredential(Model): @@ -16676,16 +16969,16 @@ class RegistryCredential(Model): """ _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + "registry_user_name": {"key": "RegistryUserName", "type": "str"}, + "registry_password": {"key": "RegistryPassword", "type": "str"}, + "password_encrypted": {"key": "PasswordEncrypted", "type": "bool"}, } def __init__(self, **kwargs): super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = kwargs.get('registry_user_name', None) - self.registry_password = kwargs.get('registry_password', None) - self.password_encrypted = kwargs.get('password_encrypted', None) + self.registry_user_name = kwargs.get("registry_user_name", None) + self.registry_password = kwargs.get("registry_password", None) + self.password_encrypted = kwargs.get("password_encrypted", None) class ReliableCollectionsRef(Model): @@ -16704,18 +16997,18 @@ class ReliableCollectionsRef(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "do_not_persist_state": {"key": "doNotPersistState", "type": "bool"}, } def __init__(self, **kwargs): super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.do_not_persist_state = kwargs.get('do_not_persist_state', None) + self.name = kwargs.get("name", None) + self.do_not_persist_state = kwargs.get("do_not_persist_state", None) class RemoteReplicatorAcknowledgementDetail(Model): @@ -16738,18 +17031,18 @@ class RemoteReplicatorAcknowledgementDetail(Model): """ _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + "average_receive_duration": {"key": "AverageReceiveDuration", "type": "str"}, + "average_apply_duration": {"key": "AverageApplyDuration", "type": "str"}, + "not_received_count": {"key": "NotReceivedCount", "type": "str"}, + "received_and_not_applied_count": {"key": "ReceivedAndNotAppliedCount", "type": "str"}, } def __init__(self, **kwargs): super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = kwargs.get('average_receive_duration', None) - self.average_apply_duration = kwargs.get('average_apply_duration', None) - self.not_received_count = kwargs.get('not_received_count', None) - self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) + self.average_receive_duration = kwargs.get("average_receive_duration", None) + self.average_apply_duration = kwargs.get("average_apply_duration", None) + self.not_received_count = kwargs.get("not_received_count", None) + self.received_and_not_applied_count = kwargs.get("received_and_not_applied_count", None) class RemoteReplicatorAcknowledgementStatus(Model): @@ -16768,14 +17061,20 @@ class RemoteReplicatorAcknowledgementStatus(Model): """ _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + "replication_stream_acknowledgement_detail": { + "key": "ReplicationStreamAcknowledgementDetail", + "type": "RemoteReplicatorAcknowledgementDetail", + }, + "copy_stream_acknowledgement_detail": { + "key": "CopyStreamAcknowledgementDetail", + "type": "RemoteReplicatorAcknowledgementDetail", + }, } def __init__(self, **kwargs): super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) - self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) + self.replication_stream_acknowledgement_detail = kwargs.get("replication_stream_acknowledgement_detail", None) + self.copy_stream_acknowledgement_detail = kwargs.get("copy_stream_acknowledgement_detail", None) class RemoteReplicatorStatus(Model): @@ -16817,26 +17116,29 @@ class RemoteReplicatorStatus(Model): """ _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + "replica_id": {"key": "ReplicaId", "type": "str"}, + "last_acknowledgement_processed_time_utc": {"key": "LastAcknowledgementProcessedTimeUtc", "type": "iso-8601"}, + "last_received_replication_sequence_number": {"key": "LastReceivedReplicationSequenceNumber", "type": "str"}, + "last_applied_replication_sequence_number": {"key": "LastAppliedReplicationSequenceNumber", "type": "str"}, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "last_received_copy_sequence_number": {"key": "LastReceivedCopySequenceNumber", "type": "str"}, + "last_applied_copy_sequence_number": {"key": "LastAppliedCopySequenceNumber", "type": "str"}, + "remote_replicator_acknowledgement_status": { + "key": "RemoteReplicatorAcknowledgementStatus", + "type": "RemoteReplicatorAcknowledgementStatus", + }, } def __init__(self, **kwargs): super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) - self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) - self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) - self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) - self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) + self.replica_id = kwargs.get("replica_id", None) + self.last_acknowledgement_processed_time_utc = kwargs.get("last_acknowledgement_processed_time_utc", None) + self.last_received_replication_sequence_number = kwargs.get("last_received_replication_sequence_number", None) + self.last_applied_replication_sequence_number = kwargs.get("last_applied_replication_sequence_number", None) + self.is_in_build = kwargs.get("is_in_build", None) + self.last_received_copy_sequence_number = kwargs.get("last_received_copy_sequence_number", None) + self.last_applied_copy_sequence_number = kwargs.get("last_applied_copy_sequence_number", None) + self.remote_replicator_acknowledgement_status = kwargs.get("remote_replicator_acknowledgement_status", None) class RepairTask(Model): @@ -16932,52 +17234,52 @@ class RepairTask(Model): """ _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, + "task_id": {"required": True}, + "state": {"required": True}, + "action": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "state": {"key": "State", "type": "str"}, + "flags": {"key": "Flags", "type": "int"}, + "action": {"key": "Action", "type": "str"}, + "target": {"key": "Target", "type": "RepairTargetDescriptionBase"}, + "executor": {"key": "Executor", "type": "str"}, + "executor_data": {"key": "ExecutorData", "type": "str"}, + "impact": {"key": "Impact", "type": "RepairImpactDescriptionBase"}, + "result_status": {"key": "ResultStatus", "type": "str"}, + "result_code": {"key": "ResultCode", "type": "int"}, + "result_details": {"key": "ResultDetails", "type": "str"}, + "history": {"key": "History", "type": "RepairTaskHistory"}, + "preparing_health_check_state": {"key": "PreparingHealthCheckState", "type": "str"}, + "restoring_health_check_state": {"key": "RestoringHealthCheckState", "type": "str"}, + "perform_preparing_health_check": {"key": "PerformPreparingHealthCheck", "type": "bool"}, + "perform_restoring_health_check": {"key": "PerformRestoringHealthCheck", "type": "bool"}, } def __init__(self, **kwargs): super(RepairTask, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.description = kwargs.get('description', None) - self.state = kwargs.get('state', None) - self.flags = kwargs.get('flags', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) - self.executor = kwargs.get('executor', None) - self.executor_data = kwargs.get('executor_data', None) - self.impact = kwargs.get('impact', None) - self.result_status = kwargs.get('result_status', None) - self.result_code = kwargs.get('result_code', None) - self.result_details = kwargs.get('result_details', None) - self.history = kwargs.get('history', None) - self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) - self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) + self.task_id = kwargs.get("task_id", None) + self.version = kwargs.get("version", None) + self.description = kwargs.get("description", None) + self.state = kwargs.get("state", None) + self.flags = kwargs.get("flags", None) + self.action = kwargs.get("action", None) + self.target = kwargs.get("target", None) + self.executor = kwargs.get("executor", None) + self.executor_data = kwargs.get("executor_data", None) + self.impact = kwargs.get("impact", None) + self.result_status = kwargs.get("result_status", None) + self.result_code = kwargs.get("result_code", None) + self.result_details = kwargs.get("result_details", None) + self.history = kwargs.get("history", None) + self.preparing_health_check_state = kwargs.get("preparing_health_check_state", None) + self.restoring_health_check_state = kwargs.get("restoring_health_check_state", None) + self.perform_preparing_health_check = kwargs.get("perform_preparing_health_check", None) + self.perform_restoring_health_check = kwargs.get("perform_restoring_health_check", None) class RepairTaskApproveDescription(Model): @@ -16997,18 +17299,18 @@ class RepairTaskApproveDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, **kwargs): super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) + self.task_id = kwargs.get("task_id", None) + self.version = kwargs.get("version", None) class RepairTaskCancelDescription(Model): @@ -17032,20 +17334,20 @@ class RepairTaskCancelDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "request_abort": {"key": "RequestAbort", "type": "bool"}, } def __init__(self, **kwargs): super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.request_abort = kwargs.get('request_abort', None) + self.task_id = kwargs.get("task_id", None) + self.version = kwargs.get("version", None) + self.request_abort = kwargs.get("request_abort", None) class RepairTaskDeleteDescription(Model): @@ -17066,18 +17368,18 @@ class RepairTaskDeleteDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, **kwargs): super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) + self.task_id = kwargs.get("task_id", None) + self.version = kwargs.get("version", None) class RepairTaskHistory(Model): @@ -17121,32 +17423,38 @@ class RepairTaskHistory(Model): """ _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + "created_utc_timestamp": {"key": "CreatedUtcTimestamp", "type": "iso-8601"}, + "claimed_utc_timestamp": {"key": "ClaimedUtcTimestamp", "type": "iso-8601"}, + "preparing_utc_timestamp": {"key": "PreparingUtcTimestamp", "type": "iso-8601"}, + "approved_utc_timestamp": {"key": "ApprovedUtcTimestamp", "type": "iso-8601"}, + "executing_utc_timestamp": {"key": "ExecutingUtcTimestamp", "type": "iso-8601"}, + "restoring_utc_timestamp": {"key": "RestoringUtcTimestamp", "type": "iso-8601"}, + "completed_utc_timestamp": {"key": "CompletedUtcTimestamp", "type": "iso-8601"}, + "preparing_health_check_start_utc_timestamp": { + "key": "PreparingHealthCheckStartUtcTimestamp", + "type": "iso-8601", + }, + "preparing_health_check_end_utc_timestamp": {"key": "PreparingHealthCheckEndUtcTimestamp", "type": "iso-8601"}, + "restoring_health_check_start_utc_timestamp": { + "key": "RestoringHealthCheckStartUtcTimestamp", + "type": "iso-8601", + }, + "restoring_health_check_end_utc_timestamp": {"key": "RestoringHealthCheckEndUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) - self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) - self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) - self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) - self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) - self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) - self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) - self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) - self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) - self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) - self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) + self.created_utc_timestamp = kwargs.get("created_utc_timestamp", None) + self.claimed_utc_timestamp = kwargs.get("claimed_utc_timestamp", None) + self.preparing_utc_timestamp = kwargs.get("preparing_utc_timestamp", None) + self.approved_utc_timestamp = kwargs.get("approved_utc_timestamp", None) + self.executing_utc_timestamp = kwargs.get("executing_utc_timestamp", None) + self.restoring_utc_timestamp = kwargs.get("restoring_utc_timestamp", None) + self.completed_utc_timestamp = kwargs.get("completed_utc_timestamp", None) + self.preparing_health_check_start_utc_timestamp = kwargs.get("preparing_health_check_start_utc_timestamp", None) + self.preparing_health_check_end_utc_timestamp = kwargs.get("preparing_health_check_end_utc_timestamp", None) + self.restoring_health_check_start_utc_timestamp = kwargs.get("restoring_health_check_start_utc_timestamp", None) + self.restoring_health_check_end_utc_timestamp = kwargs.get("restoring_health_check_end_utc_timestamp", None) class RepairTaskUpdateHealthPolicyDescription(Model): @@ -17176,22 +17484,22 @@ class RepairTaskUpdateHealthPolicyDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "perform_preparing_health_check": {"key": "PerformPreparingHealthCheck", "type": "bool"}, + "perform_restoring_health_check": {"key": "PerformRestoringHealthCheck", "type": "bool"}, } def __init__(self, **kwargs): super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) + self.task_id = kwargs.get("task_id", None) + self.version = kwargs.get("version", None) + self.perform_preparing_health_check = kwargs.get("perform_preparing_health_check", None) + self.perform_restoring_health_check = kwargs.get("perform_restoring_health_check", None) class RepairTaskUpdateInfo(Model): @@ -17206,16 +17514,16 @@ class RepairTaskUpdateInfo(Model): """ _validation = { - 'version': {'required': True}, + "version": {"required": True}, } _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, **kwargs): super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = kwargs.get('version', None) + self.version = kwargs.get("version", None) class ReplicaHealth(EntityHealth): @@ -17254,27 +17562,27 @@ class ReplicaHealth(EntityHealth): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + "service_kind": {"Stateful": "StatefulServiceReplicaHealth", "Stateless": "StatelessServiceInstanceHealth"} } def __init__(self, **kwargs): super(ReplicaHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) + self.partition_id = kwargs.get("partition_id", None) self.service_kind = None - self.service_kind = 'ReplicaHealth' + self.service_kind = "ReplicaHealth" class ReplicaHealthEvaluation(HealthEvaluation): @@ -17317,24 +17625,24 @@ class ReplicaHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_or_instance_id": {"key": "ReplicaOrInstanceId", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ReplicaHealthEvaluation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Replica' + self.partition_id = kwargs.get("partition_id", None) + self.replica_or_instance_id = kwargs.get("replica_or_instance_id", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Replica" class ReplicaHealthState(EntityHealthState): @@ -17361,24 +17669,27 @@ class ReplicaHealthState(EntityHealthState): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + "service_kind": { + "Stateful": "StatefulServiceReplicaHealthState", + "Stateless": "StatelessServiceInstanceHealthState", + } } def __init__(self, **kwargs): super(ReplicaHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) + self.partition_id = kwargs.get("partition_id", None) self.service_kind = None - self.service_kind = 'ReplicaHealthState' + self.service_kind = "ReplicaHealthState" class ReplicaHealthStateChunk(EntityHealthStateChunk): @@ -17405,13 +17716,13 @@ class ReplicaHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "replica_or_instance_id": {"key": "ReplicaOrInstanceId", "type": "str"}, } def __init__(self, **kwargs): super(ReplicaHealthStateChunk, self).__init__(**kwargs) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) + self.replica_or_instance_id = kwargs.get("replica_or_instance_id", None) class ReplicaHealthStateChunkList(Model): @@ -17424,12 +17735,12 @@ class ReplicaHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + "items": {"key": "Items", "type": "[ReplicaHealthStateChunk]"}, } def __init__(self, **kwargs): super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class ReplicaHealthStateFilter(Model): @@ -17481,14 +17792,14 @@ class ReplicaHealthStateFilter(Model): """ _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + "replica_or_instance_id_filter": {"key": "ReplicaOrInstanceIdFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, } def __init__(self, **kwargs): super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) + self.replica_or_instance_id_filter = kwargs.get("replica_or_instance_id_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) class ReplicaInfo(Model): @@ -17520,29 +17831,29 @@ class ReplicaInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "last_in_build_duration_in_seconds": {"key": "LastInBuildDurationInSeconds", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + "service_kind": {"Stateful": "StatefulServiceReplicaInfo", "Stateless": "StatelessServiceInstanceInfo"} } def __init__(self, **kwargs): super(ReplicaInfo, self).__init__(**kwargs) - self.replica_status = kwargs.get('replica_status', None) - self.health_state = kwargs.get('health_state', None) - self.node_name = kwargs.get('node_name', None) - self.address = kwargs.get('address', None) - self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) + self.replica_status = kwargs.get("replica_status", None) + self.health_state = kwargs.get("health_state", None) + self.node_name = kwargs.get("node_name", None) + self.address = kwargs.get("address", None) + self.last_in_build_duration_in_seconds = kwargs.get("last_in_build_duration_in_seconds", None) self.service_kind = None @@ -17559,14 +17870,19 @@ class ReplicaLifecycleDescription(Model): """ _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + "is_singleton_replica_move_allowed_during_upgrade": { + "key": "IsSingletonReplicaMoveAllowedDuringUpgrade", + "type": "bool", + }, + "restore_replica_location_after_upgrade": {"key": "RestoreReplicaLocationAfterUpgrade", "type": "bool"}, } def __init__(self, **kwargs): super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) + self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get( + "is_singleton_replica_move_allowed_during_upgrade", None + ) + self.restore_replica_location_after_upgrade = kwargs.get("restore_replica_location_after_upgrade", None) class ReplicaMetricLoadDescription(Model): @@ -17582,14 +17898,14 @@ class ReplicaMetricLoadDescription(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + "node_name": {"key": "NodeName", "type": "str"}, + "replica_or_instance_load_entries": {"key": "ReplicaOrInstanceLoadEntries", "type": "[MetricLoadDescription]"}, } def __init__(self, **kwargs): super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) + self.node_name = kwargs.get("node_name", None) + self.replica_or_instance_load_entries = kwargs.get("replica_or_instance_load_entries", None) class ReplicasHealthEvaluation(HealthEvaluation): @@ -17626,24 +17942,29 @@ class ReplicasHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_replicas_per_partition": { + "key": "MaxPercentUnhealthyReplicasPerPartition", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ReplicasHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Replicas' + self.max_percent_unhealthy_replicas_per_partition = kwargs.get( + "max_percent_unhealthy_replicas_per_partition", None + ) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Replicas" class ReplicatorQueueStatus(Model): @@ -17686,22 +18007,22 @@ class ReplicatorQueueStatus(Model): """ _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + "queue_utilization_percentage": {"key": "QueueUtilizationPercentage", "type": "int"}, + "queue_memory_size": {"key": "QueueMemorySize", "type": "str"}, + "first_sequence_number": {"key": "FirstSequenceNumber", "type": "str"}, + "completed_sequence_number": {"key": "CompletedSequenceNumber", "type": "str"}, + "committed_sequence_number": {"key": "CommittedSequenceNumber", "type": "str"}, + "last_sequence_number": {"key": "LastSequenceNumber", "type": "str"}, } def __init__(self, **kwargs): super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) - self.queue_memory_size = kwargs.get('queue_memory_size', None) - self.first_sequence_number = kwargs.get('first_sequence_number', None) - self.completed_sequence_number = kwargs.get('completed_sequence_number', None) - self.committed_sequence_number = kwargs.get('committed_sequence_number', None) - self.last_sequence_number = kwargs.get('last_sequence_number', None) + self.queue_utilization_percentage = kwargs.get("queue_utilization_percentage", None) + self.queue_memory_size = kwargs.get("queue_memory_size", None) + self.first_sequence_number = kwargs.get("first_sequence_number", None) + self.completed_sequence_number = kwargs.get("completed_sequence_number", None) + self.committed_sequence_number = kwargs.get("committed_sequence_number", None) + self.last_sequence_number = kwargs.get("last_sequence_number", None) class ResolvedServiceEndpoint(Model): @@ -17718,14 +18039,14 @@ class ResolvedServiceEndpoint(Model): """ _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "address": {"key": "Address", "type": "str"}, } def __init__(self, **kwargs): super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.address = kwargs.get('address', None) + self.kind = kwargs.get("kind", None) + self.address = kwargs.get("address", None) class ResolvedServicePartition(Model): @@ -17750,25 +18071,25 @@ class ResolvedServicePartition(Model): """ _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, + "name": {"required": True}, + "partition_information": {"required": True}, + "endpoints": {"required": True}, + "version": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "endpoints": {"key": "Endpoints", "type": "[ResolvedServiceEndpoint]"}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, **kwargs): super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_information = kwargs.get('partition_information', None) - self.endpoints = kwargs.get('endpoints', None) - self.version = kwargs.get('version', None) + self.name = kwargs.get("name", None) + self.partition_information = kwargs.get("partition_information", None) + self.endpoints = kwargs.get("endpoints", None) + self.version = kwargs.get("version", None) class ResourceLimits(Model): @@ -17784,14 +18105,14 @@ class ResourceLimits(Model): """ _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, + "memory_in_gb": {"key": "memoryInGB", "type": "float"}, + "cpu": {"key": "cpu", "type": "float"}, } def __init__(self, **kwargs): super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) + self.memory_in_gb = kwargs.get("memory_in_gb", None) + self.cpu = kwargs.get("cpu", None) class ResourceRequests(Model): @@ -17812,19 +18133,19 @@ class ResourceRequests(Model): """ _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, + "memory_in_gb": {"required": True}, + "cpu": {"required": True}, } _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, + "memory_in_gb": {"key": "memoryInGB", "type": "float"}, + "cpu": {"key": "cpu", "type": "float"}, } def __init__(self, **kwargs): super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) + self.memory_in_gb = kwargs.get("memory_in_gb", None) + self.cpu = kwargs.get("cpu", None) class ResourceRequirements(Model): @@ -17841,18 +18162,18 @@ class ResourceRequirements(Model): """ _validation = { - 'requests': {'required': True}, + "requests": {"required": True}, } _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + "requests": {"key": "requests", "type": "ResourceRequests"}, + "limits": {"key": "limits", "type": "ResourceLimits"}, } def __init__(self, **kwargs): super(ResourceRequirements, self).__init__(**kwargs) - self.requests = kwargs.get('requests', None) - self.limits = kwargs.get('limits', None) + self.requests = kwargs.get("requests", None) + self.limits = kwargs.get("limits", None) class RestartDeployedCodePackageDescription(Model): @@ -17888,24 +18209,24 @@ class RestartDeployedCodePackageDescription(Model): """ _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, + "service_manifest_name": {"required": True}, + "code_package_name": {"required": True}, + "code_package_instance_id": {"required": True}, } _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "code_package_instance_id": {"key": "CodePackageInstanceId", "type": "str"}, } def __init__(self, **kwargs): super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.code_package_instance_id = kwargs.get('code_package_instance_id', None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.service_package_activation_id = kwargs.get("service_package_activation_id", None) + self.code_package_name = kwargs.get("code_package_name", None) + self.code_package_instance_id = kwargs.get("code_package_instance_id", None) class RestartNodeDescription(Model): @@ -17927,18 +18248,18 @@ class RestartNodeDescription(Model): """ _validation = { - 'node_instance_id': {'required': True}, + "node_instance_id": {"required": True}, } _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + "node_instance_id": {"key": "NodeInstanceId", "type": "str"}, + "create_fabric_dump": {"key": "CreateFabricDump", "type": "str"}, } def __init__(self, **kwargs): super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', "0") - self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") + self.node_instance_id = kwargs.get("node_instance_id", "0") + self.create_fabric_dump = kwargs.get("create_fabric_dump", "False") class RestartPartitionResult(Model): @@ -17954,14 +18275,14 @@ class RestartPartitionResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "selected_partition": {"key": "SelectedPartition", "type": "SelectedPartition"}, } def __init__(self, **kwargs): super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) + self.error_code = kwargs.get("error_code", None) + self.selected_partition = kwargs.get("selected_partition", None) class RestorePartitionDescription(Model): @@ -17981,21 +18302,21 @@ class RestorePartitionDescription(Model): """ _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, + "backup_id": {"required": True}, + "backup_location": {"required": True}, } _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + "backup_id": {"key": "BackupId", "type": "str"}, + "backup_location": {"key": "BackupLocation", "type": "str"}, + "backup_storage": {"key": "BackupStorage", "type": "BackupStorageDescription"}, } def __init__(self, **kwargs): super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_storage = kwargs.get('backup_storage', None) + self.backup_id = kwargs.get("backup_id", None) + self.backup_location = kwargs.get("backup_location", None) + self.backup_storage = kwargs.get("backup_storage", None) class RestoreProgressInfo(Model): @@ -18018,20 +18339,20 @@ class RestoreProgressInfo(Model): """ _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + "restore_state": {"key": "RestoreState", "type": "str"}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "restored_epoch": {"key": "RestoredEpoch", "type": "Epoch"}, + "restored_lsn": {"key": "RestoredLsn", "type": "str"}, + "failure_error": {"key": "FailureError", "type": "FabricErrorError"}, } def __init__(self, **kwargs): super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = kwargs.get('restore_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.restored_epoch = kwargs.get('restored_epoch', None) - self.restored_lsn = kwargs.get('restored_lsn', None) - self.failure_error = kwargs.get('failure_error', None) + self.restore_state = kwargs.get("restore_state", None) + self.time_stamp_utc = kwargs.get("time_stamp_utc", None) + self.restored_epoch = kwargs.get("restored_epoch", None) + self.restored_lsn = kwargs.get("restored_lsn", None) + self.failure_error = kwargs.get("failure_error", None) class ResumeApplicationUpgradeDescription(Model): @@ -18046,16 +18367,16 @@ class ResumeApplicationUpgradeDescription(Model): """ _validation = { - 'upgrade_domain_name': {'required': True}, + "upgrade_domain_name": {"required": True}, } _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, } def __init__(self, **kwargs): super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.upgrade_domain_name = kwargs.get("upgrade_domain_name", None) class ResumeClusterUpgradeDescription(Model): @@ -18069,16 +18390,16 @@ class ResumeClusterUpgradeDescription(Model): """ _validation = { - 'upgrade_domain': {'required': True}, + "upgrade_domain": {"required": True}, } _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, } def __init__(self, **kwargs): super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.upgrade_domain = kwargs.get("upgrade_domain", None) class RollingUpgradeUpdateDescription(Model): @@ -18157,34 +18478,39 @@ class RollingUpgradeUpdateDescription(Model): """ _validation = { - 'rolling_upgrade_mode': {'required': True}, + "rolling_upgrade_mode": {"required": True}, } _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "replica_set_check_timeout_in_milliseconds": {"key": "ReplicaSetCheckTimeoutInMilliseconds", "type": "long"}, + "failure_action": {"key": "FailureAction", "type": "str"}, + "health_check_wait_duration_in_milliseconds": {"key": "HealthCheckWaitDurationInMilliseconds", "type": "str"}, + "health_check_stable_duration_in_milliseconds": { + "key": "HealthCheckStableDurationInMilliseconds", + "type": "str", + }, + "health_check_retry_timeout_in_milliseconds": {"key": "HealthCheckRetryTimeoutInMilliseconds", "type": "str"}, + "upgrade_timeout_in_milliseconds": {"key": "UpgradeTimeoutInMilliseconds", "type": "str"}, + "upgrade_domain_timeout_in_milliseconds": {"key": "UpgradeDomainTimeoutInMilliseconds", "type": "str"}, + "instance_close_delay_duration_in_seconds": {"key": "InstanceCloseDelayDurationInSeconds", "type": "long"}, } def __init__(self, **kwargs): super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', None) - self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', None) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.force_restart = kwargs.get("force_restart", None) + self.replica_set_check_timeout_in_milliseconds = kwargs.get("replica_set_check_timeout_in_milliseconds", None) + self.failure_action = kwargs.get("failure_action", None) + self.health_check_wait_duration_in_milliseconds = kwargs.get("health_check_wait_duration_in_milliseconds", None) + self.health_check_stable_duration_in_milliseconds = kwargs.get( + "health_check_stable_duration_in_milliseconds", None + ) + self.health_check_retry_timeout_in_milliseconds = kwargs.get("health_check_retry_timeout_in_milliseconds", None) + self.upgrade_timeout_in_milliseconds = kwargs.get("upgrade_timeout_in_milliseconds", None) + self.upgrade_domain_timeout_in_milliseconds = kwargs.get("upgrade_domain_timeout_in_milliseconds", None) + self.instance_close_delay_duration_in_seconds = kwargs.get("instance_close_delay_duration_in_seconds", None) class RunToCompletionExecutionPolicy(ExecutionPolicy): @@ -18205,19 +18531,19 @@ class RunToCompletionExecutionPolicy(ExecutionPolicy): """ _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, + "type": {"required": True}, + "restart": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "restart": {"key": "restart", "type": "str"}, } def __init__(self, **kwargs): super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.restart = kwargs.get('restart', None) - self.type = 'RunToCompletion' + self.restart = kwargs.get("restart", None) + self.type = "RunToCompletion" class SafetyCheckWrapper(Model): @@ -18232,12 +18558,12 @@ class SafetyCheckWrapper(Model): """ _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + "safety_check": {"key": "SafetyCheck", "type": "SafetyCheck"}, } def __init__(self, **kwargs): super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = kwargs.get('safety_check', None) + self.safety_check = kwargs.get("safety_check", None) class ScalingPolicyDescription(Model): @@ -18256,19 +18582,19 @@ class ScalingPolicyDescription(Model): """ _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, + "scaling_trigger": {"required": True}, + "scaling_mechanism": {"required": True}, } _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + "scaling_trigger": {"key": "ScalingTrigger", "type": "ScalingTriggerDescription"}, + "scaling_mechanism": {"key": "ScalingMechanism", "type": "ScalingMechanismDescription"}, } def __init__(self, **kwargs): super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = kwargs.get('scaling_trigger', None) - self.scaling_mechanism = kwargs.get('scaling_mechanism', None) + self.scaling_trigger = kwargs.get("scaling_trigger", None) + self.scaling_mechanism = kwargs.get("scaling_mechanism", None) class SecondaryReplicatorStatus(ReplicatorStatus): @@ -18311,32 +18637,37 @@ class SecondaryReplicatorStatus(ReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_replication_operation_received_time_utc": { + "key": "LastReplicationOperationReceivedTimeUtc", + "type": "iso-8601", + }, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "copy_queue_status": {"key": "CopyQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_copy_operation_received_time_utc": {"key": "LastCopyOperationReceivedTimeUtc", "type": "iso-8601"}, + "last_acknowledgement_sent_time_utc": {"key": "LastAcknowledgementSentTimeUtc", "type": "iso-8601"}, } _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + "kind": {"ActiveSecondary": "SecondaryActiveReplicatorStatus", "IdleSecondary": "SecondaryIdleReplicatorStatus"} } def __init__(self, **kwargs): super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.copy_queue_status = kwargs.get('copy_queue_status', None) - self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) - self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) - self.kind = 'SecondaryReplicatorStatus' + self.replication_queue_status = kwargs.get("replication_queue_status", None) + self.last_replication_operation_received_time_utc = kwargs.get( + "last_replication_operation_received_time_utc", None + ) + self.is_in_build = kwargs.get("is_in_build", None) + self.copy_queue_status = kwargs.get("copy_queue_status", None) + self.last_copy_operation_received_time_utc = kwargs.get("last_copy_operation_received_time_utc", None) + self.last_acknowledgement_sent_time_utc = kwargs.get("last_acknowledgement_sent_time_utc", None) + self.kind = "SecondaryReplicatorStatus" class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): @@ -18375,22 +18706,25 @@ class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_replication_operation_received_time_utc": { + "key": "LastReplicationOperationReceivedTimeUtc", + "type": "iso-8601", + }, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "copy_queue_status": {"key": "CopyQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_copy_operation_received_time_utc": {"key": "LastCopyOperationReceivedTimeUtc", "type": "iso-8601"}, + "last_acknowledgement_sent_time_utc": {"key": "LastAcknowledgementSentTimeUtc", "type": "iso-8601"}, } def __init__(self, **kwargs): super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) - self.kind = 'ActiveSecondary' + self.kind = "ActiveSecondary" class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): @@ -18429,22 +18763,25 @@ class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_replication_operation_received_time_utc": { + "key": "LastReplicationOperationReceivedTimeUtc", + "type": "iso-8601", + }, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "copy_queue_status": {"key": "CopyQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_copy_operation_received_time_utc": {"key": "LastCopyOperationReceivedTimeUtc", "type": "iso-8601"}, + "last_acknowledgement_sent_time_utc": {"key": "LastAcknowledgementSentTimeUtc", "type": "iso-8601"}, } def __init__(self, **kwargs): super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) - self.kind = 'IdleSecondary' + self.kind = "IdleSecondary" class SecretResourceDescription(Model): @@ -18460,19 +18797,19 @@ class SecretResourceDescription(Model): """ _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, + "properties": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, + "properties": {"key": "properties", "type": "SecretResourceProperties"}, + "name": {"key": "name", "type": "str"}, } def __init__(self, **kwargs): super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.name = kwargs.get('name', None) + self.properties = kwargs.get("properties", None) + self.name = kwargs.get("name", None) class SecretValue(Model): @@ -18483,12 +18820,12 @@ class SecretValue(Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, } def __init__(self, **kwargs): super(SecretValue, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class SecretValueProperties(Model): @@ -18499,12 +18836,12 @@ class SecretValueProperties(Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, } def __init__(self, **kwargs): super(SecretValueProperties, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class SecretValueResourceDescription(Model): @@ -18520,18 +18857,18 @@ class SecretValueResourceDescription(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "properties.value", "type": "str"}, } def __init__(self, **kwargs): super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) class SeedNodeSafetyCheck(SafetyCheck): @@ -18545,16 +18882,16 @@ class SeedNodeSafetyCheck(SafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } def __init__(self, **kwargs): super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' + self.kind = "EnsureSeedNodeQuorum" class SelectedPartition(Model): @@ -18572,14 +18909,14 @@ class SelectedPartition(Model): """ _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(SelectedPartition, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) + self.service_name = kwargs.get("service_name", None) + self.partition_id = kwargs.get("partition_id", None) class ServiceBackupConfigurationInfo(BackupConfigurationInfo): @@ -18607,21 +18944,21 @@ class ServiceBackupConfigurationInfo(BackupConfigurationInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.kind = 'Service' + self.service_name = kwargs.get("service_name", None) + self.kind = "Service" class ServiceBackupEntity(BackupEntity): @@ -18637,18 +18974,18 @@ class ServiceBackupEntity(BackupEntity): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceBackupEntity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.entity_kind = 'Service' + self.service_name = kwargs.get("service_name", None) + self.entity_kind = "Service" class ServiceCorrelationDescription(Model): @@ -18667,19 +19004,19 @@ class ServiceCorrelationDescription(Model): """ _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, + "scheme": {"required": True}, + "service_name": {"required": True}, } _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "scheme": {"key": "Scheme", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = kwargs.get('scheme', None) - self.service_name = kwargs.get('service_name', None) + self.scheme = kwargs.get("scheme", None) + self.service_name = kwargs.get("service_name", None) class ServiceEvent(FabricEvent): @@ -18714,29 +19051,34 @@ class ServiceEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, } _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} + "kind": { + "ServiceCreated": "ServiceCreatedEvent", + "ServiceDeleted": "ServiceDeletedEvent", + "ServiceNewHealthReport": "ServiceNewHealthReportEvent", + "ServiceHealthReportExpired": "ServiceHealthReportExpiredEvent", + } } def __init__(self, **kwargs): super(ServiceEvent, self).__init__(**kwargs) - self.service_id = kwargs.get('service_id', None) - self.kind = 'ServiceEvent' + self.service_id = kwargs.get("service_id", None) + self.kind = "ServiceEvent" class ServiceCreatedEvent(ServiceEvent): @@ -18791,54 +19133,54 @@ class ServiceCreatedEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "service_type_name": {"required": True}, + "application_name": {"required": True}, + "application_type_name": {"required": True}, + "service_instance": {"required": True}, + "is_stateful": {"required": True}, + "partition_count": {"required": True}, + "target_replica_set_size": {"required": True}, + "min_replica_set_size": {"required": True}, + "service_package_version": {"required": True}, + "partition_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "service_instance": {"key": "ServiceInstance", "type": "long"}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "partition_count": {"key": "PartitionCount", "type": "int"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "service_package_version": {"key": "ServicePackageVersion", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(ServiceCreatedEvent, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_instance = kwargs.get('service_instance', None) - self.is_stateful = kwargs.get('is_stateful', None) - self.partition_count = kwargs.get('partition_count', None) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.service_package_version = kwargs.get('service_package_version', None) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'ServiceCreated' + self.service_type_name = kwargs.get("service_type_name", None) + self.application_name = kwargs.get("application_name", None) + self.application_type_name = kwargs.get("application_type_name", None) + self.service_instance = kwargs.get("service_instance", None) + self.is_stateful = kwargs.get("is_stateful", None) + self.partition_count = kwargs.get("partition_count", None) + self.target_replica_set_size = kwargs.get("target_replica_set_size", None) + self.min_replica_set_size = kwargs.get("min_replica_set_size", None) + self.service_package_version = kwargs.get("service_package_version", None) + self.partition_id = kwargs.get("partition_id", None) + self.kind = "ServiceCreated" class ServiceDeletedEvent(ServiceEvent): @@ -18887,51 +19229,51 @@ class ServiceDeletedEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "service_type_name": {"required": True}, + "application_name": {"required": True}, + "application_type_name": {"required": True}, + "service_instance": {"required": True}, + "is_stateful": {"required": True}, + "partition_count": {"required": True}, + "target_replica_set_size": {"required": True}, + "min_replica_set_size": {"required": True}, + "service_package_version": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "service_instance": {"key": "ServiceInstance", "type": "long"}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "partition_count": {"key": "PartitionCount", "type": "int"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "service_package_version": {"key": "ServicePackageVersion", "type": "str"}, } def __init__(self, **kwargs): super(ServiceDeletedEvent, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_instance = kwargs.get('service_instance', None) - self.is_stateful = kwargs.get('is_stateful', None) - self.partition_count = kwargs.get('partition_count', None) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.service_package_version = kwargs.get('service_package_version', None) - self.kind = 'ServiceDeleted' + self.service_type_name = kwargs.get("service_type_name", None) + self.application_name = kwargs.get("application_name", None) + self.application_type_name = kwargs.get("application_type_name", None) + self.service_instance = kwargs.get("service_instance", None) + self.is_stateful = kwargs.get("is_stateful", None) + self.partition_count = kwargs.get("partition_count", None) + self.target_replica_set_size = kwargs.get("target_replica_set_size", None) + self.min_replica_set_size = kwargs.get("min_replica_set_size", None) + self.service_package_version = kwargs.get("service_package_version", None) + self.kind = "ServiceDeleted" class ServiceDescription(Model): @@ -19003,54 +19345,57 @@ class ServiceDescription(Model): """ _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, + "service_name": {"required": True}, + "service_type_name": {"required": True}, + "partition_description": {"required": True}, + "service_kind": {"required": True}, } _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "partition_description": {"key": "PartitionDescription", "type": "PartitionSchemeDescription"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "service_load_metrics": {"key": "ServiceLoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "is_default_move_cost_specified": {"key": "IsDefaultMoveCostSpecified", "type": "bool"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "tags_required_to_place": {"key": "TagsRequiredToPlace", "type": "NodeTagsDescription"}, + "tags_required_to_run": {"key": "TagsRequiredToRun", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + "service_kind": {"Stateful": "StatefulServiceDescription", "Stateless": "StatelessServiceDescription"} } def __init__(self, **kwargs): super(ServiceDescription, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.initialization_data = kwargs.get('initialization_data', None) - self.partition_description = kwargs.get('partition_description', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.service_load_metrics = kwargs.get('service_load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.tags_required_to_place = kwargs.get('tags_required_to_place', None) - self.tags_required_to_run = kwargs.get('tags_required_to_run', None) + self.application_name = kwargs.get("application_name", None) + self.service_name = kwargs.get("service_name", None) + self.service_type_name = kwargs.get("service_type_name", None) + self.initialization_data = kwargs.get("initialization_data", None) + self.partition_description = kwargs.get("partition_description", None) + self.placement_constraints = kwargs.get("placement_constraints", None) + self.correlation_scheme = kwargs.get("correlation_scheme", None) + self.service_load_metrics = kwargs.get("service_load_metrics", None) + self.service_placement_policies = kwargs.get("service_placement_policies", None) + self.default_move_cost = kwargs.get("default_move_cost", None) + self.is_default_move_cost_specified = kwargs.get("is_default_move_cost_specified", None) + self.service_package_activation_mode = kwargs.get("service_package_activation_mode", None) + self.service_dns_name = kwargs.get("service_dns_name", None) + self.scaling_policies = kwargs.get("scaling_policies", None) + self.tags_required_to_place = kwargs.get("tags_required_to_place", None) + self.tags_required_to_run = kwargs.get("tags_required_to_run", None) self.service_kind = None @@ -19083,28 +19428,28 @@ class ServiceFromTemplateDescription(Model): """ _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, + "application_name": {"required": True}, + "service_name": {"required": True}, + "service_type_name": {"required": True}, } _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.initialization_data = kwargs.get('initialization_data', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) + self.application_name = kwargs.get("application_name", None) + self.service_name = kwargs.get("service_name", None) + self.service_type_name = kwargs.get("service_type_name", None) + self.initialization_data = kwargs.get("initialization_data", None) + self.service_package_activation_mode = kwargs.get("service_package_activation_mode", None) + self.service_dns_name = kwargs.get("service_dns_name", None) class ServiceHealth(EntityHealth): @@ -19137,18 +19482,18 @@ class ServiceHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + "partition_health_states": {"key": "PartitionHealthStates", "type": "[PartitionHealthState]"}, } def __init__(self, **kwargs): super(ServiceHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_health_states = kwargs.get('partition_health_states', None) + self.name = kwargs.get("name", None) + self.partition_health_states = kwargs.get("partition_health_states", None) class ServiceHealthEvaluation(HealthEvaluation): @@ -19182,22 +19527,22 @@ class ServiceHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ServiceHealthEvaluation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Service' + self.service_name = kwargs.get("service_name", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Service" class ServiceHealthReportExpiredEvent(ServiceEvent): @@ -19247,51 +19592,51 @@ class ServiceHealthReportExpiredEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ServiceHealthReportExpired' + self.instance_id = kwargs.get("instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "ServiceHealthReportExpired" class ServiceHealthState(EntityHealthState): @@ -19310,13 +19655,13 @@ class ServiceHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceHealthState, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) + self.service_name = kwargs.get("service_name", None) class ServiceHealthStateChunk(EntityHealthStateChunk): @@ -19339,15 +19684,15 @@ class ServiceHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_health_state_chunks": {"key": "PartitionHealthStateChunks", "type": "PartitionHealthStateChunkList"}, } def __init__(self, **kwargs): super(ServiceHealthStateChunk, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) + self.service_name = kwargs.get("service_name", None) + self.partition_health_state_chunks = kwargs.get("partition_health_state_chunks", None) class ServiceHealthStateChunkList(Model): @@ -19360,12 +19705,12 @@ class ServiceHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + "items": {"key": "Items", "type": "[ServiceHealthStateChunk]"}, } def __init__(self, **kwargs): super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) + self.items = kwargs.get("items", None) class ServiceHealthStateFilter(Model): @@ -19427,16 +19772,16 @@ class ServiceHealthStateFilter(Model): """ _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + "service_name_filter": {"key": "ServiceNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "partition_filters": {"key": "PartitionFilters", "type": "[PartitionHealthStateFilter]"}, } def __init__(self, **kwargs): super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = kwargs.get('service_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.partition_filters = kwargs.get('partition_filters', None) + self.service_name_filter = kwargs.get("service_name_filter", None) + self.health_state_filter = kwargs.get("health_state_filter", 0) + self.partition_filters = kwargs.get("partition_filters", None) class ServiceIdentity(Model): @@ -19449,14 +19794,14 @@ class ServiceIdentity(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "identity_ref": {"key": "identityRef", "type": "str"}, } def __init__(self, **kwargs): super(ServiceIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.identity_ref = kwargs.get('identity_ref', None) + self.name = kwargs.get("name", None) + self.identity_ref = kwargs.get("identity_ref", None) class ServiceInfo(Model): @@ -19497,33 +19842,31 @@ class ServiceInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "manifest_version": {"key": "ManifestVersion", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_status": {"key": "ServiceStatus", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } + _subtype_map = {"service_kind": {"Stateful": "StatefulServiceInfo", "Stateless": "StatelessServiceInfo"}} def __init__(self, **kwargs): super(ServiceInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.manifest_version = kwargs.get('manifest_version', None) - self.health_state = kwargs.get('health_state', None) - self.service_status = kwargs.get('service_status', None) - self.is_service_group = kwargs.get('is_service_group', None) + self.id = kwargs.get("id", None) + self.name = kwargs.get("name", None) + self.type_name = kwargs.get("type_name", None) + self.manifest_version = kwargs.get("manifest_version", None) + self.health_state = kwargs.get("health_state", None) + self.service_status = kwargs.get("service_status", None) + self.is_service_group = kwargs.get("is_service_group", None) self.service_kind = None @@ -19559,26 +19902,26 @@ class ServiceLoadMetricDescription(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + "name": {"key": "Name", "type": "str"}, + "weight": {"key": "Weight", "type": "str"}, + "primary_default_load": {"key": "PrimaryDefaultLoad", "type": "int"}, + "secondary_default_load": {"key": "SecondaryDefaultLoad", "type": "int"}, + "auxiliary_default_load": {"key": "AuxiliaryDefaultLoad", "type": "int"}, + "default_load": {"key": "DefaultLoad", "type": "int"}, } def __init__(self, **kwargs): super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.weight = kwargs.get('weight', None) - self.primary_default_load = kwargs.get('primary_default_load', None) - self.secondary_default_load = kwargs.get('secondary_default_load', None) - self.auxiliary_default_load = kwargs.get('auxiliary_default_load', None) - self.default_load = kwargs.get('default_load', None) + self.name = kwargs.get("name", None) + self.weight = kwargs.get("weight", None) + self.primary_default_load = kwargs.get("primary_default_load", None) + self.secondary_default_load = kwargs.get("secondary_default_load", None) + self.auxiliary_default_load = kwargs.get("auxiliary_default_load", None) + self.default_load = kwargs.get("default_load", None) class ServiceNameInfo(Model): @@ -19597,14 +19940,14 @@ class ServiceNameInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, **kwargs): super(ServiceNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) + self.id = kwargs.get("id", None) + self.name = kwargs.get("name", None) class ServiceNewHealthReportEvent(ServiceEvent): @@ -19654,51 +19997,51 @@ class ServiceNewHealthReportEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(ServiceNewHealthReportEvent, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ServiceNewHealthReport' + self.instance_id = kwargs.get("instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "ServiceNewHealthReport" class ServicePartitionInfo(Model): @@ -19728,25 +20071,25 @@ class ServicePartitionInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_status": {"key": "PartitionStatus", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + "service_kind": {"Stateful": "StatefulServicePartitionInfo", "Stateless": "StatelessServicePartitionInfo"} } def __init__(self, **kwargs): super(ServicePartitionInfo, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.partition_status = kwargs.get('partition_status', None) - self.partition_information = kwargs.get('partition_information', None) + self.health_state = kwargs.get("health_state", None) + self.partition_status = kwargs.get("partition_status", None) + self.partition_information = kwargs.get("partition_information", None) self.service_kind = None @@ -19768,15 +20111,22 @@ class ServicePlacementPolicyDescription(Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, } _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + "type": { + "InvalidDomain": "ServicePlacementInvalidDomainPolicyDescription", + "NonPartiallyPlaceService": "ServicePlacementNonPartiallyPlaceServicePolicyDescription", + "AllowMultipleStatelessInstancesOnNode": "ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription", + "PreferPrimaryDomain": "ServicePlacementPreferPrimaryDomainPolicyDescription", + "RequireDomain": "ServicePlacementRequiredDomainPolicyDescription", + "RequireDomainDistribution": "ServicePlacementRequireDomainDistributionPolicyDescription", + } } def __init__(self, **kwargs): @@ -19800,18 +20150,18 @@ class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(Ser """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } def __init__(self, **kwargs): super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'AllowMultipleStatelessInstancesOnNode' + self.domain_name = kwargs.get("domain_name", None) + self.type = "AllowMultipleStatelessInstancesOnNode" class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): @@ -19829,18 +20179,18 @@ class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescr """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } def __init__(self, **kwargs): super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'InvalidDomain' + self.domain_name = kwargs.get("domain_name", None) + self.type = "InvalidDomain" class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): @@ -19855,16 +20205,16 @@ class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacement """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, } def __init__(self, **kwargs): super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' + self.type = "NonPartiallyPlaceService" class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): @@ -19889,18 +20239,18 @@ class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolic """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } def __init__(self, **kwargs): super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'PreferPrimaryDomain' + self.domain_name = kwargs.get("domain_name", None) + self.type = "PreferPrimaryDomain" class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): @@ -19918,18 +20268,18 @@ class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDesc """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } def __init__(self, **kwargs): super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'RequireDomain' + self.domain_name = kwargs.get("domain_name", None) + self.type = "RequireDomain" class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): @@ -19955,18 +20305,18 @@ class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacemen """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } def __init__(self, **kwargs): super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'RequireDomainDistribution' + self.domain_name = kwargs.get("domain_name", None) + self.type = "RequireDomainDistribution" class ServiceProperties(Model): @@ -20005,37 +20355,37 @@ class ServiceProperties(Model): """ _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "health_state": {"readonly": True}, + "unhealthy_evaluation": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "replica_count": {"key": "replicaCount", "type": "int"}, + "execution_policy": {"key": "executionPolicy", "type": "ExecutionPolicy"}, + "auto_scaling_policies": {"key": "autoScalingPolicies", "type": "[AutoScalingPolicy]"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "health_state": {"key": "healthState", "type": "str"}, + "unhealthy_evaluation": {"key": "unhealthyEvaluation", "type": "str"}, + "identity_refs": {"key": "identityRefs", "type": "[ServiceIdentity]"}, + "dns_name": {"key": "dnsName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.description = kwargs.get("description", None) + self.replica_count = kwargs.get("replica_count", None) + self.execution_policy = kwargs.get("execution_policy", None) + self.auto_scaling_policies = kwargs.get("auto_scaling_policies", None) self.status = None self.status_details = None self.health_state = None self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) + self.identity_refs = kwargs.get("identity_refs", None) + self.dns_name = kwargs.get("dns_name", None) class ServiceReplicaProperties(Model): @@ -20060,23 +20410,23 @@ class ServiceReplicaProperties(Model): """ _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, + "os_type": {"required": True}, + "code_packages": {"required": True}, } _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + "os_type": {"key": "osType", "type": "str"}, + "code_packages": {"key": "codePackages", "type": "[ContainerCodePackageProperties]"}, + "network_refs": {"key": "networkRefs", "type": "[NetworkRef]"}, + "diagnostics": {"key": "diagnostics", "type": "DiagnosticsRef"}, } def __init__(self, **kwargs): super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.code_packages = kwargs.get('code_packages', None) - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) + self.os_type = kwargs.get("os_type", None) + self.code_packages = kwargs.get("code_packages", None) + self.network_refs = kwargs.get("network_refs", None) + self.diagnostics = kwargs.get("diagnostics", None) class ServiceReplicaDescription(ServiceReplicaProperties): @@ -20103,22 +20453,22 @@ class ServiceReplicaDescription(ServiceReplicaProperties): """ _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, + "os_type": {"required": True}, + "code_packages": {"required": True}, + "replica_name": {"required": True}, } _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, + "os_type": {"key": "osType", "type": "str"}, + "code_packages": {"key": "codePackages", "type": "[ContainerCodePackageProperties]"}, + "network_refs": {"key": "networkRefs", "type": "[NetworkRef]"}, + "diagnostics": {"key": "diagnostics", "type": "DiagnosticsRef"}, + "replica_name": {"key": "replicaName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceReplicaDescription, self).__init__(**kwargs) - self.replica_name = kwargs.get('replica_name', None) + self.replica_name = kwargs.get("replica_name", None) class ServiceResourceDescription(Model): @@ -20175,50 +20525,50 @@ class ServiceResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, + "name": {"required": True}, + "os_type": {"required": True}, + "code_packages": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "health_state": {"readonly": True}, + "unhealthy_evaluation": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "code_packages": {"key": "properties.codePackages", "type": "[ContainerCodePackageProperties]"}, + "network_refs": {"key": "properties.networkRefs", "type": "[NetworkRef]"}, + "diagnostics": {"key": "properties.diagnostics", "type": "DiagnosticsRef"}, + "description": {"key": "properties.description", "type": "str"}, + "replica_count": {"key": "properties.replicaCount", "type": "int"}, + "execution_policy": {"key": "properties.executionPolicy", "type": "ExecutionPolicy"}, + "auto_scaling_policies": {"key": "properties.autoScalingPolicies", "type": "[AutoScalingPolicy]"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "health_state": {"key": "properties.healthState", "type": "str"}, + "unhealthy_evaluation": {"key": "properties.unhealthyEvaluation", "type": "str"}, + "identity_refs": {"key": "properties.identityRefs", "type": "[ServiceIdentity]"}, + "dns_name": {"key": "properties.dnsName", "type": "str"}, } def __init__(self, **kwargs): super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', None) - self.code_packages = kwargs.get('code_packages', None) - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.name = kwargs.get("name", None) + self.os_type = kwargs.get("os_type", None) + self.code_packages = kwargs.get("code_packages", None) + self.network_refs = kwargs.get("network_refs", None) + self.diagnostics = kwargs.get("diagnostics", None) + self.description = kwargs.get("description", None) + self.replica_count = kwargs.get("replica_count", None) + self.execution_policy = kwargs.get("execution_policy", None) + self.auto_scaling_policies = kwargs.get("auto_scaling_policies", None) self.status = None self.status_details = None self.health_state = None self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) + self.identity_refs = kwargs.get("identity_refs", None) + self.dns_name = kwargs.get("dns_name", None) class ServicesHealthEvaluation(HealthEvaluation): @@ -20257,26 +20607,26 @@ class ServicesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "max_percent_unhealthy_services": {"key": "MaxPercentUnhealthyServices", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(ServicesHealthEvaluation, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Services' + self.service_type_name = kwargs.get("service_type_name", None) + self.max_percent_unhealthy_services = kwargs.get("max_percent_unhealthy_services", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "Services" class ServiceTypeDescription(Model): @@ -20315,31 +20665,34 @@ class ServiceTypeDescription(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "extensions": {"key": "Extensions", "type": "[ServiceTypeExtensionDescription]"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + "kind": {"Stateful": "StatefulServiceTypeDescription", "Stateless": "StatelessServiceTypeDescription"} } def __init__(self, **kwargs): super(ServiceTypeDescription, self).__init__(**kwargs) - self.is_stateful = kwargs.get('is_stateful', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.extensions = kwargs.get('extensions', None) + self.is_stateful = kwargs.get("is_stateful", None) + self.service_type_name = kwargs.get("service_type_name", None) + self.placement_constraints = kwargs.get("placement_constraints", None) + self.load_metrics = kwargs.get("load_metrics", None) + self.service_placement_policies = kwargs.get("service_placement_policies", None) + self.extensions = kwargs.get("extensions", None) self.kind = None @@ -20353,14 +20706,14 @@ class ServiceTypeExtensionDescription(Model): """ _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "str"}, } def __init__(self, **kwargs): super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class ServiceTypeHealthPolicy(Model): @@ -20406,16 +20759,26 @@ class ServiceTypeHealthPolicy(Model): """ _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + "max_percent_unhealthy_partitions_per_service": { + "key": "MaxPercentUnhealthyPartitionsPerService", + "type": "int", + }, + "max_percent_unhealthy_replicas_per_partition": { + "key": "MaxPercentUnhealthyReplicasPerPartition", + "type": "int", + }, + "max_percent_unhealthy_services": {"key": "MaxPercentUnhealthyServices", "type": "int"}, } def __init__(self, **kwargs): super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) + self.max_percent_unhealthy_partitions_per_service = kwargs.get( + "max_percent_unhealthy_partitions_per_service", 0 + ) + self.max_percent_unhealthy_replicas_per_partition = kwargs.get( + "max_percent_unhealthy_replicas_per_partition", 0 + ) + self.max_percent_unhealthy_services = kwargs.get("max_percent_unhealthy_services", 0) class ServiceTypeHealthPolicyMapItem(Model): @@ -20432,19 +20795,19 @@ class ServiceTypeHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "ServiceTypeHealthPolicy"}, } def __init__(self, **kwargs): super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) + self.key = kwargs.get("key", None) + self.value = kwargs.get("value", None) class ServiceTypeInfo(Model): @@ -20468,18 +20831,18 @@ class ServiceTypeInfo(Model): """ _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + "service_type_description": {"key": "ServiceTypeDescription", "type": "ServiceTypeDescription"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_manifest_version": {"key": "ServiceManifestVersion", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, } def __init__(self, **kwargs): super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = kwargs.get('service_type_description', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.is_service_group = kwargs.get('is_service_group', None) + self.service_type_description = kwargs.get("service_type_description", None) + self.service_manifest_name = kwargs.get("service_manifest_name", None) + self.service_manifest_version = kwargs.get("service_manifest_version", None) + self.is_service_group = kwargs.get("is_service_group", None) class ServiceTypeManifest(Model): @@ -20491,12 +20854,12 @@ class ServiceTypeManifest(Model): """ _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, + "manifest": {"key": "Manifest", "type": "str"}, } def __init__(self, **kwargs): super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) + self.manifest = kwargs.get("manifest", None) class ServiceUpdateDescription(Model): @@ -20592,39 +20955,45 @@ class ServiceUpdateDescription(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "flags": {"key": "Flags", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "tags_for_placement": {"key": "TagsForPlacement", "type": "NodeTagsDescription"}, + "tags_for_running": {"key": "TagsForRunning", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + "service_kind": { + "Stateful": "StatefulServiceUpdateDescription", + "Stateless": "StatelessServiceUpdateDescription", + } } def __init__(self, **kwargs): super(ServiceUpdateDescription, self).__init__(**kwargs) - self.flags = kwargs.get('flags', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.tags_for_placement = kwargs.get('tags_for_placement', None) - self.tags_for_running = kwargs.get('tags_for_running', None) + self.flags = kwargs.get("flags", None) + self.placement_constraints = kwargs.get("placement_constraints", None) + self.correlation_scheme = kwargs.get("correlation_scheme", None) + self.load_metrics = kwargs.get("load_metrics", None) + self.service_placement_policies = kwargs.get("service_placement_policies", None) + self.default_move_cost = kwargs.get("default_move_cost", None) + self.scaling_policies = kwargs.get("scaling_policies", None) + self.service_dns_name = kwargs.get("service_dns_name", None) + self.tags_for_placement = kwargs.get("tags_for_placement", None) + self.tags_for_running = kwargs.get("tags_for_running", None) self.service_kind = None @@ -20643,16 +21012,16 @@ class ServiceUpgradeProgress(Model): """ _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "completed_replica_count": {"key": "CompletedReplicaCount", "type": "str"}, + "pending_replica_count": {"key": "PendingReplicaCount", "type": "str"}, } def __init__(self, **kwargs): super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.completed_replica_count = kwargs.get('completed_replica_count', None) - self.pending_replica_count = kwargs.get('pending_replica_count', None) + self.service_name = kwargs.get("service_name", None) + self.completed_replica_count = kwargs.get("completed_replica_count", None) + self.pending_replica_count = kwargs.get("pending_replica_count", None) class Setting(Model): @@ -20672,16 +21041,16 @@ class Setting(Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__(self, **kwargs): super(Setting, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) + self.type = kwargs.get("type", "ClearText") + self.name = kwargs.get("name", None) + self.value = kwargs.get("value", None) class SingletonPartitionInformation(PartitionInformation): @@ -20702,17 +21071,17 @@ class SingletonPartitionInformation(PartitionInformation): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, } def __init__(self, **kwargs): super(SingletonPartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = 'Singleton' + self.service_partition_kind = "Singleton" class SingletonPartitionSchemeDescription(PartitionSchemeDescription): @@ -20726,16 +21095,16 @@ class SingletonPartitionSchemeDescription(PartitionSchemeDescription): """ _validation = { - 'partition_scheme': {'required': True}, + "partition_scheme": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, } def __init__(self, **kwargs): super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' + self.partition_scheme = "Singleton" class StartClusterUpgradeDescription(Model): @@ -20808,36 +21177,44 @@ class StartClusterUpgradeDescription(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "sort_order": {"key": "SortOrder", "type": "str"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "enable_delta_health_evaluation": {"key": "EnableDeltaHealthEvaluation", "type": "bool"}, + "cluster_upgrade_health_policy": { + "key": "ClusterUpgradeHealthPolicy", + "type": "ClusterUpgradeHealthPolicyObject", + }, + "application_health_policy_map": {"key": "ApplicationHealthPolicyMap", "type": "ApplicationHealthPolicies"}, + "instance_close_delay_duration_in_seconds": {"key": "InstanceCloseDelayDurationInSeconds", "type": "long"}, } def __init__(self, **kwargs): super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) + self.code_version = kwargs.get("code_version", None) + self.config_version = kwargs.get("config_version", None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.rolling_upgrade_mode = kwargs.get("rolling_upgrade_mode", "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get( + "upgrade_replica_set_check_timeout_in_seconds", None + ) + self.force_restart = kwargs.get("force_restart", None) + self.sort_order = kwargs.get("sort_order", "Default") + self.monitoring_policy = kwargs.get("monitoring_policy", None) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) + self.enable_delta_health_evaluation = kwargs.get("enable_delta_health_evaluation", None) + self.cluster_upgrade_health_policy = kwargs.get("cluster_upgrade_health_policy", None) + self.application_health_policy_map = kwargs.get("application_health_policy_map", None) + self.instance_close_delay_duration_in_seconds = kwargs.get("instance_close_delay_duration_in_seconds", None) class StartedChaosEvent(ChaosEvent): @@ -20856,20 +21233,20 @@ class StartedChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "chaos_parameters": {"key": "ChaosParameters", "type": "ChaosParameters"}, } def __init__(self, **kwargs): super(StartedChaosEvent, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.kind = 'Started' + self.chaos_parameters = kwargs.get("chaos_parameters", None) + self.kind = "Started" class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): @@ -20925,53 +21302,53 @@ class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "replica_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "replica_instance_id": {"key": "ReplicaInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.replica_instance_id = kwargs.get('replica_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatefulReplicaHealthReportExpired' + self.replica_instance_id = kwargs.get("replica_instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "StatefulReplicaHealthReportExpired" class StatefulReplicaNewHealthReportEvent(ReplicaEvent): @@ -21027,53 +21404,53 @@ class StatefulReplicaNewHealthReportEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "replica_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "replica_instance_id": {"key": "ReplicaInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.replica_instance_id = kwargs.get('replica_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatefulReplicaNewHealthReport' + self.replica_instance_id = kwargs.get("replica_instance_id", None) + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "StatefulReplicaNewHealthReport" class StatefulServiceDescription(ServiceDescription): @@ -21197,65 +21574,68 @@ class StatefulServiceDescription(ServiceDescription): """ _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + "service_name": {"required": True}, + "service_type_name": {"required": True}, + "partition_description": {"required": True}, + "service_kind": {"required": True}, + "target_replica_set_size": {"required": True, "minimum": 1}, + "min_replica_set_size": {"required": True, "minimum": 1}, + "has_persisted_state": {"required": True}, + "replica_restart_wait_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "quorum_loss_wait_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "stand_by_replica_keep_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "service_placement_time_limit_seconds": {"maximum": 4294967295, "minimum": 0}, + "auxiliary_replica_count": {"minimum": 0}, + } + + _attribute_map = { + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "partition_description": {"key": "PartitionDescription", "type": "PartitionSchemeDescription"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "service_load_metrics": {"key": "ServiceLoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "is_default_move_cost_specified": {"key": "IsDefaultMoveCostSpecified", "type": "bool"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "tags_required_to_place": {"key": "TagsRequiredToPlace", "type": "NodeTagsDescription"}, + "tags_required_to_run": {"key": "TagsRequiredToRun", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "has_persisted_state": {"key": "HasPersistedState", "type": "bool"}, + "flags": {"key": "Flags", "type": "int"}, + "replica_restart_wait_duration_seconds": {"key": "ReplicaRestartWaitDurationSeconds", "type": "long"}, + "quorum_loss_wait_duration_seconds": {"key": "QuorumLossWaitDurationSeconds", "type": "long"}, + "stand_by_replica_keep_duration_seconds": {"key": "StandByReplicaKeepDurationSeconds", "type": "long"}, + "service_placement_time_limit_seconds": {"key": "ServicePlacementTimeLimitSeconds", "type": "long"}, + "drop_source_replica_on_move": {"key": "DropSourceReplicaOnMove", "type": "bool"}, + "replica_lifecycle_description": {"key": "ReplicaLifecycleDescription", "type": "ReplicaLifecycleDescription"}, + "auxiliary_replica_count": {"key": "AuxiliaryReplicaCount", "type": "int"}, } def __init__(self, **kwargs): super(StatefulServiceDescription, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.flags = kwargs.get('flags', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.service_kind = 'Stateful' + self.target_replica_set_size = kwargs.get("target_replica_set_size", None) + self.min_replica_set_size = kwargs.get("min_replica_set_size", None) + self.has_persisted_state = kwargs.get("has_persisted_state", None) + self.flags = kwargs.get("flags", None) + self.replica_restart_wait_duration_seconds = kwargs.get("replica_restart_wait_duration_seconds", None) + self.quorum_loss_wait_duration_seconds = kwargs.get("quorum_loss_wait_duration_seconds", None) + self.stand_by_replica_keep_duration_seconds = kwargs.get("stand_by_replica_keep_duration_seconds", None) + self.service_placement_time_limit_seconds = kwargs.get("service_placement_time_limit_seconds", None) + self.drop_source_replica_on_move = kwargs.get("drop_source_replica_on_move", None) + self.replica_lifecycle_description = kwargs.get("replica_lifecycle_description", None) + self.auxiliary_replica_count = kwargs.get("auxiliary_replica_count", None) + self.service_kind = "Stateful" class StatefulServiceInfo(ServiceInfo): @@ -21295,25 +21675,25 @@ class StatefulServiceInfo(ServiceInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "manifest_version": {"key": "ManifestVersion", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_status": {"key": "ServiceStatus", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "has_persisted_state": {"key": "HasPersistedState", "type": "bool"}, } def __init__(self, **kwargs): super(StatefulServiceInfo, self).__init__(**kwargs) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.service_kind = 'Stateful' + self.has_persisted_state = kwargs.get("has_persisted_state", None) + self.service_kind = "Stateful" class StatefulServicePartitionInfo(ServicePartitionInfo): @@ -21359,29 +21739,29 @@ class StatefulServicePartitionInfo(ServicePartitionInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_status": {"key": "PartitionStatus", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "long"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "long"}, + "auxiliary_replica_count": {"key": "AuxiliaryReplicaCount", "type": "long"}, + "last_quorum_loss_duration": {"key": "LastQuorumLossDuration", "type": "duration"}, + "primary_epoch": {"key": "PrimaryEpoch", "type": "Epoch"}, } def __init__(self, **kwargs): super(StatefulServicePartitionInfo, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) - self.primary_epoch = kwargs.get('primary_epoch', None) - self.service_kind = 'Stateful' + self.target_replica_set_size = kwargs.get("target_replica_set_size", None) + self.min_replica_set_size = kwargs.get("min_replica_set_size", None) + self.auxiliary_replica_count = kwargs.get("auxiliary_replica_count", None) + self.last_quorum_loss_duration = kwargs.get("last_quorum_loss_duration", None) + self.primary_epoch = kwargs.get("primary_epoch", None) + self.service_kind = "Stateful" class StatefulServiceReplicaHealth(ReplicaHealth): @@ -21423,23 +21803,23 @@ class StatefulServiceReplicaHealth(ReplicaHealth): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } def __init__(self, **kwargs): super(StatefulServiceReplicaHealth, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' + self.replica_id = kwargs.get("replica_id", None) + self.service_kind = "Stateful" class StatefulServiceReplicaHealthState(ReplicaHealthState): @@ -21470,20 +21850,20 @@ class StatefulServiceReplicaHealthState(ReplicaHealthState): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } def __init__(self, **kwargs): super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' + self.replica_id = kwargs.get("replica_id", None) + self.service_kind = "Stateful" class StatefulServiceReplicaInfo(ReplicaInfo): @@ -21525,25 +21905,25 @@ class StatefulServiceReplicaInfo(ReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "last_in_build_duration_in_seconds": {"key": "LastInBuildDurationInSeconds", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_role": {"key": "ReplicaRole", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } def __init__(self, **kwargs): super(StatefulServiceReplicaInfo, self).__init__(**kwargs) - self.replica_role = kwargs.get('replica_role', None) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' + self.replica_role = kwargs.get("replica_role", None) + self.replica_id = kwargs.get("replica_id", None) + self.service_kind = "Stateful" class StatefulServiceTypeDescription(ServiceTypeDescription): @@ -21582,24 +21962,27 @@ class StatefulServiceTypeDescription(ServiceTypeDescription): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "extensions": {"key": "Extensions", "type": "[ServiceTypeExtensionDescription]"}, + "kind": {"key": "Kind", "type": "str"}, + "has_persisted_state": {"key": "HasPersistedState", "type": "bool"}, } def __init__(self, **kwargs): super(StatefulServiceTypeDescription, self).__init__(**kwargs) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.kind = 'Stateful' + self.has_persisted_state = kwargs.get("has_persisted_state", None) + self.kind = "Stateful" class StatefulServiceUpdateDescription(ServiceUpdateDescription): @@ -21720,47 +22103,50 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): """ _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - 'auxiliary_replica_count': {'minimum': 0}, + "service_kind": {"required": True}, + "target_replica_set_size": {"minimum": 1}, + "min_replica_set_size": {"minimum": 1}, + "auxiliary_replica_count": {"minimum": 0}, } _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + "flags": {"key": "Flags", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "tags_for_placement": {"key": "TagsForPlacement", "type": "NodeTagsDescription"}, + "tags_for_running": {"key": "TagsForRunning", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "replica_restart_wait_duration_seconds": {"key": "ReplicaRestartWaitDurationSeconds", "type": "str"}, + "quorum_loss_wait_duration_seconds": {"key": "QuorumLossWaitDurationSeconds", "type": "str"}, + "stand_by_replica_keep_duration_seconds": {"key": "StandByReplicaKeepDurationSeconds", "type": "str"}, + "service_placement_time_limit_seconds": {"key": "ServicePlacementTimeLimitSeconds", "type": "str"}, + "drop_source_replica_on_move": {"key": "DropSourceReplicaOnMove", "type": "bool"}, + "replica_lifecycle_description": {"key": "ReplicaLifecycleDescription", "type": "ReplicaLifecycleDescription"}, + "auxiliary_replica_count": {"key": "AuxiliaryReplicaCount", "type": "int"}, } def __init__(self, **kwargs): super(StatefulServiceUpdateDescription, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.service_kind = 'Stateful' + self.target_replica_set_size = kwargs.get("target_replica_set_size", None) + self.min_replica_set_size = kwargs.get("min_replica_set_size", None) + self.replica_restart_wait_duration_seconds = kwargs.get("replica_restart_wait_duration_seconds", None) + self.quorum_loss_wait_duration_seconds = kwargs.get("quorum_loss_wait_duration_seconds", None) + self.stand_by_replica_keep_duration_seconds = kwargs.get("stand_by_replica_keep_duration_seconds", None) + self.service_placement_time_limit_seconds = kwargs.get("service_placement_time_limit_seconds", None) + self.drop_source_replica_on_move = kwargs.get("drop_source_replica_on_move", None) + self.replica_lifecycle_description = kwargs.get("replica_lifecycle_description", None) + self.auxiliary_replica_count = kwargs.get("auxiliary_replica_count", None) + self.service_kind = "Stateful" class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): @@ -21814,50 +22200,50 @@ class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatelessReplicaHealthReportExpired' + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "StatelessReplicaHealthReportExpired" class StatelessReplicaNewHealthReportEvent(ReplicaEvent): @@ -21911,50 +22297,50 @@ class StatelessReplicaNewHealthReportEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, } def __init__(self, **kwargs): super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatelessReplicaNewHealthReport' + self.source_id = kwargs.get("source_id", None) + self.property = kwargs.get("property", None) + self.health_state = kwargs.get("health_state", None) + self.time_to_live_ms = kwargs.get("time_to_live_ms", None) + self.sequence_number = kwargs.get("sequence_number", None) + self.description = kwargs.get("description", None) + self.remove_when_expired = kwargs.get("remove_when_expired", None) + self.source_utc_timestamp = kwargs.get("source_utc_timestamp", None) + self.kind = "StatelessReplicaNewHealthReport" class StatelessServiceDescription(ServiceDescription): @@ -22089,52 +22475,58 @@ class StatelessServiceDescription(ServiceDescription): """ _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + "service_name": {"required": True}, + "service_type_name": {"required": True}, + "partition_description": {"required": True}, + "service_kind": {"required": True}, + "instance_count": {"required": True, "minimum": -1}, + "instance_close_delay_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "instance_restart_wait_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + } + + _attribute_map = { + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "partition_description": {"key": "PartitionDescription", "type": "PartitionSchemeDescription"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "service_load_metrics": {"key": "ServiceLoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "is_default_move_cost_specified": {"key": "IsDefaultMoveCostSpecified", "type": "bool"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "tags_required_to_place": {"key": "TagsRequiredToPlace", "type": "NodeTagsDescription"}, + "tags_required_to_run": {"key": "TagsRequiredToRun", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_count": {"key": "InstanceCount", "type": "int"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "min_instance_percentage": {"key": "MinInstancePercentage", "type": "int"}, + "flags": {"key": "Flags", "type": "int"}, + "instance_close_delay_duration_seconds": {"key": "InstanceCloseDelayDurationSeconds", "type": "long"}, + "instance_lifecycle_description": { + "key": "InstanceLifecycleDescription", + "type": "InstanceLifecycleDescription", + }, + "instance_restart_wait_duration_seconds": {"key": "InstanceRestartWaitDurationSeconds", "type": "long"}, } def __init__(self, **kwargs): super(StatelessServiceDescription, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.flags = kwargs.get('flags', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - self.service_kind = 'Stateless' + self.instance_count = kwargs.get("instance_count", None) + self.min_instance_count = kwargs.get("min_instance_count", None) + self.min_instance_percentage = kwargs.get("min_instance_percentage", None) + self.flags = kwargs.get("flags", None) + self.instance_close_delay_duration_seconds = kwargs.get("instance_close_delay_duration_seconds", None) + self.instance_lifecycle_description = kwargs.get("instance_lifecycle_description", None) + self.instance_restart_wait_duration_seconds = kwargs.get("instance_restart_wait_duration_seconds", None) + self.service_kind = "Stateless" class StatelessServiceInfo(ServiceInfo): @@ -22172,23 +22564,23 @@ class StatelessServiceInfo(ServiceInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "manifest_version": {"key": "ManifestVersion", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_status": {"key": "ServiceStatus", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } def __init__(self, **kwargs): super(StatelessServiceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StatelessServiceInstanceHealth(ReplicaHealth): @@ -22228,23 +22620,23 @@ class StatelessServiceInstanceHealth(ReplicaHealth): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, } def __init__(self, **kwargs): super(StatelessServiceInstanceHealth, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' + self.instance_id = kwargs.get("instance_id", None) + self.service_kind = "Stateless" class StatelessServiceInstanceHealthState(ReplicaHealthState): @@ -22270,20 +22662,20 @@ class StatelessServiceInstanceHealthState(ReplicaHealthState): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } def __init__(self, **kwargs): super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateless' + self.replica_id = kwargs.get("replica_id", None) + self.service_kind = "Stateless" class StatelessServiceInstanceInfo(ReplicaInfo): @@ -22319,23 +22711,23 @@ class StatelessServiceInstanceInfo(ReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "last_in_build_duration_in_seconds": {"key": "LastInBuildDurationInSeconds", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, } def __init__(self, **kwargs): super(StatelessServiceInstanceInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' + self.instance_id = kwargs.get("instance_id", None) + self.service_kind = "Stateless" class StatelessServicePartitionInfo(ServicePartitionInfo): @@ -22383,25 +22775,25 @@ class StatelessServicePartitionInfo(ServicePartitionInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_status": {"key": "PartitionStatus", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_count": {"key": "InstanceCount", "type": "long"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "min_instance_percentage": {"key": "MinInstancePercentage", "type": "int"}, } def __init__(self, **kwargs): super(StatelessServicePartitionInfo, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.service_kind = 'Stateless' + self.instance_count = kwargs.get("instance_count", None) + self.min_instance_count = kwargs.get("min_instance_count", None) + self.min_instance_percentage = kwargs.get("min_instance_percentage", None) + self.service_kind = "Stateless" class StatelessServiceTypeDescription(ServiceTypeDescription): @@ -22441,24 +22833,27 @@ class StatelessServiceTypeDescription(ServiceTypeDescription): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "extensions": {"key": "Extensions", "type": "[ServiceTypeExtensionDescription]"}, + "kind": {"key": "Kind", "type": "str"}, + "use_implicit_host": {"key": "UseImplicitHost", "type": "bool"}, } def __init__(self, **kwargs): super(StatelessServiceTypeDescription, self).__init__(**kwargs) - self.use_implicit_host = kwargs.get('use_implicit_host', None) - self.kind = 'Stateless' + self.use_implicit_host = kwargs.get("use_implicit_host", None) + self.kind = "Stateless" class StatelessServiceUpdateDescription(ServiceUpdateDescription): @@ -22599,39 +22994,45 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): """ _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, + "service_kind": {"required": True}, + "instance_count": {"minimum": -1}, } _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + "flags": {"key": "Flags", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "tags_for_placement": {"key": "TagsForPlacement", "type": "NodeTagsDescription"}, + "tags_for_running": {"key": "TagsForRunning", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_count": {"key": "InstanceCount", "type": "int"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "min_instance_percentage": {"key": "MinInstancePercentage", "type": "int"}, + "instance_close_delay_duration_seconds": {"key": "InstanceCloseDelayDurationSeconds", "type": "str"}, + "instance_lifecycle_description": { + "key": "InstanceLifecycleDescription", + "type": "InstanceLifecycleDescription", + }, + "instance_restart_wait_duration_seconds": {"key": "InstanceRestartWaitDurationSeconds", "type": "str"}, } def __init__(self, **kwargs): super(StatelessServiceUpdateDescription, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - self.service_kind = 'Stateless' + self.instance_count = kwargs.get("instance_count", None) + self.min_instance_count = kwargs.get("min_instance_count", None) + self.min_instance_percentage = kwargs.get("min_instance_percentage", None) + self.instance_close_delay_duration_seconds = kwargs.get("instance_close_delay_duration_seconds", None) + self.instance_lifecycle_description = kwargs.get("instance_lifecycle_description", None) + self.instance_restart_wait_duration_seconds = kwargs.get("instance_restart_wait_duration_seconds", None) + self.service_kind = "Stateless" class StoppedChaosEvent(ChaosEvent): @@ -22651,20 +23052,20 @@ class StoppedChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } def __init__(self, **kwargs): super(StoppedChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'Stopped' + self.reason = kwargs.get("reason", None) + self.kind = "Stopped" class StringPropertyValue(PropertyValue): @@ -22679,19 +23080,19 @@ class StringPropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "str"}, } def __init__(self, **kwargs): super(StringPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'String' + self.data = kwargs.get("data", None) + self.kind = "String" class SuccessfulPropertyBatchInfo(PropertyBatchInfo): @@ -22710,18 +23111,18 @@ class SuccessfulPropertyBatchInfo(PropertyBatchInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + "kind": {"key": "Kind", "type": "str"}, + "properties": {"key": "Properties", "type": "{PropertyInfo}"}, } def __init__(self, **kwargs): super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'Successful' + self.properties = kwargs.get("properties", None) + self.kind = "Successful" class SystemApplicationHealthEvaluation(HealthEvaluation): @@ -22752,20 +23153,20 @@ class SystemApplicationHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'SystemApplication' + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "SystemApplication" class TcpConfig(Model): @@ -22784,22 +23185,22 @@ class TcpConfig(Model): """ _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, + "name": {"required": True}, + "port": {"required": True}, + "destination": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + "name": {"key": "name", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "destination": {"key": "destination", "type": "GatewayDestination"}, } def __init__(self, **kwargs): super(TcpConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - self.destination = kwargs.get('destination', None) + self.name = kwargs.get("name", None) + self.port = kwargs.get("port", None) + self.destination = kwargs.get("destination", None) class TestErrorChaosEvent(ChaosEvent): @@ -22824,20 +23225,20 @@ class TestErrorChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } def __init__(self, **kwargs): super(TestErrorChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'TestError' + self.reason = kwargs.get("reason", None) + self.kind = "TestError" class TimeBasedBackupScheduleDescription(BackupScheduleDescription): @@ -22863,24 +23264,24 @@ class TimeBasedBackupScheduleDescription(BackupScheduleDescription): """ _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, + "schedule_kind": {"required": True}, + "schedule_frequency_type": {"required": True}, + "run_times": {"required": True}, } _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + "schedule_kind": {"key": "ScheduleKind", "type": "str"}, + "schedule_frequency_type": {"key": "ScheduleFrequencyType", "type": "str"}, + "run_days": {"key": "RunDays", "type": "[str]"}, + "run_times": {"key": "RunTimes", "type": "[iso-8601]"}, } def __init__(self, **kwargs): super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_frequency_type = kwargs.get('schedule_frequency_type', None) - self.run_days = kwargs.get('run_days', None) - self.run_times = kwargs.get('run_times', None) - self.schedule_kind = 'TimeBased' + self.schedule_frequency_type = kwargs.get("schedule_frequency_type", None) + self.run_days = kwargs.get("run_days", None) + self.run_times = kwargs.get("run_times", None) + self.schedule_kind = "TimeBased" class TimeOfDay(Model): @@ -22895,19 +23296,19 @@ class TimeOfDay(Model): """ _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, + "hour": {"maximum": 23, "minimum": 0}, + "minute": {"maximum": 59, "minimum": 0}, } _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, + "hour": {"key": "Hour", "type": "int"}, + "minute": {"key": "Minute", "type": "int"}, } def __init__(self, **kwargs): super(TimeOfDay, self).__init__(**kwargs) - self.hour = kwargs.get('hour', None) - self.minute = kwargs.get('minute', None) + self.hour = kwargs.get("hour", None) + self.minute = kwargs.get("minute", None) class TimeRange(Model): @@ -22922,14 +23323,14 @@ class TimeRange(Model): """ _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + "start_time": {"key": "StartTime", "type": "TimeOfDay"}, + "end_time": {"key": "EndTime", "type": "TimeOfDay"}, } def __init__(self, **kwargs): super(TimeRange, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) + self.start_time = kwargs.get("start_time", None) + self.end_time = kwargs.get("end_time", None) class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): @@ -22953,25 +23354,25 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): """ _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, + "partition_scheme": {"required": True}, + "count": {"required": True}, + "low_key": {"required": True}, + "high_key": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, + "count": {"key": "Count", "type": "int"}, + "low_key": {"key": "LowKey", "type": "str"}, + "high_key": {"key": "HighKey", "type": "str"}, } def __init__(self, **kwargs): super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - self.partition_scheme = 'UniformInt64Range' + self.count = kwargs.get("count", None) + self.low_key = kwargs.get("low_key", None) + self.high_key = kwargs.get("high_key", None) + self.partition_scheme = "UniformInt64Range" class UnplacedReplicaInformation(Model): @@ -22987,16 +23388,16 @@ class UnplacedReplicaInformation(Model): """ _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "unplaced_replica_details": {"key": "UnplacedReplicaDetails", "type": "[str]"}, } def __init__(self, **kwargs): super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) + self.service_name = kwargs.get("service_name", None) + self.partition_id = kwargs.get("partition_id", None) + self.unplaced_replica_details = kwargs.get("unplaced_replica_details", None) class UnprovisionApplicationTypeDescriptionInfo(Model): @@ -23018,18 +23419,18 @@ class UnprovisionApplicationTypeDescriptionInfo(Model): """ _validation = { - 'application_type_version': {'required': True}, + "application_type_version": {"required": True}, } _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "async_property": {"key": "Async", "type": "bool"}, } def __init__(self, **kwargs): super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = kwargs.get('application_type_version', None) - self.async_property = kwargs.get('async_property', None) + self.application_type_version = kwargs.get("application_type_version", None) + self.async_property = kwargs.get("async_property", None) class UnprovisionFabricDescription(Model): @@ -23042,14 +23443,14 @@ class UnprovisionFabricDescription(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, } def __init__(self, **kwargs): super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) + self.code_version = kwargs.get("code_version", None) + self.config_version = kwargs.get("config_version", None) class UpdateClusterUpgradeDescription(Model): @@ -23083,22 +23484,25 @@ class UpdateClusterUpgradeDescription(Model): """ _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "update_description": {"key": "UpdateDescription", "type": "RollingUpgradeUpdateDescription"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "enable_delta_health_evaluation": {"key": "EnableDeltaHealthEvaluation", "type": "bool"}, + "cluster_upgrade_health_policy": { + "key": "ClusterUpgradeHealthPolicy", + "type": "ClusterUpgradeHealthPolicyObject", + }, + "application_health_policy_map": {"key": "ApplicationHealthPolicyMap", "type": "ApplicationHealthPolicies"}, } def __init__(self, **kwargs): super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.update_description = kwargs.get('update_description', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.upgrade_kind = kwargs.get("upgrade_kind", "Rolling") + self.update_description = kwargs.get("update_description", None) + self.cluster_health_policy = kwargs.get("cluster_health_policy", None) + self.enable_delta_health_evaluation = kwargs.get("enable_delta_health_evaluation", None) + self.cluster_upgrade_health_policy = kwargs.get("cluster_upgrade_health_policy", None) + self.application_health_policy_map = kwargs.get("application_health_policy_map", None) class UpdatePartitionLoadResult(Model): @@ -23114,14 +23518,14 @@ class UpdatePartitionLoadResult(Model): """ _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "partition_error_code": {"key": "PartitionErrorCode", "type": "int"}, } def __init__(self, **kwargs): super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.partition_error_code = kwargs.get('partition_error_code', None) + self.partition_id = kwargs.get("partition_id", None) + self.partition_error_code = kwargs.get("partition_error_code", None) class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): @@ -23168,30 +23572,30 @@ class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, + "baseline_error_count": {"key": "BaselineErrorCount", "type": "long"}, + "baseline_total_count": {"key": "BaselineTotalCount", "type": "long"}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainDeltaNodesCheck' + self.upgrade_domain_name = kwargs.get("upgrade_domain_name", None) + self.baseline_error_count = kwargs.get("baseline_error_count", None) + self.baseline_total_count = kwargs.get("baseline_total_count", None) + self.max_percent_delta_unhealthy_nodes = kwargs.get("max_percent_delta_unhealthy_nodes", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "UpgradeDomainDeltaNodesCheck" class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): @@ -23232,26 +23636,31 @@ class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, + "max_percent_unhealthy_deployed_applications": { + "key": "MaxPercentUnhealthyDeployedApplications", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainDeployedApplications' + self.upgrade_domain_name = kwargs.get("upgrade_domain_name", None) + self.max_percent_unhealthy_deployed_applications = kwargs.get( + "max_percent_unhealthy_deployed_applications", None + ) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "UpgradeDomainDeployedApplications" class UpgradeDomainInfo(Model): @@ -23265,14 +23674,14 @@ class UpgradeDomainInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "state": {"key": "State", "type": "str"}, } def __init__(self, **kwargs): super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) + self.name = kwargs.get("name", None) + self.state = kwargs.get("state", None) class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): @@ -23311,26 +23720,26 @@ class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } def __init__(self, **kwargs): super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainNodes' + self.upgrade_domain_name = kwargs.get("upgrade_domain_name", None) + self.max_percent_unhealthy_nodes = kwargs.get("max_percent_unhealthy_nodes", None) + self.total_count = kwargs.get("total_count", None) + self.unhealthy_evaluations = kwargs.get("unhealthy_evaluations", None) + self.kind = "UpgradeDomainNodes" class UpgradeOrchestrationServiceState(Model): @@ -23342,12 +23751,12 @@ class UpgradeOrchestrationServiceState(Model): """ _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, + "service_state": {"key": "ServiceState", "type": "str"}, } def __init__(self, **kwargs): super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = kwargs.get('service_state', None) + self.service_state = kwargs.get("service_state", None) class UpgradeOrchestrationServiceStateSummary(Model): @@ -23369,20 +23778,20 @@ class UpgradeOrchestrationServiceStateSummary(Model): """ _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + "current_code_version": {"key": "CurrentCodeVersion", "type": "str"}, + "current_manifest_version": {"key": "CurrentManifestVersion", "type": "str"}, + "target_code_version": {"key": "TargetCodeVersion", "type": "str"}, + "target_manifest_version": {"key": "TargetManifestVersion", "type": "str"}, + "pending_upgrade_type": {"key": "PendingUpgradeType", "type": "str"}, } def __init__(self, **kwargs): super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = kwargs.get('current_code_version', None) - self.current_manifest_version = kwargs.get('current_manifest_version', None) - self.target_code_version = kwargs.get('target_code_version', None) - self.target_manifest_version = kwargs.get('target_manifest_version', None) - self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) + self.current_code_version = kwargs.get("current_code_version", None) + self.current_manifest_version = kwargs.get("current_manifest_version", None) + self.target_code_version = kwargs.get("target_code_version", None) + self.target_manifest_version = kwargs.get("target_manifest_version", None) + self.pending_upgrade_type = kwargs.get("pending_upgrade_type", None) class UpgradeUnitInfo(Model): @@ -23396,14 +23805,14 @@ class UpgradeUnitInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "state": {"key": "State", "type": "str"}, } def __init__(self, **kwargs): super(UpgradeUnitInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) + self.name = kwargs.get("name", None) + self.state = kwargs.get("state", None) class UploadChunkRange(Model): @@ -23418,14 +23827,14 @@ class UploadChunkRange(Model): """ _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, + "start_position": {"key": "StartPosition", "type": "str"}, + "end_position": {"key": "EndPosition", "type": "str"}, } def __init__(self, **kwargs): super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = kwargs.get('start_position', None) - self.end_position = kwargs.get('end_position', None) + self.start_position = kwargs.get("start_position", None) + self.end_position = kwargs.get("end_position", None) class UploadSession(Model): @@ -23439,12 +23848,12 @@ class UploadSession(Model): """ _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + "upload_sessions": {"key": "UploadSessions", "type": "[UploadSessionInfo]"}, } def __init__(self, **kwargs): super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = kwargs.get('upload_sessions', None) + self.upload_sessions = kwargs.get("upload_sessions", None) class UploadSessionInfo(Model): @@ -23468,20 +23877,20 @@ class UploadSessionInfo(Model): """ _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, + "session_id": {"key": "SessionId", "type": "str"}, + "modified_date": {"key": "ModifiedDate", "type": "iso-8601"}, + "file_size": {"key": "FileSize", "type": "str"}, + "expected_ranges": {"key": "ExpectedRanges", "type": "[UploadChunkRange]"}, } def __init__(self, **kwargs): super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.session_id = kwargs.get('session_id', None) - self.modified_date = kwargs.get('modified_date', None) - self.file_size = kwargs.get('file_size', None) - self.expected_ranges = kwargs.get('expected_ranges', None) + self.store_relative_path = kwargs.get("store_relative_path", None) + self.session_id = kwargs.get("session_id", None) + self.modified_date = kwargs.get("modified_date", None) + self.file_size = kwargs.get("file_size", None) + self.expected_ranges = kwargs.get("expected_ranges", None) class UsageInfo(Model): @@ -23495,14 +23904,14 @@ class UsageInfo(Model): """ _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, + "used_space": {"key": "UsedSpace", "type": "str"}, + "file_count": {"key": "FileCount", "type": "str"}, } def __init__(self, **kwargs): super(UsageInfo, self).__init__(**kwargs) - self.used_space = kwargs.get('used_space', None) - self.file_count = kwargs.get('file_count', None) + self.used_space = kwargs.get("used_space", None) + self.file_count = kwargs.get("file_count", None) class ValidateClusterUpgradeResult(Model): @@ -23519,14 +23928,14 @@ class ValidateClusterUpgradeResult(Model): """ _attribute_map = { - 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, - 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, + "service_host_upgrade_impact": {"key": "ServiceHostUpgradeImpact", "type": "str"}, + "validation_details": {"key": "ValidationDetails", "type": "str"}, } def __init__(self, **kwargs): super(ValidateClusterUpgradeResult, self).__init__(**kwargs) - self.service_host_upgrade_impact = kwargs.get('service_host_upgrade_impact', None) - self.validation_details = kwargs.get('validation_details', None) + self.service_host_upgrade_impact = kwargs.get("service_host_upgrade_impact", None) + self.validation_details = kwargs.get("validation_details", None) class ValidationFailedChaosEvent(ChaosEvent): @@ -23547,20 +23956,20 @@ class ValidationFailedChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } def __init__(self, **kwargs): super(ValidationFailedChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'ValidationFailed' + self.reason = kwargs.get("reason", None) + self.kind = "ValidationFailed" class VolumeProviderParametersAzureFile(Model): @@ -23580,21 +23989,21 @@ class VolumeProviderParametersAzureFile(Model): """ _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, + "account_name": {"required": True}, + "share_name": {"required": True}, } _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, + "account_name": {"key": "accountName", "type": "str"}, + "account_key": {"key": "accountKey", "type": "str"}, + "share_name": {"key": "shareName", "type": "str"}, } def __init__(self, **kwargs): super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.account_key = kwargs.get('account_key', None) - self.share_name = kwargs.get('share_name', None) + self.account_name = kwargs.get("account_name", None) + self.account_key = kwargs.get("account_key", None) + self.share_name = kwargs.get("share_name", None) class VolumeResourceDescription(Model): @@ -23625,30 +24034,30 @@ class VolumeResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, + "name": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "provider": {"required": True, "constant": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "provider": {"key": "properties.provider", "type": "str"}, + "azure_file_parameters": {"key": "properties.azureFileParameters", "type": "VolumeProviderParametersAzureFile"}, } provider = "SFAzureFile" def __init__(self, **kwargs): super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) + self.name = kwargs.get("name", None) + self.description = kwargs.get("description", None) self.status = None self.status_details = None - self.azure_file_parameters = kwargs.get('azure_file_parameters', None) + self.azure_file_parameters = kwargs.get("azure_file_parameters", None) class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): @@ -23667,17 +24076,17 @@ class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForInbuildReplica' + self.kind = "WaitForInbuildReplica" class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): @@ -23694,17 +24103,17 @@ class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimaryPlacement' + self.kind = "WaitForPrimaryPlacement" class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): @@ -23722,17 +24131,17 @@ class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimarySwap' + self.kind = "WaitForPrimarySwap" class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): @@ -23749,17 +24158,17 @@ class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } def __init__(self, **kwargs): super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForReconfiguration' + self.kind = "WaitForReconfiguration" class WaitingChaosEvent(ChaosEvent): @@ -23780,17 +24189,17 @@ class WaitingChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } def __init__(self, **kwargs): super(WaitingChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'Waiting' + self.reason = kwargs.get("reason", None) + self.kind = "Waiting" diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py index eeb7c8ea74f8..e9b7c15336f0 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py @@ -31,15 +31,25 @@ class AadMetadata(Model): """ _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None: + "authority": {"key": "authority", "type": "str"}, + "client": {"key": "client", "type": "str"}, + "cluster": {"key": "cluster", "type": "str"}, + "login": {"key": "login", "type": "str"}, + "redirect": {"key": "redirect", "type": "str"}, + "tenant": {"key": "tenant", "type": "str"}, + } + + def __init__( + self, + *, + authority: str = None, + client: str = None, + cluster: str = None, + login: str = None, + redirect: str = None, + tenant: str = None, + **kwargs + ) -> None: super(AadMetadata, self).__init__(**kwargs) self.authority = authority self.client = client @@ -61,11 +71,11 @@ class AadMetadataObject(Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + "type": {"key": "type", "type": "str"}, + "metadata": {"key": "metadata", "type": "AadMetadata"}, } - def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None: + def __init__(self, *, type: str = None, metadata=None, **kwargs) -> None: super(AadMetadataObject, self).__init__(**kwargs) self.type = type self.metadata = metadata @@ -85,15 +95,18 @@ class ScalingMechanismDescription(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} + "kind": { + "PartitionInstanceCount": "PartitionInstanceCountScaleMechanism", + "AddRemoveIncrementalNamedPartition": "AddRemoveIncrementalNamedPartitionScalingMechanism", + } } def __init__(self, **kwargs) -> None: @@ -121,17 +134,17 @@ class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescrip """ _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, + "kind": {"required": True}, + "min_partition_count": {"required": True}, + "max_partition_count": {"required": True}, + "scale_increment": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + "kind": {"key": "Kind", "type": "str"}, + "min_partition_count": {"key": "MinPartitionCount", "type": "int"}, + "max_partition_count": {"key": "MaxPartitionCount", "type": "int"}, + "scale_increment": {"key": "ScaleIncrement", "type": "int"}, } def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None: @@ -139,7 +152,7 @@ def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_ self.min_partition_count = min_partition_count self.max_partition_count = max_partition_count self.scale_increment = scale_increment - self.kind = 'AddRemoveIncrementalNamedPartition' + self.kind = "AddRemoveIncrementalNamedPartition" class AutoScalingMechanism(Model): @@ -156,16 +169,14 @@ class AutoScalingMechanism(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } + _subtype_map = {"kind": {"AddRemoveReplica": "AddRemoveReplicaScalingMechanism"}} def __init__(self, **kwargs) -> None: super(AutoScalingMechanism, self).__init__(**kwargs) @@ -192,17 +203,17 @@ class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): """ _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, + "kind": {"required": True}, + "min_count": {"required": True}, + "max_count": {"required": True}, + "scale_increment": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + "kind": {"key": "kind", "type": "str"}, + "min_count": {"key": "minCount", "type": "int"}, + "max_count": {"key": "maxCount", "type": "int"}, + "scale_increment": {"key": "scaleIncrement", "type": "int"}, } def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kwargs) -> None: @@ -210,7 +221,7 @@ def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kw self.min_count = min_count self.max_count = max_count self.scale_increment = scale_increment - self.kind = 'AddRemoveReplica' + self.kind = "AddRemoveReplica" class AnalysisEventMetadata(Model): @@ -223,8 +234,8 @@ class AnalysisEventMetadata(Model): """ _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, + "delay": {"key": "Delay", "type": "duration"}, + "duration": {"key": "Duration", "type": "duration"}, } def __init__(self, *, delay=None, duration=None, **kwargs) -> None: @@ -257,21 +268,25 @@ class BackupConfigurationInfo(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} + "kind": { + "Application": "ApplicationBackupConfigurationInfo", + "Service": "ServiceBackupConfigurationInfo", + "Partition": "PartitionBackupConfigurationInfo", + } } - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, **kwargs) -> None: + def __init__(self, *, policy_name: str = None, policy_inherited_from=None, suspension_info=None, **kwargs) -> None: super(BackupConfigurationInfo, self).__init__(**kwargs) self.policy_name = policy_name self.policy_inherited_from = policy_inherited_from @@ -304,21 +319,34 @@ class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, } - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None: - super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + def __init__( + self, + *, + policy_name: str = None, + policy_inherited_from=None, + suspension_info=None, + application_name: str = None, + **kwargs + ) -> None: + super(ApplicationBackupConfigurationInfo, self).__init__( + policy_name=policy_name, + policy_inherited_from=policy_inherited_from, + suspension_info=suspension_info, + **kwargs + ) self.application_name = application_name - self.kind = 'Application' + self.kind = "Application" class BackupEntity(Model): @@ -335,15 +363,19 @@ class BackupEntity(Model): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, } _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} + "entity_kind": { + "Application": "ApplicationBackupEntity", + "Service": "ServiceBackupEntity", + "Partition": "PartitionBackupEntity", + } } def __init__(self, **kwargs) -> None: @@ -364,18 +396,18 @@ class ApplicationBackupEntity(BackupEntity): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, } - def __init__(self, *, application_name: str=None, **kwargs) -> None: + def __init__(self, *, application_name: str = None, **kwargs) -> None: super(ApplicationBackupEntity, self).__init__(**kwargs) self.application_name = application_name - self.entity_kind = 'Application' + self.entity_kind = "Application" class ApplicationCapacityDescription(Model): @@ -407,17 +439,19 @@ class ApplicationCapacityDescription(Model): """ _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, + "minimum_nodes": {"minimum": 0}, + "maximum_nodes": {"minimum": 0}, } _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + "minimum_nodes": {"key": "MinimumNodes", "type": "long"}, + "maximum_nodes": {"key": "MaximumNodes", "type": "long"}, + "application_metrics": {"key": "ApplicationMetrics", "type": "[ApplicationMetricDescription]"}, } - def __init__(self, *, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: + def __init__( + self, *, minimum_nodes: int = None, maximum_nodes: int = 0, application_metrics=None, **kwargs + ) -> None: super(ApplicationCapacityDescription, self).__init__(**kwargs) self.minimum_nodes = minimum_nodes self.maximum_nodes = maximum_nodes @@ -448,24 +482,34 @@ class FabricEvent(Model): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + "kind": { + "ApplicationEvent": "ApplicationEvent", + "ClusterEvent": "ClusterEvent", + "ContainerInstanceEvent": "ContainerInstanceEvent", + "NodeEvent": "NodeEvent", + "PartitionEvent": "PartitionEvent", + "ReplicaEvent": "ReplicaEvent", + "ServiceEvent": "ServiceEvent", + } + } + + def __init__( + self, *, event_instance_id: str, time_stamp, category: str = None, has_correlated_events: bool = None, **kwargs + ) -> None: super(FabricEvent, self).__init__(**kwargs) self.event_instance_id = event_instance_id self.category = category @@ -515,29 +559,61 @@ class ApplicationEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, } _subtype_map = { - 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "kind": { + "ApplicationCreated": "ApplicationCreatedEvent", + "ApplicationDeleted": "ApplicationDeletedEvent", + "ApplicationNewHealthReport": "ApplicationNewHealthReportEvent", + "ApplicationHealthReportExpired": "ApplicationHealthReportExpiredEvent", + "ApplicationUpgradeCompleted": "ApplicationUpgradeCompletedEvent", + "ApplicationUpgradeDomainCompleted": "ApplicationUpgradeDomainCompletedEvent", + "ApplicationUpgradeRollbackCompleted": "ApplicationUpgradeRollbackCompletedEvent", + "ApplicationUpgradeRollbackStarted": "ApplicationUpgradeRollbackStartedEvent", + "ApplicationUpgradeStarted": "ApplicationUpgradeStartedEvent", + "DeployedApplicationNewHealthReport": "DeployedApplicationNewHealthReportEvent", + "DeployedApplicationHealthReportExpired": "DeployedApplicationHealthReportExpiredEvent", + "ApplicationProcessExited": "ApplicationProcessExitedEvent", + "ApplicationContainerInstanceExited": "ApplicationContainerInstanceExitedEvent", + "DeployedServicePackageNewHealthReport": "DeployedServicePackageNewHealthReportEvent", + "DeployedServicePackageHealthReportExpired": "DeployedServicePackageHealthReportExpiredEvent", + "ChaosCodePackageRestartScheduled": "ChaosCodePackageRestartScheduledEvent", + } + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.application_id = application_id - self.kind = 'ApplicationEvent' + self.kind = "ApplicationEvent" class ApplicationContainerInstanceExitedEvent(ApplicationEvent): @@ -594,47 +670,75 @@ class ApplicationContainerInstanceExitedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, image_name: str, container_name: str, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_name": {"required": True}, + "service_package_name": {"required": True}, + "service_package_activation_id": {"required": True}, + "is_exclusive": {"required": True}, + "code_package_name": {"required": True}, + "entry_point_type": {"required": True}, + "image_name": {"required": True}, + "container_name": {"required": True}, + "host_id": {"required": True}, + "exit_code": {"required": True}, + "unexpected_termination": {"required": True}, + "start_time": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_package_name": {"key": "ServicePackageName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "is_exclusive": {"key": "IsExclusive", "type": "bool"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "entry_point_type": {"key": "EntryPointType", "type": "str"}, + "image_name": {"key": "ImageName", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, + "host_id": {"key": "HostId", "type": "str"}, + "exit_code": {"key": "ExitCode", "type": "long"}, + "unexpected_termination": {"key": "UnexpectedTermination", "type": "bool"}, + "start_time": {"key": "StartTime", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + service_name: str, + service_package_name: str, + service_package_activation_id: str, + is_exclusive: bool, + code_package_name: str, + entry_point_type: str, + image_name: str, + container_name: str, + host_id: str, + exit_code: int, + unexpected_termination: bool, + start_time, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationContainerInstanceExitedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.service_name = service_name self.service_package_name = service_package_name self.service_package_activation_id = service_package_activation_id @@ -647,7 +751,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, s self.exit_code = exit_code self.unexpected_termination = unexpected_termination self.start_time = start_time - self.kind = 'ApplicationContainerInstanceExited' + self.kind = "ApplicationContainerInstanceExited" class ApplicationCreatedEvent(ApplicationEvent): @@ -684,33 +788,52 @@ class ApplicationCreatedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, application_definition_kind: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "application_definition_kind": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "application_definition_kind": {"key": "ApplicationDefinitionKind", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + application_type_version: str, + application_definition_kind: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationCreatedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.application_type_version = application_type_version self.application_definition_kind = application_definition_kind - self.kind = 'ApplicationCreated' + self.kind = "ApplicationCreated" class ApplicationDeletedEvent(ApplicationEvent): @@ -745,30 +868,48 @@ class ApplicationDeletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + application_type_version: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationDeletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.application_type_version = application_type_version - self.kind = 'ApplicationDeleted' + self.kind = "ApplicationDeleted" class ApplicationDescription(Model): @@ -806,21 +947,34 @@ class ApplicationDescription(Model): """ _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, + "name": {"required": True}, + "type_name": {"required": True}, + "type_version": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "type_version": {"key": "TypeVersion", "type": "str"}, + "parameter_list": {"key": "ParameterList", "type": "[ApplicationParameter]"}, + "application_capacity": {"key": "ApplicationCapacity", "type": "ApplicationCapacityDescription"}, + "managed_application_identity": { + "key": "ManagedApplicationIdentity", + "type": "ManagedApplicationIdentityDescription", + }, } - def __init__(self, *, name: str, type_name: str, type_version: str, parameter_list=None, application_capacity=None, managed_application_identity=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + type_name: str, + type_version: str, + parameter_list=None, + application_capacity=None, + managed_application_identity=None, + **kwargs + ) -> None: super(ApplicationDescription, self).__init__(**kwargs) self.name = name self.type_name = type_name @@ -854,13 +1008,21 @@ class EntityHealth(Model): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, } - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, **kwargs) -> None: + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + **kwargs + ) -> None: super(EntityHealth, self).__init__(**kwargs) self.aggregated_health_state = aggregated_health_state self.health_events = health_events @@ -904,17 +1066,37 @@ class ApplicationHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, service_health_states=None, deployed_application_health_states=None, **kwargs) -> None: - super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + "service_health_states": {"key": "ServiceHealthStates", "type": "[ServiceHealthState]"}, + "deployed_application_health_states": { + "key": "DeployedApplicationHealthStates", + "type": "[DeployedApplicationHealthState]", + }, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + name: str = None, + service_health_states=None, + deployed_application_health_states=None, + **kwargs + ) -> None: + super(ApplicationHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.name = name self.service_health_states = service_health_states self.deployed_application_health_states = deployed_application_health_states @@ -955,20 +1137,43 @@ class HealthEvaluation(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, **kwargs) -> None: + "kind": { + "Application": "ApplicationHealthEvaluation", + "Applications": "ApplicationsHealthEvaluation", + "ApplicationTypeApplications": "ApplicationTypeApplicationsHealthEvaluation", + "DeltaNodesCheck": "DeltaNodesCheckHealthEvaluation", + "DeployedApplication": "DeployedApplicationHealthEvaluation", + "DeployedApplications": "DeployedApplicationsHealthEvaluation", + "DeployedServicePackage": "DeployedServicePackageHealthEvaluation", + "DeployedServicePackages": "DeployedServicePackagesHealthEvaluation", + "Event": "EventHealthEvaluation", + "Node": "NodeHealthEvaluation", + "Nodes": "NodesHealthEvaluation", + "Partition": "PartitionHealthEvaluation", + "Partitions": "PartitionsHealthEvaluation", + "Replica": "ReplicaHealthEvaluation", + "Replicas": "ReplicasHealthEvaluation", + "Service": "ServiceHealthEvaluation", + "Services": "ServicesHealthEvaluation", + "SystemApplication": "SystemApplicationHealthEvaluation", + "UpgradeDomainDeltaNodesCheck": "UpgradeDomainDeltaNodesCheckHealthEvaluation", + "UpgradeDomainDeployedApplications": "UpgradeDomainDeployedApplicationsHealthEvaluation", + "UpgradeDomainNodes": "UpgradeDomainNodesHealthEvaluation", + "NodeTypeNodes": "NodeTypeNodesHealthEvaluation", + } + } + + def __init__(self, *, aggregated_health_state=None, description: str = None, **kwargs) -> None: super(HealthEvaluation, self).__init__(**kwargs) self.aggregated_health_state = aggregated_health_state self.description = description @@ -1005,22 +1210,32 @@ class ApplicationHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + application_name: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ApplicationHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.application_name = application_name self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Application' + self.kind = "Application" class ApplicationHealthPolicies(Model): @@ -1035,7 +1250,10 @@ class ApplicationHealthPolicies(Model): """ _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "[ApplicationHealthPolicyMapItem]", + }, } def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: @@ -1073,13 +1291,30 @@ class ApplicationHealthPolicy(Model): """ _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_deployed_applications: int=0, default_service_type_health_policy=None, service_type_health_policy_map=None, **kwargs) -> None: + "consider_warning_as_error": {"key": "ConsiderWarningAsError", "type": "bool"}, + "max_percent_unhealthy_deployed_applications": { + "key": "MaxPercentUnhealthyDeployedApplications", + "type": "int", + }, + "default_service_type_health_policy": { + "key": "DefaultServiceTypeHealthPolicy", + "type": "ServiceTypeHealthPolicy", + }, + "service_type_health_policy_map": { + "key": "ServiceTypeHealthPolicyMap", + "type": "[ServiceTypeHealthPolicyMapItem]", + }, + } + + def __init__( + self, + *, + consider_warning_as_error: bool = False, + max_percent_unhealthy_deployed_applications: int = 0, + default_service_type_health_policy=None, + service_type_health_policy_map=None, + **kwargs + ) -> None: super(ApplicationHealthPolicy, self).__init__(**kwargs) self.consider_warning_as_error = consider_warning_as_error self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications @@ -1101,13 +1336,13 @@ class ApplicationHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "ApplicationHealthPolicy"}, } def __init__(self, *, key: str, value, **kwargs) -> None: @@ -1134,7 +1369,10 @@ class ApplicationHealthPolicyMapObject(Model): """ _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "[ApplicationHealthPolicyMapItem]", + }, } def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: @@ -1189,41 +1427,66 @@ class ApplicationHealthReportExpiredEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_instance_id = application_instance_id self.source_id = source_id self.property = property @@ -1233,7 +1496,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, a self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ApplicationHealthReportExpired' + self.kind = "ApplicationHealthReportExpired" class EntityHealthState(Model): @@ -1249,7 +1512,7 @@ class EntityHealthState(Model): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, } def __init__(self, *, aggregated_health_state=None, **kwargs) -> None: @@ -1273,11 +1536,11 @@ class ApplicationHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, name: str=None, **kwargs) -> None: + def __init__(self, *, aggregated_health_state=None, name: str = None, **kwargs) -> None: super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) self.name = name @@ -1293,7 +1556,7 @@ class EntityHealthStateChunk(Model): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, } def __init__(self, *, health_state=None, **kwargs) -> None: @@ -1330,14 +1593,26 @@ class ApplicationHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "service_health_state_chunks": {"key": "ServiceHealthStateChunks", "type": "ServiceHealthStateChunkList"}, + "deployed_application_health_state_chunks": { + "key": "DeployedApplicationHealthStateChunks", + "type": "DeployedApplicationHealthStateChunkList", + }, } - def __init__(self, *, health_state=None, application_name: str=None, application_type_name: str=None, service_health_state_chunks=None, deployed_application_health_state_chunks=None, **kwargs) -> None: + def __init__( + self, + *, + health_state=None, + application_name: str = None, + application_type_name: str = None, + service_health_state_chunks=None, + deployed_application_health_state_chunks=None, + **kwargs + ) -> None: super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.application_name = application_name self.application_type_name = application_type_name @@ -1355,10 +1630,10 @@ class EntityHealthStateChunkList(Model): """ _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, + "total_count": {"key": "TotalCount", "type": "long"}, } - def __init__(self, *, total_count: int=None, **kwargs) -> None: + def __init__(self, *, total_count: int = None, **kwargs) -> None: super(EntityHealthStateChunkList, self).__init__(**kwargs) self.total_count = total_count @@ -1377,11 +1652,11 @@ class ApplicationHealthStateChunkList(EntityHealthStateChunkList): """ _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + "total_count": {"key": "TotalCount", "type": "long"}, + "items": {"key": "Items", "type": "[ApplicationHealthStateChunk]"}, } - def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: + def __init__(self, *, total_count: int = None, items=None, **kwargs) -> None: super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) self.items = items @@ -1467,14 +1742,26 @@ class ApplicationHealthStateFilter(Model): """ _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + "application_name_filter": {"key": "ApplicationNameFilter", "type": "str"}, + "application_type_name_filter": {"key": "ApplicationTypeNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "service_filters": {"key": "ServiceFilters", "type": "[ServiceHealthStateFilter]"}, + "deployed_application_filters": { + "key": "DeployedApplicationFilters", + "type": "[DeployedApplicationHealthStateFilter]", + }, } - def __init__(self, *, application_name_filter: str=None, application_type_name_filter: str=None, health_state_filter: int=0, service_filters=None, deployed_application_filters=None, **kwargs) -> None: + def __init__( + self, + *, + application_name_filter: str = None, + application_type_name_filter: str = None, + health_state_filter: int = 0, + service_filters=None, + deployed_application_filters=None, + **kwargs + ) -> None: super(ApplicationHealthStateFilter, self).__init__(**kwargs) self.application_name_filter = application_name_filter self.application_type_name_filter = application_type_name_filter @@ -1525,18 +1812,34 @@ class ApplicationInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None: + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "type_version": {"key": "TypeVersion", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "parameters": {"key": "Parameters", "type": "[ApplicationParameter]"}, + "health_state": {"key": "HealthState", "type": "str"}, + "application_definition_kind": {"key": "ApplicationDefinitionKind", "type": "str"}, + "managed_application_identity": { + "key": "ManagedApplicationIdentity", + "type": "ManagedApplicationIdentityDescription", + }, + } + + def __init__( + self, + *, + id: str = None, + name: str = None, + type_name: str = None, + type_version: str = None, + status=None, + parameters=None, + health_state=None, + application_definition_kind=None, + managed_application_identity=None, + **kwargs + ) -> None: super(ApplicationInfo, self).__init__(**kwargs) self.id = id self.name = name @@ -1585,14 +1888,26 @@ class ApplicationLoadInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + "id": {"key": "Id", "type": "str"}, + "minimum_nodes": {"key": "MinimumNodes", "type": "long"}, + "maximum_nodes": {"key": "MaximumNodes", "type": "long"}, + "node_count": {"key": "NodeCount", "type": "long"}, + "application_load_metric_information": { + "key": "ApplicationLoadMetricInformation", + "type": "[ApplicationLoadMetricInformation]", + }, } - def __init__(self, *, id: str=None, minimum_nodes: int=None, maximum_nodes: int=None, node_count: int=None, application_load_metric_information=None, **kwargs) -> None: + def __init__( + self, + *, + id: str = None, + minimum_nodes: int = None, + maximum_nodes: int = None, + node_count: int = None, + application_load_metric_information=None, + **kwargs + ) -> None: super(ApplicationLoadInfo, self).__init__(**kwargs) self.id = id self.minimum_nodes = minimum_nodes @@ -1625,13 +1940,21 @@ class ApplicationLoadMetricInformation(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + "name": {"key": "Name", "type": "str"}, + "reservation_capacity": {"key": "ReservationCapacity", "type": "long"}, + "application_capacity": {"key": "ApplicationCapacity", "type": "long"}, + "application_load": {"key": "ApplicationLoad", "type": "long"}, } - def __init__(self, *, name: str=None, reservation_capacity: int=None, application_capacity: int=None, application_load: int=None, **kwargs) -> None: + def __init__( + self, + *, + name: str = None, + reservation_capacity: int = None, + application_capacity: int = None, + application_load: int = None, + **kwargs + ) -> None: super(ApplicationLoadMetricInformation, self).__init__(**kwargs) self.name = name self.reservation_capacity = reservation_capacity @@ -1683,13 +2006,21 @@ class ApplicationMetricDescription(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + "name": {"key": "Name", "type": "str"}, + "maximum_capacity": {"key": "MaximumCapacity", "type": "long"}, + "reservation_capacity": {"key": "ReservationCapacity", "type": "long"}, + "total_application_capacity": {"key": "TotalApplicationCapacity", "type": "long"}, } - def __init__(self, *, name: str=None, maximum_capacity: int=None, reservation_capacity: int=None, total_application_capacity: int=None, **kwargs) -> None: + def __init__( + self, + *, + name: str = None, + maximum_capacity: int = None, + reservation_capacity: int = None, + total_application_capacity: int = None, + **kwargs + ) -> None: super(ApplicationMetricDescription, self).__init__(**kwargs) self.name = name self.maximum_capacity = maximum_capacity @@ -1714,11 +2045,11 @@ class ApplicationNameInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, name: str = None, **kwargs) -> None: super(ApplicationNameInfo, self).__init__(**kwargs) self.id = id self.name = name @@ -1771,41 +2102,66 @@ class ApplicationNewHealthReportEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_instance_id = application_instance_id self.source_id = source_id self.property = property @@ -1815,7 +2171,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, a self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ApplicationNewHealthReport' + self.kind = "ApplicationNewHealthReport" class ApplicationParameter(Model): @@ -1831,13 +2187,13 @@ class ApplicationParameter(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "str"}, } def __init__(self, *, key: str, value: str, **kwargs) -> None: @@ -1900,47 +2256,75 @@ class ApplicationProcessExitedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, exe_name: str, process_id: int, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_name": {"required": True}, + "service_package_name": {"required": True}, + "service_package_activation_id": {"required": True}, + "is_exclusive": {"required": True}, + "code_package_name": {"required": True}, + "entry_point_type": {"required": True}, + "exe_name": {"required": True}, + "process_id": {"required": True}, + "host_id": {"required": True}, + "exit_code": {"required": True}, + "unexpected_termination": {"required": True}, + "start_time": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_package_name": {"key": "ServicePackageName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "is_exclusive": {"key": "IsExclusive", "type": "bool"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "entry_point_type": {"key": "EntryPointType", "type": "str"}, + "exe_name": {"key": "ExeName", "type": "str"}, + "process_id": {"key": "ProcessId", "type": "long"}, + "host_id": {"key": "HostId", "type": "str"}, + "exit_code": {"key": "ExitCode", "type": "long"}, + "unexpected_termination": {"key": "UnexpectedTermination", "type": "bool"}, + "start_time": {"key": "StartTime", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + service_name: str, + service_package_name: str, + service_package_activation_id: str, + is_exclusive: bool, + code_package_name: str, + entry_point_type: str, + exe_name: str, + process_id: int, + host_id: str, + exit_code: int, + unexpected_termination: bool, + start_time, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationProcessExitedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.service_name = service_name self.service_package_name = service_package_name self.service_package_activation_id = service_package_activation_id @@ -1953,7 +2337,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, s self.exit_code = exit_code self.unexpected_termination = unexpected_termination self.start_time = start_time - self.kind = 'ApplicationProcessExited' + self.kind = "ApplicationProcessExited" class ApplicationResourceDescription(Model): @@ -2000,29 +2384,39 @@ class ApplicationResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - } - - def __init__(self, *, name: str, description: str=None, services=None, diagnostics=None, debug_params: str=None, identity=None, **kwargs) -> None: + "name": {"required": True}, + "service_names": {"readonly": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "health_state": {"readonly": True}, + "unhealthy_evaluation": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "services": {"key": "properties.services", "type": "[ServiceResourceDescription]"}, + "diagnostics": {"key": "properties.diagnostics", "type": "DiagnosticsDescription"}, + "debug_params": {"key": "properties.debugParams", "type": "str"}, + "service_names": {"key": "properties.serviceNames", "type": "[str]"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "health_state": {"key": "properties.healthState", "type": "str"}, + "unhealthy_evaluation": {"key": "properties.unhealthyEvaluation", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityDescription"}, + } + + def __init__( + self, + *, + name: str, + description: str = None, + services=None, + diagnostics=None, + debug_params: str = None, + identity=None, + **kwargs + ) -> None: super(ApplicationResourceDescription, self).__init__(**kwargs) self.name = name self.description = description @@ -2088,20 +2482,38 @@ class ApplicationResourceUpgradeProgressInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, target_application_type_version: str=None, start_timestamp_utc: str=None, upgrade_state=None, percent_completed: str=None, service_upgrade_progress=None, rolling_upgrade_mode="Monitored", upgrade_duration: str="PT0H2M0S", application_upgrade_status_details: str=None, upgrade_replica_set_check_timeout_in_seconds: int=42949672925, failure_timestamp_utc: str=None, **kwargs) -> None: + "name": {"key": "Name", "type": "str"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "percent_completed": {"key": "PercentCompleted", "type": "str"}, + "service_upgrade_progress": {"key": "ServiceUpgradeProgress", "type": "[ServiceUpgradeProgress]"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_duration": {"key": "UpgradeDuration", "type": "str"}, + "application_upgrade_status_details": {"key": "ApplicationUpgradeStatusDetails", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + } + + def __init__( + self, + *, + name: str = None, + target_application_type_version: str = None, + start_timestamp_utc: str = None, + upgrade_state=None, + percent_completed: str = None, + service_upgrade_progress=None, + rolling_upgrade_mode="Monitored", + upgrade_duration: str = "PT0H2M0S", + application_upgrade_status_details: str = None, + upgrade_replica_set_check_timeout_in_seconds: int = 42949672925, + failure_timestamp_utc: str = None, + **kwargs + ) -> None: super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) self.name = name self.target_application_type_version = target_application_type_version @@ -2132,17 +2544,17 @@ class VolumeReference(Model): """ _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, + "name": {"required": True}, + "destination_path": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "read_only": {"key": "readOnly", "type": "bool"}, + "destination_path": {"key": "destinationPath", "type": "str"}, } - def __init__(self, *, name: str, destination_path: str, read_only: bool=None, **kwargs) -> None: + def __init__(self, *, name: str, destination_path: str, read_only: bool = None, **kwargs) -> None: super(VolumeReference, self).__init__(**kwargs) self.name = name self.read_only = read_only @@ -2169,20 +2581,24 @@ class ApplicationScopedVolume(VolumeReference): """ _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, + "name": {"required": True}, + "destination_path": {"required": True}, + "creation_parameters": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + "name": {"key": "name", "type": "str"}, + "read_only": {"key": "readOnly", "type": "bool"}, + "destination_path": {"key": "destinationPath", "type": "str"}, + "creation_parameters": {"key": "creationParameters", "type": "ApplicationScopedVolumeCreationParameters"}, } - def __init__(self, *, name: str, destination_path: str, creation_parameters, read_only: bool=None, **kwargs) -> None: - super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) + def __init__( + self, *, name: str, destination_path: str, creation_parameters, read_only: bool = None, **kwargs + ) -> None: + super(ApplicationScopedVolume, self).__init__( + name=name, read_only=read_only, destination_path=destination_path, **kwargs + ) self.creation_parameters = creation_parameters @@ -2202,19 +2618,19 @@ class ApplicationScopedVolumeCreationParameters(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + "kind": {"ServiceFabricVolumeDisk": "ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk"} } - def __init__(self, *, description: str=None, **kwargs) -> None: + def __init__(self, *, description: str = None, **kwargs) -> None: super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) self.description = description self.kind = None @@ -2236,20 +2652,22 @@ class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(Applicati """ _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, + "kind": {"required": True}, + "size_disk": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "size_disk": {"key": "sizeDisk", "type": "str"}, } - def __init__(self, *, size_disk, description: str=None, **kwargs) -> None: - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) + def __init__(self, *, size_disk, description: str = None, **kwargs) -> None: + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__( + description=description, **kwargs + ) self.size_disk = size_disk - self.kind = 'ServiceFabricVolumeDisk' + self.kind = "ServiceFabricVolumeDisk" class ApplicationsHealthEvaluation(HealthEvaluation): @@ -2283,24 +2701,35 @@ class ApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + max_percent_unhealthy_applications: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ApplicationsHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.max_percent_unhealthy_applications = max_percent_unhealthy_applications self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Applications' + self.kind = "Applications" class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): @@ -2343,26 +2772,38 @@ class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, application_type_name: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + application_type_name: str = None, + max_percent_unhealthy_applications: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.application_type_name = application_type_name self.max_percent_unhealthy_applications = max_percent_unhealthy_applications self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'ApplicationTypeApplications' + self.kind = "ApplicationTypeApplications" class ApplicationTypeHealthPolicyMapItem(Model): @@ -2381,13 +2822,13 @@ class ApplicationTypeHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "int"}, } def __init__(self, *, key: str, value: int, **kwargs) -> None: @@ -2408,11 +2849,11 @@ class ApplicationTypeImageStorePath(Model): """ _validation = { - 'application_type_build_path': {'required': True}, + "application_type_build_path": {"required": True}, } _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + "application_type_build_path": {"key": "ApplicationTypeBuildPath", "type": "str"}, } def __init__(self, *, application_type_build_path: str, **kwargs) -> None: @@ -2448,15 +2889,25 @@ class ApplicationTypeInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "default_parameter_list": {"key": "DefaultParameterList", "type": "[ApplicationParameter]"}, + "status": {"key": "Status", "type": "str"}, + "status_details": {"key": "StatusDetails", "type": "str"}, + "application_type_definition_kind": {"key": "ApplicationTypeDefinitionKind", "type": "str"}, } - def __init__(self, *, name: str=None, version: str=None, default_parameter_list=None, status=None, status_details: str=None, application_type_definition_kind=None, **kwargs) -> None: + def __init__( + self, + *, + name: str = None, + version: str = None, + default_parameter_list=None, + status=None, + status_details: str = None, + application_type_definition_kind=None, + **kwargs + ) -> None: super(ApplicationTypeInfo, self).__init__(**kwargs) self.name = name self.version = version @@ -2475,10 +2926,10 @@ class ApplicationTypeManifest(Model): """ _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, + "manifest": {"key": "Manifest", "type": "str"}, } - def __init__(self, *, manifest: str=None, **kwargs) -> None: + def __init__(self, *, manifest: str = None, **kwargs) -> None: super(ApplicationTypeManifest, self).__init__(**kwargs) self.manifest = manifest @@ -2529,19 +2980,28 @@ class ApplicationUpdateDescription(Model): """ _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, + "minimum_nodes": {"minimum": 0}, + "maximum_nodes": {"minimum": 0}, } _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + "flags": {"key": "Flags", "type": "str"}, + "remove_application_capacity": {"key": "RemoveApplicationCapacity", "type": "bool"}, + "minimum_nodes": {"key": "MinimumNodes", "type": "long"}, + "maximum_nodes": {"key": "MaximumNodes", "type": "long"}, + "application_metrics": {"key": "ApplicationMetrics", "type": "[ApplicationMetricDescription]"}, } - def __init__(self, *, flags: str=None, remove_application_capacity: bool=False, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: + def __init__( + self, + *, + flags: str = None, + remove_application_capacity: bool = False, + minimum_nodes: int = None, + maximum_nodes: int = 0, + application_metrics=None, + **kwargs + ) -> None: super(ApplicationUpdateDescription, self).__init__(**kwargs) self.flags = flags self.remove_application_capacity = remove_application_capacity @@ -2585,33 +3045,52 @@ class ApplicationUpgradeCompletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + application_type_version: str, + overall_upgrade_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationUpgradeCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.application_type_version = application_type_version self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeCompleted' + self.kind = "ApplicationUpgradeCompleted" class ApplicationUpgradeDescription(Model): @@ -2691,27 +3170,49 @@ class ApplicationUpgradeDescription(Model): """ _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, managed_application_identity=None, **kwargs) -> None: + "name": {"required": True}, + "target_application_type_version": {"required": True}, + "upgrade_kind": {"required": True}, + } + + _attribute_map = { + "name": {"key": "Name", "type": "str"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "parameters": {"key": "Parameters", "type": "[ApplicationParameter]"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "sort_order": {"key": "SortOrder", "type": "str"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + "instance_close_delay_duration_in_seconds": {"key": "InstanceCloseDelayDurationInSeconds", "type": "long"}, + "managed_application_identity": { + "key": "ManagedApplicationIdentity", + "type": "ManagedApplicationIdentityDescription", + }, + } + + def __init__( + self, + *, + name: str, + target_application_type_version: str, + parameters=None, + upgrade_kind="Rolling", + rolling_upgrade_mode="UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: int = None, + force_restart: bool = None, + sort_order="Default", + monitoring_policy=None, + application_health_policy=None, + instance_close_delay_duration_in_seconds: int = None, + managed_application_identity=None, + **kwargs + ) -> None: super(ApplicationUpgradeDescription, self).__init__(**kwargs) self.name = name self.target_application_type_version = target_application_type_version @@ -2770,42 +3271,64 @@ class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "current_application_type_version": {"required": True}, + "application_type_version": {"required": True}, + "upgrade_state": {"required": True}, + "upgrade_domains": {"required": True}, + "upgrade_domain_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "current_application_type_version": {"key": "CurrentApplicationTypeVersion", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "str"}, + "upgrade_domain_elapsed_time_in_ms": {"key": "UpgradeDomainElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + current_application_type_version: str, + application_type_version: str, + upgrade_state: str, + upgrade_domains: str, + upgrade_domain_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationUpgradeDomainCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.current_application_type_version = current_application_type_version self.application_type_version = application_type_version self.upgrade_state = upgrade_state self.upgrade_domains = upgrade_domains self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeDomainCompleted' + self.kind = "ApplicationUpgradeDomainCompleted" class ApplicationUpgradeProgressInfo(Model): @@ -2892,29 +3415,62 @@ class ApplicationUpgradeProgressInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__(self, *, name: str=None, type_name: str=None, target_application_type_version: str=None, upgrade_domains=None, upgrade_units=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, current_upgrade_units_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, upgrade_status_details: str=None, is_node_by_node: bool=False, **kwargs) -> None: + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "[UpgradeDomainInfo]"}, + "upgrade_units": {"key": "UpgradeUnits", "type": "[UpgradeUnitInfo]"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "next_upgrade_domain": {"key": "NextUpgradeDomain", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_description": {"key": "UpgradeDescription", "type": "ApplicationUpgradeDescription"}, + "upgrade_duration_in_milliseconds": {"key": "UpgradeDurationInMilliseconds", "type": "str"}, + "upgrade_domain_duration_in_milliseconds": {"key": "UpgradeDomainDurationInMilliseconds", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "current_upgrade_domain_progress": { + "key": "CurrentUpgradeDomainProgress", + "type": "CurrentUpgradeDomainProgressInfo", + }, + "current_upgrade_units_progress": { + "key": "CurrentUpgradeUnitsProgress", + "type": "CurrentUpgradeUnitsProgressInfo", + }, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "upgrade_domain_progress_at_failure": { + "key": "UpgradeDomainProgressAtFailure", + "type": "FailureUpgradeDomainProgressInfo", + }, + "upgrade_status_details": {"key": "UpgradeStatusDetails", "type": "str"}, + "is_node_by_node": {"key": "IsNodeByNode", "type": "bool"}, + } + + def __init__( + self, + *, + name: str = None, + type_name: str = None, + target_application_type_version: str = None, + upgrade_domains=None, + upgrade_units=None, + upgrade_state=None, + next_upgrade_domain: str = None, + rolling_upgrade_mode="UnmonitoredAuto", + upgrade_description=None, + upgrade_duration_in_milliseconds: str = None, + upgrade_domain_duration_in_milliseconds: str = None, + unhealthy_evaluations=None, + current_upgrade_domain_progress=None, + current_upgrade_units_progress=None, + start_timestamp_utc: str = None, + failure_timestamp_utc: str = None, + failure_reason=None, + upgrade_domain_progress_at_failure=None, + upgrade_status_details: str = None, + is_node_by_node: bool = False, + **kwargs + ) -> None: super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) self.name = name self.type_name = type_name @@ -2975,36 +3531,56 @@ class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + application_type_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.application_type_version = application_type_version self.failure_reason = failure_reason self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeRollbackCompleted' + self.kind = "ApplicationUpgradeRollbackCompleted" class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): @@ -3048,39 +3624,60 @@ class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "current_application_type_version": {"required": True}, + "application_type_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "current_application_type_version": {"key": "CurrentApplicationTypeVersion", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + current_application_type_version: str, + application_type_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationUpgradeRollbackStartedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.current_application_type_version = current_application_type_version self.application_type_version = application_type_version self.failure_reason = failure_reason self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeRollbackStarted' + self.kind = "ApplicationUpgradeRollbackStarted" class ApplicationUpgradeStartedEvent(ApplicationEvent): @@ -3125,42 +3722,64 @@ class ApplicationUpgradeStartedEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_type_name": {"required": True}, + "current_application_type_version": {"required": True}, + "application_type_version": {"required": True}, + "upgrade_type": {"required": True}, + "rolling_upgrade_mode": {"required": True}, + "failure_action": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "current_application_type_version": {"key": "CurrentApplicationTypeVersion", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "upgrade_type": {"key": "UpgradeType", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "failure_action": {"key": "FailureAction", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_type_name: str, + current_application_type_version: str, + application_type_version: str, + upgrade_type: str, + rolling_upgrade_mode: str, + failure_action: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ApplicationUpgradeStartedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_type_name = application_type_name self.current_application_type_version = current_application_type_version self.application_type_version = application_type_version self.upgrade_type = upgrade_type self.rolling_upgrade_mode = rolling_upgrade_mode self.failure_action = failure_action - self.kind = 'ApplicationUpgradeStarted' + self.kind = "ApplicationUpgradeStarted" class ApplicationUpgradeUpdateDescription(Model): @@ -3186,18 +3805,20 @@ class ApplicationUpgradeUpdateDescription(Model): """ _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, + "name": {"required": True}, + "upgrade_kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + "name": {"key": "Name", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + "update_description": {"key": "UpdateDescription", "type": "RollingUpgradeUpdateDescription"}, } - def __init__(self, *, name: str, upgrade_kind="Rolling", application_health_policy=None, update_description=None, **kwargs) -> None: + def __init__( + self, *, name: str, upgrade_kind="Rolling", application_health_policy=None, update_description=None, **kwargs + ) -> None: super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) self.name = name self.upgrade_kind = upgrade_kind @@ -3219,16 +3840,14 @@ class AutoScalingMetric(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } + _subtype_map = {"kind": {"Resource": "AutoScalingResourceMetric"}} def __init__(self, **kwargs) -> None: super(AutoScalingMetric, self).__init__(**kwargs) @@ -3251,15 +3870,15 @@ class AutoScalingPolicy(Model): """ _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, + "name": {"required": True}, + "trigger": {"required": True}, + "mechanism": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + "name": {"key": "name", "type": "str"}, + "trigger": {"key": "trigger", "type": "AutoScalingTrigger"}, + "mechanism": {"key": "mechanism", "type": "AutoScalingMechanism"}, } def __init__(self, *, name: str, trigger, mechanism, **kwargs) -> None: @@ -3283,19 +3902,19 @@ class AutoScalingResourceMetric(AutoScalingMetric): """ _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, + "kind": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "name": {"key": "name", "type": "str"}, } def __init__(self, *, name, **kwargs) -> None: super(AutoScalingResourceMetric, self).__init__(**kwargs) self.name = name - self.kind = 'Resource' + self.kind = "Resource" class AutoScalingTrigger(Model): @@ -3311,16 +3930,14 @@ class AutoScalingTrigger(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } + _subtype_map = {"kind": {"AverageLoad": "AverageLoadScalingTrigger"}} def __init__(self, **kwargs) -> None: super(AutoScalingTrigger, self).__init__(**kwargs) @@ -3349,28 +3966,36 @@ class AverageLoadScalingTrigger(AutoScalingTrigger): """ _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + "kind": {"required": True}, + "metric": {"required": True}, + "lower_load_threshold": {"required": True}, + "upper_load_threshold": {"required": True}, + "scale_interval_in_seconds": {"required": True, "minimum": 60}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + "kind": {"key": "kind", "type": "str"}, + "metric": {"key": "metric", "type": "AutoScalingMetric"}, + "lower_load_threshold": {"key": "lowerLoadThreshold", "type": "float"}, + "upper_load_threshold": {"key": "upperLoadThreshold", "type": "float"}, + "scale_interval_in_seconds": {"key": "scaleIntervalInSeconds", "type": "int"}, } - def __init__(self, *, metric, lower_load_threshold: float, upper_load_threshold: float, scale_interval_in_seconds: int, **kwargs) -> None: + def __init__( + self, + *, + metric, + lower_load_threshold: float, + upper_load_threshold: float, + scale_interval_in_seconds: int, + **kwargs + ) -> None: super(AverageLoadScalingTrigger, self).__init__(**kwargs) self.metric = metric self.lower_load_threshold = lower_load_threshold self.upper_load_threshold = upper_load_threshold self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AverageLoad' + self.kind = "AverageLoad" class ScalingTriggerDescription(Model): @@ -3387,15 +4012,18 @@ class ScalingTriggerDescription(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + "kind": { + "AveragePartitionLoad": "AveragePartitionLoadScalingTrigger", + "AverageServiceLoad": "AverageServiceLoadScalingTrigger", + } } def __init__(self, **kwargs) -> None: @@ -3426,28 +4054,36 @@ class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): """ _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + "kind": {"required": True}, + "metric_name": {"required": True}, + "lower_load_threshold": {"required": True}, + "upper_load_threshold": {"required": True}, + "scale_interval_in_seconds": {"required": True, "maximum": 4294967295, "minimum": 0}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + "kind": {"key": "Kind", "type": "str"}, + "metric_name": {"key": "MetricName", "type": "str"}, + "lower_load_threshold": {"key": "LowerLoadThreshold", "type": "str"}, + "upper_load_threshold": {"key": "UpperLoadThreshold", "type": "str"}, + "scale_interval_in_seconds": {"key": "ScaleIntervalInSeconds", "type": "long"}, } - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, **kwargs) -> None: + def __init__( + self, + *, + metric_name: str, + lower_load_threshold: str, + upper_load_threshold: str, + scale_interval_in_seconds: int, + **kwargs + ) -> None: super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) self.metric_name = metric_name self.lower_load_threshold = lower_load_threshold self.upper_load_threshold = upper_load_threshold self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AveragePartitionLoad' + self.kind = "AveragePartitionLoad" class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): @@ -3480,31 +4116,40 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): """ _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, + "kind": {"required": True}, + "metric_name": {"required": True}, + "lower_load_threshold": {"required": True}, + "upper_load_threshold": {"required": True}, + "scale_interval_in_seconds": {"required": True, "maximum": 4294967295, "minimum": 0}, + "use_only_primary_load": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + "kind": {"key": "Kind", "type": "str"}, + "metric_name": {"key": "MetricName", "type": "str"}, + "lower_load_threshold": {"key": "LowerLoadThreshold", "type": "str"}, + "upper_load_threshold": {"key": "UpperLoadThreshold", "type": "str"}, + "scale_interval_in_seconds": {"key": "ScaleIntervalInSeconds", "type": "long"}, + "use_only_primary_load": {"key": "UseOnlyPrimaryLoad", "type": "bool"}, } - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, use_only_primary_load: bool, **kwargs) -> None: + def __init__( + self, + *, + metric_name: str, + lower_load_threshold: str, + upper_load_threshold: str, + scale_interval_in_seconds: int, + use_only_primary_load: bool, + **kwargs + ) -> None: super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) self.metric_name = metric_name self.lower_load_threshold = lower_load_threshold self.upper_load_threshold = upper_load_threshold self.scale_interval_in_seconds = scale_interval_in_seconds self.use_only_primary_load = use_only_primary_load - self.kind = 'AverageServiceLoad' + self.kind = "AverageServiceLoad" class BackupStorageDescription(Model): @@ -3524,19 +4169,24 @@ class BackupStorageDescription(Model): """ _validation = { - 'storage_kind': {'required': True}, + "storage_kind": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, } _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + "storage_kind": { + "AzureBlobStore": "AzureBlobBackupStorageDescription", + "FileShare": "FileShareBackupStorageDescription", + "DsmsAzureBlobStore": "DsmsAzureBlobBackupStorageDescription", + "ManagedIdentityAzureBlobStore": "ManagedIdentityAzureBlobBackupStorageDescription", + } } - def __init__(self, *, friendly_name: str=None, **kwargs) -> None: + def __init__(self, *, friendly_name: str = None, **kwargs) -> None: super(BackupStorageDescription, self).__init__(**kwargs) self.friendly_name = friendly_name self.storage_kind = None @@ -3561,23 +4211,23 @@ class AzureBlobBackupStorageDescription(BackupStorageDescription): """ _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, + "storage_kind": {"required": True}, + "connection_string": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "connection_string": {"key": "ConnectionString", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, } - def __init__(self, *, connection_string: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + def __init__(self, *, connection_string: str, container_name: str, friendly_name: str = None, **kwargs) -> None: super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) self.connection_string = connection_string self.container_name = container_name - self.storage_kind = 'AzureBlobStore' + self.storage_kind = "AzureBlobStore" class DiagnosticsSinkProperties(Model): @@ -3598,20 +4248,18 @@ class DiagnosticsSinkProperties(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } + _subtype_map = {"kind": {"AzureInternalMonitoringPipeline": "AzureInternalMonitoringPipelineSinkDescription"}} - def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + def __init__(self, *, name: str = None, description: str = None, **kwargs) -> None: super(DiagnosticsSinkProperties, self).__init__(**kwargs) self.name = name self.description = description @@ -3645,28 +4293,41 @@ class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, + "account_name": {"key": "accountName", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "ma_config_url": {"key": "maConfigUrl", "type": "str"}, + "fluentd_config_url": {"key": "fluentdConfigUrl", "type": "str"}, + "auto_key_config_url": {"key": "autoKeyConfigUrl", "type": "str"}, } - def __init__(self, *, name: str=None, description: str=None, account_name: str=None, namespace: str=None, ma_config_url: str=None, fluentd_config_url: str=None, auto_key_config_url: str=None, **kwargs) -> None: - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) + def __init__( + self, + *, + name: str = None, + description: str = None, + account_name: str = None, + namespace: str = None, + ma_config_url: str = None, + fluentd_config_url: str = None, + auto_key_config_url: str = None, + **kwargs + ) -> None: + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__( + name=name, description=description, **kwargs + ) self.account_name = account_name self.namespace = namespace self.ma_config_url = ma_config_url self.fluentd_config_url = fluentd_config_url self.auto_key_config_url = auto_key_config_url - self.kind = 'AzureInternalMonitoringPipeline' + self.kind = "AzureInternalMonitoringPipeline" class BackupInfo(Model): @@ -3710,21 +4371,37 @@ class BackupInfo(Model): """ _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, backup_id: str=None, backup_chain_id: str=None, application_name: str=None, service_name: str=None, partition_information=None, backup_location: str=None, backup_type=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, creation_time_utc=None, service_manifest_version: str=None, failure_error=None, **kwargs) -> None: + "backup_id": {"key": "BackupId", "type": "str"}, + "backup_chain_id": {"key": "BackupChainId", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "backup_location": {"key": "BackupLocation", "type": "str"}, + "backup_type": {"key": "BackupType", "type": "str"}, + "epoch_of_last_backup_record": {"key": "EpochOfLastBackupRecord", "type": "Epoch"}, + "lsn_of_last_backup_record": {"key": "LsnOfLastBackupRecord", "type": "str"}, + "creation_time_utc": {"key": "CreationTimeUtc", "type": "iso-8601"}, + "service_manifest_version": {"key": "ServiceManifestVersion", "type": "str"}, + "failure_error": {"key": "FailureError", "type": "FabricErrorError"}, + } + + def __init__( + self, + *, + backup_id: str = None, + backup_chain_id: str = None, + application_name: str = None, + service_name: str = None, + partition_information=None, + backup_location: str = None, + backup_type=None, + epoch_of_last_backup_record=None, + lsn_of_last_backup_record: str = None, + creation_time_utc=None, + service_manifest_version: str = None, + failure_error=None, + **kwargs + ) -> None: super(BackupInfo, self).__init__(**kwargs) self.backup_id = backup_id self.backup_chain_id = backup_chain_id @@ -3749,7 +4426,7 @@ class BackupPartitionDescription(Model): """ _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + "backup_storage": {"key": "BackupStorage", "type": "BackupStorageDescription"}, } def __init__(self, *, backup_storage=None, **kwargs) -> None: @@ -3788,23 +4465,33 @@ class BackupPolicyDescription(Model): """ _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, + "name": {"required": True}, + "auto_restore_on_data_loss": {"required": True}, + "max_incremental_backups": {"required": True, "maximum": 255, "minimum": 0}, + "schedule": {"required": True}, + "storage": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + "name": {"key": "Name", "type": "str"}, + "auto_restore_on_data_loss": {"key": "AutoRestoreOnDataLoss", "type": "bool"}, + "max_incremental_backups": {"key": "MaxIncrementalBackups", "type": "int"}, + "schedule": {"key": "Schedule", "type": "BackupScheduleDescription"}, + "storage": {"key": "Storage", "type": "BackupStorageDescription"}, + "retention_policy": {"key": "RetentionPolicy", "type": "RetentionPolicyDescription"}, } - def __init__(self, *, name: str, auto_restore_on_data_loss: bool, max_incremental_backups: int, schedule, storage, retention_policy=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + auto_restore_on_data_loss: bool, + max_incremental_backups: int, + schedule, + storage, + retention_policy=None, + **kwargs + ) -> None: super(BackupPolicyDescription, self).__init__(**kwargs) self.name = name self.auto_restore_on_data_loss = auto_restore_on_data_loss @@ -3841,16 +4528,27 @@ class BackupProgressInfo(Model): """ _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, backup_state=None, time_stamp_utc=None, backup_id: str=None, backup_location: str=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, failure_error=None, **kwargs) -> None: + "backup_state": {"key": "BackupState", "type": "str"}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "backup_id": {"key": "BackupId", "type": "str"}, + "backup_location": {"key": "BackupLocation", "type": "str"}, + "epoch_of_last_backup_record": {"key": "EpochOfLastBackupRecord", "type": "Epoch"}, + "lsn_of_last_backup_record": {"key": "LsnOfLastBackupRecord", "type": "str"}, + "failure_error": {"key": "FailureError", "type": "FabricErrorError"}, + } + + def __init__( + self, + *, + backup_state=None, + time_stamp_utc=None, + backup_id: str = None, + backup_location: str = None, + epoch_of_last_backup_record=None, + lsn_of_last_backup_record: str = None, + failure_error=None, + **kwargs + ) -> None: super(BackupProgressInfo, self).__init__(**kwargs) self.backup_state = backup_state self.time_stamp_utc = time_stamp_utc @@ -3875,15 +4573,18 @@ class BackupScheduleDescription(Model): """ _validation = { - 'schedule_kind': {'required': True}, + "schedule_kind": {"required": True}, } _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + "schedule_kind": {"key": "ScheduleKind", "type": "str"}, } _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + "schedule_kind": { + "FrequencyBased": "FrequencyBasedBackupScheduleDescription", + "TimeBased": "TimeBasedBackupScheduleDescription", + } } def __init__(self, **kwargs) -> None: @@ -3905,11 +4606,11 @@ class BackupSuspensionInfo(Model): """ _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + "is_suspended": {"key": "IsSuspended", "type": "bool"}, + "suspension_inherited_from": {"key": "SuspensionInheritedFrom", "type": "str"}, } - def __init__(self, *, is_suspended: bool=None, suspension_inherited_from=None, **kwargs) -> None: + def __init__(self, *, is_suspended: bool = None, suspension_inherited_from=None, **kwargs) -> None: super(BackupSuspensionInfo, self).__init__(**kwargs) self.is_suspended = is_suspended self.suspension_inherited_from = suspension_inherited_from @@ -3928,16 +4629,14 @@ class RetentionPolicyDescription(Model): """ _validation = { - 'retention_policy_type': {'required': True}, + "retention_policy_type": {"required": True}, } _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + "retention_policy_type": {"key": "RetentionPolicyType", "type": "str"}, } - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } + _subtype_map = {"retention_policy_type": {"Basic": "BasicRetentionPolicyDescription"}} def __init__(self, **kwargs) -> None: super(RetentionPolicyDescription, self).__init__(**kwargs) @@ -3963,22 +4662,22 @@ class BasicRetentionPolicyDescription(RetentionPolicyDescription): """ _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, + "retention_policy_type": {"required": True}, + "retention_duration": {"required": True}, + "minimum_number_of_backups": {"minimum": 0}, } _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + "retention_policy_type": {"key": "RetentionPolicyType", "type": "str"}, + "retention_duration": {"key": "RetentionDuration", "type": "duration"}, + "minimum_number_of_backups": {"key": "MinimumNumberOfBackups", "type": "int"}, } - def __init__(self, *, retention_duration, minimum_number_of_backups: int=None, **kwargs) -> None: + def __init__(self, *, retention_duration, minimum_number_of_backups: int = None, **kwargs) -> None: super(BasicRetentionPolicyDescription, self).__init__(**kwargs) self.retention_duration = retention_duration self.minimum_number_of_backups = minimum_number_of_backups - self.retention_policy_type = 'Basic' + self.retention_policy_type = "Basic" class PropertyValue(Model): @@ -3995,15 +4694,21 @@ class PropertyValue(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} + "kind": { + "Binary": "BinaryPropertyValue", + "Int64": "Int64PropertyValue", + "Double": "DoublePropertyValue", + "String": "StringPropertyValue", + "Guid": "GuidPropertyValue", + } } def __init__(self, **kwargs) -> None: @@ -4024,19 +4729,19 @@ class BinaryPropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "[int]"}, } def __init__(self, *, data, **kwargs) -> None: super(BinaryPropertyValue, self).__init__(**kwargs) self.data = data - self.kind = 'Binary' + self.kind = "Binary" class Chaos(Model): @@ -4055,9 +4760,9 @@ class Chaos(Model): """ _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + "chaos_parameters": {"key": "ChaosParameters", "type": "ChaosParameters"}, + "status": {"key": "Status", "type": "str"}, + "schedule_status": {"key": "ScheduleStatus", "type": "str"}, } def __init__(self, *, chaos_parameters=None, status=None, schedule_status=None, **kwargs) -> None: @@ -4108,42 +4813,64 @@ class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, fault_group_id: str, fault_id: str, node_name: str, service_manifest_name: str, code_package_name: str, service_package_activation_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "node_name": {"required": True}, + "service_manifest_name": {"required": True}, + "code_package_name": {"required": True}, + "service_package_activation_id": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + fault_group_id: str, + fault_id: str, + node_name: str, + service_manifest_name: str, + code_package_name: str, + service_package_activation_id: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosCodePackageRestartScheduledEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.fault_group_id = fault_group_id self.fault_id = fault_id self.node_name = node_name self.service_manifest_name = service_manifest_name self.code_package_name = code_package_name self.service_package_activation_id = service_package_activation_id - self.kind = 'ChaosCodePackageRestartScheduled' + self.kind = "ChaosCodePackageRestartScheduled" class ChaosContext(Model): @@ -4160,7 +4887,7 @@ class ChaosContext(Model): """ _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, + "map": {"key": "Map", "type": "{str}"}, } def __init__(self, *, map=None, **kwargs) -> None: @@ -4186,17 +4913,24 @@ class ChaosEvent(Model): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + "kind": { + "ExecutingFaults": "ExecutingFaultsChaosEvent", + "Started": "StartedChaosEvent", + "Stopped": "StoppedChaosEvent", + "TestError": "TestErrorChaosEvent", + "ValidationFailed": "ValidationFailedChaosEvent", + "Waiting": "WaitingChaosEvent", + } } def __init__(self, *, time_stamp_utc, **kwargs) -> None: @@ -4221,11 +4955,11 @@ class ChaosEventsSegment(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "history": {"key": "History", "type": "[ChaosEventWrapper]"}, } - def __init__(self, *, continuation_token: str=None, history=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, history=None, **kwargs) -> None: super(ChaosEventsSegment, self).__init__(**kwargs) self.continuation_token = continuation_token self.history = history @@ -4239,7 +4973,7 @@ class ChaosEventWrapper(Model): """ _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + "chaos_event": {"key": "ChaosEvent", "type": "ChaosEvent"}, } def __init__(self, *, chaos_event=None, **kwargs) -> None: @@ -4276,29 +5010,58 @@ class NodeEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, } _subtype_map = { - 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "kind": { + "NodeAborted": "NodeAbortedEvent", + "NodeAddedToCluster": "NodeAddedToClusterEvent", + "NodeClosed": "NodeClosedEvent", + "NodeDeactivateCompleted": "NodeDeactivateCompletedEvent", + "NodeDeactivateStarted": "NodeDeactivateStartedEvent", + "NodeDown": "NodeDownEvent", + "NodeNewHealthReport": "NodeNewHealthReportEvent", + "NodeHealthReportExpired": "NodeHealthReportExpiredEvent", + "NodeOpenSucceeded": "NodeOpenSucceededEvent", + "NodeOpenFailed": "NodeOpenFailedEvent", + "NodeRemovedFromCluster": "NodeRemovedFromClusterEvent", + "NodeUp": "NodeUpEvent", + "ChaosNodeRestartScheduled": "ChaosNodeRestartScheduledEvent", + } + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.node_name = node_name - self.kind = 'NodeEvent' + self.kind = "NodeEvent" class ChaosNodeRestartScheduledEvent(NodeEvent): @@ -4329,33 +5092,52 @@ class ChaosNodeRestartScheduledEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, fault_group_id: str, fault_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "long"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance_id: int, + fault_group_id: str, + fault_id: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosNodeRestartScheduledEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance_id = node_instance_id self.fault_group_id = fault_group_id self.fault_id = fault_id - self.kind = 'ChaosNodeRestartScheduled' + self.kind = "ChaosNodeRestartScheduled" class ChaosParameters(Model): @@ -4422,25 +5204,41 @@ class ChaosParameters(Model): """ _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__(self, *, time_to_run_in_seconds: str="4294967295", max_cluster_stabilization_timeout_in_seconds: int=60, max_concurrent_faults: int=1, enable_move_replica_faults: bool=True, wait_time_between_faults_in_seconds: int=20, wait_time_between_iterations_in_seconds: int=30, cluster_health_policy=None, context=None, chaos_target_filter=None, **kwargs) -> None: + "max_cluster_stabilization_timeout_in_seconds": {"maximum": 4294967295, "minimum": 0}, + "max_concurrent_faults": {"maximum": 4294967295, "minimum": 0}, + "wait_time_between_faults_in_seconds": {"maximum": 4294967295, "minimum": 0}, + "wait_time_between_iterations_in_seconds": {"maximum": 4294967295, "minimum": 0}, + } + + _attribute_map = { + "time_to_run_in_seconds": {"key": "TimeToRunInSeconds", "type": "str"}, + "max_cluster_stabilization_timeout_in_seconds": { + "key": "MaxClusterStabilizationTimeoutInSeconds", + "type": "long", + }, + "max_concurrent_faults": {"key": "MaxConcurrentFaults", "type": "long"}, + "enable_move_replica_faults": {"key": "EnableMoveReplicaFaults", "type": "bool"}, + "wait_time_between_faults_in_seconds": {"key": "WaitTimeBetweenFaultsInSeconds", "type": "long"}, + "wait_time_between_iterations_in_seconds": {"key": "WaitTimeBetweenIterationsInSeconds", "type": "long"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "context": {"key": "Context", "type": "ChaosContext"}, + "chaos_target_filter": {"key": "ChaosTargetFilter", "type": "ChaosTargetFilter"}, + } + + def __init__( + self, + *, + time_to_run_in_seconds: str = "4294967295", + max_cluster_stabilization_timeout_in_seconds: int = 60, + max_concurrent_faults: int = 1, + enable_move_replica_faults: bool = True, + wait_time_between_faults_in_seconds: int = 20, + wait_time_between_iterations_in_seconds: int = 30, + cluster_health_policy=None, + context=None, + chaos_target_filter=None, + **kwargs + ) -> None: super(ChaosParameters, self).__init__(**kwargs) self.time_to_run_in_seconds = time_to_run_in_seconds self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds @@ -4467,13 +5265,13 @@ class ChaosParametersDictionaryItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "ChaosParameters"}, } def __init__(self, *, key: str, value, **kwargs) -> None: @@ -4514,29 +5312,51 @@ class PartitionEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } _subtype_map = { - 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "kind": { + "PartitionAnalysisEvent": "PartitionAnalysisEvent", + "PartitionNewHealthReport": "PartitionNewHealthReportEvent", + "PartitionHealthReportExpired": "PartitionHealthReportExpiredEvent", + "PartitionReconfigured": "PartitionReconfiguredEvent", + "ChaosPartitionSecondaryMoveScheduled": "ChaosPartitionSecondaryMoveScheduledEvent", + "ChaosPartitionPrimaryMoveScheduled": "ChaosPartitionPrimaryMoveScheduledEvent", + } + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(PartitionEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.partition_id = partition_id - self.kind = 'PartitionEvent' + self.kind = "PartitionEvent" class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): @@ -4575,39 +5395,60 @@ class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, node_to: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_name": {"required": True}, + "node_to": {"required": True}, + "forced_move": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "node_to": {"key": "NodeTo", "type": "str"}, + "forced_move": {"key": "ForcedMove", "type": "bool"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + fault_group_id: str, + fault_id: str, + service_name: str, + node_to: str, + forced_move: bool, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + **kwargs + ) self.fault_group_id = fault_group_id self.fault_id = fault_id self.service_name = service_name self.node_to = node_to self.forced_move = forced_move - self.kind = 'ChaosPartitionPrimaryMoveScheduled' + self.kind = "ChaosPartitionPrimaryMoveScheduled" class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): @@ -4648,42 +5489,64 @@ class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, source_node: str, destination_node: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_name": {"required": True}, + "source_node": {"required": True}, + "destination_node": {"required": True}, + "forced_move": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "source_node": {"key": "SourceNode", "type": "str"}, + "destination_node": {"key": "DestinationNode", "type": "str"}, + "forced_move": {"key": "ForcedMove", "type": "bool"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + fault_group_id: str, + fault_id: str, + service_name: str, + source_node: str, + destination_node: str, + forced_move: bool, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + **kwargs + ) self.fault_group_id = fault_group_id self.fault_id = fault_id self.service_name = service_name self.source_node = source_node self.destination_node = destination_node self.forced_move = forced_move - self.kind = 'ChaosPartitionSecondaryMoveScheduled' + self.kind = "ChaosPartitionSecondaryMoveScheduled" class ReplicaEvent(FabricEvent): @@ -4727,32 +5590,55 @@ class ReplicaEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, } _subtype_map = { - 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "kind": { + "StatefulReplicaNewHealthReport": "StatefulReplicaNewHealthReportEvent", + "StatefulReplicaHealthReportExpired": "StatefulReplicaHealthReportExpiredEvent", + "StatelessReplicaNewHealthReport": "StatelessReplicaNewHealthReportEvent", + "StatelessReplicaHealthReportExpired": "StatelessReplicaHealthReportExpiredEvent", + "ChaosReplicaRemovalScheduled": "ChaosReplicaRemovalScheduledEvent", + "ChaosReplicaRestartScheduled": "ChaosReplicaRestartScheduledEvent", + } + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ReplicaEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.partition_id = partition_id self.replica_id = replica_id - self.kind = 'ReplicaEvent' + self.kind = "ReplicaEvent" class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): @@ -4795,35 +5681,56 @@ class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_uri": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_uri": {"key": "ServiceUri", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + fault_group_id: str, + fault_id: str, + service_uri: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosReplicaRemovalScheduledEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + replica_id=replica_id, + **kwargs + ) self.fault_group_id = fault_group_id self.fault_id = fault_id self.service_uri = service_uri - self.kind = 'ChaosReplicaRemovalScheduled' + self.kind = "ChaosReplicaRemovalScheduled" class ChaosReplicaRestartScheduledEvent(ReplicaEvent): @@ -4866,35 +5773,56 @@ class ChaosReplicaRestartScheduledEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "fault_group_id": {"required": True}, + "fault_id": {"required": True}, + "service_uri": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "fault_group_id": {"key": "FaultGroupId", "type": "str"}, + "fault_id": {"key": "FaultId", "type": "str"}, + "service_uri": {"key": "ServiceUri", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + fault_group_id: str, + fault_id: str, + service_uri: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosReplicaRestartScheduledEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + replica_id=replica_id, + **kwargs + ) self.fault_group_id = fault_group_id self.fault_id = fault_id self.service_uri = service_uri - self.kind = 'ChaosReplicaRestartScheduled' + self.kind = "ChaosReplicaRestartScheduled" class ChaosSchedule(Model): @@ -4916,13 +5844,21 @@ class ChaosSchedule(Model): """ _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + "start_date": {"key": "StartDate", "type": "iso-8601"}, + "expiry_date": {"key": "ExpiryDate", "type": "iso-8601"}, + "chaos_parameters_dictionary": {"key": "ChaosParametersDictionary", "type": "[ChaosParametersDictionaryItem]"}, + "jobs": {"key": "Jobs", "type": "[ChaosScheduleJob]"}, } - def __init__(self, *, start_date="1601-01-01T00:00:00Z", expiry_date="9999-12-31T23:59:59.999Z", chaos_parameters_dictionary=None, jobs=None, **kwargs) -> None: + def __init__( + self, + *, + start_date="1601-01-01T00:00:00Z", + expiry_date="9999-12-31T23:59:59.999Z", + chaos_parameters_dictionary=None, + jobs=None, + **kwargs + ) -> None: super(ChaosSchedule, self).__init__(**kwargs) self.start_date = start_date self.expiry_date = expiry_date @@ -4941,15 +5877,15 @@ class ChaosScheduleDescription(Model): """ _validation = { - 'version': {'minimum': 0}, + "version": {"minimum": 0}, } _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + "version": {"key": "Version", "type": "int"}, + "schedule": {"key": "Schedule", "type": "ChaosSchedule"}, } - def __init__(self, *, version: int=None, schedule=None, **kwargs) -> None: + def __init__(self, *, version: int = None, schedule=None, **kwargs) -> None: super(ChaosScheduleDescription, self).__init__(**kwargs) self.version = version self.schedule = schedule @@ -4971,12 +5907,12 @@ class ChaosScheduleJob(Model): """ _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, + "chaos_parameters": {"key": "ChaosParameters", "type": "str"}, + "days": {"key": "Days", "type": "ChaosScheduleJobActiveDaysOfWeek"}, + "times": {"key": "Times", "type": "[TimeRange]"}, } - def __init__(self, *, chaos_parameters: str=None, days=None, times=None, **kwargs) -> None: + def __init__(self, *, chaos_parameters: str = None, days=None, times=None, **kwargs) -> None: super(ChaosScheduleJob, self).__init__(**kwargs) self.chaos_parameters = chaos_parameters self.days = days @@ -5010,16 +5946,27 @@ class ChaosScheduleJobActiveDaysOfWeek(Model): """ _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__(self, *, sunday: bool=False, monday: bool=False, tuesday: bool=False, wednesday: bool=False, thursday: bool=False, friday: bool=False, saturday: bool=False, **kwargs) -> None: + "sunday": {"key": "Sunday", "type": "bool"}, + "monday": {"key": "Monday", "type": "bool"}, + "tuesday": {"key": "Tuesday", "type": "bool"}, + "wednesday": {"key": "Wednesday", "type": "bool"}, + "thursday": {"key": "Thursday", "type": "bool"}, + "friday": {"key": "Friday", "type": "bool"}, + "saturday": {"key": "Saturday", "type": "bool"}, + } + + def __init__( + self, + *, + sunday: bool = False, + monday: bool = False, + tuesday: bool = False, + wednesday: bool = False, + thursday: bool = False, + friday: bool = False, + saturday: bool = False, + **kwargs + ) -> None: super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) self.sunday = sunday self.monday = monday @@ -5057,26 +6004,44 @@ class ClusterEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterEvent' + "kind": { + "ClusterNewHealthReport": "ClusterNewHealthReportEvent", + "ClusterHealthReportExpired": "ClusterHealthReportExpiredEvent", + "ClusterUpgradeCompleted": "ClusterUpgradeCompletedEvent", + "ClusterUpgradeDomainCompleted": "ClusterUpgradeDomainCompletedEvent", + "ClusterUpgradeRollbackCompleted": "ClusterUpgradeRollbackCompletedEvent", + "ClusterUpgradeRollbackStarted": "ClusterUpgradeRollbackStartedEvent", + "ClusterUpgradeStarted": "ClusterUpgradeStartedEvent", + "ChaosStopped": "ChaosStoppedEvent", + "ChaosStarted": "ChaosStartedEvent", + } + } + + def __init__( + self, *, event_instance_id: str, time_stamp, category: str = None, has_correlated_events: bool = None, **kwargs + ) -> None: + super(ClusterEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) + self.kind = "ClusterEvent" class ChaosStartedEvent(ClusterEvent): @@ -5124,41 +6089,68 @@ class ChaosStartedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, max_concurrent_faults: int, time_to_run_in_seconds: float, max_cluster_stabilization_timeout_in_seconds: float, wait_time_between_iterations_in_seconds: float, wait_time_between_faults_in_seconds: float, move_replica_fault_enabled: bool, included_node_type_list: str, included_application_list: str, cluster_health_policy: str, chaos_context: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "max_concurrent_faults": {"required": True}, + "time_to_run_in_seconds": {"required": True}, + "max_cluster_stabilization_timeout_in_seconds": {"required": True}, + "wait_time_between_iterations_in_seconds": {"required": True}, + "wait_time_between_faults_in_seconds": {"required": True}, + "move_replica_fault_enabled": {"required": True}, + "included_node_type_list": {"required": True}, + "included_application_list": {"required": True}, + "cluster_health_policy": {"required": True}, + "chaos_context": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "max_concurrent_faults": {"key": "MaxConcurrentFaults", "type": "long"}, + "time_to_run_in_seconds": {"key": "TimeToRunInSeconds", "type": "float"}, + "max_cluster_stabilization_timeout_in_seconds": { + "key": "MaxClusterStabilizationTimeoutInSeconds", + "type": "float", + }, + "wait_time_between_iterations_in_seconds": {"key": "WaitTimeBetweenIterationsInSeconds", "type": "float"}, + "wait_time_between_faults_in_seconds": {"key": "WaitTimeBetweenFaultsInSeconds", "type": "float"}, + "move_replica_fault_enabled": {"key": "MoveReplicaFaultEnabled", "type": "bool"}, + "included_node_type_list": {"key": "IncludedNodeTypeList", "type": "str"}, + "included_application_list": {"key": "IncludedApplicationList", "type": "str"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "str"}, + "chaos_context": {"key": "ChaosContext", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + max_concurrent_faults: int, + time_to_run_in_seconds: float, + max_cluster_stabilization_timeout_in_seconds: float, + wait_time_between_iterations_in_seconds: float, + wait_time_between_faults_in_seconds: float, + move_replica_fault_enabled: bool, + included_node_type_list: str, + included_application_list: str, + cluster_health_policy: str, + chaos_context: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosStartedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.max_concurrent_faults = max_concurrent_faults self.time_to_run_in_seconds = time_to_run_in_seconds self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds @@ -5169,7 +6161,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, max_concurrent_faults: self.included_application_list = included_application_list self.cluster_health_policy = cluster_health_policy self.chaos_context = chaos_context - self.kind = 'ChaosStarted' + self.kind = "ChaosStarted" class ChaosStoppedEvent(ClusterEvent): @@ -5194,25 +6186,40 @@ class ChaosStoppedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'reason': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "reason": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } - def __init__(self, *, event_instance_id: str, time_stamp, reason: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + reason: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ChaosStoppedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.reason = reason - self.kind = 'ChaosStopped' + self.kind = "ChaosStopped" class ChaosTargetFilter(Model): @@ -5271,8 +6278,8 @@ class ChaosTargetFilter(Model): """ _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + "node_type_inclusion_list": {"key": "NodeTypeInclusionList", "type": "[str]"}, + "application_inclusion_list": {"key": "ApplicationInclusionList", "type": "[str]"}, } def __init__(self, *, node_type_inclusion_list=None, application_inclusion_list=None, **kwargs) -> None: @@ -5300,17 +6307,24 @@ class PropertyBatchOperation(Model): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + "kind": { + "CheckExists": "CheckExistsPropertyBatchOperation", + "CheckSequence": "CheckSequencePropertyBatchOperation", + "CheckValue": "CheckValuePropertyBatchOperation", + "Delete": "DeletePropertyBatchOperation", + "Get": "GetPropertyBatchOperation", + "Put": "PutPropertyBatchOperation", + } } def __init__(self, *, property_name: str, **kwargs) -> None: @@ -5341,21 +6355,21 @@ class CheckExistsPropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'exists': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "exists": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "exists": {"key": "Exists", "type": "bool"}, } def __init__(self, *, property_name: str, exists: bool, **kwargs) -> None: super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) self.exists = exists - self.kind = 'CheckExists' + self.kind = "CheckExists" class CheckSequencePropertyBatchOperation(PropertyBatchOperation): @@ -5381,21 +6395,21 @@ class CheckSequencePropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'sequence_number': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "sequence_number": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, } def __init__(self, *, property_name: str, sequence_number: str, **kwargs) -> None: super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) self.sequence_number = sequence_number - self.kind = 'CheckSequence' + self.kind = "CheckSequence" class CheckValuePropertyBatchOperation(PropertyBatchOperation): @@ -5417,21 +6431,21 @@ class CheckValuePropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, } def __init__(self, *, property_name: str, value, **kwargs) -> None: super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) self.value = value - self.kind = 'CheckValue' + self.kind = "CheckValue" class ClusterConfiguration(Model): @@ -5443,10 +6457,10 @@ class ClusterConfiguration(Model): """ _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + "cluster_configuration": {"key": "ClusterConfiguration", "type": "str"}, } - def __init__(self, *, cluster_configuration: str=None, **kwargs) -> None: + def __init__(self, *, cluster_configuration: str = None, **kwargs) -> None: super(ClusterConfiguration, self).__init__(**kwargs) self.cluster_configuration = cluster_configuration @@ -5505,24 +6519,42 @@ class ClusterConfigurationUpgradeDescription(Model): """ _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, cluster_config: str, health_check_retry_timeout="PT0H0M0S", health_check_wait_duration_in_seconds="PT0H0M0S", health_check_stable_duration_in_seconds="PT0H0M0S", upgrade_domain_timeout_in_seconds="PT0H0M0S", upgrade_timeout_in_seconds="PT0H0M0S", max_percent_unhealthy_applications: int=0, max_percent_unhealthy_nodes: int=0, max_percent_delta_unhealthy_nodes: int=0, max_percent_upgrade_domain_delta_unhealthy_nodes: int=0, application_health_policies=None, **kwargs) -> None: + "cluster_config": {"required": True}, + } + + _attribute_map = { + "cluster_config": {"key": "ClusterConfig", "type": "str"}, + "health_check_retry_timeout": {"key": "HealthCheckRetryTimeout", "type": "duration"}, + "health_check_wait_duration_in_seconds": {"key": "HealthCheckWaitDurationInSeconds", "type": "duration"}, + "health_check_stable_duration_in_seconds": {"key": "HealthCheckStableDurationInSeconds", "type": "duration"}, + "upgrade_domain_timeout_in_seconds": {"key": "UpgradeDomainTimeoutInSeconds", "type": "duration"}, + "upgrade_timeout_in_seconds": {"key": "UpgradeTimeoutInSeconds", "type": "duration"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "max_percent_upgrade_domain_delta_unhealthy_nodes": { + "key": "MaxPercentUpgradeDomainDeltaUnhealthyNodes", + "type": "int", + }, + "application_health_policies": {"key": "ApplicationHealthPolicies", "type": "ApplicationHealthPolicies"}, + } + + def __init__( + self, + *, + cluster_config: str, + health_check_retry_timeout="PT0H0M0S", + health_check_wait_duration_in_seconds="PT0H0M0S", + health_check_stable_duration_in_seconds="PT0H0M0S", + upgrade_domain_timeout_in_seconds="PT0H0M0S", + upgrade_timeout_in_seconds="PT0H0M0S", + max_percent_unhealthy_applications: int = 0, + max_percent_unhealthy_nodes: int = 0, + max_percent_delta_unhealthy_nodes: int = 0, + max_percent_upgrade_domain_delta_unhealthy_nodes: int = 0, + application_health_policies=None, + **kwargs + ) -> None: super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) self.cluster_config = cluster_config self.health_check_retry_timeout = health_check_retry_timeout @@ -5554,13 +6586,21 @@ class ClusterConfigurationUpgradeStatusInfo(Model): """ _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "progress_status": {"key": "ProgressStatus", "type": "int"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "details": {"key": "Details", "type": "str"}, } - def __init__(self, *, upgrade_state=None, progress_status: int=None, config_version: str=None, details: str=None, **kwargs) -> None: + def __init__( + self, + *, + upgrade_state=None, + progress_status: int = None, + config_version: str = None, + details: str = None, + **kwargs + ) -> None: super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) self.upgrade_state = upgrade_state self.progress_status = progress_status @@ -5602,16 +6642,32 @@ class ClusterHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, node_health_states=None, application_health_states=None, **kwargs) -> None: - super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "node_health_states": {"key": "NodeHealthStates", "type": "[NodeHealthState]"}, + "application_health_states": {"key": "ApplicationHealthStates", "type": "[ApplicationHealthState]"}, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + node_health_states=None, + application_health_states=None, + **kwargs + ) -> None: + super(ClusterHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.node_health_states = node_health_states self.application_health_states = application_health_states @@ -5642,12 +6698,17 @@ class ClusterHealthChunk(Model): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_health_state_chunks": {"key": "NodeHealthStateChunks", "type": "NodeHealthStateChunkList"}, + "application_health_state_chunks": { + "key": "ApplicationHealthStateChunks", + "type": "ApplicationHealthStateChunkList", + }, } - def __init__(self, *, health_state=None, node_health_state_chunks=None, application_health_state_chunks=None, **kwargs) -> None: + def __init__( + self, *, health_state=None, node_health_state_chunks=None, application_health_state_chunks=None, **kwargs + ) -> None: super(ClusterHealthChunk, self).__init__(**kwargs) self.health_state = health_state self.node_health_state_chunks = node_health_state_chunks @@ -5693,13 +6754,21 @@ class ClusterHealthChunkQueryDescription(Model): """ _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + "node_filters": {"key": "NodeFilters", "type": "[NodeHealthStateFilter]"}, + "application_filters": {"key": "ApplicationFilters", "type": "[ApplicationHealthStateFilter]"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "application_health_policies": {"key": "ApplicationHealthPolicies", "type": "ApplicationHealthPolicies"}, } - def __init__(self, *, node_filters=None, application_filters=None, cluster_health_policy=None, application_health_policies=None, **kwargs) -> None: + def __init__( + self, + *, + node_filters=None, + application_filters=None, + cluster_health_policy=None, + application_health_policies=None, + **kwargs + ) -> None: super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) self.node_filters = node_filters self.application_filters = application_filters @@ -5728,8 +6797,11 @@ class ClusterHealthPolicies(Model): """ _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "[ApplicationHealthPolicyMapItem]", + }, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, } def __init__(self, *, application_health_policy_map=None, cluster_health_policy=None, **kwargs) -> None: @@ -5839,14 +6911,26 @@ class ClusterHealthPolicy(Model): """ _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + "consider_warning_as_error": {"key": "ConsiderWarningAsError", "type": "bool"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "max_percent_unhealthy_applications": {"key": "MaxPercentUnhealthyApplications", "type": "int"}, + "application_type_health_policy_map": { + "key": "ApplicationTypeHealthPolicyMap", + "type": "[ApplicationTypeHealthPolicyMapItem]", + }, + "node_type_health_policy_map": {"key": "NodeTypeHealthPolicyMap", "type": "[NodeTypeHealthPolicyMapItem]"}, } - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, node_type_health_policy_map=None, **kwargs) -> None: + def __init__( + self, + *, + consider_warning_as_error: bool = False, + max_percent_unhealthy_nodes: int = 0, + max_percent_unhealthy_applications: int = 0, + application_type_health_policy_map=None, + node_type_health_policy_map=None, + **kwargs + ) -> None: super(ClusterHealthPolicy, self).__init__(**kwargs) self.consider_warning_as_error = consider_warning_as_error self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes @@ -5892,37 +6976,59 @@ class ClusterHealthReportExpiredEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.source_id = source_id self.property = property self.health_state = health_state @@ -5931,7 +7037,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, proper self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ClusterHealthReportExpired' + self.kind = "ClusterHealthReportExpired" class ClusterLoadInfo(Model): @@ -5951,12 +7057,19 @@ class ClusterLoadInfo(Model): """ _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + "last_balancing_start_time_utc": {"key": "LastBalancingStartTimeUtc", "type": "iso-8601"}, + "last_balancing_end_time_utc": {"key": "LastBalancingEndTimeUtc", "type": "iso-8601"}, + "load_metric_information": {"key": "LoadMetricInformation", "type": "[LoadMetricInformation]"}, } - def __init__(self, *, last_balancing_start_time_utc=None, last_balancing_end_time_utc=None, load_metric_information=None, **kwargs) -> None: + def __init__( + self, + *, + last_balancing_start_time_utc=None, + last_balancing_end_time_utc=None, + load_metric_information=None, + **kwargs + ) -> None: super(ClusterLoadInfo, self).__init__(**kwargs) self.last_balancing_start_time_utc = last_balancing_start_time_utc self.last_balancing_end_time_utc = last_balancing_end_time_utc @@ -5971,10 +7084,10 @@ class ClusterManifest(Model): """ _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, + "manifest": {"key": "Manifest", "type": "str"}, } - def __init__(self, *, manifest: str=None, **kwargs) -> None: + def __init__(self, *, manifest: str = None, **kwargs) -> None: super(ClusterManifest, self).__init__(**kwargs) self.manifest = manifest @@ -6016,37 +7129,59 @@ class ClusterNewHealthReportEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.source_id = source_id self.property = property self.health_state = health_state @@ -6055,7 +7190,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, proper self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ClusterNewHealthReport' + self.kind = "ClusterNewHealthReport" class ClusterUpgradeCompletedEvent(ClusterEvent): @@ -6083,28 +7218,44 @@ class ClusterUpgradeCompletedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + target_cluster_version: str, + overall_upgrade_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterUpgradeCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.target_cluster_version = target_cluster_version self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeCompleted' + self.kind = "ClusterUpgradeCompleted" class ClusterUpgradeDescriptionObject(Model): @@ -6165,21 +7316,46 @@ class ClusterUpgradeDescriptionObject(Model): """ _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__(self, *, config_version: str=None, code_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", enable_delta_health_evaluation: bool=None, monitoring_policy=None, cluster_health_policy=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: + "config_version": {"key": "ConfigVersion", "type": "str"}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "sort_order": {"key": "SortOrder", "type": "str"}, + "enable_delta_health_evaluation": {"key": "EnableDeltaHealthEvaluation", "type": "bool"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "cluster_upgrade_health_policy": { + "key": "ClusterUpgradeHealthPolicy", + "type": "ClusterUpgradeHealthPolicyObject", + }, + "application_health_policy_map": { + "key": "ApplicationHealthPolicyMap", + "type": "ApplicationHealthPolicyMapObject", + }, + } + + def __init__( + self, + *, + config_version: str = None, + code_version: str = None, + upgrade_kind="Rolling", + rolling_upgrade_mode="UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: int = None, + force_restart: bool = None, + sort_order="Default", + enable_delta_health_evaluation: bool = None, + monitoring_policy=None, + cluster_health_policy=None, + cluster_upgrade_health_policy=None, + application_health_policy_map=None, + **kwargs + ) -> None: super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) self.config_version = config_version self.code_version = code_version @@ -6224,34 +7400,52 @@ class ClusterUpgradeDomainCompletedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "upgrade_state": {"required": True}, + "upgrade_domains": {"required": True}, + "upgrade_domain_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "str"}, + "upgrade_domain_elapsed_time_in_ms": {"key": "UpgradeDomainElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + target_cluster_version: str, + upgrade_state: str, + upgrade_domains: str, + upgrade_domain_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterUpgradeDomainCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.target_cluster_version = target_cluster_version self.upgrade_state = upgrade_state self.upgrade_domains = upgrade_domains self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - self.kind = 'ClusterUpgradeDomainCompleted' + self.kind = "ClusterUpgradeDomainCompleted" class ClusterUpgradeHealthPolicyObject(Model): @@ -6278,16 +7472,25 @@ class ClusterUpgradeHealthPolicyObject(Model): """ _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + "max_percent_delta_unhealthy_nodes": {"maximum": 100, "minimum": 0}, + "max_percent_upgrade_domain_delta_unhealthy_nodes": {"maximum": 100, "minimum": 0}, } _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "max_percent_upgrade_domain_delta_unhealthy_nodes": { + "key": "MaxPercentUpgradeDomainDeltaUnhealthyNodes", + "type": "int", + }, } - def __init__(self, *, max_percent_delta_unhealthy_nodes: int=None, max_percent_upgrade_domain_delta_unhealthy_nodes: int=None, **kwargs) -> None: + def __init__( + self, + *, + max_percent_delta_unhealthy_nodes: int = None, + max_percent_upgrade_domain_delta_unhealthy_nodes: int = None, + **kwargs + ) -> None: super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes @@ -6362,27 +7565,58 @@ class ClusterUpgradeProgressObject(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_domains=None, upgrade_units=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, current_upgrade_units_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, is_node_by_node: bool=False, **kwargs) -> None: + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "upgrade_domains": {"key": "UpgradeDomains", "type": "[UpgradeDomainInfo]"}, + "upgrade_units": {"key": "UpgradeUnits", "type": "[UpgradeUnitInfo]"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "next_upgrade_domain": {"key": "NextUpgradeDomain", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_description": {"key": "UpgradeDescription", "type": "ClusterUpgradeDescriptionObject"}, + "upgrade_duration_in_milliseconds": {"key": "UpgradeDurationInMilliseconds", "type": "str"}, + "upgrade_domain_duration_in_milliseconds": {"key": "UpgradeDomainDurationInMilliseconds", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "current_upgrade_domain_progress": { + "key": "CurrentUpgradeDomainProgress", + "type": "CurrentUpgradeDomainProgressInfo", + }, + "current_upgrade_units_progress": { + "key": "CurrentUpgradeUnitsProgress", + "type": "CurrentUpgradeUnitsProgressInfo", + }, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "upgrade_domain_progress_at_failure": { + "key": "UpgradeDomainProgressAtFailure", + "type": "FailedUpgradeDomainProgressObject", + }, + "is_node_by_node": {"key": "IsNodeByNode", "type": "bool"}, + } + + def __init__( + self, + *, + code_version: str = None, + config_version: str = None, + upgrade_domains=None, + upgrade_units=None, + upgrade_state=None, + next_upgrade_domain: str = None, + rolling_upgrade_mode="UnmonitoredAuto", + upgrade_description=None, + upgrade_duration_in_milliseconds: str = None, + upgrade_domain_duration_in_milliseconds: str = None, + unhealthy_evaluations=None, + current_upgrade_domain_progress=None, + current_upgrade_units_progress=None, + start_timestamp_utc: str = None, + failure_timestamp_utc: str = None, + failure_reason=None, + upgrade_domain_progress_at_failure=None, + is_node_by_node: bool = False, + **kwargs + ) -> None: super(ClusterUpgradeProgressObject, self).__init__(**kwargs) self.code_version = code_version self.config_version = config_version @@ -6431,31 +7665,48 @@ class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + target_cluster_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterUpgradeRollbackCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.target_cluster_version = target_cluster_version self.failure_reason = failure_reason self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeRollbackCompleted' + self.kind = "ClusterUpgradeRollbackCompleted" class ClusterUpgradeRollbackStartedEvent(ClusterEvent): @@ -6485,31 +7736,48 @@ class ClusterUpgradeRollbackStartedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "target_cluster_version": {"required": True}, + "failure_reason": {"required": True}, + "overall_upgrade_elapsed_time_in_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "overall_upgrade_elapsed_time_in_ms": {"key": "OverallUpgradeElapsedTimeInMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + target_cluster_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterUpgradeRollbackStartedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.target_cluster_version = target_cluster_version self.failure_reason = failure_reason self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeRollbackStarted' + self.kind = "ClusterUpgradeRollbackStarted" class ClusterUpgradeStartedEvent(ClusterEvent): @@ -6542,37 +7810,56 @@ class ClusterUpgradeStartedEvent(ClusterEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, current_cluster_version: str, target_cluster_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "current_cluster_version": {"required": True}, + "target_cluster_version": {"required": True}, + "upgrade_type": {"required": True}, + "rolling_upgrade_mode": {"required": True}, + "failure_action": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "current_cluster_version": {"key": "CurrentClusterVersion", "type": "str"}, + "target_cluster_version": {"key": "TargetClusterVersion", "type": "str"}, + "upgrade_type": {"key": "UpgradeType", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "failure_action": {"key": "FailureAction", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + current_cluster_version: str, + target_cluster_version: str, + upgrade_type: str, + rolling_upgrade_mode: str, + failure_action: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ClusterUpgradeStartedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.current_cluster_version = current_cluster_version self.target_cluster_version = target_cluster_version self.upgrade_type = upgrade_type self.rolling_upgrade_mode = rolling_upgrade_mode self.failure_action = failure_action - self.kind = 'ClusterUpgradeStarted' + self.kind = "ClusterUpgradeStarted" class ClusterVersion(Model): @@ -6583,10 +7870,10 @@ class ClusterVersion(Model): """ _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, + "version": {"key": "Version", "type": "str"}, } - def __init__(self, *, version: str=None, **kwargs) -> None: + def __init__(self, *, version: str = None, **kwargs) -> None: super(ClusterVersion, self).__init__(**kwargs) self.version = version @@ -6622,16 +7909,30 @@ class CodePackageEntryPoint(Model): """ _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, entry_point_location: str=None, process_id: str=None, run_as_user_name: str=None, code_package_entry_point_statistics=None, status=None, next_activation_time=None, instance_id: str=None, **kwargs) -> None: + "entry_point_location": {"key": "EntryPointLocation", "type": "str"}, + "process_id": {"key": "ProcessId", "type": "str"}, + "run_as_user_name": {"key": "RunAsUserName", "type": "str"}, + "code_package_entry_point_statistics": { + "key": "CodePackageEntryPointStatistics", + "type": "CodePackageEntryPointStatistics", + }, + "status": {"key": "Status", "type": "str"}, + "next_activation_time": {"key": "NextActivationTime", "type": "iso-8601"}, + "instance_id": {"key": "InstanceId", "type": "str"}, + } + + def __init__( + self, + *, + entry_point_location: str = None, + process_id: str = None, + run_as_user_name: str = None, + code_package_entry_point_statistics=None, + status=None, + next_activation_time=None, + instance_id: str = None, + **kwargs + ) -> None: super(CodePackageEntryPoint, self).__init__(**kwargs) self.entry_point_location = entry_point_location self.process_id = process_id @@ -6679,20 +7980,35 @@ class CodePackageEntryPointStatistics(Model): """ _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__(self, *, last_exit_code: str=None, last_activation_time=None, last_exit_time=None, last_successful_activation_time=None, last_successful_exit_time=None, activation_count: str=None, activation_failure_count: str=None, continuous_activation_failure_count: str=None, exit_count: str=None, exit_failure_count: str=None, continuous_exit_failure_count: str=None, **kwargs) -> None: + "last_exit_code": {"key": "LastExitCode", "type": "str"}, + "last_activation_time": {"key": "LastActivationTime", "type": "iso-8601"}, + "last_exit_time": {"key": "LastExitTime", "type": "iso-8601"}, + "last_successful_activation_time": {"key": "LastSuccessfulActivationTime", "type": "iso-8601"}, + "last_successful_exit_time": {"key": "LastSuccessfulExitTime", "type": "iso-8601"}, + "activation_count": {"key": "ActivationCount", "type": "str"}, + "activation_failure_count": {"key": "ActivationFailureCount", "type": "str"}, + "continuous_activation_failure_count": {"key": "ContinuousActivationFailureCount", "type": "str"}, + "exit_count": {"key": "ExitCount", "type": "str"}, + "exit_failure_count": {"key": "ExitFailureCount", "type": "str"}, + "continuous_exit_failure_count": {"key": "ContinuousExitFailureCount", "type": "str"}, + } + + def __init__( + self, + *, + last_exit_code: str = None, + last_activation_time=None, + last_exit_time=None, + last_successful_activation_time=None, + last_successful_exit_time=None, + activation_count: str = None, + activation_failure_count: str = None, + continuous_activation_failure_count: str = None, + exit_count: str = None, + exit_failure_count: str = None, + continuous_exit_failure_count: str = None, + **kwargs + ) -> None: super(CodePackageEntryPointStatistics, self).__init__(**kwargs) self.last_exit_code = last_exit_code self.last_activation_time = last_activation_time @@ -6725,13 +8041,15 @@ class ComposeDeploymentStatusInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "status_details": {"key": "StatusDetails", "type": "str"}, } - def __init__(self, *, name: str=None, application_name: str=None, status=None, status_details: str=None, **kwargs) -> None: + def __init__( + self, *, name: str = None, application_name: str = None, status=None, status_details: str = None, **kwargs + ) -> None: super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) self.name = name self.application_name = application_name @@ -6785,24 +8103,40 @@ class ComposeDeploymentUpgradeDescription(Model): """ _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, monitoring_policy=None, application_health_policy=None, **kwargs) -> None: + "deployment_name": {"required": True}, + "compose_file_content": {"required": True}, + "upgrade_kind": {"required": True}, + } + + _attribute_map = { + "deployment_name": {"key": "DeploymentName", "type": "str"}, + "compose_file_content": {"key": "ComposeFileContent", "type": "str"}, + "registry_credential": {"key": "RegistryCredential", "type": "RegistryCredential"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + } + + def __init__( + self, + *, + deployment_name: str, + compose_file_content: str, + registry_credential=None, + upgrade_kind="Rolling", + rolling_upgrade_mode="UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: int = None, + force_restart: bool = None, + monitoring_policy=None, + application_health_policy=None, + **kwargs + ) -> None: super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) self.deployment_name = deployment_name self.compose_file_content = compose_file_content @@ -6906,29 +8240,65 @@ class ComposeDeploymentUpgradeProgressInfo(Model): """ _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, *, deployment_name: str=None, application_name: str=None, upgrade_state=None, upgrade_status_details: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, upgrade_replica_set_check_timeout_in_seconds: int=None, monitoring_policy=None, application_health_policy=None, target_application_type_version: str=None, upgrade_duration: str=None, current_upgrade_domain_duration: str=None, application_unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, application_upgrade_status_details: str=None, **kwargs) -> None: + "deployment_name": {"key": "DeploymentName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "upgrade_state": {"key": "UpgradeState", "type": "str"}, + "upgrade_status_details": {"key": "UpgradeStatusDetails", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "application_health_policy": {"key": "ApplicationHealthPolicy", "type": "ApplicationHealthPolicy"}, + "target_application_type_version": {"key": "TargetApplicationTypeVersion", "type": "str"}, + "upgrade_duration": {"key": "UpgradeDuration", "type": "str"}, + "current_upgrade_domain_duration": {"key": "CurrentUpgradeDomainDuration", "type": "str"}, + "application_unhealthy_evaluations": { + "key": "ApplicationUnhealthyEvaluations", + "type": "[HealthEvaluationWrapper]", + }, + "current_upgrade_domain_progress": { + "key": "CurrentUpgradeDomainProgress", + "type": "CurrentUpgradeDomainProgressInfo", + }, + "start_timestamp_utc": {"key": "StartTimestampUtc", "type": "str"}, + "failure_timestamp_utc": {"key": "FailureTimestampUtc", "type": "str"}, + "failure_reason": {"key": "FailureReason", "type": "str"}, + "upgrade_domain_progress_at_failure": { + "key": "UpgradeDomainProgressAtFailure", + "type": "FailureUpgradeDomainProgressInfo", + }, + "application_upgrade_status_details": {"key": "ApplicationUpgradeStatusDetails", "type": "str"}, + } + + def __init__( + self, + *, + deployment_name: str = None, + application_name: str = None, + upgrade_state=None, + upgrade_status_details: str = None, + upgrade_kind="Rolling", + rolling_upgrade_mode="UnmonitoredAuto", + force_restart: bool = None, + upgrade_replica_set_check_timeout_in_seconds: int = None, + monitoring_policy=None, + application_health_policy=None, + target_application_type_version: str = None, + upgrade_duration: str = None, + current_upgrade_domain_duration: str = None, + application_unhealthy_evaluations=None, + current_upgrade_domain_progress=None, + start_timestamp_utc: str = None, + failure_timestamp_utc: str = None, + failure_reason=None, + upgrade_domain_progress_at_failure=None, + application_upgrade_status_details: str = None, + **kwargs + ) -> None: super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) self.deployment_name = deployment_name self.application_name = application_name @@ -6973,20 +8343,29 @@ class ConfigParameterOverride(Model): """ _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, + "section_name": {"required": True}, + "parameter_name": {"required": True}, + "parameter_value": {"required": True}, } _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + "section_name": {"key": "SectionName", "type": "str"}, + "parameter_name": {"key": "ParameterName", "type": "str"}, + "parameter_value": {"key": "ParameterValue", "type": "str"}, + "timeout": {"key": "Timeout", "type": "duration"}, + "persist_across_upgrade": {"key": "PersistAcrossUpgrade", "type": "bool"}, } - def __init__(self, *, section_name: str, parameter_name: str, parameter_value: str, timeout=None, persist_across_upgrade: bool=None, **kwargs) -> None: + def __init__( + self, + *, + section_name: str, + parameter_name: str, + parameter_value: str, + timeout=None, + persist_across_upgrade: bool = None, + **kwargs + ) -> None: super(ConfigParameterOverride, self).__init__(**kwargs) self.section_name = section_name self.parameter_name = parameter_name @@ -7012,17 +8391,19 @@ class ContainerApiRequestBody(Model): """ _validation = { - 'uri_path': {'required': True}, + "uri_path": {"required": True}, } _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, + "http_verb": {"key": "HttpVerb", "type": "str"}, + "uri_path": {"key": "UriPath", "type": "str"}, + "content_type": {"key": "Content-Type", "type": "str"}, + "body": {"key": "Body", "type": "str"}, } - def __init__(self, *, uri_path: str, http_verb: str=None, content_type: str=None, body: str=None, **kwargs) -> None: + def __init__( + self, *, uri_path: str, http_verb: str = None, content_type: str = None, body: str = None, **kwargs + ) -> None: super(ContainerApiRequestBody, self).__init__(**kwargs) self.http_verb = http_verb self.uri_path = uri_path @@ -7040,11 +8421,11 @@ class ContainerApiResponse(Model): """ _validation = { - 'container_api_result': {'required': True}, + "container_api_result": {"required": True}, } _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + "container_api_result": {"key": "ContainerApiResult", "type": "ContainerApiResult"}, } def __init__(self, *, container_api_result, **kwargs) -> None: @@ -7069,17 +8450,19 @@ class ContainerApiResult(Model): """ _validation = { - 'status': {'required': True}, + "status": {"required": True}, } _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, + "status": {"key": "Status", "type": "int"}, + "content_type": {"key": "Content-Type", "type": "str"}, + "content_encoding": {"key": "Content-Encoding", "type": "str"}, + "body": {"key": "Body", "type": "str"}, } - def __init__(self, *, status: int, content_type: str=None, content_encoding: str=None, body: str=None, **kwargs) -> None: + def __init__( + self, *, status: int, content_type: str = None, content_encoding: str = None, body: str = None, **kwargs + ) -> None: super(ContainerApiResult, self).__init__(**kwargs) self.status = status self.content_type = content_type @@ -7146,33 +8529,53 @@ class ContainerCodePackageProperties(Model): """ _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entry_point: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, volumes=None, diagnostics=None, reliable_collections_refs=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: + "name": {"required": True}, + "image": {"required": True}, + "resources": {"required": True}, + "instance_view": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "image": {"key": "image", "type": "str"}, + "image_registry_credential": {"key": "imageRegistryCredential", "type": "ImageRegistryCredential"}, + "entry_point": {"key": "entryPoint", "type": "str"}, + "commands": {"key": "commands", "type": "[str]"}, + "environment_variables": {"key": "environmentVariables", "type": "[EnvironmentVariable]"}, + "settings": {"key": "settings", "type": "[Setting]"}, + "labels": {"key": "labels", "type": "[ContainerLabel]"}, + "endpoints": {"key": "endpoints", "type": "[EndpointProperties]"}, + "resources": {"key": "resources", "type": "ResourceRequirements"}, + "volume_refs": {"key": "volumeRefs", "type": "[VolumeReference]"}, + "volumes": {"key": "volumes", "type": "[ApplicationScopedVolume]"}, + "diagnostics": {"key": "diagnostics", "type": "DiagnosticsRef"}, + "reliable_collections_refs": {"key": "reliableCollectionsRefs", "type": "[ReliableCollectionsRef]"}, + "instance_view": {"key": "instanceView", "type": "ContainerInstanceView"}, + "liveness_probe": {"key": "livenessProbe", "type": "[Probe]"}, + "readiness_probe": {"key": "readinessProbe", "type": "[Probe]"}, + } + + def __init__( + self, + *, + name: str, + image: str, + resources, + image_registry_credential=None, + entry_point: str = None, + commands=None, + environment_variables=None, + settings=None, + labels=None, + endpoints=None, + volume_refs=None, + volumes=None, + diagnostics=None, + reliable_collections_refs=None, + liveness_probe=None, + readiness_probe=None, + **kwargs + ) -> None: super(ContainerCodePackageProperties, self).__init__(**kwargs) self.name = name self.image = image @@ -7211,15 +8614,25 @@ class ContainerEvent(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "count": {"key": "count", "type": "int"}, + "first_timestamp": {"key": "firstTimestamp", "type": "str"}, + "last_timestamp": {"key": "lastTimestamp", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: str=None, count: int=None, first_timestamp: str=None, last_timestamp: str=None, message: str=None, type: str=None, **kwargs) -> None: + def __init__( + self, + *, + name: str = None, + count: int = None, + first_timestamp: str = None, + last_timestamp: str = None, + message: str = None, + type: str = None, + **kwargs + ) -> None: super(ContainerEvent, self).__init__(**kwargs) self.name = name self.count = count @@ -7249,22 +8662,30 @@ class ContainerInstanceEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ContainerInstanceEvent' + def __init__( + self, *, event_instance_id: str, time_stamp, category: str = None, has_correlated_events: bool = None, **kwargs + ) -> None: + super(ContainerInstanceEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) + self.kind = "ContainerInstanceEvent" class ContainerInstanceView(Model): @@ -7282,13 +8703,15 @@ class ContainerInstanceView(Model): """ _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + "restart_count": {"key": "restartCount", "type": "int"}, + "current_state": {"key": "currentState", "type": "ContainerState"}, + "previous_state": {"key": "previousState", "type": "ContainerState"}, + "events": {"key": "events", "type": "[ContainerEvent]"}, } - def __init__(self, *, restart_count: int=None, current_state=None, previous_state=None, events=None, **kwargs) -> None: + def __init__( + self, *, restart_count: int = None, current_state=None, previous_state=None, events=None, **kwargs + ) -> None: super(ContainerInstanceView, self).__init__(**kwargs) self.restart_count = restart_count self.current_state = current_state @@ -7308,13 +8731,13 @@ class ContainerLabel(Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__(self, *, name: str, value: str, **kwargs) -> None: @@ -7331,10 +8754,10 @@ class ContainerLogs(Model): """ _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, + "content": {"key": "Content", "type": "str"}, } - def __init__(self, *, content: str=None, **kwargs) -> None: + def __init__(self, *, content: str = None, **kwargs) -> None: super(ContainerLogs, self).__init__(**kwargs) self.content = content @@ -7355,14 +8778,23 @@ class ContainerState(Model): """ _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + "state": {"key": "state", "type": "str"}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "exit_code": {"key": "exitCode", "type": "str"}, + "finish_time": {"key": "finishTime", "type": "iso-8601"}, + "detail_status": {"key": "detailStatus", "type": "str"}, } - def __init__(self, *, state: str=None, start_time=None, exit_code: str=None, finish_time=None, detail_status: str=None, **kwargs) -> None: + def __init__( + self, + *, + state: str = None, + start_time=None, + exit_code: str = None, + finish_time=None, + detail_status: str = None, + **kwargs + ) -> None: super(ContainerState, self).__init__(**kwargs) self.state = state self.start_time = start_time @@ -7387,14 +8819,14 @@ class CreateComposeDeploymentDescription(Model): """ _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, + "deployment_name": {"required": True}, + "compose_file_content": {"required": True}, } _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + "deployment_name": {"key": "DeploymentName", "type": "str"}, + "compose_file_content": {"key": "ComposeFileContent", "type": "str"}, + "registry_credential": {"key": "RegistryCredential", "type": "RegistryCredential"}, } def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, **kwargs) -> None: @@ -7417,11 +8849,11 @@ class CurrentUpgradeDomainProgressInfo(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, node_upgrade_progress_list=None, **kwargs) -> None: super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) self.domain_name = domain_name self.node_upgrade_progress_list = node_upgrade_progress_list @@ -7440,11 +8872,11 @@ class CurrentUpgradeUnitsProgressInfo(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, node_upgrade_progress_list=None, **kwargs) -> None: super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) self.domain_name = domain_name self.node_upgrade_progress_list = node_upgrade_progress_list @@ -7461,7 +8893,7 @@ class DeactivationIntentDescription(Model): """ _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + "deactivation_intent": {"key": "DeactivationIntent", "type": "str"}, } def __init__(self, *, deactivation_intent=None, **kwargs) -> None: @@ -7482,16 +8914,14 @@ class ExecutionPolicy(Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, } - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } + _subtype_map = {"type": {"Default": "DefaultExecutionPolicy", "RunToCompletion": "RunToCompletionExecutionPolicy"}} def __init__(self, **kwargs) -> None: super(ExecutionPolicy, self).__init__(**kwargs) @@ -7508,16 +8938,16 @@ class DefaultExecutionPolicy(ExecutionPolicy): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs) -> None: super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' + self.type = "Default" class DeletePropertyBatchOperation(PropertyBatchOperation): @@ -7535,18 +8965,18 @@ class DeletePropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, } def __init__(self, *, property_name: str, **kwargs) -> None: super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'Delete' + self.kind = "Delete" class DeltaNodesCheckHealthEvaluation(HealthEvaluation): @@ -7588,28 +9018,41 @@ class DeltaNodesCheckHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "baseline_error_count": {"key": "BaselineErrorCount", "type": "long"}, + "baseline_total_count": {"key": "BaselineTotalCount", "type": "long"}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + baseline_error_count: int = None, + baseline_total_count: int = None, + max_percent_delta_unhealthy_nodes: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(DeltaNodesCheckHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.baseline_error_count = baseline_error_count self.baseline_total_count = baseline_total_count self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeltaNodesCheck' + self.kind = "DeltaNodesCheck" class DeployedApplicationHealth(EntityHealth): @@ -7646,17 +9089,37 @@ class DeployedApplicationHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, node_name: str=None, deployed_service_package_health_states=None, **kwargs) -> None: - super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "deployed_service_package_health_states": { + "key": "DeployedServicePackageHealthStates", + "type": "[DeployedServicePackageHealthState]", + }, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + name: str = None, + node_name: str = None, + deployed_service_package_health_states=None, + **kwargs + ) -> None: + super(DeployedApplicationHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.name = name self.node_name = node_name self.deployed_service_package_health_states = deployed_service_package_health_states @@ -7694,24 +9157,35 @@ class DeployedApplicationHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + node_name: str = None, + application_name: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(DeployedApplicationHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.node_name = node_name self.application_name = application_name self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedApplication' + self.kind = "DeployedApplication" class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): @@ -7763,43 +9237,69 @@ class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_instance_id: int, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(DeployedApplicationHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_instance_id = application_instance_id self.node_name = node_name self.source_id = source_id @@ -7810,7 +9310,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, a self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedApplicationHealthReportExpired' + self.kind = "DeployedApplicationHealthReportExpired" class DeployedApplicationHealthState(EntityHealthState): @@ -7832,12 +9332,14 @@ class DeployedApplicationHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, **kwargs) -> None: + def __init__( + self, *, aggregated_health_state=None, node_name: str = None, application_name: str = None, **kwargs + ) -> None: super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) self.node_name = node_name self.application_name = application_name @@ -7863,12 +9365,17 @@ class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "deployed_service_package_health_state_chunks": { + "key": "DeployedServicePackageHealthStateChunks", + "type": "DeployedServicePackageHealthStateChunkList", + }, } - def __init__(self, *, health_state=None, node_name: str=None, deployed_service_package_health_state_chunks=None, **kwargs) -> None: + def __init__( + self, *, health_state=None, node_name: str = None, deployed_service_package_health_state_chunks=None, **kwargs + ) -> None: super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.node_name = node_name self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks @@ -7886,7 +9393,7 @@ class DeployedApplicationHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + "items": {"key": "Items", "type": "[DeployedApplicationHealthStateChunk]"}, } def __init__(self, *, items=None, **kwargs) -> None: @@ -7960,12 +9467,22 @@ class DeployedApplicationHealthStateFilter(Model): """ _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + "node_name_filter": {"key": "NodeNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "deployed_service_package_filters": { + "key": "DeployedServicePackageFilters", + "type": "[DeployedServicePackageHealthStateFilter]", + }, } - def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, deployed_service_package_filters=None, **kwargs) -> None: + def __init__( + self, + *, + node_name_filter: str = None, + health_state_filter: int = 0, + deployed_service_package_filters=None, + **kwargs + ) -> None: super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) self.node_name_filter = node_name_filter self.health_state_filter = health_state_filter @@ -8013,18 +9530,31 @@ class DeployedApplicationInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, work_directory: str=None, log_directory: str=None, temp_directory: str=None, health_state=None, **kwargs) -> None: + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "type_version": {"key": "TypeVersion", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "work_directory": {"key": "WorkDirectory", "type": "str"}, + "log_directory": {"key": "LogDirectory", "type": "str"}, + "temp_directory": {"key": "TempDirectory", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + } + + def __init__( + self, + *, + id: str = None, + name: str = None, + type_name: str = None, + type_version: str = None, + status=None, + work_directory: str = None, + log_directory: str = None, + temp_directory: str = None, + health_state=None, + **kwargs + ) -> None: super(DeployedApplicationInfo, self).__init__(**kwargs) self.id = id self.name = name @@ -8086,43 +9616,69 @@ class DeployedApplicationNewHealthReportEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "application_instance_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "application_instance_id": {"key": "ApplicationInstanceId", "type": "long"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + application_instance_id: int, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(DeployedApplicationNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.application_instance_id = application_instance_id self.node_name = node_name self.source_id = source_id @@ -8133,7 +9689,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, a self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedApplicationNewHealthReport' + self.kind = "DeployedApplicationNewHealthReport" class DeployedApplicationsHealthEvaluation(HealthEvaluation): @@ -8171,24 +9727,38 @@ class DeployedApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_deployed_applications": { + "key": "MaxPercentUnhealthyDeployedApplications", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + max_percent_unhealthy_deployed_applications: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(DeployedApplicationsHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedApplications' + self.kind = "DeployedApplications" class DeployedCodePackageInfo(Model): @@ -8237,19 +9807,33 @@ class DeployedCodePackageInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__(self, *, name: str=None, version: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, host_type=None, host_isolation_mode=None, status=None, run_frequency_interval: str=None, setup_entry_point=None, main_entry_point=None, **kwargs) -> None: + "name": {"key": "Name", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_type": {"key": "HostType", "type": "str"}, + "host_isolation_mode": {"key": "HostIsolationMode", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "run_frequency_interval": {"key": "RunFrequencyInterval", "type": "str"}, + "setup_entry_point": {"key": "SetupEntryPoint", "type": "CodePackageEntryPoint"}, + "main_entry_point": {"key": "MainEntryPoint", "type": "CodePackageEntryPoint"}, + } + + def __init__( + self, + *, + name: str = None, + version: str = None, + service_manifest_name: str = None, + service_package_activation_id: str = None, + host_type=None, + host_isolation_mode=None, + status=None, + run_frequency_interval: str = None, + setup_entry_point=None, + main_entry_point=None, + **kwargs + ) -> None: super(DeployedCodePackageInfo, self).__init__(**kwargs) self.name = name self.version = version @@ -8294,17 +9878,34 @@ class DeployedServicePackageHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, application_name: str=None, service_manifest_name: str=None, node_name: str=None, **kwargs) -> None: - super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + application_name: str = None, + service_manifest_name: str = None, + node_name: str = None, + **kwargs + ) -> None: + super(DeployedServicePackageHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.application_name = application_name self.service_manifest_name = service_manifest_name self.node_name = node_name @@ -8344,26 +9945,38 @@ class DeployedServicePackageHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + node_name: str = None, + application_name: str = None, + service_manifest_name: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(DeployedServicePackageHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.node_name = node_name self.application_name = application_name self.service_manifest_name = service_manifest_name self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedServicePackage' + self.kind = "DeployedServicePackage" class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): @@ -8421,47 +10034,75 @@ class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_manifest": {"required": True}, + "service_package_instance_id": {"required": True}, + "service_package_activation_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_manifest": {"key": "ServiceManifest", "type": "str"}, + "service_package_instance_id": {"key": "ServicePackageInstanceId", "type": "long"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + service_manifest: str, + service_package_instance_id: int, + service_package_activation_id: str, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.service_manifest = service_manifest self.service_package_instance_id = service_package_instance_id self.service_package_activation_id = service_package_activation_id @@ -8474,7 +10115,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, s self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedServicePackageHealthReportExpired' + self.kind = "DeployedServicePackageHealthReportExpired" class DeployedServicePackageHealthState(EntityHealthState): @@ -8506,15 +10147,26 @@ class DeployedServicePackageHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + node_name: str = None, + application_name: str = None, + service_manifest_name: str = None, + service_package_activation_id: str = None, + **kwargs + ) -> None: + super(DeployedServicePackageHealthState, self).__init__( + aggregated_health_state=aggregated_health_state, **kwargs + ) self.node_name = node_name self.application_name = application_name self.service_manifest_name = service_manifest_name @@ -8542,12 +10194,19 @@ class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } - def __init__(self, *, health_state=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + health_state=None, + service_manifest_name: str = None, + service_package_activation_id: str = None, + **kwargs + ) -> None: super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.service_manifest_name = service_manifest_name self.service_package_activation_id = service_package_activation_id @@ -8565,7 +10224,7 @@ class DeployedServicePackageHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + "items": {"key": "Items", "type": "[DeployedServicePackageHealthStateChunk]"}, } def __init__(self, *, items=None, **kwargs) -> None: @@ -8633,12 +10292,19 @@ class DeployedServicePackageHealthStateFilter(Model): """ _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + "service_manifest_name_filter": {"key": "ServiceManifestNameFilter", "type": "str"}, + "service_package_activation_id_filter": {"key": "ServicePackageActivationIdFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, } - def __init__(self, *, service_manifest_name_filter: str=None, service_package_activation_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + def __init__( + self, + *, + service_manifest_name_filter: str = None, + service_package_activation_id_filter: str = None, + health_state_filter: int = 0, + **kwargs + ) -> None: super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) self.service_manifest_name_filter = service_manifest_name_filter self.service_package_activation_id_filter = service_package_activation_id_filter @@ -8669,13 +10335,15 @@ class DeployedServicePackageInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } - def __init__(self, *, name: str=None, version: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: + def __init__( + self, *, name: str = None, version: str = None, status=None, service_package_activation_id: str = None, **kwargs + ) -> None: super(DeployedServicePackageInfo, self).__init__(**kwargs) self.name = name self.version = version @@ -8738,47 +10406,75 @@ class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest_name: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "application_id": {"required": True}, + "service_manifest_name": {"required": True}, + "service_package_instance_id": {"required": True}, + "service_package_activation_id": {"required": True}, + "node_name": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_id": {"key": "ApplicationId", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_instance_id": {"key": "ServicePackageInstanceId", "type": "long"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + application_id: str, + service_manifest_name: str, + service_package_instance_id: int, + service_package_activation_id: str, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(DeployedServicePackageNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + application_id=application_id, + **kwargs + ) self.service_manifest_name = service_manifest_name self.service_package_instance_id = service_package_instance_id self.service_package_activation_id = service_package_activation_id @@ -8791,7 +10487,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, s self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedServicePackageNewHealthReport' + self.kind = "DeployedServicePackageNewHealthReport" class DeployedServicePackagesHealthEvaluation(HealthEvaluation): @@ -8826,22 +10522,32 @@ class DeployedServicePackagesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(DeployedServicePackagesHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedServicePackages' + self.kind = "DeployedServicePackages" class DeployedServiceReplicaDetailInfo(Model): @@ -8879,23 +10585,35 @@ class DeployedServiceReplicaDetailInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "current_service_operation": {"key": "CurrentServiceOperation", "type": "str"}, + "current_service_operation_start_time_utc": {"key": "CurrentServiceOperationStartTimeUtc", "type": "iso-8601"}, + "reported_load": {"key": "ReportedLoad", "type": "[LoadMetricReportInfo]"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, **kwargs) -> None: + "service_kind": { + "Stateful": "DeployedStatefulServiceReplicaDetailInfo", + "Stateless": "DeployedStatelessServiceInstanceDetailInfo", + } + } + + def __init__( + self, + *, + service_name: str = None, + partition_id: str = None, + current_service_operation=None, + current_service_operation_start_time_utc=None, + reported_load=None, + **kwargs + ) -> None: super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) self.service_name = service_name self.partition_id = partition_id @@ -8955,27 +10673,43 @@ class DeployedServiceReplicaInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_process_id": {"key": "HostProcessId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, **kwargs) -> None: + "service_kind": { + "Stateful": "DeployedStatefulServiceReplicaInfo", + "Stateless": "DeployedStatelessServiceInstanceInfo", + } + } + + def __init__( + self, + *, + service_name: str = None, + service_type_name: str = None, + service_manifest_name: str = None, + code_package_name: str = None, + partition_id: str = None, + replica_status=None, + address: str = None, + service_package_activation_id: str = None, + host_process_id: str = None, + **kwargs + ) -> None: super(DeployedServiceReplicaInfo, self).__init__(**kwargs) self.service_name = service_name self.service_type_name = service_type_name @@ -9016,14 +10750,23 @@ class DeployedServiceTypeInfo(Model): """ _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "status": {"key": "Status", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, } - def __init__(self, *, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + service_type_name: str = None, + service_manifest_name: str = None, + code_package_name: str = None, + status=None, + service_package_activation_id: str = None, + **kwargs + ) -> None: super(DeployedServiceTypeInfo, self).__init__(**kwargs) self.service_type_name = service_type_name self.service_manifest_name = service_manifest_name @@ -9103,27 +10846,53 @@ class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo) """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, replica_id: str=None, current_replicator_operation=None, read_status=None, write_status=None, replicator_status=None, replica_status=None, deployed_service_replica_query_result=None, **kwargs) -> None: - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "current_service_operation": {"key": "CurrentServiceOperation", "type": "str"}, + "current_service_operation_start_time_utc": {"key": "CurrentServiceOperationStartTimeUtc", "type": "iso-8601"}, + "reported_load": {"key": "ReportedLoad", "type": "[LoadMetricReportInfo]"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, + "current_replicator_operation": {"key": "CurrentReplicatorOperation", "type": "str"}, + "read_status": {"key": "ReadStatus", "type": "str"}, + "write_status": {"key": "WriteStatus", "type": "str"}, + "replicator_status": {"key": "ReplicatorStatus", "type": "ReplicatorStatus"}, + "replica_status": {"key": "ReplicaStatus", "type": "KeyValueStoreReplicaStatus"}, + "deployed_service_replica_query_result": { + "key": "DeployedServiceReplicaQueryResult", + "type": "DeployedStatefulServiceReplicaInfo", + }, + } + + def __init__( + self, + *, + service_name: str = None, + partition_id: str = None, + current_service_operation=None, + current_service_operation_start_time_utc=None, + reported_load=None, + replica_id: str = None, + current_replicator_operation=None, + read_status=None, + write_status=None, + replicator_status=None, + replica_status=None, + deployed_service_replica_query_result=None, + **kwargs + ) -> None: + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__( + service_name=service_name, + partition_id=partition_id, + current_service_operation=current_service_operation, + current_service_operation_start_time_utc=current_service_operation_start_time_utc, + reported_load=reported_load, + **kwargs + ) self.replica_id = replica_id self.current_replicator_operation = current_replicator_operation self.read_status = read_status @@ -9131,7 +10900,7 @@ def __init__(self, *, service_name: str=None, partition_id: str=None, current_se self.replicator_status = replicator_status self.replica_status = replica_status self.deployed_service_replica_query_result = deployed_service_replica_query_result - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): @@ -9197,31 +10966,58 @@ class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, replica_id: str=None, replica_role=None, reconfiguration_information=None, **kwargs) -> None: - super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_process_id": {"key": "HostProcessId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, + "replica_role": {"key": "ReplicaRole", "type": "str"}, + "reconfiguration_information": {"key": "ReconfigurationInformation", "type": "ReconfigurationInformation"}, + } + + def __init__( + self, + *, + service_name: str = None, + service_type_name: str = None, + service_manifest_name: str = None, + code_package_name: str = None, + partition_id: str = None, + replica_status=None, + address: str = None, + service_package_activation_id: str = None, + host_process_id: str = None, + replica_id: str = None, + replica_role=None, + reconfiguration_information=None, + **kwargs + ) -> None: + super(DeployedStatefulServiceReplicaInfo, self).__init__( + service_name=service_name, + service_type_name=service_type_name, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + partition_id=partition_id, + replica_status=replica_status, + address=address, + service_package_activation_id=service_package_activation_id, + host_process_id=host_process_id, + **kwargs + ) self.replica_id = replica_id self.replica_role = replica_role self.reconfiguration_information = reconfiguration_information - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): @@ -9267,25 +11063,46 @@ class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInf """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, instance_id: str=None, deployed_service_replica_query_result=None, **kwargs) -> None: - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "current_service_operation": {"key": "CurrentServiceOperation", "type": "str"}, + "current_service_operation_start_time_utc": {"key": "CurrentServiceOperationStartTimeUtc", "type": "iso-8601"}, + "reported_load": {"key": "ReportedLoad", "type": "[LoadMetricReportInfo]"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, + "deployed_service_replica_query_result": { + "key": "DeployedServiceReplicaQueryResult", + "type": "DeployedStatelessServiceInstanceInfo", + }, + } + + def __init__( + self, + *, + service_name: str = None, + partition_id: str = None, + current_service_operation=None, + current_service_operation_start_time_utc=None, + reported_load=None, + instance_id: str = None, + deployed_service_replica_query_result=None, + **kwargs + ) -> None: + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__( + service_name=service_name, + partition_id=partition_id, + current_service_operation=current_service_operation, + current_service_operation_start_time_utc=current_service_operation_start_time_utc, + reported_load=reported_load, + **kwargs + ) self.instance_id = instance_id self.deployed_service_replica_query_result = deployed_service_replica_query_result - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): @@ -9340,27 +11157,52 @@ class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, instance_id: str=None, **kwargs) -> None: - super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "host_process_id": {"key": "HostProcessId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, + } + + def __init__( + self, + *, + service_name: str = None, + service_type_name: str = None, + service_manifest_name: str = None, + code_package_name: str = None, + partition_id: str = None, + replica_status=None, + address: str = None, + service_package_activation_id: str = None, + host_process_id: str = None, + instance_id: str = None, + **kwargs + ) -> None: + super(DeployedStatelessServiceInstanceInfo, self).__init__( + service_name=service_name, + service_type_name=service_type_name, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + partition_id=partition_id, + replica_status=replica_status, + address=address, + service_package_activation_id=service_package_activation_id, + host_process_id=host_process_id, + **kwargs + ) self.instance_id = instance_id - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class DeployServicePackageToNodeDescription(Model): @@ -9386,21 +11228,30 @@ class DeployServicePackageToNodeDescription(Model): """ _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, + "service_manifest_name": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, + "node_name": {"required": True}, } _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "package_sharing_policy": {"key": "PackageSharingPolicy", "type": "[PackageSharingPolicyInfo]"}, } - def __init__(self, *, service_manifest_name: str, application_type_name: str, application_type_version: str, node_name: str, package_sharing_policy=None, **kwargs) -> None: + def __init__( + self, + *, + service_manifest_name: str, + application_type_name: str, + application_type_version: str, + node_name: str, + package_sharing_policy=None, + **kwargs + ) -> None: super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) self.service_manifest_name = service_manifest_name self.application_type_name = application_type_name @@ -9422,12 +11273,12 @@ class DiagnosticsDescription(Model): """ _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + "sinks": {"key": "sinks", "type": "[DiagnosticsSinkProperties]"}, + "enabled": {"key": "enabled", "type": "bool"}, + "default_sink_refs": {"key": "defaultSinkRefs", "type": "[str]"}, } - def __init__(self, *, sinks=None, enabled: bool=None, default_sink_refs=None, **kwargs) -> None: + def __init__(self, *, sinks=None, enabled: bool = None, default_sink_refs=None, **kwargs) -> None: super(DiagnosticsDescription, self).__init__(**kwargs) self.sinks = sinks self.enabled = enabled @@ -9445,11 +11296,11 @@ class DiagnosticsRef(Model): """ _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + "enabled": {"key": "enabled", "type": "bool"}, + "sink_refs": {"key": "sinkRefs", "type": "[str]"}, } - def __init__(self, *, enabled: bool=None, sink_refs=None, **kwargs) -> None: + def __init__(self, *, enabled: bool = None, sink_refs=None, **kwargs) -> None: super(DiagnosticsRef, self).__init__(**kwargs) self.enabled = enabled self.sink_refs = sink_refs @@ -9468,11 +11319,11 @@ class DisableBackupDescription(Model): """ _validation = { - 'clean_backup': {'required': True}, + "clean_backup": {"required": True}, } _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + "clean_backup": {"key": "CleanBackup", "type": "bool"}, } def __init__(self, *, clean_backup: bool, **kwargs) -> None: @@ -9490,11 +11341,11 @@ class DiskInfo(Model): """ _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + "capacity": {"key": "Capacity", "type": "str"}, + "available_space": {"key": "AvailableSpace", "type": "str"}, } - def __init__(self, *, capacity: str=None, available_space: str=None, **kwargs) -> None: + def __init__(self, *, capacity: str = None, available_space: str = None, **kwargs) -> None: super(DiskInfo, self).__init__(**kwargs) self.capacity = capacity self.available_space = available_space @@ -9512,19 +11363,19 @@ class DoublePropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "float"}, } def __init__(self, *, data: float, **kwargs) -> None: super(DoublePropertyValue, self).__init__(**kwargs) self.data = data - self.kind = 'Double' + self.kind = "Double" class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): @@ -9546,23 +11397,25 @@ class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): """ _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, + "storage_kind": {"required": True}, + "storage_credentials_source_location": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "storage_credentials_source_location": {"key": "StorageCredentialsSourceLocation", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, } - def __init__(self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + def __init__( + self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str = None, **kwargs + ) -> None: super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) self.storage_credentials_source_location = storage_credentials_source_location self.container_name = container_name - self.storage_kind = 'DsmsAzureBlobStore' + self.storage_kind = "DsmsAzureBlobStore" class EnableBackupDescription(Model): @@ -9576,11 +11429,11 @@ class EnableBackupDescription(Model): """ _validation = { - 'backup_policy_name': {'required': True}, + "backup_policy_name": {"required": True}, } _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + "backup_policy_name": {"key": "BackupPolicyName", "type": "str"}, } def __init__(self, *, backup_policy_name: str, **kwargs) -> None: @@ -9600,15 +11453,15 @@ class EndpointProperties(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, + "name": {"key": "name", "type": "str"}, + "port": {"key": "port", "type": "int"}, } - def __init__(self, *, name: str, port: int=None, **kwargs) -> None: + def __init__(self, *, name: str, port: int = None, **kwargs) -> None: super(EndpointProperties, self).__init__(**kwargs) self.name = name self.port = port @@ -9622,10 +11475,10 @@ class EndpointRef(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: str=None, **kwargs) -> None: + def __init__(self, *, name: str = None, **kwargs) -> None: super(EndpointRef, self).__init__(**kwargs) self.name = name @@ -9645,15 +11498,15 @@ class SafetyCheck(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} + "kind": {"PartitionSafetyCheck": "PartitionSafetyCheck", "EnsureSeedNodeQuorum": "SeedNodeSafetyCheck"} } def __init__(self, **kwargs) -> None: @@ -9681,22 +11534,29 @@ class PartitionSafetyCheck(SafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + "kind": { + "EnsureAvailability": "EnsureAvailabilitySafetyCheck", + "EnsurePartitionQuorum": "EnsurePartitionQuorumSafetyCheck", + "WaitForInbuildReplica": "WaitForInbuildReplicaSafetyCheck", + "WaitForPrimaryPlacement": "WaitForPrimaryPlacementSafetyCheck", + "WaitForPrimarySwap": "WaitForPrimarySwapSafetyCheck", + "WaitForReconfiguration": "WaitForReconfigurationSafetyCheck", + } } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(PartitionSafetyCheck, self).__init__(**kwargs) self.partition_id = partition_id - self.kind = 'PartitionSafetyCheck' + self.kind = "PartitionSafetyCheck" class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): @@ -9714,17 +11574,17 @@ class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsureAvailability' + self.kind = "EnsureAvailability" class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): @@ -9741,17 +11601,17 @@ class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsurePartitionQuorum' + self.kind = "EnsurePartitionQuorum" class EntityKindHealthStateCount(Model): @@ -9768,8 +11628,8 @@ class EntityKindHealthStateCount(Model): """ _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "health_state_count": {"key": "HealthStateCount", "type": "HealthStateCount"}, } def __init__(self, *, entity_kind=None, health_state_count=None, **kwargs) -> None: @@ -9793,12 +11653,12 @@ class EnvironmentVariable(Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: + def __init__(self, *, type="ClearText", name: str = None, value: str = None, **kwargs) -> None: super(EnvironmentVariable, self).__init__(**kwargs) self.type = type self.name = name @@ -9824,11 +11684,11 @@ class Epoch(Model): """ _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + "configuration_version": {"key": "ConfigurationVersion", "type": "str"}, + "data_loss_version": {"key": "DataLossVersion", "type": "str"}, } - def __init__(self, *, configuration_version: str=None, data_loss_version: str=None, **kwargs) -> None: + def __init__(self, *, configuration_version: str = None, data_loss_version: str = None, **kwargs) -> None: super(Epoch, self).__init__(**kwargs) self.configuration_version = configuration_version self.data_loss_version = data_loss_version @@ -9864,22 +11724,32 @@ class EventHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "consider_warning_as_error": {"key": "ConsiderWarningAsError", "type": "bool"}, + "unhealthy_event": {"key": "UnhealthyEvent", "type": "HealthEvent"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, consider_warning_as_error: bool=None, unhealthy_event=None, **kwargs) -> None: - super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + consider_warning_as_error: bool = None, + unhealthy_event=None, + **kwargs + ) -> None: + super(EventHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.consider_warning_as_error = consider_warning_as_error self.unhealthy_event = unhealthy_event - self.kind = 'Event' + self.kind = "Event" class ExecutingFaultsChaosEvent(ChaosEvent): @@ -9900,20 +11770,20 @@ class ExecutingFaultsChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "faults": {"key": "Faults", "type": "[str]"}, } def __init__(self, *, time_stamp_utc, faults=None, **kwargs) -> None: super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) self.faults = faults - self.kind = 'ExecutingFaults' + self.kind = "ExecutingFaults" class ProvisionApplicationTypeDescriptionBase(Model): @@ -9938,17 +11808,20 @@ class ProvisionApplicationTypeDescriptionBase(Model): """ _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, + "async_property": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "async_property": {"key": "Async", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} + "kind": { + "ImageStorePath": "ProvisionApplicationTypeDescription", + "ExternalStore": "ExternalStoreProvisionApplicationTypeDescription", + } } def __init__(self, *, async_property: bool, **kwargs) -> None: @@ -9990,27 +11863,35 @@ class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeD """ _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, + "async_property": {"required": True}, + "kind": {"required": True}, + "application_package_download_uri": {"required": True}, + "application_type_name": {"required": True}, + "application_type_version": {"required": True}, } _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + "async_property": {"key": "Async", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_package_download_uri": {"key": "ApplicationPackageDownloadUri", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, } - def __init__(self, *, async_property: bool, application_package_download_uri: str, application_type_name: str, application_type_version: str, **kwargs) -> None: + def __init__( + self, + *, + async_property: bool, + application_package_download_uri: str, + application_type_name: str, + application_type_version: str, + **kwargs + ) -> None: super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) self.application_package_download_uri = application_package_download_uri self.application_type_name = application_type_name self.application_type_version = application_type_version - self.kind = 'ExternalStore' + self.kind = "ExternalStore" class FabricCodeVersionInfo(Model): @@ -10021,10 +11902,10 @@ class FabricCodeVersionInfo(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + "code_version": {"key": "CodeVersion", "type": "str"}, } - def __init__(self, *, code_version: str=None, **kwargs) -> None: + def __init__(self, *, code_version: str = None, **kwargs) -> None: super(FabricCodeVersionInfo, self).__init__(**kwargs) self.code_version = code_version @@ -10037,10 +11918,10 @@ class FabricConfigVersionInfo(Model): """ _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + "config_version": {"key": "ConfigVersion", "type": "str"}, } - def __init__(self, *, config_version: str=None, **kwargs) -> None: + def __init__(self, *, config_version: str = None, **kwargs) -> None: super(FabricConfigVersionInfo, self).__init__(**kwargs) self.config_version = config_version @@ -10058,11 +11939,11 @@ class FabricError(Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + "error": {"key": "Error", "type": "FabricErrorError"}, } def __init__(self, *, error, **kwargs) -> None: @@ -10079,7 +11960,7 @@ class FabricErrorException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) + super(FabricErrorException, self).__init__(deserialize, response, "FabricError", *args) class FabricErrorError(Model): @@ -10249,15 +12130,15 @@ class FabricErrorError(Model): """ _validation = { - 'code': {'required': True}, + "code": {"required": True}, } _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, + "code": {"key": "Code", "type": "str"}, + "message": {"key": "Message", "type": "str"}, } - def __init__(self, *, code, message: str=None, **kwargs) -> None: + def __init__(self, *, code, message: str = None, **kwargs) -> None: super(FabricErrorError, self).__init__(**kwargs) self.code = code self.message = message @@ -10276,16 +12157,14 @@ class PropertyBatchInfo(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} - } + _subtype_map = {"kind": {"Successful": "SuccessfulPropertyBatchInfo", "Failed": "FailedPropertyBatchInfo"}} def __init__(self, **kwargs) -> None: super(PropertyBatchInfo, self).__init__(**kwargs) @@ -10310,20 +12189,20 @@ class FailedPropertyBatchInfo(PropertyBatchInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + "kind": {"key": "Kind", "type": "str"}, + "error_message": {"key": "ErrorMessage", "type": "str"}, + "operation_index": {"key": "OperationIndex", "type": "int"}, } - def __init__(self, *, error_message: str=None, operation_index: int=None, **kwargs) -> None: + def __init__(self, *, error_message: str = None, operation_index: int = None, **kwargs) -> None: super(FailedPropertyBatchInfo, self).__init__(**kwargs) self.error_message = error_message self.operation_index = operation_index - self.kind = 'Failed' + self.kind = "Failed" class FailedUpgradeDomainProgressObject(Model): @@ -10339,11 +12218,11 @@ class FailedUpgradeDomainProgressObject(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, node_upgrade_progress_list=None, **kwargs) -> None: super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) self.domain_name = domain_name self.node_upgrade_progress_list = node_upgrade_progress_list @@ -10362,11 +12241,11 @@ class FailureUpgradeDomainProgressInfo(Model): """ _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + "domain_name": {"key": "DomainName", "type": "str"}, + "node_upgrade_progress_list": {"key": "NodeUpgradeProgressList", "type": "[NodeUpgradeProgressInfo]"}, } - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, node_upgrade_progress_list=None, **kwargs) -> None: super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) self.domain_name = domain_name self.node_upgrade_progress_list = node_upgrade_progress_list @@ -10388,13 +12267,15 @@ class FileInfo(Model): """ _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + "file_size": {"key": "FileSize", "type": "str"}, + "file_version": {"key": "FileVersion", "type": "FileVersion"}, + "modified_date": {"key": "ModifiedDate", "type": "iso-8601"}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, } - def __init__(self, *, file_size: str=None, file_version=None, modified_date=None, store_relative_path: str=None, **kwargs) -> None: + def __init__( + self, *, file_size: str = None, file_version=None, modified_date=None, store_relative_path: str = None, **kwargs + ) -> None: super(FileInfo, self).__init__(**kwargs) self.file_size = file_size self.file_version = file_version @@ -10426,28 +12307,38 @@ class FileShareBackupStorageDescription(BackupStorageDescription): """ _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, + "storage_kind": {"required": True}, + "path": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "path": {"key": "Path", "type": "str"}, + "primary_user_name": {"key": "PrimaryUserName", "type": "str"}, + "primary_password": {"key": "PrimaryPassword", "type": "str"}, + "secondary_user_name": {"key": "SecondaryUserName", "type": "str"}, + "secondary_password": {"key": "SecondaryPassword", "type": "str"}, } - def __init__(self, *, path: str, friendly_name: str=None, primary_user_name: str=None, primary_password: str=None, secondary_user_name: str=None, secondary_password: str=None, **kwargs) -> None: + def __init__( + self, + *, + path: str, + friendly_name: str = None, + primary_user_name: str = None, + primary_password: str = None, + secondary_user_name: str = None, + secondary_password: str = None, + **kwargs + ) -> None: super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) self.path = path self.primary_user_name = primary_user_name self.primary_password = primary_password self.secondary_user_name = secondary_user_name self.secondary_password = secondary_password - self.storage_kind = 'FileShare' + self.storage_kind = "FileShare" class FileVersion(Model): @@ -10465,12 +12356,19 @@ class FileVersion(Model): """ _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + "version_number": {"key": "VersionNumber", "type": "str"}, + "epoch_data_loss_number": {"key": "EpochDataLossNumber", "type": "str"}, + "epoch_configuration_number": {"key": "EpochConfigurationNumber", "type": "str"}, } - def __init__(self, *, version_number: str=None, epoch_data_loss_number: str=None, epoch_configuration_number: str=None, **kwargs) -> None: + def __init__( + self, + *, + version_number: str = None, + epoch_data_loss_number: str = None, + epoch_configuration_number: str = None, + **kwargs + ) -> None: super(FileVersion, self).__init__(**kwargs) self.version_number = version_number self.epoch_data_loss_number = epoch_data_loss_number @@ -10489,11 +12387,11 @@ class FolderInfo(Model): """ _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, + "file_count": {"key": "FileCount", "type": "str"}, } - def __init__(self, *, store_relative_path: str=None, file_count: str=None, **kwargs) -> None: + def __init__(self, *, store_relative_path: str = None, file_count: str = None, **kwargs) -> None: super(FolderInfo, self).__init__(**kwargs) self.store_relative_path = store_relative_path self.file_count = file_count @@ -10510,11 +12408,11 @@ class FolderSizeInfo(Model): """ _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, + "folder_size": {"key": "FolderSize", "type": "str"}, } - def __init__(self, *, store_relative_path: str=None, folder_size: str=None, **kwargs) -> None: + def __init__(self, *, store_relative_path: str = None, folder_size: str = None, **kwargs) -> None: super(FolderSizeInfo, self).__init__(**kwargs) self.store_relative_path = store_relative_path self.folder_size = folder_size @@ -10534,19 +12432,19 @@ class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): """ _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, + "schedule_kind": {"required": True}, + "interval": {"required": True}, } _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, + "schedule_kind": {"key": "ScheduleKind", "type": "str"}, + "interval": {"key": "Interval", "type": "duration"}, } def __init__(self, *, interval, **kwargs) -> None: super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) self.interval = interval - self.schedule_kind = 'FrequencyBased' + self.schedule_kind = "FrequencyBased" class GatewayDestination(Model): @@ -10564,15 +12462,15 @@ class GatewayDestination(Model): """ _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, + "application_name": {"required": True}, + "service_name": {"required": True}, + "endpoint_name": {"required": True}, } _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + "application_name": {"key": "applicationName", "type": "str"}, + "service_name": {"key": "serviceName", "type": "str"}, + "endpoint_name": {"key": "endpointName", "type": "str"}, } def __init__(self, *, application_name: str, service_name: str, endpoint_name: str, **kwargs) -> None: @@ -10616,27 +12514,29 @@ class GatewayResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, + "name": {"required": True}, + "source_network": {"required": True}, + "destination_network": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "ip_address": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "source_network": {"key": "properties.sourceNetwork", "type": "NetworkRef"}, + "destination_network": {"key": "properties.destinationNetwork", "type": "NetworkRef"}, + "tcp": {"key": "properties.tcp", "type": "[TcpConfig]"}, + "http": {"key": "properties.http", "type": "[HttpConfig]"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "ip_address": {"key": "properties.ipAddress", "type": "str"}, } - def __init__(self, *, name: str, source_network, destination_network, description: str=None, tcp=None, http=None, **kwargs) -> None: + def __init__( + self, *, name: str, source_network, destination_network, description: str = None, tcp=None, http=None, **kwargs + ) -> None: super(GatewayResourceDescription, self).__init__(**kwargs) self.name = name self.description = description @@ -10680,19 +12580,28 @@ class GetBackupByStorageQueryDescription(Model): """ _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, + "storage": {"required": True}, + "backup_entity": {"required": True}, } _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + "start_date_time_filter": {"key": "StartDateTimeFilter", "type": "iso-8601"}, + "end_date_time_filter": {"key": "EndDateTimeFilter", "type": "iso-8601"}, + "latest": {"key": "Latest", "type": "bool"}, + "storage": {"key": "Storage", "type": "BackupStorageDescription"}, + "backup_entity": {"key": "BackupEntity", "type": "BackupEntity"}, } - def __init__(self, *, storage, backup_entity, start_date_time_filter=None, end_date_time_filter=None, latest: bool=False, **kwargs) -> None: + def __init__( + self, + *, + storage, + backup_entity, + start_date_time_filter=None, + end_date_time_filter=None, + latest: bool = False, + **kwargs + ) -> None: super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) self.start_date_time_filter = start_date_time_filter self.end_date_time_filter = end_date_time_filter @@ -10721,20 +12630,20 @@ class GetPropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "include_value": {"key": "IncludeValue", "type": "bool"}, } - def __init__(self, *, property_name: str, include_value: bool=False, **kwargs) -> None: + def __init__(self, *, property_name: str, include_value: bool = False, **kwargs) -> None: super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) self.include_value = include_value - self.kind = 'Get' + self.kind = "Get" class GuidPropertyValue(PropertyValue): @@ -10749,19 +12658,19 @@ class GuidPropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "str"}, } def __init__(self, *, data: str, **kwargs) -> None: super(GuidPropertyValue, self).__init__(**kwargs) self.data = data - self.kind = 'Guid' + self.kind = "Guid" class HealthEvaluationWrapper(Model): @@ -10774,7 +12683,7 @@ class HealthEvaluationWrapper(Model): """ _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + "health_evaluation": {"key": "HealthEvaluation", "type": "HealthEvaluation"}, } def __init__(self, *, health_evaluation=None, **kwargs) -> None: @@ -10861,23 +12770,35 @@ class HealthInformation(Model): """ _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, } _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_in_milli_seconds": {"key": "TimeToLiveInMilliSeconds", "type": "duration"}, + "description": {"key": "Description", "type": "str"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "health_report_id": {"key": "HealthReportId", "type": "str"}, } - def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + source_id: str, + property: str, + health_state, + time_to_live_in_milli_seconds=None, + description: str = None, + sequence_number: str = None, + remove_when_expired: bool = None, + health_report_id: str = None, + **kwargs + ) -> None: super(HealthInformation, self).__init__(**kwargs) self.source_id = source_id self.property = property @@ -11008,30 +12929,58 @@ class HealthEvent(HealthInformation): """ _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, is_expired: bool=None, source_utc_timestamp=None, last_modified_utc_timestamp=None, last_ok_transition_at=None, last_warning_transition_at=None, last_error_transition_at=None, **kwargs) -> None: - super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + } + + _attribute_map = { + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_in_milli_seconds": {"key": "TimeToLiveInMilliSeconds", "type": "duration"}, + "description": {"key": "Description", "type": "str"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "health_report_id": {"key": "HealthReportId", "type": "str"}, + "is_expired": {"key": "IsExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + "last_modified_utc_timestamp": {"key": "LastModifiedUtcTimestamp", "type": "iso-8601"}, + "last_ok_transition_at": {"key": "LastOkTransitionAt", "type": "iso-8601"}, + "last_warning_transition_at": {"key": "LastWarningTransitionAt", "type": "iso-8601"}, + "last_error_transition_at": {"key": "LastErrorTransitionAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + source_id: str, + property: str, + health_state, + time_to_live_in_milli_seconds=None, + description: str = None, + sequence_number: str = None, + remove_when_expired: bool = None, + health_report_id: str = None, + is_expired: bool = None, + source_utc_timestamp=None, + last_modified_utc_timestamp=None, + last_ok_transition_at=None, + last_warning_transition_at=None, + last_error_transition_at=None, + **kwargs + ) -> None: + super(HealthEvent, self).__init__( + source_id=source_id, + property=property, + health_state=health_state, + time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, + description=description, + sequence_number=sequence_number, + remove_when_expired=remove_when_expired, + health_report_id=health_report_id, + **kwargs + ) self.is_expired = is_expired self.source_utc_timestamp = source_utc_timestamp self.last_modified_utc_timestamp = last_modified_utc_timestamp @@ -11056,18 +13005,18 @@ class HealthStateCount(Model): """ _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, + "ok_count": {"minimum": 0}, + "warning_count": {"minimum": 0}, + "error_count": {"minimum": 0}, } _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + "ok_count": {"key": "OkCount", "type": "long"}, + "warning_count": {"key": "WarningCount", "type": "long"}, + "error_count": {"key": "ErrorCount", "type": "long"}, } - def __init__(self, *, ok_count: int=None, warning_count: int=None, error_count: int=None, **kwargs) -> None: + def __init__(self, *, ok_count: int = None, warning_count: int = None, error_count: int = None, **kwargs) -> None: super(HealthStateCount, self).__init__(**kwargs) self.ok_count = ok_count self.warning_count = warning_count @@ -11092,7 +13041,7 @@ class HealthStatistics(Model): """ _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + "health_state_count_list": {"key": "HealthStateCountList", "type": "[EntityKindHealthStateCount]"}, } def __init__(self, *, health_state_count_list=None, **kwargs) -> None: @@ -11116,15 +13065,15 @@ class HttpConfig(Model): """ _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, + "name": {"required": True}, + "port": {"required": True}, + "hosts": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + "name": {"key": "name", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "hosts": {"key": "hosts", "type": "[HttpHostConfig]"}, } def __init__(self, *, name: str, port: int, hosts, **kwargs) -> None: @@ -11148,13 +13097,13 @@ class HttpHostConfig(Model): """ _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, + "name": {"required": True}, + "routes": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + "name": {"key": "name", "type": "str"}, + "routes": {"key": "routes", "type": "[HttpRouteConfig]"}, } def __init__(self, *, name: str, routes, **kwargs) -> None: @@ -11178,15 +13127,15 @@ class HttpRouteConfig(Model): """ _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, + "name": {"required": True}, + "match": {"required": True}, + "destination": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + "name": {"key": "name", "type": "str"}, + "match": {"key": "match", "type": "HttpRouteMatchRule"}, + "destination": {"key": "destination", "type": "GatewayDestination"}, } def __init__(self, *, name: str, match, destination, **kwargs) -> None: @@ -11210,16 +13159,16 @@ class HttpRouteMatchHeader(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: str, value: str=None, type=None, **kwargs) -> None: + def __init__(self, *, name: str, value: str = None, type=None, **kwargs) -> None: super(HttpRouteMatchHeader, self).__init__(**kwargs) self.name = name self.value = value @@ -11244,19 +13193,19 @@ class HttpRouteMatchPath(Model): """ _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, + "value": {"required": True}, + "type": {"required": True, "constant": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "rewrite": {"key": "rewrite", "type": "str"}, + "type": {"key": "type", "type": "str"}, } type = "prefix" - def __init__(self, *, value: str, rewrite: str=None, **kwargs) -> None: + def __init__(self, *, value: str, rewrite: str = None, **kwargs) -> None: super(HttpRouteMatchPath, self).__init__(**kwargs) self.value = value self.rewrite = rewrite @@ -11274,12 +13223,12 @@ class HttpRouteMatchRule(Model): """ _validation = { - 'path': {'required': True}, + "path": {"required": True}, } _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + "path": {"key": "path", "type": "HttpRouteMatchPath"}, + "headers": {"key": "headers", "type": "[HttpRouteMatchHeader]"}, } def __init__(self, *, path, headers=None, **kwargs) -> None: @@ -11311,18 +13260,27 @@ class IdentityDescription(Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + "token_service_endpoint": {"key": "tokenServiceEndpoint", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{IdentityItemDescription}"}, } - def __init__(self, *, type: str, token_service_endpoint: str=None, tenant_id: str=None, principal_id: str=None, user_assigned_identities=None, **kwargs) -> None: + def __init__( + self, + *, + type: str, + token_service_endpoint: str = None, + tenant_id: str = None, + principal_id: str = None, + user_assigned_identities=None, + **kwargs + ) -> None: super(IdentityDescription, self).__init__(**kwargs) self.token_service_endpoint = token_service_endpoint self.type = type @@ -11343,11 +13301,11 @@ class IdentityItemDescription(Model): """ _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None: + def __init__(self, *, principal_id: str = None, client_id: str = None, **kwargs) -> None: super(IdentityItemDescription, self).__init__(**kwargs) self.principal_id = principal_id self.client_id = client_id @@ -11375,18 +13333,20 @@ class ImageRegistryCredential(Model): """ _validation = { - 'server': {'required': True}, - 'username': {'required': True}, + "server": {"required": True}, + "username": {"required": True}, } _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, + "server": {"key": "server", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password_type": {"key": "passwordType", "type": "str"}, + "password": {"key": "password", "type": "str"}, } - def __init__(self, *, server: str, username: str, password_type="ClearText", password: str=None, **kwargs) -> None: + def __init__( + self, *, server: str, username: str, password_type="ClearText", password: str = None, **kwargs + ) -> None: super(ImageRegistryCredential, self).__init__(**kwargs) self.server = server self.username = username @@ -11406,8 +13366,8 @@ class ImageStoreContent(Model): """ _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + "store_files": {"key": "StoreFiles", "type": "[FileInfo]"}, + "store_folders": {"key": "StoreFolders", "type": "[FolderInfo]"}, } def __init__(self, *, store_files=None, store_folders=None, **kwargs) -> None: @@ -11439,18 +13399,20 @@ class ImageStoreCopyDescription(Model): """ _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, + "remote_source": {"required": True}, + "remote_destination": {"required": True}, } _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + "remote_source": {"key": "RemoteSource", "type": "str"}, + "remote_destination": {"key": "RemoteDestination", "type": "str"}, + "skip_files": {"key": "SkipFiles", "type": "[str]"}, + "check_mark_file": {"key": "CheckMarkFile", "type": "bool"}, } - def __init__(self, *, remote_source: str, remote_destination: str, skip_files=None, check_mark_file: bool=None, **kwargs) -> None: + def __init__( + self, *, remote_source: str, remote_destination: str, skip_files=None, check_mark_file: bool = None, **kwargs + ) -> None: super(ImageStoreCopyDescription, self).__init__(**kwargs) self.remote_source = remote_source self.remote_destination = remote_destination @@ -11484,14 +13446,23 @@ class ImageStoreInfo(Model): """ _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + "disk_info": {"key": "DiskInfo", "type": "DiskInfo"}, + "used_by_metadata": {"key": "UsedByMetadata", "type": "UsageInfo"}, + "used_by_staging": {"key": "UsedByStaging", "type": "UsageInfo"}, + "used_by_copy": {"key": "UsedByCopy", "type": "UsageInfo"}, + "used_by_register": {"key": "UsedByRegister", "type": "UsageInfo"}, } - def __init__(self, *, disk_info=None, used_by_metadata=None, used_by_staging=None, used_by_copy=None, used_by_register=None, **kwargs) -> None: + def __init__( + self, + *, + disk_info=None, + used_by_metadata=None, + used_by_staging=None, + used_by_copy=None, + used_by_register=None, + **kwargs + ) -> None: super(ImageStoreInfo, self).__init__(**kwargs) self.disk_info = disk_info self.used_by_metadata = used_by_metadata @@ -11514,16 +13485,14 @@ class SecretResourcePropertiesBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } + _subtype_map = {"kind": {"SecretResourceProperties": "SecretResourceProperties"}} def __init__(self, **kwargs) -> None: super(SecretResourcePropertiesBase, self).__init__(**kwargs) @@ -11558,30 +13527,28 @@ class SecretResourceProperties(SecretResourcePropertiesBase): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "content_type": {"key": "contentType", "type": "str"}, } - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } + _subtype_map = {"kind": {"inlinedValue": "InlinedValueSecretResourceProperties"}} - def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: + def __init__(self, *, description: str = None, content_type: str = None, **kwargs) -> None: super(SecretResourceProperties, self).__init__(**kwargs) self.description = description self.status = None self.status_details = None self.content_type = content_type - self.kind = 'SecretResourceProperties' + self.kind = "SecretResourceProperties" class InlinedValueSecretResourceProperties(SecretResourceProperties): @@ -11613,22 +13580,24 @@ class InlinedValueSecretResourceProperties(SecretResourceProperties): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "content_type": {"key": "contentType", "type": "str"}, } - def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: - super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) - self.kind = 'inlinedValue' + def __init__(self, *, description: str = None, content_type: str = None, **kwargs) -> None: + super(InlinedValueSecretResourceProperties, self).__init__( + description=description, content_type=content_type, **kwargs + ) + self.kind = "inlinedValue" class InstanceLifecycleDescription(Model): @@ -11640,10 +13609,10 @@ class InstanceLifecycleDescription(Model): """ _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + "restore_replica_location_after_upgrade": {"key": "RestoreReplicaLocationAfterUpgrade", "type": "bool"}, } - def __init__(self, *, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + def __init__(self, *, restore_replica_location_after_upgrade: bool = None, **kwargs) -> None: super(InstanceLifecycleDescription, self).__init__(**kwargs) self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade @@ -11660,19 +13629,19 @@ class Int64PropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "str"}, } def __init__(self, *, data: str, **kwargs) -> None: super(Int64PropertyValue, self).__init__(**kwargs) self.data = data - self.kind = 'Int64' + self.kind = "Int64" class PartitionInformation(Model): @@ -11696,19 +13665,23 @@ class PartitionInformation(Model): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, } _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + "service_partition_kind": { + "Int64Range": "Int64RangePartitionInformation", + "Named": "NamedPartitionInformation", + "Singleton": "SingletonPartitionInformation", + } } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, **kwargs) -> None: super(PartitionInformation, self).__init__(**kwargs) self.id = id self.service_partition_kind = None @@ -11736,21 +13709,21 @@ class Int64RangePartitionInformation(PartitionInformation): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, + "low_key": {"key": "LowKey", "type": "str"}, + "high_key": {"key": "HighKey", "type": "str"}, } - def __init__(self, *, id: str=None, low_key: str=None, high_key: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, low_key: str = None, high_key: str = None, **kwargs) -> None: super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) self.low_key = low_key self.high_key = high_key - self.service_partition_kind = 'Int64Range' + self.service_partition_kind = "Int64Range" class InvokeDataLossResult(Model): @@ -11766,11 +13739,11 @@ class InvokeDataLossResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "selected_partition": {"key": "SelectedPartition", "type": "SelectedPartition"}, } - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + def __init__(self, *, error_code: int = None, selected_partition=None, **kwargs) -> None: super(InvokeDataLossResult, self).__init__(**kwargs) self.error_code = error_code self.selected_partition = selected_partition @@ -11789,11 +13762,11 @@ class InvokeQuorumLossResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "selected_partition": {"key": "SelectedPartition", "type": "SelectedPartition"}, } - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + def __init__(self, *, error_code: int = None, selected_partition=None, **kwargs) -> None: super(InvokeQuorumLossResult, self).__init__(**kwargs) self.error_code = error_code self.selected_partition = selected_partition @@ -11812,16 +13785,14 @@ class ReplicaStatusBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } + _subtype_map = {"kind": {"KeyValueStore": "KeyValueStoreReplicaStatus"}} def __init__(self, **kwargs) -> None: super(ReplicaStatusBase, self).__init__(**kwargs) @@ -11855,26 +13826,35 @@ class KeyValueStoreReplicaStatus(ReplicaStatusBase): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "database_row_count_estimate": {"key": "DatabaseRowCountEstimate", "type": "str"}, + "database_logical_size_estimate": {"key": "DatabaseLogicalSizeEstimate", "type": "str"}, + "copy_notification_current_key_filter": {"key": "CopyNotificationCurrentKeyFilter", "type": "str"}, + "copy_notification_current_progress": {"key": "CopyNotificationCurrentProgress", "type": "str"}, + "status_details": {"key": "StatusDetails", "type": "str"}, } - def __init__(self, *, database_row_count_estimate: str=None, database_logical_size_estimate: str=None, copy_notification_current_key_filter: str=None, copy_notification_current_progress: str=None, status_details: str=None, **kwargs) -> None: + def __init__( + self, + *, + database_row_count_estimate: str = None, + database_logical_size_estimate: str = None, + copy_notification_current_key_filter: str = None, + copy_notification_current_progress: str = None, + status_details: str = None, + **kwargs + ) -> None: super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) self.database_row_count_estimate = database_row_count_estimate self.database_logical_size_estimate = database_logical_size_estimate self.copy_notification_current_key_filter = copy_notification_current_key_filter self.copy_notification_current_progress = copy_notification_current_progress self.status_details = status_details - self.kind = 'KeyValueStore' + self.kind = "KeyValueStore" class LoadedPartitionInformationQueryDescription(Model): @@ -11906,14 +13886,23 @@ class LoadedPartitionInformationQueryDescription(Model): """ _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + "metric_name": {"key": "MetricName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "ordering": {"key": "Ordering", "type": "str"}, + "max_results": {"key": "MaxResults", "type": "long"}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, } - def __init__(self, *, metric_name: str=None, service_name: str=None, ordering="Desc", max_results: int=None, continuation_token: str=None, **kwargs) -> None: + def __init__( + self, + *, + metric_name: str = None, + service_name: str = None, + ordering="Desc", + max_results: int = None, + continuation_token: str = None, + **kwargs + ) -> None: super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) self.metric_name = metric_name self.service_name = service_name @@ -11940,17 +13929,17 @@ class LoadedPartitionInformationResult(Model): """ _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, + "service_name": {"required": True}, + "partition_id": {"required": True}, + "metric_name": {"required": True}, + "load": {"required": True}, } _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "metric_name": {"key": "MetricName", "type": "str"}, + "load": {"key": "Load", "type": "long"}, } def __init__(self, *, service_name: str, partition_id: str, metric_name: str, load: int, **kwargs) -> None: @@ -11978,11 +13967,11 @@ class LoadedPartitionInformationResultList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[LoadedPartitionInformationResult]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(LoadedPartitionInformationResultList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -12071,34 +14060,63 @@ class LoadMetricInformation(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, is_balanced_before: bool=None, is_balanced_after: bool=None, deviation_before: str=None, deviation_after: str=None, balancing_threshold: str=None, action: str=None, activity_threshold: str=None, cluster_capacity: str=None, cluster_load: str=None, current_cluster_load: str=None, cluster_remaining_capacity: str=None, cluster_capacity_remaining: str=None, is_cluster_capacity_violation: bool=None, node_buffer_percentage: str=None, cluster_buffered_capacity: str=None, buffered_cluster_capacity_remaining: str=None, cluster_remaining_buffered_capacity: str=None, min_node_load_value: str=None, minimum_node_load: str=None, min_node_load_node_id=None, max_node_load_value: str=None, maximum_node_load: str=None, max_node_load_node_id=None, planned_load_removal: str=None, **kwargs) -> None: + "name": {"key": "Name", "type": "str"}, + "is_balanced_before": {"key": "IsBalancedBefore", "type": "bool"}, + "is_balanced_after": {"key": "IsBalancedAfter", "type": "bool"}, + "deviation_before": {"key": "DeviationBefore", "type": "str"}, + "deviation_after": {"key": "DeviationAfter", "type": "str"}, + "balancing_threshold": {"key": "BalancingThreshold", "type": "str"}, + "action": {"key": "Action", "type": "str"}, + "activity_threshold": {"key": "ActivityThreshold", "type": "str"}, + "cluster_capacity": {"key": "ClusterCapacity", "type": "str"}, + "cluster_load": {"key": "ClusterLoad", "type": "str"}, + "current_cluster_load": {"key": "CurrentClusterLoad", "type": "str"}, + "cluster_remaining_capacity": {"key": "ClusterRemainingCapacity", "type": "str"}, + "cluster_capacity_remaining": {"key": "ClusterCapacityRemaining", "type": "str"}, + "is_cluster_capacity_violation": {"key": "IsClusterCapacityViolation", "type": "bool"}, + "node_buffer_percentage": {"key": "NodeBufferPercentage", "type": "str"}, + "cluster_buffered_capacity": {"key": "ClusterBufferedCapacity", "type": "str"}, + "buffered_cluster_capacity_remaining": {"key": "BufferedClusterCapacityRemaining", "type": "str"}, + "cluster_remaining_buffered_capacity": {"key": "ClusterRemainingBufferedCapacity", "type": "str"}, + "min_node_load_value": {"key": "MinNodeLoadValue", "type": "str"}, + "minimum_node_load": {"key": "MinimumNodeLoad", "type": "str"}, + "min_node_load_node_id": {"key": "MinNodeLoadNodeId", "type": "NodeId"}, + "max_node_load_value": {"key": "MaxNodeLoadValue", "type": "str"}, + "maximum_node_load": {"key": "MaximumNodeLoad", "type": "str"}, + "max_node_load_node_id": {"key": "MaxNodeLoadNodeId", "type": "NodeId"}, + "planned_load_removal": {"key": "PlannedLoadRemoval", "type": "str"}, + } + + def __init__( + self, + *, + name: str = None, + is_balanced_before: bool = None, + is_balanced_after: bool = None, + deviation_before: str = None, + deviation_after: str = None, + balancing_threshold: str = None, + action: str = None, + activity_threshold: str = None, + cluster_capacity: str = None, + cluster_load: str = None, + current_cluster_load: str = None, + cluster_remaining_capacity: str = None, + cluster_capacity_remaining: str = None, + is_cluster_capacity_violation: bool = None, + node_buffer_percentage: str = None, + cluster_buffered_capacity: str = None, + buffered_cluster_capacity_remaining: str = None, + cluster_remaining_buffered_capacity: str = None, + min_node_load_value: str = None, + minimum_node_load: str = None, + min_node_load_node_id=None, + max_node_load_value: str = None, + maximum_node_load: str = None, + max_node_load_node_id=None, + planned_load_removal: str = None, + **kwargs + ) -> None: super(LoadMetricInformation, self).__init__(**kwargs) self.name = name self.is_balanced_before = is_balanced_before @@ -12143,13 +14161,15 @@ class LoadMetricReport(Model): """ _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + "last_reported_utc": {"key": "LastReportedUtc", "type": "iso-8601"}, + "name": {"key": "Name", "type": "str"}, + "value": {"key": "Value", "type": "str"}, + "current_value": {"key": "CurrentValue", "type": "str"}, } - def __init__(self, *, last_reported_utc=None, name: str=None, value: str=None, current_value: str=None, **kwargs) -> None: + def __init__( + self, *, last_reported_utc=None, name: str = None, value: str = None, current_value: str = None, **kwargs + ) -> None: super(LoadMetricReport, self).__init__(**kwargs) self.last_reported_utc = last_reported_utc self.name = name @@ -12172,13 +14192,15 @@ class LoadMetricReportInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + "name": {"key": "Name", "type": "str"}, + "value": {"key": "Value", "type": "int"}, + "current_value": {"key": "CurrentValue", "type": "str"}, + "last_reported_utc": {"key": "LastReportedUtc", "type": "iso-8601"}, } - def __init__(self, *, name: str=None, value: int=None, current_value: str=None, last_reported_utc=None, **kwargs) -> None: + def __init__( + self, *, name: str = None, value: int = None, current_value: str = None, last_reported_utc=None, **kwargs + ) -> None: super(LoadMetricReportInfo, self).__init__(**kwargs) self.name = name self.value = value @@ -12200,16 +14222,14 @@ class NetworkResourcePropertiesBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, } - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } + _subtype_map = {"kind": {"NetworkResourceProperties": "NetworkResourceProperties"}} def __init__(self, **kwargs) -> None: super(NetworkResourcePropertiesBase, self).__init__(**kwargs) @@ -12240,28 +14260,26 @@ class NetworkResourceProperties(NetworkResourcePropertiesBase): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, } - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } + _subtype_map = {"kind": {"Local": "LocalNetworkResourceProperties"}} - def __init__(self, *, description: str=None, **kwargs) -> None: + def __init__(self, *, description: str = None, **kwargs) -> None: super(NetworkResourceProperties, self).__init__(**kwargs) self.description = description self.status = None self.status_details = None - self.kind = 'NetworkResourceProperties' + self.kind = "NetworkResourceProperties" class LocalNetworkResourceProperties(NetworkResourceProperties): @@ -12289,23 +14307,23 @@ class LocalNetworkResourceProperties(NetworkResourceProperties): """ _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, + "kind": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, } _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + "kind": {"key": "kind", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "network_address_prefix": {"key": "networkAddressPrefix", "type": "str"}, } - def __init__(self, *, description: str=None, network_address_prefix: str=None, **kwargs) -> None: + def __init__(self, *, description: str = None, network_address_prefix: str = None, **kwargs) -> None: super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) self.network_address_prefix = network_address_prefix - self.kind = 'Local' + self.kind = "Local" class ManagedApplicationIdentity(Model): @@ -12320,15 +14338,15 @@ class ManagedApplicationIdentity(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "principal_id": {"key": "PrincipalId", "type": "str"}, } - def __init__(self, *, name: str, principal_id: str=None, **kwargs) -> None: + def __init__(self, *, name: str, principal_id: str = None, **kwargs) -> None: super(ManagedApplicationIdentity, self).__init__(**kwargs) self.name = name self.principal_id = principal_id @@ -12345,11 +14363,11 @@ class ManagedApplicationIdentityDescription(Model): """ _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + "token_service_endpoint": {"key": "TokenServiceEndpoint", "type": "str"}, + "managed_identities": {"key": "ManagedIdentities", "type": "[ManagedApplicationIdentity]"}, } - def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, **kwargs) -> None: + def __init__(self, *, token_service_endpoint: str = None, managed_identities=None, **kwargs) -> None: super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) self.token_service_endpoint = token_service_endpoint self.managed_identities = managed_identities @@ -12379,26 +14397,28 @@ class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription) """ _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, + "storage_kind": {"required": True}, + "managed_identity_type": {"required": True}, + "blob_service_uri": {"required": True}, + "container_name": {"required": True}, } _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, + "friendly_name": {"key": "FriendlyName", "type": "str"}, + "storage_kind": {"key": "StorageKind", "type": "str"}, + "managed_identity_type": {"key": "ManagedIdentityType", "type": "str"}, + "blob_service_uri": {"key": "BlobServiceUri", "type": "str"}, + "container_name": {"key": "ContainerName", "type": "str"}, } - def __init__(self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + def __init__( + self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str = None, **kwargs + ) -> None: super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) self.managed_identity_type = managed_identity_type self.blob_service_uri = blob_service_uri self.container_name = container_name - self.storage_kind = 'ManagedIdentityAzureBlobStore' + self.storage_kind = "ManagedIdentityAzureBlobStore" class MetricLoadDescription(Model): @@ -12416,12 +14436,14 @@ class MetricLoadDescription(Model): """ _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + "metric_name": {"key": "MetricName", "type": "str"}, + "current_load": {"key": "CurrentLoad", "type": "long"}, + "predicted_load": {"key": "PredictedLoad", "type": "long"}, } - def __init__(self, *, metric_name: str=None, current_load: int=None, predicted_load: int=None, **kwargs) -> None: + def __init__( + self, *, metric_name: str = None, current_load: int = None, predicted_load: int = None, **kwargs + ) -> None: super(MetricLoadDescription, self).__init__(**kwargs) self.metric_name = metric_name self.current_load = current_load @@ -12471,15 +14493,28 @@ class MonitoringPolicyDescription(Model): """ _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__(self, *, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, **kwargs) -> None: + "failure_action": {"key": "FailureAction", "type": "str"}, + "health_check_wait_duration_in_milliseconds": {"key": "HealthCheckWaitDurationInMilliseconds", "type": "str"}, + "health_check_stable_duration_in_milliseconds": { + "key": "HealthCheckStableDurationInMilliseconds", + "type": "str", + }, + "health_check_retry_timeout_in_milliseconds": {"key": "HealthCheckRetryTimeoutInMilliseconds", "type": "str"}, + "upgrade_timeout_in_milliseconds": {"key": "UpgradeTimeoutInMilliseconds", "type": "str"}, + "upgrade_domain_timeout_in_milliseconds": {"key": "UpgradeDomainTimeoutInMilliseconds", "type": "str"}, + } + + def __init__( + self, + *, + failure_action=None, + health_check_wait_duration_in_milliseconds: str = None, + health_check_stable_duration_in_milliseconds: str = None, + health_check_retry_timeout_in_milliseconds: str = None, + upgrade_timeout_in_milliseconds: str = None, + upgrade_domain_timeout_in_milliseconds: str = None, + **kwargs + ) -> None: super(MonitoringPolicyDescription, self).__init__(**kwargs) self.failure_action = failure_action self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds @@ -12500,11 +14535,11 @@ class NameDescription(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, } def __init__(self, *, name: str, **kwargs) -> None: @@ -12531,19 +14566,19 @@ class NamedPartitionInformation(PartitionInformation): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, name: str = None, **kwargs) -> None: super(NamedPartitionInformation, self).__init__(id=id, **kwargs) self.name = name - self.service_partition_kind = 'Named' + self.service_partition_kind = "Named" class PartitionSchemeDescription(Model): @@ -12561,15 +14596,19 @@ class PartitionSchemeDescription(Model): """ _validation = { - 'partition_scheme': {'required': True}, + "partition_scheme": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, } _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + "partition_scheme": { + "Named": "NamedPartitionSchemeDescription", + "Singleton": "SingletonPartitionSchemeDescription", + "UniformInt64Range": "UniformInt64RangePartitionSchemeDescription", + } } def __init__(self, **kwargs) -> None: @@ -12592,22 +14631,22 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription): """ _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, + "partition_scheme": {"required": True}, + "count": {"required": True}, + "names": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, + "count": {"key": "Count", "type": "int"}, + "names": {"key": "Names", "type": "[str]"}, } def __init__(self, *, count: int, names, **kwargs) -> None: super(NamedPartitionSchemeDescription, self).__init__(**kwargs) self.count = count self.names = names - self.partition_scheme = 'Named' + self.partition_scheme = "Named" class NetworkRef(Model): @@ -12621,11 +14660,11 @@ class NetworkRef(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + "name": {"key": "name", "type": "str"}, + "endpoint_refs": {"key": "endpointRefs", "type": "[EndpointRef]"}, } - def __init__(self, *, name: str=None, endpoint_refs=None, **kwargs) -> None: + def __init__(self, *, name: str = None, endpoint_refs=None, **kwargs) -> None: super(NetworkRef, self).__init__(**kwargs) self.name = name self.endpoint_refs = endpoint_refs @@ -12643,13 +14682,13 @@ class NetworkResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, + "name": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "NetworkResourceProperties"}, } def __init__(self, *, name: str, properties, **kwargs) -> None: @@ -12696,39 +14735,63 @@ class NodeAbortedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "node_id": {"required": True}, + "upgrade_domain": {"required": True}, + "fault_domain": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "hostname": {"required": True}, + "is_seed_node": {"required": True}, + "node_version": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_id": {"key": "NodeId", "type": "str"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "hostname": {"key": "Hostname", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "node_version": {"key": "NodeVersion", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + node_id: str, + upgrade_domain: str, + fault_domain: str, + ip_address_or_fqdn: str, + hostname: str, + is_seed_node: bool, + node_version: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeAbortedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.node_id = node_id self.upgrade_domain = upgrade_domain @@ -12737,7 +14800,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_i self.hostname = hostname self.is_seed_node = is_seed_node self.node_version = node_version - self.kind = 'NodeAborted' + self.kind = "NodeAborted" class NodeAddedToClusterEvent(NodeEvent): @@ -12774,42 +14837,64 @@ class NodeAddedToClusterEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_id": {"required": True}, + "node_instance": {"required": True}, + "node_type": {"required": True}, + "fabric_version": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "node_capacities": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_id": {"key": "NodeId", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_type": {"key": "NodeType", "type": "str"}, + "fabric_version": {"key": "FabricVersion", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "node_capacities": {"key": "NodeCapacities", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_id: str, + node_instance: int, + node_type: str, + fabric_version: str, + ip_address_or_fqdn: str, + node_capacities: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeAddedToClusterEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_id = node_id self.node_instance = node_instance self.node_type = node_type self.fabric_version = fabric_version self.ip_address_or_fqdn = ip_address_or_fqdn self.node_capacities = node_capacities - self.kind = 'NodeAddedToCluster' + self.kind = "NodeAddedToCluster" class NodeClosedEvent(NodeEvent): @@ -12840,33 +14925,52 @@ class NodeClosedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_id": {"required": True}, + "node_instance": {"required": True}, + "error": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_id": {"key": "NodeId", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "error": {"key": "Error", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_id: str, + node_instance: int, + error: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeClosedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_id = node_id self.node_instance = node_instance self.error = error - self.kind = 'NodeClosed' + self.kind = "NodeClosed" class NodeDeactivateCompletedEvent(NodeEvent): @@ -12899,36 +15003,56 @@ class NodeDeactivateCompletedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, effective_deactivate_intent: str, batch_ids_with_deactivate_intent: str, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "effective_deactivate_intent": {"required": True}, + "batch_ids_with_deactivate_intent": {"required": True}, + "start_time": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "effective_deactivate_intent": {"key": "EffectiveDeactivateIntent", "type": "str"}, + "batch_ids_with_deactivate_intent": {"key": "BatchIdsWithDeactivateIntent", "type": "str"}, + "start_time": {"key": "StartTime", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + effective_deactivate_intent: str, + batch_ids_with_deactivate_intent: str, + start_time, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeDeactivateCompletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.effective_deactivate_intent = effective_deactivate_intent self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent self.start_time = start_time - self.kind = 'NodeDeactivateCompleted' + self.kind = "NodeDeactivateCompleted" class NodeDeactivateStartedEvent(NodeEvent): @@ -12959,33 +15083,52 @@ class NodeDeactivateStartedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, batch_id: str, deactivate_intent: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "batch_id": {"required": True}, + "deactivate_intent": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "batch_id": {"key": "BatchId", "type": "str"}, + "deactivate_intent": {"key": "DeactivateIntent", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + batch_id: str, + deactivate_intent: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeDeactivateStartedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.batch_id = batch_id self.deactivate_intent = deactivate_intent - self.kind = 'NodeDeactivateStarted' + self.kind = "NodeDeactivateStarted" class NodeDeactivationInfo(Model): @@ -13012,13 +15155,21 @@ class NodeDeactivationInfo(Model): """ _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + "node_deactivation_intent": {"key": "NodeDeactivationIntent", "type": "str"}, + "node_deactivation_status": {"key": "NodeDeactivationStatus", "type": "str"}, + "node_deactivation_task": {"key": "NodeDeactivationTask", "type": "[NodeDeactivationTask]"}, + "pending_safety_checks": {"key": "PendingSafetyChecks", "type": "[SafetyCheckWrapper]"}, } - def __init__(self, *, node_deactivation_intent=None, node_deactivation_status=None, node_deactivation_task=None, pending_safety_checks=None, **kwargs) -> None: + def __init__( + self, + *, + node_deactivation_intent=None, + node_deactivation_status=None, + node_deactivation_task=None, + pending_safety_checks=None, + **kwargs + ) -> None: super(NodeDeactivationInfo, self).__init__(**kwargs) self.node_deactivation_intent = node_deactivation_intent self.node_deactivation_status = node_deactivation_status @@ -13041,8 +15192,8 @@ class NodeDeactivationTask(Model): """ _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + "node_deactivation_task_id": {"key": "NodeDeactivationTaskId", "type": "NodeDeactivationTaskId"}, + "node_deactivation_intent": {"key": "NodeDeactivationIntent", "type": "str"}, } def __init__(self, *, node_deactivation_task_id=None, node_deactivation_intent=None, **kwargs) -> None: @@ -13064,11 +15215,11 @@ class NodeDeactivationTaskId(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "node_deactivation_task_type": {"key": "NodeDeactivationTaskType", "type": "str"}, } - def __init__(self, *, id: str=None, node_deactivation_task_type=None, **kwargs) -> None: + def __init__(self, *, id: str = None, node_deactivation_task_type=None, **kwargs) -> None: super(NodeDeactivationTaskId, self).__init__(**kwargs) self.id = id self.node_deactivation_task_type = node_deactivation_task_type @@ -13100,30 +15251,48 @@ class NodeDownEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_up_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "last_node_up_at": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "last_node_up_at": {"key": "LastNodeUpAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + last_node_up_at, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeDownEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.last_node_up_at = last_node_up_at - self.kind = 'NodeDown' + self.kind = "NodeDown" class NodeHealth(EntityHealth): @@ -13152,15 +15321,30 @@ class NodeHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, **kwargs) -> None: - super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + name: str = None, + **kwargs + ) -> None: + super(NodeHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.name = name @@ -13193,22 +15377,32 @@ class NodeHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + node_name: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(NodeHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.node_name = node_name self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Node' + self.kind = "Node" class NodeHealthReportExpiredEvent(NodeEvent): @@ -13252,41 +15446,66 @@ class NodeHealthReportExpiredEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance_id = node_instance_id self.source_id = source_id self.property = property @@ -13296,7 +15515,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_i self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'NodeHealthReportExpired' + self.kind = "NodeHealthReportExpired" class NodeHealthState(EntityHealthState): @@ -13317,12 +15536,12 @@ class NodeHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "id": {"key": "Id", "type": "NodeId"}, } - def __init__(self, *, aggregated_health_state=None, name: str=None, id=None, **kwargs) -> None: + def __init__(self, *, aggregated_health_state=None, name: str = None, id=None, **kwargs) -> None: super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) self.name = name self.id = id @@ -13341,11 +15560,11 @@ class NodeHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, } - def __init__(self, *, health_state=None, node_name: str=None, **kwargs) -> None: + def __init__(self, *, health_state=None, node_name: str = None, **kwargs) -> None: super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.node_name = node_name @@ -13364,11 +15583,11 @@ class NodeHealthStateChunkList(EntityHealthStateChunkList): """ _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + "total_count": {"key": "TotalCount", "type": "long"}, + "items": {"key": "Items", "type": "[NodeHealthStateChunk]"}, } - def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: + def __init__(self, *, total_count: int = None, items=None, **kwargs) -> None: super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) self.items = items @@ -13417,11 +15636,11 @@ class NodeHealthStateFilter(Model): """ _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + "node_name_filter": {"key": "NodeNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, } - def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + def __init__(self, *, node_name_filter: str = None, health_state_filter: int = 0, **kwargs) -> None: super(NodeHealthStateFilter, self).__init__(**kwargs) self.node_name_filter = node_name_filter self.health_state_filter = health_state_filter @@ -13436,10 +15655,10 @@ class NodeId(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, **kwargs) -> None: super(NodeId, self).__init__(**kwargs) self.id = id @@ -13459,12 +15678,12 @@ class NodeImpact(Model): """ _validation = { - 'node_name': {'required': True}, + "node_name": {"required": True}, } _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + "node_name": {"key": "NodeName", "type": "str"}, + "impact_level": {"key": "ImpactLevel", "type": "str"}, } def __init__(self, *, node_name: str, impact_level=None, **kwargs) -> None: @@ -13544,30 +15763,55 @@ class NodeInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, - 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, node_tags=None, is_node_by_node_upgrade_in_progress: bool=None, infrastructure_placement_id: str=None, **kwargs) -> None: + "name": {"key": "Name", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "type": {"key": "Type", "type": "str"}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "node_status": {"key": "NodeStatus", "type": "str"}, + "node_up_time_in_seconds": {"key": "NodeUpTimeInSeconds", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "id": {"key": "Id", "type": "NodeId"}, + "instance_id": {"key": "InstanceId", "type": "str"}, + "node_deactivation_info": {"key": "NodeDeactivationInfo", "type": "NodeDeactivationInfo"}, + "is_stopped": {"key": "IsStopped", "type": "bool"}, + "node_down_time_in_seconds": {"key": "NodeDownTimeInSeconds", "type": "str"}, + "node_up_at": {"key": "NodeUpAt", "type": "iso-8601"}, + "node_down_at": {"key": "NodeDownAt", "type": "iso-8601"}, + "node_tags": {"key": "NodeTags", "type": "[str]"}, + "is_node_by_node_upgrade_in_progress": {"key": "IsNodeByNodeUpgradeInProgress", "type": "bool"}, + "infrastructure_placement_id": {"key": "InfrastructurePlacementID", "type": "str"}, + } + + def __init__( + self, + *, + name: str = None, + ip_address_or_fqdn: str = None, + type: str = None, + code_version: str = None, + config_version: str = None, + node_status=None, + node_up_time_in_seconds: str = None, + health_state=None, + is_seed_node: bool = None, + upgrade_domain: str = None, + fault_domain: str = None, + id=None, + instance_id: str = None, + node_deactivation_info=None, + is_stopped: bool = None, + node_down_time_in_seconds: str = None, + node_up_at=None, + node_down_at=None, + node_tags=None, + is_node_by_node_upgrade_in_progress: bool = None, + infrastructure_placement_id: str = None, + **kwargs + ) -> None: super(NodeInfo, self).__init__(**kwargs) self.name = name self.ip_address_or_fqdn = ip_address_or_fqdn @@ -13606,11 +15850,11 @@ class NodeLoadInfo(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_load_metric_information": {"key": "NodeLoadMetricInformation", "type": "[NodeLoadMetricInformation]"}, } - def __init__(self, *, node_name: str=None, node_load_metric_information=None, **kwargs) -> None: + def __init__(self, *, node_name: str = None, node_load_metric_information=None, **kwargs) -> None: super(NodeLoadInfo, self).__init__(**kwargs) self.node_name = node_name self.node_load_metric_information = node_load_metric_information @@ -13660,20 +15904,35 @@ class NodeLoadMetricInformation(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, node_capacity: str=None, node_load: str=None, node_remaining_capacity: str=None, is_capacity_violation: bool=None, node_buffered_capacity: str=None, node_remaining_buffered_capacity: str=None, current_node_load: str=None, node_capacity_remaining: str=None, buffered_node_capacity_remaining: str=None, planned_node_load_removal: str=None, **kwargs) -> None: + "name": {"key": "Name", "type": "str"}, + "node_capacity": {"key": "NodeCapacity", "type": "str"}, + "node_load": {"key": "NodeLoad", "type": "str"}, + "node_remaining_capacity": {"key": "NodeRemainingCapacity", "type": "str"}, + "is_capacity_violation": {"key": "IsCapacityViolation", "type": "bool"}, + "node_buffered_capacity": {"key": "NodeBufferedCapacity", "type": "str"}, + "node_remaining_buffered_capacity": {"key": "NodeRemainingBufferedCapacity", "type": "str"}, + "current_node_load": {"key": "CurrentNodeLoad", "type": "str"}, + "node_capacity_remaining": {"key": "NodeCapacityRemaining", "type": "str"}, + "buffered_node_capacity_remaining": {"key": "BufferedNodeCapacityRemaining", "type": "str"}, + "planned_node_load_removal": {"key": "PlannedNodeLoadRemoval", "type": "str"}, + } + + def __init__( + self, + *, + name: str = None, + node_capacity: str = None, + node_load: str = None, + node_remaining_capacity: str = None, + is_capacity_violation: bool = None, + node_buffered_capacity: str = None, + node_remaining_buffered_capacity: str = None, + current_node_load: str = None, + node_capacity_remaining: str = None, + buffered_node_capacity_remaining: str = None, + planned_node_load_removal: str = None, + **kwargs + ) -> None: super(NodeLoadMetricInformation, self).__init__(**kwargs) self.name = name self.node_capacity = node_capacity @@ -13729,41 +15988,66 @@ class NodeNewHealthReportEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance_id = node_instance_id self.source_id = source_id self.property = property @@ -13773,7 +16057,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_i self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'NodeNewHealthReport' + self.kind = "NodeNewHealthReport" class NodeOpenFailedEvent(NodeEvent): @@ -13816,41 +16100,66 @@ class NodeOpenFailedEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "node_id": {"required": True}, + "upgrade_domain": {"required": True}, + "fault_domain": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "hostname": {"required": True}, + "is_seed_node": {"required": True}, + "node_version": {"required": True}, + "error": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_id": {"key": "NodeId", "type": "str"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "hostname": {"key": "Hostname", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "node_version": {"key": "NodeVersion", "type": "str"}, + "error": {"key": "Error", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + node_id: str, + upgrade_domain: str, + fault_domain: str, + ip_address_or_fqdn: str, + hostname: str, + is_seed_node: bool, + node_version: str, + error: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeOpenFailedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.node_id = node_id self.upgrade_domain = upgrade_domain @@ -13860,7 +16169,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_i self.is_seed_node = is_seed_node self.node_version = node_version self.error = error - self.kind = 'NodeOpenFailed' + self.kind = "NodeOpenFailed" class NodeOpenSucceededEvent(NodeEvent): @@ -13901,39 +16210,63 @@ class NodeOpenSucceededEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "node_id": {"required": True}, + "upgrade_domain": {"required": True}, + "fault_domain": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "hostname": {"required": True}, + "is_seed_node": {"required": True}, + "node_version": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_id": {"key": "NodeId", "type": "str"}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, + "fault_domain": {"key": "FaultDomain", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "hostname": {"key": "Hostname", "type": "str"}, + "is_seed_node": {"key": "IsSeedNode", "type": "bool"}, + "node_version": {"key": "NodeVersion", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + node_id: str, + upgrade_domain: str, + fault_domain: str, + ip_address_or_fqdn: str, + hostname: str, + is_seed_node: bool, + node_version: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeOpenSucceededEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.node_id = node_id self.upgrade_domain = upgrade_domain @@ -13942,7 +16275,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_i self.hostname = hostname self.is_seed_node = is_seed_node self.node_version = node_version - self.kind = 'NodeOpenSucceeded' + self.kind = "NodeOpenSucceeded" class NodeRemovedFromClusterEvent(NodeEvent): @@ -13979,42 +16312,64 @@ class NodeRemovedFromClusterEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_id": {"required": True}, + "node_instance": {"required": True}, + "node_type": {"required": True}, + "fabric_version": {"required": True}, + "ip_address_or_fqdn": {"required": True}, + "node_capacities": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_id": {"key": "NodeId", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "node_type": {"key": "NodeType", "type": "str"}, + "fabric_version": {"key": "FabricVersion", "type": "str"}, + "ip_address_or_fqdn": {"key": "IpAddressOrFQDN", "type": "str"}, + "node_capacities": {"key": "NodeCapacities", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_id: str, + node_instance: int, + node_type: str, + fabric_version: str, + ip_address_or_fqdn: str, + node_capacities: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeRemovedFromClusterEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_id = node_id self.node_instance = node_instance self.node_type = node_type self.fabric_version = fabric_version self.ip_address_or_fqdn = ip_address_or_fqdn self.node_capacities = node_capacities - self.kind = 'NodeRemovedFromCluster' + self.kind = "NodeRemovedFromCluster" class RepairImpactDescriptionBase(Model): @@ -14032,16 +16387,14 @@ class RepairImpactDescriptionBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } + _subtype_map = {"kind": {"Node": "NodeRepairImpactDescription"}} def __init__(self, **kwargs) -> None: super(RepairImpactDescriptionBase, self).__init__(**kwargs) @@ -14063,18 +16416,18 @@ class NodeRepairImpactDescription(RepairImpactDescriptionBase): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + "kind": {"key": "Kind", "type": "str"}, + "node_impact_list": {"key": "NodeImpactList", "type": "[NodeImpact]"}, } def __init__(self, *, node_impact_list=None, **kwargs) -> None: super(NodeRepairImpactDescription, self).__init__(**kwargs) self.node_impact_list = node_impact_list - self.kind = 'Node' + self.kind = "Node" class RepairTargetDescriptionBase(Model): @@ -14092,16 +16445,14 @@ class RepairTargetDescriptionBase(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } + _subtype_map = {"kind": {"Node": "NodeRepairTargetDescription"}} def __init__(self, **kwargs) -> None: super(RepairTargetDescriptionBase, self).__init__(**kwargs) @@ -14122,18 +16473,18 @@ class NodeRepairTargetDescription(RepairTargetDescriptionBase): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + "kind": {"key": "Kind", "type": "str"}, + "node_names": {"key": "NodeNames", "type": "[str]"}, } def __init__(self, *, node_names=None, **kwargs) -> None: super(NodeRepairTargetDescription, self).__init__(**kwargs) self.node_names = node_names - self.kind = 'Node' + self.kind = "Node" class NodeResult(Model): @@ -14147,11 +16498,11 @@ class NodeResult(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "str"}, } - def __init__(self, *, node_name: str=None, node_instance_id: str=None, **kwargs) -> None: + def __init__(self, *, node_name: str = None, node_instance_id: str = None, **kwargs) -> None: super(NodeResult, self).__init__(**kwargs) self.node_name = node_name self.node_instance_id = node_instance_id @@ -14189,24 +16540,35 @@ class NodesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + max_percent_unhealthy_nodes: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(NodesHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Nodes' + self.kind = "Nodes" class NodeTagsDescription(Model): @@ -14222,13 +16584,13 @@ class NodeTagsDescription(Model): """ _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, + "count": {"required": True}, + "tags": {"required": True}, } _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, + "count": {"key": "Count", "type": "int"}, + "tags": {"key": "Tags", "type": "[str]"}, } def __init__(self, *, count: int, tags, **kwargs) -> None: @@ -14254,8 +16616,8 @@ class NodeTransitionProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + "state": {"key": "State", "type": "str"}, + "node_transition_result": {"key": "NodeTransitionResult", "type": "NodeTransitionResult"}, } def __init__(self, *, state=None, node_transition_result=None, **kwargs) -> None: @@ -14277,11 +16639,11 @@ class NodeTransitionResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "node_result": {"key": "NodeResult", "type": "NodeResult"}, } - def __init__(self, *, error_code: int=None, node_result=None, **kwargs) -> None: + def __init__(self, *, error_code: int = None, node_result=None, **kwargs) -> None: super(NodeTransitionResult, self).__init__(**kwargs) self.error_code = error_code self.node_result = node_result @@ -14308,13 +16670,13 @@ class NodeTypeHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "int"}, } def __init__(self, *, key: str, value: int, **kwargs) -> None: @@ -14362,26 +16724,38 @@ class NodeTypeNodesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "node_type_name": {"key": "NodeTypeName", "type": "str"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, node_type_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + node_type_name: str = None, + max_percent_unhealthy_nodes: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(NodeTypeNodesHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.node_type_name = node_type_name self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'NodeTypeNodes' + self.kind = "NodeTypeNodes" class NodeUpEvent(NodeEvent): @@ -14410,30 +16784,48 @@ class NodeUpEvent(NodeEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_down_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "node_name": {"required": True}, + "node_instance": {"required": True}, + "last_node_down_at": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance": {"key": "NodeInstance", "type": "long"}, + "last_node_down_at": {"key": "LastNodeDownAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + node_name: str, + node_instance: int, + last_node_down_at, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(NodeUpEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + node_name=node_name, + **kwargs + ) self.node_instance = node_instance self.last_node_down_at = last_node_down_at - self.kind = 'NodeUp' + self.kind = "NodeUp" class NodeUpgradeProgressInfo(Model): @@ -14454,13 +16846,21 @@ class NodeUpgradeProgressInfo(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + "node_name": {"key": "NodeName", "type": "str"}, + "upgrade_phase": {"key": "UpgradePhase", "type": "str"}, + "pending_safety_checks": {"key": "PendingSafetyChecks", "type": "[SafetyCheckWrapper]"}, + "upgrade_duration": {"key": "UpgradeDuration", "type": "str"}, } - def __init__(self, *, node_name: str=None, upgrade_phase=None, pending_safety_checks=None, upgrade_duration: str=None, **kwargs) -> None: + def __init__( + self, + *, + node_name: str = None, + upgrade_phase=None, + pending_safety_checks=None, + upgrade_duration: str = None, + **kwargs + ) -> None: super(NodeUpgradeProgressInfo, self).__init__(**kwargs) self.node_name = node_name self.upgrade_phase = upgrade_phase @@ -14486,12 +16886,12 @@ class OperationStatus(Model): """ _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, + "operation_id": {"key": "OperationId", "type": "str"}, + "state": {"key": "State", "type": "str"}, + "type": {"key": "Type", "type": "str"}, } - def __init__(self, *, operation_id: str=None, state=None, type=None, **kwargs) -> None: + def __init__(self, *, operation_id: str = None, state=None, type=None, **kwargs) -> None: super(OperationStatus, self).__init__(**kwargs) self.operation_id = operation_id self.state = state @@ -14513,11 +16913,11 @@ class PackageSharingPolicyInfo(Model): """ _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + "shared_package_name": {"key": "SharedPackageName", "type": "str"}, + "package_sharing_scope": {"key": "PackageSharingScope", "type": "str"}, } - def __init__(self, *, shared_package_name: str=None, package_sharing_scope=None, **kwargs) -> None: + def __init__(self, *, shared_package_name: str = None, package_sharing_scope=None, **kwargs) -> None: super(PackageSharingPolicyInfo, self).__init__(**kwargs) self.shared_package_name = shared_package_name self.package_sharing_scope = package_sharing_scope @@ -14541,11 +16941,11 @@ class PagedApplicationInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ApplicationInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedApplicationInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14570,11 +16970,11 @@ class PagedApplicationResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ApplicationResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14598,11 +16998,11 @@ class PagedApplicationTypeInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ApplicationTypeInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedApplicationTypeInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14626,11 +17026,11 @@ class PagedBackupConfigurationInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupConfigurationInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14654,11 +17054,11 @@ class PagedBackupEntityList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupEntity]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedBackupEntityList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14681,11 +17081,11 @@ class PagedBackupInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedBackupInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14709,11 +17109,11 @@ class PagedBackupPolicyDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[BackupPolicyDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14737,11 +17137,11 @@ class PagedComposeDeploymentStatusInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ComposeDeploymentStatusInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14766,11 +17166,11 @@ class PagedDeployedApplicationInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[DeployedApplicationInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14793,11 +17193,11 @@ class PagedGatewayResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[GatewayResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14820,11 +17220,11 @@ class PagedNetworkResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[NetworkResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14847,11 +17247,11 @@ class PagedNodeInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[NodeInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedNodeInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14879,12 +17279,14 @@ class PagedPropertyInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "is_consistent": {"key": "IsConsistent", "type": "bool"}, + "properties": {"key": "Properties", "type": "[PropertyInfo]"}, } - def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, properties=None, **kwargs) -> None: + def __init__( + self, *, continuation_token: str = None, is_consistent: bool = None, properties=None, **kwargs + ) -> None: super(PagedPropertyInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.is_consistent = is_consistent @@ -14909,11 +17311,11 @@ class PagedReplicaInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ReplicaInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedReplicaInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14936,11 +17338,11 @@ class PagedSecretResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[SecretResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14965,11 +17367,11 @@ class PagedSecretValueResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[SecretValueResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -14993,11 +17395,11 @@ class PagedServiceInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServiceInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedServiceInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -15021,11 +17423,11 @@ class PagedServicePartitionInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServicePartitionInfo]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedServicePartitionInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -15049,11 +17451,11 @@ class PagedServiceReplicaDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServiceReplicaDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -15076,11 +17478,11 @@ class PagedServiceResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[ServiceResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -15108,12 +17510,12 @@ class PagedSubNameInfoList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "is_consistent": {"key": "IsConsistent", "type": "bool"}, + "sub_names": {"key": "SubNames", "type": "[str]"}, } - def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, sub_names=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, is_consistent: bool = None, sub_names=None, **kwargs) -> None: super(PagedSubNameInfoList, self).__init__(**kwargs) self.continuation_token = continuation_token self.is_consistent = is_consistent @@ -15138,11 +17540,11 @@ class PagedUpdatePartitionLoadResultList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[UpdatePartitionLoadResult]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -15165,11 +17567,11 @@ class PagedVolumeResourceDescriptionList(Model): """ _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + "continuation_token": {"key": "ContinuationToken", "type": "str"}, + "items": {"key": "Items", "type": "[VolumeResourceDescription]"}, } - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + def __init__(self, *, continuation_token: str = None, items=None, **kwargs) -> None: super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) self.continuation_token = continuation_token self.items = items @@ -15206,31 +17608,46 @@ class PartitionAnalysisEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "metadata": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "metadata": {"key": "Metadata", "type": "AnalysisEventMetadata"}, + } + + _subtype_map = {"kind": {"PartitionPrimaryMoveAnalysis": "PartitionPrimaryMoveAnalysisEvent"}} + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + metadata, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(PartitionAnalysisEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + **kwargs + ) self.metadata = metadata - self.kind = 'PartitionAnalysisEvent' + self.kind = "PartitionAnalysisEvent" class PartitionBackupConfigurationInfo(BackupConfigurationInfo): @@ -15259,23 +17676,37 @@ class PartitionBackupConfigurationInfo(BackupConfigurationInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + def __init__( + self, + *, + policy_name: str = None, + policy_inherited_from=None, + suspension_info=None, + service_name: str = None, + partition_id: str = None, + **kwargs + ) -> None: + super(PartitionBackupConfigurationInfo, self).__init__( + policy_name=policy_name, + policy_inherited_from=policy_inherited_from, + suspension_info=suspension_info, + **kwargs + ) self.service_name = service_name self.partition_id = partition_id - self.kind = 'Partition' + self.kind = "Partition" class PartitionBackupEntity(BackupEntity): @@ -15293,20 +17724,20 @@ class PartitionBackupEntity(BackupEntity): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, service_name: str = None, partition_id: str = None, **kwargs) -> None: super(PartitionBackupEntity, self).__init__(**kwargs) self.service_name = service_name self.partition_id = partition_id - self.entity_kind = 'Partition' + self.entity_kind = "Partition" class PartitionDataLossProgress(Model): @@ -15323,8 +17754,8 @@ class PartitionDataLossProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + "state": {"key": "State", "type": "str"}, + "invoke_data_loss_result": {"key": "InvokeDataLossResult", "type": "InvokeDataLossResult"}, } def __init__(self, *, state=None, invoke_data_loss_result=None, **kwargs) -> None: @@ -15363,16 +17794,32 @@ class PartitionHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_health_states=None, **kwargs) -> None: - super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_health_states": {"key": "ReplicaHealthStates", "type": "[ReplicaHealthState]"}, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + partition_id: str = None, + replica_health_states=None, + **kwargs + ) -> None: + super(PartitionHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.partition_id = partition_id self.replica_health_states = replica_health_states @@ -15408,22 +17855,32 @@ class PartitionHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + partition_id: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(PartitionHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.partition_id = partition_id self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Partition' + self.kind = "Partition" class PartitionHealthReportExpiredEvent(PartitionEvent): @@ -15469,39 +17926,63 @@ class PartitionHealthReportExpiredEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(PartitionHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + **kwargs + ) self.source_id = source_id self.property = property self.health_state = health_state @@ -15510,7 +17991,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, sou self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'PartitionHealthReportExpired' + self.kind = "PartitionHealthReportExpired" class PartitionHealthState(EntityHealthState): @@ -15529,11 +18010,11 @@ class PartitionHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, aggregated_health_state=None, partition_id: str = None, **kwargs) -> None: super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) self.partition_id = partition_id @@ -15557,12 +18038,14 @@ class PartitionHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_health_state_chunks": {"key": "ReplicaHealthStateChunks", "type": "ReplicaHealthStateChunkList"}, } - def __init__(self, *, health_state=None, partition_id: str=None, replica_health_state_chunks=None, **kwargs) -> None: + def __init__( + self, *, health_state=None, partition_id: str = None, replica_health_state_chunks=None, **kwargs + ) -> None: super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.partition_id = partition_id self.replica_health_state_chunks = replica_health_state_chunks @@ -15580,7 +18063,7 @@ class PartitionHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + "items": {"key": "Items", "type": "[PartitionHealthStateChunk]"}, } def __init__(self, *, items=None, **kwargs) -> None: @@ -15648,12 +18131,14 @@ class PartitionHealthStateFilter(Model): """ _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + "partition_id_filter": {"key": "PartitionIdFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "replica_filters": {"key": "ReplicaFilters", "type": "[ReplicaHealthStateFilter]"}, } - def __init__(self, *, partition_id_filter: str=None, health_state_filter: int=0, replica_filters=None, **kwargs) -> None: + def __init__( + self, *, partition_id_filter: str = None, health_state_filter: int = 0, replica_filters=None, **kwargs + ) -> None: super(PartitionHealthStateFilter, self).__init__(**kwargs) self.partition_id_filter = partition_id_filter self.health_state_filter = health_state_filter @@ -15680,17 +18165,17 @@ class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): """ _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, + "kind": {"required": True}, + "min_instance_count": {"required": True}, + "max_instance_count": {"required": True}, + "scale_increment": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + "kind": {"key": "Kind", "type": "str"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "max_instance_count": {"key": "MaxInstanceCount", "type": "int"}, + "scale_increment": {"key": "ScaleIncrement", "type": "int"}, } def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_increment: int, **kwargs) -> None: @@ -15698,7 +18183,7 @@ def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_in self.min_instance_count = min_instance_count self.max_instance_count = max_instance_count self.scale_increment = scale_increment - self.kind = 'PartitionInstanceCount' + self.kind = "PartitionInstanceCount" class PartitionLoadInformation(Model): @@ -15727,13 +18212,21 @@ class PartitionLoadInformation(Model): """ _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "primary_load_metric_reports": {"key": "PrimaryLoadMetricReports", "type": "[LoadMetricReport]"}, + "secondary_load_metric_reports": {"key": "SecondaryLoadMetricReports", "type": "[LoadMetricReport]"}, + "auxiliary_load_metric_reports": {"key": "AuxiliaryLoadMetricReports", "type": "[LoadMetricReport]"}, } - def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, auxiliary_load_metric_reports=None, **kwargs) -> None: + def __init__( + self, + *, + partition_id: str = None, + primary_load_metric_reports=None, + secondary_load_metric_reports=None, + auxiliary_load_metric_reports=None, + **kwargs + ) -> None: super(PartitionLoadInformation, self).__init__(**kwargs) self.partition_id = partition_id self.primary_load_metric_reports = primary_load_metric_reports @@ -15773,15 +18266,34 @@ class PartitionMetricLoadDescription(Model): """ _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, - 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__(self, *, partition_id: str=None, primary_replica_load_entries=None, secondary_replicas_or_instances_load_entries=None, secondary_replica_or_instance_load_entries_per_node=None, auxiliary_replicas_load_entries=None, auxiliary_replica_load_entries_per_node=None, **kwargs) -> None: + "partition_id": {"key": "PartitionId", "type": "str"}, + "primary_replica_load_entries": {"key": "PrimaryReplicaLoadEntries", "type": "[MetricLoadDescription]"}, + "secondary_replicas_or_instances_load_entries": { + "key": "SecondaryReplicasOrInstancesLoadEntries", + "type": "[MetricLoadDescription]", + }, + "secondary_replica_or_instance_load_entries_per_node": { + "key": "SecondaryReplicaOrInstanceLoadEntriesPerNode", + "type": "[ReplicaMetricLoadDescription]", + }, + "auxiliary_replicas_load_entries": {"key": "AuxiliaryReplicasLoadEntries", "type": "[MetricLoadDescription]"}, + "auxiliary_replica_load_entries_per_node": { + "key": "AuxiliaryReplicaLoadEntriesPerNode", + "type": "[ReplicaMetricLoadDescription]", + }, + } + + def __init__( + self, + *, + partition_id: str = None, + primary_replica_load_entries=None, + secondary_replicas_or_instances_load_entries=None, + secondary_replica_or_instance_load_entries_per_node=None, + auxiliary_replicas_load_entries=None, + auxiliary_replica_load_entries_per_node=None, + **kwargs + ) -> None: super(PartitionMetricLoadDescription, self).__init__(**kwargs) self.partition_id = partition_id self.primary_replica_load_entries = primary_replica_load_entries @@ -15834,39 +18346,63 @@ class PartitionNewHealthReportEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(PartitionNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + **kwargs + ) self.source_id = source_id self.property = property self.health_state = health_state @@ -15875,7 +18411,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, sou self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'PartitionNewHealthReport' + self.kind = "PartitionNewHealthReport" class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): @@ -15916,41 +18452,64 @@ class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, when_move_completed, previous_node: str, current_node: str, move_reason: str, relevant_traces: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "metadata": {"required": True}, + "when_move_completed": {"required": True}, + "previous_node": {"required": True}, + "current_node": {"required": True}, + "move_reason": {"required": True}, + "relevant_traces": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "metadata": {"key": "Metadata", "type": "AnalysisEventMetadata"}, + "when_move_completed": {"key": "WhenMoveCompleted", "type": "iso-8601"}, + "previous_node": {"key": "PreviousNode", "type": "str"}, + "current_node": {"key": "CurrentNode", "type": "str"}, + "move_reason": {"key": "MoveReason", "type": "str"}, + "relevant_traces": {"key": "RelevantTraces", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + metadata, + when_move_completed, + previous_node: str, + current_node: str, + move_reason: str, + relevant_traces: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(PartitionPrimaryMoveAnalysisEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + metadata=metadata, + **kwargs + ) self.when_move_completed = when_move_completed self.previous_node = previous_node self.current_node = current_node self.move_reason = move_reason self.relevant_traces = relevant_traces - self.kind = 'PartitionPrimaryMoveAnalysis' + self.kind = "PartitionPrimaryMoveAnalysis" class PartitionQuorumLossProgress(Model): @@ -15967,8 +18526,8 @@ class PartitionQuorumLossProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + "state": {"key": "State", "type": "str"}, + "invoke_quorum_loss_result": {"key": "InvokeQuorumLossResult", "type": "InvokeQuorumLossResult"}, } def __init__(self, *, state=None, invoke_quorum_loss_result=None, **kwargs) -> None: @@ -16029,49 +18588,78 @@ class PartitionReconfiguredEvent(PartitionEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, node_name: str, node_instance_id: str, service_type: str, cc_epoch_data_loss_version: int, cc_epoch_config_version: int, reconfig_type: str, result: str, phase0_duration_ms: float, phase1_duration_ms: float, phase2_duration_ms: float, phase3_duration_ms: float, phase4_duration_ms: float, total_duration_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "node_name": {"required": True}, + "node_instance_id": {"required": True}, + "service_type": {"required": True}, + "cc_epoch_data_loss_version": {"required": True}, + "cc_epoch_config_version": {"required": True}, + "reconfig_type": {"required": True}, + "result": {"required": True}, + "phase0_duration_ms": {"required": True}, + "phase1_duration_ms": {"required": True}, + "phase2_duration_ms": {"required": True}, + "phase3_duration_ms": {"required": True}, + "phase4_duration_ms": {"required": True}, + "total_duration_ms": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "node_instance_id": {"key": "NodeInstanceId", "type": "str"}, + "service_type": {"key": "ServiceType", "type": "str"}, + "cc_epoch_data_loss_version": {"key": "CcEpochDataLossVersion", "type": "long"}, + "cc_epoch_config_version": {"key": "CcEpochConfigVersion", "type": "long"}, + "reconfig_type": {"key": "ReconfigType", "type": "str"}, + "result": {"key": "Result", "type": "str"}, + "phase0_duration_ms": {"key": "Phase0DurationMs", "type": "float"}, + "phase1_duration_ms": {"key": "Phase1DurationMs", "type": "float"}, + "phase2_duration_ms": {"key": "Phase2DurationMs", "type": "float"}, + "phase3_duration_ms": {"key": "Phase3DurationMs", "type": "float"}, + "phase4_duration_ms": {"key": "Phase4DurationMs", "type": "float"}, + "total_duration_ms": {"key": "TotalDurationMs", "type": "float"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + node_name: str, + node_instance_id: str, + service_type: str, + cc_epoch_data_loss_version: int, + cc_epoch_config_version: int, + reconfig_type: str, + result: str, + phase0_duration_ms: float, + phase1_duration_ms: float, + phase2_duration_ms: float, + phase3_duration_ms: float, + phase4_duration_ms: float, + total_duration_ms: float, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(PartitionReconfiguredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + **kwargs + ) self.node_name = node_name self.node_instance_id = node_instance_id self.service_type = service_type @@ -16085,7 +18673,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, nod self.phase3_duration_ms = phase3_duration_ms self.phase4_duration_ms = phase4_duration_ms self.total_duration_ms = total_duration_ms - self.kind = 'PartitionReconfigured' + self.kind = "PartitionReconfigured" class PartitionRestartProgress(Model): @@ -16102,8 +18690,8 @@ class PartitionRestartProgress(Model): """ _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + "state": {"key": "State", "type": "str"}, + "restart_partition_result": {"key": "RestartPartitionResult", "type": "RestartPartitionResult"}, } def __init__(self, *, state=None, restart_partition_result=None, **kwargs) -> None: @@ -16146,24 +18734,38 @@ class PartitionsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_partitions_per_service": { + "key": "MaxPercentUnhealthyPartitionsPerService", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_partitions_per_service: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + max_percent_unhealthy_partitions_per_service: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(PartitionsHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Partitions' + self.kind = "Partitions" class ReplicatorStatus(Model): @@ -16182,15 +18784,15 @@ class ReplicatorStatus(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + "kind": {"Primary": "PrimaryReplicatorStatus", "SecondaryReplicatorStatus": "SecondaryReplicatorStatus"} } def __init__(self, **kwargs) -> None: @@ -16217,20 +18819,20 @@ class PrimaryReplicatorStatus(ReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "remote_replicators": {"key": "RemoteReplicators", "type": "[RemoteReplicatorStatus]"}, } def __init__(self, *, replication_queue_status=None, remote_replicators=None, **kwargs) -> None: super(PrimaryReplicatorStatus, self).__init__(**kwargs) self.replication_queue_status = replication_queue_status self.remote_replicators = remote_replicators - self.kind = 'Primary' + self.kind = "Primary" class Probe(Model): @@ -16260,17 +18862,29 @@ class Probe(Model): """ _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__(self, *, initial_delay_seconds: int=0, period_seconds: int=10, timeout_seconds: int=1, success_threshold: int=1, failure_threshold: int=3, exec_property=None, http_get=None, tcp_socket=None, **kwargs) -> None: + "initial_delay_seconds": {"key": "initialDelaySeconds", "type": "int"}, + "period_seconds": {"key": "periodSeconds", "type": "int"}, + "timeout_seconds": {"key": "timeoutSeconds", "type": "int"}, + "success_threshold": {"key": "successThreshold", "type": "int"}, + "failure_threshold": {"key": "failureThreshold", "type": "int"}, + "exec_property": {"key": "exec", "type": "ProbeExec"}, + "http_get": {"key": "httpGet", "type": "ProbeHttpGet"}, + "tcp_socket": {"key": "tcpSocket", "type": "ProbeTcpSocket"}, + } + + def __init__( + self, + *, + initial_delay_seconds: int = 0, + period_seconds: int = 10, + timeout_seconds: int = 1, + success_threshold: int = 1, + failure_threshold: int = 3, + exec_property=None, + http_get=None, + tcp_socket=None, + **kwargs + ) -> None: super(Probe, self).__init__(**kwargs) self.initial_delay_seconds = initial_delay_seconds self.period_seconds = period_seconds @@ -16293,11 +18907,11 @@ class ProbeExec(Model): """ _validation = { - 'command': {'required': True}, + "command": {"required": True}, } _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, + "command": {"key": "command", "type": "str"}, } def __init__(self, *, command: str, **kwargs) -> None: @@ -16324,18 +18938,20 @@ class ProbeHttpGet(Model): """ _validation = { - 'port': {'required': True}, + "port": {"required": True}, } _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, + "port": {"key": "port", "type": "int"}, + "path": {"key": "path", "type": "str"}, + "host": {"key": "host", "type": "str"}, + "http_headers": {"key": "httpHeaders", "type": "[ProbeHttpGetHeaders]"}, + "scheme": {"key": "scheme", "type": "str"}, } - def __init__(self, *, port: int, path: str=None, host: str=None, http_headers=None, scheme=None, **kwargs) -> None: + def __init__( + self, *, port: int, path: str = None, host: str = None, http_headers=None, scheme=None, **kwargs + ) -> None: super(ProbeHttpGet, self).__init__(**kwargs) self.port = port self.path = path @@ -16356,13 +18972,13 @@ class ProbeHttpGetHeaders(Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__(self, *, name: str, value: str, **kwargs) -> None: @@ -16381,11 +18997,11 @@ class ProbeTcpSocket(Model): """ _validation = { - 'port': {'required': True}, + "port": {"required": True}, } _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, + "port": {"key": "port", "type": "int"}, } def __init__(self, *, port: int, **kwargs) -> None: @@ -16402,7 +19018,7 @@ class PropertyBatchDescriptionList(Model): """ _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + "operations": {"key": "Operations", "type": "[PropertyBatchOperation]"}, } def __init__(self, *, operations=None, **kwargs) -> None: @@ -16425,17 +19041,17 @@ class PropertyDescription(Model): """ _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, + "property_name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "custom_type_id": {"key": "CustomTypeId", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, } - def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: + def __init__(self, *, property_name: str, value, custom_type_id: str = None, **kwargs) -> None: super(PropertyDescription, self).__init__(**kwargs) self.property_name = property_name self.custom_type_id = custom_type_id @@ -16457,14 +19073,14 @@ class PropertyInfo(Model): """ _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, + "name": {"required": True}, + "metadata": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + "name": {"key": "Name", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, + "metadata": {"key": "Metadata", "type": "PropertyMetadata"}, } def __init__(self, *, name: str, metadata, value=None, **kwargs) -> None: @@ -16498,15 +19114,25 @@ class PropertyMetadata(Model): """ _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + "type_id": {"key": "TypeId", "type": "str"}, + "custom_type_id": {"key": "CustomTypeId", "type": "str"}, + "parent": {"key": "Parent", "type": "str"}, + "size_in_bytes": {"key": "SizeInBytes", "type": "int"}, + "last_modified_utc_timestamp": {"key": "LastModifiedUtcTimestamp", "type": "iso-8601"}, + "sequence_number": {"key": "SequenceNumber", "type": "str"}, } - def __init__(self, *, type_id=None, custom_type_id: str=None, parent: str=None, size_in_bytes: int=None, last_modified_utc_timestamp=None, sequence_number: str=None, **kwargs) -> None: + def __init__( + self, + *, + type_id=None, + custom_type_id: str = None, + parent: str = None, + size_in_bytes: int = None, + last_modified_utc_timestamp=None, + sequence_number: str = None, + **kwargs + ) -> None: super(PropertyMetadata, self).__init__(**kwargs) self.type_id = type_id self.custom_type_id = custom_type_id @@ -16543,23 +19169,30 @@ class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBas """ _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_type_build_path': {'required': True}, + "async_property": {"required": True}, + "kind": {"required": True}, + "application_type_build_path": {"required": True}, } _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + "async_property": {"key": "Async", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "application_type_build_path": {"key": "ApplicationTypeBuildPath", "type": "str"}, + "application_package_cleanup_policy": {"key": "ApplicationPackageCleanupPolicy", "type": "str"}, } - def __init__(self, *, async_property: bool, application_type_build_path: str, application_package_cleanup_policy=None, **kwargs) -> None: + def __init__( + self, + *, + async_property: bool, + application_type_build_path: str, + application_package_cleanup_policy=None, + **kwargs + ) -> None: super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) self.application_type_build_path = application_type_build_path self.application_package_cleanup_policy = application_package_cleanup_policy - self.kind = 'ImageStorePath' + self.kind = "ImageStorePath" class ProvisionFabricDescription(Model): @@ -16572,11 +19205,11 @@ class ProvisionFabricDescription(Model): """ _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + "code_file_path": {"key": "CodeFilePath", "type": "str"}, + "cluster_manifest_file_path": {"key": "ClusterManifestFilePath", "type": "str"}, } - def __init__(self, *, code_file_path: str=None, cluster_manifest_file_path: str=None, **kwargs) -> None: + def __init__(self, *, code_file_path: str = None, cluster_manifest_file_path: str = None, **kwargs) -> None: super(ProvisionFabricDescription, self).__init__(**kwargs) self.code_file_path = code_file_path self.cluster_manifest_file_path = cluster_manifest_file_path @@ -16601,23 +19234,23 @@ class PutPropertyBatchOperation(PropertyBatchOperation): """ _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, + "property_name": {"required": True}, + "kind": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + "property_name": {"key": "PropertyName", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "value": {"key": "Value", "type": "PropertyValue"}, + "custom_type_id": {"key": "CustomTypeId", "type": "str"}, } - def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: + def __init__(self, *, property_name: str, value, custom_type_id: str = None, **kwargs) -> None: super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) self.value = value self.custom_type_id = custom_type_id - self.kind = 'Put' + self.kind = "Put" class ReconfigurationInformation(Model): @@ -16648,13 +19281,21 @@ class ReconfigurationInformation(Model): """ _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + "previous_configuration_role": {"key": "PreviousConfigurationRole", "type": "str"}, + "reconfiguration_phase": {"key": "ReconfigurationPhase", "type": "str"}, + "reconfiguration_type": {"key": "ReconfigurationType", "type": "str"}, + "reconfiguration_start_time_utc": {"key": "ReconfigurationStartTimeUtc", "type": "iso-8601"}, } - def __init__(self, *, previous_configuration_role=None, reconfiguration_phase=None, reconfiguration_type=None, reconfiguration_start_time_utc=None, **kwargs) -> None: + def __init__( + self, + *, + previous_configuration_role=None, + reconfiguration_phase=None, + reconfiguration_type=None, + reconfiguration_start_time_utc=None, + **kwargs + ) -> None: super(ReconfigurationInformation, self).__init__(**kwargs) self.previous_configuration_role = previous_configuration_role self.reconfiguration_phase = reconfiguration_phase @@ -16676,12 +19317,19 @@ class RegistryCredential(Model): """ _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + "registry_user_name": {"key": "RegistryUserName", "type": "str"}, + "registry_password": {"key": "RegistryPassword", "type": "str"}, + "password_encrypted": {"key": "PasswordEncrypted", "type": "bool"}, } - def __init__(self, *, registry_user_name: str=None, registry_password: str=None, password_encrypted: bool=None, **kwargs) -> None: + def __init__( + self, + *, + registry_user_name: str = None, + registry_password: str = None, + password_encrypted: bool = None, + **kwargs + ) -> None: super(RegistryCredential, self).__init__(**kwargs) self.registry_user_name = registry_user_name self.registry_password = registry_password @@ -16704,15 +19352,15 @@ class ReliableCollectionsRef(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "do_not_persist_state": {"key": "doNotPersistState", "type": "bool"}, } - def __init__(self, *, name: str, do_not_persist_state: bool=None, **kwargs) -> None: + def __init__(self, *, name: str, do_not_persist_state: bool = None, **kwargs) -> None: super(ReliableCollectionsRef, self).__init__(**kwargs) self.name = name self.do_not_persist_state = do_not_persist_state @@ -16738,13 +19386,21 @@ class RemoteReplicatorAcknowledgementDetail(Model): """ _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + "average_receive_duration": {"key": "AverageReceiveDuration", "type": "str"}, + "average_apply_duration": {"key": "AverageApplyDuration", "type": "str"}, + "not_received_count": {"key": "NotReceivedCount", "type": "str"}, + "received_and_not_applied_count": {"key": "ReceivedAndNotAppliedCount", "type": "str"}, } - def __init__(self, *, average_receive_duration: str=None, average_apply_duration: str=None, not_received_count: str=None, received_and_not_applied_count: str=None, **kwargs) -> None: + def __init__( + self, + *, + average_receive_duration: str = None, + average_apply_duration: str = None, + not_received_count: str = None, + received_and_not_applied_count: str = None, + **kwargs + ) -> None: super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) self.average_receive_duration = average_receive_duration self.average_apply_duration = average_apply_duration @@ -16768,11 +19424,19 @@ class RemoteReplicatorAcknowledgementStatus(Model): """ _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + "replication_stream_acknowledgement_detail": { + "key": "ReplicationStreamAcknowledgementDetail", + "type": "RemoteReplicatorAcknowledgementDetail", + }, + "copy_stream_acknowledgement_detail": { + "key": "CopyStreamAcknowledgementDetail", + "type": "RemoteReplicatorAcknowledgementDetail", + }, } - def __init__(self, *, replication_stream_acknowledgement_detail=None, copy_stream_acknowledgement_detail=None, **kwargs) -> None: + def __init__( + self, *, replication_stream_acknowledgement_detail=None, copy_stream_acknowledgement_detail=None, **kwargs + ) -> None: super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail @@ -16817,17 +19481,32 @@ class RemoteReplicatorStatus(Model): """ _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__(self, *, replica_id: str=None, last_acknowledgement_processed_time_utc=None, last_received_replication_sequence_number: str=None, last_applied_replication_sequence_number: str=None, is_in_build: bool=None, last_received_copy_sequence_number: str=None, last_applied_copy_sequence_number: str=None, remote_replicator_acknowledgement_status=None, **kwargs) -> None: + "replica_id": {"key": "ReplicaId", "type": "str"}, + "last_acknowledgement_processed_time_utc": {"key": "LastAcknowledgementProcessedTimeUtc", "type": "iso-8601"}, + "last_received_replication_sequence_number": {"key": "LastReceivedReplicationSequenceNumber", "type": "str"}, + "last_applied_replication_sequence_number": {"key": "LastAppliedReplicationSequenceNumber", "type": "str"}, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "last_received_copy_sequence_number": {"key": "LastReceivedCopySequenceNumber", "type": "str"}, + "last_applied_copy_sequence_number": {"key": "LastAppliedCopySequenceNumber", "type": "str"}, + "remote_replicator_acknowledgement_status": { + "key": "RemoteReplicatorAcknowledgementStatus", + "type": "RemoteReplicatorAcknowledgementStatus", + }, + } + + def __init__( + self, + *, + replica_id: str = None, + last_acknowledgement_processed_time_utc=None, + last_received_replication_sequence_number: str = None, + last_applied_replication_sequence_number: str = None, + is_in_build: bool = None, + last_received_copy_sequence_number: str = None, + last_applied_copy_sequence_number: str = None, + remote_replicator_acknowledgement_status=None, + **kwargs + ) -> None: super(RemoteReplicatorStatus, self).__init__(**kwargs) self.replica_id = replica_id self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc @@ -16932,33 +19611,55 @@ class RepairTask(Model): """ _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, state, action: str, version: str=None, description: str=None, flags: int=None, target=None, executor: str=None, executor_data: str=None, impact=None, result_status=None, result_code: int=None, result_details: str=None, history=None, preparing_health_check_state=None, restoring_health_check_state=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: + "task_id": {"required": True}, + "state": {"required": True}, + "action": {"required": True}, + } + + _attribute_map = { + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "state": {"key": "State", "type": "str"}, + "flags": {"key": "Flags", "type": "int"}, + "action": {"key": "Action", "type": "str"}, + "target": {"key": "Target", "type": "RepairTargetDescriptionBase"}, + "executor": {"key": "Executor", "type": "str"}, + "executor_data": {"key": "ExecutorData", "type": "str"}, + "impact": {"key": "Impact", "type": "RepairImpactDescriptionBase"}, + "result_status": {"key": "ResultStatus", "type": "str"}, + "result_code": {"key": "ResultCode", "type": "int"}, + "result_details": {"key": "ResultDetails", "type": "str"}, + "history": {"key": "History", "type": "RepairTaskHistory"}, + "preparing_health_check_state": {"key": "PreparingHealthCheckState", "type": "str"}, + "restoring_health_check_state": {"key": "RestoringHealthCheckState", "type": "str"}, + "perform_preparing_health_check": {"key": "PerformPreparingHealthCheck", "type": "bool"}, + "perform_restoring_health_check": {"key": "PerformRestoringHealthCheck", "type": "bool"}, + } + + def __init__( + self, + *, + task_id: str, + state, + action: str, + version: str = None, + description: str = None, + flags: int = None, + target=None, + executor: str = None, + executor_data: str = None, + impact=None, + result_status=None, + result_code: int = None, + result_details: str = None, + history=None, + preparing_health_check_state=None, + restoring_health_check_state=None, + perform_preparing_health_check: bool = None, + perform_restoring_health_check: bool = None, + **kwargs + ) -> None: super(RepairTask, self).__init__(**kwargs) self.task_id = task_id self.version = version @@ -16997,15 +19698,15 @@ class RepairTaskApproveDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, } - def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: + def __init__(self, *, task_id: str, version: str = None, **kwargs) -> None: super(RepairTaskApproveDescription, self).__init__(**kwargs) self.task_id = task_id self.version = version @@ -17032,16 +19733,16 @@ class RepairTaskCancelDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "request_abort": {"key": "RequestAbort", "type": "bool"}, } - def __init__(self, *, task_id: str, version: str=None, request_abort: bool=None, **kwargs) -> None: + def __init__(self, *, task_id: str, version: str = None, request_abort: bool = None, **kwargs) -> None: super(RepairTaskCancelDescription, self).__init__(**kwargs) self.task_id = task_id self.version = version @@ -17066,15 +19767,15 @@ class RepairTaskDeleteDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, } - def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: + def __init__(self, *, task_id: str, version: str = None, **kwargs) -> None: super(RepairTaskDeleteDescription, self).__init__(**kwargs) self.task_id = task_id self.version = version @@ -17121,20 +19822,41 @@ class RepairTaskHistory(Model): """ _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_utc_timestamp=None, claimed_utc_timestamp=None, preparing_utc_timestamp=None, approved_utc_timestamp=None, executing_utc_timestamp=None, restoring_utc_timestamp=None, completed_utc_timestamp=None, preparing_health_check_start_utc_timestamp=None, preparing_health_check_end_utc_timestamp=None, restoring_health_check_start_utc_timestamp=None, restoring_health_check_end_utc_timestamp=None, **kwargs) -> None: + "created_utc_timestamp": {"key": "CreatedUtcTimestamp", "type": "iso-8601"}, + "claimed_utc_timestamp": {"key": "ClaimedUtcTimestamp", "type": "iso-8601"}, + "preparing_utc_timestamp": {"key": "PreparingUtcTimestamp", "type": "iso-8601"}, + "approved_utc_timestamp": {"key": "ApprovedUtcTimestamp", "type": "iso-8601"}, + "executing_utc_timestamp": {"key": "ExecutingUtcTimestamp", "type": "iso-8601"}, + "restoring_utc_timestamp": {"key": "RestoringUtcTimestamp", "type": "iso-8601"}, + "completed_utc_timestamp": {"key": "CompletedUtcTimestamp", "type": "iso-8601"}, + "preparing_health_check_start_utc_timestamp": { + "key": "PreparingHealthCheckStartUtcTimestamp", + "type": "iso-8601", + }, + "preparing_health_check_end_utc_timestamp": {"key": "PreparingHealthCheckEndUtcTimestamp", "type": "iso-8601"}, + "restoring_health_check_start_utc_timestamp": { + "key": "RestoringHealthCheckStartUtcTimestamp", + "type": "iso-8601", + }, + "restoring_health_check_end_utc_timestamp": {"key": "RestoringHealthCheckEndUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + created_utc_timestamp=None, + claimed_utc_timestamp=None, + preparing_utc_timestamp=None, + approved_utc_timestamp=None, + executing_utc_timestamp=None, + restoring_utc_timestamp=None, + completed_utc_timestamp=None, + preparing_health_check_start_utc_timestamp=None, + preparing_health_check_end_utc_timestamp=None, + restoring_health_check_start_utc_timestamp=None, + restoring_health_check_end_utc_timestamp=None, + **kwargs + ) -> None: super(RepairTaskHistory, self).__init__(**kwargs) self.created_utc_timestamp = created_utc_timestamp self.claimed_utc_timestamp = claimed_utc_timestamp @@ -17176,17 +19898,25 @@ class RepairTaskUpdateHealthPolicyDescription(Model): """ _validation = { - 'task_id': {'required': True}, + "task_id": {"required": True}, } _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + "task_id": {"key": "TaskId", "type": "str"}, + "version": {"key": "Version", "type": "str"}, + "perform_preparing_health_check": {"key": "PerformPreparingHealthCheck", "type": "bool"}, + "perform_restoring_health_check": {"key": "PerformRestoringHealthCheck", "type": "bool"}, } - def __init__(self, *, task_id: str, version: str=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: + def __init__( + self, + *, + task_id: str, + version: str = None, + perform_preparing_health_check: bool = None, + perform_restoring_health_check: bool = None, + **kwargs + ) -> None: super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) self.task_id = task_id self.version = version @@ -17206,11 +19936,11 @@ class RepairTaskUpdateInfo(Model): """ _validation = { - 'version': {'required': True}, + "version": {"required": True}, } _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, *, version: str, **kwargs) -> None: @@ -17254,27 +19984,42 @@ class ReplicaHealth(EntityHealth): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, **kwargs) -> None: - super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "service_kind": {"Stateful": "StatefulServiceReplicaHealth", "Stateless": "StatelessServiceInstanceHealth"} + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + partition_id: str = None, + **kwargs + ) -> None: + super(ReplicaHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.partition_id = partition_id self.service_kind = None - self.service_kind = 'ReplicaHealth' + self.service_kind = "ReplicaHealth" class ReplicaHealthEvaluation(HealthEvaluation): @@ -17317,24 +20062,35 @@ class ReplicaHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_or_instance_id": {"key": "ReplicaOrInstanceId", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, replica_or_instance_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + partition_id: str = None, + replica_or_instance_id: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ReplicaHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.partition_id = partition_id self.replica_or_instance_id = replica_or_instance_id self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Replica' + self.kind = "Replica" class ReplicaHealthState(EntityHealthState): @@ -17361,24 +20117,27 @@ class ReplicaHealthState(EntityHealthState): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + "service_kind": { + "Stateful": "StatefulServiceReplicaHealthState", + "Stateless": "StatelessServiceInstanceHealthState", + } } - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, aggregated_health_state=None, partition_id: str = None, **kwargs) -> None: super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) self.partition_id = partition_id self.service_kind = None - self.service_kind = 'ReplicaHealthState' + self.service_kind = "ReplicaHealthState" class ReplicaHealthStateChunk(EntityHealthStateChunk): @@ -17405,11 +20164,11 @@ class ReplicaHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "replica_or_instance_id": {"key": "ReplicaOrInstanceId", "type": "str"}, } - def __init__(self, *, health_state=None, replica_or_instance_id: str=None, **kwargs) -> None: + def __init__(self, *, health_state=None, replica_or_instance_id: str = None, **kwargs) -> None: super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.replica_or_instance_id = replica_or_instance_id @@ -17424,7 +20183,7 @@ class ReplicaHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + "items": {"key": "Items", "type": "[ReplicaHealthStateChunk]"}, } def __init__(self, *, items=None, **kwargs) -> None: @@ -17481,11 +20240,11 @@ class ReplicaHealthStateFilter(Model): """ _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + "replica_or_instance_id_filter": {"key": "ReplicaOrInstanceIdFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, } - def __init__(self, *, replica_or_instance_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + def __init__(self, *, replica_or_instance_id_filter: str = None, health_state_filter: int = 0, **kwargs) -> None: super(ReplicaHealthStateFilter, self).__init__(**kwargs) self.replica_or_instance_id_filter = replica_or_instance_id_filter self.health_state_filter = health_state_filter @@ -17520,23 +20279,32 @@ class ReplicaInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "last_in_build_duration_in_seconds": {"key": "LastInBuildDurationInSeconds", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, **kwargs) -> None: + "service_kind": {"Stateful": "StatefulServiceReplicaInfo", "Stateless": "StatelessServiceInstanceInfo"} + } + + def __init__( + self, + *, + replica_status=None, + health_state=None, + node_name: str = None, + address: str = None, + last_in_build_duration_in_seconds: str = None, + **kwargs + ) -> None: super(ReplicaInfo, self).__init__(**kwargs) self.replica_status = replica_status self.health_state = health_state @@ -17559,11 +20327,20 @@ class ReplicaLifecycleDescription(Model): """ _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + "is_singleton_replica_move_allowed_during_upgrade": { + "key": "IsSingletonReplicaMoveAllowedDuringUpgrade", + "type": "bool", + }, + "restore_replica_location_after_upgrade": {"key": "RestoreReplicaLocationAfterUpgrade", "type": "bool"}, } - def __init__(self, *, is_singleton_replica_move_allowed_during_upgrade: bool=None, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + def __init__( + self, + *, + is_singleton_replica_move_allowed_during_upgrade: bool = None, + restore_replica_location_after_upgrade: bool = None, + **kwargs + ) -> None: super(ReplicaLifecycleDescription, self).__init__(**kwargs) self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade @@ -17582,11 +20359,11 @@ class ReplicaMetricLoadDescription(Model): """ _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + "node_name": {"key": "NodeName", "type": "str"}, + "replica_or_instance_load_entries": {"key": "ReplicaOrInstanceLoadEntries", "type": "[MetricLoadDescription]"}, } - def __init__(self, *, node_name: str=None, replica_or_instance_load_entries=None, **kwargs) -> None: + def __init__(self, *, node_name: str = None, replica_or_instance_load_entries=None, **kwargs) -> None: super(ReplicaMetricLoadDescription, self).__init__(**kwargs) self.node_name = node_name self.replica_or_instance_load_entries = replica_or_instance_load_entries @@ -17626,24 +20403,38 @@ class ReplicasHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "max_percent_unhealthy_replicas_per_partition": { + "key": "MaxPercentUnhealthyReplicasPerPartition", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_replicas_per_partition: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + max_percent_unhealthy_replicas_per_partition: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ReplicasHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Replicas' + self.kind = "Replicas" class ReplicatorQueueStatus(Model): @@ -17686,15 +20477,25 @@ class ReplicatorQueueStatus(Model): """ _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + "queue_utilization_percentage": {"key": "QueueUtilizationPercentage", "type": "int"}, + "queue_memory_size": {"key": "QueueMemorySize", "type": "str"}, + "first_sequence_number": {"key": "FirstSequenceNumber", "type": "str"}, + "completed_sequence_number": {"key": "CompletedSequenceNumber", "type": "str"}, + "committed_sequence_number": {"key": "CommittedSequenceNumber", "type": "str"}, + "last_sequence_number": {"key": "LastSequenceNumber", "type": "str"}, } - def __init__(self, *, queue_utilization_percentage: int=None, queue_memory_size: str=None, first_sequence_number: str=None, completed_sequence_number: str=None, committed_sequence_number: str=None, last_sequence_number: str=None, **kwargs) -> None: + def __init__( + self, + *, + queue_utilization_percentage: int = None, + queue_memory_size: str = None, + first_sequence_number: str = None, + completed_sequence_number: str = None, + committed_sequence_number: str = None, + last_sequence_number: str = None, + **kwargs + ) -> None: super(ReplicatorQueueStatus, self).__init__(**kwargs) self.queue_utilization_percentage = queue_utilization_percentage self.queue_memory_size = queue_memory_size @@ -17718,11 +20519,11 @@ class ResolvedServiceEndpoint(Model): """ _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "address": {"key": "Address", "type": "str"}, } - def __init__(self, *, kind=None, address: str=None, **kwargs) -> None: + def __init__(self, *, kind=None, address: str = None, **kwargs) -> None: super(ResolvedServiceEndpoint, self).__init__(**kwargs) self.kind = kind self.address = address @@ -17750,17 +20551,17 @@ class ResolvedServicePartition(Model): """ _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, + "name": {"required": True}, + "partition_information": {"required": True}, + "endpoints": {"required": True}, + "version": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "endpoints": {"key": "Endpoints", "type": "[ResolvedServiceEndpoint]"}, + "version": {"key": "Version", "type": "str"}, } def __init__(self, *, name: str, partition_information, endpoints, version: str, **kwargs) -> None: @@ -17784,11 +20585,11 @@ class ResourceLimits(Model): """ _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, + "memory_in_gb": {"key": "memoryInGB", "type": "float"}, + "cpu": {"key": "cpu", "type": "float"}, } - def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: + def __init__(self, *, memory_in_gb: float = None, cpu: float = None, **kwargs) -> None: super(ResourceLimits, self).__init__(**kwargs) self.memory_in_gb = memory_in_gb self.cpu = cpu @@ -17812,13 +20613,13 @@ class ResourceRequests(Model): """ _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, + "memory_in_gb": {"required": True}, + "cpu": {"required": True}, } _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, + "memory_in_gb": {"key": "memoryInGB", "type": "float"}, + "cpu": {"key": "cpu", "type": "float"}, } def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: @@ -17841,12 +20642,12 @@ class ResourceRequirements(Model): """ _validation = { - 'requests': {'required': True}, + "requests": {"required": True}, } _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + "requests": {"key": "requests", "type": "ResourceRequests"}, + "limits": {"key": "limits", "type": "ResourceLimits"}, } def __init__(self, *, requests, limits=None, **kwargs) -> None: @@ -17888,19 +20689,27 @@ class RestartDeployedCodePackageDescription(Model): """ _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, + "service_manifest_name": {"required": True}, + "code_package_name": {"required": True}, + "code_package_instance_id": {"required": True}, } _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_package_activation_id": {"key": "ServicePackageActivationId", "type": "str"}, + "code_package_name": {"key": "CodePackageName", "type": "str"}, + "code_package_instance_id": {"key": "CodePackageInstanceId", "type": "str"}, } - def __init__(self, *, service_manifest_name: str, code_package_name: str, code_package_instance_id: str, service_package_activation_id: str=None, **kwargs) -> None: + def __init__( + self, + *, + service_manifest_name: str, + code_package_name: str, + code_package_instance_id: str, + service_package_activation_id: str = None, + **kwargs + ) -> None: super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) self.service_manifest_name = service_manifest_name self.service_package_activation_id = service_package_activation_id @@ -17927,15 +20736,15 @@ class RestartNodeDescription(Model): """ _validation = { - 'node_instance_id': {'required': True}, + "node_instance_id": {"required": True}, } _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + "node_instance_id": {"key": "NodeInstanceId", "type": "str"}, + "create_fabric_dump": {"key": "CreateFabricDump", "type": "str"}, } - def __init__(self, *, node_instance_id: str="0", create_fabric_dump="False", **kwargs) -> None: + def __init__(self, *, node_instance_id: str = "0", create_fabric_dump="False", **kwargs) -> None: super(RestartNodeDescription, self).__init__(**kwargs) self.node_instance_id = node_instance_id self.create_fabric_dump = create_fabric_dump @@ -17954,11 +20763,11 @@ class RestartPartitionResult(Model): """ _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + "error_code": {"key": "ErrorCode", "type": "int"}, + "selected_partition": {"key": "SelectedPartition", "type": "SelectedPartition"}, } - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + def __init__(self, *, error_code: int = None, selected_partition=None, **kwargs) -> None: super(RestartPartitionResult, self).__init__(**kwargs) self.error_code = error_code self.selected_partition = selected_partition @@ -17981,14 +20790,14 @@ class RestorePartitionDescription(Model): """ _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, + "backup_id": {"required": True}, + "backup_location": {"required": True}, } _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + "backup_id": {"key": "BackupId", "type": "str"}, + "backup_location": {"key": "BackupLocation", "type": "str"}, + "backup_storage": {"key": "BackupStorage", "type": "BackupStorageDescription"}, } def __init__(self, *, backup_id: str, backup_location: str, backup_storage=None, **kwargs) -> None: @@ -18018,14 +20827,23 @@ class RestoreProgressInfo(Model): """ _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + "restore_state": {"key": "RestoreState", "type": "str"}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "restored_epoch": {"key": "RestoredEpoch", "type": "Epoch"}, + "restored_lsn": {"key": "RestoredLsn", "type": "str"}, + "failure_error": {"key": "FailureError", "type": "FabricErrorError"}, } - def __init__(self, *, restore_state=None, time_stamp_utc=None, restored_epoch=None, restored_lsn: str=None, failure_error=None, **kwargs) -> None: + def __init__( + self, + *, + restore_state=None, + time_stamp_utc=None, + restored_epoch=None, + restored_lsn: str = None, + failure_error=None, + **kwargs + ) -> None: super(RestoreProgressInfo, self).__init__(**kwargs) self.restore_state = restore_state self.time_stamp_utc = time_stamp_utc @@ -18046,11 +20864,11 @@ class ResumeApplicationUpgradeDescription(Model): """ _validation = { - 'upgrade_domain_name': {'required': True}, + "upgrade_domain_name": {"required": True}, } _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, } def __init__(self, *, upgrade_domain_name: str, **kwargs) -> None: @@ -18069,11 +20887,11 @@ class ResumeClusterUpgradeDescription(Model): """ _validation = { - 'upgrade_domain': {'required': True}, + "upgrade_domain": {"required": True}, } _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + "upgrade_domain": {"key": "UpgradeDomain", "type": "str"}, } def __init__(self, *, upgrade_domain: str, **kwargs) -> None: @@ -18157,23 +20975,40 @@ class RollingUpgradeUpdateDescription(Model): """ _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, *, rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, replica_set_check_timeout_in_milliseconds: int=None, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + "rolling_upgrade_mode": {"required": True}, + } + + _attribute_map = { + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "replica_set_check_timeout_in_milliseconds": {"key": "ReplicaSetCheckTimeoutInMilliseconds", "type": "long"}, + "failure_action": {"key": "FailureAction", "type": "str"}, + "health_check_wait_duration_in_milliseconds": {"key": "HealthCheckWaitDurationInMilliseconds", "type": "str"}, + "health_check_stable_duration_in_milliseconds": { + "key": "HealthCheckStableDurationInMilliseconds", + "type": "str", + }, + "health_check_retry_timeout_in_milliseconds": {"key": "HealthCheckRetryTimeoutInMilliseconds", "type": "str"}, + "upgrade_timeout_in_milliseconds": {"key": "UpgradeTimeoutInMilliseconds", "type": "str"}, + "upgrade_domain_timeout_in_milliseconds": {"key": "UpgradeDomainTimeoutInMilliseconds", "type": "str"}, + "instance_close_delay_duration_in_seconds": {"key": "InstanceCloseDelayDurationInSeconds", "type": "long"}, + } + + def __init__( + self, + *, + rolling_upgrade_mode="UnmonitoredAuto", + force_restart: bool = None, + replica_set_check_timeout_in_milliseconds: int = None, + failure_action=None, + health_check_wait_duration_in_milliseconds: str = None, + health_check_stable_duration_in_milliseconds: str = None, + health_check_retry_timeout_in_milliseconds: str = None, + upgrade_timeout_in_milliseconds: str = None, + upgrade_domain_timeout_in_milliseconds: str = None, + instance_close_delay_duration_in_seconds: int = None, + **kwargs + ) -> None: super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) self.rolling_upgrade_mode = rolling_upgrade_mode self.force_restart = force_restart @@ -18205,19 +21040,19 @@ class RunToCompletionExecutionPolicy(ExecutionPolicy): """ _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, + "type": {"required": True}, + "restart": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "restart": {"key": "restart", "type": "str"}, } def __init__(self, *, restart, **kwargs) -> None: super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) self.restart = restart - self.type = 'RunToCompletion' + self.type = "RunToCompletion" class SafetyCheckWrapper(Model): @@ -18232,7 +21067,7 @@ class SafetyCheckWrapper(Model): """ _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + "safety_check": {"key": "SafetyCheck", "type": "SafetyCheck"}, } def __init__(self, *, safety_check=None, **kwargs) -> None: @@ -18256,13 +21091,13 @@ class ScalingPolicyDescription(Model): """ _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, + "scaling_trigger": {"required": True}, + "scaling_mechanism": {"required": True}, } _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + "scaling_trigger": {"key": "ScalingTrigger", "type": "ScalingTriggerDescription"}, + "scaling_mechanism": {"key": "ScalingMechanism", "type": "ScalingMechanismDescription"}, } def __init__(self, *, scaling_trigger, scaling_mechanism, **kwargs) -> None: @@ -18311,24 +21146,37 @@ class SecondaryReplicatorStatus(ReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_replication_operation_received_time_utc": { + "key": "LastReplicationOperationReceivedTimeUtc", + "type": "iso-8601", + }, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "copy_queue_status": {"key": "CopyQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_copy_operation_received_time_utc": {"key": "LastCopyOperationReceivedTimeUtc", "type": "iso-8601"}, + "last_acknowledgement_sent_time_utc": {"key": "LastAcknowledgementSentTimeUtc", "type": "iso-8601"}, } _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + "kind": {"ActiveSecondary": "SecondaryActiveReplicatorStatus", "IdleSecondary": "SecondaryIdleReplicatorStatus"} + } + + def __init__( + self, + *, + replication_queue_status=None, + last_replication_operation_received_time_utc=None, + is_in_build: bool = None, + copy_queue_status=None, + last_copy_operation_received_time_utc=None, + last_acknowledgement_sent_time_utc=None, + **kwargs + ) -> None: super(SecondaryReplicatorStatus, self).__init__(**kwargs) self.replication_queue_status = replication_queue_status self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc @@ -18336,7 +21184,7 @@ def __init__(self, *, replication_queue_status=None, last_replication_operation_ self.copy_queue_status = copy_queue_status self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc - self.kind = 'SecondaryReplicatorStatus' + self.kind = "SecondaryReplicatorStatus" class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): @@ -18375,22 +21223,43 @@ class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_replication_operation_received_time_utc": { + "key": "LastReplicationOperationReceivedTimeUtc", + "type": "iso-8601", + }, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "copy_queue_status": {"key": "CopyQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_copy_operation_received_time_utc": {"key": "LastCopyOperationReceivedTimeUtc", "type": "iso-8601"}, + "last_acknowledgement_sent_time_utc": {"key": "LastAcknowledgementSentTimeUtc", "type": "iso-8601"}, } - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'ActiveSecondary' + def __init__( + self, + *, + replication_queue_status=None, + last_replication_operation_received_time_utc=None, + is_in_build: bool = None, + copy_queue_status=None, + last_copy_operation_received_time_utc=None, + last_acknowledgement_sent_time_utc=None, + **kwargs + ) -> None: + super(SecondaryActiveReplicatorStatus, self).__init__( + replication_queue_status=replication_queue_status, + last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, + is_in_build=is_in_build, + copy_queue_status=copy_queue_status, + last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, + last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, + **kwargs + ) + self.kind = "ActiveSecondary" class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): @@ -18429,22 +21298,43 @@ class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + "kind": {"key": "Kind", "type": "str"}, + "replication_queue_status": {"key": "ReplicationQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_replication_operation_received_time_utc": { + "key": "LastReplicationOperationReceivedTimeUtc", + "type": "iso-8601", + }, + "is_in_build": {"key": "IsInBuild", "type": "bool"}, + "copy_queue_status": {"key": "CopyQueueStatus", "type": "ReplicatorQueueStatus"}, + "last_copy_operation_received_time_utc": {"key": "LastCopyOperationReceivedTimeUtc", "type": "iso-8601"}, + "last_acknowledgement_sent_time_utc": {"key": "LastAcknowledgementSentTimeUtc", "type": "iso-8601"}, } - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'IdleSecondary' + def __init__( + self, + *, + replication_queue_status=None, + last_replication_operation_received_time_utc=None, + is_in_build: bool = None, + copy_queue_status=None, + last_copy_operation_received_time_utc=None, + last_acknowledgement_sent_time_utc=None, + **kwargs + ) -> None: + super(SecondaryIdleReplicatorStatus, self).__init__( + replication_queue_status=replication_queue_status, + last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, + is_in_build=is_in_build, + copy_queue_status=copy_queue_status, + last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, + last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, + **kwargs + ) + self.kind = "IdleSecondary" class SecretResourceDescription(Model): @@ -18460,13 +21350,13 @@ class SecretResourceDescription(Model): """ _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, + "properties": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, + "properties": {"key": "properties", "type": "SecretResourceProperties"}, + "name": {"key": "name", "type": "str"}, } def __init__(self, *, properties, name: str, **kwargs) -> None: @@ -18483,10 +21373,10 @@ class SecretValue(Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, } - def __init__(self, *, value: str=None, **kwargs) -> None: + def __init__(self, *, value: str = None, **kwargs) -> None: super(SecretValue, self).__init__(**kwargs) self.value = value @@ -18499,10 +21389,10 @@ class SecretValueProperties(Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, } - def __init__(self, *, value: str=None, **kwargs) -> None: + def __init__(self, *, value: str = None, **kwargs) -> None: super(SecretValueProperties, self).__init__(**kwargs) self.value = value @@ -18520,15 +21410,15 @@ class SecretValueResourceDescription(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "properties.value", "type": "str"}, } - def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + def __init__(self, *, name: str, value: str = None, **kwargs) -> None: super(SecretValueResourceDescription, self).__init__(**kwargs) self.name = name self.value = value @@ -18545,16 +21435,16 @@ class SeedNodeSafetyCheck(SafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, } def __init__(self, **kwargs) -> None: super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' + self.kind = "EnsureSeedNodeQuorum" class SelectedPartition(Model): @@ -18572,11 +21462,11 @@ class SelectedPartition(Model): """ _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, service_name: str = None, partition_id: str = None, **kwargs) -> None: super(SelectedPartition, self).__init__(**kwargs) self.service_name = service_name self.partition_id = partition_id @@ -18607,21 +21497,34 @@ class ServiceBackupConfigurationInfo(BackupConfigurationInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "policy_name": {"key": "PolicyName", "type": "str"}, + "policy_inherited_from": {"key": "PolicyInheritedFrom", "type": "str"}, + "suspension_info": {"key": "SuspensionInfo", "type": "BackupSuspensionInfo"}, + "kind": {"key": "Kind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, **kwargs) -> None: - super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + def __init__( + self, + *, + policy_name: str = None, + policy_inherited_from=None, + suspension_info=None, + service_name: str = None, + **kwargs + ) -> None: + super(ServiceBackupConfigurationInfo, self).__init__( + policy_name=policy_name, + policy_inherited_from=policy_inherited_from, + suspension_info=suspension_info, + **kwargs + ) self.service_name = service_name - self.kind = 'Service' + self.kind = "Service" class ServiceBackupEntity(BackupEntity): @@ -18637,18 +21540,18 @@ class ServiceBackupEntity(BackupEntity): """ _validation = { - 'entity_kind': {'required': True}, + "entity_kind": {"required": True}, } _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "entity_kind": {"key": "EntityKind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } - def __init__(self, *, service_name: str=None, **kwargs) -> None: + def __init__(self, *, service_name: str = None, **kwargs) -> None: super(ServiceBackupEntity, self).__init__(**kwargs) self.service_name = service_name - self.entity_kind = 'Service' + self.entity_kind = "Service" class ServiceCorrelationDescription(Model): @@ -18667,13 +21570,13 @@ class ServiceCorrelationDescription(Model): """ _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, + "scheme": {"required": True}, + "service_name": {"required": True}, } _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "scheme": {"key": "Scheme", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } def __init__(self, *, scheme, service_name: str, **kwargs) -> None: @@ -18714,29 +21617,49 @@ class ServiceEvent(FabricEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, } _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, } _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + "kind": { + "ServiceCreated": "ServiceCreatedEvent", + "ServiceDeleted": "ServiceDeletedEvent", + "ServiceNewHealthReport": "ServiceNewHealthReportEvent", + "ServiceHealthReportExpired": "ServiceHealthReportExpiredEvent", + } + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + service_id: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ServiceEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + **kwargs + ) self.service_id = service_id - self.kind = 'ServiceEvent' + self.kind = "ServiceEvent" class ServiceCreatedEvent(ServiceEvent): @@ -18791,43 +21714,69 @@ class ServiceCreatedEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "service_type_name": {"required": True}, + "application_name": {"required": True}, + "application_type_name": {"required": True}, + "service_instance": {"required": True}, + "is_stateful": {"required": True}, + "partition_count": {"required": True}, + "target_replica_set_size": {"required": True}, + "min_replica_set_size": {"required": True}, + "service_package_version": {"required": True}, + "partition_id": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "service_instance": {"key": "ServiceInstance", "type": "long"}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "partition_count": {"key": "PartitionCount", "type": "int"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "service_package_version": {"key": "ServicePackageVersion", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + service_id: str, + service_type_name: str, + application_name: str, + application_type_name: str, + service_instance: int, + is_stateful: bool, + partition_count: int, + target_replica_set_size: int, + min_replica_set_size: int, + service_package_version: str, + partition_id: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ServiceCreatedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + service_id=service_id, + **kwargs + ) self.service_type_name = service_type_name self.application_name = application_name self.application_type_name = application_type_name @@ -18838,7 +21787,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, servi self.min_replica_set_size = min_replica_set_size self.service_package_version = service_package_version self.partition_id = partition_id - self.kind = 'ServiceCreated' + self.kind = "ServiceCreated" class ServiceDeletedEvent(ServiceEvent): @@ -18887,41 +21836,66 @@ class ServiceDeletedEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "service_type_name": {"required": True}, + "application_name": {"required": True}, + "application_type_name": {"required": True}, + "service_instance": {"required": True}, + "is_stateful": {"required": True}, + "partition_count": {"required": True}, + "target_replica_set_size": {"required": True}, + "min_replica_set_size": {"required": True}, + "service_package_version": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "application_type_name": {"key": "ApplicationTypeName", "type": "str"}, + "service_instance": {"key": "ServiceInstance", "type": "long"}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "partition_count": {"key": "PartitionCount", "type": "int"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "service_package_version": {"key": "ServicePackageVersion", "type": "str"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + service_id: str, + service_type_name: str, + application_name: str, + application_type_name: str, + service_instance: int, + is_stateful: bool, + partition_count: int, + target_replica_set_size: int, + min_replica_set_size: int, + service_package_version: str, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ServiceDeletedEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + service_id=service_id, + **kwargs + ) self.service_type_name = service_type_name self.application_name = application_name self.application_type_name = application_type_name @@ -18931,7 +21905,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, servi self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size self.service_package_version = service_package_version - self.kind = 'ServiceDeleted' + self.kind = "ServiceDeleted" class ServiceDescription(Model): @@ -19003,37 +21977,60 @@ class ServiceDescription(Model): """ _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, + "service_name": {"required": True}, + "service_type_name": {"required": True}, + "partition_description": {"required": True}, + "service_kind": {"required": True}, } _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "partition_description": {"key": "PartitionDescription", "type": "PartitionSchemeDescription"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "service_load_metrics": {"key": "ServiceLoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "is_default_move_cost_specified": {"key": "IsDefaultMoveCostSpecified", "type": "bool"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "tags_required_to_place": {"key": "TagsRequiredToPlace", "type": "NodeTagsDescription"}, + "tags_required_to_run": {"key": "TagsRequiredToRun", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, **kwargs) -> None: + "service_kind": {"Stateful": "StatefulServiceDescription", "Stateless": "StatelessServiceDescription"} + } + + def __init__( + self, + *, + service_name: str, + service_type_name: str, + partition_description, + application_name: str = None, + initialization_data=None, + placement_constraints: str = None, + correlation_scheme=None, + service_load_metrics=None, + service_placement_policies=None, + default_move_cost=None, + is_default_move_cost_specified: bool = None, + service_package_activation_mode=None, + service_dns_name: str = None, + scaling_policies=None, + tags_required_to_place=None, + tags_required_to_run=None, + **kwargs + ) -> None: super(ServiceDescription, self).__init__(**kwargs) self.application_name = application_name self.service_name = service_name @@ -19083,21 +22080,31 @@ class ServiceFromTemplateDescription(Model): """ _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, + "application_name": {"required": True}, + "service_name": {"required": True}, + "service_type_name": {"required": True}, } _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, } - def __init__(self, *, application_name: str, service_name: str, service_type_name: str, initialization_data=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: + def __init__( + self, + *, + application_name: str, + service_name: str, + service_type_name: str, + initialization_data=None, + service_package_activation_mode=None, + service_dns_name: str = None, + **kwargs + ) -> None: super(ServiceFromTemplateDescription, self).__init__(**kwargs) self.application_name = application_name self.service_name = service_name @@ -19137,16 +22144,32 @@ class ServiceHealth(EntityHealth): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, partition_health_states=None, **kwargs) -> None: - super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "name": {"key": "Name", "type": "str"}, + "partition_health_states": {"key": "PartitionHealthStates", "type": "[PartitionHealthState]"}, + } + + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + name: str = None, + partition_health_states=None, + **kwargs + ) -> None: + super(ServiceHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + **kwargs + ) self.name = name self.partition_health_states = partition_health_states @@ -19182,22 +22205,32 @@ class ServiceHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, service_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + service_name: str = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ServiceHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.service_name = service_name self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Service' + self.kind = "Service" class ServiceHealthReportExpiredEvent(ServiceEvent): @@ -19247,41 +22280,66 @@ class ServiceHealthReportExpiredEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + service_id: str, + instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ServiceHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + service_id=service_id, + **kwargs + ) self.instance_id = instance_id self.source_id = source_id self.property = property @@ -19291,7 +22349,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, insta self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ServiceHealthReportExpired' + self.kind = "ServiceHealthReportExpired" class ServiceHealthState(EntityHealthState): @@ -19310,11 +22368,11 @@ class ServiceHealthState(EntityHealthState): """ _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, service_name: str=None, **kwargs) -> None: + def __init__(self, *, aggregated_health_state=None, service_name: str = None, **kwargs) -> None: super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) self.service_name = service_name @@ -19339,12 +22397,14 @@ class ServiceHealthStateChunk(EntityHealthStateChunk): """ _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_health_state_chunks": {"key": "PartitionHealthStateChunks", "type": "PartitionHealthStateChunkList"}, } - def __init__(self, *, health_state=None, service_name: str=None, partition_health_state_chunks=None, **kwargs) -> None: + def __init__( + self, *, health_state=None, service_name: str = None, partition_health_state_chunks=None, **kwargs + ) -> None: super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) self.service_name = service_name self.partition_health_state_chunks = partition_health_state_chunks @@ -19360,7 +22420,7 @@ class ServiceHealthStateChunkList(Model): """ _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + "items": {"key": "Items", "type": "[ServiceHealthStateChunk]"}, } def __init__(self, *, items=None, **kwargs) -> None: @@ -19427,12 +22487,14 @@ class ServiceHealthStateFilter(Model): """ _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + "service_name_filter": {"key": "ServiceNameFilter", "type": "str"}, + "health_state_filter": {"key": "HealthStateFilter", "type": "int"}, + "partition_filters": {"key": "PartitionFilters", "type": "[PartitionHealthStateFilter]"}, } - def __init__(self, *, service_name_filter: str=None, health_state_filter: int=0, partition_filters=None, **kwargs) -> None: + def __init__( + self, *, service_name_filter: str = None, health_state_filter: int = 0, partition_filters=None, **kwargs + ) -> None: super(ServiceHealthStateFilter, self).__init__(**kwargs) self.service_name_filter = service_name_filter self.health_state_filter = health_state_filter @@ -19449,11 +22511,11 @@ class ServiceIdentity(Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "identity_ref": {"key": "identityRef", "type": "str"}, } - def __init__(self, *, name: str=None, identity_ref: str=None, **kwargs) -> None: + def __init__(self, *, name: str = None, identity_ref: str = None, **kwargs) -> None: super(ServiceIdentity, self).__init__(**kwargs) self.name = name self.identity_ref = identity_ref @@ -19497,25 +22559,34 @@ class ServiceInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "manifest_version": {"key": "ManifestVersion", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_status": {"key": "ServiceStatus", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } + _subtype_map = {"service_kind": {"Stateful": "StatefulServiceInfo", "Stateless": "StatelessServiceInfo"}} - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: + def __init__( + self, + *, + id: str = None, + name: str = None, + type_name: str = None, + manifest_version: str = None, + health_state=None, + service_status=None, + is_service_group: bool = None, + **kwargs + ) -> None: super(ServiceInfo, self).__init__(**kwargs) self.id = id self.name = name @@ -19559,19 +22630,29 @@ class ServiceLoadMetricDescription(Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + "name": {"key": "Name", "type": "str"}, + "weight": {"key": "Weight", "type": "str"}, + "primary_default_load": {"key": "PrimaryDefaultLoad", "type": "int"}, + "secondary_default_load": {"key": "SecondaryDefaultLoad", "type": "int"}, + "auxiliary_default_load": {"key": "AuxiliaryDefaultLoad", "type": "int"}, + "default_load": {"key": "DefaultLoad", "type": "int"}, } - def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, auxiliary_default_load: int=None, default_load: int=None, **kwargs) -> None: + def __init__( + self, + *, + name: str, + weight=None, + primary_default_load: int = None, + secondary_default_load: int = None, + auxiliary_default_load: int = None, + default_load: int = None, + **kwargs + ) -> None: super(ServiceLoadMetricDescription, self).__init__(**kwargs) self.name = name self.weight = weight @@ -19597,11 +22678,11 @@ class ServiceNameInfo(Model): """ _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, } - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, name: str = None, **kwargs) -> None: super(ServiceNameInfo, self).__init__(**kwargs) self.id = id self.name = name @@ -19654,41 +22735,66 @@ class ServiceNewHealthReportEvent(ServiceEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "service_id": {"required": True}, + "instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "service_id": {"key": "ServiceId", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + service_id: str, + instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(ServiceNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + service_id=service_id, + **kwargs + ) self.instance_id = instance_id self.source_id = source_id self.property = property @@ -19698,7 +22804,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, insta self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ServiceNewHealthReport' + self.kind = "ServiceNewHealthReport" class ServicePartitionInfo(Model): @@ -19728,18 +22834,18 @@ class ServicePartitionInfo(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_status": {"key": "PartitionStatus", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + "service_kind": {"Stateful": "StatefulServicePartitionInfo", "Stateless": "StatelessServicePartitionInfo"} } def __init__(self, *, health_state=None, partition_status=None, partition_information=None, **kwargs) -> None: @@ -19768,15 +22874,22 @@ class ServicePlacementPolicyDescription(Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, } _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + "type": { + "InvalidDomain": "ServicePlacementInvalidDomainPolicyDescription", + "NonPartiallyPlaceService": "ServicePlacementNonPartiallyPlaceServicePolicyDescription", + "AllowMultipleStatelessInstancesOnNode": "ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription", + "PreferPrimaryDomain": "ServicePlacementPreferPrimaryDomainPolicyDescription", + "RequireDomain": "ServicePlacementRequiredDomainPolicyDescription", + "RequireDomainDistribution": "ServicePlacementRequireDomainDistributionPolicyDescription", + } } def __init__(self, **kwargs) -> None: @@ -19800,18 +22913,18 @@ class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(Ser """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } - def __init__(self, *, domain_name: str=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, **kwargs) -> None: super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) self.domain_name = domain_name - self.type = 'AllowMultipleStatelessInstancesOnNode' + self.type = "AllowMultipleStatelessInstancesOnNode" class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): @@ -19829,18 +22942,18 @@ class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescr """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } - def __init__(self, *, domain_name: str=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, **kwargs) -> None: super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) self.domain_name = domain_name - self.type = 'InvalidDomain' + self.type = "InvalidDomain" class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): @@ -19855,16 +22968,16 @@ class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacement """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, } def __init__(self, **kwargs) -> None: super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' + self.type = "NonPartiallyPlaceService" class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): @@ -19889,18 +23002,18 @@ class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolic """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } - def __init__(self, *, domain_name: str=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, **kwargs) -> None: super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) self.domain_name = domain_name - self.type = 'PreferPrimaryDomain' + self.type = "PreferPrimaryDomain" class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): @@ -19918,18 +23031,18 @@ class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDesc """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } - def __init__(self, *, domain_name: str=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, **kwargs) -> None: super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) self.domain_name = domain_name - self.type = 'RequireDomain' + self.type = "RequireDomain" class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): @@ -19955,18 +23068,18 @@ class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacemen """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, + "type": {"key": "Type", "type": "str"}, + "domain_name": {"key": "DomainName", "type": "str"}, } - def __init__(self, *, domain_name: str=None, **kwargs) -> None: + def __init__(self, *, domain_name: str = None, **kwargs) -> None: super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) self.domain_name = domain_name - self.type = 'RequireDomainDistribution' + self.type = "RequireDomainDistribution" class ServiceProperties(Model): @@ -20005,26 +23118,36 @@ class ServiceProperties(Model): """ _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "health_state": {"readonly": True}, + "unhealthy_evaluation": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "replica_count": {"key": "replicaCount", "type": "int"}, + "execution_policy": {"key": "executionPolicy", "type": "ExecutionPolicy"}, + "auto_scaling_policies": {"key": "autoScalingPolicies", "type": "[AutoScalingPolicy]"}, + "status": {"key": "status", "type": "str"}, + "status_details": {"key": "statusDetails", "type": "str"}, + "health_state": {"key": "healthState", "type": "str"}, + "unhealthy_evaluation": {"key": "unhealthyEvaluation", "type": "str"}, + "identity_refs": {"key": "identityRefs", "type": "[ServiceIdentity]"}, + "dns_name": {"key": "dnsName", "type": "str"}, } - def __init__(self, *, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: + def __init__( + self, + *, + description: str = None, + replica_count: int = None, + execution_policy=None, + auto_scaling_policies=None, + identity_refs=None, + dns_name: str = None, + **kwargs + ) -> None: super(ServiceProperties, self).__init__(**kwargs) self.description = description self.replica_count = replica_count @@ -20060,15 +23183,15 @@ class ServiceReplicaProperties(Model): """ _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, + "os_type": {"required": True}, + "code_packages": {"required": True}, } _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + "os_type": {"key": "osType", "type": "str"}, + "code_packages": {"key": "codePackages", "type": "[ContainerCodePackageProperties]"}, + "network_refs": {"key": "networkRefs", "type": "[NetworkRef]"}, + "diagnostics": {"key": "diagnostics", "type": "DiagnosticsRef"}, } def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, **kwargs) -> None: @@ -20103,21 +23226,25 @@ class ServiceReplicaDescription(ServiceReplicaProperties): """ _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, + "os_type": {"required": True}, + "code_packages": {"required": True}, + "replica_name": {"required": True}, } _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, + "os_type": {"key": "osType", "type": "str"}, + "code_packages": {"key": "codePackages", "type": "[ContainerCodePackageProperties]"}, + "network_refs": {"key": "networkRefs", "type": "[NetworkRef]"}, + "diagnostics": {"key": "diagnostics", "type": "DiagnosticsRef"}, + "replica_name": {"key": "replicaName", "type": "str"}, } - def __init__(self, *, os_type, code_packages, replica_name: str, network_refs=None, diagnostics=None, **kwargs) -> None: - super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) + def __init__( + self, *, os_type, code_packages, replica_name: str, network_refs=None, diagnostics=None, **kwargs + ) -> None: + super(ServiceReplicaDescription, self).__init__( + os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs + ) self.replica_name = replica_name @@ -20175,34 +23302,49 @@ class ServiceResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__(self, *, name: str, os_type, code_packages, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: + "name": {"required": True}, + "os_type": {"required": True}, + "code_packages": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "health_state": {"readonly": True}, + "unhealthy_evaluation": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "os_type": {"key": "properties.osType", "type": "str"}, + "code_packages": {"key": "properties.codePackages", "type": "[ContainerCodePackageProperties]"}, + "network_refs": {"key": "properties.networkRefs", "type": "[NetworkRef]"}, + "diagnostics": {"key": "properties.diagnostics", "type": "DiagnosticsRef"}, + "description": {"key": "properties.description", "type": "str"}, + "replica_count": {"key": "properties.replicaCount", "type": "int"}, + "execution_policy": {"key": "properties.executionPolicy", "type": "ExecutionPolicy"}, + "auto_scaling_policies": {"key": "properties.autoScalingPolicies", "type": "[AutoScalingPolicy]"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "health_state": {"key": "properties.healthState", "type": "str"}, + "unhealthy_evaluation": {"key": "properties.unhealthyEvaluation", "type": "str"}, + "identity_refs": {"key": "properties.identityRefs", "type": "[ServiceIdentity]"}, + "dns_name": {"key": "properties.dnsName", "type": "str"}, + } + + def __init__( + self, + *, + name: str, + os_type, + code_packages, + network_refs=None, + diagnostics=None, + description: str = None, + replica_count: int = None, + execution_policy=None, + auto_scaling_policies=None, + identity_refs=None, + dns_name: str = None, + **kwargs + ) -> None: super(ServiceResourceDescription, self).__init__(**kwargs) self.name = name self.os_type = os_type @@ -20257,26 +23399,38 @@ class ServicesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "max_percent_unhealthy_services": {"key": "MaxPercentUnhealthyServices", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, service_type_name: str=None, max_percent_unhealthy_services: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + service_type_name: str = None, + max_percent_unhealthy_services: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(ServicesHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.service_type_name = service_type_name self.max_percent_unhealthy_services = max_percent_unhealthy_services self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Services' + self.kind = "Services" class ServiceTypeDescription(Model): @@ -20315,24 +23469,37 @@ class ServiceTypeDescription(Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "extensions": {"key": "Extensions", "type": "[ServiceTypeExtensionDescription]"}, + "kind": {"key": "Kind", "type": "str"}, } _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, **kwargs) -> None: + "kind": {"Stateful": "StatefulServiceTypeDescription", "Stateless": "StatelessServiceTypeDescription"} + } + + def __init__( + self, + *, + is_stateful: bool = None, + service_type_name: str = None, + placement_constraints: str = None, + load_metrics=None, + service_placement_policies=None, + extensions=None, + **kwargs + ) -> None: super(ServiceTypeDescription, self).__init__(**kwargs) self.is_stateful = is_stateful self.service_type_name = service_type_name @@ -20353,11 +23520,11 @@ class ServiceTypeExtensionDescription(Model): """ _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "str"}, } - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + def __init__(self, *, key: str = None, value: str = None, **kwargs) -> None: super(ServiceTypeExtensionDescription, self).__init__(**kwargs) self.key = key self.value = value @@ -20406,12 +23573,25 @@ class ServiceTypeHealthPolicy(Model): """ _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + "max_percent_unhealthy_partitions_per_service": { + "key": "MaxPercentUnhealthyPartitionsPerService", + "type": "int", + }, + "max_percent_unhealthy_replicas_per_partition": { + "key": "MaxPercentUnhealthyReplicasPerPartition", + "type": "int", + }, + "max_percent_unhealthy_services": {"key": "MaxPercentUnhealthyServices", "type": "int"}, } - def __init__(self, *, max_percent_unhealthy_partitions_per_service: int=0, max_percent_unhealthy_replicas_per_partition: int=0, max_percent_unhealthy_services: int=0, **kwargs) -> None: + def __init__( + self, + *, + max_percent_unhealthy_partitions_per_service: int = 0, + max_percent_unhealthy_replicas_per_partition: int = 0, + max_percent_unhealthy_services: int = 0, + **kwargs + ) -> None: super(ServiceTypeHealthPolicy, self).__init__(**kwargs) self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition @@ -20432,13 +23612,13 @@ class ServiceTypeHealthPolicyMapItem(Model): """ _validation = { - 'key': {'required': True}, - 'value': {'required': True}, + "key": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + "key": {"key": "Key", "type": "str"}, + "value": {"key": "Value", "type": "ServiceTypeHealthPolicy"}, } def __init__(self, *, key: str, value, **kwargs) -> None: @@ -20468,13 +23648,21 @@ class ServiceTypeInfo(Model): """ _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + "service_type_description": {"key": "ServiceTypeDescription", "type": "ServiceTypeDescription"}, + "service_manifest_name": {"key": "ServiceManifestName", "type": "str"}, + "service_manifest_version": {"key": "ServiceManifestVersion", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, } - def __init__(self, *, service_type_description=None, service_manifest_name: str=None, service_manifest_version: str=None, is_service_group: bool=None, **kwargs) -> None: + def __init__( + self, + *, + service_type_description=None, + service_manifest_name: str = None, + service_manifest_version: str = None, + is_service_group: bool = None, + **kwargs + ) -> None: super(ServiceTypeInfo, self).__init__(**kwargs) self.service_type_description = service_type_description self.service_manifest_name = service_manifest_name @@ -20491,10 +23679,10 @@ class ServiceTypeManifest(Model): """ _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, + "manifest": {"key": "Manifest", "type": "str"}, } - def __init__(self, *, manifest: str=None, **kwargs) -> None: + def __init__(self, *, manifest: str = None, **kwargs) -> None: super(ServiceTypeManifest, self).__init__(**kwargs) self.manifest = manifest @@ -20592,28 +23780,48 @@ class ServiceUpdateDescription(Model): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "flags": {"key": "Flags", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "tags_for_placement": {"key": "TagsForPlacement", "type": "NodeTagsDescription"}, + "tags_for_running": {"key": "TagsForRunning", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, **kwargs) -> None: + "service_kind": { + "Stateful": "StatefulServiceUpdateDescription", + "Stateless": "StatelessServiceUpdateDescription", + } + } + + def __init__( + self, + *, + flags: str = None, + placement_constraints: str = None, + correlation_scheme=None, + load_metrics=None, + service_placement_policies=None, + default_move_cost=None, + scaling_policies=None, + service_dns_name: str = None, + tags_for_placement=None, + tags_for_running=None, + **kwargs + ) -> None: super(ServiceUpdateDescription, self).__init__(**kwargs) self.flags = flags self.placement_constraints = placement_constraints @@ -20643,12 +23851,19 @@ class ServiceUpgradeProgress(Model): """ _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "completed_replica_count": {"key": "CompletedReplicaCount", "type": "str"}, + "pending_replica_count": {"key": "PendingReplicaCount", "type": "str"}, } - def __init__(self, *, service_name: str=None, completed_replica_count: str=None, pending_replica_count: str=None, **kwargs) -> None: + def __init__( + self, + *, + service_name: str = None, + completed_replica_count: str = None, + pending_replica_count: str = None, + **kwargs + ) -> None: super(ServiceUpgradeProgress, self).__init__(**kwargs) self.service_name = service_name self.completed_replica_count = completed_replica_count @@ -20672,12 +23887,12 @@ class Setting(Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: + def __init__(self, *, type="ClearText", name: str = None, value: str = None, **kwargs) -> None: super(Setting, self).__init__(**kwargs) self.type = type self.name = name @@ -20702,17 +23917,17 @@ class SingletonPartitionInformation(PartitionInformation): """ _validation = { - 'service_partition_kind': {'required': True}, + "service_partition_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "service_partition_kind": {"key": "ServicePartitionKind", "type": "str"}, } - def __init__(self, *, id: str=None, **kwargs) -> None: + def __init__(self, *, id: str = None, **kwargs) -> None: super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) - self.service_partition_kind = 'Singleton' + self.service_partition_kind = "Singleton" class SingletonPartitionSchemeDescription(PartitionSchemeDescription): @@ -20726,16 +23941,16 @@ class SingletonPartitionSchemeDescription(PartitionSchemeDescription): """ _validation = { - 'partition_scheme': {'required': True}, + "partition_scheme": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, } def __init__(self, **kwargs) -> None: super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' + self.partition_scheme = "Singleton" class StartClusterUpgradeDescription(Model): @@ -20808,22 +24023,45 @@ class StartClusterUpgradeDescription(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "rolling_upgrade_mode": {"key": "RollingUpgradeMode", "type": "str"}, + "upgrade_replica_set_check_timeout_in_seconds": { + "key": "UpgradeReplicaSetCheckTimeoutInSeconds", + "type": "long", + }, + "force_restart": {"key": "ForceRestart", "type": "bool"}, + "sort_order": {"key": "SortOrder", "type": "str"}, + "monitoring_policy": {"key": "MonitoringPolicy", "type": "MonitoringPolicyDescription"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "enable_delta_health_evaluation": {"key": "EnableDeltaHealthEvaluation", "type": "bool"}, + "cluster_upgrade_health_policy": { + "key": "ClusterUpgradeHealthPolicy", + "type": "ClusterUpgradeHealthPolicyObject", + }, + "application_health_policy_map": {"key": "ApplicationHealthPolicyMap", "type": "ApplicationHealthPolicies"}, + "instance_close_delay_duration_in_seconds": {"key": "InstanceCloseDelayDurationInSeconds", "type": "long"}, + } + + def __init__( + self, + *, + code_version: str = None, + config_version: str = None, + upgrade_kind="Rolling", + rolling_upgrade_mode="UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: int = None, + force_restart: bool = None, + sort_order="Default", + monitoring_policy=None, + cluster_health_policy=None, + enable_delta_health_evaluation: bool = None, + cluster_upgrade_health_policy=None, + application_health_policy_map=None, + instance_close_delay_duration_in_seconds: int = None, + **kwargs + ) -> None: super(StartClusterUpgradeDescription, self).__init__(**kwargs) self.code_version = code_version self.config_version = config_version @@ -20856,20 +24094,20 @@ class StartedChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "chaos_parameters": {"key": "ChaosParameters", "type": "ChaosParameters"}, } def __init__(self, *, time_stamp_utc, chaos_parameters=None, **kwargs) -> None: super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) self.chaos_parameters = chaos_parameters - self.kind = 'Started' + self.kind = "Started" class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): @@ -20925,43 +24163,70 @@ class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "replica_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "replica_instance_id": {"key": "ReplicaInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + replica_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(StatefulReplicaHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + replica_id=replica_id, + **kwargs + ) self.replica_instance_id = replica_instance_id self.source_id = source_id self.property = property @@ -20971,7 +24236,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, rep self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatefulReplicaHealthReportExpired' + self.kind = "StatefulReplicaHealthReportExpired" class StatefulReplicaNewHealthReportEvent(ReplicaEvent): @@ -21027,43 +24292,70 @@ class StatefulReplicaNewHealthReportEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "replica_instance_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "replica_instance_id": {"key": "ReplicaInstanceId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + replica_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(StatefulReplicaNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + replica_id=replica_id, + **kwargs + ) self.replica_instance_id = replica_instance_id self.source_id = source_id self.property = property @@ -21073,7 +24365,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, rep self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatefulReplicaNewHealthReport' + self.kind = "StatefulReplicaNewHealthReport" class StatefulServiceDescription(ServiceDescription): @@ -21197,53 +24489,105 @@ class StatefulServiceDescription(ServiceDescription): """ _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: - super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + "service_name": {"required": True}, + "service_type_name": {"required": True}, + "partition_description": {"required": True}, + "service_kind": {"required": True}, + "target_replica_set_size": {"required": True, "minimum": 1}, + "min_replica_set_size": {"required": True, "minimum": 1}, + "has_persisted_state": {"required": True}, + "replica_restart_wait_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "quorum_loss_wait_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "stand_by_replica_keep_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "service_placement_time_limit_seconds": {"maximum": 4294967295, "minimum": 0}, + "auxiliary_replica_count": {"minimum": 0}, + } + + _attribute_map = { + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "partition_description": {"key": "PartitionDescription", "type": "PartitionSchemeDescription"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "service_load_metrics": {"key": "ServiceLoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "is_default_move_cost_specified": {"key": "IsDefaultMoveCostSpecified", "type": "bool"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "tags_required_to_place": {"key": "TagsRequiredToPlace", "type": "NodeTagsDescription"}, + "tags_required_to_run": {"key": "TagsRequiredToRun", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "has_persisted_state": {"key": "HasPersistedState", "type": "bool"}, + "flags": {"key": "Flags", "type": "int"}, + "replica_restart_wait_duration_seconds": {"key": "ReplicaRestartWaitDurationSeconds", "type": "long"}, + "quorum_loss_wait_duration_seconds": {"key": "QuorumLossWaitDurationSeconds", "type": "long"}, + "stand_by_replica_keep_duration_seconds": {"key": "StandByReplicaKeepDurationSeconds", "type": "long"}, + "service_placement_time_limit_seconds": {"key": "ServicePlacementTimeLimitSeconds", "type": "long"}, + "drop_source_replica_on_move": {"key": "DropSourceReplicaOnMove", "type": "bool"}, + "replica_lifecycle_description": {"key": "ReplicaLifecycleDescription", "type": "ReplicaLifecycleDescription"}, + "auxiliary_replica_count": {"key": "AuxiliaryReplicaCount", "type": "int"}, + } + + def __init__( + self, + *, + service_name: str, + service_type_name: str, + partition_description, + target_replica_set_size: int, + min_replica_set_size: int, + has_persisted_state: bool, + application_name: str = None, + initialization_data=None, + placement_constraints: str = None, + correlation_scheme=None, + service_load_metrics=None, + service_placement_policies=None, + default_move_cost=None, + is_default_move_cost_specified: bool = None, + service_package_activation_mode=None, + service_dns_name: str = None, + scaling_policies=None, + tags_required_to_place=None, + tags_required_to_run=None, + flags: int = None, + replica_restart_wait_duration_seconds: int = None, + quorum_loss_wait_duration_seconds: int = None, + stand_by_replica_keep_duration_seconds: int = None, + service_placement_time_limit_seconds: int = None, + drop_source_replica_on_move: bool = None, + replica_lifecycle_description=None, + auxiliary_replica_count: int = None, + **kwargs + ) -> None: + super(StatefulServiceDescription, self).__init__( + application_name=application_name, + service_name=service_name, + service_type_name=service_type_name, + initialization_data=initialization_data, + partition_description=partition_description, + placement_constraints=placement_constraints, + correlation_scheme=correlation_scheme, + service_load_metrics=service_load_metrics, + service_placement_policies=service_placement_policies, + default_move_cost=default_move_cost, + is_default_move_cost_specified=is_default_move_cost_specified, + service_package_activation_mode=service_package_activation_mode, + service_dns_name=service_dns_name, + scaling_policies=scaling_policies, + tags_required_to_place=tags_required_to_place, + tags_required_to_run=tags_required_to_run, + **kwargs + ) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size self.has_persisted_state = has_persisted_state @@ -21255,7 +24599,7 @@ def __init__(self, *, service_name: str, service_type_name: str, partition_descr self.drop_source_replica_on_move = drop_source_replica_on_move self.replica_lifecycle_description = replica_lifecycle_description self.auxiliary_replica_count = auxiliary_replica_count - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatefulServiceInfo(ServiceInfo): @@ -21295,25 +24639,46 @@ class StatefulServiceInfo(ServiceInfo): """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, has_persisted_state: bool=None, **kwargs) -> None: - super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "manifest_version": {"key": "ManifestVersion", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_status": {"key": "ServiceStatus", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "has_persisted_state": {"key": "HasPersistedState", "type": "bool"}, + } + + def __init__( + self, + *, + id: str = None, + name: str = None, + type_name: str = None, + manifest_version: str = None, + health_state=None, + service_status=None, + is_service_group: bool = None, + has_persisted_state: bool = None, + **kwargs + ) -> None: + super(StatefulServiceInfo, self).__init__( + id=id, + name=name, + type_name=type_name, + manifest_version=manifest_version, + health_state=health_state, + service_status=service_status, + is_service_group=is_service_group, + **kwargs + ) self.has_persisted_state = has_persisted_state - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatefulServicePartitionInfo(ServicePartitionInfo): @@ -21359,29 +24724,46 @@ class StatefulServicePartitionInfo(ServicePartitionInfo): """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, auxiliary_replica_count: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: - super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "health_state": {"key": "HealthState", "type": "str"}, + "partition_status": {"key": "PartitionStatus", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "long"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "long"}, + "auxiliary_replica_count": {"key": "AuxiliaryReplicaCount", "type": "long"}, + "last_quorum_loss_duration": {"key": "LastQuorumLossDuration", "type": "duration"}, + "primary_epoch": {"key": "PrimaryEpoch", "type": "Epoch"}, + } + + def __init__( + self, + *, + health_state=None, + partition_status=None, + partition_information=None, + target_replica_set_size: int = None, + min_replica_set_size: int = None, + auxiliary_replica_count: int = None, + last_quorum_loss_duration=None, + primary_epoch=None, + **kwargs + ) -> None: + super(StatefulServicePartitionInfo, self).__init__( + health_state=health_state, + partition_status=partition_status, + partition_information=partition_information, + **kwargs + ) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size self.auxiliary_replica_count = auxiliary_replica_count self.last_quorum_loss_duration = last_quorum_loss_duration self.primary_epoch = primary_epoch - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatefulServiceReplicaHealth(ReplicaHealth): @@ -21423,23 +24805,40 @@ class StatefulServiceReplicaHealth(ReplicaHealth): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + partition_id: str = None, + replica_id: str = None, + **kwargs + ) -> None: + super(StatefulServiceReplicaHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + partition_id=partition_id, + **kwargs + ) self.replica_id = replica_id - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatefulServiceReplicaHealthState(ReplicaHealthState): @@ -21470,20 +24869,24 @@ class StatefulServiceReplicaHealthState(ReplicaHealthState): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + def __init__( + self, *, aggregated_health_state=None, partition_id: str = None, replica_id: str = None, **kwargs + ) -> None: + super(StatefulServiceReplicaHealthState, self).__init__( + aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs + ) self.replica_id = replica_id - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatefulServiceReplicaInfo(ReplicaInfo): @@ -21525,25 +24928,43 @@ class StatefulServiceReplicaInfo(ReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, replica_role=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + "service_kind": {"required": True}, + } + + _attribute_map = { + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "last_in_build_duration_in_seconds": {"key": "LastInBuildDurationInSeconds", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_role": {"key": "ReplicaRole", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, + } + + def __init__( + self, + *, + replica_status=None, + health_state=None, + node_name: str = None, + address: str = None, + last_in_build_duration_in_seconds: str = None, + replica_role=None, + replica_id: str = None, + **kwargs + ) -> None: + super(StatefulServiceReplicaInfo, self).__init__( + replica_status=replica_status, + health_state=health_state, + node_name=node_name, + address=address, + last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, + **kwargs + ) self.replica_role = replica_role self.replica_id = replica_id - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatefulServiceTypeDescription(ServiceTypeDescription): @@ -21582,24 +25003,46 @@ class StatefulServiceTypeDescription(ServiceTypeDescription): """ _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, has_persisted_state: bool=None, **kwargs) -> None: - super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + "kind": {"required": True}, + } + + _attribute_map = { + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "extensions": {"key": "Extensions", "type": "[ServiceTypeExtensionDescription]"}, + "kind": {"key": "Kind", "type": "str"}, + "has_persisted_state": {"key": "HasPersistedState", "type": "bool"}, + } + + def __init__( + self, + *, + is_stateful: bool = None, + service_type_name: str = None, + placement_constraints: str = None, + load_metrics=None, + service_placement_policies=None, + extensions=None, + has_persisted_state: bool = None, + **kwargs + ) -> None: + super(StatefulServiceTypeDescription, self).__init__( + is_stateful=is_stateful, + service_type_name=service_type_name, + placement_constraints=placement_constraints, + load_metrics=load_metrics, + service_placement_policies=service_placement_policies, + extensions=extensions, + **kwargs + ) self.has_persisted_state = has_persisted_state - self.kind = 'Stateful' + self.kind = "Stateful" class StatefulServiceUpdateDescription(ServiceUpdateDescription): @@ -21720,37 +25163,75 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): """ _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: - super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + "service_kind": {"required": True}, + "target_replica_set_size": {"minimum": 1}, + "min_replica_set_size": {"minimum": 1}, + "auxiliary_replica_count": {"minimum": 0}, + } + + _attribute_map = { + "flags": {"key": "Flags", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "tags_for_placement": {"key": "TagsForPlacement", "type": "NodeTagsDescription"}, + "tags_for_running": {"key": "TagsForRunning", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "target_replica_set_size": {"key": "TargetReplicaSetSize", "type": "int"}, + "min_replica_set_size": {"key": "MinReplicaSetSize", "type": "int"}, + "replica_restart_wait_duration_seconds": {"key": "ReplicaRestartWaitDurationSeconds", "type": "str"}, + "quorum_loss_wait_duration_seconds": {"key": "QuorumLossWaitDurationSeconds", "type": "str"}, + "stand_by_replica_keep_duration_seconds": {"key": "StandByReplicaKeepDurationSeconds", "type": "str"}, + "service_placement_time_limit_seconds": {"key": "ServicePlacementTimeLimitSeconds", "type": "str"}, + "drop_source_replica_on_move": {"key": "DropSourceReplicaOnMove", "type": "bool"}, + "replica_lifecycle_description": {"key": "ReplicaLifecycleDescription", "type": "ReplicaLifecycleDescription"}, + "auxiliary_replica_count": {"key": "AuxiliaryReplicaCount", "type": "int"}, + } + + def __init__( + self, + *, + flags: str = None, + placement_constraints: str = None, + correlation_scheme=None, + load_metrics=None, + service_placement_policies=None, + default_move_cost=None, + scaling_policies=None, + service_dns_name: str = None, + tags_for_placement=None, + tags_for_running=None, + target_replica_set_size: int = None, + min_replica_set_size: int = None, + replica_restart_wait_duration_seconds: str = None, + quorum_loss_wait_duration_seconds: str = None, + stand_by_replica_keep_duration_seconds: str = None, + service_placement_time_limit_seconds: str = None, + drop_source_replica_on_move: bool = None, + replica_lifecycle_description=None, + auxiliary_replica_count: int = None, + **kwargs + ) -> None: + super(StatefulServiceUpdateDescription, self).__init__( + flags=flags, + placement_constraints=placement_constraints, + correlation_scheme=correlation_scheme, + load_metrics=load_metrics, + service_placement_policies=service_placement_policies, + default_move_cost=default_move_cost, + scaling_policies=scaling_policies, + service_dns_name=service_dns_name, + tags_for_placement=tags_for_placement, + tags_for_running=tags_for_running, + **kwargs + ) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds @@ -21760,7 +25241,7 @@ def __init__(self, *, flags: str=None, placement_constraints: str=None, correlat self.drop_source_replica_on_move = drop_source_replica_on_move self.replica_lifecycle_description = replica_lifecycle_description self.auxiliary_replica_count = auxiliary_replica_count - self.service_kind = 'Stateful' + self.service_kind = "Stateful" class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): @@ -21814,41 +25295,67 @@ class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(StatelessReplicaHealthReportExpiredEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + replica_id=replica_id, + **kwargs + ) self.source_id = source_id self.property = property self.health_state = health_state @@ -21857,7 +25364,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, rep self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatelessReplicaHealthReportExpired' + self.kind = "StatelessReplicaHealthReportExpired" class StatelessReplicaNewHealthReportEvent(ReplicaEvent): @@ -21911,41 +25418,67 @@ class StatelessReplicaNewHealthReportEvent(ReplicaEvent): """ _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + "event_instance_id": {"required": True}, + "time_stamp": {"required": True}, + "kind": {"required": True}, + "partition_id": {"required": True}, + "replica_id": {"required": True}, + "source_id": {"required": True}, + "property": {"required": True}, + "health_state": {"required": True}, + "time_to_live_ms": {"required": True}, + "sequence_number": {"required": True}, + "description": {"required": True}, + "remove_when_expired": {"required": True}, + "source_utc_timestamp": {"required": True}, + } + + _attribute_map = { + "event_instance_id": {"key": "EventInstanceId", "type": "str"}, + "category": {"key": "Category", "type": "str"}, + "time_stamp": {"key": "TimeStamp", "type": "iso-8601"}, + "has_correlated_events": {"key": "HasCorrelatedEvents", "type": "bool"}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "long"}, + "source_id": {"key": "SourceId", "type": "str"}, + "property": {"key": "Property", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "time_to_live_ms": {"key": "TimeToLiveMs", "type": "long"}, + "sequence_number": {"key": "SequenceNumber", "type": "long"}, + "description": {"key": "Description", "type": "str"}, + "remove_when_expired": {"key": "RemoveWhenExpired", "type": "bool"}, + "source_utc_timestamp": {"key": "SourceUtcTimestamp", "type": "iso-8601"}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp, + partition_id: str, + replica_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp, + category: str = None, + has_correlated_events: bool = None, + **kwargs + ) -> None: + super(StatelessReplicaNewHealthReportEvent, self).__init__( + event_instance_id=event_instance_id, + category=category, + time_stamp=time_stamp, + has_correlated_events=has_correlated_events, + partition_id=partition_id, + replica_id=replica_id, + **kwargs + ) self.source_id = source_id self.property = property self.health_state = health_state @@ -21954,7 +25487,7 @@ def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, rep self.description = description self.remove_when_expired = remove_when_expired self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatelessReplicaNewHealthReport' + self.kind = "StatelessReplicaNewHealthReport" class StatelessServiceDescription(ServiceDescription): @@ -22089,44 +25622,95 @@ class StatelessServiceDescription(ServiceDescription): """ _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: int=None, **kwargs) -> None: - super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + "service_name": {"required": True}, + "service_type_name": {"required": True}, + "partition_description": {"required": True}, + "service_kind": {"required": True}, + "instance_count": {"required": True, "minimum": -1}, + "instance_close_delay_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + "instance_restart_wait_duration_seconds": {"maximum": 4294967295, "minimum": 0}, + } + + _attribute_map = { + "application_name": {"key": "ApplicationName", "type": "str"}, + "service_name": {"key": "ServiceName", "type": "str"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "initialization_data": {"key": "InitializationData", "type": "[int]"}, + "partition_description": {"key": "PartitionDescription", "type": "PartitionSchemeDescription"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "service_load_metrics": {"key": "ServiceLoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "is_default_move_cost_specified": {"key": "IsDefaultMoveCostSpecified", "type": "bool"}, + "service_package_activation_mode": {"key": "ServicePackageActivationMode", "type": "str"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "tags_required_to_place": {"key": "TagsRequiredToPlace", "type": "NodeTagsDescription"}, + "tags_required_to_run": {"key": "TagsRequiredToRun", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_count": {"key": "InstanceCount", "type": "int"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "min_instance_percentage": {"key": "MinInstancePercentage", "type": "int"}, + "flags": {"key": "Flags", "type": "int"}, + "instance_close_delay_duration_seconds": {"key": "InstanceCloseDelayDurationSeconds", "type": "long"}, + "instance_lifecycle_description": { + "key": "InstanceLifecycleDescription", + "type": "InstanceLifecycleDescription", + }, + "instance_restart_wait_duration_seconds": {"key": "InstanceRestartWaitDurationSeconds", "type": "long"}, + } + + def __init__( + self, + *, + service_name: str, + service_type_name: str, + partition_description, + instance_count: int, + application_name: str = None, + initialization_data=None, + placement_constraints: str = None, + correlation_scheme=None, + service_load_metrics=None, + service_placement_policies=None, + default_move_cost=None, + is_default_move_cost_specified: bool = None, + service_package_activation_mode=None, + service_dns_name: str = None, + scaling_policies=None, + tags_required_to_place=None, + tags_required_to_run=None, + min_instance_count: int = None, + min_instance_percentage: int = None, + flags: int = None, + instance_close_delay_duration_seconds: int = None, + instance_lifecycle_description=None, + instance_restart_wait_duration_seconds: int = None, + **kwargs + ) -> None: + super(StatelessServiceDescription, self).__init__( + application_name=application_name, + service_name=service_name, + service_type_name=service_type_name, + initialization_data=initialization_data, + partition_description=partition_description, + placement_constraints=placement_constraints, + correlation_scheme=correlation_scheme, + service_load_metrics=service_load_metrics, + service_placement_policies=service_placement_policies, + default_move_cost=default_move_cost, + is_default_move_cost_specified=is_default_move_cost_specified, + service_package_activation_mode=service_package_activation_mode, + service_dns_name=service_dns_name, + scaling_policies=scaling_policies, + tags_required_to_place=tags_required_to_place, + tags_required_to_run=tags_required_to_run, + **kwargs + ) self.instance_count = instance_count self.min_instance_count = min_instance_count self.min_instance_percentage = min_instance_percentage @@ -22134,7 +25718,7 @@ def __init__(self, *, service_name: str, service_type_name: str, partition_descr self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds self.instance_lifecycle_description = instance_lifecycle_description self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StatelessServiceInfo(ServiceInfo): @@ -22172,23 +25756,43 @@ class StatelessServiceInfo(ServiceInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + "id": {"key": "Id", "type": "str"}, + "name": {"key": "Name", "type": "str"}, + "type_name": {"key": "TypeName", "type": "str"}, + "manifest_version": {"key": "ManifestVersion", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "service_status": {"key": "ServiceStatus", "type": "str"}, + "is_service_group": {"key": "IsServiceGroup", "type": "bool"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, } - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: - super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.service_kind = 'Stateless' + def __init__( + self, + *, + id: str = None, + name: str = None, + type_name: str = None, + manifest_version: str = None, + health_state=None, + service_status=None, + is_service_group: bool = None, + **kwargs + ) -> None: + super(StatelessServiceInfo, self).__init__( + id=id, + name=name, + type_name=type_name, + manifest_version=manifest_version, + health_state=health_state, + service_status=service_status, + is_service_group=is_service_group, + **kwargs + ) + self.service_kind = "Stateless" class StatelessServiceInstanceHealth(ReplicaHealth): @@ -22228,23 +25832,40 @@ class StatelessServiceInstanceHealth(ReplicaHealth): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "health_events": {"key": "HealthEvents", "type": "[HealthEvent]"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, + "health_statistics": {"key": "HealthStatistics", "type": "HealthStatistics"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, instance_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + health_events=None, + unhealthy_evaluations=None, + health_statistics=None, + partition_id: str = None, + instance_id: str = None, + **kwargs + ) -> None: + super(StatelessServiceInstanceHealth, self).__init__( + aggregated_health_state=aggregated_health_state, + health_events=health_events, + unhealthy_evaluations=unhealthy_evaluations, + health_statistics=health_statistics, + partition_id=partition_id, + **kwargs + ) self.instance_id = instance_id - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StatelessServiceInstanceHealthState(ReplicaHealthState): @@ -22270,20 +25891,24 @@ class StatelessServiceInstanceHealthState(ReplicaHealthState): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "replica_id": {"key": "ReplicaId", "type": "str"}, } - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + def __init__( + self, *, aggregated_health_state=None, partition_id: str = None, replica_id: str = None, **kwargs + ) -> None: + super(StatelessServiceInstanceHealthState, self).__init__( + aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs + ) self.replica_id = replica_id - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StatelessServiceInstanceInfo(ReplicaInfo): @@ -22319,23 +25944,40 @@ class StatelessServiceInstanceInfo(ReplicaInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + "replica_status": {"key": "ReplicaStatus", "type": "str"}, + "health_state": {"key": "HealthState", "type": "str"}, + "node_name": {"key": "NodeName", "type": "str"}, + "address": {"key": "Address", "type": "str"}, + "last_in_build_duration_in_seconds": {"key": "LastInBuildDurationInSeconds", "type": "str"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_id": {"key": "InstanceId", "type": "str"}, } - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, instance_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + def __init__( + self, + *, + replica_status=None, + health_state=None, + node_name: str = None, + address: str = None, + last_in_build_duration_in_seconds: str = None, + instance_id: str = None, + **kwargs + ) -> None: + super(StatelessServiceInstanceInfo, self).__init__( + replica_status=replica_status, + health_state=health_state, + node_name=node_name, + address=address, + last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, + **kwargs + ) self.instance_id = instance_id - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StatelessServicePartitionInfo(ServicePartitionInfo): @@ -22383,25 +26025,40 @@ class StatelessServicePartitionInfo(ServicePartitionInfo): """ _validation = { - 'service_kind': {'required': True}, + "service_kind": {"required": True}, } _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + "health_state": {"key": "HealthState", "type": "str"}, + "partition_status": {"key": "PartitionStatus", "type": "str"}, + "partition_information": {"key": "PartitionInformation", "type": "PartitionInformation"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_count": {"key": "InstanceCount", "type": "long"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "min_instance_percentage": {"key": "MinInstancePercentage", "type": "int"}, } - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, **kwargs) -> None: - super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + def __init__( + self, + *, + health_state=None, + partition_status=None, + partition_information=None, + instance_count: int = None, + min_instance_count: int = None, + min_instance_percentage: int = None, + **kwargs + ) -> None: + super(StatelessServicePartitionInfo, self).__init__( + health_state=health_state, + partition_status=partition_status, + partition_information=partition_information, + **kwargs + ) self.instance_count = instance_count self.min_instance_count = min_instance_count self.min_instance_percentage = min_instance_percentage - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StatelessServiceTypeDescription(ServiceTypeDescription): @@ -22441,24 +26098,46 @@ class StatelessServiceTypeDescription(ServiceTypeDescription): """ _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, use_implicit_host: bool=None, **kwargs) -> None: - super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + "kind": {"required": True}, + } + + _attribute_map = { + "is_stateful": {"key": "IsStateful", "type": "bool"}, + "service_type_name": {"key": "ServiceTypeName", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "extensions": {"key": "Extensions", "type": "[ServiceTypeExtensionDescription]"}, + "kind": {"key": "Kind", "type": "str"}, + "use_implicit_host": {"key": "UseImplicitHost", "type": "bool"}, + } + + def __init__( + self, + *, + is_stateful: bool = None, + service_type_name: str = None, + placement_constraints: str = None, + load_metrics=None, + service_placement_policies=None, + extensions=None, + use_implicit_host: bool = None, + **kwargs + ) -> None: + super(StatelessServiceTypeDescription, self).__init__( + is_stateful=is_stateful, + service_type_name=service_type_name, + placement_constraints=placement_constraints, + load_metrics=load_metrics, + service_placement_policies=service_placement_policies, + extensions=extensions, + **kwargs + ) self.use_implicit_host = use_implicit_host - self.kind = 'Stateless' + self.kind = "Stateless" class StatelessServiceUpdateDescription(ServiceUpdateDescription): @@ -22599,39 +26278,77 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): """ _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: str=None, **kwargs) -> None: - super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + "service_kind": {"required": True}, + "instance_count": {"minimum": -1}, + } + + _attribute_map = { + "flags": {"key": "Flags", "type": "str"}, + "placement_constraints": {"key": "PlacementConstraints", "type": "str"}, + "correlation_scheme": {"key": "CorrelationScheme", "type": "[ServiceCorrelationDescription]"}, + "load_metrics": {"key": "LoadMetrics", "type": "[ServiceLoadMetricDescription]"}, + "service_placement_policies": { + "key": "ServicePlacementPolicies", + "type": "[ServicePlacementPolicyDescription]", + }, + "default_move_cost": {"key": "DefaultMoveCost", "type": "str"}, + "scaling_policies": {"key": "ScalingPolicies", "type": "[ScalingPolicyDescription]"}, + "service_dns_name": {"key": "ServiceDnsName", "type": "str"}, + "tags_for_placement": {"key": "TagsForPlacement", "type": "NodeTagsDescription"}, + "tags_for_running": {"key": "TagsForRunning", "type": "NodeTagsDescription"}, + "service_kind": {"key": "ServiceKind", "type": "str"}, + "instance_count": {"key": "InstanceCount", "type": "int"}, + "min_instance_count": {"key": "MinInstanceCount", "type": "int"}, + "min_instance_percentage": {"key": "MinInstancePercentage", "type": "int"}, + "instance_close_delay_duration_seconds": {"key": "InstanceCloseDelayDurationSeconds", "type": "str"}, + "instance_lifecycle_description": { + "key": "InstanceLifecycleDescription", + "type": "InstanceLifecycleDescription", + }, + "instance_restart_wait_duration_seconds": {"key": "InstanceRestartWaitDurationSeconds", "type": "str"}, + } + + def __init__( + self, + *, + flags: str = None, + placement_constraints: str = None, + correlation_scheme=None, + load_metrics=None, + service_placement_policies=None, + default_move_cost=None, + scaling_policies=None, + service_dns_name: str = None, + tags_for_placement=None, + tags_for_running=None, + instance_count: int = None, + min_instance_count: int = None, + min_instance_percentage: int = None, + instance_close_delay_duration_seconds: str = None, + instance_lifecycle_description=None, + instance_restart_wait_duration_seconds: str = None, + **kwargs + ) -> None: + super(StatelessServiceUpdateDescription, self).__init__( + flags=flags, + placement_constraints=placement_constraints, + correlation_scheme=correlation_scheme, + load_metrics=load_metrics, + service_placement_policies=service_placement_policies, + default_move_cost=default_move_cost, + scaling_policies=scaling_policies, + service_dns_name=service_dns_name, + tags_for_placement=tags_for_placement, + tags_for_running=tags_for_running, + **kwargs + ) self.instance_count = instance_count self.min_instance_count = min_instance_count self.min_instance_percentage = min_instance_percentage self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds self.instance_lifecycle_description = instance_lifecycle_description self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - self.service_kind = 'Stateless' + self.service_kind = "Stateless" class StoppedChaosEvent(ChaosEvent): @@ -22651,20 +26368,20 @@ class StoppedChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + def __init__(self, *, time_stamp_utc, reason: str = None, **kwargs) -> None: super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) self.reason = reason - self.kind = 'Stopped' + self.kind = "Stopped" class StringPropertyValue(PropertyValue): @@ -22679,19 +26396,19 @@ class StringPropertyValue(PropertyValue): """ _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, + "kind": {"required": True}, + "data": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "data": {"key": "Data", "type": "str"}, } def __init__(self, *, data: str, **kwargs) -> None: super(StringPropertyValue, self).__init__(**kwargs) self.data = data - self.kind = 'String' + self.kind = "String" class SuccessfulPropertyBatchInfo(PropertyBatchInfo): @@ -22710,18 +26427,18 @@ class SuccessfulPropertyBatchInfo(PropertyBatchInfo): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + "kind": {"key": "Kind", "type": "str"}, + "properties": {"key": "Properties", "type": "{PropertyInfo}"}, } def __init__(self, *, properties=None, **kwargs) -> None: super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) self.properties = properties - self.kind = 'Successful' + self.kind = "Successful" class SystemApplicationHealthEvaluation(HealthEvaluation): @@ -22752,20 +26469,24 @@ class SystemApplicationHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, *, aggregated_health_state=None, description: str = None, unhealthy_evaluations=None, **kwargs + ) -> None: + super(SystemApplicationHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'SystemApplication' + self.kind = "SystemApplication" class TcpConfig(Model): @@ -22784,15 +26505,15 @@ class TcpConfig(Model): """ _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, + "name": {"required": True}, + "port": {"required": True}, + "destination": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + "name": {"key": "name", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "destination": {"key": "destination", "type": "GatewayDestination"}, } def __init__(self, *, name: str, port: int, destination, **kwargs) -> None: @@ -22824,20 +26545,20 @@ class TestErrorChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + def __init__(self, *, time_stamp_utc, reason: str = None, **kwargs) -> None: super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) self.reason = reason - self.kind = 'TestError' + self.kind = "TestError" class TimeBasedBackupScheduleDescription(BackupScheduleDescription): @@ -22863,16 +26584,16 @@ class TimeBasedBackupScheduleDescription(BackupScheduleDescription): """ _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, + "schedule_kind": {"required": True}, + "schedule_frequency_type": {"required": True}, + "run_times": {"required": True}, } _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + "schedule_kind": {"key": "ScheduleKind", "type": "str"}, + "schedule_frequency_type": {"key": "ScheduleFrequencyType", "type": "str"}, + "run_days": {"key": "RunDays", "type": "[str]"}, + "run_times": {"key": "RunTimes", "type": "[iso-8601]"}, } def __init__(self, *, schedule_frequency_type, run_times, run_days=None, **kwargs) -> None: @@ -22880,7 +26601,7 @@ def __init__(self, *, schedule_frequency_type, run_times, run_days=None, **kwarg self.schedule_frequency_type = schedule_frequency_type self.run_days = run_days self.run_times = run_times - self.schedule_kind = 'TimeBased' + self.schedule_kind = "TimeBased" class TimeOfDay(Model): @@ -22895,16 +26616,16 @@ class TimeOfDay(Model): """ _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, + "hour": {"maximum": 23, "minimum": 0}, + "minute": {"maximum": 59, "minimum": 0}, } _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, + "hour": {"key": "Hour", "type": "int"}, + "minute": {"key": "Minute", "type": "int"}, } - def __init__(self, *, hour: int=None, minute: int=None, **kwargs) -> None: + def __init__(self, *, hour: int = None, minute: int = None, **kwargs) -> None: super(TimeOfDay, self).__init__(**kwargs) self.hour = hour self.minute = minute @@ -22922,8 +26643,8 @@ class TimeRange(Model): """ _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + "start_time": {"key": "StartTime", "type": "TimeOfDay"}, + "end_time": {"key": "EndTime", "type": "TimeOfDay"}, } def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: @@ -22953,17 +26674,17 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): """ _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, + "partition_scheme": {"required": True}, + "count": {"required": True}, + "low_key": {"required": True}, + "high_key": {"required": True}, } _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, + "partition_scheme": {"key": "PartitionScheme", "type": "str"}, + "count": {"key": "Count", "type": "int"}, + "low_key": {"key": "LowKey", "type": "str"}, + "high_key": {"key": "HighKey", "type": "str"}, } def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None: @@ -22971,7 +26692,7 @@ def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None self.count = count self.low_key = low_key self.high_key = high_key - self.partition_scheme = 'UniformInt64Range' + self.partition_scheme = "UniformInt64Range" class UnplacedReplicaInformation(Model): @@ -22987,12 +26708,14 @@ class UnplacedReplicaInformation(Model): """ _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + "service_name": {"key": "ServiceName", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "unplaced_replica_details": {"key": "UnplacedReplicaDetails", "type": "[str]"}, } - def __init__(self, *, service_name: str=None, partition_id: str=None, unplaced_replica_details=None, **kwargs) -> None: + def __init__( + self, *, service_name: str = None, partition_id: str = None, unplaced_replica_details=None, **kwargs + ) -> None: super(UnplacedReplicaInformation, self).__init__(**kwargs) self.service_name = service_name self.partition_id = partition_id @@ -23018,15 +26741,15 @@ class UnprovisionApplicationTypeDescriptionInfo(Model): """ _validation = { - 'application_type_version': {'required': True}, + "application_type_version": {"required": True}, } _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, + "application_type_version": {"key": "ApplicationTypeVersion", "type": "str"}, + "async_property": {"key": "Async", "type": "bool"}, } - def __init__(self, *, application_type_version: str, async_property: bool=None, **kwargs) -> None: + def __init__(self, *, application_type_version: str, async_property: bool = None, **kwargs) -> None: super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) self.application_type_version = application_type_version self.async_property = async_property @@ -23042,11 +26765,11 @@ class UnprovisionFabricDescription(Model): """ _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + "code_version": {"key": "CodeVersion", "type": "str"}, + "config_version": {"key": "ConfigVersion", "type": "str"}, } - def __init__(self, *, code_version: str=None, config_version: str=None, **kwargs) -> None: + def __init__(self, *, code_version: str = None, config_version: str = None, **kwargs) -> None: super(UnprovisionFabricDescription, self).__init__(**kwargs) self.code_version = code_version self.config_version = config_version @@ -23083,15 +26806,28 @@ class UpdateClusterUpgradeDescription(Model): """ _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, upgrade_kind="Rolling", update_description=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: + "upgrade_kind": {"key": "UpgradeKind", "type": "str"}, + "update_description": {"key": "UpdateDescription", "type": "RollingUpgradeUpdateDescription"}, + "cluster_health_policy": {"key": "ClusterHealthPolicy", "type": "ClusterHealthPolicy"}, + "enable_delta_health_evaluation": {"key": "EnableDeltaHealthEvaluation", "type": "bool"}, + "cluster_upgrade_health_policy": { + "key": "ClusterUpgradeHealthPolicy", + "type": "ClusterUpgradeHealthPolicyObject", + }, + "application_health_policy_map": {"key": "ApplicationHealthPolicyMap", "type": "ApplicationHealthPolicies"}, + } + + def __init__( + self, + *, + upgrade_kind="Rolling", + update_description=None, + cluster_health_policy=None, + enable_delta_health_evaluation: bool = None, + cluster_upgrade_health_policy=None, + application_health_policy_map=None, + **kwargs + ) -> None: super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) self.upgrade_kind = upgrade_kind self.update_description = update_description @@ -23114,11 +26850,11 @@ class UpdatePartitionLoadResult(Model): """ _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + "partition_id": {"key": "PartitionId", "type": "str"}, + "partition_error_code": {"key": "PartitionErrorCode", "type": "int"}, } - def __init__(self, *, partition_id: str=None, partition_error_code: int=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, partition_error_code: int = None, **kwargs) -> None: super(UpdatePartitionLoadResult, self).__init__(**kwargs) self.partition_id = partition_id self.partition_error_code = partition_error_code @@ -23168,30 +26904,44 @@ class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, + "baseline_error_count": {"key": "BaselineErrorCount", "type": "long"}, + "baseline_total_count": {"key": "BaselineTotalCount", "type": "long"}, + "max_percent_delta_unhealthy_nodes": {"key": "MaxPercentDeltaUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + upgrade_domain_name: str = None, + baseline_error_count: int = None, + baseline_total_count: int = None, + max_percent_delta_unhealthy_nodes: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.upgrade_domain_name = upgrade_domain_name self.baseline_error_count = baseline_error_count self.baseline_total_count = baseline_total_count self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainDeltaNodesCheck' + self.kind = "UpgradeDomainDeltaNodesCheck" class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): @@ -23232,26 +26982,41 @@ class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, + "max_percent_unhealthy_deployed_applications": { + "key": "MaxPercentUnhealthyDeployedApplications", + "type": "int", + }, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + upgrade_domain_name: str = None, + max_percent_unhealthy_deployed_applications: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.upgrade_domain_name = upgrade_domain_name self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainDeployedApplications' + self.kind = "UpgradeDomainDeployedApplications" class UpgradeDomainInfo(Model): @@ -23265,11 +27030,11 @@ class UpgradeDomainInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "state": {"key": "State", "type": "str"}, } - def __init__(self, *, name: str=None, state=None, **kwargs) -> None: + def __init__(self, *, name: str = None, state=None, **kwargs) -> None: super(UpgradeDomainInfo, self).__init__(**kwargs) self.name = name self.state = state @@ -23311,26 +27076,38 @@ class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + "aggregated_health_state": {"key": "AggregatedHealthState", "type": "str"}, + "description": {"key": "Description", "type": "str"}, + "kind": {"key": "Kind", "type": "str"}, + "upgrade_domain_name": {"key": "UpgradeDomainName", "type": "str"}, + "max_percent_unhealthy_nodes": {"key": "MaxPercentUnhealthyNodes", "type": "int"}, + "total_count": {"key": "TotalCount", "type": "long"}, + "unhealthy_evaluations": {"key": "UnhealthyEvaluations", "type": "[HealthEvaluationWrapper]"}, } - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + def __init__( + self, + *, + aggregated_health_state=None, + description: str = None, + upgrade_domain_name: str = None, + max_percent_unhealthy_nodes: int = None, + total_count: int = None, + unhealthy_evaluations=None, + **kwargs + ) -> None: + super(UpgradeDomainNodesHealthEvaluation, self).__init__( + aggregated_health_state=aggregated_health_state, description=description, **kwargs + ) self.upgrade_domain_name = upgrade_domain_name self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes self.total_count = total_count self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainNodes' + self.kind = "UpgradeDomainNodes" class UpgradeOrchestrationServiceState(Model): @@ -23342,10 +27119,10 @@ class UpgradeOrchestrationServiceState(Model): """ _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, + "service_state": {"key": "ServiceState", "type": "str"}, } - def __init__(self, *, service_state: str=None, **kwargs) -> None: + def __init__(self, *, service_state: str = None, **kwargs) -> None: super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) self.service_state = service_state @@ -23369,14 +27146,23 @@ class UpgradeOrchestrationServiceStateSummary(Model): """ _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + "current_code_version": {"key": "CurrentCodeVersion", "type": "str"}, + "current_manifest_version": {"key": "CurrentManifestVersion", "type": "str"}, + "target_code_version": {"key": "TargetCodeVersion", "type": "str"}, + "target_manifest_version": {"key": "TargetManifestVersion", "type": "str"}, + "pending_upgrade_type": {"key": "PendingUpgradeType", "type": "str"}, } - def __init__(self, *, current_code_version: str=None, current_manifest_version: str=None, target_code_version: str=None, target_manifest_version: str=None, pending_upgrade_type: str=None, **kwargs) -> None: + def __init__( + self, + *, + current_code_version: str = None, + current_manifest_version: str = None, + target_code_version: str = None, + target_manifest_version: str = None, + pending_upgrade_type: str = None, + **kwargs + ) -> None: super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) self.current_code_version = current_code_version self.current_manifest_version = current_manifest_version @@ -23396,11 +27182,11 @@ class UpgradeUnitInfo(Model): """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, + "name": {"key": "Name", "type": "str"}, + "state": {"key": "State", "type": "str"}, } - def __init__(self, *, name: str=None, state=None, **kwargs) -> None: + def __init__(self, *, name: str = None, state=None, **kwargs) -> None: super(UpgradeUnitInfo, self).__init__(**kwargs) self.name = name self.state = state @@ -23418,11 +27204,11 @@ class UploadChunkRange(Model): """ _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, + "start_position": {"key": "StartPosition", "type": "str"}, + "end_position": {"key": "EndPosition", "type": "str"}, } - def __init__(self, *, start_position: str=None, end_position: str=None, **kwargs) -> None: + def __init__(self, *, start_position: str = None, end_position: str = None, **kwargs) -> None: super(UploadChunkRange, self).__init__(**kwargs) self.start_position = start_position self.end_position = end_position @@ -23439,7 +27225,7 @@ class UploadSession(Model): """ _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + "upload_sessions": {"key": "UploadSessions", "type": "[UploadSessionInfo]"}, } def __init__(self, *, upload_sessions=None, **kwargs) -> None: @@ -23468,14 +27254,23 @@ class UploadSessionInfo(Model): """ _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + "store_relative_path": {"key": "StoreRelativePath", "type": "str"}, + "session_id": {"key": "SessionId", "type": "str"}, + "modified_date": {"key": "ModifiedDate", "type": "iso-8601"}, + "file_size": {"key": "FileSize", "type": "str"}, + "expected_ranges": {"key": "ExpectedRanges", "type": "[UploadChunkRange]"}, } - def __init__(self, *, store_relative_path: str=None, session_id: str=None, modified_date=None, file_size: str=None, expected_ranges=None, **kwargs) -> None: + def __init__( + self, + *, + store_relative_path: str = None, + session_id: str = None, + modified_date=None, + file_size: str = None, + expected_ranges=None, + **kwargs + ) -> None: super(UploadSessionInfo, self).__init__(**kwargs) self.store_relative_path = store_relative_path self.session_id = session_id @@ -23495,11 +27290,11 @@ class UsageInfo(Model): """ _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, + "used_space": {"key": "UsedSpace", "type": "str"}, + "file_count": {"key": "FileCount", "type": "str"}, } - def __init__(self, *, used_space: str=None, file_count: str=None, **kwargs) -> None: + def __init__(self, *, used_space: str = None, file_count: str = None, **kwargs) -> None: super(UsageInfo, self).__init__(**kwargs) self.used_space = used_space self.file_count = file_count @@ -23519,11 +27314,11 @@ class ValidateClusterUpgradeResult(Model): """ _attribute_map = { - 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, - 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, + "service_host_upgrade_impact": {"key": "ServiceHostUpgradeImpact", "type": "str"}, + "validation_details": {"key": "ValidationDetails", "type": "str"}, } - def __init__(self, *, service_host_upgrade_impact=None, validation_details: str=None, **kwargs) -> None: + def __init__(self, *, service_host_upgrade_impact=None, validation_details: str = None, **kwargs) -> None: super(ValidateClusterUpgradeResult, self).__init__(**kwargs) self.service_host_upgrade_impact = service_host_upgrade_impact self.validation_details = validation_details @@ -23547,20 +27342,20 @@ class ValidationFailedChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + def __init__(self, *, time_stamp_utc, reason: str = None, **kwargs) -> None: super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) self.reason = reason - self.kind = 'ValidationFailed' + self.kind = "ValidationFailed" class VolumeProviderParametersAzureFile(Model): @@ -23580,17 +27375,17 @@ class VolumeProviderParametersAzureFile(Model): """ _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, + "account_name": {"required": True}, + "share_name": {"required": True}, } _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, + "account_name": {"key": "accountName", "type": "str"}, + "account_key": {"key": "accountKey", "type": "str"}, + "share_name": {"key": "shareName", "type": "str"}, } - def __init__(self, *, account_name: str, share_name: str, account_key: str=None, **kwargs) -> None: + def __init__(self, *, account_name: str, share_name: str, account_key: str = None, **kwargs) -> None: super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) self.account_name = account_name self.account_key = account_key @@ -23625,24 +27420,24 @@ class VolumeResourceDescription(Model): """ _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, + "name": {"required": True}, + "status": {"readonly": True}, + "status_details": {"readonly": True}, + "provider": {"required": True, "constant": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + "name": {"key": "name", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "status": {"key": "properties.status", "type": "str"}, + "status_details": {"key": "properties.statusDetails", "type": "str"}, + "provider": {"key": "properties.provider", "type": "str"}, + "azure_file_parameters": {"key": "properties.azureFileParameters", "type": "VolumeProviderParametersAzureFile"}, } provider = "SFAzureFile" - def __init__(self, *, name: str, description: str=None, azure_file_parameters=None, **kwargs) -> None: + def __init__(self, *, name: str, description: str = None, azure_file_parameters=None, **kwargs) -> None: super(VolumeResourceDescription, self).__init__(**kwargs) self.name = name self.description = description @@ -23667,17 +27462,17 @@ class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForInbuildReplica' + self.kind = "WaitForInbuildReplica" class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): @@ -23694,17 +27489,17 @@ class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimaryPlacement' + self.kind = "WaitForPrimaryPlacement" class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): @@ -23722,17 +27517,17 @@ class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimarySwap' + self.kind = "WaitForPrimarySwap" class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): @@ -23749,17 +27544,17 @@ class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + "kind": {"key": "Kind", "type": "str"}, + "partition_id": {"key": "PartitionId", "type": "str"}, } - def __init__(self, *, partition_id: str=None, **kwargs) -> None: + def __init__(self, *, partition_id: str = None, **kwargs) -> None: super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForReconfiguration' + self.kind = "WaitForReconfiguration" class WaitingChaosEvent(ChaosEvent): @@ -23780,17 +27575,17 @@ class WaitingChaosEvent(ChaosEvent): """ _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, + "time_stamp_utc": {"required": True}, + "kind": {"required": True}, } _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, + "time_stamp_utc": {"key": "TimeStampUtc", "type": "iso-8601"}, + "kind": {"key": "Kind", "type": "str"}, + "reason": {"key": "Reason", "type": "str"}, } - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + def __init__(self, *, time_stamp_utc, reason: str = None, **kwargs) -> None: super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) self.reason = reason - self.kind = 'Waiting' + self.kind = "Waiting" diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py index ba2eb3161efd..53577c822d51 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py @@ -144,7 +144,9 @@ class ApplicationTypeDefinitionKind(str, Enum): class ApplicationTypeStatus(str, Enum): invalid = "Invalid" #: Indicates the application type status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - provisioning = "Provisioning" #: Indicates that the application type is being provisioned in the cluster. The value is 1. + provisioning = ( + "Provisioning" #: Indicates that the application type is being provisioned in the cluster. The value is 1. + ) available = "Available" #: Indicates that the application type is fully provisioned and is available for use. An application of this type and version can be created. The value is 2. unprovisioning = "Unprovisioning" #: Indicates that the application type is in process of being unprovisioned from the cluster. The value is 3. failed = "Failed" #: Indicates that the application type provisioning failed and it is unavailable for use. The failure details can be obtained from the application type information query. The failed application type information remains in the cluster until it is unprovisioned or reprovisioned successfully. The value is 4. @@ -213,7 +215,9 @@ class UpgradeState(str, Enum): class NodeUpgradePhase(str, Enum): invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - pre_upgrade_safety_check = "PreUpgradeSafetyCheck" #: The upgrade has not started yet due to pending safety checks. The value is 1 + pre_upgrade_safety_check = ( + "PreUpgradeSafetyCheck" #: The upgrade has not started yet due to pending safety checks. The value is 1 + ) upgrading = "Upgrading" #: The upgrade is in progress. The value is 2 post_upgrade_safety_check = "PostUpgradeSafetyCheck" #: The upgrade has completed and post upgrade safety checks are being performed. The value is 3 @@ -294,8 +298,12 @@ class EntityKind(str, Enum): service = "Service" #: Indicates the entity is a Service Fabric service. The value is 3. application = "Application" #: Indicates the entity is a Service Fabric application. The value is 4. replica = "Replica" #: Indicates the entity is a Service Fabric replica. The value is 5. - deployed_application = "DeployedApplication" #: Indicates the entity is a Service Fabric deployed application. The value is 6. - deployed_service_package = "DeployedServicePackage" #: Indicates the entity is a Service Fabric deployed service package. The value is 7. + deployed_application = ( + "DeployedApplication" #: Indicates the entity is a Service Fabric deployed application. The value is 6. + ) + deployed_service_package = ( + "DeployedServicePackage" #: Indicates the entity is a Service Fabric deployed service package. The value is 7. + ) cluster = "Cluster" #: Indicates the entity is a Service Fabric cluster. The value is 8. @@ -370,26 +378,36 @@ class HealthEvaluationKind(str, Enum): invalid = "Invalid" #: Indicates that the health evaluation is invalid. The value is zero. event = "Event" #: Indicates that the health evaluation is for a health event. The value is 1. replicas = "Replicas" #: Indicates that the health evaluation is for the replicas of a partition. The value is 2. - partitions = "Partitions" #: Indicates that the health evaluation is for the partitions of a service. The value is 3. + partitions = ( + "Partitions" #: Indicates that the health evaluation is for the partitions of a service. The value is 3. + ) deployed_service_packages = "DeployedServicePackages" #: Indicates that the health evaluation is for the deployed service packages of a deployed application. The value is 4. deployed_applications = "DeployedApplications" #: Indicates that the health evaluation is for the deployed applications of an application. The value is 5. services = "Services" #: Indicates that the health evaluation is for services of an application. The value is 6. nodes = "Nodes" #: Indicates that the health evaluation is for the cluster nodes. The value is 7. - applications = "Applications" #: Indicates that the health evaluation is for the cluster applications. The value is 8. - system_application = "SystemApplication" #: Indicates that the health evaluation is for the system application. The value is 9. + applications = ( + "Applications" #: Indicates that the health evaluation is for the cluster applications. The value is 8. + ) + system_application = ( + "SystemApplication" #: Indicates that the health evaluation is for the system application. The value is 9. + ) upgrade_domain_deployed_applications = "UpgradeDomainDeployedApplications" #: Indicates that the health evaluation is for the deployed applications of an application in an upgrade domain. The value is 10. upgrade_domain_nodes = "UpgradeDomainNodes" #: Indicates that the health evaluation is for the cluster nodes in an upgrade domain. The value is 11. replica = "Replica" #: Indicates that the health evaluation is for a replica. The value is 13. partition = "Partition" #: Indicates that the health evaluation is for a partition. The value is 14. deployed_service_package = "DeployedServicePackage" #: Indicates that the health evaluation is for a deployed service package. The value is 16. - deployed_application = "DeployedApplication" #: Indicates that the health evaluation is for a deployed application. The value is 17. + deployed_application = ( + "DeployedApplication" #: Indicates that the health evaluation is for a deployed application. The value is 17. + ) service = "Service" #: Indicates that the health evaluation is for a service. The value is 15. node = "Node" #: Indicates that the health evaluation is for a node. The value is 12. application = "Application" #: Indicates that the health evaluation is for an application. The value is 18. delta_nodes_check = "DeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is 19. upgrade_domain_delta_nodes_check = "UpgradeDomainDeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster nodes. The value is 20. application_type_applications = "ApplicationTypeApplications" #: – Indicates that the health evaluation is for applications of an application type. The value is 21. - node_type_nodes = "NodeTypeNodes" #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. + node_type_nodes = ( + "NodeTypeNodes" #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. + ) class Ordering(str, Enum): @@ -418,7 +436,9 @@ class NodeDeactivationStatus(str, Enum): class NodeDeactivationTaskType(str, Enum): invalid = "Invalid" #: Indicates the node deactivation task type is invalid. All Service Fabric enumerations have the invalid type. The value is zero. This value is not used. - infrastructure = "Infrastructure" #: Specifies the task created by Infrastructure hosting the nodes. The value is 1. + infrastructure = ( + "Infrastructure" #: Specifies the task created by Infrastructure hosting the nodes. The value is 1. + ) repair = "Repair" #: Specifies the task that was created by the Repair Manager service. The value is 2. client = "Client" #: Specifies that the task was created by using the public API. The value is 3. @@ -496,7 +516,9 @@ class ServicePackageActivationMode(str, Enum): class ServiceKind(str, Enum): invalid = "Invalid" #: Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - stateless = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. + stateless = ( + "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. + ) stateful = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2. @@ -543,7 +565,9 @@ class HostIsolationMode(str, Enum): class DeploymentStatus(str, Enum): - invalid = "Invalid" #: Indicates status of the application or service package is not known or invalid. The value is 0. + invalid = ( + "Invalid" #: Indicates status of the application or service package is not known or invalid. The value is 0. + ) downloading = "Downloading" #: Indicates the application or service package is being downloaded to the node from the ImageStore. The value is 1. activating = "Activating" #: Indicates the application or service package is being activated. The value is 2. active = "Active" #: Indicates the application or service package is active the node. The value is 3. @@ -581,7 +605,9 @@ class ChaosScheduleStatus(str, Enum): class ChaosEventKind(str, Enum): - invalid = "Invalid" #: Indicates an invalid Chaos event kind. All Service Fabric enumerations have the invalid type. + invalid = ( + "Invalid" #: Indicates an invalid Chaos event kind. All Service Fabric enumerations have the invalid type. + ) started = "Started" #: Indicates a Chaos event that gets generated when Chaos is started. executing_faults = "ExecutingFaults" #: Indicates a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. waiting = "Waiting" #: Indicates a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. @@ -593,13 +619,21 @@ class ChaosEventKind(str, Enum): class ComposeDeploymentStatus(str, Enum): invalid = "Invalid" #: Indicates that the compose deployment status is invalid. The value is zero. - provisioning = "Provisioning" #: Indicates that the compose deployment is being provisioned in background. The value is 1. + provisioning = ( + "Provisioning" #: Indicates that the compose deployment is being provisioned in background. The value is 1. + ) creating = "Creating" #: Indicates that the compose deployment is being created in background. The value is 2. ready = "Ready" #: Indicates that the compose deployment has been successfully created or upgraded. The value is 3. - unprovisioning = "Unprovisioning" #: Indicates that the compose deployment is being unprovisioned in background. The value is 4. + unprovisioning = ( + "Unprovisioning" #: Indicates that the compose deployment is being unprovisioned in background. The value is 4. + ) deleting = "Deleting" #: Indicates that the compose deployment is being deleted in background. The value is 5. - failed = "Failed" #: Indicates that the compose deployment was terminated due to persistent failures. The value is 6. - upgrading = "Upgrading" #: Indicates that the compose deployment is being upgraded in the background. The value is 7. + failed = ( + "Failed" #: Indicates that the compose deployment was terminated due to persistent failures. The value is 6. + ) + upgrading = ( + "Upgrading" #: Indicates that the compose deployment is being upgraded in the background. The value is 7. + ) class ComposeDeploymentUpgradeState(str, Enum): @@ -661,7 +695,9 @@ class ReplicatorOperationName(str, Enum): close = "Close" #: Replicator is closing. abort = "Abort" #: Replicator is being aborted. on_data_loss = "OnDataLoss" #: Replicator is handling the data loss condition, where the user service may potentially be recovering state from an external source. - wait_for_catchup = "WaitForCatchup" #: Replicator is waiting for a quorum of replicas to be caught up to the latest state. + wait_for_catchup = ( + "WaitForCatchup" #: Replicator is waiting for a quorum of replicas to be caught up to the latest state. + ) build = "Build" #: Replicator is in the process of building one or more replicas. @@ -670,7 +706,9 @@ class PartitionAccessStatus(str, Enum): invalid = "Invalid" #: Indicates that the read or write operation access status is not valid. This value is not returned to the caller. granted = "Granted" #: Indicates that the read or write operation access is granted and the operation is allowed. reconfiguration_pending = "ReconfigurationPending" #: Indicates that the client should try again later, because a reconfiguration is in progress. - not_primary = "NotPrimary" #: Indicates that this client request was received by a replica that is not a Primary replica. + not_primary = ( + "NotPrimary" #: Indicates that this client request was received by a replica that is not a Primary replica. + ) no_write_quorum = "NoWriteQuorum" #: Indicates that no write quorum is available and, therefore, no write operation can be accepted. @@ -768,7 +806,9 @@ class RetentionPolicyType(str, Enum): class BackupStorageKind(str, Enum): - invalid = "Invalid" #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid type. + invalid = ( + "Invalid" #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid type. + ) file_share = "FileShare" #: Indicates file/ SMB share to be used as backup storage. azure_blob_store = "AzureBlobStore" #: Indicates Azure blob store to be used as backup storage. dsms_azure_blob_store = "DsmsAzureBlobStore" #: Indicates Dsms Azure blob store to be used as backup storage. @@ -777,7 +817,9 @@ class BackupStorageKind(str, Enum): class BackupScheduleKind(str, Enum): - invalid = "Invalid" #: Indicates an invalid backup schedule kind. All Service Fabric enumerations have the invalid type. + invalid = ( + "Invalid" #: Indicates an invalid backup schedule kind. All Service Fabric enumerations have the invalid type. + ) time_based = "TimeBased" #: Indicates a time-based backup schedule. frequency_based = "FrequencyBased" #: Indicates a frequency-based backup schedule. @@ -817,7 +859,9 @@ class BackupType(str, Enum): class ManagedIdentityType(str, Enum): - invalid = "Invalid" #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid type. + invalid = ( + "Invalid" #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid type. + ) vmss = "VMSS" #: Indicates VMSS managed identity should be used to connect to Azure blob store. cluster = "Cluster" #: Indicates cluster managed identity should be used to connect to Azure blob store. @@ -885,7 +929,9 @@ class State(str, Enum): created = "Created" #: Indicates that the repair task has been created. claimed = "Claimed" #: Indicates that the repair task has been claimed by a repair executor. preparing = "Preparing" #: Indicates that the Repair Manager is preparing the system to handle the impact of the repair task, usually by taking resources offline gracefully. - approved = "Approved" #: Indicates that the repair task has been approved by the Repair Manager and is safe to execute. + approved = ( + "Approved" #: Indicates that the repair task has been approved by the Repair Manager and is safe to execute. + ) executing = "Executing" #: Indicates that execution of the repair task is in progress. restoring = "Restoring" #: Indicates that the Repair Manager is restoring the system to its pre-repair state, usually by bringing resources back online. completed = "Completed" #: Indicates that the repair task has completed, and no further state changes will occur. @@ -928,7 +974,9 @@ class ServiceHostUpgradeImpact(str, Enum): invalid = "Invalid" #: Indicates the upgrade impact is invalid. All Service Fabric enumerations have the invalid type. The value is zero. none = "None" #: The upgrade is not expected to cause service host restarts. The value is 1. - service_host_restart = "ServiceHostRestart" #: The upgrade is expected to cause a service host restart. The value is 2. + service_host_restart = ( + "ServiceHostRestart" #: The upgrade is expected to cause a service host restart. The value is 2. + ) unexpected_service_host_restart = "UnexpectedServiceHostRestart" #: The upgrade will cause an unexpected service host restart. This indicates a bug in the Service Fabric runtime and proceeding with an upgrade with this impact may lead to skipped safety checks. Running the upgrade with the ForceRestart flag will force proper safety checks. The value is 3. @@ -983,23 +1031,33 @@ class OperatingSystemType(str, Enum): class ImageRegistryPasswordType(str, Enum): - clear_text = "ClearText" #: The image registry password in clear text, will not be processed in any way and used directly + clear_text = ( + "ClearText" #: The image registry password in clear text, will not be processed in any way and used directly + ) key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting used - secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting used + secret_value_reference = ( + "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting used + ) class EnvironmentVariableType(str, Enum): - clear_text = "ClearText" #: The environment variable in clear text, will not be processed in any way and passed in as is + clear_text = ( + "ClearText" #: The environment variable in clear text, will not be processed in any way and passed in as is + ) key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting passed in - secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in + secret_value_reference = ( + "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in + ) class SettingType(str, Enum): clear_text = "ClearText" #: The setting in clear text, will not be processed in any way and passed in as is key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting passed in - secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in + secret_value_reference = ( + "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in + ) class Scheme(str, Enum): @@ -1015,7 +1073,9 @@ class ApplicationResourceUpgradeState(str, Enum): rolling_forward = "RollingForward" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. unprovisioning_current = "UnprovisioningCurrent" #: The upgrade is in the progress of unprovisioning current application type version and rolling forward to the target version is completed. The value is 3. completed_rollforward = "CompletedRollforward" #: The upgrade has finished rolling forward. The value is 4. - rolling_back = "RollingBack" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 5. + rolling_back = ( + "RollingBack" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 5. + ) unprovisioning_target = "UnprovisioningTarget" #: The upgrade is in the progress of unprovisioning target application type version and rolling back to the current version is completed. The value is 6. completed_rollback = "CompletedRollback" #: The upgrade has finished rolling back. The value is 7. failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 8. @@ -1037,7 +1097,9 @@ class DiagnosticsSinkKind(str, Enum): class AutoScalingMechanismKind(str, Enum): - add_remove_replica = "AddRemoveReplica" #: Indicates that scaling should be performed by adding or removing replicas. + add_remove_replica = ( + "AddRemoveReplica" #: Indicates that scaling should be performed by adding or removing replicas. + ) class AutoScalingMetricKind(str, Enum): @@ -1065,12 +1127,16 @@ class ExecutionPolicyType(str, Enum): class RestartPolicy(str, Enum): on_failure = "OnFailure" #: Service will be restarted when it encounters a failure. - never = "Never" #: Service will never be restarted. If the service encounters a failure, it will move to Failed state. + never = ( + "Never" #: Service will never be restarted. If the service encounters a failure, it will move to Failed state. + ) class NodeStatusFilter(str, Enum): - default = "default" #: This filter value will match all of the nodes excepts the ones with status as Unknown or Removed. + default = ( + "default" #: This filter value will match all of the nodes excepts the ones with status as Unknown or Removed. + ) all = "all" #: This filter value will match all of the nodes. up = "up" #: This filter value will match nodes that are Up. down = "down" #: This filter value will match nodes that are Down. @@ -1083,7 +1149,9 @@ class NodeStatusFilter(str, Enum): class ReplicaHealthReportServiceKind(str, Enum): - stateless = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1 + stateless = ( + "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1 + ) stateful = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2. @@ -1091,7 +1159,9 @@ class DataLossMode(str, Enum): invalid = "Invalid" #: Reserved. Do not pass into API. partial_data_loss = "PartialDataLoss" #: PartialDataLoss option will cause a quorum of replicas to go down, triggering an OnDataLoss event in the system for the given partition. - full_data_loss = "FullDataLoss" #: FullDataLoss option will drop all the replicas which means that all the data will be lost. + full_data_loss = ( + "FullDataLoss" #: FullDataLoss option will drop all the replicas which means that all the data will be lost. + ) class NodeTransitionType(str, Enum): @@ -1111,5 +1181,7 @@ class QuorumLossMode(str, Enum): class RestartPartitionMode(str, Enum): invalid = "Invalid" #: Reserved. Do not pass into API. - all_replicas_or_instances = "AllReplicasOrInstances" #: All replicas or instances in the partition are restarted at once. + all_replicas_or_instances = ( + "AllReplicasOrInstances" #: All replicas or instances in the partition are restarted at once. + ) only_active_secondaries = "OnlyActiveSecondaries" #: Only the secondary replicas are restarted. diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/__init__.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/__init__.py index 2d275dce36ff..b19cb274bdfe 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/__init__.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/__init__.py @@ -21,14 +21,14 @@ from ._service_fabric_client_ap_is_operations import ServiceFabricClientAPIsOperationsMixin __all__ = [ - 'MeshSecretOperations', - 'MeshSecretValueOperations', - 'MeshVolumeOperations', - 'MeshNetworkOperations', - 'MeshApplicationOperations', - 'MeshServiceOperations', - 'MeshCodePackageOperations', - 'MeshServiceReplicaOperations', - 'MeshGatewayOperations', - 'ServiceFabricClientAPIsOperationsMixin', + "MeshSecretOperations", + "MeshSecretValueOperations", + "MeshVolumeOperations", + "MeshNetworkOperations", + "MeshApplicationOperations", + "MeshServiceOperations", + "MeshCodePackageOperations", + "MeshServiceReplicaOperations", + "MeshGatewayOperations", + "ServiceFabricClientAPIsOperationsMixin", ] diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_application_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_application_operations.py index 9982364b8c00..3302835f2270 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_application_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_application_operations.py @@ -36,7 +36,13 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def create_or_update( - self, application_resource_name, application_resource_description, custom_headers=None, raw=False, **operation_config): + self, + application_resource_name, + application_resource_description, + custom_headers=None, + raw=False, + **operation_config + ): """Creates or updates a Application resource. Creates a Application resource with the specified name, description and @@ -64,25 +70,27 @@ def create_or_update( api_version = "6.4-preview" # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') + body_content = self._serialize.body(application_resource_description, "ApplicationResourceDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -93,19 +101,19 @@ def create_or_update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) + deserialized = self._deserialize("ApplicationResourceDescription", response) if response.status_code == 201: - deserialized = self._deserialize('ApplicationResourceDescription', response) + deserialized = self._deserialize("ApplicationResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - def get( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): + create_or_update.metadata = {"url": "/Resources/Applications/{applicationResourceName}"} + + def get(self, application_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the Application resource with the given name. Gets the information about the Application resource with the given @@ -129,19 +137,21 @@ def get( api_version = "6.4-preview" # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -154,17 +164,17 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) + deserialized = self._deserialize("ApplicationResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - def delete( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): + get.metadata = {"url": "/Resources/Applications/{applicationResourceName}"} + + def delete(self, application_resource_name, custom_headers=None, raw=False, **operation_config): """Deletes the Application resource. Deletes the Application resource identified by the name. @@ -184,15 +194,17 @@ def delete( api_version = "6.4-preview" # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} @@ -209,10 +221,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - def list( - self, custom_headers=None, raw=False, **operation_config): + delete.metadata = {"url": "/Resources/Applications/{applicationResourceName}"} + + def list(self, custom_headers=None, raw=False, **operation_config): """Lists all the application resources. Gets the information about all application resources in a given @@ -235,15 +247,15 @@ def list( api_version = "6.4-preview" # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -256,17 +268,17 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationResourceDescriptionList', response) + deserialized = self._deserialize("PagedApplicationResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Applications'} - def get_upgrade_progress( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): + list.metadata = {"url": "/Resources/Applications"} + + def get_upgrade_progress(self, application_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the progress of the latest upgrade performed on this application resource. @@ -292,19 +304,21 @@ def get_upgrade_progress( api_version = "7.0" # Construct URL - url = self.get_upgrade_progress.metadata['url'] + url = self.get_upgrade_progress.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -317,11 +331,12 @@ def get_upgrade_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', response) + deserialized = self._deserialize("ApplicationResourceUpgradeProgressInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_upgrade_progress.metadata = {'url': '/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress'} + + get_upgrade_progress.metadata = {"url": "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_code_package_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_code_package_operations.py index 40390ca54420..118cfd0b31d2 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_code_package_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_code_package_operations.py @@ -38,7 +38,16 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def get_container_logs( - self, application_resource_name, service_resource_name, replica_name, code_package_name, tail=None, custom_headers=None, raw=False, **operation_config): + self, + application_resource_name, + service_resource_name, + replica_name, + code_package_name, + tail=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the logs from the container. Gets the logs for the container of the specified code package of the @@ -67,24 +76,28 @@ def get_container_logs( :class:`FabricErrorException` """ # Construct URL - url = self.get_container_logs.metadata['url'] + url = self.get_container_logs.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True), - 'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str') + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ), + "serviceResourceName": self._serialize.url( + "service_resource_name", service_resource_name, "str", skip_quote=True + ), + "replicaName": self._serialize.url("replica_name", replica_name, "str", skip_quote=True), + "codePackageName": self._serialize.url("code_package_name", code_package_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") if tail is not None: - query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') + query_parameters["Tail"] = self._serialize.query("tail", tail, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -97,11 +110,14 @@ def get_container_logs( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ContainerLogs', response) + deserialized = self._deserialize("ContainerLogs", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_container_logs.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs'} + + get_container_logs.metadata = { + "url": "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs" + } diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_gateway_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_gateway_operations.py index 582ffc6910d6..589d0dd20161 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_gateway_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_gateway_operations.py @@ -38,7 +38,8 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def create_or_update( - self, gateway_resource_name, gateway_resource_description, custom_headers=None, raw=False, **operation_config): + self, gateway_resource_name, gateway_resource_description, custom_headers=None, raw=False, **operation_config + ): """Creates or updates a Gateway resource. Creates a Gateway resource with the specified name, description and @@ -64,25 +65,27 @@ def create_or_update( :class:`FabricErrorException` """ # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) + "gatewayResourceName": self._serialize.url( + "gateway_resource_name", gateway_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') + body_content = self._serialize.body(gateway_resource_description, "GatewayResourceDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -93,19 +96,19 @@ def create_or_update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) + deserialized = self._deserialize("GatewayResourceDescription", response) if response.status_code == 201: - deserialized = self._deserialize('GatewayResourceDescription', response) + deserialized = self._deserialize("GatewayResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - def get( - self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): + create_or_update.metadata = {"url": "/Resources/Gateways/{gatewayResourceName}"} + + def get(self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the Gateway resource with the given name. Gets the information about the Gateway resource with the given name. @@ -126,19 +129,21 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) + "gatewayResourceName": self._serialize.url( + "gateway_resource_name", gateway_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -151,17 +156,17 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) + deserialized = self._deserialize("GatewayResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - def delete( - self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): + get.metadata = {"url": "/Resources/Gateways/{gatewayResourceName}"} + + def delete(self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): """Deletes the Gateway resource. Deletes the Gateway resource identified by the name. @@ -179,15 +184,17 @@ def delete( :class:`FabricErrorException` """ # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) + "gatewayResourceName": self._serialize.url( + "gateway_resource_name", gateway_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} @@ -204,10 +211,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - def list( - self, custom_headers=None, raw=False, **operation_config): + delete.metadata = {"url": "/Resources/Gateways/{gatewayResourceName}"} + + def list(self, custom_headers=None, raw=False, **operation_config): """Lists all the gateway resources. Gets the information about all gateway resources in a given resource @@ -228,15 +235,15 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -249,11 +256,12 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedGatewayResourceDescriptionList', response) + deserialized = self._deserialize("PagedGatewayResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Gateways'} + + list.metadata = {"url": "/Resources/Gateways"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_network_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_network_operations.py index d0eaba348d13..064f3bb9ad01 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_network_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_network_operations.py @@ -38,7 +38,8 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def create_or_update( - self, network_resource_name, name, properties, custom_headers=None, raw=False, **operation_config): + self, network_resource_name, name, properties, custom_headers=None, raw=False, **operation_config + ): """Creates or updates a Network resource. Creates a Network resource with the specified name, description and @@ -67,25 +68,27 @@ def create_or_update( network_resource_description = models.NetworkResourceDescription(name=name, properties=properties) # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) + "networkResourceName": self._serialize.url( + "network_resource_name", network_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription') + body_content = self._serialize.body(network_resource_description, "NetworkResourceDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -96,19 +99,19 @@ def create_or_update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) + deserialized = self._deserialize("NetworkResourceDescription", response) if response.status_code == 201: - deserialized = self._deserialize('NetworkResourceDescription', response) + deserialized = self._deserialize("NetworkResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - def get( - self, network_resource_name, custom_headers=None, raw=False, **operation_config): + create_or_update.metadata = {"url": "/Resources/Networks/{networkResourceName}"} + + def get(self, network_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the Network resource with the given name. Gets the information about the Network resource with the given name. @@ -129,19 +132,21 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) + "networkResourceName": self._serialize.url( + "network_resource_name", network_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -154,17 +159,17 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) + deserialized = self._deserialize("NetworkResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - def delete( - self, network_resource_name, custom_headers=None, raw=False, **operation_config): + get.metadata = {"url": "/Resources/Networks/{networkResourceName}"} + + def delete(self, network_resource_name, custom_headers=None, raw=False, **operation_config): """Deletes the Network resource. Deletes the Network resource identified by the name. @@ -182,15 +187,17 @@ def delete( :class:`FabricErrorException` """ # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) + "networkResourceName": self._serialize.url( + "network_resource_name", network_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} @@ -207,10 +214,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - def list( - self, custom_headers=None, raw=False, **operation_config): + delete.metadata = {"url": "/Resources/Networks/{networkResourceName}"} + + def list(self, custom_headers=None, raw=False, **operation_config): """Lists all the network resources. Gets the information about all network resources in a given resource @@ -231,15 +238,15 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -252,11 +259,12 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedNetworkResourceDescriptionList', response) + deserialized = self._deserialize("PagedNetworkResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Networks'} + + list.metadata = {"url": "/Resources/Networks"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_operations.py index 0c980f03c04e..750bb30a9439 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_operations.py @@ -38,7 +38,8 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def create_or_update( - self, secret_resource_name, properties, name, custom_headers=None, raw=False, **operation_config): + self, secret_resource_name, properties, name, custom_headers=None, raw=False, **operation_config + ): """Creates or updates a Secret resource. Creates a Secret resource with the specified name, description and @@ -66,25 +67,27 @@ def create_or_update( secret_resource_description = models.SecretResourceDescription(properties=properties, name=name) # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(secret_resource_description, 'SecretResourceDescription') + body_content = self._serialize.body(secret_resource_description, "SecretResourceDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -95,19 +98,19 @@ def create_or_update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) + deserialized = self._deserialize("SecretResourceDescription", response) if response.status_code == 201: - deserialized = self._deserialize('SecretResourceDescription', response) + deserialized = self._deserialize("SecretResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - def get( - self, secret_resource_name, custom_headers=None, raw=False, **operation_config): + create_or_update.metadata = {"url": "/Resources/Secrets/{secretResourceName}"} + + def get(self, secret_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the Secret resource with the given name. Gets the information about the Secret resource with the given name. The @@ -127,19 +130,21 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -152,17 +157,17 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) + deserialized = self._deserialize("SecretResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - def delete( - self, secret_resource_name, custom_headers=None, raw=False, **operation_config): + get.metadata = {"url": "/Resources/Secrets/{secretResourceName}"} + + def delete(self, secret_resource_name, custom_headers=None, raw=False, **operation_config): """Deletes the Secret resource. Deletes the specified Secret resource and all of its named values. @@ -180,15 +185,17 @@ def delete( :class:`FabricErrorException` """ # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} @@ -205,10 +212,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - def list( - self, custom_headers=None, raw=False, **operation_config): + delete.metadata = {"url": "/Resources/Secrets/{secretResourceName}"} + + def list(self, custom_headers=None, raw=False, **operation_config): """Lists all the secret resources. Gets the information about all secret resources in a given resource @@ -228,15 +235,15 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -249,11 +256,12 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedSecretResourceDescriptionList', response) + deserialized = self._deserialize("PagedSecretResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Secrets'} + + list.metadata = {"url": "/Resources/Secrets"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_value_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_value_operations.py index a9202b1f9140..163af95608fe 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_value_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_secret_value_operations.py @@ -38,7 +38,15 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def add_value( - self, secret_resource_name, secret_value_resource_name, name, value=None, custom_headers=None, raw=False, **operation_config): + self, + secret_resource_name, + secret_value_resource_name, + name, + value=None, + custom_headers=None, + raw=False, + **operation_config + ): """Adds the specified value as a new version of the specified secret resource. @@ -70,26 +78,30 @@ def add_value( secret_value_resource_description = models.SecretValueResourceDescription(name=name, value=value) # Construct URL - url = self.add_value.metadata['url'] + url = self.add_value.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ), + "secretValueResourceName": self._serialize.url( + "secret_value_resource_name", secret_value_resource_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(secret_value_resource_description, 'SecretValueResourceDescription') + body_content = self._serialize.body(secret_value_resource_description, "SecretValueResourceDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -100,19 +112,19 @@ def add_value( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) + deserialized = self._deserialize("SecretValueResourceDescription", response) if response.status_code == 201: - deserialized = self._deserialize('SecretValueResourceDescription', response) + deserialized = self._deserialize("SecretValueResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - add_value.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - def get( - self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): + add_value.metadata = {"url": "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} + + def get(self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the specified secret value resource. Get the information about the specified named secret value resources. @@ -136,20 +148,24 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ), + "secretValueResourceName": self._serialize.url( + "secret_value_resource_name", secret_value_resource_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -162,17 +178,19 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) + deserialized = self._deserialize("SecretValueResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} + + get.metadata = {"url": "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} def delete( - self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): + self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config + ): """Deletes the specified value of the named secret resource. Deletes the secret value resource identified by the name. The name of @@ -195,16 +213,20 @@ def delete( :class:`FabricErrorException` """ # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ), + "secretValueResourceName": self._serialize.url( + "secret_value_resource_name", secret_value_resource_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} @@ -221,10 +243,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - def list( - self, secret_resource_name, custom_headers=None, raw=False, **operation_config): + delete.metadata = {"url": "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} + + def list(self, secret_resource_name, custom_headers=None, raw=False, **operation_config): """List names of all values of the specified secret resource. Gets information about all secret value resources of the specified @@ -247,19 +269,21 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -272,17 +296,19 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', response) + deserialized = self._deserialize("PagedSecretValueResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values'} + + list.metadata = {"url": "/Resources/Secrets/{secretResourceName}/values"} def show( - self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): + self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config + ): """Lists the specified value of the secret resource. Lists the decrypted value of the specified named value of the secret @@ -305,20 +331,24 @@ def show( :class:`FabricErrorException` """ # Construct URL - url = self.show.metadata['url'] + url = self.show.metadata["url"] path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + "secretResourceName": self._serialize.url( + "secret_resource_name", secret_resource_name, "str", skip_quote=True + ), + "secretValueResourceName": self._serialize.url( + "secret_value_resource_name", secret_value_resource_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -331,11 +361,12 @@ def show( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SecretValue', response) + deserialized = self._deserialize("SecretValue", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - show.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'} + + show.metadata = {"url": "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_operations.py index 3f227dc25bf6..1c737f4cd7be 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_operations.py @@ -37,8 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config self.api_version = "6.4-preview" - def get( - self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): + def get(self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the Service resource with the given name. Gets the information about the Service resource with the given name. @@ -61,20 +60,24 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ), + "serviceResourceName": self._serialize.url( + "service_resource_name", service_resource_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -87,17 +90,17 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceResourceDescription', response) + deserialized = self._deserialize("ServiceResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'} - def list( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): + get.metadata = {"url": "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}"} + + def list(self, application_resource_name, custom_headers=None, raw=False, **operation_config): """Lists all the service resources. Gets the information about all services of an application resource. The @@ -120,19 +123,21 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -145,11 +150,12 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedServiceResourceDescriptionList', response) + deserialized = self._deserialize("PagedServiceResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services'} + + list.metadata = {"url": "/Resources/Applications/{applicationResourceName}/Services"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_replica_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_replica_operations.py index 29e0a80e299f..21cf826c5124 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_replica_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_service_replica_operations.py @@ -38,7 +38,14 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def get( - self, application_resource_name, service_resource_name, replica_name, custom_headers=None, raw=False, **operation_config): + self, + application_resource_name, + service_resource_name, + replica_name, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the given replica of the service of an application. Gets the information about the service replica with the given name. The @@ -63,21 +70,25 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ), + "serviceResourceName": self._serialize.url( + "service_resource_name", service_resource_name, "str", skip_quote=True + ), + "replicaName": self._serialize.url("replica_name", replica_name, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -90,17 +101,21 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceReplicaDescription', response) + deserialized = self._deserialize("ServiceReplicaDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'} + + get.metadata = { + "url": "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}" + } def list( - self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): + self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config + ): """Lists all the replicas of a service. Gets the information about all replicas of a service. The information @@ -123,20 +138,24 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) + "applicationResourceName": self._serialize.url( + "application_resource_name", application_resource_name, "str", skip_quote=True + ), + "serviceResourceName": self._serialize.url( + "service_resource_name", service_resource_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -149,11 +168,12 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedServiceReplicaDescriptionList', response) + deserialized = self._deserialize("PagedServiceReplicaDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas'} + + list.metadata = {"url": "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_volume_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_volume_operations.py index 7288b5ab1de8..b65769fd05ae 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_volume_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_mesh_volume_operations.py @@ -38,7 +38,8 @@ def __init__(self, client, config, serializer, deserializer): self.api_version = "6.4-preview" def create_or_update( - self, volume_resource_name, volume_resource_description, custom_headers=None, raw=False, **operation_config): + self, volume_resource_name, volume_resource_description, custom_headers=None, raw=False, **operation_config + ): """Creates or updates a Volume resource. Creates a Volume resource with the specified name, description and @@ -63,25 +64,27 @@ def create_or_update( :class:`FabricErrorException` """ # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create_or_update.metadata["url"] path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) + "volumeResourceName": self._serialize.url( + "volume_resource_name", volume_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') + body_content = self._serialize.body(volume_resource_description, "VolumeResourceDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -92,19 +95,19 @@ def create_or_update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) + deserialized = self._deserialize("VolumeResourceDescription", response) if response.status_code == 201: - deserialized = self._deserialize('VolumeResourceDescription', response) + deserialized = self._deserialize("VolumeResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - def get( - self, volume_resource_name, custom_headers=None, raw=False, **operation_config): + create_or_update.metadata = {"url": "/Resources/Volumes/{volumeResourceName}"} + + def get(self, volume_resource_name, custom_headers=None, raw=False, **operation_config): """Gets the Volume resource with the given name. Gets the information about the Volume resource with the given name. The @@ -124,19 +127,21 @@ def get( :class:`FabricErrorException` """ # Construct URL - url = self.get.metadata['url'] + url = self.get.metadata["url"] path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) + "volumeResourceName": self._serialize.url( + "volume_resource_name", volume_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -149,17 +154,17 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) + deserialized = self._deserialize("VolumeResourceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - def delete( - self, volume_resource_name, custom_headers=None, raw=False, **operation_config): + get.metadata = {"url": "/Resources/Volumes/{volumeResourceName}"} + + def delete(self, volume_resource_name, custom_headers=None, raw=False, **operation_config): """Deletes the Volume resource. Deletes the Volume resource identified by the name. @@ -177,15 +182,17 @@ def delete( :class:`FabricErrorException` """ # Construct URL - url = self.delete.metadata['url'] + url = self.delete.metadata["url"] path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) + "volumeResourceName": self._serialize.url( + "volume_resource_name", volume_resource_name, "str", skip_quote=True + ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} @@ -202,10 +209,10 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - def list( - self, custom_headers=None, raw=False, **operation_config): + delete.metadata = {"url": "/Resources/Volumes/{volumeResourceName}"} + + def list(self, custom_headers=None, raw=False, **operation_config): """Lists all the volume resources. Gets the information about all volume resources in a given resource @@ -225,15 +232,15 @@ def list( :class:`FabricErrorException` """ # Construct URL - url = self.list.metadata['url'] + url = self.list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters["api-version"] = self._serialize.query("self.api_version", self.api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -246,11 +253,12 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedVolumeResourceDescriptionList', response) + deserialized = self._deserialize("PagedVolumeResourceDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list.metadata = {'url': '/Resources/Volumes'} + + list.metadata = {"url": "/Resources/Volumes"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py index dcf52e758d5c..88fdfa5cab69 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py @@ -15,8 +15,7 @@ class ServiceFabricClientAPIsOperationsMixin(object): - def get_cluster_manifest( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + def get_cluster_manifest(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the Service Fabric cluster manifest. Get the Service Fabric cluster manifest. The cluster manifest contains @@ -51,17 +50,19 @@ def get_cluster_manifest( api_version = "6.0" # Construct URL - url = self.get_cluster_manifest.metadata['url'] + url = self.get_cluster_manifest.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -74,17 +75,28 @@ def get_cluster_manifest( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterManifest', response) + deserialized = self._deserialize("ClusterManifest", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_manifest.metadata = {'url': '/$/GetClusterManifest'} + + get_cluster_manifest.metadata = {"url": "/$/GetClusterManifest"} def get_cluster_health( - self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + nodes_health_state_filter=0, + applications_health_state_filter=0, + events_health_state_filter=0, + exclude_health_statistics=False, + include_system_application_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric cluster. Use EventsHealthStateFilter to filter the collection of health events @@ -205,27 +217,39 @@ def get_cluster_health( api_version = "6.0" # Construct URL - url = self.get_cluster_health.metadata['url'] + url = self.get_cluster_health.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if nodes_health_state_filter is not None: - query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + query_parameters["NodesHealthStateFilter"] = self._serialize.query( + "nodes_health_state_filter", nodes_health_state_filter, "int" + ) if applications_health_state_filter is not None: - query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') + query_parameters["ApplicationsHealthStateFilter"] = self._serialize.query( + "applications_health_state_filter", applications_health_state_filter, "int" + ) if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if include_system_application_health_statistics is not None: - query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + query_parameters["IncludeSystemApplicationHealthStatistics"] = self._serialize.query( + "include_system_application_health_statistics", include_system_application_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -238,17 +262,30 @@ def get_cluster_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterHealth', response) + deserialized = self._deserialize("ClusterHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_health.metadata = {'url': '/$/GetClusterHealth'} + + get_cluster_health.metadata = {"url": "/$/GetClusterHealth"} def get_cluster_health_using_policy( - self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, application_health_policy_map=None, cluster_health_policy=None, custom_headers=None, raw=False, **operation_config): + self, + nodes_health_state_filter=0, + applications_health_state_filter=0, + events_health_state_filter=0, + exclude_health_statistics=False, + include_system_application_health_statistics=False, + timeout=60, + application_health_policy_map=None, + cluster_health_policy=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric cluster using the specified policy. Use EventsHealthStateFilter to filter the collection of health events @@ -385,39 +422,53 @@ def get_cluster_health_using_policy( """ cluster_health_policies = None if application_health_policy_map is not None or cluster_health_policy is not None: - cluster_health_policies = models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) + cluster_health_policies = models.ClusterHealthPolicies( + application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy + ) api_version = "6.0" # Construct URL - url = self.get_cluster_health_using_policy.metadata['url'] + url = self.get_cluster_health_using_policy.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if nodes_health_state_filter is not None: - query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + query_parameters["NodesHealthStateFilter"] = self._serialize.query( + "nodes_health_state_filter", nodes_health_state_filter, "int" + ) if applications_health_state_filter is not None: - query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') + query_parameters["ApplicationsHealthStateFilter"] = self._serialize.query( + "applications_health_state_filter", applications_health_state_filter, "int" + ) if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if include_system_application_health_statistics is not None: - query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + query_parameters["IncludeSystemApplicationHealthStatistics"] = self._serialize.query( + "include_system_application_health_statistics", include_system_application_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if cluster_health_policies is not None: - body_content = self._serialize.body(cluster_health_policies, 'ClusterHealthPolicies') + body_content = self._serialize.body(cluster_health_policies, "ClusterHealthPolicies") else: body_content = None @@ -430,17 +481,17 @@ def get_cluster_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterHealth', response) + deserialized = self._deserialize("ClusterHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_health_using_policy.metadata = {'url': '/$/GetClusterHealth'} - def get_cluster_health_chunk( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_cluster_health_using_policy.metadata = {"url": "/$/GetClusterHealth"} + + def get_cluster_health_chunk(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the health of a Service Fabric cluster using health chunks. Gets the health of a Service Fabric cluster using health chunks. @@ -469,17 +520,19 @@ def get_cluster_health_chunk( api_version = "6.0" # Construct URL - url = self.get_cluster_health_chunk.metadata['url'] + url = self.get_cluster_health_chunk.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -492,17 +545,24 @@ def get_cluster_health_chunk( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterHealthChunk', response) + deserialized = self._deserialize("ClusterHealthChunk", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_health_chunk.metadata = {'url': '/$/GetClusterHealthChunk'} + + get_cluster_health_chunk.metadata = {"url": "/$/GetClusterHealthChunk"} def get_cluster_health_chunk_using_policy_and_advanced_filters( - self, cluster_health_chunk_query_description=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + cluster_health_chunk_query_description=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric cluster using health chunks. Gets the health of a Service Fabric cluster using health chunks. The @@ -561,24 +621,28 @@ def get_cluster_health_chunk_using_policy_and_advanced_filters( api_version = "6.0" # Construct URL - url = self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'] + url = self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if cluster_health_chunk_query_description is not None: - body_content = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') + body_content = self._serialize.body( + cluster_health_chunk_query_description, "ClusterHealthChunkQueryDescription" + ) else: body_content = None @@ -591,17 +655,19 @@ def get_cluster_health_chunk_using_policy_and_advanced_filters( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterHealthChunk', response) + deserialized = self._deserialize("ClusterHealthChunk", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': '/$/GetClusterHealthChunk'} + + get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {"url": "/$/GetClusterHealthChunk"} def report_cluster_health( - self, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Sends a health report on the Service Fabric cluster. Sends a health report on a Service Fabric cluster. The report must @@ -660,24 +726,26 @@ def report_cluster_health( api_version = "6.0" # Construct URL - url = self.report_cluster_health.metadata['url'] + url = self.report_cluster_health.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -689,10 +757,12 @@ def report_cluster_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_cluster_health.metadata = {'url': '/$/ReportClusterHealth'} + + report_cluster_health.metadata = {"url": "/$/ReportClusterHealth"} def get_provisioned_fabric_code_version_info_list( - self, code_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, code_version=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. @@ -721,19 +791,21 @@ def get_provisioned_fabric_code_version_info_list( api_version = "6.0" # Construct URL - url = self.get_provisioned_fabric_code_version_info_list.metadata['url'] + url = self.get_provisioned_fabric_code_version_info_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if code_version is not None: - query_parameters['CodeVersion'] = self._serialize.query("code_version", code_version, 'str') + query_parameters["CodeVersion"] = self._serialize.query("code_version", code_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -746,17 +818,19 @@ def get_provisioned_fabric_code_version_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[FabricCodeVersionInfo]', response) + deserialized = self._deserialize("[FabricCodeVersionInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_provisioned_fabric_code_version_info_list.metadata = {'url': '/$/GetProvisionedCodeVersions'} + + get_provisioned_fabric_code_version_info_list.metadata = {"url": "/$/GetProvisionedCodeVersions"} def get_provisioned_fabric_config_version_info_list( - self, config_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, config_version=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. @@ -785,19 +859,21 @@ def get_provisioned_fabric_config_version_info_list( api_version = "6.0" # Construct URL - url = self.get_provisioned_fabric_config_version_info_list.metadata['url'] + url = self.get_provisioned_fabric_config_version_info_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if config_version is not None: - query_parameters['ConfigVersion'] = self._serialize.query("config_version", config_version, 'str') + query_parameters["ConfigVersion"] = self._serialize.query("config_version", config_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -810,17 +886,17 @@ def get_provisioned_fabric_config_version_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[FabricConfigVersionInfo]', response) + deserialized = self._deserialize("[FabricConfigVersionInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_provisioned_fabric_config_version_info_list.metadata = {'url': '/$/GetProvisionedConfigVersions'} - def get_cluster_upgrade_progress( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_provisioned_fabric_config_version_info_list.metadata = {"url": "/$/GetProvisionedConfigVersions"} + + def get_cluster_upgrade_progress(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the progress of the current cluster upgrade. Gets the current progress of the ongoing cluster upgrade. If no upgrade @@ -846,17 +922,19 @@ def get_cluster_upgrade_progress( api_version = "6.0" # Construct URL - url = self.get_cluster_upgrade_progress.metadata['url'] + url = self.get_cluster_upgrade_progress.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -869,17 +947,19 @@ def get_cluster_upgrade_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterUpgradeProgressObject', response) + deserialized = self._deserialize("ClusterUpgradeProgressObject", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_upgrade_progress.metadata = {'url': '/$/GetUpgradeProgress'} + + get_cluster_upgrade_progress.metadata = {"url": "/$/GetUpgradeProgress"} def get_cluster_configuration( - self, configuration_api_version, timeout=60, custom_headers=None, raw=False, **operation_config): + self, configuration_api_version, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Get the Service Fabric standalone cluster configuration. The cluster configuration contains properties of the cluster that @@ -908,18 +988,22 @@ def get_cluster_configuration( api_version = "6.0" # Construct URL - url = self.get_cluster_configuration.metadata['url'] + url = self.get_cluster_configuration.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ConfigurationApiVersion'] = self._serialize.query("configuration_api_version", configuration_api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ConfigurationApiVersion"] = self._serialize.query( + "configuration_api_version", configuration_api_version, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -932,17 +1016,17 @@ def get_cluster_configuration( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterConfiguration', response) + deserialized = self._deserialize("ClusterConfiguration", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_configuration.metadata = {'url': '/$/GetClusterConfiguration'} - def get_cluster_configuration_upgrade_status( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_cluster_configuration.metadata = {"url": "/$/GetClusterConfiguration"} + + def get_cluster_configuration_upgrade_status(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. @@ -970,17 +1054,19 @@ def get_cluster_configuration_upgrade_status( api_version = "6.0" # Construct URL - url = self.get_cluster_configuration_upgrade_status.metadata['url'] + url = self.get_cluster_configuration_upgrade_status.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -993,17 +1079,17 @@ def get_cluster_configuration_upgrade_status( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', response) + deserialized = self._deserialize("ClusterConfigurationUpgradeStatusInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_configuration_upgrade_status.metadata = {'url': '/$/GetClusterConfigurationUpgradeStatus'} - def get_upgrade_orchestration_service_state( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_cluster_configuration_upgrade_status.metadata = {"url": "/$/GetClusterConfigurationUpgradeStatus"} + + def get_upgrade_orchestration_service_state(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the service state of Service Fabric Upgrade Orchestration Service. Get the service state of Service Fabric Upgrade Orchestration Service. @@ -1029,17 +1115,19 @@ def get_upgrade_orchestration_service_state( api_version = "6.0" # Construct URL - url = self.get_upgrade_orchestration_service_state.metadata['url'] + url = self.get_upgrade_orchestration_service_state.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -1052,17 +1140,19 @@ def get_upgrade_orchestration_service_state( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UpgradeOrchestrationServiceState', response) + deserialized = self._deserialize("UpgradeOrchestrationServiceState", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_upgrade_orchestration_service_state.metadata = {'url': '/$/GetUpgradeOrchestrationServiceState'} + + get_upgrade_orchestration_service_state.metadata = {"url": "/$/GetUpgradeOrchestrationServiceState"} def set_upgrade_orchestration_service_state( - self, timeout=60, service_state=None, custom_headers=None, raw=False, **operation_config): + self, timeout=60, service_state=None, custom_headers=None, raw=False, **operation_config + ): """Update the service state of Service Fabric Upgrade Orchestration Service. @@ -1095,23 +1185,25 @@ def set_upgrade_orchestration_service_state( api_version = "6.0" # Construct URL - url = self.set_upgrade_orchestration_service_state.metadata['url'] + url = self.set_upgrade_orchestration_service_state.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') + body_content = self._serialize.body(upgrade_orchestration_service_state, "UpgradeOrchestrationServiceState") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1122,17 +1214,25 @@ def set_upgrade_orchestration_service_state( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', response) + deserialized = self._deserialize("UpgradeOrchestrationServiceStateSummary", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - set_upgrade_orchestration_service_state.metadata = {'url': '/$/SetUpgradeOrchestrationServiceState'} + + set_upgrade_orchestration_service_state.metadata = {"url": "/$/SetUpgradeOrchestrationServiceState"} def provision_cluster( - self, timeout=60, code_file_path=None, cluster_manifest_file_path=None, custom_headers=None, raw=False, **operation_config): + self, + timeout=60, + code_file_path=None, + cluster_manifest_file_path=None, + custom_headers=None, + raw=False, + **operation_config + ): """Provision the code or configuration packages of a Service Fabric cluster. @@ -1158,27 +1258,31 @@ def provision_cluster( :raises: :class:`FabricErrorException` """ - provision_fabric_description = models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) + provision_fabric_description = models.ProvisionFabricDescription( + code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path + ) api_version = "6.0" # Construct URL - url = self.provision_cluster.metadata['url'] + url = self.provision_cluster.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(provision_fabric_description, 'ProvisionFabricDescription') + body_content = self._serialize.body(provision_fabric_description, "ProvisionFabricDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1190,10 +1294,12 @@ def provision_cluster( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - provision_cluster.metadata = {'url': '/$/Provision'} + + provision_cluster.metadata = {"url": "/$/Provision"} def unprovision_cluster( - self, timeout=60, code_version=None, config_version=None, custom_headers=None, raw=False, **operation_config): + self, timeout=60, code_version=None, config_version=None, custom_headers=None, raw=False, **operation_config + ): """Unprovision the code or configuration packages of a Service Fabric cluster. @@ -1218,27 +1324,31 @@ def unprovision_cluster( :raises: :class:`FabricErrorException` """ - unprovision_fabric_description = models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) + unprovision_fabric_description = models.UnprovisionFabricDescription( + code_version=code_version, config_version=config_version + ) api_version = "6.0" # Construct URL - url = self.unprovision_cluster.metadata['url'] + url = self.unprovision_cluster.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(unprovision_fabric_description, 'UnprovisionFabricDescription') + body_content = self._serialize.body(unprovision_fabric_description, "UnprovisionFabricDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1250,10 +1360,10 @@ def unprovision_cluster( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - unprovision_cluster.metadata = {'url': '/$/Unprovision'} - def rollback_cluster_upgrade( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + unprovision_cluster.metadata = {"url": "/$/Unprovision"} + + def rollback_cluster_upgrade(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Roll back the upgrade of a Service Fabric cluster. Roll back the code or configuration upgrade of a Service Fabric @@ -1277,13 +1387,15 @@ def rollback_cluster_upgrade( api_version = "6.0" # Construct URL - url = self.rollback_cluster_upgrade.metadata['url'] + url = self.rollback_cluster_upgrade.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -1300,10 +1412,10 @@ def rollback_cluster_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - rollback_cluster_upgrade.metadata = {'url': '/$/RollbackUpgrade'} - def resume_cluster_upgrade( - self, upgrade_domain, timeout=60, custom_headers=None, raw=False, **operation_config): + rollback_cluster_upgrade.metadata = {"url": "/$/RollbackUpgrade"} + + def resume_cluster_upgrade(self, upgrade_domain, timeout=60, custom_headers=None, raw=False, **operation_config): """Make the cluster upgrade move on to the next upgrade domain. Make the cluster code or configuration upgrade move on to the next @@ -1332,22 +1444,24 @@ def resume_cluster_upgrade( api_version = "6.0" # Construct URL - url = self.resume_cluster_upgrade.metadata['url'] + url = self.resume_cluster_upgrade.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') + body_content = self._serialize.body(resume_cluster_upgrade_description, "ResumeClusterUpgradeDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1359,10 +1473,12 @@ def resume_cluster_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - resume_cluster_upgrade.metadata = {'url': '/$/MoveToNextUpgradeDomain'} + + resume_cluster_upgrade.metadata = {"url": "/$/MoveToNextUpgradeDomain"} def start_cluster_upgrade( - self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Start upgrading the code or configuration version of a Service Fabric cluster. @@ -1392,22 +1508,24 @@ def start_cluster_upgrade( api_version = "6.0" # Construct URL - url = self.start_cluster_upgrade.metadata['url'] + url = self.start_cluster_upgrade.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + body_content = self._serialize.body(start_cluster_upgrade_description, "StartClusterUpgradeDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1419,10 +1537,12 @@ def start_cluster_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_cluster_upgrade.metadata = {'url': '/$/Upgrade'} + + start_cluster_upgrade.metadata = {"url": "/$/Upgrade"} def start_cluster_configuration_upgrade( - self, cluster_configuration_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, cluster_configuration_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Start upgrading the configuration of a Service Fabric standalone cluster. @@ -1451,22 +1571,26 @@ def start_cluster_configuration_upgrade( api_version = "6.0" # Construct URL - url = self.start_cluster_configuration_upgrade.metadata['url'] + url = self.start_cluster_configuration_upgrade.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') + body_content = self._serialize.body( + cluster_configuration_upgrade_description, "ClusterConfigurationUpgradeDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1478,10 +1602,12 @@ def start_cluster_configuration_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_cluster_configuration_upgrade.metadata = {'url': '/$/StartClusterConfigurationUpgrade'} + + start_cluster_configuration_upgrade.metadata = {"url": "/$/StartClusterConfigurationUpgrade"} def update_cluster_upgrade( - self, update_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, update_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Update the upgrade parameters of a Service Fabric cluster upgrade. Update the upgrade parameters used during a Service Fabric cluster @@ -1509,22 +1635,24 @@ def update_cluster_upgrade( api_version = "6.0" # Construct URL - url = self.update_cluster_upgrade.metadata['url'] + url = self.update_cluster_upgrade.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') + body_content = self._serialize.body(update_cluster_upgrade_description, "UpdateClusterUpgradeDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1536,10 +1664,10 @@ def update_cluster_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_cluster_upgrade.metadata = {'url': '/$/UpdateUpgrade'} - def get_aad_metadata( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + update_cluster_upgrade.metadata = {"url": "/$/UpdateUpgrade"} + + def get_aad_metadata(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the Azure Active Directory metadata used for secured connection to cluster. @@ -1568,17 +1696,19 @@ def get_aad_metadata( api_version = "6.0" # Construct URL - url = self.get_aad_metadata.metadata['url'] + url = self.get_aad_metadata.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -1591,17 +1721,17 @@ def get_aad_metadata( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AadMetadataObject', response) + deserialized = self._deserialize("AadMetadataObject", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_aad_metadata.metadata = {'url': '/$/GetAadMetadata'} - def get_cluster_version( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_aad_metadata.metadata = {"url": "/$/GetAadMetadata"} + + def get_cluster_version(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the current Service Fabric cluster version. If a cluster upgrade is happening, then this API will return the lowest @@ -1626,17 +1756,19 @@ def get_cluster_version( api_version = "6.4" # Construct URL - url = self.get_cluster_version.metadata['url'] + url = self.get_cluster_version.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -1649,17 +1781,17 @@ def get_cluster_version( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterVersion', response) + deserialized = self._deserialize("ClusterVersion", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_version.metadata = {'url': '/$/GetClusterVersion'} - def get_cluster_load( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_cluster_version.metadata = {"url": "/$/GetClusterVersion"} + + def get_cluster_load(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the load of a Service Fabric cluster. Retrieves the load information of a Service Fabric cluster for all the @@ -1684,17 +1816,19 @@ def get_cluster_load( api_version = "6.0" # Construct URL - url = self.get_cluster_load.metadata['url'] + url = self.get_cluster_load.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -1707,17 +1841,19 @@ def get_cluster_load( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ClusterLoadInfo', response) + deserialized = self._deserialize("ClusterLoadInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_load.metadata = {'url': '/$/GetLoadInformation'} + + get_cluster_load.metadata = {"url": "/$/GetLoadInformation"} def toggle_verbose_service_placement_health_reporting( - self, enabled, timeout=60, custom_headers=None, raw=False, **operation_config): + self, enabled, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Changes the verbosity of service placement health reporting. If verbosity is set to true, then detailed health reports will be @@ -1745,14 +1881,16 @@ def toggle_verbose_service_placement_health_reporting( api_version = "6.4" # Construct URL - url = self.toggle_verbose_service_placement_health_reporting.metadata['url'] + url = self.toggle_verbose_service_placement_health_reporting.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Enabled'] = self._serialize.query("enabled", enabled, 'bool') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["Enabled"] = self._serialize.query("enabled", enabled, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -1769,10 +1907,14 @@ def toggle_verbose_service_placement_health_reporting( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - toggle_verbose_service_placement_health_reporting.metadata = {'url': '/$/ToggleVerboseServicePlacementHealthReporting'} + + toggle_verbose_service_placement_health_reporting.metadata = { + "url": "/$/ToggleVerboseServicePlacementHealthReporting" + } def validate_cluster_upgrade( - self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Validate and assess the impact of a code or configuration version update of a Service Fabric cluster. @@ -1803,23 +1945,25 @@ def validate_cluster_upgrade( api_version = "8.2" # Construct URL - url = self.validate_cluster_upgrade.metadata['url'] + url = self.validate_cluster_upgrade.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + body_content = self._serialize.body(start_cluster_upgrade_description, "StartClusterUpgradeDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -1830,17 +1974,26 @@ def validate_cluster_upgrade( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ValidateClusterUpgradeResult', response) + deserialized = self._deserialize("ValidateClusterUpgradeResult", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - validate_cluster_upgrade.metadata = {'url': '/$/ValidateUpgrade'} + + validate_cluster_upgrade.metadata = {"url": "/$/ValidateUpgrade"} def get_node_info_list( - self, continuation_token=None, node_status_filter="default", max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + continuation_token=None, + node_status_filter="default", + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, ID, health, uptime, and other @@ -1888,23 +2041,29 @@ def get_node_info_list( api_version = "6.3" # Construct URL - url = self.get_node_info_list.metadata['url'] + url = self.get_node_info_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if node_status_filter is not None: - query_parameters['NodeStatusFilter'] = self._serialize.query("node_status_filter", node_status_filter, 'str') + query_parameters["NodeStatusFilter"] = self._serialize.query( + "node_status_filter", node_status_filter, "str" + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -1917,17 +2076,17 @@ def get_node_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedNodeInfoList', response) + deserialized = self._deserialize("PagedNodeInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_info_list.metadata = {'url': '/Nodes'} - def get_node_info( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + get_node_info_list.metadata = {"url": "/Nodes"} + + def get_node_info(self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the information about a specific node in the Service Fabric cluster. @@ -1955,21 +2114,21 @@ def get_node_info( api_version = "6.0" # Construct URL - url = self.get_node_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_node_info.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -1982,17 +2141,19 @@ def get_node_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NodeInfo', response) + deserialized = self._deserialize("NodeInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_info.metadata = {'url': '/Nodes/{nodeName}'} + + get_node_info.metadata = {"url": "/Nodes/{nodeName}"} def get_node_health( - self, node_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, node_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the health of a Service Fabric node. Gets the health of a Service Fabric node. Use EventsHealthStateFilter @@ -2045,23 +2206,25 @@ def get_node_health( api_version = "6.0" # Construct URL - url = self.get_node_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_node_health.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -2074,17 +2237,26 @@ def get_node_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NodeHealth', response) + deserialized = self._deserialize("NodeHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_health.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} + + get_node_health.metadata = {"url": "/Nodes/{nodeName}/$/GetHealth"} def get_node_health_using_policy( - self, node_name, events_health_state_filter=0, cluster_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + events_health_state_filter=0, + cluster_health_policy=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric node, by using the specified health policy. @@ -2146,30 +2318,32 @@ def get_node_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_node_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_node_health_using_policy.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if cluster_health_policy is not None: - body_content = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') + body_content = self._serialize.body(cluster_health_policy, "ClusterHealthPolicy") else: body_content = None @@ -2182,17 +2356,26 @@ def get_node_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NodeHealth', response) + deserialized = self._deserialize("NodeHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} + + get_node_health_using_policy.metadata = {"url": "/Nodes/{nodeName}/$/GetHealth"} def report_node_health( - self, node_name, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + health_information, + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric node. Reports health state of the specified Service Fabric node. The report @@ -2253,28 +2436,28 @@ def report_node_health( api_version = "6.0" # Construct URL - url = self.report_node_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.report_node_health.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -2286,10 +2469,10 @@ def report_node_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_node_health.metadata = {'url': '/Nodes/{nodeName}/$/ReportHealth'} - def get_node_load_info( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + report_node_health.metadata = {"url": "/Nodes/{nodeName}/$/ReportHealth"} + + def get_node_load_info(self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the load information of a Service Fabric node. Retrieves the load information of a Service Fabric node for all the @@ -2316,21 +2499,21 @@ def get_node_load_info( api_version = "6.0" # Construct URL - url = self.get_node_load_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_node_load_info.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -2343,17 +2526,19 @@ def get_node_load_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NodeLoadInfo', response) + deserialized = self._deserialize("NodeLoadInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_load_info.metadata = {'url': '/Nodes/{nodeName}/$/GetLoadInformation'} + + get_node_load_info.metadata = {"url": "/Nodes/{nodeName}/$/GetLoadInformation"} def disable_node( - self, node_name, timeout=60, deactivation_intent=None, custom_headers=None, raw=False, **operation_config): + self, node_name, timeout=60, deactivation_intent=None, custom_headers=None, raw=False, **operation_config + ): """Deactivate a Service Fabric cluster node with the specified deactivation intent. @@ -2395,26 +2580,26 @@ def disable_node( api_version = "6.0" # Construct URL - url = self.disable_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.disable_node.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(deactivation_intent_description, 'DeactivationIntentDescription') + body_content = self._serialize.body(deactivation_intent_description, "DeactivationIntentDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -2426,10 +2611,10 @@ def disable_node( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - disable_node.metadata = {'url': '/Nodes/{nodeName}/$/Deactivate'} - def enable_node( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + disable_node.metadata = {"url": "/Nodes/{nodeName}/$/Deactivate"} + + def enable_node(self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Activate a Service Fabric cluster node that is currently deactivated. Activates a Service Fabric cluster node that is currently deactivated. @@ -2457,17 +2642,17 @@ def enable_node( api_version = "6.0" # Construct URL - url = self.enable_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.enable_node.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -2484,10 +2669,10 @@ def enable_node( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - enable_node.metadata = {'url': '/Nodes/{nodeName}/$/Activate'} - def remove_node_state( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + enable_node.metadata = {"url": "/Nodes/{nodeName}/$/Activate"} + + def remove_node_state(self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Notifies Service Fabric that the persisted state on a node has been permanently removed or lost. @@ -2531,17 +2716,17 @@ def remove_node_state( api_version = "6.0" # Construct URL - url = self.remove_node_state.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.remove_node_state.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -2558,10 +2743,19 @@ def remove_node_state( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - remove_node_state.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeState'} + + remove_node_state.metadata = {"url": "/Nodes/{nodeName}/$/RemoveNodeState"} def restart_node( - self, node_name, node_instance_id="0", timeout=60, create_fabric_dump="False", custom_headers=None, raw=False, **operation_config): + self, + node_name, + node_instance_id="0", + timeout=60, + create_fabric_dump="False", + custom_headers=None, + raw=False, + **operation_config + ): """Restarts a Service Fabric cluster node. Restarts a Service Fabric cluster node that is already started. @@ -2593,31 +2787,33 @@ def restart_node( :raises: :class:`FabricErrorException` """ - restart_node_description = models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) + restart_node_description = models.RestartNodeDescription( + node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump + ) api_version = "6.0" # Construct URL - url = self.restart_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.restart_node.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(restart_node_description, 'RestartNodeDescription') + body_content = self._serialize.body(restart_node_description, "RestartNodeDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -2629,10 +2825,10 @@ def restart_node( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - restart_node.metadata = {'url': '/Nodes/{nodeName}/$/Restart'} - def remove_configuration_overrides( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + restart_node.metadata = {"url": "/Nodes/{nodeName}/$/Restart"} + + def remove_configuration_overrides(self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Removes configuration overrides on the specified node. This api allows removing all existing configuration overrides on @@ -2658,17 +2854,17 @@ def remove_configuration_overrides( api_version = "7.0" # Construct URL - url = self.remove_configuration_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.remove_configuration_overrides.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -2685,10 +2881,10 @@ def remove_configuration_overrides( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - remove_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/RemoveConfigurationOverrides'} - def get_configuration_overrides( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + remove_configuration_overrides.metadata = {"url": "/Nodes/{nodeName}/$/RemoveConfigurationOverrides"} + + def get_configuration_overrides(self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the list of configuration overrides on the specified node. This api allows getting all existing configuration overrides on the @@ -2715,21 +2911,21 @@ def get_configuration_overrides( api_version = "7.0" # Construct URL - url = self.get_configuration_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_configuration_overrides.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -2742,17 +2938,26 @@ def get_configuration_overrides( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ConfigParameterOverride]', response) + deserialized = self._deserialize("[ConfigParameterOverride]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/GetConfigurationOverrides'} + + get_configuration_overrides.metadata = {"url": "/Nodes/{nodeName}/$/GetConfigurationOverrides"} def add_configuration_parameter_overrides( - self, node_name, config_parameter_override_list, force=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + config_parameter_override_list, + force=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Adds the list of configuration overrides on the specified node. This api allows adding all existing configuration overrides on the @@ -2784,28 +2989,28 @@ def add_configuration_parameter_overrides( api_version = "7.0" # Construct URL - url = self.add_configuration_parameter_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.add_configuration_parameter_overrides.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if force is not None: - query_parameters['Force'] = self._serialize.query("force", force, 'bool') + query_parameters["Force"] = self._serialize.query("force", force, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') + body_content = self._serialize.body(config_parameter_override_list, "[ConfigParameterOverride]") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -2817,10 +3022,10 @@ def add_configuration_parameter_overrides( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - add_configuration_parameter_overrides.metadata = {'url': '/Nodes/{nodeName}/$/AddConfigurationParameterOverrides'} - def remove_node_tags( - self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): + add_configuration_parameter_overrides.metadata = {"url": "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides"} + + def remove_node_tags(self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): """Removes the list of tags from the specified node. This api allows removing set of tags from the specified node. @@ -2842,24 +3047,22 @@ def remove_node_tags( api_version = "7.0" # Construct URL - url = self.remove_node_tags.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.remove_node_tags.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(node_tags, '[str]') + body_content = self._serialize.body(node_tags, "[str]") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -2871,10 +3074,10 @@ def remove_node_tags( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - remove_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeTags'} - def add_node_tags( - self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): + remove_node_tags.metadata = {"url": "/Nodes/{nodeName}/$/RemoveNodeTags"} + + def add_node_tags(self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): """Adds the list of tags on the specified node. This api allows adding tags to the specified node. @@ -2896,24 +3099,22 @@ def add_node_tags( api_version = "7.2" # Construct URL - url = self.add_node_tags.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.add_node_tags.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(node_tags, '[str]') + body_content = self._serialize.body(node_tags, "[str]") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -2925,10 +3126,20 @@ def add_node_tags( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - add_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/AddNodeTags'} + + add_node_tags.metadata = {"url": "/Nodes/{nodeName}/$/AddNodeTags"} def get_application_type_info_list( - self, application_type_definition_kind_filter=0, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_type_definition_kind_filter=0, + exclude_application_parameters=False, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of application types in the Service Fabric cluster. Returns the information about the application types that are @@ -2996,25 +3207,33 @@ def get_application_type_info_list( api_version = "6.0" # Construct URL - url = self.get_application_type_info_list.metadata['url'] + url = self.get_application_type_info_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if application_type_definition_kind_filter is not None: - query_parameters['ApplicationTypeDefinitionKindFilter'] = self._serialize.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') + query_parameters["ApplicationTypeDefinitionKindFilter"] = self._serialize.query( + "application_type_definition_kind_filter", application_type_definition_kind_filter, "int" + ) if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + query_parameters["ExcludeApplicationParameters"] = self._serialize.query( + "exclude_application_parameters", exclude_application_parameters, "bool" + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3027,17 +3246,28 @@ def get_application_type_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationTypeInfoList', response) + deserialized = self._deserialize("PagedApplicationTypeInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_type_info_list.metadata = {'url': '/ApplicationTypes'} + + get_application_type_info_list.metadata = {"url": "/ApplicationTypes"} def get_application_type_info_list_by_name( - self, application_type_name, application_type_version=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_type_name, + application_type_version=None, + exclude_application_parameters=False, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of application types in the Service Fabric cluster matching exactly the specified name. @@ -3100,29 +3330,37 @@ def get_application_type_info_list_by_name( api_version = "6.0" # Construct URL - url = self.get_application_type_info_list_by_name.metadata['url'] + url = self.get_application_type_info_list_by_name.metadata["url"] path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + "applicationTypeName": self._serialize.url("application_type_name", application_type_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if application_type_version is not None: - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + query_parameters["ApplicationTypeVersion"] = self._serialize.query( + "application_type_version", application_type_version, "str" + ) if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + query_parameters["ExcludeApplicationParameters"] = self._serialize.query( + "exclude_application_parameters", exclude_application_parameters, "bool" + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3135,17 +3373,24 @@ def get_application_type_info_list_by_name( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationTypeInfoList', response) + deserialized = self._deserialize("PagedApplicationTypeInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_type_info_list_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}'} + + get_application_type_info_list_by_name.metadata = {"url": "/ApplicationTypes/{applicationTypeName}"} def provision_application_type( - self, provision_application_type_description_base_required_body_param, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + provision_application_type_description_base_required_body_param, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store. @@ -3180,22 +3425,26 @@ def provision_application_type( api_version = "6.2" # Construct URL - url = self.provision_application_type.metadata['url'] + url = self.provision_application_type.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') + body_content = self._serialize.body( + provision_application_type_description_base_required_body_param, "ProvisionApplicationTypeDescriptionBase" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -3207,10 +3456,19 @@ def provision_application_type( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - provision_application_type.metadata = {'url': '/ApplicationTypes/$/Provision'} + + provision_application_type.metadata = {"url": "/ApplicationTypes/$/Provision"} def unprovision_application_type( - self, application_type_name, application_type_version, timeout=60, async_parameter=None, custom_headers=None, raw=False, **operation_config): + self, + application_type_name, + application_type_version, + timeout=60, + async_parameter=None, + custom_headers=None, + raw=False, + **operation_config + ): """Removes or unregisters a Service Fabric application type from the cluster. @@ -3246,31 +3504,37 @@ def unprovision_application_type( :raises: :class:`FabricErrorException` """ - unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) + unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo( + application_type_version=application_type_version, async_property=async_parameter + ) api_version = "6.0" # Construct URL - url = self.unprovision_application_type.metadata['url'] + url = self.unprovision_application_type.metadata["url"] path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + "applicationTypeName": self._serialize.url("application_type_name", application_type_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') + body_content = self._serialize.body( + unprovision_application_type_description_info, "UnprovisionApplicationTypeDescriptionInfo" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -3282,10 +3546,18 @@ def unprovision_application_type( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - unprovision_application_type.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/Unprovision'} + + unprovision_application_type.metadata = {"url": "/ApplicationTypes/{applicationTypeName}/$/Unprovision"} def get_service_type_info_list( - self, application_type_name, application_type_version, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_type_name, + application_type_version, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list containing the information about service types that are supported by a provisioned application type in a Service Fabric cluster. @@ -3318,22 +3590,26 @@ def get_service_type_info_list( api_version = "6.0" # Construct URL - url = self.get_service_type_info_list.metadata['url'] + url = self.get_service_type_info_list.metadata["url"] path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + "applicationTypeName": self._serialize.url("application_type_name", application_type_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ApplicationTypeVersion"] = self._serialize.query( + "application_type_version", application_type_version, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3346,17 +3622,26 @@ def get_service_type_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ServiceTypeInfo]', response) + deserialized = self._deserialize("[ServiceTypeInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_type_info_list.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes'} + + get_service_type_info_list.metadata = {"url": "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes"} def get_service_type_info_by_name( - self, application_type_name, application_type_version, service_type_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_type_name, + application_type_version, + service_type_name, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about a specific service type that is supported by a provisioned application type in a Service Fabric cluster. @@ -3392,23 +3677,27 @@ def get_service_type_info_by_name( api_version = "6.0" # Construct URL - url = self.get_service_type_info_by_name.metadata['url'] + url = self.get_service_type_info_by_name.metadata["url"] path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str'), - 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) + "applicationTypeName": self._serialize.url("application_type_name", application_type_name, "str"), + "serviceTypeName": self._serialize.url("service_type_name", service_type_name, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ApplicationTypeVersion"] = self._serialize.query( + "application_type_version", application_type_version, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3421,17 +3710,28 @@ def get_service_type_info_by_name( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceTypeInfo', response) + deserialized = self._deserialize("ServiceTypeInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_type_info_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}'} + + get_service_type_info_by_name.metadata = { + "url": "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}" + } def get_service_manifest( - self, application_type_name, application_type_version, service_manifest_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_type_name, + application_type_version, + service_manifest_name, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the manifest describing a service type. Gets the manifest describing a service type. The response contains the @@ -3463,23 +3763,29 @@ def get_service_manifest( api_version = "6.0" # Construct URL - url = self.get_service_manifest.metadata['url'] + url = self.get_service_manifest.metadata["url"] path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + "applicationTypeName": self._serialize.url("application_type_name", application_type_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ApplicationTypeVersion"] = self._serialize.query( + "application_type_version", application_type_version, "str" + ) + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3492,17 +3798,26 @@ def get_service_manifest( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceTypeManifest', response) + deserialized = self._deserialize("ServiceTypeManifest", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'} + + get_service_manifest.metadata = {"url": "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest"} def get_deployed_service_type_info_list( - self, node_name, application_id, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_manifest_name=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster. @@ -3547,24 +3862,28 @@ def get_deployed_service_type_info_list( api_version = "6.0" # Construct URL - url = self.get_deployed_service_type_info_list.metadata['url'] + url = self.get_deployed_service_type_info_list.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3577,17 +3896,29 @@ def get_deployed_service_type_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) + deserialized = self._deserialize("[DeployedServiceTypeInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_type_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'} + + get_deployed_service_type_info_list.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes" + } def get_deployed_service_type_info_by_name( - self, node_name, application_id, service_type_name, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_type_name, + service_manifest_name=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about a specified service type of the application deployed on a node in a Service Fabric cluster. @@ -3636,25 +3967,29 @@ def get_deployed_service_type_info_by_name( api_version = "6.0" # Construct URL - url = self.get_deployed_service_type_info_by_name.metadata['url'] + url = self.get_deployed_service_type_info_by_name.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), + "serviceTypeName": self._serialize.url("service_type_name", service_type_name, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3667,17 +4002,21 @@ def get_deployed_service_type_info_by_name( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) + deserialized = self._deserialize("[DeployedServiceTypeInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_type_info_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}'} + + get_deployed_service_type_info_by_name.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}" + } def create_application( - self, application_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Creates a Service Fabric application. Creates a Service Fabric application using the specified description. @@ -3704,22 +4043,24 @@ def create_application( api_version = "6.0" # Construct URL - url = self.create_application.metadata['url'] + url = self.create_application.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(application_description, 'ApplicationDescription') + body_content = self._serialize.body(application_description, "ApplicationDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -3731,10 +4072,12 @@ def create_application( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - create_application.metadata = {'url': '/Applications/$/Create'} + + create_application.metadata = {"url": "/Applications/$/Create"} def delete_application( - self, application_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Deletes an existing Service Fabric application. An application must be created before it can be deleted. Deleting an @@ -3779,19 +4122,21 @@ def delete_application( api_version = "6.0" # Construct URL - url = self.delete_application.metadata['url'] + url = self.delete_application.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') + query_parameters["ForceRemove"] = self._serialize.query("force_remove", force_remove, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -3808,10 +4153,10 @@ def delete_application( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_application.metadata = {'url': '/Applications/{applicationId}/$/Delete'} - def get_application_load_info( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + delete_application.metadata = {"url": "/Applications/{applicationId}/$/Delete"} + + def get_application_load_info(self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets load information about a Service Fabric application. Returns the load information about the application that was created or @@ -3849,21 +4194,23 @@ def get_application_load_info( api_version = "6.0" # Construct URL - url = self.get_application_load_info.metadata['url'] + url = self.get_application_load_info.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3876,17 +4223,28 @@ def get_application_load_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationLoadInfo', response) + deserialized = self._deserialize("ApplicationLoadInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_load_info.metadata = {'url': '/Applications/{applicationId}/$/GetLoadInformation'} + + get_application_load_info.metadata = {"url": "/Applications/{applicationId}/$/GetLoadInformation"} def get_application_info_list( - self, application_definition_kind_filter=0, application_type_name=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_definition_kind_filter=0, + application_type_name=None, + exclude_application_parameters=False, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of applications created in the Service Fabric cluster that match the specified filters. @@ -3954,27 +4312,37 @@ def get_application_info_list( api_version = "6.1" # Construct URL - url = self.get_application_info_list.metadata['url'] + url = self.get_application_info_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if application_definition_kind_filter is not None: - query_parameters['ApplicationDefinitionKindFilter'] = self._serialize.query("application_definition_kind_filter", application_definition_kind_filter, 'int') + query_parameters["ApplicationDefinitionKindFilter"] = self._serialize.query( + "application_definition_kind_filter", application_definition_kind_filter, "int" + ) if application_type_name is not None: - query_parameters['ApplicationTypeName'] = self._serialize.query("application_type_name", application_type_name, 'str') + query_parameters["ApplicationTypeName"] = self._serialize.query( + "application_type_name", application_type_name, "str" + ) if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + query_parameters["ExcludeApplicationParameters"] = self._serialize.query( + "exclude_application_parameters", exclude_application_parameters, "bool" + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -3987,17 +4355,25 @@ def get_application_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedApplicationInfoList', response) + deserialized = self._deserialize("PagedApplicationInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_info_list.metadata = {'url': '/Applications'} + + get_application_info_list.metadata = {"url": "/Applications"} def get_application_info( - self, application_id, exclude_application_parameters=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + exclude_application_parameters=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets information about a Service Fabric application. Returns the information about the application that was created or in @@ -4037,23 +4413,27 @@ def get_application_info( api_version = "6.0" # Construct URL - url = self.get_application_info.metadata['url'] + url = self.get_application_info.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + query_parameters["ExcludeApplicationParameters"] = self._serialize.query( + "exclude_application_parameters", exclude_application_parameters, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -4066,17 +4446,28 @@ def get_application_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationInfo', response) + deserialized = self._deserialize("ApplicationInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_info.metadata = {'url': '/Applications/{applicationId}'} + + get_application_info.metadata = {"url": "/Applications/{applicationId}"} def get_application_health( - self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + events_health_state_filter=0, + deployed_applications_health_state_filter=0, + services_health_state_filter=0, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of the service fabric application. Returns the heath state of the service fabric application. The response @@ -4193,29 +4584,39 @@ def get_application_health( api_version = "6.0" # Construct URL - url = self.get_application_health.metadata['url'] + url = self.get_application_health.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if deployed_applications_health_state_filter is not None: - query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + query_parameters["DeployedApplicationsHealthStateFilter"] = self._serialize.query( + "deployed_applications_health_state_filter", deployed_applications_health_state_filter, "int" + ) if services_health_state_filter is not None: - query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') + query_parameters["ServicesHealthStateFilter"] = self._serialize.query( + "services_health_state_filter", services_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -4228,17 +4629,29 @@ def get_application_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationHealth', response) + deserialized = self._deserialize("ApplicationHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_health.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} + + get_application_health.metadata = {"url": "/Applications/{applicationId}/$/GetHealth"} def get_application_health_using_policy( - self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + events_health_state_filter=0, + deployed_applications_health_state_filter=0, + services_health_state_filter=0, + exclude_health_statistics=False, + application_health_policy=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric application using the specified policy. @@ -4364,36 +4777,46 @@ def get_application_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_application_health_using_policy.metadata['url'] + url = self.get_application_health_using_policy.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if deployed_applications_health_state_filter is not None: - query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + query_parameters["DeployedApplicationsHealthStateFilter"] = self._serialize.query( + "deployed_applications_health_state_filter", deployed_applications_health_state_filter, "int" + ) if services_health_state_filter is not None: - query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') + query_parameters["ServicesHealthStateFilter"] = self._serialize.query( + "services_health_state_filter", services_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + body_content = self._serialize.body(application_health_policy, "ApplicationHealthPolicy") else: body_content = None @@ -4406,17 +4829,26 @@ def get_application_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationHealth', response) + deserialized = self._deserialize("ApplicationHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_health_using_policy.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} + + get_application_health_using_policy.metadata = {"url": "/Applications/{applicationId}/$/GetHealth"} def report_application_health( - self, application_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + health_information, + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric application. Reports health state of the specified Service Fabric application. The @@ -4484,28 +4916,30 @@ def report_application_health( api_version = "6.0" # Construct URL - url = self.report_application_health.metadata['url'] + url = self.report_application_health.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -4517,10 +4951,18 @@ def report_application_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_application_health.metadata = {'url': '/Applications/{applicationId}/$/ReportHealth'} + + report_application_health.metadata = {"url": "/Applications/{applicationId}/$/ReportHealth"} def start_application_upgrade( - self, application_id, application_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + application_upgrade_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Starts upgrading an application in the Service Fabric cluster. Validates the supplied application upgrade parameters and starts @@ -4564,26 +5006,28 @@ def start_application_upgrade( api_version = "6.0" # Construct URL - url = self.start_application_upgrade.metadata['url'] + url = self.start_application_upgrade.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') + body_content = self._serialize.body(application_upgrade_description, "ApplicationUpgradeDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -4595,10 +5039,10 @@ def start_application_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/Upgrade'} - def get_application_upgrade( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + start_application_upgrade.metadata = {"url": "/Applications/{applicationId}/$/Upgrade"} + + def get_application_upgrade(self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets details for the latest upgrade performed on this application. Returns information about the state of the latest application upgrade @@ -4633,21 +5077,23 @@ def get_application_upgrade( api_version = "6.0" # Construct URL - url = self.get_application_upgrade.metadata['url'] + url = self.get_application_upgrade.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -4660,17 +5106,25 @@ def get_application_upgrade( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationUpgradeProgressInfo', response) + deserialized = self._deserialize("ApplicationUpgradeProgressInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/GetUpgradeProgress'} + + get_application_upgrade.metadata = {"url": "/Applications/{applicationId}/$/GetUpgradeProgress"} def update_application_upgrade( - self, application_id, application_upgrade_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + application_upgrade_update_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Updates an ongoing application upgrade in the Service Fabric cluster. Updates the parameters of an ongoing application upgrade from the ones @@ -4709,26 +5163,30 @@ def update_application_upgrade( api_version = "6.0" # Construct URL - url = self.update_application_upgrade.metadata['url'] + url = self.update_application_upgrade.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') + body_content = self._serialize.body( + application_upgrade_update_description, "ApplicationUpgradeUpdateDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -4740,10 +5198,18 @@ def update_application_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/UpdateUpgrade'} + + update_application_upgrade.metadata = {"url": "/Applications/{applicationId}/$/UpdateUpgrade"} def update_application( - self, application_id, application_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + application_update_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Updates a Service Fabric application. Updates a Service Fabric application instance. The set of properties @@ -4781,26 +5247,28 @@ def update_application( api_version = "8.1" # Construct URL - url = self.update_application.metadata['url'] + url = self.update_application.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') + body_content = self._serialize.body(application_update_description, "ApplicationUpdateDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -4812,10 +5280,12 @@ def update_application( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_application.metadata = {'url': '/Applications/{applicationId}/$/Update'} + + update_application.metadata = {"url": "/Applications/{applicationId}/$/Update"} def resume_application_upgrade( - self, application_id, upgrade_domain_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, upgrade_domain_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Resumes upgrading an application in the Service Fabric cluster. Resumes an unmonitored manual Service Fabric application upgrade. @@ -4851,31 +5321,37 @@ def resume_application_upgrade( :raises: :class:`FabricErrorException` """ - resume_application_upgrade_description = models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) + resume_application_upgrade_description = models.ResumeApplicationUpgradeDescription( + upgrade_domain_name=upgrade_domain_name + ) api_version = "6.0" # Construct URL - url = self.resume_application_upgrade.metadata['url'] + url = self.resume_application_upgrade.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') + body_content = self._serialize.body( + resume_application_upgrade_description, "ResumeApplicationUpgradeDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -4887,10 +5363,12 @@ def resume_application_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - resume_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/MoveToNextUpgradeDomain'} + + resume_application_upgrade.metadata = {"url": "/Applications/{applicationId}/$/MoveToNextUpgradeDomain"} def rollback_application_upgrade( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster. @@ -4927,17 +5405,19 @@ def rollback_application_upgrade( api_version = "6.0" # Construct URL - url = self.rollback_application_upgrade.metadata['url'] + url = self.rollback_application_upgrade.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -4954,10 +5434,20 @@ def rollback_application_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - rollback_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/RollbackUpgrade'} + + rollback_application_upgrade.metadata = {"url": "/Applications/{applicationId}/$/RollbackUpgrade"} def get_deployed_application_info_list( - self, node_name, timeout=60, include_health_state=False, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + self, + node_name, + timeout=60, + include_health_state=False, + continuation_token=None, + max_results=0, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of applications deployed on a Service Fabric node. Gets the list of applications deployed on a Service Fabric node. The @@ -5013,27 +5503,31 @@ def get_deployed_application_info_list( api_version = "6.1" # Construct URL - url = self.get_deployed_application_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_deployed_application_info_list.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if include_health_state is not None: - query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') + query_parameters["IncludeHealthState"] = self._serialize.query( + "include_health_state", include_health_state, "bool" + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5046,17 +5540,26 @@ def get_deployed_application_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedDeployedApplicationInfoList', response) + deserialized = self._deserialize("PagedDeployedApplicationInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_application_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications'} + + get_deployed_application_info_list.metadata = {"url": "/Nodes/{nodeName}/$/GetApplications"} def get_deployed_application_info( - self, node_name, application_id, timeout=60, include_health_state=False, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + timeout=60, + include_health_state=False, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about an application deployed on a Service Fabric node. @@ -5104,24 +5607,28 @@ def get_deployed_application_info( api_version = "6.1" # Construct URL - url = self.get_deployed_application_info.metadata['url'] + url = self.get_deployed_application_info.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if include_health_state is not None: - query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') + query_parameters["IncludeHealthState"] = self._serialize.query( + "include_health_state", include_health_state, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5134,17 +5641,28 @@ def get_deployed_application_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationInfo', response) + deserialized = self._deserialize("DeployedApplicationInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_application_info.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}'} + + get_deployed_application_info.metadata = {"url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}"} def get_deployed_application_health( - self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + events_health_state_filter=0, + deployed_service_packages_health_state_filter=0, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about health of an application deployed on a Service Fabric node. @@ -5243,28 +5761,36 @@ def get_deployed_application_health( api_version = "6.0" # Construct URL - url = self.get_deployed_application_health.metadata['url'] + url = self.get_deployed_application_health.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if deployed_service_packages_health_state_filter is not None: - query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + query_parameters["DeployedServicePackagesHealthStateFilter"] = self._serialize.query( + "deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5277,17 +5803,31 @@ def get_deployed_application_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationHealth', response) + deserialized = self._deserialize("DeployedApplicationHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} + + get_deployed_application_health.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth" + } def get_deployed_application_health_using_policy( - self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + events_health_state_filter=0, + deployed_service_packages_health_state_filter=0, + application_health_policy=None, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about health of an application deployed on a Service Fabric node. using the specified policy. @@ -5397,35 +5937,43 @@ def get_deployed_application_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_deployed_application_health_using_policy.metadata['url'] + url = self.get_deployed_application_health_using_policy.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if deployed_service_packages_health_state_filter is not None: - query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + query_parameters["DeployedServicePackagesHealthStateFilter"] = self._serialize.query( + "deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + body_content = self._serialize.body(application_health_policy, "ApplicationHealthPolicy") else: body_content = None @@ -5438,17 +5986,29 @@ def get_deployed_application_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationHealth', response) + deserialized = self._deserialize("DeployedApplicationHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_application_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} + + get_deployed_application_health_using_policy.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth" + } def report_deployed_application_health( - self, node_name, application_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + health_information, + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric application deployed on a Service Fabric node. @@ -5519,29 +6079,31 @@ def report_deployed_application_health( api_version = "6.0" # Construct URL - url = self.report_deployed_application_health.metadata['url'] + url = self.report_deployed_application_health.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -5553,10 +6115,20 @@ def report_deployed_application_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth'} + + report_deployed_application_health.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth" + } def get_application_manifest( - self, application_type_name, application_type_version, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_type_name, + application_type_version, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the manifest describing an application type. The response contains the application manifest XML as a string. @@ -5584,22 +6156,26 @@ def get_application_manifest( api_version = "6.0" # Construct URL - url = self.get_application_manifest.metadata['url'] + url = self.get_application_manifest.metadata["url"] path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + "applicationTypeName": self._serialize.url("application_type_name", application_type_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ApplicationTypeVersion"] = self._serialize.query( + "application_type_version", application_type_version, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5612,17 +6188,26 @@ def get_application_manifest( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationTypeManifest', response) + deserialized = self._deserialize("ApplicationTypeManifest", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest'} + + get_application_manifest.metadata = {"url": "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest"} def get_service_info_list( - self, application_id, service_type_name=None, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + service_type_name=None, + continuation_token=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about all services belonging to the application specified by the application ID. @@ -5668,25 +6253,29 @@ def get_service_info_list( api_version = "6.0" # Construct URL - url = self.get_service_info_list.metadata['url'] + url = self.get_service_info_list.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} if service_type_name is not None: - query_parameters['ServiceTypeName'] = self._serialize.query("service_type_name", service_type_name, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["ServiceTypeName"] = self._serialize.query("service_type_name", service_type_name, "str") + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5699,17 +6288,19 @@ def get_service_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedServiceInfoList', response) + deserialized = self._deserialize("PagedServiceInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_info_list.metadata = {'url': '/Applications/{applicationId}/$/GetServices'} + + get_service_info_list.metadata = {"url": "/Applications/{applicationId}/$/GetServices"} def get_service_info( - self, application_id, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, service_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the information about the specific service belonging to the Service Fabric application. @@ -5752,22 +6343,24 @@ def get_service_info( api_version = "6.0" # Construct URL - url = self.get_service_info.metadata['url'] + url = self.get_service_info.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5780,17 +6373,17 @@ def get_service_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceInfo', response) + deserialized = self._deserialize("ServiceInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_info.metadata = {'url': '/Applications/{applicationId}/$/GetServices/{serviceId}'} - def get_application_name_info( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_service_info.metadata = {"url": "/Applications/{applicationId}/$/GetServices/{serviceId}"} + + def get_application_name_info(self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the name of the Service Fabric application for a service. Gets the name of the application for the specified service. A 404 @@ -5824,21 +6417,21 @@ def get_application_name_info( api_version = "6.0" # Construct URL - url = self.get_application_name_info.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_application_name_info.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -5851,17 +6444,19 @@ def get_application_name_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationNameInfo', response) + deserialized = self._deserialize("ApplicationNameInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_name_info.metadata = {'url': '/Services/{serviceId}/$/GetApplicationName'} + + get_application_name_info.metadata = {"url": "/Services/{serviceId}/$/GetApplicationName"} def create_service( - self, application_id, service_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, service_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Creates the specified Service Fabric service. This api allows creating a new Service Fabric stateless or stateful @@ -5901,26 +6496,28 @@ def create_service( api_version = "6.0" # Construct URL - url = self.create_service.metadata['url'] + url = self.create_service.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(service_description, 'ServiceDescription') + body_content = self._serialize.body(service_description, "ServiceDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -5932,10 +6529,18 @@ def create_service( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - create_service.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/Create'} + + create_service.metadata = {"url": "/Applications/{applicationId}/$/GetServices/$/Create"} def create_service_from_template( - self, application_id, service_from_template_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + service_from_template_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Creates a Service Fabric service from the service template. Creates a Service Fabric service from the service template defined in @@ -5976,26 +6581,28 @@ def create_service_from_template( api_version = "6.0" # Construct URL - url = self.create_service_from_template.metadata['url'] + url = self.create_service_from_template.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') + body_content = self._serialize.body(service_from_template_description, "ServiceFromTemplateDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -6007,10 +6614,12 @@ def create_service_from_template( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - create_service_from_template.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate'} + + create_service_from_template.metadata = {"url": "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate"} def delete_service( - self, service_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Deletes an existing Service Fabric service. A service must be created before it can be deleted. By default, Service @@ -6052,19 +6661,19 @@ def delete_service( api_version = "6.0" # Construct URL - url = self.delete_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.delete_service.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') + query_parameters["ForceRemove"] = self._serialize.query("force_remove", force_remove, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -6081,10 +6690,12 @@ def delete_service( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_service.metadata = {'url': '/Services/{serviceId}/$/Delete'} + + delete_service.metadata = {"url": "/Services/{serviceId}/$/Delete"} def update_service( - self, service_id, service_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, service_update_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Updates a Service Fabric service using the specified update description. @@ -6129,26 +6740,26 @@ def update_service( api_version = "6.0" # Construct URL - url = self.update_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.update_service.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(service_update_description, 'ServiceUpdateDescription') + body_content = self._serialize.body(service_update_description, "ServiceUpdateDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -6160,10 +6771,10 @@ def update_service( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_service.metadata = {'url': '/Services/{serviceId}/$/Update'} - def get_service_description( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + update_service.metadata = {"url": "/Services/{serviceId}/$/Update"} + + def get_service_description(self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the description of an existing Service Fabric service. Gets the description of an existing Service Fabric service. A service @@ -6196,21 +6807,21 @@ def get_service_description( api_version = "6.0" # Construct URL - url = self.get_service_description.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_service_description.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -6223,17 +6834,27 @@ def get_service_description( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceDescription', response) + deserialized = self._deserialize("ServiceDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_description.metadata = {'url': '/Services/{serviceId}/$/GetDescription'} + + get_service_description.metadata = {"url": "/Services/{serviceId}/$/GetDescription"} def get_service_health( - self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + events_health_state_filter=0, + partitions_health_state_filter=0, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of the specified Service Fabric service. Gets the health information of the specified service. @@ -6327,27 +6948,33 @@ def get_service_health( api_version = "6.0" # Construct URL - url = self.get_service_health.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_service_health.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if partitions_health_state_filter is not None: - query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + query_parameters["PartitionsHealthStateFilter"] = self._serialize.query( + "partitions_health_state_filter", partitions_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -6360,17 +6987,28 @@ def get_service_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceHealth', response) + deserialized = self._deserialize("ServiceHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_health.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} + + get_service_health.metadata = {"url": "/Services/{serviceId}/$/GetHealth"} def get_service_health_using_policy( - self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + events_health_state_filter=0, + partitions_health_state_filter=0, + application_health_policy=None, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of the specified Service Fabric service, by using the specified health policy. @@ -6476,34 +7114,40 @@ def get_service_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_service_health_using_policy.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_service_health_using_policy.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if partitions_health_state_filter is not None: - query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + query_parameters["PartitionsHealthStateFilter"] = self._serialize.query( + "partitions_health_state_filter", partitions_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + body_content = self._serialize.body(application_health_policy, "ApplicationHealthPolicy") else: body_content = None @@ -6516,17 +7160,26 @@ def get_service_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceHealth', response) + deserialized = self._deserialize("ServiceHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_health_using_policy.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} + + get_service_health_using_policy.metadata = {"url": "/Services/{serviceId}/$/GetHealth"} def report_service_health( - self, service_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + health_information, + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric service. Reports health state of the specified Service Fabric service. The @@ -6593,28 +7246,28 @@ def report_service_health( api_version = "6.0" # Construct URL - url = self.report_service_health.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.report_service_health.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -6626,10 +7279,20 @@ def report_service_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_service_health.metadata = {'url': '/Services/{serviceId}/$/ReportHealth'} + + report_service_health.metadata = {"url": "/Services/{serviceId}/$/ReportHealth"} def resolve_service( - self, service_id, partition_key_type=None, partition_key_value=None, previous_rsp_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_key_type=None, + partition_key_value=None, + previous_rsp_version=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Resolve a Service Fabric partition. Resolve a Service Fabric service partition to get the endpoints of the @@ -6688,27 +7351,33 @@ def resolve_service( api_version = "6.0" # Construct URL - url = self.resolve_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.resolve_service.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if partition_key_type is not None: - query_parameters['PartitionKeyType'] = self._serialize.query("partition_key_type", partition_key_type, 'int') + query_parameters["PartitionKeyType"] = self._serialize.query( + "partition_key_type", partition_key_type, "int" + ) if partition_key_value is not None: - query_parameters['PartitionKeyValue'] = self._serialize.query("partition_key_value", partition_key_value, 'str', skip_quote=True) + query_parameters["PartitionKeyValue"] = self._serialize.query( + "partition_key_value", partition_key_value, "str", skip_quote=True + ) if previous_rsp_version is not None: - query_parameters['PreviousRspVersion'] = self._serialize.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) + query_parameters["PreviousRspVersion"] = self._serialize.query( + "previous_rsp_version", previous_rsp_version, "str", skip_quote=True + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -6721,17 +7390,26 @@ def resolve_service( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ResolvedServicePartition', response) + deserialized = self._deserialize("ResolvedServicePartition", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - resolve_service.metadata = {'url': '/Services/{serviceId}/$/ResolvePartition'} + + resolve_service.metadata = {"url": "/Services/{serviceId}/$/ResolvePartition"} def get_unplaced_replica_information( - self, service_id, partition_id=None, only_query_primaries=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_id=None, + only_query_primaries=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about unplaced replica of the service. Returns the information about the unplaced replicas of the service. @@ -6775,25 +7453,27 @@ def get_unplaced_replica_information( api_version = "6.4" # Construct URL - url = self.get_unplaced_replica_information.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_unplaced_replica_information.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if partition_id is not None: - query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') + query_parameters["PartitionId"] = self._serialize.query("partition_id", partition_id, "str") if only_query_primaries is not None: - query_parameters['OnlyQueryPrimaries'] = self._serialize.query("only_query_primaries", only_query_primaries, 'bool') + query_parameters["OnlyQueryPrimaries"] = self._serialize.query( + "only_query_primaries", only_query_primaries, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -6806,17 +7486,27 @@ def get_unplaced_replica_information( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UnplacedReplicaInformation', response) + deserialized = self._deserialize("UnplacedReplicaInformation", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_unplaced_replica_information.metadata = {'url': '/Services/{serviceId}/$/GetUnplacedReplicaInformation'} + + get_unplaced_replica_information.metadata = {"url": "/Services/{serviceId}/$/GetUnplacedReplicaInformation"} def get_loaded_partition_info_list( - self, metric_name, service_name=None, ordering="Desc", max_results=0, continuation_token=None, custom_headers=None, raw=False, **operation_config): + self, + metric_name, + service_name=None, + ordering="Desc", + max_results=0, + continuation_token=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets ordered list of partitions. Retrieves partitions which are most/least loaded according to specified @@ -6862,24 +7552,26 @@ def get_loaded_partition_info_list( api_version = "8.0" # Construct URL - url = self.get_loaded_partition_info_list.metadata['url'] + url = self.get_loaded_partition_info_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['MetricName'] = self._serialize.query("metric_name", metric_name, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["MetricName"] = self._serialize.query("metric_name", metric_name, "str") if service_name is not None: - query_parameters['ServiceName'] = self._serialize.query("service_name", service_name, 'str') + query_parameters["ServiceName"] = self._serialize.query("service_name", service_name, "str") if ordering is not None: - query_parameters['Ordering'] = self._serialize.query("ordering", ordering, 'str') + query_parameters["Ordering"] = self._serialize.query("ordering", ordering, "str") if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -6892,17 +7584,19 @@ def get_loaded_partition_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('LoadedPartitionInformationResultList', response) + deserialized = self._deserialize("LoadedPartitionInformationResultList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_loaded_partition_info_list.metadata = {'url': '/$/GetLoadedPartitionInfoList'} + + get_loaded_partition_info_list.metadata = {"url": "/$/GetLoadedPartitionInfoList"} def get_partition_info_list( - self, service_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the list of partitions of a Service Fabric service. The response includes the partition ID, partitioning scheme @@ -6945,23 +7639,25 @@ def get_partition_info_list( api_version = "6.4" # Construct URL - url = self.get_partition_info_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_partition_info_list.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -6974,17 +7670,17 @@ def get_partition_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedServicePartitionInfoList', response) + deserialized = self._deserialize("PagedServicePartitionInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_info_list.metadata = {'url': '/Services/{serviceId}/$/GetPartitions'} - def get_partition_info( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_partition_info_list.metadata = {"url": "/Services/{serviceId}/$/GetPartitions"} + + def get_partition_info(self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the information about a Service Fabric partition. Gets the information about the specified partition. The response @@ -7013,21 +7709,23 @@ def get_partition_info( api_version = "6.0" # Construct URL - url = self.get_partition_info.metadata['url'] + url = self.get_partition_info.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -7040,17 +7738,17 @@ def get_partition_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServicePartitionInfo', response) + deserialized = self._deserialize("ServicePartitionInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_info.metadata = {'url': '/Partitions/{partitionId}'} - def get_service_name_info( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_partition_info.metadata = {"url": "/Partitions/{partitionId}"} + + def get_service_name_info(self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the name of the Service Fabric service for a partition. Gets name of the service for the specified partition. A 404 error is @@ -7077,21 +7775,23 @@ def get_service_name_info( api_version = "6.0" # Construct URL - url = self.get_service_name_info.metadata['url'] + url = self.get_service_name_info.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -7104,17 +7804,27 @@ def get_service_name_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ServiceNameInfo', response) + deserialized = self._deserialize("ServiceNameInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_name_info.metadata = {'url': '/Partitions/{partitionId}/$/GetServiceName'} + + get_service_name_info.metadata = {"url": "/Partitions/{partitionId}/$/GetServiceName"} def get_partition_health( - self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + events_health_state_filter=0, + replicas_health_state_filter=0, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of the specified Service Fabric partition. Use EventsHealthStateFilter to filter the collection of health events @@ -7199,27 +7909,35 @@ def get_partition_health( api_version = "6.0" # Construct URL - url = self.get_partition_health.metadata['url'] + url = self.get_partition_health.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if replicas_health_state_filter is not None: - query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + query_parameters["ReplicasHealthStateFilter"] = self._serialize.query( + "replicas_health_state_filter", replicas_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -7232,17 +7950,28 @@ def get_partition_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionHealth', response) + deserialized = self._deserialize("PartitionHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} + + get_partition_health.metadata = {"url": "/Partitions/{partitionId}/$/GetHealth"} def get_partition_health_using_policy( - self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + events_health_state_filter=0, + replicas_health_state_filter=0, + application_health_policy=None, + exclude_health_statistics=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of the specified Service Fabric partition, by using the specified health policy. @@ -7342,34 +8071,42 @@ def get_partition_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_partition_health_using_policy.metadata['url'] + url = self.get_partition_health_using_policy.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if replicas_health_state_filter is not None: - query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + query_parameters["ReplicasHealthStateFilter"] = self._serialize.query( + "replicas_health_state_filter", replicas_health_state_filter, "int" + ) if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + query_parameters["ExcludeHealthStatistics"] = self._serialize.query( + "exclude_health_statistics", exclude_health_statistics, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + body_content = self._serialize.body(application_health_policy, "ApplicationHealthPolicy") else: body_content = None @@ -7382,17 +8119,26 @@ def get_partition_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionHealth', response) + deserialized = self._deserialize("PartitionHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} + + get_partition_health_using_policy.metadata = {"url": "/Partitions/{partitionId}/$/GetHealth"} def report_partition_health( - self, partition_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + health_information, + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric partition. Reports health state of the specified Service Fabric partition. The @@ -7453,28 +8199,30 @@ def report_partition_health( api_version = "6.0" # Construct URL - url = self.report_partition_health.metadata['url'] + url = self.report_partition_health.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -7486,10 +8234,12 @@ def report_partition_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/ReportHealth'} + + report_partition_health.metadata = {"url": "/Partitions/{partitionId}/$/ReportHealth"} def get_partition_load_information( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the load information of the specified Service Fabric partition. Returns information about the load of a specified partition. @@ -7519,21 +8269,23 @@ def get_partition_load_information( api_version = "6.0" # Construct URL - url = self.get_partition_load_information.metadata['url'] + url = self.get_partition_load_information.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -7546,17 +8298,17 @@ def get_partition_load_information( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionLoadInformation', response) + deserialized = self._deserialize("PartitionLoadInformation", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_load_information.metadata = {'url': '/Partitions/{partitionId}/$/GetLoadInformation'} - def reset_partition_load( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_partition_load_information.metadata = {"url": "/Partitions/{partitionId}/$/GetLoadInformation"} + + def reset_partition_load(self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Resets the current load of a Service Fabric partition. Resets the current load of a Service Fabric partition to the default @@ -7582,17 +8334,19 @@ def reset_partition_load( api_version = "6.0" # Construct URL - url = self.reset_partition_load.metadata['url'] + url = self.reset_partition_load.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7609,10 +8363,10 @@ def reset_partition_load( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - reset_partition_load.metadata = {'url': '/Partitions/{partitionId}/$/ResetLoad'} - def recover_partition( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + reset_partition_load.metadata = {"url": "/Partitions/{partitionId}/$/ResetLoad"} + + def recover_partition(self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition that is currently stuck in quorum loss. @@ -7640,17 +8394,19 @@ def recover_partition( api_version = "6.0" # Construct URL - url = self.recover_partition.metadata['url'] + url = self.recover_partition.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7667,10 +8423,10 @@ def recover_partition( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - recover_partition.metadata = {'url': '/Partitions/{partitionId}/$/Recover'} - def recover_service_partitions( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + recover_partition.metadata = {"url": "/Partitions/{partitionId}/$/Recover"} + + def recover_service_partitions(self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Indicates to the Service Fabric cluster that it should attempt to recover the specified service that is currently stuck in quorum loss. @@ -7706,17 +8462,17 @@ def recover_service_partitions( api_version = "6.0" # Construct URL - url = self.recover_service_partitions.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.recover_service_partitions.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7733,10 +8489,10 @@ def recover_service_partitions( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - recover_service_partitions.metadata = {'url': '/Services/$/{serviceId}/$/GetPartitions/$/Recover'} - def recover_system_partitions( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + recover_service_partitions.metadata = {"url": "/Services/$/{serviceId}/$/GetPartitions/$/Recover"} + + def recover_system_partitions(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Indicates to the Service Fabric cluster that it should attempt to recover the system services that are currently stuck in quorum loss. @@ -7764,13 +8520,15 @@ def recover_system_partitions( api_version = "6.0" # Construct URL - url = self.recover_system_partitions.metadata['url'] + url = self.recover_system_partitions.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7787,10 +8545,10 @@ def recover_system_partitions( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - recover_system_partitions.metadata = {'url': '/$/RecoverSystemPartitions'} - def recover_all_partitions( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + recover_system_partitions.metadata = {"url": "/$/RecoverSystemPartitions"} + + def recover_all_partitions(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Indicates to the Service Fabric cluster that it should attempt to recover any services (including system services) which are currently stuck in quorum loss. @@ -7817,13 +8575,15 @@ def recover_all_partitions( api_version = "6.0" # Construct URL - url = self.recover_all_partitions.metadata['url'] + url = self.recover_all_partitions.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7840,10 +8600,19 @@ def recover_all_partitions( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - recover_all_partitions.metadata = {'url': '/$/RecoverAllPartitions'} + + recover_all_partitions.metadata = {"url": "/$/RecoverAllPartitions"} def move_primary_replica( - self, partition_id, node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + node_name=None, + ignore_constraints=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Moves the primary replica of a partition of a stateful service. This command moves the primary replica of a partition of a stateful @@ -7881,21 +8650,25 @@ def move_primary_replica( api_version = "6.5" # Construct URL - url = self.move_primary_replica.metadata['url'] + url = self.move_primary_replica.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if node_name is not None: - query_parameters['NodeName'] = self._serialize.query("node_name", node_name, 'str') + query_parameters["NodeName"] = self._serialize.query("node_name", node_name, "str") if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + query_parameters["IgnoreConstraints"] = self._serialize.query( + "ignore_constraints", ignore_constraints, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7912,10 +8685,20 @@ def move_primary_replica( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - move_primary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MovePrimaryReplica'} + + move_primary_replica.metadata = {"url": "/Partitions/{partitionId}/$/MovePrimaryReplica"} def move_secondary_replica( - self, partition_id, current_node_name, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + current_node_name, + new_node_name=None, + ignore_constraints=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Moves the secondary replica of a partition of a stateful service. This command moves the secondary replica of a partition of a stateful @@ -7958,22 +8741,26 @@ def move_secondary_replica( api_version = "6.5" # Construct URL - url = self.move_secondary_replica.metadata['url'] + url = self.move_secondary_replica.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["CurrentNodeName"] = self._serialize.query("current_node_name", current_node_name, "str") if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + query_parameters["NewNodeName"] = self._serialize.query("new_node_name", new_node_name, "str") if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + query_parameters["IgnoreConstraints"] = self._serialize.query( + "ignore_constraints", ignore_constraints, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -7990,10 +8777,19 @@ def move_secondary_replica( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - move_secondary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MoveSecondaryReplica'} + + move_secondary_replica.metadata = {"url": "/Partitions/{partitionId}/$/MoveSecondaryReplica"} def update_partition_load( - self, partition_metric_load_description_list, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_metric_load_description_list, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Update the loads of provided partitions for specific metrics. Updates the load value and predicted load value for all the partitions @@ -8039,27 +8835,31 @@ def update_partition_load( api_version = "7.2" # Construct URL - url = self.update_partition_load.metadata['url'] + url = self.update_partition_load.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') + body_content = self._serialize.body(partition_metric_load_description_list, "[PartitionMetricLoadDescription]") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8070,17 +8870,28 @@ def update_partition_load( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', response) + deserialized = self._deserialize("PagedUpdatePartitionLoadResultList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - update_partition_load.metadata = {'url': '/$/UpdatePartitionLoad'} + + update_partition_load.metadata = {"url": "/$/UpdatePartitionLoad"} def move_instance( - self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_id, + current_node_name=None, + new_node_name=None, + ignore_constraints=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Moves the instance of a partition of a stateless service. This command moves the instance of a partition of a stateless service, @@ -8133,24 +8944,28 @@ def move_instance( api_version = "8.0" # Construct URL - url = self.move_instance.metadata['url'] + url = self.move_instance.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if current_node_name is not None: - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + query_parameters["CurrentNodeName"] = self._serialize.query("current_node_name", current_node_name, "str") if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + query_parameters["NewNodeName"] = self._serialize.query("new_node_name", new_node_name, "str") if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + query_parameters["IgnoreConstraints"] = self._serialize.query( + "ignore_constraints", ignore_constraints, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -8167,10 +8982,21 @@ def move_instance( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - move_instance.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance'} + + move_instance.metadata = {"url": "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance"} def move_auxiliary_replica( - self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_id, + current_node_name=None, + new_node_name=None, + ignore_constraints=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Moves the auxiliary replica of a partition of a stateful service. This command moves the auxiliary replica of a partition of a stateful @@ -8221,24 +9047,28 @@ def move_auxiliary_replica( api_version = "8.1" # Construct URL - url = self.move_auxiliary_replica.metadata['url'] + url = self.move_auxiliary_replica.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if current_node_name is not None: - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + query_parameters["CurrentNodeName"] = self._serialize.query("current_node_name", current_node_name, "str") if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + query_parameters["NewNodeName"] = self._serialize.query("new_node_name", new_node_name, "str") if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + query_parameters["IgnoreConstraints"] = self._serialize.query( + "ignore_constraints", ignore_constraints, "bool" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -8255,10 +9085,12 @@ def move_auxiliary_replica( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - move_auxiliary_replica.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica'} - def create_repair_task( - self, repair_task, custom_headers=None, raw=False, **operation_config): + move_auxiliary_replica.metadata = { + "url": "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica" + } + + def create_repair_task(self, repair_task, custom_headers=None, raw=False, **operation_config): """Creates a new repair task. For clusters that have the Repair Manager Service configured, @@ -8293,21 +9125,21 @@ def create_repair_task( api_version = "6.0" # Construct URL - url = self.create_repair_task.metadata['url'] + url = self.create_repair_task.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(repair_task, 'RepairTask') + body_content = self._serialize.body(repair_task, "RepairTask") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8318,17 +9150,17 @@ def create_repair_task( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) + deserialized = self._deserialize("RepairTaskUpdateInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_repair_task.metadata = {'url': '/$/CreateRepairTask'} - def cancel_repair_task( - self, repair_task_cancel_description, custom_headers=None, raw=False, **operation_config): + create_repair_task.metadata = {"url": "/$/CreateRepairTask"} + + def cancel_repair_task(self, repair_task_cancel_description, custom_headers=None, raw=False, **operation_config): """Requests the cancellation of the given repair task. This API supports the Service Fabric platform; it is not meant to be @@ -8352,21 +9184,21 @@ def cancel_repair_task( api_version = "6.0" # Construct URL - url = self.cancel_repair_task.metadata['url'] + url = self.cancel_repair_task.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') + body_content = self._serialize.body(repair_task_cancel_description, "RepairTaskCancelDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8377,17 +9209,17 @@ def cancel_repair_task( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) + deserialized = self._deserialize("RepairTaskUpdateInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - cancel_repair_task.metadata = {'url': '/$/CancelRepairTask'} - def delete_repair_task( - self, task_id, version=None, custom_headers=None, raw=False, **operation_config): + cancel_repair_task.metadata = {"url": "/$/CancelRepairTask"} + + def delete_repair_task(self, task_id, version=None, custom_headers=None, raw=False, **operation_config): """Deletes a completed repair task. This API supports the Service Fabric platform; it is not meant to be @@ -8415,20 +9247,20 @@ def delete_repair_task( api_version = "6.0" # Construct URL - url = self.delete_repair_task.metadata['url'] + url = self.delete_repair_task.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(repair_task_delete_description, 'RepairTaskDeleteDescription') + body_content = self._serialize.body(repair_task_delete_description, "RepairTaskDeleteDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8440,10 +9272,18 @@ def delete_repair_task( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_repair_task.metadata = {'url': '/$/DeleteRepairTask'} + + delete_repair_task.metadata = {"url": "/$/DeleteRepairTask"} def get_repair_task_list( - self, task_id_filter=None, state_filter=None, executor_filter=None, custom_headers=None, raw=False, **operation_config): + self, + task_id_filter=None, + state_filter=None, + executor_filter=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets a list of repair tasks matching the given filters. This API supports the Service Fabric platform; it is not meant to be @@ -8478,21 +9318,21 @@ def get_repair_task_list( api_version = "6.0" # Construct URL - url = self.get_repair_task_list.metadata['url'] + url = self.get_repair_task_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if task_id_filter is not None: - query_parameters['TaskIdFilter'] = self._serialize.query("task_id_filter", task_id_filter, 'str') + query_parameters["TaskIdFilter"] = self._serialize.query("task_id_filter", task_id_filter, "str") if state_filter is not None: - query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') + query_parameters["StateFilter"] = self._serialize.query("state_filter", state_filter, "int") if executor_filter is not None: - query_parameters['ExecutorFilter'] = self._serialize.query("executor_filter", executor_filter, 'str') + query_parameters["ExecutorFilter"] = self._serialize.query("executor_filter", executor_filter, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -8505,17 +9345,17 @@ def get_repair_task_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[RepairTask]', response) + deserialized = self._deserialize("[RepairTask]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_repair_task_list.metadata = {'url': '/$/GetRepairTaskList'} - def force_approve_repair_task( - self, task_id, version=None, custom_headers=None, raw=False, **operation_config): + get_repair_task_list.metadata = {"url": "/$/GetRepairTaskList"} + + def force_approve_repair_task(self, task_id, version=None, custom_headers=None, raw=False, **operation_config): """Forces the approval of the given repair task. This API supports the Service Fabric platform; it is not meant to be @@ -8544,21 +9384,21 @@ def force_approve_repair_task( api_version = "6.0" # Construct URL - url = self.force_approve_repair_task.metadata['url'] + url = self.force_approve_repair_task.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(repair_task_approve_description, 'RepairTaskApproveDescription') + body_content = self._serialize.body(repair_task_approve_description, "RepairTaskApproveDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8569,17 +9409,19 @@ def force_approve_repair_task( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) + deserialized = self._deserialize("RepairTaskUpdateInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - force_approve_repair_task.metadata = {'url': '/$/ForceApproveRepairTask'} + + force_approve_repair_task.metadata = {"url": "/$/ForceApproveRepairTask"} def update_repair_task_health_policy( - self, repair_task_update_health_policy_description, custom_headers=None, raw=False, **operation_config): + self, repair_task_update_health_policy_description, custom_headers=None, raw=False, **operation_config + ): """Updates the health policy of the given repair task. This API supports the Service Fabric platform; it is not meant to be @@ -8603,21 +9445,23 @@ def update_repair_task_health_policy( api_version = "6.0" # Construct URL - url = self.update_repair_task_health_policy.metadata['url'] + url = self.update_repair_task_health_policy.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') + body_content = self._serialize.body( + repair_task_update_health_policy_description, "RepairTaskUpdateHealthPolicyDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8628,17 +9472,17 @@ def update_repair_task_health_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) + deserialized = self._deserialize("RepairTaskUpdateInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - update_repair_task_health_policy.metadata = {'url': '/$/UpdateRepairTaskHealthPolicy'} - def update_repair_execution_state( - self, repair_task, custom_headers=None, raw=False, **operation_config): + update_repair_task_health_policy.metadata = {"url": "/$/UpdateRepairTaskHealthPolicy"} + + def update_repair_execution_state(self, repair_task, custom_headers=None, raw=False, **operation_config): """Updates the execution state of a repair task. This API supports the Service Fabric platform; it is not meant to be @@ -8661,21 +9505,21 @@ def update_repair_execution_state( api_version = "6.0" # Construct URL - url = self.update_repair_execution_state.metadata['url'] + url = self.update_repair_execution_state.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(repair_task, 'RepairTask') + body_content = self._serialize.body(repair_task, "RepairTask") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -8686,17 +9530,19 @@ def update_repair_execution_state( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RepairTaskUpdateInfo', response) + deserialized = self._deserialize("RepairTaskUpdateInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - update_repair_execution_state.metadata = {'url': '/$/UpdateRepairExecutionState'} + + update_repair_execution_state.metadata = {"url": "/$/UpdateRepairExecutionState"} def get_replica_info_list( - self, partition_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the information about replicas of a Service Fabric service partition. @@ -8733,23 +9579,27 @@ def get_replica_info_list( api_version = "6.0" # Construct URL - url = self.get_replica_info_list.metadata['url'] + url = self.get_replica_info_list.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -8762,17 +9612,19 @@ def get_replica_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedReplicaInfoList', response) + deserialized = self._deserialize("PagedReplicaInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_replica_info_list.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas'} + + get_replica_info_list.metadata = {"url": "/Partitions/{partitionId}/$/GetReplicas"} def get_replica_info( - self, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the information about a replica of a Service Fabric partition. The response includes the ID, role, status, health, node name, uptime, @@ -8801,22 +9653,24 @@ def get_replica_info( api_version = "6.0" # Construct URL - url = self.get_replica_info.metadata['url'] + url = self.get_replica_info.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -8829,17 +9683,26 @@ def get_replica_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ReplicaInfo', response) + deserialized = self._deserialize("ReplicaInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_replica_info.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}'} + + get_replica_info.metadata = {"url": "/Partitions/{partitionId}/$/GetReplicas/{replicaId}"} def get_replica_health( - self, partition_id, replica_id, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + replica_id, + events_health_state_filter=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric stateful service replica or stateless service instance. @@ -8894,24 +9757,28 @@ def get_replica_health( api_version = "6.0" # Construct URL - url = self.get_replica_health.metadata['url'] + url = self.get_replica_health.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -8924,17 +9791,27 @@ def get_replica_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ReplicaHealth', response) + deserialized = self._deserialize("ReplicaHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} + + get_replica_health.metadata = {"url": "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} def get_replica_health_using_policy( - self, partition_id, replica_id, events_health_state_filter=0, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + replica_id, + events_health_state_filter=0, + application_health_policy=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the health of a Service Fabric stateful service replica or stateless service instance using the specified policy. @@ -9000,31 +9877,35 @@ def get_replica_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_replica_health_using_policy.metadata['url'] + url = self.get_replica_health_using_policy.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + body_content = self._serialize.body(application_health_policy, "ApplicationHealthPolicy") else: body_content = None @@ -9037,17 +9918,30 @@ def get_replica_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ReplicaHealth', response) + deserialized = self._deserialize("ReplicaHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_replica_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} + + get_replica_health_using_policy.metadata = { + "url": "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth" + } def report_replica_health( - self, partition_id, replica_id, health_information, service_kind="Stateful", immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + replica_id, + health_information, + service_kind="Stateful", + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric replica. Reports health state of the specified Service Fabric replica. The @@ -9115,30 +10009,32 @@ def report_replica_health( api_version = "6.0" # Construct URL - url = self.report_replica_health.metadata['url'] + url = self.report_replica_health.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceKind'] = self._serialize.query("service_kind", service_kind, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ServiceKind"] = self._serialize.query("service_kind", service_kind, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -9150,10 +10046,20 @@ def report_replica_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth'} + + report_replica_health.metadata = {"url": "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth"} def get_deployed_service_replica_info_list( - self, node_name, application_id, partition_id=None, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + partition_id=None, + service_manifest_name=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of replicas deployed on a Service Fabric node. Gets the list containing the information about replicas deployed on a @@ -9198,26 +10104,30 @@ def get_deployed_service_replica_info_list( api_version = "6.0" # Construct URL - url = self.get_deployed_service_replica_info_list.metadata['url'] + url = self.get_deployed_service_replica_info_list.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if partition_id is not None: - query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') + query_parameters["PartitionId"] = self._serialize.query("partition_id", partition_id, "str") if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -9230,17 +10140,21 @@ def get_deployed_service_replica_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceReplicaInfo]', response) + deserialized = self._deserialize("[DeployedServiceReplicaInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_replica_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas'} + + get_deployed_service_replica_info_list.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas" + } def get_deployed_service_replica_detail_info( - self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the details of replica deployed on a Service Fabric node. Gets the details of the replica deployed on a Service Fabric node. The @@ -9274,23 +10188,25 @@ def get_deployed_service_replica_detail_info( api_version = "6.0" # Construct URL - url = self.get_deployed_service_replica_detail_info.metadata['url'] + url = self.get_deployed_service_replica_detail_info.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -9303,17 +10219,21 @@ def get_deployed_service_replica_detail_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', response) + deserialized = self._deserialize("DeployedServiceReplicaDetailInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_replica_detail_info.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail'} + + get_deployed_service_replica_detail_info.metadata = { + "url": "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail" + } def get_deployed_service_replica_detail_info_by_partition_id( - self, node_name, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, node_name, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the details of replica deployed on a Service Fabric node. Gets the details of the replica deployed on a Service Fabric node. The @@ -9345,22 +10265,24 @@ def get_deployed_service_replica_detail_info_by_partition_id( api_version = "6.0" # Construct URL - url = self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'] + url = self.get_deployed_service_replica_detail_info_by_partition_id.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -9373,17 +10295,21 @@ def get_deployed_service_replica_detail_info_by_partition_id( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', response) + deserialized = self._deserialize("DeployedServiceReplicaDetailInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas'} + + get_deployed_service_replica_detail_info_by_partition_id.metadata = { + "url": "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas" + } def restart_replica( - self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Restarts a service replica of a persisted service running on a node. Restarts a service replica of a persisted service running on a node. @@ -9415,19 +10341,21 @@ def restart_replica( api_version = "6.0" # Construct URL - url = self.restart_replica.metadata['url'] + url = self.restart_replica.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -9444,10 +10372,22 @@ def restart_replica( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - restart_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart'} + + restart_replica.metadata = { + "url": "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart" + } def remove_replica( - self, node_name, partition_id, replica_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + partition_id, + replica_id, + force_remove=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Removes a service replica running on a node. This API simulates a Service Fabric replica failure by removing a @@ -9490,21 +10430,23 @@ def remove_replica( api_version = "6.0" # Construct URL - url = self.remove_replica.metadata['url'] + url = self.remove_replica.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') + query_parameters["ForceRemove"] = self._serialize.query("force_remove", force_remove, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -9521,10 +10463,14 @@ def remove_replica( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - remove_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete'} + + remove_replica.metadata = { + "url": "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete" + } def get_deployed_service_package_info_list( - self, node_name, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, node_name, application_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the list of service packages deployed on a Service Fabric node. Returns the information about the service packages deployed on a @@ -9560,22 +10506,24 @@ def get_deployed_service_package_info_list( api_version = "6.0" # Construct URL - url = self.get_deployed_service_package_info_list.metadata['url'] + url = self.get_deployed_service_package_info_list.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -9588,17 +10536,28 @@ def get_deployed_service_package_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', response) + deserialized = self._deserialize("[DeployedServicePackageInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages'} + + get_deployed_service_package_info_list.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages" + } def get_deployed_service_package_info_list_by_name( - self, node_name, application_id, service_package_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_package_name, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of service packages deployed on a Service Fabric node matching exactly the specified name. @@ -9639,23 +10598,27 @@ def get_deployed_service_package_info_list_by_name( api_version = "6.0" # Construct URL - url = self.get_deployed_service_package_info_list_by_name.metadata['url'] + url = self.get_deployed_service_package_info_list_by_name.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), + "servicePackageName": self._serialize.url( + "service_package_name", service_package_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -9668,17 +10631,29 @@ def get_deployed_service_package_info_list_by_name( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', response) + deserialized = self._deserialize("[DeployedServicePackageInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_package_info_list_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}'} + + get_deployed_service_package_info_list_by_name.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}" + } def get_deployed_service_package_health( - self, node_name, application_id, service_package_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_package_name, + events_health_state_filter=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about health of a service package for a specific application deployed for a Service Fabric node and application. @@ -9744,25 +10719,31 @@ def get_deployed_service_package_health( api_version = "6.0" # Construct URL - url = self.get_deployed_service_package_health.metadata['url'] + url = self.get_deployed_service_package_health.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), + "servicePackageName": self._serialize.url( + "service_package_name", service_package_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -9775,17 +10756,30 @@ def get_deployed_service_package_health( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedServicePackageHealth', response) + deserialized = self._deserialize("DeployedServicePackageHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} + + get_deployed_service_package_health.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth" + } def get_deployed_service_package_health_using_policy( - self, node_name, application_id, service_package_name, events_health_state_filter=0, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_package_name, + events_health_state_filter=0, + application_health_policy=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy. @@ -9862,32 +10856,38 @@ def get_deployed_service_package_health_using_policy( api_version = "6.0" # Construct URL - url = self.get_deployed_service_package_health_using_policy.metadata['url'] + url = self.get_deployed_service_package_health_using_policy.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), + "servicePackageName": self._serialize.url( + "service_package_name", service_package_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + query_parameters["EventsHealthStateFilter"] = self._serialize.query( + "events_health_state_filter", events_health_state_filter, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + body_content = self._serialize.body(application_health_policy, "ApplicationHealthPolicy") else: body_content = None @@ -9900,17 +10900,30 @@ def get_deployed_service_package_health_using_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DeployedServicePackageHealth', response) + deserialized = self._deserialize("DeployedServicePackageHealth", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_service_package_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} + + get_deployed_service_package_health_using_policy.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth" + } def report_deployed_service_package_health( - self, node_name, application_id, service_package_name, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_package_name, + health_information, + immediate=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Sends a health report on the Service Fabric deployed service package. Reports health state of the service package of the application deployed @@ -9982,30 +10995,34 @@ def report_deployed_service_package_health( api_version = "6.0" # Construct URL - url = self.report_deployed_service_package_health.metadata['url'] + url = self.report_deployed_service_package_health.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), + "servicePackageName": self._serialize.url( + "service_package_name", service_package_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + query_parameters["Immediate"] = self._serialize.query("immediate", immediate, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') + body_content = self._serialize.body(health_information, "HealthInformation") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -10017,10 +11034,20 @@ def report_deployed_service_package_health( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - report_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth'} + + report_deployed_service_package_health.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth" + } def deploy_service_package_to_node( - self, node_name, deploy_service_package_to_node_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + deploy_service_package_to_node_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Downloads all of the code packages associated with specified service manifest on the specified node. @@ -10055,26 +11082,28 @@ def deploy_service_package_to_node( api_version = "6.0" # Construct URL - url = self.deploy_service_package_to_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.deploy_service_package_to_node.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') + body_content = self._serialize.body( + deploy_service_package_to_node_description, "DeployServicePackageToNodeDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -10086,10 +11115,20 @@ def deploy_service_package_to_node( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - deploy_service_package_to_node.metadata = {'url': '/Nodes/{nodeName}/$/DeployServicePackage'} + + deploy_service_package_to_node.metadata = {"url": "/Nodes/{nodeName}/$/DeployServicePackage"} def get_deployed_code_package_info_list( - self, node_name, application_id, service_manifest_name=None, code_package_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_manifest_name=None, + code_package_name=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of code packages deployed on a Service Fabric node. Gets the list of code packages deployed on a Service Fabric node for @@ -10132,26 +11171,30 @@ def get_deployed_code_package_info_list( api_version = "6.0" # Construct URL - url = self.get_deployed_code_package_info_list.metadata['url'] + url = self.get_deployed_code_package_info_list.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) if code_package_name is not None: - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') + query_parameters["CodePackageName"] = self._serialize.query("code_package_name", code_package_name, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -10164,17 +11207,28 @@ def get_deployed_code_package_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[DeployedCodePackageInfo]', response) + deserialized = self._deserialize("[DeployedCodePackageInfo]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_deployed_code_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages'} + + get_deployed_code_package_info_list.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages" + } def restart_deployed_code_package( - self, node_name, application_id, restart_deployed_code_package_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + restart_deployed_code_package_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Restarts a code package deployed on a Service Fabric node in a cluster. Restarts a code package deployed on a Service Fabric node in a cluster. @@ -10214,27 +11268,31 @@ def restart_deployed_code_package( api_version = "6.0" # Construct URL - url = self.restart_deployed_code_package.metadata['url'] + url = self.restart_deployed_code_package.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') + body_content = self._serialize.body( + restart_deployed_code_package_description, "RestartDeployedCodePackageDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -10246,10 +11304,24 @@ def restart_deployed_code_package( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - restart_deployed_code_package.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart'} + + restart_deployed_code_package.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart" + } def get_container_logs_deployed_on_node( - self, node_name, application_id, service_manifest_name, code_package_name, tail=None, previous=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_manifest_name, + code_package_name, + tail=None, + previous=False, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the container logs for container deployed on a Service Fabric node. @@ -10299,28 +11371,32 @@ def get_container_logs_deployed_on_node( api_version = "6.2" # Construct URL - url = self.get_container_logs_deployed_on_node.metadata['url'] + url = self.get_container_logs_deployed_on_node.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) + query_parameters["CodePackageName"] = self._serialize.query("code_package_name", code_package_name, "str") if tail is not None: - query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') + query_parameters["Tail"] = self._serialize.query("tail", tail, "str") if previous is not None: - query_parameters['Previous'] = self._serialize.query("previous", previous, 'bool') + query_parameters["Previous"] = self._serialize.query("previous", previous, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -10333,17 +11409,31 @@ def get_container_logs_deployed_on_node( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ContainerLogs', response) + deserialized = self._deserialize("ContainerLogs", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_container_logs_deployed_on_node.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs'} + + get_container_logs_deployed_on_node.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs" + } def invoke_container_api( - self, node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + application_id, + service_manifest_name, + code_package_name, + code_package_instance_id, + container_api_request_body, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Invoke container API on a container deployed on a Service Fabric node. Invoke container API on a container deployed on a Service Fabric node @@ -10393,31 +11483,37 @@ def invoke_container_api( api_version = "6.2" # Construct URL - url = self.invoke_container_api.metadata['url'] + url = self.invoke_container_api.metadata["url"] path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "nodeName": self._serialize.url("node_name", node_name, "str"), + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - query_parameters['CodePackageInstanceId'] = self._serialize.query("code_package_instance_id", code_package_instance_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["ServiceManifestName"] = self._serialize.query( + "service_manifest_name", service_manifest_name, "str" + ) + query_parameters["CodePackageName"] = self._serialize.query("code_package_name", code_package_name, "str") + query_parameters["CodePackageInstanceId"] = self._serialize.query( + "code_package_instance_id", code_package_instance_id, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') + body_content = self._serialize.body(container_api_request_body, "ContainerApiRequestBody") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -10428,17 +11524,21 @@ def invoke_container_api( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ContainerApiResponse', response) + deserialized = self._deserialize("ContainerApiResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - invoke_container_api.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi'} + + invoke_container_api.metadata = { + "url": "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi" + } def create_compose_deployment( - self, create_compose_deployment_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, create_compose_deployment_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Creates a Service Fabric compose deployment. Compose is a file format that describes multi-container applications. @@ -10469,22 +11569,24 @@ def create_compose_deployment( api_version = "6.0-preview" # Construct URL - url = self.create_compose_deployment.metadata['url'] + url = self.create_compose_deployment.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') + body_content = self._serialize.body(create_compose_deployment_description, "CreateComposeDeploymentDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -10496,10 +11598,12 @@ def create_compose_deployment( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - create_compose_deployment.metadata = {'url': '/ComposeDeployments/$/Create'} + + create_compose_deployment.metadata = {"url": "/ComposeDeployments/$/Create"} def get_compose_deployment_status( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets information about a Service Fabric compose deployment. Returns the status of the compose deployment that was created or in the @@ -10528,21 +11632,23 @@ def get_compose_deployment_status( api_version = "6.0-preview" # Construct URL - url = self.get_compose_deployment_status.metadata['url'] + url = self.get_compose_deployment_status.metadata["url"] path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + "deploymentName": self._serialize.url("deployment_name", deployment_name, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -10555,17 +11661,19 @@ def get_compose_deployment_status( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ComposeDeploymentStatusInfo', response) + deserialized = self._deserialize("ComposeDeploymentStatusInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_compose_deployment_status.metadata = {'url': '/ComposeDeployments/{deploymentName}'} + + get_compose_deployment_status.metadata = {"url": "/ComposeDeployments/{deploymentName}"} def get_compose_deployment_status_list( - self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the list of compose deployments created in the Service Fabric cluster. @@ -10613,21 +11721,25 @@ def get_compose_deployment_status_list( api_version = "6.0-preview" # Construct URL - url = self.get_compose_deployment_status_list.metadata['url'] + url = self.get_compose_deployment_status_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -10640,17 +11752,19 @@ def get_compose_deployment_status_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', response) + deserialized = self._deserialize("PagedComposeDeploymentStatusInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_compose_deployment_status_list.metadata = {'url': '/ComposeDeployments'} + + get_compose_deployment_status_list.metadata = {"url": "/ComposeDeployments"} def get_compose_deployment_upgrade_progress( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets details for the latest upgrade performed on this Service Fabric compose deployment. @@ -10680,21 +11794,23 @@ def get_compose_deployment_upgrade_progress( api_version = "6.0-preview" # Construct URL - url = self.get_compose_deployment_upgrade_progress.metadata['url'] + url = self.get_compose_deployment_upgrade_progress.metadata["url"] path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + "deploymentName": self._serialize.url("deployment_name", deployment_name, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -10707,17 +11823,21 @@ def get_compose_deployment_upgrade_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', response) + deserialized = self._deserialize("ComposeDeploymentUpgradeProgressInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_compose_deployment_upgrade_progress.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress'} + + get_compose_deployment_upgrade_progress.metadata = { + "url": "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress" + } def remove_compose_deployment( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Deletes an existing Service Fabric compose deployment from cluster. Deletes an existing Service Fabric compose deployment. @@ -10742,17 +11862,19 @@ def remove_compose_deployment( api_version = "6.0-preview" # Construct URL - url = self.remove_compose_deployment.metadata['url'] + url = self.remove_compose_deployment.metadata["url"] path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + "deploymentName": self._serialize.url("deployment_name", deployment_name, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -10769,10 +11891,18 @@ def remove_compose_deployment( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - remove_compose_deployment.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Delete'} + + remove_compose_deployment.metadata = {"url": "/ComposeDeployments/{deploymentName}/$/Delete"} def start_compose_deployment_upgrade( - self, deployment_name, compose_deployment_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + deployment_name, + compose_deployment_upgrade_description, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Starts upgrading a compose deployment in the Service Fabric cluster. Validates the supplied upgrade parameters and starts upgrading the @@ -10802,26 +11932,30 @@ def start_compose_deployment_upgrade( api_version = "6.0-preview" # Construct URL - url = self.start_compose_deployment_upgrade.metadata['url'] + url = self.start_compose_deployment_upgrade.metadata["url"] path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + "deploymentName": self._serialize.url("deployment_name", deployment_name, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') + body_content = self._serialize.body( + compose_deployment_upgrade_description, "ComposeDeploymentUpgradeDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -10833,10 +11967,12 @@ def start_compose_deployment_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Upgrade'} + + start_compose_deployment_upgrade.metadata = {"url": "/ComposeDeployments/{deploymentName}/$/Upgrade"} def start_rollback_compose_deployment_upgrade( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. @@ -10862,17 +11998,19 @@ def start_rollback_compose_deployment_upgrade( api_version = "6.4-preview" # Construct URL - url = self.start_rollback_compose_deployment_upgrade.metadata['url'] + url = self.start_rollback_compose_deployment_upgrade.metadata["url"] path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + "deploymentName": self._serialize.url("deployment_name", deployment_name, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -10889,10 +12027,12 @@ def start_rollback_compose_deployment_upgrade( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_rollback_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/RollbackUpgrade'} - def get_chaos( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + start_rollback_compose_deployment_upgrade.metadata = { + "url": "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade" + } + + def get_chaos(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the status of Chaos. Get the status of Chaos indicating whether or not Chaos is running, the @@ -10918,17 +12058,19 @@ def get_chaos( api_version = "6.2" # Construct URL - url = self.get_chaos.metadata['url'] + url = self.get_chaos.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -10941,17 +12083,17 @@ def get_chaos( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Chaos', response) + deserialized = self._deserialize("Chaos", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_chaos.metadata = {'url': '/Tools/Chaos'} - def start_chaos( - self, chaos_parameters, timeout=60, custom_headers=None, raw=False, **operation_config): + get_chaos.metadata = {"url": "/Tools/Chaos"} + + def start_chaos(self, chaos_parameters, timeout=60, custom_headers=None, raw=False, **operation_config): """Starts Chaos in the cluster. If Chaos is not already running in the cluster, it starts Chaos with @@ -10983,22 +12125,24 @@ def start_chaos( api_version = "6.0" # Construct URL - url = self.start_chaos.metadata['url'] + url = self.start_chaos.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(chaos_parameters, 'ChaosParameters') + body_content = self._serialize.body(chaos_parameters, "ChaosParameters") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -11010,10 +12154,10 @@ def start_chaos( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_chaos.metadata = {'url': '/Tools/Chaos/$/Start'} - def stop_chaos( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + start_chaos.metadata = {"url": "/Tools/Chaos/$/Start"} + + def stop_chaos(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. @@ -11042,13 +12186,15 @@ def stop_chaos( api_version = "6.0" # Construct URL - url = self.stop_chaos.metadata['url'] + url = self.stop_chaos.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -11065,10 +12211,20 @@ def stop_chaos( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - stop_chaos.metadata = {'url': '/Tools/Chaos/$/Stop'} + + stop_chaos.metadata = {"url": "/Tools/Chaos/$/Stop"} def get_chaos_events( - self, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + continuation_token=None, + start_time_utc=None, + end_time_utc=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the next segment of the Chaos events based on the continuation token or the time range. @@ -11129,25 +12285,29 @@ def get_chaos_events( api_version = "6.2" # Construct URL - url = self.get_chaos_events.metadata['url'] + url = self.get_chaos_events.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if start_time_utc is not None: - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") if end_time_utc is not None: - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11160,17 +12320,17 @@ def get_chaos_events( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ChaosEventsSegment', response) + deserialized = self._deserialize("ChaosEventsSegment", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_chaos_events.metadata = {'url': '/Tools/Chaos/Events'} - def get_chaos_schedule( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_chaos_events.metadata = {"url": "/Tools/Chaos/Events"} + + def get_chaos_schedule(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the Chaos Schedule defining when and how to run Chaos. Gets the version of the Chaos Schedule in use and the Chaos Schedule @@ -11195,17 +12355,19 @@ def get_chaos_schedule( api_version = "6.2" # Construct URL - url = self.get_chaos_schedule.metadata['url'] + url = self.get_chaos_schedule.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11218,17 +12380,19 @@ def get_chaos_schedule( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ChaosScheduleDescription', response) + deserialized = self._deserialize("ChaosScheduleDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} + + get_chaos_schedule.metadata = {"url": "/Tools/Chaos/Schedule"} def post_chaos_schedule( - self, timeout=60, version=None, schedule=None, custom_headers=None, raw=False, **operation_config): + self, timeout=60, version=None, schedule=None, custom_headers=None, raw=False, **operation_config + ): """Set the schedule used by Chaos. Chaos will automatically schedule runs based on the Chaos Schedule. @@ -11264,22 +12428,24 @@ def post_chaos_schedule( api_version = "6.2" # Construct URL - url = self.post_chaos_schedule.metadata['url'] + url = self.post_chaos_schedule.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(chaos_schedule, 'ChaosScheduleDescription') + body_content = self._serialize.body(chaos_schedule, "ChaosScheduleDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -11291,10 +12457,10 @@ def post_chaos_schedule( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - post_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} - def upload_file( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + post_chaos_schedule.metadata = {"url": "/Tools/Chaos/Schedule"} + + def upload_file(self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): """Uploads contents of the file to the image store. Uploads contents of the file to the image store. Use this API if the @@ -11330,17 +12496,17 @@ def upload_file( api_version = "6.0" # Construct URL - url = self.upload_file.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } + url = self.upload_file.metadata["url"] + path_format_arguments = {"contentPath": self._serialize.url("content_path", content_path, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -11357,10 +12523,10 @@ def upload_file( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - upload_file.metadata = {'url': '/ImageStore/{contentPath}'} - def get_image_store_content( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + upload_file.metadata = {"url": "/ImageStore/{contentPath}"} + + def get_image_store_content(self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the image store content information. Returns the information about the image store content at the specified @@ -11389,21 +12555,21 @@ def get_image_store_content( api_version = "6.2" # Construct URL - url = self.get_image_store_content.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } + url = self.get_image_store_content.metadata["url"] + path_format_arguments = {"contentPath": self._serialize.url("content_path", content_path, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11416,17 +12582,17 @@ def get_image_store_content( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageStoreContent', response) + deserialized = self._deserialize("ImageStoreContent", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} - def delete_image_store_content( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + get_image_store_content.metadata = {"url": "/ImageStore/{contentPath}"} + + def delete_image_store_content(self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): """Deletes existing image store content. Deletes existing image store content being found within the given image @@ -11454,17 +12620,17 @@ def delete_image_store_content( api_version = "6.0" # Construct URL - url = self.delete_image_store_content.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } + url = self.delete_image_store_content.metadata["url"] + path_format_arguments = {"contentPath": self._serialize.url("content_path", content_path, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -11481,10 +12647,10 @@ def delete_image_store_content( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} - def get_image_store_root_content( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + delete_image_store_content.metadata = {"url": "/ImageStore/{contentPath}"} + + def get_image_store_root_content(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the content information at the root of the image store. Returns the information about the image store content at the root of @@ -11509,17 +12675,19 @@ def get_image_store_root_content( api_version = "6.0" # Construct URL - url = self.get_image_store_root_content.metadata['url'] + url = self.get_image_store_root_content.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11532,17 +12700,19 @@ def get_image_store_root_content( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageStoreContent', response) + deserialized = self._deserialize("ImageStoreContent", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_root_content.metadata = {'url': '/ImageStore'} + + get_image_store_root_content.metadata = {"url": "/ImageStore"} def copy_image_store_content( - self, image_store_copy_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, image_store_copy_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Copies image store content internally. Copies the image store content from the source image store relative @@ -11570,22 +12740,24 @@ def copy_image_store_content( api_version = "6.0" # Construct URL - url = self.copy_image_store_content.metadata['url'] + url = self.copy_image_store_content.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') + body_content = self._serialize.body(image_store_copy_description, "ImageStoreCopyDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -11597,10 +12769,12 @@ def copy_image_store_content( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - copy_image_store_content.metadata = {'url': '/ImageStore/$/Copy'} + + copy_image_store_content.metadata = {"url": "/ImageStore/$/Copy"} def delete_image_store_upload_session( - self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Cancels an image store upload session. The DELETE request will cause the existing upload session to expire and @@ -11628,14 +12802,16 @@ def delete_image_store_upload_session( api_version = "6.0" # Construct URL - url = self.delete_image_store_upload_session.metadata['url'] + url = self.delete_image_store_upload_session.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["session-id"] = self._serialize.query("session_id", session_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -11652,10 +12828,12 @@ def delete_image_store_upload_session( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_image_store_upload_session.metadata = {'url': '/ImageStore/$/DeleteUploadSession'} + + delete_image_store_upload_session.metadata = {"url": "/ImageStore/$/DeleteUploadSession"} def commit_image_store_upload_session( - self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Commit an image store upload session. When all file chunks have been uploaded, the upload session needs to be @@ -11685,14 +12863,16 @@ def commit_image_store_upload_session( api_version = "6.0" # Construct URL - url = self.commit_image_store_upload_session.metadata['url'] + url = self.commit_image_store_upload_session.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["session-id"] = self._serialize.query("session_id", session_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -11709,10 +12889,12 @@ def commit_image_store_upload_session( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - commit_image_store_upload_session.metadata = {'url': '/ImageStore/$/CommitUploadSession'} + + commit_image_store_upload_session.metadata = {"url": "/ImageStore/$/CommitUploadSession"} def get_image_store_upload_session_by_id( - self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Get the image store upload session by ID. Gets the image store upload session identified by the given ID. User @@ -11741,18 +12923,20 @@ def get_image_store_upload_session_by_id( api_version = "6.0" # Construct URL - url = self.get_image_store_upload_session_by_id.metadata['url'] + url = self.get_image_store_upload_session_by_id.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["session-id"] = self._serialize.query("session_id", session_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11765,17 +12949,19 @@ def get_image_store_upload_session_by_id( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UploadSession', response) + deserialized = self._deserialize("UploadSession", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_upload_session_by_id.metadata = {'url': '/ImageStore/$/GetUploadSession'} + + get_image_store_upload_session_by_id.metadata = {"url": "/ImageStore/$/GetUploadSession"} def get_image_store_upload_session_by_path( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Get the image store upload session by relative path. Gets the image store upload session associated with the given image @@ -11804,21 +12990,21 @@ def get_image_store_upload_session_by_path( api_version = "6.0" # Construct URL - url = self.get_image_store_upload_session_by_path.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } + url = self.get_image_store_upload_session_by_path.metadata["url"] + path_format_arguments = {"contentPath": self._serialize.url("content_path", content_path, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11831,17 +13017,19 @@ def get_image_store_upload_session_by_path( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('UploadSession', response) + deserialized = self._deserialize("UploadSession", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_upload_session_by_path.metadata = {'url': '/ImageStore/{contentPath}/$/GetUploadSession'} + + get_image_store_upload_session_by_path.metadata = {"url": "/ImageStore/{contentPath}/$/GetUploadSession"} def upload_file_chunk( - self, content_path, session_id, content_range, timeout=60, custom_headers=None, raw=False, **operation_config): + self, content_path, session_id, content_range, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Uploads a file chunk to the image store relative path. Uploads a file chunk to the image store with the specified upload @@ -11888,24 +13076,24 @@ def upload_file_chunk( api_version = "6.0" # Construct URL - url = self.upload_file_chunk.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } + url = self.upload_file_chunk.metadata["url"] + path_format_arguments = {"contentPath": self._serialize.url("content_path", content_path, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["session-id"] = self._serialize.query("session_id", session_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} if custom_headers: header_parameters.update(custom_headers) - header_parameters['Content-Range'] = self._serialize.header("content_range", content_range, 'str') + header_parameters["Content-Range"] = self._serialize.header("content_range", content_range, "str") # Construct and send request request = self._client.put(url, query_parameters, header_parameters) @@ -11917,10 +13105,10 @@ def upload_file_chunk( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - upload_file_chunk.metadata = {'url': '/ImageStore/{contentPath}/$/UploadChunk'} - def get_image_store_root_folder_size( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + upload_file_chunk.metadata = {"url": "/ImageStore/{contentPath}/$/UploadChunk"} + + def get_image_store_root_folder_size(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the folder size at the root of the image store. Returns the total size of files at the root and children folders in @@ -11945,17 +13133,19 @@ def get_image_store_root_folder_size( api_version = "6.5" # Construct URL - url = self.get_image_store_root_folder_size.metadata['url'] + url = self.get_image_store_root_folder_size.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -11968,17 +13158,17 @@ def get_image_store_root_folder_size( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('FolderSizeInfo', response) + deserialized = self._deserialize("FolderSizeInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_root_folder_size.metadata = {'url': '/ImageStore/$/FolderSize'} - def get_image_store_folder_size( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + get_image_store_root_folder_size.metadata = {"url": "/ImageStore/$/FolderSize"} + + def get_image_store_folder_size(self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): """Get the size of a folder in image store. Gets the total size of file under a image store folder, specified by @@ -12007,21 +13197,21 @@ def get_image_store_folder_size( api_version = "6.5" # Construct URL - url = self.get_image_store_folder_size.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } + url = self.get_image_store_folder_size.metadata["url"] + path_format_arguments = {"contentPath": self._serialize.url("content_path", content_path, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12034,17 +13224,17 @@ def get_image_store_folder_size( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('FolderSizeInfo', response) + deserialized = self._deserialize("FolderSizeInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_folder_size.metadata = {'url': '/ImageStore/{contentPath}/$/FolderSize'} - def get_image_store_info( - self, timeout=60, custom_headers=None, raw=False, **operation_config): + get_image_store_folder_size.metadata = {"url": "/ImageStore/{contentPath}/$/FolderSize"} + + def get_image_store_info(self, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the overall ImageStore information. Returns information about the primary ImageStore replica, such as disk @@ -12070,17 +13260,19 @@ def get_image_store_info( api_version = "6.5" # Construct URL - url = self.get_image_store_info.metadata['url'] + url = self.get_image_store_info.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12093,17 +13285,19 @@ def get_image_store_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageStoreInfo', response) + deserialized = self._deserialize("ImageStoreInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_store_info.metadata = {'url': '/ImageStore/$/Info'} + + get_image_store_info.metadata = {"url": "/ImageStore/$/Info"} def invoke_infrastructure_command( - self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Invokes an administrative command on the given Infrastructure Service instance. @@ -12144,20 +13338,22 @@ def invoke_infrastructure_command( api_version = "6.0" # Construct URL - url = self.invoke_infrastructure_command.metadata['url'] + url = self.invoke_infrastructure_command.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Command'] = self._serialize.query("command", command, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["Command"] = self._serialize.query("command", command, "str") if service_id is not None: - query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') + query_parameters["ServiceId"] = self._serialize.query("service_id", service_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12170,17 +13366,19 @@ def invoke_infrastructure_command( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', response) + deserialized = self._deserialize("str", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - invoke_infrastructure_command.metadata = {'url': '/$/InvokeInfrastructureCommand'} + + invoke_infrastructure_command.metadata = {"url": "/$/InvokeInfrastructureCommand"} def invoke_infrastructure_query( - self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Invokes a read-only query on the given infrastructure service instance. For clusters that have one or more instances of the Infrastructure @@ -12220,20 +13418,22 @@ def invoke_infrastructure_query( api_version = "6.0" # Construct URL - url = self.invoke_infrastructure_query.metadata['url'] + url = self.invoke_infrastructure_query.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Command'] = self._serialize.query("command", command, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["Command"] = self._serialize.query("command", command, "str") if service_id is not None: - query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') + query_parameters["ServiceId"] = self._serialize.query("service_id", service_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12246,17 +13446,27 @@ def invoke_infrastructure_query( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', response) + deserialized = self._deserialize("str", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - invoke_infrastructure_query.metadata = {'url': '/$/InvokeInfrastructureQuery'} + + invoke_infrastructure_query.metadata = {"url": "/$/InvokeInfrastructureQuery"} def start_data_loss( - self, service_id, partition_id, operation_id, data_loss_mode, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_id, + operation_id, + data_loss_mode, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """This API will induce data loss for the specified partition. It will trigger a call to the OnDataLossAsync API of the partition. @@ -12313,20 +13523,22 @@ def start_data_loss( api_version = "6.0" # Construct URL - url = self.start_data_loss.metadata['url'] + url = self.start_data_loss.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['DataLossMode'] = self._serialize.query("data_loss_mode", data_loss_mode, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") + query_parameters["DataLossMode"] = self._serialize.query("data_loss_mode", data_loss_mode, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -12343,10 +13555,12 @@ def start_data_loss( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_data_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'} + + start_data_loss.metadata = {"url": "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss"} def get_data_loss_progress( - self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the progress of a partition data loss operation started using the StartDataLoss API. @@ -12385,23 +13599,25 @@ def get_data_loss_progress( api_version = "6.0" # Construct URL - url = self.get_data_loss_progress.metadata['url'] + url = self.get_data_loss_progress.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12414,17 +13630,30 @@ def get_data_loss_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionDataLossProgress', response) + deserialized = self._deserialize("PartitionDataLossProgress", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_data_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'} + + get_data_loss_progress.metadata = { + "url": "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress" + } def start_quorum_loss( - self, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_id, + operation_id, + quorum_loss_mode, + quorum_loss_duration, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Induces quorum loss for a given stateful service partition. This API is useful for a temporary quorum loss situation on your @@ -12475,21 +13704,25 @@ def start_quorum_loss( api_version = "6.0" # Construct URL - url = self.start_quorum_loss.metadata['url'] + url = self.start_quorum_loss.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['QuorumLossMode'] = self._serialize.query("quorum_loss_mode", quorum_loss_mode, 'str') - query_parameters['QuorumLossDuration'] = self._serialize.query("quorum_loss_duration", quorum_loss_duration, 'int') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") + query_parameters["QuorumLossMode"] = self._serialize.query("quorum_loss_mode", quorum_loss_mode, "str") + query_parameters["QuorumLossDuration"] = self._serialize.query( + "quorum_loss_duration", quorum_loss_duration, "int" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -12506,10 +13739,12 @@ def start_quorum_loss( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_quorum_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'} + + start_quorum_loss.metadata = {"url": "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss"} def get_quorum_loss_progress( - self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss API. @@ -12548,23 +13783,25 @@ def get_quorum_loss_progress( api_version = "6.0" # Construct URL - url = self.get_quorum_loss_progress.metadata['url'] + url = self.get_quorum_loss_progress.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12577,17 +13814,29 @@ def get_quorum_loss_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionQuorumLossProgress', response) + deserialized = self._deserialize("PartitionQuorumLossProgress", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_quorum_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'} + + get_quorum_loss_progress.metadata = { + "url": "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress" + } def start_partition_restart( - self, service_id, partition_id, operation_id, restart_partition_mode, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + partition_id, + operation_id, + restart_partition_mode, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """This API will restart some or all replicas or instances of the specified partition. @@ -12633,20 +13882,24 @@ def start_partition_restart( api_version = "6.0" # Construct URL - url = self.start_partition_restart.metadata['url'] + url = self.start_partition_restart.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['RestartPartitionMode'] = self._serialize.query("restart_partition_mode", restart_partition_mode, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") + query_parameters["RestartPartitionMode"] = self._serialize.query( + "restart_partition_mode", restart_partition_mode, "str" + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -12663,10 +13916,14 @@ def start_partition_restart( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_partition_restart.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'} + + start_partition_restart.metadata = { + "url": "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart" + } def get_partition_restart_progress( - self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. @@ -12705,23 +13962,25 @@ def get_partition_restart_progress( api_version = "6.0" # Construct URL - url = self.get_partition_restart_progress.metadata['url'] + url = self.get_partition_restart_progress.metadata["url"] path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True), + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12734,17 +13993,30 @@ def get_partition_restart_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionRestartProgress', response) + deserialized = self._deserialize("PartitionRestartProgress", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_restart_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'} + + get_partition_restart_progress.metadata = { + "url": "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress" + } def start_node_transition( - self, node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + node_name, + operation_id, + node_transition_type, + node_instance_id, + stop_duration_in_seconds, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Starts or stops a cluster node. Starts or stops a cluster node. A cluster node is a process, not the @@ -12792,21 +14064,25 @@ def start_node_transition( api_version = "6.0" # Construct URL - url = self.start_node_transition.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.start_node_transition.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['NodeTransitionType'] = self._serialize.query("node_transition_type", node_transition_type, 'str') - query_parameters['NodeInstanceId'] = self._serialize.query("node_instance_id", node_instance_id, 'str') - query_parameters['StopDurationInSeconds'] = self._serialize.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") + query_parameters["NodeTransitionType"] = self._serialize.query( + "node_transition_type", node_transition_type, "str" + ) + query_parameters["NodeInstanceId"] = self._serialize.query("node_instance_id", node_instance_id, "str") + query_parameters["StopDurationInSeconds"] = self._serialize.query( + "stop_duration_in_seconds", stop_duration_in_seconds, "int", minimum=0 + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -12823,10 +14099,12 @@ def start_node_transition( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_node_transition.metadata = {'url': '/Faults/Nodes/{nodeName}/$/StartTransition/'} + + start_node_transition.metadata = {"url": "/Faults/Nodes/{nodeName}/$/StartTransition/"} def get_node_transition_progress( - self, node_name, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, node_name, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the progress of an operation started using StartNodeTransition. Gets the progress of an operation started with StartNodeTransition @@ -12856,22 +14134,22 @@ def get_node_transition_progress( api_version = "6.0" # Construct URL - url = self.get_node_transition_progress.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_node_transition_progress.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12884,17 +14162,19 @@ def get_node_transition_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NodeTransitionProgress', response) + deserialized = self._deserialize("NodeTransitionProgress", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_transition_progress.metadata = {'url': '/Faults/Nodes/{nodeName}/$/GetTransitionProgress'} + + get_node_transition_progress.metadata = {"url": "/Faults/Nodes/{nodeName}/$/GetTransitionProgress"} def get_fault_operation_list( - self, type_filter=65535, state_filter=65535, timeout=60, custom_headers=None, raw=False, **operation_config): + self, type_filter=65535, state_filter=65535, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets a list of user-induced fault operations filtered by provided input. @@ -12938,19 +14218,21 @@ def get_fault_operation_list( api_version = "6.0" # Construct URL - url = self.get_fault_operation_list.metadata['url'] + url = self.get_fault_operation_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['TypeFilter'] = self._serialize.query("type_filter", type_filter, 'int') - query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["TypeFilter"] = self._serialize.query("type_filter", type_filter, "int") + query_parameters["StateFilter"] = self._serialize.query("state_filter", state_filter, "int") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -12963,17 +14245,19 @@ def get_fault_operation_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[OperationStatus]', response) + deserialized = self._deserialize("[OperationStatus]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_fault_operation_list.metadata = {'url': '/Faults/'} + + get_fault_operation_list.metadata = {"url": "/Faults/"} def cancel_operation( - self, operation_id, force=False, timeout=60, custom_headers=None, raw=False, **operation_config): + self, operation_id, force=False, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Cancels a user-induced fault operation. The following APIs start fault operations that may be cancelled by @@ -13024,15 +14308,17 @@ def cancel_operation( api_version = "6.0" # Construct URL - url = self.cancel_operation.metadata['url'] + url = self.cancel_operation.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['Force'] = self._serialize.query("force", force, 'bool') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["OperationId"] = self._serialize.query("operation_id", operation_id, "str") + query_parameters["Force"] = self._serialize.query("force", force, "bool") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -13049,10 +14335,18 @@ def cancel_operation( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - cancel_operation.metadata = {'url': '/Faults/$/Cancel'} + + cancel_operation.metadata = {"url": "/Faults/$/Cancel"} def create_backup_policy( - self, backup_policy_description, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): + self, + backup_policy_description, + timeout=60, + validate_connection=False, + custom_headers=None, + raw=False, + **operation_config + ): """Creates a backup policy. Creates a backup policy which can be associated later with a Service @@ -13083,24 +14377,28 @@ def create_backup_policy( api_version = "6.4" # Construct URL - url = self.create_backup_policy.metadata['url'] + url = self.create_backup_policy.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if validate_connection is not None: - query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') + query_parameters["ValidateConnection"] = self._serialize.query( + "validate_connection", validate_connection, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + body_content = self._serialize.body(backup_policy_description, "BackupPolicyDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -13112,10 +14410,10 @@ def create_backup_policy( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - create_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/$/Create'} - def delete_backup_policy( - self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + create_backup_policy.metadata = {"url": "/BackupRestore/BackupPolicies/$/Create"} + + def delete_backup_policy(self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Deletes the backup policy. Deletes an existing backup policy. A backup policy must be created @@ -13143,17 +14441,19 @@ def delete_backup_policy( api_version = "6.4" # Construct URL - url = self.delete_backup_policy.metadata['url'] + url = self.delete_backup_policy.metadata["url"] path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + "backupPolicyName": self._serialize.url("backup_policy_name", backup_policy_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -13170,10 +14470,12 @@ def delete_backup_policy( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete'} + + delete_backup_policy.metadata = {"url": "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete"} def get_backup_policy_list( - self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets all the backup policies configured. Get a list of all the backup policies configured. @@ -13214,21 +14516,25 @@ def get_backup_policy_list( api_version = "6.4" # Construct URL - url = self.get_backup_policy_list.metadata['url'] + url = self.get_backup_policy_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -13241,17 +14547,19 @@ def get_backup_policy_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupPolicyDescriptionList', response) + deserialized = self._deserialize("PagedBackupPolicyDescriptionList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_backup_policy_list.metadata = {'url': '/BackupRestore/BackupPolicies'} + + get_backup_policy_list.metadata = {"url": "/BackupRestore/BackupPolicies"} def get_backup_policy_by_name( - self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets a particular backup policy by name. Gets a particular backup policy identified by {backupPolicyName}. @@ -13277,21 +14585,23 @@ def get_backup_policy_by_name( api_version = "6.4" # Construct URL - url = self.get_backup_policy_by_name.metadata['url'] + url = self.get_backup_policy_by_name.metadata["url"] path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + "backupPolicyName": self._serialize.url("backup_policy_name", backup_policy_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -13304,17 +14614,26 @@ def get_backup_policy_by_name( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupPolicyDescription', response) + deserialized = self._deserialize("BackupPolicyDescription", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_backup_policy_by_name.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}'} + + get_backup_policy_by_name.metadata = {"url": "/BackupRestore/BackupPolicies/{backupPolicyName}"} def get_all_entities_backed_up_by_policy( - self, backup_policy_name, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + backup_policy_name, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of backup entities that are associated with this policy. Returns a list of Service Fabric application, service or partition @@ -13357,25 +14676,29 @@ def get_all_entities_backed_up_by_policy( api_version = "6.4" # Construct URL - url = self.get_all_entities_backed_up_by_policy.metadata['url'] + url = self.get_all_entities_backed_up_by_policy.metadata["url"] path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + "backupPolicyName": self._serialize.url("backup_policy_name", backup_policy_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -13388,17 +14711,28 @@ def get_all_entities_backed_up_by_policy( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupEntityList', response) + deserialized = self._deserialize("PagedBackupEntityList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_all_entities_backed_up_by_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'} + + get_all_entities_backed_up_by_policy.metadata = { + "url": "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities" + } def update_backup_policy( - self, backup_policy_description, backup_policy_name, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): + self, + backup_policy_description, + backup_policy_name, + timeout=60, + validate_connection=False, + custom_headers=None, + raw=False, + **operation_config + ): """Updates the backup policy. Updates the backup policy identified by {backupPolicyName}. @@ -13430,28 +14764,32 @@ def update_backup_policy( api_version = "6.4" # Construct URL - url = self.update_backup_policy.metadata['url'] + url = self.update_backup_policy.metadata["url"] path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + "backupPolicyName": self._serialize.url("backup_policy_name", backup_policy_name, "str") } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if validate_connection is not None: - query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') + query_parameters["ValidateConnection"] = self._serialize.query( + "validate_connection", validate_connection, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + body_content = self._serialize.body(backup_policy_description, "BackupPolicyDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -13463,10 +14801,12 @@ def update_backup_policy( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - update_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update'} + + update_backup_policy.metadata = {"url": "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update"} def enable_application_backup( - self, application_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Enables periodic backup of stateful partitions under this Service Fabric application. @@ -13508,26 +14848,28 @@ def enable_application_backup( api_version = "6.4" # Construct URL - url = self.enable_application_backup.metadata['url'] + url = self.enable_application_backup.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') + body_content = self._serialize.body(enable_backup_description, "EnableBackupDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -13539,10 +14881,12 @@ def enable_application_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - enable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/EnableBackup'} + + enable_application_backup.metadata = {"url": "/Applications/{applicationId}/$/EnableBackup"} def disable_application_backup( - self, application_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Disables periodic backup of Service Fabric application. Disables periodic backup of Service Fabric application which was @@ -13583,27 +14927,29 @@ def disable_application_backup( api_version = "6.4" # Construct URL - url = self.disable_application_backup.metadata['url'] + url = self.disable_application_backup.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') + body_content = self._serialize.body(disable_backup_description, "DisableBackupDescription") else: body_content = None @@ -13617,10 +14963,19 @@ def disable_application_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - disable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/DisableBackup'} + + disable_application_backup.metadata = {"url": "/Applications/{applicationId}/$/DisableBackup"} def get_application_backup_configuration_info( - self, application_id, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + application_id, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the Service Fabric application backup configuration information. Gets the Service Fabric backup configuration information for the @@ -13671,25 +15026,29 @@ def get_application_backup_configuration_info( api_version = "6.4" # Construct URL - url = self.get_application_backup_configuration_info.metadata['url'] + url = self.get_application_backup_configuration_info.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -13702,17 +15061,31 @@ def get_application_backup_configuration_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupConfigurationInfoList', response) + deserialized = self._deserialize("PagedBackupConfigurationInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_backup_configuration_info.metadata = {'url': '/Applications/{applicationId}/$/GetBackupConfigurationInfo'} + + get_application_backup_configuration_info.metadata = { + "url": "/Applications/{applicationId}/$/GetBackupConfigurationInfo" + } def get_application_backup_list( - self, application_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + self, + application_id, + timeout=60, + latest=False, + start_date_time_filter=None, + end_date_time_filter=None, + continuation_token=None, + max_results=0, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of backups available for every partition in this application. @@ -13779,31 +15152,39 @@ def get_application_backup_list( api_version = "6.4" # Construct URL - url = self.get_application_backup_list.metadata['url'] + url = self.get_application_backup_list.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') + query_parameters["Latest"] = self._serialize.query("latest", latest, "bool") if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + query_parameters["StartDateTimeFilter"] = self._serialize.query( + "start_date_time_filter", start_date_time_filter, "iso-8601" + ) if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + query_parameters["EndDateTimeFilter"] = self._serialize.query( + "end_date_time_filter", end_date_time_filter, "iso-8601" + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -13816,17 +15197,19 @@ def get_application_backup_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) + deserialized = self._deserialize("PagedBackupInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_backup_list.metadata = {'url': '/Applications/{applicationId}/$/GetBackups'} + + get_application_backup_list.metadata = {"url": "/Applications/{applicationId}/$/GetBackups"} def suspend_application_backup( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Suspends periodic backup for the specified Service Fabric application. The application which is configured to take periodic backups, is @@ -13862,17 +15245,19 @@ def suspend_application_backup( api_version = "6.4" # Construct URL - url = self.suspend_application_backup.metadata['url'] + url = self.suspend_application_backup.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -13889,10 +15274,10 @@ def suspend_application_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - suspend_application_backup.metadata = {'url': '/Applications/{applicationId}/$/SuspendBackup'} - def resume_application_backup( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + suspend_application_backup.metadata = {"url": "/Applications/{applicationId}/$/SuspendBackup"} + + def resume_application_backup(self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Resumes periodic backup of a Service Fabric application which was previously suspended. @@ -13927,17 +15312,19 @@ def resume_application_backup( api_version = "6.4" # Construct URL - url = self.resume_application_backup.metadata['url'] + url = self.resume_application_backup.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -13954,10 +15341,12 @@ def resume_application_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - resume_application_backup.metadata = {'url': '/Applications/{applicationId}/$/ResumeBackup'} + + resume_application_backup.metadata = {"url": "/Applications/{applicationId}/$/ResumeBackup"} def enable_service_backup( - self, service_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Enables periodic backup of stateful partitions under this Service Fabric service. @@ -14002,26 +15391,26 @@ def enable_service_backup( api_version = "6.4" # Construct URL - url = self.enable_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.enable_service_backup.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') + body_content = self._serialize.body(enable_backup_description, "EnableBackupDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -14033,10 +15422,12 @@ def enable_service_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - enable_service_backup.metadata = {'url': '/Services/{serviceId}/$/EnableBackup'} + + enable_service_backup.metadata = {"url": "/Services/{serviceId}/$/EnableBackup"} def disable_service_backup( - self, service_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): + self, service_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Disables periodic backup of Service Fabric service which was previously enabled. @@ -14080,27 +15471,27 @@ def disable_service_backup( api_version = "6.4" # Construct URL - url = self.disable_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.disable_service_backup.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') + body_content = self._serialize.body(disable_backup_description, "DisableBackupDescription") else: body_content = None @@ -14114,10 +15505,19 @@ def disable_service_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - disable_service_backup.metadata = {'url': '/Services/{serviceId}/$/DisableBackup'} + + disable_service_backup.metadata = {"url": "/Services/{serviceId}/$/DisableBackup"} def get_service_backup_configuration_info( - self, service_id, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + service_id, + continuation_token=None, + max_results=0, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the Service Fabric service backup configuration information. Gets the Service Fabric backup configuration information for the @@ -14167,25 +15567,27 @@ def get_service_backup_configuration_info( api_version = "6.4" # Construct URL - url = self.get_service_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_service_backup_configuration_info.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -14198,17 +15600,29 @@ def get_service_backup_configuration_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupConfigurationInfoList', response) + deserialized = self._deserialize("PagedBackupConfigurationInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_backup_configuration_info.metadata = {'url': '/Services/{serviceId}/$/GetBackupConfigurationInfo'} + + get_service_backup_configuration_info.metadata = {"url": "/Services/{serviceId}/$/GetBackupConfigurationInfo"} def get_service_backup_list( - self, service_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + self, + service_id, + timeout=60, + latest=False, + start_date_time_filter=None, + end_date_time_filter=None, + continuation_token=None, + max_results=0, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of backups available for every partition in this service. Returns a list of backups available for every partition in this Service @@ -14273,31 +15687,37 @@ def get_service_backup_list( api_version = "6.4" # Construct URL - url = self.get_service_backup_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_service_backup_list.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') + query_parameters["Latest"] = self._serialize.query("latest", latest, "bool") if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + query_parameters["StartDateTimeFilter"] = self._serialize.query( + "start_date_time_filter", start_date_time_filter, "iso-8601" + ) if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + query_parameters["EndDateTimeFilter"] = self._serialize.query( + "end_date_time_filter", end_date_time_filter, "iso-8601" + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -14310,17 +15730,17 @@ def get_service_backup_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) + deserialized = self._deserialize("PagedBackupInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_backup_list.metadata = {'url': '/Services/{serviceId}/$/GetBackups'} - def suspend_service_backup( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_service_backup_list.metadata = {"url": "/Services/{serviceId}/$/GetBackups"} + + def suspend_service_backup(self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Suspends periodic backup for the specified Service Fabric service. The service which is configured to take periodic backups, is suspended @@ -14354,17 +15774,17 @@ def suspend_service_backup( api_version = "6.4" # Construct URL - url = self.suspend_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.suspend_service_backup.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -14381,10 +15801,10 @@ def suspend_service_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - suspend_service_backup.metadata = {'url': '/Services/{serviceId}/$/SuspendBackup'} - def resume_service_backup( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + suspend_service_backup.metadata = {"url": "/Services/{serviceId}/$/SuspendBackup"} + + def resume_service_backup(self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Resumes periodic backup of a Service Fabric service which was previously suspended. @@ -14417,17 +15837,17 @@ def resume_service_backup( api_version = "6.4" # Construct URL - url = self.resume_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.resume_service_backup.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -14444,10 +15864,12 @@ def resume_service_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - resume_service_backup.metadata = {'url': '/Services/{serviceId}/$/ResumeBackup'} + + resume_service_backup.metadata = {"url": "/Services/{serviceId}/$/ResumeBackup"} def enable_partition_backup( - self, partition_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Enables periodic backup of the stateful persisted partition. Enables periodic backup of stateful persisted partition. Each partition @@ -14483,26 +15905,28 @@ def enable_partition_backup( api_version = "6.4" # Construct URL - url = self.enable_partition_backup.metadata['url'] + url = self.enable_partition_backup.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') + body_content = self._serialize.body(enable_backup_description, "EnableBackupDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -14514,10 +15938,12 @@ def enable_partition_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - enable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/EnableBackup'} + + enable_partition_backup.metadata = {"url": "/Partitions/{partitionId}/$/EnableBackup"} def disable_partition_backup( - self, partition_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Disables periodic backup of Service Fabric partition which was previously enabled. @@ -14556,27 +15982,29 @@ def disable_partition_backup( api_version = "6.4" # Construct URL - url = self.disable_partition_backup.metadata['url'] + url = self.disable_partition_backup.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') + body_content = self._serialize.body(disable_backup_description, "DisableBackupDescription") else: body_content = None @@ -14590,10 +16018,12 @@ def disable_partition_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - disable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/DisableBackup'} + + disable_partition_backup.metadata = {"url": "/Partitions/{partitionId}/$/DisableBackup"} def get_partition_backup_configuration_info( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets the partition backup configuration information. Gets the Service Fabric Backup configuration information for the @@ -14621,21 +16051,23 @@ def get_partition_backup_configuration_info( api_version = "6.4" # Construct URL - url = self.get_partition_backup_configuration_info.metadata['url'] + url = self.get_partition_backup_configuration_info.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -14648,17 +16080,27 @@ def get_partition_backup_configuration_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PartitionBackupConfigurationInfo', response) + deserialized = self._deserialize("PartitionBackupConfigurationInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_backup_configuration_info.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupConfigurationInfo'} + + get_partition_backup_configuration_info.metadata = {"url": "/Partitions/{partitionId}/$/GetBackupConfigurationInfo"} def get_partition_backup_list( - self, partition_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + timeout=60, + latest=False, + start_date_time_filter=None, + end_date_time_filter=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of backups available for the specified partition. Returns a list of backups available for the specified partition. The @@ -14701,27 +16143,33 @@ def get_partition_backup_list( api_version = "6.4" # Construct URL - url = self.get_partition_backup_list.metadata['url'] + url = self.get_partition_backup_list.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') + query_parameters["Latest"] = self._serialize.query("latest", latest, "bool") if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + query_parameters["StartDateTimeFilter"] = self._serialize.query( + "start_date_time_filter", start_date_time_filter, "iso-8601" + ) if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + query_parameters["EndDateTimeFilter"] = self._serialize.query( + "end_date_time_filter", end_date_time_filter, "iso-8601" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -14734,17 +16182,17 @@ def get_partition_backup_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) + deserialized = self._deserialize("PagedBackupInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_backup_list.metadata = {'url': '/Partitions/{partitionId}/$/GetBackups'} - def suspend_partition_backup( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_partition_backup_list.metadata = {"url": "/Partitions/{partitionId}/$/GetBackups"} + + def suspend_partition_backup(self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Suspends periodic backup for the specified partition. The partition which is configured to take periodic backups, is @@ -14770,17 +16218,19 @@ def suspend_partition_backup( api_version = "6.4" # Construct URL - url = self.suspend_partition_backup.metadata['url'] + url = self.suspend_partition_backup.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -14797,10 +16247,10 @@ def suspend_partition_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - suspend_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/SuspendBackup'} - def resume_partition_backup( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + suspend_partition_backup.metadata = {"url": "/Partitions/{partitionId}/$/SuspendBackup"} + + def resume_partition_backup(self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Resumes periodic backup of partition which was previously suspended. The previously suspended partition resumes taking periodic backup as @@ -14826,17 +16276,19 @@ def resume_partition_backup( api_version = "6.4" # Construct URL - url = self.resume_partition_backup.metadata['url'] + url = self.resume_partition_backup.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -14853,10 +16305,19 @@ def resume_partition_backup( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - resume_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/ResumeBackup'} + + resume_partition_backup.metadata = {"url": "/Partitions/{partitionId}/$/ResumeBackup"} def backup_partition( - self, partition_id, backup_timeout=10, timeout=60, backup_storage=None, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + backup_timeout=10, + timeout=60, + backup_storage=None, + custom_headers=None, + raw=False, + **operation_config + ): """Triggers backup of the partition's state. Creates a backup of the stateful persisted partition's state. In case @@ -14904,29 +16365,31 @@ def backup_partition( api_version = "6.4" # Construct URL - url = self.backup_partition.metadata['url'] + url = self.backup_partition.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} if backup_timeout is not None: - query_parameters['BackupTimeout'] = self._serialize.query("backup_timeout", backup_timeout, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["BackupTimeout"] = self._serialize.query("backup_timeout", backup_timeout, "int") + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body if backup_partition_description is not None: - body_content = self._serialize.body(backup_partition_description, 'BackupPartitionDescription') + body_content = self._serialize.body(backup_partition_description, "BackupPartitionDescription") else: body_content = None @@ -14940,10 +16403,12 @@ def backup_partition( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - backup_partition.metadata = {'url': '/Partitions/{partitionId}/$/Backup'} + + backup_partition.metadata = {"url": "/Partitions/{partitionId}/$/Backup"} def get_partition_backup_progress( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets details for the latest backup triggered for this partition. Returns information about the state of the latest backup along with @@ -14970,21 +16435,23 @@ def get_partition_backup_progress( api_version = "6.4" # Construct URL - url = self.get_partition_backup_progress.metadata['url'] + url = self.get_partition_backup_progress.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -14997,17 +16464,26 @@ def get_partition_backup_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupProgressInfo', response) + deserialized = self._deserialize("BackupProgressInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_backup_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupProgress'} + + get_partition_backup_progress.metadata = {"url": "/Partitions/{partitionId}/$/GetBackupProgress"} def restore_partition( - self, partition_id, restore_partition_description, restore_timeout=10, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + restore_partition_description, + restore_timeout=10, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Triggers restore of the state of the partition using the specified restore partition description. @@ -15053,28 +16529,30 @@ def restore_partition( api_version = "6.4" # Construct URL - url = self.restore_partition.metadata['url'] + url = self.restore_partition.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} if restore_timeout is not None: - query_parameters['RestoreTimeout'] = self._serialize.query("restore_timeout", restore_timeout, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["RestoreTimeout"] = self._serialize.query("restore_timeout", restore_timeout, "int") + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') + body_content = self._serialize.body(restore_partition_description, "RestorePartitionDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -15086,10 +16564,12 @@ def restore_partition( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - restore_partition.metadata = {'url': '/Partitions/{partitionId}/$/Restore'} + + restore_partition.metadata = {"url": "/Partitions/{partitionId}/$/Restore"} def get_partition_restore_progress( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets details for the latest restore operation triggered for this partition. @@ -15117,21 +16597,23 @@ def get_partition_restore_progress( api_version = "6.4" # Construct URL - url = self.get_partition_restore_progress.metadata['url'] + url = self.get_partition_restore_progress.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -15144,17 +16626,26 @@ def get_partition_restore_progress( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RestoreProgressInfo', response) + deserialized = self._deserialize("RestoreProgressInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_restore_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetRestoreProgress'} + + get_partition_restore_progress.metadata = {"url": "/Partitions/{partitionId}/$/GetRestoreProgress"} def get_backups_from_backup_location( - self, get_backup_by_storage_query_description, timeout=60, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + self, + get_backup_by_storage_query_description, + timeout=60, + continuation_token=None, + max_results=0, + custom_headers=None, + raw=False, + **operation_config + ): """Gets the list of backups available for the specified backed up entity at the specified backup location. @@ -15201,27 +16692,33 @@ def get_backups_from_backup_location( api_version = "6.4" # Construct URL - url = self.get_backups_from_backup_location.metadata['url'] + url = self.get_backups_from_backup_location.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + query_parameters["MaxResults"] = self._serialize.query("max_results", max_results, "long", minimum=0) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') + body_content = self._serialize.body( + get_backup_by_storage_query_description, "GetBackupByStorageQueryDescription" + ) # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -15232,17 +16729,17 @@ def get_backups_from_backup_location( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedBackupInfoList', response) + deserialized = self._deserialize("PagedBackupInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_backups_from_backup_location.metadata = {'url': '/BackupRestore/$/GetBackups'} - def create_name( - self, name, timeout=60, custom_headers=None, raw=False, **operation_config): + get_backups_from_backup_location.metadata = {"url": "/BackupRestore/$/GetBackups"} + + def create_name(self, name, timeout=60, custom_headers=None, raw=False, **operation_config): """Creates a Service Fabric name. Creates the specified Service Fabric name. @@ -15270,22 +16767,24 @@ def create_name( api_version = "6.0" # Construct URL - url = self.create_name.metadata['url'] + url = self.create_name.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(name_description, 'NameDescription') + body_content = self._serialize.body(name_description, "NameDescription") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -15297,10 +16796,10 @@ def create_name( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - create_name.metadata = {'url': '/Names/$/Create'} - def get_name_exists_info( - self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): + create_name.metadata = {"url": "/Names/$/Create"} + + def get_name_exists_info(self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Returns whether the Service Fabric name exists. Returns whether the specified Service Fabric name exists. @@ -15326,17 +16825,17 @@ def get_name_exists_info( api_version = "6.0" # Construct URL - url = self.get_name_exists_info.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.get_name_exists_info.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -15353,10 +16852,10 @@ def get_name_exists_info( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - get_name_exists_info.metadata = {'url': '/Names/{nameId}'} - def delete_name( - self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): + get_name_exists_info.metadata = {"url": "/Names/{nameId}"} + + def delete_name(self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): """Deletes a Service Fabric name. Deletes the specified Service Fabric name. A name must be created @@ -15384,17 +16883,17 @@ def delete_name( api_version = "6.0" # Construct URL - url = self.delete_name.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.delete_name.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -15411,10 +16910,19 @@ def delete_name( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_name.metadata = {'url': '/Names/{nameId}'} + + delete_name.metadata = {"url": "/Names/{nameId}"} def get_sub_name_info_list( - self, name_id, recursive=False, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + name_id, + recursive=False, + continuation_token=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Enumerates all the Service Fabric names under a given name. Enumerates all the Service Fabric names under a given name. If the @@ -15455,25 +16963,27 @@ def get_sub_name_info_list( api_version = "6.0" # Construct URL - url = self.get_sub_name_info_list.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.get_sub_name_info_list.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if recursive is not None: - query_parameters['Recursive'] = self._serialize.query("recursive", recursive, 'bool') + query_parameters["Recursive"] = self._serialize.query("recursive", recursive, "bool") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -15486,17 +16996,26 @@ def get_sub_name_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedSubNameInfoList', response) + deserialized = self._deserialize("PagedSubNameInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_sub_name_info_list.metadata = {'url': '/Names/{nameId}/$/GetSubNames'} + + get_sub_name_info_list.metadata = {"url": "/Names/{nameId}/$/GetSubNames"} def get_property_info_list( - self, name_id, include_values=False, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + self, + name_id, + include_values=False, + continuation_token=None, + timeout=60, + custom_headers=None, + raw=False, + **operation_config + ): """Gets information on all Service Fabric properties under a given name. A Service Fabric name can have one or more named properties that store @@ -15538,25 +17057,27 @@ def get_property_info_list( api_version = "6.0" # Construct URL - url = self.get_property_info_list.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.get_property_info_list.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if include_values is not None: - query_parameters['IncludeValues'] = self._serialize.query("include_values", include_values, 'bool') + query_parameters["IncludeValues"] = self._serialize.query("include_values", include_values, "bool") if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + query_parameters["ContinuationToken"] = self._serialize.query( + "continuation_token", continuation_token, "str", skip_quote=True + ) if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -15569,17 +17090,19 @@ def get_property_info_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PagedPropertyInfoList', response) + deserialized = self._deserialize("PagedPropertyInfoList", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_property_info_list.metadata = {'url': '/Names/{nameId}/$/GetProperties'} + + get_property_info_list.metadata = {"url": "/Names/{nameId}/$/GetProperties"} def put_property( - self, name_id, property_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, name_id, property_description, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Creates or updates a Service Fabric property. Creates or updates the specified Service Fabric property under a given @@ -15610,26 +17133,26 @@ def put_property( api_version = "6.0" # Construct URL - url = self.put_property.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.put_property.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(property_description, 'PropertyDescription') + body_content = self._serialize.body(property_description, "PropertyDescription") # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -15641,10 +17164,10 @@ def put_property( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - put_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - def get_property_info( - self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): + put_property.metadata = {"url": "/Names/{nameId}/$/GetProperty"} + + def get_property_info(self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the specified Service Fabric property. Gets the specified Service Fabric property under a given name. This @@ -15674,22 +17197,22 @@ def get_property_info( api_version = "6.0" # Construct URL - url = self.get_property_info.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.get_property_info.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["PropertyName"] = self._serialize.query("property_name", property_name, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -15702,17 +17225,17 @@ def get_property_info( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PropertyInfo', response) + deserialized = self._deserialize("PropertyInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_property_info.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - def delete_property( - self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): + get_property_info.metadata = {"url": "/Names/{nameId}/$/GetProperty"} + + def delete_property(self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Deletes the specified Service Fabric property. Deletes the specified Service Fabric property under a given name. A @@ -15741,18 +17264,18 @@ def delete_property( api_version = "6.0" # Construct URL - url = self.delete_property.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.delete_property.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") + query_parameters["PropertyName"] = self._serialize.query("property_name", property_name, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} @@ -15769,10 +17292,12 @@ def delete_property( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} + + delete_property.metadata = {"url": "/Names/{nameId}/$/GetProperty"} def submit_property_batch( - self, name_id, timeout=60, operations=None, custom_headers=None, raw=False, **operation_config): + self, name_id, timeout=60, operations=None, custom_headers=None, raw=False, **operation_config + ): """Submits a property batch. Submits a batch of property operations. Either all or none of the @@ -15806,27 +17331,27 @@ def submit_property_batch( api_version = "6.0" # Construct URL - url = self.submit_property_batch.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } + url = self.submit_property_batch.metadata["url"] + path_format_arguments = {"nameId": self._serialize.url("name_id", name_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters["Accept"] = "application/json" + header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(property_batch_description_list, 'PropertyBatchDescriptionList') + body_content = self._serialize.body(property_batch_description_list, "PropertyBatchDescriptionList") # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -15837,19 +17362,30 @@ def submit_property_batch( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SuccessfulPropertyBatchInfo', response) + deserialized = self._deserialize("SuccessfulPropertyBatchInfo", response) if response.status_code == 409: - deserialized = self._deserialize('FailedPropertyBatchInfo', response) + deserialized = self._deserialize("FailedPropertyBatchInfo", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - submit_property_batch.metadata = {'url': '/Names/{nameId}/$/GetProperties/$/SubmitBatch'} + + submit_property_batch.metadata = {"url": "/Names/{nameId}/$/GetProperties/$/SubmitBatch"} def get_cluster_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Cluster-related events. The response is list of ClusterEvent objects. @@ -15891,25 +17427,33 @@ def get_cluster_event_list( api_version = "6.4" # Construct URL - url = self.get_cluster_event_list.metadata['url'] + url = self.get_cluster_event_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -15922,17 +17466,28 @@ def get_cluster_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ClusterEvent]', response) + deserialized = self._deserialize("[ClusterEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_cluster_event_list.metadata = {'url': '/EventsStore/Cluster/Events'} + + get_cluster_event_list.metadata = {"url": "/EventsStore/Cluster/Events"} def get_containers_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Containers-related events. The response is list of ContainerInstanceEvent objects. @@ -15974,25 +17529,33 @@ def get_containers_event_list( api_version = "6.2-preview" # Construct URL - url = self.get_containers_event_list.metadata['url'] + url = self.get_containers_event_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16005,17 +17568,29 @@ def get_containers_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ContainerInstanceEvent]', response) + deserialized = self._deserialize("[ContainerInstanceEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_containers_event_list.metadata = {'url': '/EventsStore/Containers/Events'} + + get_containers_event_list.metadata = {"url": "/EventsStore/Containers/Events"} def get_node_event_list( - self, node_name, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + node_name, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets a Node-related events. The response is list of NodeEvent objects. @@ -16059,29 +17634,35 @@ def get_node_event_list( api_version = "6.4" # Construct URL - url = self.get_node_event_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } + url = self.get_node_event_list.metadata["url"] + path_format_arguments = {"nodeName": self._serialize.url("node_name", node_name, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16094,17 +17675,28 @@ def get_node_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[NodeEvent]', response) + deserialized = self._deserialize("[NodeEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_node_event_list.metadata = {'url': '/EventsStore/Nodes/{nodeName}/$/Events'} + + get_node_event_list.metadata = {"url": "/EventsStore/Nodes/{nodeName}/$/Events"} def get_nodes_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Nodes-related Events. The response is list of NodeEvent objects. @@ -16146,25 +17738,33 @@ def get_nodes_event_list( api_version = "6.4" # Construct URL - url = self.get_nodes_event_list.metadata['url'] + url = self.get_nodes_event_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16177,17 +17777,29 @@ def get_nodes_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[NodeEvent]', response) + deserialized = self._deserialize("[NodeEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_nodes_event_list.metadata = {'url': '/EventsStore/Nodes/Events'} + + get_nodes_event_list.metadata = {"url": "/EventsStore/Nodes/Events"} def get_application_event_list( - self, application_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + application_id, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets an Application-related events. The response is list of ApplicationEvent objects. @@ -16238,29 +17850,37 @@ def get_application_event_list( api_version = "6.4" # Construct URL - url = self.get_application_event_list.metadata['url'] + url = self.get_application_event_list.metadata["url"] path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + "applicationId": self._serialize.url("application_id", application_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16273,17 +17893,28 @@ def get_application_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ApplicationEvent]', response) + deserialized = self._deserialize("[ApplicationEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_application_event_list.metadata = {'url': '/EventsStore/Applications/{applicationId}/$/Events'} + + get_application_event_list.metadata = {"url": "/EventsStore/Applications/{applicationId}/$/Events"} def get_applications_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Applications-related events. The response is list of ApplicationEvent objects. @@ -16325,25 +17956,33 @@ def get_applications_event_list( api_version = "6.4" # Construct URL - url = self.get_applications_event_list.metadata['url'] + url = self.get_applications_event_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16356,17 +17995,29 @@ def get_applications_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ApplicationEvent]', response) + deserialized = self._deserialize("[ApplicationEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_applications_event_list.metadata = {'url': '/EventsStore/Applications/Events'} + + get_applications_event_list.metadata = {"url": "/EventsStore/Applications/Events"} def get_service_event_list( - self, service_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + service_id, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets a Service-related events. The response is list of ServiceEvent objects. @@ -16416,29 +18067,35 @@ def get_service_event_list( api_version = "6.4" # Construct URL - url = self.get_service_event_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } + url = self.get_service_event_list.metadata["url"] + path_format_arguments = {"serviceId": self._serialize.url("service_id", service_id, "str", skip_quote=True)} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16451,17 +18108,28 @@ def get_service_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ServiceEvent]', response) + deserialized = self._deserialize("[ServiceEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_service_event_list.metadata = {'url': '/EventsStore/Services/{serviceId}/$/Events'} + + get_service_event_list.metadata = {"url": "/EventsStore/Services/{serviceId}/$/Events"} def get_services_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Services-related events. The response is list of ServiceEvent objects. @@ -16503,25 +18171,33 @@ def get_services_event_list( api_version = "6.4" # Construct URL - url = self.get_services_event_list.metadata['url'] + url = self.get_services_event_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16534,17 +18210,29 @@ def get_services_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ServiceEvent]', response) + deserialized = self._deserialize("[ServiceEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_services_event_list.metadata = {'url': '/EventsStore/Services/Events'} + + get_services_event_list.metadata = {"url": "/EventsStore/Services/Events"} def get_partition_event_list( - self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets a Partition-related events. The response is list of PartitionEvent objects. @@ -16588,29 +18276,37 @@ def get_partition_event_list( api_version = "6.4" # Construct URL - url = self.get_partition_event_list.metadata['url'] + url = self.get_partition_event_list.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16623,17 +18319,28 @@ def get_partition_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[PartitionEvent]', response) + deserialized = self._deserialize("[PartitionEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Events'} + + get_partition_event_list.metadata = {"url": "/EventsStore/Partitions/{partitionId}/$/Events"} def get_partitions_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Partitions-related events. The response is list of PartitionEvent objects. @@ -16675,25 +18382,33 @@ def get_partitions_event_list( api_version = "6.4" # Construct URL - url = self.get_partitions_event_list.metadata['url'] + url = self.get_partitions_event_list.metadata["url"] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16706,17 +18421,30 @@ def get_partitions_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[PartitionEvent]', response) + deserialized = self._deserialize("[PartitionEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partitions_event_list.metadata = {'url': '/EventsStore/Partitions/Events'} + + get_partitions_event_list.metadata = {"url": "/EventsStore/Partitions/Events"} def get_partition_replica_event_list( - self, partition_id, replica_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + replica_id, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets a Partition Replica-related events. The response is list of ReplicaEvent objects. @@ -16762,30 +18490,38 @@ def get_partition_replica_event_list( api_version = "6.4" # Construct URL - url = self.get_partition_replica_event_list.metadata['url'] + url = self.get_partition_replica_event_list.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True), + "replicaId": self._serialize.url("replica_id", replica_id, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16798,17 +18534,31 @@ def get_partition_replica_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ReplicaEvent]', response) + deserialized = self._deserialize("[ReplicaEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_replica_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'} + + get_partition_replica_event_list.metadata = { + "url": "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events" + } def get_partition_replicas_event_list( - self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + self, + partition_id, + start_time_utc, + end_time_utc, + timeout=60, + events_types_filter=None, + exclude_analysis_events=None, + skip_correlation_lookup=None, + custom_headers=None, + raw=False, + **operation_config + ): """Gets all Replicas-related events for a Partition. The response is list of ReplicaEvent objects. @@ -16852,29 +18602,37 @@ def get_partition_replicas_event_list( api_version = "6.4" # Construct URL - url = self.get_partition_replicas_event_list.metadata['url'] + url = self.get_partition_replicas_event_list.metadata["url"] path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + "partitionId": self._serialize.url("partition_id", partition_id, "str", skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) + query_parameters["StartTimeUtc"] = self._serialize.query("start_time_utc", start_time_utc, "str") + query_parameters["EndTimeUtc"] = self._serialize.query("end_time_utc", end_time_utc, "str") if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + query_parameters["EventsTypesFilter"] = self._serialize.query( + "events_types_filter", events_types_filter, "str" + ) if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + query_parameters["ExcludeAnalysisEvents"] = self._serialize.query( + "exclude_analysis_events", exclude_analysis_events, "bool" + ) if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + query_parameters["SkipCorrelationLookup"] = self._serialize.query( + "skip_correlation_lookup", skip_correlation_lookup, "bool" + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16887,17 +18645,19 @@ def get_partition_replicas_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[ReplicaEvent]', response) + deserialized = self._deserialize("[ReplicaEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_partition_replicas_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/Events'} + + get_partition_replicas_event_list.metadata = {"url": "/EventsStore/Partitions/{partitionId}/$/Replicas/Events"} def get_correlated_event_list( - self, event_instance_id, timeout=60, custom_headers=None, raw=False, **operation_config): + self, event_instance_id, timeout=60, custom_headers=None, raw=False, **operation_config + ): """Gets all correlated events for a given event. The response is list of FabricEvents. @@ -16923,21 +18683,21 @@ def get_correlated_event_list( api_version = "6.4" # Construct URL - url = self.get_correlated_event_list.metadata['url'] - path_format_arguments = { - 'eventInstanceId': self._serialize.url("event_instance_id", event_instance_id, 'str') - } + url = self.get_correlated_event_list.metadata["url"] + path_format_arguments = {"eventInstanceId": self._serialize.url("event_instance_id", event_instance_id, "str")} url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters["timeout"] = self._serialize.query( + "timeout", timeout, "long", maximum=4294967295, minimum=1 + ) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' + header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) @@ -16950,11 +18710,12 @@ def get_correlated_event_list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[FabricEvent]', response) + deserialized = self._deserialize("[FabricEvent]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_correlated_event_list.metadata = {'url': '/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'} + + get_correlated_event_list.metadata = {"url": "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events"} diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/version.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/version.py index b9fbd5deb726..45c020b94917 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/version.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/version.py @@ -10,4 +10,3 @@ # -------------------------------------------------------------------------- VERSION = "8.2.1" - diff --git a/sdk/servicefabric/azure-servicefabric/setup.py b/sdk/servicefabric/azure-servicefabric/setup.py index c4cf69b6fd6f..555eabcf3270 100644 --- a/sdk/servicefabric/azure-servicefabric/setup.py +++ b/sdk/servicefabric/azure-servicefabric/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,61 +16,67 @@ PACKAGE_PPRINT_NAME = "Service Fabric" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ - 'msrest>=0.6.21', - 'azure-common~=1.1', + "msrest>=0.6.21", + "azure-common~=1.1", ], - python_requires=">=3.6" + python_requires=">=3.6", ) diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_patch.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_patch.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_patch.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_patch.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_patch.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_patch.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_patch.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_patch.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_patch.py b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_patch.py +++ b/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/operations/_patch.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/operations/_patch.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_patch.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_patch.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_patch.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_patch.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/setup.py b/sdk/servicelinker/azure-mgmt-servicelinker/setup.py index fa3281f8b346..3d2e8e6f8aa0 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/setup.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_async_test.py b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_async_test.py index 3426dd5d6e00..95e7232fccf5 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_async_test.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_async_test.py @@ -25,4 +25,3 @@ async def test_list(self, resource_group): response = self.client.configuration_names.list() result = [r async for r in response] assert result - \ No newline at end of file diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_test.py b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_test.py index 9945f19aa842..cae4916d5a0f 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_test.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_configuration_names_operations_test.py @@ -24,4 +24,3 @@ def test_list(self, resource_group): response = self.client.configuration_names.list() result = [r for r in response] assert result - \ No newline at end of file diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_async_test.py b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_async_test.py index 34591fd4a59e..24b9a24bf7b2 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_async_test.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_async_test.py @@ -29,7 +29,6 @@ async def test_list_dryrun(self, resource_group): ) result = [r async for r in response] assert result == [] - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_test.py b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_test.py index 2fe716692af1..17731e0b9dab 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_test.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_connector_operations_test.py @@ -29,7 +29,6 @@ def test_list_dryrun(self, resource_group): result = [r for r in response] assert result == [] - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_list(self, resource_group): diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_operations_async_test.py b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_operations_async_test.py index 7197bb1e6118..b8057e498b70 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_operations_async_test.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/tests/test_service_linker_management_operations_async_test.py @@ -25,4 +25,3 @@ async def test_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - \ No newline at end of file diff --git a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_patch.py b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_patch.py +++ b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/_patch.py b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/_patch.py +++ b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/operations/_patch.py b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/operations/_patch.py +++ b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/models/_patch.py b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/models/_patch.py +++ b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/operations/_patch.py b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/operations/_patch.py +++ b/sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicenetworking/azure-mgmt-servicenetworking/setup.py b/sdk/servicenetworking/azure-mgmt-servicenetworking/setup.py index bd2d3ccaa724..3a4e132057bc 100644 --- a/sdk/servicenetworking/azure-mgmt-servicenetworking/setup.py +++ b/sdk/servicenetworking/azure-mgmt-servicenetworking/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_patch.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_patch.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_patch.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_patch.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_patch.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_patch.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_patch.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_patch.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_patch.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_patch.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/signalr/azure-mgmt-signalr/setup.py b/sdk/signalr/azure-mgmt-signalr/setup.py index 8c20f4d9c608..dca72ba9d09c 100644 --- a/sdk/signalr/azure-mgmt-signalr/setup.py +++ b/sdk/signalr/azure-mgmt-signalr/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/signalr/azure-mgmt-signalr/tests/disable_test_cli_mgmt_signalr.py b/sdk/signalr/azure-mgmt-signalr/tests/disable_test_cli_mgmt_signalr.py index f3fddc9cee39..f18a9e4459e1 100644 --- a/sdk/signalr/azure-mgmt-signalr/tests/disable_test_cli_mgmt_signalr.py +++ b/sdk/signalr/azure-mgmt-signalr/tests/disable_test_cli_mgmt_signalr.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,16 +21,15 @@ import azure.mgmt.signalr from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtSignalRTest(AzureMgmtTestCase): def setUp(self): super(MgmtSignalRTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.signalr.SignalRManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.signalr.SignalRManagementClient) + @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_signalr(self, resource_group): @@ -43,31 +42,17 @@ def test_signalr(self, resource_group): # /SignalR/put/SignalR_CreateOrUpdate[put] BODY = { - 'tags': { - "key1": "value1" - }, - 'sku': { - "name": "Standard_S1", - "tier": "Standard", - "capacity": "1" - }, - 'properties': { - "features": [ - { - "flag": "ServiceMode", - "value": "Serverless" - } - ], - "cors": { - "allowed_origins": [ - "https://foo.com", - "https://bar.com" - ] - } - }, - 'location': 'eastus' + "tags": {"key1": "value1"}, + "sku": {"name": "Standard_S1", "tier": "Standard", "capacity": "1"}, + "properties": { + "features": [{"flag": "ServiceMode", "value": "Serverless"}], + "cors": {"allowed_origins": ["https://foo.com", "https://bar.com"]}, + }, + "location": "eastus", } - result = self.mgmt_client.signal_r.create_or_update(resource_group_name=RESOURCE_GROUP, resource_name=RESOURCE_NAME, parameters=BODY) + result = self.mgmt_client.signal_r.create_or_update( + resource_group_name=RESOURCE_GROUP, resource_name=RESOURCE_NAME, parameters=BODY + ) result = result.result() # /SignalR/get/SignalR_Get[get] @@ -98,40 +83,28 @@ def test_signalr(self, resource_group): # /SignalR/patch/SignalR_Update[patch] BODY = { - "tags": { - "key1": "value1" - }, - "sku": { - "name": "Standard_S1", - "tier": "Standard", - "capacity": "1" - }, - "properties": { - "features": [ - { - "flag": "ServiceMode", - "value": "Serverless" - } - ], - "cors": { - "allowed_origins": [ - "https://foo.com", - "https://bar.com" - ] - } - } + "tags": {"key1": "value1"}, + "sku": {"name": "Standard_S1", "tier": "Standard", "capacity": "1"}, + "properties": { + "features": [{"flag": "ServiceMode", "value": "Serverless"}], + "cors": {"allowed_origins": ["https://foo.com", "https://bar.com"]}, + }, } - result = self.mgmt_client.signal_r.update(resource_group_name=RESOURCE_GROUP, resource_name=RESOURCE_NAME, parameters=BODY) + result = self.mgmt_client.signal_r.update( + resource_group_name=RESOURCE_GROUP, resource_name=RESOURCE_NAME, parameters=BODY + ) result = result.result() # /SignalR/post/SignalR_CheckNameAvailability[post] - result = self.mgmt_client.signal_r.check_name_availability(location="eastus", type="Microsoft.SignalRService/SignalR", name="my-signalr-service") + result = self.mgmt_client.signal_r.check_name_availability( + location="eastus", type="Microsoft.SignalRService/SignalR", name="my-signalr-service" + ) # /SignalR/delete/SignalR_Delete[delete] result = self.mgmt_client.signal_r.delete(resource_group_name=RESOURCE_GROUP, resource_name=RESOURCE_NAME) result = result.result() -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/_patch.py b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/_patch.py +++ b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/_patch.py b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/_patch.py +++ b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/operations/_patch.py b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/operations/_patch.py +++ b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/models/_patch.py b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/models/_patch.py +++ b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/operations/_patch.py b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/operations/_patch.py +++ b/sdk/sitemanager/azure-mgmt-sitemanager/azure/mgmt/sitemanager/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/_patch.py b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/_patch.py +++ b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/_patch.py b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/_patch.py +++ b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/operations/_patch.py b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/operations/_patch.py +++ b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/models/_patch.py b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/models/_patch.py +++ b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/operations/_patch.py b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/operations/_patch.py +++ b/sdk/sphere/azure-mgmt-sphere/azure/mgmt/sphere/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sphere/azure-mgmt-sphere/setup.py b/sdk/sphere/azure-mgmt-sphere/setup.py index 6d21238bb4c2..ca93ecc53642 100644 --- a/sdk/sphere/azure-mgmt-sphere/setup.py +++ b/sdk/sphere/azure-mgmt-sphere/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/sphere/azure-mgmt-sphere/tests/conftest.py b/sdk/sphere/azure-mgmt-sphere/tests/conftest.py index ebf97e2b5624..9135004c1ff9 100644 --- a/sdk/sphere/azure-mgmt-sphere/tests/conftest.py +++ b/sdk/sphere/azure-mgmt-sphere/tests/conftest.py @@ -31,6 +31,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/sphere/azure-mgmt-sphere/tests/test_cli_mgmt_sphere.py b/sdk/sphere/azure-mgmt-sphere/tests/test_cli_mgmt_sphere.py index 2ed0a577fe77..04a3b0ba7fe4 100644 --- a/sdk/sphere/azure-mgmt-sphere/tests/test_cli_mgmt_sphere.py +++ b/sdk/sphere/azure-mgmt-sphere/tests/test_cli_mgmt_sphere.py @@ -1,30 +1,32 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.sphere import AzureSphereMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtSphere(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.mgmt_client = self.create_mgmt_client( - AzureSphereMgmtClient - ) + self.mgmt_client = self.create_mgmt_client(AzureSphereMgmtClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_catalogs(self, resource_group): catalog_name = "CatalogName" - catalog = self.mgmt_client.catalogs.begin_create_or_update( - resource_group_name=resource_group.name, - catalog_name=catalog_name, - resource={"location": "global"}).result().as_dict() + catalog = ( + self.mgmt_client.catalogs.begin_create_or_update( + resource_group_name=resource_group.name, catalog_name=catalog_name, resource={"location": "global"} + ) + .result() + .as_dict() + ) assert catalog["name"] == catalog_name catalog = self.mgmt_client.catalogs.get( @@ -33,9 +35,11 @@ def test_catalogs(self, resource_group): ).as_dict() assert catalog["name"] == catalog_name - catalogs = list(self.mgmt_client.catalogs.list_by_resource_group( - resource_group_name=resource_group.name, - )) + catalogs = list( + self.mgmt_client.catalogs.list_by_resource_group( + resource_group_name=resource_group.name, + ) + ) assert len(catalogs) == 1 self.mgmt_client.catalogs.begin_delete( @@ -43,7 +47,9 @@ def test_catalogs(self, resource_group): catalog_name=catalog_name, ).result() - catalogs = list(self.mgmt_client.catalogs.list_by_resource_group( - resource_group_name=resource_group.name, - )) + catalogs = list( + self.mgmt_client.catalogs.list_by_resource_group( + resource_group_name=resource_group.name, + ) + ) assert len(catalogs) == 0 diff --git a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/_patch.py b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/_patch.py +++ b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/_patch.py b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/_patch.py +++ b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/operations/_patch.py b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/operations/_patch.py +++ b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/models/_patch.py b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/models/_patch.py +++ b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/operations/_patch.py b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/operations/_patch.py +++ b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/azure/mgmt/springappdiscovery/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/setup.py b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/setup.py index 99126d242d20..dc58b1597d3c 100644 --- a/sdk/springappdiscovery/azure-mgmt-springappdiscovery/setup.py +++ b/sdk/springappdiscovery/azure-mgmt-springappdiscovery/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_patch.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_patch.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_patch.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_patch.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_patch.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_patch.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_patch.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_patch.py +++ b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/_patch.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/_patch.py +++ b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/operations/_patch.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/operations/_patch.py +++ b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_patch.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_patch.py +++ b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_patch.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_patch.py +++ b/sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py b/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py index 977f09ac1d72..2b07861cd2e9 100644 --- a/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py +++ b/sdk/sql/azure-mgmt-sqlvirtualmachine/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/standbypool/azure-mgmt-standbypool/setup.py b/sdk/standbypool/azure-mgmt-standbypool/setup.py index da184f127ffb..c05210176dcf 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/setup.py +++ b/sdk/standbypool/azure-mgmt-standbypool/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_patch.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_patch.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/_patch.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/_patch.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_patch.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/models/_patch.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/models/_patch.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/operations/_patch.py b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/aio/operations/_patch.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/aio/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_patch.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_patch.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_patch.py b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_patch.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_patch.py +++ b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/_patch.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/_patch.py +++ b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/operations/_patch.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_patch.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_patch.py +++ b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_patch.py b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storageimportexport/setup.py b/sdk/storage/azure-mgmt-storageimportexport/setup.py index f92fc8a2c2e3..b64a3368e482 100644 --- a/sdk/storage/azure-mgmt-storageimportexport/setup.py +++ b/sdk/storage/azure-mgmt-storageimportexport/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Storage Import Export Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_patch.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_patch.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_patch.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_patch.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_patch.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_patch.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_patch.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_patch.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_patch.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-mgmt-storagesync/setup.py b/sdk/storage/azure-mgmt-storagesync/setup.py index 26c9fa642a5e..df66693bec66 100644 --- a/sdk/storage/azure-mgmt-storagesync/setup.py +++ b/sdk/storage/azure-mgmt-storagesync/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/storage/azure-mgmt-storagesync/tests/disable_test_cli_mgmt_storagesync.py b/sdk/storage/azure-mgmt-storagesync/tests/disable_test_cli_mgmt_storagesync.py index 86d48c4ba40c..ca6bb2f52018 100644 --- a/sdk/storage/azure-mgmt-storagesync/tests/disable_test_cli_mgmt_storagesync.py +++ b/sdk/storage/azure-mgmt-storagesync/tests/disable_test_cli_mgmt_storagesync.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -22,16 +22,15 @@ import azure.mgmt.storagesync from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtMicrosoftStorageSyncTest(AzureMgmtTestCase): def setUp(self): super(MgmtMicrosoftStorageSyncTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.storagesync.StorageSyncManagementClient - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.storagesync.StorageSyncManagementClient) + @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_storagesync(self, resource_group): @@ -52,15 +51,14 @@ def test_storagesync(self, resource_group): LOCATION_NAME = AZURE_LOCATION # StorageSyncServices_Create[put] - BODY = { - "location": "WestUS", - "tags": {} - } + BODY = {"location": "WestUS", "tags": {}} result = self.mgmt_client.storage_sync_services.create(resource_group.name, STORAGE_SYNC_SERVICE_NAME, BODY) # SyncGroups_Create[put] BODY = {} - result = self.mgmt_client.sync_groups.create(resource_group.name, STORAGE_SYNC_SERVICE_NAME, SYNC_GROUP_NAME, BODY) + result = self.mgmt_client.sync_groups.create( + resource_group.name, STORAGE_SYNC_SERVICE_NAME, SYNC_GROUP_NAME, BODY + ) """ # RegisteredServers_Create[put] @@ -128,7 +126,9 @@ def test_storagesync(self, resource_group): """ # SyncGroups_ListByStorageSyncService[get] - result = self.mgmt_client.sync_groups.list_by_storage_sync_service(resource_group.name, STORAGE_SYNC_SERVICE_NAME) + result = self.mgmt_client.sync_groups.list_by_storage_sync_service( + resource_group.name, STORAGE_SYNC_SERVICE_NAME + ) # Workflows_ListByStorageSyncService[get] result = self.mgmt_client.workflows.list_by_storage_sync_service(resource_group.name, STORAGE_SYNC_SERVICE_NAME) @@ -253,26 +253,15 @@ def test_storagesync(self, resource_group): """ # StorageSyncServices_Update[patch] - BODY = { - "tags": { - "environment": "Test", - "dept": "IT" - } - } + BODY = {"tags": {"environment": "Test", "dept": "IT"}} result = self.mgmt_client.storage_sync_services.update(resource_group.name, STORAGE_SYNC_SERVICE_NAME, BODY) # StorageSyncServiceCheckNameAvailability_AlreadyExists[post] - BODY = { - "name": "newstoragesyncservicename", - "type": "Microsoft.StorageSync/storageSyncServices" - } + BODY = {"name": "newstoragesyncservicename", "type": "Microsoft.StorageSync/storageSyncServices"} result = self.mgmt_client.storage_sync_services.check_name_availability(LOCATION_NAME, BODY) # StorageSyncServiceCheckNameAvailability_Available[post] - BODY = { - "name": "newstoragesyncservicename", - "type": "Microsoft.StorageSync/storageSyncServices" - } + BODY = {"name": "newstoragesyncservicename", "type": "Microsoft.StorageSync/storageSyncServices"} result = self.mgmt_client.storage_sync_services.check_name_availability(LOCATION_NAME, BODY) """ @@ -296,6 +285,6 @@ def test_storagesync(self, resource_group): result = self.mgmt_client.storage_sync_services.delete(resource_group.name, STORAGE_SYNC_SERVICE_NAME) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/storage/azure-storage-extensions/setup.py b/sdk/storage/azure-storage-extensions/setup.py index abe715f89264..030d6c829773 100644 --- a/sdk/storage/azure-storage-extensions/setup.py +++ b/sdk/storage/azure-storage-extensions/setup.py @@ -11,6 +11,7 @@ class bdist_wheel_abi3(bdist_wheel): """Override bdist_wheel tag behavior to add abi3 tag.""" + def get_tag(self): python, abi, plat = super().get_tag() @@ -22,43 +23,43 @@ def get_tag(self): PACKAGE_NAME = "azure-storage-extensions" PACKAGE_PPRINT_NAME = "Azure Storage Extensions" -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") setup( name=PACKAGE_NAME, version="1.0.0b1", include_package_data=True, description=PACKAGE_PPRINT_NAME, - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='ascl@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-extensions', + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="ascl@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-extensions", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', + "Development Status :: 4 - Beta", + "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3.14', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "License :: OSI Approved :: MIT License", ], zip_safe=False, python_requires=">=3.9", - ext_package='azure.storage.extensions', + ext_package="azure.storage.extensions", ext_modules=[ Extension( - 'crc64', + "crc64", [os.path.join(package_folder_path, "crc64", "crc64module.c")], define_macros=[("Py_LIMITED_API", "3")], - py_limited_api=True + py_limited_api=True, ), ], cmdclass={"bdist_wheel": bdist_wheel_abi3}, -) \ No newline at end of file +) diff --git a/sdk/storage/azure-storage-extensions/tests/test_crc64.py b/sdk/storage/azure-storage-extensions/tests/test_crc64.py index 4202d4c892ac..b6abf62aea40 100644 --- a/sdk/storage/azure-storage-extensions/tests/test_crc64.py +++ b/sdk/storage/azure-storage-extensions/tests/test_crc64.py @@ -9,49 +9,84 @@ from azure.storage.extensions import crc64 + def test_compute_none(): with pytest.raises(TypeError): crc64.compute(None, 0) with pytest.raises(TypeError): - crc64.compute(b'', None) - -@pytest.mark.parametrize("data, initial, expected", [ - (b'', 0, 0), - (b'Hello World!', 0, 208604604655264165), - (b'123456789!@#$%^&*()', 0, 2153758901452455624), - (b'This is a test where the data is longer than 64 characters so that we can test that code path.', 0, 2736107658526394369), - (b'\xC8\xE1\x1B\x40\xD7\x93\xD1\x52\x60\x18', 0, 3386042136331673945), - (b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', 0, 10493919289952869355), - - (b'', 208604604655264165, 208604604655264165), - (b'Hello World!', 208604604655264165, 8707751150827052565), - (b'123456789!@#$%^&*()', 208604604655264165, 16914450898118618261), - (b'This is a test where the data is longer than 64 characters so that we can test that code path.', 208604604655264165, 13786689105496759098), - (b'\xC8\xE1\x1B\x40\xD7\x93\xD1\x52\x60\x18', 208604604655264165, 4570059697646401418), - (b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', 208604604655264165, 9508443584543844346), - - (b'', 2153758901452455624, 2153758901452455624), - (b'Hello World!', 2153758901452455624, 11658374609342321938), - (b'123456789!@#$%^&*()', 2153758901452455624, 17932421111440067515), - (b'This is a test where the data is longer than 64 characters so that we can test that code path.', 2153758901452455624, 4524234450386137392), - (b'\xC8\xE1\x1B\x40\xD7\x93\xD1\x52\x60\x18', 2153758901452455624, 13366433516720813220), - (b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', 2153758901452455624, 7867920104196670365), - - (b'', 12345, 12345), - (b'Hello World!', 12345, 4200897209132841242), - (b'123456789!@#$%^&*()', 12345, 1823927556695515382), - (b'This is a test where the data is longer than 64 characters so that we can test that code path.', 12345, 16182239408178475978), - (b'\xC8\xE1\x1B\x40\xD7\x93\xD1\x52\x60\x18', 12345, 5139183895903464380), - (b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', 12345, 6065674385535310669), -]) + crc64.compute(b"", None) + + +@pytest.mark.parametrize( + "data, initial, expected", + [ + (b"", 0, 0), + (b"Hello World!", 0, 208604604655264165), + (b"123456789!@#$%^&*()", 0, 2153758901452455624), + ( + b"This is a test where the data is longer than 64 characters so that we can test that code path.", + 0, + 2736107658526394369, + ), + (b"\xc8\xe1\x1b\x40\xd7\x93\xd1\x52\x60\x18", 0, 3386042136331673945), + ( + b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', + 0, + 10493919289952869355, + ), + (b"", 208604604655264165, 208604604655264165), + (b"Hello World!", 208604604655264165, 8707751150827052565), + (b"123456789!@#$%^&*()", 208604604655264165, 16914450898118618261), + ( + b"This is a test where the data is longer than 64 characters so that we can test that code path.", + 208604604655264165, + 13786689105496759098, + ), + (b"\xc8\xe1\x1b\x40\xd7\x93\xd1\x52\x60\x18", 208604604655264165, 4570059697646401418), + ( + b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', + 208604604655264165, + 9508443584543844346, + ), + (b"", 2153758901452455624, 2153758901452455624), + (b"Hello World!", 2153758901452455624, 11658374609342321938), + (b"123456789!@#$%^&*()", 2153758901452455624, 17932421111440067515), + ( + b"This is a test where the data is longer than 64 characters so that we can test that code path.", + 2153758901452455624, + 4524234450386137392, + ), + (b"\xc8\xe1\x1b\x40\xd7\x93\xd1\x52\x60\x18", 2153758901452455624, 13366433516720813220), + ( + b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', + 2153758901452455624, + 7867920104196670365, + ), + (b"", 12345, 12345), + (b"Hello World!", 12345, 4200897209132841242), + (b"123456789!@#$%^&*()", 12345, 1823927556695515382), + ( + b"This is a test where the data is longer than 64 characters so that we can test that code path.", + 12345, + 16182239408178475978, + ), + (b"\xc8\xe1\x1b\x40\xd7\x93\xd1\x52\x60\x18", 12345, 5139183895903464380), + ( + b'6QYd.$\xd9n\xf5\xc0\xec\x17Y\xcap\xc9D\xf7\x03fn}]\xfc\x18\xb4\xdd\xf0oK\xb6W~\xffs{\xbf\x98\xf9Xs\xb6\xcd\x10\x07Fmbz\x0e\xbbH\x02\xaa\xec\xecr\x12\x95\xf24\xb2\xc3;\x81\xd3\xa5\xdc\xfeM(\xdaVs\x99\x1a\x915q\xc1#\xc2\xe8\xe7\xf6eE\xc7J\xe1dC\x91@\x89\t1\x84\xdeG\xb3\xd6G\x11\xf6\x13\xd6\x85j\xc9q@\xce\xbd\xfc{0\xc9\xbe*\x90\x02U&&F\xe0\xde\xd3 \x02\x1e\xad\xae\xfd5\xea\xb0\xe1XW\x1f\xb0\x13N\xd3\x8c\xae\x07\x928\xf0\x98\x91\xac\xfa\xd1\x9cO\x990\x85\xc3\x91\xbbh\xac\x83\xf59{\xa5\xca\x07\r]\xb1\x80W\xde\xbd\xa6\x08\n!\xe7\x02\xfeK\xe9B\x95\x08l\xa6~\xad\xf1J\x02\r\x01\x1f)&.\x95\x1c\x11\x0b\x15\xb0a\x81V\xa9]\xa0\xed\x01\xc8\xd0%\x02\x14"\x7f\xddI\xd2\x08\xd5"6\xe2y\xf3\xe8\xf6\x0f\xedn\x8e\x96\x8b\xf3{~\xbaf"T\xfc\x17\xd7lP\xab\xbb\xb2\xf5\xf0\xfaF\x13\xaaV>\x896\xc9\x8dBM\xb3\x0eO\x9b\xf9\x7f\xe9LJ\xc6\x8bQ\x81cA\xac\xe1\x82\x10\x9bT\r\xb9\x8au\xbdN\xbd\xa3\x00\x16nz1ZF8R\xa4\x18\xf3\x85\x17\xfa;\xd7k,\to\xebc\xd0\x1f\xd5N\xfbX\x88\xb6\x9e\xf3\x85\x83\xb4\xd9\xd9\xfc<\xe5\x94I\xc8\x19\xfb>\xe2\x97A\xbc\xaf\xa2\xee\xb7\xd7\x93\x08\xd8b\x9b\x9b\x83\xb9\xd0\x93\xbf\xb5\x9d\xbb,\x10\x04|\xfc\xf0\xad\xc7\xb3\xd1X6\xdc\xf53\x0e\xb96I\x1ajj`\xdd\xac:\x06/H\xe3/}\x8e4\xbae\xf8\x0e\x88\xd5\x99\xdf/\x15\xb9C\xb4Yu\xba\x19\xdd;4,\x81l\xb0S\xd7D\x02\x8e\xd5zX\\\x88\xa7\xcb\xe3QX(\xe5\x08\xc9\xf9\xaa\xcc\x85\xbc\xb4l\x84"\x1a\xe4\xc0!\xaa\x1b\x15\xcc%\xe6\xa1\xee\x11V\x8cu\xa6\xd3Xe\x9d\xa4\xd3\xbb\xbaN7\x8b\xf3\x98\xd2\xcd\x99\xfc\xddv<\xad{\xd8\xc5\xc0R\n\x11\xe8L\xab\x19\xbf\xf6w\x88\x18\xb3bg\x15\\0:q\x95\x8b%\xb9;\xadr\x96\x98\xe6\xea?\xb4\xb7\x04c<\t:\x87G\x97%\xde\xd2\x83\xbb\xa7\xe7n\xc6\'WY\xc7yP\xad\x0bC\x7f\xf8\x02c#\xc0\xc8$\x81\xa1\xb6\xbb\xa9\xcb\xcf\xae?Z\x1aP\x1e?"\xa5\xc0\xb8J\xea=\xa7\xc39\xb9}M\x84\xd9mKd\x05\x9f\x1a\x10\x99q\xefji\xbf\xf4\xbc\xdf\xd7\xb2e\xcd\xbc>\x05uL\x05\xac\xbd\xfa\xfc\xbd`R0\t\x19eu\n\xc9Y\xa2e\xfd\x84 >\xb0\xf7\xfb\xbe!\xb0\x80\x89W\nO\x8f\x14)\x00\xc1E\xf5[\xd4\xae\x7f\xbfn\xba\x81}\'\x14M\x9b\xc6\x13\xd6\xcd\x1aph\xd6!-\xe5`\xd2h\x1e\xe6\xa20\xf1\x1eH\xe3\x80\x0e\xde\x06\x93\xdb\x10B\xaa:\xb0N\x81F\x07\xde8z\xb9\xd1KQB_\xf3\xb9\xae\x88\\q%\xc0\x07\xf8;-V\xc0\x9f\x1aX\xc7\xee8\x9a\x1dO\x18\xb3X\x8c\x85\xcf\xf15eg\xa3\xaft:\xbc\x1f\x1bA\xfa/T\xf1\x1c\xe4\xe7\xe7Ot\x06\xcc\xaf\xfe\x166C\xd5x\xf9d%\x9c~q"\x16\xf5\xb8\xb4~UN\x00\x88\xad\xa6]\xb2\x18\x7f7\xa0\xca\x83)QL\xe1\xe1jP\xd2\x7f(\x1fj\xed1W\xe9\xf1\x8c\xa6\xe4f\xbd\xab\x80\xd0\x88\xb7\x9d\xa9\x1e\x9c\xaf"~\x0b\\\x99<\x02r\x15\xfco\x00\xa2,\xa9\xc5Lv\x0ez\x1b\xc8Y\xbe,\xe2%QTUf!\x9b\xee\x11\xa4\xe6\x18\x87\xe8\xb9\xfb\x14\xfb/\xfa9\xd7Ag\x95\x035\xc7\x15EA\x06\x15n+T\xdb\xf6\x05,-;\x80s(\xca}\xd6\xbf{\x87\xe0 XB\xf3r.z\xf512)\xc8\x07\xc7v\xd7S\x10\x80\xc2\xd1\x1e`\xfb\xf2\xf8O=\x08\xc3\xc7\x8fe\xea31HKF\xa6\xc6\x1a\xc75\xbc\xa7\xac\xb5\xc4\xf4\xd3]\xb8\xd85Z\x97\xba\xee\xf9\xf6\xa32-{\xdb\xe6?q\x13:\x93\x18\x91\x00(\x06\x91\xda=\x98E5r\x17\xf5z\x8b\xabt\xe4\xaax\x17C\x14\xf5\xa7\x10 \xa5\x81\x9d\xc0\xe5\x86', + 12345, + 6065674385535310669, + ), + ], +) def test_compute(data, initial, expected): actual = crc64.compute(data, initial) assert actual == expected + @pytest.mark.parametrize("size", [1024, 4 * 1024 * 1024, 1 * 1024 * 1024 * 1024, 3 * 1024 * 1024 * 1024]) def test_compute_chunks(size): - data = b'' + data = b"" while len(data) < size: length = min(size - len(data), 1 * 1024 * 1024 * 1024) data += os.urandom(length) @@ -68,40 +103,139 @@ def test_compute_chunks(size): assert crc == full_crc -@pytest.mark.parametrize("crc1, size1, crc2, size2, expected", [ - (0, 0, 0, 0, 0), - (17360427831495520774, 949533, 13068224794440996385, 99043, 2942932174470096852), - (11788770130477425887, 505156, 11825964890373840515, 543420, 11679439596881108042), - (3295333047304801182, 732633, 15304759627474960884, 315943, 31840984168952505), - (16590039424904606984, 550299, 6063316096266934453, 498277, 4430932446378441680), - (4505532069077416052, 852279, 4910763717047934640, 196297, 15119506491662968913), - (390777554329396866, 834642, 2639871931800812330, 213934, 11705441749781302341), - (3373070654000205532, 282713, 998330282635826126, 765863, 9830625244855600085), - (2124306943908111903, 737293, 11017351202683543503, 311283, 8163771928713973931), - (15994440356403990005, 85861, 13803536430055425947, 962715, 1941624554903785510), - (3705122932895036835, 444701, 17573219681510991482, 603875, 4421337306620606216), -]) + +@pytest.mark.parametrize( + "crc1, size1, crc2, size2, expected", + [ + (0, 0, 0, 0, 0), + (17360427831495520774, 949533, 13068224794440996385, 99043, 2942932174470096852), + (11788770130477425887, 505156, 11825964890373840515, 543420, 11679439596881108042), + (3295333047304801182, 732633, 15304759627474960884, 315943, 31840984168952505), + (16590039424904606984, 550299, 6063316096266934453, 498277, 4430932446378441680), + (4505532069077416052, 852279, 4910763717047934640, 196297, 15119506491662968913), + (390777554329396866, 834642, 2639871931800812330, 213934, 11705441749781302341), + (3373070654000205532, 282713, 998330282635826126, 765863, 9830625244855600085), + (2124306943908111903, 737293, 11017351202683543503, 311283, 8163771928713973931), + (15994440356403990005, 85861, 13803536430055425947, 962715, 1941624554903785510), + (3705122932895036835, 444701, 17573219681510991482, 603875, 4421337306620606216), + ], +) def test_concat(crc1, size1, crc2, size2, expected): actaul = crc64.concat(0, 0, crc1, size1, 0, crc2, size2) assert actaul == expected -@pytest.mark.parametrize("initial, initial1, crc1, size1, initial2, crc2, size2, expected", [ - (0, 0, 0, 0, 0, 0, 0, 0), - (556425425686929588, 346224202686926702, 16342296696377857982, 332915, 1153230192133190692, 12153371329672466699, 715661, 1441822370130745021), - (6707243468313456313, 572263087298867634, 16994544883182326144, 75745, 9131338361339398429, 10182915179976307502, 972831, 14966971284513070994), - (5753644013440131291, 5049702011265556767, 17549647897932809624, 255140, 7204171574261853450, 1993084328138883374, 793436, 6041621697050742380), - (6856094926385348025, 5380840211500611709, 9696539459657763690, 537777, 4787042077805010903, 13660128687379374948, 510799, 17784586126519415898), - (7768574238870932405, 97145001356670685, 607054043350981298, 706788, 667444555190985522, 10677778047180339455, 341788, 5763961866513573791), - (3302120679354661969, 7763531798276712053, 8827557196489825944, 490442, 8582969104890206846, 6702182603435500761, 558134, 4787302867829109706), - (7553023568245626261, 9093436341919279996, 10815569438302788871, 785480, 8305342016037017917, 6633140726058569127, 263096, 14625483825524673467), - (8894905328920043035, 9101951045389247372, 10098427678135105249, 782758, 8101576936188464286, 8318237935995533450, 265818, 5983082645903611588), - (1084935736425738155, 5378644106529179816, 13762475631325587388, 1014816, 8473418370223760471, 10401355811619715622, 33760, 3692020299859515126), - (889000539881195835, 2971048229276949174, 5346315327374690144, 307387, 1407121768110541356, 10535852615249992663, 741189, 3634018251978804152), -]) + +@pytest.mark.parametrize( + "initial, initial1, crc1, size1, initial2, crc2, size2, expected", + [ + (0, 0, 0, 0, 0, 0, 0, 0), + ( + 556425425686929588, + 346224202686926702, + 16342296696377857982, + 332915, + 1153230192133190692, + 12153371329672466699, + 715661, + 1441822370130745021, + ), + ( + 6707243468313456313, + 572263087298867634, + 16994544883182326144, + 75745, + 9131338361339398429, + 10182915179976307502, + 972831, + 14966971284513070994, + ), + ( + 5753644013440131291, + 5049702011265556767, + 17549647897932809624, + 255140, + 7204171574261853450, + 1993084328138883374, + 793436, + 6041621697050742380, + ), + ( + 6856094926385348025, + 5380840211500611709, + 9696539459657763690, + 537777, + 4787042077805010903, + 13660128687379374948, + 510799, + 17784586126519415898, + ), + ( + 7768574238870932405, + 97145001356670685, + 607054043350981298, + 706788, + 667444555190985522, + 10677778047180339455, + 341788, + 5763961866513573791, + ), + ( + 3302120679354661969, + 7763531798276712053, + 8827557196489825944, + 490442, + 8582969104890206846, + 6702182603435500761, + 558134, + 4787302867829109706, + ), + ( + 7553023568245626261, + 9093436341919279996, + 10815569438302788871, + 785480, + 8305342016037017917, + 6633140726058569127, + 263096, + 14625483825524673467, + ), + ( + 8894905328920043035, + 9101951045389247372, + 10098427678135105249, + 782758, + 8101576936188464286, + 8318237935995533450, + 265818, + 5983082645903611588, + ), + ( + 1084935736425738155, + 5378644106529179816, + 13762475631325587388, + 1014816, + 8473418370223760471, + 10401355811619715622, + 33760, + 3692020299859515126, + ), + ( + 889000539881195835, + 2971048229276949174, + 5346315327374690144, + 307387, + 1407121768110541356, + 10535852615249992663, + 741189, + 3634018251978804152, + ), + ], +) def test_concat__with_initials(initial, initial1, crc1, size1, initial2, crc2, size2, expected): actaul = crc64.concat(initial, initial1, crc1, size1, initial2, crc2, size2) assert actaul == expected + def test_concat_chunks(): data = os.urandom(4 * 1024 * 1024) chunk_size = 1024 * 1024 diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/operations/_patch.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/operations/_patch.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/models/_patch.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/models/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/models/_patch.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/models/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/operations/_patch.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/operations/_patch.py index 5755fd181b3f..2e25743cab74 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/operations/_patch.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_generated/operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py index 7812bffb9602..d7132334eb32 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py @@ -586,12 +586,10 @@ def send_message( encryption_version=self.encryption_version, ) except TypeError: - warnings.warn( - "TypeError when calling message_encode_policy.configure. \ + warnings.warn("TypeError when calling message_encode_policy.configure. \ It is likely missing the encryption_version parameter. \ Consider updating your encryption information/implementation. \ - Retrying without encryption_version." - ) + Retrying without encryption_version.") self._message_encode_policy.configure( require_encryption=self.require_encryption, key_encryption_key=self.key_encryption_key, @@ -876,12 +874,10 @@ def update_message( encryption_version=self.encryption_version, ) except TypeError: - warnings.warn( - "TypeError when calling message_encode_policy.configure. \ + warnings.warn("TypeError when calling message_encode_policy.configure. \ It is likely missing the encryption_version parameter. \ Consider updating your encryption information/implementation. \ - Retrying without encryption_version." - ) + Retrying without encryption_version.") self._message_encode_policy.configure( self.require_encryption, self.key_encryption_key, self.key_resolver_function ) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/constants.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/constants.py index 50c760369faa..4258c07ada04 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/constants.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/constants.py @@ -6,7 +6,6 @@ from .._serialize import _SUPPORTED_API_VERSIONS - X_MS_VERSION = _SUPPORTED_API_VERSIONS[-1] # Connection defaults diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py index b23f65859690..699635565b18 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py @@ -12,7 +12,6 @@ import isodate - _LOGGER = logging.getLogger(__name__) _REQUEST_DELIMITER_PREFIX = "batch_" diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py index 40faa840cfbf..7a14167f328c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py @@ -21,7 +21,6 @@ from .models import get_enum_value, StorageErrorCode, UserDelegationKey from .parser import _to_utc_datetime - SV_DOCS_URL = "https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services" _LOGGER = logging.getLogger(__name__) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py index 7a5fb3f3dc91..88d52eab5d12 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py @@ -16,7 +16,6 @@ from .request_handlers import get_length from .response_handlers import return_response_headers - _LARGE_BLOB_UPLOAD_MAX_READ_BUFFER_SIZE = 4 * 1024 * 1024 _ERROR_VALUE_SHOULD_BE_SEEKABLE_STREAM = "{0} should be a seekable file-like/io.IOBase type stream object." diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py index 434d5fe99bba..114731165ee8 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/__init__.py @@ -7,7 +7,6 @@ from ._queue_client_async import QueueClient from ._queue_service_client_async import QueueServiceClient - __all__ = [ "QueueClient", "QueueServiceClient", diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/_queue_client_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/_queue_client_async.py index 5134ea26a5ad..4e1a70d92eb2 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/_queue_client_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/_queue_client_async.py @@ -602,12 +602,10 @@ async def send_message( encryption_version=self.encryption_version, ) except TypeError: - warnings.warn( - "TypeError when calling message_encode_policy.configure. \ + warnings.warn("TypeError when calling message_encode_policy.configure. \ It is likely missing the encryption_version parameter. \ Consider updating your encryption information/implementation. \ - Retrying without encryption_version." - ) + Retrying without encryption_version.") self._message_encode_policy.configure( require_encryption=self.require_encryption, key_encryption_key=self.key_encryption_key, @@ -882,12 +880,10 @@ async def update_message( encryption_version=self.encryption_version, ) except TypeError: - warnings.warn( - "TypeError when calling message_encode_policy.configure. \ + warnings.warn("TypeError when calling message_encode_policy.configure. \ It is likely missing the encryption_version parameter. \ Consider updating your encryption information/implementation. \ - Retrying without encryption_version." - ) + Retrying without encryption_version.") self._message_encode_policy.configure( self.require_encryption, self.key_encryption_key, self.key_resolver_function ) diff --git a/sdk/storage/azure-storage-queue/samples/queue_samples_authentication.py b/sdk/storage/azure-storage-queue/samples/queue_samples_authentication.py index 6219caf5436b..ee59e6819eda 100644 --- a/sdk/storage/azure-storage-queue/samples/queue_samples_authentication.py +++ b/sdk/storage/azure-storage-queue/samples/queue_samples_authentication.py @@ -25,7 +25,6 @@ 4) STORAGE_ACCOUNT_KEY - the storage account access key """ - from datetime import datetime, timedelta import os import sys diff --git a/sdk/storage/azure-storage-queue/samples/queue_samples_authentication_async.py b/sdk/storage/azure-storage-queue/samples/queue_samples_authentication_async.py index c109df896b73..de396d313df6 100644 --- a/sdk/storage/azure-storage-queue/samples/queue_samples_authentication_async.py +++ b/sdk/storage/azure-storage-queue/samples/queue_samples_authentication_async.py @@ -25,7 +25,6 @@ 4) STORAGE_ACCOUNT_KEY - the storage account access key """ - from datetime import datetime, timedelta import asyncio import os diff --git a/sdk/storage/azure-storage-queue/samples/queue_samples_hello_world_async.py b/sdk/storage/azure-storage-queue/samples/queue_samples_hello_world_async.py index 46803f90cda5..ed83526448ba 100644 --- a/sdk/storage/azure-storage-queue/samples/queue_samples_hello_world_async.py +++ b/sdk/storage/azure-storage-queue/samples/queue_samples_hello_world_async.py @@ -20,7 +20,6 @@ 1) STORAGE_CONNECTION_STRING - the connection string to your storage account """ - import asyncio import os import sys diff --git a/sdk/storage/azure-storage-queue/samples/queue_samples_message.py b/sdk/storage/azure-storage-queue/samples/queue_samples_message.py index 1320ab463224..df91a011a4aa 100644 --- a/sdk/storage/azure-storage-queue/samples/queue_samples_message.py +++ b/sdk/storage/azure-storage-queue/samples/queue_samples_message.py @@ -22,7 +22,6 @@ 1) STORAGE_CONNECTION_STRING - the connection string to your storage account """ - from datetime import datetime, timedelta import os import sys diff --git a/sdk/storage/azure-storage-queue/samples/queue_samples_service_async.py b/sdk/storage/azure-storage-queue/samples/queue_samples_service_async.py index 7b6d669fa6f5..ec7a566ecaa3 100644 --- a/sdk/storage/azure-storage-queue/samples/queue_samples_service_async.py +++ b/sdk/storage/azure-storage-queue/samples/queue_samples_service_async.py @@ -20,7 +20,6 @@ 1) STORAGE_CONNECTION_STRING - the connection string to your storage account """ - import asyncio import os import sys diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py b/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py index 2afdab424c7c..22d438b902f4 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py @@ -10,7 +10,6 @@ from devtools_testutils.storage import StorageRecordedTestCase - # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py index 3f3dc8ad6a5a..2b93b1a1e60b 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py @@ -10,7 +10,6 @@ from devtools_testutils.storage.aio import AsyncStorageRecordedTestCase - # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py b/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py index 9aab6293c2f7..d48806033922 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py @@ -41,7 +41,6 @@ from encryption_test_helper import KeyResolver, KeyWrapper, mock_urandom, RSAKeyWrapper from settings.testcase import QueuePreparer - # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = "encryptionqueue" # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py index 6d154ecf46a2..0a8a50aca9e1 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py @@ -15,7 +15,6 @@ from devtools_testutils.storage import StorageRecordedTestCase from settings.testcase import QueuePreparer - # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage/setup.py b/sdk/storage/azure-storage/setup.py index 3bc2273555e0..b5e6c4cbbf36 100644 --- a/sdk/storage/azure-storage/setup.py +++ b/sdk/storage/azure-storage/setup.py @@ -1,15 +1,14 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from setuptools import setup import sys - message = """ Starting with v0.37.0, the 'azure-storage' meta-package is deprecated and cannot be installed anymore. @@ -28,27 +27,27 @@ if "sdist" in sys.argv: setup( - name='azure-storage', - version='0.37.0', - description='Microsoft Azure Storage SDK for Python', - long_description=open('README.md', 'r').read(), - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + name="azure-storage", + version="0.37.0", + description="Microsoft Azure Storage SDK for Python", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 7 - Inactive', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'License :: OSI Approved :: MIT License', + "Development Status :: 7 - Inactive", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License", ], zip_safe=False, ) diff --git a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/_patch.py b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/_patch.py +++ b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/_patch.py b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/_patch.py +++ b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/operations/_patch.py b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/operations/_patch.py +++ b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/models/_patch.py b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/models/_patch.py +++ b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/operations/_patch.py b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/operations/_patch.py +++ b/sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storageactions/azure-mgmt-storageactions/setup.py b/sdk/storageactions/azure-mgmt-storageactions/setup.py index 90b3b1590dea..d78acf76e38b 100644 --- a/sdk/storageactions/azure-mgmt-storageactions/setup.py +++ b/sdk/storageactions/azure-mgmt-storageactions/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/_patch.py b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/_patch.py +++ b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/_patch.py b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/_patch.py +++ b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/operations/_patch.py b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/operations/_patch.py +++ b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/models/_patch.py b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/models/_patch.py +++ b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/operations/_patch.py b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/operations/_patch.py +++ b/sdk/storagediscovery/azure-mgmt-storagediscovery/azure/mgmt/storagediscovery/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/_patch.py b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/_patch.py +++ b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/_patch.py b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/_patch.py +++ b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/operations/_patch.py b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/operations/_patch.py +++ b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/models/_patch.py b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/models/_patch.py +++ b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/operations/_patch.py b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/operations/_patch.py +++ b/sdk/storagemover/azure-mgmt-storagemover/azure/mgmt/storagemover/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagemover/azure-mgmt-storagemover/setup.py b/sdk/storagemover/azure-mgmt-storagemover/setup.py index 9b04ee31f15c..ae8dad167e0f 100644 --- a/sdk/storagemover/azure-mgmt-storagemover/setup.py +++ b/sdk/storagemover/azure-mgmt-storagemover/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/_patch.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/_patch.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/_patch.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/_patch.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_patch.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_patch.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_patch.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_patch.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_patch.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_patch.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/storagepool/azure-mgmt-storagepool/setup.py b/sdk/storagepool/azure-mgmt-storagepool/setup.py index 31217950efdf..eff6014940db 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/setup.py +++ b/sdk/storagepool/azure-mgmt-storagepool/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Storage Pool Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_patch.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_patch.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_patch.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_patch.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_patch.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_patch.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_patch.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_patch.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_patch.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_patch.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/setup.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/setup.py index 81511cdf3d60..5b5c7daf1f2f 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/setup.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/conftest.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/conftest.py index 587e126e50b0..85d1adc3301c 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/conftest.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/conftest.py @@ -35,6 +35,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +48,4 @@ def add_sanitizers(test_proxy): add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") \ No newline at end of file + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/test_cli_mgmt_streamanalytics.py b/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/test_cli_mgmt_streamanalytics.py index 25b6b9942412..9325dda97cff 100644 --- a/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/test_cli_mgmt_streamanalytics.py +++ b/sdk/streamanalytics/azure-mgmt-streamanalytics/tests/test_cli_mgmt_streamanalytics.py @@ -1,15 +1,16 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- from azure.mgmt.streamanalytics import StreamAnalyticsManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class TestMgmtStreamAnalytics(AzureMgmtRecordedTestCase): diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_patch.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_patch.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/_patch.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/_patch.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/operations/_patch.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/operations/_patch.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_patch.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_patch.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_patch.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_patch.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/subscription/azure-mgmt-subscription/setup.py b/sdk/subscription/azure-mgmt-subscription/setup.py index 29ea384141dc..67a540c9c46f 100644 --- a/sdk/subscription/azure-mgmt-subscription/setup.py +++ b/sdk/subscription/azure-mgmt-subscription/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Subscription Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/subscription/azure-mgmt-subscription/tests/conftest.py b/sdk/subscription/azure-mgmt-subscription/tests/conftest.py index dbd200dc67c5..4eb9f14ffe84 100644 --- a/sdk/subscription/azure-mgmt-subscription/tests/conftest.py +++ b/sdk/subscription/azure-mgmt-subscription/tests/conftest.py @@ -40,6 +40,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/subscription/azure-mgmt-subscription/tests/test_mgmt_subscription.py b/sdk/subscription/azure-mgmt-subscription/tests/test_mgmt_subscription.py index 51ef20a0e326..0ce888b9565f 100644 --- a/sdk/subscription/azure-mgmt-subscription/tests/test_mgmt_subscription.py +++ b/sdk/subscription/azure-mgmt-subscription/tests/test_mgmt_subscription.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import unittest import azure.mgmt.subscription @@ -14,15 +14,14 @@ class TestMgmtSubscription(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.subscription.SubscriptionClient - ) + self.mgmt_client = self.create_mgmt_client(azure.mgmt.subscription.SubscriptionClient) + @recorded_by_proxy def test_subscriptions_list(self): result = self.mgmt_client.subscriptions.list() assert list(result) is not None -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/_patch.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/_patch.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_patch.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_patch.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_patch.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_patch.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_patch.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_patch.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_patch.py b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_patch.py +++ b/sdk/support/azure-mgmt-support/azure/mgmt/support/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/support/azure-mgmt-support/setup.py b/sdk/support/azure-mgmt-support/setup.py index 4aafdd3ea16f..fd6b591c048c 100644 --- a/sdk/support/azure-mgmt-support/setup.py +++ b/sdk/support/azure-mgmt-support/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/support/azure-mgmt-support/tests/disable_test_cli_mgmt_support.py b/sdk/support/azure-mgmt-support/tests/disable_test_cli_mgmt_support.py index 605209497aa0..add0ee4941be 100644 --- a/sdk/support/azure-mgmt-support/tests/disable_test_cli_mgmt_support.py +++ b/sdk/support/azure-mgmt-support/tests/disable_test_cli_mgmt_support.py @@ -1,10 +1,10 @@ # coding: utf-8 -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- # TEST SCENARIO COVERAGE @@ -21,16 +21,15 @@ import azure.mgmt.support from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer -AZURE_LOCATION = 'eastus' +AZURE_LOCATION = "eastus" + class MgmtMicrosoftSupportTest(AzureMgmtTestCase): def setUp(self): super(MgmtMicrosoftSupportTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.support.MicrosoftSupport - ) - + self.mgmt_client = self.create_mgmt_client(azure.mgmt.support.MicrosoftSupport) + @unittest.skip("skip test") @ResourceGroupPreparer(location=AZURE_LOCATION) def test_support(self, resource_group): @@ -46,431 +45,397 @@ def test_support(self, resource_group): # /SupportTickets/put/Create a ticket to request Quota increase for Low-priority cores for a Batch account[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Account", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Account", + "quota_change_requests": [ + {"region": "EastUS", "payload": '{"AccountName":"test","NewLimit":200,"Type":"LowPriority"}'} + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Servers for Azure Synapse Analytics[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Servers", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"NewLimit\":200}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Servers", + "quota_change_requests": [{"region": "EastUS", "payload": '{"NewLimit":200}'}], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for DTUs for Azure Synapse Analytics[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "DTUs", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"ServerName\":\"testserver\",\"NewLimit\":54000}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "DTUs", + "quota_change_requests": [ + {"region": "EastUS", "payload": '{"ServerName":"testserver","NewLimit":54000}'} + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Servers for SQL Database[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Servers", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"NewLimit\":200}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Servers", + "quota_change_requests": [{"region": "EastUS", "payload": '{"NewLimit":200}'}], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for DTUs for SQL Database[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "DTUs", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"ServerName\":\"testserver\",\"NewLimit\":54000}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "DTUs", + "quota_change_requests": [ + {"region": "EastUS", "payload": '{"ServerName":"testserver","NewLimit":54000}'} + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for specific VM family cores for Machine Learning service[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "BatchAml", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "BatchAml", + "quota_change_requests": [ + { + "region": "EastUS", + "payload": '{"VMFamily":"standardA0_A7Family","NewLimit":200,"Type":"Dedicated"}', + } + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Active Jobs and Job Schedules for a Batch account[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Account", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Account", + "quota_change_requests": [ + {"region": "EastUS", "payload": '{"AccountName":"test","NewLimit":200,"Type":"Jobs"}'} + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Pools for a Batch account[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Account", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Account", + "quota_change_requests": [ + {"region": "EastUS", "payload": '{"AccountName":"test","NewLimit":200,"Type":"Pools"}'} + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for specific VM family cores for a Batch account[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Account", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Account", + "quota_change_requests": [ + { + "region": "EastUS", + "payload": '{"AccountName":"test","VMFamily":"standardA0_A7Family","NewLimit":200,"Type":"Dedicated"}', + } + ], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket for Billing related issues[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/billing_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - } + "service_id": "/providers/Microsoft.Support/services/billing_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket for Subscription Management related issues[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/subscription_management_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - } + "service_id": "/providers/Microsoft.Support/services/subscription_management_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Low-priority cores for Machine Learning service[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "BatchAml", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"NewLimit\":200,\"Type\":\"LowPriority\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "BatchAml", + "quota_change_requests": [{"region": "EastUS", "payload": '{"NewLimit":200,"Type":"LowPriority"}'}], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket for Technical issue related to a specific resource[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "technical_ticket_details": { - "resource_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Compute/virtualMachines/" + VIRTUAL_MACHINE_NAME + "" - } + "service_id": "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "technical_ticket_details": { + "resource_id": "/subscriptions/" + + SUBSCRIPTION_ID + + "/resourceGroups/" + + RESOURCE_GROUP + + "/providers/Microsoft.Compute/virtualMachines/" + + VIRTUAL_MACHINE_NAME + + "" + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Compute VM Cores[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_requests": [{"region": "EastUS", "payload": '{"SKU":"DSv3 Series","NewLimit":104}'}], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /SupportTickets/put/Create a ticket to request Quota increase for Batch accounts for a subscription[put] BODY = { - "service_id": "/providers/Microsoft.Support/services/quota_service_guid", - "title": "my title", - "description": "my description", - "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", - "severity": "moderate", - "contact_details": { - "first_name": "abc", - "last_name": "xyz", - "primary_email_address": "abc@contoso.com", - "preferred_contact_method": "email", - "preferred_time_zone": "Pacific Standard Time", - "preferred_support_language": "en-US", - "country": "usa" - }, - "quota_ticket_details": { - "quota_change_request_version": "1.0", - "quota_change_request_sub_type": "Subscription", - "quota_change_requests": [ - { - "region": "EastUS", - "payload": "{\"NewLimit\":200,\"Type\":\"Account\"}" - } - ] - } + "service_id": "/providers/Microsoft.Support/services/quota_service_guid", + "title": "my title", + "description": "my description", + "problem_classification_id": "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + "severity": "moderate", + "contact_details": { + "first_name": "abc", + "last_name": "xyz", + "primary_email_address": "abc@contoso.com", + "preferred_contact_method": "email", + "preferred_time_zone": "Pacific Standard Time", + "preferred_support_language": "en-US", + "country": "usa", + }, + "quota_ticket_details": { + "quota_change_request_version": "1.0", + "quota_change_request_sub_type": "Subscription", + "quota_change_requests": [{"region": "EastUS", "payload": '{"NewLimit":200,"Type":"Account"}'}], + }, } # result = self.mgmt_client.support_tickets.create(support_ticket_name=SUPPORT_TICKET_NAME, create_support_ticket_parameters=BODY) # result = result.result() # /Communications/put/AddCommunicationToSubscriptionTicket[put] BODY = { - "subject": "This is a test message from a customer!", - "body": "This is a test message from a customer!", - "sender": "user@contoso.com" + "subject": "This is a test message from a customer!", + "body": "This is a test message from a customer!", + "sender": "user@contoso.com", } # result = self.mgmt_client.communications.create(support_ticket_name=SUPPORT_TICKET_NAME, communication_name=COMMUNICATION_NAME, create_communication_parameters=BODY) # result = result.result() @@ -488,7 +453,9 @@ def test_support(self, resource_group): # result = self.mgmt_client.communications.list(support_ticket_name=SUPPORT_TICKET_NAME, filter="communicationType eq 'web' and createdDate ge 2020-03-10T22:08:51Z") # /ProblemClassifications/get/Gets details of problemClassification for Azure service[get] - result = self.mgmt_client.problem_classifications.get(service_name=SERVICE_NAME, problem_classification_name=PROBLEM_CLASSIFICATION_NAME) + result = self.mgmt_client.problem_classifications.get( + service_name=SERVICE_NAME, problem_classification_name=PROBLEM_CLASSIFICATION_NAME + ) # /SupportTickets/get/Get details of a subscription ticket[get] # result = self.mgmt_client.support_tickets.get(support_ticket_name=SUPPORT_TICKET_NAME) @@ -500,49 +467,48 @@ def test_support(self, resource_group): result = self.mgmt_client.problem_classifications.list(service_name=SERVICE_NAME) # /SupportTickets/get/List support tickets created on or after a certain date and in open state for a subscription[get] - result = self.mgmt_client.support_tickets.list(filter="createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'") + result = self.mgmt_client.support_tickets.list( + filter="createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'" + ) # /Services/get/Gets list of services for which a support ticket can be created[get] result = self.mgmt_client.services.list() # /Communications/post/Checks whether name is available for Communication resource[post] - result = self.mgmt_client.communications.check_name_availability(support_ticket_name=SUPPORT_TICKET_NAME, name="sampleName", type="Microsoft.Support/communications") + result = self.mgmt_client.communications.check_name_availability( + support_ticket_name=SUPPORT_TICKET_NAME, name="sampleName", type="Microsoft.Support/communications" + ) # /SupportTickets/patch/Update contact details of a support ticket[patch] BODY = { - "contact_details": { - "first_name": "first name", - "last_name": "last name", - "preferred_contact_method": "email", - "primary_email_address": "test.name@contoso.com", - "additional_email_addresses": [ - "tname@contoso.com", - "teamtest@contoso.com" - ], - "phone_number": "123-456-7890", - "preferred_time_zone": "Pacific Standard Time", - "country": "USA", - "preferred_support_language": "en-US" - } + "contact_details": { + "first_name": "first name", + "last_name": "last name", + "preferred_contact_method": "email", + "primary_email_address": "test.name@contoso.com", + "additional_email_addresses": ["tname@contoso.com", "teamtest@contoso.com"], + "phone_number": "123-456-7890", + "preferred_time_zone": "Pacific Standard Time", + "country": "USA", + "preferred_support_language": "en-US", + } } # result = self.mgmt_client.support_tickets.update(support_ticket_name=SUPPORT_TICKET_NAME, update_support_ticket=BODY) # /SupportTickets/patch/Update severity of a support ticket[patch] - BODY = { - "severity": "critical" - } + BODY = {"severity": "critical"} # result = self.mgmt_client.support_tickets.update(support_ticket_name=SUPPORT_TICKET_NAME, update_support_ticket=BODY) # /SupportTickets/patch/Update status of a support ticket[patch] - BODY = { - "status": "closed" - } + BODY = {"status": "closed"} # result = self.mgmt_client.support_tickets.update(support_ticket_name=SUPPORT_TICKET_NAME, update_support_ticket=BODY) # /SupportTickets/post/Checks whether name is available for SupportTicket resource[post] - result = self.mgmt_client.support_tickets.check_name_availability(name="sampleName", type="Microsoft.Support/supportTickets") + result = self.mgmt_client.support_tickets.check_name_availability( + name="sampleName", type="Microsoft.Support/supportTickets" + ) -#------------------------------------------------------------------------------ -if __name__ == '__main__': +# ------------------------------------------------------------------------------ +if __name__ == "__main__": unittest.main() diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_patch.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_patch.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_patch.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_patch.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_patch.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_patch.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_patch.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_patch.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_patch.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_patch.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/synapse/azure-mgmt-synapse/setup.py b/sdk/synapse/azure-mgmt-synapse/setup.py index 673385f12a57..8b4f03da2659 100644 --- a/sdk/synapse/azure-mgmt-synapse/setup.py +++ b/sdk/synapse/azure-mgmt-synapse/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Synapse Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/__init__.py index aa7e87061bc7..8a818c73a1c5 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['AccessControlClient'] +__all__ = ["AccessControlClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_access_control_client.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_access_control_client.py index bda2c8e3ed15..357da9e15417 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_access_control_client.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_access_control_client.py @@ -44,7 +44,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = AccessControlClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -54,9 +54,11 @@ def __init__( self._deserialize = Deserializer(client_models) self.role_assignments = RoleAssignmentsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.role_definitions = RoleDefinitionsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse @@ -69,7 +71,7 @@ def _send_request(self, http_request, **kwargs): :rtype: ~azure.core.pipeline.transport.HttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_configuration.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_configuration.py index 1759d48fef5a..2c88f7ac4af7 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_configuration.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2020-12-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-accesscontrol/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-accesscontrol/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/__init__.py index 8eafa989fcbc..feae6b7b5f28 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._access_control_client import AccessControlClient -__all__ = ['AccessControlClient'] + +__all__ = ["AccessControlClient"] diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_access_control_client.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_access_control_client.py index eb39ac127e65..9b334996b4de 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_access_control_client.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_access_control_client.py @@ -35,13 +35,8 @@ class AccessControlClient(object): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - base_url = '{endpoint}' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + base_url = "{endpoint}" self._config = AccessControlClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -51,9 +46,11 @@ def __init__( self._deserialize = Deserializer(client_models) self.role_assignments = RoleAssignmentsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.role_definitions = RoleDefinitionsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. @@ -65,7 +62,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_configuration.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_configuration.py index d20cdae49346..dbab9f6676d9 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/_configuration.py @@ -30,12 +30,7 @@ class AccessControlClientConfiguration(Configuration): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: @@ -45,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2020-12-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-accesscontrol/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-accesscontrol/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/__init__.py index dc7a8f54d689..f0556ea325b0 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/__init__.py @@ -10,6 +10,6 @@ from ._role_definitions_operations import RoleDefinitionsOperations __all__ = [ - 'RoleAssignmentsOperations', - 'RoleDefinitionsOperations', + "RoleAssignmentsOperations", + "RoleDefinitionsOperations", ] diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_access_control_client_operations.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_access_control_client_operations.py index b0a140de40e8..59cd70984f80 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_access_control_client_operations.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_access_control_client_operations.py @@ -9,21 +9,25 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class AccessControlClientOperationsMixin: - def get_role_definitions( - self, - **kwargs - ) -> AsyncIterable["_models.RolesListResponse"]: + def get_role_definitions(self, **kwargs) -> AsyncIterable["_models.RolesListResponse"]: """List roles. :keyword callable cls: A custom type or function that will be passed the direct response @@ -31,43 +35,45 @@ def get_role_definitions( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.synapse.accesscontrol.models.RolesListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RolesListResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RolesListResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.get_role_definitions.metadata['url'] # type: ignore + url = self.get_role_definitions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RolesListResponse', pipeline_response) + deserialized = self._deserialize("RolesListResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -86,16 +92,11 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - get_role_definitions.metadata = {'url': '/rbac/roles'} # type: ignore + return AsyncItemPaged(get_next, extract_data) - async def get_role_definition_by_id( - self, - role_id: str, - **kwargs - ) -> "_models.SynapseRole": + get_role_definitions.metadata = {"url": "/rbac/roles"} # type: ignore + + async def get_role_definition_by_id(self, role_id: str, **kwargs) -> "_models.SynapseRole": """Get role by role Id. :param role_id: Synapse Built-In Role Id. @@ -105,29 +106,27 @@ async def get_role_definition_by_id( :rtype: ~azure.synapse.accesscontrol.models.SynapseRole :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SynapseRole"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SynapseRole"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_role_definition_by_id.metadata['url'] # type: ignore + url = self.get_role_definition_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleId': self._serialize.url("role_id", role_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleId": self._serialize.url("role_id", role_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -138,18 +137,17 @@ async def get_role_definition_by_id( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SynapseRole', pipeline_response) + deserialized = self._deserialize("SynapseRole", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_definition_by_id.metadata = {'url': '/rbac/roles/{roleId}'} # type: ignore + + get_role_definition_by_id.metadata = {"url": "/rbac/roles/{roleId}"} # type: ignore async def create_role_assignment( - self, - create_role_assignment_options: "_models.RoleAssignmentOptions", - **kwargs + self, create_role_assignment_options: "_models.RoleAssignmentOptions", **kwargs ) -> "_models.RoleAssignmentDetails": """Create role assignment. @@ -160,34 +158,32 @@ async def create_role_assignment( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_role_assignment.metadata['url'] # type: ignore + url = self.create_role_assignment.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(create_role_assignment_options, 'RoleAssignmentOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(create_role_assignment_options, "RoleAssignmentOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -197,13 +193,14 @@ async def create_role_assignment( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_role_assignment.metadata = {'url': '/rbac/roleAssignments'} # type: ignore + + create_role_assignment.metadata = {"url": "/rbac/roleAssignments"} # type: ignore async def get_role_assignments( self, @@ -225,34 +222,34 @@ async def get_role_assignments( :rtype: list[~azure.synapse.accesscontrol.models.RoleAssignmentDetails] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.RoleAssignmentDetails"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List["_models.RoleAssignmentDetails"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_role_assignments.metadata['url'] # type: ignore + url = self.get_role_assignments.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if role_id is not None: - query_parameters['roleId'] = self._serialize.query("role_id", role_id, 'str') + query_parameters["roleId"] = self._serialize.query("role_id", role_id, "str") if principal_id is not None: - query_parameters['principalId'] = self._serialize.query("principal_id", principal_id, 'str') + query_parameters["principalId"] = self._serialize.query("principal_id", principal_id, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if continuation_token_parameter is not None: - header_parameters['x-ms-continuation'] = self._serialize.header("continuation_token_parameter", continuation_token_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-continuation"] = self._serialize.header( + "continuation_token_parameter", continuation_token_parameter, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -264,20 +261,17 @@ async def get_role_assignments( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - deserialized = self._deserialize('[RoleAssignmentDetails]', pipeline_response) + response_headers["x-ms-continuation"] = self._deserialize("str", response.headers.get("x-ms-continuation")) + deserialized = self._deserialize("[RoleAssignmentDetails]", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - get_role_assignments.metadata = {'url': '/rbac/roleAssignments'} # type: ignore - async def get_role_assignment_by_id( - self, - role_assignment_id: str, - **kwargs - ) -> "_models.RoleAssignmentDetails": + get_role_assignments.metadata = {"url": "/rbac/roleAssignments"} # type: ignore + + async def get_role_assignment_by_id(self, role_assignment_id: str, **kwargs) -> "_models.RoleAssignmentDetails": """Get role assignment by role assignment Id. :param role_assignment_id: The ID of the role assignment. @@ -287,29 +281,27 @@ async def get_role_assignment_by_id( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_role_assignment_by_id.metadata['url'] # type: ignore + url = self.get_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -320,19 +312,16 @@ async def get_role_assignment_by_id( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_assignment_by_id.metadata = {'url': '/rbac/roleAssignments/{roleAssignmentId}'} # type: ignore - async def delete_role_assignment_by_id( - self, - role_assignment_id: str, - **kwargs - ) -> None: + get_role_assignment_by_id.metadata = {"url": "/rbac/roleAssignments/{roleAssignmentId}"} # type: ignore + + async def delete_role_assignment_by_id(self, role_assignment_id: str, **kwargs) -> None: """Delete role assignment by role assignment Id. :param role_assignment_id: The ID of the role assignment. @@ -342,29 +331,27 @@ async def delete_role_assignment_by_id( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.delete_role_assignment_by_id.metadata['url'] # type: ignore + url = self.delete_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -378,12 +365,9 @@ async def delete_role_assignment_by_id( if cls: return cls(pipeline_response, None, {}) - delete_role_assignment_by_id.metadata = {'url': '/rbac/roleAssignments/{roleAssignmentId}'} # type: ignore + delete_role_assignment_by_id.metadata = {"url": "/rbac/roleAssignments/{roleAssignmentId}"} # type: ignore - async def get_caller_role_assignments( - self, - **kwargs - ) -> List[str]: + async def get_caller_role_assignments(self, **kwargs) -> List[str]: """List role assignments of the caller. :keyword callable cls: A custom type or function that will be passed the direct response @@ -391,28 +375,26 @@ async def get_caller_role_assignments( :rtype: list[str] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List[str]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_caller_role_assignments.metadata['url'] # type: ignore + url = self.get_caller_role_assignments.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -423,10 +405,11 @@ async def get_caller_role_assignments( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('[str]', pipeline_response) + deserialized = self._deserialize("[str]", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_caller_role_assignments.metadata = {'url': '/rbac/getMyAssignedRoles'} # type: ignore + + get_caller_role_assignments.metadata = {"url": "/rbac/getMyAssignedRoles"} # type: ignore diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py index 09d65db57d08..c839703116ec 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py @@ -8,15 +8,22 @@ from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class RoleAssignmentsOperations: """RoleAssignmentsOperations async operations. @@ -40,11 +47,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def check_principal_access( - self, - subject: "_models.SubjectInfo", - actions: List["_models.RequiredAction"], - scope: str, - **kwargs: Any + self, subject: "_models.SubjectInfo", actions: List["_models.RequiredAction"], scope: str, **kwargs: Any ) -> "_models.CheckPrincipalAccessResponse": """Check if the given principalId has access to perform list of actions at a given scope. @@ -59,11 +62,9 @@ async def check_principal_access( :rtype: ~azure.synapse.accesscontrol.models.CheckPrincipalAccessResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckPrincipalAccessResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CheckPrincipalAccessResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) _request = _models.CheckPrincipalAccessRequest(subject=subject, actions=actions, scope=scope) api_version = "2020-12-01" @@ -71,24 +72,24 @@ async def check_principal_access( accept = "application/json, text/json" # Construct URL - url = self.check_principal_access.metadata['url'] # type: ignore + url = self.check_principal_access.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_request, 'CheckPrincipalAccessRequest') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_request, "CheckPrincipalAccessRequest") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -98,13 +99,14 @@ async def check_principal_access( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CheckPrincipalAccessResponse', pipeline_response) + deserialized = self._deserialize("CheckPrincipalAccessResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_principal_access.metadata = {'url': '/checkAccessSynapseRbac'} # type: ignore + + check_principal_access.metadata = {"url": "/checkAccessSynapseRbac"} # type: ignore async def list_role_assignments( self, @@ -129,36 +131,36 @@ async def list_role_assignments( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetailsList :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetailsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetailsList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.list_role_assignments.metadata['url'] # type: ignore + url = self.list_role_assignments.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if role_id is not None: - query_parameters['roleId'] = self._serialize.query("role_id", role_id, 'str') + query_parameters["roleId"] = self._serialize.query("role_id", role_id, "str") if principal_id is not None: - query_parameters['principalId'] = self._serialize.query("principal_id", principal_id, 'str') + query_parameters["principalId"] = self._serialize.query("principal_id", principal_id, "str") if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters["scope"] = self._serialize.query("scope", scope, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if continuation_token_parameter is not None: - header_parameters['x-ms-continuation'] = self._serialize.header("continuation_token_parameter", continuation_token_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-continuation"] = self._serialize.header( + "continuation_token_parameter", continuation_token_parameter, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -170,14 +172,15 @@ async def list_role_assignments( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - deserialized = self._deserialize('RoleAssignmentDetailsList', pipeline_response) + response_headers["x-ms-continuation"] = self._deserialize("str", response.headers.get("x-ms-continuation")) + deserialized = self._deserialize("RoleAssignmentDetailsList", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - list_role_assignments.metadata = {'url': '/roleAssignments'} # type: ignore + + list_role_assignments.metadata = {"url": "/roleAssignments"} # type: ignore async def create_role_assignment( self, @@ -205,37 +208,37 @@ async def create_role_assignment( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - _request = _models.RoleAssignmentRequest(role_id=role_id, principal_id=principal_id, scope=scope, principal_type=principal_type) + _request = _models.RoleAssignmentRequest( + role_id=role_id, principal_id=principal_id, scope=scope, principal_type=principal_type + ) api_version = "2020-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json, text/json" # Construct URL - url = self.create_role_assignment.metadata['url'] # type: ignore + url = self.create_role_assignment.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_request, 'RoleAssignmentRequest') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_request, "RoleAssignmentRequest") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -245,18 +248,17 @@ async def create_role_assignment( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_role_assignment.metadata = {'url': '/roleAssignments/{roleAssignmentId}'} # type: ignore + + create_role_assignment.metadata = {"url": "/roleAssignments/{roleAssignmentId}"} # type: ignore async def get_role_assignment_by_id( - self, - role_assignment_id: str, - **kwargs: Any + self, role_assignment_id: str, **kwargs: Any ) -> "_models.RoleAssignmentDetails": """Get role assignment by role assignment Id. @@ -267,29 +269,27 @@ async def get_role_assignment_by_id( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.get_role_assignment_by_id.metadata['url'] # type: ignore + url = self.get_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -300,19 +300,17 @@ async def get_role_assignment_by_id( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_assignment_by_id.metadata = {'url': '/roleAssignments/{roleAssignmentId}'} # type: ignore + + get_role_assignment_by_id.metadata = {"url": "/roleAssignments/{roleAssignmentId}"} # type: ignore async def delete_role_assignment_by_id( - self, - role_assignment_id: str, - scope: Optional[str] = None, - **kwargs: Any + self, role_assignment_id: str, scope: Optional[str] = None, **kwargs: Any ) -> None: """Delete role assignment by role assignment Id. @@ -325,31 +323,29 @@ async def delete_role_assignment_by_id( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.delete_role_assignment_by_id.metadata['url'] # type: ignore + url = self.delete_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters["scope"] = self._serialize.query("scope", scope, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -363,4 +359,4 @@ async def delete_role_assignment_by_id( if cls: return cls(pipeline_response, None, {}) - delete_role_assignment_by_id.metadata = {'url': '/roleAssignments/{roleAssignmentId}'} # type: ignore + delete_role_assignment_by_id.metadata = {"url": "/roleAssignments/{roleAssignmentId}"} # type: ignore diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_definitions_operations.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_definitions_operations.py index 6ae4b956d1ba..80e31336a182 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_definitions_operations.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_definitions_operations.py @@ -8,15 +8,22 @@ from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class RoleDefinitionsOperations: """RoleDefinitionsOperations async operations. @@ -40,10 +47,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def list_role_definitions( - self, - is_built_in: Optional[bool] = None, - scope: Optional[str] = None, - **kwargs: Any + self, is_built_in: Optional[bool] = None, scope: Optional[str] = None, **kwargs: Any ) -> List["_models.SynapseRoleDefinition"]: """List role definitions. @@ -56,32 +60,30 @@ async def list_role_definitions( :rtype: list[~azure.synapse.accesscontrol.models.SynapseRoleDefinition] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.SynapseRoleDefinition"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List["_models.SynapseRoleDefinition"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.list_role_definitions.metadata['url'] # type: ignore + url = self.list_role_definitions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if is_built_in is not None: - query_parameters['isBuiltIn'] = self._serialize.query("is_built_in", is_built_in, 'bool') + query_parameters["isBuiltIn"] = self._serialize.query("is_built_in", is_built_in, "bool") if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters["scope"] = self._serialize.query("scope", scope, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -92,18 +94,17 @@ async def list_role_definitions( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('[SynapseRoleDefinition]', pipeline_response) + deserialized = self._deserialize("[SynapseRoleDefinition]", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_role_definitions.metadata = {'url': '/roleDefinitions'} # type: ignore + + list_role_definitions.metadata = {"url": "/roleDefinitions"} # type: ignore async def get_role_definition_by_id( - self, - role_definition_id: str, - **kwargs: Any + self, role_definition_id: str, **kwargs: Any ) -> "_models.SynapseRoleDefinition": """Get role definition by role definition Id. @@ -114,29 +115,27 @@ async def get_role_definition_by_id( :rtype: ~azure.synapse.accesscontrol.models.SynapseRoleDefinition :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SynapseRoleDefinition"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SynapseRoleDefinition"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.get_role_definition_by_id.metadata['url'] # type: ignore + url = self.get_role_definition_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleDefinitionId": self._serialize.url("role_definition_id", role_definition_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -147,18 +146,16 @@ async def get_role_definition_by_id( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SynapseRoleDefinition', pipeline_response) + deserialized = self._deserialize("SynapseRoleDefinition", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_definition_by_id.metadata = {'url': '/roleDefinitions/{roleDefinitionId}'} # type: ignore - async def list_scopes( - self, - **kwargs: Any - ) -> List[str]: + get_role_definition_by_id.metadata = {"url": "/roleDefinitions/{roleDefinitionId}"} # type: ignore + + async def list_scopes(self, **kwargs: Any) -> List[str]: """List rbac scopes. :keyword callable cls: A custom type or function that will be passed the direct response @@ -166,28 +163,26 @@ async def list_scopes( :rtype: list[str] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List[str]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.list_scopes.metadata['url'] # type: ignore + url = self.list_scopes.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -198,10 +193,11 @@ async def list_scopes( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('[str]', pipeline_response) + deserialized = self._deserialize("[str]", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_scopes.metadata = {'url': '/rbacScopes'} # type: ignore + + list_scopes.metadata = {"url": "/rbacScopes"} # type: ignore diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/__init__.py index 28470ad14c05..a87bd8b204b9 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/__init__.py @@ -36,17 +36,17 @@ from ._models import SynapseRoleDefinition # type: ignore __all__ = [ - 'CheckAccessDecision', - 'CheckPrincipalAccessRequest', - 'CheckPrincipalAccessResponse', - 'ErrorAdditionalInfo', - 'ErrorContract', - 'ErrorResponse', - 'RequiredAction', - 'RoleAssignmentDetails', - 'RoleAssignmentDetailsList', - 'RoleAssignmentRequest', - 'SubjectInfo', - 'SynapseRbacPermission', - 'SynapseRoleDefinition', + "CheckAccessDecision", + "CheckPrincipalAccessRequest", + "CheckPrincipalAccessResponse", + "ErrorAdditionalInfo", + "ErrorContract", + "ErrorResponse", + "RequiredAction", + "RoleAssignmentDetails", + "RoleAssignmentDetailsList", + "RoleAssignmentRequest", + "SubjectInfo", + "SynapseRbacPermission", + "SynapseRoleDefinition", ] diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models.py index f59e021d0af5..20404502235a 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models.py @@ -22,19 +22,16 @@ class CheckAccessDecision(msrest.serialization.Model): """ _attribute_map = { - 'access_decision': {'key': 'accessDecision', 'type': 'str'}, - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'role_assignment': {'key': 'roleAssignment', 'type': 'RoleAssignmentDetails'}, + "access_decision": {"key": "accessDecision", "type": "str"}, + "action_id": {"key": "actionId", "type": "str"}, + "role_assignment": {"key": "roleAssignment", "type": "RoleAssignmentDetails"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CheckAccessDecision, self).__init__(**kwargs) - self.access_decision = kwargs.get('access_decision', None) - self.action_id = kwargs.get('action_id', None) - self.role_assignment = kwargs.get('role_assignment', None) + self.access_decision = kwargs.get("access_decision", None) + self.action_id = kwargs.get("action_id", None) + self.role_assignment = kwargs.get("role_assignment", None) class CheckPrincipalAccessRequest(msrest.serialization.Model): @@ -51,25 +48,22 @@ class CheckPrincipalAccessRequest(msrest.serialization.Model): """ _validation = { - 'subject': {'required': True}, - 'actions': {'required': True}, - 'scope': {'required': True}, + "subject": {"required": True}, + "actions": {"required": True}, + "scope": {"required": True}, } _attribute_map = { - 'subject': {'key': 'subject', 'type': 'SubjectInfo'}, - 'actions': {'key': 'actions', 'type': '[RequiredAction]'}, - 'scope': {'key': 'scope', 'type': 'str'}, + "subject": {"key": "subject", "type": "SubjectInfo"}, + "actions": {"key": "actions", "type": "[RequiredAction]"}, + "scope": {"key": "scope", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CheckPrincipalAccessRequest, self).__init__(**kwargs) - self.subject = kwargs['subject'] - self.actions = kwargs['actions'] - self.scope = kwargs['scope'] + self.subject = kwargs["subject"] + self.actions = kwargs["actions"] + self.scope = kwargs["scope"] class CheckPrincipalAccessResponse(msrest.serialization.Model): @@ -81,15 +75,12 @@ class CheckPrincipalAccessResponse(msrest.serialization.Model): """ _attribute_map = { - 'access_decisions': {'key': 'accessDecisions', 'type': '[CheckAccessDecision]'}, + "access_decisions": {"key": "accessDecisions", "type": "[CheckAccessDecision]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CheckPrincipalAccessResponse, self).__init__(**kwargs) - self.access_decisions = kwargs.get('access_decisions', None) + self.access_decisions = kwargs.get("access_decisions", None) class ErrorAdditionalInfo(msrest.serialization.Model): @@ -104,19 +95,16 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -130,15 +118,12 @@ class ErrorContract(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + "error": {"key": "error", "type": "ErrorResponse"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorContract, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.error = kwargs.get("error", None) class ErrorResponse(msrest.serialization.Model): @@ -159,25 +144,22 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorResponse]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorResponse, self).__init__(**kwargs) self.code = None self.message = None @@ -198,22 +180,19 @@ class RequiredAction(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'is_data_action': {'required': True}, + "id": {"required": True}, + "is_data_action": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + "id": {"key": "id", "type": "str"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RequiredAction, self).__init__(**kwargs) - self.id = kwargs['id'] - self.is_data_action = kwargs['is_data_action'] + self.id = kwargs["id"] + self.is_data_action = kwargs["is_data_action"] class RoleAssignmentDetails(msrest.serialization.Model): @@ -232,23 +211,20 @@ class RoleAssignmentDetails(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - 'principal_type': {'key': 'principalType', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "role_definition_id": {"key": "roleDefinitionId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "principal_type": {"key": "principalType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RoleAssignmentDetails, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.role_definition_id = kwargs.get('role_definition_id', None) - self.principal_id = kwargs.get('principal_id', None) - self.scope = kwargs.get('scope', None) - self.principal_type = kwargs.get('principal_type', None) + self.id = kwargs.get("id", None) + self.role_definition_id = kwargs.get("role_definition_id", None) + self.principal_id = kwargs.get("principal_id", None) + self.scope = kwargs.get("scope", None) + self.principal_type = kwargs.get("principal_type", None) class RoleAssignmentDetailsList(msrest.serialization.Model): @@ -261,17 +237,14 @@ class RoleAssignmentDetailsList(msrest.serialization.Model): """ _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[RoleAssignmentDetails]'}, + "count": {"key": "count", "type": "int"}, + "value": {"key": "value", "type": "[RoleAssignmentDetails]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RoleAssignmentDetailsList, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.value = kwargs.get('value', None) + self.count = kwargs.get("count", None) + self.value = kwargs.get("value", None) class RoleAssignmentRequest(msrest.serialization.Model): @@ -290,27 +263,24 @@ class RoleAssignmentRequest(msrest.serialization.Model): """ _validation = { - 'role_id': {'required': True}, - 'principal_id': {'required': True}, - 'scope': {'required': True}, + "role_id": {"required": True}, + "principal_id": {"required": True}, + "scope": {"required": True}, } _attribute_map = { - 'role_id': {'key': 'roleId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - 'principal_type': {'key': 'principalType', 'type': 'str'}, + "role_id": {"key": "roleId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "principal_type": {"key": "principalType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RoleAssignmentRequest, self).__init__(**kwargs) - self.role_id = kwargs['role_id'] - self.principal_id = kwargs['principal_id'] - self.scope = kwargs['scope'] - self.principal_type = kwargs.get('principal_type', None) + self.role_id = kwargs["role_id"] + self.principal_id = kwargs["principal_id"] + self.scope = kwargs["scope"] + self.principal_type = kwargs.get("principal_type", None) class SubjectInfo(msrest.serialization.Model): @@ -325,21 +295,18 @@ class SubjectInfo(msrest.serialization.Model): """ _validation = { - 'principal_id': {'required': True}, + "principal_id": {"required": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + "principal_id": {"key": "principalId", "type": "str"}, + "group_ids": {"key": "groupIds", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SubjectInfo, self).__init__(**kwargs) - self.principal_id = kwargs['principal_id'] - self.group_ids = kwargs.get('group_ids', None) + self.principal_id = kwargs["principal_id"] + self.group_ids = kwargs.get("group_ids", None) class SynapseRbacPermission(msrest.serialization.Model): @@ -356,21 +323,18 @@ class SynapseRbacPermission(msrest.serialization.Model): """ _attribute_map = { - 'actions': {'key': 'actions', 'type': '[str]'}, - 'not_actions': {'key': 'notActions', 'type': '[str]'}, - 'data_actions': {'key': 'dataActions', 'type': '[str]'}, - 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + "actions": {"key": "actions", "type": "[str]"}, + "not_actions": {"key": "notActions", "type": "[str]"}, + "data_actions": {"key": "dataActions", "type": "[str]"}, + "not_data_actions": {"key": "notDataActions", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SynapseRbacPermission, self).__init__(**kwargs) - self.actions = kwargs.get('actions', None) - self.not_actions = kwargs.get('not_actions', None) - self.data_actions = kwargs.get('data_actions', None) - self.not_data_actions = kwargs.get('not_data_actions', None) + self.actions = kwargs.get("actions", None) + self.not_actions = kwargs.get("not_actions", None) + self.data_actions = kwargs.get("data_actions", None) + self.not_data_actions = kwargs.get("not_data_actions", None) class SynapseRoleDefinition(msrest.serialization.Model): @@ -393,24 +357,21 @@ class SynapseRoleDefinition(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'is_built_in': {'key': 'isBuiltIn', 'type': 'bool'}, - 'description': {'key': 'description', 'type': 'str'}, - 'permissions': {'key': 'permissions', 'type': '[SynapseRbacPermission]'}, - 'scopes': {'key': 'scopes', 'type': '[str]'}, - 'availability_status': {'key': 'availabilityStatus', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "is_built_in": {"key": "isBuiltIn", "type": "bool"}, + "description": {"key": "description", "type": "str"}, + "permissions": {"key": "permissions", "type": "[SynapseRbacPermission]"}, + "scopes": {"key": "scopes", "type": "[str]"}, + "availability_status": {"key": "availabilityStatus", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SynapseRoleDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.is_built_in = kwargs.get('is_built_in', None) - self.description = kwargs.get('description', None) - self.permissions = kwargs.get('permissions', None) - self.scopes = kwargs.get('scopes', None) - self.availability_status = kwargs.get('availability_status', None) + self.id = kwargs.get("id", None) + self.name = kwargs.get("name", None) + self.is_built_in = kwargs.get("is_built_in", None) + self.description = kwargs.get("description", None) + self.permissions = kwargs.get("permissions", None) + self.scopes = kwargs.get("scopes", None) + self.availability_status = kwargs.get("availability_status", None) diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models_py3.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models_py3.py index 7ca8c5a52320..c3cc8b8749f4 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/models/_models_py3.py @@ -24,9 +24,9 @@ class CheckAccessDecision(msrest.serialization.Model): """ _attribute_map = { - 'access_decision': {'key': 'accessDecision', 'type': 'str'}, - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'role_assignment': {'key': 'roleAssignment', 'type': 'RoleAssignmentDetails'}, + "access_decision": {"key": "accessDecision", "type": "str"}, + "action_id": {"key": "actionId", "type": "str"}, + "role_assignment": {"key": "roleAssignment", "type": "RoleAssignmentDetails"}, } def __init__( @@ -57,25 +57,18 @@ class CheckPrincipalAccessRequest(msrest.serialization.Model): """ _validation = { - 'subject': {'required': True}, - 'actions': {'required': True}, - 'scope': {'required': True}, + "subject": {"required": True}, + "actions": {"required": True}, + "scope": {"required": True}, } _attribute_map = { - 'subject': {'key': 'subject', 'type': 'SubjectInfo'}, - 'actions': {'key': 'actions', 'type': '[RequiredAction]'}, - 'scope': {'key': 'scope', 'type': 'str'}, + "subject": {"key": "subject", "type": "SubjectInfo"}, + "actions": {"key": "actions", "type": "[RequiredAction]"}, + "scope": {"key": "scope", "type": "str"}, } - def __init__( - self, - *, - subject: "SubjectInfo", - actions: List["RequiredAction"], - scope: str, - **kwargs - ): + def __init__(self, *, subject: "SubjectInfo", actions: List["RequiredAction"], scope: str, **kwargs): super(CheckPrincipalAccessRequest, self).__init__(**kwargs) self.subject = subject self.actions = actions @@ -91,15 +84,10 @@ class CheckPrincipalAccessResponse(msrest.serialization.Model): """ _attribute_map = { - 'access_decisions': {'key': 'accessDecisions', 'type': '[CheckAccessDecision]'}, + "access_decisions": {"key": "accessDecisions", "type": "[CheckAccessDecision]"}, } - def __init__( - self, - *, - access_decisions: Optional[List["CheckAccessDecision"]] = None, - **kwargs - ): + def __init__(self, *, access_decisions: Optional[List["CheckAccessDecision"]] = None, **kwargs): super(CheckPrincipalAccessResponse, self).__init__(**kwargs) self.access_decisions = access_decisions @@ -116,19 +104,16 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -142,15 +127,10 @@ class ErrorContract(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + "error": {"key": "error", "type": "ErrorResponse"}, } - def __init__( - self, - *, - error: Optional["ErrorResponse"] = None, - **kwargs - ): + def __init__(self, *, error: Optional["ErrorResponse"] = None, **kwargs): super(ErrorContract, self).__init__(**kwargs) self.error = error @@ -173,25 +153,22 @@ class ErrorResponse(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorResponse]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorResponse, self).__init__(**kwargs) self.code = None self.message = None @@ -212,22 +189,16 @@ class RequiredAction(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'is_data_action': {'required': True}, + "id": {"required": True}, + "is_data_action": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + "id": {"key": "id", "type": "str"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, } - def __init__( - self, - *, - id: str, - is_data_action: bool, - **kwargs - ): + def __init__(self, *, id: str, is_data_action: bool, **kwargs): super(RequiredAction, self).__init__(**kwargs) self.id = id self.is_data_action = is_data_action @@ -249,11 +220,11 @@ class RoleAssignmentDetails(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - 'principal_type': {'key': 'principalType', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "role_definition_id": {"key": "roleDefinitionId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "principal_type": {"key": "principalType", "type": "str"}, } def __init__( @@ -284,17 +255,11 @@ class RoleAssignmentDetailsList(msrest.serialization.Model): """ _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[RoleAssignmentDetails]'}, + "count": {"key": "count", "type": "int"}, + "value": {"key": "value", "type": "[RoleAssignmentDetails]"}, } - def __init__( - self, - *, - count: Optional[int] = None, - value: Optional[List["RoleAssignmentDetails"]] = None, - **kwargs - ): + def __init__(self, *, count: Optional[int] = None, value: Optional[List["RoleAssignmentDetails"]] = None, **kwargs): super(RoleAssignmentDetailsList, self).__init__(**kwargs) self.count = count self.value = value @@ -316,27 +281,19 @@ class RoleAssignmentRequest(msrest.serialization.Model): """ _validation = { - 'role_id': {'required': True}, - 'principal_id': {'required': True}, - 'scope': {'required': True}, + "role_id": {"required": True}, + "principal_id": {"required": True}, + "scope": {"required": True}, } _attribute_map = { - 'role_id': {'key': 'roleId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - 'principal_type': {'key': 'principalType', 'type': 'str'}, + "role_id": {"key": "roleId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "principal_type": {"key": "principalType", "type": "str"}, } - def __init__( - self, - *, - role_id: str, - principal_id: str, - scope: str, - principal_type: Optional[str] = None, - **kwargs - ): + def __init__(self, *, role_id: str, principal_id: str, scope: str, principal_type: Optional[str] = None, **kwargs): super(RoleAssignmentRequest, self).__init__(**kwargs) self.role_id = role_id self.principal_id = principal_id @@ -356,21 +313,15 @@ class SubjectInfo(msrest.serialization.Model): """ _validation = { - 'principal_id': {'required': True}, + "principal_id": {"required": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + "principal_id": {"key": "principalId", "type": "str"}, + "group_ids": {"key": "groupIds", "type": "[str]"}, } - def __init__( - self, - *, - principal_id: str, - group_ids: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, principal_id: str, group_ids: Optional[List[str]] = None, **kwargs): super(SubjectInfo, self).__init__(**kwargs) self.principal_id = principal_id self.group_ids = group_ids @@ -390,10 +341,10 @@ class SynapseRbacPermission(msrest.serialization.Model): """ _attribute_map = { - 'actions': {'key': 'actions', 'type': '[str]'}, - 'not_actions': {'key': 'notActions', 'type': '[str]'}, - 'data_actions': {'key': 'dataActions', 'type': '[str]'}, - 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + "actions": {"key": "actions", "type": "[str]"}, + "not_actions": {"key": "notActions", "type": "[str]"}, + "data_actions": {"key": "dataActions", "type": "[str]"}, + "not_data_actions": {"key": "notDataActions", "type": "[str]"}, } def __init__( @@ -432,13 +383,13 @@ class SynapseRoleDefinition(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'is_built_in': {'key': 'isBuiltIn', 'type': 'bool'}, - 'description': {'key': 'description', 'type': 'str'}, - 'permissions': {'key': 'permissions', 'type': '[SynapseRbacPermission]'}, - 'scopes': {'key': 'scopes', 'type': '[str]'}, - 'availability_status': {'key': 'availabilityStatus', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "is_built_in": {"key": "isBuiltIn", "type": "bool"}, + "description": {"key": "description", "type": "str"}, + "permissions": {"key": "permissions", "type": "[SynapseRbacPermission]"}, + "scopes": {"key": "scopes", "type": "[str]"}, + "availability_status": {"key": "availabilityStatus", "type": "str"}, } def __init__( diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/__init__.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/__init__.py index dc7a8f54d689..f0556ea325b0 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/__init__.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/__init__.py @@ -10,6 +10,6 @@ from ._role_definitions_operations import RoleDefinitionsOperations __all__ = [ - 'RoleAssignmentsOperations', - 'RoleDefinitionsOperations', + "RoleAssignmentsOperations", + "RoleDefinitionsOperations", ] diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py index 020843088f62..02ac360c61c3 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -19,14 +25,14 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class AccessControlClientOperationsMixin(object): def get_role_definitions( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> Iterable["_models.RolesListResponse"] """List roles. @@ -36,43 +42,45 @@ def get_role_definitions( :rtype: ~azure.core.paging.ItemPaged[~azure.synapse.accesscontrol.models.RolesListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RolesListResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RolesListResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.get_role_definitions.metadata['url'] # type: ignore + url = self.get_role_definitions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): - deserialized = self._deserialize('RolesListResponse', pipeline_response) + deserialized = self._deserialize("RolesListResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -91,10 +99,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - get_role_definitions.metadata = {'url': '/rbac/roles'} # type: ignore + return ItemPaged(get_next, extract_data) + + get_role_definitions.metadata = {"url": "/rbac/roles"} # type: ignore def get_role_definition_by_id( self, @@ -111,29 +118,27 @@ def get_role_definition_by_id( :rtype: ~azure.synapse.accesscontrol.models.SynapseRole :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SynapseRole"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SynapseRole"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_role_definition_by_id.metadata['url'] # type: ignore + url = self.get_role_definition_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleId': self._serialize.url("role_id", role_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleId": self._serialize.url("role_id", role_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -144,13 +149,14 @@ def get_role_definition_by_id( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SynapseRole', pipeline_response) + deserialized = self._deserialize("SynapseRole", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_definition_by_id.metadata = {'url': '/rbac/roles/{roleId}'} # type: ignore + + get_role_definition_by_id.metadata = {"url": "/rbac/roles/{roleId}"} # type: ignore def create_role_assignment( self, @@ -167,34 +173,32 @@ def create_role_assignment( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_role_assignment.metadata['url'] # type: ignore + url = self.create_role_assignment.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(create_role_assignment_options, 'RoleAssignmentOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(create_role_assignment_options, "RoleAssignmentOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -204,13 +208,14 @@ def create_role_assignment( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_role_assignment.metadata = {'url': '/rbac/roleAssignments'} # type: ignore + + create_role_assignment.metadata = {"url": "/rbac/roleAssignments"} # type: ignore def get_role_assignments( self, @@ -233,34 +238,34 @@ def get_role_assignments( :rtype: list[~azure.synapse.accesscontrol.models.RoleAssignmentDetails] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.RoleAssignmentDetails"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List["_models.RoleAssignmentDetails"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_role_assignments.metadata['url'] # type: ignore + url = self.get_role_assignments.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if role_id is not None: - query_parameters['roleId'] = self._serialize.query("role_id", role_id, 'str') + query_parameters["roleId"] = self._serialize.query("role_id", role_id, "str") if principal_id is not None: - query_parameters['principalId'] = self._serialize.query("principal_id", principal_id, 'str') + query_parameters["principalId"] = self._serialize.query("principal_id", principal_id, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if continuation_token_parameter is not None: - header_parameters['x-ms-continuation'] = self._serialize.header("continuation_token_parameter", continuation_token_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-continuation"] = self._serialize.header( + "continuation_token_parameter", continuation_token_parameter, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -272,14 +277,15 @@ def get_role_assignments( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - deserialized = self._deserialize('[RoleAssignmentDetails]', pipeline_response) + response_headers["x-ms-continuation"] = self._deserialize("str", response.headers.get("x-ms-continuation")) + deserialized = self._deserialize("[RoleAssignmentDetails]", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - get_role_assignments.metadata = {'url': '/rbac/roleAssignments'} # type: ignore + + get_role_assignments.metadata = {"url": "/rbac/roleAssignments"} # type: ignore def get_role_assignment_by_id( self, @@ -296,29 +302,27 @@ def get_role_assignment_by_id( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_role_assignment_by_id.metadata['url'] # type: ignore + url = self.get_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -329,13 +333,14 @@ def get_role_assignment_by_id( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_assignment_by_id.metadata = {'url': '/rbac/roleAssignments/{roleAssignmentId}'} # type: ignore + + get_role_assignment_by_id.metadata = {"url": "/rbac/roleAssignments/{roleAssignmentId}"} # type: ignore def delete_role_assignment_by_id( self, @@ -352,29 +357,27 @@ def delete_role_assignment_by_id( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.delete_role_assignment_by_id.metadata['url'] # type: ignore + url = self.delete_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -388,11 +391,10 @@ def delete_role_assignment_by_id( if cls: return cls(pipeline_response, None, {}) - delete_role_assignment_by_id.metadata = {'url': '/rbac/roleAssignments/{roleAssignmentId}'} # type: ignore + delete_role_assignment_by_id.metadata = {"url": "/rbac/roleAssignments/{roleAssignmentId}"} # type: ignore def get_caller_role_assignments( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> List[str] """List role assignments of the caller. @@ -402,28 +404,26 @@ def get_caller_role_assignments( :rtype: list[str] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List[str]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-02-01-preview" accept = "application/json" # Construct URL - url = self.get_caller_role_assignments.metadata['url'] # type: ignore + url = self.get_caller_role_assignments.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -434,10 +434,11 @@ def get_caller_role_assignments( error = self._deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('[str]', pipeline_response) + deserialized = self._deserialize("[str]", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_caller_role_assignments.metadata = {'url': '/rbac/getMyAssignedRoles'} # type: ignore + + get_caller_role_assignments.metadata = {"url": "/rbac/getMyAssignedRoles"} # type: ignore diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_assignments_operations.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_assignments_operations.py index 7626682e65f3..06d363b3b17f 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_assignments_operations.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_assignments_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,9 +24,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class RoleAssignmentsOperations(object): """RoleAssignmentsOperations operations. @@ -64,11 +71,9 @@ def check_principal_access( :rtype: ~azure.synapse.accesscontrol.models.CheckPrincipalAccessResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckPrincipalAccessResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CheckPrincipalAccessResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) _request = _models.CheckPrincipalAccessRequest(subject=subject, actions=actions, scope=scope) api_version = "2020-12-01" @@ -76,24 +81,24 @@ def check_principal_access( accept = "application/json, text/json" # Construct URL - url = self.check_principal_access.metadata['url'] # type: ignore + url = self.check_principal_access.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_request, 'CheckPrincipalAccessRequest') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_request, "CheckPrincipalAccessRequest") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -103,13 +108,14 @@ def check_principal_access( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('CheckPrincipalAccessResponse', pipeline_response) + deserialized = self._deserialize("CheckPrincipalAccessResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_principal_access.metadata = {'url': '/checkAccessSynapseRbac'} # type: ignore + + check_principal_access.metadata = {"url": "/checkAccessSynapseRbac"} # type: ignore def list_role_assignments( self, @@ -135,36 +141,36 @@ def list_role_assignments( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetailsList :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetailsList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetailsList"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.list_role_assignments.metadata['url'] # type: ignore + url = self.list_role_assignments.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if role_id is not None: - query_parameters['roleId'] = self._serialize.query("role_id", role_id, 'str') + query_parameters["roleId"] = self._serialize.query("role_id", role_id, "str") if principal_id is not None: - query_parameters['principalId'] = self._serialize.query("principal_id", principal_id, 'str') + query_parameters["principalId"] = self._serialize.query("principal_id", principal_id, "str") if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters["scope"] = self._serialize.query("scope", scope, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if continuation_token_parameter is not None: - header_parameters['x-ms-continuation'] = self._serialize.header("continuation_token_parameter", continuation_token_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-continuation"] = self._serialize.header( + "continuation_token_parameter", continuation_token_parameter, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -176,14 +182,15 @@ def list_role_assignments( raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - deserialized = self._deserialize('RoleAssignmentDetailsList', pipeline_response) + response_headers["x-ms-continuation"] = self._deserialize("str", response.headers.get("x-ms-continuation")) + deserialized = self._deserialize("RoleAssignmentDetailsList", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - list_role_assignments.metadata = {'url': '/roleAssignments'} # type: ignore + + list_role_assignments.metadata = {"url": "/roleAssignments"} # type: ignore def create_role_assignment( self, @@ -212,37 +219,37 @@ def create_role_assignment( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) - _request = _models.RoleAssignmentRequest(role_id=role_id, principal_id=principal_id, scope=scope, principal_type=principal_type) + _request = _models.RoleAssignmentRequest( + role_id=role_id, principal_id=principal_id, scope=scope, principal_type=principal_type + ) api_version = "2020-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json, text/json" # Construct URL - url = self.create_role_assignment.metadata['url'] # type: ignore + url = self.create_role_assignment.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_request, 'RoleAssignmentRequest') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_request, "RoleAssignmentRequest") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -252,13 +259,14 @@ def create_role_assignment( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_role_assignment.metadata = {'url': '/roleAssignments/{roleAssignmentId}'} # type: ignore + + create_role_assignment.metadata = {"url": "/roleAssignments/{roleAssignmentId}"} # type: ignore def get_role_assignment_by_id( self, @@ -275,29 +283,27 @@ def get_role_assignment_by_id( :rtype: ~azure.synapse.accesscontrol.models.RoleAssignmentDetails :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RoleAssignmentDetails"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.RoleAssignmentDetails"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.get_role_assignment_by_id.metadata['url'] # type: ignore + url = self.get_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -308,13 +314,14 @@ def get_role_assignment_by_id( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RoleAssignmentDetails', pipeline_response) + deserialized = self._deserialize("RoleAssignmentDetails", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_assignment_by_id.metadata = {'url': '/roleAssignments/{roleAssignmentId}'} # type: ignore + + get_role_assignment_by_id.metadata = {"url": "/roleAssignments/{roleAssignmentId}"} # type: ignore def delete_role_assignment_by_id( self, @@ -334,31 +341,29 @@ def delete_role_assignment_by_id( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.delete_role_assignment_by_id.metadata['url'] # type: ignore + url = self.delete_role_assignment_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str', min_length=1), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleAssignmentId": self._serialize.url("role_assignment_id", role_assignment_id, "str", min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters["scope"] = self._serialize.query("scope", scope, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -372,4 +377,4 @@ def delete_role_assignment_by_id( if cls: return cls(pipeline_response, None, {}) - delete_role_assignment_by_id.metadata = {'url': '/roleAssignments/{roleAssignmentId}'} # type: ignore + delete_role_assignment_by_id.metadata = {"url": "/roleAssignments/{roleAssignmentId}"} # type: ignore diff --git a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_definitions_operations.py b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_definitions_operations.py index 174d64318c17..6da9399437bc 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_definitions_operations.py +++ b/sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_role_definitions_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,9 +24,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class RoleDefinitionsOperations(object): """RoleDefinitionsOperations operations. @@ -61,32 +68,30 @@ def list_role_definitions( :rtype: list[~azure.synapse.accesscontrol.models.SynapseRoleDefinition] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.SynapseRoleDefinition"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List["_models.SynapseRoleDefinition"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.list_role_definitions.metadata['url'] # type: ignore + url = self.list_role_definitions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if is_built_in is not None: - query_parameters['isBuiltIn'] = self._serialize.query("is_built_in", is_built_in, 'bool') + query_parameters["isBuiltIn"] = self._serialize.query("is_built_in", is_built_in, "bool") if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters["scope"] = self._serialize.query("scope", scope, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -97,13 +102,14 @@ def list_role_definitions( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('[SynapseRoleDefinition]', pipeline_response) + deserialized = self._deserialize("[SynapseRoleDefinition]", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_role_definitions.metadata = {'url': '/roleDefinitions'} # type: ignore + + list_role_definitions.metadata = {"url": "/roleDefinitions"} # type: ignore def get_role_definition_by_id( self, @@ -120,29 +126,27 @@ def get_role_definition_by_id( :rtype: ~azure.synapse.accesscontrol.models.SynapseRoleDefinition :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SynapseRoleDefinition"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SynapseRoleDefinition"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.get_role_definition_by_id.metadata['url'] # type: ignore + url = self.get_role_definition_by_id.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "roleDefinitionId": self._serialize.url("role_definition_id", role_definition_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -153,17 +157,17 @@ def get_role_definition_by_id( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SynapseRoleDefinition', pipeline_response) + deserialized = self._deserialize("SynapseRoleDefinition", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_role_definition_by_id.metadata = {'url': '/roleDefinitions/{roleDefinitionId}'} # type: ignore + + get_role_definition_by_id.metadata = {"url": "/roleDefinitions/{roleDefinitionId}"} # type: ignore def list_scopes( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> List[str] """List rbac scopes. @@ -173,28 +177,26 @@ def list_scopes( :rtype: list[str] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[List[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[List[str]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json, text/json" # Construct URL - url = self.list_scopes.metadata['url'] # type: ignore + url = self.list_scopes.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -205,10 +207,11 @@ def list_scopes( error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('[str]', pipeline_response) + deserialized = self._deserialize("[str]", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_scopes.metadata = {'url': '/rbacScopes'} # type: ignore + + list_scopes.metadata = {"url": "/rbacScopes"} # type: ignore diff --git a/sdk/synapse/azure-synapse-accesscontrol/setup.py b/sdk/synapse/azure-synapse-accesscontrol/setup.py index 1b55f734bf2a..921f148c00f2 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/setup.py +++ b/sdk/synapse/azure-synapse-accesscontrol/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,60 +16,66 @@ PACKAGE_PPRINT_NAME = "Synapse AccessControl" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, include_package_data=True, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', + "Development Status :: 4 - Beta", + "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.synapse', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.synapse", + ] + ), python_requires=">=3.6", install_requires=[ - 'msrest>=0.6.21', - 'azure-common~=1.1', - 'azure-core>=1.20.0,<2.0.0', + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-core>=1.20.0,<2.0.0", ], ) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_patch.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_patch.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_patch.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_patch.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_patch.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_patch.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/synapse/azure-synapse-artifacts/samples/simple_sample.py b/sdk/synapse/azure-synapse-artifacts/samples/simple_sample.py index 301fd0f31075..6821c971d3bf 100644 --- a/sdk/synapse/azure-synapse-artifacts/samples/simple_sample.py +++ b/sdk/synapse/azure-synapse-artifacts/samples/simple_sample.py @@ -46,6 +46,6 @@ client = ArtifactsClient(endpoint=endpoint, credential=DefaultAzureCredential()) try: - linked_service = client.linked_service.get_linked_service(linked_service_name='my_linked_service_name') + linked_service = client.linked_service.get_linked_service(linked_service_name="my_linked_service_name") except HttpResponseError as e: - print('Failed to get linked service: {}'.format(e.response.json())) + print("Failed to get linked service: {}".format(e.response.json())) diff --git a/sdk/synapse/azure-synapse-artifacts/setup.py b/sdk/synapse/azure-synapse-artifacts/setup.py index 009264c7fc58..9ecfd20ed815 100644 --- a/sdk/synapse/azure-synapse-artifacts/setup.py +++ b/sdk/synapse/azure-synapse-artifacts/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/synapse/azure-synapse-artifacts/tests/conftest.py b/sdk/synapse/azure-synapse-artifacts/tests/conftest.py index e79dd761fe78..4c7cdd69148a 100644 --- a/sdk/synapse/azure-synapse-artifacts/tests/conftest.py +++ b/sdk/synapse/azure-synapse-artifacts/tests/conftest.py @@ -28,10 +28,16 @@ from dotenv import load_dotenv -from devtools_testutils import test_proxy, add_general_regex_sanitizer, add_body_key_sanitizer, add_header_regex_sanitizer +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("ARTIFACTS_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") @@ -47,4 +53,4 @@ def add_sanitizers(test_proxy): add_body_key_sanitizer(json_path="$..access_token", value="access_token") add_body_key_sanitizer(json_path="$..atlasKafkaPrimaryEndpoint", value="000") add_body_key_sanitizer(json_path="$..atlasKafkaSecondaryEndpoint", value="000") - add_body_key_sanitizer(json_path="$..systemData.createdBy", value="000") \ No newline at end of file + add_body_key_sanitizer(json_path="$..systemData.createdBy", value="000") diff --git a/sdk/synapse/azure-synapse-artifacts/tests/test_smoke.py b/sdk/synapse/azure-synapse-artifacts/tests/test_smoke.py index 88e7a757ba62..e12ed90fb0b7 100644 --- a/sdk/synapse/azure-synapse-artifacts/tests/test_smoke.py +++ b/sdk/synapse/azure-synapse-artifacts/tests/test_smoke.py @@ -9,6 +9,7 @@ from azure.core.exceptions import HttpResponseError from devtools_testutils import recorded_by_proxy + class TestSynapseArtifactsSmoke(SynapseArtifactsTest): # If endpoint is not unauthorized, `HttpResponseError` will be raised diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/__init__.py index 428a877bdfde..e3e865b3827b 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- from ._vnet_client import VnetClient -__all__ = ['VnetClient'] + +__all__ = ["VnetClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_configuration.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_configuration.py index 740f59c19d7b..a7289efe71bf 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_configuration.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_configuration.py @@ -21,6 +21,7 @@ from azure.core.credentials import TokenCredential + class VnetClientConfiguration(Configuration): """Configuration for VnetClient. @@ -48,23 +49,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'azure-synapse-managedprivateendpoints/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "azure-synapse-managedprivateendpoints/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_vnet_client.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_vnet_client.py index b34c70b9e5a7..b74c2375f36c 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_vnet_client.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/_vnet_client.py @@ -25,6 +25,7 @@ from azure.core.credentials import TokenCredential from azure.core.pipeline.transport import HttpRequest, HttpResponse + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implementation of MultiApiClientMixin." @@ -32,6 +33,7 @@ def __init__(self, *args, **kwargs): """ pass + class VnetClient(MultiApiClientMixin, _SDKClient): """VnetClient. @@ -53,33 +55,32 @@ class VnetClient(MultiApiClientMixin, _SDKClient): :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION = '2020-12-01' + DEFAULT_API_VERSION = "2020-12-01" _PROFILE_TAG = "azure.synapse.managedprivateendpoints.VnetClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + } + }, + _PROFILE_TAG + " latest", ) def __init__( self, credential, # type: "TokenCredential" endpoint, # type: str - api_version=DEFAULT_API_VERSION, # type: Optional[str] - profile=KnownProfiles.default, # type: KnownProfiles + api_version=DEFAULT_API_VERSION, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - if api_version == '2020-12-01' or api_version == '2021-06-01-preview': - base_url = '{endpoint}' + if api_version == "2020-12-01" or api_version == "2021-06-01-preview": + base_url = "{endpoint}" else: raise ValueError("API version {} is not available".format(api_version)) self._config = VnetClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) - super(VnetClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(VnetClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -89,14 +90,16 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2020-12-01: :mod:`v2020_12_01.models` - * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2020-12-01: :mod:`v2020_12_01.models` + * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` """ - if api_version == '2020-12-01': + if api_version == "2020-12-01": from .v2020_12_01 import models + return models - elif api_version == '2021-06-01-preview': + elif api_version == "2021-06-01-preview": from .v2021_06_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @@ -104,22 +107,31 @@ def models(cls, api_version=DEFAULT_API_VERSION): def managed_private_endpoints(self): """Instance depends on the API version: - * 2020-12-01: :class:`ManagedPrivateEndpointsOperations` - * 2021-06-01-preview: :class:`ManagedPrivateEndpointsOperations` + * 2020-12-01: :class:`ManagedPrivateEndpointsOperations` + * 2021-06-01-preview: :class:`ManagedPrivateEndpointsOperations` """ - api_version = self._get_api_version('managed_private_endpoints') - if api_version == '2020-12-01': + api_version = self._get_api_version("managed_private_endpoints") + if api_version == "2020-12-01": from .v2020_12_01.operations import ManagedPrivateEndpointsOperations as OperationClass - elif api_version == '2021-06-01-preview': + elif api_version == "2021-06-01-preview": from .v2021_06_01_preview.operations import ManagedPrivateEndpointsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'managed_private_endpoints'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError( + "API version {} does not have operation group 'managed_private_endpoints'".format(api_version) + ) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) def close(self): self._client.close() + def __enter__(self): self._client.__enter__() return self + def __exit__(self, *exc_details): self._client.__exit__(*exc_details) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/__init__.py index 9ffb2f45f6dd..4443396c3ca1 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._vnet_client import VnetClient -__all__ = ['VnetClient'] + +__all__ = ["VnetClient"] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_configuration.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_configuration.py index d7bac2617e79..208ad6edad8c 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_configuration.py @@ -19,6 +19,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class VnetClientConfiguration(Configuration): """Configuration for VnetClient. @@ -32,10 +33,7 @@ class VnetClientConfiguration(Configuration): """ def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs # type: Any + self, credential: "AsyncTokenCredential", endpoint: str, **kwargs # type: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -45,22 +43,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'azure-synapse-managedprivateendpoints/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "azure-synapse-managedprivateendpoints/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_vnet_client.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_vnet_client.py index e546f1cc2f12..61c42b9ed670 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_vnet_client.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/aio/_vnet_client.py @@ -23,6 +23,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implementation of MultiApiClientMixin." @@ -30,6 +31,7 @@ def __init__(self, *args, **kwargs): """ pass + class VnetClient(MultiApiClientMixin, _SDKClient): """VnetClient. @@ -51,13 +53,15 @@ class VnetClient(MultiApiClientMixin, _SDKClient): :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION = '2020-12-01' + DEFAULT_API_VERSION = "2020-12-01" _PROFILE_TAG = "azure.synapse.managedprivateendpoints.VnetClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + } + }, + _PROFILE_TAG + " latest", ) def __init__( @@ -68,16 +72,13 @@ def __init__( profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: - if api_version == '2020-12-01' or api_version == '2021-06-01-preview': - base_url = '{endpoint}' + if api_version == "2020-12-01" or api_version == "2021-06-01-preview": + base_url = "{endpoint}" else: raise ValueError("API version {} is not available".format(api_version)) self._config = VnetClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(VnetClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(VnetClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -87,14 +88,16 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2020-12-01: :mod:`v2020_12_01.models` - * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2020-12-01: :mod:`v2020_12_01.models` + * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` """ - if api_version == '2020-12-01': + if api_version == "2020-12-01": from ..v2020_12_01 import models + return models - elif api_version == '2021-06-01-preview': + elif api_version == "2021-06-01-preview": from ..v2021_06_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @@ -102,22 +105,31 @@ def models(cls, api_version=DEFAULT_API_VERSION): def managed_private_endpoints(self): """Instance depends on the API version: - * 2020-12-01: :class:`ManagedPrivateEndpointsOperations` - * 2021-06-01-preview: :class:`ManagedPrivateEndpointsOperations` + * 2020-12-01: :class:`ManagedPrivateEndpointsOperations` + * 2021-06-01-preview: :class:`ManagedPrivateEndpointsOperations` """ - api_version = self._get_api_version('managed_private_endpoints') - if api_version == '2020-12-01': + api_version = self._get_api_version("managed_private_endpoints") + if api_version == "2020-12-01": from ..v2020_12_01.aio.operations import ManagedPrivateEndpointsOperations as OperationClass - elif api_version == '2021-06-01-preview': + elif api_version == "2021-06-01-preview": from ..v2021_06_01_preview.aio.operations import ManagedPrivateEndpointsOperations as OperationClass else: - raise ValueError("API version {} does not have operation group 'managed_private_endpoints'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + raise ValueError( + "API version {} does not have operation group 'managed_private_endpoints'".format(api_version) + ) + return OperationClass( + self._client, + self._config, + Serializer(self._models_dict(api_version)), + Deserializer(self._models_dict(api_version)), + ) async def close(self): await self._client.close() + async def __aenter__(self): await self._client.__aenter__() return self + async def __aexit__(self, *exc_details): await self._client.__aexit__(*exc_details) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/__init__.py index 971d820d5251..ea079e4bf682 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['VnetClient'] +__all__ = ["VnetClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_configuration.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_configuration.py index 184222b75a2f..dc55a87b99f0 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_configuration.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2020-12-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-managedprivateendpoints/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-managedprivateendpoints/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_vnet_client.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_vnet_client.py index efca77d21edd..0e40464aeb7b 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_vnet_client.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/_vnet_client.py @@ -41,7 +41,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = VnetClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -51,7 +51,8 @@ def __init__( self._deserialize = Deserializer(client_models) self.managed_private_endpoints = ManagedPrivateEndpointsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse @@ -64,7 +65,7 @@ def _send_request(self, http_request, **kwargs): :rtype: ~azure.core.pipeline.transport.HttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/__init__.py index 9ffb2f45f6dd..4443396c3ca1 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._vnet_client import VnetClient -__all__ = ['VnetClient'] + +__all__ = ["VnetClient"] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_configuration.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_configuration.py index fe6332b3f77e..f25697a03eac 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_configuration.py @@ -30,12 +30,7 @@ class VnetClientConfiguration(Configuration): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: @@ -45,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2020-12-01" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-managedprivateendpoints/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-managedprivateendpoints/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_vnet_client.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_vnet_client.py index 5191323fde30..73fb461a8c98 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_vnet_client.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/_vnet_client.py @@ -32,13 +32,8 @@ class VnetClient(object): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - base_url = '{endpoint}' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + base_url = "{endpoint}" self._config = VnetClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -48,7 +43,8 @@ def __init__( self._deserialize = Deserializer(client_models) self.managed_private_endpoints = ManagedPrivateEndpointsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. @@ -60,7 +56,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/__init__.py index c262528ec75d..409617e641b7 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/__init__.py @@ -9,5 +9,5 @@ from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations __all__ = [ - 'ManagedPrivateEndpointsOperations', + "ManagedPrivateEndpointsOperations", ] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/_managed_private_endpoints_operations.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/_managed_private_endpoints_operations.py index 78eb820d2fca..c7ccf286674d 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/_managed_private_endpoints_operations.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/aio/operations/_managed_private_endpoints_operations.py @@ -9,15 +9,22 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ManagedPrivateEndpointsOperations: """ManagedPrivateEndpointsOperations async operations. @@ -41,10 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get( - self, - managed_private_endpoint_name: str, - managed_virtual_network_name: str = "default", - **kwargs: Any + self, managed_private_endpoint_name: str, managed_virtual_network_name: str = "default", **kwargs: Any ) -> "_models.ManagedPrivateEndpoint": """Get Managed Private Endpoints. @@ -57,30 +61,32 @@ async def get( :rtype: ~azure.synapse.managedprivateendpoints.v2020_12_01.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,13 +96,14 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + get.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore async def create( self, @@ -118,11 +125,9 @@ async def create( :rtype: ~azure.synapse.managedprivateendpoints.v2020_12_01.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) _managed_private_endpoint = _models.ManagedPrivateEndpoint(properties=properties) api_version = "2020-12-01" @@ -130,26 +135,30 @@ async def create( accept = "application/json" # Construct URL - url = self.create.metadata['url'] # type: ignore + url = self.create.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_managed_private_endpoint, 'ManagedPrivateEndpoint') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_managed_private_endpoint, "ManagedPrivateEndpoint") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -158,19 +167,17 @@ async def create( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + create.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore async def delete( - self, - managed_private_endpoint_name: str, - managed_virtual_network_name: str = "default", - **kwargs: Any + self, managed_private_endpoint_name: str, managed_virtual_network_name: str = "default", **kwargs: Any ) -> None: """Delete Managed Private Endpoints. @@ -183,25 +190,27 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -217,12 +226,10 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + delete.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def list( - self, - managed_virtual_network_name: str = "default", - **kwargs: Any + self, managed_virtual_network_name: str = "default", **kwargs: Any ) -> AsyncIterable["_models.ManagedPrivateEndpointListResponse"]: """List Managed Private Endpoints. @@ -233,45 +240,51 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.synapse.managedprivateendpoints.v2020_12_01.models.ManagedPrivateEndpointListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ManagedPrivateEndpointListResponse', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpointListResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -289,7 +302,6 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints"} # type: ignore diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/__init__.py index 75f4479513e9..0400491b17c4 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/__init__.py @@ -18,8 +18,8 @@ from ._models import ManagedPrivateEndpointProperties # type: ignore __all__ = [ - 'ManagedPrivateEndpoint', - 'ManagedPrivateEndpointConnectionState', - 'ManagedPrivateEndpointListResponse', - 'ManagedPrivateEndpointProperties', + "ManagedPrivateEndpoint", + "ManagedPrivateEndpointConnectionState", + "ManagedPrivateEndpointListResponse", + "ManagedPrivateEndpointProperties", ] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models.py index 011ff309d83b..f8be0a400254 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models.py @@ -28,27 +28,24 @@ class ManagedPrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagedPrivateEndpointProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ManagedPrivateEndpointProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpoint, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class ManagedPrivateEndpointConnectionState(msrest.serialization.Model): @@ -65,23 +62,20 @@ class ManagedPrivateEndpointConnectionState(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, + "status": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpointConnectionState, self).__init__(**kwargs) self.status = None - self.description = kwargs.get('description', None) - self.actions_required = kwargs.get('actions_required', None) + self.description = kwargs.get("description", None) + self.actions_required = kwargs.get("actions_required", None) class ManagedPrivateEndpointListResponse(msrest.serialization.Model): @@ -97,20 +91,17 @@ class ManagedPrivateEndpointListResponse(msrest.serialization.Model): """ _validation = { - 'next_link': {'readonly': True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedPrivateEndpoint]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ManagedPrivateEndpoint]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpointListResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) self.next_link = None @@ -140,31 +131,28 @@ class ManagedPrivateEndpointProperties(msrest.serialization.Model): """ _validation = { - 'provisioning_state': {'readonly': True}, - 'is_reserved': {'readonly': True}, + "provisioning_state": {"readonly": True}, + "is_reserved": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'connection_state': {'key': 'connectionState', 'type': 'ManagedPrivateEndpointConnectionState'}, - 'is_reserved': {'key': 'isReserved', 'type': 'bool'}, - 'fqdns': {'key': 'fqdns', 'type': '[str]'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "connection_state": {"key": "connectionState", "type": "ManagedPrivateEndpointConnectionState"}, + "is_reserved": {"key": "isReserved", "type": "bool"}, + "fqdns": {"key": "fqdns", "type": "[str]"}, + "is_compliant": {"key": "isCompliant", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpointProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.private_link_resource_id = kwargs.get('private_link_resource_id', None) - self.group_id = kwargs.get('group_id', None) + self.name = kwargs.get("name", None) + self.private_link_resource_id = kwargs.get("private_link_resource_id", None) + self.group_id = kwargs.get("group_id", None) self.provisioning_state = None - self.connection_state = kwargs.get('connection_state', None) + self.connection_state = kwargs.get("connection_state", None) self.is_reserved = None - self.fqdns = kwargs.get('fqdns', None) - self.is_compliant = kwargs.get('is_compliant', None) + self.fqdns = kwargs.get("fqdns", None) + self.is_compliant = kwargs.get("is_compliant", None) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models_py3.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models_py3.py index f9dbd56a998c..b483996912a4 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/models/_models_py3.py @@ -30,24 +30,19 @@ class ManagedPrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagedPrivateEndpointProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ManagedPrivateEndpointProperties"}, } - def __init__( - self, - *, - properties: Optional["ManagedPrivateEndpointProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["ManagedPrivateEndpointProperties"] = None, **kwargs): super(ManagedPrivateEndpoint, self).__init__(**kwargs) self.id = None self.name = None @@ -69,22 +64,16 @@ class ManagedPrivateEndpointConnectionState(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, + "status": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__( - self, - *, - description: Optional[str] = None, - actions_required: Optional[str] = None, - **kwargs - ): + def __init__(self, *, description: Optional[str] = None, actions_required: Optional[str] = None, **kwargs): super(ManagedPrivateEndpointConnectionState, self).__init__(**kwargs) self.status = None self.description = description @@ -104,20 +93,15 @@ class ManagedPrivateEndpointListResponse(msrest.serialization.Model): """ _validation = { - 'next_link': {'readonly': True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedPrivateEndpoint]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ManagedPrivateEndpoint]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["ManagedPrivateEndpoint"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["ManagedPrivateEndpoint"]] = None, **kwargs): super(ManagedPrivateEndpointListResponse, self).__init__(**kwargs) self.value = value self.next_link = None @@ -149,19 +133,19 @@ class ManagedPrivateEndpointProperties(msrest.serialization.Model): """ _validation = { - 'provisioning_state': {'readonly': True}, - 'is_reserved': {'readonly': True}, + "provisioning_state": {"readonly": True}, + "is_reserved": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'connection_state': {'key': 'connectionState', 'type': 'ManagedPrivateEndpointConnectionState'}, - 'is_reserved': {'key': 'isReserved', 'type': 'bool'}, - 'fqdns': {'key': 'fqdns', 'type': '[str]'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "connection_state": {"key": "connectionState", "type": "ManagedPrivateEndpointConnectionState"}, + "is_reserved": {"key": "isReserved", "type": "bool"}, + "fqdns": {"key": "fqdns", "type": "[str]"}, + "is_compliant": {"key": "isCompliant", "type": "bool"}, } def __init__( diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/__init__.py index c262528ec75d..409617e641b7 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/__init__.py @@ -9,5 +9,5 @@ from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations __all__ = [ - 'ManagedPrivateEndpointsOperations', + "ManagedPrivateEndpointsOperations", ] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/_managed_private_endpoints_operations.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/_managed_private_endpoints_operations.py index 5cd53fa45f3a..c2e443dc1fed 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/_managed_private_endpoints_operations.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2020_12_01/operations/_managed_private_endpoints_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class ManagedPrivateEndpointsOperations(object): """ManagedPrivateEndpointsOperations operations. @@ -62,30 +69,32 @@ def get( :rtype: ~azure.synapse.managedprivateendpoints.v2020_12_01.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -95,13 +104,14 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + get.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def create( self, @@ -124,11 +134,9 @@ def create( :rtype: ~azure.synapse.managedprivateendpoints.v2020_12_01.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) _managed_private_endpoint = _models.ManagedPrivateEndpoint(properties=properties) api_version = "2020-12-01" @@ -136,26 +144,30 @@ def create( accept = "application/json" # Construct URL - url = self.create.metadata['url'] # type: ignore + url = self.create.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_managed_private_endpoint, 'ManagedPrivateEndpoint') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_managed_private_endpoint, "ManagedPrivateEndpoint") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -164,13 +176,14 @@ def create( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + create.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def delete( self, @@ -190,25 +203,27 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -224,7 +239,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + delete.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def list( self, @@ -241,45 +256,51 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.synapse.managedprivateendpoints.v2020_12_01.models.ManagedPrivateEndpointListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2020-12-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): - deserialized = self._deserialize('ManagedPrivateEndpointListResponse', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpointListResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -297,7 +318,6 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints"} # type: ignore diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/__init__.py index 971d820d5251..ea079e4bf682 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['VnetClient'] +__all__ = ["VnetClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_configuration.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_configuration.py index c48663789682..785de12423b2 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_configuration.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2021-06-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-managedprivateendpoints/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-managedprivateendpoints/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_vnet_client.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_vnet_client.py index cea0761e615a..510e4f287f77 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_vnet_client.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/_vnet_client.py @@ -41,7 +41,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = VnetClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -51,7 +51,8 @@ def __init__( self._deserialize = Deserializer(client_models) self.managed_private_endpoints = ManagedPrivateEndpointsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse @@ -64,7 +65,7 @@ def _send_request(self, http_request, **kwargs): :rtype: ~azure.core.pipeline.transport.HttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/__init__.py index 9ffb2f45f6dd..4443396c3ca1 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._vnet_client import VnetClient -__all__ = ['VnetClient'] + +__all__ = ["VnetClient"] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_configuration.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_configuration.py index 93fc881b62ba..7df11c1f927a 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_configuration.py @@ -30,12 +30,7 @@ class VnetClientConfiguration(Configuration): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: @@ -45,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2021-06-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-managedprivateendpoints/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-managedprivateendpoints/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_vnet_client.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_vnet_client.py index 2c98fe806471..fca78d374a38 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_vnet_client.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/_vnet_client.py @@ -32,13 +32,8 @@ class VnetClient(object): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - base_url = '{endpoint}' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + base_url = "{endpoint}" self._config = VnetClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -48,7 +43,8 @@ def __init__( self._deserialize = Deserializer(client_models) self.managed_private_endpoints = ManagedPrivateEndpointsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. @@ -60,7 +56,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/__init__.py index c262528ec75d..409617e641b7 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/__init__.py @@ -9,5 +9,5 @@ from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations __all__ = [ - 'ManagedPrivateEndpointsOperations', + "ManagedPrivateEndpointsOperations", ] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/_managed_private_endpoints_operations.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/_managed_private_endpoints_operations.py index a3765f107d21..e6ed9dd5de59 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/_managed_private_endpoints_operations.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/aio/operations/_managed_private_endpoints_operations.py @@ -9,15 +9,22 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class ManagedPrivateEndpointsOperations: """ManagedPrivateEndpointsOperations async operations. @@ -41,10 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get( - self, - managed_private_endpoint_name: str, - managed_virtual_network_name: str = "default", - **kwargs: Any + self, managed_private_endpoint_name: str, managed_virtual_network_name: str = "default", **kwargs: Any ) -> "_models.ManagedPrivateEndpoint": """Get Managed Private Endpoints. @@ -57,30 +61,32 @@ async def get( :rtype: ~azure.synapse.managedprivateendpoints.v2021_06_01_preview.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-06-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,13 +96,14 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + get.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore async def create( self, @@ -118,11 +125,9 @@ async def create( :rtype: ~azure.synapse.managedprivateendpoints.v2021_06_01_preview.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) _managed_private_endpoint = _models.ManagedPrivateEndpoint(properties=properties) api_version = "2021-06-01-preview" @@ -130,26 +135,30 @@ async def create( accept = "application/json" # Construct URL - url = self.create.metadata['url'] # type: ignore + url = self.create.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_managed_private_endpoint, 'ManagedPrivateEndpoint') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_managed_private_endpoint, "ManagedPrivateEndpoint") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -158,19 +167,17 @@ async def create( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + create.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore async def delete( - self, - managed_private_endpoint_name: str, - managed_virtual_network_name: str = "default", - **kwargs: Any + self, managed_private_endpoint_name: str, managed_virtual_network_name: str = "default", **kwargs: Any ) -> None: """Delete Managed Private Endpoints. @@ -183,25 +190,27 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-06-01-preview" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -217,12 +226,10 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + delete.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def list( - self, - managed_virtual_network_name: str = "default", - **kwargs: Any + self, managed_virtual_network_name: str = "default", **kwargs: Any ) -> AsyncIterable["_models.ManagedPrivateEndpointListResponse"]: """List Managed Private Endpoints. @@ -233,45 +240,51 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.synapse.managedprivateendpoints.v2021_06_01_preview.models.ManagedPrivateEndpointListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ManagedPrivateEndpointListResponse', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpointListResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -289,7 +302,6 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints"} # type: ignore diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/__init__.py index 75f4479513e9..0400491b17c4 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/__init__.py @@ -18,8 +18,8 @@ from ._models import ManagedPrivateEndpointProperties # type: ignore __all__ = [ - 'ManagedPrivateEndpoint', - 'ManagedPrivateEndpointConnectionState', - 'ManagedPrivateEndpointListResponse', - 'ManagedPrivateEndpointProperties', + "ManagedPrivateEndpoint", + "ManagedPrivateEndpointConnectionState", + "ManagedPrivateEndpointListResponse", + "ManagedPrivateEndpointProperties", ] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models.py index 8c1cae7cea58..8c584bd7fc9c 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models.py @@ -28,27 +28,24 @@ class ManagedPrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagedPrivateEndpointProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ManagedPrivateEndpointProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpoint, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class ManagedPrivateEndpointConnectionState(msrest.serialization.Model): @@ -65,23 +62,20 @@ class ManagedPrivateEndpointConnectionState(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, + "status": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpointConnectionState, self).__init__(**kwargs) self.status = None - self.description = kwargs.get('description', None) - self.actions_required = kwargs.get('actions_required', None) + self.description = kwargs.get("description", None) + self.actions_required = kwargs.get("actions_required", None) class ManagedPrivateEndpointListResponse(msrest.serialization.Model): @@ -97,20 +91,17 @@ class ManagedPrivateEndpointListResponse(msrest.serialization.Model): """ _validation = { - 'next_link': {'readonly': True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedPrivateEndpoint]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ManagedPrivateEndpoint]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpointListResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) self.next_link = None @@ -140,31 +131,28 @@ class ManagedPrivateEndpointProperties(msrest.serialization.Model): """ _validation = { - 'provisioning_state': {'readonly': True}, - 'is_reserved': {'readonly': True}, + "provisioning_state": {"readonly": True}, + "is_reserved": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'connection_state': {'key': 'connectionState', 'type': 'ManagedPrivateEndpointConnectionState'}, - 'is_reserved': {'key': 'isReserved', 'type': 'bool'}, - 'fqdns': {'key': 'fqdns', 'type': '[str]'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "connection_state": {"key": "connectionState", "type": "ManagedPrivateEndpointConnectionState"}, + "is_reserved": {"key": "isReserved", "type": "bool"}, + "fqdns": {"key": "fqdns", "type": "[str]"}, + "is_compliant": {"key": "isCompliant", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ManagedPrivateEndpointProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.private_link_resource_id = kwargs.get('private_link_resource_id', None) - self.group_id = kwargs.get('group_id', None) + self.name = kwargs.get("name", None) + self.private_link_resource_id = kwargs.get("private_link_resource_id", None) + self.group_id = kwargs.get("group_id", None) self.provisioning_state = None - self.connection_state = kwargs.get('connection_state', None) + self.connection_state = kwargs.get("connection_state", None) self.is_reserved = None - self.fqdns = kwargs.get('fqdns', None) - self.is_compliant = kwargs.get('is_compliant', None) + self.fqdns = kwargs.get("fqdns", None) + self.is_compliant = kwargs.get("is_compliant", None) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models_py3.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models_py3.py index 6a9f7ff3812d..ac7fda467d27 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/models/_models_py3.py @@ -30,24 +30,19 @@ class ManagedPrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagedPrivateEndpointProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "properties": {"key": "properties", "type": "ManagedPrivateEndpointProperties"}, } - def __init__( - self, - *, - properties: Optional["ManagedPrivateEndpointProperties"] = None, - **kwargs - ): + def __init__(self, *, properties: Optional["ManagedPrivateEndpointProperties"] = None, **kwargs): super(ManagedPrivateEndpoint, self).__init__(**kwargs) self.id = None self.name = None @@ -69,22 +64,16 @@ class ManagedPrivateEndpointConnectionState(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, + "status": {"readonly": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__( - self, - *, - description: Optional[str] = None, - actions_required: Optional[str] = None, - **kwargs - ): + def __init__(self, *, description: Optional[str] = None, actions_required: Optional[str] = None, **kwargs): super(ManagedPrivateEndpointConnectionState, self).__init__(**kwargs) self.status = None self.description = description @@ -104,20 +93,15 @@ class ManagedPrivateEndpointListResponse(msrest.serialization.Model): """ _validation = { - 'next_link': {'readonly': True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedPrivateEndpoint]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ManagedPrivateEndpoint]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["ManagedPrivateEndpoint"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["ManagedPrivateEndpoint"]] = None, **kwargs): super(ManagedPrivateEndpointListResponse, self).__init__(**kwargs) self.value = value self.next_link = None @@ -149,19 +133,19 @@ class ManagedPrivateEndpointProperties(msrest.serialization.Model): """ _validation = { - 'provisioning_state': {'readonly': True}, - 'is_reserved': {'readonly': True}, + "provisioning_state": {"readonly": True}, + "is_reserved": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'connection_state': {'key': 'connectionState', 'type': 'ManagedPrivateEndpointConnectionState'}, - 'is_reserved': {'key': 'isReserved', 'type': 'bool'}, - 'fqdns': {'key': 'fqdns', 'type': '[str]'}, - 'is_compliant': {'key': 'isCompliant', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "private_link_resource_id": {"key": "privateLinkResourceId", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "connection_state": {"key": "connectionState", "type": "ManagedPrivateEndpointConnectionState"}, + "is_reserved": {"key": "isReserved", "type": "bool"}, + "fqdns": {"key": "fqdns", "type": "[str]"}, + "is_compliant": {"key": "isCompliant", "type": "bool"}, } def __init__( diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/__init__.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/__init__.py index c262528ec75d..409617e641b7 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/__init__.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/__init__.py @@ -9,5 +9,5 @@ from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations __all__ = [ - 'ManagedPrivateEndpointsOperations', + "ManagedPrivateEndpointsOperations", ] diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/_managed_private_endpoints_operations.py b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/_managed_private_endpoints_operations.py index 9510d5ffa7d1..60cced1528e2 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/_managed_private_endpoints_operations.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/azure/synapse/managedprivateendpoints/v2021_06_01_preview/operations/_managed_private_endpoints_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class ManagedPrivateEndpointsOperations(object): """ManagedPrivateEndpointsOperations operations. @@ -62,30 +69,32 @@ def get( :rtype: ~azure.synapse.managedprivateendpoints.v2021_06_01_preview.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-06-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -95,13 +104,14 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + get.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def create( self, @@ -124,11 +134,9 @@ def create( :rtype: ~azure.synapse.managedprivateendpoints.v2021_06_01_preview.models.ManagedPrivateEndpoint :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpoint"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpoint"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) _managed_private_endpoint = _models.ManagedPrivateEndpoint(properties=properties) api_version = "2021-06-01-preview" @@ -136,26 +144,30 @@ def create( accept = "application/json" # Construct URL - url = self.create.metadata['url'] # type: ignore + url = self.create.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_managed_private_endpoint, 'ManagedPrivateEndpoint') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(_managed_private_endpoint, "ManagedPrivateEndpoint") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -164,13 +176,14 @@ def create( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('ManagedPrivateEndpoint', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + + create.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def delete( self, @@ -190,25 +203,27 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-06-01-preview" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), - 'managedPrivateEndpointName': self._serialize.url("managed_private_endpoint_name", managed_private_endpoint_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), + "managedPrivateEndpointName": self._serialize.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -224,7 +239,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'} # type: ignore + delete.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}"} # type: ignore def list( self, @@ -241,45 +256,51 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.synapse.managedprivateendpoints.v2021_06_01_preview.models.ManagedPrivateEndpointListResponse] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.ManagedPrivateEndpointListResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'managedVirtualNetworkName': self._serialize.url("managed_virtual_network_name", managed_virtual_network_name, 'str'), + "endpoint": self._serialize.url( + "self._config.endpoint", self._config.endpoint, "str", skip_quote=True + ), + "managedVirtualNetworkName": self._serialize.url( + "managed_virtual_network_name", managed_virtual_network_name, "str" + ), } url = self._client.format_url(url, **path_format_arguments) request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): - deserialized = self._deserialize('ManagedPrivateEndpointListResponse', pipeline_response) + deserialized = self._deserialize("ManagedPrivateEndpointListResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -297,7 +318,6 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints"} # type: ignore diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py b/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py index 527f67e32dbb..1e59fad5037c 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,60 +16,66 @@ PACKAGE_PPRINT_NAME = "Synapse Managed Private Endpoints" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, include_package_data=True, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', + "Development Status :: 4 - Beta", + "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.synapse', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.synapse", + ] + ), python_requires=">=3.6", install_requires=[ - 'msrest>=0.6.21', - 'azure-common~=1.1', - 'azure-core>=1.20.0,<2.0.0', + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-core>=1.20.0,<2.0.0", ], ) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/__init__.py index 8d4512da13f4..699d6d51e298 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['MonitoringClient'] +__all__ = ["MonitoringClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_configuration.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_configuration.py index 5201f650911c..3cdf6ab7c441 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_configuration.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_configuration.py @@ -48,23 +48,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2019-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-monitoring/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-monitoring/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_monitoring_client.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_monitoring_client.py index 47359ad22311..088396b533ac 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_monitoring_client.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/_monitoring_client.py @@ -41,7 +41,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = MonitoringClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -50,8 +50,7 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.monitoring = MonitoringOperations( - self._client, self._config, self._serialize, self._deserialize) + self.monitoring = MonitoringOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse @@ -64,7 +63,7 @@ def _send_request(self, http_request, **kwargs): :rtype: ~azure.core.pipeline.transport.HttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/__init__.py index 2696d5efb2df..1622819548c4 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._monitoring_client import MonitoringClient -__all__ = ['MonitoringClient'] + +__all__ = ["MonitoringClient"] diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_configuration.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_configuration.py index 1c5684463165..8954b6eac26f 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_configuration.py @@ -30,12 +30,7 @@ class MonitoringClientConfiguration(Configuration): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: @@ -45,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = "2019-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-monitoring/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-monitoring/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_monitoring_client.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_monitoring_client.py index 2f32cf93a724..d0ec57acb2bf 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_monitoring_client.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/_monitoring_client.py @@ -32,13 +32,8 @@ class MonitoringClient(object): :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - base_url = '{endpoint}' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + base_url = "{endpoint}" self._config = MonitoringClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -47,8 +42,7 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.monitoring = MonitoringOperations( - self._client, self._config, self._serialize, self._deserialize) + self.monitoring = MonitoringOperations(self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. @@ -60,7 +54,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/__init__.py index ac494bcc2a04..ac1f3470a25d 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/__init__.py @@ -9,5 +9,5 @@ from ._monitoring_operations import MonitoringOperations __all__ = [ - 'MonitoringOperations', + "MonitoringOperations", ] diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/_monitoring_operations.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/_monitoring_operations.py index c9ea1038935e..08bb5486ee6e 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/_monitoring_operations.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/aio/operations/_monitoring_operations.py @@ -8,15 +8,22 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class MonitoringOperations: """MonitoringOperations async operations. @@ -40,9 +47,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get_spark_job_list( - self, - x_ms_client_request_id: Optional[str] = None, - **kwargs: Any + self, x_ms_client_request_id: Optional[str] = None, **kwargs: Any ) -> "_models.SparkJobListViewResponse": """Get list of spark applications for the workspace. @@ -54,30 +59,30 @@ async def get_spark_job_list( :rtype: ~azure.synapse.monitoring.models.SparkJobListViewResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkJobListViewResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkJobListViewResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2019-11-01-preview" accept = "application/json" # Construct URL - url = self.get_spark_job_list.metadata['url'] # type: ignore + url = self.get_spark_job_list.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-client-request-id"] = self._serialize.header( + "x_ms_client_request_id", x_ms_client_request_id, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -87,13 +92,14 @@ async def get_spark_job_list( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkJobListViewResponse', pipeline_response) + deserialized = self._deserialize("SparkJobListViewResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_job_list.metadata = {'url': '/monitoring/workloadTypes/spark/Applications'} # type: ignore + + get_spark_job_list.metadata = {"url": "/monitoring/workloadTypes/spark/Applications"} # type: ignore async def get_sql_job_query_string( self, @@ -119,36 +125,36 @@ async def get_sql_job_query_string( :rtype: ~azure.synapse.monitoring.models.SqlQueryStringDataModel :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlQueryStringDataModel"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SqlQueryStringDataModel"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2019-11-01-preview" accept = "application/json" # Construct URL - url = self.get_sql_job_query_string.metadata['url'] # type: ignore + url = self.get_sql_job_query_string.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["filter"] = self._serialize.query("filter", filter, "str") if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters["$orderby"] = self._serialize.query("orderby", orderby, "str") if skip is not None: - query_parameters['skip'] = self._serialize.query("skip", skip, 'str') + query_parameters["skip"] = self._serialize.query("skip", skip, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-client-request-id"] = self._serialize.header( + "x_ms_client_request_id", x_ms_client_request_id, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -158,10 +164,11 @@ async def get_sql_job_query_string( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SqlQueryStringDataModel', pipeline_response) + deserialized = self._deserialize("SqlQueryStringDataModel", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_job_query_string.metadata = {'url': '/monitoring/workloadTypes/sql/querystring'} # type: ignore + + get_sql_job_query_string.metadata = {"url": "/monitoring/workloadTypes/sql/querystring"} # type: ignore diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/__init__.py index 350e8b504d5c..e445fd139f51 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/__init__.py @@ -16,7 +16,7 @@ from ._models import SqlQueryStringDataModel # type: ignore __all__ = [ - 'SparkJob', - 'SparkJobListViewResponse', - 'SqlQueryStringDataModel', + "SparkJob", + "SparkJobListViewResponse", + "SqlQueryStringDataModel", ] diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models.py index b48975f38f78..01f561352bbf 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models.py @@ -45,43 +45,40 @@ class SparkJob(msrest.serialization.Model): """ _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'submitter': {'key': 'submitter', 'type': 'str'}, - 'compute': {'key': 'compute', 'type': 'str'}, - 'spark_application_id': {'key': 'sparkApplicationId', 'type': 'str'}, - 'livy_id': {'key': 'livyId', 'type': 'str'}, - 'timing': {'key': 'timing', 'type': '[str]'}, - 'spark_job_definition': {'key': 'sparkJobDefinition', 'type': 'str'}, - 'pipeline': {'key': 'pipeline', 'type': '[SparkJob]'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'submit_time': {'key': 'submitTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'queued_duration': {'key': 'queuedDuration', 'type': 'str'}, - 'running_duration': {'key': 'runningDuration', 'type': 'str'}, - 'total_duration': {'key': 'totalDuration', 'type': 'str'}, + "state": {"key": "state", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "submitter": {"key": "submitter", "type": "str"}, + "compute": {"key": "compute", "type": "str"}, + "spark_application_id": {"key": "sparkApplicationId", "type": "str"}, + "livy_id": {"key": "livyId", "type": "str"}, + "timing": {"key": "timing", "type": "[str]"}, + "spark_job_definition": {"key": "sparkJobDefinition", "type": "str"}, + "pipeline": {"key": "pipeline", "type": "[SparkJob]"}, + "job_type": {"key": "jobType", "type": "str"}, + "submit_time": {"key": "submitTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "queued_duration": {"key": "queuedDuration", "type": "str"}, + "running_duration": {"key": "runningDuration", "type": "str"}, + "total_duration": {"key": "totalDuration", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkJob, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.name = kwargs.get('name', None) - self.submitter = kwargs.get('submitter', None) - self.compute = kwargs.get('compute', None) - self.spark_application_id = kwargs.get('spark_application_id', None) - self.livy_id = kwargs.get('livy_id', None) - self.timing = kwargs.get('timing', None) - self.spark_job_definition = kwargs.get('spark_job_definition', None) - self.pipeline = kwargs.get('pipeline', None) - self.job_type = kwargs.get('job_type', None) - self.submit_time = kwargs.get('submit_time', None) - self.end_time = kwargs.get('end_time', None) - self.queued_duration = kwargs.get('queued_duration', None) - self.running_duration = kwargs.get('running_duration', None) - self.total_duration = kwargs.get('total_duration', None) + self.state = kwargs.get("state", None) + self.name = kwargs.get("name", None) + self.submitter = kwargs.get("submitter", None) + self.compute = kwargs.get("compute", None) + self.spark_application_id = kwargs.get("spark_application_id", None) + self.livy_id = kwargs.get("livy_id", None) + self.timing = kwargs.get("timing", None) + self.spark_job_definition = kwargs.get("spark_job_definition", None) + self.pipeline = kwargs.get("pipeline", None) + self.job_type = kwargs.get("job_type", None) + self.submit_time = kwargs.get("submit_time", None) + self.end_time = kwargs.get("end_time", None) + self.queued_duration = kwargs.get("queued_duration", None) + self.running_duration = kwargs.get("running_duration", None) + self.total_duration = kwargs.get("total_duration", None) class SparkJobListViewResponse(msrest.serialization.Model): @@ -94,17 +91,14 @@ class SparkJobListViewResponse(msrest.serialization.Model): """ _attribute_map = { - 'n_jobs': {'key': 'nJobs', 'type': 'int'}, - 'spark_jobs': {'key': 'sparkJobs', 'type': '[SparkJob]'}, + "n_jobs": {"key": "nJobs", "type": "int"}, + "spark_jobs": {"key": "sparkJobs", "type": "[SparkJob]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkJobListViewResponse, self).__init__(**kwargs) - self.n_jobs = kwargs.get('n_jobs', None) - self.spark_jobs = kwargs.get('spark_jobs', None) + self.n_jobs = kwargs.get("n_jobs", None) + self.spark_jobs = kwargs.get("spark_jobs", None) class SqlQueryStringDataModel(msrest.serialization.Model): @@ -115,12 +109,9 @@ class SqlQueryStringDataModel(msrest.serialization.Model): """ _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, + "query": {"key": "query", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SqlQueryStringDataModel, self).__init__(**kwargs) - self.query = kwargs.get('query', None) + self.query = kwargs.get("query", None) diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models_py3.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models_py3.py index 86c50102eb91..1e98918e4bce 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/models/_models_py3.py @@ -48,21 +48,21 @@ class SparkJob(msrest.serialization.Model): """ _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'submitter': {'key': 'submitter', 'type': 'str'}, - 'compute': {'key': 'compute', 'type': 'str'}, - 'spark_application_id': {'key': 'sparkApplicationId', 'type': 'str'}, - 'livy_id': {'key': 'livyId', 'type': 'str'}, - 'timing': {'key': 'timing', 'type': '[str]'}, - 'spark_job_definition': {'key': 'sparkJobDefinition', 'type': 'str'}, - 'pipeline': {'key': 'pipeline', 'type': '[SparkJob]'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'submit_time': {'key': 'submitTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'queued_duration': {'key': 'queuedDuration', 'type': 'str'}, - 'running_duration': {'key': 'runningDuration', 'type': 'str'}, - 'total_duration': {'key': 'totalDuration', 'type': 'str'}, + "state": {"key": "state", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "submitter": {"key": "submitter", "type": "str"}, + "compute": {"key": "compute", "type": "str"}, + "spark_application_id": {"key": "sparkApplicationId", "type": "str"}, + "livy_id": {"key": "livyId", "type": "str"}, + "timing": {"key": "timing", "type": "[str]"}, + "spark_job_definition": {"key": "sparkJobDefinition", "type": "str"}, + "pipeline": {"key": "pipeline", "type": "[SparkJob]"}, + "job_type": {"key": "jobType", "type": "str"}, + "submit_time": {"key": "submitTime", "type": "iso-8601"}, + "end_time": {"key": "endTime", "type": "iso-8601"}, + "queued_duration": {"key": "queuedDuration", "type": "str"}, + "running_duration": {"key": "runningDuration", "type": "str"}, + "total_duration": {"key": "totalDuration", "type": "str"}, } def __init__( @@ -113,17 +113,11 @@ class SparkJobListViewResponse(msrest.serialization.Model): """ _attribute_map = { - 'n_jobs': {'key': 'nJobs', 'type': 'int'}, - 'spark_jobs': {'key': 'sparkJobs', 'type': '[SparkJob]'}, + "n_jobs": {"key": "nJobs", "type": "int"}, + "spark_jobs": {"key": "sparkJobs", "type": "[SparkJob]"}, } - def __init__( - self, - *, - n_jobs: Optional[int] = None, - spark_jobs: Optional[List["SparkJob"]] = None, - **kwargs - ): + def __init__(self, *, n_jobs: Optional[int] = None, spark_jobs: Optional[List["SparkJob"]] = None, **kwargs): super(SparkJobListViewResponse, self).__init__(**kwargs) self.n_jobs = n_jobs self.spark_jobs = spark_jobs @@ -137,14 +131,9 @@ class SqlQueryStringDataModel(msrest.serialization.Model): """ _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, + "query": {"key": "query", "type": "str"}, } - def __init__( - self, - *, - query: Optional[str] = None, - **kwargs - ): + def __init__(self, *, query: Optional[str] = None, **kwargs): super(SqlQueryStringDataModel, self).__init__(**kwargs) self.query = query diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/__init__.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/__init__.py index ac494bcc2a04..ac1f3470a25d 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/__init__.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/__init__.py @@ -9,5 +9,5 @@ from ._monitoring_operations import MonitoringOperations __all__ = [ - 'MonitoringOperations', + "MonitoringOperations", ] diff --git a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/_monitoring_operations.py b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/_monitoring_operations.py index c8884c6473b1..1249fefeff5a 100644 --- a/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/_monitoring_operations.py +++ b/sdk/synapse/azure-synapse-monitoring/azure/synapse/monitoring/operations/_monitoring_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,9 +24,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class MonitoringOperations(object): """MonitoringOperations operations. @@ -59,30 +66,30 @@ def get_spark_job_list( :rtype: ~azure.synapse.monitoring.models.SparkJobListViewResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkJobListViewResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkJobListViewResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2019-11-01-preview" accept = "application/json" # Construct URL - url = self.get_spark_job_list.metadata['url'] # type: ignore + url = self.get_spark_job_list.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-client-request-id"] = self._serialize.header( + "x_ms_client_request_id", x_ms_client_request_id, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -92,13 +99,14 @@ def get_spark_job_list( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkJobListViewResponse', pipeline_response) + deserialized = self._deserialize("SparkJobListViewResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_job_list.metadata = {'url': '/monitoring/workloadTypes/spark/Applications'} # type: ignore + + get_spark_job_list.metadata = {"url": "/monitoring/workloadTypes/spark/Applications"} # type: ignore def get_sql_job_query_string( self, @@ -125,36 +133,36 @@ def get_sql_job_query_string( :rtype: ~azure.synapse.monitoring.models.SqlQueryStringDataModel :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SqlQueryStringDataModel"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SqlQueryStringDataModel"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2019-11-01-preview" accept = "application/json" # Construct URL - url = self.get_sql_job_query_string.metadata['url'] # type: ignore + url = self.get_sql_job_query_string.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["filter"] = self._serialize.query("filter", filter, "str") if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters["$orderby"] = self._serialize.query("orderby", orderby, "str") if skip is not None: - query_parameters['skip'] = self._serialize.query("skip", skip, 'str') + query_parameters["skip"] = self._serialize.query("skip", skip, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] if x_ms_client_request_id is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["x-ms-client-request-id"] = self._serialize.header( + "x_ms_client_request_id", x_ms_client_request_id, "str" + ) + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -164,10 +172,11 @@ def get_sql_job_query_string( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SqlQueryStringDataModel', pipeline_response) + deserialized = self._deserialize("SqlQueryStringDataModel", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_sql_job_query_string.metadata = {'url': '/monitoring/workloadTypes/sql/querystring'} # type: ignore + + get_sql_job_query_string.metadata = {"url": "/monitoring/workloadTypes/sql/querystring"} # type: ignore diff --git a/sdk/synapse/azure-synapse-monitoring/setup.py b/sdk/synapse/azure-synapse-monitoring/setup.py index 9f868a8e0567..1f0b7acdab76 100644 --- a/sdk/synapse/azure-synapse-monitoring/setup.py +++ b/sdk/synapse/azure-synapse-monitoring/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,60 +16,66 @@ PACKAGE_PPRINT_NAME = "Synapse Monitoring" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, include_package_data=True, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', + "Development Status :: 4 - Beta", + "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.synapse', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.synapse", + ] + ), python_requires=">=3.6", install_requires=[ - 'msrest>=0.6.21', - 'azure-common~=1.1', - 'azure-core>=1.20.0,<2.0.0', + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-core>=1.20.0,<2.0.0", ], ) diff --git a/sdk/synapse/azure-synapse-spark/azure/__init__.py b/sdk/synapse/azure-synapse-spark/azure/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-spark/azure/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/__init__.py b/sdk/synapse/azure-synapse-spark/azure/synapse/__init__.py index 0260537a02bb..8db66d3d0f0f 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/__init__.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/__init__.py index 5b37860b9ba0..e37d4f1c9a84 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['SparkClient'] +__all__ = ["SparkClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_configuration.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_configuration.py index 7035762e3191..8175b8df3767 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_configuration.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_configuration.py @@ -59,23 +59,24 @@ def __init__( self.endpoint = endpoint self.spark_pool_name = spark_pool_name self.livy_api_version = livy_api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-spark/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-spark/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_spark_client.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_spark_client.py index 371e1377bc18..5642ab28abd4 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_spark_client.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/_spark_client.py @@ -50,7 +50,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = SparkClientConfiguration(credential, endpoint, spark_pool_name, livy_api_version, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -59,10 +59,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.spark_batch = SparkBatchOperations( - self._client, self._config, self._serialize, self._deserialize) - self.spark_session = SparkSessionOperations( - self._client, self._config, self._serialize, self._deserialize) + self.spark_batch = SparkBatchOperations(self._client, self._config, self._serialize, self._deserialize) + self.spark_session = SparkSessionOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse @@ -75,9 +73,13 @@ def _send_request(self, http_request, **kwargs): :rtype: ~azure.core.pipeline.transport.HttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/__init__.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/__init__.py index 04ee8cc75d0e..b9d8c98604d2 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._spark_client import SparkClient -__all__ = ['SparkClient'] + +__all__ = ["SparkClient"] diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_configuration.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_configuration.py index 7c009f22364c..d70097945c52 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_configuration.py @@ -56,22 +56,21 @@ def __init__( self.endpoint = endpoint self.spark_pool_name = spark_pool_name self.livy_api_version = livy_api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default']) - kwargs.setdefault('sdk_moniker', 'synapse-spark/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://dev.azuresynapse.net/.default"]) + kwargs.setdefault("sdk_moniker", "synapse-spark/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_spark_client.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_spark_client.py index f5223e602b9f..d7a06ba53586 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_spark_client.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/_spark_client.py @@ -47,7 +47,7 @@ def __init__( livy_api_version: str = "2019-11-01-preview", **kwargs: Any ) -> None: - base_url = '{endpoint}' + base_url = "{endpoint}" self._config = SparkClientConfiguration(credential, endpoint, spark_pool_name, livy_api_version, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -56,10 +56,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.spark_batch = SparkBatchOperations( - self._client, self._config, self._serialize, self._deserialize) - self.spark_session = SparkSessionOperations( - self._client, self._config, self._serialize, self._deserialize) + self.spark_batch = SparkBatchOperations(self._client, self._config, self._serialize, self._deserialize) + self.spark_session = SparkSessionOperations(self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. @@ -71,9 +69,13 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/__init__.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/__init__.py index cfceeb39e559..c5695a5f6fb7 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/__init__.py @@ -10,6 +10,6 @@ from ._spark_session_operations import SparkSessionOperations __all__ = [ - 'SparkBatchOperations', - 'SparkSessionOperations', + "SparkBatchOperations", + "SparkSessionOperations", ] diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_batch_operations.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_batch_operations.py index aeecbe5c8c5e..f123471e5803 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_batch_operations.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_batch_operations.py @@ -8,15 +8,22 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class SparkBatchOperations: """SparkBatchOperations async operations. @@ -61,34 +68,36 @@ async def get_spark_batch_jobs( :rtype: ~azure.synapse.spark.models.SparkBatchJobCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkBatchJobCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkBatchJobCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_batch_jobs.metadata['url'] # type: ignore + url = self.get_spark_batch_jobs.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if from_parameter is not None: - query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'int') + query_parameters["from"] = self._serialize.query("from_parameter", from_parameter, "int") if size is not None: - query_parameters['size'] = self._serialize.query("size", size, 'int') + query_parameters["size"] = self._serialize.query("size", size, "int") if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -98,19 +107,17 @@ async def get_spark_batch_jobs( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkBatchJobCollection', pipeline_response) + deserialized = self._deserialize("SparkBatchJobCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_batch_jobs.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches'} # type: ignore + + get_spark_batch_jobs.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches"} # type: ignore async def create_spark_batch_job( - self, - spark_batch_job_options: "_models.SparkBatchJobOptions", - detailed: Optional[bool] = None, - **kwargs: Any + self, spark_batch_job_options: "_models.SparkBatchJobOptions", detailed: Optional[bool] = None, **kwargs: Any ) -> "_models.SparkBatchJob": """Create new spark batch job. @@ -124,36 +131,38 @@ async def create_spark_batch_job( :rtype: ~azure.synapse.spark.models.SparkBatchJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkBatchJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkBatchJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_spark_batch_job.metadata['url'] # type: ignore + url = self.create_spark_batch_job.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spark_batch_job_options, 'SparkBatchJobOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(spark_batch_job_options, "SparkBatchJobOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -162,19 +171,17 @@ async def create_spark_batch_job( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkBatchJob', pipeline_response) + deserialized = self._deserialize("SparkBatchJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_spark_batch_job.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches'} # type: ignore + + create_spark_batch_job.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches"} # type: ignore async def get_spark_batch_job( - self, - batch_id: int, - detailed: Optional[bool] = None, - **kwargs: Any + self, batch_id: int, detailed: Optional[bool] = None, **kwargs: Any ) -> "_models.SparkBatchJob": """Gets a single spark batch job. @@ -188,31 +195,33 @@ async def get_spark_batch_job( :rtype: ~azure.synapse.spark.models.SparkBatchJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkBatchJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkBatchJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_batch_job.metadata['url'] # type: ignore + url = self.get_spark_batch_job.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'batchId': self._serialize.url("batch_id", batch_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "batchId": self._serialize.url("batch_id", batch_id, "int"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -222,19 +231,16 @@ async def get_spark_batch_job( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkBatchJob', pipeline_response) + deserialized = self._deserialize("SparkBatchJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_batch_job.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}'} # type: ignore - async def cancel_spark_batch_job( - self, - batch_id: int, - **kwargs: Any - ) -> None: + get_spark_batch_job.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}"} # type: ignore + + async def cancel_spark_batch_job(self, batch_id: int, **kwargs: Any) -> None: """Cancels a running spark batch job. :param batch_id: Identifier for the batch job. @@ -244,19 +250,21 @@ async def cancel_spark_batch_job( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) # Construct URL - url = self.cancel_spark_batch_job.metadata['url'] # type: ignore + url = self.cancel_spark_batch_job.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'batchId': self._serialize.url("batch_id", batch_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "batchId": self._serialize.url("batch_id", batch_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -277,4 +285,4 @@ async def cancel_spark_batch_job( if cls: return cls(pipeline_response, None, {}) - cancel_spark_batch_job.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}'} # type: ignore + cancel_spark_batch_job.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}"} # type: ignore diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_session_operations.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_session_operations.py index 7be41738093c..457f914faf8f 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_session_operations.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/aio/operations/_spark_session_operations.py @@ -8,15 +8,22 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class SparkSessionOperations: """SparkSessionOperations async operations. @@ -61,34 +68,36 @@ async def get_spark_sessions( :rtype: ~azure.synapse.spark.models.SparkSessionCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkSessionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkSessionCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_sessions.metadata['url'] # type: ignore + url = self.get_spark_sessions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if from_parameter is not None: - query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'int') + query_parameters["from"] = self._serialize.query("from_parameter", from_parameter, "int") if size is not None: - query_parameters['size'] = self._serialize.query("size", size, 'int') + query_parameters["size"] = self._serialize.query("size", size, "int") if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -98,19 +107,17 @@ async def get_spark_sessions( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkSessionCollection', pipeline_response) + deserialized = self._deserialize("SparkSessionCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_sessions.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions'} # type: ignore + + get_spark_sessions.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions"} # type: ignore async def create_spark_session( - self, - spark_session_options: "_models.SparkSessionOptions", - detailed: Optional[bool] = None, - **kwargs: Any + self, spark_session_options: "_models.SparkSessionOptions", detailed: Optional[bool] = None, **kwargs: Any ) -> "_models.SparkSession": """Create new spark session. @@ -124,36 +131,38 @@ async def create_spark_session( :rtype: ~azure.synapse.spark.models.SparkSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkSession"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_spark_session.metadata['url'] # type: ignore + url = self.create_spark_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spark_session_options, 'SparkSessionOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(spark_session_options, "SparkSessionOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -162,19 +171,17 @@ async def create_spark_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkSession', pipeline_response) + deserialized = self._deserialize("SparkSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_spark_session.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions'} # type: ignore + + create_spark_session.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions"} # type: ignore async def get_spark_session( - self, - session_id: int, - detailed: Optional[bool] = None, - **kwargs: Any + self, session_id: int, detailed: Optional[bool] = None, **kwargs: Any ) -> "_models.SparkSession": """Gets a single spark session. @@ -188,31 +195,33 @@ async def get_spark_session( :rtype: ~azure.synapse.spark.models.SparkSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkSession"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_session.metadata['url'] # type: ignore + url = self.get_spark_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -222,19 +231,16 @@ async def get_spark_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkSession', pipeline_response) + deserialized = self._deserialize("SparkSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_session.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}'} # type: ignore - async def cancel_spark_session( - self, - session_id: int, - **kwargs: Any - ) -> None: + get_spark_session.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}"} # type: ignore + + async def cancel_spark_session(self, session_id: int, **kwargs: Any) -> None: """Cancels a running spark session. :param session_id: Identifier for the session. @@ -244,19 +250,21 @@ async def cancel_spark_session( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) # Construct URL - url = self.cancel_spark_session.metadata['url'] # type: ignore + url = self.cancel_spark_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -277,13 +285,9 @@ async def cancel_spark_session( if cls: return cls(pipeline_response, None, {}) - cancel_spark_session.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}'} # type: ignore + cancel_spark_session.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}"} # type: ignore - async def reset_spark_session_timeout( - self, - session_id: int, - **kwargs: Any - ) -> None: + async def reset_spark_session_timeout(self, session_id: int, **kwargs: Any) -> None: """Sends a keep alive call to the current session to reset the session timeout. :param session_id: Identifier for the session. @@ -293,19 +297,21 @@ async def reset_spark_session_timeout( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) # Construct URL - url = self.reset_spark_session_timeout.metadata['url'] # type: ignore + url = self.reset_spark_session_timeout.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -326,13 +332,9 @@ async def reset_spark_session_timeout( if cls: return cls(pipeline_response, None, {}) - reset_spark_session_timeout.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/reset-timeout'} # type: ignore + reset_spark_session_timeout.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/reset-timeout"} # type: ignore - async def get_spark_statements( - self, - session_id: int, - **kwargs: Any - ) -> "_models.SparkStatementCollection": + async def get_spark_statements(self, session_id: int, **kwargs: Any) -> "_models.SparkStatementCollection": """Gets a list of statements within a spark session. :param session_id: Identifier for the session. @@ -342,20 +344,22 @@ async def get_spark_statements( :rtype: ~azure.synapse.spark.models.SparkStatementCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatementCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatementCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_statements.metadata['url'] # type: ignore + url = self.get_spark_statements.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -364,7 +368,7 @@ async def get_spark_statements( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -374,19 +378,17 @@ async def get_spark_statements( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatementCollection', pipeline_response) + deserialized = self._deserialize("SparkStatementCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_statements.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements'} # type: ignore + + get_spark_statements.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements"} # type: ignore async def create_spark_statement( - self, - session_id: int, - spark_statement_options: "_models.SparkStatementOptions", - **kwargs: Any + self, session_id: int, spark_statement_options: "_models.SparkStatementOptions", **kwargs: Any ) -> "_models.SparkStatement": """Create statement within a spark session. @@ -399,21 +401,23 @@ async def create_spark_statement( :rtype: ~azure.synapse.spark.models.SparkStatement :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatement"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatement"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_spark_statement.metadata['url'] # type: ignore + url = self.create_spark_statement.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -422,12 +426,12 @@ async def create_spark_statement( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spark_statement_options, 'SparkStatementOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(spark_statement_options, "SparkStatementOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -436,20 +440,16 @@ async def create_spark_statement( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatement', pipeline_response) + deserialized = self._deserialize("SparkStatement", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_spark_statement.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements'} # type: ignore - async def get_spark_statement( - self, - session_id: int, - statement_id: int, - **kwargs: Any - ) -> "_models.SparkStatement": + create_spark_statement.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements"} # type: ignore + + async def get_spark_statement(self, session_id: int, statement_id: int, **kwargs: Any) -> "_models.SparkStatement": """Gets a single statement within a spark session. :param session_id: Identifier for the session. @@ -461,21 +461,23 @@ async def get_spark_statement( :rtype: ~azure.synapse.spark.models.SparkStatement :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatement"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatement"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_statement.metadata['url'] # type: ignore + url = self.get_spark_statement.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), - 'statementId': self._serialize.url("statement_id", statement_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), + "statementId": self._serialize.url("statement_id", statement_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -484,7 +486,7 @@ async def get_spark_statement( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -494,19 +496,17 @@ async def get_spark_statement( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatement', pipeline_response) + deserialized = self._deserialize("SparkStatement", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_statement.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}'} # type: ignore + + get_spark_statement.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}"} # type: ignore async def cancel_spark_statement( - self, - session_id: int, - statement_id: int, - **kwargs: Any + self, session_id: int, statement_id: int, **kwargs: Any ) -> "_models.SparkStatementCancellationResult": """Kill a statement within a session. @@ -519,21 +519,23 @@ async def cancel_spark_statement( :rtype: ~azure.synapse.spark.models.SparkStatementCancellationResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatementCancellationResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatementCancellationResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.cancel_spark_statement.metadata['url'] # type: ignore + url = self.cancel_spark_statement.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), - 'statementId': self._serialize.url("statement_id", statement_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), + "statementId": self._serialize.url("statement_id", statement_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -542,7 +544,7 @@ async def cancel_spark_statement( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -552,10 +554,11 @@ async def cancel_spark_statement( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatementCancellationResult', pipeline_response) + deserialized = self._deserialize("SparkStatementCancellationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - cancel_spark_statement.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}/cancel'} # type: ignore + + cancel_spark_statement.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}/cancel"} # type: ignore diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/__init__.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/__init__.py index b7d181f06684..0180abb67b62 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/__init__.py @@ -56,30 +56,30 @@ ) __all__ = [ - 'SparkBatchJob', - 'SparkBatchJobCollection', - 'SparkBatchJobOptions', - 'SparkBatchJobState', - 'SparkRequest', - 'SparkScheduler', - 'SparkServiceError', - 'SparkServicePlugin', - 'SparkSession', - 'SparkSessionCollection', - 'SparkSessionOptions', - 'SparkSessionState', - 'SparkStatement', - 'SparkStatementCancellationResult', - 'SparkStatementCollection', - 'SparkStatementOptions', - 'SparkStatementOutput', - 'LivyStatementStates', - 'LivyStates', - 'PluginCurrentState', - 'SchedulerCurrentState', - 'SparkBatchJobResultType', - 'SparkErrorSource', - 'SparkJobType', - 'SparkSessionResultType', - 'SparkStatementLanguageType', + "SparkBatchJob", + "SparkBatchJobCollection", + "SparkBatchJobOptions", + "SparkBatchJobState", + "SparkRequest", + "SparkScheduler", + "SparkServiceError", + "SparkServicePlugin", + "SparkSession", + "SparkSessionCollection", + "SparkSessionOptions", + "SparkSessionState", + "SparkStatement", + "SparkStatementCancellationResult", + "SparkStatementCollection", + "SparkStatementOptions", + "SparkStatementOutput", + "LivyStatementStates", + "LivyStates", + "PluginCurrentState", + "SchedulerCurrentState", + "SparkBatchJobResultType", + "SparkErrorSource", + "SparkJobType", + "SparkSessionResultType", + "SparkStatementLanguageType", ] diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models.py index 4b0a18b5a9de..bd76d0ce3447 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models.py @@ -55,53 +55,50 @@ class SparkBatchJob(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'livy_info': {'key': 'livyInfo', 'type': 'SparkBatchJobState'}, - 'name': {'key': 'name', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'spark_pool_name': {'key': 'sparkPoolName', 'type': 'str'}, - 'submitter_name': {'key': 'submitterName', 'type': 'str'}, - 'submitter_id': {'key': 'submitterId', 'type': 'str'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'str'}, - 'scheduler': {'key': 'schedulerInfo', 'type': 'SparkScheduler'}, - 'plugin': {'key': 'pluginInfo', 'type': 'SparkServicePlugin'}, - 'errors': {'key': 'errorInfo', 'type': '[SparkServiceError]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'int'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'app_info': {'key': 'appInfo', 'type': '{str}'}, - 'state': {'key': 'state', 'type': 'str'}, - 'log_lines': {'key': 'log', 'type': '[str]'}, + "livy_info": {"key": "livyInfo", "type": "SparkBatchJobState"}, + "name": {"key": "name", "type": "str"}, + "workspace_name": {"key": "workspaceName", "type": "str"}, + "spark_pool_name": {"key": "sparkPoolName", "type": "str"}, + "submitter_name": {"key": "submitterName", "type": "str"}, + "submitter_id": {"key": "submitterId", "type": "str"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "job_type": {"key": "jobType", "type": "str"}, + "result": {"key": "result", "type": "str"}, + "scheduler": {"key": "schedulerInfo", "type": "SparkScheduler"}, + "plugin": {"key": "pluginInfo", "type": "SparkServicePlugin"}, + "errors": {"key": "errorInfo", "type": "[SparkServiceError]"}, + "tags": {"key": "tags", "type": "{str}"}, + "id": {"key": "id", "type": "int"}, + "app_id": {"key": "appId", "type": "str"}, + "app_info": {"key": "appInfo", "type": "{str}"}, + "state": {"key": "state", "type": "str"}, + "log_lines": {"key": "log", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkBatchJob, self).__init__(**kwargs) - self.livy_info = kwargs.get('livy_info', None) - self.name = kwargs.get('name', None) - self.workspace_name = kwargs.get('workspace_name', None) - self.spark_pool_name = kwargs.get('spark_pool_name', None) - self.submitter_name = kwargs.get('submitter_name', None) - self.submitter_id = kwargs.get('submitter_id', None) - self.artifact_id = kwargs.get('artifact_id', None) - self.job_type = kwargs.get('job_type', None) - self.result = kwargs.get('result', None) - self.scheduler = kwargs.get('scheduler', None) - self.plugin = kwargs.get('plugin', None) - self.errors = kwargs.get('errors', None) - self.tags = kwargs.get('tags', None) - self.id = kwargs['id'] - self.app_id = kwargs.get('app_id', None) - self.app_info = kwargs.get('app_info', None) - self.state = kwargs.get('state', None) - self.log_lines = kwargs.get('log_lines', None) + self.livy_info = kwargs.get("livy_info", None) + self.name = kwargs.get("name", None) + self.workspace_name = kwargs.get("workspace_name", None) + self.spark_pool_name = kwargs.get("spark_pool_name", None) + self.submitter_name = kwargs.get("submitter_name", None) + self.submitter_id = kwargs.get("submitter_id", None) + self.artifact_id = kwargs.get("artifact_id", None) + self.job_type = kwargs.get("job_type", None) + self.result = kwargs.get("result", None) + self.scheduler = kwargs.get("scheduler", None) + self.plugin = kwargs.get("plugin", None) + self.errors = kwargs.get("errors", None) + self.tags = kwargs.get("tags", None) + self.id = kwargs["id"] + self.app_id = kwargs.get("app_id", None) + self.app_info = kwargs.get("app_info", None) + self.state = kwargs.get("state", None) + self.log_lines = kwargs.get("log_lines", None) class SparkBatchJobCollection(msrest.serialization.Model): @@ -118,24 +115,21 @@ class SparkBatchJobCollection(msrest.serialization.Model): """ _validation = { - 'from_property': {'required': True}, - 'total': {'required': True}, + "from_property": {"required": True}, + "total": {"required": True}, } _attribute_map = { - 'from_property': {'key': 'from', 'type': 'int'}, - 'total': {'key': 'total', 'type': 'int'}, - 'sessions': {'key': 'sessions', 'type': '[SparkBatchJob]'}, + "from_property": {"key": "from", "type": "int"}, + "total": {"key": "total", "type": "int"}, + "sessions": {"key": "sessions", "type": "[SparkBatchJob]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkBatchJobCollection, self).__init__(**kwargs) - self.from_property = kwargs['from_property'] - self.total = kwargs['total'] - self.sessions = kwargs.get('sessions', None) + self.from_property = kwargs["from_property"] + self.total = kwargs["total"] + self.sessions = kwargs.get("sessions", None) class SparkBatchJobOptions(msrest.serialization.Model): @@ -178,50 +172,47 @@ class SparkBatchJobOptions(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'file': {'required': True}, + "name": {"required": True}, + "file": {"required": True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, - 'arguments': {'key': 'args', 'type': '[str]'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'python_files': {'key': 'pyFiles', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'configuration': {'key': 'conf', 'type': '{str}'}, - 'driver_memory': {'key': 'driverMemory', 'type': 'str'}, - 'driver_cores': {'key': 'driverCores', 'type': 'int'}, - 'executor_memory': {'key': 'executorMemory', 'type': 'str'}, - 'executor_cores': {'key': 'executorCores', 'type': 'int'}, - 'executor_count': {'key': 'numExecutors', 'type': 'int'}, + "tags": {"key": "tags", "type": "{str}"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "file": {"key": "file", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, + "arguments": {"key": "args", "type": "[str]"}, + "jars": {"key": "jars", "type": "[str]"}, + "python_files": {"key": "pyFiles", "type": "[str]"}, + "files": {"key": "files", "type": "[str]"}, + "archives": {"key": "archives", "type": "[str]"}, + "configuration": {"key": "conf", "type": "{str}"}, + "driver_memory": {"key": "driverMemory", "type": "str"}, + "driver_cores": {"key": "driverCores", "type": "int"}, + "executor_memory": {"key": "executorMemory", "type": "str"}, + "executor_cores": {"key": "executorCores", "type": "int"}, + "executor_count": {"key": "numExecutors", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkBatchJobOptions, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.artifact_id = kwargs.get('artifact_id', None) - self.name = kwargs['name'] - self.file = kwargs['file'] - self.class_name = kwargs.get('class_name', None) - self.arguments = kwargs.get('arguments', None) - self.jars = kwargs.get('jars', None) - self.python_files = kwargs.get('python_files', None) - self.files = kwargs.get('files', None) - self.archives = kwargs.get('archives', None) - self.configuration = kwargs.get('configuration', None) - self.driver_memory = kwargs.get('driver_memory', None) - self.driver_cores = kwargs.get('driver_cores', None) - self.executor_memory = kwargs.get('executor_memory', None) - self.executor_cores = kwargs.get('executor_cores', None) - self.executor_count = kwargs.get('executor_count', None) + self.tags = kwargs.get("tags", None) + self.artifact_id = kwargs.get("artifact_id", None) + self.name = kwargs["name"] + self.file = kwargs["file"] + self.class_name = kwargs.get("class_name", None) + self.arguments = kwargs.get("arguments", None) + self.jars = kwargs.get("jars", None) + self.python_files = kwargs.get("python_files", None) + self.files = kwargs.get("files", None) + self.archives = kwargs.get("archives", None) + self.configuration = kwargs.get("configuration", None) + self.driver_memory = kwargs.get("driver_memory", None) + self.driver_cores = kwargs.get("driver_cores", None) + self.executor_memory = kwargs.get("executor_memory", None) + self.executor_cores = kwargs.get("executor_cores", None) + self.executor_count = kwargs.get("executor_count", None) class SparkBatchJobState(msrest.serialization.Model): @@ -248,31 +239,28 @@ class SparkBatchJobState(msrest.serialization.Model): """ _attribute_map = { - 'not_started_at': {'key': 'notStartedAt', 'type': 'iso-8601'}, - 'starting_at': {'key': 'startingAt', 'type': 'iso-8601'}, - 'running_at': {'key': 'runningAt', 'type': 'iso-8601'}, - 'dead_at': {'key': 'deadAt', 'type': 'iso-8601'}, - 'success_at': {'key': 'successAt', 'type': 'iso-8601'}, - 'terminated_at': {'key': 'killedAt', 'type': 'iso-8601'}, - 'recovering_at': {'key': 'recoveringAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, - 'job_creation_request': {'key': 'jobCreationRequest', 'type': 'SparkRequest'}, + "not_started_at": {"key": "notStartedAt", "type": "iso-8601"}, + "starting_at": {"key": "startingAt", "type": "iso-8601"}, + "running_at": {"key": "runningAt", "type": "iso-8601"}, + "dead_at": {"key": "deadAt", "type": "iso-8601"}, + "success_at": {"key": "successAt", "type": "iso-8601"}, + "terminated_at": {"key": "killedAt", "type": "iso-8601"}, + "recovering_at": {"key": "recoveringAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, + "job_creation_request": {"key": "jobCreationRequest", "type": "SparkRequest"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkBatchJobState, self).__init__(**kwargs) - self.not_started_at = kwargs.get('not_started_at', None) - self.starting_at = kwargs.get('starting_at', None) - self.running_at = kwargs.get('running_at', None) - self.dead_at = kwargs.get('dead_at', None) - self.success_at = kwargs.get('success_at', None) - self.terminated_at = kwargs.get('terminated_at', None) - self.recovering_at = kwargs.get('recovering_at', None) - self.current_state = kwargs.get('current_state', None) - self.job_creation_request = kwargs.get('job_creation_request', None) + self.not_started_at = kwargs.get("not_started_at", None) + self.starting_at = kwargs.get("starting_at", None) + self.running_at = kwargs.get("running_at", None) + self.dead_at = kwargs.get("dead_at", None) + self.success_at = kwargs.get("success_at", None) + self.terminated_at = kwargs.get("terminated_at", None) + self.recovering_at = kwargs.get("recovering_at", None) + self.current_state = kwargs.get("current_state", None) + self.job_creation_request = kwargs.get("job_creation_request", None) class SparkRequest(msrest.serialization.Model): @@ -309,41 +297,38 @@ class SparkRequest(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, - 'arguments': {'key': 'args', 'type': '[str]'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'python_files': {'key': 'pyFiles', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'configuration': {'key': 'conf', 'type': '{str}'}, - 'driver_memory': {'key': 'driverMemory', 'type': 'str'}, - 'driver_cores': {'key': 'driverCores', 'type': 'int'}, - 'executor_memory': {'key': 'executorMemory', 'type': 'str'}, - 'executor_cores': {'key': 'executorCores', 'type': 'int'}, - 'executor_count': {'key': 'numExecutors', 'type': 'int'}, + "name": {"key": "name", "type": "str"}, + "file": {"key": "file", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, + "arguments": {"key": "args", "type": "[str]"}, + "jars": {"key": "jars", "type": "[str]"}, + "python_files": {"key": "pyFiles", "type": "[str]"}, + "files": {"key": "files", "type": "[str]"}, + "archives": {"key": "archives", "type": "[str]"}, + "configuration": {"key": "conf", "type": "{str}"}, + "driver_memory": {"key": "driverMemory", "type": "str"}, + "driver_cores": {"key": "driverCores", "type": "int"}, + "executor_memory": {"key": "executorMemory", "type": "str"}, + "executor_cores": {"key": "executorCores", "type": "int"}, + "executor_count": {"key": "numExecutors", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.file = kwargs.get('file', None) - self.class_name = kwargs.get('class_name', None) - self.arguments = kwargs.get('arguments', None) - self.jars = kwargs.get('jars', None) - self.python_files = kwargs.get('python_files', None) - self.files = kwargs.get('files', None) - self.archives = kwargs.get('archives', None) - self.configuration = kwargs.get('configuration', None) - self.driver_memory = kwargs.get('driver_memory', None) - self.driver_cores = kwargs.get('driver_cores', None) - self.executor_memory = kwargs.get('executor_memory', None) - self.executor_cores = kwargs.get('executor_cores', None) - self.executor_count = kwargs.get('executor_count', None) + self.name = kwargs.get("name", None) + self.file = kwargs.get("file", None) + self.class_name = kwargs.get("class_name", None) + self.arguments = kwargs.get("arguments", None) + self.jars = kwargs.get("jars", None) + self.python_files = kwargs.get("python_files", None) + self.files = kwargs.get("files", None) + self.archives = kwargs.get("archives", None) + self.configuration = kwargs.get("configuration", None) + self.driver_memory = kwargs.get("driver_memory", None) + self.driver_cores = kwargs.get("driver_cores", None) + self.executor_memory = kwargs.get("executor_memory", None) + self.executor_cores = kwargs.get("executor_cores", None) + self.executor_count = kwargs.get("executor_count", None) class SparkScheduler(msrest.serialization.Model): @@ -362,23 +347,20 @@ class SparkScheduler(msrest.serialization.Model): """ _attribute_map = { - 'submitted_at': {'key': 'submittedAt', 'type': 'iso-8601'}, - 'scheduled_at': {'key': 'scheduledAt', 'type': 'iso-8601'}, - 'ended_at': {'key': 'endedAt', 'type': 'iso-8601'}, - 'cancellation_requested_at': {'key': 'cancellationRequestedAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, + "submitted_at": {"key": "submittedAt", "type": "iso-8601"}, + "scheduled_at": {"key": "scheduledAt", "type": "iso-8601"}, + "ended_at": {"key": "endedAt", "type": "iso-8601"}, + "cancellation_requested_at": {"key": "cancellationRequestedAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkScheduler, self).__init__(**kwargs) - self.submitted_at = kwargs.get('submitted_at', None) - self.scheduled_at = kwargs.get('scheduled_at', None) - self.ended_at = kwargs.get('ended_at', None) - self.cancellation_requested_at = kwargs.get('cancellation_requested_at', None) - self.current_state = kwargs.get('current_state', None) + self.submitted_at = kwargs.get("submitted_at", None) + self.scheduled_at = kwargs.get("scheduled_at", None) + self.ended_at = kwargs.get("ended_at", None) + self.cancellation_requested_at = kwargs.get("cancellation_requested_at", None) + self.current_state = kwargs.get("current_state", None) class SparkServiceError(msrest.serialization.Model): @@ -393,19 +375,16 @@ class SparkServiceError(msrest.serialization.Model): """ _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, + "message": {"key": "message", "type": "str"}, + "error_code": {"key": "errorCode", "type": "str"}, + "source": {"key": "source", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkServiceError, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.error_code = kwargs.get('error_code', None) - self.source = kwargs.get('source', None) + self.message = kwargs.get("message", None) + self.error_code = kwargs.get("error_code", None) + self.source = kwargs.get("source", None) class SparkServicePlugin(msrest.serialization.Model): @@ -427,25 +406,22 @@ class SparkServicePlugin(msrest.serialization.Model): """ _attribute_map = { - 'preparation_started_at': {'key': 'preparationStartedAt', 'type': 'iso-8601'}, - 'resource_acquisition_started_at': {'key': 'resourceAcquisitionStartedAt', 'type': 'iso-8601'}, - 'submission_started_at': {'key': 'submissionStartedAt', 'type': 'iso-8601'}, - 'monitoring_started_at': {'key': 'monitoringStartedAt', 'type': 'iso-8601'}, - 'cleanup_started_at': {'key': 'cleanupStartedAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, + "preparation_started_at": {"key": "preparationStartedAt", "type": "iso-8601"}, + "resource_acquisition_started_at": {"key": "resourceAcquisitionStartedAt", "type": "iso-8601"}, + "submission_started_at": {"key": "submissionStartedAt", "type": "iso-8601"}, + "monitoring_started_at": {"key": "monitoringStartedAt", "type": "iso-8601"}, + "cleanup_started_at": {"key": "cleanupStartedAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkServicePlugin, self).__init__(**kwargs) - self.preparation_started_at = kwargs.get('preparation_started_at', None) - self.resource_acquisition_started_at = kwargs.get('resource_acquisition_started_at', None) - self.submission_started_at = kwargs.get('submission_started_at', None) - self.monitoring_started_at = kwargs.get('monitoring_started_at', None) - self.cleanup_started_at = kwargs.get('cleanup_started_at', None) - self.current_state = kwargs.get('current_state', None) + self.preparation_started_at = kwargs.get("preparation_started_at", None) + self.resource_acquisition_started_at = kwargs.get("resource_acquisition_started_at", None) + self.submission_started_at = kwargs.get("submission_started_at", None) + self.monitoring_started_at = kwargs.get("monitoring_started_at", None) + self.cleanup_started_at = kwargs.get("cleanup_started_at", None) + self.current_state = kwargs.get("current_state", None) class SparkSession(msrest.serialization.Model): @@ -493,53 +469,50 @@ class SparkSession(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'livy_info': {'key': 'livyInfo', 'type': 'SparkSessionState'}, - 'name': {'key': 'name', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'spark_pool_name': {'key': 'sparkPoolName', 'type': 'str'}, - 'submitter_name': {'key': 'submitterName', 'type': 'str'}, - 'submitter_id': {'key': 'submitterId', 'type': 'str'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'str'}, - 'scheduler': {'key': 'schedulerInfo', 'type': 'SparkScheduler'}, - 'plugin': {'key': 'pluginInfo', 'type': 'SparkServicePlugin'}, - 'errors': {'key': 'errorInfo', 'type': '[SparkServiceError]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'int'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'app_info': {'key': 'appInfo', 'type': '{str}'}, - 'state': {'key': 'state', 'type': 'str'}, - 'log_lines': {'key': 'log', 'type': '[str]'}, + "livy_info": {"key": "livyInfo", "type": "SparkSessionState"}, + "name": {"key": "name", "type": "str"}, + "workspace_name": {"key": "workspaceName", "type": "str"}, + "spark_pool_name": {"key": "sparkPoolName", "type": "str"}, + "submitter_name": {"key": "submitterName", "type": "str"}, + "submitter_id": {"key": "submitterId", "type": "str"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "job_type": {"key": "jobType", "type": "str"}, + "result": {"key": "result", "type": "str"}, + "scheduler": {"key": "schedulerInfo", "type": "SparkScheduler"}, + "plugin": {"key": "pluginInfo", "type": "SparkServicePlugin"}, + "errors": {"key": "errorInfo", "type": "[SparkServiceError]"}, + "tags": {"key": "tags", "type": "{str}"}, + "id": {"key": "id", "type": "int"}, + "app_id": {"key": "appId", "type": "str"}, + "app_info": {"key": "appInfo", "type": "{str}"}, + "state": {"key": "state", "type": "str"}, + "log_lines": {"key": "log", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkSession, self).__init__(**kwargs) - self.livy_info = kwargs.get('livy_info', None) - self.name = kwargs.get('name', None) - self.workspace_name = kwargs.get('workspace_name', None) - self.spark_pool_name = kwargs.get('spark_pool_name', None) - self.submitter_name = kwargs.get('submitter_name', None) - self.submitter_id = kwargs.get('submitter_id', None) - self.artifact_id = kwargs.get('artifact_id', None) - self.job_type = kwargs.get('job_type', None) - self.result = kwargs.get('result', None) - self.scheduler = kwargs.get('scheduler', None) - self.plugin = kwargs.get('plugin', None) - self.errors = kwargs.get('errors', None) - self.tags = kwargs.get('tags', None) - self.id = kwargs['id'] - self.app_id = kwargs.get('app_id', None) - self.app_info = kwargs.get('app_info', None) - self.state = kwargs.get('state', None) - self.log_lines = kwargs.get('log_lines', None) + self.livy_info = kwargs.get("livy_info", None) + self.name = kwargs.get("name", None) + self.workspace_name = kwargs.get("workspace_name", None) + self.spark_pool_name = kwargs.get("spark_pool_name", None) + self.submitter_name = kwargs.get("submitter_name", None) + self.submitter_id = kwargs.get("submitter_id", None) + self.artifact_id = kwargs.get("artifact_id", None) + self.job_type = kwargs.get("job_type", None) + self.result = kwargs.get("result", None) + self.scheduler = kwargs.get("scheduler", None) + self.plugin = kwargs.get("plugin", None) + self.errors = kwargs.get("errors", None) + self.tags = kwargs.get("tags", None) + self.id = kwargs["id"] + self.app_id = kwargs.get("app_id", None) + self.app_info = kwargs.get("app_info", None) + self.state = kwargs.get("state", None) + self.log_lines = kwargs.get("log_lines", None) class SparkSessionCollection(msrest.serialization.Model): @@ -556,24 +529,21 @@ class SparkSessionCollection(msrest.serialization.Model): """ _validation = { - 'from_property': {'required': True}, - 'total': {'required': True}, + "from_property": {"required": True}, + "total": {"required": True}, } _attribute_map = { - 'from_property': {'key': 'from', 'type': 'int'}, - 'total': {'key': 'total', 'type': 'int'}, - 'sessions': {'key': 'sessions', 'type': '[SparkSession]'}, + "from_property": {"key": "from", "type": "int"}, + "total": {"key": "total", "type": "int"}, + "sessions": {"key": "sessions", "type": "[SparkSession]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkSessionCollection, self).__init__(**kwargs) - self.from_property = kwargs['from_property'] - self.total = kwargs['total'] - self.sessions = kwargs.get('sessions', None) + self.from_property = kwargs["from_property"] + self.total = kwargs["total"] + self.sessions = kwargs.get("sessions", None) class SparkSessionOptions(msrest.serialization.Model): @@ -616,49 +586,46 @@ class SparkSessionOptions(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, - 'arguments': {'key': 'args', 'type': '[str]'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'python_files': {'key': 'pyFiles', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'configuration': {'key': 'conf', 'type': '{str}'}, - 'driver_memory': {'key': 'driverMemory', 'type': 'str'}, - 'driver_cores': {'key': 'driverCores', 'type': 'int'}, - 'executor_memory': {'key': 'executorMemory', 'type': 'str'}, - 'executor_cores': {'key': 'executorCores', 'type': 'int'}, - 'executor_count': {'key': 'numExecutors', 'type': 'int'}, + "tags": {"key": "tags", "type": "{str}"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "file": {"key": "file", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, + "arguments": {"key": "args", "type": "[str]"}, + "jars": {"key": "jars", "type": "[str]"}, + "python_files": {"key": "pyFiles", "type": "[str]"}, + "files": {"key": "files", "type": "[str]"}, + "archives": {"key": "archives", "type": "[str]"}, + "configuration": {"key": "conf", "type": "{str}"}, + "driver_memory": {"key": "driverMemory", "type": "str"}, + "driver_cores": {"key": "driverCores", "type": "int"}, + "executor_memory": {"key": "executorMemory", "type": "str"}, + "executor_cores": {"key": "executorCores", "type": "int"}, + "executor_count": {"key": "numExecutors", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkSessionOptions, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.artifact_id = kwargs.get('artifact_id', None) - self.name = kwargs['name'] - self.file = kwargs.get('file', None) - self.class_name = kwargs.get('class_name', None) - self.arguments = kwargs.get('arguments', None) - self.jars = kwargs.get('jars', None) - self.python_files = kwargs.get('python_files', None) - self.files = kwargs.get('files', None) - self.archives = kwargs.get('archives', None) - self.configuration = kwargs.get('configuration', None) - self.driver_memory = kwargs.get('driver_memory', None) - self.driver_cores = kwargs.get('driver_cores', None) - self.executor_memory = kwargs.get('executor_memory', None) - self.executor_cores = kwargs.get('executor_cores', None) - self.executor_count = kwargs.get('executor_count', None) + self.tags = kwargs.get("tags", None) + self.artifact_id = kwargs.get("artifact_id", None) + self.name = kwargs["name"] + self.file = kwargs.get("file", None) + self.class_name = kwargs.get("class_name", None) + self.arguments = kwargs.get("arguments", None) + self.jars = kwargs.get("jars", None) + self.python_files = kwargs.get("python_files", None) + self.files = kwargs.get("files", None) + self.archives = kwargs.get("archives", None) + self.configuration = kwargs.get("configuration", None) + self.driver_memory = kwargs.get("driver_memory", None) + self.driver_cores = kwargs.get("driver_cores", None) + self.executor_memory = kwargs.get("executor_memory", None) + self.executor_cores = kwargs.get("executor_cores", None) + self.executor_count = kwargs.get("executor_count", None) class SparkSessionState(msrest.serialization.Model): @@ -689,35 +656,32 @@ class SparkSessionState(msrest.serialization.Model): """ _attribute_map = { - 'not_started_at': {'key': 'notStartedAt', 'type': 'iso-8601'}, - 'starting_at': {'key': 'startingAt', 'type': 'iso-8601'}, - 'idle_at': {'key': 'idleAt', 'type': 'iso-8601'}, - 'dead_at': {'key': 'deadAt', 'type': 'iso-8601'}, - 'shutting_down_at': {'key': 'shuttingDownAt', 'type': 'iso-8601'}, - 'terminated_at': {'key': 'killedAt', 'type': 'iso-8601'}, - 'recovering_at': {'key': 'recoveringAt', 'type': 'iso-8601'}, - 'busy_at': {'key': 'busyAt', 'type': 'iso-8601'}, - 'error_at': {'key': 'errorAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, - 'job_creation_request': {'key': 'jobCreationRequest', 'type': 'SparkRequest'}, + "not_started_at": {"key": "notStartedAt", "type": "iso-8601"}, + "starting_at": {"key": "startingAt", "type": "iso-8601"}, + "idle_at": {"key": "idleAt", "type": "iso-8601"}, + "dead_at": {"key": "deadAt", "type": "iso-8601"}, + "shutting_down_at": {"key": "shuttingDownAt", "type": "iso-8601"}, + "terminated_at": {"key": "killedAt", "type": "iso-8601"}, + "recovering_at": {"key": "recoveringAt", "type": "iso-8601"}, + "busy_at": {"key": "busyAt", "type": "iso-8601"}, + "error_at": {"key": "errorAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, + "job_creation_request": {"key": "jobCreationRequest", "type": "SparkRequest"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkSessionState, self).__init__(**kwargs) - self.not_started_at = kwargs.get('not_started_at', None) - self.starting_at = kwargs.get('starting_at', None) - self.idle_at = kwargs.get('idle_at', None) - self.dead_at = kwargs.get('dead_at', None) - self.shutting_down_at = kwargs.get('shutting_down_at', None) - self.terminated_at = kwargs.get('terminated_at', None) - self.recovering_at = kwargs.get('recovering_at', None) - self.busy_at = kwargs.get('busy_at', None) - self.error_at = kwargs.get('error_at', None) - self.current_state = kwargs.get('current_state', None) - self.job_creation_request = kwargs.get('job_creation_request', None) + self.not_started_at = kwargs.get("not_started_at", None) + self.starting_at = kwargs.get("starting_at", None) + self.idle_at = kwargs.get("idle_at", None) + self.dead_at = kwargs.get("dead_at", None) + self.shutting_down_at = kwargs.get("shutting_down_at", None) + self.terminated_at = kwargs.get("terminated_at", None) + self.recovering_at = kwargs.get("recovering_at", None) + self.busy_at = kwargs.get("busy_at", None) + self.error_at = kwargs.get("error_at", None) + self.current_state = kwargs.get("current_state", None) + self.job_creation_request = kwargs.get("job_creation_request", None) class SparkStatement(msrest.serialization.Model): @@ -737,25 +701,22 @@ class SparkStatement(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'code': {'key': 'code', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'output': {'key': 'output', 'type': 'SparkStatementOutput'}, + "id": {"key": "id", "type": "int"}, + "code": {"key": "code", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "output": {"key": "output", "type": "SparkStatementOutput"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkStatement, self).__init__(**kwargs) - self.id = kwargs['id'] - self.code = kwargs.get('code', None) - self.state = kwargs.get('state', None) - self.output = kwargs.get('output', None) + self.id = kwargs["id"] + self.code = kwargs.get("code", None) + self.state = kwargs.get("state", None) + self.output = kwargs.get("output", None) class SparkStatementCancellationResult(msrest.serialization.Model): @@ -766,15 +727,12 @@ class SparkStatementCancellationResult(msrest.serialization.Model): """ _attribute_map = { - 'message': {'key': 'msg', 'type': 'str'}, + "message": {"key": "msg", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkStatementCancellationResult, self).__init__(**kwargs) - self.message = kwargs.get('message', None) + self.message = kwargs.get("message", None) class SparkStatementCollection(msrest.serialization.Model): @@ -789,21 +747,18 @@ class SparkStatementCollection(msrest.serialization.Model): """ _validation = { - 'total': {'required': True}, + "total": {"required": True}, } _attribute_map = { - 'total': {'key': 'total_statements', 'type': 'int'}, - 'statements': {'key': 'statements', 'type': '[SparkStatement]'}, + "total": {"key": "total_statements", "type": "int"}, + "statements": {"key": "statements", "type": "[SparkStatement]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkStatementCollection, self).__init__(**kwargs) - self.total = kwargs['total'] - self.statements = kwargs.get('statements', None) + self.total = kwargs["total"] + self.statements = kwargs.get("statements", None) class SparkStatementOptions(msrest.serialization.Model): @@ -816,17 +771,14 @@ class SparkStatementOptions(msrest.serialization.Model): """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkStatementOptions, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.kind = kwargs.get('kind', None) + self.code = kwargs.get("code", None) + self.kind = kwargs.get("kind", None) class SparkStatementOutput(msrest.serialization.Model): @@ -849,26 +801,23 @@ class SparkStatementOutput(msrest.serialization.Model): """ _validation = { - 'execution_count': {'required': True}, + "execution_count": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'execution_count': {'key': 'execution_count', 'type': 'int'}, - 'data': {'key': 'data', 'type': 'object'}, - 'error_name': {'key': 'ename', 'type': 'str'}, - 'error_value': {'key': 'evalue', 'type': 'str'}, - 'traceback': {'key': 'traceback', 'type': '[str]'}, + "status": {"key": "status", "type": "str"}, + "execution_count": {"key": "execution_count", "type": "int"}, + "data": {"key": "data", "type": "object"}, + "error_name": {"key": "ename", "type": "str"}, + "error_value": {"key": "evalue", "type": "str"}, + "traceback": {"key": "traceback", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SparkStatementOutput, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.execution_count = kwargs['execution_count'] - self.data = kwargs.get('data', None) - self.error_name = kwargs.get('error_name', None) - self.error_value = kwargs.get('error_value', None) - self.traceback = kwargs.get('traceback', None) + self.status = kwargs.get("status", None) + self.execution_count = kwargs["execution_count"] + self.data = kwargs.get("data", None) + self.error_name = kwargs.get("error_name", None) + self.error_value = kwargs.get("error_value", None) + self.traceback = kwargs.get("traceback", None) diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models_py3.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models_py3.py index 4ce13b395875..fa4fd705e754 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models_py3.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_models_py3.py @@ -60,28 +60,28 @@ class SparkBatchJob(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'livy_info': {'key': 'livyInfo', 'type': 'SparkBatchJobState'}, - 'name': {'key': 'name', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'spark_pool_name': {'key': 'sparkPoolName', 'type': 'str'}, - 'submitter_name': {'key': 'submitterName', 'type': 'str'}, - 'submitter_id': {'key': 'submitterId', 'type': 'str'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'str'}, - 'scheduler': {'key': 'schedulerInfo', 'type': 'SparkScheduler'}, - 'plugin': {'key': 'pluginInfo', 'type': 'SparkServicePlugin'}, - 'errors': {'key': 'errorInfo', 'type': '[SparkServiceError]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'int'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'app_info': {'key': 'appInfo', 'type': '{str}'}, - 'state': {'key': 'state', 'type': 'str'}, - 'log_lines': {'key': 'log', 'type': '[str]'}, + "livy_info": {"key": "livyInfo", "type": "SparkBatchJobState"}, + "name": {"key": "name", "type": "str"}, + "workspace_name": {"key": "workspaceName", "type": "str"}, + "spark_pool_name": {"key": "sparkPoolName", "type": "str"}, + "submitter_name": {"key": "submitterName", "type": "str"}, + "submitter_id": {"key": "submitterId", "type": "str"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "job_type": {"key": "jobType", "type": "str"}, + "result": {"key": "result", "type": "str"}, + "scheduler": {"key": "schedulerInfo", "type": "SparkScheduler"}, + "plugin": {"key": "pluginInfo", "type": "SparkServicePlugin"}, + "errors": {"key": "errorInfo", "type": "[SparkServiceError]"}, + "tags": {"key": "tags", "type": "{str}"}, + "id": {"key": "id", "type": "int"}, + "app_id": {"key": "appId", "type": "str"}, + "app_info": {"key": "appInfo", "type": "{str}"}, + "state": {"key": "state", "type": "str"}, + "log_lines": {"key": "log", "type": "[str]"}, } def __init__( @@ -142,24 +142,17 @@ class SparkBatchJobCollection(msrest.serialization.Model): """ _validation = { - 'from_property': {'required': True}, - 'total': {'required': True}, + "from_property": {"required": True}, + "total": {"required": True}, } _attribute_map = { - 'from_property': {'key': 'from', 'type': 'int'}, - 'total': {'key': 'total', 'type': 'int'}, - 'sessions': {'key': 'sessions', 'type': '[SparkBatchJob]'}, + "from_property": {"key": "from", "type": "int"}, + "total": {"key": "total", "type": "int"}, + "sessions": {"key": "sessions", "type": "[SparkBatchJob]"}, } - def __init__( - self, - *, - from_property: int, - total: int, - sessions: Optional[List["SparkBatchJob"]] = None, - **kwargs - ): + def __init__(self, *, from_property: int, total: int, sessions: Optional[List["SparkBatchJob"]] = None, **kwargs): super(SparkBatchJobCollection, self).__init__(**kwargs) self.from_property = from_property self.total = total @@ -206,27 +199,27 @@ class SparkBatchJobOptions(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'file': {'required': True}, + "name": {"required": True}, + "file": {"required": True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, - 'arguments': {'key': 'args', 'type': '[str]'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'python_files': {'key': 'pyFiles', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'configuration': {'key': 'conf', 'type': '{str}'}, - 'driver_memory': {'key': 'driverMemory', 'type': 'str'}, - 'driver_cores': {'key': 'driverCores', 'type': 'int'}, - 'executor_memory': {'key': 'executorMemory', 'type': 'str'}, - 'executor_cores': {'key': 'executorCores', 'type': 'int'}, - 'executor_count': {'key': 'numExecutors', 'type': 'int'}, + "tags": {"key": "tags", "type": "{str}"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "file": {"key": "file", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, + "arguments": {"key": "args", "type": "[str]"}, + "jars": {"key": "jars", "type": "[str]"}, + "python_files": {"key": "pyFiles", "type": "[str]"}, + "files": {"key": "files", "type": "[str]"}, + "archives": {"key": "archives", "type": "[str]"}, + "configuration": {"key": "conf", "type": "{str}"}, + "driver_memory": {"key": "driverMemory", "type": "str"}, + "driver_cores": {"key": "driverCores", "type": "int"}, + "executor_memory": {"key": "executorMemory", "type": "str"}, + "executor_cores": {"key": "executorCores", "type": "int"}, + "executor_count": {"key": "numExecutors", "type": "int"}, } def __init__( @@ -293,15 +286,15 @@ class SparkBatchJobState(msrest.serialization.Model): """ _attribute_map = { - 'not_started_at': {'key': 'notStartedAt', 'type': 'iso-8601'}, - 'starting_at': {'key': 'startingAt', 'type': 'iso-8601'}, - 'running_at': {'key': 'runningAt', 'type': 'iso-8601'}, - 'dead_at': {'key': 'deadAt', 'type': 'iso-8601'}, - 'success_at': {'key': 'successAt', 'type': 'iso-8601'}, - 'terminated_at': {'key': 'killedAt', 'type': 'iso-8601'}, - 'recovering_at': {'key': 'recoveringAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, - 'job_creation_request': {'key': 'jobCreationRequest', 'type': 'SparkRequest'}, + "not_started_at": {"key": "notStartedAt", "type": "iso-8601"}, + "starting_at": {"key": "startingAt", "type": "iso-8601"}, + "running_at": {"key": "runningAt", "type": "iso-8601"}, + "dead_at": {"key": "deadAt", "type": "iso-8601"}, + "success_at": {"key": "successAt", "type": "iso-8601"}, + "terminated_at": {"key": "killedAt", "type": "iso-8601"}, + "recovering_at": {"key": "recoveringAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, + "job_creation_request": {"key": "jobCreationRequest", "type": "SparkRequest"}, } def __init__( @@ -364,20 +357,20 @@ class SparkRequest(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, - 'arguments': {'key': 'args', 'type': '[str]'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'python_files': {'key': 'pyFiles', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'configuration': {'key': 'conf', 'type': '{str}'}, - 'driver_memory': {'key': 'driverMemory', 'type': 'str'}, - 'driver_cores': {'key': 'driverCores', 'type': 'int'}, - 'executor_memory': {'key': 'executorMemory', 'type': 'str'}, - 'executor_cores': {'key': 'executorCores', 'type': 'int'}, - 'executor_count': {'key': 'numExecutors', 'type': 'int'}, + "name": {"key": "name", "type": "str"}, + "file": {"key": "file", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, + "arguments": {"key": "args", "type": "[str]"}, + "jars": {"key": "jars", "type": "[str]"}, + "python_files": {"key": "pyFiles", "type": "[str]"}, + "files": {"key": "files", "type": "[str]"}, + "archives": {"key": "archives", "type": "[str]"}, + "configuration": {"key": "conf", "type": "{str}"}, + "driver_memory": {"key": "driverMemory", "type": "str"}, + "driver_cores": {"key": "driverCores", "type": "int"}, + "executor_memory": {"key": "executorMemory", "type": "str"}, + "executor_cores": {"key": "executorCores", "type": "int"}, + "executor_count": {"key": "numExecutors", "type": "int"}, } def __init__( @@ -432,11 +425,11 @@ class SparkScheduler(msrest.serialization.Model): """ _attribute_map = { - 'submitted_at': {'key': 'submittedAt', 'type': 'iso-8601'}, - 'scheduled_at': {'key': 'scheduledAt', 'type': 'iso-8601'}, - 'ended_at': {'key': 'endedAt', 'type': 'iso-8601'}, - 'cancellation_requested_at': {'key': 'cancellationRequestedAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, + "submitted_at": {"key": "submittedAt", "type": "iso-8601"}, + "scheduled_at": {"key": "scheduledAt", "type": "iso-8601"}, + "ended_at": {"key": "endedAt", "type": "iso-8601"}, + "cancellation_requested_at": {"key": "cancellationRequestedAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, } def __init__( @@ -469,9 +462,9 @@ class SparkServiceError(msrest.serialization.Model): """ _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, + "message": {"key": "message", "type": "str"}, + "error_code": {"key": "errorCode", "type": "str"}, + "source": {"key": "source", "type": "str"}, } def __init__( @@ -507,12 +500,12 @@ class SparkServicePlugin(msrest.serialization.Model): """ _attribute_map = { - 'preparation_started_at': {'key': 'preparationStartedAt', 'type': 'iso-8601'}, - 'resource_acquisition_started_at': {'key': 'resourceAcquisitionStartedAt', 'type': 'iso-8601'}, - 'submission_started_at': {'key': 'submissionStartedAt', 'type': 'iso-8601'}, - 'monitoring_started_at': {'key': 'monitoringStartedAt', 'type': 'iso-8601'}, - 'cleanup_started_at': {'key': 'cleanupStartedAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, + "preparation_started_at": {"key": "preparationStartedAt", "type": "iso-8601"}, + "resource_acquisition_started_at": {"key": "resourceAcquisitionStartedAt", "type": "iso-8601"}, + "submission_started_at": {"key": "submissionStartedAt", "type": "iso-8601"}, + "monitoring_started_at": {"key": "monitoringStartedAt", "type": "iso-8601"}, + "cleanup_started_at": {"key": "cleanupStartedAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, } def __init__( @@ -580,28 +573,28 @@ class SparkSession(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'livy_info': {'key': 'livyInfo', 'type': 'SparkSessionState'}, - 'name': {'key': 'name', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'spark_pool_name': {'key': 'sparkPoolName', 'type': 'str'}, - 'submitter_name': {'key': 'submitterName', 'type': 'str'}, - 'submitter_id': {'key': 'submitterId', 'type': 'str'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'str'}, - 'scheduler': {'key': 'schedulerInfo', 'type': 'SparkScheduler'}, - 'plugin': {'key': 'pluginInfo', 'type': 'SparkServicePlugin'}, - 'errors': {'key': 'errorInfo', 'type': '[SparkServiceError]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'int'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'app_info': {'key': 'appInfo', 'type': '{str}'}, - 'state': {'key': 'state', 'type': 'str'}, - 'log_lines': {'key': 'log', 'type': '[str]'}, + "livy_info": {"key": "livyInfo", "type": "SparkSessionState"}, + "name": {"key": "name", "type": "str"}, + "workspace_name": {"key": "workspaceName", "type": "str"}, + "spark_pool_name": {"key": "sparkPoolName", "type": "str"}, + "submitter_name": {"key": "submitterName", "type": "str"}, + "submitter_id": {"key": "submitterId", "type": "str"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "job_type": {"key": "jobType", "type": "str"}, + "result": {"key": "result", "type": "str"}, + "scheduler": {"key": "schedulerInfo", "type": "SparkScheduler"}, + "plugin": {"key": "pluginInfo", "type": "SparkServicePlugin"}, + "errors": {"key": "errorInfo", "type": "[SparkServiceError]"}, + "tags": {"key": "tags", "type": "{str}"}, + "id": {"key": "id", "type": "int"}, + "app_id": {"key": "appId", "type": "str"}, + "app_info": {"key": "appInfo", "type": "{str}"}, + "state": {"key": "state", "type": "str"}, + "log_lines": {"key": "log", "type": "[str]"}, } def __init__( @@ -662,24 +655,17 @@ class SparkSessionCollection(msrest.serialization.Model): """ _validation = { - 'from_property': {'required': True}, - 'total': {'required': True}, + "from_property": {"required": True}, + "total": {"required": True}, } _attribute_map = { - 'from_property': {'key': 'from', 'type': 'int'}, - 'total': {'key': 'total', 'type': 'int'}, - 'sessions': {'key': 'sessions', 'type': '[SparkSession]'}, + "from_property": {"key": "from", "type": "int"}, + "total": {"key": "total", "type": "int"}, + "sessions": {"key": "sessions", "type": "[SparkSession]"}, } - def __init__( - self, - *, - from_property: int, - total: int, - sessions: Optional[List["SparkSession"]] = None, - **kwargs - ): + def __init__(self, *, from_property: int, total: int, sessions: Optional[List["SparkSession"]] = None, **kwargs): super(SparkSessionCollection, self).__init__(**kwargs) self.from_property = from_property self.total = total @@ -726,26 +712,26 @@ class SparkSessionOptions(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'artifact_id': {'key': 'artifactId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, - 'arguments': {'key': 'args', 'type': '[str]'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'python_files': {'key': 'pyFiles', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'configuration': {'key': 'conf', 'type': '{str}'}, - 'driver_memory': {'key': 'driverMemory', 'type': 'str'}, - 'driver_cores': {'key': 'driverCores', 'type': 'int'}, - 'executor_memory': {'key': 'executorMemory', 'type': 'str'}, - 'executor_cores': {'key': 'executorCores', 'type': 'int'}, - 'executor_count': {'key': 'numExecutors', 'type': 'int'}, + "tags": {"key": "tags", "type": "{str}"}, + "artifact_id": {"key": "artifactId", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "file": {"key": "file", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, + "arguments": {"key": "args", "type": "[str]"}, + "jars": {"key": "jars", "type": "[str]"}, + "python_files": {"key": "pyFiles", "type": "[str]"}, + "files": {"key": "files", "type": "[str]"}, + "archives": {"key": "archives", "type": "[str]"}, + "configuration": {"key": "conf", "type": "{str}"}, + "driver_memory": {"key": "driverMemory", "type": "str"}, + "driver_cores": {"key": "driverCores", "type": "int"}, + "executor_memory": {"key": "executorMemory", "type": "str"}, + "executor_cores": {"key": "executorCores", "type": "int"}, + "executor_count": {"key": "numExecutors", "type": "int"}, } def __init__( @@ -816,17 +802,17 @@ class SparkSessionState(msrest.serialization.Model): """ _attribute_map = { - 'not_started_at': {'key': 'notStartedAt', 'type': 'iso-8601'}, - 'starting_at': {'key': 'startingAt', 'type': 'iso-8601'}, - 'idle_at': {'key': 'idleAt', 'type': 'iso-8601'}, - 'dead_at': {'key': 'deadAt', 'type': 'iso-8601'}, - 'shutting_down_at': {'key': 'shuttingDownAt', 'type': 'iso-8601'}, - 'terminated_at': {'key': 'killedAt', 'type': 'iso-8601'}, - 'recovering_at': {'key': 'recoveringAt', 'type': 'iso-8601'}, - 'busy_at': {'key': 'busyAt', 'type': 'iso-8601'}, - 'error_at': {'key': 'errorAt', 'type': 'iso-8601'}, - 'current_state': {'key': 'currentState', 'type': 'str'}, - 'job_creation_request': {'key': 'jobCreationRequest', 'type': 'SparkRequest'}, + "not_started_at": {"key": "notStartedAt", "type": "iso-8601"}, + "starting_at": {"key": "startingAt", "type": "iso-8601"}, + "idle_at": {"key": "idleAt", "type": "iso-8601"}, + "dead_at": {"key": "deadAt", "type": "iso-8601"}, + "shutting_down_at": {"key": "shuttingDownAt", "type": "iso-8601"}, + "terminated_at": {"key": "killedAt", "type": "iso-8601"}, + "recovering_at": {"key": "recoveringAt", "type": "iso-8601"}, + "busy_at": {"key": "busyAt", "type": "iso-8601"}, + "error_at": {"key": "errorAt", "type": "iso-8601"}, + "current_state": {"key": "currentState", "type": "str"}, + "job_creation_request": {"key": "jobCreationRequest", "type": "SparkRequest"}, } def __init__( @@ -876,14 +862,14 @@ class SparkStatement(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'code': {'key': 'code', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'output': {'key': 'output', 'type': 'SparkStatementOutput'}, + "id": {"key": "id", "type": "int"}, + "code": {"key": "code", "type": "str"}, + "state": {"key": "state", "type": "str"}, + "output": {"key": "output", "type": "SparkStatementOutput"}, } def __init__( @@ -910,15 +896,10 @@ class SparkStatementCancellationResult(msrest.serialization.Model): """ _attribute_map = { - 'message': {'key': 'msg', 'type': 'str'}, + "message": {"key": "msg", "type": "str"}, } - def __init__( - self, - *, - message: Optional[str] = None, - **kwargs - ): + def __init__(self, *, message: Optional[str] = None, **kwargs): super(SparkStatementCancellationResult, self).__init__(**kwargs) self.message = message @@ -935,21 +916,15 @@ class SparkStatementCollection(msrest.serialization.Model): """ _validation = { - 'total': {'required': True}, + "total": {"required": True}, } _attribute_map = { - 'total': {'key': 'total_statements', 'type': 'int'}, - 'statements': {'key': 'statements', 'type': '[SparkStatement]'}, + "total": {"key": "total_statements", "type": "int"}, + "statements": {"key": "statements", "type": "[SparkStatement]"}, } - def __init__( - self, - *, - total: int, - statements: Optional[List["SparkStatement"]] = None, - **kwargs - ): + def __init__(self, *, total: int, statements: Optional[List["SparkStatement"]] = None, **kwargs): super(SparkStatementCollection, self).__init__(**kwargs) self.total = total self.statements = statements @@ -965,16 +940,12 @@ class SparkStatementOptions(msrest.serialization.Model): """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "kind": {"key": "kind", "type": "str"}, } def __init__( - self, - *, - code: Optional[str] = None, - kind: Optional[Union[str, "SparkStatementLanguageType"]] = None, - **kwargs + self, *, code: Optional[str] = None, kind: Optional[Union[str, "SparkStatementLanguageType"]] = None, **kwargs ): super(SparkStatementOptions, self).__init__(**kwargs) self.code = code @@ -1001,16 +972,16 @@ class SparkStatementOutput(msrest.serialization.Model): """ _validation = { - 'execution_count': {'required': True}, + "execution_count": {"required": True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'execution_count': {'key': 'execution_count', 'type': 'int'}, - 'data': {'key': 'data', 'type': 'object'}, - 'error_name': {'key': 'ename', 'type': 'str'}, - 'error_value': {'key': 'evalue', 'type': 'str'}, - 'traceback': {'key': 'traceback', 'type': '[str]'}, + "status": {"key": "status", "type": "str"}, + "execution_count": {"key": "execution_count", "type": "int"}, + "data": {"key": "data", "type": "object"}, + "error_name": {"key": "ename", "type": "str"}, + "error_value": {"key": "evalue", "type": "str"}, + "traceback": {"key": "traceback", "type": "[str]"}, } def __init__( diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_spark_client_enums.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_spark_client_enums.py index aa70c64baf93..f785b2dbdb34 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_spark_client_enums.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_spark_client_enums.py @@ -19,9 +19,9 @@ class LivyStatementStates(str, Enum, metaclass=CaseInsensitiveEnumMeta): CANCELLING = "cancelling" CANCELLED = "cancelled" + class LivyStates(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The batch state - """ + """The batch state""" NOT_STARTED = "not_started" STARTING = "starting" @@ -35,6 +35,7 @@ class LivyStates(str, Enum, metaclass=CaseInsensitiveEnumMeta): RUNNING = "running" RECOVERING = "recovering" + class PluginCurrentState(str, Enum, metaclass=CaseInsensitiveEnumMeta): PREPARATION = "Preparation" @@ -45,21 +46,23 @@ class PluginCurrentState(str, Enum, metaclass=CaseInsensitiveEnumMeta): CLEANUP = "Cleanup" ENDED = "Ended" + class SchedulerCurrentState(str, Enum, metaclass=CaseInsensitiveEnumMeta): QUEUED = "Queued" SCHEDULED = "Scheduled" ENDED = "Ended" + class SparkBatchJobResultType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The Spark batch job result. - """ + """The Spark batch job result.""" UNCERTAIN = "Uncertain" SUCCEEDED = "Succeeded" FAILED = "Failed" CANCELLED = "Cancelled" + class SparkErrorSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): SYSTEM = "System" @@ -67,13 +70,14 @@ class SparkErrorSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): UNKNOWN = "Unknown" DEPENDENCY = "Dependency" + class SparkJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The job type. - """ + """The job type.""" SPARK_BATCH = "SparkBatch" SPARK_SESSION = "SparkSession" + class SparkSessionResultType(str, Enum, metaclass=CaseInsensitiveEnumMeta): UNCERTAIN = "Uncertain" @@ -81,6 +85,7 @@ class SparkSessionResultType(str, Enum, metaclass=CaseInsensitiveEnumMeta): FAILED = "Failed" CANCELLED = "Cancelled" + class SparkStatementLanguageType(str, Enum, metaclass=CaseInsensitiveEnumMeta): SPARK = "spark" diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/__init__.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/__init__.py index cfceeb39e559..c5695a5f6fb7 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/__init__.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/__init__.py @@ -10,6 +10,6 @@ from ._spark_session_operations import SparkSessionOperations __all__ = [ - 'SparkBatchOperations', - 'SparkSessionOperations', + "SparkBatchOperations", + "SparkSessionOperations", ] diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_batch_operations.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_batch_operations.py index bd53b137b345..66584f9ec7dc 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_batch_operations.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_batch_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,9 +24,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class SparkBatchOperations(object): """SparkBatchOperations operations. @@ -66,34 +73,36 @@ def get_spark_batch_jobs( :rtype: ~azure.synapse.spark.models.SparkBatchJobCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkBatchJobCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkBatchJobCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_batch_jobs.metadata['url'] # type: ignore + url = self.get_spark_batch_jobs.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if from_parameter is not None: - query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'int') + query_parameters["from"] = self._serialize.query("from_parameter", from_parameter, "int") if size is not None: - query_parameters['size'] = self._serialize.query("size", size, 'int') + query_parameters["size"] = self._serialize.query("size", size, "int") if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -103,13 +112,14 @@ def get_spark_batch_jobs( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkBatchJobCollection', pipeline_response) + deserialized = self._deserialize("SparkBatchJobCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_batch_jobs.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches'} # type: ignore + + get_spark_batch_jobs.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches"} # type: ignore def create_spark_batch_job( self, @@ -130,36 +140,38 @@ def create_spark_batch_job( :rtype: ~azure.synapse.spark.models.SparkBatchJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkBatchJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkBatchJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_spark_batch_job.metadata['url'] # type: ignore + url = self.create_spark_batch_job.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spark_batch_job_options, 'SparkBatchJobOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(spark_batch_job_options, "SparkBatchJobOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -168,13 +180,14 @@ def create_spark_batch_job( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkBatchJob', pipeline_response) + deserialized = self._deserialize("SparkBatchJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_spark_batch_job.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches'} # type: ignore + + create_spark_batch_job.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches"} # type: ignore def get_spark_batch_job( self, @@ -195,31 +208,33 @@ def get_spark_batch_job( :rtype: ~azure.synapse.spark.models.SparkBatchJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkBatchJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkBatchJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_batch_job.metadata['url'] # type: ignore + url = self.get_spark_batch_job.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'batchId': self._serialize.url("batch_id", batch_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "batchId": self._serialize.url("batch_id", batch_id, "int"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -229,13 +244,14 @@ def get_spark_batch_job( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkBatchJob', pipeline_response) + deserialized = self._deserialize("SparkBatchJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_batch_job.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}'} # type: ignore + + get_spark_batch_job.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}"} # type: ignore def cancel_spark_batch_job( self, @@ -252,19 +268,21 @@ def cancel_spark_batch_job( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) # Construct URL - url = self.cancel_spark_batch_job.metadata['url'] # type: ignore + url = self.cancel_spark_batch_job.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'batchId': self._serialize.url("batch_id", batch_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "batchId": self._serialize.url("batch_id", batch_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -285,4 +303,4 @@ def cancel_spark_batch_job( if cls: return cls(pipeline_response, None, {}) - cancel_spark_batch_job.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}'} # type: ignore + cancel_spark_batch_job.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/batches/{batchId}"} # type: ignore diff --git a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_session_operations.py b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_session_operations.py index 75ef2e750004..cd70278fcd68 100644 --- a/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_session_operations.py +++ b/sdk/synapse/azure-synapse-spark/azure/synapse/spark/operations/_spark_session_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,9 +24,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class SparkSessionOperations(object): """SparkSessionOperations operations. @@ -66,34 +73,36 @@ def get_spark_sessions( :rtype: ~azure.synapse.spark.models.SparkSessionCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkSessionCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkSessionCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_sessions.metadata['url'] # type: ignore + url = self.get_spark_sessions.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if from_parameter is not None: - query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'int') + query_parameters["from"] = self._serialize.query("from_parameter", from_parameter, "int") if size is not None: - query_parameters['size'] = self._serialize.query("size", size, 'int') + query_parameters["size"] = self._serialize.query("size", size, "int") if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -103,13 +112,14 @@ def get_spark_sessions( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkSessionCollection', pipeline_response) + deserialized = self._deserialize("SparkSessionCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_sessions.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions'} # type: ignore + + get_spark_sessions.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions"} # type: ignore def create_spark_session( self, @@ -130,36 +140,38 @@ def create_spark_session( :rtype: ~azure.synapse.spark.models.SparkSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkSession"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_spark_session.metadata['url'] # type: ignore + url = self.create_spark_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spark_session_options, 'SparkSessionOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(spark_session_options, "SparkSessionOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -168,13 +180,14 @@ def create_spark_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkSession', pipeline_response) + deserialized = self._deserialize("SparkSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_spark_session.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions'} # type: ignore + + create_spark_session.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions"} # type: ignore def get_spark_session( self, @@ -195,31 +208,33 @@ def get_spark_session( :rtype: ~azure.synapse.spark.models.SparkSession :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkSession"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_session.metadata['url'] # type: ignore + url = self.get_spark_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = self._serialize.query("detailed", detailed, 'bool') + query_parameters["detailed"] = self._serialize.query("detailed", detailed, "bool") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -229,13 +244,14 @@ def get_spark_session( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkSession', pipeline_response) + deserialized = self._deserialize("SparkSession", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_session.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}'} # type: ignore + + get_spark_session.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}"} # type: ignore def cancel_spark_session( self, @@ -252,19 +268,21 @@ def cancel_spark_session( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) # Construct URL - url = self.cancel_spark_session.metadata['url'] # type: ignore + url = self.cancel_spark_session.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -285,7 +303,7 @@ def cancel_spark_session( if cls: return cls(pipeline_response, None, {}) - cancel_spark_session.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}'} # type: ignore + cancel_spark_session.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}"} # type: ignore def reset_spark_session_timeout( self, @@ -302,19 +320,21 @@ def reset_spark_session_timeout( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) # Construct URL - url = self.reset_spark_session_timeout.metadata['url'] # type: ignore + url = self.reset_spark_session_timeout.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -335,7 +355,7 @@ def reset_spark_session_timeout( if cls: return cls(pipeline_response, None, {}) - reset_spark_session_timeout.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/reset-timeout'} # type: ignore + reset_spark_session_timeout.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/reset-timeout"} # type: ignore def get_spark_statements( self, @@ -352,20 +372,22 @@ def get_spark_statements( :rtype: ~azure.synapse.spark.models.SparkStatementCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatementCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatementCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_statements.metadata['url'] # type: ignore + url = self.get_spark_statements.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -374,7 +396,7 @@ def get_spark_statements( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -384,13 +406,14 @@ def get_spark_statements( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatementCollection', pipeline_response) + deserialized = self._deserialize("SparkStatementCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_statements.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements'} # type: ignore + + get_spark_statements.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements"} # type: ignore def create_spark_statement( self, @@ -410,21 +433,23 @@ def create_spark_statement( :rtype: ~azure.synapse.spark.models.SparkStatement :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatement"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatement"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_spark_statement.metadata['url'] # type: ignore + url = self.create_spark_statement.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -433,12 +458,12 @@ def create_spark_statement( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(spark_statement_options, 'SparkStatementOptions') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(spark_statement_options, "SparkStatementOptions") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -447,13 +472,14 @@ def create_spark_statement( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatement', pipeline_response) + deserialized = self._deserialize("SparkStatement", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_spark_statement.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements'} # type: ignore + + create_spark_statement.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements"} # type: ignore def get_spark_statement( self, @@ -473,21 +499,23 @@ def get_spark_statement( :rtype: ~azure.synapse.spark.models.SparkStatement :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatement"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatement"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.get_spark_statement.metadata['url'] # type: ignore + url = self.get_spark_statement.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), - 'statementId': self._serialize.url("statement_id", statement_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), + "statementId": self._serialize.url("statement_id", statement_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -496,7 +524,7 @@ def get_spark_statement( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -506,13 +534,14 @@ def get_spark_statement( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatement', pipeline_response) + deserialized = self._deserialize("SparkStatement", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_spark_statement.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}'} # type: ignore + + get_spark_statement.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}"} # type: ignore def cancel_spark_statement( self, @@ -532,21 +561,23 @@ def cancel_spark_statement( :rtype: ~azure.synapse.spark.models.SparkStatementCancellationResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SparkStatementCancellationResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.SparkStatementCancellationResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) accept = "application/json" # Construct URL - url = self.cancel_spark_statement.metadata['url'] # type: ignore + url = self.cancel_spark_statement.metadata["url"] # type: ignore path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'livyApiVersion': self._serialize.url("self._config.livy_api_version", self._config.livy_api_version, 'str', skip_quote=True), - 'sparkPoolName': self._serialize.url("self._config.spark_pool_name", self._config.spark_pool_name, 'str', skip_quote=True), - 'sessionId': self._serialize.url("session_id", session_id, 'int'), - 'statementId': self._serialize.url("statement_id", statement_id, 'int'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + "livyApiVersion": self._serialize.url( + "self._config.livy_api_version", self._config.livy_api_version, "str", skip_quote=True + ), + "sparkPoolName": self._serialize.url( + "self._config.spark_pool_name", self._config.spark_pool_name, "str", skip_quote=True + ), + "sessionId": self._serialize.url("session_id", session_id, "int"), + "statementId": self._serialize.url("statement_id", statement_id, "int"), } url = self._client.format_url(url, **path_format_arguments) @@ -555,7 +586,7 @@ def cancel_spark_statement( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -565,10 +596,11 @@ def cancel_spark_statement( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - deserialized = self._deserialize('SparkStatementCancellationResult', pipeline_response) + deserialized = self._deserialize("SparkStatementCancellationResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - cancel_spark_statement.metadata = {'url': '/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}/cancel'} # type: ignore + + cancel_spark_statement.metadata = {"url": "/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}/cancel"} # type: ignore diff --git a/sdk/synapse/azure-synapse-spark/setup.py b/sdk/synapse/azure-synapse-spark/setup.py index 04a334f4532a..3a5c507d7929 100644 --- a/sdk/synapse/azure-synapse-spark/setup.py +++ b/sdk/synapse/azure-synapse-spark/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,60 +16,66 @@ PACKAGE_PPRINT_NAME = "Synapse Spark" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, include_package_data=True, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', + "Development Status :: 4 - Beta", + "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.synapse', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.synapse", + ] + ), python_requires=">=3.6", install_requires=[ - 'msrest>=0.6.21', - 'azure-common~=1.1', - 'azure-core>=1.20.0,<2.0.0', + "msrest>=0.6.21", + "azure-common~=1.1", + "azure-core>=1.20.0,<2.0.0", ], ) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_error.py b/sdk/tables/azure-data-tables/azure/data/tables/_error.py index 9841b757a67b..46bc6b0040b4 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_error.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_error.py @@ -18,7 +18,6 @@ ) from azure.core.pipeline.policies import ContentDecodePolicy - _ERROR_UNKNOWN = "Unknown error ({0})" _ERROR_VALUE_NONE = "{0} should not be None." @@ -52,18 +51,14 @@ def _wrap_exception(ex, desired_type): def _validate_storage_tablename(table_name): if _STORAGE_VALID_TABLE.match(table_name) is None: - raise ValueError( - "Storage table names must be alphanumeric, cannot begin with a number, \ - and must be between 3-63 characters long." - ) + raise ValueError("Storage table names must be alphanumeric, cannot begin with a number, \ + and must be between 3-63 characters long.") def _validate_cosmos_tablename(table_name): if _COSMOS_VALID_TABLE.match(table_name) is None: - raise ValueError( - "Cosmos table names must contain from 1-255 characters, \ - and they cannot contain /, \\, #, ?, or a trailing space." - ) + raise ValueError("Cosmos table names must contain from 1-255 characters, \ + and they cannot contain /, \\, #, ?, or a trailing space.") def _validate_tablename_error(decoded_error, table_name): diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/_patch.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/_patch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_patch.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_patch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_patch.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_patch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_patch.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_patch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_patch.py b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_patch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_models.py b/sdk/tables/azure-data-tables/azure/data/tables/_models.py index e59d798d8d8e..f9380fb9ef04 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_models.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_models.py @@ -157,9 +157,7 @@ def _from_generated(cls, generated: Optional[GeneratedLogging]) -> "TableAnalyti def __repr__(self) -> str: return f"TableAnalyticsLogging(version={self.version}, delete={self.delete}, read={self.read}, \ - write={self.write}, retention_policy={self.retention_policy})"[ - 1024: - ] + write={self.write}, retention_policy={self.retention_policy})"[1024:] class TableMetrics(GeneratedMetrics): @@ -199,9 +197,7 @@ def _from_generated(cls, generated: Optional[GeneratedMetrics]) -> "TableMetrics def __repr__(self) -> str: return f"TableMetrics(version={self.version}, enabled={self.enabled}, include_apis={self.include_apis}, \ - retention_policy={self.retention_policy})"[ - 1024: - ] + retention_policy={self.retention_policy})"[1024:] class TableCorsRule: @@ -270,9 +266,7 @@ def _from_generated(cls, generated: GeneratedCorsRule) -> "TableCorsRule": def __repr__(self) -> str: return f"TableCorsRules(allowed_origins={self.allowed_origins}, allowed_methods={self.allowed_methods}, \ allowed_headers={self.allowed_headers}, exposed_headers={self.exposed_headers}, \ - max_age_in_seconds={self.max_age_in_seconds})"[ - 1024: - ] + max_age_in_seconds={self.max_age_in_seconds})"[1024:] class TablePropertiesPaged(PageIterator): @@ -437,9 +431,7 @@ def __str__(self) -> str: def __repr__(self) -> str: return f"TableSasPermissions(read={self.read}, add={self.add}, update={self.update}, \ - delete={self.delete})"[ - 1024: - ] + delete={self.delete})"[1024:] @classmethod def from_string(cls, permission: str, **kwargs: Any) -> "TableSasPermissions": diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py index 256efbf1fbdf..b61d1a299e58 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py @@ -22,7 +22,6 @@ from ._generated._configuration import AzureTableConfiguration from ._generated.aio._configuration import AzureTableConfiguration as AsyncAzureTableConfiguration - EntityType = Union[TableEntity, Mapping[str, Any]] OperationType = Union[TransactionOperation, str] TransactionOperationType = Union[ diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_conditional_update_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_conditional_update_async.py index d3920cd8c17b..5fac7e2d5507 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_conditional_update_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_conditional_update_async.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the Tables storage account name 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the Tables storage account access key """ + import asyncio import os from datetime import datetime diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_copy_table_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_copy_table_async.py index 13e812675435..92ce4397ed99 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_copy_table_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_copy_table_async.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the Tables storage account name 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the Tables storage account access key """ + import asyncio import json import os diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py index e7705a3f715c..e44817b94edd 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_create_client_async.py @@ -21,7 +21,6 @@ 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ - import os import asyncio from dotenv import find_dotenv, load_dotenv diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_dataclass_model_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_dataclass_model_async.py index 4d2a80e24be8..3087839d4b9c 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_dataclass_model_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_dataclass_model_async.py @@ -21,6 +21,7 @@ 2) TABLES_COSMOS_ACCOUNT_NAME - the name of the cosmos DB account 3) TABLES_PRIMARY_COSMOS_ACCOUNT_KEY - the cosmos DB account access key """ + import os import asyncio from datetime import datetime, timezone diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_pydantic_model_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_pydantic_model_async.py index b7d151a0be37..803d97e0fda8 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_pydantic_model_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_encode_pydantic_model_async.py @@ -21,6 +21,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import os import asyncio from typing import Literal, Optional diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_get_entity_etag_and_timestamp_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_get_entity_etag_and_timestamp_async.py index ba60872e6e5b..5a4520e2a304 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_get_entity_etag_and_timestamp_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_get_entity_etag_and_timestamp_async.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import os import asyncio from datetime import datetime diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py index 88bec6726acb..f0f8ce05ee79 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py @@ -21,6 +21,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import sys import os import asyncio diff --git a/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py b/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py index dbc0cc2dfe76..3e9bdd46ab35 100644 --- a/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py +++ b/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import sys from datetime import datetime import os diff --git a/sdk/tables/azure-data-tables/samples/sample_conditional_update.py b/sdk/tables/azure-data-tables/samples/sample_conditional_update.py index fa0d4f51d7b7..2565c0d8fe06 100644 --- a/sdk/tables/azure-data-tables/samples/sample_conditional_update.py +++ b/sdk/tables/azure-data-tables/samples/sample_conditional_update.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the Tables storage account name 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the Tables storage account access key """ + import os from datetime import datetime from dotenv import find_dotenv, load_dotenv diff --git a/sdk/tables/azure-data-tables/samples/sample_copy_table.py b/sdk/tables/azure-data-tables/samples/sample_copy_table.py index ead1d5790fc9..77af887548ac 100644 --- a/sdk/tables/azure-data-tables/samples/sample_copy_table.py +++ b/sdk/tables/azure-data-tables/samples/sample_copy_table.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the Tables storage account name 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the Tables storage account access key """ + import json import os from azure.storage.blob import BlobServiceClient diff --git a/sdk/tables/azure-data-tables/samples/sample_encode_dataclass_model.py b/sdk/tables/azure-data-tables/samples/sample_encode_dataclass_model.py index 4263f8a87929..aaf5ffbd253f 100644 --- a/sdk/tables/azure-data-tables/samples/sample_encode_dataclass_model.py +++ b/sdk/tables/azure-data-tables/samples/sample_encode_dataclass_model.py @@ -21,6 +21,7 @@ 2) TABLES_COSMOS_ACCOUNT_NAME - the name of the cosmos DB account 3) TABLES_PRIMARY_COSMOS_ACCOUNT_KEY - the cosmos DB account access key """ + import os from datetime import datetime, timezone from uuid import uuid4, UUID diff --git a/sdk/tables/azure-data-tables/samples/sample_encode_pydantic_model.py b/sdk/tables/azure-data-tables/samples/sample_encode_pydantic_model.py index 6170bc808cc2..93ec33f6e090 100644 --- a/sdk/tables/azure-data-tables/samples/sample_encode_pydantic_model.py +++ b/sdk/tables/azure-data-tables/samples/sample_encode_pydantic_model.py @@ -19,6 +19,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import os from typing import Literal, Optional from datetime import datetime, timezone diff --git a/sdk/tables/azure-data-tables/samples/sample_get_entity_etag_and_timestamp.py b/sdk/tables/azure-data-tables/samples/sample_get_entity_etag_and_timestamp.py index e7d498b4df24..b015b93d9b44 100644 --- a/sdk/tables/azure-data-tables/samples/sample_get_entity_etag_and_timestamp.py +++ b/sdk/tables/azure-data-tables/samples/sample_get_entity_etag_and_timestamp.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import os from datetime import datetime from uuid import uuid4, UUID diff --git a/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py b/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py index 199a0181822d..d10e543d536b 100644 --- a/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py +++ b/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py @@ -21,6 +21,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import sys from datetime import datetime import os diff --git a/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py b/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py index b309b84d36e7..de1efce6fb94 100644 --- a/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py +++ b/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py @@ -20,6 +20,7 @@ 2) TABLES_STORAGE_ACCOUNT_NAME - the name of the storage account 3) TABLES_PRIMARY_STORAGE_ACCOUNT_KEY - the storage account access key """ + import sys from datetime import datetime from dotenv import find_dotenv, load_dotenv diff --git a/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py b/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py index ecbda80306a6..6297b1649c50 100644 --- a/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py +++ b/sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py @@ -19,7 +19,6 @@ from .testcase import TableTestCase - TEST_TABLE_PREFIX = "pytableasync" diff --git a/sdk/tables/azure-data-tables/tests/perfstress_tests/_base.py b/sdk/tables/azure-data-tables/tests/perfstress_tests/_base.py index 8985c983da68..c536bdaec84e 100644 --- a/sdk/tables/azure-data-tables/tests/perfstress_tests/_base.py +++ b/sdk/tables/azure-data-tables/tests/perfstress_tests/_base.py @@ -15,7 +15,6 @@ from azure.data.tables import TableServiceClient as SyncTableServiceClient from azure.data.tables.aio import TableServiceClient as AsyncTableServiceClient - _LETTERS = string.ascii_letters _FULL_EDM_ENTITY = { diff --git a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/_patch.py b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/_patch.py +++ b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/_patch.py b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/_patch.py +++ b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/operations/_patch.py b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/operations/_patch.py +++ b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/models/_patch.py b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/models/_patch.py +++ b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/operations/_patch.py b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/operations/_patch.py +++ b/sdk/terraform/azure-mgmt-terraform/azure/mgmt/terraform/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/_patch.py b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/_patch.py +++ b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/_patch.py b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/_patch.py +++ b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/operations/_patch.py b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/operations/_patch.py +++ b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/models/_patch.py b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/models/_patch.py +++ b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/operations/_patch.py b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/operations/_patch.py +++ b/sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/testbase/azure-mgmt-testbase/setup.py b/sdk/testbase/azure-mgmt-testbase/setup.py index 50b45b86a26e..ba2ea129b38a 100644 --- a/sdk/testbase/azure-mgmt-testbase/setup.py +++ b/sdk/testbase/azure-mgmt-testbase/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Testbase Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py index 0d3b08ac7b02..7bb6e1a2b241 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py @@ -32,9 +32,7 @@ def _authentication_policy(credential): if credential is None: raise ValueError("Parameter 'credential' must not be None.") if isinstance(credential, AzureKeyCredential): - authentication_policy = AzureKeyCredentialPolicy( - name="Ocp-Apim-Subscription-Key", credential=credential - ) + authentication_policy = AzureKeyCredentialPolicy(name="Ocp-Apim-Subscription-Key", credential=credential) elif credential is not None and not hasattr(credential, "get_token"): raise TypeError( "Unsupported credential: {}. Use an instance of AzureKeyCredential " @@ -76,7 +74,7 @@ def __init__( "$top", "$skip", "opinionMining", - "api-version" + "api-version", } ) try: diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_check.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_check.py index c8d72e01ccb1..f3de6bdf5d82 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_check.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_check.py @@ -15,7 +15,7 @@ def is_language_api(api_version): or Language service APIs. :rtype: bool """ - return re.search(r'\d{4}-\d{2}-\d{2}', api_version) + return re.search(r"\d{4}-\d{2}-\d{2}", api_version) def string_index_type_compatibility(string_index_type): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/__init__.py index ca973ce68900..8b892b55b0ee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/__init__.py @@ -7,10 +7,12 @@ # -------------------------------------------------------------------------- from ._text_analytics_client import TextAnalyticsClient -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py index b67d778fcfc8..567aee71e997 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_configuration.py @@ -21,6 +21,7 @@ from azure.core.credentials import TokenCredential + class TextAnalyticsClientConfiguration(Configuration): """Configuration for TextAnalyticsClient. @@ -48,23 +49,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "azure-ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py index 117637458e8e..12bdd19adad7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py @@ -56,8 +56,8 @@ def analyze_status( :rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('analyze_status') - if api_version == 'v3.1': + api_version = self._get_api_version("analyze_status") + if api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) @@ -95,10 +95,10 @@ def analyze_text( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextTaskResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('analyze_text') - if api_version == '2022-05-01': + api_version = self._get_api_version("analyze_text") + if api_version == "2022-05-01": from .v2022_05_01.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from .v2023_04_01.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_text'".format(api_version)) @@ -141,10 +141,10 @@ def analyze_text_job_status( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextJobState :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('analyze_text_job_status') - if api_version == '2022-05-01': + api_version = self._get_api_version("analyze_text_job_status") + if api_version == "2022-05-01": from .v2022_05_01.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from .v2023_04_01.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_text_job_status'".format(api_version)) @@ -186,8 +186,8 @@ def begin_analyze( :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_analyze') - if api_version == 'v3.1': + api_version = self._get_api_version("begin_analyze") + if api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) @@ -223,13 +223,15 @@ def begin_analyze_text_cancel_job( :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_analyze_text_cancel_job') - if api_version == '2022-05-01': + api_version = self._get_api_version("begin_analyze_text_cancel_job") + if api_version == "2022-05-01": from .v2022_05_01.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from .v2023_04_01.operations import TextAnalyticsClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_text_cancel_job'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_text_cancel_job'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -269,13 +271,15 @@ def begin_analyze_text_submit_job( ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextJobState] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_analyze_text_submit_job') - if api_version == '2022-05-01': + api_version = self._get_api_version("begin_analyze_text_submit_job") + if api_version == "2022-05-01": from .v2022_05_01.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from .v2023_04_01.operations import TextAnalyticsClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_text_submit_job'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_text_submit_job'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -308,8 +312,8 @@ def begin_cancel_health_job( :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_cancel_health_job') - if api_version == 'v3.1': + api_version = self._get_api_version("begin_cancel_health_job") + if api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) @@ -368,8 +372,8 @@ def begin_health( ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_health') - if api_version == 'v3.1': + api_version = self._get_api_version("begin_health") + if api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) @@ -424,10 +428,10 @@ def entities_linking( :rtype: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('entities_linking') - if api_version == 'v3.0': + api_version = self._get_api_version("entities_linking") + if api_version == "v3.0": from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) @@ -438,10 +442,12 @@ def entities_linking( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return mixin_instance.entities_linking(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': - return mixin_instance.entities_linking(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) + elif api_version == "v3.1": + return mixin_instance.entities_linking( + documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs + ) def entities_recognition_general( self, @@ -487,13 +493,15 @@ def entities_recognition_general( :rtype: ~azure.ai.textanalytics.v3_1.models.EntitiesResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('entities_recognition_general') - if api_version == 'v3.0': + api_version = self._get_api_version("entities_recognition_general") + if api_version == "v3.0": from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'entities_recognition_general'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -501,10 +509,12 @@ def entities_recognition_general( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return mixin_instance.entities_recognition_general(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': - return mixin_instance.entities_recognition_general(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) + elif api_version == "v3.1": + return mixin_instance.entities_recognition_general( + documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs + ) def entities_recognition_pii( self, @@ -559,8 +569,8 @@ def entities_recognition_pii( :rtype: ~azure.ai.textanalytics.v3_1.models.PiiResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('entities_recognition_pii') - if api_version == 'v3.1': + api_version = self._get_api_version("entities_recognition_pii") + if api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) @@ -570,7 +580,9 @@ def entities_recognition_pii( mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.entities_recognition_pii(documents, model_version, show_stats, logging_opt_out, domain, string_index_type, pii_categories, **kwargs) + return mixin_instance.entities_recognition_pii( + documents, model_version, show_stats, logging_opt_out, domain, string_index_type, pii_categories, **kwargs + ) def health_status( self, @@ -601,8 +613,8 @@ def health_status( :rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('health_status') - if api_version == 'v3.1': + api_version = self._get_api_version("health_status") + if api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) @@ -651,10 +663,10 @@ def key_phrases( :rtype: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('key_phrases') - if api_version == 'v3.0': + api_version = self._get_api_version("key_phrases") + if api_version == "v3.0": from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'key_phrases'".format(api_version)) @@ -665,9 +677,9 @@ def key_phrases( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return mixin_instance.key_phrases(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': + elif api_version == "v3.1": return mixin_instance.key_phrases(documents, model_version, show_stats, logging_opt_out, **kwargs) def languages( @@ -708,10 +720,10 @@ def languages( :rtype: ~azure.ai.textanalytics.v3_1.models.LanguageResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('languages') - if api_version == 'v3.0': + api_version = self._get_api_version("languages") + if api_version == "v3.0": from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'languages'".format(api_version)) @@ -722,9 +734,9 @@ def languages( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return mixin_instance.languages(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': + elif api_version == "v3.1": return mixin_instance.languages(documents, model_version, show_stats, logging_opt_out, **kwargs) def sentiment( @@ -775,10 +787,10 @@ def sentiment( :rtype: ~azure.ai.textanalytics.v3_1.models.SentimentResponse :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('sentiment') - if api_version == 'v3.0': + api_version = self._get_api_version("sentiment") + if api_version == "v3.0": from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) @@ -789,7 +801,9 @@ def sentiment( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return mixin_instance.sentiment(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': - return mixin_instance.sentiment(documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs) + elif api_version == "v3.1": + return mixin_instance.sentiment( + documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_serialization.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_serialization.py index 2e44d8666b2b..648f84cc4e65 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_serialization.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_serialization.py @@ -37,6 +37,7 @@ import re import sys import codecs + try: from urllib import quote # type: ignore except ImportError: @@ -49,15 +50,16 @@ from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback -_BOM = codecs.BOM_UTF8.decode(encoding='utf-8') +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") if TYPE_CHECKING: from typing import Optional, Union, AnyStr, IO, Mapping + class RawDeserializer: # Accept "text" because we're open minded people... - JSON_REGEXP = re.compile(r'^(application|text)/([a-z+.]+\+)?json$') + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") # Name used in context CONTEXT_NAME = "deserialized_data" @@ -75,12 +77,12 @@ def deserialize_from_text(cls, data, content_type=None): :type data: str or bytes or IO :param str content_type: The content type. """ - if hasattr(data, 'read'): + if hasattr(data, "read"): # Assume a stream data = cast(IO, data).read() if isinstance(data, bytes): - data_as_str = data.decode(encoding='utf-8-sig') + data_as_str = data.decode(encoding="utf-8-sig") else: # Explain to mypy the correct type. data_as_str = cast(str, data) @@ -116,7 +118,8 @@ def _json_attemp(data): try: return True, json.loads(data) except ValueError: - return False, None # Don't care about this one + return False, None # Don't care about this one + success, json_result = _json_attemp(data) if success: return json_result @@ -139,8 +142,8 @@ def deserialize_from_http_generics(cls, body_bytes, headers): """ # Try to use content-type from headers if available content_type = None - if 'content-type' in headers: - content_type = headers['content-type'].split(";")[0].strip().lower() + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() # Ouch, this server did not declare what it sent... # Let's guess it's JSON... # Also, since Autorest was considering that an empty body was a valid JSON, @@ -152,6 +155,7 @@ def deserialize_from_http_generics(cls, body_bytes, headers): return cls.deserialize_from_text(body_bytes, content_type) return None + try: basestring # type: ignore unicode_str = unicode # type: ignore @@ -162,10 +166,11 @@ def deserialize_from_http_generics(cls, body_bytes, headers): _LOGGER = logging.getLogger(__name__) try: - _long_type = long # type: ignore + _long_type = long # type: ignore except NameError: _long_type = int + class UTC(datetime.tzinfo): """Time Zone info for handling UTC""" @@ -181,9 +186,11 @@ def dst(self, dt): """No daylight saving for UTC.""" return datetime.timedelta(hours=1) + try: from datetime import timezone as _FixedOffset except ImportError: # Python 2.7 + class _FixedOffset(datetime.tzinfo): # type: ignore """Fixed offset in minutes east from UTC. Copy/pasted from Python doc @@ -197,7 +204,7 @@ def utcoffset(self, dt): return self.__offset def tzname(self, dt): - return str(self.__offset.total_seconds()/3600) + return str(self.__offset.total_seconds() / 3600) def __repr__(self): return "".format(self.tzname(None)) @@ -208,14 +215,17 @@ def dst(self, dt): def __getinitargs__(self): return (self.__offset,) + try: from datetime import timezone + TZ_UTC = timezone.utc # type: ignore except ImportError: TZ_UTC = UTC() # type: ignore _FLATTEN = re.compile(r"(? y, @@ -502,25 +518,25 @@ class Serializer(object): "max_items": lambda x, y: len(x) > y, "pattern": lambda x, y: not re.match(y, x, re.UNICODE), "unique": lambda x, y: len(x) != len(set(x)), - "multiple": lambda x, y: x % y != 0 - } + "multiple": lambda x, y: x % y != 0, + } def __init__(self, classes=None): self.serialize_type = { - 'iso-8601': Serializer.serialize_iso, - 'rfc-1123': Serializer.serialize_rfc, - 'unix-time': Serializer.serialize_unix, - 'duration': Serializer.serialize_duration, - 'date': Serializer.serialize_date, - 'time': Serializer.serialize_time, - 'decimal': Serializer.serialize_decimal, - 'long': Serializer.serialize_long, - 'bytearray': Serializer.serialize_bytearray, - 'base64': Serializer.serialize_base64, - 'object': self.serialize_object, - '[]': self.serialize_iter, - '{}': self.serialize_dict - } + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } self.dependencies = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -542,14 +558,12 @@ def _serialize(self, target_obj, data_type=None, **kwargs): class_name = target_obj.__class__.__name__ if data_type: - return self.serialize_data( - target_obj, data_type, **kwargs) + return self.serialize_data(target_obj, data_type, **kwargs) if not hasattr(target_obj, "_attribute_map"): data_type = type(target_obj).__name__ if data_type in self.basic_types.values(): - return self.serialize_data( - target_obj, data_type, **kwargs) + return self.serialize_data(target_obj, data_type, **kwargs) # Force "is_xml" kwargs if we detect a XML model try: @@ -564,10 +578,10 @@ def _serialize(self, target_obj, data_type=None, **kwargs): attributes = target_obj._attribute_map for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get('readonly', False): + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): continue - if attr_name == "additional_properties" and attr_desc["key"] == '': + if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: serialized.update(target_obj.additional_properties) continue @@ -575,21 +589,19 @@ def _serialize(self, target_obj, data_type=None, **kwargs): orig_attr = getattr(target_obj, attr) if is_xml_model_serialization: - pass # Don't provide "transformer" for XML for now. Keep "orig_attr" - else: # JSON + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) keys = keys if isinstance(keys, list) else [keys] - kwargs["serialization_ctxt"] = attr_desc - new_attr = self.serialize_data(orig_attr, attr_desc['type'], **kwargs) - + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) if is_xml_model_serialization: - xml_desc = attr_desc.get('xml', {}) - xml_name = xml_desc.get('name', attr_desc['key']) - xml_prefix = xml_desc.get('prefix', None) - xml_ns = xml_desc.get('ns', None) + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) @@ -603,23 +615,19 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.extend(new_attr) elif isinstance(new_attr, ET.Element): # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. - if 'name' not in getattr(orig_attr, '_xml_map', {}): + if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") - if len(splitted_tag) == 2: # Namespace + if len(splitted_tag) == 2: # Namespace new_attr.tag = "}".join([splitted_tag[0], xml_name]) else: new_attr.tag = xml_name serialized.append(new_attr) else: # That's a basic type # Integrate namespace if necessary - local_node = _create_xml_node( - xml_name, - xml_prefix, - xml_ns - ) + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) local_node.text = unicode_str(new_attr) serialized.append(local_node) - else: # JSON + else: # JSON for k in reversed(keys): unflattened = {k: new_attr} new_attr = unflattened @@ -635,8 +643,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): continue except (AttributeError, KeyError, TypeError) as err: - msg = "Attribute {} in object {} cannot be serialized.\n{}".format( - attr_name, class_name, str(target_obj)) + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) raise_with_traceback(SerializationError, msg, err) else: return serialized @@ -652,7 +659,7 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip('[]{}') + internal_data_type = data_type.strip("[]{}") internal_data_type = self.dependencies.get(internal_data_type, None) try: is_xml_model_serialization = kwargs["is_xml"] @@ -675,12 +682,11 @@ def body(self, data, data_type, **kwargs): deserializer.key_extractors = [ rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor + last_rest_key_case_insensitive_extractor, ] data = deserializer._deserialize(data_type, data) except DeserializationError as err: - raise_with_traceback( - SerializationError, "Unable to build a model: "+str(err), err) + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) return self._serialize(data, data_type, **kwargs) @@ -695,13 +701,13 @@ def url(self, name, data, data_type, **kwargs): """ try: output = self.serialize_data(data, data_type, **kwargs) - if data_type == 'bool': + if data_type == "bool": output = json.dumps(output) - if kwargs.get('skip_quote') is True: + if kwargs.get("skip_quote") is True: output = str(output) else: - output = quote(str(output), safe='') + output = quote(str(output), safe="") except SerializationError: raise TypeError("{} must be type {}.".format(name, data_type)) else: @@ -720,27 +726,19 @@ def query(self, name, data, data_type, **kwargs): # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - data = [ - self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" - for d - in data - ] - if not kwargs.get('skip_quote', False): - data = [ - quote(str(d), safe='') - for d - in data - ] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] return str(self.serialize_iter(data, internal_data_type, **kwargs)) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) - if data_type == 'bool': + if data_type == "bool": output = json.dumps(output) - if kwargs.get('skip_quote') is True: + if kwargs.get("skip_quote") is True: output = str(output) else: - output = quote(str(output), safe='') + output = quote(str(output), safe="") except SerializationError: raise TypeError("{} must be type {}.".format(name, data_type)) else: @@ -756,11 +754,11 @@ def header(self, name, data, data_type, **kwargs): :raises: ValueError if data is None """ try: - if data_type in ['[str]']: + if data_type in ["[str]"]: data = ["" if d is None else d for d in data] output = self.serialize_data(data, data_type, **kwargs) - if data_type == 'bool': + if data_type == "bool": output = json.dumps(output) except SerializationError: raise TypeError("{} must be type {}.".format(name, data_type)) @@ -796,13 +794,11 @@ def serialize_data(self, data, data_type, **kwargs): iter_type = data_type[0] + data_type[-1] if iter_type in self.serialize_type: - return self.serialize_type[iter_type]( - data, data_type[1:-1], **kwargs) + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." - raise_with_traceback( - SerializationError, msg.format(data, data_type), err) + raise_with_traceback(SerializationError, msg.format(data, data_type), err) else: return self._serialize(data, **kwargs) @@ -829,7 +825,7 @@ def serialize_basic(cls, data, data_type, **kwargs): custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) - if data_type == 'str': + if data_type == "str": return cls.serialize_unicode(data) return eval(data_type)(data) # nosec @@ -886,25 +882,21 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialized.append(None) if div: - serialized = ['' if s is None else str(s) for s in serialized] + serialized = ["" if s is None else str(s) for s in serialized] serialized = div.join(serialized) - if 'xml' in serialization_ctxt or is_xml: + if "xml" in serialization_ctxt or is_xml: # XML serialization is more complicated - xml_desc = serialization_ctxt.get('xml', {}) - xml_name = xml_desc.get('name') + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") if not xml_name: - xml_name = serialization_ctxt['key'] + xml_name = serialization_ctxt["key"] # Create a wrap node if necessary (use the fact that Element and list have "append") is_wrapped = xml_desc.get("wrapped", False) node_name = xml_desc.get("itemsName", xml_name) if is_wrapped: - final_result = _create_xml_node( - xml_name, - xml_desc.get('prefix', None), - xml_desc.get('ns', None) - ) + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) else: final_result = [] # All list elements to "local_node" @@ -912,11 +904,7 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): if isinstance(el, ET.Element): el_node = el else: - el_node = _create_xml_node( - node_name, - xml_desc.get('prefix', None), - xml_desc.get('ns', None) - ) + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) if el is not None: # Otherwise it writes "None" :-p el_node.text = str(el) final_result.append(el_node) @@ -936,21 +924,16 @@ def serialize_dict(self, attr, dict_type, **kwargs): serialized = {} for key, value in attr.items(): try: - serialized[self.serialize_unicode(key)] = self.serialize_data( - value, dict_type, **kwargs) + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) except ValueError: serialized[self.serialize_unicode(key)] = None - if 'xml' in serialization_ctxt: + if "xml" in serialization_ctxt: # XML serialization is more complicated - xml_desc = serialization_ctxt['xml'] - xml_name = xml_desc['name'] + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] - final_result = _create_xml_node( - xml_name, - xml_desc.get('prefix', None), - xml_desc.get('ns', None) - ) + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) for key, value in serialized.items(): ET.SubElement(final_result, key).text = value return final_result @@ -996,8 +979,7 @@ def serialize_object(self, attr, **kwargs): serialized = {} for key, value in attr.items(): try: - serialized[self.serialize_unicode(key)] = self.serialize_object( - value, **kwargs) + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) except ValueError: serialized[self.serialize_unicode(key)] = None return serialized @@ -1006,8 +988,7 @@ def serialize_object(self, attr, **kwargs): serialized = [] for obj in attr: try: - serialized.append(self.serialize_object( - obj, **kwargs)) + serialized.append(self.serialize_object(obj, **kwargs)) except ValueError: pass return serialized @@ -1045,8 +1026,8 @@ def serialize_base64(attr, **kwargs): :param attr: Object to be serialized. :rtype: str """ - encoded = b64encode(attr).decode('ascii') - return encoded.strip('=').replace('+', '-').replace('/', '_') + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod def serialize_decimal(attr, **kwargs): @@ -1113,16 +1094,20 @@ def serialize_rfc(attr, **kwargs): """ try: if not attr.tzinfo: - _LOGGER.warning( - "Datetime with no tzinfo will be considered UTC.") + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() except AttributeError: raise TypeError("RFC1123 object must be valid Datetime object.") return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( - Serializer.days[utc.tm_wday], utc.tm_mday, - Serializer.months[utc.tm_mon], utc.tm_year, - utc.tm_hour, utc.tm_min, utc.tm_sec) + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) @staticmethod def serialize_iso(attr, **kwargs): @@ -1136,19 +1121,18 @@ def serialize_iso(attr, **kwargs): attr = isodate.parse_datetime(attr) try: if not attr.tzinfo: - _LOGGER.warning( - "Datetime with no tzinfo will be considered UTC.") + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() if utc.tm_year > 9999 or utc.tm_year < 1: raise OverflowError("Hit max or min date") - microseconds = str(attr.microsecond).rjust(6,'0').rstrip('0').ljust(3, '0') + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") if microseconds: - microseconds = '.'+microseconds + microseconds = "." + microseconds date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( - utc.tm_year, utc.tm_mon, utc.tm_mday, - utc.tm_hour, utc.tm_min, utc.tm_sec) - return date + microseconds + 'Z' + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" except (ValueError, OverflowError) as err: msg = "Unable to serialize datetime object." raise_with_traceback(SerializationError, msg, err) @@ -1169,17 +1153,17 @@ def serialize_unix(attr, **kwargs): return attr try: if not attr.tzinfo: - _LOGGER.warning( - "Datetime with no tzinfo will be considered UTC.") + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) except AttributeError: raise TypeError("Unix time object must be valid Datetime object.") + def rest_key_extractor(attr, attr_desc, data): - key = attr_desc['key'] + key = attr_desc["key"] working_data = data - while '.' in key: + while "." in key: dict_keys = _FLATTEN.split(key) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) @@ -1191,15 +1175,16 @@ def rest_key_extractor(attr, attr_desc, data): # that all properties under are None as well # https://github.com/Azure/msrest-for-python/issues/197 return None - key = '.'.join(dict_keys[1:]) + key = ".".join(dict_keys[1:]) return working_data.get(key) + def rest_key_case_insensitive_extractor(attr, attr_desc, data): - key = attr_desc['key'] + key = attr_desc["key"] working_data = data - while '.' in key: + while "." in key: dict_keys = _FLATTEN.split(key) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) @@ -1211,30 +1196,33 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): # that all properties under are None as well # https://github.com/Azure/msrest-for-python/issues/197 return None - key = '.'.join(dict_keys[1:]) + key = ".".join(dict_keys[1:]) if working_data: return attribute_key_case_insensitive_extractor(key, None, working_data) + def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key. - """ - key = attr_desc['key'] + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) + def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" """ - key = attr_desc['key'] + key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + def attribute_key_extractor(attr, _, data): return data.get(attr) + def attribute_key_case_insensitive_extractor(attr, _, data): found_key = None lower_attr = attr.lower() @@ -1245,6 +1233,7 @@ def attribute_key_case_insensitive_extractor(attr, _, data): return data.get(found_key) + def _extract_name_from_internal_type(internal_type): """Given an internal type XML description, extract correct XML name with namespace. @@ -1253,7 +1242,7 @@ def _extract_name_from_internal_type(internal_type): :returns: A tuple XML name + namespace dict """ internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - xml_name = internal_type_xml_map.get('name', internal_type.__name__) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: xml_name = "{}{}".format(xml_ns, xml_name) @@ -1268,17 +1257,17 @@ def xml_key_extractor(attr, attr_desc, data): if not isinstance(data, ET.Element): return None - xml_desc = attr_desc.get('xml', {}) - xml_name = xml_desc.get('name', attr_desc['key']) + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) # Look for a children - is_iter_type = attr_desc['type'].startswith("[") + is_iter_type = attr_desc["type"].startswith("[") is_wrapped = xml_desc.get("wrapped", False) internal_type = attr_desc.get("internalType", None) internal_type_xml_map = getattr(internal_type, "_xml_map", {}) # Integrate namespace if necessary - xml_ns = xml_desc.get('ns', internal_type_xml_map.get("ns", None)) + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: xml_name = "{}{}".format(xml_ns, xml_name) @@ -1294,15 +1283,15 @@ def xml_key_extractor(attr, attr_desc, data): # - Wrapped node # - Internal type is an enum (considered basic types) # - Internal type has no XML/Name node - if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or 'name' not in internal_type_xml_map)): + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): children = data.findall(xml_name) # If internal type has a local name and it's not a list, I use that name - elif not is_iter_type and internal_type and 'name' in internal_type_xml_map: + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: xml_name = _extract_name_from_internal_type(internal_type) children = data.findall(xml_name) # That's an array else: - if internal_type: # Complex type, ignore itemsName and use the complex type name + if internal_type: # Complex type, ignore itemsName and use the complex type name items_name = _extract_name_from_internal_type(internal_type) else: items_name = xml_desc.get("itemsName", xml_name) @@ -1311,21 +1300,22 @@ def xml_key_extractor(attr, attr_desc, data): if len(children) == 0: if is_iter_type: if is_wrapped: - return None # is_wrapped no node, we want None + return None # is_wrapped no node, we want None else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) + else: # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name - )) + ) + ) return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty @@ -1333,6 +1323,7 @@ def xml_key_extractor(attr, attr_desc, data): raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) return children[0] + class Deserializer(object): """Response object model deserializer. @@ -1340,37 +1331,32 @@ class Deserializer(object): :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. """ - basic_types = {str: 'str', int: 'int', bool: 'bool', float: 'float'} + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile( - r'\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}' - r'\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?') + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") def __init__(self, classes=None): self.deserialize_type = { - 'iso-8601': Deserializer.deserialize_iso, - 'rfc-1123': Deserializer.deserialize_rfc, - 'unix-time': Deserializer.deserialize_unix, - 'duration': Deserializer.deserialize_duration, - 'date': Deserializer.deserialize_date, - 'time': Deserializer.deserialize_time, - 'decimal': Deserializer.deserialize_decimal, - 'long': Deserializer.deserialize_long, - 'bytearray': Deserializer.deserialize_bytearray, - 'base64': Deserializer.deserialize_base64, - 'object': self.deserialize_object, - '[]': self.deserialize_iter, - '{}': self.deserialize_dict - } + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } self.deserialize_expected_types = { - 'duration': (isodate.Duration, datetime.timedelta), - 'iso-8601': (datetime.datetime) + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), } self.dependencies = dict(classes) if classes else {} - self.key_extractors = [ - rest_key_extractor, - xml_key_extractor - ] + self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much # complicated, with no real scenario for now. @@ -1403,8 +1389,7 @@ def _deserialize(self, target_obj, data): """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): - constants = [name for name, config in getattr(data, '_validation', {}).items() - if config.get('constant')] + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: for attr, mapconfig in data._attribute_map.items(): if attr in constants: @@ -1412,15 +1397,11 @@ def _deserialize(self, target_obj, data): value = getattr(data, attr) if value is None: continue - local_type = mapconfig['type'] - internal_data_type = local_type.strip('[]{}') + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): continue - setattr( - data, - attr, - self._deserialize(local_type, value) - ) + setattr(data, attr, self._deserialize(local_type, value)) return data except AttributeError: return @@ -1439,12 +1420,12 @@ def _deserialize(self, target_obj, data): d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... - if attr == "additional_properties" and attr_desc["key"] == '': + if attr == "additional_properties" and attr_desc["key"] == "": continue raw_value = None # Enhance attr_desc with some dynamic data - attr_desc = attr_desc.copy() # Do a copy, do not change the real one - internal_data_type = attr_desc["type"].strip('[]{}') + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") if internal_data_type in self.dependencies: attr_desc["internalType"] = self.dependencies[internal_data_type] @@ -1452,18 +1433,15 @@ def _deserialize(self, target_obj, data): found_value = key_extractor(attr, attr_desc, data) if found_value is not None: if raw_value is not None and raw_value != found_value: - msg = ("Ignoring extracted value '%s' from %s for key '%s'" - " (duplicate extraction, follow extractors order)" ) - _LOGGER.warning( - msg, - found_value, - key_extractor, - attr + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" ) + _LOGGER.warning(msg, found_value, key_extractor, attr) continue raw_value = found_value - value = self.deserialize_data(raw_value, attr_desc['type']) + value = self.deserialize_data(raw_value, attr_desc["type"]) d_attrs[attr] = value except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name @@ -1475,14 +1453,17 @@ def _deserialize(self, target_obj, data): def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: return None - if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != '': + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": # Check empty string. If it's not empty, someone has a real "additionalProperties" return None if isinstance(data, ET.Element): data = {el.tag: el.text for el in data} - known_keys = {_decode_attribute_map_key(_FLATTEN.split(desc['key'])[0]) - for desc in attribute_map.values() if desc['key'] != ''} + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } present_keys = set(data.keys()) missing_keys = present_keys - known_keys return {key: data[key] for key in missing_keys} @@ -1525,8 +1506,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): return self(target_obj, data, content_type=content_type) except: _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", - exc_info=True + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) return None @@ -1554,21 +1534,15 @@ def _unpack_content(raw_data, content_type=None): return context[RawDeserializer.CONTEXT_NAME] raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") - #Assume this is enough to recognize universal_http.ClientResponse without importing it + # Assume this is enough to recognize universal_http.ClientResponse without importing it if hasattr(raw_data, "body"): - return RawDeserializer.deserialize_from_http_generics( - raw_data.text(), - raw_data.headers - ) + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) # Assume this enough to recognize requests.Response without importing it. - if hasattr(raw_data, '_content_consumed'): - return RawDeserializer.deserialize_from_http_generics( - raw_data.text, - raw_data.headers - ) + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, 'read'): + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): return RawDeserializer.deserialize_from_text(raw_data, content_type) return raw_data @@ -1579,14 +1553,11 @@ def _instantiate_model(self, response, attrs, additional_properties=None): :param d_attrs: The deserialized response attributes. """ if callable(response): - subtype = getattr(response, '_subtype_map', {}) + subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() - if v.get('readonly')] - const = [k for k, v in response._validation.items() - if v.get('constant')] - kwargs = {k: v for k, v in attrs.items() - if k not in subtype and k not in readonly + const} + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) @@ -1594,8 +1565,7 @@ def _instantiate_model(self, response, attrs, additional_properties=None): response_obj.additional_properties = additional_properties return response_obj except TypeError as err: - msg = "Unable to deserialize {} into model {}. ".format( - kwargs, response) + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) raise DeserializationError(msg + str(err)) else: try: @@ -1659,13 +1629,10 @@ def deserialize_iter(self, attr, iter_type): """ if attr is None: return None - if isinstance(attr, ET.Element): # If I receive an element here, get the children + if isinstance(attr, ET.Element): # If I receive an element here, get the children attr = list(attr) if not isinstance(attr, (list, set)): - raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format( - iter_type, - type(attr) - )) + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) return [self.deserialize_data(a, iter_type) for a in attr] def deserialize_dict(self, attr, dict_type): @@ -1677,7 +1644,7 @@ def deserialize_dict(self, attr, dict_type): :rtype: dict """ if isinstance(attr, list): - return {x['key']: self.deserialize_data(x['value'], dict_type) for x in attr} + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} if isinstance(attr, ET.Element): # Transform value into {"Key": "value"} @@ -1698,7 +1665,7 @@ def deserialize_object(self, attr, **kwargs): # Do no recurse on XML, just return the tree as-is return attr if isinstance(attr, basestring): - return self.deserialize_basic(attr, 'str') + return self.deserialize_basic(attr, "str") obj_type = type(attr) if obj_type in self.basic_types: return self.deserialize_basic(attr, self.basic_types[obj_type]) @@ -1709,8 +1676,7 @@ def deserialize_object(self, attr, **kwargs): deserialized = {} for key, value in attr.items(): try: - deserialized[key] = self.deserialize_object( - value, **kwargs) + deserialized[key] = self.deserialize_object(value, **kwargs) except ValueError: deserialized[key] = None return deserialized @@ -1719,8 +1685,7 @@ def deserialize_object(self, attr, **kwargs): deserialized = [] for obj in attr: try: - deserialized.append(self.deserialize_object( - obj, **kwargs)) + deserialized.append(self.deserialize_object(obj, **kwargs)) except ValueError: pass return deserialized @@ -1747,23 +1712,23 @@ def deserialize_basic(self, attr, data_type): if not attr: if data_type == "str": # None or '', node is empty string. - return '' + return "" else: # None or '', node with a strong type is None. # Don't try to model "empty bool" or "empty int" return None - if data_type == 'bool': + if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) elif isinstance(attr, basestring): - if attr.lower() in ['true', '1']: + if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ['false', '0']: + elif attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) - if data_type == 'str': + if data_type == "str": return self.deserialize_unicode(attr) return eval(data_type)(attr) # nosec @@ -1845,9 +1810,9 @@ def deserialize_base64(attr): """ if isinstance(attr, ET.Element): attr = attr.text - padding = '=' * (3 - (len(attr) + 3) % 4) + padding = "=" * (3 - (len(attr) + 3) % 4) attr = attr + padding - encoded = attr.replace('-', '+').replace('_', '/') + encoded = attr.replace("-", "+").replace("_", "/") return b64decode(encoded) @staticmethod @@ -1890,7 +1855,7 @@ def deserialize_duration(attr): attr = attr.text try: duration = isodate.parse_duration(attr) - except(ValueError, OverflowError, AttributeError) as err: + except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." raise_with_traceback(DeserializationError, msg, err) else: @@ -1938,8 +1903,7 @@ def deserialize_rfc(attr): try: parsed_date = email.utils.parsedate_tz(attr) date_obj = datetime.datetime( - *parsed_date[:6], - tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0)/60)) + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -1965,7 +1929,7 @@ def deserialize_iso(attr): if not match: raise ValueError("Invalid datetime string: " + attr) - check_decimal = attr.split('.') + check_decimal = attr.split(".") if len(check_decimal) > 1: decimal_str = "" for digit in check_decimal[1]: @@ -1980,7 +1944,7 @@ def deserialize_iso(attr): test_utc = date_obj.utctimetuple() if test_utc.tm_year > 9999 or test_utc.tm_year < 1: raise OverflowError("Hit max or min date") - except(ValueError, OverflowError, AttributeError) as err: + except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." raise_with_traceback(DeserializationError, msg, err) else: @@ -2003,4 +1967,4 @@ def deserialize_unix(attr): msg = "Cannot deserialize to unix datetime object." raise_with_traceback(DeserializationError, msg, err) else: - return date_obj \ No newline at end of file + return date_obj diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py index 416ee76529f0..cc1d9dd90cd2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py @@ -25,6 +25,7 @@ from azure.core.credentials import TokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -32,6 +33,7 @@ def __init__(self, *args, **kwargs): """ pass + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixin, _SDKClient): """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`https://learn.microsoft.com/azure/cognitive-services/text-analytics/overview`. @@ -54,41 +56,40 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = 'v3.1' + DEFAULT_API_VERSION = "v3.1" _PROFILE_TAG = "azure.ai.textanalytics.TextAnalyticsClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'analyze_text': '2023-04-01', - 'analyze_text_job_status': '2023-04-01', - 'begin_analyze_text_cancel_job': '2023-04-01', - 'begin_analyze_text_submit_job': '2023-04-01', - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + "analyze_text": "2023-04-01", + "analyze_text_job_status": "2023-04-01", + "begin_analyze_text_cancel_job": "2023-04-01", + "begin_analyze_text_submit_job": "2023-04-01", + } + }, + _PROFILE_TAG + " latest", ) def __init__( self, credential, # type: "TokenCredential" endpoint, # type: str - api_version=None, # type: Optional[str] - profile=KnownProfiles.default, # type: KnownProfiles + api_version=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - if api_version == '2022-05-01' or api_version == '2023-04-01': - base_url = '{Endpoint}/language' - elif api_version == 'v3.0': - base_url = '{Endpoint}/text/analytics/v3.0' - elif api_version == 'v3.1': - base_url = '{Endpoint}/text/analytics/v3.1' + if api_version == "2022-05-01" or api_version == "2023-04-01": + base_url = "{Endpoint}/language" + elif api_version == "v3.0": + base_url = "{Endpoint}/text/analytics/v3.0" + elif api_version == "v3.1": + base_url = "{Endpoint}/text/analytics/v3.1" else: raise ValueError("API version {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) - super(TextAnalyticsClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(TextAnalyticsClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -98,29 +99,35 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2022-05-01: :mod:`v2022_05_01.models` - * 2023-04-01: :mod:`v2023_04_01.models` - * v3.0: :mod:`v3_0.models` - * v3.1: :mod:`v3_1.models` + * 2022-05-01: :mod:`v2022_05_01.models` + * 2023-04-01: :mod:`v2023_04_01.models` + * v3.0: :mod:`v3_0.models` + * v3.1: :mod:`v3_1.models` """ - if api_version == '2022-05-01': + if api_version == "2022-05-01": from .v2022_05_01 import models + return models - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from .v2023_04_01 import models + return models - elif api_version == 'v3.0': + elif api_version == "v3.0": from .v3_0 import models + return models - elif api_version == 'v3.1': + elif api_version == "v3.1": from .v3_1 import models + return models raise ValueError("API version {} is not available".format(api_version)) def close(self): self._client.close() + def __enter__(self): self._client.__enter__() return self + def __exit__(self, *exc_details): self._client.__exit__(*exc_details) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_version.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_version.py index a30a458f8b5b..780a1be7a6ea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_version.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "0.1.0" \ No newline at end of file +VERSION = "0.1.0" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/__init__.py index b64fe33ea84d..acb45ead60ac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._text_analytics_client import TextAnalyticsClient -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration.py index 86b3fe09eff0..68f084f672e7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_configuration.py @@ -19,6 +19,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class TextAnalyticsClientConfiguration(Configuration): """Configuration for TextAnalyticsClient. @@ -32,10 +33,7 @@ class TextAnalyticsClientConfiguration(Configuration): """ def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs # type: Any + self, credential: "AsyncTokenCredential", endpoint: str, **kwargs # type: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -45,22 +43,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "azure-ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py index e4bacc1a9035..d0c4cf72f22c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py @@ -12,7 +12,12 @@ from typing import Any, IO, List, Optional, Union # FIXME: have to manually reconfigure import path for multiapi operation mixin -from ...aio._lro_async import AsyncAnalyzeHealthcareEntitiesLROPoller, AsyncAnalyzeHealthcareEntitiesLROPollingMethod, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod +from ...aio._lro_async import ( + AsyncAnalyzeHealthcareEntitiesLROPoller, + AsyncAnalyzeHealthcareEntitiesLROPollingMethod, + AsyncAnalyzeActionsLROPoller, + AsyncAnalyzeActionsLROPollingMethod, +) from azure.core.polling import AsyncLROPoller from .. import models as _models @@ -21,12 +26,7 @@ class TextAnalyticsClientOperationsMixin(object): async def analyze_status( - self, - job_id: str, - show_stats: Optional[bool] = None, - top: int = 20, - skip: int = 0, - **kwargs: Any + self, job_id: str, show_stats: Optional[bool] = None, top: int = 20, skip: int = 0, **kwargs: Any ) -> _models.AnalyzeJobState: """Get analysis status and results. @@ -50,8 +50,8 @@ async def analyze_status( :rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('analyze_status') - if api_version == 'v3.1': + api_version = self._get_api_version("analyze_status") + if api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) @@ -64,10 +64,7 @@ async def analyze_status( return await mixin_instance.analyze_status(job_id, show_stats, top, skip, **kwargs) async def analyze_text( - self, - body: Union[_models.AnalyzeTextTask, IO], - show_stats: Optional[bool] = None, - **kwargs: Any + self, body: Union[_models.AnalyzeTextTask, IO], show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -88,10 +85,10 @@ async def analyze_text( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextTaskResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('analyze_text') - if api_version == '2022-05-01': + api_version = self._get_api_version("analyze_text") + if api_version == "2022-05-01": from ..v2022_05_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from ..v2023_04_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_text'".format(api_version)) @@ -133,10 +130,10 @@ async def analyze_text_job_status( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextJobState :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('analyze_text_job_status') - if api_version == '2022-05-01': + api_version = self._get_api_version("analyze_text_job_status") + if api_version == "2022-05-01": from ..v2022_05_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from ..v2023_04_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_text_job_status'".format(api_version)) @@ -149,9 +146,7 @@ async def analyze_text_job_status( return await mixin_instance.analyze_text_job_status(job_id, show_stats, top, skip, **kwargs) async def begin_analyze( - self, - body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, - **kwargs: Any + self, body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -178,8 +173,8 @@ async def begin_analyze( ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_analyze') - if api_version == 'v3.1': + api_version = self._get_api_version("begin_analyze") + if api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) @@ -191,11 +186,7 @@ async def begin_analyze( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_analyze(body, **kwargs) - async def begin_analyze_text_cancel_job( - self, - job_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_analyze_text_cancel_job(self, job_id: str, **kwargs: Any) -> AsyncLROPoller[None]: """Cancel a long-running Text Analysis job. Cancel a long-running Text Analysis job. @@ -214,13 +205,15 @@ async def begin_analyze_text_cancel_job( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_analyze_text_cancel_job') - if api_version == '2022-05-01': + api_version = self._get_api_version("begin_analyze_text_cancel_job") + if api_version == "2022-05-01": from ..v2022_05_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from ..v2023_04_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_text_cancel_job'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_text_cancel_job'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -230,9 +223,7 @@ async def begin_analyze_text_cancel_job( return await mixin_instance.begin_analyze_text_cancel_job(job_id, **kwargs) async def begin_analyze_text_submit_job( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -259,13 +250,15 @@ async def begin_analyze_text_submit_job( ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextJobState] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_analyze_text_submit_job') - if api_version == '2022-05-01': + api_version = self._get_api_version("begin_analyze_text_submit_job") + if api_version == "2022-05-01": from ..v2022_05_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from ..v2023_04_01.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'begin_analyze_text_submit_job'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'begin_analyze_text_submit_job'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -274,11 +267,7 @@ async def begin_analyze_text_submit_job( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.begin_analyze_text_submit_job(body, **kwargs) - async def begin_cancel_health_job( - self, - job_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_cancel_health_job(self, job_id: str, **kwargs: Any) -> AsyncLROPoller[None]: """Cancel healthcare prediction job. Cancel healthcare prediction job. @@ -297,8 +286,8 @@ async def begin_cancel_health_job( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_cancel_health_job') - if api_version == 'v3.1': + api_version = self._get_api_version("begin_cancel_health_job") + if api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) @@ -356,8 +345,8 @@ async def begin_health( ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState] :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('begin_health') - if api_version == 'v3.1': + api_version = self._get_api_version("begin_health") + if api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) @@ -411,10 +400,10 @@ async def entities_linking( :rtype: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('entities_linking') - if api_version == 'v3.0': + api_version = self._get_api_version("entities_linking") + if api_version == "v3.0": from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) @@ -425,10 +414,12 @@ async def entities_linking( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return await mixin_instance.entities_linking(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': - return await mixin_instance.entities_linking(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) + elif api_version == "v3.1": + return await mixin_instance.entities_linking( + documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs + ) async def entities_recognition_general( self, @@ -473,13 +464,15 @@ async def entities_recognition_general( :rtype: ~azure.ai.textanalytics.v3_1.models.EntitiesResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('entities_recognition_general') - if api_version == 'v3.0': + api_version = self._get_api_version("entities_recognition_general") + if api_version == "v3.0": from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: - raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) + raise ValueError( + "API version {} does not have operation 'entities_recognition_general'".format(api_version) + ) mixin_instance = OperationClass() mixin_instance._client = self._client mixin_instance._config = self._config @@ -487,10 +480,12 @@ async def entities_recognition_general( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return await mixin_instance.entities_recognition_general(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': - return await mixin_instance.entities_recognition_general(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) + elif api_version == "v3.1": + return await mixin_instance.entities_recognition_general( + documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs + ) async def entities_recognition_pii( self, @@ -544,8 +539,8 @@ async def entities_recognition_pii( :rtype: ~azure.ai.textanalytics.v3_1.models.PiiResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('entities_recognition_pii') - if api_version == 'v3.1': + api_version = self._get_api_version("entities_recognition_pii") + if api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) @@ -555,15 +550,12 @@ async def entities_recognition_pii( mixin_instance._serialize = Serializer(self._models_dict(api_version)) mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.entities_recognition_pii(documents, model_version, show_stats, logging_opt_out, domain, string_index_type, pii_categories, **kwargs) + return await mixin_instance.entities_recognition_pii( + documents, model_version, show_stats, logging_opt_out, domain, string_index_type, pii_categories, **kwargs + ) async def health_status( - self, - job_id: str, - top: int = 20, - skip: int = 0, - show_stats: Optional[bool] = None, - **kwargs: Any + self, job_id: str, top: int = 20, skip: int = 0, show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.HealthcareJobState: """Get healthcare analysis job status and results. @@ -585,8 +577,8 @@ async def health_status( :rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('health_status') - if api_version == 'v3.1': + api_version = self._get_api_version("health_status") + if api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) @@ -634,10 +626,10 @@ async def key_phrases( :rtype: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('key_phrases') - if api_version == 'v3.0': + api_version = self._get_api_version("key_phrases") + if api_version == "v3.0": from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'key_phrases'".format(api_version)) @@ -648,9 +640,9 @@ async def key_phrases( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return await mixin_instance.key_phrases(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': + elif api_version == "v3.1": return await mixin_instance.key_phrases(documents, model_version, show_stats, logging_opt_out, **kwargs) async def languages( @@ -690,10 +682,10 @@ async def languages( :rtype: ~azure.ai.textanalytics.v3_1.models.LanguageResult :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('languages') - if api_version == 'v3.0': + api_version = self._get_api_version("languages") + if api_version == "v3.0": from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'languages'".format(api_version)) @@ -704,9 +696,9 @@ async def languages( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return await mixin_instance.languages(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': + elif api_version == "v3.1": return await mixin_instance.languages(documents, model_version, show_stats, logging_opt_out, **kwargs) async def sentiment( @@ -756,10 +748,10 @@ async def sentiment( :rtype: ~azure.ai.textanalytics.v3_1.models.SentimentResponse :raises ~azure.core.exceptions.HttpResponseError: """ - api_version = self._get_api_version('sentiment') - if api_version == 'v3.0': + api_version = self._get_api_version("sentiment") + if api_version == "v3.0": from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.1': + elif api_version == "v3.1": from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) @@ -770,7 +762,9 @@ async def sentiment( mixin_instance._serialize.client_side_validation = False mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) # FIXME: this is handwritten - if api_version == 'v3.0': + if api_version == "v3.0": return await mixin_instance.sentiment(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1': - return await mixin_instance.sentiment(documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs) \ No newline at end of file + elif api_version == "v3.1": + return await mixin_instance.sentiment( + documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py index a83528c1fe41..eed0f2d43722 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py @@ -23,6 +23,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -30,6 +31,7 @@ def __init__(self, *args, **kwargs): """ pass + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixin, _SDKClient): """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`https://learn.microsoft.com/azure/cognitive-services/text-analytics/overview`. @@ -52,17 +54,19 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = 'v3.1' + DEFAULT_API_VERSION = "v3.1" _PROFILE_TAG = "azure.ai.textanalytics.TextAnalyticsClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - 'analyze_text': '2023-04-01', - 'analyze_text_job_status': '2023-04-01', - 'begin_analyze_text_cancel_job': '2023-04-01', - 'begin_analyze_text_submit_job': '2023-04-01', - }}, - _PROFILE_TAG + " latest" + LATEST_PROFILE = ProfileDefinition( + { + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + "analyze_text": "2023-04-01", + "analyze_text_job_status": "2023-04-01", + "begin_analyze_text_cancel_job": "2023-04-01", + "begin_analyze_text_submit_job": "2023-04-01", + } + }, + _PROFILE_TAG + " latest", ) def __init__( @@ -73,20 +77,17 @@ def __init__( profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: - if api_version == '2022-05-01' or api_version == '2023-04-01': - base_url = '{Endpoint}/language' - elif api_version == 'v3.0': - base_url = '{Endpoint}/text/analytics/v3.0' - elif api_version == 'v3.1': - base_url = '{Endpoint}/text/analytics/v3.1' + if api_version == "2022-05-01" or api_version == "2023-04-01": + base_url = "{Endpoint}/language" + elif api_version == "v3.0": + base_url = "{Endpoint}/text/analytics/v3.0" + elif api_version == "v3.1": + base_url = "{Endpoint}/text/analytics/v3.1" else: raise ValueError("API version {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(TextAnalyticsClient, self).__init__( - api_version=api_version, - profile=profile - ) + super(TextAnalyticsClient, self).__init__(api_version=api_version, profile=profile) @classmethod def _models_dict(cls, api_version): @@ -96,29 +97,35 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: - * 2022-05-01: :mod:`v2022_05_01.models` - * 2023-04-01: :mod:`v2023_04_01.models` - * v3.0: :mod:`v3_0.models` - * v3.1: :mod:`v3_1.models` + * 2022-05-01: :mod:`v2022_05_01.models` + * 2023-04-01: :mod:`v2023_04_01.models` + * v3.0: :mod:`v3_0.models` + * v3.1: :mod:`v3_1.models` """ - if api_version == '2022-05-01': + if api_version == "2022-05-01": from ..v2022_05_01 import models + return models - elif api_version == '2023-04-01': + elif api_version == "2023-04-01": from ..v2023_04_01 import models + return models - elif api_version == 'v3.0': + elif api_version == "v3.0": from ..v3_0 import models + return models - elif api_version == 'v3.1': + elif api_version == "v3.1": from ..v3_1 import models + return models raise ValueError("API version {} is not available".format(api_version)) async def close(self): await self._client.close() + async def __aenter__(self): await self._client.__aenter__() return self + async def __aexit__(self, *exc_details): await self._client.__aexit__(*exc_details) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py index e6046dcdb4f9..82e2e42d7639 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -33,14 +34,9 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :paramtype api_version: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-05-01") # type: str + api_version = kwargs.pop("api_version", "2022-05-01") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,23 +46,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py index 9cee0c4fc6a5..d60d61a327f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze @@ -40,13 +41,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/language' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/language" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -55,12 +51,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -80,7 +71,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py index 0eb3a4e5d74e..efe7c9bd01b4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/_vendor.py @@ -18,6 +18,7 @@ from .._serialization import Deserializer, Serializer + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,6 +26,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -32,13 +34,13 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py index e05beee17c35..2a8200e4466d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -33,14 +34,9 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :paramtype api_version: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-05-01") # type: str + api_version = kwargs.pop("api_version", "2022-05-01") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,22 +46,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py index ae543cf596d1..c6203f6db5df 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze @@ -40,13 +41,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/language' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/language" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -55,12 +51,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -80,7 +71,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_vendor.py index 99dd8eda3b62..31647c5f04bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py index e4ea91091a8b..4a8e6d16387b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast, List from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod @@ -15,10 +16,13 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict -from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin +from ._text_analytics_client_operations import ( + TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin, +) from ... import models as _models -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,9 +30,7 @@ class TextAnalyticsClientOperationsMixin(GeneratedTextAnalyticsClientOperationsM @distributed_trace_async async def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -56,44 +58,39 @@ async def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncAnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod + polling_method = cast( + AsyncPollingMethod, + AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -103,14 +100,17 @@ def get_long_running_output(pipeline_response): polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return poller_cls(self._client, raw_result, get_long_running_output, polling_method) # Handwritten - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore + +__all__: List[str] = [ + "TextAnalyticsClientOperationsMixin" +] # Add all objects you want publicly available to users at this package level -__all__: List[str] = ["TextAnalyticsClientOperationsMixin"] # Add all objects you want publicly available to users at this package level def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py index 00400fc586e3..bb7ccfe0d0c4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/aio/operations/_text_analytics_client_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -20,11 +26,18 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._text_analytics_client_operations import build_analyze_text_cancel_job_request, build_analyze_text_job_status_request, build_analyze_text_request, build_analyze_text_submit_job_request +from ...operations._text_analytics_client_operations import ( + build_analyze_text_cancel_job_request, + build_analyze_text_job_status_request, + build_analyze_text_request, + build_analyze_text_submit_job_request, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class TextAnalyticsClientOperationsMixin(MixinABC): @overload @@ -57,12 +70,7 @@ async def analyze_text( @overload async def analyze_text( - self, - body: IO, - show_stats: Optional[bool] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, show_stats: Optional[bool] = None, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -83,13 +91,9 @@ async def analyze_text( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace_async async def analyze_text( - self, - body: Union[_models.AnalyzeTextTask, IO], - show_stats: Optional[bool] = None, - **kwargs: Any + self, body: Union[_models.AnalyzeTextTask, IO], show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -110,17 +114,15 @@ async def analyze_text( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextTaskResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextTaskResult] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextTaskResult] content_type = content_type or "application/json" _json = None @@ -128,7 +130,7 @@ async def analyze_text( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextTask') + _json = self._serialize.body(body, "AnalyzeTextTask") request = build_analyze_text_request( show_stats=show_stats, @@ -136,20 +138,18 @@ async def analyze_text( content_type=content_type, json=_json, content=_content, - template_url=self.analyze_text.metadata['url'], + template_url=self.analyze_text.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -159,32 +159,27 @@ async def analyze_text( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextTaskResult', pipeline_response) + deserialized = self._deserialize("AnalyzeTextTaskResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text.metadata = {'url': "/:analyze-text"} # type: ignore - + analyze_text.metadata = {"url": "/:analyze-text"} # type: ignore async def _analyze_text_submit_job_initial( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> Optional[_models.AnalyzeTextJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] content_type = content_type or "application/json" _json = None @@ -192,27 +187,25 @@ async def _analyze_text_submit_job_initial( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextJobsInput') + _json = self._serialize.body(body, "AnalyzeTextJobsInput") request = build_analyze_text_submit_job_request( api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._analyze_text_submit_job_initial.metadata['url'], + template_url=self._analyze_text_submit_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -225,27 +218,23 @@ async def _analyze_text_submit_job_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _analyze_text_submit_job_initial.metadata = {'url': "/analyze-text/jobs"} # type: ignore - + _analyze_text_submit_job_initial.metadata = {"url": "/analyze-text/jobs"} # type: ignore @overload async def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -274,11 +263,7 @@ async def begin_analyze_text_submit_job( @overload async def begin_analyze_text_submit_job( - self, - body: IO, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -305,12 +290,9 @@ async def begin_analyze_text_submit_job( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace_async async def begin_analyze_text_submit_job( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -340,57 +322,53 @@ async def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncAnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncAnalyzeActionsLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncAnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore @distributed_trace_async async def analyze_text_job_status( @@ -423,38 +401,33 @@ async def analyze_text_job_status( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] - request = build_analyze_text_job_status_request( job_id=job_id, show_stats=show_stats, top=top, skip=skip, api_version=api_version, - template_url=self.analyze_text_job_status.metadata['url'], + template_url=self.analyze_text_job_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -464,50 +437,42 @@ async def analyze_text_job_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text_job_status.metadata = {'url': "/analyze-text/jobs/{jobId}"} # type: ignore - + analyze_text_job_status.metadata = {"url": "/analyze-text/jobs/{jobId}"} # type: ignore async def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-return-statements - self, - job_id: str, - **kwargs: Any + self, job_id: str, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_analyze_text_cancel_job_request( job_id=job_id, api_version=api_version, - template_url=self._analyze_text_cancel_job_initial.metadata['url'], + template_url=self._analyze_text_cancel_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -518,21 +483,15 @@ async def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-retu raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_text_cancel_job_initial.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore - + _analyze_text_cancel_job_initial.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore @distributed_trace_async - async def begin_analyze_text_cancel_job( - self, - job_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_analyze_text_cancel_job(self, job_id: str, **kwargs: Any) -> AsyncLROPoller[None]: """Cancel a long-running Text Analysis job. Cancel a long-running Text Analysis job. @@ -554,50 +513,46 @@ async def begin_analyze_text_cancel_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_text_cancel_job_initial( # type: ignore job_id=job_id, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_cancel_job.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore + begin_analyze_text_cancel_job.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py index 527f94ef78b5..4cd28662e530 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/__init__.py @@ -143,139 +143,140 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AnalyzeTextEntityLinkingInput', - 'AnalyzeTextEntityRecognitionInput', - 'AnalyzeTextJobState', - 'AnalyzeTextJobStatistics', - 'AnalyzeTextJobsInput', - 'AnalyzeTextKeyPhraseExtractionInput', - 'AnalyzeTextLROResult', - 'AnalyzeTextLROTask', - 'AnalyzeTextLanguageDetectionInput', - 'AnalyzeTextPiiEntitiesRecognitionInput', - 'AnalyzeTextSentimentAnalysisInput', - 'AnalyzeTextTask', - 'AnalyzeTextTaskResult', - 'ClassificationDocumentResult', - 'ClassificationResult', - 'CustomEntitiesLROTask', - 'CustomEntitiesResult', - 'CustomEntitiesResultDocumentsItem', - 'CustomEntitiesTaskParameters', - 'CustomEntityRecognitionLROResult', - 'CustomLabelClassificationResult', - 'CustomLabelClassificationResultDocumentsItem', - 'CustomMultiLabelClassificationLROResult', - 'CustomMultiLabelClassificationLROTask', - 'CustomMultiLabelClassificationTaskParameters', - 'CustomResult', - 'CustomSingleLabelClassificationLROResult', - 'CustomSingleLabelClassificationLROTask', - 'CustomSingleLabelClassificationTaskParameters', - 'CustomTaskParameters', - 'DetectedLanguage', - 'DocumentError', - 'DocumentResult', - 'DocumentStatistics', - 'DocumentWarning', - 'EntitiesDocumentResult', - 'EntitiesLROTask', - 'EntitiesResult', - 'EntitiesResultDocumentsItem', - 'EntitiesTaskParameters', - 'EntitiesTaskResult', - 'Entity', - 'EntityLinkingLROResult', - 'EntityLinkingLROTask', - 'EntityLinkingResult', - 'EntityLinkingResultDocumentsItem', - 'EntityLinkingTaskParameters', - 'EntityLinkingTaskResult', - 'EntityRecognitionLROResult', - 'Error', - 'ErrorResponse', - 'HealthcareAssertion', - 'HealthcareEntitiesDocumentResult', - 'HealthcareEntity', - 'HealthcareEntityLink', - 'HealthcareLROResult', - 'HealthcareLROTask', - 'HealthcareRelation', - 'HealthcareRelationEntity', - 'HealthcareResult', - 'HealthcareResultDocumentsItem', - 'HealthcareTaskParameters', - 'InnerErrorModel', - 'JobErrors', - 'JobState', - 'KeyPhraseExtractionLROResult', - 'KeyPhraseLROTask', - 'KeyPhraseResult', - 'KeyPhraseResultDocumentsItem', - 'KeyPhraseTaskParameters', - 'KeyPhraseTaskResult', - 'KeyPhrasesDocumentResult', - 'LanguageDetectionAnalysisInput', - 'LanguageDetectionDocumentResult', - 'LanguageDetectionResult', - 'LanguageDetectionTaskParameters', - 'LanguageDetectionTaskResult', - 'LanguageInput', - 'LinkedEntitiesDocumentResult', - 'LinkedEntity', - 'Match', - 'MultiLanguageAnalysisInput', - 'MultiLanguageInput', - 'Pagination', - 'PiiEntitiesDocumentResult', - 'PiiEntityRecognitionLROResult', - 'PiiLROTask', - 'PiiResult', - 'PiiResultDocumentsItem', - 'PiiTaskParameters', - 'PiiTaskResult', - 'PreBuiltResult', - 'PreBuiltTaskParameters', - 'RequestStatistics', - 'SentenceAssessment', - 'SentenceSentiment', - 'SentenceTarget', - 'SentimentAnalysisLROTask', - 'SentimentAnalysisTaskParameters', - 'SentimentConfidenceScorePerLabel', - 'SentimentDocumentResult', - 'SentimentLROResult', - 'SentimentResponse', - 'SentimentResponseDocumentsItem', - 'SentimentTaskResult', - 'TargetConfidenceScoreLabel', - 'TargetRelation', - 'TaskIdentifier', - 'TaskParameters', - 'TaskState', - 'TasksState', - 'TasksStateTasks', - 'AnalyzeTextLROResultsKind', - 'AnalyzeTextLROTaskKind', - 'AnalyzeTextTaskKind', - 'AnalyzeTextTaskResultsKind', - 'DocumentSentimentValue', - 'EntityAssociation', - 'EntityCertainty', - 'EntityConditionality', - 'ErrorCode', - 'HealthcareEntityCategory', - 'HealthcareEntityRelation', - 'InnerErrorCode', - 'PiiDomain', - 'PiiEntityCategory', - 'SentenceSentimentValue', - 'State', - 'StringIndexType', - 'TargetRelationType', - 'TokenSentimentValue', - 'WarningCodeValue', + "AnalyzeTextEntityLinkingInput", + "AnalyzeTextEntityRecognitionInput", + "AnalyzeTextJobState", + "AnalyzeTextJobStatistics", + "AnalyzeTextJobsInput", + "AnalyzeTextKeyPhraseExtractionInput", + "AnalyzeTextLROResult", + "AnalyzeTextLROTask", + "AnalyzeTextLanguageDetectionInput", + "AnalyzeTextPiiEntitiesRecognitionInput", + "AnalyzeTextSentimentAnalysisInput", + "AnalyzeTextTask", + "AnalyzeTextTaskResult", + "ClassificationDocumentResult", + "ClassificationResult", + "CustomEntitiesLROTask", + "CustomEntitiesResult", + "CustomEntitiesResultDocumentsItem", + "CustomEntitiesTaskParameters", + "CustomEntityRecognitionLROResult", + "CustomLabelClassificationResult", + "CustomLabelClassificationResultDocumentsItem", + "CustomMultiLabelClassificationLROResult", + "CustomMultiLabelClassificationLROTask", + "CustomMultiLabelClassificationTaskParameters", + "CustomResult", + "CustomSingleLabelClassificationLROResult", + "CustomSingleLabelClassificationLROTask", + "CustomSingleLabelClassificationTaskParameters", + "CustomTaskParameters", + "DetectedLanguage", + "DocumentError", + "DocumentResult", + "DocumentStatistics", + "DocumentWarning", + "EntitiesDocumentResult", + "EntitiesLROTask", + "EntitiesResult", + "EntitiesResultDocumentsItem", + "EntitiesTaskParameters", + "EntitiesTaskResult", + "Entity", + "EntityLinkingLROResult", + "EntityLinkingLROTask", + "EntityLinkingResult", + "EntityLinkingResultDocumentsItem", + "EntityLinkingTaskParameters", + "EntityLinkingTaskResult", + "EntityRecognitionLROResult", + "Error", + "ErrorResponse", + "HealthcareAssertion", + "HealthcareEntitiesDocumentResult", + "HealthcareEntity", + "HealthcareEntityLink", + "HealthcareLROResult", + "HealthcareLROTask", + "HealthcareRelation", + "HealthcareRelationEntity", + "HealthcareResult", + "HealthcareResultDocumentsItem", + "HealthcareTaskParameters", + "InnerErrorModel", + "JobErrors", + "JobState", + "KeyPhraseExtractionLROResult", + "KeyPhraseLROTask", + "KeyPhraseResult", + "KeyPhraseResultDocumentsItem", + "KeyPhraseTaskParameters", + "KeyPhraseTaskResult", + "KeyPhrasesDocumentResult", + "LanguageDetectionAnalysisInput", + "LanguageDetectionDocumentResult", + "LanguageDetectionResult", + "LanguageDetectionTaskParameters", + "LanguageDetectionTaskResult", + "LanguageInput", + "LinkedEntitiesDocumentResult", + "LinkedEntity", + "Match", + "MultiLanguageAnalysisInput", + "MultiLanguageInput", + "Pagination", + "PiiEntitiesDocumentResult", + "PiiEntityRecognitionLROResult", + "PiiLROTask", + "PiiResult", + "PiiResultDocumentsItem", + "PiiTaskParameters", + "PiiTaskResult", + "PreBuiltResult", + "PreBuiltTaskParameters", + "RequestStatistics", + "SentenceAssessment", + "SentenceSentiment", + "SentenceTarget", + "SentimentAnalysisLROTask", + "SentimentAnalysisTaskParameters", + "SentimentConfidenceScorePerLabel", + "SentimentDocumentResult", + "SentimentLROResult", + "SentimentResponse", + "SentimentResponseDocumentsItem", + "SentimentTaskResult", + "TargetConfidenceScoreLabel", + "TargetRelation", + "TaskIdentifier", + "TaskParameters", + "TaskState", + "TasksState", + "TasksStateTasks", + "AnalyzeTextLROResultsKind", + "AnalyzeTextLROTaskKind", + "AnalyzeTextTaskKind", + "AnalyzeTextTaskResultsKind", + "DocumentSentimentValue", + "EntityAssociation", + "EntityCertainty", + "EntityConditionality", + "ErrorCode", + "HealthcareEntityCategory", + "HealthcareEntityRelation", + "InnerErrorCode", + "PiiDomain", + "PiiEntityCategory", + "SentenceSentimentValue", + "State", + "StringIndexType", + "TargetRelationType", + "TokenSentimentValue", + "WarningCodeValue", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py index bcd6e0cab1ab..28ac41dd8351 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_models_py3.py @@ -34,7 +34,7 @@ class AnalyzeTextTask(_serialization.Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -42,15 +42,18 @@ class AnalyzeTextTask(_serialization.Model): } _subtype_map = { - 'kind': {'EntityLinking': 'AnalyzeTextEntityLinkingInput', 'EntityRecognition': 'AnalyzeTextEntityRecognitionInput', 'KeyPhraseExtraction': 'AnalyzeTextKeyPhraseExtractionInput', 'LanguageDetection': 'AnalyzeTextLanguageDetectionInput', 'PiiEntityRecognition': 'AnalyzeTextPiiEntitiesRecognitionInput', 'SentimentAnalysis': 'AnalyzeTextSentimentAnalysisInput'} - } - - def __init__( - self, - **kwargs - ): - """ - """ + "kind": { + "EntityLinking": "AnalyzeTextEntityLinkingInput", + "EntityRecognition": "AnalyzeTextEntityRecognitionInput", + "KeyPhraseExtraction": "AnalyzeTextKeyPhraseExtractionInput", + "LanguageDetection": "AnalyzeTextLanguageDetectionInput", + "PiiEntityRecognition": "AnalyzeTextPiiEntitiesRecognitionInput", + "SentimentAnalysis": "AnalyzeTextSentimentAnalysisInput", + } + } + + def __init__(self, **kwargs): + """ """ super().__init__(**kwargs) self.kind = None # type: Optional[str] @@ -71,7 +74,7 @@ class AnalyzeTextEntityLinkingInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -95,7 +98,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.EntityLinkingTaskParameters """ super().__init__(**kwargs) - self.kind = 'EntityLinking' # type: str + self.kind = "EntityLinking" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -116,7 +119,7 @@ class AnalyzeTextEntityRecognitionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -140,7 +143,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.EntitiesTaskParameters """ super().__init__(**kwargs) - self.kind = 'EntityRecognition' # type: str + self.kind = "EntityRecognition" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -159,8 +162,8 @@ class AnalyzeTextJobsInput(_serialization.Model): """ _validation = { - 'analysis_input': {'required': True}, - 'tasks': {'required': True}, + "analysis_input": {"required": True}, + "tasks": {"required": True}, } _attribute_map = { @@ -204,12 +207,7 @@ class AnalyzeTextJobStatistics(_serialization.Model): "statistics": {"key": "statistics", "type": "RequestStatistics"}, } - def __init__( - self, - *, - statistics: Optional["_models.RequestStatistics"] = None, - **kwargs - ): + def __init__(self, *, statistics: Optional["_models.RequestStatistics"] = None, **kwargs): """ :keyword statistics: if showStats=true was specified in the request this field will contain information about the request payload. @@ -229,19 +227,14 @@ class TasksState(_serialization.Model): """ _validation = { - 'tasks': {'required': True}, + "tasks": {"required": True}, } _attribute_map = { "tasks": {"key": "tasks", "type": "TasksStateTasks"}, } - def __init__( - self, - *, - tasks: "_models.TasksStateTasks", - **kwargs - ): + def __init__(self, *, tasks: "_models.TasksStateTasks", **kwargs): """ :keyword tasks: Required. :paramtype tasks: ~azure.ai.textanalytics.v2022_05_01.models.TasksStateTasks @@ -275,10 +268,10 @@ class JobState(_serialization.Model): """ _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -365,11 +358,11 @@ class AnalyzeTextJobState(JobState, TasksState, AnalyzeTextJobStatistics): """ _validation = { - 'tasks': {'required': True}, - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "tasks": {"required": True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -424,7 +417,19 @@ def __init__( :keyword next_link: :paramtype next_link: str """ - super().__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, errors=errors, next_link=next_link, tasks=tasks, statistics=statistics, **kwargs) + super().__init__( + display_name=display_name, + created_date_time=created_date_time, + expiration_date_time=expiration_date_time, + job_id=job_id, + last_update_date_time=last_update_date_time, + status=status, + errors=errors, + next_link=next_link, + tasks=tasks, + statistics=statistics, + **kwargs + ) self.statistics = statistics self.tasks = tasks self.display_name = display_name @@ -453,7 +458,7 @@ class AnalyzeTextKeyPhraseExtractionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -477,7 +482,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.KeyPhraseTaskParameters """ super().__init__(**kwargs) - self.kind = 'KeyPhraseExtraction' # type: str + self.kind = "KeyPhraseExtraction" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -499,7 +504,7 @@ class AnalyzeTextLanguageDetectionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -524,7 +529,7 @@ def __init__( ~azure.ai.textanalytics.v2022_05_01.models.LanguageDetectionTaskParameters """ super().__init__(**kwargs) - self.kind = 'LanguageDetection' # type: str + self.kind = "LanguageDetection" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -540,12 +545,7 @@ class TaskIdentifier(_serialization.Model): "task_name": {"key": "taskName", "type": "str"}, } - def __init__( - self, - *, - task_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, task_name: Optional[str] = None, **kwargs): """ :keyword task_name: :paramtype task_name: str @@ -567,8 +567,8 @@ class TaskState(_serialization.Model): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -576,13 +576,7 @@ class TaskState(_serialization.Model): "status": {"key": "status", "type": "str"}, } - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - status: Union[str, "_models.State"], - **kwargs - ): + def __init__(self, *, last_update_date_time: datetime.datetime, status: Union[str, "_models.State"], **kwargs): """ :keyword last_update_date_time: Required. :paramtype last_update_date_time: ~datetime.datetime @@ -622,9 +616,9 @@ class AnalyzeTextLROResult(TaskState, TaskIdentifier): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, } _attribute_map = { @@ -635,7 +629,17 @@ class AnalyzeTextLROResult(TaskState, TaskIdentifier): } _subtype_map = { - 'kind': {'CustomEntityRecognitionLROResults': 'CustomEntityRecognitionLROResult', 'CustomMultiLabelClassificationLROResults': 'CustomMultiLabelClassificationLROResult', 'CustomSingleLabelClassificationLROResults': 'CustomSingleLabelClassificationLROResult', 'EntityLinkingLROResults': 'EntityLinkingLROResult', 'EntityRecognitionLROResults': 'EntityRecognitionLROResult', 'HealthcareLROResults': 'HealthcareLROResult', 'KeyPhraseExtractionLROResults': 'KeyPhraseExtractionLROResult', 'PiiEntityRecognitionLROResults': 'PiiEntityRecognitionLROResult', 'SentimentAnalysisLROResults': 'SentimentLROResult'} + "kind": { + "CustomEntityRecognitionLROResults": "CustomEntityRecognitionLROResult", + "CustomMultiLabelClassificationLROResults": "CustomMultiLabelClassificationLROResult", + "CustomSingleLabelClassificationLROResults": "CustomSingleLabelClassificationLROResult", + "EntityLinkingLROResults": "EntityLinkingLROResult", + "EntityRecognitionLROResults": "EntityRecognitionLROResult", + "HealthcareLROResults": "HealthcareLROResult", + "KeyPhraseExtractionLROResults": "KeyPhraseExtractionLROResult", + "PiiEntityRecognitionLROResults": "PiiEntityRecognitionLROResult", + "SentimentAnalysisLROResults": "SentimentLROResult", + } } def __init__( @@ -682,7 +686,7 @@ class AnalyzeTextLROTask(TaskIdentifier): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -691,15 +695,20 @@ class AnalyzeTextLROTask(TaskIdentifier): } _subtype_map = { - 'kind': {'CustomEntityRecognition': 'CustomEntitiesLROTask', 'CustomMultiLabelClassification': 'CustomMultiLabelClassificationLROTask', 'CustomSingleLabelClassification': 'CustomSingleLabelClassificationLROTask', 'EntityLinking': 'EntityLinkingLROTask', 'EntityRecognition': 'EntitiesLROTask', 'Healthcare': 'HealthcareLROTask', 'KeyPhraseExtraction': 'KeyPhraseLROTask', 'PiiEntityRecognition': 'PiiLROTask', 'SentimentAnalysis': 'SentimentAnalysisLROTask'} + "kind": { + "CustomEntityRecognition": "CustomEntitiesLROTask", + "CustomMultiLabelClassification": "CustomMultiLabelClassificationLROTask", + "CustomSingleLabelClassification": "CustomSingleLabelClassificationLROTask", + "EntityLinking": "EntityLinkingLROTask", + "EntityRecognition": "EntitiesLROTask", + "Healthcare": "HealthcareLROTask", + "KeyPhraseExtraction": "KeyPhraseLROTask", + "PiiEntityRecognition": "PiiLROTask", + "SentimentAnalysis": "SentimentAnalysisLROTask", + } } - def __init__( - self, - *, - task_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, task_name: Optional[str] = None, **kwargs): """ :keyword task_name: :paramtype task_name: str @@ -724,7 +733,7 @@ class AnalyzeTextPiiEntitiesRecognitionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -748,7 +757,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.PiiTaskParameters """ super().__init__(**kwargs) - self.kind = 'PiiEntityRecognition' # type: str + self.kind = "PiiEntityRecognition" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -769,7 +778,7 @@ class AnalyzeTextSentimentAnalysisInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -794,7 +803,7 @@ def __init__( ~azure.ai.textanalytics.v2022_05_01.models.SentimentAnalysisTaskParameters """ super().__init__(**kwargs) - self.kind = 'SentimentAnalysis' # type: str + self.kind = "SentimentAnalysis" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -815,7 +824,7 @@ class AnalyzeTextTaskResult(_serialization.Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -823,15 +832,18 @@ class AnalyzeTextTaskResult(_serialization.Model): } _subtype_map = { - 'kind': {'EntityLinkingResults': 'EntityLinkingTaskResult', 'EntityRecognitionResults': 'EntitiesTaskResult', 'KeyPhraseExtractionResults': 'KeyPhraseTaskResult', 'LanguageDetectionResults': 'LanguageDetectionTaskResult', 'PiiEntityRecognitionResults': 'PiiTaskResult', 'SentimentAnalysisResults': 'SentimentTaskResult'} - } - - def __init__( - self, - **kwargs - ): - """ - """ + "kind": { + "EntityLinkingResults": "EntityLinkingTaskResult", + "EntityRecognitionResults": "EntitiesTaskResult", + "KeyPhraseExtractionResults": "KeyPhraseTaskResult", + "LanguageDetectionResults": "LanguageDetectionTaskResult", + "PiiEntityRecognitionResults": "PiiTaskResult", + "SentimentAnalysisResults": "SentimentTaskResult", + } + } + + def __init__(self, **kwargs): + """ """ super().__init__(**kwargs) self.kind = None # type: Optional[str] @@ -851,8 +863,8 @@ class DocumentResult(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -901,9 +913,9 @@ class ClassificationDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'class_property': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "class_property": {"required": True}, } _attribute_map = { @@ -950,8 +962,8 @@ class ClassificationResult(_serialization.Model): """ _validation = { - 'category': {'required': True}, - 'confidence_score': {'required': True}, + "category": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -959,13 +971,7 @@ class ClassificationResult(_serialization.Model): "confidence_score": {"key": "confidenceScore", "type": "float"}, } - def __init__( - self, - *, - category: str, - confidence_score: float, - **kwargs - ): + def __init__(self, *, category: str, confidence_score: float, **kwargs): """ :keyword category: Classification type. Required. :paramtype category: str @@ -994,7 +1000,7 @@ class CustomEntitiesLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1017,7 +1023,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.CustomEntitiesTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'CustomEntityRecognition' # type: str + self.kind = "CustomEntityRecognition" # type: str self.parameters = parameters @@ -1038,9 +1044,9 @@ class CustomResult(_serialization.Model): """ _validation = { - 'errors': {'required': True}, - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "errors": {"required": True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1097,10 +1103,10 @@ class CustomEntitiesResult(CustomResult): """ _validation = { - 'errors': {'required': True}, - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -1135,7 +1141,9 @@ def __init__( :paramtype documents: list[~azure.ai.textanalytics.v2022_05_01.models.CustomEntitiesResultDocumentsItem] """ - super().__init__(errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs + ) self.documents = documents @@ -1156,9 +1164,9 @@ class EntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -1209,9 +1217,9 @@ class CustomEntitiesResultDocumentsItem(EntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -1255,12 +1263,7 @@ class TaskParameters(_serialization.Model): "logging_opt_out": {"key": "loggingOptOut", "type": "bool"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -1283,8 +1286,8 @@ class CustomTaskParameters(TaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1293,14 +1296,7 @@ class CustomTaskParameters(TaskParameters): "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - *, - project_name: str, - deployment_name: str, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, project_name: str, deployment_name: str, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -1333,8 +1329,8 @@ class CustomEntitiesTaskParameters(CustomTaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1366,7 +1362,9 @@ def __init__( and "Utf16CodeUnit". :paramtype string_index_type: str or ~azure.ai.textanalytics.v2022_05_01.models.StringIndexType """ - super().__init__(logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs + ) self.string_index_type = string_index_type @@ -1393,10 +1391,10 @@ class CustomEntityRecognitionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -1428,7 +1426,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.CustomEntitiesResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'CustomEntityRecognitionLROResults' # type: str + self.kind = "CustomEntityRecognitionLROResults" # type: str self.results = results @@ -1452,10 +1450,10 @@ class CustomLabelClassificationResult(CustomResult): """ _validation = { - 'errors': {'required': True}, - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -1490,7 +1488,9 @@ def __init__( :paramtype documents: list[~azure.ai.textanalytics.v2022_05_01.models.CustomLabelClassificationResultDocumentsItem] """ - super().__init__(errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs + ) self.documents = documents @@ -1511,9 +1511,9 @@ class CustomLabelClassificationResultDocumentsItem(ClassificationDocumentResult) """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'class_property': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "class_property": {"required": True}, } _attribute_map = { @@ -1570,10 +1570,10 @@ class CustomMultiLabelClassificationLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -1605,7 +1605,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.CustomLabelClassificationResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'CustomMultiLabelClassificationLROResults' # type: str + self.kind = "CustomMultiLabelClassificationLROResults" # type: str self.results = results @@ -1627,7 +1627,7 @@ class CustomMultiLabelClassificationLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1651,7 +1651,7 @@ def __init__( ~azure.ai.textanalytics.v2022_05_01.models.CustomMultiLabelClassificationTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'CustomMultiLabelClassification' # type: str + self.kind = "CustomMultiLabelClassification" # type: str self.parameters = parameters @@ -1669,8 +1669,8 @@ class CustomMultiLabelClassificationTaskParameters(CustomTaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1679,14 +1679,7 @@ class CustomMultiLabelClassificationTaskParameters(CustomTaskParameters): "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - *, - project_name: str, - deployment_name: str, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, project_name: str, deployment_name: str, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -1695,7 +1688,9 @@ def __init__( :keyword deployment_name: This field indicates the deployment name for the model. Required. :paramtype deployment_name: str """ - super().__init__(logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs + ) class CustomSingleLabelClassificationLROResult(AnalyzeTextLROResult): @@ -1721,10 +1716,10 @@ class CustomSingleLabelClassificationLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -1756,7 +1751,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.CustomLabelClassificationResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'CustomSingleLabelClassificationLROResults' # type: str + self.kind = "CustomSingleLabelClassificationLROResults" # type: str self.results = results @@ -1778,7 +1773,7 @@ class CustomSingleLabelClassificationLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1802,7 +1797,7 @@ def __init__( ~azure.ai.textanalytics.v2022_05_01.models.CustomSingleLabelClassificationTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'CustomSingleLabelClassification' # type: str + self.kind = "CustomSingleLabelClassification" # type: str self.parameters = parameters @@ -1820,8 +1815,8 @@ class CustomSingleLabelClassificationTaskParameters(CustomTaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1830,14 +1825,7 @@ class CustomSingleLabelClassificationTaskParameters(CustomTaskParameters): "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - *, - project_name: str, - deployment_name: str, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, project_name: str, deployment_name: str, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -1846,7 +1834,9 @@ def __init__( :keyword deployment_name: This field indicates the deployment name for the model. Required. :paramtype deployment_name: str """ - super().__init__(logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs + ) class DetectedLanguage(_serialization.Model): @@ -1865,9 +1855,9 @@ class DetectedLanguage(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'iso6391_name': {'required': True}, - 'confidence_score': {'required': True}, + "name": {"required": True}, + "iso6391_name": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -1876,14 +1866,7 @@ class DetectedLanguage(_serialization.Model): "confidence_score": {"key": "confidenceScore", "type": "float"}, } - def __init__( - self, - *, - name: str, - iso6391_name: str, - confidence_score: float, - **kwargs - ): + def __init__(self, *, name: str, iso6391_name: str, confidence_score: float, **kwargs): """ :keyword name: Long name of a detected language (e.g. English, French). Required. :paramtype name: str @@ -1912,8 +1895,8 @@ class DocumentError(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'error': {'required': True}, + "id": {"required": True}, + "error": {"required": True}, } _attribute_map = { @@ -1921,13 +1904,7 @@ class DocumentError(_serialization.Model): "error": {"key": "error", "type": "Error"}, } - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - error: "_models.Error", - **kwargs - ): + def __init__(self, *, id: str, error: "_models.Error", **kwargs): # pylint: disable=redefined-builtin """ :keyword id: Document Id. Required. :paramtype id: str @@ -1951,8 +1928,8 @@ class DocumentStatistics(_serialization.Model): """ _validation = { - 'characters_count': {'required': True}, - 'transactions_count': {'required': True}, + "characters_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -1960,13 +1937,7 @@ class DocumentStatistics(_serialization.Model): "transactions_count": {"key": "transactionsCount", "type": "int"}, } - def __init__( - self, - *, - characters_count: int, - transactions_count: int, - **kwargs - ): + def __init__(self, *, characters_count: int, transactions_count: int, **kwargs): """ :keyword characters_count: Number of text elements recognized in the document. Required. :paramtype characters_count: int @@ -1993,8 +1964,8 @@ class DocumentWarning(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -2004,12 +1975,7 @@ class DocumentWarning(_serialization.Model): } def __init__( - self, - *, - code: Union[str, "_models.WarningCodeValue"], - message: str, - target_ref: Optional[str] = None, - **kwargs + self, *, code: Union[str, "_models.WarningCodeValue"], message: str, target_ref: Optional[str] = None, **kwargs ): """ :keyword code: Error code. Required. Known values are: "LongWordsInDocument" and @@ -2043,7 +2009,7 @@ class EntitiesLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -2066,7 +2032,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.EntitiesTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'EntityRecognition' # type: str + self.kind = "EntityRecognition" # type: str self.parameters = parameters @@ -2085,8 +2051,8 @@ class PreBuiltResult(_serialization.Model): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -2136,9 +2102,9 @@ class EntitiesResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -2190,9 +2156,9 @@ class EntitiesResultDocumentsItem(EntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -2239,13 +2205,7 @@ class PreBuiltTaskParameters(TaskParameters): "model_version": {"key": "modelVersion", "type": "str"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - model_version: str = "latest", - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, model_version: str = "latest", **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -2313,8 +2273,8 @@ class EntitiesTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2322,18 +2282,13 @@ class EntitiesTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "EntitiesResult"}, } - def __init__( - self, - *, - results: "_models.EntitiesResult", - **kwargs - ): + def __init__(self, *, results: "_models.EntitiesResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.EntitiesResult """ super().__init__(**kwargs) - self.kind = 'EntityRecognitionResults' # type: str + self.kind = "EntityRecognitionResults" # type: str self.results = results @@ -2359,11 +2314,11 @@ class Entity(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -2434,10 +2389,10 @@ class EntityLinkingLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2469,7 +2424,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.EntityLinkingResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'EntityLinkingLROResults' # type: str + self.kind = "EntityLinkingLROResults" # type: str self.results = results @@ -2490,7 +2445,7 @@ class EntityLinkingLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -2513,7 +2468,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.EntityLinkingTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'EntityLinking' # type: str + self.kind = "EntityLinking" # type: str self.parameters = parameters @@ -2535,9 +2490,9 @@ class EntityLinkingResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -2589,9 +2544,9 @@ class LinkedEntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -2642,9 +2597,9 @@ class EntityLinkingResultDocumentsItem(LinkedEntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -2734,8 +2689,8 @@ class EntityLinkingTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2743,18 +2698,13 @@ class EntityLinkingTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "EntityLinkingResult"}, } - def __init__( - self, - *, - results: "_models.EntityLinkingResult", - **kwargs - ): + def __init__(self, *, results: "_models.EntityLinkingResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.EntityLinkingResult """ super().__init__(**kwargs) - self.kind = 'EntityLinkingResults' # type: str + self.kind = "EntityLinkingResults" # type: str self.results = results @@ -2781,10 +2731,10 @@ class EntityRecognitionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2816,7 +2766,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.EntitiesResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'EntityRecognitionLROResults' # type: str + self.kind = "EntityRecognitionLROResults" # type: str self.results = results @@ -2847,8 +2797,8 @@ class Error(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -2911,19 +2861,14 @@ class ErrorResponse(_serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { "error": {"key": "error", "type": "Error"}, } - def __init__( - self, - *, - error: "_models.Error", - **kwargs - ): + def __init__(self, *, error: "_models.Error", **kwargs): """ :keyword error: The error object. Required. :paramtype error: ~azure.ai.textanalytics.v2022_05_01.models.Error @@ -2997,10 +2942,10 @@ class HealthcareEntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -3073,11 +3018,11 @@ class HealthcareEntity(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -3158,8 +3103,8 @@ class HealthcareEntityLink(_serialization.Model): """ _validation = { - 'data_source': {'required': True}, - 'id': {'required': True}, + "data_source": {"required": True}, + "id": {"required": True}, } _attribute_map = { @@ -3167,13 +3112,7 @@ class HealthcareEntityLink(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - data_source: str, - id: str, # pylint: disable=redefined-builtin - **kwargs - ): + def __init__(self, *, data_source: str, id: str, **kwargs): # pylint: disable=redefined-builtin """ :keyword data_source: Entity Catalog. Examples include: UMLS, CHV, MSH, etc. Required. :paramtype data_source: str @@ -3208,10 +3147,10 @@ class HealthcareLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3243,7 +3182,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.HealthcareResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'HealthcareLROResults' # type: str + self.kind = "HealthcareLROResults" # type: str self.results = results @@ -3264,7 +3203,7 @@ class HealthcareLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -3287,7 +3226,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.HealthcareTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'Healthcare' # type: str + self.kind = "Healthcare" # type: str self.parameters = parameters @@ -3310,8 +3249,8 @@ class HealthcareRelation(_serialization.Model): """ _validation = { - 'relation_type': {'required': True}, - 'entities': {'required': True}, + "relation_type": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -3359,8 +3298,8 @@ class HealthcareRelationEntity(_serialization.Model): """ _validation = { - 'ref': {'required': True}, - 'role': {'required': True}, + "ref": {"required": True}, + "role": {"required": True}, } _attribute_map = { @@ -3368,13 +3307,7 @@ class HealthcareRelationEntity(_serialization.Model): "role": {"key": "role", "type": "str"}, } - def __init__( - self, - *, - ref: str, - role: str, - **kwargs - ): + def __init__(self, *, ref: str, role: str, **kwargs): """ :keyword ref: Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . Required. @@ -3407,9 +3340,9 @@ class HealthcareResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -3463,10 +3396,10 @@ class HealthcareResultDocumentsItem(HealthcareEntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -3500,7 +3433,9 @@ def __init__( :keyword relations: Healthcare entity relations. Required. :paramtype relations: list[~azure.ai.textanalytics.v2022_05_01.models.HealthcareRelation] """ - super().__init__(id=id, warnings=warnings, statistics=statistics, entities=entities, relations=relations, **kwargs) + super().__init__( + id=id, warnings=warnings, statistics=statistics, entities=entities, relations=relations, **kwargs + ) class HealthcareTaskParameters(PreBuiltTaskParameters): @@ -3570,8 +3505,8 @@ class InnerErrorModel(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -3629,12 +3564,7 @@ class JobErrors(_serialization.Model): "errors": {"key": "errors", "type": "[Error]"}, } - def __init__( - self, - *, - errors: Optional[List["_models.Error"]] = None, - **kwargs - ): + def __init__(self, *, errors: Optional[List["_models.Error"]] = None, **kwargs): """ :keyword errors: :paramtype errors: list[~azure.ai.textanalytics.v2022_05_01.models.Error] @@ -3666,10 +3596,10 @@ class KeyPhraseExtractionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3701,7 +3631,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.KeyPhraseResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'KeyPhraseExtractionLROResults' # type: str + self.kind = "KeyPhraseExtractionLROResults" # type: str self.results = results @@ -3722,7 +3652,7 @@ class KeyPhraseLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -3745,7 +3675,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.KeyPhraseTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'KeyPhraseExtraction' # type: str + self.kind = "KeyPhraseExtraction" # type: str self.parameters = parameters @@ -3767,9 +3697,9 @@ class KeyPhraseResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -3822,9 +3752,9 @@ class KeyPhrasesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'key_phrases': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "key_phrases": {"required": True}, } _attribute_map = { @@ -3877,9 +3807,9 @@ class KeyPhraseResultDocumentsItem(KeyPhrasesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'key_phrases': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "key_phrases": {"required": True}, } _attribute_map = { @@ -3927,13 +3857,7 @@ class KeyPhraseTaskParameters(PreBuiltTaskParameters): "model_version": {"key": "modelVersion", "type": "str"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - model_version: str = "latest", - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, model_version: str = "latest", **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -3957,8 +3881,8 @@ class KeyPhraseTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3966,18 +3890,13 @@ class KeyPhraseTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "KeyPhraseResult"}, } - def __init__( - self, - *, - results: "_models.KeyPhraseResult", - **kwargs - ): + def __init__(self, *, results: "_models.KeyPhraseResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.KeyPhraseResult """ super().__init__(**kwargs) - self.kind = 'KeyPhraseExtractionResults' # type: str + self.kind = "KeyPhraseExtractionResults" # type: str self.results = results @@ -3992,12 +3911,7 @@ class LanguageDetectionAnalysisInput(_serialization.Model): "documents": {"key": "documents", "type": "[LanguageInput]"}, } - def __init__( - self, - *, - documents: Optional[List["_models.LanguageInput"]] = None, - **kwargs - ): + def __init__(self, *, documents: Optional[List["_models.LanguageInput"]] = None, **kwargs): """ :keyword documents: :paramtype documents: list[~azure.ai.textanalytics.v2022_05_01.models.LanguageInput] @@ -4023,9 +3937,9 @@ class LanguageDetectionDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'detected_language': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "detected_language": {"required": True}, } _attribute_map = { @@ -4077,9 +3991,9 @@ class LanguageDetectionResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -4128,13 +4042,7 @@ class LanguageDetectionTaskParameters(PreBuiltTaskParameters): "model_version": {"key": "modelVersion", "type": "str"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - model_version: str = "latest", - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, model_version: str = "latest", **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -4158,8 +4066,8 @@ class LanguageDetectionTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -4167,18 +4075,13 @@ class LanguageDetectionTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "LanguageDetectionResult"}, } - def __init__( - self, - *, - results: "_models.LanguageDetectionResult", - **kwargs - ): + def __init__(self, *, results: "_models.LanguageDetectionResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.LanguageDetectionResult """ super().__init__(**kwargs) - self.kind = 'LanguageDetectionResults' # type: str + self.kind = "LanguageDetectionResults" # type: str self.results = results @@ -4196,8 +4099,8 @@ class LanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -4207,12 +4110,7 @@ class LanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - country_hint: Optional[str] = None, - **kwargs + self, *, id: str, text: str, country_hint: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: Unique, non-empty document identifier. Required. @@ -4250,11 +4148,11 @@ class LinkedEntity(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'matches': {'required': True}, - 'language': {'required': True}, - 'url': {'required': True}, - 'data_source': {'required': True}, + "name": {"required": True}, + "matches": {"required": True}, + "language": {"required": True}, + "url": {"required": True}, + "data_source": {"required": True}, } _attribute_map = { @@ -4323,10 +4221,10 @@ class Match(_serialization.Model): """ _validation = { - 'confidence_score': {'required': True}, - 'text': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "confidence_score": {"required": True}, + "text": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -4336,15 +4234,7 @@ class Match(_serialization.Model): "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - confidence_score: float, - text: str, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, confidence_score: float, text: str, offset: int, length: int, **kwargs): """ :keyword confidence_score: If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. Required. @@ -4374,12 +4264,7 @@ class MultiLanguageAnalysisInput(_serialization.Model): "documents": {"key": "documents", "type": "[MultiLanguageInput]"}, } - def __init__( - self, - *, - documents: Optional[List["_models.MultiLanguageInput"]] = None, - **kwargs - ): + def __init__(self, *, documents: Optional[List["_models.MultiLanguageInput"]] = None, **kwargs): """ :keyword documents: :paramtype documents: list[~azure.ai.textanalytics.v2022_05_01.models.MultiLanguageInput] @@ -4404,8 +4289,8 @@ class MultiLanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -4415,12 +4300,7 @@ class MultiLanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - language: Optional[str] = None, - **kwargs + self, *, id: str, text: str, language: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: A unique, non-empty document identifier. Required. @@ -4449,12 +4329,7 @@ class Pagination(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, next_link: Optional[str] = None, **kwargs): """ :keyword next_link: :paramtype next_link: str @@ -4482,10 +4357,10 @@ class PiiEntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "redacted_text": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -4547,10 +4422,10 @@ class PiiEntityRecognitionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -4582,7 +4457,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.PiiResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'PiiEntityRecognitionLROResults' # type: str + self.kind = "PiiEntityRecognitionLROResults" # type: str self.results = results @@ -4603,7 +4478,7 @@ class PiiLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -4613,11 +4488,7 @@ class PiiLROTask(AnalyzeTextLROTask): } def __init__( - self, - *, - task_name: Optional[str] = None, - parameters: Optional["_models.PiiTaskParameters"] = None, - **kwargs + self, *, task_name: Optional[str] = None, parameters: Optional["_models.PiiTaskParameters"] = None, **kwargs ): """ :keyword task_name: @@ -4626,7 +4497,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2022_05_01.models.PiiTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'PiiEntityRecognition' # type: str + self.kind = "PiiEntityRecognition" # type: str self.parameters = parameters @@ -4647,9 +4518,9 @@ class PiiResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -4702,10 +4573,10 @@ class PiiResultDocumentsItem(PiiEntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "redacted_text": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -4739,7 +4610,9 @@ def __init__( :keyword entities: Recognized entities in the document. Required. :paramtype entities: list[~azure.ai.textanalytics.v2022_05_01.models.Entity] """ - super().__init__(id=id, warnings=warnings, statistics=statistics, redacted_text=redacted_text, entities=entities, **kwargs) + super().__init__( + id=id, warnings=warnings, statistics=statistics, redacted_text=redacted_text, entities=entities, **kwargs + ) class PiiTaskParameters(PreBuiltTaskParameters): @@ -4763,7 +4636,7 @@ class PiiTaskParameters(PreBuiltTaskParameters): """ _validation = { - 'pii_categories': {'unique': True}, + "pii_categories": {"unique": True}, } _attribute_map = { @@ -4821,8 +4694,8 @@ class PiiTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -4830,18 +4703,13 @@ class PiiTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "PiiResult"}, } - def __init__( - self, - *, - results: "_models.PiiResult", - **kwargs - ): + def __init__(self, *, results: "_models.PiiResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.PiiResult """ super().__init__(**kwargs) - self.kind = 'PiiEntityRecognitionResults' # type: str + self.kind = "PiiEntityRecognitionResults" # type: str self.results = results @@ -4863,10 +4731,10 @@ class RequestStatistics(_serialization.Model): """ _validation = { - 'documents_count': {'required': True}, - 'valid_documents_count': {'required': True}, - 'erroneous_documents_count': {'required': True}, - 'transactions_count': {'required': True}, + "documents_count": {"required": True}, + "valid_documents_count": {"required": True}, + "erroneous_documents_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -4926,12 +4794,12 @@ class SentenceAssessment(_serialization.Model): """ _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'is_negated': {'required': True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "text": {"required": True}, + "is_negated": {"required": True}, } _attribute_map = { @@ -5004,11 +4872,11 @@ class SentenceSentiment(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "text": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -5086,12 +4954,12 @@ class SentenceTarget(_serialization.Model): """ _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'relations': {'required': True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "text": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -5158,7 +5026,7 @@ class SentimentAnalysisLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -5182,7 +5050,7 @@ def __init__( ~azure.ai.textanalytics.v2022_05_01.models.SentimentAnalysisTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'SentimentAnalysis' # type: str + self.kind = "SentimentAnalysis" # type: str self.parameters = parameters @@ -5250,9 +5118,9 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'neutral': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "neutral": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -5261,14 +5129,7 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - neutral: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, neutral: float, negative: float, **kwargs): """ :keyword positive: Confidence score for positive sentiment. Required. :paramtype positive: float @@ -5307,11 +5168,11 @@ class SentimentDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "sentences": {"required": True}, } _attribute_map = { @@ -5381,10 +5242,10 @@ class SentimentLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -5416,7 +5277,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.SentimentResponse """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'SentimentAnalysisLROResults' # type: str + self.kind = "SentimentAnalysisLROResults" # type: str self.results = results @@ -5438,9 +5299,9 @@ class SentimentResponse(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -5499,11 +5360,11 @@ class SentimentResponseDocumentsItem(SentimentDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "sentences": {"required": True}, } _attribute_map = { @@ -5544,7 +5405,15 @@ def __init__( :keyword sentences: Sentence level sentiment analysis. Required. :paramtype sentences: list[~azure.ai.textanalytics.v2022_05_01.models.SentenceSentiment] """ - super().__init__(id=id, warnings=warnings, statistics=statistics, sentiment=sentiment, confidence_scores=confidence_scores, sentences=sentences, **kwargs) + super().__init__( + id=id, + warnings=warnings, + statistics=statistics, + sentiment=sentiment, + confidence_scores=confidence_scores, + sentences=sentences, + **kwargs + ) class SentimentTaskResult(AnalyzeTextTaskResult): @@ -5561,8 +5430,8 @@ class SentimentTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -5570,18 +5439,13 @@ class SentimentTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "SentimentResponse"}, } - def __init__( - self, - *, - results: "_models.SentimentResponse", - **kwargs - ): + def __init__(self, *, results: "_models.SentimentResponse", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2022_05_01.models.SentimentResponse """ super().__init__(**kwargs) - self.kind = 'SentimentAnalysisResults' # type: str + self.kind = "SentimentAnalysisResults" # type: str self.results = results @@ -5597,8 +5461,8 @@ class TargetConfidenceScoreLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -5606,13 +5470,7 @@ class TargetConfidenceScoreLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, negative: float, **kwargs): """ :keyword positive: Confidence score for positive sentiment. Required. :paramtype positive: float @@ -5637,8 +5495,8 @@ class TargetRelation(_serialization.Model): """ _validation = { - 'relation_type': {'required': True}, - 'ref': {'required': True}, + "relation_type": {"required": True}, + "ref": {"required": True}, } _attribute_map = { @@ -5646,13 +5504,7 @@ class TargetRelation(_serialization.Model): "ref": {"key": "ref", "type": "str"}, } - def __init__( - self, - *, - relation_type: Union[str, "_models.TargetRelationType"], - ref: str, - **kwargs - ): + def __init__(self, *, relation_type: Union[str, "_models.TargetRelationType"], ref: str, **kwargs): """ :keyword relation_type: The type related to the target. Required. Known values are: "assessment" and "target". @@ -5683,10 +5535,10 @@ class TasksStateTasks(_serialization.Model): """ _validation = { - 'completed': {'required': True}, - 'failed': {'required': True}, - 'in_progress': {'required': True}, - 'total': {'required': True}, + "completed": {"required": True}, + "failed": {"required": True}, + "in_progress": {"required": True}, + "total": {"required": True}, } _attribute_map = { diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py index bb1521294811..9a0d3956eff2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/models/_text_analytics_client_enums.py @@ -11,8 +11,7 @@ class AnalyzeTextLROResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported Text Analysis long-running operation task results. - """ + """Enumeration of supported Text Analysis long-running operation task results.""" SENTIMENT_ANALYSIS_LRO_RESULTS = "SentimentAnalysisLROResults" ENTITY_RECOGNITION_LRO_RESULTS = "EntityRecognitionLROResults" @@ -24,9 +23,9 @@ class AnalyzeTextLROResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): CUSTOM_SINGLE_LABEL_CLASSIFICATION_LRO_RESULTS = "CustomSingleLabelClassificationLROResults" CUSTOM_MULTI_LABEL_CLASSIFICATION_LRO_RESULTS = "CustomMultiLabelClassificationLROResults" + class AnalyzeTextLROTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported long-running Text Analysis tasks. - """ + """Enumeration of supported long-running Text Analysis tasks.""" SENTIMENT_ANALYSIS = "SentimentAnalysis" ENTITY_RECOGNITION = "EntityRecognition" @@ -38,9 +37,9 @@ class AnalyzeTextLROTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): CUSTOM_SINGLE_LABEL_CLASSIFICATION = "CustomSingleLabelClassification" CUSTOM_MULTI_LABEL_CLASSIFICATION = "CustomMultiLabelClassification" + class AnalyzeTextTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported Text Analysis tasks. - """ + """Enumeration of supported Text Analysis tasks.""" SENTIMENT_ANALYSIS = "SentimentAnalysis" ENTITY_RECOGNITION = "EntityRecognition" @@ -49,9 +48,9 @@ class AnalyzeTextTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): LANGUAGE_DETECTION = "LanguageDetection" ENTITY_LINKING = "EntityLinking" + class AnalyzeTextTaskResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported Text Analysis task results. - """ + """Enumeration of supported Text Analysis task results.""" SENTIMENT_ANALYSIS_RESULTS = "SentimentAnalysisResults" ENTITY_RECOGNITION_RESULTS = "EntityRecognitionResults" @@ -60,25 +59,25 @@ class AnalyzeTextTaskResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): LANGUAGE_DETECTION_RESULTS = "LanguageDetectionResults" ENTITY_LINKING_RESULTS = "EntityLinkingResults" + class DocumentSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - """ + """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" MIXED = "mixed" + class EntityAssociation(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes if the entity is the subject of the text or if it describes someone else. - """ + """Describes if the entity is the subject of the text or if it describes someone else.""" SUBJECT = "subject" OTHER = "other" + class EntityCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes the entities certainty and polarity. - """ + """Describes the entities certainty and polarity.""" POSITIVE = "positive" POSITIVE_POSSIBLE = "positivePossible" @@ -86,16 +85,16 @@ class EntityCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): NEGATIVE_POSSIBLE = "negativePossible" NEGATIVE = "negative" + class EntityConditionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes any conditionality on the entity. - """ + """Describes any conditionality on the entity.""" HYPOTHETICAL = "hypothetical" CONDITIONAL = "conditional" + class ErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Human-readable error code. - """ + """Human-readable error code.""" INVALID_REQUEST = "InvalidRequest" INVALID_ARGUMENT = "InvalidArgument" @@ -116,9 +115,9 @@ class ErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): CONFLICT = "Conflict" WARNING = "Warning" + class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Healthcare Entity Category. - """ + """Healthcare Entity Category.""" BODY_STRUCTURE = "BodyStructure" AGE = "Age" @@ -147,9 +146,9 @@ class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): FAMILY_RELATION = "FamilyRelation" TREATMENT_NAME = "TreatmentName" + class HealthcareEntityRelation(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. - """ + """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc.""" ABBREVIATION = "Abbreviation" DIRECTION_OF_BODY_STRUCTURE = "DirectionOfBodyStructure" @@ -173,9 +172,9 @@ class HealthcareEntityRelation(str, Enum, metaclass=CaseInsensitiveEnumMeta): VALUE_OF_CONDITION = "ValueOfCondition" VALUE_OF_EXAMINATION = "ValueOfExamination" + class InnerErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Human-readable error code. - """ + """Human-readable error code.""" INVALID_REQUEST = "InvalidRequest" INVALID_PARAMETER_VALUE = "InvalidParameterValue" @@ -192,18 +191,18 @@ class InnerErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" INVALID_COUNTRY_HINT = "InvalidCountryHint" + class PiiDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The PII domain used for PII Entity Recognition. - """ + """The PII domain used for PII Entity Recognition.""" #: Indicates that entities in the Personal Health Information domain should be redacted. PHI = "phi" #: Indicates that no domain is specified. NONE = "none" + class PiiEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PiiEntityCategory. - """ + """PiiEntityCategory.""" ABA_ROUTING_NUMBER = "ABARoutingNumber" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" @@ -379,17 +378,17 @@ class PiiEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): ALL = "All" DEFAULT = "Default" + class SentenceSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The predicted Sentiment for the sentence. - """ + """The predicted Sentiment for the sentence.""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" + class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State. - """ + """State.""" NOT_STARTED = "notStarted" RUNNING = "running" @@ -399,6 +398,7 @@ class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): CANCELLED = "cancelled" CANCELLING = "cancelling" + class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see @@ -416,24 +416,24 @@ class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: application is written in a language that support Unicode, for example Java, JavaScript. UTF16_CODE_UNIT = "Utf16CodeUnit" + class TargetRelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type related to the target. - """ + """The type related to the target.""" ASSESSMENT = "assessment" TARGET = "target" + class TokenSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Targeted sentiment in the sentence. - """ + """Targeted sentiment in the sentence.""" POSITIVE = "positive" MIXED = "mixed" NEGATIVE = "negative" + class WarningCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" DOCUMENT_TRUNCATED = "DocumentTruncated" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py index b74e50c8efaa..6e7893c3333f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Optional, Union, TypeVar, Callable, Dict, cast from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict @@ -13,10 +14,13 @@ from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest -from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin +from ._text_analytics_client_operations import ( + TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin, +) from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod from .. import models as _models -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -24,9 +28,7 @@ class TextAnalyticsClientOperationsMixin(GeneratedTextAnalyticsClientOperationsM @distributed_trace def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -54,45 +56,39 @@ def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, AnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod + polling_method = cast( + PollingMethod, + AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: PollingMethod elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -102,14 +98,17 @@ def get_long_running_output(pipeline_response): polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return poller_cls(self._client, raw_result, get_long_running_output, polling_method) # Handwritten - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore + +__all__: List[str] = [ + "TextAnalyticsClientOperationsMixin" +] # Add all objects you want publicly available to users at this package level -__all__: List[str] = ["TextAnalyticsClientOperationsMixin"] # Add all objects you want publicly available to users at this package level def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py index ed25040f6bc3..7465dea60f56 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2022_05_01/operations/_text_analytics_client_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod @@ -21,74 +27,58 @@ from .. import models as _models from ..._serialization import Serializer from .._vendor import MixinABC, _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_analyze_text_request( - *, - show_stats: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: + +def build_analyze_text_request(*, show_stats: Optional[bool] = None, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/:analyze-text") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_analyze_text_submit_job_request( - **kwargs: Any -) -> HttpRequest: +def build_analyze_text_submit_job_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/analyze-text/jobs") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_analyze_text_job_status_request( @@ -102,69 +92,55 @@ def build_analyze_text_job_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/analyze-text/jobs/{jobId}") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if top is not None: - _params['top'] = _SERIALIZER.query("top", top, 'int') + _params["top"] = _SERIALIZER.query("top", top, "int") if skip is not None: - _params['skip'] = _SERIALIZER.query("skip", skip, 'int') + _params["skip"] = _SERIALIZER.query("skip", skip, "int") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_analyze_text_cancel_job_request( - job_id: str, - **kwargs: Any -) -> HttpRequest: +def build_analyze_text_cancel_job_request(job_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/analyze-text/jobs/{jobId}:cancel") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class TextAnalyticsClientOperationsMixin(MixinABC): @@ -198,12 +174,7 @@ def analyze_text( @overload def analyze_text( - self, - body: IO, - show_stats: Optional[bool] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, show_stats: Optional[bool] = None, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -224,13 +195,9 @@ def analyze_text( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace def analyze_text( - self, - body: Union[_models.AnalyzeTextTask, IO], - show_stats: Optional[bool] = None, - **kwargs: Any + self, body: Union[_models.AnalyzeTextTask, IO], show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -251,17 +218,15 @@ def analyze_text( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextTaskResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextTaskResult] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextTaskResult] content_type = content_type or "application/json" _json = None @@ -269,7 +234,7 @@ def analyze_text( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextTask') + _json = self._serialize.body(body, "AnalyzeTextTask") request = build_analyze_text_request( show_stats=show_stats, @@ -277,20 +242,18 @@ def analyze_text( content_type=content_type, json=_json, content=_content, - template_url=self.analyze_text.metadata['url'], + template_url=self.analyze_text.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -300,32 +263,27 @@ def analyze_text( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextTaskResult', pipeline_response) + deserialized = self._deserialize("AnalyzeTextTaskResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text.metadata = {'url': "/:analyze-text"} # type: ignore - + analyze_text.metadata = {"url": "/:analyze-text"} # type: ignore def _analyze_text_submit_job_initial( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> Optional[_models.AnalyzeTextJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] content_type = content_type or "application/json" _json = None @@ -333,27 +291,25 @@ def _analyze_text_submit_job_initial( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextJobsInput') + _json = self._serialize.body(body, "AnalyzeTextJobsInput") request = build_analyze_text_submit_job_request( api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._analyze_text_submit_job_initial.metadata['url'], + template_url=self._analyze_text_submit_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -366,27 +322,23 @@ def _analyze_text_submit_job_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _analyze_text_submit_job_initial.metadata = {'url': "/analyze-text/jobs"} # type: ignore - + _analyze_text_submit_job_initial.metadata = {"url": "/analyze-text/jobs"} # type: ignore @overload def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -415,11 +367,7 @@ def begin_analyze_text_submit_job( @overload def begin_analyze_text_submit_job( - self, - body: IO, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -446,12 +394,9 @@ def begin_analyze_text_submit_job( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace def begin_analyze_text_submit_job( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -481,57 +426,53 @@ def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, AnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, + AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return AnalyzeActionsLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore @distributed_trace def analyze_text_job_status( @@ -564,38 +505,33 @@ def analyze_text_job_status( :rtype: ~azure.ai.textanalytics.v2022_05_01.models.AnalyzeTextJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] - request = build_analyze_text_job_status_request( job_id=job_id, show_stats=show_stats, top=top, skip=skip, api_version=api_version, - template_url=self.analyze_text_job_status.metadata['url'], + template_url=self.analyze_text_job_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -605,50 +541,42 @@ def analyze_text_job_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text_job_status.metadata = {'url': "/analyze-text/jobs/{jobId}"} # type: ignore - + analyze_text_job_status.metadata = {"url": "/analyze-text/jobs/{jobId}"} # type: ignore def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-return-statements - self, - job_id: str, - **kwargs: Any + self, job_id: str, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_analyze_text_cancel_job_request( job_id=job_id, api_version=api_version, - template_url=self._analyze_text_cancel_job_initial.metadata['url'], + template_url=self._analyze_text_cancel_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -659,21 +587,15 @@ def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-return-sta raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_text_cancel_job_initial.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore - + _analyze_text_cancel_job_initial.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore @distributed_trace - def begin_analyze_text_cancel_job( - self, - job_id: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_analyze_text_cancel_job(self, job_id: str, **kwargs: Any) -> LROPoller[None]: """Cancel a long-running Text Analysis job. Cancel a long-running Text Analysis job. @@ -695,50 +617,45 @@ def begin_analyze_text_cancel_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2022-05-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_text_cancel_job_initial( # type: ignore job_id=job_id, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_cancel_job.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore + begin_analyze_text_cancel_job.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_configuration.py index d4b5e70d1ae5..64843d43c44d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -33,14 +34,9 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :paramtype api_version: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2023-04-01") # type: str + api_version = kwargs.pop("api_version", "2023-04-01") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,23 +46,24 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_text_analytics_client.py index 8491d9c9bbcb..d9d51e03b64c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze @@ -40,13 +41,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/language' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/language" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -55,12 +51,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -80,7 +71,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_vendor.py index 0eb3a4e5d74e..efe7c9bd01b4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/_vendor.py @@ -18,6 +18,7 @@ from .._serialization import Deserializer, Serializer + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,6 +26,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -32,13 +34,13 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_configuration.py index 208e475ac7b6..5debc21f48f6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -33,14 +34,9 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :paramtype api_version: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2023-04-01") # type: str + api_version = kwargs.pop("api_version", "2023-04-01") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -50,22 +46,21 @@ def __init__( self.credential = credential self.endpoint = endpoint self.api_version = api_version - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_text_analytics_client.py index 6c69d553a7b5..4a5db105e637 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze @@ -40,13 +41,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/language' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/language" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -55,12 +51,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -80,7 +71,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_vendor.py index 99dd8eda3b62..31647c5f04bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_patch.py index 821cc54cd078..5a0b9fb014e4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast, List from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod @@ -15,10 +16,13 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict -from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin +from ._text_analytics_client_operations import ( + TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin, +) from ... import models as _models -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,9 +30,7 @@ class TextAnalyticsClientOperationsMixin(GeneratedTextAnalyticsClientOperationsM @distributed_trace_async async def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -56,44 +58,39 @@ async def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncAnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod + polling_method = cast( + AsyncPollingMethod, + AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: @@ -103,14 +100,17 @@ def get_long_running_output(pipeline_response): polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return poller_cls(self._client, raw_result, get_long_running_output, polling_method) # Handwritten - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore + +__all__: List[str] = [ + "TextAnalyticsClientOperationsMixin" +] # Add all objects you want publicly available to users at this package level -__all__: List[str] = ["TextAnalyticsClientOperationsMixin"] # Add all objects you want publicly available to users at this package level def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_text_analytics_client_operations.py index d5c3c7a5c214..d8b4dee62986 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/aio/operations/_text_analytics_client_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -20,11 +26,18 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._text_analytics_client_operations import build_analyze_text_cancel_job_request, build_analyze_text_job_status_request, build_analyze_text_request, build_analyze_text_submit_job_request +from ...operations._text_analytics_client_operations import ( + build_analyze_text_cancel_job_request, + build_analyze_text_job_status_request, + build_analyze_text_request, + build_analyze_text_submit_job_request, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class TextAnalyticsClientOperationsMixin(MixinABC): @overload @@ -57,12 +70,7 @@ async def analyze_text( @overload async def analyze_text( - self, - body: IO, - show_stats: Optional[bool] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, show_stats: Optional[bool] = None, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -83,13 +91,9 @@ async def analyze_text( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace_async async def analyze_text( - self, - body: Union[_models.AnalyzeTextTask, IO], - show_stats: Optional[bool] = None, - **kwargs: Any + self, body: Union[_models.AnalyzeTextTask, IO], show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -110,17 +114,15 @@ async def analyze_text( :rtype: ~azure.ai.textanalytics.v2023_04_01.models.AnalyzeTextTaskResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextTaskResult] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextTaskResult] content_type = content_type or "application/json" _json = None @@ -128,7 +130,7 @@ async def analyze_text( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextTask') + _json = self._serialize.body(body, "AnalyzeTextTask") request = build_analyze_text_request( show_stats=show_stats, @@ -136,20 +138,18 @@ async def analyze_text( content_type=content_type, json=_json, content=_content, - template_url=self.analyze_text.metadata['url'], + template_url=self.analyze_text.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -159,32 +159,27 @@ async def analyze_text( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextTaskResult', pipeline_response) + deserialized = self._deserialize("AnalyzeTextTaskResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text.metadata = {'url': "/:analyze-text"} # type: ignore - + analyze_text.metadata = {"url": "/:analyze-text"} # type: ignore async def _analyze_text_submit_job_initial( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> Optional[_models.AnalyzeTextJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] content_type = content_type or "application/json" _json = None @@ -192,27 +187,25 @@ async def _analyze_text_submit_job_initial( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextJobsInput') + _json = self._serialize.body(body, "AnalyzeTextJobsInput") request = build_analyze_text_submit_job_request( api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._analyze_text_submit_job_initial.metadata['url'], + template_url=self._analyze_text_submit_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -225,27 +218,23 @@ async def _analyze_text_submit_job_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _analyze_text_submit_job_initial.metadata = {'url': "/analyze-text/jobs"} # type: ignore - + _analyze_text_submit_job_initial.metadata = {"url": "/analyze-text/jobs"} # type: ignore @overload async def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -274,11 +263,7 @@ async def begin_analyze_text_submit_job( @overload async def begin_analyze_text_submit_job( - self, - body: IO, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -305,12 +290,9 @@ async def begin_analyze_text_submit_job( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace_async async def begin_analyze_text_submit_job( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -340,57 +322,53 @@ async def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncAnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncAnalyzeActionsLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncAnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore @distributed_trace_async async def analyze_text_job_status( @@ -423,38 +401,33 @@ async def analyze_text_job_status( :rtype: ~azure.ai.textanalytics.v2023_04_01.models.AnalyzeTextJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] - request = build_analyze_text_job_status_request( job_id=job_id, show_stats=show_stats, top=top, skip=skip, api_version=api_version, - template_url=self.analyze_text_job_status.metadata['url'], + template_url=self.analyze_text_job_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -464,50 +437,42 @@ async def analyze_text_job_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text_job_status.metadata = {'url': "/analyze-text/jobs/{jobId}"} # type: ignore - + analyze_text_job_status.metadata = {"url": "/analyze-text/jobs/{jobId}"} # type: ignore async def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-return-statements - self, - job_id: str, - **kwargs: Any + self, job_id: str, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_analyze_text_cancel_job_request( job_id=job_id, api_version=api_version, - template_url=self._analyze_text_cancel_job_initial.metadata['url'], + template_url=self._analyze_text_cancel_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -518,21 +483,15 @@ async def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-retu raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_text_cancel_job_initial.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore - + _analyze_text_cancel_job_initial.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore @distributed_trace_async - async def begin_analyze_text_cancel_job( - self, - job_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_analyze_text_cancel_job(self, job_id: str, **kwargs: Any) -> AsyncLROPoller[None]: """Cancel a long-running Text Analysis job. Cancel a long-running Text Analysis job. @@ -554,50 +513,46 @@ async def begin_analyze_text_cancel_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_text_cancel_job_initial( # type: ignore job_id=job_id, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_cancel_job.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore + begin_analyze_text_cancel_job.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/__init__.py index f171f78f6cb6..716970717a88 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/__init__.py @@ -159,155 +159,156 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AbstractiveSummarizationLROResult', - 'AbstractiveSummarizationLROTask', - 'AbstractiveSummarizationResult', - 'AbstractiveSummarizationResultBase', - 'AbstractiveSummarizationTaskParameters', - 'AbstractiveSummarizationTaskParametersBase', - 'AbstractiveSummary', - 'AbstractiveSummaryDocumentResult', - 'AnalyzeTextEntityLinkingInput', - 'AnalyzeTextEntityRecognitionInput', - 'AnalyzeTextJobState', - 'AnalyzeTextJobStatistics', - 'AnalyzeTextJobsInput', - 'AnalyzeTextKeyPhraseExtractionInput', - 'AnalyzeTextLROResult', - 'AnalyzeTextLROTask', - 'AnalyzeTextLanguageDetectionInput', - 'AnalyzeTextPiiEntitiesRecognitionInput', - 'AnalyzeTextSentimentAnalysisInput', - 'AnalyzeTextTask', - 'AnalyzeTextTaskResult', - 'ClassificationDocumentResult', - 'ClassificationResult', - 'CustomEntitiesLROTask', - 'CustomEntitiesResult', - 'CustomEntitiesResultDocumentsItem', - 'CustomEntitiesTaskParameters', - 'CustomEntityRecognitionLROResult', - 'CustomLabelClassificationResult', - 'CustomLabelClassificationResultDocumentsItem', - 'CustomMultiLabelClassificationLROResult', - 'CustomMultiLabelClassificationLROTask', - 'CustomMultiLabelClassificationTaskParameters', - 'CustomResult', - 'CustomSingleLabelClassificationLROResult', - 'CustomSingleLabelClassificationLROTask', - 'CustomSingleLabelClassificationTaskParameters', - 'CustomTaskParameters', - 'DetectedLanguage', - 'DocumentError', - 'DocumentResult', - 'DocumentStatistics', - 'DocumentWarning', - 'EntitiesDocumentResult', - 'EntitiesLROTask', - 'EntitiesResult', - 'EntitiesResultDocumentsItem', - 'EntitiesTaskParameters', - 'EntitiesTaskResult', - 'Entity', - 'EntityLinkingLROResult', - 'EntityLinkingLROTask', - 'EntityLinkingResult', - 'EntityLinkingResultDocumentsItem', - 'EntityLinkingTaskParameters', - 'EntityLinkingTaskResult', - 'EntityRecognitionLROResult', - 'Error', - 'ErrorResponse', - 'ExtractedSummaryDocumentResult', - 'ExtractedSummarySentence', - 'ExtractiveSummarizationLROResult', - 'ExtractiveSummarizationLROTask', - 'ExtractiveSummarizationResult', - 'ExtractiveSummarizationTaskParameters', - 'HealthcareAssertion', - 'HealthcareEntitiesDocumentResult', - 'HealthcareEntity', - 'HealthcareEntityLink', - 'HealthcareLROResult', - 'HealthcareLROTask', - 'HealthcareRelation', - 'HealthcareRelationEntity', - 'HealthcareResult', - 'HealthcareResultDocumentsItem', - 'HealthcareTaskParameters', - 'InnerErrorModel', - 'JobErrors', - 'JobState', - 'KeyPhraseExtractionLROResult', - 'KeyPhraseLROTask', - 'KeyPhraseResult', - 'KeyPhraseResultDocumentsItem', - 'KeyPhraseTaskParameters', - 'KeyPhraseTaskResult', - 'KeyPhrasesDocumentResult', - 'LanguageDetectionAnalysisInput', - 'LanguageDetectionDocumentResult', - 'LanguageDetectionResult', - 'LanguageDetectionTaskParameters', - 'LanguageDetectionTaskResult', - 'LanguageInput', - 'LinkedEntitiesDocumentResult', - 'LinkedEntity', - 'Match', - 'MultiLanguageAnalysisInput', - 'MultiLanguageInput', - 'Pagination', - 'PiiEntitiesDocumentResult', - 'PiiEntityRecognitionLROResult', - 'PiiLROTask', - 'PiiResult', - 'PiiResultDocumentsItem', - 'PiiTaskParameters', - 'PiiTaskResult', - 'PreBuiltResult', - 'PreBuiltTaskParameters', - 'RequestStatistics', - 'SentenceAssessment', - 'SentenceSentiment', - 'SentenceTarget', - 'SentimentAnalysisLROTask', - 'SentimentAnalysisTaskParameters', - 'SentimentConfidenceScorePerLabel', - 'SentimentDocumentResult', - 'SentimentLROResult', - 'SentimentResponse', - 'SentimentResponseDocumentsItem', - 'SentimentTaskResult', - 'SummaryContext', - 'TargetConfidenceScoreLabel', - 'TargetRelation', - 'TaskIdentifier', - 'TaskParameters', - 'TaskState', - 'TasksState', - 'TasksStateTasks', - 'AnalyzeTextLROResultsKind', - 'AnalyzeTextLROTaskKind', - 'AnalyzeTextTaskKind', - 'AnalyzeTextTaskResultsKind', - 'DocumentSentimentValue', - 'EntityAssociation', - 'EntityCertainty', - 'EntityConditionality', - 'ErrorCode', - 'ExtractiveSummarizationSortingCriteria', - 'HealthcareEntityCategory', - 'HealthcareEntityRelation', - 'InnerErrorCode', - 'PiiDomain', - 'PiiEntityCategory', - 'SentenceSentimentValue', - 'State', - 'StringIndexType', - 'TargetRelationType', - 'TokenSentimentValue', - 'WarningCodeValue', + "AbstractiveSummarizationLROResult", + "AbstractiveSummarizationLROTask", + "AbstractiveSummarizationResult", + "AbstractiveSummarizationResultBase", + "AbstractiveSummarizationTaskParameters", + "AbstractiveSummarizationTaskParametersBase", + "AbstractiveSummary", + "AbstractiveSummaryDocumentResult", + "AnalyzeTextEntityLinkingInput", + "AnalyzeTextEntityRecognitionInput", + "AnalyzeTextJobState", + "AnalyzeTextJobStatistics", + "AnalyzeTextJobsInput", + "AnalyzeTextKeyPhraseExtractionInput", + "AnalyzeTextLROResult", + "AnalyzeTextLROTask", + "AnalyzeTextLanguageDetectionInput", + "AnalyzeTextPiiEntitiesRecognitionInput", + "AnalyzeTextSentimentAnalysisInput", + "AnalyzeTextTask", + "AnalyzeTextTaskResult", + "ClassificationDocumentResult", + "ClassificationResult", + "CustomEntitiesLROTask", + "CustomEntitiesResult", + "CustomEntitiesResultDocumentsItem", + "CustomEntitiesTaskParameters", + "CustomEntityRecognitionLROResult", + "CustomLabelClassificationResult", + "CustomLabelClassificationResultDocumentsItem", + "CustomMultiLabelClassificationLROResult", + "CustomMultiLabelClassificationLROTask", + "CustomMultiLabelClassificationTaskParameters", + "CustomResult", + "CustomSingleLabelClassificationLROResult", + "CustomSingleLabelClassificationLROTask", + "CustomSingleLabelClassificationTaskParameters", + "CustomTaskParameters", + "DetectedLanguage", + "DocumentError", + "DocumentResult", + "DocumentStatistics", + "DocumentWarning", + "EntitiesDocumentResult", + "EntitiesLROTask", + "EntitiesResult", + "EntitiesResultDocumentsItem", + "EntitiesTaskParameters", + "EntitiesTaskResult", + "Entity", + "EntityLinkingLROResult", + "EntityLinkingLROTask", + "EntityLinkingResult", + "EntityLinkingResultDocumentsItem", + "EntityLinkingTaskParameters", + "EntityLinkingTaskResult", + "EntityRecognitionLROResult", + "Error", + "ErrorResponse", + "ExtractedSummaryDocumentResult", + "ExtractedSummarySentence", + "ExtractiveSummarizationLROResult", + "ExtractiveSummarizationLROTask", + "ExtractiveSummarizationResult", + "ExtractiveSummarizationTaskParameters", + "HealthcareAssertion", + "HealthcareEntitiesDocumentResult", + "HealthcareEntity", + "HealthcareEntityLink", + "HealthcareLROResult", + "HealthcareLROTask", + "HealthcareRelation", + "HealthcareRelationEntity", + "HealthcareResult", + "HealthcareResultDocumentsItem", + "HealthcareTaskParameters", + "InnerErrorModel", + "JobErrors", + "JobState", + "KeyPhraseExtractionLROResult", + "KeyPhraseLROTask", + "KeyPhraseResult", + "KeyPhraseResultDocumentsItem", + "KeyPhraseTaskParameters", + "KeyPhraseTaskResult", + "KeyPhrasesDocumentResult", + "LanguageDetectionAnalysisInput", + "LanguageDetectionDocumentResult", + "LanguageDetectionResult", + "LanguageDetectionTaskParameters", + "LanguageDetectionTaskResult", + "LanguageInput", + "LinkedEntitiesDocumentResult", + "LinkedEntity", + "Match", + "MultiLanguageAnalysisInput", + "MultiLanguageInput", + "Pagination", + "PiiEntitiesDocumentResult", + "PiiEntityRecognitionLROResult", + "PiiLROTask", + "PiiResult", + "PiiResultDocumentsItem", + "PiiTaskParameters", + "PiiTaskResult", + "PreBuiltResult", + "PreBuiltTaskParameters", + "RequestStatistics", + "SentenceAssessment", + "SentenceSentiment", + "SentenceTarget", + "SentimentAnalysisLROTask", + "SentimentAnalysisTaskParameters", + "SentimentConfidenceScorePerLabel", + "SentimentDocumentResult", + "SentimentLROResult", + "SentimentResponse", + "SentimentResponseDocumentsItem", + "SentimentTaskResult", + "SummaryContext", + "TargetConfidenceScoreLabel", + "TargetRelation", + "TaskIdentifier", + "TaskParameters", + "TaskState", + "TasksState", + "TasksStateTasks", + "AnalyzeTextLROResultsKind", + "AnalyzeTextLROTaskKind", + "AnalyzeTextTaskKind", + "AnalyzeTextTaskResultsKind", + "DocumentSentimentValue", + "EntityAssociation", + "EntityCertainty", + "EntityConditionality", + "ErrorCode", + "ExtractiveSummarizationSortingCriteria", + "HealthcareEntityCategory", + "HealthcareEntityRelation", + "InnerErrorCode", + "PiiDomain", + "PiiEntityCategory", + "SentenceSentimentValue", + "State", + "StringIndexType", + "TargetRelationType", + "TokenSentimentValue", + "WarningCodeValue", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_models_py3.py index 16e9aa67a4bd..b9b826271f66 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_models_py3.py @@ -28,12 +28,7 @@ class TaskIdentifier(_serialization.Model): "task_name": {"key": "taskName", "type": "str"}, } - def __init__( - self, - *, - task_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, task_name: Optional[str] = None, **kwargs): """ :keyword task_name: :paramtype task_name: str @@ -55,8 +50,8 @@ class TaskState(_serialization.Model): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -64,13 +59,7 @@ class TaskState(_serialization.Model): "status": {"key": "status", "type": "str"}, } - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - status: Union[str, "_models.State"], - **kwargs - ): + def __init__(self, *, last_update_date_time: datetime.datetime, status: Union[str, "_models.State"], **kwargs): """ :keyword last_update_date_time: Required. :paramtype last_update_date_time: ~datetime.datetime @@ -112,9 +101,9 @@ class AnalyzeTextLROResult(TaskState, TaskIdentifier): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, } _attribute_map = { @@ -125,7 +114,19 @@ class AnalyzeTextLROResult(TaskState, TaskIdentifier): } _subtype_map = { - 'kind': {'AbstractiveSummarizationLROResults': 'AbstractiveSummarizationLROResult', 'CustomEntityRecognitionLROResults': 'CustomEntityRecognitionLROResult', 'CustomMultiLabelClassificationLROResults': 'CustomMultiLabelClassificationLROResult', 'CustomSingleLabelClassificationLROResults': 'CustomSingleLabelClassificationLROResult', 'EntityLinkingLROResults': 'EntityLinkingLROResult', 'EntityRecognitionLROResults': 'EntityRecognitionLROResult', 'ExtractiveSummarizationLROResults': 'ExtractiveSummarizationLROResult', 'HealthcareLROResults': 'HealthcareLROResult', 'KeyPhraseExtractionLROResults': 'KeyPhraseExtractionLROResult', 'PiiEntityRecognitionLROResults': 'PiiEntityRecognitionLROResult', 'SentimentAnalysisLROResults': 'SentimentLROResult'} + "kind": { + "AbstractiveSummarizationLROResults": "AbstractiveSummarizationLROResult", + "CustomEntityRecognitionLROResults": "CustomEntityRecognitionLROResult", + "CustomMultiLabelClassificationLROResults": "CustomMultiLabelClassificationLROResult", + "CustomSingleLabelClassificationLROResults": "CustomSingleLabelClassificationLROResult", + "EntityLinkingLROResults": "EntityLinkingLROResult", + "EntityRecognitionLROResults": "EntityRecognitionLROResult", + "ExtractiveSummarizationLROResults": "ExtractiveSummarizationLROResult", + "HealthcareLROResults": "HealthcareLROResult", + "KeyPhraseExtractionLROResults": "KeyPhraseExtractionLROResult", + "PiiEntityRecognitionLROResults": "PiiEntityRecognitionLROResult", + "SentimentAnalysisLROResults": "SentimentLROResult", + } } def __init__( @@ -177,10 +178,10 @@ class AbstractiveSummarizationLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -213,7 +214,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.AbstractiveSummarizationResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'AbstractiveSummarizationLROResults' # type: str + self.kind = "AbstractiveSummarizationLROResults" # type: str self.results = results @@ -239,7 +240,7 @@ class AnalyzeTextLROTask(TaskIdentifier): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -248,15 +249,22 @@ class AnalyzeTextLROTask(TaskIdentifier): } _subtype_map = { - 'kind': {'AbstractiveSummarization': 'AbstractiveSummarizationLROTask', 'CustomEntityRecognition': 'CustomEntitiesLROTask', 'CustomMultiLabelClassification': 'CustomMultiLabelClassificationLROTask', 'CustomSingleLabelClassification': 'CustomSingleLabelClassificationLROTask', 'EntityLinking': 'EntityLinkingLROTask', 'EntityRecognition': 'EntitiesLROTask', 'ExtractiveSummarization': 'ExtractiveSummarizationLROTask', 'Healthcare': 'HealthcareLROTask', 'KeyPhraseExtraction': 'KeyPhraseLROTask', 'PiiEntityRecognition': 'PiiLROTask', 'SentimentAnalysis': 'SentimentAnalysisLROTask'} - } - - def __init__( - self, - *, - task_name: Optional[str] = None, - **kwargs - ): + "kind": { + "AbstractiveSummarization": "AbstractiveSummarizationLROTask", + "CustomEntityRecognition": "CustomEntitiesLROTask", + "CustomMultiLabelClassification": "CustomMultiLabelClassificationLROTask", + "CustomSingleLabelClassification": "CustomSingleLabelClassificationLROTask", + "EntityLinking": "EntityLinkingLROTask", + "EntityRecognition": "EntitiesLROTask", + "ExtractiveSummarization": "ExtractiveSummarizationLROTask", + "Healthcare": "HealthcareLROTask", + "KeyPhraseExtraction": "KeyPhraseLROTask", + "PiiEntityRecognition": "PiiLROTask", + "SentimentAnalysis": "SentimentAnalysisLROTask", + } + } + + def __init__(self, *, task_name: Optional[str] = None, **kwargs): """ :keyword task_name: :paramtype task_name: str @@ -285,8 +293,8 @@ class AbstractiveSummarizationLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, - 'parameters': {'required': True}, + "kind": {"required": True}, + "parameters": {"required": True}, } _attribute_map = { @@ -296,11 +304,7 @@ class AbstractiveSummarizationLROTask(AnalyzeTextLROTask): } def __init__( - self, - *, - parameters: "_models.AbstractiveSummarizationTaskParameters", - task_name: Optional[str] = None, - **kwargs + self, *, parameters: "_models.AbstractiveSummarizationTaskParameters", task_name: Optional[str] = None, **kwargs ): """ :keyword task_name: @@ -311,7 +315,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.AbstractiveSummarizationTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'AbstractiveSummarization' # type: str + self.kind = "AbstractiveSummarization" # type: str self.parameters = parameters @@ -330,8 +334,8 @@ class PreBuiltResult(_serialization.Model): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -374,19 +378,14 @@ class AbstractiveSummarizationResultBase(_serialization.Model): """ _validation = { - 'documents': {'required': True}, + "documents": {"required": True}, } _attribute_map = { "documents": {"key": "documents", "type": "[AbstractiveSummaryDocumentResult]"}, } - def __init__( - self, - *, - documents: List["_models.AbstractiveSummaryDocumentResult"], - **kwargs - ): + def __init__(self, *, documents: List["_models.AbstractiveSummaryDocumentResult"], **kwargs): """ :keyword documents: Response by document. Required. :paramtype documents: @@ -414,9 +413,9 @@ class AbstractiveSummarizationResult(AbstractiveSummarizationResultBase, PreBuil """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -447,7 +446,9 @@ def __init__( :paramtype documents: list[~azure.ai.textanalytics.v2023_04_01.models.AbstractiveSummaryDocumentResult] """ - super().__init__(documents=documents, errors=errors, statistics=statistics, model_version=model_version, **kwargs) + super().__init__( + documents=documents, errors=errors, statistics=statistics, model_version=model_version, **kwargs + ) self.errors = errors self.statistics = statistics self.model_version = model_version @@ -465,12 +466,7 @@ class TaskParameters(_serialization.Model): "logging_opt_out": {"key": "loggingOptOut", "type": "bool"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -493,13 +489,7 @@ class PreBuiltTaskParameters(TaskParameters): "model_version": {"key": "modelVersion", "type": "str"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - model_version: str = "latest", - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, model_version: str = "latest", **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -595,7 +585,13 @@ def __init__( and "Utf16CodeUnit". :paramtype string_index_type: str or ~azure.ai.textanalytics.v2023_04_01.models.StringIndexType """ - super().__init__(sentence_count=sentence_count, string_index_type=string_index_type, logging_opt_out=logging_opt_out, model_version=model_version, **kwargs) + super().__init__( + sentence_count=sentence_count, + string_index_type=string_index_type, + logging_opt_out=logging_opt_out, + model_version=model_version, + **kwargs + ) self.logging_opt_out = logging_opt_out self.model_version = model_version self.sentence_count = sentence_count @@ -614,7 +610,7 @@ class AbstractiveSummary(_serialization.Model): """ _validation = { - 'text': {'required': True}, + "text": {"required": True}, } _attribute_map = { @@ -622,13 +618,7 @@ class AbstractiveSummary(_serialization.Model): "contexts": {"key": "contexts", "type": "[SummaryContext]"}, } - def __init__( - self, - *, - text: str, - contexts: Optional[List["_models.SummaryContext"]] = None, - **kwargs - ): + def __init__(self, *, text: str, contexts: Optional[List["_models.SummaryContext"]] = None, **kwargs): """ :keyword text: The text of the summary. Required. :paramtype text: str @@ -655,8 +645,8 @@ class DocumentResult(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -705,9 +695,9 @@ class AbstractiveSummaryDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'summaries': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "summaries": {"required": True}, } _attribute_map = { @@ -758,7 +748,7 @@ class AnalyzeTextTask(_serialization.Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -766,15 +756,18 @@ class AnalyzeTextTask(_serialization.Model): } _subtype_map = { - 'kind': {'EntityLinking': 'AnalyzeTextEntityLinkingInput', 'EntityRecognition': 'AnalyzeTextEntityRecognitionInput', 'KeyPhraseExtraction': 'AnalyzeTextKeyPhraseExtractionInput', 'LanguageDetection': 'AnalyzeTextLanguageDetectionInput', 'PiiEntityRecognition': 'AnalyzeTextPiiEntitiesRecognitionInput', 'SentimentAnalysis': 'AnalyzeTextSentimentAnalysisInput'} - } - - def __init__( - self, - **kwargs - ): - """ - """ + "kind": { + "EntityLinking": "AnalyzeTextEntityLinkingInput", + "EntityRecognition": "AnalyzeTextEntityRecognitionInput", + "KeyPhraseExtraction": "AnalyzeTextKeyPhraseExtractionInput", + "LanguageDetection": "AnalyzeTextLanguageDetectionInput", + "PiiEntityRecognition": "AnalyzeTextPiiEntitiesRecognitionInput", + "SentimentAnalysis": "AnalyzeTextSentimentAnalysisInput", + } + } + + def __init__(self, **kwargs): + """ """ super().__init__(**kwargs) self.kind = None # type: Optional[str] @@ -795,7 +788,7 @@ class AnalyzeTextEntityLinkingInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -819,7 +812,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.EntityLinkingTaskParameters """ super().__init__(**kwargs) - self.kind = 'EntityLinking' # type: str + self.kind = "EntityLinking" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -840,7 +833,7 @@ class AnalyzeTextEntityRecognitionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -864,7 +857,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.EntitiesTaskParameters """ super().__init__(**kwargs) - self.kind = 'EntityRecognition' # type: str + self.kind = "EntityRecognition" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -883,8 +876,8 @@ class AnalyzeTextJobsInput(_serialization.Model): """ _validation = { - 'analysis_input': {'required': True}, - 'tasks': {'required': True}, + "analysis_input": {"required": True}, + "tasks": {"required": True}, } _attribute_map = { @@ -928,12 +921,7 @@ class AnalyzeTextJobStatistics(_serialization.Model): "statistics": {"key": "statistics", "type": "RequestStatistics"}, } - def __init__( - self, - *, - statistics: Optional["_models.RequestStatistics"] = None, - **kwargs - ): + def __init__(self, *, statistics: Optional["_models.RequestStatistics"] = None, **kwargs): """ :keyword statistics: if showStats=true was specified in the request this field will contain information about the request payload. @@ -953,19 +941,14 @@ class TasksState(_serialization.Model): """ _validation = { - 'tasks': {'required': True}, + "tasks": {"required": True}, } _attribute_map = { "tasks": {"key": "tasks", "type": "TasksStateTasks"}, } - def __init__( - self, - *, - tasks: "_models.TasksStateTasks", - **kwargs - ): + def __init__(self, *, tasks: "_models.TasksStateTasks", **kwargs): """ :keyword tasks: Required. :paramtype tasks: ~azure.ai.textanalytics.v2023_04_01.models.TasksStateTasks @@ -999,10 +982,10 @@ class JobState(_serialization.Model): """ _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -1089,11 +1072,11 @@ class AnalyzeTextJobState(JobState, TasksState, AnalyzeTextJobStatistics): """ _validation = { - 'tasks': {'required': True}, - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "tasks": {"required": True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -1148,7 +1131,19 @@ def __init__( :keyword next_link: :paramtype next_link: str """ - super().__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, errors=errors, next_link=next_link, tasks=tasks, statistics=statistics, **kwargs) + super().__init__( + display_name=display_name, + created_date_time=created_date_time, + expiration_date_time=expiration_date_time, + job_id=job_id, + last_update_date_time=last_update_date_time, + status=status, + errors=errors, + next_link=next_link, + tasks=tasks, + statistics=statistics, + **kwargs + ) self.statistics = statistics self.tasks = tasks self.display_name = display_name @@ -1177,7 +1172,7 @@ class AnalyzeTextKeyPhraseExtractionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1201,7 +1196,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.KeyPhraseTaskParameters """ super().__init__(**kwargs) - self.kind = 'KeyPhraseExtraction' # type: str + self.kind = "KeyPhraseExtraction" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -1223,7 +1218,7 @@ class AnalyzeTextLanguageDetectionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1248,7 +1243,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.LanguageDetectionTaskParameters """ super().__init__(**kwargs) - self.kind = 'LanguageDetection' # type: str + self.kind = "LanguageDetection" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -1269,7 +1264,7 @@ class AnalyzeTextPiiEntitiesRecognitionInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1293,7 +1288,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.PiiTaskParameters """ super().__init__(**kwargs) - self.kind = 'PiiEntityRecognition' # type: str + self.kind = "PiiEntityRecognition" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -1314,7 +1309,7 @@ class AnalyzeTextSentimentAnalysisInput(AnalyzeTextTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1339,7 +1334,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.SentimentAnalysisTaskParameters """ super().__init__(**kwargs) - self.kind = 'SentimentAnalysis' # type: str + self.kind = "SentimentAnalysis" # type: str self.analysis_input = analysis_input self.parameters = parameters @@ -1360,7 +1355,7 @@ class AnalyzeTextTaskResult(_serialization.Model): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1368,15 +1363,18 @@ class AnalyzeTextTaskResult(_serialization.Model): } _subtype_map = { - 'kind': {'EntityLinkingResults': 'EntityLinkingTaskResult', 'EntityRecognitionResults': 'EntitiesTaskResult', 'KeyPhraseExtractionResults': 'KeyPhraseTaskResult', 'LanguageDetectionResults': 'LanguageDetectionTaskResult', 'PiiEntityRecognitionResults': 'PiiTaskResult', 'SentimentAnalysisResults': 'SentimentTaskResult'} - } - - def __init__( - self, - **kwargs - ): - """ - """ + "kind": { + "EntityLinkingResults": "EntityLinkingTaskResult", + "EntityRecognitionResults": "EntitiesTaskResult", + "KeyPhraseExtractionResults": "KeyPhraseTaskResult", + "LanguageDetectionResults": "LanguageDetectionTaskResult", + "PiiEntityRecognitionResults": "PiiTaskResult", + "SentimentAnalysisResults": "SentimentTaskResult", + } + } + + def __init__(self, **kwargs): + """ """ super().__init__(**kwargs) self.kind = None # type: Optional[str] @@ -1398,9 +1396,9 @@ class ClassificationDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'class_property': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "class_property": {"required": True}, } _attribute_map = { @@ -1447,8 +1445,8 @@ class ClassificationResult(_serialization.Model): """ _validation = { - 'category': {'required': True}, - 'confidence_score': {'required': True}, + "category": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -1456,13 +1454,7 @@ class ClassificationResult(_serialization.Model): "confidence_score": {"key": "confidenceScore", "type": "float"}, } - def __init__( - self, - *, - category: str, - confidence_score: float, - **kwargs - ): + def __init__(self, *, category: str, confidence_score: float, **kwargs): """ :keyword category: Classification type. Required. :paramtype category: str @@ -1492,7 +1484,7 @@ class CustomEntitiesLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -1515,7 +1507,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.CustomEntitiesTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'CustomEntityRecognition' # type: str + self.kind = "CustomEntityRecognition" # type: str self.parameters = parameters @@ -1536,9 +1528,9 @@ class CustomResult(_serialization.Model): """ _validation = { - 'errors': {'required': True}, - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "errors": {"required": True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1595,10 +1587,10 @@ class CustomEntitiesResult(CustomResult): """ _validation = { - 'errors': {'required': True}, - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -1633,7 +1625,9 @@ def __init__( :paramtype documents: list[~azure.ai.textanalytics.v2023_04_01.models.CustomEntitiesResultDocumentsItem] """ - super().__init__(errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs + ) self.documents = documents @@ -1654,9 +1648,9 @@ class EntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -1707,9 +1701,9 @@ class CustomEntitiesResultDocumentsItem(EntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -1756,8 +1750,8 @@ class CustomTaskParameters(TaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1766,14 +1760,7 @@ class CustomTaskParameters(TaskParameters): "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - *, - project_name: str, - deployment_name: str, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, project_name: str, deployment_name: str, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -1806,8 +1793,8 @@ class CustomEntitiesTaskParameters(CustomTaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -1839,7 +1826,9 @@ def __init__( and "Utf16CodeUnit". :paramtype string_index_type: str or ~azure.ai.textanalytics.v2023_04_01.models.StringIndexType """ - super().__init__(logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs + ) self.string_index_type = string_index_type @@ -1867,10 +1856,10 @@ class CustomEntityRecognitionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -1902,7 +1891,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.CustomEntitiesResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'CustomEntityRecognitionLROResults' # type: str + self.kind = "CustomEntityRecognitionLROResults" # type: str self.results = results @@ -1926,10 +1915,10 @@ class CustomLabelClassificationResult(CustomResult): """ _validation = { - 'errors': {'required': True}, - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -1964,7 +1953,9 @@ def __init__( :paramtype documents: list[~azure.ai.textanalytics.v2023_04_01.models.CustomLabelClassificationResultDocumentsItem] """ - super().__init__(errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + errors=errors, statistics=statistics, project_name=project_name, deployment_name=deployment_name, **kwargs + ) self.documents = documents @@ -1985,9 +1976,9 @@ class CustomLabelClassificationResultDocumentsItem(ClassificationDocumentResult) """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'class_property': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "class_property": {"required": True}, } _attribute_map = { @@ -2045,10 +2036,10 @@ class CustomMultiLabelClassificationLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2080,7 +2071,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.CustomLabelClassificationResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'CustomMultiLabelClassificationLROResults' # type: str + self.kind = "CustomMultiLabelClassificationLROResults" # type: str self.results = results @@ -2103,7 +2094,7 @@ class CustomMultiLabelClassificationLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -2127,7 +2118,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.CustomMultiLabelClassificationTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'CustomMultiLabelClassification' # type: str + self.kind = "CustomMultiLabelClassification" # type: str self.parameters = parameters @@ -2145,8 +2136,8 @@ class CustomMultiLabelClassificationTaskParameters(CustomTaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -2155,14 +2146,7 @@ class CustomMultiLabelClassificationTaskParameters(CustomTaskParameters): "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - *, - project_name: str, - deployment_name: str, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, project_name: str, deployment_name: str, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -2171,7 +2155,9 @@ def __init__( :keyword deployment_name: This field indicates the deployment name for the model. Required. :paramtype deployment_name: str """ - super().__init__(logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs + ) class CustomSingleLabelClassificationLROResult(AnalyzeTextLROResult): @@ -2198,10 +2184,10 @@ class CustomSingleLabelClassificationLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2233,7 +2219,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.CustomLabelClassificationResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'CustomSingleLabelClassificationLROResults' # type: str + self.kind = "CustomSingleLabelClassificationLROResults" # type: str self.results = results @@ -2256,7 +2242,7 @@ class CustomSingleLabelClassificationLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -2280,7 +2266,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.CustomSingleLabelClassificationTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'CustomSingleLabelClassification' # type: str + self.kind = "CustomSingleLabelClassification" # type: str self.parameters = parameters @@ -2298,8 +2284,8 @@ class CustomSingleLabelClassificationTaskParameters(CustomTaskParameters): """ _validation = { - 'project_name': {'required': True}, - 'deployment_name': {'required': True}, + "project_name": {"required": True}, + "deployment_name": {"required": True}, } _attribute_map = { @@ -2308,14 +2294,7 @@ class CustomSingleLabelClassificationTaskParameters(CustomTaskParameters): "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - *, - project_name: str, - deployment_name: str, - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, project_name: str, deployment_name: str, logging_opt_out: bool = False, **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -2324,7 +2303,9 @@ def __init__( :keyword deployment_name: This field indicates the deployment name for the model. Required. :paramtype deployment_name: str """ - super().__init__(logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs) + super().__init__( + logging_opt_out=logging_opt_out, project_name=project_name, deployment_name=deployment_name, **kwargs + ) class DetectedLanguage(_serialization.Model): @@ -2343,9 +2324,9 @@ class DetectedLanguage(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'iso6391_name': {'required': True}, - 'confidence_score': {'required': True}, + "name": {"required": True}, + "iso6391_name": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -2354,14 +2335,7 @@ class DetectedLanguage(_serialization.Model): "confidence_score": {"key": "confidenceScore", "type": "float"}, } - def __init__( - self, - *, - name: str, - iso6391_name: str, - confidence_score: float, - **kwargs - ): + def __init__(self, *, name: str, iso6391_name: str, confidence_score: float, **kwargs): """ :keyword name: Long name of a detected language (e.g. English, French). Required. :paramtype name: str @@ -2390,8 +2364,8 @@ class DocumentError(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'error': {'required': True}, + "id": {"required": True}, + "error": {"required": True}, } _attribute_map = { @@ -2399,13 +2373,7 @@ class DocumentError(_serialization.Model): "error": {"key": "error", "type": "Error"}, } - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - error: "_models.Error", - **kwargs - ): + def __init__(self, *, id: str, error: "_models.Error", **kwargs): # pylint: disable=redefined-builtin """ :keyword id: The ID of the input document. Required. :paramtype id: str @@ -2429,8 +2397,8 @@ class DocumentStatistics(_serialization.Model): """ _validation = { - 'characters_count': {'required': True}, - 'transactions_count': {'required': True}, + "characters_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -2438,13 +2406,7 @@ class DocumentStatistics(_serialization.Model): "transactions_count": {"key": "transactionsCount", "type": "int"}, } - def __init__( - self, - *, - characters_count: int, - transactions_count: int, - **kwargs - ): + def __init__(self, *, characters_count: int, transactions_count: int, **kwargs): """ :keyword characters_count: Number of text elements recognized in the document. Required. :paramtype characters_count: int @@ -2471,8 +2433,8 @@ class DocumentWarning(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -2482,12 +2444,7 @@ class DocumentWarning(_serialization.Model): } def __init__( - self, - *, - code: Union[str, "_models.WarningCodeValue"], - message: str, - target_ref: Optional[str] = None, - **kwargs + self, *, code: Union[str, "_models.WarningCodeValue"], message: str, target_ref: Optional[str] = None, **kwargs ): """ :keyword code: Error code. Required. Known values are: "LongWordsInDocument" and @@ -2522,7 +2479,7 @@ class EntitiesLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -2545,7 +2502,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.EntitiesTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'EntityRecognition' # type: str + self.kind = "EntityRecognition" # type: str self.parameters = parameters @@ -2567,9 +2524,9 @@ class EntitiesResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -2621,9 +2578,9 @@ class EntitiesResultDocumentsItem(EntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -2713,8 +2670,8 @@ class EntitiesTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2722,18 +2679,13 @@ class EntitiesTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "EntitiesResult"}, } - def __init__( - self, - *, - results: "_models.EntitiesResult", - **kwargs - ): + def __init__(self, *, results: "_models.EntitiesResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.EntitiesResult """ super().__init__(**kwargs) - self.kind = 'EntityRecognitionResults' # type: str + self.kind = "EntityRecognitionResults" # type: str self.results = results @@ -2759,11 +2711,11 @@ class Entity(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -2835,10 +2787,10 @@ class EntityLinkingLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -2870,7 +2822,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.EntityLinkingResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'EntityLinkingLROResults' # type: str + self.kind = "EntityLinkingLROResults" # type: str self.results = results @@ -2892,7 +2844,7 @@ class EntityLinkingLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -2915,7 +2867,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.EntityLinkingTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'EntityLinking' # type: str + self.kind = "EntityLinking" # type: str self.parameters = parameters @@ -2937,9 +2889,9 @@ class EntityLinkingResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -2991,9 +2943,9 @@ class LinkedEntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -3044,9 +2996,9 @@ class EntityLinkingResultDocumentsItem(LinkedEntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -3136,8 +3088,8 @@ class EntityLinkingTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3145,18 +3097,13 @@ class EntityLinkingTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "EntityLinkingResult"}, } - def __init__( - self, - *, - results: "_models.EntityLinkingResult", - **kwargs - ): + def __init__(self, *, results: "_models.EntityLinkingResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.EntityLinkingResult """ super().__init__(**kwargs) - self.kind = 'EntityLinkingResults' # type: str + self.kind = "EntityLinkingResults" # type: str self.results = results @@ -3184,10 +3131,10 @@ class EntityRecognitionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3219,7 +3166,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.EntitiesResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'EntityRecognitionLROResults' # type: str + self.kind = "EntityRecognitionLROResults" # type: str self.results = results @@ -3250,8 +3197,8 @@ class Error(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -3314,19 +3261,14 @@ class ErrorResponse(_serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { "error": {"key": "error", "type": "Error"}, } - def __init__( - self, - *, - error: "_models.Error", - **kwargs - ): + def __init__(self, *, error: "_models.Error", **kwargs): """ :keyword error: The error object. Required. :paramtype error: ~azure.ai.textanalytics.v2023_04_01.models.Error @@ -3352,9 +3294,9 @@ class ExtractedSummaryDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'sentences': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "sentences": {"required": True}, } _attribute_map = { @@ -3406,10 +3348,10 @@ class ExtractedSummarySentence(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'rank_score': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "text": {"required": True}, + "rank_score": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -3419,15 +3361,7 @@ class ExtractedSummarySentence(_serialization.Model): "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - text: str, - rank_score: float, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, text: str, rank_score: float, offset: int, length: int, **kwargs): """ :keyword text: The extracted sentence text. Required. :paramtype text: str @@ -3471,10 +3405,10 @@ class ExtractiveSummarizationLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3506,7 +3440,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.ExtractiveSummarizationResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'ExtractiveSummarizationLROResults' # type: str + self.kind = "ExtractiveSummarizationLROResults" # type: str self.results = results @@ -3529,7 +3463,7 @@ class ExtractiveSummarizationLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -3553,7 +3487,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.ExtractiveSummarizationTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'ExtractiveSummarization' # type: str + self.kind = "ExtractiveSummarization" # type: str self.parameters = parameters @@ -3575,9 +3509,9 @@ class ExtractiveSummarizationResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -3738,10 +3672,10 @@ class HealthcareEntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -3816,11 +3750,11 @@ class HealthcareEntity(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -3903,8 +3837,8 @@ class HealthcareEntityLink(_serialization.Model): """ _validation = { - 'data_source': {'required': True}, - 'id': {'required': True}, + "data_source": {"required": True}, + "id": {"required": True}, } _attribute_map = { @@ -3912,13 +3846,7 @@ class HealthcareEntityLink(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - data_source: str, - id: str, # pylint: disable=redefined-builtin - **kwargs - ): + def __init__(self, *, data_source: str, id: str, **kwargs): # pylint: disable=redefined-builtin """ :keyword data_source: Entity Catalog. Examples include: UMLS, CHV, MSH, etc. Required. :paramtype data_source: str @@ -3954,10 +3882,10 @@ class HealthcareLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -3989,7 +3917,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.HealthcareResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'HealthcareLROResults' # type: str + self.kind = "HealthcareLROResults" # type: str self.results = results @@ -4011,7 +3939,7 @@ class HealthcareLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -4034,7 +3962,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.HealthcareTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'Healthcare' # type: str + self.kind = "Healthcare" # type: str self.parameters = parameters @@ -4063,8 +3991,8 @@ class HealthcareRelation(_serialization.Model): """ _validation = { - 'relation_type': {'required': True}, - 'entities': {'required': True}, + "relation_type": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -4121,8 +4049,8 @@ class HealthcareRelationEntity(_serialization.Model): """ _validation = { - 'ref': {'required': True}, - 'role': {'required': True}, + "ref": {"required": True}, + "role": {"required": True}, } _attribute_map = { @@ -4130,13 +4058,7 @@ class HealthcareRelationEntity(_serialization.Model): "role": {"key": "role", "type": "str"}, } - def __init__( - self, - *, - ref: str, - role: str, - **kwargs - ): + def __init__(self, *, ref: str, role: str, **kwargs): """ :keyword ref: Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . Required. @@ -4169,9 +4091,9 @@ class HealthcareResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -4225,10 +4147,10 @@ class HealthcareResultDocumentsItem(HealthcareEntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "entities": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -4262,7 +4184,9 @@ def __init__( :keyword relations: Healthcare entity relations. Required. :paramtype relations: list[~azure.ai.textanalytics.v2023_04_01.models.HealthcareRelation] """ - super().__init__(id=id, warnings=warnings, statistics=statistics, entities=entities, relations=relations, **kwargs) + super().__init__( + id=id, warnings=warnings, statistics=statistics, entities=entities, relations=relations, **kwargs + ) class HealthcareTaskParameters(PreBuiltTaskParameters): @@ -4332,8 +4256,8 @@ class InnerErrorModel(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -4391,12 +4315,7 @@ class JobErrors(_serialization.Model): "errors": {"key": "errors", "type": "[Error]"}, } - def __init__( - self, - *, - errors: Optional[List["_models.Error"]] = None, - **kwargs - ): + def __init__(self, *, errors: Optional[List["_models.Error"]] = None, **kwargs): """ :keyword errors: :paramtype errors: list[~azure.ai.textanalytics.v2023_04_01.models.Error] @@ -4429,10 +4348,10 @@ class KeyPhraseExtractionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -4464,7 +4383,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.KeyPhraseResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'KeyPhraseExtractionLROResults' # type: str + self.kind = "KeyPhraseExtractionLROResults" # type: str self.results = results @@ -4486,7 +4405,7 @@ class KeyPhraseLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -4509,7 +4428,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.KeyPhraseTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'KeyPhraseExtraction' # type: str + self.kind = "KeyPhraseExtraction" # type: str self.parameters = parameters @@ -4531,9 +4450,9 @@ class KeyPhraseResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -4586,9 +4505,9 @@ class KeyPhrasesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'key_phrases': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "key_phrases": {"required": True}, } _attribute_map = { @@ -4641,9 +4560,9 @@ class KeyPhraseResultDocumentsItem(KeyPhrasesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'key_phrases': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "key_phrases": {"required": True}, } _attribute_map = { @@ -4691,13 +4610,7 @@ class KeyPhraseTaskParameters(PreBuiltTaskParameters): "model_version": {"key": "modelVersion", "type": "str"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - model_version: str = "latest", - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, model_version: str = "latest", **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -4721,8 +4634,8 @@ class KeyPhraseTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -4730,18 +4643,13 @@ class KeyPhraseTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "KeyPhraseResult"}, } - def __init__( - self, - *, - results: "_models.KeyPhraseResult", - **kwargs - ): + def __init__(self, *, results: "_models.KeyPhraseResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.KeyPhraseResult """ super().__init__(**kwargs) - self.kind = 'KeyPhraseExtractionResults' # type: str + self.kind = "KeyPhraseExtractionResults" # type: str self.results = results @@ -4756,12 +4664,7 @@ class LanguageDetectionAnalysisInput(_serialization.Model): "documents": {"key": "documents", "type": "[LanguageInput]"}, } - def __init__( - self, - *, - documents: Optional[List["_models.LanguageInput"]] = None, - **kwargs - ): + def __init__(self, *, documents: Optional[List["_models.LanguageInput"]] = None, **kwargs): """ :keyword documents: :paramtype documents: list[~azure.ai.textanalytics.v2023_04_01.models.LanguageInput] @@ -4787,9 +4690,9 @@ class LanguageDetectionDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'detected_language': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "detected_language": {"required": True}, } _attribute_map = { @@ -4841,9 +4744,9 @@ class LanguageDetectionResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -4892,13 +4795,7 @@ class LanguageDetectionTaskParameters(PreBuiltTaskParameters): "model_version": {"key": "modelVersion", "type": "str"}, } - def __init__( - self, - *, - logging_opt_out: bool = False, - model_version: str = "latest", - **kwargs - ): + def __init__(self, *, logging_opt_out: bool = False, model_version: str = "latest", **kwargs): """ :keyword logging_opt_out: :paramtype logging_opt_out: bool @@ -4922,8 +4819,8 @@ class LanguageDetectionTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -4931,18 +4828,13 @@ class LanguageDetectionTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "LanguageDetectionResult"}, } - def __init__( - self, - *, - results: "_models.LanguageDetectionResult", - **kwargs - ): + def __init__(self, *, results: "_models.LanguageDetectionResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.LanguageDetectionResult """ super().__init__(**kwargs) - self.kind = 'LanguageDetectionResults' # type: str + self.kind = "LanguageDetectionResults" # type: str self.results = results @@ -4960,8 +4852,8 @@ class LanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -4971,12 +4863,7 @@ class LanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - country_hint: Optional[str] = None, - **kwargs + self, *, id: str, text: str, country_hint: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: Unique, non-empty document identifier. Required. @@ -5014,11 +4901,11 @@ class LinkedEntity(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'matches': {'required': True}, - 'language': {'required': True}, - 'url': {'required': True}, - 'data_source': {'required': True}, + "name": {"required": True}, + "matches": {"required": True}, + "language": {"required": True}, + "url": {"required": True}, + "data_source": {"required": True}, } _attribute_map = { @@ -5087,10 +4974,10 @@ class Match(_serialization.Model): """ _validation = { - 'confidence_score': {'required': True}, - 'text': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "confidence_score": {"required": True}, + "text": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -5100,15 +4987,7 @@ class Match(_serialization.Model): "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - confidence_score: float, - text: str, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, confidence_score: float, text: str, offset: int, length: int, **kwargs): """ :keyword confidence_score: If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. Required. @@ -5138,12 +5017,7 @@ class MultiLanguageAnalysisInput(_serialization.Model): "documents": {"key": "documents", "type": "[MultiLanguageInput]"}, } - def __init__( - self, - *, - documents: Optional[List["_models.MultiLanguageInput"]] = None, - **kwargs - ): + def __init__(self, *, documents: Optional[List["_models.MultiLanguageInput"]] = None, **kwargs): """ :keyword documents: :paramtype documents: list[~azure.ai.textanalytics.v2023_04_01.models.MultiLanguageInput] @@ -5168,8 +5042,8 @@ class MultiLanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -5179,12 +5053,7 @@ class MultiLanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - language: Optional[str] = None, - **kwargs + self, *, id: str, text: str, language: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: A unique, non-empty document identifier. Required. @@ -5213,12 +5082,7 @@ class Pagination(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, next_link: Optional[str] = None, **kwargs): """ :keyword next_link: :paramtype next_link: str @@ -5246,10 +5110,10 @@ class PiiEntitiesDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "redacted_text": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -5312,10 +5176,10 @@ class PiiEntityRecognitionLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -5347,7 +5211,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.PiiResult """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'PiiEntityRecognitionLROResults' # type: str + self.kind = "PiiEntityRecognitionLROResults" # type: str self.results = results @@ -5369,7 +5233,7 @@ class PiiLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -5379,11 +5243,7 @@ class PiiLROTask(AnalyzeTextLROTask): } def __init__( - self, - *, - task_name: Optional[str] = None, - parameters: Optional["_models.PiiTaskParameters"] = None, - **kwargs + self, *, task_name: Optional[str] = None, parameters: Optional["_models.PiiTaskParameters"] = None, **kwargs ): """ :keyword task_name: @@ -5392,7 +5252,7 @@ def __init__( :paramtype parameters: ~azure.ai.textanalytics.v2023_04_01.models.PiiTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'PiiEntityRecognition' # type: str + self.kind = "PiiEntityRecognition" # type: str self.parameters = parameters @@ -5413,9 +5273,9 @@ class PiiResult(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -5468,10 +5328,10 @@ class PiiResultDocumentsItem(PiiEntitiesDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "redacted_text": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -5505,7 +5365,9 @@ def __init__( :keyword entities: Recognized entities in the document. Required. :paramtype entities: list[~azure.ai.textanalytics.v2023_04_01.models.Entity] """ - super().__init__(id=id, warnings=warnings, statistics=statistics, redacted_text=redacted_text, entities=entities, **kwargs) + super().__init__( + id=id, warnings=warnings, statistics=statistics, redacted_text=redacted_text, entities=entities, **kwargs + ) class PiiTaskParameters(PreBuiltTaskParameters): @@ -5529,7 +5391,7 @@ class PiiTaskParameters(PreBuiltTaskParameters): """ _validation = { - 'pii_categories': {'unique': True}, + "pii_categories": {"unique": True}, } _attribute_map = { @@ -5587,8 +5449,8 @@ class PiiTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -5596,18 +5458,13 @@ class PiiTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "PiiResult"}, } - def __init__( - self, - *, - results: "_models.PiiResult", - **kwargs - ): + def __init__(self, *, results: "_models.PiiResult", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.PiiResult """ super().__init__(**kwargs) - self.kind = 'PiiEntityRecognitionResults' # type: str + self.kind = "PiiEntityRecognitionResults" # type: str self.results = results @@ -5629,10 +5486,10 @@ class RequestStatistics(_serialization.Model): """ _validation = { - 'documents_count': {'required': True}, - 'valid_documents_count': {'required': True}, - 'erroneous_documents_count': {'required': True}, - 'transactions_count': {'required': True}, + "documents_count": {"required": True}, + "valid_documents_count": {"required": True}, + "erroneous_documents_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -5692,12 +5549,12 @@ class SentenceAssessment(_serialization.Model): """ _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'is_negated': {'required': True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "text": {"required": True}, + "is_negated": {"required": True}, } _attribute_map = { @@ -5770,11 +5627,11 @@ class SentenceSentiment(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "text": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -5852,12 +5709,12 @@ class SentenceTarget(_serialization.Model): """ _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'relations': {'required': True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "text": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -5925,7 +5782,7 @@ class SentimentAnalysisLROTask(AnalyzeTextLROTask): """ _validation = { - 'kind': {'required': True}, + "kind": {"required": True}, } _attribute_map = { @@ -5949,7 +5806,7 @@ def __init__( ~azure.ai.textanalytics.v2023_04_01.models.SentimentAnalysisTaskParameters """ super().__init__(task_name=task_name, **kwargs) - self.kind = 'SentimentAnalysis' # type: str + self.kind = "SentimentAnalysis" # type: str self.parameters = parameters @@ -6017,9 +5874,9 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'neutral': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "neutral": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -6028,14 +5885,7 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - neutral: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, neutral: float, negative: float, **kwargs): """ :keyword positive: Confidence score for positive sentiment. Required. :paramtype positive: float @@ -6074,11 +5924,11 @@ class SentimentDocumentResult(DocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "sentences": {"required": True}, } _attribute_map = { @@ -6149,10 +5999,10 @@ class SentimentLROResult(AnalyzeTextLROResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - 'kind': {'required': True}, - 'results': {'required': True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -6184,7 +6034,7 @@ def __init__( :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.SentimentResponse """ super().__init__(task_name=task_name, last_update_date_time=last_update_date_time, status=status, **kwargs) - self.kind = 'SentimentAnalysisLROResults' # type: str + self.kind = "SentimentAnalysisLROResults" # type: str self.results = results @@ -6206,9 +6056,9 @@ class SentimentResponse(PreBuiltResult): """ _validation = { - 'errors': {'required': True}, - 'model_version': {'required': True}, - 'documents': {'required': True}, + "errors": {"required": True}, + "model_version": {"required": True}, + "documents": {"required": True}, } _attribute_map = { @@ -6267,11 +6117,11 @@ class SentimentResponseDocumentsItem(SentimentDocumentResult): """ _validation = { - 'id': {'required': True}, - 'warnings': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, + "id": {"required": True}, + "warnings": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "sentences": {"required": True}, } _attribute_map = { @@ -6312,7 +6162,15 @@ def __init__( :keyword sentences: Sentence level sentiment analysis. Required. :paramtype sentences: list[~azure.ai.textanalytics.v2023_04_01.models.SentenceSentiment] """ - super().__init__(id=id, warnings=warnings, statistics=statistics, sentiment=sentiment, confidence_scores=confidence_scores, sentences=sentences, **kwargs) + super().__init__( + id=id, + warnings=warnings, + statistics=statistics, + sentiment=sentiment, + confidence_scores=confidence_scores, + sentences=sentences, + **kwargs + ) class SentimentTaskResult(AnalyzeTextTaskResult): @@ -6329,8 +6187,8 @@ class SentimentTaskResult(AnalyzeTextTaskResult): """ _validation = { - 'kind': {'required': True}, - 'results': {'required': True}, + "kind": {"required": True}, + "results": {"required": True}, } _attribute_map = { @@ -6338,18 +6196,13 @@ class SentimentTaskResult(AnalyzeTextTaskResult): "results": {"key": "results", "type": "SentimentResponse"}, } - def __init__( - self, - *, - results: "_models.SentimentResponse", - **kwargs - ): + def __init__(self, *, results: "_models.SentimentResponse", **kwargs): """ :keyword results: Required. :paramtype results: ~azure.ai.textanalytics.v2023_04_01.models.SentimentResponse """ super().__init__(**kwargs) - self.kind = 'SentimentAnalysisResults' # type: str + self.kind = "SentimentAnalysisResults" # type: str self.results = results @@ -6367,8 +6220,8 @@ class SummaryContext(_serialization.Model): """ _validation = { - 'offset': {'required': True}, - 'length': {'required': True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -6376,13 +6229,7 @@ class SummaryContext(_serialization.Model): "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, offset: int, length: int, **kwargs): """ :keyword offset: Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. Required. @@ -6408,8 +6255,8 @@ class TargetConfidenceScoreLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -6417,13 +6264,7 @@ class TargetConfidenceScoreLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, negative: float, **kwargs): """ :keyword positive: Confidence score for positive sentiment. Required. :paramtype positive: float @@ -6448,8 +6289,8 @@ class TargetRelation(_serialization.Model): """ _validation = { - 'relation_type': {'required': True}, - 'ref': {'required': True}, + "relation_type": {"required": True}, + "ref": {"required": True}, } _attribute_map = { @@ -6457,13 +6298,7 @@ class TargetRelation(_serialization.Model): "ref": {"key": "ref", "type": "str"}, } - def __init__( - self, - *, - relation_type: Union[str, "_models.TargetRelationType"], - ref: str, - **kwargs - ): + def __init__(self, *, relation_type: Union[str, "_models.TargetRelationType"], ref: str, **kwargs): """ :keyword relation_type: The type related to the target. Required. Known values are: "assessment" and "target". @@ -6494,10 +6329,10 @@ class TasksStateTasks(_serialization.Model): """ _validation = { - 'completed': {'required': True}, - 'failed': {'required': True}, - 'in_progress': {'required': True}, - 'total': {'required': True}, + "completed": {"required": True}, + "failed": {"required": True}, + "in_progress": {"required": True}, + "total": {"required": True}, } _attribute_map = { diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_text_analytics_client_enums.py index 8b74602f293d..fb88a683c6df 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/models/_text_analytics_client_enums.py @@ -11,8 +11,7 @@ class AnalyzeTextLROResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported Text Analysis long-running operation task results. - """ + """Enumeration of supported Text Analysis long-running operation task results.""" SENTIMENT_ANALYSIS_LRO_RESULTS = "SentimentAnalysisLROResults" ENTITY_RECOGNITION_LRO_RESULTS = "EntityRecognitionLROResults" @@ -26,9 +25,9 @@ class AnalyzeTextLROResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): CUSTOM_MULTI_LABEL_CLASSIFICATION_LRO_RESULTS = "CustomMultiLabelClassificationLROResults" ABSTRACTIVE_SUMMARIZATION_LRO_RESULTS = "AbstractiveSummarizationLROResults" + class AnalyzeTextLROTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported long-running Text Analysis tasks. - """ + """Enumeration of supported long-running Text Analysis tasks.""" SENTIMENT_ANALYSIS = "SentimentAnalysis" ENTITY_RECOGNITION = "EntityRecognition" @@ -42,9 +41,9 @@ class AnalyzeTextLROTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): CUSTOM_MULTI_LABEL_CLASSIFICATION = "CustomMultiLabelClassification" ABSTRACTIVE_SUMMARIZATION = "AbstractiveSummarization" + class AnalyzeTextTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported Text Analysis tasks. - """ + """Enumeration of supported Text Analysis tasks.""" SENTIMENT_ANALYSIS = "SentimentAnalysis" ENTITY_RECOGNITION = "EntityRecognition" @@ -53,9 +52,9 @@ class AnalyzeTextTaskKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): LANGUAGE_DETECTION = "LanguageDetection" ENTITY_LINKING = "EntityLinking" + class AnalyzeTextTaskResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enumeration of supported Text Analysis task results. - """ + """Enumeration of supported Text Analysis task results.""" SENTIMENT_ANALYSIS_RESULTS = "SentimentAnalysisResults" ENTITY_RECOGNITION_RESULTS = "EntityRecognitionResults" @@ -64,25 +63,25 @@ class AnalyzeTextTaskResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): LANGUAGE_DETECTION_RESULTS = "LanguageDetectionResults" ENTITY_LINKING_RESULTS = "EntityLinkingResults" + class DocumentSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - """ + """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" MIXED = "mixed" + class EntityAssociation(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes if the entity is the subject of the text or if it describes someone else. - """ + """Describes if the entity is the subject of the text or if it describes someone else.""" SUBJECT = "subject" OTHER = "other" + class EntityCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes the entities certainty and polarity. - """ + """Describes the entities certainty and polarity.""" POSITIVE = "positive" POSITIVE_POSSIBLE = "positivePossible" @@ -90,16 +89,16 @@ class EntityCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): NEGATIVE_POSSIBLE = "negativePossible" NEGATIVE = "negative" + class EntityConditionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes any conditionality on the entity. - """ + """Describes any conditionality on the entity.""" HYPOTHETICAL = "hypothetical" CONDITIONAL = "conditional" + class ErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Human-readable error code. - """ + """Human-readable error code.""" INVALID_REQUEST = "InvalidRequest" INVALID_ARGUMENT = "InvalidArgument" @@ -120,9 +119,9 @@ class ErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): CONFLICT = "Conflict" WARNING = "Warning" + class ExtractiveSummarizationSortingCriteria(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The sorting criteria to use for the results of Extractive Summarization. - """ + """The sorting criteria to use for the results of Extractive Summarization.""" #: Indicates that results should be sorted in order of appearance in the text. OFFSET = "Offset" @@ -130,9 +129,9 @@ class ExtractiveSummarizationSortingCriteria(str, Enum, metaclass=CaseInsensitiv #: the model. RANK = "Rank" + class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Healthcare Entity Category. - """ + """Healthcare Entity Category.""" BODY_STRUCTURE = "BodyStructure" AGE = "Age" @@ -171,9 +170,9 @@ class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): SUBSTANCE_USE = "SubstanceUse" SUBSTANCE_USE_AMOUNT = "SubstanceUseAmount" + class HealthcareEntityRelation(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. - """ + """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc.""" ABBREVIATION = "Abbreviation" BODY_SITE_OF_CONDITION = "BodySiteOfCondition" @@ -211,9 +210,9 @@ class HealthcareEntityRelation(str, Enum, metaclass=CaseInsensitiveEnumMeta): VALUE_OF_EXAMINATION = "ValueOfExamination" VARIANT_OF_GENE = "VariantOfGene" + class InnerErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Human-readable error code. - """ + """Human-readable error code.""" INVALID_REQUEST = "InvalidRequest" INVALID_PARAMETER_VALUE = "InvalidParameterValue" @@ -230,18 +229,18 @@ class InnerErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" INVALID_COUNTRY_HINT = "InvalidCountryHint" + class PiiDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The PII domain used for PII Entity Recognition. - """ + """The PII domain used for PII Entity Recognition.""" #: Indicates that entities in the Personal Health Information domain should be redacted. PHI = "phi" #: Indicates that no domain is specified. NONE = "none" + class PiiEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PiiEntityCategory. - """ + """PiiEntityCategory.""" ABA_ROUTING_NUMBER = "ABARoutingNumber" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" @@ -417,17 +416,17 @@ class PiiEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): ALL = "All" DEFAULT = "Default" + class SentenceSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The predicted Sentiment for the sentence. - """ + """The predicted Sentiment for the sentence.""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" + class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State. - """ + """State.""" NOT_STARTED = "notStarted" RUNNING = "running" @@ -437,6 +436,7 @@ class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): CANCELLING = "cancelling" PARTIALLY_COMPLETED = "partiallyCompleted" + class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see @@ -454,24 +454,24 @@ class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: application is written in a language that support Unicode, for example Java, JavaScript. UTF16_CODE_UNIT = "Utf16CodeUnit" + class TargetRelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type related to the target. - """ + """The type related to the target.""" ASSESSMENT = "assessment" TARGET = "target" + class TokenSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Targeted sentiment in the sentence. - """ + """Targeted sentiment in the sentence.""" POSITIVE = "positive" MIXED = "mixed" NEGATIVE = "negative" + class WarningCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" DOCUMENT_TRUNCATED = "DocumentTruncated" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_patch.py index 5e31bc19f4e2..2bba70afacf2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Optional, Union, TypeVar, Callable, Dict, cast from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict @@ -13,10 +14,13 @@ from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest -from ._text_analytics_client_operations import TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin +from ._text_analytics_client_operations import ( + TextAnalyticsClientOperationsMixin as GeneratedTextAnalyticsClientOperationsMixin, +) from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod from .. import models as _models -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -24,9 +28,7 @@ class TextAnalyticsClientOperationsMixin(GeneratedTextAnalyticsClientOperationsM @distributed_trace def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -54,45 +56,39 @@ def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, AnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod + polling_method = cast( + PollingMethod, + AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: PollingMethod elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: @@ -102,14 +98,17 @@ def get_long_running_output(pipeline_response): polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return poller_cls(self._client, raw_result, get_long_running_output, polling_method) # Handwritten - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore + +__all__: List[str] = [ + "TextAnalyticsClientOperationsMixin" +] # Add all objects you want publicly available to users at this package level -__all__: List[str] = ["TextAnalyticsClientOperationsMixin"] # Add all objects you want publicly available to users at this package level def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_text_analytics_client_operations.py index 6cc17981ea89..2c2adb77ccc3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v2023_04_01/operations/_text_analytics_client_operations.py @@ -9,7 +9,13 @@ from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod @@ -21,74 +27,58 @@ from .. import models as _models from ..._serialization import Serializer from .._vendor import MixinABC, _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_analyze_text_request( - *, - show_stats: Optional[bool] = None, - **kwargs: Any -) -> HttpRequest: + +def build_analyze_text_request(*, show_stats: Optional[bool] = None, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/:analyze-text") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_analyze_text_submit_job_request( - **kwargs: Any -) -> HttpRequest: +def build_analyze_text_submit_job_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/analyze-text/jobs") # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_analyze_text_job_status_request( @@ -102,69 +92,55 @@ def build_analyze_text_job_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/analyze-text/jobs/{jobId}") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if top is not None: - _params['top'] = _SERIALIZER.query("top", top, 'int') + _params["top"] = _SERIALIZER.query("top", top, "int") if skip is not None: - _params['skip'] = _SERIALIZER.query("skip", skip, 'int') + _params["skip"] = _SERIALIZER.query("skip", skip, "int") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_analyze_text_cancel_job_request( - job_id: str, - **kwargs: Any -) -> HttpRequest: +def build_analyze_text_cancel_job_request(job_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - accept = _headers.pop('Accept', "application/json") + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop("template_url", "/analyze-text/jobs/{jobId}:cancel") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class TextAnalyticsClientOperationsMixin(MixinABC): @@ -198,12 +174,7 @@ def analyze_text( @overload def analyze_text( - self, - body: IO, - show_stats: Optional[bool] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, show_stats: Optional[bool] = None, *, content_type: str = "application/json", **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -224,13 +195,9 @@ def analyze_text( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace def analyze_text( - self, - body: Union[_models.AnalyzeTextTask, IO], - show_stats: Optional[bool] = None, - **kwargs: Any + self, body: Union[_models.AnalyzeTextTask, IO], show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextTaskResult: """Request text analysis over a collection of documents. @@ -251,17 +218,15 @@ def analyze_text( :rtype: ~azure.ai.textanalytics.v2023_04_01.models.AnalyzeTextTaskResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextTaskResult] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextTaskResult] content_type = content_type or "application/json" _json = None @@ -269,7 +234,7 @@ def analyze_text( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextTask') + _json = self._serialize.body(body, "AnalyzeTextTask") request = build_analyze_text_request( show_stats=show_stats, @@ -277,20 +242,18 @@ def analyze_text( content_type=content_type, json=_json, content=_content, - template_url=self.analyze_text.metadata['url'], + template_url=self.analyze_text.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -300,32 +263,27 @@ def analyze_text( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextTaskResult', pipeline_response) + deserialized = self._deserialize("AnalyzeTextTaskResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text.metadata = {'url': "/:analyze-text"} # type: ignore - + analyze_text.metadata = {"url": "/:analyze-text"} # type: ignore def _analyze_text_submit_job_initial( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> Optional[_models.AnalyzeTextJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.AnalyzeTextJobState]] content_type = content_type or "application/json" _json = None @@ -333,27 +291,25 @@ def _analyze_text_submit_job_initial( if isinstance(body, (IO, bytes)): _content = body else: - _json = self._serialize.body(body, 'AnalyzeTextJobsInput') + _json = self._serialize.body(body, "AnalyzeTextJobsInput") request = build_analyze_text_submit_job_request( api_version=api_version, content_type=content_type, json=_json, content=_content, - template_url=self._analyze_text_submit_job_initial.metadata['url'], + template_url=self._analyze_text_submit_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -366,27 +322,23 @@ def _analyze_text_submit_job_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _analyze_text_submit_job_initial.metadata = {'url': "/analyze-text/jobs"} # type: ignore - + _analyze_text_submit_job_initial.metadata = {"url": "/analyze-text/jobs"} # type: ignore @overload def begin_analyze_text_submit_job( - self, - body: _models.AnalyzeTextJobsInput, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: _models.AnalyzeTextJobsInput, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -415,11 +367,7 @@ def begin_analyze_text_submit_job( @overload def begin_analyze_text_submit_job( - self, - body: IO, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -446,12 +394,9 @@ def begin_analyze_text_submit_job( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace def begin_analyze_text_submit_job( - self, - body: Union[_models.AnalyzeTextJobsInput, IO], - **kwargs: Any + self, body: Union[_models.AnalyzeTextJobsInput, IO], **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeTextJobState]: """Submit text analysis job. @@ -481,57 +426,53 @@ def begin_analyze_text_submit_job( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_text_submit_job_initial( # type: ignore body=body, api_version=api_version, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, AnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, + AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return AnalyzeActionsLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_submit_job.metadata = {'url': "/analyze-text/jobs"} # type: ignore + begin_analyze_text_submit_job.metadata = {"url": "/analyze-text/jobs"} # type: ignore @distributed_trace def analyze_text_job_status( @@ -564,38 +505,33 @@ def analyze_text_job_status( :rtype: ~azure.ai.textanalytics.v2023_04_01.models.AnalyzeTextJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeTextJobState] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeTextJobState] - request = build_analyze_text_job_status_request( job_id=job_id, show_stats=show_stats, top=top, skip=skip, api_version=api_version, - template_url=self.analyze_text_job_status.metadata['url'], + template_url=self.analyze_text_job_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -605,50 +541,42 @@ def analyze_text_job_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeTextJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeTextJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_text_job_status.metadata = {'url': "/analyze-text/jobs/{jobId}"} # type: ignore - + analyze_text_job_status.metadata = {"url": "/analyze-text/jobs/{jobId}"} # type: ignore def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-return-statements - self, - job_id: str, - **kwargs: Any + self, job_id: str, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_analyze_text_cancel_job_request( job_id=job_id, api_version=api_version, - template_url=self._analyze_text_cancel_job_initial.metadata['url'], + template_url=self._analyze_text_cancel_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -659,21 +587,15 @@ def _analyze_text_cancel_job_initial( # pylint: disable=inconsistent-return-sta raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _analyze_text_cancel_job_initial.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore - + _analyze_text_cancel_job_initial.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore @distributed_trace - def begin_analyze_text_cancel_job( - self, - job_id: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_analyze_text_cancel_job(self, job_id: str, **kwargs: Any) -> LROPoller[None]: """Cancel a long-running Text Analysis job. Cancel a long-running Text Analysis job. @@ -695,50 +617,45 @@ def begin_analyze_text_cancel_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop('api_version', _params.pop('api-version', "2023-04-01")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_text_cancel_job_initial( # type: ignore job_id=job_id, api_version=api_version, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_text_cancel_job.metadata = {'url': "/analyze-text/jobs/{jobId}:cancel"} # type: ignore + begin_analyze_text_cancel_job.metadata = {"url": "/analyze-text/jobs/{jobId}:cancel"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py index 5a8ea1feb882..823d32cc6f22 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -30,12 +31,7 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :type endpoint: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,23 +40,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py index 2918a2e04805..c0e088cbc97c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for @@ -36,13 +37,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl :type endpoint: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/text/analytics/v3.0' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/text/analytics/v3.0" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -51,12 +47,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -76,7 +67,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py index 4672c3d98516..b47cdd59f383 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py @@ -18,6 +18,7 @@ from .._serialization import Deserializer, Serializer + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,8 +26,10 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py index 66abf1a5cb60..92eb5c816373 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -30,12 +31,7 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py index b6b6ad82146f..468da94326d1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for @@ -36,13 +37,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/text/analytics/v3.0' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/text/analytics/v3.0" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -51,12 +47,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -76,7 +67,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py index 99dd8eda3b62..31647c5f04bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py index 6f6d8194ae88..7c8746549e42 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py @@ -8,7 +8,13 @@ # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, List, Optional, TypeVar -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest @@ -17,11 +23,19 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._text_analytics_client_operations import build_entities_linking_request, build_entities_recognition_general_request, build_key_phrases_request, build_languages_request, build_sentiment_request +from ...operations._text_analytics_client_operations import ( + build_entities_linking_request, + build_entities_recognition_general_request, + build_key_phrases_request, + build_languages_request, + build_sentiment_request, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class TextAnalyticsClientOperationsMixin(MixinABC): @distributed_trace_async @@ -53,39 +67,35 @@ async def entities_recognition_general( :rtype: ~azure.ai.textanalytics.v3_0.models.EntitiesResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntitiesResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntitiesResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_recognition_general_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.entities_recognition_general.metadata['url'], + template_url=self.entities_recognition_general.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -95,15 +105,14 @@ async def entities_recognition_general( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntitiesResult', pipeline_response) + deserialized = self._deserialize("EntitiesResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_recognition_general.metadata = {'url': "/entities/recognition/general"} # type: ignore - + entities_recognition_general.metadata = {"url": "/entities/recognition/general"} # type: ignore @distributed_trace_async async def entities_linking( @@ -133,39 +142,35 @@ async def entities_linking( :rtype: ~azure.ai.textanalytics.v3_0.models.EntityLinkingResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntityLinkingResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntityLinkingResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_linking_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.entities_linking.metadata['url'], + template_url=self.entities_linking.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -175,15 +180,14 @@ async def entities_linking( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntityLinkingResult', pipeline_response) + deserialized = self._deserialize("EntityLinkingResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_linking.metadata = {'url': "/entities/linking"} # type: ignore - + entities_linking.metadata = {"url": "/entities/linking"} # type: ignore @distributed_trace_async async def key_phrases( @@ -213,39 +217,35 @@ async def key_phrases( :rtype: ~azure.ai.textanalytics.v3_0.models.KeyPhraseResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.KeyPhraseResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.KeyPhraseResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_key_phrases_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.key_phrases.metadata['url'], + template_url=self.key_phrases.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -255,15 +255,14 @@ async def key_phrases( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('KeyPhraseResult', pipeline_response) + deserialized = self._deserialize("KeyPhraseResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - key_phrases.metadata = {'url': "/keyPhrases"} # type: ignore - + key_phrases.metadata = {"url": "/keyPhrases"} # type: ignore @distributed_trace_async async def languages( @@ -294,39 +293,35 @@ async def languages( :rtype: ~azure.ai.textanalytics.v3_0.models.LanguageResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.LanguageResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LanguageResult] _input = _models.LanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'LanguageBatchInput') + _json = self._serialize.body(_input, "LanguageBatchInput") request = build_languages_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.languages.metadata['url'], + template_url=self.languages.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -336,15 +331,14 @@ async def languages( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('LanguageResult', pipeline_response) + deserialized = self._deserialize("LanguageResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - languages.metadata = {'url': "/languages"} # type: ignore - + languages.metadata = {"url": "/languages"} # type: ignore @distributed_trace_async async def sentiment( @@ -375,39 +369,35 @@ async def sentiment( :rtype: ~azure.ai.textanalytics.v3_0.models.SentimentResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.SentimentResponse] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SentimentResponse] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_sentiment_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.sentiment.metadata['url'], + template_url=self.sentiment.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -417,12 +407,11 @@ async def sentiment( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SentimentResponse', pipeline_response) + deserialized = self._deserialize("SentimentResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - sentiment.metadata = {'url': "/sentiment"} # type: ignore - + sentiment.metadata = {"url": "/sentiment"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py index d54dd3c6720f..49e6185fe8db 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/__init__.py @@ -43,39 +43,40 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'DetectedLanguage', - 'DocumentEntities', - 'DocumentError', - 'DocumentKeyPhrases', - 'DocumentLanguage', - 'DocumentLinkedEntities', - 'DocumentSentiment', - 'DocumentStatistics', - 'EntitiesResult', - 'Entity', - 'EntityLinkingResult', - 'ErrorResponse', - 'InnerError', - 'KeyPhraseResult', - 'LanguageBatchInput', - 'LanguageInput', - 'LanguageResult', - 'LinkedEntity', - 'Match', - 'MultiLanguageBatchInput', - 'MultiLanguageInput', - 'RequestStatistics', - 'SentenceSentiment', - 'SentimentConfidenceScorePerLabel', - 'SentimentResponse', - 'TextAnalyticsError', - 'TextAnalyticsWarning', - 'DocumentSentimentValue', - 'ErrorCodeValue', - 'InnerErrorCodeValue', - 'SentenceSentimentValue', - 'WarningCodeValue', + "DetectedLanguage", + "DocumentEntities", + "DocumentError", + "DocumentKeyPhrases", + "DocumentLanguage", + "DocumentLinkedEntities", + "DocumentSentiment", + "DocumentStatistics", + "EntitiesResult", + "Entity", + "EntityLinkingResult", + "ErrorResponse", + "InnerError", + "KeyPhraseResult", + "LanguageBatchInput", + "LanguageInput", + "LanguageResult", + "LinkedEntity", + "Match", + "MultiLanguageBatchInput", + "MultiLanguageInput", + "RequestStatistics", + "SentenceSentiment", + "SentimentConfidenceScorePerLabel", + "SentimentResponse", + "TextAnalyticsError", + "TextAnalyticsWarning", + "DocumentSentimentValue", + "ErrorCodeValue", + "InnerErrorCodeValue", + "SentenceSentimentValue", + "WarningCodeValue", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py index a8b10cfec35a..ff7e31f3954f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py @@ -32,9 +32,9 @@ class DetectedLanguage(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'iso6391_name': {'required': True}, - 'confidence_score': {'required': True}, + "name": {"required": True}, + "iso6391_name": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -43,14 +43,7 @@ class DetectedLanguage(_serialization.Model): "confidence_score": {"key": "confidenceScore", "type": "float"}, } - def __init__( - self, - *, - name: str, - iso6391_name: str, - confidence_score: float, - **kwargs - ): + def __init__(self, *, name: str, iso6391_name: str, confidence_score: float, **kwargs): """ :keyword name: Long name of a detected language (e.g. English, French). Required. :paramtype name: str @@ -84,9 +77,9 @@ class DocumentEntities(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "entities": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -135,8 +128,8 @@ class DocumentError(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'error': {'required': True}, + "id": {"required": True}, + "error": {"required": True}, } _attribute_map = { @@ -144,13 +137,7 @@ class DocumentError(_serialization.Model): "error": {"key": "error", "type": "TextAnalyticsError"}, } - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - error: "_models.TextAnalyticsError", - **kwargs - ): + def __init__(self, *, id: str, error: "_models.TextAnalyticsError", **kwargs): # pylint: disable=redefined-builtin """ :keyword id: Document Id. Required. :paramtype id: str @@ -180,9 +167,9 @@ class DocumentKeyPhrases(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'key_phrases': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "key_phrases": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -237,9 +224,9 @@ class DocumentLanguage(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'detected_language': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "detected_language": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -293,9 +280,9 @@ class DocumentLinkedEntities(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "entities": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -356,11 +343,11 @@ class DocumentSentiment(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "sentences": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -422,8 +409,8 @@ class DocumentStatistics(_serialization.Model): """ _validation = { - 'characters_count': {'required': True}, - 'transactions_count': {'required': True}, + "characters_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -431,13 +418,7 @@ class DocumentStatistics(_serialization.Model): "transactions_count": {"key": "transactionsCount", "type": "int"}, } - def __init__( - self, - *, - characters_count: int, - transactions_count: int, - **kwargs - ): + def __init__(self, *, characters_count: int, transactions_count: int, **kwargs): """ :keyword characters_count: Number of text elements recognized in the document. Required. :paramtype characters_count: int @@ -466,9 +447,9 @@ class EntitiesResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -525,11 +506,11 @@ class Entity(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -592,9 +573,9 @@ class EntityLinkingResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -641,19 +622,14 @@ class ErrorResponse(_serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { "error": {"key": "error", "type": "TextAnalyticsError"}, } - def __init__( - self, - *, - error: "_models.TextAnalyticsError", - **kwargs - ): + def __init__(self, *, error: "_models.TextAnalyticsError", **kwargs): """ :keyword error: Document Error. Required. :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError @@ -683,8 +659,8 @@ class InnerError(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -745,9 +721,9 @@ class KeyPhraseResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -794,19 +770,14 @@ class LanguageBatchInput(_serialization.Model): """ _validation = { - 'documents': {'required': True}, + "documents": {"required": True}, } _attribute_map = { "documents": {"key": "documents", "type": "[LanguageInput]"}, } - def __init__( - self, - *, - documents: List["_models.LanguageInput"], - **kwargs - ): + def __init__(self, *, documents: List["_models.LanguageInput"], **kwargs): """ :keyword documents: Required. :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] @@ -829,8 +800,8 @@ class LanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -840,12 +811,7 @@ class LanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - country_hint: Optional[str] = None, - **kwargs + self, *, id: str, text: str, country_hint: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: Unique, non-empty document identifier. Required. @@ -878,9 +844,9 @@ class LanguageResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -937,11 +903,11 @@ class LinkedEntity(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'matches': {'required': True}, - 'language': {'required': True}, - 'url': {'required': True}, - 'data_source': {'required': True}, + "name": {"required": True}, + "matches": {"required": True}, + "language": {"required": True}, + "url": {"required": True}, + "data_source": {"required": True}, } _attribute_map = { @@ -1005,10 +971,10 @@ class Match(_serialization.Model): """ _validation = { - 'confidence_score': {'required': True}, - 'text': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "confidence_score": {"required": True}, + "text": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -1018,15 +984,7 @@ class Match(_serialization.Model): "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - confidence_score: float, - text: str, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, confidence_score: float, text: str, offset: int, length: int, **kwargs): """ :keyword confidence_score: If a well-known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. Required. @@ -1055,19 +1013,14 @@ class MultiLanguageBatchInput(_serialization.Model): """ _validation = { - 'documents': {'required': True}, + "documents": {"required": True}, } _attribute_map = { "documents": {"key": "documents", "type": "[MultiLanguageInput]"}, } - def __init__( - self, - *, - documents: List["_models.MultiLanguageInput"], - **kwargs - ): + def __init__(self, *, documents: List["_models.MultiLanguageInput"], **kwargs): """ :keyword documents: The set of documents to process as part of this batch. Required. :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] @@ -1092,8 +1045,8 @@ class MultiLanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -1103,12 +1056,7 @@ class MultiLanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - language: Optional[str] = None, - **kwargs + self, *, id: str, text: str, language: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: A unique, non-empty document identifier. Required. @@ -1144,10 +1092,10 @@ class RequestStatistics(_serialization.Model): """ _validation = { - 'documents_count': {'required': True}, - 'valid_documents_count': {'required': True}, - 'erroneous_documents_count': {'required': True}, - 'transactions_count': {'required': True}, + "documents_count": {"required": True}, + "valid_documents_count": {"required": True}, + "erroneous_documents_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -1206,11 +1154,11 @@ class SentenceSentiment(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "text": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -1268,9 +1216,9 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'neutral': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "neutral": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -1279,14 +1227,7 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - neutral: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, neutral: float, negative: float, **kwargs): """ :keyword positive: Required. :paramtype positive: float @@ -1318,9 +1259,9 @@ class SentimentResponse(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -1376,8 +1317,8 @@ class TextAnalyticsError(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -1434,8 +1375,8 @@ class TextAnalyticsWarning(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -1445,12 +1386,7 @@ class TextAnalyticsWarning(_serialization.Model): } def __init__( - self, - *, - code: Union[str, "_models.WarningCodeValue"], - message: str, - target_ref: Optional[str] = None, - **kwargs + self, *, code: Union[str, "_models.WarningCodeValue"], message: str, target_ref: Optional[str] = None, **kwargs ): """ :keyword code: Error code. Required. Known values are: "LongWordsInDocument" and diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py index c52a119d4379..3917218b7e2e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py @@ -11,26 +11,25 @@ class DocumentSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - """ + """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" MIXED = "mixed" + class ErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" INVALID_REQUEST = "invalidRequest" INVALID_ARGUMENT = "invalidArgument" INTERNAL_SERVER_ERROR = "internalServerError" SERVICE_UNAVAILABLE = "serviceUnavailable" + class InnerErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" INVALID_PARAMETER_VALUE = "invalidParameterValue" INVALID_REQUEST_BODY_FORMAT = "invalidRequestBodyFormat" @@ -42,17 +41,17 @@ class InnerErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): UNSUPPORTED_LANGUAGE_CODE = "unsupportedLanguageCode" INVALID_COUNTRY_HINT = "invalidCountryHint" + class SentenceSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The predicted Sentiment for the sentence. - """ + """The predicted Sentiment for the sentence.""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" + class WarningCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" DOCUMENT_TRUNCATED = "DocumentTruncated" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py index 7d442ae9efba..0498cbbf0926 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py @@ -8,7 +8,13 @@ # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, List, Optional, TypeVar -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.rest import HttpRequest @@ -18,185 +24,143 @@ from .. import models as _models from ..._serialization import Serializer from .._vendor import MixinABC, _convert_request -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False + def build_entities_recognition_general_request( - *, - model_version: Optional[str] = None, - show_stats: Optional[bool] = None, - **kwargs: Any + *, model_version: Optional[str] = None, show_stats: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/recognition/general") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_entities_linking_request( - *, - model_version: Optional[str] = None, - show_stats: Optional[bool] = None, - **kwargs: Any + *, model_version: Optional[str] = None, show_stats: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/linking") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_key_phrases_request( - *, - model_version: Optional[str] = None, - show_stats: Optional[bool] = None, - **kwargs: Any + *, model_version: Optional[str] = None, show_stats: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/keyPhrases") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_languages_request( - *, - model_version: Optional[str] = None, - show_stats: Optional[bool] = None, - **kwargs: Any + *, model_version: Optional[str] = None, show_stats: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/languages") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_sentiment_request( - *, - model_version: Optional[str] = None, - show_stats: Optional[bool] = None, - **kwargs: Any + *, model_version: Optional[str] = None, show_stats: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/sentiment") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class TextAnalyticsClientOperationsMixin(MixinABC): @@ -229,39 +193,35 @@ def entities_recognition_general( :rtype: ~azure.ai.textanalytics.v3_0.models.EntitiesResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntitiesResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntitiesResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_recognition_general_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.entities_recognition_general.metadata['url'], + template_url=self.entities_recognition_general.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -271,15 +231,14 @@ def entities_recognition_general( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntitiesResult', pipeline_response) + deserialized = self._deserialize("EntitiesResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_recognition_general.metadata = {'url': "/entities/recognition/general"} # type: ignore - + entities_recognition_general.metadata = {"url": "/entities/recognition/general"} # type: ignore @distributed_trace def entities_linking( @@ -309,39 +268,35 @@ def entities_linking( :rtype: ~azure.ai.textanalytics.v3_0.models.EntityLinkingResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntityLinkingResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntityLinkingResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_linking_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.entities_linking.metadata['url'], + template_url=self.entities_linking.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -351,15 +306,14 @@ def entities_linking( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntityLinkingResult', pipeline_response) + deserialized = self._deserialize("EntityLinkingResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_linking.metadata = {'url': "/entities/linking"} # type: ignore - + entities_linking.metadata = {"url": "/entities/linking"} # type: ignore @distributed_trace def key_phrases( @@ -389,39 +343,35 @@ def key_phrases( :rtype: ~azure.ai.textanalytics.v3_0.models.KeyPhraseResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.KeyPhraseResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.KeyPhraseResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_key_phrases_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.key_phrases.metadata['url'], + template_url=self.key_phrases.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -431,15 +381,14 @@ def key_phrases( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('KeyPhraseResult', pipeline_response) + deserialized = self._deserialize("KeyPhraseResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - key_phrases.metadata = {'url': "/keyPhrases"} # type: ignore - + key_phrases.metadata = {"url": "/keyPhrases"} # type: ignore @distributed_trace def languages( @@ -470,39 +419,35 @@ def languages( :rtype: ~azure.ai.textanalytics.v3_0.models.LanguageResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.LanguageResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LanguageResult] _input = _models.LanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'LanguageBatchInput') + _json = self._serialize.body(_input, "LanguageBatchInput") request = build_languages_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.languages.metadata['url'], + template_url=self.languages.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -512,15 +457,14 @@ def languages( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('LanguageResult', pipeline_response) + deserialized = self._deserialize("LanguageResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - languages.metadata = {'url': "/languages"} # type: ignore - + languages.metadata = {"url": "/languages"} # type: ignore @distributed_trace def sentiment( @@ -551,39 +495,35 @@ def sentiment( :rtype: ~azure.ai.textanalytics.v3_0.models.SentimentResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.SentimentResponse] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SentimentResponse] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_sentiment_request( model_version=model_version, show_stats=show_stats, content_type=content_type, json=_json, - template_url=self.sentiment.metadata['url'], + template_url=self.sentiment.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -593,12 +533,11 @@ def sentiment( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SentimentResponse', pipeline_response) + deserialized = self._deserialize("SentimentResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - sentiment.metadata = {'url': "/sentiment"} # type: ignore - + sentiment.metadata = {"url": "/sentiment"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_configuration.py index 5a8ea1feb882..823d32cc6f22 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -30,12 +31,7 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :type endpoint: str """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,23 +40,24 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py index 822bc7e6f576..b31c81557cce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze @@ -38,13 +39,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl Retry-After header is present. """ - def __init__( - self, - credential: "TokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/text/analytics/v3.1' + def __init__(self, credential: "TokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/text/analytics/v3.1" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -53,12 +49,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> HttpResponse: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -78,7 +69,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py index 0eb3a4e5d74e..efe7c9bd01b4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py @@ -18,6 +18,7 @@ from .._serialization import Deserializer, Serializer + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) @@ -25,6 +26,7 @@ def _convert_request(request, files=None): request.set_formdata_body(files) return request + def _format_url_section(template, **kwargs): components = template.split("/") while components: @@ -32,13 +34,13 @@ def _format_url_section(template, **kwargs): return template.format(**kwargs) except KeyError as key: formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) + class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/__init__.py index 5a61b782b9af..dc5b94d82970 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/__init__.py @@ -14,7 +14,8 @@ except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk -__all__ = ['TextAnalyticsClient'] + +__all__ = ["TextAnalyticsClient"] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py index 66abf1a5cb60..92eb5c816373 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_configuration.py @@ -17,6 +17,7 @@ VERSION = "unknown" + class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for TextAnalyticsClient. @@ -30,12 +31,7 @@ class TextAnalyticsClientConfiguration(Configuration): # pylint: disable=too-ma :type endpoint: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: super(TextAnalyticsClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,22 +40,21 @@ def __init__( self.credential = credential self.endpoint = endpoint - self.credential_scopes = kwargs.pop('credential_scopes', ['https://cognitiveservices.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'ai-textanalytics/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://cognitiveservices.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "ai-textanalytics/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_patch.py index 74e48ecd07cf..17dbc073e01b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_patch.py @@ -25,7 +25,8 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py index 7fc798038898..e2f7fdafa7a0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py @@ -21,6 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential + class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze @@ -38,13 +39,8 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): # pylint: disabl Retry-After header is present. """ - def __init__( - self, - credential: "AsyncTokenCredential", - endpoint: str, - **kwargs: Any - ) -> None: - _endpoint = '{Endpoint}/text/analytics/v3.1' + def __init__(self, credential: "AsyncTokenCredential", endpoint: str, **kwargs: Any) -> None: + _endpoint = "{Endpoint}/text/analytics/v3.1" self._config = TextAnalyticsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) @@ -53,12 +49,7 @@ def __init__( self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -78,7 +69,7 @@ def _send_request( request_copy = deepcopy(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py index 99dd8eda3b62..31647c5f04bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_vendor.py @@ -21,6 +21,7 @@ class MixinABC(ABC): """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" _config: TextAnalyticsClientConfiguration _serialize: "Serializer" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py index efd62e9d2b4b..7fdaaabdc450 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py @@ -8,8 +8,19 @@ # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload -from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod, AsyncAnalyzeHealthcareEntitiesLROPoller, AsyncAnalyzeHealthcareEntitiesLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from .....aio._lro_async import ( + AsyncAnalyzeActionsLROPoller, + AsyncAnalyzeActionsLROPollingMethod, + AsyncAnalyzeHealthcareEntitiesLROPoller, + AsyncAnalyzeHealthcareEntitiesLROPollingMethod, +) +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -20,28 +31,38 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._text_analytics_client_operations import build_analyze_request, build_analyze_status_request, build_cancel_health_job_request, build_entities_linking_request, build_entities_recognition_general_request, build_entities_recognition_pii_request, build_health_request, build_health_status_request, build_key_phrases_request, build_languages_request, build_sentiment_request +from ...operations._text_analytics_client_operations import ( + build_analyze_request, + build_analyze_status_request, + build_cancel_health_job_request, + build_entities_linking_request, + build_entities_recognition_general_request, + build_entities_recognition_pii_request, + build_health_request, + build_health_status_request, + build_key_phrases_request, + build_languages_request, + build_sentiment_request, +) from .._vendor import MixinABC -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class TextAnalyticsClientOperationsMixin(MixinABC): async def _analyze_initial( - self, - body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, - **kwargs: Any + self, body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, **kwargs: Any ) -> Optional[_models.AnalyzeJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.AnalyzeJobState]] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.AnalyzeJobState]] content_type = content_type or "application/json" _json = None @@ -50,7 +71,7 @@ async def _analyze_initial( _content = body else: if body is not None: - _json = self._serialize.body(body, 'AnalyzeBatchInput') + _json = self._serialize.body(body, "AnalyzeBatchInput") else: _json = None @@ -58,20 +79,18 @@ async def _analyze_initial( content_type=content_type, json=_json, content=_content, - template_url=self._analyze_initial.metadata['url'], + template_url=self._analyze_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -84,27 +103,23 @@ async def _analyze_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('AnalyzeJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _analyze_initial.metadata = {'url': "/analyze"} # type: ignore - + _analyze_initial.metadata = {"url": "/analyze"} # type: ignore @overload async def begin_analyze( - self, - body: Optional[_models.AnalyzeBatchInput] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: Optional[_models.AnalyzeBatchInput] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -133,11 +148,7 @@ async def begin_analyze( @overload async def begin_analyze( - self, - body: Optional[IO] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: Optional[IO] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -164,12 +175,9 @@ async def begin_analyze( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace_async async def begin_analyze( - self, - body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, - **kwargs: Any + self, body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, **kwargs: Any ) -> AsyncAnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -199,64 +207,50 @@ async def begin_analyze( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._analyze_initial( # type: ignore - body=body, - content_type=content_type, - cls=lambda x,y,z: x, - headers=_headers, - params=_params, - **kwargs + body=body, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncAnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncAnalyzeActionsLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncAnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze.metadata = {'url': "/analyze"} # type: ignore + begin_analyze.metadata = {"url": "/analyze"} # type: ignore @distributed_trace_async async def analyze_status( - self, - job_id: str, - show_stats: Optional[bool] = None, - top: int = 20, - skip: int = 0, - **kwargs: Any + self, job_id: str, show_stats: Optional[bool] = None, top: int = 20, skip: int = 0, **kwargs: Any ) -> _models.AnalyzeJobState: """Get analysis status and results. @@ -280,36 +274,31 @@ async def analyze_status( :rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeJobState] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeJobState] - request = build_analyze_status_request( job_id=job_id, show_stats=show_stats, top=top, skip=skip, - template_url=self.analyze_status.metadata['url'], + template_url=self.analyze_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -319,24 +308,18 @@ async def analyze_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_status.metadata = {'url': "/analyze/jobs/{jobId}"} # type: ignore - + analyze_status.metadata = {"url": "/analyze/jobs/{jobId}"} # type: ignore @distributed_trace_async async def health_status( - self, - job_id: str, - top: int = 20, - skip: int = 0, - show_stats: Optional[bool] = None, - **kwargs: Any + self, job_id: str, top: int = 20, skip: int = 0, show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.HealthcareJobState: """Get healthcare analysis job status and results. @@ -358,36 +341,31 @@ async def health_status( :rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.HealthcareJobState] + cls = kwargs.pop("cls", None) # type: ClsType[_models.HealthcareJobState] - request = build_health_status_request( job_id=job_id, top=top, skip=skip, show_stats=show_stats, - template_url=self.health_status.metadata['url'], + template_url=self.health_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -397,48 +375,40 @@ async def health_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('HealthcareJobState', pipeline_response) + deserialized = self._deserialize("HealthcareJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - health_status.metadata = {'url': "/entities/health/jobs/{jobId}"} # type: ignore - + health_status.metadata = {"url": "/entities/health/jobs/{jobId}"} # type: ignore async def _cancel_health_job_initial( # pylint: disable=inconsistent-return-statements - self, - job_id: str, - **kwargs: Any + self, job_id: str, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_cancel_health_job_request( job_id=job_id, - template_url=self._cancel_health_job_initial.metadata['url'], + template_url=self._cancel_health_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -449,21 +419,15 @@ async def _cancel_health_job_initial( # pylint: disable=inconsistent-return-sta raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _cancel_health_job_initial.metadata = {'url': "/entities/health/jobs/{jobId}"} # type: ignore - + _cancel_health_job_initial.metadata = {"url": "/entities/health/jobs/{jobId}"} # type: ignore @distributed_trace_async - async def begin_cancel_health_job( - self, - job_id: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: + async def begin_cancel_health_job(self, job_id: str, **kwargs: Any) -> AsyncLROPoller[None]: """Cancel healthcare prediction job. Cancel healthcare prediction job. @@ -485,51 +449,43 @@ async def begin_cancel_health_job( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._cancel_health_job_initial( # type: ignore - job_id=job_id, - cls=lambda x,y,z: x, - headers=_headers, - params=_params, - **kwargs + job_id=job_id, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncLROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_cancel_health_job.metadata = {'url': "/entities/health/jobs/{jobId}"} # type: ignore + begin_cancel_health_job.metadata = {"url": "/entities/health/jobs/{jobId}"} # type: ignore async def _health_initial( self, @@ -539,19 +495,17 @@ async def _health_initial( logging_opt_out: Optional[bool] = None, **kwargs: Any ) -> Optional[_models.HealthcareJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.HealthcareJobState]] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.HealthcareJobState]] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_health_request( model_version=model_version, @@ -559,20 +513,18 @@ async def _health_initial( logging_opt_out=logging_opt_out, content_type=content_type, json=_json, - template_url=self._health_initial.metadata['url'], + template_url=self._health_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -585,19 +537,19 @@ async def _health_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('HealthcareJobState', pipeline_response) + deserialized = self._deserialize("HealthcareJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _health_initial.metadata = {'url': "/entities/health/jobs"} # type: ignore - + _health_initial.metadata = {"url": "/entities/health/jobs"} # type: ignore @distributed_trace_async async def begin_health( @@ -649,14 +601,11 @@ async def begin_health( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.HealthcareJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.HealthcareJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._health_initial( # type: ignore documents=documents, @@ -664,43 +613,46 @@ async def begin_health( string_index_type=string_index_type, logging_opt_out=logging_opt_out, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('HealthcareJobState', pipeline_response) + deserialized = self._deserialize("HealthcareJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(AsyncPollingMethod, AsyncAnalyzeHealthcareEntitiesLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: AsyncPollingMethod - elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: polling_method = polling + polling_method = cast( + AsyncPollingMethod, + AsyncAnalyzeHealthcareEntitiesLROPollingMethod( + lro_delay, path_format_arguments=path_format_arguments, **kwargs + ), + ) # type: AsyncPollingMethod + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling if cont_token: return AsyncAnalyzeHealthcareEntitiesLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) - return AsyncAnalyzeHealthcareEntitiesLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncAnalyzeHealthcareEntitiesLROPoller( + self._client, raw_result, get_long_running_output, polling_method + ) - begin_health.metadata = {'url': "/entities/health/jobs"} # type: ignore + begin_health.metadata = {"url": "/entities/health/jobs"} # type: ignore @distributed_trace_async async def entities_recognition_general( @@ -746,19 +698,17 @@ async def entities_recognition_general( :rtype: ~azure.ai.textanalytics.v3_1.models.EntitiesResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntitiesResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntitiesResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_recognition_general_request( model_version=model_version, @@ -767,20 +717,18 @@ async def entities_recognition_general( string_index_type=string_index_type, content_type=content_type, json=_json, - template_url=self.entities_recognition_general.metadata['url'], + template_url=self.entities_recognition_general.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -790,15 +738,14 @@ async def entities_recognition_general( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntitiesResult', pipeline_response) + deserialized = self._deserialize("EntitiesResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_recognition_general.metadata = {'url': "/entities/recognition/general"} # type: ignore - + entities_recognition_general.metadata = {"url": "/entities/recognition/general"} # type: ignore @distributed_trace_async async def entities_recognition_pii( @@ -853,19 +800,17 @@ async def entities_recognition_pii( :rtype: ~azure.ai.textanalytics.v3_1.models.PiiResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.PiiResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PiiResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_recognition_pii_request( model_version=model_version, @@ -876,20 +821,18 @@ async def entities_recognition_pii( pii_categories=pii_categories, content_type=content_type, json=_json, - template_url=self.entities_recognition_pii.metadata['url'], + template_url=self.entities_recognition_pii.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -899,15 +842,14 @@ async def entities_recognition_pii( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('PiiResult', pipeline_response) + deserialized = self._deserialize("PiiResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_recognition_pii.metadata = {'url': "/entities/recognition/pii"} # type: ignore - + entities_recognition_pii.metadata = {"url": "/entities/recognition/pii"} # type: ignore @distributed_trace_async async def entities_linking( @@ -952,19 +894,17 @@ async def entities_linking( :rtype: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntityLinkingResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntityLinkingResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_linking_request( model_version=model_version, @@ -973,20 +913,18 @@ async def entities_linking( string_index_type=string_index_type, content_type=content_type, json=_json, - template_url=self.entities_linking.metadata['url'], + template_url=self.entities_linking.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -996,15 +934,14 @@ async def entities_linking( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntityLinkingResult', pipeline_response) + deserialized = self._deserialize("EntityLinkingResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_linking.metadata = {'url': "/entities/linking"} # type: ignore - + entities_linking.metadata = {"url": "/entities/linking"} # type: ignore @distributed_trace_async async def key_phrases( @@ -1043,19 +980,17 @@ async def key_phrases( :rtype: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.KeyPhraseResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.KeyPhraseResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_key_phrases_request( model_version=model_version, @@ -1063,20 +998,18 @@ async def key_phrases( logging_opt_out=logging_opt_out, content_type=content_type, json=_json, - template_url=self.key_phrases.metadata['url'], + template_url=self.key_phrases.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1086,15 +1019,14 @@ async def key_phrases( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('KeyPhraseResult', pipeline_response) + deserialized = self._deserialize("KeyPhraseResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - key_phrases.metadata = {'url': "/keyPhrases"} # type: ignore - + key_phrases.metadata = {"url": "/keyPhrases"} # type: ignore @distributed_trace_async async def languages( @@ -1134,19 +1066,17 @@ async def languages( :rtype: ~azure.ai.textanalytics.v3_1.models.LanguageResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.LanguageResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LanguageResult] _input = _models.LanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'LanguageBatchInput') + _json = self._serialize.body(_input, "LanguageBatchInput") request = build_languages_request( model_version=model_version, @@ -1154,20 +1084,18 @@ async def languages( logging_opt_out=logging_opt_out, content_type=content_type, json=_json, - template_url=self.languages.metadata['url'], + template_url=self.languages.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1177,15 +1105,14 @@ async def languages( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('LanguageResult', pipeline_response) + deserialized = self._deserialize("LanguageResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - languages.metadata = {'url': "/languages"} # type: ignore - + languages.metadata = {"url": "/languages"} # type: ignore @distributed_trace_async async def sentiment( @@ -1235,19 +1162,17 @@ async def sentiment( :rtype: ~azure.ai.textanalytics.v3_1.models.SentimentResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.SentimentResponse] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SentimentResponse] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_sentiment_request( model_version=model_version, @@ -1257,20 +1182,18 @@ async def sentiment( string_index_type=string_index_type, content_type=content_type, json=_json, - template_url=self.sentiment.metadata['url'], + template_url=self.sentiment.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1280,12 +1203,11 @@ async def sentiment( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SentimentResponse', pipeline_response) + deserialized = self._deserialize("SentimentResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - sentiment.metadata = {'url': "/sentiment"} # type: ignore - + sentiment.metadata = {"url": "/sentiment"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/__init__.py index 69ea28c41ef4..9b73f3b392a1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/__init__.py @@ -105,101 +105,102 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'AnalysisInput', - 'AnalyzeBatchInput', - 'AnalyzeJobDisplayName', - 'AnalyzeJobErrorsAndStatistics', - 'AnalyzeJobMetadata', - 'AnalyzeJobState', - 'DetectedLanguage', - 'DocumentEntities', - 'DocumentError', - 'DocumentHealthcareEntities', - 'DocumentKeyPhrases', - 'DocumentLanguage', - 'DocumentLinkedEntities', - 'DocumentSentiment', - 'DocumentStatistics', - 'EntitiesResult', - 'EntitiesTask', - 'EntitiesTaskParameters', - 'EntitiesTaskResult', - 'Entity', - 'EntityLinkingResult', - 'EntityLinkingTask', - 'EntityLinkingTaskParameters', - 'EntityLinkingTaskResult', - 'ErrorResponse', - 'HealthcareAssertion', - 'HealthcareEntity', - 'HealthcareEntityLink', - 'HealthcareEntityProperties', - 'HealthcareJobState', - 'HealthcareLinkingProperties', - 'HealthcareRelation', - 'HealthcareRelationEntity', - 'HealthcareResult', - 'HealthcareTaskResult', - 'InnerError', - 'JobDescriptor', - 'JobManifest', - 'JobManifestTasks', - 'JobMetadata', - 'KeyPhraseResult', - 'KeyPhraseTaskResult', - 'KeyPhrasesTask', - 'KeyPhrasesTaskParameters', - 'LanguageBatchInput', - 'LanguageInput', - 'LanguageResult', - 'LinkedEntity', - 'Match', - 'MultiLanguageBatchInput', - 'MultiLanguageInput', - 'Pagination', - 'PiiDocumentEntities', - 'PiiResult', - 'PiiTask', - 'PiiTaskParameters', - 'PiiTaskResult', - 'RequestStatistics', - 'SentenceAssessment', - 'SentenceSentiment', - 'SentenceTarget', - 'SentimentAnalysisTask', - 'SentimentAnalysisTaskParameters', - 'SentimentConfidenceScorePerLabel', - 'SentimentResponse', - 'SentimentTaskResult', - 'TargetConfidenceScoreLabel', - 'TargetRelation', - 'TaskState', - 'TasksState', - 'TasksStateTasks', - 'TasksStateTasksEntityLinkingTasksItem', - 'TasksStateTasksEntityRecognitionPiiTasksItem', - 'TasksStateTasksEntityRecognitionTasksItem', - 'TasksStateTasksKeyPhraseExtractionTasksItem', - 'TasksStateTasksSentimentAnalysisTasksItem', - 'TextAnalyticsError', - 'TextAnalyticsWarning', - 'Association', - 'Certainty', - 'Conditionality', - 'DocumentSentimentValue', - 'ErrorCodeValue', - 'HealthcareEntityCategory', - 'InnerErrorCodeValue', - 'PiiCategory', - 'PiiTaskParametersDomain', - 'RelationType', - 'SentenceSentimentValue', - 'State', - 'StringIndexType', - 'TargetRelationType', - 'TokenSentimentValue', - 'WarningCodeValue', + "AnalysisInput", + "AnalyzeBatchInput", + "AnalyzeJobDisplayName", + "AnalyzeJobErrorsAndStatistics", + "AnalyzeJobMetadata", + "AnalyzeJobState", + "DetectedLanguage", + "DocumentEntities", + "DocumentError", + "DocumentHealthcareEntities", + "DocumentKeyPhrases", + "DocumentLanguage", + "DocumentLinkedEntities", + "DocumentSentiment", + "DocumentStatistics", + "EntitiesResult", + "EntitiesTask", + "EntitiesTaskParameters", + "EntitiesTaskResult", + "Entity", + "EntityLinkingResult", + "EntityLinkingTask", + "EntityLinkingTaskParameters", + "EntityLinkingTaskResult", + "ErrorResponse", + "HealthcareAssertion", + "HealthcareEntity", + "HealthcareEntityLink", + "HealthcareEntityProperties", + "HealthcareJobState", + "HealthcareLinkingProperties", + "HealthcareRelation", + "HealthcareRelationEntity", + "HealthcareResult", + "HealthcareTaskResult", + "InnerError", + "JobDescriptor", + "JobManifest", + "JobManifestTasks", + "JobMetadata", + "KeyPhraseResult", + "KeyPhraseTaskResult", + "KeyPhrasesTask", + "KeyPhrasesTaskParameters", + "LanguageBatchInput", + "LanguageInput", + "LanguageResult", + "LinkedEntity", + "Match", + "MultiLanguageBatchInput", + "MultiLanguageInput", + "Pagination", + "PiiDocumentEntities", + "PiiResult", + "PiiTask", + "PiiTaskParameters", + "PiiTaskResult", + "RequestStatistics", + "SentenceAssessment", + "SentenceSentiment", + "SentenceTarget", + "SentimentAnalysisTask", + "SentimentAnalysisTaskParameters", + "SentimentConfidenceScorePerLabel", + "SentimentResponse", + "SentimentTaskResult", + "TargetConfidenceScoreLabel", + "TargetRelation", + "TaskState", + "TasksState", + "TasksStateTasks", + "TasksStateTasksEntityLinkingTasksItem", + "TasksStateTasksEntityRecognitionPiiTasksItem", + "TasksStateTasksEntityRecognitionTasksItem", + "TasksStateTasksKeyPhraseExtractionTasksItem", + "TasksStateTasksSentimentAnalysisTasksItem", + "TextAnalyticsError", + "TextAnalyticsWarning", + "Association", + "Certainty", + "Conditionality", + "DocumentSentimentValue", + "ErrorCodeValue", + "HealthcareEntityCategory", + "InnerErrorCodeValue", + "PiiCategory", + "PiiTaskParametersDomain", + "RelationType", + "SentenceSentimentValue", + "State", + "StringIndexType", + "TargetRelationType", + "TokenSentimentValue", + "WarningCodeValue", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py index a9d102f86687..2060bc5cbd00 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py @@ -28,19 +28,14 @@ class AnalysisInput(_serialization.Model): """ _validation = { - 'analysis_input': {'required': True}, + "analysis_input": {"required": True}, } _attribute_map = { "analysis_input": {"key": "analysisInput", "type": "MultiLanguageBatchInput"}, } - def __init__( - self, - *, - analysis_input: "_models.MultiLanguageBatchInput", - **kwargs - ): + def __init__(self, *, analysis_input: "_models.MultiLanguageBatchInput", **kwargs): """ :keyword analysis_input: Contains a set of input documents to be analyzed by the service. Required. @@ -61,19 +56,14 @@ class JobManifest(_serialization.Model): """ _validation = { - 'tasks': {'required': True}, + "tasks": {"required": True}, } _attribute_map = { "tasks": {"key": "tasks", "type": "JobManifestTasks"}, } - def __init__( - self, - *, - tasks: "_models.JobManifestTasks", - **kwargs - ): + def __init__(self, *, tasks: "_models.JobManifestTasks", **kwargs): """ :keyword tasks: The set of tasks to execute on the input documents. Cannot specify the same task more than once. Required. @@ -94,12 +84,7 @@ class JobDescriptor(_serialization.Model): "display_name": {"key": "displayName", "type": "str"}, } - def __init__( - self, - *, - display_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, display_name: Optional[str] = None, **kwargs): """ :keyword display_name: Optional display name for the analysis job. :paramtype display_name: str @@ -124,8 +109,8 @@ class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): """ _validation = { - 'tasks': {'required': True}, - 'analysis_input': {'required': True}, + "tasks": {"required": True}, + "analysis_input": {"required": True}, } _attribute_map = { @@ -169,12 +154,7 @@ class AnalyzeJobDisplayName(_serialization.Model): "display_name": {"key": "displayName", "type": "str"}, } - def __init__( - self, - *, - display_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, display_name: Optional[str] = None, **kwargs): """ :keyword display_name: :paramtype display_name: str @@ -236,10 +216,10 @@ class JobMetadata(_serialization.Model): """ _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -302,10 +282,10 @@ class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): """ _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -343,7 +323,15 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, display_name=display_name, **kwargs) + super().__init__( + created_date_time=created_date_time, + expiration_date_time=expiration_date_time, + job_id=job_id, + last_update_date_time=last_update_date_time, + status=status, + display_name=display_name, + **kwargs + ) self.display_name = display_name self.created_date_time = created_date_time self.expiration_date_time = expiration_date_time @@ -363,12 +351,7 @@ class Pagination(_serialization.Model): "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, next_link: Optional[str] = None, **kwargs): """ :keyword next_link: :paramtype next_link: str @@ -387,19 +370,14 @@ class TasksState(_serialization.Model): """ _validation = { - 'tasks': {'required': True}, + "tasks": {"required": True}, } _attribute_map = { "tasks": {"key": "tasks", "type": "TasksStateTasks"}, } - def __init__( - self, - *, - tasks: "_models.TasksStateTasks", - **kwargs - ): + def __init__(self, *, tasks: "_models.TasksStateTasks", **kwargs): """ :keyword tasks: Required. :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks @@ -438,11 +416,11 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist """ _validation = { - 'tasks': {'required': True}, - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "tasks": {"required": True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -497,7 +475,19 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, tasks=tasks, errors=errors, statistics=statistics, next_link=next_link, **kwargs) + super().__init__( + display_name=display_name, + created_date_time=created_date_time, + expiration_date_time=expiration_date_time, + job_id=job_id, + last_update_date_time=last_update_date_time, + status=status, + tasks=tasks, + errors=errors, + statistics=statistics, + next_link=next_link, + **kwargs + ) self.next_link = next_link self.errors = errors self.statistics = statistics @@ -526,9 +516,9 @@ class DetectedLanguage(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'iso6391_name': {'required': True}, - 'confidence_score': {'required': True}, + "name": {"required": True}, + "iso6391_name": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -537,14 +527,7 @@ class DetectedLanguage(_serialization.Model): "confidence_score": {"key": "confidenceScore", "type": "float"}, } - def __init__( - self, - *, - name: str, - iso6391_name: str, - confidence_score: float, - **kwargs - ): + def __init__(self, *, name: str, iso6391_name: str, confidence_score: float, **kwargs): """ :keyword name: Long name of a detected language (e.g. English, French). Required. :paramtype name: str @@ -578,9 +561,9 @@ class DocumentEntities(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "entities": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -629,8 +612,8 @@ class DocumentError(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'error': {'required': True}, + "id": {"required": True}, + "error": {"required": True}, } _attribute_map = { @@ -638,13 +621,7 @@ class DocumentError(_serialization.Model): "error": {"key": "error", "type": "TextAnalyticsError"}, } - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - error: "_models.TextAnalyticsError", - **kwargs - ): + def __init__(self, *, id: str, error: "_models.TextAnalyticsError", **kwargs): # pylint: disable=redefined-builtin """ :keyword id: Document Id. Required. :paramtype id: str @@ -675,10 +652,10 @@ class DocumentHealthcareEntities(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "entities": {"required": True}, + "relations": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -738,9 +715,9 @@ class DocumentKeyPhrases(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'key_phrases': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "key_phrases": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -795,9 +772,9 @@ class DocumentLanguage(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'detected_language': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "detected_language": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -851,9 +828,9 @@ class DocumentLinkedEntities(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "entities": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -914,11 +891,11 @@ class DocumentSentiment(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "sentences": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -980,8 +957,8 @@ class DocumentStatistics(_serialization.Model): """ _validation = { - 'characters_count': {'required': True}, - 'transactions_count': {'required': True}, + "characters_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -989,13 +966,7 @@ class DocumentStatistics(_serialization.Model): "transactions_count": {"key": "transactionsCount", "type": "int"}, } - def __init__( - self, - *, - characters_count: int, - transactions_count: int, - **kwargs - ): + def __init__(self, *, characters_count: int, transactions_count: int, **kwargs): """ :keyword characters_count: Number of text elements recognized in the document. Required. :paramtype characters_count: int @@ -1024,9 +995,9 @@ class EntitiesResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -1147,12 +1118,7 @@ class EntitiesTaskResult(_serialization.Model): "results": {"key": "results", "type": "EntitiesResult"}, } - def __init__( - self, - *, - results: Optional["_models.EntitiesResult"] = None, - **kwargs - ): + def __init__(self, *, results: Optional["_models.EntitiesResult"] = None, **kwargs): """ :keyword results: :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult @@ -1183,11 +1149,11 @@ class Entity(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -1252,9 +1218,9 @@ class EntityLinkingResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -1375,12 +1341,7 @@ class EntityLinkingTaskResult(_serialization.Model): "results": {"key": "results", "type": "EntityLinkingResult"}, } - def __init__( - self, - *, - results: Optional["_models.EntityLinkingResult"] = None, - **kwargs - ): + def __init__(self, *, results: Optional["_models.EntityLinkingResult"] = None, **kwargs): """ :keyword results: :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult @@ -1399,19 +1360,14 @@ class ErrorResponse(_serialization.Model): """ _validation = { - 'error': {'required': True}, + "error": {"required": True}, } _attribute_map = { "error": {"key": "error", "type": "TextAnalyticsError"}, } - def __init__( - self, - *, - error: "_models.TextAnalyticsError", - **kwargs - ): + def __init__(self, *, error: "_models.TextAnalyticsError", **kwargs): """ :keyword error: Document Error. Required. :paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError @@ -1533,11 +1489,11 @@ class HealthcareEntityProperties(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -1624,11 +1580,11 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): """ _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, + "text": {"required": True}, + "category": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "confidence_score": {"required": True}, } _attribute_map = { @@ -1685,7 +1641,18 @@ def __init__( :keyword confidence_score: Confidence score between 0 and 1 of the extracted entity. Required. :paramtype confidence_score: float """ - super().__init__(text=text, category=category, subcategory=subcategory, offset=offset, length=length, confidence_score=confidence_score, assertion=assertion, name=name, links=links, **kwargs) + super().__init__( + text=text, + category=category, + subcategory=subcategory, + offset=offset, + length=length, + confidence_score=confidence_score, + assertion=assertion, + name=name, + links=links, + **kwargs + ) self.assertion = assertion self.name = name self.links = links @@ -1709,8 +1676,8 @@ class HealthcareEntityLink(_serialization.Model): """ _validation = { - 'data_source': {'required': True}, - 'id': {'required': True}, + "data_source": {"required": True}, + "id": {"required": True}, } _attribute_map = { @@ -1718,13 +1685,7 @@ class HealthcareEntityLink(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__( - self, - *, - data_source: str, - id: str, # pylint: disable=redefined-builtin - **kwargs - ): + def __init__(self, *, data_source: str, id: str, **kwargs): # pylint: disable=redefined-builtin """ :keyword data_source: Entity Catalog. Examples include: UMLS, CHV, MSH, etc. Required. :paramtype data_source: str @@ -1793,10 +1754,10 @@ class HealthcareJobState(JobMetadata, HealthcareTaskResult, Pagination): """ _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, + "created_date_time": {"required": True}, + "job_id": {"required": True}, + "last_update_date_time": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -1842,7 +1803,17 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, results=results, errors=errors, next_link=next_link, **kwargs) + super().__init__( + created_date_time=created_date_time, + expiration_date_time=expiration_date_time, + job_id=job_id, + last_update_date_time=last_update_date_time, + status=status, + results=results, + errors=errors, + next_link=next_link, + **kwargs + ) self.next_link = next_link self.results = results self.errors = errors @@ -1871,8 +1842,8 @@ class HealthcareRelation(_serialization.Model): """ _validation = { - 'relation_type': {'required': True}, - 'entities': {'required': True}, + "relation_type": {"required": True}, + "entities": {"required": True}, } _attribute_map = { @@ -1919,8 +1890,8 @@ class HealthcareRelationEntity(_serialization.Model): """ _validation = { - 'ref': {'required': True}, - 'role': {'required': True}, + "ref": {"required": True}, + "role": {"required": True}, } _attribute_map = { @@ -1928,13 +1899,7 @@ class HealthcareRelationEntity(_serialization.Model): "role": {"key": "role", "type": "str"}, } - def __init__( - self, - *, - ref: str, - role: str, - **kwargs - ): + def __init__(self, *, ref: str, role: str, **kwargs): """ :keyword ref: Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . Required. @@ -1966,9 +1931,9 @@ class HealthcareResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -2026,8 +1991,8 @@ class InnerError(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -2144,9 +2109,9 @@ class KeyPhraseResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -2229,13 +2194,7 @@ class KeyPhrasesTaskParameters(_serialization.Model): "logging_opt_out": {"key": "loggingOptOut", "type": "bool"}, } - def __init__( - self, - *, - model_version: str = "latest", - logging_opt_out: bool = False, - **kwargs - ): + def __init__(self, *, model_version: str = "latest", logging_opt_out: bool = False, **kwargs): """ :keyword model_version: :paramtype model_version: str @@ -2258,12 +2217,7 @@ class KeyPhraseTaskResult(_serialization.Model): "results": {"key": "results", "type": "KeyPhraseResult"}, } - def __init__( - self, - *, - results: Optional["_models.KeyPhraseResult"] = None, - **kwargs - ): + def __init__(self, *, results: Optional["_models.KeyPhraseResult"] = None, **kwargs): """ :keyword results: :paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult @@ -2282,19 +2236,14 @@ class LanguageBatchInput(_serialization.Model): """ _validation = { - 'documents': {'required': True}, + "documents": {"required": True}, } _attribute_map = { "documents": {"key": "documents", "type": "[LanguageInput]"}, } - def __init__( - self, - *, - documents: List["_models.LanguageInput"], - **kwargs - ): + def __init__(self, *, documents: List["_models.LanguageInput"], **kwargs): """ :keyword documents: Required. :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] @@ -2317,8 +2266,8 @@ class LanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -2328,12 +2277,7 @@ class LanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - country_hint: Optional[str] = None, - **kwargs + self, *, id: str, text: str, country_hint: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: Unique, non-empty document identifier. Required. @@ -2366,9 +2310,9 @@ class LanguageResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -2427,11 +2371,11 @@ class LinkedEntity(_serialization.Model): """ _validation = { - 'name': {'required': True}, - 'matches': {'required': True}, - 'language': {'required': True}, - 'url': {'required': True}, - 'data_source': {'required': True}, + "name": {"required": True}, + "matches": {"required": True}, + "language": {"required": True}, + "url": {"required": True}, + "data_source": {"required": True}, } _attribute_map = { @@ -2500,10 +2444,10 @@ class Match(_serialization.Model): """ _validation = { - 'confidence_score': {'required': True}, - 'text': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "confidence_score": {"required": True}, + "text": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -2513,15 +2457,7 @@ class Match(_serialization.Model): "length": {"key": "length", "type": "int"}, } - def __init__( - self, - *, - confidence_score: float, - text: str, - offset: int, - length: int, - **kwargs - ): + def __init__(self, *, confidence_score: float, text: str, offset: int, length: int, **kwargs): """ :keyword confidence_score: If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. Required. @@ -2550,19 +2486,14 @@ class MultiLanguageBatchInput(_serialization.Model): """ _validation = { - 'documents': {'required': True}, + "documents": {"required": True}, } _attribute_map = { "documents": {"key": "documents", "type": "[MultiLanguageInput]"}, } - def __init__( - self, - *, - documents: List["_models.MultiLanguageInput"], - **kwargs - ): + def __init__(self, *, documents: List["_models.MultiLanguageInput"], **kwargs): """ :keyword documents: The set of documents to process as part of this batch. Required. :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] @@ -2587,8 +2518,8 @@ class MultiLanguageInput(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'text': {'required': True}, + "id": {"required": True}, + "text": {"required": True}, } _attribute_map = { @@ -2598,12 +2529,7 @@ class MultiLanguageInput(_serialization.Model): } def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - text: str, - language: Optional[str] = None, - **kwargs + self, *, id: str, text: str, language: Optional[str] = None, **kwargs # pylint: disable=redefined-builtin ): """ :keyword id: A unique, non-empty document identifier. Required. @@ -2640,10 +2566,10 @@ class PiiDocumentEntities(_serialization.Model): """ _validation = { - 'id': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, + "id": {"required": True}, + "redacted_text": {"required": True}, + "entities": {"required": True}, + "warnings": {"required": True}, } _attribute_map = { @@ -2702,9 +2628,9 @@ class PiiResult(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -2756,11 +2682,7 @@ class PiiTask(_serialization.Model): } def __init__( - self, - *, - parameters: Optional["_models.PiiTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs + self, *, parameters: Optional["_models.PiiTaskParameters"] = None, task_name: Optional[str] = None, **kwargs ): """ :keyword parameters: @@ -2790,7 +2712,7 @@ class PiiTaskParameters(_serialization.Model): """ _validation = { - 'pii_categories': {'unique': True}, + "pii_categories": {"unique": True}, } _attribute_map = { @@ -2843,12 +2765,7 @@ class PiiTaskResult(_serialization.Model): "results": {"key": "results", "type": "PiiResult"}, } - def __init__( - self, - *, - results: Optional["_models.PiiResult"] = None, - **kwargs - ): + def __init__(self, *, results: Optional["_models.PiiResult"] = None, **kwargs): """ :keyword results: :paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult @@ -2875,10 +2792,10 @@ class RequestStatistics(_serialization.Model): """ _validation = { - 'documents_count': {'required': True}, - 'valid_documents_count': {'required': True}, - 'erroneous_documents_count': {'required': True}, - 'transactions_count': {'required': True}, + "documents_count": {"required": True}, + "valid_documents_count": {"required": True}, + "erroneous_documents_count": {"required": True}, + "transactions_count": {"required": True}, } _attribute_map = { @@ -2937,12 +2854,12 @@ class SentenceAssessment(_serialization.Model): """ _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'is_negated': {'required': True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "text": {"required": True}, + "is_negated": {"required": True}, } _attribute_map = { @@ -3014,11 +2931,11 @@ class SentenceSentiment(_serialization.Model): """ _validation = { - 'text': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, + "text": {"required": True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, } _attribute_map = { @@ -3095,12 +3012,12 @@ class SentenceTarget(_serialization.Model): """ _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'relations': {'required': True}, + "sentiment": {"required": True}, + "confidence_scores": {"required": True}, + "offset": {"required": True}, + "length": {"required": True}, + "text": {"required": True}, + "relations": {"required": True}, } _attribute_map = { @@ -3243,9 +3160,9 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'neutral': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "neutral": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -3254,14 +3171,7 @@ class SentimentConfidenceScorePerLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - neutral: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, neutral: float, negative: float, **kwargs): """ :keyword positive: Required. :paramtype positive: float @@ -3293,9 +3203,9 @@ class SentimentResponse(_serialization.Model): """ _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, + "documents": {"required": True}, + "errors": {"required": True}, + "model_version": {"required": True}, } _attribute_map = { @@ -3343,12 +3253,7 @@ class SentimentTaskResult(_serialization.Model): "results": {"key": "results", "type": "SentimentResponse"}, } - def __init__( - self, - *, - results: Optional["_models.SentimentResponse"] = None, - **kwargs - ): + def __init__(self, *, results: Optional["_models.SentimentResponse"] = None, **kwargs): """ :keyword results: :paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse @@ -3369,8 +3274,8 @@ class TargetConfidenceScoreLabel(_serialization.Model): """ _validation = { - 'positive': {'required': True}, - 'negative': {'required': True}, + "positive": {"required": True}, + "negative": {"required": True}, } _attribute_map = { @@ -3378,13 +3283,7 @@ class TargetConfidenceScoreLabel(_serialization.Model): "negative": {"key": "negative", "type": "float"}, } - def __init__( - self, - *, - positive: float, - negative: float, - **kwargs - ): + def __init__(self, *, positive: float, negative: float, **kwargs): """ :keyword positive: Required. :paramtype positive: float @@ -3409,8 +3308,8 @@ class TargetRelation(_serialization.Model): """ _validation = { - 'relation_type': {'required': True}, - 'ref': {'required': True}, + "relation_type": {"required": True}, + "ref": {"required": True}, } _attribute_map = { @@ -3418,13 +3317,7 @@ class TargetRelation(_serialization.Model): "ref": {"key": "ref", "type": "str"}, } - def __init__( - self, - *, - relation_type: Union[str, "_models.TargetRelationType"], - ref: str, - **kwargs - ): + def __init__(self, *, relation_type: Union[str, "_models.TargetRelationType"], ref: str, **kwargs): """ :keyword relation_type: The type related to the target. Required. Known values are: "assessment" and "target". @@ -3468,10 +3361,10 @@ class TasksStateTasks(_serialization.Model): """ _validation = { - 'completed': {'required': True}, - 'failed': {'required': True}, - 'in_progress': {'required': True}, - 'total': {'required': True}, + "completed": {"required": True}, + "failed": {"required": True}, + "in_progress": {"required": True}, + "total": {"required": True}, } _attribute_map = { @@ -3479,11 +3372,23 @@ class TasksStateTasks(_serialization.Model): "failed": {"key": "failed", "type": "int"}, "in_progress": {"key": "inProgress", "type": "int"}, "total": {"key": "total", "type": "int"}, - "entity_recognition_tasks": {"key": "entityRecognitionTasks", "type": "[TasksStateTasksEntityRecognitionTasksItem]"}, - "entity_recognition_pii_tasks": {"key": "entityRecognitionPiiTasks", "type": "[TasksStateTasksEntityRecognitionPiiTasksItem]"}, - "key_phrase_extraction_tasks": {"key": "keyPhraseExtractionTasks", "type": "[TasksStateTasksKeyPhraseExtractionTasksItem]"}, + "entity_recognition_tasks": { + "key": "entityRecognitionTasks", + "type": "[TasksStateTasksEntityRecognitionTasksItem]", + }, + "entity_recognition_pii_tasks": { + "key": "entityRecognitionPiiTasks", + "type": "[TasksStateTasksEntityRecognitionPiiTasksItem]", + }, + "key_phrase_extraction_tasks": { + "key": "keyPhraseExtractionTasks", + "type": "[TasksStateTasksKeyPhraseExtractionTasksItem]", + }, "entity_linking_tasks": {"key": "entityLinkingTasks", "type": "[TasksStateTasksEntityLinkingTasksItem]"}, - "sentiment_analysis_tasks": {"key": "sentimentAnalysisTasks", "type": "[TasksStateTasksSentimentAnalysisTasksItem]"}, + "sentiment_analysis_tasks": { + "key": "sentimentAnalysisTasks", + "type": "[TasksStateTasksSentimentAnalysisTasksItem]", + }, } def __init__( @@ -3552,9 +3457,9 @@ class TaskState(_serialization.Model): """ _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "task_name": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -3564,12 +3469,7 @@ class TaskState(_serialization.Model): } def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "_models.State"], - **kwargs + self, *, last_update_date_time: datetime.datetime, task_name: str, status: Union[str, "_models.State"], **kwargs ): """ :keyword last_update_date_time: Required. @@ -3603,9 +3503,9 @@ class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "task_name": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -3635,7 +3535,9 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + super().__init__( + last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs + ) self.results = results self.last_update_date_time = last_update_date_time self.task_name = task_name @@ -3659,9 +3561,9 @@ class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "task_name": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -3691,7 +3593,9 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + super().__init__( + last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs + ) self.results = results self.last_update_date_time = last_update_date_time self.task_name = task_name @@ -3715,9 +3619,9 @@ class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "task_name": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -3747,7 +3651,9 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + super().__init__( + last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs + ) self.results = results self.last_update_date_time = last_update_date_time self.task_name = task_name @@ -3771,9 +3677,9 @@ class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult """ _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "task_name": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -3803,7 +3709,9 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + super().__init__( + last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs + ) self.results = results self.last_update_date_time = last_update_date_time self.task_name = task_name @@ -3827,9 +3735,9 @@ class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): """ _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, + "last_update_date_time": {"required": True}, + "task_name": {"required": True}, + "status": {"required": True}, } _attribute_map = { @@ -3859,7 +3767,9 @@ def __init__( "rejected", "cancelled", and "cancelling". :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State """ - super().__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + super().__init__( + last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs + ) self.results = results self.last_update_date_time = last_update_date_time self.task_name = task_name @@ -3885,8 +3795,8 @@ class TextAnalyticsError(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -3943,8 +3853,8 @@ class TextAnalyticsWarning(_serialization.Model): """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + "code": {"required": True}, + "message": {"required": True}, } _attribute_map = { @@ -3954,12 +3864,7 @@ class TextAnalyticsWarning(_serialization.Model): } def __init__( - self, - *, - code: Union[str, "_models.WarningCodeValue"], - message: str, - target_ref: Optional[str] = None, - **kwargs + self, *, code: Union[str, "_models.WarningCodeValue"], message: str, target_ref: Optional[str] = None, **kwargs ): """ :keyword code: Error code. Required. Known values are: "LongWordsInDocument" and diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py index 8e3594d2b04d..ae136007a23f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py @@ -11,15 +11,14 @@ class Association(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes if the entity is the subject of the text or if it describes someone else. - """ + """Describes if the entity is the subject of the text or if it describes someone else.""" SUBJECT = "subject" OTHER = "other" + class Certainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes the entities certainty and polarity. - """ + """Describes the entities certainty and polarity.""" POSITIVE = "positive" POSITIVE_POSSIBLE = "positivePossible" @@ -27,25 +26,25 @@ class Certainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): NEGATIVE_POSSIBLE = "negativePossible" NEGATIVE = "negative" + class Conditionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes any conditionality on the entity. - """ + """Describes any conditionality on the entity.""" HYPOTHETICAL = "hypothetical" CONDITIONAL = "conditional" + class DocumentSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - """ + """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" MIXED = "mixed" + class ErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" INVALID_REQUEST = "InvalidRequest" INVALID_ARGUMENT = "InvalidArgument" @@ -53,9 +52,9 @@ class ErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): SERVICE_UNAVAILABLE = "ServiceUnavailable" NOT_FOUND = "NotFound" + class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Healthcare Entity Category. - """ + """Healthcare Entity Category.""" BODY_STRUCTURE = "BodyStructure" AGE = "Age" @@ -84,9 +83,9 @@ class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): FAMILY_RELATION = "FamilyRelation" TREATMENT_NAME = "TreatmentName" + class InnerErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" INVALID_PARAMETER_VALUE = "InvalidParameterValue" INVALID_REQUEST_BODY_FORMAT = "InvalidRequestBodyFormat" @@ -98,9 +97,9 @@ class InnerErrorCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" INVALID_COUNTRY_HINT = "InvalidCountryHint" + class PiiCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PiiCategory. - """ + """PiiCategory.""" ABA_ROUTING_NUMBER = "ABARoutingNumber" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" @@ -276,16 +275,16 @@ class PiiCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): ALL = "All" DEFAULT = "Default" + class PiiTaskParametersDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PiiTaskParametersDomain. - """ + """PiiTaskParametersDomain.""" PHI = "phi" NONE = "none" + class RelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. - """ + """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc.""" ABBREVIATION = "Abbreviation" DIRECTION_OF_BODY_STRUCTURE = "DirectionOfBodyStructure" @@ -309,17 +308,17 @@ class RelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): VALUE_OF_CONDITION = "ValueOfCondition" VALUE_OF_EXAMINATION = "ValueOfExamination" + class SentenceSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The predicted Sentiment for the sentence. - """ + """The predicted Sentiment for the sentence.""" POSITIVE = "positive" NEUTRAL = "neutral" NEGATIVE = "negative" + class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State. - """ + """State.""" NOT_STARTED = "notStarted" RUNNING = "running" @@ -329,9 +328,9 @@ class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): CANCELLED = "cancelled" CANCELLING = "cancelling" + class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """StringIndexType. - """ + """StringIndexType.""" #: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme #: clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is @@ -344,24 +343,24 @@ class StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: application is written in a language that support Unicode, for example Java, JavaScript. UTF16_CODE_UNIT = "Utf16CodeUnit" + class TargetRelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type related to the target. - """ + """The type related to the target.""" ASSESSMENT = "assessment" TARGET = "target" + class TokenSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Targeted sentiment in the sentence. - """ + """Targeted sentiment in the sentence.""" POSITIVE = "positive" MIXED = "mixed" NEGATIVE = "negative" + class WarningCodeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Error code. - """ + """Error code.""" LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" DOCUMENT_TRUNCATED = "DocumentTruncated" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/__init__.py index 714c39805ebe..eea19ea68923 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/__init__.py @@ -11,8 +11,9 @@ from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk + __all__ = [ - 'TextAnalyticsClientOperationsMixin', + "TextAnalyticsClientOperationsMixin", ] __all__.extend([p for p in _patch_all if p not in __all__]) -_patch_sdk() \ No newline at end of file +_patch_sdk() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_patch.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_patch.py index 0ad201a8c586..455941122974 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_patch.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_patch.py @@ -6,10 +6,12 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level + def patch_sdk(): """Do not remove from this file. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py index ccd3cc62e001..bddc30454728 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py @@ -8,8 +8,19 @@ # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload -from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod, AnalyzeHealthcareEntitiesLROPoller, AnalyzeHealthcareEntitiesLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from ...._lro import ( + AnalyzeActionsLROPoller, + AnalyzeActionsLROPollingMethod, + AnalyzeHealthcareEntitiesLROPoller, + AnalyzeHealthcareEntitiesLROPollingMethod, +) +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod @@ -21,143 +32,108 @@ from .. import models as _models from ..._serialization import Serializer from .._vendor import MixinABC, _convert_request, _format_url_section -T = TypeVar('T') + +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_analyze_request( - **kwargs: Any -) -> HttpRequest: + +def build_analyze_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/analyze") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) def build_analyze_status_request( - job_id: str, - *, - show_stats: Optional[bool] = None, - top: int = 20, - skip: int = 0, - **kwargs: Any + job_id: str, *, show_stats: Optional[bool] = None, top: int = 20, skip: int = 0, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json, text/json") + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/analyze/jobs/{jobId}") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if top is not None: - _params['$top'] = _SERIALIZER.query("top", top, 'int', maximum=50, minimum=1) + _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=50, minimum=1) if skip is not None: - _params['$skip'] = _SERIALIZER.query("skip", skip, 'int', minimum=0) + _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_health_status_request( - job_id: str, - *, - top: int = 20, - skip: int = 0, - show_stats: Optional[bool] = None, - **kwargs: Any + job_id: str, *, top: int = 20, skip: int = 0, show_stats: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - accept = _headers.pop('Accept', "application/json, text/json") + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/health/jobs/{jobId}") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct parameters if top is not None: - _params['$top'] = _SERIALIZER.query("top", top, 'int', maximum=50, minimum=1) + _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=50, minimum=1) if skip is not None: - _params['$skip'] = _SERIALIZER.query("skip", skip, 'int', minimum=0) + _params["$skip"] = _SERIALIZER.query("skip", skip, "int", minimum=0) if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="GET", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_cancel_health_job_request( - job_id: str, - **kwargs: Any -) -> HttpRequest: +def build_cancel_health_job_request(job_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - accept = _headers.pop('Accept', "application/json, text/json") + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/health/jobs/{jobId}") path_format_arguments = { - "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), } _url = _format_url_section(_url, **path_format_arguments) # Construct headers - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="DELETE", - url=_url, - headers=_headers, - **kwargs - ) + return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) def build_health_request( @@ -170,32 +146,26 @@ def build_health_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/health/jobs") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_entities_recognition_general_request( @@ -209,34 +179,28 @@ def build_entities_recognition_general_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/recognition/general") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_entities_recognition_pii_request( @@ -252,38 +216,32 @@ def build_entities_recognition_pii_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/recognition/pii") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") if domain is not None: - _params['domain'] = _SERIALIZER.query("domain", domain, 'str') + _params["domain"] = _SERIALIZER.query("domain", domain, "str") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") if pii_categories is not None: - _params['piiCategories'] = _SERIALIZER.query("pii_categories", pii_categories, '[str]', div=',') + _params["piiCategories"] = _SERIALIZER.query("pii_categories", pii_categories, "[str]", div=",") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_entities_linking_request( @@ -297,34 +255,28 @@ def build_entities_linking_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/entities/linking") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_key_phrases_request( @@ -337,32 +289,26 @@ def build_key_phrases_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/keyPhrases") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_languages_request( @@ -375,32 +321,26 @@ def build_languages_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/languages") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) def build_sentiment_request( @@ -415,54 +355,45 @@ def build_sentiment_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - accept = _headers.pop('Accept', "application/json, text/json") + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + accept = _headers.pop("Accept", "application/json, text/json") # Construct URL _url = kwargs.pop("template_url", "/sentiment") # Construct parameters if model_version is not None: - _params['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + _params["model-version"] = _SERIALIZER.query("model_version", model_version, "str") if show_stats is not None: - _params['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + _params["showStats"] = _SERIALIZER.query("show_stats", show_stats, "bool") if logging_opt_out is not None: - _params['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + _params["loggingOptOut"] = _SERIALIZER.query("logging_opt_out", logging_opt_out, "bool") if opinion_mining is not None: - _params['opinionMining'] = _SERIALIZER.query("opinion_mining", opinion_mining, 'bool') + _params["opinionMining"] = _SERIALIZER.query("opinion_mining", opinion_mining, "bool") if string_index_type is not None: - _params['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + _params["stringIndexType"] = _SERIALIZER.query("string_index_type", string_index_type, "str") # Construct headers if content_type is not None: - _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - return HttpRequest( - method="POST", - url=_url, - params=_params, - headers=_headers, - **kwargs - ) class TextAnalyticsClientOperationsMixin(MixinABC): def _analyze_initial( - self, - body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, - **kwargs: Any + self, body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, **kwargs: Any ) -> Optional[_models.AnalyzeJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.AnalyzeJobState]] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.AnalyzeJobState]] content_type = content_type or "application/json" _json = None @@ -471,7 +402,7 @@ def _analyze_initial( _content = body else: if body is not None: - _json = self._serialize.body(body, 'AnalyzeBatchInput') + _json = self._serialize.body(body, "AnalyzeBatchInput") else: _json = None @@ -479,20 +410,18 @@ def _analyze_initial( content_type=content_type, json=_json, content=_content, - template_url=self._analyze_initial.metadata['url'], + template_url=self._analyze_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -505,27 +434,23 @@ def _analyze_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('AnalyzeJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _analyze_initial.metadata = {'url': "/analyze"} # type: ignore - + _analyze_initial.metadata = {"url": "/analyze"} # type: ignore @overload def begin_analyze( - self, - body: Optional[_models.AnalyzeBatchInput] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: Optional[_models.AnalyzeBatchInput] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -553,11 +478,7 @@ def begin_analyze( @overload def begin_analyze( - self, - body: Optional[IO] = None, - *, - content_type: str = "application/json", - **kwargs: Any + self, body: Optional[IO] = None, *, content_type: str = "application/json", **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -583,12 +504,9 @@ def begin_analyze( :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace def begin_analyze( - self, - body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, - **kwargs: Any + self, body: Optional[Union[_models.AnalyzeBatchInput, IO]] = None, **kwargs: Any ) -> AnalyzeActionsLROPoller[_models.AnalyzeJobState]: """Submit analysis job. @@ -617,64 +535,50 @@ def begin_analyze( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._analyze_initial( # type: ignore - body=body, - content_type=content_type, - cls=lambda x,y,z: x, - headers=_headers, - params=_params, - **kwargs + body=body, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AnalyzeJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, AnalyzeActionsLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, + AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return AnalyzeActionsLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze.metadata = {'url': "/analyze"} # type: ignore + begin_analyze.metadata = {"url": "/analyze"} # type: ignore @distributed_trace def analyze_status( - self, - job_id: str, - show_stats: Optional[bool] = None, - top: int = 20, - skip: int = 0, - **kwargs: Any + self, job_id: str, show_stats: Optional[bool] = None, top: int = 20, skip: int = 0, **kwargs: Any ) -> _models.AnalyzeJobState: """Get analysis status and results. @@ -698,36 +602,31 @@ def analyze_status( :rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.AnalyzeJobState] + cls = kwargs.pop("cls", None) # type: ClsType[_models.AnalyzeJobState] - request = build_analyze_status_request( job_id=job_id, show_stats=show_stats, top=top, skip=skip, - template_url=self.analyze_status.metadata['url'], + template_url=self.analyze_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -737,24 +636,18 @@ def analyze_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('AnalyzeJobState', pipeline_response) + deserialized = self._deserialize("AnalyzeJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - analyze_status.metadata = {'url': "/analyze/jobs/{jobId}"} # type: ignore - + analyze_status.metadata = {"url": "/analyze/jobs/{jobId}"} # type: ignore @distributed_trace def health_status( - self, - job_id: str, - top: int = 20, - skip: int = 0, - show_stats: Optional[bool] = None, - **kwargs: Any + self, job_id: str, top: int = 20, skip: int = 0, show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.HealthcareJobState: """Get healthcare analysis job status and results. @@ -776,36 +669,31 @@ def health_status( :rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[_models.HealthcareJobState] + cls = kwargs.pop("cls", None) # type: ClsType[_models.HealthcareJobState] - request = build_health_status_request( job_id=job_id, top=top, skip=skip, show_stats=show_stats, - template_url=self.health_status.metadata['url'], + template_url=self.health_status.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -815,48 +703,40 @@ def health_status( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('HealthcareJobState', pipeline_response) + deserialized = self._deserialize("HealthcareJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - health_status.metadata = {'url': "/entities/health/jobs/{jobId}"} # type: ignore - + health_status.metadata = {"url": "/entities/health/jobs/{jobId}"} # type: ignore def _cancel_health_job_initial( # pylint: disable=inconsistent-return-statements - self, - job_id: str, - **kwargs: Any + self, job_id: str, **kwargs: Any ) -> None: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop("cls", None) # type: ClsType[None] - request = build_cancel_health_job_request( job_id=job_id, - template_url=self._cancel_health_job_initial.metadata['url'], + template_url=self._cancel_health_job_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -867,21 +747,15 @@ def _cancel_health_job_initial( # pylint: disable=inconsistent-return-statement raise HttpResponseError(response=response, model=error) response_headers = {} - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) if cls: return cls(pipeline_response, None, response_headers) - _cancel_health_job_initial.metadata = {'url': "/entities/health/jobs/{jobId}"} # type: ignore - + _cancel_health_job_initial.metadata = {"url": "/entities/health/jobs/{jobId}"} # type: ignore @distributed_trace - def begin_cancel_health_job( - self, - job_id: str, - **kwargs: Any - ) -> LROPoller[None]: + def begin_cancel_health_job(self, job_id: str, **kwargs: Any) -> LROPoller[None]: """Cancel healthcare prediction job. Cancel healthcare prediction job. @@ -903,51 +777,42 @@ def begin_cancel_health_job( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls = kwargs.pop('cls', None) # type: ClsType[None] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[None] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._cancel_health_job_initial( # type: ignore - job_id=job_id, - cls=lambda x,y,z: x, - headers=_headers, - params=_params, - **kwargs + job_id=job_id, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, LROBasePolling( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_cancel_health_job.metadata = {'url': "/entities/health/jobs/{jobId}"} # type: ignore + begin_cancel_health_job.metadata = {"url": "/entities/health/jobs/{jobId}"} # type: ignore def _health_initial( self, @@ -957,19 +822,17 @@ def _health_initial( logging_opt_out: Optional[bool] = None, **kwargs: Any ) -> Optional[_models.HealthcareJobState]: - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[Optional[_models.HealthcareJobState]] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.HealthcareJobState]] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_health_request( model_version=model_version, @@ -977,20 +840,18 @@ def _health_initial( logging_opt_out=logging_opt_out, content_type=content_type, json=_json, - template_url=self._health_initial.metadata['url'], + template_url=self._health_initial.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1003,19 +864,19 @@ def _health_initial( deserialized = None response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('HealthcareJobState', pipeline_response) + deserialized = self._deserialize("HealthcareJobState", pipeline_response) if response.status_code == 202: - response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) - + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _health_initial.metadata = {'url': "/entities/health/jobs"} # type: ignore - + _health_initial.metadata = {"url": "/entities/health/jobs"} # type: ignore @distributed_trace def begin_health( @@ -1067,14 +928,11 @@ def begin_health( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.HealthcareJobState] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.HealthcareJobState] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._health_initial( # type: ignore documents=documents, @@ -1082,43 +940,44 @@ def begin_health( string_index_type=string_index_type, logging_opt_out=logging_opt_out, content_type=content_type, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - kwargs.pop('error_map', None) + kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('HealthcareJobState', pipeline_response) + deserialized = self._deserialize("HealthcareJobState", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } if polling is True: - polling_method = cast(PollingMethod, AnalyzeHealthcareEntitiesLROPollingMethod( - lro_delay, - - path_format_arguments=path_format_arguments, - **kwargs - )) # type: PollingMethod - elif polling is False: polling_method = cast(PollingMethod, NoPolling()) - else: polling_method = polling + polling_method = cast( + PollingMethod, + AnalyzeHealthcareEntitiesLROPollingMethod( + lro_delay, path_format_arguments=path_format_arguments, **kwargs + ), + ) # type: PollingMethod + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling if cont_token: return AnalyzeHealthcareEntitiesLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) return AnalyzeHealthcareEntitiesLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_health.metadata = {'url': "/entities/health/jobs"} # type: ignore + begin_health.metadata = {"url": "/entities/health/jobs"} # type: ignore @distributed_trace def entities_recognition_general( @@ -1164,19 +1023,17 @@ def entities_recognition_general( :rtype: ~azure.ai.textanalytics.v3_1.models.EntitiesResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntitiesResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntitiesResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_recognition_general_request( model_version=model_version, @@ -1185,20 +1042,18 @@ def entities_recognition_general( string_index_type=string_index_type, content_type=content_type, json=_json, - template_url=self.entities_recognition_general.metadata['url'], + template_url=self.entities_recognition_general.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1208,15 +1063,14 @@ def entities_recognition_general( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntitiesResult', pipeline_response) + deserialized = self._deserialize("EntitiesResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_recognition_general.metadata = {'url': "/entities/recognition/general"} # type: ignore - + entities_recognition_general.metadata = {"url": "/entities/recognition/general"} # type: ignore @distributed_trace def entities_recognition_pii( @@ -1271,19 +1125,17 @@ def entities_recognition_pii( :rtype: ~azure.ai.textanalytics.v3_1.models.PiiResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.PiiResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.PiiResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_recognition_pii_request( model_version=model_version, @@ -1294,20 +1146,18 @@ def entities_recognition_pii( pii_categories=pii_categories, content_type=content_type, json=_json, - template_url=self.entities_recognition_pii.metadata['url'], + template_url=self.entities_recognition_pii.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1317,15 +1167,14 @@ def entities_recognition_pii( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('PiiResult', pipeline_response) + deserialized = self._deserialize("PiiResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_recognition_pii.metadata = {'url': "/entities/recognition/pii"} # type: ignore - + entities_recognition_pii.metadata = {"url": "/entities/recognition/pii"} # type: ignore @distributed_trace def entities_linking( @@ -1370,19 +1219,17 @@ def entities_linking( :rtype: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.EntityLinkingResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.EntityLinkingResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_entities_linking_request( model_version=model_version, @@ -1391,20 +1238,18 @@ def entities_linking( string_index_type=string_index_type, content_type=content_type, json=_json, - template_url=self.entities_linking.metadata['url'], + template_url=self.entities_linking.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1414,15 +1259,14 @@ def entities_linking( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('EntityLinkingResult', pipeline_response) + deserialized = self._deserialize("EntityLinkingResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - entities_linking.metadata = {'url': "/entities/linking"} # type: ignore - + entities_linking.metadata = {"url": "/entities/linking"} # type: ignore @distributed_trace def key_phrases( @@ -1461,19 +1305,17 @@ def key_phrases( :rtype: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.KeyPhraseResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.KeyPhraseResult] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_key_phrases_request( model_version=model_version, @@ -1481,20 +1323,18 @@ def key_phrases( logging_opt_out=logging_opt_out, content_type=content_type, json=_json, - template_url=self.key_phrases.metadata['url'], + template_url=self.key_phrases.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1504,15 +1344,14 @@ def key_phrases( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('KeyPhraseResult', pipeline_response) + deserialized = self._deserialize("KeyPhraseResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - key_phrases.metadata = {'url': "/keyPhrases"} # type: ignore - + key_phrases.metadata = {"url": "/keyPhrases"} # type: ignore @distributed_trace def languages( @@ -1552,19 +1391,17 @@ def languages( :rtype: ~azure.ai.textanalytics.v3_1.models.LanguageResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.LanguageResult] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.LanguageResult] _input = _models.LanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'LanguageBatchInput') + _json = self._serialize.body(_input, "LanguageBatchInput") request = build_languages_request( model_version=model_version, @@ -1572,20 +1409,18 @@ def languages( logging_opt_out=logging_opt_out, content_type=content_type, json=_json, - template_url=self.languages.metadata['url'], + template_url=self.languages.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1595,15 +1430,14 @@ def languages( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('LanguageResult', pipeline_response) + deserialized = self._deserialize("LanguageResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - languages.metadata = {'url': "/languages"} # type: ignore - + languages.metadata = {"url": "/languages"} # type: ignore @distributed_trace def sentiment( @@ -1653,19 +1487,17 @@ def sentiment( :rtype: ~azure.ai.textanalytics.v3_1.models.SentimentResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {}) or {}) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: str - cls = kwargs.pop('cls', None) # type: ClsType[_models.SentimentResponse] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.SentimentResponse] _input = _models.MultiLanguageBatchInput(documents=documents) - _json = self._serialize.body(_input, 'MultiLanguageBatchInput') + _json = self._serialize.body(_input, "MultiLanguageBatchInput") request = build_sentiment_request( model_version=model_version, @@ -1675,20 +1507,18 @@ def sentiment( string_index_type=string_index_type, content_type=content_type, json=_json, - template_url=self.sentiment.metadata['url'], + template_url=self.sentiment.metadata["url"], headers=_headers, params=_params, ) request = _convert_request(request) path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, - stream=False, - **kwargs + request, stream=False, **kwargs ) response = pipeline_response.http_response @@ -1698,12 +1528,11 @@ def sentiment( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('SentimentResponse', pipeline_response) + deserialized = self._deserialize("SentimentResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - sentiment.metadata = {'url': "/sentiment"} # type: ignore - + sentiment.metadata = {"url": "/sentiment"} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py index 6a5dcc3f558b..1359df6a461b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py @@ -29,8 +29,7 @@ @runtime_checkable class TextAnalysisLROPoller(Protocol[PollingReturnType_co]): - """Implements a protocol which returned poller objects are consistent with. - """ + """Implements a protocol which returned poller objects are consistent with.""" @property def details(self) -> Mapping[str, Any]: @@ -40,7 +39,6 @@ def details(self) -> Mapping[str, Any]: :rtype: Mapping[str, Any] """ - def continuation_token(self) -> str: """Return a continuation token that allows to restart the poller later. @@ -110,11 +108,9 @@ def cancel(self) -> None: class TextAnalyticsOperationResourcePolling(OperationResourcePolling): def __init__( - self, operation_location_header: str ="operation-location", show_stats: Optional[bool] = False + self, operation_location_header: str = "operation-location", show_stats: Optional[bool] = False ) -> None: - super().__init__( - operation_location_header=operation_location_header - ) + super().__init__(operation_location_header=operation_location_header) self._show_stats = show_stats self._query_params = {"showStats": show_stats} @@ -125,11 +121,7 @@ def get_polling_url(self) -> str: # language api compat delimiter = "&" if super().get_polling_url().find("?") != -1 else "?" - return ( - super().get_polling_url() - + delimiter - + urlencode(self._query_params) - ) + return super().get_polling_url() + delimiter + urlencode(self._query_params) class TextAnalyticsLROPollingMethod(LROBasePolling): @@ -165,11 +157,7 @@ def _raise_if_bad_http_status_and_method(response): code = response.status_code if code in {200, 201, 202, 204}: return - raise BadStatus( - "Invalid return status {!r} for {!r} operation".format( - code, response.request.method - ) - ) + raise BadStatus("Invalid return status {!r} for {!r} operation".format(code, response.request.method)) def _poll(self): """Poll status of operation so long as operation is incomplete and @@ -199,14 +187,10 @@ def _poll(self): final_get_url = self._operation.get_final_get_url(self._pipeline_response) if final_get_url: self._pipeline_response = self.request_status(final_get_url) - TextAnalyticsLROPollingMethod._raise_if_bad_http_status_and_method( - self._pipeline_response.http_response - ) + TextAnalyticsLROPollingMethod._raise_if_bad_http_status_and_method(self._pipeline_response.http_response) -class AnalyzeHealthcareEntitiesLROPollingMethod( # pylint: disable=all - TextAnalyticsLROPollingMethod -): +class AnalyzeHealthcareEntitiesLROPollingMethod(TextAnalyticsLROPollingMethod): # pylint: disable=all def __init__(self, *args: Any, **kwargs: Any) -> None: self._doc_id_order = kwargs.pop("doc_id_order", None) self._show_stats = kwargs.pop("show_stats", None) @@ -216,6 +200,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: @property def _current_body(self): from ._generated.models import JobState + return JobState.deserialize(self._pipeline_response) @property @@ -243,9 +228,7 @@ def id(self) -> str: return self._get_id_from_headers() def _get_id_from_headers(self) -> str: - return self._initial_response.http_response.headers[ - "Operation-Location" - ].split("/jobs/")[1].split("?")[0] + return self._initial_response.http_response.headers["Operation-Location"].split("/jobs/")[1].split("?")[0] @property def display_name(self) -> Optional[str]: @@ -287,23 +270,14 @@ def details(self) -> Mapping[str, Any]: } def __getattr__(self, item: str) -> Any: - attrs = [ - "created_on", - "expires_on", - "display_name", - "last_modified_on", - "id" - ] + attrs = ["created_on", "expires_on", "display_name", "last_modified_on", "id"] if item in attrs: return self.details[item] return self.__getattribute__(item) @classmethod def from_continuation_token( # type: ignore - cls, - polling_method: AnalyzeHealthcareEntitiesLROPollingMethod, - continuation_token: str, - **kwargs: Any + cls, polling_method: AnalyzeHealthcareEntitiesLROPollingMethod, continuation_token: str, **kwargs: Any ) -> "AnalyzeHealthcareEntitiesLROPoller": # type: ignore """Internal use only. @@ -324,10 +298,7 @@ def from_continuation_token( # type: ignore TextAnalyticsOperationResourcePolling(show_stats=show_stats) ] return cls( - client, - initial_response, - functools.partial(deserialization_callback, initial_response), - polling_method + client, initial_response, functools.partial(deserialization_callback, initial_response), polling_method ) @distributed_trace @@ -355,9 +326,7 @@ def cancel(self, **kwargs: Any) -> LROPoller[None]: # type: ignore # Join the thread so we no longer have to wait for a result from it. getattr(self, "_thread").join(timeout=0) - client = getattr( - self._polling_method, "_text_analytics_client" - ) + client = getattr(self._polling_method, "_text_analytics_client") try: return client.begin_cancel_health_job( self.id, polling=TextAnalyticsLROPollingMethod(timeout=polling_interval) @@ -383,6 +352,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: @property def _current_body(self): from ._generated.models import JobState + return JobState.deserialize(self._pipeline_response) @property @@ -440,9 +410,7 @@ def id(self) -> str: return self._get_id_from_headers() def _get_id_from_headers(self) -> str: - return self._initial_response.http_response.headers[ - "Operation-Location" - ].split("/jobs/")[1].split("?")[0] + return self._initial_response.http_response.headers["Operation-Location"].split("/jobs/")[1].split("?")[0] def get_continuation_token(self) -> str: if self._initial_response.context is not None: @@ -492,7 +460,7 @@ def __getattr__(self, item: str) -> Any: "actions_succeeded_count", "total_actions_count", "last_modified_on", - "id" + "id", ] if item in attrs: return self.details[item] @@ -500,10 +468,7 @@ def __getattr__(self, item: str) -> Any: @classmethod def from_continuation_token( # type: ignore - cls, - polling_method: AnalyzeActionsLROPollingMethod, - continuation_token: str, - **kwargs: Any + cls, polling_method: AnalyzeActionsLROPollingMethod, continuation_token: str, **kwargs: Any ) -> "AnalyzeActionsLROPoller": # type: ignore """Internal use only. @@ -524,10 +489,7 @@ def from_continuation_token( # type: ignore TextAnalyticsOperationResourcePolling(show_stats=show_stats) ] return cls( - client, - initial_response, - functools.partial(deserialization_callback, initial_response), - polling_method + client, initial_response, functools.partial(deserialization_callback, initial_response), polling_method ) @distributed_trace @@ -548,4 +510,5 @@ def cancel(self) -> None: raise ValueError("Cancellation not supported by API versions v3.0, v3.1.") from exc except HttpResponseError as error: from ._response_handlers import process_http_response_error + process_http_response_error(error) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index 7339b8d4fcdc..61507a536fc2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -22,6 +22,7 @@ STRING_INDEX_TYPE_DEFAULT = "UnicodeCodePoint" + def _get_indices(relation): return [int(s) for s in re.findall(r"\d+", relation)] @@ -49,9 +50,7 @@ class TextAnalysisKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PiiEntityDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The different domains of PII entities that users can filter by""" - PROTECTED_HEALTH_INFORMATION = ( - "phi" # See https://aka.ms/azsdk/language/pii for more information. - ) + PROTECTED_HEALTH_INFORMATION = "phi" # See https://aka.ms/azsdk/language/pii for more information. class DetectedLanguage(DictMixin): @@ -215,13 +214,10 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, healthcare_result): entities = [ - HealthcareEntity._from_generated(e) # pylint: disable=protected-access - for e in healthcare_result.entities + HealthcareEntity._from_generated(e) for e in healthcare_result.entities # pylint: disable=protected-access ] relations = [ - HealthcareRelation._from_generated( # pylint: disable=protected-access - r, entities - ) + HealthcareRelation._from_generated(r, entities) # pylint: disable=protected-access for r in healthcare_result.relations ] return cls( @@ -229,9 +225,7 @@ def _from_generated(cls, healthcare_result): entities=entities, entity_relations=relations, warnings=[ - TextAnalyticsWarning._from_generated( # pylint: disable=protected-access - w - ) + TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access for w in healthcare_result.warnings ], statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access @@ -275,13 +269,14 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, healthcare_relation_result, entities): roles = [ - HealthcareRelationRole._from_generated( # pylint: disable=protected-access - r, entities - ) + HealthcareRelationRole._from_generated(r, entities) # pylint: disable=protected-access for r in healthcare_relation_result.entities ] - confidence_score = healthcare_relation_result.confidence_score \ - if hasattr(healthcare_relation_result, "confidence_score") else None + confidence_score = ( + healthcare_relation_result.confidence_score + if hasattr(healthcare_relation_result, "confidence_score") + else None + ) return cls( relation_type=healthcare_relation_result.relation_type, roles=roles, @@ -289,8 +284,10 @@ def _from_generated(cls, healthcare_relation_result, entities): ) def __repr__(self) -> str: - return f"HealthcareRelation(relation_type={self.relation_type}, roles={repr(self.roles)}, " \ - f"confidence_score={self.confidence_score})"[:1024] + return ( + f"HealthcareRelation(relation_type={self.relation_type}, roles={repr(self.roles)}, " + f"confidence_score={self.confidence_score})"[:1024] + ) class HealthcareRelationRole(DictMixin): @@ -317,9 +314,7 @@ def __init__(self, **kwargs: Any) -> None: @staticmethod def _get_entity(healthcare_role_result, entities): numbers = _get_indices(healthcare_role_result.ref) - entity_index = numbers[ - 1 - ] # first number parsed from index is document #, second is entity index + entity_index = numbers[1] # first number parsed from index is document #, second is entity index return entities[entity_index] @classmethod @@ -483,8 +478,7 @@ def __repr__(self) -> str: class HealthcareEntity(DictMixin): - """HealthcareEntity contains information about a Healthcare entity found in text. - """ + """HealthcareEntity contains information about a Healthcare entity found in text.""" text: str """Entity text as appears in the document.""" @@ -545,12 +539,11 @@ def _from_generated(cls, healthcare_entity): length=healthcare_entity.length, offset=healthcare_entity.offset, confidence_score=healthcare_entity.confidence_score, - data_sources=[ - HealthcareEntityDataSource(entity_id=l.id, name=l.data_source) - for l in healthcare_entity.links - ] - if healthcare_entity.links - else None, + data_sources=( + [HealthcareEntityDataSource(entity_id=l.id, name=l.data_source) for l in healthcare_entity.links] + if healthcare_entity.links + else None + ), ) def __hash__(self) -> int: @@ -603,8 +596,10 @@ def _from_generated(cls, healthcare_assertion): ) def __repr__(self) -> str: - return f"HealthcareEntityAssertion(conditionality={self.conditionality}, certainty={self.certainty}, " \ - f"association={self.association})"[:1024] + return ( + f"HealthcareEntityAssertion(conditionality={self.conditionality}, certainty={self.certainty}, " + f"association={self.association})"[:1024] + ) class HealthcareEntityDataSource(DictMixin): @@ -622,9 +617,7 @@ def __init__(self, **kwargs: Any) -> None: self.name = kwargs.get("name", None) def __repr__(self) -> str: - return ( - f"HealthcareEntityDataSource(entity_id={self.entity_id}, name={self.name})"[:1024] - ) + return f"HealthcareEntityDataSource(entity_id={self.entity_id}, name={self.name})"[:1024] class TextAnalyticsError(DictMixin): @@ -844,8 +837,10 @@ def _from_generated(cls, stats): ) def __repr__(self) -> str: - return f"TextDocumentStatistics(character_count={self.character_count}, " \ - f"transaction_count={self.transaction_count})"[:1024] + return ( + f"TextDocumentStatistics(character_count={self.character_count}, " + f"transaction_count={self.transaction_count})"[:1024] + ) class DocumentError(DictMixin): @@ -890,26 +885,22 @@ def __getattr__(self, attr: str) -> Any: if attr in result_attrs: raise AttributeError( "'DocumentError' object has no attribute '{}'. The service was unable to process this document:\n" - "Document Id: {}\nError: {} - {}\n".format( - attr, self.id, self.error.code, self.error.message - ) + "Document Id: {}\nError: {} - {}\n".format(attr, self.id, self.error.code, self.error.message) ) - raise AttributeError( - f"'DocumentError' object has no attribute '{attr}'" - ) + raise AttributeError(f"'DocumentError' object has no attribute '{attr}'") @classmethod def _from_generated(cls, doc_err): return cls( id=doc_err.id, - error=TextAnalyticsError._from_generated( # pylint: disable=protected-access - doc_err.error - ), + error=TextAnalyticsError._from_generated(doc_err.error), # pylint: disable=protected-access ) def __repr__(self) -> str: - return f"DocumentError(id={self.id}, error={repr(self.error)}, " \ - f"is_error={self.is_error}, kind={self.kind})"[:1024] + return ( + f"DocumentError(id={self.id}, error={repr(self.error)}, " + f"is_error={self.is_error}, kind={self.kind})"[:1024] + ) class DetectLanguageInput(LanguageInput): @@ -939,7 +930,7 @@ def __init__( id: str, # pylint: disable=redefined-builtin text: str, country_hint: Optional[str] = None, - **kwargs: Any # pylint: disable=unused-argument + **kwargs: Any, # pylint: disable=unused-argument ) -> None: super().__init__(id=id, text=text, country_hint=country_hint) self.id = id @@ -989,15 +980,10 @@ def __init__(self, **kwargs: Any) -> None: @classmethod def _from_generated(cls, entity): - bing_entity_search_api_id = ( - entity.bing_id if hasattr(entity, "bing_id") else None - ) + bing_entity_search_api_id = entity.bing_id if hasattr(entity, "bing_id") else None return cls( name=entity.name, - matches=[ - LinkedEntityMatch._from_generated(e) # pylint: disable=protected-access - for e in entity.matches - ], + matches=[LinkedEntityMatch._from_generated(e) for e in entity.matches], # pylint: disable=protected-access language=entity.language, data_source_entity_id=entity.id, url=entity.url, @@ -1059,8 +1045,10 @@ def _from_generated(cls, match): ) def __repr__(self) -> str: - return f"LinkedEntityMatch(confidence_score={self.confidence_score}, text={self.text}, " \ - f"length={self.length}, offset={self.offset})"[:1024] + return ( + f"LinkedEntityMatch(confidence_score={self.confidence_score}, text={self.text}, " + f"length={self.length}, offset={self.offset})"[:1024] + ) class TextDocumentInput(DictMixin, MultiLanguageInput): @@ -1088,7 +1076,7 @@ def __init__( id: str, # pylint: disable=redefined-builtin text: str, language: Optional[str] = None, - **kwargs: Any # pylint: disable=unused-argument + **kwargs: Any, # pylint: disable=unused-argument ) -> None: super().__init__(id=id, text=text, language=language) self.id = id @@ -1193,9 +1181,7 @@ def _from_generated(cls, sentence, results, sentiment): if hasattr(sentence, "targets"): mined_opinions = ( [ - MinedOpinion._from_generated( # pylint: disable=protected-access - target, results, sentiment - ) + MinedOpinion._from_generated(target, results, sentiment) # pylint: disable=protected-access for target in sentence.targets ] if sentence.targets @@ -1238,37 +1224,25 @@ def __init__(self, **kwargs: Any) -> None: self.assessments = kwargs.get("assessments", None) @staticmethod - def _get_assessments( - relations, results, sentiment - ): # pylint: disable=unused-argument + def _get_assessments(relations, results, sentiment): # pylint: disable=unused-argument if not relations: return [] - assessment_relations = [ - r.ref for r in relations if r.relation_type == "assessment" - ] + assessment_relations = [r.ref for r in relations if r.relation_type == "assessment"] assessments = [] for assessment_relation in assessment_relations: numbers = _get_indices(assessment_relation) sentence_index = numbers[1] assessment_index = numbers[2] - assessments.append( - sentiment.sentences[sentence_index].assessments[assessment_index] - ) + assessments.append(sentiment.sentences[sentence_index].assessments[assessment_index]) return assessments @classmethod def _from_generated(cls, target, results, sentiment): return cls( - target=TargetSentiment._from_generated( # pylint: disable=protected-access - target - ), + target=TargetSentiment._from_generated(target), # pylint: disable=protected-access assessments=[ - AssessmentSentiment._from_generated( # pylint: disable=protected-access - assessment - ) - for assessment in cls._get_assessments( - target.relations, results, sentiment - ) + AssessmentSentiment._from_generated(assessment) # pylint: disable=protected-access + for assessment in cls._get_assessments(target.relations, results, sentiment) ], ) @@ -1411,21 +1385,19 @@ def _from_generated(cls, score): ) def __repr__(self) -> str: - return f"SentimentConfidenceScores(positive={self.positive}, " \ - f"neutral={self.neutral}, negative={self.negative})"[:1024] + return ( + f"SentimentConfidenceScores(positive={self.positive}, " + f"neutral={self.neutral}, negative={self.negative})"[:1024] + ) class _AnalyzeActionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of action that was applied to the documents""" RECOGNIZE_ENTITIES = "recognize_entities" #: Entities Recognition action. - RECOGNIZE_PII_ENTITIES = ( - "recognize_pii_entities" #: PII Entities Recognition action. - ) + RECOGNIZE_PII_ENTITIES = "recognize_pii_entities" #: PII Entities Recognition action. EXTRACT_KEY_PHRASES = "extract_key_phrases" #: Key Phrase Extraction action. - RECOGNIZE_LINKED_ENTITIES = ( - "recognize_linked_entities" #: Linked Entities Recognition action. - ) + RECOGNIZE_LINKED_ENTITIES = "recognize_linked_entities" #: Linked Entities Recognition action. ANALYZE_SENTIMENT = "analyze_sentiment" #: Sentiment Analysis action. RECOGNIZE_CUSTOM_ENTITIES = "recognize_custom_entities" SINGLE_LABEL_CLASSIFY = "single_label_classify" @@ -1437,6 +1409,7 @@ class _AnalyzeActionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ActionPointerKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """v3.1 only""" + RECOGNIZE_ENTITIES = "entityRecognitionTasks" RECOGNIZE_PII_ENTITIES = "piiEntityRecognitionTasks" EXTRACT_KEY_PHRASES = "keyPhraseExtractionTasks" @@ -1493,16 +1466,18 @@ def __init__( model_version: Optional[str] = None, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.model_version = model_version self.string_index_type: str = string_index_type if string_index_type is not None else STRING_INDEX_TYPE_DEFAULT self.disable_service_logs = disable_service_logs def __repr__(self) -> str: - return f"RecognizeEntitiesAction(model_version={self.model_version}, " \ - f"string_index_type={self.string_index_type}, " \ - f"disable_service_logs={self.disable_service_logs})"[:1024] + return ( + f"RecognizeEntitiesAction(model_version={self.model_version}, " + f"string_index_type={self.string_index_type}, " + f"disable_service_logs={self.disable_service_logs})"[:1024] + ) def _to_generated(self, api_version, task_id): if is_language_api(api_version): @@ -1512,7 +1487,7 @@ def _to_generated(self, api_version, task_id): model_version=self.model_version, string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, - ) + ), ) return _v3_1_models.EntitiesTask( @@ -1521,7 +1496,7 @@ def _to_generated(self, api_version, task_id): string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, ), - task_name=task_id + task_name=task_id, ) @@ -1587,7 +1562,7 @@ def __init__( model_version: Optional[str] = None, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.model_version = model_version self.show_opinion_mining = show_opinion_mining @@ -1611,7 +1586,7 @@ def _to_generated(self, api_version, task_id): opinion_mining=self.show_opinion_mining, string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, - ) + ), ) return _v3_1_models.SentimentAnalysisTask( parameters=_v3_1_models.SentimentAnalysisTaskParameters( @@ -1620,7 +1595,7 @@ def _to_generated(self, api_version, task_id): string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, ), - task_name=task_id + task_name=task_id, ) @@ -1689,7 +1664,7 @@ def __init__( model_version: Optional[str] = None, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.model_version = model_version self.domain_filter = domain_filter @@ -1715,7 +1690,7 @@ def _to_generated(self, api_version, task_id): pii_categories=self.categories_filter, string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, - ) + ), ) return _v3_1_models.PiiTask( @@ -1726,7 +1701,7 @@ def _to_generated(self, api_version, task_id): string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, ), - task_name=task_id + task_name=task_id, ) @@ -1766,18 +1741,16 @@ class ExtractKeyPhrasesAction(DictMixin): https://www.microsoft.com/ai/responsible-ai.""" def __init__( - self, - *, - model_version: Optional[str] = None, - disable_service_logs: Optional[bool] = None, - **kwargs: Any + self, *, model_version: Optional[str] = None, disable_service_logs: Optional[bool] = None, **kwargs: Any ) -> None: self.model_version = model_version self.disable_service_logs = disable_service_logs def __repr__(self) -> str: - return f"ExtractKeyPhrasesAction(model_version={self.model_version}, " \ - f"disable_service_logs={self.disable_service_logs})"[:1024] + return ( + f"ExtractKeyPhrasesAction(model_version={self.model_version}, " + f"disable_service_logs={self.disable_service_logs})"[:1024] + ) def _to_generated(self, api_version, task_id): if is_language_api(api_version): @@ -1786,7 +1759,7 @@ def _to_generated(self, api_version, task_id): parameters=_v2023_04_01_models.KeyPhraseTaskParameters( model_version=self.model_version, logging_opt_out=self.disable_service_logs, - ) + ), ) return _v3_1_models.KeyPhrasesTask( @@ -1794,7 +1767,7 @@ def _to_generated(self, api_version, task_id): model_version=self.model_version, logging_opt_out=self.disable_service_logs, ), - task_name=task_id + task_name=task_id, ) @@ -1848,7 +1821,7 @@ def __init__( model_version: Optional[str] = None, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.model_version = model_version self.string_index_type: str = string_index_type if string_index_type is not None else STRING_INDEX_TYPE_DEFAULT @@ -1869,7 +1842,7 @@ def _to_generated(self, api_version, task_id): model_version=self.model_version, string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, - ) + ), ) return _v3_1_models.EntityLinkingTask( @@ -1878,7 +1851,7 @@ def _to_generated(self, api_version, task_id): string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, ), - task_name=task_id + task_name=task_id, ) @@ -1932,7 +1905,7 @@ def __init__( *, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.project_name = project_name self.deployment_name = deployment_name @@ -1954,7 +1927,7 @@ def _to_generated(self, api_version, task_id): # pylint: disable=unused-argumen deployment_name=self.deployment_name, string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, - ) + ), ) @@ -2000,18 +1973,12 @@ def _from_generated(cls, result): return cls( id=result.id, entities=[ - CategorizedEntity._from_generated(e) # pylint: disable=protected-access - for e in result.entities + CategorizedEntity._from_generated(e) for e in result.entities # pylint: disable=protected-access ], warnings=[ - TextAnalyticsWarning._from_generated( # pylint: disable=protected-access - w - ) - for w in result.warnings + TextAnalyticsWarning._from_generated(w) for w in result.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - result.statistics - ), + statistics=TextDocumentStatistics._from_generated(result.statistics), # pylint: disable=protected-access ) @@ -2050,12 +2017,7 @@ class MultiLabelClassifyAction(DictMixin): https://www.microsoft.com/ai/responsible-ai.""" def __init__( - self, - project_name: str, - deployment_name: str, - *, - disable_service_logs: Optional[bool] = None, - **kwargs: Any + self, project_name: str, deployment_name: str, *, disable_service_logs: Optional[bool] = None, **kwargs: Any ) -> None: self.project_name = project_name self.deployment_name = deployment_name @@ -2074,7 +2036,7 @@ def _to_generated(self, api_version, task_id): # pylint: disable=unused-argumen project_name=self.project_name, deployment_name=self.deployment_name, logging_opt_out=self.disable_service_logs, - ) + ), ) @@ -2099,10 +2061,10 @@ class ClassifyDocumentResult(DictMixin): """The text analysis kind - "CustomDocumentClassification".""" def __init__(self, **kwargs: Any) -> None: - self.id = kwargs.get('id', None) - self.classifications = kwargs.get('classifications', None) - self.warnings = kwargs.get('warnings', []) - self.statistics = kwargs.get('statistics', None) + self.id = kwargs.get("id", None) + self.classifications = kwargs.get("classifications", None) + self.warnings = kwargs.get("warnings", []) + self.statistics = kwargs.get("statistics", None) self.is_error: Literal[False] = False self.kind: Literal["CustomDocumentClassification"] = "CustomDocumentClassification" @@ -2122,14 +2084,9 @@ def _from_generated(cls, result): for e in result.class_property ], warnings=[ - TextAnalyticsWarning._from_generated( # pylint: disable=protected-access - w - ) - for w in result.warnings + TextAnalyticsWarning._from_generated(w) for w in result.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - result.statistics - ), + statistics=TextDocumentStatistics._from_generated(result.statistics), # pylint: disable=protected-access ) @@ -2168,12 +2125,7 @@ class SingleLabelClassifyAction(DictMixin): https://www.microsoft.com/ai/responsible-ai.""" def __init__( - self, - project_name: str, - deployment_name: str, - *, - disable_service_logs: Optional[bool] = None, - **kwargs: Any + self, project_name: str, deployment_name: str, *, disable_service_logs: Optional[bool] = None, **kwargs: Any ) -> None: self.project_name = project_name self.deployment_name = deployment_name @@ -2192,13 +2144,12 @@ def _to_generated(self, api_version, task_id): # pylint: disable=unused-argumen project_name=self.project_name, deployment_name=self.deployment_name, logging_opt_out=self.disable_service_logs, - ) + ), ) class ClassificationCategory(DictMixin): - """ClassificationCategory represents a classification of the input document. - """ + """ClassificationCategory represents a classification of the input document.""" category: str """Classification category for the document.""" @@ -2206,19 +2157,15 @@ class ClassificationCategory(DictMixin): """Confidence score between 0 and 1 of the recognized classification.""" def __init__(self, **kwargs: Any) -> None: - self.category = kwargs.get('category', None) - self.confidence_score = kwargs.get('confidence_score', None) + self.category = kwargs.get("category", None) + self.confidence_score = kwargs.get("confidence_score", None) def __repr__(self) -> str: - return f"ClassificationCategory(category={self.category}, " \ - f"confidence_score={self.confidence_score})"[:1024] + return f"ClassificationCategory(category={self.category}, " f"confidence_score={self.confidence_score})"[:1024] @classmethod def _from_generated(cls, result): - return cls( - category=result.category, - confidence_score=result.confidence_score - ) + return cls(category=result.category, confidence_score=result.confidence_score) class AnalyzeHealthcareEntitiesAction(DictMixin): @@ -2274,7 +2221,7 @@ def __init__( model_version: Optional[str] = None, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.model_version = model_version self.string_index_type: str = string_index_type if string_index_type is not None else STRING_INDEX_TYPE_DEFAULT @@ -2294,7 +2241,7 @@ def _to_generated(self, api_version, task_id): # pylint: disable=unused-argumen model_version=self.model_version, string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, - ) + ), ) @@ -2356,7 +2303,7 @@ def __init__( disable_service_logs: Optional[bool] = None, max_sentence_count: Optional[int] = None, order_by: Optional[Literal["Rank", "Offset"]] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.model_version = model_version self.string_index_type: str = string_index_type if string_index_type is not None else STRING_INDEX_TYPE_DEFAULT @@ -2380,7 +2327,7 @@ def _to_generated(self, api_version, task_id): # pylint: disable=unused-argumen logging_opt_out=self.disable_service_logs, sentence_count=self.max_sentence_count, sort_by=self.order_by, - ) + ), ) @@ -2424,20 +2371,13 @@ def _from_generated(cls, summary): return cls( id=summary.id, sentences=[ - SummarySentence._from_generated( # pylint: disable=protected-access - sentence - ) + SummarySentence._from_generated(sentence) # pylint: disable=protected-access for sentence in summary.sentences ], warnings=[ - TextAnalyticsWarning._from_generated( # pylint: disable=protected-access - w - ) - for w in summary.warnings + TextAnalyticsWarning._from_generated(w) for w in summary.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - summary.statistics - ), + statistics=TextDocumentStatistics._from_generated(summary.statistics), # pylint: disable=protected-access ) @@ -2469,8 +2409,10 @@ def __init__(self, **kwargs: Any) -> None: self.length = kwargs.get("length", None) def __repr__(self) -> str: - return f"SummarySentence(text={self.text}, rank_score={self.rank_score}, " \ - f"offset={self.offset}, length={self.length})"[:1024] + return ( + f"SummarySentence(text={self.text}, rank_score={self.rank_score}, " + f"offset={self.offset}, length={self.length})"[:1024] + ) @classmethod def _from_generated(cls, sentence): @@ -2526,14 +2468,9 @@ def _from_generated(cls, result): return cls( id=result.id, warnings=[ - TextAnalyticsWarning._from_generated( # pylint: disable=protected-access - w - ) - for w in result.warnings + TextAnalyticsWarning._from_generated(w) for w in result.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - result.statistics - ), + statistics=TextDocumentStatistics._from_generated(result.statistics), # pylint: disable=protected-access summaries=[ AbstractiveSummary._from_generated(summary) # pylint: disable=protected-access for summary in result.summaries @@ -2564,10 +2501,14 @@ def __repr__(self) -> str: def _from_generated(cls, result): return cls( text=result.text, - contexts=[ - SummaryContext._from_generated(context) # pylint: disable=protected-access - for context in result.contexts - ] if result.contexts else [] + contexts=( + [ + SummaryContext._from_generated(context) # pylint: disable=protected-access + for context in result.contexts + ] + if result.contexts + else [] + ), ) @@ -2594,10 +2535,7 @@ def __repr__(self) -> str: @classmethod def _from_generated(cls, summary): - return cls( - offset=summary.offset, - length=summary.length - ) + return cls(offset=summary.offset, length=summary.length) class AbstractiveSummaryAction(DictMixin): @@ -2660,7 +2598,7 @@ def __init__( model_version: Optional[str] = None, string_index_type: Optional[str] = None, disable_service_logs: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> None: self.sentence_count = sentence_count self.model_version = model_version @@ -2682,5 +2620,5 @@ def _to_generated(self, api_version, task_id): # pylint: disable=unused-argumen string_index_type=string_index_type_compatibility(self.string_index_type), logging_opt_out=self.disable_service_logs, sentence_count=self.sentence_count, - ) + ), ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_policies.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_policies.py index f4bb41b97565..5a705c9b305d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_policies.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_policies.py @@ -17,18 +17,14 @@ def __init__(self, **kwargs): super().__init__() def on_request(self, request): - self._response_callback = request.context.options.pop( - "raw_response_hook", self._response_callback - ) + self._response_callback = request.context.options.pop("raw_response_hook", self._response_callback) def on_response(self, request, response): if self._is_lro is None: # determine LRO based off of initial response. If 202, we say it's an LRO self._is_lro = response.http_response.status_code == 202 if self._response_callback: - data = ContentDecodePolicy.deserialize_from_http_generics( - response.http_response - ) + data = ContentDecodePolicy.deserialize_from_http_generics(response.http_response) if self._is_lro and (not data or data.get("status", "").lower() not in _FINISHED): return if response.http_response.status_code == 429: @@ -61,6 +57,8 @@ def on_response(self, request, response): :type response: ~azure.core.pipeline.PipelineResponse """ http_response = response.http_response - if http_response.status_code == 403 and \ - "Out of call volume quota for TextAnalytics F0 pricing tier" in http_response.text(): + if ( + http_response.status_code == 403 + and "Out of call volume quota for TextAnalytics F0 pricing tier" in http_response.text() + ): raise HttpResponseError(http_response.text(), response=http_response) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py index e5b9f53398d2..bfef75386818 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py @@ -33,13 +33,8 @@ def _validate_input(documents, hint, whole_input_hint): raise TypeError("Input documents cannot be a dict") if not all(isinstance(x, str) for x in documents): - if not all( - isinstance(x, (dict, TextDocumentInput, DetectLanguageInput)) - for x in documents - ): - raise TypeError( - "Mixing string and dictionary/object document input unsupported." - ) + if not all(isinstance(x, (dict, TextDocumentInput, DetectLanguageInput)) for x in documents): + raise TypeError("Mixing string and dictionary/object document input unsupported.") request_batch = [] for idx, doc in enumerate(documents): @@ -66,16 +61,12 @@ def _validate_input(documents, hint, whole_input_hint): if isinstance(doc, TextDocumentInput): item_hint = doc.language if item_hint is None: - doc = TextDocumentInput( - id=doc.id, language=whole_input_hint, text=doc.text - ) + doc = TextDocumentInput(id=doc.id, language=whole_input_hint, text=doc.text) request_batch.append(doc) if isinstance(doc, DetectLanguageInput): item_hint = doc.country_hint if item_hint is None: - doc = DetectLanguageInput( - id=doc.id, country_hint=whole_input_hint, text=doc.text - ) + doc = DetectLanguageInput(id=doc.id, country_hint=whole_input_hint, text=doc.text) elif item_hint.lower() == "none": doc = DetectLanguageInput(id=doc.id, country_hint="", text=doc.text) request_batch.append(doc) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py index 1152906f34f5..63cf07cb11c7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py @@ -45,9 +45,7 @@ class CSODataV4Format(ODataV4Format): def __init__(self, odata_error): try: if odata_error["error"]["innererror"]: - super().__init__( - odata_error["error"]["innererror"] - ) + super().__init__(odata_error["error"]["innererror"]) self.details = odata_error["error"].get("details", []) except KeyError: super().__init__(odata_error) @@ -95,17 +93,13 @@ def order_lro_results(doc_id_order, combined): """ mapping = [(item.id, item) for item in combined] - ordered_response = [ - i[1] for i in sorted(mapping, key=lambda m: doc_id_order.index(m[0])) - ] + ordered_response = [i[1] for i in sorted(mapping, key=lambda m: doc_id_order.index(m[0]))] return ordered_response def prepare_result(func): def choose_wrapper(*args, **kwargs): - def wrapper( - response, obj, _, ordering_function - ): + def wrapper(response, obj, _, ordering_function): if hasattr(obj, "results"): obj = obj.results # language API compat @@ -120,9 +114,7 @@ def wrapper( if hasattr(item, "error"): results[idx] = DocumentError( id=item.id, - error=TextAnalyticsError._from_generated( # pylint: disable=protected-access - item.error - ), + error=TextAnalyticsError._from_generated(item.error), # pylint: disable=protected-access ) else: results[idx] = func(item, results) @@ -138,12 +130,8 @@ def wrapper( @prepare_result -def abstract_summary_result( - summary, results, *args, **kwargs -): # pylint: disable=unused-argument - return AbstractiveSummaryResult._from_generated( # pylint: disable=protected-access - summary - ) +def abstract_summary_result(summary, results, *args, **kwargs): # pylint: disable=unused-argument + return AbstractiveSummaryResult._from_generated(summary) # pylint: disable=protected-access @prepare_result @@ -154,169 +142,106 @@ def language_result(language, results): # pylint: disable=unused-argument language.detected_language ), warnings=[ - TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access - for w in language.warnings + TextAnalyticsWarning._from_generated(w) for w in language.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - language.statistics - ), + statistics=TextDocumentStatistics._from_generated(language.statistics), # pylint: disable=protected-access ) @prepare_result -def entities_result( - entity, results, *args, **kwargs -): # pylint: disable=unused-argument +def entities_result(entity, results, *args, **kwargs): # pylint: disable=unused-argument return RecognizeEntitiesResult( id=entity.id, - entities=[ - CategorizedEntity._from_generated(e) # pylint: disable=protected-access - for e in entity.entities - ], - warnings=[ - TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access - for w in entity.warnings - ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - entity.statistics - ), + entities=[CategorizedEntity._from_generated(e) for e in entity.entities], # pylint: disable=protected-access + warnings=[TextAnalyticsWarning._from_generated(w) for w in entity.warnings], # pylint: disable=protected-access + statistics=TextDocumentStatistics._from_generated(entity.statistics), # pylint: disable=protected-access ) @prepare_result -def linked_entities_result( - entity, results, *args, **kwargs -): # pylint: disable=unused-argument +def linked_entities_result(entity, results, *args, **kwargs): # pylint: disable=unused-argument return RecognizeLinkedEntitiesResult( id=entity.id, - entities=[ - LinkedEntity._from_generated(e) # pylint: disable=protected-access - for e in entity.entities - ], - warnings=[ - TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access - for w in entity.warnings - ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - entity.statistics - ), + entities=[LinkedEntity._from_generated(e) for e in entity.entities], # pylint: disable=protected-access + warnings=[TextAnalyticsWarning._from_generated(w) for w in entity.warnings], # pylint: disable=protected-access + statistics=TextDocumentStatistics._from_generated(entity.statistics), # pylint: disable=protected-access ) @prepare_result -def key_phrases_result( - phrases, results, *args, **kwargs -): # pylint: disable=unused-argument +def key_phrases_result(phrases, results, *args, **kwargs): # pylint: disable=unused-argument return ExtractKeyPhrasesResult( id=phrases.id, key_phrases=phrases.key_phrases, warnings=[ - TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access - for w in phrases.warnings + TextAnalyticsWarning._from_generated(w) for w in phrases.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - phrases.statistics - ), + statistics=TextDocumentStatistics._from_generated(phrases.statistics), # pylint: disable=protected-access ) @prepare_result -def sentiment_result( - sentiment, results, *args, **kwargs -): # pylint: disable=unused-argument +def sentiment_result(sentiment, results, *args, **kwargs): # pylint: disable=unused-argument return AnalyzeSentimentResult( id=sentiment.id, sentiment=sentiment.sentiment, warnings=[ - TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access - for w in sentiment.warnings + TextAnalyticsWarning._from_generated(w) for w in sentiment.warnings # pylint: disable=protected-access ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - sentiment.statistics - ), + statistics=TextDocumentStatistics._from_generated(sentiment.statistics), # pylint: disable=protected-access confidence_scores=SentimentConfidenceScores._from_generated( # pylint: disable=protected-access sentiment.confidence_scores ), sentences=[ - SentenceSentiment._from_generated( # pylint: disable=protected-access - s, results, sentiment - ) + SentenceSentiment._from_generated(s, results, sentiment) # pylint: disable=protected-access for s in sentiment.sentences ], ) @prepare_result -def pii_entities_result( - entity, results, *args, **kwargs -): # pylint: disable=unused-argument +def pii_entities_result(entity, results, *args, **kwargs): # pylint: disable=unused-argument return RecognizePiiEntitiesResult( id=entity.id, - entities=[ - PiiEntity._from_generated(e) # pylint: disable=protected-access - for e in entity.entities - ], - redacted_text=entity.redacted_text - if hasattr(entity, "redacted_text") - else None, - warnings=[ - TextAnalyticsWarning._from_generated(w) # pylint: disable=protected-access - for w in entity.warnings - ], - statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access - entity.statistics - ), + entities=[PiiEntity._from_generated(e) for e in entity.entities], # pylint: disable=protected-access + redacted_text=entity.redacted_text if hasattr(entity, "redacted_text") else None, + warnings=[TextAnalyticsWarning._from_generated(w) for w in entity.warnings], # pylint: disable=protected-access + statistics=TextDocumentStatistics._from_generated(entity.statistics), # pylint: disable=protected-access ) @prepare_result -def healthcare_result( - health_result, results, *args, **kwargs -): # pylint: disable=unused-argument - return AnalyzeHealthcareEntitiesResult._from_generated( # pylint: disable=protected-access - health_result - ) +def healthcare_result(health_result, results, *args, **kwargs): # pylint: disable=unused-argument + return AnalyzeHealthcareEntitiesResult._from_generated(health_result) # pylint: disable=protected-access @prepare_result -def summary_result( - summary, results, *args, **kwargs -): # pylint: disable=unused-argument - return ExtractiveSummaryResult._from_generated( # pylint: disable=protected-access - summary - ) +def summary_result(summary, results, *args, **kwargs): # pylint: disable=unused-argument + return ExtractiveSummaryResult._from_generated(summary) # pylint: disable=protected-access @prepare_result -def custom_entities_result( - custom_entities, results, *args, **kwargs -): # pylint: disable=unused-argument - return RecognizeCustomEntitiesResult._from_generated( # pylint: disable=protected-access - custom_entities - ) +def custom_entities_result(custom_entities, results, *args, **kwargs): # pylint: disable=unused-argument + return RecognizeCustomEntitiesResult._from_generated(custom_entities) # pylint: disable=protected-access @prepare_result -def classify_document_result( - custom_categories, results, *args, **kwargs -): # pylint: disable=unused-argument - return ClassifyDocumentResult._from_generated( # pylint: disable=protected-access - custom_categories - ) +def classify_document_result(custom_categories, results, *args, **kwargs): # pylint: disable=unused-argument + return ClassifyDocumentResult._from_generated(custom_categories) # pylint: disable=protected-access -def healthcare_extract_page_data( - doc_id_order, obj, health_job_state -): # pylint: disable=unused-argument +def healthcare_extract_page_data(doc_id_order, obj, health_job_state): # pylint: disable=unused-argument return ( health_job_state.next_link, healthcare_result( doc_id_order, - health_job_state.results - if hasattr(health_job_state, "results") - else health_job_state.tasks.items[0].results, + ( + health_job_state.results + if hasattr(health_job_state, "results") + else health_job_state.tasks.items[0].results + ), {}, - lro=True + lro=True, ), ) @@ -383,16 +308,15 @@ def get_task_from_pointer(task_type): # pylint: disable=too-many-return-stateme def resolve_action_pointer(pointer): import re + pointer_union = "|".join(value for value in ActionPointerKind) - found = re.search(fr"#/tasks/({pointer_union})/\d+", pointer) + found = re.search(rf"#/tasks/({pointer_union})/\d+", pointer) if found: index = int(pointer[-1]) task = pointer.split("#/tasks/")[1].split("/")[0] property_name = get_task_from_pointer(task) return property_name, index - raise ValueError( - f"Unexpected response from service - action pointer '{pointer}' is not a valid action pointer." - ) + raise ValueError(f"Unexpected response from service - action pointer '{pointer}' is not a valid action pointer.") def pad_result(tasks_obj, doc_id_order): @@ -401,9 +325,10 @@ def pad_result(tasks_obj, doc_id_order): id=doc_id, error=TextAnalyticsError( code=None, # type: ignore - message=f"No result for document. Action returned status '{tasks_obj.status}'." - ) - ) for doc_id in doc_id_order + message=f"No result for document. Action returned status '{tasks_obj.status}'.", + ), + ) + for doc_id in doc_id_order ] @@ -425,10 +350,8 @@ def get_ordered_errors(tasks_obj, task_name, doc_id_order): action = actions[index] if action.task_name == task_name: errors = [ - DocumentError( - id=doc_id, - error=TextAnalyticsError(code=err.code, message=err.message) - ) for doc_id in doc_id_order + DocumentError(id=doc_id, error=TextAnalyticsError(code=err.code, message=err.message)) + for doc_id in doc_id_order ] return errors raise ValueError("Unexpected response from service - no errors for missing action results.") @@ -437,15 +360,15 @@ def get_ordered_errors(tasks_obj, task_name, doc_id_order): def _get_doc_results(task, doc_id_order, returned_tasks_object): returned_tasks = returned_tasks_object.tasks current_task_type, task_name = task - deserialization_callback = _get_deserialization_callback_from_task_type( - current_task_type - ) + deserialization_callback = _get_deserialization_callback_from_task_type(current_task_type) # language api compat - property_name = \ + property_name = ( "items" if hasattr(returned_tasks, "items") else _get_property_name_from_task_type(current_task_type) + ) try: - response_task_to_deserialize = \ - next(task for task in getattr(returned_tasks, property_name) if task.task_name == task_name) + response_task_to_deserialize = next( + task for task in getattr(returned_tasks, property_name) if task.task_name == task_name + ) except StopIteration as exc: raise ValueError("Unexpected response from service - unable to deserialize result.") from exc @@ -455,9 +378,7 @@ def _get_doc_results(task, doc_id_order, returned_tasks_object): # if results obj present, but no document results or errors (likely a canceled scenario) if not response_task_to_deserialize.results.documents and not response_task_to_deserialize.results.errors: return pad_result(returned_tasks_object, doc_id_order) - return deserialization_callback( - doc_id_order, response_task_to_deserialize.results, {}, lro=True - ) + return deserialization_callback(doc_id_order, response_task_to_deserialize.results, {}, lro=True) def get_iter_items(doc_id_order, task_order, bespoke, analyze_job_state): @@ -483,19 +404,13 @@ def get_iter_items(doc_id_order, task_order, bespoke, analyze_job_state): return [iter_items[doc_id] for doc_id in doc_id_order if doc_id in iter_items] -def analyze_extract_page_data( - doc_id_order, task_order, bespoke, analyze_job_state -): +def analyze_extract_page_data(doc_id_order, task_order, bespoke, analyze_job_state): # return next link, list of - iter_items = get_iter_items( - doc_id_order, task_order, bespoke, analyze_job_state - ) + iter_items = get_iter_items(doc_id_order, task_order, bespoke, analyze_job_state) return analyze_job_state.next_link, iter_items -def lro_get_next_page( - lro_status_callback, first_page, continuation_token, show_stats=False -): +def lro_get_next_page(lro_status_callback, first_page, continuation_token, show_stats=False): if continuation_token is None: return first_page @@ -517,35 +432,17 @@ def lro_get_next_page( return lro_status_callback(job_id, **query_params) -def healthcare_paged_result( - doc_id_order, health_status_callback, _, obj, show_stats=False -): +def healthcare_paged_result(doc_id_order, health_status_callback, _, obj, show_stats=False): return ItemPaged( - functools.partial( - lro_get_next_page, health_status_callback, obj, show_stats=show_stats - ), - functools.partial( - healthcare_extract_page_data, doc_id_order, obj - ), + functools.partial(lro_get_next_page, health_status_callback, obj, show_stats=show_stats), + functools.partial(healthcare_extract_page_data, doc_id_order, obj), ) -def analyze_paged_result( - doc_id_order, - task_order, - analyze_status_callback, - _, - obj, - show_stats=False, - bespoke=False -): +def analyze_paged_result(doc_id_order, task_order, analyze_status_callback, _, obj, show_stats=False, bespoke=False): return ItemPaged( - functools.partial( - lro_get_next_page, analyze_status_callback, obj, show_stats=show_stats - ), - functools.partial( - analyze_extract_page_data, doc_id_order, task_order, bespoke - ), + functools.partial(lro_get_next_page, analyze_status_callback, obj, show_stats=show_stats), + functools.partial(analyze_extract_page_data, doc_id_order, task_order, bespoke), ) @@ -558,21 +455,18 @@ def result_callback(initial_response, pipeline_response): options = getattr(context, "options", {}) doc_id_order = deserialized_data.get("doc_id_order") or options.get("doc_id_order") - show_stats = deserialized_data.get("show_stats") if "show_stats" in deserialized_data else options.get("show_stats") + show_stats = ( + deserialized_data.get("show_stats") if "show_stats" in deserialized_data else options.get("show_stats") + ) task_id_order = deserialized_data.get("task_id_order") or options.get("task_id_order") return callback( - pipeline_response, - None, - doc_id_order, - task_id_order=task_id_order, - show_stats=show_stats, - bespoke=bespoke + pipeline_response, None, doc_id_order, task_id_order=task_id_order, show_stats=show_stats, bespoke=bespoke ) return poller_type.from_continuation_token( - polling_method=polling_method, - client=client, - deserialization_callback=result_callback, - continuation_token=continuation_token - ) + polling_method=polling_method, + client=client, + deserialization_callback=result_callback, + continuation_token=continuation_token, + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py index 8b56d4f08bc0..f29019872e5d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py @@ -70,12 +70,11 @@ ExtractiveSummaryResult, AbstractiveSummaryAction, AbstractiveSummaryResult, - PiiEntityDomain + PiiEntityDomain, ) from ._generated.models import PiiEntityCategory from ._check import is_language_api, string_index_type_compatibility - AnalyzeActionsResponse = TextAnalysisLROPoller[ ItemPaged[ List[ @@ -147,20 +146,13 @@ def __init__( api_version: Optional[Union[str, TextAnalyticsApiVersion]] = None, **kwargs: Any, ) -> None: - super().__init__( - endpoint=endpoint, credential=credential, api_version=api_version, **kwargs - ) + super().__init__(endpoint=endpoint, credential=credential, api_version=api_version, **kwargs) self._default_language = default_language if default_language is not None else "en" self._default_country_hint = default_country_hint if default_country_hint is not None else "US" - self._string_index_type_default = ( - None if api_version == "v3.0" else "UnicodeCodePoint" - ) + self._string_index_type_default = None if api_version == "v3.0" else "UnicodeCodePoint" @distributed_trace - @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["disable_service_logs"]} - ) + @validate_multiapi_args(version_method_added="v3.0", args_mapping={"v3.1": ["disable_service_logs"]}) def detect_language( self, documents: Union[List[str], List[DetectLanguageInput], List[Dict[str, str]]], @@ -222,11 +214,7 @@ def detect_language( :caption: Detecting language in a batch of documents. """ - country_hint_arg = ( - country_hint - if country_hint is not None - else self._default_country_hint - ) + country_hint_arg = country_hint if country_hint is not None else self._default_country_hint docs = _validate_input(documents, "country_hint", country_hint_arg) try: @@ -238,14 +226,13 @@ def detect_language( body=models.AnalyzeTextLanguageDetectionInput( analysis_input={"documents": docs}, parameters=models.LanguageDetectionTaskParameters( - logging_opt_out=disable_service_logs, - model_version=model_version - ) + logging_opt_out=disable_service_logs, model_version=model_version + ), ), show_stats=show_stats, cls=kwargs.pop("cls", language_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -257,16 +244,15 @@ def detect_language( show_stats=show_stats, logging_opt_out=disable_service_logs, cls=kwargs.pop("cls", language_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} + version_method_added="v3.0", args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} ) def recognize_entities( self, @@ -350,13 +336,13 @@ def recognize_entities( parameters=models.EntitiesTaskParameters( logging_opt_out=disable_service_logs, model_version=model_version, - string_index_type=string_index_type_compatibility(string_index_type_arg) - ) + string_index_type=string_index_type_compatibility(string_index_type_arg), + ), ), show_stats=show_stats, cls=kwargs.pop("cls", entities_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -370,15 +356,13 @@ def recognize_entities( logging_opt_out=disable_service_logs, cls=kwargs.pop("cls", entities_result), **kwargs, - ) + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace - @validate_multiapi_args( - version_method_added="v3.1" - ) + @validate_multiapi_args(version_method_added="v3.1") def recognize_pii_entities( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -472,13 +456,13 @@ def recognize_pii_entities( model_version=model_version, domain=domain_filter, pii_categories=categories_filter, - string_index_type=string_index_type_compatibility(string_index_type_arg) - ) + string_index_type=string_index_type_compatibility(string_index_type_arg), + ), ), show_stats=show_stats, cls=kwargs.pop("cls", pii_entities_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -493,16 +477,15 @@ def recognize_pii_entities( logging_opt_out=disable_service_logs, string_index_type=string_index_type_arg, cls=kwargs.pop("cls", pii_entities_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} + version_method_added="v3.0", args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} ) def recognize_linked_entities( self, @@ -587,13 +570,13 @@ def recognize_linked_entities( parameters=models.EntityLinkingTaskParameters( logging_opt_out=disable_service_logs, model_version=model_version, - string_index_type=string_index_type_compatibility(string_index_type_arg) - ) + string_index_type=string_index_type_compatibility(string_index_type_arg), + ), ), show_stats=show_stats, cls=kwargs.pop("cls", linked_entities_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -606,8 +589,8 @@ def recognize_linked_entities( string_index_type=string_index_type_arg, show_stats=show_stats, cls=kwargs.pop("cls", linked_entities_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -618,8 +601,9 @@ def _healthcare_result_callback( ): if deserialized is None: models = self._client.models(api_version=self._api_version) - response_cls = \ + response_cls = ( models.AnalyzeTextJobState if is_language_api(self._api_version) else models.HealthcareJobState + ) deserialized = response_cls.deserialize(raw_response) return healthcare_paged_result( doc_id_order, @@ -630,12 +614,7 @@ def _healthcare_result_callback( ) @distributed_trace - @validate_multiapi_args( - version_method_added="v3.1", - args_mapping={ - "2022-05-01": ["display_name"] - } - ) + @validate_multiapi_args(version_method_added="v3.1", args_mapping={"2022-05-01": ["display_name"]}) def begin_analyze_healthcare_entities( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -722,20 +701,16 @@ def begin_analyze_healthcare_entities( if continuation_token: return cast( - AnalyzeHealthcareEntitiesLROPoller[ - ItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]] - ], + AnalyzeHealthcareEntitiesLROPoller[ItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]]], _get_result_from_continuation_token( self._client._client, # pylint: disable=protected-access continuation_token, AnalyzeHealthcareEntitiesLROPoller, AnalyzeHealthcareEntitiesLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), - self._healthcare_result_callback - ) + self._healthcare_result_callback, + ), ) docs = _validate_input(documents, "language", language_arg) @@ -750,9 +725,7 @@ def begin_analyze_healthcare_entities( try: if is_language_api(self._api_version): - input_docs = models.MultiLanguageAnalysisInput( - documents=docs - ) + input_docs = models.MultiLanguageAnalysisInput(documents=docs) return cast( AnalyzeHealthcareEntitiesLROPoller[ ItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]] @@ -768,9 +741,9 @@ def begin_analyze_healthcare_entities( model_version=model_version, logging_opt_out=disable_service_logs, string_index_type=string_index_type_compatibility(string_index_type_arg), - ) + ), ) - ] + ], ), cls=my_cls, polling=AnalyzeHealthcareEntitiesLROPollingMethod( @@ -783,19 +756,17 @@ def begin_analyze_healthcare_entities( show_stats=show_stats, ) ], - **kwargs + **kwargs, ), continuation_token=continuation_token, poller_cls=AnalyzeHealthcareEntitiesLROPoller, - **kwargs - ) + **kwargs, + ), ) # v3.1 return cast( - AnalyzeHealthcareEntitiesLROPoller[ - ItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]] - ], + AnalyzeHealthcareEntitiesLROPoller[ItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]]], self._client.begin_health( docs, model_version=model_version, @@ -812,20 +783,17 @@ def begin_analyze_healthcare_entities( show_stats=show_stats, ) ], - **kwargs + **kwargs, ), continuation_token=continuation_token, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace - @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["disable_service_logs"]} - ) + @validate_multiapi_args(version_method_added="v3.0", args_mapping={"v3.1": ["disable_service_logs"]}) def extract_key_phrases( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -834,7 +802,7 @@ def extract_key_phrases( language: Optional[str] = None, model_version: Optional[str] = None, show_stats: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> List[Union[ExtractKeyPhrasesResult, DocumentError]]: """Extract key phrases from a batch of documents. @@ -903,12 +871,12 @@ def extract_key_phrases( parameters=models.KeyPhraseTaskParameters( logging_opt_out=disable_service_logs, model_version=model_version, - ) + ), ), show_stats=show_stats, cls=kwargs.pop("cls", key_phrases_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -920,8 +888,8 @@ def extract_key_phrases( show_stats=show_stats, logging_opt_out=disable_service_logs, cls=kwargs.pop("cls", key_phrases_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -929,7 +897,7 @@ def extract_key_phrases( @distributed_trace @validate_multiapi_args( version_method_added="v3.0", - args_mapping={"v3.1": ["show_opinion_mining", "disable_service_logs", "string_index_type"]} + args_mapping={"v3.1": ["show_opinion_mining", "disable_service_logs", "string_index_type"]}, ) def analyze_sentiment( self, @@ -1022,12 +990,12 @@ def analyze_sentiment( model_version=model_version, string_index_type=string_index_type_compatibility(string_index_type_arg), opinion_mining=show_opinion_mining, - ) + ), ), show_stats=show_stats, cls=kwargs.pop("cls", sentiment_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -1041,8 +1009,8 @@ def analyze_sentiment( opinion_mining=show_opinion_mining, show_stats=show_stats, cls=kwargs.pop("cls", sentiment_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -1062,7 +1030,7 @@ def _analyze_result_callback( raw_response, deserialized, show_stats=show_stats, - bespoke=bespoke + bespoke=bespoke, ) @distributed_trace @@ -1205,22 +1173,19 @@ def begin_analyze_actions( continuation_token, AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke - ) + bespoke, + ), ) models = self._client.models(api_version=self._api_version) - input_model_cls = \ + input_model_cls = ( models.MultiLanguageAnalysisInput if is_language_api(self._api_version) else models.MultiLanguageBatchInput - docs = input_model_cls( - documents=_validate_input(documents, "language", language_arg) ) + docs = input_model_cls(documents=_validate_input(documents, "language", language_arg)) doc_id_order = [doc.get("id") for doc in docs.documents] try: generated_tasks = [ @@ -1232,15 +1197,14 @@ def begin_analyze_actions( task_order = [(_determine_action_type(a), a.task_name) for a in generated_tasks] response_cls = kwargs.pop( "cls", - lambda pipeline_response, deserialized, _: - self._analyze_result_callback( - pipeline_response, - deserialized, - doc_id_order, - task_id_order=task_order, - show_stats=show_stats, - bespoke=bespoke - ), + lambda pipeline_response, deserialized, _: self._analyze_result_callback( + pipeline_response, + deserialized, + doc_id_order, + task_id_order=task_order, + show_stats=show_stats, + bespoke=bespoke, + ), ) try: @@ -1249,9 +1213,7 @@ def begin_analyze_actions( AnalyzeActionsResponse, self._client.begin_analyze_text_submit_job( body=models.AnalyzeTextJobsInput( - analysis_input=docs, - display_name=display_name, - tasks=generated_tasks + analysis_input=docs, display_name=display_name, tasks=generated_tasks ), cls=response_cls, polling=AnalyzeActionsLROPollingMethod( @@ -1265,39 +1227,36 @@ def begin_analyze_actions( show_stats=show_stats, ) ], - **kwargs + **kwargs, ), continuation_token=continuation_token, - **kwargs - ) + **kwargs, + ), ) # v3.1 analyze_tasks = models.JobManifestTasks( entity_recognition_tasks=[ - a for a in generated_tasks - if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_ENTITIES + a for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_ENTITIES ], entity_recognition_pii_tasks=[ - a for a in generated_tasks + a + for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES ], key_phrase_extraction_tasks=[ - a for a in generated_tasks - if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_KEY_PHRASES + a for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_KEY_PHRASES ], entity_linking_tasks=[ - a for a in generated_tasks + a + for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES ], sentiment_analysis_tasks=[ - a for a in generated_tasks - if _determine_action_type(a) == _AnalyzeActionsType.ANALYZE_SENTIMENT + a for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.ANALYZE_SENTIMENT ], ) - analyze_body = models.AnalyzeBatchInput( - display_name=display_name, tasks=analyze_tasks, analysis_input=docs - ) + analyze_body = models.AnalyzeBatchInput(display_name=display_name, tasks=analyze_tasks, analysis_input=docs) return cast( AnalyzeActionsResponse, self._client.begin_analyze( @@ -1314,11 +1273,11 @@ def begin_analyze_actions( show_stats=show_stats, ) ], - **kwargs + **kwargs, ), continuation_token=continuation_token, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -1414,20 +1373,16 @@ def begin_recognize_custom_entities( continuation_token, AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - TextAnalysisLROPoller[ - ItemPaged[Union[RecognizeCustomEntitiesResult, DocumentError]] - ], + TextAnalysisLROPoller[ItemPaged[Union[RecognizeCustomEntitiesResult, DocumentError]]], self.begin_analyze_actions( documents, actions=[ @@ -1435,7 +1390,7 @@ def begin_recognize_custom_entities( project_name=project_name, deployment_name=deployment_name, string_index_type=string_index_type_arg, - disable_service_logs=disable_service_logs + disable_service_logs=disable_service_logs, ) ], display_name=display_name, @@ -1443,8 +1398,8 @@ def begin_recognize_custom_entities( language=language, polling_interval=polling_interval_arg, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: @@ -1535,27 +1490,23 @@ def begin_single_label_classify( continuation_token, AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - TextAnalysisLROPoller[ - ItemPaged[Union[ClassifyDocumentResult, DocumentError]] - ], + TextAnalysisLROPoller[ItemPaged[Union[ClassifyDocumentResult, DocumentError]]], self.begin_analyze_actions( documents, actions=[ SingleLabelClassifyAction( project_name=project_name, deployment_name=deployment_name, - disable_service_logs=disable_service_logs + disable_service_logs=disable_service_logs, ) ], polling_interval=polling_interval_arg, @@ -1563,8 +1514,8 @@ def begin_single_label_classify( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: @@ -1655,27 +1606,23 @@ def begin_multi_label_classify( continuation_token, AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - TextAnalysisLROPoller[ - ItemPaged[Union[ClassifyDocumentResult, DocumentError]] - ], + TextAnalysisLROPoller[ItemPaged[Union[ClassifyDocumentResult, DocumentError]]], self.begin_analyze_actions( documents, actions=[ MultiLabelClassifyAction( project_name=project_name, deployment_name=deployment_name, - disable_service_logs=disable_service_logs + disable_service_logs=disable_service_logs, ) ], polling_interval=polling_interval_arg, @@ -1683,17 +1630,15 @@ def begin_multi_label_classify( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace - @validate_multiapi_args( - version_method_added="2023-04-01" - ) + @validate_multiapi_args(version_method_added="2023-04-01") def begin_extract_summary( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -1782,20 +1727,16 @@ def begin_extract_summary( continuation_token, AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - TextAnalysisLROPoller[ - ItemPaged[Union[ExtractiveSummaryResult, DocumentError]] - ], + TextAnalysisLROPoller[ItemPaged[Union[ExtractiveSummaryResult, DocumentError]]], self.begin_analyze_actions( documents, actions=[ @@ -1812,17 +1753,15 @@ def begin_extract_summary( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace - @validate_multiapi_args( - version_method_added="2023-04-01" - ) + @validate_multiapi_args(version_method_added="2023-04-01") def begin_abstract_summary( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -1909,20 +1848,16 @@ def begin_abstract_summary( continuation_token, AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - TextAnalysisLROPoller[ - ItemPaged[Union[AbstractiveSummaryResult, DocumentError]] - ], + TextAnalysisLROPoller[ItemPaged[Union[AbstractiveSummaryResult, DocumentError]]], self.begin_analyze_actions( documents, actions=[ @@ -1938,8 +1873,8 @@ def begin_abstract_summary( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py index db2210325079..fda323d2e9da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_validate.py @@ -27,18 +27,16 @@ def check_for_unsupported_actions_types(*args, **kwargs): return actions_version_mapping = { - "2023-04-01": - [ + "2023-04-01": [ "ExtractiveSummaryAction", "AbstractiveSummaryAction", ], - "2022-05-01": - [ + "2022-05-01": [ "RecognizeCustomEntitiesAction", "SingleLabelClassifyAction", "MultiLabelClassifyAction", - "AnalyzeHealthcareEntitiesAction" - ] + "AnalyzeHealthcareEntitiesAction", + ], } unsupported = { @@ -46,8 +44,8 @@ def check_for_unsupported_actions_types(*args, **kwargs): for version, args in actions_version_mapping.items() for arg in args if arg in [action.__class__.__name__ for action in actions] - and selected_api_version != version - and VERSIONS_SUPPORTED.index(selected_api_version) < VERSIONS_SUPPORTED.index(version) + and selected_api_version != version + and VERSIONS_SUPPORTED.index(selected_api_version) < VERSIONS_SUPPORTED.index(version) } if unsupported: @@ -78,8 +76,11 @@ def wrapper(*args: typing.Any, **kwargs: typing.Any) -> T: if selected_api_version == VERSIONS_SUPPORTED[-1]: return func(*args, **kwargs) - if version_method_added and version_method_added != selected_api_version and \ - VERSIONS_SUPPORTED.index(selected_api_version) < VERSIONS_SUPPORTED.index(version_method_added): + if ( + version_method_added + and version_method_added != selected_api_version + and VERSIONS_SUPPORTED.index(selected_api_version) < VERSIONS_SUPPORTED.index(version_method_added) + ): raise ValueError( f"'{client.__class__.__name__}.{func.__name__}' is not available in API version " f"{selected_api_version}. Use service API version {version_method_added} or newer." diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py index 79a01617dc3c..e1e2bd687f2f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py @@ -18,9 +18,7 @@ def _authentication_policy(credential): if credential is None: raise ValueError("Parameter 'credential' must not be None.") if isinstance(credential, AzureKeyCredential): - authentication_policy = AzureKeyCredentialPolicy( - name="Ocp-Apim-Subscription-Key", credential=credential - ) + authentication_policy = AzureKeyCredentialPolicy(name="Ocp-Apim-Subscription-Key", credential=credential) elif credential is not None and not hasattr(credential, "get_token"): raise TypeError( "Unsupported credential: {}. Use an instance of AzureKeyCredential " @@ -62,7 +60,7 @@ def __init__( "$top", "$skip", "opinionMining", - "api-version" + "api-version", } ) try: diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py index 0af6ceda65fd..6da249e2115f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py @@ -24,8 +24,7 @@ @runtime_checkable class AsyncTextAnalysisLROPoller(Protocol[PollingReturnType_co], Awaitable[PollingReturnType_co]): - """Implements a protocol which returned poller objects are consistent with. - """ + """Implements a protocol which returned poller objects are consistent with.""" @property def details(self) -> Mapping[str, Any]: @@ -69,8 +68,7 @@ def done(self) -> bool: :rtype: bool """ - def __await__(self) -> Generator[Any, None, PollingReturnType_co]: - ... + def __await__(self) -> Generator[Any, None, PollingReturnType_co]: ... async def cancel(self) -> None: """Cancel the operation currently being polled. @@ -114,11 +112,7 @@ def _raise_if_bad_http_status_and_method(response): code = response.status_code if code in {200, 201, 202, 204}: return - raise BadStatus( - "Invalid return status {!r} for {!r} operation".format( - code, response.request.method - ) - ) + raise BadStatus("Invalid return status {!r} for {!r} operation".format(code, response.request.method)) async def _poll(self): # pylint:disable=invalid-overridden-method """Poll status of operation so long as operation is incomplete and @@ -153,20 +147,17 @@ async def _poll(self): # pylint:disable=invalid-overridden-method ) -class AsyncAnalyzeHealthcareEntitiesLROPollingMethod( # pylint: disable=all - TextAnalyticsAsyncLROPollingMethod -): +class AsyncAnalyzeHealthcareEntitiesLROPollingMethod(TextAnalyticsAsyncLROPollingMethod): # pylint: disable=all def __init__(self, *args: Any, **kwargs: Any) -> None: self._text_analytics_client = kwargs.pop("text_analytics_client") self._doc_id_order = kwargs.pop("doc_id_order", None) self._show_stats = kwargs.pop("show_stats", None) - super().__init__( - *args, **kwargs - ) + super().__init__(*args, **kwargs) @property def _current_body(self): from .._generated.models import JobState + return JobState.deserialize(self._pipeline_response) @property @@ -194,9 +185,7 @@ def id(self) -> str: return self._get_id_from_headers() def _get_id_from_headers(self) -> str: - return self._initial_response.http_response.headers[ - "Operation-Location" - ].split("/jobs/")[1].split("?")[0] + return self._initial_response.http_response.headers["Operation-Location"].split("/jobs/")[1].split("?")[0] @property def display_name(self) -> Optional[str]: @@ -238,23 +227,14 @@ def details(self) -> Mapping[str, Any]: } def __getattr__(self, item: str) -> Any: - attrs = [ - "created_on", - "expires_on", - "display_name", - "last_modified_on", - "id" - ] + attrs = ["created_on", "expires_on", "display_name", "last_modified_on", "id"] if item in attrs: return self.details[item] return self.__getattribute__(item) @classmethod def from_continuation_token( # type: ignore - cls, - polling_method: AsyncAnalyzeHealthcareEntitiesLROPollingMethod, - continuation_token: str, - **kwargs: Any + cls, polling_method: AsyncAnalyzeHealthcareEntitiesLROPollingMethod, continuation_token: str, **kwargs: Any ) -> "AsyncAnalyzeHealthcareEntitiesLROPoller": """Internal use only. @@ -280,7 +260,7 @@ def from_continuation_token( # type: ignore client, initial_response, functools.partial(deserialization_callback, initial_response), - polling_method # type: ignore + polling_method, # type: ignore ) @distributed_trace_async @@ -305,9 +285,7 @@ async def cancel(self, **kwargs: Any) -> "AsyncLROPoller[None]": # type: ignore polling_interval = kwargs.pop("polling_interval", 5) try: - client = getattr( - self._polling_method, "_text_analytics_client" - ) + client = getattr(self._polling_method, "_text_analytics_client") try: return await client.begin_cancel_health_job( self.id, polling=TextAnalyticsAsyncLROPollingMethod(timeout=polling_interval) @@ -333,6 +311,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: @property def _current_body(self): from .._generated.models import JobState + return JobState.deserialize(self._pipeline_response) @property @@ -390,9 +369,7 @@ def id(self) -> str: return self._get_id_from_headers() def _get_id_from_headers(self) -> str: - return self._initial_response.http_response.headers[ - "Operation-Location" - ].split("/jobs/")[1].split("?")[0] + return self._initial_response.http_response.headers["Operation-Location"].split("/jobs/")[1].split("?")[0] def get_continuation_token(self) -> str: if self._initial_response.context is not None: @@ -403,6 +380,7 @@ def get_continuation_token(self) -> str: } return super().get_continuation_token() + class AsyncAnalyzeActionsLROPoller(AsyncLROPoller[PollingReturnType_co]): def polling_method(self) -> AsyncAnalyzeActionsLROPollingMethod: # type: ignore """Return the polling method associated to this poller. @@ -441,7 +419,7 @@ def __getattr__(self, item: str) -> Any: "actions_succeeded_count", "total_actions_count", "last_modified_on", - "id" + "id", ] if item in attrs: return self.details[item] @@ -449,10 +427,7 @@ def __getattr__(self, item: str) -> Any: @classmethod def from_continuation_token( # type: ignore - cls, - polling_method: AsyncAnalyzeActionsLROPollingMethod, - continuation_token: str, - **kwargs: Any + cls, polling_method: AsyncAnalyzeActionsLROPollingMethod, continuation_token: str, **kwargs: Any ) -> "AsyncAnalyzeActionsLROPoller": # type: ignore """Internal use only. @@ -478,7 +453,7 @@ def from_continuation_token( # type: ignore client, initial_response, functools.partial(deserialization_callback, initial_response), - polling_method # type: ignore + polling_method, # type: ignore ) @distributed_trace_async @@ -499,4 +474,5 @@ async def cancel(self) -> None: raise ValueError("Cancellation not supported by API versions v3.0, v3.1.") from exc except HttpResponseError as error: from .._response_handlers import process_http_response_error + process_http_response_error(error) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_response_handlers_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_response_handlers_async.py index a7f803f677c2..b4c145a856ca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_response_handlers_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_response_handlers_async.py @@ -11,25 +11,23 @@ from .._response_handlers import healthcare_result, get_iter_items -async def healthcare_extract_page_data_async( - doc_id_order, obj, health_job_state -): # pylint: disable=unused-argument +async def healthcare_extract_page_data_async(doc_id_order, obj, health_job_state): # pylint: disable=unused-argument return ( health_job_state.next_link, healthcare_result( doc_id_order, - health_job_state.results - if hasattr(health_job_state, "results") - else health_job_state.tasks.items[0].results, + ( + health_job_state.results + if hasattr(health_job_state, "results") + else health_job_state.tasks.items[0].results + ), {}, - lro=True + lro=True, ), ) -async def lro_get_next_page_async( - lro_status_callback, first_page, continuation_token, show_stats=False -): +async def lro_get_next_page_async(lro_status_callback, first_page, continuation_token, show_stats=False): if continuation_token is None: return first_page @@ -59,36 +57,18 @@ def healthcare_paged_result( show_stats=False, ): return AsyncItemPaged( - functools.partial( - lro_get_next_page_async, health_status_callback, obj, show_stats=show_stats - ), - functools.partial( - healthcare_extract_page_data_async, doc_id_order, obj - ), + functools.partial(lro_get_next_page_async, health_status_callback, obj, show_stats=show_stats), + functools.partial(healthcare_extract_page_data_async, doc_id_order, obj), ) -async def analyze_extract_page_data_async( - doc_id_order, task_order, bespoke, analyze_job_state -): - iter_items = get_iter_items( - doc_id_order, task_order, bespoke, analyze_job_state - ) +async def analyze_extract_page_data_async(doc_id_order, task_order, bespoke, analyze_job_state): + iter_items = get_iter_items(doc_id_order, task_order, bespoke, analyze_job_state) return analyze_job_state.next_link, AsyncList(iter_items) -def analyze_paged_result( - doc_id_order, - task_order, - analyze_status_callback, - _, - obj, - show_stats=False, - bespoke=False -): +def analyze_paged_result(doc_id_order, task_order, analyze_status_callback, _, obj, show_stats=False, bespoke=False): return AsyncItemPaged( functools.partial(lro_get_next_page_async, analyze_status_callback, obj, show_stats=show_stats), - functools.partial( - analyze_extract_page_data_async, doc_id_order, task_order, bespoke - ), + functools.partial(analyze_extract_page_data_async, doc_id_order, task_order, bespoke), ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py index 00d10713f611..670f47127056 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py @@ -69,7 +69,6 @@ AsyncTextAnalysisLROPoller, ) - AsyncAnalyzeActionsResponse = AsyncTextAnalysisLROPoller[ AsyncItemPaged[ List[ @@ -141,20 +140,13 @@ def __init__( api_version: Optional[Union[str, TextAnalyticsApiVersion]] = None, **kwargs: Any, ) -> None: - super().__init__( - endpoint=endpoint, credential=credential, api_version=api_version, **kwargs - ) + super().__init__(endpoint=endpoint, credential=credential, api_version=api_version, **kwargs) self._default_language = default_language if default_language is not None else "en" self._default_country_hint = default_country_hint if default_country_hint is not None else "US" - self._string_code_unit = ( - None if api_version == "v3.0" else "UnicodeCodePoint" - ) + self._string_code_unit = None if api_version == "v3.0" else "UnicodeCodePoint" @distributed_trace_async - @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["disable_service_logs"]} - ) + @validate_multiapi_args(version_method_added="v3.0", args_mapping={"v3.1": ["disable_service_logs"]}) async def detect_language( self, documents: Union[List[str], List[DetectLanguageInput], List[Dict[str, str]]], @@ -216,11 +208,7 @@ async def detect_language( :caption: Detecting language in a batch of documents. """ - country_hint_arg = ( - country_hint - if country_hint is not None - else self._default_country_hint - ) + country_hint_arg = country_hint if country_hint is not None else self._default_country_hint docs = _validate_input(documents, "country_hint", country_hint_arg) try: @@ -232,14 +220,13 @@ async def detect_language( body=models.AnalyzeTextLanguageDetectionInput( analysis_input={"documents": docs}, parameters=models.LanguageDetectionTaskParameters( - logging_opt_out=disable_service_logs, - model_version=model_version - ) + logging_opt_out=disable_service_logs, model_version=model_version + ), ), show_stats=show_stats, cls=kwargs.pop("cls", language_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -251,16 +238,15 @@ async def detect_language( show_stats=show_stats, logging_opt_out=disable_service_logs, cls=kwargs.pop("cls", language_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace_async @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} + version_method_added="v3.0", args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} ) async def recognize_entities( self, @@ -344,13 +330,13 @@ async def recognize_entities( parameters=models.EntitiesTaskParameters( logging_opt_out=disable_service_logs, model_version=model_version, - string_index_type=string_index_type_compatibility(string_index_type_arg) - ) + string_index_type=string_index_type_compatibility(string_index_type_arg), + ), ), show_stats=show_stats, cls=kwargs.pop("cls", entities_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -364,15 +350,13 @@ async def recognize_entities( logging_opt_out=disable_service_logs, cls=kwargs.pop("cls", entities_result), **kwargs, - ) + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace_async - @validate_multiapi_args( - version_method_added="v3.1" - ) + @validate_multiapi_args(version_method_added="v3.1") async def recognize_pii_entities( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -466,13 +450,13 @@ async def recognize_pii_entities( model_version=model_version, domain=domain_filter, pii_categories=categories_filter, - string_index_type=string_index_type_compatibility(string_index_type_arg) - ) + string_index_type=string_index_type_compatibility(string_index_type_arg), + ), ), show_stats=show_stats, cls=kwargs.pop("cls", pii_entities_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -487,16 +471,15 @@ async def recognize_pii_entities( logging_opt_out=disable_service_logs, string_index_type=string_index_type_arg, cls=kwargs.pop("cls", pii_entities_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace_async @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} + version_method_added="v3.0", args_mapping={"v3.1": ["string_index_type", "disable_service_logs"]} ) async def recognize_linked_entities( self, @@ -581,13 +564,13 @@ async def recognize_linked_entities( parameters=models.EntityLinkingTaskParameters( logging_opt_out=disable_service_logs, model_version=model_version, - string_index_type=string_index_type_compatibility(string_index_type_arg) - ) + string_index_type=string_index_type_compatibility(string_index_type_arg), + ), ), show_stats=show_stats, cls=kwargs.pop("cls", linked_entities_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -600,17 +583,14 @@ async def recognize_linked_entities( string_index_type=string_index_type_arg, show_stats=show_stats, cls=kwargs.pop("cls", linked_entities_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace_async - @validate_multiapi_args( - version_method_added="v3.0", - args_mapping={"v3.1": ["disable_service_logs"]} - ) + @validate_multiapi_args(version_method_added="v3.0", args_mapping={"v3.1": ["disable_service_logs"]}) async def extract_key_phrases( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -619,7 +599,7 @@ async def extract_key_phrases( language: Optional[str] = None, model_version: Optional[str] = None, show_stats: Optional[bool] = None, - **kwargs: Any + **kwargs: Any, ) -> List[Union[ExtractKeyPhrasesResult, DocumentError]]: """Extract key phrases from a batch of documents. @@ -688,12 +668,12 @@ async def extract_key_phrases( parameters=models.KeyPhraseTaskParameters( logging_opt_out=disable_service_logs, model_version=model_version, - ) + ), ), show_stats=show_stats, cls=kwargs.pop("cls", key_phrases_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -705,8 +685,8 @@ async def extract_key_phrases( show_stats=show_stats, logging_opt_out=disable_service_logs, cls=kwargs.pop("cls", key_phrases_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -714,7 +694,7 @@ async def extract_key_phrases( @distributed_trace_async @validate_multiapi_args( version_method_added="v3.0", - args_mapping={"v3.1": ["show_opinion_mining", "disable_service_logs", "string_index_type"]} + args_mapping={"v3.1": ["show_opinion_mining", "disable_service_logs", "string_index_type"]}, ) async def analyze_sentiment( self, @@ -807,12 +787,12 @@ async def analyze_sentiment( model_version=model_version, string_index_type=string_index_type_compatibility(string_index_type_arg), opinion_mining=show_opinion_mining, - ) + ), ), show_stats=show_stats, cls=kwargs.pop("cls", sentiment_result), - **kwargs - ) + **kwargs, + ), ) # api_versions 3.0, 3.1 @@ -826,8 +806,8 @@ async def analyze_sentiment( opinion_mining=show_opinion_mining, show_stats=show_stats, cls=kwargs.pop("cls", sentiment_result), - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -838,8 +818,9 @@ def _healthcare_result_callback( ): if deserialized is None: models = self._client.models(api_version=self._api_version) - response_cls = \ + response_cls = ( models.AnalyzeTextJobState if is_language_api(self._api_version) else models.HealthcareJobState + ) deserialized = response_cls.deserialize(raw_response) return healthcare_paged_result( doc_id_order, @@ -850,12 +831,7 @@ def _healthcare_result_callback( ) @distributed_trace_async - @validate_multiapi_args( - version_method_added="v3.1", - args_mapping={ - "2022-05-01": ["display_name"] - } - ) + @validate_multiapi_args(version_method_added="v3.1", args_mapping={"2022-05-01": ["display_name"]}) async def begin_analyze_healthcare_entities( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -869,9 +845,7 @@ async def begin_analyze_healthcare_entities( show_stats: Optional[bool] = None, string_index_type: Optional[str] = None, **kwargs: Any, - ) -> AsyncAnalyzeHealthcareEntitiesLROPoller[ - AsyncItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]] - ]: + ) -> AsyncAnalyzeHealthcareEntitiesLROPoller[AsyncItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]]]: """Analyze healthcare entities and identify relationships between these entities in a batch of documents. Entities are associated with references that can be found in existing knowledge bases, @@ -951,12 +925,10 @@ async def begin_analyze_healthcare_entities( continuation_token, AsyncAnalyzeHealthcareEntitiesLROPoller, AsyncAnalyzeHealthcareEntitiesLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), - self._healthcare_result_callback - ) + self._healthcare_result_callback, + ), ) docs = _validate_input(documents, "language", language_arg) @@ -971,9 +943,7 @@ async def begin_analyze_healthcare_entities( try: if is_language_api(self._api_version): - input_docs = models.MultiLanguageAnalysisInput( - documents=docs - ) + input_docs = models.MultiLanguageAnalysisInput(documents=docs) return cast( AsyncAnalyzeHealthcareEntitiesLROPoller[ AsyncItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]] @@ -989,9 +959,9 @@ async def begin_analyze_healthcare_entities( model_version=model_version, logging_opt_out=disable_service_logs, string_index_type=string_index_type_compatibility(string_index_type_arg), - ) + ), ) - ] + ], ), cls=my_cls, polling=AsyncAnalyzeHealthcareEntitiesLROPollingMethod( @@ -1004,12 +974,12 @@ async def begin_analyze_healthcare_entities( show_stats=show_stats, ) ], - **kwargs + **kwargs, ), continuation_token=continuation_token, poller_cls=AsyncAnalyzeHealthcareEntitiesLROPoller, - **kwargs - ) + **kwargs, + ), ) # v3.1 @@ -1037,7 +1007,7 @@ async def begin_analyze_healthcare_entities( ), continuation_token=continuation_token, **kwargs, - ) + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -1057,7 +1027,7 @@ def _analyze_result_callback( raw_response, deserialized, show_stats=show_stats, - bespoke=bespoke + bespoke=bespoke, ) @distributed_trace_async @@ -1200,22 +1170,19 @@ async def begin_analyze_actions( continuation_token, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke - ) + bespoke, + ), ) models = self._client.models(api_version=self._api_version) - input_model_cls = \ + input_model_cls = ( models.MultiLanguageAnalysisInput if is_language_api(self._api_version) else models.MultiLanguageBatchInput - docs = input_model_cls( - documents=_validate_input(documents, "language", language_arg) ) + docs = input_model_cls(documents=_validate_input(documents, "language", language_arg)) doc_id_order = [doc.get("id") for doc in docs.documents] try: generated_tasks = [ @@ -1228,15 +1195,14 @@ async def begin_analyze_actions( response_cls = kwargs.pop( "cls", - lambda pipeline_response, deserialized, _: - self._analyze_result_callback( - pipeline_response, - deserialized, - doc_id_order, - task_id_order=task_order, - show_stats=show_stats, - bespoke=bespoke - ), + lambda pipeline_response, deserialized, _: self._analyze_result_callback( + pipeline_response, + deserialized, + doc_id_order, + task_id_order=task_order, + show_stats=show_stats, + bespoke=bespoke, + ), ) try: @@ -1245,9 +1211,7 @@ async def begin_analyze_actions( AsyncAnalyzeActionsResponse, await self._client.begin_analyze_text_submit_job( body=models.AnalyzeTextJobsInput( - analysis_input=docs, - display_name=display_name, - tasks=generated_tasks + analysis_input=docs, display_name=display_name, tasks=generated_tasks ), cls=response_cls, polling=AsyncAnalyzeActionsLROPollingMethod( @@ -1261,39 +1225,36 @@ async def begin_analyze_actions( show_stats=show_stats, ) ], - **kwargs + **kwargs, ), continuation_token=continuation_token, - **kwargs - ) + **kwargs, + ), ) # v3.1 analyze_tasks = models.JobManifestTasks( entity_recognition_tasks=[ - a for a in generated_tasks - if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_ENTITIES + a for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_ENTITIES ], entity_recognition_pii_tasks=[ - a for a in generated_tasks + a + for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES ], key_phrase_extraction_tasks=[ - a for a in generated_tasks - if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_KEY_PHRASES + a for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_KEY_PHRASES ], entity_linking_tasks=[ - a for a in generated_tasks + a + for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES ], sentiment_analysis_tasks=[ - a for a in generated_tasks - if _determine_action_type(a) == _AnalyzeActionsType.ANALYZE_SENTIMENT + a for a in generated_tasks if _determine_action_type(a) == _AnalyzeActionsType.ANALYZE_SENTIMENT ], ) - analyze_body = models.AnalyzeBatchInput( - display_name=display_name, tasks=analyze_tasks, analysis_input=docs - ) + analyze_body = models.AnalyzeBatchInput(display_name=display_name, tasks=analyze_tasks, analysis_input=docs) return cast( AsyncAnalyzeActionsResponse, await self._client.begin_analyze( @@ -1314,7 +1275,7 @@ async def begin_analyze_actions( ), continuation_token=continuation_token, **kwargs, - ) + ), ) except HttpResponseError as error: return process_http_response_error(error) @@ -1410,20 +1371,16 @@ async def begin_recognize_custom_entities( continuation_token, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - AsyncTextAnalysisLROPoller[ - AsyncItemPaged[Union[RecognizeCustomEntitiesResult, DocumentError]] - ], + AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[RecognizeCustomEntitiesResult, DocumentError]]], await self.begin_analyze_actions( documents, actions=[ @@ -1431,7 +1388,7 @@ async def begin_recognize_custom_entities( project_name=project_name, deployment_name=deployment_name, string_index_type=string_index_type_arg, - disable_service_logs=disable_service_logs + disable_service_logs=disable_service_logs, ) ], display_name=display_name, @@ -1439,8 +1396,8 @@ async def begin_recognize_custom_entities( language=language, polling_interval=polling_interval_arg, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: @@ -1531,27 +1488,23 @@ async def begin_single_label_classify( continuation_token, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - AsyncTextAnalysisLROPoller[ - AsyncItemPaged[Union[ClassifyDocumentResult, DocumentError]] - ], + AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[ClassifyDocumentResult, DocumentError]]], await self.begin_analyze_actions( documents, actions=[ SingleLabelClassifyAction( project_name=project_name, deployment_name=deployment_name, - disable_service_logs=disable_service_logs + disable_service_logs=disable_service_logs, ) ], polling_interval=polling_interval_arg, @@ -1559,8 +1512,8 @@ async def begin_single_label_classify( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: @@ -1651,27 +1604,23 @@ async def begin_multi_label_classify( continuation_token, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - AsyncTextAnalysisLROPoller[ - AsyncItemPaged[Union[ClassifyDocumentResult, DocumentError]] - ], + AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[ClassifyDocumentResult, DocumentError]]], await self.begin_analyze_actions( documents, actions=[ MultiLabelClassifyAction( project_name=project_name, deployment_name=deployment_name, - disable_service_logs=disable_service_logs + disable_service_logs=disable_service_logs, ) ], polling_interval=polling_interval_arg, @@ -1679,17 +1628,15 @@ async def begin_multi_label_classify( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace_async - @validate_multiapi_args( - version_method_added="2023-04-01" - ) + @validate_multiapi_args(version_method_added="2023-04-01") async def begin_extract_summary( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -1778,20 +1725,16 @@ async def begin_extract_summary( continuation_token, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - AsyncTextAnalysisLROPoller[ - AsyncItemPaged[Union[ExtractiveSummaryResult, DocumentError]] - ], + AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[ExtractiveSummaryResult, DocumentError]]], await self.begin_analyze_actions( documents, actions=[ @@ -1808,17 +1751,15 @@ async def begin_extract_summary( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: return process_http_response_error(error) @distributed_trace_async - @validate_multiapi_args( - version_method_added="2023-04-01" - ) + @validate_multiapi_args(version_method_added="2023-04-01") async def begin_abstract_summary( self, documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], @@ -1905,20 +1846,16 @@ async def begin_abstract_summary( continuation_token, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod( - text_analytics_client=self._client, - timeout=polling_interval_arg, - **kwargs + text_analytics_client=self._client, timeout=polling_interval_arg, **kwargs ), self._analyze_result_callback, - bespoke=True - ) + bespoke=True, + ), ) try: return cast( - AsyncTextAnalysisLROPoller[ - AsyncItemPaged[Union[AbstractiveSummaryResult, DocumentError]] - ], + AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[AbstractiveSummaryResult, DocumentError]]], await self.begin_analyze_actions( documents, actions=[ @@ -1934,8 +1871,8 @@ async def begin_abstract_summary( show_stats=show_stats, language=language, bespoke=True, - **kwargs - ) + **kwargs, + ), ) except HttpResponseError as error: diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_abstract_summary_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_abstract_summary_async.py index 9e1c62f5429f..2e3289f8e0f0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_abstract_summary_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_abstract_summary_async.py @@ -65,9 +65,7 @@ async def sample_abstractive_summarization_async() -> None: print("Summaries abstracted:") [print(f"{summary.text}\n") for summary in result.summaries] elif result.is_error is True: - print("...Is an error with code '{}' and message '{}'".format( - result.error.code, result.error.message - )) + print("...Is an error with code '{}' and message '{}'".format(result.error.code, result.error.message)) # [END abstract_summary_async] @@ -75,5 +73,5 @@ async def main(): await sample_abstractive_summarization_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_alternative_document_input_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_alternative_document_input_async.py index 3fcfb15be7be..daa168a19ad8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_alternative_document_input_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_alternative_document_input_async.py @@ -33,12 +33,18 @@ async def sample_alternative_document_input() -> None: text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) documents = [ - {"id": "0", "country_hint": "US", "text": "I had the best day of my life. I decided to go sky-diving and it made me appreciate my whole life so much more. I developed a deep-connection with my instructor as well."}, - {"id": "1", "country_hint": "GB", - "text": "This was a waste of my time. The speaker put me to sleep."}, + { + "id": "0", + "country_hint": "US", + "text": "I had the best day of my life. I decided to go sky-diving and it made me appreciate my whole life so much more. I developed a deep-connection with my instructor as well.", + }, + {"id": "1", "country_hint": "GB", "text": "This was a waste of my time. The speaker put me to sleep."}, {"id": "2", "country_hint": "MX", "text": "No tengo dinero ni nada que dar..."}, - {"id": "3", "country_hint": "FR", - "text": "L'hôtel n'était pas très confortable. L'éclairage était trop sombre."} + { + "id": "3", + "country_hint": "FR", + "text": "L'hôtel n'était pas très confortable. L'éclairage était trop sombre.", + }, ] async with text_analytics_client: result = await text_analytics_client.detect_language(documents) @@ -57,5 +63,5 @@ async def main(): await sample_alternative_document_input() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_actions_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_actions_async.py index c55084edeab2..dc3a32bc019f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_actions_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_actions_async.py @@ -46,15 +46,13 @@ async def sample_analyze_async() -> None: ) documents = [ - 'We went to Contoso Steakhouse located at midtown NYC last week for a dinner party, and we adore the spot! ' - 'They provide marvelous food and they have a great menu. The chief cook happens to be the owner (I think his name is John Doe) ' - 'and he is super nice, coming out of the kitchen and greeted us all.' - , - - 'We enjoyed very much dining in the place! ' - 'The Sirloin steak I ordered was tender and juicy, and the place was impeccably clean. You can even pre-order from their ' - 'online menu at www.contososteakhouse.com, call 312-555-0176 or send email to order@contososteakhouse.com! ' - 'The only complaint I have is the food didn\'t come fast enough. Overall I highly recommend it!' + "We went to Contoso Steakhouse located at midtown NYC last week for a dinner party, and we adore the spot! " + "They provide marvelous food and they have a great menu. The chief cook happens to be the owner (I think his name is John Doe) " + "and he is super nice, coming out of the kitchen and greeted us all.", + "We enjoyed very much dining in the place! " + "The Sirloin steak I ordered was tender and juicy, and the place was impeccably clean. You can even pre-order from their " + "online menu at www.contososteakhouse.com, call 312-555-0176 or send email to order@contososteakhouse.com! " + "The only complaint I have is the food didn't come fast enough. Overall I highly recommend it!", ] async with text_analytics_client: @@ -67,7 +65,7 @@ async def sample_analyze_async() -> None: ExtractKeyPhrasesAction(), RecognizeLinkedEntitiesAction(), AnalyzeSentimentAction(), - ] + ], ) pages = await poller.result() @@ -108,9 +106,7 @@ async def sample_analyze_async() -> None: print(f"......Entity name: {linked_entity.name}") print(f".........Data source: {linked_entity.data_source}") print(f".........Data source language: {linked_entity.language}") - print( - f".........Data source entity ID: {linked_entity.data_source_entity_id}" - ) + print(f".........Data source entity ID: {linked_entity.data_source_entity_id}") print(f".........Data source URL: {linked_entity.url}") print(".........Document matches:") for match in linked_entity.matches: @@ -122,16 +118,12 @@ async def sample_analyze_async() -> None: elif result.kind == "SentimentAnalysis": print("...Results of Analyze Sentiment action:") print(f"......Overall sentiment: {result.sentiment}") - print( - f"......Scores: positive={result.confidence_scores.positive}; \ + print(f"......Scores: positive={result.confidence_scores.positive}; \ neutral={result.confidence_scores.neutral}; \ - negative={result.confidence_scores.negative} \n" - ) + negative={result.confidence_scores.negative} \n") elif result.is_error is True: - print( - f"...Is an error with code '{result.error.code}' and message '{result.error.message}'" - ) + print(f"...Is an error with code '{result.error.code}' and message '{result.error.message}'") print("------------------------------------------") @@ -142,5 +134,5 @@ async def main(): await sample_analyze_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_action_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_action_async.py index 6c7b7dd7c790..d1d299c0c2d4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_action_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_action_async.py @@ -48,7 +48,7 @@ async def sample_analyze_healthcare_action() -> None: """, """ Patient needs to take 50 mg of ibuprofen, and 2 mg of Coumadin. - """ + """, ] async with text_analytics_client: @@ -115,5 +115,5 @@ async def main(): await sample_analyze_healthcare_action() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_async.py index d1504d8b3d1b..9ec95da4ca63 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_async.py @@ -31,9 +31,7 @@ async def sample_analyze_healthcare_entities_async() -> None: "In this sample we will be combing through the prescriptions our pharmacy has fulfilled " "so we can catalog how much inventory we have" ) - print( - "We start out with a list of prescription documents." - ) + print("We start out with a list of prescription documents.") # [START analyze_healthcare_entities_async] import os @@ -57,7 +55,7 @@ async def sample_analyze_healthcare_entities_async() -> None: """, """ Patient needs to take 50 mg of ibuprofen, and 2 mg of Coumadin. - """ + """, ] async with text_analytics_client: @@ -94,7 +92,8 @@ async def sample_analyze_healthcare_entities_async() -> None: dosage_of_medication_relations = [ entity_relation for doc in docs - for entity_relation in doc.entity_relations if entity_relation.relation_type == HealthcareEntityRelation.DOSAGE_OF_MEDICATION + for entity_relation in doc.entity_relations + if entity_relation.relation_type == HealthcareEntityRelation.DOSAGE_OF_MEDICATION ] # [END analyze_healthcare_entities_async] @@ -115,16 +114,14 @@ async def sample_analyze_healthcare_entities_async() -> None: medication_role = next(filter(lambda x: x.name == "Medication", relation.roles)) try: - dosage_value = int(re.findall(r"\d+", dosage_role.entity.text)[0]) # we find the numbers in the dosage + dosage_value = int(re.findall(r"\d+", dosage_role.entity.text)[0]) # we find the numbers in the dosage medication_to_dosage[medication_role.entity.text] += dosage_value except StopIteration: # Error handling for if there's no dosage in numbers. pass [ - print("We have fulfilled '{}' total mg of '{}'".format( - dosage, medication - )) + print("We have fulfilled '{}' total mg of '{}'".format(dosage, medication)) for medication, dosage in medication_to_dosage.items() ] @@ -133,5 +130,5 @@ async def main(): await sample_analyze_healthcare_entities_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_with_cancellation_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_with_cancellation_async.py index 3164a7a30910..0d5284b7cbce 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_with_cancellation_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_with_cancellation_async.py @@ -36,8 +36,7 @@ async def sample_analyze_healthcare_entities_with_cancellation_async() -> None: credential=AzureKeyCredential(key), ) - documents = [ - "RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | \ + documents = ["RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | \ CORONARY ARTERY DISEASE | Signed | DIS | Admission Date: 5/22/2001 \ Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: \ CORONARY ARTERY DISEASE. HISTORY OF PRESENT ILLNESS: \ @@ -49,8 +48,7 @@ async def sample_analyze_healthcare_entities_with_cancellation_async() -> None: but this was a difficult study due to body habitus. The patient went for six minutes with minimal ST depressions \ in the anterior lateral leads , thought due to fatigue and wrist pain , his anginal equivalent. Due to the patient's \ increased symptoms and family history and history left main disease with total occasional of his RCA was referred \ - for revascularization with open heart surgery." - ] + for revascularization with open heart surgery."] async with text_analytics_client: poller = await text_analytics_client.begin_analyze_healthcare_entities(documents) @@ -71,7 +69,5 @@ async def main(): await sample_analyze_healthcare_entities_with_cancellation_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) - - diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_async.py index 3fc813635d45..8c80dcdea013 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_async.py @@ -53,7 +53,7 @@ async def sample_analyze_sentiment_async() -> None: """This was pretty good! The sights were ok, and I had fun with my instructors! Can't complain too much about my experience""", """I only have one word for my experience: WOW!!! I can't believe I have had such a wonderful skydiving company right in my backyard this whole time! I will definitely be a repeat customer, and I want to take my grandmother skydiving too, - I know she'll love it!""" + I know she'll love it!""", ] async with text_analytics_client: @@ -68,7 +68,7 @@ async def sample_analyze_sentiment_async() -> None: # [END analyze_sentiment_async] print("Now, let us extract all of the positive reviews") - positive_reviews = [doc for doc in docs if doc.sentiment == 'positive'] + positive_reviews = [doc for doc in docs if doc.sentiment == "positive"] print("We want to be very confident that our reviews are positive since we'll be posting them on our website.") print("We're going to confirm our chosen reviews are positive using two different tests") @@ -77,26 +77,20 @@ async def sample_analyze_sentiment_async() -> None: "First, we are going to check how confident the sentiment analysis model is that a document is positive. " "Let's go with a 90% confidence." ) - positive_reviews = [ - review for review in positive_reviews - if review.confidence_scores.positive >= 0.9 - ] + positive_reviews = [review for review in positive_reviews if review.confidence_scores.positive >= 0.9] - print( - "Finally, we also want to make sure every sentence is positive so we only showcase our best selves!" - ) + print("Finally, we also want to make sure every sentence is positive so we only showcase our best selves!") positive_reviews_final = [] for idx, review in enumerate(positive_reviews): print(f"Looking at positive review #{idx + 1}") any_sentence_not_positive = False for sentence in review.sentences: - print("...Sentence '{}' has sentiment '{}' with confidence scores '{}'".format( - sentence.text, - sentence.sentiment, - sentence.confidence_scores + print( + "...Sentence '{}' has sentiment '{}' with confidence scores '{}'".format( + sentence.text, sentence.sentiment, sentence.confidence_scores ) ) - if sentence.sentiment != 'positive': + if sentence.sentiment != "positive": any_sentence_not_positive = True if not any_sentence_not_positive: positive_reviews_final.append(review) @@ -108,5 +102,5 @@ async def main(): await sample_analyze_sentiment_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py index def16d04e933..859fc38eabae 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py @@ -54,16 +54,11 @@ async def sample_analyze_sentiment_with_opinion_mining() -> None: endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] - text_analytics_client = TextAnalyticsClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) print("In this sample we will be a hotel owner going through reviews of their hotel to find complaints.") - print( - "I first found a handful of reviews for my hotel. Let's see what we have to improve." - ) + print("I first found a handful of reviews for my hotel. Let's see what we have to improve.") documents = [ """ @@ -80,7 +75,7 @@ async def sample_analyze_sentiment_with_opinion_mining() -> None: """ Nice rooms! I had a great unobstructed view of the Microsoft campus but bathrooms were old and the toilet was dirty when we arrived. It was close to bus stops and groceries stores. If you want to be close to campus I will recommend it, otherwise, might be better to stay in a cleaner one - """ + """, ] async with text_analytics_client: @@ -91,9 +86,11 @@ async def sample_analyze_sentiment_with_opinion_mining() -> None: positive_reviews = [doc for doc in doc_result if doc.sentiment == "positive"] mixed_reviews = [doc for doc in doc_result if doc.sentiment == "mixed"] negative_reviews = [doc for doc in doc_result if doc.sentiment == "negative"] - print("...We have {} positive reviews, {} mixed reviews, and {} negative reviews. ".format( - len(positive_reviews), len(mixed_reviews), len(negative_reviews) - )) + print( + "...We have {} positive reviews, {} mixed reviews, and {} negative reviews. ".format( + len(positive_reviews), len(mixed_reviews), len(negative_reviews) + ) + ) print( "\nSince these reviews seem so mixed, and since I'm interested in finding exactly what it is about my hotel that should be improved, " "let's find the complaints users have about individual aspects of this hotel" @@ -110,21 +107,22 @@ async def sample_analyze_sentiment_with_opinion_mining() -> None: if sentence.mined_opinions: for mined_opinion in sentence.mined_opinions: target = mined_opinion.target - if target.sentiment == 'negative': + if target.sentiment == "negative": target_to_complaints.setdefault(target.text, []) target_to_complaints[target.text].append(mined_opinion) - print("\nLet's now go through the aspects of our hotel people have complained about and see what users have specifically said") + print( + "\nLet's now go through the aspects of our hotel people have complained about and see what users have specifically said" + ) for target_name, complaints in target_to_complaints.items(): - print("Users have made {} complaint(s) about '{}', specifically saying that it's '{}'".format( - len(complaints), - target_name, - "', '".join( - [assessment.text for complaint in complaints for assessment in complaint.assessments] + print( + "Users have made {} complaint(s) about '{}', specifically saying that it's '{}'".format( + len(complaints), + target_name, + "', '".join([assessment.text for complaint in complaints for assessment in complaint.assessments]), ) - )) - + ) print( "\n\nLooking at the breakdown, I can see what aspects of my hotel need improvement, and based off of both the number and " @@ -136,5 +134,5 @@ async def main(): await sample_analyze_sentiment_with_opinion_mining() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py index 384c608acdce..36a35d99ad6e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py @@ -37,18 +37,17 @@ async def sample_authentication_with_api_key_credential_async() -> None: import os from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics.aio import TextAnalyticsClient + endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] text_analytics_client = TextAnalyticsClient(endpoint, AzureKeyCredential(key)) # [END create_ta_client_with_key_async] - doc = [ - """ + doc = [""" I need to take my cat to the veterinarian. She's been coughing for a while and I thought it was just a hairball, but now I'm now worried it might be something else. She's still very healthy so I'm not too worried though. - """ - ] + """] async with text_analytics_client: result = await text_analytics_client.detect_language(doc) @@ -72,12 +71,10 @@ async def sample_authentication_with_azure_active_directory_async() -> None: text_analytics_client = TextAnalyticsClient(endpoint, credential=credential) # [END create_ta_client_with_aad_async] - doc = [ - """ + doc = [""" I need to take my cat to the veterinarian. She's been coughing for a while and I thought it was just a hairball, but now I'm now worried it might be something else. She's still very healthy so I'm not too worried though. - """ - ] + """] async with text_analytics_client: result = await text_analytics_client.detect_language(doc) @@ -89,5 +86,6 @@ async def main(): await sample_authentication_with_api_key_credential_async() await sample_authentication_with_azure_active_directory_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py index 3d741a00f42d..6a118b87b470 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_detect_language_async.py @@ -49,7 +49,7 @@ async def sample_detect_language_async() -> None: """, """ 最近由于工作压力太大,我们决定去富酒店度假。那儿的温泉实在太舒服了,我跟我丈夫都完全恢复了工作前的青春精神!加油! - """ + """, ] async with text_analytics_client: result = await text_analytics_client.detect_language(documents) @@ -59,9 +59,11 @@ async def sample_detect_language_async() -> None: print("Let's see what language each review is in!") for idx, doc in enumerate(reviewed_docs): - print("Review #{} is in '{}', which has ISO639-1 name '{}'\n".format( - idx, doc.primary_language.name, doc.primary_language.iso6391_name - )) + print( + "Review #{} is in '{}', which has ISO639-1 name '{}'\n".format( + idx, doc.primary_language.name, doc.primary_language.iso6391_name + ) + ) # [END detect_language_async] print( "When actually storing the reviews, we want to map the review to their ISO639-1 name " @@ -77,5 +79,5 @@ async def main(): await sample_detect_language_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py index 79c1917257bc..a63522cdb4dc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_key_phrases_async.py @@ -25,9 +25,7 @@ async def sample_extract_key_phrases_async() -> None: - print( - "In this sample, we want to find the articles that mention Microsoft to read." - ) + print("In this sample, we want to find the articles that mention Microsoft to read.") # [START extract_key_phrases_async] import os @@ -51,7 +49,7 @@ async def sample_extract_key_phrases_async() -> None: """ Redmond, WA. Employees at Microsoft can be excited about the new coffee shop that will open on campus once workers no longer have to work remotely... - """ + """, ] async with text_analytics_client: @@ -60,11 +58,8 @@ async def sample_extract_key_phrases_async() -> None: articles_that_mention_microsoft = [] for idx, doc in enumerate(result): if not doc.is_error: - print("Key phrases in article #{}: {}".format( - idx + 1, - ", ".join(doc.key_phrases) - )) - # [END extract_key_phrases_async] + print("Key phrases in article #{}: {}".format(idx + 1, ", ".join(doc.key_phrases))) + # [END extract_key_phrases_async] if "Microsoft" in doc.key_phrases: articles_that_mention_microsoft.append(str(idx + 1)) @@ -79,5 +74,5 @@ async def main(): await sample_extract_key_phrases_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_summary_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_summary_async.py index 35788ef40274..6c43e67c1a65 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_summary_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_summary_async.py @@ -60,13 +60,9 @@ async def sample_extractive_summarization_async(): extract_summary_results = await poller.result() async for result in extract_summary_results: if result.kind == "ExtractiveSummarization": - print("Summary extracted: \n{}".format( - " ".join([sentence.text for sentence in result.sentences])) - ) + print("Summary extracted: \n{}".format(" ".join([sentence.text for sentence in result.sentences]))) elif result.is_error is True: - print("...Is an error with code '{}' and message '{}'".format( - result.error.code, result.error.message - )) + print("...Is an error with code '{}' and message '{}'".format(result.error.code, result.error.message)) # [END extract_summary_async] @@ -74,5 +70,5 @@ async def main(): await sample_extractive_summarization_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_get_detailed_diagnostics_information_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_get_detailed_diagnostics_information_async.py index b520283fb7b1..3211117c0899 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_get_detailed_diagnostics_information_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_get_detailed_diagnostics_information_async.py @@ -28,13 +28,16 @@ async def sample_get_detailed_diagnostics_information_async() -> None: import json from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics.aio import TextAnalyticsClient + _LOGGER = logging.getLogger(__name__) endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] # This client will log detailed information about its HTTP sessions, at DEBUG level - text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key), logging_enable=True) + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, credential=AzureKeyCredential(key), logging_enable=True + ) documents = [ """I had the best day of my life. I decided to go sky-diving and it made me appreciate my whole life so much more. @@ -42,7 +45,7 @@ async def sample_get_detailed_diagnostics_information_async() -> None: """, "This was a waste of my time. The speaker put me to sleep.", "No tengo dinero ni nada que dar...", - "L'hôtel n'était pas très confortable. L'éclairage était trop sombre." + "L'hôtel n'était pas très confortable. L'éclairage était trop sombre.", ] json_responses = [] @@ -58,10 +61,7 @@ def callback(resp): async with text_analytics_client: result = await text_analytics_client.extract_key_phrases( - documents, - show_stats=True, - model_version="latest", - raw_response_hook=callback + documents, show_stats=True, model_version="latest", raw_response_hook=callback ) for doc in result: _LOGGER.warning(f"Doc with id {doc.id} has these warnings: {doc.warnings}") @@ -73,5 +73,5 @@ async def main(): await sample_get_detailed_diagnostics_information_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_model_version_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_model_version_async.py index 7370d2430e91..78959b227900 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_model_version_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_model_version_async.py @@ -38,10 +38,8 @@ async def sample_model_version_async() -> None: key = os.environ["AZURE_LANGUAGE_KEY"] text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - documents = [ - "I work for Foo Company, and we hired Contoso for our annual founding ceremony. The food \ - was amazing and we all can't say enough good words about the quality and the level of service." - ] + documents = ["I work for Foo Company, and we hired Contoso for our annual founding ceremony. The food \ + was amazing and we all can't say enough good words about the quality and the level of service."] async with text_analytics_client: print("\nSetting model_version='latest' with recognize_entities") @@ -55,10 +53,7 @@ async def sample_model_version_async() -> None: print("\nSetting model_version='latest' with recognize entities action in begin_analyze_actions") poller = await text_analytics_client.begin_analyze_actions( - documents, - actions=[ - RecognizeEntitiesAction(model_version="latest") - ] + documents, actions=[RecognizeEntitiesAction(model_version="latest")] ) print("...Results of Recognize Entities Action:") @@ -69,14 +64,16 @@ async def sample_model_version_async() -> None: for entity in action_result.entities: print(f"......Entity '{entity.text}' has category '{entity.category}'") elif action_result.is_error is True: - print("......Is an error with code '{}' and message '{}'".format( - action_result.error.code, action_result.error.message - )) + print( + "......Is an error with code '{}' and message '{}'".format( + action_result.error.code, action_result.error.message + ) + ) async def main(): await sample_model_version_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_label_classify_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_label_classify_async.py index 67cc72cc399f..cff77479c984 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_label_classify_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_label_classify_async.py @@ -58,9 +58,7 @@ async def sample_classify_document_multi_label_async() -> None: async with text_analytics_client: poller = await text_analytics_client.begin_multi_label_classify( - document, - project_name=project_name, - deployment_name=deployment_name + document, project_name=project_name, deployment_name=deployment_name ) pages = await poller.result() @@ -73,13 +71,13 @@ async def sample_classify_document_multi_label_async() -> None: classifications = classification_result.classifications print(f"\nThe movie plot '{doc}' was classified as the following genres:\n") for classification in classifications: - print("'{}' with confidence score {}.".format( - classification.category, classification.confidence_score - )) + print("'{}' with confidence score {}.".format(classification.category, classification.confidence_score)) elif classification_result.is_error is True: - print("Movie plot '{}' has an error with code '{}' and message '{}'".format( - doc, classification_result.error.code, classification_result.error.message - )) + print( + "Movie plot '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.error.code, classification_result.error.message + ) + ) # [END multi_label_classify_async] @@ -87,5 +85,5 @@ async def main(): await sample_classify_document_multi_label_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py index 4e708b1d2df9..228894cb9c69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py @@ -56,9 +56,7 @@ async def sample_recognize_custom_entities_async() -> None: async with text_analytics_client: poller = await text_analytics_client.begin_recognize_custom_entities( - document, - project_name=project_name, - deployment_name=deployment_name + document, project_name=project_name, deployment_name=deployment_name ) document_results = await poller.result() @@ -72,8 +70,9 @@ async def sample_recognize_custom_entities_async() -> None: ) ) elif custom_entities_result.is_error is True: - print("...Is an error with code '{}' and message '{}'".format( - custom_entities_result.error.code, custom_entities_result.error.message + print( + "...Is an error with code '{}' and message '{}'".format( + custom_entities_result.error.code, custom_entities_result.error.message ) ) # [END recognize_custom_entities_async] @@ -83,5 +82,5 @@ async def main(): await sample_recognize_custom_entities_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py index f31c13bd1558..5641cc8c0d87 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_entities_async.py @@ -45,7 +45,7 @@ async def sample_recognize_entities_async() -> None: """We at the Foo Company re-hired Contoso after all of our past successes with the company. Though the food was still great, I feel there has been a quality drop since their last time catering for us. Is anyone else running into the same problem?""", - """Bar Company is over the moon about the service we received from Contoso, the best sliders ever!!!!""" + """Bar Company is over the moon about the service we received from Contoso, the best sliders ever!!!!""", ] async with text_analytics_client: @@ -58,15 +58,13 @@ async def sample_recognize_entities_async() -> None: for entity in review.entities: print(f"Entity '{entity.text}' has category '{entity.category}'") - if entity.category == 'Organization': + if entity.category == "Organization": organization_to_reviews.setdefault(entity.text, []) organization_to_reviews[entity.text].append(reviews[idx]) for organization, reviews in organization_to_reviews.items(): print( - "\n\nOrganization '{}' has left us the following review(s): {}".format( - organization, "\n\n".join(reviews) - ) + "\n\nOrganization '{}' has left us the following review(s): {}".format(organization, "\n\n".join(reviews)) ) # [END recognize_entities_async] @@ -75,5 +73,5 @@ async def main(): await sample_recognize_entities_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py index 5c36a947e841..51d1230a1b3e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_linked_entities_async.py @@ -42,15 +42,13 @@ async def sample_recognize_linked_entities_async() -> None: key = os.environ["AZURE_LANGUAGE_KEY"] text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - documents = [ - """ + documents = [""" Microsoft was founded by Bill Gates with some friends he met at Harvard. One of his friends, Steve Ballmer, eventually became CEO after Bill Gates as well. Steve Ballmer eventually stepped down as CEO of Microsoft, and was succeeded by Satya Nadella. Microsoft originally moved its headquarters to Bellevue, Washington in January 1979, but is now headquartered in Redmond. - """ - ] + """] async with text_analytics_client: result = await text_analytics_client.recognize_linked_entities(documents) @@ -64,22 +62,19 @@ async def sample_recognize_linked_entities_async() -> None: entity_to_url = {} for doc in docs: for entity in doc.entities: - print("Entity '{}' has been mentioned '{}' time(s)".format( - entity.name, len(entity.matches) - )) + print("Entity '{}' has been mentioned '{}' time(s)".format(entity.name, len(entity.matches))) if entity.data_source == "Wikipedia": entity_to_url[entity.name] = entity.url # [END recognize_linked_entities_async] print("\nNow let's see all of the Wikipedia articles we've extracted from our research documents") for entity_name, url in entity_to_url.items(): - print("Link to Wikipedia article for '{}': {}".format( - entity_name, url - )) + print("Link to Wikipedia article for '{}': {}".format(entity_name, url)) async def main(): await sample_recognize_linked_entities_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py index cb443ad66733..6f2c072ecf3f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_pii_entities_async.py @@ -42,14 +42,10 @@ async def sample_recognize_pii_entities_async() -> None: endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] - text_analytics_client = TextAnalyticsClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) - documents = [ - """Parker Doe has repaid all of their loans as of 2020-04-25. + text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) + documents = ["""Parker Doe has repaid all of their loans as of 2020-04-25. Their SSN is 859-98-0987. To contact them, use their phone number - 555-555-5555. They are originally from Brazil and have Brazilian CPF number 998.214.865-68""" - ] + 555-555-5555. They are originally from Brazil and have Brazilian CPF number 998.214.865-68"""] async with text_analytics_client: result = await text_analytics_client.recognize_pii_entities(documents) @@ -64,9 +60,7 @@ async def sample_recognize_pii_entities_async() -> None: print(f"Document text: {documents[idx]}") print(f"Redacted document text: {doc.redacted_text}") for entity in doc.entities: - print("...Entity '{}' with category '{}' got redacted".format( - entity.text, entity.category - )) + print("...Entity '{}' with category '{}' got redacted".format(entity.text, entity.category)) # [END recognize_pii_entities_async] print("All of the information that I expect to be redacted is!") @@ -78,16 +72,15 @@ async def sample_recognize_pii_entities_async() -> None: social_security_numbers = [] for doc in docs: for entity in doc.entities: - if entity.category == 'USSocialSecurityNumber' and entity.confidence_score >= 0.6: + if entity.category == "USSocialSecurityNumber" and entity.confidence_score >= 0.6: social_security_numbers.append(entity.text) - print("We have extracted the following SSNs as well: '{}'".format( - "', '".join(social_security_numbers) - )) + print("We have extracted the following SSNs as well: '{}'".format("', '".join(social_security_numbers))) async def main(): await sample_recognize_pii_entities_async() -if __name__ == '__main__': + +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_label_classify_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_label_classify_async.py index 5975e77308b0..4a7747fe836c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_label_classify_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_label_classify_async.py @@ -58,9 +58,7 @@ async def sample_classify_document_single_label_async() -> None: async with text_analytics_client: poller = await text_analytics_client.begin_single_label_classify( - document, - project_name=project_name, - deployment_name=deployment_name + document, project_name=project_name, deployment_name=deployment_name ) pages = await poller.result() @@ -72,13 +70,17 @@ async def sample_classify_document_single_label_async() -> None: for doc, classification_result in zip(document, document_results): if classification_result.kind == "CustomDocumentClassification": classification = classification_result.classifications[0] - print("The document text '{}' was classified as '{}' with confidence score {}.".format( - doc, classification.category, classification.confidence_score) + print( + "The document text '{}' was classified as '{}' with confidence score {}.".format( + doc, classification.category, classification.confidence_score + ) ) elif classification_result.is_error is True: - print("Document text '{}' has an error with code '{}' and message '{}'".format( - doc, classification_result.error.code, classification_result.error.message - )) + print( + "Document text '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.error.code, classification_result.error.message + ) + ) # [END single_label_classify_async] @@ -86,5 +88,5 @@ async def main(): await sample_classify_document_single_label_async() -if __name__ == '__main__': +if __name__ == "__main__": asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_abstract_summary.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_abstract_summary.py index f3d726f72ba6..3e3e221066ed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_abstract_summary.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_abstract_summary.py @@ -63,9 +63,7 @@ def sample_abstractive_summarization() -> None: print("Summaries abstracted:") [print(f"{summary.text}\n") for summary in result.summaries] elif result.is_error is True: - print("...Is an error with code '{}' and message '{}'".format( - result.error.code, result.error.message - )) + print("...Is an error with code '{}' and message '{}'".format(result.error.code, result.error.message)) # [END abstract_summary] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_alternative_document_input.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_alternative_document_input.py index 03bfe1c56ca9..44c285449779 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_alternative_document_input.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_alternative_document_input.py @@ -31,12 +31,18 @@ def sample_alternative_document_input() -> None: text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) documents = [ - {"id": "0", "country_hint": "US", "text": "I had the best day of my life. I decided to go sky-diving and it made me appreciate my whole life so much more. I developed a deep-connection with my instructor as well."}, - {"id": "1", "country_hint": "GB", - "text": "This was a waste of my time. The speaker put me to sleep."}, + { + "id": "0", + "country_hint": "US", + "text": "I had the best day of my life. I decided to go sky-diving and it made me appreciate my whole life so much more. I developed a deep-connection with my instructor as well.", + }, + {"id": "1", "country_hint": "GB", "text": "This was a waste of my time. The speaker put me to sleep."}, {"id": "2", "country_hint": "MX", "text": "No tengo dinero ni nada que dar..."}, - {"id": "3", "country_hint": "FR", - "text": "L'hôtel n'était pas très confortable. L'éclairage était trop sombre."} + { + "id": "3", + "country_hint": "FR", + "text": "L'hôtel n'était pas très confortable. L'éclairage était trop sombre.", + }, ] result = text_analytics_client.detect_language(documents) @@ -51,5 +57,5 @@ def sample_alternative_document_input() -> None: print(doc.id, doc.error) -if __name__ == '__main__': +if __name__ == "__main__": sample_alternative_document_input() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_actions.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_actions.py index 727e18aaa673..c0fcf8646998 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_actions.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_actions.py @@ -44,15 +44,13 @@ def sample_analyze_actions() -> None: ) documents = [ - 'We went to Contoso Steakhouse located at midtown NYC last week for a dinner party, and we adore the spot! ' - 'They provide marvelous food and they have a great menu. The chief cook happens to be the owner (I think his name is John Doe) ' - 'and he is super nice, coming out of the kitchen and greeted us all.' - , - - 'We enjoyed very much dining in the place! ' - 'The Sirloin steak I ordered was tender and juicy, and the place was impeccably clean. You can even pre-order from their ' - 'online menu at www.contososteakhouse.com, call 312-555-0176 or send email to order@contososteakhouse.com! ' - 'The only complaint I have is the food didn\'t come fast enough. Overall I highly recommend it!' + "We went to Contoso Steakhouse located at midtown NYC last week for a dinner party, and we adore the spot! " + "They provide marvelous food and they have a great menu. The chief cook happens to be the owner (I think his name is John Doe) " + "and he is super nice, coming out of the kitchen and greeted us all.", + "We enjoyed very much dining in the place! " + "The Sirloin steak I ordered was tender and juicy, and the place was impeccably clean. You can even pre-order from their " + "online menu at www.contososteakhouse.com, call 312-555-0176 or send email to order@contososteakhouse.com! " + "The only complaint I have is the food didn't come fast enough. Overall I highly recommend it!", ] poller = text_analytics_client.begin_analyze_actions( @@ -96,9 +94,7 @@ def sample_analyze_actions() -> None: print(f"......Entity name: {linked_entity.name}") print(f".........Data source: {linked_entity.data_source}") print(f".........Data source language: {linked_entity.language}") - print( - f".........Data source entity ID: {linked_entity.data_source_entity_id}" - ) + print(f".........Data source entity ID: {linked_entity.data_source_entity_id}") print(f".........Data source URL: {linked_entity.url}") print(".........Document matches:") for match in linked_entity.matches: @@ -110,16 +106,12 @@ def sample_analyze_actions() -> None: elif result.kind == "SentimentAnalysis": print("...Results of Analyze Sentiment action:") print(f"......Overall sentiment: {result.sentiment}") - print( - f"......Scores: positive={result.confidence_scores.positive}; \ + print(f"......Scores: positive={result.confidence_scores.positive}; \ neutral={result.confidence_scores.neutral}; \ - negative={result.confidence_scores.negative} \n" - ) + negative={result.confidence_scores.negative} \n") elif result.is_error is True: - print( - f"...Is an error with code '{result.error.code}' and message '{result.error.message}'" - ) + print(f"...Is an error with code '{result.error.code}' and message '{result.error.message}'") print("------------------------------------------") diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py index 1cbced269df4..3baf602d7b06 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py @@ -46,7 +46,7 @@ def sample_analyze_healthcare_action() -> None: """, """ Patient needs to take 50 mg of ibuprofen, and 2 mg of Coumadin. - """ + """, ] poller = text_analytics_client.begin_analyze_actions( diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py index 949f193de044..432bbd0b840a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py @@ -29,9 +29,7 @@ def sample_analyze_healthcare_entities() -> None: "In this sample we will be combing through the prescriptions our pharmacy has fulfilled " "so we can catalog how much inventory we have" ) - print( - "We start out with a list of prescription documents." - ) + print("We start out with a list of prescription documents.") # [START analyze_healthcare_entities] import os @@ -54,7 +52,7 @@ def sample_analyze_healthcare_entities() -> None: """, """ Patient needs to take 50 mg of ibuprofen, and 2 mg of Coumadin. - """ + """, ] poller = text_analytics_client.begin_analyze_healthcare_entities(documents) @@ -91,7 +89,8 @@ def sample_analyze_healthcare_entities() -> None: dosage_of_medication_relations = [ entity_relation for doc in docs - for entity_relation in doc.entity_relations if entity_relation.relation_type == HealthcareEntityRelation.DOSAGE_OF_MEDICATION + for entity_relation in doc.entity_relations + if entity_relation.relation_type == HealthcareEntityRelation.DOSAGE_OF_MEDICATION ] # [END analyze_healthcare_entities] @@ -112,16 +111,14 @@ def sample_analyze_healthcare_entities() -> None: medication_role = next(iter(filter(lambda x: x.name == "Medication", relation.roles))) try: - dosage_value = int(re.findall(r"\d+", dosage_role.entity.text)[0]) # we find the numbers in the dosage + dosage_value = int(re.findall(r"\d+", dosage_role.entity.text)[0]) # we find the numbers in the dosage medication_to_dosage[medication_role.entity.text] += dosage_value except StopIteration: # Error handling for if there's no dosage in numbers. pass for medication, dosage in medication_to_dosage.items(): - print("We have fulfilled '{}' total mg of '{}'".format( - dosage, medication - )) + print("We have fulfilled '{}' total mg of '{}'".format(dosage, medication)) if __name__ == "__main__": diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities_with_cancellation.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities_with_cancellation.py index 443cf0e2e3e8..494b78e68e23 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities_with_cancellation.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities_with_cancellation.py @@ -34,8 +34,7 @@ def sample_analyze_healthcare_entities_with_cancellation() -> None: credential=AzureKeyCredential(key), ) - documents = [ - "RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | \ + documents = ["RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | \ CORONARY ARTERY DISEASE | Signed | DIS | Admission Date: 5/22/2001 \ Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: \ CORONARY ARTERY DISEASE. HISTORY OF PRESENT ILLNESS: \ @@ -47,8 +46,7 @@ def sample_analyze_healthcare_entities_with_cancellation() -> None: but this was a difficult study due to body habitus. The patient went for six minutes with minimal ST depressions \ in the anterior lateral leads , thought due to fatigue and wrist pain , his anginal equivalent. Due to the patient's \ increased symptoms and family history and history left main disease with total occasional of his RCA was referred \ - for revascularization with open heart surgery." - ] + for revascularization with open heart surgery."] poller = text_analytics_client.begin_analyze_healthcare_entities(documents) @@ -66,5 +64,3 @@ def sample_analyze_healthcare_entities_with_cancellation() -> None: if __name__ == "__main__": sample_analyze_healthcare_entities_with_cancellation() - - diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py index e3503d5e34b1..b50c4e2b5e06 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment.py @@ -52,10 +52,9 @@ def sample_analyze_sentiment() -> None: """This was pretty good! The sights were ok, and I had fun with my instructors! Can't complain too much about my experience""", """I only have one word for my experience: WOW!!! I can't believe I have had such a wonderful skydiving company right in my backyard this whole time! I will definitely be a repeat customer, and I want to take my grandmother skydiving too, - I know she'll love it!""" + I know she'll love it!""", ] - result = text_analytics_client.analyze_sentiment(documents, show_opinion_mining=True) docs = [doc for doc in result if not doc.is_error] @@ -66,7 +65,7 @@ def sample_analyze_sentiment() -> None: # [END analyze_sentiment] print("Now, let us extract all of the positive reviews") - positive_reviews = [doc for doc in docs if doc.sentiment == 'positive'] + positive_reviews = [doc for doc in docs if doc.sentiment == "positive"] print("We want to be very confident that our reviews are positive since we'll be posting them on our website.") print("We're going to confirm our chosen reviews are positive using two different tests") @@ -75,26 +74,20 @@ def sample_analyze_sentiment() -> None: "First, we are going to check how confident the sentiment analysis model is that a document is positive. " "Let's go with a 90% confidence." ) - positive_reviews = [ - review for review in positive_reviews - if review.confidence_scores.positive >= 0.9 - ] + positive_reviews = [review for review in positive_reviews if review.confidence_scores.positive >= 0.9] - print( - "Finally, we also want to make sure every sentence is positive so we only showcase our best selves!" - ) + print("Finally, we also want to make sure every sentence is positive so we only showcase our best selves!") positive_reviews_final = [] for idx, review in enumerate(positive_reviews): print(f"Looking at positive review #{idx + 1}") any_sentence_not_positive = False for sentence in review.sentences: - print("...Sentence '{}' has sentiment '{}' with confidence scores '{}'".format( - sentence.text, - sentence.sentiment, - sentence.confidence_scores + print( + "...Sentence '{}' has sentiment '{}' with confidence scores '{}'".format( + sentence.text, sentence.sentiment, sentence.confidence_scores ) ) - if sentence.sentiment != 'positive': + if sentence.sentiment != "positive": any_sentence_not_positive = True if not any_sentence_not_positive: positive_reviews_final.append(review) @@ -102,5 +95,5 @@ def sample_analyze_sentiment() -> None: print("We now have the final list of positive reviews we are going to display on our website!") -if __name__ == '__main__': +if __name__ == "__main__": sample_analyze_sentiment() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py index 310de7b68f4c..780faa3446bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_sentiment_with_opinion_mining.py @@ -52,16 +52,11 @@ def sample_analyze_sentiment_with_opinion_mining() -> None: endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] - text_analytics_client = TextAnalyticsClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) print("In this sample we will be a hotel owner going through reviews of their hotel to find complaints.") - print( - "I first found a handful of reviews for my hotel. Let's see what we have to improve." - ) + print("I first found a handful of reviews for my hotel. Let's see what we have to improve.") documents = [ """ @@ -78,7 +73,7 @@ def sample_analyze_sentiment_with_opinion_mining() -> None: """ Nice rooms! I had a great unobstructed view of the Microsoft campus but bathrooms were old and the toilet was dirty when we arrived. It was close to bus stops and groceries stores. If you want to be close to campus I will recommend it, otherwise, might be better to stay in a cleaner one - """ + """, ] result = text_analytics_client.analyze_sentiment(documents, show_opinion_mining=True) @@ -88,9 +83,11 @@ def sample_analyze_sentiment_with_opinion_mining() -> None: positive_reviews = [doc for doc in doc_result if doc.sentiment == "positive"] mixed_reviews = [doc for doc in doc_result if doc.sentiment == "mixed"] negative_reviews = [doc for doc in doc_result if doc.sentiment == "negative"] - print("...We have {} positive reviews, {} mixed reviews, and {} negative reviews. ".format( - len(positive_reviews), len(mixed_reviews), len(negative_reviews) - )) + print( + "...We have {} positive reviews, {} mixed reviews, and {} negative reviews. ".format( + len(positive_reviews), len(mixed_reviews), len(negative_reviews) + ) + ) print( "\nSince these reviews seem so mixed, and since I'm interested in finding exactly what it is about my hotel that should be improved, " "let's find the complaints users have about individual aspects of this hotel" @@ -107,21 +104,22 @@ def sample_analyze_sentiment_with_opinion_mining() -> None: if sentence.mined_opinions: for mined_opinion in sentence.mined_opinions: target = mined_opinion.target - if target.sentiment == 'negative': + if target.sentiment == "negative": target_to_complaints.setdefault(target.text, []) target_to_complaints[target.text].append(mined_opinion) - print("\nLet's now go through the aspects of our hotel people have complained about and see what users have specifically said") + print( + "\nLet's now go through the aspects of our hotel people have complained about and see what users have specifically said" + ) for target_name, complaints in target_to_complaints.items(): - print("Users have made {} complaint(s) about '{}', specifically saying that it's '{}'".format( - len(complaints), - target_name, - "', '".join( - [assessment.text for complaint in complaints for assessment in complaint.assessments] + print( + "Users have made {} complaint(s) about '{}', specifically saying that it's '{}'".format( + len(complaints), + target_name, + "', '".join([assessment.text for complaint in complaints for assessment in complaint.assessments]), ) - )) - + ) print( "\n\nLooking at the breakdown, I can see what aspects of my hotel need improvement, and based off of both the number and " @@ -129,5 +127,5 @@ def sample_analyze_sentiment_with_opinion_mining() -> None: ) -if __name__ == '__main__': +if __name__ == "__main__": sample_analyze_sentiment_with_opinion_mining() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_authentication.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_authentication.py index 82da01a6ad45..1f7f012fb48c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_authentication.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_authentication.py @@ -35,23 +35,23 @@ def sample_authentication_with_api_key_credential() -> None: import os from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics import TextAnalyticsClient + endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] text_analytics_client = TextAnalyticsClient(endpoint, AzureKeyCredential(key)) # [END create_ta_client_with_key] - doc = [ - """ + doc = [""" I need to take my cat to the veterinarian. She's been coughing for a while and I thought it was just a hairball, but now I'm now worried it might be something else. She's still very healthy so I'm not too worried though. - """ - ] + """] result = text_analytics_client.detect_language(doc) print(f"Language detected: {result[0].primary_language.name}") print(f"Confidence score: {result[0].primary_language.confidence_score}") + def sample_authentication_with_azure_active_directory() -> None: """DefaultAzureCredential will use the values from these environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET @@ -68,18 +68,16 @@ def sample_authentication_with_azure_active_directory() -> None: text_analytics_client = TextAnalyticsClient(endpoint, credential=credential) # [END create_ta_client_with_aad] - doc = [ - """ + doc = [""" I need to take my cat to the veterinarian. She's been coughing for a while and I thought it was just a hairball, but now I'm now worried it might be something else. She's still very healthy so I'm not too worried though. - """ - ] + """] result = text_analytics_client.detect_language(doc) print(f"Language detected: {result[0].primary_language.name}") print(f"Confidence score: {result[0].primary_language.confidence_score}") -if __name__ == '__main__': +if __name__ == "__main__": sample_authentication_with_api_key_credential() sample_authentication_with_azure_active_directory() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_detect_language.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_detect_language.py index b812b6414cc7..9fb02ea92e15 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_detect_language.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_detect_language.py @@ -47,7 +47,7 @@ def sample_detect_language() -> None: """, """ 最近由于工作压力太大,我们决定去富酒店度假。那儿的温泉实在太舒服了,我跟我丈夫都完全恢复了工作前的青春精神!加油! - """ + """, ] result = text_analytics_client.detect_language(documents) @@ -56,9 +56,11 @@ def sample_detect_language() -> None: print("Let's see what language each review is in!") for idx, doc in enumerate(reviewed_docs): - print("Review #{} is in '{}', which has ISO639-1 name '{}'\n".format( - idx, doc.primary_language.name, doc.primary_language.iso6391_name - )) + print( + "Review #{} is in '{}', which has ISO639-1 name '{}'\n".format( + idx, doc.primary_language.name, doc.primary_language.iso6391_name + ) + ) # [END detect_language] print( "When actually storing the reviews, we want to map the review to their ISO639-1 name " @@ -70,5 +72,5 @@ def sample_detect_language() -> None: review_to_language[documents[idx]] = doc.primary_language.iso6391_name -if __name__ == '__main__': +if __name__ == "__main__": sample_detect_language() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py index 5a05294afd9b..77fe1f12e4d3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_key_phrases.py @@ -23,9 +23,7 @@ def sample_extract_key_phrases() -> None: - print( - "In this sample, we want to find the articles that mention Microsoft to read." - ) + print("In this sample, we want to find the articles that mention Microsoft to read.") articles_that_mention_microsoft = [] # [START extract_key_phrases] import os @@ -49,17 +47,14 @@ def sample_extract_key_phrases() -> None: """ Redmond, WA. Employees at Microsoft can be excited about the new coffee shop that will open on campus once workers no longer have to work remotely... - """ + """, ] result = text_analytics_client.extract_key_phrases(articles) for idx, doc in enumerate(result): if not doc.is_error: - print("Key phrases in article #{}: {}".format( - idx + 1, - ", ".join(doc.key_phrases) - )) - # [END extract_key_phrases] + print("Key phrases in article #{}: {}".format(idx + 1, ", ".join(doc.key_phrases))) + # [END extract_key_phrases] if "Microsoft" in doc.key_phrases: articles_that_mention_microsoft.append(str(idx + 1)) @@ -70,5 +65,5 @@ def sample_extract_key_phrases() -> None: ) -if __name__ == '__main__': +if __name__ == "__main__": sample_extract_key_phrases() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_summary.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_summary.py index e73c9738f567..67593ef93a7d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_summary.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_summary.py @@ -57,13 +57,9 @@ def sample_extractive_summarization(): extract_summary_results = poller.result() for result in extract_summary_results: if result.kind == "ExtractiveSummarization": - print("Summary extracted: \n{}".format( - " ".join([sentence.text for sentence in result.sentences])) - ) + print("Summary extracted: \n{}".format(" ".join([sentence.text for sentence in result.sentences]))) elif result.is_error is True: - print("...Is an error with code '{}' and message '{}'".format( - result.error.code, result.error.message - )) + print("...Is an error with code '{}' and message '{}'".format(result.error.code, result.error.message)) # [END extract_summary] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_get_detailed_diagnostics_information.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_get_detailed_diagnostics_information.py index f61846887e64..178a05694acc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_get_detailed_diagnostics_information.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_get_detailed_diagnostics_information.py @@ -26,13 +26,16 @@ def sample_get_detailed_diagnostics_information() -> None: import json from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics import TextAnalyticsClient + _LOGGER = logging.getLogger(__name__) endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] # This client will log detailed information about its HTTP sessions, at DEBUG level - text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key), logging_enable=True) + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, credential=AzureKeyCredential(key), logging_enable=True + ) documents = [ """I had the best day of my life. I decided to go sky-diving and it made me appreciate my whole life so much more. @@ -40,7 +43,7 @@ def sample_get_detailed_diagnostics_information() -> None: """, "This was a waste of my time. The speaker put me to sleep.", "No tengo dinero ni nada que dar...", - "L'hôtel n'était pas très confortable. L'éclairage était trop sombre." + "L'hôtel n'était pas très confortable. L'éclairage était trop sombre.", ] json_responses = [] @@ -55,10 +58,7 @@ def callback(resp): json_responses.append(json_response) result = text_analytics_client.extract_key_phrases( - documents, - show_stats=True, - model_version="latest", - raw_response_hook=callback + documents, show_stats=True, model_version="latest", raw_response_hook=callback ) for doc in result: _LOGGER.warning(f"Doc with id {doc.id} has these warnings: {doc.warnings}") @@ -66,5 +66,5 @@ def callback(resp): _LOGGER.debug(f"json response: {json_responses[0]}") -if __name__ == '__main__': +if __name__ == "__main__": sample_get_detailed_diagnostics_information() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py index 65bc2fb39ab7..cba1ba7b69b0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py @@ -35,10 +35,8 @@ def sample_model_version() -> None: key = os.environ["AZURE_LANGUAGE_KEY"] text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - documents = [ - "I work for Foo Company, and we hired Contoso for our annual founding ceremony. The food \ - was amazing and we all can't say enough good words about the quality and the level of service." - ] + documents = ["I work for Foo Company, and we hired Contoso for our annual founding ceremony. The food \ + was amazing and we all can't say enough good words about the quality and the level of service."] print("\nSetting model_version='latest' with recognize_entities") result = text_analytics_client.recognize_entities(documents, model_version="latest") @@ -51,10 +49,7 @@ def sample_model_version() -> None: print("\nSetting model_version='latest' with recognize entities action in begin_analyze_actions") poller = text_analytics_client.begin_analyze_actions( - documents, - actions=[ - RecognizeEntitiesAction(model_version="latest") - ] + documents, actions=[RecognizeEntitiesAction(model_version="latest")] ) print("...Results of Recognize Entities Action:") @@ -65,10 +60,12 @@ def sample_model_version() -> None: for entity in action_result.entities: print(f"......Entity '{entity.text}' has category '{entity.category}'") elif action_result.is_error is True: - print("......Is an error with code '{}' and message '{}'".format( - action_result.error.code, action_result.error.message - )) + print( + "......Is an error with code '{}' and message '{}'".format( + action_result.error.code, action_result.error.message + ) + ) -if __name__ == '__main__': +if __name__ == "__main__": sample_model_version() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_label_classify.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_label_classify.py index 7ac98fbfc719..5cb916072a8a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_label_classify.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_label_classify.py @@ -54,9 +54,7 @@ def sample_classify_document_multi_label() -> None: document = [fd.read()] poller = text_analytics_client.begin_multi_label_classify( - document, - project_name=project_name, - deployment_name=deployment_name + document, project_name=project_name, deployment_name=deployment_name ) document_results = poller.result() @@ -65,13 +63,13 @@ def sample_classify_document_multi_label() -> None: classifications = classification_result.classifications print(f"\nThe movie plot '{doc}' was classified as the following genres:\n") for classification in classifications: - print("'{}' with confidence score {}.".format( - classification.category, classification.confidence_score - )) + print("'{}' with confidence score {}.".format(classification.category, classification.confidence_score)) elif classification_result.is_error is True: - print("Movie plot '{}' has an error with code '{}' and message '{}'".format( - doc, classification_result.error.code, classification_result.error.message - )) + print( + "Movie plot '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.error.code, classification_result.error.message + ) + ) # [END multi_label_classify] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py index 2b2367103d0f..a957ffebdd9b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py @@ -52,9 +52,7 @@ def sample_recognize_custom_entities() -> None: document = [fd.read()] poller = text_analytics_client.begin_recognize_custom_entities( - document, - project_name=project_name, - deployment_name=deployment_name + document, project_name=project_name, deployment_name=deployment_name ) document_results = poller.result() @@ -67,8 +65,9 @@ def sample_recognize_custom_entities() -> None: ) ) elif custom_entities_result.is_error is True: - print("...Is an error with code '{}' and message '{}'".format( - custom_entities_result.error.code, custom_entities_result.error.message + print( + "...Is an error with code '{}' and message '{}'".format( + custom_entities_result.error.code, custom_entities_result.error.message ) ) # [END recognize_custom_entities] diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_entities.py index 4658832e47d5..c4d6b525cbe3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_entities.py @@ -43,7 +43,7 @@ def sample_recognize_entities() -> None: """We at the Foo Company re-hired Contoso after all of our past successes with the company. Though the food was still great, I feel there has been a quality drop since their last time catering for us. Is anyone else running into the same problem?""", - """Bar Company is over the moon about the service we received from Contoso, the best sliders ever!!!!""" + """Bar Company is over the moon about the service we received from Contoso, the best sliders ever!!!!""", ] result = text_analytics_client.recognize_entities(reviews) @@ -53,18 +53,16 @@ def sample_recognize_entities() -> None: for idx, review in enumerate(result): for entity in review.entities: print(f"Entity '{entity.text}' has category '{entity.category}'") - if entity.category == 'Organization': + if entity.category == "Organization": organization_to_reviews.setdefault(entity.text, []) organization_to_reviews[entity.text].append(reviews[idx]) for organization, reviews in organization_to_reviews.items(): print( - "\n\nOrganization '{}' has left us the following review(s): {}".format( - organization, "\n\n".join(reviews) - ) + "\n\nOrganization '{}' has left us the following review(s): {}".format(organization, "\n\n".join(reviews)) ) # [END recognize_entities] -if __name__ == '__main__': +if __name__ == "__main__": sample_recognize_entities() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py index 877b132e25d9..eebddd933752 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_linked_entities.py @@ -40,15 +40,13 @@ def sample_recognize_linked_entities() -> None: key = os.environ["AZURE_LANGUAGE_KEY"] text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) - documents = [ - """ + documents = [""" Microsoft was founded by Bill Gates with some friends he met at Harvard. One of his friends, Steve Ballmer, eventually became CEO after Bill Gates as well. Steve Ballmer eventually stepped down as CEO of Microsoft, and was succeeded by Satya Nadella. Microsoft originally moved its headquarters to Bellevue, Washington in January 1979, but is now headquartered in Redmond. - """ - ] + """] result = text_analytics_client.recognize_linked_entities(documents) docs = [doc for doc in result if not doc.is_error] @@ -60,19 +58,15 @@ def sample_recognize_linked_entities() -> None: entity_to_url = {} for doc in docs: for entity in doc.entities: - print("Entity '{}' has been mentioned '{}' time(s)".format( - entity.name, len(entity.matches) - )) + print("Entity '{}' has been mentioned '{}' time(s)".format(entity.name, len(entity.matches))) if entity.data_source == "Wikipedia": entity_to_url[entity.name] = entity.url # [END recognize_linked_entities] print("\nNow let's see all of the Wikipedia articles we've extracted from our research documents") for entity_name, url in entity_to_url.items(): - print("Link to Wikipedia article for '{}': {}".format( - entity_name, url - )) + print("Link to Wikipedia article for '{}': {}".format(entity_name, url)) -if __name__ == '__main__': +if __name__ == "__main__": sample_recognize_linked_entities() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py index 9fc335ac53a5..cafb0529ea58 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_pii_entities.py @@ -40,14 +40,10 @@ def sample_recognize_pii_entities() -> None: endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] - text_analytics_client = TextAnalyticsClient( - endpoint=endpoint, credential=AzureKeyCredential(key) - ) - documents = [ - """Parker Doe has repaid all of their loans as of 2020-04-25. + text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) + documents = ["""Parker Doe has repaid all of their loans as of 2020-04-25. Their SSN is 859-98-0987. To contact them, use their phone number - 555-555-5555. They are originally from Brazil and have Brazilian CPF number 998.214.865-68""" - ] + 555-555-5555. They are originally from Brazil and have Brazilian CPF number 998.214.865-68"""] result = text_analytics_client.recognize_pii_entities(documents) docs = [doc for doc in result if not doc.is_error] @@ -60,9 +56,7 @@ def sample_recognize_pii_entities() -> None: print(f"Document text: {documents[idx]}") print(f"Redacted document text: {doc.redacted_text}") for entity in doc.entities: - print("...Entity '{}' with category '{}' got redacted".format( - entity.text, entity.category - )) + print("...Entity '{}' with category '{}' got redacted".format(entity.text, entity.category)) # [END recognize_pii_entities] print("All of the information that I expect to be redacted is!") @@ -75,13 +69,11 @@ def sample_recognize_pii_entities() -> None: social_security_numbers = [] for doc in docs: for entity in doc.entities: - if entity.category == 'USSocialSecurityNumber' and entity.confidence_score >= 0.6: + if entity.category == "USSocialSecurityNumber" and entity.confidence_score >= 0.6: social_security_numbers.append(entity.text) - print("We have extracted the following SSNs as well: '{}'".format( - "', '".join(social_security_numbers) - )) + print("We have extracted the following SSNs as well: '{}'".format("', '".join(social_security_numbers))) -if __name__ == '__main__': +if __name__ == "__main__": sample_recognize_pii_entities() diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_label_classify.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_label_classify.py index 394f5450e01c..e472911c6cb9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_label_classify.py +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_label_classify.py @@ -54,22 +54,24 @@ def sample_classify_document_single_label() -> None: document = [fd.read()] poller = text_analytics_client.begin_single_label_classify( - document, - project_name=project_name, - deployment_name=deployment_name + document, project_name=project_name, deployment_name=deployment_name ) document_results = poller.result() for doc, classification_result in zip(document, document_results): if classification_result.kind == "CustomDocumentClassification": classification = classification_result.classifications[0] - print("The document text '{}' was classified as '{}' with confidence score {}.".format( - doc, classification.category, classification.confidence_score) + print( + "The document text '{}' was classified as '{}' with confidence score {}.".format( + doc, classification.category, classification.confidence_score + ) ) elif classification_result.is_error is True: - print("Document text '{}' has an error with code '{}' and message '{}'".format( - doc, classification_result.error.code, classification_result.error.message - )) + print( + "Document text '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.error.code, classification_result.error.message + ) + ) # [END single_label_classify] diff --git a/sdk/textanalytics/azure-ai-textanalytics/setup.py b/sdk/textanalytics/azure-ai-textanalytics/setup.py index b9c083bd2c93..d620b839d74f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/setup.py +++ b/sdk/textanalytics/azure-ai-textanalytics/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,61 +16,62 @@ PACKAGE_PPRINT_NAME = "Azure Text Analytics" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, include_package_data=True, - description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + description="Microsoft {} Client Library for Python".format(PACKAGE_PPRINT_NAME), long_description=readme + "\n\n" + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", classifiers=[ "Development Status :: 5 - Production/Stable", - 'Programming Language :: Python', + "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", ], zip_safe=False, keywords="azure, azure sdk, text analytics, cognitive services, natural language processing", - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.ai', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.ai", + ] + ), package_data={ - 'azure.ai.textanalytics': ['py.typed'], + "azure.ai.textanalytics": ["py.typed"], }, python_requires=">=3.8", install_requires=[ "azure-core>=1.27.0", - 'azure-common>=1.1', + "azure-common>=1.1", "isodate>=0.6.1", "typing-extensions>=4.0.1", ], diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/conftest.py b/sdk/textanalytics/azure-ai-textanalytics/tests/conftest.py index 312ac981a888..2b339d80a633 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/conftest.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/conftest.py @@ -18,10 +18,7 @@ def add_sanitizers(test_proxy): add_remove_header_sanitizer(headers="Ocp-Apim-Subscription-Key,Cookie") - add_general_regex_sanitizer( - value="fakeendpoint", - regex="(?<=\\/\\/)[a-z-]+(?=\\.cognitiveservices\\.azure\\.com)" - ) + add_general_regex_sanitizer(value="fakeendpoint", regex="(?<=\\/\\/)[a-z-]+(?=\\.cognitiveservices\\.azure\\.com)") add_oauth_response_sanitizer() # Remove the following sanitizers since certain fields are needed in tests and are non-sensitive: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py b/sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py index 0dd06db25814..f4aeabcdf1a4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py @@ -8,6 +8,7 @@ from azure.ai.textanalytics import TextAnalyticsClient from azure.ai.textanalytics.aio import TextAnalyticsClient as AsyncTextAnalyticsClient + class DetectLanguagePerfStressTest(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py index 1eacc3ceb433..a336939f4529 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py @@ -77,8 +77,10 @@ def test_no_single_input(self, **kwargs): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_all_successful_passing_dict_key_phrase_task(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.begin_analyze_actions( docs, @@ -103,9 +105,11 @@ def test_all_successful_passing_dict_key_phrase_task(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_all_successful_passing_dict_sentiment_task(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}, + ] response = client.begin_analyze_actions( docs, @@ -132,12 +136,16 @@ def test_all_successful_passing_dict_sentiment_task(self, client): elif idx == 1: assert document_result.sentiment == "negative" assert len(document_result.sentences) == 2 - assert document_result.sentences[0].text == "I did not like the hotel we stayed at. " # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 + assert ( + document_result.sentences[0].text == "I did not like the hotel we stayed at. " + ) # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 assert document_result.sentences[1].text == "It was too expensive." else: assert document_result.sentiment == "positive" assert len(document_result.sentences) == 2 - assert document_result.sentences[0].text == "The restaurant had really good food. " # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 + assert ( + document_result.sentences[0].text == "The restaurant had really good food. " + ) # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 assert document_result.sentences[1].text == "I recommend you try it." @TextAnalyticsPreparer() @@ -146,7 +154,7 @@ def test_all_successful_passing_dict_sentiment_task(self, client): def test_sentiment_analysis_task_with_opinion_mining(self, client): documents = [ "It has a sleek premium aluminum design that makes it beautiful to look at.", - "The food and service is not good" + "The food and service is not good", ] response = client.begin_analyze_actions( @@ -167,23 +175,23 @@ def test_sentiment_analysis_task_with_opinion_mining(self, client): if idx == 0: for mined_opinion in sentence.mined_opinions: target = mined_opinion.target - assert 'design' == target.text - assert 'positive' == target.sentiment + assert "design" == target.text + assert "positive" == target.sentiment assert 0.0 == target.confidence_scores.neutral self.validateConfidenceScores(target.confidence_scores) assert 32 == target.offset sleek_opinion = mined_opinion.assessments[0] - assert 'sleek' == sleek_opinion.text - assert 'positive' == sleek_opinion.sentiment + assert "sleek" == sleek_opinion.text + assert "positive" == sleek_opinion.sentiment assert 0.0 == sleek_opinion.confidence_scores.neutral self.validateConfidenceScores(sleek_opinion.confidence_scores) assert 9 == sleek_opinion.offset assert not sleek_opinion.is_negated beautiful_opinion = mined_opinion.assessments[1] - assert 'beautiful' == beautiful_opinion.text - assert 'positive' == beautiful_opinion.sentiment + assert "beautiful" == beautiful_opinion.text + assert "positive" == beautiful_opinion.sentiment assert 0.0 == beautiful_opinion.confidence_scores.neutral self.validateConfidenceScores(beautiful_opinion.confidence_scores) assert 53 == beautiful_opinion.offset @@ -194,8 +202,8 @@ def test_sentiment_analysis_task_with_opinion_mining(self, client): self.validateConfidenceScores(food_target.confidence_scores) assert 4 == food_target.offset - assert 'service' == service_target.text - assert 'negative' == service_target.sentiment + assert "service" == service_target.text + assert "negative" == service_target.sentiment assert 0.0 == service_target.confidence_scores.neutral self.validateConfidenceScores(service_target.confidence_scores) assert 13 == service_target.offset @@ -204,16 +212,16 @@ def test_sentiment_analysis_task_with_opinion_mining(self, client): service_opinion = sentence.mined_opinions[1].assessments[0] self.assertOpinionsEqual(food_opinion, service_opinion) - assert 'good' == food_opinion.text - assert 'negative' == food_opinion.sentiment + assert "good" == food_opinion.text + assert "negative" == food_opinion.sentiment assert 0.0 == food_opinion.confidence_scores.neutral self.validateConfidenceScores(food_opinion.confidence_scores) assert 28 == food_opinion.offset assert food_opinion.is_negated service_target = sentence.mined_opinions[1].target - assert 'food' == food_target.text - assert 'negative' == food_target.sentiment + assert "food" == food_target.text + assert "negative" == food_target.sentiment assert 0.0 == food_target.confidence_scores.neutral @TextAnalyticsPreparer() @@ -221,9 +229,15 @@ def test_sentiment_analysis_task_with_opinion_mining(self, client): @recorded_by_proxy def test_all_successful_passing_text_document_input_entities_task(self, client): docs = [ - TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975", language="en"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es"), - TextDocumentInput(id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de"), + TextDocumentInput( + id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975", language="en" + ), + TextDocumentInput( + id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es" + ), + TextDocumentInput( + id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de" + ), ] response = client.begin_analyze_actions( @@ -256,9 +270,10 @@ def test_all_successful_passing_text_document_input_entities_task(self, client): @recorded_by_proxy def test_all_successful_passing_string_pii_entities_task(self, client): - docs = ["My SSN is 859-98-0987.", - "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", - "Is 998.214.865-68 your Brazilian CPF number?" + docs = [ + "My SSN is 859-98-0987.", + "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + "Is 998.214.865-68 your Brazilian CPF number?", ] response = client.begin_analyze_actions( @@ -300,9 +315,11 @@ def test_bad_request_on_empty_document(self, client): ) @TextAnalyticsPreparer() - @TextAnalyticsClientPreparer(client_kwargs={ - "textanalytics_test_api_key": "", - }) + @TextAnalyticsClientPreparer( + client_kwargs={ + "textanalytics_test_api_key": "", + } + ) @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): @@ -319,9 +336,11 @@ def test_empty_credential_class(self, client): ) @TextAnalyticsPreparer() - @TextAnalyticsClientPreparer(client_kwargs={ - "textanalytics_test_api_key": "xxxxxxxxxxxx", - }) + @TextAnalyticsClientPreparer( + client_kwargs={ + "textanalytics_test_api_key": "xxxxxxxxxxxx", + } + ) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): @@ -341,10 +360,12 @@ def test_bad_credentials(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids_multiple_tasks(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.begin_analyze_actions( docs, @@ -382,27 +403,29 @@ def test_show_stats_and_model_version_multiple_tasks_v3_1(self, client): def callback(resp): assert resp.raw_response - tasks = resp.raw_response['tasks'] - assert tasks['completed'] == 5 - assert tasks['inProgress'] == 0 - assert tasks['failed'] == 0 - assert tasks['total'] == 5 + tasks = resp.raw_response["tasks"] + assert tasks["completed"] == 5 + assert tasks["inProgress"] == 0 + assert tasks["failed"] == 0 + assert tasks["total"] == 5 num_tasks = 0 for key, task in tasks.items(): if "Tasks" in key: num_tasks += 1 assert len(task) == 1 - task_stats = task[0]['results']['statistics'] - assert task_stats['documentsCount'] == 4 - assert task_stats['validDocumentsCount'] == 4 - assert task_stats['erroneousDocumentsCount'] == 0 - assert task_stats['transactionsCount'] == 4 + task_stats = task[0]["results"]["statistics"] + assert task_stats["documentsCount"] == 4 + assert task_stats["validDocumentsCount"] == 4 + assert task_stats["erroneousDocumentsCount"] == 0 + assert task_stats["transactionsCount"] == 4 assert num_tasks == 5 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] poller = client.begin_analyze_actions( docs, @@ -443,25 +466,27 @@ def test_show_stats_and_model_version_multiple_tasks(self, client): def callback(resp): assert resp.raw_response - tasks = resp.raw_response['tasks'] - assert tasks['completed'] == 5 - assert tasks['inProgress'] == 0 - assert tasks['failed'] == 0 - assert tasks['total'] == 5 + tasks = resp.raw_response["tasks"] + assert tasks["completed"] == 5 + assert tasks["inProgress"] == 0 + assert tasks["failed"] == 0 + assert tasks["total"] == 5 num_tasks = 0 for task in tasks["items"]: num_tasks += 1 - task_stats = task['results']['statistics'] - assert task_stats['documentsCount'] == 4 - assert task_stats['validDocumentsCount'] == 4 - assert task_stats['erroneousDocumentsCount'] == 0 - assert task_stats['transactionsCount'] == 4 + task_stats = task["results"]["statistics"] + assert task_stats["documentsCount"] == 4 + assert task_stats["validDocumentsCount"] == 4 + assert task_stats["erroneousDocumentsCount"] == 0 + assert task_stats["transactionsCount"] == 4 assert num_tasks == 5 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] poller = client.begin_analyze_actions( docs, @@ -503,9 +528,7 @@ def test_poller_metadata(self, client): poller = client.begin_analyze_actions( docs, - actions=[ - RecognizeEntitiesAction(model_version="latest") - ], + actions=[RecognizeEntitiesAction(model_version="latest")], show_stats=True, polling_interval=self._interval(), ) @@ -527,18 +550,20 @@ def test_poller_metadata(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_method(self, client): - response = list(client.begin_analyze_actions( - ["This should fail because we're passing in an invalid language hint"], - language="notalanguage", - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - polling_interval=self._interval(), - ).result()) + response = list( + client.begin_analyze_actions( + ["This should fail because we're passing in an invalid language hint"], + language="notalanguage", + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ).result() + ) for document_results in response: for doc in document_results: @@ -617,6 +642,7 @@ def test_passing_none_docs(self, **kwargs): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" + res = client.begin_analyze_actions( documents=["Test passing cls to endpoint"], actions=[ @@ -632,7 +658,9 @@ def callback(pipeline_response, deserialized, _): @recorded_by_proxy def test_multiple_pages_of_results_returned_successfully(self, client): single_doc = "hello world" - docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 25)))] # max number of documents is 25 + docs = [ + {"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 25))) + ] # max number of documents is 25 result = client.begin_analyze_actions( docs, @@ -689,22 +717,24 @@ def test_too_many_documents(self, client): ) assert excinfo.value.status_code == 400 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_disable_service_logs( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) actions = [ RecognizeEntitiesAction(disable_service_logs=True), ExtractKeyPhrasesAction(disable_service_logs=True), @@ -714,19 +744,19 @@ def test_disable_service_logs( SingleLabelClassifyAction( project_name=textanalytics_single_label_classify_project_name, deployment_name=textanalytics_single_label_classify_deployment_name, - disable_service_logs=True + disable_service_logs=True, ), MultiLabelClassifyAction( project_name=textanalytics_multi_label_classify_project_name, deployment_name=textanalytics_multi_label_classify_deployment_name, - disable_service_logs=True + disable_service_logs=True, ), RecognizeCustomEntitiesAction( project_name=textanalytics_custom_entities_project_name, deployment_name=textanalytics_custom_entities_deployment_name, - disable_service_logs=True + disable_service_logs=True, ), - AnalyzeHealthcareEntitiesAction(disable_service_logs=True) + AnalyzeHealthcareEntitiesAction(disable_service_logs=True), ] for action in actions: @@ -750,10 +780,14 @@ def callback(resp): @recorded_by_proxy def test_pii_action_categories_filter(self, client): - docs = [{"id": "1", "text": "My SSN is 859-98-0987."}, - {"id": "2", - "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, - {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + docs = [ + {"id": "1", "text": "My SSN is 859-98-0987."}, + { + "id": "2", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] actions = [ RecognizePiiEntitiesAction( @@ -764,7 +798,9 @@ def test_pii_action_categories_filter(self, client): ), ] - result = client.begin_analyze_actions(documents=docs, actions=actions, polling_interval=self._interval()).result() + result = client.begin_analyze_actions( + documents=docs, actions=actions, polling_interval=self._interval() + ).result() action_results = list(result) assert len(action_results) == 3 @@ -779,17 +815,19 @@ def test_pii_action_categories_filter(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_partial_success_for_actions(self, client): - docs = [{"id": "1", "language": "tr", "text": "I did not like the hotel we stayed at."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at."}] + docs = [ + {"id": "1", "language": "tr", "text": "I did not like the hotel we stayed at."}, + {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at."}, + ] response = client.begin_analyze_actions( - docs, - actions=[ - AnalyzeSentimentAction(), - RecognizePiiEntitiesAction(), - ], - polling_interval=self._interval(), - ).result() + docs, + actions=[ + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(), + ], + polling_interval=self._interval(), + ).result() action_results = list(response) assert len(action_results) == len(docs) @@ -821,7 +859,11 @@ def test_multiple_of_same_action(self, client): docs = [ {"id": "28", "text": "My SSN is 859-98-0987. Here is another sentence."}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number? Here is another sentence."}, - {"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "5", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, ] actions = [ @@ -898,13 +940,19 @@ def test_multiple_of_same_action(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_multiple_of_same_action_with_partial_results(self, client): - docs = [{"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "text": ""}] + docs = [ + { + "id": "5", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + {"id": "2", "text": ""}, + ] actions = [ RecognizeEntitiesAction(), RecognizePiiEntitiesAction(), - RecognizeEntitiesAction(disable_service_logs=True) + RecognizeEntitiesAction(disable_service_logs=True), ] response = client.begin_analyze_actions( @@ -931,22 +979,36 @@ def test_multiple_of_same_action_with_partial_results(self, client): assert action_results[1][1].is_error assert action_results[1][2].is_error - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_single_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] response = client.begin_analyze_actions( @@ -954,7 +1016,7 @@ def test_single_label_classify( actions=[ SingleLabelClassifyAction( project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name + deployment_name=textanalytics_single_label_classify_deployment_name, ) ], show_stats=True, @@ -972,22 +1034,36 @@ def test_single_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_multi_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] response = client.begin_analyze_actions( @@ -995,7 +1071,7 @@ def test_multi_label_classify( actions=[ MultiLabelClassifyAction( project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name + deployment_name=textanalytics_multi_label_classify_deployment_name, ) ], show_stats=True, @@ -1013,22 +1089,36 @@ def test_multi_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_recognize_custom_entities( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] response = client.begin_analyze_actions( @@ -1036,7 +1126,7 @@ def test_recognize_custom_entities( actions=[ RecognizeCustomEntitiesAction( project_name=textanalytics_custom_entities_project_name, - deployment_name=textanalytics_custom_entities_deployment_name + deployment_name=textanalytics_custom_entities_deployment_name, ) ], show_stats=True, @@ -1057,24 +1147,30 @@ def test_recognize_custom_entities( assert entity.length is not None assert entity.confidence_score is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_custom_partial_error( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] @@ -1083,16 +1179,16 @@ def test_custom_partial_error( actions=[ SingleLabelClassifyAction( project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name + deployment_name=textanalytics_single_label_classify_deployment_name, ), MultiLabelClassifyAction( project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name + deployment_name=textanalytics_multi_label_classify_deployment_name, ), RecognizeCustomEntitiesAction( project_name=textanalytics_custom_entities_project_name, - deployment_name=textanalytics_custom_entities_deployment_name - ) + deployment_name=textanalytics_custom_entities_deployment_name, + ), ], show_stats=True, polling_interval=self._interval(), @@ -1113,10 +1209,22 @@ def test_custom_partial_error( @recorded_by_proxy def test_analyze_continuation_token(self, client): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, {"id": "3", "text": ""}, - {"id": "4", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "4", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] actions = [ @@ -1167,18 +1275,18 @@ def test_analyze_continuation_token(self, client): initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error @TextAnalyticsPreparer() - def test_generic_action_error_no_target_v3_1( - self, - **kwargs - ): + def test_generic_action_error_no_target_v3_1(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.Mock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) path_to_mock_json_response = os.path.abspath( @@ -1200,31 +1308,32 @@ def test_generic_action_error_no_target_v3_1( client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), transport=transport, api_version="v3.1") with pytest.raises(HttpResponseError) as e: - response = list(client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - RecognizeLinkedEntitiesAction(), - RecognizePiiEntitiesAction() - ], - show_stats=True, - polling_interval=self._interval(), - ).result()) - assert e.value.message == "(InternalServerError) 1 out of 3 job tasks failed. Failed job tasks : v3.1/entities/general." + response = list( + client.begin_analyze_actions( + docs, + actions=[RecognizeEntitiesAction(), RecognizeLinkedEntitiesAction(), RecognizePiiEntitiesAction()], + show_stats=True, + polling_interval=self._interval(), + ).result() + ) + assert ( + e.value.message + == "(InternalServerError) 1 out of 3 job tasks failed. Failed job tasks : v3.1/entities/general." + ) @TextAnalyticsPreparer() - def test_generic_action_error_no_target( - self, - **kwargs - ): + def test_generic_action_error_no_target(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.Mock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) path_to_mock_json_response = os.path.abspath( @@ -1249,15 +1358,17 @@ def test_generic_action_error_no_target( def get_deserialized_for_mock(response, deserialized, headers): from azure.ai.textanalytics._generated.models import AnalyzeTextJobState, AnalyzeTextJobsInput from azure.ai.textanalytics._response_handlers import analyze_paged_result + deserialized = AnalyzeTextJobState.deserialize(response.raw_response) return analyze_paged_result( ["1", "2"], - [(_AnalyzeActionsType.RECOGNIZE_ENTITIES, '0'), - (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, '1'), - (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, '2'), - (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, '3'), - (_AnalyzeActionsType.ANALYZE_SENTIMENT, '4'), + [ + (_AnalyzeActionsType.RECOGNIZE_ENTITIES, "0"), + (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, "1"), + (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, "2"), + (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, "3"), + (_AnalyzeActionsType.ANALYZE_SENTIMENT, "4"), ], client._client.analyze_text_job_status, response, @@ -1266,35 +1377,40 @@ def get_deserialized_for_mock(response, deserialized, headers): ) with pytest.raises(HttpResponseError) as e: - response = list(client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=lambda resp: resp, - cls=get_deserialized_for_mock - ).result()) - assert e.value.message == "(InternalServerError) 1 out of 5 job tasks failed. Failed job tasks : keyphrasescomposite." + response = list( + client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=lambda resp: resp, + cls=get_deserialized_for_mock, + ).result() + ) + assert ( + e.value.message + == "(InternalServerError) 1 out of 5 job tasks failed. Failed job tasks : keyphrasescomposite." + ) @TextAnalyticsPreparer() - def test_action_errors_with_targets_v3_1( - self, - **kwargs - ): + def test_action_errors_with_targets_v3_1(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.Mock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # a mix of action errors to translate to doc errors, regular doc errors, and a successful response @@ -1316,20 +1432,22 @@ def test_action_errors_with_targets_v3_1( key = kwargs.pop("textanalytics_test_api_key") client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), transport=transport, api_version="v3.1") - response = list(client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - RecognizePiiEntitiesAction(domain_filter="phi"), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval(), - ).result()) + response = list( + client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(domain_filter="phi"), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + ) assert len(response) == len(docs) for idx, result in enumerate(response[0]): assert result.id == "1" @@ -1352,18 +1470,18 @@ def test_action_errors_with_targets_v3_1( assert result.error.message == "Some error" + str(idx) # confirms correct doc error order @TextAnalyticsPreparer() - def test_action_errors_with_targets( - self, - **kwargs - ): + def test_action_errors_with_targets(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.Mock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # a mix of action errors to translate to doc errors, regular doc errors, and a successful response @@ -1389,16 +1507,18 @@ def test_action_errors_with_targets( def get_deserialized_for_mock(response, deserialized, headers): from azure.ai.textanalytics._generated.models import AnalyzeTextJobState, AnalyzeTextJobsInput from azure.ai.textanalytics._response_handlers import analyze_paged_result + deserialized = AnalyzeTextJobState.deserialize(response.raw_response) return analyze_paged_result( ["1", "2"], - [(_AnalyzeActionsType.RECOGNIZE_ENTITIES, '0'), - (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, '1'), - (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, '2'), - (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, '3'), - (_AnalyzeActionsType.ANALYZE_SENTIMENT, '4'), - (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, '5'), - (_AnalyzeActionsType.ANALYZE_SENTIMENT, '6') + [ + (_AnalyzeActionsType.RECOGNIZE_ENTITIES, "0"), + (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, "1"), + (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, "2"), + (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, "3"), + (_AnalyzeActionsType.ANALYZE_SENTIMENT, "4"), + (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, "5"), + (_AnalyzeActionsType.ANALYZE_SENTIMENT, "6"), ], client._client.analyze_text_job_status, response, @@ -1406,22 +1526,24 @@ def get_deserialized_for_mock(response, deserialized, headers): show_stats=True, ) - response = list(client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - RecognizePiiEntitiesAction(domain_filter="phi"), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=lambda resp: resp, - cls=get_deserialized_for_mock - ).result()) + response = list( + client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(domain_filter="phi"), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=lambda resp: resp, + cls=get_deserialized_for_mock, + ).result() + ) assert len(response) == len(docs) for idx, result in enumerate(response[0]): assert result.id == "1" @@ -1444,19 +1566,18 @@ def get_deserialized_for_mock(response, deserialized, headers): assert result.error.message == "Some error" + str(idx) # confirms correct doc error order @TextAnalyticsPreparer() - def test_action_job_failure_v3_1( - self, - **kwargs - ): + def test_action_job_failure_v3_1(self, **kwargs): docs = [ - {"id": "1", "language": "en", - "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.Mock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # action job failure with status=="failed", no partial results so we raise an exception in this case @@ -1479,31 +1600,35 @@ def test_action_job_failure_v3_1( client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), transport=transport, api_version="v3.1") with pytest.raises(HttpResponseError) as e: - response = list(client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ], - show_stats=True, - polling_interval=self._interval(), - ).result()) + response = list( + client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + ) assert len(response) == len(docs) - assert e.value.message == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : v3.1/entities/general." + assert ( + e.value.message + == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : v3.1/entities/general." + ) @TextAnalyticsPreparer() - def test_action_job_failure( - self, - **kwargs - ): + def test_action_job_failure(self, **kwargs): docs = [ - {"id": "1", "language": "en", - "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.Mock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # action job failure with status=="failed", no partial results so we raise an exception in this case @@ -1523,18 +1648,18 @@ def test_action_job_failure( endpoint = kwargs.pop("textanalytics_test_endpoint") key = kwargs.pop("textanalytics_test_api_key") - client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), - transport=transport) + client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), transport=transport) # workaround to get mocked response to work with deserialized polymorphic response type def get_deserialized_for_mock(response, deserialized, headers): from azure.ai.textanalytics._generated.models import AnalyzeTextJobState, AnalyzeTextJobsInput from azure.ai.textanalytics._response_handlers import analyze_paged_result + deserialized = AnalyzeTextJobState.deserialize(response.raw_response) return analyze_paged_result( ["1", "2"], - [(_AnalyzeActionsType.EXTRACT_KEY_PHRASES, '0')], + [(_AnalyzeActionsType.EXTRACT_KEY_PHRASES, "0")], client._client.analyze_text_job_status, response, deserialized, @@ -1542,27 +1667,32 @@ def get_deserialized_for_mock(response, deserialized, headers): ) with pytest.raises(HttpResponseError) as e: - response = list(client.begin_analyze_actions( - docs, - actions=[ - ExtractKeyPhrasesAction() - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=lambda resp: resp, - cls=get_deserialized_for_mock - ).result()) + response = list( + client.begin_analyze_actions( + docs, + actions=[ExtractKeyPhrasesAction()], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=lambda resp: resp, + cls=get_deserialized_for_mock, + ).result() + ) assert len(response) == len(docs) - assert e.value.message == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : keyphrasescomposite." + assert ( + e.value.message + == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : keyphrasescomposite." + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"}) @recorded_by_proxy def test_analyze_works_with_v3_1(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.begin_analyze_actions( docs, @@ -1571,7 +1701,7 @@ def test_analyze_works_with_v3_1(self, client): ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction() + AnalyzeSentimentAction(), ], polling_interval=self._interval(), ).result() @@ -1598,10 +1728,12 @@ def test_analyze_works_with_v3_1(self, client): @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.0"}) def test_analyze_multiapi_validate_v3_0(self, **kwargs): client = kwargs.pop("client") - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] with pytest.raises(ValueError) as e: response = client.begin_analyze_actions( @@ -1611,32 +1743,44 @@ def test_analyze_multiapi_validate_v3_0(self, **kwargs): ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction() + AnalyzeSentimentAction(), ], polling_interval=self._interval(), ).result() - assert str(e.value) == "'TextAnalyticsClient.begin_analyze_actions' is not available in API version v3.0. " \ - "Use service API version v3.1 or newer." + assert ( + str(e.value) == "'TextAnalyticsClient.begin_analyze_actions' is not available in API version v3.0. " + "Use service API version v3.1 or newer." + ) - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsCustomPreparer() def test_analyze_multiapi_validate_v3_1(self, **kwargs): textanalytics_custom_text_endpoint = kwargs.pop("textanalytics_custom_text_endpoint") textanalytics_custom_text_key = kwargs.pop("textanalytics_custom_text_key") - textanalytics_single_label_classify_project_name = kwargs.pop("textanalytics_single_label_classify_project_name") - textanalytics_single_label_classify_deployment_name = kwargs.pop("textanalytics_single_label_classify_deployment_name") + textanalytics_single_label_classify_project_name = kwargs.pop( + "textanalytics_single_label_classify_project_name" + ) + textanalytics_single_label_classify_deployment_name = kwargs.pop( + "textanalytics_single_label_classify_deployment_name" + ) textanalytics_multi_label_classify_project_name = kwargs.pop("textanalytics_multi_label_classify_project_name") - textanalytics_multi_label_classify_deployment_name = kwargs.pop("textanalytics_multi_label_classify_deployment_name") + textanalytics_multi_label_classify_deployment_name = kwargs.pop( + "textanalytics_multi_label_classify_deployment_name" + ) textanalytics_custom_entities_project_name = kwargs.pop("textanalytics_custom_entities_project_name") textanalytics_custom_entities_deployment_name = kwargs.pop("textanalytics_custom_entities_deployment_name") - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), api_version="v3.1") + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), api_version="v3.1" + ) - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] version_supported = "2022-05-01" with pytest.raises(ValueError) as e: response = client.begin_analyze_actions( @@ -1644,29 +1788,31 @@ def test_analyze_multiapi_validate_v3_1(self, **kwargs): actions=[ SingleLabelClassifyAction( project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name + deployment_name=textanalytics_single_label_classify_deployment_name, ), MultiLabelClassifyAction( project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name + deployment_name=textanalytics_multi_label_classify_deployment_name, ), RecognizeCustomEntitiesAction( project_name=textanalytics_custom_entities_project_name, - deployment_name=textanalytics_custom_entities_deployment_name + deployment_name=textanalytics_custom_entities_deployment_name, ), - AnalyzeHealthcareEntitiesAction() + AnalyzeHealthcareEntitiesAction(), ], polling_interval=self._interval(), ).result() - assert str(e.value) == f"'RecognizeCustomEntitiesAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" \ - f"'SingleLabelClassifyAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" \ - f"'MultiLabelClassifyAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" \ - f"'AnalyzeHealthcareEntitiesAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" + assert ( + str(e.value) == f"'RecognizeCustomEntitiesAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + f"'SingleLabelClassifyAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + f"'MultiLabelClassifyAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + f"'AnalyzeHealthcareEntitiesAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -1675,19 +1821,21 @@ def test_healthcare_action(self, client): docs = [ "Patient does not suffer from high blood pressure.", "Prescribed 100mg ibuprofen, taken twice daily.", - "" + "", ] - response = list(client.begin_analyze_actions( - docs, - actions=[ - AnalyzeHealthcareEntitiesAction( - model_version="latest", - ) - ], - show_stats=True, - polling_interval=self._interval(), - ).result()) + response = list( + client.begin_analyze_actions( + docs, + actions=[ + AnalyzeHealthcareEntitiesAction( + model_version="latest", + ) + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + ) for idx, result in enumerate(response): for res in result: @@ -1704,7 +1852,7 @@ def test_healthcare_action(self, client): def test_cancel(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20)))] - actions=[ + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1725,7 +1873,7 @@ def test_cancel(self, client): def test_cancel_partial_results(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 5)))] - actions=[ + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1755,8 +1903,10 @@ def test_cancel_partial_results(self, client): @recorded_by_proxy def test_cancel_fail_terminal_state(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." - docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20)))] # max number of documents is 25 - actions=[ + docs = [ + {"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20))) + ] # max number of documents is 25 + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1778,8 +1928,10 @@ def test_cancel_fail_terminal_state(self, client): @recorded_by_proxy def test_cancel_fail_v3_1(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." - docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20)))] # max number of documents is 25 - actions=[ + docs = [ + {"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20))) + ] # max number of documents is 25 + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1795,31 +1947,36 @@ def test_cancel_fail_v3_1(self, client): with pytest.raises(ValueError) as e: poller.cancel() - assert"Cancellation not supported by API versions v3.0, v3.1." in str(e.value) + assert "Cancellation not supported by API versions v3.0, v3.1." in str(e.value) - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_passing_dict_extract_summary_action(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + }, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.begin_analyze_actions( docs, @@ -1844,12 +2001,13 @@ def test_passing_dict_extract_summary_action(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_extract_summary_action_with_options(self, client): - docs = ["The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + docs = [ + "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " @@ -1864,7 +2022,8 @@ def test_extract_summary_action_with_options(self, client): "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."] + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said." + ] response = client.begin_analyze_actions( docs, @@ -1891,7 +2050,7 @@ def test_extract_summary_action_with_options(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy @@ -1912,28 +2071,33 @@ def test_extract_summary_partial_results(self, client): assert not document_results[1][0].is_error assert isinstance(document_results[1][0], ExtractiveSummaryResult) - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_passing_dict_abstract_summary_action(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + } + ] response = client.begin_analyze_actions( docs, diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py index 99f1113ad02d..0135ad4181ee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py @@ -62,6 +62,7 @@ textanalytics_custom_entities_deployment_name="custom_entities_deployment_name", ) + def get_completed_future(result=None): future = asyncio.Future() future.set_result(result) @@ -77,6 +78,7 @@ def wrap_in_future(fn): def wrapper(*args, **kwargs): result = fn(*args, **kwargs) return get_completed_future(result) + return wrapper @@ -113,16 +115,17 @@ async def test_no_single_input(self, **kwargs): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_all_successful_passing_dict_key_phrase_task(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ExtractKeyPhrasesAction()], - show_stats=True, - polling_interval=self._interval() - )).result() + response = await ( + await client.begin_analyze_actions( + docs, actions=[ExtractKeyPhrasesAction()], show_stats=True, polling_interval=self._interval() + ) + ).result() document_results = [] async for p in response: @@ -142,17 +145,21 @@ async def test_all_successful_passing_dict_key_phrase_task(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_all_successful_passing_dict_sentiment_task(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}, + ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[AnalyzeSentimentAction()], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[AnalyzeSentimentAction()], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() pages = [] async for p in response: @@ -175,12 +182,16 @@ async def test_all_successful_passing_dict_sentiment_task(self, client): elif idx == 1: assert document_result.sentiment == "negative" assert len(document_result.sentences) == 2 - assert document_result.sentences[0].text == "I did not like the hotel we stayed at. " # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 + assert ( + document_result.sentences[0].text == "I did not like the hotel we stayed at. " + ) # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 assert document_result.sentences[1].text == "It was too expensive." else: assert document_result.sentiment == "positive" assert len(document_result.sentences) == 2 - assert document_result.sentences[0].text == "The restaurant had really good food. " # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 + assert ( + document_result.sentences[0].text == "The restaurant had really good food. " + ) # https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/14208842 assert document_result.sentences[1].text == "I recommend you try it." @TextAnalyticsPreparer() @@ -189,16 +200,18 @@ async def test_all_successful_passing_dict_sentiment_task(self, client): async def test_sentiment_analysis_task_with_opinion_mining(self, client): documents = [ "It has a sleek premium aluminum design that makes it beautiful to look at.", - "The food and service is not good" + "The food and service is not good", ] async with client: - response = await (await client.begin_analyze_actions( - documents, - actions=[AnalyzeSentimentAction(show_opinion_mining=True)], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + documents, + actions=[AnalyzeSentimentAction(show_opinion_mining=True)], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() pages = [] async for p in response: @@ -214,23 +227,23 @@ async def test_sentiment_analysis_task_with_opinion_mining(self, client): if idx == 0: for mined_opinion in sentence.mined_opinions: target = mined_opinion.target - assert 'design' == target.text - assert 'positive' == target.sentiment + assert "design" == target.text + assert "positive" == target.sentiment assert 0.0 == target.confidence_scores.neutral self.validateConfidenceScores(target.confidence_scores) assert 32 == target.offset sleek_opinion = mined_opinion.assessments[0] - assert 'sleek' == sleek_opinion.text - assert 'positive' == sleek_opinion.sentiment + assert "sleek" == sleek_opinion.text + assert "positive" == sleek_opinion.sentiment assert 0.0 == sleek_opinion.confidence_scores.neutral self.validateConfidenceScores(sleek_opinion.confidence_scores) assert 9 == sleek_opinion.offset assert not sleek_opinion.is_negated beautiful_opinion = mined_opinion.assessments[1] - assert 'beautiful' == beautiful_opinion.text - assert 'positive' == beautiful_opinion.sentiment + assert "beautiful" == beautiful_opinion.text + assert "positive" == beautiful_opinion.sentiment assert 0.0 == beautiful_opinion.confidence_scores.neutral self.validateConfidenceScores(beautiful_opinion.confidence_scores) assert 53 == beautiful_opinion.offset @@ -241,8 +254,8 @@ async def test_sentiment_analysis_task_with_opinion_mining(self, client): self.validateConfidenceScores(food_target.confidence_scores) assert 4 == food_target.offset - assert 'service' == service_target.text - assert 'negative' == service_target.sentiment + assert "service" == service_target.text + assert "negative" == service_target.sentiment assert 0.0 == service_target.confidence_scores.neutral self.validateConfidenceScores(service_target.confidence_scores) assert 13 == service_target.offset @@ -251,16 +264,16 @@ async def test_sentiment_analysis_task_with_opinion_mining(self, client): service_opinion = sentence.mined_opinions[1].assessments[0] self.assertOpinionsEqual(food_opinion, service_opinion) - assert 'good' == food_opinion.text - assert 'negative' == food_opinion.sentiment + assert "good" == food_opinion.text + assert "negative" == food_opinion.sentiment assert 0.0 == food_opinion.confidence_scores.neutral self.validateConfidenceScores(food_opinion.confidence_scores) assert 28 == food_opinion.offset assert food_opinion.is_negated service_target = sentence.mined_opinions[1].target - assert 'food' == food_target.text - assert 'negative' == food_target.sentiment + assert "food" == food_target.text + assert "negative" == food_target.sentiment assert 0.0 == food_target.confidence_scores.neutral @TextAnalyticsPreparer() @@ -268,9 +281,15 @@ async def test_sentiment_analysis_task_with_opinion_mining(self, client): @recorded_by_proxy_async async def test_all_successful_passing_text_document_input_entities_task(self, client): docs = [ - TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975", language="en"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es"), - TextDocumentInput(id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de"), + TextDocumentInput( + id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975", language="en" + ), + TextDocumentInput( + id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es" + ), + TextDocumentInput( + id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de" + ), ] async with client: @@ -307,18 +326,18 @@ async def test_all_successful_passing_text_document_input_entities_task(self, cl @recorded_by_proxy_async async def test_all_successful_passing_string_pii_entities_task(self, client): - docs = ["My SSN is 859-98-0987.", - "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", - "Is 998.214.865-68 your Brazilian CPF number?" + docs = [ + "My SSN is 859-98-0987.", + "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + "Is 998.214.865-68 your Brazilian CPF number?", ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[RecognizePiiEntitiesAction()], - show_stats=True, - polling_interval=self._interval() - )).result() + response = await ( + await client.begin_analyze_actions( + docs, actions=[RecognizePiiEntitiesAction()], show_stats=True, polling_interval=self._interval() + ) + ).result() pages = [] async for p in response: @@ -348,73 +367,81 @@ async def test_bad_request_on_empty_document(self, client): with pytest.raises(HttpResponseError): async with client: - await (await client.begin_analyze_actions( - docs, - actions=[ExtractKeyPhrasesAction()], - polling_interval=self._interval() - )).result() + await ( + await client.begin_analyze_actions( + docs, actions=[ExtractKeyPhrasesAction()], polling_interval=self._interval() + ) + ).result() @TextAnalyticsPreparer() - @TextAnalyticsClientPreparer(client_kwargs={ - "textanalytics_test_api_key": "", - }) + @TextAnalyticsClientPreparer( + client_kwargs={ + "textanalytics_test_api_key": "", + } + ) @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): async with client: - await (await client.begin_analyze_actions( - ["This is written in English."], - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - polling_interval=self._interval() - )).result() + await ( + await client.begin_analyze_actions( + ["This is written in English."], + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() @TextAnalyticsPreparer() - @TextAnalyticsClientPreparer(client_kwargs={ - "textanalytics_test_api_key": "xxxxxxxxxxxx" - }) + @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): async with client: - await (await client.begin_analyze_actions( - ["This is written in English."], - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - polling_interval=self._interval() - )).result() + await ( + await client.begin_analyze_actions( + ["This is written in English."], + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids_multiple_tasks(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - polling_interval=self._interval() - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() results = [] async for p in response: @@ -440,44 +467,48 @@ async def test_out_of_order_ids_multiple_tasks(self, client): @recorded_by_proxy_async async def test_show_stats_and_model_version_multiple_tasks_v3_1(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] def callback(resp): assert resp.raw_response - tasks = resp.raw_response['tasks'] - assert tasks['completed'] == 5 - assert tasks['inProgress'] == 0 - assert tasks['failed'] == 0 - assert tasks['total'] == 5 + tasks = resp.raw_response["tasks"] + assert tasks["completed"] == 5 + assert tasks["inProgress"] == 0 + assert tasks["failed"] == 0 + assert tasks["total"] == 5 num_tasks = 0 for key, task in tasks.items(): if "Tasks" in key: num_tasks += 1 assert len(task) == 1 - task_stats = task[0]['results']['statistics'] - assert task_stats['documentsCount'] == 4 - assert task_stats['validDocumentsCount'] == 4 - assert task_stats['erroneousDocumentsCount'] == 0 - assert task_stats['transactionsCount'] == 4 + task_stats = task[0]["results"]["statistics"] + assert task_stats["documentsCount"] == 4 + assert task_stats["validDocumentsCount"] == 4 + assert task_stats["erroneousDocumentsCount"] == 0 + assert task_stats["transactionsCount"] == 4 assert num_tasks == 5 async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(model_version="latest"), - ExtractKeyPhrasesAction(model_version="latest"), - RecognizePiiEntitiesAction(model_version="latest"), - RecognizeLinkedEntitiesAction(model_version="latest"), - AnalyzeSentimentAction(model_version="latest"), - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=callback, - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(model_version="latest"), + ExtractKeyPhrasesAction(model_version="latest"), + RecognizePiiEntitiesAction(model_version="latest"), + RecognizeLinkedEntitiesAction(model_version="latest"), + AnalyzeSentimentAction(model_version="latest"), + ], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=callback, + ) + ).result() pages = [] async for p in response: @@ -505,25 +536,27 @@ async def test_show_stats_and_model_version_multiple_tasks(self, client): def callback(resp): assert resp.raw_response - tasks = resp.raw_response['tasks'] - assert tasks['completed'] == 5 - assert tasks['inProgress'] == 0 - assert tasks['failed'] == 0 - assert tasks['total'] == 5 + tasks = resp.raw_response["tasks"] + assert tasks["completed"] == 5 + assert tasks["inProgress"] == 0 + assert tasks["failed"] == 0 + assert tasks["total"] == 5 num_tasks = 0 for task in tasks["items"]: num_tasks += 1 - task_stats = task['results']['statistics'] - assert task_stats['documentsCount'] == 4 - assert task_stats['validDocumentsCount'] == 4 - assert task_stats['erroneousDocumentsCount'] == 0 - assert task_stats['transactionsCount'] == 4 + task_stats = task["results"]["statistics"] + assert task_stats["documentsCount"] == 4 + assert task_stats["validDocumentsCount"] == 4 + assert task_stats["erroneousDocumentsCount"] == 0 + assert task_stats["transactionsCount"] == 4 assert num_tasks == 5 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] async with client: poller = await client.begin_analyze_actions( @@ -569,9 +602,7 @@ async def test_poller_metadata(self, client): async with client: poller = await client.begin_analyze_actions( docs, - actions=[ - RecognizeEntitiesAction(model_version="latest") - ], + actions=[RecognizeEntitiesAction(model_version="latest")], show_stats=True, polling_interval=self._interval(), ) @@ -598,18 +629,19 @@ async def test_bad_model_version_error_multiple_tasks(self, client): async with client: with pytest.raises(HttpResponseError): - response = await (await - client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(model_version="latest"), - ExtractKeyPhrasesAction(model_version="bad"), - RecognizePiiEntitiesAction(model_version="bad"), - RecognizeLinkedEntitiesAction(model_version="bad"), - AnalyzeSentimentAction(model_version="bad"), - ], - polling_interval=self._interval() - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(model_version="latest"), + ExtractKeyPhrasesAction(model_version="bad"), + RecognizePiiEntitiesAction(model_version="bad"), + RecognizeLinkedEntitiesAction(model_version="bad"), + AnalyzeSentimentAction(model_version="bad"), + ], + polling_interval=self._interval(), + ) + ).result() @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -619,17 +651,19 @@ async def test_bad_model_version_error_all_tasks(self, client): # TODO: verify with pytest.raises(HttpResponseError): async with client: - result = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(model_version="bad"), - ExtractKeyPhrasesAction(model_version="bad"), - RecognizePiiEntitiesAction(model_version="bad"), - RecognizeLinkedEntitiesAction(model_version="bad"), - AnalyzeSentimentAction(model_version="bad"), - ], - polling_interval=self._interval() - )).result() + result = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(model_version="bad"), + ExtractKeyPhrasesAction(model_version="bad"), + RecognizePiiEntitiesAction(model_version="bad"), + RecognizeLinkedEntitiesAction(model_version="bad"), + AnalyzeSentimentAction(model_version="bad"), + ], + polling_interval=self._interval(), + ) + ).result() @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -638,17 +672,19 @@ async def test_missing_input_records_error(self, **kwargs): docs = [] with pytest.raises(ValueError) as excinfo: async with client: - await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - polling_interval=self._interval() - )).result() + await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() assert "Input documents can not be empty or None" in str(excinfo.value) @TextAnalyticsPreparer() @@ -668,14 +704,16 @@ def callback(pipeline_response, deserialized, _): return "cls result" async with client: - res = await (await client.begin_analyze_actions( - documents=["Test passing cls to endpoint"], - actions=[ - RecognizeEntitiesAction(), - ], - cls=callback, - polling_interval=self._interval() - )).result() + res = await ( + await client.begin_analyze_actions( + documents=["Test passing cls to endpoint"], + actions=[ + RecognizeEntitiesAction(), + ], + cls=callback, + polling_interval=self._interval(), + ) + ).result() assert res == "cls result" @TextAnalyticsPreparer() @@ -683,22 +721,25 @@ def callback(pipeline_response, deserialized, _): @recorded_by_proxy_async async def test_multiple_pages_of_results_returned_successfully(self, client): single_doc = "hello world" - docs = [{"id": str(idx), "text": val} for (idx, val) in - enumerate(list(itertools.repeat(single_doc, 25)))] # max number of documents is 25 + docs = [ + {"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 25))) + ] # max number of documents is 25 async with client: - result = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval() - )).result() + result = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() pages = [] async for p in result: @@ -733,35 +774,39 @@ async def test_too_many_documents(self, client): with pytest.raises(HttpResponseError) as excinfo: async with client: - await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - polling_interval=self._interval() - )).result() + await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() assert excinfo.value.status_code == 400 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_disable_service_logs( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) actions = [ RecognizeEntitiesAction(disable_service_logs=True), ExtractKeyPhrasesAction(disable_service_logs=True), @@ -771,50 +816,55 @@ async def test_disable_service_logs( SingleLabelClassifyAction( project_name=textanalytics_single_label_classify_project_name, deployment_name=textanalytics_single_label_classify_deployment_name, - disable_service_logs=True + disable_service_logs=True, ), MultiLabelClassifyAction( project_name=textanalytics_multi_label_classify_project_name, deployment_name=textanalytics_multi_label_classify_deployment_name, - disable_service_logs=True + disable_service_logs=True, ), RecognizeCustomEntitiesAction( project_name=textanalytics_custom_entities_project_name, deployment_name=textanalytics_custom_entities_deployment_name, - disable_service_logs=True + disable_service_logs=True, ), - AnalyzeHealthcareEntitiesAction(disable_service_logs=True) + AnalyzeHealthcareEntitiesAction(disable_service_logs=True), ] for action in actions: assert action.disable_service_logs - await (await client.begin_analyze_actions( - documents=["Test for logging disable"], - actions=actions, - polling_interval=self._interval(), - )).result() + await ( + await client.begin_analyze_actions( + documents=["Test for logging disable"], + actions=actions, + polling_interval=self._interval(), + ) + ).result() @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_pii_action_categories_filter(self, client): - docs = [{"id": "1", "text": "My SSN is 859-98-0987."}, - {"id": "2", - "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, - {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + docs = [ + {"id": "1", "text": "My SSN is 859-98-0987."}, + { + "id": "2", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] actions = [ RecognizePiiEntitiesAction( - categories_filter=[ - PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER, - PiiEntityCategory.ABA_ROUTING_NUMBER - ] + categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER, PiiEntityCategory.ABA_ROUTING_NUMBER] ), ] async with client: - result = await (await client.begin_analyze_actions(documents=docs, actions=actions, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_actions(documents=docs, actions=actions, polling_interval=self._interval()) + ).result() action_results = [] async for p in result: action_results.append(p) @@ -832,18 +882,22 @@ async def test_pii_action_categories_filter(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_partial_success_for_actions(self, client): - docs = [{"id": "1", "language": "tr", "text": "I did not like the hotel we stayed at."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at."}] + docs = [ + {"id": "1", "language": "tr", "text": "I did not like the hotel we stayed at."}, + {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at."}, + ] async with client: - response = await (await client.begin_analyze_actions( + response = await ( + await client.begin_analyze_actions( docs, actions=[ AnalyzeSentimentAction(), RecognizePiiEntitiesAction(), ], polling_interval=self._interval(), - )).result() + ) + ).result() action_results = [] async for p in response: @@ -877,7 +931,11 @@ async def test_multiple_of_same_action(self, client): docs = [ {"id": "28", "text": "My SSN is 859-98-0987. Here is another sentence."}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number? Here is another sentence."}, - {"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "5", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, ] actions = [ @@ -893,11 +951,13 @@ async def test_multiple_of_same_action(self, client): ExtractKeyPhrasesAction(), ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=actions, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=actions, + polling_interval=self._interval(), + ) + ).result() action_results = [] async for p in response: @@ -956,8 +1016,14 @@ async def test_multiple_of_same_action(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_multiple_of_same_action_with_partial_results(self, client): - docs = [{"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "text": ""}] + docs = [ + { + "id": "5", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + {"id": "2", "text": ""}, + ] actions = [ RecognizeEntitiesAction(), @@ -966,11 +1032,13 @@ async def test_multiple_of_same_action_with_partial_results(self, client): ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=actions, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=actions, + polling_interval=self._interval(), + ) + ).result() action_results = [] async for p in response: @@ -993,36 +1061,52 @@ async def test_multiple_of_same_action_with_partial_results(self, client): assert action_results[1][1].is_error assert action_results[1][2].is_error - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_single_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - SingleLabelClassifyAction( - project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name - ), - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + SingleLabelClassifyAction( + project_name=textanalytics_single_label_classify_project_name, + deployment_name=textanalytics_single_label_classify_deployment_name, + ), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -1037,36 +1121,52 @@ async def test_single_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_multi_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - MultiLabelClassifyAction( - project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name - ), - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + MultiLabelClassifyAction( + project_name=textanalytics_multi_label_classify_project_name, + deployment_name=textanalytics_multi_label_classify_deployment_name, + ), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -1082,36 +1182,52 @@ async def test_multi_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_recognize_custom_entities( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeCustomEntitiesAction( - project_name=textanalytics_custom_entities_project_name, - deployment_name=textanalytics_custom_entities_deployment_name - ) - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name, + ) + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -1130,46 +1246,54 @@ async def test_recognize_custom_entities( assert entity.length is not None assert entity.confidence_score is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_custom_partial_error( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - SingleLabelClassifyAction( - project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name - ), - MultiLabelClassifyAction( - project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name - ), - RecognizeCustomEntitiesAction( - project_name=textanalytics_custom_entities_project_name, - deployment_name=textanalytics_custom_entities_deployment_name - ) - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + SingleLabelClassifyAction( + project_name=textanalytics_single_label_classify_project_name, + deployment_name=textanalytics_single_label_classify_deployment_name, + ), + MultiLabelClassifyAction( + project_name=textanalytics_multi_label_classify_project_name, + deployment_name=textanalytics_multi_label_classify_deployment_name, + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name, + ), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -1189,10 +1313,22 @@ async def test_custom_partial_error( @recorded_by_proxy_async async def test_analyze_continuation_token(self, client): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, {"id": "3", "text": ""}, - {"id": "4", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "4", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] actions = [ @@ -1245,18 +1381,18 @@ async def test_analyze_continuation_token(self, client): await initial_poller.wait() # necessary so devtools_testutils doesn't throw assertion error @TextAnalyticsPreparer() - async def test_generic_action_error_no_target_v3_1( - self, - **kwargs - ): + async def test_generic_action_error_no_target_v3_1(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.MagicMock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) path_to_mock_json_response = os.path.abspath( os.path.join( @@ -1278,34 +1414,39 @@ async def test_generic_action_error_no_target_v3_1( with pytest.raises(HttpResponseError) as e: async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - RecognizeLinkedEntitiesAction(), - RecognizePiiEntitiesAction() - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + RecognizeLinkedEntitiesAction(), + RecognizePiiEntitiesAction(), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() results = [] async for resp in response: results.append(resp) - assert e.value.message == "(InternalServerError) 1 out of 3 job tasks failed. Failed job tasks : v3.1/entities/general." + assert ( + e.value.message + == "(InternalServerError) 1 out of 3 job tasks failed. Failed job tasks : v3.1/entities/general." + ) @TextAnalyticsPreparer() - async def test_generic_action_error_no_target( - self, - **kwargs - ): + async def test_generic_action_error_no_target(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.MagicMock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) path_to_mock_json_response = os.path.abspath( @@ -1330,14 +1471,16 @@ async def test_generic_action_error_no_target( def get_deserialized_for_mock(response, deserialized, headers): from azure.ai.textanalytics._generated.models import AnalyzeTextJobState, AnalyzeTextJobsInput from azure.ai.textanalytics.aio._response_handlers_async import analyze_paged_result + deserialized = AnalyzeTextJobState.deserialize(response.raw_response) return analyze_paged_result( ["1", "2"], - [(_AnalyzeActionsType.RECOGNIZE_ENTITIES, '0'), - (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, '1'), - (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, '2'), - (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, '3'), - (_AnalyzeActionsType.ANALYZE_SENTIMENT, '4'), + [ + (_AnalyzeActionsType.RECOGNIZE_ENTITIES, "0"), + (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, "1"), + (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, "2"), + (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, "3"), + (_AnalyzeActionsType.ANALYZE_SENTIMENT, "4"), ], client._client.analyze_text_job_status, response, @@ -1347,38 +1490,43 @@ def get_deserialized_for_mock(response, deserialized, headers): async with client: with pytest.raises(HttpResponseError) as e: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=lambda resp: resp, - cls=get_deserialized_for_mock - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=lambda resp: resp, + cls=get_deserialized_for_mock, + ) + ).result() results = [] async for resp in response: results.append(resp) - assert e.value.message == "(InternalServerError) 1 out of 5 job tasks failed. Failed job tasks : keyphrasescomposite." + assert ( + e.value.message + == "(InternalServerError) 1 out of 5 job tasks failed. Failed job tasks : keyphrasescomposite." + ) @TextAnalyticsPreparer() - async def test_action_errors_with_targets_v3_1( - self, - **kwargs - ): + async def test_action_errors_with_targets_v3_1(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.MagicMock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # a mix of action errors to translate to doc errors, regular doc errors, and a successful response @@ -1401,20 +1549,22 @@ async def test_action_errors_with_targets_v3_1( client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), transport=transport, api_version="v3.1") async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - RecognizePiiEntitiesAction(domain_filter="phi"), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(domain_filter="phi"), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() results = [] async for resp in response: results.append(resp) @@ -1441,18 +1591,18 @@ async def test_action_errors_with_targets_v3_1( assert result.error.message == "Some error" + str(idx) # confirms correct doc error order @TextAnalyticsPreparer() - async def test_action_errors_with_targets( - self, - **kwargs - ): + async def test_action_errors_with_targets(self, **kwargs): docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.MagicMock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # a mix of action errors to translate to doc errors, regular doc errors, and a successful response @@ -1478,17 +1628,19 @@ async def test_action_errors_with_targets( def get_deserialized_for_mock(response, deserialized, headers): from azure.ai.textanalytics._generated.models import AnalyzeTextJobState, AnalyzeTextJobsInput from azure.ai.textanalytics.aio._response_handlers_async import analyze_paged_result + deserialized = AnalyzeTextJobState.deserialize(response.raw_response) return analyze_paged_result( ["1", "2"], - [(_AnalyzeActionsType.RECOGNIZE_ENTITIES, '0'), - (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, '1'), - (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, '2'), - (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, '3'), - (_AnalyzeActionsType.ANALYZE_SENTIMENT, '4'), - (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, '5'), - (_AnalyzeActionsType.ANALYZE_SENTIMENT, '6') + [ + (_AnalyzeActionsType.RECOGNIZE_ENTITIES, "0"), + (_AnalyzeActionsType.EXTRACT_KEY_PHRASES, "1"), + (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, "2"), + (_AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES, "3"), + (_AnalyzeActionsType.ANALYZE_SENTIMENT, "4"), + (_AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, "5"), + (_AnalyzeActionsType.ANALYZE_SENTIMENT, "6"), ], client._client.analyze_text_job_status, response, @@ -1497,22 +1649,24 @@ def get_deserialized_for_mock(response, deserialized, headers): ) async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction(), - RecognizePiiEntitiesAction(domain_filter="phi"), - AnalyzeSentimentAction(), - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=lambda resp: resp, - cls=get_deserialized_for_mock - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(domain_filter="phi"), + AnalyzeSentimentAction(), + ], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=lambda resp: resp, + cls=get_deserialized_for_mock, + ) + ).result() results = [] async for resp in response: results.append(resp) @@ -1539,19 +1693,18 @@ def get_deserialized_for_mock(response, deserialized, headers): assert result.error.message == "Some error" + str(idx) # confirms correct doc error order @TextAnalyticsPreparer() - async def test_action_job_failure_v3_1( - self, - **kwargs - ): + async def test_action_job_failure_v3_1(self, **kwargs): docs = [ - {"id": "1", "language": "en", - "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.MagicMock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # action job failure with status=="failed", no partial results so we raise an exception in this case @@ -1575,33 +1728,37 @@ async def test_action_job_failure_v3_1( async with client: with pytest.raises(HttpResponseError) as e: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() results = [] async for resp in response: results.append(resp) - assert e.value.message == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : v3.1/entities/general." + assert ( + e.value.message + == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : v3.1/entities/general." + ) @TextAnalyticsPreparer() - async def test_action_job_failure( - self, - **kwargs - ): + async def test_action_job_failure(self, **kwargs): docs = [ - {"id": "1", "language": "en", - "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, {"id": "2", "language": "en", "text": ""}, ] response = mock.MagicMock( - status_code=200, - headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + status_code=200, headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} ) # action job failure with status=="failed", no partial results so we raise an exception in this case @@ -1621,61 +1778,69 @@ async def test_action_job_failure( endpoint = kwargs.pop("textanalytics_test_endpoint") key = kwargs.pop("textanalytics_test_api_key") - client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), - transport=transport) + client = TextAnalyticsClient(endpoint, AzureKeyCredential(key), transport=transport) # workaround to get mocked response to work with deserialized polymorphic response type def get_deserialized_for_mock(response, deserialized, headers): from azure.ai.textanalytics._generated.models import AnalyzeTextJobState, AnalyzeTextJobsInput from azure.ai.textanalytics.aio._response_handlers_async import analyze_paged_result + deserialized = AnalyzeTextJobState.deserialize(response.raw_response) return analyze_paged_result( ["1", "2"], - [(_AnalyzeActionsType.EXTRACT_KEY_PHRASES, '0')], + [(_AnalyzeActionsType.EXTRACT_KEY_PHRASES, "0")], client._client.analyze_text_job_status, response, deserialized, show_stats=True, ) + async with client: with pytest.raises(HttpResponseError) as e: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - ExtractKeyPhrasesAction() - ], - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=lambda resp: resp, - cls=get_deserialized_for_mock - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ExtractKeyPhrasesAction()], + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=lambda resp: resp, + cls=get_deserialized_for_mock, + ) + ).result() results = [] async for resp in response: results.append(resp) - assert e.value.message == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : keyphrasescomposite." + assert ( + e.value.message + == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : keyphrasescomposite." + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"}) @recorded_by_proxy_async async def test_analyze_works_with_v3_1(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction() - ], - polling_interval=self._interval() - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() results = [] async for p in response: @@ -1697,79 +1862,98 @@ async def test_analyze_works_with_v3_1(self, client): assert not document_result.is_error assert self.document_result_to_action_type(document_result) == action_order[action_idx] - @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.0"}) async def test_analyze_multiapi_validate_v3_0(self, **kwargs): client = kwargs.pop("client") - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] with pytest.raises(ValueError) as e: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - RecognizeEntitiesAction(), - ExtractKeyPhrasesAction(), - RecognizePiiEntitiesAction(), - RecognizeLinkedEntitiesAction(), - AnalyzeSentimentAction() - ], - polling_interval=self._interval(), - )).result() - assert str(e.value) == "'TextAnalyticsClient.begin_analyze_actions' is not available in API version v3.0. " \ - "Use service API version v3.1 or newer." + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ], + polling_interval=self._interval(), + ) + ).result() + assert ( + str(e.value) == "'TextAnalyticsClient.begin_analyze_actions' is not available in API version v3.0. " + "Use service API version v3.1 or newer." + ) - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsCustomPreparer() async def test_analyze_multiapi_validate_v3_1(self, **kwargs): textanalytics_custom_text_endpoint = kwargs.pop("textanalytics_custom_text_endpoint") textanalytics_custom_text_key = kwargs.pop("textanalytics_custom_text_key") - textanalytics_single_label_classify_project_name = kwargs.pop("textanalytics_single_label_classify_project_name") - textanalytics_single_label_classify_deployment_name = kwargs.pop("textanalytics_single_label_classify_deployment_name") + textanalytics_single_label_classify_project_name = kwargs.pop( + "textanalytics_single_label_classify_project_name" + ) + textanalytics_single_label_classify_deployment_name = kwargs.pop( + "textanalytics_single_label_classify_deployment_name" + ) textanalytics_multi_label_classify_project_name = kwargs.pop("textanalytics_multi_label_classify_project_name") - textanalytics_multi_label_classify_deployment_name = kwargs.pop("textanalytics_multi_label_classify_deployment_name") + textanalytics_multi_label_classify_deployment_name = kwargs.pop( + "textanalytics_multi_label_classify_deployment_name" + ) textanalytics_custom_entities_project_name = kwargs.pop("textanalytics_custom_entities_project_name") textanalytics_custom_entities_deployment_name = kwargs.pop("textanalytics_custom_entities_deployment_name") - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), api_version="v3.1") + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), api_version="v3.1" + ) - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] version_supported = "2022-05-01" with pytest.raises(ValueError) as e: - response = await (await client.begin_analyze_actions( - docs, - actions=[ - SingleLabelClassifyAction( - project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name - ), - MultiLabelClassifyAction( - project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name - ), - RecognizeCustomEntitiesAction( - project_name=textanalytics_custom_entities_project_name, - deployment_name=textanalytics_custom_entities_deployment_name - ), - AnalyzeHealthcareEntitiesAction() - ], - polling_interval=self._interval(), - )).result() - assert str(e.value) == f"'RecognizeCustomEntitiesAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" \ - f"'SingleLabelClassifyAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" \ - f"'MultiLabelClassifyAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" \ - f"'AnalyzeHealthcareEntitiesAction' is not available in API version v3.1. " \ - f"Use service API version {version_supported} or newer.\n" + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ + SingleLabelClassifyAction( + project_name=textanalytics_single_label_classify_project_name, + deployment_name=textanalytics_single_label_classify_deployment_name, + ), + MultiLabelClassifyAction( + project_name=textanalytics_multi_label_classify_project_name, + deployment_name=textanalytics_multi_label_classify_deployment_name, + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name, + ), + AnalyzeHealthcareEntitiesAction(), + ], + polling_interval=self._interval(), + ) + ).result() + assert ( + str(e.value) == f"'RecognizeCustomEntitiesAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + f"'SingleLabelClassifyAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + f"'MultiLabelClassifyAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + f"'AnalyzeHealthcareEntitiesAction' is not available in API version v3.1. " + f"Use service API version {version_supported} or newer.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -1778,19 +1962,21 @@ async def test_healthcare_action(self, client): docs = [ "Patient does not suffer from high blood pressure.", "Prescribed 100mg ibuprofen, taken twice daily.", - "" + "", ] async with client: - result = await (await client.begin_analyze_actions( - docs, - actions=[ - AnalyzeHealthcareEntitiesAction( - model_version="latest", - ) - ], - show_stats=True, - polling_interval=self._interval(), - )).result() + result = await ( + await client.begin_analyze_actions( + docs, + actions=[ + AnalyzeHealthcareEntitiesAction( + model_version="latest", + ) + ], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() response = [] async for r in result: response.append(r) @@ -1810,7 +1996,7 @@ async def test_healthcare_action(self, client): async def test_cancel(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20)))] - actions=[ + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1832,7 +2018,7 @@ async def test_cancel(self, client): async def test_cancel_partial_results(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 5)))] - actions=[ + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1867,8 +2053,10 @@ async def test_cancel_partial_results(self, client): @recorded_by_proxy_async async def test_cancel_fail_terminal_state(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." - docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20)))] # max number of documents is 25 - actions=[ + docs = [ + {"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20))) + ] # max number of documents is 25 + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1891,8 +2079,10 @@ async def test_cancel_fail_terminal_state(self, client): @recorded_by_proxy_async async def test_cancel_fail_v3_1(self, client): single_doc = "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities." - docs = [{"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20)))] # max number of documents is 25 - actions=[ + docs = [ + {"id": str(idx), "text": val} for (idx, val) in enumerate(list(itertools.repeat(single_doc, 20))) + ] # max number of documents is 25 + actions = [ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), RecognizePiiEntitiesAction(), @@ -1909,39 +2099,46 @@ async def test_cancel_fail_v3_1(self, client): with pytest.raises(ValueError) as e: await poller.cancel() - assert"Cancellation not supported by API versions v3.0, v3.1." in str(e.value) + assert "Cancellation not supported by API versions v3.0, v3.1." in str(e.value) - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_passing_dict_extract_summary_action(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + }, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ExtractiveSummaryAction()], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ExtractiveSummaryAction()], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -1961,12 +2158,13 @@ async def test_passing_dict_extract_summary_action(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_extract_summary_action_with_options(self, client): - docs = ["The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + docs = [ + "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " @@ -1981,15 +2179,18 @@ async def test_extract_summary_action_with_options(self, client): "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."] + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said." + ] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ExtractiveSummaryAction(max_sentence_count=5, order_by="Rank")], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ExtractiveSummaryAction(max_sentence_count=5, order_by="Rank")], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -2011,7 +2212,7 @@ async def test_extract_summary_action_with_options(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async @@ -2019,12 +2220,14 @@ async def test_extract_summary_partial_results(self, client): docs = [{"id": "1", "language": "en", "text": ""}, {"id": "2", "language": "en", "text": "hello world"}] async with client: - response = await (await client.begin_analyze_actions( - docs, - actions=[ExtractiveSummaryAction()], - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_actions( + docs, + actions=[ExtractiveSummaryAction()], + show_stats=True, + polling_interval=self._interval(), + ) + ).result() document_results = [] async for doc in response: @@ -2035,28 +2238,33 @@ async def test_extract_summary_partial_results(self, client): assert not document_results[1][0].is_error assert isinstance(document_results[1][0], ExtractiveSummaryResult) - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_passing_dict_abstract_summary_action(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + } + ] poller = await client.begin_analyze_actions( docs, diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py index 3f75f740ea32..746853f231db 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py @@ -46,7 +46,7 @@ def test_passing_only_string(self, client): docs = [ "Patient does not suffer from high blood pressure.", "Prescribed 100mg ibuprofen, taken twice daily.", - "" + "", ] response = list(client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()).result()) @@ -65,7 +65,7 @@ def test_passing_only_string_v3_1(self, client): docs = [ "Patient does not suffer from high blood pressure.", "Prescribed 100mg ibuprofen, taken twice daily.", - "" + "", ] response = list(client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()).result()) @@ -81,9 +81,11 @@ def test_passing_only_string_v3_1(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "en", "text": ""}, - {"id": "2", "language": "english", "text": "Patient does not suffer from high blood pressure."}, - {"id": "3", "language": "en", "text": "Prescribed 100mg ibuprofen, taken twice daily."}] + docs = [ + {"id": "1", "language": "en", "text": ""}, + {"id": "2", "language": "english", "text": "Patient does not suffer from high blood pressure."}, + {"id": "3", "language": "en", "text": "Prescribed 100mg ibuprofen, taken twice daily."}, + ] response = list(client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()).result()) assert response[0].is_error @@ -120,7 +122,6 @@ def test_payload_too_large(self, client): for revascularization with open heart surgery." docs = list(itertools.repeat(large_doc, 500)) - with pytest.raises(HttpResponseError) as excinfo: client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) assert excinfo.value.status_code == 400 @@ -130,12 +131,13 @@ def test_payload_too_large(self, client): @recorded_by_proxy def test_out_of_order_ids(self, client): - - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = list(client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()).result()) expected_order = ["56", "0", "22", "19", "1"] @@ -150,30 +152,35 @@ def test_out_of_order_ids(self, client): assert not resp.statistics assert num_error == 1 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud raise InternalServerError: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714') + @pytest.mark.skipif( + not is_public_cloud(), + reason="Usgov and China Cloud raise InternalServerError: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714", + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"}) @recorded_by_proxy def test_show_stats_and_model_version_v3_1(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] def callback(resp): assert resp.raw_response - stats = resp.raw_response['results']['statistics'] - assert stats['documentsCount'] == 5 - assert stats['validDocumentsCount'] == 4 - assert stats['erroneousDocumentsCount'] == 1 - assert stats['transactionsCount'] == 4 + stats = resp.raw_response["results"]["statistics"] + assert stats["documentsCount"] == 5 + assert stats["validDocumentsCount"] == 4 + assert stats["erroneousDocumentsCount"] == 1 + assert stats["transactionsCount"] == 4 response = client.begin_analyze_healthcare_entities( docs, show_stats=True, polling_interval=self._interval(), - raw_response_hook = callback, + raw_response_hook=callback, ).result() num_error = 0 @@ -189,28 +196,30 @@ def callback(resp): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_show_stats_and_model_version(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] def callback(resp): assert resp.raw_response - tasks = resp.raw_response['tasks'] - assert tasks['completed'] == 1 - assert tasks['inProgress'] == 0 - assert tasks['failed'] == 0 - assert tasks['total'] == 1 + tasks = resp.raw_response["tasks"] + assert tasks["completed"] == 1 + assert tasks["inProgress"] == 0 + assert tasks["failed"] == 0 + assert tasks["total"] == 1 num_tasks = 0 for task in tasks["items"]: num_tasks += 1 - task_stats = task['results']['statistics'] - assert task['results']['modelVersion'] - assert task_stats['documentsCount'] == 5 - assert task_stats['validDocumentsCount'] == 4 - assert task_stats['erroneousDocumentsCount'] == 1 - assert task_stats['transactionsCount'] == 4 + task_stats = task["results"]["statistics"] + assert task["results"]["modelVersion"] + assert task_stats["documentsCount"] == 5 + assert task_stats["validDocumentsCount"] == 4 + assert task_stats["erroneousDocumentsCount"] == 1 + assert task_stats["transactionsCount"] == 4 assert num_tasks == 1 response = client.begin_analyze_healthcare_entities( @@ -218,7 +227,7 @@ def callback(resp): show_stats=True, model_version="latest", polling_interval=self._interval(), - raw_response_hook = callback, + raw_response_hook=callback, ).result() num_error = 0 @@ -234,11 +243,15 @@ def callback(resp): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_whole_batch_language_hint_and_dict_input(self, client): - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] - response = list(client.begin_analyze_healthcare_entities(docs, language="en", polling_interval=self._interval()).result()) + response = list( + client.begin_analyze_healthcare_entities(docs, language="en", polling_interval=self._interval()).result() + ) assert not response[0].is_error assert not response[1].is_error assert not response[2].is_error @@ -247,20 +260,32 @@ def test_whole_batch_language_hint_and_dict_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_method(self, client): - response = list(client.begin_analyze_healthcare_entities( - ["This should fail because we're passing in an invalid language hint"], language="notalanguage", polling_interval=self._interval() - ).result()) - assert response[0].error.code == 'UnsupportedLanguageCode' + response = list( + client.begin_analyze_healthcare_entities( + ["This should fail because we're passing in an invalid language hint"], + language="notalanguage", + polling_interval=self._interval(), + ).result() + ) + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_docs(self, client): - response = list(client.begin_analyze_healthcare_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}], - polling_interval=self._interval() - ).result()) - assert response[0].error.code == 'UnsupportedLanguageCode' + response = list( + client.begin_analyze_healthcare_entities( + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ], + polling_interval=self._interval(), + ).result() + ) + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -269,9 +294,12 @@ def test_user_agent(self, client): # TODO: verify docs = [{"id": "1", "text": "I will go to the park."}] poller = client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - poller._polling_method._initial_response.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in poller._polling_method._initial_response.http_request.headers["User-Agent"] + ) poller.result() # need to call this before tearDown runs even though we don't need the response for the test. @@ -292,10 +320,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -304,7 +333,9 @@ def test_bad_model_version_error(self, client): docs = [{"id": "1", "language": "en", "text": "I did not like the hotel we stayed at."}] with pytest.raises(HttpResponseError) as err: - result = client.begin_analyze_healthcare_entities(docs, model_version="bad", polling_interval=self._interval()).result() + result = client.begin_analyze_healthcare_entities( + docs, model_version="bad", polling_interval=self._interval() + ).result() assert err.value.error.code == "InvalidParameterValue" assert err.value.error.message is not None @@ -316,9 +347,11 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] result = client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()).result() doc_results = list(result) @@ -334,8 +367,7 @@ def test_document_errors(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()).result() @@ -349,10 +381,9 @@ def test_duplicate_ids_error(self, client): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" + res = client.begin_analyze_healthcare_entities( - documents=["Test passing cls to endpoint"], - cls=callback, - polling_interval=self._interval() + documents=["Test passing cls to endpoint"], cls=callback, polling_interval=self._interval() ).result() assert res == "cls result" @@ -373,7 +404,9 @@ def test_cancellation(self, client): in the anterior lateral leads , thought due to fatigue and wrist pain , his anginal equivalent. Due to the patient's \ increased symptoms and family history and history left main disease with total occasional of his RCA was referred \ for revascularization with open heart surgery." - docs = [{"id": str(idx), "text": large_doc*3} for (idx, val) in enumerate(list(itertools.repeat(large_doc, 25)))] + docs = [ + {"id": str(idx), "text": large_doc * 3} for (idx, val) in enumerate(list(itertools.repeat(large_doc, 25))) + ] poller = client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) @@ -381,7 +414,7 @@ def test_cancellation(self, client): cancellation_poller = poller.cancel() cancellation_poller.result() except HttpResponseError: - pass # expected if the operation was already in a terminal state. + pass # expected if the operation was already in a terminal state. @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -397,8 +430,11 @@ def test_default_string_index_type_is_UnicodeCodePoint(self, client): @recorded_by_proxy def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" - poller = client.begin_analyze_healthcare_entities(documents=["Hello world"], polling_interval=self._interval(), raw_response_hook=callback) + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" + + poller = client.begin_analyze_healthcare_entities( + documents=["Hello world"], polling_interval=self._interval(), raw_response_hook=callback + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -418,22 +454,22 @@ def test_explicit_set_string_index_type(self, client): @recorded_by_proxy def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = client.begin_analyze_healthcare_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_relations(self, client): - result = list(client.begin_analyze_healthcare_entities( - documents=["The patient was diagnosed with Parkinsons Disease (PD)"], - polling_interval=self._interval(), - ).result()) + result = list( + client.begin_analyze_healthcare_entities( + documents=["The patient was diagnosed with Parkinsons Disease (PD)"], + polling_interval=self._interval(), + ).result() + ) assert len(result) == 1 result = result[0] @@ -460,14 +496,14 @@ def test_relations(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_normalized_text(self, client): - result = list(client.begin_analyze_healthcare_entities( - documents=["patients must have histologically confirmed NHL"], - polling_interval=self._interval(), - ).result()) + result = list( + client.begin_analyze_healthcare_entities( + documents=["patients must have histologically confirmed NHL"], + polling_interval=self._interval(), + ).result() + ) - assert all([ - e for e in result[0].entities if hasattr(e, "normalized_text") - ]) + assert all([e for e in result[0].entities if hasattr(e, "normalized_text")]) histologically_entity = list(filter(lambda x: x.text == "histologically", result[0].entities))[0] assert histologically_entity.normalized_text == "Histology Procedure" @@ -476,10 +512,14 @@ def test_normalized_text(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_healthcare_assertion(self, client): - result = list(client.begin_analyze_healthcare_entities( - documents=["Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."], - polling_interval=self._interval(), - ).result()) + result = list( + client.begin_analyze_healthcare_entities( + documents=[ + "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too." + ], + polling_interval=self._interval(), + ).result() + ) # currently can only test certainty # have an issue to update https://github.com/Azure/azure-sdk-for-python/issues/17088 @@ -494,7 +534,8 @@ def callback(resp): # this is called for both the initial post # and the gets. Only care about the initial post if resp.http_request.method == "POST": - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.begin_analyze_healthcare_entities( documents=["Test for logging disable"], polling_interval=self._interval(), @@ -508,10 +549,13 @@ def callback(resp): def test_healthcare_continuation_token(self, client): initial_poller = client.begin_analyze_healthcare_entities( documents=[ - {"id": "1", "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + { + "id": "1", + "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too.", + }, {"id": "2", "text": "patients must have histologically confirmed NHL"}, {"id": "3", "text": ""}, - {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"}, ], show_stats=True, polling_interval=self._interval(), @@ -567,17 +611,22 @@ def test_healthcare_multiapi_validate_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: poller = client.begin_analyze_healthcare_entities( documents=[ - {"id": "1", - "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + { + "id": "1", + "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too.", + }, {"id": "2", "text": "patients must have histologically confirmed NHL"}, {"id": "3", "text": ""}, - {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"}, ], show_stats=True, polling_interval=self._interval(), ) - assert str(e.value) == "'TextAnalyticsClient.begin_analyze_healthcare_entities' is not available in API version v3.0. " \ - "Use service API version v3.1 or newer." + assert ( + str(e.value) + == "'TextAnalyticsClient.begin_analyze_healthcare_entities' is not available in API version v3.0. " + "Use service API version v3.1 or newer." + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"}) @@ -587,14 +636,19 @@ def test_healthcare_multiapi_validate_v3_1(self, **kwargs): with pytest.raises(ValueError) as e: poller = client.begin_analyze_healthcare_entities( documents=[ - {"id": "1", - "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + { + "id": "1", + "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too.", + }, {"id": "2", "text": "patients must have histologically confirmed NHL"}, {"id": "3", "text": ""}, - {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"}, ], display_name="this won't work", show_stats=True, polling_interval=self._interval(), ) - assert str(e.value) == "'display_name' is not available in API version v3.1. Use service API version 2022-05-01 or newer.\n" + assert ( + str(e.value) + == "'display_name' is not available in API version v3.1. Use service API version 2022-05-01 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py index a6de745ea2e4..330991e633c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py @@ -39,7 +39,9 @@ def _interval(self): async def test_no_single_input(self, client): with pytest.raises(TypeError): async with client: - response = await (await client.begin_analyze_healthcare_entities("hello world", polling_interval=self._interval())).result() + response = await ( + await client.begin_analyze_healthcare_entities("hello world", polling_interval=self._interval()) + ).result() @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -48,16 +50,17 @@ async def test_passing_only_string(self, client): docs = [ "Patient does not suffer from high blood pressure.", "Prescribed 100mg ibuprofen, taken twice daily.", - "" + "", ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) + ).result() response = [] async for r in result: response.append(r) - for i in range(2): assert response[i].id is not None assert response[i].entities is not None @@ -71,16 +74,17 @@ async def test_passing_only_string_v3_1(self, client): docs = [ "Patient does not suffer from high blood pressure.", "Prescribed 100mg ibuprofen, taken twice daily.", - "" + "", ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) + ).result() response = [] async for r in result: response.append(r) - for i in range(2): assert response[i].id is not None assert response[i].entities is not None @@ -91,12 +95,16 @@ async def test_passing_only_string_v3_1(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "en", "text": ""}, - {"id": "2", "language": "english", "text": "Patient does not suffer from high blood pressure."}, - {"id": "3", "language": "en", "text": "Prescribed 100mg ibuprofen, taken twice daily."}] + docs = [ + {"id": "1", "language": "en", "text": ""}, + {"id": "2", "language": "english", "text": "Patient does not suffer from high blood pressure."}, + {"id": "3", "language": "en", "text": "Prescribed 100mg ibuprofen, taken twice daily."}, + ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) + ).result() response = [] async for r in result: response.append(r) @@ -146,14 +154,18 @@ async def test_payload_too_large(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) + ).result() response = [] async for r in result: response.append(r) @@ -168,32 +180,39 @@ async def test_out_of_order_ids(self, client): assert not resp.statistics assert num_error == 1 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud raise InternalServerError: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714') + @pytest.mark.skipif( + not is_public_cloud(), + reason="Usgov and China Cloud raise InternalServerError: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714", + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"}) @recorded_by_proxy_async async def test_show_stats_and_model_version_v3_1(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] def callback(resp): assert resp.raw_response - stats = resp.raw_response['results']['statistics'] - assert stats['documentsCount'] == 5 - assert stats['validDocumentsCount'] == 4 - assert stats['erroneousDocumentsCount'] == 1 - assert stats['transactionsCount'] == 4 + stats = resp.raw_response["results"]["statistics"] + assert stats["documentsCount"] == 5 + assert stats["validDocumentsCount"] == 4 + assert stats["erroneousDocumentsCount"] == 1 + assert stats["transactionsCount"] == 4 async with client: - response = await (await client.begin_analyze_healthcare_entities( - docs, - show_stats=True, - polling_interval=self._interval(), - raw_response_hook=callback, - )).result() + response = await ( + await client.begin_analyze_healthcare_entities( + docs, + show_stats=True, + polling_interval=self._interval(), + raw_response_hook=callback, + ) + ).result() assert response assert not hasattr(response, "statistics") @@ -211,38 +230,42 @@ def callback(resp): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_show_stats_and_model_version(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] def callback(resp): assert resp.raw_response - tasks = resp.raw_response['tasks'] - assert tasks['completed'] == 1 - assert tasks['inProgress'] == 0 - assert tasks['failed'] == 0 - assert tasks['total'] == 1 + tasks = resp.raw_response["tasks"] + assert tasks["completed"] == 1 + assert tasks["inProgress"] == 0 + assert tasks["failed"] == 0 + assert tasks["total"] == 1 num_tasks = 0 for task in tasks["items"]: num_tasks += 1 - task_stats = task['results']['statistics'] - assert task['results']['modelVersion'] - assert task_stats['documentsCount'] == 5 - assert task_stats['validDocumentsCount'] == 4 - assert task_stats['erroneousDocumentsCount'] == 1 - assert task_stats['transactionsCount'] == 4 + task_stats = task["results"]["statistics"] + assert task["results"]["modelVersion"] + assert task_stats["documentsCount"] == 5 + assert task_stats["validDocumentsCount"] == 4 + assert task_stats["erroneousDocumentsCount"] == 1 + assert task_stats["transactionsCount"] == 4 assert num_tasks == 1 async with client: - response = await (await client.begin_analyze_healthcare_entities( - docs, - show_stats=True, - model_version="latest", - polling_interval=self._interval(), - raw_response_hook=callback, - )).result() + response = await ( + await client.begin_analyze_healthcare_entities( + docs, + show_stats=True, + model_version="latest", + polling_interval=self._interval(), + raw_response_hook=callback, + ) + ).result() assert response assert not hasattr(response, "statistics") @@ -260,12 +283,16 @@ def callback(resp): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_whole_batch_language_hint_and_dict_input(self, client): - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, language="en", polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, language="en", polling_interval=self._interval()) + ).result() response = [] async for r in result: response.append(r) @@ -281,43 +308,61 @@ async def test_invalid_language_hint_method(self, client): docs = ["This should fail because we're passing in an invalid language hint"] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, language="notalanguage", polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities( + docs, language="notalanguage", polling_interval=self._interval() + ) + ).result() response = [] async for r in result: response.append(r) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_invalid_language_hint_docs(self, client): - docs = [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + docs = [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) + ).result() response = [] async for r in result: response.append(r) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_user_agent(self, client): # TODO: verify def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) docs = [{"id": "1", "text": "I will go to the park."}] async with client: poller = await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - poller._polling_method._initial_response.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in poller._polling_method._initial_response.http_request.headers["User-Agent"] + ) await poller.result() # need to call this before tearDown runs even though we don't need the response for the test. @@ -329,7 +374,11 @@ async def test_bad_model_version_error(self, client): with pytest.raises(HttpResponseError) as err: async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, model_version="bad", polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities( + docs, model_version="bad", polling_interval=self._interval() + ) + ).result() response = [] async for r in result: response.append(r) @@ -344,12 +393,16 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] async with client: - result = await(await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval())).result() + result = await ( + await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) + ).result() doc_results = [] async for r in result: doc_results.append(r) @@ -365,8 +418,7 @@ async def test_document_errors(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: async with client: result = await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) @@ -382,11 +434,11 @@ def callback(pipeline_response, deserialized, _): return "cls result" async with client: - res = await (await client.begin_analyze_healthcare_entities( - documents=["Test passing cls to endpoint"], - cls=callback, - polling_interval=self._interval() - )).result() + res = await ( + await client.begin_analyze_healthcare_entities( + documents=["Test passing cls to endpoint"], cls=callback, polling_interval=self._interval() + ) + ).result() assert res == "cls result" @TextAnalyticsPreparer() @@ -406,7 +458,9 @@ async def test_cancellation(self, client): in the anterior lateral leads , thought due to fatigue and wrist pain , his anginal equivalent. Due to the patient's \ increased symptoms and family history and history left main disease with total occasional of his RCA was referred \ for revascularization with open heart surgery." - docs = [{"id": str(idx), "text": large_doc*3} for (idx, val) in enumerate(list(itertools.repeat(large_doc, 25)))] + docs = [ + {"id": str(idx), "text": large_doc * 3} for (idx, val) in enumerate(list(itertools.repeat(large_doc, 25))) + ] async with client: poller = await client.begin_analyze_healthcare_entities(docs, polling_interval=self._interval()) @@ -416,13 +470,15 @@ async def test_cancellation(self, client): await cancellation_poller.wait() except HttpResponseError: - pass # expected if the operation was already in a terminal state. + pass # expected if the operation was already in a terminal state. @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @recorded_by_proxy_async async def test_default_string_index_type_is_UnicodeCodePoint(self, client): - poller = await client.begin_analyze_healthcare_entities(documents=["Hello world"], polling_interval=self._interval()) + poller = await client.begin_analyze_healthcare_entities( + documents=["Hello world"], polling_interval=self._interval() + ) actual_string_index_type = poller._polling_method._initial_response.http_request.query["stringIndexType"] assert actual_string_index_type == "UnicodeCodePoint" await poller.result() @@ -444,10 +500,12 @@ async def test_explicit_set_string_index_type(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_relations(self, client): - response = await (await client.begin_analyze_healthcare_entities( - documents=["The patient was diagnosed with Parkinsons Disease (PD)"], - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_healthcare_entities( + documents=["The patient was diagnosed with Parkinsons Disease (PD)"], + polling_interval=self._interval(), + ) + ).result() result = [] async for r in response: @@ -478,18 +536,18 @@ async def test_relations(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_normalized_text(self, client): - response = await (await client.begin_analyze_healthcare_entities( - documents=["patients must have histologically confirmed NHL"], - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_healthcare_entities( + documents=["patients must have histologically confirmed NHL"], + polling_interval=self._interval(), + ) + ).result() result = [] async for r in response: result.append(r) - assert all([ - e for e in result[0].entities if hasattr(e, "normalized_text") - ]) + assert all([e for e in result[0].entities if hasattr(e, "normalized_text")]) histologically_entity = list(filter(lambda x: x.text == "histologically", result[0].entities))[0] assert histologically_entity.normalized_text == "Histology Procedure" @@ -498,10 +556,14 @@ async def test_normalized_text(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_healthcare_assertion(self, client): - response = await (await client.begin_analyze_healthcare_entities( - documents=["Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."], - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_analyze_healthcare_entities( + documents=[ + "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too." + ], + polling_interval=self._interval(), + ) + ).result() result = [] async for r in response: @@ -520,13 +582,16 @@ def callback(resp): # this is called for both the initial post # and the gets. Only care about the initial post if resp.http_request.method == "POST": - assert resp.http_request.query['loggingOptOut'] - await (await client.begin_analyze_healthcare_entities( - documents=["Test for logging disable"], - polling_interval=self._interval(), - disable_service_logs=True, - raw_response_hook=callback, - )).result() + assert resp.http_request.query["loggingOptOut"] + + await ( + await client.begin_analyze_healthcare_entities( + documents=["Test for logging disable"], + polling_interval=self._interval(), + disable_service_logs=True, + raw_response_hook=callback, + ) + ).result() @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -535,10 +600,13 @@ async def test_healthcare_continuation_token(self, client): async with client: initial_poller = await client.begin_analyze_healthcare_entities( documents=[ - {"id": "1", "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + { + "id": "1", + "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too.", + }, {"id": "2", "text": "patients must have histologically confirmed NHL"}, {"id": "3", "text": ""}, - {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"}, ], show_stats=True, polling_interval=self._interval(), @@ -599,17 +667,22 @@ async def test_healthcare_multiapi_validate_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: poller = await client.begin_analyze_healthcare_entities( documents=[ - {"id": "1", - "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + { + "id": "1", + "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too.", + }, {"id": "2", "text": "patients must have histologically confirmed NHL"}, {"id": "3", "text": ""}, - {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"}, ], show_stats=True, polling_interval=self._interval(), ) - assert str(e.value) == "'TextAnalyticsClient.begin_analyze_healthcare_entities' is not available in API version v3.0. " \ - "Use service API version v3.1 or newer." + assert ( + str(e.value) + == "'TextAnalyticsClient.begin_analyze_healthcare_entities' is not available in API version v3.0. " + "Use service API version v3.1 or newer." + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"}) @@ -619,14 +692,19 @@ async def test_healthcare_multiapi_validate_v3_1(self, **kwargs): with pytest.raises(ValueError) as e: poller = await client.begin_analyze_healthcare_entities( documents=[ - {"id": "1", - "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + { + "id": "1", + "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too.", + }, {"id": "2", "text": "patients must have histologically confirmed NHL"}, {"id": "3", "text": ""}, - {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"}, ], display_name="this won't work", show_stats=True, polling_interval=self._interval(), ) - assert str(e.value) == "'display_name' is not available in API version v3.1. Use service API version 2022-05-01 or newer.\n" + assert ( + str(e.value) + == "'display_name' is not available in API version v3.1. Use service API version 2022-05-01 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py index f8b914fa759c..6ed6a88265ad 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py @@ -23,6 +23,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestAnalyzeSentiment(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -36,9 +37,11 @@ def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}, + ] response = client.analyze_sentiment(docs, show_stats=True) assert response[0].sentiment == "neutral" @@ -96,7 +99,7 @@ def test_passing_only_string(self, client): "Microsoft was founded by Bill Gates and Paul Allen.", "I did not like the hotel we stayed at. It was too expensive.", "The restaurant had really good food. I recommend you try it.", - "" + "", ] response = client.analyze_sentiment(docs) @@ -109,9 +112,11 @@ def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "en", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}] + docs = [ + {"id": "1", "language": "en", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}, + ] response = client.analyze_sentiment(docs) assert response[0].is_error @@ -122,9 +127,11 @@ def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_all_errors(self, client): - docs = [{"id": "1", "language": "en", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": ""}] + docs = [ + {"id": "1", "language": "en", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": ""}, + ] response = client.analyze_sentiment(docs) assert response[0].is_error @@ -166,7 +173,7 @@ def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = client.analyze_sentiment(docs) @@ -179,18 +186,14 @@ def test_output_same_order_as_input(self, client): @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = client.analyze_sentiment( - ["This is written in English."] - ) + response = client.analyze_sentiment(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = client.analyze_sentiment( - ["This is written in English."] - ) + response = client.analyze_sentiment(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -208,7 +211,7 @@ def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = client.analyze_sentiment(docs) @@ -217,11 +220,13 @@ def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.analyze_sentiment(docs) in_order = ["56", "0", "22", "19", "1"] @@ -241,18 +246,15 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] - response = client.analyze_sentiment( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback - ) + response = client.analyze_sentiment(docs, show_stats=True, model_version="latest", raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -267,14 +269,14 @@ def test_batch_size_over_limit(self, client): @recorded_by_proxy def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.analyze_sentiment(docs, language="fr", raw_response_hook=callback) @@ -284,14 +286,14 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.analyze_sentiment(docs, language="", raw_response_hook=callback) @@ -301,17 +303,18 @@ def callback(resp): @recorded_by_proxy def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.analyze_sentiment(docs, raw_response_hook=callback) @@ -320,7 +323,7 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -337,13 +340,15 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_dict_input(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.analyze_sentiment(docs, language="es", raw_response_hook=callback) @@ -352,10 +357,10 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -372,17 +377,18 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.analyze_sentiment(docs, language="en", raw_response_hook=callback) @@ -391,18 +397,20 @@ def callback(resp): @recorded_by_proxy def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.analyze_sentiment(docs, raw_response_hook=callback) response = client.analyze_sentiment(docs, language="en", raw_response_hook=callback_2) @@ -415,16 +423,22 @@ def test_invalid_language_hint_method(self, client): response = client.analyze_sentiment( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_docs(self, client): response = client.analyze_sentiment( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy @@ -432,9 +446,11 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.analyze_sentiment(docs) assert response is not None @@ -452,13 +468,18 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic @recorded_by_proxy def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.analyze_sentiment(docs, raw_response_hook=callback) @@ -478,10 +499,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: sentiment = response[0].sentiment except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'sentiment\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'sentiment'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -494,7 +516,9 @@ def test_document_attribute_error_nonexistent_attribute(self, client): try: sentiment = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -516,9 +540,11 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = client.analyze_sentiment(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -559,8 +585,7 @@ def test_passing_none_docs(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.analyze_sentiment(docs) except HttpResponseError as err: @@ -584,7 +609,7 @@ def test_batch_size_over_limit_error(self, client): @recorded_by_proxy def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -594,7 +619,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -603,34 +628,30 @@ def callback(response): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = client.analyze_sentiment( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = client.analyze_sentiment(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_opinion_mining(self, client): - documents = [ - "It has a sleek premium aluminum design that makes it beautiful to look at." - ] + documents = ["It has a sleek premium aluminum design that makes it beautiful to look at."] document = client.analyze_sentiment(documents=documents, show_opinion_mining=True)[0] for sentence in document.sentences: for mined_opinion in sentence.mined_opinions: target = mined_opinion.target - assert 'design' == target.text - assert 'positive' == target.sentiment + assert "design" == target.text + assert "positive" == target.sentiment assert 0.0 == target.confidence_scores.neutral self.validateConfidenceScores(target.confidence_scores) assert 32 == target.offset sleek_opinion = mined_opinion.assessments[0] - assert 'sleek' == sleek_opinion.text - assert 'positive' == sleek_opinion.sentiment + assert "sleek" == sleek_opinion.text + assert "positive" == sleek_opinion.sentiment assert 0.0 == sleek_opinion.confidence_scores.neutral self.validateConfidenceScores(sleek_opinion.confidence_scores) assert 9 == sleek_opinion.offset @@ -646,8 +667,8 @@ def test_opinion_mining(self, client): # assert not premium_opinion.is_negated beautiful_opinion = mined_opinion.assessments[1] - assert 'beautiful' == beautiful_opinion.text - assert 'positive' == beautiful_opinion.sentiment + assert "beautiful" == beautiful_opinion.text + assert "positive" == beautiful_opinion.sentiment assert 1.0 == beautiful_opinion.confidence_scores.positive self.validateConfidenceScores(beautiful_opinion.confidence_scores) assert 53 == beautiful_opinion.offset @@ -657,9 +678,7 @@ def test_opinion_mining(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_opinion_mining_with_negated_opinion(self, client): - documents = [ - "The food and service is not good" - ] + documents = ["The food and service is not good"] document = client.analyze_sentiment(documents=documents, show_opinion_mining=True)[0] @@ -667,13 +686,13 @@ def test_opinion_mining_with_negated_opinion(self, client): food_target = sentence.mined_opinions[0].target service_target = sentence.mined_opinions[1].target - assert 'food' == food_target.text - assert 'negative' == food_target.sentiment + assert "food" == food_target.text + assert "negative" == food_target.sentiment assert 0.0 == food_target.confidence_scores.neutral self.validateConfidenceScores(food_target.confidence_scores) assert 4 == food_target.offset - assert 'service' == service_target.text + assert "service" == service_target.text # assert 'negative' == service_target.sentiment FIXME https://msazure.visualstudio.com/Cognitive%20Services/_workitems/edit/13848227 assert 0.0 == service_target.confidence_scores.neutral self.validateConfidenceScores(service_target.confidence_scores) @@ -683,14 +702,13 @@ def test_opinion_mining_with_negated_opinion(self, client): service_opinion = sentence.mined_opinions[1].assessments[0] self.assertOpinionsEqual(food_opinion, service_opinion) - assert 'good' == food_opinion.text - assert 'negative' == food_opinion.sentiment + assert "good" == food_opinion.text + assert "negative" == food_opinion.sentiment assert 0.0 == food_opinion.confidence_scores.neutral self.validateConfidenceScores(food_opinion.confidence_scores) assert 28 == food_opinion.offset assert food_opinion.is_negated - @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy @@ -702,7 +720,7 @@ def test_opinion_mining_more_than_5_documents(self, client): "Loved this hotel - good breakfast - nice shuttle service - clean rooms.", "I had a great unobstructed view of the Microsoft campus.", "Nice rooms but bathrooms were old and the toilet was dirty when we arrived.", - "The toilet smelled." + "The toilet smelled.", ] analyzed_documents = client.analyze_sentiment(documents, show_opinion_mining=True) @@ -759,22 +777,16 @@ def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = client.analyze_sentiment( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.analyze_sentiment(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = client.analyze_sentiment( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.analyze_sentiment(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -784,9 +796,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = client.analyze_sentiment( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -794,12 +804,10 @@ def callback(response): @recorded_by_proxy def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = client.analyze_sentiment( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -807,7 +815,8 @@ def callback(response): @recorded_by_proxy def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.analyze_sentiment( documents=["Test for logging disable"], disable_service_logs=True, @@ -819,7 +828,8 @@ def callback(resp): @recorded_by_proxy def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + client.analyze_sentiment( documents=["Test for logging disable"], disable_service_logs=True, @@ -833,38 +843,60 @@ def test_sentiment_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = client.analyze_sentiment(["I'm tired"], string_index_type="UnicodeCodePoint") - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = client.analyze_sentiment(["I'm tired"], show_opinion_mining=True) - assert str(e.value) == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = client.analyze_sentiment(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: - res = client.analyze_sentiment(["I'm tired"], show_opinion_mining=True, disable_service_logs=True, string_index_type="UnicodeCodePoint") - assert str(e.value) == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + res = client.analyze_sentiment( + ["I'm tired"], show_opinion_mining=True, disable_service_logs=True, string_index_type="UnicodeCodePoint" + ) + assert ( + str(e.value) + == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) @TextAnalyticsPreparer() def test_mock_quota_exceeded(self, **kwargs): textanalytics_test_endpoint = kwargs.pop("textanalytics_test_endpoint") textanalytics_test_api_key = kwargs.pop("textanalytics_test_api_key") response = mock.Mock( - status_code=403, - headers={"Retry-After": 186688, "Content-Type": "application/json"}, - reason="Bad Request" + status_code=403, headers={"Retry-After": 186688, "Content-Type": "application/json"}, reason="Bad Request" ) response.text = lambda encoding=None: json.dumps( - {"error": {"code": "403", "message": "Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier."}} + { + "error": { + "code": "403", + "message": "Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier.", + } + } ) response.content_type = "application/json" transport = mock.Mock(send=lambda request, **kwargs: response) - client = TextAnalyticsClient(textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport) + client = TextAnalyticsClient( + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport + ) with pytest.raises(HttpResponseError) as e: result = client.analyze_sentiment(["I'm tired"]) assert e.value.status_code == 403 - assert e.value.error.message == 'Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier.' + assert ( + e.value.error.message + == "Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier." + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py index 6dc3695928cd..758d254cf894 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py @@ -29,6 +29,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + def get_completed_future(result=None): future = asyncio.Future() future.set_result(result) @@ -44,6 +45,7 @@ def wrap_in_future(fn): def wrapper(*args, **kwargs): result = fn(*args, **kwargs) return get_completed_future(result) + return wrapper @@ -73,9 +75,11 @@ async def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}, + ] response = await client.analyze_sentiment(docs, show_stats=True) assert response[0].sentiment == "neutral" @@ -133,7 +137,7 @@ async def test_passing_only_string(self, client): "Microsoft was founded by Bill Gates and Paul Allen.", "I did not like the hotel we stayed at. It was too expensive.", "The restaurant had really good food. I recommend you try it.", - "" + "", ] response = await client.analyze_sentiment(docs) @@ -146,9 +150,11 @@ async def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "en", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}] + docs = [ + {"id": "1", "language": "en", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": "The restaurant had really good food. I recommend you try it."}, + ] response = await client.analyze_sentiment(docs) assert response[0].is_error @@ -159,9 +165,11 @@ async def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_all_errors(self, client): - docs = [{"id": "1", "language": "en", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, - {"id": "3", "language": "en", "text": ""}] + docs = [ + {"id": "1", "language": "en", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at. It was too expensive."}, + {"id": "3", "language": "en", "text": ""}, + ] response = await client.analyze_sentiment(docs) assert response[0].is_error @@ -189,7 +197,7 @@ async def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = await client.analyze_sentiment(docs) @@ -202,18 +210,14 @@ async def test_output_same_order_as_input(self, client): @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.analyze_sentiment( - ["This is written in English."] - ) + response = await client.analyze_sentiment(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.analyze_sentiment( - ["This is written in English."] - ) + response = await client.analyze_sentiment(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -231,7 +235,7 @@ async def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = await client.analyze_sentiment(docs) @@ -240,11 +244,13 @@ async def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.analyze_sentiment(docs) in_order = ["56", "0", "22", "19", "1"] @@ -264,17 +270,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.analyze_sentiment( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -290,14 +295,14 @@ async def test_batch_size_over_limit(self, client): @recorded_by_proxy_async async def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.analyze_sentiment(docs, language="fr", raw_response_hook=callback) @@ -307,14 +312,14 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.analyze_sentiment(docs, language="", raw_response_hook=callback) @@ -324,17 +329,18 @@ def callback(resp): @recorded_by_proxy_async async def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.analyze_sentiment(docs, raw_response_hook=callback) @@ -343,7 +349,7 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -360,13 +366,15 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_dict_input(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.analyze_sentiment(docs, language="es", raw_response_hook=callback) @@ -375,10 +383,10 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -395,17 +403,18 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.analyze_sentiment(docs, language="en", raw_response_hook=callback) @@ -414,18 +423,20 @@ def callback(resp): @recorded_by_proxy_async async def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.analyze_sentiment(docs, raw_response_hook=callback) response = await client.analyze_sentiment(docs, language="en", raw_response_hook=callback_2) @@ -438,16 +449,22 @@ async def test_invalid_language_hint_method(self, client): response = await client.analyze_sentiment( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_invalid_language_hint_docs(self, client): response = await client.analyze_sentiment( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy_async @@ -455,9 +472,11 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.analyze_sentiment(docs) assert response is not None @@ -475,13 +494,18 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan @recorded_by_proxy_async async def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.analyze_sentiment(docs, raw_response_hook=callback) @@ -501,10 +525,11 @@ async def test_document_attribute_error_no_result_attribute(self, client): try: sentiment = response[0].sentiment except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'sentiment\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'sentiment'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -517,7 +542,9 @@ async def test_document_attribute_error_nonexistent_attribute(self, client): try: sentiment = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -539,9 +566,11 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = await client.analyze_sentiment(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -596,8 +625,7 @@ async def test_passing_none_docs(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = await client.analyze_sentiment(docs) except HttpResponseError as err: @@ -621,7 +649,7 @@ async def test_batch_size_over_limit_error(self, client): @recorded_by_proxy_async async def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -631,7 +659,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -640,34 +668,30 @@ def callback(response): async def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = await client.analyze_sentiment( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = await client.analyze_sentiment(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_opinion_mining(self, client): - documents = [ - "It has a sleek premium aluminum design that makes it beautiful to look at." - ] + documents = ["It has a sleek premium aluminum design that makes it beautiful to look at."] document = (await client.analyze_sentiment(documents=documents, show_opinion_mining=True))[0] for sentence in document.sentences: for mined_opinion in sentence.mined_opinions: target = mined_opinion.target - assert 'design' == target.text - assert 'positive' == target.sentiment + assert "design" == target.text + assert "positive" == target.sentiment assert 0.0 == target.confidence_scores.neutral self.validateConfidenceScores(target.confidence_scores) assert 32 == target.offset sleek_opinion = mined_opinion.assessments[0] - assert 'sleek' == sleek_opinion.text - assert 'positive' == sleek_opinion.sentiment + assert "sleek" == sleek_opinion.text + assert "positive" == sleek_opinion.sentiment assert 0.0 == sleek_opinion.confidence_scores.neutral self.validateConfidenceScores(sleek_opinion.confidence_scores) assert 9 == sleek_opinion.offset @@ -683,8 +707,8 @@ async def test_opinion_mining(self, client): # assert not premium_opinion.is_negated beautiful_opinion = mined_opinion.assessments[1] - assert 'beautiful' == beautiful_opinion.text - assert 'positive' == beautiful_opinion.sentiment + assert "beautiful" == beautiful_opinion.text + assert "positive" == beautiful_opinion.sentiment assert 1.0 == beautiful_opinion.confidence_scores.positive self.validateConfidenceScores(beautiful_opinion.confidence_scores) assert 53 == beautiful_opinion.offset @@ -694,9 +718,7 @@ async def test_opinion_mining(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_opinion_mining_with_negated_opinion(self, client): - documents = [ - "The food and service is not good" - ] + documents = ["The food and service is not good"] document = (await client.analyze_sentiment(documents=documents, show_opinion_mining=True))[0] @@ -704,13 +726,13 @@ async def test_opinion_mining_with_negated_opinion(self, client): food_target = sentence.mined_opinions[0].target service_target = sentence.mined_opinions[1].target - assert 'food' == food_target.text - assert 'negative' == food_target.sentiment + assert "food" == food_target.text + assert "negative" == food_target.sentiment assert 0.0 == food_target.confidence_scores.neutral self.validateConfidenceScores(food_target.confidence_scores) assert 4 == food_target.offset - assert 'service' == service_target.text + assert "service" == service_target.text # assert 'negative' == service_target.sentiment FIXME https://msazure.visualstudio.com/Cognitive%20Services/_workitems/edit/13848227 assert 0.0 == service_target.confidence_scores.neutral self.validateConfidenceScores(service_target.confidence_scores) @@ -720,8 +742,8 @@ async def test_opinion_mining_with_negated_opinion(self, client): service_opinion = sentence.mined_opinions[1].assessments[0] self.assertOpinionsEqual(food_opinion, service_opinion) - assert 'good' == food_opinion.text - assert 'negative' == food_opinion.sentiment + assert "good" == food_opinion.text + assert "negative" == food_opinion.sentiment assert 0.0 == food_opinion.confidence_scores.neutral self.validateConfidenceScores(food_opinion.confidence_scores) assert 28 == food_opinion.offset @@ -738,7 +760,7 @@ async def test_opinion_mining_more_than_5_documents(self, client): "Loved this hotel - good breakfast - nice shuttle service - clean rooms.", "I had a great unobstructed view of the Microsoft campus.", "Nice rooms but bathrooms were old and the toilet was dirty when we arrived.", - "The toilet smelled." + "The toilet smelled.", ] analyzed_documents = await client.analyze_sentiment(documents, show_opinion_mining=True) @@ -803,22 +825,16 @@ async def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = await client.analyze_sentiment( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.analyze_sentiment(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy_async async def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = await client.analyze_sentiment( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.analyze_sentiment(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -828,9 +844,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = await client.analyze_sentiment( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -838,12 +852,10 @@ def callback(response): @recorded_by_proxy_async async def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = await client.analyze_sentiment( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -851,7 +863,8 @@ def callback(response): @recorded_by_proxy_async async def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + await client.analyze_sentiment( documents=["Test for logging disable"], disable_service_logs=True, @@ -863,7 +876,8 @@ def callback(resp): @recorded_by_proxy_async async def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + await client.analyze_sentiment( documents=["Test for logging disable"], disable_service_logs=True, @@ -877,19 +891,33 @@ async def test_sentiment_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = await client.analyze_sentiment(["I'm tired"], string_index_type="UnicodeCodePoint") - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = await client.analyze_sentiment(["I'm tired"], show_opinion_mining=True) - assert str(e.value) == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = await client.analyze_sentiment(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: - res = await client.analyze_sentiment(["I'm tired"], show_opinion_mining=True, disable_service_logs=True, string_index_type="UnicodeCodePoint") - assert str(e.value) == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + res = await client.analyze_sentiment( + ["I'm tired"], show_opinion_mining=True, disable_service_logs=True, string_index_type="UnicodeCodePoint" + ) + assert ( + str(e.value) + == "'show_opinion_mining' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) @TextAnalyticsPreparer() async def test_mock_quota_exceeded(self, **kwargs): @@ -897,19 +925,27 @@ async def test_mock_quota_exceeded(self, **kwargs): textanalytics_test_api_key = kwargs.pop("textanalytics_test_api_key") response = mock.Mock( - status_code=403, - headers={"Retry-After": 186688, "Content-Type": "application/json"}, - reason="Bad Request" + status_code=403, headers={"Retry-After": 186688, "Content-Type": "application/json"}, reason="Bad Request" ) response.text = lambda encoding=None: json.dumps( - {"error": {"code": "403", "message": "Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier."}} + { + "error": { + "code": "403", + "message": "Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier.", + } + } ) response.content_type = "application/json" transport = AsyncMockTransport(send=wrap_in_future(lambda request, **kwargs: response)) - client = TextAnalyticsClient(textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport) + client = TextAnalyticsClient( + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport + ) with pytest.raises(HttpResponseError) as e: result = await client.analyze_sentiment(["I'm tired"]) assert e.value.status_code == 403 - assert e.value.error.message == 'Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier.' + assert ( + e.value.error.message + == "Out of call volume quota for TextAnalytics F0 pricing tier. Please retry after 15 days. To increase your call volume switch to a paid tier." + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth.py index de10396bd5d9..17f00dc25cff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth.py @@ -17,14 +17,16 @@ class TestAuth(TextAnalyticsTest): def test_active_directory_auth(self, **kwargs): textanalytics_test_endpoint = kwargs.pop("textanalytics_test_endpoint") token = self.get_credential(TextAnalyticsClient) - text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX",".cognitiveservices.azure.com") + text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX", ".cognitiveservices.azure.com") credential_scopes = ["https://{}/.default".format(text_analytics_endpoint_suffix[1:])] text_analytics = TextAnalyticsClient(textanalytics_test_endpoint, token, credential_scopes=credential_scopes) - docs = [{"id": "1", "text": "I should take my cat to the veterinarian."}, - {"id": "2", "text": "Este es un document escrito en Español."}, - {"id": "3", "text": "猫は幸せ"}, - {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}] + docs = [ + {"id": "1", "text": "I should take my cat to the veterinarian."}, + {"id": "2", "text": "Este es un document escrito en Español."}, + {"id": "3", "text": "猫は幸せ"}, + {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}, + ] response = text_analytics.detect_language(docs) @@ -33,7 +35,7 @@ def test_active_directory_auth(self, **kwargs): def test_analyze_active_directory_auth(self, **kwargs): textanalytics_test_endpoint = kwargs.pop("textanalytics_test_endpoint") token = self.get_credential(TextAnalyticsClient) - text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX",".cognitiveservices.azure.com") + text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX", ".cognitiveservices.azure.com") credential_scopes = ["https://{}/.default".format(text_analytics_endpoint_suffix[1:])] text_analytics = TextAnalyticsClient(textanalytics_test_endpoint, token, credential_scopes=credential_scopes) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth_async.py index cac3fbe4db96..a31dc46f5bb1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_auth_async.py @@ -19,14 +19,16 @@ class TestAuth(TextAnalyticsTest): async def test_active_directory_auth(self, **kwargs): textanalytics_test_endpoint = kwargs.pop("textanalytics_test_endpoint") token = self.get_credential(TextAnalyticsClient, is_async=True) - text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX",".cognitiveservices.azure.com") + text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX", ".cognitiveservices.azure.com") credential_scopes = ["https://{}/.default".format(text_analytics_endpoint_suffix[1:])] text_analytics = TextAnalyticsClient(textanalytics_test_endpoint, token, credential_scopes=credential_scopes) - docs = [{"id": "1", "text": "I should take my cat to the veterinarian."}, - {"id": "2", "text": "Este es un document escrito en Español."}, - {"id": "3", "text": "猫は幸せ"}, - {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}] + docs = [ + {"id": "1", "text": "I should take my cat to the veterinarian."}, + {"id": "2", "text": "Este es un document escrito en Español."}, + {"id": "3", "text": "猫は幸せ"}, + {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}, + ] response = await text_analytics.detect_language(docs) @@ -35,7 +37,7 @@ async def test_active_directory_auth(self, **kwargs): async def test_analyze_active_directory_auth(self, **kwargs): textanalytics_test_endpoint = kwargs.pop("textanalytics_test_endpoint") token = self.get_credential(TextAnalyticsClient, is_async=True) - text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX",".cognitiveservices.azure.com") + text_analytics_endpoint_suffix = os.environ.get("TEXTANALYTICS_ENDPOINT_SUFFIX", ".cognitiveservices.azure.com") credential_scopes = ["https://{}/.default".format(text_analytics_endpoint_suffix[1:])] text_analytics = TextAnalyticsClient(textanalytics_test_endpoint, token, credential_scopes=credential_scopes) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager.py index e4f413d848a4..9b02bb468280 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager.py @@ -8,6 +8,7 @@ from testcase import TextAnalyticsTest, TextAnalyticsPreparer from azure.ai.textanalytics import TextAnalyticsClient + class TestContextManager(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -16,9 +17,7 @@ def test_close(self, **kwargs): textanalytics_test_api_key = kwargs.pop("textanalytics_test_api_key") transport = mock.MagicMock() client = TextAnalyticsClient( - textanalytics_test_endpoint, - AzureKeyCredential(textanalytics_test_api_key), - transport=transport + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport ) client.close() assert transport.__enter__.call_count == 0 @@ -30,12 +29,10 @@ def test_context_manager(self, **kwargs): textanalytics_test_api_key = kwargs.pop("textanalytics_test_api_key") transport = mock.MagicMock() client = TextAnalyticsClient( - textanalytics_test_endpoint, - AzureKeyCredential(textanalytics_test_api_key), - transport=transport + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport ) with client: assert transport.__enter__.call_count == 1 assert transport.__enter__.call_count == 1 - assert transport.__exit__.call_count == 1 \ No newline at end of file + assert transport.__exit__.call_count == 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager_async.py index 6fbc5c2c58e5..a3d94dabd0ca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_context_manager_async.py @@ -12,11 +12,13 @@ from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics.aio import TextAnalyticsClient + def get_completed_future(result=None): future = asyncio.Future() future.set_result(result) return future + class AsyncMockTransport(mock.MagicMock): """Mock with do-nothing aenter/exit for mocking async transport. This is unnecessary on 3.8+, where MagicMocks implement aenter/exit. @@ -29,6 +31,7 @@ def __init__(self, *args, **kwargs): self.__aenter__ = mock.Mock(return_value=get_completed_future()) self.__aexit__ = mock.Mock(return_value=get_completed_future()) + class TestContextManager(TextAnalyticsTest): @TextAnalyticsPreparer() async def test_close(self, **kwargs): @@ -36,9 +39,7 @@ async def test_close(self, **kwargs): textanalytics_test_api_key = kwargs.pop("textanalytics_test_api_key") transport = AsyncMockTransport() client = TextAnalyticsClient( - textanalytics_test_endpoint, - AzureKeyCredential(textanalytics_test_api_key), - transport=transport + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport ) await client.close() @@ -51,12 +52,10 @@ async def test_context_manager(self, **kwargs): textanalytics_test_api_key = kwargs.pop("textanalytics_test_api_key") transport = AsyncMockTransport() client = TextAnalyticsClient( - textanalytics_test_endpoint, - AzureKeyCredential(textanalytics_test_api_key), - transport=transport + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), transport=transport ) async with client: assert transport.__aenter__.call_count == 1 assert transport.__aenter__.call_count == 1 - assert transport.__aexit__.call_count == 1 \ No newline at end of file + assert transport.__aexit__.call_count == 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text.py index 45e73504c50e..676d4b33beaa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text.py @@ -10,10 +10,7 @@ from testcase import TextAnalyticsTest, TextAnalyticsPreparer, is_public_cloud from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer from devtools_testutils import recorded_by_proxy, set_bodiless_matcher -from azure.ai.textanalytics import ( - TextAnalyticsClient, - TextAnalysisLROPoller -) +from azure.ai.textanalytics import TextAnalyticsClient, TextAnalysisLROPoller # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) @@ -36,19 +33,26 @@ class TestCustomText(TextAnalyticsTest): def _interval(self): return 5 if self.is_live else 0 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_poller_metadata( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) - docs = [{"id": "56", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}] + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) + docs = [ + { + "id": "56", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + } + ] poller = client.begin_recognize_custom_entities( docs, @@ -64,25 +68,39 @@ def test_poller_metadata( assert isinstance(poller.details["created_on"], datetime.datetime) assert isinstance(poller.details["expires_on"], datetime.datetime) assert isinstance(poller.details["last_modified_on"], datetime.datetime) - assert poller.details["display_name"] == 'testing' + assert poller.details["display_name"] == "testing" assert poller.details["id"] - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_recognize_custom_entities( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] poller = client.begin_recognize_custom_entities( @@ -108,22 +126,36 @@ def test_recognize_custom_entities( assert entity.length is not None assert entity.confidence_score is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_recognize_custom_entities_continuation_token( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] initial_poller = client.begin_recognize_custom_entities( @@ -135,9 +167,7 @@ def test_recognize_custom_entities_continuation_token( ) continuation_token = initial_poller.continuation_token() - poller = client.begin_recognize_custom_entities( - None, None, None, continuation_token=continuation_token - ) + poller = client.begin_recognize_custom_entities(None, None, None, continuation_token=continuation_token) assert isinstance(poller, TextAnalysisLROPoller) document_results = list(poller.result()) @@ -154,22 +184,36 @@ def test_recognize_custom_entities_continuation_token( assert entity.length is not None assert entity.confidence_score is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_single_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] document_results = client.begin_single_label_classify( @@ -189,22 +233,36 @@ def test_single_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_single_label_classify_cont_token( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] initial_poller = client.begin_single_label_classify( @@ -216,9 +274,7 @@ def test_single_label_classify_cont_token( ) continuation_token = initial_poller.continuation_token() - poller = client.begin_single_label_classify( - None, None, None, continuation_token=continuation_token - ) + poller = client.begin_single_label_classify(None, None, None, continuation_token=continuation_token) assert isinstance(poller, TextAnalysisLROPoller) document_results = list(poller.result()) @@ -232,22 +288,36 @@ def test_single_label_classify_cont_token( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_multi_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] document_results = client.begin_multi_label_classify( @@ -267,26 +337,36 @@ def test_multi_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy def test_multi_label_classify_cont_token( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, - AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", - "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", - "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", - "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] initial_poller = client.begin_multi_label_classify( @@ -298,9 +378,7 @@ def test_multi_label_classify_cont_token( ) continuation_token = initial_poller.continuation_token() - poller = client.begin_multi_label_classify( - None, None, None, continuation_token=continuation_token - ) + poller = client.begin_multi_label_classify(None, None, None, continuation_token=continuation_token) assert isinstance(poller, TextAnalysisLROPoller) document_results = list(poller.result()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text_async.py index 6c724d9053b7..bba0c8de15fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_custom_text_async.py @@ -35,19 +35,26 @@ class TestCustomTextAsync(TextAnalyticsTest): def _interval(self): return 5 if self.is_live else 0 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_poller_metadata( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) - docs = [{"id": "56", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}] + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) + docs = [ + { + "id": "56", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + } + ] async with client: poller = await client.begin_recognize_custom_entities( @@ -64,25 +71,39 @@ async def test_poller_metadata( assert isinstance(poller.details["created_on"], datetime.datetime) assert isinstance(poller.details["expires_on"], datetime.datetime) assert isinstance(poller.details["last_modified_on"], datetime.datetime) - assert poller.details["display_name"] == 'testing' + assert poller.details["display_name"] == "testing" assert poller.details["id"] - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_recognize_custom_entities( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: poller = await client.begin_recognize_custom_entities( @@ -108,22 +129,36 @@ async def test_recognize_custom_entities( assert entity.length is not None assert entity.confidence_score is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_recognize_custom_entities_continuation_token( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_custom_entities_project_name, - textanalytics_custom_entities_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: initial_poller = await client.begin_recognize_custom_entities( @@ -154,31 +189,47 @@ async def test_recognize_custom_entities_continuation_token( assert entity.length is not None assert entity.confidence_score is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_single_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: - document_results = await (await client.begin_single_label_classify( - docs, - project_name=textanalytics_single_label_classify_project_name, - deployment_name=textanalytics_single_label_classify_deployment_name, - show_stats=True, - polling_interval=self._interval(), - )).result() + document_results = await ( + await client.begin_single_label_classify( + docs, + project_name=textanalytics_single_label_classify_project_name, + deployment_name=textanalytics_single_label_classify_deployment_name, + show_stats=True, + polling_interval=self._interval(), + ) + ).result() async for result in document_results: assert result.id @@ -189,22 +240,36 @@ async def test_single_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_single_label_classify_cont_token( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_single_label_classify_project_name, - textanalytics_single_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_label_classify_project_name, + textanalytics_single_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: initial_poller = await client.begin_single_label_classify( @@ -216,9 +281,7 @@ async def test_single_label_classify_cont_token( ) continuation_token = initial_poller.continuation_token() - poller = await client.begin_single_label_classify( - None, None, None, continuation_token=continuation_token - ) + poller = await client.begin_single_label_classify(None, None, None, continuation_token=continuation_token) assert isinstance(poller, AsyncTextAnalysisLROPoller) document_results = await poller.result() @@ -232,32 +295,47 @@ async def test_single_label_classify_cont_token( assert classification.category assert classification.confidence_score - - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_multi_label_classify( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: - document_results = await (await client.begin_multi_label_classify( - docs, - project_name=textanalytics_multi_label_classify_project_name, - deployment_name=textanalytics_multi_label_classify_deployment_name, - show_stats=True, - polling_interval=self._interval(), - )).result() + document_results = await ( + await client.begin_multi_label_classify( + docs, + project_name=textanalytics_multi_label_classify_project_name, + deployment_name=textanalytics_multi_label_classify_deployment_name, + show_stats=True, + polling_interval=self._interval(), + ) + ).result() async for result in document_results: assert result.id @@ -268,26 +346,36 @@ async def test_multi_label_classify( assert classification.category assert classification.confidence_score - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsCustomPreparer() @recorded_by_proxy_async async def test_multi_label_classify_cont_token( - self, - textanalytics_custom_text_endpoint, - textanalytics_custom_text_key, - textanalytics_multi_label_classify_project_name, - textanalytics_multi_label_classify_deployment_name + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_label_classify_project_name, + textanalytics_multi_label_classify_deployment_name, ): set_bodiless_matcher() # don't match on body for this test since we scrub the proj/deployment values - client = TextAnalyticsClient(textanalytics_custom_text_endpoint, - AzureKeyCredential(textanalytics_custom_text_key)) + client = TextAnalyticsClient( + textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key) + ) docs = [ - {"id": "1", "language": "en", - "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, - {"id": "2", "language": "en", - "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, - {"id": "3", "language": "en", - "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + { + "id": "1", + "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities.", + }, + { + "id": "2", + "language": "en", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + }, + { + "id": "3", + "language": "en", + "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist", + }, ] async with client: initial_poller = await client.begin_multi_label_classify( @@ -299,9 +387,7 @@ async def test_multi_label_classify_cont_token( ) continuation_token = initial_poller.continuation_token() - poller = await client.begin_multi_label_classify( - None, None, None, continuation_token=continuation_token - ) + poller = await client.begin_multi_label_classify(None, None, None, continuation_token=continuation_token) assert isinstance(poller, AsyncTextAnalysisLROPoller) document_results = await poller.result() diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py index 0c65c29f9f64..c4a4bbba4937 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language.py @@ -23,6 +23,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestDetectLanguage(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -37,10 +38,12 @@ def test_no_single_input(self, client): @recorded_by_proxy def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "text": "I should take my cat to the veterinarian."}, - {"id": "2", "text": "Este es un document escrito en Español."}, - {"id": "3", "text": "猫は幸せ"}, - {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}] + docs = [ + {"id": "1", "text": "I should take my cat to the veterinarian."}, + {"id": "2", "text": "Este es un document escrito en Español."}, + {"id": "3", "text": "猫は幸せ"}, + {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}, + ] response = client.detect_language(docs, show_stats=True) @@ -66,7 +69,7 @@ def test_all_successful_passing_text_document_input(self, client): DetectLanguageInput(id="1", text="I should take my cat to the veterinarian"), DetectLanguageInput(id="2", text="Este es un document escrito en Español."), DetectLanguageInput(id="3", text="猫は幸せ"), - DetectLanguageInput(id="4", text="Fahrt nach Stuttgart und dann zum Hotel zu Fu.") + DetectLanguageInput(id="4", text="Fahrt nach Stuttgart und dann zum Hotel zu Fu."), ] response = client.detect_language(docs) @@ -92,7 +95,7 @@ def test_passing_only_string(self, client): "Este es un document escrito en Español.", "猫は幸せ", "Fahrt nach Stuttgart und dann zum Hotel zu Fu.", - "" + "", ] response = client.detect_language(docs) @@ -106,10 +109,12 @@ def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "country_hint": "United States", "text": "I should take my cat to the veterinarian."}, - {"id": "2", "text": "Este es un document escrito en Español."}, - {"id": "3", "text": ""}, - {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}] + docs = [ + {"id": "1", "country_hint": "United States", "text": "I should take my cat to the veterinarian."}, + {"id": "2", "text": "Este es un document escrito en Español."}, + {"id": "3", "text": ""}, + {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}, + ] response = client.detect_language(docs) @@ -126,10 +131,7 @@ def test_input_with_all_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "text": ""}, - {"id": "3", "text": ""}, - {"id": "4", "text": text}] + docs = [{"id": "1", "text": ""}, {"id": "2", "text": ""}, {"id": "3", "text": ""}, {"id": "4", "text": text}] response = client.detect_language(docs) @@ -145,7 +147,7 @@ def test_output_same_order_as_input(self, client): DetectLanguageInput(id="2", text="two"), DetectLanguageInput(id="3", text="three"), DetectLanguageInput(id="4", text="four"), - DetectLanguageInput(id="5", text="five") + DetectLanguageInput(id="5", text="five"), ] response = client.detect_language(docs) @@ -158,18 +160,14 @@ def test_output_same_order_as_input(self, client): @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = client.detect_language( - ["This is written in English."] - ) + response = client.detect_language(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = client.detect_language( - ["This is written in English."] - ) + response = client.detect_language(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -187,7 +185,7 @@ def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, DetectLanguageInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = client.detect_language(docs) @@ -196,11 +194,13 @@ def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.detect_language(docs) in_order = ["56", "0", "22", "19", "1"] @@ -220,18 +220,15 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] - response = client.detect_language( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback - ) + response = client.detect_language(docs, show_stats=True, model_version="latest", raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -246,14 +243,14 @@ def test_batch_size_over_limit(self, client): @recorded_by_proxy def test_whole_batch_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.detect_language(docs, country_hint="CA", raw_response_hook=callback) @@ -263,14 +260,14 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_dont_use_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"\"" + country_str = '"countryHint": ""' country = resp.http_request.body.count(country_str) assert country == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.detect_language(docs, country_hint="", raw_response_hook=callback) @@ -280,17 +277,18 @@ def callback(resp): @recorded_by_proxy def test_per_item_dont_use_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"\"" + country_str = '"countryHint": ""' country = resp.http_request.body.count(country_str) assert country == 2 - country_str = "\"countryHint\": \"US\"" + country_str = '"countryHint": "US"' country = resp.http_request.body.count(country_str) assert country == 1 - - docs = [{"id": "1", "country_hint": "", "text": "I will go to the park."}, - {"id": "2", "country_hint": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "country_hint": "", "text": "I will go to the park."}, + {"id": "2", "country_hint": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.detect_language(docs, raw_response_hook=callback) @@ -299,7 +297,7 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_country_hint_and_obj_input(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 @@ -316,13 +314,15 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_country_hint_and_dict_input(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.detect_language(docs, country_hint="CA", raw_response_hook=callback) @@ -331,10 +331,10 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_country_hint_and_obj_per_item_hints(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 2 - country_str = "\"countryHint\": \"US\"" + country_str = '"countryHint": "US"' country = resp.http_request.body.count(country_str) assert country == 1 @@ -351,16 +351,18 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_country_hint_and_dict_per_item_hints(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 1 - country_str = "\"countryHint\": \"US\"" + country_str = '"countryHint": "US"' country = resp.http_request.body.count(country_str) assert country == 2 - docs = [{"id": "1", "country_hint": "US", "text": "I will go to the park."}, - {"id": "2", "country_hint": "US", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "country_hint": "US", "text": "I will go to the park."}, + {"id": "2", "country_hint": "US", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.detect_language(docs, country_hint="CA", raw_response_hook=callback) @@ -369,18 +371,20 @@ def callback(resp): @recorded_by_proxy def test_client_passed_default_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 def callback_2(resp): - country_str = "\"countryHint\": \"DE\"" + country_str = '"countryHint": "DE"' country = resp.http_request.body.count(country_str) assert country == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.detect_language(docs, raw_response_hook=callback) response = client.detect_language(docs, country_hint="DE", raw_response_hook=callback_2) @@ -392,9 +396,11 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.detect_language(docs) assert response is not None @@ -412,13 +418,18 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic @recorded_by_proxy def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.detect_language(docs, raw_response_hook=callback) @@ -438,10 +449,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: primary_language = response[0].primary_language except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'primary_language\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'primary_language'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -454,7 +466,9 @@ def test_document_attribute_error_nonexistent_attribute(self, client): try: primary_language = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -476,8 +490,7 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "text": text}] + docs = [{"id": "1", "text": ""}, {"id": "2", "text": text}] doc_errors = client.detect_language(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -530,8 +543,7 @@ def test_passing_none_docs(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.detect_language(docs) except HttpResponseError as err: @@ -580,7 +592,7 @@ def test_country_hint_none(self, textanalytics_test_endpoint, textanalytics_test documents2 = [DetectLanguageInput(id="1", country_hint="none", text="This is written in English.")] def callback(response): - country_str = "\"countryHint\": \"\"" + country_str = '"countryHint": ""' country = response.http_request.body.count(country_str) assert country == 1 @@ -589,9 +601,13 @@ def callback(response): # test DetectLanguageInput result2 = client.detect_language(documents2, raw_response_hook=callback) # test per-operation - result3 = client.detect_language(documents=["this is written in english"], country_hint="none", raw_response_hook=callback) + result3 = client.detect_language( + documents=["this is written in english"], country_hint="none", raw_response_hook=callback + ) # test client default - new_client = TextAnalyticsClient(textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), default_country_hint="none") + new_client = TextAnalyticsClient( + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), default_country_hint="none" + ) result4 = new_client.detect_language(documents=["this is written in english"], raw_response_hook=callback) @TextAnalyticsPreparer() @@ -600,7 +616,7 @@ def callback(response): def test_country_hint_kwarg(self, client): def callback(response): - country_str = "\"countryHint\": \"ES\"" + country_str = '"countryHint": "ES"' assert response.http_request.body.count(country_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -610,7 +626,7 @@ def callback(response): model_version="latest", show_stats=True, country_hint="ES", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -619,10 +635,8 @@ def callback(response): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = client.detect_language( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = client.detect_language(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -638,7 +652,8 @@ def test_string_index_type_not_fail_v3(self, client): @recorded_by_proxy def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.detect_language( documents=["Test for logging disable"], disable_service_logs=True, @@ -651,7 +666,9 @@ def callback(resp): def test_disable_service_logs_body_param(self, client): def callback(resp): import json - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + client.detect_language( documents=["Test for logging disable"], disable_service_logs=True, @@ -665,5 +682,7 @@ async def test_language_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = await client.detect_language(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" - + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py index c75332c95d2b..0b84d2822d82 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py @@ -39,10 +39,12 @@ async def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "text": "I should take my cat to the veterinarian."}, - {"id": "2", "text": "Este es un document escrito en Español."}, - {"id": "3", "text": "猫は幸せ"}, - {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}] + docs = [ + {"id": "1", "text": "I should take my cat to the veterinarian."}, + {"id": "2", "text": "Este es un document escrito en Español."}, + {"id": "3", "text": "猫は幸せ"}, + {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}, + ] response = await client.detect_language(docs, show_stats=True) @@ -68,7 +70,7 @@ async def test_all_successful_passing_text_document_input(self, client): DetectLanguageInput(id="1", text="I should take my cat to the veterinarian"), DetectLanguageInput(id="2", text="Este es un document escrito en Español."), DetectLanguageInput(id="3", text="猫は幸せ"), - DetectLanguageInput(id="4", text="Fahrt nach Stuttgart und dann zum Hotel zu Fu.") + DetectLanguageInput(id="4", text="Fahrt nach Stuttgart und dann zum Hotel zu Fu."), ] response = await client.detect_language(docs) @@ -94,7 +96,7 @@ async def test_passing_only_string(self, client): "Este es un document escrito en Español.", "猫は幸せ", "Fahrt nach Stuttgart und dann zum Hotel zu Fu.", - "" + "", ] response = await client.detect_language(docs) @@ -108,10 +110,12 @@ async def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "country_hint": "United States", "text": "I should take my cat to the veterinarian."}, - {"id": "2", "text": "Este es un document escrito en Español."}, - {"id": "3", "text": ""}, - {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}] + docs = [ + {"id": "1", "country_hint": "United States", "text": "I should take my cat to the veterinarian."}, + {"id": "2", "text": "Este es un document escrito en Español."}, + {"id": "3", "text": ""}, + {"id": "4", "text": "Fahrt nach Stuttgart und dann zum Hotel zu Fu."}, + ] response = await client.detect_language(docs) @@ -128,10 +132,7 @@ async def test_input_with_all_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "text": ""}, - {"id": "3", "text": ""}, - {"id": "4", "text": text}] + docs = [{"id": "1", "text": ""}, {"id": "2", "text": ""}, {"id": "3", "text": ""}, {"id": "4", "text": text}] response = await client.detect_language(docs) @@ -147,7 +148,7 @@ async def test_output_same_order_as_input(self, client): DetectLanguageInput(id="2", text="two"), DetectLanguageInput(id="3", text="three"), DetectLanguageInput(id="4", text="four"), - DetectLanguageInput(id="5", text="five") + DetectLanguageInput(id="5", text="five"), ] response = await client.detect_language(docs) @@ -160,18 +161,14 @@ async def test_output_same_order_as_input(self, client): @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.detect_language( - ["This is written in English."] - ) + response = await client.detect_language(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.detect_language( - ["This is written in English."] - ) + response = await client.detect_language(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -189,7 +186,7 @@ async def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, DetectLanguageInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above documents" + "You cannot mix string input with the above documents", ] with pytest.raises(TypeError): response = await client.detect_language(docs) @@ -198,11 +195,13 @@ async def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.detect_language(docs) in_order = ["56", "0", "22", "19", "1"] @@ -222,17 +221,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.detect_language( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -248,14 +246,14 @@ async def test_batch_size_over_limit(self, client): @recorded_by_proxy_async async def test_whole_batch_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.detect_language(docs, country_hint="CA", raw_response_hook=callback) @@ -265,14 +263,14 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_dont_use_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"\"" + country_str = '"countryHint": ""' country = resp.http_request.body.count(country_str) assert country == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.detect_language(docs, country_hint="", raw_response_hook=callback) @@ -282,17 +280,18 @@ def callback(resp): @recorded_by_proxy_async async def test_per_item_dont_use_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"\"" + country_str = '"countryHint": ""' country = resp.http_request.body.count(country_str) assert country == 2 - country_str = "\"countryHint\": \"US\"" + country_str = '"countryHint": "US"' country = resp.http_request.body.count(country_str) assert country == 1 - - docs = [{"id": "1", "country_hint": "", "text": "I will go to the park."}, - {"id": "2", "country_hint": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "country_hint": "", "text": "I will go to the park."}, + {"id": "2", "country_hint": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.detect_language(docs, raw_response_hook=callback) @@ -301,7 +300,7 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_country_hint_and_obj_input(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 @@ -318,13 +317,15 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_country_hint_and_dict_input(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.detect_language(docs, country_hint="CA", raw_response_hook=callback) @@ -333,10 +334,10 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_country_hint_and_obj_per_item_hints(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 2 - country_str = "\"countryHint\": \"US\"" + country_str = '"countryHint": "US"' country = resp.http_request.body.count(country_str) assert country == 1 @@ -353,16 +354,18 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_country_hint_and_dict_per_item_hints(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 1 - country_str = "\"countryHint\": \"US\"" + country_str = '"countryHint": "US"' country = resp.http_request.body.count(country_str) assert country == 2 - docs = [{"id": "1", "country_hint": "US", "text": "I will go to the park."}, - {"id": "2", "country_hint": "US", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "country_hint": "US", "text": "I will go to the park."}, + {"id": "2", "country_hint": "US", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.detect_language(docs, country_hint="CA", raw_response_hook=callback) @@ -371,18 +374,20 @@ def callback(resp): @recorded_by_proxy_async async def test_client_passed_default_country_hint(self, client): def callback(resp): - country_str = "\"countryHint\": \"CA\"" + country_str = '"countryHint": "CA"' country = resp.http_request.body.count(country_str) assert country == 3 def callback_2(resp): - country_str = "\"countryHint\": \"DE\"" + country_str = '"countryHint": "DE"' country = resp.http_request.body.count(country_str) assert country == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.detect_language(docs, raw_response_hook=callback) response = await client.detect_language(docs, country_hint="DE", raw_response_hook=callback_2) @@ -394,9 +399,11 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.detect_language(docs) assert response is not None @@ -414,12 +421,18 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan @recorded_by_proxy_async async def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.detect_language(docs, raw_response_hook=callback) @@ -439,10 +452,11 @@ async def test_document_attribute_error_no_result_attribute(self, client): try: primary_language = response[0].primary_language except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'primary_language\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'primary_language'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -455,7 +469,9 @@ async def test_document_attribute_error_nonexistent_attribute(self, client): try: primary_language = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -477,8 +493,7 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "text": text}] + docs = [{"id": "1", "text": ""}, {"id": "2", "text": text}] doc_errors = await client.detect_language(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -531,8 +546,7 @@ async def test_passing_none_docs(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = await client.detect_language(docs) except HttpResponseError as err: @@ -582,7 +596,7 @@ async def test_country_hint_none(self, textanalytics_test_endpoint, textanalytic documents2 = [DetectLanguageInput(id="1", country_hint="none", text="This is written in English.")] def callback(response): - country_str = "\"countryHint\": \"\"" + country_str = '"countryHint": ""' country = response.http_request.body.count(country_str) assert country == 1 @@ -591,9 +605,13 @@ def callback(response): # test DetectLanguageInput result2 = await client.detect_language(documents2, raw_response_hook=callback) # test per-operation - result3 = await client.detect_language(documents=["this is written in english"], country_hint="none", raw_response_hook=callback) + result3 = await client.detect_language( + documents=["this is written in english"], country_hint="none", raw_response_hook=callback + ) # test client default - new_client = TextAnalyticsClient(textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), default_country_hint="none") + new_client = TextAnalyticsClient( + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), default_country_hint="none" + ) result4 = await new_client.detect_language(documents=["this is written in english"], raw_response_hook=callback) @TextAnalyticsPreparer() @@ -601,7 +619,7 @@ def callback(response): @recorded_by_proxy_async async def test_country_hint_kwarg(self, client): def callback(response): - country_str = "\"countryHint\": \"ES\"" + country_str = '"countryHint": "ES"' assert response.http_request.body.count(country_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -611,7 +629,7 @@ def callback(response): model_version="latest", show_stats=True, country_hint="ES", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -619,11 +637,11 @@ def callback(response): async def test_pass_cls(self, textanalytics_test_endpoint, textanalytics_test_api_key): def callback(pipeline_response, deserialized, _): return "cls result" - text_analytics = TextAnalyticsClient(textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key)) - res = await text_analytics.detect_language( - documents=["Test passing cls to endpoint"], - cls=callback + + text_analytics = TextAnalyticsClient( + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key) ) + res = await text_analytics.detect_language(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -639,7 +657,8 @@ async def test_string_index_type_not_fail_v3(self, client): @recorded_by_proxy_async async def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + await client.detect_language( documents=["Test for logging disable"], disable_service_logs=True, @@ -652,7 +671,9 @@ def callback(resp): async def test_disable_service_logs_body_param(self, client): def callback(resp): import json - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + await client.detect_language( documents=["Test for logging disable"], disable_service_logs=True, @@ -666,4 +687,7 @@ async def test_language_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = await client.detect_language(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py index a4340168ff5a..4c93f33f0490 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py @@ -18,6 +18,7 @@ # the first one TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestEncoding(TextAnalyticsTest): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -53,6 +54,7 @@ def test_emoji_family_with_skin_tone_modifier(self, client): def test_diacritics_nfc(self, client): result = client.recognize_pii_entities(["año SSN: 859-98-0987"]) assert result[0].entities[0].offset == 9 + @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy @@ -78,7 +80,10 @@ def test_korean_nfd(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_zalgo_text(self, client): - result = client.recognize_pii_entities(["ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: 859-98-0987"]) - + result = client.recognize_pii_entities( + [ + "ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: 859-98-0987" + ] + ) assert result[0].entities[0].offset == 121 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py index bb1bc47edf10..f0d529865561 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding_async.py @@ -19,6 +19,7 @@ # the first one TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestEncoding(TextAnalyticsTest): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -80,7 +81,10 @@ async def test_korean_nfd(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_zalgo_text(self, client): - result = await client.recognize_pii_entities(["ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: 859-98-0987"]) - + result = await client.recognize_pii_entities( + [ + "ơ̵̧̧̢̳̘̘͕͔͕̭̟̙͎͈̞͔̈̇̒̃͋̇̅͛̋͛̎́͑̄̐̂̎͗͝m̵͍͉̗̄̏͌̂̑̽̕͝͠g̵̢̡̢̡̨̡̧̛͉̞̯̠̤̣͕̟̫̫̼̰͓̦͖̣̣͎̋͒̈́̓̒̈̍̌̓̅͑̒̓̅̅͒̿̏́͗̀̇͛̏̀̈́̀̊̾̀̔͜͠͝ͅ SSN: 859-98-0987" + ] + ) assert result[0].entities[0].offset == 121 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py index 253cfc0fbeda..773b954e902f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py @@ -36,14 +36,16 @@ def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.extract_key_phrases(docs, show_stats=True) for phrases in response: - assert "Paul Allen" in phrases.key_phrases - assert "Bill Gates" in phrases.key_phrases - assert "Microsoft" in phrases.key_phrases + assert "Paul Allen" in phrases.key_phrases + assert "Bill Gates" in phrases.key_phrases + assert "Microsoft" in phrases.key_phrases assert phrases.id is not None assert phrases.statistics is not None @@ -53,14 +55,14 @@ def test_all_successful_passing_dict(self, client): def test_all_successful_passing_text_document_input(self, client): docs = [ TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen", language="en"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen", language="es") + TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen", language="es"), ] response = client.extract_key_phrases(docs) for phrases in response: - assert "Paul Allen" in phrases.key_phrases - assert "Bill Gates" in phrases.key_phrases - assert "Microsoft" in phrases.key_phrases + assert "Paul Allen" in phrases.key_phrases + assert "Bill Gates" in phrases.key_phrases + assert "Microsoft" in phrases.key_phrases assert phrases.id is not None @TextAnalyticsPreparer() @@ -70,7 +72,7 @@ def test_passing_only_string(self, client): docs = [ "Microsoft was founded by Bill Gates and Paul Allen", "Microsoft fue fundado por Bill Gates y Paul Allen", - "" + "", ] response = client.extract_key_phrases(docs) @@ -80,8 +82,10 @@ def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.extract_key_phrases(docs) assert response[0].is_error @@ -91,8 +95,10 @@ def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_all_errors(self, client): - docs = [{"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": ""}] + docs = [ + {"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": ""}, + ] response = client.extract_key_phrases(docs) assert response[0].is_error @@ -119,7 +125,7 @@ def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = client.extract_key_phrases(docs) @@ -132,18 +138,14 @@ def test_output_same_order_as_input(self, client): @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = client.extract_key_phrases( - ["This is written in English."] - ) + response = client.extract_key_phrases(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = client.extract_key_phrases( - ["This is written in English."] - ) + response = client.extract_key_phrases(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -161,7 +163,7 @@ def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = client.extract_key_phrases(docs) @@ -170,11 +172,13 @@ def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.extract_key_phrases(docs) in_order = ["56", "0", "22", "19", "1"] @@ -194,18 +198,15 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] - response = client.extract_key_phrases( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback - ) + response = client.extract_key_phrases(docs, show_stats=True, model_version="latest", raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -220,14 +221,14 @@ def test_batch_size_over_limit(self, client): @recorded_by_proxy def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.extract_key_phrases(docs, language="fr", raw_response_hook=callback) @@ -237,14 +238,14 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.extract_key_phrases(docs, language="", raw_response_hook=callback) @@ -254,17 +255,18 @@ def callback(resp): @recorded_by_proxy def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.extract_key_phrases(docs, raw_response_hook=callback) @@ -273,7 +275,7 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -290,10 +292,10 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -310,17 +312,18 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.extract_key_phrases(docs, language="en", raw_response_hook=callback) @@ -329,18 +332,20 @@ def callback(resp): @recorded_by_proxy def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.extract_key_phrases(docs, raw_response_hook=callback) response = client.extract_key_phrases(docs, language="en", raw_response_hook=callback_2) @@ -353,16 +358,22 @@ def test_invalid_language_hint_method(self, client): response = client.extract_key_phrases( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_docs(self, client): response = client.extract_key_phrases( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy @@ -370,9 +381,11 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.extract_key_phrases(docs) assert response is not None @@ -390,13 +403,18 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic @recorded_by_proxy def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.extract_key_phrases(docs, raw_response_hook=callback) @@ -416,11 +434,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: key_phrases = response[0].key_phrases except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'key_phrases\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'key_phrases'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -433,7 +451,9 @@ def test_document_attribute_error_nonexistent_attribute(self, client): try: key_phrases = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -455,9 +475,11 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = client.extract_key_phrases(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -498,8 +520,7 @@ def test_passing_none_docs(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.extract_key_phrases(docs) except HttpResponseError as err: @@ -523,7 +544,7 @@ def test_batch_size_over_limit_error(self, client): @recorded_by_proxy def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -533,7 +554,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -542,10 +563,8 @@ def callback(response): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = client.extract_key_phrases( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = client.extract_key_phrases(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -553,7 +572,8 @@ def callback(pipeline_response, deserialized, _): @recorded_by_proxy def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.extract_key_phrases( documents=["Test for logging disable"], disable_service_logs=True, @@ -565,7 +585,8 @@ def callback(resp): @recorded_by_proxy def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + client.extract_key_phrases( documents=["Test for logging disable"], disable_service_logs=True, @@ -579,4 +600,7 @@ def test_key_phrases_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = client.extract_key_phrases(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py index d7a7763d2e84..d87d40dc8f42 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py @@ -39,14 +39,16 @@ async def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = await client.extract_key_phrases(docs, show_stats=True) for phrases in response: - assert "Paul Allen" in phrases.key_phrases - assert "Bill Gates" in phrases.key_phrases - assert "Microsoft" in phrases.key_phrases + assert "Paul Allen" in phrases.key_phrases + assert "Bill Gates" in phrases.key_phrases + assert "Microsoft" in phrases.key_phrases assert phrases.id is not None assert phrases.statistics is not None @@ -56,14 +58,14 @@ async def test_all_successful_passing_dict(self, client): async def test_all_successful_passing_text_document_input(self, client): docs = [ TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen", language="en"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen", language="es") + TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen", language="es"), ] response = await client.extract_key_phrases(docs) for phrases in response: - assert "Paul Allen" in phrases.key_phrases - assert "Bill Gates" in phrases.key_phrases - assert "Microsoft" in phrases.key_phrases + assert "Paul Allen" in phrases.key_phrases + assert "Bill Gates" in phrases.key_phrases + assert "Microsoft" in phrases.key_phrases assert phrases.id is not None @TextAnalyticsPreparer() @@ -73,7 +75,7 @@ async def test_passing_only_string(self, client): docs = [ "Microsoft was founded by Bill Gates and Paul Allen", "Microsoft fue fundado por Bill Gates y Paul Allen", - "" + "", ] response = await client.extract_key_phrases(docs) @@ -83,8 +85,10 @@ async def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = await client.extract_key_phrases(docs) assert response[0].is_error @@ -94,8 +98,10 @@ async def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_all_errors(self, client): - docs = [{"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": ""}] + docs = [ + {"id": "1", "language": "English", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": ""}, + ] response = await client.extract_key_phrases(docs) assert response[0].is_error @@ -122,7 +128,7 @@ async def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = await client.extract_key_phrases(docs) @@ -135,18 +141,14 @@ async def test_output_same_order_as_input(self, client): @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.extract_key_phrases( - ["This is written in English."] - ) + response = await client.extract_key_phrases(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.extract_key_phrases( - ["This is written in English."] - ) + response = await client.extract_key_phrases(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -164,7 +166,7 @@ async def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = await client.extract_key_phrases(docs) @@ -173,11 +175,13 @@ async def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.extract_key_phrases(docs) in_order = ["56", "0", "22", "19", "1"] @@ -197,17 +201,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.extract_key_phrases( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -223,14 +226,14 @@ async def test_batch_size_over_limit(self, client): @recorded_by_proxy_async async def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.extract_key_phrases(docs, language="fr", raw_response_hook=callback) @@ -240,14 +243,14 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.extract_key_phrases(docs, language="", raw_response_hook=callback) @@ -257,17 +260,18 @@ def callback(resp): @recorded_by_proxy_async async def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.extract_key_phrases(docs, raw_response_hook=callback) @@ -276,7 +280,7 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -293,10 +297,10 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -313,17 +317,18 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.extract_key_phrases(docs, language="en", raw_response_hook=callback) @@ -332,18 +337,20 @@ def callback(resp): @recorded_by_proxy_async async def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.extract_key_phrases(docs, raw_response_hook=callback) response = await client.extract_key_phrases(docs, language="en", raw_response_hook=callback_2) @@ -356,16 +363,22 @@ async def test_invalid_language_hint_method(self, client): response = await client.extract_key_phrases( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_invalid_language_hint_docs(self, client): response = await client.extract_key_phrases( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy_async @@ -373,9 +386,11 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.extract_key_phrases(docs) assert response is not None @@ -393,13 +408,18 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan @recorded_by_proxy_async async def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.extract_key_phrases(docs, raw_response_hook=callback) @@ -419,11 +439,11 @@ async def test_document_attribute_error_no_result_attribute(self, client): try: key_phrases = response[0].key_phrases except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'key_phrases\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'key_phrases'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -436,7 +456,10 @@ async def test_document_attribute_error_nonexistent_attribute(self, client): try: key_phrases = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) + @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async @@ -457,9 +480,11 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = await client.extract_key_phrases(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -500,8 +525,7 @@ async def test_passing_none_docs(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = await client.extract_key_phrases(docs) except HttpResponseError as err: @@ -525,7 +549,7 @@ async def test_batch_size_over_limit_error(self, client): @recorded_by_proxy_async async def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -535,7 +559,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -544,10 +568,8 @@ def callback(response): async def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = await client.extract_key_phrases( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = await client.extract_key_phrases(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -555,7 +577,8 @@ def callback(pipeline_response, deserialized, _): @recorded_by_proxy_async async def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + await client.extract_key_phrases( documents=["Test for logging disable"], disable_service_logs=True, @@ -567,7 +590,8 @@ def callback(resp): @recorded_by_proxy_async async def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + await client.extract_key_phrases( documents=["Test for logging disable"], disable_service_logs=True, @@ -581,4 +605,7 @@ async def test_key_phrases_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = await client.extract_key_phrases(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py index 43fd407aed2f..adde9b614a85 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_json_pointer.py @@ -25,6 +25,7 @@ def generated_target_assessment_confidence_scores(): negative=0.0, ) + @pytest.fixture def generated_sentiment_confidence_score(): return _generated_models.SentimentConfidenceScorePerLabel( @@ -33,12 +34,11 @@ def generated_sentiment_confidence_score(): negative=0.0, ) + @pytest.fixture def generated_target_relation(): - return _generated_models.TargetRelation( - relation_type="assessment", - ref="#/documents/0/sentences/1/assessments/0" - ) + return _generated_models.TargetRelation(relation_type="assessment", ref="#/documents/0/sentences/1/assessments/0") + @pytest.fixture def generated_target(generated_target_assessment_confidence_scores, generated_target_relation): @@ -51,6 +51,7 @@ def generated_target(generated_target_assessment_confidence_scores, generated_ta relations=[generated_target_relation], ) + @pytest.fixture def generated_assessment(generated_target_assessment_confidence_scores): return _generated_models.SentenceAssessment( @@ -62,6 +63,7 @@ def generated_assessment(generated_target_assessment_confidence_scores): is_negated=False, ) + def generated_sentence_sentiment(generated_sentiment_confidence_score, index, targets=[], assessments=[]): return _generated_models.SentenceSentiment( text="not relevant", @@ -73,10 +75,15 @@ def generated_sentence_sentiment(generated_sentiment_confidence_score, index, ta assessments=assessments, ) + @pytest.fixture def generated_document_sentiment(generated_target, generated_assessment, generated_sentiment_confidence_score): - target_sentence = generated_sentence_sentiment(generated_sentiment_confidence_score, index=0, targets=[generated_target]) - assessment_sentence = generated_sentence_sentiment(generated_sentiment_confidence_score, index=1, assessments=[generated_assessment]) + target_sentence = generated_sentence_sentiment( + generated_sentiment_confidence_score, index=0, targets=[generated_target] + ) + assessment_sentence = generated_sentence_sentiment( + generated_sentiment_confidence_score, index=1, assessments=[generated_assessment] + ) return _generated_models.DocumentSentiment( id=1, @@ -86,6 +93,7 @@ def generated_document_sentiment(generated_target, generated_assessment, generat warnings=[], ) + @pytest.fixture def generated_sentiment_response(generated_document_sentiment): return _generated_models.SentimentResponse( @@ -95,7 +103,7 @@ def generated_sentiment_response(generated_document_sentiment): ) -class TestJsonPointer(): +class TestJsonPointer: def test_json_pointer_parsing(self): assert [1, 0, 15] == _get_indices("#/documents/1/sentences/0/assessments/15") diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py index 28125e8d0850..f2b8d38c0a08 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py @@ -12,6 +12,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestMultiApi(TextAnalyticsTest): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py index f6f371feaa53..16ae5ba9918a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py @@ -12,6 +12,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestMultiApiAsync(TextAnalyticsTest): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py index b564f06e8c28..0011ab1f44f6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py @@ -22,6 +22,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestRecognizeEntities(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -35,9 +36,23 @@ def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975."}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975."}, - {"id": "3", "language": "de", "text": "Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", + }, + { + "id": "2", + "language": "es", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", + }, + { + "id": "3", + "language": "de", + "text": "Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", + }, + ] response = client.recognize_entities(docs, show_stats=True) for doc in response: @@ -54,9 +69,15 @@ def test_all_successful_passing_dict(self, client): @recorded_by_proxy def test_all_successful_passing_text_document_input(self, client): docs = [ - TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", language="en"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es"), - TextDocumentInput(id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de") + TextDocumentInput( + id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", language="en" + ), + TextDocumentInput( + id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es" + ), + TextDocumentInput( + id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de" + ), ] response = client.recognize_entities(docs) @@ -75,7 +96,7 @@ def test_passing_only_string(self, client): "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", "Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", - "" + "", ] response = client.recognize_entities(docs) @@ -86,9 +107,15 @@ def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975."}, - {"id": "2", "language": "Spanish", "text": "Hola"}, - {"id": "3", "language": "de", "text": ""}] + docs = [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", + }, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}, + ] response = client.recognize_entities(docs) assert not response[0].is_error @@ -99,9 +126,11 @@ def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_all_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "Spanish", "text": "Hola"}, - {"id": "3", "language": "de", "text": ""}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}, + ] response = client.recognize_entities(docs) assert response[0].is_error @@ -129,7 +158,7 @@ def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = client.recognize_entities(docs) @@ -142,18 +171,14 @@ def test_output_same_order_as_input(self, client): @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = client.recognize_entities( - ["This is written in English."] - ) + response = client.recognize_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = client.recognize_entities( - ["This is written in English."] - ) + response = client.recognize_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -171,7 +196,7 @@ def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = client.recognize_entities(docs) @@ -180,11 +205,13 @@ def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.recognize_entities(docs) in_order = ["56", "0", "22", "19", "1"] @@ -204,18 +231,15 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] - response = client.recognize_entities( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback - ) + response = client.recognize_entities(docs, show_stats=True, model_version="latest", raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -230,14 +254,14 @@ def test_batch_size_over_limit(self, client): @recorded_by_proxy def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.recognize_entities(docs, language="fr", raw_response_hook=callback) @@ -247,14 +271,14 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.recognize_entities(docs, language="", raw_response_hook=callback) @@ -264,17 +288,18 @@ def callback(resp): @recorded_by_proxy def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_entities(docs, raw_response_hook=callback) @@ -283,7 +308,7 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -300,10 +325,10 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -320,17 +345,18 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_entities(docs, language="en", raw_response_hook=callback) @@ -339,18 +365,20 @@ def callback(resp): @recorded_by_proxy def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_entities(docs, raw_response_hook=callback) response = client.recognize_entities(docs, language="en", raw_response_hook=callback_2) @@ -363,16 +391,22 @@ def test_invalid_language_hint_method(self, client): response = client.recognize_entities( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_docs(self, client): response = client.recognize_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy @@ -380,9 +414,11 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_entities(docs) assert response is not None @@ -400,13 +436,18 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic @recorded_by_proxy def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_entities(docs, raw_response_hook=callback) @@ -426,11 +467,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -443,7 +484,9 @@ def test_document_attribute_error_nonexistent_attribute(self, client): try: entities = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -465,9 +508,11 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = client.recognize_entities(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -522,8 +567,7 @@ def test_passing_none_docs(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.recognize_entities(docs) except HttpResponseError as err: @@ -547,7 +591,7 @@ def test_batch_size_over_limit_error(self, client): @recorded_by_proxy def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -557,7 +601,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -566,10 +610,8 @@ def callback(response): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = client.recognize_entities( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = client.recognize_entities(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -603,22 +645,16 @@ def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = client.recognize_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.recognize_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = client.recognize_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.recognize_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -628,9 +664,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = client.recognize_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -638,12 +672,10 @@ def callback(response): @recorded_by_proxy def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = client.recognize_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -651,7 +683,8 @@ def callback(response): @recorded_by_proxy def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.recognize_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -663,7 +696,8 @@ def callback(resp): @recorded_by_proxy def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + client.recognize_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -677,12 +711,23 @@ def test_entities_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = client.recognize_entities(["I'm tired"], string_index_type="UnicodeCodePoint") - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = client.recognize_entities(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: - res = client.recognize_entities(["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True) - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + res = client.recognize_entities( + ["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True + ) + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py index ed1017678367..d97495890241 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py @@ -39,9 +39,23 @@ async def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975."}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975."}, - {"id": "3", "language": "de", "text": "Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", + }, + { + "id": "2", + "language": "es", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", + }, + { + "id": "3", + "language": "de", + "text": "Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", + }, + ] response = await client.recognize_entities(docs, show_stats=True) for doc in response: @@ -58,9 +72,15 @@ async def test_all_successful_passing_dict(self, client): @recorded_by_proxy_async async def test_all_successful_passing_text_document_input(self, client): docs = [ - TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", language="en"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es"), - TextDocumentInput(id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de") + TextDocumentInput( + id="1", text="Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", language="en" + ), + TextDocumentInput( + id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", language="es" + ), + TextDocumentInput( + id="3", text="Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", language="de" + ), ] response = await client.recognize_entities(docs) @@ -79,7 +99,7 @@ async def test_passing_only_string(self, client): "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", "Microsoft wurde am 4. April 1975 von Bill Gates und Paul Allen gegründet.", - "" + "", ] response = await client.recognize_entities(docs) @@ -90,9 +110,15 @@ async def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975."}, - {"id": "2", "language": "Spanish", "text": "Hola"}, - {"id": "3", "language": "de", "text": ""}] + docs = [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975.", + }, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}, + ] response = await client.recognize_entities(docs) assert not response[0].is_error @@ -103,9 +129,11 @@ async def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_all_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "Spanish", "text": "Hola"}, - {"id": "3", "language": "de", "text": ""}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}, + ] response = await client.recognize_entities(docs) assert response[0].is_error @@ -133,7 +161,7 @@ async def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = await client.recognize_entities(docs) @@ -146,18 +174,14 @@ async def test_output_same_order_as_input(self, client): @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.recognize_entities( - ["This is written in English."] - ) + response = await client.recognize_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.recognize_entities( - ["This is written in English."] - ) + response = await client.recognize_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -175,7 +199,7 @@ async def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = await client.recognize_entities(docs) @@ -184,11 +208,13 @@ async def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.recognize_entities(docs) in_order = ["56", "0", "22", "19", "1"] @@ -208,17 +234,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.recognize_entities( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -234,14 +259,14 @@ async def test_batch_size_over_limit(self, client): @recorded_by_proxy_async async def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.recognize_entities(docs, language="fr", raw_response_hook=callback) @@ -251,14 +276,14 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.recognize_entities(docs, language="", raw_response_hook=callback) @@ -268,17 +293,18 @@ def callback(resp): @recorded_by_proxy_async async def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_entities(docs, raw_response_hook=callback) @@ -287,7 +313,7 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -304,10 +330,10 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -324,17 +350,18 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_entities(docs, language="en", raw_response_hook=callback) @@ -343,18 +370,20 @@ def callback(resp): @recorded_by_proxy_async async def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_entities(docs, raw_response_hook=callback) response = await client.recognize_entities(docs, language="en", raw_response_hook=callback_2) @@ -367,16 +396,22 @@ async def test_invalid_language_hint_method(self, client): response = await client.recognize_entities( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_invalid_language_hint_docs(self, client): response = await client.recognize_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy_async @@ -384,9 +419,11 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_entities(docs) assert response is not None @@ -405,13 +442,18 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan async def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_entities(docs, raw_response_hook=callback) @@ -432,11 +474,11 @@ async def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -450,7 +492,9 @@ async def test_document_attribute_error_nonexistent_attribute(self, client): try: entities = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -472,9 +516,11 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = await client.recognize_entities(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -529,8 +575,7 @@ async def test_passing_none_docs(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = await client.recognize_entities(docs) except HttpResponseError as err: @@ -554,7 +599,7 @@ async def test_batch_size_over_limit_error(self, client): @recorded_by_proxy_async async def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -564,7 +609,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -573,10 +618,8 @@ def callback(response): async def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = await client.recognize_entities( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = await client.recognize_entities(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -610,22 +653,16 @@ async def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = await client.recognize_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.recognize_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy_async async def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = await client.recognize_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.recognize_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -635,9 +672,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = await client.recognize_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -645,12 +680,10 @@ def callback(response): @recorded_by_proxy_async async def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = await client.recognize_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -658,7 +691,8 @@ def callback(response): @recorded_by_proxy_async async def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + await client.recognize_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -670,7 +704,8 @@ def callback(resp): @recorded_by_proxy_async async def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + await client.recognize_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -684,12 +719,23 @@ async def test_entities_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = await client.recognize_entities(["I'm tired"], string_index_type="UnicodeCodePoint") - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = await client.recognize_entities(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: - res = await client.recognize_entities(["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True) - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + res = await client.recognize_entities( + ["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True + ) + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py index 781c16090410..0f08bbb58582 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py @@ -22,6 +22,7 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestRecognizeLinkedEntities(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -35,8 +36,10 @@ def test_no_single_input(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.recognize_linked_entities(docs, show_stats=True) for doc in response: @@ -59,7 +62,7 @@ def test_all_successful_passing_dict(self, client): def test_all_successful_passing_text_document_input(self, client): docs = [ TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen") + TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen"), ] response = client.recognize_linked_entities(docs) @@ -82,7 +85,7 @@ def test_passing_only_string(self, client): docs = [ "Microsoft was founded by Bill Gates and Paul Allen", "Microsoft fue fundado por Bill Gates y Paul Allen", - "" + "", ] response = client.recognize_linked_entities(docs) @@ -94,8 +97,10 @@ def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.recognize_linked_entities(docs) assert response[0].is_error @@ -105,8 +110,10 @@ def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_all_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "Spanish", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.recognize_linked_entities(docs) assert response[0].is_error @@ -133,7 +140,7 @@ def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = client.recognize_linked_entities(docs) @@ -146,18 +153,14 @@ def test_output_same_order_as_input(self, client): @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = client.recognize_linked_entities( - ["This is written in English."] - ) + response = client.recognize_linked_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = client.recognize_linked_entities( - ["This is written in English."] - ) + response = client.recognize_linked_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -175,7 +178,7 @@ def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = client.recognize_linked_entities(docs) @@ -184,11 +187,13 @@ def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.recognize_linked_entities(docs) in_order = ["56", "0", "22", "19", "1"] @@ -208,17 +213,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.recognize_linked_entities( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -234,14 +238,14 @@ def test_batch_size_over_limit(self, client): @recorded_by_proxy def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.recognize_linked_entities(docs, language="fr", raw_response_hook=callback) @@ -251,14 +255,14 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.recognize_linked_entities(docs, language="", raw_response_hook=callback) @@ -268,17 +272,18 @@ def callback(resp): @recorded_by_proxy def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_linked_entities(docs, raw_response_hook=callback) @@ -287,7 +292,7 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -304,10 +309,10 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -324,17 +329,18 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_linked_entities(docs, language="en", raw_response_hook=callback) @@ -343,18 +349,20 @@ def callback(resp): @recorded_by_proxy def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_linked_entities(docs, raw_response_hook=callback) response = client.recognize_linked_entities(docs, language="en", raw_response_hook=callback_2) @@ -367,16 +375,22 @@ def test_invalid_language_hint_method(self, client): response = client.recognize_linked_entities( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_docs(self, client): response = client.recognize_linked_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy @@ -384,9 +398,11 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_linked_entities(docs) assert response is not None @@ -404,13 +420,18 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic @recorded_by_proxy def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_linked_entities(docs, raw_response_hook=callback) @@ -430,11 +451,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -447,7 +468,9 @@ def test_document_attribute_error_nonexistent_attribute(self, client): try: entities = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -469,9 +492,11 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = client.recognize_linked_entities(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -526,8 +551,7 @@ def test_passing_none_docs(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.recognize_linked_entities(docs) except HttpResponseError as err: @@ -551,7 +575,7 @@ def test_batch_size_over_limit_error(self, client): @recorded_by_proxy def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -561,7 +585,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -570,10 +594,8 @@ def callback(response): def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = client.recognize_linked_entities( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = client.recognize_linked_entities(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -629,22 +651,16 @@ def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = client.recognize_linked_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.recognize_linked_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = client.recognize_linked_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.recognize_linked_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -654,9 +670,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = client.recognize_linked_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -664,12 +678,10 @@ def callback(response): @recorded_by_proxy def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = client.recognize_linked_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -677,7 +689,8 @@ def callback(response): @recorded_by_proxy def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.recognize_linked_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -689,7 +702,8 @@ def callback(resp): @recorded_by_proxy def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + client.recognize_linked_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -703,12 +717,23 @@ def test_linked_entities_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = client.recognize_linked_entities(["I'm tired"], string_index_type="UnicodeCodePoint") - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = client.recognize_linked_entities(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: - res = client.recognize_linked_entities(["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True) - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + res = client.recognize_linked_entities( + ["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True + ) + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py index 9fe65b7ca5e1..f95d22a8266f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py @@ -40,8 +40,10 @@ async def test_no_single_input(self, client): @recorded_by_proxy_async async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen"}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = await client.recognize_linked_entities(docs, show_stats=True) for doc in response: @@ -65,7 +67,7 @@ async def test_all_successful_passing_text_document_input(self, client): docs = [ TextDocumentInput(id="1", text="Microsoft was founded by Bill Gates and Paul Allen"), - TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen") + TextDocumentInput(id="2", text="Microsoft fue fundado por Bill Gates y Paul Allen"), ] response = await client.recognize_linked_entities(docs) @@ -89,7 +91,7 @@ async def test_passing_only_string(self, client): docs = [ "Microsoft was founded by Bill Gates and Paul Allen", "Microsoft fue fundado por Bill Gates y Paul Allen", - "" + "", ] response = await client.recognize_linked_entities(docs) @@ -102,8 +104,10 @@ async def test_passing_only_string(self, client): @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = await client.recognize_linked_entities(docs) assert response[0].is_error @@ -114,8 +118,10 @@ async def test_input_with_some_errors(self, client): @recorded_by_proxy_async async def test_input_with_all_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "Spanish", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = await client.recognize_linked_entities(docs) assert response[0].is_error @@ -142,7 +148,7 @@ async def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = await client.recognize_linked_entities(docs) @@ -155,18 +161,14 @@ async def test_output_same_order_as_input(self, client): @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.recognize_linked_entities( - ["This is written in English."] - ) + response = await client.recognize_linked_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.recognize_linked_entities( - ["This is written in English."] - ) + response = await client.recognize_linked_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -185,7 +187,7 @@ async def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = await client.recognize_linked_entities(docs) @@ -195,11 +197,13 @@ async def test_mixing_inputs(self, client): @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.recognize_linked_entities(docs) in_order = ["56", "0", "22", "19", "1"] @@ -220,17 +224,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.recognize_linked_entities( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -248,14 +251,14 @@ async def test_batch_size_over_limit(self, client): async def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.recognize_linked_entities(docs, language="fr", raw_response_hook=callback) @@ -266,14 +269,14 @@ def callback(resp): async def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.recognize_linked_entities(docs, language="", raw_response_hook=callback) @@ -284,17 +287,18 @@ def callback(resp): async def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_linked_entities(docs, raw_response_hook=callback) @@ -304,7 +308,7 @@ def callback(resp): async def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -322,10 +326,10 @@ def callback(resp): async def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -343,17 +347,18 @@ def callback(resp): async def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_linked_entities(docs, language="en", raw_response_hook=callback) @@ -363,18 +368,20 @@ def callback(resp): async def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_linked_entities(docs, raw_response_hook=callback) response = await client.recognize_linked_entities(docs, language="en", raw_response_hook=callback_2) @@ -387,16 +394,22 @@ async def test_invalid_language_hint_method(self, client): response = await client.recognize_linked_entities( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_invalid_language_hint_docs(self, client): response = await client.recognize_linked_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy_async @@ -404,9 +417,11 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_linked_entities(docs) assert response is not None @@ -425,13 +440,18 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan async def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_linked_entities(docs, raw_response_hook=callback) @@ -452,11 +472,11 @@ async def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -470,7 +490,9 @@ async def test_document_attribute_error_nonexistent_attribute(self, client): try: entities = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -492,9 +514,11 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = await client.recognize_linked_entities(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -549,8 +573,7 @@ async def test_passing_none_docs(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = await client.recognize_linked_entities(docs) except HttpResponseError as err: @@ -575,7 +598,7 @@ async def test_batch_size_over_limit_error(self, client): async def test_language_kwarg_spanish(self, client): def callback(response): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -585,7 +608,7 @@ def callback(response): model_version="latest", show_stats=True, language="es", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -594,10 +617,8 @@ def callback(response): async def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = await client.recognize_linked_entities( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = await client.recognize_linked_entities(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -653,22 +674,16 @@ async def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = await client.recognize_linked_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.recognize_linked_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy_async async def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = await client.recognize_linked_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.recognize_linked_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -678,9 +693,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = await client.recognize_linked_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -688,21 +701,19 @@ def callback(response): @recorded_by_proxy_async async def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = await client.recognize_linked_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) - @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @recorded_by_proxy_async async def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + await client.recognize_linked_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -714,7 +725,7 @@ def callback(resp): @recorded_by_proxy_async async def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] await client.recognize_linked_entities( documents=["Test for logging disable"], @@ -729,12 +740,23 @@ async def test_linked_entities_multiapi_validate_args_v3_0(self, **kwargs): with pytest.raises(ValueError) as e: res = await client.recognize_linked_entities(["I'm tired"], string_index_type="UnicodeCodePoint") - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: res = await client.recognize_linked_entities(["I'm tired"], disable_service_logs=True) - assert str(e.value) == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + assert ( + str(e.value) + == "'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) with pytest.raises(ValueError) as e: - res = await client.recognize_linked_entities(["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True) - assert str(e.value) == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + res = await client.recognize_linked_entities( + ["I'm tired"], string_index_type="UnicodeCodePoint", disable_service_logs=True + ) + assert ( + str(e.value) + == "'string_index_type' is not available in API version v3.0. Use service API version v3.1 or newer.\n'disable_service_logs' is not available in API version v3.0. Use service API version v3.1 or newer.\n" + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py index 152fe41634e9..2dd939955c09 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -18,13 +18,14 @@ VERSION, TextAnalyticsApiVersion, PiiEntityDomain, - PiiEntityCategory + PiiEntityCategory, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below # the first one TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestRecognizePIIEntities(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -39,9 +40,14 @@ def test_no_single_input(self, client): @recorded_by_proxy def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "text": "My SSN is 859-98-0987."}, - {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, - {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + docs = [ + {"id": "1", "text": "My SSN is 859-98-0987."}, + { + "id": "2", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] response = client.recognize_pii_entities(docs, show_stats=True) assert response[0].entities[0].text == "859-98-0987" @@ -66,8 +72,11 @@ def test_all_successful_passing_dict(self, client): def test_all_successful_passing_text_document_input(self, client): docs = [ TextDocumentInput(id="1", text="My SSN is 859-98-0987."), - TextDocumentInput(id="2", text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."), - TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?") + TextDocumentInput( + id="2", + text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + ), + TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?"), ] response = client.recognize_pii_entities(docs, show_stats=True) @@ -95,7 +104,7 @@ def test_passing_only_string(self, client): "My SSN is 859-98-0987.", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "Is 998.214.865-68 your Brazilian CPF number?", - "" + "", ] response = client.recognize_pii_entities(docs, show_stats=True) @@ -113,9 +122,11 @@ def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "notalanguage", "text": "hola"}, - {"id": "2", "text": ""}, - {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + docs = [ + {"id": "1", "language": "notalanguage", "text": "hola"}, + {"id": "2", "text": ""}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] response = client.recognize_pii_entities(docs) assert response[0].is_error @@ -126,9 +137,11 @@ def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_input_with_all_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "Spanish", "text": "Hola"}, - {"id": "3", "language": "de", "text": ""}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}, + ] response = client.recognize_pii_entities(docs) assert response[0].is_error @@ -156,7 +169,7 @@ def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = client.recognize_pii_entities(docs) @@ -169,18 +182,14 @@ def test_output_same_order_as_input(self, client): @recorded_by_proxy def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = client.recognize_pii_entities( - ["This is written in English."] - ) + response = client.recognize_pii_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = client.recognize_pii_entities( - ["This is written in English."] - ) + response = client.recognize_pii_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -198,7 +207,7 @@ def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = client.recognize_pii_entities(docs) @@ -207,11 +216,13 @@ def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.recognize_pii_entities(docs) in_order = ["56", "0", "22", "19", "1"] @@ -231,17 +242,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = client.recognize_pii_entities( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -257,14 +267,14 @@ def test_batch_size_over_limit(self, client): @recorded_by_proxy def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.recognize_pii_entities(docs, language="fr", raw_response_hook=callback) @@ -274,14 +284,14 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = client.recognize_pii_entities(docs, language="", raw_response_hook=callback) @@ -291,17 +301,18 @@ def callback(resp): @recorded_by_proxy def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_pii_entities(docs, raw_response_hook=callback) @@ -310,7 +321,7 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -327,10 +338,10 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -347,17 +358,18 @@ def callback(resp): @recorded_by_proxy def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_pii_entities(docs, language="en", raw_response_hook=callback) @@ -366,18 +378,20 @@ def callback(resp): @recorded_by_proxy def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_pii_entities(docs, raw_response_hook=callback) response = client.recognize_pii_entities(docs, language="en", raw_response_hook=callback_2) @@ -390,16 +404,22 @@ def test_invalid_language_hint_method(self, client): response = client.recognize_pii_entities( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_invalid_language_hint_docs(self, client): response = client.recognize_pii_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy @@ -407,9 +427,11 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_pii_entities(docs) assert response is not None @@ -427,13 +449,18 @@ def test_rotate_subscription_key(self, textanalytics_test_endpoint, textanalytic @recorded_by_proxy def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = client.recognize_pii_entities(docs, raw_response_hook=callback) @@ -453,11 +480,11 @@ def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -470,7 +497,9 @@ def test_document_attribute_error_nonexistent_attribute(self, client): try: entities = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -492,9 +521,11 @@ def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = client.recognize_pii_entities(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -549,8 +580,7 @@ def test_passing_none_docs(self, client): @recorded_by_proxy def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = client.recognize_pii_entities(docs) except HttpResponseError as err: @@ -569,17 +599,14 @@ def test_batch_size_over_limit_error(self, client): assert err.error.code == "InvalidDocumentBatch" assert err.error.message is not None - @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = client.recognize_pii_entities( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = client.recognize_pii_entities(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -587,7 +614,7 @@ def callback(pipeline_response, deserialized, _): @recorded_by_proxy def test_language_kwarg_english(self, client): def callback(response): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -597,7 +624,7 @@ def callback(response): model_version="latest", show_stats=True, language="en", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -607,7 +634,6 @@ def test_redacted_text(self, client): result = client.recognize_pii_entities(["My SSN is 859-98-0987."]) assert "My SSN is ***********." == result[0].redacted_text - @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy @@ -616,7 +642,7 @@ def test_phi_domain_filter(self, client): # and the phone number. With the domain filter, it should only return one. result = client.recognize_pii_entities( ["I work at Microsoft and my phone number is 333-333-3333"], - domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION + domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION, ) assert len(result[0].entities) == 2 microsoft = list(filter(lambda x: x.text == "Microsoft", result[0].entities))[0] @@ -636,7 +662,7 @@ def test_categories_filter(self, client): result = client.recognize_pii_entities( ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], - categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER] + categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER], ) assert len(result[0].entities) == 1 @@ -651,7 +677,7 @@ def test_categories_filter_with_domain_filter(self, client): result = client.recognize_pii_entities( ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER], - domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION + domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION, ) assert len(result[0].entities) == 1 @@ -665,22 +691,16 @@ def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = client.recognize_pii_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.recognize_pii_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = client.recognize_pii_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = client.recognize_pii_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -690,9 +710,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = client.recognize_pii_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -700,12 +718,10 @@ def callback(response): @recorded_by_proxy def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = client.recognize_pii_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -713,7 +729,8 @@ def callback(response): @recorded_by_proxy def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + client.recognize_pii_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -725,7 +742,8 @@ def callback(resp): @recorded_by_proxy def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + client.recognize_pii_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -738,8 +756,8 @@ def test_pii_entities_multiapi_validate_v3_0(self, **kwargs): client = kwargs.pop("client") with pytest.raises(ValueError) as e: - client.recognize_pii_entities( - documents=["Test"] - ) - assert str(e.value) == "'TextAnalyticsClient.recognize_pii_entities' is not available in API version v3.0. " \ - "Use service API version v3.1 or newer." + client.recognize_pii_entities(documents=["Test"]) + assert ( + str(e.value) == "'TextAnalyticsClient.recognize_pii_entities' is not available in API version v3.0. " + "Use service API version v3.1 or newer." + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py index a94e013657ac..8120e1a23873 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -19,13 +19,14 @@ VERSION, TextAnalyticsApiVersion, PiiEntityDomain, - PiiEntityCategory + PiiEntityCategory, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below # the first one TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) + class TestRecognizePIIEntities(TextAnalyticsTest): @TextAnalyticsPreparer() @@ -40,9 +41,14 @@ async def test_no_single_input(self, client): @recorded_by_proxy_async async def test_all_successful_passing_dict(self, client): - docs = [{"id": "1", "text": "My SSN is 859-98-0987."}, - {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."}, - {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + docs = [ + {"id": "1", "text": "My SSN is 859-98-0987."}, + { + "id": "2", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] response = await client.recognize_pii_entities(docs, show_stats=True) assert response[0].entities[0].text == "859-98-0987" @@ -68,8 +74,11 @@ async def test_all_successful_passing_dict(self, client): async def test_all_successful_passing_text_document_input(self, client): docs = [ TextDocumentInput(id="1", text="My SSN is 859-98-0987."), - TextDocumentInput(id="2", text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."), - TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?") + TextDocumentInput( + id="2", + text="Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + ), + TextDocumentInput(id="3", text="Is 998.214.865-68 your Brazilian CPF number?"), ] response = await client.recognize_pii_entities(docs, show_stats=True) @@ -97,7 +106,7 @@ async def test_passing_only_string(self, client): "My SSN is 859-98-0987.", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "Is 998.214.865-68 your Brazilian CPF number?", - "" + "", ] response = await client.recognize_pii_entities(docs, show_stats=True) @@ -115,9 +124,11 @@ async def test_passing_only_string(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_some_errors(self, client): - docs = [{"id": "1", "language": "notalanguage", "text": "hola"}, - {"id": "2", "text": ""}, - {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}] + docs = [ + {"id": "1", "language": "notalanguage", "text": "hola"}, + {"id": "2", "text": ""}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] response = await client.recognize_pii_entities(docs) assert response[0].is_error @@ -128,9 +139,11 @@ async def test_input_with_some_errors(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_input_with_all_errors(self, client): - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "Spanish", "text": "Hola"}, - {"id": "3", "language": "de", "text": ""}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "Spanish", "text": "Hola"}, + {"id": "3", "language": "de", "text": ""}, + ] response = await client.recognize_pii_entities(docs) assert response[0].is_error @@ -158,7 +171,7 @@ async def test_output_same_order_as_input(self, client): TextDocumentInput(id="2", text="two"), TextDocumentInput(id="3", text="three"), TextDocumentInput(id="4", text="four"), - TextDocumentInput(id="5", text="five") + TextDocumentInput(id="5", text="five"), ] response = await client.recognize_pii_entities(docs) @@ -171,18 +184,14 @@ async def test_output_same_order_as_input(self, client): @recorded_by_proxy_async async def test_empty_credential_class(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.recognize_pii_entities( - ["This is written in English."] - ) + response = await client.recognize_pii_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"textanalytics_test_api_key": "xxxxxxxxxxxx"}) @recorded_by_proxy_async async def test_bad_credentials(self, client): with pytest.raises(ClientAuthenticationError): - response = await client.recognize_pii_entities( - ["This is written in English."] - ) + response = await client.recognize_pii_entities(["This is written in English."]) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -200,7 +209,7 @@ async def test_mixing_inputs(self, client): docs = [ {"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, TextDocumentInput(id="2", text="I did not like the hotel we stayed at. It was too expensive."), - "You cannot mix string input with the above inputs" + "You cannot mix string input with the above inputs", ] with pytest.raises(TypeError): response = await client.recognize_pii_entities(docs) @@ -209,11 +218,13 @@ async def test_mixing_inputs(self, client): @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_out_of_order_ids(self, client): - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.recognize_pii_entities(docs) in_order = ["56", "0", "22", "19", "1"] @@ -233,17 +244,16 @@ def callback(response): assert response.statistics.valid_document_count == 4 assert response.statistics.erroneous_document_count == 1 - docs = [{"id": "56", "text": ":)"}, - {"id": "0", "text": ":("}, - {"id": "22", "text": ""}, - {"id": "19", "text": ":P"}, - {"id": "1", "text": ":D"}] + docs = [ + {"id": "56", "text": ":)"}, + {"id": "0", "text": ":("}, + {"id": "22", "text": ""}, + {"id": "19", "text": ":P"}, + {"id": "1", "text": ":D"}, + ] response = await client.recognize_pii_entities( - docs, - show_stats=True, - model_version="latest", - raw_response_hook=callback + docs, show_stats=True, model_version="latest", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -259,14 +269,14 @@ async def test_batch_size_over_limit(self, client): @recorded_by_proxy_async async def test_whole_batch_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"fr\"" + language_str = '"language": "fr"' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.recognize_pii_entities(docs, language="fr", raw_response_hook=callback) @@ -276,14 +286,14 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 3 docs = [ "This was the best day of my life.", "I did not like the hotel we stayed at. It was too expensive.", - "The restaurant was not as good as I hoped." + "The restaurant was not as good as I hoped.", ] response = await client.recognize_pii_entities(docs, language="", raw_response_hook=callback) @@ -293,17 +303,18 @@ def callback(resp): @recorded_by_proxy_async async def test_per_item_dont_use_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"\"" + language_str = '"language": ""' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "", "text": "I will go to the park."}, - {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "", "text": "I will go to the park."}, + {"id": "2", "language": "", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_pii_entities(docs, raw_response_hook=callback) @@ -312,7 +323,7 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_input(self, client): def callback(resp): - language_str = "\"language\": \"de\"" + language_str = '"language": "de"' language = resp.http_request.body.count(language_str) assert language == 3 @@ -329,10 +340,10 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_obj_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 @@ -349,17 +360,18 @@ def callback(resp): @recorded_by_proxy_async async def test_whole_batch_language_hint_and_dict_per_item_hints(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 2 - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 1 - - docs = [{"id": "1", "language": "es", "text": "I will go to the park."}, - {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "language": "es", "text": "I will go to the park."}, + {"id": "2", "language": "es", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_pii_entities(docs, language="en", raw_response_hook=callback) @@ -368,18 +380,20 @@ def callback(resp): @recorded_by_proxy_async async def test_client_passed_default_language_hint(self, client): def callback(resp): - language_str = "\"language\": \"es\"" + language_str = '"language": "es"' language = resp.http_request.body.count(language_str) assert language == 3 def callback_2(resp): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' language = resp.http_request.body.count(language_str) assert language == 3 - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_pii_entities(docs, raw_response_hook=callback) response = await client.recognize_pii_entities(docs, language="en", raw_response_hook=callback_2) @@ -392,16 +406,22 @@ async def test_invalid_language_hint_method(self, client): response = await client.recognize_pii_entities( ["This should fail because we're passing in an invalid language hint"], language="notalanguage" ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_invalid_language_hint_docs(self, client): response = await client.recognize_pii_entities( - [{"id": "1", "language": "notalanguage", "text": "This should fail because we're passing in an invalid language hint"}] + [ + { + "id": "1", + "language": "notalanguage", + "text": "This should fail because we're passing in an invalid language hint", + } + ] ) - assert response[0].error.code == 'UnsupportedLanguageCode' + assert response[0].error.code == "UnsupportedLanguageCode" @TextAnalyticsPreparer() @recorded_by_proxy_async @@ -409,9 +429,11 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan credential = AzureKeyCredential(textanalytics_test_api_key) client = TextAnalyticsClient(textanalytics_test_endpoint, credential) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_pii_entities(docs) assert response is not None @@ -429,13 +451,18 @@ async def test_rotate_subscription_key(self, textanalytics_test_endpoint, textan @recorded_by_proxy_async async def test_user_agent(self, client): def callback(resp): - assert "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( - VERSION, platform.python_version(), platform.platform()) in \ - resp.http_request.headers["User-Agent"] + assert ( + "azsdk-python-ai-textanalytics/{} Python/{} ({})".format( + VERSION, platform.python_version(), platform.platform() + ) + in resp.http_request.headers["User-Agent"] + ) - docs = [{"id": "1", "text": "I will go to the park."}, - {"id": "2", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": "The restaurant had really good food."}] + docs = [ + {"id": "1", "text": "I will go to the park."}, + {"id": "2", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": "The restaurant had really good food."}, + ] response = await client.recognize_pii_entities(docs, raw_response_hook=callback) @@ -455,11 +482,11 @@ async def test_document_attribute_error_no_result_attribute(self, client): try: entities = response[0].entities except AttributeError as custom_error: - assert custom_error.args[0] == \ - '\'DocumentError\' object has no attribute \'entities\'. ' \ - 'The service was unable to process this document:\nDocument Id: 1\nError: ' \ - 'InvalidDocument - Document text is empty.\n' - + assert ( + custom_error.args[0] == "'DocumentError' object has no attribute 'entities'. " + "The service was unable to process this document:\nDocument Id: 1\nError: " + "InvalidDocument - Document text is empty.\n" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -472,7 +499,9 @@ async def test_document_attribute_error_nonexistent_attribute(self, client): try: entities = response[0].attribute_not_on_result_or_error except AttributeError as default_behavior: - assert default_behavior.args[0] == '\'DocumentError\' object has no attribute \'attribute_not_on_result_or_error\'' + assert ( + default_behavior.args[0] == "'DocumentError' object has no attribute 'attribute_not_on_result_or_error'" + ) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -494,9 +523,11 @@ async def test_document_errors(self, client): for _ in range(5121): text += "x" - docs = [{"id": "1", "text": ""}, - {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, - {"id": "3", "text": text}] + docs = [ + {"id": "1", "text": ""}, + {"id": "2", "language": "english", "text": "I did not like the hotel we stayed at."}, + {"id": "3", "text": text}, + ] doc_errors = await client.recognize_pii_entities(docs) assert doc_errors[0].error.code == "InvalidDocument" @@ -551,8 +582,7 @@ async def test_passing_none_docs(self, client): @recorded_by_proxy_async async def test_duplicate_ids_error(self, client): # Duplicate Ids - docs = [{"id": "1", "text": "hello world"}, - {"id": "1", "text": "I did not like the hotel we stayed at."}] + docs = [{"id": "1", "text": "hello world"}, {"id": "1", "text": "I did not like the hotel we stayed at."}] try: result = await client.recognize_pii_entities(docs) except HttpResponseError as err: @@ -571,17 +601,14 @@ async def test_batch_size_over_limit_error(self, client): assert err.error.code == "InvalidDocumentBatch" assert err.error.message is not None - @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_pass_cls(self, client): def callback(pipeline_response, deserialized, _): return "cls result" - res = await client.recognize_pii_entities( - documents=["Test passing cls to endpoint"], - cls=callback - ) + + res = await client.recognize_pii_entities(documents=["Test passing cls to endpoint"], cls=callback) assert res == "cls result" @TextAnalyticsPreparer() @@ -589,7 +616,7 @@ def callback(pipeline_response, deserialized, _): @recorded_by_proxy_async async def test_language_kwarg_english(self, client): def callback(response): - language_str = "\"language\": \"en\"" + language_str = '"language": "en"' assert response.http_request.body.count(language_str) == 1 assert response.model_version is not None assert response.statistics is not None @@ -599,7 +626,7 @@ def callback(response): model_version="latest", show_stats=True, language="en", - raw_response_hook=callback + raw_response_hook=callback, ) @TextAnalyticsPreparer() @@ -617,7 +644,7 @@ async def test_phi_domain_filter(self, client): # and the phone number. With the domain filter, it should only return one. result = await client.recognize_pii_entities( ["I work at Microsoft and my phone number is 333-333-3333"], - domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION + domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION, ) assert len(result[0].entities) == 2 microsoft = list(filter(lambda x: x.text == "Microsoft", result[0].entities))[0] @@ -637,7 +664,7 @@ async def test_categories_filter(self, client): result = await client.recognize_pii_entities( ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], - categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER] + categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER], ) assert len(result[0].entities) == 1 @@ -652,7 +679,7 @@ async def test_categories_filter_with_domain_filter(self, client): result = await client.recognize_pii_entities( ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER], - domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION + domain_filter=PiiEntityDomain.PROTECTED_HEALTH_INFORMATION, ) assert len(result[0].entities) == 1 @@ -666,22 +693,16 @@ async def test_default_string_index_type_is_UnicodeCodePoint(self, client): def callback(response): assert response.http_request.query["stringIndexType"] == "UnicodeCodePoint" - res = await client.recognize_pii_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.recognize_pii_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V2022_05_01}) @recorded_by_proxy_async async def test_default_string_index_type_UnicodeCodePoint_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "UnicodeCodePoint" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "UnicodeCodePoint" - res = await client.recognize_pii_entities( - documents=["Hello world"], - raw_response_hook=callback - ) + res = await client.recognize_pii_entities(documents=["Hello world"], raw_response_hook=callback) @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_1}) @@ -691,9 +712,7 @@ def callback(response): assert response.http_request.query["stringIndexType"] == "TextElement_v8" res = await client.recognize_pii_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -701,12 +720,10 @@ def callback(response): @recorded_by_proxy_async async def test_explicit_set_string_index_type_body_param(self, client): def callback(response): - assert json.loads(response.http_request.body)['parameters']["stringIndexType"] == "TextElements_v8" + assert json.loads(response.http_request.body)["parameters"]["stringIndexType"] == "TextElements_v8" res = await client.recognize_pii_entities( - documents=["Hello world"], - string_index_type="TextElement_v8", - raw_response_hook=callback + documents=["Hello world"], string_index_type="TextElement_v8", raw_response_hook=callback ) @TextAnalyticsPreparer() @@ -714,7 +731,8 @@ def callback(response): @recorded_by_proxy_async async def test_disable_service_logs(self, client): def callback(resp): - assert resp.http_request.query['loggingOptOut'] + assert resp.http_request.query["loggingOptOut"] + await client.recognize_pii_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -726,7 +744,8 @@ def callback(resp): @recorded_by_proxy_async async def test_disable_service_logs_body_param(self, client): def callback(resp): - assert json.loads(resp.http_request.body)['parameters']['loggingOptOut'] + assert json.loads(resp.http_request.body)["parameters"]["loggingOptOut"] + await client.recognize_pii_entities( documents=["Test for logging disable"], disable_service_logs=True, @@ -739,8 +758,8 @@ async def test_pii_entities_multiapi_validate_v3_0(self, **kwargs): client = kwargs.pop("client") with pytest.raises(ValueError) as e: - await client.recognize_pii_entities( - documents=["Test"] - ) - assert str(e.value) == "'TextAnalyticsClient.recognize_pii_entities' is not available in API version v3.0. " \ - "Use service API version v3.1 or newer." \ No newline at end of file + await client.recognize_pii_entities(documents=["Test"]) + assert ( + str(e.value) == "'TextAnalyticsClient.recognize_pii_entities' is not available in API version v3.0. " + "Use service API version v3.1 or newer." + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py index b671d9edacc7..61efac6df2fb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py @@ -14,28 +14,24 @@ # Adding in assert for each pytest fixture so it's easier to narrow down where the problem is """general""" + + @pytest.fixture def text_document_statistics(): - model = _models.TextDocumentStatistics( - character_count=14, - transaction_count=18 - ) + model = _models.TextDocumentStatistics(character_count=14, transaction_count=18) model_repr = "TextDocumentStatistics(character_count=14, transaction_count=18)" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def text_analytics_warning(): - model = _models.TextAnalyticsWarning( - code="LongWordsInDocument", - message="warning" - ) - model_repr = ( - "TextAnalyticsWarning(code=LongWordsInDocument, message=warning)" - ) + model = _models.TextAnalyticsWarning(code="LongWordsInDocument", message="warning") + model_repr = "TextAnalyticsWarning(code=LongWordsInDocument, message=warning)" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def text_analytics_error(): model = _models.TextAnalyticsError( @@ -50,6 +46,7 @@ def text_analytics_error(): """detect language models""" + @pytest.fixture def detected_language(): model = _models.DetectedLanguage( @@ -61,7 +58,10 @@ def detected_language(): assert repr(model) == model_repr return model, model_repr + """recognize entities models""" + + @pytest.fixture def categorized_entity(): model = _models.CategorizedEntity( @@ -71,7 +71,7 @@ def categorized_entity(): length=10, offset=0, confidence_score=0.899, - resolutions=[] + resolutions=[], ) model_repr = ( "CategorizedEntity(text=Bill Gates, category=Person, subcategory=Age, " @@ -80,34 +80,33 @@ def categorized_entity(): assert repr(model) == model_repr return model, model_repr + """recognize PII entities models""" + + @pytest.fixture def pii_entity(): model = _models.PiiEntity( - text="859-98-0987", - category="SSN", - subcategory=None, - length=11, - offset=0, - confidence_score=0.899 + text="859-98-0987", category="SSN", subcategory=None, length=11, offset=0, confidence_score=0.899 + ) + model_repr = ( + "PiiEntity(text=859-98-0987, category=SSN, subcategory=None, length=11, offset=0, confidence_score=0.899)" ) - model_repr = "PiiEntity(text=859-98-0987, category=SSN, subcategory=None, length=11, offset=0, confidence_score=0.899)" assert repr(model) == model_repr return model, model_repr + """recognize linked entity models""" + + @pytest.fixture def linked_entity_match(): - model = _models.LinkedEntityMatch( - confidence_score=0.999, - text="Bill Gates", - offset=0, - length=10 - ) + model = _models.LinkedEntityMatch(confidence_score=0.999, text="Bill Gates", offset=0, length=10) model_repr = "LinkedEntityMatch(confidence_score=0.999, text=Bill Gates, length=10, offset=0)" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def linked_entity(linked_entity_match): model = _models.LinkedEntity( @@ -117,11 +116,11 @@ def linked_entity(linked_entity_match): data_source_entity_id="Bill Gates", url="https://en.wikipedia.org/wiki/Bill_Gates", data_source="wikipedia", - bing_entity_search_api_id="12345678" + bing_entity_search_api_id="12345678", ) model_repr = ( - "LinkedEntity(name=Bill Gates, matches=[{}, {}], "\ - "language=English, data_source_entity_id=Bill Gates, "\ + "LinkedEntity(name=Bill Gates, matches=[{}, {}], " + "language=English, data_source_entity_id=Bill Gates, " "url=https://en.wikipedia.org/wiki/Bill_Gates, data_source=wikipedia, bing_entity_search_api_id=12345678)".format( linked_entity_match[1], linked_entity_match[1] ) @@ -129,30 +128,26 @@ def linked_entity(linked_entity_match): assert repr(model) == model_repr return model, model_repr + """analyze sentiment models""" + @pytest.fixture def sentiment_confidence_scores(): - model = _models.SentimentConfidenceScores( - positive=0.99, - neutral=0.05, - negative=0.02 - ) + model = _models.SentimentConfidenceScores(positive=0.99, neutral=0.05, negative=0.02) model_repr = "SentimentConfidenceScores(positive=0.99, neutral=0.05, negative=0.02)" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def target_assessment_confidence_score(): - model = _models.SentimentConfidenceScores( - positive=0.5, - negative=0.5, - neutral=0.0 - ) + model = _models.SentimentConfidenceScores(positive=0.5, negative=0.5, neutral=0.0) model_repr = "SentimentConfidenceScores(positive=0.5, neutral=0.0, negative=0.5)" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def target_sentiment(target_assessment_confidence_score): model = _models.TargetSentiment( @@ -168,6 +163,7 @@ def target_sentiment(target_assessment_confidence_score): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def assessment_sentiment(target_assessment_confidence_score): model = _models.AssessmentSentiment( @@ -176,7 +172,7 @@ def assessment_sentiment(target_assessment_confidence_score): confidence_scores=target_assessment_confidence_score[0], length=7, offset=3, - is_negated=False + is_negated=False, ) model_repr = "AssessmentSentiment(text=opinion, sentiment=positive, confidence_scores={}, length=7, offset=3, is_negated=False)".format( target_assessment_confidence_score[1] @@ -184,16 +180,15 @@ def assessment_sentiment(target_assessment_confidence_score): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def mined_opinion(target_sentiment, assessment_sentiment): - model = _models.MinedOpinion( - target=target_sentiment[0], - assessments=[assessment_sentiment[0]] - ) + model = _models.MinedOpinion(target=target_sentiment[0], assessments=[assessment_sentiment[0]]) model_repr = f"MinedOpinion(target={target_sentiment[1]}, assessments=[{assessment_sentiment[1]}])" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def sentence_sentiment(sentiment_confidence_scores, mined_opinion): model = _models.SentenceSentiment( @@ -202,17 +197,16 @@ def sentence_sentiment(sentiment_confidence_scores, mined_opinion): confidence_scores=sentiment_confidence_scores[0], length=19, offset=0, - mined_opinions=[mined_opinion[0]] + mined_opinions=[mined_opinion[0]], ) model_repr = ( "SentenceSentiment(text=sentence., sentiment=neutral, confidence_scores={}, " - "length=19, offset=0, mined_opinions=[{}])".format( - sentiment_confidence_scores[1], mined_opinion[1] - ) + "length=19, offset=0, mined_opinions=[{}])".format(sentiment_confidence_scores[1], mined_opinion[1]) ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def recognize_pii_entities_result(pii_entity, text_analytics_warning, text_document_statistics): model = _models.RecognizePiiEntitiesResult( @@ -222,14 +216,17 @@ def recognize_pii_entities_result(pii_entity, text_analytics_warning, text_docum warnings=[text_analytics_warning[0]], statistics=text_document_statistics[0], ) - model_repr = "RecognizePiiEntitiesResult(id=1, entities=[{}], redacted_text=***********, warnings=[{}], " \ - "statistics={}, is_error=False, kind=PiiEntityRecognition)".format( - pii_entity[1], text_analytics_warning[1], text_document_statistics[1] + model_repr = ( + "RecognizePiiEntitiesResult(id=1, entities=[{}], redacted_text=***********, warnings=[{}], " + "statistics={}, is_error=False, kind=PiiEntityRecognition)".format( + pii_entity[1], text_analytics_warning[1], text_document_statistics[1] + ) ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def recognize_entities_result(categorized_entity, text_analytics_warning, text_document_statistics): model = _models.RecognizeEntitiesResult( @@ -245,6 +242,7 @@ def recognize_entities_result(categorized_entity, text_analytics_warning, text_d assert repr(model) == model_repr return model, model_repr + @pytest.fixture def extract_key_phrases_result(text_analytics_warning, text_document_statistics): model = _models.ExtractKeyPhrasesResult( @@ -260,6 +258,7 @@ def extract_key_phrases_result(text_analytics_warning, text_document_statistics) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def data_source(): model = _models.HealthcareEntityDataSource( @@ -271,6 +270,7 @@ def data_source(): assert repr(model) == model_repr return model, model_repr + @pytest.fixture def healthcare_entity_assertion(): model = _models.HealthcareEntityAssertion( @@ -278,11 +278,14 @@ def healthcare_entity_assertion(): certainty="certainty", association="association", ) - model_repr = "HealthcareEntityAssertion(conditionality=conditionality, certainty=certainty, association=association)" + model_repr = ( + "HealthcareEntityAssertion(conditionality=conditionality, certainty=certainty, association=association)" + ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def healthcare_entity(data_source, healthcare_entity_assertion): model = _models.HealthcareEntity( @@ -297,55 +300,47 @@ def healthcare_entity(data_source, healthcare_entity_assertion): data_sources=[data_source[0]], ) model_repr = ( - "HealthcareEntity(text=Bonjour, normalized_text=Bonjour, category=MyCategory, subcategory=MySubcategory, assertion={}, length=7, offset=12, "\ + "HealthcareEntity(text=Bonjour, normalized_text=Bonjour, category=MyCategory, subcategory=MySubcategory, assertion={}, length=7, offset=12, " "confidence_score=0.95, data_sources=[{}])".format(healthcare_entity_assertion[1], data_source[1]) ) assert repr(model) == model_repr return model, model_repr + @pytest.fixture def healthcare_relation_role(healthcare_entity): - model = _models.HealthcareRelationRole( - name="ROLE", - entity=healthcare_entity[0] - ) + model = _models.HealthcareRelationRole(name="ROLE", entity=healthcare_entity[0]) model_repr = f"HealthcareRelationRole(name=ROLE, entity={healthcare_entity[1]})" assert repr(model) == model_repr return model, model_repr + @pytest.fixture def healthcare_relation(healthcare_relation_role): model = _models.HealthcareRelation( - relation_type="DOSAGE", - roles=[healthcare_relation_role[0]], - confidence_score=1.0 + relation_type="DOSAGE", roles=[healthcare_relation_role[0]], confidence_score=1.0 ) - model_repr = f"HealthcareRelation(relation_type=DOSAGE, roles=[{healthcare_relation_role[1]}], confidence_score=1.0)" + model_repr = ( + f"HealthcareRelation(relation_type=DOSAGE, roles=[{healthcare_relation_role[1]}], confidence_score=1.0)" + ) assert repr(model) == model_repr return model, model_repr -class TestRepr(): + +class TestRepr: def test_text_document_input(self): - model = _models.TextDocumentInput( - id="1", - text="hello world", - language="en" - ) + model = _models.TextDocumentInput(id="1", text="hello world", language="en") model_repr = "TextDocumentInput(id=1, text=hello world, language=en)" assert repr(model) == model_repr def test_detect_language_input(self): - model = _models.DetectLanguageInput( - id="1", - text="hello world", - country_hint="US" - ) + model = _models.DetectLanguageInput(id="1", text="hello world", country_hint="US") model_repr = "DetectLanguageInput(id=1, text=hello world, country_hint=US)" assert repr(model) == model_repr @@ -361,10 +356,7 @@ def test_document_error(self, text_analytics_error): def test_text_document_batch_statistics(self): model = _models.TextDocumentBatchStatistics( - document_count=1, - valid_document_count=2, - erroneous_document_count=3, - transaction_count=4 + document_count=1, valid_document_count=2, erroneous_document_count=3, transaction_count=4 ) model_repr = ( "TextDocumentBatchStatistics(document_count=1, valid_document_count=2, " @@ -386,7 +378,9 @@ def test_detect_language_result(self, detected_language, text_analytics_warning, assert repr(model) == model_repr - def test_recognized_linked_entities_result(self, linked_entity, text_analytics_warning, text_document_statistics, detected_language): + def test_recognized_linked_entities_result( + self, linked_entity, text_analytics_warning, text_document_statistics, detected_language + ): model = _models.RecognizeLinkedEntitiesResult( id="1", entities=[linked_entity[0]], @@ -394,13 +388,20 @@ def test_recognized_linked_entities_result(self, linked_entity, text_analytics_w statistics=text_document_statistics[0], ) model_repr = "RecognizeLinkedEntitiesResult(id=1, entities=[{}], warnings=[{}], statistics={}, is_error=False, kind=EntityLinking)".format( - linked_entity[1], text_analytics_warning[1], text_document_statistics[1], + linked_entity[1], + text_analytics_warning[1], + text_document_statistics[1], ) assert repr(model) == model_repr def test_analyze_sentiment_result( - self, text_analytics_warning, text_document_statistics, sentiment_confidence_scores, sentence_sentiment, detected_language + self, + text_analytics_warning, + text_document_statistics, + sentiment_confidence_scores, + sentence_sentiment, + detected_language, ): model = _models.AnalyzeSentimentResult( id="1", @@ -413,7 +414,10 @@ def test_analyze_sentiment_result( model_repr = ( "AnalyzeSentimentResult(id=1, sentiment=positive, warnings=[{}], statistics={}, confidence_scores={}, " "sentences=[{}], is_error=False, kind=SentimentAnalysis)".format( - text_analytics_warning[1], text_document_statistics[1], sentiment_confidence_scores[1], sentence_sentiment[1] + text_analytics_warning[1], + text_document_statistics[1], + sentiment_confidence_scores[1], + sentence_sentiment[1], ) ) @@ -423,17 +427,17 @@ def test_inner_error_takes_precedence(self): generated_innererror = _generated_models.InnerError( code="UnsupportedLanguageCode", message="Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant", - ) generated_error = _generated_models.TextAnalyticsError( - code="InvalidArgument", - message="Invalid Language Code.", - innererror=generated_innererror + code="InvalidArgument", message="Invalid Language Code.", innererror=generated_innererror ) error = _models.TextAnalyticsError._from_generated(generated_error) assert error.code == "UnsupportedLanguageCode" - assert error.message == "Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant" + assert ( + error.message + == "Supplied language not supported. Pass in one of: de,en,es,fr,it,ja,ko,nl,pt-PT,zh-Hans,zh-Hant" + ) def test_analyze_healthcare_entities_result_item( self, healthcare_entity, healthcare_relation, text_analytics_warning, text_document_statistics @@ -446,10 +450,8 @@ def test_analyze_healthcare_entities_result_item( statistics=text_document_statistics[0], ) - model_repr = ( - "AnalyzeHealthcareEntitiesResult(id=1, entities=[{}], entity_relations=[{}], warnings=[{}], statistics={}, is_error=False, kind=Healthcare)".format( - healthcare_entity[1], healthcare_relation[1], text_analytics_warning[1], text_document_statistics[1], "{}" - ) + model_repr = "AnalyzeHealthcareEntitiesResult(id=1, entities=[{}], entity_relations=[{}], warnings=[{}], statistics={}, is_error=False, kind=Healthcare)".format( + healthcare_entity[1], healthcare_relation[1], text_analytics_warning[1], text_document_statistics[1], "{}" ) - assert repr(model)[:1024] == model_repr[:1024] \ No newline at end of file + assert repr(model)[:1024] == model_repr[:1024] diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization.py index 356161b099f2..ac64c3631be5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization.py @@ -8,11 +8,7 @@ from testcase import TextAnalyticsTest, TextAnalyticsPreparer, is_public_cloud from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer from devtools_testutils import recorded_by_proxy -from azure.ai.textanalytics import ( - TextAnalyticsClient, - ExtractiveSummaryResult, - AbstractiveSummaryResult -) +from azure.ai.textanalytics import TextAnalyticsClient, ExtractiveSummaryResult, AbstractiveSummaryResult # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) @@ -22,29 +18,34 @@ class TestSummarization(TextAnalyticsTest): def _interval(self): return 5 if self.is_live else 0 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_extract_summary(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + }, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] response = client.begin_extract_summary( docs, @@ -66,12 +67,13 @@ def test_extract_summary(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_extract_summary_action_with_options(self, client): - docs = ["The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + docs = [ + "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " @@ -86,7 +88,8 @@ def test_extract_summary_action_with_options(self, client): "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."] + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said." + ] response = client.begin_extract_summary( docs, @@ -112,28 +115,33 @@ def test_extract_summary_action_with_options(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_abstract_summary_action(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + } + ] response = client.begin_abstract_summary( docs, @@ -151,28 +159,33 @@ def test_abstract_summary_action(self, client): assert context.length is not None assert summary.text - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy def test_abstract_summary_action_with_options(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + } + ] response = client.begin_abstract_summary( docs, diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization_async.py index 874712e14985..5577fe7cc2be 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_summarization_async.py @@ -9,10 +9,7 @@ from testcase import TextAnalyticsClientPreparer as _TextAnalyticsClientPreparer from devtools_testutils.aio import recorded_by_proxy_async from azure.ai.textanalytics.aio import TextAnalyticsClient -from azure.ai.textanalytics import ( - ExtractiveSummaryResult, - AbstractiveSummaryResult -) +from azure.ai.textanalytics import ExtractiveSummaryResult, AbstractiveSummaryResult # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) @@ -22,36 +19,43 @@ class TestSummarization(TextAnalyticsTest): def _interval(self): return 5 if self.is_live else 0 - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_extract_summary(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}, - {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + }, + {"id": "2", "language": "es", "text": "Microsoft fue fundado por Bill Gates y Paul Allen"}, + ] async with client: - document_results = await (await client.begin_extract_summary( - docs, - show_stats=True, - polling_interval=self._interval(), - )).result() + document_results = await ( + await client.begin_extract_summary( + docs, + show_stats=True, + polling_interval=self._interval(), + ) + ).result() async for result in document_results: assert isinstance(result, ExtractiveSummaryResult) @@ -64,12 +68,13 @@ async def test_extract_summary(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_extract_summary_action_with_options(self, client): - docs = ["The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + docs = [ + "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " @@ -84,16 +89,19 @@ async def test_extract_summary_action_with_options(self, client): "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."] + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said." + ] async with client: - response = await (await client.begin_extract_summary( - docs, - max_sentence_count=5, - order_by="Rank", - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_extract_summary( + docs, + max_sentence_count=5, + order_by="Rank", + show_stats=True, + polling_interval=self._interval(), + ) + ).result() async for result in response: assert isinstance(result, ExtractiveSummaryResult) @@ -108,35 +116,42 @@ async def test_extract_summary_action_with_options(self, client): assert sentence.length is not None assert result.id is not None - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_abstract_summary_action(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}] + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + } + ] async with client: - response = await (await client.begin_abstract_summary( - docs, - show_stats=True, - polling_interval=self._interval(), - )).result() + response = await ( + await client.begin_abstract_summary( + docs, + show_stats=True, + polling_interval=self._interval(), + ) + ).result() async for result in response: assert isinstance(result, AbstractiveSummaryResult) @@ -148,35 +163,42 @@ async def test_abstract_summary_action(self, client): assert context.length is not None assert summary.text - @pytest.mark.skipif(not is_public_cloud(), reason='Usgov and China Cloud are not supported') + @pytest.mark.skipif(not is_public_cloud(), reason="Usgov and China Cloud are not supported") @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @recorded_by_proxy_async async def test_abstract_summary_action_with_options(self, client): - docs = [{"id": "1", "language": "en", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" - " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " - "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " - "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " - "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " - "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" - " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " - "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " - "about the best way of delivering our shared commitment to honoring the result of the referendum. The " - "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " - "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " - "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " - "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " - "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " - "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " - "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said."}] - - response = await (await client.begin_abstract_summary( - docs, - sentence_count=5, - show_stats=True, - polling_interval=self._interval(), - )).result() + docs = [ + { + "id": "1", + "language": "en", + "text": "The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation" + " of two senior Cabinet ministers in a deep split over her Brexit strategy. The Foreign Secretary Boris " + "Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of " + "Brexit negotiations, David Davis. Their decision to leave the government came three days after May " + "appeared to have agreed a deal with her fractured Cabinet on the UK's post Brexit relationship with " + "the EU. That plan is now in tatters and her political future appears uncertain. May appeared in Parliament" + " on Monday afternoon to defend her plan, minutes after Downing Street confirmed the departure of Johnson. " + "May acknowledged the splits in her statement to MPs, saying of the ministers who quit: We do not agree " + "about the best way of delivering our shared commitment to honoring the result of the referendum. The " + "Prime Minister's latest political drama began late on Sunday night when Davis quit, declaring he could " + "not support May's Brexit plan. He said it involved too close a relationship with the EU and gave only " + "an illusion of control being returned to the UK after it left the EU. It seems to me we're giving too " + "much away, too easily, and that's a dangerous strategy at this time, Davis said in a BBC radio " + "interview Monday morning. Johnson's resignation came Monday afternoon local time, just before the " + "Prime Minister was due to make a scheduled statement in Parliament. This afternoon, the Prime Minister " + "accepted the resignation of Boris Johnson as Foreign Secretary, a statement from Downing Street said.", + } + ] + + response = await ( + await client.begin_abstract_summary( + docs, + sentence_count=5, + show_stats=True, + polling_interval=self._interval(), + ) + ).result() async for result in response: assert isinstance(result, AbstractiveSummaryResult) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py index 9acffe8cb336..9a12b6dfa721 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py @@ -16,18 +16,18 @@ RecognizePiiEntitiesResult, AnalyzeSentimentResult, ExtractKeyPhrasesResult, - _AnalyzeActionsType + _AnalyzeActionsType, ) from devtools_testutils import PowerShellPreparer, AzureRecordedTestCase def is_public_cloud(): - return (".microsoftonline.com" in os.getenv('AZURE_AUTHORITY_HOST', '')) + return ".microsoftonline.com" in os.getenv("AZURE_AUTHORITY_HOST", "") TextAnalyticsPreparer = functools.partial( PowerShellPreparer, - 'textanalytics', + "textanalytics", textanalytics_test_endpoint="https://fakeendpoint.cognitiveservices.azure.com/", textanalytics_test_api_key="fakeZmFrZV9hY29jdW50X2tleQ==", ) @@ -35,10 +35,7 @@ def is_public_cloud(): class TextAnalyticsClientPreparer(AzureMgmtPreparer): def __init__(self, client_cls, client_kwargs={}, **kwargs): - super().__init__( - name_prefix='', - random_name_length=42 - ) + super().__init__(name_prefix="", random_name_length=42) self.client_kwargs = client_kwargs self.client_cls = client_cls @@ -50,9 +47,7 @@ def create_resource(self, name, **kwargs): textanalytics_test_api_key = self.client_kwargs.pop("textanalytics_test_api_key") client = self.client_cls( - textanalytics_test_endpoint, - AzureKeyCredential(textanalytics_test_api_key), - **self.client_kwargs + textanalytics_test_endpoint, AzureKeyCredential(textanalytics_test_api_key), **self.client_kwargs ) kwargs.update({"client": client}) return kwargs @@ -84,7 +79,6 @@ def assert_healthcare_data_sources_equal(self, data_sources_a, data_sources_b): assert data_source_a.entity_id == data_source_b.entity_id assert data_source_a.name == data_source_b.name - def assert_healthcare_entities_equal(self, entity_a, entity_b): assert entity_a.text == entity_b.text assert entity_a.category == entity_b.category diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_patch.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_patch.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/_patch.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/_patch.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/operations/_patch.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/operations/_patch.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_patch.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_patch.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_patch.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_patch.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py index 93509e656cae..782868141a05 100644 --- a/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py +++ b/sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,57 +16,63 @@ PACKAGE_PPRINT_NAME = "Time Series Insights Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -74,5 +80,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/_patch.py b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/_patch.py +++ b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/_patch.py b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/_patch.py +++ b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/operations/_patch.py b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/operations/_patch.py +++ b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/_patch.py b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/_patch.py +++ b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/_patch.py b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/_patch.py +++ b/sdk/trafficmanager/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trafficmanager/azure-mgmt-trafficmanager/setup.py b/sdk/trafficmanager/azure-mgmt-trafficmanager/setup.py index 4fe2e82cc1e8..f2667418781b 100644 --- a/sdk/trafficmanager/azure-mgmt-trafficmanager/setup.py +++ b/sdk/trafficmanager/azure-mgmt-trafficmanager/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Traffic Manager Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "isodate<1.0.0,>=0.6.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_operations/_patch.py b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_operations/_patch.py index 0c597a6d71d5..4354d02d3333 100644 --- a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_operations/_patch.py +++ b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_operations/_patch.py @@ -328,7 +328,10 @@ def get_long_running_output(pipeline_response): deserialization_callback=get_long_running_output, ) return DocumentTranslationLROPoller[_models.TranslationStatus]( - self._client, raw_result, get_long_running_output, polling_method # pylint: disable=possibly-used-before-assignment + self._client, + raw_result, + get_long_running_output, + polling_method, # pylint: disable=possibly-used-before-assignment ) diff --git a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_operations/_patch.py b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_operations/_patch.py index 1961b4fee008..a1a12c56a885 100644 --- a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_operations/_patch.py +++ b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys from typing import AsyncIterator, Callable, Dict, Type, TypeVar, overload, Any, IO, List, Optional, Union, cast, Tuple from azure.core.polling import AsyncNoPolling, AsyncPollingMethod @@ -239,7 +240,10 @@ def get_long_running_output(pipeline_response): deserialization_callback=get_long_running_output, ) return AsyncDocumentTranslationLROPoller[_models.TranslationStatus]( - self._client, raw_result, get_long_running_output, polling_method # pylint: disable=possibly-used-before-assignment + self._client, + raw_result, + get_long_running_output, + polling_method, # pylint: disable=possibly-used-before-assignment ) diff --git a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_patch.py b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_patch.py index e4d7ef70cc73..a5525ffbf56b 100644 --- a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_patch.py +++ b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/aio/_patch.py @@ -56,10 +56,7 @@ class DocumentTranslationClient(GeneratedDocumentTranslationClient): """ def __init__( - self, - endpoint: str, - credential: Union[AzureKeyCredential, AsyncTokenCredential], - **kwargs: Any + self, endpoint: str, credential: Union[AzureKeyCredential, AsyncTokenCredential], **kwargs: Any ) -> None: """DocumentTranslationClient is your interface to the Document Translation service. Use the client to translate whole documents while preserving source document diff --git a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/models/_patch.py b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/models/_patch.py index fc95f5ceb09d..d28ae133efe7 100644 --- a/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/models/_patch.py +++ b/sdk/translation/azure-ai-translation-document/azure/ai/translation/document/models/_patch.py @@ -20,7 +20,6 @@ ) from ._enums import StorageInputType - if TYPE_CHECKING: from .. import models as _models diff --git a/sdk/translation/azure-ai-translation-document/samples/async_samples/sample_begin_translation_async.py b/sdk/translation/azure-ai-translation-document/samples/async_samples/sample_begin_translation_async.py index 4dad31b85b77..09d6f6659c5f 100644 --- a/sdk/translation/azure-ai-translation-document/samples/async_samples/sample_begin_translation_async.py +++ b/sdk/translation/azure-ai-translation-document/samples/async_samples/sample_begin_translation_async.py @@ -25,7 +25,6 @@ will be written. """ - import asyncio diff --git a/sdk/translation/azure-ai-translation-document/samples/sample_single_document_translation.py b/sdk/translation/azure-ai-translation-document/samples/sample_single_document_translation.py index 2236c81a220c..9fc03b2870e0 100644 --- a/sdk/translation/azure-ai-translation-document/samples/sample_single_document_translation.py +++ b/sdk/translation/azure-ai-translation-document/samples/sample_single_document_translation.py @@ -22,7 +22,6 @@ from azure.ai.translation.document import SingleDocumentTranslationClient from azure.ai.translation.document.models import DocumentTranslateContent - TEST_INPUT_FILE_NAME = os.path.abspath( os.path.join(os.path.abspath(__file__), "..", "../tests/TestData/test-input.txt") ) diff --git a/sdk/translation/azure-ai-translation-document/setup.py b/sdk/translation/azure-ai-translation-document/setup.py index 8464b676cfe9..2e378464bc92 100644 --- a/sdk/translation/azure-ai-translation-document/setup.py +++ b/sdk/translation/azure-ai-translation-document/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-translation-document" PACKAGE_PPRINT_NAME = "Azure Ai Translation Document" diff --git a/sdk/translation/azure-ai-translation-document/tests/preparer.py b/sdk/translation/azure-ai-translation-document/tests/preparer.py index e07fdf5fddae..21d4280f0748 100644 --- a/sdk/translation/azure-ai-translation-document/tests/preparer.py +++ b/sdk/translation/azure-ai-translation-document/tests/preparer.py @@ -8,7 +8,6 @@ import functools from devtools_testutils import PowerShellPreparer, AzureMgmtPreparer, get_credential - DocumentTranslationPreparer = functools.partial( PowerShellPreparer, "translation", diff --git a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_operations/_patch.py b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_operations/_patch.py index 67da7df3602b..b4a646e9ec01 100644 --- a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_operations/_patch.py +++ b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_operations/_patch.py @@ -9,6 +9,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping from typing import Any, cast, IO, List, Optional, overload, Union @@ -28,7 +29,9 @@ class _TextTranslationClientOperationsMixin( ): """Mixin class that delegates to the generated operations class while providing custom method signatures.""" - def _get_generated_operations(self) -> _TextTranslationClientOperationsMixinGenerated: # pylint: disable=protected-access + def _get_generated_operations( + self, + ) -> _TextTranslationClientOperationsMixinGenerated: # pylint: disable=protected-access """Get an instance of the generated operations mixin. This creates a wrapper object that shares the same _client, _config, _serialize, and _deserialize diff --git a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_patch.py b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_patch.py index 9c58006b2016..a78469a6df7e 100644 --- a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_patch.py +++ b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/_patch.py @@ -107,10 +107,8 @@ def set_authentication_policy(credential, kwargs): ) else: if kwargs.get("resource_id") or kwargs.get("region"): - raise ValueError( - """Both 'resource_id' and 'region' must be provided with a TokenCredential for - regional resource authentication.""" - ) + raise ValueError("""Both 'resource_id' and 'region' must be provided with a TokenCredential for + regional resource authentication.""") scope: str = kwargs.pop("audience", DEFAULT_ENTRA_ID_SCOPE) if not is_cognitive_services_scope(scope): scope = scope.rstrip("/").rstrip(DEFAULT_SCOPE) + DEFAULT_SCOPE diff --git a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_operations/_patch.py b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_operations/_patch.py index 6108c2397aed..43047ab9661b 100644 --- a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_operations/_patch.py +++ b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_operations/_patch.py @@ -9,6 +9,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from collections.abc import MutableMapping from typing import Any, cast, IO, List, Optional, overload, Union @@ -25,7 +26,9 @@ class _TextTranslationClientOperationsMixin(ClientMixinABC[AsyncPipelineClient, TextTranslationClientConfiguration]): """Mixin class that delegates to the generated operations class while providing custom method signatures.""" - def _get_generated_operations(self) -> _TextTranslationClientOperationsMixinGenerated: # pylint: disable=protected-access + def _get_generated_operations( + self, + ) -> _TextTranslationClientOperationsMixinGenerated: # pylint: disable=protected-access """Get an instance of the generated operations mixin. This creates a wrapper object that shares the same _client, _config, _serialize, and _deserialize diff --git a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_patch.py b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_patch.py index 153ee88e2ccb..2a69ed321850 100644 --- a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_patch.py +++ b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Optional, Any, overload from azure.core.pipeline import PipelineRequest from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy, AzureKeyCredentialPolicy @@ -81,10 +82,8 @@ def set_authentication_policy(credential, kwargs): ) else: if kwargs.get("resource_id") or kwargs.get("region"): - raise ValueError( - """Both 'resource_id' and 'region' must be provided with a TokenCredential - for regional resource authentication.""" - ) + raise ValueError("""Both 'resource_id' and 'region' must be provided with a TokenCredential + for regional resource authentication.""") scope: str = kwargs.pop("audience", DEFAULT_ENTRA_ID_SCOPE) if not is_cognitive_services_scope(scope): scope = scope.rstrip("/").rstrip(DEFAULT_SCOPE) + DEFAULT_SCOPE diff --git a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/models/_patch.py b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/models/_patch.py +++ b/sdk/translation/azure-ai-translation-text/azure/ai/translation/text/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/translation/azure-ai-translation-text/samples/sample_text_translation_languages.py b/sdk/translation/azure-ai-translation-text/samples/sample_text_translation_languages.py index f9b3de1f6c38..144544bd651a 100644 --- a/sdk/translation/azure-ai-translation-text/samples/sample_text_translation_languages.py +++ b/sdk/translation/azure-ai-translation-text/samples/sample_text_translation_languages.py @@ -24,6 +24,7 @@ 2) AZURE_TEXT_TRANSLATION_APIKEY - the API key to your Text Translation resource. 3) AZURE_TEXT_TRANSLATION_REGION - the Azure Region of your Text Translation resource. """ + from azure.core.exceptions import HttpResponseError # ------------------------------------------------------------------------- diff --git a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_patch.py b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_patch.py +++ b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/_patch.py b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/_patch.py +++ b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/operations/_patch.py b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/operations/_patch.py +++ b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/models/_patch.py b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/models/_patch.py +++ b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/operations/_patch.py b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/operations/_patch.py +++ b/sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/__init__.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/__init__.py index 69e3be50dac4..8db66d3d0f0f 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/__init__.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py index 4a86b4aac81a..e5514cf5ffad 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py @@ -10,6 +10,7 @@ __version__ = VERSION __all__ = models.__all__ + def _OverrideTopologySetRequestSerialize(self): topology_body = PipelineTopologySetRequestBody(name=self.pipeline_topology.name) topology_body.system_data = self.pipeline_topology.system_data @@ -17,8 +18,10 @@ def _OverrideTopologySetRequestSerialize(self): return topology_body.serialize() + PipelineTopologySetRequest.serialize = _OverrideTopologySetRequestSerialize + def _OverrideInstanceSetRequestSerialize(self): live_pipeline_body = LivePipelineSetRequestBody(name=self.live_pipeline.name) live_pipeline_body.system_data = self.live_pipeline.system_data @@ -26,8 +29,10 @@ def _OverrideInstanceSetRequestSerialize(self): return live_pipeline_body.serialize() + LivePipelineSetRequest.serialize = _OverrideInstanceSetRequestSerialize + def _OverrideRemoteDeviceAdapterSetRequestSerialize(self): remote_device_adapter_body = RemoteDeviceAdapterSetRequestBody(name=self.remote_device_adapter.name) remote_device_adapter_body.system_data = self.remote_device_adapter.system_data @@ -35,4 +40,5 @@ def _OverrideRemoteDeviceAdapterSetRequestSerialize(self): return remote_device_adapter_body.serialize() + RemoteDeviceAdapterSetRequest.serialize = _OverrideRemoteDeviceAdapterSetRequestSerialize diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/__init__.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/__init__.py index 5960c353a898..d55ccad1f573 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/__init__.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py index 9a223d15524c..0dafe0e287ff 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py @@ -7,6 +7,7 @@ from azure.core.pipeline.transport import HttpRequest + def _convert_request(request, files=None): data = request.content if not files else None request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py index 097ed5f499bd..ae7c83d44fed 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py @@ -245,129 +245,129 @@ ) __all__ = [ - 'CertificateSource', - 'CognitiveServicesVisionProcessor', - 'CredentialsBase', - 'DiscoveredOnvifDevice', - 'DiscoveredOnvifDeviceCollection', - 'EndpointBase', - 'ExtensionProcessorBase', - 'FileSink', - 'GrpcExtension', - 'GrpcExtensionDataTransfer', - 'H264Configuration', - 'HttpExtension', - 'HttpHeaderCredentials', - 'ImageFormatBmp', - 'ImageFormatJpeg', - 'ImageFormatPng', - 'ImageFormatProperties', - 'ImageFormatRaw', - 'ImageProperties', - 'ImageScale', - 'IotHubDeviceConnection', - 'IotHubMessageSink', - 'IotHubMessageSource', - 'LineCrossingProcessor', - 'LivePipeline', - 'LivePipelineActivateRequest', - 'LivePipelineCollection', - 'LivePipelineDeactivateRequest', - 'LivePipelineDeleteRequest', - 'LivePipelineGetRequest', - 'LivePipelineListRequest', - 'LivePipelineProperties', - 'LivePipelineSetRequest', - 'LivePipelineSetRequestBody', - 'MPEG4Configuration', - 'MediaProfile', - 'MediaUri', - 'MethodRequest', - 'MethodRequestEmptyBodyBase', - 'MotionDetectionProcessor', - 'NamedLineBase', - 'NamedLineString', - 'NamedPolygonBase', - 'NamedPolygonString', - 'NodeInput', - 'ObjectTrackingProcessor', - 'OnvifDevice', - 'OnvifDeviceDiscoverRequest', - 'OnvifDeviceGetRequest', - 'OnvifDns', - 'OnvifHostName', - 'OnvifSystemDateTime', - 'OutputSelector', - 'ParameterDeclaration', - 'ParameterDefinition', - 'PemCertificateList', - 'PipelineTopology', - 'PipelineTopologyCollection', - 'PipelineTopologyDeleteRequest', - 'PipelineTopologyGetRequest', - 'PipelineTopologyListRequest', - 'PipelineTopologyProperties', - 'PipelineTopologySetRequest', - 'PipelineTopologySetRequestBody', - 'ProcessorNodeBase', - 'RateControl', - 'RemoteDeviceAdapter', - 'RemoteDeviceAdapterCollection', - 'RemoteDeviceAdapterDeleteRequest', - 'RemoteDeviceAdapterGetRequest', - 'RemoteDeviceAdapterListRequest', - 'RemoteDeviceAdapterProperties', - 'RemoteDeviceAdapterSetRequest', - 'RemoteDeviceAdapterSetRequestBody', - 'RemoteDeviceAdapterTarget', - 'RtspSource', - 'SamplingOptions', - 'SignalGateProcessor', - 'SinkNodeBase', - 'SourceNodeBase', - 'SpatialAnalysisCustomOperation', - 'SpatialAnalysisOperationBase', - 'SpatialAnalysisOperationEventBase', - 'SpatialAnalysisPersonCountEvent', - 'SpatialAnalysisPersonCountOperation', - 'SpatialAnalysisPersonCountZoneEvents', - 'SpatialAnalysisPersonDistanceEvent', - 'SpatialAnalysisPersonDistanceOperation', - 'SpatialAnalysisPersonDistanceZoneEvents', - 'SpatialAnalysisPersonLineCrossingEvent', - 'SpatialAnalysisPersonLineCrossingLineEvents', - 'SpatialAnalysisPersonLineCrossingOperation', - 'SpatialAnalysisPersonZoneCrossingEvent', - 'SpatialAnalysisPersonZoneCrossingOperation', - 'SpatialAnalysisPersonZoneCrossingZoneEvents', - 'SpatialAnalysisTypedOperationBase', - 'SymmetricKeyCredentials', - 'SystemData', - 'TlsEndpoint', - 'TlsValidationOptions', - 'UnsecuredEndpoint', - 'UsernamePasswordCredentials', - 'VideoCreationProperties', - 'VideoEncoderConfiguration', - 'VideoPublishingOptions', - 'VideoResolution', - 'VideoSink', - 'GrpcExtensionDataTransferMode', - 'H264Profile', - 'ImageFormatRawPixelFormat', - 'ImageScaleMode', - 'LivePipelineState', - 'MPEG4Profile', - 'MotionDetectionSensitivity', - 'ObjectTrackingAccuracy', - 'OnvifSystemDateTimeType', - 'OutputSelectorOperator', - 'OutputSelectorProperty', - 'ParameterType', - 'RtspTransport', - 'SpatialAnalysisOperationFocus', - 'SpatialAnalysisPersonCountEventTrigger', - 'SpatialAnalysisPersonDistanceEventTrigger', - 'SpatialAnalysisPersonZoneCrossingEventType', - 'VideoEncoding', + "CertificateSource", + "CognitiveServicesVisionProcessor", + "CredentialsBase", + "DiscoveredOnvifDevice", + "DiscoveredOnvifDeviceCollection", + "EndpointBase", + "ExtensionProcessorBase", + "FileSink", + "GrpcExtension", + "GrpcExtensionDataTransfer", + "H264Configuration", + "HttpExtension", + "HttpHeaderCredentials", + "ImageFormatBmp", + "ImageFormatJpeg", + "ImageFormatPng", + "ImageFormatProperties", + "ImageFormatRaw", + "ImageProperties", + "ImageScale", + "IotHubDeviceConnection", + "IotHubMessageSink", + "IotHubMessageSource", + "LineCrossingProcessor", + "LivePipeline", + "LivePipelineActivateRequest", + "LivePipelineCollection", + "LivePipelineDeactivateRequest", + "LivePipelineDeleteRequest", + "LivePipelineGetRequest", + "LivePipelineListRequest", + "LivePipelineProperties", + "LivePipelineSetRequest", + "LivePipelineSetRequestBody", + "MPEG4Configuration", + "MediaProfile", + "MediaUri", + "MethodRequest", + "MethodRequestEmptyBodyBase", + "MotionDetectionProcessor", + "NamedLineBase", + "NamedLineString", + "NamedPolygonBase", + "NamedPolygonString", + "NodeInput", + "ObjectTrackingProcessor", + "OnvifDevice", + "OnvifDeviceDiscoverRequest", + "OnvifDeviceGetRequest", + "OnvifDns", + "OnvifHostName", + "OnvifSystemDateTime", + "OutputSelector", + "ParameterDeclaration", + "ParameterDefinition", + "PemCertificateList", + "PipelineTopology", + "PipelineTopologyCollection", + "PipelineTopologyDeleteRequest", + "PipelineTopologyGetRequest", + "PipelineTopologyListRequest", + "PipelineTopologyProperties", + "PipelineTopologySetRequest", + "PipelineTopologySetRequestBody", + "ProcessorNodeBase", + "RateControl", + "RemoteDeviceAdapter", + "RemoteDeviceAdapterCollection", + "RemoteDeviceAdapterDeleteRequest", + "RemoteDeviceAdapterGetRequest", + "RemoteDeviceAdapterListRequest", + "RemoteDeviceAdapterProperties", + "RemoteDeviceAdapterSetRequest", + "RemoteDeviceAdapterSetRequestBody", + "RemoteDeviceAdapterTarget", + "RtspSource", + "SamplingOptions", + "SignalGateProcessor", + "SinkNodeBase", + "SourceNodeBase", + "SpatialAnalysisCustomOperation", + "SpatialAnalysisOperationBase", + "SpatialAnalysisOperationEventBase", + "SpatialAnalysisPersonCountEvent", + "SpatialAnalysisPersonCountOperation", + "SpatialAnalysisPersonCountZoneEvents", + "SpatialAnalysisPersonDistanceEvent", + "SpatialAnalysisPersonDistanceOperation", + "SpatialAnalysisPersonDistanceZoneEvents", + "SpatialAnalysisPersonLineCrossingEvent", + "SpatialAnalysisPersonLineCrossingLineEvents", + "SpatialAnalysisPersonLineCrossingOperation", + "SpatialAnalysisPersonZoneCrossingEvent", + "SpatialAnalysisPersonZoneCrossingOperation", + "SpatialAnalysisPersonZoneCrossingZoneEvents", + "SpatialAnalysisTypedOperationBase", + "SymmetricKeyCredentials", + "SystemData", + "TlsEndpoint", + "TlsValidationOptions", + "UnsecuredEndpoint", + "UsernamePasswordCredentials", + "VideoCreationProperties", + "VideoEncoderConfiguration", + "VideoPublishingOptions", + "VideoResolution", + "VideoSink", + "GrpcExtensionDataTransferMode", + "H264Profile", + "ImageFormatRawPixelFormat", + "ImageScaleMode", + "LivePipelineState", + "MPEG4Profile", + "MotionDetectionSensitivity", + "ObjectTrackingAccuracy", + "OnvifSystemDateTimeType", + "OutputSelectorOperator", + "OutputSelectorProperty", + "ParameterType", + "RtspTransport", + "SpatialAnalysisOperationFocus", + "SpatialAnalysisPersonCountEventTrigger", + "SpatialAnalysisPersonDistanceEventTrigger", + "SpatialAnalysisPersonZoneCrossingEventType", + "VideoEncoding", ] diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py index dfd1856bafd0..1692a8b7936c 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py @@ -11,8 +11,7 @@ class GrpcExtensionDataTransferMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Data transfer mode: embedded or sharedMemory. - """ + """Data transfer mode: embedded or sharedMemory.""" #: Media samples are embedded into the gRPC messages. This mode is less efficient but it requires #: a simpler implementations and can be used with plugins which are not on the same node as the @@ -23,18 +22,18 @@ class GrpcExtensionDataTransferMode(str, Enum, metaclass=CaseInsensitiveEnumMeta #: sharing the same shared memory space. SHARED_MEMORY = "sharedMemory" + class H264Profile(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The H264 Profile - """ + """The H264 Profile""" BASELINE = "Baseline" MAIN = "Main" EXTENDED = "Extended" HIGH = "High" + class ImageFormatRawPixelFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Pixel format to be applied to the raw image. - """ + """Pixel format to be applied to the raw image.""" #: Planar YUV 4:2:0, 12bpp, (1 Cr and Cb sample per 2x2 Y samples). YUV420_P = "yuv420p" @@ -59,9 +58,9 @@ class ImageFormatRawPixelFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Packed BGRA 8:8:8:8, 32bpp, BGRABGRA. BGRA = "bgra" + class ImageScaleMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes the image scaling mode to be applied. Default mode is 'pad'. - """ + """Describes the image scaling mode to be applied. Default mode is 'pad'.""" #: Preserves the same aspect ratio as the input image. If only one image dimension is provided, #: the second dimension is calculated based on the input image aspect ratio. When 2 dimensions are @@ -75,9 +74,9 @@ class ImageScaleMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Stretches the original image so it resized to the specified dimensions. STRETCH = "stretch" + class LivePipelineState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current pipeline state (read-only). - """ + """Current pipeline state (read-only).""" #: The live pipeline is idle and not processing media. INACTIVE = "inactive" @@ -91,9 +90,9 @@ class LivePipelineState(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The live pipeline is transitioning into the inactive state. DEACTIVATING = "deactivating" + class MotionDetectionSensitivity(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Motion detection sensitivity: low, medium, high. - """ + """Motion detection sensitivity: low, medium, high.""" #: Low sensitivity. LOW = "low" @@ -102,15 +101,16 @@ class MotionDetectionSensitivity(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: High sensitivity. HIGH = "high" + class MPEG4Profile(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The MPEG4 Profile - """ + """The MPEG4 Profile""" #: Simple Profile. SP = "SP" #: Advanced Simple Profile. ASP = "ASP" + class ObjectTrackingAccuracy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU consumption in average. @@ -123,32 +123,32 @@ class ObjectTrackingAccuracy(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: High accuracy. HIGH = "high" + class OnvifSystemDateTimeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """An enum value determining whether the date time was configured using NTP or manual. - """ + """An enum value determining whether the date time was configured using NTP or manual.""" NTP = "Ntp" MANUAL = "Manual" + class OutputSelectorOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The operator to compare properties by. - """ + """The operator to compare properties by.""" #: The property is of the type defined by value. IS_ENUM = "is" #: The property is not of the type defined by value. IS_NOT = "isNot" + class OutputSelectorProperty(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The property of the data stream to be used as the selection criteria. - """ + """The property of the data stream to be used as the selection criteria.""" #: The stream's MIME type or subtype: audio, video or application. MEDIA_TYPE = "mediaType" + class ParameterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of the parameter. - """ + """Type of the parameter.""" #: The parameter's value is a string. STRING = "string" @@ -161,6 +161,7 @@ class ParameterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The parameter's value is a boolean value that is either true or false. BOOL = "bool" + class RtspTransport(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are @@ -175,9 +176,9 @@ class RtspTransport(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: channel. TCP = "tcp" + class SpatialAnalysisOperationFocus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The operation focus type. - """ + """The operation focus type.""" #: The center of the object. CENTER = "center" @@ -186,36 +187,36 @@ class SpatialAnalysisOperationFocus(str, Enum, metaclass=CaseInsensitiveEnumMeta #: The footprint. FOOTPRINT = "footprint" + class SpatialAnalysisPersonCountEventTrigger(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The event trigger type. - """ + """The event trigger type.""" #: Event trigger. EVENT = "event" #: Interval trigger. INTERVAL = "interval" + class SpatialAnalysisPersonDistanceEventTrigger(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The event trigger type. - """ + """The event trigger type.""" #: Event trigger. EVENT = "event" #: Interval trigger. INTERVAL = "interval" + class SpatialAnalysisPersonZoneCrossingEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The event type. - """ + """The event type.""" #: Zone crossing event type. ZONE_CROSSING = "zoneCrossing" #: Zone dwell time event type. ZONE_DWELL_TIME = "zoneDwellTime" + class VideoEncoding(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The video codec used by the Media Profile. - """ + """The video codec used by the Media Profile.""" #: The Media Profile uses JPEG encoding. JPEG = "JPEG" diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py index fc9639f4f6ac..9a4027544438 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py @@ -22,23 +22,17 @@ class CertificateSource(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.PemCertificateList': 'PemCertificateList'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.PemCertificateList": "PemCertificateList"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(CertificateSource, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -61,25 +55,29 @@ class ProcessorNodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor': 'CognitiveServicesVisionProcessor', '#Microsoft.VideoAnalyzer.ExtensionProcessorBase': 'ExtensionProcessorBase', '#Microsoft.VideoAnalyzer.LineCrossingProcessor': 'LineCrossingProcessor', '#Microsoft.VideoAnalyzer.MotionDetectionProcessor': 'MotionDetectionProcessor', '#Microsoft.VideoAnalyzer.ObjectTrackingProcessor': 'ObjectTrackingProcessor', '#Microsoft.VideoAnalyzer.SignalGateProcessor': 'SignalGateProcessor'} + "type": { + "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor": "CognitiveServicesVisionProcessor", + "#Microsoft.VideoAnalyzer.ExtensionProcessorBase": "ExtensionProcessorBase", + "#Microsoft.VideoAnalyzer.LineCrossingProcessor": "LineCrossingProcessor", + "#Microsoft.VideoAnalyzer.MotionDetectionProcessor": "MotionDetectionProcessor", + "#Microsoft.VideoAnalyzer.ObjectTrackingProcessor": "ObjectTrackingProcessor", + "#Microsoft.VideoAnalyzer.SignalGateProcessor": "SignalGateProcessor", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -89,8 +87,8 @@ def __init__( """ super(ProcessorNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.name = kwargs['name'] - self.inputs = kwargs['inputs'] + self.name = kwargs["name"] + self.inputs = kwargs["inputs"] class CognitiveServicesVisionProcessor(ProcessorNodeBase): @@ -118,27 +116,24 @@ class CognitiveServicesVisionProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'operation': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "operation": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, - 'operation': {'key': 'operation', 'type': 'SpatialAnalysisOperationBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, + "operation": {"key": "operation", "type": "SpatialAnalysisOperationBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -157,11 +152,11 @@ def __init__( :paramtype operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase """ super(CognitiveServicesVisionProcessor, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor' # type: str - self.endpoint = kwargs['endpoint'] - self.image = kwargs.get('image', None) - self.sampling_options = kwargs.get('sampling_options', None) - self.operation = kwargs['operation'] + self.type = "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor" # type: str + self.endpoint = kwargs["endpoint"] + self.image = kwargs.get("image", None) + self.sampling_options = kwargs.get("sampling_options", None) + self.operation = kwargs["operation"] class CredentialsBase(msrest.serialization.Model): @@ -177,23 +172,23 @@ class CredentialsBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.HttpHeaderCredentials': 'HttpHeaderCredentials', '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials': 'SymmetricKeyCredentials', '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} + "type": { + "#Microsoft.VideoAnalyzer.HttpHeaderCredentials": "HttpHeaderCredentials", + "#Microsoft.VideoAnalyzer.SymmetricKeyCredentials": "SymmetricKeyCredentials", + "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials": "UsernamePasswordCredentials", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(CredentialsBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -215,16 +210,13 @@ class DiscoveredOnvifDevice(msrest.serialization.Model): """ _attribute_map = { - 'service_identifier': {'key': 'serviceIdentifier', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'scopes': {'key': 'scopes', 'type': '[str]'}, - 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + "service_identifier": {"key": "serviceIdentifier", "type": "str"}, + "remote_ip_address": {"key": "remoteIPAddress", "type": "str"}, + "scopes": {"key": "scopes", "type": "[str]"}, + "endpoints": {"key": "endpoints", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword service_identifier: The unique identifier of the ONVIF device that was discovered in the same subnet as the IoT Edge device. @@ -240,10 +232,10 @@ def __init__( :paramtype endpoints: list[str] """ super(DiscoveredOnvifDevice, self).__init__(**kwargs) - self.service_identifier = kwargs.get('service_identifier', None) - self.remote_ip_address = kwargs.get('remote_ip_address', None) - self.scopes = kwargs.get('scopes', None) - self.endpoints = kwargs.get('endpoints', None) + self.service_identifier = kwargs.get("service_identifier", None) + self.remote_ip_address = kwargs.get("remote_ip_address", None) + self.scopes = kwargs.get("scopes", None) + self.endpoints = kwargs.get("endpoints", None) class DiscoveredOnvifDeviceCollection(msrest.serialization.Model): @@ -255,20 +247,17 @@ class DiscoveredOnvifDeviceCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[DiscoveredOnvifDevice]'}, + "value": {"key": "value", "type": "[DiscoveredOnvifDevice]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: An array of ONVIF devices that have been discovered in the same subnet as the IoT Edge device. :paramtype value: list[~azure.media.videoanalyzer.edge.models.DiscoveredOnvifDevice] """ super(DiscoveredOnvifDeviceCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class EndpointBase(msrest.serialization.Model): @@ -288,24 +277,24 @@ class EndpointBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.TlsEndpoint': 'TlsEndpoint', '#Microsoft.VideoAnalyzer.UnsecuredEndpoint': 'UnsecuredEndpoint'} + "type": { + "#Microsoft.VideoAnalyzer.TlsEndpoint": "TlsEndpoint", + "#Microsoft.VideoAnalyzer.UnsecuredEndpoint": "UnsecuredEndpoint", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword credentials: Credentials to be presented to the endpoint. :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase @@ -314,8 +303,8 @@ def __init__( """ super(EndpointBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.credentials = kwargs.get('credentials', None) - self.url = kwargs['url'] + self.credentials = kwargs.get("credentials", None) + self.url = kwargs["url"] class ExtensionProcessorBase(ProcessorNodeBase): @@ -344,30 +333,30 @@ class ExtensionProcessorBase(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'image': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "image": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.GrpcExtension': 'GrpcExtension', '#Microsoft.VideoAnalyzer.HttpExtension': 'HttpExtension'} + "type": { + "#Microsoft.VideoAnalyzer.GrpcExtension": "GrpcExtension", + "#Microsoft.VideoAnalyzer.HttpExtension": "HttpExtension", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -384,10 +373,10 @@ def __init__( :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ super(ExtensionProcessorBase, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ExtensionProcessorBase' # type: str - self.endpoint = kwargs['endpoint'] - self.image = kwargs['image'] - self.sampling_options = kwargs.get('sampling_options', None) + self.type = "#Microsoft.VideoAnalyzer.ExtensionProcessorBase" # type: str + self.endpoint = kwargs["endpoint"] + self.image = kwargs["image"] + self.sampling_options = kwargs.get("sampling_options", None) class SinkNodeBase(msrest.serialization.Model): @@ -408,25 +397,26 @@ class SinkNodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.FileSink': 'FileSink', '#Microsoft.VideoAnalyzer.IotHubMessageSink': 'IotHubMessageSink', '#Microsoft.VideoAnalyzer.VideoSink': 'VideoSink'} + "type": { + "#Microsoft.VideoAnalyzer.FileSink": "FileSink", + "#Microsoft.VideoAnalyzer.IotHubMessageSink": "IotHubMessageSink", + "#Microsoft.VideoAnalyzer.VideoSink": "VideoSink", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -436,8 +426,8 @@ def __init__( """ super(SinkNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.name = kwargs['name'] - self.inputs = kwargs['inputs'] + self.name = kwargs["name"] + self.inputs = kwargs["inputs"] class FileSink(SinkNodeBase): @@ -464,27 +454,24 @@ class FileSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'base_directory_path': {'required': True}, - 'file_name_pattern': {'required': True}, - 'maximum_size_mi_b': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "base_directory_path": {"required": True}, + "file_name_pattern": {"required": True}, + "maximum_size_mi_b": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'base_directory_path': {'key': 'baseDirectoryPath', 'type': 'str'}, - 'file_name_pattern': {'key': 'fileNamePattern', 'type': 'str'}, - 'maximum_size_mi_b': {'key': 'maximumSizeMiB', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "base_directory_path": {"key": "baseDirectoryPath", "type": "str"}, + "file_name_pattern": {"key": "fileNamePattern", "type": "str"}, + "maximum_size_mi_b": {"key": "maximumSizeMiB", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -503,10 +490,10 @@ def __init__( :paramtype maximum_size_mi_b: str """ super(FileSink, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.FileSink' # type: str - self.base_directory_path = kwargs['base_directory_path'] - self.file_name_pattern = kwargs['file_name_pattern'] - self.maximum_size_mi_b = kwargs['maximum_size_mi_b'] + self.type = "#Microsoft.VideoAnalyzer.FileSink" # type: str + self.base_directory_path = kwargs["base_directory_path"] + self.file_name_pattern = kwargs["file_name_pattern"] + self.maximum_size_mi_b = kwargs["maximum_size_mi_b"] class GrpcExtension(ExtensionProcessorBase): @@ -538,29 +525,26 @@ class GrpcExtension(ExtensionProcessorBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'image': {'required': True}, - 'data_transfer': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "image": {"required": True}, + "data_transfer": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, - 'data_transfer': {'key': 'dataTransfer', 'type': 'GrpcExtensionDataTransfer'}, - 'extension_configuration': {'key': 'extensionConfiguration', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, + "data_transfer": {"key": "dataTransfer", "type": "GrpcExtensionDataTransfer"}, + "extension_configuration": {"key": "extensionConfiguration", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -584,9 +568,9 @@ def __init__( :paramtype extension_configuration: str """ super(GrpcExtension, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.GrpcExtension' # type: str - self.data_transfer = kwargs['data_transfer'] - self.extension_configuration = kwargs.get('extension_configuration', None) + self.type = "#Microsoft.VideoAnalyzer.GrpcExtension" # type: str + self.data_transfer = kwargs["data_transfer"] + self.extension_configuration = kwargs.get("extension_configuration", None) class GrpcExtensionDataTransfer(msrest.serialization.Model): @@ -603,18 +587,15 @@ class GrpcExtensionDataTransfer(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'shared_memory_size_mi_b': {'key': 'sharedMemorySizeMiB', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, + "shared_memory_size_mi_b": {"key": "sharedMemorySizeMiB", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. It can only be used with the 'SharedMemory' transfer mode. @@ -624,8 +605,8 @@ def __init__( :paramtype mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode """ super(GrpcExtensionDataTransfer, self).__init__(**kwargs) - self.shared_memory_size_mi_b = kwargs.get('shared_memory_size_mi_b', None) - self.mode = kwargs['mode'] + self.shared_memory_size_mi_b = kwargs.get("shared_memory_size_mi_b", None) + self.mode = kwargs["mode"] class H264Configuration(msrest.serialization.Model): @@ -639,14 +620,11 @@ class H264Configuration(msrest.serialization.Model): """ _attribute_map = { - 'gov_length': {'key': 'govLength', 'type': 'float'}, - 'profile': {'key': 'profile', 'type': 'str'}, + "gov_length": {"key": "govLength", "type": "float"}, + "profile": {"key": "profile", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword gov_length: Group of Video frames length. :paramtype gov_length: float @@ -655,8 +633,8 @@ def __init__( :paramtype profile: str or ~azure.media.videoanalyzer.edge.models.H264Profile """ super(H264Configuration, self).__init__(**kwargs) - self.gov_length = kwargs.get('gov_length', None) - self.profile = kwargs.get('profile', None) + self.gov_length = kwargs.get("gov_length", None) + self.profile = kwargs.get("profile", None) class HttpExtension(ExtensionProcessorBase): @@ -682,26 +660,23 @@ class HttpExtension(ExtensionProcessorBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'image': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "image": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -718,7 +693,7 @@ def __init__( :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ super(HttpExtension, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.HttpExtension' # type: str + self.type = "#Microsoft.VideoAnalyzer.HttpExtension" # type: str class HttpHeaderCredentials(CredentialsBase): @@ -737,21 +712,18 @@ class HttpHeaderCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'header_name': {'required': True}, - 'header_value': {'required': True}, + "type": {"required": True}, + "header_name": {"required": True}, + "header_value": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'header_name': {'key': 'headerName', 'type': 'str'}, - 'header_value': {'key': 'headerValue', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "header_name": {"key": "headerName", "type": "str"}, + "header_value": {"key": "headerValue", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword header_name: Required. HTTP header name. :paramtype header_name: str @@ -761,9 +733,9 @@ def __init__( :paramtype header_value: str """ super(HttpHeaderCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.HttpHeaderCredentials' # type: str - self.header_name = kwargs['header_name'] - self.header_value = kwargs['header_value'] + self.type = "#Microsoft.VideoAnalyzer.HttpHeaderCredentials" # type: str + self.header_name = kwargs["header_name"] + self.header_value = kwargs["header_value"] class ImageFormatProperties(msrest.serialization.Model): @@ -779,23 +751,24 @@ class ImageFormatProperties(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.ImageFormatBmp': 'ImageFormatBmp', '#Microsoft.VideoAnalyzer.ImageFormatJpeg': 'ImageFormatJpeg', '#Microsoft.VideoAnalyzer.ImageFormatPng': 'ImageFormatPng', '#Microsoft.VideoAnalyzer.ImageFormatRaw': 'ImageFormatRaw'} + "type": { + "#Microsoft.VideoAnalyzer.ImageFormatBmp": "ImageFormatBmp", + "#Microsoft.VideoAnalyzer.ImageFormatJpeg": "ImageFormatJpeg", + "#Microsoft.VideoAnalyzer.ImageFormatPng": "ImageFormatPng", + "#Microsoft.VideoAnalyzer.ImageFormatRaw": "ImageFormatRaw", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ImageFormatProperties, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -810,21 +783,17 @@ class ImageFormatBmp(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ImageFormatBmp, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatBmp' # type: str + self.type = "#Microsoft.VideoAnalyzer.ImageFormatBmp" # type: str class ImageFormatJpeg(ImageFormatProperties): @@ -839,25 +808,22 @@ class ImageFormatJpeg(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'quality': {'key': 'quality', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "quality": {"key": "quality", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword quality: Image quality value between 0 to 100 (best quality). :paramtype quality: str """ super(ImageFormatJpeg, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatJpeg' # type: str - self.quality = kwargs.get('quality', None) + self.type = "#Microsoft.VideoAnalyzer.ImageFormatJpeg" # type: str + self.quality = kwargs.get("quality", None) class ImageFormatPng(ImageFormatProperties): @@ -870,21 +836,17 @@ class ImageFormatPng(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ImageFormatPng, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatPng' # type: str + self.type = "#Microsoft.VideoAnalyzer.ImageFormatPng" # type: str class ImageFormatRaw(ImageFormatProperties): @@ -901,19 +863,16 @@ class ImageFormatRaw(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, - 'pixel_format': {'required': True}, + "type": {"required": True}, + "pixel_format": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'pixel_format': {'key': 'pixelFormat', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "pixel_format": {"key": "pixelFormat", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword pixel_format: Required. Pixel format to be applied to the raw image. Possible values include: "yuv420p", "rgb565be", "rgb565le", "rgb555be", "rgb555le", "rgb24", "bgr24", "argb", @@ -922,8 +881,8 @@ def __init__( ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat """ super(ImageFormatRaw, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatRaw' # type: str - self.pixel_format = kwargs['pixel_format'] + self.type = "#Microsoft.VideoAnalyzer.ImageFormatRaw" # type: str + self.pixel_format = kwargs["pixel_format"] class ImageProperties(msrest.serialization.Model): @@ -936,14 +895,11 @@ class ImageProperties(msrest.serialization.Model): """ _attribute_map = { - 'scale': {'key': 'scale', 'type': 'ImageScale'}, - 'format': {'key': 'format', 'type': 'ImageFormatProperties'}, + "scale": {"key": "scale", "type": "ImageScale"}, + "format": {"key": "format", "type": "ImageFormatProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword scale: Image scaling mode. :paramtype scale: ~azure.media.videoanalyzer.edge.models.ImageScale @@ -951,8 +907,8 @@ def __init__( :paramtype format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties """ super(ImageProperties, self).__init__(**kwargs) - self.scale = kwargs.get('scale', None) - self.format = kwargs.get('format', None) + self.scale = kwargs.get("scale", None) + self.format = kwargs.get("format", None) class ImageScale(msrest.serialization.Model): @@ -968,15 +924,12 @@ class ImageScale(msrest.serialization.Model): """ _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'str'}, - 'height': {'key': 'height', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "width": {"key": "width", "type": "str"}, + "height": {"key": "height", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible values include: "preserveAspectRatio", "pad", "stretch". @@ -987,9 +940,9 @@ def __init__( :paramtype height: str """ super(ImageScale, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.width = kwargs.get('width', None) - self.height = kwargs.get('height', None) + self.mode = kwargs.get("mode", None) + self.width = kwargs.get("width", None) + self.height = kwargs.get("height", None) class IotHubDeviceConnection(msrest.serialization.Model): @@ -1006,18 +959,15 @@ class IotHubDeviceConnection(msrest.serialization.Model): """ _validation = { - 'device_id': {'required': True}, + "device_id": {"required": True}, } _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + "device_id": {"key": "deviceId", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword device_id: Required. The name of the IoT device configured and managed in IoT Hub. (case-sensitive). @@ -1027,8 +977,8 @@ def __init__( :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase """ super(IotHubDeviceConnection, self).__init__(**kwargs) - self.device_id = kwargs['device_id'] - self.credentials = kwargs.get('credentials', None) + self.device_id = kwargs["device_id"] + self.credentials = kwargs.get("credentials", None) class IotHubMessageSink(SinkNodeBase): @@ -1049,23 +999,20 @@ class IotHubMessageSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'hub_output_name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "hub_output_name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'hub_output_name': {'key': 'hubOutputName', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "hub_output_name": {"key": "hubOutputName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1077,8 +1024,8 @@ def __init__( :paramtype hub_output_name: str """ super(IotHubMessageSink, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSink' # type: str - self.hub_output_name = kwargs['hub_output_name'] + self.type = "#Microsoft.VideoAnalyzer.IotHubMessageSink" # type: str + self.hub_output_name = kwargs["hub_output_name"] class SourceNodeBase(msrest.serialization.Model): @@ -1096,30 +1043,30 @@ class SourceNodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.IotHubMessageSource': 'IotHubMessageSource', '#Microsoft.VideoAnalyzer.RtspSource': 'RtspSource'} + "type": { + "#Microsoft.VideoAnalyzer.IotHubMessageSource": "IotHubMessageSource", + "#Microsoft.VideoAnalyzer.RtspSource": "RtspSource", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str """ super(SourceNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.name = kwargs['name'] + self.name = kwargs["name"] class IotHubMessageSource(SourceNodeBase): @@ -1136,20 +1083,17 @@ class IotHubMessageSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'hub_input_name': {'key': 'hubInputName', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "hub_input_name": {"key": "hubInputName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1157,8 +1101,8 @@ def __init__( :paramtype hub_input_name: str """ super(IotHubMessageSource, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSource' # type: str - self.hub_input_name = kwargs.get('hub_input_name', None) + self.type = "#Microsoft.VideoAnalyzer.IotHubMessageSource" # type: str + self.hub_input_name = kwargs.get("hub_input_name", None) class LineCrossingProcessor(ProcessorNodeBase): @@ -1178,23 +1122,20 @@ class LineCrossingProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'lines': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "lines": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'lines': {'key': 'lines', 'type': '[NamedLineBase]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "lines": {"key": "lines", "type": "[NamedLineBase]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1205,8 +1146,8 @@ def __init__( :paramtype lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] """ super(LineCrossingProcessor, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.LineCrossingProcessor' # type: str - self.lines = kwargs['lines'] + self.type = "#Microsoft.VideoAnalyzer.LineCrossingProcessor" # type: str + self.lines = kwargs["lines"] class LivePipeline(msrest.serialization.Model): @@ -1223,19 +1164,16 @@ class LivePipeline(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'LivePipelineProperties'}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "LivePipelineProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Live pipeline unique identifier. :paramtype name: str @@ -1245,9 +1183,9 @@ def __init__( :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ super(LivePipeline, self).__init__(**kwargs) - self.name = kwargs['name'] - self.system_data = kwargs.get('system_data', None) - self.properties = kwargs.get('properties', None) + self.name = kwargs["name"] + self.system_data = kwargs.get("system_data", None) + self.properties = kwargs.get("properties", None) class MethodRequest(msrest.serialization.Model): @@ -1268,22 +1206,32 @@ class MethodRequest(msrest.serialization.Model): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } _subtype_map = { - 'method_name': {'LivePipelineSetRequestBody': 'LivePipelineSetRequestBody', 'MethodRequestEmptyBodyBase': 'MethodRequestEmptyBodyBase', 'PipelineTopologySetRequestBody': 'PipelineTopologySetRequestBody', 'RemoteDeviceAdapterSetRequestBody': 'RemoteDeviceAdapterSetRequestBody', 'livePipelineList': 'LivePipelineListRequest', 'livePipelineSet': 'LivePipelineSetRequest', 'onvifDeviceDiscover': 'OnvifDeviceDiscoverRequest', 'onvifDeviceGet': 'OnvifDeviceGetRequest', 'pipelineTopologyList': 'PipelineTopologyListRequest', 'pipelineTopologySet': 'PipelineTopologySetRequest', 'remoteDeviceAdapterList': 'RemoteDeviceAdapterListRequest', 'remoteDeviceAdapterSet': 'RemoteDeviceAdapterSetRequest'} - } - - def __init__( - self, - **kwargs - ): + "method_name": { + "LivePipelineSetRequestBody": "LivePipelineSetRequestBody", + "MethodRequestEmptyBodyBase": "MethodRequestEmptyBodyBase", + "PipelineTopologySetRequestBody": "PipelineTopologySetRequestBody", + "RemoteDeviceAdapterSetRequestBody": "RemoteDeviceAdapterSetRequestBody", + "livePipelineList": "LivePipelineListRequest", + "livePipelineSet": "LivePipelineSetRequest", + "onvifDeviceDiscover": "OnvifDeviceDiscoverRequest", + "onvifDeviceGet": "OnvifDeviceGetRequest", + "pipelineTopologyList": "PipelineTopologyListRequest", + "pipelineTopologySet": "PipelineTopologySetRequest", + "remoteDeviceAdapterList": "RemoteDeviceAdapterListRequest", + "remoteDeviceAdapterSet": "RemoteDeviceAdapterSetRequest", + } + } + + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1291,7 +1239,7 @@ def __init__( """ super(MethodRequest, self).__init__(**kwargs) self.method_name = None # type: Optional[str] - self.api_version = kwargs.get('api_version', "1.1") + self.api_version = kwargs.get("api_version", "1.1") class MethodRequestEmptyBodyBase(MethodRequest): @@ -1314,24 +1262,30 @@ class MethodRequestEmptyBodyBase(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'method_name': {'livePipelineActivate': 'LivePipelineActivateRequest', 'livePipelineDeactivate': 'LivePipelineDeactivateRequest', 'livePipelineDelete': 'LivePipelineDeleteRequest', 'livePipelineGet': 'LivePipelineGetRequest', 'pipelineTopologyDelete': 'PipelineTopologyDeleteRequest', 'pipelineTopologyGet': 'PipelineTopologyGetRequest', 'remoteDeviceAdapterDelete': 'RemoteDeviceAdapterDeleteRequest', 'remoteDeviceAdapterGet': 'RemoteDeviceAdapterGetRequest'} + "method_name": { + "livePipelineActivate": "LivePipelineActivateRequest", + "livePipelineDeactivate": "LivePipelineDeactivateRequest", + "livePipelineDelete": "LivePipelineDeleteRequest", + "livePipelineGet": "LivePipelineGetRequest", + "pipelineTopologyDelete": "PipelineTopologyDeleteRequest", + "pipelineTopologyGet": "PipelineTopologyGetRequest", + "remoteDeviceAdapterDelete": "RemoteDeviceAdapterDeleteRequest", + "remoteDeviceAdapterGet": "RemoteDeviceAdapterGetRequest", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1340,8 +1294,8 @@ def __init__( :paramtype name: str """ super(MethodRequestEmptyBodyBase, self).__init__(**kwargs) - self.method_name = 'MethodRequestEmptyBodyBase' # type: str - self.name = kwargs['name'] + self.method_name = "MethodRequestEmptyBodyBase" # type: str + self.name = kwargs["name"] class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): @@ -1361,20 +1315,17 @@ class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1383,7 +1334,7 @@ def __init__( :paramtype name: str """ super(LivePipelineActivateRequest, self).__init__(**kwargs) - self.method_name = 'livePipelineActivate' # type: str + self.method_name = "livePipelineActivate" # type: str class LivePipelineCollection(msrest.serialization.Model): @@ -1398,14 +1349,11 @@ class LivePipelineCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[LivePipeline]'}, - 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + "value": {"key": "value", "type": "[LivePipeline]"}, + "continuation_token": {"key": "@continuationToken", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: List of live pipelines. :paramtype value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] @@ -1415,8 +1363,8 @@ def __init__( :paramtype continuation_token: str """ super(LivePipelineCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.continuation_token = kwargs.get('continuation_token', None) + self.value = kwargs.get("value", None) + self.continuation_token = kwargs.get("continuation_token", None) class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): @@ -1436,20 +1384,17 @@ class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1458,7 +1403,7 @@ def __init__( :paramtype name: str """ super(LivePipelineDeactivateRequest, self).__init__(**kwargs) - self.method_name = 'livePipelineDeactivate' # type: str + self.method_name = "livePipelineDeactivate" # type: str class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): @@ -1478,20 +1423,17 @@ class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1500,7 +1442,7 @@ def __init__( :paramtype name: str """ super(LivePipelineDeleteRequest, self).__init__(**kwargs) - self.method_name = 'livePipelineDelete' # type: str + self.method_name = "livePipelineDelete" # type: str class LivePipelineGetRequest(MethodRequestEmptyBodyBase): @@ -1520,20 +1462,17 @@ class LivePipelineGetRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1542,7 +1481,7 @@ def __init__( :paramtype name: str """ super(LivePipelineGetRequest, self).__init__(**kwargs) - self.method_name = 'livePipelineGet' # type: str + self.method_name = "livePipelineGet" # type: str class LivePipelineListRequest(MethodRequest): @@ -1560,25 +1499,22 @@ class LivePipelineListRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". :paramtype api_version: str """ super(LivePipelineListRequest, self).__init__(**kwargs) - self.method_name = 'livePipelineList' # type: str + self.method_name = "livePipelineList" # type: str class LivePipelineProperties(msrest.serialization.Model): @@ -1601,16 +1537,13 @@ class LivePipelineProperties(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'topology_name': {'key': 'topologyName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterDefinition]'}, - 'state': {'key': 'state', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "topology_name": {"key": "topologyName", "type": "str"}, + "parameters": {"key": "parameters", "type": "[ParameterDefinition]"}, + "state": {"key": "state", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: An optional description of the live pipeline. :paramtype description: str @@ -1628,10 +1561,10 @@ def __init__( :paramtype state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState """ super(LivePipelineProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.topology_name = kwargs.get('topology_name', None) - self.parameters = kwargs.get('parameters', None) - self.state = kwargs.get('state', None) + self.description = kwargs.get("description", None) + self.topology_name = kwargs.get("topology_name", None) + self.parameters = kwargs.get("parameters", None) + self.state = kwargs.get("state", None) class LivePipelineSetRequest(MethodRequest): @@ -1652,20 +1585,17 @@ class LivePipelineSetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'live_pipeline': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "live_pipeline": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'live_pipeline': {'key': 'livePipeline', 'type': 'LivePipeline'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "live_pipeline": {"key": "livePipeline", "type": "LivePipeline"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1675,8 +1605,8 @@ def __init__( :paramtype live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline """ super(LivePipelineSetRequest, self).__init__(**kwargs) - self.method_name = 'livePipelineSet' # type: str - self.live_pipeline = kwargs['live_pipeline'] + self.method_name = "livePipelineSet" # type: str + self.live_pipeline = kwargs["live_pipeline"] class LivePipelineSetRequestBody(LivePipeline, MethodRequest): @@ -1700,22 +1630,19 @@ class LivePipelineSetRequestBody(LivePipeline, MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'LivePipelineProperties'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "LivePipelineProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1728,12 +1655,12 @@ def __init__( :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ super(LivePipelineSetRequestBody, self).__init__(**kwargs) - self.method_name = 'LivePipelineSetRequestBody' # type: str - self.api_version = kwargs.get('api_version', "1.1") - self.method_name = 'LivePipelineSetRequestBody' # type: str - self.name = kwargs['name'] - self.system_data = kwargs.get('system_data', None) - self.properties = kwargs.get('properties', None) + self.method_name = "LivePipelineSetRequestBody" # type: str + self.api_version = kwargs.get("api_version", "1.1") + self.method_name = "LivePipelineSetRequestBody" # type: str + self.name = kwargs["name"] + self.system_data = kwargs.get("system_data", None) + self.properties = kwargs.get("properties", None) class MediaProfile(msrest.serialization.Model): @@ -1749,15 +1676,12 @@ class MediaProfile(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'media_uri': {'key': 'mediaUri', 'type': 'object'}, - 'video_encoder_configuration': {'key': 'videoEncoderConfiguration', 'type': 'VideoEncoderConfiguration'}, + "name": {"key": "name", "type": "str"}, + "media_uri": {"key": "mediaUri", "type": "object"}, + "video_encoder_configuration": {"key": "videoEncoderConfiguration", "type": "VideoEncoderConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: The name of the Media Profile. :paramtype name: str @@ -1769,9 +1693,9 @@ def __init__( ~azure.media.videoanalyzer.edge.models.VideoEncoderConfiguration """ super(MediaProfile, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.media_uri = kwargs.get('media_uri', None) - self.video_encoder_configuration = kwargs.get('video_encoder_configuration', None) + self.name = kwargs.get("name", None) + self.media_uri = kwargs.get("media_uri", None) + self.video_encoder_configuration = kwargs.get("video_encoder_configuration", None) class MediaUri(msrest.serialization.Model): @@ -1782,19 +1706,16 @@ class MediaUri(msrest.serialization.Model): """ _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword uri: URI that can be used for media streaming. :paramtype uri: str """ super(MediaUri, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) + self.uri = kwargs.get("uri", None) class MotionDetectionProcessor(ProcessorNodeBase): @@ -1822,24 +1743,21 @@ class MotionDetectionProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, - 'output_motion_region': {'key': 'outputMotionRegion', 'type': 'bool'}, - 'event_aggregation_window': {'key': 'eventAggregationWindow', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "sensitivity": {"key": "sensitivity", "type": "str"}, + "output_motion_region": {"key": "outputMotionRegion", "type": "bool"}, + "event_aggregation_window": {"key": "eventAggregationWindow", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1859,10 +1777,10 @@ def __init__( :paramtype event_aggregation_window: str """ super(MotionDetectionProcessor, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.MotionDetectionProcessor' # type: str - self.sensitivity = kwargs.get('sensitivity', None) - self.output_motion_region = kwargs.get('output_motion_region', None) - self.event_aggregation_window = kwargs.get('event_aggregation_window', None) + self.type = "#Microsoft.VideoAnalyzer.MotionDetectionProcessor" # type: str + self.sensitivity = kwargs.get("sensitivity", None) + self.output_motion_region = kwargs.get("output_motion_region", None) + self.event_aggregation_window = kwargs.get("event_aggregation_window", None) class MPEG4Configuration(msrest.serialization.Model): @@ -1875,14 +1793,11 @@ class MPEG4Configuration(msrest.serialization.Model): """ _attribute_map = { - 'gov_length': {'key': 'govLength', 'type': 'float'}, - 'profile': {'key': 'profile', 'type': 'str'}, + "gov_length": {"key": "govLength", "type": "float"}, + "profile": {"key": "profile", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword gov_length: Group of Video frames length. :paramtype gov_length: float @@ -1890,8 +1805,8 @@ def __init__( :paramtype profile: str or ~azure.media.videoanalyzer.edge.models.MPEG4Profile """ super(MPEG4Configuration, self).__init__(**kwargs) - self.gov_length = kwargs.get('gov_length', None) - self.profile = kwargs.get('profile', None) + self.gov_length = kwargs.get("gov_length", None) + self.profile = kwargs.get("profile", None) class NamedLineBase(msrest.serialization.Model): @@ -1909,30 +1824,25 @@ class NamedLineBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.NamedLineString': 'NamedLineString'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.NamedLineString": "NamedLineString"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Line name. Must be unique within the node. :paramtype name: str """ super(NamedLineBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.name = kwargs['name'] + self.name = kwargs["name"] class NamedLineString(NamedLineBase): @@ -1952,21 +1862,18 @@ class NamedLineString(NamedLineBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'line': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "line": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'line': {'key': 'line', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "line": {"key": "line", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Line name. Must be unique within the node. :paramtype name: str @@ -1977,8 +1884,8 @@ def __init__( :paramtype line: str """ super(NamedLineString, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.NamedLineString' # type: str - self.line = kwargs['line'] + self.type = "#Microsoft.VideoAnalyzer.NamedLineString" # type: str + self.line = kwargs["line"] class NamedPolygonBase(msrest.serialization.Model): @@ -1996,30 +1903,25 @@ class NamedPolygonBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.NamedPolygonString': 'NamedPolygonString'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.NamedPolygonString": "NamedPolygonString"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Polygon name. Must be unique within the node. :paramtype name: str """ super(NamedPolygonBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.name = kwargs['name'] + self.name = kwargs["name"] class NamedPolygonString(NamedPolygonBase): @@ -2038,21 +1940,18 @@ class NamedPolygonString(NamedPolygonBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'polygon': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "polygon": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "polygon": {"key": "polygon", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Polygon name. Must be unique within the node. :paramtype name: str @@ -2062,8 +1961,8 @@ def __init__( :paramtype polygon: str """ super(NamedPolygonString, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.NamedPolygonString' # type: str - self.polygon = kwargs['polygon'] + self.type = "#Microsoft.VideoAnalyzer.NamedPolygonString" # type: str + self.polygon = kwargs["polygon"] class NodeInput(msrest.serialization.Model): @@ -2080,18 +1979,15 @@ class NodeInput(msrest.serialization.Model): """ _validation = { - 'node_name': {'required': True}, + "node_name": {"required": True}, } _attribute_map = { - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'output_selectors': {'key': 'outputSelectors', 'type': '[OutputSelector]'}, + "node_name": {"key": "nodeName", "type": "str"}, + "output_selectors": {"key": "outputSelectors", "type": "[OutputSelector]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword node_name: Required. The name of the upstream node in the pipeline which output is used as input of the current node. @@ -2101,8 +1997,8 @@ def __init__( :paramtype output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] """ super(NodeInput, self).__init__(**kwargs) - self.node_name = kwargs['node_name'] - self.output_selectors = kwargs.get('output_selectors', None) + self.node_name = kwargs["node_name"] + self.output_selectors = kwargs.get("output_selectors", None) class ObjectTrackingProcessor(ProcessorNodeBase): @@ -2123,22 +2019,19 @@ class ObjectTrackingProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'accuracy': {'key': 'accuracy', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "accuracy": {"key": "accuracy", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -2150,8 +2043,8 @@ def __init__( :paramtype accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy """ super(ObjectTrackingProcessor, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ObjectTrackingProcessor' # type: str - self.accuracy = kwargs.get('accuracy', None) + self.type = "#Microsoft.VideoAnalyzer.ObjectTrackingProcessor" # type: str + self.accuracy = kwargs.get("accuracy", None) class OnvifDevice(msrest.serialization.Model): @@ -2168,16 +2061,13 @@ class OnvifDevice(msrest.serialization.Model): """ _attribute_map = { - 'hostname': {'key': 'hostname', 'type': 'OnvifHostName'}, - 'system_date_time': {'key': 'systemDateTime', 'type': 'OnvifSystemDateTime'}, - 'dns': {'key': 'dns', 'type': 'OnvifDns'}, - 'media_profiles': {'key': 'mediaProfiles', 'type': '[MediaProfile]'}, + "hostname": {"key": "hostname", "type": "OnvifHostName"}, + "system_date_time": {"key": "systemDateTime", "type": "OnvifSystemDateTime"}, + "dns": {"key": "dns", "type": "OnvifDns"}, + "media_profiles": {"key": "mediaProfiles", "type": "[MediaProfile]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword hostname: The hostname of the ONVIF device. :paramtype hostname: ~azure.media.videoanalyzer.edge.models.OnvifHostName @@ -2189,10 +2079,10 @@ def __init__( :paramtype media_profiles: list[~azure.media.videoanalyzer.edge.models.MediaProfile] """ super(OnvifDevice, self).__init__(**kwargs) - self.hostname = kwargs.get('hostname', None) - self.system_date_time = kwargs.get('system_date_time', None) - self.dns = kwargs.get('dns', None) - self.media_profiles = kwargs.get('media_profiles', None) + self.hostname = kwargs.get("hostname", None) + self.system_date_time = kwargs.get("system_date_time", None) + self.dns = kwargs.get("dns", None) + self.media_profiles = kwargs.get("media_profiles", None) class OnvifDeviceDiscoverRequest(MethodRequest): @@ -2213,19 +2103,16 @@ class OnvifDeviceDiscoverRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'discovery_duration': {'key': 'discoveryDuration', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "discovery_duration": {"key": "discoveryDuration", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2235,8 +2122,8 @@ def __init__( :paramtype discovery_duration: str """ super(OnvifDeviceDiscoverRequest, self).__init__(**kwargs) - self.method_name = 'onvifDeviceDiscover' # type: str - self.discovery_duration = kwargs.get('discovery_duration', None) + self.method_name = "onvifDeviceDiscover" # type: str + self.discovery_duration = kwargs.get("discovery_duration", None) class OnvifDeviceGetRequest(MethodRequest): @@ -2256,20 +2143,17 @@ class OnvifDeviceGetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'endpoint': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "endpoint": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2278,8 +2162,8 @@ def __init__( :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase """ super(OnvifDeviceGetRequest, self).__init__(**kwargs) - self.method_name = 'onvifDeviceGet' # type: str - self.endpoint = kwargs['endpoint'] + self.method_name = "onvifDeviceGet" # type: str + self.endpoint = kwargs["endpoint"] class OnvifDns(msrest.serialization.Model): @@ -2294,15 +2178,12 @@ class OnvifDns(msrest.serialization.Model): """ _attribute_map = { - 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, - 'ipv4_address': {'key': 'ipv4Address', 'type': '[str]'}, - 'ipv6_address': {'key': 'ipv6Address', 'type': '[str]'}, + "from_dhcp": {"key": "fromDhcp", "type": "bool"}, + "ipv4_address": {"key": "ipv4Address", "type": "[str]"}, + "ipv6_address": {"key": "ipv6Address", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. :paramtype from_dhcp: bool @@ -2312,9 +2193,9 @@ def __init__( :paramtype ipv6_address: list[str] """ super(OnvifDns, self).__init__(**kwargs) - self.from_dhcp = kwargs.get('from_dhcp', None) - self.ipv4_address = kwargs.get('ipv4_address', None) - self.ipv6_address = kwargs.get('ipv6_address', None) + self.from_dhcp = kwargs.get("from_dhcp", None) + self.ipv4_address = kwargs.get("ipv4_address", None) + self.ipv6_address = kwargs.get("ipv6_address", None) class OnvifHostName(msrest.serialization.Model): @@ -2327,14 +2208,11 @@ class OnvifHostName(msrest.serialization.Model): """ _attribute_map = { - 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, + "from_dhcp": {"key": "fromDhcp", "type": "bool"}, + "hostname": {"key": "hostname", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. :paramtype from_dhcp: bool @@ -2342,8 +2220,8 @@ def __init__( :paramtype hostname: str """ super(OnvifHostName, self).__init__(**kwargs) - self.from_dhcp = kwargs.get('from_dhcp', None) - self.hostname = kwargs.get('hostname', None) + self.from_dhcp = kwargs.get("from_dhcp", None) + self.hostname = kwargs.get("hostname", None) class OnvifSystemDateTime(msrest.serialization.Model): @@ -2359,15 +2237,12 @@ class OnvifSystemDateTime(msrest.serialization.Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "time": {"key": "time", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword type: An enum value determining whether the date time was configured using NTP or manual. Possible values include: "Ntp", "Manual". @@ -2378,9 +2253,9 @@ def __init__( :paramtype time_zone: str """ super(OnvifSystemDateTime, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.time = kwargs.get('time', None) - self.time_zone = kwargs.get('time_zone', None) + self.type = kwargs.get("type", None) + self.time = kwargs.get("time", None) + self.time_zone = kwargs.get("time_zone", None) class OutputSelector(msrest.serialization.Model): @@ -2396,15 +2271,12 @@ class OutputSelector(msrest.serialization.Model): """ _attribute_map = { - 'property': {'key': 'property', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "property": {"key": "property", "type": "str"}, + "operator": {"key": "operator", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword property: The property of the data stream to be used as the selection criteria. Possible values include: "mediaType". @@ -2416,9 +2288,9 @@ def __init__( :paramtype value: str """ super(OutputSelector, self).__init__(**kwargs) - self.property = kwargs.get('property', None) - self.operator = kwargs.get('operator', None) - self.value = kwargs.get('value', None) + self.property = kwargs.get("property", None) + self.operator = kwargs.get("operator", None) + self.value = kwargs.get("value", None) class ParameterDeclaration(msrest.serialization.Model): @@ -2439,21 +2311,18 @@ class ParameterDeclaration(msrest.serialization.Model): """ _validation = { - 'name': {'required': True, 'max_length': 64, 'min_length': 0}, - 'type': {'required': True}, + "name": {"required": True, "max_length": 64, "min_length": 0}, + "type": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "default": {"key": "default", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Name of the parameter. :paramtype name: str @@ -2467,10 +2336,10 @@ def __init__( :paramtype default: str """ super(ParameterDeclaration, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type = kwargs['type'] - self.description = kwargs.get('description', None) - self.default = kwargs.get('default', None) + self.name = kwargs["name"] + self.type = kwargs["type"] + self.description = kwargs.get("description", None) + self.default = kwargs.get("default", None) class ParameterDefinition(msrest.serialization.Model): @@ -2485,18 +2354,15 @@ class ParameterDefinition(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Name of the parameter declared in the pipeline topology. :paramtype name: str @@ -2504,8 +2370,8 @@ def __init__( :paramtype value: str """ super(ParameterDefinition, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs.get('value', None) + self.name = kwargs["name"] + self.value = kwargs.get("value", None) class PemCertificateList(CertificateSource): @@ -2520,61 +2386,55 @@ class PemCertificateList(CertificateSource): """ _validation = { - 'type': {'required': True}, - 'certificates': {'required': True}, + "type": {"required": True}, + "certificates": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'certificates': {'key': 'certificates', 'type': '[str]'}, + "type": {"key": "@type", "type": "str"}, + "certificates": {"key": "certificates", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword certificates: Required. PEM formatted public certificates. One certificate per entry. :paramtype certificates: list[str] """ super(PemCertificateList, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str - self.certificates = kwargs['certificates'] + self.type = "#Microsoft.VideoAnalyzer.PemCertificateList" # type: str + self.certificates = kwargs["certificates"] class PipelineTopology(msrest.serialization.Model): """Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across many different cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. - -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar name: Required. Pipeline topology unique identifier. - :vartype name: str - :ivar system_data: Read-only system metadata associated with this object. - :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :ivar properties: Pipeline topology properties. - :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'PipelineTopologyProperties'}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PipelineTopologyProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Pipeline topology unique identifier. :paramtype name: str @@ -2584,9 +2444,9 @@ def __init__( :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ super(PipelineTopology, self).__init__(**kwargs) - self.name = kwargs['name'] - self.system_data = kwargs.get('system_data', None) - self.properties = kwargs.get('properties', None) + self.name = kwargs["name"] + self.system_data = kwargs.get("system_data", None) + self.properties = kwargs.get("properties", None) class PipelineTopologyCollection(msrest.serialization.Model): @@ -2601,14 +2461,11 @@ class PipelineTopologyCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineTopology]'}, - 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + "value": {"key": "value", "type": "[PipelineTopology]"}, + "continuation_token": {"key": "@continuationToken", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: List of pipeline topologies. :paramtype value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] @@ -2618,8 +2475,8 @@ def __init__( :paramtype continuation_token: str """ super(PipelineTopologyCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.continuation_token = kwargs.get('continuation_token', None) + self.value = kwargs.get("value", None) + self.continuation_token = kwargs.get("continuation_token", None) class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): @@ -2639,20 +2496,17 @@ class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2661,7 +2515,7 @@ def __init__( :paramtype name: str """ super(PipelineTopologyDeleteRequest, self).__init__(**kwargs) - self.method_name = 'pipelineTopologyDelete' # type: str + self.method_name = "pipelineTopologyDelete" # type: str class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): @@ -2681,20 +2535,17 @@ class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2703,7 +2554,7 @@ def __init__( :paramtype name: str """ super(PipelineTopologyGetRequest, self).__init__(**kwargs) - self.method_name = 'pipelineTopologyGet' # type: str + self.method_name = "pipelineTopologyGet" # type: str class PipelineTopologyListRequest(MethodRequest): @@ -2721,25 +2572,22 @@ class PipelineTopologyListRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". :paramtype api_version: str """ super(PipelineTopologyListRequest, self).__init__(**kwargs) - self.method_name = 'pipelineTopologyList' # type: str + self.method_name = "pipelineTopologyList" # type: str class PipelineTopologyProperties(msrest.serialization.Model): @@ -2765,17 +2613,14 @@ class PipelineTopologyProperties(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterDeclaration]'}, - 'sources': {'key': 'sources', 'type': '[SourceNodeBase]'}, - 'processors': {'key': 'processors', 'type': '[ProcessorNodeBase]'}, - 'sinks': {'key': 'sinks', 'type': '[SinkNodeBase]'}, + "description": {"key": "description", "type": "str"}, + "parameters": {"key": "parameters", "type": "[ParameterDeclaration]"}, + "sources": {"key": "sources", "type": "[SourceNodeBase]"}, + "processors": {"key": "processors", "type": "[ProcessorNodeBase]"}, + "sinks": {"key": "sinks", "type": "[SinkNodeBase]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: An optional description of the pipeline topology. It is recommended that the expected use of the topology to be described here. @@ -2796,11 +2641,11 @@ def __init__( :paramtype sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] """ super(PipelineTopologyProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.parameters = kwargs.get('parameters', None) - self.sources = kwargs.get('sources', None) - self.processors = kwargs.get('processors', None) - self.sinks = kwargs.get('sinks', None) + self.description = kwargs.get("description", None) + self.parameters = kwargs.get("parameters", None) + self.sources = kwargs.get("sources", None) + self.processors = kwargs.get("processors", None) + self.sinks = kwargs.get("sinks", None) class PipelineTopologySetRequest(MethodRequest): @@ -2825,8 +2670,8 @@ class PipelineTopologySetRequest(MethodRequest): user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: - - + + * Parameters: list of user defined parameters that can be references across the topology nodes. * Sources: list of one or more data sources nodes such as an RTSP source which allows for @@ -2838,20 +2683,17 @@ class PipelineTopologySetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'pipeline_topology': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "pipeline_topology": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'pipeline_topology': {'key': 'pipelineTopology', 'type': 'PipelineTopology'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "pipeline_topology": {"key": "pipelineTopology", "type": "PipelineTopology"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2866,8 +2708,8 @@ def __init__( user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: - - + + * Parameters: list of user defined parameters that can be references across the topology nodes. * Sources: list of one or more data sources nodes such as an RTSP source which allows for @@ -2878,53 +2720,50 @@ def __init__( :paramtype pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology """ super(PipelineTopologySetRequest, self).__init__(**kwargs) - self.method_name = 'pipelineTopologySet' # type: str - self.pipeline_topology = kwargs['pipeline_topology'] + self.method_name = "pipelineTopologySet" # type: str + self.pipeline_topology = kwargs["pipeline_topology"] class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): """Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across many different cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. - -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - Variables are only populated by the server, and will be ignored when sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar method_name: Required. Direct method method name.Constant filled by server. - :vartype method_name: str - :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None - and "1.1". The default value is "1.1". - :vartype api_version: str - :ivar name: Required. Pipeline topology unique identifier. - :vartype name: str - :ivar system_data: Read-only system metadata associated with this object. - :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :ivar properties: Pipeline topology properties. - :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'PipelineTopologyProperties'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PipelineTopologyProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2937,12 +2776,12 @@ def __init__( :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ super(PipelineTopologySetRequestBody, self).__init__(**kwargs) - self.method_name = 'PipelineTopologySetRequestBody' # type: str - self.api_version = kwargs.get('api_version', "1.1") - self.method_name = 'PipelineTopologySetRequestBody' # type: str - self.name = kwargs['name'] - self.system_data = kwargs.get('system_data', None) - self.properties = kwargs.get('properties', None) + self.method_name = "PipelineTopologySetRequestBody" # type: str + self.api_version = kwargs.get("api_version", "1.1") + self.method_name = "PipelineTopologySetRequestBody" # type: str + self.name = kwargs["name"] + self.system_data = kwargs.get("system_data", None) + self.properties = kwargs.get("properties", None) class RateControl(msrest.serialization.Model): @@ -2961,16 +2800,13 @@ class RateControl(msrest.serialization.Model): """ _attribute_map = { - 'bit_rate_limit': {'key': 'bitRateLimit', 'type': 'float'}, - 'encoding_interval': {'key': 'encodingInterval', 'type': 'float'}, - 'frame_rate_limit': {'key': 'frameRateLimit', 'type': 'float'}, - 'guaranteed_frame_rate': {'key': 'guaranteedFrameRate', 'type': 'bool'}, + "bit_rate_limit": {"key": "bitRateLimit", "type": "float"}, + "encoding_interval": {"key": "encodingInterval", "type": "float"}, + "frame_rate_limit": {"key": "frameRateLimit", "type": "float"}, + "guaranteed_frame_rate": {"key": "guaranteedFrameRate", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword bit_rate_limit: the maximum output bitrate in kbps. :paramtype bit_rate_limit: float @@ -2984,10 +2820,10 @@ def __init__( :paramtype guaranteed_frame_rate: bool """ super(RateControl, self).__init__(**kwargs) - self.bit_rate_limit = kwargs.get('bit_rate_limit', None) - self.encoding_interval = kwargs.get('encoding_interval', None) - self.frame_rate_limit = kwargs.get('frame_rate_limit', None) - self.guaranteed_frame_rate = kwargs.get('guaranteed_frame_rate', None) + self.bit_rate_limit = kwargs.get("bit_rate_limit", None) + self.encoding_interval = kwargs.get("encoding_interval", None) + self.frame_rate_limit = kwargs.get("frame_rate_limit", None) + self.guaranteed_frame_rate = kwargs.get("guaranteed_frame_rate", None) class RemoteDeviceAdapter(msrest.serialization.Model): @@ -3004,19 +2840,16 @@ class RemoteDeviceAdapter(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "RemoteDeviceAdapterProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. The unique identifier for the remote device adapter. :paramtype name: str @@ -3026,9 +2859,9 @@ def __init__( :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties """ super(RemoteDeviceAdapter, self).__init__(**kwargs) - self.name = kwargs['name'] - self.system_data = kwargs.get('system_data', None) - self.properties = kwargs.get('properties', None) + self.name = kwargs["name"] + self.system_data = kwargs.get("system_data", None) + self.properties = kwargs.get("properties", None) class RemoteDeviceAdapterCollection(msrest.serialization.Model): @@ -3043,14 +2876,11 @@ class RemoteDeviceAdapterCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[RemoteDeviceAdapter]'}, - 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + "value": {"key": "value", "type": "[RemoteDeviceAdapter]"}, + "continuation_token": {"key": "@continuationToken", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: An array of remote device adapters. :paramtype value: list[~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter] @@ -3060,8 +2890,8 @@ def __init__( :paramtype continuation_token: str """ super(RemoteDeviceAdapterCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.continuation_token = kwargs.get('continuation_token', None) + self.value = kwargs.get("value", None) + self.continuation_token = kwargs.get("continuation_token", None) class RemoteDeviceAdapterDeleteRequest(MethodRequestEmptyBodyBase): @@ -3081,20 +2911,17 @@ class RemoteDeviceAdapterDeleteRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3103,7 +2930,7 @@ def __init__( :paramtype name: str """ super(RemoteDeviceAdapterDeleteRequest, self).__init__(**kwargs) - self.method_name = 'remoteDeviceAdapterDelete' # type: str + self.method_name = "remoteDeviceAdapterDelete" # type: str class RemoteDeviceAdapterGetRequest(MethodRequestEmptyBodyBase): @@ -3123,20 +2950,17 @@ class RemoteDeviceAdapterGetRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3145,7 +2969,7 @@ def __init__( :paramtype name: str """ super(RemoteDeviceAdapterGetRequest, self).__init__(**kwargs) - self.method_name = 'remoteDeviceAdapterGet' # type: str + self.method_name = "remoteDeviceAdapterGet" # type: str class RemoteDeviceAdapterListRequest(MethodRequest): @@ -3163,25 +2987,22 @@ class RemoteDeviceAdapterListRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". :paramtype api_version: str """ super(RemoteDeviceAdapterListRequest, self).__init__(**kwargs) - self.method_name = 'remoteDeviceAdapterList' # type: str + self.method_name = "remoteDeviceAdapterList" # type: str class RemoteDeviceAdapterProperties(msrest.serialization.Model): @@ -3201,20 +3022,17 @@ class RemoteDeviceAdapterProperties(msrest.serialization.Model): """ _validation = { - 'target': {'required': True}, - 'iot_hub_device_connection': {'required': True}, + "target": {"required": True}, + "iot_hub_device_connection": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'RemoteDeviceAdapterTarget'}, - 'iot_hub_device_connection': {'key': 'iotHubDeviceConnection', 'type': 'IotHubDeviceConnection'}, + "description": {"key": "description", "type": "str"}, + "target": {"key": "target", "type": "RemoteDeviceAdapterTarget"}, + "iot_hub_device_connection": {"key": "iotHubDeviceConnection", "type": "IotHubDeviceConnection"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: An optional description for the remote device adapter. :paramtype description: str @@ -3227,9 +3045,9 @@ def __init__( ~azure.media.videoanalyzer.edge.models.IotHubDeviceConnection """ super(RemoteDeviceAdapterProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.target = kwargs['target'] - self.iot_hub_device_connection = kwargs['iot_hub_device_connection'] + self.description = kwargs.get("description", None) + self.target = kwargs["target"] + self.iot_hub_device_connection = kwargs["iot_hub_device_connection"] class RemoteDeviceAdapterSetRequest(MethodRequest): @@ -3252,20 +3070,17 @@ class RemoteDeviceAdapterSetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'remote_device_adapter': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "remote_device_adapter": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'remote_device_adapter': {'key': 'remoteDeviceAdapter', 'type': 'RemoteDeviceAdapter'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "remote_device_adapter": {"key": "remoteDeviceAdapter", "type": "RemoteDeviceAdapter"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3277,8 +3092,8 @@ def __init__( :paramtype remote_device_adapter: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter """ super(RemoteDeviceAdapterSetRequest, self).__init__(**kwargs) - self.method_name = 'remoteDeviceAdapterSet' # type: str - self.remote_device_adapter = kwargs['remote_device_adapter'] + self.method_name = "remoteDeviceAdapterSet" # type: str + self.remote_device_adapter = kwargs["remote_device_adapter"] class RemoteDeviceAdapterSetRequestBody(RemoteDeviceAdapter, MethodRequest): @@ -3302,22 +3117,19 @@ class RemoteDeviceAdapterSetRequestBody(RemoteDeviceAdapter, MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "RemoteDeviceAdapterProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3330,12 +3142,12 @@ def __init__( :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties """ super(RemoteDeviceAdapterSetRequestBody, self).__init__(**kwargs) - self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str - self.api_version = kwargs.get('api_version', "1.1") - self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str - self.name = kwargs['name'] - self.system_data = kwargs.get('system_data', None) - self.properties = kwargs.get('properties', None) + self.method_name = "RemoteDeviceAdapterSetRequestBody" # type: str + self.api_version = kwargs.get("api_version", "1.1") + self.method_name = "RemoteDeviceAdapterSetRequestBody" # type: str + self.name = kwargs["name"] + self.system_data = kwargs.get("system_data", None) + self.properties = kwargs.get("properties", None) class RemoteDeviceAdapterTarget(msrest.serialization.Model): @@ -3348,23 +3160,20 @@ class RemoteDeviceAdapterTarget(msrest.serialization.Model): """ _validation = { - 'host': {'required': True}, + "host": {"required": True}, } _attribute_map = { - 'host': {'key': 'host', 'type': 'str'}, + "host": {"key": "host", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword host: Required. Hostname or IP address of the remote device. :paramtype host: str """ super(RemoteDeviceAdapterTarget, self).__init__(**kwargs) - self.host = kwargs['host'] + self.host = kwargs["host"] class RtspSource(SourceNodeBase): @@ -3389,22 +3198,19 @@ class RtspSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'endpoint': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "endpoint": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'transport': {'key': 'transport', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "transport": {"key": "transport", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -3420,9 +3226,9 @@ def __init__( :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase """ super(RtspSource, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str - self.transport = kwargs.get('transport', None) - self.endpoint = kwargs['endpoint'] + self.type = "#Microsoft.VideoAnalyzer.RtspSource" # type: str + self.transport = kwargs.get("transport", None) + self.endpoint = kwargs["endpoint"] class SamplingOptions(msrest.serialization.Model): @@ -3440,14 +3246,11 @@ class SamplingOptions(msrest.serialization.Model): """ _attribute_map = { - 'skip_samples_without_annotation': {'key': 'skipSamplesWithoutAnnotation', 'type': 'str'}, - 'maximum_samples_per_second': {'key': 'maximumSamplesPerSecond', 'type': 'str'}, + "skip_samples_without_annotation": {"key": "skipSamplesWithoutAnnotation", "type": "str"}, + "maximum_samples_per_second": {"key": "maximumSamplesPerSecond", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword skip_samples_without_annotation: When set to 'true', prevents frames without upstream inference data to be sent to the extension plugin. This is useful to limit the frames sent to @@ -3460,8 +3263,8 @@ def __init__( :paramtype maximum_samples_per_second: str """ super(SamplingOptions, self).__init__(**kwargs) - self.skip_samples_without_annotation = kwargs.get('skip_samples_without_annotation', None) - self.maximum_samples_per_second = kwargs.get('maximum_samples_per_second', None) + self.skip_samples_without_annotation = kwargs.get("skip_samples_without_annotation", None) + self.maximum_samples_per_second = kwargs.get("maximum_samples_per_second", None) class SignalGateProcessor(ProcessorNodeBase): @@ -3497,25 +3300,22 @@ class SignalGateProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'activation_evaluation_window': {'key': 'activationEvaluationWindow', 'type': 'str'}, - 'activation_signal_offset': {'key': 'activationSignalOffset', 'type': 'str'}, - 'minimum_activation_time': {'key': 'minimumActivationTime', 'type': 'str'}, - 'maximum_activation_time': {'key': 'maximumActivationTime', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "activation_evaluation_window": {"key": "activationEvaluationWindow", "type": "str"}, + "activation_signal_offset": {"key": "activationSignalOffset", "type": "str"}, + "minimum_activation_time": {"key": "minimumActivationTime", "type": "str"}, + "maximum_activation_time": {"key": "maximumActivationTime", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -3542,11 +3342,11 @@ def __init__( :paramtype maximum_activation_time: str """ super(SignalGateProcessor, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SignalGateProcessor' # type: str - self.activation_evaluation_window = kwargs.get('activation_evaluation_window', None) - self.activation_signal_offset = kwargs.get('activation_signal_offset', None) - self.minimum_activation_time = kwargs.get('minimum_activation_time', None) - self.maximum_activation_time = kwargs.get('maximum_activation_time', None) + self.type = "#Microsoft.VideoAnalyzer.SignalGateProcessor" # type: str + self.activation_evaluation_window = kwargs.get("activation_evaluation_window", None) + self.activation_signal_offset = kwargs.get("activation_signal_offset", None) + self.minimum_activation_time = kwargs.get("minimum_activation_time", None) + self.maximum_activation_time = kwargs.get("maximum_activation_time", None) class SpatialAnalysisOperationBase(msrest.serialization.Model): @@ -3562,23 +3362,22 @@ class SpatialAnalysisOperationBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation': 'SpatialAnalysisCustomOperation', 'SpatialAnalysisTypedOperationBase': 'SpatialAnalysisTypedOperationBase'} + "type": { + "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation": "SpatialAnalysisCustomOperation", + "SpatialAnalysisTypedOperationBase": "SpatialAnalysisTypedOperationBase", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(SpatialAnalysisOperationBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -3596,27 +3395,24 @@ class SpatialAnalysisCustomOperation(SpatialAnalysisOperationBase): """ _validation = { - 'type': {'required': True}, - 'extension_configuration': {'required': True}, + "type": {"required": True}, + "extension_configuration": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'extension_configuration': {'key': 'extensionConfiguration', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "extension_configuration": {"key": "extensionConfiguration", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword extension_configuration: Required. Custom configuration to pass to the Azure Cognitive Services Spatial Analysis module. :paramtype extension_configuration: str """ super(SpatialAnalysisCustomOperation, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation' # type: str - self.extension_configuration = kwargs['extension_configuration'] + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation" # type: str + self.extension_configuration = kwargs["extension_configuration"] class SpatialAnalysisOperationEventBase(msrest.serialization.Model): @@ -3630,14 +3426,11 @@ class SpatialAnalysisOperationEventBase(msrest.serialization.Model): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The event threshold. :paramtype threshold: str @@ -3646,8 +3439,8 @@ def __init__( :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus """ super(SpatialAnalysisOperationEventBase, self).__init__(**kwargs) - self.threshold = kwargs.get('threshold', None) - self.focus = kwargs.get('focus', None) + self.threshold = kwargs.get("threshold", None) + self.focus = kwargs.get("focus", None) class SpatialAnalysisPersonCountEvent(SpatialAnalysisOperationEventBase): @@ -3666,16 +3459,13 @@ class SpatialAnalysisPersonCountEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'str'}, - 'output_frequency': {'key': 'outputFrequency', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, + "trigger": {"key": "trigger", "type": "str"}, + "output_frequency": {"key": "outputFrequency", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The event threshold. :paramtype threshold: str @@ -3689,8 +3479,8 @@ def __init__( :paramtype output_frequency: str """ super(SpatialAnalysisPersonCountEvent, self).__init__(**kwargs) - self.trigger = kwargs.get('trigger', None) - self.output_frequency = kwargs.get('output_frequency', None) + self.trigger = kwargs.get("trigger", None) + self.output_frequency = kwargs.get("output_frequency", None) class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): @@ -3721,28 +3511,30 @@ class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation': 'SpatialAnalysisPersonCountOperation', '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation': 'SpatialAnalysisPersonDistanceOperation', '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation': 'SpatialAnalysisPersonLineCrossingOperation', '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation': 'SpatialAnalysisPersonZoneCrossingOperation'} + "type": { + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation": "SpatialAnalysisPersonCountOperation", + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation": "SpatialAnalysisPersonDistanceOperation", + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation": "SpatialAnalysisPersonLineCrossingOperation", + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation": "SpatialAnalysisPersonZoneCrossingOperation", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword debug: If set to 'true', enables debugging mode for this operation. :paramtype debug: str @@ -3761,14 +3553,14 @@ def __init__( :paramtype enable_face_mask_classifier: str """ super(SpatialAnalysisTypedOperationBase, self).__init__(**kwargs) - self.type = 'SpatialAnalysisTypedOperationBase' # type: str - self.debug = kwargs.get('debug', None) - self.calibration_configuration = kwargs.get('calibration_configuration', None) - self.camera_configuration = kwargs.get('camera_configuration', None) - self.camera_calibrator_node_configuration = kwargs.get('camera_calibrator_node_configuration', None) - self.detector_node_configuration = kwargs.get('detector_node_configuration', None) - self.tracker_node_configuration = kwargs.get('tracker_node_configuration', None) - self.enable_face_mask_classifier = kwargs.get('enable_face_mask_classifier', None) + self.type = "SpatialAnalysisTypedOperationBase" # type: str + self.debug = kwargs.get("debug", None) + self.calibration_configuration = kwargs.get("calibration_configuration", None) + self.camera_configuration = kwargs.get("camera_configuration", None) + self.camera_calibrator_node_configuration = kwargs.get("camera_calibrator_node_configuration", None) + self.detector_node_configuration = kwargs.get("detector_node_configuration", None) + self.tracker_node_configuration = kwargs.get("tracker_node_configuration", None) + self.enable_face_mask_classifier = kwargs.get("enable_face_mask_classifier", None) class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): @@ -3799,26 +3591,23 @@ class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): """ _validation = { - 'type': {'required': True}, - 'zones': {'required': True}, + "type": {"required": True}, + "zones": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonCountZoneEvents]'}, - } - - def __init__( - self, - **kwargs - ): + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "zones": {"key": "zones", "type": "[SpatialAnalysisPersonCountZoneEvents]"}, + } + + def __init__(self, **kwargs): """ :keyword debug: If set to 'true', enables debugging mode for this operation. :paramtype debug: str @@ -3840,8 +3629,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] """ super(SpatialAnalysisPersonCountOperation, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation' # type: str - self.zones = kwargs['zones'] + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation" # type: str + self.zones = kwargs["zones"] class SpatialAnalysisPersonCountZoneEvents(msrest.serialization.Model): @@ -3856,18 +3645,15 @@ class SpatialAnalysisPersonCountZoneEvents(msrest.serialization.Model): """ _validation = { - 'zone': {'required': True}, + "zone": {"required": True}, } _attribute_map = { - 'zone': {'key': 'zone', 'type': 'NamedPolygonBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonCountEvent]'}, + "zone": {"key": "zone", "type": "NamedPolygonBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonCountEvent]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword zone: Required. The named zone. :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase @@ -3875,8 +3661,8 @@ def __init__( :paramtype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] """ super(SpatialAnalysisPersonCountZoneEvents, self).__init__(**kwargs) - self.zone = kwargs['zone'] - self.events = kwargs.get('events', None) + self.zone = kwargs["zone"] + self.events = kwargs.get("events", None) class SpatialAnalysisPersonDistanceEvent(SpatialAnalysisOperationEventBase): @@ -3899,18 +3685,15 @@ class SpatialAnalysisPersonDistanceEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'str'}, - 'output_frequency': {'key': 'outputFrequency', 'type': 'str'}, - 'minimum_distance_threshold': {'key': 'minimumDistanceThreshold', 'type': 'str'}, - 'maximum_distance_threshold': {'key': 'maximumDistanceThreshold', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, + "trigger": {"key": "trigger", "type": "str"}, + "output_frequency": {"key": "outputFrequency", "type": "str"}, + "minimum_distance_threshold": {"key": "minimumDistanceThreshold", "type": "str"}, + "maximum_distance_threshold": {"key": "maximumDistanceThreshold", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The event threshold. :paramtype threshold: str @@ -3928,10 +3711,10 @@ def __init__( :paramtype maximum_distance_threshold: str """ super(SpatialAnalysisPersonDistanceEvent, self).__init__(**kwargs) - self.trigger = kwargs.get('trigger', None) - self.output_frequency = kwargs.get('output_frequency', None) - self.minimum_distance_threshold = kwargs.get('minimum_distance_threshold', None) - self.maximum_distance_threshold = kwargs.get('maximum_distance_threshold', None) + self.trigger = kwargs.get("trigger", None) + self.output_frequency = kwargs.get("output_frequency", None) + self.minimum_distance_threshold = kwargs.get("minimum_distance_threshold", None) + self.maximum_distance_threshold = kwargs.get("maximum_distance_threshold", None) class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): @@ -3962,26 +3745,23 @@ class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): """ _validation = { - 'type': {'required': True}, - 'zones': {'required': True}, + "type": {"required": True}, + "zones": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonDistanceZoneEvents]'}, - } - - def __init__( - self, - **kwargs - ): + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "zones": {"key": "zones", "type": "[SpatialAnalysisPersonDistanceZoneEvents]"}, + } + + def __init__(self, **kwargs): """ :keyword debug: If set to 'true', enables debugging mode for this operation. :paramtype debug: str @@ -4003,8 +3783,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceZoneEvents] """ super(SpatialAnalysisPersonDistanceOperation, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation' # type: str - self.zones = kwargs['zones'] + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation" # type: str + self.zones = kwargs["zones"] class SpatialAnalysisPersonDistanceZoneEvents(msrest.serialization.Model): @@ -4020,18 +3800,15 @@ class SpatialAnalysisPersonDistanceZoneEvents(msrest.serialization.Model): """ _validation = { - 'zone': {'required': True}, + "zone": {"required": True}, } _attribute_map = { - 'zone': {'key': 'zone', 'type': 'NamedPolygonBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonDistanceEvent]'}, + "zone": {"key": "zone", "type": "NamedPolygonBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonDistanceEvent]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword zone: Required. The named zone. :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase @@ -4040,8 +3817,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] """ super(SpatialAnalysisPersonDistanceZoneEvents, self).__init__(**kwargs) - self.zone = kwargs['zone'] - self.events = kwargs.get('events', None) + self.zone = kwargs["zone"] + self.events = kwargs.get("events", None) class SpatialAnalysisPersonLineCrossingEvent(SpatialAnalysisOperationEventBase): @@ -4055,14 +3832,11 @@ class SpatialAnalysisPersonLineCrossingEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The event threshold. :paramtype threshold: str @@ -4086,18 +3860,15 @@ class SpatialAnalysisPersonLineCrossingLineEvents(msrest.serialization.Model): """ _validation = { - 'line': {'required': True}, + "line": {"required": True}, } _attribute_map = { - 'line': {'key': 'line', 'type': 'NamedLineBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonLineCrossingEvent]'}, + "line": {"key": "line", "type": "NamedLineBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonLineCrossingEvent]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword line: Required. The named line. :paramtype line: ~azure.media.videoanalyzer.edge.models.NamedLineBase @@ -4106,8 +3877,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingEvent] """ super(SpatialAnalysisPersonLineCrossingLineEvents, self).__init__(**kwargs) - self.line = kwargs['line'] - self.events = kwargs.get('events', None) + self.line = kwargs["line"] + self.events = kwargs.get("events", None) class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBase): @@ -4138,26 +3909,23 @@ class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBa """ _validation = { - 'type': {'required': True}, - 'lines': {'required': True}, + "type": {"required": True}, + "lines": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'lines': {'key': 'lines', 'type': '[SpatialAnalysisPersonLineCrossingLineEvents]'}, - } - - def __init__( - self, - **kwargs - ): + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "lines": {"key": "lines", "type": "[SpatialAnalysisPersonLineCrossingLineEvents]"}, + } + + def __init__(self, **kwargs): """ :keyword debug: If set to 'true', enables debugging mode for this operation. :paramtype debug: str @@ -4179,8 +3947,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingLineEvents] """ super(SpatialAnalysisPersonLineCrossingOperation, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation' # type: str - self.lines = kwargs['lines'] + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation" # type: str + self.lines = kwargs["lines"] class SpatialAnalysisPersonZoneCrossingEvent(SpatialAnalysisOperationEventBase): @@ -4197,15 +3965,12 @@ class SpatialAnalysisPersonZoneCrossingEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, + "event_type": {"key": "eventType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The event threshold. :paramtype threshold: str @@ -4217,7 +3982,7 @@ def __init__( ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEventType """ super(SpatialAnalysisPersonZoneCrossingEvent, self).__init__(**kwargs) - self.event_type = kwargs.get('event_type', None) + self.event_type = kwargs.get("event_type", None) class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBase): @@ -4248,26 +4013,23 @@ class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBa """ _validation = { - 'type': {'required': True}, - 'zones': {'required': True}, + "type": {"required": True}, + "zones": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonZoneCrossingZoneEvents]'}, - } - - def __init__( - self, - **kwargs - ): + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "zones": {"key": "zones", "type": "[SpatialAnalysisPersonZoneCrossingZoneEvents]"}, + } + + def __init__(self, **kwargs): """ :keyword debug: If set to 'true', enables debugging mode for this operation. :paramtype debug: str @@ -4289,8 +4051,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingZoneEvents] """ super(SpatialAnalysisPersonZoneCrossingOperation, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation' # type: str - self.zones = kwargs['zones'] + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation" # type: str + self.zones = kwargs["zones"] class SpatialAnalysisPersonZoneCrossingZoneEvents(msrest.serialization.Model): @@ -4306,18 +4068,15 @@ class SpatialAnalysisPersonZoneCrossingZoneEvents(msrest.serialization.Model): """ _validation = { - 'zone': {'required': True}, + "zone": {"required": True}, } _attribute_map = { - 'zone': {'key': 'zone', 'type': 'NamedPolygonBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonZoneCrossingEvent]'}, + "zone": {"key": "zone", "type": "NamedPolygonBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonZoneCrossingEvent]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword zone: Required. The named zone. :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase @@ -4326,8 +4085,8 @@ def __init__( list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEvent] """ super(SpatialAnalysisPersonZoneCrossingZoneEvents, self).__init__(**kwargs) - self.zone = kwargs['zone'] - self.events = kwargs.get('events', None) + self.zone = kwargs["zone"] + self.events = kwargs.get("events", None) class SymmetricKeyCredentials(CredentialsBase): @@ -4342,26 +4101,23 @@ class SymmetricKeyCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'key': {'required': True}, + "type": {"required": True}, + "key": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "key": {"key": "key", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key: Required. Symmetric key credential. :paramtype key: str """ super(SymmetricKeyCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials' # type: str - self.key = kwargs['key'] + self.type = "#Microsoft.VideoAnalyzer.SymmetricKeyCredentials" # type: str + self.key = kwargs["key"] class SystemData(msrest.serialization.Model): @@ -4376,14 +4132,11 @@ class SystemData(msrest.serialization.Model): """ _attribute_map = { - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword created_at: Date and time when this resource was first created. Value is represented in UTC according to the ISO8601 date format. @@ -4393,8 +4146,8 @@ def __init__( :paramtype last_modified_at: ~datetime.datetime """ super(SystemData, self).__init__(**kwargs) - self.created_at = kwargs.get('created_at', None) - self.last_modified_at = kwargs.get('last_modified_at', None) + self.created_at = kwargs.get("created_at", None) + self.last_modified_at = kwargs.get("last_modified_at", None) class TlsEndpoint(EndpointBase): @@ -4418,22 +4171,19 @@ class TlsEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'CertificateSource'}, - 'validation_options': {'key': 'validationOptions', 'type': 'TlsValidationOptions'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "trusted_certificates": {"key": "trustedCertificates", "type": "CertificateSource"}, + "validation_options": {"key": "validationOptions", "type": "TlsValidationOptions"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword credentials: Credentials to be presented to the endpoint. :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase @@ -4448,9 +4198,9 @@ def __init__( :paramtype validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions """ super(TlsEndpoint, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str - self.trusted_certificates = kwargs.get('trusted_certificates', None) - self.validation_options = kwargs.get('validation_options', None) + self.type = "#Microsoft.VideoAnalyzer.TlsEndpoint" # type: str + self.trusted_certificates = kwargs.get("trusted_certificates", None) + self.validation_options = kwargs.get("validation_options", None) class TlsValidationOptions(msrest.serialization.Model): @@ -4465,14 +4215,11 @@ class TlsValidationOptions(msrest.serialization.Model): """ _attribute_map = { - 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, - 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + "ignore_hostname": {"key": "ignoreHostname", "type": "str"}, + "ignore_signature": {"key": "ignoreSignature", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword ignore_hostname: When set to 'true' causes the certificate subject name validation to be skipped. Default is 'false'. @@ -4482,8 +4229,8 @@ def __init__( :paramtype ignore_signature: str """ super(TlsValidationOptions, self).__init__(**kwargs) - self.ignore_hostname = kwargs.get('ignore_hostname', None) - self.ignore_signature = kwargs.get('ignore_signature', None) + self.ignore_hostname = kwargs.get("ignore_hostname", None) + self.ignore_signature = kwargs.get("ignore_signature", None) class UnsecuredEndpoint(EndpointBase): @@ -4500,20 +4247,17 @@ class UnsecuredEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword credentials: Credentials to be presented to the endpoint. :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase @@ -4521,7 +4265,7 @@ def __init__( :paramtype url: str """ super(UnsecuredEndpoint, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str + self.type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint" # type: str class UsernamePasswordCredentials(CredentialsBase): @@ -4540,21 +4284,18 @@ class UsernamePasswordCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'username': {'required': True}, - 'password': {'required': True}, + "type": {"required": True}, + "username": {"required": True}, + "password": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password": {"key": "password", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword username: Required. Username to be presented as part of the credentials. :paramtype username: str @@ -4564,9 +4305,9 @@ def __init__( :paramtype password: str """ super(UsernamePasswordCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str - self.username = kwargs['username'] - self.password = kwargs['password'] + self.type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials" # type: str + self.username = kwargs["username"] + self.password = kwargs["password"] class VideoCreationProperties(msrest.serialization.Model): @@ -4592,16 +4333,13 @@ class VideoCreationProperties(msrest.serialization.Model): """ _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, - 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + "title": {"key": "title", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "segment_length": {"key": "segmentLength", "type": "str"}, + "retention_period": {"key": "retentionPeriod", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword title: Optional video title provided by the user. Value can be up to 256 characters long. @@ -4623,10 +4361,10 @@ def __init__( :paramtype retention_period: str """ super(VideoCreationProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.segment_length = kwargs.get('segment_length', None) - self.retention_period = kwargs.get('retention_period', None) + self.title = kwargs.get("title", None) + self.description = kwargs.get("description", None) + self.segment_length = kwargs.get("segment_length", None) + self.retention_period = kwargs.get("retention_period", None) class VideoEncoderConfiguration(msrest.serialization.Model): @@ -4648,18 +4386,15 @@ class VideoEncoderConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'encoding': {'key': 'encoding', 'type': 'str'}, - 'quality': {'key': 'quality', 'type': 'float'}, - 'resolution': {'key': 'resolution', 'type': 'VideoResolution'}, - 'rate_control': {'key': 'rateControl', 'type': 'RateControl'}, - 'h264': {'key': 'h264', 'type': 'H264Configuration'}, - 'mpeg4': {'key': 'mpeg4', 'type': 'MPEG4Configuration'}, + "encoding": {"key": "encoding", "type": "str"}, + "quality": {"key": "quality", "type": "float"}, + "resolution": {"key": "resolution", "type": "VideoResolution"}, + "rate_control": {"key": "rateControl", "type": "RateControl"}, + "h264": {"key": "h264", "type": "H264Configuration"}, + "mpeg4": {"key": "mpeg4", "type": "MPEG4Configuration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword encoding: The video codec used by the Media Profile. Possible values include: "JPEG", "H264", "MPEG4". @@ -4676,12 +4411,12 @@ def __init__( :paramtype mpeg4: ~azure.media.videoanalyzer.edge.models.MPEG4Configuration """ super(VideoEncoderConfiguration, self).__init__(**kwargs) - self.encoding = kwargs.get('encoding', None) - self.quality = kwargs.get('quality', None) - self.resolution = kwargs.get('resolution', None) - self.rate_control = kwargs.get('rate_control', None) - self.h264 = kwargs.get('h264', None) - self.mpeg4 = kwargs.get('mpeg4', None) + self.encoding = kwargs.get("encoding", None) + self.quality = kwargs.get("quality", None) + self.resolution = kwargs.get("resolution", None) + self.rate_control = kwargs.get("rate_control", None) + self.h264 = kwargs.get("h264", None) + self.mpeg4 = kwargs.get("mpeg4", None) class VideoPublishingOptions(msrest.serialization.Model): @@ -4693,20 +4428,17 @@ class VideoPublishingOptions(msrest.serialization.Model): """ _attribute_map = { - 'enable_video_preview_image': {'key': 'enableVideoPreviewImage', 'type': 'str'}, + "enable_video_preview_image": {"key": "enableVideoPreviewImage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword enable_video_preview_image: When set to 'true' the video will publish preview images. Default is 'false'. :paramtype enable_video_preview_image: str """ super(VideoPublishingOptions, self).__init__(**kwargs) - self.enable_video_preview_image = kwargs.get('enable_video_preview_image', None) + self.enable_video_preview_image = kwargs.get("enable_video_preview_image", None) class VideoResolution(msrest.serialization.Model): @@ -4719,14 +4451,11 @@ class VideoResolution(msrest.serialization.Model): """ _attribute_map = { - 'width': {'key': 'width', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, + "width": {"key": "width", "type": "float"}, + "height": {"key": "height", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword width: The number of columns of the Video image. :paramtype width: float @@ -4734,8 +4463,8 @@ def __init__( :paramtype height: float """ super(VideoResolution, self).__init__(**kwargs) - self.width = kwargs.get('width', None) - self.height = kwargs.get('height', None) + self.width = kwargs.get("width", None) + self.height = kwargs.get("height", None) class VideoSink(SinkNodeBase): @@ -4773,29 +4502,26 @@ class VideoSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'video_name': {'required': True}, - 'local_media_cache_path': {'required': True}, - 'local_media_cache_maximum_size_mi_b': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "video_name": {"required": True}, + "local_media_cache_path": {"required": True}, + "local_media_cache_maximum_size_mi_b": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'video_name': {'key': 'videoName', 'type': 'str'}, - 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, - 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, - 'local_media_cache_path': {'key': 'localMediaCachePath', 'type': 'str'}, - 'local_media_cache_maximum_size_mi_b': {'key': 'localMediaCacheMaximumSizeMiB', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "video_name": {"key": "videoName", "type": "str"}, + "video_creation_properties": {"key": "videoCreationProperties", "type": "VideoCreationProperties"}, + "video_publishing_options": {"key": "videoPublishingOptions", "type": "VideoPublishingOptions"}, + "local_media_cache_path": {"key": "localMediaCachePath", "type": "str"}, + "local_media_cache_maximum_size_mi_b": {"key": "localMediaCacheMaximumSizeMiB", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -4824,9 +4550,9 @@ def __init__( :paramtype local_media_cache_maximum_size_mi_b: str """ super(VideoSink, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str - self.video_name = kwargs['video_name'] - self.video_creation_properties = kwargs.get('video_creation_properties', None) - self.video_publishing_options = kwargs.get('video_publishing_options', None) - self.local_media_cache_path = kwargs['local_media_cache_path'] - self.local_media_cache_maximum_size_mi_b = kwargs['local_media_cache_maximum_size_mi_b'] + self.type = "#Microsoft.VideoAnalyzer.VideoSink" # type: str + self.video_name = kwargs["video_name"] + self.video_creation_properties = kwargs.get("video_creation_properties", None) + self.video_publishing_options = kwargs.get("video_publishing_options", None) + self.local_media_cache_path = kwargs["local_media_cache_path"] + self.local_media_cache_maximum_size_mi_b = kwargs["local_media_cache_maximum_size_mi_b"] diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py index a78b99e43b11..29ea37d3cb52 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py @@ -27,23 +27,17 @@ class CertificateSource(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.PemCertificateList': 'PemCertificateList'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.PemCertificateList": "PemCertificateList"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(CertificateSource, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -66,28 +60,29 @@ class ProcessorNodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor': 'CognitiveServicesVisionProcessor', '#Microsoft.VideoAnalyzer.ExtensionProcessorBase': 'ExtensionProcessorBase', '#Microsoft.VideoAnalyzer.LineCrossingProcessor': 'LineCrossingProcessor', '#Microsoft.VideoAnalyzer.MotionDetectionProcessor': 'MotionDetectionProcessor', '#Microsoft.VideoAnalyzer.ObjectTrackingProcessor': 'ObjectTrackingProcessor', '#Microsoft.VideoAnalyzer.SignalGateProcessor': 'SignalGateProcessor'} + "type": { + "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor": "CognitiveServicesVisionProcessor", + "#Microsoft.VideoAnalyzer.ExtensionProcessorBase": "ExtensionProcessorBase", + "#Microsoft.VideoAnalyzer.LineCrossingProcessor": "LineCrossingProcessor", + "#Microsoft.VideoAnalyzer.MotionDetectionProcessor": "MotionDetectionProcessor", + "#Microsoft.VideoAnalyzer.ObjectTrackingProcessor": "ObjectTrackingProcessor", + "#Microsoft.VideoAnalyzer.SignalGateProcessor": "SignalGateProcessor", + } } - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -126,21 +121,21 @@ class CognitiveServicesVisionProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'operation': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "operation": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, - 'operation': {'key': 'operation', 'type': 'SpatialAnalysisOperationBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, + "operation": {"key": "operation", "type": "SpatialAnalysisOperationBase"}, } def __init__( @@ -172,7 +167,7 @@ def __init__( :paramtype operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase """ super(CognitiveServicesVisionProcessor, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor' # type: str + self.type = "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor" # type: str self.endpoint = endpoint self.image = image self.sampling_options = sampling_options @@ -192,23 +187,23 @@ class CredentialsBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.HttpHeaderCredentials': 'HttpHeaderCredentials', '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials': 'SymmetricKeyCredentials', '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} + "type": { + "#Microsoft.VideoAnalyzer.HttpHeaderCredentials": "HttpHeaderCredentials", + "#Microsoft.VideoAnalyzer.SymmetricKeyCredentials": "SymmetricKeyCredentials", + "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials": "UsernamePasswordCredentials", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(CredentialsBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -230,10 +225,10 @@ class DiscoveredOnvifDevice(msrest.serialization.Model): """ _attribute_map = { - 'service_identifier': {'key': 'serviceIdentifier', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'scopes': {'key': 'scopes', 'type': '[str]'}, - 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + "service_identifier": {"key": "serviceIdentifier", "type": "str"}, + "remote_ip_address": {"key": "remoteIPAddress", "type": "str"}, + "scopes": {"key": "scopes", "type": "[str]"}, + "endpoints": {"key": "endpoints", "type": "[str]"}, } def __init__( @@ -275,15 +270,10 @@ class DiscoveredOnvifDeviceCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[DiscoveredOnvifDevice]'}, + "value": {"key": "value", "type": "[DiscoveredOnvifDevice]"}, } - def __init__( - self, - *, - value: Optional[List["DiscoveredOnvifDevice"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["DiscoveredOnvifDevice"]] = None, **kwargs): """ :keyword value: An array of ONVIF devices that have been discovered in the same subnet as the IoT Edge device. @@ -310,27 +300,24 @@ class EndpointBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.TlsEndpoint': 'TlsEndpoint', '#Microsoft.VideoAnalyzer.UnsecuredEndpoint': 'UnsecuredEndpoint'} + "type": { + "#Microsoft.VideoAnalyzer.TlsEndpoint": "TlsEndpoint", + "#Microsoft.VideoAnalyzer.UnsecuredEndpoint": "UnsecuredEndpoint", + } } - def __init__( - self, - *, - url: str, - credentials: Optional["CredentialsBase"] = None, - **kwargs - ): + def __init__(self, *, url: str, credentials: Optional["CredentialsBase"] = None, **kwargs): """ :keyword credentials: Credentials to be presented to the endpoint. :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase @@ -369,24 +356,27 @@ class ExtensionProcessorBase(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'image': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "image": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.GrpcExtension': 'GrpcExtension', '#Microsoft.VideoAnalyzer.HttpExtension': 'HttpExtension'} + "type": { + "#Microsoft.VideoAnalyzer.GrpcExtension": "GrpcExtension", + "#Microsoft.VideoAnalyzer.HttpExtension": "HttpExtension", + } } def __init__( @@ -415,7 +405,7 @@ def __init__( :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ super(ExtensionProcessorBase, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.ExtensionProcessorBase' # type: str + self.type = "#Microsoft.VideoAnalyzer.ExtensionProcessorBase" # type: str self.endpoint = endpoint self.image = image self.sampling_options = sampling_options @@ -439,28 +429,26 @@ class SinkNodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.FileSink': 'FileSink', '#Microsoft.VideoAnalyzer.IotHubMessageSink': 'IotHubMessageSink', '#Microsoft.VideoAnalyzer.VideoSink': 'VideoSink'} + "type": { + "#Microsoft.VideoAnalyzer.FileSink": "FileSink", + "#Microsoft.VideoAnalyzer.IotHubMessageSink": "IotHubMessageSink", + "#Microsoft.VideoAnalyzer.VideoSink": "VideoSink", + } } - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -498,21 +486,21 @@ class FileSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'base_directory_path': {'required': True}, - 'file_name_pattern': {'required': True}, - 'maximum_size_mi_b': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "base_directory_path": {"required": True}, + "file_name_pattern": {"required": True}, + "maximum_size_mi_b": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'base_directory_path': {'key': 'baseDirectoryPath', 'type': 'str'}, - 'file_name_pattern': {'key': 'fileNamePattern', 'type': 'str'}, - 'maximum_size_mi_b': {'key': 'maximumSizeMiB', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "base_directory_path": {"key": "baseDirectoryPath", "type": "str"}, + "file_name_pattern": {"key": "fileNamePattern", "type": "str"}, + "maximum_size_mi_b": {"key": "maximumSizeMiB", "type": "str"}, } def __init__( @@ -543,7 +531,7 @@ def __init__( :paramtype maximum_size_mi_b: str """ super(FileSink, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.FileSink' # type: str + self.type = "#Microsoft.VideoAnalyzer.FileSink" # type: str self.base_directory_path = base_directory_path self.file_name_pattern = file_name_pattern self.maximum_size_mi_b = maximum_size_mi_b @@ -578,23 +566,23 @@ class GrpcExtension(ExtensionProcessorBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'image': {'required': True}, - 'data_transfer': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "image": {"required": True}, + "data_transfer": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, - 'data_transfer': {'key': 'dataTransfer', 'type': 'GrpcExtensionDataTransfer'}, - 'extension_configuration': {'key': 'extensionConfiguration', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, + "data_transfer": {"key": "dataTransfer", "type": "GrpcExtensionDataTransfer"}, + "extension_configuration": {"key": "extensionConfiguration", "type": "str"}, } def __init__( @@ -631,8 +619,10 @@ def __init__( for details. :paramtype extension_configuration: str """ - super(GrpcExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.GrpcExtension' # type: str + super(GrpcExtension, self).__init__( + name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs + ) + self.type = "#Microsoft.VideoAnalyzer.GrpcExtension" # type: str self.data_transfer = data_transfer self.extension_configuration = extension_configuration @@ -651,12 +641,12 @@ class GrpcExtensionDataTransfer(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'shared_memory_size_mi_b': {'key': 'sharedMemorySizeMiB', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, + "shared_memory_size_mi_b": {"key": "sharedMemorySizeMiB", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, } def __init__( @@ -690,16 +680,12 @@ class H264Configuration(msrest.serialization.Model): """ _attribute_map = { - 'gov_length': {'key': 'govLength', 'type': 'float'}, - 'profile': {'key': 'profile', 'type': 'str'}, + "gov_length": {"key": "govLength", "type": "float"}, + "profile": {"key": "profile", "type": "str"}, } def __init__( - self, - *, - gov_length: Optional[float] = None, - profile: Optional[Union[str, "H264Profile"]] = None, - **kwargs + self, *, gov_length: Optional[float] = None, profile: Optional[Union[str, "H264Profile"]] = None, **kwargs ): """ :keyword gov_length: Group of Video frames length. @@ -736,20 +722,20 @@ class HttpExtension(ExtensionProcessorBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'endpoint': {'required': True}, - 'image': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "endpoint": {"required": True}, + "image": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, - 'image': {'key': 'image', 'type': 'ImageProperties'}, - 'sampling_options': {'key': 'samplingOptions', 'type': 'SamplingOptions'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, + "image": {"key": "image", "type": "ImageProperties"}, + "sampling_options": {"key": "samplingOptions", "type": "SamplingOptions"}, } def __init__( @@ -777,8 +763,10 @@ def __init__( to the extension plugin. :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ - super(HttpExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.HttpExtension' # type: str + super(HttpExtension, self).__init__( + name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs + ) + self.type = "#Microsoft.VideoAnalyzer.HttpExtension" # type: str class HttpHeaderCredentials(CredentialsBase): @@ -797,24 +785,18 @@ class HttpHeaderCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'header_name': {'required': True}, - 'header_value': {'required': True}, + "type": {"required": True}, + "header_name": {"required": True}, + "header_value": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'header_name': {'key': 'headerName', 'type': 'str'}, - 'header_value': {'key': 'headerValue', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "header_name": {"key": "headerName", "type": "str"}, + "header_value": {"key": "headerValue", "type": "str"}, } - def __init__( - self, - *, - header_name: str, - header_value: str, - **kwargs - ): + def __init__(self, *, header_name: str, header_value: str, **kwargs): """ :keyword header_name: Required. HTTP header name. :paramtype header_name: str @@ -824,7 +806,7 @@ def __init__( :paramtype header_value: str """ super(HttpHeaderCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.HttpHeaderCredentials' # type: str + self.type = "#Microsoft.VideoAnalyzer.HttpHeaderCredentials" # type: str self.header_name = header_name self.header_value = header_value @@ -842,23 +824,24 @@ class ImageFormatProperties(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.ImageFormatBmp': 'ImageFormatBmp', '#Microsoft.VideoAnalyzer.ImageFormatJpeg': 'ImageFormatJpeg', '#Microsoft.VideoAnalyzer.ImageFormatPng': 'ImageFormatPng', '#Microsoft.VideoAnalyzer.ImageFormatRaw': 'ImageFormatRaw'} + "type": { + "#Microsoft.VideoAnalyzer.ImageFormatBmp": "ImageFormatBmp", + "#Microsoft.VideoAnalyzer.ImageFormatJpeg": "ImageFormatJpeg", + "#Microsoft.VideoAnalyzer.ImageFormatPng": "ImageFormatPng", + "#Microsoft.VideoAnalyzer.ImageFormatRaw": "ImageFormatRaw", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ImageFormatProperties, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -873,21 +856,17 @@ class ImageFormatBmp(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ImageFormatBmp, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatBmp' # type: str + self.type = "#Microsoft.VideoAnalyzer.ImageFormatBmp" # type: str class ImageFormatJpeg(ImageFormatProperties): @@ -902,26 +881,21 @@ class ImageFormatJpeg(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'quality': {'key': 'quality', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "quality": {"key": "quality", "type": "str"}, } - def __init__( - self, - *, - quality: Optional[str] = None, - **kwargs - ): + def __init__(self, *, quality: Optional[str] = None, **kwargs): """ :keyword quality: Image quality value between 0 to 100 (best quality). :paramtype quality: str """ super(ImageFormatJpeg, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatJpeg' # type: str + self.type = "#Microsoft.VideoAnalyzer.ImageFormatJpeg" # type: str self.quality = quality @@ -935,21 +909,17 @@ class ImageFormatPng(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ImageFormatPng, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatPng' # type: str + self.type = "#Microsoft.VideoAnalyzer.ImageFormatPng" # type: str class ImageFormatRaw(ImageFormatProperties): @@ -966,21 +936,16 @@ class ImageFormatRaw(ImageFormatProperties): """ _validation = { - 'type': {'required': True}, - 'pixel_format': {'required': True}, + "type": {"required": True}, + "pixel_format": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'pixel_format': {'key': 'pixelFormat', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "pixel_format": {"key": "pixelFormat", "type": "str"}, } - def __init__( - self, - *, - pixel_format: Union[str, "ImageFormatRawPixelFormat"], - **kwargs - ): + def __init__(self, *, pixel_format: Union[str, "ImageFormatRawPixelFormat"], **kwargs): """ :keyword pixel_format: Required. Pixel format to be applied to the raw image. Possible values include: "yuv420p", "rgb565be", "rgb565le", "rgb555be", "rgb555le", "rgb24", "bgr24", "argb", @@ -989,7 +954,7 @@ def __init__( ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat """ super(ImageFormatRaw, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ImageFormatRaw' # type: str + self.type = "#Microsoft.VideoAnalyzer.ImageFormatRaw" # type: str self.pixel_format = pixel_format @@ -1003,16 +968,12 @@ class ImageProperties(msrest.serialization.Model): """ _attribute_map = { - 'scale': {'key': 'scale', 'type': 'ImageScale'}, - 'format': {'key': 'format', 'type': 'ImageFormatProperties'}, + "scale": {"key": "scale", "type": "ImageScale"}, + "format": {"key": "format", "type": "ImageFormatProperties"}, } def __init__( - self, - *, - scale: Optional["ImageScale"] = None, - format: Optional["ImageFormatProperties"] = None, - **kwargs + self, *, scale: Optional["ImageScale"] = None, format: Optional["ImageFormatProperties"] = None, **kwargs ): """ :keyword scale: Image scaling mode. @@ -1038,9 +999,9 @@ class ImageScale(msrest.serialization.Model): """ _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'str'}, - 'height': {'key': 'height', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "width": {"key": "width", "type": "str"}, + "height": {"key": "height", "type": "str"}, } def __init__( @@ -1080,21 +1041,15 @@ class IotHubDeviceConnection(msrest.serialization.Model): """ _validation = { - 'device_id': {'required': True}, + "device_id": {"required": True}, } _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + "device_id": {"key": "deviceId", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, } - def __init__( - self, - *, - device_id: str, - credentials: Optional["CredentialsBase"] = None, - **kwargs - ): + def __init__(self, *, device_id: str, credentials: Optional["CredentialsBase"] = None, **kwargs): """ :keyword device_id: Required. The name of the IoT device configured and managed in IoT Hub. (case-sensitive). @@ -1126,27 +1081,20 @@ class IotHubMessageSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'hub_output_name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "hub_output_name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'hub_output_name': {'key': 'hubOutputName', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "hub_output_name": {"key": "hubOutputName", "type": "str"}, } - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - hub_output_name: str, - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], hub_output_name: str, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1158,7 +1106,7 @@ def __init__( :paramtype hub_output_name: str """ super(IotHubMessageSink, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSink' # type: str + self.type = "#Microsoft.VideoAnalyzer.IotHubMessageSink" # type: str self.hub_output_name = hub_output_name @@ -1177,25 +1125,23 @@ class SourceNodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.IotHubMessageSource': 'IotHubMessageSource', '#Microsoft.VideoAnalyzer.RtspSource': 'RtspSource'} + "type": { + "#Microsoft.VideoAnalyzer.IotHubMessageSource": "IotHubMessageSource", + "#Microsoft.VideoAnalyzer.RtspSource": "RtspSource", + } } - def __init__( - self, - *, - name: str, - **kwargs - ): + def __init__(self, *, name: str, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1219,23 +1165,17 @@ class IotHubMessageSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'hub_input_name': {'key': 'hubInputName', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "hub_input_name": {"key": "hubInputName", "type": "str"}, } - def __init__( - self, - *, - name: str, - hub_input_name: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: str, hub_input_name: Optional[str] = None, **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1243,7 +1183,7 @@ def __init__( :paramtype hub_input_name: str """ super(IotHubMessageSource, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSource' # type: str + self.type = "#Microsoft.VideoAnalyzer.IotHubMessageSource" # type: str self.hub_input_name = hub_input_name @@ -1264,27 +1204,20 @@ class LineCrossingProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'lines': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "lines": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'lines': {'key': 'lines', 'type': '[NamedLineBase]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "lines": {"key": "lines", "type": "[NamedLineBase]"}, } - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - lines: List["NamedLineBase"], - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], lines: List["NamedLineBase"], **kwargs): """ :keyword name: Required. Node name. Must be unique within the topology. :paramtype name: str @@ -1295,7 +1228,7 @@ def __init__( :paramtype lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] """ super(LineCrossingProcessor, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.LineCrossingProcessor' # type: str + self.type = "#Microsoft.VideoAnalyzer.LineCrossingProcessor" # type: str self.lines = lines @@ -1313,13 +1246,13 @@ class LivePipeline(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'LivePipelineProperties'}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "LivePipelineProperties"}, } def __init__( @@ -1362,24 +1295,32 @@ class MethodRequest(msrest.serialization.Model): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } _subtype_map = { - 'method_name': {'LivePipelineSetRequestBody': 'LivePipelineSetRequestBody', 'MethodRequestEmptyBodyBase': 'MethodRequestEmptyBodyBase', 'PipelineTopologySetRequestBody': 'PipelineTopologySetRequestBody', 'RemoteDeviceAdapterSetRequestBody': 'RemoteDeviceAdapterSetRequestBody', 'livePipelineList': 'LivePipelineListRequest', 'livePipelineSet': 'LivePipelineSetRequest', 'onvifDeviceDiscover': 'OnvifDeviceDiscoverRequest', 'onvifDeviceGet': 'OnvifDeviceGetRequest', 'pipelineTopologyList': 'PipelineTopologyListRequest', 'pipelineTopologySet': 'PipelineTopologySetRequest', 'remoteDeviceAdapterList': 'RemoteDeviceAdapterListRequest', 'remoteDeviceAdapterSet': 'RemoteDeviceAdapterSetRequest'} - } - - def __init__( - self, - *, - api_version: Optional[str] = "1.1", - **kwargs - ): + "method_name": { + "LivePipelineSetRequestBody": "LivePipelineSetRequestBody", + "MethodRequestEmptyBodyBase": "MethodRequestEmptyBodyBase", + "PipelineTopologySetRequestBody": "PipelineTopologySetRequestBody", + "RemoteDeviceAdapterSetRequestBody": "RemoteDeviceAdapterSetRequestBody", + "livePipelineList": "LivePipelineListRequest", + "livePipelineSet": "LivePipelineSetRequest", + "onvifDeviceDiscover": "OnvifDeviceDiscoverRequest", + "onvifDeviceGet": "OnvifDeviceGetRequest", + "pipelineTopologyList": "PipelineTopologyListRequest", + "pipelineTopologySet": "PipelineTopologySetRequest", + "remoteDeviceAdapterList": "RemoteDeviceAdapterListRequest", + "remoteDeviceAdapterSet": "RemoteDeviceAdapterSetRequest", + } + } + + def __init__(self, *, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1410,27 +1351,30 @@ class MethodRequestEmptyBodyBase(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'method_name': {'livePipelineActivate': 'LivePipelineActivateRequest', 'livePipelineDeactivate': 'LivePipelineDeactivateRequest', 'livePipelineDelete': 'LivePipelineDeleteRequest', 'livePipelineGet': 'LivePipelineGetRequest', 'pipelineTopologyDelete': 'PipelineTopologyDeleteRequest', 'pipelineTopologyGet': 'PipelineTopologyGetRequest', 'remoteDeviceAdapterDelete': 'RemoteDeviceAdapterDeleteRequest', 'remoteDeviceAdapterGet': 'RemoteDeviceAdapterGetRequest'} + "method_name": { + "livePipelineActivate": "LivePipelineActivateRequest", + "livePipelineDeactivate": "LivePipelineDeactivateRequest", + "livePipelineDelete": "LivePipelineDeleteRequest", + "livePipelineGet": "LivePipelineGetRequest", + "pipelineTopologyDelete": "PipelineTopologyDeleteRequest", + "pipelineTopologyGet": "PipelineTopologyGetRequest", + "remoteDeviceAdapterDelete": "RemoteDeviceAdapterDeleteRequest", + "remoteDeviceAdapterGet": "RemoteDeviceAdapterGetRequest", + } } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1439,7 +1383,7 @@ def __init__( :paramtype name: str """ super(MethodRequestEmptyBodyBase, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'MethodRequestEmptyBodyBase' # type: str + self.method_name = "MethodRequestEmptyBodyBase" # type: str self.name = name @@ -1460,23 +1404,17 @@ class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1485,7 +1423,7 @@ def __init__( :paramtype name: str """ super(LivePipelineActivateRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'livePipelineActivate' # type: str + self.method_name = "livePipelineActivate" # type: str class LivePipelineCollection(msrest.serialization.Model): @@ -1500,16 +1438,12 @@ class LivePipelineCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[LivePipeline]'}, - 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + "value": {"key": "value", "type": "[LivePipeline]"}, + "continuation_token": {"key": "@continuationToken", "type": "str"}, } def __init__( - self, - *, - value: Optional[List["LivePipeline"]] = None, - continuation_token: Optional[str] = None, - **kwargs + self, *, value: Optional[List["LivePipeline"]] = None, continuation_token: Optional[str] = None, **kwargs ): """ :keyword value: List of live pipelines. @@ -1541,23 +1475,17 @@ class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1566,7 +1494,7 @@ def __init__( :paramtype name: str """ super(LivePipelineDeactivateRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'livePipelineDeactivate' # type: str + self.method_name = "livePipelineDeactivate" # type: str class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): @@ -1586,23 +1514,17 @@ class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1611,7 +1533,7 @@ def __init__( :paramtype name: str """ super(LivePipelineDeleteRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'livePipelineDelete' # type: str + self.method_name = "livePipelineDelete" # type: str class LivePipelineGetRequest(MethodRequestEmptyBodyBase): @@ -1631,23 +1553,17 @@ class LivePipelineGetRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1656,7 +1572,7 @@ def __init__( :paramtype name: str """ super(LivePipelineGetRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'livePipelineGet' # type: str + self.method_name = "livePipelineGet" # type: str class LivePipelineListRequest(MethodRequest): @@ -1674,27 +1590,22 @@ class LivePipelineListRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } - def __init__( - self, - *, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". :paramtype api_version: str """ super(LivePipelineListRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'livePipelineList' # type: str + self.method_name = "livePipelineList" # type: str class LivePipelineProperties(msrest.serialization.Model): @@ -1717,10 +1628,10 @@ class LivePipelineProperties(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'topology_name': {'key': 'topologyName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterDefinition]'}, - 'state': {'key': 'state', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "topology_name": {"key": "topologyName", "type": "str"}, + "parameters": {"key": "parameters", "type": "[ParameterDefinition]"}, + "state": {"key": "state", "type": "str"}, } def __init__( @@ -1773,23 +1684,17 @@ class LivePipelineSetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'live_pipeline': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "live_pipeline": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'live_pipeline': {'key': 'livePipeline', 'type': 'LivePipeline'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "live_pipeline": {"key": "livePipeline", "type": "LivePipeline"}, } - def __init__( - self, - *, - live_pipeline: "LivePipeline", - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, live_pipeline: "LivePipeline", api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -1799,7 +1704,7 @@ def __init__( :paramtype live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline """ super(LivePipelineSetRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'livePipelineSet' # type: str + self.method_name = "livePipelineSet" # type: str self.live_pipeline = live_pipeline @@ -1824,16 +1729,16 @@ class LivePipelineSetRequestBody(LivePipeline, MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'LivePipelineProperties'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "LivePipelineProperties"}, } def __init__( @@ -1856,10 +1761,12 @@ def __init__( :keyword properties: Live pipeline properties. :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ - super(LivePipelineSetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs) - self.method_name = 'LivePipelineSetRequestBody' # type: str + super(LivePipelineSetRequestBody, self).__init__( + name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs + ) + self.method_name = "LivePipelineSetRequestBody" # type: str self.api_version = api_version - self.method_name = 'LivePipelineSetRequestBody' # type: str + self.method_name = "LivePipelineSetRequestBody" # type: str self.name = name self.system_data = system_data self.properties = properties @@ -1878,9 +1785,9 @@ class MediaProfile(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'media_uri': {'key': 'mediaUri', 'type': 'object'}, - 'video_encoder_configuration': {'key': 'videoEncoderConfiguration', 'type': 'VideoEncoderConfiguration'}, + "name": {"key": "name", "type": "str"}, + "media_uri": {"key": "mediaUri", "type": "object"}, + "video_encoder_configuration": {"key": "videoEncoderConfiguration", "type": "VideoEncoderConfiguration"}, } def __init__( @@ -1915,15 +1822,10 @@ class MediaUri(msrest.serialization.Model): """ _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - *, - uri: Optional[str] = None, - **kwargs - ): + def __init__(self, *, uri: Optional[str] = None, **kwargs): """ :keyword uri: URI that can be used for media streaming. :paramtype uri: str @@ -1957,18 +1859,18 @@ class MotionDetectionProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, - 'output_motion_region': {'key': 'outputMotionRegion', 'type': 'bool'}, - 'event_aggregation_window': {'key': 'eventAggregationWindow', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "sensitivity": {"key": "sensitivity", "type": "str"}, + "output_motion_region": {"key": "outputMotionRegion", "type": "bool"}, + "event_aggregation_window": {"key": "eventAggregationWindow", "type": "str"}, } def __init__( @@ -2000,7 +1902,7 @@ def __init__( :paramtype event_aggregation_window: str """ super(MotionDetectionProcessor, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.MotionDetectionProcessor' # type: str + self.type = "#Microsoft.VideoAnalyzer.MotionDetectionProcessor" # type: str self.sensitivity = sensitivity self.output_motion_region = output_motion_region self.event_aggregation_window = event_aggregation_window @@ -2016,16 +1918,12 @@ class MPEG4Configuration(msrest.serialization.Model): """ _attribute_map = { - 'gov_length': {'key': 'govLength', 'type': 'float'}, - 'profile': {'key': 'profile', 'type': 'str'}, + "gov_length": {"key": "govLength", "type": "float"}, + "profile": {"key": "profile", "type": "str"}, } def __init__( - self, - *, - gov_length: Optional[float] = None, - profile: Optional[Union[str, "MPEG4Profile"]] = None, - **kwargs + self, *, gov_length: Optional[float] = None, profile: Optional[Union[str, "MPEG4Profile"]] = None, **kwargs ): """ :keyword gov_length: Group of Video frames length. @@ -2053,25 +1951,18 @@ class NamedLineBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.NamedLineString': 'NamedLineString'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.NamedLineString": "NamedLineString"}} - def __init__( - self, - *, - name: str, - **kwargs - ): + def __init__(self, *, name: str, **kwargs): """ :keyword name: Required. Line name. Must be unique within the node. :paramtype name: str @@ -2098,24 +1989,18 @@ class NamedLineString(NamedLineBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'line': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "line": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'line': {'key': 'line', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "line": {"key": "line", "type": "str"}, } - def __init__( - self, - *, - name: str, - line: str, - **kwargs - ): + def __init__(self, *, name: str, line: str, **kwargs): """ :keyword name: Required. Line name. Must be unique within the node. :paramtype name: str @@ -2126,7 +2011,7 @@ def __init__( :paramtype line: str """ super(NamedLineString, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.NamedLineString' # type: str + self.type = "#Microsoft.VideoAnalyzer.NamedLineString" # type: str self.line = line @@ -2145,25 +2030,18 @@ class NamedPolygonBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.NamedPolygonString': 'NamedPolygonString'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.NamedPolygonString": "NamedPolygonString"}} - def __init__( - self, - *, - name: str, - **kwargs - ): + def __init__(self, *, name: str, **kwargs): """ :keyword name: Required. Polygon name. Must be unique within the node. :paramtype name: str @@ -2189,24 +2067,18 @@ class NamedPolygonString(NamedPolygonBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'polygon': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "polygon": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'polygon': {'key': 'polygon', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "polygon": {"key": "polygon", "type": "str"}, } - def __init__( - self, - *, - name: str, - polygon: str, - **kwargs - ): + def __init__(self, *, name: str, polygon: str, **kwargs): """ :keyword name: Required. Polygon name. Must be unique within the node. :paramtype name: str @@ -2216,7 +2088,7 @@ def __init__( :paramtype polygon: str """ super(NamedPolygonString, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.NamedPolygonString' # type: str + self.type = "#Microsoft.VideoAnalyzer.NamedPolygonString" # type: str self.polygon = polygon @@ -2234,21 +2106,15 @@ class NodeInput(msrest.serialization.Model): """ _validation = { - 'node_name': {'required': True}, + "node_name": {"required": True}, } _attribute_map = { - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'output_selectors': {'key': 'outputSelectors', 'type': '[OutputSelector]'}, + "node_name": {"key": "nodeName", "type": "str"}, + "output_selectors": {"key": "outputSelectors", "type": "[OutputSelector]"}, } - def __init__( - self, - *, - node_name: str, - output_selectors: Optional[List["OutputSelector"]] = None, - **kwargs - ): + def __init__(self, *, node_name: str, output_selectors: Optional[List["OutputSelector"]] = None, **kwargs): """ :keyword node_name: Required. The name of the upstream node in the pipeline which output is used as input of the current node. @@ -2280,16 +2146,16 @@ class ObjectTrackingProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'accuracy': {'key': 'accuracy', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "accuracy": {"key": "accuracy", "type": "str"}, } def __init__( @@ -2311,7 +2177,7 @@ def __init__( :paramtype accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy """ super(ObjectTrackingProcessor, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.ObjectTrackingProcessor' # type: str + self.type = "#Microsoft.VideoAnalyzer.ObjectTrackingProcessor" # type: str self.accuracy = accuracy @@ -2329,10 +2195,10 @@ class OnvifDevice(msrest.serialization.Model): """ _attribute_map = { - 'hostname': {'key': 'hostname', 'type': 'OnvifHostName'}, - 'system_date_time': {'key': 'systemDateTime', 'type': 'OnvifSystemDateTime'}, - 'dns': {'key': 'dns', 'type': 'OnvifDns'}, - 'media_profiles': {'key': 'mediaProfiles', 'type': '[MediaProfile]'}, + "hostname": {"key": "hostname", "type": "OnvifHostName"}, + "system_date_time": {"key": "systemDateTime", "type": "OnvifSystemDateTime"}, + "dns": {"key": "dns", "type": "OnvifDns"}, + "media_profiles": {"key": "mediaProfiles", "type": "[MediaProfile]"}, } def __init__( @@ -2379,22 +2245,16 @@ class OnvifDeviceDiscoverRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'discovery_duration': {'key': 'discoveryDuration', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "discovery_duration": {"key": "discoveryDuration", "type": "str"}, } - def __init__( - self, - *, - api_version: Optional[str] = "1.1", - discovery_duration: Optional[str] = None, - **kwargs - ): + def __init__(self, *, api_version: Optional[str] = "1.1", discovery_duration: Optional[str] = None, **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2404,7 +2264,7 @@ def __init__( :paramtype discovery_duration: str """ super(OnvifDeviceDiscoverRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'onvifDeviceDiscover' # type: str + self.method_name = "onvifDeviceDiscover" # type: str self.discovery_duration = discovery_duration @@ -2425,23 +2285,17 @@ class OnvifDeviceGetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'endpoint': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "endpoint": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, } - def __init__( - self, - *, - endpoint: "EndpointBase", - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, endpoint: "EndpointBase", api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2450,7 +2304,7 @@ def __init__( :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase """ super(OnvifDeviceGetRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'onvifDeviceGet' # type: str + self.method_name = "onvifDeviceGet" # type: str self.endpoint = endpoint @@ -2466,9 +2320,9 @@ class OnvifDns(msrest.serialization.Model): """ _attribute_map = { - 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, - 'ipv4_address': {'key': 'ipv4Address', 'type': '[str]'}, - 'ipv6_address': {'key': 'ipv6Address', 'type': '[str]'}, + "from_dhcp": {"key": "fromDhcp", "type": "bool"}, + "ipv4_address": {"key": "ipv4Address", "type": "[str]"}, + "ipv6_address": {"key": "ipv6Address", "type": "[str]"}, } def __init__( @@ -2503,17 +2357,11 @@ class OnvifHostName(msrest.serialization.Model): """ _attribute_map = { - 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, + "from_dhcp": {"key": "fromDhcp", "type": "bool"}, + "hostname": {"key": "hostname", "type": "str"}, } - def __init__( - self, - *, - from_dhcp: Optional[bool] = None, - hostname: Optional[str] = None, - **kwargs - ): + def __init__(self, *, from_dhcp: Optional[bool] = None, hostname: Optional[str] = None, **kwargs): """ :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. :paramtype from_dhcp: bool @@ -2538,9 +2386,9 @@ class OnvifSystemDateTime(msrest.serialization.Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "time": {"key": "time", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, } def __init__( @@ -2579,9 +2427,9 @@ class OutputSelector(msrest.serialization.Model): """ _attribute_map = { - 'property': {'key': 'property', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "property": {"key": "property", "type": "str"}, + "operator": {"key": "operator", "type": "str"}, + "value": {"key": "value", "type": "str"}, } def __init__( @@ -2626,15 +2474,15 @@ class ParameterDeclaration(msrest.serialization.Model): """ _validation = { - 'name': {'required': True, 'max_length': 64, 'min_length': 0}, - 'type': {'required': True}, + "name": {"required": True, "max_length": 64, "min_length": 0}, + "type": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "default": {"key": "default", "type": "str"}, } def __init__( @@ -2677,21 +2525,15 @@ class ParameterDefinition(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - *, - name: str, - value: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: str, value: Optional[str] = None, **kwargs): """ :keyword name: Required. Name of the parameter declared in the pipeline topology. :paramtype name: str @@ -2715,27 +2557,22 @@ class PemCertificateList(CertificateSource): """ _validation = { - 'type': {'required': True}, - 'certificates': {'required': True}, + "type": {"required": True}, + "certificates": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'certificates': {'key': 'certificates', 'type': '[str]'}, + "type": {"key": "@type", "type": "str"}, + "certificates": {"key": "certificates", "type": "[str]"}, } - def __init__( - self, - *, - certificates: List[str], - **kwargs - ): + def __init__(self, *, certificates: List[str], **kwargs): """ :keyword certificates: Required. PEM formatted public certificates. One certificate per entry. :paramtype certificates: list[str] """ super(PemCertificateList, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str + self.type = "#Microsoft.VideoAnalyzer.PemCertificateList" # type: str self.certificates = certificates @@ -2743,29 +2580,29 @@ class PipelineTopology(msrest.serialization.Model): """Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across many different cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. - -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar name: Required. Pipeline topology unique identifier. - :vartype name: str - :ivar system_data: Read-only system metadata associated with this object. - :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :ivar properties: Pipeline topology properties. - :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'PipelineTopologyProperties'}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PipelineTopologyProperties"}, } def __init__( @@ -2802,16 +2639,12 @@ class PipelineTopologyCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineTopology]'}, - 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + "value": {"key": "value", "type": "[PipelineTopology]"}, + "continuation_token": {"key": "@continuationToken", "type": "str"}, } def __init__( - self, - *, - value: Optional[List["PipelineTopology"]] = None, - continuation_token: Optional[str] = None, - **kwargs + self, *, value: Optional[List["PipelineTopology"]] = None, continuation_token: Optional[str] = None, **kwargs ): """ :keyword value: List of pipeline topologies. @@ -2843,23 +2676,17 @@ class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2868,7 +2695,7 @@ def __init__( :paramtype name: str """ super(PipelineTopologyDeleteRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'pipelineTopologyDelete' # type: str + self.method_name = "pipelineTopologyDelete" # type: str class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): @@ -2888,23 +2715,17 @@ class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -2913,7 +2734,7 @@ def __init__( :paramtype name: str """ super(PipelineTopologyGetRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'pipelineTopologyGet' # type: str + self.method_name = "pipelineTopologyGet" # type: str class PipelineTopologyListRequest(MethodRequest): @@ -2931,27 +2752,22 @@ class PipelineTopologyListRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } - def __init__( - self, - *, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". :paramtype api_version: str """ super(PipelineTopologyListRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'pipelineTopologyList' # type: str + self.method_name = "pipelineTopologyList" # type: str class PipelineTopologyProperties(msrest.serialization.Model): @@ -2977,11 +2793,11 @@ class PipelineTopologyProperties(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ParameterDeclaration]'}, - 'sources': {'key': 'sources', 'type': '[SourceNodeBase]'}, - 'processors': {'key': 'processors', 'type': '[ProcessorNodeBase]'}, - 'sinks': {'key': 'sinks', 'type': '[SinkNodeBase]'}, + "description": {"key": "description", "type": "str"}, + "parameters": {"key": "parameters", "type": "[ParameterDeclaration]"}, + "sources": {"key": "sources", "type": "[SourceNodeBase]"}, + "processors": {"key": "processors", "type": "[ProcessorNodeBase]"}, + "sinks": {"key": "sinks", "type": "[SinkNodeBase]"}, } def __init__( @@ -3043,8 +2859,8 @@ class PipelineTopologySetRequest(MethodRequest): user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: - - + + * Parameters: list of user defined parameters that can be references across the topology nodes. * Sources: list of one or more data sources nodes such as an RTSP source which allows for @@ -3056,23 +2872,17 @@ class PipelineTopologySetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'pipeline_topology': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "pipeline_topology": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'pipeline_topology': {'key': 'pipelineTopology', 'type': 'PipelineTopology'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "pipeline_topology": {"key": "pipelineTopology", "type": "PipelineTopology"}, } - def __init__( - self, - *, - pipeline_topology: "PipelineTopology", - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, pipeline_topology: "PipelineTopology", api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3087,8 +2897,8 @@ def __init__( user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: - - + + * Parameters: list of user defined parameters that can be references across the topology nodes. * Sources: list of one or more data sources nodes such as an RTSP source which allows for @@ -3099,7 +2909,7 @@ def __init__( :paramtype pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology """ super(PipelineTopologySetRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'pipelineTopologySet' # type: str + self.method_name = "pipelineTopologySet" # type: str self.pipeline_topology = pipeline_topology @@ -3107,39 +2917,39 @@ class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): """Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across many different cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. - -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - Variables are only populated by the server, and will be ignored when sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar method_name: Required. Direct method method name.Constant filled by server. - :vartype method_name: str - :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None - and "1.1". The default value is "1.1". - :vartype api_version: str - :ivar name: Required. Pipeline topology unique identifier. - :vartype name: str - :ivar system_data: Read-only system metadata associated with this object. - :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :ivar properties: Pipeline topology properties. - :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'PipelineTopologyProperties'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PipelineTopologyProperties"}, } def __init__( @@ -3162,10 +2972,12 @@ def __init__( :keyword properties: Pipeline topology properties. :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ - super(PipelineTopologySetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs) - self.method_name = 'PipelineTopologySetRequestBody' # type: str + super(PipelineTopologySetRequestBody, self).__init__( + name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs + ) + self.method_name = "PipelineTopologySetRequestBody" # type: str self.api_version = api_version - self.method_name = 'PipelineTopologySetRequestBody' # type: str + self.method_name = "PipelineTopologySetRequestBody" # type: str self.name = name self.system_data = system_data self.properties = properties @@ -3187,10 +2999,10 @@ class RateControl(msrest.serialization.Model): """ _attribute_map = { - 'bit_rate_limit': {'key': 'bitRateLimit', 'type': 'float'}, - 'encoding_interval': {'key': 'encodingInterval', 'type': 'float'}, - 'frame_rate_limit': {'key': 'frameRateLimit', 'type': 'float'}, - 'guaranteed_frame_rate': {'key': 'guaranteedFrameRate', 'type': 'bool'}, + "bit_rate_limit": {"key": "bitRateLimit", "type": "float"}, + "encoding_interval": {"key": "encodingInterval", "type": "float"}, + "frame_rate_limit": {"key": "frameRateLimit", "type": "float"}, + "guaranteed_frame_rate": {"key": "guaranteedFrameRate", "type": "bool"}, } def __init__( @@ -3235,13 +3047,13 @@ class RemoteDeviceAdapter(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "RemoteDeviceAdapterProperties"}, } def __init__( @@ -3278,16 +3090,12 @@ class RemoteDeviceAdapterCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[RemoteDeviceAdapter]'}, - 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + "value": {"key": "value", "type": "[RemoteDeviceAdapter]"}, + "continuation_token": {"key": "@continuationToken", "type": "str"}, } def __init__( - self, - *, - value: Optional[List["RemoteDeviceAdapter"]] = None, - continuation_token: Optional[str] = None, - **kwargs + self, *, value: Optional[List["RemoteDeviceAdapter"]] = None, continuation_token: Optional[str] = None, **kwargs ): """ :keyword value: An array of remote device adapters. @@ -3319,23 +3127,17 @@ class RemoteDeviceAdapterDeleteRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3344,7 +3146,7 @@ def __init__( :paramtype name: str """ super(RemoteDeviceAdapterDeleteRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'remoteDeviceAdapterDelete' # type: str + self.method_name = "remoteDeviceAdapterDelete" # type: str class RemoteDeviceAdapterGetRequest(MethodRequestEmptyBodyBase): @@ -3364,23 +3166,17 @@ class RemoteDeviceAdapterGetRequest(MethodRequestEmptyBodyBase): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: str, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, name: str, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3389,7 +3185,7 @@ def __init__( :paramtype name: str """ super(RemoteDeviceAdapterGetRequest, self).__init__(api_version=api_version, name=name, **kwargs) - self.method_name = 'remoteDeviceAdapterGet' # type: str + self.method_name = "remoteDeviceAdapterGet" # type: str class RemoteDeviceAdapterListRequest(MethodRequest): @@ -3407,27 +3203,22 @@ class RemoteDeviceAdapterListRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, + "method_name": {"required": True, "readonly": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, } - def __init__( - self, - *, - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". :paramtype api_version: str """ super(RemoteDeviceAdapterListRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'remoteDeviceAdapterList' # type: str + self.method_name = "remoteDeviceAdapterList" # type: str class RemoteDeviceAdapterProperties(msrest.serialization.Model): @@ -3447,14 +3238,14 @@ class RemoteDeviceAdapterProperties(msrest.serialization.Model): """ _validation = { - 'target': {'required': True}, - 'iot_hub_device_connection': {'required': True}, + "target": {"required": True}, + "iot_hub_device_connection": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'RemoteDeviceAdapterTarget'}, - 'iot_hub_device_connection': {'key': 'iotHubDeviceConnection', 'type': 'IotHubDeviceConnection'}, + "description": {"key": "description", "type": "str"}, + "target": {"key": "target", "type": "RemoteDeviceAdapterTarget"}, + "iot_hub_device_connection": {"key": "iotHubDeviceConnection", "type": "IotHubDeviceConnection"}, } def __init__( @@ -3502,23 +3293,17 @@ class RemoteDeviceAdapterSetRequest(MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'remote_device_adapter': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "remote_device_adapter": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'remote_device_adapter': {'key': 'remoteDeviceAdapter', 'type': 'RemoteDeviceAdapter'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "remote_device_adapter": {"key": "remoteDeviceAdapter", "type": "RemoteDeviceAdapter"}, } - def __init__( - self, - *, - remote_device_adapter: "RemoteDeviceAdapter", - api_version: Optional[str] = "1.1", - **kwargs - ): + def __init__(self, *, remote_device_adapter: "RemoteDeviceAdapter", api_version: Optional[str] = "1.1", **kwargs): """ :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are None and "1.1". The default value is "1.1". @@ -3530,7 +3315,7 @@ def __init__( :paramtype remote_device_adapter: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter """ super(RemoteDeviceAdapterSetRequest, self).__init__(api_version=api_version, **kwargs) - self.method_name = 'remoteDeviceAdapterSet' # type: str + self.method_name = "remoteDeviceAdapterSet" # type: str self.remote_device_adapter = remote_device_adapter @@ -3555,16 +3340,16 @@ class RemoteDeviceAdapterSetRequestBody(RemoteDeviceAdapter, MethodRequest): """ _validation = { - 'method_name': {'required': True, 'readonly': True}, - 'name': {'required': True}, + "method_name": {"required": True, "readonly": True}, + "name": {"required": True}, } _attribute_map = { - 'method_name': {'key': 'methodName', 'type': 'str'}, - 'api_version': {'key': '@apiVersion', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + "method_name": {"key": "methodName", "type": "str"}, + "api_version": {"key": "@apiVersion", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "RemoteDeviceAdapterProperties"}, } def __init__( @@ -3587,10 +3372,12 @@ def __init__( :keyword properties: Properties of the remote device adapter. :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties """ - super(RemoteDeviceAdapterSetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs) - self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str + super(RemoteDeviceAdapterSetRequestBody, self).__init__( + name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs + ) + self.method_name = "RemoteDeviceAdapterSetRequestBody" # type: str self.api_version = api_version - self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str + self.method_name = "RemoteDeviceAdapterSetRequestBody" # type: str self.name = name self.system_data = system_data self.properties = properties @@ -3606,19 +3393,14 @@ class RemoteDeviceAdapterTarget(msrest.serialization.Model): """ _validation = { - 'host': {'required': True}, + "host": {"required": True}, } _attribute_map = { - 'host': {'key': 'host', 'type': 'str'}, + "host": {"key": "host", "type": "str"}, } - def __init__( - self, - *, - host: str, - **kwargs - ): + def __init__(self, *, host: str, **kwargs): """ :keyword host: Required. Hostname or IP address of the remote device. :paramtype host: str @@ -3649,25 +3431,20 @@ class RtspSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'endpoint': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "endpoint": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'transport': {'key': 'transport', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "transport": {"key": "transport", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, } def __init__( - self, - *, - name: str, - endpoint: "EndpointBase", - transport: Optional[Union[str, "RtspTransport"]] = None, - **kwargs + self, *, name: str, endpoint: "EndpointBase", transport: Optional[Union[str, "RtspTransport"]] = None, **kwargs ): """ :keyword name: Required. Node name. Must be unique within the topology. @@ -3684,7 +3461,7 @@ def __init__( :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase """ super(RtspSource, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str + self.type = "#Microsoft.VideoAnalyzer.RtspSource" # type: str self.transport = transport self.endpoint = endpoint @@ -3704,8 +3481,8 @@ class SamplingOptions(msrest.serialization.Model): """ _attribute_map = { - 'skip_samples_without_annotation': {'key': 'skipSamplesWithoutAnnotation', 'type': 'str'}, - 'maximum_samples_per_second': {'key': 'maximumSamplesPerSecond', 'type': 'str'}, + "skip_samples_without_annotation": {"key": "skipSamplesWithoutAnnotation", "type": "str"}, + "maximum_samples_per_second": {"key": "maximumSamplesPerSecond", "type": "str"}, } def __init__( @@ -3764,19 +3541,19 @@ class SignalGateProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'activation_evaluation_window': {'key': 'activationEvaluationWindow', 'type': 'str'}, - 'activation_signal_offset': {'key': 'activationSignalOffset', 'type': 'str'}, - 'minimum_activation_time': {'key': 'minimumActivationTime', 'type': 'str'}, - 'maximum_activation_time': {'key': 'maximumActivationTime', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "activation_evaluation_window": {"key": "activationEvaluationWindow", "type": "str"}, + "activation_signal_offset": {"key": "activationSignalOffset", "type": "str"}, + "minimum_activation_time": {"key": "minimumActivationTime", "type": "str"}, + "maximum_activation_time": {"key": "maximumActivationTime", "type": "str"}, } def __init__( @@ -3816,7 +3593,7 @@ def __init__( :paramtype maximum_activation_time: str """ super(SignalGateProcessor, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SignalGateProcessor' # type: str + self.type = "#Microsoft.VideoAnalyzer.SignalGateProcessor" # type: str self.activation_evaluation_window = activation_evaluation_window self.activation_signal_offset = activation_signal_offset self.minimum_activation_time = minimum_activation_time @@ -3836,23 +3613,22 @@ class SpatialAnalysisOperationBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation': 'SpatialAnalysisCustomOperation', 'SpatialAnalysisTypedOperationBase': 'SpatialAnalysisTypedOperationBase'} + "type": { + "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation": "SpatialAnalysisCustomOperation", + "SpatialAnalysisTypedOperationBase": "SpatialAnalysisTypedOperationBase", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(SpatialAnalysisOperationBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -3870,28 +3646,23 @@ class SpatialAnalysisCustomOperation(SpatialAnalysisOperationBase): """ _validation = { - 'type': {'required': True}, - 'extension_configuration': {'required': True}, + "type": {"required": True}, + "extension_configuration": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'extension_configuration': {'key': 'extensionConfiguration', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "extension_configuration": {"key": "extensionConfiguration", "type": "str"}, } - def __init__( - self, - *, - extension_configuration: str, - **kwargs - ): + def __init__(self, *, extension_configuration: str, **kwargs): """ :keyword extension_configuration: Required. Custom configuration to pass to the Azure Cognitive Services Spatial Analysis module. :paramtype extension_configuration: str """ super(SpatialAnalysisCustomOperation, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation' # type: str + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation" # type: str self.extension_configuration = extension_configuration @@ -3906,8 +3677,8 @@ class SpatialAnalysisOperationEventBase(msrest.serialization.Model): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, } def __init__( @@ -3945,10 +3716,10 @@ class SpatialAnalysisPersonCountEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'str'}, - 'output_frequency': {'key': 'outputFrequency', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, + "trigger": {"key": "trigger", "type": "str"}, + "output_frequency": {"key": "outputFrequency", "type": "str"}, } def __init__( @@ -4005,22 +3776,27 @@ class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation': 'SpatialAnalysisPersonCountOperation', '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation': 'SpatialAnalysisPersonDistanceOperation', '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation': 'SpatialAnalysisPersonLineCrossingOperation', '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation': 'SpatialAnalysisPersonZoneCrossingOperation'} + "type": { + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation": "SpatialAnalysisPersonCountOperation", + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation": "SpatialAnalysisPersonDistanceOperation", + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation": "SpatialAnalysisPersonLineCrossingOperation", + "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation": "SpatialAnalysisPersonZoneCrossingOperation", + } } def __init__( @@ -4053,7 +3829,7 @@ def __init__( :paramtype enable_face_mask_classifier: str """ super(SpatialAnalysisTypedOperationBase, self).__init__(**kwargs) - self.type = 'SpatialAnalysisTypedOperationBase' # type: str + self.type = "SpatialAnalysisTypedOperationBase" # type: str self.debug = debug self.calibration_configuration = calibration_configuration self.camera_configuration = camera_configuration @@ -4091,20 +3867,20 @@ class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): """ _validation = { - 'type': {'required': True}, - 'zones': {'required': True}, + "type": {"required": True}, + "zones": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonCountZoneEvents]'}, + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "zones": {"key": "zones", "type": "[SpatialAnalysisPersonCountZoneEvents]"}, } def __init__( @@ -4140,8 +3916,17 @@ def __init__( :paramtype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] """ - super(SpatialAnalysisPersonCountOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation' # type: str + super(SpatialAnalysisPersonCountOperation, self).__init__( + debug=debug, + calibration_configuration=calibration_configuration, + camera_configuration=camera_configuration, + camera_calibrator_node_configuration=camera_calibrator_node_configuration, + detector_node_configuration=detector_node_configuration, + tracker_node_configuration=tracker_node_configuration, + enable_face_mask_classifier=enable_face_mask_classifier, + **kwargs + ) + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation" # type: str self.zones = zones @@ -4157,20 +3942,16 @@ class SpatialAnalysisPersonCountZoneEvents(msrest.serialization.Model): """ _validation = { - 'zone': {'required': True}, + "zone": {"required": True}, } _attribute_map = { - 'zone': {'key': 'zone', 'type': 'NamedPolygonBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonCountEvent]'}, + "zone": {"key": "zone", "type": "NamedPolygonBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonCountEvent]"}, } def __init__( - self, - *, - zone: "NamedPolygonBase", - events: Optional[List["SpatialAnalysisPersonCountEvent"]] = None, - **kwargs + self, *, zone: "NamedPolygonBase", events: Optional[List["SpatialAnalysisPersonCountEvent"]] = None, **kwargs ): """ :keyword zone: Required. The named zone. @@ -4203,12 +3984,12 @@ class SpatialAnalysisPersonDistanceEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'str'}, - 'output_frequency': {'key': 'outputFrequency', 'type': 'str'}, - 'minimum_distance_threshold': {'key': 'minimumDistanceThreshold', 'type': 'str'}, - 'maximum_distance_threshold': {'key': 'maximumDistanceThreshold', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, + "trigger": {"key": "trigger", "type": "str"}, + "output_frequency": {"key": "outputFrequency", "type": "str"}, + "minimum_distance_threshold": {"key": "minimumDistanceThreshold", "type": "str"}, + "maximum_distance_threshold": {"key": "maximumDistanceThreshold", "type": "str"}, } def __init__( @@ -4273,20 +4054,20 @@ class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): """ _validation = { - 'type': {'required': True}, - 'zones': {'required': True}, + "type": {"required": True}, + "zones": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonDistanceZoneEvents]'}, + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "zones": {"key": "zones", "type": "[SpatialAnalysisPersonDistanceZoneEvents]"}, } def __init__( @@ -4322,8 +4103,17 @@ def __init__( :paramtype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceZoneEvents] """ - super(SpatialAnalysisPersonDistanceOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation' # type: str + super(SpatialAnalysisPersonDistanceOperation, self).__init__( + debug=debug, + calibration_configuration=calibration_configuration, + camera_configuration=camera_configuration, + camera_calibrator_node_configuration=camera_calibrator_node_configuration, + detector_node_configuration=detector_node_configuration, + tracker_node_configuration=tracker_node_configuration, + enable_face_mask_classifier=enable_face_mask_classifier, + **kwargs + ) + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation" # type: str self.zones = zones @@ -4340,20 +4130,16 @@ class SpatialAnalysisPersonDistanceZoneEvents(msrest.serialization.Model): """ _validation = { - 'zone': {'required': True}, + "zone": {"required": True}, } _attribute_map = { - 'zone': {'key': 'zone', 'type': 'NamedPolygonBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonDistanceEvent]'}, + "zone": {"key": "zone", "type": "NamedPolygonBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonDistanceEvent]"}, } def __init__( - self, - *, - zone: "NamedPolygonBase", - events: Optional[List["SpatialAnalysisPersonDistanceEvent"]] = None, - **kwargs + self, *, zone: "NamedPolygonBase", events: Optional[List["SpatialAnalysisPersonDistanceEvent"]] = None, **kwargs ): """ :keyword zone: Required. The named zone. @@ -4378,8 +4164,8 @@ class SpatialAnalysisPersonLineCrossingEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, } def __init__( @@ -4412,12 +4198,12 @@ class SpatialAnalysisPersonLineCrossingLineEvents(msrest.serialization.Model): """ _validation = { - 'line': {'required': True}, + "line": {"required": True}, } _attribute_map = { - 'line': {'key': 'line', 'type': 'NamedLineBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonLineCrossingEvent]'}, + "line": {"key": "line", "type": "NamedLineBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonLineCrossingEvent]"}, } def __init__( @@ -4467,20 +4253,20 @@ class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBa """ _validation = { - 'type': {'required': True}, - 'lines': {'required': True}, + "type": {"required": True}, + "lines": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'lines': {'key': 'lines', 'type': '[SpatialAnalysisPersonLineCrossingLineEvents]'}, + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "lines": {"key": "lines", "type": "[SpatialAnalysisPersonLineCrossingLineEvents]"}, } def __init__( @@ -4516,8 +4302,17 @@ def __init__( :paramtype lines: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingLineEvents] """ - super(SpatialAnalysisPersonLineCrossingOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation' # type: str + super(SpatialAnalysisPersonLineCrossingOperation, self).__init__( + debug=debug, + calibration_configuration=calibration_configuration, + camera_configuration=camera_configuration, + camera_calibrator_node_configuration=camera_calibrator_node_configuration, + detector_node_configuration=detector_node_configuration, + tracker_node_configuration=tracker_node_configuration, + enable_face_mask_classifier=enable_face_mask_classifier, + **kwargs + ) + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation" # type: str self.lines = lines @@ -4535,9 +4330,9 @@ class SpatialAnalysisPersonZoneCrossingEvent(SpatialAnalysisOperationEventBase): """ _attribute_map = { - 'threshold': {'key': 'threshold', 'type': 'str'}, - 'focus': {'key': 'focus', 'type': 'str'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, + "threshold": {"key": "threshold", "type": "str"}, + "focus": {"key": "focus", "type": "str"}, + "event_type": {"key": "eventType", "type": "str"}, } def __init__( @@ -4590,20 +4385,20 @@ class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBa """ _validation = { - 'type': {'required': True}, - 'zones': {'required': True}, + "type": {"required": True}, + "zones": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'debug': {'key': 'debug', 'type': 'str'}, - 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, - 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, - 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, - 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, - 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, - 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonZoneCrossingZoneEvents]'}, + "type": {"key": "@type", "type": "str"}, + "debug": {"key": "debug", "type": "str"}, + "calibration_configuration": {"key": "calibrationConfiguration", "type": "str"}, + "camera_configuration": {"key": "cameraConfiguration", "type": "str"}, + "camera_calibrator_node_configuration": {"key": "cameraCalibratorNodeConfiguration", "type": "str"}, + "detector_node_configuration": {"key": "detectorNodeConfiguration", "type": "str"}, + "tracker_node_configuration": {"key": "trackerNodeConfiguration", "type": "str"}, + "enable_face_mask_classifier": {"key": "enableFaceMaskClassifier", "type": "str"}, + "zones": {"key": "zones", "type": "[SpatialAnalysisPersonZoneCrossingZoneEvents]"}, } def __init__( @@ -4639,8 +4434,17 @@ def __init__( :paramtype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingZoneEvents] """ - super(SpatialAnalysisPersonZoneCrossingOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation' # type: str + super(SpatialAnalysisPersonZoneCrossingOperation, self).__init__( + debug=debug, + calibration_configuration=calibration_configuration, + camera_configuration=camera_configuration, + camera_calibrator_node_configuration=camera_calibrator_node_configuration, + detector_node_configuration=detector_node_configuration, + tracker_node_configuration=tracker_node_configuration, + enable_face_mask_classifier=enable_face_mask_classifier, + **kwargs + ) + self.type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation" # type: str self.zones = zones @@ -4657,12 +4461,12 @@ class SpatialAnalysisPersonZoneCrossingZoneEvents(msrest.serialization.Model): """ _validation = { - 'zone': {'required': True}, + "zone": {"required": True}, } _attribute_map = { - 'zone': {'key': 'zone', 'type': 'NamedPolygonBase'}, - 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonZoneCrossingEvent]'}, + "zone": {"key": "zone", "type": "NamedPolygonBase"}, + "events": {"key": "events", "type": "[SpatialAnalysisPersonZoneCrossingEvent]"}, } def __init__( @@ -4696,27 +4500,22 @@ class SymmetricKeyCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'key': {'required': True}, + "type": {"required": True}, + "key": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "key": {"key": "key", "type": "str"}, } - def __init__( - self, - *, - key: str, - **kwargs - ): + def __init__(self, *, key: str, **kwargs): """ :keyword key: Required. Symmetric key credential. :paramtype key: str """ super(SymmetricKeyCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials' # type: str + self.type = "#Microsoft.VideoAnalyzer.SymmetricKeyCredentials" # type: str self.key = key @@ -4732,8 +4531,8 @@ class SystemData(msrest.serialization.Model): """ _attribute_map = { - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } def __init__( @@ -4777,16 +4576,16 @@ class TlsEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'CertificateSource'}, - 'validation_options': {'key': 'validationOptions', 'type': 'TlsValidationOptions'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "trusted_certificates": {"key": "trustedCertificates", "type": "CertificateSource"}, + "validation_options": {"key": "validationOptions", "type": "TlsValidationOptions"}, } def __init__( @@ -4812,7 +4611,7 @@ def __init__( :paramtype validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions """ super(TlsEndpoint, self).__init__(credentials=credentials, url=url, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str + self.type = "#Microsoft.VideoAnalyzer.TlsEndpoint" # type: str self.trusted_certificates = trusted_certificates self.validation_options = validation_options @@ -4829,17 +4628,11 @@ class TlsValidationOptions(msrest.serialization.Model): """ _attribute_map = { - 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, - 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + "ignore_hostname": {"key": "ignoreHostname", "type": "str"}, + "ignore_signature": {"key": "ignoreSignature", "type": "str"}, } - def __init__( - self, - *, - ignore_hostname: Optional[str] = None, - ignore_signature: Optional[str] = None, - **kwargs - ): + def __init__(self, *, ignore_hostname: Optional[str] = None, ignore_signature: Optional[str] = None, **kwargs): """ :keyword ignore_hostname: When set to 'true' causes the certificate subject name validation to be skipped. Default is 'false'. @@ -4867,23 +4660,17 @@ class UnsecuredEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, } - def __init__( - self, - *, - url: str, - credentials: Optional["CredentialsBase"] = None, - **kwargs - ): + def __init__(self, *, url: str, credentials: Optional["CredentialsBase"] = None, **kwargs): """ :keyword credentials: Credentials to be presented to the endpoint. :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase @@ -4891,7 +4678,7 @@ def __init__( :paramtype url: str """ super(UnsecuredEndpoint, self).__init__(credentials=credentials, url=url, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str + self.type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint" # type: str class UsernamePasswordCredentials(CredentialsBase): @@ -4910,24 +4697,18 @@ class UsernamePasswordCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'username': {'required': True}, - 'password': {'required': True}, + "type": {"required": True}, + "username": {"required": True}, + "password": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password": {"key": "password", "type": "str"}, } - def __init__( - self, - *, - username: str, - password: str, - **kwargs - ): + def __init__(self, *, username: str, password: str, **kwargs): """ :keyword username: Required. Username to be presented as part of the credentials. :paramtype username: str @@ -4937,7 +4718,7 @@ def __init__( :paramtype password: str """ super(UsernamePasswordCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str + self.type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials" # type: str self.username = username self.password = password @@ -4965,10 +4746,10 @@ class VideoCreationProperties(msrest.serialization.Model): """ _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, - 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + "title": {"key": "title", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "segment_length": {"key": "segmentLength", "type": "str"}, + "retention_period": {"key": "retentionPeriod", "type": "str"}, } def __init__( @@ -5026,12 +4807,12 @@ class VideoEncoderConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'encoding': {'key': 'encoding', 'type': 'str'}, - 'quality': {'key': 'quality', 'type': 'float'}, - 'resolution': {'key': 'resolution', 'type': 'VideoResolution'}, - 'rate_control': {'key': 'rateControl', 'type': 'RateControl'}, - 'h264': {'key': 'h264', 'type': 'H264Configuration'}, - 'mpeg4': {'key': 'mpeg4', 'type': 'MPEG4Configuration'}, + "encoding": {"key": "encoding", "type": "str"}, + "quality": {"key": "quality", "type": "float"}, + "resolution": {"key": "resolution", "type": "VideoResolution"}, + "rate_control": {"key": "rateControl", "type": "RateControl"}, + "h264": {"key": "h264", "type": "H264Configuration"}, + "mpeg4": {"key": "mpeg4", "type": "MPEG4Configuration"}, } def __init__( @@ -5078,15 +4859,10 @@ class VideoPublishingOptions(msrest.serialization.Model): """ _attribute_map = { - 'enable_video_preview_image': {'key': 'enableVideoPreviewImage', 'type': 'str'}, + "enable_video_preview_image": {"key": "enableVideoPreviewImage", "type": "str"}, } - def __init__( - self, - *, - enable_video_preview_image: Optional[str] = None, - **kwargs - ): + def __init__(self, *, enable_video_preview_image: Optional[str] = None, **kwargs): """ :keyword enable_video_preview_image: When set to 'true' the video will publish preview images. Default is 'false'. @@ -5106,17 +4882,11 @@ class VideoResolution(msrest.serialization.Model): """ _attribute_map = { - 'width': {'key': 'width', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, + "width": {"key": "width", "type": "float"}, + "height": {"key": "height", "type": "float"}, } - def __init__( - self, - *, - width: Optional[float] = None, - height: Optional[float] = None, - **kwargs - ): + def __init__(self, *, width: Optional[float] = None, height: Optional[float] = None, **kwargs): """ :keyword width: The number of columns of the Video image. :paramtype width: float @@ -5163,23 +4933,23 @@ class VideoSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'video_name': {'required': True}, - 'local_media_cache_path': {'required': True}, - 'local_media_cache_maximum_size_mi_b': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "video_name": {"required": True}, + "local_media_cache_path": {"required": True}, + "local_media_cache_maximum_size_mi_b": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'video_name': {'key': 'videoName', 'type': 'str'}, - 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, - 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, - 'local_media_cache_path': {'key': 'localMediaCachePath', 'type': 'str'}, - 'local_media_cache_maximum_size_mi_b': {'key': 'localMediaCacheMaximumSizeMiB', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "video_name": {"key": "videoName", "type": "str"}, + "video_creation_properties": {"key": "videoCreationProperties", "type": "VideoCreationProperties"}, + "video_publishing_options": {"key": "videoPublishingOptions", "type": "VideoPublishingOptions"}, + "local_media_cache_path": {"key": "localMediaCachePath", "type": "str"}, + "local_media_cache_maximum_size_mi_b": {"key": "localMediaCacheMaximumSizeMiB", "type": "str"}, } def __init__( @@ -5222,7 +4992,7 @@ def __init__( :paramtype local_media_cache_maximum_size_mi_b: str """ super(VideoSink, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str + self.type = "#Microsoft.VideoAnalyzer.VideoSink" # type: str self.video_name = video_name self.video_creation_properties = video_creation_properties self.video_publishing_options = video_publishing_options diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py index 71a5b419674b..4fc2f1971275 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py @@ -1,14 +1,13 @@ - import json -import os +import os from azure.media.videoanalyzeredge import * -from azure.iot.hub import IoTHubRegistryManager #run pip install azure-iot-hub to get this package +from azure.iot.hub import IoTHubRegistryManager # run pip install azure-iot-hub to get this package from azure.iot.hub.models import CloudToDeviceMethod, CloudToDeviceMethodResult from datetime import time -device_id = os.getenv("iothub_deviceid"); -module_d = os.getenv("iothub_moduleid"); -connection_string = os.getenv("iothub_connectionstring"); +device_id = os.getenv("iothub_deviceid") +module_d = os.getenv("iothub_moduleid") +connection_string = os.getenv("iothub_connectionstring") live_pipeline_name = "pipelineInstance1" pipeline_topology_name = "pipelineTopology1" url = "rtsp://camerasimulator:8554" @@ -17,17 +16,29 @@ def build_pipeline_topology(): pipeline_topology_properties = PipelineTopologyProperties() pipeline_topology_properties.description = "Continuous video recording to an Azure Media Services Asset" - user_name_param = ParameterDeclaration(name="rtspUserName",type="String",default="testusername") - password_param = ParameterDeclaration(name="rtspPassword",type="SecretString",default="testpassword") - url_param = ParameterDeclaration(name="rtspUrl",type="String",default="rtsp://www.sample.com") - - source = RtspSource(name="rtspSource", endpoint=UnsecuredEndpoint(url="${rtspUrl}",credentials=UsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}"))) + user_name_param = ParameterDeclaration(name="rtspUserName", type="String", default="testusername") + password_param = ParameterDeclaration(name="rtspPassword", type="SecretString", default="testpassword") + url_param = ParameterDeclaration(name="rtspUrl", type="String", default="rtsp://www.sample.com") + + source = RtspSource( + name="rtspSource", + endpoint=UnsecuredEndpoint( + url="${rtspUrl}", + credentials=UsernamePasswordCredentials(username="${rtspUserName}", password="${rtspPassword}"), + ), + ) node = NodeInput(node_name="rtspSource") - sink = VideoSink(name="videoSink", inputs=[node], video_name="video", local_media_cache_path="/var/lib/videoanalyzer/tmp/", local_media_cache_maximum_size_mi_b="1024"); + sink = VideoSink( + name="videoSink", + inputs=[node], + video_name="video", + local_media_cache_path="/var/lib/videoanalyzer/tmp/", + local_media_cache_maximum_size_mi_b="1024", + ) pipeline_topology_properties.parameters = [user_name_param, password_param, url_param] pipeline_topology_properties.sources = [source] pipeline_topology_properties.sinks = [sink] - pipeline_topology = PipelineTopology(name=pipeline_topology_name,properties=pipeline_topology_properties) + pipeline_topology = PipelineTopology(name=pipeline_topology_name, properties=pipeline_topology_properties) return pipeline_topology @@ -35,7 +46,9 @@ def build_pipeline_topology(): def build_live_pipeline(): url_param = ParameterDefinition(name="rtspUrl", value=url) pass_param = ParameterDefinition(name="rtspPassword", value="secret_password") - live_pipeline_properties = LivePipelineProperties(description="Sample description", topology_name=pipeline_topology_name, parameters=[url_param]) + live_pipeline_properties = LivePipelineProperties( + description="Sample description", topology_name=pipeline_topology_name, parameters=[url_param] + ) live_pipeline = LivePipeline(name=live_pipeline_name, properties=live_pipeline_properties) @@ -46,9 +59,11 @@ def invoke_method_helper(method): direct_method = CloudToDeviceMethod(method_name=method.method_name, payload=method.serialize()) registry_manager = IoTHubRegistryManager(connection_string=connection_string) - payload = registry_manager.invoke_device_module_method(device_id=device_id, module_id=module_d, direct_method_request=direct_method).payload - if payload is not None and 'error' in payload: - print(payload['error']) + payload = registry_manager.invoke_device_module_method( + device_id=device_id, module_id=module_d, direct_method_request=direct_method + ).payload + if payload is not None and "error" in payload: + print(payload["error"]) return None return payload @@ -59,9 +74,16 @@ def create_remote_device_adapter(device_name, iot_device_name): try: iot_device = registry_manager.get_device(device_id=iot_device_name) except Exception as ex: - iot_device = registry_manager.create_device_with_certificate_authority(device_id=iot_device_name, status="enabled") - - remote_device_properties = RemoteDeviceAdapterProperties(target=RemoteDeviceAdapterTarget(host="camerasimulator"), iot_hub_device_connection=IotHubDeviceConnection(device_id=iot_device_name,credentials=SymmetricKeyCredentials(key=iot_device.authentication.symmetric_key))) + iot_device = registry_manager.create_device_with_certificate_authority( + device_id=iot_device_name, status="enabled" + ) + + remote_device_properties = RemoteDeviceAdapterProperties( + target=RemoteDeviceAdapterTarget(host="camerasimulator"), + iot_hub_device_connection=IotHubDeviceConnection( + device_id=iot_device_name, credentials=SymmetricKeyCredentials(key=iot_device.authentication.symmetric_key) + ), + ) return RemoteDeviceAdapter(name=device_name, properties=remote_device_properties) @@ -95,33 +117,40 @@ def sendPipelineRequests(pipeline_topology, live_pipeline): def sendDeviceRequests(remote_device_adapter): remote_device_adapter_set_response = invoke_method_helper( - RemoteDeviceAdapterSetRequest(remote_device_adapter=remote_device_adapter)) + RemoteDeviceAdapterSetRequest(remote_device_adapter=remote_device_adapter) + ) if remote_device_adapter_set_response: remote_device_adapter_set_result = RemoteDeviceAdapter.deserialize(remote_device_adapter_set_response) remote_device_adapter_get_response = invoke_method_helper( - RemoteDeviceAdapterGetRequest(name=remote_device_adapter.name)) + RemoteDeviceAdapterGetRequest(name=remote_device_adapter.name) + ) if remote_device_adapter_get_response: remote_device_adapter_get_result = RemoteDeviceAdapter.deserialize(remote_device_adapter_get_response) remote_device_adapter_list_response = invoke_method_helper(RemoteDeviceAdapterListRequest()) if remote_device_adapter_list_response: remote_device_adapter_list_result = RemoteDeviceAdapterCollection.deserialize( - remote_device_adapter_list_response) + remote_device_adapter_list_response + ) remote_device_adapter_delete_response = invoke_method_helper( - RemoteDeviceAdapterDeleteRequest(name=remote_device_adapter.name)) + RemoteDeviceAdapterDeleteRequest(name=remote_device_adapter.name) + ) onvif_list_response = invoke_method_helper(OnvifDeviceDiscoverRequest()) onvif_get_response = invoke_method_helper( - OnvifDeviceGetRequest(endpoint=UnsecuredEndpoint(url="rtsp://camerasimulator:8554"))) + OnvifDeviceGetRequest(endpoint=UnsecuredEndpoint(url="rtsp://camerasimulator:8554")) + ) def main(): pipeline_topology = build_pipeline_topology() live_pipeline = build_live_pipeline() - remote_device_adapter = create_remote_device_adapter(device_name="RemoteDeviceAdapter1", iot_device_name="iotdevicesample1") + remote_device_adapter = create_remote_device_adapter( + device_name="RemoteDeviceAdapter1", iot_device_name="iotdevicesample1" + ) try: sendPipelineRequests(pipeline_topology=pipeline_topology, live_pipeline=live_pipeline) sendDeviceRequests(remote_device_adapter=remote_device_adapter) @@ -130,4 +159,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/setup.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/setup.py index a3811349a16b..6911dc0bbc6f 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/setup.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/setup.py @@ -18,43 +18,42 @@ PACKAGE_PPRINT_NAME = "Azure Video Analyzer Edge SDK" # a-b-c => a/b/c -package_folder_path = NAMESPACE_NAME.replace('.', '/') +package_folder_path = NAMESPACE_NAME.replace(".", "/") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='{} Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/videoanalyzer/azure-media-videoanalyzer-edge', + description="{} Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/videoanalyzer/azure-media-videoanalyzer-edge", keywords="azure, azure sdk", classifiers=[ "Development Status :: 4 - Beta", - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "License :: OSI Approved :: MIT License", ], zip_safe=False, packages=find_packages( @@ -63,12 +62,12 @@ "tests", # Exclude packages that will be covered by PEP420 or nspkg "azure", - "azure.media" + "azure.media", ] ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, python_requires=">=3.6", install_requires=[ diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/tests/test_build_graph_serialize.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/tests/test_build_graph_serialize.py index c69adb598763..48f40eb18d07 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/tests/test_build_graph_serialize.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/tests/test_build_graph_serialize.py @@ -1,24 +1,29 @@ import pytest from azure.media.videoanalyzeredge import * -class TestPipelineBuildSerialize(): + +class TestPipelineBuildSerialize: def test_build_pipeline_serialize(self): pipeline_topology_properties = PipelineTopologyProperties() - pipeline_topology_name = 'pipelineTopologyTest' + pipeline_topology_name = "pipelineTopologyTest" pipeline_topology_properties.description = "Continuous video recording to an Azure Media Services Asset" - user_name_param = ParameterDeclaration(name="rtspUserName",type="String",default="testusername") - password_param = ParameterDeclaration(name="rtspPassword",type="SecretString",default="testpassword") - url_param = ParameterDeclaration(name="rtspUrl",type="String",default="rtsp://www.sample.com") - hub_param = ParameterDeclaration(name="hubSinkOutputName",type="String") + user_name_param = ParameterDeclaration(name="rtspUserName", type="String", default="testusername") + password_param = ParameterDeclaration(name="rtspPassword", type="SecretString", default="testpassword") + url_param = ParameterDeclaration(name="rtspUrl", type="String", default="rtsp://www.sample.com") + hub_param = ParameterDeclaration(name="hubSinkOutputName", type="String") - source = RtspSource(name="rtspSource", endpoint=UnsecuredEndpoint(url="${rtspUrl}",credentials=UsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}"))) + source = RtspSource( + name="rtspSource", + endpoint=UnsecuredEndpoint( + url="${rtspUrl}", + credentials=UsernamePasswordCredentials(username="${rtspUserName}", password="${rtspPassword}"), + ), + ) node = NodeInput(node_name="rtspSource") pipeline_topology_properties.parameters = [user_name_param, password_param, url_param, hub_param] pipeline_topology_properties.sources = [source] - pipeline_topology = PipelineTopology(name=pipeline_topology_name,properties=pipeline_topology_properties) - - + pipeline_topology = PipelineTopology(name=pipeline_topology_name, properties=pipeline_topology_properties) set_top_method = PipelineTopologySetRequest(pipeline_topology=pipeline_topology) set_top_method_serialize = set_top_method.serialize() - assert set_top_method_serialize['name'] == pipeline_topology_name \ No newline at end of file + assert set_top_method_serialize["name"] == pipeline_topology_name diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/__init__.py index 462679904b97..5ff41f9a0f91 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/__init__.py @@ -10,10 +10,11 @@ from ._version import VERSION __version__ = VERSION -__all__ = ['VideoAnalyzer'] +__all__ = ["VideoAnalyzer"] try: from ._patch import patch_sdk # type: ignore + patch_sdk() except ImportError: pass diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py index 2bab80227252..2cbcc01a57d6 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py @@ -49,23 +49,24 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2021-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-videoanalyzer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-videoanalyzer/{}".format(VERSION)) self._configure(**kwargs) def _configure( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py index 5f81517d5367..64431ba7a445 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py @@ -93,7 +93,7 @@ def __init__( ): # type: (...) -> None if not base_url: - base_url = 'https://management.azure.com' + base_url = "https://management.azure.com" self._config = VideoAnalyzerConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -102,40 +102,41 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.edge_modules = EdgeModulesOperations( - self._client, self._config, self._serialize, self._deserialize) + self.edge_modules = EdgeModulesOperations(self._client, self._config, self._serialize, self._deserialize) self.pipeline_topologies = PipelineTopologiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.live_pipelines = LivePipelinesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.pipeline_jobs = PipelineJobsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.live_pipelines = LivePipelinesOperations(self._client, self._config, self._serialize, self._deserialize) + self.pipeline_jobs = PipelineJobsOperations(self._client, self._config, self._serialize, self._deserialize) self.live_pipeline_operation_statuses = LivePipelineOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.pipeline_job_operation_statuses = PipelineJobOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.video_analyzers = VideoAnalyzersOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.video_analyzers = VideoAnalyzersOperations(self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.operation_statuses = OperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.operation_results = OperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.video_analyzer_operation_statuses = VideoAnalyzerOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.video_analyzer_operation_results = VideoAnalyzerOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.videos = VideosOperations( - self._client, self._config, self._serialize, self._deserialize) - self.access_policies = AccessPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.videos = VideosOperations(self._client, self._config, self._serialize, self._deserialize) + self.access_policies = AccessPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse @@ -148,7 +149,9 @@ def _send_request(self, http_request, **kwargs): :rtype: ~azure.core.pipeline.transport.HttpResponse """ path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/__init__.py index 155fee12a242..3b6296645685 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/__init__.py @@ -7,4 +7,5 @@ # -------------------------------------------------------------------------- from ._video_analyzer import VideoAnalyzer -__all__ = ['VideoAnalyzer'] + +__all__ = ["VideoAnalyzer"] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py index 38c602c95f7f..e65cfb73d1eb 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py @@ -31,12 +31,7 @@ class VideoAnalyzerConfiguration(Configuration): :type subscription_id: str """ - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -46,22 +41,21 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2021-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-videoanalyzer/{}'.format(VERSION)) + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-videoanalyzer/{}".format(VERSION)) self._configure(**kwargs) - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py index 6c943e0ea78d..329c1c1d4c38 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py @@ -83,14 +83,10 @@ class VideoAnalyzer(object): """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: if not base_url: - base_url = 'https://management.azure.com' + base_url = "https://management.azure.com" self._config = VideoAnalyzerConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -99,40 +95,41 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - self.edge_modules = EdgeModulesOperations( - self._client, self._config, self._serialize, self._deserialize) + self.edge_modules = EdgeModulesOperations(self._client, self._config, self._serialize, self._deserialize) self.pipeline_topologies = PipelineTopologiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.live_pipelines = LivePipelinesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.pipeline_jobs = PipelineJobsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.live_pipelines = LivePipelinesOperations(self._client, self._config, self._serialize, self._deserialize) + self.pipeline_jobs = PipelineJobsOperations(self._client, self._config, self._serialize, self._deserialize) self.live_pipeline_operation_statuses = LivePipelineOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.pipeline_job_operation_statuses = PipelineJobOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.video_analyzers = VideoAnalyzersOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.video_analyzers = VideoAnalyzersOperations(self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.operation_statuses = OperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.operation_results = OperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.video_analyzer_operation_statuses = VideoAnalyzerOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) self.video_analyzer_operation_results = VideoAnalyzerOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.videos = VideosOperations( - self._client, self._config, self._serialize, self._deserialize) - self.access_policies = AccessPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) + self._client, self._config, self._serialize, self._deserialize + ) + self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.videos = VideosOperations(self._client, self._config, self._serialize, self._deserialize) + self.access_policies = AccessPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. @@ -144,7 +141,9 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), } http_request.url = self._client.format_url(http_request.url, **path_format_arguments) stream = kwargs.pop("stream", True) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py index 62393a002a63..904bbb87ced2 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py @@ -25,21 +25,21 @@ from ._access_policies_operations import AccessPoliciesOperations __all__ = [ - 'EdgeModulesOperations', - 'PipelineTopologiesOperations', - 'LivePipelinesOperations', - 'PipelineJobsOperations', - 'LivePipelineOperationStatusesOperations', - 'PipelineJobOperationStatusesOperations', - 'Operations', - 'VideoAnalyzersOperations', - 'PrivateLinkResourcesOperations', - 'PrivateEndpointConnectionsOperations', - 'OperationStatusesOperations', - 'OperationResultsOperations', - 'VideoAnalyzerOperationStatusesOperations', - 'VideoAnalyzerOperationResultsOperations', - 'LocationsOperations', - 'VideosOperations', - 'AccessPoliciesOperations', + "EdgeModulesOperations", + "PipelineTopologiesOperations", + "LivePipelinesOperations", + "PipelineJobsOperations", + "LivePipelineOperationStatusesOperations", + "PipelineJobOperationStatusesOperations", + "Operations", + "VideoAnalyzersOperations", + "PrivateLinkResourcesOperations", + "PrivateEndpointConnectionsOperations", + "OperationStatusesOperations", + "OperationResultsOperations", + "VideoAnalyzerOperationStatusesOperations", + "VideoAnalyzerOperationResultsOperations", + "LocationsOperations", + "VideosOperations", + "AccessPoliciesOperations", ] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py index 919cb8290d9b..bfab37670511 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py @@ -9,16 +9,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class AccessPoliciesOperations: """AccessPoliciesOperations async operations. @@ -42,11 +49,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config def list( - self, - resource_group_name: str, - account_name: str, - top: Optional[int] = None, - **kwargs: Any + self, resource_group_name: str, account_name: str, top: Optional[int] = None, **kwargs: Any ) -> AsyncIterable["_models.AccessPolicyEntityCollection"]: """List all existing access policy resources. @@ -65,33 +68,35 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.AccessPolicyEntityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntityCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntityCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -101,7 +106,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('AccessPolicyEntityCollection', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntityCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,17 +125,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - access_policy_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, access_policy_name: str, **kwargs: Any ) -> "_models.AccessPolicyEntity": """Retrieves an existing access policy resource. @@ -147,31 +147,33 @@ async def get( :rtype: ~video_analyzer.models.AccessPolicyEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -182,13 +184,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore async def create_or_update( self, @@ -215,37 +218,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.AccessPolicyEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AccessPolicyEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "AccessPolicyEntity") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -256,24 +261,19 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore - async def delete( - self, - resource_group_name: str, - account_name: str, - access_policy_name: str, - **kwargs: Any - ) -> None: + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, access_policy_name: str, **kwargs: Any) -> None: """Deletes an existing access policy resource. Deletes an existing access policy resource with the given name. @@ -289,31 +289,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -327,7 +329,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore async def update( self, @@ -354,37 +356,39 @@ async def update( :rtype: ~video_analyzer.models.AccessPolicyEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AccessPolicyEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "AccessPolicyEntity") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -394,10 +398,11 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py index 903012e62088..ba7339c4fb96 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py @@ -9,16 +9,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class EdgeModulesOperations: """EdgeModulesOperations async operations. @@ -42,11 +49,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config def list( - self, - resource_group_name: str, - account_name: str, - top: Optional[int] = None, - **kwargs: Any + self, resource_group_name: str, account_name: str, top: Optional[int] = None, **kwargs: Any ) -> AsyncIterable["_models.EdgeModuleEntityCollection"]: """List all existing edge module resources. @@ -65,33 +68,35 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.EdgeModuleEntityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleEntityCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleEntityCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -101,7 +106,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('EdgeModuleEntityCollection', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntityCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,17 +125,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - edge_module_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, edge_module_name: str, **kwargs: Any ) -> "_models.EdgeModuleEntity": """Retrieves an existing edge module resource. @@ -147,31 +147,33 @@ async def get( :rtype: ~video_analyzer.models.EdgeModuleEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -182,13 +184,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('EdgeModuleEntity', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}"} # type: ignore async def create_or_update( self, @@ -221,37 +224,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.EdgeModuleEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'EdgeModuleEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "EdgeModuleEntity") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -262,24 +267,19 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('EdgeModuleEntity', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntity", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('EdgeModuleEntity', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}'} # type: ignore - async def delete( - self, - resource_group_name: str, - account_name: str, - edge_module_name: str, - **kwargs: Any - ) -> None: + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, edge_module_name: str, **kwargs: Any) -> None: """Deletes an existing edge module resource. Deletes an existing edge module resource. Deleting the edge module resource will prevent an @@ -297,31 +297,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -335,7 +337,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}"} # type: ignore async def list_provisioning_token( self, @@ -368,37 +370,39 @@ async def list_provisioning_token( :rtype: ~video_analyzer.models.EdgeModuleProvisioningToken :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleProvisioningToken"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleProvisioningToken"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.list_provisioning_token.metadata['url'] # type: ignore + url = self.list_provisioning_token.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ListProvisioningTokenInput') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "ListProvisioningTokenInput") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -408,10 +412,11 @@ async def list_provisioning_token( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('EdgeModuleProvisioningToken', pipeline_response) + deserialized = self._deserialize("EdgeModuleProvisioningToken", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_provisioning_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}/listProvisioningToken'} # type: ignore + + list_provisioning_token.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}/listProvisioningToken"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py index 0bc9c78b712d..bb69e8fc1aa6 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class LivePipelineOperationStatusesOperations: """LivePipelineOperationStatusesOperations async operations. @@ -41,12 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - operation_id: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, live_pipeline_name: str, operation_id: str, **kwargs: Any ) -> "_models.LivePipelineOperationStatus": """Get the operation status. @@ -65,32 +67,34 @@ async def get( :rtype: ~video_analyzer.models.LivePipelineOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipelineOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -101,10 +105,11 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LivePipelineOperationStatus', pipeline_response) + deserialized = self._deserialize("LivePipelineOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py index 62e6a76d6e6d..62dc2588d975 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py @@ -9,7 +9,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -18,9 +24,10 @@ from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class LivePipelinesOperations: """LivePipelinesOperations async operations. @@ -71,35 +78,37 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.LivePipelineCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipelineCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["$filter"] = self._serialize.query("filter", filter, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -109,7 +118,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LivePipelineCollection', pipeline_response) + deserialized = self._deserialize("LivePipelineCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -128,17 +137,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, live_pipeline_name: str, **kwargs: Any ) -> "_models.LivePipeline": """Retrieves a specific live pipeline by name. @@ -156,31 +160,33 @@ async def get( :rtype: ~video_analyzer.models.LivePipeline :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipeline"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -191,13 +197,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore async def create_or_update( self, @@ -224,37 +231,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.LivePipeline :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipeline"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LivePipeline') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "LivePipeline") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -265,24 +274,19 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore - async def delete( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - **kwargs: Any - ) -> None: + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, live_pipeline_name: str, **kwargs: Any) -> None: """Deletes a live pipeline. Deletes a live pipeline with the given name. @@ -298,31 +302,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -336,7 +342,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore async def update( self, @@ -365,37 +371,39 @@ async def update( :rtype: ~video_analyzer.models.LivePipeline :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipeline"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LivePipelineUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "LivePipelineUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -405,46 +413,45 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore async def _activate_initial( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, live_pipeline_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self._activate_initial.metadata['url'] # type: ignore + url = self._activate_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -458,14 +465,10 @@ async def _activate_initial( if cls: return cls(pipeline_response, None, {}) - _activate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + _activate_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate"} # type: ignore async def begin_activate( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, live_pipeline_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Activates a live pipeline. @@ -487,82 +490,85 @@ async def begin_activate( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._activate_initial( resource_group_name=resource_group_name, account_name=account_name, live_pipeline_name=live_pipeline_name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + + begin_activate.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate"} # type: ignore async def _deactivate_initial( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, live_pipeline_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self._deactivate_initial.metadata['url'] # type: ignore + url = self._deactivate_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -576,14 +582,10 @@ async def _deactivate_initial( if cls: return cls(pipeline_response, None, {}) - _deactivate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore + _deactivate_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate"} # type: ignore async def begin_deactivate( - self, - resource_group_name: str, - account_name: str, - live_pipeline_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, live_pipeline_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Deactivates a live pipeline. @@ -605,46 +607,51 @@ async def begin_deactivate( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._deactivate_initial( resource_group_name=resource_group_name, account_name=account_name, live_pipeline_name=live_pipeline_name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore + + begin_deactivate.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py index 14693f0b4139..cfec705fa159 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class LocationsOperations: """LocationsOperations async operations. @@ -41,10 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def check_name_availability( - self, - location_name: str, - parameters: "_models.CheckNameAvailabilityRequest", - **kwargs: Any + self, location_name: str, parameters: "_models.CheckNameAvailabilityRequest", **kwargs: Any ) -> "_models.CheckNameAvailabilityResponse": """Check Name Availability. @@ -59,35 +63,35 @@ async def check_name_availability( :rtype: ~video_analyzer.models.CheckNameAvailabilityResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CheckNameAvailabilityResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.check_name_availability.metadata['url'] # type: ignore + url = self.check_name_availability.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "locationName": self._serialize.url("location_name", location_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequest') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "CheckNameAvailabilityRequest") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -97,10 +101,11 @@ async def check_name_availability( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('CheckNameAvailabilityResponse', pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability'} # type: ignore + + check_name_availability.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py index c5156f79a9bc..94fdfc986599 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class OperationResultsOperations: """OperationResultsOperations async operations. @@ -41,12 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get( - self, - resource_group_name: str, - account_name: str, - name: str, - operation_id: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, name: str, operation_id: str, **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: """Get operation result. @@ -65,32 +67,34 @@ async def get( :rtype: ~video_analyzer.models.PrivateEndpointConnection or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -103,10 +107,11 @@ async def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py index 5e58c11175ea..7cf72af6609f 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class OperationStatusesOperations: """OperationStatusesOperations async operations. @@ -41,12 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get( - self, - resource_group_name: str, - account_name: str, - name: str, - operation_id: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, name: str, operation_id: str, **kwargs: Any ) -> "_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus": """Get operation status. @@ -65,32 +67,34 @@ async def get( :rtype: ~video_analyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -101,10 +105,11 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerPrivateEndpointConnectionOperationStatus', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerPrivateEndpointConnectionOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py index a832bb39898d..389db68270d0 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class Operations: """Operations async operations. @@ -40,10 +47,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def list( - self, - **kwargs: Any - ) -> "_models.OperationCollection": + async def list(self, **kwargs: Any) -> "_models.OperationCollection": """List Operations. Lists all the Media operations. @@ -53,24 +57,22 @@ async def list( :rtype: ~video_analyzer.models.OperationCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.OperationCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -81,10 +83,11 @@ async def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('OperationCollection', pipeline_response) + deserialized = self._deserialize("OperationCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/providers/Microsoft.Media/operations'} # type: ignore + + list.metadata = {"url": "/providers/Microsoft.Media/operations"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py index 8709efef2199..6771d13971b7 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class PipelineJobOperationStatusesOperations: """PipelineJobOperationStatusesOperations async operations. @@ -41,12 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def get( - self, - resource_group_name: str, - account_name: str, - pipeline_job_name: str, - operation_id: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, pipeline_job_name: str, operation_id: str, **kwargs: Any ) -> "_models.PipelineJobOperationStatus": """Get the operation statuses. @@ -65,32 +67,34 @@ async def get( :rtype: ~video_analyzer.models.PipelineJobOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJobOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -101,10 +105,11 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineJobOperationStatus', pipeline_response) + deserialized = self._deserialize("PipelineJobOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py index 516fa720eb04..1a883cd92888 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py @@ -9,7 +9,13 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -18,9 +24,10 @@ from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class PipelineJobsOperations: """PipelineJobsOperations async operations. @@ -71,35 +78,37 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.PipelineJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJobCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["$filter"] = self._serialize.query("filter", filter, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -109,7 +118,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PipelineJobCollection', pipeline_response) + deserialized = self._deserialize("PipelineJobCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -128,17 +137,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - pipeline_job_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, pipeline_job_name: str, **kwargs: Any ) -> "_models.PipelineJob": """Gets a specific pipeline job by name. @@ -156,31 +160,33 @@ async def get( :rtype: ~video_analyzer.models.PipelineJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -191,13 +197,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore async def create_or_update( self, @@ -224,37 +231,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.PipelineJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineJob') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineJob") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -265,24 +274,19 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore - async def delete( - self, - resource_group_name: str, - account_name: str, - pipeline_job_name: str, - **kwargs: Any - ) -> None: + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, pipeline_job_name: str, **kwargs: Any) -> None: """Deletes a pipeline job. Deletes a pipeline job with the given name. @@ -298,31 +302,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -336,7 +342,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore async def update( self, @@ -364,37 +370,39 @@ async def update( :rtype: ~video_analyzer.models.PipelineJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineJobUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineJobUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -404,46 +412,45 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore async def _cancel_initial( - self, - resource_group_name: str, - account_name: str, - pipeline_job_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, pipeline_job_name: str, **kwargs: Any ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self._cancel_initial.metadata['url'] # type: ignore + url = self._cancel_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -457,14 +464,10 @@ async def _cancel_initial( if cls: return cls(pipeline_response, None, {}) - _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore + _cancel_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel"} # type: ignore async def begin_cancel( - self, - resource_group_name: str, - account_name: str, - pipeline_job_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, pipeline_job_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Cancels a pipeline job. @@ -486,46 +489,51 @@ async def begin_cancel( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._cancel_initial( resource_group_name=resource_group_name, account_name=account_name, pipeline_job_name=pipeline_job_name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore + + begin_cancel.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py index f98c82443f10..049c6be1f9fc 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py @@ -9,16 +9,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class PipelineTopologiesOperations: """PipelineTopologiesOperations async operations. @@ -69,35 +76,37 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.PipelineTopologyCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopologyCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopologyCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["$filter"] = self._serialize.query("filter", filter, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -107,7 +116,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PipelineTopologyCollection', pipeline_response) + deserialized = self._deserialize("PipelineTopologyCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,17 +135,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - pipeline_topology_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, pipeline_topology_name: str, **kwargs: Any ) -> "_models.PipelineTopology": """Retrieves a specific pipeline topology by name. @@ -154,31 +158,33 @@ async def get( :rtype: ~video_analyzer.models.PipelineTopology :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopology"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -189,13 +195,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore async def create_or_update( self, @@ -225,37 +232,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.PipelineTopology :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopology"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineTopology') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineTopology") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -266,23 +275,20 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore async def delete( - self, - resource_group_name: str, - account_name: str, - pipeline_topology_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, pipeline_topology_name: str, **kwargs: Any ) -> None: """Deletes a pipeline topology. @@ -300,31 +306,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -338,7 +346,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore async def update( self, @@ -368,37 +376,39 @@ async def update( :rtype: ~video_analyzer.models.PipelineTopology :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopology"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineTopologyUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineTopologyUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -408,10 +418,11 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py index 525355f49003..c379ddd279cd 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class PrivateEndpointConnectionsOperations: """PrivateEndpointConnectionsOperations async operations. @@ -41,10 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, **kwargs: Any ) -> "_models.PrivateEndpointConnectionListResult": """Get all private endpoint connections. @@ -59,30 +63,32 @@ async def list( :rtype: ~video_analyzer.models.PrivateEndpointConnectionListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -93,20 +99,17 @@ async def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections'} # type: ignore + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, name: str, **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Get private endpoint connection. @@ -123,31 +126,33 @@ async def get( :rtype: ~video_analyzer.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -158,13 +163,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}"} # type: ignore async def create_or_update( self, @@ -191,37 +197,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PrivateEndpointConnection") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -232,24 +240,21 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore - async def delete( - self, - resource_group_name: str, - account_name: str, - name: str, - **kwargs: Any - ) -> None: + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, name: str, **kwargs: Any) -> None: """Delete private endpoint connection. Delete private endpoint connection under video analyzer account. @@ -265,31 +270,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -303,4 +310,4 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py index c8c38a4a8f15..d603645f5bfd 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class PrivateLinkResourcesOperations: """PrivateLinkResourcesOperations async operations. @@ -41,10 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config async def list( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, **kwargs: Any ) -> "_models.PrivateLinkResourceListResult": """Get list of group IDs. @@ -59,30 +63,32 @@ async def list( :rtype: ~video_analyzer.models.PrivateLinkResourceListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -93,20 +99,17 @@ async def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources'} # type: ignore + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, name: str, **kwargs: Any ) -> "_models.PrivateLinkResource": """Get group ID. @@ -123,31 +126,33 @@ async def get( :rtype: ~video_analyzer.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateLinkResource"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -158,10 +163,11 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources/{name}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources/{name}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py index 423a0915794b..0265f22b7078 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class VideoAnalyzerOperationResultsOperations: """VideoAnalyzerOperationResultsOperations async operations. @@ -40,12 +47,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def get( - self, - location_name: str, - operation_id: str, - **kwargs: Any - ) -> Optional["_models.VideoAnalyzer"]: + async def get(self, location_name: str, operation_id: str, **kwargs: Any) -> Optional["_models.VideoAnalyzer"]: """Get operation result. Get video analyzer operation result. @@ -59,30 +61,30 @@ async def get( :rtype: ~video_analyzer.models.VideoAnalyzer or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VideoAnalyzer"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional["_models.VideoAnalyzer"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "locationName": self._serialize.url("location_name", location_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -95,10 +97,11 @@ async def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationResults/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationResults/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py index c4b276f70f37..0a946ba7fbdd 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py @@ -8,16 +8,23 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class VideoAnalyzerOperationStatusesOperations: """VideoAnalyzerOperationStatusesOperations async operations. @@ -40,12 +47,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def get( - self, - location_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.VideoAnalyzerOperationStatus": + async def get(self, location_name: str, operation_id: str, **kwargs: Any) -> "_models.VideoAnalyzerOperationStatus": """Get operation status. Get video analyzer operation status. @@ -59,30 +61,30 @@ async def get( :rtype: ~video_analyzer.models.VideoAnalyzerOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "locationName": self._serialize.url("location_name", location_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -93,10 +95,11 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerOperationStatus', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py index 9381a44dd49c..5c2ca78d742e 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py @@ -8,7 +8,13 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod @@ -17,9 +23,10 @@ from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class VideoAnalyzersOperations: """VideoAnalyzersOperations async operations. @@ -42,11 +49,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> "_models.VideoAnalyzerCollection": + async def list(self, resource_group_name: str, **kwargs: Any) -> "_models.VideoAnalyzerCollection": """List Video Analyzer accounts. Lists the Video Analyzer accounts in the specified resource group. @@ -58,29 +61,31 @@ async def list( :rtype: ~video_analyzer.models.VideoAnalyzerCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -91,20 +96,16 @@ async def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerCollection', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers'} # type: ignore - async def get( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> "_models.VideoAnalyzer": + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers"} # type: ignore + + async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> "_models.VideoAnalyzer": """Get a Video Analyzer account. Get the details of the specified Video Analyzer account. @@ -118,30 +119,32 @@ async def get( :rtype: ~video_analyzer.models.VideoAnalyzer :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -152,51 +155,50 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore async def _create_or_update_initial( - self, - resource_group_name: str, - account_name: str, - parameters: "_models.VideoAnalyzer", - **kwargs: Any + self, resource_group_name: str, account_name: str, parameters: "_models.VideoAnalyzer", **kwargs: Any ) -> "_models.VideoAnalyzer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoAnalyzer') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoAnalyzer") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -208,26 +210,25 @@ async def _create_or_update_initial( response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if response.status_code == 201: - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore async def begin_create_or_update( - self, - resource_group_name: str, - account_name: str, - parameters: "_models.VideoAnalyzer", - **kwargs: Any + self, resource_group_name: str, account_name: str, parameters: "_models.VideoAnalyzer", **kwargs: Any ) -> AsyncLROPoller["_models.VideoAnalyzer"]: """Create or update a Video Analyzer account. @@ -249,58 +250,58 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~video_analyzer.models.VideoAnalyzer] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, account_name=account_name, parameters=parameters, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - - async def delete( - self, - resource_group_name: str, - account_name: str, - **kwargs: Any - ) -> None: + + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, **kwargs: Any) -> None: """Delete a Video Analyzer account. Delete the specified Video Analyzer account. @@ -314,30 +315,32 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -351,45 +354,43 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore async def _update_initial( - self, - resource_group_name: str, - account_name: str, - parameters: "_models.VideoAnalyzerUpdate", - **kwargs: Any + self, resource_group_name: str, account_name: str, parameters: "_models.VideoAnalyzerUpdate", **kwargs: Any ) -> "_models.VideoAnalyzer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoAnalyzerUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoAnalyzerUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -400,23 +401,22 @@ async def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore async def begin_update( - self, - resource_group_name: str, - account_name: str, - parameters: "_models.VideoAnalyzerUpdate", - **kwargs: Any + self, resource_group_name: str, account_name: str, parameters: "_models.VideoAnalyzerUpdate", **kwargs: Any ) -> AsyncLROPoller["_models.VideoAnalyzer"]: """Update a Video Analyzer account. @@ -438,61 +438,65 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~video_analyzer.models.VideoAnalyzer] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = await self._update_initial( resource_group_name=resource_group_name, account_name=account_name, parameters=parameters, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): response_headers = {} response = pipeline_response.http_response - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling + if polling is True: + polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = AsyncNoPolling() + else: + polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - async def list_by_subscription( - self, - **kwargs: Any - ) -> "_models.VideoAnalyzerCollection": + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore + + async def list_by_subscription(self, **kwargs: Any) -> "_models.VideoAnalyzerCollection": """List Video Analyzer accounts. List all Video Analyzer accounts in the specified subscription. @@ -502,28 +506,28 @@ async def list_by_subscription( :rtype: ~video_analyzer.models.VideoAnalyzerCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_subscription.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -534,10 +538,11 @@ async def list_by_subscription( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerCollection', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/videoAnalyzers'} # type: ignore + + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/videoAnalyzers"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py index 5c2b6b7bf85a..ad92bd41b519 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py @@ -9,16 +9,23 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -T = TypeVar('T') +T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + class VideosOperations: """VideosOperations async operations. @@ -42,11 +49,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config def list( - self, - resource_group_name: str, - account_name: str, - top: Optional[int] = None, - **kwargs: Any + self, resource_group_name: str, account_name: str, top: Optional[int] = None, **kwargs: Any ) -> AsyncIterable["_models.VideoEntityCollection"]: """Retrieves all existing video resources. @@ -66,33 +69,35 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.VideoEntityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntityCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntityCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -102,7 +107,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VideoEntityCollection', pipeline_response) + deserialized = self._deserialize("VideoEntityCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,17 +126,12 @@ async def get_next(next_link=None): return pipeline_response - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos'} # type: ignore + return AsyncItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos"} # type: ignore async def get( - self, - resource_group_name: str, - account_name: str, - video_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, video_name: str, **kwargs: Any ) -> "_models.VideoEntity": """Retrieves an existing video resource. @@ -148,31 +148,33 @@ async def get( :rtype: ~video_analyzer.models.VideoEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -183,13 +185,14 @@ async def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore async def create_or_update( self, @@ -216,37 +219,39 @@ async def create_or_update( :rtype: ~video_analyzer.models.VideoEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoEntity") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -257,24 +262,19 @@ async def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore - async def delete( - self, - resource_group_name: str, - account_name: str, - video_name: str, - **kwargs: Any - ) -> None: + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore + + async def delete(self, resource_group_name: str, account_name: str, video_name: str, **kwargs: Any) -> None: """Deletes an existing video resource and its underlying data. Deletes an existing video resource and its underlying data. This operation is irreversible. @@ -290,31 +290,33 @@ async def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -328,7 +330,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore async def update( self, @@ -355,37 +357,39 @@ async def update( :rtype: ~video_analyzer.models.VideoEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoEntity") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -395,20 +399,17 @@ async def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore async def list_content_token( - self, - resource_group_name: str, - account_name: str, - video_name: str, - **kwargs: Any + self, resource_group_name: str, account_name: str, video_name: str, **kwargs: Any ) -> "_models.VideoContentToken": """Generates a streaming token which can be used for accessing content from video content URLs. @@ -426,31 +427,33 @@ async def list_content_token( :rtype: ~video_analyzer.models.VideoContentToken :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoContentToken"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoContentToken"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list_content_token.metadata['url'] # type: ignore + url = self.list_content_token.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -461,10 +464,11 @@ async def list_content_token( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoContentToken', pipeline_response) + deserialized = self._deserialize("VideoContentToken", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_content_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken'} # type: ignore + + list_content_token.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py index 780b3ad61910..6129ed5dd94d 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py @@ -245,132 +245,132 @@ ) __all__ = [ - 'AccessPolicyEntity', - 'AccessPolicyEntityCollection', - 'AccountEncryption', - 'AudioEncoderAac', - 'AudioEncoderBase', - 'AuthenticationBase', - 'CertificateSource', - 'CheckNameAvailabilityRequest', - 'CheckNameAvailabilityResponse', - 'CredentialsBase', - 'EccTokenKey', - 'EdgeModuleEntity', - 'EdgeModuleEntityCollection', - 'EdgeModuleProvisioningToken', - 'EncoderCustomPreset', - 'EncoderPresetBase', - 'EncoderProcessor', - 'EncoderSystemPreset', - 'Endpoint', - 'EndpointBase', - 'ErrorAdditionalInfo', - 'ErrorDetail', - 'ErrorResponse', - 'GroupLevelAccessControl', - 'IotHub', - 'JwtAuthentication', - 'KeyVaultProperties', - 'ListProvisioningTokenInput', - 'LivePipeline', - 'LivePipelineCollection', - 'LivePipelineOperationStatus', - 'LivePipelineUpdate', - 'LogSpecification', - 'MetricDimension', - 'MetricSpecification', - 'NetworkAccessControl', - 'NodeBase', - 'NodeInput', - 'Operation', - 'OperationCollection', - 'OperationDisplay', - 'ParameterDeclaration', - 'ParameterDefinition', - 'PemCertificateList', - 'PipelineJob', - 'PipelineJobCollection', - 'PipelineJobError', - 'PipelineJobOperationStatus', - 'PipelineJobUpdate', - 'PipelineTopology', - 'PipelineTopologyCollection', - 'PipelineTopologyUpdate', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionListResult', - 'PrivateLinkResource', - 'PrivateLinkResourceListResult', - 'PrivateLinkServiceConnectionState', - 'ProcessorNodeBase', - 'Properties', - 'ProxyResource', - 'Resource', - 'ResourceIdentity', - 'RsaTokenKey', - 'RtspSource', - 'SecureIotDeviceRemoteTunnel', - 'ServiceSpecification', - 'SinkNodeBase', - 'Sku', - 'SourceNodeBase', - 'StorageAccount', - 'SystemData', - 'TimeSequenceBase', - 'TlsEndpoint', - 'TlsValidationOptions', - 'TokenClaim', - 'TokenKey', - 'TrackedResource', - 'TunnelBase', - 'UnsecuredEndpoint', - 'UserAssignedManagedIdentity', - 'UsernamePasswordCredentials', - 'VideoAnalyzer', - 'VideoAnalyzerCollection', - 'VideoAnalyzerIdentity', - 'VideoAnalyzerOperationStatus', - 'VideoAnalyzerPrivateEndpointConnectionOperationStatus', - 'VideoAnalyzerUpdate', - 'VideoArchival', - 'VideoContentToken', - 'VideoContentUrls', - 'VideoCreationProperties', - 'VideoEncoderBase', - 'VideoEncoderH264', - 'VideoEntity', - 'VideoEntityCollection', - 'VideoFlags', - 'VideoMediaInfo', - 'VideoPreviewImageUrls', - 'VideoPublishingOptions', - 'VideoScale', - 'VideoSequenceAbsoluteTimeMarkers', - 'VideoSink', - 'VideoSource', - 'AccessPolicyEccAlgo', - 'AccessPolicyRole', - 'AccessPolicyRsaAlgo', - 'AccountEncryptionKeyType', - 'ActionType', - 'CheckNameAvailabilityReason', - 'CreatedByType', - 'EncoderSystemPresetType', - 'Kind', - 'LivePipelineState', - 'MetricAggregationType', - 'MetricUnit', - 'ParameterType', - 'PipelineJobState', - 'PrivateEndpointConnectionProvisioningState', - 'PrivateEndpointServiceConnectionStatus', - 'ProvisioningState', - 'PublicNetworkAccess', - 'RtspTransport', - 'SkuName', - 'SkuTier', - 'VideoAnalyzerEndpointType', - 'VideoScaleMode', - 'VideoType', + "AccessPolicyEntity", + "AccessPolicyEntityCollection", + "AccountEncryption", + "AudioEncoderAac", + "AudioEncoderBase", + "AuthenticationBase", + "CertificateSource", + "CheckNameAvailabilityRequest", + "CheckNameAvailabilityResponse", + "CredentialsBase", + "EccTokenKey", + "EdgeModuleEntity", + "EdgeModuleEntityCollection", + "EdgeModuleProvisioningToken", + "EncoderCustomPreset", + "EncoderPresetBase", + "EncoderProcessor", + "EncoderSystemPreset", + "Endpoint", + "EndpointBase", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorResponse", + "GroupLevelAccessControl", + "IotHub", + "JwtAuthentication", + "KeyVaultProperties", + "ListProvisioningTokenInput", + "LivePipeline", + "LivePipelineCollection", + "LivePipelineOperationStatus", + "LivePipelineUpdate", + "LogSpecification", + "MetricDimension", + "MetricSpecification", + "NetworkAccessControl", + "NodeBase", + "NodeInput", + "Operation", + "OperationCollection", + "OperationDisplay", + "ParameterDeclaration", + "ParameterDefinition", + "PemCertificateList", + "PipelineJob", + "PipelineJobCollection", + "PipelineJobError", + "PipelineJobOperationStatus", + "PipelineJobUpdate", + "PipelineTopology", + "PipelineTopologyCollection", + "PipelineTopologyUpdate", + "PrivateEndpoint", + "PrivateEndpointConnection", + "PrivateEndpointConnectionListResult", + "PrivateLinkResource", + "PrivateLinkResourceListResult", + "PrivateLinkServiceConnectionState", + "ProcessorNodeBase", + "Properties", + "ProxyResource", + "Resource", + "ResourceIdentity", + "RsaTokenKey", + "RtspSource", + "SecureIotDeviceRemoteTunnel", + "ServiceSpecification", + "SinkNodeBase", + "Sku", + "SourceNodeBase", + "StorageAccount", + "SystemData", + "TimeSequenceBase", + "TlsEndpoint", + "TlsValidationOptions", + "TokenClaim", + "TokenKey", + "TrackedResource", + "TunnelBase", + "UnsecuredEndpoint", + "UserAssignedManagedIdentity", + "UsernamePasswordCredentials", + "VideoAnalyzer", + "VideoAnalyzerCollection", + "VideoAnalyzerIdentity", + "VideoAnalyzerOperationStatus", + "VideoAnalyzerPrivateEndpointConnectionOperationStatus", + "VideoAnalyzerUpdate", + "VideoArchival", + "VideoContentToken", + "VideoContentUrls", + "VideoCreationProperties", + "VideoEncoderBase", + "VideoEncoderH264", + "VideoEntity", + "VideoEntityCollection", + "VideoFlags", + "VideoMediaInfo", + "VideoPreviewImageUrls", + "VideoPublishingOptions", + "VideoScale", + "VideoSequenceAbsoluteTimeMarkers", + "VideoSink", + "VideoSource", + "AccessPolicyEccAlgo", + "AccessPolicyRole", + "AccessPolicyRsaAlgo", + "AccountEncryptionKeyType", + "ActionType", + "CheckNameAvailabilityReason", + "CreatedByType", + "EncoderSystemPresetType", + "Kind", + "LivePipelineState", + "MetricAggregationType", + "MetricUnit", + "ParameterType", + "PipelineJobState", + "PrivateEndpointConnectionProvisioningState", + "PrivateEndpointServiceConnectionStatus", + "ProvisioningState", + "PublicNetworkAccess", + "RtspTransport", + "SkuName", + "SkuTier", + "VideoAnalyzerEndpointType", + "VideoScaleMode", + "VideoType", ] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py index 4c4dd7e5ec76..4525ce4e8108 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py @@ -29,23 +29,20 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -72,23 +69,20 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) @@ -116,28 +110,25 @@ class AccessPolicyEntity(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'role': {'key': 'properties.role', 'type': 'str'}, - 'authentication': {'key': 'properties.authentication', 'type': 'AuthenticationBase'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "role": {"key": "properties.role", "type": "str"}, + "authentication": {"key": "properties.authentication", "type": "AuthenticationBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AccessPolicyEntity, self).__init__(**kwargs) - self.role = kwargs.get('role', None) - self.authentication = kwargs.get('authentication', None) + self.role = kwargs.get("role", None) + self.authentication = kwargs.get("authentication", None) class AccessPolicyEntityCollection(msrest.serialization.Model): @@ -151,17 +142,14 @@ class AccessPolicyEntityCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[AccessPolicyEntity]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[AccessPolicyEntity]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AccessPolicyEntityCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class AccountEncryption(msrest.serialization.Model): @@ -183,25 +171,22 @@ class AccountEncryption(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'status': {'readonly': True}, + "type": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'status': {'key': 'status', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "key_vault_properties": {"key": "keyVaultProperties", "type": "KeyVaultProperties"}, + "identity": {"key": "identity", "type": "ResourceIdentity"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AccountEncryption, self).__init__(**kwargs) - self.type = kwargs['type'] - self.key_vault_properties = kwargs.get('key_vault_properties', None) - self.identity = kwargs.get('identity', None) + self.type = kwargs["type"] + self.key_vault_properties = kwargs.get("key_vault_properties", None) + self.identity = kwargs.get("identity", None) self.status = None @@ -222,25 +207,20 @@ class AudioEncoderBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.AudioEncoderAac': 'AudioEncoderAac'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.AudioEncoderAac": "AudioEncoderAac"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AudioEncoderBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + self.bitrate_kbps = kwargs.get("bitrate_kbps", None) class AudioEncoderAac(AudioEncoderBase): @@ -257,20 +237,17 @@ class AudioEncoderAac(AudioEncoderBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AudioEncoderAac, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.AudioEncoderAac' # type: str + self.type = "#Microsoft.VideoAnalyzer.AudioEncoderAac" # type: str class AuthenticationBase(msrest.serialization.Model): @@ -286,21 +263,16 @@ class AuthenticationBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.JwtAuthentication': 'JwtAuthentication'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.JwtAuthentication": "JwtAuthentication"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AuthenticationBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -318,21 +290,16 @@ class CertificateSource(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.PemCertificateList': 'PemCertificateList'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.PemCertificateList": "PemCertificateList"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CertificateSource, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -347,17 +314,14 @@ class CheckNameAvailabilityRequest(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) + self.name = kwargs.get("name", None) + self.type = kwargs.get("type", None) class CheckNameAvailabilityResponse(msrest.serialization.Model): @@ -373,19 +337,16 @@ class CheckNameAvailabilityResponse(msrest.serialization.Model): """ _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "name_available": {"key": "nameAvailable", "type": "bool"}, + "reason": {"key": "reason", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) + self.name_available = kwargs.get("name_available", None) + self.reason = kwargs.get("reason", None) + self.message = kwargs.get("message", None) class CredentialsBase(msrest.serialization.Model): @@ -401,21 +362,16 @@ class CredentialsBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.UsernamePasswordCredentials": "UsernamePasswordCredentials"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CredentialsBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -436,26 +392,26 @@ class TokenKey(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'kid': {'required': True}, + "type": {"required": True}, + "kid": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "kid": {"key": "kid", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.EccTokenKey': 'EccTokenKey', '#Microsoft.VideoAnalyzer.RsaTokenKey': 'RsaTokenKey'} + "type": { + "#Microsoft.VideoAnalyzer.EccTokenKey": "EccTokenKey", + "#Microsoft.VideoAnalyzer.RsaTokenKey": "RsaTokenKey", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TokenKey, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.kid = kwargs['kid'] + self.kid = kwargs["kid"] class EccTokenKey(TokenKey): @@ -478,30 +434,27 @@ class EccTokenKey(TokenKey): """ _validation = { - 'type': {'required': True}, - 'kid': {'required': True}, - 'alg': {'required': True}, - 'x': {'required': True}, - 'y': {'required': True}, + "type": {"required": True}, + "kid": {"required": True}, + "alg": {"required": True}, + "x": {"required": True}, + "y": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, - 'alg': {'key': 'alg', 'type': 'str'}, - 'x': {'key': 'x', 'type': 'str'}, - 'y': {'key': 'y', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "kid": {"key": "kid", "type": "str"}, + "alg": {"key": "alg", "type": "str"}, + "x": {"key": "x", "type": "str"}, + "y": {"key": "y", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EccTokenKey, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.EccTokenKey' # type: str - self.alg = kwargs['alg'] - self.x = kwargs['x'] - self.y = kwargs['y'] + self.type = "#Microsoft.VideoAnalyzer.EccTokenKey" # type: str + self.alg = kwargs["alg"] + self.x = kwargs["x"] + self.y = kwargs["y"] class EdgeModuleEntity(ProxyResource): @@ -525,25 +478,22 @@ class EdgeModuleEntity(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'edge_module_id': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "edge_module_id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'edge_module_id': {'key': 'properties.edgeModuleId', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "edge_module_id": {"key": "properties.edgeModuleId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EdgeModuleEntity, self).__init__(**kwargs) self.edge_module_id = None @@ -559,17 +509,14 @@ class EdgeModuleEntityCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[EdgeModuleEntity]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[EdgeModuleEntity]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EdgeModuleEntityCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class EdgeModuleProvisioningToken(msrest.serialization.Model): @@ -587,19 +534,16 @@ class EdgeModuleProvisioningToken(msrest.serialization.Model): """ _validation = { - 'expiration_date': {'readonly': True}, - 'token': {'readonly': True}, + "expiration_date": {"readonly": True}, + "token": {"readonly": True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'token': {'key': 'token', 'type': 'str'}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, + "token": {"key": "token", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EdgeModuleProvisioningToken, self).__init__(**kwargs) self.expiration_date = None self.token = None @@ -618,21 +562,21 @@ class EncoderPresetBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.EncoderCustomPreset': 'EncoderCustomPreset', '#Microsoft.VideoAnalyzer.EncoderSystemPreset': 'EncoderSystemPreset'} + "type": { + "#Microsoft.VideoAnalyzer.EncoderCustomPreset": "EncoderCustomPreset", + "#Microsoft.VideoAnalyzer.EncoderSystemPreset": "EncoderSystemPreset", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EncoderPresetBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -651,23 +595,20 @@ class EncoderCustomPreset(EncoderPresetBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'audio_encoder': {'key': 'audioEncoder', 'type': 'AudioEncoderBase'}, - 'video_encoder': {'key': 'videoEncoder', 'type': 'VideoEncoderBase'}, + "type": {"key": "@type", "type": "str"}, + "audio_encoder": {"key": "audioEncoder", "type": "AudioEncoderBase"}, + "video_encoder": {"key": "videoEncoder", "type": "VideoEncoderBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EncoderCustomPreset, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.EncoderCustomPreset' # type: str - self.audio_encoder = kwargs.get('audio_encoder', None) - self.video_encoder = kwargs.get('video_encoder', None) + self.type = "#Microsoft.VideoAnalyzer.EncoderCustomPreset" # type: str + self.audio_encoder = kwargs.get("audio_encoder", None) + self.video_encoder = kwargs.get("video_encoder", None) class NodeBase(msrest.serialization.Model): @@ -685,26 +626,27 @@ class NodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.ProcessorNodeBase': 'ProcessorNodeBase', '#Microsoft.VideoAnalyzer.SinkNodeBase': 'SinkNodeBase', '#Microsoft.VideoAnalyzer.SourceNodeBase': 'SourceNodeBase'} + "type": { + "#Microsoft.VideoAnalyzer.ProcessorNodeBase": "ProcessorNodeBase", + "#Microsoft.VideoAnalyzer.SinkNodeBase": "SinkNodeBase", + "#Microsoft.VideoAnalyzer.SourceNodeBase": "SourceNodeBase", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(NodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.name = kwargs['name'] + self.name = kwargs["name"] class ProcessorNodeBase(NodeBase): @@ -725,28 +667,23 @@ class ProcessorNodeBase(NodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.EncoderProcessor': 'EncoderProcessor'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.EncoderProcessor": "EncoderProcessor"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ProcessorNodeBase, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.ProcessorNodeBase' # type: str - self.inputs = kwargs['inputs'] + self.type = "#Microsoft.VideoAnalyzer.ProcessorNodeBase" # type: str + self.inputs = kwargs["inputs"] class EncoderProcessor(ProcessorNodeBase): @@ -767,26 +704,23 @@ class EncoderProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'preset': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "preset": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'preset': {'key': 'preset', 'type': 'EncoderPresetBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "preset": {"key": "preset", "type": "EncoderPresetBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EncoderProcessor, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.EncoderProcessor' # type: str - self.preset = kwargs['preset'] + self.type = "#Microsoft.VideoAnalyzer.EncoderProcessor" # type: str + self.preset = kwargs["preset"] class EncoderSystemPreset(EncoderPresetBase): @@ -803,22 +737,19 @@ class EncoderSystemPreset(EncoderPresetBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EncoderSystemPreset, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.EncoderSystemPreset' # type: str - self.name = kwargs['name'] + self.type = "#Microsoft.VideoAnalyzer.EncoderSystemPreset" # type: str + self.name = kwargs["name"] class Endpoint(msrest.serialization.Model): @@ -833,21 +764,18 @@ class Endpoint(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "endpoint_url": {"key": "endpointUrl", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Endpoint, self).__init__(**kwargs) - self.endpoint_url = kwargs.get('endpoint_url', None) - self.type = kwargs['type'] + self.endpoint_url = kwargs.get("endpoint_url", None) + self.type = kwargs["type"] class EndpointBase(msrest.serialization.Model): @@ -870,31 +798,31 @@ class EndpointBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'credentials': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "credentials": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "tunnel": {"key": "tunnel", "type": "TunnelBase"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.TlsEndpoint': 'TlsEndpoint', '#Microsoft.VideoAnalyzer.UnsecuredEndpoint': 'UnsecuredEndpoint'} + "type": { + "#Microsoft.VideoAnalyzer.TlsEndpoint": "TlsEndpoint", + "#Microsoft.VideoAnalyzer.UnsecuredEndpoint": "UnsecuredEndpoint", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EndpointBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.credentials = kwargs['credentials'] - self.url = kwargs['url'] - self.tunnel = kwargs.get('tunnel', None) + self.credentials = kwargs["credentials"] + self.url = kwargs["url"] + self.tunnel = kwargs.get("tunnel", None) class ErrorAdditionalInfo(msrest.serialization.Model): @@ -909,19 +837,16 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -945,25 +870,22 @@ class ErrorDetail(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -980,15 +902,12 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.error = kwargs.get("error", None) class GroupLevelAccessControl(msrest.serialization.Model): @@ -1000,15 +919,12 @@ class GroupLevelAccessControl(msrest.serialization.Model): """ _attribute_map = { - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(GroupLevelAccessControl, self).__init__(**kwargs) - self.public_network_access = kwargs.get('public_network_access', None) + self.public_network_access = kwargs.get("public_network_access", None) class IotHub(msrest.serialization.Model): @@ -1027,24 +943,21 @@ class IotHub(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'identity': {'required': True}, - 'status': {'readonly': True}, + "id": {"required": True}, + "identity": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'status': {'key': 'status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "identity": {"key": "identity", "type": "ResourceIdentity"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(IotHub, self).__init__(**kwargs) - self.id = kwargs['id'] - self.identity = kwargs['identity'] + self.id = kwargs["id"] + self.identity = kwargs["identity"] self.status = None @@ -1071,27 +984,24 @@ class JwtAuthentication(AuthenticationBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'issuers': {'key': 'issuers', 'type': '[str]'}, - 'audiences': {'key': 'audiences', 'type': '[str]'}, - 'claims': {'key': 'claims', 'type': '[TokenClaim]'}, - 'keys': {'key': 'keys', 'type': '[TokenKey]'}, + "type": {"key": "@type", "type": "str"}, + "issuers": {"key": "issuers", "type": "[str]"}, + "audiences": {"key": "audiences", "type": "[str]"}, + "claims": {"key": "claims", "type": "[TokenClaim]"}, + "keys": {"key": "keys", "type": "[TokenKey]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(JwtAuthentication, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.JwtAuthentication' # type: str - self.issuers = kwargs.get('issuers', None) - self.audiences = kwargs.get('audiences', None) - self.claims = kwargs.get('claims', None) - self.keys = kwargs.get('keys', None) + self.type = "#Microsoft.VideoAnalyzer.JwtAuthentication" # type: str + self.issuers = kwargs.get("issuers", None) + self.audiences = kwargs.get("audiences", None) + self.claims = kwargs.get("claims", None) + self.keys = kwargs.get("keys", None) class KeyVaultProperties(msrest.serialization.Model): @@ -1111,21 +1021,18 @@ class KeyVaultProperties(msrest.serialization.Model): """ _validation = { - 'key_identifier': {'required': True}, - 'current_key_identifier': {'readonly': True}, + "key_identifier": {"required": True}, + "current_key_identifier": {"readonly": True}, } _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'current_key_identifier': {'key': 'currentKeyIdentifier', 'type': 'str'}, + "key_identifier": {"key": "keyIdentifier", "type": "str"}, + "current_key_identifier": {"key": "currentKeyIdentifier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(KeyVaultProperties, self).__init__(**kwargs) - self.key_identifier = kwargs['key_identifier'] + self.key_identifier = kwargs["key_identifier"] self.current_key_identifier = None @@ -1141,19 +1048,16 @@ class ListProvisioningTokenInput(msrest.serialization.Model): """ _validation = { - 'expiration_date': {'required': True}, + "expiration_date": {"required": True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ListProvisioningTokenInput, self).__init__(**kwargs) - self.expiration_date = kwargs['expiration_date'] + self.expiration_date = kwargs["expiration_date"] class LivePipeline(ProxyResource): @@ -1196,35 +1100,32 @@ class LivePipeline(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "bitrate_kbps": {"key": "properties.bitrateKbps", "type": "int"}, + "state": {"key": "properties.state", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LivePipeline, self).__init__(**kwargs) - self.topology_name = kwargs.get('topology_name', None) - self.description = kwargs.get('description', None) - self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + self.topology_name = kwargs.get("topology_name", None) + self.description = kwargs.get("description", None) + self.bitrate_kbps = kwargs.get("bitrate_kbps", None) self.state = None - self.parameters = kwargs.get('parameters', None) + self.parameters = kwargs.get("parameters", None) class LivePipelineCollection(msrest.serialization.Model): @@ -1238,17 +1139,14 @@ class LivePipelineCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[LivePipeline]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[LivePipeline]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LivePipelineCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class LivePipelineOperationStatus(msrest.serialization.Model): @@ -1265,21 +1163,18 @@ class LivePipelineOperationStatus(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, + "name": {"readonly": True}, + "status": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LivePipelineOperationStatus, self).__init__(**kwargs) self.name = None self.status = None @@ -1326,35 +1221,32 @@ class LivePipelineUpdate(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "bitrate_kbps": {"key": "properties.bitrateKbps", "type": "int"}, + "state": {"key": "properties.state", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LivePipelineUpdate, self).__init__(**kwargs) - self.topology_name = kwargs.get('topology_name', None) - self.description = kwargs.get('description', None) - self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + self.topology_name = kwargs.get("topology_name", None) + self.description = kwargs.get("description", None) + self.bitrate_kbps = kwargs.get("bitrate_kbps", None) self.state = None - self.parameters = kwargs.get('parameters', None) + self.parameters = kwargs.get("parameters", None) class LogSpecification(msrest.serialization.Model): @@ -1371,21 +1263,18 @@ class LogSpecification(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'blob_duration': {'readonly': True}, + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "blob_duration": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "blob_duration": {"key": "blobDuration", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LogSpecification, self).__init__(**kwargs) self.name = None self.display_name = None @@ -1406,21 +1295,18 @@ class MetricDimension(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'to_be_exported_for_shoebox': {'readonly': True}, + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "to_be_exported_for_shoebox": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "to_be_exported_for_shoebox": {"key": "toBeExportedForShoebox", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(MetricDimension, self).__init__(**kwargs) self.name = None self.display_name = None @@ -1461,38 +1347,35 @@ class MetricSpecification(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'display_description': {'readonly': True}, - 'unit': {'readonly': True}, - 'aggregation_type': {'readonly': True}, - 'lock_aggregation_type': {'readonly': True}, - 'dimensions': {'readonly': True}, - 'enable_regional_mdm_account': {'readonly': True}, - 'source_mdm_account': {'readonly': True}, - 'source_mdm_namespace': {'readonly': True}, - 'supported_time_grain_types': {'readonly': True}, + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "display_description": {"readonly": True}, + "unit": {"readonly": True}, + "aggregation_type": {"readonly": True}, + "lock_aggregation_type": {"readonly": True}, + "dimensions": {"readonly": True}, + "enable_regional_mdm_account": {"readonly": True}, + "source_mdm_account": {"readonly": True}, + "source_mdm_namespace": {"readonly": True}, + "supported_time_grain_types": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "display_description": {"key": "displayDescription", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "aggregation_type": {"key": "aggregationType", "type": "str"}, + "lock_aggregation_type": {"key": "lockAggregationType", "type": "str"}, + "supported_aggregation_types": {"key": "supportedAggregationTypes", "type": "[str]"}, + "dimensions": {"key": "dimensions", "type": "[MetricDimension]"}, + "enable_regional_mdm_account": {"key": "enableRegionalMdmAccount", "type": "bool"}, + "source_mdm_account": {"key": "sourceMdmAccount", "type": "str"}, + "source_mdm_namespace": {"key": "sourceMdmNamespace", "type": "str"}, + "supported_time_grain_types": {"key": "supportedTimeGrainTypes", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(MetricSpecification, self).__init__(**kwargs) self.name = None self.display_name = None @@ -1500,7 +1383,7 @@ def __init__( self.unit = None self.aggregation_type = None self.lock_aggregation_type = None - self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_aggregation_types = kwargs.get("supported_aggregation_types", None) self.dimensions = None self.enable_regional_mdm_account = None self.source_mdm_account = None @@ -1520,19 +1403,16 @@ class NetworkAccessControl(msrest.serialization.Model): """ _attribute_map = { - 'integration': {'key': 'integration', 'type': 'GroupLevelAccessControl'}, - 'ingestion': {'key': 'ingestion', 'type': 'GroupLevelAccessControl'}, - 'consumption': {'key': 'consumption', 'type': 'GroupLevelAccessControl'}, + "integration": {"key": "integration", "type": "GroupLevelAccessControl"}, + "ingestion": {"key": "ingestion", "type": "GroupLevelAccessControl"}, + "consumption": {"key": "consumption", "type": "GroupLevelAccessControl"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(NetworkAccessControl, self).__init__(**kwargs) - self.integration = kwargs.get('integration', None) - self.ingestion = kwargs.get('ingestion', None) - self.consumption = kwargs.get('consumption', None) + self.integration = kwargs.get("integration", None) + self.ingestion = kwargs.get("ingestion", None) + self.consumption = kwargs.get("consumption", None) class NodeInput(msrest.serialization.Model): @@ -1546,19 +1426,16 @@ class NodeInput(msrest.serialization.Model): """ _validation = { - 'node_name': {'required': True}, + "node_name": {"required": True}, } _attribute_map = { - 'node_name': {'key': 'nodeName', 'type': 'str'}, + "node_name": {"key": "nodeName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(NodeInput, self).__init__(**kwargs) - self.node_name = kwargs['node_name'] + self.node_name = kwargs["node_name"] class Operation(msrest.serialization.Model): @@ -1581,29 +1458,26 @@ class Operation(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Properties'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "properties": {"key": "properties", "type": "Properties"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "action_type": {"key": "actionType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Operation, self).__init__(**kwargs) - self.name = kwargs['name'] - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) - self.is_data_action = kwargs.get('is_data_action', None) - self.action_type = kwargs.get('action_type', None) + self.name = kwargs["name"] + self.display = kwargs.get("display", None) + self.origin = kwargs.get("origin", None) + self.properties = kwargs.get("properties", None) + self.is_data_action = kwargs.get("is_data_action", None) + self.action_type = kwargs.get("action_type", None) class OperationCollection(msrest.serialization.Model): @@ -1614,15 +1488,12 @@ class OperationCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, + "value": {"key": "value", "type": "[Operation]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(OperationCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class OperationDisplay(msrest.serialization.Model): @@ -1639,21 +1510,18 @@ class OperationDisplay(msrest.serialization.Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) + self.provider = kwargs.get("provider", None) + self.resource = kwargs.get("resource", None) + self.operation = kwargs.get("operation", None) + self.description = kwargs.get("description", None) class ParameterDeclaration(msrest.serialization.Model): @@ -1674,26 +1542,23 @@ class ParameterDeclaration(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'type': {'required': True}, + "name": {"required": True}, + "type": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "default": {"key": "default", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ParameterDeclaration, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type = kwargs['type'] - self.description = kwargs.get('description', None) - self.default = kwargs.get('default', None) + self.name = kwargs["name"] + self.type = kwargs["type"] + self.description = kwargs.get("description", None) + self.default = kwargs.get("default", None) class ParameterDefinition(msrest.serialization.Model): @@ -1708,21 +1573,18 @@ class ParameterDefinition(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ParameterDefinition, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs.get('value', None) + self.name = kwargs["name"] + self.value = kwargs.get("value", None) class PemCertificateList(CertificateSource): @@ -1737,22 +1599,19 @@ class PemCertificateList(CertificateSource): """ _validation = { - 'type': {'required': True}, - 'certificates': {'required': True}, + "type": {"required": True}, + "certificates": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'certificates': {'key': 'certificates', 'type': '[str]'}, + "type": {"key": "@type", "type": "str"}, + "certificates": {"key": "certificates", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PemCertificateList, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str - self.certificates = kwargs['certificates'] + self.type = "#Microsoft.VideoAnalyzer.PemCertificateList" # type: str + self.certificates = kwargs["certificates"] class PipelineJob(ProxyResource): @@ -1792,39 +1651,36 @@ class PipelineJob(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, - 'expiration': {'readonly': True}, - 'error': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, + "expiration": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, - 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "state": {"key": "properties.state", "type": "str"}, + "expiration": {"key": "properties.expiration", "type": "iso-8601"}, + "error": {"key": "properties.error", "type": "PipelineJobError"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineJob, self).__init__(**kwargs) - self.topology_name = kwargs.get('topology_name', None) - self.description = kwargs.get('description', None) + self.topology_name = kwargs.get("topology_name", None) + self.description = kwargs.get("description", None) self.state = None self.expiration = None self.error = None - self.parameters = kwargs.get('parameters', None) + self.parameters = kwargs.get("parameters", None) class PipelineJobCollection(msrest.serialization.Model): @@ -1838,17 +1694,14 @@ class PipelineJobCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineJob]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[PipelineJob]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineJobCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class PipelineJobError(msrest.serialization.Model): @@ -1861,17 +1714,14 @@ class PipelineJobError(msrest.serialization.Model): """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineJobError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + self.code = kwargs.get("code", None) + self.message = kwargs.get("message", None) class PipelineJobOperationStatus(msrest.serialization.Model): @@ -1888,21 +1738,18 @@ class PipelineJobOperationStatus(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, + "name": {"readonly": True}, + "status": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineJobOperationStatus, self).__init__(**kwargs) self.name = None self.status = None @@ -1946,123 +1793,117 @@ class PipelineJobUpdate(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, - 'expiration': {'readonly': True}, - 'error': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, + "expiration": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, - 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "state": {"key": "properties.state", "type": "str"}, + "expiration": {"key": "properties.expiration", "type": "iso-8601"}, + "error": {"key": "properties.error", "type": "PipelineJobError"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineJobUpdate, self).__init__(**kwargs) - self.topology_name = kwargs.get('topology_name', None) - self.description = kwargs.get('description', None) + self.topology_name = kwargs.get("topology_name", None) + self.description = kwargs.get("description", None) self.state = None self.expiration = None self.error = None - self.parameters = kwargs.get('parameters', None) + self.parameters = kwargs.get("parameters", None) class PipelineTopology(ProxyResource): """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. -* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~video_analyzer.models.SystemData - :param kind: Required. Topology kind. Possible values include: "Live", "Batch". - :type kind: str or ~video_analyzer.models.Kind - :param sku: Required. Describes the properties of a SKU. - :type sku: ~video_analyzer.models.Sku - :param description: An optional description of the pipeline topology. It is recommended that - the expected use of the topology to be described here. - :type description: str - :param parameters: List of the topology parameter declarations. Parameters declared here can be - referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. - Parameters can have optional default values and can later be defined in individual instances of - the pipeline. - :type parameters: list[~video_analyzer.models.ParameterDeclaration] - :param sources: List of the topology source nodes. Source nodes enable external data to be - ingested by the pipeline. - :type sources: list[~video_analyzer.models.SourceNodeBase] - :param processors: List of the topology processor nodes. Processor nodes enable pipeline data - to be analyzed, processed or transformed. - :type processors: list[~video_analyzer.models.ProcessorNodeBase] - :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or - exported. - :type sinks: list[~video_analyzer.models.SinkNodeBase] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'kind': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, - 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, - 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, - 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, - } - - def __init__( - self, - **kwargs - ): + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + * Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Required. Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Required. Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "kind": {"required": True}, + "sku": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "kind": {"key": "kind", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "description": {"key": "properties.description", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDeclaration]"}, + "sources": {"key": "properties.sources", "type": "[SourceNodeBase]"}, + "processors": {"key": "properties.processors", "type": "[ProcessorNodeBase]"}, + "sinks": {"key": "properties.sinks", "type": "[SinkNodeBase]"}, + } + + def __init__(self, **kwargs): super(PipelineTopology, self).__init__(**kwargs) - self.kind = kwargs['kind'] - self.sku = kwargs['sku'] - self.description = kwargs.get('description', None) - self.parameters = kwargs.get('parameters', None) - self.sources = kwargs.get('sources', None) - self.processors = kwargs.get('processors', None) - self.sinks = kwargs.get('sinks', None) + self.kind = kwargs["kind"] + self.sku = kwargs["sku"] + self.description = kwargs.get("description", None) + self.parameters = kwargs.get("parameters", None) + self.sources = kwargs.get("sources", None) + self.processors = kwargs.get("processors", None) + self.sinks = kwargs.get("sinks", None) class PipelineTopologyCollection(msrest.serialization.Model): @@ -2076,97 +1917,91 @@ class PipelineTopologyCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineTopology]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[PipelineTopology]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineTopologyCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class PipelineTopologyUpdate(ProxyResource): """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. -* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~video_analyzer.models.SystemData - :param kind: Topology kind. Possible values include: "Live", "Batch". - :type kind: str or ~video_analyzer.models.Kind - :param sku: Describes the properties of a SKU. - :type sku: ~video_analyzer.models.Sku - :param description: An optional description of the pipeline topology. It is recommended that - the expected use of the topology to be described here. - :type description: str - :param parameters: List of the topology parameter declarations. Parameters declared here can be - referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. - Parameters can have optional default values and can later be defined in individual instances of - the pipeline. - :type parameters: list[~video_analyzer.models.ParameterDeclaration] - :param sources: List of the topology source nodes. Source nodes enable external data to be - ingested by the pipeline. - :type sources: list[~video_analyzer.models.SourceNodeBase] - :param processors: List of the topology processor nodes. Processor nodes enable pipeline data - to be analyzed, processed or transformed. - :type processors: list[~video_analyzer.models.ProcessorNodeBase] - :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or - exported. - :type sinks: list[~video_analyzer.models.SinkNodeBase] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, - 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, - 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, - 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, - } - - def __init__( - self, - **kwargs - ): + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + * Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "kind": {"key": "kind", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "description": {"key": "properties.description", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDeclaration]"}, + "sources": {"key": "properties.sources", "type": "[SourceNodeBase]"}, + "processors": {"key": "properties.processors", "type": "[ProcessorNodeBase]"}, + "sinks": {"key": "properties.sinks", "type": "[SinkNodeBase]"}, + } + + def __init__(self, **kwargs): super(PipelineTopologyUpdate, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.sku = kwargs.get('sku', None) - self.description = kwargs.get('description', None) - self.parameters = kwargs.get('parameters', None) - self.sources = kwargs.get('sources', None) - self.processors = kwargs.get('processors', None) - self.sinks = kwargs.get('sinks', None) + self.kind = kwargs.get("kind", None) + self.sku = kwargs.get("sku", None) + self.description = kwargs.get("description", None) + self.parameters = kwargs.get("parameters", None) + self.sources = kwargs.get("sources", None) + self.processors = kwargs.get("processors", None) + self.sinks = kwargs.get("sinks", None) class PrivateEndpoint(msrest.serialization.Model): @@ -2179,17 +2014,14 @@ class PrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, + "id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateEndpoint, self).__init__(**kwargs) self.id = None @@ -2223,30 +2055,30 @@ class PrivateEndpointConnection(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpoint"}, + "private_link_service_connection_state": { + "key": "properties.privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionState", + }, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.private_endpoint = kwargs.get("private_endpoint", None) + self.private_link_service_connection_state = kwargs.get("private_link_service_connection_state", None) self.provisioning_state = None @@ -2258,15 +2090,12 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class PrivateLinkResource(Resource): @@ -2294,32 +2123,29 @@ class PrivateLinkResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "group_id": {"readonly": True}, + "required_members": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "group_id": {"key": "properties.groupId", "type": "str"}, + "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, + "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateLinkResource, self).__init__(**kwargs) self.group_id = None self.required_members = None - self.required_zone_names = kwargs.get('required_zone_names', None) + self.required_zone_names = kwargs.get("required_zone_names", None) class PrivateLinkResourceListResult(msrest.serialization.Model): @@ -2330,15 +2156,12 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateLinkResourceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class PrivateLinkServiceConnectionState(msrest.serialization.Model): @@ -2355,19 +2178,16 @@ class PrivateLinkServiceConnectionState(msrest.serialization.Model): """ _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = kwargs.get('actions_required', None) + self.status = kwargs.get("status", None) + self.description = kwargs.get("description", None) + self.actions_required = kwargs.get("actions_required", None) class Properties(msrest.serialization.Model): @@ -2380,17 +2200,14 @@ class Properties(msrest.serialization.Model): """ _validation = { - 'service_specification': {'readonly': True}, + "service_specification": {"readonly": True}, } _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + "service_specification": {"key": "serviceSpecification", "type": "ServiceSpecification"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Properties, self).__init__(**kwargs) self.service_specification = None @@ -2406,19 +2223,16 @@ class ResourceIdentity(msrest.serialization.Model): """ _validation = { - 'user_assigned_identity': {'required': True}, + "user_assigned_identity": {"required": True}, } _attribute_map = { - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + "user_assigned_identity": {"key": "userAssignedIdentity", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ResourceIdentity, self).__init__(**kwargs) - self.user_assigned_identity = kwargs['user_assigned_identity'] + self.user_assigned_identity = kwargs["user_assigned_identity"] class RsaTokenKey(TokenKey): @@ -2441,30 +2255,27 @@ class RsaTokenKey(TokenKey): """ _validation = { - 'type': {'required': True}, - 'kid': {'required': True}, - 'alg': {'required': True}, - 'n': {'required': True}, - 'e': {'required': True}, + "type": {"required": True}, + "kid": {"required": True}, + "alg": {"required": True}, + "n": {"required": True}, + "e": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, - 'alg': {'key': 'alg', 'type': 'str'}, - 'n': {'key': 'n', 'type': 'str'}, - 'e': {'key': 'e', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "kid": {"key": "kid", "type": "str"}, + "alg": {"key": "alg", "type": "str"}, + "n": {"key": "n", "type": "str"}, + "e": {"key": "e", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RsaTokenKey, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.RsaTokenKey' # type: str - self.alg = kwargs['alg'] - self.n = kwargs['n'] - self.e = kwargs['e'] + self.type = "#Microsoft.VideoAnalyzer.RsaTokenKey" # type: str + self.alg = kwargs["alg"] + self.n = kwargs["n"] + self.e = kwargs["e"] class SourceNodeBase(NodeBase): @@ -2482,25 +2293,25 @@ class SourceNodeBase(NodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.RtspSource': 'RtspSource', '#Microsoft.VideoAnalyzer.VideoSource': 'VideoSource'} + "type": { + "#Microsoft.VideoAnalyzer.RtspSource": "RtspSource", + "#Microsoft.VideoAnalyzer.VideoSource": "VideoSource", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SourceNodeBase, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SourceNodeBase' # type: str + self.type = "#Microsoft.VideoAnalyzer.SourceNodeBase" # type: str class RtspSource(SourceNodeBase): @@ -2525,26 +2336,23 @@ class RtspSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'endpoint': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "endpoint": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'transport': {'key': 'transport', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "transport": {"key": "transport", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(RtspSource, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str - self.transport = kwargs.get('transport', None) - self.endpoint = kwargs['endpoint'] + self.type = "#Microsoft.VideoAnalyzer.RtspSource" # type: str + self.transport = kwargs.get("transport", None) + self.endpoint = kwargs["endpoint"] class TunnelBase(msrest.serialization.Model): @@ -2560,21 +2368,16 @@ class TunnelBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel': 'SecureIotDeviceRemoteTunnel'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel": "SecureIotDeviceRemoteTunnel"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TunnelBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -2594,25 +2397,22 @@ class SecureIotDeviceRemoteTunnel(TunnelBase): """ _validation = { - 'type': {'required': True}, - 'iot_hub_name': {'required': True}, - 'device_id': {'required': True}, + "type": {"required": True}, + "iot_hub_name": {"required": True}, + "device_id": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, - 'device_id': {'key': 'deviceId', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "iot_hub_name": {"key": "iotHubName", "type": "str"}, + "device_id": {"key": "deviceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SecureIotDeviceRemoteTunnel, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel' # type: str - self.iot_hub_name = kwargs['iot_hub_name'] - self.device_id = kwargs['device_id'] + self.type = "#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel" # type: str + self.iot_hub_name = kwargs["iot_hub_name"] + self.device_id = kwargs["device_id"] class ServiceSpecification(msrest.serialization.Model): @@ -2627,19 +2427,16 @@ class ServiceSpecification(msrest.serialization.Model): """ _validation = { - 'log_specifications': {'readonly': True}, - 'metric_specifications': {'readonly': True}, + "log_specifications": {"readonly": True}, + "metric_specifications": {"readonly": True}, } _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + "log_specifications": {"key": "logSpecifications", "type": "[LogSpecification]"}, + "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecification]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ServiceSpecification, self).__init__(**kwargs) self.log_specifications = None self.metric_specifications = None @@ -2663,28 +2460,23 @@ class SinkNodeBase(NodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.VideoSink': 'VideoSink'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.VideoSink": "VideoSink"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SinkNodeBase, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SinkNodeBase' # type: str - self.inputs = kwargs['inputs'] + self.type = "#Microsoft.VideoAnalyzer.SinkNodeBase" # type: str + self.inputs = kwargs["inputs"] class Sku(msrest.serialization.Model): @@ -2701,21 +2493,18 @@ class Sku(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, + "name": {"required": True}, + "tier": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] + self.name = kwargs["name"] self.tier = None @@ -2737,23 +2526,20 @@ class StorageAccount(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'status': {'readonly': True}, + "id": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'status': {'key': 'status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "identity": {"key": "identity", "type": "ResourceIdentity"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(StorageAccount, self).__init__(**kwargs) - self.id = kwargs['id'] - self.identity = kwargs.get('identity', None) + self.id = kwargs["id"] + self.identity = kwargs.get("identity", None) self.status = None @@ -2777,25 +2563,22 @@ class SystemData(msrest.serialization.Model): """ _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) + self.created_by = kwargs.get("created_by", None) + self.created_by_type = kwargs.get("created_by_type", None) + self.created_at = kwargs.get("created_at", None) + self.last_modified_by = kwargs.get("last_modified_by", None) + self.last_modified_by_type = kwargs.get("last_modified_by_type", None) + self.last_modified_at = kwargs.get("last_modified_at", None) class TimeSequenceBase(msrest.serialization.Model): @@ -2811,21 +2594,18 @@ class TimeSequenceBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers': 'VideoSequenceAbsoluteTimeMarkers'} + "type": {"#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers": "VideoSequenceAbsoluteTimeMarkers"} } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TimeSequenceBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -2854,28 +2634,25 @@ class TlsEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'credentials': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "credentials": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, - 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'CertificateSource'}, - 'validation_options': {'key': 'validationOptions', 'type': 'TlsValidationOptions'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "tunnel": {"key": "tunnel", "type": "TunnelBase"}, + "trusted_certificates": {"key": "trustedCertificates", "type": "CertificateSource"}, + "validation_options": {"key": "validationOptions", "type": "TlsValidationOptions"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TlsEndpoint, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str - self.trusted_certificates = kwargs.get('trusted_certificates', None) - self.validation_options = kwargs.get('validation_options', None) + self.type = "#Microsoft.VideoAnalyzer.TlsEndpoint" # type: str + self.trusted_certificates = kwargs.get("trusted_certificates", None) + self.validation_options = kwargs.get("validation_options", None) class TlsValidationOptions(msrest.serialization.Model): @@ -2890,17 +2667,14 @@ class TlsValidationOptions(msrest.serialization.Model): """ _attribute_map = { - 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, - 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + "ignore_hostname": {"key": "ignoreHostname", "type": "str"}, + "ignore_signature": {"key": "ignoreSignature", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TlsValidationOptions, self).__init__(**kwargs) - self.ignore_hostname = kwargs.get('ignore_hostname', None) - self.ignore_signature = kwargs.get('ignore_signature', None) + self.ignore_hostname = kwargs.get("ignore_hostname", None) + self.ignore_signature = kwargs.get("ignore_signature", None) class TokenClaim(msrest.serialization.Model): @@ -2915,22 +2689,19 @@ class TokenClaim(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TokenClaim, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs['value'] + self.name = kwargs["name"] + self.value = kwargs["value"] class TrackedResource(Resource): @@ -2958,29 +2729,26 @@ class TrackedResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs['location'] + self.tags = kwargs.get("tags", None) + self.location = kwargs["location"] class UnsecuredEndpoint(EndpointBase): @@ -3000,24 +2768,21 @@ class UnsecuredEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'credentials': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "credentials": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "tunnel": {"key": "tunnel", "type": "TunnelBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(UnsecuredEndpoint, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str + self.type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint" # type: str class UserAssignedManagedIdentity(msrest.serialization.Model): @@ -3032,19 +2797,16 @@ class UserAssignedManagedIdentity(msrest.serialization.Model): """ _validation = { - 'client_id': {'readonly': True}, - 'principal_id': {'readonly': True}, + "client_id": {"readonly": True}, + "principal_id": {"readonly": True}, } _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(UserAssignedManagedIdentity, self).__init__(**kwargs) self.client_id = None self.principal_id = None @@ -3066,25 +2828,22 @@ class UsernamePasswordCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'username': {'required': True}, - 'password': {'required': True}, + "type": {"required": True}, + "username": {"required": True}, + "password": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password": {"key": "password", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(UsernamePasswordCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str - self.username = kwargs['username'] - self.password = kwargs['password'] + self.type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials" # type: str + self.username = kwargs["username"] + self.password = kwargs["password"] class VideoAnalyzer(TrackedResource): @@ -3133,46 +2892,46 @@ class VideoAnalyzer(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'endpoints': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "endpoints": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, - 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, - 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "VideoAnalyzerIdentity"}, + "storage_accounts": {"key": "properties.storageAccounts", "type": "[StorageAccount]"}, + "endpoints": {"key": "properties.endpoints", "type": "[Endpoint]"}, + "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, + "iot_hubs": {"key": "properties.iotHubs", "type": "[IotHub]"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "network_access_control": {"key": "properties.networkAccessControl", "type": "NetworkAccessControl"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "private_endpoint_connections": { + "key": "properties.privateEndpointConnections", + "type": "[PrivateEndpointConnection]", + }, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoAnalyzer, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.storage_accounts = kwargs.get('storage_accounts', None) + self.identity = kwargs.get("identity", None) + self.storage_accounts = kwargs.get("storage_accounts", None) self.endpoints = None - self.encryption = kwargs.get('encryption', None) - self.iot_hubs = kwargs.get('iot_hubs', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.network_access_control = kwargs.get('network_access_control', None) + self.encryption = kwargs.get("encryption", None) + self.iot_hubs = kwargs.get("iot_hubs", None) + self.public_network_access = kwargs.get("public_network_access", None) + self.network_access_control = kwargs.get("network_access_control", None) self.provisioning_state = None self.private_endpoint_connections = None @@ -3185,15 +2944,12 @@ class VideoAnalyzerCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[VideoAnalyzer]'}, + "value": {"key": "value", "type": "[VideoAnalyzer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoAnalyzerCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class VideoAnalyzerIdentity(msrest.serialization.Model): @@ -3208,21 +2964,18 @@ class VideoAnalyzerIdentity(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedManagedIdentity}'}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedManagedIdentity}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoAnalyzerIdentity, self).__init__(**kwargs) - self.type = kwargs['type'] - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + self.type = kwargs["type"] + self.user_assigned_identities = kwargs.get("user_assigned_identities", None) class VideoAnalyzerOperationStatus(msrest.serialization.Model): @@ -3245,29 +2998,26 @@ class VideoAnalyzerOperationStatus(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "end_time": {"key": "endTime", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoAnalyzerOperationStatus, self).__init__(**kwargs) - self.name = kwargs['name'] - self.id = kwargs.get('id', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) + self.name = kwargs["name"] + self.id = kwargs.get("id", None) + self.start_time = kwargs.get("start_time", None) + self.end_time = kwargs.get("end_time", None) + self.status = kwargs.get("status", None) + self.error = kwargs.get("error", None) class VideoAnalyzerPrivateEndpointConnectionOperationStatus(msrest.serialization.Model): @@ -3290,29 +3040,26 @@ class VideoAnalyzerPrivateEndpointConnectionOperationStatus(msrest.serialization """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "end_time": {"key": "endTime", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoAnalyzerPrivateEndpointConnectionOperationStatus, self).__init__(**kwargs) - self.name = kwargs['name'] - self.id = kwargs.get('id', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) + self.name = kwargs["name"] + self.id = kwargs.get("id", None) + self.start_time = kwargs.get("start_time", None) + self.end_time = kwargs.get("end_time", None) + self.status = kwargs.get("status", None) + self.error = kwargs.get("error", None) class VideoAnalyzerUpdate(msrest.serialization.Model): @@ -3346,37 +3093,37 @@ class VideoAnalyzerUpdate(msrest.serialization.Model): """ _validation = { - 'endpoints': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, + "endpoints": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, - 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, - 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "VideoAnalyzerIdentity"}, + "storage_accounts": {"key": "properties.storageAccounts", "type": "[StorageAccount]"}, + "endpoints": {"key": "properties.endpoints", "type": "[Endpoint]"}, + "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, + "iot_hubs": {"key": "properties.iotHubs", "type": "[IotHub]"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "network_access_control": {"key": "properties.networkAccessControl", "type": "NetworkAccessControl"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "private_endpoint_connections": { + "key": "properties.privateEndpointConnections", + "type": "[PrivateEndpointConnection]", + }, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoAnalyzerUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.storage_accounts = kwargs.get('storage_accounts', None) + self.tags = kwargs.get("tags", None) + self.identity = kwargs.get("identity", None) + self.storage_accounts = kwargs.get("storage_accounts", None) self.endpoints = None - self.encryption = kwargs.get('encryption', None) - self.iot_hubs = kwargs.get('iot_hubs', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.network_access_control = kwargs.get('network_access_control', None) + self.encryption = kwargs.get("encryption", None) + self.iot_hubs = kwargs.get("iot_hubs", None) + self.public_network_access = kwargs.get("public_network_access", None) + self.network_access_control = kwargs.get("network_access_control", None) self.provisioning_state = None self.private_endpoint_connections = None @@ -3393,19 +3140,16 @@ class VideoArchival(msrest.serialization.Model): """ _attribute_map = { - 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + "retention_period": {"key": "retentionPeriod", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoArchival, self).__init__(**kwargs) - self.retention_period = kwargs.get('retention_period', None) + self.retention_period = kwargs.get("retention_period", None) class VideoContentToken(msrest.serialization.Model): - """"Video content token grants access to the video content URLs.". + """ "Video content token grants access to the video content URLs.". Variables are only populated by the server, and will be ignored when sending a request. @@ -3418,19 +3162,16 @@ class VideoContentToken(msrest.serialization.Model): """ _validation = { - 'expiration_date': {'readonly': True}, - 'token': {'readonly': True}, + "expiration_date": {"readonly": True}, + "token": {"readonly": True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'token': {'key': 'token', 'type': 'str'}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, + "token": {"key": "token", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoContentToken, self).__init__(**kwargs) self.expiration_date = None self.token = None @@ -3448,13 +3189,13 @@ class VideoContentUrls(msrest.serialization.Model): automatically played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the video content authorization token on any compatible DASH or HLS players by appending the following to the base URL: - + .. code-block:: - + - HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: /manifest(format=mpd-time-cmaf) - + Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately double of the chosen video segment length. It is available when the video type is 'archive' and video archiving is enabled. @@ -3473,21 +3214,18 @@ class VideoContentUrls(msrest.serialization.Model): """ _attribute_map = { - 'download_url': {'key': 'downloadUrl', 'type': 'str'}, - 'archive_base_url': {'key': 'archiveBaseUrl', 'type': 'str'}, - 'rtsp_tunnel_url': {'key': 'rtspTunnelUrl', 'type': 'str'}, - 'preview_image_urls': {'key': 'previewImageUrls', 'type': 'VideoPreviewImageUrls'}, + "download_url": {"key": "downloadUrl", "type": "str"}, + "archive_base_url": {"key": "archiveBaseUrl", "type": "str"}, + "rtsp_tunnel_url": {"key": "rtspTunnelUrl", "type": "str"}, + "preview_image_urls": {"key": "previewImageUrls", "type": "VideoPreviewImageUrls"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoContentUrls, self).__init__(**kwargs) - self.download_url = kwargs.get('download_url', None) - self.archive_base_url = kwargs.get('archive_base_url', None) - self.rtsp_tunnel_url = kwargs.get('rtsp_tunnel_url', None) - self.preview_image_urls = kwargs.get('preview_image_urls', None) + self.download_url = kwargs.get("download_url", None) + self.archive_base_url = kwargs.get("archive_base_url", None) + self.rtsp_tunnel_url = kwargs.get("rtsp_tunnel_url", None) + self.preview_image_urls = kwargs.get("preview_image_urls", None) class VideoCreationProperties(msrest.serialization.Model): @@ -3516,21 +3254,18 @@ class VideoCreationProperties(msrest.serialization.Model): """ _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, - 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + "title": {"key": "title", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "segment_length": {"key": "segmentLength", "type": "str"}, + "retention_period": {"key": "retentionPeriod", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoCreationProperties, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.segment_length = kwargs.get('segment_length', None) - self.retention_period = kwargs.get('retention_period', None) + self.title = kwargs.get("title", None) + self.description = kwargs.get("description", None) + self.segment_length = kwargs.get("segment_length", None) + self.retention_period = kwargs.get("retention_period", None) class VideoEncoderBase(msrest.serialization.Model): @@ -3557,29 +3292,24 @@ class VideoEncoderBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, - 'frame_rate': {'key': 'frameRate', 'type': 'str'}, - 'scale': {'key': 'scale', 'type': 'VideoScale'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, + "frame_rate": {"key": "frameRate", "type": "str"}, + "scale": {"key": "scale", "type": "VideoScale"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.VideoEncoderH264': 'VideoEncoderH264'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.VideoEncoderH264": "VideoEncoderH264"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoEncoderBase, self).__init__(**kwargs) self.type = None # type: Optional[str] - self.bitrate_kbps = kwargs.get('bitrate_kbps', None) - self.frame_rate = kwargs.get('frame_rate', None) - self.scale = kwargs.get('scale', None) + self.bitrate_kbps = kwargs.get("bitrate_kbps", None) + self.frame_rate = kwargs.get("frame_rate", None) + self.scale = kwargs.get("scale", None) class VideoEncoderH264(VideoEncoderBase): @@ -3603,22 +3333,19 @@ class VideoEncoderH264(VideoEncoderBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, - 'frame_rate': {'key': 'frameRate', 'type': 'str'}, - 'scale': {'key': 'scale', 'type': 'VideoScale'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, + "frame_rate": {"key": "frameRate", "type": "str"}, + "scale": {"key": "scale", "type": "VideoScale"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoEncoderH264, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoEncoderH264' # type: str + self.type = "#Microsoft.VideoAnalyzer.VideoEncoderH264" # type: str class VideoEntity(ProxyResource): @@ -3658,41 +3385,38 @@ class VideoEntity(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'type_properties_type': {'readonly': True}, - 'flags': {'readonly': True}, - 'content_urls': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "type_properties_type": {"readonly": True}, + "flags": {"readonly": True}, + "content_urls": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, - 'flags': {'key': 'properties.flags', 'type': 'VideoFlags'}, - 'content_urls': {'key': 'properties.contentUrls', 'type': 'VideoContentUrls'}, - 'media_info': {'key': 'properties.mediaInfo', 'type': 'VideoMediaInfo'}, - 'archival': {'key': 'properties.archival', 'type': 'VideoArchival'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "title": {"key": "properties.title", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "type_properties_type": {"key": "properties.type", "type": "str"}, + "flags": {"key": "properties.flags", "type": "VideoFlags"}, + "content_urls": {"key": "properties.contentUrls", "type": "VideoContentUrls"}, + "media_info": {"key": "properties.mediaInfo", "type": "VideoMediaInfo"}, + "archival": {"key": "properties.archival", "type": "VideoArchival"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoEntity, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) + self.title = kwargs.get("title", None) + self.description = kwargs.get("description", None) self.type_properties_type = None self.flags = None self.content_urls = None - self.media_info = kwargs.get('media_info', None) - self.archival = kwargs.get('archival', None) + self.media_info = kwargs.get("media_info", None) + self.archival = kwargs.get("archival", None) class VideoEntityCollection(msrest.serialization.Model): @@ -3706,17 +3430,14 @@ class VideoEntityCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[VideoEntity]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[VideoEntity]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoEntityCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class VideoFlags(msrest.serialization.Model): @@ -3738,25 +3459,22 @@ class VideoFlags(msrest.serialization.Model): """ _validation = { - 'can_stream': {'required': True}, - 'has_data': {'required': True}, - 'is_in_use': {'required': True}, + "can_stream": {"required": True}, + "has_data": {"required": True}, + "is_in_use": {"required": True}, } _attribute_map = { - 'can_stream': {'key': 'canStream', 'type': 'bool'}, - 'has_data': {'key': 'hasData', 'type': 'bool'}, - 'is_in_use': {'key': 'isInUse', 'type': 'bool'}, + "can_stream": {"key": "canStream", "type": "bool"}, + "has_data": {"key": "hasData", "type": "bool"}, + "is_in_use": {"key": "isInUse", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoFlags, self).__init__(**kwargs) - self.can_stream = kwargs['can_stream'] - self.has_data = kwargs['has_data'] - self.is_in_use = kwargs['is_in_use'] + self.can_stream = kwargs["can_stream"] + self.has_data = kwargs["has_data"] + self.is_in_use = kwargs["is_in_use"] class VideoMediaInfo(msrest.serialization.Model): @@ -3772,15 +3490,12 @@ class VideoMediaInfo(msrest.serialization.Model): """ _attribute_map = { - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + "segment_length": {"key": "segmentLength", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoMediaInfo, self).__init__(**kwargs) - self.segment_length = kwargs.get('segment_length', None) + self.segment_length = kwargs.get("segment_length", None) class VideoPreviewImageUrls(msrest.serialization.Model): @@ -3795,19 +3510,16 @@ class VideoPreviewImageUrls(msrest.serialization.Model): """ _attribute_map = { - 'small': {'key': 'small', 'type': 'str'}, - 'medium': {'key': 'medium', 'type': 'str'}, - 'large': {'key': 'large', 'type': 'str'}, + "small": {"key": "small", "type": "str"}, + "medium": {"key": "medium", "type": "str"}, + "large": {"key": "large", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoPreviewImageUrls, self).__init__(**kwargs) - self.small = kwargs.get('small', None) - self.medium = kwargs.get('medium', None) - self.large = kwargs.get('large', None) + self.small = kwargs.get("small", None) + self.medium = kwargs.get("medium", None) + self.large = kwargs.get("large", None) class VideoPublishingOptions(msrest.serialization.Model): @@ -3825,17 +3537,14 @@ class VideoPublishingOptions(msrest.serialization.Model): """ _attribute_map = { - 'disable_archive': {'key': 'disableArchive', 'type': 'str'}, - 'disable_rtsp_publishing': {'key': 'disableRtspPublishing', 'type': 'str'}, + "disable_archive": {"key": "disableArchive", "type": "str"}, + "disable_rtsp_publishing": {"key": "disableRtspPublishing", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoPublishingOptions, self).__init__(**kwargs) - self.disable_archive = kwargs.get('disable_archive', None) - self.disable_rtsp_publishing = kwargs.get('disable_rtsp_publishing', None) + self.disable_archive = kwargs.get("disable_archive", None) + self.disable_rtsp_publishing = kwargs.get("disable_rtsp_publishing", None) class VideoScale(msrest.serialization.Model): @@ -3853,19 +3562,16 @@ class VideoScale(msrest.serialization.Model): """ _attribute_map = { - 'height': {'key': 'height', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, + "height": {"key": "height", "type": "str"}, + "width": {"key": "width", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoScale, self).__init__(**kwargs) - self.height = kwargs.get('height', None) - self.width = kwargs.get('width', None) - self.mode = kwargs.get('mode', None) + self.height = kwargs.get("height", None) + self.width = kwargs.get("width", None) + self.mode = kwargs.get("mode", None) class VideoSequenceAbsoluteTimeMarkers(TimeSequenceBase): @@ -3881,22 +3587,19 @@ class VideoSequenceAbsoluteTimeMarkers(TimeSequenceBase): """ _validation = { - 'type': {'required': True}, - 'ranges': {'required': True}, + "type": {"required": True}, + "ranges": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'ranges': {'key': 'ranges', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "ranges": {"key": "ranges", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoSequenceAbsoluteTimeMarkers, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers' # type: str - self.ranges = kwargs['ranges'] + self.type = "#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers" # type: str + self.ranges = kwargs["ranges"] class VideoSink(SinkNodeBase): @@ -3924,30 +3627,27 @@ class VideoSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'video_name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "video_name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'video_name': {'key': 'videoName', 'type': 'str'}, - 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, - 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "video_name": {"key": "videoName", "type": "str"}, + "video_creation_properties": {"key": "videoCreationProperties", "type": "VideoCreationProperties"}, + "video_publishing_options": {"key": "videoPublishingOptions", "type": "VideoPublishingOptions"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoSink, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str - self.video_name = kwargs['video_name'] - self.video_creation_properties = kwargs.get('video_creation_properties', None) - self.video_publishing_options = kwargs.get('video_publishing_options', None) + self.type = "#Microsoft.VideoAnalyzer.VideoSink" # type: str + self.video_name = kwargs["video_name"] + self.video_creation_properties = kwargs.get("video_creation_properties", None) + self.video_publishing_options = kwargs.get("video_publishing_options", None) class VideoSource(SourceNodeBase): @@ -3968,24 +3668,21 @@ class VideoSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'video_name': {'required': True}, - 'time_sequences': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "video_name": {"required": True}, + "time_sequences": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'video_name': {'key': 'videoName', 'type': 'str'}, - 'time_sequences': {'key': 'timeSequences', 'type': 'TimeSequenceBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "video_name": {"key": "videoName", "type": "str"}, + "time_sequences": {"key": "timeSequences", "type": "TimeSequenceBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoSource, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSource' # type: str - self.video_name = kwargs['video_name'] - self.time_sequences = kwargs['time_sequences'] + self.type = "#Microsoft.VideoAnalyzer.VideoSource" # type: str + self.video_name = kwargs["video_name"] + self.time_sequences = kwargs["time_sequences"] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py index ef25e8dafefc..37268b5eb3fb 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py @@ -34,23 +34,20 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -77,23 +74,20 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) @@ -121,19 +115,19 @@ class AccessPolicyEntity(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'role': {'key': 'properties.role', 'type': 'str'}, - 'authentication': {'key': 'properties.authentication', 'type': 'AuthenticationBase'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "role": {"key": "properties.role", "type": "str"}, + "authentication": {"key": "properties.authentication", "type": "AuthenticationBase"}, } def __init__( @@ -159,16 +153,12 @@ class AccessPolicyEntityCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[AccessPolicyEntity]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[AccessPolicyEntity]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } def __init__( - self, - *, - value: Optional[List["AccessPolicyEntity"]] = None, - next_link: Optional[str] = None, - **kwargs + self, *, value: Optional[List["AccessPolicyEntity"]] = None, next_link: Optional[str] = None, **kwargs ): super(AccessPolicyEntityCollection, self).__init__(**kwargs) self.value = value @@ -194,15 +184,15 @@ class AccountEncryption(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'status': {'readonly': True}, + "type": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'status': {'key': 'status', 'type': 'str'}, + "type": {"key": "type", "type": "str"}, + "key_vault_properties": {"key": "keyVaultProperties", "type": "KeyVaultProperties"}, + "identity": {"key": "identity", "type": "ResourceIdentity"}, + "status": {"key": "status", "type": "str"}, } def __init__( @@ -237,24 +227,17 @@ class AudioEncoderBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.AudioEncoderAac': 'AudioEncoderAac'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.AudioEncoderAac": "AudioEncoderAac"}} - def __init__( - self, - *, - bitrate_kbps: Optional[str] = None, - **kwargs - ): + def __init__(self, *, bitrate_kbps: Optional[str] = None, **kwargs): super(AudioEncoderBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.bitrate_kbps = bitrate_kbps @@ -274,22 +257,17 @@ class AudioEncoderAac(AudioEncoderBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, } - def __init__( - self, - *, - bitrate_kbps: Optional[str] = None, - **kwargs - ): + def __init__(self, *, bitrate_kbps: Optional[str] = None, **kwargs): super(AudioEncoderAac, self).__init__(bitrate_kbps=bitrate_kbps, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.AudioEncoderAac' # type: str + self.type = "#Microsoft.VideoAnalyzer.AudioEncoderAac" # type: str class AuthenticationBase(msrest.serialization.Model): @@ -305,21 +283,16 @@ class AuthenticationBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.JwtAuthentication': 'JwtAuthentication'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.JwtAuthentication": "JwtAuthentication"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(AuthenticationBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -337,21 +310,16 @@ class CertificateSource(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.PemCertificateList': 'PemCertificateList'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.PemCertificateList": "PemCertificateList"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CertificateSource, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -366,17 +334,11 @@ class CheckNameAvailabilityRequest(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - *, - name: Optional[str] = None, - type: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs): super(CheckNameAvailabilityRequest, self).__init__(**kwargs) self.name = name self.type = type @@ -395,9 +357,9 @@ class CheckNameAvailabilityResponse(msrest.serialization.Model): """ _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "name_available": {"key": "nameAvailable", "type": "bool"}, + "reason": {"key": "reason", "type": "str"}, + "message": {"key": "message", "type": "str"}, } def __init__( @@ -427,21 +389,16 @@ class CredentialsBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.UsernamePasswordCredentials": "UsernamePasswordCredentials"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(CredentialsBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -462,25 +419,23 @@ class TokenKey(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'kid': {'required': True}, + "type": {"required": True}, + "kid": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "kid": {"key": "kid", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.EccTokenKey': 'EccTokenKey', '#Microsoft.VideoAnalyzer.RsaTokenKey': 'RsaTokenKey'} + "type": { + "#Microsoft.VideoAnalyzer.EccTokenKey": "EccTokenKey", + "#Microsoft.VideoAnalyzer.RsaTokenKey": "RsaTokenKey", + } } - def __init__( - self, - *, - kid: str, - **kwargs - ): + def __init__(self, *, kid: str, **kwargs): super(TokenKey, self).__init__(**kwargs) self.type = None # type: Optional[str] self.kid = kid @@ -506,32 +461,24 @@ class EccTokenKey(TokenKey): """ _validation = { - 'type': {'required': True}, - 'kid': {'required': True}, - 'alg': {'required': True}, - 'x': {'required': True}, - 'y': {'required': True}, + "type": {"required": True}, + "kid": {"required": True}, + "alg": {"required": True}, + "x": {"required": True}, + "y": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, - 'alg': {'key': 'alg', 'type': 'str'}, - 'x': {'key': 'x', 'type': 'str'}, - 'y': {'key': 'y', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "kid": {"key": "kid", "type": "str"}, + "alg": {"key": "alg", "type": "str"}, + "x": {"key": "x", "type": "str"}, + "y": {"key": "y", "type": "str"}, } - def __init__( - self, - *, - kid: str, - alg: Union[str, "AccessPolicyEccAlgo"], - x: str, - y: str, - **kwargs - ): + def __init__(self, *, kid: str, alg: Union[str, "AccessPolicyEccAlgo"], x: str, y: str, **kwargs): super(EccTokenKey, self).__init__(kid=kid, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.EccTokenKey' # type: str + self.type = "#Microsoft.VideoAnalyzer.EccTokenKey" # type: str self.alg = alg self.x = x self.y = y @@ -558,25 +505,22 @@ class EdgeModuleEntity(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'edge_module_id': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "edge_module_id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'edge_module_id': {'key': 'properties.edgeModuleId', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "edge_module_id": {"key": "properties.edgeModuleId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EdgeModuleEntity, self).__init__(**kwargs) self.edge_module_id = None @@ -592,17 +536,11 @@ class EdgeModuleEntityCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[EdgeModuleEntity]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[EdgeModuleEntity]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["EdgeModuleEntity"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["EdgeModuleEntity"]] = None, next_link: Optional[str] = None, **kwargs): super(EdgeModuleEntityCollection, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -623,19 +561,16 @@ class EdgeModuleProvisioningToken(msrest.serialization.Model): """ _validation = { - 'expiration_date': {'readonly': True}, - 'token': {'readonly': True}, + "expiration_date": {"readonly": True}, + "token": {"readonly": True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'token': {'key': 'token', 'type': 'str'}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, + "token": {"key": "token", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EdgeModuleProvisioningToken, self).__init__(**kwargs) self.expiration_date = None self.token = None @@ -654,21 +589,21 @@ class EncoderPresetBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.EncoderCustomPreset': 'EncoderCustomPreset', '#Microsoft.VideoAnalyzer.EncoderSystemPreset': 'EncoderSystemPreset'} + "type": { + "#Microsoft.VideoAnalyzer.EncoderCustomPreset": "EncoderCustomPreset", + "#Microsoft.VideoAnalyzer.EncoderSystemPreset": "EncoderSystemPreset", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(EncoderPresetBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -687,13 +622,13 @@ class EncoderCustomPreset(EncoderPresetBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'audio_encoder': {'key': 'audioEncoder', 'type': 'AudioEncoderBase'}, - 'video_encoder': {'key': 'videoEncoder', 'type': 'VideoEncoderBase'}, + "type": {"key": "@type", "type": "str"}, + "audio_encoder": {"key": "audioEncoder", "type": "AudioEncoderBase"}, + "video_encoder": {"key": "videoEncoder", "type": "VideoEncoderBase"}, } def __init__( @@ -704,7 +639,7 @@ def __init__( **kwargs ): super(EncoderCustomPreset, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.EncoderCustomPreset' # type: str + self.type = "#Microsoft.VideoAnalyzer.EncoderCustomPreset" # type: str self.audio_encoder = audio_encoder self.video_encoder = video_encoder @@ -724,25 +659,24 @@ class NodeBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.ProcessorNodeBase': 'ProcessorNodeBase', '#Microsoft.VideoAnalyzer.SinkNodeBase': 'SinkNodeBase', '#Microsoft.VideoAnalyzer.SourceNodeBase': 'SourceNodeBase'} + "type": { + "#Microsoft.VideoAnalyzer.ProcessorNodeBase": "ProcessorNodeBase", + "#Microsoft.VideoAnalyzer.SinkNodeBase": "SinkNodeBase", + "#Microsoft.VideoAnalyzer.SourceNodeBase": "SourceNodeBase", + } } - def __init__( - self, - *, - name: str, - **kwargs - ): + def __init__(self, *, name: str, **kwargs): super(NodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = name @@ -766,30 +700,22 @@ class ProcessorNodeBase(NodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.EncoderProcessor': 'EncoderProcessor'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.EncoderProcessor": "EncoderProcessor"}} - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], **kwargs): super(ProcessorNodeBase, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.ProcessorNodeBase' # type: str + self.type = "#Microsoft.VideoAnalyzer.ProcessorNodeBase" # type: str self.inputs = inputs @@ -811,29 +737,22 @@ class EncoderProcessor(ProcessorNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'preset': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "preset": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'preset': {'key': 'preset', 'type': 'EncoderPresetBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "preset": {"key": "preset", "type": "EncoderPresetBase"}, } - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - preset: "EncoderPresetBase", - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], preset: "EncoderPresetBase", **kwargs): super(EncoderProcessor, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.EncoderProcessor' # type: str + self.type = "#Microsoft.VideoAnalyzer.EncoderProcessor" # type: str self.preset = preset @@ -851,23 +770,18 @@ class EncoderSystemPreset(EncoderPresetBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } - def __init__( - self, - *, - name: Union[str, "EncoderSystemPresetType"], - **kwargs - ): + def __init__(self, *, name: Union[str, "EncoderSystemPresetType"], **kwargs): super(EncoderSystemPreset, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.EncoderSystemPreset' # type: str + self.type = "#Microsoft.VideoAnalyzer.EncoderSystemPreset" # type: str self.name = name @@ -883,21 +797,15 @@ class Endpoint(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "endpoint_url": {"key": "endpointUrl", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - *, - type: Union[str, "VideoAnalyzerEndpointType"], - endpoint_url: Optional[str] = None, - **kwargs - ): + def __init__(self, *, type: Union[str, "VideoAnalyzerEndpointType"], endpoint_url: Optional[str] = None, **kwargs): super(Endpoint, self).__init__(**kwargs) self.endpoint_url = endpoint_url self.type = type @@ -923,30 +831,26 @@ class EndpointBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, - 'credentials': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "credentials": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "tunnel": {"key": "tunnel", "type": "TunnelBase"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.TlsEndpoint': 'TlsEndpoint', '#Microsoft.VideoAnalyzer.UnsecuredEndpoint': 'UnsecuredEndpoint'} + "type": { + "#Microsoft.VideoAnalyzer.TlsEndpoint": "TlsEndpoint", + "#Microsoft.VideoAnalyzer.UnsecuredEndpoint": "UnsecuredEndpoint", + } } - def __init__( - self, - *, - credentials: "CredentialsBase", - url: str, - tunnel: Optional["TunnelBase"] = None, - **kwargs - ): + def __init__(self, *, credentials: "CredentialsBase", url: str, tunnel: Optional["TunnelBase"] = None, **kwargs): super(EndpointBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.credentials = credentials @@ -966,19 +870,16 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -1002,25 +903,22 @@ class ErrorDetail(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -1037,15 +935,10 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - *, - error: Optional["ErrorDetail"] = None, - **kwargs - ): + def __init__(self, *, error: Optional["ErrorDetail"] = None, **kwargs): super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -1059,15 +952,10 @@ class GroupLevelAccessControl(msrest.serialization.Model): """ _attribute_map = { - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, } - def __init__( - self, - *, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, - **kwargs - ): + def __init__(self, *, public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, **kwargs): super(GroupLevelAccessControl, self).__init__(**kwargs) self.public_network_access = public_network_access @@ -1088,24 +976,18 @@ class IotHub(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'identity': {'required': True}, - 'status': {'readonly': True}, + "id": {"required": True}, + "identity": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'status': {'key': 'status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "identity": {"key": "identity", "type": "ResourceIdentity"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - *, - id: str, - identity: "ResourceIdentity", - **kwargs - ): + def __init__(self, *, id: str, identity: "ResourceIdentity", **kwargs): super(IotHub, self).__init__(**kwargs) self.id = id self.identity = identity @@ -1135,15 +1017,15 @@ class JwtAuthentication(AuthenticationBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'issuers': {'key': 'issuers', 'type': '[str]'}, - 'audiences': {'key': 'audiences', 'type': '[str]'}, - 'claims': {'key': 'claims', 'type': '[TokenClaim]'}, - 'keys': {'key': 'keys', 'type': '[TokenKey]'}, + "type": {"key": "@type", "type": "str"}, + "issuers": {"key": "issuers", "type": "[str]"}, + "audiences": {"key": "audiences", "type": "[str]"}, + "claims": {"key": "claims", "type": "[TokenClaim]"}, + "keys": {"key": "keys", "type": "[TokenKey]"}, } def __init__( @@ -1156,7 +1038,7 @@ def __init__( **kwargs ): super(JwtAuthentication, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.JwtAuthentication' # type: str + self.type = "#Microsoft.VideoAnalyzer.JwtAuthentication" # type: str self.issuers = issuers self.audiences = audiences self.claims = claims @@ -1180,21 +1062,16 @@ class KeyVaultProperties(msrest.serialization.Model): """ _validation = { - 'key_identifier': {'required': True}, - 'current_key_identifier': {'readonly': True}, + "key_identifier": {"required": True}, + "current_key_identifier": {"readonly": True}, } _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'current_key_identifier': {'key': 'currentKeyIdentifier', 'type': 'str'}, + "key_identifier": {"key": "keyIdentifier", "type": "str"}, + "current_key_identifier": {"key": "currentKeyIdentifier", "type": "str"}, } - def __init__( - self, - *, - key_identifier: str, - **kwargs - ): + def __init__(self, *, key_identifier: str, **kwargs): super(KeyVaultProperties, self).__init__(**kwargs) self.key_identifier = key_identifier self.current_key_identifier = None @@ -1212,19 +1089,14 @@ class ListProvisioningTokenInput(msrest.serialization.Model): """ _validation = { - 'expiration_date': {'required': True}, + "expiration_date": {"required": True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, } - def __init__( - self, - *, - expiration_date: datetime.datetime, - **kwargs - ): + def __init__(self, *, expiration_date: datetime.datetime, **kwargs): super(ListProvisioningTokenInput, self).__init__(**kwargs) self.expiration_date = expiration_date @@ -1269,23 +1141,23 @@ class LivePipeline(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "bitrate_kbps": {"key": "properties.bitrateKbps", "type": "int"}, + "state": {"key": "properties.state", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } def __init__( @@ -1316,17 +1188,11 @@ class LivePipelineCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[LivePipeline]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[LivePipeline]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["LivePipeline"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["LivePipeline"]] = None, next_link: Optional[str] = None, **kwargs): super(LivePipelineCollection, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -1346,21 +1212,18 @@ class LivePipelineOperationStatus(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, + "name": {"readonly": True}, + "status": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LivePipelineOperationStatus, self).__init__(**kwargs) self.name = None self.status = None @@ -1407,23 +1270,23 @@ class LivePipelineUpdate(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "bitrate_kbps": {"key": "properties.bitrateKbps", "type": "int"}, + "state": {"key": "properties.state", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } def __init__( @@ -1457,21 +1320,18 @@ class LogSpecification(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'blob_duration': {'readonly': True}, + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "blob_duration": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "blob_duration": {"key": "blobDuration", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(LogSpecification, self).__init__(**kwargs) self.name = None self.display_name = None @@ -1492,21 +1352,18 @@ class MetricDimension(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'to_be_exported_for_shoebox': {'readonly': True}, + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "to_be_exported_for_shoebox": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "to_be_exported_for_shoebox": {"key": "toBeExportedForShoebox", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(MetricDimension, self).__init__(**kwargs) self.name = None self.display_name = None @@ -1547,40 +1404,35 @@ class MetricSpecification(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'display_description': {'readonly': True}, - 'unit': {'readonly': True}, - 'aggregation_type': {'readonly': True}, - 'lock_aggregation_type': {'readonly': True}, - 'dimensions': {'readonly': True}, - 'enable_regional_mdm_account': {'readonly': True}, - 'source_mdm_account': {'readonly': True}, - 'source_mdm_namespace': {'readonly': True}, - 'supported_time_grain_types': {'readonly': True}, + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "display_description": {"readonly": True}, + "unit": {"readonly": True}, + "aggregation_type": {"readonly": True}, + "lock_aggregation_type": {"readonly": True}, + "dimensions": {"readonly": True}, + "enable_regional_mdm_account": {"readonly": True}, + "source_mdm_account": {"readonly": True}, + "source_mdm_namespace": {"readonly": True}, + "supported_time_grain_types": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "display_description": {"key": "displayDescription", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "aggregation_type": {"key": "aggregationType", "type": "str"}, + "lock_aggregation_type": {"key": "lockAggregationType", "type": "str"}, + "supported_aggregation_types": {"key": "supportedAggregationTypes", "type": "[str]"}, + "dimensions": {"key": "dimensions", "type": "[MetricDimension]"}, + "enable_regional_mdm_account": {"key": "enableRegionalMdmAccount", "type": "bool"}, + "source_mdm_account": {"key": "sourceMdmAccount", "type": "str"}, + "source_mdm_namespace": {"key": "sourceMdmNamespace", "type": "str"}, + "supported_time_grain_types": {"key": "supportedTimeGrainTypes", "type": "[str]"}, } - def __init__( - self, - *, - supported_aggregation_types: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, supported_aggregation_types: Optional[List[str]] = None, **kwargs): super(MetricSpecification, self).__init__(**kwargs) self.name = None self.display_name = None @@ -1608,9 +1460,9 @@ class NetworkAccessControl(msrest.serialization.Model): """ _attribute_map = { - 'integration': {'key': 'integration', 'type': 'GroupLevelAccessControl'}, - 'ingestion': {'key': 'ingestion', 'type': 'GroupLevelAccessControl'}, - 'consumption': {'key': 'consumption', 'type': 'GroupLevelAccessControl'}, + "integration": {"key": "integration", "type": "GroupLevelAccessControl"}, + "ingestion": {"key": "ingestion", "type": "GroupLevelAccessControl"}, + "consumption": {"key": "consumption", "type": "GroupLevelAccessControl"}, } def __init__( @@ -1638,19 +1490,14 @@ class NodeInput(msrest.serialization.Model): """ _validation = { - 'node_name': {'required': True}, + "node_name": {"required": True}, } _attribute_map = { - 'node_name': {'key': 'nodeName', 'type': 'str'}, + "node_name": {"key": "nodeName", "type": "str"}, } - def __init__( - self, - *, - node_name: str, - **kwargs - ): + def __init__(self, *, node_name: str, **kwargs): super(NodeInput, self).__init__(**kwargs) self.node_name = node_name @@ -1675,16 +1522,16 @@ class Operation(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Properties'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "properties": {"key": "properties", "type": "Properties"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "action_type": {"key": "actionType", "type": "str"}, } def __init__( @@ -1715,15 +1562,10 @@ class OperationCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, + "value": {"key": "value", "type": "[Operation]"}, } - def __init__( - self, - *, - value: Optional[List["Operation"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["Operation"]] = None, **kwargs): super(OperationCollection, self).__init__(**kwargs) self.value = value @@ -1742,10 +1584,10 @@ class OperationDisplay(msrest.serialization.Model): """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } def __init__( @@ -1782,15 +1624,15 @@ class ParameterDeclaration(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'type': {'required': True}, + "name": {"required": True}, + "type": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'default': {'key': 'default', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "default": {"key": "default", "type": "str"}, } def __init__( @@ -1821,21 +1663,15 @@ class ParameterDefinition(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - *, - name: str, - value: Optional[str] = None, - **kwargs - ): + def __init__(self, *, name: str, value: Optional[str] = None, **kwargs): super(ParameterDefinition, self).__init__(**kwargs) self.name = name self.value = value @@ -1853,23 +1689,18 @@ class PemCertificateList(CertificateSource): """ _validation = { - 'type': {'required': True}, - 'certificates': {'required': True}, + "type": {"required": True}, + "certificates": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'certificates': {'key': 'certificates', 'type': '[str]'}, + "type": {"key": "@type", "type": "str"}, + "certificates": {"key": "certificates", "type": "[str]"}, } - def __init__( - self, - *, - certificates: List[str], - **kwargs - ): + def __init__(self, *, certificates: List[str], **kwargs): super(PemCertificateList, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str + self.type = "#Microsoft.VideoAnalyzer.PemCertificateList" # type: str self.certificates = certificates @@ -1910,26 +1741,26 @@ class PipelineJob(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, - 'expiration': {'readonly': True}, - 'error': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, + "expiration": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, - 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "state": {"key": "properties.state", "type": "str"}, + "expiration": {"key": "properties.expiration", "type": "iso-8601"}, + "error": {"key": "properties.error", "type": "PipelineJobError"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } def __init__( @@ -1960,17 +1791,11 @@ class PipelineJobCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineJob]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[PipelineJob]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["PipelineJob"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["PipelineJob"]] = None, next_link: Optional[str] = None, **kwargs): super(PipelineJobCollection, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -1986,17 +1811,11 @@ class PipelineJobError(msrest.serialization.Model): """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): super(PipelineJobError, self).__init__(**kwargs) self.code = code self.message = message @@ -2016,21 +1835,18 @@ class PipelineJobOperationStatus(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, + "name": {"readonly": True}, + "status": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PipelineJobOperationStatus, self).__init__(**kwargs) self.name = None self.status = None @@ -2074,26 +1890,26 @@ class PipelineJobUpdate(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'state': {'readonly': True}, - 'expiration': {'readonly': True}, - 'error': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "state": {"readonly": True}, + "expiration": {"readonly": True}, + "error": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, - 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "topology_name": {"key": "properties.topologyName", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "state": {"key": "properties.state", "type": "str"}, + "expiration": {"key": "properties.expiration", "type": "iso-8601"}, + "error": {"key": "properties.error", "type": "PipelineJobError"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDefinition]"}, } def __init__( @@ -2117,70 +1933,70 @@ class PipelineTopology(ProxyResource): """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. -* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~video_analyzer.models.SystemData - :param kind: Required. Topology kind. Possible values include: "Live", "Batch". - :type kind: str or ~video_analyzer.models.Kind - :param sku: Required. Describes the properties of a SKU. - :type sku: ~video_analyzer.models.Sku - :param description: An optional description of the pipeline topology. It is recommended that - the expected use of the topology to be described here. - :type description: str - :param parameters: List of the topology parameter declarations. Parameters declared here can be - referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. - Parameters can have optional default values and can later be defined in individual instances of - the pipeline. - :type parameters: list[~video_analyzer.models.ParameterDeclaration] - :param sources: List of the topology source nodes. Source nodes enable external data to be - ingested by the pipeline. - :type sources: list[~video_analyzer.models.SourceNodeBase] - :param processors: List of the topology processor nodes. Processor nodes enable pipeline data - to be analyzed, processed or transformed. - :type processors: list[~video_analyzer.models.ProcessorNodeBase] - :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or - exported. - :type sinks: list[~video_analyzer.models.SinkNodeBase] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'kind': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, - 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, - 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, - 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + * Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Required. Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Required. Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "kind": {"required": True}, + "sku": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "kind": {"key": "kind", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "description": {"key": "properties.description", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDeclaration]"}, + "sources": {"key": "properties.sources", "type": "[SourceNodeBase]"}, + "processors": {"key": "properties.processors", "type": "[ProcessorNodeBase]"}, + "sinks": {"key": "properties.sinks", "type": "[SinkNodeBase]"}, } def __init__( @@ -2216,17 +2032,11 @@ class PipelineTopologyCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineTopology]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[PipelineTopology]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["PipelineTopology"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["PipelineTopology"]] = None, next_link: Optional[str] = None, **kwargs): super(PipelineTopologyCollection, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -2236,66 +2046,66 @@ class PipelineTopologyUpdate(ProxyResource): """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: -* Parameters: list of user defined parameters that can be references across the topology nodes. -* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. -* Processors: list of nodes which perform data analysis or transformations. -* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~video_analyzer.models.SystemData - :param kind: Topology kind. Possible values include: "Live", "Batch". - :type kind: str or ~video_analyzer.models.Kind - :param sku: Describes the properties of a SKU. - :type sku: ~video_analyzer.models.Sku - :param description: An optional description of the pipeline topology. It is recommended that - the expected use of the topology to be described here. - :type description: str - :param parameters: List of the topology parameter declarations. Parameters declared here can be - referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. - Parameters can have optional default values and can later be defined in individual instances of - the pipeline. - :type parameters: list[~video_analyzer.models.ParameterDeclaration] - :param sources: List of the topology source nodes. Source nodes enable external data to be - ingested by the pipeline. - :type sources: list[~video_analyzer.models.SourceNodeBase] - :param processors: List of the topology processor nodes. Processor nodes enable pipeline data - to be analyzed, processed or transformed. - :type processors: list[~video_analyzer.models.ProcessorNodeBase] - :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or - exported. - :type sinks: list[~video_analyzer.models.SinkNodeBase] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, - 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, - 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, - 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, + * Parameters: list of user defined parameters that can be references across the topology nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + * Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "kind": {"key": "kind", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "description": {"key": "properties.description", "type": "str"}, + "parameters": {"key": "properties.parameters", "type": "[ParameterDeclaration]"}, + "sources": {"key": "properties.sources", "type": "[SourceNodeBase]"}, + "processors": {"key": "properties.processors", "type": "[ProcessorNodeBase]"}, + "sinks": {"key": "properties.sinks", "type": "[SinkNodeBase]"}, } def __init__( @@ -2330,17 +2140,14 @@ class PrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, + "id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(PrivateEndpoint, self).__init__(**kwargs) self.id = None @@ -2374,21 +2181,24 @@ class PrivateEndpointConnection(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpoint"}, + "private_link_service_connection_state": { + "key": "properties.privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionState", + }, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } def __init__( @@ -2412,15 +2222,10 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__( - self, - *, - value: Optional[List["PrivateEndpointConnection"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["PrivateEndpointConnection"]] = None, **kwargs): super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) self.value = value @@ -2450,30 +2255,25 @@ class PrivateLinkResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "group_id": {"readonly": True}, + "required_members": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "group_id": {"key": "properties.groupId", "type": "str"}, + "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, + "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__( - self, - *, - required_zone_names: Optional[List[str]] = None, - **kwargs - ): + def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs): super(PrivateLinkResource, self).__init__(**kwargs) self.group_id = None self.required_members = None @@ -2488,15 +2288,10 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__( - self, - *, - value: Optional[List["PrivateLinkResource"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["PrivateLinkResource"]] = None, **kwargs): super(PrivateLinkResourceListResult, self).__init__(**kwargs) self.value = value @@ -2515,9 +2310,9 @@ class PrivateLinkServiceConnectionState(msrest.serialization.Model): """ _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, } def __init__( @@ -2544,17 +2339,14 @@ class Properties(msrest.serialization.Model): """ _validation = { - 'service_specification': {'readonly': True}, + "service_specification": {"readonly": True}, } _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + "service_specification": {"key": "serviceSpecification", "type": "ServiceSpecification"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(Properties, self).__init__(**kwargs) self.service_specification = None @@ -2570,19 +2362,14 @@ class ResourceIdentity(msrest.serialization.Model): """ _validation = { - 'user_assigned_identity': {'required': True}, + "user_assigned_identity": {"required": True}, } _attribute_map = { - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + "user_assigned_identity": {"key": "userAssignedIdentity", "type": "str"}, } - def __init__( - self, - *, - user_assigned_identity: str, - **kwargs - ): + def __init__(self, *, user_assigned_identity: str, **kwargs): super(ResourceIdentity, self).__init__(**kwargs) self.user_assigned_identity = user_assigned_identity @@ -2607,32 +2394,24 @@ class RsaTokenKey(TokenKey): """ _validation = { - 'type': {'required': True}, - 'kid': {'required': True}, - 'alg': {'required': True}, - 'n': {'required': True}, - 'e': {'required': True}, + "type": {"required": True}, + "kid": {"required": True}, + "alg": {"required": True}, + "n": {"required": True}, + "e": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, - 'alg': {'key': 'alg', 'type': 'str'}, - 'n': {'key': 'n', 'type': 'str'}, - 'e': {'key': 'e', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "kid": {"key": "kid", "type": "str"}, + "alg": {"key": "alg", "type": "str"}, + "n": {"key": "n", "type": "str"}, + "e": {"key": "e", "type": "str"}, } - def __init__( - self, - *, - kid: str, - alg: Union[str, "AccessPolicyRsaAlgo"], - n: str, - e: str, - **kwargs - ): + def __init__(self, *, kid: str, alg: Union[str, "AccessPolicyRsaAlgo"], n: str, e: str, **kwargs): super(RsaTokenKey, self).__init__(kid=kid, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.RsaTokenKey' # type: str + self.type = "#Microsoft.VideoAnalyzer.RsaTokenKey" # type: str self.alg = alg self.n = n self.e = e @@ -2653,27 +2432,25 @@ class SourceNodeBase(NodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.RtspSource': 'RtspSource', '#Microsoft.VideoAnalyzer.VideoSource': 'VideoSource'} + "type": { + "#Microsoft.VideoAnalyzer.RtspSource": "RtspSource", + "#Microsoft.VideoAnalyzer.VideoSource": "VideoSource", + } } - def __init__( - self, - *, - name: str, - **kwargs - ): + def __init__(self, *, name: str, **kwargs): super(SourceNodeBase, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SourceNodeBase' # type: str + self.type = "#Microsoft.VideoAnalyzer.SourceNodeBase" # type: str class RtspSource(SourceNodeBase): @@ -2698,28 +2475,23 @@ class RtspSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'endpoint': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "endpoint": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'transport': {'key': 'transport', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "transport": {"key": "transport", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "EndpointBase"}, } def __init__( - self, - *, - name: str, - endpoint: "EndpointBase", - transport: Optional[Union[str, "RtspTransport"]] = None, - **kwargs + self, *, name: str, endpoint: "EndpointBase", transport: Optional[Union[str, "RtspTransport"]] = None, **kwargs ): super(RtspSource, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str + self.type = "#Microsoft.VideoAnalyzer.RtspSource" # type: str self.transport = transport self.endpoint = endpoint @@ -2737,21 +2509,16 @@ class TunnelBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel': 'SecureIotDeviceRemoteTunnel'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel": "SecureIotDeviceRemoteTunnel"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TunnelBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -2771,26 +2538,20 @@ class SecureIotDeviceRemoteTunnel(TunnelBase): """ _validation = { - 'type': {'required': True}, - 'iot_hub_name': {'required': True}, - 'device_id': {'required': True}, + "type": {"required": True}, + "iot_hub_name": {"required": True}, + "device_id": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, - 'device_id': {'key': 'deviceId', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "iot_hub_name": {"key": "iotHubName", "type": "str"}, + "device_id": {"key": "deviceId", "type": "str"}, } - def __init__( - self, - *, - iot_hub_name: str, - device_id: str, - **kwargs - ): + def __init__(self, *, iot_hub_name: str, device_id: str, **kwargs): super(SecureIotDeviceRemoteTunnel, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel' # type: str + self.type = "#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel" # type: str self.iot_hub_name = iot_hub_name self.device_id = device_id @@ -2807,19 +2568,16 @@ class ServiceSpecification(msrest.serialization.Model): """ _validation = { - 'log_specifications': {'readonly': True}, - 'metric_specifications': {'readonly': True}, + "log_specifications": {"readonly": True}, + "metric_specifications": {"readonly": True}, } _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + "log_specifications": {"key": "logSpecifications", "type": "[LogSpecification]"}, + "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecification]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(ServiceSpecification, self).__init__(**kwargs) self.log_specifications = None self.metric_specifications = None @@ -2843,30 +2601,22 @@ class SinkNodeBase(NodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.VideoSink': 'VideoSink'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.VideoSink": "VideoSink"}} - def __init__( - self, - *, - name: str, - inputs: List["NodeInput"], - **kwargs - ): + def __init__(self, *, name: str, inputs: List["NodeInput"], **kwargs): super(SinkNodeBase, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.SinkNodeBase' # type: str + self.type = "#Microsoft.VideoAnalyzer.SinkNodeBase" # type: str self.inputs = inputs @@ -2884,21 +2634,16 @@ class Sku(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, + "name": {"required": True}, + "tier": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } - def __init__( - self, - *, - name: Union[str, "SkuName"], - **kwargs - ): + def __init__(self, *, name: Union[str, "SkuName"], **kwargs): super(Sku, self).__init__(**kwargs) self.name = name self.tier = None @@ -2922,23 +2667,17 @@ class StorageAccount(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, - 'status': {'readonly': True}, + "id": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, - 'status': {'key': 'status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "identity": {"key": "identity", "type": "ResourceIdentity"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - *, - id: str, - identity: Optional["ResourceIdentity"] = None, - **kwargs - ): + def __init__(self, *, id: str, identity: Optional["ResourceIdentity"] = None, **kwargs): super(StorageAccount, self).__init__(**kwargs) self.id = id self.identity = identity @@ -2965,12 +2704,12 @@ class SystemData(msrest.serialization.Model): """ _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } def __init__( @@ -3006,21 +2745,18 @@ class TimeSequenceBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers': 'VideoSequenceAbsoluteTimeMarkers'} + "type": {"#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers": "VideoSequenceAbsoluteTimeMarkers"} } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(TimeSequenceBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -3049,18 +2785,18 @@ class TlsEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'credentials': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "credentials": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, - 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'CertificateSource'}, - 'validation_options': {'key': 'validationOptions', 'type': 'TlsValidationOptions'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "tunnel": {"key": "tunnel", "type": "TunnelBase"}, + "trusted_certificates": {"key": "trustedCertificates", "type": "CertificateSource"}, + "validation_options": {"key": "validationOptions", "type": "TlsValidationOptions"}, } def __init__( @@ -3074,7 +2810,7 @@ def __init__( **kwargs ): super(TlsEndpoint, self).__init__(credentials=credentials, url=url, tunnel=tunnel, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str + self.type = "#Microsoft.VideoAnalyzer.TlsEndpoint" # type: str self.trusted_certificates = trusted_certificates self.validation_options = validation_options @@ -3091,17 +2827,11 @@ class TlsValidationOptions(msrest.serialization.Model): """ _attribute_map = { - 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, - 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + "ignore_hostname": {"key": "ignoreHostname", "type": "str"}, + "ignore_signature": {"key": "ignoreSignature", "type": "str"}, } - def __init__( - self, - *, - ignore_hostname: Optional[str] = None, - ignore_signature: Optional[str] = None, - **kwargs - ): + def __init__(self, *, ignore_hostname: Optional[str] = None, ignore_signature: Optional[str] = None, **kwargs): super(TlsValidationOptions, self).__init__(**kwargs) self.ignore_hostname = ignore_hostname self.ignore_signature = ignore_signature @@ -3119,22 +2849,16 @@ class TokenClaim(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, - 'value': {'required': True}, + "name": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - *, - name: str, - value: str, - **kwargs - ): + def __init__(self, *, name: str, value: str, **kwargs): super(TokenClaim, self).__init__(**kwargs) self.name = name self.value = value @@ -3165,29 +2889,23 @@ class TrackedResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, } - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): super(TrackedResource, self).__init__(**kwargs) self.tags = tags self.location = location @@ -3210,28 +2928,21 @@ class UnsecuredEndpoint(EndpointBase): """ _validation = { - 'type': {'required': True}, - 'credentials': {'required': True}, - 'url': {'required': True}, + "type": {"required": True}, + "credentials": {"required": True}, + "url": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + "type": {"key": "@type", "type": "str"}, + "credentials": {"key": "credentials", "type": "CredentialsBase"}, + "url": {"key": "url", "type": "str"}, + "tunnel": {"key": "tunnel", "type": "TunnelBase"}, } - def __init__( - self, - *, - credentials: "CredentialsBase", - url: str, - tunnel: Optional["TunnelBase"] = None, - **kwargs - ): + def __init__(self, *, credentials: "CredentialsBase", url: str, tunnel: Optional["TunnelBase"] = None, **kwargs): super(UnsecuredEndpoint, self).__init__(credentials=credentials, url=url, tunnel=tunnel, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str + self.type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint" # type: str class UserAssignedManagedIdentity(msrest.serialization.Model): @@ -3246,19 +2957,16 @@ class UserAssignedManagedIdentity(msrest.serialization.Model): """ _validation = { - 'client_id': {'readonly': True}, - 'principal_id': {'readonly': True}, + "client_id": {"readonly": True}, + "principal_id": {"readonly": True}, } _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "principal_id": {"key": "principalId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(UserAssignedManagedIdentity, self).__init__(**kwargs) self.client_id = None self.principal_id = None @@ -3280,26 +2988,20 @@ class UsernamePasswordCredentials(CredentialsBase): """ _validation = { - 'type': {'required': True}, - 'username': {'required': True}, - 'password': {'required': True}, + "type": {"required": True}, + "username": {"required": True}, + "password": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "username": {"key": "username", "type": "str"}, + "password": {"key": "password", "type": "str"}, } - def __init__( - self, - *, - username: str, - password: str, - **kwargs - ): + def __init__(self, *, username: str, password: str, **kwargs): super(UsernamePasswordCredentials, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str + self.type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials" # type: str self.username = username self.password = password @@ -3350,32 +3052,35 @@ class VideoAnalyzer(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'endpoints': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "endpoints": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, - 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, - 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "VideoAnalyzerIdentity"}, + "storage_accounts": {"key": "properties.storageAccounts", "type": "[StorageAccount]"}, + "endpoints": {"key": "properties.endpoints", "type": "[Endpoint]"}, + "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, + "iot_hubs": {"key": "properties.iotHubs", "type": "[IotHub]"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "network_access_control": {"key": "properties.networkAccessControl", "type": "NetworkAccessControl"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "private_endpoint_connections": { + "key": "properties.privateEndpointConnections", + "type": "[PrivateEndpointConnection]", + }, } def __init__( @@ -3411,15 +3116,10 @@ class VideoAnalyzerCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[VideoAnalyzer]'}, + "value": {"key": "value", "type": "[VideoAnalyzer]"}, } - def __init__( - self, - *, - value: Optional[List["VideoAnalyzer"]] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["VideoAnalyzer"]] = None, **kwargs): super(VideoAnalyzerCollection, self).__init__(**kwargs) self.value = value @@ -3436,12 +3136,12 @@ class VideoAnalyzerIdentity(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedManagedIdentity}'}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedManagedIdentity}"}, } def __init__( @@ -3476,16 +3176,16 @@ class VideoAnalyzerOperationStatus(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "end_time": {"key": "endTime", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } def __init__( @@ -3528,16 +3228,16 @@ class VideoAnalyzerPrivateEndpointConnectionOperationStatus(msrest.serialization """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "name": {"key": "name", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "end_time": {"key": "endTime", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "error": {"key": "error", "type": "ErrorDetail"}, } def __init__( @@ -3591,22 +3291,25 @@ class VideoAnalyzerUpdate(msrest.serialization.Model): """ _validation = { - 'endpoints': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, + "endpoints": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, - 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, - 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "VideoAnalyzerIdentity"}, + "storage_accounts": {"key": "properties.storageAccounts", "type": "[StorageAccount]"}, + "endpoints": {"key": "properties.endpoints", "type": "[Endpoint]"}, + "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, + "iot_hubs": {"key": "properties.iotHubs", "type": "[IotHub]"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "network_access_control": {"key": "properties.networkAccessControl", "type": "NetworkAccessControl"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "private_endpoint_connections": { + "key": "properties.privateEndpointConnections", + "type": "[PrivateEndpointConnection]", + }, } def __init__( @@ -3646,21 +3349,16 @@ class VideoArchival(msrest.serialization.Model): """ _attribute_map = { - 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + "retention_period": {"key": "retentionPeriod", "type": "str"}, } - def __init__( - self, - *, - retention_period: Optional[str] = None, - **kwargs - ): + def __init__(self, *, retention_period: Optional[str] = None, **kwargs): super(VideoArchival, self).__init__(**kwargs) self.retention_period = retention_period class VideoContentToken(msrest.serialization.Model): - """"Video content token grants access to the video content URLs.". + """ "Video content token grants access to the video content URLs.". Variables are only populated by the server, and will be ignored when sending a request. @@ -3673,19 +3371,16 @@ class VideoContentToken(msrest.serialization.Model): """ _validation = { - 'expiration_date': {'readonly': True}, - 'token': {'readonly': True}, + "expiration_date": {"readonly": True}, + "token": {"readonly": True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'token': {'key': 'token', 'type': 'str'}, + "expiration_date": {"key": "expirationDate", "type": "iso-8601"}, + "token": {"key": "token", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): super(VideoContentToken, self).__init__(**kwargs) self.expiration_date = None self.token = None @@ -3703,13 +3398,13 @@ class VideoContentUrls(msrest.serialization.Model): automatically played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the video content authorization token on any compatible DASH or HLS players by appending the following to the base URL: - + .. code-block:: - + - HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: /manifest(format=mpd-time-cmaf) - + Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately double of the chosen video segment length. It is available when the video type is 'archive' and video archiving is enabled. @@ -3728,10 +3423,10 @@ class VideoContentUrls(msrest.serialization.Model): """ _attribute_map = { - 'download_url': {'key': 'downloadUrl', 'type': 'str'}, - 'archive_base_url': {'key': 'archiveBaseUrl', 'type': 'str'}, - 'rtsp_tunnel_url': {'key': 'rtspTunnelUrl', 'type': 'str'}, - 'preview_image_urls': {'key': 'previewImageUrls', 'type': 'VideoPreviewImageUrls'}, + "download_url": {"key": "downloadUrl", "type": "str"}, + "archive_base_url": {"key": "archiveBaseUrl", "type": "str"}, + "rtsp_tunnel_url": {"key": "rtspTunnelUrl", "type": "str"}, + "preview_image_urls": {"key": "previewImageUrls", "type": "VideoPreviewImageUrls"}, } def __init__( @@ -3776,10 +3471,10 @@ class VideoCreationProperties(msrest.serialization.Model): """ _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, - 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + "title": {"key": "title", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "segment_length": {"key": "segmentLength", "type": "str"}, + "retention_period": {"key": "retentionPeriod", "type": "str"}, } def __init__( @@ -3822,19 +3517,17 @@ class VideoEncoderBase(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, - 'frame_rate': {'key': 'frameRate', 'type': 'str'}, - 'scale': {'key': 'scale', 'type': 'VideoScale'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, + "frame_rate": {"key": "frameRate", "type": "str"}, + "scale": {"key": "scale", "type": "VideoScale"}, } - _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.VideoEncoderH264': 'VideoEncoderH264'} - } + _subtype_map = {"type": {"#Microsoft.VideoAnalyzer.VideoEncoderH264": "VideoEncoderH264"}} def __init__( self, @@ -3872,14 +3565,14 @@ class VideoEncoderH264(VideoEncoderBase): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, - 'frame_rate': {'key': 'frameRate', 'type': 'str'}, - 'scale': {'key': 'scale', 'type': 'VideoScale'}, + "type": {"key": "@type", "type": "str"}, + "bitrate_kbps": {"key": "bitrateKbps", "type": "str"}, + "frame_rate": {"key": "frameRate", "type": "str"}, + "scale": {"key": "scale", "type": "VideoScale"}, } def __init__( @@ -3891,7 +3584,7 @@ def __init__( **kwargs ): super(VideoEncoderH264, self).__init__(bitrate_kbps=bitrate_kbps, frame_rate=frame_rate, scale=scale, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoEncoderH264' # type: str + self.type = "#Microsoft.VideoAnalyzer.VideoEncoderH264" # type: str class VideoEntity(ProxyResource): @@ -3931,27 +3624,27 @@ class VideoEntity(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'type_properties_type': {'readonly': True}, - 'flags': {'readonly': True}, - 'content_urls': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "type_properties_type": {"readonly": True}, + "flags": {"readonly": True}, + "content_urls": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, - 'flags': {'key': 'properties.flags', 'type': 'VideoFlags'}, - 'content_urls': {'key': 'properties.contentUrls', 'type': 'VideoContentUrls'}, - 'media_info': {'key': 'properties.mediaInfo', 'type': 'VideoMediaInfo'}, - 'archival': {'key': 'properties.archival', 'type': 'VideoArchival'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "title": {"key": "properties.title", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "type_properties_type": {"key": "properties.type", "type": "str"}, + "flags": {"key": "properties.flags", "type": "VideoFlags"}, + "content_urls": {"key": "properties.contentUrls", "type": "VideoContentUrls"}, + "media_info": {"key": "properties.mediaInfo", "type": "VideoMediaInfo"}, + "archival": {"key": "properties.archival", "type": "VideoArchival"}, } def __init__( @@ -3984,17 +3677,11 @@ class VideoEntityCollection(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[VideoEntity]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[VideoEntity]"}, + "next_link": {"key": "@nextLink", "type": "str"}, } - def __init__( - self, - *, - value: Optional[List["VideoEntity"]] = None, - next_link: Optional[str] = None, - **kwargs - ): + def __init__(self, *, value: Optional[List["VideoEntity"]] = None, next_link: Optional[str] = None, **kwargs): super(VideoEntityCollection, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -4019,25 +3706,18 @@ class VideoFlags(msrest.serialization.Model): """ _validation = { - 'can_stream': {'required': True}, - 'has_data': {'required': True}, - 'is_in_use': {'required': True}, + "can_stream": {"required": True}, + "has_data": {"required": True}, + "is_in_use": {"required": True}, } _attribute_map = { - 'can_stream': {'key': 'canStream', 'type': 'bool'}, - 'has_data': {'key': 'hasData', 'type': 'bool'}, - 'is_in_use': {'key': 'isInUse', 'type': 'bool'}, + "can_stream": {"key": "canStream", "type": "bool"}, + "has_data": {"key": "hasData", "type": "bool"}, + "is_in_use": {"key": "isInUse", "type": "bool"}, } - def __init__( - self, - *, - can_stream: bool, - has_data: bool, - is_in_use: bool, - **kwargs - ): + def __init__(self, *, can_stream: bool, has_data: bool, is_in_use: bool, **kwargs): super(VideoFlags, self).__init__(**kwargs) self.can_stream = can_stream self.has_data = has_data @@ -4057,15 +3737,10 @@ class VideoMediaInfo(msrest.serialization.Model): """ _attribute_map = { - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + "segment_length": {"key": "segmentLength", "type": "str"}, } - def __init__( - self, - *, - segment_length: Optional[str] = None, - **kwargs - ): + def __init__(self, *, segment_length: Optional[str] = None, **kwargs): super(VideoMediaInfo, self).__init__(**kwargs) self.segment_length = segment_length @@ -4082,18 +3757,13 @@ class VideoPreviewImageUrls(msrest.serialization.Model): """ _attribute_map = { - 'small': {'key': 'small', 'type': 'str'}, - 'medium': {'key': 'medium', 'type': 'str'}, - 'large': {'key': 'large', 'type': 'str'}, + "small": {"key": "small", "type": "str"}, + "medium": {"key": "medium", "type": "str"}, + "large": {"key": "large", "type": "str"}, } def __init__( - self, - *, - small: Optional[str] = None, - medium: Optional[str] = None, - large: Optional[str] = None, - **kwargs + self, *, small: Optional[str] = None, medium: Optional[str] = None, large: Optional[str] = None, **kwargs ): super(VideoPreviewImageUrls, self).__init__(**kwargs) self.small = small @@ -4116,16 +3786,12 @@ class VideoPublishingOptions(msrest.serialization.Model): """ _attribute_map = { - 'disable_archive': {'key': 'disableArchive', 'type': 'str'}, - 'disable_rtsp_publishing': {'key': 'disableRtspPublishing', 'type': 'str'}, + "disable_archive": {"key": "disableArchive", "type": "str"}, + "disable_rtsp_publishing": {"key": "disableRtspPublishing", "type": "str"}, } def __init__( - self, - *, - disable_archive: Optional[str] = None, - disable_rtsp_publishing: Optional[str] = None, - **kwargs + self, *, disable_archive: Optional[str] = None, disable_rtsp_publishing: Optional[str] = None, **kwargs ): super(VideoPublishingOptions, self).__init__(**kwargs) self.disable_archive = disable_archive @@ -4147,9 +3813,9 @@ class VideoScale(msrest.serialization.Model): """ _attribute_map = { - 'height': {'key': 'height', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, + "height": {"key": "height", "type": "str"}, + "width": {"key": "width", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, } def __init__( @@ -4179,23 +3845,18 @@ class VideoSequenceAbsoluteTimeMarkers(TimeSequenceBase): """ _validation = { - 'type': {'required': True}, - 'ranges': {'required': True}, + "type": {"required": True}, + "ranges": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'ranges': {'key': 'ranges', 'type': 'str'}, + "type": {"key": "@type", "type": "str"}, + "ranges": {"key": "ranges", "type": "str"}, } - def __init__( - self, - *, - ranges: str, - **kwargs - ): + def __init__(self, *, ranges: str, **kwargs): super(VideoSequenceAbsoluteTimeMarkers, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers' # type: str + self.type = "#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers" # type: str self.ranges = ranges @@ -4224,19 +3885,19 @@ class VideoSink(SinkNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'inputs': {'required': True}, - 'video_name': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "inputs": {"required": True}, + "video_name": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, - 'video_name': {'key': 'videoName', 'type': 'str'}, - 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, - 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "inputs": {"key": "inputs", "type": "[NodeInput]"}, + "video_name": {"key": "videoName", "type": "str"}, + "video_creation_properties": {"key": "videoCreationProperties", "type": "VideoCreationProperties"}, + "video_publishing_options": {"key": "videoPublishingOptions", "type": "VideoPublishingOptions"}, } def __init__( @@ -4250,7 +3911,7 @@ def __init__( **kwargs ): super(VideoSink, self).__init__(name=name, inputs=inputs, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str + self.type = "#Microsoft.VideoAnalyzer.VideoSink" # type: str self.video_name = video_name self.video_creation_properties = video_creation_properties self.video_publishing_options = video_publishing_options @@ -4274,28 +3935,21 @@ class VideoSource(SourceNodeBase): """ _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - 'video_name': {'required': True}, - 'time_sequences': {'required': True}, + "type": {"required": True}, + "name": {"required": True}, + "video_name": {"required": True}, + "time_sequences": {"required": True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'video_name': {'key': 'videoName', 'type': 'str'}, - 'time_sequences': {'key': 'timeSequences', 'type': 'TimeSequenceBase'}, + "type": {"key": "@type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "video_name": {"key": "videoName", "type": "str"}, + "time_sequences": {"key": "timeSequences", "type": "TimeSequenceBase"}, } - def __init__( - self, - *, - name: str, - video_name: str, - time_sequences: "TimeSequenceBase", - **kwargs - ): + def __init__(self, *, name: str, video_name: str, time_sequences: "TimeSequenceBase", **kwargs): super(VideoSource, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.VideoSource' # type: str + self.type = "#Microsoft.VideoAnalyzer.VideoSource" # type: str self.video_name = video_name self.time_sequences = time_sequences diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py index 6f97ca7f05d7..1189ae210153 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py @@ -11,8 +11,7 @@ class AccessPolicyEccAlgo(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Elliptical curve algorithm to be used: ES256, ES384 or ES512. - """ + """Elliptical curve algorithm to be used: ES256, ES384 or ES512.""" #: ES265. ES256 = "ES256" @@ -21,16 +20,16 @@ class AccessPolicyEccAlgo(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: ES512. ES512 = "ES512" + class AccessPolicyRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Defines the access level granted by this policy. - """ + """Defines the access level granted by this policy.""" #: Reader role allows for read-only operations to be performed through the client APIs. READER = "Reader" + class AccessPolicyRsaAlgo(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RSA algorithm to be used: RS256, RS384 or RS512. - """ + """RSA algorithm to be used: RS256, RS384 or RS512.""" #: RS256. RS256 = "RS256" @@ -39,41 +38,41 @@ class AccessPolicyRsaAlgo(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: RS512. RS512 = "RS512" + class AccountEncryptionKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of key used to encrypt the Account Key. - """ + """The type of key used to encrypt the Account Key.""" #: The Account Key is encrypted with a System Key. SYSTEM_KEY = "SystemKey" #: The Account Key is encrypted with a Customer Key. CUSTOMER_KEY = "CustomerKey" + class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Indicates the action type. - """ + """Indicates the action type.""" #: An internal action. INTERNAL = "Internal" + class CheckNameAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The reason why the given name is not available. - """ + """The reason why the given name is not available.""" INVALID = "Invalid" ALREADY_EXISTS = "AlreadyExists" + class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource. - """ + """The type of identity that created the resource.""" USER = "User" APPLICATION = "Application" MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" + class EncoderSystemPresetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Name of the built-in encoding preset. - """ + """Name of the built-in encoding preset.""" #: Produces an MP4 file where the video is encoded with H.264 codec at a picture height of 540 #: pixels, and at a maximum bitrate of 2000 Kbps. Encoded video has the same average frame rate as @@ -96,18 +95,18 @@ class EncoderSystemPresetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: it is encoded with AAC-LC codec at 128 Kbps. SINGLE_LAYER2160_P_H264_AAC = "SingleLayer_2160p_H264_AAC" + class Kind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Topology kind. - """ + """Topology kind.""" #: Live pipeline topology resource. LIVE = "Live" #: Batch pipeline topology resource. BATCH = "Batch" + class LivePipelineState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current state of the pipeline (read-only). - """ + """Current state of the pipeline (read-only).""" #: The live pipeline is idle and not processing media. INACTIVE = "Inactive" @@ -121,9 +120,9 @@ class LivePipelineState(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The live pipeline is transitioning into the inactive state. DEACTIVATING = "Deactivating" + class MetricAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The metric aggregation type - """ + """The metric aggregation type""" #: The average. AVERAGE = "Average" @@ -132,9 +131,9 @@ class MetricAggregationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The sum. TOTAL = "Total" + class MetricUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The metric unit - """ + """The metric unit""" #: The number of bytes. BYTES = "Bytes" @@ -143,9 +142,9 @@ class MetricUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The number of milliseconds. MILLISECONDS = "Milliseconds" + class ParameterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of the parameter. - """ + """Type of the parameter.""" #: The parameter's value is a string. STRING = "String" @@ -158,9 +157,9 @@ class ParameterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: The parameter's value is a boolean value that is either true or false. BOOL = "Bool" + class PipelineJobState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Current state of the pipeline (read-only). - """ + """Current state of the pipeline (read-only).""" #: Pipeline job is processing. PROCESSING = "Processing" @@ -171,26 +170,26 @@ class PipelineJobState(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Pipeline job failed. FAILED = "Failed" + class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The current provisioning state. - """ + """The current provisioning state.""" SUCCEEDED = "Succeeded" CREATING = "Creating" DELETING = "Deleting" FAILED = "Failed" + class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The private endpoint connection status. - """ + """The private endpoint connection status.""" PENDING = "Pending" APPROVED = "Approved" REJECTED = "Rejected" + class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Provisioning state of the Video Analyzer account. - """ + """Provisioning state of the Video Analyzer account.""" #: Provisioning state failed. FAILED = "Failed" @@ -199,15 +198,16 @@ class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Provisioning state succeeded. SUCCEEDED = "Succeeded" + class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether or not public network access is allowed for resources under the Video Analyzer account. - """ + """Whether or not public network access is allowed for resources under the Video Analyzer account.""" #: Public network access is enabled. ENABLED = "Enabled" #: Public network access is disabled. DISABLED = "Disabled" + class RtspTransport(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are @@ -222,9 +222,9 @@ class RtspTransport(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: channel. TCP = "Tcp" + class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The SKU name. - """ + """The SKU name.""" #: Represents the Live S1 SKU name. Using this SKU you can create live pipelines to capture, #: record, and stream live video from RTSP-capable cameras at bitrate settings from 0.5 Kbps to @@ -234,20 +234,21 @@ class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: recorded content. BATCH_S1 = "Batch_S1" + class SkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The SKU tier. - """ + """The SKU tier.""" #: Standard tier. STANDARD = "Standard" + class VideoAnalyzerEndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of the endpoint. - """ + """The type of the endpoint.""" #: The client API endpoint. CLIENT_API = "ClientApi" + class VideoScaleMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes the video scaling mode to be applied. Default mode is 'Pad'. If the mode is 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is @@ -266,6 +267,7 @@ class VideoScaleMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: Stretches the original video so it resized to the specified dimensions. STRETCH = "Stretch" + class VideoType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Video content type. Different content types are suitable for different applications and scenarios. diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py index 62393a002a63..904bbb87ced2 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py @@ -25,21 +25,21 @@ from ._access_policies_operations import AccessPoliciesOperations __all__ = [ - 'EdgeModulesOperations', - 'PipelineTopologiesOperations', - 'LivePipelinesOperations', - 'PipelineJobsOperations', - 'LivePipelineOperationStatusesOperations', - 'PipelineJobOperationStatusesOperations', - 'Operations', - 'VideoAnalyzersOperations', - 'PrivateLinkResourcesOperations', - 'PrivateEndpointConnectionsOperations', - 'OperationStatusesOperations', - 'OperationResultsOperations', - 'VideoAnalyzerOperationStatusesOperations', - 'VideoAnalyzerOperationResultsOperations', - 'LocationsOperations', - 'VideosOperations', - 'AccessPoliciesOperations', + "EdgeModulesOperations", + "PipelineTopologiesOperations", + "LivePipelinesOperations", + "PipelineJobsOperations", + "LivePipelineOperationStatusesOperations", + "PipelineJobOperationStatusesOperations", + "Operations", + "VideoAnalyzersOperations", + "PrivateLinkResourcesOperations", + "PrivateEndpointConnectionsOperations", + "OperationStatusesOperations", + "OperationResultsOperations", + "VideoAnalyzerOperationStatusesOperations", + "VideoAnalyzerOperationResultsOperations", + "LocationsOperations", + "VideosOperations", + "AccessPoliciesOperations", ] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py index bc55cd89a9aa..32fba5b31f1a 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -20,9 +26,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class AccessPoliciesOperations(object): """AccessPoliciesOperations operations. @@ -70,33 +77,35 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.AccessPolicyEntityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntityCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntityCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -106,7 +115,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('AccessPolicyEntityCollection', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntityCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -125,10 +134,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies"} # type: ignore def get( self, @@ -153,31 +161,33 @@ def get( :rtype: ~video_analyzer.models.AccessPolicyEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -188,13 +198,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore def create_or_update( self, @@ -222,37 +233,39 @@ def create_or_update( :rtype: ~video_analyzer.models.AccessPolicyEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AccessPolicyEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "AccessPolicyEntity") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -263,16 +276,17 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore def delete( self, @@ -297,31 +311,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -335,7 +351,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore def update( self, @@ -363,37 +379,39 @@ def update( :rtype: ~video_analyzer.models.AccessPolicyEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessPolicyEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AccessPolicyEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "accessPolicyName": self._serialize.url("access_policy_name", access_policy_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AccessPolicyEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "AccessPolicyEntity") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -403,10 +421,11 @@ def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('AccessPolicyEntity', pipeline_response) + deserialized = self._deserialize("AccessPolicyEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py index d0415efb1f00..92d9d18e1844 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -20,9 +26,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class EdgeModulesOperations(object): """EdgeModulesOperations operations. @@ -70,33 +77,35 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.EdgeModuleEntityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleEntityCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleEntityCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -106,7 +115,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('EdgeModuleEntityCollection', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntityCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -125,10 +134,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules"} # type: ignore def get( self, @@ -153,31 +161,33 @@ def get( :rtype: ~video_analyzer.models.EdgeModuleEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -188,13 +198,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('EdgeModuleEntity', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}"} # type: ignore def create_or_update( self, @@ -228,37 +239,39 @@ def create_or_update( :rtype: ~video_analyzer.models.EdgeModuleEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'EdgeModuleEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "EdgeModuleEntity") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -269,16 +282,17 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('EdgeModuleEntity', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntity", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('EdgeModuleEntity', pipeline_response) + deserialized = self._deserialize("EdgeModuleEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}"} # type: ignore def delete( self, @@ -305,31 +319,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -343,7 +359,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}"} # type: ignore def list_provisioning_token( self, @@ -377,37 +393,39 @@ def list_provisioning_token( :rtype: ~video_analyzer.models.EdgeModuleProvisioningToken :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EdgeModuleProvisioningToken"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.EdgeModuleProvisioningToken"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.list_provisioning_token.metadata['url'] # type: ignore + url = self.list_provisioning_token.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "edgeModuleName": self._serialize.url("edge_module_name", edge_module_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ListProvisioningTokenInput') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "ListProvisioningTokenInput") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -417,10 +435,11 @@ def list_provisioning_token( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('EdgeModuleProvisioningToken', pipeline_response) + deserialized = self._deserialize("EdgeModuleProvisioningToken", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_provisioning_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}/listProvisioningToken'} # type: ignore + + list_provisioning_token.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}/listProvisioningToken"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py index 858c2ed4cecc..a4cfbca12da0 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class LivePipelineOperationStatusesOperations(object): """LivePipelineOperationStatusesOperations operations. @@ -70,32 +77,34 @@ def get( :rtype: ~video_analyzer.models.LivePipelineOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipelineOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -106,10 +115,11 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LivePipelineOperationStatus', pipeline_response) + deserialized = self._deserialize("LivePipelineOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py index 3d5a77eb7619..7dce70ef2a27 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -22,9 +28,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class LivePipelinesOperations(object): """LivePipelinesOperations operations. @@ -76,35 +83,37 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.LivePipelineCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipelineCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["$filter"] = self._serialize.query("filter", filter, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -114,7 +123,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LivePipelineCollection', pipeline_response) + deserialized = self._deserialize("LivePipelineCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -133,10 +142,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines"} # type: ignore def get( self, @@ -162,31 +170,33 @@ def get( :rtype: ~video_analyzer.models.LivePipeline :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipeline"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -197,13 +207,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore def create_or_update( self, @@ -231,37 +242,39 @@ def create_or_update( :rtype: ~video_analyzer.models.LivePipeline :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipeline"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LivePipeline') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "LivePipeline") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -272,16 +285,17 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore def delete( self, @@ -306,31 +320,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -344,7 +360,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore def update( self, @@ -374,37 +390,39 @@ def update( :rtype: ~video_analyzer.models.LivePipeline :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.LivePipeline"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LivePipelineUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "LivePipelineUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -414,13 +432,14 @@ def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LivePipeline', pipeline_response) + deserialized = self._deserialize("LivePipeline", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}"} # type: ignore def _activate_initial( self, @@ -430,31 +449,33 @@ def _activate_initial( **kwargs # type: Any ): # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self._activate_initial.metadata['url'] # type: ignore + url = self._activate_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -468,7 +489,7 @@ def _activate_initial( if cls: return cls(pipeline_response, None, {}) - _activate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + _activate_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate"} # type: ignore def begin_activate( self, @@ -498,49 +519,54 @@ def begin_activate( :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._activate_initial( resource_group_name=resource_group_name, account_name=account_name, live_pipeline_name=live_pipeline_name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + + begin_activate.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate"} # type: ignore def _deactivate_initial( self, @@ -550,31 +576,33 @@ def _deactivate_initial( **kwargs # type: Any ): # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self._deactivate_initial.metadata['url'] # type: ignore + url = self._deactivate_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -588,7 +616,7 @@ def _deactivate_initial( if cls: return cls(pipeline_response, None, {}) - _deactivate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore + _deactivate_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate"} # type: ignore def begin_deactivate( self, @@ -618,46 +646,51 @@ def begin_deactivate( :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._deactivate_initial( resource_group_name=resource_group_name, account_name=account_name, live_pipeline_name=live_pipeline_name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "livePipelineName": self._serialize.url("live_pipeline_name", live_pipeline_name, "str"), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore + + begin_deactivate.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py index 75989ff00eda..69f3a9944494 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class LocationsOperations(object): """LocationsOperations operations. @@ -64,35 +71,35 @@ def check_name_availability( :rtype: ~video_analyzer.models.CheckNameAvailabilityResponse :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.CheckNameAvailabilityResponse"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.check_name_availability.metadata['url'] # type: ignore + url = self.check_name_availability.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "locationName": self._serialize.url("location_name", location_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequest') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "CheckNameAvailabilityRequest") + body_content_kwargs["content"] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -102,10 +109,11 @@ def check_name_availability( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('CheckNameAvailabilityResponse', pipeline_response) + deserialized = self._deserialize("CheckNameAvailabilityResponse", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability'} # type: ignore + + check_name_availability.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py index 80e1bcbfba54..e5cee08891e9 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class OperationResultsOperations(object): """OperationResultsOperations operations. @@ -70,32 +77,34 @@ def get( :rtype: ~video_analyzer.models.PrivateEndpointConnection or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -108,10 +117,11 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py index d5ae754d7806..f84ebc743039 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class OperationStatusesOperations(object): """OperationStatusesOperations operations. @@ -70,32 +77,34 @@ def get( :rtype: ~video_analyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -106,10 +115,11 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerPrivateEndpointConnectionOperationStatus', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerPrivateEndpointConnectionOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py index 115ef91180df..74b61636b93c 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class Operations(object): """Operations operations. @@ -45,8 +52,7 @@ def __init__(self, client, config, serializer, deserializer): self._config = config def list( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> "_models.OperationCollection" """List Operations. @@ -58,24 +64,22 @@ def list( :rtype: ~video_analyzer.models.OperationCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.OperationCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -86,10 +90,11 @@ def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('OperationCollection', pipeline_response) + deserialized = self._deserialize("OperationCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/providers/Microsoft.Media/operations'} # type: ignore + + list.metadata = {"url": "/providers/Microsoft.Media/operations"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py index a734e3568bc0..49ef1a941fc9 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class PipelineJobOperationStatusesOperations(object): """PipelineJobOperationStatusesOperations operations. @@ -70,32 +77,34 @@ def get( :rtype: ~video_analyzer.models.PipelineJobOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJobOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -106,10 +115,11 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineJobOperationStatus', pipeline_response) + deserialized = self._deserialize("PipelineJobOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py index b0135e4e436d..ca27655f5355 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -22,9 +28,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class PipelineJobsOperations(object): """PipelineJobsOperations operations. @@ -76,35 +83,37 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.PipelineJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJobCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["$filter"] = self._serialize.query("filter", filter, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -114,7 +123,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PipelineJobCollection', pipeline_response) + deserialized = self._deserialize("PipelineJobCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -133,10 +142,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs"} # type: ignore def get( self, @@ -162,31 +170,33 @@ def get( :rtype: ~video_analyzer.models.PipelineJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -197,13 +207,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore def create_or_update( self, @@ -231,37 +242,39 @@ def create_or_update( :rtype: ~video_analyzer.models.PipelineJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineJob') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineJob") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -272,16 +285,17 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore def delete( self, @@ -306,31 +320,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -344,7 +360,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore def update( self, @@ -373,37 +389,39 @@ def update( :rtype: ~video_analyzer.models.PipelineJob :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineJob"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineJobUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineJobUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -413,13 +431,14 @@ def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineJob', pipeline_response) + deserialized = self._deserialize("PipelineJob", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}"} # type: ignore def _cancel_initial( self, @@ -429,31 +448,33 @@ def _cancel_initial( **kwargs # type: Any ): # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self._cancel_initial.metadata['url'] # type: ignore + url = self._cancel_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -467,7 +488,7 @@ def _cancel_initial( if cls: return cls(pipeline_response, None, {}) - _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore + _cancel_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel"} # type: ignore def begin_cancel( self, @@ -497,46 +518,51 @@ def begin_cancel( :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType[None] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._cancel_initial( resource_group_name=resource_group_name, account_name=account_name, pipeline_job_name=pipeline_job_name, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineJobName": self._serialize.url("pipeline_job_name", pipeline_job_name, "str"), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore + + begin_cancel.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py index 11f276a05470..fe5bf9785d7b 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -20,9 +26,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class PipelineTopologiesOperations(object): """PipelineTopologiesOperations operations. @@ -74,35 +81,37 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.PipelineTopologyCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopologyCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopologyCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters["$filter"] = self._serialize.query("filter", filter, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -112,7 +121,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PipelineTopologyCollection', pipeline_response) + deserialized = self._deserialize("PipelineTopologyCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -131,10 +140,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies"} # type: ignore def get( self, @@ -160,31 +168,33 @@ def get( :rtype: ~video_analyzer.models.PipelineTopology :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopology"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -195,13 +205,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore def create_or_update( self, @@ -232,37 +243,39 @@ def create_or_update( :rtype: ~video_analyzer.models.PipelineTopology :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopology"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineTopology') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineTopology") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -273,16 +286,17 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore def delete( self, @@ -308,31 +322,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -346,7 +362,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore def update( self, @@ -377,37 +393,39 @@ def update( :rtype: ~video_analyzer.models.PipelineTopology :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PipelineTopology"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "pipelineTopologyName": self._serialize.url("pipeline_topology_name", pipeline_topology_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PipelineTopologyUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PipelineTopologyUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -417,10 +435,11 @@ def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PipelineTopology', pipeline_response) + deserialized = self._deserialize("PipelineTopology", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py index c3b766fd902b..c2f0f0356427 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. @@ -64,30 +71,32 @@ def list( :rtype: ~video_analyzer.models.PrivateEndpointConnectionListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -98,13 +107,14 @@ def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections'} # type: ignore + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections"} # type: ignore def get( self, @@ -129,31 +139,33 @@ def get( :rtype: ~video_analyzer.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -164,13 +176,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}"} # type: ignore def create_or_update( self, @@ -198,37 +211,39 @@ def create_or_update( :rtype: ~video_analyzer.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "PrivateEndpointConnection") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -239,16 +254,19 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}"} # type: ignore def delete( self, @@ -273,31 +291,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -311,4 +331,4 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py index 939af8cae0e4..1ec1236404e5 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. @@ -64,30 +71,32 @@ def list( :rtype: ~video_analyzer.models.PrivateLinkResourceListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -98,13 +107,14 @@ def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources'} # type: ignore + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources"} # type: ignore def get( self, @@ -129,31 +139,33 @@ def get( :rtype: ~video_analyzer.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.PrivateLinkResource"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "name": self._serialize.url("name", name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -164,10 +176,11 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + deserialized = self._deserialize("PrivateLinkResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources/{name}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources/{name}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py index 6eb4b071fe57..66aa78ed5851 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class VideoAnalyzerOperationResultsOperations(object): """VideoAnalyzerOperationResultsOperations operations. @@ -64,30 +71,30 @@ def get( :rtype: ~video_analyzer.models.VideoAnalyzer or None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VideoAnalyzer"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[Optional["_models.VideoAnalyzer"]] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "locationName": self._serialize.url("location_name", location_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -100,10 +107,11 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationResults/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationResults/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py index 06a067e8df24..e8a630a20ee2 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat @@ -19,9 +25,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class VideoAnalyzerOperationStatusesOperations(object): """VideoAnalyzerOperationStatusesOperations operations. @@ -64,30 +71,30 @@ def get( :rtype: ~video_analyzer.models.VideoAnalyzerOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerOperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerOperationStatus"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "locationName": self._serialize.url("location_name", location_name, "str"), + "operationId": self._serialize.url("operation_id", operation_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -98,10 +105,11 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerOperationStatus', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerOperationStatus", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationStatuses/{operationId}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationStatuses/{operationId}"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py index 05b6b1a521c2..fae67f807501 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod @@ -21,9 +27,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class VideoAnalyzersOperations(object): """VideoAnalyzersOperations operations. @@ -63,29 +70,31 @@ def list( :rtype: ~video_analyzer.models.VideoAnalyzerCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -96,13 +105,14 @@ def list( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerCollection', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers'} # type: ignore + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers"} # type: ignore def get( self, @@ -124,30 +134,32 @@ def get( :rtype: ~video_analyzer.models.VideoAnalyzer :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -158,13 +170,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore def _create_or_update_initial( self, @@ -174,36 +187,38 @@ def _create_or_update_initial( **kwargs # type: Any ): # type: (...) -> "_models.VideoAnalyzer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoAnalyzer') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoAnalyzer") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -215,19 +230,22 @@ def _create_or_update_initial( response_headers = {} if response.status_code == 200: - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if response.status_code == 201: - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + _create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore def begin_create_or_update( self, @@ -257,51 +275,56 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~video_analyzer.models.VideoAnalyzer] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, account_name=account_name, parameters=parameters, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore def delete( self, @@ -323,30 +346,32 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -360,7 +385,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore def _update_initial( self, @@ -370,36 +395,38 @@ def _update_initial( **kwargs # type: Any ): # type: (...) -> "_models.VideoAnalyzer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoAnalyzerUpdate') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoAnalyzerUpdate") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -410,16 +437,19 @@ def _update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + _update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore def begin_update( self, @@ -449,60 +479,66 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~video_analyzer.models.VideoAnalyzer] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token = kwargs.pop("continuation_token", None) # type: Optional[str] if cont_token is None: raw_result = self._update_initial( resource_group_name=resource_group_name, account_name=account_name, parameters=parameters, - cls=lambda x,y,z: x, + cls=lambda x, y, z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + kwargs.pop("error_map", None) + kwargs.pop("content_type", None) def get_long_running_output(pipeline_response): response_headers = {} response = pipeline_response.http_response - response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) - response_headers['Location']=self._deserialize('str', response.headers.get('Location')) - response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) - deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + deserialized = self._deserialize("VideoAnalyzer", pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling + if polling is True: + polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: + polling_method = NoPolling() + else: + polling_method = polling if cont_token: return LROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, - deserialization_callback=get_long_running_output + deserialization_callback=get_long_running_output, ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + begin_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}"} # type: ignore def list_by_subscription( - self, - **kwargs # type: Any + self, **kwargs # type: Any ): # type: (...) -> "_models.VideoAnalyzerCollection" """List Video Analyzer accounts. @@ -514,28 +550,28 @@ def list_by_subscription( :rtype: ~video_analyzer.models.VideoAnalyzerCollection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoAnalyzerCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_subscription.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -546,10 +582,11 @@ def list_by_subscription( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoAnalyzerCollection', pipeline_response) + deserialized = self._deserialize("VideoAnalyzerCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/videoAnalyzers'} # type: ignore + + list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Media/videoAnalyzers"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py index 31265c5126e2..ebc33ca20f1f 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py @@ -8,7 +8,13 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -20,9 +26,10 @@ # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') + T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + class VideosOperations(object): """VideosOperations operations. @@ -71,33 +78,35 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.VideoEntityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntityCollection"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntityCollection"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters["$top"] = self._serialize.query("top", top, "int") request = self._client.get(url, query_parameters, header_parameters) else: @@ -107,7 +116,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VideoEntityCollection', pipeline_response) + deserialized = self._deserialize("VideoEntityCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,10 +135,9 @@ def get_next(next_link=None): return pipeline_response - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos'} # type: ignore + return ItemPaged(get_next, extract_data) + + list.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos"} # type: ignore def get( self, @@ -154,31 +162,33 @@ def get( :rtype: ~video_analyzer.models.VideoEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -189,13 +199,14 @@ def get( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + + get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore def create_or_update( self, @@ -223,37 +234,39 @@ def create_or_update( :rtype: ~video_analyzer.models.VideoEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create_or_update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoEntity") + body_content_kwargs["content"] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -264,16 +277,17 @@ def create_or_update( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + + create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore def delete( self, @@ -298,31 +312,33 @@ def delete( :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType[None] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.delete.metadata['url'] # type: ignore + url = self.delete.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -336,7 +352,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + delete.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore def update( self, @@ -364,37 +380,39 @@ def update( :rtype: ~video_analyzer.models.VideoEntity :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoEntity"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoEntity"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self.update.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Content-Type"] = self._serialize.header("content_type", content_type, "str") + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VideoEntity') - body_content_kwargs['content'] = body_content + body_content = self._serialize.body(parameters, "VideoEntity") + body_content_kwargs["content"] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -404,13 +422,14 @@ def update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoEntity', pipeline_response) + deserialized = self._deserialize("VideoEntity", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore + + update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}"} # type: ignore def list_content_token( self, @@ -436,31 +455,33 @@ def list_content_token( :rtype: ~video_analyzer.models.VideoContentToken :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoContentToken"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) + cls = kwargs.pop("cls", None) # type: ClsType["_models.VideoContentToken"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list_content_token.metadata['url'] # type: ignore + url = self.list_content_token.metadata["url"] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'videoName': self._serialize.url("video_name", video_name, 'str'), + "subscriptionId": self._serialize.url( + "self._config.subscription_id", self._config.subscription_id, "str", min_length=1 + ), + "resourceGroupName": self._serialize.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": self._serialize.url("account_name", account_name, "str"), + "videoName": self._serialize.url("video_name", video_name, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters["api-version"] = self._serialize.query("api_version", api_version, "str") # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters["Accept"] = self._serialize.header("accept", accept, "str") request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -471,10 +492,11 @@ def list_content_token( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoContentToken', pipeline_response) + deserialized = self._deserialize("VideoContentToken", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_content_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken'} # type: ignore + + list_content_token.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken"} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/setup.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/setup.py index 85246726228a..fc1f22e9937b 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/setup.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/_patch.py b/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/_patch.py index e89f5197c4e8..cf7a5e2ec6bf 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/_patch.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Optional, Union from azure.core.tracing.decorator import distributed_trace from . import models as _models diff --git a/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/aio/_patch.py b/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/aio/_patch.py index 4b6076ad0f72..18d991b279d1 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/aio/_patch.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, Optional, Union from azure.core.tracing.decorator_async import distributed_trace_async from .. import models as _models diff --git a/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/models/_patch.py b/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/models/_patch.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/azure/ai/vision/imageanalysis/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_caption_image_file_async.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_caption_image_file_async.py index 35b3b001da4a..5f0a83de8bd0 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_caption_image_file_async.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_caption_image_file_async.py @@ -11,9 +11,9 @@ You have the option to request gender-neutral terms such as "person" or "child" by setting `gender_neutral_caption = True` when calling `analyze`, as shown in this example. - The asynchronous (non-blocking) `analyze` method call, when completes, returns + The asynchronous (non-blocking) `analyze` method call, when completes, returns an `ImageAnalysisResult` object. Its `caption` property (a `CaptionResult` object) contains: - - The text of the caption. Captions are only supported in English at the moment. + - The text of the caption. Captions are only supported in English at the moment. - A confidence score in the range [0, 1], with higher values indicating greater confidences in the caption. @@ -25,6 +25,7 @@ where `your-resource-name` is your unique Azure Computer Vision resource name. 2) VISION_KEY - Your Computer Vision key (a 32-character Hexadecimal number) """ + import asyncio @@ -48,16 +49,10 @@ async def sample_caption_image_file_async(): image_data = f.read() # Create an asynchronous Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Get a caption for the image, asynchronously. - result = await client.analyze( - image_data=image_data, - visual_features=[VisualFeatures.CAPTION] - ) + result = await client.analyze(image_data=image_data, visual_features=[VisualFeatures.CAPTION]) await client.close() diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_async.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_async.py index 103b79406589..86a999e9d018 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_async.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_async.py @@ -10,7 +10,7 @@ The asynchronous `analyze` method call returns an `ImageAnalysisResult` object. Its `read` property (a `ReadResult` object) includes a list of `TextBlock` objects. Currently, the list will always contain one element only, as the service does not yet support grouping text lines - into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: + into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: - The text content of the line. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the line of text in the image. - A list of `DocumentWord` objects. @@ -18,7 +18,7 @@ - The text content of the word. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the word in the image. - A confidence score in the range [0, 1], with higher values indicating greater confidences in - the recognition of the word. + the recognition of the word. USAGE: python sample_ocr_image_url_async.py @@ -28,6 +28,7 @@ where `your-resource-name` is your unique Azure Computer Vision resource name. 2) VISION_KEY - Your Computer Vision key (a 32-character Hexadecimal number) """ + import asyncio @@ -47,15 +48,11 @@ async def sample_ocr_image_url_async(): exit() # Create an asynchronous Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Extract text (OCR) from an image URL, asynchronously. result = await client.analyze_from_url( - image_url="https://aka.ms/azsdk/image-analysis/sample.jpg", - visual_features=[VisualFeatures.READ] + image_url="https://aka.ms/azsdk/image-analysis/sample.jpg", visual_features=[VisualFeatures.READ] ) await client.close() @@ -67,7 +64,9 @@ async def sample_ocr_image_url_async(): for line in result.read.blocks[0].lines: print(f" Line: '{line.text}', Bounding box {line.bounding_polygon}") for word in line.words: - print(f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}") + print( + f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}" + ) print(f" Image height: {result.metadata.height}") print(f" Image width: {result.metadata.width}") print(f" Model version: {result.model_version}") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_entra_id_auth_async.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_entra_id_auth_async.py index e3bc95c2197c..542b22398077 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_entra_id_auth_async.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/async_samples/sample_ocr_image_url_entra_id_auth_async.py @@ -10,7 +10,7 @@ The asynchronous `analyze` method call returns an `ImageAnalysisResult` object. Its `read` property (a `ReadResult` object) includes a list of `TextBlock` objects. Currently, the list will always contain one element only, as the service does not yet support grouping text lines - into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: + into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: - The text content of the line. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the line of text in the image. - A list of `DocumentWord` objects. @@ -18,7 +18,7 @@ - The text content of the word. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the word in the image. - A confidence score in the range [0, 1], with higher values indicating greater confidences in - the recognition of the word. + the recognition of the word. USAGE: python sample_ocr_image_url_entra_id_auth_async.py @@ -27,6 +27,7 @@ VISION_ENDPOINT - Your endpoint URL, in the form https://your-resource-name.cognitiveservices.azure.com where `your-resource-name` is your unique Azure Computer Vision resource name. """ + import asyncio @@ -52,8 +53,7 @@ async def sample_ocr_image_url_entra_id_auth_async(): # Extract text (OCR) from an image URL, asynchronously. result = await client.analyze_from_url( - image_url="https://aka.ms/azsdk/image-analysis/sample.jpg", - visual_features=[VisualFeatures.READ] + image_url="https://aka.ms/azsdk/image-analysis/sample.jpg", visual_features=[VisualFeatures.READ] ) await client.close() @@ -65,7 +65,9 @@ async def sample_ocr_image_url_entra_id_auth_async(): for line in result.read.blocks[0].lines: print(f" Line: '{line.text}', Bounding box {line.bounding_polygon}") for word in line.words: - print(f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}") + print( + f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}" + ) print(f" Image height: {result.metadata.height}") print(f" Image width: {result.metadata.width}") print(f" Model version: {result.model_version}") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_analyze_all_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_analyze_all_image_file.py index 08ce7f3d584c..6a04a2faf266 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_analyze_all_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_analyze_all_image_file.py @@ -70,11 +70,7 @@ def sample_analyze_all_image_file(): # [START create_client_with_logging] # Create an Image Analysis client with none redacted log - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key), - logging_enable=True - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key), logging_enable=True) # [END create_client_with_logging] # Analyze all visual features from an image stream. This will be a synchronously (blocking) call. @@ -112,7 +108,9 @@ def sample_analyze_all_image_file(): for line in result.read.blocks[0].lines: print(f" Line: '{line.text}', Bounding box {line.bounding_polygon}") for word in line.words: - print(f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}") + print( + f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}" + ) if result.tags is not None: print(" Tags:") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file.py index d5fd0a12fc6d..f4a542b262b0 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file.py @@ -13,7 +13,7 @@ The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `caption` property (a `CaptionResult` object) contains: - - The text of the caption. Captions are only supported in English at the moment. + - The text of the caption. Captions are only supported in English at the moment. - A confidence score in the range [0, 1], with higher values indicating greater confidences in the caption. @@ -46,10 +46,7 @@ def sample_caption_image_file(): # Create an Image Analysis client for synchronous operations, # using API key authentication - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # [END create_client] # [START caption] diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file_entra_id_auth.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file_entra_id_auth.py index e4fd3387e947..c138c917db87 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file_entra_id_auth.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_file_entra_id_auth.py @@ -13,7 +13,7 @@ The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `caption` property (a `CaptionResult` object) contains: - - The text of the caption. Captions are only supported in English at the moment. + - The text of the caption. Captions are only supported in English at the moment. - A confidence score in the range [0, 1], with higher values indicating greater confidences in the caption. diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_url.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_url.py index fe9dad3aa4a1..f432d81ec29c 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_url.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_caption_image_url.py @@ -13,7 +13,7 @@ The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `caption` property (a `CaptionResult` object) contains: - - The text of the caption. Captions are only supported in English at the moment. + - The text of the caption. Captions are only supported in English at the moment. - A confidence score in the range [0, 1], with higher values indicating greater confidences in the caption. @@ -44,10 +44,7 @@ def sample_caption_image_url(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # [START caption] # Get a caption for the image. This will be a synchronously (blocking) call. diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_dense_captions_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_dense_captions_image_file.py index 8f268cb76ee0..baba031bd550 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_dense_captions_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_dense_captions_image_file.py @@ -15,7 +15,7 @@ The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `dense_captions` property (a `DenseCaptionsResult` object) includes a list of up to 10 `DenseCaption` objects. Each one of them contains: - - The text of the caption. Captions are only supported in English at the moment. + - The text of the caption. Captions are only supported in English at the moment. - A confidence score in the range [0, 1], with higher values indicating greater confidences in the caption. - A `BoundingBox` coordinates in pixels, for a rectangular marking the area in the image associated @@ -48,10 +48,7 @@ def sample_dense_captions_image_file(): exit() # Create an Image Analysis client. - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Load image to analyze into a 'bytes' object. with open("sample.jpg", "rb") as f: diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_objects_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_objects_image_file.py index b3aec2ead684..b835ae4c20d9 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_objects_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_objects_image_file.py @@ -8,7 +8,7 @@ The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `objects` property (a `ObjectsResult` object) contains a list of `DetectedObject` objects. Each has: - - The object name, for example: "chair", "laptop". + - The object name, for example: "chair", "laptop". - A confidence score in the range [0, 1], with higher values indicating greater confidences in the detection. - A `BoundingBox` coordinates in pixels, for a rectangular surrounding the object in the image. @@ -41,20 +41,14 @@ def sample_objects_image_file(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Load image to analyze into a 'bytes' object with open("sample.jpg", "rb") as f: image_data = f.read() # Detect objects in an image stream. This will be a synchronously (blocking) call. - result = client.analyze( - image_data=image_data, - visual_features=[VisualFeatures.OBJECTS] - ) + result = client.analyze(image_data=image_data, visual_features=[VisualFeatures.OBJECTS]) # Print Objects analysis results to the console print("Image analysis results:") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_file.py index 3715bf4618a6..acd54baf6761 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_file.py @@ -10,7 +10,7 @@ The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `read` property (a `ReadResult` object) includes a list of `TextBlock` objects. Currently, the list will always contain one element only, as the service does not yet support grouping text lines - into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: + into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: - The text content of the line. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the line of text in the image. - A list of `DocumentWord` objects. @@ -18,7 +18,7 @@ - The text content of the word. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the word in the image. - A confidence score in the range [0, 1], with higher values indicating greater confidences in - the recognition of the word. + the recognition of the word. USAGE: python sample_ocr_image_file.py @@ -47,10 +47,7 @@ def sample_ocr_image_file(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # [START read] # Load image to analyze into a 'bytes' object @@ -58,10 +55,7 @@ def sample_ocr_image_file(): image_data = f.read() # Extract text (OCR) from an image stream. This will be a synchronously (blocking) call. - result = client.analyze( - image_data=image_data, - visual_features=[VisualFeatures.READ] - ) + result = client.analyze(image_data=image_data, visual_features=[VisualFeatures.READ]) # Print text (OCR) analysis results to the console print("Image analysis results:") @@ -70,7 +64,9 @@ def sample_ocr_image_file(): for line in result.read.blocks[0].lines: print(f" Line: '{line.text}', Bounding box {line.bounding_polygon}") for word in line.words: - print(f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}") + print( + f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}" + ) # [END read] print(f" Image height: {result.metadata.height}") print(f" Image width: {result.metadata.width}") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_url.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_url.py index 96a835bb9cb3..0f0402662fa5 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_url.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_ocr_image_url.py @@ -4,13 +4,13 @@ # ------------------------------------ """ DESCRIPTION: - This sample demonstrates how to extract printed or hand-written text from a + This sample demonstrates how to extract printed or hand-written text from a publicly accessible image URL, using a synchronous client. The synchronous (blocking) `analyze` method call returns an `ImageAnalysisResult` object. Its `read` property (a `ReadResult` object) includes a list of `TextBlock` objects. Currently, the list will always contain one element only, as the service does not yet support grouping text lines - into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: + into separate blocks. The `TextBlock` object contains a list of `DocumentLine` object. Each one includes: - The text content of the line. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the line of text in the image. - A list of `DocumentWord` objects. @@ -18,7 +18,7 @@ - The text content of the word. - A `BoundingPolygon` coordinates in pixels, for a polygon surrounding the word in the image. - A confidence score in the range [0, 1], with higher values indicating greater confidences in - the recognition of the word. + the recognition of the word. USAGE: python sample_ocr_image_url.py @@ -47,16 +47,12 @@ def sample_ocr_image_url(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # [START read] # Extract text (OCR) from an image stream. This will be a synchronously (blocking) call. result = client.analyze_from_url( - image_url="https://aka.ms/azsdk/image-analysis/sample.jpg", - visual_features=[VisualFeatures.READ] + image_url="https://aka.ms/azsdk/image-analysis/sample.jpg", visual_features=[VisualFeatures.READ] ) # Print text (OCR) analysis results to the console @@ -66,7 +62,9 @@ def sample_ocr_image_url(): for line in result.read.blocks[0].lines: print(f" Line: '{line.text}', Bounding box {line.bounding_polygon}") for word in line.words: - print(f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}") + print( + f" Word: '{word.text}', Bounding polygon {word.bounding_polygon}, Confidence {word.confidence:.4f}" + ) # [END read] print(f" Image height: {result.metadata.height}") print(f" Image width: {result.metadata.width}") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_people_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_people_image_file.py index c540bcf0c897..6a0bfe0cd066 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_people_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_people_image_file.py @@ -10,7 +10,7 @@ Its `people` property (a `PeopleResult` object) contains a list of `DetectedPerson` objects. Each one contains: - A confidence score in the range [0, 1], with higher values indicating greater confidences in - the detection of a person. + the detection of a person. - A `BoundingBox` coordinates in pixels, for a rectangle surrounding the person in the image. USAGE: @@ -40,20 +40,14 @@ def sample_people_image_file(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Load image to analyze into a 'bytes' object with open("sample.jpg", "rb") as f: image_data = f.read() # Find people in an image stream. This will be a synchronously (blocking) call. - result = client.analyze( - image_data=image_data, - visual_features=[VisualFeatures.PEOPLE] - ) + result = client.analyze(image_data=image_data, visual_features=[VisualFeatures.PEOPLE]) # Print People analysis results to the console print("Image analysis results:") diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_smart_crops_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_smart_crops_image_file.py index c9d4cdeec8d2..5c38d1385a3c 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_smart_crops_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_smart_crops_image_file.py @@ -7,11 +7,11 @@ This sample demonstrates how to find representatives sub-regions of the image file sample.jpg, for thumbnail generation, with priority given to include faces. It uses an asynchronous client. - Thumbnails often need to have a certain aspect ratio, where aspect ratio is defined as the + Thumbnails often need to have a certain aspect ratio, where aspect ratio is defined as the width in pixels divided by the height in pixels. For example, 1.0 for a square image, or 1.77 for a 16:9 widescreen image. - You can optionally request one or more aspect ratios by setting the `smart_crops_aspect_ratios` + You can optionally request one or more aspect ratios by setting the `smart_crops_aspect_ratios` argument in the call to `analyze`. Supported values are from 0.75 to 1.8 (inclusive). If you do not set this value, the service will return one result with an aspect ratio it sees fit between 0.5 and 2.0 (inclusive). @@ -49,10 +49,7 @@ def sample_smart_crops_image_file(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Load image to analyze into a 'bytes' object with open("sample.jpg", "rb") as f: diff --git a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_tags_image_file.py b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_tags_image_file.py index d2cc94f3f746..b32c783f961e 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_tags_image_file.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/samples/sample_tags_image_file.py @@ -42,10 +42,7 @@ def sample_tags_image_file(): exit() # Create an Image Analysis client - client = ImageAnalysisClient( - endpoint=endpoint, - credential=AzureKeyCredential(key) - ) + client = ImageAnalysisClient(endpoint=endpoint, credential=AzureKeyCredential(key)) # Load image to analyze into a 'bytes' object with open("sample.jpg", "rb") as f: diff --git a/sdk/vision/azure-ai-vision-imageanalysis/setup.py b/sdk/vision/azure-ai-vision-imageanalysis/setup.py index 47b02d2e77bf..5707ce8fb937 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/setup.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-ai-vision-imageanalysis" PACKAGE_PPRINT_NAME = "Azure Ai Vision Imageanalysis" diff --git a/sdk/vision/azure-ai-vision-imageanalysis/tests/image_analysis_test_base.py b/sdk/vision/azure-ai-vision-imageanalysis/tests/image_analysis_test_base.py index 30248a7e57e8..ac0794db9bcd 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/tests/image_analysis_test_base.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/tests/image_analysis_test_base.py @@ -56,7 +56,9 @@ def _create_client_for_standard_analysis(self, sync: bool, get_connection_url: b credential = AzureKeyCredential(key) self._create_client(endpoint, credential, sync, get_connection_url) - def _create_client_for_standard_analysis_with_entra_id_auth(self, sync: bool, get_connection_url: bool = False, **kwargs): + def _create_client_for_standard_analysis_with_entra_id_auth( + self, sync: bool, get_connection_url: bool = False, **kwargs + ): endpoint = kwargs.pop("vision_endpoint") # See /eng/tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py for `get_credential` if sync: @@ -71,7 +73,13 @@ def _create_client_for_authentication_failure(self, sync: bool, **kwargs): credential = AzureKeyCredential(key) self._create_client(endpoint, credential, sync, False) - def _create_client(self, endpoint: str, credential: Union[AzureKeyCredential, TokenCredential], sync: bool, get_connection_url: bool): + def _create_client( + self, + endpoint: str, + credential: Union[AzureKeyCredential, TokenCredential], + sync: bool, + get_connection_url: bool, + ): if sync: self.client = sdk.ImageAnalysisClient( diff --git a/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_async_client.py b/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_async_client.py index 3bfceee97975..c5ae87d622f8 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_async_client.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_async_client.py @@ -79,7 +79,9 @@ async def test_analyze_async_single_feature_from_file_entra_id_auth(self, **kwar self._create_client_for_standard_analysis_with_entra_id_auth(sync=False, **kwargs) - await self._do_async_analysis(image_source=self.IMAGE_FILE,visual_features=[sdk.models.VisualFeatures.SMART_CROPS], **kwargs) + await self._do_async_analysis( + image_source=self.IMAGE_FILE, visual_features=[sdk.models.VisualFeatures.SMART_CROPS], **kwargs + ) await self.async_client.close() diff --git a/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_client.py b/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_client.py index 508be2b23f9f..99fb54a77213 100644 --- a/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_client.py +++ b/sdk/vision/azure-ai-vision-imageanalysis/tests/test_image_analysis_client.py @@ -72,7 +72,7 @@ def test_analyze_sync_single_feature_from_url_entra_id_auth(self, **kwargs): self._create_client_for_standard_analysis_with_entra_id_auth(sync=True, **kwargs) - self._do_analysis(image_source=self.IMAGE_URL,visual_features=[sdk.models.VisualFeatures.OBJECTS], **kwargs) + self._do_analysis(image_source=self.IMAGE_URL, visual_features=[sdk.models.VisualFeatures.OBJECTS], **kwargs) self.client.close() diff --git a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_patch.py b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_patch.py +++ b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/aio/_patch.py b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/aio/_patch.py index cc4c9b20db54..a85c28fb589c 100644 --- a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/aio/_patch.py +++ b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/aio/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + import sys import json import logging diff --git a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_models.py b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_models.py index 2f7200c86799..ffb562ff3d6e 100644 --- a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_models.py +++ b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_models.py @@ -4286,6 +4286,7 @@ def deserialize(cls, payload: dict[str, Any]) -> "ServerEvent": # pylint: disable-next=protected-access return cls._deserialize(payload, []) + class ServerEventConversationItemCreated(ServerEvent, discriminator="conversation.item.created"): """Returned when a conversation item is created. There are several scenarios that produce this event: diff --git a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_patch.py b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_patch.py index a3dfdf99fb0e..2de8b96c7dd6 100644 --- a/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_patch.py +++ b/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any from ._models import RequestSession as GeneratedRequestSession diff --git a/sdk/voicelive/azure-ai-voicelive/samples/async_function_calling_sample.py b/sdk/voicelive/azure-ai-voicelive/samples/async_function_calling_sample.py index 2d80f8bcb16b..9f1177c88ac5 100644 --- a/sdk/voicelive/azure-ai-voicelive/samples/async_function_calling_sample.py +++ b/sdk/voicelive/azure-ai-voicelive/samples/async_function_calling_sample.py @@ -17,11 +17,11 @@ USAGE: python async_function_calling_sample.py - + Set the environment variables with your own values before running the sample: 1) AZURE_VOICELIVE_API_KEY - The Azure VoiceLive API key 2) AZURE_VOICELIVE_ENDPOINT - The Azure VoiceLive endpoint - + REQUIREMENTS: - azure-ai-voicelive - python-dotenv diff --git a/sdk/voicelive/azure-ai-voicelive/samples/basic_voice_assistant_async.py b/sdk/voicelive/azure-ai-voicelive/samples/basic_voice_assistant_async.py index d33463590024..d6b85a3525b4 100644 --- a/sdk/voicelive/azure-ai-voicelive/samples/basic_voice_assistant_async.py +++ b/sdk/voicelive/azure-ai-voicelive/samples/basic_voice_assistant_async.py @@ -13,16 +13,16 @@ DESCRIPTION: This sample demonstrates the fundamental capabilities of the VoiceLive SDK by creating a basic voice assistant that can engage in natural conversation with proper interruption - handling. This serves as the foundational example that showcases the core value + handling. This serves as the foundational example that showcases the core value proposition of unified speech-to-speech interaction. USAGE: python basic_voice_assistant_async.py - + Set the environment variables with your own values before running the sample: 1) AZURE_VOICELIVE_API_KEY - The Azure VoiceLive API key 2) AZURE_VOICELIVE_ENDPOINT - The Azure VoiceLive endpoint - + Or copy .env.template to .env and fill in your values. REQUIREMENTS: diff --git a/sdk/voicelive/azure-ai-voicelive/tests/test_live_realtime_service.py b/sdk/voicelive/azure-ai-voicelive/tests/test_live_realtime_service.py index f8d342b700cd..67306e910f68 100644 --- a/sdk/voicelive/azure-ai-voicelive/tests/test_live_realtime_service.py +++ b/sdk/voicelive/azure-ai-voicelive/tests/test_live_realtime_service.py @@ -152,10 +152,7 @@ async def _collect_audio_trans_outputs(conn, duration_s: float) -> int: except asyncio.TimeoutError: break - if ( - event.type == ServerEventType.RESPONSE_AUDIO_DELTA - or event.type == ServerEventType.RESPONSE_AUDIO_DONE - ): + if event.type == ServerEventType.RESPONSE_AUDIO_DELTA or event.type == ServerEventType.RESPONSE_AUDIO_DONE: audio_events += 1 if ( @@ -733,7 +730,10 @@ async def test_realtime_service_live_session_update( function_call_output = await _wait_for_event(conn, {ServerEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE}) assert isinstance(function_call_output, ServerEventResponseFunctionCallArgumentsDone) assert function_call_output.name == "get_weather" - assert function_call_output.arguments.replace(" ", "").replace("\n", "") in ['{"location":"北京"}', '{"location":"Beijing"}'] + assert function_call_output.arguments.replace(" ", "").replace("\n", "") in [ + '{"location":"北京"}', + '{"location":"Beijing"}', + ] await conn.response.create() transcripts, audio_bytes = await _collect_event( @@ -830,10 +830,7 @@ async def test_realtime_service_input_audio_transcription( model=model, api_version=api_version, ) as conn: - input_audio_transcription = AudioInputTranscriptionOptions( - model=transcription_model, - language="en" - ) + input_audio_transcription = AudioInputTranscriptionOptions(model=transcription_model, language="en") session = RequestSession( input_audio_transcription=input_audio_transcription, instructions="You are a helpful assistant. Please respond briefly.", @@ -885,7 +882,8 @@ async def test_realtime_service_with_eou( model: str, turn_detection_cls: Type[Union["ServerVad", "AzureSemanticVad", "AzureSemanticVadMultilingual"]], end_of_detection: Type[Union["AzureSemanticDetection", "AzureSemanticDetectionEn"]], - api_version: str, **kwargs, + api_version: str, + **kwargs, ): file = test_data_dir / "4-1.wav" voicelive_openai_endpoint = kwargs.pop("voicelive_openai_endpoint") @@ -1183,7 +1181,13 @@ async def test_realtime_service_truncate_item(self, test_data_dir: Path, model: ) @pytest.mark.parametrize("api_version", ["2025-10-01", "2026-01-01-preview"]) async def test_realtime_service_with_input_audio_format( - self, test_data_dir: Path, model: str, audio_format: InputAudioFormat, turn_detection: TurnDetection, api_version: str, **kwargs + self, + test_data_dir: Path, + model: str, + audio_format: InputAudioFormat, + turn_detection: TurnDetection, + api_version: str, + **kwargs, ): """Test that all supported input_audio_format values work correctly with all models. diff --git a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/_patch.py b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/_patch.py +++ b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/_patch.py b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/_patch.py +++ b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/operations/_patch.py b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/operations/_patch.py +++ b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/models/_patch.py b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/models/_patch.py +++ b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/operations/_patch.py b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/operations/_patch.py +++ b/sdk/voiceservices/azure-mgmt-voiceservices/azure/mgmt/voiceservices/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/voiceservices/azure-mgmt-voiceservices/setup.py b/sdk/voiceservices/azure-mgmt-voiceservices/setup.py index 41c36537f960..523dd61d2f0d 100644 --- a/sdk/voiceservices/azure-mgmt-voiceservices/setup.py +++ b/sdk/voiceservices/azure-mgmt-voiceservices/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Voiceservices Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "isodate<1.0.0,>=0.6.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world.py b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world.py index 371c77b21091..67987399ae91 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world.py @@ -37,7 +37,7 @@ def on_group_message(msg: OnGroupDataMessageArgs): def main(): - service_client = WebPubSubServiceClient.from_connection_string( # type: ignore + service_client = WebPubSubServiceClient.from_connection_string( # type: ignore connection_string=os.getenv("WEBPUBSUB_CONNECTION_STRING", ""), hub="hub" ) client = WebPubSubClient( diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_async.py b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_async.py index 77ee5c11d275..f4c72c804f88 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_async.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_async.py @@ -41,10 +41,12 @@ async def main(): service_client = WebPubSubServiceClient.from_connection_string( # type: ignore connection_string=os.getenv("WEBPUBSUB_CONNECTION_STRING", ""), hub="hub" ) + async def client_access_url_provider(): - return (await service_client.get_client_access_token( - roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"] - ))["url"] + return ( + await service_client.get_client_access_token(roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"]) + )["url"] + client = WebPubSubClient( credential=WebPubSubClientCredential(client_access_url_provider=client_access_url_provider), ) @@ -55,9 +57,7 @@ async def client_access_url_provider(): await client.subscribe(CallbackType.GROUP_MESSAGE, on_group_message) group_name = "hello_world_async" await client.join_group(group_name) - await client.send_to_group( - group_name, "hello text", WebPubSubDataType.TEXT, no_echo=False, ack=False - ) + await client.send_to_group(group_name, "hello text", WebPubSubDataType.TEXT, no_echo=False, ack=False) await client.send_to_group(group_name, {"hello": "json"}, WebPubSubDataType.JSON) await client.send_to_group(group_name, "hello text", WebPubSubDataType.TEXT) content = memoryview("hello binary".encode()) diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_exceptions.py b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_exceptions.py index b9ca3cf3d648..fdf6734db2bf 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_exceptions.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/hello_world_exceptions.py @@ -14,6 +14,7 @@ _LOGGER = logging.getLogger(__name__) + # The following code is to show how to handle exceptions in WebPubSubClient, and it # may not run directly def main(): @@ -53,7 +54,7 @@ def main(): # may want to handle it with reference of https://learn.microsoft.com/azure/azure-web-pubsub/concept-client-protocols#ack-response elif err.error_detail.name == "...": pass - + client.close() diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/send_compare_between_async_sync.py b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/send_compare_between_async_sync.py index b8a2dd32f043..e4661495ca15 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/samples/send_compare_between_async_sync.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/samples/send_compare_between_async_sync.py @@ -23,28 +23,25 @@ def client_access_url_provider(): - service_client = WebPubSubServiceClient.from_connection_string( # type: ignore + service_client = WebPubSubServiceClient.from_connection_string( # type: ignore connection_string=os.getenv("WEBPUBSUB_CONNECTION_STRING", ""), hub="hub" ) - return service_client.get_client_access_token( - roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"] - )["url"] + return service_client.get_client_access_token(roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"])["url"] + async def client_access_url_provider_async(): - service_client_async = WebPubSubServiceClientAsync.from_connection_string( # type: ignore + service_client_async = WebPubSubServiceClientAsync.from_connection_string( # type: ignore connection_string=os.getenv("WEBPUBSUB_CONNECTION_STRING", ""), hub="hub" ) - return (await service_client_async.get_client_access_token( - roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"] - ))["url"] + return ( + await service_client_async.get_client_access_token(roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"]) + )["url"] def send() -> None: global TIME_COST client = Client( - credential=WebPubSubClientCredential( - client_access_url_provider=client_access_url_provider - ), + credential=WebPubSubClientCredential(client_access_url_provider=client_access_url_provider), ) with client: @@ -65,26 +62,18 @@ async def send_item_async(client_async, idx): async def send_async() -> None: global TIME_COST_ASYNC client_async = AsyncClient( - credential=WebPubSubClientCredentialAsync( - client_access_url_provider=client_access_url_provider_async - ), + credential=WebPubSubClientCredentialAsync(client_access_url_provider=client_access_url_provider_async), ) async with client_async: group_name = "send_compare_between_async_sync" await client_async.join_group(group_name) start = time.time() - await asyncio.gather( - *[send_item_async(client_async, i) for i in range(MESSAGE_COUNT)] - ) + await asyncio.gather(*[send_item_async(client_async, i) for i in range(MESSAGE_COUNT)]) TIME_COST_ASYNC = time.time() - start if __name__ == "__main__": send() asyncio.get_event_loop().run_until_complete(send_async()) - print( - f"it takes {TIME_COST} seconds to send {MESSAGE_COUNT} messages with Sync API" - ) - print( - f"it takes {TIME_COST_ASYNC} seconds to send {MESSAGE_COUNT} messages with Async API" - ) + print(f"it takes {TIME_COST} seconds to send {MESSAGE_COUNT} messages with Sync API") + print(f"it takes {TIME_COST_ASYNC} seconds to send {MESSAGE_COUNT} messages with Async API") diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/stress/stress_base_async.py b/sdk/webpubsub/azure-messaging-webpubsubclient/stress/stress_base_async.py index 680124e079ba..67ca565c9fea 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/stress/stress_base_async.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/stress/stress_base_async.py @@ -22,14 +22,14 @@ async def main(log_file_name: str = "", log_interval: int = 5, duration: int = 2 service_client = WebPubSubServiceClient.from_connection_string( # type: ignore connection_string=os.getenv("WEBPUBSUB_CONNECTION_STRING", ""), hub="hub" ) + async def client_access_url_provider(): - return (await service_client.get_client_access_token( - roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"] - ))["url"] + return ( + await service_client.get_client_access_token(roles=["webpubsub.joinLeaveGroup", "webpubsub.sendToGroup"]) + )["url"] + client = WebPubSubClient( - credential=WebPubSubClientCredential( - client_access_url_provider=client_access_url_provider - ), + credential=WebPubSubClientCredential(client_access_url_provider=client_access_url_provider), ) message = "0" * 1024 start_time = time.time() diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/conftest.py b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/conftest.py index 9cc88c245ac6..e74d4017042f 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/conftest.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/conftest.py @@ -30,6 +30,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): connection_string = os.environ.get("WEBPUBSUBCLIENT_CONNECTION_STRING", "WEBPUBSUBCLIENT_CONNECTION_STRING") diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_auto_connect_async.py b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_auto_connect_async.py index 2b43c979289e..2a71dc2d4848 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_auto_connect_async.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_auto_connect_async.py @@ -11,6 +11,7 @@ from testcase import WebpubsubClientPowerShellPreparer from azure.messaging.webpubsubclient.models import WebPubSubProtocolType + @pytest.mark.live_test_only class TestWebpubsubClientAutoConnectAsync(WebpubsubClientTestAsync): # auto_connect will be triggered if connection is dropped by accident and we disable recovery @@ -32,9 +33,7 @@ async def test_auto_connect_async(self, webpubsubclient_connection_string): group_name = name await client.subscribe("group-message", on_group_message) await client.join_group(group_name) - await client._ws.sock.close( - code=1001 - ) # close the connection to trigger auto connect + await client._ws.sock.close(code=1001) # close the connection to trigger auto connect await asyncio.sleep(3) # wait for reconnect await client.send_to_group(group_name, name, "text") await asyncio.sleep(1) # wait for on_group_message to be called diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect.py b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect.py index 2f5614277ee2..cc03a9baf296 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect.py @@ -46,9 +46,7 @@ def test_disable_recovery_and_autoconnect(self, webpubsubclient_connection_strin # disable recovery and auto reconnect, then send message concurrently @WebpubsubClientPowerShellPreparer() @recorded_by_proxy - def test_disable_recovery_and_autoconnect_send_concurrently( - self, webpubsubclient_connection_string - ): + def test_disable_recovery_and_autoconnect_send_concurrently(self, webpubsubclient_connection_string): client = self.create_client( connection_string=webpubsubclient_connection_string, reconnect_retry_total=0, diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect_async.py b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect_async.py index 4175598fa2ae..f3cfe53bff10 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect_async.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/test_no_recovery_no_connect_async.py @@ -41,9 +41,7 @@ async def test_disable_recovery_and_autoconnect_async(self, webpubsubclient_conn # disable recovery and auto reconnect, then send message concurrently @WebpubsubClientPowerShellPreparer() @recorded_by_proxy_async - async def test_disable_recovery_and_autoconnect_send_concurrently_async( - self, webpubsubclient_connection_string - ): + async def test_disable_recovery_and_autoconnect_send_concurrently_async(self, webpubsubclient_connection_string): client = await self.create_client( connection_string=webpubsubclient_connection_string, reconnect_retry_total=0, diff --git a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/testcase_async.py b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/testcase_async.py index c9836ccc2f5a..8f1ece4c9379 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubclient/tests/testcase_async.py +++ b/sdk/webpubsub/azure-messaging-webpubsubclient/tests/testcase_async.py @@ -20,14 +20,18 @@ async def create_client( **kwargs, ): service_client = WebPubSubServiceClient.from_connection_string(connection_string, hub) + async def client_access_url_provider(): return (await service_client.get_client_access_token(roles=roles))["url"] + return WebPubSubClient( credential=WebPubSubClientCredential(client_access_url_provider), **kwargs, ) + TEST_RESULT_ASYNC = set() + async def on_group_message(msg: OnGroupDataMessageArgs): TEST_RESULT_ASYNC.add(msg.data) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_patch.py index 0ff7b7e0cb95..278de7da68b1 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_patch.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, List, IO, Optional, Union, overload, MutableMapping from datetime import datetime, timedelta, timezone import jwt diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py index 66d2a01c495b..5e632ea50c07 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List, Any, TYPE_CHECKING, Optional, Union, Awaitable from datetime import datetime, timedelta, timezone import jwt @@ -17,7 +18,6 @@ from ._client import WebPubSubServiceClient as WebPubSubServiceClientGenerated - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_patch.py index e9556cac6ecd..0e0bd476efa5 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_patch.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_patch.py @@ -8,6 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import Any, Union, Optional, Dict, List, IO, overload from azure.core.credentials import AzureKeyCredential from azure.core.async_paging import AsyncItemPaged diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py index d45289530826..a4507cec238b 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List from typing import Any, TYPE_CHECKING, Union diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/models/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/models/_patch.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py b/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py index 178d516750fa..ed6423979c32 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py @@ -11,7 +11,6 @@ import re from setuptools import setup, find_packages - PACKAGE_NAME = "azure-messaging-webpubsubservice" PACKAGE_PPRINT_NAME = "Azure WebPubSub Service" PACKAGE_NAMESPACE = "azure.messaging.webpubsubservice" diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_patch.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_patch.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_patch.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_patch.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_patch.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_patch.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_patch.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_patch.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_patch.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_patch.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/setup.py b/sdk/webpubsub/azure-mgmt-webpubsub/setup.py index 11a667e33935..db0edd9683cd 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/setup.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_async_test.py b/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_async_test.py index faa0f9666a48..896be90fa867 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_async_test.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_async_test.py @@ -25,4 +25,3 @@ async def test_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_test.py b/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_test.py index 6ea3dd12ab28..1b3c30791c78 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_test.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_operations_test.py @@ -24,4 +24,3 @@ def test_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_web_pub_sub_operations_async_test.py b/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_web_pub_sub_operations_async_test.py index cf2e31d1b5b3..1258f9566bc5 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_web_pub_sub_operations_async_test.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/tests/test_web_pub_sub_management_web_pub_sub_operations_async_test.py @@ -17,7 +17,7 @@ @pytest.mark.live_test_only class TestWebPubSubManagementWebPubSubOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): - self.client = self.create_mgmt_client(WebPubSubManagementClient, is_async=True) + self.client = self.create_mgmt_client(WebPubSubManagementClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async @@ -27,4 +27,3 @@ async def test_list_by_resource_group(self, resource_group): ) result = [r async for r in response] assert result == [] - \ No newline at end of file diff --git a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/_patch.py b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/_patch.py +++ b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/_patch.py b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/_patch.py +++ b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/operations/_patch.py b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/operations/_patch.py +++ b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/models/_patch.py b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/models/_patch.py +++ b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/operations/_patch.py b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/operations/_patch.py +++ b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/azure/mgmt/weightsandbiases/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/setup.py b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/setup.py index ee15d3cd188b..6ef5e4280023 100644 --- a/sdk/weightsandbiases/azure-mgmt-weightsandbiases/setup.py +++ b/sdk/weightsandbiases/azure-mgmt-weightsandbiases/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/_patch.py b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/_patch.py +++ b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/_patch.py b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/_patch.py +++ b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/operations/_patch.py b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/operations/_patch.py +++ b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/models/_patch.py b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/models/_patch.py +++ b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/operations/_patch.py b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/operations/_patch.py +++ b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/azure/mgmt/workloadorchestration/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/setup.py b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/setup.py index 7230aa52bb6e..c920bdb09c40 100644 --- a/sdk/workloadorchestration/azure-mgmt-workloadorchestration/setup.py +++ b/sdk/workloadorchestration/azure-mgmt-workloadorchestration/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) diff --git a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/_patch.py b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/_patch.py +++ b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/_patch.py b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/_patch.py index f99e77fef986..17dbc073e01b 100644 --- a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/_patch.py +++ b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/_patch.py @@ -25,6 +25,7 @@ # # -------------------------------------------------------------------------- + # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): diff --git a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/operations/_patch.py b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/operations/_patch.py +++ b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/aio/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/models/_patch.py b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/models/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/models/_patch.py +++ b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/models/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/operations/_patch.py b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/operations/_patch.py index f7dd32510333..455941122974 100644 --- a/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/operations/_patch.py +++ b/sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/operations/_patch.py @@ -6,6 +6,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloads/setup.py b/sdk/workloads/azure-mgmt-workloads/setup.py index 94a302591e45..032a06c7dcaa 100644 --- a/sdk/workloads/azure-mgmt-workloads/setup.py +++ b/sdk/workloads/azure-mgmt-workloads/setup.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -#------------------------------------------------------------------------- +# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. -#-------------------------------------------------------------------------- +# -------------------------------------------------------------------------- import re import os.path @@ -16,58 +16,64 @@ PACKAGE_PPRINT_NAME = "Workloads Management" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = PACKAGE_NAME.replace("-", "/") # a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +namespace_name = PACKAGE_NAME.replace("-", ".") # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py') - if os.path.exists(os.path.join(package_folder_path, 'version.py')) - else os.path.join(package_folder_path, '_version.py'), 'r') as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) +with open( + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), + "r", +) as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) if not version: - raise RuntimeError('Cannot find version information') + raise RuntimeError("Cannot find version information") -with open('README.md', encoding='utf-8') as f: +with open("README.md", encoding="utf-8") as f: readme = f.read() -with open('CHANGELOG.md', encoding='utf-8') as f: +with open("CHANGELOG.md", encoding="utf-8") as f: changelog = f.read() setup( name=PACKAGE_NAME, version=version, - description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), - long_description=readme + '\n\n' + changelog, - long_description_content_type='text/markdown', - license='MIT License', - author='Microsoft Corporation', - author_email='azpysdkhelp@microsoft.com', - url='https://github.com/Azure/azure-sdk-for-python', + description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'License :: OSI Approved :: MIT License', + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", ], zip_safe=False, - packages=find_packages(exclude=[ - 'tests', - # Exclude packages that will be covered by PEP420 or nspkg - 'azure', - 'azure.mgmt', - ]), + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.mgmt", + ] + ), include_package_data=True, package_data={ - 'pytyped': ['py.typed'], + "pytyped": ["py.typed"], }, install_requires=[ "msrest>=0.7.1", @@ -75,5 +81,5 @@ "azure-mgmt-core>=1.3.2,<2.0.0", "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7" + python_requires=">=3.7", ) diff --git a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/_patch.py b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/_patch.py +++ b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/_patch.py b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/_patch.py +++ b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/operations/_patch.py b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/operations/_patch.py +++ b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/aio/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/models/_patch.py b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/models/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/models/_patch.py +++ b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/models/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/operations/_patch.py b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/operations/_patch.py index 8bcb627aa475..b6400f50d7ce 100644 --- a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/operations/_patch.py +++ b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/azure/mgmt/workloadssapvirtualinstance/operations/_patch.py @@ -7,6 +7,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ + from typing import List __all__: List[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/setup.py b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/setup.py index bad35d089fb8..603b5b90c69d 100644 --- a/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/setup.py +++ b/sdk/workloads/azure-mgmt-workloadssapvirtualinstance/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)